@uipath/function-tool 1.202.0-preview.159 → 1.203.0-preview.160

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.
@@ -1,660 +1,911 @@
1
+ import {
2
+ zipSync
3
+ } from "./packager-tool-b098y4a2.js";
1
4
  import {
2
5
  __require
3
6
  } from "./packager-tool-1de529jm.js";
7
+ // ../packager/packager-core/src/i18n/types.ts
8
+ function isPluralForm(value) {
9
+ return typeof value === "object" && value !== null && "other" in value;
10
+ }
11
+ function selectPluralForm(forms, count) {
12
+ if (count === 0 && forms.zero !== undefined) {
13
+ return forms.zero;
14
+ }
15
+ if (count === 1 && forms.one !== undefined) {
16
+ return forms.one;
17
+ }
18
+ if (count === 2 && forms.two !== undefined) {
19
+ return forms.two;
20
+ }
21
+ if (forms.few !== undefined) {
22
+ const mod10 = count % 10;
23
+ const mod100 = count % 100;
24
+ if (mod10 >= 2 && mod10 <= 4 && (mod100 < 10 || mod100 >= 20)) {
25
+ return forms.few;
26
+ }
27
+ }
28
+ if (forms.many !== undefined) {
29
+ const mod10 = count % 10;
30
+ const mod100 = count % 100;
31
+ if (count === 0 || mod10 === 0 && mod100 !== 0 || mod10 >= 5 && mod10 <= 9 || mod100 >= 11 && mod100 <= 14) {
32
+ return forms.many;
33
+ }
34
+ }
35
+ return forms.other;
36
+ }
4
37
 
