@lwrjs/server 0.12.0-alpha.2 → 0.12.0-alpha.4
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.
|
@@ -54,6 +54,10 @@ var AbstractMiddlewareRequest = class {
|
|
|
54
54
|
const supportedEnvironments = config.environment.supported || [];
|
|
55
55
|
return !targetEnvironment || targetEnvironment === defaultEnvironment || supportedEnvironments?.includes(targetEnvironment);
|
|
56
56
|
}
|
|
57
|
+
validateApiVersion(config) {
|
|
58
|
+
const apiVersion = this.params.apiVersion;
|
|
59
|
+
return apiVersion === config.apiVersion;
|
|
60
|
+
}
|
|
57
61
|
getRuntimeContext(defaultRuntimeEnvironment) {
|
|
58
62
|
const {
|
|
59
63
|
format,
|
|
@@ -20,6 +20,7 @@ export declare abstract class AbstractMiddlewareRequest implements MiddlewareReq
|
|
|
20
20
|
isJsonRequest(): boolean;
|
|
21
21
|
validateJsonRequest(): boolean;
|
|
22
22
|
validateEnvironmentRequest(config: NormalizedLwrGlobalConfig): boolean;
|
|
23
|
+
validateApiVersion(config: NormalizedLwrGlobalConfig): boolean;
|
|
23
24
|
getRuntimeContext(defaultRuntimeEnvironment: RuntimeEnvironment): RuntimeContext;
|
|
24
25
|
}
|
|
25
26
|
//# sourceMappingURL=abstract-request.d.ts.map
|
|
@@ -51,6 +51,10 @@ export class AbstractMiddlewareRequest {
|
|
|
51
51
|
targetEnvironment === defaultEnvironment ||
|
|
52
52
|
supportedEnvironments?.includes(targetEnvironment));
|
|
53
53
|
}
|
|
54
|
+
validateApiVersion(config) {
|
|
55
|
+
const apiVersion = this.params.apiVersion;
|
|
56
|
+
return apiVersion === config.apiVersion;
|
|
57
|
+
}
|
|
54
58
|
getRuntimeContext(defaultRuntimeEnvironment) {
|
|
55
59
|
const { format, apiVersion, basePath: basePathParam, compat, locale: localeParam, environment, bundleSpecifier, } = this.params;
|
|
56
60
|
const debug = this.query.debug !== undefined;
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.12.0-alpha.
|
|
7
|
+
"version": "0.12.0-alpha.4",
|
|
8
8
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
"build/**/*.d.ts"
|
|
35
35
|
],
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@lwrjs/types": "0.12.0-alpha.
|
|
37
|
+
"@lwrjs/types": "0.12.0-alpha.4",
|
|
38
38
|
"@types/koa-compress": "^4.0.1",
|
|
39
39
|
"@types/koa__router": "^8.0.4",
|
|
40
40
|
"jest-express": "^1.12.0"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@koa/router": "^10.0.0",
|
|
44
|
-
"@lwrjs/shared-utils": "0.12.0-alpha.
|
|
44
|
+
"@lwrjs/shared-utils": "0.12.0-alpha.4",
|
|
45
45
|
"@types/express": "^4.17.21",
|
|
46
46
|
"@types/koa": "^2.11.7",
|
|
47
47
|
"express": "^4.18.2",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"engines": {
|
|
52
52
|
"node": ">=18.0.0"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "7b68e0ffa5e4d61ae97a4b020f9690ee7b08d5da"
|
|
55
55
|
}
|