@uipath/vertical-solutions-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/README.md +80 -0
- package/dist/THIRD-PARTY-NOTICES.md +1617 -369
- package/dist/createSdk-2f9x47em.js +12 -0
- package/dist/deploy-jobs-3k87fkwz.js +23 -0
- package/dist/deploy-service-qaykt7er.js +1779 -0
- package/dist/deployment-search-arbm2z06.js +2649 -0
- package/dist/embedded-file-reader-r66242ey.js +114 -0
- package/dist/first-party-service-srxaftkn.js +27 -0
- package/dist/index-7a3eqtxv.js +3174 -0
- package/dist/index-8s9dxpj4.js +18812 -0
- package/dist/index-fyc0k5dd.js +51405 -0
- package/dist/index-h43sj8at.js +23075 -0
- package/dist/index-kmp9fmhb.js +25 -0
- package/dist/index-ngs0a2he.js +15 -0
- package/dist/index.js +14 -3
- package/dist/index.umd.min-fqefd9kn.js +7814 -0
- package/dist/job-commands-azgbrbdb.js +23 -0
- package/dist/job-output-t43hzj1f.js +36 -0
- package/dist/prompts-dtgt183n.js +260 -0
- package/dist/resume-service-mqfnnzb5.js +344 -0
- package/dist/seed-service-2d1f7zaz.js +2014 -0
- package/dist/seed-templates-sqqqratr.js +14 -0
- package/dist/service-errors-jzbq3z7p.js +22 -0
- package/dist/solution-auth-zq6gyxsv.js +11 -0
- package/dist/solution-deployments-m44fyb88.js +33 -0
- package/dist/templates-85yrztpk.js +15 -0
- package/dist/tool-342sz3hm.js +439 -0
- package/dist/tool-38ad77wd.js +1472 -0
- package/dist/tool-4z1dy1rn.js +260 -0
- package/dist/tool-53w8skv5.js +262 -0
- package/dist/tool-67587985.js +554 -0
- package/dist/tool-87e2ps7f.js +13 -0
- package/dist/tool-cag2z2d6.js +30 -0
- package/dist/tool-e4qgwf9h.js +2281 -0
- package/dist/tool-gdtpsdn7.js +342 -0
- package/dist/tool-gvmshnq9.js +555 -0
- package/dist/tool-h4f967yd.js +73 -0
- package/dist/tool-hdxtgckw.js +249 -0
- package/dist/tool-jjxbj28g.js +17067 -0
- package/dist/tool-keqjsxdx.js +28 -0
- package/dist/tool-maw0g02p.js +24 -0
- package/dist/tool-mn1wkbhw.js +113 -0
- package/dist/tool-n35nrs32.js +4949 -0
- package/dist/tool-p589v2r5.js +114 -0
- package/dist/tool-pz9qm3dv.js +6723 -0
- package/dist/tool-r1ewa0tf.js +5645 -0
- package/dist/tool-r2epw08s.js +164 -0
- package/dist/tool-rr9fensp.js +12 -0
- package/dist/tool-s04z9t80.js +19 -0
- package/dist/tool-s9qbxa2g.js +638 -0
- package/dist/tool-tjhwq0ez.js +261 -0
- package/dist/tool-v15vxc4x.js +183 -0
- package/dist/tool-vf2mgth0.js +14286 -0
- package/dist/tool-vp7rjr2q.js +22083 -0
- package/dist/tool-xd2ejt3h.js +103 -0
- package/dist/tool-yx29vb63.js +672 -0
- package/dist/tool.js +12 -2
- package/dist/watch-job-wh6m7xzq.js +31 -0
- package/package.json +3 -3
- package/dist/tool-xymb3dsq.js +0 -45085
|
@@ -0,0 +1,4949 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createSdk
|
|
3
|
+
} from "./tool-jjxbj28g.js";
|
|
4
|
+
import {
|
|
5
|
+
dist_default,
|
|
6
|
+
dist_default2
|
|
7
|
+
} from "./tool-r1ewa0tf.js";
|
|
8
|
+
import {
|
|
9
|
+
routingFlags,
|
|
10
|
+
shellQuote
|
|
11
|
+
} from "./tool-cag2z2d6.js";
|
|
12
|
+
import {
|
|
13
|
+
failure
|
|
14
|
+
} from "./tool-h4f967yd.js";
|
|
15
|
+
import {
|
|
16
|
+
forDisplay,
|
|
17
|
+
forDisplayIfSet
|
|
18
|
+
} from "./tool-rr9fensp.js";
|
|
19
|
+
import {
|
|
20
|
+
DEPLOY_ACTIONS,
|
|
21
|
+
TERMINAL_JOB_STATUSES
|
|
22
|
+
} from "./tool-s04z9t80.js";
|
|
23
|
+
import {
|
|
24
|
+
exports_external,
|
|
25
|
+
zod_default
|
|
26
|
+
} from "./tool-vf2mgth0.js";
|
|
27
|
+
import {
|
|
28
|
+
InvalidArgumentError,
|
|
29
|
+
Option,
|
|
30
|
+
OutputFormatter,
|
|
31
|
+
RESULTS,
|
|
32
|
+
canPrompt,
|
|
33
|
+
catchError,
|
|
34
|
+
createHiddenDeprecatedTenantOption,
|
|
35
|
+
logger,
|
|
36
|
+
parseBoundedInt,
|
|
37
|
+
processContext
|
|
38
|
+
} from "./tool-pz9qm3dv.js";
|
|
39
|
+
import {
|
|
40
|
+
getFileSystem
|
|
41
|
+
} from "./tool-hdxtgckw.js";
|
|
42
|
+
import {
|
|
43
|
+
__export,
|
|
44
|
+
__require
|
|
45
|
+
} from "./tool-1yh8g550.js";
|
|
46
|
+
// package.json
|
|
47
|
+
var package_default = {
|
|
48
|
+
name: "@uipath/vertical-solutions-tool",
|
|
49
|
+
author: "UiPath",
|
|
50
|
+
license: "SEE LICENSE IN LICENSE.txt",
|
|
51
|
+
version: "1.205.0-preview.258",
|
|
52
|
+
description: "Scaffold, generate and deploy Vertical Solution projects.",
|
|
53
|
+
private: false,
|
|
54
|
+
repository: {
|
|
55
|
+
type: "git",
|
|
56
|
+
url: "https://github.com/UiPath/cli.git",
|
|
57
|
+
directory: "packages/vertical-solutions-tool"
|
|
58
|
+
},
|
|
59
|
+
publishConfig: {
|
|
60
|
+
registry: "https://npm.pkg.github.com/@uipath"
|
|
61
|
+
},
|
|
62
|
+
keywords: [
|
|
63
|
+
"cli-tool",
|
|
64
|
+
"uipath",
|
|
65
|
+
"cli",
|
|
66
|
+
"plugin",
|
|
67
|
+
"vss"
|
|
68
|
+
],
|
|
69
|
+
maintainers: [
|
|
70
|
+
"0xr3ngar",
|
|
71
|
+
"ruudandriessen"
|
|
72
|
+
],
|
|
73
|
+
type: "module",
|
|
74
|
+
main: "./dist/tool.js",
|
|
75
|
+
exports: {
|
|
76
|
+
".": "./dist/tool.js"
|
|
77
|
+
},
|
|
78
|
+
bin: {
|
|
79
|
+
"vertical-solutions-tool": "./dist/index.js"
|
|
80
|
+
},
|
|
81
|
+
files: [
|
|
82
|
+
"dist"
|
|
83
|
+
],
|
|
84
|
+
scripts: {
|
|
85
|
+
build: "bun ../../tools/build-tool.ts",
|
|
86
|
+
package: "bun run build && bun pm pack",
|
|
87
|
+
lint: "biome check .",
|
|
88
|
+
"lint:fix": "biome check --write .",
|
|
89
|
+
test: "vitest run",
|
|
90
|
+
"test:coverage": "vitest run --coverage"
|
|
91
|
+
},
|
|
92
|
+
devDependencies: {
|
|
93
|
+
"@uipath/auth": "workspace:*",
|
|
94
|
+
"@uipath/common": "workspace:*",
|
|
95
|
+
"@uipath/filesystem": "workspace:*",
|
|
96
|
+
"@uipath/integrationservice-sdk": "workspace:*",
|
|
97
|
+
"@uipath/orchestrator-sdk": "workspace:*",
|
|
98
|
+
"@uipath/solution-sdk": "workspace:*",
|
|
99
|
+
"@uipath/uipath-typescript": "^1.8.0",
|
|
100
|
+
"@inquirer/prompts": "^8.3.2",
|
|
101
|
+
"@types/node": "^25.5.2",
|
|
102
|
+
commander: "^14.0.3",
|
|
103
|
+
fflate: "^0.8.2",
|
|
104
|
+
ora: "^9.3.0",
|
|
105
|
+
typescript: "^7.0.2",
|
|
106
|
+
zod: "^4.3.6"
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
// src/schema/dataFabricSchema.ts
|
|
111
|
+
var SqlTypeSchema = exports_external.object({
|
|
112
|
+
name: exports_external.string(),
|
|
113
|
+
lengthLimit: exports_external.number().optional(),
|
|
114
|
+
maxValue: exports_external.number().optional(),
|
|
115
|
+
minValue: exports_external.number().optional(),
|
|
116
|
+
decimalPrecision: exports_external.number().optional()
|
|
117
|
+
});
|
|
118
|
+
var ReferenceEntitySchema = exports_external.object({
|
|
119
|
+
name: exports_external.string(),
|
|
120
|
+
displayName: exports_external.string().optional(),
|
|
121
|
+
entityTypeId: exports_external.number().optional(),
|
|
122
|
+
entityType: exports_external.string().optional(),
|
|
123
|
+
folderId: exports_external.string().optional()
|
|
124
|
+
}).optional();
|
|
125
|
+
var ReferenceFieldDefinitionSchema = exports_external.object({
|
|
126
|
+
id: exports_external.string(),
|
|
127
|
+
name: exports_external.string(),
|
|
128
|
+
displayName: exports_external.string().optional(),
|
|
129
|
+
sqlType: SqlTypeSchema.optional()
|
|
130
|
+
});
|
|
131
|
+
var ReferenceFieldSchema = exports_external.object({
|
|
132
|
+
definition: ReferenceFieldDefinitionSchema.optional()
|
|
133
|
+
}).optional();
|
|
134
|
+
var ReferenceChoiceSetSchema = exports_external.object({
|
|
135
|
+
name: exports_external.string(),
|
|
136
|
+
displayName: exports_external.string().optional()
|
|
137
|
+
}).optional();
|
|
138
|
+
var DataFabricFieldSchema = exports_external.object({
|
|
139
|
+
name: exports_external.string(),
|
|
140
|
+
displayName: exports_external.string().optional(),
|
|
141
|
+
isPrimaryKey: exports_external.boolean(),
|
|
142
|
+
isForeignKey: exports_external.boolean(),
|
|
143
|
+
isExternalField: exports_external.boolean().optional(),
|
|
144
|
+
isHiddenField: exports_external.boolean(),
|
|
145
|
+
isSystemField: exports_external.boolean(),
|
|
146
|
+
isRequired: exports_external.boolean(),
|
|
147
|
+
isUnique: exports_external.boolean().optional(),
|
|
148
|
+
isEncrypted: exports_external.boolean().optional(),
|
|
149
|
+
isAttachment: exports_external.boolean().optional(),
|
|
150
|
+
isRbacEnabled: exports_external.boolean().optional(),
|
|
151
|
+
isModelReserved: exports_external.boolean().optional(),
|
|
152
|
+
fieldCategoryId: exports_external.number().optional(),
|
|
153
|
+
fieldDisplayType: exports_external.string().optional(),
|
|
154
|
+
referenceType: exports_external.string().optional(),
|
|
155
|
+
referenceEntity: ReferenceEntitySchema,
|
|
156
|
+
referenceField: ReferenceFieldSchema,
|
|
157
|
+
referenceChoiceSet: ReferenceChoiceSetSchema,
|
|
158
|
+
choices: exports_external.array(exports_external.object({ name: exports_external.string(), value: exports_external.number() })).optional(),
|
|
159
|
+
sqlType: SqlTypeSchema,
|
|
160
|
+
defaultValue: exports_external.string().optional().nullable(),
|
|
161
|
+
description: exports_external.string().optional()
|
|
162
|
+
});
|
|
163
|
+
var DataFabricEntitySchema = exports_external.object({
|
|
164
|
+
id: exports_external.string(),
|
|
165
|
+
name: exports_external.string(),
|
|
166
|
+
displayName: exports_external.string().optional(),
|
|
167
|
+
entityTypeId: exports_external.number().optional(),
|
|
168
|
+
entityType: exports_external.string().optional(),
|
|
169
|
+
description: exports_external.string().optional(),
|
|
170
|
+
folderId: exports_external.string().optional(),
|
|
171
|
+
fields: exports_external.array(DataFabricFieldSchema),
|
|
172
|
+
recordCount: exports_external.number().optional(),
|
|
173
|
+
isRbacEnabled: exports_external.boolean().optional(),
|
|
174
|
+
invalidIdentifiers: exports_external.array(exports_external.string()).optional(),
|
|
175
|
+
isModelReserved: exports_external.boolean().optional(),
|
|
176
|
+
createTime: exports_external.string().optional(),
|
|
177
|
+
updateTime: exports_external.string().optional()
|
|
178
|
+
});
|
|
179
|
+
var ChoiceSetDataItemSchema = exports_external.object({
|
|
180
|
+
DisplayName: exports_external.string(),
|
|
181
|
+
Name: exports_external.string(),
|
|
182
|
+
NumberId: exports_external.number()
|
|
183
|
+
});
|
|
184
|
+
var ChoiceSetSchema = exports_external.object({
|
|
185
|
+
name: exports_external.string(),
|
|
186
|
+
displayName: exports_external.string().optional(),
|
|
187
|
+
description: exports_external.string().optional(),
|
|
188
|
+
folderId: exports_external.string().optional(),
|
|
189
|
+
isModelReserved: exports_external.boolean().optional(),
|
|
190
|
+
data: exports_external.array(ChoiceSetDataItemSchema).optional()
|
|
191
|
+
});
|
|
192
|
+
var DataFabricSchema = exports_external.object({
|
|
193
|
+
entities: exports_external.array(DataFabricEntitySchema),
|
|
194
|
+
choicesets: exports_external.array(ChoiceSetSchema).optional()
|
|
195
|
+
});
|
|
196
|
+
var addDefaultEntities = (value) => {
|
|
197
|
+
if (value && typeof value === "object" && !Array.isArray(value) && !Object.hasOwn(value, "entities")) {
|
|
198
|
+
return { ...value, entities: [] };
|
|
199
|
+
}
|
|
200
|
+
return value;
|
|
201
|
+
};
|
|
202
|
+
var VssProjectDataFabricSchema = exports_external.preprocess(addDefaultEntities, DataFabricSchema);
|
|
203
|
+
|
|
204
|
+
// src/schema/readDataFabricSchema.ts
|
|
205
|
+
var readDataFabricSchema = async (schemaPath) => {
|
|
206
|
+
const fs = getFileSystem();
|
|
207
|
+
if (!await fs.exists(schemaPath)) {
|
|
208
|
+
throw new Error(`No data_fabric_schema.json found at ${schemaPath}. Ensure the file exists or pass --schema.`);
|
|
209
|
+
}
|
|
210
|
+
const rawContent = await fs.readFile(schemaPath, "utf-8");
|
|
211
|
+
if (rawContent === null) {
|
|
212
|
+
throw new Error(`Schema file not found at ${schemaPath}. Ensure the file exists or pass --schema.`);
|
|
213
|
+
}
|
|
214
|
+
const [parseError, parsed] = catchError(() => JSON.parse(rawContent));
|
|
215
|
+
if (parseError) {
|
|
216
|
+
throw new Error(`Failed to parse JSON in ${schemaPath}: ${parseError.message}. Ensure the file contains valid JSON.`);
|
|
217
|
+
}
|
|
218
|
+
const result = DataFabricSchema.safeParse(parsed);
|
|
219
|
+
if (!result.success) {
|
|
220
|
+
throw new Error(`Invalid schema file at ${schemaPath}:
|
|
221
|
+
${result.error.message}`);
|
|
222
|
+
}
|
|
223
|
+
return result.data;
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
// src/schema/readVssProjectSchema.ts
|
|
227
|
+
var readVssProjectSchema = async (configPath) => {
|
|
228
|
+
const fs = getFileSystem();
|
|
229
|
+
if (!await fs.exists(configPath)) {
|
|
230
|
+
throw new Error(`No vss.json found at ${configPath}. Ensure the file exists or run 'uip vss init'.`);
|
|
231
|
+
}
|
|
232
|
+
const rawContent = await fs.readFile(configPath, "utf-8");
|
|
233
|
+
if (rawContent === null) {
|
|
234
|
+
throw new Error(`Config file not found at ${configPath}. Ensure the file exists or run 'uip vss init'.`);
|
|
235
|
+
}
|
|
236
|
+
const [parseError, parsed] = catchError(() => JSON.parse(rawContent));
|
|
237
|
+
if (parseError) {
|
|
238
|
+
throw new Error(`Failed to parse JSON in ${configPath}: ${parseError.message}. Ensure the file contains valid JSON.`);
|
|
239
|
+
}
|
|
240
|
+
const result = VssProjectDataFabricSchema.safeParse(parsed);
|
|
241
|
+
if (!result.success) {
|
|
242
|
+
throw new Error(`Invalid vss.json at ${configPath}:
|
|
243
|
+
${result.error.message}`);
|
|
244
|
+
}
|
|
245
|
+
return result.data;
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
// src/util/generateEntityTypes.ts
|
|
249
|
+
var escSingle = (s) => s.replace(/\\/g, "\\\\").replace(/'/g, "\\'");
|
|
250
|
+
var escDouble = (s) => s.replace(/\\/g, "\\\\").replace(/"/g, "\\\"");
|
|
251
|
+
var sqlTypeToTsType = {
|
|
252
|
+
NVARCHAR: "string",
|
|
253
|
+
UNIQUEIDENTIFIER: "string",
|
|
254
|
+
DATE: "string",
|
|
255
|
+
DATETIMEOFFSET: "string",
|
|
256
|
+
BIT: "boolean",
|
|
257
|
+
INT: "number",
|
|
258
|
+
DECIMAL: "number"
|
|
259
|
+
};
|
|
260
|
+
var mapFieldTypeToTSType = (field) => {
|
|
261
|
+
const mapped = sqlTypeToTsType[field.sqlType.name];
|
|
262
|
+
if (mapped) {
|
|
263
|
+
return mapped;
|
|
264
|
+
}
|
|
265
|
+
return "string";
|
|
266
|
+
};
|
|
267
|
+
var formatChoices = (choices) => {
|
|
268
|
+
const items = choices.map((c) => `{ name: '${escSingle(c.name)}', value: ${c.value} }`).join(", ");
|
|
269
|
+
return `[${items}] as const`;
|
|
270
|
+
};
|
|
271
|
+
var systemFields = [
|
|
272
|
+
{
|
|
273
|
+
name: "Id",
|
|
274
|
+
str: "{ name: 'Id' as const, dataType: 'string' as const, isPrimaryKey: true as const, isRequired: true as const, isSystemField: true as const }"
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
name: "CreateTime",
|
|
278
|
+
str: "{ name: 'CreateTime' as const, dataType: 'string' as const, isPrimaryKey: false as const, isRequired: true as const, isSystemField: true as const }"
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
name: "UpdateTime",
|
|
282
|
+
str: "{ name: 'UpdateTime' as const, dataType: 'string' as const, isPrimaryKey: false as const, isRequired: false as const, isSystemField: true as const }"
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
name: "CreatedBy",
|
|
286
|
+
str: "{ name: 'CreatedBy' as const, dataType: 'string' as const, isPrimaryKey: false as const, isRequired: true as const, isSystemField: true as const }"
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
name: "UpdatedBy",
|
|
290
|
+
str: "{ name: 'UpdatedBy' as const, dataType: 'string' as const, isPrimaryKey: false as const, isRequired: false as const, isSystemField: true as const }"
|
|
291
|
+
}
|
|
292
|
+
];
|
|
293
|
+
var generateEntityTypes = (entities) => {
|
|
294
|
+
const entityObjects = entities.map((entity) => {
|
|
295
|
+
const schemaFieldNames = new Set(entity.fields.map((f) => f.name));
|
|
296
|
+
const mappedFields = entity.fields.map((field) => {
|
|
297
|
+
const tsType = mapFieldTypeToTSType(field);
|
|
298
|
+
const choicesPart = field.choices && field.choices.length > 0 ? `, choices: ${formatChoices(field.choices)}` : "";
|
|
299
|
+
return `{ name: '${escSingle(field.name)}' as const, dataType: '${tsType}' as const, isPrimaryKey: ${field.isPrimaryKey} as const, isRequired: ${field.isRequired} as const, isSystemField: ${field.isSystemField} as const${choicesPart} }`;
|
|
300
|
+
});
|
|
301
|
+
const dedupedSystemFields = systemFields.filter((sf) => !schemaFieldNames.has(sf.name)).map((sf) => sf.str);
|
|
302
|
+
const allFields = [...mappedFields, ...dedupedSystemFields].join(", ");
|
|
303
|
+
return ` "${escDouble(entity.name)}": {
|
|
304
|
+
id: '${escSingle(entity.id)}' as const,
|
|
305
|
+
name: '${escSingle(entity.name)}' as const,
|
|
306
|
+
fields: [${allFields}]
|
|
307
|
+
}`;
|
|
308
|
+
}).join(`,
|
|
309
|
+
`);
|
|
310
|
+
return `export const entities = {
|
|
311
|
+
${entityObjects}
|
|
312
|
+
} as const;
|
|
313
|
+
`;
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
// src/util/resolveChoiceSets.ts
|
|
317
|
+
var toPascalCase = (s) => s.split(" ").map((w) => w.length > 0 ? w[0].toUpperCase() + w.slice(1) : "").join("");
|
|
318
|
+
var resolveChoiceSets = (schema) => {
|
|
319
|
+
const choiceSetMap = new Map;
|
|
320
|
+
for (const cs of schema.choicesets ?? []) {
|
|
321
|
+
if (cs.data?.length) {
|
|
322
|
+
choiceSetMap.set(cs.name, cs.data.map((item) => ({
|
|
323
|
+
name: toPascalCase(item.DisplayName),
|
|
324
|
+
value: item.NumberId
|
|
325
|
+
})));
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
if (choiceSetMap.size === 0) {
|
|
329
|
+
return schema.entities;
|
|
330
|
+
}
|
|
331
|
+
return schema.entities.map((entity) => ({
|
|
332
|
+
...entity,
|
|
333
|
+
fields: entity.fields.map((field) => {
|
|
334
|
+
const csName = field.referenceChoiceSet?.name;
|
|
335
|
+
const choices = csName ? choiceSetMap.get(csName) : undefined;
|
|
336
|
+
return choices ? { ...field, choices } : field;
|
|
337
|
+
})
|
|
338
|
+
}));
|
|
339
|
+
};
|
|
340
|
+
|
|
341
|
+
// src/commands/generate.ts
|
|
342
|
+
var GENERATE_EXAMPLES = [
|
|
343
|
+
{
|
|
344
|
+
Description: "Generate entity types for the current vertical solution",
|
|
345
|
+
Command: "uip vss generate",
|
|
346
|
+
Output: {
|
|
347
|
+
Code: "TypesGenerated",
|
|
348
|
+
Data: {
|
|
349
|
+
Path: "/Users/alice/my-app/vss.gen.ts"
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
];
|
|
354
|
+
var DATA_FABRIC_SCHEMA_FILE = "data_fabric_schema.json";
|
|
355
|
+
var VSS_CONFIG_FILE = "vss.json";
|
|
356
|
+
var SCAFFOLDED_APP_DIR = "client";
|
|
357
|
+
var resolveGeneratePaths = async ({
|
|
358
|
+
schema,
|
|
359
|
+
targetPath
|
|
360
|
+
}) => {
|
|
361
|
+
const fs = getFileSystem();
|
|
362
|
+
const requestedTargetPath = targetPath ?? fs.env.cwd();
|
|
363
|
+
if (schema) {
|
|
364
|
+
return {
|
|
365
|
+
schemaPath: schema,
|
|
366
|
+
source: fs.path.basename(schema) === VSS_CONFIG_FILE ? "vss-config" : "data-fabric-schema",
|
|
367
|
+
targetPath: requestedTargetPath
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
const targetSchemaPath = fs.path.join(requestedTargetPath, DATA_FABRIC_SCHEMA_FILE);
|
|
371
|
+
if (await fs.exists(targetSchemaPath)) {
|
|
372
|
+
return {
|
|
373
|
+
schemaPath: targetSchemaPath,
|
|
374
|
+
source: "data-fabric-schema",
|
|
375
|
+
targetPath: requestedTargetPath
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
const targetConfigPath = fs.path.join(requestedTargetPath, VSS_CONFIG_FILE);
|
|
379
|
+
if (await fs.exists(targetConfigPath)) {
|
|
380
|
+
return {
|
|
381
|
+
schemaPath: targetConfigPath,
|
|
382
|
+
source: "vss-config",
|
|
383
|
+
targetPath: requestedTargetPath
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
const scaffoldedTargetPath = fs.path.join(requestedTargetPath, SCAFFOLDED_APP_DIR);
|
|
387
|
+
const scaffoldedSchemaPath = fs.path.join(scaffoldedTargetPath, DATA_FABRIC_SCHEMA_FILE);
|
|
388
|
+
if (await fs.exists(scaffoldedSchemaPath)) {
|
|
389
|
+
return {
|
|
390
|
+
schemaPath: scaffoldedSchemaPath,
|
|
391
|
+
source: "data-fabric-schema",
|
|
392
|
+
targetPath: scaffoldedTargetPath
|
|
393
|
+
};
|
|
394
|
+
}
|
|
395
|
+
const scaffoldedConfigPath = fs.path.join(scaffoldedTargetPath, VSS_CONFIG_FILE);
|
|
396
|
+
if (await fs.exists(scaffoldedConfigPath)) {
|
|
397
|
+
return {
|
|
398
|
+
schemaPath: scaffoldedConfigPath,
|
|
399
|
+
source: "vss-config",
|
|
400
|
+
targetPath: scaffoldedTargetPath
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
return null;
|
|
404
|
+
};
|
|
405
|
+
var generate = async ({
|
|
406
|
+
schema,
|
|
407
|
+
targetPath
|
|
408
|
+
} = {}) => {
|
|
409
|
+
const fs = getFileSystem();
|
|
410
|
+
const resolvedPaths = await resolveGeneratePaths({
|
|
411
|
+
schema,
|
|
412
|
+
targetPath
|
|
413
|
+
});
|
|
414
|
+
if (!resolvedPaths) {
|
|
415
|
+
const requestedTargetPath = targetPath ?? fs.env.cwd();
|
|
416
|
+
const scaffoldedTargetPath = fs.path.join(requestedTargetPath, SCAFFOLDED_APP_DIR);
|
|
417
|
+
OutputFormatter.error({
|
|
418
|
+
Result: RESULTS.Failure,
|
|
419
|
+
Message: "Failed to read schema file",
|
|
420
|
+
Instructions: `No data_fabric_schema.json or vss.json found in ${requestedTargetPath} or scaffolded client path ${scaffoldedTargetPath}. Ensure one of these files exists or pass --schema.`
|
|
421
|
+
});
|
|
422
|
+
processContext.exit(1);
|
|
423
|
+
return;
|
|
424
|
+
}
|
|
425
|
+
const {
|
|
426
|
+
schemaPath: resolvedSchemaPath,
|
|
427
|
+
source,
|
|
428
|
+
targetPath: resolvedTargetPath
|
|
429
|
+
} = resolvedPaths;
|
|
430
|
+
const [readError, schemaFile] = await catchError(source === "vss-config" ? readVssProjectSchema(resolvedSchemaPath) : readDataFabricSchema(resolvedSchemaPath));
|
|
431
|
+
if (readError) {
|
|
432
|
+
OutputFormatter.error({
|
|
433
|
+
Result: RESULTS.Failure,
|
|
434
|
+
Message: "Failed to read schema file",
|
|
435
|
+
Instructions: readError.message
|
|
436
|
+
});
|
|
437
|
+
processContext.exit(1);
|
|
438
|
+
return;
|
|
439
|
+
}
|
|
440
|
+
const entities = resolveChoiceSets(schemaFile);
|
|
441
|
+
const content = generateEntityTypes(entities);
|
|
442
|
+
const outputPath = fs.path.join(resolvedTargetPath, "vss.gen.ts");
|
|
443
|
+
const [saveError] = await catchError(fs.writeFile(outputPath, content));
|
|
444
|
+
if (saveError) {
|
|
445
|
+
OutputFormatter.error({
|
|
446
|
+
Result: RESULTS.Failure,
|
|
447
|
+
Message: "Failed to write vss.gen.ts",
|
|
448
|
+
Instructions: saveError.message
|
|
449
|
+
});
|
|
450
|
+
processContext.exit(1);
|
|
451
|
+
return;
|
|
452
|
+
}
|
|
453
|
+
return outputPath;
|
|
454
|
+
};
|
|
455
|
+
var registerGenerateCommand = (program) => {
|
|
456
|
+
program.command("generate").description("Generate types for your vertical solution.").examples(GENERATE_EXAMPLES).option("-s, --schema <path>", "Path to data_fabric_schema.json or vss.json (defaults to target path, then scaffolded client path)").option("-t, --target-path <targetPath>", "Directory to write vss.gen.ts (defaults to current directory)").trackedAction(processContext, async (options) => {
|
|
457
|
+
const outputPath = await generate(options);
|
|
458
|
+
if (!process.exitCode && outputPath) {
|
|
459
|
+
OutputFormatter.success({
|
|
460
|
+
Result: RESULTS.Success,
|
|
461
|
+
Code: "TypesGenerated",
|
|
462
|
+
Data: {
|
|
463
|
+
Path: outputPath
|
|
464
|
+
}
|
|
465
|
+
});
|
|
466
|
+
}
|
|
467
|
+
});
|
|
468
|
+
};
|
|
469
|
+
|
|
470
|
+
// src/config/Connection.ts
|
|
471
|
+
var ConnectionSchema = zod_default.object({
|
|
472
|
+
id: zod_default.number(),
|
|
473
|
+
key: zod_default.string(),
|
|
474
|
+
name: zod_default.string()
|
|
475
|
+
});
|
|
476
|
+
|
|
477
|
+
// src/config/Process.ts
|
|
478
|
+
var ProcessSchema = zod_default.object({
|
|
479
|
+
id: zod_default.string(),
|
|
480
|
+
name: zod_default.string(),
|
|
481
|
+
folderKey: zod_default.string()
|
|
482
|
+
});
|
|
483
|
+
|
|
484
|
+
// src/config/schema.ts
|
|
485
|
+
var ConfigSchema = exports_external.object({
|
|
486
|
+
appName: exports_external.string(),
|
|
487
|
+
processes: exports_external.array(ProcessSchema).default([]),
|
|
488
|
+
connections: exports_external.array(ConnectionSchema).default([])
|
|
489
|
+
});
|
|
490
|
+
|
|
491
|
+
// src/config/readConfig.ts
|
|
492
|
+
var readConfig = async (targetPath = ".") => {
|
|
493
|
+
const fs = getFileSystem();
|
|
494
|
+
const configPath = fs.path.resolve(targetPath, "vss.json");
|
|
495
|
+
const rawContent = await fs.readFile(configPath, "utf-8");
|
|
496
|
+
if (rawContent === null) {
|
|
497
|
+
throw new Error(`Config file not found at ${configPath}. Run 'uip vss init' to create one.`);
|
|
498
|
+
}
|
|
499
|
+
const parsed = JSON.parse(rawContent);
|
|
500
|
+
const result = ConfigSchema.safeParse(parsed);
|
|
501
|
+
if (!result.success) {
|
|
502
|
+
throw new Error(`Invalid config schema in ${configPath}:
|
|
503
|
+
${result.error.message}`);
|
|
504
|
+
}
|
|
505
|
+
return result.data;
|
|
506
|
+
};
|
|
507
|
+
|
|
508
|
+
// src/config/addProcessToConfig.ts
|
|
509
|
+
async function addProcessToConfig(processConfig, targetPath = ".") {
|
|
510
|
+
const fs = getFileSystem();
|
|
511
|
+
const configPath = fs.path.join(targetPath, "vss.json");
|
|
512
|
+
const config = await readConfig(targetPath);
|
|
513
|
+
const existingProcess = config.processes.find((p) => p.id === processConfig.id);
|
|
514
|
+
if (existingProcess) {
|
|
515
|
+
logger.warn(`Process with id ${processConfig.id} already exists`);
|
|
516
|
+
return;
|
|
517
|
+
}
|
|
518
|
+
config.processes.push(processConfig);
|
|
519
|
+
await fs.writeFile(configPath, JSON.stringify(config, null, 2));
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
// ../../node_modules/ora/index.js
|
|
523
|
+
import process8 from "node:process";
|
|
524
|
+
import { stripVTControlCharacters } from "node:util";
|
|
525
|
+
|
|
526
|
+
// ../../node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
527
|
+
var ANSI_BACKGROUND_OFFSET = 10;
|
|
528
|
+
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
529
|
+
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
530
|
+
var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
|
|
531
|
+
var styles = {
|
|
532
|
+
modifier: {
|
|
533
|
+
reset: [0, 0],
|
|
534
|
+
bold: [1, 22],
|
|
535
|
+
dim: [2, 22],
|
|
536
|
+
italic: [3, 23],
|
|
537
|
+
underline: [4, 24],
|
|
538
|
+
overline: [53, 55],
|
|
539
|
+
inverse: [7, 27],
|
|
540
|
+
hidden: [8, 28],
|
|
541
|
+
strikethrough: [9, 29]
|
|
542
|
+
},
|
|
543
|
+
color: {
|
|
544
|
+
black: [30, 39],
|
|
545
|
+
red: [31, 39],
|
|
546
|
+
green: [32, 39],
|
|
547
|
+
yellow: [33, 39],
|
|
548
|
+
blue: [34, 39],
|
|
549
|
+
magenta: [35, 39],
|
|
550
|
+
cyan: [36, 39],
|
|
551
|
+
white: [37, 39],
|
|
552
|
+
blackBright: [90, 39],
|
|
553
|
+
gray: [90, 39],
|
|
554
|
+
grey: [90, 39],
|
|
555
|
+
redBright: [91, 39],
|
|
556
|
+
greenBright: [92, 39],
|
|
557
|
+
yellowBright: [93, 39],
|
|
558
|
+
blueBright: [94, 39],
|
|
559
|
+
magentaBright: [95, 39],
|
|
560
|
+
cyanBright: [96, 39],
|
|
561
|
+
whiteBright: [97, 39]
|
|
562
|
+
},
|
|
563
|
+
bgColor: {
|
|
564
|
+
bgBlack: [40, 49],
|
|
565
|
+
bgRed: [41, 49],
|
|
566
|
+
bgGreen: [42, 49],
|
|
567
|
+
bgYellow: [43, 49],
|
|
568
|
+
bgBlue: [44, 49],
|
|
569
|
+
bgMagenta: [45, 49],
|
|
570
|
+
bgCyan: [46, 49],
|
|
571
|
+
bgWhite: [47, 49],
|
|
572
|
+
bgBlackBright: [100, 49],
|
|
573
|
+
bgGray: [100, 49],
|
|
574
|
+
bgGrey: [100, 49],
|
|
575
|
+
bgRedBright: [101, 49],
|
|
576
|
+
bgGreenBright: [102, 49],
|
|
577
|
+
bgYellowBright: [103, 49],
|
|
578
|
+
bgBlueBright: [104, 49],
|
|
579
|
+
bgMagentaBright: [105, 49],
|
|
580
|
+
bgCyanBright: [106, 49],
|
|
581
|
+
bgWhiteBright: [107, 49]
|
|
582
|
+
}
|
|
583
|
+
};
|
|
584
|
+
var modifierNames = Object.keys(styles.modifier);
|
|
585
|
+
var foregroundColorNames = Object.keys(styles.color);
|
|
586
|
+
var backgroundColorNames = Object.keys(styles.bgColor);
|
|
587
|
+
var colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
588
|
+
function assembleStyles() {
|
|
589
|
+
const codes = new Map;
|
|
590
|
+
for (const [groupName, group] of Object.entries(styles)) {
|
|
591
|
+
for (const [styleName, style] of Object.entries(group)) {
|
|
592
|
+
styles[styleName] = {
|
|
593
|
+
open: `\x1B[${style[0]}m`,
|
|
594
|
+
close: `\x1B[${style[1]}m`
|
|
595
|
+
};
|
|
596
|
+
group[styleName] = styles[styleName];
|
|
597
|
+
codes.set(style[0], style[1]);
|
|
598
|
+
}
|
|
599
|
+
Object.defineProperty(styles, groupName, {
|
|
600
|
+
value: group,
|
|
601
|
+
enumerable: false
|
|
602
|
+
});
|
|
603
|
+
}
|
|
604
|
+
Object.defineProperty(styles, "codes", {
|
|
605
|
+
value: codes,
|
|
606
|
+
enumerable: false
|
|
607
|
+
});
|
|
608
|
+
styles.color.close = "\x1B[39m";
|
|
609
|
+
styles.bgColor.close = "\x1B[49m";
|
|
610
|
+
styles.color.ansi = wrapAnsi16();
|
|
611
|
+
styles.color.ansi256 = wrapAnsi256();
|
|
612
|
+
styles.color.ansi16m = wrapAnsi16m();
|
|
613
|
+
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
614
|
+
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
615
|
+
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
616
|
+
Object.defineProperties(styles, {
|
|
617
|
+
rgbToAnsi256: {
|
|
618
|
+
value(red, green, blue) {
|
|
619
|
+
if (red === green && green === blue) {
|
|
620
|
+
if (red < 8) {
|
|
621
|
+
return 16;
|
|
622
|
+
}
|
|
623
|
+
if (red > 248) {
|
|
624
|
+
return 231;
|
|
625
|
+
}
|
|
626
|
+
return Math.round((red - 8) / 247 * 24) + 232;
|
|
627
|
+
}
|
|
628
|
+
return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
|
|
629
|
+
},
|
|
630
|
+
enumerable: false
|
|
631
|
+
},
|
|
632
|
+
hexToRgb: {
|
|
633
|
+
value(hex) {
|
|
634
|
+
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
635
|
+
if (!matches) {
|
|
636
|
+
return [0, 0, 0];
|
|
637
|
+
}
|
|
638
|
+
let [colorString] = matches;
|
|
639
|
+
if (colorString.length === 3) {
|
|
640
|
+
colorString = [...colorString].map((character) => character + character).join("");
|
|
641
|
+
}
|
|
642
|
+
const integer = Number.parseInt(colorString, 16);
|
|
643
|
+
return [
|
|
644
|
+
integer >> 16 & 255,
|
|
645
|
+
integer >> 8 & 255,
|
|
646
|
+
integer & 255
|
|
647
|
+
];
|
|
648
|
+
},
|
|
649
|
+
enumerable: false
|
|
650
|
+
},
|
|
651
|
+
hexToAnsi256: {
|
|
652
|
+
value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
|
|
653
|
+
enumerable: false
|
|
654
|
+
},
|
|
655
|
+
ansi256ToAnsi: {
|
|
656
|
+
value(code) {
|
|
657
|
+
if (code < 8) {
|
|
658
|
+
return 30 + code;
|
|
659
|
+
}
|
|
660
|
+
if (code < 16) {
|
|
661
|
+
return 90 + (code - 8);
|
|
662
|
+
}
|
|
663
|
+
let red;
|
|
664
|
+
let green;
|
|
665
|
+
let blue;
|
|
666
|
+
if (code >= 232) {
|
|
667
|
+
red = ((code - 232) * 10 + 8) / 255;
|
|
668
|
+
green = red;
|
|
669
|
+
blue = red;
|
|
670
|
+
} else {
|
|
671
|
+
code -= 16;
|
|
672
|
+
const remainder = code % 36;
|
|
673
|
+
red = Math.floor(code / 36) / 5;
|
|
674
|
+
green = Math.floor(remainder / 6) / 5;
|
|
675
|
+
blue = remainder % 6 / 5;
|
|
676
|
+
}
|
|
677
|
+
const value = Math.max(red, green, blue) * 2;
|
|
678
|
+
if (value === 0) {
|
|
679
|
+
return 30;
|
|
680
|
+
}
|
|
681
|
+
let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
|
|
682
|
+
if (value === 2) {
|
|
683
|
+
result += 60;
|
|
684
|
+
}
|
|
685
|
+
return result;
|
|
686
|
+
},
|
|
687
|
+
enumerable: false
|
|
688
|
+
},
|
|
689
|
+
rgbToAnsi: {
|
|
690
|
+
value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
|
|
691
|
+
enumerable: false
|
|
692
|
+
},
|
|
693
|
+
hexToAnsi: {
|
|
694
|
+
value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
|
|
695
|
+
enumerable: false
|
|
696
|
+
}
|
|
697
|
+
});
|
|
698
|
+
return styles;
|
|
699
|
+
}
|
|
700
|
+
var ansiStyles = assembleStyles();
|
|
701
|
+
var ansi_styles_default = ansiStyles;
|
|
702
|
+
|
|
703
|
+
// ../../node_modules/chalk/source/vendor/supports-color/index.js
|
|
704
|
+
import process2 from "node:process";
|
|
705
|
+
import os from "node:os";
|
|
706
|
+
import tty from "node:tty";
|
|
707
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process2.argv) {
|
|
708
|
+
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
709
|
+
const position = argv.indexOf(prefix + flag);
|
|
710
|
+
const terminatorPosition = argv.indexOf("--");
|
|
711
|
+
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
712
|
+
}
|
|
713
|
+
var { env } = process2;
|
|
714
|
+
var flagForceColor;
|
|
715
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
716
|
+
flagForceColor = 0;
|
|
717
|
+
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
718
|
+
flagForceColor = 1;
|
|
719
|
+
}
|
|
720
|
+
function envForceColor() {
|
|
721
|
+
if ("FORCE_COLOR" in env) {
|
|
722
|
+
if (env.FORCE_COLOR === "true") {
|
|
723
|
+
return 1;
|
|
724
|
+
}
|
|
725
|
+
if (env.FORCE_COLOR === "false") {
|
|
726
|
+
return 0;
|
|
727
|
+
}
|
|
728
|
+
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
function translateLevel(level) {
|
|
732
|
+
if (level === 0) {
|
|
733
|
+
return false;
|
|
734
|
+
}
|
|
735
|
+
return {
|
|
736
|
+
level,
|
|
737
|
+
hasBasic: true,
|
|
738
|
+
has256: level >= 2,
|
|
739
|
+
has16m: level >= 3
|
|
740
|
+
};
|
|
741
|
+
}
|
|
742
|
+
function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
743
|
+
const noFlagForceColor = envForceColor();
|
|
744
|
+
if (noFlagForceColor !== undefined) {
|
|
745
|
+
flagForceColor = noFlagForceColor;
|
|
746
|
+
}
|
|
747
|
+
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
748
|
+
if (forceColor === 0) {
|
|
749
|
+
return 0;
|
|
750
|
+
}
|
|
751
|
+
if (sniffFlags) {
|
|
752
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
753
|
+
return 3;
|
|
754
|
+
}
|
|
755
|
+
if (hasFlag("color=256")) {
|
|
756
|
+
return 2;
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
if ("TF_BUILD" in env && "AGENT_NAME" in env) {
|
|
760
|
+
return 1;
|
|
761
|
+
}
|
|
762
|
+
if (haveStream && !streamIsTTY && forceColor === undefined) {
|
|
763
|
+
return 0;
|
|
764
|
+
}
|
|
765
|
+
const min = forceColor || 0;
|
|
766
|
+
if (env.TERM === "dumb") {
|
|
767
|
+
return min;
|
|
768
|
+
}
|
|
769
|
+
if (process2.platform === "win32") {
|
|
770
|
+
const osRelease = os.release().split(".");
|
|
771
|
+
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
772
|
+
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
773
|
+
}
|
|
774
|
+
return 1;
|
|
775
|
+
}
|
|
776
|
+
if ("CI" in env) {
|
|
777
|
+
if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => (key in env))) {
|
|
778
|
+
return 3;
|
|
779
|
+
}
|
|
780
|
+
if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => (sign in env)) || env.CI_NAME === "codeship") {
|
|
781
|
+
return 1;
|
|
782
|
+
}
|
|
783
|
+
return min;
|
|
784
|
+
}
|
|
785
|
+
if ("TEAMCITY_VERSION" in env) {
|
|
786
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
787
|
+
}
|
|
788
|
+
if (env.COLORTERM === "truecolor") {
|
|
789
|
+
return 3;
|
|
790
|
+
}
|
|
791
|
+
if (env.TERM === "xterm-kitty") {
|
|
792
|
+
return 3;
|
|
793
|
+
}
|
|
794
|
+
if (env.TERM === "xterm-ghostty") {
|
|
795
|
+
return 3;
|
|
796
|
+
}
|
|
797
|
+
if (env.TERM === "wezterm") {
|
|
798
|
+
return 3;
|
|
799
|
+
}
|
|
800
|
+
if ("TERM_PROGRAM" in env) {
|
|
801
|
+
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
802
|
+
switch (env.TERM_PROGRAM) {
|
|
803
|
+
case "iTerm.app": {
|
|
804
|
+
return version >= 3 ? 3 : 2;
|
|
805
|
+
}
|
|
806
|
+
case "Apple_Terminal": {
|
|
807
|
+
return 2;
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
if (/-256(color)?$/i.test(env.TERM)) {
|
|
812
|
+
return 2;
|
|
813
|
+
}
|
|
814
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
815
|
+
return 1;
|
|
816
|
+
}
|
|
817
|
+
if ("COLORTERM" in env) {
|
|
818
|
+
return 1;
|
|
819
|
+
}
|
|
820
|
+
return min;
|
|
821
|
+
}
|
|
822
|
+
function createSupportsColor(stream, options = {}) {
|
|
823
|
+
const level = _supportsColor(stream, {
|
|
824
|
+
streamIsTTY: stream && stream.isTTY,
|
|
825
|
+
...options
|
|
826
|
+
});
|
|
827
|
+
return translateLevel(level);
|
|
828
|
+
}
|
|
829
|
+
var supportsColor = {
|
|
830
|
+
stdout: createSupportsColor({ isTTY: tty.isatty(1) }),
|
|
831
|
+
stderr: createSupportsColor({ isTTY: tty.isatty(2) })
|
|
832
|
+
};
|
|
833
|
+
var supports_color_default = supportsColor;
|
|
834
|
+
|
|
835
|
+
// ../../node_modules/chalk/source/utilities.js
|
|
836
|
+
function stringReplaceAll(string, substring, replacer) {
|
|
837
|
+
let index = string.indexOf(substring);
|
|
838
|
+
if (index === -1) {
|
|
839
|
+
return string;
|
|
840
|
+
}
|
|
841
|
+
const substringLength = substring.length;
|
|
842
|
+
let endIndex = 0;
|
|
843
|
+
let returnValue = "";
|
|
844
|
+
do {
|
|
845
|
+
returnValue += string.slice(endIndex, index) + substring + replacer;
|
|
846
|
+
endIndex = index + substringLength;
|
|
847
|
+
index = string.indexOf(substring, endIndex);
|
|
848
|
+
} while (index !== -1);
|
|
849
|
+
returnValue += string.slice(endIndex);
|
|
850
|
+
return returnValue;
|
|
851
|
+
}
|
|
852
|
+
function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
853
|
+
let endIndex = 0;
|
|
854
|
+
let returnValue = "";
|
|
855
|
+
do {
|
|
856
|
+
const gotCR = string[index - 1] === "\r";
|
|
857
|
+
returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? `\r
|
|
858
|
+
` : `
|
|
859
|
+
`) + postfix;
|
|
860
|
+
endIndex = index + 1;
|
|
861
|
+
index = string.indexOf(`
|
|
862
|
+
`, endIndex);
|
|
863
|
+
} while (index !== -1);
|
|
864
|
+
returnValue += string.slice(endIndex);
|
|
865
|
+
return returnValue;
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
// ../../node_modules/chalk/source/index.js
|
|
869
|
+
var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
|
|
870
|
+
var GENERATOR = Symbol("GENERATOR");
|
|
871
|
+
var STYLER = Symbol("STYLER");
|
|
872
|
+
var IS_EMPTY = Symbol("IS_EMPTY");
|
|
873
|
+
var levelMapping = [
|
|
874
|
+
"ansi",
|
|
875
|
+
"ansi",
|
|
876
|
+
"ansi256",
|
|
877
|
+
"ansi16m"
|
|
878
|
+
];
|
|
879
|
+
var styles2 = Object.create(null);
|
|
880
|
+
var applyOptions = (object, options = {}) => {
|
|
881
|
+
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
|
|
882
|
+
throw new Error("The `level` option should be an integer from 0 to 3");
|
|
883
|
+
}
|
|
884
|
+
const colorLevel = stdoutColor ? stdoutColor.level : 0;
|
|
885
|
+
object.level = options.level === undefined ? colorLevel : options.level;
|
|
886
|
+
};
|
|
887
|
+
var chalkFactory = (options) => {
|
|
888
|
+
const chalk = (...strings) => strings.join(" ");
|
|
889
|
+
applyOptions(chalk, options);
|
|
890
|
+
Object.setPrototypeOf(chalk, createChalk.prototype);
|
|
891
|
+
return chalk;
|
|
892
|
+
};
|
|
893
|
+
function createChalk(options) {
|
|
894
|
+
return chalkFactory(options);
|
|
895
|
+
}
|
|
896
|
+
Object.setPrototypeOf(createChalk.prototype, Function.prototype);
|
|
897
|
+
for (const [styleName, style] of Object.entries(ansi_styles_default)) {
|
|
898
|
+
styles2[styleName] = {
|
|
899
|
+
get() {
|
|
900
|
+
const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
|
|
901
|
+
Object.defineProperty(this, styleName, { value: builder });
|
|
902
|
+
return builder;
|
|
903
|
+
}
|
|
904
|
+
};
|
|
905
|
+
}
|
|
906
|
+
styles2.visible = {
|
|
907
|
+
get() {
|
|
908
|
+
const builder = createBuilder(this, this[STYLER], true);
|
|
909
|
+
Object.defineProperty(this, "visible", { value: builder });
|
|
910
|
+
return builder;
|
|
911
|
+
}
|
|
912
|
+
};
|
|
913
|
+
var getModelAnsi = (model, level, type, ...arguments_) => {
|
|
914
|
+
if (model === "rgb") {
|
|
915
|
+
if (level === "ansi16m") {
|
|
916
|
+
return ansi_styles_default[type].ansi16m(...arguments_);
|
|
917
|
+
}
|
|
918
|
+
if (level === "ansi256") {
|
|
919
|
+
return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_));
|
|
920
|
+
}
|
|
921
|
+
return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_));
|
|
922
|
+
}
|
|
923
|
+
if (model === "hex") {
|
|
924
|
+
return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_));
|
|
925
|
+
}
|
|
926
|
+
return ansi_styles_default[type][model](...arguments_);
|
|
927
|
+
};
|
|
928
|
+
var usedModels = ["rgb", "hex", "ansi256"];
|
|
929
|
+
for (const model of usedModels) {
|
|
930
|
+
styles2[model] = {
|
|
931
|
+
get() {
|
|
932
|
+
const { level } = this;
|
|
933
|
+
return function(...arguments_) {
|
|
934
|
+
const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
|
|
935
|
+
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
936
|
+
};
|
|
937
|
+
}
|
|
938
|
+
};
|
|
939
|
+
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
940
|
+
styles2[bgModel] = {
|
|
941
|
+
get() {
|
|
942
|
+
const { level } = this;
|
|
943
|
+
return function(...arguments_) {
|
|
944
|
+
const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
|
|
945
|
+
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
946
|
+
};
|
|
947
|
+
}
|
|
948
|
+
};
|
|
949
|
+
}
|
|
950
|
+
var proto = Object.defineProperties(() => {}, {
|
|
951
|
+
...styles2,
|
|
952
|
+
level: {
|
|
953
|
+
enumerable: true,
|
|
954
|
+
get() {
|
|
955
|
+
return this[GENERATOR].level;
|
|
956
|
+
},
|
|
957
|
+
set(level) {
|
|
958
|
+
this[GENERATOR].level = level;
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
});
|
|
962
|
+
var createStyler = (open, close, parent) => {
|
|
963
|
+
let openAll;
|
|
964
|
+
let closeAll;
|
|
965
|
+
if (parent === undefined) {
|
|
966
|
+
openAll = open;
|
|
967
|
+
closeAll = close;
|
|
968
|
+
} else {
|
|
969
|
+
openAll = parent.openAll + open;
|
|
970
|
+
closeAll = close + parent.closeAll;
|
|
971
|
+
}
|
|
972
|
+
return {
|
|
973
|
+
open,
|
|
974
|
+
close,
|
|
975
|
+
openAll,
|
|
976
|
+
closeAll,
|
|
977
|
+
parent
|
|
978
|
+
};
|
|
979
|
+
};
|
|
980
|
+
var createBuilder = (self, _styler, _isEmpty) => {
|
|
981
|
+
const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
|
|
982
|
+
Object.setPrototypeOf(builder, proto);
|
|
983
|
+
builder[GENERATOR] = self;
|
|
984
|
+
builder[STYLER] = _styler;
|
|
985
|
+
builder[IS_EMPTY] = _isEmpty;
|
|
986
|
+
return builder;
|
|
987
|
+
};
|
|
988
|
+
var applyStyle = (self, string) => {
|
|
989
|
+
if (self.level <= 0 || !string) {
|
|
990
|
+
return self[IS_EMPTY] ? "" : string;
|
|
991
|
+
}
|
|
992
|
+
let styler = self[STYLER];
|
|
993
|
+
if (styler === undefined) {
|
|
994
|
+
return string;
|
|
995
|
+
}
|
|
996
|
+
const { openAll, closeAll } = styler;
|
|
997
|
+
if (string.includes("\x1B")) {
|
|
998
|
+
while (styler !== undefined) {
|
|
999
|
+
string = stringReplaceAll(string, styler.close, styler.open);
|
|
1000
|
+
styler = styler.parent;
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
const lfIndex = string.indexOf(`
|
|
1004
|
+
`);
|
|
1005
|
+
if (lfIndex !== -1) {
|
|
1006
|
+
string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
|
|
1007
|
+
}
|
|
1008
|
+
return openAll + string + closeAll;
|
|
1009
|
+
};
|
|
1010
|
+
Object.defineProperties(createChalk.prototype, styles2);
|
|
1011
|
+
var chalk = createChalk();
|
|
1012
|
+
var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
1013
|
+
var source_default = chalk;
|
|
1014
|
+
|
|
1015
|
+
// ../../node_modules/ora/node_modules/cli-cursor/index.js
|
|
1016
|
+
import process5 from "node:process";
|
|
1017
|
+
|
|
1018
|
+
// ../../node_modules/ora/node_modules/cli-cursor/node_modules/restore-cursor/index.js
|
|
1019
|
+
import process4 from "node:process";
|
|
1020
|
+
|
|
1021
|
+
// ../../node_modules/mimic-function/index.js
|
|
1022
|
+
var copyProperty = (to, from, property, ignoreNonConfigurable) => {
|
|
1023
|
+
if (property === "length" || property === "prototype") {
|
|
1024
|
+
return;
|
|
1025
|
+
}
|
|
1026
|
+
if (property === "arguments" || property === "caller") {
|
|
1027
|
+
return;
|
|
1028
|
+
}
|
|
1029
|
+
const toDescriptor = Object.getOwnPropertyDescriptor(to, property);
|
|
1030
|
+
const fromDescriptor = Object.getOwnPropertyDescriptor(from, property);
|
|
1031
|
+
if (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) {
|
|
1032
|
+
return;
|
|
1033
|
+
}
|
|
1034
|
+
Object.defineProperty(to, property, fromDescriptor);
|
|
1035
|
+
};
|
|
1036
|
+
var canCopyProperty = function(toDescriptor, fromDescriptor) {
|
|
1037
|
+
return toDescriptor === undefined || toDescriptor.configurable || toDescriptor.writable === fromDescriptor.writable && toDescriptor.enumerable === fromDescriptor.enumerable && toDescriptor.configurable === fromDescriptor.configurable && (toDescriptor.writable || toDescriptor.value === fromDescriptor.value);
|
|
1038
|
+
};
|
|
1039
|
+
var changePrototype = (to, from) => {
|
|
1040
|
+
const fromPrototype = Object.getPrototypeOf(from);
|
|
1041
|
+
if (fromPrototype === Object.getPrototypeOf(to)) {
|
|
1042
|
+
return;
|
|
1043
|
+
}
|
|
1044
|
+
Object.setPrototypeOf(to, fromPrototype);
|
|
1045
|
+
};
|
|
1046
|
+
var wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/
|
|
1047
|
+
${fromBody}`;
|
|
1048
|
+
var toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, "toString");
|
|
1049
|
+
var toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, "name");
|
|
1050
|
+
var changeToString = (to, from, name) => {
|
|
1051
|
+
const withName = name === "" ? "" : `with ${name.trim()}() `;
|
|
1052
|
+
const newToString = wrappedToString.bind(null, withName, from.toString());
|
|
1053
|
+
Object.defineProperty(newToString, "name", toStringName);
|
|
1054
|
+
const { writable, enumerable, configurable } = toStringDescriptor;
|
|
1055
|
+
Object.defineProperty(to, "toString", { value: newToString, writable, enumerable, configurable });
|
|
1056
|
+
};
|
|
1057
|
+
function mimicFunction(to, from, { ignoreNonConfigurable = false } = {}) {
|
|
1058
|
+
const { name } = to;
|
|
1059
|
+
for (const property of Reflect.ownKeys(from)) {
|
|
1060
|
+
copyProperty(to, from, property, ignoreNonConfigurable);
|
|
1061
|
+
}
|
|
1062
|
+
changePrototype(to, from);
|
|
1063
|
+
changeToString(to, from, name);
|
|
1064
|
+
return to;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
// ../../node_modules/ora/node_modules/cli-cursor/node_modules/restore-cursor/node_modules/onetime/index.js
|
|
1068
|
+
var calledFunctions = new WeakMap;
|
|
1069
|
+
var onetime = (function_, options = {}) => {
|
|
1070
|
+
if (typeof function_ !== "function") {
|
|
1071
|
+
throw new TypeError("Expected a function");
|
|
1072
|
+
}
|
|
1073
|
+
let returnValue;
|
|
1074
|
+
let callCount = 0;
|
|
1075
|
+
const functionName = function_.displayName || function_.name || "<anonymous>";
|
|
1076
|
+
const onetime2 = function(...arguments_) {
|
|
1077
|
+
calledFunctions.set(onetime2, ++callCount);
|
|
1078
|
+
if (callCount === 1) {
|
|
1079
|
+
returnValue = function_.apply(this, arguments_);
|
|
1080
|
+
function_ = undefined;
|
|
1081
|
+
} else if (options.throw === true) {
|
|
1082
|
+
throw new Error(`Function \`${functionName}\` can only be called once`);
|
|
1083
|
+
}
|
|
1084
|
+
return returnValue;
|
|
1085
|
+
};
|
|
1086
|
+
mimicFunction(onetime2, function_);
|
|
1087
|
+
calledFunctions.set(onetime2, callCount);
|
|
1088
|
+
return onetime2;
|
|
1089
|
+
};
|
|
1090
|
+
onetime.callCount = (function_) => {
|
|
1091
|
+
if (!calledFunctions.has(function_)) {
|
|
1092
|
+
throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`);
|
|
1093
|
+
}
|
|
1094
|
+
return calledFunctions.get(function_);
|
|
1095
|
+
};
|
|
1096
|
+
var onetime_default = onetime;
|
|
1097
|
+
|
|
1098
|
+
// ../../node_modules/ora/node_modules/cli-cursor/node_modules/restore-cursor/node_modules/signal-exit/dist/mjs/signals.js
|
|
1099
|
+
var signals = [];
|
|
1100
|
+
signals.push("SIGHUP", "SIGINT", "SIGTERM");
|
|
1101
|
+
if (process.platform !== "win32") {
|
|
1102
|
+
signals.push("SIGALRM", "SIGABRT", "SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT");
|
|
1103
|
+
}
|
|
1104
|
+
if (process.platform === "linux") {
|
|
1105
|
+
signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
// ../../node_modules/ora/node_modules/cli-cursor/node_modules/restore-cursor/node_modules/signal-exit/dist/mjs/index.js
|
|
1109
|
+
var processOk = (process3) => !!process3 && typeof process3 === "object" && typeof process3.removeListener === "function" && typeof process3.emit === "function" && typeof process3.reallyExit === "function" && typeof process3.listeners === "function" && typeof process3.kill === "function" && typeof process3.pid === "number" && typeof process3.on === "function";
|
|
1110
|
+
var kExitEmitter = Symbol.for("signal-exit emitter");
|
|
1111
|
+
var global = globalThis;
|
|
1112
|
+
var ObjectDefineProperty = Object.defineProperty.bind(Object);
|
|
1113
|
+
|
|
1114
|
+
class Emitter {
|
|
1115
|
+
emitted = {
|
|
1116
|
+
afterExit: false,
|
|
1117
|
+
exit: false
|
|
1118
|
+
};
|
|
1119
|
+
listeners = {
|
|
1120
|
+
afterExit: [],
|
|
1121
|
+
exit: []
|
|
1122
|
+
};
|
|
1123
|
+
count = 0;
|
|
1124
|
+
id = Math.random();
|
|
1125
|
+
constructor() {
|
|
1126
|
+
if (global[kExitEmitter]) {
|
|
1127
|
+
return global[kExitEmitter];
|
|
1128
|
+
}
|
|
1129
|
+
ObjectDefineProperty(global, kExitEmitter, {
|
|
1130
|
+
value: this,
|
|
1131
|
+
writable: false,
|
|
1132
|
+
enumerable: false,
|
|
1133
|
+
configurable: false
|
|
1134
|
+
});
|
|
1135
|
+
}
|
|
1136
|
+
on(ev, fn) {
|
|
1137
|
+
this.listeners[ev].push(fn);
|
|
1138
|
+
}
|
|
1139
|
+
removeListener(ev, fn) {
|
|
1140
|
+
const list = this.listeners[ev];
|
|
1141
|
+
const i = list.indexOf(fn);
|
|
1142
|
+
if (i === -1) {
|
|
1143
|
+
return;
|
|
1144
|
+
}
|
|
1145
|
+
if (i === 0 && list.length === 1) {
|
|
1146
|
+
list.length = 0;
|
|
1147
|
+
} else {
|
|
1148
|
+
list.splice(i, 1);
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
emit(ev, code, signal) {
|
|
1152
|
+
if (this.emitted[ev]) {
|
|
1153
|
+
return false;
|
|
1154
|
+
}
|
|
1155
|
+
this.emitted[ev] = true;
|
|
1156
|
+
let ret = false;
|
|
1157
|
+
for (const fn of this.listeners[ev]) {
|
|
1158
|
+
ret = fn(code, signal) === true || ret;
|
|
1159
|
+
}
|
|
1160
|
+
if (ev === "exit") {
|
|
1161
|
+
ret = this.emit("afterExit", code, signal) || ret;
|
|
1162
|
+
}
|
|
1163
|
+
return ret;
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
class SignalExitBase {
|
|
1168
|
+
}
|
|
1169
|
+
var signalExitWrap = (handler) => {
|
|
1170
|
+
return {
|
|
1171
|
+
onExit(cb, opts) {
|
|
1172
|
+
return handler.onExit(cb, opts);
|
|
1173
|
+
},
|
|
1174
|
+
load() {
|
|
1175
|
+
return handler.load();
|
|
1176
|
+
},
|
|
1177
|
+
unload() {
|
|
1178
|
+
return handler.unload();
|
|
1179
|
+
}
|
|
1180
|
+
};
|
|
1181
|
+
};
|
|
1182
|
+
|
|
1183
|
+
class SignalExitFallback extends SignalExitBase {
|
|
1184
|
+
onExit() {
|
|
1185
|
+
return () => {};
|
|
1186
|
+
}
|
|
1187
|
+
load() {}
|
|
1188
|
+
unload() {}
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
class SignalExit extends SignalExitBase {
|
|
1192
|
+
#hupSig = process3.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
1193
|
+
#emitter = new Emitter;
|
|
1194
|
+
#process;
|
|
1195
|
+
#originalProcessEmit;
|
|
1196
|
+
#originalProcessReallyExit;
|
|
1197
|
+
#sigListeners = {};
|
|
1198
|
+
#loaded = false;
|
|
1199
|
+
constructor(process3) {
|
|
1200
|
+
super();
|
|
1201
|
+
this.#process = process3;
|
|
1202
|
+
this.#sigListeners = {};
|
|
1203
|
+
for (const sig of signals) {
|
|
1204
|
+
this.#sigListeners[sig] = () => {
|
|
1205
|
+
const listeners = this.#process.listeners(sig);
|
|
1206
|
+
let { count } = this.#emitter;
|
|
1207
|
+
const p = process3;
|
|
1208
|
+
if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") {
|
|
1209
|
+
count += p.__signal_exit_emitter__.count;
|
|
1210
|
+
}
|
|
1211
|
+
if (listeners.length === count) {
|
|
1212
|
+
this.unload();
|
|
1213
|
+
const ret = this.#emitter.emit("exit", null, sig);
|
|
1214
|
+
const s = sig === "SIGHUP" ? this.#hupSig : sig;
|
|
1215
|
+
if (!ret)
|
|
1216
|
+
process3.kill(process3.pid, s);
|
|
1217
|
+
}
|
|
1218
|
+
};
|
|
1219
|
+
}
|
|
1220
|
+
this.#originalProcessReallyExit = process3.reallyExit;
|
|
1221
|
+
this.#originalProcessEmit = process3.emit;
|
|
1222
|
+
}
|
|
1223
|
+
onExit(cb, opts) {
|
|
1224
|
+
if (!processOk(this.#process)) {
|
|
1225
|
+
return () => {};
|
|
1226
|
+
}
|
|
1227
|
+
if (this.#loaded === false) {
|
|
1228
|
+
this.load();
|
|
1229
|
+
}
|
|
1230
|
+
const ev = opts?.alwaysLast ? "afterExit" : "exit";
|
|
1231
|
+
this.#emitter.on(ev, cb);
|
|
1232
|
+
return () => {
|
|
1233
|
+
this.#emitter.removeListener(ev, cb);
|
|
1234
|
+
if (this.#emitter.listeners["exit"].length === 0 && this.#emitter.listeners["afterExit"].length === 0) {
|
|
1235
|
+
this.unload();
|
|
1236
|
+
}
|
|
1237
|
+
};
|
|
1238
|
+
}
|
|
1239
|
+
load() {
|
|
1240
|
+
if (this.#loaded) {
|
|
1241
|
+
return;
|
|
1242
|
+
}
|
|
1243
|
+
this.#loaded = true;
|
|
1244
|
+
this.#emitter.count += 1;
|
|
1245
|
+
for (const sig of signals) {
|
|
1246
|
+
try {
|
|
1247
|
+
const fn = this.#sigListeners[sig];
|
|
1248
|
+
if (fn)
|
|
1249
|
+
this.#process.on(sig, fn);
|
|
1250
|
+
} catch (_) {}
|
|
1251
|
+
}
|
|
1252
|
+
this.#process.emit = (ev, ...a) => {
|
|
1253
|
+
return this.#processEmit(ev, ...a);
|
|
1254
|
+
};
|
|
1255
|
+
this.#process.reallyExit = (code) => {
|
|
1256
|
+
return this.#processReallyExit(code);
|
|
1257
|
+
};
|
|
1258
|
+
}
|
|
1259
|
+
unload() {
|
|
1260
|
+
if (!this.#loaded) {
|
|
1261
|
+
return;
|
|
1262
|
+
}
|
|
1263
|
+
this.#loaded = false;
|
|
1264
|
+
signals.forEach((sig) => {
|
|
1265
|
+
const listener = this.#sigListeners[sig];
|
|
1266
|
+
if (!listener) {
|
|
1267
|
+
throw new Error("Listener not defined for signal: " + sig);
|
|
1268
|
+
}
|
|
1269
|
+
try {
|
|
1270
|
+
this.#process.removeListener(sig, listener);
|
|
1271
|
+
} catch (_) {}
|
|
1272
|
+
});
|
|
1273
|
+
this.#process.emit = this.#originalProcessEmit;
|
|
1274
|
+
this.#process.reallyExit = this.#originalProcessReallyExit;
|
|
1275
|
+
this.#emitter.count -= 1;
|
|
1276
|
+
}
|
|
1277
|
+
#processReallyExit(code) {
|
|
1278
|
+
if (!processOk(this.#process)) {
|
|
1279
|
+
return 0;
|
|
1280
|
+
}
|
|
1281
|
+
this.#process.exitCode = code || 0;
|
|
1282
|
+
this.#emitter.emit("exit", this.#process.exitCode, null);
|
|
1283
|
+
return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);
|
|
1284
|
+
}
|
|
1285
|
+
#processEmit(ev, ...args) {
|
|
1286
|
+
const og = this.#originalProcessEmit;
|
|
1287
|
+
if (ev === "exit" && processOk(this.#process)) {
|
|
1288
|
+
if (typeof args[0] === "number") {
|
|
1289
|
+
this.#process.exitCode = args[0];
|
|
1290
|
+
}
|
|
1291
|
+
const ret = og.call(this.#process, ev, ...args);
|
|
1292
|
+
this.#emitter.emit("exit", this.#process.exitCode, null);
|
|
1293
|
+
return ret;
|
|
1294
|
+
} else {
|
|
1295
|
+
return og.call(this.#process, ev, ...args);
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
var process3 = globalThis.process;
|
|
1300
|
+
var {
|
|
1301
|
+
onExit,
|
|
1302
|
+
load,
|
|
1303
|
+
unload
|
|
1304
|
+
} = signalExitWrap(processOk(process3) ? new SignalExit(process3) : new SignalExitFallback);
|
|
1305
|
+
|
|
1306
|
+
// ../../node_modules/ora/node_modules/cli-cursor/node_modules/restore-cursor/index.js
|
|
1307
|
+
var terminal = process4.stderr.isTTY ? process4.stderr : process4.stdout.isTTY ? process4.stdout : undefined;
|
|
1308
|
+
var restoreCursor = terminal ? onetime_default(() => {
|
|
1309
|
+
onExit(() => {
|
|
1310
|
+
terminal.write("\x1B[?25h");
|
|
1311
|
+
}, { alwaysLast: true });
|
|
1312
|
+
}) : () => {};
|
|
1313
|
+
var restore_cursor_default = restoreCursor;
|
|
1314
|
+
|
|
1315
|
+
// ../../node_modules/ora/node_modules/cli-cursor/index.js
|
|
1316
|
+
var isHidden = false;
|
|
1317
|
+
var cliCursor = {};
|
|
1318
|
+
cliCursor.show = (writableStream = process5.stderr) => {
|
|
1319
|
+
if (!writableStream.isTTY) {
|
|
1320
|
+
return;
|
|
1321
|
+
}
|
|
1322
|
+
isHidden = false;
|
|
1323
|
+
writableStream.write("\x1B[?25h");
|
|
1324
|
+
};
|
|
1325
|
+
cliCursor.hide = (writableStream = process5.stderr) => {
|
|
1326
|
+
if (!writableStream.isTTY) {
|
|
1327
|
+
return;
|
|
1328
|
+
}
|
|
1329
|
+
restore_cursor_default();
|
|
1330
|
+
isHidden = true;
|
|
1331
|
+
writableStream.write("\x1B[?25l");
|
|
1332
|
+
};
|
|
1333
|
+
cliCursor.toggle = (force, writableStream) => {
|
|
1334
|
+
if (force !== undefined) {
|
|
1335
|
+
isHidden = force;
|
|
1336
|
+
}
|
|
1337
|
+
if (isHidden) {
|
|
1338
|
+
cliCursor.show(writableStream);
|
|
1339
|
+
} else {
|
|
1340
|
+
cliCursor.hide(writableStream);
|
|
1341
|
+
}
|
|
1342
|
+
};
|
|
1343
|
+
var cli_cursor_default = cliCursor;
|
|
1344
|
+
// ../../node_modules/ora/node_modules/cli-spinners/spinners.json
|
|
1345
|
+
var spinners_default = {
|
|
1346
|
+
dots: {
|
|
1347
|
+
interval: 80,
|
|
1348
|
+
frames: [
|
|
1349
|
+
"⠋",
|
|
1350
|
+
"⠙",
|
|
1351
|
+
"⠹",
|
|
1352
|
+
"⠸",
|
|
1353
|
+
"⠼",
|
|
1354
|
+
"⠴",
|
|
1355
|
+
"⠦",
|
|
1356
|
+
"⠧",
|
|
1357
|
+
"⠇",
|
|
1358
|
+
"⠏"
|
|
1359
|
+
]
|
|
1360
|
+
},
|
|
1361
|
+
dots2: {
|
|
1362
|
+
interval: 80,
|
|
1363
|
+
frames: [
|
|
1364
|
+
"⣾",
|
|
1365
|
+
"⣽",
|
|
1366
|
+
"⣻",
|
|
1367
|
+
"⢿",
|
|
1368
|
+
"⡿",
|
|
1369
|
+
"⣟",
|
|
1370
|
+
"⣯",
|
|
1371
|
+
"⣷"
|
|
1372
|
+
]
|
|
1373
|
+
},
|
|
1374
|
+
dots3: {
|
|
1375
|
+
interval: 80,
|
|
1376
|
+
frames: [
|
|
1377
|
+
"⠋",
|
|
1378
|
+
"⠙",
|
|
1379
|
+
"⠚",
|
|
1380
|
+
"⠞",
|
|
1381
|
+
"⠖",
|
|
1382
|
+
"⠦",
|
|
1383
|
+
"⠴",
|
|
1384
|
+
"⠲",
|
|
1385
|
+
"⠳",
|
|
1386
|
+
"⠓"
|
|
1387
|
+
]
|
|
1388
|
+
},
|
|
1389
|
+
dots4: {
|
|
1390
|
+
interval: 80,
|
|
1391
|
+
frames: [
|
|
1392
|
+
"⠄",
|
|
1393
|
+
"⠆",
|
|
1394
|
+
"⠇",
|
|
1395
|
+
"⠋",
|
|
1396
|
+
"⠙",
|
|
1397
|
+
"⠸",
|
|
1398
|
+
"⠰",
|
|
1399
|
+
"⠠",
|
|
1400
|
+
"⠰",
|
|
1401
|
+
"⠸",
|
|
1402
|
+
"⠙",
|
|
1403
|
+
"⠋",
|
|
1404
|
+
"⠇",
|
|
1405
|
+
"⠆"
|
|
1406
|
+
]
|
|
1407
|
+
},
|
|
1408
|
+
dots5: {
|
|
1409
|
+
interval: 80,
|
|
1410
|
+
frames: [
|
|
1411
|
+
"⠋",
|
|
1412
|
+
"⠙",
|
|
1413
|
+
"⠚",
|
|
1414
|
+
"⠒",
|
|
1415
|
+
"⠂",
|
|
1416
|
+
"⠂",
|
|
1417
|
+
"⠒",
|
|
1418
|
+
"⠲",
|
|
1419
|
+
"⠴",
|
|
1420
|
+
"⠦",
|
|
1421
|
+
"⠖",
|
|
1422
|
+
"⠒",
|
|
1423
|
+
"⠐",
|
|
1424
|
+
"⠐",
|
|
1425
|
+
"⠒",
|
|
1426
|
+
"⠓",
|
|
1427
|
+
"⠋"
|
|
1428
|
+
]
|
|
1429
|
+
},
|
|
1430
|
+
dots6: {
|
|
1431
|
+
interval: 80,
|
|
1432
|
+
frames: [
|
|
1433
|
+
"⠁",
|
|
1434
|
+
"⠉",
|
|
1435
|
+
"⠙",
|
|
1436
|
+
"⠚",
|
|
1437
|
+
"⠒",
|
|
1438
|
+
"⠂",
|
|
1439
|
+
"⠂",
|
|
1440
|
+
"⠒",
|
|
1441
|
+
"⠲",
|
|
1442
|
+
"⠴",
|
|
1443
|
+
"⠤",
|
|
1444
|
+
"⠄",
|
|
1445
|
+
"⠄",
|
|
1446
|
+
"⠤",
|
|
1447
|
+
"⠴",
|
|
1448
|
+
"⠲",
|
|
1449
|
+
"⠒",
|
|
1450
|
+
"⠂",
|
|
1451
|
+
"⠂",
|
|
1452
|
+
"⠒",
|
|
1453
|
+
"⠚",
|
|
1454
|
+
"⠙",
|
|
1455
|
+
"⠉",
|
|
1456
|
+
"⠁"
|
|
1457
|
+
]
|
|
1458
|
+
},
|
|
1459
|
+
dots7: {
|
|
1460
|
+
interval: 80,
|
|
1461
|
+
frames: [
|
|
1462
|
+
"⠈",
|
|
1463
|
+
"⠉",
|
|
1464
|
+
"⠋",
|
|
1465
|
+
"⠓",
|
|
1466
|
+
"⠒",
|
|
1467
|
+
"⠐",
|
|
1468
|
+
"⠐",
|
|
1469
|
+
"⠒",
|
|
1470
|
+
"⠖",
|
|
1471
|
+
"⠦",
|
|
1472
|
+
"⠤",
|
|
1473
|
+
"⠠",
|
|
1474
|
+
"⠠",
|
|
1475
|
+
"⠤",
|
|
1476
|
+
"⠦",
|
|
1477
|
+
"⠖",
|
|
1478
|
+
"⠒",
|
|
1479
|
+
"⠐",
|
|
1480
|
+
"⠐",
|
|
1481
|
+
"⠒",
|
|
1482
|
+
"⠓",
|
|
1483
|
+
"⠋",
|
|
1484
|
+
"⠉",
|
|
1485
|
+
"⠈"
|
|
1486
|
+
]
|
|
1487
|
+
},
|
|
1488
|
+
dots8: {
|
|
1489
|
+
interval: 80,
|
|
1490
|
+
frames: [
|
|
1491
|
+
"⠁",
|
|
1492
|
+
"⠁",
|
|
1493
|
+
"⠉",
|
|
1494
|
+
"⠙",
|
|
1495
|
+
"⠚",
|
|
1496
|
+
"⠒",
|
|
1497
|
+
"⠂",
|
|
1498
|
+
"⠂",
|
|
1499
|
+
"⠒",
|
|
1500
|
+
"⠲",
|
|
1501
|
+
"⠴",
|
|
1502
|
+
"⠤",
|
|
1503
|
+
"⠄",
|
|
1504
|
+
"⠄",
|
|
1505
|
+
"⠤",
|
|
1506
|
+
"⠠",
|
|
1507
|
+
"⠠",
|
|
1508
|
+
"⠤",
|
|
1509
|
+
"⠦",
|
|
1510
|
+
"⠖",
|
|
1511
|
+
"⠒",
|
|
1512
|
+
"⠐",
|
|
1513
|
+
"⠐",
|
|
1514
|
+
"⠒",
|
|
1515
|
+
"⠓",
|
|
1516
|
+
"⠋",
|
|
1517
|
+
"⠉",
|
|
1518
|
+
"⠈",
|
|
1519
|
+
"⠈"
|
|
1520
|
+
]
|
|
1521
|
+
},
|
|
1522
|
+
dots9: {
|
|
1523
|
+
interval: 80,
|
|
1524
|
+
frames: [
|
|
1525
|
+
"⢹",
|
|
1526
|
+
"⢺",
|
|
1527
|
+
"⢼",
|
|
1528
|
+
"⣸",
|
|
1529
|
+
"⣇",
|
|
1530
|
+
"⡧",
|
|
1531
|
+
"⡗",
|
|
1532
|
+
"⡏"
|
|
1533
|
+
]
|
|
1534
|
+
},
|
|
1535
|
+
dots10: {
|
|
1536
|
+
interval: 80,
|
|
1537
|
+
frames: [
|
|
1538
|
+
"⢄",
|
|
1539
|
+
"⢂",
|
|
1540
|
+
"⢁",
|
|
1541
|
+
"⡁",
|
|
1542
|
+
"⡈",
|
|
1543
|
+
"⡐",
|
|
1544
|
+
"⡠"
|
|
1545
|
+
]
|
|
1546
|
+
},
|
|
1547
|
+
dots11: {
|
|
1548
|
+
interval: 100,
|
|
1549
|
+
frames: [
|
|
1550
|
+
"⠁",
|
|
1551
|
+
"⠂",
|
|
1552
|
+
"⠄",
|
|
1553
|
+
"⡀",
|
|
1554
|
+
"⢀",
|
|
1555
|
+
"⠠",
|
|
1556
|
+
"⠐",
|
|
1557
|
+
"⠈"
|
|
1558
|
+
]
|
|
1559
|
+
},
|
|
1560
|
+
dots12: {
|
|
1561
|
+
interval: 80,
|
|
1562
|
+
frames: [
|
|
1563
|
+
"⢀⠀",
|
|
1564
|
+
"⡀⠀",
|
|
1565
|
+
"⠄⠀",
|
|
1566
|
+
"⢂⠀",
|
|
1567
|
+
"⡂⠀",
|
|
1568
|
+
"⠅⠀",
|
|
1569
|
+
"⢃⠀",
|
|
1570
|
+
"⡃⠀",
|
|
1571
|
+
"⠍⠀",
|
|
1572
|
+
"⢋⠀",
|
|
1573
|
+
"⡋⠀",
|
|
1574
|
+
"⠍⠁",
|
|
1575
|
+
"⢋⠁",
|
|
1576
|
+
"⡋⠁",
|
|
1577
|
+
"⠍⠉",
|
|
1578
|
+
"⠋⠉",
|
|
1579
|
+
"⠋⠉",
|
|
1580
|
+
"⠉⠙",
|
|
1581
|
+
"⠉⠙",
|
|
1582
|
+
"⠉⠩",
|
|
1583
|
+
"⠈⢙",
|
|
1584
|
+
"⠈⡙",
|
|
1585
|
+
"⢈⠩",
|
|
1586
|
+
"⡀⢙",
|
|
1587
|
+
"⠄⡙",
|
|
1588
|
+
"⢂⠩",
|
|
1589
|
+
"⡂⢘",
|
|
1590
|
+
"⠅⡘",
|
|
1591
|
+
"⢃⠨",
|
|
1592
|
+
"⡃⢐",
|
|
1593
|
+
"⠍⡐",
|
|
1594
|
+
"⢋⠠",
|
|
1595
|
+
"⡋⢀",
|
|
1596
|
+
"⠍⡁",
|
|
1597
|
+
"⢋⠁",
|
|
1598
|
+
"⡋⠁",
|
|
1599
|
+
"⠍⠉",
|
|
1600
|
+
"⠋⠉",
|
|
1601
|
+
"⠋⠉",
|
|
1602
|
+
"⠉⠙",
|
|
1603
|
+
"⠉⠙",
|
|
1604
|
+
"⠉⠩",
|
|
1605
|
+
"⠈⢙",
|
|
1606
|
+
"⠈⡙",
|
|
1607
|
+
"⠈⠩",
|
|
1608
|
+
"⠀⢙",
|
|
1609
|
+
"⠀⡙",
|
|
1610
|
+
"⠀⠩",
|
|
1611
|
+
"⠀⢘",
|
|
1612
|
+
"⠀⡘",
|
|
1613
|
+
"⠀⠨",
|
|
1614
|
+
"⠀⢐",
|
|
1615
|
+
"⠀⡐",
|
|
1616
|
+
"⠀⠠",
|
|
1617
|
+
"⠀⢀",
|
|
1618
|
+
"⠀⡀"
|
|
1619
|
+
]
|
|
1620
|
+
},
|
|
1621
|
+
dots13: {
|
|
1622
|
+
interval: 80,
|
|
1623
|
+
frames: [
|
|
1624
|
+
"⣼",
|
|
1625
|
+
"⣹",
|
|
1626
|
+
"⢻",
|
|
1627
|
+
"⠿",
|
|
1628
|
+
"⡟",
|
|
1629
|
+
"⣏",
|
|
1630
|
+
"⣧",
|
|
1631
|
+
"⣶"
|
|
1632
|
+
]
|
|
1633
|
+
},
|
|
1634
|
+
dots14: {
|
|
1635
|
+
interval: 80,
|
|
1636
|
+
frames: [
|
|
1637
|
+
"⠉⠉",
|
|
1638
|
+
"⠈⠙",
|
|
1639
|
+
"⠀⠹",
|
|
1640
|
+
"⠀⢸",
|
|
1641
|
+
"⠀⣰",
|
|
1642
|
+
"⢀⣠",
|
|
1643
|
+
"⣀⣀",
|
|
1644
|
+
"⣄⡀",
|
|
1645
|
+
"⣆⠀",
|
|
1646
|
+
"⡇⠀",
|
|
1647
|
+
"⠏⠀",
|
|
1648
|
+
"⠋⠁"
|
|
1649
|
+
]
|
|
1650
|
+
},
|
|
1651
|
+
dots8Bit: {
|
|
1652
|
+
interval: 80,
|
|
1653
|
+
frames: [
|
|
1654
|
+
"⠀",
|
|
1655
|
+
"⠁",
|
|
1656
|
+
"⠂",
|
|
1657
|
+
"⠃",
|
|
1658
|
+
"⠄",
|
|
1659
|
+
"⠅",
|
|
1660
|
+
"⠆",
|
|
1661
|
+
"⠇",
|
|
1662
|
+
"⡀",
|
|
1663
|
+
"⡁",
|
|
1664
|
+
"⡂",
|
|
1665
|
+
"⡃",
|
|
1666
|
+
"⡄",
|
|
1667
|
+
"⡅",
|
|
1668
|
+
"⡆",
|
|
1669
|
+
"⡇",
|
|
1670
|
+
"⠈",
|
|
1671
|
+
"⠉",
|
|
1672
|
+
"⠊",
|
|
1673
|
+
"⠋",
|
|
1674
|
+
"⠌",
|
|
1675
|
+
"⠍",
|
|
1676
|
+
"⠎",
|
|
1677
|
+
"⠏",
|
|
1678
|
+
"⡈",
|
|
1679
|
+
"⡉",
|
|
1680
|
+
"⡊",
|
|
1681
|
+
"⡋",
|
|
1682
|
+
"⡌",
|
|
1683
|
+
"⡍",
|
|
1684
|
+
"⡎",
|
|
1685
|
+
"⡏",
|
|
1686
|
+
"⠐",
|
|
1687
|
+
"⠑",
|
|
1688
|
+
"⠒",
|
|
1689
|
+
"⠓",
|
|
1690
|
+
"⠔",
|
|
1691
|
+
"⠕",
|
|
1692
|
+
"⠖",
|
|
1693
|
+
"⠗",
|
|
1694
|
+
"⡐",
|
|
1695
|
+
"⡑",
|
|
1696
|
+
"⡒",
|
|
1697
|
+
"⡓",
|
|
1698
|
+
"⡔",
|
|
1699
|
+
"⡕",
|
|
1700
|
+
"⡖",
|
|
1701
|
+
"⡗",
|
|
1702
|
+
"⠘",
|
|
1703
|
+
"⠙",
|
|
1704
|
+
"⠚",
|
|
1705
|
+
"⠛",
|
|
1706
|
+
"⠜",
|
|
1707
|
+
"⠝",
|
|
1708
|
+
"⠞",
|
|
1709
|
+
"⠟",
|
|
1710
|
+
"⡘",
|
|
1711
|
+
"⡙",
|
|
1712
|
+
"⡚",
|
|
1713
|
+
"⡛",
|
|
1714
|
+
"⡜",
|
|
1715
|
+
"⡝",
|
|
1716
|
+
"⡞",
|
|
1717
|
+
"⡟",
|
|
1718
|
+
"⠠",
|
|
1719
|
+
"⠡",
|
|
1720
|
+
"⠢",
|
|
1721
|
+
"⠣",
|
|
1722
|
+
"⠤",
|
|
1723
|
+
"⠥",
|
|
1724
|
+
"⠦",
|
|
1725
|
+
"⠧",
|
|
1726
|
+
"⡠",
|
|
1727
|
+
"⡡",
|
|
1728
|
+
"⡢",
|
|
1729
|
+
"⡣",
|
|
1730
|
+
"⡤",
|
|
1731
|
+
"⡥",
|
|
1732
|
+
"⡦",
|
|
1733
|
+
"⡧",
|
|
1734
|
+
"⠨",
|
|
1735
|
+
"⠩",
|
|
1736
|
+
"⠪",
|
|
1737
|
+
"⠫",
|
|
1738
|
+
"⠬",
|
|
1739
|
+
"⠭",
|
|
1740
|
+
"⠮",
|
|
1741
|
+
"⠯",
|
|
1742
|
+
"⡨",
|
|
1743
|
+
"⡩",
|
|
1744
|
+
"⡪",
|
|
1745
|
+
"⡫",
|
|
1746
|
+
"⡬",
|
|
1747
|
+
"⡭",
|
|
1748
|
+
"⡮",
|
|
1749
|
+
"⡯",
|
|
1750
|
+
"⠰",
|
|
1751
|
+
"⠱",
|
|
1752
|
+
"⠲",
|
|
1753
|
+
"⠳",
|
|
1754
|
+
"⠴",
|
|
1755
|
+
"⠵",
|
|
1756
|
+
"⠶",
|
|
1757
|
+
"⠷",
|
|
1758
|
+
"⡰",
|
|
1759
|
+
"⡱",
|
|
1760
|
+
"⡲",
|
|
1761
|
+
"⡳",
|
|
1762
|
+
"⡴",
|
|
1763
|
+
"⡵",
|
|
1764
|
+
"⡶",
|
|
1765
|
+
"⡷",
|
|
1766
|
+
"⠸",
|
|
1767
|
+
"⠹",
|
|
1768
|
+
"⠺",
|
|
1769
|
+
"⠻",
|
|
1770
|
+
"⠼",
|
|
1771
|
+
"⠽",
|
|
1772
|
+
"⠾",
|
|
1773
|
+
"⠿",
|
|
1774
|
+
"⡸",
|
|
1775
|
+
"⡹",
|
|
1776
|
+
"⡺",
|
|
1777
|
+
"⡻",
|
|
1778
|
+
"⡼",
|
|
1779
|
+
"⡽",
|
|
1780
|
+
"⡾",
|
|
1781
|
+
"⡿",
|
|
1782
|
+
"⢀",
|
|
1783
|
+
"⢁",
|
|
1784
|
+
"⢂",
|
|
1785
|
+
"⢃",
|
|
1786
|
+
"⢄",
|
|
1787
|
+
"⢅",
|
|
1788
|
+
"⢆",
|
|
1789
|
+
"⢇",
|
|
1790
|
+
"⣀",
|
|
1791
|
+
"⣁",
|
|
1792
|
+
"⣂",
|
|
1793
|
+
"⣃",
|
|
1794
|
+
"⣄",
|
|
1795
|
+
"⣅",
|
|
1796
|
+
"⣆",
|
|
1797
|
+
"⣇",
|
|
1798
|
+
"⢈",
|
|
1799
|
+
"⢉",
|
|
1800
|
+
"⢊",
|
|
1801
|
+
"⢋",
|
|
1802
|
+
"⢌",
|
|
1803
|
+
"⢍",
|
|
1804
|
+
"⢎",
|
|
1805
|
+
"⢏",
|
|
1806
|
+
"⣈",
|
|
1807
|
+
"⣉",
|
|
1808
|
+
"⣊",
|
|
1809
|
+
"⣋",
|
|
1810
|
+
"⣌",
|
|
1811
|
+
"⣍",
|
|
1812
|
+
"⣎",
|
|
1813
|
+
"⣏",
|
|
1814
|
+
"⢐",
|
|
1815
|
+
"⢑",
|
|
1816
|
+
"⢒",
|
|
1817
|
+
"⢓",
|
|
1818
|
+
"⢔",
|
|
1819
|
+
"⢕",
|
|
1820
|
+
"⢖",
|
|
1821
|
+
"⢗",
|
|
1822
|
+
"⣐",
|
|
1823
|
+
"⣑",
|
|
1824
|
+
"⣒",
|
|
1825
|
+
"⣓",
|
|
1826
|
+
"⣔",
|
|
1827
|
+
"⣕",
|
|
1828
|
+
"⣖",
|
|
1829
|
+
"⣗",
|
|
1830
|
+
"⢘",
|
|
1831
|
+
"⢙",
|
|
1832
|
+
"⢚",
|
|
1833
|
+
"⢛",
|
|
1834
|
+
"⢜",
|
|
1835
|
+
"⢝",
|
|
1836
|
+
"⢞",
|
|
1837
|
+
"⢟",
|
|
1838
|
+
"⣘",
|
|
1839
|
+
"⣙",
|
|
1840
|
+
"⣚",
|
|
1841
|
+
"⣛",
|
|
1842
|
+
"⣜",
|
|
1843
|
+
"⣝",
|
|
1844
|
+
"⣞",
|
|
1845
|
+
"⣟",
|
|
1846
|
+
"⢠",
|
|
1847
|
+
"⢡",
|
|
1848
|
+
"⢢",
|
|
1849
|
+
"⢣",
|
|
1850
|
+
"⢤",
|
|
1851
|
+
"⢥",
|
|
1852
|
+
"⢦",
|
|
1853
|
+
"⢧",
|
|
1854
|
+
"⣠",
|
|
1855
|
+
"⣡",
|
|
1856
|
+
"⣢",
|
|
1857
|
+
"⣣",
|
|
1858
|
+
"⣤",
|
|
1859
|
+
"⣥",
|
|
1860
|
+
"⣦",
|
|
1861
|
+
"⣧",
|
|
1862
|
+
"⢨",
|
|
1863
|
+
"⢩",
|
|
1864
|
+
"⢪",
|
|
1865
|
+
"⢫",
|
|
1866
|
+
"⢬",
|
|
1867
|
+
"⢭",
|
|
1868
|
+
"⢮",
|
|
1869
|
+
"⢯",
|
|
1870
|
+
"⣨",
|
|
1871
|
+
"⣩",
|
|
1872
|
+
"⣪",
|
|
1873
|
+
"⣫",
|
|
1874
|
+
"⣬",
|
|
1875
|
+
"⣭",
|
|
1876
|
+
"⣮",
|
|
1877
|
+
"⣯",
|
|
1878
|
+
"⢰",
|
|
1879
|
+
"⢱",
|
|
1880
|
+
"⢲",
|
|
1881
|
+
"⢳",
|
|
1882
|
+
"⢴",
|
|
1883
|
+
"⢵",
|
|
1884
|
+
"⢶",
|
|
1885
|
+
"⢷",
|
|
1886
|
+
"⣰",
|
|
1887
|
+
"⣱",
|
|
1888
|
+
"⣲",
|
|
1889
|
+
"⣳",
|
|
1890
|
+
"⣴",
|
|
1891
|
+
"⣵",
|
|
1892
|
+
"⣶",
|
|
1893
|
+
"⣷",
|
|
1894
|
+
"⢸",
|
|
1895
|
+
"⢹",
|
|
1896
|
+
"⢺",
|
|
1897
|
+
"⢻",
|
|
1898
|
+
"⢼",
|
|
1899
|
+
"⢽",
|
|
1900
|
+
"⢾",
|
|
1901
|
+
"⢿",
|
|
1902
|
+
"⣸",
|
|
1903
|
+
"⣹",
|
|
1904
|
+
"⣺",
|
|
1905
|
+
"⣻",
|
|
1906
|
+
"⣼",
|
|
1907
|
+
"⣽",
|
|
1908
|
+
"⣾",
|
|
1909
|
+
"⣿"
|
|
1910
|
+
]
|
|
1911
|
+
},
|
|
1912
|
+
dotsCircle: {
|
|
1913
|
+
interval: 80,
|
|
1914
|
+
frames: [
|
|
1915
|
+
"⢎ ",
|
|
1916
|
+
"⠎⠁",
|
|
1917
|
+
"⠊⠑",
|
|
1918
|
+
"⠈⠱",
|
|
1919
|
+
" ⡱",
|
|
1920
|
+
"⢀⡰",
|
|
1921
|
+
"⢄⡠",
|
|
1922
|
+
"⢆⡀"
|
|
1923
|
+
]
|
|
1924
|
+
},
|
|
1925
|
+
sand: {
|
|
1926
|
+
interval: 80,
|
|
1927
|
+
frames: [
|
|
1928
|
+
"⠁",
|
|
1929
|
+
"⠂",
|
|
1930
|
+
"⠄",
|
|
1931
|
+
"⡀",
|
|
1932
|
+
"⡈",
|
|
1933
|
+
"⡐",
|
|
1934
|
+
"⡠",
|
|
1935
|
+
"⣀",
|
|
1936
|
+
"⣁",
|
|
1937
|
+
"⣂",
|
|
1938
|
+
"⣄",
|
|
1939
|
+
"⣌",
|
|
1940
|
+
"⣔",
|
|
1941
|
+
"⣤",
|
|
1942
|
+
"⣥",
|
|
1943
|
+
"⣦",
|
|
1944
|
+
"⣮",
|
|
1945
|
+
"⣶",
|
|
1946
|
+
"⣷",
|
|
1947
|
+
"⣿",
|
|
1948
|
+
"⡿",
|
|
1949
|
+
"⠿",
|
|
1950
|
+
"⢟",
|
|
1951
|
+
"⠟",
|
|
1952
|
+
"⡛",
|
|
1953
|
+
"⠛",
|
|
1954
|
+
"⠫",
|
|
1955
|
+
"⢋",
|
|
1956
|
+
"⠋",
|
|
1957
|
+
"⠍",
|
|
1958
|
+
"⡉",
|
|
1959
|
+
"⠉",
|
|
1960
|
+
"⠑",
|
|
1961
|
+
"⠡",
|
|
1962
|
+
"⢁"
|
|
1963
|
+
]
|
|
1964
|
+
},
|
|
1965
|
+
line: {
|
|
1966
|
+
interval: 130,
|
|
1967
|
+
frames: [
|
|
1968
|
+
"-",
|
|
1969
|
+
"\\",
|
|
1970
|
+
"|",
|
|
1971
|
+
"/"
|
|
1972
|
+
]
|
|
1973
|
+
},
|
|
1974
|
+
line2: {
|
|
1975
|
+
interval: 100,
|
|
1976
|
+
frames: [
|
|
1977
|
+
"⠂",
|
|
1978
|
+
"-",
|
|
1979
|
+
"–",
|
|
1980
|
+
"—",
|
|
1981
|
+
"–",
|
|
1982
|
+
"-"
|
|
1983
|
+
]
|
|
1984
|
+
},
|
|
1985
|
+
rollingLine: {
|
|
1986
|
+
interval: 80,
|
|
1987
|
+
frames: [
|
|
1988
|
+
"/ ",
|
|
1989
|
+
" - ",
|
|
1990
|
+
" \\ ",
|
|
1991
|
+
" |",
|
|
1992
|
+
" |",
|
|
1993
|
+
" \\ ",
|
|
1994
|
+
" - ",
|
|
1995
|
+
"/ "
|
|
1996
|
+
]
|
|
1997
|
+
},
|
|
1998
|
+
pipe: {
|
|
1999
|
+
interval: 100,
|
|
2000
|
+
frames: [
|
|
2001
|
+
"┤",
|
|
2002
|
+
"┘",
|
|
2003
|
+
"┴",
|
|
2004
|
+
"└",
|
|
2005
|
+
"├",
|
|
2006
|
+
"┌",
|
|
2007
|
+
"┬",
|
|
2008
|
+
"┐"
|
|
2009
|
+
]
|
|
2010
|
+
},
|
|
2011
|
+
simpleDots: {
|
|
2012
|
+
interval: 400,
|
|
2013
|
+
frames: [
|
|
2014
|
+
". ",
|
|
2015
|
+
".. ",
|
|
2016
|
+
"...",
|
|
2017
|
+
" "
|
|
2018
|
+
]
|
|
2019
|
+
},
|
|
2020
|
+
simpleDotsScrolling: {
|
|
2021
|
+
interval: 200,
|
|
2022
|
+
frames: [
|
|
2023
|
+
". ",
|
|
2024
|
+
".. ",
|
|
2025
|
+
"...",
|
|
2026
|
+
" ..",
|
|
2027
|
+
" .",
|
|
2028
|
+
" "
|
|
2029
|
+
]
|
|
2030
|
+
},
|
|
2031
|
+
star: {
|
|
2032
|
+
interval: 70,
|
|
2033
|
+
frames: [
|
|
2034
|
+
"✶",
|
|
2035
|
+
"✸",
|
|
2036
|
+
"✹",
|
|
2037
|
+
"✺",
|
|
2038
|
+
"✹",
|
|
2039
|
+
"✷"
|
|
2040
|
+
]
|
|
2041
|
+
},
|
|
2042
|
+
star2: {
|
|
2043
|
+
interval: 80,
|
|
2044
|
+
frames: [
|
|
2045
|
+
"+",
|
|
2046
|
+
"x",
|
|
2047
|
+
"*"
|
|
2048
|
+
]
|
|
2049
|
+
},
|
|
2050
|
+
flip: {
|
|
2051
|
+
interval: 70,
|
|
2052
|
+
frames: [
|
|
2053
|
+
"_",
|
|
2054
|
+
"_",
|
|
2055
|
+
"_",
|
|
2056
|
+
"-",
|
|
2057
|
+
"`",
|
|
2058
|
+
"`",
|
|
2059
|
+
"'",
|
|
2060
|
+
"´",
|
|
2061
|
+
"-",
|
|
2062
|
+
"_",
|
|
2063
|
+
"_",
|
|
2064
|
+
"_"
|
|
2065
|
+
]
|
|
2066
|
+
},
|
|
2067
|
+
hamburger: {
|
|
2068
|
+
interval: 100,
|
|
2069
|
+
frames: [
|
|
2070
|
+
"☱",
|
|
2071
|
+
"☲",
|
|
2072
|
+
"☴"
|
|
2073
|
+
]
|
|
2074
|
+
},
|
|
2075
|
+
growVertical: {
|
|
2076
|
+
interval: 120,
|
|
2077
|
+
frames: [
|
|
2078
|
+
"▁",
|
|
2079
|
+
"▃",
|
|
2080
|
+
"▄",
|
|
2081
|
+
"▅",
|
|
2082
|
+
"▆",
|
|
2083
|
+
"▇",
|
|
2084
|
+
"▆",
|
|
2085
|
+
"▅",
|
|
2086
|
+
"▄",
|
|
2087
|
+
"▃"
|
|
2088
|
+
]
|
|
2089
|
+
},
|
|
2090
|
+
growHorizontal: {
|
|
2091
|
+
interval: 120,
|
|
2092
|
+
frames: [
|
|
2093
|
+
"▏",
|
|
2094
|
+
"▎",
|
|
2095
|
+
"▍",
|
|
2096
|
+
"▌",
|
|
2097
|
+
"▋",
|
|
2098
|
+
"▊",
|
|
2099
|
+
"▉",
|
|
2100
|
+
"▊",
|
|
2101
|
+
"▋",
|
|
2102
|
+
"▌",
|
|
2103
|
+
"▍",
|
|
2104
|
+
"▎"
|
|
2105
|
+
]
|
|
2106
|
+
},
|
|
2107
|
+
balloon: {
|
|
2108
|
+
interval: 140,
|
|
2109
|
+
frames: [
|
|
2110
|
+
" ",
|
|
2111
|
+
".",
|
|
2112
|
+
"o",
|
|
2113
|
+
"O",
|
|
2114
|
+
"@",
|
|
2115
|
+
"*",
|
|
2116
|
+
" "
|
|
2117
|
+
]
|
|
2118
|
+
},
|
|
2119
|
+
balloon2: {
|
|
2120
|
+
interval: 120,
|
|
2121
|
+
frames: [
|
|
2122
|
+
".",
|
|
2123
|
+
"o",
|
|
2124
|
+
"O",
|
|
2125
|
+
"°",
|
|
2126
|
+
"O",
|
|
2127
|
+
"o",
|
|
2128
|
+
"."
|
|
2129
|
+
]
|
|
2130
|
+
},
|
|
2131
|
+
noise: {
|
|
2132
|
+
interval: 100,
|
|
2133
|
+
frames: [
|
|
2134
|
+
"▓",
|
|
2135
|
+
"▒",
|
|
2136
|
+
"░"
|
|
2137
|
+
]
|
|
2138
|
+
},
|
|
2139
|
+
bounce: {
|
|
2140
|
+
interval: 120,
|
|
2141
|
+
frames: [
|
|
2142
|
+
"⠁",
|
|
2143
|
+
"⠂",
|
|
2144
|
+
"⠄",
|
|
2145
|
+
"⠂"
|
|
2146
|
+
]
|
|
2147
|
+
},
|
|
2148
|
+
boxBounce: {
|
|
2149
|
+
interval: 120,
|
|
2150
|
+
frames: [
|
|
2151
|
+
"▖",
|
|
2152
|
+
"▘",
|
|
2153
|
+
"▝",
|
|
2154
|
+
"▗"
|
|
2155
|
+
]
|
|
2156
|
+
},
|
|
2157
|
+
boxBounce2: {
|
|
2158
|
+
interval: 100,
|
|
2159
|
+
frames: [
|
|
2160
|
+
"▌",
|
|
2161
|
+
"▀",
|
|
2162
|
+
"▐",
|
|
2163
|
+
"▄"
|
|
2164
|
+
]
|
|
2165
|
+
},
|
|
2166
|
+
triangle: {
|
|
2167
|
+
interval: 50,
|
|
2168
|
+
frames: [
|
|
2169
|
+
"◢",
|
|
2170
|
+
"◣",
|
|
2171
|
+
"◤",
|
|
2172
|
+
"◥"
|
|
2173
|
+
]
|
|
2174
|
+
},
|
|
2175
|
+
binary: {
|
|
2176
|
+
interval: 80,
|
|
2177
|
+
frames: [
|
|
2178
|
+
"010010",
|
|
2179
|
+
"001100",
|
|
2180
|
+
"100101",
|
|
2181
|
+
"111010",
|
|
2182
|
+
"111101",
|
|
2183
|
+
"010111",
|
|
2184
|
+
"101011",
|
|
2185
|
+
"111000",
|
|
2186
|
+
"110011",
|
|
2187
|
+
"110101"
|
|
2188
|
+
]
|
|
2189
|
+
},
|
|
2190
|
+
arc: {
|
|
2191
|
+
interval: 100,
|
|
2192
|
+
frames: [
|
|
2193
|
+
"◜",
|
|
2194
|
+
"◠",
|
|
2195
|
+
"◝",
|
|
2196
|
+
"◞",
|
|
2197
|
+
"◡",
|
|
2198
|
+
"◟"
|
|
2199
|
+
]
|
|
2200
|
+
},
|
|
2201
|
+
circle: {
|
|
2202
|
+
interval: 120,
|
|
2203
|
+
frames: [
|
|
2204
|
+
"◡",
|
|
2205
|
+
"⊙",
|
|
2206
|
+
"◠"
|
|
2207
|
+
]
|
|
2208
|
+
},
|
|
2209
|
+
squareCorners: {
|
|
2210
|
+
interval: 180,
|
|
2211
|
+
frames: [
|
|
2212
|
+
"◰",
|
|
2213
|
+
"◳",
|
|
2214
|
+
"◲",
|
|
2215
|
+
"◱"
|
|
2216
|
+
]
|
|
2217
|
+
},
|
|
2218
|
+
circleQuarters: {
|
|
2219
|
+
interval: 120,
|
|
2220
|
+
frames: [
|
|
2221
|
+
"◴",
|
|
2222
|
+
"◷",
|
|
2223
|
+
"◶",
|
|
2224
|
+
"◵"
|
|
2225
|
+
]
|
|
2226
|
+
},
|
|
2227
|
+
circleHalves: {
|
|
2228
|
+
interval: 50,
|
|
2229
|
+
frames: [
|
|
2230
|
+
"◐",
|
|
2231
|
+
"◓",
|
|
2232
|
+
"◑",
|
|
2233
|
+
"◒"
|
|
2234
|
+
]
|
|
2235
|
+
},
|
|
2236
|
+
squish: {
|
|
2237
|
+
interval: 100,
|
|
2238
|
+
frames: [
|
|
2239
|
+
"╫",
|
|
2240
|
+
"╪"
|
|
2241
|
+
]
|
|
2242
|
+
},
|
|
2243
|
+
toggle: {
|
|
2244
|
+
interval: 250,
|
|
2245
|
+
frames: [
|
|
2246
|
+
"⊶",
|
|
2247
|
+
"⊷"
|
|
2248
|
+
]
|
|
2249
|
+
},
|
|
2250
|
+
toggle2: {
|
|
2251
|
+
interval: 80,
|
|
2252
|
+
frames: [
|
|
2253
|
+
"▫",
|
|
2254
|
+
"▪"
|
|
2255
|
+
]
|
|
2256
|
+
},
|
|
2257
|
+
toggle3: {
|
|
2258
|
+
interval: 120,
|
|
2259
|
+
frames: [
|
|
2260
|
+
"□",
|
|
2261
|
+
"■"
|
|
2262
|
+
]
|
|
2263
|
+
},
|
|
2264
|
+
toggle4: {
|
|
2265
|
+
interval: 100,
|
|
2266
|
+
frames: [
|
|
2267
|
+
"■",
|
|
2268
|
+
"□",
|
|
2269
|
+
"▪",
|
|
2270
|
+
"▫"
|
|
2271
|
+
]
|
|
2272
|
+
},
|
|
2273
|
+
toggle5: {
|
|
2274
|
+
interval: 100,
|
|
2275
|
+
frames: [
|
|
2276
|
+
"▮",
|
|
2277
|
+
"▯"
|
|
2278
|
+
]
|
|
2279
|
+
},
|
|
2280
|
+
toggle6: {
|
|
2281
|
+
interval: 300,
|
|
2282
|
+
frames: [
|
|
2283
|
+
"ဝ",
|
|
2284
|
+
"၀"
|
|
2285
|
+
]
|
|
2286
|
+
},
|
|
2287
|
+
toggle7: {
|
|
2288
|
+
interval: 80,
|
|
2289
|
+
frames: [
|
|
2290
|
+
"⦾",
|
|
2291
|
+
"⦿"
|
|
2292
|
+
]
|
|
2293
|
+
},
|
|
2294
|
+
toggle8: {
|
|
2295
|
+
interval: 100,
|
|
2296
|
+
frames: [
|
|
2297
|
+
"◍",
|
|
2298
|
+
"◌"
|
|
2299
|
+
]
|
|
2300
|
+
},
|
|
2301
|
+
toggle9: {
|
|
2302
|
+
interval: 100,
|
|
2303
|
+
frames: [
|
|
2304
|
+
"◉",
|
|
2305
|
+
"◎"
|
|
2306
|
+
]
|
|
2307
|
+
},
|
|
2308
|
+
toggle10: {
|
|
2309
|
+
interval: 100,
|
|
2310
|
+
frames: [
|
|
2311
|
+
"㊂",
|
|
2312
|
+
"㊀",
|
|
2313
|
+
"㊁"
|
|
2314
|
+
]
|
|
2315
|
+
},
|
|
2316
|
+
toggle11: {
|
|
2317
|
+
interval: 50,
|
|
2318
|
+
frames: [
|
|
2319
|
+
"⧇",
|
|
2320
|
+
"⧆"
|
|
2321
|
+
]
|
|
2322
|
+
},
|
|
2323
|
+
toggle12: {
|
|
2324
|
+
interval: 120,
|
|
2325
|
+
frames: [
|
|
2326
|
+
"☗",
|
|
2327
|
+
"☖"
|
|
2328
|
+
]
|
|
2329
|
+
},
|
|
2330
|
+
toggle13: {
|
|
2331
|
+
interval: 80,
|
|
2332
|
+
frames: [
|
|
2333
|
+
"=",
|
|
2334
|
+
"*",
|
|
2335
|
+
"-"
|
|
2336
|
+
]
|
|
2337
|
+
},
|
|
2338
|
+
arrow: {
|
|
2339
|
+
interval: 100,
|
|
2340
|
+
frames: [
|
|
2341
|
+
"←",
|
|
2342
|
+
"↖",
|
|
2343
|
+
"↑",
|
|
2344
|
+
"↗",
|
|
2345
|
+
"→",
|
|
2346
|
+
"↘",
|
|
2347
|
+
"↓",
|
|
2348
|
+
"↙"
|
|
2349
|
+
]
|
|
2350
|
+
},
|
|
2351
|
+
arrow2: {
|
|
2352
|
+
interval: 80,
|
|
2353
|
+
frames: [
|
|
2354
|
+
"⬆️ ",
|
|
2355
|
+
"↗️ ",
|
|
2356
|
+
"➡️ ",
|
|
2357
|
+
"↘️ ",
|
|
2358
|
+
"⬇️ ",
|
|
2359
|
+
"↙️ ",
|
|
2360
|
+
"⬅️ ",
|
|
2361
|
+
"↖️ "
|
|
2362
|
+
]
|
|
2363
|
+
},
|
|
2364
|
+
arrow3: {
|
|
2365
|
+
interval: 120,
|
|
2366
|
+
frames: [
|
|
2367
|
+
"▹▹▹▹▹",
|
|
2368
|
+
"▸▹▹▹▹",
|
|
2369
|
+
"▹▸▹▹▹",
|
|
2370
|
+
"▹▹▸▹▹",
|
|
2371
|
+
"▹▹▹▸▹",
|
|
2372
|
+
"▹▹▹▹▸"
|
|
2373
|
+
]
|
|
2374
|
+
},
|
|
2375
|
+
bouncingBar: {
|
|
2376
|
+
interval: 80,
|
|
2377
|
+
frames: [
|
|
2378
|
+
"[ ]",
|
|
2379
|
+
"[= ]",
|
|
2380
|
+
"[== ]",
|
|
2381
|
+
"[=== ]",
|
|
2382
|
+
"[====]",
|
|
2383
|
+
"[ ===]",
|
|
2384
|
+
"[ ==]",
|
|
2385
|
+
"[ =]",
|
|
2386
|
+
"[ ]",
|
|
2387
|
+
"[ =]",
|
|
2388
|
+
"[ ==]",
|
|
2389
|
+
"[ ===]",
|
|
2390
|
+
"[====]",
|
|
2391
|
+
"[=== ]",
|
|
2392
|
+
"[== ]",
|
|
2393
|
+
"[= ]"
|
|
2394
|
+
]
|
|
2395
|
+
},
|
|
2396
|
+
bouncingBall: {
|
|
2397
|
+
interval: 80,
|
|
2398
|
+
frames: [
|
|
2399
|
+
"( ● )",
|
|
2400
|
+
"( ● )",
|
|
2401
|
+
"( ● )",
|
|
2402
|
+
"( ● )",
|
|
2403
|
+
"( ●)",
|
|
2404
|
+
"( ● )",
|
|
2405
|
+
"( ● )",
|
|
2406
|
+
"( ● )",
|
|
2407
|
+
"( ● )",
|
|
2408
|
+
"(● )"
|
|
2409
|
+
]
|
|
2410
|
+
},
|
|
2411
|
+
smiley: {
|
|
2412
|
+
interval: 200,
|
|
2413
|
+
frames: [
|
|
2414
|
+
"😄 ",
|
|
2415
|
+
"😝 "
|
|
2416
|
+
]
|
|
2417
|
+
},
|
|
2418
|
+
monkey: {
|
|
2419
|
+
interval: 300,
|
|
2420
|
+
frames: [
|
|
2421
|
+
"🙈 ",
|
|
2422
|
+
"🙈 ",
|
|
2423
|
+
"🙉 ",
|
|
2424
|
+
"🙊 "
|
|
2425
|
+
]
|
|
2426
|
+
},
|
|
2427
|
+
hearts: {
|
|
2428
|
+
interval: 100,
|
|
2429
|
+
frames: [
|
|
2430
|
+
"💛 ",
|
|
2431
|
+
"💙 ",
|
|
2432
|
+
"💜 ",
|
|
2433
|
+
"💚 ",
|
|
2434
|
+
"💗 "
|
|
2435
|
+
]
|
|
2436
|
+
},
|
|
2437
|
+
clock: {
|
|
2438
|
+
interval: 100,
|
|
2439
|
+
frames: [
|
|
2440
|
+
"🕛 ",
|
|
2441
|
+
"🕐 ",
|
|
2442
|
+
"🕑 ",
|
|
2443
|
+
"🕒 ",
|
|
2444
|
+
"🕓 ",
|
|
2445
|
+
"🕔 ",
|
|
2446
|
+
"🕕 ",
|
|
2447
|
+
"🕖 ",
|
|
2448
|
+
"🕗 ",
|
|
2449
|
+
"🕘 ",
|
|
2450
|
+
"🕙 ",
|
|
2451
|
+
"🕚 "
|
|
2452
|
+
]
|
|
2453
|
+
},
|
|
2454
|
+
earth: {
|
|
2455
|
+
interval: 180,
|
|
2456
|
+
frames: [
|
|
2457
|
+
"🌍 ",
|
|
2458
|
+
"🌎 ",
|
|
2459
|
+
"🌏 "
|
|
2460
|
+
]
|
|
2461
|
+
},
|
|
2462
|
+
material: {
|
|
2463
|
+
interval: 17,
|
|
2464
|
+
frames: [
|
|
2465
|
+
"█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
|
|
2466
|
+
"██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
|
|
2467
|
+
"███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
|
|
2468
|
+
"████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
|
|
2469
|
+
"██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
|
|
2470
|
+
"██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
|
|
2471
|
+
"███████▁▁▁▁▁▁▁▁▁▁▁▁▁",
|
|
2472
|
+
"████████▁▁▁▁▁▁▁▁▁▁▁▁",
|
|
2473
|
+
"█████████▁▁▁▁▁▁▁▁▁▁▁",
|
|
2474
|
+
"█████████▁▁▁▁▁▁▁▁▁▁▁",
|
|
2475
|
+
"██████████▁▁▁▁▁▁▁▁▁▁",
|
|
2476
|
+
"███████████▁▁▁▁▁▁▁▁▁",
|
|
2477
|
+
"█████████████▁▁▁▁▁▁▁",
|
|
2478
|
+
"██████████████▁▁▁▁▁▁",
|
|
2479
|
+
"██████████████▁▁▁▁▁▁",
|
|
2480
|
+
"▁██████████████▁▁▁▁▁",
|
|
2481
|
+
"▁██████████████▁▁▁▁▁",
|
|
2482
|
+
"▁██████████████▁▁▁▁▁",
|
|
2483
|
+
"▁▁██████████████▁▁▁▁",
|
|
2484
|
+
"▁▁▁██████████████▁▁▁",
|
|
2485
|
+
"▁▁▁▁█████████████▁▁▁",
|
|
2486
|
+
"▁▁▁▁██████████████▁▁",
|
|
2487
|
+
"▁▁▁▁██████████████▁▁",
|
|
2488
|
+
"▁▁▁▁▁██████████████▁",
|
|
2489
|
+
"▁▁▁▁▁██████████████▁",
|
|
2490
|
+
"▁▁▁▁▁██████████████▁",
|
|
2491
|
+
"▁▁▁▁▁▁██████████████",
|
|
2492
|
+
"▁▁▁▁▁▁██████████████",
|
|
2493
|
+
"▁▁▁▁▁▁▁█████████████",
|
|
2494
|
+
"▁▁▁▁▁▁▁█████████████",
|
|
2495
|
+
"▁▁▁▁▁▁▁▁████████████",
|
|
2496
|
+
"▁▁▁▁▁▁▁▁████████████",
|
|
2497
|
+
"▁▁▁▁▁▁▁▁▁███████████",
|
|
2498
|
+
"▁▁▁▁▁▁▁▁▁███████████",
|
|
2499
|
+
"▁▁▁▁▁▁▁▁▁▁██████████",
|
|
2500
|
+
"▁▁▁▁▁▁▁▁▁▁██████████",
|
|
2501
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁████████",
|
|
2502
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁███████",
|
|
2503
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████",
|
|
2504
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████",
|
|
2505
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████",
|
|
2506
|
+
"█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████",
|
|
2507
|
+
"██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███",
|
|
2508
|
+
"██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███",
|
|
2509
|
+
"███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███",
|
|
2510
|
+
"████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██",
|
|
2511
|
+
"█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█",
|
|
2512
|
+
"█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█",
|
|
2513
|
+
"██████▁▁▁▁▁▁▁▁▁▁▁▁▁█",
|
|
2514
|
+
"████████▁▁▁▁▁▁▁▁▁▁▁▁",
|
|
2515
|
+
"█████████▁▁▁▁▁▁▁▁▁▁▁",
|
|
2516
|
+
"█████████▁▁▁▁▁▁▁▁▁▁▁",
|
|
2517
|
+
"█████████▁▁▁▁▁▁▁▁▁▁▁",
|
|
2518
|
+
"█████████▁▁▁▁▁▁▁▁▁▁▁",
|
|
2519
|
+
"███████████▁▁▁▁▁▁▁▁▁",
|
|
2520
|
+
"████████████▁▁▁▁▁▁▁▁",
|
|
2521
|
+
"████████████▁▁▁▁▁▁▁▁",
|
|
2522
|
+
"██████████████▁▁▁▁▁▁",
|
|
2523
|
+
"██████████████▁▁▁▁▁▁",
|
|
2524
|
+
"▁██████████████▁▁▁▁▁",
|
|
2525
|
+
"▁██████████████▁▁▁▁▁",
|
|
2526
|
+
"▁▁▁█████████████▁▁▁▁",
|
|
2527
|
+
"▁▁▁▁▁████████████▁▁▁",
|
|
2528
|
+
"▁▁▁▁▁████████████▁▁▁",
|
|
2529
|
+
"▁▁▁▁▁▁███████████▁▁▁",
|
|
2530
|
+
"▁▁▁▁▁▁▁▁█████████▁▁▁",
|
|
2531
|
+
"▁▁▁▁▁▁▁▁█████████▁▁▁",
|
|
2532
|
+
"▁▁▁▁▁▁▁▁▁█████████▁▁",
|
|
2533
|
+
"▁▁▁▁▁▁▁▁▁█████████▁▁",
|
|
2534
|
+
"▁▁▁▁▁▁▁▁▁▁█████████▁",
|
|
2535
|
+
"▁▁▁▁▁▁▁▁▁▁▁████████▁",
|
|
2536
|
+
"▁▁▁▁▁▁▁▁▁▁▁████████▁",
|
|
2537
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁███████▁",
|
|
2538
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁███████▁",
|
|
2539
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁███████",
|
|
2540
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁███████",
|
|
2541
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████",
|
|
2542
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████",
|
|
2543
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████",
|
|
2544
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████",
|
|
2545
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███",
|
|
2546
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███",
|
|
2547
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██",
|
|
2548
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██",
|
|
2549
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██",
|
|
2550
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█",
|
|
2551
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█",
|
|
2552
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█",
|
|
2553
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
|
|
2554
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
|
|
2555
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
|
|
2556
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁"
|
|
2557
|
+
]
|
|
2558
|
+
},
|
|
2559
|
+
moon: {
|
|
2560
|
+
interval: 80,
|
|
2561
|
+
frames: [
|
|
2562
|
+
"🌑 ",
|
|
2563
|
+
"🌒 ",
|
|
2564
|
+
"🌓 ",
|
|
2565
|
+
"🌔 ",
|
|
2566
|
+
"🌕 ",
|
|
2567
|
+
"🌖 ",
|
|
2568
|
+
"🌗 ",
|
|
2569
|
+
"🌘 "
|
|
2570
|
+
]
|
|
2571
|
+
},
|
|
2572
|
+
runner: {
|
|
2573
|
+
interval: 140,
|
|
2574
|
+
frames: [
|
|
2575
|
+
"🚶 ",
|
|
2576
|
+
"🏃 "
|
|
2577
|
+
]
|
|
2578
|
+
},
|
|
2579
|
+
pong: {
|
|
2580
|
+
interval: 80,
|
|
2581
|
+
frames: [
|
|
2582
|
+
"▐⠂ ▌",
|
|
2583
|
+
"▐⠈ ▌",
|
|
2584
|
+
"▐ ⠂ ▌",
|
|
2585
|
+
"▐ ⠠ ▌",
|
|
2586
|
+
"▐ ⡀ ▌",
|
|
2587
|
+
"▐ ⠠ ▌",
|
|
2588
|
+
"▐ ⠂ ▌",
|
|
2589
|
+
"▐ ⠈ ▌",
|
|
2590
|
+
"▐ ⠂ ▌",
|
|
2591
|
+
"▐ ⠠ ▌",
|
|
2592
|
+
"▐ ⡀ ▌",
|
|
2593
|
+
"▐ ⠠ ▌",
|
|
2594
|
+
"▐ ⠂ ▌",
|
|
2595
|
+
"▐ ⠈ ▌",
|
|
2596
|
+
"▐ ⠂▌",
|
|
2597
|
+
"▐ ⠠▌",
|
|
2598
|
+
"▐ ⡀▌",
|
|
2599
|
+
"▐ ⠠ ▌",
|
|
2600
|
+
"▐ ⠂ ▌",
|
|
2601
|
+
"▐ ⠈ ▌",
|
|
2602
|
+
"▐ ⠂ ▌",
|
|
2603
|
+
"▐ ⠠ ▌",
|
|
2604
|
+
"▐ ⡀ ▌",
|
|
2605
|
+
"▐ ⠠ ▌",
|
|
2606
|
+
"▐ ⠂ ▌",
|
|
2607
|
+
"▐ ⠈ ▌",
|
|
2608
|
+
"▐ ⠂ ▌",
|
|
2609
|
+
"▐ ⠠ ▌",
|
|
2610
|
+
"▐ ⡀ ▌",
|
|
2611
|
+
"▐⠠ ▌"
|
|
2612
|
+
]
|
|
2613
|
+
},
|
|
2614
|
+
shark: {
|
|
2615
|
+
interval: 120,
|
|
2616
|
+
frames: [
|
|
2617
|
+
"▐|\\____________▌",
|
|
2618
|
+
"▐_|\\___________▌",
|
|
2619
|
+
"▐__|\\__________▌",
|
|
2620
|
+
"▐___|\\_________▌",
|
|
2621
|
+
"▐____|\\________▌",
|
|
2622
|
+
"▐_____|\\_______▌",
|
|
2623
|
+
"▐______|\\______▌",
|
|
2624
|
+
"▐_______|\\_____▌",
|
|
2625
|
+
"▐________|\\____▌",
|
|
2626
|
+
"▐_________|\\___▌",
|
|
2627
|
+
"▐__________|\\__▌",
|
|
2628
|
+
"▐___________|\\_▌",
|
|
2629
|
+
"▐____________|\\▌",
|
|
2630
|
+
"▐____________/|▌",
|
|
2631
|
+
"▐___________/|_▌",
|
|
2632
|
+
"▐__________/|__▌",
|
|
2633
|
+
"▐_________/|___▌",
|
|
2634
|
+
"▐________/|____▌",
|
|
2635
|
+
"▐_______/|_____▌",
|
|
2636
|
+
"▐______/|______▌",
|
|
2637
|
+
"▐_____/|_______▌",
|
|
2638
|
+
"▐____/|________▌",
|
|
2639
|
+
"▐___/|_________▌",
|
|
2640
|
+
"▐__/|__________▌",
|
|
2641
|
+
"▐_/|___________▌",
|
|
2642
|
+
"▐/|____________▌"
|
|
2643
|
+
]
|
|
2644
|
+
},
|
|
2645
|
+
dqpb: {
|
|
2646
|
+
interval: 100,
|
|
2647
|
+
frames: [
|
|
2648
|
+
"d",
|
|
2649
|
+
"q",
|
|
2650
|
+
"p",
|
|
2651
|
+
"b"
|
|
2652
|
+
]
|
|
2653
|
+
},
|
|
2654
|
+
weather: {
|
|
2655
|
+
interval: 100,
|
|
2656
|
+
frames: [
|
|
2657
|
+
"☀️ ",
|
|
2658
|
+
"☀️ ",
|
|
2659
|
+
"☀️ ",
|
|
2660
|
+
"🌤 ",
|
|
2661
|
+
"⛅️ ",
|
|
2662
|
+
"🌥 ",
|
|
2663
|
+
"☁️ ",
|
|
2664
|
+
"🌧 ",
|
|
2665
|
+
"🌨 ",
|
|
2666
|
+
"🌧 ",
|
|
2667
|
+
"🌨 ",
|
|
2668
|
+
"🌧 ",
|
|
2669
|
+
"🌨 ",
|
|
2670
|
+
"⛈ ",
|
|
2671
|
+
"🌨 ",
|
|
2672
|
+
"🌧 ",
|
|
2673
|
+
"🌨 ",
|
|
2674
|
+
"☁️ ",
|
|
2675
|
+
"🌥 ",
|
|
2676
|
+
"⛅️ ",
|
|
2677
|
+
"🌤 ",
|
|
2678
|
+
"☀️ ",
|
|
2679
|
+
"☀️ "
|
|
2680
|
+
]
|
|
2681
|
+
},
|
|
2682
|
+
christmas: {
|
|
2683
|
+
interval: 400,
|
|
2684
|
+
frames: [
|
|
2685
|
+
"🌲",
|
|
2686
|
+
"🎄"
|
|
2687
|
+
]
|
|
2688
|
+
},
|
|
2689
|
+
grenade: {
|
|
2690
|
+
interval: 80,
|
|
2691
|
+
frames: [
|
|
2692
|
+
"، ",
|
|
2693
|
+
"′ ",
|
|
2694
|
+
" ´ ",
|
|
2695
|
+
" ‾ ",
|
|
2696
|
+
" ⸌",
|
|
2697
|
+
" ⸊",
|
|
2698
|
+
" |",
|
|
2699
|
+
" ⁎",
|
|
2700
|
+
" ⁕",
|
|
2701
|
+
" ෴ ",
|
|
2702
|
+
" ⁓",
|
|
2703
|
+
" ",
|
|
2704
|
+
" ",
|
|
2705
|
+
" "
|
|
2706
|
+
]
|
|
2707
|
+
},
|
|
2708
|
+
point: {
|
|
2709
|
+
interval: 125,
|
|
2710
|
+
frames: [
|
|
2711
|
+
"∙∙∙",
|
|
2712
|
+
"●∙∙",
|
|
2713
|
+
"∙●∙",
|
|
2714
|
+
"∙∙●",
|
|
2715
|
+
"∙∙∙"
|
|
2716
|
+
]
|
|
2717
|
+
},
|
|
2718
|
+
layer: {
|
|
2719
|
+
interval: 150,
|
|
2720
|
+
frames: [
|
|
2721
|
+
"-",
|
|
2722
|
+
"=",
|
|
2723
|
+
"≡"
|
|
2724
|
+
]
|
|
2725
|
+
},
|
|
2726
|
+
betaWave: {
|
|
2727
|
+
interval: 80,
|
|
2728
|
+
frames: [
|
|
2729
|
+
"ρββββββ",
|
|
2730
|
+
"βρβββββ",
|
|
2731
|
+
"ββρββββ",
|
|
2732
|
+
"βββρβββ",
|
|
2733
|
+
"ββββρββ",
|
|
2734
|
+
"βββββρβ",
|
|
2735
|
+
"ββββββρ"
|
|
2736
|
+
]
|
|
2737
|
+
},
|
|
2738
|
+
fingerDance: {
|
|
2739
|
+
interval: 160,
|
|
2740
|
+
frames: [
|
|
2741
|
+
"🤘 ",
|
|
2742
|
+
"🤟 ",
|
|
2743
|
+
"🖖 ",
|
|
2744
|
+
"✋ ",
|
|
2745
|
+
"🤚 ",
|
|
2746
|
+
"👆 "
|
|
2747
|
+
]
|
|
2748
|
+
},
|
|
2749
|
+
fistBump: {
|
|
2750
|
+
interval: 80,
|
|
2751
|
+
frames: [
|
|
2752
|
+
"🤜 🤛 ",
|
|
2753
|
+
"🤜 🤛 ",
|
|
2754
|
+
"🤜 🤛 ",
|
|
2755
|
+
" 🤜 🤛 ",
|
|
2756
|
+
" 🤜🤛 ",
|
|
2757
|
+
" 🤜✨🤛 ",
|
|
2758
|
+
"🤜 ✨ 🤛 "
|
|
2759
|
+
]
|
|
2760
|
+
},
|
|
2761
|
+
soccerHeader: {
|
|
2762
|
+
interval: 80,
|
|
2763
|
+
frames: [
|
|
2764
|
+
" 🧑⚽️ 🧑 ",
|
|
2765
|
+
"🧑 ⚽️ 🧑 ",
|
|
2766
|
+
"🧑 ⚽️ 🧑 ",
|
|
2767
|
+
"🧑 ⚽️ 🧑 ",
|
|
2768
|
+
"🧑 ⚽️ 🧑 ",
|
|
2769
|
+
"🧑 ⚽️ 🧑 ",
|
|
2770
|
+
"🧑 ⚽️🧑 ",
|
|
2771
|
+
"🧑 ⚽️ 🧑 ",
|
|
2772
|
+
"🧑 ⚽️ 🧑 ",
|
|
2773
|
+
"🧑 ⚽️ 🧑 ",
|
|
2774
|
+
"🧑 ⚽️ 🧑 ",
|
|
2775
|
+
"🧑 ⚽️ 🧑 "
|
|
2776
|
+
]
|
|
2777
|
+
},
|
|
2778
|
+
mindblown: {
|
|
2779
|
+
interval: 160,
|
|
2780
|
+
frames: [
|
|
2781
|
+
"😐 ",
|
|
2782
|
+
"😐 ",
|
|
2783
|
+
"😮 ",
|
|
2784
|
+
"😮 ",
|
|
2785
|
+
"😦 ",
|
|
2786
|
+
"😦 ",
|
|
2787
|
+
"😧 ",
|
|
2788
|
+
"😧 ",
|
|
2789
|
+
"🤯 ",
|
|
2790
|
+
"💥 ",
|
|
2791
|
+
"✨ ",
|
|
2792
|
+
" ",
|
|
2793
|
+
" ",
|
|
2794
|
+
" "
|
|
2795
|
+
]
|
|
2796
|
+
},
|
|
2797
|
+
speaker: {
|
|
2798
|
+
interval: 160,
|
|
2799
|
+
frames: [
|
|
2800
|
+
"🔈 ",
|
|
2801
|
+
"🔉 ",
|
|
2802
|
+
"🔊 ",
|
|
2803
|
+
"🔉 "
|
|
2804
|
+
]
|
|
2805
|
+
},
|
|
2806
|
+
orangePulse: {
|
|
2807
|
+
interval: 100,
|
|
2808
|
+
frames: [
|
|
2809
|
+
"🔸 ",
|
|
2810
|
+
"🔶 ",
|
|
2811
|
+
"🟠 ",
|
|
2812
|
+
"🟠 ",
|
|
2813
|
+
"🔶 "
|
|
2814
|
+
]
|
|
2815
|
+
},
|
|
2816
|
+
bluePulse: {
|
|
2817
|
+
interval: 100,
|
|
2818
|
+
frames: [
|
|
2819
|
+
"🔹 ",
|
|
2820
|
+
"🔷 ",
|
|
2821
|
+
"🔵 ",
|
|
2822
|
+
"🔵 ",
|
|
2823
|
+
"🔷 "
|
|
2824
|
+
]
|
|
2825
|
+
},
|
|
2826
|
+
orangeBluePulse: {
|
|
2827
|
+
interval: 100,
|
|
2828
|
+
frames: [
|
|
2829
|
+
"🔸 ",
|
|
2830
|
+
"🔶 ",
|
|
2831
|
+
"🟠 ",
|
|
2832
|
+
"🟠 ",
|
|
2833
|
+
"🔶 ",
|
|
2834
|
+
"🔹 ",
|
|
2835
|
+
"🔷 ",
|
|
2836
|
+
"🔵 ",
|
|
2837
|
+
"🔵 ",
|
|
2838
|
+
"🔷 "
|
|
2839
|
+
]
|
|
2840
|
+
},
|
|
2841
|
+
timeTravel: {
|
|
2842
|
+
interval: 100,
|
|
2843
|
+
frames: [
|
|
2844
|
+
"🕛 ",
|
|
2845
|
+
"🕚 ",
|
|
2846
|
+
"🕙 ",
|
|
2847
|
+
"🕘 ",
|
|
2848
|
+
"🕗 ",
|
|
2849
|
+
"🕖 ",
|
|
2850
|
+
"🕕 ",
|
|
2851
|
+
"🕔 ",
|
|
2852
|
+
"🕓 ",
|
|
2853
|
+
"🕒 ",
|
|
2854
|
+
"🕑 ",
|
|
2855
|
+
"🕐 "
|
|
2856
|
+
]
|
|
2857
|
+
},
|
|
2858
|
+
aesthetic: {
|
|
2859
|
+
interval: 80,
|
|
2860
|
+
frames: [
|
|
2861
|
+
"▰▱▱▱▱▱▱",
|
|
2862
|
+
"▰▰▱▱▱▱▱",
|
|
2863
|
+
"▰▰▰▱▱▱▱",
|
|
2864
|
+
"▰▰▰▰▱▱▱",
|
|
2865
|
+
"▰▰▰▰▰▱▱",
|
|
2866
|
+
"▰▰▰▰▰▰▱",
|
|
2867
|
+
"▰▰▰▰▰▰▰",
|
|
2868
|
+
"▰▱▱▱▱▱▱"
|
|
2869
|
+
]
|
|
2870
|
+
},
|
|
2871
|
+
dwarfFortress: {
|
|
2872
|
+
interval: 80,
|
|
2873
|
+
frames: [
|
|
2874
|
+
" ██████£££ ",
|
|
2875
|
+
"☺██████£££ ",
|
|
2876
|
+
"☺██████£££ ",
|
|
2877
|
+
"☺▓█████£££ ",
|
|
2878
|
+
"☺▓█████£££ ",
|
|
2879
|
+
"☺▒█████£££ ",
|
|
2880
|
+
"☺▒█████£££ ",
|
|
2881
|
+
"☺░█████£££ ",
|
|
2882
|
+
"☺░█████£££ ",
|
|
2883
|
+
"☺ █████£££ ",
|
|
2884
|
+
" ☺█████£££ ",
|
|
2885
|
+
" ☺█████£££ ",
|
|
2886
|
+
" ☺▓████£££ ",
|
|
2887
|
+
" ☺▓████£££ ",
|
|
2888
|
+
" ☺▒████£££ ",
|
|
2889
|
+
" ☺▒████£££ ",
|
|
2890
|
+
" ☺░████£££ ",
|
|
2891
|
+
" ☺░████£££ ",
|
|
2892
|
+
" ☺ ████£££ ",
|
|
2893
|
+
" ☺████£££ ",
|
|
2894
|
+
" ☺████£££ ",
|
|
2895
|
+
" ☺▓███£££ ",
|
|
2896
|
+
" ☺▓███£££ ",
|
|
2897
|
+
" ☺▒███£££ ",
|
|
2898
|
+
" ☺▒███£££ ",
|
|
2899
|
+
" ☺░███£££ ",
|
|
2900
|
+
" ☺░███£££ ",
|
|
2901
|
+
" ☺ ███£££ ",
|
|
2902
|
+
" ☺███£££ ",
|
|
2903
|
+
" ☺███£££ ",
|
|
2904
|
+
" ☺▓██£££ ",
|
|
2905
|
+
" ☺▓██£££ ",
|
|
2906
|
+
" ☺▒██£££ ",
|
|
2907
|
+
" ☺▒██£££ ",
|
|
2908
|
+
" ☺░██£££ ",
|
|
2909
|
+
" ☺░██£££ ",
|
|
2910
|
+
" ☺ ██£££ ",
|
|
2911
|
+
" ☺██£££ ",
|
|
2912
|
+
" ☺██£££ ",
|
|
2913
|
+
" ☺▓█£££ ",
|
|
2914
|
+
" ☺▓█£££ ",
|
|
2915
|
+
" ☺▒█£££ ",
|
|
2916
|
+
" ☺▒█£££ ",
|
|
2917
|
+
" ☺░█£££ ",
|
|
2918
|
+
" ☺░█£££ ",
|
|
2919
|
+
" ☺ █£££ ",
|
|
2920
|
+
" ☺█£££ ",
|
|
2921
|
+
" ☺█£££ ",
|
|
2922
|
+
" ☺▓£££ ",
|
|
2923
|
+
" ☺▓£££ ",
|
|
2924
|
+
" ☺▒£££ ",
|
|
2925
|
+
" ☺▒£££ ",
|
|
2926
|
+
" ☺░£££ ",
|
|
2927
|
+
" ☺░£££ ",
|
|
2928
|
+
" ☺ £££ ",
|
|
2929
|
+
" ☺£££ ",
|
|
2930
|
+
" ☺£££ ",
|
|
2931
|
+
" ☺▓££ ",
|
|
2932
|
+
" ☺▓££ ",
|
|
2933
|
+
" ☺▒££ ",
|
|
2934
|
+
" ☺▒££ ",
|
|
2935
|
+
" ☺░££ ",
|
|
2936
|
+
" ☺░££ ",
|
|
2937
|
+
" ☺ ££ ",
|
|
2938
|
+
" ☺££ ",
|
|
2939
|
+
" ☺££ ",
|
|
2940
|
+
" ☺▓£ ",
|
|
2941
|
+
" ☺▓£ ",
|
|
2942
|
+
" ☺▒£ ",
|
|
2943
|
+
" ☺▒£ ",
|
|
2944
|
+
" ☺░£ ",
|
|
2945
|
+
" ☺░£ ",
|
|
2946
|
+
" ☺ £ ",
|
|
2947
|
+
" ☺£ ",
|
|
2948
|
+
" ☺£ ",
|
|
2949
|
+
" ☺▓ ",
|
|
2950
|
+
" ☺▓ ",
|
|
2951
|
+
" ☺▒ ",
|
|
2952
|
+
" ☺▒ ",
|
|
2953
|
+
" ☺░ ",
|
|
2954
|
+
" ☺░ ",
|
|
2955
|
+
" ☺ ",
|
|
2956
|
+
" ☺ &",
|
|
2957
|
+
" ☺ ☼&",
|
|
2958
|
+
" ☺ ☼ &",
|
|
2959
|
+
" ☺☼ &",
|
|
2960
|
+
" ☺☼ & ",
|
|
2961
|
+
" ‼ & ",
|
|
2962
|
+
" ☺ & ",
|
|
2963
|
+
" ‼ & ",
|
|
2964
|
+
" ☺ & ",
|
|
2965
|
+
" ‼ & ",
|
|
2966
|
+
" ☺ & ",
|
|
2967
|
+
"‼ & ",
|
|
2968
|
+
" & ",
|
|
2969
|
+
" & ",
|
|
2970
|
+
" & ░ ",
|
|
2971
|
+
" & ▒ ",
|
|
2972
|
+
" & ▓ ",
|
|
2973
|
+
" & £ ",
|
|
2974
|
+
" & ░£ ",
|
|
2975
|
+
" & ▒£ ",
|
|
2976
|
+
" & ▓£ ",
|
|
2977
|
+
" & ££ ",
|
|
2978
|
+
" & ░££ ",
|
|
2979
|
+
" & ▒££ ",
|
|
2980
|
+
"& ▓££ ",
|
|
2981
|
+
"& £££ ",
|
|
2982
|
+
" ░£££ ",
|
|
2983
|
+
" ▒£££ ",
|
|
2984
|
+
" ▓£££ ",
|
|
2985
|
+
" █£££ ",
|
|
2986
|
+
" ░█£££ ",
|
|
2987
|
+
" ▒█£££ ",
|
|
2988
|
+
" ▓█£££ ",
|
|
2989
|
+
" ██£££ ",
|
|
2990
|
+
" ░██£££ ",
|
|
2991
|
+
" ▒██£££ ",
|
|
2992
|
+
" ▓██£££ ",
|
|
2993
|
+
" ███£££ ",
|
|
2994
|
+
" ░███£££ ",
|
|
2995
|
+
" ▒███£££ ",
|
|
2996
|
+
" ▓███£££ ",
|
|
2997
|
+
" ████£££ ",
|
|
2998
|
+
" ░████£££ ",
|
|
2999
|
+
" ▒████£££ ",
|
|
3000
|
+
" ▓████£££ ",
|
|
3001
|
+
" █████£££ ",
|
|
3002
|
+
" ░█████£££ ",
|
|
3003
|
+
" ▒█████£££ ",
|
|
3004
|
+
" ▓█████£££ ",
|
|
3005
|
+
" ██████£££ ",
|
|
3006
|
+
" ██████£££ "
|
|
3007
|
+
]
|
|
3008
|
+
},
|
|
3009
|
+
fish: {
|
|
3010
|
+
interval: 80,
|
|
3011
|
+
frames: [
|
|
3012
|
+
"~~~~~~~~~~~~~~~~~~~~",
|
|
3013
|
+
"> ~~~~~~~~~~~~~~~~~~",
|
|
3014
|
+
"º> ~~~~~~~~~~~~~~~~~",
|
|
3015
|
+
"(º> ~~~~~~~~~~~~~~~~",
|
|
3016
|
+
"((º> ~~~~~~~~~~~~~~~",
|
|
3017
|
+
"<((º> ~~~~~~~~~~~~~~",
|
|
3018
|
+
"><((º> ~~~~~~~~~~~~~",
|
|
3019
|
+
" ><((º> ~~~~~~~~~~~~",
|
|
3020
|
+
"~ ><((º> ~~~~~~~~~~~",
|
|
3021
|
+
"~~ <>((º> ~~~~~~~~~~",
|
|
3022
|
+
"~~~ ><((º> ~~~~~~~~~",
|
|
3023
|
+
"~~~~ <>((º> ~~~~~~~~",
|
|
3024
|
+
"~~~~~ ><((º> ~~~~~~~",
|
|
3025
|
+
"~~~~~~ <>((º> ~~~~~~",
|
|
3026
|
+
"~~~~~~~ ><((º> ~~~~~",
|
|
3027
|
+
"~~~~~~~~ <>((º> ~~~~",
|
|
3028
|
+
"~~~~~~~~~ ><((º> ~~~",
|
|
3029
|
+
"~~~~~~~~~~ <>((º> ~~",
|
|
3030
|
+
"~~~~~~~~~~~ ><((º> ~",
|
|
3031
|
+
"~~~~~~~~~~~~ <>((º> ",
|
|
3032
|
+
"~~~~~~~~~~~~~ ><((º>",
|
|
3033
|
+
"~~~~~~~~~~~~~~ <>((º",
|
|
3034
|
+
"~~~~~~~~~~~~~~~ ><((",
|
|
3035
|
+
"~~~~~~~~~~~~~~~~ <>(",
|
|
3036
|
+
"~~~~~~~~~~~~~~~~~ ><",
|
|
3037
|
+
"~~~~~~~~~~~~~~~~~~ <",
|
|
3038
|
+
"~~~~~~~~~~~~~~~~~~~~"
|
|
3039
|
+
]
|
|
3040
|
+
}
|
|
3041
|
+
};
|
|
3042
|
+
|
|
3043
|
+
// ../../node_modules/ora/node_modules/cli-spinners/index.js
|
|
3044
|
+
var cli_spinners_default = spinners_default;
|
|
3045
|
+
var spinnersList = Object.keys(spinners_default);
|
|
3046
|
+
|
|
3047
|
+
// ../../node_modules/ora/node_modules/log-symbols/symbols.js
|
|
3048
|
+
var exports_symbols = {};
|
|
3049
|
+
__export(exports_symbols, {
|
|
3050
|
+
error: () => error,
|
|
3051
|
+
info: () => info,
|
|
3052
|
+
success: () => success,
|
|
3053
|
+
warning: () => warning
|
|
3054
|
+
});
|
|
3055
|
+
|
|
3056
|
+
// ../../node_modules/yoctocolors/base.js
|
|
3057
|
+
import tty2 from "node:tty";
|
|
3058
|
+
var hasColors = tty2?.WriteStream?.prototype?.hasColors?.() ?? false;
|
|
3059
|
+
var format = (open, close) => {
|
|
3060
|
+
if (!hasColors) {
|
|
3061
|
+
return (input) => input;
|
|
3062
|
+
}
|
|
3063
|
+
const openCode = `\x1B[${open}m`;
|
|
3064
|
+
const closeCode = `\x1B[${close}m`;
|
|
3065
|
+
return (input) => {
|
|
3066
|
+
const string = input + "";
|
|
3067
|
+
let index = string.indexOf(closeCode);
|
|
3068
|
+
if (index === -1) {
|
|
3069
|
+
return openCode + string + closeCode;
|
|
3070
|
+
}
|
|
3071
|
+
let result = openCode;
|
|
3072
|
+
let lastIndex = 0;
|
|
3073
|
+
const reopenOnNestedClose = close === 22;
|
|
3074
|
+
const replaceCode = (reopenOnNestedClose ? closeCode : "") + openCode;
|
|
3075
|
+
while (index !== -1) {
|
|
3076
|
+
result += string.slice(lastIndex, index) + replaceCode;
|
|
3077
|
+
lastIndex = index + closeCode.length;
|
|
3078
|
+
index = string.indexOf(closeCode, lastIndex);
|
|
3079
|
+
}
|
|
3080
|
+
result += string.slice(lastIndex) + closeCode;
|
|
3081
|
+
return result;
|
|
3082
|
+
};
|
|
3083
|
+
};
|
|
3084
|
+
var reset = format(0, 0);
|
|
3085
|
+
var bold = format(1, 22);
|
|
3086
|
+
var dim = format(2, 22);
|
|
3087
|
+
var italic = format(3, 23);
|
|
3088
|
+
var underline = format(4, 24);
|
|
3089
|
+
var overline = format(53, 55);
|
|
3090
|
+
var inverse = format(7, 27);
|
|
3091
|
+
var hidden = format(8, 28);
|
|
3092
|
+
var strikethrough = format(9, 29);
|
|
3093
|
+
var black = format(30, 39);
|
|
3094
|
+
var red = format(31, 39);
|
|
3095
|
+
var green = format(32, 39);
|
|
3096
|
+
var yellow = format(33, 39);
|
|
3097
|
+
var blue = format(34, 39);
|
|
3098
|
+
var magenta = format(35, 39);
|
|
3099
|
+
var cyan = format(36, 39);
|
|
3100
|
+
var white = format(37, 39);
|
|
3101
|
+
var gray = format(90, 39);
|
|
3102
|
+
var bgBlack = format(40, 49);
|
|
3103
|
+
var bgRed = format(41, 49);
|
|
3104
|
+
var bgGreen = format(42, 49);
|
|
3105
|
+
var bgYellow = format(43, 49);
|
|
3106
|
+
var bgBlue = format(44, 49);
|
|
3107
|
+
var bgMagenta = format(45, 49);
|
|
3108
|
+
var bgCyan = format(46, 49);
|
|
3109
|
+
var bgWhite = format(47, 49);
|
|
3110
|
+
var bgGray = format(100, 49);
|
|
3111
|
+
var redBright = format(91, 39);
|
|
3112
|
+
var greenBright = format(92, 39);
|
|
3113
|
+
var yellowBright = format(93, 39);
|
|
3114
|
+
var blueBright = format(94, 39);
|
|
3115
|
+
var magentaBright = format(95, 39);
|
|
3116
|
+
var cyanBright = format(96, 39);
|
|
3117
|
+
var whiteBright = format(97, 39);
|
|
3118
|
+
var bgRedBright = format(101, 49);
|
|
3119
|
+
var bgGreenBright = format(102, 49);
|
|
3120
|
+
var bgYellowBright = format(103, 49);
|
|
3121
|
+
var bgBlueBright = format(104, 49);
|
|
3122
|
+
var bgMagentaBright = format(105, 49);
|
|
3123
|
+
var bgCyanBright = format(106, 49);
|
|
3124
|
+
var bgWhiteBright = format(107, 49);
|
|
3125
|
+
|
|
3126
|
+
// ../../node_modules/ora/node_modules/is-unicode-supported/index.js
|
|
3127
|
+
import process6 from "node:process";
|
|
3128
|
+
function isUnicodeSupported() {
|
|
3129
|
+
const { env: env2 } = process6;
|
|
3130
|
+
const { TERM, TERM_PROGRAM } = env2;
|
|
3131
|
+
if (process6.platform !== "win32") {
|
|
3132
|
+
return TERM !== "linux";
|
|
3133
|
+
}
|
|
3134
|
+
return Boolean(env2.WT_SESSION) || Boolean(env2.TERMINUS_SUBLIME) || env2.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env2.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
3135
|
+
}
|
|
3136
|
+
|
|
3137
|
+
// ../../node_modules/ora/node_modules/log-symbols/symbols.js
|
|
3138
|
+
var _isUnicodeSupported = isUnicodeSupported();
|
|
3139
|
+
var info = blue(_isUnicodeSupported ? "ℹ" : "i");
|
|
3140
|
+
var success = green(_isUnicodeSupported ? "✔" : "√");
|
|
3141
|
+
var warning = yellow(_isUnicodeSupported ? "⚠" : "‼");
|
|
3142
|
+
var error = red(_isUnicodeSupported ? "✖" : "×");
|
|
3143
|
+
// ../../node_modules/ora/node_modules/string-width/node_modules/strip-ansi/node_modules/ansi-regex/index.js
|
|
3144
|
+
function ansiRegex({ onlyFirst = false } = {}) {
|
|
3145
|
+
const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
|
|
3146
|
+
const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
|
|
3147
|
+
const csi = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
|
|
3148
|
+
const pattern = `${osc}|${csi}`;
|
|
3149
|
+
return new RegExp(pattern, onlyFirst ? undefined : "g");
|
|
3150
|
+
}
|
|
3151
|
+
|
|
3152
|
+
// ../../node_modules/ora/node_modules/string-width/node_modules/strip-ansi/index.js
|
|
3153
|
+
var regex = ansiRegex();
|
|
3154
|
+
function stripAnsi(string) {
|
|
3155
|
+
if (typeof string !== "string") {
|
|
3156
|
+
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
3157
|
+
}
|
|
3158
|
+
if (!string.includes("\x1B") && !string.includes("")) {
|
|
3159
|
+
return string;
|
|
3160
|
+
}
|
|
3161
|
+
return string.replace(regex, "");
|
|
3162
|
+
}
|
|
3163
|
+
|
|
3164
|
+
// ../../node_modules/get-east-asian-width/lookup-data.js
|
|
3165
|
+
var ambiguousMinimalCodePoint = 161;
|
|
3166
|
+
var ambiguousMaximumCodePoint = 1114109;
|
|
3167
|
+
var ambiguousRanges = [161, 161, 164, 164, 167, 168, 170, 170, 173, 174, 176, 180, 182, 186, 188, 191, 198, 198, 208, 208, 215, 216, 222, 225, 230, 230, 232, 234, 236, 237, 240, 240, 242, 243, 247, 250, 252, 252, 254, 254, 257, 257, 273, 273, 275, 275, 283, 283, 294, 295, 299, 299, 305, 307, 312, 312, 319, 322, 324, 324, 328, 331, 333, 333, 338, 339, 358, 359, 363, 363, 462, 462, 464, 464, 466, 466, 468, 468, 470, 470, 472, 472, 474, 474, 476, 476, 593, 593, 609, 609, 708, 708, 711, 711, 713, 715, 717, 717, 720, 720, 728, 731, 733, 733, 735, 735, 768, 879, 913, 929, 931, 937, 945, 961, 963, 969, 1025, 1025, 1040, 1103, 1105, 1105, 8208, 8208, 8211, 8214, 8216, 8217, 8220, 8221, 8224, 8226, 8228, 8231, 8240, 8240, 8242, 8243, 8245, 8245, 8251, 8251, 8254, 8254, 8308, 8308, 8319, 8319, 8321, 8324, 8364, 8364, 8451, 8451, 8453, 8453, 8457, 8457, 8467, 8467, 8470, 8470, 8481, 8482, 8486, 8486, 8491, 8491, 8531, 8532, 8539, 8542, 8544, 8555, 8560, 8569, 8585, 8585, 8592, 8601, 8632, 8633, 8658, 8658, 8660, 8660, 8679, 8679, 8704, 8704, 8706, 8707, 8711, 8712, 8715, 8715, 8719, 8719, 8721, 8721, 8725, 8725, 8730, 8730, 8733, 8736, 8739, 8739, 8741, 8741, 8743, 8748, 8750, 8750, 8756, 8759, 8764, 8765, 8776, 8776, 8780, 8780, 8786, 8786, 8800, 8801, 8804, 8807, 8810, 8811, 8814, 8815, 8834, 8835, 8838, 8839, 8853, 8853, 8857, 8857, 8869, 8869, 8895, 8895, 8978, 8978, 9312, 9449, 9451, 9547, 9552, 9587, 9600, 9615, 9618, 9621, 9632, 9633, 9635, 9641, 9650, 9651, 9654, 9655, 9660, 9661, 9664, 9665, 9670, 9672, 9675, 9675, 9678, 9681, 9698, 9701, 9711, 9711, 9733, 9734, 9737, 9737, 9742, 9743, 9756, 9756, 9758, 9758, 9792, 9792, 9794, 9794, 9824, 9825, 9827, 9829, 9831, 9834, 9836, 9837, 9839, 9839, 9886, 9887, 9919, 9919, 9926, 9933, 9935, 9939, 9941, 9953, 9955, 9955, 9960, 9961, 9963, 9969, 9972, 9972, 9974, 9977, 9979, 9980, 9982, 9983, 10045, 10045, 10102, 10111, 11094, 11097, 12872, 12879, 57344, 63743, 65024, 65039, 65533, 65533, 127232, 127242, 127248, 127277, 127280, 127337, 127344, 127373, 127375, 127376, 127387, 127404, 917760, 917999, 983040, 1048573, 1048576, 1114109];
|
|
3168
|
+
var fullwidthMinimalCodePoint = 12288;
|
|
3169
|
+
var fullwidthMaximumCodePoint = 65510;
|
|
3170
|
+
var fullwidthRanges = [12288, 12288, 65281, 65376, 65504, 65510];
|
|
3171
|
+
var wideMinimalCodePoint = 4352;
|
|
3172
|
+
var wideMaximumCodePoint = 262141;
|
|
3173
|
+
var wideRanges = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208, 101589, 101631, 101662, 101760, 101874, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 119552, 119638, 119648, 119670, 126980, 126980, 127183, 127183, 127374, 127374, 127377, 127386, 127488, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 127776, 127789, 127797, 127799, 127868, 127870, 127891, 127904, 127946, 127951, 127955, 127968, 127984, 127988, 127988, 127992, 128062, 128064, 128064, 128066, 128252, 128255, 128317, 128331, 128334, 128336, 128359, 128378, 128378, 128405, 128406, 128420, 128420, 128507, 128591, 128640, 128709, 128716, 128716, 128720, 128722, 128725, 128728, 128732, 128735, 128747, 128748, 128756, 128764, 128992, 129003, 129008, 129008, 129292, 129338, 129340, 129349, 129351, 129535, 129648, 129660, 129664, 129674, 129678, 129734, 129736, 129736, 129741, 129756, 129759, 129770, 129775, 129784, 131072, 196605, 196608, 262141];
|
|
3174
|
+
|
|
3175
|
+
// ../../node_modules/get-east-asian-width/utilities.js
|
|
3176
|
+
var isInRange = (ranges, codePoint) => {
|
|
3177
|
+
let low = 0;
|
|
3178
|
+
let high = Math.floor(ranges.length / 2) - 1;
|
|
3179
|
+
while (low <= high) {
|
|
3180
|
+
const mid = Math.floor((low + high) / 2);
|
|
3181
|
+
const i = mid * 2;
|
|
3182
|
+
if (codePoint < ranges[i]) {
|
|
3183
|
+
high = mid - 1;
|
|
3184
|
+
} else if (codePoint > ranges[i + 1]) {
|
|
3185
|
+
low = mid + 1;
|
|
3186
|
+
} else {
|
|
3187
|
+
return true;
|
|
3188
|
+
}
|
|
3189
|
+
}
|
|
3190
|
+
return false;
|
|
3191
|
+
};
|
|
3192
|
+
|
|
3193
|
+
// ../../node_modules/get-east-asian-width/lookup.js
|
|
3194
|
+
var commonCjkCodePoint = 19968;
|
|
3195
|
+
var [wideFastPathStart, wideFastPathEnd] = /* @__PURE__ */ findWideFastPathRange(wideRanges);
|
|
3196
|
+
function findWideFastPathRange(ranges) {
|
|
3197
|
+
let fastPathStart = ranges[0];
|
|
3198
|
+
let fastPathEnd = ranges[1];
|
|
3199
|
+
for (let index = 0;index < ranges.length; index += 2) {
|
|
3200
|
+
const start = ranges[index];
|
|
3201
|
+
const end = ranges[index + 1];
|
|
3202
|
+
if (commonCjkCodePoint >= start && commonCjkCodePoint <= end) {
|
|
3203
|
+
return [start, end];
|
|
3204
|
+
}
|
|
3205
|
+
if (end - start > fastPathEnd - fastPathStart) {
|
|
3206
|
+
fastPathStart = start;
|
|
3207
|
+
fastPathEnd = end;
|
|
3208
|
+
}
|
|
3209
|
+
}
|
|
3210
|
+
return [fastPathStart, fastPathEnd];
|
|
3211
|
+
}
|
|
3212
|
+
var isAmbiguous = (codePoint) => {
|
|
3213
|
+
if (codePoint < ambiguousMinimalCodePoint || codePoint > ambiguousMaximumCodePoint) {
|
|
3214
|
+
return false;
|
|
3215
|
+
}
|
|
3216
|
+
return isInRange(ambiguousRanges, codePoint);
|
|
3217
|
+
};
|
|
3218
|
+
var isFullWidth = (codePoint) => {
|
|
3219
|
+
if (codePoint < fullwidthMinimalCodePoint || codePoint > fullwidthMaximumCodePoint) {
|
|
3220
|
+
return false;
|
|
3221
|
+
}
|
|
3222
|
+
return isInRange(fullwidthRanges, codePoint);
|
|
3223
|
+
};
|
|
3224
|
+
var isWide = (codePoint) => {
|
|
3225
|
+
if (codePoint >= wideFastPathStart && codePoint <= wideFastPathEnd) {
|
|
3226
|
+
return true;
|
|
3227
|
+
}
|
|
3228
|
+
if (codePoint < wideMinimalCodePoint || codePoint > wideMaximumCodePoint) {
|
|
3229
|
+
return false;
|
|
3230
|
+
}
|
|
3231
|
+
return isInRange(wideRanges, codePoint);
|
|
3232
|
+
};
|
|
3233
|
+
|
|
3234
|
+
// ../../node_modules/get-east-asian-width/index.js
|
|
3235
|
+
function validate(codePoint) {
|
|
3236
|
+
if (!Number.isSafeInteger(codePoint)) {
|
|
3237
|
+
throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
|
|
3238
|
+
}
|
|
3239
|
+
}
|
|
3240
|
+
function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
|
|
3241
|
+
validate(codePoint);
|
|
3242
|
+
if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) {
|
|
3243
|
+
return 2;
|
|
3244
|
+
}
|
|
3245
|
+
return 1;
|
|
3246
|
+
}
|
|
3247
|
+
|
|
3248
|
+
// ../../node_modules/ora/node_modules/string-width/index.js
|
|
3249
|
+
var segmenter = new Intl.Segmenter;
|
|
3250
|
+
var zeroWidthClusterRegex = /^(?:\p{Default_Ignorable_Code_Point}|\p{Control}|\p{Format}|\p{Nonspacing_Mark}|\p{Enclosing_Mark}|\p{Surrogate})+$/v;
|
|
3251
|
+
var leadingNonPrintingRegex = /^[\p{Default_Ignorable_Code_Point}\p{Control}\p{Format}\p{Nonspacing_Mark}\p{Enclosing_Mark}\p{Surrogate}]+/v;
|
|
3252
|
+
var spacingMarkRegex = /\p{Spacing_Mark}/v;
|
|
3253
|
+
var rgiEmojiRegex = /^\p{RGI_Emoji}$/v;
|
|
3254
|
+
var unqualifiedKeycapRegex = /^[\d#*]\u20E3$/;
|
|
3255
|
+
var extendedPictographicRegex = /\p{Extended_Pictographic}/gu;
|
|
3256
|
+
function isDoubleWidthNonRgiEmojiSequence(segment) {
|
|
3257
|
+
if (segment.length > 50) {
|
|
3258
|
+
return false;
|
|
3259
|
+
}
|
|
3260
|
+
if (unqualifiedKeycapRegex.test(segment)) {
|
|
3261
|
+
return true;
|
|
3262
|
+
}
|
|
3263
|
+
if (segment.includes("")) {
|
|
3264
|
+
const pictographics = segment.match(extendedPictographicRegex);
|
|
3265
|
+
return pictographics !== null && pictographics.length >= 2;
|
|
3266
|
+
}
|
|
3267
|
+
return false;
|
|
3268
|
+
}
|
|
3269
|
+
function baseVisible(segment) {
|
|
3270
|
+
return segment.replace(leadingNonPrintingRegex, "");
|
|
3271
|
+
}
|
|
3272
|
+
function isZeroWidthCluster(segment) {
|
|
3273
|
+
return zeroWidthClusterRegex.test(segment);
|
|
3274
|
+
}
|
|
3275
|
+
function isHangulLeadingJamo(codePoint) {
|
|
3276
|
+
return codePoint >= 4352 && codePoint <= 4447 || codePoint >= 43360 && codePoint <= 43388;
|
|
3277
|
+
}
|
|
3278
|
+
function isHangulVowelJamo(codePoint) {
|
|
3279
|
+
return codePoint >= 4448 && codePoint <= 4519 || codePoint >= 55216 && codePoint <= 55238;
|
|
3280
|
+
}
|
|
3281
|
+
function isHangulTrailingJamo(codePoint) {
|
|
3282
|
+
return codePoint >= 4520 && codePoint <= 4607 || codePoint >= 55243 && codePoint <= 55291;
|
|
3283
|
+
}
|
|
3284
|
+
function isHangulJamo(codePoint) {
|
|
3285
|
+
return isHangulLeadingJamo(codePoint) || isHangulVowelJamo(codePoint) || isHangulTrailingJamo(codePoint);
|
|
3286
|
+
}
|
|
3287
|
+
function hangulClusterWidth(visibleSegment, eastAsianWidthOptions) {
|
|
3288
|
+
const codePoints = [];
|
|
3289
|
+
for (const character of visibleSegment) {
|
|
3290
|
+
if (zeroWidthClusterRegex.test(character)) {
|
|
3291
|
+
continue;
|
|
3292
|
+
}
|
|
3293
|
+
codePoints.push(character.codePointAt(0));
|
|
3294
|
+
}
|
|
3295
|
+
if (codePoints.length === 0) {
|
|
3296
|
+
return;
|
|
3297
|
+
}
|
|
3298
|
+
let width = 0;
|
|
3299
|
+
for (let index = 0;index < codePoints.length; index++) {
|
|
3300
|
+
const codePoint = codePoints[index];
|
|
3301
|
+
if (!isHangulJamo(codePoint)) {
|
|
3302
|
+
if (width === 0) {
|
|
3303
|
+
return;
|
|
3304
|
+
}
|
|
3305
|
+
for (let remaining = index;remaining < codePoints.length; remaining++) {
|
|
3306
|
+
width += eastAsianWidth(codePoints[remaining], eastAsianWidthOptions);
|
|
3307
|
+
}
|
|
3308
|
+
return width;
|
|
3309
|
+
}
|
|
3310
|
+
if (isHangulLeadingJamo(codePoint) && isHangulVowelJamo(codePoints[index + 1])) {
|
|
3311
|
+
width += 2;
|
|
3312
|
+
index += isHangulTrailingJamo(codePoints[index + 2]) ? 2 : 1;
|
|
3313
|
+
continue;
|
|
3314
|
+
}
|
|
3315
|
+
width += eastAsianWidth(codePoint, eastAsianWidthOptions);
|
|
3316
|
+
}
|
|
3317
|
+
return width;
|
|
3318
|
+
}
|
|
3319
|
+
function trailingWidth(visibleSegment, eastAsianWidthOptions) {
|
|
3320
|
+
let extra = 0;
|
|
3321
|
+
let first = true;
|
|
3322
|
+
for (const character of visibleSegment) {
|
|
3323
|
+
if (first) {
|
|
3324
|
+
first = false;
|
|
3325
|
+
continue;
|
|
3326
|
+
}
|
|
3327
|
+
if (spacingMarkRegex.test(character) || character >= "" && character <= "") {
|
|
3328
|
+
extra += eastAsianWidth(character.codePointAt(0), eastAsianWidthOptions);
|
|
3329
|
+
}
|
|
3330
|
+
}
|
|
3331
|
+
return extra;
|
|
3332
|
+
}
|
|
3333
|
+
function stringWidth(input, options = {}) {
|
|
3334
|
+
if (typeof input !== "string" || input.length === 0) {
|
|
3335
|
+
return 0;
|
|
3336
|
+
}
|
|
3337
|
+
const {
|
|
3338
|
+
ambiguousIsNarrow = true,
|
|
3339
|
+
countAnsiEscapeCodes = false
|
|
3340
|
+
} = options;
|
|
3341
|
+
let string = input;
|
|
3342
|
+
if (!countAnsiEscapeCodes && (string.includes("\x1B") || string.includes(""))) {
|
|
3343
|
+
string = stripAnsi(string);
|
|
3344
|
+
}
|
|
3345
|
+
if (string.length === 0) {
|
|
3346
|
+
return 0;
|
|
3347
|
+
}
|
|
3348
|
+
if (/^[\u0020-\u007E]*$/.test(string)) {
|
|
3349
|
+
return string.length;
|
|
3350
|
+
}
|
|
3351
|
+
let width = 0;
|
|
3352
|
+
const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
|
|
3353
|
+
for (const { segment } of segmenter.segment(string)) {
|
|
3354
|
+
if (isZeroWidthCluster(segment)) {
|
|
3355
|
+
continue;
|
|
3356
|
+
}
|
|
3357
|
+
if (rgiEmojiRegex.test(segment) || isDoubleWidthNonRgiEmojiSequence(segment)) {
|
|
3358
|
+
width += 2;
|
|
3359
|
+
continue;
|
|
3360
|
+
}
|
|
3361
|
+
const visibleSegment = baseVisible(segment);
|
|
3362
|
+
const hangulWidth = hangulClusterWidth(visibleSegment, eastAsianWidthOptions);
|
|
3363
|
+
if (hangulWidth !== undefined) {
|
|
3364
|
+
width += hangulWidth;
|
|
3365
|
+
continue;
|
|
3366
|
+
}
|
|
3367
|
+
const codePoint = visibleSegment.codePointAt(0);
|
|
3368
|
+
width += eastAsianWidth(codePoint, eastAsianWidthOptions);
|
|
3369
|
+
width += trailingWidth(visibleSegment, eastAsianWidthOptions);
|
|
3370
|
+
}
|
|
3371
|
+
return width;
|
|
3372
|
+
}
|
|
3373
|
+
|
|
3374
|
+
// ../../node_modules/ora/node_modules/is-interactive/index.js
|
|
3375
|
+
function isInteractive({ stream = process.stdout } = {}) {
|
|
3376
|
+
return Boolean(stream && stream.isTTY && process.env.TERM !== "dumb" && !("CI" in process.env));
|
|
3377
|
+
}
|
|
3378
|
+
|
|
3379
|
+
// ../../node_modules/stdin-discarder/index.js
|
|
3380
|
+
import process7 from "node:process";
|
|
3381
|
+
var ASCII_ETX_CODE = 3;
|
|
3382
|
+
|
|
3383
|
+
class StdinDiscarder {
|
|
3384
|
+
#activeCount = 0;
|
|
3385
|
+
#stdin;
|
|
3386
|
+
#stdinWasPaused = false;
|
|
3387
|
+
#stdinWasRaw = false;
|
|
3388
|
+
#handleInputBound = (chunk) => {
|
|
3389
|
+
if (!chunk?.length) {
|
|
3390
|
+
return;
|
|
3391
|
+
}
|
|
3392
|
+
const code = typeof chunk === "string" ? chunk.codePointAt(0) : chunk[0];
|
|
3393
|
+
if (code === ASCII_ETX_CODE) {
|
|
3394
|
+
process7.kill(process7.pid, "SIGINT");
|
|
3395
|
+
}
|
|
3396
|
+
};
|
|
3397
|
+
start() {
|
|
3398
|
+
this.#activeCount++;
|
|
3399
|
+
if (this.#activeCount === 1) {
|
|
3400
|
+
this.#realStart();
|
|
3401
|
+
}
|
|
3402
|
+
}
|
|
3403
|
+
stop() {
|
|
3404
|
+
if (this.#activeCount === 0) {
|
|
3405
|
+
return;
|
|
3406
|
+
}
|
|
3407
|
+
if (--this.#activeCount === 0) {
|
|
3408
|
+
this.#realStop();
|
|
3409
|
+
}
|
|
3410
|
+
}
|
|
3411
|
+
#realStart() {
|
|
3412
|
+
const { stdin } = process7;
|
|
3413
|
+
if (process7.platform === "win32" || !stdin?.isTTY || typeof stdin.setRawMode !== "function") {
|
|
3414
|
+
this.#stdin = undefined;
|
|
3415
|
+
return;
|
|
3416
|
+
}
|
|
3417
|
+
this.#stdin = stdin;
|
|
3418
|
+
this.#stdinWasPaused = stdin.isPaused();
|
|
3419
|
+
this.#stdinWasRaw = Boolean(stdin.isRaw);
|
|
3420
|
+
stdin.setRawMode(true);
|
|
3421
|
+
stdin.prependListener("data", this.#handleInputBound);
|
|
3422
|
+
if (this.#stdinWasPaused) {
|
|
3423
|
+
stdin.resume();
|
|
3424
|
+
}
|
|
3425
|
+
}
|
|
3426
|
+
#realStop() {
|
|
3427
|
+
if (!this.#stdin) {
|
|
3428
|
+
return;
|
|
3429
|
+
}
|
|
3430
|
+
const stdin = this.#stdin;
|
|
3431
|
+
stdin.off("data", this.#handleInputBound);
|
|
3432
|
+
if (stdin.isTTY) {
|
|
3433
|
+
stdin.setRawMode?.(this.#stdinWasRaw);
|
|
3434
|
+
}
|
|
3435
|
+
if (this.#stdinWasPaused) {
|
|
3436
|
+
stdin.pause();
|
|
3437
|
+
}
|
|
3438
|
+
this.#stdin = undefined;
|
|
3439
|
+
this.#stdinWasPaused = false;
|
|
3440
|
+
this.#stdinWasRaw = false;
|
|
3441
|
+
}
|
|
3442
|
+
}
|
|
3443
|
+
var stdinDiscarder = new StdinDiscarder;
|
|
3444
|
+
var stdin_discarder_default = Object.freeze(stdinDiscarder);
|
|
3445
|
+
|
|
3446
|
+
// ../../node_modules/ora/index.js
|
|
3447
|
+
var RENDER_DEFERRAL_TIMEOUT = 200;
|
|
3448
|
+
var SYNCHRONIZED_OUTPUT_ENABLE = "\x1B[?2026h";
|
|
3449
|
+
var SYNCHRONIZED_OUTPUT_DISABLE = "\x1B[?2026l";
|
|
3450
|
+
var activeHooksPerStream = new Map;
|
|
3451
|
+
var validColors = new Set(["black", "red", "green", "yellow", "blue", "magenta", "cyan", "white", "gray"]);
|
|
3452
|
+
|
|
3453
|
+
class Ora {
|
|
3454
|
+
#linesToClear = 0;
|
|
3455
|
+
#frameIndex = -1;
|
|
3456
|
+
#lastFrameTime = 0;
|
|
3457
|
+
#options;
|
|
3458
|
+
#spinner;
|
|
3459
|
+
#stream;
|
|
3460
|
+
#id;
|
|
3461
|
+
#hookedStreams = new Map;
|
|
3462
|
+
#isInternalWrite = false;
|
|
3463
|
+
#drainHandler;
|
|
3464
|
+
#deferRenderTimer;
|
|
3465
|
+
#isDiscardingStdin = false;
|
|
3466
|
+
#color;
|
|
3467
|
+
#internalWrite(fn) {
|
|
3468
|
+
this.#isInternalWrite = true;
|
|
3469
|
+
try {
|
|
3470
|
+
return fn();
|
|
3471
|
+
} finally {
|
|
3472
|
+
this.#isInternalWrite = false;
|
|
3473
|
+
}
|
|
3474
|
+
}
|
|
3475
|
+
#tryRender() {
|
|
3476
|
+
if (this.isSpinning) {
|
|
3477
|
+
this.render();
|
|
3478
|
+
}
|
|
3479
|
+
}
|
|
3480
|
+
#stringifyChunk(chunk, encoding) {
|
|
3481
|
+
if (chunk === undefined || chunk === null) {
|
|
3482
|
+
return "";
|
|
3483
|
+
}
|
|
3484
|
+
if (typeof chunk === "string") {
|
|
3485
|
+
return chunk;
|
|
3486
|
+
}
|
|
3487
|
+
if (Buffer.isBuffer(chunk) || ArrayBuffer.isView(chunk)) {
|
|
3488
|
+
const normalizedEncoding = typeof encoding === "string" && encoding && encoding !== "buffer" ? encoding : "utf8";
|
|
3489
|
+
return Buffer.from(chunk).toString(normalizedEncoding);
|
|
3490
|
+
}
|
|
3491
|
+
return String(chunk);
|
|
3492
|
+
}
|
|
3493
|
+
#chunkTerminatesLine(chunkString) {
|
|
3494
|
+
if (!chunkString) {
|
|
3495
|
+
return false;
|
|
3496
|
+
}
|
|
3497
|
+
const lastCharacter = chunkString.at(-1);
|
|
3498
|
+
return lastCharacter === `
|
|
3499
|
+
` || lastCharacter === "\r";
|
|
3500
|
+
}
|
|
3501
|
+
#scheduleRenderDeferral() {
|
|
3502
|
+
if (this.#deferRenderTimer) {
|
|
3503
|
+
return;
|
|
3504
|
+
}
|
|
3505
|
+
this.#deferRenderTimer = setTimeout(() => {
|
|
3506
|
+
this.#deferRenderTimer = undefined;
|
|
3507
|
+
if (this.isSpinning) {
|
|
3508
|
+
this.#tryRender();
|
|
3509
|
+
}
|
|
3510
|
+
}, RENDER_DEFERRAL_TIMEOUT);
|
|
3511
|
+
if (typeof this.#deferRenderTimer?.unref === "function") {
|
|
3512
|
+
this.#deferRenderTimer.unref();
|
|
3513
|
+
}
|
|
3514
|
+
}
|
|
3515
|
+
#clearRenderDeferral() {
|
|
3516
|
+
if (this.#deferRenderTimer) {
|
|
3517
|
+
clearTimeout(this.#deferRenderTimer);
|
|
3518
|
+
this.#deferRenderTimer = undefined;
|
|
3519
|
+
}
|
|
3520
|
+
}
|
|
3521
|
+
#buildOutputLine(symbol, text, prefixText, suffixText) {
|
|
3522
|
+
const fullPrefixText = this.#getFullPrefixText(prefixText, " ");
|
|
3523
|
+
const separatorText = symbol ? " " : "";
|
|
3524
|
+
const fullText = typeof text === "string" ? separatorText + text : "";
|
|
3525
|
+
const fullSuffixText = this.#getFullSuffixText(suffixText, " ");
|
|
3526
|
+
return fullPrefixText + symbol + fullText + fullSuffixText;
|
|
3527
|
+
}
|
|
3528
|
+
constructor(options) {
|
|
3529
|
+
if (typeof options === "string") {
|
|
3530
|
+
options = {
|
|
3531
|
+
text: options
|
|
3532
|
+
};
|
|
3533
|
+
}
|
|
3534
|
+
this.#options = {
|
|
3535
|
+
color: "cyan",
|
|
3536
|
+
stream: process8.stderr,
|
|
3537
|
+
discardStdin: true,
|
|
3538
|
+
hideCursor: true,
|
|
3539
|
+
...options
|
|
3540
|
+
};
|
|
3541
|
+
this.color = this.#options.color;
|
|
3542
|
+
this.#stream = this.#options.stream;
|
|
3543
|
+
if (typeof this.#options.isEnabled !== "boolean") {
|
|
3544
|
+
this.#options.isEnabled = isInteractive({ stream: this.#stream });
|
|
3545
|
+
}
|
|
3546
|
+
if (typeof this.#options.isSilent !== "boolean") {
|
|
3547
|
+
this.#options.isSilent = false;
|
|
3548
|
+
}
|
|
3549
|
+
if (this.#options.interval !== undefined && !(Number.isInteger(this.#options.interval) && this.#options.interval > 0)) {
|
|
3550
|
+
throw new Error("The `interval` option must be a positive integer");
|
|
3551
|
+
}
|
|
3552
|
+
const userInterval = this.#options.interval;
|
|
3553
|
+
this.spinner = this.#options.spinner;
|
|
3554
|
+
this.#options.interval = userInterval;
|
|
3555
|
+
this.text = this.#options.text;
|
|
3556
|
+
this.prefixText = this.#options.prefixText;
|
|
3557
|
+
this.suffixText = this.#options.suffixText;
|
|
3558
|
+
this.indent = this.#options.indent;
|
|
3559
|
+
if (process8.env.NODE_ENV === "test") {
|
|
3560
|
+
this._stream = this.#stream;
|
|
3561
|
+
this._isEnabled = this.#options.isEnabled;
|
|
3562
|
+
Object.defineProperty(this, "_linesToClear", {
|
|
3563
|
+
get() {
|
|
3564
|
+
return this.#linesToClear;
|
|
3565
|
+
},
|
|
3566
|
+
set(newValue) {
|
|
3567
|
+
this.#linesToClear = newValue;
|
|
3568
|
+
}
|
|
3569
|
+
});
|
|
3570
|
+
Object.defineProperty(this, "_frameIndex", {
|
|
3571
|
+
get() {
|
|
3572
|
+
return this.#frameIndex;
|
|
3573
|
+
}
|
|
3574
|
+
});
|
|
3575
|
+
Object.defineProperty(this, "_lineCount", {
|
|
3576
|
+
get() {
|
|
3577
|
+
const columns = this.#stream.columns ?? 80;
|
|
3578
|
+
const prefixText = typeof this.#options.prefixText === "function" ? "" : this.#options.prefixText;
|
|
3579
|
+
const suffixText = typeof this.#options.suffixText === "function" ? "" : this.#options.suffixText;
|
|
3580
|
+
const fullPrefixText = typeof prefixText === "string" && prefixText !== "" ? prefixText + " " : "";
|
|
3581
|
+
const fullSuffixText = typeof suffixText === "string" && suffixText !== "" ? " " + suffixText : "";
|
|
3582
|
+
const spinnerChar = "-";
|
|
3583
|
+
const fullText = " ".repeat(this.#options.indent) + fullPrefixText + spinnerChar + (typeof this.#options.text === "string" ? " " + this.#options.text : "") + fullSuffixText;
|
|
3584
|
+
return this.#computeLineCountFrom(fullText, columns);
|
|
3585
|
+
}
|
|
3586
|
+
});
|
|
3587
|
+
}
|
|
3588
|
+
}
|
|
3589
|
+
get indent() {
|
|
3590
|
+
return this.#options.indent;
|
|
3591
|
+
}
|
|
3592
|
+
set indent(indent = 0) {
|
|
3593
|
+
if (!(indent >= 0 && Number.isInteger(indent))) {
|
|
3594
|
+
throw new Error("The `indent` option must be an integer from 0 and up");
|
|
3595
|
+
}
|
|
3596
|
+
this.#options.indent = indent;
|
|
3597
|
+
}
|
|
3598
|
+
get interval() {
|
|
3599
|
+
return this.#options.interval ?? this.#spinner.interval ?? 100;
|
|
3600
|
+
}
|
|
3601
|
+
get spinner() {
|
|
3602
|
+
return this.#spinner;
|
|
3603
|
+
}
|
|
3604
|
+
set spinner(spinner) {
|
|
3605
|
+
this.#frameIndex = -1;
|
|
3606
|
+
this.#options.interval = undefined;
|
|
3607
|
+
if (typeof spinner === "object") {
|
|
3608
|
+
if (!Array.isArray(spinner.frames) || spinner.frames.length === 0 || spinner.frames.some((frame) => typeof frame !== "string")) {
|
|
3609
|
+
throw new Error("The given spinner must have a non-empty `frames` array of strings");
|
|
3610
|
+
}
|
|
3611
|
+
if (spinner.interval !== undefined && !(Number.isInteger(spinner.interval) && spinner.interval > 0)) {
|
|
3612
|
+
throw new Error("`spinner.interval` must be a positive integer if provided");
|
|
3613
|
+
}
|
|
3614
|
+
this.#spinner = spinner;
|
|
3615
|
+
} else if (!isUnicodeSupported()) {
|
|
3616
|
+
this.#spinner = cli_spinners_default.line;
|
|
3617
|
+
} else if (spinner === undefined) {
|
|
3618
|
+
this.#spinner = cli_spinners_default.dots;
|
|
3619
|
+
} else if (spinner !== "default" && cli_spinners_default[spinner]) {
|
|
3620
|
+
this.#spinner = cli_spinners_default[spinner];
|
|
3621
|
+
} else {
|
|
3622
|
+
throw new Error(`There is no built-in spinner named '${spinner}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`);
|
|
3623
|
+
}
|
|
3624
|
+
}
|
|
3625
|
+
get text() {
|
|
3626
|
+
return this.#options.text;
|
|
3627
|
+
}
|
|
3628
|
+
set text(value = "") {
|
|
3629
|
+
this.#options.text = value;
|
|
3630
|
+
}
|
|
3631
|
+
get prefixText() {
|
|
3632
|
+
return this.#options.prefixText;
|
|
3633
|
+
}
|
|
3634
|
+
set prefixText(value = "") {
|
|
3635
|
+
this.#options.prefixText = value;
|
|
3636
|
+
}
|
|
3637
|
+
get suffixText() {
|
|
3638
|
+
return this.#options.suffixText;
|
|
3639
|
+
}
|
|
3640
|
+
set suffixText(value = "") {
|
|
3641
|
+
this.#options.suffixText = value;
|
|
3642
|
+
}
|
|
3643
|
+
get isSpinning() {
|
|
3644
|
+
return this.#id !== undefined;
|
|
3645
|
+
}
|
|
3646
|
+
#formatAffix(value, separator, placeBefore = false) {
|
|
3647
|
+
const resolved = typeof value === "function" ? value() : value;
|
|
3648
|
+
if (typeof resolved === "string" && resolved !== "") {
|
|
3649
|
+
return placeBefore ? separator + resolved : resolved + separator;
|
|
3650
|
+
}
|
|
3651
|
+
return "";
|
|
3652
|
+
}
|
|
3653
|
+
#getFullPrefixText(prefixText = this.#options.prefixText, postfix = " ") {
|
|
3654
|
+
return this.#formatAffix(prefixText, postfix, false);
|
|
3655
|
+
}
|
|
3656
|
+
#getFullSuffixText(suffixText = this.#options.suffixText, prefix = " ") {
|
|
3657
|
+
return this.#formatAffix(suffixText, prefix, true);
|
|
3658
|
+
}
|
|
3659
|
+
#computeLineCountFrom(text, columns) {
|
|
3660
|
+
let count = 0;
|
|
3661
|
+
for (const line of stripVTControlCharacters(text).split(`
|
|
3662
|
+
`)) {
|
|
3663
|
+
count += Math.max(1, Math.ceil(stringWidth(line) / columns));
|
|
3664
|
+
}
|
|
3665
|
+
return count;
|
|
3666
|
+
}
|
|
3667
|
+
get color() {
|
|
3668
|
+
return this.#color;
|
|
3669
|
+
}
|
|
3670
|
+
set color(value) {
|
|
3671
|
+
if (value !== undefined && value !== false && !validColors.has(value)) {
|
|
3672
|
+
throw new Error("The `color` option must be a valid color or `false` to disable");
|
|
3673
|
+
}
|
|
3674
|
+
this.#color = value;
|
|
3675
|
+
}
|
|
3676
|
+
get isEnabled() {
|
|
3677
|
+
return this.#options.isEnabled && !this.#options.isSilent;
|
|
3678
|
+
}
|
|
3679
|
+
set isEnabled(value) {
|
|
3680
|
+
if (typeof value !== "boolean") {
|
|
3681
|
+
throw new TypeError("The `isEnabled` option must be a boolean");
|
|
3682
|
+
}
|
|
3683
|
+
this.#options.isEnabled = value;
|
|
3684
|
+
}
|
|
3685
|
+
get isSilent() {
|
|
3686
|
+
return this.#options.isSilent;
|
|
3687
|
+
}
|
|
3688
|
+
set isSilent(value) {
|
|
3689
|
+
if (typeof value !== "boolean") {
|
|
3690
|
+
throw new TypeError("The `isSilent` option must be a boolean");
|
|
3691
|
+
}
|
|
3692
|
+
this.#options.isSilent = value;
|
|
3693
|
+
}
|
|
3694
|
+
frame() {
|
|
3695
|
+
const now = Date.now();
|
|
3696
|
+
if (this.#frameIndex === -1 || now - this.#lastFrameTime >= this.interval) {
|
|
3697
|
+
this.#frameIndex = (this.#frameIndex + 1) % this.#spinner.frames.length;
|
|
3698
|
+
this.#lastFrameTime = now;
|
|
3699
|
+
}
|
|
3700
|
+
const { frames } = this.#spinner;
|
|
3701
|
+
let frame = frames[this.#frameIndex];
|
|
3702
|
+
if (this.#color) {
|
|
3703
|
+
frame = source_default[this.#color](frame);
|
|
3704
|
+
}
|
|
3705
|
+
const fullPrefixText = this.#getFullPrefixText(this.#options.prefixText, " ");
|
|
3706
|
+
const fullText = typeof this.text === "string" ? " " + this.text : "";
|
|
3707
|
+
const fullSuffixText = this.#getFullSuffixText(this.#options.suffixText, " ");
|
|
3708
|
+
return fullPrefixText + frame + fullText + fullSuffixText;
|
|
3709
|
+
}
|
|
3710
|
+
clear() {
|
|
3711
|
+
if (!this.isEnabled || !this.#stream.isTTY) {
|
|
3712
|
+
return this;
|
|
3713
|
+
}
|
|
3714
|
+
this.#internalWrite(() => {
|
|
3715
|
+
this.#stream.cursorTo(0);
|
|
3716
|
+
for (let index = 0;index < this.#linesToClear; index++) {
|
|
3717
|
+
if (index > 0) {
|
|
3718
|
+
this.#stream.moveCursor(0, -1);
|
|
3719
|
+
}
|
|
3720
|
+
this.#stream.clearLine(1);
|
|
3721
|
+
}
|
|
3722
|
+
if (this.#options.indent) {
|
|
3723
|
+
this.#stream.cursorTo(this.#options.indent);
|
|
3724
|
+
}
|
|
3725
|
+
});
|
|
3726
|
+
this.#linesToClear = 0;
|
|
3727
|
+
return this;
|
|
3728
|
+
}
|
|
3729
|
+
#hookStream(stream) {
|
|
3730
|
+
if (!stream || this.#hookedStreams.has(stream) || !stream.isTTY || typeof stream.write !== "function") {
|
|
3731
|
+
return;
|
|
3732
|
+
}
|
|
3733
|
+
if (activeHooksPerStream.has(stream)) {
|
|
3734
|
+
console.warn("[ora] Multiple concurrent spinners detected. This may cause visual corruption. Use one spinner at a time.");
|
|
3735
|
+
}
|
|
3736
|
+
const originalWrite = stream.write;
|
|
3737
|
+
this.#hookedStreams.set(stream, originalWrite);
|
|
3738
|
+
activeHooksPerStream.set(stream, this);
|
|
3739
|
+
stream.write = (chunk, encoding, callback) => this.#hookedWrite(stream, originalWrite, chunk, encoding, callback);
|
|
3740
|
+
}
|
|
3741
|
+
#installHook() {
|
|
3742
|
+
if (!this.isEnabled || this.#hookedStreams.size > 0) {
|
|
3743
|
+
return;
|
|
3744
|
+
}
|
|
3745
|
+
const streamsToHook = new Set([this.#stream, process8.stdout, process8.stderr]);
|
|
3746
|
+
for (const stream of streamsToHook) {
|
|
3747
|
+
this.#hookStream(stream);
|
|
3748
|
+
}
|
|
3749
|
+
}
|
|
3750
|
+
#uninstallHook() {
|
|
3751
|
+
for (const [stream, originalWrite] of this.#hookedStreams) {
|
|
3752
|
+
stream.write = originalWrite;
|
|
3753
|
+
if (activeHooksPerStream.get(stream) === this) {
|
|
3754
|
+
activeHooksPerStream.delete(stream);
|
|
3755
|
+
}
|
|
3756
|
+
}
|
|
3757
|
+
this.#hookedStreams.clear();
|
|
3758
|
+
}
|
|
3759
|
+
#hookedWrite(stream, originalWrite, chunk, encoding, callback) {
|
|
3760
|
+
if (typeof encoding === "function") {
|
|
3761
|
+
callback = encoding;
|
|
3762
|
+
encoding = undefined;
|
|
3763
|
+
}
|
|
3764
|
+
if (this.#isInternalWrite) {
|
|
3765
|
+
return originalWrite.call(stream, chunk, encoding, callback);
|
|
3766
|
+
}
|
|
3767
|
+
this.clear();
|
|
3768
|
+
const chunkString = this.#stringifyChunk(chunk, encoding);
|
|
3769
|
+
const chunkTerminatesLine = this.#chunkTerminatesLine(chunkString);
|
|
3770
|
+
const writeResult = originalWrite.call(stream, chunk, encoding, callback);
|
|
3771
|
+
if (chunkTerminatesLine) {
|
|
3772
|
+
this.#clearRenderDeferral();
|
|
3773
|
+
} else if (chunkString.length > 0) {
|
|
3774
|
+
this.#scheduleRenderDeferral();
|
|
3775
|
+
}
|
|
3776
|
+
if (this.isSpinning && !this.#deferRenderTimer) {
|
|
3777
|
+
this.render();
|
|
3778
|
+
}
|
|
3779
|
+
return writeResult;
|
|
3780
|
+
}
|
|
3781
|
+
render() {
|
|
3782
|
+
if (!this.isEnabled || this.#drainHandler || this.#deferRenderTimer) {
|
|
3783
|
+
return this;
|
|
3784
|
+
}
|
|
3785
|
+
const useSynchronizedOutput = this.#stream.isTTY;
|
|
3786
|
+
let shouldDisableSynchronizedOutput = false;
|
|
3787
|
+
try {
|
|
3788
|
+
if (useSynchronizedOutput) {
|
|
3789
|
+
this.#internalWrite(() => this.#stream.write(SYNCHRONIZED_OUTPUT_ENABLE));
|
|
3790
|
+
shouldDisableSynchronizedOutput = true;
|
|
3791
|
+
}
|
|
3792
|
+
this.clear();
|
|
3793
|
+
let frameContent = this.frame();
|
|
3794
|
+
const columns = this.#stream.columns ?? 80;
|
|
3795
|
+
const actualLineCount = this.#computeLineCountFrom(frameContent, columns);
|
|
3796
|
+
const consoleHeight = this.#stream.rows;
|
|
3797
|
+
if (consoleHeight && consoleHeight > 1 && actualLineCount > consoleHeight) {
|
|
3798
|
+
const lines = frameContent.split(`
|
|
3799
|
+
`);
|
|
3800
|
+
const maxLines = consoleHeight - 1;
|
|
3801
|
+
frameContent = [...lines.slice(0, maxLines), "... (content truncated to fit terminal)"].join(`
|
|
3802
|
+
`);
|
|
3803
|
+
}
|
|
3804
|
+
const canContinue = this.#internalWrite(() => this.#stream.write(frameContent));
|
|
3805
|
+
if (canContinue === false && this.#stream.isTTY) {
|
|
3806
|
+
this.#drainHandler = () => {
|
|
3807
|
+
this.#drainHandler = undefined;
|
|
3808
|
+
this.#tryRender();
|
|
3809
|
+
};
|
|
3810
|
+
this.#stream.once("drain", this.#drainHandler);
|
|
3811
|
+
}
|
|
3812
|
+
this.#linesToClear = this.#computeLineCountFrom(frameContent, columns);
|
|
3813
|
+
} finally {
|
|
3814
|
+
if (shouldDisableSynchronizedOutput) {
|
|
3815
|
+
this.#internalWrite(() => this.#stream.write(SYNCHRONIZED_OUTPUT_DISABLE));
|
|
3816
|
+
}
|
|
3817
|
+
}
|
|
3818
|
+
return this;
|
|
3819
|
+
}
|
|
3820
|
+
start(text) {
|
|
3821
|
+
if (text !== undefined) {
|
|
3822
|
+
this.text = text;
|
|
3823
|
+
}
|
|
3824
|
+
if (this.isSilent) {
|
|
3825
|
+
return this;
|
|
3826
|
+
}
|
|
3827
|
+
if (!this.isEnabled) {
|
|
3828
|
+
const symbol = this.text ? "-" : "";
|
|
3829
|
+
const line = " ".repeat(this.#options.indent) + this.#buildOutputLine(symbol, this.text, this.#options.prefixText, this.#options.suffixText);
|
|
3830
|
+
if (line.trim() !== "") {
|
|
3831
|
+
this.#internalWrite(() => this.#stream.write(line + `
|
|
3832
|
+
`));
|
|
3833
|
+
}
|
|
3834
|
+
return this;
|
|
3835
|
+
}
|
|
3836
|
+
if (this.isSpinning) {
|
|
3837
|
+
return this;
|
|
3838
|
+
}
|
|
3839
|
+
if (this.#options.hideCursor) {
|
|
3840
|
+
cli_cursor_default.hide(this.#stream);
|
|
3841
|
+
}
|
|
3842
|
+
if (this.#options.discardStdin && process8.stdin.isTTY) {
|
|
3843
|
+
stdin_discarder_default.start();
|
|
3844
|
+
this.#isDiscardingStdin = true;
|
|
3845
|
+
}
|
|
3846
|
+
this.#installHook();
|
|
3847
|
+
this.render();
|
|
3848
|
+
this.#id = setInterval(this.render.bind(this), this.interval);
|
|
3849
|
+
return this;
|
|
3850
|
+
}
|
|
3851
|
+
stop() {
|
|
3852
|
+
clearInterval(this.#id);
|
|
3853
|
+
this.#id = undefined;
|
|
3854
|
+
this.#frameIndex = -1;
|
|
3855
|
+
this.#lastFrameTime = 0;
|
|
3856
|
+
this.#clearRenderDeferral();
|
|
3857
|
+
this.#uninstallHook();
|
|
3858
|
+
if (this.#drainHandler) {
|
|
3859
|
+
this.#stream.removeListener("drain", this.#drainHandler);
|
|
3860
|
+
this.#drainHandler = undefined;
|
|
3861
|
+
}
|
|
3862
|
+
if (this.isEnabled) {
|
|
3863
|
+
this.clear();
|
|
3864
|
+
if (this.#options.hideCursor) {
|
|
3865
|
+
cli_cursor_default.show(this.#stream);
|
|
3866
|
+
}
|
|
3867
|
+
}
|
|
3868
|
+
if (this.#isDiscardingStdin) {
|
|
3869
|
+
this.#isDiscardingStdin = false;
|
|
3870
|
+
stdin_discarder_default.stop();
|
|
3871
|
+
}
|
|
3872
|
+
return this;
|
|
3873
|
+
}
|
|
3874
|
+
succeed(text) {
|
|
3875
|
+
return this.stopAndPersist({ symbol: exports_symbols.success, text });
|
|
3876
|
+
}
|
|
3877
|
+
fail(text) {
|
|
3878
|
+
return this.stopAndPersist({ symbol: exports_symbols.error, text });
|
|
3879
|
+
}
|
|
3880
|
+
warn(text) {
|
|
3881
|
+
return this.stopAndPersist({ symbol: exports_symbols.warning, text });
|
|
3882
|
+
}
|
|
3883
|
+
info(text) {
|
|
3884
|
+
return this.stopAndPersist({ symbol: exports_symbols.info, text });
|
|
3885
|
+
}
|
|
3886
|
+
stopAndPersist(options = {}) {
|
|
3887
|
+
if (this.isSilent) {
|
|
3888
|
+
return this;
|
|
3889
|
+
}
|
|
3890
|
+
const symbol = options.symbol ?? " ";
|
|
3891
|
+
const text = options.text ?? this.text;
|
|
3892
|
+
const prefixText = options.prefixText ?? this.#options.prefixText;
|
|
3893
|
+
const suffixText = options.suffixText ?? this.#options.suffixText;
|
|
3894
|
+
const textToWrite = this.#buildOutputLine(symbol, text, prefixText, suffixText) + `
|
|
3895
|
+
`;
|
|
3896
|
+
this.stop();
|
|
3897
|
+
this.#internalWrite(() => this.#stream.write(textToWrite));
|
|
3898
|
+
return this;
|
|
3899
|
+
}
|
|
3900
|
+
}
|
|
3901
|
+
function ora(options) {
|
|
3902
|
+
return new Ora(options);
|
|
3903
|
+
}
|
|
3904
|
+
|
|
3905
|
+
// src/api/fetchProcesses.ts
|
|
3906
|
+
var processInstanceSchema = exports_external.object({
|
|
3907
|
+
processKey: exports_external.string().optional(),
|
|
3908
|
+
folderKey: exports_external.string().optional()
|
|
3909
|
+
});
|
|
3910
|
+
var fetchProcesses = async () => {
|
|
3911
|
+
const api = await createSdk();
|
|
3912
|
+
const spinner = ora("Loading processes").start();
|
|
3913
|
+
const [fetchError, result] = await catchError(api.processes.getAll());
|
|
3914
|
+
if (fetchError) {
|
|
3915
|
+
spinner.fail("Failed to load processes");
|
|
3916
|
+
throw fetchError;
|
|
3917
|
+
}
|
|
3918
|
+
const processInstances = processInstanceSchema.array().parse(result.items);
|
|
3919
|
+
const processMap = new Map;
|
|
3920
|
+
for (const instance of processInstances) {
|
|
3921
|
+
if (!instance.processKey) {
|
|
3922
|
+
continue;
|
|
3923
|
+
}
|
|
3924
|
+
if (processMap.has(instance.processKey)) {
|
|
3925
|
+
continue;
|
|
3926
|
+
}
|
|
3927
|
+
processMap.set(instance.processKey, {
|
|
3928
|
+
id: instance.processKey,
|
|
3929
|
+
name: instance.processKey,
|
|
3930
|
+
folderKey: instance.folderKey ?? "default"
|
|
3931
|
+
});
|
|
3932
|
+
}
|
|
3933
|
+
const processes = Array.from(processMap.values()).map((entry) => {
|
|
3934
|
+
return ProcessSchema.parse(entry);
|
|
3935
|
+
});
|
|
3936
|
+
spinner.succeed("Processes loaded");
|
|
3937
|
+
return processes;
|
|
3938
|
+
};
|
|
3939
|
+
|
|
3940
|
+
// src/api/addProcess.ts
|
|
3941
|
+
var addProcess = async ({ targetPath }) => {
|
|
3942
|
+
const [fetchError, processes] = await catchError(fetchProcesses());
|
|
3943
|
+
if (fetchError) {
|
|
3944
|
+
OutputFormatter.error({
|
|
3945
|
+
Result: RESULTS.Failure,
|
|
3946
|
+
Message: "Failed to fetch processes",
|
|
3947
|
+
Instructions: fetchError.message
|
|
3948
|
+
});
|
|
3949
|
+
processContext.exit(1);
|
|
3950
|
+
return;
|
|
3951
|
+
}
|
|
3952
|
+
if (processes.length === 0) {
|
|
3953
|
+
OutputFormatter.error({
|
|
3954
|
+
Result: RESULTS.Failure,
|
|
3955
|
+
Message: "No processes found",
|
|
3956
|
+
Instructions: "No processes found"
|
|
3957
|
+
});
|
|
3958
|
+
processContext.exit(1);
|
|
3959
|
+
return;
|
|
3960
|
+
}
|
|
3961
|
+
const [readError, config] = await catchError(readConfig(targetPath));
|
|
3962
|
+
if (readError) {
|
|
3963
|
+
OutputFormatter.error({
|
|
3964
|
+
Result: RESULTS.Failure,
|
|
3965
|
+
Message: "Failed to read config",
|
|
3966
|
+
Instructions: readError.message
|
|
3967
|
+
});
|
|
3968
|
+
processContext.exit(1);
|
|
3969
|
+
return;
|
|
3970
|
+
}
|
|
3971
|
+
const alreadyAddedProcesses = config.processes.map((p) => p.id);
|
|
3972
|
+
if (!canPrompt()) {
|
|
3973
|
+
OutputFormatter.error({
|
|
3974
|
+
Result: RESULTS.Failure,
|
|
3975
|
+
Message: "Selecting processes requires an interactive terminal",
|
|
3976
|
+
Instructions: "Re-run with --interactive to select processes."
|
|
3977
|
+
});
|
|
3978
|
+
processContext.exit(1);
|
|
3979
|
+
return;
|
|
3980
|
+
}
|
|
3981
|
+
const selectedProcesses = await dist_default({
|
|
3982
|
+
message: "Select processes",
|
|
3983
|
+
choices: processes.map((p) => ({
|
|
3984
|
+
name: p.name,
|
|
3985
|
+
value: p.id,
|
|
3986
|
+
checked: alreadyAddedProcesses.includes(p.id)
|
|
3987
|
+
}))
|
|
3988
|
+
});
|
|
3989
|
+
const newProcessIds = selectedProcesses.filter((id) => !alreadyAddedProcesses.includes(id));
|
|
3990
|
+
for (const processId of newProcessIds) {
|
|
3991
|
+
const proc = processes.find((p) => p.id === processId);
|
|
3992
|
+
if (!proc) {
|
|
3993
|
+
OutputFormatter.error({
|
|
3994
|
+
Result: RESULTS.Failure,
|
|
3995
|
+
Message: "Process not found",
|
|
3996
|
+
Instructions: `Process with id ${processId} not found`
|
|
3997
|
+
});
|
|
3998
|
+
processContext.exit(1);
|
|
3999
|
+
return;
|
|
4000
|
+
}
|
|
4001
|
+
const [writeError] = await catchError(addProcessToConfig(proc, targetPath));
|
|
4002
|
+
if (writeError) {
|
|
4003
|
+
OutputFormatter.error({
|
|
4004
|
+
Result: RESULTS.Failure,
|
|
4005
|
+
Message: "Failed to add process to config",
|
|
4006
|
+
Instructions: writeError.message
|
|
4007
|
+
});
|
|
4008
|
+
processContext.exit(1);
|
|
4009
|
+
return;
|
|
4010
|
+
}
|
|
4011
|
+
}
|
|
4012
|
+
OutputFormatter.success({
|
|
4013
|
+
Result: RESULTS.Success,
|
|
4014
|
+
Code: "ProcessesAdded",
|
|
4015
|
+
Data: {
|
|
4016
|
+
Status: `${newProcessIds.length} processes added successfully`,
|
|
4017
|
+
Path: targetPath
|
|
4018
|
+
}
|
|
4019
|
+
});
|
|
4020
|
+
await generate({ targetPath });
|
|
4021
|
+
};
|
|
4022
|
+
|
|
4023
|
+
// src/schema/addDataFabricEntity.ts
|
|
4024
|
+
import { randomUUID } from "node:crypto";
|
|
4025
|
+
var FIELD_TYPE_MAP = {
|
|
4026
|
+
string: { name: "NVARCHAR", lengthLimit: 200 },
|
|
4027
|
+
text: { name: "NVARCHAR", lengthLimit: 2000 },
|
|
4028
|
+
number: { name: "DECIMAL" },
|
|
4029
|
+
decimal: { name: "DECIMAL" },
|
|
4030
|
+
integer: { name: "INT" },
|
|
4031
|
+
int: { name: "INT" },
|
|
4032
|
+
boolean: { name: "BIT" },
|
|
4033
|
+
bool: { name: "BIT" },
|
|
4034
|
+
date: { name: "DATE" },
|
|
4035
|
+
datetime: { name: "DATETIMEOFFSET" },
|
|
4036
|
+
guid: { name: "UNIQUEIDENTIFIER" }
|
|
4037
|
+
};
|
|
4038
|
+
function validateIdentifier(value, label) {
|
|
4039
|
+
if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(value)) {
|
|
4040
|
+
throw new Error(`${label} "${value}" must start with a letter or underscore and contain only letters, numbers, or underscores.`);
|
|
4041
|
+
}
|
|
4042
|
+
}
|
|
4043
|
+
function parseFieldDefinition(definition) {
|
|
4044
|
+
const [rawName, rawType, ...extra] = definition.split(":");
|
|
4045
|
+
const name = rawName?.trim();
|
|
4046
|
+
const type = rawType?.trim().toLowerCase();
|
|
4047
|
+
if (!name || !type || extra.length > 0) {
|
|
4048
|
+
throw new Error(`Invalid field definition "${definition}". Use <name>:<type>, for example name:string.`);
|
|
4049
|
+
}
|
|
4050
|
+
validateIdentifier(name, "Field name");
|
|
4051
|
+
const sqlType = FIELD_TYPE_MAP[type];
|
|
4052
|
+
if (!sqlType) {
|
|
4053
|
+
throw new Error(`Unsupported field type "${type}". Supported types are: ${Object.keys(FIELD_TYPE_MAP).join(", ")}.`);
|
|
4054
|
+
}
|
|
4055
|
+
return {
|
|
4056
|
+
name,
|
|
4057
|
+
displayName: name,
|
|
4058
|
+
isPrimaryKey: false,
|
|
4059
|
+
isForeignKey: false,
|
|
4060
|
+
isHiddenField: false,
|
|
4061
|
+
isSystemField: false,
|
|
4062
|
+
isRequired: false,
|
|
4063
|
+
sqlType
|
|
4064
|
+
};
|
|
4065
|
+
}
|
|
4066
|
+
async function readOrCreateSchema(schemaPath) {
|
|
4067
|
+
const fs = getFileSystem();
|
|
4068
|
+
if (!await fs.exists(schemaPath)) {
|
|
4069
|
+
return { entities: [], choicesets: [] };
|
|
4070
|
+
}
|
|
4071
|
+
const rawContent = await fs.readFile(schemaPath, "utf-8");
|
|
4072
|
+
if (rawContent === null) {
|
|
4073
|
+
return { entities: [], choicesets: [] };
|
|
4074
|
+
}
|
|
4075
|
+
const parsed = JSON.parse(rawContent);
|
|
4076
|
+
const result = DataFabricSchema.safeParse(parsed);
|
|
4077
|
+
if (!result.success) {
|
|
4078
|
+
throw new Error(`Invalid schema file at ${schemaPath}:
|
|
4079
|
+
${result.error.message}`);
|
|
4080
|
+
}
|
|
4081
|
+
return result.data;
|
|
4082
|
+
}
|
|
4083
|
+
async function addDataFabricEntity({
|
|
4084
|
+
schemaPath,
|
|
4085
|
+
name,
|
|
4086
|
+
fields
|
|
4087
|
+
}) {
|
|
4088
|
+
validateIdentifier(name, "Entity name");
|
|
4089
|
+
if (fields.length === 0) {
|
|
4090
|
+
throw new Error("At least one --field <name:type> value is required.");
|
|
4091
|
+
}
|
|
4092
|
+
const parsedFields = fields.map(parseFieldDefinition);
|
|
4093
|
+
const fieldNames = new Set;
|
|
4094
|
+
for (const field of parsedFields) {
|
|
4095
|
+
if (fieldNames.has(field.name)) {
|
|
4096
|
+
throw new Error(`Duplicate field name "${field.name}".`);
|
|
4097
|
+
}
|
|
4098
|
+
fieldNames.add(field.name);
|
|
4099
|
+
}
|
|
4100
|
+
const schema = await readOrCreateSchema(schemaPath);
|
|
4101
|
+
if (schema.entities.some((entity2) => entity2.name === name)) {
|
|
4102
|
+
throw new Error(`Entity "${name}" already exists.`);
|
|
4103
|
+
}
|
|
4104
|
+
const entity = {
|
|
4105
|
+
id: randomUUID(),
|
|
4106
|
+
name,
|
|
4107
|
+
displayName: name,
|
|
4108
|
+
fields: parsedFields
|
|
4109
|
+
};
|
|
4110
|
+
schema.entities.push(entity);
|
|
4111
|
+
const fs = getFileSystem();
|
|
4112
|
+
await fs.writeFile(schemaPath, JSON.stringify(schema, null, 2));
|
|
4113
|
+
return { entity, schemaPath };
|
|
4114
|
+
}
|
|
4115
|
+
|
|
4116
|
+
// src/commands/add.ts
|
|
4117
|
+
var ADD_EXAMPLES = [
|
|
4118
|
+
{
|
|
4119
|
+
Description: "Add a process to the current vertical solution",
|
|
4120
|
+
Command: "uip vss add process",
|
|
4121
|
+
Output: {
|
|
4122
|
+
Code: "ProcessesAdded",
|
|
4123
|
+
Data: {
|
|
4124
|
+
Status: "1 processes added successfully",
|
|
4125
|
+
Path: "/Users/alice/my-app"
|
|
4126
|
+
}
|
|
4127
|
+
}
|
|
4128
|
+
},
|
|
4129
|
+
{
|
|
4130
|
+
Description: "Add a local Data Fabric entity to the current vertical solution",
|
|
4131
|
+
Command: "uip vss add entity Employee --field name:string --field salary:number",
|
|
4132
|
+
Output: {
|
|
4133
|
+
Code: "EntityAdded",
|
|
4134
|
+
Data: {
|
|
4135
|
+
Entity: "Employee",
|
|
4136
|
+
Fields: ["name", "salary"],
|
|
4137
|
+
Schema: "/Users/alice/my-app/data_fabric_schema.json"
|
|
4138
|
+
}
|
|
4139
|
+
}
|
|
4140
|
+
}
|
|
4141
|
+
];
|
|
4142
|
+
var collectField = (value, previous = []) => [
|
|
4143
|
+
...previous,
|
|
4144
|
+
value
|
|
4145
|
+
];
|
|
4146
|
+
var add = async ({ type, target, field, schema, targetPath }) => {
|
|
4147
|
+
const isValidType = ["process", "connection", "entity"].includes(type);
|
|
4148
|
+
if (!isValidType) {
|
|
4149
|
+
OutputFormatter.error({
|
|
4150
|
+
Result: RESULTS.Failure,
|
|
4151
|
+
Message: "Invalid type",
|
|
4152
|
+
Instructions: `Invalid type "${type}". Valid types are: process, connection, entity`
|
|
4153
|
+
});
|
|
4154
|
+
processContext.exit(1);
|
|
4155
|
+
return;
|
|
4156
|
+
}
|
|
4157
|
+
const fs = getFileSystem();
|
|
4158
|
+
const projectDir = targetPath ?? (type === "entity" ? undefined : target) ?? fs.env.cwd();
|
|
4159
|
+
if (!await fs.exists(projectDir)) {
|
|
4160
|
+
OutputFormatter.error({
|
|
4161
|
+
Result: RESULTS.Failure,
|
|
4162
|
+
Message: "Project directory does not exist",
|
|
4163
|
+
Instructions: `Project directory "${projectDir}" does not exist`
|
|
4164
|
+
});
|
|
4165
|
+
processContext.exit(1);
|
|
4166
|
+
return;
|
|
4167
|
+
}
|
|
4168
|
+
switch (type) {
|
|
4169
|
+
case "process": {
|
|
4170
|
+
await addProcess({
|
|
4171
|
+
targetPath: projectDir
|
|
4172
|
+
});
|
|
4173
|
+
break;
|
|
4174
|
+
}
|
|
4175
|
+
case "entity": {
|
|
4176
|
+
if (!target) {
|
|
4177
|
+
OutputFormatter.error({
|
|
4178
|
+
Result: RESULTS.Failure,
|
|
4179
|
+
Message: "Entity name is required",
|
|
4180
|
+
Instructions: "Provide an entity name, for example: uip vss add entity Employee --field name:string"
|
|
4181
|
+
});
|
|
4182
|
+
processContext.exit(1);
|
|
4183
|
+
return;
|
|
4184
|
+
}
|
|
4185
|
+
const schemaPath = schema ?? fs.path.join(projectDir, "data_fabric_schema.json");
|
|
4186
|
+
const [entityError, result] = await catchError(addDataFabricEntity({
|
|
4187
|
+
schemaPath,
|
|
4188
|
+
name: target,
|
|
4189
|
+
fields: field ?? []
|
|
4190
|
+
}));
|
|
4191
|
+
if (entityError) {
|
|
4192
|
+
OutputFormatter.error({
|
|
4193
|
+
Result: RESULTS.Failure,
|
|
4194
|
+
Message: "Failed to add entity",
|
|
4195
|
+
Instructions: entityError.message
|
|
4196
|
+
});
|
|
4197
|
+
processContext.exit(1);
|
|
4198
|
+
return;
|
|
4199
|
+
}
|
|
4200
|
+
OutputFormatter.success({
|
|
4201
|
+
Result: RESULTS.Success,
|
|
4202
|
+
Code: "EntityAdded",
|
|
4203
|
+
Data: {
|
|
4204
|
+
Entity: result.entity.name,
|
|
4205
|
+
Fields: result.entity.fields.map((f) => f.name),
|
|
4206
|
+
Schema: result.schemaPath
|
|
4207
|
+
}
|
|
4208
|
+
});
|
|
4209
|
+
break;
|
|
4210
|
+
}
|
|
4211
|
+
case "connection": {
|
|
4212
|
+
OutputFormatter.error({
|
|
4213
|
+
Result: RESULTS.Failure,
|
|
4214
|
+
Message: "Connections are not supported yet",
|
|
4215
|
+
Instructions: "Connections are not supported yet"
|
|
4216
|
+
});
|
|
4217
|
+
processContext.exit(1);
|
|
4218
|
+
return;
|
|
4219
|
+
}
|
|
4220
|
+
}
|
|
4221
|
+
};
|
|
4222
|
+
var registerAddCommand = (program) => {
|
|
4223
|
+
program.command("add").description("Add a process, connection, or local entity to your vertical solution.").argument("<type>", "The type to add.").argument("[target]", "Process project directory or entity name (defaults to current directory for process)").option("--field <definition>", "Entity field definition as <name>:<type>. Repeat for multiple fields.", collectField, []).option("-s, --schema <path>", "Path to data_fabric_schema.json for entity authoring").option("-t, --target-path <targetPath>", "Vertical solution directory (defaults to current directory)").examples(ADD_EXAMPLES).trackedAction(processContext, (type, target, options) => add({ ...options, type, target }));
|
|
4224
|
+
};
|
|
4225
|
+
|
|
4226
|
+
// src/commands/deploy-shared.ts
|
|
4227
|
+
function jobIdentity(job) {
|
|
4228
|
+
return {
|
|
4229
|
+
...job.packageName !== undefined ? { PackageName: forDisplay(job.packageName) } : {},
|
|
4230
|
+
...job.packageVersion !== undefined ? { PackageVersion: forDisplay(job.packageVersion) } : {},
|
|
4231
|
+
...job.action !== undefined ? { Action: forDisplay(job.action) } : {}
|
|
4232
|
+
};
|
|
4233
|
+
}
|
|
4234
|
+
function createHiddenServiceUrlOption() {
|
|
4235
|
+
return new Option("--service-url <url>", "Override the vertical-solution-service base URL (localhost, or https on uipath.com)").hideHelp();
|
|
4236
|
+
}
|
|
4237
|
+
function createLoginValidityOption() {
|
|
4238
|
+
return new Option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)").argParser((value) => parseBoundedInt(value, "--login-validity", { min: 0, max: 1440 })).default(10);
|
|
4239
|
+
}
|
|
4240
|
+
function createActionOption() {
|
|
4241
|
+
return new Option("--action <action>", "install, upgrade or downgrade. Required when the package is already deployed and " + "the terminal cannot be prompted.").choices([...DEPLOY_ACTIONS]).argParser(parseDeployAction);
|
|
4242
|
+
}
|
|
4243
|
+
function parseDeployAction(value) {
|
|
4244
|
+
const normalized = value.trim().toLowerCase();
|
|
4245
|
+
const action = DEPLOY_ACTIONS.find((known) => known === normalized);
|
|
4246
|
+
if (action !== undefined)
|
|
4247
|
+
return action;
|
|
4248
|
+
throw new InvalidArgumentError(`--action must be one of ${DEPLOY_ACTIONS.join(", ")}, got '${value}'.`);
|
|
4249
|
+
}
|
|
4250
|
+
function parseTimeoutSeconds(value) {
|
|
4251
|
+
return parseBoundedInt(value, "--timeout", { min: 0, max: 7 * 24 * 3600 });
|
|
4252
|
+
}
|
|
4253
|
+
function parsePollIntervalMs(value) {
|
|
4254
|
+
return parseBoundedInt(value, "--poll-interval", {
|
|
4255
|
+
min: 250,
|
|
4256
|
+
max: 300000
|
|
4257
|
+
});
|
|
4258
|
+
}
|
|
4259
|
+
function emitDetached(jobId, status, routing) {
|
|
4260
|
+
OutputFormatter.success({
|
|
4261
|
+
Result: RESULTS.Success,
|
|
4262
|
+
Code: "VerticalSolutionDeployDetached",
|
|
4263
|
+
Data: {
|
|
4264
|
+
JobId: forDisplay(jobId),
|
|
4265
|
+
...status === undefined ? {} : { Status: forDisplay(status) },
|
|
4266
|
+
Instructions: `Re-attach with: uip vss deploy resume ${shellQuote(forDisplay(jobId))}${routingFlags(routing)}`
|
|
4267
|
+
}
|
|
4268
|
+
});
|
|
4269
|
+
}
|
|
4270
|
+
function jobSummaryData(job) {
|
|
4271
|
+
return {
|
|
4272
|
+
JobId: forDisplay(job.id),
|
|
4273
|
+
Status: forDisplay(job.status),
|
|
4274
|
+
...jobIdentity(job)
|
|
4275
|
+
};
|
|
4276
|
+
}
|
|
4277
|
+
function deployedJobData(job, failedSteps) {
|
|
4278
|
+
return {
|
|
4279
|
+
...jobSummaryData(job),
|
|
4280
|
+
...job.folderKey ? { FolderKey: forDisplay(job.folderKey) } : {},
|
|
4281
|
+
...job.installedFolderKey ? { InstalledFolderKey: forDisplay(job.installedFolderKey) } : {},
|
|
4282
|
+
...failedSteps.length > 0 ? { NonBlockingFailures: failedSteps.map(forDisplay) } : {}
|
|
4283
|
+
};
|
|
4284
|
+
}
|
|
4285
|
+
function seededEntityOutput(summary) {
|
|
4286
|
+
return {
|
|
4287
|
+
EntityName: forDisplay(summary.entityName),
|
|
4288
|
+
Inserted: summary.inserted,
|
|
4289
|
+
Updated: summary.updated,
|
|
4290
|
+
Unchanged: summary.unchanged,
|
|
4291
|
+
Ignored: summary.ignored,
|
|
4292
|
+
...summary.failed > 0 ? { Failed: summary.failed } : {},
|
|
4293
|
+
...summary.attachmentsUploaded > 0 ? { AttachmentsUploaded: summary.attachmentsUploaded } : {},
|
|
4294
|
+
...summary.skipped ? {
|
|
4295
|
+
Skipped: true,
|
|
4296
|
+
...summary.skipReason ? { SkipReason: summary.skipReason } : {}
|
|
4297
|
+
} : {}
|
|
4298
|
+
};
|
|
4299
|
+
}
|
|
4300
|
+
function seedOutcomeData(outcome) {
|
|
4301
|
+
return {
|
|
4302
|
+
...outcome.seedWorkspace ? { SeedWorkspace: forDisplay(outcome.seedWorkspace) } : {},
|
|
4303
|
+
...outcome.seeded ? { Seeded: outcome.seeded.map(seededEntityOutput) } : {},
|
|
4304
|
+
...outcome.seedHint ? { NextStep: forDisplay(outcome.seedHint) } : {}
|
|
4305
|
+
};
|
|
4306
|
+
}
|
|
4307
|
+
|
|
4308
|
+
// src/commands/deploy-cancel.ts
|
|
4309
|
+
var CANCEL_EXAMPLES = [
|
|
4310
|
+
{
|
|
4311
|
+
Description: "Cancel a running deploy job",
|
|
4312
|
+
Command: "uip vss deploy cancel 8f1c2a34-0000-0000-0000-000000000001 --yes",
|
|
4313
|
+
Output: {
|
|
4314
|
+
Code: "VerticalSolutionDeployCanceled",
|
|
4315
|
+
Data: {
|
|
4316
|
+
JobId: "8f1c2a34-0000-0000-0000-000000000001",
|
|
4317
|
+
Status: "running",
|
|
4318
|
+
CancelRequested: true
|
|
4319
|
+
}
|
|
4320
|
+
}
|
|
4321
|
+
}
|
|
4322
|
+
];
|
|
4323
|
+
var cancel = async (jobId, options) => {
|
|
4324
|
+
const { emitFailure, exitIfCallerAborted, resolveConfigOrFail } = await import("./job-commands-azgbrbdb.js");
|
|
4325
|
+
if (options.yes !== true) {
|
|
4326
|
+
emitFailure(failure("missing-option", `Confirmation is required to cancel deploy job ${forDisplay(jobId)} — steps already applied are not rolled back.`, "Re-run with --yes to confirm.", {
|
|
4327
|
+
result: RESULTS.ValidationError,
|
|
4328
|
+
errorCode: "invalid_argument"
|
|
4329
|
+
}));
|
|
4330
|
+
return;
|
|
4331
|
+
}
|
|
4332
|
+
const config = await resolveConfigOrFail(options);
|
|
4333
|
+
if (!config)
|
|
4334
|
+
return;
|
|
4335
|
+
const { requestCancel } = await import("./watch-job-wh6m7xzq.js");
|
|
4336
|
+
const [error2, job] = await catchError(requestCancel(config, jobId, processContext.pollSignal));
|
|
4337
|
+
if (error2 || !job) {
|
|
4338
|
+
if (exitIfCallerAborted(error2))
|
|
4339
|
+
return;
|
|
4340
|
+
const { finishedJobConflict, knownJobStatus, toDeployFailure } = await import("./service-errors-jzbq3z7p.js");
|
|
4341
|
+
const finished = finishedJobConflict(error2, "cancel");
|
|
4342
|
+
if (finished) {
|
|
4343
|
+
const [settleError, settled] = await catchError(settleConflict(config, jobId, knownJobStatus(finished.status), options));
|
|
4344
|
+
if (settleError) {
|
|
4345
|
+
if (exitIfCallerAborted(settleError))
|
|
4346
|
+
return;
|
|
4347
|
+
throw settleError;
|
|
4348
|
+
}
|
|
4349
|
+
if (!settled.ok) {
|
|
4350
|
+
emitFailure(settled);
|
|
4351
|
+
return;
|
|
4352
|
+
}
|
|
4353
|
+
OutputFormatter.success({
|
|
4354
|
+
Result: RESULTS.Success,
|
|
4355
|
+
Code: "VerticalSolutionDeployNotCancelable",
|
|
4356
|
+
Data: {
|
|
4357
|
+
JobId: forDisplay(jobId),
|
|
4358
|
+
Status: settled.status,
|
|
4359
|
+
Note: `The job is already ${settled.status}; there is nothing to cancel.`
|
|
4360
|
+
}
|
|
4361
|
+
});
|
|
4362
|
+
return;
|
|
4363
|
+
}
|
|
4364
|
+
emitFailure(toDeployFailure(error2, `Could not cancel job ${jobId}`, {
|
|
4365
|
+
notFound: "job",
|
|
4366
|
+
attempting: "cancel",
|
|
4367
|
+
jobId,
|
|
4368
|
+
routing: options
|
|
4369
|
+
}));
|
|
4370
|
+
return;
|
|
4371
|
+
}
|
|
4372
|
+
OutputFormatter.success({
|
|
4373
|
+
Result: RESULTS.Success,
|
|
4374
|
+
Code: "VerticalSolutionDeployCanceled",
|
|
4375
|
+
Data: {
|
|
4376
|
+
JobId: forDisplay(job.id),
|
|
4377
|
+
Status: forDisplay(job.status),
|
|
4378
|
+
CancelRequested: job.cancelRequested === true,
|
|
4379
|
+
...job.status === "canceled" ? {} : {
|
|
4380
|
+
Note: "The job stops at the next step boundary; steps already applied are not rolled back."
|
|
4381
|
+
}
|
|
4382
|
+
}
|
|
4383
|
+
});
|
|
4384
|
+
};
|
|
4385
|
+
async function settledStatus(config, jobId, named) {
|
|
4386
|
+
if (named && TERMINAL_JOB_STATUSES.has(named))
|
|
4387
|
+
return named;
|
|
4388
|
+
const { getDeployJob } = await import("./deploy-jobs-3k87fkwz.js");
|
|
4389
|
+
const [error2, job] = await catchError(() => getDeployJob(config, jobId, processContext.pollSignal));
|
|
4390
|
+
if (error2 && processContext.pollSignal?.aborted === true) {
|
|
4391
|
+
throw error2;
|
|
4392
|
+
}
|
|
4393
|
+
return job?.status ?? named;
|
|
4394
|
+
}
|
|
4395
|
+
async function settleConflict(config, jobId, named, routing) {
|
|
4396
|
+
const status = await settledStatus(config, jobId, named);
|
|
4397
|
+
if (status === undefined) {
|
|
4398
|
+
return failure("service-error", `Could not cancel job ${jobId}: the service refused the cancel and its status could not be read back.`, retryCancel(jobId, routing), { retry: "RetryAfter10Seconds" });
|
|
4399
|
+
}
|
|
4400
|
+
if (!TERMINAL_JOB_STATUSES.has(status)) {
|
|
4401
|
+
return failure("service-error", `Could not cancel job ${jobId}: the service refused the cancel, but the job is still ${status}.`, retryCancel(jobId, routing), { retry: "RetryAfter10Seconds" });
|
|
4402
|
+
}
|
|
4403
|
+
return { ok: true, status };
|
|
4404
|
+
}
|
|
4405
|
+
function retryCancel(jobId, routing) {
|
|
4406
|
+
const flags = routingFlags(routing);
|
|
4407
|
+
const job = shellQuote(jobId);
|
|
4408
|
+
return `Check it with: uip vss deploy status ${job}${flags}; then retry: uip vss deploy cancel ${job} --yes${flags}`;
|
|
4409
|
+
}
|
|
4410
|
+
var registerDeployCancelCommand = (program) => {
|
|
4411
|
+
program.command("cancel").description("Cancel a deploy job. A paused job stops immediately; a running one stops at the next step boundary. Steps already applied are not rolled back.").argument("<job-id>", "Id of the deploy job to cancel").option("-y, --yes", "Confirm this irreversible operation (required; the CLI never prompts)").addOption(createHiddenServiceUrlOption()).addOption(createLoginValidityOption()).addOption(createHiddenDeprecatedTenantOption()).examples(CANCEL_EXAMPLES).trackedAction(processContext, cancel);
|
|
4412
|
+
};
|
|
4413
|
+
|
|
4414
|
+
// src/commands/deploy-resume.ts
|
|
4415
|
+
var RESUME_EXAMPLES = [
|
|
4416
|
+
{
|
|
4417
|
+
Description: "Resume a paused or failed deploy job and watch it finish",
|
|
4418
|
+
Command: "uip vss deploy resume 8f1c2a34-0000-0000-0000-000000000001",
|
|
4419
|
+
Output: {
|
|
4420
|
+
Code: "VerticalSolutionDeployed",
|
|
4421
|
+
Data: {
|
|
4422
|
+
JobId: "8f1c2a34-0000-0000-0000-000000000001",
|
|
4423
|
+
Status: "succeeded",
|
|
4424
|
+
PackageName: "<package-name>",
|
|
4425
|
+
PackageVersion: "1.4.2",
|
|
4426
|
+
Action: "install"
|
|
4427
|
+
}
|
|
4428
|
+
}
|
|
4429
|
+
},
|
|
4430
|
+
{
|
|
4431
|
+
Description: "Rename a fresh install that failed on a tenant-unique name collision",
|
|
4432
|
+
Command: "uip vss deploy resume 8f1c2a34-0000-0000-0000-000000000001 " + "--deployment-name my-solution-prod-2",
|
|
4433
|
+
Output: {
|
|
4434
|
+
Code: "VerticalSolutionDeployed",
|
|
4435
|
+
Data: {
|
|
4436
|
+
JobId: "8f1c2a34-0000-0000-0000-000000000001",
|
|
4437
|
+
Status: "succeeded",
|
|
4438
|
+
PackageName: "<package-name>",
|
|
4439
|
+
PackageVersion: "1.4.2",
|
|
4440
|
+
Action: "install"
|
|
4441
|
+
}
|
|
4442
|
+
}
|
|
4443
|
+
}
|
|
4444
|
+
];
|
|
4445
|
+
var resume = async (jobId, options) => {
|
|
4446
|
+
const { runResume } = await import("./resume-service-mqfnnzb5.js");
|
|
4447
|
+
const { confirmSeed, createWatchPrompts, seedPrompts } = await import("./prompts-dtgt183n.js");
|
|
4448
|
+
const { emitFailure } = await import("./job-commands-azgbrbdb.js");
|
|
4449
|
+
const result = await runResume(jobId, { ...options, signal: processContext.pollSignal }, { watch: createWatchPrompts(), seed: seedPrompts, confirmSeed });
|
|
4450
|
+
if (!result.ok) {
|
|
4451
|
+
emitFailure(result);
|
|
4452
|
+
return;
|
|
4453
|
+
}
|
|
4454
|
+
if (result.outcome === "nothing-to-resume") {
|
|
4455
|
+
OutputFormatter.success({
|
|
4456
|
+
Result: RESULTS.Success,
|
|
4457
|
+
Code: "VerticalSolutionDeployNotResumable",
|
|
4458
|
+
Data: {
|
|
4459
|
+
JobId: result.job.id,
|
|
4460
|
+
Status: result.job.status,
|
|
4461
|
+
Note: `The job is already ${result.job.status}; there is nothing to resume.`
|
|
4462
|
+
}
|
|
4463
|
+
});
|
|
4464
|
+
return;
|
|
4465
|
+
}
|
|
4466
|
+
if (result.outcome === "detached") {
|
|
4467
|
+
emitDetached(result.jobId, result.status, options);
|
|
4468
|
+
return;
|
|
4469
|
+
}
|
|
4470
|
+
if (result.outcome === "submitted") {
|
|
4471
|
+
OutputFormatter.success({
|
|
4472
|
+
Result: RESULTS.Success,
|
|
4473
|
+
Code: "VerticalSolutionDeployResumed",
|
|
4474
|
+
Data: jobSummaryData(result.job)
|
|
4475
|
+
});
|
|
4476
|
+
return;
|
|
4477
|
+
}
|
|
4478
|
+
OutputFormatter.success({
|
|
4479
|
+
Result: RESULTS.Success,
|
|
4480
|
+
Code: "VerticalSolutionDeployed",
|
|
4481
|
+
Data: {
|
|
4482
|
+
...deployedJobData(result.job, result.failedSteps),
|
|
4483
|
+
...seedOutcomeData(result)
|
|
4484
|
+
}
|
|
4485
|
+
});
|
|
4486
|
+
};
|
|
4487
|
+
var registerDeployResumeCommand = (program) => {
|
|
4488
|
+
program.command("resume").description("Resume a paused or failed deploy job from its last checkpoint, or re-attach to one that is still running. Completed steps are not re-run.").argument("<job-id>", "Id of the deploy job to resume").option("--deployment-name <name>", "Rename a fresh install that failed because the name was already taken, or name the deployment an upgrade failed to find").option("--no-wait", "Resume the job and exit without watching it").option("--timeout <seconds>", "Stop watching after this many seconds. 0 means no limit (default: 0)", parseTimeoutSeconds, 0).option("--poll-interval <ms>", "Milliseconds between job status polls (default: 3000)", parsePollIntervalMs, 3000).option("--no-browser", "Print a pause URL instead of opening it in a browser").option("--seed", "Load Data Fabric seed data once the resumed job succeeds (not with --no-wait)").option("--no-seed", "Skip the Data Fabric seeding step").option("-y, --yes", "Seed every entity without asking, when seeding runs").addOption(createLoginValidityOption()).addOption(createHiddenServiceUrlOption()).addOption(createHiddenDeprecatedTenantOption()).examples(RESUME_EXAMPLES).trackedAction(processContext, resume);
|
|
4489
|
+
};
|
|
4490
|
+
|
|
4491
|
+
// src/commands/deploy-seed.ts
|
|
4492
|
+
var SEED_EXAMPLES = [
|
|
4493
|
+
{
|
|
4494
|
+
Description: "Seed Data Fabric using the workspace the last deploy wrote",
|
|
4495
|
+
Command: "uip vss deploy seed",
|
|
4496
|
+
Output: {
|
|
4497
|
+
Code: "VerticalSolutionSeeded",
|
|
4498
|
+
Data: {
|
|
4499
|
+
WorkspaceDir: "/Users/alice/seeding/<package-name>",
|
|
4500
|
+
Entities: [
|
|
4501
|
+
{
|
|
4502
|
+
EntityName: "Loan",
|
|
4503
|
+
Inserted: 12,
|
|
4504
|
+
Updated: 0,
|
|
4505
|
+
Unchanged: 0,
|
|
4506
|
+
Ignored: 0
|
|
4507
|
+
}
|
|
4508
|
+
]
|
|
4509
|
+
}
|
|
4510
|
+
}
|
|
4511
|
+
},
|
|
4512
|
+
{
|
|
4513
|
+
Description: "Seed a folder-scoped entity set from CI, without prompts",
|
|
4514
|
+
Command: "uip vss deploy seed --package-name <package-name> --package-version <version> " + "--folder-key a1b2c3d4-e5f6-7890-abcd-ef1234567890 --yes",
|
|
4515
|
+
Output: {
|
|
4516
|
+
Code: "VerticalSolutionSeeded",
|
|
4517
|
+
Data: {
|
|
4518
|
+
WorkspaceDir: "/build/seeding/<package-name>",
|
|
4519
|
+
Entities: [
|
|
4520
|
+
{
|
|
4521
|
+
EntityName: "Loan",
|
|
4522
|
+
Inserted: 0,
|
|
4523
|
+
Updated: 12,
|
|
4524
|
+
Unchanged: 0,
|
|
4525
|
+
Ignored: 0
|
|
4526
|
+
}
|
|
4527
|
+
]
|
|
4528
|
+
}
|
|
4529
|
+
}
|
|
4530
|
+
}
|
|
4531
|
+
];
|
|
4532
|
+
var seed = async (options) => {
|
|
4533
|
+
const { runSeed } = await import("./seed-service-2d1f7zaz.js");
|
|
4534
|
+
const { emitFailure, exitIfCallerAborted } = await import("./job-commands-azgbrbdb.js");
|
|
4535
|
+
const { seedPrompts } = await import("./prompts-dtgt183n.js");
|
|
4536
|
+
const [error2, result] = await catchError(runSeed({ ...options, signal: processContext.pollSignal }, seedPrompts));
|
|
4537
|
+
const stopped = error2 ?? (result?.ok === false ? result : undefined);
|
|
4538
|
+
if (exitIfCallerAborted(stopped)) {
|
|
4539
|
+
const { writeWarning } = await import("./job-output-t43hzj1f.js");
|
|
4540
|
+
writeWarning("Seeding stopped (Ctrl-C). Run the same command again to finish.");
|
|
4541
|
+
return;
|
|
4542
|
+
}
|
|
4543
|
+
if (error2 || !result)
|
|
4544
|
+
throw error2;
|
|
4545
|
+
if (!result.ok) {
|
|
4546
|
+
emitFailure(result, result.summaries ? {
|
|
4547
|
+
WorkspaceDir: forDisplayIfSet(result.workspaceDir),
|
|
4548
|
+
Entities: result.summaries.map(seededEntityOutput)
|
|
4549
|
+
} : undefined);
|
|
4550
|
+
return;
|
|
4551
|
+
}
|
|
4552
|
+
if (result.summaries.length === 0) {
|
|
4553
|
+
OutputFormatter.success({
|
|
4554
|
+
Result: RESULTS.Success,
|
|
4555
|
+
Code: "VerticalSolutionSeeded",
|
|
4556
|
+
Data: {
|
|
4557
|
+
WorkspaceDir: forDisplay(result.workspaceDir),
|
|
4558
|
+
Entities: [],
|
|
4559
|
+
Note: "This package declares no Data Fabric seeding entities."
|
|
4560
|
+
}
|
|
4561
|
+
});
|
|
4562
|
+
return;
|
|
4563
|
+
}
|
|
4564
|
+
OutputFormatter.success({
|
|
4565
|
+
Result: RESULTS.Success,
|
|
4566
|
+
Code: "VerticalSolutionSeeded",
|
|
4567
|
+
Data: {
|
|
4568
|
+
WorkspaceDir: forDisplay(result.workspaceDir),
|
|
4569
|
+
Entities: result.summaries.map(seededEntityOutput)
|
|
4570
|
+
}
|
|
4571
|
+
});
|
|
4572
|
+
};
|
|
4573
|
+
var registerDeploySeedCommand = (program) => {
|
|
4574
|
+
program.command("seed").description("Load Data Fabric records from the local seed workspace. Idempotent: rows an earlier run inserted are journaled and updated rather than duplicated.").option("--package-name <name>", "Package whose seed workspace to use. Defaults to the one the last deploy recorded.").option("--package-version <version>", "Package version whose schema the seed files are validated against. Defaults to the recorded one, which is used only for the package that recorded it. With --package-name, creates a missing seed workspace from that version's templates.").option("--dir <path>", "Folder holding the seed CSVs. Defaults to ./seeding/<package-name>.").option("--folder-path <path>", "Folder scoping the Data Fabric entities, by path (for example Shared/Lending/LoanSetup). Needed when the solution provisions them inside its own folder; refused for a package whose entities are tenant-level.").option("--folder-key <guid>", "The same folder by key. Use either this or --folder-path.").option("-y, --yes", "Seed every entity without asking (required in a non-interactive terminal)").option("--refresh", "Re-download the seed templates before seeding, preserving the retry journal").addOption(createLoginValidityOption()).addOption(createHiddenServiceUrlOption()).addOption(createHiddenDeprecatedTenantOption()).examples(SEED_EXAMPLES).trackedAction(processContext, seed);
|
|
4575
|
+
};
|
|
4576
|
+
|
|
4577
|
+
// src/commands/deploy-status.ts
|
|
4578
|
+
var STATUS_EXAMPLES = [
|
|
4579
|
+
{
|
|
4580
|
+
Description: "Check a detached deploy job",
|
|
4581
|
+
Command: "uip vss deploy status 8f1c2a34-0000-0000-0000-000000000001",
|
|
4582
|
+
Output: {
|
|
4583
|
+
Code: "VerticalSolutionDeployStatus",
|
|
4584
|
+
Data: {
|
|
4585
|
+
JobId: "8f1c2a34-0000-0000-0000-000000000001",
|
|
4586
|
+
Status: "running",
|
|
4587
|
+
PackageName: "<package-name>",
|
|
4588
|
+
PackageVersion: "1.4.2",
|
|
4589
|
+
Action: "install",
|
|
4590
|
+
Steps: [{ Key: "SOLUTION", Status: "running" }]
|
|
4591
|
+
}
|
|
4592
|
+
}
|
|
4593
|
+
}
|
|
4594
|
+
];
|
|
4595
|
+
var status = async (jobId, options) => {
|
|
4596
|
+
const { emitFailure, exitIfCallerAborted, resolveConfigOrFail } = await import("./job-commands-azgbrbdb.js");
|
|
4597
|
+
const config = await resolveConfigOrFail(options);
|
|
4598
|
+
if (!config)
|
|
4599
|
+
return;
|
|
4600
|
+
const { getDeployJob } = await import("./deploy-jobs-3k87fkwz.js");
|
|
4601
|
+
const { inExecutionOrder } = await import("./job-output-t43hzj1f.js");
|
|
4602
|
+
const [error2, job] = await catchError(() => getDeployJob(config, jobId, processContext.pollSignal));
|
|
4603
|
+
if (error2 || !job) {
|
|
4604
|
+
if (exitIfCallerAborted(error2))
|
|
4605
|
+
return;
|
|
4606
|
+
const { toDeployFailure } = await import("./service-errors-jzbq3z7p.js");
|
|
4607
|
+
const failure2 = toDeployFailure(error2, `Could not read job ${jobId}`, {
|
|
4608
|
+
notFound: "job",
|
|
4609
|
+
jobId,
|
|
4610
|
+
routing: options
|
|
4611
|
+
});
|
|
4612
|
+
emitFailure(failure2);
|
|
4613
|
+
return;
|
|
4614
|
+
}
|
|
4615
|
+
OutputFormatter.success({
|
|
4616
|
+
Result: RESULTS.Success,
|
|
4617
|
+
Code: "VerticalSolutionDeployStatus",
|
|
4618
|
+
Data: {
|
|
4619
|
+
JobId: forDisplayIfSet(job.id),
|
|
4620
|
+
Status: forDisplayIfSet(job.status),
|
|
4621
|
+
...jobIdentity(job),
|
|
4622
|
+
...job.folderKey ? { FolderKey: forDisplayIfSet(job.folderKey) } : {},
|
|
4623
|
+
...job.installedFolderKey ? {
|
|
4624
|
+
InstalledFolderKey: forDisplayIfSet(job.installedFolderKey)
|
|
4625
|
+
} : {},
|
|
4626
|
+
CancelRequested: job.cancelRequested === true,
|
|
4627
|
+
Progress: stepProgress(job.steps ?? []),
|
|
4628
|
+
Steps: inExecutionOrder(job.steps ?? []).map((step) => ({
|
|
4629
|
+
Key: forDisplayIfSet(step.key),
|
|
4630
|
+
Status: forDisplayIfSet(step.status),
|
|
4631
|
+
...step.detail ? { Detail: forDisplayIfSet(step.detail) } : {}
|
|
4632
|
+
})),
|
|
4633
|
+
...job.actionRequired ? {
|
|
4634
|
+
ActionRequired: {
|
|
4635
|
+
Kind: forDisplayIfSet(job.actionRequired.kind),
|
|
4636
|
+
...job.actionRequired.url ? { Url: forDisplayIfSet(job.actionRequired.url) } : {}
|
|
4637
|
+
}
|
|
4638
|
+
} : {},
|
|
4639
|
+
...job.error ? {
|
|
4640
|
+
Error: {
|
|
4641
|
+
...job.error.step ? { Step: forDisplayIfSet(job.error.step) } : {},
|
|
4642
|
+
Message: forDisplayIfSet(job.error.message)
|
|
4643
|
+
}
|
|
4644
|
+
} : {},
|
|
4645
|
+
...omitUnset({
|
|
4646
|
+
CreatedAt: forDisplayIfSet(job.createdAt),
|
|
4647
|
+
UpdatedAt: forDisplayIfSet(job.updatedAt)
|
|
4648
|
+
})
|
|
4649
|
+
}
|
|
4650
|
+
});
|
|
4651
|
+
};
|
|
4652
|
+
var ENDED_STEP_STATUSES = new Set([
|
|
4653
|
+
"succeeded",
|
|
4654
|
+
"skipped",
|
|
4655
|
+
"failed"
|
|
4656
|
+
]);
|
|
4657
|
+
function stepProgress(steps) {
|
|
4658
|
+
const finished = steps.filter((step) => ENDED_STEP_STATUSES.has(step.status)).length;
|
|
4659
|
+
return { Finished: finished, Total: steps.length };
|
|
4660
|
+
}
|
|
4661
|
+
function omitUnset(fields) {
|
|
4662
|
+
return Object.fromEntries(Object.entries(fields).filter((entry) => entry[1] !== undefined));
|
|
4663
|
+
}
|
|
4664
|
+
var registerDeployStatusCommand = (program) => {
|
|
4665
|
+
program.command("status").description("Show the status and step checkpoints of a deploy job. Read-only — safe to poll from CI.").argument("<job-id>", "Id of the deploy job, as printed by 'uip vss deploy'").addOption(createHiddenServiceUrlOption()).addOption(createLoginValidityOption()).addOption(createHiddenDeprecatedTenantOption()).examples(STATUS_EXAMPLES).trackedAction(processContext, status);
|
|
4666
|
+
};
|
|
4667
|
+
|
|
4668
|
+
// src/commands/deploy.ts
|
|
4669
|
+
var DEPLOY_EXAMPLES = [
|
|
4670
|
+
{
|
|
4671
|
+
Description: "Deploy a package into a new folder, answering prompts",
|
|
4672
|
+
Command: "uip vss deploy",
|
|
4673
|
+
Output: {
|
|
4674
|
+
Code: "VerticalSolutionDeployed",
|
|
4675
|
+
Data: {
|
|
4676
|
+
JobId: "8f1c2a34-0000-0000-0000-000000000001",
|
|
4677
|
+
Status: "succeeded",
|
|
4678
|
+
PackageName: "<package-name>",
|
|
4679
|
+
PackageVersion: "1.4.2",
|
|
4680
|
+
Action: "install"
|
|
4681
|
+
}
|
|
4682
|
+
}
|
|
4683
|
+
},
|
|
4684
|
+
{
|
|
4685
|
+
Description: "Deploy from CI with every input as a flag and no prompts",
|
|
4686
|
+
Command: "uip vss deploy --package-name <package-name> --package-version 1.4.2 " + '--folder-path "Shared/Production" --deployment-name my-solution-prod ' + "--config <KEY>=env.MY_SECRET --yes",
|
|
4687
|
+
Output: {
|
|
4688
|
+
Code: "VerticalSolutionDeployed",
|
|
4689
|
+
Data: {
|
|
4690
|
+
JobId: "8f1c2a34-0000-0000-0000-000000000001",
|
|
4691
|
+
Status: "succeeded",
|
|
4692
|
+
PackageName: "<package-name>",
|
|
4693
|
+
PackageVersion: "1.4.2",
|
|
4694
|
+
Action: "install"
|
|
4695
|
+
}
|
|
4696
|
+
}
|
|
4697
|
+
},
|
|
4698
|
+
{
|
|
4699
|
+
Description: "Upgrade an installed deployment and detach, for a pipeline that polls separately",
|
|
4700
|
+
Command: "uip vss deploy --package-name <package-name> --action upgrade " + "--folder-key a1b2c3d4-e5f6-7890-abcd-ef1234567890 --yes --no-wait",
|
|
4701
|
+
Output: {
|
|
4702
|
+
Code: "VerticalSolutionDeploySubmitted",
|
|
4703
|
+
Data: {
|
|
4704
|
+
JobId: "8f1c2a34-0000-0000-0000-000000000001",
|
|
4705
|
+
Status: "running",
|
|
4706
|
+
PackageName: "<package-name>",
|
|
4707
|
+
PackageVersion: "1.5.0",
|
|
4708
|
+
Action: "upgrade"
|
|
4709
|
+
}
|
|
4710
|
+
}
|
|
4711
|
+
}
|
|
4712
|
+
];
|
|
4713
|
+
var deploy = async (options) => {
|
|
4714
|
+
const { runDeploy } = await import("./deploy-service-qaykt7er.js");
|
|
4715
|
+
const {
|
|
4716
|
+
configurationPrompts,
|
|
4717
|
+
confirmProceed,
|
|
4718
|
+
confirmSeed,
|
|
4719
|
+
createWatchPrompts,
|
|
4720
|
+
seedPrompts,
|
|
4721
|
+
targetPrompts
|
|
4722
|
+
} = await import("./prompts-dtgt183n.js");
|
|
4723
|
+
const result = await runDeploy({ ...options, signal: processContext.pollSignal }, {
|
|
4724
|
+
target: targetPrompts,
|
|
4725
|
+
configuration: configurationPrompts,
|
|
4726
|
+
watch: createWatchPrompts(),
|
|
4727
|
+
confirmProceed,
|
|
4728
|
+
seed: seedPrompts,
|
|
4729
|
+
confirmSeed
|
|
4730
|
+
});
|
|
4731
|
+
if (!result.ok) {
|
|
4732
|
+
const { emitFailure } = await import("./job-commands-azgbrbdb.js");
|
|
4733
|
+
emitFailure(result);
|
|
4734
|
+
return;
|
|
4735
|
+
}
|
|
4736
|
+
if (result.outcome === "detached") {
|
|
4737
|
+
emitDetached(result.jobId, result.status, options);
|
|
4738
|
+
return;
|
|
4739
|
+
}
|
|
4740
|
+
if (result.outcome === "submitted") {
|
|
4741
|
+
OutputFormatter.success({
|
|
4742
|
+
Result: RESULTS.Success,
|
|
4743
|
+
Code: "VerticalSolutionDeploySubmitted",
|
|
4744
|
+
Data: jobSummaryData(result.job)
|
|
4745
|
+
});
|
|
4746
|
+
return;
|
|
4747
|
+
}
|
|
4748
|
+
OutputFormatter.success({
|
|
4749
|
+
Result: RESULTS.Success,
|
|
4750
|
+
Code: "VerticalSolutionDeployed",
|
|
4751
|
+
Data: {
|
|
4752
|
+
...deployedJobData(result.job, result.failedSteps),
|
|
4753
|
+
...seedOutcomeData(result)
|
|
4754
|
+
}
|
|
4755
|
+
});
|
|
4756
|
+
};
|
|
4757
|
+
var registerDeployCommand = (program) => {
|
|
4758
|
+
const command = program.command("deploy").description("Deploy a Vertical Solution package remotely. The service runs the deploy as you, with your permissions. Use 'deploy status', 'deploy resume' and 'deploy cancel' to manage a job, and 'deploy seed' to load Data Fabric data afterwards.").option("--package-name <name>", "Vertical Solution package to deploy. Required unless the terminal can be prompted.").option("--package-version <version>", "Version to deploy. Defaults to the newest published version for a fresh install, or the newest allowed upgrade. Always required for a downgrade.").option("--vertical <vertical>", "Vertical to list packages from. Only used when picking a package interactively.").addOption(new Option("--stage <stage>", "Registry stage to read the package feed from (default: stable)").hideHelp()).addOption(createActionOption()).option("--folder-path <path>", "Path of an existing Orchestrator folder to install into (fresh installs), e.g. Shared/Production").option("--folder-key <guid>", "Folder key of the deployment to upgrade or downgrade, or of the install target").option("--deployment-name <name>", "Deployment name, unique per tenant. A fresh install creates it (defaults to the solution's name); an upgrade or downgrade addresses the existing deployment by it.").option("--config <config...>", "Manifest configuration values as KEY=VALUE, space-separated. Use KEY=env.MY_VAR for a secret so it never appears on the command line.").option("--config-file <path>", "JSON or flat-YAML file of KEY: VALUE configuration values. --config wins over it.").option("--resource-config <path>", "Path to deploy-config.json (per-resource configuration). Defaults to ./deploy-config.json.").option("-y, --yes", "Confirm the deploy without prompting (required in a non-interactive terminal)").option("--no-wait", "Submit the job and exit without watching it. Prints the job id.").option("--timeout <seconds>", "Stop watching after this many seconds. 0 means no limit (default: 0)", parseTimeoutSeconds, 0).option("--poll-interval <ms>", "Milliseconds between job status polls (default: 3000)", parsePollIntervalMs, 3000).option("--no-browser", "Print a pause URL instead of opening it in a browser").option("--seed", "Load Data Fabric seed data after a successful deploy (not with --no-wait)").option("--no-seed", "Skip the Data Fabric seeding step").addOption(createLoginValidityOption()).addOption(createHiddenServiceUrlOption()).addOption(createHiddenDeprecatedTenantOption()).examples(DEPLOY_EXAMPLES).trackedAction(processContext, deploy);
|
|
4759
|
+
registerDeploySeedCommand(command);
|
|
4760
|
+
registerDeployStatusCommand(command);
|
|
4761
|
+
registerDeployResumeCommand(command);
|
|
4762
|
+
registerDeployCancelCommand(command);
|
|
4763
|
+
};
|
|
4764
|
+
|
|
4765
|
+
// src/commands/init.ts
|
|
4766
|
+
var INIT_EXAMPLES = [
|
|
4767
|
+
{
|
|
4768
|
+
Description: "Initialize a new vertical solution in the current folder",
|
|
4769
|
+
Command: 'uip vss init --name "My App"',
|
|
4770
|
+
Output: {
|
|
4771
|
+
Code: "VerticalSolutionInitialized",
|
|
4772
|
+
Data: {
|
|
4773
|
+
Status: "Initialized successfully",
|
|
4774
|
+
Path: "/Users/alice/my-app/vss.json"
|
|
4775
|
+
}
|
|
4776
|
+
}
|
|
4777
|
+
}
|
|
4778
|
+
];
|
|
4779
|
+
var init = async ({ targetPath, name }) => {
|
|
4780
|
+
const fs = getFileSystem();
|
|
4781
|
+
const projectDir = targetPath ?? fs.env.cwd();
|
|
4782
|
+
if (!await fs.exists(projectDir)) {
|
|
4783
|
+
OutputFormatter.error({
|
|
4784
|
+
Result: RESULTS.Failure,
|
|
4785
|
+
Message: "Target path does not exist",
|
|
4786
|
+
Instructions: `Target path "${projectDir}" does not exist`
|
|
4787
|
+
});
|
|
4788
|
+
processContext.exit(1);
|
|
4789
|
+
return;
|
|
4790
|
+
}
|
|
4791
|
+
const configPath = fs.path.join(projectDir, "vss.json");
|
|
4792
|
+
if (await fs.exists(configPath)) {
|
|
4793
|
+
OutputFormatter.error({
|
|
4794
|
+
Result: RESULTS.Failure,
|
|
4795
|
+
Message: "Vertical solution already initialized",
|
|
4796
|
+
Instructions: `Vertical solution already initialized in "${projectDir}"`
|
|
4797
|
+
});
|
|
4798
|
+
processContext.exit(1);
|
|
4799
|
+
return;
|
|
4800
|
+
}
|
|
4801
|
+
if (name === undefined && !canPrompt()) {
|
|
4802
|
+
OutputFormatter.error({
|
|
4803
|
+
Result: RESULTS.Failure,
|
|
4804
|
+
Message: "Solution name is required",
|
|
4805
|
+
Instructions: 'Pass --name "<name>", or re-run with --interactive to enter it at a prompt.'
|
|
4806
|
+
});
|
|
4807
|
+
processContext.exit(1);
|
|
4808
|
+
return;
|
|
4809
|
+
}
|
|
4810
|
+
const projectName = name ?? await dist_default2({
|
|
4811
|
+
message: "Enter the name of the vertical solution",
|
|
4812
|
+
default: "My App"
|
|
4813
|
+
});
|
|
4814
|
+
const config = {
|
|
4815
|
+
appName: projectName,
|
|
4816
|
+
processes: [],
|
|
4817
|
+
connections: []
|
|
4818
|
+
};
|
|
4819
|
+
const [writeError] = await catchError(fs.writeFile(configPath, JSON.stringify(config, null, 2)));
|
|
4820
|
+
if (writeError) {
|
|
4821
|
+
OutputFormatter.error({
|
|
4822
|
+
Result: RESULTS.Failure,
|
|
4823
|
+
Message: "Failed to initialize vertical solution",
|
|
4824
|
+
Instructions: writeError.message
|
|
4825
|
+
});
|
|
4826
|
+
processContext.exit(1);
|
|
4827
|
+
return;
|
|
4828
|
+
}
|
|
4829
|
+
OutputFormatter.success({
|
|
4830
|
+
Result: RESULTS.Success,
|
|
4831
|
+
Code: "VerticalSolutionInitialized",
|
|
4832
|
+
Data: {
|
|
4833
|
+
Status: "Initialized successfully",
|
|
4834
|
+
Path: configPath
|
|
4835
|
+
}
|
|
4836
|
+
});
|
|
4837
|
+
};
|
|
4838
|
+
var registerInitCommand = (program) => {
|
|
4839
|
+
program.command("init").description("Initialize a new vertical solution").option("-t, --target-path <targetPath>", "Target path for the vertical solution").option("-n, --name <name>", "Name of the vertical solution").examples(INIT_EXAMPLES).trackedAction(processContext, init);
|
|
4840
|
+
};
|
|
4841
|
+
|
|
4842
|
+
// src/util/syncItems.ts
|
|
4843
|
+
var deepEqual = (a, b) => {
|
|
4844
|
+
return JSON.stringify(a) === JSON.stringify(b);
|
|
4845
|
+
};
|
|
4846
|
+
var syncItems = (localItems, remoteMap, updated, removed, getRemovedKey) => {
|
|
4847
|
+
const synced = [];
|
|
4848
|
+
for (const local of localItems) {
|
|
4849
|
+
const remote = remoteMap.get(local.id);
|
|
4850
|
+
if (!remote) {
|
|
4851
|
+
removed.push(getRemovedKey(local));
|
|
4852
|
+
continue;
|
|
4853
|
+
}
|
|
4854
|
+
if (!deepEqual(local, remote)) {
|
|
4855
|
+
updated.push(remote.name);
|
|
4856
|
+
}
|
|
4857
|
+
synced.push(remote);
|
|
4858
|
+
}
|
|
4859
|
+
return synced;
|
|
4860
|
+
};
|
|
4861
|
+
|
|
4862
|
+
// src/commands/sync.ts
|
|
4863
|
+
var SYNC_EXAMPLES = [
|
|
4864
|
+
{
|
|
4865
|
+
Description: "Sync the vertical solution with remote processes",
|
|
4866
|
+
Command: "uip vss sync",
|
|
4867
|
+
Output: {
|
|
4868
|
+
Code: "VerticalSolutionSynced",
|
|
4869
|
+
Data: {
|
|
4870
|
+
Status: "Synced successfully",
|
|
4871
|
+
Path: "/Users/alice/my-app/vss.json"
|
|
4872
|
+
}
|
|
4873
|
+
}
|
|
4874
|
+
}
|
|
4875
|
+
];
|
|
4876
|
+
var sync = async () => {
|
|
4877
|
+
const fs = getFileSystem();
|
|
4878
|
+
const [fetchError, remoteProcesses] = await catchError(fetchProcesses());
|
|
4879
|
+
if (fetchError) {
|
|
4880
|
+
OutputFormatter.error({
|
|
4881
|
+
Result: RESULTS.Failure,
|
|
4882
|
+
Message: "Failed to fetch processes",
|
|
4883
|
+
Instructions: fetchError.message
|
|
4884
|
+
});
|
|
4885
|
+
processContext.exit(1);
|
|
4886
|
+
return;
|
|
4887
|
+
}
|
|
4888
|
+
const [readError, config] = await catchError(readConfig());
|
|
4889
|
+
if (readError) {
|
|
4890
|
+
OutputFormatter.error({
|
|
4891
|
+
Result: RESULTS.Failure,
|
|
4892
|
+
Message: "Failed to read config",
|
|
4893
|
+
Instructions: readError.message
|
|
4894
|
+
});
|
|
4895
|
+
processContext.exit(1);
|
|
4896
|
+
return;
|
|
4897
|
+
}
|
|
4898
|
+
const result = {
|
|
4899
|
+
processesUpdated: [],
|
|
4900
|
+
processesRemoved: []
|
|
4901
|
+
};
|
|
4902
|
+
const remoteProcessMap = new Map(remoteProcesses.map((p) => [p.id, p]));
|
|
4903
|
+
const syncedProcesses = syncItems(config.processes, remoteProcessMap, result.processesUpdated, result.processesRemoved, (p) => p.name);
|
|
4904
|
+
const updatedConfig = {
|
|
4905
|
+
...config,
|
|
4906
|
+
processes: syncedProcesses
|
|
4907
|
+
};
|
|
4908
|
+
const configPath = fs.path.join(fs.env.cwd(), "vss.json");
|
|
4909
|
+
const [writeError] = await catchError(fs.writeFile(configPath, JSON.stringify(updatedConfig, null, 2)));
|
|
4910
|
+
if (writeError) {
|
|
4911
|
+
OutputFormatter.error({
|
|
4912
|
+
Result: RESULTS.Failure,
|
|
4913
|
+
Message: "Failed to sync vertical solution",
|
|
4914
|
+
Instructions: writeError.message
|
|
4915
|
+
});
|
|
4916
|
+
processContext.exit(1);
|
|
4917
|
+
return;
|
|
4918
|
+
}
|
|
4919
|
+
OutputFormatter.success({
|
|
4920
|
+
Result: RESULTS.Success,
|
|
4921
|
+
Code: "VerticalSolutionSynced",
|
|
4922
|
+
Data: {
|
|
4923
|
+
Status: "Synced successfully",
|
|
4924
|
+
Path: configPath
|
|
4925
|
+
}
|
|
4926
|
+
});
|
|
4927
|
+
};
|
|
4928
|
+
var registerSyncCommand = (program) => {
|
|
4929
|
+
program.command("sync").description("Sync a vertical solution").examples(SYNC_EXAMPLES).trackedAction(processContext, sync);
|
|
4930
|
+
};
|
|
4931
|
+
|
|
4932
|
+
// src/tool.ts
|
|
4933
|
+
var metadata = {
|
|
4934
|
+
name: "vertical-solutions-tool",
|
|
4935
|
+
version: package_default.version,
|
|
4936
|
+
description: "Scaffold, generate and deploy Vertical Solution projects.",
|
|
4937
|
+
commandPrefix: "vss"
|
|
4938
|
+
};
|
|
4939
|
+
var registerCommands = async (program) => {
|
|
4940
|
+
registerInitCommand(program);
|
|
4941
|
+
registerSyncCommand(program);
|
|
4942
|
+
registerAddCommand(program);
|
|
4943
|
+
registerGenerateCommand(program);
|
|
4944
|
+
registerDeployCommand(program);
|
|
4945
|
+
};
|
|
4946
|
+
|
|
4947
|
+
export { metadata, registerCommands };
|
|
4948
|
+
|
|
4949
|
+
//# debugId=7C78F1BB72149A6564756E2164756E21
|