@ms-cloudpack/api-server 0.58.14 → 0.58.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.
@@ -1 +1 @@
1
- {"version":3,"file":"getBundleInfo.d.ts","sourceRoot":"","sources":["../../src/utilities/getBundleInfo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAIvF,OAAO,KAAK,EAAmB,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAG1E;;;GAGG;AACH,wBAAsB,aAAa,CAAC,MAAM,EAAE;IAC1C,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,gBAAgB,EAAE,CAAC;IAChC,UAAU,EAAE,kBAAkB,CAAC;IAC/B,UAAU,EAAE,OAAO,CAAC;CACrB,GAAG,OAAO,CAAC,UAAU,CAAC,CA+FtB"}
1
+ {"version":3,"file":"getBundleInfo.d.ts","sourceRoot":"","sources":["../../src/utilities/getBundleInfo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAIvF,OAAO,KAAK,EAAmB,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAG1E;;;GAGG;AACH,wBAAsB,aAAa,CAAC,MAAM,EAAE;IAC1C,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,gBAAgB,EAAE,CAAC;IAChC,UAAU,EAAE,kBAAkB,CAAC;IAC/B,UAAU,EAAE,OAAO,CAAC;CACrB,GAAG,OAAO,CAAC,UAAU,CAAC,CAkGtB"}
@@ -65,7 +65,8 @@ export async function getBundleInfo(params) {
65
65
  `(imported from ${absOutputFile} with import path "${importPath}")`);
66
66
  }
67
67
  }
