@ms-cloudpack/config 0.5.6 → 0.6.1

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.
Files changed (53) hide show
  1. package/lib/allFeatures.d.ts +7 -0
  2. package/lib/allFeatures.d.ts.map +1 -0
  3. package/lib/allFeatures.js +11 -0
  4. package/lib/allFeatures.js.map +1 -0
  5. package/lib/config.d.ts +2 -1
  6. package/lib/config.d.ts.map +1 -1
  7. package/lib/config.js.map +1 -1
  8. package/lib/index.d.ts +10 -1
  9. package/lib/index.d.ts.map +1 -1
  10. package/lib/index.js +1 -0
  11. package/lib/index.js.map +1 -1
  12. package/lib/tsdoc-metadata.json +11 -11
  13. package/lib/types/CloudpackConfig.d.ts +7 -0
  14. package/lib/types/CloudpackConfig.d.ts.map +1 -0
  15. package/lib/types/CloudpackConfig.js +2 -0
  16. package/lib/types/CloudpackConfig.js.map +1 -0
  17. package/lib/types/DevServer.d.ts +33 -0
  18. package/lib/types/DevServer.d.ts.map +1 -0
  19. package/lib/types/DevServer.js +2 -0
  20. package/lib/types/DevServer.js.map +1 -0
  21. package/lib/types/Feature.d.ts +5 -0
  22. package/lib/types/Feature.d.ts.map +1 -0
  23. package/lib/types/Feature.js +2 -0
  24. package/lib/types/Feature.js.map +1 -0
  25. package/lib/types/Features.d.ts +6 -0
  26. package/lib/types/Features.d.ts.map +1 -0
  27. package/lib/types/Features.js +2 -0
  28. package/lib/types/Features.js.map +1 -0
  29. package/lib/types/GeneratedConfig.d.ts +12 -0
  30. package/lib/types/GeneratedConfig.d.ts.map +1 -0
  31. package/lib/types/GeneratedConfig.js +2 -0
  32. package/lib/types/GeneratedConfig.js.map +1 -0
  33. package/lib/types/PackageOverride.d.ts +8 -0
  34. package/lib/types/PackageOverride.d.ts.map +1 -0
  35. package/lib/types/PackageOverride.js +2 -0
  36. package/lib/types/PackageOverride.js.map +1 -0
  37. package/lib/types/Route.d.ts +23 -0
  38. package/lib/types/Route.d.ts.map +1 -0
  39. package/lib/types/Route.js +2 -0
  40. package/lib/types/Route.js.map +1 -0
  41. package/lib/types/TelemetryConfig.d.ts +7 -0
  42. package/lib/types/TelemetryConfig.d.ts.map +1 -0
  43. package/lib/types/TelemetryConfig.js +2 -0
  44. package/lib/types/TelemetryConfig.js.map +1 -0
  45. package/lib/types/UserConfig.d.ts +22 -0
  46. package/lib/types/UserConfig.d.ts.map +1 -0
  47. package/lib/types/UserConfig.js +2 -0
  48. package/lib/types/UserConfig.js.map +1 -0
  49. package/package.json +3 -4
  50. package/lib/types.d.ts +0 -118
  51. package/lib/types.d.ts.map +0 -1
  52. package/lib/types.js +0 -2
  53. package/lib/types.js.map +0 -1
