@ms-cloudpack/bundler 0.23.39 → 0.24.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.
@@ -1,4 +1,4 @@
1
- import type { CloudpackConfig, PackageDefinitionsCache } from '@ms-cloudpack/common-types';
1
+ import type { CloudpackConfig, PackageDefinitionsCache, TargetEnvironment } from '@ms-cloudpack/common-types';
2
2
  /**
3
3
  * Gets the entries map for a given package. An entries map is different from an exports map in that
4
4
  * the keys are relative paths to where the output should live, rather than how the entry is imported.
@@ -6,6 +6,7 @@ import type { CloudpackConfig, PackageDefinitionsCache } from '@ms-cloudpack/com
6
6
  */
7
7
  export declare function getEntriesMapFromPackage(options: {
8
8
  inputPath: string;
9
+ targetEnvironment: TargetEnvironment;
9
10
  }, context: {
10
11
  packages: PackageDefinitionsCache;
11
12
  config: Pick<CloudpackConfig, 'features'>;
@@ -1 +1 @@
1
- {"version":3,"file":"getEntriesMapFromPackage.d.ts","sourceRoot":"","sources":["../src/getEntriesMapFromPackage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAQ3F;;;;GAIG;AACH,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE;IACP,SAAS,EAAE,MAAM,CAAC;CACnB,EACD,OAAO,EAAE;IACP,QAAQ,EAAE,uBAAuB,CAAC;IAClC,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;CAC3C,GACA,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAoCjC"}
1
+ {"version":3,"file":"getEntriesMapFromPackage.d.ts","sourceRoot":"","sources":["../src/getEntriesMapFromPackage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAQ9G;;;;GAIG;AACH,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE;IACP,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,iBAAiB,CAAC;CACtC,EACD,OAAO,EAAE;IACP,QAAQ,EAAE,uBAAuB,CAAC;IAClC,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;CAC3C,GACA,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAsCjC"}
@@ -10,10 +10,12 @@ import { toNormalizedEntryKey } from './toNormalizedEntryKey.js';
10
10
  * The data structure is used for bundler config; not for resolution of imports.
11
11
  */
12
12
  export async function getEntriesMapFromPackage(options, context) {
13
- const { inputPath } = options;
13
+ const { inputPath, targetEnvironment } = options;
14
14
  const isInternal = !isExternalPackage(inputPath);
15
15
  const exportsMap = await getExportsMap({ packagePath: inputPath }, context);
16
- const flattenedMap = flattenExportsMap(exportsMap);
16
+ const flattenedMap = flattenExportsMap(exportsMap, {
17
+ conditions: `${targetEnvironment}-defaults`,
18
+ });
17
19
  let sourceExportsMap;
18
20
  // The flattened map values tell us what physical files will show up in the import map on the page. We use these
19
21
  // as the keys for the entries map, which results in physical file output from the bundler.
@@ -22,8 +24,8 @@ export async function getEntriesMapFromPackage(options, context) {
22
24
  // to derive source paths from intermediate paths.
23
25
  if (isInternal) {
24
26
  sourceExportsMap = flattenExportsMap(exportsMap, {
25
- // Allow traversing into 'browser' environment conditions to find 'source' conditions
26
- conditions: ['browser', 'source'],
27
+ // Allow traversing into targetEnvironment conditions to find 'source' conditions
28
+ conditions: [targetEnvironment, 'source'],
27
29
  requiredConditions: ['source'],
28
30
  });
29
31
  for (const [key, value] of Object.entries(flattenedMap)) {
@@ -1 +1 @@
1
- {"version":3,"file":"getEntriesMapFromPackage.js","sourceRoot":"","sources":["../src/getEntriesMapFromPackage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AACnF,OAAO,EAAE,qBAAqB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C,YAAY,CAAC;SACzB,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;SAChD,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC;QACrB,oBAAoB,CAAC,KAAK,CAAC;QAC3B,wBAAwB,CAAC,SAAS,EAAE,gBAAgB,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC;KACtE,CAAC,CACL,CAAC;AACJ,CAAC;AAED,SAAS,wBAAwB,CAAC,SAAiB,EAAE,KAAa;IAChE,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;QAC3B,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC;IAED,OAAO,qBAAqB,CAAC,KAAK,CAAC,CAAC;AACtC,CAAC","sourcesContent":["import type { CloudpackConfig, PackageDefinitionsCache } from '@ms-cloudpack/common-types';\nimport { flattenExportsMap, getExportsMap } from '@ms-cloudpack/package-utilities';\nimport { normalizeRelativePath } from '@ms-cloudpack/path-string-parsing';\nimport { intermediateToSourcePath, isExternalPackage } from '@ms-cloudpack/path-utilities';\nimport path from 'path';\nimport { isValidBundleEntry } from './isValidBundleEntry.js';\nimport { toNormalizedEntryKey } from './toNormalizedEntryKey.js';\n\n/**\n * Gets the entries map for a given package. An entries map is different from an exports map in that\n * the keys are relative paths to where the output should live, rather than how the entry is imported.\n * The data structure is used for bundler config; not for resolution of imports.\n */\nexport async function getEntriesMapFromPackage(\n options: {\n inputPath: string;\n },\n context: {\n packages: PackageDefinitionsCache;\n config: Pick<CloudpackConfig, 'features'>;\n },\n): Promise<Record<string, string>> {\n const { inputPath } = options;\n const isInternal = !isExternalPackage(inputPath);\n const exportsMap = await getExportsMap({ packagePath: inputPath }, context);\n const flattenedMap = flattenExportsMap(exportsMap);\n let sourceExportsMap: Record<string, string>;\n\n // The flattened map values tell us what physical files will show up in the import map on the page. We use these\n // as the keys for the entries map, which results in physical file output from the bundler.\n\n // For internal packages, we want the values (the inputs to the each entry) to use source paths if available. To\n // get these, we can either derive from exports map \"source\" entries, or if those are not available, we can attempt\n // to derive source paths from intermediate paths.\n\n if (isInternal) {\n sourceExportsMap = flattenExportsMap(exportsMap, {\n // Allow traversing into 'browser' environment conditions to find 'source' conditions\n conditions: ['browser', 'source'],\n requiredConditions: ['source'],\n });\n\n for (const [key, value] of Object.entries(flattenedMap)) {\n if (!sourceExportsMap[key]) {\n sourceExportsMap[key] = intermediateToSourcePath(value, inputPath) || value;\n }\n }\n }\n\n return Object.fromEntries(\n Object.entries(flattenedMap)\n .filter(([, value]) => isValidBundleEntry(value))\n .map(([key, value]) => [\n toNormalizedEntryKey(value),\n toNormalizedRelativePath(inputPath, sourceExportsMap?.[key] || value),\n ]),\n );\n}\n\nfunction toNormalizedRelativePath(inputPath: string, entry: string): string {\n if (path.isAbsolute(entry)) {\n entry = path.relative(inputPath, entry);\n }\n\n return normalizeRelativePath(entry);\n}\n"]}
1
+ {"version":3,"file":"getEntriesMapFromPackage.js","sourceRoot":"","sources":["../src/getEntriesMapFromPackage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AACnF,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAC3F,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC5C,OAGC,EACD,OAGC;IAED,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC;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CACL,CAAC;AACJ,CAAC;AAED,SAAS,wBAAwB,CAAC,SAAiB,EAAE,KAAa;IAChE,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;QAC3B,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC;IAED,OAAO,qBAAqB,CAAC,KAAK,CAAC,CAAC;AACtC,CAAC","sourcesContent":["import type { CloudpackConfig, PackageDefinitionsCache, TargetEnvironment } from '@ms-cloudpack/common-types';\nimport { flattenExportsMap, getExportsMap } from '@ms-cloudpack/package-utilities';\nimport { normalizeRelativePath } from '@ms-cloudpack/path-string-parsing';\nimport { intermediateToSourcePath, isExternalPackage } from '@ms-cloudpack/path-utilities';\nimport path from 'path';\nimport { isValidBundleEntry } from './isValidBundleEntry.js';\nimport { toNormalizedEntryKey } from './toNormalizedEntryKey.js';\n\n/**\n * Gets the entries map for a given package. An entries map is different from an exports map in that\n * the keys are relative paths to where the output should live, rather than how the entry is imported.\n * The data structure is used for bundler config; not for resolution of imports.\n */\nexport async function getEntriesMapFromPackage(\n options: {\n inputPath: string;\n targetEnvironment: TargetEnvironment;\n },\n context: {\n packages: PackageDefinitionsCache;\n config: Pick<CloudpackConfig, 'features'>;\n },\n): Promise<Record<string, string>> {\n const { inputPath, targetEnvironment } = options;\n const isInternal = !isExternalPackage(inputPath);\n const exportsMap = await getExportsMap({ packagePath: inputPath }, context);\n const flattenedMap = flattenExportsMap(exportsMap, {\n conditions: `${targetEnvironment}-defaults`,\n });\n let sourceExportsMap: Record<string, string>;\n\n // The flattened map values tell us what physical files will show up in the import map on the page. We use these\n // as the keys for the entries map, which results in physical file output from the bundler.\n\n // For internal packages, we want the values (the inputs to the each entry) to use source paths if available. To\n // get these, we can either derive from exports map \"source\" entries, or if those are not available, we can attempt\n // to derive source paths from intermediate paths.\n\n if (isInternal) {\n sourceExportsMap = flattenExportsMap(exportsMap, {\n // Allow traversing into targetEnvironment conditions to find 'source' conditions\n conditions: [targetEnvironment, 'source'],\n requiredConditions: ['source'],\n });\n\n for (const [key, value] of Object.entries(flattenedMap)) {\n if (!sourceExportsMap[key]) {\n sourceExportsMap[key] = intermediateToSourcePath(value, inputPath) || value;\n }\n }\n }\n\n return Object.fromEntries(\n Object.entries(flattenedMap)\n .filter(([, value]) => isValidBundleEntry(value))\n .map(([key, value]) => [\n toNormalizedEntryKey(value),\n toNormalizedRelativePath(inputPath, sourceExportsMap?.[key] || value),\n ]),\n );\n}\n\nfunction toNormalizedRelativePath(inputPath: string, entry: string): string {\n if (path.isAbsolute(entry)) {\n entry = path.relative(inputPath, entry);\n }\n\n return normalizeRelativePath(entry);\n}\n"]}
package/lib/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  export { bundlerNames } from './allBundlers.js';
2
2
  export { bundle } from './bundle.js';
3
- export { bundlePackage, type BundlePackageOptions } from './bundlePackage.js';
4
3
  export { isValidBundleEntry } from './isValidBundleEntry.js';
5
4
  export { getEntriesMapFromPackage } from './getEntriesMapFromPackage.js';
6
5
  export { getExternalsFromPackage } from './getExternalsFromPackage.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC"}
package/lib/index.js CHANGED
@@ -1,6 +1,5 @@
1
1
  export { bundlerNames } from './allBundlers.js';
2
2
  export { bundle } from './bundle.js';
3
- export { bundlePackage } from './bundlePackage.js';
4
3
  export { isValidBundleEntry } from './isValidBundleEntry.js';
5
4
  export { getEntriesMapFromPackage } from './getEntriesMapFromPackage.js';
6
5
  export { getExternalsFromPackage } from './getExternalsFromPackage.js';
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,aAAa,EAA6B,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC","sourcesContent":["export { bundlerNames } from './allBundlers.js';\nexport { bundle } from './bundle.js';\nexport { bundlePackage, type BundlePackageOptions } from './bundlePackage.js';\nexport { isValidBundleEntry } from './isValidBundleEntry.js';\nexport { getEntriesMapFromPackage } from './getEntriesMapFromPackage.js';\nexport { getExternalsFromPackage } from './getExternalsFromPackage.js';\nexport { toNormalizedEntryKey } from './toNormalizedEntryKey.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC","sourcesContent":["export { bundlerNames } from './allBundlers.js';\nexport { bundle } from './bundle.js';\nexport { isValidBundleEntry } from './isValidBundleEntry.js';\nexport { getEntriesMapFromPackage } from './getEntriesMapFromPackage.js';\nexport { getExternalsFromPackage } from './getExternalsFromPackage.js';\nexport { toNormalizedEntryKey } from './toNormalizedEntryKey.js';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ms-cloudpack/bundler",
3
- "version": "0.23.39",
3
+ "version": "0.24.1",
4
4
  "description": "An abstraction to bundle source code.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -14,16 +14,16 @@
14
14
  }
15
15
  },
16
16
  "dependencies": {
17
- "@ms-cloudpack/bundler-ori": "^0.2.19",
18
- "@ms-cloudpack/bundler-rollup": "^0.2.13",
19
- "@ms-cloudpack/bundler-rspack": "^0.2.24",
20
- "@ms-cloudpack/bundler-webpack": "^0.2.21",
21
- "@ms-cloudpack/common-types": "^0.24.6",
22
- "@ms-cloudpack/config": "^0.33.15",
17
+ "@ms-cloudpack/bundler-ori": "^0.2.21",
18
+ "@ms-cloudpack/bundler-rollup": "^0.2.15",
19
+ "@ms-cloudpack/bundler-rspack": "^0.2.26",
20
+ "@ms-cloudpack/bundler-webpack": "^0.2.23",
21
+ "@ms-cloudpack/common-types": "^0.24.8",
22
+ "@ms-cloudpack/config": "^0.33.17",
23
23
  "@ms-cloudpack/json-utilities": "^0.1.10",
24
- "@ms-cloudpack/package-utilities": "^11.3.3",
24
+ "@ms-cloudpack/package-utilities": "^11.3.5",
25
25
  "@ms-cloudpack/path-string-parsing": "^1.2.6",
26
- "@ms-cloudpack/path-utilities": "^3.0.3"
26
+ "@ms-cloudpack/path-utilities": "^3.0.5"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@ms-cloudpack/eslint-plugin-internal": "^0.0.1",
@@ -1,10 +0,0 @@
1
- import type { BundleOptions, BundleResult, CloudpackConfig, PackageDefinitionsCache } from '@ms-cloudpack/common-types';
2
- export type BundlePackageOptions = Omit<BundleOptions, 'entries'>;
3
- /**
4
- * Abstracted consumer input to the bundlePackage API.
5
- */
6
- export declare function bundlePackage(options: BundlePackageOptions, context: {
7
- packages: PackageDefinitionsCache;
8
- config: CloudpackConfig;
9
- }): Promise<BundleResult>;
10
- //# sourceMappingURL=bundlePackage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bundlePackage.d.ts","sourceRoot":"","sources":["../src/bundlePackage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAKxH,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC;AAElE;;GAEG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE;IAAE,QAAQ,EAAE,uBAAuB,CAAC;IAAC,MAAM,EAAE,eAAe,CAAA;CAAE,GACtE,OAAO,CAAC,YAAY,CAAC,CAYvB"}
@@ -1,16 +0,0 @@
1
- import { bundle } from './bundle.js';
2
- import { getExternalsFromPackage } from './getExternalsFromPackage.js';
3
- import { getEntriesMapFromPackage } from './getEntriesMapFromPackage.js';
4
- /**
5
- * Abstracted consumer input to the bundlePackage API.
6
- */
7
- export async function bundlePackage(options, context) {
8
- const entries = await getEntriesMapFromPackage(options, context);
9
- const { external = await getExternalsFromPackage(options, context) } = options;
10
- return await bundle({
11
- ...options,
12
- entries,
13
- external,
14
- }, context);
15
- }
16
- //# sourceMappingURL=bundlePackage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bundlePackage.js","sourceRoot":"","sources":["../src/bundlePackage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAIzE;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,OAA6B,EAC7B,OAAuE;IAEvE,MAAM,OAAO,GAAG,MAAM,wBAAwB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACjE,MAAM,EAAE,QAAQ,GAAG,MAAM,uBAAuB,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,GAAG,OAAO,CAAC;IAE/E,OAAO,MAAM,MAAM,CACjB;QACE,GAAG,OAAO;QACV,OAAO;QACP,QAAQ;KACT,EACD,OAAO,CACR,CAAC;AACJ,CAAC","sourcesContent":["import type { BundleOptions, BundleResult, CloudpackConfig, PackageDefinitionsCache } from '@ms-cloudpack/common-types';\nimport { bundle } from './bundle.js';\nimport { getExternalsFromPackage } from './getExternalsFromPackage.js';\nimport { getEntriesMapFromPackage } from './getEntriesMapFromPackage.js';\n\nexport type BundlePackageOptions = Omit<BundleOptions, 'entries'>;\n\n/**\n * Abstracted consumer input to the bundlePackage API.\n */\nexport async function bundlePackage(\n options: BundlePackageOptions,\n context: { packages: PackageDefinitionsCache; config: CloudpackConfig },\n): Promise<BundleResult> {\n const entries = await getEntriesMapFromPackage(options, context);\n const { external = await getExternalsFromPackage(options, context) } = options;\n\n return await bundle(\n {\n ...options,\n entries,\n external,\n },\n context,\n );\n}\n"]}