@lwrjs/tools 0.11.0-alpha.1 → 0.11.0-alpha.3
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.
|
@@ -78,11 +78,11 @@ function processRouteHandlers(routeHandlers, rootDir) {
|
|
|
78
78
|
imports: [],
|
|
79
79
|
routeHandlers: {}
|
|
80
80
|
};
|
|
81
|
-
for (const [id,
|
|
81
|
+
for (const [id, handler] of Object.entries(routeHandlers)) {
|
|
82
82
|
if (!output.routeHandlers[id]) {
|
|
83
83
|
const name = `routeHandler${output.imports.length}`;
|
|
84
|
-
output.imports.push(`import ${name} from '${(0, import_shared_utils.normalizeDirectory)(handler, rootDir)}';`);
|
|
85
|
-
output.routeHandlers[id] =
|
|
84
|
+
output.imports.push(`import ${name} from '${(0, import_shared_utils.normalizeDirectory)(handler || id, rootDir)}';`);
|
|
85
|
+
output.routeHandlers[id] = name;
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
return output;
|
|
@@ -99,8 +99,8 @@ function printHooks(hooks) {
|
|
|
99
99
|
}).join(",")}]`;
|
|
100
100
|
}
|
|
101
101
|
function printRouteHandlers(routeHandlers) {
|
|
102
|
-
return `{${Object.entries(routeHandlers).map(([id,
|
|
103
|
-
return `'${id}':
|
|
102
|
+
return `{${Object.entries(routeHandlers).map(([id, handler]) => {
|
|
103
|
+
return `'${id}': ${handler}`;
|
|
104
104
|
}).join(",")}}`;
|
|
105
105
|
}
|
|
106
106
|
function buildLwrServer(config, buildDir) {
|
|
@@ -50,11 +50,11 @@ function processRouteHandlers(routeHandlers, rootDir) {
|
|
|
50
50
|
imports: [],
|
|
51
51
|
routeHandlers: {},
|
|
52
52
|
};
|
|
53
|
-
for (const [id,
|
|
53
|
+
for (const [id, handler] of Object.entries(routeHandlers)) {
|
|
54
54
|
if (!output.routeHandlers[id]) {
|
|
55
55
|
const name = `routeHandler${output.imports.length}`;
|
|
56
|
-
output.imports.push(`import ${name} from '${normalizeDirectory(handler, rootDir)}';`);
|
|
57
|
-
output.routeHandlers[id] =
|
|
56
|
+
output.imports.push(`import ${name} from '${normalizeDirectory(handler || id, rootDir)}';`);
|
|
57
|
+
output.routeHandlers[id] = name;
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
return output;
|
|
@@ -76,8 +76,8 @@ function printHooks(hooks) {
|
|
|
76
76
|
}
|
|
77
77
|
function printRouteHandlers(routeHandlers) {
|
|
78
78
|
return `{${Object.entries(routeHandlers)
|
|
79
|
-
.map(([id,
|
|
80
|
-
return `'${id}':
|
|
79
|
+
.map(([id, handler]) => {
|
|
80
|
+
return `'${id}': ${handler}`;
|
|
81
81
|
})
|
|
82
82
|
.join(',')}}`;
|
|
83
83
|
}
|
package/build/es/server-build.js
CHANGED
|
@@ -24,9 +24,6 @@ async function build(buildOptions, config) {
|
|
|
24
24
|
'node:*',
|
|
25
25
|
// fsevents used by chokidar used by nunjucks
|
|
26
26
|
'fsevents',
|
|
27
|
-
// Used for express compression. Should be an optional dependency and should be omitted at runtime
|
|
28
|
-
'iltorb',
|
|
29
|
-
'shrink-ray-current',
|
|
30
27
|
// These dependencies are not needed to serve a basic generated site, but they are still excluded
|
|
31
28
|
// in case there is a need to add a custom module provider.
|
|
32
29
|
'esbuild*',
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.11.0-alpha.
|
|
7
|
+
"version": "0.11.0-alpha.3",
|
|
8
8
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"package.cjs"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@lwrjs/core": "0.11.0-alpha.
|
|
35
|
+
"@lwrjs/core": "0.11.0-alpha.3",
|
|
36
36
|
"esbuild": "^0.17.4"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@lwrjs/types": "0.11.0-alpha.
|
|
39
|
+
"@lwrjs/types": "0.11.0-alpha.3"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"lwc": "2.x || 3.x"
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"engines": {
|
|
45
45
|
"node": ">=16.0.0"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "720b7b5525f93c089f8d97bdef692927ad520d39"
|
|
48
48
|
}
|