@ms-cloudpack/api-server 0.14.4 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/apis/addPackageOverride.d.ts +5 -45
- package/lib/apis/addPackageOverride.d.ts.map +1 -1
- package/lib/apis/addPackageOverride.js +5 -5
- package/lib/apis/addPackageOverride.js.map +1 -1
- package/lib/apis/ensurePackageBundled.d.ts +5 -52
- package/lib/apis/ensurePackageBundled.d.ts.map +1 -1
- package/lib/apis/ensurePackageBundled.js +13 -7
- package/lib/apis/ensurePackageBundled.js.map +1 -1
- package/lib/apis/getData.d.ts +5 -41
- package/lib/apis/getData.d.ts.map +1 -1
- package/lib/apis/getData.js +4 -4
- package/lib/apis/getData.js.map +1 -1
- package/lib/apis/getSessionId.d.ts +5 -40
- package/lib/apis/getSessionId.d.ts.map +1 -1
- package/lib/apis/getSessionId.js +4 -4
- package/lib/apis/getSessionId.js.map +1 -1
- package/lib/apis/index.d.ts +1 -1
- package/lib/apis/index.d.ts.map +1 -1
- package/lib/apis/index.js.map +1 -1
- package/lib/apis/onDataChanged.d.ts +5 -41
- package/lib/apis/onDataChanged.d.ts.map +1 -1
- package/lib/apis/onDataChanged.js +4 -4
- package/lib/apis/onDataChanged.js.map +1 -1
- package/lib/apis/openCodeEditor.d.ts +4 -36
- package/lib/apis/openCodeEditor.d.ts.map +1 -1
- package/lib/apis/openCodeEditor.js +2 -2
- package/lib/apis/openCodeEditor.js.map +1 -1
- package/lib/apis/openConfigEditor.d.ts +4 -33
- package/lib/apis/openConfigEditor.d.ts.map +1 -1
- package/lib/apis/openConfigEditor.js +3 -1
- package/lib/apis/openConfigEditor.js.map +1 -1
- package/lib/apis/openFilePath.d.ts +4 -36
- package/lib/apis/openFilePath.d.ts.map +1 -1
- package/lib/apis/openFilePath.js +2 -2
- package/lib/apis/openFilePath.js.map +1 -1
- package/lib/apis/reportMetric.d.ts +4 -40
- package/lib/apis/reportMetric.d.ts.map +1 -1
- package/lib/apis/reportMetric.js +4 -3
- package/lib/apis/reportMetric.js.map +1 -1
- package/lib/apis/syncDownload.d.ts +4 -44
- package/lib/apis/syncDownload.d.ts.map +1 -1
- package/lib/apis/syncDownload.js +2 -2
- package/lib/apis/syncDownload.js.map +1 -1
- package/lib/apis/syncUpload.d.ts +4 -50
- package/lib/apis/syncUpload.d.ts.map +1 -1
- package/lib/apis/syncUpload.js +2 -2
- package/lib/apis/syncUpload.js.map +1 -1
- package/lib/apis/validatePackageOverride.d.ts +10 -42
- package/lib/apis/validatePackageOverride.d.ts.map +1 -1
- package/lib/apis/validatePackageOverride.js +3 -4
- package/lib/apis/validatePackageOverride.js.map +1 -1
- package/lib/apis.d.ts +2 -1
- package/lib/apis.d.ts.map +1 -1
- package/lib/apis.js +1 -0
- package/lib/apis.js.map +1 -1
- package/lib/common/createPartialApiContext.d.ts +14 -0
- package/lib/common/createPartialApiContext.d.ts.map +1 -0
- package/lib/common/createPartialApiContext.js +101 -0
- package/lib/common/createPartialApiContext.js.map +1 -0
- package/lib/common/createSession.d.ts +13 -0
- package/lib/common/createSession.d.ts.map +1 -0
- package/lib/common/createSession.js +62 -0
- package/lib/common/createSession.js.map +1 -0
- package/lib/data/busSources.d.ts +417 -89
- package/lib/data/busSources.d.ts.map +1 -1
- package/lib/index.d.ts +9 -6
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/startApiServer.d.ts +2 -2
- package/lib/startApiServer.d.ts.map +1 -1
- package/lib/startApiServer.js +2 -2
- package/lib/startApiServer.js.map +1 -1
- package/lib/trpc/common.d.ts +5 -53
- package/lib/trpc/common.d.ts.map +1 -1
- package/lib/trpc/common.js +3 -9
- package/lib/trpc/common.js.map +1 -1
- package/lib/trpc/createAppRouter.d.ts +25 -400
- package/lib/trpc/createAppRouter.d.ts.map +1 -1
- package/lib/trpc/createCloudpackServer.d.ts +5 -20
- package/lib/trpc/createCloudpackServer.d.ts.map +1 -1
- package/lib/trpc/createCloudpackServer.js.map +1 -1
- package/lib/trpc/createContextFactory.d.ts +6 -22
- package/lib/trpc/createContextFactory.d.ts.map +1 -1
- package/lib/trpc/createContextFactory.js +4 -4
- package/lib/trpc/createContextFactory.js.map +1 -1
- package/lib/trpc/createRouterFromApis.d.ts +1 -16
- package/lib/trpc/createRouterFromApis.d.ts.map +1 -1
- package/lib/types/ApiParams.d.ts +12 -0
- package/lib/types/ApiParams.d.ts.map +1 -0
- package/lib/types/ApiParams.js +2 -0
- package/lib/types/ApiParams.js.map +1 -0
- package/lib/types/Context.d.ts +19 -0
- package/lib/types/Context.d.ts.map +1 -0
- package/lib/types/Context.js +2 -0
- package/lib/types/Context.js.map +1 -0
- package/lib/types/CreateHtmlFunction.d.ts.map +1 -1
- package/lib/types/CreateHtmlFunction.js.map +1 -1
- package/lib/types/CreateHtmlOptions.d.ts +7 -4
- package/lib/types/CreateHtmlOptions.d.ts.map +1 -1
- package/lib/types/CreateHtmlOptions.js.map +1 -1
- package/lib/types/CreateHtmlResult.d.ts +8 -1
- package/lib/types/CreateHtmlResult.d.ts.map +1 -1
- package/lib/types/CreateHtmlResult.js +0 -3
- package/lib/types/CreateHtmlResult.js.map +1 -1
- package/lib/types/CreateHtmlScript.d.ts.map +1 -1
- package/lib/types/CreateHtmlScript.js.map +1 -1
- package/lib/types/Task.d.ts +2 -2
- package/lib/types/Task.d.ts.map +1 -1
- package/lib/types/Task.js.map +1 -1
- package/lib/types/TaskDescription.d.ts +319 -63
- package/lib/types/TaskDescription.d.ts.map +1 -1
- package/lib/types/TaskEndDescription.d.ts +316 -60
- package/lib/types/TaskEndDescription.d.ts.map +1 -1
- package/lib/types/TaskEndDescription.js +3 -3
- package/lib/types/TaskEndDescription.js.map +1 -1
- package/lib/utilities/addOverride.d.ts +2 -6
- package/lib/utilities/addOverride.d.ts.map +1 -1
- package/lib/utilities/addOverride.js +1 -1
- package/lib/utilities/addOverride.js.map +1 -1
- package/lib/utilities/bundleTask.d.ts +3 -1
- package/lib/utilities/bundleTask.d.ts.map +1 -1
- package/lib/utilities/bundleTask.js +5 -4
- package/lib/utilities/bundleTask.js.map +1 -1
- package/lib/utilities/calculateHashOfInlinedDependencies.d.ts +9 -0
- package/lib/utilities/calculateHashOfInlinedDependencies.d.ts.map +1 -0
- package/lib/utilities/calculateHashOfInlinedDependencies.js +18 -0
- package/lib/utilities/calculateHashOfInlinedDependencies.js.map +1 -0
- package/lib/utilities/createBundleRequestForPackage.d.ts +2 -1
- package/lib/utilities/createBundleRequestForPackage.d.ts.map +1 -1
- package/lib/utilities/createBundleRequestForPackage.js +3 -2
- package/lib/utilities/createBundleRequestForPackage.js.map +1 -1
- package/lib/utilities/createBundleTask.d.ts +7 -1
- package/lib/utilities/createBundleTask.d.ts.map +1 -1
- package/lib/utilities/createBundleTask.js +4 -3
- package/lib/utilities/createBundleTask.js.map +1 -1
- package/lib/utilities/findPackageOverride.d.ts +1 -1
- package/lib/utilities/findPackageOverride.d.ts.map +1 -1
- package/lib/utilities/findPackageOverride.js.map +1 -1
- package/lib/utilities/getBundleDetails.d.ts +2 -0
- package/lib/utilities/getBundleDetails.d.ts.map +1 -1
- package/lib/utilities/getBundleDetails.js +3 -7
- package/lib/utilities/getBundleDetails.js.map +1 -1
- package/lib/utilities/getPackageHashEntries.d.ts +69 -0
- package/lib/utilities/getPackageHashEntries.d.ts.map +1 -0
- package/lib/utilities/getPackageHashEntries.js +29 -0
- package/lib/utilities/getPackageHashEntries.js.map +1 -0
- package/lib/utilities/getPackagePath.d.ts +16 -0
- package/lib/utilities/getPackagePath.d.ts.map +1 -0
- package/lib/utilities/getPackagePath.js +19 -0
- package/lib/utilities/getPackagePath.js.map +1 -0
- package/lib/utilities/getPackagesToSync.js +1 -1
- package/lib/utilities/getPackagesToSync.js.map +1 -1
- package/lib/utilities/getSourceHash.d.ts +9 -0
- package/lib/utilities/getSourceHash.d.ts.map +1 -0
- package/lib/utilities/getSourceHash.js +21 -0
- package/lib/utilities/getSourceHash.js.map +1 -0
- package/lib/utilities/hashPackage.d.ts +6 -4
- package/lib/utilities/hashPackage.d.ts.map +1 -1
- package/lib/utilities/hashPackage.js +21 -15
- package/lib/utilities/hashPackage.js.map +1 -1
- package/lib/utilities/resolveDependenciesTask.d.ts +16 -0
- package/lib/utilities/resolveDependenciesTask.d.ts.map +1 -0
- package/lib/utilities/resolveDependenciesTask.js +65 -0
- package/lib/utilities/resolveDependenciesTask.js.map +1 -0
- package/lib/utilities/validateOverride.d.ts +2 -6
- package/lib/utilities/validateOverride.d.ts.map +1 -1
- package/lib/utilities/validateOverride.js.map +1 -1
- package/package.json +10 -9
- package/lib/types/BundleResultExtended.d.ts +0 -23
- package/lib/types/BundleResultExtended.d.ts.map +0 -1
- package/lib/types/BundleResultExtended.js +0 -2
- package/lib/types/BundleResultExtended.js.map +0 -1
- package/lib/types/DevServer.d.ts +0 -33
- package/lib/types/DevServer.d.ts.map +0 -1
- package/lib/types/DevServer.js +0 -2
- package/lib/types/DevServer.js.map +0 -1
- package/lib/types/PackageOverride.d.ts +0 -8
- package/lib/types/PackageOverride.d.ts.map +0 -1
- package/lib/types/PackageOverride.js +0 -2
- package/lib/types/PackageOverride.js.map +0 -1
- package/lib/types/Route.d.ts +0 -23
- package/lib/types/Route.d.ts.map +0 -1
- package/lib/types/Route.js +0 -2
- package/lib/types/Route.js.map +0 -1
- package/lib/types/SessionStats.d.ts +0 -8
- package/lib/types/SessionStats.d.ts.map +0 -1
- package/lib/types/SessionStats.js +0 -2
- package/lib/types/SessionStats.js.map +0 -1
- package/lib/types/TaskError.d.ts +0 -25
- package/lib/types/TaskError.d.ts.map +0 -1
- package/lib/types/TaskError.js +0 -10
- package/lib/types/TaskError.js.map +0 -1
- package/lib/types/TelemetryConfig.d.ts +0 -7
- package/lib/types/TelemetryConfig.d.ts.map +0 -1
- package/lib/types/TelemetryConfig.js +0 -2
- package/lib/types/TelemetryConfig.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{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nB,CAAC;AACJ,CAAC","sourcesContent":["import type { PackageDefinitionsCache } from '@ms-cloudpack/bundler-types';\nimport type { LinkedPath, ResolveMap, ResolveMapEntry } from '@ms-cloudpack/package-utilities';\nimport { createResolveMap } from '@ms-cloudpack/package-utilities';\nimport { bold, bulletedList, cyan, yellow, type TaskReporter } from '@ms-cloudpack/task-reporter';\n\n/**\n * Resolves the locations of dependencies and returns the resolve map, logging results\n * to the task reporter.\n */\nexport async function resolveDependenciesTask(\n options: {\n appPath: string;\n additionalPaths?: string[];\n linkedPaths?: LinkedPath[];\n },\n context: { reporter: TaskReporter; packages: PackageDefinitionsCache },\n) {\n const { appPath, additionalPaths, linkedPaths } = options;\n const { reporter, packages } = context;\n let resolveMap: ResolveMap | undefined;\n\n // Grab the installed dependency locations.\n await reporter.runTask('Resolving dependencies', async () => {\n resolveMap = await createResolveMap(\n {\n appPath,\n additionalPaths,\n linkedPaths,\n },\n {\n packages,\n },\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 return {\n message,\n extended,\n forceShow: true,\n };\n });\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- will be defined after the task runs\n return resolveMap!;\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 if (allPackages.has(entry.name)) {\n if (!duplicatedPackages.has(entry.name)) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n duplicatedPackages.set(entry.name, new Set([allPackages.get(entry.name)!.version]));\n }\n const dupeSet = duplicatedPackages.get(entry.name);\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"]}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { PackageDefinitionsCache } from '@ms-cloudpack/bundler-types';
|
|
1
|
+
import type { Context } from '../types/Context.js';
|
|
3
2
|
/**
|
|
4
3
|
* Given a package name, import path, and optional issuerUrl, returns a boolean indicating if the given
|
|
5
4
|
* override is valid.
|
|
@@ -8,8 +7,5 @@ export declare function validateOverride(options: {
|
|
|
8
7
|
packageName: string;
|
|
9
8
|
importPath: string;
|
|
10
9
|
issuerUrl?: string;
|
|
11
|
-
}, context:
|
|
12
|
-
session: Session;
|
|
13
|
-
packages: PackageDefinitionsCache;
|
|
14
|
-
}): Promise<boolean>;
|
|
10
|
+
}, context: Pick<Context, 'session' | 'packages'>): Promise<boolean>;
|
|
15
11
|
//# sourceMappingURL=validateOverride.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validateOverride.d.ts","sourceRoot":"","sources":["../../src/utilities/validateOverride.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"validateOverride.d.ts","sourceRoot":"","sources":["../../src/utilities/validateOverride.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEnD;;;GAGG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,EAAE;IACP,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,EACD,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,GAAG,UAAU,CAAC,oBA+B/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validateOverride.js","sourceRoot":"","sources":["../../src/utilities/validateOverride.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACzF,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"validateOverride.js","sourceRoot":"","sources":["../../src/utilities/validateOverride.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACzF,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAIzD;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,OAIC,EACD,OAA8C;IAE9C,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC;IACvD,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAC5B,IAAI,UAAU,GAA4B,SAAS,CAAC;IAEpD,IAAI,SAAS,EAAE;QACb,MAAM,WAAW,GAAG,KAAK,CAAC,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC;QACvD,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,CAAC,KAAK,EAAE;QACV,OAAO,KAAK,CAAC;KACd;IAED,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,iBAAiB,CAC1C;QACE,WAAW,EAAE,KAAK,CAAC,IAAI;QACvB,QAAQ,EAAE,UAAU;KACrB,EACD,OAAO,CACR,CAAC;IAEF,OAAO,CAAC,CAAC,QAAQ,CAAC;AACpB,CAAC","sourcesContent":["import { findResolveMapEntry, findFileInPackage } from '@ms-cloudpack/package-utilities';\nimport { slash } from '@ms-cloudpack/path-string-parsing';\nimport { parseRequestInfo } from './parseRequestInfo.js';\nimport type { PackageJson } from '@ms-cloudpack/bundler-types';\nimport type { Context } from '../types/Context.js';\n\n/**\n * Given a package name, import path, and optional issuerUrl, returns a boolean indicating if the given\n * override is valid.\n */\nexport async function validateOverride(\n options: {\n packageName: string;\n importPath: string;\n issuerUrl?: string;\n },\n context: Pick<Context, 'session' | 'packages'>,\n) {\n const { packageName, importPath, issuerUrl } = options;\n const { session } = context;\n let definition: PackageJson | undefined = undefined;\n\n if (issuerUrl) {\n const requestPath = slash(new URL(issuerUrl).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) {\n return false;\n }\n\n const { filePath } = await findFileInPackage(\n {\n packagePath: entry.path,\n filePath: importPath,\n },\n context,\n );\n\n return !!filePath;\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.16.0",
|
|
4
4
|
"description": "An implementation of the API server that does interacts with a task scheduler.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"import": "./lib/client.js"
|
|
17
17
|
},
|
|
18
18
|
"./apis": {
|
|
19
|
-
"types": "./lib/apis
|
|
20
|
-
"import": "./lib/apis
|
|
19
|
+
"types": "./lib/apis.d.ts",
|
|
20
|
+
"import": "./lib/apis.js"
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
@@ -25,18 +25,18 @@
|
|
|
25
25
|
"@lage-run/scheduler": "^1.0.0",
|
|
26
26
|
"@lage-run/target-graph": "^0.8.6",
|
|
27
27
|
"@lage-run/hasher": "^1.0.0",
|
|
28
|
-
"@ms-cloudpack/bundler": "^0.14.
|
|
29
|
-
"@ms-cloudpack/bundler-types": "^0.18.
|
|
30
|
-
"@ms-cloudpack/config": "^0.12.
|
|
28
|
+
"@ms-cloudpack/bundler": "^0.14.12",
|
|
29
|
+
"@ms-cloudpack/bundler-types": "^0.18.1",
|
|
30
|
+
"@ms-cloudpack/config": "^0.12.2",
|
|
31
31
|
"@ms-cloudpack/create-express-app": "^1.3.9",
|
|
32
32
|
"@ms-cloudpack/data-bus": "^0.4.0",
|
|
33
|
-
"@ms-cloudpack/file-watcher": "^0.0
|
|
33
|
+
"@ms-cloudpack/file-watcher": "^0.1.0",
|
|
34
34
|
"@ms-cloudpack/json-utilities": "^0.0.7",
|
|
35
|
-
"@ms-cloudpack/package-utilities": "^5.1.
|
|
35
|
+
"@ms-cloudpack/package-utilities": "^5.1.4",
|
|
36
36
|
"@ms-cloudpack/path-string-parsing": "^1.0.3",
|
|
37
37
|
"@ms-cloudpack/path-utilities": "^2.3.2",
|
|
38
38
|
"@ms-cloudpack/task-reporter": "^0.7.2",
|
|
39
|
-
"@ms-cloudpack/telemetry": "^0.3.
|
|
39
|
+
"@ms-cloudpack/telemetry": "^0.3.7",
|
|
40
40
|
"@ms-cloudpack/remote-cache": "^0.1.6",
|
|
41
41
|
"@trpc/client": "^10.21.1",
|
|
42
42
|
"@trpc/server": "^10.21.1",
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"p-queue": "^7.3.0",
|
|
52
52
|
"object-hash": "^3.0.0",
|
|
53
53
|
"semver": "^7.3.7",
|
|
54
|
+
"uuid": "^9.0.0",
|
|
54
55
|
"ws": "^8.9.0",
|
|
55
56
|
"zod": "^3.21.4"
|
|
56
57
|
},
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { BundleResult } from '@ms-cloudpack/bundler-types';
|
|
2
|
-
import type { TaskResult } from './TaskResult.js';
|
|
3
|
-
export interface BundleResultExtended extends TaskResult, BundleResult {
|
|
4
|
-
/**
|
|
5
|
-
* The dependencies of the package, computed in `bundleTask` by parsing the output of the bundle result.
|
|
6
|
-
*/
|
|
7
|
-
dependencies?: string[];
|
|
8
|
-
/**
|
|
9
|
-
* The hash of the bundle input, computed in `bundleTask` by hashing the source input.
|
|
10
|
-
*/
|
|
11
|
-
hash?: string;
|
|
12
|
-
/**
|
|
13
|
-
* Where the output originates from. In cases where we can leverage disk cache to avoid bundling, we will.
|
|
14
|
-
*/
|
|
15
|
-
from?: 'bundle' | 'cache';
|
|
16
|
-
/**
|
|
17
|
-
* Whether the input was considered an external package. This affects how cached results
|
|
18
|
-
* are leveraged, whether file watching will be used, and how the bundle is retuned to the
|
|
19
|
-
* client.
|
|
20
|
-
*/
|
|
21
|
-
isExternal: boolean;
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=BundleResultExtended.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BundleResultExtended.d.ts","sourceRoot":"","sources":["../../src/types/BundleResultExtended.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,MAAM,WAAW,oBAAqB,SAAQ,UAAU,EAAE,YAAY;IACpE;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IAExB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAE1B;;;;OAIG;IACH,UAAU,EAAE,OAAO,CAAC;CACrB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BundleResultExtended.js","sourceRoot":"","sources":["../../src/types/BundleResultExtended.ts"],"names":[],"mappings":"","sourcesContent":["import type { BundleResult } from '@ms-cloudpack/bundler-types';\nimport type { TaskResult } from './TaskResult.js';\nexport interface BundleResultExtended extends TaskResult, BundleResult {\n /**\n * The dependencies of the package, computed in `bundleTask` by parsing the output of the bundle result.\n */\n dependencies?: string[];\n\n /**\n * The hash of the bundle input, computed in `bundleTask` by hashing the source input.\n */\n hash?: string;\n\n /**\n * Where the output originates from. In cases where we can leverage disk cache to avoid bundling, we will.\n */\n from?: 'bundle' | 'cache';\n\n /**\n * Whether the input was considered an external package. This affects how cached results\n * are leveraged, whether file watching will be used, and how the bundle is retuned to the\n * client.\n */\n isExternal: boolean;\n}\n"]}
|
package/lib/types/DevServer.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { HttpsConfig } from '@ms-cloudpack/create-express-app';
|
|
2
|
-
import type { Route } from './Route.js';
|
|
3
|
-
export interface DevServer {
|
|
4
|
-
/**
|
|
5
|
-
* The domain name of the server.
|
|
6
|
-
*/
|
|
7
|
-
domain?: string;
|
|
8
|
-
/**
|
|
9
|
-
* The ports to be used by the server.
|
|
10
|
-
* It can be a number or an array of numbers.
|
|
11
|
-
* If ports are provided, an error will be thrown if none are available.
|
|
12
|
-
* If no ports are provided, the server will attempt to find an available port.
|
|
13
|
-
*/
|
|
14
|
-
port?: number | number[];
|
|
15
|
-
/**
|
|
16
|
-
* The config settings for the https server.
|
|
17
|
-
* Paths to files are accepted for 'ca', 'cert', 'key', and 'pfx' settings.
|
|
18
|
-
* Everything else is passed directly to the https.createServer() method.
|
|
19
|
-
* If not provided, the server will use http.
|
|
20
|
-
*/
|
|
21
|
-
https?: HttpsConfig;
|
|
22
|
-
/**
|
|
23
|
-
* If provided, will override where the publicDir is located, relative to the app package folder.
|
|
24
|
-
* Defaults to `./public`. The same thing can be achieved with `routes`, using route: '*' and
|
|
25
|
-
* staticPath: './public', so the `publicPath` setting may be removed in the future.
|
|
26
|
-
*/
|
|
27
|
-
publicPath?: string;
|
|
28
|
-
/**
|
|
29
|
-
* If provided, will register routes with the dev server to host various pages.
|
|
30
|
-
*/
|
|
31
|
-
routes?: Route[];
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=DevServer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DevServer.d.ts","sourceRoot":"","sources":["../../src/types/DevServer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,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"}
|
package/lib/types/DevServer.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DevServer.js","sourceRoot":"","sources":["../../src/types/DevServer.ts"],"names":[],"mappings":"","sourcesContent":["import type { HttpsConfig } from '@ms-cloudpack/create-express-app';\nimport type { Route } from './Route.js';\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"]}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
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"]}
|
package/lib/types/Route.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
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
|
package/lib/types/Route.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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"}
|
package/lib/types/Route.js
DELETED
package/lib/types/Route.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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"]}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
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"]}
|
package/lib/types/TaskError.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import z from 'zod';
|
|
2
|
-
export declare const ZodTaskError: z.ZodObject<{
|
|
3
|
-
message: z.ZodString;
|
|
4
|
-
pluginName: z.ZodString;
|
|
5
|
-
stack: z.ZodString;
|
|
6
|
-
fileLocation: z.ZodString;
|
|
7
|
-
lineNumber: z.ZodNumber;
|
|
8
|
-
columnNumber: z.ZodNumber;
|
|
9
|
-
}, "strip", z.ZodTypeAny, {
|
|
10
|
-
message: string;
|
|
11
|
-
pluginName: string;
|
|
12
|
-
stack: string;
|
|
13
|
-
fileLocation: string;
|
|
14
|
-
lineNumber: number;
|
|
15
|
-
columnNumber: number;
|
|
16
|
-
}, {
|
|
17
|
-
message: string;
|
|
18
|
-
pluginName: string;
|
|
19
|
-
stack: string;
|
|
20
|
-
fileLocation: string;
|
|
21
|
-
lineNumber: number;
|
|
22
|
-
columnNumber: number;
|
|
23
|
-
}>;
|
|
24
|
-
export type TaskError = z.infer<typeof ZodTaskError>;
|
|
25
|
-
//# sourceMappingURL=TaskError.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TaskError.d.ts","sourceRoot":"","sources":["../../src/types/TaskError.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;EAOvB,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC"}
|
package/lib/types/TaskError.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TaskError.js","sourceRoot":"","sources":["../../src/types/TaskError.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;CACzB,CAAC,CAAC","sourcesContent":["import z from 'zod';\n\nexport const ZodTaskError = z.object({\n message: z.string(),\n pluginName: z.string(),\n stack: z.string(),\n fileLocation: z.string(),\n lineNumber: z.number(),\n columnNumber: z.number(),\n});\n\nexport type TaskError = z.infer<typeof ZodTaskError>;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
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"]}
|