@ms-cloudpack/config 0.3.2 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/config.d.ts CHANGED
@@ -1,10 +1,14 @@
1
- import type { CloudpackConfig } from './types.js';
1
+ import type { CloudpackConfig, GeneratedConfig } from './types.js';
2
2
  export declare const configFileName = "cloudpack.config.json";
3
+ export declare const generatedConfigFileName = "cloudpack.generated.json";
3
4
  /**
4
5
  * @param cwd - base path of the config file
5
6
  * @returns the path of the config file
6
7
  */
7
- export declare function getConfigPath(cwd?: string): string;
8
+ export declare function getConfigPath(cwd?: string): {
9
+ configPath: string;
10
+ overridesPath: string;
11
+ };
8
12
  /**
9
13
  * Reads the config file synchronously
10
14
  * @param cwd - base path of the config file
@@ -18,14 +22,8 @@ export declare function readConfigSync(cwd?: string): CloudpackConfig;
18
22
  */
19
23
  export declare function readConfig(cwd?: string): Promise<CloudpackConfig>;
20
24
  /**
21
- * Writes the config file asynchronously
25
+ * Writes generated config. This is used for `init` to provide package overrides needed.
22
26
  * @param config - updated config object to be written
23
27
  * @param cwd - base path of the config file
24
28
  */
25
- export declare function writeConfig(config: CloudpackConfig, cwd?: string): Promise<void>;
26
- /**
27
- * Writes the config file synchronously
28
- * @param config - updated config object to be written
29
- * @param cwd - base path of the config file
30
- */
31
- export declare function writeConfigSync(config: CloudpackConfig, cwd?: string): void;
29
+ export declare function writeGeneratedConfig(config: GeneratedConfig, cwd?: string): Promise<void>;
package/lib/config.js CHANGED
@@ -1,13 +1,17 @@
1
1
  import path from 'path';
2
- import { readJson, readJsonSync, writeJson, writeJsonSync } from '@ms-cloudpack/json-utilities';
2
+ import { readJson, readJsonSync, writeJson } from '@ms-cloudpack/json-utilities';
3
3
  export const configFileName = 'cloudpack.config.json';
4
+ export const generatedConfigFileName = 'cloudpack.generated.json';
4
5
  /**
5
6
  * @param cwd - base path of the config file
6
7
  * @returns the path of the config file
7
8
  */
8
9
  export function getConfigPath(cwd) {
9
10
  const basePath = cwd || process.cwd();
10
- return path.join(basePath, configFileName);
11
+ return {
12
+ configPath: path.join(basePath, configFileName),
13
+ overridesPath: path.join(basePath, generatedConfigFileName),
14
+ };
11
15
  }
12
16
  /**
13
17
  * Reads the config file synchronously
@@ -15,9 +19,13 @@ export function getConfigPath(cwd) {
15
19
  * @returns cloudpack config object or empty object if no config file exists.
16
20
  */
17
21
  export function readConfigSync(cwd) {
18
- const filePath = getConfigPath(cwd);
19
- const config = readJsonSync(filePath) || {};
20
- return config;
22
+ const { configPath, overridesPath } = getConfigPath(cwd);
23
+ return {
24
+ // eslint-disable-next-line no-restricted-syntax
25
+ ...(readJsonSync(configPath) || {}),
26
+ // eslint-disable-next-line no-restricted-syntax
27
+ ...(readJsonSync(overridesPath) || {}),
28
+ };
21
29
  }
22
30
  /**
23
31
  * Reads the config file asynchronously
@@ -25,30 +33,29 @@ export function readConfigSync(cwd) {
25
33
  * @returns cloudpack config object or empty object if no config file exists.
26
34
  */
27
35
  export async function readConfig(cwd) {
28
- const filePath = getConfigPath(cwd);
29
- const config = (await readJson(filePath)) || {};
30
- return config;
36
+ const { configPath, overridesPath } = getConfigPath(cwd);
37
+ return {
38
+ ...((await readJson(configPath)) || {}),
39
+ ...((await readJson(overridesPath)) || {}),
40
+ };
31
41
  }
32
42
  /**
33
- * Writes the config file asynchronously
43
+ * Writes generated config. This is used for `init` to provide package overrides needed.
34
44
  * @param config - updated config object to be written
35
45
  * @param cwd - base path of the config file
36
46
  */
