@ms-cloudpack/common-types 0.24.15 → 0.24.17
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/CloudpackConfig.d.ts +2 -0
- package/lib/CloudpackConfig.d.ts.map +1 -1
- package/lib/CloudpackConfig.js.map +1 -1
- package/lib/PackageJson.d.ts +44 -14
- package/lib/PackageJson.d.ts.map +1 -1
- package/lib/PackageJson.js.map +1 -1
- package/lib/PackageSettings.d.ts +1 -1
- package/lib/PackageSettings.js.map +1 -1
- package/lib/Session.d.ts +2 -0
- package/lib/Session.d.ts.map +1 -1
- package/lib/Session.js.map +1 -1
- package/lib/allFeatures.d.ts +1 -1
- package/lib/allFeatures.d.ts.map +1 -1
- package/lib/allFeatures.js +4 -2
- package/lib/allFeatures.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/package.json +2 -2
- package/schema/AppConfig.json +11 -1
- package/schema/UserConfig.json +11 -1
package/lib/CloudpackConfig.d.ts
CHANGED
|
@@ -43,4 +43,6 @@ export type CloudpackConfig = Omit<AppConfig, 'routes' | 'server' | 'bundlerCapa
|
|
|
43
43
|
*/
|
|
44
44
|
bundlerCapabilitiesRegistry?: Record<string, string>;
|
|
45
45
|
};
|
|
46
|
+
/** Only include the properties that are needed for the link config to allow for a smaller zod output schema. */
|
|
47
|
+
export type CloudpackLinkConfig = Pick<CloudpackConfig, 'generated' | 'packageSettings'>;
|
|
46
48
|
//# sourceMappingURL=CloudpackConfig.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CloudpackConfig.d.ts","sourceRoot":"","sources":["../src/CloudpackConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,UA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;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,MAAM,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IAEtC;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;IAEjB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,SAAS,EAAE,eAAe,CAAC;IAE3B;;OAEG;IACH,iBAAiB,CAAC,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAC;IAE9C;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;IAEjB;;;;OAIG;IACH,2BAA2B,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtD,CAAC;AAEF,gHAAgH;AAChH,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,eAAe,EAAE,WAAW,GAAG,iBAAiB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CloudpackConfig.js","sourceRoot":"","sources":["../src/CloudpackConfig.ts"],"names":[],"mappings":"","sourcesContent":["import type { GeneratedConfig } from './GeneratedConfig.js';\nimport type { AppConfig } from './AppConfig.js';\nimport type { BundleMode } from './BundleMode.js';\nimport type { Route } from './Route.js';\nimport type { ServerConfig } from './ServerConfig.js';\n\n/**\n * The merged result of user-provided and generated configuration for Cloudpack.\n */\n\nexport type CloudpackConfig = Omit<AppConfig, 'routes' | 'server' | 'bundlerCapabilitiesRegistry'> & {\n /**\n * The path to the app's package.\n */\n appPath: string;\n\n /**\n * Dev server settings.\n */\n server?: Omit<ServerConfig, 'routes'>;\n\n /**\n * Mode to run the app in. This is set via the CLI and defaults to `'library'`.\n */\n mode: BundleMode;\n\n /**\n * If true, write `bundle-info.json`, `[bundler]-input.json`, and `[bundler]-output.json`\n * files to the output folder.\n */\n logBundleInfo?: boolean;\n\n /**\n * Generated config settings.\n */\n generated: GeneratedConfig;\n\n /**\n * An immutable snapshot of the generated config as it is when start or init commands first begin\n */\n generatedSnapshot?: Readonly<GeneratedConfig>;\n\n /**\n * Routes which have been expanded from shorthand entries.\n */\n routes?: Route[];\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 absolute file URL of the capability implementation (resolved by `readAppConfig`).\n */\n bundlerCapabilitiesRegistry?: Record<string, string>;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"CloudpackConfig.js","sourceRoot":"","sources":["../src/CloudpackConfig.ts"],"names":[],"mappings":"","sourcesContent":["import type { GeneratedConfig } from './GeneratedConfig.js';\nimport type { AppConfig } from './AppConfig.js';\nimport type { BundleMode } from './BundleMode.js';\nimport type { Route } from './Route.js';\nimport type { ServerConfig } from './ServerConfig.js';\n\n/**\n * The merged result of user-provided and generated configuration for Cloudpack.\n */\n\nexport type CloudpackConfig = Omit<AppConfig, 'routes' | 'server' | 'bundlerCapabilitiesRegistry'> & {\n /**\n * The path to the app's package.\n */\n appPath: string;\n\n /**\n * Dev server settings.\n */\n server?: Omit<ServerConfig, 'routes'>;\n\n /**\n * Mode to run the app in. This is set via the CLI and defaults to `'library'`.\n */\n mode: BundleMode;\n\n /**\n * If true, write `bundle-info.json`, `[bundler]-input.json`, and `[bundler]-output.json`\n * files to the output folder.\n */\n logBundleInfo?: boolean;\n\n /**\n * Generated config settings.\n */\n generated: GeneratedConfig;\n\n /**\n * An immutable snapshot of the generated config as it is when start or init commands first begin\n */\n generatedSnapshot?: Readonly<GeneratedConfig>;\n\n /**\n * Routes which have been expanded from shorthand entries.\n */\n routes?: Route[];\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 absolute file URL of the capability implementation (resolved by `readAppConfig`).\n */\n bundlerCapabilitiesRegistry?: Record<string, string>;\n};\n\n/** Only include the properties that are needed for the link config to allow for a smaller zod output schema. */\nexport type CloudpackLinkConfig = Pick<CloudpackConfig, 'generated' | 'packageSettings'>;\n"]}
|
package/lib/PackageJson.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import type { PackageSettings } from './PackageSettings.js';
|
|
|
6
6
|
* This version intentionally does not permit arbitrary keys, and only includes properties that are
|
|
7
7
|
* used by Cloudpack. Additional properties can be added as needed.
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
9
|
+
export interface PackageJson {
|
|
10
10
|
/**
|
|
11
11
|
* The name of the package. This is always set when reading via `PackageDefinitions`, but might be
|
|
12
12
|
* missing if reading package.json directly.
|
|
@@ -27,41 +27,71 @@ export type PackageJson = {
|
|
|
27
27
|
module?: string;
|
|
28
28
|
/** A hint to JavaScript bundlers or component tools when packaging modules for client side use. */
|
|
29
29
|
browser?: string | Partial<Record<string, string | false>>;
|
|
30
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* Subpath exports to define entry points of the package. https://nodejs.org/api/packages.html#subpath-exports
|
|
32
|
+
*
|
|
33
|
+
* In most of Cloudpack, this will be the computed exports map from `createPackageSettingsTransform`.
|
|
34
|
+
* This may incorporate user settings, generated settings, and either the original exports
|
|
35
|
+
* (if present) or exports calculated from other entry points.
|
|
36
|
+
*
|
|
37
|
+
* (Exception: this will be the original exports when running tests within `package-utilities`
|
|
38
|
+
* or with manually-constructed `PackageDefinitions`, instead of `createPackageDefinitions`.)
|
|
39
|
+
*/
|
|
31
40
|
exports?: PackageJsonExports;
|
|
32
|
-
/**
|
|
41
|
+
/**
|
|
42
|
+
* Dependencies that will be installed when the package is consumed.
|
|
43
|
+
*
|
|
44
|
+
* When read via `PackageDefinitions`, any `@types` will be removed from this list.
|
|
45
|
+
* In most of Cloudpack, this is also updated by `createPackageSettingsTransform` to incorporate
|
|
46
|
+
* included and excluded dependencies from the user and generated configs.
|
|
47
|
+
*/
|
|
33
48
|
dependencies?: PackageJsonDependencies;
|
|
34
|
-
/**
|
|
35
|
-
|
|
36
|
-
|
|
49
|
+
/**
|
|
50
|
+
* Dependencies that must be installed alongside this package when consumed.
|
|
51
|
+
*
|
|
52
|
+
* When read via `PackageDefinitions`, any `@types` will be removed from this list.
|
|
53
|
+
* In most of Cloudpack, this is also updated by `createPackageSettingsTransform` to incorporate
|
|
54
|
+
* excluded dependencies from the user and generated configs.
|
|
55
|
+
*/
|
|
37
56
|
peerDependencies?: PackageJsonDependencies;
|
|
38
57
|
/** Indicates which peer dependencies are optional. */
|
|
39
58
|
peerDependenciesMeta?: Partial<Record<string, {
|
|
40
59
|
optional: true;
|
|
41
60
|
}>>;
|
|
61
|
+
/**
|
|
62
|
+
* Dependencies for local development only.
|
|
63
|
+
*
|
|
64
|
+
* When read via `PackageDefinitions`, any `@types` will be removed from this list.
|
|
65
|
+
* In most of Cloudpack, this may also be updated by `createPackageSettingsTransform`.
|
|
66
|
+
*/
|
|
67
|
+
devDependencies?: PackageJsonDependencies;
|
|
68
|
+
/**
|
|
69
|
+
* Optional dependencies.
|
|
70
|
+
* When read via `PackageDefinitions`, any `@types` will be removed from this list.
|
|
71
|
+
*/
|
|
42
72
|
optionalDependencies?: PackageJsonDependencies;
|
|
43
73
|
bundledDependencies?: PackageJsonDependencies | string[];
|
|
44
74
|
bundleDependencies?: PackageJsonDependencies | string[];
|
|
45
75
|
resolutions?: PackageJsonDependencies;
|
|
46
76
|
/**
|
|
47
|
-
* Cached
|
|
48
|
-
* fully handled by `createPackageSettingsTransform`), plus other info.
|
|
77
|
+
* Cached merged package settings (user and generated) for this package (excluding properties
|
|
78
|
+
* that are fully handled by `createPackageSettingsTransform`), plus other info.
|
|
49
79
|
*
|
|
50
80
|
* This can be used while bundling for cached access to package settings.
|
|
51
81
|
* It's also used for calculating the hash in `getPackageHashEntries`.
|
|
52
82
|
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* analysis due to generated settings updates, we refresh the
|
|
56
|
-
* cached setting. So it's safe to use
|
|
83
|
+
* The package settings properties cached here should NOT be used during init's analysis of the
|
|
84
|
+
* bundle result, since they might be outdated due to pending generated settings updates.
|
|
85
|
+
* (If a package is re-enqueued after analysis due to generated settings updates, we refresh the
|
|
86
|
+
* definition, which updates these cached setting. So it's safe to use on the next bundle attempt.)
|
|
57
87
|
*/
|
|
58
88
|
cloudpack?: PackageJsonCloudpackMeta;
|
|
59
|
-
}
|
|
89
|
+
}
|
|
60
90
|
/**
|
|
61
91
|
* Cached merged package settings (user and generated) for this package (excluding properties
|
|
62
92
|
* that are fully handled by `createPackageSettingsTransform`), plus other info.
|
|
63
93
|
*
|
|
64
|
-
* See `PackageJson.cloudpack` for details of
|
|
94
|
+
* See `PackageJson.cloudpack` for details of how this is set and when it's safe to use.
|
|
65
95
|
*/
|
|
66
96
|
export interface PackageJsonCloudpackMeta extends Omit<PackageSettings, 'match' | 'exports' | 'includedDependencies' | 'excludedDependencies' | 'bundlerType'> {
|
|
67
97
|
/** Controls how the package is bundled. */
|
package/lib/PackageJson.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PackageJson.d.ts","sourceRoot":"","sources":["../src/PackageJson.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;;;;GAKG;AAOH,MAAM,
|
|
1
|
+
{"version":3,"file":"PackageJson.d.ts","sourceRoot":"","sources":["../src/PackageJson.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;;;;GAKG;AAOH,MAAM,WAAW,WAAW;IAC1B;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb,oCAAoC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAYhB,2I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AW,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;AAEF,gHAAgH;AAChH,MAAM,MAAM,kBAAkB,GAAG,uBAAuB,GAAG,wBAAwB,GAAG,kBAAkB,EAAE,CAAC;AAE3G;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,CAAC,IAAI,EAAE,MAAM,GACT,MAAM,GACN,IAAI,GACJ;QACE,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG;YAAE,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;SAAE,CAAC;KAChE,CAAC;CACP,CAAC;AAOF,mDAAmD;AACnD,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC"}
|
package/lib/PackageJson.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PackageJson.js","sourceRoot":"","sources":["../src/PackageJson.ts"],"names":[],"mappings":"","sourcesContent":["import type { BundleMode } from './BundleMode.js';\nimport 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 only includes properties that are\n * used by Cloudpack. Additional properties can be added as needed.\n */\n//\n// NOTE: Some of the known properties not currently used by Cloudpack are commented out, but\n// preserved in the file for future typing reference.\n//\n// If adding or uncommenting a property, you'll also need to update PackageDefinitions copyPackageJsonKeys.\n//\nexport type PackageJson = {\n /**\n * The name of the package. This is always set when reading via `PackageDefinitions`, but might be\n * missing if reading package.json directly.\n */\n name: string;\n\n /** A description of the package. */\n description?: string;\n\n /**\n * Package semantic version. This is always set when reading via `PackageDefinitions`, but might be\n * missing if reading package.json directly.\n */\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 // /** If `true`, this package cannot be published. */\n // private?: boolean;\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 // /** 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 (excluding properties that are\n * fully handled by `createPackageSettingsTransform`), plus other info.\n *\n * This can be used while bundling for cached access to package settings.\n * It's also used for calculating the hash in `getPackageHashEntries`.\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?: PackageJsonCloudpackMeta;\n};\n\n/**\n * Cached merged package settings (user and generated) for this package (excluding properties\n * that are fully handled by `createPackageSettingsTransform`), plus other info.\n *\n * See `PackageJson.cloudpack` for details of when this can be used.\n */\nexport interface PackageJsonCloudpackMeta\n extends Omit<\n PackageSettings,\n | 'match'\n | 'exports'\n | 'includedDependencies'\n | 'excludedDependencies'\n // this is deprecated\n | 'bundlerType'\n > {\n /** Controls how the package is bundled. */\n mode: BundleMode;\n\n /**\n * If the package manager is yarn berry (v2+) and the package has been patched with `yarn patch`,\n * this is the path to the patch file relative to the project root (set by `getNonSemverTransform`).\n */\n patchFilePath?: 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\n/** Entry points of a package, optionally with conditions and subpath exports. Used as `PackageJson.exports`. */\nexport type PackageJsonExports = PackageJsonExportsValue | PackageJsonExportsObject | PackageJsonExports[];\n\n/**\n * Mapping from import path to either file path, or a nested object of conditions to file paths\n * (occasionally with two levels of conditions). This is the format used for generated exports maps.\n */\nexport type GeneratedExports = {\n [path: string]:\n | string\n | null\n | {\n [condition: string]: string | { [condition2: string]: string };\n };\n};\n\n// /** Import map entries of a module, optionally with conditions. */\n// export 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 { BundleMode } from './BundleMode.js';\nimport 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 only includes properties that are\n * used by Cloudpack. Additional properties can be added as needed.\n */\n//\n// NOTE: Some of the known properties not currently used by Cloudpack are commented out, but\n// preserved in the file for future typing reference.\n//\n// If adding or uncommenting a property, you'll also need to update PackageDefinitions copyPackageJsonKeys.\n//\nexport interface PackageJson {\n /**\n * The name of the package. This is always set when reading via `PackageDefinitions`, but might be\n * missing if reading package.json directly.\n */\n name: string;\n\n /** A description of the package. */\n description?: string;\n\n /**\n * Package semantic version. This is always set when reading via `PackageDefinitions`, but might be\n * missing if reading package.json directly.\n */\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 /**\n * Subpath exports to define entry points of the package. https://nodejs.org/api/packages.html#subpath-exports\n *\n * In most of Cloudpack, this will be the computed exports map from `createPackageSettingsTransform`.\n * This may incorporate user settings, generated settings, and either the original exports\n * (if present) or exports calculated from other entry points.\n *\n * (Exception: this will be the original exports when running tests within `package-utilities`\n * or with manually-constructed `PackageDefinitions`, instead of `createPackageDefinitions`.)\n */\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 /**\n * Dependencies that will be installed when the package is consumed.\n *\n * When read via `PackageDefinitions`, any `@types` will be removed from this list.\n * In most of Cloudpack, this is also updated by `createPackageSettingsTransform` to incorporate\n * included and excluded dependencies from the user and generated configs.\n */\n dependencies?: PackageJsonDependencies;\n\n /**\n * Dependencies that must be installed alongside this package when consumed.\n *\n * When read via `PackageDefinitions`, any `@types` will be removed from this list.\n * In most of Cloudpack, this is also updated by `createPackageSettingsTransform` to incorporate\n * excluded dependencies from the user and generated configs.\n */\n peerDependencies?: PackageJsonDependencies;\n\n /** Indicates which peer dependencies are optional. */\n peerDependenciesMeta?: Partial<Record<string, { optional: true }>>;\n\n /**\n * Dependencies for local development only.\n *\n * When read via `PackageDefinitions`, any `@types` will be removed from this list.\n * In most of Cloudpack, this may also be updated by `createPackageSettingsTransform`.\n */\n devDependencies?: PackageJsonDependencies;\n\n /**\n * Optional dependencies.\n * When read via `PackageDefinitions`, any `@types` will be removed from this list.\n */\n optionalDependencies?: PackageJsonDependencies;\n\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 // /** If `true`, this package cannot be published. */\n // private?: boolean;\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 // /** 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 merged package settings (user and generated) for this package (excluding properties\n * that are fully handled by `createPackageSettingsTransform`), plus other info.\n *\n * This can be used while bundling for cached access to package settings.\n * It's also used for calculating the hash in `getPackageHashEntries`.\n *\n * The package settings properties cached here should NOT be used during init's analysis of the\n * bundle result, since they might be outdated due to pending generated settings updates.\n * (If a package is re-enqueued after analysis due to generated settings updates, we refresh the\n * definition, which updates these cached setting. So it's safe to use on the next bundle attempt.)\n */\n cloudpack?: PackageJsonCloudpackMeta;\n}\n\n/**\n * Cached merged package settings (user and generated) for this package (excluding properties\n * that are fully handled by `createPackageSettingsTransform`), plus other info.\n *\n * See `PackageJson.cloudpack` for details of how this is set and when it's safe to use.\n */\nexport interface PackageJsonCloudpackMeta\n extends Omit<\n PackageSettings,\n | 'match'\n | 'exports'\n | 'includedDependencies'\n | 'excludedDependencies'\n // this is deprecated\n | 'bundlerType'\n > {\n /** Controls how the package is bundled. */\n mode: BundleMode;\n\n /**\n * If the package manager is yarn berry (v2+) and the package has been patched with `yarn patch`,\n * this is the path to the patch file relative to the project root (set by `getNonSemverTransform`).\n */\n patchFilePath?: 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\n/** Entry points of a package, optionally with conditions and subpath exports. Used as `PackageJson.exports`. */\nexport type PackageJsonExports = PackageJsonExportsValue | PackageJsonExportsObject | PackageJsonExports[];\n\n/**\n * Mapping from import path to either file path, or a nested object of conditions to file paths\n * (occasionally with two levels of conditions). This is the format used for generated exports maps.\n */\nexport type GeneratedExports = {\n [path: string]:\n | string\n | null\n | {\n [condition: string]: string | { [condition2: string]: string };\n };\n};\n\n// /** Import map entries of a module, optionally with conditions. */\n// export 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"]}
|
package/lib/PackageSettings.d.ts
CHANGED
|
@@ -90,7 +90,7 @@ export interface PackageSettings {
|
|
|
90
90
|
bundlerOptions?: Record<string, unknown>;
|
|
91
91
|
/**
|
|
92
92
|
* Paths used for file monitoring and input hashing. Supports glob matching.
|
|
93
|
-
* Defaults
|
|
93
|
+
* Defaults are under "@ms-cloudpack/path-utilities" in `sourceFilesGlobs`.
|
|
94
94
|
* Use `...` to include the default paths.
|
|
95
95
|
*/
|
|
96
96
|
inputPaths?: string[];
|
|
@@ -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 exports 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 */\n unsafeCjsExportNames?: { [exportsKey: string]: string[] };\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
|
|
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 exports 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 */\n unsafeCjsExportNames?: { [exportsKey: string]: string[] };\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/Session.d.ts
CHANGED
|
@@ -31,6 +31,8 @@ export interface Session {
|
|
|
31
31
|
/** If `useSingleWebServer` is enabled, this will be a URL for bundles under the app server. */
|
|
32
32
|
bundleServer?: string;
|
|
33
33
|
apiServer?: string;
|
|
34
|
+
/** Api server urls only used for linking */
|
|
35
|
+
hostApiServer?: string[];
|
|
34
36
|
};
|
|
35
37
|
/**
|
|
36
38
|
* Used to force a hard refresh on the client.
|
package/lib/Session.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Session.d.ts","sourceRoot":"","sources":["../src/Session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,MAAM,EAAE,eAAe,CAAC;IAExB;;;;;OAKG;IACH,UAAU,EAAE,UAAU,CAAC;IAEvB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,IAAI,EAAE;QACJ,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,+FAA+F;QAC/F,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,SAAS,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"Session.d.ts","sourceRoot":"","sources":["../src/Session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,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,EAAE,UAAU,EAAE,CAAA;KAAE,CAAC,CAAC;IAE7G;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
package/lib/Session.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Session.js","sourceRoot":"","sources":["../src/Session.ts"],"names":[],"mappings":"","sourcesContent":["import type { ImportMap } from './ImportMap.js';\nimport type { LinkedPath } from './LinkedPath.js';\nimport type { ResolveMap } from './ResolveMap.js';\nimport type { CloudpackConfig } from './CloudpackConfig.js';\n\nexport interface Session {\n /**\n * UUID for the session.\n */\n id: string;\n\n /**\n * The config used by the session.\n */\n config: CloudpackConfig;\n\n /**\n * Used to resolve packages in the dependency graph.\n *\n * NOTE: If the session (or whole API context) was created with `skipResolveDependencies`,\n * this will only contain the entry point package(s).\n */\n resolveMap: ResolveMap;\n\n /**\n * Reload sequence to ensure that the client is always up to date with the latest changes.\n */\n sequence: number;\n\n /**\n * URLs of the active servers hosting this session.\n * Each URL will only be set after the server is started.\n */\n urls: {\n appServer?: string;\n /** If `useSingleWebServer` is enabled, this will be a URL for bundles under the app server. */\n bundleServer?: string;\n apiServer?: string;\n };\n\n /**\n * Used to force a hard refresh on the client.\n */\n sessionVersion: number;\n\n /**\n * Used to increment the session version by 1.\n */\n incrementSessionVersion: () => void;\n\n /**\n * The name of the project folder.\n * Used to differentiate between multiple projects.\n */\n projectName: string;\n\n /**\n * The version of each target.\n * Used to force a client cache refresh on a single target.\n */\n targetVersions: Record<string, number>;\n\n /**\n * Increments the version for the given target.\n */\n incrementTargetVersion: (inputPath: string) => void;\n\n /**\n * The current import map. This will only be set in contexts where an import map is needed,\n * such as during `cloudpack start` or for SSR.\n */\n importMap: ImportMap | undefined;\n\n /**\n * Cached mapping from absolute package path to all import paths for that package, calculated by\n * `createImportMap`. This is used by `addImportMapHash` to update the import map after bundling.\n * (Caching the import paths is useful for performance, as calculating them can be expensive.)\n * @example '/path/to/foo': `['foo', 'foo/bar']`\n */\n packageImportPaths: Map<string, string[]>;\n\n /**\n * Linked paths that are used to resolve packages from other repos.\n */\n linkedPaths: LinkedPath[];\n\n /**\n * Add the linked path and regenerates the resolve map.\n */\n addLinkedPath: (linkedPath: LinkedPath) => Promise<{ resolveMap: ResolveMap; linkedPaths: LinkedPath[] }>;\n\n /**\n * Remove the linked path and regenerates the resolve map.\n */\n removeLinkedPath: (linkedPath: LinkedPath) => Promise<{ resolveMap: ResolveMap; linkedPaths: LinkedPath[] }>;\n\n /**\n * The path to the cache folder for the session.\n */\n cachePath: string;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Session.js","sourceRoot":"","sources":["../src/Session.ts"],"names":[],"mappings":"","sourcesContent":["import type { ImportMap } from './ImportMap.js';\nimport type { LinkedPath } from './LinkedPath.js';\nimport type { ResolveMap } from './ResolveMap.js';\nimport type { CloudpackConfig } from './CloudpackConfig.js';\n\nexport interface Session {\n /**\n * UUID for the session.\n */\n id: string;\n\n /**\n * The config used by the session.\n */\n config: CloudpackConfig;\n\n /**\n * Used to resolve packages in the dependency graph.\n *\n * NOTE: If the session (or whole API context) was created with `skipResolveDependencies`,\n * this will only contain the entry point package(s).\n */\n resolveMap: ResolveMap;\n\n /**\n * Reload sequence to ensure that the client is always up to date with the latest changes.\n */\n sequence: number;\n\n /**\n * URLs of the active servers hosting this session.\n * Each URL will only be set after the server is started.\n */\n urls: {\n appServer?: string;\n /** If `useSingleWebServer` is enabled, this will be a URL for bundles under the app server. */\n bundleServer?: string;\n apiServer?: string;\n /** Api server urls only used for linking */\n hostApiServer?: string[];\n };\n\n /**\n * Used to force a hard refresh on the client.\n */\n sessionVersion: number;\n\n /**\n * Used to increment the session version by 1.\n */\n incrementSessionVersion: () => void;\n\n /**\n * The name of the project folder.\n * Used to differentiate between multiple projects.\n */\n projectName: string;\n\n /**\n * The version of each target.\n * Used to force a client cache refresh on a single target.\n */\n targetVersions: Record<string, number>;\n\n /**\n * Increments the version for the given target.\n */\n incrementTargetVersion: (inputPath: string) => void;\n\n /**\n * The current import map. This will only be set in contexts where an import map is needed,\n * such as during `cloudpack start` or for SSR.\n */\n importMap: ImportMap | undefined;\n\n /**\n * Cached mapping from absolute package path to all import paths for that package, calculated by\n * `createImportMap`. This is used by `addImportMapHash` to update the import map after bundling.\n * (Caching the import paths is useful for performance, as calculating them can be expensive.)\n * @example '/path/to/foo': `['foo', 'foo/bar']`\n */\n packageImportPaths: Map<string, string[]>;\n\n /**\n * Linked paths that are used to resolve packages from other repos.\n */\n linkedPaths: LinkedPath[];\n\n /**\n * Add the linked path and regenerates the resolve map.\n */\n addLinkedPath: (linkedPath: LinkedPath) => Promise<{ resolveMap: ResolveMap; linkedPaths: LinkedPath[] }>;\n\n /**\n * Remove the linked path and regenerates the resolve map.\n */\n removeLinkedPath: (linkedPath: LinkedPath) => Promise<{ resolveMap: ResolveMap; linkedPaths: LinkedPath[] }>;\n\n /**\n * The path to the cache folder for the session.\n */\n cachePath: string;\n}\n"]}
|
package/lib/allFeatures.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare const allFeatures: {
|
|
|
8
8
|
autoUpdateEntries: Feature;
|
|
9
9
|
/** Disables the generation of source-maps during build. */
|
|
10
10
|
disableSourceMaps: Feature;
|
|
11
|
-
/** Enables the file watcher to be spawned in a forked process. */
|
|
11
|
+
/** Enables the file watcher to be spawned in a forked process (default: true). */
|
|
12
12
|
enableWatcherInFork: Feature;
|
|
13
13
|
/** Enabled cloud-hosted application */
|
|
14
14
|
enableCloudHosted: Feature;
|
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,mGAAmG;uBAG9F,OAAO;IAEZ,2DAA2D;uBACmC,OAAO;IAErG,
|
|
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,mGAAmG;uBAG9F,OAAO;IAEZ,2DAA2D;uBACmC,OAAO;IAErG,mFAAmF;yBAG9E,OAAO;IAEZ,uCAAuC;uBACoC,OAAO;IAElF;;;OAGG;yBAIE,OAAO;IAEZ;;OAEG;gCAGE,OAAO;IAEZ,sGAAsG;4BAGjG,OAAO;IAEZ,sEAAsE;yBACqC,OAAO;IAElH,6FAA6F;4BAGxF,OAAO;IAEZ;;;OAGG;0BAKE,OAAO;IAEZ,+GAA+G;yBAI1G,OAAO;IAEZ,+IAA+I;0BACvC,OAAO;IAE/G,sCAAsC;iBAC6B,OAAO;IAE1E,gDAAgD;0BACsC,OAAO;IAE7F,2DAA2D;wBACoC,OAAO;IAEtG,uDAAuD;mBAC+B,OAAO;CAI9F,CAAC"}
|
package/lib/allFeatures.js
CHANGED
|
@@ -10,8 +10,10 @@ export const allFeatures = {
|
|
|
10
10
|
},
|
|
11
11
|
/** Disables the generation of source-maps during build. */
|
|
12
12
|
disableSourceMaps: { description: 'Disables the generation of source-maps during build.' },
|
|
13
|
-
/** Enables the file watcher to be spawned in a forked process. */
|
|
14
|
-
enableWatcherInFork: {
|
|
13
|
+
/** Enables the file watcher to be spawned in a forked process (default: true). */
|
|
14
|
+
enableWatcherInFork: {
|
|
15
|
+
description: 'Enables the file watcher to be spawned in a forked process (default: true).',
|
|
16
|
+
},
|
|
15
17
|
/** Enabled cloud-hosted application */
|
|
16
18
|
enableCloudHosted: { description: 'Enables cloud-hosted application.' },
|
|
17
19
|
/**
|
package/lib/allFeatures.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allFeatures.js","sourceRoot":"","sources":["../src/allFeatures.ts"],"names":[],"mappings":"AAEA;;;GA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iC,EAAa;IAE1E,gDAAgD;IAChD,oBAAoB,EAAE,EAAE,WAAW,EAAE,2CAA2C,EAAa;IAE7F,2DAA2D;IAC3D,kBAAkB,EAAE,EAAE,WAAW,EAAE,sDAAsD,EAAa;IAEtG,uDAAuD;IACvD,aAAa,EAAE,EAAE,WAAW,EAAE,kDAAkD,EAAa;IAE7F,iDAAiD;IACjD,oDAAoD;CACrD,CAAC","sourcesContent":["import type { Feature } from './Feature.js';\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. */\n autoUpdateEntries: {\n description: 'Automatically updates the generated config when an unknown import path is used during start.',\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 /** 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 } 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.\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.',\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 relative resource paths to be used in import map paths when useSingleWebServer is true. */\n relativeImportMapPaths: {\n description: 'Enables relative resource paths to be used in import map paths when useSingleWebServer is 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 /** 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. */\n useSingleWebServer: { description: 'Use a single server for both bundles and app assets.' } 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"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export type { BundleOutputFile } from './BundleOutputFile.js';
|
|
|
11
11
|
export type { BundleResult } from './BundleResult.js';
|
|
12
12
|
export type { BundlerResult } from './BundlerResult.js';
|
|
13
13
|
export type { Bundler } from './Bundler.js';
|
|
14
|
-
export type { CloudpackConfig } from './CloudpackConfig.js';
|
|
14
|
+
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';
|
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/C,YAAY,EACV,2BAA2B,EAC3B,0BAA0B,EAC1B,iCAAiC,EACjC,uBAAuB,EACvB,sBAAsB,EACtB,mCAAmC,GACpC,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,eAAe,EACf,WAAW,EACX,wBAAwB,EACxB,uBAAuB,EACvB,0BAA0B,EAC1B,kBAAkB,EAClB,wBAAwB,EACxB,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACxE,YAAY,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,YAAY,EACV,2BAA2B,EAC3B,0BAA0B,EAC1B,iCAAiC,EACjC,uBAAuB,EACvB,sBAAsB,EACtB,mCAAmC,GACpC,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,eAAe,EAC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YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC"}
|
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;AA2D/C,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,aAAa,EACb,eAAe,EACf,yBAAyB,EACzB,wBAAwB,GACzB,MAAM,YAAY,CAAC","sourcesContent":["export { allFeatures } 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 } from './CloudpackConfig.js';\nexport type { ServerConfig } from './ServerConfig.js';\nexport type { ExpandedSourcePath } from './ExpandedSourcePath.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 { 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 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"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AA2D/C,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,aAAa,EACb,eAAe,EACf,yBAAyB,EACzB,wBAAwB,GACzB,MAAM,YAAY,CAAC","sourcesContent":["export { allFeatures } 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 { Features } from './Features.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 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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/common-types",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.17",
|
|
4
4
|
"description": "Common types for Cloudpack.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@ms-cloudpack/common-types-browser": "^0.5.
|
|
17
|
+
"@ms-cloudpack/common-types-browser": "^0.5.6",
|
|
18
18
|
"@types/express": "^4.17.16"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
package/schema/AppConfig.json
CHANGED
|
@@ -420,6 +420,11 @@
|
|
|
420
420
|
"description": "Sets the interval value in milliseconds to check for request and headers timeout in incomplete requests.",
|
|
421
421
|
"default": 30000
|
|
422
422
|
},
|
|
423
|
+
"headersTimeout": {
|
|
424
|
+
"type": "number",
|
|
425
|
+
"description": "Sets the timeout value in milliseconds for receiving the complete HTTP headers from the client. See {@link Server.headersTimeout } for more information.",
|
|
426
|
+
"default": 60000
|
|
427
|
+
},
|
|
423
428
|
"insecureHTTPParser": {
|
|
424
429
|
"type": "boolean",
|
|
425
430
|
"description": "Use an insecure HTTP parser that accepts invalid HTTP headers when `true`. Using the insecure parser should be avoided. See --insecure-http-parser for more information.",
|
|
@@ -446,6 +451,11 @@
|
|
|
446
451
|
]
|
|
447
452
|
},
|
|
448
453
|
"description": "A list of response headers that should be sent only once. If the header's value is an array, the items will be joined using `; `."
|
|
454
|
+
},
|
|
455
|
+
"rejectNonStandardBodyWrites": {
|
|
456
|
+
"type": "boolean",
|
|
457
|
+
"description": "If set to `true`, an error is thrown when writing to an HTTP response which does not have a body.",
|
|
458
|
+
"default": false
|
|
449
459
|
}
|
|
450
460
|
},
|
|
451
461
|
"additionalProperties": false,
|
|
@@ -916,7 +926,7 @@
|
|
|
916
926
|
"items": {
|
|
917
927
|
"type": "string"
|
|
918
928
|
},
|
|
919
|
-
"description": "Paths used for file monitoring and input hashing. Supports glob matching. Defaults
|
|
929
|
+
"description": "Paths used for file monitoring and input hashing. Supports glob matching. Defaults are under \"@ms-cloudpack/path-utilities\" in `sourceFilesGlobs`. Use `...` to include the default paths."
|
|
920
930
|
},
|
|
921
931
|
"ignoreMissingExports": {
|
|
922
932
|
"anyOf": [
|
package/schema/UserConfig.json
CHANGED
|
@@ -421,6 +421,11 @@
|
|
|
421
421
|
"description": "Sets the interval value in milliseconds to check for request and headers timeout in incomplete requests.",
|
|
422
422
|
"default": 30000
|
|
423
423
|
},
|
|
424
|
+
"headersTimeout": {
|
|
425
|
+
"type": "number",
|
|
426
|
+
"description": "Sets the timeout value in milliseconds for receiving the complete HTTP headers from the client. See {@link Server.headersTimeout } for more information.",
|
|
427
|
+
"default": 60000
|
|
428
|
+
},
|
|
424
429
|
"insecureHTTPParser": {
|
|
425
430
|
"type": "boolean",
|
|
426
431
|
"description": "Use an insecure HTTP parser that accepts invalid HTTP headers when `true`. Using the insecure parser should be avoided. See --insecure-http-parser for more information.",
|
|
@@ -447,6 +452,11 @@
|
|
|
447
452
|
]
|
|
448
453
|
},
|
|
449
454
|
"description": "A list of response headers that should be sent only once. If the header's value is an array, the items will be joined using `; `."
|
|
455
|
+
},
|
|
456
|
+
"rejectNonStandardBodyWrites": {
|
|
457
|
+
"type": "boolean",
|
|
458
|
+
"description": "If set to `true`, an error is thrown when writing to an HTTP response which does not have a body.",
|
|
459
|
+
"default": false
|
|
450
460
|
}
|
|
451
461
|
},
|
|
452
462
|
"additionalProperties": false,
|
|
@@ -917,7 +927,7 @@
|
|
|
917
927
|
"items": {
|
|
918
928
|
"type": "string"
|
|
919
929
|
},
|
|
920
|
-
"description": "Paths used for file monitoring and input hashing. Supports glob matching. Defaults
|
|
930
|
+
"description": "Paths used for file monitoring and input hashing. Supports glob matching. Defaults are under \"@ms-cloudpack/path-utilities\" in `sourceFilesGlobs`. Use `...` to include the default paths."
|
|
921
931
|
},
|
|
922
932
|
"ignoreMissingExports": {
|
|
923
933
|
"anyOf": [
|