@lwrjs/config 0.13.1 → 0.13.2

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.
@@ -40,7 +40,7 @@ async function importModule(filepath, rootDir, cacheDir) {
40
40
  const {transpileTs} = await Promise.resolve().then(() => __toModule(require("@lwrjs/esbuild")));
41
41
  resolvedFilePath = await transpileTs(fullPath, {rootDir, cacheDir: resolvedCacheDir});
42
42
  }
43
- const moduleEntry = await Promise.resolve().then(() => __toModule(require(resolvedFilePath)));
43
+ const moduleEntry = await Promise.resolve().then(() => __toModule(require((0, import_shared_utils.crossEnvFileURL)(resolvedFilePath))));
44
44
  const output = moduleEntry.default || moduleEntry;
45
45
  return output;
46
46
  } catch (err) {
@@ -50,7 +50,8 @@ async function importModule(filepath, rootDir, cacheDir) {
50
50
  }
51
51
  async function loadServiceEntries(entries, rootDir, cacheDir) {
52
52
  return Promise.all(entries.map(async ([entry, config]) => {
53
- const ctor = await importModule(entry, rootDir, import_path.default.join(cacheDir, "services"));
53
+ const cacheDirServices = import_path.default.join(cacheDir, "services");
54
+ const ctor = await importModule(entry, rootDir, cacheDirServices);
54
55
  return [ctor, config];
55
56
  }));
56
57
  }
@@ -1,6 +1,6 @@
1
1
  import path from 'path';
2
2
  import { logger } from '@lwrjs/diagnostics';
3
- import { normalizeDirectory, resolveFileExtension } from '@lwrjs/shared-utils';
3
+ import { normalizeDirectory, resolveFileExtension, crossEnvFileURL } from '@lwrjs/shared-utils';
4
4
  async function importModule(filepath, rootDir, cacheDir) {
5
5
  // ensure paths are fully resolved before loading source
6
6
  let resolvedFilePath = normalizeDirectory(filepath, rootDir);
@@ -11,7 +11,7 @@ async function importModule(filepath, rootDir, cacheDir) {
11
11
  const { transpileTs } = await import('@lwrjs/esbuild');
12
12
  resolvedFilePath = await transpileTs(fullPath, { rootDir, cacheDir: resolvedCacheDir });
13
13
  }
14
- const moduleEntry = await import(resolvedFilePath);
14
+ const moduleEntry = await import(crossEnvFileURL(resolvedFilePath));
15
15
  const output = moduleEntry.default || moduleEntry;
16
16
  return output;
17
17
  }
@@ -22,7 +22,8 @@ async function importModule(filepath, rootDir, cacheDir) {
22
22
  }
23
23
  async function loadServiceEntries(entries, rootDir, cacheDir) {
24
24
  return Promise.all(entries.map(async ([entry, config]) => {
25
- const ctor = await importModule(entry, rootDir, path.join(cacheDir, 'services'));
25
+ const cacheDirServices = path.join(cacheDir, 'services');
26
+ const ctor = await importModule(entry, rootDir, cacheDirServices);
26
27
  return [ctor, config];
27
28
  }));
28
29
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.13.1",
7
+ "version": "0.13.2",
8
8
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
9
9
  "repository": {
10
10
  "type": "git",
@@ -42,14 +42,14 @@
42
42
  "test": "jest"
43
43
  },
44
44
  "dependencies": {
45
- "@lwrjs/diagnostics": "0.13.1",
46
- "@lwrjs/instrumentation": "0.13.1",
47
- "@lwrjs/shared-utils": "0.13.1",
45
+ "@lwrjs/diagnostics": "0.13.2",
46
+ "@lwrjs/instrumentation": "0.13.2",
47
+ "@lwrjs/shared-utils": "0.13.2",
48
48
  "fs-extra": "^11.2.0",
49
49
  "jsonc-parser": "^3.3.1"
50
50
  },
51
51
  "devDependencies": {
52
- "@lwrjs/types": "0.13.1",
52
+ "@lwrjs/types": "0.13.2",
53
53
  "jest": "^26.6.3",
54
54
  "ts-jest": "^26.5.6"
55
55
  },
@@ -70,5 +70,5 @@
70
70
  "volta": {
71
71
  "extends": "../../../package.json"
72
72
  },
73
- "gitHead": "548b27ed22f5bfba7031d6b356d64898e15bd609"
73
+ "gitHead": "607ec6610069ef1214b4c20f146ab97225554405"
74
74
  }