@uipath/data-fabric-tool 1.204.0 → 1.205.0-preview.258
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/dist/THIRD-PARTY-NOTICES.md +34 -3
- package/dist/entities-inline-w1hmp4bc.js +2777 -0
- package/dist/federated-payload-k7r4f1y0.js +7333 -0
- package/dist/index.js +8 -4
- package/dist/packager-tool-2wp1xwz4.js +101 -0
- package/dist/packager-tool-hd8rez6s.js +2240 -0
- package/dist/packager-tool-m0btwdsf.js +884 -0
- package/dist/packager-tool-pz3g5mpk.js +2172 -0
- package/dist/{packager-tool-6y4pvhc9.js → packager-tool-w9r3qa12.js} +7226 -15066
- package/dist/packager-tool-xnrdmg37.js +6410 -0
- package/dist/packager-tool.js +5 -1724
- package/dist/tool.js +6 -3
- package/package.json +2 -2
- package/dist/packager-tool-wq4qexcc.js +0 -239
|
@@ -0,0 +1,2172 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MAX_MULTILINE_MAX_FIELDS,
|
|
3
|
+
catchError,
|
|
4
|
+
findInvalidFieldConstraints,
|
|
5
|
+
findReservedNameError,
|
|
6
|
+
validateNameFormat
|
|
7
|
+
} from "./packager-tool-m0btwdsf.js";
|
|
8
|
+
|
|
9
|
+
// ../packager/packager-core/src/services/tools-factory-repository.ts
|
|
10
|
+
class ToolsFactoryRepository {
|
|
11
|
+
projectFactoryMap = new Map;
|
|
12
|
+
solutionFactory = null;
|
|
13
|
+
registerProjectToolFactory(factory) {
|
|
14
|
+
for (const type of factory.supportedTypes) {
|
|
15
|
+
const existing = this.projectFactoryMap.get(type);
|
|
16
|
+
if (existing) {
|
|
17
|
+
if (existing.constructor?.name !== factory.constructor?.name) {
|
|
18
|
+
console.warn(`Tool factory conflict for project type '${type}': ` + `'${existing.constructor?.name}' already registered, ` + `ignoring '${factory.constructor?.name}'.`);
|
|
19
|
+
}
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
22
|
+
this.projectFactoryMap.set(type, factory);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
registerSolutionToolFactory(factory) {
|
|
26
|
+
this.solutionFactory = factory;
|
|
27
|
+
}
|
|
28
|
+
getSolutionToolFactory() {
|
|
29
|
+
if (!this.solutionFactory) {
|
|
30
|
+
throw new Error("No solution tool factory is registered");
|
|
31
|
+
}
|
|
32
|
+
return this.solutionFactory;
|
|
33
|
+
}
|
|
34
|
+
canHandleProject(projectType) {
|
|
35
|
+
return this.projectFactoryMap.has(projectType);
|
|
36
|
+
}
|
|
37
|
+
getProjectToolFactory(projectType) {
|
|
38
|
+
const factory = this.projectFactoryMap.get(projectType);
|
|
39
|
+
if (!factory) {
|
|
40
|
+
throw new Error(`Cannot pack project type '${projectType}': no packager is installed for it.`);
|
|
41
|
+
}
|
|
42
|
+
return factory;
|
|
43
|
+
}
|
|
44
|
+
reset() {
|
|
45
|
+
this.projectFactoryMap.clear();
|
|
46
|
+
this.solutionFactory = null;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
var REGISTRY_KEY = Symbol.for("@uipath/solutionpackager-tool-core/toolsFactoryRepository");
|
|
50
|
+
var _global = globalThis;
|
|
51
|
+
if (!_global[REGISTRY_KEY]) {
|
|
52
|
+
_global[REGISTRY_KEY] = new ToolsFactoryRepository;
|
|
53
|
+
}
|
|
54
|
+
var toolsFactoryRepository = _global[REGISTRY_KEY];
|
|
55
|
+
|
|
56
|
+
// ../packager/packager-core/src/filesystem/path.ts
|
|
57
|
+
class Path {
|
|
58
|
+
static normalize(path) {
|
|
59
|
+
return path.replace(/\\/g, "/").replace(/\/+/g, "/");
|
|
60
|
+
}
|
|
61
|
+
static join(...segments) {
|
|
62
|
+
return Path.normalize(segments.filter((s) => s.length > 0).join("/"));
|
|
63
|
+
}
|
|
64
|
+
static dirname(path) {
|
|
65
|
+
const normalized = Path.normalize(path).replace(/\/$/, "");
|
|
66
|
+
if (normalized === "")
|
|
67
|
+
return ".";
|
|
68
|
+
const lastSlash = normalized.lastIndexOf("/");
|
|
69
|
+
if (lastSlash === -1)
|
|
70
|
+
return ".";
|
|
71
|
+
if (lastSlash === 0)
|
|
72
|
+
return "/";
|
|
73
|
+
return normalized.substring(0, lastSlash);
|
|
74
|
+
}
|
|
75
|
+
static basename(path) {
|
|
76
|
+
const normalized = Path.normalize(path).replace(/\/$/, "");
|
|
77
|
+
if (normalized === "")
|
|
78
|
+
return "";
|
|
79
|
+
const lastSlash = normalized.lastIndexOf("/");
|
|
80
|
+
return lastSlash >= 0 ? normalized.substring(lastSlash + 1) : normalized;
|
|
81
|
+
}
|
|
82
|
+
static extname(path) {
|
|
83
|
+
const base = Path.basename(path);
|
|
84
|
+
const lastDot = base.lastIndexOf(".");
|
|
85
|
+
if (lastDot === -1 || lastDot === 0 || lastDot === base.length - 1) {
|
|
86
|
+
return "";
|
|
87
|
+
}
|
|
88
|
+
return base.substring(lastDot);
|
|
89
|
+
}
|
|
90
|
+
static async walkDirectory(fs, rootPath, currentRelativePath = "") {
|
|
91
|
+
const entries = [];
|
|
92
|
+
const absolutePath = currentRelativePath ? Path.join(rootPath, currentRelativePath) : rootPath;
|
|
93
|
+
const items = await fs.readdir(absolutePath);
|
|
94
|
+
for (const item of items) {
|
|
95
|
+
const itemRelativePath = currentRelativePath ? Path.join(currentRelativePath, item) : item;
|
|
96
|
+
const itemAbsolutePath = Path.join(rootPath, itemRelativePath);
|
|
97
|
+
const stat = await fs.stat(itemAbsolutePath);
|
|
98
|
+
if (stat?.isDirectory()) {
|
|
99
|
+
const subEntries = await Path.walkDirectory(fs, rootPath, itemRelativePath);
|
|
100
|
+
entries.push(...subEntries);
|
|
101
|
+
} else if (stat?.isFile()) {
|
|
102
|
+
entries.push({
|
|
103
|
+
relativePath: Path.normalize(itemRelativePath),
|
|
104
|
+
absolutePath: Path.normalize(itemAbsolutePath)
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return entries;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
// ../packager/packager-core/src/models/tool-result.ts
|
|
112
|
+
class ToolResult {
|
|
113
|
+
errorCode;
|
|
114
|
+
message;
|
|
115
|
+
packages;
|
|
116
|
+
details;
|
|
117
|
+
instructions;
|
|
118
|
+
constructor(errorCode, message, packages = [], instructions) {
|
|
119
|
+
this.errorCode = errorCode;
|
|
120
|
+
this.message = message;
|
|
121
|
+
this.packages = packages;
|
|
122
|
+
this.instructions = instructions;
|
|
123
|
+
}
|
|
124
|
+
get isSuccess() {
|
|
125
|
+
return this.errorCode === "SUCCESS" /* Success */;
|
|
126
|
+
}
|
|
127
|
+
static success() {
|
|
128
|
+
return new ToolResult("SUCCESS" /* Success */);
|
|
129
|
+
}
|
|
130
|
+
static error(errorCode, message, instructions) {
|
|
131
|
+
return new ToolResult(errorCode, message, [], instructions);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// ../packager/packager-core/src/services/project-tool.ts
|
|
136
|
+
class ProjectTool {
|
|
137
|
+
fileSystem;
|
|
138
|
+
logger;
|
|
139
|
+
static ProjectFileName = "project.uiproj";
|
|
140
|
+
constructor(fileSystem, logger) {
|
|
141
|
+
this.fileSystem = fileSystem;
|
|
142
|
+
this.logger = logger;
|
|
143
|
+
}
|
|
144
|
+
async restoreAsync(_options, _cancellationToken) {
|
|
145
|
+
this.logger.info("Restore operation is a noop");
|
|
146
|
+
return ToolResult.success();
|
|
147
|
+
}
|
|
148
|
+
async validateAsync(_options, _cancellationToken) {
|
|
149
|
+
this.logger.info("Validate operation is a noop");
|
|
150
|
+
return ToolResult.success();
|
|
151
|
+
}
|
|
152
|
+
async buildAsync(_options, _cancellationToken) {
|
|
153
|
+
this.logger.info("Build operation is a noop");
|
|
154
|
+
return ToolResult.success();
|
|
155
|
+
}
|
|
156
|
+
async packAsync(_options, _cancellationToken) {
|
|
157
|
+
this.logger.info("Pack operation is a noop");
|
|
158
|
+
return ToolResult.success();
|
|
159
|
+
}
|
|
160
|
+
async cleanupAsync(_options, _cancellationToken) {
|
|
161
|
+
this.logger.info("Cleanup operation is a noop");
|
|
162
|
+
return ToolResult.success();
|
|
163
|
+
}
|
|
164
|
+
async getUiProjectAsync(projectPath) {
|
|
165
|
+
const filePath = Path.join(projectPath, ProjectTool.ProjectFileName);
|
|
166
|
+
if (!await this.fileSystem.exists(filePath)) {
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
const raw = await this.fileSystem.readFile(filePath);
|
|
170
|
+
if (!raw) {
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
const json = typeof raw === "string" ? raw : new TextDecoder("utf-8").decode(raw);
|
|
174
|
+
return JSON.parse(json);
|
|
175
|
+
}
|
|
176
|
+
async dispose() {}
|
|
177
|
+
}
|
|
178
|
+
// ../packager/packager-core/src/i18n/types.ts
|
|
179
|
+
function isPluralForm(value) {
|
|
180
|
+
return typeof value === "object" && value !== null && "other" in value;
|
|
181
|
+
}
|
|
182
|
+
function selectPluralForm(forms, count) {
|
|
183
|
+
if (count === 0 && forms.zero !== undefined) {
|
|
184
|
+
return forms.zero;
|
|
185
|
+
}
|
|
186
|
+
if (count === 1 && forms.one !== undefined) {
|
|
187
|
+
return forms.one;
|
|
188
|
+
}
|
|
189
|
+
if (count === 2 && forms.two !== undefined) {
|
|
190
|
+
return forms.two;
|
|
191
|
+
}
|
|
192
|
+
if (forms.few !== undefined) {
|
|
193
|
+
const mod10 = count % 10;
|
|
194
|
+
const mod100 = count % 100;
|
|
195
|
+
if (mod10 >= 2 && mod10 <= 4 && (mod100 < 10 || mod100 >= 20)) {
|
|
196
|
+
return forms.few;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
if (forms.many !== undefined) {
|
|
200
|
+
const mod10 = count % 10;
|
|
201
|
+
const mod100 = count % 100;
|
|
202
|
+
if (count === 0 || mod10 === 0 && mod100 !== 0 || mod10 >= 5 && mod10 <= 9 || mod100 >= 11 && mod100 <= 14) {
|
|
203
|
+
return forms.many;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
return forms.other;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// ../packager/packager-core/src/i18n/i18n-manager.ts
|
|
210
|
+
class I18nManager {
|
|
211
|
+
static translations = {};
|
|
212
|
+
static currentLocale = "en";
|
|
213
|
+
static fallbackLocale = "en";
|
|
214
|
+
static registerTranslations(locale, catalog) {
|
|
215
|
+
if (!I18nManager.translations[locale]) {
|
|
216
|
+
I18nManager.translations[locale] = {};
|
|
217
|
+
}
|
|
218
|
+
I18nManager.translations[locale] = I18nManager.deepMerge(I18nManager.translations[locale], catalog);
|
|
219
|
+
}
|
|
220
|
+
static setLocale(locale) {
|
|
221
|
+
const normalized = I18nManager.normalizeLocale(locale);
|
|
222
|
+
if (I18nManager.translations[normalized]) {
|
|
223
|
+
I18nManager.currentLocale = normalized;
|
|
224
|
+
return normalized;
|
|
225
|
+
}
|
|
226
|
+
const baseLocale = normalized.split("-")[0];
|
|
227
|
+
if (baseLocale !== normalized && I18nManager.translations[baseLocale]) {
|
|
228
|
+
I18nManager.currentLocale = baseLocale;
|
|
229
|
+
return baseLocale;
|
|
230
|
+
}
|
|
231
|
+
return I18nManager.currentLocale;
|
|
232
|
+
}
|
|
233
|
+
static getLocale() {
|
|
234
|
+
return I18nManager.currentLocale;
|
|
235
|
+
}
|
|
236
|
+
static setFallbackLocale(locale) {
|
|
237
|
+
I18nManager.fallbackLocale = I18nManager.normalizeLocale(locale);
|
|
238
|
+
}
|
|
239
|
+
static t(key, params, locale) {
|
|
240
|
+
const targetLocale = locale ? I18nManager.normalizeLocale(locale) : I18nManager.currentLocale;
|
|
241
|
+
let value = I18nManager.getTranslationValue(key, targetLocale);
|
|
242
|
+
if (value === undefined && targetLocale !== I18nManager.fallbackLocale) {
|
|
243
|
+
value = I18nManager.getTranslationValue(key, I18nManager.fallbackLocale);
|
|
244
|
+
}
|
|
245
|
+
if (value === undefined) {
|
|
246
|
+
return key;
|
|
247
|
+
}
|
|
248
|
+
if (isPluralForm(value) && params && "count" in params) {
|
|
249
|
+
const count = typeof params.count === "number" ? params.count : Number(params.count);
|
|
250
|
+
value = selectPluralForm(value, count);
|
|
251
|
+
} else if (isPluralForm(value)) {
|
|
252
|
+
value = value.other;
|
|
253
|
+
}
|
|
254
|
+
if (typeof value !== "string") {
|
|
255
|
+
return key;
|
|
256
|
+
}
|
|
257
|
+
return params ? I18nManager.interpolate(value, params) : value;
|
|
258
|
+
}
|
|
259
|
+
static has(key, locale) {
|
|
260
|
+
const targetLocale = locale ? I18nManager.normalizeLocale(locale) : I18nManager.currentLocale;
|
|
261
|
+
const value = I18nManager.getTranslationValue(key, targetLocale);
|
|
262
|
+
if (value !== undefined) {
|
|
263
|
+
return true;
|
|
264
|
+
}
|
|
265
|
+
if (targetLocale !== I18nManager.fallbackLocale) {
|
|
266
|
+
return I18nManager.getTranslationValue(key, I18nManager.fallbackLocale) !== undefined;
|
|
267
|
+
}
|
|
268
|
+
return false;
|
|
269
|
+
}
|
|
270
|
+
static getAvailableLocales() {
|
|
271
|
+
return Object.keys(I18nManager.translations);
|
|
272
|
+
}
|
|
273
|
+
static clearTranslations() {
|
|
274
|
+
I18nManager.translations = {};
|
|
275
|
+
I18nManager.currentLocale = "en";
|
|
276
|
+
}
|
|
277
|
+
static getTranslationValue(key, locale) {
|
|
278
|
+
const catalog = I18nManager.translations[locale];
|
|
279
|
+
if (!catalog) {
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
const keys = key.split(".");
|
|
283
|
+
let value = catalog;
|
|
284
|
+
for (const k of keys) {
|
|
285
|
+
if (value && typeof value === "object" && k in value) {
|
|
286
|
+
value = value[k];
|
|
287
|
+
} else {
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
return value;
|
|
292
|
+
}
|
|
293
|
+
static interpolate(template, params) {
|
|
294
|
+
return template.replace(/\{(\w+)\}/g, (_, key) => {
|
|
295
|
+
const value = params[key];
|
|
296
|
+
return value !== undefined ? String(value) : `{${key}}`;
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
static normalizeLocale(locale) {
|
|
300
|
+
const normalized = locale.toLowerCase().replace(/_/g, "-");
|
|
301
|
+
const specialLocales = ["es-mx", "pt-br", "zh-cn", "zh-tw"];
|
|
302
|
+
if (specialLocales.includes(normalized)) {
|
|
303
|
+
return normalized;
|
|
304
|
+
}
|
|
305
|
+
return normalized.split("-")[0];
|
|
306
|
+
}
|
|
307
|
+
static deepMerge(target, source) {
|
|
308
|
+
const result = { ...target };
|
|
309
|
+
for (const key of Object.keys(source)) {
|
|
310
|
+
const sourceValue = source[key];
|
|
311
|
+
const targetValue = result[key];
|
|
312
|
+
if (sourceValue && typeof sourceValue === "object" && !Array.isArray(sourceValue) && targetValue && typeof targetValue === "object" && !Array.isArray(targetValue)) {
|
|
313
|
+
result[key] = I18nManager.deepMerge(targetValue, sourceValue);
|
|
314
|
+
} else {
|
|
315
|
+
result[key] = sourceValue;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
return result;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
// ../packager/packager-core/src/i18n/locales/de.ts
|
|
323
|
+
var de = {
|
|
324
|
+
toolCore: {
|
|
325
|
+
errors: {
|
|
326
|
+
internal: "Internal error: {message}",
|
|
327
|
+
fileNotFound: "File not found: {path}",
|
|
328
|
+
fileReadFailed: "Failed to read file: {path}",
|
|
329
|
+
fileWriteFailed: "Failed to write file: {path}",
|
|
330
|
+
directoryNotFound: "Directory not found: {path}",
|
|
331
|
+
invalidPath: "{path} is not a valid path",
|
|
332
|
+
operationCanceled: "Operation was canceled",
|
|
333
|
+
invalidParameter: "Invalid parameter: {parameter}"
|
|
334
|
+
},
|
|
335
|
+
progress: {
|
|
336
|
+
copying: "Copying files...",
|
|
337
|
+
building: "Building project...",
|
|
338
|
+
packaging: "Creating package...",
|
|
339
|
+
validating: "Validating...",
|
|
340
|
+
analyzing: "Analyzing...",
|
|
341
|
+
restoring: "Restoring dependencies..."
|
|
342
|
+
},
|
|
343
|
+
validation: {
|
|
344
|
+
requiredField: "{field} is required",
|
|
345
|
+
invalidValue: "Invalid value for {field}",
|
|
346
|
+
pathNotFound: "Path not found: {path}",
|
|
347
|
+
fileRequired: "File is required: {path}",
|
|
348
|
+
directoryRequired: "Directory is required: {path}"
|
|
349
|
+
},
|
|
350
|
+
warnings: {
|
|
351
|
+
factoryAlreadyRegistered: "A factory is already registered for project type '{type}'. Skipping duplicate registration."
|
|
352
|
+
},
|
|
353
|
+
info: {
|
|
354
|
+
operationComplete: "Operation completed successfully",
|
|
355
|
+
filesProcessed: {
|
|
356
|
+
zero: "No files processed",
|
|
357
|
+
one: "{count} file processed",
|
|
358
|
+
other: "{count} files processed"
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
};
|
|
363
|
+
|
|
364
|
+
// ../packager/packager-core/src/i18n/locales/en.ts
|
|
365
|
+
var en = {
|
|
366
|
+
toolCore: {
|
|
367
|
+
errors: {
|
|
368
|
+
internal: "Internal error: {message}",
|
|
369
|
+
fileNotFound: "File not found: {path}",
|
|
370
|
+
fileReadFailed: "Failed to read file: {path}",
|
|
371
|
+
fileWriteFailed: "Failed to write file: {path}",
|
|
372
|
+
directoryNotFound: "Directory not found: {path}",
|
|
373
|
+
invalidPath: "{path} is not a valid path",
|
|
374
|
+
operationCanceled: "Operation was canceled",
|
|
375
|
+
invalidParameter: "Invalid parameter: {parameter}"
|
|
376
|
+
},
|
|
377
|
+
progress: {
|
|
378
|
+
copying: "Copying files...",
|
|
379
|
+
building: "Building project...",
|
|
380
|
+
packaging: "Creating package...",
|
|
381
|
+
validating: "Validating...",
|
|
382
|
+
analyzing: "Analyzing...",
|
|
383
|
+
restoring: "Restoring dependencies..."
|
|
384
|
+
},
|
|
385
|
+
validation: {
|
|
386
|
+
requiredField: "{field} is required",
|
|
387
|
+
invalidValue: "Invalid value for {field}",
|
|
388
|
+
pathNotFound: "Path not found: {path}",
|
|
389
|
+
fileRequired: "File is required: {path}",
|
|
390
|
+
directoryRequired: "Directory is required: {path}"
|
|
391
|
+
},
|
|
392
|
+
warnings: {
|
|
393
|
+
factoryAlreadyRegistered: "A factory is already registered for project type '{type}'. Skipping duplicate registration."
|
|
394
|
+
},
|
|
395
|
+
info: {
|
|
396
|
+
operationComplete: "Operation completed successfully",
|
|
397
|
+
filesProcessed: {
|
|
398
|
+
zero: "No files processed",
|
|
399
|
+
one: "{count} file processed",
|
|
400
|
+
other: "{count} files processed"
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
};
|
|
405
|
+
|
|
406
|
+
// ../packager/packager-core/src/i18n/locales/es.ts
|
|
407
|
+
var es = {
|
|
408
|
+
toolCore: {
|
|
409
|
+
errors: {
|
|
410
|
+
internal: "Internal error: {message}",
|
|
411
|
+
fileNotFound: "File not found: {path}",
|
|
412
|
+
fileReadFailed: "Failed to read file: {path}",
|
|
413
|
+
fileWriteFailed: "Failed to write file: {path}",
|
|
414
|
+
directoryNotFound: "Directory not found: {path}",
|
|
415
|
+
invalidPath: "{path} is not a valid path",
|
|
416
|
+
operationCanceled: "Operation was canceled",
|
|
417
|
+
invalidParameter: "Invalid parameter: {parameter}"
|
|
418
|
+
},
|
|
419
|
+
progress: {
|
|
420
|
+
copying: "Copying files...",
|
|
421
|
+
building: "Building project...",
|
|
422
|
+
packaging: "Creating package...",
|
|
423
|
+
validating: "Validating...",
|
|
424
|
+
analyzing: "Analyzing...",
|
|
425
|
+
restoring: "Restoring dependencies..."
|
|
426
|
+
},
|
|
427
|
+
validation: {
|
|
428
|
+
requiredField: "{field} is required",
|
|
429
|
+
invalidValue: "Invalid value for {field}",
|
|
430
|
+
pathNotFound: "Path not found: {path}",
|
|
431
|
+
fileRequired: "File is required: {path}",
|
|
432
|
+
directoryRequired: "Directory is required: {path}"
|
|
433
|
+
},
|
|
434
|
+
warnings: {
|
|
435
|
+
factoryAlreadyRegistered: "A factory is already registered for project type '{type}'. Skipping duplicate registration."
|
|
436
|
+
},
|
|
437
|
+
info: {
|
|
438
|
+
operationComplete: "Operation completed successfully",
|
|
439
|
+
filesProcessed: {
|
|
440
|
+
zero: "No files processed",
|
|
441
|
+
one: "{count} file processed",
|
|
442
|
+
other: "{count} files processed"
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
};
|
|
447
|
+
|
|
448
|
+
// ../packager/packager-core/src/i18n/locales/es-MX.ts
|
|
449
|
+
var es_MX = {
|
|
450
|
+
toolCore: {
|
|
451
|
+
errors: {
|
|
452
|
+
internal: "Internal error: {message}",
|
|
453
|
+
fileNotFound: "File not found: {path}",
|
|
454
|
+
fileReadFailed: "Failed to read file: {path}",
|
|
455
|
+
fileWriteFailed: "Failed to write file: {path}",
|
|
456
|
+
directoryNotFound: "Directory not found: {path}",
|
|
457
|
+
invalidPath: "{path} is not a valid path",
|
|
458
|
+
operationCanceled: "Operation was canceled",
|
|
459
|
+
invalidParameter: "Invalid parameter: {parameter}"
|
|
460
|
+
},
|
|
461
|
+
progress: {
|
|
462
|
+
copying: "Copying files...",
|
|
463
|
+
building: "Building project...",
|
|
464
|
+
packaging: "Creating package...",
|
|
465
|
+
validating: "Validating...",
|
|
466
|
+
analyzing: "Analyzing...",
|
|
467
|
+
restoring: "Restoring dependencies..."
|
|
468
|
+
},
|
|
469
|
+
validation: {
|
|
470
|
+
requiredField: "{field} is required",
|
|
471
|
+
invalidValue: "Invalid value for {field}",
|
|
472
|
+
pathNotFound: "Path not found: {path}",
|
|
473
|
+
fileRequired: "File is required: {path}",
|
|
474
|
+
directoryRequired: "Directory is required: {path}"
|
|
475
|
+
},
|
|
476
|
+
warnings: {
|
|
477
|
+
factoryAlreadyRegistered: "A factory is already registered for project type '{type}'. Skipping duplicate registration."
|
|
478
|
+
},
|
|
479
|
+
info: {
|
|
480
|
+
operationComplete: "Operation completed successfully",
|
|
481
|
+
filesProcessed: {
|
|
482
|
+
zero: "No files processed",
|
|
483
|
+
one: "{count} file processed",
|
|
484
|
+
other: "{count} files processed"
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
};
|
|
489
|
+
|
|
490
|
+
// ../packager/packager-core/src/i18n/locales/fr.ts
|
|
491
|
+
var fr = {
|
|
492
|
+
toolCore: {
|
|
493
|
+
errors: {
|
|
494
|
+
internal: "Internal error: {message}",
|
|
495
|
+
fileNotFound: "File not found: {path}",
|
|
496
|
+
fileReadFailed: "Failed to read file: {path}",
|
|
497
|
+
fileWriteFailed: "Failed to write file: {path}",
|
|
498
|
+
directoryNotFound: "Directory not found: {path}",
|
|
499
|
+
invalidPath: "{path} is not a valid path",
|
|
500
|
+
operationCanceled: "Operation was canceled",
|
|
501
|
+
invalidParameter: "Invalid parameter: {parameter}"
|
|
502
|
+
},
|
|
503
|
+
progress: {
|
|
504
|
+
copying: "Copying files...",
|
|
505
|
+
building: "Building project...",
|
|
506
|
+
packaging: "Creating package...",
|
|
507
|
+
validating: "Validating...",
|
|
508
|
+
analyzing: "Analyzing...",
|
|
509
|
+
restoring: "Restoring dependencies..."
|
|
510
|
+
},
|
|
511
|
+
validation: {
|
|
512
|
+
requiredField: "{field} is required",
|
|
513
|
+
invalidValue: "Invalid value for {field}",
|
|
514
|
+
pathNotFound: "Path not found: {path}",
|
|
515
|
+
fileRequired: "File is required: {path}",
|
|
516
|
+
directoryRequired: "Directory is required: {path}"
|
|
517
|
+
},
|
|
518
|
+
warnings: {
|
|
519
|
+
factoryAlreadyRegistered: "A factory is already registered for project type '{type}'. Skipping duplicate registration."
|
|
520
|
+
},
|
|
521
|
+
info: {
|
|
522
|
+
operationComplete: "Operation completed successfully",
|
|
523
|
+
filesProcessed: {
|
|
524
|
+
zero: "No files processed",
|
|
525
|
+
one: "{count} file processed",
|
|
526
|
+
other: "{count} files processed"
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
};
|
|
531
|
+
|
|
532
|
+
// ../packager/packager-core/src/i18n/locales/ja.ts
|
|
533
|
+
var ja = {
|
|
534
|
+
toolCore: {
|
|
535
|
+
errors: {
|
|
536
|
+
internal: "Internal error: {message}",
|
|
537
|
+
fileNotFound: "File not found: {path}",
|
|
538
|
+
fileReadFailed: "Failed to read file: {path}",
|
|
539
|
+
fileWriteFailed: "Failed to write file: {path}",
|
|
540
|
+
directoryNotFound: "Directory not found: {path}",
|
|
541
|
+
invalidPath: "{path} is not a valid path",
|
|
542
|
+
operationCanceled: "Operation was canceled",
|
|
543
|
+
invalidParameter: "Invalid parameter: {parameter}"
|
|
544
|
+
},
|
|
545
|
+
progress: {
|
|
546
|
+
copying: "Copying files...",
|
|
547
|
+
building: "Building project...",
|
|
548
|
+
packaging: "Creating package...",
|
|
549
|
+
validating: "Validating...",
|
|
550
|
+
analyzing: "Analyzing...",
|
|
551
|
+
restoring: "Restoring dependencies..."
|
|
552
|
+
},
|
|
553
|
+
validation: {
|
|
554
|
+
requiredField: "{field} is required",
|
|
555
|
+
invalidValue: "Invalid value for {field}",
|
|
556
|
+
pathNotFound: "Path not found: {path}",
|
|
557
|
+
fileRequired: "File is required: {path}",
|
|
558
|
+
directoryRequired: "Directory is required: {path}"
|
|
559
|
+
},
|
|
560
|
+
warnings: {
|
|
561
|
+
factoryAlreadyRegistered: "A factory is already registered for project type '{type}'. Skipping duplicate registration."
|
|
562
|
+
},
|
|
563
|
+
info: {
|
|
564
|
+
operationComplete: "Operation completed successfully",
|
|
565
|
+
filesProcessed: {
|
|
566
|
+
zero: "No files processed",
|
|
567
|
+
one: "{count} file processed",
|
|
568
|
+
other: "{count} files processed"
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
};
|
|
573
|
+
|
|
574
|
+
// ../packager/packager-core/src/i18n/locales/ko.ts
|
|
575
|
+
var ko = {
|
|
576
|
+
toolCore: {
|
|
577
|
+
errors: {
|
|
578
|
+
internal: "Internal error: {message}",
|
|
579
|
+
fileNotFound: "File not found: {path}",
|
|
580
|
+
fileReadFailed: "Failed to read file: {path}",
|
|
581
|
+
fileWriteFailed: "Failed to write file: {path}",
|
|
582
|
+
directoryNotFound: "Directory not found: {path}",
|
|
583
|
+
invalidPath: "{path} is not a valid path",
|
|
584
|
+
operationCanceled: "Operation was canceled",
|
|
585
|
+
invalidParameter: "Invalid parameter: {parameter}"
|
|
586
|
+
},
|
|
587
|
+
progress: {
|
|
588
|
+
copying: "Copying files...",
|
|
589
|
+
building: "Building project...",
|
|
590
|
+
packaging: "Creating package...",
|
|
591
|
+
validating: "Validating...",
|
|
592
|
+
analyzing: "Analyzing...",
|
|
593
|
+
restoring: "Restoring dependencies..."
|
|
594
|
+
},
|
|
595
|
+
validation: {
|
|
596
|
+
requiredField: "{field} is required",
|
|
597
|
+
invalidValue: "Invalid value for {field}",
|
|
598
|
+
pathNotFound: "Path not found: {path}",
|
|
599
|
+
fileRequired: "File is required: {path}",
|
|
600
|
+
directoryRequired: "Directory is required: {path}"
|
|
601
|
+
},
|
|
602
|
+
warnings: {
|
|
603
|
+
factoryAlreadyRegistered: "A factory is already registered for project type '{type}'. Skipping duplicate registration."
|
|
604
|
+
},
|
|
605
|
+
info: {
|
|
606
|
+
operationComplete: "Operation completed successfully",
|
|
607
|
+
filesProcessed: {
|
|
608
|
+
zero: "No files processed",
|
|
609
|
+
one: "{count} file processed",
|
|
610
|
+
other: "{count} files processed"
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
};
|
|
615
|
+
|
|
616
|
+
// ../packager/packager-core/src/i18n/locales/pt.ts
|
|
617
|
+
var pt = {
|
|
618
|
+
toolCore: {
|
|
619
|
+
errors: {
|
|
620
|
+
internal: "Internal error: {message}",
|
|
621
|
+
fileNotFound: "File not found: {path}",
|
|
622
|
+
fileReadFailed: "Failed to read file: {path}",
|
|
623
|
+
fileWriteFailed: "Failed to write file: {path}",
|
|
624
|
+
directoryNotFound: "Directory not found: {path}",
|
|
625
|
+
invalidPath: "{path} is not a valid path",
|
|
626
|
+
operationCanceled: "Operation was canceled",
|
|
627
|
+
invalidParameter: "Invalid parameter: {parameter}"
|
|
628
|
+
},
|
|
629
|
+
progress: {
|
|
630
|
+
copying: "Copying files...",
|
|
631
|
+
building: "Building project...",
|
|
632
|
+
packaging: "Creating package...",
|
|
633
|
+
validating: "Validating...",
|
|
634
|
+
analyzing: "Analyzing...",
|
|
635
|
+
restoring: "Restoring dependencies..."
|
|
636
|
+
},
|
|
637
|
+
validation: {
|
|
638
|
+
requiredField: "{field} is required",
|
|
639
|
+
invalidValue: "Invalid value for {field}",
|
|
640
|
+
pathNotFound: "Path not found: {path}",
|
|
641
|
+
fileRequired: "File is required: {path}",
|
|
642
|
+
directoryRequired: "Directory is required: {path}"
|
|
643
|
+
},
|
|
644
|
+
warnings: {
|
|
645
|
+
factoryAlreadyRegistered: "A factory is already registered for project type '{type}'. Skipping duplicate registration."
|
|
646
|
+
},
|
|
647
|
+
info: {
|
|
648
|
+
operationComplete: "Operation completed successfully",
|
|
649
|
+
filesProcessed: {
|
|
650
|
+
zero: "No files processed",
|
|
651
|
+
one: "{count} file processed",
|
|
652
|
+
other: "{count} files processed"
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
};
|
|
657
|
+
|
|
658
|
+
// ../packager/packager-core/src/i18n/locales/pt-BR.ts
|
|
659
|
+
var pt_BR = {
|
|
660
|
+
toolCore: {
|
|
661
|
+
errors: {
|
|
662
|
+
internal: "Internal error: {message}",
|
|
663
|
+
fileNotFound: "File not found: {path}",
|
|
664
|
+
fileReadFailed: "Failed to read file: {path}",
|
|
665
|
+
fileWriteFailed: "Failed to write file: {path}",
|
|
666
|
+
directoryNotFound: "Directory not found: {path}",
|
|
667
|
+
invalidPath: "{path} is not a valid path",
|
|
668
|
+
operationCanceled: "Operation was canceled",
|
|
669
|
+
invalidParameter: "Invalid parameter: {parameter}"
|
|
670
|
+
},
|
|
671
|
+
progress: {
|
|
672
|
+
copying: "Copying files...",
|
|
673
|
+
building: "Building project...",
|
|
674
|
+
packaging: "Creating package...",
|
|
675
|
+
validating: "Validating...",
|
|
676
|
+
analyzing: "Analyzing...",
|
|
677
|
+
restoring: "Restoring dependencies..."
|
|
678
|
+
},
|
|
679
|
+
validation: {
|
|
680
|
+
requiredField: "{field} is required",
|
|
681
|
+
invalidValue: "Invalid value for {field}",
|
|
682
|
+
pathNotFound: "Path not found: {path}",
|
|
683
|
+
fileRequired: "File is required: {path}",
|
|
684
|
+
directoryRequired: "Directory is required: {path}"
|
|
685
|
+
},
|
|
686
|
+
warnings: {
|
|
687
|
+
factoryAlreadyRegistered: "A factory is already registered for project type '{type}'. Skipping duplicate registration."
|
|
688
|
+
},
|
|
689
|
+
info: {
|
|
690
|
+
operationComplete: "Operation completed successfully",
|
|
691
|
+
filesProcessed: {
|
|
692
|
+
zero: "No files processed",
|
|
693
|
+
one: "{count} file processed",
|
|
694
|
+
other: "{count} files processed"
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
};
|
|
699
|
+
|
|
700
|
+
// ../packager/packager-core/src/i18n/locales/ro.ts
|
|
701
|
+
var ro = {
|
|
702
|
+
toolCore: {
|
|
703
|
+
errors: {
|
|
704
|
+
internal: "Internal error: {message}",
|
|
705
|
+
fileNotFound: "File not found: {path}",
|
|
706
|
+
fileReadFailed: "Failed to read file: {path}",
|
|
707
|
+
fileWriteFailed: "Failed to write file: {path}",
|
|
708
|
+
directoryNotFound: "Directory not found: {path}",
|
|
709
|
+
invalidPath: "{path} is not a valid path",
|
|
710
|
+
operationCanceled: "Operation was canceled",
|
|
711
|
+
invalidParameter: "Invalid parameter: {parameter}"
|
|
712
|
+
},
|
|
713
|
+
progress: {
|
|
714
|
+
copying: "Copying files...",
|
|
715
|
+
building: "Building project...",
|
|
716
|
+
packaging: "Creating package...",
|
|
717
|
+
validating: "Validating...",
|
|
718
|
+
analyzing: "Analyzing...",
|
|
719
|
+
restoring: "Restoring dependencies..."
|
|
720
|
+
},
|
|
721
|
+
validation: {
|
|
722
|
+
requiredField: "{field} is required",
|
|
723
|
+
invalidValue: "Invalid value for {field}",
|
|
724
|
+
pathNotFound: "Path not found: {path}",
|
|
725
|
+
fileRequired: "File is required: {path}",
|
|
726
|
+
directoryRequired: "Directory is required: {path}"
|
|
727
|
+
},
|
|
728
|
+
warnings: {
|
|
729
|
+
factoryAlreadyRegistered: "A factory is already registered for project type '{type}'. Skipping duplicate registration."
|
|
730
|
+
},
|
|
731
|
+
info: {
|
|
732
|
+
operationComplete: "Operation completed successfully",
|
|
733
|
+
filesProcessed: {
|
|
734
|
+
zero: "No files processed",
|
|
735
|
+
one: "{count} file processed",
|
|
736
|
+
other: "{count} files processed"
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
};
|
|
741
|
+
|
|
742
|
+
// ../packager/packager-core/src/i18n/locales/ru.ts
|
|
743
|
+
var ru = {
|
|
744
|
+
toolCore: {
|
|
745
|
+
errors: {
|
|
746
|
+
internal: "Internal error: {message}",
|
|
747
|
+
fileNotFound: "File not found: {path}",
|
|
748
|
+
fileReadFailed: "Failed to read file: {path}",
|
|
749
|
+
fileWriteFailed: "Failed to write file: {path}",
|
|
750
|
+
directoryNotFound: "Directory not found: {path}",
|
|
751
|
+
invalidPath: "{path} is not a valid path",
|
|
752
|
+
operationCanceled: "Operation was canceled",
|
|
753
|
+
invalidParameter: "Invalid parameter: {parameter}"
|
|
754
|
+
},
|
|
755
|
+
progress: {
|
|
756
|
+
copying: "Copying files...",
|
|
757
|
+
building: "Building project...",
|
|
758
|
+
packaging: "Creating package...",
|
|
759
|
+
validating: "Validating...",
|
|
760
|
+
analyzing: "Analyzing...",
|
|
761
|
+
restoring: "Restoring dependencies..."
|
|
762
|
+
},
|
|
763
|
+
validation: {
|
|
764
|
+
requiredField: "{field} is required",
|
|
765
|
+
invalidValue: "Invalid value for {field}",
|
|
766
|
+
pathNotFound: "Path not found: {path}",
|
|
767
|
+
fileRequired: "File is required: {path}",
|
|
768
|
+
directoryRequired: "Directory is required: {path}"
|
|
769
|
+
},
|
|
770
|
+
warnings: {
|
|
771
|
+
factoryAlreadyRegistered: "A factory is already registered for project type '{type}'. Skipping duplicate registration."
|
|
772
|
+
},
|
|
773
|
+
info: {
|
|
774
|
+
operationComplete: "Operation completed successfully",
|
|
775
|
+
filesProcessed: {
|
|
776
|
+
zero: "No files processed",
|
|
777
|
+
one: "{count} file processed",
|
|
778
|
+
other: "{count} files processed"
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
};
|
|
783
|
+
|
|
784
|
+
// ../packager/packager-core/src/i18n/locales/tr.ts
|
|
785
|
+
var tr = {
|
|
786
|
+
toolCore: {
|
|
787
|
+
errors: {
|
|
788
|
+
internal: "Internal error: {message}",
|
|
789
|
+
fileNotFound: "File not found: {path}",
|
|
790
|
+
fileReadFailed: "Failed to read file: {path}",
|
|
791
|
+
fileWriteFailed: "Failed to write file: {path}",
|
|
792
|
+
directoryNotFound: "Directory not found: {path}",
|
|
793
|
+
invalidPath: "{path} is not a valid path",
|
|
794
|
+
operationCanceled: "Operation was canceled",
|
|
795
|
+
invalidParameter: "Invalid parameter: {parameter}"
|
|
796
|
+
},
|
|
797
|
+
progress: {
|
|
798
|
+
copying: "Copying files...",
|
|
799
|
+
building: "Building project...",
|
|
800
|
+
packaging: "Creating package...",
|
|
801
|
+
validating: "Validating...",
|
|
802
|
+
analyzing: "Analyzing...",
|
|
803
|
+
restoring: "Restoring dependencies..."
|
|
804
|
+
},
|
|
805
|
+
validation: {
|
|
806
|
+
requiredField: "{field} is required",
|
|
807
|
+
invalidValue: "Invalid value for {field}",
|
|
808
|
+
pathNotFound: "Path not found: {path}",
|
|
809
|
+
fileRequired: "File is required: {path}",
|
|
810
|
+
directoryRequired: "Directory is required: {path}"
|
|
811
|
+
},
|
|
812
|
+
warnings: {
|
|
813
|
+
factoryAlreadyRegistered: "A factory is already registered for project type '{type}'. Skipping duplicate registration."
|
|
814
|
+
},
|
|
815
|
+
info: {
|
|
816
|
+
operationComplete: "Operation completed successfully",
|
|
817
|
+
filesProcessed: {
|
|
818
|
+
zero: "No files processed",
|
|
819
|
+
one: "{count} file processed",
|
|
820
|
+
other: "{count} files processed"
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
};
|
|
825
|
+
|
|
826
|
+
// ../packager/packager-core/src/i18n/locales/zh-CN.ts
|
|
827
|
+
var zh_CN = {
|
|
828
|
+
toolCore: {
|
|
829
|
+
errors: {
|
|
830
|
+
internal: "Internal error: {message}",
|
|
831
|
+
fileNotFound: "File not found: {path}",
|
|
832
|
+
fileReadFailed: "Failed to read file: {path}",
|
|
833
|
+
fileWriteFailed: "Failed to write file: {path}",
|
|
834
|
+
directoryNotFound: "Directory not found: {path}",
|
|
835
|
+
invalidPath: "{path} is not a valid path",
|
|
836
|
+
operationCanceled: "Operation was canceled",
|
|
837
|
+
invalidParameter: "Invalid parameter: {parameter}"
|
|
838
|
+
},
|
|
839
|
+
progress: {
|
|
840
|
+
copying: "Copying files...",
|
|
841
|
+
building: "Building project...",
|
|
842
|
+
packaging: "Creating package...",
|
|
843
|
+
validating: "Validating...",
|
|
844
|
+
analyzing: "Analyzing...",
|
|
845
|
+
restoring: "Restoring dependencies..."
|
|
846
|
+
},
|
|
847
|
+
validation: {
|
|
848
|
+
requiredField: "{field} is required",
|
|
849
|
+
invalidValue: "Invalid value for {field}",
|
|
850
|
+
pathNotFound: "Path not found: {path}",
|
|
851
|
+
fileRequired: "File is required: {path}",
|
|
852
|
+
directoryRequired: "Directory is required: {path}"
|
|
853
|
+
},
|
|
854
|
+
warnings: {
|
|
855
|
+
factoryAlreadyRegistered: "A factory is already registered for project type '{type}'. Skipping duplicate registration."
|
|
856
|
+
},
|
|
857
|
+
info: {
|
|
858
|
+
operationComplete: "Operation completed successfully",
|
|
859
|
+
filesProcessed: {
|
|
860
|
+
zero: "No files processed",
|
|
861
|
+
one: "{count} file processed",
|
|
862
|
+
other: "{count} files processed"
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
};
|
|
867
|
+
|
|
868
|
+
// ../packager/packager-core/src/i18n/locales/zh-TW.ts
|
|
869
|
+
var zh_TW = {
|
|
870
|
+
toolCore: {
|
|
871
|
+
errors: {
|
|
872
|
+
internal: "Internal error: {message}",
|
|
873
|
+
fileNotFound: "File not found: {path}",
|
|
874
|
+
fileReadFailed: "Failed to read file: {path}",
|
|
875
|
+
fileWriteFailed: "Failed to write file: {path}",
|
|
876
|
+
directoryNotFound: "Directory not found: {path}",
|
|
877
|
+
invalidPath: "{path} is not a valid path",
|
|
878
|
+
operationCanceled: "Operation was canceled",
|
|
879
|
+
invalidParameter: "Invalid parameter: {parameter}"
|
|
880
|
+
},
|
|
881
|
+
progress: {
|
|
882
|
+
copying: "Copying files...",
|
|
883
|
+
building: "Building project...",
|
|
884
|
+
packaging: "Creating package...",
|
|
885
|
+
validating: "Validating...",
|
|
886
|
+
analyzing: "Analyzing...",
|
|
887
|
+
restoring: "Restoring dependencies..."
|
|
888
|
+
},
|
|
889
|
+
validation: {
|
|
890
|
+
requiredField: "{field} is required",
|
|
891
|
+
invalidValue: "Invalid value for {field}",
|
|
892
|
+
pathNotFound: "Path not found: {path}",
|
|
893
|
+
fileRequired: "File is required: {path}",
|
|
894
|
+
directoryRequired: "Directory is required: {path}"
|
|
895
|
+
},
|
|
896
|
+
warnings: {
|
|
897
|
+
factoryAlreadyRegistered: "A factory is already registered for project type '{type}'. Skipping duplicate registration."
|
|
898
|
+
},
|
|
899
|
+
info: {
|
|
900
|
+
operationComplete: "Operation completed successfully",
|
|
901
|
+
filesProcessed: {
|
|
902
|
+
zero: "No files processed",
|
|
903
|
+
one: "{count} file processed",
|
|
904
|
+
other: "{count} files processed"
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
};
|
|
909
|
+
|
|
910
|
+
// ../packager/packager-core/src/i18n/locales/zu.ts
|
|
911
|
+
var zu = {
|
|
912
|
+
toolCore: {
|
|
913
|
+
errors: {
|
|
914
|
+
internal: "Internal error: {message}",
|
|
915
|
+
fileNotFound: "File not found: {path}",
|
|
916
|
+
fileReadFailed: "Failed to read file: {path}",
|
|
917
|
+
fileWriteFailed: "Failed to write file: {path}",
|
|
918
|
+
directoryNotFound: "Directory not found: {path}",
|
|
919
|
+
invalidPath: "{path} is not a valid path",
|
|
920
|
+
operationCanceled: "Operation was canceled",
|
|
921
|
+
invalidParameter: "Invalid parameter: {parameter}"
|
|
922
|
+
},
|
|
923
|
+
progress: {
|
|
924
|
+
copying: "Copying files...",
|
|
925
|
+
building: "Building project...",
|
|
926
|
+
packaging: "Creating package...",
|
|
927
|
+
validating: "Validating...",
|
|
928
|
+
analyzing: "Analyzing...",
|
|
929
|
+
restoring: "Restoring dependencies..."
|
|
930
|
+
},
|
|
931
|
+
validation: {
|
|
932
|
+
requiredField: "{field} is required",
|
|
933
|
+
invalidValue: "Invalid value for {field}",
|
|
934
|
+
pathNotFound: "Path not found: {path}",
|
|
935
|
+
fileRequired: "File is required: {path}",
|
|
936
|
+
directoryRequired: "Directory is required: {path}"
|
|
937
|
+
},
|
|
938
|
+
warnings: {
|
|
939
|
+
factoryAlreadyRegistered: "A factory is already registered for project type '{type}'. Skipping duplicate registration."
|
|
940
|
+
},
|
|
941
|
+
info: {
|
|
942
|
+
operationComplete: "Operation completed successfully",
|
|
943
|
+
filesProcessed: {
|
|
944
|
+
zero: "No files processed",
|
|
945
|
+
one: "{count} file processed",
|
|
946
|
+
other: "{count} files processed"
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
};
|
|
951
|
+
|
|
952
|
+
// ../packager/packager-core/src/i18n/translation-service.ts
|
|
953
|
+
class TranslationService {
|
|
954
|
+
static instance;
|
|
955
|
+
currentLocale = "en";
|
|
956
|
+
constructor() {}
|
|
957
|
+
static getInstance() {
|
|
958
|
+
if (!TranslationService.instance) {
|
|
959
|
+
TranslationService.instance = new TranslationService;
|
|
960
|
+
}
|
|
961
|
+
return TranslationService.instance;
|
|
962
|
+
}
|
|
963
|
+
setLocale(locale) {
|
|
964
|
+
this.currentLocale = I18nManager.setLocale(locale);
|
|
965
|
+
}
|
|
966
|
+
getLocale() {
|
|
967
|
+
return this.currentLocale;
|
|
968
|
+
}
|
|
969
|
+
t(key, params) {
|
|
970
|
+
return I18nManager.t(key, params, this.currentLocale);
|
|
971
|
+
}
|
|
972
|
+
tLocale(key, locale, params) {
|
|
973
|
+
return I18nManager.t(key, params, locale);
|
|
974
|
+
}
|
|
975
|
+
has(key) {
|
|
976
|
+
return I18nManager.has(key, this.currentLocale);
|
|
977
|
+
}
|
|
978
|
+
getAvailableLocales() {
|
|
979
|
+
return I18nManager.getAvailableLocales();
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
var translate = TranslationService.getInstance();
|
|
983
|
+
|
|
984
|
+
// ../packager/packager-core/src/i18n/index.ts
|
|
985
|
+
I18nManager.registerTranslations("en", en);
|
|
986
|
+
I18nManager.registerTranslations("de", de);
|
|
987
|
+
I18nManager.registerTranslations("es", es);
|
|
988
|
+
I18nManager.registerTranslations("es-mx", es_MX);
|
|
989
|
+
I18nManager.registerTranslations("fr", fr);
|
|
990
|
+
I18nManager.registerTranslations("ja", ja);
|
|
991
|
+
I18nManager.registerTranslations("ko", ko);
|
|
992
|
+
I18nManager.registerTranslations("pt", pt);
|
|
993
|
+
I18nManager.registerTranslations("pt-br", pt_BR);
|
|
994
|
+
I18nManager.registerTranslations("ro", ro);
|
|
995
|
+
I18nManager.registerTranslations("ru", ru);
|
|
996
|
+
I18nManager.registerTranslations("tr", tr);
|
|
997
|
+
I18nManager.registerTranslations("zh-cn", zh_CN);
|
|
998
|
+
I18nManager.registerTranslations("zh-tw", zh_TW);
|
|
999
|
+
I18nManager.registerTranslations("zu", zu);
|
|
1000
|
+
I18nManager.setLocale("en");
|
|
1001
|
+
// ../../node_modules/@uipath/entity-modeler/dist/chunk-7VKIHCI7.js
|
|
1002
|
+
var SqlTypeName = {
|
|
1003
|
+
UNIQUEIDENTIFIER: "UNIQUEIDENTIFIER",
|
|
1004
|
+
NVARCHAR: "NVARCHAR",
|
|
1005
|
+
INT: "INT",
|
|
1006
|
+
DATETIME2: "DATETIME2",
|
|
1007
|
+
DATETIMEOFFSET: "DATETIMEOFFSET",
|
|
1008
|
+
FLOAT: "FLOAT",
|
|
1009
|
+
REAL: "REAL",
|
|
1010
|
+
BIGINT: "BIGINT",
|
|
1011
|
+
DATE: "DATE",
|
|
1012
|
+
BIT: "BIT",
|
|
1013
|
+
DECIMAL: "DECIMAL",
|
|
1014
|
+
MULTILINE: "MULTILINE",
|
|
1015
|
+
MULTILINE_MAX: "MULTILINE_MAX",
|
|
1016
|
+
UNKNOWN: "UNKNOWN"
|
|
1017
|
+
};
|
|
1018
|
+
var FieldDisplayType = {
|
|
1019
|
+
Basic: "Basic",
|
|
1020
|
+
Relationship: "Relationship",
|
|
1021
|
+
File: "File",
|
|
1022
|
+
ChoiceSetSingle: "ChoiceSetSingle",
|
|
1023
|
+
ChoiceSetMultiple: "ChoiceSetMultiple",
|
|
1024
|
+
AutoNumber: "AutoNumber",
|
|
1025
|
+
MultiLineText: "MultiLineText"
|
|
1026
|
+
};
|
|
1027
|
+
var DEFAULT_REFERENCE_TYPE = "ManyToOne";
|
|
1028
|
+
var CSHARP_RESERVED_WORDS = [
|
|
1029
|
+
"__arglist",
|
|
1030
|
+
"__makeref",
|
|
1031
|
+
"__reftype",
|
|
1032
|
+
"__refvalue",
|
|
1033
|
+
"abstract",
|
|
1034
|
+
"as",
|
|
1035
|
+
"base",
|
|
1036
|
+
"bool",
|
|
1037
|
+
"break",
|
|
1038
|
+
"byte",
|
|
1039
|
+
"case",
|
|
1040
|
+
"catch",
|
|
1041
|
+
"char",
|
|
1042
|
+
"checked",
|
|
1043
|
+
"class",
|
|
1044
|
+
"const",
|
|
1045
|
+
"continue",
|
|
1046
|
+
"decimal",
|
|
1047
|
+
"default",
|
|
1048
|
+
"delegate",
|
|
1049
|
+
"do",
|
|
1050
|
+
"double",
|
|
1051
|
+
"else",
|
|
1052
|
+
"enum",
|
|
1053
|
+
"event",
|
|
1054
|
+
"explicit",
|
|
1055
|
+
"extern",
|
|
1056
|
+
"false",
|
|
1057
|
+
"finally",
|
|
1058
|
+
"fixed",
|
|
1059
|
+
"float",
|
|
1060
|
+
"for",
|
|
1061
|
+
"foreach",
|
|
1062
|
+
"goto",
|
|
1063
|
+
"if",
|
|
1064
|
+
"implicit",
|
|
1065
|
+
"in",
|
|
1066
|
+
"int",
|
|
1067
|
+
"interface",
|
|
1068
|
+
"internal",
|
|
1069
|
+
"is",
|
|
1070
|
+
"lock",
|
|
1071
|
+
"long",
|
|
1072
|
+
"namespace",
|
|
1073
|
+
"new",
|
|
1074
|
+
"null",
|
|
1075
|
+
"object",
|
|
1076
|
+
"operator",
|
|
1077
|
+
"out",
|
|
1078
|
+
"override",
|
|
1079
|
+
"params",
|
|
1080
|
+
"partial",
|
|
1081
|
+
"private",
|
|
1082
|
+
"protected",
|
|
1083
|
+
"public",
|
|
1084
|
+
"readonly",
|
|
1085
|
+
"ref",
|
|
1086
|
+
"return",
|
|
1087
|
+
"sbyte",
|
|
1088
|
+
"sealed",
|
|
1089
|
+
"short",
|
|
1090
|
+
"sizeof",
|
|
1091
|
+
"stackalloc",
|
|
1092
|
+
"static",
|
|
1093
|
+
"string",
|
|
1094
|
+
"struct",
|
|
1095
|
+
"switch",
|
|
1096
|
+
"this",
|
|
1097
|
+
"throw",
|
|
1098
|
+
"true",
|
|
1099
|
+
"try",
|
|
1100
|
+
"typeof",
|
|
1101
|
+
"uint",
|
|
1102
|
+
"ulong",
|
|
1103
|
+
"unchecked",
|
|
1104
|
+
"unsafe",
|
|
1105
|
+
"ushort",
|
|
1106
|
+
"using",
|
|
1107
|
+
"virtual",
|
|
1108
|
+
"void",
|
|
1109
|
+
"volatile",
|
|
1110
|
+
"where",
|
|
1111
|
+
"while",
|
|
1112
|
+
"yield"
|
|
1113
|
+
];
|
|
1114
|
+
var VB_RESERVED_WORDS = [
|
|
1115
|
+
"addhandler",
|
|
1116
|
+
"addressof",
|
|
1117
|
+
"alias",
|
|
1118
|
+
"and",
|
|
1119
|
+
"andalso",
|
|
1120
|
+
"ansi",
|
|
1121
|
+
"as",
|
|
1122
|
+
"assembly",
|
|
1123
|
+
"auto",
|
|
1124
|
+
"boolean",
|
|
1125
|
+
"byref",
|
|
1126
|
+
"byte",
|
|
1127
|
+
"byval",
|
|
1128
|
+
"call",
|
|
1129
|
+
"case",
|
|
1130
|
+
"catch",
|
|
1131
|
+
"cbool",
|
|
1132
|
+
"cbyte",
|
|
1133
|
+
"cchar",
|
|
1134
|
+
"cdate",
|
|
1135
|
+
"cdbl",
|
|
1136
|
+
"cdec",
|
|
1137
|
+
"char",
|
|
1138
|
+
"cint",
|
|
1139
|
+
"class",
|
|
1140
|
+
"class_finalize",
|
|
1141
|
+
"class_initialize",
|
|
1142
|
+
"clng",
|
|
1143
|
+
"cobj",
|
|
1144
|
+
"const",
|
|
1145
|
+
"continue",
|
|
1146
|
+
"csbyte",
|
|
1147
|
+
"cshort",
|
|
1148
|
+
"csng",
|
|
1149
|
+
"cstr",
|
|
1150
|
+
"ctype",
|
|
1151
|
+
"cuint",
|
|
1152
|
+
"culng",
|
|
1153
|
+
"cushort",
|
|
1154
|
+
"date",
|
|
1155
|
+
"decimal",
|
|
1156
|
+
"declare",
|
|
1157
|
+
"default",
|
|
1158
|
+
"delegate",
|
|
1159
|
+
"dim",
|
|
1160
|
+
"directcast",
|
|
1161
|
+
"do",
|
|
1162
|
+
"double",
|
|
1163
|
+
"each",
|
|
1164
|
+
"else",
|
|
1165
|
+
"elseif",
|
|
1166
|
+
"end",
|
|
1167
|
+
"endif",
|
|
1168
|
+
"enum",
|
|
1169
|
+
"erase",
|
|
1170
|
+
"error",
|
|
1171
|
+
"event",
|
|
1172
|
+
"exit",
|
|
1173
|
+
"false",
|
|
1174
|
+
"finally",
|
|
1175
|
+
"for",
|
|
1176
|
+
"friend",
|
|
1177
|
+
"function",
|
|
1178
|
+
"get",
|
|
1179
|
+
"gettype",
|
|
1180
|
+
"global",
|
|
1181
|
+
"gosub",
|
|
1182
|
+
"goto",
|
|
1183
|
+
"handles",
|
|
1184
|
+
"if",
|
|
1185
|
+
"implements",
|
|
1186
|
+
"imports",
|
|
1187
|
+
"in",
|
|
1188
|
+
"inherits",
|
|
1189
|
+
"integer",
|
|
1190
|
+
"interface",
|
|
1191
|
+
"is",
|
|
1192
|
+
"isnot",
|
|
1193
|
+
"let",
|
|
1194
|
+
"lib",
|
|
1195
|
+
"like",
|
|
1196
|
+
"long",
|
|
1197
|
+
"loop",
|
|
1198
|
+
"me",
|
|
1199
|
+
"mod",
|
|
1200
|
+
"module",
|
|
1201
|
+
"mustinherit",
|
|
1202
|
+
"mustoverride",
|
|
1203
|
+
"mybase",
|
|
1204
|
+
"myclass",
|
|
1205
|
+
"namespace",
|
|
1206
|
+
"narrowing",
|
|
1207
|
+
"new",
|
|
1208
|
+
"next",
|
|
1209
|
+
"not",
|
|
1210
|
+
"nothing",
|
|
1211
|
+
"notinheritable",
|
|
1212
|
+
"notoverridable",
|
|
1213
|
+
"object",
|
|
1214
|
+
"of",
|
|
1215
|
+
"on",
|
|
1216
|
+
"operator",
|
|
1217
|
+
"option",
|
|
1218
|
+
"optional",
|
|
1219
|
+
"or",
|
|
1220
|
+
"orelse",
|
|
1221
|
+
"overloads",
|
|
1222
|
+
"overridable",
|
|
1223
|
+
"overrides",
|
|
1224
|
+
"paramarray",
|
|
1225
|
+
"partial",
|
|
1226
|
+
"preserve",
|
|
1227
|
+
"private",
|
|
1228
|
+
"property",
|
|
1229
|
+
"protected",
|
|
1230
|
+
"public",
|
|
1231
|
+
"raiseevent",
|
|
1232
|
+
"readonly",
|
|
1233
|
+
"redim",
|
|
1234
|
+
"rem",
|
|
1235
|
+
"removehandler",
|
|
1236
|
+
"resume",
|
|
1237
|
+
"return",
|
|
1238
|
+
"sbyte",
|
|
1239
|
+
"select",
|
|
1240
|
+
"set",
|
|
1241
|
+
"shadows",
|
|
1242
|
+
"shared",
|
|
1243
|
+
"short",
|
|
1244
|
+
"single",
|
|
1245
|
+
"static",
|
|
1246
|
+
"step",
|
|
1247
|
+
"stop",
|
|
1248
|
+
"string",
|
|
1249
|
+
"structure",
|
|
1250
|
+
"sub",
|
|
1251
|
+
"synclock",
|
|
1252
|
+
"then",
|
|
1253
|
+
"throw",
|
|
1254
|
+
"to",
|
|
1255
|
+
"true",
|
|
1256
|
+
"try",
|
|
1257
|
+
"trycast",
|
|
1258
|
+
"typeof",
|
|
1259
|
+
"uinteger",
|
|
1260
|
+
"ulong",
|
|
1261
|
+
"unicode",
|
|
1262
|
+
"until",
|
|
1263
|
+
"ushort",
|
|
1264
|
+
"using",
|
|
1265
|
+
"variant",
|
|
1266
|
+
"wend",
|
|
1267
|
+
"when",
|
|
1268
|
+
"while",
|
|
1269
|
+
"widening",
|
|
1270
|
+
"with",
|
|
1271
|
+
"withevents",
|
|
1272
|
+
"writeonly",
|
|
1273
|
+
"xor"
|
|
1274
|
+
];
|
|
1275
|
+
var CSHARP_RESERVED = new Set(CSHARP_RESERVED_WORDS);
|
|
1276
|
+
var VB_RESERVED = new Set(VB_RESERVED_WORDS);
|
|
1277
|
+
var GA_TYPE_PAIRS = [
|
|
1278
|
+
[FieldDisplayType.Basic, SqlTypeName.NVARCHAR],
|
|
1279
|
+
[FieldDisplayType.Basic, SqlTypeName.DECIMAL],
|
|
1280
|
+
[FieldDisplayType.Basic, SqlTypeName.FLOAT],
|
|
1281
|
+
[FieldDisplayType.Basic, SqlTypeName.BIT],
|
|
1282
|
+
[FieldDisplayType.Basic, SqlTypeName.DATE],
|
|
1283
|
+
[FieldDisplayType.Basic, SqlTypeName.DATETIMEOFFSET],
|
|
1284
|
+
[FieldDisplayType.Basic, SqlTypeName.UNIQUEIDENTIFIER],
|
|
1285
|
+
[FieldDisplayType.AutoNumber, SqlTypeName.DECIMAL],
|
|
1286
|
+
[FieldDisplayType.Basic, SqlTypeName.MULTILINE],
|
|
1287
|
+
[FieldDisplayType.Basic, SqlTypeName.MULTILINE_MAX],
|
|
1288
|
+
[FieldDisplayType.File, SqlTypeName.UNIQUEIDENTIFIER]
|
|
1289
|
+
];
|
|
1290
|
+
var ALLOWED_TYPE_PAIRS = new Set(GA_TYPE_PAIRS.map(([display, sql]) => `${display}:${sql}`));
|
|
1291
|
+
// ../packager/packager-tool-datafabric/src/sort-names.ts
|
|
1292
|
+
function byName(a, b) {
|
|
1293
|
+
return a.localeCompare(b, "en");
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
// ../packager/packager-tool-datafabric/src/schema/author-field.ts
|
|
1297
|
+
var TYPE_MAP = {
|
|
1298
|
+
STRING: [FieldDisplayType.Basic, SqlTypeName.NVARCHAR],
|
|
1299
|
+
DECIMAL: [FieldDisplayType.Basic, SqlTypeName.DECIMAL],
|
|
1300
|
+
BOOLEAN: [FieldDisplayType.Basic, SqlTypeName.BIT],
|
|
1301
|
+
DATE: [FieldDisplayType.Basic, SqlTypeName.DATE],
|
|
1302
|
+
DATETIME_WITH_TZ: [FieldDisplayType.Basic, SqlTypeName.DATETIMEOFFSET],
|
|
1303
|
+
MULTILINE_TEXT: [FieldDisplayType.Basic, SqlTypeName.MULTILINE],
|
|
1304
|
+
MULTILINE_MAX: [FieldDisplayType.Basic, SqlTypeName.MULTILINE_MAX],
|
|
1305
|
+
AUTO_NUMBER: [FieldDisplayType.AutoNumber, SqlTypeName.DECIMAL],
|
|
1306
|
+
FILE: [FieldDisplayType.File, SqlTypeName.UNIQUEIDENTIFIER]
|
|
1307
|
+
};
|
|
1308
|
+
var AUTHORABLE_FIELD_TYPES = Object.freeze(Object.keys(TYPE_MAP).sort(byName));
|
|
1309
|
+
var UNAUTHORABLE_TYPES = {
|
|
1310
|
+
CHOICE_SET_SINGLE: "choice-set fields are not authorable locally — add the field in Data Fabric",
|
|
1311
|
+
CHOICE_SET_MULTIPLE: "choice-set fields are not authorable locally — add the field in Data Fabric",
|
|
1312
|
+
RELATIONSHIP: "relationship fields are not authorable locally — add the field in Data Fabric",
|
|
1313
|
+
INTEGER: "use DECIMAL with decimalPrecision: 0",
|
|
1314
|
+
BIG_INTEGER: "use DECIMAL with decimalPrecision: 0",
|
|
1315
|
+
FLOAT: "use DECIMAL with a decimalPrecision",
|
|
1316
|
+
DOUBLE: "use DECIMAL with a decimalPrecision",
|
|
1317
|
+
UUID: "use STRING",
|
|
1318
|
+
DATETIME: "use DATETIME_WITH_TZ"
|
|
1319
|
+
};
|
|
1320
|
+
|
|
1321
|
+
class AuthoredFieldError extends Error {
|
|
1322
|
+
instructions;
|
|
1323
|
+
constructor(message, instructions) {
|
|
1324
|
+
super(message);
|
|
1325
|
+
this.instructions = instructions;
|
|
1326
|
+
this.name = "AuthoredFieldError";
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1329
|
+
function buildSqlType(name, spec) {
|
|
1330
|
+
const sqlType = { Name: name };
|
|
1331
|
+
if (spec.lengthLimit != null)
|
|
1332
|
+
sqlType.LengthLimit = spec.lengthLimit;
|
|
1333
|
+
if (spec.decimalPrecision != null)
|
|
1334
|
+
sqlType.DecimalPrecision = spec.decimalPrecision;
|
|
1335
|
+
if (spec.maxValue != null)
|
|
1336
|
+
sqlType.MaxValue = spec.maxValue;
|
|
1337
|
+
if (spec.minValue != null)
|
|
1338
|
+
sqlType.MinValue = spec.minValue;
|
|
1339
|
+
return sqlType;
|
|
1340
|
+
}
|
|
1341
|
+
var DEFAULT_VALUE_SHAPES = {
|
|
1342
|
+
BOOLEAN: '"true" or "false"',
|
|
1343
|
+
DECIMAL: 'a number in quotes, e.g. "0"',
|
|
1344
|
+
AUTO_NUMBER: 'a number in quotes, e.g. "0"'
|
|
1345
|
+
};
|
|
1346
|
+
function assertDefaultValue(spec, checkContent) {
|
|
1347
|
+
const value = spec.defaultValue;
|
|
1348
|
+
if (value === undefined || value === null) {
|
|
1349
|
+
return;
|
|
1350
|
+
}
|
|
1351
|
+
if (!checkContent) {
|
|
1352
|
+
return;
|
|
1353
|
+
}
|
|
1354
|
+
if (typeof value !== "string") {
|
|
1355
|
+
const shape = DEFAULT_VALUE_SHAPES[spec.type] ?? "a string";
|
|
1356
|
+
throw new AuthoredFieldError(`Field '${spec.name}': 'defaultValue' must be a string or null`, `Received ${JSON.stringify(value)}. Entity documents store every default as text, whatever the field type — for ${spec.type} pass ${shape}, or null to clear it.`);
|
|
1357
|
+
}
|
|
1358
|
+
if (spec.type === "BOOLEAN" && value.toLowerCase() !== "true" && value.toLowerCase() !== "false") {
|
|
1359
|
+
throw new AuthoredFieldError(`Field '${spec.name}': 'defaultValue' ${JSON.stringify(value)} is not a boolean`, 'A BOOLEAN default is the text "true" or "false".');
|
|
1360
|
+
}
|
|
1361
|
+
if ((spec.type === "DECIMAL" || spec.type === "AUTO_NUMBER") && (value.trim() === "" || !Number.isFinite(Number(value)))) {
|
|
1362
|
+
throw new AuthoredFieldError(`Field '${spec.name}': 'defaultValue' ${JSON.stringify(value)} is not a number`, `A ${spec.type} default is a number written as text, e.g. "0".`);
|
|
1363
|
+
}
|
|
1364
|
+
}
|
|
1365
|
+
function authorField(spec, options = {}) {
|
|
1366
|
+
const pair = TYPE_MAP[spec.type];
|
|
1367
|
+
if (pair === undefined) {
|
|
1368
|
+
const redirect = UNAUTHORABLE_TYPES[spec.type];
|
|
1369
|
+
throw new AuthoredFieldError(`Field '${spec.name}' has unsupported type '${spec.type}'`, redirect === undefined ? `Supported types: ${AUTHORABLE_FIELD_TYPES.join(", ")}.` : `${redirect}. Supported types: ${AUTHORABLE_FIELD_TYPES.join(", ")}.`);
|
|
1370
|
+
}
|
|
1371
|
+
const [fieldDisplayType, sqlTypeName] = pair;
|
|
1372
|
+
const pairKey = `${fieldDisplayType}:${sqlTypeName}`;
|
|
1373
|
+
if (!ALLOWED_TYPE_PAIRS.has(pairKey)) {
|
|
1374
|
+
throw new AuthoredFieldError(`Internal: type '${spec.type}' maps to ${pairKey}, which is not an allowed pair`, "This is a defect in author-field.ts — the type map has drifted from GA_TYPE_PAIRS.");
|
|
1375
|
+
}
|
|
1376
|
+
for (const [key, value] of [
|
|
1377
|
+
["isRequired", spec.isRequired],
|
|
1378
|
+
["isUnique", spec.isUnique]
|
|
1379
|
+
]) {
|
|
1380
|
+
if (value !== undefined && typeof value !== "boolean") {
|
|
1381
|
+
throw new AuthoredFieldError(`Field '${spec.name}': '${key}' must be true or false`, `Received ${JSON.stringify(value)}. Use a JSON boolean, not a string.`);
|
|
1382
|
+
}
|
|
1383
|
+
}
|
|
1384
|
+
for (const [key, value] of [
|
|
1385
|
+
["displayName", spec.displayName],
|
|
1386
|
+
["description", spec.description]
|
|
1387
|
+
]) {
|
|
1388
|
+
if (value !== undefined && typeof value !== "string") {
|
|
1389
|
+
throw new AuthoredFieldError(`Field '${spec.name}': '${key}' must be a string`, `Received ${JSON.stringify(value)}.`);
|
|
1390
|
+
}
|
|
1391
|
+
}
|
|
1392
|
+
assertDefaultValue(spec, options.defaultValueFromCaller !== false);
|
|
1393
|
+
const constraintError = findInvalidFieldConstraints([
|
|
1394
|
+
{
|
|
1395
|
+
name: spec.name,
|
|
1396
|
+
type: spec.type,
|
|
1397
|
+
...spec.lengthLimit != null && {
|
|
1398
|
+
lengthLimit: spec.lengthLimit
|
|
1399
|
+
},
|
|
1400
|
+
...spec.decimalPrecision != null && {
|
|
1401
|
+
decimalPrecision: spec.decimalPrecision
|
|
1402
|
+
},
|
|
1403
|
+
...spec.maxValue != null && { maxValue: spec.maxValue },
|
|
1404
|
+
...spec.minValue != null && { minValue: spec.minValue }
|
|
1405
|
+
}
|
|
1406
|
+
]);
|
|
1407
|
+
if (constraintError) {
|
|
1408
|
+
throw new AuthoredFieldError(constraintError.message, constraintError.instructions);
|
|
1409
|
+
}
|
|
1410
|
+
return {
|
|
1411
|
+
Name: spec.name,
|
|
1412
|
+
DisplayName: spec.displayName ?? spec.name,
|
|
1413
|
+
SqlType: buildSqlType(sqlTypeName, spec),
|
|
1414
|
+
IsRequired: spec.isRequired ?? false,
|
|
1415
|
+
IsUnique: spec.isUnique ?? false,
|
|
1416
|
+
IsPrimaryKey: false,
|
|
1417
|
+
IsForeignKey: false,
|
|
1418
|
+
IsExternalField: false,
|
|
1419
|
+
IsHiddenField: false,
|
|
1420
|
+
FieldCategoryId: 0,
|
|
1421
|
+
ReferenceType: DEFAULT_REFERENCE_TYPE,
|
|
1422
|
+
Transformation: null,
|
|
1423
|
+
IsEncrypted: false,
|
|
1424
|
+
Description: spec.description ?? "",
|
|
1425
|
+
IsSystemField: false,
|
|
1426
|
+
FieldDisplayType: fieldDisplayType,
|
|
1427
|
+
DefaultValue: spec.defaultValue ?? null,
|
|
1428
|
+
IsAttachment: false,
|
|
1429
|
+
IsRbacEnabled: false,
|
|
1430
|
+
IsModelReserved: false,
|
|
1431
|
+
ReferenceChoiceSet: null,
|
|
1432
|
+
ReferenceEntity: null,
|
|
1433
|
+
ReferenceField: null,
|
|
1434
|
+
ReferenceName: null
|
|
1435
|
+
};
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
// ../packager/packager-tool-datafabric/src/missing-path.ts
|
|
1439
|
+
function isMissingPathError(error) {
|
|
1440
|
+
if (!(error instanceof Error) || !("code" in error))
|
|
1441
|
+
return false;
|
|
1442
|
+
const { code } = error;
|
|
1443
|
+
return code === "ENOENT" || code === "ENOTDIR" || code === "PathNotFound";
|
|
1444
|
+
}
|
|
1445
|
+
function isFilesystemError(error) {
|
|
1446
|
+
const code = error?.code;
|
|
1447
|
+
return typeof code === "string" && /^E[A-Z]+$/.test(code);
|
|
1448
|
+
}
|
|
1449
|
+
function isUnreadablePathError(error) {
|
|
1450
|
+
return isFilesystemError(error) && !isMissingPathError(error);
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
// ../packager/packager-tool-datafabric/src/pack/constants.ts
|
|
1454
|
+
var ENTITY_EXTENSION_CONST = ".entity";
|
|
1455
|
+
var ENTITY_VALIDATION_FAILED = "ENTITY_VALIDATION_FAILED";
|
|
1456
|
+
var PACK_DIAGNOSTIC_CODES = {
|
|
1457
|
+
misplacedMainFile: "MISPLACED_MAIN_FILE",
|
|
1458
|
+
noParentSolution: "NO_PARENT_SOLUTION",
|
|
1459
|
+
solutionRootUnreadable: "SOLUTION_ROOT_UNREADABLE"
|
|
1460
|
+
};
|
|
1461
|
+
|
|
1462
|
+
// ../packager/packager-tool-datafabric/src/schema/solution-entity-names.ts
|
|
1463
|
+
function withoutOneOccurrence(names, name) {
|
|
1464
|
+
const siblings = [...names];
|
|
1465
|
+
const self = siblings.indexOf(name);
|
|
1466
|
+
if (self >= 0) {
|
|
1467
|
+
siblings.splice(self, 1);
|
|
1468
|
+
}
|
|
1469
|
+
return siblings;
|
|
1470
|
+
}
|
|
1471
|
+
function isMissingPath(error) {
|
|
1472
|
+
return error instanceof Error && "code" in error && (error.code === "ENOENT" || error.code === "PathNotFound");
|
|
1473
|
+
}
|
|
1474
|
+
async function collectSolutionEntityNames(solutionDir, fs) {
|
|
1475
|
+
const names = [];
|
|
1476
|
+
let topLevel = [];
|
|
1477
|
+
try {
|
|
1478
|
+
topLevel = await fs.readdir(solutionDir);
|
|
1479
|
+
} catch (error) {
|
|
1480
|
+
if (!isMissingPath(error)) {
|
|
1481
|
+
throw error;
|
|
1482
|
+
}
|
|
1483
|
+
return names;
|
|
1484
|
+
}
|
|
1485
|
+
for (const entry of topLevel) {
|
|
1486
|
+
if (entry === "resources" || entry.startsWith(".")) {
|
|
1487
|
+
continue;
|
|
1488
|
+
}
|
|
1489
|
+
const dir = fs.path.join(solutionDir, entry);
|
|
1490
|
+
try {
|
|
1491
|
+
const stat = await fs.stat(dir);
|
|
1492
|
+
if (!stat?.isDirectory()) {
|
|
1493
|
+
continue;
|
|
1494
|
+
}
|
|
1495
|
+
for (const file of await fs.readdir(dir)) {
|
|
1496
|
+
if (file.endsWith(ENTITY_EXTENSION_CONST)) {
|
|
1497
|
+
names.push(fs.path.basename(file, ENTITY_EXTENSION_CONST));
|
|
1498
|
+
}
|
|
1499
|
+
}
|
|
1500
|
+
} catch (error) {
|
|
1501
|
+
if (!isMissingPath(error)) {
|
|
1502
|
+
throw error;
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
return names;
|
|
1507
|
+
}
|
|
1508
|
+
async function siblingNamesFor(solutionDir, entityName, fs) {
|
|
1509
|
+
return withoutOneOccurrence(await collectSolutionEntityNames(solutionDir, fs), entityName);
|
|
1510
|
+
}
|
|
1511
|
+
async function findProjectsOwningEntity(solutionDir, entityName, fs) {
|
|
1512
|
+
const owners = [];
|
|
1513
|
+
const wanted = `${entityName}${ENTITY_EXTENSION_CONST}`.toLowerCase();
|
|
1514
|
+
let topLevel = [];
|
|
1515
|
+
try {
|
|
1516
|
+
topLevel = await fs.readdir(solutionDir);
|
|
1517
|
+
} catch (error) {
|
|
1518
|
+
if (isMissingPathError(error))
|
|
1519
|
+
return owners;
|
|
1520
|
+
throw error;
|
|
1521
|
+
}
|
|
1522
|
+
for (const entry of topLevel) {
|
|
1523
|
+
if (entry === "resources" || entry.startsWith(".")) {
|
|
1524
|
+
continue;
|
|
1525
|
+
}
|
|
1526
|
+
const dir = fs.path.join(solutionDir, entry);
|
|
1527
|
+
try {
|
|
1528
|
+
const stat = await fs.stat(dir);
|
|
1529
|
+
if (!stat?.isDirectory()) {
|
|
1530
|
+
continue;
|
|
1531
|
+
}
|
|
1532
|
+
for (const file of await fs.readdir(dir)) {
|
|
1533
|
+
if (file.toLowerCase() === wanted) {
|
|
1534
|
+
owners.push({
|
|
1535
|
+
projectName: entry,
|
|
1536
|
+
entityName: fs.path.basename(file, ENTITY_EXTENSION_CONST)
|
|
1537
|
+
});
|
|
1538
|
+
break;
|
|
1539
|
+
}
|
|
1540
|
+
}
|
|
1541
|
+
} catch (error) {
|
|
1542
|
+
if (!isMissingPathError(error))
|
|
1543
|
+
throw error;
|
|
1544
|
+
}
|
|
1545
|
+
}
|
|
1546
|
+
return owners;
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1549
|
+
// ../packager/packager-tool-datafabric/src/schema/create-entity-skeleton.ts
|
|
1550
|
+
var UNASSIGNED_FOLDER_ID = "99999999-9999-9999-9999-999999999999";
|
|
1551
|
+
function isLocallyAuthored(entity) {
|
|
1552
|
+
return entity.FolderId === UNASSIGNED_FOLDER_ID;
|
|
1553
|
+
}
|
|
1554
|
+
var SYSTEM_FIELD_DEFAULTS = {
|
|
1555
|
+
IsPrimaryKey: false,
|
|
1556
|
+
IsForeignKey: false,
|
|
1557
|
+
IsExternalField: false,
|
|
1558
|
+
IsHiddenField: true,
|
|
1559
|
+
FieldCategoryId: 0,
|
|
1560
|
+
IsUnique: false,
|
|
1561
|
+
ReferenceType: "ManyToOne",
|
|
1562
|
+
Transformation: null,
|
|
1563
|
+
IsRequired: false,
|
|
1564
|
+
IsEncrypted: false,
|
|
1565
|
+
Description: "",
|
|
1566
|
+
IsSystemField: true,
|
|
1567
|
+
FieldDisplayType: FieldDisplayType.Basic,
|
|
1568
|
+
IsAttachment: false,
|
|
1569
|
+
IsRbacEnabled: false,
|
|
1570
|
+
IsModelReserved: false
|
|
1571
|
+
};
|
|
1572
|
+
var SYSTEM_FIELD_TEMPLATES = [
|
|
1573
|
+
{
|
|
1574
|
+
...SYSTEM_FIELD_DEFAULTS,
|
|
1575
|
+
Name: "Id",
|
|
1576
|
+
DisplayName: "Id",
|
|
1577
|
+
IsPrimaryKey: true,
|
|
1578
|
+
SqlType: { Name: SqlTypeName.UNIQUEIDENTIFIER }
|
|
1579
|
+
},
|
|
1580
|
+
{
|
|
1581
|
+
...SYSTEM_FIELD_DEFAULTS,
|
|
1582
|
+
Name: "CreateTime",
|
|
1583
|
+
DisplayName: "CreateTime",
|
|
1584
|
+
SqlType: { Name: SqlTypeName.DATETIMEOFFSET }
|
|
1585
|
+
},
|
|
1586
|
+
{
|
|
1587
|
+
...SYSTEM_FIELD_DEFAULTS,
|
|
1588
|
+
Name: "CreatedBy",
|
|
1589
|
+
DisplayName: "CreatedBy",
|
|
1590
|
+
FieldDisplayType: FieldDisplayType.Relationship,
|
|
1591
|
+
SqlType: { Name: SqlTypeName.UNIQUEIDENTIFIER }
|
|
1592
|
+
},
|
|
1593
|
+
{
|
|
1594
|
+
...SYSTEM_FIELD_DEFAULTS,
|
|
1595
|
+
Name: "UpdateTime",
|
|
1596
|
+
DisplayName: "UpdateTime",
|
|
1597
|
+
SqlType: { Name: SqlTypeName.DATETIMEOFFSET }
|
|
1598
|
+
},
|
|
1599
|
+
{
|
|
1600
|
+
...SYSTEM_FIELD_DEFAULTS,
|
|
1601
|
+
Name: "UpdatedBy",
|
|
1602
|
+
DisplayName: "UpdatedBy",
|
|
1603
|
+
FieldDisplayType: FieldDisplayType.Relationship,
|
|
1604
|
+
SqlType: { Name: SqlTypeName.UNIQUEIDENTIFIER }
|
|
1605
|
+
}
|
|
1606
|
+
];
|
|
1607
|
+
function createEntitySkeleton(name) {
|
|
1608
|
+
return {
|
|
1609
|
+
Id: globalThis.crypto.randomUUID(),
|
|
1610
|
+
Name: name,
|
|
1611
|
+
DisplayName: name,
|
|
1612
|
+
EntityTypeId: 0,
|
|
1613
|
+
EntityType: "Entity",
|
|
1614
|
+
Description: "",
|
|
1615
|
+
FolderId: UNASSIGNED_FOLDER_ID,
|
|
1616
|
+
Fields: SYSTEM_FIELD_TEMPLATES.map((template) => ({
|
|
1617
|
+
...template,
|
|
1618
|
+
SqlType: { ...template.SqlType }
|
|
1619
|
+
})),
|
|
1620
|
+
Data: null,
|
|
1621
|
+
ExternalFields: null,
|
|
1622
|
+
SourceJoinCriterias: null,
|
|
1623
|
+
RecordCount: 0,
|
|
1624
|
+
StorageSizeInMB: null,
|
|
1625
|
+
UsedStorageSizeInMB: null,
|
|
1626
|
+
AttachmentSizeInByte: null,
|
|
1627
|
+
IsRbacEnabled: false,
|
|
1628
|
+
InvalidIdentifiers: [],
|
|
1629
|
+
IsModelReserved: false,
|
|
1630
|
+
CategoryId: null
|
|
1631
|
+
};
|
|
1632
|
+
}
|
|
1633
|
+
function requireAuthoredName(authored, entityName) {
|
|
1634
|
+
if (authored !== undefined && authored.Name !== entityName) {
|
|
1635
|
+
throw new AuthoredFieldError(`Authored entity '${authored.Name}' cannot be written as '${entityName}'`, "Author the document with the name it is created under.");
|
|
1636
|
+
}
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
// ../packager/packager-tool-datafabric/src/schema/validate-entity.ts
|
|
1640
|
+
var DIAGNOSTIC_CODES = {
|
|
1641
|
+
entityNameInvalid: "ENTITY_NAME_INVALID",
|
|
1642
|
+
entityNameNotUnique: "ENTITY_NAME_NOT_UNIQUE",
|
|
1643
|
+
fieldNameInvalid: "FIELD_NAME_INVALID",
|
|
1644
|
+
duplicateFieldName: "DUPLICATE_FIELD_NAME",
|
|
1645
|
+
fieldTypeNotAllowed: "FIELD_TYPE_NOT_ALLOWED",
|
|
1646
|
+
nameReserved: "NAME_RESERVED",
|
|
1647
|
+
systemFieldMissing: "SYSTEM_FIELD_MISSING",
|
|
1648
|
+
systemFieldModified: "SYSTEM_FIELD_MODIFIED",
|
|
1649
|
+
fieldsMalformed: "FIELDS_MALFORMED",
|
|
1650
|
+
tooManyMultilineMax: "TOO_MANY_MULTILINE_MAX",
|
|
1651
|
+
propertyTypeInvalid: "PROPERTY_TYPE_INVALID"
|
|
1652
|
+
};
|
|
1653
|
+
function validateEntity(entity, ctx) {
|
|
1654
|
+
const diagnostics = [];
|
|
1655
|
+
if (typeof entity?.Name !== "string") {
|
|
1656
|
+
return [
|
|
1657
|
+
{
|
|
1658
|
+
code: DIAGNOSTIC_CODES.entityNameInvalid,
|
|
1659
|
+
message: "The entity document has no 'Name'. The resource is malformed.",
|
|
1660
|
+
severity: "error"
|
|
1661
|
+
}
|
|
1662
|
+
];
|
|
1663
|
+
}
|
|
1664
|
+
const entityNameFormat = validateNameFormat(entity.Name, "entity");
|
|
1665
|
+
if (entityNameFormat) {
|
|
1666
|
+
diagnostics.push({
|
|
1667
|
+
code: DIAGNOSTIC_CODES.entityNameInvalid,
|
|
1668
|
+
message: `${entityNameFormat.message}. ${entityNameFormat.instructions}`,
|
|
1669
|
+
severity: "error"
|
|
1670
|
+
});
|
|
1671
|
+
}
|
|
1672
|
+
const reservedEntityName = findReservedNameError(entity.Name, "entity");
|
|
1673
|
+
if (reservedEntityName) {
|
|
1674
|
+
diagnostics.push({
|
|
1675
|
+
code: DIAGNOSTIC_CODES.nameReserved,
|
|
1676
|
+
message: `${reservedEntityName.message}. ${reservedEntityName.instructions}`,
|
|
1677
|
+
severity: "error"
|
|
1678
|
+
});
|
|
1679
|
+
}
|
|
1680
|
+
const entityNameLower = entity.Name.toLowerCase();
|
|
1681
|
+
if (ctx.siblingNames.some((sibling) => sibling.toLowerCase() === entityNameLower)) {
|
|
1682
|
+
diagnostics.push({
|
|
1683
|
+
code: DIAGNOSTIC_CODES.entityNameNotUnique,
|
|
1684
|
+
message: `An entity named '${entity.Name}' already exists in this solution. Entity names are solution-wide unique.`,
|
|
1685
|
+
severity: "error"
|
|
1686
|
+
});
|
|
1687
|
+
}
|
|
1688
|
+
diagnostics.push(...typeProblems(entity, ENTITY_SCALARS).map((problem) => propertyTypeDiagnostic(`Entity '${entity.Name}'`, problem)));
|
|
1689
|
+
if (!Array.isArray(entity.Fields)) {
|
|
1690
|
+
diagnostics.push({
|
|
1691
|
+
code: DIAGNOSTIC_CODES.fieldsMalformed,
|
|
1692
|
+
message: "The entity document has no usable 'Fields' array. The resource is malformed.",
|
|
1693
|
+
severity: "error"
|
|
1694
|
+
});
|
|
1695
|
+
return diagnostics;
|
|
1696
|
+
}
|
|
1697
|
+
const seenFieldNames = new Map;
|
|
1698
|
+
for (const field of entity.Fields) {
|
|
1699
|
+
if (typeof field?.Name !== "string") {
|
|
1700
|
+
diagnostics.push({
|
|
1701
|
+
code: DIAGNOSTIC_CODES.fieldNameInvalid,
|
|
1702
|
+
message: "A field has no 'Name'. Every field needs one, system or custom.",
|
|
1703
|
+
severity: "error"
|
|
1704
|
+
});
|
|
1705
|
+
continue;
|
|
1706
|
+
}
|
|
1707
|
+
const isSystem = isSystemField(field);
|
|
1708
|
+
if (!SYSTEM_FIELD_NAMES.has(field.Name)) {
|
|
1709
|
+
diagnostics.push(...fieldTypeDiagnostics(field));
|
|
1710
|
+
}
|
|
1711
|
+
const fieldNameFormat = isSystem ? null : validateNameFormat(field.Name, "field");
|
|
1712
|
+
if (fieldNameFormat) {
|
|
1713
|
+
diagnostics.push({
|
|
1714
|
+
code: DIAGNOSTIC_CODES.fieldNameInvalid,
|
|
1715
|
+
message: `${fieldNameFormat.message}. ${fieldNameFormat.instructions}`,
|
|
1716
|
+
severity: "error",
|
|
1717
|
+
fieldName: field.Name
|
|
1718
|
+
});
|
|
1719
|
+
}
|
|
1720
|
+
if (!isSystem) {
|
|
1721
|
+
const reservedFieldName = findReservedNameError(field.Name, "field");
|
|
1722
|
+
if (reservedFieldName) {
|
|
1723
|
+
diagnostics.push({
|
|
1724
|
+
code: DIAGNOSTIC_CODES.nameReserved,
|
|
1725
|
+
message: `${reservedFieldName.message}. ${reservedFieldName.instructions}`,
|
|
1726
|
+
severity: "error",
|
|
1727
|
+
fieldName: field.Name
|
|
1728
|
+
});
|
|
1729
|
+
}
|
|
1730
|
+
}
|
|
1731
|
+
const fieldNameLower = field.Name.toLowerCase();
|
|
1732
|
+
if (!isSystem && typeof entity.Name === "string" && fieldNameLower === entity.Name.toLowerCase()) {
|
|
1733
|
+
diagnostics.push({
|
|
1734
|
+
code: DIAGNOSTIC_CODES.fieldNameInvalid,
|
|
1735
|
+
message: `Field name '${field.Name}' cannot match entity name '${entity.Name}' (names are compared case-insensitively).`,
|
|
1736
|
+
severity: "error",
|
|
1737
|
+
fieldName: field.Name
|
|
1738
|
+
});
|
|
1739
|
+
}
|
|
1740
|
+
const firstWithName = seenFieldNames.get(fieldNameLower);
|
|
1741
|
+
if (firstWithName !== undefined) {
|
|
1742
|
+
diagnostics.push({
|
|
1743
|
+
code: DIAGNOSTIC_CODES.duplicateFieldName,
|
|
1744
|
+
message: `Duplicate field name '${field.Name}' (names are case-insensitive; first defined as '${firstWithName}').`,
|
|
1745
|
+
severity: "error",
|
|
1746
|
+
fieldName: field.Name
|
|
1747
|
+
});
|
|
1748
|
+
} else {
|
|
1749
|
+
seenFieldNames.set(fieldNameLower, field.Name);
|
|
1750
|
+
}
|
|
1751
|
+
if (!isSystem && !ALLOWED_TYPE_PAIRS.has(`${field.FieldDisplayType}:${field.SqlType?.Name}`)) {
|
|
1752
|
+
diagnostics.push({
|
|
1753
|
+
code: DIAGNOSTIC_CODES.fieldTypeNotAllowed,
|
|
1754
|
+
message: `Field '${field.Name}' uses an unsupported type combination ` + `(${field.FieldDisplayType} / ${field.SqlType?.Name}).`,
|
|
1755
|
+
severity: "error",
|
|
1756
|
+
fieldName: field.Name
|
|
1757
|
+
});
|
|
1758
|
+
}
|
|
1759
|
+
}
|
|
1760
|
+
const usableFields = entity.Fields.filter((field) => typeof field === "object" && field !== null);
|
|
1761
|
+
const multilineMax = usableFields.filter((field) => field.SqlType?.Name === SqlTypeName.MULTILINE_MAX);
|
|
1762
|
+
if (multilineMax.length > MAX_MULTILINE_MAX_FIELDS) {
|
|
1763
|
+
diagnostics.push({
|
|
1764
|
+
code: DIAGNOSTIC_CODES.tooManyMultilineMax,
|
|
1765
|
+
message: `Entity '${entity.Name}' defines ${multilineMax.length} MULTILINE_MAX fields; ` + `the maximum is ${MAX_MULTILINE_MAX_FIELDS}. Remove some, or use MULTILINE_TEXT where the content fits.`,
|
|
1766
|
+
severity: "error"
|
|
1767
|
+
});
|
|
1768
|
+
}
|
|
1769
|
+
diagnostics.push(...validateSystemFields(entity, usableFields));
|
|
1770
|
+
return diagnostics;
|
|
1771
|
+
}
|
|
1772
|
+
var SERVER_ASSIGNED_FIELD_PROPS = new Set([
|
|
1773
|
+
"Id",
|
|
1774
|
+
"CreateTime",
|
|
1775
|
+
"CreatedBy",
|
|
1776
|
+
"UpdateTime",
|
|
1777
|
+
"UpdatedBy"
|
|
1778
|
+
]);
|
|
1779
|
+
function isUnmodifiedSystemField(template, actual) {
|
|
1780
|
+
const equal = (left, right) => JSON.stringify(left ?? null) === JSON.stringify(right ?? null);
|
|
1781
|
+
for (const key of Object.keys(template)) {
|
|
1782
|
+
if (!equal(template[key], actual[key])) {
|
|
1783
|
+
return false;
|
|
1784
|
+
}
|
|
1785
|
+
}
|
|
1786
|
+
return Object.keys(actual).every((key) => (key in template) || SERVER_ASSIGNED_FIELD_PROPS.has(key));
|
|
1787
|
+
}
|
|
1788
|
+
function validateSystemFields(entity, usableFields) {
|
|
1789
|
+
const diagnostics = [];
|
|
1790
|
+
for (const template of SYSTEM_FIELD_TEMPLATES) {
|
|
1791
|
+
const actual = usableFields.find((field) => field.Name === template.Name);
|
|
1792
|
+
if (!actual) {
|
|
1793
|
+
diagnostics.push({
|
|
1794
|
+
code: DIAGNOSTIC_CODES.systemFieldMissing,
|
|
1795
|
+
message: `System field '${template.Name}' is missing. System fields cannot be removed.`,
|
|
1796
|
+
severity: "error",
|
|
1797
|
+
fieldName: template.Name
|
|
1798
|
+
});
|
|
1799
|
+
continue;
|
|
1800
|
+
}
|
|
1801
|
+
if (!isUnmodifiedSystemField(template, actual)) {
|
|
1802
|
+
diagnostics.push({
|
|
1803
|
+
code: DIAGNOSTIC_CODES.systemFieldModified,
|
|
1804
|
+
message: `System field '${template.Name}' was modified. System fields are read-only.`,
|
|
1805
|
+
severity: "error",
|
|
1806
|
+
fieldName: template.Name
|
|
1807
|
+
});
|
|
1808
|
+
}
|
|
1809
|
+
}
|
|
1810
|
+
return diagnostics;
|
|
1811
|
+
}
|
|
1812
|
+
function isSystemField(field) {
|
|
1813
|
+
const { IsSystemField: flag, Name: name } = field ?? {};
|
|
1814
|
+
return flag === true || typeof name === "string" && SYSTEM_FIELD_NAMES.has(name);
|
|
1815
|
+
}
|
|
1816
|
+
var SYSTEM_FIELD_NAMES = new Set(SYSTEM_FIELD_TEMPLATES.map((template) => template.Name));
|
|
1817
|
+
var ENTITY_SCALARS = [
|
|
1818
|
+
{ key: "DisplayName", kind: "string" },
|
|
1819
|
+
{ key: "Description", kind: "string" },
|
|
1820
|
+
{ key: "EntityTypeId", kind: "integer" },
|
|
1821
|
+
{ key: "RecordCount", kind: "integer" },
|
|
1822
|
+
{ key: "IsRbacEnabled", kind: "boolean" },
|
|
1823
|
+
{ key: "IsModelReserved", kind: "boolean" }
|
|
1824
|
+
];
|
|
1825
|
+
var FIELD_SCALARS = [
|
|
1826
|
+
{ key: "DisplayName", kind: "string" },
|
|
1827
|
+
{ key: "Description", kind: "string" },
|
|
1828
|
+
{ key: "ReferenceType", kind: "string" },
|
|
1829
|
+
{ key: "FieldCategoryId", kind: "integer" },
|
|
1830
|
+
{ key: "IsRequired", kind: "boolean" },
|
|
1831
|
+
{ key: "IsUnique", kind: "boolean" },
|
|
1832
|
+
{ key: "IsPrimaryKey", kind: "boolean" },
|
|
1833
|
+
{ key: "IsForeignKey", kind: "boolean" },
|
|
1834
|
+
{ key: "IsSystemField", kind: "boolean" },
|
|
1835
|
+
{ key: "IsExternalField", kind: "boolean" },
|
|
1836
|
+
{ key: "IsHiddenField", kind: "boolean" },
|
|
1837
|
+
{ key: "IsEncrypted", kind: "boolean" },
|
|
1838
|
+
{ key: "IsAttachment", kind: "boolean" },
|
|
1839
|
+
{ key: "IsRbacEnabled", kind: "boolean" },
|
|
1840
|
+
{ key: "IsModelReserved", kind: "boolean" }
|
|
1841
|
+
];
|
|
1842
|
+
var SQL_TYPE_SCALARS = [
|
|
1843
|
+
{ key: "LengthLimit", kind: "integer", nullable: true },
|
|
1844
|
+
{ key: "DecimalPrecision", kind: "integer", nullable: true },
|
|
1845
|
+
{ key: "MaxValue", kind: "number", nullable: true },
|
|
1846
|
+
{ key: "MinValue", kind: "number", nullable: true }
|
|
1847
|
+
];
|
|
1848
|
+
function typeProblems(record, rules, prefix = "") {
|
|
1849
|
+
const values = record;
|
|
1850
|
+
return rules.filter(({ key, kind, nullable }) => {
|
|
1851
|
+
const value = values[key];
|
|
1852
|
+
if (value === undefined)
|
|
1853
|
+
return false;
|
|
1854
|
+
if (value === null)
|
|
1855
|
+
return !nullable;
|
|
1856
|
+
if (kind === "integer")
|
|
1857
|
+
return !Number.isInteger(value);
|
|
1858
|
+
return kind === "number" ? !(typeof value === "number" && Number.isFinite(value)) : typeof value !== kind;
|
|
1859
|
+
}).map(({ key, kind, nullable }) => `'${prefix}${key}' must be ${kind === "integer" ? "an" : "a"} ${kind}${nullable ? " or null" : ""}`);
|
|
1860
|
+
}
|
|
1861
|
+
function propertyTypeDiagnostic(subject, problem, fieldName) {
|
|
1862
|
+
return {
|
|
1863
|
+
code: DIAGNOSTIC_CODES.propertyTypeInvalid,
|
|
1864
|
+
message: `${subject}: ${problem}. The resource was edited by hand or is malformed.`,
|
|
1865
|
+
severity: "error",
|
|
1866
|
+
...fieldName !== undefined && { fieldName }
|
|
1867
|
+
};
|
|
1868
|
+
}
|
|
1869
|
+
function fieldTypeDiagnostics(field) {
|
|
1870
|
+
const problems = typeProblems(field, FIELD_SCALARS);
|
|
1871
|
+
if (typeof field.SqlType === "object" && field.SqlType !== null) {
|
|
1872
|
+
problems.push(...typeProblems(field.SqlType, SQL_TYPE_SCALARS, "SqlType."));
|
|
1873
|
+
}
|
|
1874
|
+
const defaultValue = field.DefaultValue;
|
|
1875
|
+
const isYesNo = field.SqlType?.Name === SqlTypeName.BIT;
|
|
1876
|
+
if (defaultValue != null && typeof defaultValue !== "string" && !(isYesNo && typeof defaultValue === "boolean")) {
|
|
1877
|
+
problems.push(isYesNo ? "'DefaultValue' must be a boolean, a string or null" : "'DefaultValue' must be a string or null");
|
|
1878
|
+
}
|
|
1879
|
+
return problems.map((problem) => propertyTypeDiagnostic(`Field '${field.Name}'`, problem, field.Name));
|
|
1880
|
+
}
|
|
1881
|
+
|
|
1882
|
+
// ../packager/packager-tool-datafabric/src/resource/unified-resource-file.ts
|
|
1883
|
+
var ENTITY_RESOURCE_KIND = "entity";
|
|
1884
|
+
var ENTITY_RESOURCE_TYPE = "native";
|
|
1885
|
+
var ENTITY_RESOURCE_API_VERSION = "dataservice.uipath.com/v2";
|
|
1886
|
+
var ENTITY_RESOURCE_DOC_VERSION = "1.0.0";
|
|
1887
|
+
var SOLUTION_FOLDER = "solution_folder";
|
|
1888
|
+
var ENTITY_RESOURCE_DIR = `${ENTITY_RESOURCE_KIND}/${ENTITY_RESOURCE_TYPE}`;
|
|
1889
|
+
function entityResourcePath(entityName) {
|
|
1890
|
+
return `resources/${SOLUTION_FOLDER}/${ENTITY_RESOURCE_DIR}/${entityName}.json`;
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
// ../packager/packager-tool-datafabric/src/resource/resource-io.ts
|
|
1894
|
+
function serialize(value) {
|
|
1895
|
+
return `${JSON.stringify(value, null, 2)}
|
|
1896
|
+
`;
|
|
1897
|
+
}
|
|
1898
|
+
function serializeEntityJson(entity) {
|
|
1899
|
+
return JSON.stringify(entity);
|
|
1900
|
+
}
|
|
1901
|
+
|
|
1902
|
+
class EntityResourceError extends Error {
|
|
1903
|
+
failure;
|
|
1904
|
+
constructor(failure, message) {
|
|
1905
|
+
super(message);
|
|
1906
|
+
this.failure = failure;
|
|
1907
|
+
this.name = "EntityResourceError";
|
|
1908
|
+
}
|
|
1909
|
+
}
|
|
1910
|
+
function wrapEntityJson(entity) {
|
|
1911
|
+
return {
|
|
1912
|
+
docVersion: ENTITY_RESOURCE_DOC_VERSION,
|
|
1913
|
+
resource: {
|
|
1914
|
+
name: entity.Name,
|
|
1915
|
+
kind: ENTITY_RESOURCE_KIND,
|
|
1916
|
+
type: ENTITY_RESOURCE_TYPE,
|
|
1917
|
+
apiVersion: ENTITY_RESOURCE_API_VERSION,
|
|
1918
|
+
isOverridable: true,
|
|
1919
|
+
dependencies: [],
|
|
1920
|
+
runtimeDependencies: [],
|
|
1921
|
+
folders: [{ fullyQualifiedName: SOLUTION_FOLDER }],
|
|
1922
|
+
spec: {
|
|
1923
|
+
resourceJson: serializeEntityJson(entity),
|
|
1924
|
+
name: entity.Name,
|
|
1925
|
+
displayName: entity.DisplayName,
|
|
1926
|
+
description: entity.Description
|
|
1927
|
+
},
|
|
1928
|
+
locks: [],
|
|
1929
|
+
key: entity.Id,
|
|
1930
|
+
files: []
|
|
1931
|
+
}
|
|
1932
|
+
};
|
|
1933
|
+
}
|
|
1934
|
+
function unwrapResource(file) {
|
|
1935
|
+
if (typeof file !== "object" || file === null || Array.isArray(file)) {
|
|
1936
|
+
throw new EntityResourceError("NotAnObject", "Resource file is not a JSON object.");
|
|
1937
|
+
}
|
|
1938
|
+
const resource = file.resource;
|
|
1939
|
+
if (typeof resource !== "object" || resource === null) {
|
|
1940
|
+
throw new EntityResourceError("MissingResource", "Resource file has no 'resource' object.");
|
|
1941
|
+
}
|
|
1942
|
+
if (resource.kind !== ENTITY_RESOURCE_KIND) {
|
|
1943
|
+
throw new EntityResourceError("NotAnEntityResource", `Resource kind is '${String(resource.kind)}', expected '${ENTITY_RESOURCE_KIND}'.`);
|
|
1944
|
+
}
|
|
1945
|
+
const spec = resource.spec;
|
|
1946
|
+
if (typeof spec !== "object" || spec === null || typeof spec.resourceJson !== "string") {
|
|
1947
|
+
throw new EntityResourceError("MissingSpec", "Resource file has no 'spec.resourceJson' string.");
|
|
1948
|
+
}
|
|
1949
|
+
try {
|
|
1950
|
+
return JSON.parse(spec.resourceJson);
|
|
1951
|
+
} catch {
|
|
1952
|
+
throw new EntityResourceError("ResourceJsonUnparsable", "'spec.resourceJson' is not valid JSON.");
|
|
1953
|
+
}
|
|
1954
|
+
}
|
|
1955
|
+
function updateResourceSchema(file, entity) {
|
|
1956
|
+
return {
|
|
1957
|
+
...file,
|
|
1958
|
+
resource: {
|
|
1959
|
+
...file.resource,
|
|
1960
|
+
name: entity.Name,
|
|
1961
|
+
spec: {
|
|
1962
|
+
...file.resource.spec,
|
|
1963
|
+
resourceJson: serializeEntityJson(entity),
|
|
1964
|
+
name: entity.Name,
|
|
1965
|
+
displayName: entity.DisplayName,
|
|
1966
|
+
description: entity.Description
|
|
1967
|
+
}
|
|
1968
|
+
}
|
|
1969
|
+
};
|
|
1970
|
+
}
|
|
1971
|
+
|
|
1972
|
+
// ../packager/packager-tool-datafabric/src/pack/verify-pair.ts
|
|
1973
|
+
async function verifyPair(stubFile, solutionDir, fs) {
|
|
1974
|
+
const parsedStub = await readStub(stubFile, fs);
|
|
1975
|
+
if ("failure" in parsedStub) {
|
|
1976
|
+
return { ok: false, failure: parsedStub.failure };
|
|
1977
|
+
}
|
|
1978
|
+
const stub = parsedStub.stub;
|
|
1979
|
+
const baseName = fs.path.basename(stubFile, ENTITY_EXTENSION_CONST);
|
|
1980
|
+
if (baseName !== stub.name) {
|
|
1981
|
+
return fail("StubFileNameMismatch", `Stub file '${baseName}${ENTITY_EXTENSION_CONST}' names entity '${stub.name}' — the filename and the entity name must match.`);
|
|
1982
|
+
}
|
|
1983
|
+
const solutionRoot = fs.path.resolve(solutionDir);
|
|
1984
|
+
const resourceFile = fs.path.resolve(solutionRoot, ...stub.resourcePath.split("/"));
|
|
1985
|
+
const boundary = resourceFile.charAt(solutionRoot.length);
|
|
1986
|
+
if (!resourceFile.startsWith(solutionRoot) || boundary !== "/" && boundary !== "\\") {
|
|
1987
|
+
return fail("ResourcePathEscapes", `'${stub.name}': resourcePath '${stub.resourcePath}' points outside the solution.`);
|
|
1988
|
+
}
|
|
1989
|
+
const parsedResource = await readResource(resourceFile, stub.name, stub.resourcePath, fs);
|
|
1990
|
+
if ("failure" in parsedResource) {
|
|
1991
|
+
return { ok: false, failure: parsedResource.failure };
|
|
1992
|
+
}
|
|
1993
|
+
const resourceRaw = parsedResource.raw;
|
|
1994
|
+
let entity;
|
|
1995
|
+
try {
|
|
1996
|
+
entity = unwrapResource(resourceRaw);
|
|
1997
|
+
} catch (error) {
|
|
1998
|
+
const detail = error instanceof EntityResourceError ? ` (${error.failure})` : "";
|
|
1999
|
+
return fail("ResourceInvalid", `'${stub.name}': resource '${stub.resourcePath}' is not a valid entity resource${detail}.`);
|
|
2000
|
+
}
|
|
2001
|
+
if (entity.Name !== stub.name) {
|
|
2002
|
+
return fail("NameCoupling", `Stub '${stub.name}' points at a resource defining entity '${entity.Name}' — the names must match.`);
|
|
2003
|
+
}
|
|
2004
|
+
return { ok: true, entityName: stub.name, resourceFile, entity };
|
|
2005
|
+
}
|
|
2006
|
+
function fail(code, message) {
|
|
2007
|
+
return { ok: false, failure: { code, message } };
|
|
2008
|
+
}
|
|
2009
|
+
async function readStub(stubFile, fs) {
|
|
2010
|
+
let parsed;
|
|
2011
|
+
try {
|
|
2012
|
+
const raw = await fs.readFile(stubFile);
|
|
2013
|
+
if (raw === null) {
|
|
2014
|
+
return failure("StubUnparsable", `'${stubFile}' could not be read.`);
|
|
2015
|
+
}
|
|
2016
|
+
parsed = JSON.parse(decode(raw));
|
|
2017
|
+
} catch {
|
|
2018
|
+
return failure("StubUnparsable", `'${stubFile}' is not valid JSON.`);
|
|
2019
|
+
}
|
|
2020
|
+
if (typeof parsed !== "object" || parsed === null || typeof parsed.name !== "string" || typeof parsed.resourcePath !== "string") {
|
|
2021
|
+
return failure("StubUnparsable", `'${stubFile}' must be an object with string 'name' and 'resourcePath'.`);
|
|
2022
|
+
}
|
|
2023
|
+
return { stub: { name: parsed.name, resourcePath: parsed.resourcePath } };
|
|
2024
|
+
}
|
|
2025
|
+
async function readResource(resourceFile, entityName, resourcePath, fs) {
|
|
2026
|
+
const missing = failure("ResourceMissing", `'${entityName}': definition resource '${resourcePath}' is missing. Restore it (check trash/backup) or delete the entity.`);
|
|
2027
|
+
try {
|
|
2028
|
+
const raw = await fs.readFile(resourceFile);
|
|
2029
|
+
if (raw === null) {
|
|
2030
|
+
return missing;
|
|
2031
|
+
}
|
|
2032
|
+
return { raw: JSON.parse(decode(raw)) };
|
|
2033
|
+
} catch (error) {
|
|
2034
|
+
if (error instanceof SyntaxError) {
|
|
2035
|
+
return failure("ResourceInvalid", `'${entityName}': resource '${resourcePath}' is not valid JSON.`);
|
|
2036
|
+
}
|
|
2037
|
+
return missing;
|
|
2038
|
+
}
|
|
2039
|
+
}
|
|
2040
|
+
function decode(raw) {
|
|
2041
|
+
return typeof raw === "string" ? raw : new TextDecoder().decode(raw);
|
|
2042
|
+
}
|
|
2043
|
+
function failure(code, message) {
|
|
2044
|
+
return { failure: { code, message } };
|
|
2045
|
+
}
|
|
2046
|
+
async function findSolutionRoot(startDir, fs) {
|
|
2047
|
+
let dir = fs.path.resolve(startDir);
|
|
2048
|
+
let unreadable;
|
|
2049
|
+
for (;; ) {
|
|
2050
|
+
const [error, entries] = await catchError(fs.readdir(dir));
|
|
2051
|
+
if (error && isUnreadablePathError(error)) {
|
|
2052
|
+
unreadable ??= error;
|
|
2053
|
+
}
|
|
2054
|
+
if (entries?.some((name) => name.endsWith(".uipx"))) {
|
|
2055
|
+
if (unreadable) {
|
|
2056
|
+
throw Object.assign(new Error(`Could not locate the solution from '${startDir}': ${unreadable.message}. A directory between here and the nearest .uipx cannot be read, and it may be the solution itself — fix read access and retry.`, { cause: unreadable }), { code: unreadable.code });
|
|
2057
|
+
}
|
|
2058
|
+
return dir;
|
|
2059
|
+
}
|
|
2060
|
+
const parent = fs.path.dirname(dir);
|
|
2061
|
+
if (parent === dir) {
|
|
2062
|
+
return;
|
|
2063
|
+
}
|
|
2064
|
+
dir = parent;
|
|
2065
|
+
}
|
|
2066
|
+
}
|
|
2067
|
+
|
|
2068
|
+
// ../packager/packager-tool-datafabric/src/pack/entity-project-tool.ts
|
|
2069
|
+
class EntityProjectTool extends ProjectTool {
|
|
2070
|
+
async validateAsync(options, _cancellationToken) {
|
|
2071
|
+
return this.checkProjectAsync(options.projectPath);
|
|
2072
|
+
}
|
|
2073
|
+
async packAsync(options, _cancellationToken) {
|
|
2074
|
+
const result = await this.checkProjectAsync(options.projectPath);
|
|
2075
|
+
if (result.isSuccess) {
|
|
2076
|
+
this.logger.info("Entity project is valid — no package emitted; the entity resources are the deployable payload.");
|
|
2077
|
+
}
|
|
2078
|
+
return result;
|
|
2079
|
+
}
|
|
2080
|
+
async checkProjectAsync(projectPath) {
|
|
2081
|
+
const fs = this.fileSystem;
|
|
2082
|
+
const diagnostics = [];
|
|
2083
|
+
let entries = [];
|
|
2084
|
+
try {
|
|
2085
|
+
entries = await fs.readdir(projectPath);
|
|
2086
|
+
} catch {
|
|
2087
|
+
return new ToolResult(ENTITY_VALIDATION_FAILED, `Entity project directory '${projectPath}' could not be read.`, [], "Check that the project path in the solution manifest points at an existing directory.");
|
|
2088
|
+
}
|
|
2089
|
+
const stubs = sorted(entries.filter((name) => name.endsWith(ENTITY_EXTENSION_CONST)));
|
|
2090
|
+
for (const foreign of sorted(entries.filter((name) => name.endsWith(".flow")))) {
|
|
2091
|
+
diagnostics.push({
|
|
2092
|
+
file: fs.path.join(projectPath, foreign),
|
|
2093
|
+
code: PACK_DIAGNOSTIC_CODES.misplacedMainFile,
|
|
2094
|
+
message: `'${foreign}' is a Flow main file inside an Entity project — move it to a Flow project.`
|
|
2095
|
+
});
|
|
2096
|
+
}
|
|
2097
|
+
const [rootError, solutionDir] = await catchError(findSolutionRoot(projectPath, fs));
|
|
2098
|
+
if (rootError) {
|
|
2099
|
+
if (stubs.length > 0) {
|
|
2100
|
+
diagnostics.push({
|
|
2101
|
+
file: projectPath,
|
|
2102
|
+
code: PACK_DIAGNOSTIC_CODES.solutionRootUnreadable,
|
|
2103
|
+
message: rootError.message
|
|
2104
|
+
});
|
|
2105
|
+
}
|
|
2106
|
+
} else if (solutionDir === undefined) {
|
|
2107
|
+
if (stubs.length > 0) {
|
|
2108
|
+
diagnostics.push({
|
|
2109
|
+
file: projectPath,
|
|
2110
|
+
code: PACK_DIAGNOSTIC_CODES.noParentSolution,
|
|
2111
|
+
message: "Entity project has no parent solution (.uipx not found) — the stubs' solution-relative resource pointers cannot resolve."
|
|
2112
|
+
});
|
|
2113
|
+
}
|
|
2114
|
+
} else {
|
|
2115
|
+
diagnostics.push(...await this.checkStubsAsync(projectPath, solutionDir, stubs));
|
|
2116
|
+
}
|
|
2117
|
+
if (diagnostics.length === 0) {
|
|
2118
|
+
return ToolResult.success();
|
|
2119
|
+
}
|
|
2120
|
+
const result = new ToolResult(ENTITY_VALIDATION_FAILED, `Entity validation failed with ${diagnostics.length} issue(s). First: ${diagnostics[0]?.message}`, [], "Fix the listed entities (open them in the entity editor, or restore missing resources) and pack again.");
|
|
2121
|
+
result.details = { diagnostics };
|
|
2122
|
+
return result;
|
|
2123
|
+
}
|
|
2124
|
+
async checkStubsAsync(projectPath, solutionDir, stubs) {
|
|
2125
|
+
const fs = this.fileSystem;
|
|
2126
|
+
const diagnostics = [];
|
|
2127
|
+
const allEntityNames = await collectSolutionEntityNames(solutionDir, fs);
|
|
2128
|
+
for (const stubName of stubs) {
|
|
2129
|
+
const stubFile = fs.path.join(projectPath, stubName);
|
|
2130
|
+
const pair = await verifyPair(stubFile, solutionDir, fs);
|
|
2131
|
+
if (!pair.ok) {
|
|
2132
|
+
diagnostics.push({
|
|
2133
|
+
file: stubFile,
|
|
2134
|
+
code: pair.failure.code,
|
|
2135
|
+
message: pair.failure.message
|
|
2136
|
+
});
|
|
2137
|
+
continue;
|
|
2138
|
+
}
|
|
2139
|
+
for (const diagnostic of validateEntity(pair.entity, {
|
|
2140
|
+
siblingNames: withoutOneOccurrence(allEntityNames, pair.entityName)
|
|
2141
|
+
})) {
|
|
2142
|
+
diagnostics.push({
|
|
2143
|
+
file: pair.resourceFile,
|
|
2144
|
+
code: diagnostic.code,
|
|
2145
|
+
message: diagnostic.message,
|
|
2146
|
+
fieldName: diagnostic.fieldName
|
|
2147
|
+
});
|
|
2148
|
+
}
|
|
2149
|
+
}
|
|
2150
|
+
return diagnostics;
|
|
2151
|
+
}
|
|
2152
|
+
}
|
|
2153
|
+
function sorted(names) {
|
|
2154
|
+
return [...names].sort(compareCodeUnits);
|
|
2155
|
+
}
|
|
2156
|
+
function compareCodeUnits(left, right) {
|
|
2157
|
+
if (left < right) {
|
|
2158
|
+
return -1;
|
|
2159
|
+
}
|
|
2160
|
+
return left > right ? 1 : 0;
|
|
2161
|
+
}
|
|
2162
|
+
|
|
2163
|
+
// ../packager/packager-tool-datafabric/src/pack/entity-tool-factory.ts
|
|
2164
|
+
class EntityToolFactory {
|
|
2165
|
+
supportedTypes = ["Entity"];
|
|
2166
|
+
async createAsync(logger, fileSystem) {
|
|
2167
|
+
return new EntityProjectTool(fileSystem, logger);
|
|
2168
|
+
}
|
|
2169
|
+
}
|
|
2170
|
+
export { toolsFactoryRepository, isMissingPathError, isUnreadablePathError, ENTITY_EXTENSION_CONST, collectSolutionEntityNames, siblingNamesFor, findProjectsOwningEntity, byName, AUTHORABLE_FIELD_TYPES, AuthoredFieldError, authorField, isLocallyAuthored, createEntitySkeleton, requireAuthoredName, validateEntity, isSystemField, SOLUTION_FOLDER, ENTITY_RESOURCE_DIR, entityResourcePath, serialize, wrapEntityJson, unwrapResource, updateResourceSchema, verifyPair, findSolutionRoot, EntityToolFactory };
|
|
2171
|
+
|
|
2172
|
+
//# debugId=44571A5454A7CC7764756E2164756E21
|