@ms-cloudpack/common-types 0.22.0 → 0.23.1
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/PackageSettings.d.ts +6 -3
- package/lib/PackageSettings.d.ts.map +1 -1
- package/lib/PackageSettings.js.map +1 -1
- package/lib/Route.d.ts +11 -1
- package/lib/Route.d.ts.map +1 -1
- package/lib/Route.js.map +1 -1
- package/lib/index.d.ts +2 -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 +58 -31
- package/schema/GeneratedConfig.json +1 -1
- package/schema/UserConfig.json +58 -31
package/lib/PackageSettings.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import type { LinkOptions } from './LinkOptions.js';
|
|
2
2
|
import type { BundlerCapabilitiesOptions } from './BundlerCapability.js';
|
|
3
3
|
import type { PackageJsonExports } from './PackageJson.js';
|
|
4
|
-
interface PackageSettingsMatchObject {
|
|
5
|
-
/**
|
|
4
|
+
export interface PackageSettingsMatchObject {
|
|
5
|
+
/**
|
|
6
|
+
* Name of the package. Can use a trailing wildcard (e.g. `@scope/*`). `*` to match any name.
|
|
7
|
+
*
|
|
8
|
+
* To negate a match, use `!` as the first character (e.g. `!@scope/foo` or `!@scope/*`).
|
|
9
|
+
*/
|
|
6
10
|
name: string;
|
|
7
11
|
/**
|
|
8
12
|
* Version of the package. Unspecified matches any version.
|
|
@@ -124,5 +128,4 @@ export type GeneratedPackageSettings = Pick<PackageSettings, 'includedDependenci
|
|
|
124
128
|
*/
|
|
125
129
|
match: string | Required<PackageSettingsMatchObject>;
|
|
126
130
|
};
|
|
127
|
-
export {};
|
|
128
131
|
//# sourceMappingURL=PackageSettings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PackageSettings.d.ts","sourceRoot":"","sources":["../src/PackageSettings.ts"],"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AE,CAAC;IAEtB;;;;;;OAMG;IACH,oBAAoB,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAE1D;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAE1B;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAC;IAElC;;OAEG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IAEnB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,0BAA0B,CAAC;CAClD;AAED;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,IAAI,CACzC,eAAe,EACf,sBAAsB,GAAG,sBAAsB,GAAG,gBAAgB,GAAG,SAAS,CAC/E,GAAG;IACF;;;OAGG;IACH,KAAK,EAAE,MAAM,GAAG,QAAQ,CAAC,0BAA0B,CAAC,CAAC;CACtD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PackageSettings.js","sourceRoot":"","sources":["../src/PackageSettings.ts"],"names":[],"mappings":"","sourcesContent":["import type { LinkOptions } from './LinkOptions.js';\nimport type { BundlerCapabilitiesOptions } from './BundlerCapability.js';\nimport type { PackageJsonExports } from './PackageJson.js';\n\
|
|
1
|
+
{"version":3,"file":"PackageSettings.js","sourceRoot":"","sources":["../src/PackageSettings.ts"],"names":[],"mappings":"","sourcesContent":["import type { LinkOptions } from './LinkOptions.js';\nimport type { BundlerCapabilitiesOptions } from './BundlerCapability.js';\nimport type { PackageJsonExports } from './PackageJson.js';\n\nexport interface PackageSettingsMatchObject {\n /**\n * Name of the package. Can use a trailing wildcard (e.g. `@scope/*`). `*` to match any name.\n *\n * To negate a match, use `!` as the first character (e.g. `!@scope/foo` or `!@scope/*`).\n */\n name: string;\n\n /**\n * Version of the package. Unspecified matches any version.\n *\n * Note that if the package version is a prerelease, it will only match `*` or ranges that\n * explicitly include prereleases. For example, `^1.0.0` will not match `1.0.1-beta.0`.\n */\n version?: string;\n}\n\n/**\n * Which package(s) the settings should be applied to.\n * A string is a shorthand for matching the name with any version (`*` to match any name).\n */\nexport type PackageSettingsMatch = string | PackageSettingsMatchObject;\n\n/**\n * Settings overrides for bundling a package (or multiple packages, depending on `match`).\n */\nexport interface PackageSettings {\n /**\n * Which package(s) the settings should be applied to.\n * A string is a shorthand for matching the name with any version (`*` to match any name).\n * An array allows multiple matches to be specified.\n */\n match: PackageSettingsMatch | PackageSettingsMatch[];\n\n /**\n * The dependencies which should be included when computing the import map. This is primarily used when\n * devDependencies are needed by the app. This often happens when a library has a demo app which relies\n * on devDependencies.\n *\n * Accepts `$devDependencies` as a special value to include all devDependencies.\n */\n includedDependencies?: string[];\n\n /**\n * The dependencies which should be ignored by Cloudpack verbs. For example, if \"react-native\" is a dependency\n * which should not be included in the import map or evaluated during `init`, it can be listed here to ignore it.\n *\n * Accepts `$peerDependencies` as a special value to exclude all peerDependencies.\n */\n excludedDependencies?: string[];\n\n /**\n * Dependencies which should be inlined in the library bundled by Cloudpack. This is useful for\n * libraries which are small and don't need to be loaded separately, have issues being resolved\n * by the browser, or provide reusable scss files.\n */\n inlinedDependencies?: string[];\n\n /**\n * Use this exports map instead of the original entry points from package.json. (Any Cloudpack-\n * generated exports will be merged.) This is useful if a library's exports map is missing\n * or broken, or to skip bundling entries which aren't needed at runtime.\n */\n exports?: PackageJsonExports;\n\n /**\n * Forces the package to be bundled using a specific bundler.\n */\n bundler?: string;\n\n /**\n * @deprecated Use `bundler`.\n *\n * This should be removed once repo configs are updated to use `bundler`.\n */\n bundlerType?: string;\n\n /**\n * Any bundler-specific options to be merged with the calculated bundler options.\n * `bundler` is also required if this is specified.\n *\n * This is an escape hatch which is generally not recommended, since it locks the package to\n * a specific bundler implementation. It's better to use built-in or custom bundler capabilities.\n *\n * WARNING: When merging package settings, `bundlerOptions` will be **overwritten** with\n * the last specified value.\n */\n bundlerOptions?: Record<string, unknown>;\n\n /**\n * Paths used for file monitoring and input hashing. Supports glob matching.\n * Defaults to `[/src/**, *.json]` and excludes node_modules.\n * Use `...` to include the default paths.\n */\n inputPaths?: string[];\n\n /**\n * Controls the behavior of the `verifyExports` feature when checking consumed exports from this package:\n * - If true, don't check this package's exports at all.\n * - If an object, this is a mapping from package import paths to export names to ignore. Examples:\n * - To ignore top-level exports: `{ \".\": [\"badName\"] }`\n * - To ignore exports from another path: `{ \"./lib/foo\": [\"badName\"] }`\n */\n ignoreMissingExports?: boolean | Record<string, string[]>;\n\n /**\n * Only relevant for packages bundled with rollup: globs of files that include dynamic (async)\n * imports with non-literal paths, to be processed by `@rollup/plugin-dynamic-import-vars` (subject to\n * that plugin's [limitations](https://www.npmjs.com/package/\\@rollup/plugin-dynamic-import-vars#limitations)).\n * Files matching `*.dynamic.*` are automatically included.\n *\n * This is not needed for ori/esbuild and webpack because they should handle these types of imports automatically.\n */\n dynamicImports?: string[];\n\n /**\n * Ignore these warning messages from the bundler (partial string matches).\n * This is intended for non-actionable messages from external dependencies which can't easily\n * be fixed, to avoid confusing users.\n */\n ignoredBundlerWarnings?: string[];\n\n /**\n * Settings to control how the package is linked in the resolve map.\n */\n link?: LinkOptions;\n\n /**\n * Setting to control the bundler capabilities for this package.\n * This is used to enable or disable specific bundler capabilities.\n */\n bundlerCapabilities?: BundlerCapabilitiesOptions;\n}\n\n/**\n * Subset of PackageSettings used in the generated config.\n */\nexport type GeneratedPackageSettings = Pick<\n PackageSettings,\n 'includedDependencies' | 'excludedDependencies' | 'dynamicImports' | 'exports'\n> & {\n /**\n * This will be a string (name) for internal packages, or match with name and version for external.\n * The match in this case will NOT contain wildcards in the name.\n */\n match: string | Required<PackageSettingsMatchObject>;\n};\n"]}
|
package/lib/Route.d.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import type { ExpandedSourcePath } from './ExpandedSourcePath.js';
|
|
2
|
+
/**
|
|
3
|
+
* A route match can be a string path or an object with a path and domain.
|
|
4
|
+
*/
|
|
5
|
+
export type RouteMatch = string | {
|
|
6
|
+
path: string;
|
|
7
|
+
domain?: string;
|
|
8
|
+
};
|
|
2
9
|
export interface SharedRouteOptions {
|
|
3
10
|
/**
|
|
4
11
|
* The URL path to match. Paths should usually start with a slash, e.g. `'/my-route'`.
|
|
@@ -7,9 +14,12 @@ export interface SharedRouteOptions {
|
|
|
7
14
|
* See the [Express docs](https://expressjs.com/en/guide/routing.html#route-paths) for the full
|
|
8
15
|
* supported routing syntax.
|
|
9
16
|
*
|
|
17
|
+
* If you need a route to match on a specific domain, you can pass an object (path, domain) in where
|
|
18
|
+
* the domain is a string which can have wildcards (`*`). e.g. `'word.*'` will match `word.com`, `word.net`, etc.
|
|
19
|
+
*
|
|
10
20
|
* Use an array to handle multiple paths with the same route handler.
|
|
11
21
|
*/
|
|
12
|
-
match:
|
|
22
|
+
match: RouteMatch | RouteMatch[];
|
|
13
23
|
}
|
|
14
24
|
/**
|
|
15
25
|
* A server-rendered route with optional shorthand `entry` info (as specified in `AppConfig`/`cloudpack.config.json`).
|
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
|
|
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,sBAA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,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,cAAc,GAAG,KAAK,IAAI,uBAAuB,CAEjG;AAKD,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,aAAa,CAGpE;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"}
|
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":"AA2GA;;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,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,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","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 */\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/**\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 * 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 ShorthandBootstrapRoute\n extends SharedRouteOptions,\n Pick<ShorthandRenderedRoute, 'entry' | 'exportEntry'> {\n type: 'bootstrap';\n}\n\n/**\n * A route that serves a bootstrap script.\n */\nexport interface BootstrapRoute extends Omit<ShorthandBootstrapRoute, 'entry'>, Pick<RenderedRoute, 'entry'> {}\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 * 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 = ShorthandRenderedRoute | ShorthandBootstrapRoute | StaticRoute | RedirectRoute;\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;\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 !isBootstrapRoute(route) && !!(maybeRenderedRoute.renderScript || maybeRenderedRoute.entry);\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"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export type { HttpsConfig } from './HttpsConfig.js';
|
|
|
21
21
|
export type { LinkOptions } from './LinkOptions.js';
|
|
22
22
|
export type { ModuleType } from './ModuleType.js';
|
|
23
23
|
export type { PackageHashesCache, PackageHashOptions } from './PackageHashesCache.js';
|
|
24
|
-
export type { PackageSettings, PackageSettingsMatch, GeneratedPackageSettings } from './PackageSettings.js';
|
|
24
|
+
export type { PackageSettings, PackageSettingsMatch, PackageSettingsMatchObject, GeneratedPackageSettings, } from './PackageSettings.js';
|
|
25
25
|
export type { BootstrapRoute, RedirectRoute, RenderedRoute, Route, SharedRouteOptions, ShorthandRenderedRoute, ShorthandBootstrapRoute, ShorthandRoute, StaticRoute, } from './Route.js';
|
|
26
26
|
export { isBootstrapRoute, isRenderedRoute, isStaticRoute, isRedirectRoute, isShorthandBootstrapRoute, isShorthandRenderedRoute, } from './Route.js';
|
|
27
27
|
export type { TelemetryConfig } from './TelemetryConfig.js';
|
|
@@ -29,7 +29,7 @@ export type { AppConfig } from './AppConfig.js';
|
|
|
29
29
|
export type { InternalBundlerCapabilityImplementations, InternalBundlerCapabilitiesMetaData, BundlerCapabilitiesOptions, ExternalBundlerCapabilityModule, BundlerCapabilityFunction, } from './BundlerCapability.js';
|
|
30
30
|
export type { RemoteCacheConfig } from './RemoteCacheConfig.js';
|
|
31
31
|
export type { RenderFunction, RenderFunctionOptions, RenderFunctionResult, ExpandedRenderFunctionResult, RenderFunctionScript, } from './RenderFunction.js';
|
|
32
|
-
export type { Request, Response } from 'express';
|
|
32
|
+
export type { Request, Response, RequestHandler } from 'express';
|
|
33
33
|
export type { Session } from './Session.js';
|
|
34
34
|
export type { ResolveMap } from './ResolveMap.js';
|
|
35
35
|
export type { ResolveMapEntry } from './ResolveMapEntry.js';
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,YAAY,EACV,2BAA2B,EAC3B,0BAA0B,EAC1B,iCAAiC,EACjC,uBAAuB,EACvB,sBAAsB,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,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,YAAY,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,YAAY,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,YAAY,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,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AAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACjE,YAAY,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,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;AAuD/C,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,eAAe,EACf,yBAAyB,EACzB,wBAAwB,GACzB,MAAM,YAAY,CAAC","sourcesContent":["export { allFeatures } from './allFeatures.js';\nexport type {\n GetPackageDefinitionOptions,\n PackageDefinitionTransform,\n PackageDefinitionTransformFactory,\n PackageDefinitionsCache,\n PackageImporterContext,\n} 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 { BundlerResult } from './BundlerResult.js';\nexport type { Bundler } from './Bundler.js';\nexport type { CloudpackConfig } from './CloudpackConfig.js';\nexport type { ServerConfig } from './ServerConfig.js';\nexport type { ExpandedSourcePath } from './ExpandedSourcePath.js';\nexport type { Feature } from './Feature.js';\nexport type { Features } from './Features.js';\nexport type { GeneratedConfig } from './GeneratedConfig.js';\nexport type { HttpsConfig } from './HttpsConfig.js';\nexport type { LinkOptions } from './LinkOptions.js';\nexport type { ModuleType } from './ModuleType.js';\nexport type { PackageHashesCache, PackageHashOptions } from './PackageHashesCache.js';\nexport type {\n PackageSettings,\n PackageSettingsMatch,\n PackageSettingsMatchObject,\n GeneratedPackageSettings,\n} from './PackageSettings.js';\nexport type {\n BootstrapRoute,\n RedirectRoute,\n RenderedRoute,\n Route,\n SharedRouteOptions,\n ShorthandRenderedRoute,\n ShorthandBootstrapRoute,\n ShorthandRoute,\n StaticRoute,\n} from './Route.js';\nexport {\n isBootstrapRoute,\n isRenderedRoute,\n isStaticRoute,\n isRedirectRoute,\n isShorthandBootstrapRoute,\n isShorthandRenderedRoute,\n} from './Route.js';\nexport type { TelemetryConfig } from './TelemetryConfig.js';\nexport type { AppConfig } from './AppConfig.js';\nexport type {\n InternalBundlerCapabilityImplementations,\n InternalBundlerCapabilitiesMetaData,\n BundlerCapabilitiesOptions,\n ExternalBundlerCapabilityModule,\n BundlerCapabilityFunction,\n} from './BundlerCapability.js';\nexport type { RemoteCacheConfig } from './RemoteCacheConfig.js';\nexport type {\n RenderFunction,\n RenderFunctionOptions,\n RenderFunctionResult,\n ExpandedRenderFunctionResult,\n RenderFunctionScript,\n} from './RenderFunction.js';\nexport type { Request, Response, RequestHandler } from 'express';\nexport type { Session } from './Session.js';\nexport type { ResolveMap } from './ResolveMap.js';\nexport type { ResolveMapEntry } from './ResolveMapEntry.js';\nexport type { LinkedPath } from './LinkedPath.js';\nexport type { ImportMap } from './ImportMap.js';\nexport type { UserPreferences } from './UserPreferences.js';\n"]}
|
package/lib/tsdoc-metadata.json
CHANGED
package/package.json
CHANGED
package/schema/AppConfig.json
CHANGED
|
@@ -391,6 +391,11 @@
|
|
|
391
391
|
"description": "If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket.",
|
|
392
392
|
"default": 0
|
|
393
393
|
},
|
|
394
|
+
"highWaterMark": {
|
|
395
|
+
"type": "number",
|
|
396
|
+
"description": "Optionally overrides all `net.Socket`s' `readableHighWaterMark` and `writableHighWaterMark`.",
|
|
397
|
+
"default": "See [stream.getDefaultHighWaterMark()](https://nodejs.org/docs/latest-v18.x/api/stream.html#streamgetdefaulthighwatermarkobjectmode)."
|
|
398
|
+
},
|
|
394
399
|
"requestTimeout": {
|
|
395
400
|
"type": "number",
|
|
396
401
|
"description": "Sets the timeout value in milliseconds for receiving the entire request from the client.",
|
|
@@ -411,10 +416,6 @@
|
|
|
411
416
|
"description": "Sets the interval value in milliseconds to check for request and headers timeout in incomplete requests.",
|
|
412
417
|
"default": 30000
|
|
413
418
|
},
|
|
414
|
-
"highWaterMark": {
|
|
415
|
-
"type": "number",
|
|
416
|
-
"description": "Optionally overrides all `socket`s' `readableHighWaterMark` and `writableHighWaterMark`. This affects `highWaterMark` property of both `IncomingMessage` and `ServerResponse`. Default:"
|
|
417
|
-
},
|
|
418
419
|
"insecureHTTPParser": {
|
|
419
420
|
"type": "boolean",
|
|
420
421
|
"description": "Use an insecure HTTP parser that accepts invalid HTTP headers when `true`. Using the insecure parser should be avoided. See --insecure-http-parser for more information.",
|
|
@@ -522,16 +523,16 @@
|
|
|
522
523
|
"match": {
|
|
523
524
|
"anyOf": [
|
|
524
525
|
{
|
|
525
|
-
"
|
|
526
|
+
"$ref": "#/definitions/RouteMatch"
|
|
526
527
|
},
|
|
527
528
|
{
|
|
528
529
|
"type": "array",
|
|
529
530
|
"items": {
|
|
530
|
-
"
|
|
531
|
+
"$ref": "#/definitions/RouteMatch"
|
|
531
532
|
}
|
|
532
533
|
}
|
|
533
534
|
],
|
|
534
|
-
"description": "The URL path to match. Paths should usually start with a slash, e.g. `'/my-route'`. You can also use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`.\n\nSee the [Express docs](https://expressjs.com/en/guide/routing.html#route-paths) for the full supported routing syntax.\n\nUse an array to handle multiple paths with the same route handler."
|
|
535
|
+
"description": "The URL path to match. Paths should usually start with a slash, e.g. `'/my-route'`. You can also use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`.\n\nSee the [Express docs](https://expressjs.com/en/guide/routing.html#route-paths) for the full supported routing syntax.\n\nIf you need a route to match on a specific domain, you can pass an object (path, domain) in where the domain is a string which can have wildcards (`*`). e.g. `'word.*'` will match `word.com`, `word.net`, etc.\n\nUse an array to handle multiple paths with the same route handler."
|
|
535
536
|
},
|
|
536
537
|
"renderScript": {
|
|
537
538
|
"type": "string",
|
|
@@ -563,6 +564,29 @@
|
|
|
563
564
|
],
|
|
564
565
|
"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."
|
|
565
566
|
},
|
|
567
|
+
"RouteMatch": {
|
|
568
|
+
"anyOf": [
|
|
569
|
+
{
|
|
570
|
+
"type": "string"
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
"type": "object",
|
|
574
|
+
"properties": {
|
|
575
|
+
"path": {
|
|
576
|
+
"type": "string"
|
|
577
|
+
},
|
|
578
|
+
"domain": {
|
|
579
|
+
"type": "string"
|
|
580
|
+
}
|
|
581
|
+
},
|
|
582
|
+
"required": [
|
|
583
|
+
"path"
|
|
584
|
+
],
|
|
585
|
+
"additionalProperties": false
|
|
586
|
+
}
|
|
587
|
+
],
|
|
588
|
+
"description": "A route match can be a string path or an object with a path and domain."
|
|
589
|
+
},
|
|
566
590
|
"ShorthandBootstrapRoute": {
|
|
567
591
|
"type": "object",
|
|
568
592
|
"properties": {
|
|
@@ -588,16 +612,16 @@
|
|
|
588
612
|
"match": {
|
|
589
613
|
"anyOf": [
|
|
590
614
|
{
|
|
591
|
-
"
|
|
615
|
+
"$ref": "#/definitions/RouteMatch"
|
|
592
616
|
},
|
|
593
617
|
{
|
|
594
618
|
"type": "array",
|
|
595
619
|
"items": {
|
|
596
|
-
"
|
|
620
|
+
"$ref": "#/definitions/RouteMatch"
|
|
597
621
|
}
|
|
598
622
|
}
|
|
599
623
|
],
|
|
600
|
-
"description": "The URL path to match. Paths should usually start with a slash, e.g. `'/my-route'`. You can also use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`.\n\nSee the [Express docs](https://expressjs.com/en/guide/routing.html#route-paths) for the full supported routing syntax.\n\nUse an array to handle multiple paths with the same route handler."
|
|
624
|
+
"description": "The URL path to match. Paths should usually start with a slash, e.g. `'/my-route'`. You can also use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`.\n\nSee the [Express docs](https://expressjs.com/en/guide/routing.html#route-paths) for the full supported routing syntax.\n\nIf you need a route to match on a specific domain, you can pass an object (path, domain) in where the domain is a string which can have wildcards (`*`). e.g. `'word.*'` will match `word.com`, `word.net`, etc.\n\nUse an array to handle multiple paths with the same route handler."
|
|
601
625
|
},
|
|
602
626
|
"type": {
|
|
603
627
|
"type": "string",
|
|
@@ -617,16 +641,16 @@
|
|
|
617
641
|
"match": {
|
|
618
642
|
"anyOf": [
|
|
619
643
|
{
|
|
620
|
-
"
|
|
644
|
+
"$ref": "#/definitions/RouteMatch"
|
|
621
645
|
},
|
|
622
646
|
{
|
|
623
647
|
"type": "array",
|
|
624
648
|
"items": {
|
|
625
|
-
"
|
|
649
|
+
"$ref": "#/definitions/RouteMatch"
|
|
626
650
|
}
|
|
627
651
|
}
|
|
628
652
|
],
|
|
629
|
-
"description": "The URL path to match. Paths should usually start with a slash, e.g. `'/my-route'`. You can also use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`.\n\nSee the [Express docs](https://expressjs.com/en/guide/routing.html#route-paths) for the full supported routing syntax.\n\nUse an array to handle multiple paths with the same route handler."
|
|
653
|
+
"description": "The URL path to match. Paths should usually start with a slash, e.g. `'/my-route'`. You can also use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`.\n\nSee the [Express docs](https://expressjs.com/en/guide/routing.html#route-paths) for the full supported routing syntax.\n\nIf you need a route to match on a specific domain, you can pass an object (path, domain) in where the domain is a string which can have wildcards (`*`). e.g. `'word.*'` will match `word.com`, `word.net`, etc.\n\nUse an array to handle multiple paths with the same route handler."
|
|
630
654
|
},
|
|
631
655
|
"staticPath": {
|
|
632
656
|
"type": "string",
|
|
@@ -646,16 +670,16 @@
|
|
|
646
670
|
"match": {
|
|
647
671
|
"anyOf": [
|
|
648
672
|
{
|
|
649
|
-
"
|
|
673
|
+
"$ref": "#/definitions/RouteMatch"
|
|
650
674
|
},
|
|
651
675
|
{
|
|
652
676
|
"type": "array",
|
|
653
677
|
"items": {
|
|
654
|
-
"
|
|
678
|
+
"$ref": "#/definitions/RouteMatch"
|
|
655
679
|
}
|
|
656
680
|
}
|
|
657
681
|
],
|
|
658
|
-
"description": "The URL path to match. Paths should usually start with a slash, e.g. `'/my-route'`. You can also use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`.\n\nSee the [Express docs](https://expressjs.com/en/guide/routing.html#route-paths) for the full supported routing syntax.\n\nUse an array to handle multiple paths with the same route handler."
|
|
682
|
+
"description": "The URL path to match. Paths should usually start with a slash, e.g. `'/my-route'`. You can also use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`.\n\nSee the [Express docs](https://expressjs.com/en/guide/routing.html#route-paths) for the full supported routing syntax.\n\nIf you need a route to match on a specific domain, you can pass an object (path, domain) in where the domain is a string which can have wildcards (`*`). e.g. `'word.*'` will match `word.com`, `word.net`, etc.\n\nUse an array to handle multiple paths with the same route handler."
|
|
659
683
|
},
|
|
660
684
|
"redirectTo": {
|
|
661
685
|
"type": "string",
|
|
@@ -843,25 +867,28 @@
|
|
|
843
867
|
"type": "string"
|
|
844
868
|
},
|
|
845
869
|
{
|
|
846
|
-
"
|
|
847
|
-
"properties": {
|
|
848
|
-
"name": {
|
|
849
|
-
"type": "string",
|
|
850
|
-
"description": "Name of the package. Can use a trailing wildcard (e.g. `@scope/*`). `*` to match any name."
|
|
851
|
-
},
|
|
852
|
-
"version": {
|
|
853
|
-
"type": "string",
|
|
854
|
-
"description": "Version of the package. Unspecified matches any version.\n\nNote that if the package version is a prerelease, it will only match `*` or ranges that explicitly include prereleases. For example, `^1.0.0` will not match `1.0.1-beta.0`."
|
|
855
|
-
}
|
|
856
|
-
},
|
|
857
|
-
"required": [
|
|
858
|
-
"name"
|
|
859
|
-
],
|
|
860
|
-
"additionalProperties": false
|
|
870
|
+
"$ref": "#/definitions/PackageSettingsMatchObject"
|
|
861
871
|
}
|
|
862
872
|
],
|
|
863
873
|
"description": "Which package(s) the settings should be applied to. A string is a shorthand for matching the name with any version (`*` to match any name)."
|
|
864
874
|
},
|
|
875
|
+
"PackageSettingsMatchObject": {
|
|
876
|
+
"type": "object",
|
|
877
|
+
"properties": {
|
|
878
|
+
"name": {
|
|
879
|
+
"type": "string",
|
|
880
|
+
"description": "Name of the package. Can use a trailing wildcard (e.g. `@scope/*`). `*` to match any name.\n\nTo negate a match, use `!` as the first character (e.g. `!@scope/foo` or `!@scope/*`)."
|
|
881
|
+
},
|
|
882
|
+
"version": {
|
|
883
|
+
"type": "string",
|
|
884
|
+
"description": "Version of the package. Unspecified matches any version.\n\nNote that if the package version is a prerelease, it will only match `*` or ranges that explicitly include prereleases. For example, `^1.0.0` will not match `1.0.1-beta.0`."
|
|
885
|
+
}
|
|
886
|
+
},
|
|
887
|
+
"required": [
|
|
888
|
+
"name"
|
|
889
|
+
],
|
|
890
|
+
"additionalProperties": false
|
|
891
|
+
},
|
|
865
892
|
"PackageJsonExports": {
|
|
866
893
|
"anyOf": [
|
|
867
894
|
{
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"properties": {
|
|
31
31
|
"name": {
|
|
32
32
|
"type": "string",
|
|
33
|
-
"description": "Name of the package. Can use a trailing wildcard (e.g. `@scope/*`). `*` to match any name."
|
|
33
|
+
"description": "Name of the package. Can use a trailing wildcard (e.g. `@scope/*`). `*` to match any name.\n\nTo negate a match, use `!` as the first character (e.g. `!@scope/foo` or `!@scope/*`)."
|
|
34
34
|
},
|
|
35
35
|
"version": {
|
|
36
36
|
"type": "string",
|
package/schema/UserConfig.json
CHANGED
|
@@ -392,6 +392,11 @@
|
|
|
392
392
|
"description": "If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket.",
|
|
393
393
|
"default": 0
|
|
394
394
|
},
|
|
395
|
+
"highWaterMark": {
|
|
396
|
+
"type": "number",
|
|
397
|
+
"description": "Optionally overrides all `net.Socket`s' `readableHighWaterMark` and `writableHighWaterMark`.",
|
|
398
|
+
"default": "See [stream.getDefaultHighWaterMark()](https://nodejs.org/docs/latest-v18.x/api/stream.html#streamgetdefaulthighwatermarkobjectmode)."
|
|
399
|
+
},
|
|
395
400
|
"requestTimeout": {
|
|
396
401
|
"type": "number",
|
|
397
402
|
"description": "Sets the timeout value in milliseconds for receiving the entire request from the client.",
|
|
@@ -412,10 +417,6 @@
|
|
|
412
417
|
"description": "Sets the interval value in milliseconds to check for request and headers timeout in incomplete requests.",
|
|
413
418
|
"default": 30000
|
|
414
419
|
},
|
|
415
|
-
"highWaterMark": {
|
|
416
|
-
"type": "number",
|
|
417
|
-
"description": "Optionally overrides all `socket`s' `readableHighWaterMark` and `writableHighWaterMark`. This affects `highWaterMark` property of both `IncomingMessage` and `ServerResponse`. Default:"
|
|
418
|
-
},
|
|
419
420
|
"insecureHTTPParser": {
|
|
420
421
|
"type": "boolean",
|
|
421
422
|
"description": "Use an insecure HTTP parser that accepts invalid HTTP headers when `true`. Using the insecure parser should be avoided. See --insecure-http-parser for more information.",
|
|
@@ -523,16 +524,16 @@
|
|
|
523
524
|
"match": {
|
|
524
525
|
"anyOf": [
|
|
525
526
|
{
|
|
526
|
-
"
|
|
527
|
+
"$ref": "#/definitions/RouteMatch"
|
|
527
528
|
},
|
|
528
529
|
{
|
|
529
530
|
"type": "array",
|
|
530
531
|
"items": {
|
|
531
|
-
"
|
|
532
|
+
"$ref": "#/definitions/RouteMatch"
|
|
532
533
|
}
|
|
533
534
|
}
|
|
534
535
|
],
|
|
535
|
-
"description": "The URL path to match. Paths should usually start with a slash, e.g. `'/my-route'`. You can also use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`.\n\nSee the [Express docs](https://expressjs.com/en/guide/routing.html#route-paths) for the full supported routing syntax.\n\nUse an array to handle multiple paths with the same route handler."
|
|
536
|
+
"description": "The URL path to match. Paths should usually start with a slash, e.g. `'/my-route'`. You can also use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`.\n\nSee the [Express docs](https://expressjs.com/en/guide/routing.html#route-paths) for the full supported routing syntax.\n\nIf you need a route to match on a specific domain, you can pass an object (path, domain) in where the domain is a string which can have wildcards (`*`). e.g. `'word.*'` will match `word.com`, `word.net`, etc.\n\nUse an array to handle multiple paths with the same route handler."
|
|
536
537
|
},
|
|
537
538
|
"renderScript": {
|
|
538
539
|
"type": "string",
|
|
@@ -564,6 +565,29 @@
|
|
|
564
565
|
],
|
|
565
566
|
"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."
|
|
566
567
|
},
|
|
568
|
+
"RouteMatch": {
|
|
569
|
+
"anyOf": [
|
|
570
|
+
{
|
|
571
|
+
"type": "string"
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
"type": "object",
|
|
575
|
+
"properties": {
|
|
576
|
+
"path": {
|
|
577
|
+
"type": "string"
|
|
578
|
+
},
|
|
579
|
+
"domain": {
|
|
580
|
+
"type": "string"
|
|
581
|
+
}
|
|
582
|
+
},
|
|
583
|
+
"required": [
|
|
584
|
+
"path"
|
|
585
|
+
],
|
|
586
|
+
"additionalProperties": false
|
|
587
|
+
}
|
|
588
|
+
],
|
|
589
|
+
"description": "A route match can be a string path or an object with a path and domain."
|
|
590
|
+
},
|
|
567
591
|
"ShorthandBootstrapRoute": {
|
|
568
592
|
"type": "object",
|
|
569
593
|
"properties": {
|
|
@@ -589,16 +613,16 @@
|
|
|
589
613
|
"match": {
|
|
590
614
|
"anyOf": [
|
|
591
615
|
{
|
|
592
|
-
"
|
|
616
|
+
"$ref": "#/definitions/RouteMatch"
|
|
593
617
|
},
|
|
594
618
|
{
|
|
595
619
|
"type": "array",
|
|
596
620
|
"items": {
|
|
597
|
-
"
|
|
621
|
+
"$ref": "#/definitions/RouteMatch"
|
|
598
622
|
}
|
|
599
623
|
}
|
|
600
624
|
],
|
|
601
|
-
"description": "The URL path to match. Paths should usually start with a slash, e.g. `'/my-route'`. You can also use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`.\n\nSee the [Express docs](https://expressjs.com/en/guide/routing.html#route-paths) for the full supported routing syntax.\n\nUse an array to handle multiple paths with the same route handler."
|
|
625
|
+
"description": "The URL path to match. Paths should usually start with a slash, e.g. `'/my-route'`. You can also use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`.\n\nSee the [Express docs](https://expressjs.com/en/guide/routing.html#route-paths) for the full supported routing syntax.\n\nIf you need a route to match on a specific domain, you can pass an object (path, domain) in where the domain is a string which can have wildcards (`*`). e.g. `'word.*'` will match `word.com`, `word.net`, etc.\n\nUse an array to handle multiple paths with the same route handler."
|
|
602
626
|
},
|
|
603
627
|
"type": {
|
|
604
628
|
"type": "string",
|
|
@@ -618,16 +642,16 @@
|
|
|
618
642
|
"match": {
|
|
619
643
|
"anyOf": [
|
|
620
644
|
{
|
|
621
|
-
"
|
|
645
|
+
"$ref": "#/definitions/RouteMatch"
|
|
622
646
|
},
|
|
623
647
|
{
|
|
624
648
|
"type": "array",
|
|
625
649
|
"items": {
|
|
626
|
-
"
|
|
650
|
+
"$ref": "#/definitions/RouteMatch"
|
|
627
651
|
}
|
|
628
652
|
}
|
|
629
653
|
],
|
|
630
|
-
"description": "The URL path to match. Paths should usually start with a slash, e.g. `'/my-route'`. You can also use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`.\n\nSee the [Express docs](https://expressjs.com/en/guide/routing.html#route-paths) for the full supported routing syntax.\n\nUse an array to handle multiple paths with the same route handler."
|
|
654
|
+
"description": "The URL path to match. Paths should usually start with a slash, e.g. `'/my-route'`. You can also use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`.\n\nSee the [Express docs](https://expressjs.com/en/guide/routing.html#route-paths) for the full supported routing syntax.\n\nIf you need a route to match on a specific domain, you can pass an object (path, domain) in where the domain is a string which can have wildcards (`*`). e.g. `'word.*'` will match `word.com`, `word.net`, etc.\n\nUse an array to handle multiple paths with the same route handler."
|
|
631
655
|
},
|
|
632
656
|
"staticPath": {
|
|
633
657
|
"type": "string",
|
|
@@ -647,16 +671,16 @@
|
|
|
647
671
|
"match": {
|
|
648
672
|
"anyOf": [
|
|
649
673
|
{
|
|
650
|
-
"
|
|
674
|
+
"$ref": "#/definitions/RouteMatch"
|
|
651
675
|
},
|
|
652
676
|
{
|
|
653
677
|
"type": "array",
|
|
654
678
|
"items": {
|
|
655
|
-
"
|
|
679
|
+
"$ref": "#/definitions/RouteMatch"
|
|
656
680
|
}
|
|
657
681
|
}
|
|
658
682
|
],
|
|
659
|
-
"description": "The URL path to match. Paths should usually start with a slash, e.g. `'/my-route'`. You can also use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`.\n\nSee the [Express docs](https://expressjs.com/en/guide/routing.html#route-paths) for the full supported routing syntax.\n\nUse an array to handle multiple paths with the same route handler."
|
|
683
|
+
"description": "The URL path to match. Paths should usually start with a slash, e.g. `'/my-route'`. You can also use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`.\n\nSee the [Express docs](https://expressjs.com/en/guide/routing.html#route-paths) for the full supported routing syntax.\n\nIf you need a route to match on a specific domain, you can pass an object (path, domain) in where the domain is a string which can have wildcards (`*`). e.g. `'word.*'` will match `word.com`, `word.net`, etc.\n\nUse an array to handle multiple paths with the same route handler."
|
|
660
684
|
},
|
|
661
685
|
"redirectTo": {
|
|
662
686
|
"type": "string",
|
|
@@ -844,25 +868,28 @@
|
|
|
844
868
|
"type": "string"
|
|
845
869
|
},
|
|
846
870
|
{
|
|
847
|
-
"
|
|
848
|
-
"properties": {
|
|
849
|
-
"name": {
|
|
850
|
-
"type": "string",
|
|
851
|
-
"description": "Name of the package. Can use a trailing wildcard (e.g. `@scope/*`). `*` to match any name."
|
|
852
|
-
},
|
|
853
|
-
"version": {
|
|
854
|
-
"type": "string",
|
|
855
|
-
"description": "Version of the package. Unspecified matches any version.\n\nNote that if the package version is a prerelease, it will only match `*` or ranges that explicitly include prereleases. For example, `^1.0.0` will not match `1.0.1-beta.0`."
|
|
856
|
-
}
|
|
857
|
-
},
|
|
858
|
-
"required": [
|
|
859
|
-
"name"
|
|
860
|
-
],
|
|
861
|
-
"additionalProperties": false
|
|
871
|
+
"$ref": "#/definitions/PackageSettingsMatchObject"
|
|
862
872
|
}
|
|
863
873
|
],
|
|
864
874
|
"description": "Which package(s) the settings should be applied to. A string is a shorthand for matching the name with any version (`*` to match any name)."
|
|
865
875
|
},
|
|
876
|
+
"PackageSettingsMatchObject": {
|
|
877
|
+
"type": "object",
|
|
878
|
+
"properties": {
|
|
879
|
+
"name": {
|
|
880
|
+
"type": "string",
|
|
881
|
+
"description": "Name of the package. Can use a trailing wildcard (e.g. `@scope/*`). `*` to match any name.\n\nTo negate a match, use `!` as the first character (e.g. `!@scope/foo` or `!@scope/*`)."
|
|
882
|
+
},
|
|
883
|
+
"version": {
|
|
884
|
+
"type": "string",
|
|
885
|
+
"description": "Version of the package. Unspecified matches any version.\n\nNote that if the package version is a prerelease, it will only match `*` or ranges that explicitly include prereleases. For example, `^1.0.0` will not match `1.0.1-beta.0`."
|
|
886
|
+
}
|
|
887
|
+
},
|
|
888
|
+
"required": [
|
|
889
|
+
"name"
|
|
890
|
+
],
|
|
891
|
+
"additionalProperties": false
|
|
892
|
+
},
|
|
866
893
|
"PackageJsonExports": {
|
|
867
894
|
"anyOf": [
|
|
868
895
|
{
|