@lwrjs/app-service 0.10.0-alpha.0 → 0.10.0-alpha.10
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.
|
@@ -73,12 +73,11 @@ function normalizeBootstrap(bootstrap) {
|
|
|
73
73
|
}
|
|
74
74
|
function createAppRouteViewBootstrapModule(route, options, lockerConfig) {
|
|
75
75
|
const {bootstrap} = route;
|
|
76
|
-
const {services, syntheticShadow
|
|
76
|
+
const {services, syntheticShadow} = bootstrap;
|
|
77
77
|
const isAMD = options.format === "amd";
|
|
78
78
|
const isESM = options.format === "esm";
|
|
79
79
|
const servicesSource = bootstrap.services && createServicesSource(bootstrap.services);
|
|
80
80
|
const serviceApiModule = getServiceApiModule(options.format, options.moduleLoader);
|
|
81
|
-
const bootstrapModule = ssr && !lockerConfig.enabled ? "lwr/initSsr" : "lwr/init";
|
|
82
81
|
return [
|
|
83
82
|
"/* This module is generated */",
|
|
84
83
|
isESM && `import { getClientBootstrapConfig } from 'lwr/preInit';`,
|
|
@@ -87,7 +86,7 @@ function createAppRouteViewBootstrapModule(route, options, lockerConfig) {
|
|
|
87
86
|
servicesSource,
|
|
88
87
|
isESM && options.hmrEnabled && `import { initHMR } from 'lwr/hmr';`,
|
|
89
88
|
isESM && `import { init as esmLoaderInit } from 'lwr/esmLoader';`,
|
|
90
|
-
`import { init, toKebabCase } from '
|
|
89
|
+
`import { init, toKebabCase } from 'lwr/init';`,
|
|
91
90
|
isAMD && lockerConfig && lockerConfig.enabled && lockerConfig.clientOnly && `
|
|
92
91
|
import { registerLockerDefine } from 'lwr/lockerDefine';
|
|
93
92
|
registerLockerDefine(${JSON.stringify(lockerConfig.trustedComponents)});
|
package/build/es/identity.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ModuleFormat } from '@lwrjs/types';
|
|
2
2
|
export declare const APP_BOOTSTRAP_PACKAGE_NAME = "@lwrjs/app-service";
|
|
3
3
|
export declare const SUPPORTED_MODULE_FORMATS: string[];
|
|
4
|
-
export
|
|
4
|
+
export type AppResourceType = 'module';
|
|
5
5
|
export declare enum AppResourceEnum {
|
|
6
6
|
MODULE = "module"
|
|
7
7
|
}
|
|
@@ -10,7 +10,7 @@ export interface ApplicationIdentity {
|
|
|
10
10
|
namespace?: string;
|
|
11
11
|
name: string;
|
|
12
12
|
}
|
|
13
|
-
export
|
|
13
|
+
export type SubResourceIdentity = PathResourceIdentity | WorkerResourceIdentity;
|
|
14
14
|
export declare enum ResourceIdentityTypes {
|
|
15
15
|
PATH = "path",
|
|
16
16
|
WORKER = "worker"
|
|
@@ -19,12 +19,12 @@ export interface PathResourceIdentity {
|
|
|
19
19
|
type: ResourceIdentityTypes.PATH;
|
|
20
20
|
requestPath: string;
|
|
21
21
|
}
|
|
22
|
-
export
|
|
22
|
+
export type WorkerResourceIdentityType = 'worker';
|
|
23
23
|
export interface WorkerResourceIdentity {
|
|
24
24
|
type: ResourceIdentityTypes.WORKER;
|
|
25
25
|
workerId: string;
|
|
26
26
|
}
|
|
27
|
-
export
|
|
27
|
+
export type AppResourceId = Pick<AppResourceIdentity, 'appName' | 'resourceType' | 'format' | 'subResource'>;
|
|
28
28
|
export interface AppResourceIdentity {
|
|
29
29
|
packageName: string;
|
|
30
30
|
appName: string;
|
|
@@ -60,12 +60,11 @@ export function normalizeBootstrap(bootstrap) {
|
|
|
60
60
|
*/
|
|
61
61
|
export function createAppRouteViewBootstrapModule(route, options, lockerConfig) {
|
|
62
62
|
const { bootstrap } = route;
|
|
63
|
-
const { services, syntheticShadow
|
|
63
|
+
const { services, syntheticShadow } = bootstrap;
|
|
64
64
|
const isAMD = options.format === 'amd';
|
|
65
65
|
const isESM = options.format === 'esm';
|
|
66
66
|
const servicesSource = bootstrap.services && createServicesSource(bootstrap.services);
|
|
67
67
|
const serviceApiModule = getServiceApiModule(options.format, options.moduleLoader);
|
|
68
|
-
const bootstrapModule = ssr && !lockerConfig.enabled ? 'lwr/initSsr' : 'lwr/init';
|
|
69
68
|
return [
|
|
70
69
|
'/* This module is generated */',
|
|
71
70
|
// pre app initialization step
|
|
@@ -82,7 +81,7 @@ export function createAppRouteViewBootstrapModule(route, options, lockerConfig)
|
|
|
82
81
|
// Import the ESM module initializer
|
|
83
82
|
isESM && `import { init as esmLoaderInit } from 'lwr/esmLoader';`,
|
|
84
83
|
// init module
|
|
85
|
-
`import { init, toKebabCase } from '
|
|
84
|
+
`import { init, toKebabCase } from 'lwr/init';`,
|
|
86
85
|
// locker
|
|
87
86
|
isAMD &&
|
|
88
87
|
lockerConfig &&
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.10.0-alpha.
|
|
7
|
+
"version": "0.10.0-alpha.10",
|
|
8
8
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
"build/**/*.d.ts"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@lwrjs/diagnostics": "0.10.0-alpha.
|
|
37
|
-
"@lwrjs/shared-utils": "0.10.0-alpha.
|
|
36
|
+
"@lwrjs/diagnostics": "0.10.0-alpha.10",
|
|
37
|
+
"@lwrjs/shared-utils": "0.10.0-alpha.10"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@lwrjs/types": "0.10.0-alpha.
|
|
40
|
+
"@lwrjs/types": "0.10.0-alpha.10"
|
|
41
41
|
},
|
|
42
42
|
"engines": {
|
|
43
43
|
"node": ">=16.0.0 <20"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "81dd6125be1023415344b59c4dcd977c8dbaf7f5"
|
|
46
46
|
}
|