@ms-cloudpack/common-types 0.8.2 → 0.10.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/AppConfig.d.ts +6 -0
- package/lib/AppConfig.d.ts.map +1 -1
- package/lib/AppConfig.js.map +1 -1
- package/lib/CloudpackConfig.d.ts +21 -1
- package/lib/CloudpackConfig.d.ts.map +1 -1
- package/lib/CloudpackConfig.js.map +1 -1
- package/lib/DevServer.d.ts +3 -3
- package/lib/DevServer.d.ts.map +1 -1
- package/lib/DevServer.js.map +1 -1
- package/lib/ExpandedSourcePath.d.ts +17 -0
- package/lib/ExpandedSourcePath.d.ts.map +1 -0
- package/lib/ExpandedSourcePath.js +2 -0
- package/lib/ExpandedSourcePath.js.map +1 -0
- package/lib/HttpsConfig.d.ts +0 -2
- package/lib/HttpsConfig.d.ts.map +1 -1
- package/lib/Route.d.ts +10 -1
- package/lib/Route.d.ts.map +1 -1
- package/lib/Route.js.map +1 -1
- package/lib/allFeatures.d.ts.map +1 -1
- package/package.json +1 -1
- package/schema/AppConfig.json +49 -5
- package/schema/UserConfig.json +49 -5
package/lib/AppConfig.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { DevServer } from './DevServer.js';
|
|
2
2
|
import type { Features } from './Features.js';
|
|
3
3
|
import type { PackageSettings } from './PackageSettings.js';
|
|
4
|
+
import type { ShorthandRoute } from './Route.js';
|
|
4
5
|
import type { TelemetryConfig } from './TelemetryConfig.js';
|
|
5
6
|
/**
|
|
6
7
|
* Per-application user-provided configuration for Cloudpack.
|
|
@@ -69,6 +70,11 @@ export interface AppConfig {
|
|
|
69
70
|
*/
|
|
70
71
|
tenantId?: string;
|
|
71
72
|
};
|
|
73
|
+
/**
|
|
74
|
+
* Defines what routes to support from the app server, and which scripts will be loaded
|
|
75
|
+
* for each.
|
|
76
|
+
*/
|
|
77
|
+
routes?: ShorthandRoute[];
|
|
72
78
|
/**
|
|
73
79
|
* A list of package names that should never be excluded or included from the bundle.
|
|
74
80
|
*/
|
package/lib/AppConfig.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppConfig.d.ts","sourceRoot":"","sources":["../src/AppConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAE5B;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC;IAE5B;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,eAAe,CAAC,EAAE,eAAe,EAAE,CAAC;IAEpC;;;OAGG;IACH,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;IAEjC;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAE/B;;;OAGG;IACH,WAAW,CAAC,EAAE;QACZ;;WAEG;QACH,cAAc,EAAE,MAAM,CAAC;QACvB;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;QAClB;;WAEG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;IAEF;;OAEG;IACH,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC;CACrC"}
|
|
1
|
+
{"version":3,"file":"AppConfig.d.ts","sourceRoot":"","sources":["../src/AppConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAE5B;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC;IAE5B;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,eAAe,CAAC,EAAE,eAAe,EAAE,CAAC;IAEpC;;;OAGG;IACH,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;IAEjC;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAE/B;;;OAGG;IACH,WAAW,CAAC,EAAE;QACZ;;WAEG;QACH,cAAc,EAAE,MAAM,CAAC;QACvB;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;QAClB;;WAEG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;IAEF;;;OAGG;IACH,MAAM,CAAC,EAAE,cAAc,EAAE,CAAC;IAE1B;;OAEG;IACH,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC;CACrC"}
|
package/lib/AppConfig.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppConfig.js","sourceRoot":"","sources":["../src/AppConfig.ts"],"names":[],"mappings":"","sourcesContent":["import type { DevServer } from './DevServer.js';\nimport type { Features } from './Features.js';\nimport type { PackageSettings } from './PackageSettings.js';\nimport type { TelemetryConfig } from './TelemetryConfig.js';\n\n/**\n * Per-application user-provided configuration for Cloudpack.\n */\nexport interface AppConfig {\n /**\n * Extend the configuration from another file: either an import path or a relative path\n * (resolved from the config file's location).\n *\n * If an array, later files will take precedence when merging.\n * (The user config always takes precedence over any extended config.)\n *\n * Config merging approach:\n * - Objects will be deeply merged.\n * - Primitive values will be overwritten.\n * - Arrays will be overwritten, EXCEPT for `packageSettings`, which will be concatenated.\n */\n extends?: string | string[];\n\n /**\n * A set of options for configuring how the dev server works.\n */\n devServer?: DevServer;\n\n /**\n * A set of options for configuring telemetry\n */\n telemetry?: TelemetryConfig;\n\n /**\n * A set of options for configuring the experience. Features can be set to true to change the default\n * behavior.\n */\n features?: Features;\n\n /**\n * Help message to display when Cloudpack starts up.\n */\n helpMessage?: string;\n\n /**\n * An array of PackageSettings objects, used to provide settings for how we bundle packages.\n */\n packageSettings?: PackageSettings[];\n\n /**\n * An optional list of commands (followed by a string array of args for that command)\n * to be executed prior to Cloudpack bundle\n */\n dependsOn?: [string, string[]][];\n\n /**\n * Glob pattern to match `patch-package` patch files, relative to the project root\n * (usually the same as the repository root).\n * @default \"patches/*.patch\"\n */\n patchFilesGlobPattern?: string;\n\n /**\n * Azure Blob Storage configuration for remote cache - uploading and downloading packages.\n * If this is not provided, the remote cache will not be used.\n */\n remoteCache?: {\n /**\n * The name of the Azure Blob Storage account.\n */\n storageAccount: string;\n /**\n * The name of the container to use for the remote cache. Container must already exist.\n */\n container: string;\n /**\n * The Microsoft Entra tenant (directory) ID. This will ensure that only users from this tenant can access the remote cache.\n */\n tenantId?: string;\n };\n\n /**\n * A list of package names that should never be excluded or included from the bundle.\n */\n neverExcludeDependencies?: string[];\n}\n"]}
|
|
1
|
+
{"version":3,"file":"AppConfig.js","sourceRoot":"","sources":["../src/AppConfig.ts"],"names":[],"mappings":"","sourcesContent":["import type { DevServer } from './DevServer.js';\nimport type { Features } from './Features.js';\nimport type { PackageSettings } from './PackageSettings.js';\nimport type { ShorthandRoute } from './Route.js';\nimport type { TelemetryConfig } from './TelemetryConfig.js';\n\n/**\n * Per-application user-provided configuration for Cloudpack.\n */\nexport interface AppConfig {\n /**\n * Extend the configuration from another file: either an import path or a relative path\n * (resolved from the config file's location).\n *\n * If an array, later files will take precedence when merging.\n * (The user config always takes precedence over any extended config.)\n *\n * Config merging approach:\n * - Objects will be deeply merged.\n * - Primitive values will be overwritten.\n * - Arrays will be overwritten, EXCEPT for `packageSettings`, which will be concatenated.\n */\n extends?: string | string[];\n\n /**\n * A set of options for configuring how the dev server works.\n */\n devServer?: DevServer;\n\n /**\n * A set of options for configuring telemetry\n */\n telemetry?: TelemetryConfig;\n\n /**\n * A set of options for configuring the experience. Features can be set to true to change the default\n * behavior.\n */\n features?: Features;\n\n /**\n * Help message to display when Cloudpack starts up.\n */\n helpMessage?: string;\n\n /**\n * An array of PackageSettings objects, used to provide settings for how we bundle packages.\n */\n packageSettings?: PackageSettings[];\n\n /**\n * An optional list of commands (followed by a string array of args for that command)\n * to be executed prior to Cloudpack bundle\n */\n dependsOn?: [string, string[]][];\n\n /**\n * Glob pattern to match `patch-package` patch files, relative to the project root\n * (usually the same as the repository root).\n * @default \"patches/*.patch\"\n */\n patchFilesGlobPattern?: string;\n\n /**\n * Azure Blob Storage configuration for remote cache - uploading and downloading packages.\n * If this is not provided, the remote cache will not be used.\n */\n remoteCache?: {\n /**\n * The name of the Azure Blob Storage account.\n */\n storageAccount: string;\n /**\n * The name of the container to use for the remote cache. Container must already exist.\n */\n container: string;\n /**\n * The Microsoft Entra tenant (directory) ID. This will ensure that only users from this tenant can access the remote cache.\n */\n tenantId?: string;\n };\n\n /**\n * Defines what routes to support from the app server, and which scripts will be loaded\n * for each.\n */\n routes?: ShorthandRoute[];\n\n /**\n * A list of package names that should never be excluded or included from the bundle.\n */\n neverExcludeDependencies?: string[];\n}\n"]}
|
package/lib/CloudpackConfig.d.ts
CHANGED
|
@@ -1,11 +1,31 @@
|
|
|
1
1
|
import type { GeneratedConfig } from './GeneratedConfig.js';
|
|
2
2
|
import type { AppConfig } from './AppConfig.js';
|
|
3
3
|
import type { BundleMode } from './BundleMode.js';
|
|
4
|
+
import type { Route } from './Route.js';
|
|
5
|
+
import type { DevServer } from './DevServer.js';
|
|
4
6
|
/**
|
|
5
7
|
* The merged result of user-provided and generated configuration for Cloudpack.
|
|
6
8
|
*/
|
|
7
|
-
export type CloudpackConfig = AppConfig & {
|
|
9
|
+
export type CloudpackConfig = Omit<AppConfig, 'routes' | 'devServer'> & {
|
|
10
|
+
/**
|
|
11
|
+
* The path to the app's package.
|
|
12
|
+
*/
|
|
13
|
+
appPath: string;
|
|
14
|
+
/**
|
|
15
|
+
* Dev server settings.
|
|
16
|
+
*/
|
|
17
|
+
devServer?: Omit<DevServer, 'routes'>;
|
|
18
|
+
/**
|
|
19
|
+
* Mode to run the app in.
|
|
20
|
+
*/
|
|
8
21
|
mode: BundleMode;
|
|
22
|
+
/**
|
|
23
|
+
* Generated config settings.
|
|
24
|
+
*/
|
|
9
25
|
generated: GeneratedConfig;
|
|
26
|
+
/**
|
|
27
|
+
* Routes which have been expanded from shorthand entries.
|
|
28
|
+
*/
|
|
29
|
+
routes?: Route[];
|
|
10
30
|
};
|
|
11
31
|
//# sourceMappingURL=CloudpackConfig.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CloudpackConfig.d.ts","sourceRoot":"","sources":["../src/CloudpackConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"CloudpackConfig.d.ts","sourceRoot":"","sources":["../src/CloudpackConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;GAEG;AAEH,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,SAAS,EAAE,QAAQ,GAAG,WAAW,CAAC,GAAG;IACtE;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAEtC;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;IAEjB;;OAEG;IACH,SAAS,EAAE,eAAe,CAAC;IAE3B;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;CAClB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CloudpackConfig.js","sourceRoot":"","sources":["../src/CloudpackConfig.ts"],"names":[],"mappings":"","sourcesContent":["import type { GeneratedConfig } from './GeneratedConfig.js';\nimport type { AppConfig } from './AppConfig.js';\nimport type { BundleMode } from './BundleMode.js';\n\n/**\n * The merged result of user-provided and generated configuration for Cloudpack.\n */\n\nexport type CloudpackConfig = AppConfig & {\n mode: BundleMode;\n generated: GeneratedConfig;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"CloudpackConfig.js","sourceRoot":"","sources":["../src/CloudpackConfig.ts"],"names":[],"mappings":"","sourcesContent":["import type { GeneratedConfig } from './GeneratedConfig.js';\nimport type { AppConfig } from './AppConfig.js';\nimport type { BundleMode } from './BundleMode.js';\nimport type { Route } from './Route.js';\nimport type { DevServer } from './DevServer.js';\n\n/**\n * The merged result of user-provided and generated configuration for Cloudpack.\n */\n\nexport type CloudpackConfig = Omit<AppConfig, 'routes' | 'devServer'> & {\n /**\n * The path to the app's package.\n */\n appPath: string;\n\n /**\n * Dev server settings.\n */\n devServer?: Omit<DevServer, 'routes'>;\n\n /**\n * Mode to run the app in.\n */\n mode: BundleMode;\n\n /**\n * Generated config settings.\n */\n generated: GeneratedConfig;\n\n /**\n * Routes which have been expanded from shorthand entries.\n */\n routes?: Route[];\n};\n"]}
|
package/lib/DevServer.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HttpsConfig } from './HttpsConfig.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ShorthandRoute } from './Route.js';
|
|
3
3
|
export interface DevServer {
|
|
4
4
|
/**
|
|
5
5
|
* The domain name of the server.
|
|
@@ -31,8 +31,8 @@ export interface DevServer {
|
|
|
31
31
|
*/
|
|
32
32
|
https?: HttpsConfig;
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
34
|
+
* @deprecated - Routes has moved to the root of the config.
|
|
35
35
|
*/
|
|
36
|
-
routes?:
|
|
36
|
+
routes?: ShorthandRoute[];
|
|
37
37
|
}
|
|
38
38
|
//# sourceMappingURL=DevServer.d.ts.map
|
package/lib/DevServer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DevServer.d.ts","sourceRoot":"","sources":["../src/DevServer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"DevServer.d.ts","sourceRoot":"","sources":["../src/DevServer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAExC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAEzB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,cAAc,EAAE,CAAC;CAC3B"}
|
package/lib/DevServer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DevServer.js","sourceRoot":"","sources":["../src/DevServer.ts"],"names":[],"mappings":"","sourcesContent":["import type { HttpsConfig } from './HttpsConfig.js';\nimport type {
|
|
1
|
+
{"version":3,"file":"DevServer.js","sourceRoot":"","sources":["../src/DevServer.ts"],"names":[],"mappings":"","sourcesContent":["import type { HttpsConfig } from './HttpsConfig.js';\nimport type { ShorthandRoute } from './Route.js';\n\nexport interface DevServer {\n /**\n * The domain name of the server.\n */\n domain?: string;\n\n /**\n * An optional dictionary of header key/value pairs to be use with the server.\n * NOTE: The following header values from Cloudpack will \"win\" against by a user's config:\n * 'Cache-Control': 'no-cache'\n * 'Access-Control-Allow-Origin': '*'\n */\n requestHeaders?: Record<string, string>;\n\n /**\n * The ports to be used by the server.\n * It can be a number or an array of numbers.\n * If ports are provided, an error will be thrown if none are available.\n * If no ports are provided, the server will attempt to find an available port.\n */\n port?: number | number[];\n\n /**\n * The default path to use when opening the browser.\n */\n defaultPath?: string;\n\n /**\n * The config settings for the https server.\n * Paths to files are accepted for 'ca', 'cert', 'key', and 'pfx' settings.\n * Everything else is passed directly to the https.createServer() method.\n * If not provided, the server will use http.\n */\n https?: HttpsConfig;\n\n /**\n * @deprecated - Routes has moved to the root of the config.\n */\n routes?: ShorthandRoute[];\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface ExpandedSourcePath {
|
|
2
|
+
/**
|
|
3
|
+
* The relative path to the source file. (e.g. `./src/index.ts`)
|
|
4
|
+
*/
|
|
5
|
+
sourcePath: string;
|
|
6
|
+
/**
|
|
7
|
+
* The path to import the resulting bundled output from. This would represent the key
|
|
8
|
+
* in the import map entry to be imported. (e.g. `.` represents the default package export.)
|
|
9
|
+
*/
|
|
10
|
+
importPath: string;
|
|
11
|
+
/**
|
|
12
|
+
* The path to be requested by the browser. This would present the value in the import map
|
|
13
|
+
* entry to be requested. (e.g. `./lib/index.js`)
|
|
14
|
+
*/
|
|
15
|
+
requestPath: string;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=ExpandedSourcePath.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpandedSourcePath.d.ts","sourceRoot":"","sources":["../src/ExpandedSourcePath.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpandedSourcePath.js","sourceRoot":"","sources":["../src/ExpandedSourcePath.ts"],"names":[],"mappings":"","sourcesContent":["export interface ExpandedSourcePath {\n /**\n * The relative path to the source file. (e.g. `./src/index.ts`)\n */\n sourcePath: string;\n\n /**\n * The path to import the resulting bundled output from. This would represent the key\n * in the import map entry to be imported. (e.g. `.` represents the default package export.)\n */\n importPath: string;\n\n /**\n * The path to be requested by the browser. This would present the value in the import map\n * entry to be requested. (e.g. `./lib/index.js`)\n */\n requestPath: string;\n}\n"]}
|
package/lib/HttpsConfig.d.ts
CHANGED
package/lib/HttpsConfig.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpsConfig.d.ts","sourceRoot":"","sources":["../src/HttpsConfig.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HttpsConfig.d.ts","sourceRoot":"","sources":["../src/HttpsConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAE5D;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,IAAI,CAC5B,aAAa,CAAC,OAAO,eAAe,EAAE,OAAO,cAAc,CAAC,EAE5D,iBAAiB,GAAG,gBAAgB,CACrC,CAAC"}
|
package/lib/Route.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ExpandedSourcePath } from './ExpandedSourcePath.js';
|
|
1
2
|
export interface SharedRouteOptions {
|
|
2
3
|
/**
|
|
3
4
|
* The url path part to match. Start paths with a leading slash, e.g. `'/my-route'`. You can also
|
|
@@ -8,7 +9,7 @@ export interface SharedRouteOptions {
|
|
|
8
9
|
/**
|
|
9
10
|
* A server-rendered route. The route is rendered by a custom server script in Cloudpack.
|
|
10
11
|
*/
|
|
11
|
-
export interface
|
|
12
|
+
export interface ShorthandRenderedRoute extends SharedRouteOptions {
|
|
12
13
|
/**
|
|
13
14
|
* Path to a .js or .html file used for rendering the route. If a script is provided, it must
|
|
14
15
|
* export a default function implementing `RenderRouteFunction` defined in `@ms-cloudpack/app-server`.
|
|
@@ -19,7 +20,14 @@ export interface RenderedRoute extends SharedRouteOptions {
|
|
|
19
20
|
* Default is '.', meaning the main package export key.
|
|
20
21
|
*/
|
|
21
22
|
exportEntry?: string;
|
|
23
|
+
/**
|
|
24
|
+
* To be implemented. The source entry or entries to be included on the page for this route.
|
|
25
|
+
*/
|
|
26
|
+
entry?: (string | ExpandedSourcePath)[];
|
|
22
27
|
}
|
|
28
|
+
export type RenderedRoute = Omit<ShorthandRenderedRoute, 'entry'> & {
|
|
29
|
+
entry?: ExpandedSourcePath[];
|
|
30
|
+
};
|
|
23
31
|
/**
|
|
24
32
|
* A route with a staticPath property serves static files from the specified path.
|
|
25
33
|
*/
|
|
@@ -40,6 +48,7 @@ export interface BootstrapRoute extends SharedRouteOptions {
|
|
|
40
48
|
*/
|
|
41
49
|
exportEntry?: string;
|
|
42
50
|
}
|
|
51
|
+
export type ShorthandRoute = ShorthandRenderedRoute | StaticRoute | BootstrapRoute;
|
|
43
52
|
export type Route = RenderedRoute | StaticRoute | BootstrapRoute;
|
|
44
53
|
/**
|
|
45
54
|
* User defined type guard to check if a route is a static route.
|
package/lib/Route.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Route.d.ts","sourceRoot":"","sources":["../src/Route.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,
|
|
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;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;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,CAAC,MAAM,GAAG,kBAAkB,CAAC,EAAE,CAAC;CACzC;AAED,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,sBAAsB,EAAE,OAAO,CAAC,GAAG;IAClE,KAAK,CAAC,EAAE,kBAAkB,EAAE,CAAC;CAC9B,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,kBAAkB;IACrD;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,kBAAkB;IACxD,IAAI,EAAE,WAAW,CAAC;IAClB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CAGtB;AAED,MAAM,MAAM,cAAc,GAAG,sBAAsB,GAAG,WAAW,GAAG,cAAc,CAAC;AAEnF,MAAM,MAAM,KAAK,GAAG,aAAa,GAAG,WAAW,GAAG,cAAc,CAAC;AAEjE;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,WAAW,CAEhE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,cAAc,CAEtE;AAKD,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,aAAa,CAEpE"}
|
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":"AAgEA;;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,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;AAC3D,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 match: string;\n}\n\n/**\n * A server-rendered route. 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 * 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 * To be implemented. The source entry or entries to be included on the page for this route.\n */\n entry?: (string | ExpandedSourcePath)[];\n}\n\nexport type RenderedRoute = Omit<ShorthandRenderedRoute, 'entry'> & {\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 {\n type: 'bootstrap';\n /**\n * 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 // entry: (string | ExpandedSourcePath);\n}\n\nexport type ShorthandRoute = ShorthandRenderedRoute | StaticRoute | BootstrapRoute;\n\nexport type Route = RenderedRoute | StaticRoute | BootstrapRoute;\n\n/**\n * User defined 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 * User defined 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 * User defined type guard to check if a route is a rendered route.\n */\nexport function isRenderedRoute(route: Route): route is RenderedRoute {\n return !isStaticRoute(route) && !isBootstrapRoute(route);\n}\n"]}
|
package/lib/allFeatures.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allFeatures.d.ts","sourceRoot":"","sources":["../src/allFeatures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,WAAW;IAGtB,2DAA2D
|
|
1
|
+
{"version":3,"file":"allFeatures.d.ts","sourceRoot":"","sources":["../src/allFeatures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,WAAW;IAGtB,2DAA2D;uBACmC,OAAO;IAErG,sEAAsE;yBACqC,OAAO;IAElH,6FAA6F;4BAGxF,OAAO;IAEZ;;;OAGG;0BAIE,OAAO;IAEZ,kEAAkE;0BACsC,OAAO;IAE/G,sCAAsC;iBAC6B,OAAO;IAE1E,2DAA2D;wBACoC,OAAO;IAEtG,uDAAuD;mBAC+B,OAAO;yBAMxF,OAAO;IAEZ,mGAAmG;uBAG9F,OAAO;IAEZ,gDAAgD;0BACsC,OAAO;CAC9F,CAAC"}
|
package/package.json
CHANGED
package/schema/AppConfig.json
CHANGED
|
@@ -87,6 +87,13 @@
|
|
|
87
87
|
"additionalProperties": false,
|
|
88
88
|
"description": "Azure Blob Storage configuration for remote cache - uploading and downloading packages. If this is not provided, the remote cache will not be used."
|
|
89
89
|
},
|
|
90
|
+
"routes": {
|
|
91
|
+
"type": "array",
|
|
92
|
+
"items": {
|
|
93
|
+
"$ref": "#/definitions/ShorthandRoute"
|
|
94
|
+
},
|
|
95
|
+
"description": "Defines what routes to support from the app server, and which scripts will be loaded for each."
|
|
96
|
+
},
|
|
90
97
|
"neverExcludeDependencies": {
|
|
91
98
|
"type": "array",
|
|
92
99
|
"items": {
|
|
@@ -140,9 +147,9 @@
|
|
|
140
147
|
"routes": {
|
|
141
148
|
"type": "array",
|
|
142
149
|
"items": {
|
|
143
|
-
"$ref": "#/definitions/
|
|
150
|
+
"$ref": "#/definitions/ShorthandRoute"
|
|
144
151
|
},
|
|
145
|
-
"
|
|
152
|
+
"deprecated": "- Routes has moved to the root of the config."
|
|
146
153
|
}
|
|
147
154
|
},
|
|
148
155
|
"additionalProperties": false
|
|
@@ -430,10 +437,10 @@
|
|
|
430
437
|
],
|
|
431
438
|
"additionalProperties": false
|
|
432
439
|
},
|
|
433
|
-
"
|
|
440
|
+
"ShorthandRoute": {
|
|
434
441
|
"anyOf": [
|
|
435
442
|
{
|
|
436
|
-
"$ref": "#/definitions/
|
|
443
|
+
"$ref": "#/definitions/ShorthandRenderedRoute"
|
|
437
444
|
},
|
|
438
445
|
{
|
|
439
446
|
"$ref": "#/definitions/StaticRoute"
|
|
@@ -443,7 +450,7 @@
|
|
|
443
450
|
}
|
|
444
451
|
]
|
|
445
452
|
},
|
|
446
|
-
"
|
|
453
|
+
"ShorthandRenderedRoute": {
|
|
447
454
|
"type": "object",
|
|
448
455
|
"properties": {
|
|
449
456
|
"match": {
|
|
@@ -457,6 +464,20 @@
|
|
|
457
464
|
"exportEntry": {
|
|
458
465
|
"type": "string",
|
|
459
466
|
"description": "The key in the exports map which represents the entry point app script for this route. Default is '.', meaning the main package export key."
|
|
467
|
+
},
|
|
468
|
+
"entry": {
|
|
469
|
+
"type": "array",
|
|
470
|
+
"items": {
|
|
471
|
+
"anyOf": [
|
|
472
|
+
{
|
|
473
|
+
"type": "string"
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
"$ref": "#/definitions/ExpandedSourcePath"
|
|
477
|
+
}
|
|
478
|
+
]
|
|
479
|
+
},
|
|
480
|
+
"description": "To be implemented. The source entry or entries to be included on the page for this route."
|
|
460
481
|
}
|
|
461
482
|
},
|
|
462
483
|
"additionalProperties": false,
|
|
@@ -465,6 +486,29 @@
|
|
|
465
486
|
],
|
|
466
487
|
"description": "A server-rendered route. The route is rendered by a custom server script in Cloudpack."
|
|
467
488
|
},
|
|
489
|
+
"ExpandedSourcePath": {
|
|
490
|
+
"type": "object",
|
|
491
|
+
"properties": {
|
|
492
|
+
"sourcePath": {
|
|
493
|
+
"type": "string",
|
|
494
|
+
"description": "The relative path to the source file. (e.g. `./src/index.ts`)"
|
|
495
|
+
},
|
|
496
|
+
"importPath": {
|
|
497
|
+
"type": "string",
|
|
498
|
+
"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.)"
|
|
499
|
+
},
|
|
500
|
+
"requestPath": {
|
|
501
|
+
"type": "string",
|
|
502
|
+
"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`)"
|
|
503
|
+
}
|
|
504
|
+
},
|
|
505
|
+
"required": [
|
|
506
|
+
"sourcePath",
|
|
507
|
+
"importPath",
|
|
508
|
+
"requestPath"
|
|
509
|
+
],
|
|
510
|
+
"additionalProperties": false
|
|
511
|
+
},
|
|
468
512
|
"StaticRoute": {
|
|
469
513
|
"type": "object",
|
|
470
514
|
"properties": {
|
package/schema/UserConfig.json
CHANGED
|
@@ -91,6 +91,13 @@
|
|
|
91
91
|
"additionalProperties": false,
|
|
92
92
|
"description": "Azure Blob Storage configuration for remote cache - uploading and downloading packages. If this is not provided, the remote cache will not be used."
|
|
93
93
|
},
|
|
94
|
+
"routes": {
|
|
95
|
+
"type": "array",
|
|
96
|
+
"items": {
|
|
97
|
+
"$ref": "#/definitions/ShorthandRoute"
|
|
98
|
+
},
|
|
99
|
+
"description": "Defines what routes to support from the app server, and which scripts will be loaded for each."
|
|
100
|
+
},
|
|
94
101
|
"neverExcludeDependencies": {
|
|
95
102
|
"type": "array",
|
|
96
103
|
"items": {
|
|
@@ -141,9 +148,9 @@
|
|
|
141
148
|
"routes": {
|
|
142
149
|
"type": "array",
|
|
143
150
|
"items": {
|
|
144
|
-
"$ref": "#/definitions/
|
|
151
|
+
"$ref": "#/definitions/ShorthandRoute"
|
|
145
152
|
},
|
|
146
|
-
"
|
|
153
|
+
"deprecated": "- Routes has moved to the root of the config."
|
|
147
154
|
}
|
|
148
155
|
},
|
|
149
156
|
"additionalProperties": false
|
|
@@ -431,10 +438,10 @@
|
|
|
431
438
|
],
|
|
432
439
|
"additionalProperties": false
|
|
433
440
|
},
|
|
434
|
-
"
|
|
441
|
+
"ShorthandRoute": {
|
|
435
442
|
"anyOf": [
|
|
436
443
|
{
|
|
437
|
-
"$ref": "#/definitions/
|
|
444
|
+
"$ref": "#/definitions/ShorthandRenderedRoute"
|
|
438
445
|
},
|
|
439
446
|
{
|
|
440
447
|
"$ref": "#/definitions/StaticRoute"
|
|
@@ -444,7 +451,7 @@
|
|
|
444
451
|
}
|
|
445
452
|
]
|
|
446
453
|
},
|
|
447
|
-
"
|
|
454
|
+
"ShorthandRenderedRoute": {
|
|
448
455
|
"type": "object",
|
|
449
456
|
"properties": {
|
|
450
457
|
"match": {
|
|
@@ -458,6 +465,20 @@
|
|
|
458
465
|
"exportEntry": {
|
|
459
466
|
"type": "string",
|
|
460
467
|
"description": "The key in the exports map which represents the entry point app script for this route. Default is '.', meaning the main package export key."
|
|
468
|
+
},
|
|
469
|
+
"entry": {
|
|
470
|
+
"type": "array",
|
|
471
|
+
"items": {
|
|
472
|
+
"anyOf": [
|
|
473
|
+
{
|
|
474
|
+
"type": "string"
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
"$ref": "#/definitions/ExpandedSourcePath"
|
|
478
|
+
}
|
|
479
|
+
]
|
|
480
|
+
},
|
|
481
|
+
"description": "To be implemented. The source entry or entries to be included on the page for this route."
|
|
461
482
|
}
|
|
462
483
|
},
|
|
463
484
|
"additionalProperties": false,
|
|
@@ -466,6 +487,29 @@
|
|
|
466
487
|
],
|
|
467
488
|
"description": "A server-rendered route. The route is rendered by a custom server script in Cloudpack."
|
|
468
489
|
},
|
|
490
|
+
"ExpandedSourcePath": {
|
|
491
|
+
"type": "object",
|
|
492
|
+
"properties": {
|
|
493
|
+
"sourcePath": {
|
|
494
|
+
"type": "string",
|
|
495
|
+
"description": "The relative path to the source file. (e.g. `./src/index.ts`)"
|
|
496
|
+
},
|
|
497
|
+
"importPath": {
|
|
498
|
+
"type": "string",
|
|
499
|
+
"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.)"
|
|
500
|
+
},
|
|
501
|
+
"requestPath": {
|
|
502
|
+
"type": "string",
|
|
503
|
+
"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`)"
|
|
504
|
+
}
|
|
505
|
+
},
|
|
506
|
+
"required": [
|
|
507
|
+
"sourcePath",
|
|
508
|
+
"importPath",
|
|
509
|
+
"requestPath"
|
|
510
|
+
],
|
|
511
|
+
"additionalProperties": false
|
|
512
|
+
},
|
|
469
513
|
"StaticRoute": {
|
|
470
514
|
"type": "object",
|
|
471
515
|
"properties": {
|