@lwrjs/tools 0.12.0-alpha.9 → 0.13.0-alpha.0
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.
- package/build/cjs/plugins/build-server-plugin.cjs +1 -1
- package/build/cjs/plugins/generate-entry-plugin.cjs +1 -1
- package/build/cjs/server-build.cjs +1 -0
- package/build/es/plugins/build-server-plugin.js +1 -1
- package/build/es/plugins/generate-entry-plugin.js +1 -1
- package/build/es/server-build.js +1 -0
- package/package.json +8 -8
|
@@ -116,7 +116,7 @@ function buildLwrServer(config, buildDir) {
|
|
|
116
116
|
namespace: "lwr-server-build"
|
|
117
117
|
}));
|
|
118
118
|
build.onLoad({filter: /.*/, namespace: "lwr-server-build"}, async (args) => {
|
|
119
|
-
const {appConfig, runtimeEnvironment, globalData} =
|
|
119
|
+
const {appConfig, runtimeEnvironment, globalData} = (0, import_config.loadConfig)(config, {
|
|
120
120
|
skipDirNormalization: true,
|
|
121
121
|
useStaticProviders: true
|
|
122
122
|
});
|
|
@@ -44,7 +44,7 @@ function generateLwrEntry() {
|
|
|
44
44
|
`/* This module is generated */`,
|
|
45
45
|
`import { createHandler } from '@lwrjs/lambda';`,
|
|
46
46
|
`import * as build from './lwr.build.js';`,
|
|
47
|
-
`const handler = createHandler(build);`,
|
|
47
|
+
`const handler = !process.env.LOCAL ? createHandler(build) : undefined;`,
|
|
48
48
|
`export { handler as get, build as MRT_APP_CONFIG };`
|
|
49
49
|
].join("\n"),
|
|
50
50
|
loader: "ts",
|
|
@@ -110,7 +110,7 @@ export default function buildLwrServer(config, buildDir) {
|
|
|
110
110
|
namespace: 'lwr-server-build',
|
|
111
111
|
}));
|
|
112
112
|
build.onLoad({ filter: /.*/, namespace: 'lwr-server-build' }, async (args) => {
|
|
113
|
-
const { appConfig, runtimeEnvironment, globalData } =
|
|
113
|
+
const { appConfig, runtimeEnvironment, globalData } = loadConfig(config, {
|
|
114
114
|
skipDirNormalization: true,
|
|
115
115
|
useStaticProviders: true,
|
|
116
116
|
});
|
|
@@ -32,7 +32,7 @@ export default function generateLwrEntry() {
|
|
|
32
32
|
// The server build module MUST NOT require asynchronous initialization to support running on MRT
|
|
33
33
|
// Once MRT supports ESM, top-level await could be used at this point to perform some asynchronous
|
|
34
34
|
// initialization.
|
|
35
|
-
`const handler = createHandler(build);`,
|
|
35
|
+
`const handler = !process.env.LOCAL ? createHandler(build) : undefined;`,
|
|
36
36
|
// MRT expects the handler to be a named export: `get`
|
|
37
37
|
`export { handler as get, build as MRT_APP_CONFIG };`,
|
|
38
38
|
].join('\n'),
|
package/build/es/server-build.js
CHANGED
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.13.0-alpha.0",
|
|
8
8
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -32,15 +32,15 @@
|
|
|
32
32
|
"package.cjs"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@lwrjs/config": "0.
|
|
36
|
-
"@lwrjs/core": "0.
|
|
37
|
-
"@lwrjs/diagnostics": "0.
|
|
38
|
-
"@lwrjs/shared-utils": "0.
|
|
35
|
+
"@lwrjs/config": "0.13.0-alpha.0",
|
|
36
|
+
"@lwrjs/core": "0.13.0-alpha.0",
|
|
37
|
+
"@lwrjs/diagnostics": "0.13.0-alpha.0",
|
|
38
|
+
"@lwrjs/shared-utils": "0.13.0-alpha.0",
|
|
39
39
|
"esbuild": "^0.17.4",
|
|
40
|
-
"fs-extra": "^11.
|
|
40
|
+
"fs-extra": "^11.2.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@lwrjs/types": "0.
|
|
43
|
+
"@lwrjs/types": "0.13.0-alpha.0",
|
|
44
44
|
"mock-fs": "^5.2.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"engines": {
|
|
50
50
|
"node": ">=18.0.0"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "c5fe8db55c74513dbb0937d1b4568109715a13fb"
|
|
53
53
|
}
|