@lwrjs/app-service 0.15.0-alpha.3 → 0.15.0-alpha.30

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.
@@ -32,12 +32,14 @@ function getDefaultImportName(service) {
32
32
  return (0, import_shared_utils.stringToVariableName)(`loaderService_${service}`);
33
33
  }
34
34
  function createServicesSource(services) {
35
- const imports = services.map(({name}) => {
36
- const defaultImportName = getDefaultImportName(name);
37
- return `import ${defaultImportName} from '${name}'`;
35
+ const imports = services.map((service) => {
36
+ const serviceId = (0, import_shared_utils.getSpecifier)(service);
37
+ const defaultImportName = getDefaultImportName(serviceId);
38
+ return `import ${defaultImportName} from '${serviceId}'`;
38
39
  });
39
- const body = services.map(({name}) => {
40
- const defaultImportName = getDefaultImportName(name);
40
+ const body = services.map((service) => {
41
+ const serviceId = (0, import_shared_utils.getSpecifier)(service);
42
+ const defaultImportName = getDefaultImportName(serviceId);
41
43
  return `${defaultImportName}({...services, addServerDataCallback: registerServerDataCallbacks })`;
42
44
  });
43
45
  return [...imports, ...body].join(";\n") + ";";
@@ -100,8 +102,13 @@ Promise.all(rootComponents.map(async (rootSpecifier) => {
100
102
  return import(rootSpecifier).then(({default: Ctor}) => {
101
103
  init([[element, Ctor]], serverData);
102
104
  });
103
- return;
104
- }));`,
105
+ })).then(() => {
106
+ globalThis?.lwcRuntimeFlags?.ENABLE_WIRE_SYNC_EMIT &&
107
+ (globalThis.lwcRuntimeFlags = {
108
+ ...globalThis.lwcRuntimeFlags,
109
+ ENABLE_WIRE_SYNC_EMIT: false,
110
+ });
111
+ });`,
105
112
  isESM && options.hmrEnabled && `
106
113
  // HMR related initialization
107
114
  const viewMetadata = globalThis._lwrRuntimeDebug.viewMetadata;
@@ -1,14 +1,16 @@
1
- import { stringToVariableName } from '@lwrjs/shared-utils';
1
+ import { getSpecifier, stringToVariableName } from '@lwrjs/shared-utils';
2
2
  function getDefaultImportName(service) {
3
3
  return stringToVariableName(`loaderService_${service}`);
4
4
  }
5
5
  function createServicesSource(services) {
6
- const imports = services.map(({ name }) => {
7
- const defaultImportName = getDefaultImportName(name);
8
- return `import ${defaultImportName} from '${name}'`;
6
+ const imports = services.map((service) => {
7
+ const serviceId = getSpecifier(service);
8
+ const defaultImportName = getDefaultImportName(serviceId);
9
+ return `import ${defaultImportName} from '${serviceId}'`;
9
10
  });
10
- const body = services.map(({ name }) => {
11
- const defaultImportName = getDefaultImportName(name);
11
+ const body = services.map((service) => {
12
+ const serviceId = getSpecifier(service);
13
+ const defaultImportName = getDefaultImportName(serviceId);
12
14
  return `${defaultImportName}({...services, addServerDataCallback: registerServerDataCallbacks })`;
13
15
  });
14
16
  return [...imports, ...body].join(';\n') + ';';
@@ -108,8 +110,13 @@ Promise.all(rootComponents.map(async (rootSpecifier) => {
108
110
  return import(rootSpecifier).then(({default: Ctor}) => {
109
111
  init([[element, Ctor]], serverData);
110
112
  });
111
- return;
112
- }));`,
113
+ })).then(() => {
114
+ globalThis?.lwcRuntimeFlags?.ENABLE_WIRE_SYNC_EMIT &&
115
+ (globalThis.lwcRuntimeFlags = {
116
+ ...globalThis.lwcRuntimeFlags,
117
+ ENABLE_WIRE_SYNC_EMIT: false,
118
+ });
119
+ });`,
113
120
  isESM &&
114
121
  options.hmrEnabled &&
115
122
  `
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.15.0-alpha.3",
7
+ "version": "0.15.0-alpha.30",
8
8
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
9
9
  "repository": {
10
10
  "type": "git",
@@ -36,14 +36,14 @@
36
36
  "build": "tsc -b"
37
37
  },
38
38
  "dependencies": {
39
- "@lwrjs/diagnostics": "0.15.0-alpha.3",
40
- "@lwrjs/shared-utils": "0.15.0-alpha.3"
39
+ "@lwrjs/diagnostics": "0.15.0-alpha.30",
40
+ "@lwrjs/shared-utils": "0.15.0-alpha.30"
41
41
  },
42
42
  "devDependencies": {
43
- "@lwrjs/types": "0.15.0-alpha.3"
43
+ "@lwrjs/types": "0.15.0-alpha.30"
44
44
  },
45
45
  "engines": {
46
46
  "node": ">=18.0.0"
47
47
  },
48
- "gitHead": "6dfe76aa313a8ee1cedcf33b466df48a8f1a62eb"
48
+ "gitHead": "b563560f1d3ccbb6d6bab8a8a5d7b6a8456b9c48"
49
49
  }