@ms-cloudpack/api-server 0.47.10 → 0.48.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/apis/linkPath.d.ts +6 -6
- package/lib/apis/unlinkPath.d.ts +6 -6
- package/lib/common/createPartialApiContext.d.ts.map +1 -1
- package/lib/common/createPartialApiContext.js.map +1 -1
- package/lib/common/createSession.d.ts +1 -2
- package/lib/common/createSession.d.ts.map +1 -1
- package/lib/common/createSession.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/trpc/createAppRouter.d.ts +12 -12
- package/lib/trpc/createCloudpackServer.d.ts +2 -2
- package/lib/types/Context.d.ts +1 -2
- package/lib/types/Context.d.ts.map +1 -1
- package/lib/types/Context.js.map +1 -1
- package/lib/types/LinkPath.d.ts +4 -4
- package/lib/types/LinkPath.d.ts.map +1 -1
- package/lib/types/LinkPath.js.map +1 -1
- package/lib/utilities/getSessionPath.d.ts +1 -1
- package/lib/utilities/getSessionPath.d.ts.map +1 -1
- package/lib/utilities/getSessionPath.js.map +1 -1
- package/lib/utilities/notifyReload.d.ts +1 -1
- package/lib/utilities/notifyReload.d.ts.map +1 -1
- package/lib/utilities/notifyReload.js.map +1 -1
- package/lib/utilities/resolveDependenciesTask.d.ts +1 -1
- package/lib/utilities/resolveDependenciesTask.d.ts.map +1 -1
- package/lib/utilities/resolveDependenciesTask.js.map +1 -1
- package/package.json +9 -9
- package/lib/types/Session.d.ts +0 -76
- package/lib/types/Session.d.ts.map +0 -1
- package/lib/types/Session.js +0 -2
- package/lib/types/Session.js.map +0 -1
package/lib/apis/linkPath.d.ts
CHANGED
|
@@ -15,18 +15,18 @@ export declare namespace linkPath {
|
|
|
15
15
|
_meta: object;
|
|
16
16
|
_ctx_out: import("../index.js").Context;
|
|
17
17
|
_input_in: {
|
|
18
|
-
linkedPath: import("@ms-cloudpack/
|
|
18
|
+
linkedPath: import("@ms-cloudpack/common-types").LinkedPath;
|
|
19
19
|
};
|
|
20
20
|
_input_out: {
|
|
21
|
-
linkedPath: import("@ms-cloudpack/
|
|
21
|
+
linkedPath: import("@ms-cloudpack/common-types").LinkedPath;
|
|
22
22
|
};
|
|
23
23
|
_output_in: {
|
|
24
|
-
resolveMap: import("@ms-cloudpack/
|
|
25
|
-
linkedPaths: import("@ms-cloudpack/
|
|
24
|
+
resolveMap: import("@ms-cloudpack/common-types").ResolveMap;
|
|
25
|
+
linkedPaths: import("@ms-cloudpack/common-types").LinkedPath[];
|
|
26
26
|
};
|
|
27
27
|
_output_out: {
|
|
28
|
-
resolveMap: import("@ms-cloudpack/
|
|
29
|
-
linkedPaths: import("@ms-cloudpack/
|
|
28
|
+
resolveMap: import("@ms-cloudpack/common-types").ResolveMap;
|
|
29
|
+
linkedPaths: import("@ms-cloudpack/common-types").LinkedPath[];
|
|
30
30
|
};
|
|
31
31
|
}, unknown>;
|
|
32
32
|
}
|
package/lib/apis/unlinkPath.d.ts
CHANGED
|
@@ -15,18 +15,18 @@ export declare namespace unlinkPath {
|
|
|
15
15
|
_meta: object;
|
|
16
16
|
_ctx_out: import("../index.js").Context;
|
|
17
17
|
_input_in: {
|
|
18
|
-
linkedPath: import("@ms-cloudpack/
|
|
18
|
+
linkedPath: import("@ms-cloudpack/common-types").LinkedPath;
|
|
19
19
|
};
|
|
20
20
|
_input_out: {
|
|
21
|
-
linkedPath: import("@ms-cloudpack/
|
|
21
|
+
linkedPath: import("@ms-cloudpack/common-types").LinkedPath;
|
|
22
22
|
};
|
|
23
23
|
_output_in: {
|
|
24
|
-
resolveMap: import("@ms-cloudpack/
|
|
25
|
-
linkedPaths: import("@ms-cloudpack/
|
|
24
|
+
resolveMap: import("@ms-cloudpack/common-types").ResolveMap;
|
|
25
|
+
linkedPaths: import("@ms-cloudpack/common-types").LinkedPath[];
|
|
26
26
|
};
|
|
27
27
|
_output_out: {
|
|
28
|
-
resolveMap: import("@ms-cloudpack/
|
|
29
|
-
linkedPaths: import("@ms-cloudpack/
|
|
28
|
+
resolveMap: import("@ms-cloudpack/common-types").ResolveMap;
|
|
29
|
+
linkedPaths: import("@ms-cloudpack/common-types").LinkedPath[];
|
|
30
30
|
};
|
|
31
31
|
}, unknown>;
|
|
32
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createPartialApiContext.d.ts","sourceRoot":"","sources":["../../src/common/createPartialApiContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"createPartialApiContext.d.ts","sourceRoot":"","sources":["../../src/common/createPartialApiContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAoC,MAAM,4BAA4B,CAAC;AAGpG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAQ7D,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,YAAY,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,eAAe,CAAC;IACxB,eAAe,EAAE,eAAe,CAAC;IACjC,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAiID,wBAAsB,uBAAuB,CAC3C,KAAK,SAAS,OAAO,CAAC,MAAM,OAAO,EAAE,SAAS,CAAC,EAC/C,OAAO,SAAS,IAAI,CAAC,OAAO,EAAE,KAAK,GAAG,SAAS,GAAG,UAAU,GAAG,iBAAiB,CAAC,EACjF,OAAO,EAAE,qBAAqB,GAAG;IAAE,KAAK,EAAE,KAAK,EAAE,CAAA;CAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAiBvE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createPartialApiContext.js","sourceRoot":"","sources":["../../src/common/createPartialApiContext.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"createPartialApiContext.js","sourceRoot":"","sources":["../../src/common/createPartialApiContext.ts"],"names":[],"mappings":";;;;;;;;;;;;AAuBA,MAAM,cAAc;IASlB,YAA6B,OAA8B;QAA9B,YAAO,GAAP,OAAO,CAAuB;QAR3D,sCAAmC;QACnC,0CAAuC;QACvC,2CAAwD;QACxD,6CAA6C;QAC7C,0CAAuC;QACvC,qDAA6D;QAC7D,gDAAmD;QAGjD,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;QAC/B,IAAI,UAAU,EAAE,CAAC;YACf,uBAAA,IAAI,8BAAe,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,MAAA,CAAC;QACjD,CAAC;IACH,CAAC;IAED,IAAW,eAAe;QACxB,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;IACvD,CAAC;IAED,IAAW,GAAG;QACZ,IAAI,CAAC,uBAAA,IAAI,2BAAK,EAAE,CAAC;YACf,MAAM,iBAAiB,GAAG,KAAK,IAAI,EAAE;gBACnC,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,MAAM,CAAC,wBAAwB,CAAC,CAAC;gBACjE,OAAO,aAAa,EAAE,CAAC;YACzB,CAAC,CAAC;YACF,uBAAA,IAAI,uBAAQ,iBAAiB,EAAE,MAAA,CAAC;QAClC,CAAC;QAED,OAAO,uBAAA,IAAI,2BAAK,CAAC;IACnB,CAAC;IAED,IAAW,OAAO;QAChB,IAAI,CAAC,uBAAA,IAAI,+BAAS,EAAE,CAAC;YACnB,MAAM,iBAAiB,GAAG,KAAK,IAAI,EAAE;gBACnC,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,MAAM,CAAC,4BAA4B,CAAC,CAAC;g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CAAoB,EAAE,CAAC;YAC9B,uBAAA,IAAI,sCAAuB,OAAO,CAAC,OAAO,CAAC,IAAI,GAAG,EAAoB,CAAC,MAAA,CAAC;QAC1E,CAAC;QACD,OAAO,uBAAA,IAAI,0CAAoB,CAAC;IAClC,CAAC;IAEM,KAAK,CAAC,OAAO;QAClB,IAAI,uBAAA,IAAI,+BAAS,EAAE,CAAC;YAClB,MAAM,OAAO,GAAG,MAAM,uBAAA,IAAI,+BAAS,CAAC;YACpC,MAAM,OAAO,CAAC,UAAU,EAAE,CAAC;QAC7B,CAAC;IACH,CAAC;CACF;;AAED,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAG3C,OAAmD;IACnD,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;IACrD,MAAM,WAAW,GAAG,IAAI,cAAc,CAAC,OAAO,CAAC,CAAC;IAEhD,MAAM,MAAM,GAAG;QACb,QAAQ;QACR,eAAe;QACf,OAAO,EAAE,GAAG,EAAE;YACZ,OAAO,WAAW,CAAC,OAAO,EAAE,CAAC;QAC/B,CAAC;KACS,CAAC;IAEb,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,WAAW,CAAC,IAAI,CAAC,CAAmB,CAAC;IAC7D,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import type { CloudpackConfig, PackageDefinitionsCache, Session } from '@ms-cloudpack/common-types';\nimport type { DataBus } from '@ms-cloudpack/data-bus';\nimport type { Watcher } from '@ms-cloudpack/file-watcher';\nimport type { TaskReporter } from '@ms-cloudpack/task-reporter';\nimport type { TelemetryClient } from '@ms-cloudpack/telemetry';\nimport type { Context } from '../types/Context.js';\nimport type { TaskRunner } from '../utilities/TaskRunner.js';\nimport type { PackageImportPaths } from '@ms-cloudpack/import-map';\nimport type { PackageHashes } from '@ms-cloudpack/package-hashes';\n\ntype PromisifyProperties<T> = {\n [K in keyof T]: T[K] extends (...args: unknown[]) => unknown ? T[K] : Promise<T[K]>;\n};\n\nexport interface LazyApiContextOptions {\n reporter: TaskReporter;\n appPath: string;\n overlayPath?: string;\n config: CloudpackConfig;\n telemetryClient: TelemetryClient;\n taskRunner?: TaskRunner;\n}\n\nclass LazyApiContext implements PromisifyProperties<Context> {\n #bus: Promise<DataBus> | undefined;\n #watcher: Promise<Watcher> | undefined;\n #packages: Promise<PackageDefinitionsCache> | undefined;\n #taskRunner: Promise<TaskRunner> | undefined;\n #session: Promise<Session> | undefined;\n #packageImportPaths: Promise<PackageImportPaths> | undefined;\n #packageHashes: Promise<PackageHashes> | undefined;\n\n constructor(private readonly options: LazyApiContextOptions) {\n const { taskRunner } = options;\n if (taskRunner) {\n this.#taskRunner = Promise.resolve(taskRunner);\n }\n }\n\n public get telemetryClient(): Promise<TelemetryClient> {\n return Promise.resolve(this.options.telemetryClient);\n }\n\n public get bus(): Promise<DataBus> {\n if (!this.#bus) {\n const createDataBusLazy = async () => {\n const { createDataBus } = await import('@ms-cloudpack/data-bus');\n return createDataBus();\n };\n this.#bus = createDataBusLazy();\n }\n\n return this.#bus;\n }\n\n public get watcher(): Promise<Watcher> {\n if (!this.#watcher) {\n const createWatcherLazy = async () => {\n const { createWatcher } = await import('@ms-cloudpack/file-watcher');\n return createWatcher();\n };\n this.#watcher = createWatcherLazy();\n }\n\n return this.#watcher;\n }\n\n public get reporter(): Promise<TaskReporter> {\n return Promise.resolve(this.options.reporter);\n }\n\n public get packages(): Promise<PackageDefinitionsCache> {\n if (!this.#packages) {\n const createPackageDefinitionsLazy = async () => {\n const { createPackageDefinitions } = await import('@ms-cloudpack/config');\n return createPackageDefinitions({ config: this.options.config });\n };\n this.#packages = createPackageDefinitionsLazy();\n }\n\n return this.#packages;\n }\n\n public get packageHashes(): Promise<PackageHashes> {\n if (!this.#packageHashes) {\n const createPackageHashesLazy = async () => {\n const { PackageHashes } = await import('@ms-cloudpack/package-hashes');\n return new PackageHashes({\n cwd: this.options.appPath,\n context: {\n config: this.options.config,\n packages: await this.packages,\n resolveMap: (await this.session).resolveMap,\n },\n });\n };\n this.#packageHashes = createPackageHashesLazy();\n }\n\n return this.#packageHashes;\n }\n\n public get taskRunner(): Promise<TaskRunner> {\n if (!this.#taskRunner) {\n const createTaskRunnerLazy = async () => {\n const { TaskRunner } = await import('../utilities/TaskRunner.js');\n return new TaskRunner({\n bus: await this.bus,\n reporter: await this.reporter,\n session: await this.session,\n });\n };\n this.#taskRunner = createTaskRunnerLazy();\n }\n return this.#taskRunner;\n }\n\n public get session(): Promise<Session> {\n if (!this.#session) {\n const createSessionLazy = async () => {\n const { createSession } = await import('./createSession.js');\n return createSession(\n {\n config: this.options.config,\n overlayPath: this.options.overlayPath,\n },\n { reporter: await this.reporter, packages: await this.packages, telemetryClient: await this.telemetryClient },\n );\n };\n this.#session = createSessionLazy();\n }\n\n return this.#session;\n }\n\n public get packageImportPaths(): Promise<PackageImportPaths> {\n if (!this.#packageImportPaths) {\n this.#packageImportPaths = Promise.resolve(new Map<string, string[]>());\n }\n return this.#packageImportPaths;\n }\n\n public async dispose() {\n if (this.#watcher) {\n const watcher = await this.#watcher;\n await watcher.unwatchAll();\n }\n }\n}\n\nexport async function createPartialApiContext<\n TKeys extends Exclude<keyof Context, 'dispose'>,\n TReturn extends Pick<Context, TKeys | 'dispose' | 'reporter' | 'telemetryClient'>,\n>(options: LazyApiContextOptions & { items: TKeys[] }): Promise<TReturn> {\n const { reporter, telemetryClient, items } = options;\n const lazyContext = new LazyApiContext(options);\n\n const result = {\n reporter,\n telemetryClient,\n dispose: () => {\n return lazyContext.dispose();\n },\n } as TReturn;\n\n for (const item of items) {\n result[item] = (await lazyContext[item]) as TReturn[TKeys];\n }\n\n return result;\n}\n"]}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type { CloudpackConfig } from '@ms-cloudpack/common-types';
|
|
1
|
+
import type { CloudpackConfig, Session } from '@ms-cloudpack/common-types';
|
|
2
2
|
import type { Context } from '../types/Context.js';
|
|
3
|
-
import type { Session } from '../types/Session.js';
|
|
4
3
|
export declare function createSession(options: {
|
|
5
4
|
overlayPath?: string;
|
|
6
5
|
config: CloudpackConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSession.d.ts","sourceRoot":"","sources":["../../src/common/createSession.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"createSession.d.ts","sourceRoot":"","sources":["../../src/common/createSession.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,OAAO,EAAc,MAAM,4BAA4B,CAAC;AAMvF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AASnD,wBAAsB,aAAa,CACjC,OAAO,EAAE;IACP,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,eAAe,CAAC;CACzB,EACD,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,UAAU,GAAG,UAAU,GAAG,iBAAiB,CAAC,GAClE,OAAO,CAAC,OAAO,CAAC,CAmGlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSession.js","sourceRoot":"","sources":["../../src/common/createSession.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"createSession.js","sourceRoot":"","sources":["../../src/common/createSession.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClF,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,EAAE,IAAI,IAAI,EAAE,MAAM,MAAM,CAAC;AAElC,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC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EF,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC;QACrC,CAAC;QACD,gBAAgB,EAAE,KAAK,EAAE,UAAsB,EAAE,EAAE;YACjD,MAAM,KAAK,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,UAAU,CAAC,IAAI,CAAC,CAAC;YACvE,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC;gBACjB,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC;YAC9D,CAAC;YAED,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;YAC7B,UAAU,GAAG,MAAM,uBAAuB,CACxC;gBACE,OAAO;gBACP,eAAe,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE;gBACjD,WAAW;aACZ,EACD,OAAO,CACR,CAAC;YAEF,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC;QACrC,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import type { CloudpackConfig, Session, LinkedPath } from '@ms-cloudpack/common-types';\nimport type { ImportMap } from '@ms-cloudpack/import-map';\nimport { readJson, writeJson, writeJsonSync } from '@ms-cloudpack/json-utilities';\nimport fs from 'fs';\nimport path from 'path';\nimport { v4 as uuid } from 'uuid';\nimport type { Context } from '../types/Context.js';\nimport { getLocalCachePath } from '../utilities/getCachePath.js';\nimport { resolveDependenciesTask } from '../utilities/resolveDependenciesTask.js';\n\ntype Versions = {\n sessionVersion: number;\n targetVersions: Record<string, number>;\n};\n\nexport async function createSession(\n options: {\n overlayPath?: string;\n config: CloudpackConfig;\n },\n context: Pick<Context, 'reporter' | 'packages' | 'telemetryClient'>,\n): Promise<Session> {\n const { appPath } = options.config;\n const { config, overlayPath } = options;\n\n const projectName = path.basename(appPath);\n const id = uuid();\n let resolveMap = await resolveDependenciesTask(\n {\n appPath,\n additionalPaths: overlayPath ? [overlayPath] : [],\n },\n context,\n );\n\n let importMap: ImportMap | undefined = undefined;\n\n const versionsPath = path.join(getLocalCachePath(appPath), 'sessionVersions.json');\n const previousVersions = await readJson<Versions>(versionsPath);\n const versions = previousVersions || { sessionVersion: 0, targetVersions: {} };\n if (!previousVersions) {\n await writeJson(versionsPath, versions);\n }\n\n const linkedPaths: LinkedPath[] = [];\n\n return {\n id,\n config,\n projectName,\n get resolveMap() {\n return resolveMap;\n },\n set resolveMap(newResolveMap) {\n // If the resolve map changes, clear the import map\n // so that it is regenerated on the next request\n importMap = undefined;\n resolveMap = newResolveMap;\n },\n sequence: 0,\n urls: {},\n targetVersions: versions.targetVersions,\n get sessionVersion() {\n return versions.sessionVersion;\n },\n incrementSessionVersion: () => {\n versions.sessionVersion++;\n importMap = undefined;\n // Write the new session version to the file\n fs.writeFileSync(versionsPath, JSON.stringify(versions, null, 2));\n },\n incrementTargetVersion: (inputPath: string) => {\n versions.targetVersions[inputPath] ??= 0;\n versions.targetVersions[inputPath]++;\n importMap = undefined;\n writeJsonSync(versionsPath, versions);\n },\n get importMap() {\n return importMap;\n },\n set importMap(newImportMap) {\n importMap = newImportMap;\n },\n linkedPaths,\n addLinkedPath: async (linkedPath: LinkedPath) => {\n if (linkedPaths.find((p) => p.path === linkedPath.path)) {\n return { resolveMap: resolveMap, linkedPaths: linkedPaths };\n }\n\n linkedPaths.push(linkedPath);\n resolveMap = await resolveDependenciesTask(\n {\n appPath,\n additionalPaths: overlayPath ? [overlayPath] : [],\n linkedPaths,\n },\n context,\n );\n\n return { resolveMap, linkedPaths };\n },\n removeLinkedPath: async (linkedPath: LinkedPath) => {\n const index = linkedPaths.findIndex((p) => p.path === linkedPath.path);\n if (index === -1) {\n return { resolveMap: resolveMap, linkedPaths: linkedPaths };\n }\n\n linkedPaths.splice(index, 1);\n resolveMap = await resolveDependenciesTask(\n {\n appPath,\n additionalPaths: overlayPath ? [overlayPath] : [],\n linkedPaths,\n },\n context,\n );\n\n return { resolveMap, linkedPaths };\n },\n };\n}\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type { ApiServer } from './types/ApiServer.js';
|
|
2
2
|
export type { Context, PartialContext } from './types/Context.js';
|
|
3
3
|
export type { BundleInfo } from './types/BundleInfo.js';
|
|
4
|
-
export type { Session } from '
|
|
4
|
+
export type { Session } from '@ms-cloudpack/common-types';
|
|
5
5
|
export type { TaskStats } from './types/TaskStats.js';
|
|
6
6
|
export type { Task } from './types/Task.js';
|
|
7
7
|
export type { TaskDescription } from './types/TaskDescription.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,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAClE,YAAY,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,YAAY,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAClE,YAAY,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,YAAY,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC1D,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,YAAY,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,YAAY,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACxE,YAAY,EAAE,WAAW,E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EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,YAAY;AACZ,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAE9E,cAAc;AACd,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,OAAO,EACP,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,uBAAuB,GACxB,MAAM,iBAAiB,CAAC","sourcesContent":["export type { ApiServer } from './types/ApiServer.js';\nexport type { Context, PartialContext } from './types/Context.js';\nexport type { BundleInfo } from './types/BundleInfo.js';\nexport type { Session } from '
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAmCA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC5G,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,YAAY;AACZ,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAE9E,cAAc;AACd,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,OAAO,EACP,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,uBAAuB,GACxB,MAAM,iBAAiB,CAAC","sourcesContent":["export type { ApiServer } from './types/ApiServer.js';\nexport type { Context, PartialContext } from './types/Context.js';\nexport type { BundleInfo } from './types/BundleInfo.js';\nexport type { Session } from '@ms-cloudpack/common-types';\nexport type { TaskStats } from './types/TaskStats.js';\nexport type { Task } from './types/Task.js';\nexport type { TaskDescription } from './types/TaskDescription.js';\nexport type { TaskEndDescription } from './types/TaskEndDescription.js';\nexport type { TaskMessage } from './types/TaskMessage.js';\nexport type { TaskOptions } from './types/TaskOptions.js';\nexport type { TaskStartDescription } from './types/TaskStartDescription.js';\nexport type { ErrorEntry } from './types/ErrorEntry.js';\nexport type { CloudpackServer } from './trpc/createCloudpackServer.js';\n\n// API types\nexport type { AddPackageOverrideInput } from './apis/addPackageOverride.js';\nexport type { OpenCodeEditorInput } from './apis/openCodeEditor.js';\nexport type { OpenFilePathInput } from './apis/openFilePath.js';\nexport type { ReportMetricInput } from './apis/reportMetric.js';\nexport type { ValidatePackageOverrideInput, ValidatePackageOverrideOutput } from './apis/validatePackageOverride.js';\nexport type { RestartTaskInput } from './apis/restartTask.js';\nexport type { LinkPathInput } from './types/LinkPath.js';\n\n// TODO: delete these type exports once API reporting of \"forgotten\" exports is enabled\n// (they're not used and don't really need to be visible in the API)\nexport type {\n EnsurePackageBundledContext,\n EnsurePackageBundledInput,\n EnsurePackageBundledOutput,\n EnsurePackageBundledResult,\n} from './apis/ensurePackageBundled.js';\nexport type { BundleRequest } from './types/BundleRequest.js';\nexport type { BundleTaskOptions } from './types/BundleTaskOptions.js';\nexport type { OverrideOptions } from './types/OverrideOptions.js';\n\nexport { TaskRunner } from './utilities/TaskRunner.js';\nexport { reloadCountSource, taskListSource, taskStatsSource, errorEntrySource } from './data/busSources.js';\nexport { createCloudpackClient } from './trpc/createCloudpackClient.js';\nexport { createCloudpackServer } from './trpc/createCloudpackServer.js';\nexport { ZodTaskDescription } from './types/TaskDescription.js';\nexport { ZodTaskEndDescription } from './types/TaskEndDescription.js';\nexport { ZodTaskMessage } from './types/TaskMessage.js';\nexport { ZodTaskStartDescription } from './types/TaskStartDescription.js';\nexport { getCachePath, getLocalCachePath } from './utilities/getCachePath.js';\nexport { getActiveSessionsPath } from './utilities/getActiveSessionsPath.js';\nexport { getSessionPath } from './utilities/getSessionPath.js';\nexport { getConsumedDependencies } from './utilities/getConsumedDependencies.js';\nexport { getConsumedPaths } from './utilities/getConsumedPaths.js';\n\n// Utilities\nexport { createPartialApiContext } from './common/createPartialApiContext.js';\n\n// API methods\nexport {\n addPackageOverride,\n ensurePackageBundled,\n getData,\n getSessionId,\n linkPath,\n onDataChanged,\n openCodeEditor,\n openConfigEditor,\n openFilePath,\n reportMetric,\n syncDownload,\n syncUpload,\n validatePackageOverride,\n} from './apis/index.js';\n"]}
|
|
@@ -87,18 +87,18 @@ export declare function createAppRouter(): {
|
|
|
87
87
|
_meta: object;
|
|
88
88
|
_ctx_out: import("../index.js").Context;
|
|
89
89
|
_input_in: {
|
|
90
|
-
linkedPath: import("@ms-cloudpack/
|
|
90
|
+
linkedPath: import("@ms-cloudpack/common-types").LinkedPath;
|
|
91
91
|
};
|
|
92
92
|
_input_out: {
|
|
93
|
-
linkedPath: import("@ms-cloudpack/
|
|
93
|
+
linkedPath: import("@ms-cloudpack/common-types").LinkedPath;
|
|
94
94
|
};
|
|
95
95
|
_output_in: {
|
|
96
|
-
resolveMap: import("@ms-cloudpack/
|
|
97
|
-
linkedPaths: import("@ms-cloudpack/
|
|
96
|
+
resolveMap: import("@ms-cloudpack/common-types").ResolveMap;
|
|
97
|
+
linkedPaths: import("@ms-cloudpack/common-types").LinkedPath[];
|
|
98
98
|
};
|
|
99
99
|
_output_out: {
|
|
100
|
-
resolveMap: import("@ms-cloudpack/
|
|
101
|
-
linkedPaths: import("@ms-cloudpack/
|
|
100
|
+
resolveMap: import("@ms-cloudpack/common-types").ResolveMap;
|
|
101
|
+
linkedPaths: import("@ms-cloudpack/common-types").LinkedPath[];
|
|
102
102
|
};
|
|
103
103
|
}, unknown>;
|
|
104
104
|
onDataChanged: import("@trpc/server").BuildProcedure<"subscription", {
|
|
@@ -279,18 +279,18 @@ export declare function createAppRouter(): {
|
|
|
279
279
|
_meta: object;
|
|
280
280
|
_ctx_out: import("../index.js").Context;
|
|
281
281
|
_input_in: {
|
|
282
|
-
linkedPath: import("@ms-cloudpack/
|
|
282
|
+
linkedPath: import("@ms-cloudpack/common-types").LinkedPath;
|
|
283
283
|
};
|
|
284
284
|
_input_out: {
|
|
285
|
-
linkedPath: import("@ms-cloudpack/
|
|
285
|
+
linkedPath: import("@ms-cloudpack/common-types").LinkedPath;
|
|
286
286
|
};
|
|
287
287
|
_output_in: {
|
|
288
|
-
resolveMap: import("@ms-cloudpack/
|
|
289
|
-
linkedPaths: import("@ms-cloudpack/
|
|
288
|
+
resolveMap: import("@ms-cloudpack/common-types").ResolveMap;
|
|
289
|
+
linkedPaths: import("@ms-cloudpack/common-types").LinkedPath[];
|
|
290
290
|
};
|
|
291
291
|
_output_out: {
|
|
292
|
-
resolveMap: import("@ms-cloudpack/
|
|
293
|
-
linkedPaths: import("@ms-cloudpack/
|
|
292
|
+
resolveMap: import("@ms-cloudpack/common-types").ResolveMap;
|
|
293
|
+
linkedPaths: import("@ms-cloudpack/common-types").LinkedPath[];
|
|
294
294
|
};
|
|
295
295
|
}, unknown>;
|
|
296
296
|
validatePackageOverride: import("@trpc/server").BuildProcedure<"query", {
|
|
@@ -18,7 +18,7 @@ export declare function createCloudpackServer(context: Context): Promise<{
|
|
|
18
18
|
}) => ReturnType<typeof import("../index.js").getData>;
|
|
19
19
|
getSessionId: (options: void) => ReturnType<typeof import("../index.js").getSessionId>;
|
|
20
20
|
linkPath: (options: {
|
|
21
|
-
linkedPath: import("@ms-cloudpack/
|
|
21
|
+
linkedPath: import("@ms-cloudpack/common-types").LinkedPath;
|
|
22
22
|
}) => ReturnType<typeof import("../index.js").linkPath>;
|
|
23
23
|
onDataChanged: (options: {
|
|
24
24
|
path: string[];
|
|
@@ -51,7 +51,7 @@ export declare function createCloudpackServer(context: Context): Promise<{
|
|
|
51
51
|
loginMethod: "interactive" | "azure-cli" | "device-code";
|
|
52
52
|
}) => ReturnType<typeof import("../index.js").syncUpload>;
|
|
53
53
|
unlinkPath: (options: {
|
|
54
|
-
linkedPath: import("@ms-cloudpack/
|
|
54
|
+
linkedPath: import("@ms-cloudpack/common-types").LinkedPath;
|
|
55
55
|
}) => ReturnType<typeof import("../apis/unlinkPath.js").unlinkPath>;
|
|
56
56
|
validatePackageOverride: (options: {
|
|
57
57
|
packageName: string;
|
package/lib/types/Context.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import type { PackageDefinitionsCache } from '@ms-cloudpack/common-types';
|
|
1
|
+
import type { PackageDefinitionsCache, Session } from '@ms-cloudpack/common-types';
|
|
2
2
|
import type { DataBus } from '@ms-cloudpack/data-bus';
|
|
3
3
|
import type { Watcher } from '@ms-cloudpack/file-watcher';
|
|
4
4
|
import type { TaskReporter } from '@ms-cloudpack/task-reporter';
|
|
5
5
|
import type { TelemetryClient } from '@ms-cloudpack/telemetry';
|
|
6
|
-
import type { Session } from '../types/Session.js';
|
|
7
6
|
import type { TaskRunner } from '../utilities/TaskRunner.js';
|
|
8
7
|
import type { PackageHashes } from '@ms-cloudpack/package-hashes';
|
|
9
8
|
import type { PackageImportPaths } from '@ms-cloudpack/import-map';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../src/types/Context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../src/types/Context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACnF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEnE,mDAAmD;AACnD,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,OAAO,CAAC;IACb,eAAe,EAAE,eAAe,CAAC;IACjC,QAAQ,EAAE,YAAY,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,uBAAuB,CAAC;IAClC,UAAU,EAAE,UAAU,CAAC;IACvB,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,aAAa,EAAE,aAAa,CAAC;IAC7B,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1B;AAED;;;;GAIG;AACH,MAAM,MAAM,cAAc,CACxB,YAAY,SAAS,MAAM,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,EACnD,YAAY,SAAS,MAAM,OAAO,IAChC,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC,GAAG;IAChC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;CACtC,CAAC"}
|
package/lib/types/Context.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Context.js","sourceRoot":"","sources":["../../src/types/Context.ts"],"names":[],"mappings":"","sourcesContent":["import type { PackageDefinitionsCache } from '@ms-cloudpack/common-types';\nimport type { DataBus } from '@ms-cloudpack/data-bus';\nimport type { Watcher } from '@ms-cloudpack/file-watcher';\nimport type { TaskReporter } from '@ms-cloudpack/task-reporter';\nimport type { TelemetryClient } from '@ms-cloudpack/telemetry';\nimport type {
|
|
1
|
+
{"version":3,"file":"Context.js","sourceRoot":"","sources":["../../src/types/Context.ts"],"names":[],"mappings":"","sourcesContent":["import type { PackageDefinitionsCache, Session } from '@ms-cloudpack/common-types';\nimport type { DataBus } from '@ms-cloudpack/data-bus';\nimport type { Watcher } from '@ms-cloudpack/file-watcher';\nimport type { TaskReporter } from '@ms-cloudpack/task-reporter';\nimport type { TelemetryClient } from '@ms-cloudpack/telemetry';\nimport type { TaskRunner } from '../utilities/TaskRunner.js';\nimport type { PackageHashes } from '@ms-cloudpack/package-hashes';\nimport type { PackageImportPaths } from '@ms-cloudpack/import-map';\n\n/** Context for Cloudpack API server procedures. */\nexport interface Context {\n session: Session;\n bus: DataBus;\n telemetryClient: TelemetryClient;\n reporter: TaskReporter;\n watcher: Watcher;\n packages: PackageDefinitionsCache;\n taskRunner: TaskRunner;\n packageImportPaths: PackageImportPaths;\n packageHashes: PackageHashes;\n dispose(): Promise<void>;\n}\n\n/**\n * Helper for partial context and session objects.\n * First param is context keys and second is session keys.\n * (This can make it easier to tell which properties are actually used where.)\n */\nexport type PartialContext<\n TContextKeys extends keyof Omit<Context, 'session'>,\n TSessionKeys extends keyof Session,\n> = Pick<Context, TContextKeys> & {\n session: Pick<Session, TSessionKeys>;\n};\n"]}
|
package/lib/types/LinkPath.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import type { LinkedPath } from '@ms-cloudpack/common-types';
|
|
3
3
|
export declare const ZodLinkedPath: z.ZodObject<{
|
|
4
4
|
path: z.ZodType<string, z.ZodTypeDef, string>;
|
|
5
5
|
rootPath: z.ZodType<string | undefined, z.ZodTypeDef, string | undefined>;
|
|
@@ -24,7 +24,7 @@ export declare const ZodLinkPathInput: z.ZodObject<{
|
|
|
24
24
|
}>;
|
|
25
25
|
export type LinkPathInput = z.infer<typeof ZodLinkPathInput>;
|
|
26
26
|
export declare const ZodLinkPathOutput: z.ZodObject<{
|
|
27
|
-
resolveMap: z.ZodType<import("@ms-cloudpack/
|
|
27
|
+
resolveMap: z.ZodType<import("@ms-cloudpack/common-types").ResolveMap, z.ZodTypeDef, import("@ms-cloudpack/common-types").ResolveMap>;
|
|
28
28
|
linkedPaths: z.ZodArray<z.ZodObject<{
|
|
29
29
|
path: z.ZodType<string, z.ZodTypeDef, string>;
|
|
30
30
|
rootPath: z.ZodType<string | undefined, z.ZodTypeDef, string | undefined>;
|
|
@@ -34,10 +34,10 @@ export declare const ZodLinkPathOutput: z.ZodObject<{
|
|
|
34
34
|
resolveStrategy: z.ZodType<"dedupe" | "duplicate" | undefined, z.ZodTypeDef, "dedupe" | "duplicate" | undefined>;
|
|
35
35
|
}, "strict", z.ZodTypeAny, LinkedPath, LinkedPath>, "many">;
|
|
36
36
|
}, "strip", z.ZodTypeAny, {
|
|
37
|
-
resolveMap: import("@ms-cloudpack/
|
|
37
|
+
resolveMap: import("@ms-cloudpack/common-types").ResolveMap;
|
|
38
38
|
linkedPaths: LinkedPath[];
|
|
39
39
|
}, {
|
|
40
|
-
resolveMap: import("@ms-cloudpack/
|
|
40
|
+
resolveMap: import("@ms-cloudpack/common-types").ResolveMap;
|
|
41
41
|
linkedPaths: LinkedPath[];
|
|
42
42
|
}>;
|
|
43
43
|
export type LinkPathOutput = z.infer<typeof ZodLinkPathOutput>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkPath.d.ts","sourceRoot":"","sources":["../../src/types/LinkPath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"LinkPath.d.ts","sourceRoot":"","sources":["../../src/types/LinkPath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAG7D,eAAO,MAAM,aAAa;;;;;;;kDAOxB,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;EAA0C,CAAC;AAExE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE7D,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;EAG5B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkPath.js","sourceRoot":"","sources":["../../src/types/LinkPath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,MAAM,CAAC,MAAM,aAAa,GAAG,iBAAiB,CAAa;IACzD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAClC,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;IAC9C,iBAAiB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACzC,eAAe,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC5D,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,aAAa,EAAE,CAAC,CAAC;AAIxE,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,UAAU,EAAE,aAAa;IACzB,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC;CACpC,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { matchingZodObject } from '../utilities/matchingZodObject.js';\nimport {
|
|
1
|
+
{"version":3,"file":"LinkPath.js","sourceRoot":"","sources":["../../src/types/LinkPath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,MAAM,CAAC,MAAM,aAAa,GAAG,iBAAiB,CAAa;IACzD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAClC,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;IAC9C,iBAAiB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACzC,eAAe,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC5D,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,aAAa,EAAE,CAAC,CAAC;AAIxE,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,UAAU,EAAE,aAAa;IACzB,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC;CACpC,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { matchingZodObject } from '../utilities/matchingZodObject.js';\nimport type { LinkedPath } from '@ms-cloudpack/common-types';\nimport { ZodResolveMap } from '../types/ZodResolveMap.js';\n\nexport const ZodLinkedPath = matchingZodObject<LinkedPath>({\n path: z.string(),\n rootPath: z.string().optional(),\n includeAll: z.boolean().optional(),\n ignoredPackages: z.string().array().optional(),\n ignoreResolutions: z.boolean().optional(),\n resolveStrategy: z.enum(['dedupe', 'duplicate']).optional(),\n});\n\nexport const ZodLinkPathInput = z.object({ linkedPath: ZodLinkedPath });\n\nexport type LinkPathInput = z.infer<typeof ZodLinkPathInput>;\n\nexport const ZodLinkPathOutput = z.object({\n resolveMap: ZodResolveMap,\n linkedPaths: z.array(ZodLinkedPath),\n});\n\nexport type LinkPathOutput = z.infer<typeof ZodLinkPathOutput>;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSessionPath.d.ts","sourceRoot":"","sources":["../../src/utilities/getSessionPath.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"getSessionPath.d.ts","sourceRoot":"","sources":["../../src/utilities/getSessionPath.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAE1D;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,UAE9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSessionPath.js","sourceRoot":"","sources":["../../src/utilities/getSessionPath.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAGnE;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,OAAgB;IAC7C,OAAO,IAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,GAAG,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC;AAClE,CAAC","sourcesContent":["import path from 'path';\nimport { getActiveSessionsPath } from './getActiveSessionsPath.js';\nimport type { Session } from '
|
|
1
|
+
{"version":3,"file":"getSessionPath.js","sourceRoot":"","sources":["../../src/utilities/getSessionPath.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAGnE;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,OAAgB;IAC7C,OAAO,IAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,GAAG,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC;AAClE,CAAC","sourcesContent":["import path from 'path';\nimport { getActiveSessionsPath } from './getActiveSessionsPath.js';\nimport type { Session } from '@ms-cloudpack/common-types';\n\n/**\n * Gets the path to a session file.\n */\nexport function getSessionPath(session: Session) {\n return path.join(getActiveSessionsPath(), `${session.id}.json`);\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DataBus } from '@ms-cloudpack/data-bus';
|
|
2
|
-
import type { Session } from '
|
|
2
|
+
import type { Session } from '@ms-cloudpack/common-types';
|
|
3
3
|
import type { TelemetryClient } from '@ms-cloudpack/telemetry';
|
|
4
4
|
/**
|
|
5
5
|
* Notifies clients that a reload is needed by incrementing the session version.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifyReload.d.ts","sourceRoot":"","sources":["../../src/utilities/notifyReload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"notifyReload.d.ts","sourceRoot":"","sources":["../../src/utilities/notifyReload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/D;;GAEG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,EAC3B,OAAO,EAAE;IACP,GAAG,EAAE,OAAO,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,eAAe,CAAC;CAClC,QAUF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifyReload.js","sourceRoot":"","sources":["../../src/utilities/notifyReload.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAI1D;;GAEG;AACH,MAAM,UAAU,YAAY,CAC1B,OAA2B,EAC3B,OAIC;IAED,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAC3B,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC;IAElD,OAAO,CAAC,QAAQ,EAAE,CAAC;IAEnB,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;IAEpF,GAAG,CAAC,OAAO,CAAC,iBAAiB,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;AACnD,CAAC","sourcesContent":["import type { DataBus } from '@ms-cloudpack/data-bus';\nimport { reloadCountSource } from '../data/busSources.js';\nimport type { Session } from '
|
|
1
|
+
{"version":3,"file":"notifyReload.js","sourceRoot":"","sources":["../../src/utilities/notifyReload.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAI1D;;GAEG;AACH,MAAM,UAAU,YAAY,CAC1B,OAA2B,EAC3B,OAIC;IAED,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAC3B,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC;IAElD,OAAO,CAAC,QAAQ,EAAE,CAAC;IAEnB,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;IAEpF,GAAG,CAAC,OAAO,CAAC,iBAAiB,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;AACnD,CAAC","sourcesContent":["import type { DataBus } from '@ms-cloudpack/data-bus';\nimport { reloadCountSource } from '../data/busSources.js';\nimport type { Session } from '@ms-cloudpack/common-types';\nimport type { TelemetryClient } from '@ms-cloudpack/telemetry';\n\n/**\n * Notifies clients that a reload is needed by incrementing the session version.\n */\nexport function notifyReload(\n options: { reason: string },\n context: {\n bus: DataBus;\n session: Session;\n telemetryClient: TelemetryClient;\n },\n) {\n const { reason } = options;\n const { bus, session, telemetryClient } = context;\n\n session.sequence++;\n\n telemetryClient.rootSpan.addEvent('reload', { sequence: session.sequence, reason });\n\n bus.publish(reloadCountSource, session.sequence);\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LinkedPath, ResolveMap } from '@ms-cloudpack/
|
|
1
|
+
import type { LinkedPath, ResolveMap } from '@ms-cloudpack/common-types';
|
|
2
2
|
import type { Context } from '../types/Context.js';
|
|
3
3
|
/**
|
|
4
4
|
* Resolves the locations of dependencies and returns the resolve map, logging results
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveDependenciesTask.d.ts","sourceRoot":"","sources":["../../src/utilities/resolveDependenciesTask.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAmB,MAAM,
|
|
1
|
+
{"version":3,"file":"resolveDependenciesTask.d.ts","sourceRoot":"","sources":["../../src/utilities/resolveDependenciesTask.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAmB,MAAM,4BAA4B,CAAC;AAG1F,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEnD;;;GAGG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE;IACP,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;CAC5B,EACD,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,UAAU,GAAG,UAAU,GAAG,iBAAiB,CAAC,GAClE,OAAO,CAAC,UAAU,CAAC,CA4CrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveDependenciesTask.js","sourceRoot":"","sources":["../../src/utilities/resolveDependenciesTask.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAG/E;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,OAIC,EACD,OAAmE;IAEnE,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC;IAC1D,MAAM,EAAE,QA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,CAAC;QACrD,QAAQ,CAAC,YAAY,CAAC,CAAC;QAEvB,IAAI,YAAY,CAAC,cAAc,EAAE,CAAC;YAChC,KAAK,MAAM,WAAW,IAAI,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,cAAc,CAAC,EAAE,CAAC;gBACrE,QAAQ,CAAC,WAAW,CAAC,CAAC;YACxB,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO;QACL,WAAW;QACX,kBAAkB;KACnB,CAAC;AACJ,CAAC","sourcesContent":["import type { LinkedPath, ResolveMap, ResolveMapEntry } from '@ms-cloudpack/
|
|
1
|
+
{"version":3,"file":"resolveDependenciesTask.js","sourceRoot":"","sources":["../../src/utilities/resolveDependenciesTask.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAG/E;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,OAIC,EACD,OAAmE;IAEnE,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC;IAC1D,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC;IACxD,IAAI,UAAkC,CAAC;IAEvC,2CAA2C;IAC3C,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC;IAExD,IAAI,CAAC;QACH,UAAU,GAAG,MAAM,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,oBAAoB,EAAE,CAAC,OAAO,EAAE,EAAE;YACrF,OAAO,CAAC,aAAa,CAAC,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC,EAAE,CAAC,CAAC;YACjE,OAAO,gBAAgB,CAAC,EAAE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,EAAE,EAAE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ACvD,MAAM,WAAW,GAAG,IAAI,GAAG,EAA2B,CAAC;IACvD,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAuB,CAAC;IAE1D,SAAS,QAAQ,CAAC,KAAsB;QACtC,MAAM,aAAa,GAAG,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAClD,IAAI,aAAa,EAAE,CAAC;YAClB,IAAI,OAAO,GAAG,kBAAkB,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACjD,IAAI,CAAC,OAAO,EAAE,CAAC;gBACb,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC;gBAC3C,kBAAkB,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YAC9C,CAAC;YACD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC7B,CAAC;aAAM,CAAC;YACN,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACrC,CAAC;IACH,CAAC;IAED,KAAK,MAAM,YAAY,IAAI,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC;QACrD,QAAQ,CAAC,YAAY,CAAC,CAAC;QAEvB,IAAI,YAAY,CAAC,cAAc,EAAE,CAAC;YAChC,KAAK,MAAM,WAAW,IAAI,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,cAAc,CAAC,EAAE,CAAC;gBACrE,QAAQ,CAAC,WAAW,CAAC,CAAC;YACxB,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO;QACL,WAAW;QACX,kBAAkB;KACnB,CAAC;AACJ,CAAC","sourcesContent":["import type { LinkedPath, ResolveMap, ResolveMapEntry } from '@ms-cloudpack/common-types';\nimport { createResolveMap } from '@ms-cloudpack/package-utilities';\nimport { bold, bulletedList, cyan, yellow } from '@ms-cloudpack/task-reporter';\nimport type { Context } from '../types/Context.js';\n\n/**\n * Resolves the locations of dependencies and returns the resolve map, logging results\n * to the task reporter. Throws if dependencies could not be resolved.\n */\nexport async function resolveDependenciesTask(\n options: {\n appPath: string;\n additionalPaths?: string[];\n linkedPaths?: LinkedPath[];\n },\n context: Pick<Context, 'reporter' | 'packages' | 'telemetryClient'>,\n): Promise<ResolveMap> {\n const { appPath, additionalPaths, linkedPaths } = options;\n const { reporter, packages, telemetryClient } = context;\n let resolveMap: ResolveMap | undefined;\n\n // Grab the installed dependency locations.\n const task = reporter.addTask('Resolving dependencies');\n\n try {\n resolveMap = await telemetryClient.performance.track('CREATE_RESOLVE_MAP', (tracker) => {\n tracker.setProperties({ linkedPaths: linkedPaths?.length || 0 });\n return createResolveMap({ appPath, additionalPaths, linkedPaths }, { packages });\n });\n\n const { allPackages, duplicatedPackages } = getPackagesFromResolveMap(resolveMap);\n const message = `Found ${cyan(allPackages.size)} total packages, ${\n duplicatedPackages.size ? `${yellow(duplicatedPackages.size)} with multiple versions.` : `no duplicates.`\n }`;\n const extended = bulletedList(\n Array.from(duplicatedPackages.entries()).map(\n ([name, versions]) => `${bold(name)}: ${Array.from(versions).join(', ')}`,\n ),\n );\n\n task.complete({ message, extended, forceShow: true });\n\n return resolveMap;\n } catch (err) {\n task.complete({\n status: 'fail',\n message: 'Failed to resolve dependencies',\n errors: [String(err)],\n forceShow: true,\n // Don't use the message as \"details\" because this will cause the message to be logged twice\n extended: (err as Error).stack,\n });\n\n if (err instanceof Error) {\n // Remove the call stack because we already logged it in the extended details of the task\n err.stack = undefined;\n }\n\n throw err;\n }\n}\n\n/**\n * Given a resolveMap, returns a map of all packages and a map of packages with multiple versions.\n * This is used to log the results of the resolve task.\n */\nfunction getPackagesFromResolveMap(resolveMap: ResolveMap) {\n const allPackages = new Map<string, ResolveMapEntry>();\n const duplicatedPackages = new Map<string, Set<string>>();\n\n function addEntry(entry: ResolveMapEntry) {\n const existingEntry = allPackages.get(entry.name);\n if (existingEntry) {\n let dupeSet = duplicatedPackages.get(entry.name);\n if (!dupeSet) {\n dupeSet = new Set([existingEntry.version]);\n duplicatedPackages.set(entry.name, dupeSet);\n }\n dupeSet.add(entry.version);\n } else {\n allPackages.set(entry.name, entry);\n }\n }\n\n for (const currentEntry of Object.values(resolveMap)) {\n addEntry(currentEntry);\n\n if (currentEntry.scopedVersions) {\n for (const scopedEntry of Object.values(currentEntry.scopedVersions)) {\n addEntry(scopedEntry);\n }\n }\n }\n\n return {\n allPackages,\n duplicatedPackages,\n };\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/api-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.48.1",
|
|
4
4
|
"description": "An implementation of the API server that does interacts with a task scheduler.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -27,18 +27,18 @@
|
|
|
27
27
|
"@lage-run/logger": "^1.3.0",
|
|
28
28
|
"@lage-run/scheduler": "^1.2.1",
|
|
29
29
|
"@lage-run/target-graph": "^0.8.9",
|
|
30
|
-
"@ms-cloudpack/bundler": "^0.22.
|
|
31
|
-
"@ms-cloudpack/common-types": "^0.
|
|
32
|
-
"@ms-cloudpack/config": "^0.24.
|
|
33
|
-
"@ms-cloudpack/create-express-app": "^1.7.
|
|
30
|
+
"@ms-cloudpack/bundler": "^0.22.11",
|
|
31
|
+
"@ms-cloudpack/common-types": "^0.14.0",
|
|
32
|
+
"@ms-cloudpack/config": "^0.24.2",
|
|
33
|
+
"@ms-cloudpack/create-express-app": "^1.7.2",
|
|
34
34
|
"@ms-cloudpack/data-bus": "^0.4.2",
|
|
35
35
|
"@ms-cloudpack/file-watcher": "^0.1.2",
|
|
36
|
-
"@ms-cloudpack/import-map": "^0.
|
|
36
|
+
"@ms-cloudpack/import-map": "^0.6.0",
|
|
37
37
|
"@ms-cloudpack/json-utilities": "^0.1.6",
|
|
38
|
-
"@ms-cloudpack/package-hashes": "^0.6.
|
|
39
|
-
"@ms-cloudpack/package-utilities": "^8.
|
|
38
|
+
"@ms-cloudpack/package-hashes": "^0.6.15",
|
|
39
|
+
"@ms-cloudpack/package-utilities": "^8.2.0",
|
|
40
40
|
"@ms-cloudpack/path-string-parsing": "^1.2.4",
|
|
41
|
-
"@ms-cloudpack/path-utilities": "^2.7.
|
|
41
|
+
"@ms-cloudpack/path-utilities": "^2.7.31",
|
|
42
42
|
"@ms-cloudpack/remote-cache": "^0.8.5",
|
|
43
43
|
"@ms-cloudpack/task-reporter": "^0.14.4",
|
|
44
44
|
"@ms-cloudpack/telemetry": "^0.6.1",
|
package/lib/types/Session.d.ts
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import type { ImportMap } from '@ms-cloudpack/import-map';
|
|
2
|
-
import type { LinkedPath, ResolveMap } from '@ms-cloudpack/package-utilities';
|
|
3
|
-
import type { CloudpackConfig } from '@ms-cloudpack/common-types';
|
|
4
|
-
export interface Session {
|
|
5
|
-
/**
|
|
6
|
-
* The session id, used for identifying
|
|
7
|
-
*/
|
|
8
|
-
id: string;
|
|
9
|
-
/**
|
|
10
|
-
* The config used by the session.
|
|
11
|
-
*/
|
|
12
|
-
config: CloudpackConfig;
|
|
13
|
-
/**
|
|
14
|
-
* Used to resolve packages in the dependency graph.
|
|
15
|
-
*/
|
|
16
|
-
resolveMap: ResolveMap;
|
|
17
|
-
/**
|
|
18
|
-
* Reload sequence to ensure that the client is always up to date with the latest changes.
|
|
19
|
-
*/
|
|
20
|
-
sequence: number;
|
|
21
|
-
/**
|
|
22
|
-
* URLs of the active servers hosting this session.
|
|
23
|
-
* Each URL will only be set after the server is started.
|
|
24
|
-
*/
|
|
25
|
-
urls: {
|
|
26
|
-
appServer?: string;
|
|
27
|
-
/** If `useSingleWebServer` is enabled, this will be a URL for bundles under the app server. */
|
|
28
|
-
bundleServer?: string;
|
|
29
|
-
apiServer?: string;
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* Used to force a hard refresh on the client.
|
|
33
|
-
*/
|
|
34
|
-
sessionVersion: number;
|
|
35
|
-
/**
|
|
36
|
-
* Used to increment the session version by 1.
|
|
37
|
-
*/
|
|
38
|
-
incrementSessionVersion: () => void;
|
|
39
|
-
/**
|
|
40
|
-
* The name of the project folder.
|
|
41
|
-
* Used to differentiate between multiple projects.
|
|
42
|
-
*/
|
|
43
|
-
projectName: string;
|
|
44
|
-
/**
|
|
45
|
-
* The version of each target.
|
|
46
|
-
* Used to force a client cache refresh on a single target.
|
|
47
|
-
*/
|
|
48
|
-
targetVersions: Record<string, number>;
|
|
49
|
-
/**
|
|
50
|
-
* Increments the version for the given target.
|
|
51
|
-
*/
|
|
52
|
-
incrementTargetVersion: (inputPath: string) => void;
|
|
53
|
-
/**
|
|
54
|
-
* The import map for the session.
|
|
55
|
-
*/
|
|
56
|
-
importMap: ImportMap | undefined;
|
|
57
|
-
/**
|
|
58
|
-
* Linked paths that are used to resolve packages from other repos.
|
|
59
|
-
*/
|
|
60
|
-
linkedPaths: LinkedPath[];
|
|
61
|
-
/**
|
|
62
|
-
* Add the linked path and regenerates the resolve map.
|
|
63
|
-
*/
|
|
64
|
-
addLinkedPath: (linkedPath: LinkedPath) => Promise<{
|
|
65
|
-
resolveMap: ResolveMap;
|
|
66
|
-
linkedPaths: LinkedPath[];
|
|
67
|
-
}>;
|
|
68
|
-
/**
|
|
69
|
-
* Remove the linked path and regenerates the resolve map.
|
|
70
|
-
*/
|
|
71
|
-
removeLinkedPath: (linkedPath: LinkedPath) => Promise<{
|
|
72
|
-
resolveMap: ResolveMap;
|
|
73
|
-
linkedPaths: LinkedPath[];
|
|
74
|
-
}>;
|
|
75
|
-
}
|
|
76
|
-
//# sourceMappingURL=Session.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Session.d.ts","sourceRoot":"","sources":["../../src/types/Session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS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C9G"}
|
package/lib/types/Session.js
DELETED
package/lib/types/Session.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Session.js","sourceRoot":"","sources":["../../src/types/Session.ts"],"names":[],"mappings":"","sourcesContent":["import type { ImportMap } from '@ms-cloudpack/import-map';\nimport type { LinkedPath, ResolveMap } from '@ms-cloudpack/package-utilities';\nimport type { CloudpackConfig } from '@ms-cloudpack/common-types';\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 * Used to resolve packages in the dependency graph.\n */\n resolveMap: ResolveMap;\n\n /**\n * Reload sequence to ensure that the client is always up to date with the latest changes.\n */\n sequence: number;\n\n /**\n * URLs of the active servers hosting this session.\n * Each URL will only be set after the server is started.\n */\n urls: {\n appServer?: string;\n /** If `useSingleWebServer` is enabled, this will be a URL for bundles under the app server. */\n bundleServer?: string;\n apiServer?: string;\n };\n\n /**\n * Used to force a hard refresh on the client.\n */\n sessionVersion: number;\n\n /**\n * Used to increment the session version by 1.\n */\n incrementSessionVersion: () => 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 importMap: ImportMap | undefined;\n\n /**\n * Linked paths that are used to resolve packages from other repos.\n */\n linkedPaths: LinkedPath[];\n\n /**\n * Add the linked path and regenerates the resolve map.\n */\n addLinkedPath: (linkedPath: LinkedPath) => Promise<{ resolveMap: ResolveMap; linkedPaths: LinkedPath[] }>;\n\n /**\n * Remove the linked path and regenerates the resolve map.\n */\n removeLinkedPath: (linkedPath: LinkedPath) => Promise<{ resolveMap: ResolveMap; linkedPaths: LinkedPath[] }>;\n}\n"]}
|