Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For instance, assuming the resolved .wediaportalrc file has the following shape:

Code Block
{
  "extends": "<some other wediaportalrc>", // new in 2023.3
  "environments": {
    "my-customer": {
      // ...
    },
    "other-customer": {
      // ...
    }
  },
  "aliases": {
    "default": "my-customer"
  }
}

...

Code Block
npm run build -- other-customer
# is equivalent to
npm run wediaportal -- build other-customer

It is possible to build several targets with only one command:

Code Block
npm run build -- integration,preproduction

will build plugins for both environments

Note

When specifying multiple environments, property vue_apps_base_url.portal must be common among all environments

Common options of the cli

...

NOTE: when parsed, a JSON5 parser is used ; this means that the JSON stream is much more permissive than a regular JSON is expected to be ; in particular, you are allowed to add single line comments //, block comments /* */, un-ambiguous keys are not to be double-quoted…

Extending a .wediaportalrc

Starting from 2023.3, .wediaportalrc files can be extended. Using the root property extends, you can specify which wediaportalrc file the current file is extending.

This can be useful especially when different members of the team are running their local server with different configurations.

Expand
titleSee how this feature can be useful if some team members need specific configuration

Given the integration server is available at https://project-int.wedia-group.com
Given team member 1 uses a server available at http://localhost:8080/project
Given team member 2 uses a server available at http://localhost:8082/project

it is possible to define a project wise configuration:

Code Block
// .wediaportalrc
{
  "environments": {
    "project": {
      "": {
        "vue_app_api_path": "",
        // ...
      },
      "development": {
        "vue_app_api_path": "https://project-int.wedia-group.com"
      }
    }
  },
  "aliases": {
    "local": {
      "of: "project",
      "override": {}
    }
  }
}

team can agree to exclude .wediaportalrc_private from git:

Code Block
// .gitignore
.env.local
.wediaportalrc_private

team member1 and team member 2can define in .env.local that they wants to use .wediaportalrc_private

Code Block
// .env.local
WEDIAPORTALRC=.wediaportalrc_private

team member 1 will create .wediaportalrc_private as extending .wediaportalrc with his own environment:

Code Block
// team member 1 .wediaportalrc_private
{
  "extends": ".wediaportalrc",
  "aliases": {
    "local": {
      "override": {
        "*": {
          "vue_app_api_path": "http://localhost:8080/project"
        }
      }
    }
  }
}

team member 2 will do the same:

Code Block
// team member 2 .wediaportalrc_private
{
  "extends": ".wediaportalrc",
  "aliases": {
    "local": {
      "override": {
        "*": {
          "vue_app_api_path": "http://localhost:8082/project"
        }
      }
    }
  }
}

Interface of a .wediaportalrc file

...

Code Block
languagetypescript
type WediaConfig = Record<string, string>;
interface WediaEnvironment {
  appConfigs?: WediaConfig
  deploy_server?: string
  jspMode?: boolean
  plugin_name?: string
  vue_app_analytics_session_name?: string
  vue_app_analytics_session_name_asset_picker?: string
  vue_app_analytics_session_name_office_picker?: string
  vue_app_api_path?: string
  vue_appapps_base_url?: {
string    vue_app_base_url_asset_adobe-asset-picker?: string
   vue_app_base_url_config asset-picker?: string
    vue_app_base_url_office_office-outlook-asset-picker?: string
   vue_app_base_url_office_outlook_picker office-asset-picker?: string
    portal?: string
    wedia-config?: string
  }
  vue_app_bundle_basename?: string
  vue_app_config_path?: string
  vue_app_config_plugin?: string
  vue_app_context?: string
  vue_app_context_asset_picker?: string
  vue_app_context_office_asset_picker?: string
  vue_app_cookie_auth?: string
  vue_app_default_title?: string
  vue_app_key?: string
  vue_app_name?: string
  vue_app_secret?: string
  vue_app_config_server?: boolean
  configBases?: string[]
  configResolverPlugin?: string
}

type TypedWediaEnvironments = {
  ""?: WediaEnvironment
  "local"?: WediaEnvironment
  "development"?: WediaEnvironment
  "development-local"?: WediaEnvironment
}