68
- else if (!packageName.startsWith('node:')) {
68
+ else if (!packageName.startsWith('node:') &&
69
+ !packageName.startsWith('data:') /* Ignore data URLs as they are not externalized by the bundlers. */) {
69
70
  // Find if the imported package is already in the consumes list.
70
71
  const consumesFromPackage = fileBundleInfo.consumes.find((c) => c.packageName === packageName && c.importPath === importPath);
71
72
  if (consumesFromPackage) {
@@ -1 +1 @@
1
- {"version":3,"file":"getBundleInfo.js","sourceRoot":"","sources":["../../src/utilities/getBundleInfo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,MAMnC;IACC,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;IAChF,MAAM,UAAU,GAAe,EAAE,CAAC;IAElC,8DAA8D;IAC9D,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC;QACxB,OAAO,UAAU,CAAC;IACpB,CAAC;IAED;;iEAE6D;IAC7D,MAAM,cAAc,GAAG,MAAM,CAAC,WAAW,CACvC,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;QACxB,IAAI,CAAC,UAAU;QACf,EAAE,WAAW,EAAE,EAAc,EAAE,QAAQ,EAAE,IAAI,GAAG,CAAS,IAAI,CAAC,OAAO,CAAC,EAAE;KACzE,CAAC,CACH,CAAC;IAEF,6FAA6F;IAC7F,oDAAoD;IACpD,MAAM,iBAAiB,GAAG,oBAAoB,CAAC,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC,CAAC;IAExF,kGAAkG;IAClG,gFAAgF;IAChF,KAAK,MAAM,CAAC,SAAS,EAAE,aAAa,CAAC,IAAI,MAA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xB,UAAU,EAAE,UAAU,IAAI,GAAG;wBAC7B,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC;qBAClB,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC","sourcesContent":["import type { BundleOutputFile, PackageJsonExports } from '@ms-cloudpack/common-types';\nimport { getRuntimeEntryPaths } from '@ms-cloudpack/import-map';\nimport { normalizedPathRelativeTo } from '@ms-cloudpack/path-utilities';\nimport path from 'path';\nimport type { BundleEntryInfo, BundleInfo } from '../types/BundleInfo.js';\nimport { getImportsAndExports } from './getImportsAndExports.js';\n\n/**\n * Returns a mapping from entry file path (exports map key) to list of paths that are produced\n * and consumed in that file.\n */\nexport async function getBundleInfo(params: {\n packagePath: string;\n outputPath: string;\n outputFiles: BundleOutputFile[];\n exportsMap: PackageJsonExports;\n isExternal: boolean;\n}): Promise<BundleInfo> {\n const { packagePath, outputPath, outputFiles, exportsMap, isExternal } = params;\n const bundleInfo: BundleInfo = {};\n\n // If there are no output files, return the empty bundle info.\n if (!outputFiles.length) {\n return bundleInfo;\n }\n\n /** Mapping from normalized relative output file path to info about which entry paths\n * (exports map keys) pointed to that file, and what export names it produces.\n * Usually there's at most one entry path per output file. */\n const outputFileInfo = Object.fromEntries(\n outputFiles.map((file) => [\n file.outputPath,\n { exportsKeys: [] as string[], produces: new Set<string>(file.exports) },\n ]),\n );\n\n // For each entry path (exports map key), get the normalized relative path to the output file\n // that will be used at runtime based on conditions.\n const entryToOutputFile = getRuntimeEntryPaths({ packagePath, isExternal, exportsMap });\n\n // Update the output file info with the entry paths (exports keys) that point to each output file.\n // Usually there's at most one per output file (or none if it's a shared chunk).\n for (const [entryPath, relOutputFile] of Object.entries(entryToOutputFile)) {\n outputFileInfo[relOutputFile]?.exportsKeys.push(entryPath);\n }\n\n // Build the bundle info based on imports and exports for each output file.\n // exportsKeys are the export map key(s) that point to the output file.\n for (const [relOutputFile, { exportsKeys, produces }] of Object.entries(outputFileInfo)) {\n // Ignore any non-JS/TS files such as SVGs and sourcemaps\n if (path.extname(relOutputFile) !== '.js') {\n continue;\n }\n\n const absOutputFile = path.resolve(outputPath, relOutputFile);\n\n const parseResult = await getImportsAndExports(absOutputFile, packagePath);\n if (!parseResult) {\n continue;\n }\n const { exportNames, imports, dynamicImports } = parseResult;\n\n exportNames.forEach((name) => produces.add(name));\n\n // Create a bundle info entry for this output file.\n // If there wasn't an exports map key pointing to this file, just use the output path.\n const pathsInBundleInfo = exportsKeys.length ? exportsKeys : [relOutputFile];\n const fileBundleInfo: BundleEntryInfo = bundleInfo[pathsInBundleInfo[0]] || {\n bundlePath: relOutputFile,\n produces: Array.from(produces),\n consumes: [],\n };\n // Use the same object for all paths that point to this file.\n pathsInBundleInfo.forEach((p) => (bundleInfo[p] = fileBundleInfo));\n\n if (dynamicImports.length) {\n fileBundleInfo.dynamicImports = dynamicImports;\n }\n\n for (const { packageName, importPath, names } of imports) {\n if (packageName === '.') {\n const localPath = normalizedPathRelativeTo(outputPath, path.resolve(path.dirname(absOutputFile), importPath));\n // Pretty sure any path in the current package which is imported in the bundle output should be\n // in outputFiles, but make it obvious if not.\n if (!outputFileInfo[localPath]) {\n throw new Error(\n `Imported local file not found in output files for ${outputPath}: ${localPath} ` +\n `(imported from ${absOutputFile} with import path \"${importPath}\")`,\n );\n }\n } else if (!packageName.startsWith('node:')) {\n // Find if the imported package is already in the consumes list.\n const consumesFromPackage = fileBundleInfo.consumes.find(\n (c) => c.packageName === packageName && c.importPath === importPath,\n );\n if (consumesFromPackage) {\n // If so, add the names to the existing entry.\n // This is necessary because the same import may be used in multiple places.\n consumesFromPackage.names = Array.from(new Set([...names, ...consumesFromPackage.names]));\n } else {\n // Otherwise, add it.\n fileBundleInfo.consumes.push({\n packageName: packageName,\n importPath: importPath || '.',\n names: [...names],\n });\n }\n }\n }\n }\n\n return bundleInfo;\n}\n"]}
1
+ {"version":3,"file":"getBundleInfo.js","sourceRoot":"","s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,CAAC","sourcesContent":["import type { BundleOutputFile, PackageJsonExports } from '@ms-cloudpack/common-types';\nimport { getRuntimeEntryPaths } from '@ms-cloudpack/import-map';\nimport { normalizedPathRelativeTo } from '@ms-cloudpack/path-utilities';\nimport path from 'path';\nimport type { BundleEntryInfo, BundleInfo } from '../types/BundleInfo.js';\nimport { getImportsAndExports } from './getImportsAndExports.js';\n\n/**\n * Returns a mapping from entry file path (exports map key) to list of paths that are produced\n * and consumed in that file.\n */\nexport async function getBundleInfo(params: {\n packagePath: string;\n outputPath: string;\n outputFiles: BundleOutputFile[];\n exportsMap: PackageJsonExports;\n isExternal: boolean;\n}): Promise<BundleInfo> {\n const { packagePath, outputPath, outputFiles, exportsMap, isExternal } = params;\n const bundleInfo: BundleInfo = {};\n\n // If there are no output files, return the empty bundle info.\n if (!outputFiles.length) {\n return bundleInfo;\n }\n\n /** Mapping from normalized relative output file path to info about which entry paths\n * (exports map keys) pointed to that file, and what export names it produces.\n * Usually there's at most one entry path per output file. */\n const outputFileInfo = Object.fromEntries(\n outputFiles.map((file) => [\n file.outputPath,\n { exportsKeys: [] as string[], produces: new Set<string>(file.exports) },\n ]),\n );\n\n // For each entry path (exports map key), get the normalized relative path to the output file\n // that will be used at runtime based on conditions.\n const entryToOutputFile = getRuntimeEntryPaths({ packagePath, isExternal, exportsMap });\n\n // Update the output file info with the entry paths (exports keys) that point to each output file.\n // Usually there's at most one per output file (or none if it's a shared chunk).\n for (const [entryPath, relOutputFile] of Object.entries(entryToOutputFile)) {\n outputFileInfo[relOutputFile]?.exportsKeys.push(entryPath);\n }\n\n // Build the bundle info based on imports and exports for each output file.\n // exportsKeys are the export map key(s) that point to the output file.\n for (const [relOutputFile, { exportsKeys, produces }] of Object.entries(outputFileInfo)) {\n // Ignore any non-JS/TS files such as SVGs and sourcemaps\n if (path.extname(relOutputFile) !== '.js') {\n continue;\n }\n\n const absOutputFile = path.resolve(outputPath, relOutputFile);\n\n const parseResult = await getImportsAndExports(absOutputFile, packagePath);\n if (!parseResult) {\n continue;\n }\n const { exportNames, imports, dynamicImports } = parseResult;\n\n exportNames.forEach((name) => produces.add(name));\n\n // Create a bundle info entry for this output file.\n // If there wasn't an exports map key pointing to this file, just use the output path.\n const pathsInBundleInfo = exportsKeys.length ? exportsKeys : [relOutputFile];\n const fileBundleInfo: BundleEntryInfo = bundleInfo[pathsInBundleInfo[0]] || {\n bundlePath: relOutputFile,\n produces: Array.from(produces),\n consumes: [],\n };\n // Use the same object for all paths that point to this file.\n pathsInBundleInfo.forEach((p) => (bundleInfo[p] = fileBundleInfo));\n\n if (dynamicImports.length) {\n fileBundleInfo.dynamicImports = dynamicImports;\n }\n\n for (const { packageName, importPath, names } of imports) {\n if (packageName === '.') {\n const localPath = normalizedPathRelativeTo(outputPath, path.resolve(path.dirname(absOutputFile), importPath));\n // Pretty sure any path in the current package which is imported in the bundle output should be\n // in outputFiles, but make it obvious if not.\n if (!outputFileInfo[localPath]) {\n throw new Error(\n `Imported local file not found in output files for ${outputPath}: ${localPath} ` +\n `(imported from ${absOutputFile} with import path \"${importPath}\")`,\n );\n }\n } else if (\n !packageName.startsWith('node:') &&\n !packageName.startsWith('data:') /* Ignore data URLs as they are not externalized by the bundlers. */\n ) {\n // Find if the imported package is already in the consumes list.\n const consumesFromPackage = fileBundleInfo.consumes.find(\n (c) => c.packageName === packageName && c.importPath === importPath,\n );\n if (consumesFromPackage) {\n // If so, add the names to the existing entry.\n // This is necessary because the same import may be used in multiple places.\n consumesFromPackage.names = Array.from(new Set([...names, ...consumesFromPackage.names]));\n } else {\n // Otherwise, add it.\n fileBundleInfo.consumes.push({\n packageName: packageName,\n importPath: importPath || '.',\n names: [...names],\n });\n }\n }\n }\n }\n\n return bundleInfo;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ms-cloudpack/api-server",
3
- "version": "0.58.14",
3
+ "version": "0.58.16",
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,16 +27,16 @@
27
27
  "@lage-run/logger": "^1.3.0",
28
28
  "@lage-run/scheduler": "^1.2.1",
29
29
  "@lage-run/target-graph": "^0.11.0",
30
- "@ms-cloudpack/bundler": "^0.23.37",
30
+ "@ms-cloudpack/bundler": "^0.23.39",
31
31
  "@ms-cloudpack/common-types": "^0.24.6",
32
- "@ms-cloudpack/config": "^0.33.13",
32
+ "@ms-cloudpack/config": "^0.33.15",
33
33
  "@ms-cloudpack/create-express-app": "^1.10.18",
34
34
  "@ms-cloudpack/data-bus": "^0.4.3",
35
35
  "@ms-cloudpack/esm-stub-utilities": "^0.14.7",
36
36
  "@ms-cloudpack/file-watcher": "^0.2.0",
37
37
  "@ms-cloudpack/import-map": "^0.8.28",
38
38
  "@ms-cloudpack/json-utilities": "^0.1.10",
39
- "@ms-cloudpack/package-hashes": "^0.7.25",
39
+ "@ms-cloudpack/package-hashes": "^0.7.27",
40
40
  "@ms-cloudpack/package-utilities": "^11.3.3",
41
41
  "@ms-cloudpack/path-string-parsing": "^1.2.6",
42
42
  "@ms-cloudpack/path-utilities": "^3.0.3",