37
- export async function writeConfig(config, cwd) {
38
- const filePath = getConfigPath(cwd);
39
- return writeJson(filePath, {
40
- ...config,
41
- });
42
- }
43
- /**
44
- * Writes the config file synchronously
45
- * @param config - updated config object to be written
46
- * @param cwd - base path of the config file
47
- */
48
- export function writeConfigSync(config, cwd) {
49
- const filePath = getConfigPath(cwd);
50
- return writeJsonSync(filePath, {
47
+ export async function writeGeneratedConfig(config, cwd) {
48
+ const { overridesPath } = getConfigPath(cwd);
49
+ // Ensure package overrides are sorted based on package name and versionRequirement.
50
+ const sortedOverrides = config.packageOverrides?.sort((a, b) => {
51
+ if (a.name === b.name) {
52
+ return a.versionRequirement.localeCompare(b.versionRequirement);
53
+ }
54
+ return a.name.localeCompare(b.name);
55
+ }) || [];
56
+ return writeJson(overridesPath, {
51
57
  ...config,
58
+ packageOverrides: sortedOverrides,
52
59
  });
53
60
  }
54
61
  //# sourceMappingURL=config.js.map
package/lib/config.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAEhG,MAAM,CAAC,MAAM,cAAc,GAAG,uBAAuB,CAAC;AAEtD;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,GAAY;IACxC,MAAM,QAAQ,GAAG,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IACtC,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;AAC7C,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,GAAY;IACzC,MAAM,QAAQ,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;IACpC,MAAM,MAAM,GAAoB,YAAY,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;IAE7D,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,GAAY;IAC3C,MAAM,QAAQ,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;IACpC,MAAM,MAAM,GAAoB,CAAC,MAAM,QAAQ,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;IAEjE,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,MAAuB,EAAE,GAAY;IACrE,MAAM,QAAQ,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;IAEpC,OAAO,SAAS,CAAC,QAAQ,EAAE;QACzB,GAAG,MAAM;KACV,CAAC,CAAC;AACL,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,MAAuB,EAAE,GAAY;IACnE,MAAM,QAAQ,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;IAEpC,OAAO,aAAa,CAAC,QAAQ,EAAE;QAC7B,GAAG,MAAM;KACV,CAAC,CAAC;AACL,CAAC","sourcesContent":["import path from 'path';\nimport type { CloudpackConfig } from './types.js';\nimport { readJson, readJsonSync, writeJson, writeJsonSync } from '@ms-cloudpack/json-utilities';\n\nexport const configFileName = 'cloudpack.config.json';\n\n/**\n * @param cwd - base path of the config file\n * @returns the path of the config file\n */\nexport function getConfigPath(cwd?: string) {\n const basePath = cwd || process.cwd();\n return path.join(basePath, configFileName);\n}\n\n/**\n * Reads the config file synchronously\n * @param cwd - base path of the config file\n * @returns cloudpack config object or empty object if no config file exists.\n */\nexport function readConfigSync(cwd?: string) {\n const filePath = getConfigPath(cwd);\n const config: CloudpackConfig = readJsonSync(filePath) || {};\n\n return config;\n}\n\n/**\n * Reads the config file asynchronously\n * @param cwd - base path of the config file\n * @returns cloudpack config object or empty object if no config file exists.\n */\nexport async function readConfig(cwd?: string) {\n const filePath = getConfigPath(cwd);\n const config: CloudpackConfig = (await readJson(filePath)) || {};\n\n return config;\n}\n\n/**\n * Writes the config file asynchronously\n * @param config - updated config object to be written\n * @param cwd - base path of the config file\n */\nexport async function writeConfig(config: CloudpackConfig, cwd?: string) {\n const filePath = getConfigPath(cwd);\n\n return writeJson(filePath, {\n ...config,\n });\n}\n\n/**\n * Writes the config file synchronously\n * @param config - updated config object to be written\n * @param cwd - base path of the config file\n */\nexport function writeConfigSync(config: CloudpackConfig, cwd?: string) {\n const filePath = getConfigPath(cwd);\n\n return writeJsonSync(filePath, {\n ...config,\n });\n}\n"]}
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAEjF,MAAM,CAAC,MAAM,cAAc,GAAG,uBAAuB,CAAC;AACtD,MAAM,CAAC,MAAM,uBAAuB,GAAG,0BAA0B,CAAC;AAElE;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,GAAY;IACxC,MAAM,QAAQ,GAAG,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IACtC,OAAO;QACL,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,cAAc,CAAC;QAC/C,aAAa,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,uBAAuB,CAAC;KAC5D,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,GAAY;IACzC,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;IAEzD,OAAO;QACL,gDAAgD;QAChD,GAAG,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;QACnC,gDAAgD;QAChD,GAAG,CAAC,YAAY,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;KACpB,CAAC;AACvB,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,GAAY;IAC3C,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;IAEzD,OAAO;QACL,GAAG,CAAC,CAAC,MAAM,QAAQ,CAAC,UAAU,CAAC,CAAC,IAAI,EAAE,CAAC;QACvC,GAAG,CAAC,CAAC,MAAM,QAAQ,CAAC,aAAa,CAAC,CAAC,IAAI,EAAE,CAAC;KACxB,CAAC;AACvB,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,MAAuB,EAAE,GAAY;IAC9E,MAAM,EAAE,aAAa,EAAE,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;IAE7C,oFAAoF;IACpF,MAAM,eAAe,GACnB,MAAM,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACrC,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,EAAE;YACrB,OAAO,CAAC,CAAC,kBAAkB,CAAC,aAAa,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC;SACjE;QAED,OAAO,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC,CAAC,IAAI,EAAE,CAAC;IAEX,OAAO,SAAS,CAAC,aAAa,EAAE;QAC9B,GAAG,MAAM;QACT,gBAAgB,EAAE,eAAe;KAClC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import path from 'path';\nimport type { CloudpackConfig, GeneratedConfig } from './types.js';\nimport { readJson, readJsonSync, writeJson } from '@ms-cloudpack/json-utilities';\n\nexport const configFileName = 'cloudpack.config.json';\nexport const generatedConfigFileName = 'cloudpack.generated.json';\n\n/**\n * @param cwd - base path of the config file\n * @returns the path of the config file\n */\nexport function getConfigPath(cwd?: string) {\n const basePath = cwd || process.cwd();\n return {\n configPath: path.join(basePath, configFileName),\n overridesPath: path.join(basePath, generatedConfigFileName),\n };\n}\n\n/**\n * Reads the config file synchronously\n * @param cwd - base path of the config file\n * @returns cloudpack config object or empty object if no config file exists.\n */\nexport function readConfigSync(cwd?: string) {\n const { configPath, overridesPath } = getConfigPath(cwd);\n\n return {\n // eslint-disable-next-line no-restricted-syntax\n ...(readJsonSync(configPath) || {}),\n // eslint-disable-next-line no-restricted-syntax\n ...(readJsonSync(overridesPath) || {}),\n } as CloudpackConfig;\n}\n\n/**\n * Reads the config file asynchronously\n * @param cwd - base path of the config file\n * @returns cloudpack config object or empty object if no config file exists.\n */\nexport async function readConfig(cwd?: string): Promise<CloudpackConfig> {\n const { configPath, overridesPath } = getConfigPath(cwd);\n\n return {\n ...((await readJson(configPath)) || {}),\n ...((await readJson(overridesPath)) || {}),\n } as CloudpackConfig;\n}\n\n/**\n * Writes generated config. This is used for `init` to provide package overrides needed.\n * @param config - updated config object to be written\n * @param cwd - base path of the config file\n */\nexport async function writeGeneratedConfig(config: GeneratedConfig, cwd?: string) {\n const { overridesPath } = getConfigPath(cwd);\n\n // Ensure package overrides are sorted based on package name and versionRequirement.\n const sortedOverrides =\n config.packageOverrides?.sort((a, b) => {\n if (a.name === b.name) {\n return a.versionRequirement.localeCompare(b.versionRequirement);\n }\n\n return a.name.localeCompare(b.name);\n }) || [];\n\n return writeJson(overridesPath, {\n ...config,\n packageOverrides: sortedOverrides,\n });\n}\n"]}
package/lib/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export { configTemplate } from './configTemplate.js';
2
- export { configFileName, getConfigPath, readConfig, readConfigSync, writeConfig, writeConfigSync } from './config.js';
2
+ export { configFileName, generatedConfigFileName, getConfigPath, readConfig, readConfigSync, writeGeneratedConfig, } from './config.js';
3
3
  export type { CloudpackConfig, DevServer, PackageOverride, Route, TelemetryConfig } from './types.js';
package/lib/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  export { configTemplate } from './configTemplate.js';
2
- export { configFileName, getConfigPath, readConfig, readConfigSync, writeConfig, writeConfigSync } from './config.js';
2
+ export { configFileName, generatedConfigFileName, getConfigPath, readConfig, readConfigSync, writeGeneratedConfig, } from './config.js';
3
3
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,UAAU,EAAE,cAAc,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC","sourcesContent":["export { configTemplate } from './configTemplate.js';\nexport { configFileName, getConfigPath, readConfig, readConfigSync, writeConfig, writeConfigSync } from './config.js';\nexport type { CloudpackConfig, DevServer, PackageOverride, Route, TelemetryConfig } from './types.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,aAAa,EACb,UAAU,EACV,cAAc,EACd,oBAAoB,GACrB,MAAM,aAAa,CAAC","sourcesContent":["export { configTemplate } from './configTemplate.js';\nexport {\n configFileName,\n generatedConfigFileName,\n getConfigPath,\n readConfig,\n readConfigSync,\n writeGeneratedConfig,\n} from './config.js';\nexport type { CloudpackConfig, DevServer, PackageOverride, Route, TelemetryConfig } from './types.js';\n"]}
package/lib/types.d.ts CHANGED
@@ -65,14 +65,13 @@ export interface TelemetryConfig {
65
65
  instrumentationKey: string;
66
66
  }
67
67
  /**
68
- * Per-application configuration for Cloudpack.
68
+ * The merged result of user-provided and generated configuration for Cloudpack.
69
69
  */
70
- export interface CloudpackConfig {
71
- /**
72
- * An array of PackageOverride objects, used to provide overrides for packages without modifying their
73
- * definitions directly. This is primarily used for providing exports maps for packages that don't have them.
74
- */
75
- packageOverrides?: PackageOverride[];
70
+ export type CloudpackConfig = UserConfig & GeneratedConfig;
71
+ /**
72
+ * Per-application user-provided configuration for Cloudpack.
73
+ */
74
+ export interface UserConfig {
76
75
  /**
77
76
  * A set of options for configuring how the dev server works.
78
77
  */
@@ -93,3 +92,13 @@ export interface CloudpackConfig {
93
92
  disableSourceMaps?: boolean;
94
93
  };
95
94
  }
95
+ /**
96
+ * Per-application generated configuration for Cloudpack.
97
+ */
98
+ export interface GeneratedConfig {
99
+ /**
100
+ * An array of PackageOverride objects, used to provide overrides for packages without modifying their
101
+ * definitions directly. This is primarily used for providing exports maps for packages that don't have them.
102
+ */
103
+ packageOverrides?: PackageOverride[];
104
+ }
package/lib/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { PackageJson } from '@ms-cloudpack/bundler-types';\nimport type { HttpsConfig } from '@ms-cloudpack/create-express-app';\n\nexport interface PackageOverride {\n name: string;\n versionRequirement: string;\n isInternal?: boolean;\n overrides: PackageJson;\n}\n\nexport interface Route {\n /**\n * The url path part to match. Start paths with a leading slash, e.g. `'/my-route'`. You can also\n * use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`.\n */\n match: string;\n\n /**\n * The path relative to the app root to static assets. If this is provided, renderScript/exportEntry\n * will be ignored.\n */\n staticPath?: string;\n\n /**\n * Path to a .js or .html file used for rendering the route. If a script is provided, it must\n * export a default function implementing `CreateHtmlFunction` defined in `@ms-cloudpack/cli`.\n */\n renderScript?: string;\n\n /**\n * The key in the exports map which represents the entry point app script for this route.\n * Default is '.', meaning the main package export key.\n */\n exportEntry?: string;\n}\n\nexport interface DevServer {\n /**\n * The domain name of the server.\n */\n domain?: string;\n\n /**\n * The ports to be used by the server.\n * It can be a number or an array of numbers.\n * If ports are provided, an error will be thrown if none are available.\n * If no ports are provided, the server will attempt to find an available port.\n */\n port?: number | number[];\n\n /**\n * The config settings for the https server.\n * Paths to files are accepted for 'ca', 'cert', 'key', and 'pfx' settings.\n * Everything else is passed directly to the https.createServer() method.\n * If not provided, the server will use http.\n */\n https?: HttpsConfig;\n\n /**\n * If provided, will override where the publicDir is located, relative to the app package folder.\n * Defaults to `./public`. The same thing can be achieved with `routes`, using route: '*' and\n * staticPath: './public', so the `publicPath` setting may be removed in the future.\n */\n publicPath?: string;\n\n /**\n * If provided, will register routes with the dev server to host various pages.\n */\n routes?: Route[];\n}\n\nexport interface TelemetryConfig {\n /**\n * Application Insights instrumentation key.\n */\n instrumentationKey: string;\n}\n\n/**\n * Per-application configuration for Cloudpack.\n */\nexport interface CloudpackConfig {\n /**\n * An array of PackageOverride objects, used to provide overrides for packages without modifying their\n * definitions directly. This is primarily used for providing exports maps for packages that don't have them.\n */\n packageOverrides?: PackageOverride[];\n\n /**\n * A set of options for configuring how the dev server works.\n */\n devServer?: DevServer;\n\n /**\n * A set of options for configuring telemetry\n */\n telemetry?: TelemetryConfig;\n\n /**\n * A set of options for configuring the experience. Features can be set to true to change the default\n * behavior.\n */\n features?: {\n /**\n * If true, no source maps will be generated for any bundles produced. This might be useful if sourcemap\n * generation causes performance issues.\n */\n disableSourceMaps?: boolean;\n };\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { PackageJson } from '@ms-cloudpack/bundler-types';\nimport type { HttpsConfig } from '@ms-cloudpack/create-express-app';\n\nexport interface PackageOverride {\n name: string;\n versionRequirement: string;\n isInternal?: boolean;\n overrides: PackageJson;\n}\n\nexport interface Route {\n /**\n * The url path part to match. Start paths with a leading slash, e.g. `'/my-route'`. You can also\n * use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`.\n */\n match: string;\n\n /**\n * The path relative to the app root to static assets. If this is provided, renderScript/exportEntry\n * will be ignored.\n */\n staticPath?: string;\n\n /**\n * Path to a .js or .html file used for rendering the route. If a script is provided, it must\n * export a default function implementing `CreateHtmlFunction` defined in `@ms-cloudpack/cli`.\n */\n renderScript?: string;\n\n /**\n * The key in the exports map which represents the entry point app script for this route.\n * Default is '.', meaning the main package export key.\n */\n exportEntry?: string;\n}\n\nexport interface DevServer {\n /**\n * The domain name of the server.\n */\n domain?: string;\n\n /**\n * The ports to be used by the server.\n * It can be a number or an array of numbers.\n * If ports are provided, an error will be thrown if none are available.\n * If no ports are provided, the server will attempt to find an available port.\n */\n port?: number | number[];\n\n /**\n * The config settings for the https server.\n * Paths to files are accepted for 'ca', 'cert', 'key', and 'pfx' settings.\n * Everything else is passed directly to the https.createServer() method.\n * If not provided, the server will use http.\n */\n https?: HttpsConfig;\n\n /**\n * If provided, will override where the publicDir is located, relative to the app package folder.\n * Defaults to `./public`. The same thing can be achieved with `routes`, using route: '*' and\n * staticPath: './public', so the `publicPath` setting may be removed in the future.\n */\n publicPath?: string;\n\n /**\n * If provided, will register routes with the dev server to host various pages.\n */\n routes?: Route[];\n}\n\nexport interface TelemetryConfig {\n /**\n * Application Insights instrumentation key.\n */\n instrumentationKey: string;\n}\n\n/**\n * The merged result of user-provided and generated configuration for Cloudpack.\n */\nexport type CloudpackConfig = UserConfig & GeneratedConfig;\n\n/**\n * Per-application user-provided configuration for Cloudpack.\n */\nexport interface UserConfig {\n /**\n * A set of options for configuring how the dev server works.\n */\n devServer?: DevServer;\n\n /**\n * A set of options for configuring telemetry\n */\n telemetry?: TelemetryConfig;\n\n /**\n * A set of options for configuring the experience. Features can be set to true to change the default\n * behavior.\n */\n features?: {\n /**\n * If true, no source maps will be generated for any bundles produced. This might be useful if sourcemap\n * generation causes performance issues.\n */\n disableSourceMaps?: boolean;\n };\n}\n\n/**\n * Per-application generated configuration for Cloudpack.\n */\nexport interface GeneratedConfig {\n /**\n * An array of PackageOverride objects, used to provide overrides for packages without modifying their\n * definitions directly. This is primarily used for providing exports maps for packages that don't have them.\n */\n packageOverrides?: PackageOverride[];\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ms-cloudpack/config",
3
- "version": "0.3.2",
3
+ "version": "0.5.0",
4
4
  "description": "Configuration handling for cloudpack.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -14,7 +14,7 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "@ms-cloudpack/bundler-types": "^0.12.0",
17
- "@ms-cloudpack/create-express-app": "^1.3.2",
17
+ "@ms-cloudpack/create-express-app": "^1.3.3",
18
18
  "@ms-cloudpack/json-utilities": "^0.0.6"
19
19
  },
20
20
  "devDependencies": {