@salesforce/source-deploy-retrieve 13.12.0-compute.6 → 13.12.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.
- package/lib/src/client/index.d.ts +0 -1
- package/lib/src/client/index.js.map +1 -1
- package/lib/src/client/metadataApiDeploy.d.ts +0 -7
- package/lib/src/client/metadataApiDeploy.js +7 -24
- package/lib/src/client/metadataApiDeploy.js.map +1 -1
- package/lib/src/client/metadataApiRetrieve.d.ts +0 -7
- package/lib/src/client/metadataApiRetrieve.js +6 -23
- package/lib/src/client/metadataApiRetrieve.js.map +1 -1
- package/lib/src/client/metadataTransfer.d.ts +0 -3
- package/lib/src/client/metadataTransfer.js +1 -11
- package/lib/src/client/metadataTransfer.js.map +1 -1
- package/lib/src/client/types.d.ts +0 -8
- package/lib/src/collections/componentSet.d.ts +0 -9
- package/lib/src/collections/componentSet.js +1 -130
- package/lib/src/collections/componentSet.js.map +1 -1
- package/lib/src/convert/convertContext/convertContext.js.map +1 -1
- package/lib/src/convert/transformers/metadataTransformerFactory.js +0 -3
- package/lib/src/convert/transformers/metadataTransformerFactory.js.map +1 -1
- package/lib/src/index.d.ts +1 -1
- package/lib/src/index.js.map +1 -1
- package/lib/src/registry/metadataRegistry.json +0 -15
- package/lib/src/registry/types.d.ts +2 -5
- package/lib/src/registry/types.js +0 -2
- package/lib/src/registry/types.js.map +1 -1
- package/lib/src/resolve/adapters/index.d.ts +0 -1
- package/lib/src/resolve/adapters/index.js +1 -3
- package/lib/src/resolve/adapters/index.js.map +1 -1
- package/lib/src/resolve/adapters/sourceAdapterFactory.js +0 -3
- package/lib/src/resolve/adapters/sourceAdapterFactory.js.map +1 -1
- package/lib/src/resolve/metadataResolver.js +1 -1
- package/lib/src/resolve/metadataResolver.js.map +1 -1
- package/lib/src/utils/filePathGenerator.js +5 -4
- package/lib/src/utils/filePathGenerator.js.map +1 -1
- package/package.json +1 -4
- package/lib/src/client/transports/computeAppTransport.d.ts +0 -12
- package/lib/src/client/transports/computeAppTransport.js +0 -185
- package/lib/src/client/transports/computeAppTransport.js.map +0 -1
- package/lib/src/client/transports/computeSourceBundle.d.ts +0 -10
- package/lib/src/client/transports/computeSourceBundle.js +0 -293
- package/lib/src/client/transports/computeSourceBundle.js.map +0 -1
- package/lib/src/client/transports/index.d.ts +0 -2
- package/lib/src/client/transports/index.js +0 -18
- package/lib/src/client/transports/index.js.map +0 -1
- package/lib/src/client/transports/transportCoordinator.d.ts +0 -20
- package/lib/src/client/transports/transportCoordinator.js +0 -82
- package/lib/src/client/transports/transportCoordinator.js.map +0 -1
- package/lib/src/client/transports/transportPipeline.d.ts +0 -55
- package/lib/src/client/transports/transportPipeline.js +0 -189
- package/lib/src/client/transports/transportPipeline.js.map +0 -1
- package/lib/src/client/transports/types.d.ts +0 -45
- package/lib/src/client/transports/types.js +0 -18
- package/lib/src/client/transports/types.js.map +0 -1
- package/lib/src/convert/transformers/computeAppMetadataTransformer.d.ts +0 -18
- package/lib/src/convert/transformers/computeAppMetadataTransformer.js +0 -67
- package/lib/src/convert/transformers/computeAppMetadataTransformer.js.map +0 -1
- package/lib/src/resolve/adapters/computeAppSourceAdapter.d.ts +0 -28
- package/lib/src/resolve/adapters/computeAppSourceAdapter.js +0 -75
- package/lib/src/resolve/adapters/computeAppSourceAdapter.js.map +0 -1
|
@@ -75,7 +75,9 @@ const filePathsFromMetadataComponent = ({ fullName, type }, packageDir) => {
|
|
|
75
75
|
// basic metadata (with or without folders)
|
|
76
76
|
if (!type.children &&
|
|
77
77
|
type.suffix &&
|
|
78
|
-
(!type.strategies ||
|
|
78
|
+
(!type.strategies ||
|
|
79
|
+
type.strategies.adapter === 'default' ||
|
|
80
|
+
type.strategies.transformer === 'decomposedLabels')) {
|
|
79
81
|
return (type.inFolder ?? type.folderType ? generateFolders({ fullName, type }, packageDirWithTypeDir) : []).concat([
|
|
80
82
|
(0, node_path_1.join)(packageDirWithTypeDir, `${fullName}.${type.suffix}${constants_1.META_XML_SUFFIX}`),
|
|
81
83
|
]);
|
|
@@ -103,14 +105,13 @@ const filePathsFromMetadataComponent = ({ fullName, type }, packageDir) => {
|
|
|
103
105
|
(0, node_path_1.join)(packageDirWithTypeDir, `${fullName}`),
|
|
104
106
|
];
|
|
105
107
|
}
|
|
106
|
-
// lwc, aura, waveTemplate, experiencePropertyType, lightningTypeBundle, contentTypeBundle, uiBundles
|
|
107
|
-
if (
|
|
108
|
+
// lwc, aura, waveTemplate, experiencePropertyType, lightningTypeBundle, contentTypeBundle, uiBundles
|
|
109
|
+
if (type.strategies?.adapter === 'bundle' || type.strategies?.adapter === 'uiBundles') {
|
|
108
110
|
const mappings = new Map([
|
|
109
111
|
['ExperiencePropertyTypeBundle', [(0, node_path_1.join)(packageDirWithTypeDir, `${fullName}${node_path_1.sep}schema.json`)]],
|
|
110
112
|
['LightningTypeBundle', [(0, node_path_1.join)(packageDirWithTypeDir, `${fullName}${node_path_1.sep}schema.json`)]],
|
|
111
113
|
['ContentTypeBundle', [(0, node_path_1.join)(packageDirWithTypeDir, `${fullName}${node_path_1.sep}schema.json`)]],
|
|
112
114
|
['WaveTemplateBundle', [(0, node_path_1.join)(packageDirWithTypeDir, `${fullName}${node_path_1.sep}template-info.json`)]],
|
|
113
|
-
['ComputeApp', [(0, node_path_1.join)(packageDirWithTypeDir, `${fullName}${node_path_1.sep}${fullName}.computeApp${constants_1.META_XML_SUFFIX}`)]],
|
|
114
115
|
// ui-bundle.json is optional, so only the meta XML is a guaranteed file path.
|
|
115
116
|
['UIBundle', [(0, node_path_1.join)(packageDirWithTypeDir, `${fullName}${node_path_1.sep}${fullName}.uibundle${constants_1.META_XML_SUFFIX}`)]],
|
|
116
117
|
['LightningComponentBundle', [(0, node_path_1.join)(packageDirWithTypeDir, `${fullName}${node_path_1.sep}${fullName}.js${constants_1.META_XML_SUFFIX}`)]],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filePathGenerator.js","sourceRoot":"","sources":["../../../src/utils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AAQ,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CACpF,CAAC;IACF,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,MAAM,QAAQ,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAChE,CAAC;IACD,MAAM,eAAe,GAAG,UAAU,CAAC,CAAC,CAAC,IAAA,gBAAI,EAAC,UAAU,EAAE,YAAY,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,aAAa,CAAC;IAE/G,OAAO;QACL,SAAS;QACT,IAAA,gBAAI,EACF,eAAe,EACf,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,eAAG,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/source-deploy-retrieve",
|
|
3
|
-
"version": "13.12.
|
|
3
|
+
"version": "13.12.1",
|
|
4
4
|
"description": "JavaScript library to run Salesforce metadata deploys and retrieves",
|
|
5
5
|
"main": "lib/src/index.js",
|
|
6
6
|
"author": "Salesforce",
|
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
"@salesforce/types": "^1.9.0",
|
|
32
32
|
"fast-levenshtein": "^3.0.0",
|
|
33
33
|
"fast-xml-parser": "^5.12.0",
|
|
34
|
-
"form-data": "^4.0.6",
|
|
35
34
|
"got": "^11.8.6",
|
|
36
35
|
"graceful-fs": "^4.2.11",
|
|
37
36
|
"ignore": "^5.3.2",
|
|
@@ -39,7 +38,6 @@
|
|
|
39
38
|
"mime": "2.6.0",
|
|
40
39
|
"minimatch": "^11.0.1",
|
|
41
40
|
"proxy-agent": "^6.5.0",
|
|
42
|
-
"tar-stream": "^3.2.1",
|
|
43
41
|
"yaml": "^2.9.1"
|
|
44
42
|
},
|
|
45
43
|
"devDependencies": {
|
|
@@ -55,7 +53,6 @@
|
|
|
55
53
|
"@types/mocha": "^10.0.10",
|
|
56
54
|
"@types/node": "^18",
|
|
57
55
|
"@types/sinon": "^10.0.20",
|
|
58
|
-
"@types/tar-stream": "^3.1.4",
|
|
59
56
|
"deep-equal-in-any-order": "^1.1.19",
|
|
60
57
|
"esbuild": "^0.28.0",
|
|
61
58
|
"eslint": "^10.4.0",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { SourceComponent } from '../../resolve/sourceComponent';
|
|
2
|
-
import { TransportContext, TransportDescription, TransportProvider, TransportResult } from './types';
|
|
3
|
-
export declare class ComputeAppTransport implements TransportProvider {
|
|
4
|
-
readonly name = "computeApp";
|
|
5
|
-
private readonly logger;
|
|
6
|
-
describe(): TransportDescription;
|
|
7
|
-
handles(component: SourceComponent): boolean;
|
|
8
|
-
beforeDeploy(context: TransportContext): Promise<TransportResult>;
|
|
9
|
-
afterRetrieve(context: TransportContext): Promise<TransportResult>;
|
|
10
|
-
private assertComputeComponent;
|
|
11
|
-
private checkForFailures;
|
|
12
|
-
}
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright 2026, Salesforce, Inc.
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
-
};
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.ComputeAppTransport = void 0;
|
|
22
|
-
const node_fs_1 = require("node:fs");
|
|
23
|
-
const node_path_1 = require("node:path");
|
|
24
|
-
const form_data_1 = __importDefault(require("form-data"));
|
|
25
|
-
const core_1 = require("@salesforce/core");
|
|
26
|
-
const constants_1 = require("../../common/constants");
|
|
27
|
-
const types_1 = require("../types");
|
|
28
|
-
const computeSourceBundle_1 = require("./computeSourceBundle");
|
|
29
|
-
const ENDPOINT = '/connect/compute/source';
|
|
30
|
-
// follow the package's existing layout: `<pkg>/main/default/...` when it has that root, otherwise `<pkg>/...`
|
|
31
|
-
function resolveContentPath(component, packageDir) {
|
|
32
|
-
const sourceRoot = (0, node_fs_1.existsSync)((0, node_path_1.join)(packageDir, constants_1.DEFAULT_PACKAGE_ROOT_SFDX))
|
|
33
|
-
? (0, node_path_1.join)(packageDir, constants_1.DEFAULT_PACKAGE_ROOT_SFDX)
|
|
34
|
-
: packageDir;
|
|
35
|
-
return (0, node_path_1.join)(sourceRoot, component.type.directoryName, component.fullName);
|
|
36
|
-
}
|
|
37
|
-
async function uploadSource(connection, name, bundle) {
|
|
38
|
-
const form = new form_data_1.default();
|
|
39
|
-
form.append('name', name);
|
|
40
|
-
form.append('bundle', bundle, {
|
|
41
|
-
filename: 'deployment-bundle.tar.gz',
|
|
42
|
-
contentType: 'application/gzip',
|
|
43
|
-
});
|
|
44
|
-
return connection.request({
|
|
45
|
-
method: 'POST',
|
|
46
|
-
url: ENDPOINT,
|
|
47
|
-
body: form.getBuffer(),
|
|
48
|
-
headers: form.getHeaders(),
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
// jsforce decodes to UTF-8 by default — lossy for gzip bytes.
|
|
52
|
-
// encoding: 'binary' (latin1) preserves byte values 1:1. Connection.request
|
|
53
|
-
// buffers the complete response; this guard prevents a second oversized Buffer
|
|
54
|
-
// allocation, while unpackComputeBundle limits the archive after download.
|
|
55
|
-
async function downloadSource(connection, appIdOrName) {
|
|
56
|
-
const body = await connection.request({ method: 'GET', url: `/connect/compute/${encodeURIComponent(appIdOrName)}/builds/latest/source` }, { encoding: 'binary' });
|
|
57
|
-
if (body.length > computeSourceBundle_1.MAX_COMPRESSED_BYTES) {
|
|
58
|
-
throw new Error(`Compute source bundle: compressed size limit (${computeSourceBundle_1.MAX_COMPRESSED_BYTES} bytes) exceeded`);
|
|
59
|
-
}
|
|
60
|
-
return Buffer.from(body, 'binary');
|
|
61
|
-
}
|
|
62
|
-
class ComputeAppTransport {
|
|
63
|
-
name = 'computeApp';
|
|
64
|
-
logger = core_1.Logger.childFromRoot('ComputeAppTransport');
|
|
65
|
-
// eslint-disable-next-line class-methods-use-this
|
|
66
|
-
describe() {
|
|
67
|
-
return { label: 'Elastic Compute', endpoint: ENDPOINT };
|
|
68
|
-
}
|
|
69
|
-
handles(component) {
|
|
70
|
-
return component.type.strategies?.transport === this.name;
|
|
71
|
-
}
|
|
72
|
-
async beforeDeploy(context) {
|
|
73
|
-
const fileResponses = [];
|
|
74
|
-
const operationResults = [];
|
|
75
|
-
void core_1.Lifecycle.getInstance().emitTelemetry({
|
|
76
|
-
eventName: 'heroku_compute_pre_deploy',
|
|
77
|
-
library: 'SDR',
|
|
78
|
-
});
|
|
79
|
-
for (const component of context.components) {
|
|
80
|
-
try {
|
|
81
|
-
this.assertComputeComponent(component);
|
|
82
|
-
this.logger.debug('deploying compute source for %s from %s', component.fullName, component.content);
|
|
83
|
-
// eslint-disable-next-line no-await-in-loop
|
|
84
|
-
const bundle = await (0, computeSourceBundle_1.packageComputeBundle)(component.content, component.fullName);
|
|
85
|
-
this.logger.debug('packaged %s: %d bytes, %d files', component.fullName, bundle.buffer.length, bundle.fileCount);
|
|
86
|
-
// eslint-disable-next-line no-await-in-loop
|
|
87
|
-
const result = await uploadSource(context.connection, component.fullName, bundle.buffer);
|
|
88
|
-
this.logger.debug('uploaded %s: buildId=%s', component.fullName, result.buildId);
|
|
89
|
-
fileResponses.push({
|
|
90
|
-
fullName: component.fullName,
|
|
91
|
-
type: component.type.name,
|
|
92
|
-
state: types_1.ComponentStatus.Changed,
|
|
93
|
-
filePath: component.content,
|
|
94
|
-
});
|
|
95
|
-
operationResults.push({
|
|
96
|
-
transportLabel: this.describe().label,
|
|
97
|
-
operation: `Upload ${component.fullName}`,
|
|
98
|
-
status: 'Succeeded',
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
catch (err) {
|
|
102
|
-
fileResponses.push({
|
|
103
|
-
fullName: component.fullName,
|
|
104
|
-
type: component.type.name,
|
|
105
|
-
state: types_1.ComponentStatus.Failed,
|
|
106
|
-
filePath: component.content ?? component.xml ?? '',
|
|
107
|
-
error: err.message,
|
|
108
|
-
problemType: 'Error',
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
return { ...this.checkForFailures(fileResponses, 'upload'), operationResults };
|
|
113
|
-
}
|
|
114
|
-
async afterRetrieve(context) {
|
|
115
|
-
const fileResponses = [];
|
|
116
|
-
void core_1.Lifecycle.getInstance().emitTelemetry({
|
|
117
|
-
eventName: 'heroku_compute_post_retrieve',
|
|
118
|
-
library: 'SDR',
|
|
119
|
-
});
|
|
120
|
-
for (const component of context.components) {
|
|
121
|
-
try {
|
|
122
|
-
const packageName = context.transportPackageNames?.[`${component.type.name}#${component.fullName}`];
|
|
123
|
-
const packageOutput = packageName
|
|
124
|
-
? context.packageOptions
|
|
125
|
-
?.map((option) => (typeof option === 'string' ? { name: option, outputDir: option } : option))
|
|
126
|
-
.find((option) => option.name === packageName)
|
|
127
|
-
: undefined;
|
|
128
|
-
if (!component.content && packageName && !packageOutput) {
|
|
129
|
-
throw new Error(`No package option found for '${packageName}' (component '${component.fullName}')`);
|
|
130
|
-
}
|
|
131
|
-
const contentPath = component.content ??
|
|
132
|
-
resolveContentPath(component, packageOutput?.outputDir ??
|
|
133
|
-
packageOutput?.name ??
|
|
134
|
-
context.output ??
|
|
135
|
-
context.project.getDefaultPackage().fullPath);
|
|
136
|
-
this.logger.debug('retrieving compute source for %s into %s', component.fullName, contentPath);
|
|
137
|
-
// eslint-disable-next-line no-await-in-loop
|
|
138
|
-
const buffer = await downloadSource(context.connection, component.fullName);
|
|
139
|
-
// eslint-disable-next-line no-await-in-loop
|
|
140
|
-
const unpacked = await (0, computeSourceBundle_1.unpackComputeBundle)(buffer, contentPath);
|
|
141
|
-
this.logger.debug('unpacked %s: %d files into %s', component.fullName, unpacked.fileCount, contentPath);
|
|
142
|
-
fileResponses.push({
|
|
143
|
-
fullName: component.fullName,
|
|
144
|
-
type: component.type.name,
|
|
145
|
-
state: types_1.ComponentStatus.Changed,
|
|
146
|
-
filePath: contentPath,
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
catch (err) {
|
|
150
|
-
fileResponses.push({
|
|
151
|
-
fullName: component.fullName,
|
|
152
|
-
type: component.type.name,
|
|
153
|
-
state: types_1.ComponentStatus.Failed,
|
|
154
|
-
filePath: component.content ?? component.xml ?? '',
|
|
155
|
-
error: err.message,
|
|
156
|
-
problemType: 'Error',
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
return this.checkForFailures(fileResponses, 'download');
|
|
161
|
-
}
|
|
162
|
-
// eslint-disable-next-line class-methods-use-this
|
|
163
|
-
assertComputeComponent(component) {
|
|
164
|
-
if (!component.content) {
|
|
165
|
-
throw new core_1.SfError(`ComputeAppTransport requires a content path for '${component.fullName}'`, 'MissingComponentContent');
|
|
166
|
-
}
|
|
167
|
-
// check before uploading, otherwise the app source goes live with no metadata deploy
|
|
168
|
-
if (!component.xml) {
|
|
169
|
-
throw new core_1.SfError(`ComputeApp '${component.fullName}' is missing ${component.fullName}.computeApp-meta.xml in ${component.content}`, 'MissingComponentXml');
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
// eslint-disable-next-line class-methods-use-this
|
|
173
|
-
checkForFailures(fileResponses, operation) {
|
|
174
|
-
const failures = fileResponses.filter((r) => r.state === types_1.ComponentStatus.Failed);
|
|
175
|
-
if (failures.length > 0) {
|
|
176
|
-
const details = failures.map((f) => `'${f.fullName}': ${f.error ?? 'unknown error'}`).join('; ');
|
|
177
|
-
const error = new core_1.SfError(`Elastic Compute ${operation} failed for ${details}`, `ComputeApp${operation.charAt(0).toUpperCase() + operation.slice(1)}Error`);
|
|
178
|
-
error.data = fileResponses;
|
|
179
|
-
throw error;
|
|
180
|
-
}
|
|
181
|
-
return { fileResponses };
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
exports.ComputeAppTransport = ComputeAppTransport;
|
|
185
|
-
//# sourceMappingURL=computeAppTransport.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"computeAppTransport.js","sourceRoot":"","sources":["../../../../src/client/transports/computeAppTransport.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;AAEH,qCAAqC;AACrC,yCAAiC;AACjC,0DAAiC;AACjC,2CAA8D;AAE9D,sDAAmE;AAEnE,oCAAyD;AAQzD,+DAAwG;AASxG,MAAM,QAAQ,GAAG,yBAAyB,CAAC;AAE3C,8GAA8G;AAC9G,SAAS,kBAAkB,CAAC,SAA0B,EAAE,UAAkB;IACxE,MAAM,UAAU,GAAG,IAAA,o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CAAC,QAAQ,gBAAgB,SAAS,CAAC,QAAQ,2BAA2B,SAAS,CAAC,OAAO,EAAE,EACjH,qBAAqB,CACtB,CAAC;QACJ,CAAC;IACH,CAAC;IAED,kDAAkD;IAC1C,gBAAgB,CAAC,aAA6B,EAAE,SAAiB;QACvE,MAAM,QAAQ,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,uBAAe,CAAC,MAAM,CAAC,CAAC;QACjF,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACxB,MAAM,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,QAAQ,MAAM,CAAC,CAAC,KAAK,IAAI,eAAe,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACjG,MAAM,KAAK,GAAG,IAAI,cAAO,CACvB,mBAAmB,SAAS,eAAe,OAAO,EAAE,EACpD,aAAa,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAC3E,CAAC;YACF,KAAK,CAAC,IAAI,GAAG,aAAa,CAAC;YAC3B,MAAM,KAAK,CAAC;QACd,CAAC;QAED,OAAO,EAAE,aAAa,EAAE,CAAC;IAC3B,CAAC;CACF;AAzJD,kDAyJC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const MAX_COMPRESSED_BYTES: number;
|
|
2
|
-
export type PackagedBundle = {
|
|
3
|
-
buffer: Buffer;
|
|
4
|
-
fileCount: number;
|
|
5
|
-
};
|
|
6
|
-
export type UnpackedBundle = {
|
|
7
|
-
fileCount: number;
|
|
8
|
-
};
|
|
9
|
-
export declare function packageComputeBundle(appDir: string, name: string): Promise<PackagedBundle>;
|
|
10
|
-
export declare function unpackComputeBundle(buffer: Buffer, appDir: string): Promise<UnpackedBundle>;
|
|
@@ -1,293 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright 2026, Salesforce, Inc.
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
-
if (k2 === undefined) k2 = k;
|
|
19
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
-
}
|
|
23
|
-
Object.defineProperty(o, k2, desc);
|
|
24
|
-
}) : (function(o, m, k, k2) {
|
|
25
|
-
if (k2 === undefined) k2 = k;
|
|
26
|
-
o[k2] = m[k];
|
|
27
|
-
}));
|
|
28
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
-
}) : function(o, v) {
|
|
31
|
-
o["default"] = v;
|
|
32
|
-
});
|
|
33
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
34
|
-
var ownKeys = function(o) {
|
|
35
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
36
|
-
var ar = [];
|
|
37
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
38
|
-
return ar;
|
|
39
|
-
};
|
|
40
|
-
return ownKeys(o);
|
|
41
|
-
};
|
|
42
|
-
return function (mod) {
|
|
43
|
-
if (mod && mod.__esModule) return mod;
|
|
44
|
-
var result = {};
|
|
45
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
46
|
-
__setModuleDefault(result, mod);
|
|
47
|
-
return result;
|
|
48
|
-
};
|
|
49
|
-
})();
|
|
50
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
|
-
exports.MAX_COMPRESSED_BYTES = void 0;
|
|
52
|
-
exports.packageComputeBundle = packageComputeBundle;
|
|
53
|
-
exports.unpackComputeBundle = unpackComputeBundle;
|
|
54
|
-
const promises_1 = require("node:fs/promises");
|
|
55
|
-
const node_path_1 = require("node:path");
|
|
56
|
-
const node_zlib_1 = require("node:zlib");
|
|
57
|
-
const consumers_1 = require("node:stream/consumers");
|
|
58
|
-
const tarStream = __importStar(require("tar-stream"));
|
|
59
|
-
const core_1 = require("@salesforce/core");
|
|
60
|
-
const forceIgnore_1 = require("../../resolve/forceIgnore");
|
|
61
|
-
const logger = core_1.Logger.childFromRoot('computeSourceBundle');
|
|
62
|
-
// Compute source bundles are app source, not dependency caches or compiled artifacts.
|
|
63
|
-
// Cap the gzip layer and the tar entries retained in memory when unpacking.
|
|
64
|
-
exports.MAX_COMPRESSED_BYTES = 40 * 1024 * 1024;
|
|
65
|
-
const MAX_TAR_BYTES = 64 * 1024 * 1024;
|
|
66
|
-
const MAX_ENTRY_BYTES = 16 * 1024 * 1024;
|
|
67
|
-
const MAX_TOTAL_ENTRY_BYTES = 40 * 1024 * 1024;
|
|
68
|
-
const MAX_ENTRIES = 1000;
|
|
69
|
-
// Upload shape: deployment-bundle.tar.gz containing api-spec.yaml plus a
|
|
70
|
-
// nested source.tar.gz with the app's source files. Downloads return only that
|
|
71
|
-
// source.tar.gz (see unpackComputeBundle).
|
|
72
|
-
async function packageComputeBundle(appDir, name) {
|
|
73
|
-
const apiSpecPath = (0, node_path_1.join)(appDir, 'api-spec.yaml');
|
|
74
|
-
try {
|
|
75
|
-
await (0, promises_1.access)(apiSpecPath);
|
|
76
|
-
}
|
|
77
|
-
catch {
|
|
78
|
-
throw new core_1.SfError(`ComputeApp '${name}' is missing required api-spec.yaml in ${appDir}`, 'MissingApiSpec');
|
|
79
|
-
}
|
|
80
|
-
const metaFileName = `${name}.computeApp-meta.xml`;
|
|
81
|
-
const excluded = new Set([metaFileName, '.forceignore']);
|
|
82
|
-
// Both files are consumed at build/runtime, so a broad .forceignore must not
|
|
83
|
-
// remove them from the nested source archive.
|
|
84
|
-
const alwaysIncluded = new Set(['api-spec.yaml', 'project.toml']);
|
|
85
|
-
const forceIgnore = forceIgnore_1.ForceIgnore.findAndCreate(appDir);
|
|
86
|
-
const sourceRelativePaths = await listFilesRecursive(appDir, (file) => !excluded.has(file) && (alwaysIncluded.has(file) || forceIgnore.accepts((0, node_path_1.join)(appDir, file))));
|
|
87
|
-
logger.debug('packaging %s: %d files after exclusions/.forceignore', appDir, sourceRelativePaths.length);
|
|
88
|
-
const apiSpec = await (0, promises_1.readFile)(apiSpecPath);
|
|
89
|
-
if (apiSpec.length > MAX_ENTRY_BYTES) {
|
|
90
|
-
throw new Error(`Compute source bundle: api-spec.yaml entry size limit (${MAX_ENTRY_BYTES} bytes) exceeded`);
|
|
91
|
-
}
|
|
92
|
-
let sourceBytes = 0;
|
|
93
|
-
for (const relativePath of sourceRelativePaths) {
|
|
94
|
-
// eslint-disable-next-line no-await-in-loop
|
|
95
|
-
const { size } = await (0, promises_1.lstat)((0, node_path_1.join)(appDir, relativePath));
|
|
96
|
-
if (size > MAX_ENTRY_BYTES) {
|
|
97
|
-
throw new Error(`Compute source bundle: entry size limit (${MAX_ENTRY_BYTES} bytes) exceeded for ${relativePath}`);
|
|
98
|
-
}
|
|
99
|
-
sourceBytes += size;
|
|
100
|
-
if (sourceBytes > MAX_TOTAL_ENTRY_BYTES) {
|
|
101
|
-
throw new Error(`Compute source bundle: total size limit (${MAX_TOTAL_ENTRY_BYTES} bytes) exceeded`);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
const sourceEntries = await Promise.all(sourceRelativePaths.map(async (relativePath) => ({
|
|
105
|
-
name: relativePath,
|
|
106
|
-
data: await (0, promises_1.readFile)((0, node_path_1.join)(appDir, relativePath)),
|
|
107
|
-
})));
|
|
108
|
-
// The source may change between stat and read; check actual bytes before assembling.
|
|
109
|
-
if (sourceEntries.some(({ data }) => data.length > MAX_ENTRY_BYTES)) {
|
|
110
|
-
throw new Error(`Compute source bundle: entry size limit (${MAX_ENTRY_BYTES} bytes) exceeded`);
|
|
111
|
-
}
|
|
112
|
-
if (sourceEntries.reduce((total, { data }) => total + data.length, 0) > MAX_TOTAL_ENTRY_BYTES) {
|
|
113
|
-
throw new Error(`Compute source bundle: total size limit (${MAX_TOTAL_ENTRY_BYTES} bytes) exceeded`);
|
|
114
|
-
}
|
|
115
|
-
const sourceTarGz = await tarGzip(sourceEntries);
|
|
116
|
-
if (sourceTarGz.length > exports.MAX_COMPRESSED_BYTES) {
|
|
117
|
-
throw new Error(`Compute source bundle: source.tar.gz entry size limit (${exports.MAX_COMPRESSED_BYTES} bytes) exceeded`);
|
|
118
|
-
}
|
|
119
|
-
if (apiSpec.length + sourceTarGz.length > MAX_TOTAL_ENTRY_BYTES) {
|
|
120
|
-
throw new Error(`Compute source bundle: outer total size limit (${MAX_TOTAL_ENTRY_BYTES} bytes) exceeded`);
|
|
121
|
-
}
|
|
122
|
-
const buffer = await tarGzip([
|
|
123
|
-
{ name: 'api-spec.yaml', data: apiSpec },
|
|
124
|
-
{ name: 'source.tar.gz', data: sourceTarGz },
|
|
125
|
-
]);
|
|
126
|
-
if (buffer.length > exports.MAX_COMPRESSED_BYTES) {
|
|
127
|
-
throw new Error(`Compute source bundle: compressed size limit (${exports.MAX_COMPRESSED_BYTES} bytes) exceeded`);
|
|
128
|
-
}
|
|
129
|
-
logger.debug('packaged %s into %d bytes (%d files)', appDir, buffer.length, sourceEntries.length);
|
|
130
|
-
return { buffer, fileCount: sourceEntries.length };
|
|
131
|
-
}
|
|
132
|
-
// Download shape: a flat source.tar.gz of the latest build's source files,
|
|
133
|
-
// which already include api-spec.yaml and project.toml.
|
|
134
|
-
async function unpackComputeBundle(buffer, appDir) {
|
|
135
|
-
const entries = await untarGzip(buffer);
|
|
136
|
-
const names = Object.keys(entries);
|
|
137
|
-
if (names.length === 0) {
|
|
138
|
-
throw new Error('Malformed compute source bundle: archive contains no files');
|
|
139
|
-
}
|
|
140
|
-
const resolvedAppDir = (0, node_path_1.resolve)(appDir);
|
|
141
|
-
const files = Object.entries(entries).map(([relativePath, data]) => {
|
|
142
|
-
const filePath = (0, node_path_1.resolve)(appDir, relativePath);
|
|
143
|
-
// tar-slip guard: reject entries that escape appDir
|
|
144
|
-
if (!filePath.startsWith(resolvedAppDir + node_path_1.sep)) {
|
|
145
|
-
throw new Error(`Malformed compute source bundle: unsafe entry path "${relativePath}"`);
|
|
146
|
-
}
|
|
147
|
-
return { filePath, data };
|
|
148
|
-
});
|
|
149
|
-
// Check every output path before writing so a rejected entry leaves the app directory untouched.
|
|
150
|
-
await rejectSymlinks(resolvedAppDir);
|
|
151
|
-
await Promise.all(files.map(({ filePath }) => rejectSymlinks(filePath)));
|
|
152
|
-
await (0, promises_1.mkdir)(appDir, { recursive: true });
|
|
153
|
-
// Settle every write before reporting a failure so no write is still in flight when the caller sees the error.
|
|
154
|
-
const writes = await Promise.allSettled(files.map(async ({ filePath, data }) => {
|
|
155
|
-
await (0, promises_1.mkdir)((0, node_path_1.dirname)(filePath), { recursive: true });
|
|
156
|
-
await rejectSymlinks(filePath);
|
|
157
|
-
await (0, promises_1.writeFile)(filePath, data);
|
|
158
|
-
}));
|
|
159
|
-
const failed = writes.find((write) => write.status === 'rejected');
|
|
160
|
-
if (failed)
|
|
161
|
-
throw failed.reason;
|
|
162
|
-
return { fileCount: names.length };
|
|
163
|
-
}
|
|
164
|
-
async function rejectSymlinks(filePath) {
|
|
165
|
-
let current = (0, node_path_1.resolve)(filePath);
|
|
166
|
-
const root = (0, node_path_1.parse)(current).root;
|
|
167
|
-
// The filesystem root is trusted; inspect every component beneath it, including
|
|
168
|
-
// ancestors of an already-existing app or output file.
|
|
169
|
-
while (current !== root) {
|
|
170
|
-
try {
|
|
171
|
-
// eslint-disable-next-line no-await-in-loop
|
|
172
|
-
const stat = await (0, promises_1.lstat)(current);
|
|
173
|
-
if (stat.isSymbolicLink()) {
|
|
174
|
-
// macOS exposes /var as a system alias for /private/var. Do not reject
|
|
175
|
-
// ordinary output paths in its temporary directory for that alias.
|
|
176
|
-
// eslint-disable-next-line no-await-in-loop
|
|
177
|
-
if (!(process.platform === 'darwin' && current === '/var' && (await (0, promises_1.realpath)(current)) === '/private/var')) {
|
|
178
|
-
throw new Error(`Malformed compute source bundle: symlink in output path "${current}"`);
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
catch (err) {
|
|
183
|
-
if (err.code !== 'ENOENT')
|
|
184
|
-
throw err;
|
|
185
|
-
}
|
|
186
|
-
current = (0, node_path_1.dirname)(current);
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
function untarGzip(buffer) {
|
|
190
|
-
return new Promise((resolveEntries, reject) => {
|
|
191
|
-
if (buffer.length > exports.MAX_COMPRESSED_BYTES) {
|
|
192
|
-
reject(new Error(`Malformed compute source bundle: compressed size limit (${exports.MAX_COMPRESSED_BYTES} bytes) exceeded`));
|
|
193
|
-
return;
|
|
194
|
-
}
|
|
195
|
-
let decompressed;
|
|
196
|
-
try {
|
|
197
|
-
decompressed = (0, node_zlib_1.gunzipSync)(buffer, { maxOutputLength: MAX_TAR_BYTES });
|
|
198
|
-
}
|
|
199
|
-
catch (err) {
|
|
200
|
-
reject(new Error(err.code === 'ERR_BUFFER_TOO_LARGE'
|
|
201
|
-
? `Malformed compute source bundle: decompressed size limit (${MAX_TAR_BYTES} bytes) exceeded`
|
|
202
|
-
: 'Malformed compute source bundle: not a valid gzip archive'));
|
|
203
|
-
return;
|
|
204
|
-
}
|
|
205
|
-
const entries = {};
|
|
206
|
-
const extract = tarStream.extract();
|
|
207
|
-
let entryCount = 0;
|
|
208
|
-
let totalBytes = 0;
|
|
209
|
-
extract.on('entry', (header, stream, next) => {
|
|
210
|
-
// Archives made by system tar list directories; files below them create those paths when written.
|
|
211
|
-
if (header.type === 'directory') {
|
|
212
|
-
stream.on('end', next);
|
|
213
|
-
stream.resume();
|
|
214
|
-
return;
|
|
215
|
-
}
|
|
216
|
-
if (header.type && header.type !== 'file' && header.type !== 'contiguous-file') {
|
|
217
|
-
reject(new Error(`Malformed compute source bundle: unsupported ${header.type} entry "${header.name}"`));
|
|
218
|
-
extract.destroy();
|
|
219
|
-
return;
|
|
220
|
-
}
|
|
221
|
-
entryCount++;
|
|
222
|
-
if (entryCount > MAX_ENTRIES) {
|
|
223
|
-
reject(new Error(`Malformed compute source bundle: entry count limit (${MAX_ENTRIES}) exceeded`));
|
|
224
|
-
extract.destroy();
|
|
225
|
-
return;
|
|
226
|
-
}
|
|
227
|
-
if ((header.size && header.size > MAX_ENTRY_BYTES) ||
|
|
228
|
-
(header.size && totalBytes + header.size > MAX_TOTAL_ENTRY_BYTES)) {
|
|
229
|
-
reject(new Error(`Malformed compute source bundle: entry size limit (${MAX_ENTRY_BYTES} bytes) or total size limit (${MAX_TOTAL_ENTRY_BYTES} bytes) exceeded`));
|
|
230
|
-
extract.destroy();
|
|
231
|
-
return;
|
|
232
|
-
}
|
|
233
|
-
const chunks = [];
|
|
234
|
-
stream.on('data', (chunk) => {
|
|
235
|
-
totalBytes += chunk.length;
|
|
236
|
-
if (totalBytes > MAX_TOTAL_ENTRY_BYTES) {
|
|
237
|
-
reject(new Error(`Malformed compute source bundle: total size limit (${MAX_TOTAL_ENTRY_BYTES} bytes) exceeded`));
|
|
238
|
-
extract.destroy();
|
|
239
|
-
return;
|
|
240
|
-
}
|
|
241
|
-
chunks.push(chunk);
|
|
242
|
-
});
|
|
243
|
-
stream.on('end', () => {
|
|
244
|
-
entries[header.name] = Buffer.concat(chunks);
|
|
245
|
-
next();
|
|
246
|
-
});
|
|
247
|
-
stream.on('error', reject);
|
|
248
|
-
stream.resume();
|
|
249
|
-
});
|
|
250
|
-
extract.on('finish', () => resolveEntries(entries));
|
|
251
|
-
extract.on('error', () => reject(new Error('Malformed compute source bundle: not a valid tar archive')));
|
|
252
|
-
extract.end(decompressed);
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
async function tarGzip(entries) {
|
|
256
|
-
const pack = tarStream.pack();
|
|
257
|
-
// Pipe BEFORE writing entries to avoid deadlock: pack is a Readable with
|
|
258
|
-
// a 16KB highWaterMark — without a consumer attached, backpressure stalls
|
|
259
|
-
// the entry callbacks once buffered bytes exceed the threshold.
|
|
260
|
-
const gzippedBufferPromise = (0, consumers_1.buffer)(pack.pipe((0, node_zlib_1.createGzip)()));
|
|
261
|
-
await entries.reduce((previous, { name, data }) => previous.then(async () => new Promise((resolveEntry, reject) => {
|
|
262
|
-
pack.entry({ name, size: data.length }, data, (err) => (err ? reject(err) : resolveEntry()));
|
|
263
|
-
})), Promise.resolve());
|
|
264
|
-
pack.finalize();
|
|
265
|
-
return gzippedBufferPromise;
|
|
266
|
-
}
|
|
267
|
-
async function listFilesRecursive(base, accepts) {
|
|
268
|
-
const files = [];
|
|
269
|
-
async function walk(dir) {
|
|
270
|
-
const entries = await (0, promises_1.readdir)(dir, { withFileTypes: true });
|
|
271
|
-
for (const entry of entries) {
|
|
272
|
-
if (entry.name.startsWith('.'))
|
|
273
|
-
continue;
|
|
274
|
-
const full = (0, node_path_1.join)(dir, entry.name);
|
|
275
|
-
if (entry.isDirectory()) {
|
|
276
|
-
// eslint-disable-next-line no-await-in-loop
|
|
277
|
-
await walk(full);
|
|
278
|
-
}
|
|
279
|
-
else if (entry.isFile()) {
|
|
280
|
-
const file = (0, node_path_1.relative)(base, full).split(node_path_1.sep).join('/');
|
|
281
|
-
if (accepts(file)) {
|
|
282
|
-
if (files.length === MAX_ENTRIES) {
|
|
283
|
-
throw new Error(`Compute source bundle: entry count limit (${MAX_ENTRIES}) exceeded`);
|
|
284
|
-
}
|
|
285
|
-
files.push(file);
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
await walk(base);
|
|
291
|
-
return files;
|
|
292
|
-
}
|
|
293
|
-
//# sourceMappingURL=computeSourceBundle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"computeSourceBundle.js","sourceRoot":"","sources":["../../../../src/client/transports/computeSourceBundle.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCH,oDAuEC;AAID,kDAiCC;AA1ID,+CAAgG;AAChG,yCAAyE;AACzE,yCAAmD;AACnD,qDAAiE;AACjE,sDAAwC;AACxC,2CAAmD;AACnD,2DAAwD;AAExD,MAAM,MAAM,GAAG,aAAM,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC;AAE3D,sFAAsF;AACtF,4EAA4E;AAC/D,QAAA,oBAAoB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AACrD,MAAM,aAAa,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AACvC,MAAM,eAAe,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AACzC,MAAM,qBAAqB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAC/C,MAAM,WAAW,GAAG,IAAI,CAAC;AAWzB,yEAAyE;AACzE,+EAA+E;AAC/E,2CAA2C;AACpC,KAAK,UAAU,oBAAoB,CAAC,MAAc,EAAE,IAAY;IACrE,MAAM,WAAW,GAAG,IAAA,gBAAI,EAAC,MAA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