type WediaAlias = string | {
  of: string,
  override: TypedWediaEnvironments & {
    "*"?: WediaEnvironment
  }
}

export interface WediaPortalRcFile {
  environments: TypedWediaEnvironments
  aliases: Record<string, WediaAlias>
}

Detailed documentation for WediaEnvironment

property

type

default

description

deploy_server

string

http://localhost:8080

Server to which plugin(s) should be deployed

→ Change with a value such as https://<customer>-int.wedia-group.com

jspMode

boolean

true

Should landing pages be served by JSPs

→ You should not override

plugin_name

string

PACKAGED_Portal

The name of the plugin holding the portal source file

vue_app_analytics_session_name

string

portal

The type session attribute to use for analytics when using the portal application

→ You should not override

vue_app_analytics_session_name_asset_picker

string

assetpicker

The type session attribute to use for analytics when using the picker application

→ You should not override

vue_app_analytics_session_name_office_picker

string

officepicker

The type session attribute to use for analytics when using the officepicker application

→ You should not override

vue_app_api_path

string

(empty)

The path to the api service (useful only in dev)

→ Only override for development

vue_

appServer’s

apps_base_url

object

string

/portal/

Code Block
{
  adobeAssetPicker: '/adobe-asset-picker/',
  assetPicker: '/asset-picker/',
  officeOutlookPicker: '/office-outlook-asset-picker/',
  officeAssetPicker: '/office-picker/',
  portal: '/portal/',
  wediaConfig: '/wedia-config/',
}
  • adobeAssetPicker: Server's base path for accessing adobe asset picker. Must start and end with a /→ You should not override

  • assetPicker: Server's base path for accessing picker. Must start and end with a /→ You should not override

  • officeOutlookPicker: Server's base path for accessing office outlook content picker. Must start and end with a /→ You should not override

  • officeAssetPicker: Server's base path for accessing office content picker (except outlook). Must start and end with a /→ You should not override

  • portal: Server's base path for accessing portal. Must start and end with a /→ You should not override

  • wediaConfig: Server's base path for accessing wedia-config. Must start and end with a /

  • → You should not override

vue_app_base_url

string

/portal/

(DEPRECIATED since 2023.5.0) Server’s base path for accessing portal.

vue_app_base_url_asset_picker

string

/asset-picker/

(DEPRECIATED since 2023.5.0) Server’s base path for accessing picker.

Must start and end with a /

→ You should not override

vue_app_base_url_config

string

/wedia-config/

(DEPRECIATED since 2023.5.0) Server’s base path for accessing wedia-config.

Must start and end with a /

→ You should not override

vue_app_base_url_office_picker

string

/office-picker/

(DEPRECIATED since 2023.5.0) Server’s base path for accessing office content picker (except outlook)

Must start and end with a /

→ You should not override

.

vue_app_base_url_office_outlook_picker

string

/office-outlook-asset-picker/

(DEPRECIATED since 2023.5.0) Server’s base path for accessing office outlook content picker

Must start and end with a /

→ You should not override

.

vue_app_bundle_basename

string

/_plugins/PACKAGED_VueAppI18n/config/plugin

Bundle path for portal resources

→ You should not override

vue_app_config_path

string

portal

Name of the mapping used by portal application

vue_app_config_plugin

string

PACKAGED_Portal

DEPRECATED

Name of the plugin holding the configuration.

vue_app_context

string

portal

The vue application context. Allows to always get an extra parameter to be used for bases for instance

→ You should not override

vue_app_context_asset_picker

string

assetpicker

see vue_app_context

vue_app_context_office_asset_picker

string

officeassetpicker

see vue_app_context

vue_app_cookie_auth

string

true

Use cookie auth

→ You should not override

vue_app_default_title

string

Wedia - Portal - Starter Kit

Default application title

vue_app_key

string

3c0122ccdc01abec45184bb7fcc344317c2c33d1

The key to use by the application

vue_app_name

string

portal-app

The default app name

vue_app_secret

string

(not shown)

the secret for the app

vue_app_config_server

boolean

false

Is the application configuration handled by server ?

configBases

string[]

['_portal', 'starter-kit']

Default bases

→ You should not override

configResolverPlugin

string

WXM_CONFIG_RESOLVER

The plugin computing configurations

→ You should not override