@@ -0,0 +1,7 @@
1
+ import type { Feature } from './types/Feature.js';
2
+ /**
3
+ * A set of options for configuring the experience. Features can be set to true to change the default
4
+ * behavior.
5
+ */
6
+ export declare const allFeatures: Feature[];
7
+ //# sourceMappingURL=allFeatures.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"allFeatures.d.ts","sourceRoot":"","sources":["../src/allFeatures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,OAAO,EAKhC,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * A set of options for configuring the experience. Features can be set to true to change the default
3
+ * behavior.
4
+ */
5
+ export const allFeatures = [
6
+ { name: 'disableSourceMaps', description: 'Disables the generation of source-maps during build.' },
7
+ { name: 'enqueueDependencies', description: 'Enables the preemptive enqueueing of dependencies during build.' },
8
+ { name: 'cacheInternalPackages', description: 'Enables the reuse of prebuild assets for internal packages.' },
9
+ { name: 'enableLage', description: 'Enables the use of lage for running tasks.' },
10
+ ];
11
+ //# sourceMappingURL=allFeatures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"allFeatures.js","sourceRoot":"","sources":["../src/allFeatures.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAc;IACpC,EAAE,IAAI,EAAE,mBAAmB,EAAE,WAAW,EAAE,sDAAsD,EAAE;IAClG,EAAE,IAAI,EAAE,qBAAqB,EAAE,WAAW,EAAE,iEAAiE,EAAE;IAC/G,EAAE,IAAI,EAAE,uBAAuB,EAAE,WAAW,EAAE,6DAA6D,EAAE;IAC7G,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,4CAA4C,EAAE;CAClF,CAAC","sourcesContent":["import type { Feature } from './types/Feature.js';\n\n/**\n * A set of options for configuring the experience. Features can be set to true to change the default\n * behavior.\n */\nexport const allFeatures: Feature[] = [\n { name: 'disableSourceMaps', description: 'Disables the generation of source-maps during build.' },\n { name: 'enqueueDependencies', description: 'Enables the preemptive enqueueing of dependencies during build.' },\n { name: 'cacheInternalPackages', description: 'Enables the reuse of prebuild assets for internal packages.' },\n { name: 'enableLage', description: 'Enables the use of lage for running tasks.' },\n];\n"]}
package/lib/config.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import type { CloudpackConfig, GeneratedConfig } from './types.js';
1
+ import type { GeneratedConfig } from './types/GeneratedConfig.js';
2
+ import type { CloudpackConfig } from './types/CloudpackConfig.js';
2
3
  export declare const configFileName = "cloudpack.config.json";
3
4
  export declare const generatedConfigFileName = "cloudpack.generated.json";
4
5
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAGnE,eAAO,MAAM,cAAc,0BAA0B,CAAC;AACtD,eAAO,MAAM,uBAAuB,6BAA6B,CAAC;AAElE;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,CAAC,EAAE,MAAM;;;EAMzC;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,CAAC,EAAE,MAAM,mBAS1C;AAED;;;;GAIG;AACH,wBAAsB,UAAU,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAOvE;AAED;;;;GAIG;AACH,wBAAsB,oBAAoB,CAAC,MAAM,EAAE,eAAe,EAAE,GAAG,CAAC,EAAE,MAAM,iBAiB/E"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAGlE,eAAO,MAAM,cAAc,0BAA0B,CAAC;AACtD,eAAO,MAAM,uBAAuB,6BAA6B,CAAC;AAElE;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,CAAC,EAAE,MAAM;;;EAMzC;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,CAAC,EAAE,MAAM,mBAS1C;AAED;;;;GAIG;AACH,wBAAsB,UAAU,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAOvE;AAED;;;;GAIG;AACH,wBAAsB,oBAAoB,CAAC,MAAM,EAAE,eAAe,EAAE,GAAG,CAAC,EAAE,MAAM,iBAiB/E"}
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,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"]}
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,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 { GeneratedConfig } from './types/GeneratedConfig.js';\nimport type { CloudpackConfig } from './types/CloudpackConfig.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,4 +1,13 @@
1
+ export { allFeatures } from './allFeatures.js';
1
2
  export { configFileName, generatedConfigFileName, getConfigPath, readConfig, readConfigSync, writeGeneratedConfig, } from './config.js';
2
3
  export { configTemplate } from './configTemplate.js';
3
- export type { CloudpackConfig, DevServer, Features, GeneratedConfig, PackageOverride, Route, TelemetryConfig, UserConfig, } from './types.js';
4
+ export type { Feature } from './types/Feature.js';
5
+ export type { CloudpackConfig } from './types/CloudpackConfig.js';
6
+ export type { DevServer } from './types/DevServer.js';
7
+ export type { Features } from './types/Features.js';
8
+ export type { GeneratedConfig } from './types/GeneratedConfig.js';
9
+ export type { PackageOverride } from './types/PackageOverride.js';
10
+ export type { Route } from './types/Route.js';
11
+ export type { TelemetryConfig } from './types/TelemetryConfig.js';
12
+ export type { UserConfig } from './types/UserConfig.js';
4
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,aAAa,EACb,UAAU,EACV,cAAc,EACd,oBAAoB,GACrB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,YAAY,EACV,eAAe,EACf,SAAS,EACT,QAAQ,EACR,eAAe,EACf,eAAe,EACf,KAAK,EACL,eAAe,EACf,UAAU,GACX,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,aAAa,EACb,UAAU,EACV,cAAc,EACd,oBAAoB,GACrB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,YAAY,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,YAAY,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,YAAY,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,YAAY,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,YAAY,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,YAAY,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC"}
package/lib/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ export { allFeatures } from './allFeatures.js';
1
2
  export { configFileName, generatedConfigFileName, getConfigPath, readConfig, readConfigSync, writeGeneratedConfig, } from './config.js';
