@lwrjs/view-registry 0.8.0-alpha.9 → 0.8.1
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.
|
@@ -65,6 +65,9 @@ async function getHtmlResources(view, viewParams, resourceContext) {
|
|
|
65
65
|
if (!def) {
|
|
66
66
|
throw Error("Failed to find definition of resource: " + shimBundle);
|
|
67
67
|
}
|
|
68
|
+
if (def.stream) {
|
|
69
|
+
def.stream.destroy();
|
|
70
|
+
}
|
|
68
71
|
requiredResources.push(def);
|
|
69
72
|
const errorShimDef = await resourceRegistry.getResource({specifier: "lwr-error-shim.js", version}, runtimeEnvironment, runtimeParams);
|
|
70
73
|
if (!errorShimDef) {
|
|
@@ -102,7 +105,7 @@ async function getHtmlResources(view, viewParams, resourceContext) {
|
|
|
102
105
|
if (uri2) {
|
|
103
106
|
imports[dynamicDep] = uri2;
|
|
104
107
|
} else {
|
|
105
|
-
|
|
108
|
+
import_shared_utils.logger.warn("Skipping unknown dynamic import " + dynamicDep);
|
|
106
109
|
}
|
|
107
110
|
}
|
|
108
111
|
}
|
|
@@ -65,6 +65,9 @@ async function getHtmlResources(view, viewParams, resourceContext) {
|
|
|
65
65
|
if (!def) {
|
|
66
66
|
throw Error("Failed to find definition of resource: " + shimBundle);
|
|
67
67
|
}
|
|
68
|
+
if (def.stream) {
|
|
69
|
+
def.stream.destroy();
|
|
70
|
+
}
|
|
68
71
|
requiredResources.push(def);
|
|
69
72
|
const errorShimDef = await resourceRegistry.getResource({specifier: "lwr-error-shim.js", version}, runtimeEnvironment, runtimeParams);
|
|
70
73
|
if (!errorShimDef) {
|
|
@@ -101,7 +104,7 @@ async function getHtmlResources(view, viewParams, resourceContext) {
|
|
|
101
104
|
if (uri2) {
|
|
102
105
|
imports[dynamicDep] = uri2;
|
|
103
106
|
} else {
|
|
104
|
-
|
|
107
|
+
import_shared_utils.logger.warn("Skipping unknown dynamic import " + dynamicDep);
|
|
105
108
|
}
|
|
106
109
|
}
|
|
107
110
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { kebabCaseToModuleSpecifer, getModuleGraphs, GraphDepth, getModuleUriPrefix, } from '@lwrjs/shared-utils';
|
|
1
|
+
import { kebabCaseToModuleSpecifer, getModuleGraphs, GraphDepth, getModuleUriPrefix, logger, } from '@lwrjs/shared-utils';
|
|
2
2
|
import { AppResourceEnum, getAppSpecifier } from '@lwrjs/app-service/identity';
|
|
3
3
|
import { generateHtmlTag, getModuleResource, getModuleResourceByUri } from '../utils.js';
|
|
4
4
|
import { flattenCustomElements, getViewBootstrapConfigurationResource, getViewHmrConfigurationResource, } from './utils.js';
|
|
@@ -53,6 +53,10 @@ export async function getHtmlResources(view, viewParams, resourceContext) {
|
|
|
53
53
|
if (!def) {
|
|
54
54
|
throw Error('Failed to find definition of resource: ' + shimBundle);
|
|
55
55
|
}
|
|
56
|
+
// HACK: preemptively closing the stream because it is never read
|
|
57
|
+
if (def.stream) {
|
|
58
|
+
def.stream.destroy();
|
|
59
|
+
}
|
|
56
60
|
requiredResources.push(def);
|
|
57
61
|
// Always inline the error shim script after the shim
|
|
58
62
|
const errorShimDef = (await resourceRegistry.getResource({ specifier: 'lwr-error-shim.js', version }, runtimeEnvironment, runtimeParams));
|
|
@@ -108,7 +112,7 @@ export async function getHtmlResources(view, viewParams, resourceContext) {
|
|
|
108
112
|
imports[dynamicDep] = uri;
|
|
109
113
|
}
|
|
110
114
|
else {
|
|
111
|
-
|
|
115
|
+
logger.warn('Skipping unknown dynamic import ' + dynamicDep);
|
|
112
116
|
}
|
|
113
117
|
}
|
|
114
118
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { kebabCaseToModuleSpecifer, toImportMetadata, getModuleGraphs, getMappingUriPrefix, GraphDepth, } from '@lwrjs/shared-utils';
|
|
1
|
+
import { kebabCaseToModuleSpecifer, toImportMetadata, getModuleGraphs, getMappingUriPrefix, GraphDepth, logger, } from '@lwrjs/shared-utils';
|
|
2
2
|
import { AppResourceEnum, getAppSpecifier } from '@lwrjs/app-service/identity';
|
|
3
3
|
import { generateHtmlTag, getModuleResource, getModuleResourceByUri } from '../utils.js';
|
|
4
4
|
import { flattenCustomElements, getViewBootstrapConfigurationResource, getViewHmrConfigurationResource, } from './utils.js';
|
|
@@ -53,6 +53,10 @@ export async function getHtmlResources(view, viewParams, resourceContext) {
|
|
|
53
53
|
if (!def) {
|
|
54
54
|
throw Error('Failed to find definition of resource: ' + shimBundle);
|
|
55
55
|
}
|
|
56
|
+
// HACK: preemptively closing the stream because it is never read
|
|
57
|
+
if (def.stream) {
|
|
58
|
+
def.stream.destroy();
|
|
59
|
+
}
|
|
56
60
|
requiredResources.push(def);
|
|
57
61
|
// Always inline the error shim script after the shim
|
|
58
62
|
const errorShimDef = (await resourceRegistry.getResource({ specifier: 'lwr-error-shim.js', version }, runtimeEnvironment, runtimeParams));
|
|
@@ -106,7 +110,7 @@ export async function getHtmlResources(view, viewParams, resourceContext) {
|
|
|
106
110
|
imports[dynamicDep] = uri;
|
|
107
111
|
}
|
|
108
112
|
else {
|
|
109
|
-
|
|
113
|
+
logger.warn('Skipping unknown dynamic import ' + dynamicDep);
|
|
110
114
|
}
|
|
111
115
|
}
|
|
112
116
|
}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.8.
|
|
7
|
+
"version": "0.8.1",
|
|
8
8
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -30,15 +30,15 @@
|
|
|
30
30
|
"build/**/*.d.ts"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@lwrjs/app-service": "0.8.
|
|
34
|
-
"@lwrjs/diagnostics": "0.8.
|
|
35
|
-
"@lwrjs/shared-utils": "0.8.
|
|
33
|
+
"@lwrjs/app-service": "0.8.1",
|
|
34
|
+
"@lwrjs/diagnostics": "0.8.1",
|
|
35
|
+
"@lwrjs/shared-utils": "0.8.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@lwrjs/types": "0.8.
|
|
38
|
+
"@lwrjs/types": "0.8.1"
|
|
39
39
|
},
|
|
40
40
|
"engines": {
|
|
41
41
|
"node": ">=14.15.4 <19"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "171c43556c5624849c8ee6b61ef6de5b65630e38"
|
|
44
44
|
}
|