@ms-cloudpack/common-types 0.24.10 → 0.24.12
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 +8 -0
- package/lib/AppConfig.d.ts.map +1 -1
- package/lib/AppConfig.js.map +1 -1
- package/lib/PackageJson.d.ts +5 -0
- package/lib/PackageJson.d.ts.map +1 -1
- package/lib/PackageJson.js.map +1 -1
- package/lib/RenderFunction.d.ts +4 -4
- package/lib/RenderFunction.js.map +1 -1
- package/lib/Route.d.ts +11 -5
- package/lib/Route.d.ts.map +1 -1
- package/lib/Route.js +1 -0
- package/lib/Route.js.map +1 -1
- package/package.json +2 -2
- package/schema/AppConfig.json +36 -4
- package/schema/UserConfig.json +36 -4
package/lib/AppConfig.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import type { PackageSettings } from './PackageSettings.js';
|
|
|
4
4
|
import type { RemoteCacheConfig } from './RemoteCacheConfig.js';
|
|
5
5
|
import type { ShorthandRoute } from './Route.js';
|
|
6
6
|
import type { TelemetryConfig } from './TelemetryConfig.js';
|
|
7
|
+
import type { DefineFlags } from '@ms-cloudpack/common-types-browser';
|
|
7
8
|
/**
|
|
8
9
|
* Per-application user-provided configuration for Cloudpack.
|
|
9
10
|
*/
|
|
@@ -54,6 +55,9 @@ export interface AppConfig {
|
|
|
54
55
|
/**
|
|
55
56
|
* Glob pattern to match `patch-package` patch files, relative to the project root
|
|
56
57
|
* (usually the same as the repository root).
|
|
58
|
+
*
|
|
59
|
+
* Note that if you're using `yarn patch` (v2+), those patches will be handled automatically
|
|
60
|
+
* (not by this glob pattern).
|
|
57
61
|
* @default "patches/*.patch"
|
|
58
62
|
*/
|
|
59
63
|
patchFilesGlobPattern?: string;
|
|
@@ -80,5 +84,9 @@ export interface AppConfig {
|
|
|
80
84
|
* - Value is the import specifier (local path or package name) for the capability module.
|
|
81
85
|
*/
|
|
82
86
|
bundlerCapabilitiesRegistry?: Record<string, string>;
|
|
87
|
+
/**
|
|
88
|
+
* Key value pairs that will be used to define global variables in the runtime.
|
|
89
|
+
*/
|
|
90
|
+
define?: DefineFlags;
|
|
83
91
|
}
|
|
84
92
|
//# sourceMappingURL=AppConfig.d.ts.map
|
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,eAAe,CAAC;AAC9C,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;
|
|
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,eAAe,CAAC;AAC9C,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;;;;;;;;;;;OAWG;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 './Features.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';\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).\n *\n * If an array, later files will take precedence when merging.\n * (The user 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 * @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"]}
|
|
1
|
+
{"version":3,"file":"AppConfig.js","sourceRoot":"","sources":["../src/AppConfig.ts"],"names":[],"mappings":"","sourcesContent":["import type { ServerConfig } from './ServerConfig.js';\nimport type { Features } from './Features.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).\n *\n * If an array, later files will take precedence when merging.\n * (The user 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/PackageJson.d.ts
CHANGED
|
@@ -66,6 +66,11 @@ export type PackageJson = {
|
|
|
66
66
|
export interface PackageJsonCloudpackMeta extends Omit<PackageSettings, 'match' | 'exports' | 'includedDependencies' | 'excludedDependencies' | 'bundlerType'> {
|
|
67
67
|
/** Controls how the package is bundled. */
|
|
68
68
|
mode: BundleMode;
|
|
69
|
+
/**
|
|
70
|
+
* If the package manager is yarn berry (v2+) and the package has been patched with `yarn patch`,
|
|
71
|
+
* this is the path to the patch file relative to the project root (set by `getNonSemverTransform`).
|
|
72
|
+
*/
|
|
73
|
+
patchFilePath?: string;
|
|
69
74
|
}
|
|
70
75
|
/**
|
|
71
76
|
* Union type which has intellisense for specific keys but also allows arbitrary strings.
|
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,MAAM,WAAW,GAAG;IACxB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb,oCAAoC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAYhB,2IAA2I;IAC3I,IAAI,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;IAE7B,oEAAoE;I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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/**\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 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"]}
|
package/lib/RenderFunction.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import type { Session } from './Session.js';
|
|
|
8
8
|
*/
|
|
9
9
|
export type RenderFunction = (options: RenderFunctionOptions) => Promise<RenderFunctionResult> | RenderFunctionResult;
|
|
10
10
|
/**
|
|
11
|
-
* Input for a `renderScript` custom server render function.
|
|
11
|
+
* Input for a `serverEntry`/`renderScript` custom server render function.
|
|
12
12
|
*/
|
|
13
13
|
export interface RenderFunctionOptions {
|
|
14
14
|
/** Info about the current app session */
|
|
@@ -33,7 +33,7 @@ export interface RenderFunctionOptions {
|
|
|
33
33
|
res: Response;
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
|
-
* The complete expected result of the `renderScript` custom server render function.
|
|
36
|
+
* The complete expected result of the `serverEntry`/`renderScript` custom server render function.
|
|
37
37
|
*/
|
|
38
38
|
export interface ExpandedRenderFunctionResult {
|
|
39
39
|
/** Response body */
|
|
@@ -44,7 +44,7 @@ export interface ExpandedRenderFunctionResult {
|
|
|
44
44
|
contentType: string;
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
|
-
* The expected result of the `renderScript` custom server render function.
|
|
47
|
+
* The expected result of the `serverEntry`/`renderScript` custom server render function.
|
|
48
48
|
*
|
|
49
49
|
* - If a string, it's assumed to be the HTML content.
|
|
50
50
|
* - If an object and the `content` is non-HTML, `contentType` must be set.
|
|
@@ -55,7 +55,7 @@ export type RenderFunctionResult = string | null | ({
|
|
|
55
55
|
content: string;
|
|
56
56
|
} & Partial<ExpandedRenderFunctionResult>);
|
|
57
57
|
/**
|
|
58
|
-
* The expected shape of the `renderScript` custom server render function JS file.
|
|
58
|
+
* The expected shape of the `serverEntry`/`renderScript` custom server render function JS file.
|
|
59
59
|
*/
|
|
60
60
|
export type RenderFunctionScript = {
|
|
61
61
|
default: RenderFunction;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderFunction.js","sourceRoot":"","sources":["../src/RenderFunction.ts"],"names":[],"mappings":"","sourcesContent":["import type { Request, Response } from 'express';\nimport type { ImportMap } from './ImportMap.js';\nimport type { PackageJson } from './PackageJson.js';\nimport type { RenderedRoute } from './Route.js';\nimport type { Session } from './Session.js';\n\n/**\n * A custom server render function that can be used to override the default HTML response.\n */\nexport type RenderFunction = (options: RenderFunctionOptions) => Promise<RenderFunctionResult> | RenderFunctionResult;\n\n/**\n * Input for a `renderScript` custom server render function.\n */\nexport interface RenderFunctionOptions {\n /** Info about the current app session */\n session: Session;\n /** Processed route being rendered */\n route: RenderedRoute;\n /** Base URL of the app server, including port */\n baseUrl: string;\n /** `package.json` for the app */\n definition: PackageJson;\n /** Import map that will be used by the app at runtime (will be injected into a returned HTML response) */\n importMap: ImportMap;\n /** URL for the Cloudpack overlay script bundle (will be injected into a returned HTML response) */\n overlayScript?: string;\n /** Additional script bundle URLs from `route.entry` (will be injected into a returned HTML response) */\n entryScripts?: string[];\n /** Inline script tag contents used for Cloudpack initialization (will be injected into a returned HTML response) */\n inlineScripts?: string[];\n /** Current request */\n req: Request;\n /** Current response */\n res: Response;\n}\n\n/**\n * The complete expected result of the `renderScript` custom server render function.\n */\nexport interface ExpandedRenderFunctionResult {\n /** Response body */\n content: string;\n /** Standard HTTP status code - https://developer.mozilla.org/en-US/docs/Web/HTTP/Status */\n statusCode: number;\n /** MIME type for the response - https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types */\n contentType: string;\n}\n\n/**\n * The expected result of the `renderScript` custom server render function.\n *\n * - If a string, it's assumed to be the HTML content.\n * - If an object and the `content` is non-HTML, `contentType` must be set.\n * - If null, this means the function fully handled the request (sent a response using\n * `options.res.send('...')` or other methods).\n */\nexport type RenderFunctionResult = string | null | ({ content: string } & Partial<ExpandedRenderFunctionResult>);\n\n/**\n * The expected shape of the `renderScript` custom server render function JS file.\n */\nexport type RenderFunctionScript = { default: RenderFunction };\n"]}
|
|
1
|
+
{"version":3,"file":"RenderFunction.js","sourceRoot":"","sources":["../src/RenderFunction.ts"],"names":[],"mappings":"","sourcesContent":["import type { Request, Response } from 'express';\nimport type { ImportMap } from './ImportMap.js';\nimport type { PackageJson } from './PackageJson.js';\nimport type { RenderedRoute } from './Route.js';\nimport type { Session } from './Session.js';\n\n/**\n * A custom server render function that can be used to override the default HTML response.\n */\nexport type RenderFunction = (options: RenderFunctionOptions) => Promise<RenderFunctionResult> | RenderFunctionResult;\n\n/**\n * Input for a `serverEntry`/`renderScript` custom server render function.\n */\nexport interface RenderFunctionOptions {\n /** Info about the current app session */\n session: Session;\n /** Processed route being rendered */\n route: RenderedRoute;\n /** Base URL of the app server, including port */\n baseUrl: string;\n /** `package.json` for the app */\n definition: PackageJson;\n /** Import map that will be used by the app at runtime (will be injected into a returned HTML response) */\n importMap: ImportMap;\n /** URL for the Cloudpack overlay script bundle (will be injected into a returned HTML response) */\n overlayScript?: string;\n /** Additional script bundle URLs from `route.entry` (will be injected into a returned HTML response) */\n entryScripts?: string[];\n /** Inline script tag contents used for Cloudpack initialization (will be injected into a returned HTML response) */\n inlineScripts?: string[];\n /** Current request */\n req: Request;\n /** Current response */\n res: Response;\n}\n\n/**\n * The complete expected result of the `serverEntry`/`renderScript` custom server render function.\n */\nexport interface ExpandedRenderFunctionResult {\n /** Response body */\n content: string;\n /** Standard HTTP status code - https://developer.mozilla.org/en-US/docs/Web/HTTP/Status */\n statusCode: number;\n /** MIME type for the response - https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types */\n contentType: string;\n}\n\n/**\n * The expected result of the `serverEntry`/`renderScript` custom server render function.\n *\n * - If a string, it's assumed to be the HTML content.\n * - If an object and the `content` is non-HTML, `contentType` must be set.\n * - If null, this means the function fully handled the request (sent a response using\n * `options.res.send('...')` or other methods).\n */\nexport type RenderFunctionResult = string | null | ({ content: string } & Partial<ExpandedRenderFunctionResult>);\n\n/**\n * The expected shape of the `serverEntry`/`renderScript` custom server render function JS file.\n */\nexport type RenderFunctionScript = { default: RenderFunction };\n"]}
|
package/lib/Route.d.ts
CHANGED
|
@@ -30,6 +30,8 @@ export interface ShorthandRenderedRoute extends SharedRouteOptions {
|
|
|
30
30
|
* Path to a .js or .html file (relative to the app path) for rendering the route.
|
|
31
31
|
*
|
|
32
32
|
* If a .js file, it must export a default function implementing `RenderFunction` from `@ms-cloudpack/common-types`.
|
|
33
|
+
* @deprecated Use `serverEntry` instead. (Please talk to the team if you have a scenario where
|
|
34
|
+
* bundling the script causes a problem.)
|
|
33
35
|
*/
|
|
34
36
|
renderScript?: string;
|
|
35
37
|
/**
|
|
@@ -45,10 +47,11 @@ export interface ShorthandRenderedRoute extends SharedRouteOptions {
|
|
|
45
47
|
*/
|
|
46
48
|
entry?: string | string[];
|
|
47
49
|
/**
|
|
48
|
-
* Path to
|
|
49
|
-
* (Also supports export map keys.)
|
|
50
|
+
* Path to a TS, JS, or HTML file (relative to the app path) for rendering the route on the server.
|
|
51
|
+
* (Also supports export map keys.) If a JS or TS file, it will be bundled before rendering.
|
|
50
52
|
*
|
|
51
|
-
*
|
|
53
|
+
* If JS or TS, it must export a default function implementing `RenderRouteFunction` defined in
|
|
54
|
+
* `@ms-cloudpack/app-server`.
|
|
52
55
|
*/
|
|
53
56
|
serverEntry?: string;
|
|
54
57
|
}
|
|
@@ -62,8 +65,11 @@ export type RenderedRoute = Omit<ShorthandRenderedRoute, 'exportEntry' | 'entry'
|
|
|
62
65
|
*/
|
|
63
66
|
entry?: ExpandedSourcePath[];
|
|
64
67
|
/**
|
|
65
|
-
* Path to
|
|
66
|
-
*
|
|
68
|
+
* Path to a TS, JS, or HTML file (relative to the app path) for rendering the route on the server.
|
|
69
|
+
* If a JS or TS file, it will be bundled before rendering.
|
|
70
|
+
*
|
|
71
|
+
* If JS or TS, it must export a default function implementing `RenderRouteFunction` defined in
|
|
72
|
+
* `@ms-cloudpack/app-server`.
|
|
67
73
|
*/
|
|
68
74
|
serverEntry?: ExpandedSourcePath;
|
|
69
75
|
};
|
package/lib/Route.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Route.d.ts","sourceRoot":"","sources":["../src/Route.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpE,MAAM,WAAW,kBAAkB;IACjC;;;;;;;;;;;OAWG;IACH,KAAK,EAAE,UAAU,GAAG,UAAU,EAAE,CAAC;CAClC;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAuB,SAAQ,kBAAkB;IAChE
|
|
1
|
+
{"version":3,"file":"Route.d.ts","sourceRoot":"","sources":["../src/Route.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpE,MAAM,WAAW,kBA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,CAAC,EAAE,OAAO,CAAC;IACvB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC;AAED;;GAEG;AAEH,MAAM,MAAM,cAAc,GACtB,sBAAsB,GACtB,uBAAuB,GACvB,WAAW,GACX,aAAa,GACb,UAAU,CAAC;AAEf;;GAEG;AAEH,MAAM,MAAM,KAAK,GAAG,aAAa,GAAG,cAAc,GAAG,WAAW,GAAG,aAAa,GAAG,UAAU,CAAC;AAE9F;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,cAAc,GAAG,KAAK,IAAI,WAAW,CAEjF;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,cAAc,CAEtE;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,cAAc,GAAG,KAAK,IAAI,uBAAuB,CAEjG;AAKD,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,aAAa,CAOpE;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,cAAc,GAAG,KAAK,IAAI,sBAAsB,CAE/F;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,cAAc,GAAG,KAAK,IAAI,aAAa,CAErF;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,cAAc,GAAG,KAAK,IAAI,UAAU,CAE/E"}
|
package/lib/Route.js
CHANGED
|
@@ -22,6 +22,7 @@ export function isShorthandBootstrapRoute(route) {
|
|
|
22
22
|
export function isRenderedRoute(route) {
|
|
23
23
|
const maybeRenderedRoute = route;
|
|
24
24
|
return (!isBootstrapRoute(route) &&
|
|
25
|
+
// eslint-disable-next-line etc/no-deprecated
|
|
25
26
|
!!(maybeRenderedRoute.renderScript || maybeRenderedRoute.entry || maybeRenderedRoute.serverEntry));
|
|
26
27
|
}
|
|
27
28
|
/**
|
package/lib/Route.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Route.js","sourceRoot":"","sources":["../src/Route.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Route.js","sourceRoot":"","sources":["../src/Route.ts"],"names":[],"mappings":"AA0JA;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,KAA6B;IACzD,OAAO,YAAY,IAAI,KAAK,CAAC;AAC/B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAY;IAC3C,OAAO,MAAM,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,WAAW,CAAC;AACvD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,yBAAyB,CAAC,KAAqB;IAC7D,OAAO,gBAAgB,CAAC,KAAc,CAAC,CAAC;AAC1C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,KAAY;IAC1C,MAAM,kBAAkB,GAAG,KAAsB,CAAC;IAClD,OAAO,CACL,CAAC,gBAAgB,CAAC,KAAK,CAAC;QACxB,6CAA6C;QAC7C,CAAC,CAAC,CAAC,kBAAkB,CAAC,YAAY,IAAI,kBAAkB,CAAC,KAAK,IAAI,kBAAkB,CAAC,WAAW,CAAC,CAClG,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,wBAAwB,CAAC,KAAqB;IAC5D,OAAO,eAAe,CAAC,KAAc,CAAC,IAAI,aAAa,IAAI,KAAK,CAAC;AACnE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,KAA6B;IAC3D,OAAO,YAAY,IAAI,KAAK,CAAC;AAC/B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,KAA6B;IACxD,OAAO,SAAS,IAAI,KAAK,CAAC;AAC5B,CAAC","sourcesContent":["import type { ExpandedSourcePath } from './ExpandedSourcePath.js';\n\n/**\n * A route match can be a string path or an object with a path and domain.\n */\nexport type RouteMatch = string | { path: string; domain?: string };\n\nexport interface SharedRouteOptions {\n /**\n * The URL path to match. Paths should usually start with a slash, e.g. `'/my-route'`.\n * You can also use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`.\n *\n * See the [Express docs](https://expressjs.com/en/guide/routing.html#route-paths) for the full\n * supported routing syntax.\n *\n * If you need a route to match on a specific domain, you can pass an object (path, domain) in where\n * the domain is a string which can have wildcards (`*`). e.g. `'word.*'` will match `word.com`, `word.net`, etc.\n *\n * Use an array to handle multiple paths with the same route handler.\n */\n match: RouteMatch | RouteMatch[];\n}\n\n/**\n * A server-rendered route with optional shorthand `entry` info (as specified in `AppConfig`/`cloudpack.config.json`).\n * The route is rendered by a custom server script in Cloudpack.\n */\nexport interface ShorthandRenderedRoute extends SharedRouteOptions {\n /**\n * Path to a .js or .html file (relative to the app path) for rendering the route.\n *\n * If a .js file, it must export a default function implementing `RenderFunction` from `@ms-cloudpack/common-types`.\n * @deprecated Use `serverEntry` instead. (Please talk to the team if you have a scenario where\n * bundling the script causes a problem.)\n */\n renderScript?: string;\n\n /**\n * The key in the exports map which represents the entry point app script for this route.\n * @deprecated Use `entry` instead.\n */\n exportEntry?: string;\n\n /**\n * Additional source file path(s) to bundle and include in the HTML.\n * This **overwrites** any original exports map for the package.\n *\n * Usually this should be an actual source path, though it could also be an exports map key if necessary.\n */\n entry?: string | string[];\n\n /**\n * Path to a TS, JS, or HTML file (relative to the app path) for rendering the route on the server.\n * (Also supports export map keys.) If a JS or TS file, it will be bundled before rendering.\n *\n * If JS or TS, it must export a default function implementing `RenderRouteFunction` defined in\n * `@ms-cloudpack/app-server`.\n */\n serverEntry?: string;\n}\n\n/**\n * A server-rendered route with full `entry` info (used in the processed `CloudpackConfig`).\n * The route is rendered by a custom server script in Cloudpack.\n */\nexport type RenderedRoute = Omit<ShorthandRenderedRoute, 'exportEntry' | 'entry' | 'serverEntry'> & {\n /**\n * The source entry or entries to be included on the page for this route.\n */\n entry?: ExpandedSourcePath[];\n\n /**\n * Path to a TS, JS, or HTML file (relative to the app path) for rendering the route on the server.\n * If a JS or TS file, it will be bundled before rendering.\n *\n * If JS or TS, it must export a default function implementing `RenderRouteFunction` defined in\n * `@ms-cloudpack/app-server`.\n */\n serverEntry?: ExpandedSourcePath;\n};\n\n/**\n * A route with a staticPath property serves static files from the specified path.\n */\nexport interface StaticRoute extends SharedRouteOptions {\n /**\n * The path relative to the app root to static assets.\n */\n staticPath: string;\n}\n\n/**\n * A route that serves a bootstrap script.\n */\nexport interface ShorthandBootstrapRoute\n extends SharedRouteOptions,\n Pick<ShorthandRenderedRoute, 'entry' | 'serverEntry' | 'exportEntry'> {\n type: 'bootstrap';\n}\n\n/**\n * A route that serves a bootstrap script.\n */\nexport interface BootstrapRoute\n extends Omit<ShorthandBootstrapRoute, 'entry' | 'serverEntry'>,\n Pick<RenderedRoute, 'entry' | 'serverEntry'> {}\n\n/**\n * A route that redirects to another url.\n */\nexport interface RedirectRoute extends SharedRouteOptions {\n /**\n * The url to redirect to.\n */\n redirectTo: string;\n}\n\n/**\n * A route that proxies requests to another server.\n * This is handled by https://github.com/chimurai/http-proxy-middleware.\n */\nexport interface ProxyRoute extends SharedRouteOptions {\n /**\n * The target host to proxy to. (protocol + host).\n */\n proxyTo: string;\n\n /**\n * For virtual hosted sites.\n */\n changeOrigin?: boolean;\n /**\n * Rewrite target's url path. Object-keys will be used as RegExp to match paths.\n */\n pathRewrite?: Record<string, string>;\n}\n\n/**\n * Route as specified in `AppConfig` (`cloudpack.config.json`).\n */\n// WARNING: Be sure to add new route types to Route as well!\nexport type ShorthandRoute =\n | ShorthandRenderedRoute\n | ShorthandBootstrapRoute\n | StaticRoute\n | RedirectRoute\n | ProxyRoute;\n\n/**\n * Processed route as used in the processed `CloudpackConfig`.\n */\n// WARNING: Be sure to add new route types to ShorthandRoute as well!\nexport type Route = RenderedRoute | BootstrapRoute | StaticRoute | RedirectRoute | ProxyRoute;\n\n/**\n * Type guard to check if a route is a static route.\n */\nexport function isStaticRoute(route: Route | ShorthandRoute): route is StaticRoute {\n return 'staticPath' in route;\n}\n\n/**\n * Type guard to check if a route is a bootstrap route.\n */\nexport function isBootstrapRoute(route: Route): route is BootstrapRoute {\n return 'type' in route && route.type === 'bootstrap';\n}\n\n/**\n * Type guard to check if a route is a shorthand bootstrap route.\n */\nexport function isShorthandBootstrapRoute(route: ShorthandRoute): route is ShorthandBootstrapRoute {\n return isBootstrapRoute(route as Route);\n}\n\n/*\n * Type guard to check if a route is a rendered route.\n */\nexport function isRenderedRoute(route: Route): route is RenderedRoute {\n const maybeRenderedRoute = route as RenderedRoute;\n return (\n !isBootstrapRoute(route) &&\n // eslint-disable-next-line etc/no-deprecated\n !!(maybeRenderedRoute.renderScript || maybeRenderedRoute.entry || maybeRenderedRoute.serverEntry)\n );\n}\n\n/**\n * Type guard to check if a route is a shorthand rendered route.\n */\nexport function isShorthandRenderedRoute(route: ShorthandRoute): route is ShorthandRenderedRoute {\n return isRenderedRoute(route as Route) || 'exportEntry' in route;\n}\n\n/**\n * Type guard to check if a route is a redirect route.\n */\nexport function isRedirectRoute(route: Route | ShorthandRoute): route is RedirectRoute {\n return 'redirectTo' in route;\n}\n\n/**\n * Type guard to check if a route is a proxy route.\n */\nexport function isProxyRoute(route: Route | ShorthandRoute): route is ProxyRoute {\n return 'proxyTo' in route;\n}\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.12",
|
|
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.5",
|
|
18
18
|
"@types/express": "^4.17.16"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
package/schema/AppConfig.json
CHANGED
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
},
|
|
66
66
|
"patchFilesGlobPattern": {
|
|
67
67
|
"type": "string",
|
|
68
|
-
"description": "Glob pattern to match `patch-package` patch files, relative to the project root (usually the same as the repository root).",
|
|
68
|
+
"description": "Glob pattern to match `patch-package` patch files, relative to the project root (usually the same as the repository root).\n\nNote that if you're using `yarn patch` (v2+), those patches will be handled automatically (not by this glob pattern).",
|
|
69
69
|
"default": "patches/*.patch"
|
|
70
70
|
},
|
|
71
71
|
"remoteCache": {
|
|
@@ -93,6 +93,10 @@
|
|
|
93
93
|
},
|
|
94
94
|
"description": "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."
|
|
95
95
|
},
|
|
96
|
+
"define": {
|
|
97
|
+
"$ref": "#/definitions/DefineFlags",
|
|
98
|
+
"description": "Key value pairs that will be used to define global variables in the runtime."
|
|
99
|
+
},
|
|
96
100
|
"$schema": {
|
|
97
101
|
"type": "string"
|
|
98
102
|
}
|
|
@@ -539,7 +543,8 @@
|
|
|
539
543
|
},
|
|
540
544
|
"renderScript": {
|
|
541
545
|
"type": "string",
|
|
542
|
-
"description": "Path to a .js or .html file (relative to the app path) for rendering the route.\n\nIf a .js file, it must export a default function implementing `RenderFunction` from `@ms-cloudpack/common-types`."
|
|
546
|
+
"description": "Path to a .js or .html file (relative to the app path) for rendering the route.\n\nIf a .js file, it must export a default function implementing `RenderFunction` from `@ms-cloudpack/common-types`.",
|
|
547
|
+
"deprecated": "Use `serverEntry` instead. (Please talk to the team if you have a scenario where\nbundling the script causes a problem.)"
|
|
543
548
|
},
|
|
544
549
|
"exportEntry": {
|
|
545
550
|
"type": "string",
|
|
@@ -562,7 +567,7 @@
|
|
|
562
567
|
},
|
|
563
568
|
"serverEntry": {
|
|
564
569
|
"type": "string",
|
|
565
|
-
"description": "Path to
|
|
570
|
+
"description": "Path to a TS, JS, or HTML file (relative to the app path) for rendering the route on the server. (Also supports export map keys.) If a JS or TS file, it will be bundled before rendering.\n\nIf JS or TS, it must export a default function implementing `RenderRouteFunction` defined in `@ms-cloudpack/app-server`."
|
|
566
571
|
}
|
|
567
572
|
},
|
|
568
573
|
"additionalProperties": false,
|
|
@@ -613,7 +618,7 @@
|
|
|
613
618
|
},
|
|
614
619
|
"serverEntry": {
|
|
615
620
|
"type": "string",
|
|
616
|
-
"description": "Path to
|
|
621
|
+
"description": "Path to a TS, JS, or HTML file (relative to the app path) for rendering the route on the server. (Also supports export map keys.) If a JS or TS file, it will be bundled before rendering.\n\nIf JS or TS, it must export a default function implementing `RenderRouteFunction` defined in `@ms-cloudpack/app-server`."
|
|
617
622
|
},
|
|
618
623
|
"exportEntry": {
|
|
619
624
|
"type": "string",
|
|
@@ -1168,6 +1173,33 @@
|
|
|
1168
1173
|
],
|
|
1169
1174
|
"additionalProperties": false,
|
|
1170
1175
|
"description": "Azure Blob Storage configuration for remote cache - uploading and downloading packages via `cloudpack sync`."
|
|
1176
|
+
},
|
|
1177
|
+
"DefineFlags": {
|
|
1178
|
+
"type": "object",
|
|
1179
|
+
"additionalProperties": {
|
|
1180
|
+
"anyOf": [
|
|
1181
|
+
{
|
|
1182
|
+
"type": "string"
|
|
1183
|
+
},
|
|
1184
|
+
{
|
|
1185
|
+
"type": "number"
|
|
1186
|
+
},
|
|
1187
|
+
{
|
|
1188
|
+
"type": "boolean"
|
|
1189
|
+
},
|
|
1190
|
+
{
|
|
1191
|
+
"type": "array",
|
|
1192
|
+
"items": {
|
|
1193
|
+
"type": [
|
|
1194
|
+
"string",
|
|
1195
|
+
"number",
|
|
1196
|
+
"boolean"
|
|
1197
|
+
]
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
]
|
|
1201
|
+
},
|
|
1202
|
+
"description": "DefineFlags is an interface that represents a collection of global variables that will be defined on the window object. Each define flag is represented by a key-value pair"
|
|
1171
1203
|
}
|
|
1172
1204
|
}
|
|
1173
1205
|
}
|
package/schema/UserConfig.json
CHANGED
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
},
|
|
70
70
|
"patchFilesGlobPattern": {
|
|
71
71
|
"type": "string",
|
|
72
|
-
"description": "Glob pattern to match `patch-package` patch files, relative to the project root (usually the same as the repository root).",
|
|
72
|
+
"description": "Glob pattern to match `patch-package` patch files, relative to the project root (usually the same as the repository root).\n\nNote that if you're using `yarn patch` (v2+), those patches will be handled automatically (not by this glob pattern).",
|
|
73
73
|
"default": "patches/*.patch"
|
|
74
74
|
},
|
|
75
75
|
"remoteCache": {
|
|
@@ -96,6 +96,10 @@
|
|
|
96
96
|
"type": "string"
|
|
97
97
|
},
|
|
98
98
|
"description": "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."
|
|
99
|
+
},
|
|
100
|
+
"define": {
|
|
101
|
+
"$ref": "#/definitions/DefineFlags",
|
|
102
|
+
"description": "Key value pairs that will be used to define global variables in the runtime."
|
|
99
103
|
}
|
|
100
104
|
},
|
|
101
105
|
"additionalProperties": false,
|
|
@@ -540,7 +544,8 @@
|
|
|
540
544
|
},
|
|
541
545
|
"renderScript": {
|
|
542
546
|
"type": "string",
|
|
543
|
-
"description": "Path to a .js or .html file (relative to the app path) for rendering the route.\n\nIf a .js file, it must export a default function implementing `RenderFunction` from `@ms-cloudpack/common-types`."
|
|
547
|
+
"description": "Path to a .js or .html file (relative to the app path) for rendering the route.\n\nIf a .js file, it must export a default function implementing `RenderFunction` from `@ms-cloudpack/common-types`.",
|
|
548
|
+
"deprecated": "Use `serverEntry` instead. (Please talk to the team if you have a scenario where\nbundling the script causes a problem.)"
|
|
544
549
|
},
|
|
545
550
|
"exportEntry": {
|
|
546
551
|
"type": "string",
|
|
@@ -563,7 +568,7 @@
|
|
|
563
568
|
},
|
|
564
569
|
"serverEntry": {
|
|
565
570
|
"type": "string",
|
|
566
|
-
"description": "Path to
|
|
571
|
+
"description": "Path to a TS, JS, or HTML file (relative to the app path) for rendering the route on the server. (Also supports export map keys.) If a JS or TS file, it will be bundled before rendering.\n\nIf JS or TS, it must export a default function implementing `RenderRouteFunction` defined in `@ms-cloudpack/app-server`."
|
|
567
572
|
}
|
|
568
573
|
},
|
|
569
574
|
"additionalProperties": false,
|
|
@@ -614,7 +619,7 @@
|
|
|
614
619
|
},
|
|
615
620
|
"serverEntry": {
|
|
616
621
|
"type": "string",
|
|
617
|
-
"description": "Path to
|
|
622
|
+
"description": "Path to a TS, JS, or HTML file (relative to the app path) for rendering the route on the server. (Also supports export map keys.) If a JS or TS file, it will be bundled before rendering.\n\nIf JS or TS, it must export a default function implementing `RenderRouteFunction` defined in `@ms-cloudpack/app-server`."
|
|
618
623
|
},
|
|
619
624
|
"exportEntry": {
|
|
620
625
|
"type": "string",
|
|
@@ -1169,6 +1174,33 @@
|
|
|
1169
1174
|
],
|
|
1170
1175
|
"additionalProperties": false,
|
|
1171
1176
|
"description": "Azure Blob Storage configuration for remote cache - uploading and downloading packages via `cloudpack sync`."
|
|
1177
|
+
},
|
|
1178
|
+
"DefineFlags": {
|
|
1179
|
+
"type": "object",
|
|
1180
|
+
"additionalProperties": {
|
|
1181
|
+
"anyOf": [
|
|
1182
|
+
{
|
|
1183
|
+
"type": "string"
|
|
1184
|
+
},
|
|
1185
|
+
{
|
|
1186
|
+
"type": "number"
|
|
1187
|
+
},
|
|
1188
|
+
{
|
|
1189
|
+
"type": "boolean"
|
|
1190
|
+
},
|
|
1191
|
+
{
|
|
1192
|
+
"type": "array",
|
|
1193
|
+
"items": {
|
|
1194
|
+
"type": [
|
|
1195
|
+
"string",
|
|
1196
|
+
"number",
|
|
1197
|
+
"boolean"
|
|
1198
|
+
]
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
]
|
|
1202
|
+
},
|
|
1203
|
+
"description": "DefineFlags is an interface that represents a collection of global variables that will be defined on the window object. Each define flag is represented by a key-value pair"
|
|
1172
1204
|
}
|
|
1173
1205
|
},
|
|
1174
1206
|
"properties": {
|