5
- // ../../node_modules/fflate/esm/index.mjs
6
- import { createRequire } from "module";
7
- var require2 = createRequire("/");
8
- var _a;
9
- var Worker;
10
- var isMarkedAsUntransferable;
11
- try {
12
- _a = require2("worker_threads"), Worker = _a.Worker, isMarkedAsUntransferable = _a.isMarkedAsUntransferable;
13
- } catch (e) {}
14
- var u8 = Uint8Array;
15
- var u16 = Uint16Array;
16
- var i32 = Int32Array;
17
- var fleb = new u8([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0]);
18
- var fdeb = new u8([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0]);
19
- var clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);
20
- var freb = function(eb, start) {
21
- var b = new u16(31);
22
- for (var i = 0;i < 31; ++i) {
23
- b[i] = start += 1 << eb[i - 1];
24
- }
25
- var r = new i32(b[30]);
26
- for (var i = 1;i < 30; ++i) {
27
- for (var j = b[i];j < b[i + 1]; ++j) {
28
- r[j] = j - b[i] << 5 | i;
29
- }
30
- }
31
- return { b, r };
32
- };
33
- var _a = freb(fleb, 2);
34
- var fl = _a.b;
35
- var revfl = _a.r;
36
- fl[28] = 258, revfl[258] = 28;
37
- var _b = freb(fdeb, 0);
38
- var fd = _b.b;
39
- var revfd = _b.r;
40
- var rev = new u16(32768);
41
- for (i = 0;i < 32768; ++i) {
42
- x = (i & 43690) >> 1 | (i & 21845) << 1;
43
- x = (x & 52428) >> 2 | (x & 13107) << 2;
44
- x = (x & 61680) >> 4 | (x & 3855) << 4;
45
- rev[i] = ((x & 65280) >> 8 | (x & 255) << 8) >> 1;
38
+ // ../packager/packager-core/src/i18n/i18n-manager.ts
39
+ class I18nManager {
40
+ static translations = {};
41
+ static currentLocale = "en";
42
+ static fallbackLocale = "en";
43
+ static registerTranslations(locale, catalog) {
44
+ if (!I18nManager.translations[locale]) {
45
+ I18nManager.translations[locale] = {};
46
+ }
47
+ I18nManager.translations[locale] = I18nManager.deepMerge(I18nManager.translations[locale], catalog);
48
+ }
49
+ static setLocale(locale) {
50
+ const normalized = I18nManager.normalizeLocale(locale);
51
+ if (I18nManager.translations[normalized]) {
52
+ I18nManager.currentLocale = normalized;
53
+ return normalized;
54
+ }
55
+ const baseLocale = normalized.split("-")[0];
56
+ if (baseLocale !== normalized && I18nManager.translations[baseLocale]) {
57
+ I18nManager.currentLocale = baseLocale;
58
+ return baseLocale;
59
+ }
60
+ return I18nManager.currentLocale;
61
+ }
62
+ static getLocale() {
63
+ return I18nManager.currentLocale;
64
+ }
65
+ static setFallbackLocale(locale) {
66
+ I18nManager.fallbackLocale = I18nManager.normalizeLocale(locale);
67
+ }
68
+ static t(key, params, locale) {
69
+ const targetLocale = locale ? I18nManager.normalizeLocale(locale) : I18nManager.currentLocale;
70
+ let value = I18nManager.getTranslationValue(key, targetLocale);
71
+ if (value === undefined && targetLocale !== I18nManager.fallbackLocale) {
72
+ value = I18nManager.getTranslationValue(key, I18nManager.fallbackLocale);
73
+ }
74
+ if (value === undefined) {
75
+ return key;
76
+ }
77
+ if (isPluralForm(value) && params && "count" in params) {
78
+ const count = typeof params.count === "number" ? params.count : Number(params.count);
79
+ value = selectPluralForm(value, count);
80
+ } else if (isPluralForm(value)) {
81
+ value = value.other;
82
+ }
83
+ if (typeof value !== "string") {
84
+ return key;
85
+ }
86
+ return params ? I18nManager.interpolate(value, params) : value;
87
+ }
88
+ static has(key, locale) {
89
+ const targetLocale = locale ? I18nManager.normalizeLocale(locale) : I18nManager.currentLocale;
90
+ const value = I18nManager.getTranslationValue(key, targetLocale);
91
+ if (value !== undefined) {
92
+ return true;
93
+ }
94
+ if (targetLocale !== I18nManager.fallbackLocale) {
95
+ return I18nManager.getTranslationValue(key, I18nManager.fallbackLocale) !== undefined;
96
+ }
97
+ return false;
98
+ }
99
+ static getAvailableLocales() {
100
+ return Object.keys(I18nManager.translations);
101
+ }
102
+ static clearTranslations() {
103
+ I18nManager.translations = {};
104
+ I18nManager.currentLocale = "en";
105
+ }
106
+ static getTranslationValue(key, locale) {
107
+ const catalog = I18nManager.translations[locale];
108
+ if (!catalog) {
109
+ return;
110
+ }
111
+ const keys = key.split(".");
112
+ let value = catalog;
113
+ for (const k of keys) {
114
+ if (value && typeof value === "object" && k in value) {
115
+ value = value[k];
116
+ } else {
117
+ return;
118
+ }
119
+ }
120
+ return value;
121
+ }
122
+ static interpolate(template, params) {
123
+ return template.replace(/\{(\w+)\}/g, (_, key) => {
124
+ const value = params[key];
125
+ return value !== undefined ? String(value) : `{${key}}`;
126
+ });
127
+ }
128
+ static normalizeLocale(locale) {
129
+ const normalized = locale.toLowerCase().replace(/_/g, "-");
130
+ const specialLocales = ["es-mx", "pt-br", "zh-cn", "zh-tw"];
131
+ if (specialLocales.includes(normalized)) {
132
+ return normalized;
133
+ }
134
+ return normalized.split("-")[0];
135
+ }
136
+ static deepMerge(target, source) {
137
+ const result = { ...target };
138
+ for (const key of Object.keys(source)) {
139
+ const sourceValue = source[key];
140
+ const targetValue = result[key];
141
+ if (sourceValue && typeof sourceValue === "object" && !Array.isArray(sourceValue) && targetValue && typeof targetValue === "object" && !Array.isArray(targetValue)) {
142
+ result[key] = I18nManager.deepMerge(targetValue, sourceValue);
143
+ } else {
144
+ result[key] = sourceValue;
145
+ }
146
+ }
147
+ return result;
148
+ }
46
149
  }
47
- var x;
48
- var i;
49
- var hMap = function(cd, mb, r) {
50
- var s = cd.length;
51
- var i2 = 0;
52
- var l = new u16(mb);
53
- for (;i2 < s; ++i2) {
54
- if (cd[i2])
55
- ++l[cd[i2] - 1];
56
- }
57
- var le = new u16(mb);
58
- for (i2 = 1;i2 < mb; ++i2) {
59
- le[i2] = le[i2 - 1] + l[i2 - 1] << 1;
60
- }
61
- var co;
62
- if (r) {
63
- co = new u16(1 << mb);
64
- var rvb = 15 - mb;
65
- for (i2 = 0;i2 < s; ++i2) {
66
- if (cd[i2]) {
67
- var sv = i2 << 4 | cd[i2];
68
- var r_1 = mb - cd[i2];
69
- var v = le[cd[i2] - 1]++ << r_1;
70
- for (var m = v | (1 << r_1) - 1;v <= m; ++v) {
71
- co[rev[v] >> rvb] = sv;
72
- }
150
+
151
+ // ../packager/packager-core/src/i18n/locales/de.ts
152
+ var de = {
153
+ toolCore: {
154
+ errors: {
155
+ internal: "Internal error: {message}",
156
+ fileNotFound: "File not found: {path}",
157
+ fileReadFailed: "Failed to read file: {path}",
158
+ fileWriteFailed: "Failed to write file: {path}",
159
+ directoryNotFound: "Directory not found: {path}",
160
+ invalidPath: "{path} is not a valid path",
161
+ operationCanceled: "Operation was canceled",
162
+ invalidParameter: "Invalid parameter: {parameter}"
163
+ },
164
+ progress: {
165
+ copying: "Copying files...",
166
+ building: "Building project...",
167
+ packaging: "Creating package...",
168
+ validating: "Validating...",
169
+ analyzing: "Analyzing...",
170
+ restoring: "Restoring dependencies..."
171
+ },
172
+ validation: {
173
+ requiredField: "{field} is required",
174
+ invalidValue: "Invalid value for {field}",
175
+ pathNotFound: "Path not found: {path}",
176
+ fileRequired: "File is required: {path}",
177
+ directoryRequired: "Directory is required: {path}"
178
+ },
179
+ warnings: {
180
+ factoryAlreadyRegistered: "A factory is already registered for project type '{type}'. Skipping duplicate registration."
181
+ },
182
+ info: {
183
+ operationComplete: "Operation completed successfully",
184
+ filesProcessed: {
185
+ zero: "No files processed",
186
+ one: "{count} file processed",
187
+ other: "{count} files processed"
188
+ }
189
+ }
190
+ }
191
+ };
192
+
193
+ // ../packager/packager-core/src/i18n/locales/en.ts
194
+ var en = {
195
+ toolCore: {
196
+ errors: {
197
+ internal: "Internal error: {message}",
198
+ fileNotFound: "File not found: {path}",
199
+ fileReadFailed: "Failed to read file: {path}",
200
+ fileWriteFailed: "Failed to write file: {path}",
201
+ directoryNotFound: "Directory not found: {path}",
202
+ invalidPath: "{path} is not a valid path",
203
+ operationCanceled: "Operation was canceled",
204
+ invalidParameter: "Invalid parameter: {parameter}"
205
+ },
206
+ progress: {
207
+ copying: "Copying files...",
208
+ building: "Building project...",
209
+ packaging: "Creating package...",
210
+ validating: "Validating...",
211
+ analyzing: "Analyzing...",
212
+ restoring: "Restoring dependencies..."
213
+ },
214
+ validation: {
215
+ requiredField: "{field} is required",
216
+ invalidValue: "Invalid value for {field}",
217
+ pathNotFound: "Path not found: {path}",
218
+ fileRequired: "File is required: {path}",
219
+ directoryRequired: "Directory is required: {path}"
220
+ },
221
+ warnings: {
222
+ factoryAlreadyRegistered: "A factory is already registered for project type '{type}'. Skipping duplicate registration."
223
+ },
224
+ info: {
225
+ operationComplete: "Operation completed successfully",
226
+ filesProcessed: {
227
+ zero: "No files processed",
228
+ one: "{count} file processed",
229
+ other: "{count} files processed"
230
+ }
231
+ }
232
+ }
233
+ };
234
+
235
+ // ../packager/packager-core/src/i18n/locales/es.ts
236
+ var es = {
237
+ toolCore: {
238
+ errors: {
239
+ internal: "Internal error: {message}",
240
+ fileNotFound: "File not found: {path}",
241
+ fileReadFailed: "Failed to read file: {path}",
242
+ fileWriteFailed: "Failed to write file: {path}",
243
+ directoryNotFound: "Directory not found: {path}",
244
+ invalidPath: "{path} is not a valid path",
245
+ operationCanceled: "Operation was canceled",
246
+ invalidParameter: "Invalid parameter: {parameter}"
247
+ },
248
+ progress: {
249
+ copying: "Copying files...",
250
+ building: "Building project...",
251
+ packaging: "Creating package...",
252
+ validating: "Validating...",
253
+ analyzing: "Analyzing...",
254
+ restoring: "Restoring dependencies..."
255
+ },
256
+ validation: {
257
+ requiredField: "{field} is required",
258
+ invalidValue: "Invalid value for {field}",
259
+ pathNotFound: "Path not found: {path}",
260
+ fileRequired: "File is required: {path}",
261
+ directoryRequired: "Directory is required: {path}"
262
+ },
263
+ warnings: {
264
+ factoryAlreadyRegistered: "A factory is already registered for project type '{type}'. Skipping duplicate registration."
265
+ },
266
+ info: {
267
+ operationComplete: "Operation completed successfully",
268
+ filesProcessed: {
269
+ zero: "No files processed",
270
+ one: "{count} file processed",
271
+ other: "{count} files processed"
272
+ }
273
+ }
274
+ }
275
+ };
276
+
277
+ // ../packager/packager-core/src/i18n/locales/es-MX.ts
278
+ var es_MX = {
279
+ toolCore: {
280
+ errors: {
281
+ internal: "Internal error: {message}",
282
+ fileNotFound: "File not found: {path}",
283
+ fileReadFailed: "Failed to read file: {path}",
284
+ fileWriteFailed: "Failed to write file: {path}",
285
+ directoryNotFound: "Directory not found: {path}",
286
+ invalidPath: "{path} is not a valid path",
287
+ operationCanceled: "Operation was canceled",
288
+ invalidParameter: "Invalid parameter: {parameter}"
289
+ },
290
+ progress: {
291
+ copying: "Copying files...",
292
+ building: "Building project...",
293
+ packaging: "Creating package...",
294
+ validating: "Validating...",
295
+ analyzing: "Analyzing...",
296
+ restoring: "Restoring dependencies..."
297
+ },
298
+ validation: {
299
+ requiredField: "{field} is required",
300
+ invalidValue: "Invalid value for {field}",
301
+ pathNotFound: "Path not found: {path}",
302
+ fileRequired: "File is required: {path}",
303
+ directoryRequired: "Directory is required: {path}"
304
+ },
305
+ warnings: {
306
+ factoryAlreadyRegistered: "A factory is already registered for project type '{type}'. Skipping duplicate registration."
307
+ },
308
+ info: {
309
+ operationComplete: "Operation completed successfully",
310
+ filesProcessed: {
311
+ zero: "No files processed",
312
+ one: "{count} file processed",
313
+ other: "{count} files processed"
314
+ }
315
+ }
316
+ }
317
+ };
318
+
319
+ // ../packager/packager-core/src/i18n/locales/fr.ts
320
+ var fr = {
321
+ toolCore: {
322
+ errors: {
323
+ internal: "Internal error: {message}",
324
+ fileNotFound: "File not found: {path}",
325
+ fileReadFailed: "Failed to read file: {path}",
326
+ fileWriteFailed: "Failed to write file: {path}",
327
+ directoryNotFound: "Directory not found: {path}",
328
+ invalidPath: "{path} is not a valid path",
329
+ operationCanceled: "Operation was canceled",
330
+ invalidParameter: "Invalid parameter: {parameter}"
331
+ },
332
+ progress: {
333
+ copying: "Copying files...",
334
+ building: "Building project...",
335
+ packaging: "Creating package...",
336
+ validating: "Validating...",
337
+ analyzing: "Analyzing...",
338
+ restoring: "Restoring dependencies..."
339
+ },
340
+ validation: {
341
+ requiredField: "{field} is required",
342
+ invalidValue: "Invalid value for {field}",
343
+ pathNotFound: "Path not found: {path}",
344
+ fileRequired: "File is required: {path}",
345
+ directoryRequired: "Directory is required: {path}"
346
+ },
347
+ warnings: {
348
+ factoryAlreadyRegistered: "A factory is already registered for project type '{type}'. Skipping duplicate registration."
349
+ },
350
+ info: {
351
+ operationComplete: "Operation completed successfully",
352
+ filesProcessed: {
353
+ zero: "No files processed",
354
+ one: "{count} file processed",
355
+ other: "{count} files processed"
356
+ }
357
+ }
358
+ }
359
+ };
360
+
361
+ // ../packager/packager-core/src/i18n/locales/ja.ts
362
+ var ja = {
363
+ toolCore: {
364
+ errors: {
365
+ internal: "Internal error: {message}",
366
+ fileNotFound: "File not found: {path}",
367
+ fileReadFailed: "Failed to read file: {path}",
368
+ fileWriteFailed: "Failed to write file: {path}",
369
+ directoryNotFound: "Directory not found: {path}",
370
+ invalidPath: "{path} is not a valid path",
371
+ operationCanceled: "Operation was canceled",
372
+ invalidParameter: "Invalid parameter: {parameter}"
373
+ },
374
+ progress: {
375
+ copying: "Copying files...",
376
+ building: "Building project...",
377
+ packaging: "Creating package...",
378
+ validating: "Validating...",
379
+ analyzing: "Analyzing...",
380
+ restoring: "Restoring dependencies..."
381
+ },
382
+ validation: {
383
+ requiredField: "{field} is required",
384
+ invalidValue: "Invalid value for {field}",
385
+ pathNotFound: "Path not found: {path}",
386
+ fileRequired: "File is required: {path}",
387
+ directoryRequired: "Directory is required: {path}"
388
+ },
389
+ warnings: {
390
+ factoryAlreadyRegistered: "A factory is already registered for project type '{type}'. Skipping duplicate registration."
391
+ },
392
+ info: {
393
+ operationComplete: "Operation completed successfully",
394
+ filesProcessed: {
395
+ zero: "No files processed",
396
+ one: "{count} file processed",
397
+ other: "{count} files processed"
398
+ }
399
+ }
400
+ }
401
+ };
402
+
403
+ // ../packager/packager-core/src/i18n/locales/ko.ts
404
+ var ko = {
405
+ toolCore: {
406
+ errors: {
407
+ internal: "Internal error: {message}",
408
+ fileNotFound: "File not found: {path}",
409
+ fileReadFailed: "Failed to read file: {path}",
410
+ fileWriteFailed: "Failed to write file: {path}",
411
+ directoryNotFound: "Directory not found: {path}",
412
+ invalidPath: "{path} is not a valid path",
413
+ operationCanceled: "Operation was canceled",
414
+ invalidParameter: "Invalid parameter: {parameter}"
415
+ },
416
+ progress: {
417
+ copying: "Copying files...",
418
+ building: "Building project...",
419
+ packaging: "Creating package...",
420
+ validating: "Validating...",
421
+ analyzing: "Analyzing...",
422
+ restoring: "Restoring dependencies..."
423
+ },
424
+ validation: {
425
+ requiredField: "{field} is required",
426
+ invalidValue: "Invalid value for {field}",
427
+ pathNotFound: "Path not found: {path}",
428
+ fileRequired: "File is required: {path}",
429
+ directoryRequired: "Directory is required: {path}"
430
+ },
431
+ warnings: {
432
+ factoryAlreadyRegistered: "A factory is already registered for project type '{type}'. Skipping duplicate registration."
433
+ },
434
+ info: {
435
+ operationComplete: "Operation completed successfully",
436
+ filesProcessed: {
437
+ zero: "No files processed",
438
+ one: "{count} file processed",
439
+ other: "{count} files processed"
440
+ }
441
+ }
442
+ }
443
+ };
444
+
445
+ // ../packager/packager-core/src/i18n/locales/pt.ts
446
+ var pt = {
447
+ toolCore: {
448
+ errors: {
449
+ internal: "Internal error: {message}",
450
+ fileNotFound: "File not found: {path}",
451
+ fileReadFailed: "Failed to read file: {path}",
452
+ fileWriteFailed: "Failed to write file: {path}",
453
+ directoryNotFound: "Directory not found: {path}",
454
+ invalidPath: "{path} is not a valid path",
455
+ operationCanceled: "Operation was canceled",
456
+ invalidParameter: "Invalid parameter: {parameter}"
457
+ },
458
+ progress: {
459
+ copying: "Copying files...",
460
+ building: "Building project...",
461
+ packaging: "Creating package...",
462
+ validating: "Validating...",
463
+ analyzing: "Analyzing...",
464
+ restoring: "Restoring dependencies..."
465
+ },
466
+ validation: {
467
+ requiredField: "{field} is required",
468
+ invalidValue: "Invalid value for {field}",
469
+ pathNotFound: "Path not found: {path}",
470
+ fileRequired: "File is required: {path}",
471
+ directoryRequired: "Directory is required: {path}"
472
+ },
473
+ warnings: {
474
+ factoryAlreadyRegistered: "A factory is already registered for project type '{type}'. Skipping duplicate registration."
475
+ },
476
+ info: {
477
+ operationComplete: "Operation completed successfully",
478
+ filesProcessed: {
479
+ zero: "No files processed",
480
+ one: "{count} file processed",
481
+ other: "{count} files processed"
73
482
  }
74
483
  }
75
- } else {
76
- co = new u16(s);
77
- for (i2 = 0;i2 < s; ++i2) {
78
- if (cd[i2]) {
79
- co[i2] = rev[le[cd[i2] - 1]++] >> 15 - cd[i2];
484
+ }
485
+ };
486
+
487
+ // ../packager/packager-core/src/i18n/locales/pt-BR.ts
488
+ var pt_BR = {
489
+ toolCore: {
490
+ errors: {
491
+ internal: "Internal error: {message}",
492
+ fileNotFound: "File not found: {path}",
493
+ fileReadFailed: "Failed to read file: {path}",
494
+ fileWriteFailed: "Failed to write file: {path}",
495
+ directoryNotFound: "Directory not found: {path}",
496
+ invalidPath: "{path} is not a valid path",
497
+ operationCanceled: "Operation was canceled",
498
+ invalidParameter: "Invalid parameter: {parameter}"
499
+ },
500
+ progress: {
501
+ copying: "Copying files...",
502
+ building: "Building project...",
503
+ packaging: "Creating package...",
504
+ validating: "Validating...",
505
+ analyzing: "Analyzing...",
506
+ restoring: "Restoring dependencies..."
507
+ },
508
+ validation: {
509
+ requiredField: "{field} is required",
510
+ invalidValue: "Invalid value for {field}",
511
+ pathNotFound: "Path not found: {path}",
512
+ fileRequired: "File is required: {path}",
513
+ directoryRequired: "Directory is required: {path}"
514
+ },
515
+ warnings: {
516
+ factoryAlreadyRegistered: "A factory is already registered for project type '{type}'. Skipping duplicate registration."
517
+ },
518
+ info: {
519
+ operationComplete: "Operation completed successfully",
520
+ filesProcessed: {
521
+ zero: "No files processed",
522
+ one: "{count} file processed",
523
+ other: "{count} files processed"
80
524
  }
81
525
  }
82
526
  }
83
- return co;
84
527
  };
85
- var flt = new u8(288);
86
- for (i = 0;i < 144; ++i)
87
- flt[i] = 8;
88
- var i;
89
- for (i = 144;i < 256; ++i)
90
- flt[i] = 9;
91
- var i;
92
- for (i = 256;i < 280; ++i)
93
- flt[i] = 7;
94
- var i;
95
- for (i = 280;i < 288; ++i)
96
- flt[i] = 8;
97
- var i;
98
- var fdt = new u8(32);
99
- for (i = 0;i < 32; ++i)
100
- fdt[i] = 5;
101
- var i;
102
- var flm = /* @__PURE__ */ hMap(flt, 9, 0);
103
- var fdm = /* @__PURE__ */ hMap(fdt, 5, 0);
104
- var shft = function(p) {
105
- return (p + 7) / 8 | 0;
106
- };
107
- var slc = function(v, s, e) {
108
- if (s == null || s < 0)
109
- s = 0;
110
- if (e == null || e > v.length)
111
- e = v.length;
112
- return new u8(v.subarray(s, e));
528
+
529
+ // ../packager/packager-core/src/i18n/locales/ro.ts
530
+ var ro = {
531
+ toolCore: {
532
+ errors: {
533
+ internal: "Internal error: {message}",
534
+ fileNotFound: "File not found: {path}",
535
+ fileReadFailed: "Failed to read file: {path}",
536
+ fileWriteFailed: "Failed to write file: {path}",
537
+ directoryNotFound: "Directory not found: {path}",
538
+ invalidPath: "{path} is not a valid path",
539
+ operationCanceled: "Operation was canceled",
540
+ invalidParameter: "Invalid parameter: {parameter}"
541
+ },
542
+ progress: {
543
+ copying: "Copying files...",
544
+ building: "Building project...",
545
+ packaging: "Creating package...",
546
+ validating: "Validating...",
547
+ analyzing: "Analyzing...",
548
+ restoring: "Restoring dependencies..."
549
+ },
550
+ validation: {
551
+ requiredField: "{field} is required",
552
+ invalidValue: "Invalid value for {field}",
553
+ pathNotFound: "Path not found: {path}",
554
+ fileRequired: "File is required: {path}",
555
+ directoryRequired: "Directory is required: {path}"
556
+ },
557
+ warnings: {
558
+ factoryAlreadyRegistered: "A factory is already registered for project type '{type}'. Skipping duplicate registration."
559
+ },
560
+ info: {
561
+ operationComplete: "Operation completed successfully",
562
+ filesProcessed: {
563
+ zero: "No files processed",
564
+ one: "{count} file processed",
565
+ other: "{count} files processed"
566
+ }
567
+ }
568
+ }
113
569
  };
114
- var ec = [
115
- "unexpected EOF",
116
- "invalid block type",
117
- "invalid length/literal",
118
- "invalid distance",
119
- "stream finished",
120
- "no stream handler",
121
- ,
122
- "no callback",
123
- "invalid UTF-8 data",
124
- "extra field too long",
125
- "date not in range 1980-2099",
126
- "filename too long",
127
- "stream finishing",
128
- "invalid zip data"
129
- ];
130
- var err = function(ind, msg, nt) {
131
- var e = new Error(msg || ec[ind]);
132
- e.code = ind;
133
- if (Error.captureStackTrace)
134
- Error.captureStackTrace(e, err);
135
- if (!nt)
136
- throw e;
137
- return e;
570
+
571
+ // ../packager/packager-core/src/i18n/locales/ru.ts
572
+ var ru = {
573
+ toolCore: {
574
+ errors: {
575
+ internal: "Internal error: {message}",
576
+ fileNotFound: "File not found: {path}",
577
+ fileReadFailed: "Failed to read file: {path}",
578
+ fileWriteFailed: "Failed to write file: {path}",
579
+ directoryNotFound: "Directory not found: {path}",
580
+ invalidPath: "{path} is not a valid path",
581
+ operationCanceled: "Operation was canceled",
582
+ invalidParameter: "Invalid parameter: {parameter}"
583
+ },
584
+ progress: {
585
+ copying: "Copying files...",
586
+ building: "Building project...",
587
+ packaging: "Creating package...",
588
+ validating: "Validating...",
589
+ analyzing: "Analyzing...",
590
+ restoring: "Restoring dependencies..."
591
+ },
592
+ validation: {
593
+ requiredField: "{field} is required",
594
+ invalidValue: "Invalid value for {field}",
595
+ pathNotFound: "Path not found: {path}",
596
+ fileRequired: "File is required: {path}",
597
+ directoryRequired: "Directory is required: {path}"
598
+ },
599
+ warnings: {
600
+ factoryAlreadyRegistered: "A factory is already registered for project type '{type}'. Skipping duplicate registration."
601
+ },
602
+ info: {
603
+ operationComplete: "Operation completed successfully",
604
+ filesProcessed: {
605
+ zero: "No files processed",
606
+ one: "{count} file processed",
607
+ other: "{count} files processed"
608
+ }
609
+ }
610
+ }
138
611
  };
139
- var wbits = function(d, p, v) {
140
- v <<= p & 7;
141
- var o = p / 8 | 0;
142
- d[o] |= v;
143
- d[o + 1] |= v >> 8;
612
+
613
+ // ../packager/packager-core/src/i18n/locales/tr.ts
614
+ var tr = {
615
+ toolCore: {
616
+ errors: {
617
+ internal: "Internal error: {message}",
618
+ fileNotFound: "File not found: {path}",
619
+ fileReadFailed: "Failed to read file: {path}",
620
+ fileWriteFailed: "Failed to write file: {path}",
621
+ directoryNotFound: "Directory not found: {path}",
622
+ invalidPath: "{path} is not a valid path",
623
+ operationCanceled: "Operation was canceled",
624
+ invalidParameter: "Invalid parameter: {parameter}"
625
+ },
626
+ progress: {
627
+ copying: "Copying files...",
628
+ building: "Building project...",
629
+ packaging: "Creating package...",
630
+ validating: "Validating...",
631
+ analyzing: "Analyzing...",
632
+ restoring: "Restoring dependencies..."
633
+ },
634
+ validation: {
635
+ requiredField: "{field} is required",
636
+ invalidValue: "Invalid value for {field}",
637
+ pathNotFound: "Path not found: {path}",
638
+ fileRequired: "File is required: {path}",
639
+ directoryRequired: "Directory is required: {path}"
640
+ },
641
+ warnings: {
642
+ factoryAlreadyRegistered: "A factory is already registered for project type '{type}'. Skipping duplicate registration."
643
+ },
644
+ info: {
645
+ operationComplete: "Operation completed successfully",
646
+ filesProcessed: {
647
+ zero: "No files processed",
648
+ one: "{count} file processed",
649
+ other: "{count} files processed"
650
+ }
651
+ }
652
+ }
144
653
  };
145
- var wbits16 = function(d, p, v) {
146
- v <<= p & 7;
147
- var o = p / 8 | 0;
148
- d[o] |= v;
149
- d[o + 1] |= v >> 8;
150
- d[o + 2] |= v >> 16;
654
+
655
+ // ../packager/packager-core/src/i18n/locales/zh-CN.ts
656
+ var zh_CN = {
657
+ toolCore: {
658
+ errors: {
659
+ internal: "Internal error: {message}",
660
+ fileNotFound: "File not found: {path}",
661
+ fileReadFailed: "Failed to read file: {path}",
662
+ fileWriteFailed: "Failed to write file: {path}",
663
+ directoryNotFound: "Directory not found: {path}",
664
+ invalidPath: "{path} is not a valid path",
665
+ operationCanceled: "Operation was canceled",
666
+ invalidParameter: "Invalid parameter: {parameter}"
667
+ },
668
+ progress: {
669
+ copying: "Copying files...",
670
+ building: "Building project...",
671
+ packaging: "Creating package...",
672
+ validating: "Validating...",
673
+ analyzing: "Analyzing...",
674
+ restoring: "Restoring dependencies..."
675
+ },
676
+ validation: {
677
+ requiredField: "{field} is required",
678
+ invalidValue: "Invalid value for {field}",
679
+ pathNotFound: "Path not found: {path}",
680
+ fileRequired: "File is required: {path}",
681
+ directoryRequired: "Directory is required: {path}"
682
+ },
683
+ warnings: {
684
+ factoryAlreadyRegistered: "A factory is already registered for project type '{type}'. Skipping duplicate registration."
685
+ },
686
+ info: {
687
+ operationComplete: "Operation completed successfully",
688
+ filesProcessed: {
689
+ zero: "No files processed",
690
+ one: "{count} file processed",
691
+ other: "{count} files processed"
692
+ }
693
+ }
694
+ }
151
695
  };
152
- var hTree = function(d, mb) {
153
- var t = [];
154
- for (var i2 = 0;i2 < d.length; ++i2) {
155
- if (d[i2])
156
- t.push({ s: i2, f: d[i2] });
157
- }
158
- var s = t.length;
159
- var t2 = t.slice();
160
- if (!s)
161
- return { t: et, l: 0 };
162
- if (s == 1) {
163
- var v = new u8(t[0].s + 1);
164
- v[t[0].s] = 1;
165
- return { t: v, l: 1 };
166
- }
167
- t.sort(function(a, b) {
168
- return a.f - b.f;
169
- });
170
- t.push({ s: -1, f: 25001 });
171
- var l = t[0], r = t[1], i0 = 0, i1 = 1, i22 = 2;
172
- t[0] = { s: -1, f: l.f + r.f, l, r };
173
- while (i1 != s - 1) {
174
- l = t[t[i0].f < t[i22].f ? i0++ : i22++];
175
- r = t[i0 != i1 && t[i0].f < t[i22].f ? i0++ : i22++];
176
- t[i1++] = { s: -1, f: l.f + r.f, l, r };
177
- }
178
- var maxSym = t2[0].s;
179
- for (var i2 = 1;i2 < s; ++i2) {
180
- if (t2[i2].s > maxSym)
181
- maxSym = t2[i2].s;
182
- }
183
- var tr = new u16(maxSym + 1);
184
- var mbt = ln(t[i1 - 1], tr, 0);
185
- if (mbt > mb) {
186
- var i2 = 0, dt = 0;
187
- var lft = mbt - mb, cst = 1 << lft;
188
- t2.sort(function(a, b) {
189
- return tr[b.s] - tr[a.s] || a.f - b.f;
190
- });
191
- for (;i2 < s; ++i2) {
192
- var i2_1 = t2[i2].s;
193
- if (tr[i2_1] > mb) {
194
- dt += cst - (1 << mbt - tr[i2_1]);
195
- tr[i2_1] = mb;
196
- } else
197
- break;
198
- }
199
- dt >>= lft;
200
- while (dt > 0) {
201
- var i2_2 = t2[i2].s;
202
- if (tr[i2_2] < mb)
203
- dt -= 1 << mb - tr[i2_2]++ - 1;
204
- else
205
- ++i2;
206
- }
207
- for (;i2 >= 0 && dt; --i2) {
208
- var i2_3 = t2[i2].s;
209
- if (tr[i2_3] == mb) {
210
- --tr[i2_3];
211
- ++dt;
696
+
697
+ // ../packager/packager-core/src/i18n/locales/zh-TW.ts
698
+ var zh_TW = {
699
+ toolCore: {
700
+ errors: {
701
+ internal: "Internal error: {message}",
702
+ fileNotFound: "File not found: {path}",
703
+ fileReadFailed: "Failed to read file: {path}",
704
+ fileWriteFailed: "Failed to write file: {path}",
705
+ directoryNotFound: "Directory not found: {path}",
706
+ invalidPath: "{path} is not a valid path",
707
+ operationCanceled: "Operation was canceled",
708
+ invalidParameter: "Invalid parameter: {parameter}"
709
+ },
710
+ progress: {
711
+ copying: "Copying files...",
712
+ building: "Building project...",
713
+ packaging: "Creating package...",
714
+ validating: "Validating...",
715
+ analyzing: "Analyzing...",
716
+ restoring: "Restoring dependencies..."
717
+ },
718
+ validation: {
719
+ requiredField: "{field} is required",
720
+ invalidValue: "Invalid value for {field}",
721
+ pathNotFound: "Path not found: {path}",
722
+ fileRequired: "File is required: {path}",
723
+ directoryRequired: "Directory is required: {path}"
724
+ },
725
+ warnings: {
726
+ factoryAlreadyRegistered: "A factory is already registered for project type '{type}'. Skipping duplicate registration."
727
+ },
728
+ info: {
729
+ operationComplete: "Operation completed successfully",
730
+ filesProcessed: {
731
+ zero: "No files processed",
732
+ one: "{count} file processed",
733
+ other: "{count} files processed"
212
734
  }
213
735
  }
214
- mbt = mb;
215
736
  }
216
- return { t: new u8(tr), l: mbt };
217
- };
218
- var ln = function(n, l, d) {
219
- return n.s == -1 ? Math.max(ln(n.l, l, d + 1), ln(n.r, l, d + 1)) : l[n.s] = d;
220
737
  };
221
- var lc = function(c) {
222
- var s = c.length;
223
- while (s && !c[--s])
224
- ;
225
- var cl = new u16(++s);
226
- var cli = 0, cln = c[0], cls = 1;
227
- var w = function(v) {
228
- cl[cli++] = v;
229
- };
230
- for (var i2 = 1;i2 <= s; ++i2) {
231
- if (c[i2] == cln && i2 != s)
232
- ++cls;
233
- else {
234
- if (!cln && cls > 2) {
235
- for (;cls > 138; cls -= 138)
236
- w(32754);
237
- if (cls > 2) {
238
- w(cls > 10 ? cls - 11 << 5 | 28690 : cls - 3 << 5 | 12305);
239
- cls = 0;
240
- }
241
- } else if (cls > 3) {
242
- w(cln), --cls;
243
- for (;cls > 6; cls -= 6)
244
- w(8304);
245
- if (cls > 2)
246
- w(cls - 3 << 5 | 8208), cls = 0;
738
+
739
+ // ../packager/packager-core/src/i18n/locales/zu.ts
740
+ var zu = {
741
+ toolCore: {
742
+ errors: {
743
+ internal: "Internal error: {message}",
744
+ fileNotFound: "File not found: {path}",
745
+ fileReadFailed: "Failed to read file: {path}",
746
+ fileWriteFailed: "Failed to write file: {path}",
747
+ directoryNotFound: "Directory not found: {path}",
748
+ invalidPath: "{path} is not a valid path",
749
+ operationCanceled: "Operation was canceled",
750
+ invalidParameter: "Invalid parameter: {parameter}"
751
+ },
752
+ progress: {
753
+ copying: "Copying files...",
754
+ building: "Building project...",
755
+ packaging: "Creating package...",
756
+ validating: "Validating...",
757
+ analyzing: "Analyzing...",
758
+ restoring: "Restoring dependencies..."
759
+ },
760
+ validation: {
761
+ requiredField: "{field} is required",
762
+ invalidValue: "Invalid value for {field}",
763
+ pathNotFound: "Path not found: {path}",
764
+ fileRequired: "File is required: {path}",
765
+ directoryRequired: "Directory is required: {path}"
766
+ },
767
+ warnings: {
768
+ factoryAlreadyRegistered: "A factory is already registered for project type '{type}'. Skipping duplicate registration."
769
+ },
770
+ info: {
771
+ operationComplete: "Operation completed successfully",
772
+ filesProcessed: {
773
+ zero: "No files processed",
774
+ one: "{count} file processed",
775
+ other: "{count} files processed"
247
776
  }
248
- while (cls--)
249
- w(cln);
250
- cls = 1;
251
- cln = c[i2];
252
777
  }
253
778
  }
254
- return { c: cl.subarray(0, cli), n: s };
255
- };
256
- var clen = function(cf, cl) {
257
- var l = 0;
258
- for (var i2 = 0;i2 < cl.length; ++i2)
259
- l += cf[i2] * cl[i2];
260
- return l;
261
779
  };
262
- var wfblk = function(out, pos, dat) {
263
- var s = dat.length;
264
- var o = shft(pos + 2);
265
- out[o] = s & 255;
266
- out[o + 1] = s >> 8;
267
- out[o + 2] = out[o] ^ 255;
268
- out[o + 3] = out[o + 1] ^ 255;
269
- for (var i2 = 0;i2 < s; ++i2)
270
- out[o + i2 + 4] = dat[i2];
271
- return (o + 4 + s) * 8;
272
- };
273
- var wblk = function(dat, out, final, syms, lf, df, eb, li, bs, bl, p) {
274
- wbits(out, p++, final);
275
- ++lf[256];
276
- var _a2 = hTree(lf, 15), dlt = _a2.t, mlb = _a2.l;
277
- var _b2 = hTree(df, 15), ddt = _b2.t, mdb = _b2.l;
278
- var _c = lc(dlt), lclt = _c.c, nlc = _c.n;
279
- var _d = lc(ddt), lcdt = _d.c, ndc = _d.n;
280
- var lcfreq = new u16(19);
281
- for (var i2 = 0;i2 < lclt.length; ++i2)
282
- ++lcfreq[lclt[i2] & 31];
283
- for (var i2 = 0;i2 < lcdt.length; ++i2)
284
- ++lcfreq[lcdt[i2] & 31];
285
- var _e = hTree(lcfreq, 7), lct = _e.t, mlcb = _e.l;
286
- var nlcc = 19;
287
- for (;nlcc > 4 && !lct[clim[nlcc - 1]]; --nlcc)
288
- ;
289
- var flen = bl + 5 << 3;
290
- var ftlen = clen(lf, flt) + clen(df, fdt) + eb;
291
- var dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) + 2 * lcfreq[16] + 3 * lcfreq[17] + 7 * lcfreq[18];
292
- if (bs >= 0 && flen <= ftlen && flen <= dtlen)
293
- return wfblk(out, p, dat.subarray(bs, bs + bl));
294
- var lm, ll, dm, dl;
295
- wbits(out, p, 1 + (dtlen < ftlen)), p += 2;
296
- if (dtlen < ftlen) {
297
- lm = hMap(dlt, mlb, 0), ll = dlt, dm = hMap(ddt, mdb, 0), dl = ddt;
298
- var llm = hMap(lct, mlcb, 0);
299
- wbits(out, p, nlc - 257);
300
- wbits(out, p + 5, ndc - 1);
301
- wbits(out, p + 10, nlcc - 4);
302
- p += 14;
303
- for (var i2 = 0;i2 < nlcc; ++i2)
304
- wbits(out, p + 3 * i2, lct[clim[i2]]);
305
- p += 3 * nlcc;
306
- var lcts = [lclt, lcdt];
307
- for (var it = 0;it < 2; ++it) {
308
- var clct = lcts[it];
309
- for (var i2 = 0;i2 < clct.length; ++i2) {
310
- var len = clct[i2] & 31;
311
- wbits(out, p, llm[len]), p += lct[len];
312
- if (len > 15)
313
- wbits(out, p, clct[i2] >> 5 & 127), p += clct[i2] >> 12;
314
- }
780
+
781
+ // ../packager/packager-core/src/i18n/translation-service.ts
782
+ class TranslationService {
783
+ static instance;
784
+ currentLocale = "en";
785
+ constructor() {}
786
+ static getInstance() {
787
+ if (!TranslationService.instance) {
788
+ TranslationService.instance = new TranslationService;
315
789
  }
316
- } else {
317
- lm = flm, ll = flt, dm = fdm, dl = fdt;
318
- }
319
- for (var i2 = 0;i2 < li; ++i2) {
320
- var sym = syms[i2];
321
- if (sym > 255) {
322
- var len = sym >> 18 & 31;
323
- wbits16(out, p, lm[len + 257]), p += ll[len + 257];
324
- if (len > 7)
325
- wbits(out, p, sym >> 23 & 31), p += fleb[len];
326
- var dst = sym & 31;
327
- wbits16(out, p, dm[dst]), p += dl[dst];
328
- if (dst > 3)
329
- wbits16(out, p, sym >> 5 & 8191), p += fdeb[dst];
330
- } else {
331
- wbits16(out, p, lm[sym]), p += ll[sym];
332
- }
333
- }
334
- wbits16(out, p, lm[256]);
335
- return p + ll[256];
336
- };
337
- var deo = /* @__PURE__ */ new i32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);
338
- var et = /* @__PURE__ */ new u8(0);
339
- var dflt = function(dat, lvl, plvl, pre, post, st) {
340
- var s = st.z || dat.length;
341
- var o = new u8(pre + s + 5 * (1 + Math.ceil(s / 7000)) + post);
342
- var w = o.subarray(pre, o.length - post);
343
- var lst = st.l;
344
- var pos = (st.r || 0) & 7;
345
- if (lvl) {
346
- if (pos)
347
- w[0] = st.r >> 3;
348
- var opt = deo[lvl - 1];
349
- var n = opt >> 13, c = opt & 8191;
350
- var msk_1 = (1 << plvl) - 1;
351
- var prev = st.p || new u16(32768), head = st.h || new u16(msk_1 + 1);
352
- var bs1_1 = Math.ceil(plvl / 3), bs2_1 = 2 * bs1_1;
353
- var hsh = function(i3) {
354
- return (dat[i3] ^ dat[i3 + 1] << bs1_1 ^ dat[i3 + 2] << bs2_1) & msk_1;
355
- };
356
- var syms = new i32(25000);
357
- var lf = new u16(288), df = new u16(32);
358
- var lc_1 = 0, eb = 0, i2 = st.i || 0, li = 0, wi = st.w || 0, bs = 0;
359
- for (;i2 + 2 < s; ++i2) {
360
- var hv = hsh(i2);
361
- var imod = i2 & 32767, pimod = head[hv];
362
- prev[imod] = pimod;
363
- head[hv] = imod;
364
- if (wi <= i2) {
365
- var rem = s - i2;
366
- if ((lc_1 > 7000 || li > 24576) && (rem > 423 || !lst)) {
367
- pos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i2 - bs, pos);
368
- li = lc_1 = eb = 0, bs = i2;
369
- for (var j = 0;j < 286; ++j)
370
- lf[j] = 0;
371
- for (var j = 0;j < 30; ++j)
372
- df[j] = 0;
373
- }
374
- var l = 2, d = 0, ch_1 = c, dif = imod - pimod & 32767;
375
- if (rem > 2 && hv == hsh(i2 - dif)) {
376
- var maxn = Math.min(n, rem) - 1;
377
- var maxd = Math.min(32767, i2);
378
- var ml = Math.min(258, rem);
379
- while (dif <= maxd && --ch_1 && imod != pimod) {
380
- if (dat[i2 + l] == dat[i2 + l - dif]) {
381
- var nl = 0;
382
- for (;nl < ml && dat[i2 + nl] == dat[i2 + nl - dif]; ++nl)
383
- ;
384
- if (nl > l) {
385
- l = nl, d = dif;
386
- if (nl > maxn)
387
- break;
388
- var mmd = Math.min(dif, nl - 2);
389
- var md = 0;
390
- for (var j = 0;j < mmd; ++j) {
391
- var ti = i2 - dif + j & 32767;
392
- var pti = prev[ti];
393
- var cd = ti - pti & 32767;
394
- if (cd > md)
395
- md = cd, pimod = ti;
396
- }
397
- }
398
- }
399
- imod = pimod, pimod = prev[imod];
400
- dif += imod - pimod & 32767;
401
- }
402
- }
403
- if (d) {
404
- syms[li++] = 268435456 | revfl[l] << 18 | revfd[d];
405
- var lin = revfl[l] & 31, din = revfd[d] & 31;
406
- eb += fleb[lin] + fdeb[din];
407
- ++lf[257 + lin];
408
- ++df[din];
409
- wi = i2 + l;
410
- ++lc_1;
411
- } else {
412
- syms[li++] = dat[i2];
413
- ++lf[dat[i2]];
790
+ return TranslationService.instance;
791
+ }
792
+ setLocale(locale) {
793
+ this.currentLocale = I18nManager.setLocale(locale);
794
+ }
795
+ getLocale() {
796
+ return this.currentLocale;
797
+ }
798
+ t(key, params) {
799
+ return I18nManager.t(key, params, this.currentLocale);
800
+ }
801
+ tLocale(key, locale, params) {
802
+ return I18nManager.t(key, params, locale);
803
+ }
804
+ has(key) {
805
+ return I18nManager.has(key, this.currentLocale);
806
+ }
807
+ getAvailableLocales() {
808
+ return I18nManager.getAvailableLocales();
809
+ }
810
+ }
811
+ var translate = TranslationService.getInstance();
812
+
813
+ // ../packager/packager-core/src/i18n/index.ts
814
+ I18nManager.registerTranslations("en", en);
815
+ I18nManager.registerTranslations("de", de);
816
+ I18nManager.registerTranslations("es", es);
817
+ I18nManager.registerTranslations("es-mx", es_MX);
818
+ I18nManager.registerTranslations("fr", fr);
819
+ I18nManager.registerTranslations("ja", ja);
820
+ I18nManager.registerTranslations("ko", ko);
821
+ I18nManager.registerTranslations("pt", pt);
822
+ I18nManager.registerTranslations("pt-br", pt_BR);
823
+ I18nManager.registerTranslations("ro", ro);
824
+ I18nManager.registerTranslations("ru", ru);
825
+ I18nManager.registerTranslations("tr", tr);
826
+ I18nManager.registerTranslations("zh-cn", zh_CN);
827
+ I18nManager.registerTranslations("zh-tw", zh_TW);
828
+ I18nManager.registerTranslations("zu", zu);
829
+ I18nManager.setLocale("en");
830
+ // ../packager/packager-core/src/models/tool-result.ts
831
+ class ToolResult {
832
+ errorCode;
833
+ message;
834
+ packages;
835
+ details;
836
+ instructions;
837
+ constructor(errorCode, message, packages = [], instructions) {
838
+ this.errorCode = errorCode;
839
+ this.message = message;
840
+ this.packages = packages;
841
+ this.instructions = instructions;
842
+ }
843
+ get isSuccess() {
844
+ return this.errorCode === "SUCCESS" /* Success */;
845
+ }
846
+ static success() {
847
+ return new ToolResult("SUCCESS" /* Success */);
848
+ }
849
+ static error(errorCode, message, instructions) {
850
+ return new ToolResult(errorCode, message, [], instructions);
851
+ }
852
+ }
853
+ // ../packager/packager-core/src/services/tools-factory-repository.ts
854
+ class ToolsFactoryRepository {
855
+ projectFactoryMap = new Map;
856
+ solutionFactory = null;
857
+ registerProjectToolFactory(factory) {
858
+ for (const type of factory.supportedTypes) {
859
+ const existing = this.projectFactoryMap.get(type);
860
+ if (existing) {
861
+ if (existing.constructor?.name !== factory.constructor?.name) {
862
+ console.warn(`Tool factory conflict for project type '${type}': ` + `'${existing.constructor?.name}' already registered, ` + `ignoring '${factory.constructor?.name}'.`);
414
863
  }
864
+ continue;
415
865
  }
866
+ this.projectFactoryMap.set(type, factory);
416
867
  }
417
- for (i2 = Math.max(i2, wi);i2 < s; ++i2) {
418
- syms[li++] = dat[i2];
419
- ++lf[dat[i2]];
420
- }
421
- pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i2 - bs, pos);
422
- if (!lst) {
423
- st.r = pos & 7 | w[pos / 8 | 0] << 3;
424
- pos -= 7;
425
- st.h = head, st.p = prev, st.i = i2, st.w = wi;
426
- }
427
- } else {
428
- for (var i2 = st.w || 0;i2 < s + lst; i2 += 65535) {
429
- var e = i2 + 65535;
430
- if (e >= s) {
431
- w[pos / 8 | 0] = lst;
432
- e = s;
433
- }
434
- pos = wfblk(w, pos + 1, dat.subarray(i2, e));
435
- }
436
- st.i = s;
437
868
  }
438
- return slc(o, 0, pre + shft(pos) + post);
439
- };
440
- var crct = /* @__PURE__ */ function() {
441
- var t = new Int32Array(256);
442
- for (var i2 = 0;i2 < 256; ++i2) {
443
- var c = i2, k = 9;
444
- while (--k)
445
- c = (c & 1 && -306674912) ^ c >>> 1;
446
- t[i2] = c;
447
- }
448
- return t;
449
- }();
450
- var crc = function() {
451
- var c = -1;
452
- return {
453
- p: function(d) {
454
- var cr = c;
455
- for (var i2 = 0;i2 < d.length; ++i2)
456
- cr = crct[cr & 255 ^ d[i2]] ^ cr >>> 8;
457
- c = cr;
458
- },
459
- d: function() {
460
- return ~c;
461
- }
462
- };
463
- };
464
- var dopt = function(dat, opt, pre, post, st) {
465
- if (!st) {
466
- st = { l: 1 };
467
- if (opt.dictionary) {
468
- var dict = opt.dictionary.subarray(-32768);
469
- var newDat = new u8(dict.length + dat.length);
470
- newDat.set(dict);
471
- newDat.set(dat, dict.length);
472
- dat = newDat;
473
- st.w = dict.length;
474
- }
475
- }
476
- return dflt(dat, opt.level == null ? 6 : opt.level, opt.mem == null ? st.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : 20 : 12 + opt.mem, pre, post, st);
477
- };
478
- var mrg = function(a, b) {
479
- var o = {};
480
- for (var k in a)
481
- o[k] = a[k];
482
- for (var k in b)
483
- o[k] = b[k];
484
- return o;
485
- };
486
- var wbytes = function(d, b, v) {
487
- for (;v; ++b)
488
- d[b] = v, v >>>= 8;
489
- };
490
- function deflateSync(data, opts) {
491
- return dopt(data, opts || {}, 0, 0);
492
- }
493
- var fltn = function(d, p, t, o) {
494
- for (var k in d) {
495
- var val = d[k], n = p + k, op = o;
496
- if (Array.isArray(val))
497
- op = mrg(o, val[1]), val = val[0];
498
- if (ArrayBuffer.isView(val))
499
- t[n] = [val, op];
500
- else {
501
- t[n += "/"] = [new u8(0), op];
502
- fltn(val, n, t, o);
869
+ registerSolutionToolFactory(factory) {
870
+ this.solutionFactory = factory;
871
+ }
872
+ getSolutionToolFactory() {
873
+ if (!this.solutionFactory) {
874
+ throw new Error("No solution tool factory is registered");
503
875
  }
876
+ return this.solutionFactory;
504
877
  }
505
- };
506
- var te = typeof TextEncoder != "undefined" && /* @__PURE__ */ new TextEncoder;
507
- var td = typeof TextDecoder != "undefined" && /* @__PURE__ */ new TextDecoder;
508
- var tds = 0;
509
- try {
510
- td.decode(et, { stream: true });
511
- tds = 1;
512
- } catch (e) {}
513
- function strToU8(str, latin1) {
514
- if (latin1) {
515
- var ar_1 = new u8(str.length);
516
- for (var i2 = 0;i2 < str.length; ++i2)
517
- ar_1[i2] = str.charCodeAt(i2);
518
- return ar_1;
519
- }
520
- if (te)
521
- return te.encode(str);
522
- var l = str.length;
523
- var ar = new u8(str.length + (str.length >> 1));
524
- var ai = 0;
525
- var w = function(v) {
526
- ar[ai++] = v;
527
- };
528
- for (var i2 = 0;i2 < l; ++i2) {
529
- if (ai + 5 > ar.length) {
530
- var n = new u8(ai + 8 + (l - i2 << 1));
531
- n.set(ar);
532
- ar = n;
533
- }
534
- var c = str.charCodeAt(i2);
535
- if (c < 128 || latin1)
536
- w(c);
537
- else if (c < 2048)
538
- w(192 | c >> 6), w(128 | c & 63);
539
- else if (c > 55295 && c < 57344)
540
- c = 65536 + (c & 1023 << 10) | str.charCodeAt(++i2) & 1023, w(240 | c >> 18), w(128 | c >> 12 & 63), w(128 | c >> 6 & 63), w(128 | c & 63);
541
- else
542
- w(224 | c >> 12), w(128 | c >> 6 & 63), w(128 | c & 63);
543
- }
544
- return slc(ar, 0, ai);
545
- }
546
- var exfl = function(ex) {
547
- var le = 0;
548
- if (ex) {
549
- for (var k in ex) {
550
- var l = ex[k].length;
551
- if (l > 65535)
552
- err(9);
553
- le += l + 4;
878
+ canHandleProject(projectType) {
879
+ return this.projectFactoryMap.has(projectType);
880
+ }
881
+ getProjectToolFactory(projectType) {
882
+ const factory = this.projectFactoryMap.get(projectType);
883
+ if (!factory) {
884
+ throw new Error(`Cannot pack project type '${projectType}': no packager is installed for it.`);
554
885
  }
886
+ return factory;
887
+ }
888
+ reset() {
889
+ this.projectFactoryMap.clear();
890
+ this.solutionFactory = null;
555
891
  }
556
- return le;
557
- };
558
- var wzh = function(d, b, f, fn, u, c, ce, co) {
559
- var fl2 = fn.length, ex = f.extra, col = co && co.length;
560
- var exl = exfl(ex);
561
- wbytes(d, b, ce != null ? 33639248 : 67324752), b += 4;
562
- if (ce != null)
563
- d[b++] = 20, d[b++] = f.os;
564
- d[b] = 20, b += 2;
565
- d[b++] = f.flag << 1 | (c < 0 && 8), d[b++] = u && 8;
566
- d[b++] = f.compression & 255, d[b++] = f.compression >> 8;
567
- var dt = new Date(f.mtime == null ? Date.now() : f.mtime), y = dt.getFullYear() - 1980;
568
- if (y < 0 || y > 119)
569
- err(10);
570
- wbytes(d, b, y << 25 | dt.getMonth() + 1 << 21 | dt.getDate() << 16 | dt.getHours() << 11 | dt.getMinutes() << 5 | dt.getSeconds() >> 1), b += 4;
571
- if (c != -1) {
572
- wbytes(d, b, f.crc);
573
- wbytes(d, b + 4, c < 0 ? -c - 2 : c);
574
- wbytes(d, b + 8, f.size);
575
- }
576
- wbytes(d, b + 12, fl2);
577
- wbytes(d, b + 14, exl), b += 16;
578
- if (ce != null) {
579
- wbytes(d, b, col);
580
- wbytes(d, b + 6, f.attrs);
581
- wbytes(d, b + 10, ce), b += 14;
582
- }
583
- d.set(fn, b);
584
- b += fl2;
585
- if (exl) {
586
- for (var k in ex) {
587
- var exf = ex[k], l = exf.length;
588
- wbytes(d, b, +k);
589
- wbytes(d, b + 2, l);
590
- d.set(exf, b + 4), b += 4 + l;
591
- }
592
- }
593
- if (col)
594
- d.set(co, b), b += col;
595
- return b;
596
- };
597
- var wzf = function(o, b, c, d, e) {
598
- wbytes(o, b, 101010256);
599
- wbytes(o, b + 8, c);
600
- wbytes(o, b + 10, c);
601
- wbytes(o, b + 12, d);
602
- wbytes(o, b + 16, e);
603
- };
604
- function zipSync(data, opts) {
605
- if (!opts)
606
- opts = {};
607
- var r = {};
608
- var files = [];
609
- fltn(data, "", r, opts);
610
- var o = 0;
611
- var tot = 0;
612
- for (var fn in r) {
613
- var _a2 = r[fn], file = _a2[0], p = _a2[1];
614
- var compression = p.level == 0 ? 0 : 8;
615
- var f = strToU8(fn), s = f.length;
616
- var com = p.comment, m = com && strToU8(com), ms = m && m.length;
617
- var exl = exfl(p.extra);
618
- if (s > 65535)
619
- err(11);
620
- var d = compression ? deflateSync(file, p) : file, l = d.length;
621
- var c = crc();
622
- c.p(file);
623
- files.push(mrg(p, {
624
- size: file.length,
625
- crc: c.d(),
626
- c: d,
627
- f,
628
- m,
629
- u: s != fn.length || m && com.length != ms,
630
- o,
631
- compression
632
- }));
633
- o += 30 + s + exl + l;
634
- tot += 76 + 2 * (s + exl) + (ms || 0) + l;
635
- }
636
- var out = new u8(tot + 22), oe = o, cdl = tot - o;
637
- for (var i2 = 0;i2 < files.length; ++i2) {
638
- var f = files[i2];
639
- wzh(out, f.o, f, f.f, f.u, f.c.length);
640
- var badd = 30 + f.f.length + exfl(f.extra);
641
- out.set(f.c, f.o + badd);
642
- wzh(out, o, f, f.f, f.u, f.c.length, f.o, f.m), o += 16 + badd + (f.m ? f.m.length : 0);
643
- }
644
- wzf(out, o, files.length, cdl, oe);
645
- return out;
646
892
  }
647
-
893
+ var REGISTRY_KEY = Symbol.for("@uipath/solutionpackager-tool-core/toolsFactoryRepository");
894
+ var _global = globalThis;
895
+ if (!_global[REGISTRY_KEY]) {
896
+ _global[REGISTRY_KEY] = new ToolsFactoryRepository;
897
+ }
898
+ var toolsFactoryRepository = _global[REGISTRY_KEY];
648
899
  // ../packager/packager-core/dist/index.js
649
- class Path {
900
+ class Path2 {
650
901
  static normalize(path) {
651
902
  return path.replace(/\\/g, "/").replace(/\/+/g, "/");
652
903
  }
653
904
  static join(...segments) {
654
- return Path.normalize(segments.filter((s) => s.length > 0).join("/"));
905
+ return Path2.normalize(segments.filter((s) => s.length > 0).join("/"));
655
906
  }
656
907
  static dirname(path) {
657
- const normalized = Path.normalize(path).replace(/\/$/, "");
908
+ const normalized = Path2.normalize(path).replace(/\/$/, "");
658
909
  if (normalized === "")
659
910
  return ".";
660
911
  const lastSlash = normalized.lastIndexOf("/");
@@ -665,14 +916,14 @@ class Path {
665
916
  return normalized.substring(0, lastSlash);
666
917
  }
667
918
  static basename(path) {
668
- const normalized = Path.normalize(path).replace(/\/$/, "");
919
+ const normalized = Path2.normalize(path).replace(/\/$/, "");
669
920
  if (normalized === "")
670
921
  return "";
671
922
  const lastSlash = normalized.lastIndexOf("/");
672
923
  return lastSlash >= 0 ? normalized.substring(lastSlash + 1) : normalized;
673
924
  }
674
925
  static extname(path) {
675
- const base = Path.basename(path);
926
+ const base = Path2.basename(path);
676
927
  const lastDot = base.lastIndexOf(".");
677
928
  if (lastDot === -1 || lastDot === 0 || lastDot === base.length - 1) {
678
929
  return "";
@@ -681,19 +932,19 @@ class Path {
681
932
  }
682
933
  static async walkDirectory(fs, rootPath, currentRelativePath = "") {
683
934
  const entries = [];
684
- const absolutePath = currentRelativePath ? Path.join(rootPath, currentRelativePath) : rootPath;
935
+ const absolutePath = currentRelativePath ? Path2.join(rootPath, currentRelativePath) : rootPath;
685
936
  const items = await fs.readdir(absolutePath);
686
937
  for (const item of items) {
687
- const itemRelativePath = currentRelativePath ? Path.join(currentRelativePath, item) : item;
688
- const itemAbsolutePath = Path.join(rootPath, itemRelativePath);
938
+ const itemRelativePath = currentRelativePath ? Path2.join(currentRelativePath, item) : item;
939
+ const itemAbsolutePath = Path2.join(rootPath, itemRelativePath);
689
940
  const stat = await fs.stat(itemAbsolutePath);
690
941
  if (stat?.isDirectory()) {
691
- const subEntries = await Path.walkDirectory(fs, rootPath, itemRelativePath);
942
+ const subEntries = await Path2.walkDirectory(fs, rootPath, itemRelativePath);
692
943
  entries.push(...subEntries);
693
944
  } else if (stat?.isFile()) {
694
945
  entries.push({
695
- relativePath: Path.normalize(itemRelativePath),
696
- absolutePath: Path.normalize(itemAbsolutePath)
946
+ relativePath: Path2.normalize(itemRelativePath),
947
+ absolutePath: Path2.normalize(itemAbsolutePath)
697
948
  });
698
949
  }
699
950
  }
@@ -701,7 +952,7 @@ class Path {
701
952
  }
702
953
  }
703
954
 
704
- class TemporaryStorageService {
955
+ class TemporaryStorageService2 {
705
956
  fileSystem;
706
957
  _tempFolderPath = null;
707
958
  constructor(fileSystem) {
@@ -711,7 +962,7 @@ class TemporaryStorageService {
711
962
  if (!this._tempFolderPath) {
712
963
  const systemTempDir = await this.fileSystem.getTempDir();
713
964
  const uniqueFolderName = this.generateUniqueFolderName();
714
- this._tempFolderPath = Path.join(systemTempDir, uniqueFolderName);
965
+ this._tempFolderPath = Path2.join(systemTempDir, uniqueFolderName);
715
966
  await this.fileSystem.mkdir(this._tempFolderPath);
716
967
  }
717
968
  return this._tempFolderPath;
@@ -723,7 +974,7 @@ class TemporaryStorageService {
723
974
  }
724
975
  async getTempSubfolderPathAsync(subfolder) {
725
976
  const tempFolderPath = await this.getTempFolderPath();
726
- const inputPath = Path.join(tempFolderPath, subfolder);
977
+ const inputPath = Path2.join(tempFolderPath, subfolder);
727
978
  await this.fileSystem.mkdir(inputPath);
728
979
  return inputPath;
729
980
  }
@@ -746,10 +997,10 @@ class TemporaryStorageService {
746
997
  } catch {}
747
998
  }
748
999
  }
749
- function isPluralForm(value) {
1000
+ function isPluralForm2(value) {
750
1001
  return typeof value === "object" && value !== null && "other" in value;
751
1002
  }
752
- function selectPluralForm(forms, count) {
1003
+ function selectPluralForm2(forms, count) {
753
1004
  if (count === 0 && forms.zero !== undefined) {
754
1005
  return forms.zero;
755
1006
  }
@@ -776,75 +1027,75 @@ function selectPluralForm(forms, count) {
776
1027
  return forms.other;
777
1028
  }
778
1029
 
779
- class I18nManager {
1030
+ class I18nManager2 {
780
1031
  static translations = {};
781
1032
  static currentLocale = "en";
782
1033
  static fallbackLocale = "en";
783
1034
  static registerTranslations(locale, catalog) {
784
- if (!I18nManager.translations[locale]) {
785
- I18nManager.translations[locale] = {};
1035
+ if (!I18nManager2.translations[locale]) {
1036
+ I18nManager2.translations[locale] = {};
786
1037
  }
787
- I18nManager.translations[locale] = I18nManager.deepMerge(I18nManager.translations[locale], catalog);
1038
+ I18nManager2.translations[locale] = I18nManager2.deepMerge(I18nManager2.translations[locale], catalog);
788
1039
  }
789
1040
  static setLocale(locale) {
790
- const normalized = I18nManager.normalizeLocale(locale);
791
- if (I18nManager.translations[normalized]) {
792
- I18nManager.currentLocale = normalized;
1041
+ const normalized = I18nManager2.normalizeLocale(locale);
1042
+ if (I18nManager2.translations[normalized]) {
1043
+ I18nManager2.currentLocale = normalized;
793
1044
  return normalized;
794
1045
  }
795
1046
  const baseLocale = normalized.split("-")[0];
796
- if (baseLocale !== normalized && I18nManager.translations[baseLocale]) {
797
- I18nManager.currentLocale = baseLocale;
1047
+ if (baseLocale !== normalized && I18nManager2.translations[baseLocale]) {
1048
+ I18nManager2.currentLocale = baseLocale;
798
1049
  return baseLocale;
799
1050
  }
800
- return I18nManager.currentLocale;
1051
+ return I18nManager2.currentLocale;
801
1052
  }
802
1053
  static getLocale() {
803
- return I18nManager.currentLocale;
1054
+ return I18nManager2.currentLocale;
804
1055
  }
805
1056
  static setFallbackLocale(locale) {
806
- I18nManager.fallbackLocale = I18nManager.normalizeLocale(locale);
1057
+ I18nManager2.fallbackLocale = I18nManager2.normalizeLocale(locale);
807
1058
  }
808
1059
  static t(key, params, locale) {
809
- const targetLocale = locale ? I18nManager.normalizeLocale(locale) : I18nManager.currentLocale;
810
- let value = I18nManager.getTranslationValue(key, targetLocale);
811
- if (value === undefined && targetLocale !== I18nManager.fallbackLocale) {
812
- value = I18nManager.getTranslationValue(key, I18nManager.fallbackLocale);
1060
+ const targetLocale = locale ? I18nManager2.normalizeLocale(locale) : I18nManager2.currentLocale;
1061
+ let value = I18nManager2.getTranslationValue(key, targetLocale);
1062
+ if (value === undefined && targetLocale !== I18nManager2.fallbackLocale) {
1063
+ value = I18nManager2.getTranslationValue(key, I18nManager2.fallbackLocale);
813
1064
  }
814
1065
  if (value === undefined) {
815
1066
  return key;
816
1067
  }
817
- if (isPluralForm(value) && params && "count" in params) {
1068
+ if (isPluralForm2(value) && params && "count" in params) {
818
1069
  const count = typeof params.count === "number" ? params.count : Number(params.count);
819
- value = selectPluralForm(value, count);
820
- } else if (isPluralForm(value)) {
1070
+ value = selectPluralForm2(value, count);
1071
+ } else if (isPluralForm2(value)) {
821
1072
  value = value.other;
822
1073
  }
823
1074
  if (typeof value !== "string") {
824
1075
  return key;
825
1076
  }
826
- return params ? I18nManager.interpolate(value, params) : value;
1077
+ return params ? I18nManager2.interpolate(value, params) : value;
827
1078
  }
828
1079
  static has(key, locale) {
829
- const targetLocale = locale ? I18nManager.normalizeLocale(locale) : I18nManager.currentLocale;
830
- const value = I18nManager.getTranslationValue(key, targetLocale);
1080
+ const targetLocale = locale ? I18nManager2.normalizeLocale(locale) : I18nManager2.currentLocale;
1081
+ const value = I18nManager2.getTranslationValue(key, targetLocale);
831
1082
  if (value !== undefined) {
832
1083
  return true;
833
1084
  }
834
- if (targetLocale !== I18nManager.fallbackLocale) {
835
- return I18nManager.getTranslationValue(key, I18nManager.fallbackLocale) !== undefined;
1085
+ if (targetLocale !== I18nManager2.fallbackLocale) {
1086
+ return I18nManager2.getTranslationValue(key, I18nManager2.fallbackLocale) !== undefined;
836
1087
  }
837
1088
  return false;
838
1089
  }
839
1090
  static getAvailableLocales() {
840
- return Object.keys(I18nManager.translations);
1091
+ return Object.keys(I18nManager2.translations);
841
1092
  }
842
1093
  static clearTranslations() {
843
- I18nManager.translations = {};
844
- I18nManager.currentLocale = "en";
1094
+ I18nManager2.translations = {};
1095
+ I18nManager2.currentLocale = "en";
845
1096
  }
846
1097
  static getTranslationValue(key, locale) {
847
- const catalog = I18nManager.translations[locale];
1098
+ const catalog = I18nManager2.translations[locale];
848
1099
  if (!catalog) {
849
1100
  return;
850
1101
  }
@@ -879,7 +1130,7 @@ class I18nManager {
879
1130
  const sourceValue = source[key];
880
1131
  const targetValue = result[key];
881
1132
  if (sourceValue && typeof sourceValue === "object" && !Array.isArray(sourceValue) && targetValue && typeof targetValue === "object" && !Array.isArray(targetValue)) {
882
- result[key] = I18nManager.deepMerge(targetValue, sourceValue);
1133
+ result[key] = I18nManager2.deepMerge(targetValue, sourceValue);
883
1134
  } else {
884
1135
  result[key] = sourceValue;
885
1136
  }
@@ -887,7 +1138,7 @@ class I18nManager {
887
1138
  return result;
888
1139
  }
889
1140
  }
890
- var de = {
1141
+ var de2 = {
891
1142
  toolCore: {
892
1143
  errors: {
893
1144
  internal: "Internal error: {message}",
@@ -927,7 +1178,7 @@ var de = {
927
1178
  }
928
1179
  }
929
1180
  };
930
- var en = {
1181
+ var en2 = {
931
1182
  toolCore: {
932
1183
  errors: {
933
1184
  internal: "Internal error: {message}",
@@ -967,7 +1218,7 @@ var en = {
967
1218
  }
968
1219
  }
969
1220
  };
970
- var es = {
1221
+ var es2 = {
971
1222
  toolCore: {
972
1223
  errors: {
973
1224
  internal: "Internal error: {message}",
@@ -1007,7 +1258,7 @@ var es = {
1007
1258
  }
1008
1259
  }
1009
1260
  };
1010
- var es_MX = {
1261
+ var es_MX2 = {
1011
1262
  toolCore: {
1012
1263
  errors: {
1013
1264
  internal: "Internal error: {message}",
@@ -1047,7 +1298,7 @@ var es_MX = {
1047
1298
  }
1048
1299
  }
1049
1300
  };
1050
- var fr = {
1301
+ var fr2 = {
1051
1302
  toolCore: {
1052
1303
  errors: {
1053
1304
  internal: "Internal error: {message}",
@@ -1087,7 +1338,7 @@ var fr = {
1087
1338
  }
1088
1339
  }
1089
1340
  };
1090
- var ja = {
1341
+ var ja2 = {
1091
1342
  toolCore: {
1092
1343
  errors: {
1093
1344
  internal: "Internal error: {message}",
@@ -1127,7 +1378,7 @@ var ja = {
1127
1378
  }
1128
1379
  }
1129
1380
  };
1130
- var ko = {
1381
+ var ko2 = {
1131
1382
  toolCore: {
1132
1383
  errors: {
1133
1384
  internal: "Internal error: {message}",
@@ -1167,7 +1418,7 @@ var ko = {
1167
1418
  }
1168
1419
  }
1169
1420
  };
1170
- var pt = {
1421
+ var pt2 = {
1171
1422
  toolCore: {
1172
1423
  errors: {
1173
1424
  internal: "Internal error: {message}",
@@ -1207,7 +1458,7 @@ var pt = {
1207
1458
  }
1208
1459
  }
1209
1460
  };
1210
- var pt_BR = {
1461
+ var pt_BR2 = {
1211
1462
  toolCore: {
1212
1463
  errors: {
1213
1464
  internal: "Internal error: {message}",
@@ -1247,7 +1498,7 @@ var pt_BR = {
1247
1498
  }
1248
1499
  }
1249
1500
  };
1250
- var ro = {
1501
+ var ro2 = {
1251
1502
  toolCore: {
1252
1503
  errors: {
1253
1504
  internal: "Internal error: {message}",
@@ -1287,7 +1538,7 @@ var ro = {
1287
1538
  }
1288
1539
  }
1289
1540
  };
1290
- var ru = {
1541
+ var ru2 = {
1291
1542
  toolCore: {
1292
1543
  errors: {
1293
1544
  internal: "Internal error: {message}",
@@ -1327,7 +1578,7 @@ var ru = {
1327
1578
  }
1328
1579
  }
1329
1580
  };
1330
- var tr = {
1581
+ var tr2 = {
1331
1582
  toolCore: {
1332
1583
  errors: {
1333
1584
  internal: "Internal error: {message}",
@@ -1367,7 +1618,7 @@ var tr = {
1367
1618
  }
1368
1619
  }
1369
1620
  };
1370
- var zh_CN = {
1621
+ var zh_CN2 = {
1371
1622
  toolCore: {
1372
1623
  errors: {
1373
1624
  internal: "Internal error: {message}",
@@ -1407,7 +1658,7 @@ var zh_CN = {
1407
1658
  }
1408
1659
  }
1409
1660
  };
1410
- var zh_TW = {
1661
+ var zh_TW2 = {
1411
1662
  toolCore: {
1412
1663
  errors: {
1413
1664
  internal: "Internal error: {message}",
@@ -1447,7 +1698,7 @@ var zh_TW = {
1447
1698
  }
1448
1699
  }
1449
1700
  };
1450
- var zu = {
1701
+ var zu2 = {
1451
1702
  toolCore: {
1452
1703
  errors: {
1453
1704
  internal: "Internal error: {message}",
@@ -1488,65 +1739,65 @@ var zu = {
1488
1739
  }
1489
1740
  };
1490
1741
 
1491
- class TranslationService {
1742
+ class TranslationService2 {
1492
1743
  static instance;
1493
1744
  currentLocale = "en";
1494
1745
  constructor() {}
1495
1746
  static getInstance() {
1496
- if (!TranslationService.instance) {
1497
- TranslationService.instance = new TranslationService;
1747
+ if (!TranslationService2.instance) {
1748
+ TranslationService2.instance = new TranslationService2;
1498
1749
  }
1499
- return TranslationService.instance;
1750
+ return TranslationService2.instance;
1500
1751
  }
1501
1752
  setLocale(locale) {
1502
- this.currentLocale = I18nManager.setLocale(locale);
1753
+ this.currentLocale = I18nManager2.setLocale(locale);
1503
1754
  }
1504
1755
  getLocale() {
1505
1756
  return this.currentLocale;
1506
1757
  }
1507
1758
  t(key, params) {
1508
- return I18nManager.t(key, params, this.currentLocale);
1759
+ return I18nManager2.t(key, params, this.currentLocale);
1509
1760
  }
1510
1761
  tLocale(key, locale, params) {
1511
- return I18nManager.t(key, params, locale);
1762
+ return I18nManager2.t(key, params, locale);
1512
1763
  }
1513
1764
  has(key) {
1514
- return I18nManager.has(key, this.currentLocale);
1765
+ return I18nManager2.has(key, this.currentLocale);
1515
1766
  }
1516
1767
  getAvailableLocales() {
1517
- return I18nManager.getAvailableLocales();
1768
+ return I18nManager2.getAvailableLocales();
1518
1769
  }
1519
1770
  }
1520
- var translate = TranslationService.getInstance();
1521
- I18nManager.registerTranslations("en", en);
1522
- I18nManager.registerTranslations("de", de);
1523
- I18nManager.registerTranslations("es", es);
1524
- I18nManager.registerTranslations("es-mx", es_MX);
1525
- I18nManager.registerTranslations("fr", fr);
1526
- I18nManager.registerTranslations("ja", ja);
1527
- I18nManager.registerTranslations("ko", ko);
1528
- I18nManager.registerTranslations("pt", pt);
1529
- I18nManager.registerTranslations("pt-br", pt_BR);
1530
- I18nManager.registerTranslations("ro", ro);
1531
- I18nManager.registerTranslations("ru", ru);
1532
- I18nManager.registerTranslations("tr", tr);
1533
- I18nManager.registerTranslations("zh-cn", zh_CN);
1534
- I18nManager.registerTranslations("zh-tw", zh_TW);
1535
- I18nManager.registerTranslations("zu", zu);
1536
- I18nManager.setLocale("en");
1537
- var BuildConfiguration;
1538
- ((BuildConfiguration2) => {
1539
- BuildConfiguration2["Debug"] = "Debug";
1540
- BuildConfiguration2["Release"] = "Release";
1541
- })(BuildConfiguration ||= {});
1542
- var LogLevel;
1543
- ((LogLevel2) => {
1544
- LogLevel2["Debug"] = "Debug";
1545
- LogLevel2["Info"] = "Information";
1546
- LogLevel2["Warn"] = "Warning";
1547
- LogLevel2["Error"] = "Error";
1548
- })(LogLevel ||= {});
1549
- var NugetConstants = {
1771
+ var translate2 = TranslationService2.getInstance();
1772
+ I18nManager2.registerTranslations("en", en2);
1773
+ I18nManager2.registerTranslations("de", de2);
1774
+ I18nManager2.registerTranslations("es", es2);
1775
+ I18nManager2.registerTranslations("es-mx", es_MX2);
1776
+ I18nManager2.registerTranslations("fr", fr2);
1777
+ I18nManager2.registerTranslations("ja", ja2);
1778
+ I18nManager2.registerTranslations("ko", ko2);
1779
+ I18nManager2.registerTranslations("pt", pt2);
1780
+ I18nManager2.registerTranslations("pt-br", pt_BR2);
1781
+ I18nManager2.registerTranslations("ro", ro2);
1782
+ I18nManager2.registerTranslations("ru", ru2);
1783
+ I18nManager2.registerTranslations("tr", tr2);
1784
+ I18nManager2.registerTranslations("zh-cn", zh_CN2);
1785
+ I18nManager2.registerTranslations("zh-tw", zh_TW2);
1786
+ I18nManager2.registerTranslations("zu", zu2);
1787
+ I18nManager2.setLocale("en");
1788
+ var BuildConfiguration2;
1789
+ ((BuildConfiguration22) => {
1790
+ BuildConfiguration22["Debug"] = "Debug";
1791
+ BuildConfiguration22["Release"] = "Release";
1792
+ })(BuildConfiguration2 ||= {});
1793
+ var LogLevel2;
1794
+ ((LogLevel22) => {
1795
+ LogLevel22["Debug"] = "Debug";
1796
+ LogLevel22["Info"] = "Information";
1797
+ LogLevel22["Warn"] = "Warning";
1798
+ LogLevel22["Error"] = "Error";
1799
+ })(LogLevel2 ||= {});
1800
+ var NugetConstants2 = {
1550
1801
  OutputFolderName: "bundle",
1551
1802
  ContentFolderName: "content",
1552
1803
  OperateFileName: "operate.json",
@@ -1555,40 +1806,40 @@ var NugetConstants = {
1555
1806
  BindingsV2FileName: "bindings_v2.json",
1556
1807
  BindingsFileId: "bindings.json"
1557
1808
  };
1558
- var PackJobTargetKind;
1559
- ((PackJobTargetKind2) => {
1560
- PackJobTargetKind2["Serverless"] = "Serverless";
1561
- PackJobTargetKind2["LocalRobot"] = "LocalRobot";
1562
- })(PackJobTargetKind ||= {});
1563
- var ProjectTypes;
1564
- ((ProjectTypes2) => {
1565
- ProjectTypes2["Agent"] = "Agent";
1566
- ProjectTypes2["Api"] = "Api";
1567
- ProjectTypes2["BusinessRules"] = "BusinessRules";
1568
- ProjectTypes2["Connector"] = "Connector";
1569
- ProjectTypes2["CaseManagement"] = "CaseManagement";
1570
- ProjectTypes2["Flow"] = "Flow";
1571
- ProjectTypes2["Function"] = "Function";
1572
- ProjectTypes2["ProcessOrchestration"] = "ProcessOrchestration";
1573
- ProjectTypes2["Process"] = "Process";
1574
- ProjectTypes2["Library"] = "Library";
1575
- ProjectTypes2["WebApp"] = "WebApp";
1576
- ProjectTypes2["Tests"] = "Tests";
1577
- ProjectTypes2["AppV2"] = "AppV2";
1578
- })(ProjectTypes ||= {});
1579
- var TargetFramework;
1580
- ((TargetFramework2) => {
1581
- TargetFramework2["Portable"] = "Portable";
1582
- TargetFramework2["Windows"] = "Windows";
1583
- })(TargetFramework ||= {});
1584
- var ToolErrorCodes;
1585
- ((ToolErrorCodes2) => {
1586
- ToolErrorCodes2["Success"] = "SUCCESS";
1587
- ToolErrorCodes2["InternalError"] = "INTERNAL_ERROR";
1588
- ToolErrorCodes2["Canceled"] = "CANCELED";
1589
- })(ToolErrorCodes ||= {});
1809
+ var PackJobTargetKind2;
1810
+ ((PackJobTargetKind22) => {
1811
+ PackJobTargetKind22["Serverless"] = "Serverless";
1812
+ PackJobTargetKind22["LocalRobot"] = "LocalRobot";
1813
+ })(PackJobTargetKind2 ||= {});
1814
+ var ProjectTypes2;
1815
+ ((ProjectTypes22) => {
1816
+ ProjectTypes22["Agent"] = "Agent";
1817
+ ProjectTypes22["Api"] = "Api";
1818
+ ProjectTypes22["BusinessRules"] = "BusinessRules";
1819
+ ProjectTypes22["Connector"] = "Connector";
1820
+ ProjectTypes22["CaseManagement"] = "CaseManagement";
1821
+ ProjectTypes22["Flow"] = "Flow";
1822
+ ProjectTypes22["Function"] = "Function";
1823
+ ProjectTypes22["ProcessOrchestration"] = "ProcessOrchestration";
1824
+ ProjectTypes22["Process"] = "Process";
1825
+ ProjectTypes22["Library"] = "Library";
1826
+ ProjectTypes22["WebApp"] = "WebApp";
1827
+ ProjectTypes22["Tests"] = "Tests";
1828
+ ProjectTypes22["AppV2"] = "AppV2";
1829
+ })(ProjectTypes2 ||= {});
1830
+ var TargetFramework2;
1831
+ ((TargetFramework22) => {
1832
+ TargetFramework22["Portable"] = "Portable";
1833
+ TargetFramework22["Windows"] = "Windows";
1834
+ })(TargetFramework2 ||= {});
1835
+ var ToolErrorCodes2;
1836
+ ((ToolErrorCodes22) => {
1837
+ ToolErrorCodes22["Success"] = "SUCCESS";
1838
+ ToolErrorCodes22["InternalError"] = "INTERNAL_ERROR";
1839
+ ToolErrorCodes22["Canceled"] = "CANCELED";
1840
+ })(ToolErrorCodes2 ||= {});
1590
1841
 
1591
- class ToolResult {
1842
+ class ToolResult2 {
1592
1843
  errorCode;
1593
1844
  message;
1594
1845
  packages;
@@ -1604,10 +1855,10 @@ class ToolResult {
1604
1855
  return this.errorCode === "SUCCESS";
1605
1856
  }
1606
1857
  static success() {
1607
- return new ToolResult("SUCCESS");
1858
+ return new ToolResult2("SUCCESS");
1608
1859
  }
1609
1860
  static error(errorCode, message, instructions) {
1610
- return new ToolResult(errorCode, message, [], instructions);
1861
+ return new ToolResult2(errorCode, message, [], instructions);
1611
1862
  }
1612
1863
  }
1613
1864
  var OPERATE_FILE = "operate.json";
@@ -1639,8 +1890,8 @@ async function writeJsonObject(fs, filePath, data) {
1639
1890
  await fs.writeFile(filePath, `${JSON.stringify(data, null, 2)}
1640
1891
  `);
1641
1892
  }
1642
- async function ensureProjectId(projectPath, fs) {
1643
- const operatePath = Path.join(projectPath, OPERATE_FILE);
1893
+ async function ensureProjectId2(projectPath, fs) {
1894
+ const operatePath = Path2.join(projectPath, OPERATE_FILE);
1644
1895
  const operateExists = await fs.exists(operatePath);
1645
1896
  if (operateExists) {
1646
1897
  const operate = await readJsonObject(fs, operatePath);
@@ -1657,7 +1908,7 @@ async function ensureProjectId(projectPath, fs) {
1657
1908
  }
1658
1909
  return crypto.randomUUID();
1659
1910
  }
1660
- const projectFilePath = Path.join(projectPath, PROJECT_FILE);
1911
+ const projectFilePath = Path2.join(projectPath, PROJECT_FILE);
1661
1912
  const projectFileExists = await fs.exists(projectFilePath);
1662
1913
  if (projectFileExists) {
1663
1914
  const projectFile = await readJsonObject(fs, projectFilePath);
@@ -1747,16 +1998,16 @@ function generatePsmdcpXml(packageInfo) {
1747
1998
  </coreProperties>`;
1748
1999
  }
1749
2000
 
1750
- class NugetPackager {
2001
+ class NugetPackager2 {
1751
2002
  fileSystem;
1752
2003
  constructor(fileSystem) {
1753
2004
  this.fileSystem = fileSystem;
1754
2005
  }
1755
2006
  async packAsync(rootPath, packageInfo, outputPath) {
1756
- const normalizedOutputPath = Path.normalize(outputPath);
2007
+ const normalizedOutputPath = Path2.normalize(outputPath);
1757
2008
  const nuspecXml = generateNuspecXml(packageInfo);
1758
2009
  const nuspecFileName = `${packageInfo.id}.nuspec`;
1759
- const fileEntries = await Path.walkDirectory(this.fileSystem, rootPath);
2010
+ const fileEntries = await Path2.walkDirectory(this.fileSystem, rootPath);
1760
2011
  const zipContents = {};
1761
2012
  const encoder = new TextEncoder;
1762
2013
  const psmdcpId = Array.from({ length: 4 }, () => Math.floor(Math.random() * 4294967296).toString(16).padStart(8, "0")).join("");
@@ -1795,7 +2046,7 @@ class NugetPackager {
1795
2046
  }
1796
2047
  }
1797
2048
 
1798
- class ProjectTool {
2049
+ class ProjectTool2 {
1799
2050
  fileSystem;
1800
2051
  logger;
1801
2052
  static ProjectFileName = "project.uiproj";
@@ -1805,26 +2056,26 @@ class ProjectTool {
1805
2056
  }
1806
2057
  async restoreAsync(_options, _cancellationToken) {
1807
2058
  this.logger.info("Restore operation is a noop");
1808
- return ToolResult.success();
2059
+ return ToolResult2.success();
1809
2060
  }
1810
2061
  async validateAsync(_options, _cancellationToken) {
1811
2062
  this.logger.info("Validate operation is a noop");
1812
- return ToolResult.success();
2063
+ return ToolResult2.success();
1813
2064
  }
1814
2065
  async buildAsync(_options, _cancellationToken) {
1815
2066
  this.logger.info("Build operation is a noop");
1816
- return ToolResult.success();
2067
+ return ToolResult2.success();
1817
2068
  }
1818
2069
  async packAsync(_options, _cancellationToken) {
1819
2070
  this.logger.info("Pack operation is a noop");
1820
- return ToolResult.success();
2071
+ return ToolResult2.success();
1821
2072
  }
1822
2073
  async cleanupAsync(_options, _cancellationToken) {
1823
2074
  this.logger.info("Cleanup operation is a noop");
1824
- return ToolResult.success();
2075
+ return ToolResult2.success();
1825
2076
  }
1826
2077
  async getUiProjectAsync(projectPath) {
1827
- const filePath = Path.join(projectPath, ProjectTool.ProjectFileName);
2078
+ const filePath = Path2.join(projectPath, ProjectTool2.ProjectFileName);
1828
2079
  if (!await this.fileSystem.exists(filePath)) {
1829
2080
  return;
1830
2081
  }
@@ -1837,7 +2088,7 @@ class ProjectTool {
1837
2088
  }
1838
2089
  async dispose() {}
1839
2090
  }
1840
- class ToolsFactoryRepository {
2091
+ class ToolsFactoryRepository2 {
1841
2092
  projectFactoryMap = new Map;
1842
2093
  solutionFactory = null;
1843
2094
  registerProjectToolFactory(factory) {
@@ -1876,14 +2127,14 @@ class ToolsFactoryRepository {
1876
2127
  this.solutionFactory = null;
1877
2128
  }
1878
2129
  }
1879
- var REGISTRY_KEY = Symbol.for("@uipath/solutionpackager-tool-core/toolsFactoryRepository");
1880
- var _global = globalThis;
1881
- if (!_global[REGISTRY_KEY]) {
1882
- _global[REGISTRY_KEY] = new ToolsFactoryRepository;
2130
+ var REGISTRY_KEY2 = Symbol.for("@uipath/solutionpackager-tool-core/toolsFactoryRepository");
2131
+ var _global2 = globalThis;
2132
+ if (!_global2[REGISTRY_KEY2]) {
2133
+ _global2[REGISTRY_KEY2] = new ToolsFactoryRepository2;
1883
2134
  }
1884
- var toolsFactoryRepository = _global[REGISTRY_KEY];
2135
+ var toolsFactoryRepository2 = _global2[REGISTRY_KEY2];
1885
2136
 
1886
- // ../packager/packager-tool-functions/dist/index.js
2137
+ // ../../node_modules/@uipath/coded-functions-js-packager/dist/index.js
1887
2138
  var npm = { name: "npm", lockFile: "package-lock.json", installHint: "npm install" };
1888
2139
  var bun = { name: "bun", lockFile: "bun.lock", installHint: "bun install" };
1889
2140
  var SUPPORTED_MANAGERS = [npm, bun];
@@ -2103,6 +2354,8 @@ async function copyProjectFiles(fs, sourcePath, destPath, lockFile, packOptions)
2103
2354
  }
2104
2355
  await walk(sourcePath, destPath);
2105
2356
  }
2357
+
2358
+ // ../packager/packager-tool-functions/src/js/build-js-functions-package.ts
2106
2359
  async function buildJsFunctionsPackage(fileSystem, options) {
2107
2360
  await buildFunctionsPackage(fileSystem, {
2108
2361
  projectPath: options.projectPath,
@@ -2110,6 +2363,7 @@ async function buildJsFunctionsPackage(fileSystem, options) {
2110
2363
  projectStorageId: options.projectStorageId
2111
2364
  });
2112
2365
  }
2366
+ // ../packager/packager-tool-functions/src/py/constants.ts
2113
2367
  var EXCLUDED_NAMES2 = new Set([
2114
2368
  "agent.json",
2115
2369
  "project.uiproj",
@@ -2146,8 +2400,10 @@ var SCHEMAS = {
2146
2400
  Operate: `${SCHEMA_BASE_URL}/operate`,
2147
2401
  PackageDescriptor: `${SCHEMA_BASE_URL}/package-descriptor`
2148
2402
  };
2403
+
2404
+ // ../packager/packager-tool-functions/src/py/build-py-functions-package.ts
2149
2405
  async function buildPyFunctionsPackage(fileSystem, options) {
2150
- const contentFolder = Path.join(options.outputPath, NugetConstants.ContentFolderName);
2406
+ const contentFolder = Path2.join(options.outputPath, NugetConstants2.ContentFolderName);
2151
2407
  await validateProjectFiles(fileSystem, options.projectPath);
2152
2408
  await copyFiles(fileSystem, options.projectPath, contentFolder);
2153
2409
  await writeEntryPointsFile(fileSystem, options.projectPath, contentFolder);
@@ -2156,8 +2412,8 @@ async function buildPyFunctionsPackage(fileSystem, options) {
2156
2412
  await createPackageDescriptor(fileSystem, options.outputPath);
2157
2413
  }
2158
2414
  async function validateProjectFiles(fileSystem, projectPath) {
2159
- const uipathJsonPath = Path.join(projectPath, UIPATH_JSON_FILE_NAME);
2160
- const entryPointsPath = Path.join(projectPath, NugetConstants.EntryPointsFileName);
2415
+ const uipathJsonPath = Path2.join(projectPath, UIPATH_JSON_FILE_NAME);
2416
+ const entryPointsPath = Path2.join(projectPath, NugetConstants2.EntryPointsFileName);
2161
2417
  if (!await fileSystem.exists(uipathJsonPath)) {
2162
2418
  throw new Error("uipath.json is missing from the project.");
2163
2419
  }
@@ -2169,8 +2425,8 @@ async function copyFiles(fileSystem, sourcePath, destinationPath) {
2169
2425
  await fileSystem.mkdir(destinationPath);
2170
2426
  const entries = await fileSystem.readdir(sourcePath);
2171
2427
  for (const entry of entries) {
2172
- const sourceFile = Path.join(sourcePath, entry);
2173
- const destinationFile = Path.join(destinationPath, entry);
2428
+ const sourceFile = Path2.join(sourcePath, entry);
2429
+ const destinationFile = Path2.join(destinationPath, entry);
2174
2430
  const stat = await fileSystem.stat(sourceFile);
2175
2431
  if (stat?.isFile()) {
2176
2432
  if (EXCLUDED_NAMES2.has(entry)) {
@@ -2189,12 +2445,12 @@ async function copyFiles(fileSystem, sourcePath, destinationPath) {
2189
2445
  }
2190
2446
  }
2191
2447
  async function createOperateFile(fileSystem, contentFolder, projectStorageId) {
2192
- const operateJsonFilePath = Path.join(contentFolder, NugetConstants.OperateFileName);
2448
+ const operateJsonFilePath = Path2.join(contentFolder, NugetConstants2.OperateFileName);
2193
2449
  const exists = await fileSystem.exists(operateJsonFilePath);
2194
2450
  if (exists) {
2195
2451
  return;
2196
2452
  }
2197
- const entryPointsFilePath = Path.join(contentFolder, NugetConstants.EntryPointsFileName);
2453
+ const entryPointsFilePath = Path2.join(contentFolder, NugetConstants2.EntryPointsFileName);
2198
2454
  let mainPath = "";
2199
2455
  const entryPointsExists = await fileSystem.exists(entryPointsFilePath);
2200
2456
  if (entryPointsExists) {
@@ -2224,8 +2480,8 @@ async function createOperateFile(fileSystem, contentFolder, projectStorageId) {
2224
2480
  await fileSystem.writeFile(operateJsonFilePath, operateJsonString);
2225
2481
  }
2226
2482
  async function writeEntryPointsFile(fileSystem, projectPath, contentFolder) {
2227
- const sourcePath = Path.join(projectPath, NugetConstants.EntryPointsFileName);
2228
- const destinationPath = Path.join(contentFolder, NugetConstants.EntryPointsFileName);
2483
+ const sourcePath = Path2.join(projectPath, NugetConstants2.EntryPointsFileName);
2484
+ const destinationPath = Path2.join(contentFolder, NugetConstants2.EntryPointsFileName);
2229
2485
  const raw = await fileSystem.readFile(sourcePath);
2230
2486
  if (!raw) {
2231
2487
  throw new Error("entry-points.json is missing from the project.");
@@ -2244,14 +2500,14 @@ async function writeEntryPointsFile(fileSystem, projectPath, contentFolder) {
2244
2500
  }));
2245
2501
  const normalized = {
2246
2502
  $schema: SCHEMAS.EntryPoint,
2247
- $id: NugetConstants.EntryPointsFileName,
2503
+ $id: NugetConstants2.EntryPointsFileName,
2248
2504
  entryPoints: normalizedEntries
2249
2505
  };
2250
2506
  await fileSystem.writeFile(destinationPath, JSON.stringify(normalized, null, 2));
2251
2507
  }
2252
2508
  async function createBindingsFile(fileSystem, projectPath, contentFolder) {
2253
- const bindingsOutputPath = Path.join(contentFolder, NugetConstants.BindingsV2FileName);
2254
- const sourcePath = Path.join(projectPath, BINDINGS_SOURCE_FILE_NAME);
2509
+ const bindingsOutputPath = Path2.join(contentFolder, NugetConstants2.BindingsV2FileName);
2510
+ const sourcePath = Path2.join(projectPath, BINDINGS_SOURCE_FILE_NAME);
2255
2511
  let bindings = null;
2256
2512
  if (await fileSystem.exists(sourcePath)) {
2257
2513
  const raw = await fileSystem.readFile(sourcePath);
@@ -2276,10 +2532,10 @@ async function createPackageDescriptor(fileSystem, localBuildFolder) {
2276
2532
  const packageDescriptor = {
2277
2533
  files: {}
2278
2534
  };
2279
- addFileToDescriptor(packageDescriptor, NugetConstants.OperateFileName, NugetConstants.OperateFileName);
2280
- addFileToDescriptor(packageDescriptor, NugetConstants.EntryPointsFileName, NugetConstants.EntryPointsFileName);
2281
- addFileToDescriptor(packageDescriptor, NugetConstants.BindingsFileId, NugetConstants.BindingsV2FileName);
2282
- const packageDescriptorPath = Path.join(localBuildFolder, NugetConstants.ContentFolderName, NugetConstants.PackageDescriptorFileName);
2535
+ addFileToDescriptor(packageDescriptor, NugetConstants2.OperateFileName, NugetConstants2.OperateFileName);
2536
+ addFileToDescriptor(packageDescriptor, NugetConstants2.EntryPointsFileName, NugetConstants2.EntryPointsFileName);
2537
+ addFileToDescriptor(packageDescriptor, NugetConstants2.BindingsFileId, NugetConstants2.BindingsV2FileName);
2538
+ const packageDescriptorPath = Path2.join(localBuildFolder, NugetConstants2.ContentFolderName, NugetConstants2.PackageDescriptorFileName);
2283
2539
  const packageDescriptorJson = JSON.stringify({
2284
2540
  $schema: SCHEMAS.PackageDescriptor,
2285
2541
  ...packageDescriptor
@@ -2287,9 +2543,10 @@ async function createPackageDescriptor(fileSystem, localBuildFolder) {
2287
2543
  await fileSystem.writeFile(packageDescriptorPath, packageDescriptorJson);
2288
2544
  }
2289
2545
  function addFileToDescriptor(packageDescriptor, key, fileName) {
2290
- const relativePath = Path.join(NugetConstants.ContentFolderName, fileName);
2546
+ const relativePath = Path2.join(NugetConstants2.ContentFolderName, fileName);
2291
2547
  packageDescriptor.files[key] = relativePath;
2292
2548
  }
2549
+ // ../packager/packager-tool-functions/src/types.ts
2293
2550
  var Languages = {
2294
2551
  JavaScript: "javascript",
2295
2552
  Python: "python"
@@ -2299,39 +2556,40 @@ var LanguageLabels = {
2299
2556
  [Languages.Python]: "Python"
2300
2557
  };
2301
2558
 
2302
- class FunctionsTool extends ProjectTool {
2559
+ // ../packager/packager-tool-functions/src/functions-tool.ts
2560
+ class FunctionsTool extends ProjectTool2 {
2303
2561
  _temporaryStorage;
2304
2562
  constructor(fileSystem, logger) {
2305
2563
  super(fileSystem, logger);
2306
- this._temporaryStorage = new TemporaryStorageService(fileSystem);
2564
+ this._temporaryStorage = new TemporaryStorageService2(fileSystem);
2307
2565
  }
2308
2566
  async restoreAsync(_options, _cancellationToken) {
2309
2567
  this.logger.info("Restore not required for Functions projects.");
2310
- return ToolResult.success();
2568
+ return ToolResult2.success();
2311
2569
  }
2312
2570
  async validateAsync(_options, _cancellationToken) {
2313
2571
  this.logger.info("Validate not required for Functions projects.");
2314
- return ToolResult.success();
2572
+ return ToolResult2.success();
2315
2573
  }
2316
2574
  async buildAsync(options, _cancellationToken) {
2317
2575
  const language = await this.detectLanguage(options.projectPath);
2318
2576
  const tempFolder = await this._temporaryStorage.getTempFolderPath();
2319
- const localBuildFolder = Path.join(tempFolder, NugetConstants.OutputFolderName);
2577
+ const localBuildFolder = Path2.join(tempFolder, NugetConstants2.OutputFolderName);
2320
2578
  const build = language === Languages.Python ? buildPyFunctionsPackage : buildJsFunctionsPackage;
2321
2579
  const languageLabel = LanguageLabels[language];
2322
2580
  try {
2323
2581
  this.logger.progress(`Building ${languageLabel} Functions package...`);
2324
- const projectStorageId = options.projectStorageId ?? await ensureProjectId(options.projectPath, this.fileSystem);
2582
+ const projectStorageId = options.projectStorageId ?? await ensureProjectId2(options.projectPath, this.fileSystem);
2325
2583
  await build(this.fileSystem, {
2326
2584
  projectPath: options.projectPath,
2327
2585
  outputPath: localBuildFolder,
2328
2586
  projectStorageId
2329
2587
  });
2330
- return new ToolResult(ToolErrorCodes.Success, "Build completed successfully.", [localBuildFolder]);
2588
+ return new ToolResult2(ToolErrorCodes2.Success, "Build completed successfully.", [localBuildFolder]);
2331
2589
  } catch (error) {
2332
2590
  const errorMessage = error instanceof Error ? error.toString() : String(error);
2333
2591
  this.logger.error(errorMessage);
2334
- return ToolResult.error(ToolErrorCodes.InternalError, `Build failed for ${languageLabel} Functions project.`);
2592
+ return ToolResult2.error(ToolErrorCodes2.InternalError, `Build failed for ${languageLabel} Functions project.`);
2335
2593
  }
2336
2594
  }
2337
2595
  async packAsync(options, cancellationToken) {
@@ -2343,15 +2601,15 @@ class FunctionsTool extends ProjectTool {
2343
2601
  try {
2344
2602
  this.logger.progress("Creating NuGet package...");
2345
2603
  const nupkgFileName = `${options.package.id}.${options.package.version}.nupkg`;
2346
- const nupkgPath = Path.join(options.outputPath, nupkgFileName);
2347
- const packager = new NugetPackager(this.fileSystem);
2604
+ const nupkgPath = Path2.join(options.outputPath, nupkgFileName);
2605
+ const packager = new NugetPackager2(this.fileSystem);
2348
2606
  const result = await packager.packAsync(localBuildFolder, options.package, nupkgPath);
2349
2607
  this.logger.progress("Package created successfully.");
2350
- return new ToolResult(ToolErrorCodes.Success, "Pack completed successfully.", [result.outputPath]);
2608
+ return new ToolResult2(ToolErrorCodes2.Success, "Pack completed successfully.", [result.outputPath]);
2351
2609
  } catch (error) {
2352
2610
  const errorMessage = error instanceof Error ? error.toString() : String(error);
2353
2611
  this.logger.error(errorMessage);
2354
- return ToolResult.error(ToolErrorCodes.InternalError, "Pack failed for Functions project.");
2612
+ return ToolResult2.error(ToolErrorCodes2.InternalError, "Pack failed for Functions project.");
2355
2613
  }
2356
2614
  }
2357
2615
  async dispose() {
@@ -2361,7 +2619,7 @@ class FunctionsTool extends ProjectTool {
2361
2619
  } catch {}
2362
2620
  }
2363
2621
  async detectLanguage(projectPath) {
2364
- const uipathJsonContent = await this.fileSystem.readFile(Path.join(projectPath, "uipath.json"), "utf-8");
2622
+ const uipathJsonContent = await this.fileSystem.readFile(Path2.join(projectPath, "uipath.json"), "utf-8");
2365
2623
  if (uipathJsonContent) {
2366
2624
  try {
2367
2625
  const uipathJson = JSON.parse(uipathJsonContent);
@@ -2376,20 +2634,19 @@ class FunctionsTool extends ProjectTool {
2376
2634
  }
2377
2635
  } catch {}
2378
2636
  }
2379
- const pyprojectStat = await this.fileSystem.stat(Path.join(projectPath, "pyproject.toml"));
2637
+ const pyprojectStat = await this.fileSystem.stat(Path2.join(projectPath, "pyproject.toml"));
2380
2638
  if (pyprojectStat?.isFile())
2381
2639
  return Languages.Python;
2382
2640
  return Languages.JavaScript;
2383
2641
  }
2384
2642
  }
2385
-
2643
+ // ../packager/packager-tool-functions/src/functions-tool-factory.ts
2386
2644
  class FunctionsToolFactory {
2387
- supportedTypes = [ProjectTypes.Function];
2645
+ supportedTypes = [ProjectTypes2.Function];
2388
2646
  async createAsync(logger, fileSystem) {
2389
2647
  return new FunctionsTool(fileSystem, logger);
2390
2648
  }
2391
2649
  }
2392
-
2393
2650
  // src/services/manifest-generating-functions-tool.ts
2394
2651
  function createManifestGeneratingFunctionsToolFactory() {
2395
2652
  class ManifestGeneratingFunctionsTool extends FunctionsTool {
@@ -2398,12 +2655,12 @@ function createManifestGeneratingFunctionsToolFactory() {
2398
2655
  if (language === Languages.JavaScript) {
2399
2656
  this.logger.progress("Generating Functions manifests...");
2400
2657
  try {
2401
- const { generateManifests } = await import("./cliRunner-bxxtxqc3.js");
2658
+ const { generateManifests } = await import("./cliRunner-23vh097s.js");
2402
2659
  await generateManifests(options.projectPath);
2403
2660
  } catch (error) {
2404
2661
  const errorMessage = error instanceof Error ? error.toString() : String(error);
2405
2662
  this.logger.error(errorMessage);
2406
- return ToolResult.error(ToolErrorCodes.InternalError, "Manifest generation failed for JS/TS Functions project.");
2663
+ return ToolResult.error("INTERNAL_ERROR" /* InternalError */, "Manifest generation failed for JS/TS Functions project.");
2407
2664
  }
2408
2665
  }
2409
2666
  return super.buildAsync(options, cancellationToken);
@@ -2426,4 +2683,4 @@ export {
2426
2683
  registerPackagerFactories
2427
2684
  };
2428
2685
 
2429
- //# debugId=EFD595DCE5DAE45864756E2164756E21
2686
+ //# debugId=1176BB1F0904B21364756E2164756E21