@lwrjs/static 0.11.0-alpha.12 → 0.11.0-alpha.13

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.
@@ -65,6 +65,13 @@ var StaticBundleProvider = class {
65
65
  }
66
66
  return importModule;
67
67
  });
68
+ const dynamicImports = metadata.dynamicImports?.map((specifier2) => {
69
+ const dynamicImportModule = (0, import_shared_utils.explodeSpecifier)(specifier2);
70
+ if (!dynamicImportModule.version) {
71
+ dynamicImportModule.version = (0, import_static_utils.resolveStaticBundleVersion)(this.siteBundles.bundles[specifier2]?.version);
72
+ }
73
+ return dynamicImportModule;
74
+ });
68
75
  const id = (0, import_shared_utils.getSpecifier)(moduleId);
69
76
  const exploded = (0, import_shared_utils.explodeSpecifier)(id);
70
77
  const resolvedName = name || exploded.name;
@@ -85,7 +92,8 @@ var StaticBundleProvider = class {
85
92
  config: this.bundleConfig,
86
93
  bundleRecord: {
87
94
  includedModules: metadata.includedModules || [],
88
- imports
95
+ imports,
96
+ dynamicImports
89
97
  },
90
98
  src: bundlePath
91
99
  };
@@ -40,6 +40,14 @@ export default class StaticBundleProvider {
40
40
  }
41
41
  return importModule;
42
42
  });
43
+ const dynamicImports = metadata.dynamicImports?.map((specifier) => {
44
+ const dynamicImportModule = explodeSpecifier(specifier);
45
+ if (!dynamicImportModule.version) {
46
+ // Get version from metadata for un-versioned imports
47
+ dynamicImportModule.version = resolveStaticBundleVersion(this.siteBundles.bundles[specifier]?.version);
48
+ }
49
+ return dynamicImportModule;
50
+ });
43
51
  const id = getSpecifier(moduleId);
44
52
  const exploded = explodeSpecifier(id);
45
53
  // Seem unlikely name was not in the moduleId but just incase set it form the exploded id
@@ -63,6 +71,7 @@ export default class StaticBundleProvider {
63
71
  // TODO we need to solve include modules for fingerprints support
64
72
  includedModules: metadata.includedModules || [],
65
73
  imports,
74
+ dynamicImports,
66
75
  },
67
76
  src: bundlePath,
68
77
  };
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.11.0-alpha.12",
7
+ "version": "0.11.0-alpha.13",
8
8
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
9
9
  "repository": {
10
10
  "type": "git",
@@ -48,11 +48,11 @@
48
48
  "build/**/*.d.ts"
49
49
  ],
50
50
  "dependencies": {
51
- "@lwrjs/diagnostics": "0.11.0-alpha.12",
52
- "@lwrjs/shared-utils": "0.11.0-alpha.12"
51
+ "@lwrjs/diagnostics": "0.11.0-alpha.13",
52
+ "@lwrjs/shared-utils": "0.11.0-alpha.13"
53
53
  },
54
54
  "devDependencies": {
55
- "@lwrjs/types": "0.11.0-alpha.12",
55
+ "@lwrjs/types": "0.11.0-alpha.13",
56
56
  "@types/express": "^4.17.17",
57
57
  "jest": "^26.6.3",
58
58
  "jest-express": "^1.12.0",
@@ -65,5 +65,5 @@
65
65
  "volta": {
66
66
  "extends": "../../../package.json"
67
67
  },
68
- "gitHead": "e19ffe5a48dc2b2b6d74d8acfa9658bedb5dd1ff"
68
+ "gitHead": "101ac765e89de3b378b4c049cdeb0cfc635ae22a"
69
69
  }