@salesforce/source-deploy-retrieve 12.31.15 → 12.31.16
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/lib/src/registry/metadataRegistry.json +9 -0
- package/lib/src/resolve/adapters/webApplicationValidation.d.ts +38 -0
- package/lib/src/resolve/adapters/webApplicationValidation.js +460 -0
- package/lib/src/resolve/adapters/webApplicationValidation.js.map +1 -0
- package/lib/src/resolve/adapters/webApplicationsSourceAdapter.d.ts +5 -0
- package/lib/src/resolve/adapters/webApplicationsSourceAdapter.js +22 -13
- package/lib/src/resolve/adapters/webApplicationsSourceAdapter.js.map +1 -1
- package/lib/src/utils/filePathGenerator.js +2 -4
- package/lib/src/utils/filePathGenerator.js.map +1 -1
- package/messages/webApplicationValidation.md +103 -0
- package/package.json +2 -2
|
@@ -570,6 +570,7 @@
|
|
|
570
570
|
"dataMapperDefinition": "datamapperdefinition",
|
|
571
571
|
"integrationProcdDefinition": "integrationprocddefinition",
|
|
572
572
|
"omniscriptDefinition": "omniscriptdefinition",
|
|
573
|
+
"procedurePlanDefinition": "procedureplandefinition",
|
|
573
574
|
"computeExtension": "computeextension",
|
|
574
575
|
"dataObjectSearchIndexConf": "dataobjectsearchindexconf",
|
|
575
576
|
"lightningOutApp": "lightningoutapp",
|
|
@@ -5132,6 +5133,14 @@
|
|
|
5132
5133
|
"inFolder": false,
|
|
5133
5134
|
"strictDirectoryName": false
|
|
5134
5135
|
},
|
|
5136
|
+
"procedureplandefinition": {
|
|
5137
|
+
"id": "procedureplandefinition",
|
|
5138
|
+
"name": "ProcedurePlanDefinition",
|
|
5139
|
+
"suffix": "procedurePlanDefinition",
|
|
5140
|
+
"directoryName": "procedurePlanDefinitions",
|
|
5141
|
+
"inFolder": false,
|
|
5142
|
+
"strictDirectoryName": false
|
|
5143
|
+
},
|
|
5135
5144
|
"flexcarddefinition": {
|
|
5136
5145
|
"id": "flexcarddefinition",
|
|
5137
5146
|
"name": "FlexcardDefinition",
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { TreeContainer } from '../treeContainers';
|
|
2
|
+
import { SourcePath } from '../../common/types';
|
|
3
|
+
type TrailingSlash = 'always' | 'never' | 'auto';
|
|
4
|
+
type RedirectStatusCode = 301 | 302 | 307 | 308;
|
|
5
|
+
export type WebApplicationRewrite = {
|
|
6
|
+
route?: string;
|
|
7
|
+
rewrite?: string;
|
|
8
|
+
};
|
|
9
|
+
export type WebApplicationRedirect = {
|
|
10
|
+
route?: string;
|
|
11
|
+
redirect?: string;
|
|
12
|
+
statusCode?: RedirectStatusCode;
|
|
13
|
+
};
|
|
14
|
+
export type WebApplicationHeaderKeyValue = {
|
|
15
|
+
key?: string;
|
|
16
|
+
value?: string;
|
|
17
|
+
};
|
|
18
|
+
export type WebApplicationHeaderRule = {
|
|
19
|
+
source?: string;
|
|
20
|
+
headers?: WebApplicationHeaderKeyValue[];
|
|
21
|
+
};
|
|
22
|
+
export type WebApplicationRouting = {
|
|
23
|
+
rewrites?: WebApplicationRewrite[];
|
|
24
|
+
redirects?: WebApplicationRedirect[];
|
|
25
|
+
fallback?: string;
|
|
26
|
+
trailingSlash?: TrailingSlash;
|
|
27
|
+
fileBasedRouting?: boolean;
|
|
28
|
+
};
|
|
29
|
+
export type WebApplicationConfig = {
|
|
30
|
+
outputDir?: string;
|
|
31
|
+
routing?: WebApplicationRouting;
|
|
32
|
+
headers?: WebApplicationHeaderRule[];
|
|
33
|
+
};
|
|
34
|
+
/** Basic shape check — use after field-level validation to narrow the type. */
|
|
35
|
+
export declare function isWebApplicationConfig(value: unknown): value is WebApplicationConfig;
|
|
36
|
+
/** Validate webapplication.json contents. Checks structure first, then schema, then file existence. */
|
|
37
|
+
export declare function validateWebApplicationJson(raw: Buffer, descriptorPath: string, contentPath: SourcePath, tree: TreeContainer): void;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,460 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isWebApplicationConfig = isWebApplicationConfig;
|
|
4
|
+
exports.validateWebApplicationJson = validateWebApplicationJson;
|
|
5
|
+
/*
|
|
6
|
+
* Copyright 2026, Salesforce, Inc.
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*/
|
|
20
|
+
const node_path_1 = require("node:path");
|
|
21
|
+
const messages_1 = require("@salesforce/core/messages");
|
|
22
|
+
const sfError_1 = require("@salesforce/core/sfError");
|
|
23
|
+
;
|
|
24
|
+
const msgs = new messages_1.Messages('@salesforce/source-deploy-retrieve', 'webApplicationValidation', new Map([["webapp_empty_file", "webapplication.json must not be empty (%s)."], ["webapp_empty_file.actions", "Add at least one property, e.g. { \"outputDir\": \"dist\" }"], ["webapp_size_exceeded", "webapplication.json exceeds the maximum allowed size of %s KB (actual: %s KB)."], ["webapp_size_exceeded.actions", "Reduce the file size. The descriptor should only contain configuration, not static content."], ["webapp_whitespace_only", "webapplication.json must not be empty or contain only whitespace (%s)."], ["webapp_whitespace_only.actions", "Replace the whitespace with valid JSON, e.g. { \"outputDir\": \"dist\" }"], ["webapp_invalid_json", "webapplication.json is not valid JSON: %s"], ["webapp_invalid_json.actions", "Fix the JSON syntax in webapplication.json. Use a JSON validator to find the exact issue."], ["webapp_not_object", "webapplication.json must be a JSON object, but found %s."], ["webapp_not_object.actions", "Wrap the content in curly braces, e.g. { \"outputDir\": \"dist\" }"], ["webapp_empty_object", "webapplication.json must contain at least one property."], ["webapp_empty_object.actions", "Add a property: outputDir, routing, or headers."], ["webapp_unknown_props", "webapplication.json contains unknown %s: %s. Allowed: %s."], ["webapp_type_mismatch", "webapplication.json '%s' must be %s (received %s)."], ["webapp_empty_value", "webapplication.json '%s' must not be empty."], ["webapp_invalid_enum", "webapplication.json '%s' must be one of: %s (received \"%s\")."], ["webapp_min_items", "webapplication.json '%s' must contain at least one %s."], ["webapp_unknown_prop", "webapplication.json '%s' contains unknown property '%s'. Allowed: %s."], ["webapp_non_empty_string", "webapplication.json '%s' must be a non-empty string."], ["webapp_path_unsafe", "webapplication.json '%s' value \"%s\" contains %s. Config paths must use forward slashes."], ["webapp_path_traversal", "webapplication.json '%s' value \"%s\" resolves outside the application bundle. Path traversal is not allowed."], ["webapp_outputdir_is_root", "webapplication.json 'outputDir' value \"%s\" resolves to the bundle root. It must reference a subdirectory."], ["webapp_outputdir_is_root.actions", "Set outputDir to a subdirectory like \"dist\" or \"build\"."], ["webapp_dir_not_found", "webapplication.json 'outputDir' references \"%s\", but the directory does not exist at %s."], ["webapp_dir_empty", "webapplication.json 'outputDir' (\"%s\") exists but contains no files. It must contain at least one deployable file."], ["webapp_file_not_found", "webapplication.json '%s' references \"%s\", but the file does not exist at %s."]]));
|
|
25
|
+
/** Basic shape check — use after field-level validation to narrow the type. */
|
|
26
|
+
function isWebApplicationConfig(value) {
|
|
27
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
28
|
+
}
|
|
29
|
+
// Keep in sync with server-side validation (WebApplicationFileProcessor.java).
|
|
30
|
+
const ALLOWED_TOP_LEVEL = new Set(['outputDir', 'routing', 'headers']);
|
|
31
|
+
const ROUTING_ALLOWED = new Set(['rewrites', 'redirects', 'fallback', 'trailingSlash', 'fileBasedRouting']);
|
|
32
|
+
const TRAILING_SLASH_VALUES = new Set(['always', 'never', 'auto']);
|
|
33
|
+
const REDIRECT_STATUS_CODES = new Set([301, 302, 307, 308]);
|
|
34
|
+
const MAX_RECURSION_DEPTH = 20;
|
|
35
|
+
const MAX_WEBAPPLICATION_JSON_BYTES = 102_400; // 100 KB
|
|
36
|
+
// Matches ".." as a standalone path segment.
|
|
37
|
+
const DOT_DOT_SEGMENT = /(?:^|[/\\])\.\.[/\\]|(?:^|[/\\])\.\.$/;
|
|
38
|
+
/** Strip leading separators so "/index.html" resolves relative to outputDir. */
|
|
39
|
+
function stripLeadingSep(p) {
|
|
40
|
+
return p.replace(new RegExp(`^[${node_path_1.sep.replace(/\\/g, '\\\\')}/]+`), '');
|
|
41
|
+
}
|
|
42
|
+
/** Returns a reason string if the path contains unsafe patterns, undefined otherwise. */
|
|
43
|
+
function containsPathTraversal(value) {
|
|
44
|
+
if (DOT_DOT_SEGMENT.test(value)) {
|
|
45
|
+
return 'path traversal (..)';
|
|
46
|
+
}
|
|
47
|
+
if (value === '..') {
|
|
48
|
+
return 'path traversal (..)';
|
|
49
|
+
}
|
|
50
|
+
if (value.startsWith('/') || value.startsWith('\\')) {
|
|
51
|
+
return 'absolute path';
|
|
52
|
+
}
|
|
53
|
+
if (value.includes('\0')) {
|
|
54
|
+
return 'null byte';
|
|
55
|
+
}
|
|
56
|
+
for (let i = 0; i < value.length; i++) {
|
|
57
|
+
if (value.charCodeAt(i) < 0x20) {
|
|
58
|
+
return 'control character';
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
if (value.includes('*') || value.includes('?')) {
|
|
62
|
+
return 'glob wildcard';
|
|
63
|
+
}
|
|
64
|
+
if (value.includes('\\')) {
|
|
65
|
+
return 'backslash (use forward slashes)';
|
|
66
|
+
}
|
|
67
|
+
if (value.includes('%')) {
|
|
68
|
+
return 'percent-encoding';
|
|
69
|
+
}
|
|
70
|
+
return undefined;
|
|
71
|
+
}
|
|
72
|
+
/** Throws if the path looks unsafe (traversal, absolute, special chars, etc.). */
|
|
73
|
+
function assertSafePath(value, configKey) {
|
|
74
|
+
const reason = containsPathTraversal(value);
|
|
75
|
+
if (reason) {
|
|
76
|
+
throw createConfigError(msgs.getMessage('webapp_path_unsafe', [configKey, value, reason]), [
|
|
77
|
+
`Fix "${value}": use relative paths with forward slashes only, no special characters.`,
|
|
78
|
+
]);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
/** Like typeof, but returns "null" or "array" when appropriate. */
|
|
82
|
+
function describeType(value) {
|
|
83
|
+
if (value === null) {
|
|
84
|
+
return 'null';
|
|
85
|
+
}
|
|
86
|
+
if (Array.isArray(value)) {
|
|
87
|
+
return 'array';
|
|
88
|
+
}
|
|
89
|
+
return typeof value;
|
|
90
|
+
}
|
|
91
|
+
function createConfigError(message, actions) {
|
|
92
|
+
return new sfError_1.SfError(message, 'InvalidWebApplicationConfigError', actions);
|
|
93
|
+
}
|
|
94
|
+
function createFileError(message, actions) {
|
|
95
|
+
return new sfError_1.SfError(message, 'ExpectedSourceFilesError', actions);
|
|
96
|
+
}
|
|
97
|
+
/** Validate webapplication.json contents. Checks structure first, then schema, then file existence. */
|
|
98
|
+
function validateWebApplicationJson(raw, descriptorPath, contentPath, tree) {
|
|
99
|
+
if (!raw || raw.length === 0) {
|
|
100
|
+
throw createConfigError(msgs.getMessage('webapp_empty_file', [descriptorPath]), [
|
|
101
|
+
msgs.getMessage('webapp_empty_file.actions'),
|
|
102
|
+
]);
|
|
103
|
+
}
|
|
104
|
+
if (raw.length > MAX_WEBAPPLICATION_JSON_BYTES) {
|
|
105
|
+
throw createConfigError(msgs.getMessage('webapp_size_exceeded', [
|
|
106
|
+
String(MAX_WEBAPPLICATION_JSON_BYTES / 1024),
|
|
107
|
+
(raw.length / 1024).toFixed(1),
|
|
108
|
+
]), [msgs.getMessage('webapp_size_exceeded.actions')]);
|
|
109
|
+
}
|
|
110
|
+
const trimmed = raw.toString('utf8').trim();
|
|
111
|
+
if (trimmed.length === 0) {
|
|
112
|
+
throw createConfigError(msgs.getMessage('webapp_whitespace_only', [descriptorPath]), [
|
|
113
|
+
msgs.getMessage('webapp_whitespace_only.actions'),
|
|
114
|
+
]);
|
|
115
|
+
}
|
|
116
|
+
let config;
|
|
117
|
+
try {
|
|
118
|
+
config = JSON.parse(trimmed);
|
|
119
|
+
}
|
|
120
|
+
catch (e) {
|
|
121
|
+
const detail = e instanceof Error ? e.message : String(e);
|
|
122
|
+
throw createConfigError(msgs.getMessage('webapp_invalid_json', [detail]), [
|
|
123
|
+
msgs.getMessage('webapp_invalid_json.actions'),
|
|
124
|
+
]);
|
|
125
|
+
}
|
|
126
|
+
if (!isWebApplicationConfig(config)) {
|
|
127
|
+
throw createConfigError(msgs.getMessage('webapp_not_object', [describeType(config)]), [
|
|
128
|
+
msgs.getMessage('webapp_not_object.actions'),
|
|
129
|
+
]);
|
|
130
|
+
}
|
|
131
|
+
const rawObj = config;
|
|
132
|
+
const keys = Object.keys(rawObj);
|
|
133
|
+
if (keys.length === 0) {
|
|
134
|
+
throw createConfigError(msgs.getMessage('webapp_empty_object'), [msgs.getMessage('webapp_empty_object.actions')]);
|
|
135
|
+
}
|
|
136
|
+
// Report all unknown properties at once.
|
|
137
|
+
const disallowed = keys.filter((k) => !ALLOWED_TOP_LEVEL.has(k));
|
|
138
|
+
if (disallowed.length > 0) {
|
|
139
|
+
const list = disallowed.map((k) => `'${k}'`).join(', ');
|
|
140
|
+
const word = disallowed.length === 1 ? 'property' : 'properties';
|
|
141
|
+
throw createConfigError(msgs.getMessage('webapp_unknown_props', [word, list, 'outputDir, routing, headers']), [
|
|
142
|
+
`Remove ${list} from webapplication.json.`,
|
|
143
|
+
]);
|
|
144
|
+
}
|
|
145
|
+
const outputDir = rawObj.outputDir !== undefined ? validateOutputDir(rawObj.outputDir) : undefined;
|
|
146
|
+
if (rawObj.routing !== undefined) {
|
|
147
|
+
validateRouting(rawObj.routing);
|
|
148
|
+
}
|
|
149
|
+
if (rawObj.headers !== undefined) {
|
|
150
|
+
validateHeaders(rawObj.headers);
|
|
151
|
+
}
|
|
152
|
+
// Safe to cast after field-level checks pass.
|
|
153
|
+
const obj = rawObj;
|
|
154
|
+
if (outputDir ?? obj.routing) {
|
|
155
|
+
validateFileExistence(obj, outputDir, contentPath, tree);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
function validateOutputDir(value) {
|
|
159
|
+
if (typeof value !== 'string') {
|
|
160
|
+
throw createConfigError(msgs.getMessage('webapp_type_mismatch', ['outputDir', 'a string', describeType(value)]), [
|
|
161
|
+
'Set outputDir to a directory path like "dist" or "build".',
|
|
162
|
+
]);
|
|
163
|
+
}
|
|
164
|
+
if (value.length === 0) {
|
|
165
|
+
throw createConfigError(msgs.getMessage('webapp_empty_value', ['outputDir']), [
|
|
166
|
+
'Provide a directory name, e.g. "dist".',
|
|
167
|
+
]);
|
|
168
|
+
}
|
|
169
|
+
assertSafePath(value, 'outputDir');
|
|
170
|
+
return value;
|
|
171
|
+
}
|
|
172
|
+
function validateRouting(value) {
|
|
173
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value)) {
|
|
174
|
+
throw createConfigError(msgs.getMessage('webapp_type_mismatch', ['routing', 'an object', describeType(value)]), [
|
|
175
|
+
'Set routing to an object, e.g. { "trailingSlash": "auto" }.',
|
|
176
|
+
]);
|
|
177
|
+
}
|
|
178
|
+
const routing = value;
|
|
179
|
+
const routingKeys = Object.keys(routing);
|
|
180
|
+
if (routingKeys.length === 0) {
|
|
181
|
+
throw createConfigError(msgs.getMessage('webapp_min_items', ['routing', 'property']), [
|
|
182
|
+
'Add a routing property: rewrites, redirects, fallback, trailingSlash, or fileBasedRouting.',
|
|
183
|
+
]);
|
|
184
|
+
}
|
|
185
|
+
const unknownRouting = routingKeys.filter((k) => !ROUTING_ALLOWED.has(k));
|
|
186
|
+
if (unknownRouting.length > 0) {
|
|
187
|
+
const list = unknownRouting.map((k) => `'${k}'`).join(', ');
|
|
188
|
+
const word = unknownRouting.length === 1 ? 'property' : 'properties';
|
|
189
|
+
throw createConfigError(msgs.getMessage('webapp_unknown_props', [
|
|
190
|
+
word,
|
|
191
|
+
list,
|
|
192
|
+
'rewrites, redirects, fallback, trailingSlash, fileBasedRouting',
|
|
193
|
+
]), [`Remove ${list} from routing.`]);
|
|
194
|
+
}
|
|
195
|
+
if (routing.trailingSlash !== undefined) {
|
|
196
|
+
validateTrailingSlash(routing.trailingSlash);
|
|
197
|
+
}
|
|
198
|
+
if (routing.fileBasedRouting !== undefined && typeof routing.fileBasedRouting !== 'boolean') {
|
|
199
|
+
throw createConfigError(msgs.getMessage('webapp_type_mismatch', [
|
|
200
|
+
'routing.fileBasedRouting',
|
|
201
|
+
'a boolean',
|
|
202
|
+
describeType(routing.fileBasedRouting),
|
|
203
|
+
]));
|
|
204
|
+
}
|
|
205
|
+
if (routing.fallback !== undefined) {
|
|
206
|
+
validateFallback(routing.fallback);
|
|
207
|
+
}
|
|
208
|
+
if (routing.rewrites !== undefined) {
|
|
209
|
+
validateRewritesList(routing.rewrites);
|
|
210
|
+
}
|
|
211
|
+
if (routing.redirects !== undefined) {
|
|
212
|
+
validateRedirectsList(routing.redirects);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
function validateTrailingSlash(value) {
|
|
216
|
+
if (typeof value !== 'string') {
|
|
217
|
+
throw createConfigError(msgs.getMessage('webapp_type_mismatch', ['routing.trailingSlash', 'a string', describeType(value)]));
|
|
218
|
+
}
|
|
219
|
+
if (!TRAILING_SLASH_VALUES.has(value)) {
|
|
220
|
+
throw createConfigError(msgs.getMessage('webapp_invalid_enum', ['routing.trailingSlash', 'always, never, auto', value]));
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
function validateFallback(value) {
|
|
224
|
+
if (typeof value !== 'string') {
|
|
225
|
+
throw createConfigError(msgs.getMessage('webapp_type_mismatch', ['routing.fallback', 'a string', describeType(value)]));
|
|
226
|
+
}
|
|
227
|
+
if (value.length === 0) {
|
|
228
|
+
throw createConfigError(msgs.getMessage('webapp_empty_value', ['routing.fallback']), [
|
|
229
|
+
'Provide a file path like "index.html".',
|
|
230
|
+
]);
|
|
231
|
+
}
|
|
232
|
+
assertSafePath(value, 'routing.fallback');
|
|
233
|
+
}
|
|
234
|
+
function validateRewritesList(value) {
|
|
235
|
+
if (!Array.isArray(value)) {
|
|
236
|
+
throw createConfigError(msgs.getMessage('webapp_type_mismatch', ['routing.rewrites', 'an array', describeType(value)]));
|
|
237
|
+
}
|
|
238
|
+
if (value.length === 0) {
|
|
239
|
+
throw createConfigError(msgs.getMessage('webapp_min_items', ['routing.rewrites', 'item']), [
|
|
240
|
+
'Add a rewrite entry or remove the empty rewrites array.',
|
|
241
|
+
]);
|
|
242
|
+
}
|
|
243
|
+
for (let i = 0; i < value.length; i++) {
|
|
244
|
+
validateRewriteItem(value[i], i);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
function validateRedirectsList(value) {
|
|
248
|
+
if (!Array.isArray(value)) {
|
|
249
|
+
throw createConfigError(msgs.getMessage('webapp_type_mismatch', ['routing.redirects', 'an array', describeType(value)]));
|
|
250
|
+
}
|
|
251
|
+
if (value.length === 0) {
|
|
252
|
+
throw createConfigError(msgs.getMessage('webapp_min_items', ['routing.redirects', 'item']), [
|
|
253
|
+
'Add a redirect entry or remove the empty redirects array.',
|
|
254
|
+
]);
|
|
255
|
+
}
|
|
256
|
+
for (let i = 0; i < value.length; i++) {
|
|
257
|
+
validateRedirectItem(value[i], i);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
function validateHeaders(value) {
|
|
261
|
+
if (!Array.isArray(value)) {
|
|
262
|
+
throw createConfigError(msgs.getMessage('webapp_type_mismatch', ['headers', 'an array', describeType(value)]));
|
|
263
|
+
}
|
|
264
|
+
if (value.length === 0) {
|
|
265
|
+
throw createConfigError(msgs.getMessage('webapp_min_items', ['headers', 'item']), [
|
|
266
|
+
'Add a header entry or remove the empty headers array.',
|
|
267
|
+
]);
|
|
268
|
+
}
|
|
269
|
+
for (let i = 0; i < value.length; i++) {
|
|
270
|
+
validateHeaderItem(value[i], i);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
function validateRewriteItem(item, i) {
|
|
274
|
+
const key = `routing.rewrites[${i}]`;
|
|
275
|
+
if (typeof item !== 'object' || item === null || Array.isArray(item)) {
|
|
276
|
+
throw createConfigError(msgs.getMessage('webapp_type_mismatch', [key, 'an object', describeType(item)]));
|
|
277
|
+
}
|
|
278
|
+
const obj = item;
|
|
279
|
+
if (Object.keys(obj).length === 0) {
|
|
280
|
+
throw createConfigError(msgs.getMessage('webapp_min_items', [key, 'property']), [
|
|
281
|
+
'Add route and/or rewrite to this entry.',
|
|
282
|
+
]);
|
|
283
|
+
}
|
|
284
|
+
const unknown = Object.keys(obj).filter((k) => k !== 'route' && k !== 'rewrite');
|
|
285
|
+
if (unknown.length > 0) {
|
|
286
|
+
throw createConfigError(msgs.getMessage('webapp_unknown_prop', [key, unknown[0], 'route, rewrite']));
|
|
287
|
+
}
|
|
288
|
+
if (obj.route !== undefined && (typeof obj.route !== 'string' || obj.route.length === 0)) {
|
|
289
|
+
throw createConfigError(msgs.getMessage('webapp_non_empty_string', [`${key}.route`]));
|
|
290
|
+
}
|
|
291
|
+
if (obj.rewrite !== undefined) {
|
|
292
|
+
if (typeof obj.rewrite !== 'string' || obj.rewrite.length === 0) {
|
|
293
|
+
throw createConfigError(msgs.getMessage('webapp_non_empty_string', [`${key}.rewrite`]));
|
|
294
|
+
}
|
|
295
|
+
assertSafePath(obj.rewrite, `${key}.rewrite`);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
function validateRedirectItem(item, i) {
|
|
299
|
+
const key = `routing.redirects[${i}]`;
|
|
300
|
+
if (typeof item !== 'object' || item === null || Array.isArray(item)) {
|
|
301
|
+
throw createConfigError(msgs.getMessage('webapp_type_mismatch', [key, 'an object', describeType(item)]));
|
|
302
|
+
}
|
|
303
|
+
const obj = item;
|
|
304
|
+
if (Object.keys(obj).length === 0) {
|
|
305
|
+
throw createConfigError(msgs.getMessage('webapp_min_items', [key, 'property']), [
|
|
306
|
+
'Add route, redirect, and/or statusCode to this entry.',
|
|
307
|
+
]);
|
|
308
|
+
}
|
|
309
|
+
const unknown = Object.keys(obj).filter((k) => k !== 'route' && k !== 'redirect' && k !== 'statusCode');
|
|
310
|
+
if (unknown.length > 0) {
|
|
311
|
+
throw createConfigError(msgs.getMessage('webapp_unknown_prop', [key, unknown[0], 'route, redirect, statusCode']));
|
|
312
|
+
}
|
|
313
|
+
if (obj.route !== undefined && (typeof obj.route !== 'string' || obj.route.length === 0)) {
|
|
314
|
+
throw createConfigError(msgs.getMessage('webapp_non_empty_string', [`${key}.route`]));
|
|
315
|
+
}
|
|
316
|
+
if (obj.redirect !== undefined && (typeof obj.redirect !== 'string' || obj.redirect.length === 0)) {
|
|
317
|
+
throw createConfigError(msgs.getMessage('webapp_non_empty_string', [`${key}.redirect`]));
|
|
318
|
+
}
|
|
319
|
+
if (obj.statusCode !== undefined) {
|
|
320
|
+
if (!Number.isInteger(obj.statusCode) || !REDIRECT_STATUS_CODES.has(obj.statusCode)) {
|
|
321
|
+
throw createConfigError(msgs.getMessage('webapp_invalid_enum', [
|
|
322
|
+
`${key}.statusCode`,
|
|
323
|
+
'301, 302, 307, 308',
|
|
324
|
+
JSON.stringify(obj.statusCode),
|
|
325
|
+
]));
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
function validateHeaderItem(item, i) {
|
|
330
|
+
const key = `headers[${i}]`;
|
|
331
|
+
if (typeof item !== 'object' || item === null || Array.isArray(item)) {
|
|
332
|
+
throw createConfigError(msgs.getMessage('webapp_type_mismatch', [key, 'an object', describeType(item)]));
|
|
333
|
+
}
|
|
334
|
+
const obj = item;
|
|
335
|
+
if (Object.keys(obj).length === 0) {
|
|
336
|
+
throw createConfigError(msgs.getMessage('webapp_min_items', [key, 'property']), [
|
|
337
|
+
'Add source and/or headers to this entry.',
|
|
338
|
+
]);
|
|
339
|
+
}
|
|
340
|
+
const unknown = Object.keys(obj).filter((k) => k !== 'source' && k !== 'headers');
|
|
341
|
+
if (unknown.length > 0) {
|
|
342
|
+
throw createConfigError(msgs.getMessage('webapp_unknown_prop', [key, unknown[0], 'source, headers']));
|
|
343
|
+
}
|
|
344
|
+
if (obj.source !== undefined && (typeof obj.source !== 'string' || obj.source.length === 0)) {
|
|
345
|
+
throw createConfigError(msgs.getMessage('webapp_non_empty_string', [`${key}.source`]));
|
|
346
|
+
}
|
|
347
|
+
if (obj.headers !== undefined) {
|
|
348
|
+
if (!Array.isArray(obj.headers)) {
|
|
349
|
+
throw createConfigError(msgs.getMessage('webapp_type_mismatch', [`${key}.headers`, 'an array', describeType(obj.headers)]));
|
|
350
|
+
}
|
|
351
|
+
if (obj.headers.length === 0) {
|
|
352
|
+
throw createConfigError(msgs.getMessage('webapp_min_items', [`${key}.headers`, 'item']), [
|
|
353
|
+
'Add a { "key": "...", "value": "..." } entry or remove the empty array.',
|
|
354
|
+
]);
|
|
355
|
+
}
|
|
356
|
+
for (let j = 0; j < obj.headers.length; j++) {
|
|
357
|
+
validateHeaderKeyValue(obj.headers[j], i, j);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
function validateHeaderKeyValue(item, i, j) {
|
|
362
|
+
const key = `headers[${i}].headers[${j}]`;
|
|
363
|
+
if (typeof item !== 'object' || item === null || Array.isArray(item)) {
|
|
364
|
+
throw createConfigError(msgs.getMessage('webapp_type_mismatch', [key, 'an object', describeType(item)]));
|
|
365
|
+
}
|
|
366
|
+
const obj = item;
|
|
367
|
+
if (Object.keys(obj).length === 0) {
|
|
368
|
+
throw createConfigError(msgs.getMessage('webapp_min_items', [key, 'property']), [
|
|
369
|
+
'Add key and/or value to this header entry.',
|
|
370
|
+
]);
|
|
371
|
+
}
|
|
372
|
+
const unknown = Object.keys(obj).filter((k) => k !== 'key' && k !== 'value');
|
|
373
|
+
if (unknown.length > 0) {
|
|
374
|
+
throw createConfigError(msgs.getMessage('webapp_unknown_prop', [key, unknown[0], 'key, value']));
|
|
375
|
+
}
|
|
376
|
+
if (obj.key !== undefined && (typeof obj.key !== 'string' || obj.key.length === 0)) {
|
|
377
|
+
throw createConfigError(msgs.getMessage('webapp_non_empty_string', [`${key}.key`]));
|
|
378
|
+
}
|
|
379
|
+
if (obj.value !== undefined && (typeof obj.value !== 'string' || obj.value.length === 0)) {
|
|
380
|
+
throw createConfigError(msgs.getMessage('webapp_non_empty_string', [`${key}.value`]));
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
/** Throws if the resolved path lands outside the parent directory. */
|
|
384
|
+
function assertNoTraversal(resolvedPath, parentDir, configKey, rawValue) {
|
|
385
|
+
const normalizedResolved = (0, node_path_1.resolve)(resolvedPath);
|
|
386
|
+
const normalizedParent = (0, node_path_1.resolve)(parentDir) + node_path_1.sep;
|
|
387
|
+
if (!normalizedResolved.startsWith(normalizedParent) && normalizedResolved !== (0, node_path_1.resolve)(parentDir)) {
|
|
388
|
+
throw createConfigError(msgs.getMessage('webapp_path_traversal', [configKey, rawValue]), [
|
|
389
|
+
`Remove ".." segments from "${rawValue}". Paths must stay within the bundle directory.`,
|
|
390
|
+
]);
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
/** Verify that referenced paths (outputDir, fallback, rewrite targets) actually exist. */
|
|
394
|
+
function validateFileExistence(obj, outputDir, contentPath, tree) {
|
|
395
|
+
let basePath = contentPath;
|
|
396
|
+
if (outputDir) {
|
|
397
|
+
const outputDirPath = (0, node_path_1.join)(contentPath, outputDir);
|
|
398
|
+
assertNoTraversal(outputDirPath, contentPath, 'outputDir', outputDir);
|
|
399
|
+
if ((0, node_path_1.resolve)(outputDirPath) === (0, node_path_1.resolve)(contentPath)) {
|
|
400
|
+
throw createConfigError(msgs.getMessage('webapp_outputdir_is_root', [outputDir]), [
|
|
401
|
+
msgs.getMessage('webapp_outputdir_is_root.actions'),
|
|
402
|
+
]);
|
|
403
|
+
}
|
|
404
|
+
if (!tree.exists(outputDirPath) || !tree.isDirectory(outputDirPath)) {
|
|
405
|
+
throw createFileError(msgs.getMessage('webapp_dir_not_found', [outputDir, outputDirPath]), [
|
|
406
|
+
`Create the directory "${outputDir}" in your web application bundle, or change outputDir to an existing directory.`,
|
|
407
|
+
]);
|
|
408
|
+
}
|
|
409
|
+
const hasFileUnder = (dirPath, depth = 0) => {
|
|
410
|
+
if (depth >= MAX_RECURSION_DEPTH) {
|
|
411
|
+
return false;
|
|
412
|
+
}
|
|
413
|
+
const entries = tree.readDirectory(dirPath);
|
|
414
|
+
for (const entry of entries) {
|
|
415
|
+
const fullPath = (0, node_path_1.join)(dirPath, entry);
|
|
416
|
+
if (tree.exists(fullPath)) {
|
|
417
|
+
if (tree.isDirectory(fullPath)) {
|
|
418
|
+
if (hasFileUnder(fullPath, depth + 1)) {
|
|
419
|
+
return true;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
else {
|
|
423
|
+
return true;
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
return false;
|
|
428
|
+
};
|
|
429
|
+
if (!hasFileUnder(outputDirPath)) {
|
|
430
|
+
throw createFileError(msgs.getMessage('webapp_dir_empty', [outputDir]), [
|
|
431
|
+
`Add files to "${outputDir}", e.g. an index.html.`,
|
|
432
|
+
]);
|
|
433
|
+
}
|
|
434
|
+
basePath = outputDirPath;
|
|
435
|
+
}
|
|
436
|
+
const baseLabel = outputDir ?? 'bundle root';
|
|
437
|
+
const { routing } = obj;
|
|
438
|
+
if (routing?.fallback) {
|
|
439
|
+
const stripped = stripLeadingSep(routing.fallback);
|
|
440
|
+
const fallbackPath = (0, node_path_1.join)(basePath, stripped);
|
|
441
|
+
assertNoTraversal(fallbackPath, basePath, 'routing.fallback', routing.fallback);
|
|
442
|
+
if (!tree.exists(fallbackPath)) {
|
|
443
|
+
throw createFileError(msgs.getMessage('webapp_file_not_found', ['routing.fallback', routing.fallback, fallbackPath]), [`Create the file "${stripped}" inside "${baseLabel}", or update the fallback path.`]);
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
if (routing?.rewrites) {
|
|
447
|
+
for (let i = 0; i < routing.rewrites.length; i++) {
|
|
448
|
+
const target = routing.rewrites[i].rewrite;
|
|
449
|
+
if (target) {
|
|
450
|
+
const stripped = stripLeadingSep(target);
|
|
451
|
+
const rewritePath = (0, node_path_1.join)(basePath, stripped);
|
|
452
|
+
assertNoTraversal(rewritePath, basePath, `routing.rewrites[${i}].rewrite`, target);
|
|
453
|
+
if (!tree.exists(rewritePath)) {
|
|
454
|
+
throw createFileError(msgs.getMessage('webapp_file_not_found', [`routing.rewrites[${i}].rewrite`, target, rewritePath]), [`Create the file "${stripped}" inside "${baseLabel}", or update the rewrite path.`]);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
//# sourceMappingURL=webApplicationValidation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webApplicationValidation.js","sourceRoot":"","sources":["../../../../src/resolve/adapters/webApplicationValidation.ts"],"names":[],"mappings":";;AAiEA,wDAEC;AA+ED,gEA8EC;AAhOD;;;;;;;;;;;;;;GAcG;AACH,yCAA+C;AAC/C,wDAAqD;AACrD,sDAAmD;;AAKnD,MAAM,IAAI,OAAG,mBAAQ,CAAc,oCAAoC,EAAE,0BAA0B,6kFAAC,CAAC;AA0CrG,+EAA+E;AAC/E,SAAgB,sBAAsB,CAAC,KAAc;IACnD,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,+EAA+E;AAC/E,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;AACvE,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,eAAe,EAAE,kBA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,WAAW,CAAC,CAAC,EACjG,CAAC,oBAAoB,QAAQ,aAAa,SAAS,gCAAgC,CAAC,CACrF,CAAC;gBACJ,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { SourcePath } from '../../common/types';
|
|
2
2
|
import { SourceComponent } from '../sourceComponent';
|
|
3
3
|
import { BundleSourceAdapter } from './bundleSourceAdapter';
|
|
4
|
+
/**
|
|
5
|
+
* Source adapter for WebApplication bundles.
|
|
6
|
+
*
|
|
7
|
+
* webapplication.json is optional; validated on deploy, skipped on retrieve.
|
|
8
|
+
*/
|
|
4
9
|
export declare class WebApplicationsSourceAdapter extends BundleSourceAdapter {
|
|
5
10
|
protected populate(trigger: SourcePath, component?: SourceComponent, isResolvingSource?: boolean): SourceComponent | undefined;
|
|
6
11
|
}
|
|
@@ -22,11 +22,15 @@ const sfError_1 = require("@salesforce/core/sfError");
|
|
|
22
22
|
const sourceComponent_1 = require("../sourceComponent");
|
|
23
23
|
const path_1 = require("../../utils/path");
|
|
24
24
|
const bundleSourceAdapter_1 = require("./bundleSourceAdapter");
|
|
25
|
+
const webApplicationValidation_1 = require("./webApplicationValidation");
|
|
25
26
|
;
|
|
26
27
|
const messages = new messages_1.Messages('@salesforce/source-deploy-retrieve', 'sdr', new Map([["md_request_fail", "Metadata API request failed: %s"], ["error_retry_limit_exceeded", "Exceeded maximum of %s consecutive retryable errors. Last error: %s"], ["error_could_not_infer_type", "%s: Could not infer a metadata type"], ["error_unexpected_child_type", "Unexpected child metadata [%s] found for parent type [%s]"], ["noParent", "Could not find parent type for %s (%s)"], ["error_expected_source_files", "%s: Expected source files for type '%s'"], ["error_failed_convert", "Component conversion failed: %s"], ["error_invalid_test_level", "TestLevel cannot be '%s' unless API version is %s or later"], ["error_merge_metadata_target_unsupported", "Merge convert for metadata target format currently unsupported"], ["error_missing_adapter", "Missing adapter '%s' for metadata type '%s'"], ["error_missing_transformer", "Missing transformer '%s' for metadata type '%s'"], ["error_missing_type_definition", "Missing metadata type definition in registry for id '%s'."], ["error_missing_child_type_definition", "Type %s does not have a child type definition %s."], ["noChildTypes", "No child types found in registry for %s (reading %s at %s)"], ["error_no_metadata_xml_ignore", "Metadata xml file %s is forceignored but is required for %s."], ["noSourceIgnore", "%s metadata types require source files, but %s is forceignored."], ["noSourceIgnore.actions", "- Metadata types with content are composed of two files: a content file (ie MyApexClass.cls) and a -meta.xml file (i.e MyApexClass.cls-meta.xml). You must include both files in your .forceignore file. Or try appending \u201C\\*\u201D to your existing .forceignore entry.\n\nSee <https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm> for examples"], ["error_path_not_found", "%s: File or folder not found"], ["noContentFound", "SourceComponent %s (metadata type = %s) is missing its content file."], ["noContentFound.actions", ["Ensure the content file exists in the expected location.", "If the content file is in your .forceignore file, ensure the meta-xml file is also ignored to completely exclude it."]], ["error_parsing_xml", "SourceComponent %s (metadata type = %s) does not have an associated metadata xml to parse"], ["error_expected_file_path", "%s: path is to a directory, expected a file"], ["error_expected_directory_path", "%s: path is to a file, expected a directory"], ["error_directory_not_found_or_not_directory", "%s: path is not a directory"], ["error_no_directory_stream", "%s doesn't support readable streams on directories."], ["error_no_source_to_deploy", "No source-backed components present in the package."], ["error_no_components_to_retrieve", "No components in the package to retrieve."], ["error_static_resource_expected_archive_type", "A StaticResource directory must have a content type of application/zip or application/jar - found %s for %s."], ["error_static_resource_missing_resource_file", "A StaticResource must have an associated .resource file, missing %s.resource-meta.xml"], ["error_no_job_id", "The %s operation is missing a job ID. Initialize an operation with an ID, or start a new job."], ["missingApiVersion", "Could not determine an API version to use for the generated manifest. Tried looking for sourceApiVersion in sfdx-project.json, apiVersion from config vars, and the highest apiVersion from the APEX REST endpoint. Using API version 58.0 as a last resort."], ["invalid_xml_parsing", "error parsing %s due to:\\n message: %s\\n line: %s\\n code: %s"], ["zipBufferError", "Zip buffer was not created during conversion"], ["undefinedComponentSet", "Unable to construct a componentSet. Check the logs for more information."], ["replacementsFileNotRead", "The file \"%s\" specified in the \"replacements\" property of sfdx-project.json could not be read."], ["unsupportedBundleType", "Unsupported Bundle Type: %s"], ["filePathGeneratorNoTypeSupport", "Type not supported for filepath generation: %s"], ["missingFolderType", "The registry has %s as is inFolder but it does not have a folderType"], ["tooManyFiles", "Multiple files found for path: %s."], ["cantGetName", "Unable to calculate fullName from path: %s (%s)"], ["missingMetaFileSuffix", "The metadata registry is configured incorrectly for %s. Expected a metaFileSuffix."], ["uniqueIdElementNotInRegistry", "No uniqueIdElement found in registry for %s (reading %s at %s)."], ["uniqueIdElementNotInChild", "The uniqueIdElement %s was not found the child (reading %s at %s)."], ["suggest_type_header", "A metadata type lookup for \"%s\" found the following close matches:"], ["suggest_type_did_you_mean", "-- Did you mean \".%s%s\" instead for the \"%s\" metadata type?"], ["suggest_type_more_suggestions", "Additional suggestions:\nConfirm the file name, extension, and directory names are correct. Validate against the registry at:\n<https://github.com/forcedotcom/source-deploy-retrieve/blob/main/src/registry/metadataRegistry.json>\n\nIf the type is not listed in the registry, check that it has Metadata API support via the Metadata Coverage Report:\n<https://developer.salesforce.com/docs/metadata-coverage>\n\nIf the type is available via Metadata API but not in the registry\n\n- Open an issue <https://github.com/forcedotcom/cli/issues>\n- Add the type via PR. Instructions: <https://github.com/forcedotcom/source-deploy-retrieve/blob/main/contributing/metadata.md>"], ["type_name_suggestions", "Confirm the metadata type name is correct. Validate against the registry at:\n<https://github.com/forcedotcom/source-deploy-retrieve/blob/main/src/registry/metadataRegistry.json>\n\nIf the type is not listed in the registry, check that it has Metadata API support via the Metadata Coverage Report:\n<https://developer.salesforce.com/docs/metadata-coverage>\n\nIf the type is available via Metadata API but not in the registry\n\n- Open an issue <https://github.com/forcedotcom/cli/issues>\n- Add the type via PR. Instructions: <https://github.com/forcedotcom/source-deploy-retrieve/blob/main/contributing/metadata.md>"]]));
|
|
28
|
+
/**
|
|
29
|
+
* Source adapter for WebApplication bundles.
|
|
30
|
+
*
|
|
31
|
+
* webapplication.json is optional; validated on deploy, skipped on retrieve.
|
|
32
|
+
*/
|
|
27
33
|
class WebApplicationsSourceAdapter extends bundleSourceAdapter_1.BundleSourceAdapter {
|
|
28
|
-
// Enforces WebApplication bundle requirements for source/deploy while staying
|
|
29
|
-
// compatible with metadata-only retrievals.
|
|
30
34
|
populate(trigger, component, isResolvingSource = true) {
|
|
31
35
|
const source = super.populate(trigger, component);
|
|
32
36
|
if (!source?.content) {
|
|
@@ -38,6 +42,7 @@ class WebApplicationsSourceAdapter extends bundleSourceAdapter_1.BundleSourceAda
|
|
|
38
42
|
if (!this.tree.exists(expectedXmlPath)) {
|
|
39
43
|
throw new sfError_1.SfError(messages.getMessage('error_expected_source_files', [expectedXmlPath, this.type.name]), 'ExpectedSourceFilesError');
|
|
40
44
|
}
|
|
45
|
+
// Ensure the component always points at the canonical meta xml.
|
|
41
46
|
const resolvedSource = source.xml && source.xml === expectedXmlPath
|
|
42
47
|
? source
|
|
43
48
|
: new sourceComponent_1.SourceComponent({
|
|
@@ -48,19 +53,23 @@ class WebApplicationsSourceAdapter extends bundleSourceAdapter_1.BundleSourceAda
|
|
|
48
53
|
parent: source.parent,
|
|
49
54
|
parentType: source.parentType,
|
|
50
55
|
}, this.tree, this.forceIgnore);
|
|
56
|
+
// Only validate on deploy; skip on retrieve (ZipTreeContainer throws).
|
|
51
57
|
if (isResolvingSource) {
|
|
52
58
|
const descriptorPath = (0, node_path_1.join)(contentPath, 'webapplication.json');
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
59
|
+
const hasDescriptor = this.tree.exists(descriptorPath) && !this.forceIgnore.denies(descriptorPath);
|
|
60
|
+
if (hasDescriptor) {
|
|
61
|
+
try {
|
|
62
|
+
const raw = this.tree.readFileSync(descriptorPath);
|
|
63
|
+
(0, webApplicationValidation_1.validateWebApplicationJson)(raw, descriptorPath, contentPath, this.tree);
|
|
64
|
+
}
|
|
65
|
+
catch (e) {
|
|
66
|
+
if (e instanceof Error && e.message === 'Method not implemented') {
|
|
67
|
+
// ZipTreeContainer (retrieve path) — skip client-side validation
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
throw e;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
64
73
|
}
|
|
65
74
|
}
|
|
66
75
|
return resolvedSource;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webApplicationsSourceAdapter.js","sourceRoot":"","sources":["../../../../src/resolve/adapters/webApplicationsSourceAdapter.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,yCAAiC;AACjC,wDAAqD;AACrD,sDAAmD;AAEnD,wDAAqD;AACrD,2CAA4C;AAC5C,+DAA4D;;
|
|
1
|
+
{"version":3,"file":"webApplicationsSourceAdapter.js","sourceRoot":"","sources":["../../../../src/resolve/adapters/webApplicationsSourceAdapter.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,yCAAiC;AACjC,wDAAqD;AACrD,sDAAmD;AAEnD,wDAAqD;AACrD,2CAA4C;AAC5C,+DAA4D;AAC5D,yEAAwE;;AAGxE,MAAM,QAAQ,OAAG,mBAAQ,CAAc,oCAAoC,EAAE,KAAK,o6LAAC,CAAC;AAEpF;;;;GAIG;AACH,MAAa,4BAA6B,SAAQ,yCAAmB;IACzD,QAAQ,CAChB,OAAmB,EACnB,SAA2B,EAC3B,iBAAiB,GAAG,IAAI;QAExB,MAAM,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAClD,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC;YACrB,OAAO,MAAM,CAAC;QAChB,CAAC;QAED,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC;QACnC,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E,cAAc,EAAE,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC1E,CAAC;gBAAC,OAAO,CAAC,EAAE,CAAC;oBACX,IAAI,CAAC,YAAY,KAAK,IAAI,CAAC,CAAC,OAAO,KAAK,wBAAwB,EAAE,CAAC;wBACjE,iEAAiE;oBACnE,CAAC;yBAAM,CAAC;wBACN,MAAM,CAAC,CAAC;oBACV,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,cAAc,CAAC;IACxB,CAAC;CACF;AA3DD,oEA2DC"}
|
|
@@ -105,12 +105,10 @@ const filePathsFromMetadataComponent = ({ fullName, type }, packageDir) => {
|
|
|
105
105
|
['LightningTypeBundle', [(0, node_path_1.join)(packageDirWithTypeDir, `${fullName}${node_path_1.sep}schema.json`)]],
|
|
106
106
|
['ContentTypeBundle', [(0, node_path_1.join)(packageDirWithTypeDir, `${fullName}${node_path_1.sep}schema.json`)]],
|
|
107
107
|
['WaveTemplateBundle', [(0, node_path_1.join)(packageDirWithTypeDir, `${fullName}${node_path_1.sep}template-info.json`)]],
|
|
108
|
+
// webapplication.json is optional, so only the meta XML is a guaranteed file path.
|
|
108
109
|
[
|
|
109
110
|
'WebApplication',
|
|
110
|
-
[
|
|
111
|
-
(0, node_path_1.join)(packageDirWithTypeDir, `${fullName}${node_path_1.sep}webapplication.json`),
|
|
112
|
-
(0, node_path_1.join)(packageDirWithTypeDir, `${fullName}${node_path_1.sep}${fullName}.webapplication${constants_1.META_XML_SUFFIX}`),
|
|
113
|
-
],
|
|
111
|
+
[(0, node_path_1.join)(packageDirWithTypeDir, `${fullName}${node_path_1.sep}${fullName}.webapplication${constants_1.META_XML_SUFFIX}`)],
|
|
114
112
|
],
|
|
115
113
|
['LightningComponentBundle', [(0, node_path_1.join)(packageDirWithTypeDir, `${fullName}${node_path_1.sep}${fullName}.js${constants_1.META_XML_SUFFIX}`)]],
|
|
116
114
|
['AuraDefinitionBundle', [(0, node_path_1.join)(packageDirWithTypeDir, `${fullName}${node_path_1.sep}${fullName}.cmp${constants_1.META_XML_SUFFIX}`)]],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filePathGenerator.js","sourceRoot":"","sources":["../../../src/utils/filePathGenerator.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,yCAAgD;AAChD,wDAAqD;AACrD,mDAAqD;AAErD,mDAAsD;AACtD,+DAA4D;;AAG5D,MAAM,QAAQ,OAAG,mBAAQ,CAAc,oCAAoC,EAAE,KAAK,o6LAAC,CAAC;AAEpF,MAAM,cAAc,GAAG,IAAI,+BAAc,EAAE,CAAC;AAE5C;;;;;;;;;;;;;;;;;GAiBG;AACH,sCAAsC;AAC/B,MAAM,8BAA8B,GAAG,CAC5C,EAAE,QAAQ,EAAE,IAAI,EAAqB,EACrC,UAAmB,EACT,EAAE;IACZ,MAAM,qBAAqB,GAAG,UAAU,CAAC,CAAC,CAAC,IAAA,gBAAI,EAAC,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC;IAErG,IAAI,IAAI,CAAC,UAAU,EAAE,OAAO,KAAK,mBAAmB,EAAE,CAAC;QACrD,oDAAoD;QACpD,IAAI,IAAI,CAAC,EAAE,KAAK,mBAAmB,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC;YAC3D,wDAAwD;YACxD,OAAO;gBACL,IAAA,gBAAI,EACF,qBAAqB,EACrB,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,eAAG,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,eAAG,GAAG,IAAI,CAAC,cAAc,EAAE,CACvF;aACF,CAAC;QACJ,CAAC;QAED,iBAAiB;QACjB,IAAI,IAAI,CAAC,EAAE,KAAK,yBAAyB,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YACzD,OAAO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C,CAAC,IAAI,YAAY,CAAC,MAAM,IAAI,EAAE,GAAG,2BAAe,EAAE,CAC1G;QACD,QAAQ;QACR,IAAA,gBAAI,EACF,eAAe,EACf,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EACtB,IAAI,CAAC,aAAa,EAClB,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,MAAM,IAAI,EAAE,GAAG,2BAAe,EAAE,CACnE;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# webapp_empty_file
|
|
2
|
+
|
|
3
|
+
webapplication.json must not be empty (%s).
|
|
4
|
+
|
|
5
|
+
# webapp_empty_file.actions
|
|
6
|
+
|
|
7
|
+
Add at least one property, e.g. { "outputDir": "dist" }
|
|
8
|
+
|
|
9
|
+
# webapp_size_exceeded
|
|
10
|
+
|
|
11
|
+
webapplication.json exceeds the maximum allowed size of %s KB (actual: %s KB).
|
|
12
|
+
|
|
13
|
+
# webapp_size_exceeded.actions
|
|
14
|
+
|
|
15
|
+
Reduce the file size. The descriptor should only contain configuration, not static content.
|
|
16
|
+
|
|
17
|
+
# webapp_whitespace_only
|
|
18
|
+
|
|
19
|
+
webapplication.json must not be empty or contain only whitespace (%s).
|
|
20
|
+
|
|
21
|
+
# webapp_whitespace_only.actions
|
|
22
|
+
|
|
23
|
+
Replace the whitespace with valid JSON, e.g. { "outputDir": "dist" }
|
|
24
|
+
|
|
25
|
+
# webapp_invalid_json
|
|
26
|
+
|
|
27
|
+
webapplication.json is not valid JSON: %s
|
|
28
|
+
|
|
29
|
+
# webapp_invalid_json.actions
|
|
30
|
+
|
|
31
|
+
Fix the JSON syntax in webapplication.json. Use a JSON validator to find the exact issue.
|
|
32
|
+
|
|
33
|
+
# webapp_not_object
|
|
34
|
+
|
|
35
|
+
webapplication.json must be a JSON object, but found %s.
|
|
36
|
+
|
|
37
|
+
# webapp_not_object.actions
|
|
38
|
+
|
|
39
|
+
Wrap the content in curly braces, e.g. { "outputDir": "dist" }
|
|
40
|
+
|
|
41
|
+
# webapp_empty_object
|
|
42
|
+
|
|
43
|
+
webapplication.json must contain at least one property.
|
|
44
|
+
|
|
45
|
+
# webapp_empty_object.actions
|
|
46
|
+
|
|
47
|
+
Add a property: outputDir, routing, or headers.
|
|
48
|
+
|
|
49
|
+
# webapp_unknown_props
|
|
50
|
+
|
|
51
|
+
webapplication.json contains unknown %s: %s. Allowed: %s.
|
|
52
|
+
|
|
53
|
+
# webapp_type_mismatch
|
|
54
|
+
|
|
55
|
+
webapplication.json '%s' must be %s (received %s).
|
|
56
|
+
|
|
57
|
+
# webapp_empty_value
|
|
58
|
+
|
|
59
|
+
webapplication.json '%s' must not be empty.
|
|
60
|
+
|
|
61
|
+
# webapp_invalid_enum
|
|
62
|
+
|
|
63
|
+
webapplication.json '%s' must be one of: %s (received "%s").
|
|
64
|
+
|
|
65
|
+
# webapp_min_items
|
|
66
|
+
|
|
67
|
+
webapplication.json '%s' must contain at least one %s.
|
|
68
|
+
|
|
69
|
+
# webapp_unknown_prop
|
|
70
|
+
|
|
71
|
+
webapplication.json '%s' contains unknown property '%s'. Allowed: %s.
|
|
72
|
+
|
|
73
|
+
# webapp_non_empty_string
|
|
74
|
+
|
|
75
|
+
webapplication.json '%s' must be a non-empty string.
|
|
76
|
+
|
|
77
|
+
# webapp_path_unsafe
|
|
78
|
+
|
|
79
|
+
webapplication.json '%s' value "%s" contains %s. Config paths must use forward slashes.
|
|
80
|
+
|
|
81
|
+
# webapp_path_traversal
|
|
82
|
+
|
|
83
|
+
webapplication.json '%s' value "%s" resolves outside the application bundle. Path traversal is not allowed.
|
|
84
|
+
|
|
85
|
+
# webapp_outputdir_is_root
|
|
86
|
+
|
|
87
|
+
webapplication.json 'outputDir' value "%s" resolves to the bundle root. It must reference a subdirectory.
|
|
88
|
+
|
|
89
|
+
# webapp_outputdir_is_root.actions
|
|
90
|
+
|
|
91
|
+
Set outputDir to a subdirectory like "dist" or "build".
|
|
92
|
+
|
|
93
|
+
# webapp_dir_not_found
|
|
94
|
+
|
|
95
|
+
webapplication.json 'outputDir' references "%s", but the directory does not exist at %s.
|
|
96
|
+
|
|
97
|
+
# webapp_dir_empty
|
|
98
|
+
|
|
99
|
+
webapplication.json 'outputDir' ("%s") exists but contains no files. It must contain at least one deployable file.
|
|
100
|
+
|
|
101
|
+
# webapp_file_not_found
|
|
102
|
+
|
|
103
|
+
webapplication.json '%s' references "%s", but the file does not exist at %s.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/source-deploy-retrieve",
|
|
3
|
-
"version": "12.31.
|
|
3
|
+
"version": "12.31.16",
|
|
4
4
|
"description": "JavaScript library to run Salesforce metadata deploys and retrieves",
|
|
5
5
|
"main": "lib/src/index.js",
|
|
6
6
|
"author": "Salesforce",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
]
|
|
94
94
|
},
|
|
95
95
|
"volta": {
|
|
96
|
-
"node": "
|
|
96
|
+
"node": "18.20.0",
|
|
97
97
|
"yarn": "1.22.4"
|
|
98
98
|
},
|
|
99
99
|
"config": {},
|