2
3
  export { configTemplate } from './configTemplate.js';
3
4
  //# 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,EACL,cAAc,EACd,uBAAuB,EACvB,aAAa,EACb,UAAU,EACV,cAAc,EACd,oBAAoB,GACrB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC","sourcesContent":["export {\n configFileName,\n generatedConfigFileName,\n getConfigPath,\n readConfig,\n readConfigSync,\n writeGeneratedConfig,\n} from './config.js';\nexport { configTemplate } from './configTemplate.js';\nexport type {\n CloudpackConfig,\n DevServer,\n Features,\n GeneratedConfig,\n PackageOverride,\n Route,\n TelemetryConfig,\n UserConfig,\n} from './types.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,aAAa,EACb,UAAU,EACV,cAAc,EACd,oBAAoB,GACrB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC","sourcesContent":["export { allFeatures } from './allFeatures.js';\nexport {\n configFileName,\n generatedConfigFileName,\n getConfigPath,\n readConfig,\n readConfigSync,\n writeGeneratedConfig,\n} from './config.js';\nexport { configTemplate } from './configTemplate.js';\nexport type { Feature } from './types/Feature.js';\nexport type { CloudpackConfig } from './types/CloudpackConfig.js';\nexport type { DevServer } from './types/DevServer.js';\nexport type { Features } from './types/Features.js';\nexport type { GeneratedConfig } from './types/GeneratedConfig.js';\nexport type { PackageOverride } from './types/PackageOverride.js';\nexport type { Route } from './types/Route.js';\nexport type { TelemetryConfig } from './types/TelemetryConfig.js';\nexport type { UserConfig } from './types/UserConfig.js';\n"]}
