@ms-cloudpack/common-types 0.10.0 → 0.12.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.
@@ -1,9 +1,11 @@
1
1
  import type { BundleMessageNote } from './BundleMessageNote.js';
2
2
  import type { BundleMessageLocation } from './BundleMessageLocation.js';
3
+ /** Error or warning message generated while bundling. */
3
4
  export interface BundleMessage {
4
5
  text: string;
5
6
  /** Bundler or step that generated this message. */
6
7
  source: string;
8
+ /** File location the issue originated from. */
7
9
  location?: BundleMessageLocation;
8
10
  notes?: BundleMessageNote[];
9
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"BundleMessage.d.ts","sourceRoot":"","sources":["../src/BundleMessage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAExE,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IACjC,KAAK,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAC7B"}
1
+ {"version":3,"file":"BundleMessage.d.ts","sourceRoot":"","sources":["../src/BundleMessage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAExE,yDAAyD;AACzD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,MAAM,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IACjC,KAAK,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAC7B"}
@@ -1 +1 @@
1
- {"version":3,"file":"BundleMessage.js","sourceRoot":"","sources":["../src/BundleMessage.ts"],"names":[],"mappings":"","sourcesContent":["import type { BundleMessageNote } from './BundleMessageNote.js';\nimport type { BundleMessageLocation } from './BundleMessageLocation.js';\n\nexport interface BundleMessage {\n text: string;\n /** Bundler or step that generated this message. */\n source: string;\n location?: BundleMessageLocation;\n notes?: BundleMessageNote[];\n}\n"]}
1
+ {"version":3,"file":"BundleMessage.js","sourceRoot":"","sources":["../src/BundleMessage.ts"],"names":[],"mappings":"","sourcesContent":["import type { BundleMessageNote } from './BundleMessageNote.js';\nimport type { BundleMessageLocation } from './BundleMessageLocation.js';\n\n/** Error or warning message generated while bundling. */\nexport interface BundleMessage {\n text: string;\n /** Bundler or step that generated this message. */\n source: string;\n /** File location the issue originated from. */\n location?: BundleMessageLocation;\n notes?: BundleMessageNote[];\n}\n"]}
@@ -1,3 +1,4 @@
1
+ /** File location a warning or error originated from. */
1
2
  export interface BundleMessageLocation {
2
3
  /** Path to file, relative to package root */
3
4
  file: string;
@@ -1 +1 @@
1
- {"version":3,"file":"BundleMessageLocation.d.ts","sourceRoot":"","sources":["../src/BundleMessageLocation.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qBAAqB;IACpC,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC;IAEb,cAAc;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,wBAAwB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
1
+ {"version":3,"file":"BundleMessageLocation.d.ts","sourceRoot":"","sources":["../src/BundleMessageLocation.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,MAAM,WAAW,qBAAqB;IACpC,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC;IAEb,cAAc;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,wBAAwB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
@@ -1 +1 @@
1
- {"version":3,"file":"BundleMessageLocation.js","sourceRoot":"","sources":["../src/BundleMessageLocation.ts"],"names":[],"mappings":"","sourcesContent":["export interface BundleMessageLocation {\n /** Path to file, relative to package root */\n file: string;\n\n /** 1-based */\n line?: number;\n\n /** 0-based, in bytes */\n column?: number;\n}\n"]}
1
+ {"version":3,"file":"BundleMessageLocation.js","sourceRoot":"","sources":["../src/BundleMessageLocation.ts"],"names":[],"mappings":"","sourcesContent":["/** File location a warning or error originated from. */\nexport interface BundleMessageLocation {\n /** Path to file, relative to package root */\n file: string;\n\n /** 1-based */\n line?: number;\n\n /** 0-based, in bytes */\n column?: number;\n}\n"]}
@@ -1,6 +1,8 @@
1
1
  import type { BundleMessageLocation } from './BundleMessageLocation.js';
2
+ /** Additional information about a bundle warning or error. */
2
3
  export interface BundleMessageNote {
3
4
  text: string;
5
+ /** File location the issue originated from. */
4
6
  location?: BundleMessageLocation;
5
7
  }
6
8
  //# sourceMappingURL=BundleMessageNote.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BundleMessageNote.d.ts","sourceRoot":"","sources":["../src/BundleMessageNote.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAExE,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,qBAAqB,CAAC;CAClC"}
1
+ {"version":3,"file":"BundleMessageNote.d.ts","sourceRoot":"","sources":["../src/BundleMessageNote.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAExE,8DAA8D;AAC9D,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,qBAAqB,CAAC;CAClC"}
@@ -1 +1 @@
1
- {"version":3,"file":"BundleMessageNote.js","sourceRoot":"","sources":["../src/BundleMessageNote.ts"],"names":[],"mappings":"","sourcesContent":["import type { BundleMessageLocation } from './BundleMessageLocation.js';\n\nexport interface BundleMessageNote {\n text: string;\n location?: BundleMessageLocation;\n}\n"]}
1
+ {"version":3,"file":"BundleMessageNote.js","sourceRoot":"","sources":["../src/BundleMessageNote.ts"],"names":[],"mappings":"","sourcesContent":["import type { BundleMessageLocation } from './BundleMessageLocation.js';\n\n/** Additional information about a bundle warning or error. */\nexport interface BundleMessageNote {\n text: string;\n /** File location the issue originated from. */\n location?: BundleMessageLocation;\n}\n"]}
@@ -1,7 +1,8 @@
1
+ import type { PackageSettings } from './PackageSettings.js';
1
2
  /**
2
- * Options to create bundles from the bundler plugin.
3
+ * Options for creating bundles with a bundler plugin.
3
4
  */
4
- export interface BundleOptions {
5
+ export interface BundleOptions extends Pick<PackageSettings, 'bundler' | 'bundlerOptions' | 'dynamicImports' | 'ignoredBundlerWarnings' | 'bundlerCapabilities'> {
5
6
  /**
6
7
  * The absolute input path for the entry points.
7
8
  */
@@ -21,7 +22,7 @@ export interface BundleOptions {
21
22
  */
22
23
  outputPath?: string;
23
24
  /**
24
- * List of dependencies which should be externalized. Only applicable for ESM output.
25
+ * List of dependencies which should be externalized.
25
26
  */
26
27
  external?: string[];
27
28
  /**
@@ -33,40 +34,16 @@ export interface BundleOptions {
33
34
  */
34
35
  minify?: boolean;
35
36
  /**
36
- * If specified, will generate sourcemaps for the output. This may have a tax on performance.
37
+ * If true, will generate sourcemap files for the output. This has a tax on performance.
38
+ * Defaults to true unless the `disableSourceMaps` feature is enabled.
39
+ * (To set a bundler-specific sourcemap option, use `bundlerOptions`.)
37
40
  */
38
- sourcemap?: 'none' | 'linked' | 'inline' | 'external' | 'inline-and-external';
41
+ sourcemap?: boolean;
39
42
  /**
40
43
  * If true, the bundler is expected to stay alive and take requests to rebuild on demand. File watching is
41
44
  * managed at a higher layer. When we no longer care about incremental bundling, the bundler will receive a call
42
45
  * to `dispose` if returned.
43
46
  */
44
47
  incremental?: boolean;
45
- /**
46
- * If specified, will use a specific bundler type. This is not recommended unless there is a clear reason to hardcode
47
- * the bundler type.
48
- */
49
- bundlerType?: string;
50
- /**
51
- * Only relevant for packages bundled with rollup: globs of files that include dynamic (async)
52
- * imports with non-literal paths, to be processed by `@rollup/plugin-dynamic-import-vars` (subject to
53
- * that plugin's [limitations](https://www.npmjs.com/package/\@rollup/plugin-dynamic-import-vars#limitations)).
54
- * Files matching `*.dynamic.*` are automatically included.
55
- *
56
- * This is not needed for ori/esbuild and webpack because they should handle these types of imports automatically.
57
- */
58
- dynamicImports?: string[];
59
- /**
60
- * Suppress these warning messages from the bundler (partial string matches).
61
- * This is intended for non-actionable messages from external dependencies which can't easily
62
- * be fixed, to avoid confusing users.
63
- */
64
- ignoredBundlerWarnings?: string[];
65
- /**
66
- * If specific settings are required to pass through to the specific bundler, they can be specified here are are
67
- * expected to be merged in by the plugin. Specifying bundler-specific overrides is not recommended, as it locks
68
- * us into a specific bundler implementation.
69
- */
70
- overrideOptions?: Readonly<Record<string, unknown>>;
71
48
  }
72
49
  //# sourceMappingURL=BundleOptions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BundleOptions.d.ts","sourceRoot":"","sources":["../src/BundleOptions.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;;OAOG;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEhC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IAEpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAEnB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,qBAAqB,CAAC;IAE9E;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;OAGG;IAEH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAE1B;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAC;IAElC;;;;OAIG;IACH,eAAe,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACrD"}
1
+ {"version":3,"file":"BundleOptions.d.ts","sourceRoot":"","sources":["../src/BundleOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,aACf,SAAQ,IAAI,CACV,eAAe,EACf,SAAS,GAAG,gBAAgB,GAAG,gBAAgB,GAAG,wBAAwB,GAAG,qBAAqB,CACnG;IACD;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;;OAOG;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEhC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IAEpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAEnB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"BundleOptions.js","sourceRoot":"","sources":["../src/BundleOptions.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Options to create bundles from the bundler plugin.\n */\nexport interface BundleOptions {\n /**\n * The absolute input path for the entry points.\n */\n inputPath: string;\n\n /**\n * The entry point paths map. Key is path to the output file, relative to `outputPath` and stripped of `.js`\n * extension. Value is the input entry path, relative to `inputPath` including the extension. For example:\n * `{ 'lib/index': 'src/index.js' }`\n *\n * Note: Non-javascript extensions, such as `.css` or `.scss`, will not be stripped from the key.\n * This is to ensure the bundler keeps the original extension intact and adds `.js` after it.\n */\n entries: Record<string, string>;\n\n /**\n * The output path for bundled files. This can be either relative to `inputPath`, or absolute.\n * Defaults to `inputPath`.\n */\n outputPath?: string;\n\n /**\n * List of dependencies which should be externalized. Only applicable for ESM output.\n */\n external?: string[];\n\n /**\n * List of dependencies which should be inlined.\n */\n inlined?: string[];\n\n /**\n * If true, minify the output.\n */\n minify?: boolean;\n\n /**\n * If specified, will generate sourcemaps for the output. This may have a tax on performance.\n */\n sourcemap?: 'none' | 'linked' | 'inline' | 'external' | 'inline-and-external';\n\n /**\n * If true, the bundler is expected to stay alive and take requests to rebuild on demand. File watching is\n * managed at a higher layer. When we no longer care about incremental bundling, the bundler will receive a call\n * to `dispose` if returned.\n */\n incremental?: boolean;\n\n /**\n * If specified, will use a specific bundler type. This is not recommended unless there is a clear reason to hardcode\n * the bundler type.\n */\n // TODO: rename either this or BundleResult.bundlerName for consistency\n bundlerType?: string;\n\n /**\n * Only relevant for packages bundled with rollup: globs of files that include dynamic (async)\n * imports with non-literal paths, to be processed by `@rollup/plugin-dynamic-import-vars` (subject to\n * that plugin's [limitations](https://www.npmjs.com/package/\\@rollup/plugin-dynamic-import-vars#limitations)).\n * Files matching `*.dynamic.*` are automatically included.\n *\n * This is not needed for ori/esbuild and webpack because they should handle these types of imports automatically.\n */\n dynamicImports?: string[];\n\n /**\n * Suppress these warning messages from the bundler (partial string matches).\n * This is intended for non-actionable messages from external dependencies which can't easily\n * be fixed, to avoid confusing users.\n */\n ignoredBundlerWarnings?: string[];\n\n /**\n * If specific settings are required to pass through to the specific bundler, they can be specified here are are\n * expected to be merged in by the plugin. Specifying bundler-specific overrides is not recommended, as it locks\n * us into a specific bundler implementation.\n */\n overrideOptions?: Readonly<Record<string, unknown>>;\n}\n"]}
1
+ {"version":3,"file":"BundleOptions.js","sourceRoot":"","sources":["../src/BundleOptions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PackageSettings } from './PackageSettings.js';\n\n/**\n * Options for creating bundles with a bundler plugin.\n */\nexport interface BundleOptions\n extends Pick<\n PackageSettings,\n 'bundler' | 'bundlerOptions' | 'dynamicImports' | 'ignoredBundlerWarnings' | 'bundlerCapabilities'\n > {\n /**\n * The absolute input path for the entry points.\n */\n inputPath: string;\n\n /**\n * The entry point paths map. Key is path to the output file, relative to `outputPath` and stripped of `.js`\n * extension. Value is the input entry path, relative to `inputPath` including the extension. For example:\n * `{ 'lib/index': 'src/index.js' }`\n *\n * Note: Non-javascript extensions, such as `.css` or `.scss`, will not be stripped from the key.\n * This is to ensure the bundler keeps the original extension intact and adds `.js` after it.\n */\n entries: Record<string, string>;\n\n /**\n * The output path for bundled files. This can be either relative to `inputPath`, or absolute.\n * Defaults to `inputPath`.\n */\n outputPath?: string;\n\n /**\n * List of dependencies which should be externalized.\n */\n external?: string[];\n\n /**\n * List of dependencies which should be inlined.\n */\n inlined?: string[];\n\n /**\n * If true, minify the output.\n */\n minify?: boolean;\n\n /**\n * If true, will generate sourcemap files for the output. This has a tax on performance.\n * Defaults to true unless the `disableSourceMaps` feature is enabled.\n * (To set a bundler-specific sourcemap option, use `bundlerOptions`.)\n */\n sourcemap?: boolean;\n\n /**\n * If true, the bundler is expected to stay alive and take requests to rebuild on demand. File watching is\n * managed at a higher layer. When we no longer care about incremental bundling, the bundler will receive a call\n * to `dispose` if returned.\n */\n incremental?: boolean;\n}\n"]}
@@ -6,6 +6,13 @@ export interface BundleResult extends Omit<BundlerPluginResult, 'rebuild' | 'raw
6
6
  /**
7
7
  * The name of the bundler used. Will be set unless there was an error with the options.
8
8
  */
9
+ bundler?: string;
10
+ /**
11
+ * @deprecated Replaced by `bundler`.
12
+ *
13
+ * This and the translation code in `readResultFromCache` should be removed sometime when
14
+ * we have to bump the hash version.
15
+ */
9
16
  bundlerName?: string;
10
17
  /**
11
18
  * The absolute input path of the entries.
@@ -1 +1 @@
1
- {"version":3,"file":"BundleResult.d.ts","sourceRoot":"","sources":["../src/BundleResult.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEpE;;GAEG;AAGH,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,UAAU,GAAG,WAAW,CAAC;IACnG;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEjC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,YAAY,CAAC,CAAC;CACvC"}
1
+ {"version":3,"file":"BundleResult.d.ts","sourceRoot":"","sources":["../src/BundleResult.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEpE;;GAEG;AAGH,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,UAAU,GAAG,WAAW,CAAC;IACnG;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEjC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,YAAY,CAAC,CAAC;CACvC"}
@@ -1 +1 @@
1
- {"version":3,"file":"BundleResult.js","sourceRoot":"","sources":["../src/BundleResult.ts"],"names":[],"mappings":"","sourcesContent":["import type { BundlerPluginResult } from './BundlerPluginResult.js';\n\n/**\n * Final bundle result as returned by `bundle()` in `@ms-cloudpack/bundler`.\n */\n// rawInput and rawOutput are intentionally removed.\n// rebuild is wrapped to return a full BundleResult.\nexport interface BundleResult extends Omit<BundlerPluginResult, 'rebuild' | 'rawInput' | 'rawOutput'> {\n /**\n * The name of the bundler used. Will be set unless there was an error with the options.\n */\n bundlerName?: string;\n\n /**\n * The absolute input path of the entries.\n */\n inputPath: string;\n\n /**\n * The entry file paths map used to create the bundle output. See `BundleOptions.entries`.\n */\n entries?: Record<string, string>;\n\n /**\n * If incremental bundling is specified, provide a way to rebuild the project.\n */\n rebuild?: () => Promise<BundleResult>;\n}\n"]}
1
+ {"version":3,"file":"BundleResult.js","sourceRoot":"","sources":["../src/BundleResult.ts"],"names":[],"mappings":"","sourcesContent":["import type { BundlerPluginResult } from './BundlerPluginResult.js';\n\n/**\n * Final bundle result as returned by `bundle()` in `@ms-cloudpack/bundler`.\n */\n// rawInput and rawOutput are intentionally removed.\n// rebuild is wrapped to return a full BundleResult.\nexport interface BundleResult extends Omit<BundlerPluginResult, 'rebuild' | 'rawInput' | 'rawOutput'> {\n /**\n * The name of the bundler used. Will be set unless there was an error with the options.\n */\n bundler?: string;\n\n /**\n * @deprecated Replaced by `bundler`.\n *\n * This and the translation code in `readResultFromCache` should be removed sometime when\n * we have to bump the hash version.\n */\n bundlerName?: string;\n\n /**\n * The absolute input path of the entries.\n */\n inputPath: string;\n\n /**\n * The entry file paths map used to create the bundle output. See `BundleOptions.entries`.\n */\n entries?: Record<string, string>;\n\n /**\n * If incremental bundling is specified, provide a way to rebuild the project.\n */\n rebuild?: () => Promise<BundleResult>;\n}\n"]}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * A function that takes a config object and options object and returns a new config object.
3
+ * This is used to implement a bundler capability.
4
+ */
5
+ type BundlerCapabilityFn<TConfig, TOptions extends object> = (config: TConfig, options: TOptions) => TConfig;
6
+ /**
7
+ * A bundler capability is a feature that can be enabled for a package to modify the bundling process.
8
+ */
9
+ export type BundlerCapability<TOptions extends object> = {
10
+ description: string;
11
+ implementations: {
12
+ [bundler: string]: BundlerCapabilityFn<unknown, TOptions>;
13
+ };
14
+ };
15
+ /**
16
+ * The metadata for a bundler capability.
17
+ * It's the same as the BundlerCapability but without the implementations. This is used to split the definition and the bundler specific implementations.
18
+ */
19
+ export type BundlerCapabilityMetaData<TOptions extends object> = Omit<BundlerCapability<TOptions>, 'implementations'>;
20
+ /**
21
+ * This is the list of the bundler capabilities that cloudpack provides.
22
+ * key: The name of the capability which will be used in the cloudpack config to enable the capability
23
+ * value: Options object which will be passed to the capability function
24
+ */
25
+ export type InternalBundlerCapabilities = {
26
+ /**
27
+ * Inlines assets into the bundle.
28
+ * Options: List of file extensions to inline. Do not include the leading dot.
29
+ */
30
+ 'asset-inline': {
31
+ extensions: string[];
32
+ };
33
+ };
34
+ /**
35
+ * This is the type that's being used PackageSettings to enable/disable bundler capabilities.
36
+ * It's a partial of the InternalBundlerCapabilities with the value being the options object or false.
37
+ * If the value is false, the capability will be disabled for the package.
38
+ */
39
+ export type BundlerCapabilitiesOptions = {
40
+ [key in keyof InternalBundlerCapabilities]?: InternalBundlerCapabilities[key] | false;
41
+ };
42
+ /**
43
+ * This is the metadata for the bundler capabilities that cloudpack provides.
44
+ * It's a mapping from the capability name to the metadata object.
45
+ * The metadata object contains the description of the capability and the list of implementations for each bundler.
46
+ * This is used to generate the documentation for the bundler capabilities.
47
+ */
48
+ export type InternalBundlerCapabilitiesMetaData = {
49
+ [key in keyof InternalBundlerCapabilities]: BundlerCapabilityMetaData<InternalBundlerCapabilities[key]>;
50
+ };
51
+ /**
52
+ * This is a bundler specific implementation of the internal bundler capabilities.
53
+ * It's a mapping from the capability name to the capability function.
54
+ */
55
+ export type InternalBundlerCapabilitiesBundlerSpecificImplementations<TConfig> = {
56
+ [key in keyof InternalBundlerCapabilities]: BundlerCapabilityFn<TConfig, InternalBundlerCapabilities[key]>;
57
+ };
58
+ export {};
59
+ //# sourceMappingURL=BundlerCapability.d.ts.map
@@ -0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2
+ //# sourceMappingURL=BundlerCapability.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BundlerCapability.js","sourceRoot":"","sources":["../src/BundlerCapability.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * A function that takes a config object and options object and returns a new config object.\n * This is used to implement a bundler capability.\n */\ntype BundlerCapabilityFn<TConfig, TOptions extends object> = (config: TConfig, options: TOptions) => TConfig;\n\n/**\n * A bundler capability is a feature that can be enabled for a package to modify the bundling process.\n */\nexport type BundlerCapability<TOptions extends object> = {\n description: string;\n implementations: {\n [bundler: string]: BundlerCapabilityFn<unknown, TOptions>;\n };\n};\n\n/**\n * The metadata for a bundler capability.\n * It's the same as the BundlerCapability but without the implementations. This is used to split the definition and the bundler specific implementations.\n */\nexport type BundlerCapabilityMetaData<TOptions extends object> = Omit<BundlerCapability<TOptions>, 'implementations'>;\n\n/**\n * This is the list of the bundler capabilities that cloudpack provides.\n * key: The name of the capability which will be used in the cloudpack config to enable the capability\n * value: Options object which will be passed to the capability function\n */\nexport type InternalBundlerCapabilities = {\n /**\n * Inlines assets into the bundle.\n * Options: List of file extensions to inline. Do not include the leading dot.\n */\n 'asset-inline': { extensions: string[] };\n};\n\n/**\n * This is the type that's being used PackageSettings to enable/disable bundler capabilities.\n * It's a partial of the InternalBundlerCapabilities with the value being the options object or false.\n * If the value is false, the capability will be disabled for the package.\n */\nexport type BundlerCapabilitiesOptions = {\n [key in keyof InternalBundlerCapabilities]?: InternalBundlerCapabilities[key] | false;\n};\n\n/**\n * This is the metadata for the bundler capabilities that cloudpack provides.\n * It's a mapping from the capability name to the metadata object.\n * The metadata object contains the description of the capability and the list of implementations for each bundler.\n * This is used to generate the documentation for the bundler capabilities.\n */\nexport type InternalBundlerCapabilitiesMetaData = {\n [key in keyof InternalBundlerCapabilities]: BundlerCapabilityMetaData<InternalBundlerCapabilities[key]>;\n};\n\n/**\n * This is a bundler specific implementation of the internal bundler capabilities.\n * It's a mapping from the capability name to the capability function.\n */\nexport type InternalBundlerCapabilitiesBundlerSpecificImplementations<TConfig> = {\n [key in keyof InternalBundlerCapabilities]: BundlerCapabilityFn<TConfig, InternalBundlerCapabilities[key]>;\n};\n"]}
@@ -95,15 +95,17 @@ export type PackageJson = {
95
95
  /** Prevent hoisting of these dependencies within the workspace (yarn only). https://classic.yarnpkg.com/blog/2018/02/15/nohoist/) */
96
96
  nohoist?: string[];
97
97
  };
98
- /** Merged package settings. */
98
+ /**
99
+ * Cached result of calling `getPackageSettings` for this package.
100
+ *
101
+ * This should NOT be used during init's analysis of the bundle result, since it might be
102
+ * out of date due to pending generated settings updates. (If a package is re-enqueued after
103
+ * analysis due to generated settings updates, we refresh the definition, which updates these
104
+ * cached setting. So it's safe to use again on the next bundle attempt.)
105
+ */
99
106
  cloudpack?: Omit<PackageSettings, 'match'> & {
100
107
  mode: string | undefined;
101
108
  };
102
- /** @deprecated: Cloudpack internally added property: name and version prior to nonSemverTransform (if different) */
103
- cloudpackRemapped?: {
104
- originalName: string;
105
- originalVersion: string;
106
- };
107
109
  };
108
110
  /**
109
111
  * Union type which has intellisense for specific keys but also allows arbitrary strings.
@@ -1 +1 @@
1
- {"version":3,"file":"PackageJson.d.ts","sourceRoot":"","sources":["../src/PackageJson.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,+BAA+B;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,oCAAoC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,gCAAgC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IAEjB,qHAAqH;IACrH,WAAW,CAAC,EAAE;QACZ,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;QAC5C,GAAG,CAAC,EAAE,MAAM,CAAC;QACb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AAS,CAAA;KAAE,CAAC;CAC3E,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,eAAe,CAAC,WAAW,SAAS,MAAM,IAAI,WAAW,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;AAExG,gGAAgG;AAChG,MAAM,MAAM,0BAA0B,GAAG,eAAe,CACpD,SAAS,GACT,SAAS,GACT,MAAM,GACN,UAAU,GACV,QAAQ,GACR,QAAQ,GACR,aAAa,GACb,MAAM,GACN,cAAc,GACd,SAAS,CACZ,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAC/B,IAAI,GACJ,MAAM,GACN;KAAG,SAAS,IAAI,0BAA0B,CAAC,CAAC,EAAE,uBAAuB;CAAE,GACvE,KAAK,CAAC,uBAAuB,CAAC,CAAC;AAEnC;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,CAAC,eAAe,EAAE,MAAM,GAAG,uBAAuB,CAAC;CACpD,CAAC;AACF,gHAAgH;AAChH,MAAM,MAAM,kBAAkB,GAAG,uBAAuB,GAAG,wBAAwB,GAAG,KAAK,CAAC,kBAAkB,CAAC,CAAC;AAEhH,kEAAkE;AAClE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,CAAC,GAAG,EAAE,IAAI,MAAM,EAAE,GAAG,MAAM,GAAG;SAAG,GAAG,IAAI,0BAA0B,GAAG,kBAAkB;KAAE,CAAC;CAC3F,CAAC;AAEF,mDAAmD;AACnD,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"PackageJson.js","sourceRoot":"","sources":["../src/PackageJson.ts"],"names":[],"mappings":"","sourcesContent":["import type { PackageSettings } from './PackageSettings.js';\n\n/**\n * Types for the `package.json` file, derived from [`type-fest`](https://github.com/sindresorhus/type-fest/blob/main/source/package-json.d.ts).\n *\n * This version intentionally does not permit arbitrary keys, and focuses on properties that are\n * potentially relevant to Cloudpack. Additional properties can be added as needed.\n */\nexport type PackageJson = {\n /** The name of the package. */\n name?: string;\n\n /** A description of the package. */\n description?: string;\n\n /** Package semantic version. */\n version?: string;\n\n /** The files included in the package. */\n files?: string[];\n\n /** Indicates the structure of the package. https://docs.npmjs.com/cli/v9/configuring-npm/package-json#directories */\n directories?: {\n [directoryType: string]: string | undefined;\n bin?: string;\n lib?: string;\n };\n\n /** Resolution algorithm for importing \".js\" files from the package's scope. https://nodejs.org/api/esm.html#esm_package_json_type_field */\n type?: 'module' | 'commonjs';\n\n /** The module ID that is the primary entry point to the package. */\n main?: string;\n\n /** An ECMAScript module ID that is the primary entry point to the package. */\n module?: string;\n\n /** The executable file(s) for this package. */\n bin?: string | Partial<Record<string, string>>;\n\n /** A module ID with untranspiled code that is the primary entry point to the package. */\n esnext?:\n | string\n | {\n [moduleName: string]: string | undefined;\n main?: string;\n browser?: string;\n };\n\n /** A hint to JavaScript bundlers or component tools when packaging modules for client side use. */\n browser?: string | Partial<Record<string, string | false>>;\n\n /**\n * Denote which files in the package have side effects and may not be pruned by bundlers, even if unused.\n * If a boolean, applies to all files in the package. `false` indicates there are no side effects.\n * https://webpack.js.org/guides/tree-shaking/\n */\n sideEffects?: boolean | string[];\n\n /** Location of the bundled TypeScript declaration file. */\n types?: string;\n\n /** Location of the bundled TypeScript declaration file. Alias of `types`. */\n typings?: string;\n\n /** Location of TypeScript declaration files for different TypeScript versions. */\n typesVersions?: Partial<Record<string, Partial<Record<string, string[]>>>>;\n\n /** Subpath exports to define entry points of the package. https://nodejs.org/api/packages.html#subpath-exports */\n exports?: PackageJsonExports;\n\n /**\n * Subpath imports to define internal package import maps that only apply to import specifiers from\n * within the package itself. https://nodejs.org/api/packages.html#subpath-imports\n */\n imports?: PackageJsonImports;\n\n /** Dependencies that will be installed when the package is consumed. */\n dependencies?: PackageJsonDependencies;\n\n /** Dependencies for local development only. */\n devDependencies?: PackageJsonDependencies;\n\n /** Dependencies that must be installed alongside this package when consumed. */\n peerDependencies?: PackageJsonDependencies;\n\n /** Indicates which peer dependencies are optional. */\n peerDependenciesMeta?: Partial<Record<string, { optional: true }>>;\n\n optionalDependencies?: PackageJsonDependencies;\n bundledDependencies?: PackageJsonDependencies | string[];\n bundleDependencies?: PackageJsonDependencies | string[];\n\n resolutions?: PackageJsonDependencies;\n\n /** Required engine versions for running this package. */\n engines?: {\n [engine in LiteralOrString<'npm' | 'node'>]?: string;\n };\n\n /** Operating systems the package can run on. */\n os?: Array<\n LiteralOrString<\n | 'aix'\n | 'darwin'\n | 'freebsd'\n | 'linux'\n | 'openbsd'\n | 'sunos'\n | 'win32'\n | '!aix'\n | '!darwin'\n | '!freebsd'\n | '!linux'\n | '!openbsd'\n | '!sunos'\n | '!win32'\n >\n >;\n\n /** CPU architectures the package can run on. */\n cpu?: Array<\n LiteralOrString<\n | 'arm'\n | 'arm64'\n | 'ia32'\n | 'mips'\n | 'mipsel'\n | 'ppc'\n | 'ppc64'\n | 's390'\n | 's390x'\n | 'x32'\n | 'x64'\n | '!arm'\n | '!arm64'\n | '!ia32'\n | '!mips'\n | '!mipsel'\n | '!ppc'\n | '!ppc64'\n | '!s390'\n | '!s390x'\n | '!x32'\n | '!x64'\n >\n >;\n\n /** If `true`, this package cannot be published. */\n private?: boolean;\n\n /** A set of config values that will be used during publishing. https://docs.npmjs.com/cli/v7/configuring-npm/package-json#publishconfig */\n publishConfig?: {\n access?: 'public' | 'restricted';\n registry?: string;\n tag?: string;\n [additionalProperties: string]: unknown;\n };\n\n /** Defines which package manager is expected to be used when working on the current project. https://nodejs.org/api/corepack.html */\n packageManager?: string;\n\n /** Configuration for npm or yarn workspaces. */\n workspaces?:\n | string[]\n | {\n /** An array of workspace pattern strings which contain the workspace packages. */\n packages?: string[];\n\n /** Prevent hoisting of these dependencies within the workspace (yarn only). https://classic.yarnpkg.com/blog/2018/02/15/nohoist/) */\n nohoist?: string[];\n };\n\n /** Merged package settings. */\n cloudpack?: Omit<PackageSettings, 'match'> & { mode: string | undefined };\n\n /** @deprecated: Cloudpack internally added property: name and version prior to nonSemverTransform (if different) */\n cloudpackRemapped?: { originalName: string; originalVersion: string };\n};\n\n/**\n * Union type which has intellisense for specific keys but also allows arbitrary strings.\n * This is a workaround for a [TypeScript issue](https://github.com/Microsoft/TypeScript/issues/29729)\n */\nexport type LiteralOrString<LiteralType extends string> = LiteralType | (string & Record<never, never>);\n\n/** Conditions which provide a way to resolve a package entry point based on the environment. */\nexport type PackageJsonExportCondition = LiteralOrString<\n | 'browser'\n | 'default'\n | 'deno'\n | 'electron'\n | 'import'\n | 'module'\n | 'node-addons'\n | 'node'\n | 'react-native'\n | 'require'\n>;\n\n/**\n * The value of an `PackageJson.exports` object key. Note at the root of the object, keys can be represented\n * either by a condition, or a `string` to provide import paths (such as \"./foo\"). At subsequent levels\n * within the object, only conditions (string which don't start with \".\") can be used as keys.\n */\nexport type PackageJsonExportsValue =\n | null\n | string\n | { [condition in PackageJsonExportCondition]?: PackageJsonExportsValue }\n | Array<PackageJsonExportsValue>;\n\n/**\n * Definition of the root exports object. Keys can be either conditions or import paths.\n */\nexport type PackageJsonExportsObject = {\n [pathOrCondition: string]: PackageJsonExportsValue;\n};\n/** Entry points of a package, optionally with conditions and subpath exports. Used as `PackageJson.exports`. */\nexport type PackageJsonExports = PackageJsonExportsValue | PackageJsonExportsObject | Array<PackageJsonExports>;\n\n/** Import map entries of a module, optionally with conditions. */\nexport type PackageJsonImports = {\n [key: `#${string}`]: string | { [key in PackageJsonExportCondition]: PackageJsonExports };\n};\n\n/** Mapping from dependency name to semver spec. */\nexport type PackageJsonDependencies = Partial<Record<string, string>>;\n"]}
1
+ {"version":3,"file":"PackageJson.js","sourceRoot":"","sources":["../src/PackageJson.ts"],"names":[],"mappings":"","sourcesContent":["import type { PackageSettings } from './PackageSettings.js';\n\n/**\n * Types for the `package.json` file, derived from [`type-fest`](https://github.com/sindresorhus/type-fest/blob/main/source/package-json.d.ts).\n *\n * This version intentionally does not permit arbitrary keys, and focuses on properties that are\n * potentially relevant to Cloudpack. Additional properties can be added as needed.\n */\nexport type PackageJson = {\n /** The name of the package. */\n name?: string;\n\n /** A description of the package. */\n description?: string;\n\n /** Package semantic version. */\n version?: string;\n\n /** The files included in the package. */\n files?: string[];\n\n /** Indicates the structure of the package. https://docs.npmjs.com/cli/v9/configuring-npm/package-json#directories */\n directories?: {\n [directoryType: string]: string | undefined;\n bin?: string;\n lib?: string;\n };\n\n /** Resolution algorithm for importing \".js\" files from the package's scope. https://nodejs.org/api/esm.html#esm_package_json_type_field */\n type?: 'module' | 'commonjs';\n\n /** The module ID that is the primary entry point to the package. */\n main?: string;\n\n /** An ECMAScript module ID that is the primary entry point to the package. */\n module?: string;\n\n /** The executable file(s) for this package. */\n bin?: string | Partial<Record<string, string>>;\n\n /** A module ID with untranspiled code that is the primary entry point to the package. */\n esnext?:\n | string\n | {\n [moduleName: string]: string | undefined;\n main?: string;\n browser?: string;\n };\n\n /** A hint to JavaScript bundlers or component tools when packaging modules for client side use. */\n browser?: string | Partial<Record<string, string | false>>;\n\n /**\n * Denote which files in the package have side effects and may not be pruned by bundlers, even if unused.\n * If a boolean, applies to all files in the package. `false` indicates there are no side effects.\n * https://webpack.js.org/guides/tree-shaking/\n */\n sideEffects?: boolean | string[];\n\n /** Location of the bundled TypeScript declaration file. */\n types?: string;\n\n /** Location of the bundled TypeScript declaration file. Alias of `types`. */\n typings?: string;\n\n /** Location of TypeScript declaration files for different TypeScript versions. */\n typesVersions?: Partial<Record<string, Partial<Record<string, string[]>>>>;\n\n /** Subpath exports to define entry points of the package. https://nodejs.org/api/packages.html#subpath-exports */\n exports?: PackageJsonExports;\n\n /**\n * Subpath imports to define internal package import maps that only apply to import specifiers from\n * within the package itself. https://nodejs.org/api/packages.html#subpath-imports\n */\n imports?: PackageJsonImports;\n\n /** Dependencies that will be installed when the package is consumed. */\n dependencies?: PackageJsonDependencies;\n\n /** Dependencies for local development only. */\n devDependencies?: PackageJsonDependencies;\n\n /** Dependencies that must be installed alongside this package when consumed. */\n peerDependencies?: PackageJsonDependencies;\n\n /** Indicates which peer dependencies are optional. */\n peerDependenciesMeta?: Partial<Record<string, { optional: true }>>;\n\n optionalDependencies?: PackageJsonDependencies;\n bundledDependencies?: PackageJsonDependencies | string[];\n bundleDependencies?: PackageJsonDependencies | string[];\n\n resolutions?: PackageJsonDependencies;\n\n /** Required engine versions for running this package. */\n engines?: {\n [engine in LiteralOrString<'npm' | 'node'>]?: string;\n };\n\n /** Operating systems the package can run on. */\n os?: Array<\n LiteralOrString<\n | 'aix'\n | 'darwin'\n | 'freebsd'\n | 'linux'\n | 'openbsd'\n | 'sunos'\n | 'win32'\n | '!aix'\n | '!darwin'\n | '!freebsd'\n | '!linux'\n | '!openbsd'\n | '!sunos'\n | '!win32'\n >\n >;\n\n /** CPU architectures the package can run on. */\n cpu?: Array<\n LiteralOrString<\n | 'arm'\n | 'arm64'\n | 'ia32'\n | 'mips'\n | 'mipsel'\n | 'ppc'\n | 'ppc64'\n | 's390'\n | 's390x'\n | 'x32'\n | 'x64'\n | '!arm'\n | '!arm64'\n | '!ia32'\n | '!mips'\n | '!mipsel'\n | '!ppc'\n | '!ppc64'\n | '!s390'\n | '!s390x'\n | '!x32'\n | '!x64'\n >\n >;\n\n /** If `true`, this package cannot be published. */\n private?: boolean;\n\n /** A set of config values that will be used during publishing. https://docs.npmjs.com/cli/v7/configuring-npm/package-json#publishconfig */\n publishConfig?: {\n access?: 'public' | 'restricted';\n registry?: string;\n tag?: string;\n [additionalProperties: string]: unknown;\n };\n\n /** Defines which package manager is expected to be used when working on the current project. https://nodejs.org/api/corepack.html */\n packageManager?: string;\n\n /** Configuration for npm or yarn workspaces. */\n workspaces?:\n | string[]\n | {\n /** An array of workspace pattern strings which contain the workspace packages. */\n packages?: string[];\n\n /** Prevent hoisting of these dependencies within the workspace (yarn only). https://classic.yarnpkg.com/blog/2018/02/15/nohoist/) */\n nohoist?: string[];\n };\n\n /**\n * Cached result of calling `getPackageSettings` for this package.\n *\n * This should NOT be used during init's analysis of the bundle result, since it might be\n * out of date due to pending generated settings updates. (If a package is re-enqueued after\n * analysis due to generated settings updates, we refresh the definition, which updates these\n * cached setting. So it's safe to use again on the next bundle attempt.)\n */\n cloudpack?: Omit<PackageSettings, 'match'> & { mode: string | undefined };\n};\n\n/**\n * Union type which has intellisense for specific keys but also allows arbitrary strings.\n * This is a workaround for a [TypeScript issue](https://github.com/Microsoft/TypeScript/issues/29729)\n */\nexport type LiteralOrString<LiteralType extends string> = LiteralType | (string & Record<never, never>);\n\n/** Conditions which provide a way to resolve a package entry point based on the environment. */\nexport type PackageJsonExportCondition = LiteralOrString<\n | 'browser'\n | 'default'\n | 'deno'\n | 'electron'\n | 'import'\n | 'module'\n | 'node-addons'\n | 'node'\n | 'react-native'\n | 'require'\n>;\n\n/**\n * The value of an `PackageJson.exports` object key. Note at the root of the object, keys can be represented\n * either by a condition, or a `string` to provide import paths (such as \"./foo\"). At subsequent levels\n * within the object, only conditions (string which don't start with \".\") can be used as keys.\n */\nexport type PackageJsonExportsValue =\n | null\n | string\n | { [condition in PackageJsonExportCondition]?: PackageJsonExportsValue }\n | Array<PackageJsonExportsValue>;\n\n/**\n * Definition of the root exports object. Keys can be either conditions or import paths.\n */\nexport type PackageJsonExportsObject = {\n [pathOrCondition: string]: PackageJsonExportsValue;\n};\n/** Entry points of a package, optionally with conditions and subpath exports. Used as `PackageJson.exports`. */\nexport type PackageJsonExports = PackageJsonExportsValue | PackageJsonExportsObject | Array<PackageJsonExports>;\n\n/** Import map entries of a module, optionally with conditions. */\nexport type PackageJsonImports = {\n [key: `#${string}`]: string | { [key in PackageJsonExportCondition]: PackageJsonExports };\n};\n\n/** Mapping from dependency name to semver spec. */\nexport type PackageJsonDependencies = Partial<Record<string, string>>;\n"]}
@@ -1,3 +1,4 @@
1
+ import type { BundlerCapabilitiesOptions } from './BundlerCapability.js';
1
2
  import type { PackageJsonExports } from './PackageJson.js';
2
3
  /**
3
4
  * Settings which apply to a single package (app or library) as it pertains to the Cloudpack start experience.
@@ -42,9 +43,19 @@ export interface PackageSettings {
42
43
  /**
43
44
  * Forces the package to be bundled using a specific bundler.
44
45
  */
46
+ bundler?: string;
47
+ /**
48
+ * @deprecated Use `bundler`.
49
+ *
50
+ * This should be removed once repo configs are updated to use `bundler`.
51
+ */
45
52
  bundlerType?: string;
46
53
  /**
47
- * Options to pass to the bundler.
54
+ * Any bundler-specific options to be merged with the calculated bundler options.
55
+ * `bundler` is also required if this is specified.
56
+ *
57
+ * This is an escape hatch which is generally not recommended, since it locks the package to
58
+ * a specific bundler implementation.
48
59
  */
49
60
  bundlerOptions?: Record<string, unknown>;
50
61
  /**
@@ -88,5 +99,10 @@ export interface PackageSettings {
88
99
  */
89
100
  duplicatedDependencyBehavior?: 'force-host-version' | 'allow-duplication';
90
101
  };
102
+ /**
103
+ * Setting to control the bundler capabilities for this package.
104
+ * This is used to enable or disable specific bundler capabilities.
105
+ */
106
+ bundlerCapabilities?: BundlerCapabilitiesOptions;
91
107
  }
92
108
  //# sourceMappingURL=PackageSettings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PackageSettings.d.ts","sourceRoot":"","sources":["../src/PackageSettings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,KAAK,CAAC,EACF;QACE;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,GAED,MAAM,CAAC;IAEX;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhC;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhC;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE/B;;;;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AAM,CAAC;IAEjB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEzC;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IAEtB;;;;;;OAMG;IACH,oBAAoB,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAE1D;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAE1B;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAC;IAElC;;OAEG;IACH,IAAI,CAAC,EAAE;QACL;;;;;WAKG;QACH,4BAA4B,CAAC,EAAE,oBAAoB,GAAG,mBAAmB,CAAC;KAC3E,CAAC;IAEF;;;OAGG;IACH,mBAAmB,CAAC,EAAE,0BAA0B,CAAC;CAClD"}
@@ -1 +1 @@
1
- {"version":3,"file":"PackageSettings.js","sourceRoot":"","sources":["../src/PackageSettings.ts"],"names":[],"mappings":"","sourcesContent":["import type { PackageJsonExports } from './PackageJson.js';\n\n/**\n * Settings which apply to a single package (app or library) as it pertains to the Cloudpack start experience.\n */\nexport interface PackageSettings {\n /**\n * A match to indicate the target for the settings to be applied to. Defaults to *.\n */\n match?:\n | {\n /**\n * Name of the package. Can use a trailing wildcard (e.g. \"\\@scope/*\").\n */\n name: string;\n\n /**\n * Version of the package. Unspecified matches any version.\n */\n version?: string;\n }\n // Match can be a string, which is a shortcut for the name.\n | string;\n\n /**\n * The dependencies which should be included when computing the import map. This is primarily used when\n * devDependencies are needed by the app. This often happens when a library has a demo app which relies\n * on devDependencies. Accepts `$devDependencies` as a special value to include all devDependencies.\n */\n includedDependencies?: string[];\n\n /**\n * The dependencies which should be ignored by Cloudpack verbs. For example, if \"react-native\" is a dependency\n * which should not be included in the import map or evaluated during `init`, it can be listed here to ignore it.\n * Accepts `$peerDependencies` as a special value to exclude all peerDependencies.\n */\n excludedDependencies?: string[];\n\n /**\n * Dependencies which should be inlined in the library bundled by Cloudpack. This is useful for libraries which\n * are small and don't need to be loaded separately, or ones which have issues being resolved by the browser.\n */\n inlinedDependencies?: string[];\n\n /**\n * The exports map that should be used for this package, ignoring entries which are defined in the original\n * package.json. This is useful for libraries which have a missing or broken exports map, or when we want to\n * trim the exports to reduce the api surface we expose to the inner loop experience.\n */\n exports?: PackageJsonExports;\n\n /**\n * Forces the package to be bundled using a specific bundler.\n */\n bundlerType?: string;\n\n /**\n * Options to pass to the bundler.\n */\n bundlerOptions?: Record<string, unknown>;\n\n /**\n * Paths used for file monitoring and input hashing. Supports glob matching.\n * Defaults to `[/src/**, *.json]` and excludes node_modules.\n * Use `...` to include the default paths.\n */\n inputPaths?: string[];\n\n /**\n * Controls the behavior of the `verifyExports` feature when checking consumed exports from this package:\n * - If true, don't check this package's exports at all.\n * - If an object, this is a mapping from package import paths to export names to ignore. Examples:\n * - To ignore top-level exports: `{ \".\": [\"badName\"] }`\n * - To ignore exports from another path: `{ \"./lib/foo\": [\"badName\"] }`\n */\n ignoreMissingExports?: boolean | Record<string, string[]>;\n\n /**\n * Only relevant for packages bundled with rollup: globs of files that include dynamic (async)\n * imports with non-literal paths, to be processed by `@rollup/plugin-dynamic-import-vars` (subject to\n * that plugin's [limitations](https://www.npmjs.com/package/\\@rollup/plugin-dynamic-import-vars#limitations)).\n * Files matching `*.dynamic.*` are automatically included.\n *\n * This is not needed for ori/esbuild and webpack because they should handle these types of imports automatically.\n */\n dynamicImports?: string[];\n\n /**\n * Ignore these warning messages from the bundler (partial string matches).\n * This is intended for non-actionable messages from external dependencies which can't easily\n * be fixed, to avoid confusing users.\n */\n ignoredBundlerWarnings?: string[];\n\n /**\n * Setting to control how the package is linked in the resolve map.\n */\n link?: {\n /**\n * Controls the behavior of duplicated dependencies in the resolve map by link. By default, `allow-duplication`\n * is used, which allows multiple versions of the same package to exist in the resolve map to satisfy the semver.\n * If `force-host-version` is used, the package will be deduplicated to the version of the host package ignoring\n * semver requirements.\n */\n duplicatedDependencyBehavior?: 'force-host-version' | 'allow-duplication';\n };\n}\n"]}
1
+ {"version":3,"file":"PackageSettings.js","sourceRoot":"","sources":["../src/PackageSettings.ts"],"names":[],"mappings":"","sourcesContent":["import type { BundlerCapabilitiesOptions } from './BundlerCapability.js';\nimport type { PackageJsonExports } from './PackageJson.js';\n\n/**\n * Settings which apply to a single package (app or library) as it pertains to the Cloudpack start experience.\n */\nexport interface PackageSettings {\n /**\n * A match to indicate the target for the settings to be applied to. Defaults to *.\n */\n match?:\n | {\n /**\n * Name of the package. Can use a trailing wildcard (e.g. \"\\@scope/*\").\n */\n name: string;\n\n /**\n * Version of the package. Unspecified matches any version.\n */\n version?: string;\n }\n // Match can be a string, which is a shortcut for the name.\n | string;\n\n /**\n * The dependencies which should be included when computing the import map. This is primarily used when\n * devDependencies are needed by the app. This often happens when a library has a demo app which relies\n * on devDependencies. Accepts `$devDependencies` as a special value to include all devDependencies.\n */\n includedDependencies?: string[];\n\n /**\n * The dependencies which should be ignored by Cloudpack verbs. For example, if \"react-native\" is a dependency\n * which should not be included in the import map or evaluated during `init`, it can be listed here to ignore it.\n * Accepts `$peerDependencies` as a special value to exclude all peerDependencies.\n */\n excludedDependencies?: string[];\n\n /**\n * Dependencies which should be inlined in the library bundled by Cloudpack. This is useful for libraries which\n * are small and don't need to be loaded separately, or ones which have issues being resolved by the browser.\n */\n inlinedDependencies?: string[];\n\n /**\n * The exports map that should be used for this package, ignoring entries which are defined in the original\n * package.json. This is useful for libraries which have a missing or broken exports map, or when we want to\n * trim the exports to reduce the api surface we expose to the inner loop experience.\n */\n exports?: PackageJsonExports;\n\n /**\n * Forces the package to be bundled using a specific bundler.\n */\n bundler?: string;\n\n /**\n * @deprecated Use `bundler`.\n *\n * This should be removed once repo configs are updated to use `bundler`.\n */\n bundlerType?: string;\n\n /**\n * Any bundler-specific options to be merged with the calculated bundler options.\n * `bundler` is also required if this is specified.\n *\n * This is an escape hatch which is generally not recommended, since it locks the package to\n * a specific bundler implementation.\n */\n bundlerOptions?: Record<string, unknown>;\n\n /**\n * Paths used for file monitoring and input hashing. Supports glob matching.\n * Defaults to `[/src/**, *.json]` and excludes node_modules.\n * Use `...` to include the default paths.\n */\n inputPaths?: string[];\n\n /**\n * Controls the behavior of the `verifyExports` feature when checking consumed exports from this package:\n * - If true, don't check this package's exports at all.\n * - If an object, this is a mapping from package import paths to export names to ignore. Examples:\n * - To ignore top-level exports: `{ \".\": [\"badName\"] }`\n * - To ignore exports from another path: `{ \"./lib/foo\": [\"badName\"] }`\n */\n ignoreMissingExports?: boolean | Record<string, string[]>;\n\n /**\n * Only relevant for packages bundled with rollup: globs of files that include dynamic (async)\n * imports with non-literal paths, to be processed by `@rollup/plugin-dynamic-import-vars` (subject to\n * that plugin's [limitations](https://www.npmjs.com/package/\\@rollup/plugin-dynamic-import-vars#limitations)).\n * Files matching `*.dynamic.*` are automatically included.\n *\n * This is not needed for ori/esbuild and webpack because they should handle these types of imports automatically.\n */\n dynamicImports?: string[];\n\n /**\n * Ignore these warning messages from the bundler (partial string matches).\n * This is intended for non-actionable messages from external dependencies which can't easily\n * be fixed, to avoid confusing users.\n */\n ignoredBundlerWarnings?: string[];\n\n /**\n * Setting to control how the package is linked in the resolve map.\n */\n link?: {\n /**\n * Controls the behavior of duplicated dependencies in the resolve map by link. By default, `allow-duplication`\n * is used, which allows multiple versions of the same package to exist in the resolve map to satisfy the semver.\n * If `force-host-version` is used, the package will be deduplicated to the version of the host package ignoring\n * semver requirements.\n */\n duplicatedDependencyBehavior?: 'force-host-version' | 'allow-duplication';\n };\n\n /**\n * Setting to control the bundler capabilities for this package.\n * This is used to enable or disable specific bundler capabilities.\n */\n bundlerCapabilities?: BundlerCapabilitiesOptions;\n}\n"]}
package/lib/Route.d.ts CHANGED
@@ -3,8 +3,10 @@ export interface SharedRouteOptions {
3
3
  /**
4
4
  * The url path part to match. Start paths with a leading slash, e.g. `'/my-route'`. You can also
5
5
  * use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`.
6
+ *
7
+ * Use an array to handle multiple paths with the same route handler.
6
8
  */
7
- match: string;
9
+ match: string | string[];
8
10
  }
9
11
  /**
10
12
  * A server-rendered route. The route is rendered by a custom server script in Cloudpack.
@@ -48,15 +50,25 @@ export interface BootstrapRoute extends SharedRouteOptions {
48
50
  */
49
51
  exportEntry?: string;
50
52
  }
53
+ export interface RedirectRoute extends SharedRouteOptions {
54
+ /**
55
+ * The url to redirect to.
56
+ */
57
+ redirectTo: string;
58
+ }
51
59
  export type ShorthandRoute = ShorthandRenderedRoute | StaticRoute | BootstrapRoute;
52
- export type Route = RenderedRoute | StaticRoute | BootstrapRoute;
60
+ export type Route = RenderedRoute | StaticRoute | BootstrapRoute | RedirectRoute;
53
61
  /**
54
- * User defined type guard to check if a route is a static route.
62
+ * Type guard to check if a route is a static route.
55
63
  */
56
64
  export declare function isStaticRoute(route: Route): route is StaticRoute;
57
65
  /**
58
- * User defined type guard to check if a route is a bootstrap route.
66
+ * Type guard to check if a route is a bootstrap route.
59
67
  */
60
68
  export declare function isBootstrapRoute(route: Route): route is BootstrapRoute;
61
69
  export declare function isRenderedRoute(route: Route): route is RenderedRoute;
70
+ /**
71
+ * Type guard to check if a route is a redirect route.
72
+ */
73
+ export declare function isRedirectRoute(route: Route): route is RedirectRoute;
62
74
  //# sourceMappingURL=Route.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Route.d.ts","sourceRoot":"","sources":["../src/Route.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,kBAAkB;IAChE;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAE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G;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,KAAK,CAAC,EAAE,CAAC,MAAM,GAAG,kBAAkB,CAAC,EAAE,CAAC;CACzC;AAED,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,sBAAsB,EAAE,OAAO,CAAC,GAAG;IAClE,KAAK,CAAC,EAAE,kBAAkB,EAAE,CAAC;CAC9B,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,kBAAkB;IACrD;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,kBAAkB;IACxD,IAAI,EAAE,WAAW,CAAC;IAClB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,aAAc,SAAQ,kBAAkB;IACvD;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,cAAc,GAAG,sBAAsB,GAAG,WAAW,GAAG,cAAc,CAAC;AAEnF,MAAM,MAAM,KAAK,GAAG,aAAa,GAAG,WAAW,GAAG,cAAc,GAAG,aAAa,CAAC;AAEjF;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,WAAW,CAEhE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,cAAc,CAEtE;AAKD,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,aAAa,CAEpE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,aAAa,CAEpE"}
package/lib/Route.js CHANGED
@@ -1,19 +1,25 @@
1
1
  /**
2
- * User defined type guard to check if a route is a static route.
2
+ * Type guard to check if a route is a static route.
3
3
  */
4
4
  export function isStaticRoute(route) {
5
5
  return 'staticPath' in route;
6
6
  }
7
7
  /**
8
- * User defined type guard to check if a route is a bootstrap route.
8
+ * Type guard to check if a route is a bootstrap route.
9
9
  */
10
10
  export function isBootstrapRoute(route) {
11
11
  return 'type' in route && route.type === 'bootstrap';
12
12
  }
13
13
  /*
14
- * User defined type guard to check if a route is a rendered route.
14
+ * Type guard to check if a route is a rendered route.
15
15
  */
16
16
  export function isRenderedRoute(route) {
17
17
  return !isStaticRoute(route) && !isBootstrapRoute(route);
18
18
  }
19
+ /**
20
+ * Type guard to check if a route is a redirect route.
21
+ */
22
+ export function isRedirectRoute(route) {
23
+ return 'redirectTo' in route;
24
+ }
19
25
  //# sourceMappingURL=Route.js.map
package/lib/Route.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Route.js","sourceRoot":"","sources":["../src/Route.ts"],"names":[],"mappings":"AAgEA;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,KAAY;IACxC,OAAO,YAAY,IAAI,KAAK,CAAC;AAC/B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAY;IAC3C,OAAO,MAAM,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,WAAW,CAAC;AACvD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,KAAY;IAC1C,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;AAC3D,CAAC","sourcesContent":["import type { ExpandedSourcePath } from './ExpandedSourcePath.js';\n\nexport interface SharedRouteOptions {\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/**\n * A server-rendered route. The route is rendered by a custom server script in Cloudpack.\n */\nexport interface ShorthandRenderedRoute extends SharedRouteOptions {\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 `RenderRouteFunction` defined in `@ms-cloudpack/app-server`.\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 /**\n * To be implemented. The source entry or entries to be included on the page for this route.\n */\n entry?: (string | ExpandedSourcePath)[];\n}\n\nexport type RenderedRoute = Omit<ShorthandRenderedRoute, 'entry'> & {\n entry?: ExpandedSourcePath[];\n};\n\n/**\n * A route with a staticPath property serves static files from the specified path.\n */\nexport interface StaticRoute extends SharedRouteOptions {\n /**\n * The path relative to the app root to static assets.\n */\n staticPath: string;\n}\n\n/**\n * A route that serves a bootstrap script.\n */\nexport interface BootstrapRoute extends SharedRouteOptions {\n type: 'bootstrap';\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 // entry: (string | ExpandedSourcePath);\n}\n\nexport type ShorthandRoute = ShorthandRenderedRoute | StaticRoute | BootstrapRoute;\n\nexport type Route = RenderedRoute | StaticRoute | BootstrapRoute;\n\n/**\n * User defined type guard to check if a route is a static route.\n */\nexport function isStaticRoute(route: Route): route is StaticRoute {\n return 'staticPath' in route;\n}\n\n/**\n * User defined type guard to check if a route is a bootstrap route.\n */\nexport function isBootstrapRoute(route: Route): route is BootstrapRoute {\n return 'type' in route && route.type === 'bootstrap';\n}\n\n/*\n * User defined type guard to check if a route is a rendered route.\n */\nexport function isRenderedRoute(route: Route): route is RenderedRoute {\n return !isStaticRoute(route) && !isBootstrapRoute(route);\n}\n"]}
1
+ {"version":3,"file":"Route.js","sourceRoot":"","sources":["../src/Route.ts"],"names":[],"mappings":"AAuEA;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,KAAY;IACxC,OAAO,YAAY,IAAI,KAAK,CAAC;AAC/B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAY;IAC3C,OAAO,MAAM,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,WAAW,CAAC;AACvD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,KAAY;IAC1C,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;AAC3D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,KAAY;IAC1C,OAAO,YAAY,IAAI,KAAK,CAAC;AAC/B,CAAC","sourcesContent":["import type { ExpandedSourcePath } from './ExpandedSourcePath.js';\n\nexport interface SharedRouteOptions {\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 * Use an array to handle multiple paths with the same route handler.\n */\n match: string | string[];\n}\n\n/**\n * A server-rendered route. The route is rendered by a custom server script in Cloudpack.\n */\nexport interface ShorthandRenderedRoute extends SharedRouteOptions {\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 `RenderRouteFunction` defined in `@ms-cloudpack/app-server`.\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 /**\n * To be implemented. The source entry or entries to be included on the page for this route.\n */\n entry?: (string | ExpandedSourcePath)[];\n}\n\nexport type RenderedRoute = Omit<ShorthandRenderedRoute, 'entry'> & {\n entry?: ExpandedSourcePath[];\n};\n\n/**\n * A route with a staticPath property serves static files from the specified path.\n */\nexport interface StaticRoute extends SharedRouteOptions {\n /**\n * The path relative to the app root to static assets.\n */\n staticPath: string;\n}\n\n/**\n * A route that serves a bootstrap script.\n */\nexport interface BootstrapRoute extends SharedRouteOptions {\n type: 'bootstrap';\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 RedirectRoute extends SharedRouteOptions {\n /**\n * The url to redirect to.\n */\n redirectTo: string;\n}\n\nexport type ShorthandRoute = ShorthandRenderedRoute | StaticRoute | BootstrapRoute;\n\nexport type Route = RenderedRoute | StaticRoute | BootstrapRoute | RedirectRoute;\n\n/**\n * Type guard to check if a route is a static route.\n */\nexport function isStaticRoute(route: Route): route is StaticRoute {\n return 'staticPath' in route;\n}\n\n/**\n * Type guard to check if a route is a bootstrap route.\n */\nexport function isBootstrapRoute(route: Route): route is BootstrapRoute {\n return 'type' in route && route.type === 'bootstrap';\n}\n\n/*\n * Type guard to check if a route is a rendered route.\n */\nexport function isRenderedRoute(route: Route): route is RenderedRoute {\n return !isStaticRoute(route) && !isBootstrapRoute(route);\n}\n\n/**\n * Type guard to check if a route is a redirect route.\n */\nexport function isRedirectRoute(route: Route): route is RedirectRoute {\n return 'redirectTo' in route;\n}\n"]}
package/lib/index.d.ts CHANGED
@@ -20,8 +20,9 @@ export type { HttpsConfig } from './HttpsConfig.js';
20
20
  export type { ModuleType } from './ModuleType.js';
21
21
  export type { PackageOverride } from './PackageOverride.js';
22
22
  export type { PackageSettings } from './PackageSettings.js';
23
- export type { Route, RenderedRoute, BootstrapRoute, StaticRoute } from './Route.js';
24
- export { isBootstrapRoute, isRenderedRoute, isStaticRoute } from './Route.js';
23
+ export type { Route, RenderedRoute, BootstrapRoute, StaticRoute, RedirectRoute } from './Route.js';
24
+ export { isBootstrapRoute, isRenderedRoute, isStaticRoute, isRedirectRoute } from './Route.js';
25
25
  export type { TelemetryConfig } from './TelemetryConfig.js';
26
26
  export type { AppConfig } from './AppConfig.js';
27
+ export type { InternalBundlerCapabilitiesBundlerSpecificImplementations, InternalBundlerCapabilitiesMetaData, BundlerCapabilitiesOptions, } from './BundlerCapability.js';
27
28
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,YAAY,EACV,2BAA2B,EAC3B,0BAA0B,EAC1B,uBAAuB,EACvB,sBAAsB,GACvB,M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AE,MAAM,eAAe,CAAC;AAC9C,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,YAAY,EAAE,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACnG,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC/F,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,YAAY,EACV,yDAAyD,EACzD,mCAAmC,EACnC,0BAA0B,GAC3B,MAAM,wBAAwB,CAAC"}
package/lib/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  export { allFeatures } from './allFeatures.js';
2
- export { isBootstrapRoute, isRenderedRoute, isStaticRoute } from './Route.js';
2
+ export { isBootstrapRoute, isRenderedRoute, isStaticRoute, isRedirectRoute } from './Route.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,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAqC/C,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC","sourcesContent":["export { allFeatures } from './allFeatures.js';\nexport type {\n GetPackageDefinitionOptions,\n PackageDefinitionTransform,\n PackageDefinitionsCache,\n PackageImporterContext,\n} from './PackageDefinitionsCache.js';\nexport type {\n LiteralOrString,\n PackageJson,\n PackageJsonDependencies,\n PackageJsonExportCondition,\n PackageJsonExports,\n PackageJsonExportsObject,\n PackageJsonExportsValue,\n PackageJsonImports,\n} from './PackageJson.js';\nexport type { BundleContext } from './BundleContext.js';\nexport type { BundleMessage } from './BundleMessage.js';\nexport type { BundleMessageLocation } from './BundleMessageLocation.js';\nexport type { BundleMessageNote } from './BundleMessageNote.js';\nexport type { BundleMode } from './BundleMode.js';\nexport type { BundleOptions } from './BundleOptions.js';\nexport type { BundleOutputFile } from './BundleOutputFile.js';\nexport type { BundleResult } from './BundleResult.js';\nexport type { BundlerPluginResult } from './BundlerPluginResult.js';\nexport type { BundlerPlugin } from './BundlerPlugin.js';\nexport type { CloudpackConfig } from './CloudpackConfig.js';\nexport type { DevServer } from './DevServer.js';\nexport type { Feature } from './Feature.js';\nexport type { Features } from './Features.js';\nexport type { GeneratedConfig } from './GeneratedConfig.js';\nexport type { HttpsConfig } from './HttpsConfig.js';\nexport type { ModuleType } from './ModuleType.js';\nexport type { PackageOverride } from './PackageOverride.js';\nexport type { PackageSettings } from './PackageSettings.js';\nexport type { Route, RenderedRoute, BootstrapRoute, StaticRoute } from './Route.js';\nexport { isBootstrapRoute, isRenderedRoute, isStaticRoute } from './Route.js';\nexport type { TelemetryConfig } from './TelemetryConfig.js';\nexport type { AppConfig } from './AppConfig.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAqC/C,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC","sourcesContent":["export { allFeatures } from './allFeatures.js';\nexport type {\n GetPackageDefinitionOptions,\n PackageDefinitionTransform,\n PackageDefinitionsCache,\n PackageImporterContext,\n} from './PackageDefinitionsCache.js';\nexport type {\n LiteralOrString,\n PackageJson,\n PackageJsonDependencies,\n PackageJsonExportCondition,\n PackageJsonExports,\n PackageJsonExportsObject,\n PackageJsonExportsValue,\n PackageJsonImports,\n} from './PackageJson.js';\nexport type { BundleContext } from './BundleContext.js';\nexport type { BundleMessage } from './BundleMessage.js';\nexport type { BundleMessageLocation } from './BundleMessageLocation.js';\nexport type { BundleMessageNote } from './BundleMessageNote.js';\nexport type { BundleMode } from './BundleMode.js';\nexport type { BundleOptions } from './BundleOptions.js';\nexport type { BundleOutputFile } from './BundleOutputFile.js';\nexport type { BundleResult } from './BundleResult.js';\nexport type { BundlerPluginResult } from './BundlerPluginResult.js';\nexport type { BundlerPlugin } from './BundlerPlugin.js';\nexport type { CloudpackConfig } from './CloudpackConfig.js';\nexport type { DevServer } from './DevServer.js';\nexport type { Feature } from './Feature.js';\nexport type { Features } from './Features.js';\nexport type { GeneratedConfig } from './GeneratedConfig.js';\nexport type { HttpsConfig } from './HttpsConfig.js';\nexport type { ModuleType } from './ModuleType.js';\nexport type { PackageOverride } from './PackageOverride.js';\nexport type { PackageSettings } from './PackageSettings.js';\nexport type { Route, RenderedRoute, BootstrapRoute, StaticRoute, RedirectRoute } from './Route.js';\nexport { isBootstrapRoute, isRenderedRoute, isStaticRoute, isRedirectRoute } from './Route.js';\nexport type { TelemetryConfig } from './TelemetryConfig.js';\nexport type { AppConfig } from './AppConfig.js';\nexport type {\n InternalBundlerCapabilitiesBundlerSpecificImplementations,\n InternalBundlerCapabilitiesMetaData,\n BundlerCapabilitiesOptions,\n} from './BundlerCapability.js';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ms-cloudpack/common-types",
3
- "version": "0.10.0",
3
+ "version": "0.12.0",
4
4
  "description": "Common types for Cloudpack.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -454,8 +454,18 @@
454
454
  "type": "object",
455
455
  "properties": {
456
456
  "match": {
457
- "type": "string",
458
- "description": "The url path part to match. Start paths with a leading slash, e.g. `'/my-route'`. You can also use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`."
457
+ "anyOf": [
458
+ {
459
+ "type": "string"
460
+ },
461
+ {
462
+ "type": "array",
463
+ "items": {
464
+ "type": "string"
465
+ }
466
+ }
467
+ ],
468
+ "description": "The url path part to match. Start paths with a leading slash, e.g. `'/my-route'`. You can also use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`.\n\nUse an array to handle multiple paths with the same route handler."
459
469
  },
460
470
  "renderScript": {
461
471
  "type": "string",
@@ -513,8 +523,18 @@
513
523
  "type": "object",
514
524
  "properties": {
515
525
  "match": {
516
- "type": "string",
517
- "description": "The url path part to match. Start paths with a leading slash, e.g. `'/my-route'`. You can also use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`."
526
+ "anyOf": [
527
+ {
528
+ "type": "string"
529
+ },
530
+ {
531
+ "type": "array",
532
+ "items": {
533
+ "type": "string"
534
+ }
535
+ }
536
+ ],
537
+ "description": "The url path part to match. Start paths with a leading slash, e.g. `'/my-route'`. You can also use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`.\n\nUse an array to handle multiple paths with the same route handler."
518
538
  },
519
539
  "staticPath": {
520
540
  "type": "string",
@@ -532,8 +552,18 @@
532
552
  "type": "object",
533
553
  "properties": {
534
554
  "match": {
535
- "type": "string",
536
- "description": "The url path part to match. Start paths with a leading slash, e.g. `'/my-route'`. You can also use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`."
555
+ "anyOf": [
556
+ {
557
+ "type": "string"
558
+ },
559
+ {
560
+ "type": "array",
561
+ "items": {
562
+ "type": "string"
563
+ }
564
+ }
565
+ ],
566
+ "description": "The url path part to match. Start paths with a leading slash, e.g. `'/my-route'`. You can also use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`.\n\nUse an array to handle multiple paths with the same route handler."
537
567
  },
538
568
  "type": {
539
569
  "type": "string",
@@ -657,14 +687,18 @@
657
687
  "$ref": "#/definitions/PackageJsonExports",
658
688
  "description": "The exports map that should be used for this package, ignoring entries which are defined in the original package.json. This is useful for libraries which have a missing or broken exports map, or when we want to trim the exports to reduce the api surface we expose to the inner loop experience."
659
689
  },
660
- "bundlerType": {
690
+ "bundler": {
661
691
  "type": "string",
662
692
  "description": "Forces the package to be bundled using a specific bundler."
663
693
  },
694
+ "bundlerType": {
695
+ "type": "string",
696
+ "deprecated": "Use `bundler`.\n\nThis should be removed once repo configs are updated to use `bundler`."
697
+ },
664
698
  "bundlerOptions": {
665
699
  "type": "object",
666
700
  "additionalProperties": {},
667
- "description": "Options to pass to the bundler."
701
+ "description": "Any bundler-specific options to be merged with the calculated bundler options. `bundler` is also required if this is specified.\n\nThis is an escape hatch which is generally not recommended, since it locks the package to a specific bundler implementation."
668
702
  },
669
703
  "inputPaths": {
670
704
  "type": "array",
@@ -719,6 +753,10 @@
719
753
  },
720
754
  "additionalProperties": false,
721
755
  "description": "Setting to control how the package is linked in the resolve map."
756
+ },
757
+ "bundlerCapabilities": {
758
+ "$ref": "#/definitions/BundlerCapabilitiesOptions",
759
+ "description": "Setting to control the bundler capabilities for this package. This is used to enable or disable specific bundler capabilities."
722
760
  }
723
761
  },
724
762
  "additionalProperties": false,
@@ -802,6 +840,37 @@
802
840
  "$ref": "#/definitions/PackageJsonExportsValue"
803
841
  },
804
842
  "description": "Definition of the root exports object. Keys can be either conditions or import paths."
843
+ },
844
+ "BundlerCapabilitiesOptions": {
845
+ "type": "object",
846
+ "properties": {
847
+ "asset-inline": {
848
+ "anyOf": [
849
+ {
850
+ "type": "object",
851
+ "properties": {
852
+ "extensions": {
853
+ "type": "array",
854
+ "items": {
855
+ "type": "string"
856
+ }
857
+ }
858
+ },
859
+ "required": [
860
+ "extensions"
861
+ ],
862
+ "additionalProperties": false,
863
+ "description": "Inlines assets into the bundle. Options: List of file extensions to inline. Do not include the leading dot."
864
+ },
865
+ {
866
+ "type": "boolean",
867
+ "const": false
868
+ }
869
+ ]
870
+ }
871
+ },
872
+ "additionalProperties": false,
873
+ "description": "This is the type that's being used PackageSettings to enable/disable bundler capabilities. It's a partial of the InternalBundlerCapabilities with the value being the options object or false. If the value is false, the capability will be disabled for the package."
805
874
  }
806
875
  }
807
876
  }
@@ -76,14 +76,18 @@
76
76
  "$ref": "#/definitions/PackageJsonExports",
77
77
  "description": "The exports map that should be used for this package, ignoring entries which are defined in the original package.json. This is useful for libraries which have a missing or broken exports map, or when we want to trim the exports to reduce the api surface we expose to the inner loop experience."
78
78
  },
79
- "bundlerType": {
79
+ "bundler": {
80
80
  "type": "string",
81
81
  "description": "Forces the package to be bundled using a specific bundler."
82
82
  },
83
+ "bundlerType": {
84
+ "type": "string",
85
+ "deprecated": "Use `bundler`.\n\nThis should be removed once repo configs are updated to use `bundler`."
86
+ },
83
87
  "bundlerOptions": {
84
88
  "type": "object",
85
89
  "additionalProperties": {},
86
- "description": "Options to pass to the bundler."
90
+ "description": "Any bundler-specific options to be merged with the calculated bundler options. `bundler` is also required if this is specified.\n\nThis is an escape hatch which is generally not recommended, since it locks the package to a specific bundler implementation."
87
91
  },
88
92
  "inputPaths": {
89
93
  "type": "array",
@@ -138,6 +142,10 @@
138
142
  },
139
143
  "additionalProperties": false,
140
144
  "description": "Setting to control how the package is linked in the resolve map."
145
+ },
146
+ "bundlerCapabilities": {
147
+ "$ref": "#/definitions/BundlerCapabilitiesOptions",
148
+ "description": "Setting to control the bundler capabilities for this package. This is used to enable or disable specific bundler capabilities."
141
149
  }
142
150
  },
143
151
  "additionalProperties": false,
@@ -222,6 +230,37 @@
222
230
  },
223
231
  "description": "Definition of the root exports object. Keys can be either conditions or import paths."
224
232
  },
233
+ "BundlerCapabilitiesOptions": {
234
+ "type": "object",
235
+ "properties": {
236
+ "asset-inline": {
237
+ "anyOf": [
238
+ {
239
+ "type": "object",
240
+ "properties": {
241
+ "extensions": {
242
+ "type": "array",
243
+ "items": {
244
+ "type": "string"
245
+ }
246
+ }
247
+ },
248
+ "required": [
249
+ "extensions"
250
+ ],
251
+ "additionalProperties": false,
252
+ "description": "Inlines assets into the bundle. Options: List of file extensions to inline. Do not include the leading dot."
253
+ },
254
+ {
255
+ "type": "boolean",
256
+ "const": false
257
+ }
258
+ ]
259
+ }
260
+ },
261
+ "additionalProperties": false,
262
+ "description": "This is the type that's being used PackageSettings to enable/disable bundler capabilities. It's a partial of the InternalBundlerCapabilities with the value being the options object or false. If the value is false, the capability will be disabled for the package."
263
+ },
225
264
  "PackageOverride": {
226
265
  "type": "object",
227
266
  "properties": {
@@ -592,14 +631,18 @@
592
631
  "$ref": "#/definitions/PackageJsonExports",
593
632
  "description": "The exports map that should be used for this package, ignoring entries which are defined in the original package.json. This is useful for libraries which have a missing or broken exports map, or when we want to trim the exports to reduce the api surface we expose to the inner loop experience."
594
633
  },
595
- "bundlerType": {
634
+ "bundler": {
596
635
  "type": "string",
597
636
  "description": "Forces the package to be bundled using a specific bundler."
598
637
  },
638
+ "bundlerType": {
639
+ "type": "string",
640
+ "deprecated": "Use `bundler`.\n\nThis should be removed once repo configs are updated to use `bundler`."
641
+ },
599
642
  "bundlerOptions": {
600
643
  "type": "object",
601
644
  "additionalProperties": {},
602
- "description": "Options to pass to the bundler."
645
+ "description": "Any bundler-specific options to be merged with the calculated bundler options. `bundler` is also required if this is specified.\n\nThis is an escape hatch which is generally not recommended, since it locks the package to a specific bundler implementation."
603
646
  },
604
647
  "inputPaths": {
605
648
  "type": "array",
@@ -654,26 +697,13 @@
654
697
  },
655
698
  "additionalProperties": false,
656
699
  "description": "Setting to control how the package is linked in the resolve map."
657
- }
658
- },
659
- "description": "Merged package settings."
660
- },
661
- "cloudpackRemapped": {
662
- "type": "object",
663
- "properties": {
664
- "originalName": {
665
- "type": "string"
666
700
  },
667
- "originalVersion": {
668
- "type": "string"
701
+ "bundlerCapabilities": {
702
+ "$ref": "#/definitions/BundlerCapabilitiesOptions",
703
+ "description": "Setting to control the bundler capabilities for this package. This is used to enable or disable specific bundler capabilities."
669
704
  }
670
705
  },
671
- "required": [
672
- "originalName",
673
- "originalVersion"
674
- ],
675
- "additionalProperties": false,
676
- "deprecated": ": Cloudpack internally added property: name and version prior to nonSemverTransform (if different)"
706
+ "description": "Cached result of calling `getPackageSettings` for this package.\n\nThis should NOT be used during init's analysis of the bundle result, since it might be out of date due to pending generated settings updates. (If a package is re-enqueued after analysis due to generated settings updates, we refresh the definition, which updates these cached setting. So it's safe to use again on the next bundle attempt.)"
677
707
  }
678
708
  },
679
709
  "additionalProperties": false,
@@ -455,8 +455,18 @@
455
455
  "type": "object",
456
456
  "properties": {
457
457
  "match": {
458
- "type": "string",
459
- "description": "The url path part to match. Start paths with a leading slash, e.g. `'/my-route'`. You can also use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`."
458
+ "anyOf": [
459
+ {
460
+ "type": "string"
461
+ },
462
+ {
463
+ "type": "array",
464
+ "items": {
465
+ "type": "string"
466
+ }
467
+ }
468
+ ],
469
+ "description": "The url path part to match. Start paths with a leading slash, e.g. `'/my-route'`. You can also use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`.\n\nUse an array to handle multiple paths with the same route handler."
460
470
  },
461
471
  "renderScript": {
462
472
  "type": "string",
@@ -514,8 +524,18 @@
514
524
  "type": "object",
515
525
  "properties": {
516
526
  "match": {
517
- "type": "string",
518
- "description": "The url path part to match. Start paths with a leading slash, e.g. `'/my-route'`. You can also use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`."
527
+ "anyOf": [
528
+ {
529
+ "type": "string"
530
+ },
531
+ {
532
+ "type": "array",
533
+ "items": {
534
+ "type": "string"
535
+ }
536
+ }
537
+ ],
538
+ "description": "The url path part to match. Start paths with a leading slash, e.g. `'/my-route'`. You can also use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`.\n\nUse an array to handle multiple paths with the same route handler."
519
539
  },
520
540
  "staticPath": {
521
541
  "type": "string",
@@ -533,8 +553,18 @@
533
553
  "type": "object",
534
554
  "properties": {
535
555
  "match": {
536
- "type": "string",
537
- "description": "The url path part to match. Start paths with a leading slash, e.g. `'/my-route'`. You can also use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`."
556
+ "anyOf": [
557
+ {
558
+ "type": "string"
559
+ },
560
+ {
561
+ "type": "array",
562
+ "items": {
563
+ "type": "string"
564
+ }
565
+ }
566
+ ],
567
+ "description": "The url path part to match. Start paths with a leading slash, e.g. `'/my-route'`. You can also use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`.\n\nUse an array to handle multiple paths with the same route handler."
538
568
  },
539
569
  "type": {
540
570
  "type": "string",
@@ -658,14 +688,18 @@
658
688
  "$ref": "#/definitions/PackageJsonExports",
659
689
  "description": "The exports map that should be used for this package, ignoring entries which are defined in the original package.json. This is useful for libraries which have a missing or broken exports map, or when we want to trim the exports to reduce the api surface we expose to the inner loop experience."
660
690
  },
661
- "bundlerType": {
691
+ "bundler": {
662
692
  "type": "string",
663
693
  "description": "Forces the package to be bundled using a specific bundler."
664
694
  },
695
+ "bundlerType": {
696
+ "type": "string",
697
+ "deprecated": "Use `bundler`.\n\nThis should be removed once repo configs are updated to use `bundler`."
698
+ },
665
699
  "bundlerOptions": {
666
700
  "type": "object",
667
701
  "additionalProperties": {},
668
- "description": "Options to pass to the bundler."
702
+ "description": "Any bundler-specific options to be merged with the calculated bundler options. `bundler` is also required if this is specified.\n\nThis is an escape hatch which is generally not recommended, since it locks the package to a specific bundler implementation."
669
703
  },
670
704
  "inputPaths": {
671
705
  "type": "array",
@@ -720,6 +754,10 @@
720
754
  },
721
755
  "additionalProperties": false,
722
756
  "description": "Setting to control how the package is linked in the resolve map."
757
+ },
758
+ "bundlerCapabilities": {
759
+ "$ref": "#/definitions/BundlerCapabilitiesOptions",
760
+ "description": "Setting to control the bundler capabilities for this package. This is used to enable or disable specific bundler capabilities."
723
761
  }
724
762
  },
725
763
  "additionalProperties": false,
@@ -803,6 +841,37 @@
803
841
  "$ref": "#/definitions/PackageJsonExportsValue"
804
842
  },
805
843
  "description": "Definition of the root exports object. Keys can be either conditions or import paths."
844
+ },
845
+ "BundlerCapabilitiesOptions": {
846
+ "type": "object",
847
+ "properties": {
848
+ "asset-inline": {
849
+ "anyOf": [
850
+ {
851
+ "type": "object",
852
+ "properties": {
853
+ "extensions": {
854
+ "type": "array",
855
+ "items": {
856
+ "type": "string"
857
+ }
858
+ }
859
+ },
860
+ "required": [
861
+ "extensions"
862
+ ],
863
+ "additionalProperties": false,
864
+ "description": "Inlines assets into the bundle. Options: List of file extensions to inline. Do not include the leading dot."
865
+ },
866
+ {
867
+ "type": "boolean",
868
+ "const": false
869
+ }
870
+ ]
871
+ }
872
+ },
873
+ "additionalProperties": false,
874
+ "description": "This is the type that's being used PackageSettings to enable/disable bundler capabilities. It's a partial of the InternalBundlerCapabilities with the value being the options object or false. If the value is false, the capability will be disabled for the package."
806
875
  }
807
876
  },
808
877
  "properties": {