@ms-cloudpack/api-server 0.5.15 → 0.5.16
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/TaskRunner.d.ts +2 -1
- package/lib/TaskRunner.d.ts.map +1 -1
- package/lib/TaskRunner.js.map +1 -1
- package/lib/TaskScheduler.d.ts +1 -1
- package/lib/TaskScheduler.d.ts.map +1 -1
- package/lib/TaskScheduler.js.map +1 -1
- package/lib/addOverride.d.ts +1 -1
- package/lib/addOverride.d.ts.map +1 -1
- package/lib/addOverride.js.map +1 -1
- package/lib/common/findPackageOverride.d.ts +1 -1
- package/lib/common/findPackageOverride.d.ts.map +1 -1
- package/lib/common/findPackageOverride.js.map +1 -1
- package/lib/index.d.ts +11 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/startApiServer.d.ts +2 -1
- package/lib/startApiServer.d.ts.map +1 -1
- package/lib/startApiServer.js.map +1 -1
- package/lib/startWatcher.d.ts +2 -1
- package/lib/startWatcher.d.ts.map +1 -1
- package/lib/startWatcher.js.map +1 -1
- package/lib/types/ApiServer.d.ts +14 -0
- package/lib/types/ApiServer.d.ts.map +1 -0
- package/lib/types/ApiServer.js +2 -0
- package/lib/types/ApiServer.js.map +1 -0
- package/lib/types/BundleRequest.d.ts +10 -0
- package/lib/types/BundleRequest.d.ts.map +1 -0
- package/lib/types/BundleRequest.js +2 -0
- package/lib/types/BundleRequest.js.map +1 -0
- package/lib/types/CreateHtmlFunction.d.ts +7 -0
- package/lib/types/CreateHtmlFunction.d.ts.map +1 -0
- package/lib/types/CreateHtmlFunction.js +2 -0
- package/lib/types/CreateHtmlFunction.js.map +1 -0
- package/lib/types/CreateHtmlOptions.d.ts +18 -0
- package/lib/types/CreateHtmlOptions.d.ts.map +1 -0
- package/lib/types/CreateHtmlOptions.js +2 -0
- package/lib/types/CreateHtmlOptions.js.map +1 -0
- package/lib/types/CreateHtmlResult.d.ts +8 -0
- package/lib/types/CreateHtmlResult.d.ts.map +1 -0
- package/lib/types/CreateHtmlResult.js +5 -0
- package/lib/types/CreateHtmlResult.js.map +1 -0
- package/lib/types/CreateHtmlScript.d.ts +8 -0
- package/lib/types/CreateHtmlScript.d.ts.map +1 -0
- package/lib/types/CreateHtmlScript.js +2 -0
- package/lib/types/CreateHtmlScript.js.map +1 -0
- package/lib/types/DevServer.d.ts +33 -0
- package/lib/types/DevServer.d.ts.map +1 -0
- package/lib/types/DevServer.js +2 -0
- package/lib/types/DevServer.js.map +1 -0
- package/lib/types/PackageOverride.d.ts +8 -0
- package/lib/types/PackageOverride.d.ts.map +1 -0
- package/lib/types/PackageOverride.js +2 -0
- package/lib/types/PackageOverride.js.map +1 -0
- package/lib/types/Route.d.ts +23 -0
- package/lib/types/Route.d.ts.map +1 -0
- package/lib/types/Route.js +2 -0
- package/lib/types/Route.js.map +1 -0
- package/lib/types/Session.d.ts +70 -0
- package/lib/types/Session.d.ts.map +1 -0
- package/lib/types/Session.js +2 -0
- package/lib/types/Session.js.map +1 -0
- package/lib/types/SessionStats.d.ts +8 -0
- package/lib/types/SessionStats.d.ts.map +1 -0
- package/lib/types/SessionStats.js +2 -0
- package/lib/types/SessionStats.js.map +1 -0
- package/lib/types/Task.d.ts +17 -0
- package/lib/types/Task.d.ts.map +1 -0
- package/lib/types/Task.js +2 -0
- package/lib/types/Task.js.map +1 -0
- package/lib/types/TaskDescription.d.ts +9 -0
- package/lib/types/TaskDescription.d.ts.map +1 -0
- package/lib/types/TaskDescription.js +2 -0
- package/lib/types/TaskDescription.js.map +1 -0
- package/lib/types/TaskEndDescription.d.ts +7 -0
- package/lib/types/TaskEndDescription.d.ts.map +1 -0
- package/lib/types/TaskEndDescription.js +2 -0
- package/lib/types/TaskEndDescription.js.map +1 -0
- package/lib/types/TaskError.d.ts +9 -0
- package/lib/types/TaskError.d.ts.map +1 -0
- package/lib/types/TaskError.js +2 -0
- package/lib/types/TaskError.js.map +1 -0
- package/lib/types/TaskOptions.d.ts +5 -0
- package/lib/types/TaskOptions.d.ts.map +1 -0
- package/lib/types/TaskOptions.js +2 -0
- package/lib/types/TaskOptions.js.map +1 -0
- package/lib/types/TaskStartDescription.d.ts +7 -0
- package/lib/types/TaskStartDescription.d.ts.map +1 -0
- package/lib/types/TaskStartDescription.js +2 -0
- package/lib/types/TaskStartDescription.js.map +1 -0
- package/lib/types/TelemetryConfig.d.ts +7 -0
- package/lib/types/TelemetryConfig.d.ts.map +1 -0
- package/lib/types/TelemetryConfig.js +2 -0
- package/lib/types/TelemetryConfig.js.map +1 -0
- package/lib/validateOverride.d.ts +1 -1
- package/lib/validateOverride.d.ts.map +1 -1
- package/lib/validateOverride.js.map +1 -1
- package/package.json +1 -1
- package/lib/types.d.ts +0 -234
- package/lib/types.d.ts.map +0 -1
- package/lib/types.js +0 -2
- package/lib/types.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PackageOverride.d.ts","sourceRoot":"","sources":["../../src/types/PackageOverride.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE/D,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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PackageOverride.js","sourceRoot":"","sources":["../../src/types/PackageOverride.ts"],"names":[],"mappings":"","sourcesContent":["import type { PackageJson } from '@ms-cloudpack/bundler-types';\n\nexport interface PackageOverride {\n name: string;\n versionRequirement: string;\n isInternal?: boolean;\n overrides: PackageJson;\n}\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface Route {
|
|
2
|
+
/**
|
|
3
|
+
* The url path part to match. Start paths with a leading slash, e.g. `'/my-route'`. You can also
|
|
4
|
+
* use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`.
|
|
5
|
+
*/
|
|
6
|
+
match: string;
|
|
7
|
+
/**
|
|
8
|
+
* The path relative to the app root to static assets. If this is provided, renderScript/exportEntry
|
|
9
|
+
* will be ignored.
|
|
10
|
+
*/
|
|
11
|
+
staticPath?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Path to a .js or .html file used for rendering the route. If a script is provided, it must
|
|
14
|
+
* export a default function implementing `CreateHtmlFunction` defined in `@ms-cloudpack/cli`.
|
|
15
|
+
*/
|
|
16
|
+
renderScript?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The key in the exports map which represents the entry point app script for this route.
|
|
19
|
+
* Default is '.', meaning the main package export key.
|
|
20
|
+
*/
|
|
21
|
+
exportEntry?: string;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=Route.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Route.d.ts","sourceRoot":"","sources":["../../src/types/Route.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IACpB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Route.js","sourceRoot":"","sources":["../../src/types/Route.ts"],"names":[],"mappings":"","sourcesContent":["export interface Route {\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 * The path relative to the app root to static assets. If this is provided, renderScript/exportEntry\n * will be ignored.\n */\n staticPath?: string;\n\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 `CreateHtmlFunction` defined in `@ms-cloudpack/cli`.\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"]}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { ImportMap, ResolveMap } from '@ms-cloudpack/package-utilities';
|
|
2
|
+
import type { CloudpackConfig } from '@ms-cloudpack/config';
|
|
3
|
+
export interface Session {
|
|
4
|
+
/**
|
|
5
|
+
* The session id, used for identifying
|
|
6
|
+
*/
|
|
7
|
+
id: string;
|
|
8
|
+
/**
|
|
9
|
+
* The config used by the session.
|
|
10
|
+
*/
|
|
11
|
+
config: CloudpackConfig;
|
|
12
|
+
/**
|
|
13
|
+
* The primary application path to monitor.
|
|
14
|
+
*/
|
|
15
|
+
appPath: string;
|
|
16
|
+
/**
|
|
17
|
+
* The type of session controls how the code is served via start.
|
|
18
|
+
* Web apps require app server and asset hosting, while libraries
|
|
19
|
+
* only need a bundle service.
|
|
20
|
+
*/
|
|
21
|
+
type: 'web-app' | 'library';
|
|
22
|
+
/**
|
|
23
|
+
* The mode of the session controls how the code is bundled. Library
|
|
24
|
+
* mode bundles each package in isolation, while development and
|
|
25
|
+
* production modes bundle the full app graph together. Library
|
|
26
|
+
* mode is fastest but packages must be complaint for loading in
|
|
27
|
+
* the browser.
|
|
28
|
+
*/
|
|
29
|
+
mode: 'library' | 'development' | 'production';
|
|
30
|
+
/**
|
|
31
|
+
* Used to resolve packages in the dependency graph.
|
|
32
|
+
*/
|
|
33
|
+
resolveMap: ResolveMap;
|
|
34
|
+
/**
|
|
35
|
+
* Reload sequence to ensure that the client is always
|
|
36
|
+
* up to date with the latest changes.
|
|
37
|
+
*/
|
|
38
|
+
sequence: number;
|
|
39
|
+
/**
|
|
40
|
+
* Get session version.
|
|
41
|
+
* Used to force a hard refresh on the client.
|
|
42
|
+
*/
|
|
43
|
+
getSessionVersion: () => number;
|
|
44
|
+
/**
|
|
45
|
+
* Used to increment the session version.
|
|
46
|
+
* If version is undefined, the version will be incremented by 1.
|
|
47
|
+
* If version is greater than the current version, the version will be set to the new value.
|
|
48
|
+
*/
|
|
49
|
+
incrementSessionVersion: (version?: number) => void;
|
|
50
|
+
/**
|
|
51
|
+
* The name of the project folder.
|
|
52
|
+
* Used to differentiate between multiple projects.
|
|
53
|
+
*/
|
|
54
|
+
projectName: string;
|
|
55
|
+
/**
|
|
56
|
+
* The version of each target.
|
|
57
|
+
* Used to force a client cache refresh on a single target.
|
|
58
|
+
*/
|
|
59
|
+
targetVersions: Record<string, number>;
|
|
60
|
+
/**
|
|
61
|
+
* Increments the version for the given target.
|
|
62
|
+
*/
|
|
63
|
+
incrementTargetVersion: (inputPath: string) => void;
|
|
64
|
+
/**
|
|
65
|
+
* The import map for the session.
|
|
66
|
+
*/
|
|
67
|
+
getImportMap: () => ImportMap | undefined;
|
|
68
|
+
setImportMap: (newImportMap: ImportMap) => ImportMap;
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=Session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Session.d.ts","sourceRoot":"","sources":["../../src/types/Session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,MAAM,EAAE,eAAe,CAAC;IAExB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;OAIG;IACH,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;IAE5B;;;;;;OAMG;IACH,IAAI,EAAE,SAAS,GAAG,aAAa,GAAG,YAAY,CAAC;IAE/C;;OAEG;IACH,UAAU,EAAE,UAAU,CAAC;IAEvB;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,iBAAiB,EAAE,MAAM,MAAM,CAAC;IAEhC;;;;OAIG;IACH,uBAAuB,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAEpD;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEvC;;OAEG;IACH,sBAAsB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAEpD;;OAEG;IACH,YAAY,EAAE,MAAM,SAAS,GAAG,SAAS,CAAC;IAE1C,YAAY,EAAE,CAAC,YAAY,EAAE,SAAS,KAAK,SAAS,CAAC;CACtD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Session.js","sourceRoot":"","sources":["../../src/types/Session.ts"],"names":[],"mappings":"","sourcesContent":["import type { ImportMap, ResolveMap } from '@ms-cloudpack/package-utilities';\nimport type { CloudpackConfig } from '@ms-cloudpack/config';\n\nexport interface Session {\n /**\n * The session id, used for identifying\n */\n id: string;\n\n /**\n * The config used by the session.\n */\n config: CloudpackConfig;\n\n /**\n * The primary application path to monitor.\n */\n appPath: string;\n\n /**\n * The type of session controls how the code is served via start.\n * Web apps require app server and asset hosting, while libraries\n * only need a bundle service.\n */\n type: 'web-app' | 'library';\n\n /**\n * The mode of the session controls how the code is bundled. Library\n * mode bundles each package in isolation, while development and\n * production modes bundle the full app graph together. Library\n * mode is fastest but packages must be complaint for loading in\n * the browser.\n */\n mode: 'library' | 'development' | 'production';\n\n /**\n * Used to resolve packages in the dependency graph.\n */\n resolveMap: ResolveMap;\n\n /**\n * Reload sequence to ensure that the client is always\n * up to date with the latest changes.\n */\n sequence: number;\n\n /**\n * Get session version.\n * Used to force a hard refresh on the client.\n */\n getSessionVersion: () => number;\n\n /**\n * Used to increment the session version.\n * If version is undefined, the version will be incremented by 1.\n * If version is greater than the current version, the version will be set to the new value.\n */\n incrementSessionVersion: (version?: number) => void;\n\n /**\n * The name of the project folder.\n * Used to differentiate between multiple projects.\n */\n projectName: string;\n\n /**\n * The version of each target.\n * Used to force a client cache refresh on a single target.\n */\n targetVersions: Record<string, number>;\n\n /**\n * Increments the version for the given target.\n */\n incrementTargetVersion: (inputPath: string) => void;\n\n /**\n * The import map for the session.\n */\n getImportMap: () => ImportMap | undefined;\n\n setImportMap: (newImportMap: ImportMap) => ImportMap;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SessionStats.d.ts","sourceRoot":"","sources":["../../src/types/SessionStats.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAE3B,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IAEnB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;CACvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SessionStats.js","sourceRoot":"","sources":["../../src/types/SessionStats.ts"],"names":[],"mappings":"","sourcesContent":["export interface SessionStats {\n status: 'idle' | 'pending';\n\n remainingTasks: number;\n totalTasks: number;\n\n totalErrors: number;\n totalWarnings: number;\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { TaskError } from './TaskError.js';
|
|
2
|
+
import type { TaskStartDescription } from './TaskStartDescription.js';
|
|
3
|
+
import type { TaskEndDescription } from './TaskEndDescription.js';
|
|
4
|
+
export interface Task<TReturn> {
|
|
5
|
+
name: string;
|
|
6
|
+
id: string;
|
|
7
|
+
dir?: string;
|
|
8
|
+
execute: () => Promise<TReturn | undefined>;
|
|
9
|
+
clear?: () => void;
|
|
10
|
+
watch?: boolean;
|
|
11
|
+
dispose?: () => Promise<void>;
|
|
12
|
+
onDispose?: () => void;
|
|
13
|
+
getErrors?: () => TaskError[] | undefined;
|
|
14
|
+
getStartDescription?: () => TaskStartDescription;
|
|
15
|
+
getEndDescription?: (result: TReturn | undefined) => TaskEndDescription;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=Task.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Task.d.ts","sourceRoot":"","sources":["../../src/types/Task.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,MAAM,WAAW,IAAI,CAAC,OAAO;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IAC5C,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,SAAS,EAAE,GAAG,SAAS,CAAC;IAC1C,mBAAmB,CAAC,EAAE,MAAM,oBAAoB,CAAC;IACjD,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,GAAG,SAAS,KAAK,kBAAkB,CAAC;CACzE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Task.js","sourceRoot":"","sources":["../../src/types/Task.ts"],"names":[],"mappings":"","sourcesContent":["import type { TaskError } from './TaskError.js';\nimport type { TaskStartDescription } from './TaskStartDescription.js';\nimport type { TaskEndDescription } from './TaskEndDescription.js';\n\nexport interface Task<TReturn> {\n name: string;\n id: string;\n dir?: string;\n execute: () => Promise<TReturn | undefined>;\n clear?: () => void;\n watch?: boolean;\n dispose?: () => Promise<void>;\n onDispose?: () => void;\n getErrors?: () => TaskError[] | undefined;\n getStartDescription?: () => TaskStartDescription;\n getEndDescription?: (result: TReturn | undefined) => TaskEndDescription;\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { TaskStartDescription } from './TaskStartDescription.js';
|
|
2
|
+
import type { TaskEndDescription } from './TaskEndDescription.js';
|
|
3
|
+
export interface TaskDescription extends TaskStartDescription, TaskEndDescription {
|
|
4
|
+
status: 'pending' | 'complete';
|
|
5
|
+
startTime: number;
|
|
6
|
+
durationMilliseconds?: number;
|
|
7
|
+
lastUpdated?: number;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=TaskDescription.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskDescription.d.ts","sourceRoot":"","sources":["../../src/types/TaskDescription.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,MAAM,WAAW,eAAgB,SAAQ,oBAAoB,EAAE,kBAAkB;IAC/E,MAAM,EAAE,SAAS,GAAG,UAAU,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskDescription.js","sourceRoot":"","sources":["../../src/types/TaskDescription.ts"],"names":[],"mappings":"","sourcesContent":["import type { TaskStartDescription } from './TaskStartDescription.js';\nimport type { TaskEndDescription } from './TaskEndDescription.js';\n\nexport interface TaskDescription extends TaskStartDescription, TaskEndDescription {\n status: 'pending' | 'complete';\n startTime: number;\n durationMilliseconds?: number;\n lastUpdated?: number;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskEndDescription.d.ts","sourceRoot":"","sources":["../../src/types/TaskEndDescription.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,EAAE,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskEndDescription.js","sourceRoot":"","sources":["../../src/types/TaskEndDescription.ts"],"names":[],"mappings":"","sourcesContent":["import type { TaskError } from './TaskError.js';\n\nexport interface TaskEndDescription {\n id: string;\n errors?: TaskError[];\n warnings?: TaskError[];\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskError.d.ts","sourceRoot":"","sources":["../../src/types/TaskError.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskError.js","sourceRoot":"","sources":["../../src/types/TaskError.ts"],"names":[],"mappings":"","sourcesContent":["export interface TaskError {\n message: string;\n pluginName: string;\n stack: string;\n fileLocation: string;\n lineNumber: number;\n columnNumber: number;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskOptions.d.ts","sourceRoot":"","sources":["../../src/types/TaskOptions.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskOptions.js","sourceRoot":"","sources":["../../src/types/TaskOptions.ts"],"names":[],"mappings":"","sourcesContent":["export interface TaskOptions {\n rerun?: boolean;\n watch?: () => void;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskStartDescription.d.ts","sourceRoot":"","sources":["../../src/types/TaskStartDescription.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskStartDescription.js","sourceRoot":"","sources":["../../src/types/TaskStartDescription.ts"],"names":[],"mappings":"","sourcesContent":["export interface TaskStartDescription {\n id: string;\n name?: string;\n inputPath?: string;\n outputPath?: string;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TelemetryConfig.d.ts","sourceRoot":"","sources":["../../src/types/TelemetryConfig.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;CAC5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TelemetryConfig.js","sourceRoot":"","sources":["../../src/types/TelemetryConfig.ts"],"names":[],"mappings":"","sourcesContent":["export interface TelemetryConfig {\n /**\n * Application Insights instrumentation key.\n */\n instrumentationKey: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validateOverride.d.ts","sourceRoot":"","sources":["../src/validateOverride.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"validateOverride.d.ts","sourceRoot":"","sources":["../src/validateOverride.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAGlD,wBAAsB,gBAAgB,CAAC,EACrC,OAAO,EACP,WAAW,EACX,UAAU,EACV,QAAQ,GACT,EAAE;IACD,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,oBA4BA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validateOverride.js","sourceRoot":"","sources":["../src/validateOverride.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACzF,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAE1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,EACrC,OAAO,EACP,WAAW,EACX,UAAU,EACV,QAAQ,GAMT;IACC,IAAI,UAAU,GAAG,SAAS,CAAC;IAE3B,IAAI,QAAQ,EAAE;QACZ,MAAM,WAAW,GAAG,KAAK,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC;QACtD,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,gBAAgB,CAAC,WAAW,CAAC,CAAC;QACrE,UAAU,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;KAChC;IAED,MAAM,KAAK,GAAG,mBAAmB,CAAC;QAChC,WAAW;QACX,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,UAAU;KACX,CAAC,CAAC;IAEH,IAAI,KAAK,KAAK,SAAS,EAAE;QACvB,OAAO,KAAK,CAAC;KACd;IAED,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,iBAAiB,CAAC;QAC3C,WAAW,EAAE,KAAK,CAAC,IAAI;QACvB,QAAQ,EAAE,UAAU;KACrB,CAAC,CAAC;IAEH,IAAI,QAAQ,EAAE;QACZ,OAAO,IAAI,CAAC;KACb;IACD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import { findResolveMapEntry, findFileInPackage } from '@ms-cloudpack/package-utilities';\nimport { slash } from '@ms-cloudpack/path-string-parsing';\nimport type { Session } from './types.js';\nimport { parseRequestInfo } from './parseRequestInfo.js';\n\nexport async function validateOverride({\n session,\n packageName,\n importPath,\n filename,\n}: {\n session: Session;\n packageName: string;\n importPath: string;\n filename?: string;\n}) {\n let definition = undefined;\n\n if (filename) {\n const requestPath = slash(new URL(filename).pathname);\n const { packageName: name, version } = parseRequestInfo(requestPath);\n definition = { name, version };\n }\n\n const entry = findResolveMapEntry({\n packageName,\n resolveMap: session.resolveMap,\n definition,\n });\n\n if (entry === undefined) {\n return false;\n }\n\n const { filePath } = await findFileInPackage({\n packagePath: entry.path,\n filePath: importPath,\n });\n\n if (filePath) {\n return true;\n }\n return false;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"validateOverride.js","sourceRoot":"","sources":["../src/validateOverride.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACzF,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAE1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,EACrC,OAAO,EACP,WAAW,EACX,UAAU,EACV,QAAQ,GAMT;IACC,IAAI,UAAU,GAAG,SAAS,CAAC;IAE3B,IAAI,QAAQ,EAAE;QACZ,MAAM,WAAW,GAAG,KAAK,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC;QACtD,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,gBAAgB,CAAC,WAAW,CAAC,CAAC;QACrE,UAAU,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;KAChC;IAED,MAAM,KAAK,GAAG,mBAAmB,CAAC;QAChC,WAAW;QACX,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,UAAU;KACX,CAAC,CAAC;IAEH,IAAI,KAAK,KAAK,SAAS,EAAE;QACvB,OAAO,KAAK,CAAC;KACd;IAED,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,iBAAiB,CAAC;QAC3C,WAAW,EAAE,KAAK,CAAC,IAAI;QACvB,QAAQ,EAAE,UAAU;KACrB,CAAC,CAAC;IAEH,IAAI,QAAQ,EAAE;QACZ,OAAO,IAAI,CAAC;KACb;IACD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import { findResolveMapEntry, findFileInPackage } from '@ms-cloudpack/package-utilities';\nimport { slash } from '@ms-cloudpack/path-string-parsing';\nimport type { Session } from './types/Session.js';\nimport { parseRequestInfo } from './parseRequestInfo.js';\n\nexport async function validateOverride({\n session,\n packageName,\n importPath,\n filename,\n}: {\n session: Session;\n packageName: string;\n importPath: string;\n filename?: string;\n}) {\n let definition = undefined;\n\n if (filename) {\n const requestPath = slash(new URL(filename).pathname);\n const { packageName: name, version } = parseRequestInfo(requestPath);\n definition = { name, version };\n }\n\n const entry = findResolveMapEntry({\n packageName,\n resolveMap: session.resolveMap,\n definition,\n });\n\n if (entry === undefined) {\n return false;\n }\n\n const { filePath } = await findFileInPackage({\n packagePath: entry.path,\n filePath: importPath,\n });\n\n if (filePath) {\n return true;\n }\n return false;\n}\n"]}
|
package/package.json
CHANGED
package/lib/types.d.ts
DELETED
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
import type { ImportMap, ResolveMap } from '@ms-cloudpack/package-utilities';
|
|
2
|
-
import type { PackageJson } from '@ms-cloudpack/bundler-types';
|
|
3
|
-
import type { HttpsConfig } from '@ms-cloudpack/create-express-app';
|
|
4
|
-
import type { CloudpackConfig } from '@ms-cloudpack/config';
|
|
5
|
-
export interface Session {
|
|
6
|
-
/**
|
|
7
|
-
* The session id, used for identifying
|
|
8
|
-
*/
|
|
9
|
-
id: string;
|
|
10
|
-
/**
|
|
11
|
-
* The config used by the session.
|
|
12
|
-
*/
|
|
13
|
-
config: CloudpackConfig;
|
|
14
|
-
/**
|
|
15
|
-
* The primary application path to monitor.
|
|
16
|
-
*/
|
|
17
|
-
appPath: string;
|
|
18
|
-
/**
|
|
19
|
-
* The type of session controls how the code is served via start.
|
|
20
|
-
* Web apps require app server and asset hosting, while libraries
|
|
21
|
-
* only need a bundle service.
|
|
22
|
-
*/
|
|
23
|
-
type: 'web-app' | 'library';
|
|
24
|
-
/**
|
|
25
|
-
* The mode of the session controls how the code is bundled. Library
|
|
26
|
-
* mode bundles each package in isolation, while development and
|
|
27
|
-
* production modes bundle the full app graph together. Library
|
|
28
|
-
* mode is fastest but packages must be complaint for loading in
|
|
29
|
-
* the browser.
|
|
30
|
-
*/
|
|
31
|
-
mode: 'library' | 'development' | 'production';
|
|
32
|
-
/**
|
|
33
|
-
* Used to resolve packages in the dependency graph.
|
|
34
|
-
*/
|
|
35
|
-
resolveMap: ResolveMap;
|
|
36
|
-
/**
|
|
37
|
-
* Reload sequence to ensure that the client is always
|
|
38
|
-
* up to date with the latest changes.
|
|
39
|
-
*/
|
|
40
|
-
sequence: number;
|
|
41
|
-
/**
|
|
42
|
-
* Get session version.
|
|
43
|
-
* Used to force a hard refresh on the client.
|
|
44
|
-
*/
|
|
45
|
-
getSessionVersion: () => number;
|
|
46
|
-
/**
|
|
47
|
-
* Used to increment the session version.
|
|
48
|
-
* If version is undefined, the version will be incremented by 1.
|
|
49
|
-
* If version is greater than the current version, the version will be set to the new value.
|
|
50
|
-
*/
|
|
51
|
-
incrementSessionVersion: (version?: number) => void;
|
|
52
|
-
/**
|
|
53
|
-
* The name of the project folder.
|
|
54
|
-
* Used to differentiate between multiple projects.
|
|
55
|
-
*/
|
|
56
|
-
projectName: string;
|
|
57
|
-
/**
|
|
58
|
-
* The version of each target.
|
|
59
|
-
* Used to force a client cache refresh on a single target.
|
|
60
|
-
*/
|
|
61
|
-
targetVersions: Record<string, number>;
|
|
62
|
-
/**
|
|
63
|
-
* Increments the version for the given target.
|
|
64
|
-
*/
|
|
65
|
-
incrementTargetVersion: (inputPath: string) => void;
|
|
66
|
-
/**
|
|
67
|
-
* The import map for the session.
|
|
68
|
-
*/
|
|
69
|
-
getImportMap: () => ImportMap | undefined;
|
|
70
|
-
setImportMap: (newImportMap: ImportMap) => ImportMap;
|
|
71
|
-
}
|
|
72
|
-
export interface SessionStats {
|
|
73
|
-
status: 'idle' | 'pending';
|
|
74
|
-
remainingTasks: number;
|
|
75
|
-
totalTasks: number;
|
|
76
|
-
totalErrors: number;
|
|
77
|
-
totalWarnings: number;
|
|
78
|
-
}
|
|
79
|
-
export interface BundleRequest {
|
|
80
|
-
id: string;
|
|
81
|
-
packageName: string;
|
|
82
|
-
version: string;
|
|
83
|
-
packagePath: string;
|
|
84
|
-
outputPath: string;
|
|
85
|
-
isExternal: boolean;
|
|
86
|
-
disableSourceMaps?: boolean;
|
|
87
|
-
}
|
|
88
|
-
export interface ApiServer {
|
|
89
|
-
url: string;
|
|
90
|
-
port: number;
|
|
91
|
-
notifyReload: () => void;
|
|
92
|
-
addTask: <TReturn>(task: Task<TReturn>, options?: TaskOptions) => Promise<TReturn>;
|
|
93
|
-
scheduleTask: <T extends BundleRequest>(bundleRequest: T, scripts: Record<string, string>, options: {
|
|
94
|
-
rerun?: boolean;
|
|
95
|
-
}) => Promise<void>;
|
|
96
|
-
close: () => Promise<void>;
|
|
97
|
-
}
|
|
98
|
-
export interface TaskError {
|
|
99
|
-
message: string;
|
|
100
|
-
pluginName: string;
|
|
101
|
-
stack: string;
|
|
102
|
-
fileLocation: string;
|
|
103
|
-
lineNumber: number;
|
|
104
|
-
columnNumber: number;
|
|
105
|
-
}
|
|
106
|
-
export interface TaskStartDescription {
|
|
107
|
-
id: string;
|
|
108
|
-
name?: string;
|
|
109
|
-
inputPath?: string;
|
|
110
|
-
outputPath?: string;
|
|
111
|
-
}
|
|
112
|
-
export interface TaskEndDescription {
|
|
113
|
-
id: string;
|
|
114
|
-
errors?: TaskError[];
|
|
115
|
-
warnings?: TaskError[];
|
|
116
|
-
}
|
|
117
|
-
export interface TaskDescription extends TaskStartDescription, TaskEndDescription {
|
|
118
|
-
status: 'pending' | 'complete';
|
|
119
|
-
startTime: number;
|
|
120
|
-
durationMilliseconds?: number;
|
|
121
|
-
lastUpdated?: number;
|
|
122
|
-
}
|
|
123
|
-
export interface Task<TReturn> {
|
|
124
|
-
name: string;
|
|
125
|
-
id: string;
|
|
126
|
-
dir?: string;
|
|
127
|
-
execute: () => Promise<TReturn | undefined>;
|
|
128
|
-
clear?: () => void;
|
|
129
|
-
watch?: boolean;
|
|
130
|
-
dispose?: () => Promise<void>;
|
|
131
|
-
onDispose?: () => void;
|
|
132
|
-
getErrors?: () => TaskError[] | undefined;
|
|
133
|
-
getStartDescription?: () => TaskStartDescription;
|
|
134
|
-
getEndDescription?: (result: TReturn | undefined) => TaskEndDescription;
|
|
135
|
-
}
|
|
136
|
-
export interface TaskOptions {
|
|
137
|
-
rerun?: boolean;
|
|
138
|
-
watch?: () => void;
|
|
139
|
-
}
|
|
140
|
-
export interface PackageOverride {
|
|
141
|
-
name: string;
|
|
142
|
-
versionRequirement: string;
|
|
143
|
-
isInternal?: boolean;
|
|
144
|
-
overrides: PackageJson;
|
|
145
|
-
}
|
|
146
|
-
export interface Route {
|
|
147
|
-
/**
|
|
148
|
-
* The url path part to match. Start paths with a leading slash, e.g. `'/my-route'`. You can also
|
|
149
|
-
* use wildcards (`*`), e.g. `'/my-route/*'` to match all paths starting with `'/my-route'`.
|
|
150
|
-
*/
|
|
151
|
-
match: string;
|
|
152
|
-
/**
|
|
153
|
-
* The path relative to the app root to static assets. If this is provided, renderScript/exportEntry
|
|
154
|
-
* will be ignored.
|
|
155
|
-
*/
|
|
156
|
-
staticPath?: string;
|
|
157
|
-
/**
|
|
158
|
-
* Path to a .js or .html file used for rendering the route. If a script is provided, it must
|
|
159
|
-
* export a default function implementing `CreateHtmlFunction` defined in `@ms-cloudpack/cli`.
|
|
160
|
-
*/
|
|
161
|
-
renderScript?: string;
|
|
162
|
-
/**
|
|
163
|
-
* The key in the exports map which represents the entry point app script for this route.
|
|
164
|
-
* Default is '.', meaning the main package export key.
|
|
165
|
-
*/
|
|
166
|
-
exportEntry?: string;
|
|
167
|
-
}
|
|
168
|
-
export interface DevServer {
|
|
169
|
-
/**
|
|
170
|
-
* The domain name of the server.
|
|
171
|
-
*/
|
|
172
|
-
domain?: string;
|
|
173
|
-
/**
|
|
174
|
-
* The ports to be used by the server.
|
|
175
|
-
* It can be a number or an array of numbers.
|
|
176
|
-
* If ports are provided, an error will be thrown if none are available.
|
|
177
|
-
* If no ports are provided, the server will attempt to find an available port.
|
|
178
|
-
*/
|
|
179
|
-
port?: number | number[];
|
|
180
|
-
/**
|
|
181
|
-
* The config settings for the https server.
|
|
182
|
-
* Paths to files are accepted for 'ca', 'cert', 'key', and 'pfx' settings.
|
|
183
|
-
* Everything else is passed directly to the https.createServer() method.
|
|
184
|
-
* If not provided, the server will use http.
|
|
185
|
-
*/
|
|
186
|
-
https?: HttpsConfig;
|
|
187
|
-
/**
|
|
188
|
-
* If provided, will override where the publicDir is located, relative to the app package folder.
|
|
189
|
-
* Defaults to `./public`. The same thing can be achieved with `routes`, using route: '*' and
|
|
190
|
-
* staticPath: './public', so the `publicPath` setting may be removed in the future.
|
|
191
|
-
*/
|
|
192
|
-
publicPath?: string;
|
|
193
|
-
/**
|
|
194
|
-
* If provided, will register routes with the dev server to host various pages.
|
|
195
|
-
*/
|
|
196
|
-
routes?: Route[];
|
|
197
|
-
}
|
|
198
|
-
export interface TelemetryConfig {
|
|
199
|
-
/**
|
|
200
|
-
* Application Insights instrumentation key.
|
|
201
|
-
*/
|
|
202
|
-
instrumentationKey: string;
|
|
203
|
-
}
|
|
204
|
-
/**
|
|
205
|
-
* The input options for a createHtml custom server render function.
|
|
206
|
-
*/
|
|
207
|
-
export type CreateHtmlOptions = {
|
|
208
|
-
session: Session;
|
|
209
|
-
route: Route;
|
|
210
|
-
baseUrl: string;
|
|
211
|
-
definition: PackageJson;
|
|
212
|
-
importMap: ImportMap;
|
|
213
|
-
overlayScript: string | undefined;
|
|
214
|
-
entryScript: string | undefined;
|
|
215
|
-
inlineScripts: string[];
|
|
216
|
-
};
|
|
217
|
-
/**
|
|
218
|
-
* The expected result of the createHtml custom server render function.
|
|
219
|
-
*/
|
|
220
|
-
export type CreateHtmlResult = string | {
|
|
221
|
-
html: string;
|
|
222
|
-
statusCode: number;
|
|
223
|
-
};
|
|
224
|
-
/**
|
|
225
|
-
* A custom server render function that can be used to override the default HTML response.
|
|
226
|
-
*/
|
|
227
|
-
export type CreateHtmlFunction = (options: CreateHtmlOptions) => Promise<CreateHtmlResult> | CreateHtmlResult;
|
|
228
|
-
/**
|
|
229
|
-
* The expected shape of the createHtml custom server render function script.
|
|
230
|
-
*/
|
|
231
|
-
export type CreateHtmlScript = {
|
|
232
|
-
default: CreateHtmlFunction;
|
|
233
|
-
};
|
|
234
|
-
//# sourceMappingURL=types.d.ts.map
|
package/lib/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,MAAM,WAAW,OAAO;IACtB;;OAEG;I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MAAM,EAAE,CAAC;IAEzB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IAEpB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,WAAW,CAAC;IACxB,SAAS,EAAE,SAAS,CAAC;IACrB,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACxB,MAAM,GACN;IACE,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEN;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,gBAAgB,CAAC,GAAG,gBAAgB,CAAC;AAE9G;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAAE,OAAO,EAAE,kBAAkB,CAAA;CAAE,CAAC"}
|
package/lib/types.js
DELETED
package/lib/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ImportMap, ResolveMap } from '@ms-cloudpack/package-utilities';\nimport type { PackageJson } from '@ms-cloudpack/bundler-types';\nimport type { HttpsConfig } from '@ms-cloudpack/create-express-app';\nimport type { CloudpackConfig } from '@ms-cloudpack/config';\n\nexport interface Session {\n /**\n * The session id, used for identifying\n */\n id: string;\n\n /**\n * The config used by the session.\n */\n config: CloudpackConfig;\n\n /**\n * The primary application path to monitor.\n */\n appPath: string;\n\n /**\n * The type of session controls how the code is served via start.\n * Web apps require app server and asset hosting, while libraries\n * only need a bundle service.\n */\n type: 'web-app' | 'library';\n\n /**\n * The mode of the session controls how the code is bundled. Library\n * mode bundles each package in isolation, while development and\n * production modes bundle the full app graph together. Library\n * mode is fastest but packages must be complaint for loading in\n * the browser.\n */\n mode: 'library' | 'development' | 'production';\n\n /**\n * Used to resolve packages in the dependency graph.\n */\n resolveMap: ResolveMap;\n\n /**\n * Reload sequence to ensure that the client is always\n * up to date with the latest changes.\n */\n sequence: number;\n\n /**\n * Get session version.\n * Used to force a hard refresh on the client.\n */\n getSessionVersion: () => number;\n\n /**\n * Used to increment the session version.\n * If version is undefined, the version will be incremented by 1.\n * If version is greater than the current version, the version will be set to the new value.\n */\n incrementSessionVersion: (version?: number) => void;\n\n /**\n * The name of the project folder.\n * Used to differentiate between multiple projects.\n */\n projectName: string;\n\n /**\n * The version of each target.\n * Used to force a client cache refresh on a single target.\n */\n targetVersions: Record<string, number>;\n\n /**\n * Increments the version for the given target.\n */\n incrementTargetVersion: (inputPath: string) => void;\n\n /**\n * The import map for the session.\n */\n getImportMap: () => ImportMap | undefined;\n\n setImportMap: (newImportMap: ImportMap) => ImportMap;\n}\n\nexport interface SessionStats {\n status: 'idle' | 'pending';\n\n remainingTasks: number;\n totalTasks: number;\n\n totalErrors: number;\n totalWarnings: number;\n}\n\nexport interface BundleRequest {\n id: string;\n packageName: string;\n version: string;\n packagePath: string;\n outputPath: string;\n isExternal: boolean;\n disableSourceMaps?: boolean;\n}\n\nexport interface ApiServer {\n url: string;\n port: number;\n\n notifyReload: () => void;\n\n addTask: <TReturn>(task: Task<TReturn>, options?: TaskOptions) => Promise<TReturn>;\n\n scheduleTask: <T extends BundleRequest>(\n bundleRequest: T,\n scripts: Record<string, string>,\n options: { rerun?: boolean },\n ) => Promise<void>;\n\n close: () => Promise<void>;\n}\n\nexport interface TaskError {\n message: string;\n pluginName: string;\n stack: string;\n fileLocation: string;\n lineNumber: number;\n columnNumber: number;\n}\n\nexport interface TaskStartDescription {\n id: string;\n name?: string;\n inputPath?: string;\n outputPath?: string;\n}\n\nexport interface TaskEndDescription {\n id: string;\n errors?: TaskError[];\n warnings?: TaskError[];\n}\n\nexport interface TaskDescription extends TaskStartDescription, TaskEndDescription {\n status: 'pending' | 'complete';\n startTime: number;\n durationMilliseconds?: number;\n lastUpdated?: number;\n}\n\nexport interface Task<TReturn> {\n name: string;\n id: string;\n dir?: string;\n execute: () => Promise<TReturn | undefined>;\n clear?: () => void;\n watch?: boolean;\n dispose?: () => Promise<void>;\n onDispose?: () => void;\n getErrors?: () => TaskError[] | undefined;\n getStartDescription?: () => TaskStartDescription;\n getEndDescription?: (result: TReturn | undefined) => TaskEndDescription;\n}\n\nexport interface TaskOptions {\n rerun?: boolean;\n watch?: () => void;\n}\n\nexport interface PackageOverride {\n name: string;\n versionRequirement: string;\n isInternal?: boolean;\n overrides: PackageJson;\n}\n\nexport interface Route {\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 * The path relative to the app root to static assets. If this is provided, renderScript/exportEntry\n * will be ignored.\n */\n staticPath?: string;\n\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 `CreateHtmlFunction` defined in `@ms-cloudpack/cli`.\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\nexport interface DevServer {\n /**\n * The domain name of the server.\n */\n domain?: 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 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 * If provided, will override where the publicDir is located, relative to the app package folder.\n * Defaults to `./public`. The same thing can be achieved with `routes`, using route: '*' and\n * staticPath: './public', so the `publicPath` setting may be removed in the future.\n */\n publicPath?: string;\n\n /**\n * If provided, will register routes with the dev server to host various pages.\n */\n routes?: Route[];\n}\n\nexport interface TelemetryConfig {\n /**\n * Application Insights instrumentation key.\n */\n instrumentationKey: string;\n}\n\n/**\n * The input options for a createHtml custom server render function.\n */\nexport type CreateHtmlOptions = {\n session: Session;\n route: Route;\n baseUrl: string;\n definition: PackageJson;\n importMap: ImportMap;\n overlayScript: string | undefined;\n entryScript: string | undefined;\n inlineScripts: string[];\n};\n\n/**\n * The expected result of the createHtml custom server render function.\n */\nexport type CreateHtmlResult =\n | string\n | {\n html: string;\n statusCode: number;\n };\n\n/**\n * A custom server render function that can be used to override the default HTML response.\n */\nexport type CreateHtmlFunction = (options: CreateHtmlOptions) => Promise<CreateHtmlResult> | CreateHtmlResult;\n\n/**\n * The expected shape of the createHtml custom server render function script.\n */\nexport type CreateHtmlScript = { default: CreateHtmlFunction };\n"]}
|