@lwrjs/module-bundler 0.13.6 → 0.15.0-alpha.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.
@@ -109,6 +109,9 @@ var LwrModuleBundler = class {
109
109
  const {version} = await this.moduleRegistry.getModuleEntry(moduleId, runtimeParams);
110
110
  resolvedVersion = version;
111
111
  }
112
+ if (!signature) {
113
+ signature = (0, import_shared_utils.signBundle)(bundleDefinition);
114
+ }
112
115
  uri = String(await this.moduleRegistry.resolveModuleUri({...moduleId, version: resolvedVersion}, runtimeEnvironment, runtimeParams, signature));
113
116
  }
114
117
  const bundleUri = {
package/build/es/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { join } from 'path';
2
2
  import { LwrUnresolvableError, createSingleDiagnosticError, descriptions } from '@lwrjs/diagnostics';
3
- import { getCacheKeyFromJson, InflightTasks, TaskPool } from '@lwrjs/shared-utils';
3
+ import { signBundle, getCacheKeyFromJson, InflightTasks, TaskPool } from '@lwrjs/shared-utils';
4
4
  import { getTracer, BundleSpan } from '@lwrjs/instrumentation';
5
5
  const TASK_POOL = new TaskPool();
6
6
  export class LwrModuleBundler {
@@ -104,6 +104,9 @@ export class LwrModuleBundler {
104
104
  const { version } = await this.moduleRegistry.getModuleEntry(moduleId, runtimeParams);
105
105
  resolvedVersion = version;
106
106
  }
107
+ if (!signature) {
108
+ signature = signBundle(bundleDefinition);
109
+ }
107
110
  uri = String(await this.moduleRegistry.resolveModuleUri({ ...moduleId, version: resolvedVersion }, runtimeEnvironment, runtimeParams, signature));
108
111
  }
109
112
  const bundleUri = {
@@ -62,7 +62,7 @@ export function bundleDefinitions(options) {
62
62
  for (const refImport of imports) {
63
63
  let refModuleDef = visitedDefs.get(refImport.specifier);
64
64
  if (!refModuleDef) {
65
- // The refeference imports have the specifier pointing to a URI.
65
+ // The reference imports have the specifier pointing to a URI.
66
66
  // so we take the original specifier instead
67
67
  let specifier = getSpecifier({ namespace: refImport.namespace, name: refImport.name });
68
68
  let explodedSpecifier = refImport;
@@ -75,7 +75,7 @@ export function bundleDefinitions(options) {
75
75
  specifier = alias[specifier];
76
76
  explodedSpecifier = explodeSpecifier(specifier);
77
77
  // We also need to remap the original URI to point to the aliased URI so
78
- // we endup having the same module identity (otherwise we will have duplicated code)
78
+ // we end-up having the same module identity (otherwise we will have duplicated code)
79
79
  const aliasModuleEntry = await moduleRegistry.getModuleEntry(explodedSpecifier, runtimeParams);
80
80
  aliasSpecifierUri = await moduleRegistry.resolveModuleUri(aliasModuleEntry, runtimeEnvironment, runtimeParams);
81
81
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.13.6",
7
+ "version": "0.15.0-alpha.1",
8
8
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
9
9
  "repository": {
10
10
  "type": "git",
@@ -47,14 +47,14 @@
47
47
  "build/**/*.d.ts"
48
48
  ],
49
49
  "dependencies": {
50
- "@lwrjs/diagnostics": "0.13.6",
51
- "@lwrjs/instrumentation": "0.13.6",
52
- "@lwrjs/shared-utils": "0.13.6",
50
+ "@lwrjs/diagnostics": "0.15.0-alpha.1",
51
+ "@lwrjs/instrumentation": "0.15.0-alpha.1",
52
+ "@lwrjs/shared-utils": "0.15.0-alpha.1",
53
53
  "@rollup/plugin-replace": "^5.0.7",
54
54
  "rollup": "^2.78.0"
55
55
  },
56
56
  "devDependencies": {
57
- "@lwrjs/types": "0.13.6",
57
+ "@lwrjs/types": "0.15.0-alpha.1",
58
58
  "jest": "^26.6.3",
59
59
  "ts-jest": "^26.5.6"
60
60
  },
@@ -67,5 +67,5 @@
67
67
  "volta": {
68
68
  "extends": "../../../package.json"
69
69
  },
70
- "gitHead": "b6558d6ff644c035b3191eea00dfd6c625dc5efa"
70
+ "gitHead": "4547b6c6a7c9e9f33f829d4fdf2082caf4c9c44b"
71
71
  }