@ms-cloudpack/common-types 0.26.1 → 0.26.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/AppConfig.d.ts +4 -3
- package/lib/AppConfig.d.ts.map +1 -1
- package/lib/AppConfig.js.map +1 -1
- package/lib/Feature.d.ts +8 -0
- package/lib/Feature.d.ts.map +1 -1
- package/lib/Feature.js.map +1 -1
- package/lib/PackageSettings.d.ts +10 -0
- package/lib/PackageSettings.d.ts.map +1 -1
- package/lib/PackageSettings.js.map +1 -1
- package/lib/allFeatures.d.ts +14 -4
- package/lib/allFeatures.d.ts.map +1 -1
- package/lib/allFeatures.js +19 -8
- package/lib/allFeatures.js.map +1 -1
- package/lib/index.d.ts +1 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/schema/AppConfig.json +7 -7
- package/schema/UserConfig.json +7 -7
- package/lib/Features.d.ts +0 -8
- package/lib/Features.d.ts.map +0 -1
- package/lib/Features.js +0 -2
- package/lib/Features.js.map +0 -1
package/lib/AppConfig.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ServerConfig } from './ServerConfig.js';
|
|
2
|
-
import type { Features } from './
|
|
2
|
+
import type { Features } from './allFeatures.js';
|
|
3
3
|
import type { PackageSettings } from './PackageSettings.js';
|
|
4
4
|
import type { RemoteCacheConfig } from './RemoteCacheConfig.js';
|
|
5
5
|
import type { ShorthandRoute } from './Route.js';
|
|
@@ -11,10 +11,11 @@ import type { DefineFlags } from '@ms-cloudpack/common-types-browser';
|
|
|
11
11
|
export interface AppConfig {
|
|
12
12
|
/**
|
|
13
13
|
* Extend the configuration from another file: either an import path or a relative path
|
|
14
|
-
* (resolved from the config file's location).
|
|
14
|
+
* (resolved from the config file's location). Relative paths or deep imports into another
|
|
15
|
+
* package (without an exports map) must include the file extension.
|
|
15
16
|
*
|
|
16
17
|
* If an array, later files will take precedence when merging.
|
|
17
|
-
* (The
|
|
18
|
+
* (The current file's config always takes precedence over any extended config.)
|
|
18
19
|
*
|
|
19
20
|
* Config merging approach:
|
|
20
21
|
* - Objects will be deeply merged.
|
package/lib/AppConfig.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppConfig.d.ts","sourceRoot":"","sources":["../src/AppConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"AppConfig.d.ts","sourceRoot":"","sources":["../src/AppConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAEtE;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAE5B;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,CAAC;IAEzB;;OAEG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC;IAE5B;;OAEG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,eAAe,CAAC,EAAE,eAAe,EAAE,CAAC;IAEpC;;;OAGG;IACH,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;IAEjC;;;;;;;OAOG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAE/B;;;OAGG;IACH,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAEhC;;;OAGG;IACH,MAAM,CAAC,EAAE,cAAc,EAAE,CAAC;IAE1B;;;;;OAKG;IACH,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC;IAEpC;;;;OAIG;IACH,2BAA2B,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAErD;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB"}
|
package/lib/AppConfig.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppConfig.js","sourceRoot":"","sources":["../src/AppConfig.ts"],"names":[],"mappings":"","sourcesContent":["import type { ServerConfig } from './ServerConfig.js';\nimport type { Features } from './
|
|
1
|
+
{"version":3,"file":"AppConfig.js","sourceRoot":"","sources":["../src/AppConfig.ts"],"names":[],"mappings":"","sourcesContent":["import type { ServerConfig } from './ServerConfig.js';\nimport type { Features } from './allFeatures.js';\nimport type { PackageSettings } from './PackageSettings.js';\nimport type { RemoteCacheConfig } from './RemoteCacheConfig.js';\nimport type { ShorthandRoute } from './Route.js';\nimport type { TelemetryConfig } from './TelemetryConfig.js';\nimport type { DefineFlags } from '@ms-cloudpack/common-types-browser';\n\n/**\n * Per-application user-provided configuration for Cloudpack.\n */\nexport interface AppConfig {\n /**\n * Extend the configuration from another file: either an import path or a relative path\n * (resolved from the config file's location). Relative paths or deep imports into another\n * package (without an exports map) must include the file extension.\n *\n * If an array, later files will take precedence when merging.\n * (The current file's config always takes precedence over any extended config.)\n *\n * Config merging approach:\n * - Objects will be deeply merged.\n * - Primitive values will be overwritten.\n * - Arrays will be overwritten, EXCEPT for `packageSettings`, which will be concatenated.\n */\n extends?: string | string[];\n\n /**\n * @deprecated - use \"server\" instead.\n */\n devServer?: ServerConfig;\n\n /**\n * Configuration for the dev server.\n */\n server?: ServerConfig;\n\n /**\n * Configuration for telemetry.\n */\n telemetry?: TelemetryConfig;\n\n /**\n * Enable additional Cloudpack features.\n */\n features?: Features;\n\n /**\n * Help message to display when Cloudpack starts up.\n */\n helpMessage?: string;\n\n /**\n * Settings to customize how packages are bundled.\n * Later settings in the array take precedence over earlier ones.\n */\n packageSettings?: PackageSettings[];\n\n /**\n * Commands to execute prior to Cloudpack bundling.\n * Each entry has a command and an array of arguments: `['command', ['arg1', 'arg2']]`.\n */\n dependsOn?: [string, string[]][];\n\n /**\n * Glob pattern to match `patch-package` patch files, relative to the project root\n * (usually the same as the repository root).\n *\n * Note that if you're using `yarn patch` (v2+), those patches will be handled automatically\n * (not by this glob pattern).\n * @default \"patches/*.patch\"\n */\n patchFilesGlobPattern?: string;\n\n /**\n * Azure Blob Storage configuration for remote cache - uploading and downloading packages\n * via `cloudpack sync`. If this is not provided, the remote cache will not be used.\n */\n remoteCache?: RemoteCacheConfig;\n\n /**\n * Defines what routes to support from the app server, and which scripts will be loaded\n * for each.\n */\n routes?: ShorthandRoute[];\n\n /**\n * Ignore these package names when calculating included and excluded dependencies.\n * This is mainly intended for helper packages such as `tslib`.\n *\n * Include `...` to merge with the default list (`tslib` and `@babel/runtime` as of writing).\n */\n neverExcludeDependencies?: string[];\n\n /**\n * Key value pairs of external bundler capabilities that can be enabled in the package settings.\n * - Key is the name of the capability, which will be used in `PackageSettings.bundlerCapabilities`.\n * - Value is the import specifier (local path or package name) for the capability module.\n */\n bundlerCapabilitiesRegistry?: Record<string, string>;\n\n /**\n * Key value pairs that will be used to define global variables in the runtime.\n */\n define?: DefineFlags;\n}\n"]}
|
package/lib/Feature.d.ts
CHANGED
package/lib/Feature.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Feature.d.ts","sourceRoot":"","sources":["../src/Feature.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,WAAW,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"Feature.d.ts","sourceRoot":"","sources":["../src/Feature.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
package/lib/Feature.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Feature.js","sourceRoot":"","sources":["../src/Feature.ts"],"names":[],"mappings":"","sourcesContent":["export interface Feature {\n description: string;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Feature.js","sourceRoot":"","sources":["../src/Feature.ts"],"names":[],"mappings":"","sourcesContent":["export interface Feature {\n /**\n * Description used in help output\n */\n description: string;\n\n /**\n * Whether the feature is enabled by default\n * @default false\n */\n default?: boolean;\n}\n"]}
|
package/lib/PackageSettings.d.ts
CHANGED
|
@@ -56,6 +56,16 @@ export interface PackageSettings {
|
|
|
56
56
|
* Use this exports map instead of the original entry points from package.json. (Any Cloudpack-
|
|
57
57
|
* generated exports will be merged.) This is useful if a library's exports map is missing
|
|
58
58
|
* or broken, or to skip bundling entries which aren't needed at runtime.
|
|
59
|
+
*
|
|
60
|
+
* Generally, keys should be relative import paths starting with ./ (use . for the top-level import).
|
|
61
|
+
* Other standard exports map syntax (such as conditions) is also supported.
|
|
62
|
+
* For example:
|
|
63
|
+
* ```json
|
|
64
|
+
* {
|
|
65
|
+
* ".": "./lib/index.js",
|
|
66
|
+
* "./foo": "./lib/foo.js",
|
|
67
|
+
* }
|
|
68
|
+
* ```
|
|
59
69
|
*/
|
|
60
70
|
exports?: PackageJsonExports;
|
|
61
71
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PackageSettings.d.ts","sourceRoot":"","sources":["../src/PackageSettings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAE7E,MAAM,WAAW,0BAA0B;IACzC;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,0BAA0B,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,KAAK,EAAE,oBAAoB,GAAG,oBAAoB,EAAE,CAAC;IAErD;;;;;;OAMG;IACH,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhC;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE/B
|
|
1
|
+
{"version":3,"file":"PackageSettings.d.ts","sourceRoot":"","sources":["../src/PackageSettings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAE7E,MAAM,WAAW,0BAA0B;IACzC;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,0BAA0B,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,eAAe;I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ACH,OAAO,CAAC,EAAE,gBAAgB,CAAC;CAC5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PackageSettings.js","sourceRoot":"","sources":["../src/PackageSettings.ts"],"names":[],"mappings":"","sourcesContent":["import type { LinkOptions } from './LinkOptions.js';\nimport type { BundlerCapabilitiesOptions } from './BundlerCapability.js';\nimport type { PackageJsonExports, GeneratedExports } from './PackageJson.js';\n\nexport interface PackageSettingsMatchObject {\n /**\n * Name of the package. Can use a trailing wildcard (e.g. `@scope/*`). `*` to match any name.\n *\n * To negate a match, use `!` as the first character (e.g. `!@scope/foo` or `!@scope/*`).\n */\n name: string;\n\n /**\n * Version of the package. Unspecified matches any version.\n *\n * Note that if the package version is a prerelease, it will only match `*` or ranges that\n * explicitly include prereleases. For example, `^1.0.0` will not match `1.0.1-beta.0`.\n */\n version?: string;\n}\n\n/**\n * Which package(s) the settings should be applied to.\n * A string is a shorthand for matching the name with any version (`*` to match any name).\n */\nexport type PackageSettingsMatch = string | PackageSettingsMatchObject;\n\n/**\n * Settings overrides for bundling a package (or multiple packages, depending on `match`).\n */\nexport interface PackageSettings {\n /**\n * Which package(s) the settings should be applied to.\n * A string is a shorthand for matching the name with any version (`*` to match any name).\n * An array allows multiple matches to be specified.\n */\n match: PackageSettingsMatch | PackageSettingsMatch[];\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.\n *\n * 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 *\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\n * libraries which are small and don't need to be loaded separately, have issues being resolved\n * by the browser, or provide reusable scss files.\n */\n inlinedDependencies?: string[];\n\n /**\n * Use this exports map instead of the original entry points from package.json. (Any Cloudpack-\n * generated exports will be merged.) This is useful if a library's exports map is missing\n * or broken, or to skip bundling entries which aren't needed at runtime.\n */\n exports?: PackageJsonExports;\n\n /**\n * If specified, Cloudpack will not attempt to auto-generate ESM stubs for the package, but will\n * instead use the array of named exports you provide (per entry key). Any keys not included\n * will have a default export, but no named exports (so `{}` means that all entries should have\n * only a default export).\n * An entry key is the output file path, relative to `outputPath` (with forward slashes and leading `./`)\n * and *without* the extension (unless it's non-JS).\n *\n * You can also use the special value `'types'` to generate stubs based on the TypeScript declaration file\n * if it exists. This will generate named exports for all types in the declaration file and relative imported files.\n *\n * Note: This is an escape hatch and should be used with caution, as it can lead to unexpected behavior.\n */\n unsafeCjsExportNames?: { [entryKey: string]: string[] } | 'types';\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. It's better to use built-in or custom bundler capabilities.\n *\n * WARNING: When merging package settings, `bundlerOptions` will be **overwritten** with\n * the last specified value.\n */\n bundlerOptions?: Record<string, unknown>;\n\n /**\n * Paths used for file monitoring and input hashing. Supports glob matching.\n * Defaults are under `@ms-cloudpack/path-utilities` in `sourceFilesGlobs`.\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 * Settings to control how the package is linked in the resolve map.\n */\n link?: LinkOptions;\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\n/**\n * Subset of PackageSettings used in the generated config.\n */\nexport type GeneratedPackageSettings = Pick<\n PackageSettings,\n 'includedDependencies' | 'excludedDependencies' | 'dynamicImports'\n> & {\n /**\n * This will be a string (name) for internal packages, or match with name and version for external.\n * The match in this case will NOT contain wildcards in the name.\n */\n match: string | Required<PackageSettingsMatchObject>;\n\n /**\n * Generated exports. This will always be a simple object with import paths.\n */\n exports?: GeneratedExports;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"PackageSettings.js","sourceRoot":"","sources":["../src/PackageSettings.ts"],"names":[],"mappings":"","sourcesContent":["import type { LinkOptions } from './LinkOptions.js';\nimport type { BundlerCapabilitiesOptions } from './BundlerCapability.js';\nimport type { PackageJsonExports, GeneratedExports } from './PackageJson.js';\n\nexport interface PackageSettingsMatchObject {\n /**\n * Name of the package. Can use a trailing wildcard (e.g. `@scope/*`). `*` to match any name.\n *\n * To negate a match, use `!` as the first character (e.g. `!@scope/foo` or `!@scope/*`).\n */\n name: string;\n\n /**\n * Version of the package. Unspecified matches any version.\n *\n * Note that if the package version is a prerelease, it will only match `*` or ranges that\n * explicitly include prereleases. For example, `^1.0.0` will not match `1.0.1-beta.0`.\n */\n version?: string;\n}\n\n/**\n * Which package(s) the settings should be applied to.\n * A string is a shorthand for matching the name with any version (`*` to match any name).\n */\nexport type PackageSettingsMatch = string | PackageSettingsMatchObject;\n\n/**\n * Settings overrides for bundling a package (or multiple packages, depending on `match`).\n */\nexport interface PackageSettings {\n /**\n * Which package(s) the settings should be applied to.\n * A string is a shorthand for matching the name with any version (`*` to match any name).\n * An array allows multiple matches to be specified.\n */\n match: PackageSettingsMatch | PackageSettingsMatch[];\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.\n *\n * 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 *\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\n * libraries which are small and don't need to be loaded separately, have issues being resolved\n * by the browser, or provide reusable scss files.\n */\n inlinedDependencies?: string[];\n\n /**\n * Use this exports map instead of the original entry points from package.json. (Any Cloudpack-\n * generated exports will be merged.) This is useful if a library's exports map is missing\n * or broken, or to skip bundling entries which aren't needed at runtime.\n *\n * Generally, keys should be relative import paths starting with ./ (use . for the top-level import).\n * Other standard exports map syntax (such as conditions) is also supported.\n * For example:\n * ```json\n * {\n * \".\": \"./lib/index.js\",\n * \"./foo\": \"./lib/foo.js\",\n * }\n * ```\n */\n exports?: PackageJsonExports;\n\n /**\n * If specified, Cloudpack will not attempt to auto-generate ESM stubs for the package, but will\n * instead use the array of named exports you provide (per entry key). Any keys not included\n * will have a default export, but no named exports (so `{}` means that all entries should have\n * only a default export).\n * An entry key is the output file path, relative to `outputPath` (with forward slashes and leading `./`)\n * and *without* the extension (unless it's non-JS).\n *\n * You can also use the special value `'types'` to generate stubs based on the TypeScript declaration file\n * if it exists. This will generate named exports for all types in the declaration file and relative imported files.\n *\n * Note: This is an escape hatch and should be used with caution, as it can lead to unexpected behavior.\n */\n unsafeCjsExportNames?: { [entryKey: string]: string[] } | 'types';\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. It's better to use built-in or custom bundler capabilities.\n *\n * WARNING: When merging package settings, `bundlerOptions` will be **overwritten** with\n * the last specified value.\n */\n bundlerOptions?: Record<string, unknown>;\n\n /**\n * Paths used for file monitoring and input hashing. Supports glob matching.\n * Defaults are under `@ms-cloudpack/path-utilities` in `sourceFilesGlobs`.\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 * Settings to control how the package is linked in the resolve map.\n */\n link?: LinkOptions;\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\n/**\n * Subset of PackageSettings used in the generated config.\n */\nexport type GeneratedPackageSettings = Pick<\n PackageSettings,\n 'includedDependencies' | 'excludedDependencies' | 'dynamicImports'\n> & {\n /**\n * This will be a string (name) for internal packages, or match with name and version for external.\n * The match in this case will NOT contain wildcards in the name.\n */\n match: string | Required<PackageSettingsMatchObject>;\n\n /**\n * Generated exports. This will always be a simple object with import paths.\n */\n exports?: GeneratedExports;\n};\n"]}
|
package/lib/allFeatures.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
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 = {
|
|
6
|
+
[key in keyof typeof allFeatures]?: boolean;
|
|
7
|
+
};
|
|
2
8
|
/**
|
|
3
9
|
* A set of options for configuring the experience.
|
|
4
10
|
* Features can be set to true to change the default behavior.
|
|
@@ -8,8 +14,6 @@ export declare const allFeatures: {
|
|
|
8
14
|
autoUpdateEntries: Feature;
|
|
9
15
|
/** Disables the generation of source-maps during build. */
|
|
10
16
|
disableSourceMaps: Feature;
|
|
11
|
-
/** Enables server-side rendering (SSR) for the application. This is experimental and may not work in all cases. */
|
|
12
|
-
enableSSR: Feature;
|
|
13
17
|
/** Enabled cloud-hosted application */
|
|
14
18
|
enableCloudHosted: Feature;
|
|
15
19
|
/**
|
|
@@ -21,19 +25,21 @@ export declare const allFeatures: {
|
|
|
21
25
|
* Enables downloading bundles from remote cache instead of bundling.
|
|
22
26
|
*/
|
|
23
27
|
enableRemoteCacheDownloads: Feature;
|
|
28
|
+
/** Enables server-side rendering (SSR) for the application. This is experimental and may not work in all cases. */
|
|
29
|
+
enableSSR: Feature;
|
|
24
30
|
/** Enables the file watcher to be spawned in a forked process (default: true). */
|
|
25
31
|
enableWatcherInFork: Feature;
|
|
26
32
|
/** Enables the preemptive enqueueing of dependencies during build. */
|
|
27
33
|
enqueueDependencies: Feature;
|
|
28
34
|
/** Check for dynamic (async) imports with non-literal paths in bundle output during init. */
|
|
29
35
|
evaluateDynamicImports: Feature;
|
|
30
|
-
/** Enables relative resource paths to be used in import map paths when useSingleWebServer is true. (default: true) */
|
|
31
|
-
relativeImportMapPaths: Feature;
|
|
32
36
|
/**
|
|
33
37
|
* Excludes unused dependencies in the generated config during an init run.
|
|
34
38
|
* This helps trim the dependency graph, reduce the import map, and speed up performance.
|
|
35
39
|
*/
|
|
36
40
|
optimizeDependencies: Feature;
|
|
41
|
+
/** Enables relative resource paths to be used in import map paths when useSingleWebServer is true. (default: true) */
|
|
42
|
+
relativeImportMapPaths: Feature;
|
|
37
43
|
/** Creates null entries for unused exports in generated config so that they are not included when bundling. */
|
|
38
44
|
removeUnusedExports: Feature;
|
|
39
45
|
/** @deprecated Removed in favor of `resolve-web-extensions` bundler capability. Enables React Native type resolution of .web.ts extensions. */
|
|
@@ -47,4 +53,8 @@ export declare const allFeatures: {
|
|
|
47
53
|
/** Enables the verification of exports during init. */
|
|
48
54
|
verifyExports: Feature;
|
|
49
55
|
};
|
|
56
|
+
/**
|
|
57
|
+
* Record of features that are enabled by default.
|
|
58
|
+
*/
|
|
59
|
+
export declare const defaultFeatures: Features;
|
|
50
60
|
//# sourceMappingURL=allFeatures.d.ts.map
|
package/lib/allFeatures.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allFeatures.d.ts","sourceRoot":"","sources":["../src/allFeatures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,WAAW;IAGtB,mHAAmH;
|
|
1
|
+
{"version":3,"file":"allFeatures.d.ts","sourceRoot":"","sources":["../src/allFeatures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;KAAG,GAAG,IAAI,MAAM,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO;CAAE,CAAC;AAEvE;;;GAGG;AACH,eAAO,MAAM,WAAW;IAGtB,mHAAmH;uBAK9G,OAAO;IAEZ,2DAA2D;uBACmC,OAAO;IAErG,uCAAuC;uBACoC,OAAO;IAElF;;;OAGG;yBAKE,OAAO;IAEZ;;OAEG;gCAGE,OAAO;IAEZ,mHAAmH;eAI9G,OAAO;IAEZ,mFAAmF;yBAI9E,OAAO;IAEZ,sEAAsE;yBACqC,OAAO;IAElH,6FAA6F;4BAGxF,OAAO;IAEZ;;;OAGG;0BAKE,OAAO;IAEZ,sHAAsH;4BAKjH,OAAO;IAEZ,+GAA+G;yBAI1G,OAAO;IAEZ,+IAA+I;0BACvC,OAAO;IAE/G,sCAAsC;iBAC6B,OAAO;IAE1E,gDAAgD;0BACsC,OAAO;IAE7F,2EAA2E;wBAItE,OAAO;IAEZ,uDAAuD;mBAC+B,OAAO;CAI9F,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAIvB,QAAQ,CAAC"}
|
package/lib/allFeatures.js
CHANGED
|
@@ -7,13 +7,10 @@ export const allFeatures = {
|
|
|
7
7
|
/** Automatically updates the generated config when an unknown import path is used during start (default: true). */
|
|
8
8
|
autoUpdateEntries: {
|
|
9
9
|
description: 'Automatically updates the generated config when an unknown import path is used during start (default: true).',
|
|
10
|
+
default: true,
|
|
10
11
|
},
|
|
11
12
|
/** Disables the generation of source-maps during build. */
|
|
12
13
|
disableSourceMaps: { description: 'Disables the generation of source-maps during build.' },
|
|
13
|
-
/** Enables server-side rendering (SSR) for the application. This is experimental and may not work in all cases. */
|
|
14
|
-
enableSSR: {
|
|
15
|
-
description: 'Enables server-side rendering (SSR) for the application. This is experimental and may not work in all cases.',
|
|
16
|
-
},
|
|
17
14
|
/** Enabled cloud-hosted application */
|
|
18
15
|
enableCloudHosted: { description: 'Enables cloud-hosted application.' },
|
|
19
16
|
/**
|
|
@@ -22,6 +19,7 @@ export const allFeatures = {
|
|
|
22
19
|
*/
|
|
23
20
|
enableModuleWorkers: {
|
|
24
21
|
description: 'Enables support of import maps for workers. To use this feature, the package with the worker must be bundled with webpack (default: true).',
|
|
22
|
+
default: true,
|
|
25
23
|
},
|
|
26
24
|
/**
|
|
27
25
|
* Enables downloading bundles from remote cache instead of bundling.
|
|
@@ -29,9 +27,14 @@ export const allFeatures = {
|
|
|
29
27
|
enableRemoteCacheDownloads: {
|
|
30
28
|
description: 'Enables downloading bundles from remote cache instead of bundling.',
|
|
31
29
|
},
|
|
30
|
+
/** Enables server-side rendering (SSR) for the application. This is experimental and may not work in all cases. */
|
|
31
|
+
enableSSR: {
|
|
32
|
+
description: 'Enables server-side rendering (SSR) for the application. This is experimental and may not work in all cases.',
|
|
33
|
+
},
|
|
32
34
|
/** Enables the file watcher to be spawned in a forked process (default: true). */
|
|
33
35
|
enableWatcherInFork: {
|
|
34
36
|
description: 'Enables the file watcher to be spawned in a forked process (default: true).',
|
|
37
|
+
default: true,
|
|
35
38
|
},
|
|
36
39
|
/** Enables the preemptive enqueueing of dependencies during build. */
|
|
37
40
|
enqueueDependencies: { description: 'Enables the preemptive enqueueing of dependencies during build.' },
|
|
@@ -39,10 +42,6 @@ export const allFeatures = {
|
|
|
39
42
|
evaluateDynamicImports: {
|
|
40
43
|
description: 'Check for dynamic (async) imports with non-literal paths in bundle output during init.',
|
|
41
44
|
},
|
|
42
|
-
/** Enables relative resource paths to be used in import map paths when useSingleWebServer is true. (default: true) */
|
|
43
|
-
relativeImportMapPaths: {
|
|
44
|
-
description: 'Enables relative resource paths to be used in import map paths when useSingleWebServer is true. (default: true)',
|
|
45
|
-
},
|
|
46
45
|
/**
|
|
47
46
|
* Excludes unused dependencies in the generated config during an init run.
|
|
48
47
|
* This helps trim the dependency graph, reduce the import map, and speed up performance.
|
|
@@ -52,6 +51,11 @@ export const allFeatures = {
|
|
|
52
51
|
// breaking up this string causes an exception in ts-json-schema-generator
|
|
53
52
|
'Excludes unused dependencies in the generated config during an init run. This helps trim the dependency graph, reduce the import map, and speed up performance.',
|
|
54
53
|
},
|
|
54
|
+
/** Enables relative resource paths to be used in import map paths when useSingleWebServer is true. (default: true) */
|
|
55
|
+
relativeImportMapPaths: {
|
|
56
|
+
description: 'Enables relative resource paths to be used in import map paths when useSingleWebServer is true. (default: true)',
|
|
57
|
+
default: true,
|
|
58
|
+
},
|
|
55
59
|
/** Creates null entries for unused exports in generated config so that they are not included when bundling. */
|
|
56
60
|
removeUnusedExports: {
|
|
57
61
|
description: 'Creates null entries for unused exports in generated config so that they are not included when bundling.',
|
|
@@ -65,10 +69,17 @@ export const allFeatures = {
|
|
|
65
69
|
/** Use a single server for both bundles and app assets (default: true). */
|
|
66
70
|
useSingleWebServer: {
|
|
67
71
|
description: 'Use a single server for both bundles and app assets (default: true).',
|
|
72
|
+
default: true,
|
|
68
73
|
},
|
|
69
74
|
/** Enables the verification of exports during init. */
|
|
70
75
|
verifyExports: { description: 'Enables the verification of exports during init.' },
|
|
71
76
|
// Please add new features in alphabetical order!
|
|
72
77
|
// Don't forget to add them to the doc site as well!
|
|
73
78
|
};
|
|
79
|
+
/**
|
|
80
|
+
* Record of features that are enabled by default.
|
|
81
|
+
*/
|
|
82
|
+
export const defaultFeatures = Object.fromEntries(Object.entries(allFeatures)
|
|
83
|
+
.filter(([_, feature]) => feature.default)
|
|
84
|
+
.map(([name]) => [name, true]));
|
|
74
85
|
//# sourceMappingURL=allFeatures.js.map
|
package/lib/allFeatures.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allFeatures.js","sourceRoot":"","sources":["../src/allFeatures.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"allFeatures.js","sourceRoot":"","sources":["../src/allFeatures.ts"],"names":[],"mappings":"AAOA;;;GAGG;AACH,MA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ACnF,OAAO,EAAE,IAAI;KACH;IAEZ,uDAAuD;IACvD,aAAa,EAAE,EAAE,WAAW,EAAE,kDAAkD,EAAa;IAE7F,iDAAiD;IACjD,oDAAoD;CACrD,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,WAAW,CAC/C,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC;KACxB,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;KACzC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CACrB,CAAC","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 = { [key in keyof typeof allFeatures]?: boolean };\n\n/**\n * A set of options for configuring the experience.\n * Features can be set to true to change the default behavior.\n */\nexport const allFeatures = {\n // The comments provide intellisense, and the description strings are used in the help output.\n\n /** Automatically updates the generated config when an unknown import path is used during start (default: true). */\n autoUpdateEntries: {\n description:\n 'Automatically updates the generated config when an unknown import path is used during start (default: true).',\n default: true,\n } as Feature,\n\n /** Disables the generation of source-maps during build. */\n disableSourceMaps: { description: 'Disables the generation of source-maps during build.' } as Feature,\n\n /** Enabled cloud-hosted application */\n enableCloudHosted: { description: 'Enables cloud-hosted application.' } as Feature,\n\n /**\n * Enables support of import maps for workers.\n * To use this feature, the package with the worker must be bundled with webpack (default: true).\n */\n enableModuleWorkers: {\n description:\n 'Enables support of import maps for workers. To use this feature, the package with the worker must be bundled with webpack (default: true).',\n default: true,\n } as Feature,\n\n /**\n * Enables downloading bundles from remote cache instead of bundling.\n */\n enableRemoteCacheDownloads: {\n description: 'Enables downloading bundles from remote cache instead of bundling.',\n } as Feature,\n\n /** Enables server-side rendering (SSR) for the application. This is experimental and may not work in all cases. */\n enableSSR: {\n description:\n 'Enables server-side rendering (SSR) for the application. This is experimental and may not work in all cases.',\n } as Feature,\n\n /** Enables the file watcher to be spawned in a forked process (default: true). */\n enableWatcherInFork: {\n description: 'Enables the file watcher to be spawned in a forked process (default: true).',\n default: true,\n } as Feature,\n\n /** Enables the preemptive enqueueing of dependencies during build. */\n enqueueDependencies: { description: 'Enables the preemptive enqueueing of dependencies during build.' } as Feature,\n\n /** Check for dynamic (async) imports with non-literal paths in bundle output during init. */\n evaluateDynamicImports: {\n description: 'Check for dynamic (async) imports with non-literal paths in bundle output during init.',\n } as Feature,\n\n /**\n * Excludes unused dependencies in the generated config during an init run.\n * This helps trim the dependency graph, reduce the import map, and speed up performance.\n */\n optimizeDependencies: {\n description:\n // breaking up this string causes an exception in ts-json-schema-generator\n 'Excludes unused dependencies in the generated config during an init run. This helps trim the dependency graph, reduce the import map, and speed up performance.',\n } as Feature,\n\n /** Enables relative resource paths to be used in import map paths when useSingleWebServer is true. (default: true) */\n relativeImportMapPaths: {\n description:\n 'Enables relative resource paths to be used in import map paths when useSingleWebServer is true. (default: true)',\n default: true,\n } as Feature,\n\n /** Creates null entries for unused exports in generated config so that they are not included when bundling. */\n removeUnusedExports: {\n description:\n 'Creates null entries for unused exports in generated config so that they are not included when bundling.',\n } as Feature,\n\n /** @deprecated Removed in favor of `resolve-web-extensions` bundler capability. Enables React Native type resolution of .web.ts extensions. */\n resolveWebExtensions: { description: 'Enables React Native type resolution of .web.ts extensions.' } as Feature,\n\n /** Enables the syncing of bundles. */\n syncBundles: { description: 'Enables the syncing of bundles.' } as Feature,\n\n /** Enables the syncing of internal packages. */\n syncInternalPackages: { description: 'Enables the syncing of internal packages.' } as Feature,\n\n /** Use a single server for both bundles and app assets (default: true). */\n useSingleWebServer: {\n description: 'Use a single server for both bundles and app assets (default: true).',\n default: true,\n } as Feature,\n\n /** Enables the verification of exports during init. */\n verifyExports: { description: 'Enables the verification of exports during init.' } as Feature,\n\n // Please add new features in alphabetical order!\n // Don't forget to add them to the doc site as well!\n};\n\n/**\n * Record of features that are enabled by default.\n */\nexport const defaultFeatures = Object.fromEntries(\n Object.entries(allFeatures)\n .filter(([_, feature]) => feature.default)\n .map(([name]) => [name, true]),\n) as Features;\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { allFeatures } from './allFeatures.js';
|
|
1
|
+
export { allFeatures, defaultFeatures, type Features } from './allFeatures.js';
|
|
2
2
|
export type { GetPackageDefinitionOptions, PackageDefinitionTransform, PackageDefinitionTransformFactory, PackageDefinitionsCache, PackageImporterContext, SerializablePackageDefinitionsCache, } from './PackageDefinitionsCache.js';
|
|
3
3
|
export type { LiteralOrString, PackageJson, PackageJsonCloudpackMeta, PackageJsonDependencies, PackageJsonExportCondition, PackageJsonExports, PackageJsonExportsObject, GeneratedExports, PackageJsonExportsValue, } from './PackageJson.js';
|
|
4
4
|
export type { BundleContext } from './BundleContext.js';
|
|
@@ -15,7 +15,6 @@ export type { CloudpackConfig, CloudpackLinkConfig } from './CloudpackConfig.js'
|
|
|
15
15
|
export type { ServerConfig } from './ServerConfig.js';
|
|
16
16
|
export type { ExpandedSourcePath } from './ExpandedSourcePath.js';
|
|
17
17
|
export type { Feature } from './Feature.js';
|
|
18
|
-
export type { Features } from './Features.js';
|
|
19
18
|
export type { GeneratedConfig } from './GeneratedConfig.js';
|
|
20
19
|
export type { HttpsConfig } from './HttpsConfig.js';
|
|
21
20
|
export type { LinkOptions } from './LinkOptions.js';
|
package/lib/index.d.ts.map
CHANGED
|
@@ -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/
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,C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AAsB,CAAC;AAC5D,YAAY,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { allFeatures } from './allFeatures.js';
|
|
1
|
+
export { allFeatures, defaultFeatures } from './allFeatures.js';
|
|
2
2
|
export { isBootstrapRoute, isProxyRoute, isRenderedRoute, isStaticRoute, isRedirectRoute, isShorthandBootstrapRoute, isShorthandRenderedRoute, } 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;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAiB,MAAM,kBAAkB,CAAC;AA0D/E,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,aAAa,EACb,eAAe,EACf,yBAAyB,EACzB,wBAAwB,GACzB,MAAM,YAAY,CAAC","sourcesContent":["export { allFeatures, defaultFeatures, type Features } from './allFeatures.js';\nexport type {\n GetPackageDefinitionOptions,\n PackageDefinitionTransform,\n PackageDefinitionTransformFactory,\n PackageDefinitionsCache,\n PackageImporterContext,\n SerializablePackageDefinitionsCache,\n} from './PackageDefinitionsCache.js';\nexport type {\n LiteralOrString,\n PackageJson,\n PackageJsonCloudpackMeta,\n PackageJsonDependencies,\n PackageJsonExportCondition,\n PackageJsonExports,\n PackageJsonExportsObject,\n GeneratedExports,\n PackageJsonExportsValue,\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 { BundlerResult } from './BundlerResult.js';\nexport type { Bundler } from './Bundler.js';\nexport type { CloudpackConfig, CloudpackLinkConfig } from './CloudpackConfig.js';\nexport type { ServerConfig } from './ServerConfig.js';\nexport type { ExpandedSourcePath } from './ExpandedSourcePath.js';\nexport type { Feature } from './Feature.js';\nexport type { GeneratedConfig } from './GeneratedConfig.js';\nexport type { HttpsConfig } from './HttpsConfig.js';\nexport type { LinkOptions } from './LinkOptions.js';\nexport type { ModuleType } from './ModuleType.js';\nexport type { PackageHashesCache, PackageHashOptions, SerializablePackageHashesCache } from './PackageHashesCache.js';\nexport type {\n PackageSettings,\n PackageSettingsMatch,\n PackageSettingsMatchObject,\n GeneratedPackageSettings,\n} from './PackageSettings.js';\nexport type {\n BootstrapRoute,\n ProxyRoute,\n RedirectRoute,\n RenderedRoute,\n Route,\n RouteMatch,\n SharedRouteOptions,\n ShorthandRenderedRoute,\n ShorthandBootstrapRoute,\n ShorthandRoute,\n StaticRoute,\n} from './Route.js';\nexport {\n isBootstrapRoute,\n isProxyRoute,\n isRenderedRoute,\n isStaticRoute,\n isRedirectRoute,\n isShorthandBootstrapRoute,\n isShorthandRenderedRoute,\n} from './Route.js';\nexport type { TelemetryConfig } from './TelemetryConfig.js';\nexport type { AppConfig } from './AppConfig.js';\nexport type {\n BundlerCapability,\n InternalBundlerCapabilityImplementations,\n InternalBundlerCapabilitiesMetaData,\n BundlerCapabilitiesOptions,\n ExternalBundlerCapabilityModule,\n BundlerCapabilityFunction,\n} from './BundlerCapability.js';\nexport type { RemoteCacheConfig } from './RemoteCacheConfig.js';\nexport type {\n RenderFunction,\n RenderFunctionOptions,\n RenderFunctionResult,\n ServerRenderFunctionOptions,\n ExpandedRenderFunctionResult,\n RenderFunctionScript,\n} from './RenderFunction.js';\nexport type { Request, Response, RequestHandler } from 'express';\nexport type { Session } from './Session.js';\nexport type { ResolveMap } from './ResolveMap.js';\nexport type { ResolveMapEntry } from './ResolveMapEntry.js';\nexport type { LinkedPath } from './LinkedPath.js';\nexport type { ImportMap } from './ImportMap.js';\nexport type { UserPreferences } from './UserPreferences.js';\nexport type { TargetEnvironment } from './TargetEnvironment.js';\nexport type { NestedPartial } from './NestedPartial.js';\nexport type { WithOptional } from './WithOptional.js';\nexport type { WithRequired } from './WithRequired.js';\n"]}
|
package/package.json
CHANGED
package/schema/AppConfig.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
],
|
|
17
|
-
"description": "Extend the configuration from another file: either an import path or a relative path (resolved from the config file's location).\n\nIf an array, later files will take precedence when merging. (The
|
|
17
|
+
"description": "Extend the configuration from another file: either an import path or a relative path (resolved from the config file's location). Relative paths or deep imports into another package (without an exports map) must include the file extension.\n\nIf an array, later files will take precedence when merging. (The current file's config always takes precedence over any extended config.)\n\nConfig merging approach:\n- Objects will be deeply merged.\n- Primitive values will be overwritten.\n- Arrays will be overwritten, EXCEPT for `packageSettings`, which will be concatenated."
|
|
18
18
|
},
|
|
19
19
|
"devServer": {
|
|
20
20
|
"$ref": "#/definitions/ServerConfig",
|
|
@@ -819,9 +819,6 @@
|
|
|
819
819
|
"disableSourceMaps": {
|
|
820
820
|
"type": "boolean"
|
|
821
821
|
},
|
|
822
|
-
"enableSSR": {
|
|
823
|
-
"type": "boolean"
|
|
824
|
-
},
|
|
825
822
|
"enableCloudHosted": {
|
|
826
823
|
"type": "boolean"
|
|
827
824
|
},
|
|
@@ -831,6 +828,9 @@
|
|
|
831
828
|
"enableRemoteCacheDownloads": {
|
|
832
829
|
"type": "boolean"
|
|
833
830
|
},
|
|
831
|
+
"enableSSR": {
|
|
832
|
+
"type": "boolean"
|
|
833
|
+
},
|
|
834
834
|
"enableWatcherInFork": {
|
|
835
835
|
"type": "boolean"
|
|
836
836
|
},
|
|
@@ -840,10 +840,10 @@
|
|
|
840
840
|
"evaluateDynamicImports": {
|
|
841
841
|
"type": "boolean"
|
|
842
842
|
},
|
|
843
|
-
"
|
|
843
|
+
"optimizeDependencies": {
|
|
844
844
|
"type": "boolean"
|
|
845
845
|
},
|
|
846
|
-
"
|
|
846
|
+
"relativeImportMapPaths": {
|
|
847
847
|
"type": "boolean"
|
|
848
848
|
},
|
|
849
849
|
"removeUnusedExports": {
|
|
@@ -908,7 +908,7 @@
|
|
|
908
908
|
},
|
|
909
909
|
"exports": {
|
|
910
910
|
"$ref": "#/definitions/PackageJsonExports",
|
|
911
|
-
"description": "Use this exports map instead of the original entry points from package.json. (Any Cloudpack- generated exports will be merged.) This is useful if a library's exports map is missing or broken, or to skip bundling entries which aren't needed at runtime."
|
|
911
|
+
"description": "Use this exports map instead of the original entry points from package.json. (Any Cloudpack- generated exports will be merged.) This is useful if a library's exports map is missing or broken, or to skip bundling entries which aren't needed at runtime.\n\nGenerally, keys should be relative import paths starting with ./ (use . for the top-level import). Other standard exports map syntax (such as conditions) is also supported. For example: ```json { \".\": \"./lib/index.js\", \"./foo\": \"./lib/foo.js\", } ```"
|
|
912
912
|
},
|
|
913
913
|
"unsafeCjsExportNames": {
|
|
914
914
|
"anyOf": [
|
package/schema/UserConfig.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
],
|
|
21
|
-
"description": "Extend the configuration from another file: either an import path or a relative path (resolved from the config file's location).\n\nIf an array, later files will take precedence when merging. (The
|
|
21
|
+
"description": "Extend the configuration from another file: either an import path or a relative path (resolved from the config file's location). Relative paths or deep imports into another package (without an exports map) must include the file extension.\n\nIf an array, later files will take precedence when merging. (The current file's config always takes precedence over any extended config.)\n\nConfig merging approach:\n- Objects will be deeply merged.\n- Primitive values will be overwritten.\n- Arrays will be overwritten, EXCEPT for `packageSettings`, which will be concatenated."
|
|
22
22
|
},
|
|
23
23
|
"devServer": {
|
|
24
24
|
"$ref": "#/definitions/ServerConfig",
|
|
@@ -820,9 +820,6 @@
|
|
|
820
820
|
"disableSourceMaps": {
|
|
821
821
|
"type": "boolean"
|
|
822
822
|
},
|
|
823
|
-
"enableSSR": {
|
|
824
|
-
"type": "boolean"
|
|
825
|
-
},
|
|
826
823
|
"enableCloudHosted": {
|
|
827
824
|
"type": "boolean"
|
|
828
825
|
},
|
|
@@ -832,6 +829,9 @@
|
|
|
832
829
|
"enableRemoteCacheDownloads": {
|
|
833
830
|
"type": "boolean"
|
|
834
831
|
},
|
|
832
|
+
"enableSSR": {
|
|
833
|
+
"type": "boolean"
|
|
834
|
+
},
|
|
835
835
|
"enableWatcherInFork": {
|
|
836
836
|
"type": "boolean"
|
|
837
837
|
},
|
|
@@ -841,10 +841,10 @@
|
|
|
841
841
|
"evaluateDynamicImports": {
|
|
842
842
|
"type": "boolean"
|
|
843
843
|
},
|
|
844
|
-
"
|
|
844
|
+
"optimizeDependencies": {
|
|
845
845
|
"type": "boolean"
|
|
846
846
|
},
|
|
847
|
-
"
|
|
847
|
+
"relativeImportMapPaths": {
|
|
848
848
|
"type": "boolean"
|
|
849
849
|
},
|
|
850
850
|
"removeUnusedExports": {
|
|
@@ -909,7 +909,7 @@
|
|
|
909
909
|
},
|
|
910
910
|
"exports": {
|
|
911
911
|
"$ref": "#/definitions/PackageJsonExports",
|
|
912
|
-
"description": "Use this exports map instead of the original entry points from package.json. (Any Cloudpack- generated exports will be merged.) This is useful if a library's exports map is missing or broken, or to skip bundling entries which aren't needed at runtime."
|
|
912
|
+
"description": "Use this exports map instead of the original entry points from package.json. (Any Cloudpack- generated exports will be merged.) This is useful if a library's exports map is missing or broken, or to skip bundling entries which aren't needed at runtime.\n\nGenerally, keys should be relative import paths starting with ./ (use . for the top-level import). Other standard exports map syntax (such as conditions) is also supported. For example: ```json { \".\": \"./lib/index.js\", \"./foo\": \"./lib/foo.js\", } ```"
|
|
913
913
|
},
|
|
914
914
|
"unsafeCjsExportNames": {
|
|
915
915
|
"anyOf": [
|
package/lib/Features.d.ts
DELETED
package/lib/Features.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Features.d.ts","sourceRoot":"","sources":["../src/Features.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;KAAG,GAAG,IAAI,MAAM,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO;CAAE,CAAC"}
|
package/lib/Features.js
DELETED
package/lib/Features.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Features.js","sourceRoot":"","sources":["../src/Features.ts"],"names":[],"mappings":"","sourcesContent":["import type { allFeatures } from './allFeatures.js';\n\n/**\n * Represents all features that can be enabled or disabled for Cloudpack.\n */\nexport type Features = { [key in keyof typeof allFeatures]?: boolean };\n"]}
|