@ms-cloudpack/common-types 0.14.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/BundleOptions.d.ts +8 -3
- package/lib/BundleOptions.d.ts.map +1 -1
- package/lib/BundleOptions.js.map +1 -1
- package/lib/BundleOutputFile.d.ts +5 -2
- package/lib/BundleOutputFile.d.ts.map +1 -1
- package/lib/BundleOutputFile.js.map +1 -1
- package/lib/GeneratedConfig.d.ts +0 -5
- package/lib/GeneratedConfig.d.ts.map +1 -1
- package/lib/GeneratedConfig.js.map +1 -1
- package/lib/RenderFunctionOptions.d.ts +5 -3
- package/lib/RenderFunctionOptions.d.ts.map +1 -1
- package/lib/RenderFunctionOptions.js.map +1 -1
- package/lib/Route.d.ts +5 -5
- package/lib/Route.d.ts.map +1 -1
- package/lib/Route.js +1 -2
- package/lib/Route.js.map +1 -1
- package/lib/index.d.ts +1 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/tsdoc-metadata.json +1 -1
- package/package.json +1 -1
- package/schema/AppConfig.json +40 -37
- package/schema/GeneratedConfig.json +0 -598
- package/schema/UserConfig.json +40 -37
- package/lib/PackageOverride.d.ts +0 -8
- package/lib/PackageOverride.d.ts.map +0 -1
- package/lib/PackageOverride.js +0 -2
- package/lib/PackageOverride.js.map +0 -1
package/lib/BundleOptions.d.ts
CHANGED
|
@@ -8,9 +8,14 @@ export interface BundleOptions extends Pick<PackageSettings, 'bundler' | 'bundle
|
|
|
8
8
|
*/
|
|
9
9
|
inputPath: string;
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
11
|
+
* Mapping from output file to source file paths.
|
|
12
|
+
* - Key is the output file path, relative to `outputPath` (with forward slashes and leading `./`)
|
|
13
|
+
* and *without* the extension (unless it's non-JS).
|
|
14
|
+
* - Value is the input file path, relative to `inputPath` (with forward slashes and leading `./`)
|
|
15
|
+
* including the extension.
|
|
16
|
+
*
|
|
17
|
+
* For example:
|
|
18
|
+
* `{ './lib/index': './src/index.js' }`
|
|
14
19
|
*
|
|
15
20
|
* Note: Non-javascript extensions, such as `.css` or `.scss`, will not be stripped from the key.
|
|
16
21
|
* This is to ensure the bundler keeps the original extension intact and adds `.js` after it.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BundleOptions.d.ts","sourceRoot":"","sources":["../src/BundleOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,aACf,SAAQ,IAAI,CACV,eAAe,EACf,SAAS,GAAG,gBAAgB,GAAG,gBAAgB,GAAG,wBAAwB,GAAG,qBAAqB,CACnG;IACD;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB
|
|
1
|
+
{"version":3,"file":"BundleOptions.d.ts","sourceRoot":"","sources":["../src/BundleOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,aACf,SAAQ,IAAI,CACV,eAAe,EACf,SAAS,GAAG,gBAAgB,GAAG,gBAAgB,GAAG,wBAAwB,GAAG,qBAAqB,CACnG;IACD;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;;;;;;;OAYG;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEhC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IAEpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAEnB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB"}
|
package/lib/BundleOptions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BundleOptions.js","sourceRoot":"","sources":["../src/BundleOptions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PackageSettings } from './PackageSettings.js';\n\n/**\n * Options for creating bundles with a bundler plugin.\n */\nexport interface BundleOptions\n extends Pick<\n PackageSettings,\n 'bundler' | 'bundlerOptions' | 'dynamicImports' | 'ignoredBundlerWarnings' | 'bundlerCapabilities'\n > {\n /**\n * The absolute input path for the entry points.\n */\n inputPath: string;\n\n /**\n *
|
|
1
|
+
{"version":3,"file":"BundleOptions.js","sourceRoot":"","sources":["../src/BundleOptions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PackageSettings } from './PackageSettings.js';\n\n/**\n * Options for creating bundles with a bundler plugin.\n */\nexport interface BundleOptions\n extends Pick<\n PackageSettings,\n 'bundler' | 'bundlerOptions' | 'dynamicImports' | 'ignoredBundlerWarnings' | 'bundlerCapabilities'\n > {\n /**\n * The absolute input path for the entry points.\n */\n inputPath: string;\n\n /**\n * Mapping from output file to source file paths.\n * - Key is the output file path, relative to `outputPath` (with forward slashes and leading `./`)\n * and *without* the extension (unless it's non-JS).\n * - Value is the input file path, relative to `inputPath` (with forward slashes and leading `./`)\n * including the extension.\n *\n * For example:\n * `{ './lib/index': './src/index.js' }`\n *\n * Note: Non-javascript extensions, such as `.css` or `.scss`, will not be stripped from the key.\n * This is to ensure the bundler keeps the original extension intact and adds `.js` after it.\n */\n entries: Record<string, string>;\n\n /**\n * The output path for bundled files. This can be either relative to `inputPath`, or absolute.\n * Defaults to `inputPath`.\n */\n outputPath?: string;\n\n /**\n * List of dependencies which should be externalized.\n */\n external?: string[];\n\n /**\n * List of dependencies which should be inlined.\n */\n inlined?: string[];\n\n /**\n * If true, minify the output.\n */\n minify?: boolean;\n\n /**\n * If true, will generate sourcemap files for the output. This has a tax on performance.\n * Defaults to true unless the `disableSourceMaps` feature is enabled.\n * (To set a bundler-specific sourcemap option, use `bundlerOptions`.)\n */\n sourcemap?: boolean;\n\n /**\n * If true, the bundler is expected to stay alive and take requests to rebuild on demand. File watching is\n * managed at a higher layer. When we no longer care about incremental bundling, the bundler will receive a call\n * to `dispose` if returned.\n */\n incremental?: boolean;\n}\n"]}
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
export interface BundleOutputFile {
|
|
2
2
|
/**
|
|
3
3
|
* The relative path to the output file (starting from `BundleResult#outputPath`),
|
|
4
|
-
* with forward slashes.
|
|
4
|
+
* with forward slashes and an extension.
|
|
5
5
|
*/
|
|
6
6
|
outputPath: string;
|
|
7
7
|
/**
|
|
8
8
|
* The relative path to the entry file (starting from `BundleResult#inputPath`),
|
|
9
|
-
* with forward slashes.
|
|
9
|
+
* with forward slashes and an extension. This will only be set for files that were
|
|
10
|
+
* listed in `entries`.
|
|
10
11
|
*/
|
|
11
12
|
entryPoint?: string;
|
|
12
13
|
/**
|
|
13
14
|
* The list of export names coming from the output file.
|
|
15
|
+
*
|
|
16
|
+
* WARNING: This is not set by all bundlers!
|
|
14
17
|
*/
|
|
15
18
|
exports?: string[];
|
|
16
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BundleOutputFile.d.ts","sourceRoot":"","sources":["../src/BundleOutputFile.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB
|
|
1
|
+
{"version":3,"file":"BundleOutputFile.d.ts","sourceRoot":"","sources":["../src/BundleOutputFile.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BundleOutputFile.js","sourceRoot":"","sources":["../src/BundleOutputFile.ts"],"names":[],"mappings":"","sourcesContent":["export interface BundleOutputFile {\n /**\n * The relative path to the output file (starting from `BundleResult#outputPath`),\n * with forward slashes.\n */\n outputPath: string;\n\n /**\n * The relative path to the entry file (starting from `BundleResult#inputPath`),\n * with forward slashes
|
|
1
|
+
{"version":3,"file":"BundleOutputFile.js","sourceRoot":"","sources":["../src/BundleOutputFile.ts"],"names":[],"mappings":"","sourcesContent":["export interface BundleOutputFile {\n /**\n * The relative path to the output file (starting from `BundleResult#outputPath`),\n * with forward slashes and an extension.\n */\n outputPath: string;\n\n /**\n * The relative path to the entry file (starting from `BundleResult#inputPath`),\n * with forward slashes and an extension. This will only be set for files that were\n * listed in `entries`.\n */\n entryPoint?: string;\n\n /**\n * The list of export names coming from the output file.\n *\n * WARNING: This is not set by all bundlers!\n */\n exports?: string[];\n}\n"]}
|
package/lib/GeneratedConfig.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { PackageOverride } from './PackageOverride.js';
|
|
2
1
|
import type { PackageSettings } from './PackageSettings.js';
|
|
3
2
|
/**
|
|
4
3
|
* Per-application generated configuration for Cloudpack.
|
|
@@ -9,9 +8,5 @@ export interface GeneratedConfig {
|
|
|
9
8
|
* For the generated config, these should just contain generated exports maps.
|
|
10
9
|
*/
|
|
11
10
|
packageSettings?: PackageSettings[];
|
|
12
|
-
/**
|
|
13
|
-
* @deprecated Use `packageSettings` instead.
|
|
14
|
-
*/
|
|
15
|
-
packageOverrides?: PackageOverride[];
|
|
16
11
|
}
|
|
17
12
|
//# sourceMappingURL=GeneratedConfig.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeneratedConfig.d.ts","sourceRoot":"","sources":["../src/GeneratedConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"GeneratedConfig.d.ts","sourceRoot":"","sources":["../src/GeneratedConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,eAAe,CAAC,EAAE,eAAe,EAAE,CAAC;CACrC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeneratedConfig.js","sourceRoot":"","sources":["../src/GeneratedConfig.ts"],"names":[],"mappings":"","sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"GeneratedConfig.js","sourceRoot":"","sources":["../src/GeneratedConfig.ts"],"names":[],"mappings":"","sourcesContent":["import type { PackageSettings } from './PackageSettings.js';\n\n/**\n * Per-application generated configuration for Cloudpack.\n */\nexport interface GeneratedConfig {\n /**\n * Settings to customize how packages are bundled.\n * For the generated config, these should just contain generated exports maps.\n */\n packageSettings?: PackageSettings[];\n}\n"]}
|
|
@@ -12,10 +12,12 @@ export interface RenderFunctionOptions {
|
|
|
12
12
|
baseUrl: string;
|
|
13
13
|
definition: PackageJson;
|
|
14
14
|
importMap: ImportMap;
|
|
15
|
-
overlayScript
|
|
16
|
-
|
|
17
|
-
inlineScripts
|
|
15
|
+
overlayScript?: string;
|
|
16
|
+
entryScripts?: string[];
|
|
17
|
+
inlineScripts?: string[];
|
|
18
18
|
req: Request;
|
|
19
19
|
res: Response;
|
|
20
|
+
/** @deprecated - use entryScripts. */
|
|
21
|
+
entryScript?: string;
|
|
20
22
|
}
|
|
21
23
|
//# sourceMappingURL=RenderFunctionOptions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderFunctionOptions.d.ts","sourceRoot":"","sources":["../src/RenderFunctionOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,KAAK,EAAE,S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-1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderFunctionOptions.js","sourceRoot":"","sources":["../src/RenderFunctionOptions.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 * The input options for a `renderScript` custom server render function.\n */\nexport interface RenderFunctionOptions {\n session: Session;\n route: RenderedRoute;\n baseUrl: string;\n definition: PackageJson;\n importMap: ImportMap;\n overlayScript
|
|
1
|
+
{"version":3,"file":"RenderFunctionOptions.js","sourceRoot":"","sources":["../src/RenderFunctionOptions.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 * The input options for a `renderScript` custom server render function.\n */\nexport interface RenderFunctionOptions {\n session: Session;\n route: RenderedRoute;\n baseUrl: string;\n definition: PackageJson;\n importMap: ImportMap;\n overlayScript?: string;\n entryScripts?: string[];\n inlineScripts?: string[];\n req: Request;\n res: Response;\n\n /** @deprecated - use entryScripts. */\n entryScript?: string;\n}\n"]}
|
package/lib/Route.d.ts
CHANGED
|
@@ -19,20 +19,20 @@ export interface ShorthandRenderedRoute extends SharedRouteOptions {
|
|
|
19
19
|
*/
|
|
20
20
|
renderScript?: string;
|
|
21
21
|
/**
|
|
22
|
-
* The key in the exports map which represents the entry point app script for this route.
|
|
22
|
+
* @deprecated - The key in the exports map which represents the entry point app script for this route.
|
|
23
23
|
* Default is '.', meaning the main package export key.
|
|
24
24
|
*/
|
|
25
25
|
exportEntry?: string;
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* The source entry or entries to be included on the page for this route.
|
|
28
28
|
*/
|
|
29
|
-
entry?:
|
|
29
|
+
entry?: string | string[];
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
32
|
* A server-rendered route with full `entry` info (used in the processed `CloudpackConfig`).
|
|
33
33
|
* The route is rendered by a custom server script in Cloudpack.
|
|
34
34
|
*/
|
|
35
|
-
export type RenderedRoute = Omit<ShorthandRenderedRoute, 'entry'> & {
|
|
35
|
+
export type RenderedRoute = Omit<ShorthandRenderedRoute, 'exportEntry' | 'entry'> & {
|
|
36
36
|
/**
|
|
37
37
|
* To be implemented. The source entry or entries to be included on the page for this route.
|
|
38
38
|
*/
|
|
@@ -50,7 +50,7 @@ export interface StaticRoute extends SharedRouteOptions {
|
|
|
50
50
|
/**
|
|
51
51
|
* A route that serves a bootstrap script.
|
|
52
52
|
*/
|
|
53
|
-
export interface BootstrapRoute extends SharedRouteOptions, Pick<
|
|
53
|
+
export interface BootstrapRoute extends SharedRouteOptions, Pick<RenderedRoute, 'entry'> {
|
|
54
54
|
type: 'bootstrap';
|
|
55
55
|
}
|
|
56
56
|
/**
|
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,MAAM,WAAW,kBAAkB;IACjC;;;;;OAKG;IACH,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAuB,SAAQ,kBAAkB;IAChE;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,KAAK,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"Route.d.ts","sourceRoot":"","sources":["../src/Route.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,MAAM,WAAW,kBAAkB;IACjC;;;;;O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aAAa,CAGpE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,aAAa,CAEpE"}
|
package/lib/Route.js
CHANGED
|
@@ -15,8 +15,7 @@ export function isBootstrapRoute(route) {
|
|
|
15
15
|
*/
|
|
16
16
|
export function isRenderedRoute(route) {
|
|
17
17
|
const maybeRenderedRoute = route;
|
|
18
|
-
return
|
|
19
|
-
!!(maybeRenderedRoute.renderScript || maybeRenderedRoute.entry || maybeRenderedRoute.exportEntry));
|
|
18
|
+
return !isBootstrapRoute(route) && !!(maybeRenderedRoute.renderScript || maybeRenderedRoute.entry);
|
|
20
19
|
}
|
|
21
20
|
/**
|
|
22
21
|
* Type guard to check if a route is a redirect route.
|
package/lib/Route.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Route.js","sourceRoot":"","sources":["../src/Route.ts"],"names":[],"mappings":"AAyFA;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,KAAY;IACxC,OAAO,YAAY,IAAI,KAAK,CAAC;AAC/B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAY;IAC3C,OAAO,MAAM,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,WAAW,CAAC;AACvD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,KAAY;IAC1C,MAAM,kBAAkB,GAAG,KAAsB,CAAC;IAClD,OAAO,
|
|
1
|
+
{"version":3,"file":"Route.js","sourceRoot":"","sources":["../src/Route.ts"],"names":[],"mappings":"AAyFA;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,KAAY;IACxC,OAAO,YAAY,IAAI,KAAK,CAAC;AAC/B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAY;IAC3C,OAAO,MAAM,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,WAAW,CAAC;AACvD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,KAAY;IAC1C,MAAM,kBAAkB,GAAG,KAAsB,CAAC;IAClD,OAAO,CAAC,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,kBAAkB,CAAC,YAAY,IAAI,kBAAkB,CAAC,KAAK,CAAC,CAAC;AACrG,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,KAAY;IAC1C,OAAO,YAAY,IAAI,KAAK,CAAC;AAC/B,CAAC","sourcesContent":["import type { ExpandedSourcePath } from './ExpandedSourcePath.js';\n\nexport interface SharedRouteOptions {\n /**\n * The url path part to match. Start paths with a leading slash, e.g. `'/my-route'`. You can also\n * use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`.\n *\n * Use an array to handle multiple paths with the same route handler.\n */\n match: string | string[];\n}\n\n/**\n * A server-rendered route 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 used for rendering the route. If a script is provided, it must\n * export a default function implementing `RenderRouteFunction` defined in `@ms-cloudpack/app-server`.\n */\n renderScript?: string;\n\n /**\n * @deprecated - The key in the exports map which represents the entry point app script for this route.\n * Default is '.', meaning the main package export key.\n */\n exportEntry?: string;\n\n /**\n * The source entry or entries to be included on the page for this route.\n */\n entry?: string | 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'> & {\n /**\n * To be implemented. The source entry or entries to be included on the page for this route.\n */\n entry?: ExpandedSourcePath[];\n};\n\n/**\n * A route with a staticPath property serves static files from the specified path.\n */\nexport interface StaticRoute extends SharedRouteOptions {\n /**\n * The path relative to the app root to static assets.\n */\n staticPath: string;\n}\n\n/**\n * A route that serves a bootstrap script.\n */\nexport interface BootstrapRoute extends SharedRouteOptions, Pick<RenderedRoute, 'entry'> {\n type: 'bootstrap';\n}\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 * Internal helper for all route types except `RenderedRoute`/`ShorthandRenderedRoute`\n * (to ensure any new route types are included in both `Route` and `ShorthandRoute`).\n */\ntype OtherRoute = StaticRoute | BootstrapRoute | RedirectRoute;\n\n/**\n * Route as specified in `AppConfig` (`cloudpack.config.json`).\n */\nexport type ShorthandRoute = ShorthandRenderedRoute | OtherRoute;\n\n/**\n * Processed route as used in the processed `CloudpackConfig`.\n */\nexport type Route = RenderedRoute | OtherRoute;\n\n/**\n * Type guard to check if a route is a static route.\n */\nexport function isStaticRoute(route: Route): route is StaticRoute {\n return 'staticPath' in route;\n}\n\n/**\n * Type guard to check if a route is a bootstrap route.\n */\nexport function isBootstrapRoute(route: Route): route is BootstrapRoute {\n return 'type' in route && route.type === 'bootstrap';\n}\n\n/*\n * Type guard to check if a route is a rendered route.\n */\nexport function isRenderedRoute(route: Route): route is RenderedRoute {\n const maybeRenderedRoute = route as RenderedRoute;\n return !isBootstrapRoute(route) && !!(maybeRenderedRoute.renderScript || maybeRenderedRoute.entry);\n}\n\n/**\n * Type guard to check if a route is a redirect route.\n */\nexport function isRedirectRoute(route: Route): route is RedirectRoute {\n return 'redirectTo' in route;\n}\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -18,9 +18,8 @@ export type { Features } from './Features.js';
|
|
|
18
18
|
export type { GeneratedConfig } from './GeneratedConfig.js';
|
|
19
19
|
export type { HttpsConfig } from './HttpsConfig.js';
|
|
20
20
|
export type { ModuleType } from './ModuleType.js';
|
|
21
|
-
export type { PackageOverride } from './PackageOverride.js';
|
|
22
21
|
export type { PackageSettings, PackageSettingsMatch } from './PackageSettings.js';
|
|
23
|
-
export type {
|
|
22
|
+
export type { BootstrapRoute, RedirectRoute, RenderedRoute, Route, SharedRouteOptions, ShorthandRenderedRoute, ShorthandRoute, StaticRoute, } from './Route.js';
|
|
24
23
|
export { isBootstrapRoute, isRenderedRoute, isStaticRoute, isRedirectRoute } from './Route.js';
|
|
25
24
|
export type { TelemetryConfig } from './TelemetryConfig.js';
|
|
26
25
|
export type { AppConfig } from './AppConfig.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,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,eAAe,EACf,WAAW,EACX,uBAAuB,EACvB,0BAA0B,EAC1B,kBAAkB,EAClB,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,GACnB,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,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,YAAY,EAAE,SAAS,EAAE,M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AC;AAC5D,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,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;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AA6C/C,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC","sourcesContent":["export { allFeatures } from './allFeatures.js';\nexport type {\n GetPackageDefinitionOptions,\n PackageDefinitionTransform,\n PackageDefinitionsCache,\n PackageImporterContext,\n} from './PackageDefinitionsCache.js';\nexport type {\n LiteralOrString,\n PackageJson,\n PackageJsonDependencies,\n PackageJsonExportCondition,\n PackageJsonExports,\n PackageJsonExportsObject,\n PackageJsonExportsValue,\n PackageJsonImports,\n} from './PackageJson.js';\nexport type { BundleContext } from './BundleContext.js';\nexport type { BundleMessage } from './BundleMessage.js';\nexport type { BundleMessageLocation } from './BundleMessageLocation.js';\nexport type { BundleMessageNote } from './BundleMessageNote.js';\nexport type { BundleMode } from './BundleMode.js';\nexport type { BundleOptions } from './BundleOptions.js';\nexport type { BundleOutputFile } from './BundleOutputFile.js';\nexport type { BundleResult } from './BundleResult.js';\nexport type { BundlerPluginResult } from './BundlerPluginResult.js';\nexport type { BundlerPlugin } from './BundlerPlugin.js';\nexport type { CloudpackConfig } from './CloudpackConfig.js';\nexport type { DevServer } from './DevServer.js';\nexport type { Feature } from './Feature.js';\nexport type { Features } from './Features.js';\nexport type { GeneratedConfig } from './GeneratedConfig.js';\nexport type { HttpsConfig } from './HttpsConfig.js';\nexport type { ModuleType } from './ModuleType.js';\nexport type { PackageSettings, PackageSettingsMatch } from './PackageSettings.js';\nexport type {\n BootstrapRoute,\n RedirectRoute,\n RenderedRoute,\n Route,\n SharedRouteOptions,\n ShorthandRenderedRoute,\n ShorthandRoute,\n StaticRoute,\n} from './Route.js';\nexport { isBootstrapRoute, isRenderedRoute, isStaticRoute, isRedirectRoute } from './Route.js';\nexport type { TelemetryConfig } from './TelemetryConfig.js';\nexport type { AppConfig } from './AppConfig.js';\nexport type {\n InternalBundlerCapabilityImplementations,\n InternalBundlerCapabilitiesMetaData,\n BundlerCapabilitiesOptions,\n} from './BundlerCapability.js';\nexport type { RenderFunction } from './RenderFunction.js';\nexport type { RenderFunctionOptions } from './RenderFunctionOptions.js';\nexport type { RenderFunctionResult, ExpandedRenderFunctionResult } from './RenderFunctionResult.js';\nexport type { RenderFunctionScript } from './RenderFunctionScript.js';\nexport type { Request, Response } 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';\n"]}
|
package/lib/tsdoc-metadata.json
CHANGED
package/package.json
CHANGED
package/schema/AppConfig.json
CHANGED
|
@@ -534,21 +534,21 @@
|
|
|
534
534
|
},
|
|
535
535
|
"exportEntry": {
|
|
536
536
|
"type": "string",
|
|
537
|
-
"
|
|
537
|
+
"deprecated": "- The key in the exports map which represents the entry point app script for this route.\nDefault is '.', meaning the main package export key."
|
|
538
538
|
},
|
|
539
539
|
"entry": {
|
|
540
|
-
"
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
540
|
+
"anyOf": [
|
|
541
|
+
{
|
|
542
|
+
"type": "string"
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
"type": "array",
|
|
546
|
+
"items": {
|
|
544
547
|
"type": "string"
|
|
545
|
-
},
|
|
546
|
-
{
|
|
547
|
-
"$ref": "#/definitions/ExpandedSourcePath"
|
|
548
548
|
}
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
"description": "
|
|
549
|
+
}
|
|
550
|
+
],
|
|
551
|
+
"description": "The source entry or entries to be included on the page for this route."
|
|
552
552
|
}
|
|
553
553
|
},
|
|
554
554
|
"additionalProperties": false,
|
|
@@ -557,29 +557,6 @@
|
|
|
557
557
|
],
|
|
558
558
|
"description": "A server-rendered route with optional shorthand `entry` info (as specified in `AppConfig`/`cloudpack.config.json`). The route is rendered by a custom server script in Cloudpack."
|
|
559
559
|
},
|
|
560
|
-
"ExpandedSourcePath": {
|
|
561
|
-
"type": "object",
|
|
562
|
-
"properties": {
|
|
563
|
-
"sourcePath": {
|
|
564
|
-
"type": "string",
|
|
565
|
-
"description": "The relative path to the source file. (e.g. `./src/index.ts`)"
|
|
566
|
-
},
|
|
567
|
-
"importPath": {
|
|
568
|
-
"type": "string",
|
|
569
|
-
"description": "The path to import the resulting bundled output from. This would represent the key in the import map entry to be imported. (e.g. `.` represents the default package export.)"
|
|
570
|
-
},
|
|
571
|
-
"requestPath": {
|
|
572
|
-
"type": "string",
|
|
573
|
-
"description": "The path to be requested by the browser. This would present the value in the import map entry to be requested. (e.g. `./lib/index.js`)"
|
|
574
|
-
}
|
|
575
|
-
},
|
|
576
|
-
"required": [
|
|
577
|
-
"sourcePath",
|
|
578
|
-
"importPath",
|
|
579
|
-
"requestPath"
|
|
580
|
-
],
|
|
581
|
-
"additionalProperties": false
|
|
582
|
-
},
|
|
583
560
|
"StaticRoute": {
|
|
584
561
|
"type": "object",
|
|
585
562
|
"properties": {
|
|
@@ -612,9 +589,12 @@
|
|
|
612
589
|
"BootstrapRoute": {
|
|
613
590
|
"type": "object",
|
|
614
591
|
"properties": {
|
|
615
|
-
"
|
|
616
|
-
"type": "
|
|
617
|
-
"
|
|
592
|
+
"entry": {
|
|
593
|
+
"type": "array",
|
|
594
|
+
"items": {
|
|
595
|
+
"$ref": "#/definitions/ExpandedSourcePath"
|
|
596
|
+
},
|
|
597
|
+
"description": "To be implemented. The source entry or entries to be included on the page for this route."
|
|
618
598
|
},
|
|
619
599
|
"match": {
|
|
620
600
|
"anyOf": [
|
|
@@ -642,6 +622,29 @@
|
|
|
642
622
|
"additionalProperties": false,
|
|
643
623
|
"description": "A route that serves a bootstrap script."
|
|
644
624
|
},
|
|
625
|
+
"ExpandedSourcePath": {
|
|
626
|
+
"type": "object",
|
|
627
|
+
"properties": {
|
|
628
|
+
"sourcePath": {
|
|
629
|
+
"type": "string",
|
|
630
|
+
"description": "The relative path to the source file. (e.g. `./src/index.ts`)"
|
|
631
|
+
},
|
|
632
|
+
"importPath": {
|
|
633
|
+
"type": "string",
|
|
634
|
+
"description": "The path to import the resulting bundled output from. This would represent the key in the import map entry to be imported. (e.g. `.` represents the default package export.)"
|
|
635
|
+
},
|
|
636
|
+
"requestPath": {
|
|
637
|
+
"type": "string",
|
|
638
|
+
"description": "The path to be requested by the browser. This would present the value in the import map entry to be requested. (e.g. `./lib/index.js`)"
|
|
639
|
+
}
|
|
640
|
+
},
|
|
641
|
+
"required": [
|
|
642
|
+
"sourcePath",
|
|
643
|
+
"importPath",
|
|
644
|
+
"requestPath"
|
|
645
|
+
],
|
|
646
|
+
"additionalProperties": false
|
|
647
|
+
},
|
|
645
648
|
"RedirectRoute": {
|
|
646
649
|
"type": "object",
|
|
647
650
|
"properties": {
|
|
@@ -9,13 +9,6 @@
|
|
|
9
9
|
},
|
|
10
10
|
"description": "Settings to customize how packages are bundled. For the generated config, these should just contain generated exports maps."
|
|
11
11
|
},
|
|
12
|
-
"packageOverrides": {
|
|
13
|
-
"type": "array",
|
|
14
|
-
"items": {
|
|
15
|
-
"$ref": "#/definitions/PackageOverride"
|
|
16
|
-
},
|
|
17
|
-
"deprecated": "Use `packageSettings` instead."
|
|
18
|
-
},
|
|
19
12
|
"$schema": {
|
|
20
13
|
"type": "string"
|
|
21
14
|
}
|
|
@@ -265,597 +258,6 @@
|
|
|
265
258
|
},
|
|
266
259
|
"additionalProperties": false,
|
|
267
260
|
"description": "This is the type that's being used PackageSettings to enable/disable bundler capabilities. It's a partial of the InternalBundlerCapabilities with the value being the options object or false. If the value is false, the capability will be disabled for the package."
|
|
268
|
-
},
|
|
269
|
-
"PackageOverride": {
|
|
270
|
-
"type": "object",
|
|
271
|
-
"properties": {
|
|
272
|
-
"name": {
|
|
273
|
-
"type": "string"
|
|
274
|
-
},
|
|
275
|
-
"versionRequirement": {
|
|
276
|
-
"type": "string"
|
|
277
|
-
},
|
|
278
|
-
"isInternal": {
|
|
279
|
-
"type": "boolean"
|
|
280
|
-
},
|
|
281
|
-
"overrides": {
|
|
282
|
-
"$ref": "#/definitions/PackageJson"
|
|
283
|
-
}
|
|
284
|
-
},
|
|
285
|
-
"required": [
|
|
286
|
-
"name",
|
|
287
|
-
"versionRequirement",
|
|
288
|
-
"overrides"
|
|
289
|
-
],
|
|
290
|
-
"additionalProperties": false
|
|
291
|
-
},
|
|
292
|
-
"PackageJson": {
|
|
293
|
-
"type": "object",
|
|
294
|
-
"properties": {
|
|
295
|
-
"name": {
|
|
296
|
-
"type": "string",
|
|
297
|
-
"description": "The name of the package."
|
|
298
|
-
},
|
|
299
|
-
"description": {
|
|
300
|
-
"type": "string",
|
|
301
|
-
"description": "A description of the package."
|
|
302
|
-
},
|
|
303
|
-
"version": {
|
|
304
|
-
"type": "string",
|
|
305
|
-
"description": "Package semantic version."
|
|
306
|
-
},
|
|
307
|
-
"files": {
|
|
308
|
-
"type": "array",
|
|
309
|
-
"items": {
|
|
310
|
-
"type": "string"
|
|
311
|
-
},
|
|
312
|
-
"description": "The files included in the package."
|
|
313
|
-
},
|
|
314
|
-
"directories": {
|
|
315
|
-
"type": "object",
|
|
316
|
-
"properties": {
|
|
317
|
-
"bin": {
|
|
318
|
-
"type": "string"
|
|
319
|
-
},
|
|
320
|
-
"lib": {
|
|
321
|
-
"type": "string"
|
|
322
|
-
}
|
|
323
|
-
},
|
|
324
|
-
"additionalProperties": {
|
|
325
|
-
"anyOf": [
|
|
326
|
-
{
|
|
327
|
-
"type": "string"
|
|
328
|
-
},
|
|
329
|
-
{
|
|
330
|
-
"not": {}
|
|
331
|
-
}
|
|
332
|
-
]
|
|
333
|
-
},
|
|
334
|
-
"description": "Indicates the structure of the package. https://docs.npmjs.com/cli/v9/configuring-npm/package-json#directories"
|
|
335
|
-
},
|
|
336
|
-
"type": {
|
|
337
|
-
"type": "string",
|
|
338
|
-
"enum": [
|
|
339
|
-
"module",
|
|
340
|
-
"commonjs"
|
|
341
|
-
],
|
|
342
|
-
"description": "Resolution algorithm for importing \".js\" files from the package's scope. https://nodejs.org/api/esm.html#esm_package_json_type_field"
|
|
343
|
-
},
|
|
344
|
-
"main": {
|
|
345
|
-
"type": "string",
|
|
346
|
-
"description": "The module ID that is the primary entry point to the package."
|
|
347
|
-
},
|
|
348
|
-
"module": {
|
|
349
|
-
"type": "string",
|
|
350
|
-
"description": "An ECMAScript module ID that is the primary entry point to the package."
|
|
351
|
-
},
|
|
352
|
-
"bin": {
|
|
353
|
-
"anyOf": [
|
|
354
|
-
{
|
|
355
|
-
"type": "string"
|
|
356
|
-
},
|
|
357
|
-
{
|
|
358
|
-
"type": "object",
|
|
359
|
-
"additionalProperties": {
|
|
360
|
-
"type": "string"
|
|
361
|
-
},
|
|
362
|
-
"description": "Make all properties in T optional"
|
|
363
|
-
}
|
|
364
|
-
],
|
|
365
|
-
"description": "The executable file(s) for this package."
|
|
366
|
-
},
|
|
367
|
-
"esnext": {
|
|
368
|
-
"anyOf": [
|
|
369
|
-
{
|
|
370
|
-
"type": "string"
|
|
371
|
-
},
|
|
372
|
-
{
|
|
373
|
-
"type": "object",
|
|
374
|
-
"properties": {
|
|
375
|
-
"main": {
|
|
376
|
-
"type": "string"
|
|
377
|
-
},
|
|
378
|
-
"browser": {
|
|
379
|
-
"type": "string"
|
|
380
|
-
}
|
|
381
|
-
},
|
|
382
|
-
"additionalProperties": {
|
|
383
|
-
"anyOf": [
|
|
384
|
-
{
|
|
385
|
-
"type": "string"
|
|
386
|
-
},
|
|
387
|
-
{
|
|
388
|
-
"not": {}
|
|
389
|
-
}
|
|
390
|
-
]
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
],
|
|
394
|
-
"description": "A module ID with untranspiled code that is the primary entry point to the package."
|
|
395
|
-
},
|
|
396
|
-
"browser": {
|
|
397
|
-
"anyOf": [
|
|
398
|
-
{
|
|
399
|
-
"type": "string"
|
|
400
|
-
},
|
|
401
|
-
{
|
|
402
|
-
"type": "object",
|
|
403
|
-
"additionalProperties": {
|
|
404
|
-
"type": "boolean",
|
|
405
|
-
"enum": [
|
|
406
|
-
false
|
|
407
|
-
]
|
|
408
|
-
},
|
|
409
|
-
"description": "Make all properties in T optional"
|
|
410
|
-
}
|
|
411
|
-
],
|
|
412
|
-
"description": "A hint to JavaScript bundlers or component tools when packaging modules for client side use."
|
|
413
|
-
},
|
|
414
|
-
"sideEffects": {
|
|
415
|
-
"anyOf": [
|
|
416
|
-
{
|
|
417
|
-
"type": "boolean"
|
|
418
|
-
},
|
|
419
|
-
{
|
|
420
|
-
"type": "array",
|
|
421
|
-
"items": {
|
|
422
|
-
"type": "string"
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
],
|
|
426
|
-
"description": "Denote which files in the package have side effects and may not be pruned by bundlers, even if unused. If a boolean, applies to all files in the package. `false` indicates there are no side effects. https://webpack.js.org/guides/tree-shaking/"
|
|
427
|
-
},
|
|
428
|
-
"types": {
|
|
429
|
-
"type": "string",
|
|
430
|
-
"description": "Location of the bundled TypeScript declaration file."
|
|
431
|
-
},
|
|
432
|
-
"typings": {
|
|
433
|
-
"type": "string",
|
|
434
|
-
"description": "Location of the bundled TypeScript declaration file. Alias of `types`."
|
|
435
|
-
},
|
|
436
|
-
"typesVersions": {
|
|
437
|
-
"type": "object",
|
|
438
|
-
"additionalProperties": {
|
|
439
|
-
"type": "object",
|
|
440
|
-
"additionalProperties": {
|
|
441
|
-
"type": "array",
|
|
442
|
-
"items": {
|
|
443
|
-
"type": "string"
|
|
444
|
-
}
|
|
445
|
-
},
|
|
446
|
-
"description": "Make all properties in T optional"
|
|
447
|
-
},
|
|
448
|
-
"description": "Location of TypeScript declaration files for different TypeScript versions."
|
|
449
|
-
},
|
|
450
|
-
"exports": {
|
|
451
|
-
"$ref": "#/definitions/PackageJsonExports",
|
|
452
|
-
"description": "Subpath exports to define entry points of the package. https://nodejs.org/api/packages.html#subpath-exports"
|
|
453
|
-
},
|
|
454
|
-
"imports": {
|
|
455
|
-
"$ref": "#/definitions/PackageJsonImports",
|
|
456
|
-
"description": "Subpath imports to define internal package import maps that only apply to import specifiers from within the package itself. https://nodejs.org/api/packages.html#subpath-imports"
|
|
457
|
-
},
|
|
458
|
-
"dependencies": {
|
|
459
|
-
"$ref": "#/definitions/PackageJsonDependencies",
|
|
460
|
-
"description": "Dependencies that will be installed when the package is consumed."
|
|
461
|
-
},
|
|
462
|
-
"devDependencies": {
|
|
463
|
-
"$ref": "#/definitions/PackageJsonDependencies",
|
|
464
|
-
"description": "Dependencies for local development only."
|
|
465
|
-
},
|
|
466
|
-
"peerDependencies": {
|
|
467
|
-
"$ref": "#/definitions/PackageJsonDependencies",
|
|
468
|
-
"description": "Dependencies that must be installed alongside this package when consumed."
|
|
469
|
-
},
|
|
470
|
-
"peerDependenciesMeta": {
|
|
471
|
-
"type": "object",
|
|
472
|
-
"additionalProperties": {
|
|
473
|
-
"type": "object",
|
|
474
|
-
"properties": {
|
|
475
|
-
"optional": {
|
|
476
|
-
"type": "boolean",
|
|
477
|
-
"const": true
|
|
478
|
-
}
|
|
479
|
-
},
|
|
480
|
-
"required": [
|
|
481
|
-
"optional"
|
|
482
|
-
],
|
|
483
|
-
"additionalProperties": false
|
|
484
|
-
},
|
|
485
|
-
"description": "Indicates which peer dependencies are optional."
|
|
486
|
-
},
|
|
487
|
-
"optionalDependencies": {
|
|
488
|
-
"$ref": "#/definitions/PackageJsonDependencies"
|
|
489
|
-
},
|
|
490
|
-
"bundledDependencies": {
|
|
491
|
-
"anyOf": [
|
|
492
|
-
{
|
|
493
|
-
"$ref": "#/definitions/PackageJsonDependencies"
|
|
494
|
-
},
|
|
495
|
-
{
|
|
496
|
-
"type": "array",
|
|
497
|
-
"items": {
|
|
498
|
-
"type": "string"
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
]
|
|
502
|
-
},
|
|
503
|
-
"bundleDependencies": {
|
|
504
|
-
"anyOf": [
|
|
505
|
-
{
|
|
506
|
-
"$ref": "#/definitions/PackageJsonDependencies"
|
|
507
|
-
},
|
|
508
|
-
{
|
|
509
|
-
"type": "array",
|
|
510
|
-
"items": {
|
|
511
|
-
"type": "string"
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
]
|
|
515
|
-
},
|
|
516
|
-
"resolutions": {
|
|
517
|
-
"$ref": "#/definitions/PackageJsonDependencies"
|
|
518
|
-
},
|
|
519
|
-
"engines": {
|
|
520
|
-
"type": "object",
|
|
521
|
-
"properties": {
|
|
522
|
-
"npm": {
|
|
523
|
-
"type": "string"
|
|
524
|
-
},
|
|
525
|
-
"node": {
|
|
526
|
-
"type": "string"
|
|
527
|
-
}
|
|
528
|
-
},
|
|
529
|
-
"additionalProperties": {
|
|
530
|
-
"type": "string"
|
|
531
|
-
},
|
|
532
|
-
"description": "Required engine versions for running this package."
|
|
533
|
-
},
|
|
534
|
-
"os": {
|
|
535
|
-
"type": "array",
|
|
536
|
-
"items": {
|
|
537
|
-
"$ref": "#/definitions/LiteralOrString%3C(%22aix%22%7C%22darwin%22%7C%22freebsd%22%7C%22linux%22%7C%22openbsd%22%7C%22sunos%22%7C%22win32%22%7C%22!aix%22%7C%22!darwin%22%7C%22!freebsd%22%7C%22!linux%22%7C%22!openbsd%22%7C%22!sunos%22%7C%22!win32%22)%3E"
|
|
538
|
-
},
|
|
539
|
-
"description": "Operating systems the package can run on."
|
|
540
|
-
},
|
|
541
|
-
"cpu": {
|
|
542
|
-
"type": "array",
|
|
543
|
-
"items": {
|
|
544
|
-
"$ref": "#/definitions/LiteralOrString%3C(%22arm%22%7C%22arm64%22%7C%22ia32%22%7C%22mips%22%7C%22mipsel%22%7C%22ppc%22%7C%22ppc64%22%7C%22s390%22%7C%22s390x%22%7C%22x32%22%7C%22x64%22%7C%22!arm%22%7C%22!arm64%22%7C%22!ia32%22%7C%22!mips%22%7C%22!mipsel%22%7C%22!ppc%22%7C%22!ppc64%22%7C%22!s390%22%7C%22!s390x%22%7C%22!x32%22%7C%22!x64%22)%3E"
|
|
545
|
-
},
|
|
546
|
-
"description": "CPU architectures the package can run on."
|
|
547
|
-
},
|
|
548
|
-
"private": {
|
|
549
|
-
"type": "boolean",
|
|
550
|
-
"description": "If `true`, this package cannot be published."
|
|
551
|
-
},
|
|
552
|
-
"publishConfig": {
|
|
553
|
-
"type": "object",
|
|
554
|
-
"properties": {
|
|
555
|
-
"access": {
|
|
556
|
-
"type": "string",
|
|
557
|
-
"enum": [
|
|
558
|
-
"public",
|
|
559
|
-
"restricted"
|
|
560
|
-
]
|
|
561
|
-
},
|
|
562
|
-
"registry": {
|
|
563
|
-
"type": "string"
|
|
564
|
-
},
|
|
565
|
-
"tag": {
|
|
566
|
-
"type": "string"
|
|
567
|
-
}
|
|
568
|
-
},
|
|
569
|
-
"additionalProperties": {},
|
|
570
|
-
"description": "A set of config values that will be used during publishing. https://docs.npmjs.com/cli/v7/configuring-npm/package-json#publishconfig"
|
|
571
|
-
},
|
|
572
|
-
"packageManager": {
|
|
573
|
-
"type": "string",
|
|
574
|
-
"description": "Defines which package manager is expected to be used when working on the current project. https://nodejs.org/api/corepack.html"
|
|
575
|
-
},
|
|
576
|
-
"workspaces": {
|
|
577
|
-
"anyOf": [
|
|
578
|
-
{
|
|
579
|
-
"type": "array",
|
|
580
|
-
"items": {
|
|
581
|
-
"type": "string"
|
|
582
|
-
}
|
|
583
|
-
},
|
|
584
|
-
{
|
|
585
|
-
"type": "object",
|
|
586
|
-
"properties": {
|
|
587
|
-
"packages": {
|
|
588
|
-
"type": "array",
|
|
589
|
-
"items": {
|
|
590
|
-
"type": "string"
|
|
591
|
-
},
|
|
592
|
-
"description": "An array of workspace pattern strings which contain the workspace packages."
|
|
593
|
-
},
|
|
594
|
-
"nohoist": {
|
|
595
|
-
"type": "array",
|
|
596
|
-
"items": {
|
|
597
|
-
"type": "string"
|
|
598
|
-
},
|
|
599
|
-
"description": "Prevent hoisting of these dependencies within the workspace (yarn only). https://classic.yarnpkg.com/blog/2018/02/15/nohoist/)"
|
|
600
|
-
}
|
|
601
|
-
},
|
|
602
|
-
"additionalProperties": false
|
|
603
|
-
}
|
|
604
|
-
],
|
|
605
|
-
"description": "Configuration for npm or yarn workspaces."
|
|
606
|
-
},
|
|
607
|
-
"cloudpack": {
|
|
608
|
-
"type": "object",
|
|
609
|
-
"additionalProperties": false,
|
|
610
|
-
"properties": {
|
|
611
|
-
"mode": {
|
|
612
|
-
"$ref": "#/definitions/BundleMode"
|
|
613
|
-
},
|
|
614
|
-
"includedDependencies": {
|
|
615
|
-
"type": "array",
|
|
616
|
-
"items": {
|
|
617
|
-
"type": "string"
|
|
618
|
-
},
|
|
619
|
-
"description": "The dependencies which should be included when computing the import map. This is primarily used when devDependencies are needed by the app. This often happens when a library has a demo app which relies on devDependencies. Accepts `$devDependencies` as a special value to include all devDependencies."
|
|
620
|
-
},
|
|
621
|
-
"excludedDependencies": {
|
|
622
|
-
"type": "array",
|
|
623
|
-
"items": {
|
|
624
|
-
"type": "string"
|
|
625
|
-
},
|
|
626
|
-
"description": "The dependencies which should be ignored by Cloudpack verbs. For example, if \"react-native\" is a dependency which should not be included in the import map or evaluated during `init`, it can be listed here to ignore it. Accepts `$peerDependencies` as a special value to exclude all peerDependencies."
|
|
627
|
-
},
|
|
628
|
-
"inlinedDependencies": {
|
|
629
|
-
"type": "array",
|
|
630
|
-
"items": {
|
|
631
|
-
"type": "string"
|
|
632
|
-
},
|
|
633
|
-
"description": "Dependencies which should be inlined in the library bundled by Cloudpack. This is useful for libraries which are small and don't need to be loaded separately, or ones which have issues being resolved by the browser."
|
|
634
|
-
},
|
|
635
|
-
"exports": {
|
|
636
|
-
"$ref": "#/definitions/PackageJsonExports",
|
|
637
|
-
"description": "The exports map that should be used for this package, ignoring entries which are defined in the original package.json. This is useful for libraries which have a missing or broken exports map, or when we want to trim the exports to reduce the api surface we expose to the inner loop experience."
|
|
638
|
-
},
|
|
639
|
-
"bundler": {
|
|
640
|
-
"type": "string",
|
|
641
|
-
"description": "Forces the package to be bundled using a specific bundler."
|
|
642
|
-
},
|
|
643
|
-
"bundlerType": {
|
|
644
|
-
"type": "string",
|
|
645
|
-
"deprecated": "Use `bundler`.\n\nThis should be removed once repo configs are updated to use `bundler`."
|
|
646
|
-
},
|
|
647
|
-
"bundlerOptions": {
|
|
648
|
-
"type": "object",
|
|
649
|
-
"additionalProperties": {},
|
|
650
|
-
"description": "Any bundler-specific options to be merged with the calculated bundler options. `bundler` is also required if this is specified.\n\nThis is an escape hatch which is generally not recommended, since it locks the package to a specific bundler implementation."
|
|
651
|
-
},
|
|
652
|
-
"inputPaths": {
|
|
653
|
-
"type": "array",
|
|
654
|
-
"items": {
|
|
655
|
-
"type": "string"
|
|
656
|
-
},
|
|
657
|
-
"description": "Paths used for file monitoring and input hashing. Supports glob matching. Defaults to `[/src/**, *.json]` and excludes node_modules. Use `...` to include the default paths."
|
|
658
|
-
},
|
|
659
|
-
"ignoreMissingExports": {
|
|
660
|
-
"anyOf": [
|
|
661
|
-
{
|
|
662
|
-
"type": "boolean"
|
|
663
|
-
},
|
|
664
|
-
{
|
|
665
|
-
"type": "object",
|
|
666
|
-
"additionalProperties": {
|
|
667
|
-
"type": "array",
|
|
668
|
-
"items": {
|
|
669
|
-
"type": "string"
|
|
670
|
-
}
|
|
671
|
-
},
|
|
672
|
-
"description": "Construct a type with a set of properties K of type T"
|
|
673
|
-
}
|
|
674
|
-
],
|
|
675
|
-
"description": "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: - To ignore top-level exports: `{ \".\": [\"badName\"] }` - To ignore exports from another path: `{ \"./lib/foo\": [\"badName\"] }`"
|
|
676
|
-
},
|
|
677
|
-
"dynamicImports": {
|
|
678
|
-
"type": "array",
|
|
679
|
-
"items": {
|
|
680
|
-
"type": "string"
|
|
681
|
-
},
|
|
682
|
-
"description": "Only relevant for packages bundled with rollup: globs of files that include dynamic (async) imports with non-literal paths, to be processed by `@rollup/plugin-dynamic-import-vars` (subject to that plugin's [limitations](https://www.npmjs.com/package/\\@rollup/plugin-dynamic-import-vars#limitations)). Files matching `*.dynamic.*` are automatically included.\n\nThis is not needed for ori/esbuild and webpack because they should handle these types of imports automatically."
|
|
683
|
-
},
|
|
684
|
-
"ignoredBundlerWarnings": {
|
|
685
|
-
"type": "array",
|
|
686
|
-
"items": {
|
|
687
|
-
"type": "string"
|
|
688
|
-
},
|
|
689
|
-
"description": "Ignore these warning messages from the bundler (partial string matches). This is intended for non-actionable messages from external dependencies which can't easily be fixed, to avoid confusing users."
|
|
690
|
-
},
|
|
691
|
-
"link": {
|
|
692
|
-
"type": "object",
|
|
693
|
-
"properties": {
|
|
694
|
-
"duplicatedDependencyBehavior": {
|
|
695
|
-
"type": "string",
|
|
696
|
-
"enum": [
|
|
697
|
-
"force-host-version",
|
|
698
|
-
"allow-duplication",
|
|
699
|
-
"force-remote-version"
|
|
700
|
-
],
|
|
701
|
-
"description": "Controls the behavior of duplicated dependencies in the resolve map by link. By default, `allow-duplication` is used, which allows multiple versions of the same package to exist in the resolve map to satisfy the semver. If `force-host-version` is used, the package will be deduplicated to the version of the host package ignoring semver requirements. If `force-remote-version` is used, the package will be deduplicated to the version of the remote package ignoring semver requirements."
|
|
702
|
-
}
|
|
703
|
-
},
|
|
704
|
-
"additionalProperties": false,
|
|
705
|
-
"description": "Setting to control how the package is linked in the resolve map."
|
|
706
|
-
},
|
|
707
|
-
"bundlerCapabilities": {
|
|
708
|
-
"$ref": "#/definitions/BundlerCapabilitiesOptions",
|
|
709
|
-
"description": "Setting to control the bundler capabilities for this package. This is used to enable or disable specific bundler capabilities."
|
|
710
|
-
}
|
|
711
|
-
},
|
|
712
|
-
"required": [
|
|
713
|
-
"mode"
|
|
714
|
-
],
|
|
715
|
-
"description": "Cached result of calling `getPackageSettings` for this package.\n\nThis should NOT be used during init's analysis of the bundle result, since it might be out of date due to pending generated settings updates. (If a package is re-enqueued after analysis due to generated settings updates, we refresh the definition, which updates these cached setting. So it's safe to use again on the next bundle attempt.)"
|
|
716
|
-
}
|
|
717
|
-
},
|
|
718
|
-
"additionalProperties": false,
|
|
719
|
-
"description": "Types for the `package.json` file, derived from [`type-fest`](https://github.com/sindresorhus/type-fest/blob/main/source/package-json.d.ts).\n\nThis version intentionally does not permit arbitrary keys, and focuses on properties that are potentially relevant to Cloudpack. Additional properties can be added as needed."
|
|
720
|
-
},
|
|
721
|
-
"PackageJsonImports": {
|
|
722
|
-
"type": "object",
|
|
723
|
-
"additionalProperties": {
|
|
724
|
-
"anyOf": [
|
|
725
|
-
{
|
|
726
|
-
"type": "string"
|
|
727
|
-
},
|
|
728
|
-
{
|
|
729
|
-
"type": "object",
|
|
730
|
-
"properties": {
|
|
731
|
-
"browser": {
|
|
732
|
-
"$ref": "#/definitions/PackageJsonExports"
|
|
733
|
-
},
|
|
734
|
-
"default": {
|
|
735
|
-
"$ref": "#/definitions/PackageJsonExports"
|
|
736
|
-
},
|
|
737
|
-
"deno": {
|
|
738
|
-
"$ref": "#/definitions/PackageJsonExports"
|
|
739
|
-
},
|
|
740
|
-
"electron": {
|
|
741
|
-
"$ref": "#/definitions/PackageJsonExports"
|
|
742
|
-
},
|
|
743
|
-
"import": {
|
|
744
|
-
"$ref": "#/definitions/PackageJsonExports"
|
|
745
|
-
},
|
|
746
|
-
"module": {
|
|
747
|
-
"$ref": "#/definitions/PackageJsonExports"
|
|
748
|
-
},
|
|
749
|
-
"node-addons": {
|
|
750
|
-
"$ref": "#/definitions/PackageJsonExports"
|
|
751
|
-
},
|
|
752
|
-
"node": {
|
|
753
|
-
"$ref": "#/definitions/PackageJsonExports"
|
|
754
|
-
},
|
|
755
|
-
"react-native": {
|
|
756
|
-
"$ref": "#/definitions/PackageJsonExports"
|
|
757
|
-
},
|
|
758
|
-
"require": {
|
|
759
|
-
"$ref": "#/definitions/PackageJsonExports"
|
|
760
|
-
}
|
|
761
|
-
},
|
|
762
|
-
"required": [
|
|
763
|
-
"browser",
|
|
764
|
-
"default",
|
|
765
|
-
"deno",
|
|
766
|
-
"electron",
|
|
767
|
-
"import",
|
|
768
|
-
"module",
|
|
769
|
-
"node-addons",
|
|
770
|
-
"node",
|
|
771
|
-
"react-native",
|
|
772
|
-
"require"
|
|
773
|
-
],
|
|
774
|
-
"additionalProperties": {
|
|
775
|
-
"$ref": "#/definitions/PackageJsonExports"
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
]
|
|
779
|
-
},
|
|
780
|
-
"description": "Import map entries of a module, optionally with conditions."
|
|
781
|
-
},
|
|
782
|
-
"PackageJsonDependencies": {
|
|
783
|
-
"type": "object",
|
|
784
|
-
"additionalProperties": {
|
|
785
|
-
"type": "string"
|
|
786
|
-
},
|
|
787
|
-
"description": "Mapping from dependency name to semver spec."
|
|
788
|
-
},
|
|
789
|
-
"LiteralOrString<(\"aix\"|\"darwin\"|\"freebsd\"|\"linux\"|\"openbsd\"|\"sunos\"|\"win32\"|\"!aix\"|\"!darwin\"|\"!freebsd\"|\"!linux\"|\"!openbsd\"|\"!sunos\"|\"!win32\")>": {
|
|
790
|
-
"anyOf": [
|
|
791
|
-
{
|
|
792
|
-
"type": "string"
|
|
793
|
-
},
|
|
794
|
-
{
|
|
795
|
-
"type": "string",
|
|
796
|
-
"enum": [
|
|
797
|
-
"aix",
|
|
798
|
-
"darwin",
|
|
799
|
-
"freebsd",
|
|
800
|
-
"linux",
|
|
801
|
-
"openbsd",
|
|
802
|
-
"sunos",
|
|
803
|
-
"win32",
|
|
804
|
-
"!aix",
|
|
805
|
-
"!darwin",
|
|
806
|
-
"!freebsd",
|
|
807
|
-
"!linux",
|
|
808
|
-
"!openbsd",
|
|
809
|
-
"!sunos",
|
|
810
|
-
"!win32"
|
|
811
|
-
]
|
|
812
|
-
}
|
|
813
|
-
],
|
|
814
|
-
"description": "Union type which has intellisense for specific keys but also allows arbitrary strings. This is a workaround for a [TypeScript issue](https://github.com/Microsoft/TypeScript/issues/29729)"
|
|
815
|
-
},
|
|
816
|
-
"LiteralOrString<(\"arm\"|\"arm64\"|\"ia32\"|\"mips\"|\"mipsel\"|\"ppc\"|\"ppc64\"|\"s390\"|\"s390x\"|\"x32\"|\"x64\"|\"!arm\"|\"!arm64\"|\"!ia32\"|\"!mips\"|\"!mipsel\"|\"!ppc\"|\"!ppc64\"|\"!s390\"|\"!s390x\"|\"!x32\"|\"!x64\")>": {
|
|
817
|
-
"anyOf": [
|
|
818
|
-
{
|
|
819
|
-
"type": "string"
|
|
820
|
-
},
|
|
821
|
-
{
|
|
822
|
-
"type": "string",
|
|
823
|
-
"enum": [
|
|
824
|
-
"arm",
|
|
825
|
-
"arm64",
|
|
826
|
-
"ia32",
|
|
827
|
-
"mips",
|
|
828
|
-
"mipsel",
|
|
829
|
-
"ppc",
|
|
830
|
-
"ppc64",
|
|
831
|
-
"s390",
|
|
832
|
-
"s390x",
|
|
833
|
-
"x32",
|
|
834
|
-
"x64",
|
|
835
|
-
"!arm",
|
|
836
|
-
"!arm64",
|
|
837
|
-
"!ia32",
|
|
838
|
-
"!mips",
|
|
839
|
-
"!mipsel",
|
|
840
|
-
"!ppc",
|
|
841
|
-
"!ppc64",
|
|
842
|
-
"!s390",
|
|
843
|
-
"!s390x",
|
|
844
|
-
"!x32",
|
|
845
|
-
"!x64"
|
|
846
|
-
]
|
|
847
|
-
}
|
|
848
|
-
],
|
|
849
|
-
"description": "Union type which has intellisense for specific keys but also allows arbitrary strings. This is a workaround for a [TypeScript issue](https://github.com/Microsoft/TypeScript/issues/29729)"
|
|
850
|
-
},
|
|
851
|
-
"BundleMode": {
|
|
852
|
-
"type": "string",
|
|
853
|
-
"enum": [
|
|
854
|
-
"library",
|
|
855
|
-
"development",
|
|
856
|
-
"production"
|
|
857
|
-
],
|
|
858
|
-
"description": "The mode of the session controls how the code is bundled. Library mode bundles each package in isolation, while development and production modes bundle the full app graph together. Library mode is fastest but packages must be complaint for loading in the browser."
|
|
859
261
|
}
|
|
860
262
|
}
|
|
861
263
|
}
|
package/schema/UserConfig.json
CHANGED
|
@@ -535,21 +535,21 @@
|
|
|
535
535
|
},
|
|
536
536
|
"exportEntry": {
|
|
537
537
|
"type": "string",
|
|
538
|
-
"
|
|
538
|
+
"deprecated": "- The key in the exports map which represents the entry point app script for this route.\nDefault is '.', meaning the main package export key."
|
|
539
539
|
},
|
|
540
540
|
"entry": {
|
|
541
|
-
"
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
541
|
+
"anyOf": [
|
|
542
|
+
{
|
|
543
|
+
"type": "string"
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
"type": "array",
|
|
547
|
+
"items": {
|
|
545
548
|
"type": "string"
|
|
546
|
-
},
|
|
547
|
-
{
|
|
548
|
-
"$ref": "#/definitions/ExpandedSourcePath"
|
|
549
549
|
}
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
"description": "
|
|
550
|
+
}
|
|
551
|
+
],
|
|
552
|
+
"description": "The source entry or entries to be included on the page for this route."
|
|
553
553
|
}
|
|
554
554
|
},
|
|
555
555
|
"additionalProperties": false,
|
|
@@ -558,29 +558,6 @@
|
|
|
558
558
|
],
|
|
559
559
|
"description": "A server-rendered route with optional shorthand `entry` info (as specified in `AppConfig`/`cloudpack.config.json`). The route is rendered by a custom server script in Cloudpack."
|
|
560
560
|
},
|
|
561
|
-
"ExpandedSourcePath": {
|
|
562
|
-
"type": "object",
|
|
563
|
-
"properties": {
|
|
564
|
-
"sourcePath": {
|
|
565
|
-
"type": "string",
|
|
566
|
-
"description": "The relative path to the source file. (e.g. `./src/index.ts`)"
|
|
567
|
-
},
|
|
568
|
-
"importPath": {
|
|
569
|
-
"type": "string",
|
|
570
|
-
"description": "The path to import the resulting bundled output from. This would represent the key in the import map entry to be imported. (e.g. `.` represents the default package export.)"
|
|
571
|
-
},
|
|
572
|
-
"requestPath": {
|
|
573
|
-
"type": "string",
|
|
574
|
-
"description": "The path to be requested by the browser. This would present the value in the import map entry to be requested. (e.g. `./lib/index.js`)"
|
|
575
|
-
}
|
|
576
|
-
},
|
|
577
|
-
"required": [
|
|
578
|
-
"sourcePath",
|
|
579
|
-
"importPath",
|
|
580
|
-
"requestPath"
|
|
581
|
-
],
|
|
582
|
-
"additionalProperties": false
|
|
583
|
-
},
|
|
584
561
|
"StaticRoute": {
|
|
585
562
|
"type": "object",
|
|
586
563
|
"properties": {
|
|
@@ -613,9 +590,12 @@
|
|
|
613
590
|
"BootstrapRoute": {
|
|
614
591
|
"type": "object",
|
|
615
592
|
"properties": {
|
|
616
|
-
"
|
|
617
|
-
"type": "
|
|
618
|
-
"
|
|
593
|
+
"entry": {
|
|
594
|
+
"type": "array",
|
|
595
|
+
"items": {
|
|
596
|
+
"$ref": "#/definitions/ExpandedSourcePath"
|
|
597
|
+
},
|
|
598
|
+
"description": "To be implemented. The source entry or entries to be included on the page for this route."
|
|
619
599
|
},
|
|
620
600
|
"match": {
|
|
621
601
|
"anyOf": [
|
|
@@ -643,6 +623,29 @@
|
|
|
643
623
|
"additionalProperties": false,
|
|
644
624
|
"description": "A route that serves a bootstrap script."
|
|
645
625
|
},
|
|
626
|
+
"ExpandedSourcePath": {
|
|
627
|
+
"type": "object",
|
|
628
|
+
"properties": {
|
|
629
|
+
"sourcePath": {
|
|
630
|
+
"type": "string",
|
|
631
|
+
"description": "The relative path to the source file. (e.g. `./src/index.ts`)"
|
|
632
|
+
},
|
|
633
|
+
"importPath": {
|
|
634
|
+
"type": "string",
|
|
635
|
+
"description": "The path to import the resulting bundled output from. This would represent the key in the import map entry to be imported. (e.g. `.` represents the default package export.)"
|
|
636
|
+
},
|
|
637
|
+
"requestPath": {
|
|
638
|
+
"type": "string",
|
|
639
|
+
"description": "The path to be requested by the browser. This would present the value in the import map entry to be requested. (e.g. `./lib/index.js`)"
|
|
640
|
+
}
|
|
641
|
+
},
|
|
642
|
+
"required": [
|
|
643
|
+
"sourcePath",
|
|
644
|
+
"importPath",
|
|
645
|
+
"requestPath"
|
|
646
|
+
],
|
|
647
|
+
"additionalProperties": false
|
|
648
|
+
},
|
|
646
649
|
"RedirectRoute": {
|
|
647
650
|
"type": "object",
|
|
648
651
|
"properties": {
|
package/lib/PackageOverride.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PackageOverride.d.ts","sourceRoot":"","sources":["../src/PackageOverride.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,WAAW,CAAC;CACxB"}
|
package/lib/PackageOverride.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PackageOverride.js","sourceRoot":"","sources":["../src/PackageOverride.ts"],"names":[],"mappings":"","sourcesContent":["import type { PackageJson } from './PackageJson.js';\n\nexport interface PackageOverride {\n name: string;\n versionRequirement: string;\n isInternal?: boolean;\n overrides: PackageJson;\n}\n"]}
|