@@ -1,11 +1,11 @@
1
- // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
- // It should be published with your NPM package. It should not be tracked by Git.
3
- {
4
- "tsdocVersion": "0.12",
5
- "toolPackages": [
6
- {
7
- "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.34.4"
9
- }
10
- ]
11
- }
1
+ // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
+ // It should be published with your NPM package. It should not be tracked by Git.
3
+ {
4
+ "tsdocVersion": "0.12",
5
+ "toolPackages": [
6
+ {
7
+ "packageName": "@microsoft/api-extractor",
8
+ "packageVersion": "7.34.8"
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,7 @@
1
+ import type { GeneratedConfig } from './GeneratedConfig.js';
2
+ import type { UserConfig } from './UserConfig.js';
3
+ /**
4
+ * The merged result of user-provided and generated configuration for Cloudpack.
5
+ */
6
+ export type CloudpackConfig = UserConfig & GeneratedConfig;
7
+ //# sourceMappingURL=CloudpackConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CloudpackConfig.d.ts","sourceRoot":"","sources":["../../src/types/CloudpackConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD;;GAEG;AAEH,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,eAAe,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=CloudpackConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CloudpackConfig.js","sourceRoot":"","sources":["../../src/types/CloudpackConfig.ts"],"names":[],"mappings":"","sourcesContent":["import type { GeneratedConfig } from './GeneratedConfig.js';\nimport type { UserConfig } from './UserConfig.js';\n\n/**\n * The merged result of user-provided and generated configuration for Cloudpack.\n */\n\nexport type CloudpackConfig = UserConfig & GeneratedConfig;\n"]}
@@ -0,0 +1,33 @@
1
+ import type { HttpsConfig } from '@ms-cloudpack/create-express-app';
2
+ import type { Route } from './Route.js';
3
+ export interface DevServer {
4
+ /**
5
+ * The domain name of the server.
6
+ */
7
+ domain?: string;
8
+ /**
9
+ * The ports to be used by the server.
10
+ * It can be a number or an array of numbers.
11
+ * If ports are provided, an error will be thrown if none are available.
12
+ * If no ports are provided, the server will attempt to find an available port.
13
+ */
14
+ port?: number | number[];
15
+ /**
16
+ * The config settings for the https server.
17
+ * Paths to files are accepted for 'ca', 'cert', 'key', and 'pfx' settings.
18
+ * Everything else is passed directly to the https.createServer() method.
19
+ * If not provided, the server will use http.
20
+ */
21
+ https?: HttpsConfig;
22
+ /**
23
+ * If provided, will override where the publicDir is located, relative to the app package folder.
24
+ * Defaults to `./public`. The same thing can be achieved with `routes`, using route: '*' and
25
+ * staticPath: './public', so the `publicPath` setting may be removed in the future.
26
+ */
27
+ publicPath?: string;
28
+ /**
29
+ * If provided, will register routes with the dev server to host various pages.
30
+ */
31
+ routes?: Route[];
32
+ }
33
+ //# sourceMappingURL=DevServer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DevServer.d.ts","sourceRoot":"","sources":["../../src/types/DevServer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAEzB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IAEpB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;CAClB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=DevServer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DevServer.js","sourceRoot":"","sources":["../../src/types/DevServer.ts"],"names":[],"mappings":"","sourcesContent":["import type { HttpsConfig } from '@ms-cloudpack/create-express-app';\nimport type { Route } from './Route.js';\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"]}
@@ -0,0 +1,5 @@
1
+ export interface Feature {
2
+ name: string;
3
+ description: string;
4
+ }
5
+ //# sourceMappingURL=Feature.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Feature.d.ts","sourceRoot":"","sources":["../../src/types/Feature.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Feature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Feature.js","sourceRoot":"","sources":["../../src/types/Feature.ts"],"names":[],"mappings":"","sourcesContent":["export interface Feature {\n name: string;\n description: string;\n}\n"]}
@@ -0,0 +1,6 @@
1
+ import type { Feature } from './Feature.js';
2
+ /**
3
+ * Represents all features that can be enabled or disabled for Cloudpack.
4
+ */
5
+ export type Features = Partial<Record<Feature['name'], boolean>>;
6
+ //# sourceMappingURL=Features.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Features.d.ts","sourceRoot":"","sources":["../../src/types/Features.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Features.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Features.js","sourceRoot":"","sources":["../../src/types/Features.ts"],"names":[],"mappings":"","sourcesContent":["import type { Feature } from './Feature.js';\n\n/**\n * Represents all features that can be enabled or disabled for Cloudpack.\n */\nexport type Features = Partial<Record<Feature['name'], boolean>>;\n"]}
@@ -0,0 +1,12 @@
1
+ import type { PackageOverride } from './PackageOverride.js';
2
+ /**
3
+ * Per-application generated configuration for Cloudpack.
4
+ */
5
+ export interface GeneratedConfig {
6
+ /**
7
+ * An array of PackageOverride objects, used to provide overrides for packages without modifying their
8
+ * definitions directly. This is primarily used for providing exports maps for packages that don't have them.
9
+ */
10
+ packageOverrides?: PackageOverride[];
11
+ }
12
+ //# sourceMappingURL=GeneratedConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GeneratedConfig.d.ts","sourceRoot":"","sources":["../../src/types/GeneratedConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;GAEG;AAEH,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;CACtC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=GeneratedConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GeneratedConfig.js","sourceRoot":"","sources":["../../src/types/GeneratedConfig.ts"],"names":[],"mappings":"","sourcesContent":["import type { PackageOverride } from './PackageOverride.js';\n\n/**\n * Per-application generated configuration for Cloudpack.\n */\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"]}
@@ -0,0 +1,8 @@
1
+ import type { PackageJson } from '@ms-cloudpack/bundler-types';
2
+ export interface PackageOverride {
3
+ name: string;
4
+ versionRequirement: string;
5
+ isInternal?: boolean;
6
+ overrides: PackageJson;
7
+ }
8
+ //# sourceMappingURL=PackageOverride.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PackageOverride.d.ts","sourceRoot":"","sources":["../../src/types/PackageOverride.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE/D,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,WAAW,CAAC;CACxB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=PackageOverride.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PackageOverride.js","sourceRoot":"","sources":["../../src/types/PackageOverride.ts"],"names":[],"mappings":"","sourcesContent":["import type { PackageJson } from '@ms-cloudpack/bundler-types';\n\nexport interface PackageOverride {\n name: string;\n versionRequirement: string;\n isInternal?: boolean;\n overrides: PackageJson;\n}\n"]}
@@ -0,0 +1,23 @@
1
+ export interface Route {
2
+ /**
3
+ * The url path part to match. Start paths with a leading slash, e.g. `'/my-route'`. You can also
4
+ * use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`.
5
+ */
6
+ match: string;
7
+ /**
8
+ * The path relative to the app root to static assets. If this is provided, renderScript/exportEntry
9
+ * will be ignored.
10
+ */
11
+ staticPath?: string;
12
+ /**
13
+ * Path to a .js or .html file used for rendering the route. If a script is provided, it must
14
+ * export a default function implementing `CreateHtmlFunction` defined in `@ms-cloudpack/cli`.
15
+ */
16
+ renderScript?: string;
17
+ /**
18
+ * The key in the exports map which represents the entry point app script for this route.
19
+ * Default is '.', meaning the main package export key.
20
+ */
21
+ exportEntry?: string;
22
+ }
23
+ //# sourceMappingURL=Route.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Route.d.ts","sourceRoot":"","sources":["../../src/types/Route.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IACpB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Route.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Route.js","sourceRoot":"","sources":["../../src/types/Route.ts"],"names":[],"mappings":"","sourcesContent":["export 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"]}
@@ -0,0 +1,7 @@
1
+ export interface TelemetryConfig {
2
+ /**
3
+ * Application Insights instrumentation key.
4
+ */
5
+ instrumentationKey: string;
6
+ }
7
+ //# sourceMappingURL=TelemetryConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TelemetryConfig.d.ts","sourceRoot":"","sources":["../../src/types/TelemetryConfig.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;CAC5B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=TelemetryConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TelemetryConfig.js","sourceRoot":"","sources":["../../src/types/TelemetryConfig.ts"],"names":[],"mappings":"","sourcesContent":["export interface TelemetryConfig {\n /**\n * Application Insights instrumentation key.\n */\n instrumentationKey: string;\n}\n"]}
@@ -0,0 +1,22 @@
1
+ import type { DevServer } from './DevServer.js';
2
+ import type { Features } from './Features.js';
3
+ import type { TelemetryConfig } from './TelemetryConfig.js';
4
+ /**
5
+ * Per-application user-provided configuration for Cloudpack.
6
+ */
7
+ export interface UserConfig {
8
+ /**
9
+ * A set of options for configuring how the dev server works.
10
+ */
11
+ devServer?: DevServer;
12
+ /**
13
+ * A set of options for configuring telemetry
14
+ */
15
+ telemetry?: TelemetryConfig;
16
+ /**
17
+ * A set of options for configuring the experience. Features can be set to true to change the default
18
+ * behavior.
19
+ */
20
+ features?: Features;
21
+ }
22
+ //# sourceMappingURL=UserConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserConfig.d.ts","sourceRoot":"","sources":["../../src/types/UserConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;GAEG;AAEH,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC;IAE5B;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=UserConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserConfig.js","sourceRoot":"","sources":["../../src/types/UserConfig.ts"],"names":[],"mappings":"","sourcesContent":["import type { DevServer } from './DevServer.js';\nimport type { Features } from './Features.js';\nimport type { TelemetryConfig } from './TelemetryConfig.js';\n\n/**\n * Per-application user-provided configuration for Cloudpack.\n */\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?: Features;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ms-cloudpack/config",
3
- "version": "0.5.6",
3
+ "version": "0.6.1",
4
4
  "description": "Configuration handling for cloudpack.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -14,15 +14,14 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "@ms-cloudpack/bundler-types": "^0.13.0",
17
- "@ms-cloudpack/create-express-app": "^1.3.4",
17
+ "@ms-cloudpack/create-express-app": "^1.3.5",
18
18
  "@ms-cloudpack/json-utilities": "^0.0.6"
19
19
  },
20
20
  "devDependencies": {
21
- "@ms-cloudpack/eslint-config-base": "*",
21
+ "@ms-cloudpack/eslint-plugin-internal": "*",
22
22
  "@ms-cloudpack/scripts": "*"
23
23
  },
24
24
  "scripts": {
25
- "api:update": "cloudpack-scripts api-update",
26
25
  "api": "cloudpack-scripts api",
27
26
  "build:watch": "cloudpack-scripts build-watch",
28
27
  "build": "cloudpack-scripts build",
package/lib/types.d.ts DELETED
@@ -1,118 +0,0 @@
1
- import type { PackageJson } from '@ms-cloudpack/bundler-types';
2
- import type { HttpsConfig } from '@ms-cloudpack/create-express-app';
3
- export interface PackageOverride {
4
- name: string;
5
- versionRequirement: string;
6
- isInternal?: boolean;
7
- overrides: PackageJson;
8
- }
9
- export interface Route {
10
- /**
11
- * The url path part to match. Start paths with a leading slash, e.g. `'/my-route'`. You can also
12
- * use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`.
13
- */
14
- match: string;
15
- /**
16
- * The path relative to the app root to static assets. If this is provided, renderScript/exportEntry
17
- * will be ignored.
18
- */
19
- staticPath?: string;
20
- /**
21
- * Path to a .js or .html file used for rendering the route. If a script is provided, it must
22
- * export a default function implementing `CreateHtmlFunction` defined in `@ms-cloudpack/cli`.
23
- */
24
- renderScript?: string;
25
- /**
26
- * The key in the exports map which represents the entry point app script for this route.
27
- * Default is '.', meaning the main package export key.
28
- */
29
- exportEntry?: string;
30
- }
31
- export interface DevServer {
32
- /**
33
- * The domain name of the server.
34
- */
35
- domain?: string;
36
- /**
37
- * The ports to be used by the server.
38
- * It can be a number or an array of numbers.
39
- * If ports are provided, an error will be thrown if none are available.
40
- * If no ports are provided, the server will attempt to find an available port.
41
- */
42
- port?: number | number[];
43
- /**
44
- * The config settings for the https server.
45
- * Paths to files are accepted for 'ca', 'cert', 'key', and 'pfx' settings.
46
- * Everything else is passed directly to the https.createServer() method.
47
- * If not provided, the server will use http.
48
- */
49
- https?: HttpsConfig;
50
- /**
51
- * If provided, will override where the publicDir is located, relative to the app package folder.
52
- * Defaults to `./public`. The same thing can be achieved with `routes`, using route: '*' and
53
- * staticPath: './public', so the `publicPath` setting may be removed in the future.
54
- */
55
- publicPath?: string;
56
- /**
57
- * If provided, will register routes with the dev server to host various pages.
58
- */
59
- routes?: Route[];
60
- }
61
- export interface TelemetryConfig {
62
- /**
63
- * Application Insights instrumentation key.
64
- */
65
- instrumentationKey: string;
66
- }
67
- /**
68
- * The merged result of user-provided and generated configuration for Cloudpack.
69
- */
70
- export type CloudpackConfig = UserConfig & GeneratedConfig;
71
- /**
72
- * A set of options for configuring the experience. Features can be set to true to change the default
73
- * behavior.
74
- */
75
- export interface Features {
76
- /**
77
- * If true, no source maps will be generated for any bundles produced. This might be useful if sourcemap
78
- * generation causes performance issues.
79
- */
80
- disableSourceMaps?: boolean;
81
- /**
82
- * If true, bundle server will queue up bundle requests for dependencies of bundle output
83
- */
84
- enqueueDependencies?: boolean;
85
- /**
86
- * If true, package hash will be generated for internal packages
87
- */
88
- cacheInternalPackages?: boolean;
89
- }
90
- /**
91
- * Per-application user-provided configuration for Cloudpack.
92
- */
93
- export interface UserConfig {
94
- /**
95
- * A set of options for configuring how the dev server works.
96
- */
97
- devServer?: DevServer;
98
- /**
99
- * A set of options for configuring telemetry
100
- */
101
- telemetry?: TelemetryConfig;
102
- /**
103
- * A set of options for configuring the experience. Features can be set to true to change the default
104
- * behavior.
105
- */
106
- features?: Features;
107
- }
108
- /**
109
- * Per-application generated configuration for Cloudpack.
110
- */
111
- export interface GeneratedConfig {
112
- /**
113
- * An array of PackageOverride objects, used to provide overrides for packages without modifying their
114
- * definitions directly. This is primarily used for providing exports maps for packages that don't have them.
115
- */
116
- packageOverrides?: PackageOverride[];
117
- }
118
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAEpE,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,WAAW,CAAC;CACxB;AAED,MAAM,WAAW,KAAK;IACpB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAEzB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IAEpB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,eAAe,CAAC;AAE3D;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC;IAE5B;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;CACtC"}
package/lib/types.js DELETED
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
package/lib/types.js.map DELETED
@@ -1 +0,0 @@
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 * A set of options for configuring the experience. Features can be set to true to change the default\n * behavior.\n */\nexport interface 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 * If true, bundle server will queue up bundle requests for dependencies of bundle output\n */\n enqueueDependencies?: boolean;\n\n /**\n * If true, package hash will be generated for internal packages\n */\n cacheInternalPackages?: boolean;\n}\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?: Features;\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"]}