@treasuredata/tdx 0.4.1 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build-info.json +2 -2
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/client/cdp-api-client.js +1 -1
- package/dist/client/http-client.js +1 -1
- package/dist/client/llm-api-client.d.ts +129 -1
- package/dist/client/llm-api-client.d.ts.map +1 -1
- package/dist/client/llm-api-client.js +1 -1
- package/dist/client/llm-api-client.js.map +1 -1
- package/dist/client/rate-limiter.js +1 -1
- package/dist/client/td-api-client.js +1 -1
- package/dist/client/trino-api-client.js +1 -1
- package/dist/client/workflow-client.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/context-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/llm-command.d.ts +18 -0
- package/dist/commands/llm-command.d.ts.map +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/llm-command.js.map +1 -1
- package/dist/commands/llm-proxy.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pwd-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.d.ts +19 -0
- package/dist/core/keychain.d.ts.map +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/keychain.js.map +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/index.js +1 -1
- package/dist/proxy/anthropic-adapter.js +1 -1
- package/dist/proxy/server.js +1 -1
- package/dist/proxy/session-cache.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/llm.d.ts +90 -1
- package/dist/sdk/llm.d.ts.map +1 -1
- package/dist/sdk/llm.js +1 -1
- package/dist/sdk/llm.js.map +1 -1
- package/dist/sdk/query.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/workflow.js +1 -1
- package/dist/types/endpoints.js +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types/llm.d.ts +241 -0
- package/dist/types/llm.d.ts.map +1 -1
- package/dist/utils/agent-ref-parser.js +1 -1
- package/dist/utils/chat-cache.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/command-output.js +1 -1
- package/dist/utils/constants.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/format-detector.js +1 -1
- package/dist/utils/formatters.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/llm-backup-utils.d.ts +37 -0
- package/dist/utils/llm-backup-utils.d.ts.map +1 -0
- package/dist/utils/llm-backup-utils.js +1 -0
- package/dist/utils/llm-backup-utils.js.map +1 -0
- package/dist/utils/model-aliases.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/port.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/segment-path-parser.js +1 -1
- package/dist/utils/segment-ref-parser.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sql-parser.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/tree-formatter.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/dist/utils/workflow-utils.js +1 -1
- package/package.json +1 -1
package/dist/types/llm.d.ts
CHANGED
|
@@ -223,4 +223,245 @@ export type ChatStreamEvent = {
|
|
|
223
223
|
type: 'event';
|
|
224
224
|
data: ChatEvent;
|
|
225
225
|
};
|
|
226
|
+
/**
|
|
227
|
+
* Knowledge Base table configuration
|
|
228
|
+
*/
|
|
229
|
+
export interface KnowledgeBaseTable {
|
|
230
|
+
name: string;
|
|
231
|
+
tdQuery: string;
|
|
232
|
+
enableData: boolean;
|
|
233
|
+
enableDataIndex: boolean;
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Knowledge Base - JSON:API format
|
|
237
|
+
*/
|
|
238
|
+
export interface KnowledgeBase {
|
|
239
|
+
id: string;
|
|
240
|
+
type: string;
|
|
241
|
+
links?: {
|
|
242
|
+
self?: string;
|
|
243
|
+
};
|
|
244
|
+
attributes: {
|
|
245
|
+
projectId: string;
|
|
246
|
+
name: string;
|
|
247
|
+
tdDatabaseName: string;
|
|
248
|
+
tables: KnowledgeBaseTable[];
|
|
249
|
+
isManaged?: boolean;
|
|
250
|
+
createdAt?: string;
|
|
251
|
+
updatedAt?: string;
|
|
252
|
+
lastJob?: {
|
|
253
|
+
status: string;
|
|
254
|
+
message: string;
|
|
255
|
+
finishedAt: string;
|
|
256
|
+
logs?: string;
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Knowledge Base list response
|
|
262
|
+
*/
|
|
263
|
+
export interface KnowledgeBaseListResponse {
|
|
264
|
+
data: KnowledgeBase[];
|
|
265
|
+
meta?: {
|
|
266
|
+
total: number;
|
|
267
|
+
};
|
|
268
|
+
links?: {
|
|
269
|
+
self?: string;
|
|
270
|
+
next?: string;
|
|
271
|
+
first?: string;
|
|
272
|
+
last?: string;
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* LLM Prompt - JSON:API format
|
|
277
|
+
* Note: Prompts belong to a project and are associated with an agent
|
|
278
|
+
*/
|
|
279
|
+
export interface LLMPrompt {
|
|
280
|
+
id: string;
|
|
281
|
+
type: string;
|
|
282
|
+
links?: {
|
|
283
|
+
self?: string;
|
|
284
|
+
};
|
|
285
|
+
attributes: {
|
|
286
|
+
projectId: string;
|
|
287
|
+
agentId: string;
|
|
288
|
+
name: string;
|
|
289
|
+
systemPrompt: string;
|
|
290
|
+
template: string;
|
|
291
|
+
isManaged?: boolean;
|
|
292
|
+
createdAt?: string;
|
|
293
|
+
updatedAt?: string;
|
|
294
|
+
jsonSchemaHint?: string;
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* LLM Prompt list response
|
|
299
|
+
*/
|
|
300
|
+
export interface LLMPromptListResponse {
|
|
301
|
+
data: LLMPrompt[];
|
|
302
|
+
meta?: {
|
|
303
|
+
total: number;
|
|
304
|
+
};
|
|
305
|
+
links?: {
|
|
306
|
+
self?: string;
|
|
307
|
+
next?: string;
|
|
308
|
+
first?: string;
|
|
309
|
+
last?: string;
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Integration action
|
|
314
|
+
*/
|
|
315
|
+
export interface IntegrationAction {
|
|
316
|
+
promptId: string;
|
|
317
|
+
chatWidgetType: string;
|
|
318
|
+
chatWidgetLabel: string;
|
|
319
|
+
uiTags: unknown[];
|
|
320
|
+
webhookTextUrl?: string;
|
|
321
|
+
slackRequestUrl?: string;
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Integration - JSON:API format
|
|
325
|
+
*/
|
|
326
|
+
export interface Integration {
|
|
327
|
+
id: string;
|
|
328
|
+
type: string;
|
|
329
|
+
links?: {
|
|
330
|
+
self?: string;
|
|
331
|
+
};
|
|
332
|
+
attributes: {
|
|
333
|
+
projectId: string;
|
|
334
|
+
serviceType: string;
|
|
335
|
+
actions: IntegrationAction[];
|
|
336
|
+
slackMessageMode: string;
|
|
337
|
+
chatIgnoreManagedActions: boolean;
|
|
338
|
+
chatWelcomeMessage: string;
|
|
339
|
+
webhookCorsOrigins?: {
|
|
340
|
+
origin: string;
|
|
341
|
+
}[];
|
|
342
|
+
isManaged?: boolean;
|
|
343
|
+
createdAt?: string;
|
|
344
|
+
updatedAt?: string;
|
|
345
|
+
webhookAuthorizationUsername?: string;
|
|
346
|
+
webhookAuthorizationPassword?: string;
|
|
347
|
+
webhookAuthorizationHeader?: string;
|
|
348
|
+
slackSigningSecret?: string;
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Integration list response
|
|
353
|
+
*/
|
|
354
|
+
export interface IntegrationListResponse {
|
|
355
|
+
data: Integration[];
|
|
356
|
+
meta?: {
|
|
357
|
+
total: number;
|
|
358
|
+
};
|
|
359
|
+
links?: {
|
|
360
|
+
self?: string;
|
|
361
|
+
next?: string;
|
|
362
|
+
first?: string;
|
|
363
|
+
last?: string;
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Agent tool configuration
|
|
368
|
+
*/
|
|
369
|
+
export interface AgentTool {
|
|
370
|
+
targetKnowledgeBaseId?: string;
|
|
371
|
+
targetAgentId?: string;
|
|
372
|
+
targetFunction: string;
|
|
373
|
+
functionName: string;
|
|
374
|
+
functionDescription: string;
|
|
375
|
+
agentOutputMode?: string;
|
|
376
|
+
agentPromptSchema?: string;
|
|
377
|
+
agentPromptTemplate?: string;
|
|
378
|
+
targetType: 'KNOWLEDGE_BASE' | 'AGENT' | 'WEB_SEARCH' | 'IMAGE_GEN' | string;
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* Agent variable configuration
|
|
382
|
+
*/
|
|
383
|
+
export interface AgentVariable {
|
|
384
|
+
name: string;
|
|
385
|
+
targetKnowledgeBaseId: string;
|
|
386
|
+
targetFunction: string;
|
|
387
|
+
functionArgumentsText: string;
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* Agent output configuration
|
|
391
|
+
*/
|
|
392
|
+
export interface AgentOutput {
|
|
393
|
+
name: string;
|
|
394
|
+
functionName: string;
|
|
395
|
+
functionDescription: string;
|
|
396
|
+
jsonSchema: string;
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* Full Agent with all attributes (for backup/restore)
|
|
400
|
+
* Extends the basic Agent with tools, variables, outputs
|
|
401
|
+
*/
|
|
402
|
+
export interface AgentFull {
|
|
403
|
+
id: string;
|
|
404
|
+
type: string;
|
|
405
|
+
links?: {
|
|
406
|
+
self?: string;
|
|
407
|
+
};
|
|
408
|
+
attributes: {
|
|
409
|
+
name: string;
|
|
410
|
+
description?: string;
|
|
411
|
+
projectId: string;
|
|
412
|
+
systemPrompt: string;
|
|
413
|
+
starterMessage?: string;
|
|
414
|
+
modelType: string;
|
|
415
|
+
maxToolIterations: number;
|
|
416
|
+
temperature: number;
|
|
417
|
+
reasoningEffort?: number;
|
|
418
|
+
isManaged?: boolean;
|
|
419
|
+
createdAt?: string;
|
|
420
|
+
updatedAt?: string;
|
|
421
|
+
outputs: AgentOutput[];
|
|
422
|
+
tools: AgentTool[];
|
|
423
|
+
variables: AgentVariable[];
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* Project backup metadata (stored in project.json)
|
|
428
|
+
*/
|
|
429
|
+
export interface ProjectBackupMetadata {
|
|
430
|
+
version: '1.0';
|
|
431
|
+
exportedAt: string;
|
|
432
|
+
exportedFrom: {
|
|
433
|
+
site: string;
|
|
434
|
+
projectId: string;
|
|
435
|
+
projectName: string;
|
|
436
|
+
};
|
|
437
|
+
project: LLMProject;
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* Backup summary returned after backup operation
|
|
441
|
+
*/
|
|
442
|
+
export interface BackupSummary {
|
|
443
|
+
projectName: string;
|
|
444
|
+
outputDir: string;
|
|
445
|
+
counts: {
|
|
446
|
+
agents: number;
|
|
447
|
+
knowledgeBases: number;
|
|
448
|
+
prompts: number;
|
|
449
|
+
integrations: number;
|
|
450
|
+
};
|
|
451
|
+
}
|
|
452
|
+
/**
|
|
453
|
+
* Restore summary returned after restore operation
|
|
454
|
+
*/
|
|
455
|
+
export interface RestoreSummary {
|
|
456
|
+
projectName: string;
|
|
457
|
+
projectId: string;
|
|
458
|
+
counts: {
|
|
459
|
+
agents: number;
|
|
460
|
+
knowledgeBases: number;
|
|
461
|
+
prompts: number;
|
|
462
|
+
integrations: number;
|
|
463
|
+
};
|
|
464
|
+
/** Original site if backup was from a different site (cross-site restore) */
|
|
465
|
+
sourceSite?: string;
|
|
466
|
+
}
|
|
226
467
|
//# sourceMappingURL=llm.d.ts.map
|
package/dist/types/llm.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm.d.ts","sourceRoot":"","sources":["../../src/types/llm.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,UAAU,EAAE;QACV,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;QAClB,sBAAsB,CAAC,EAAE,OAAO,CAAC;QACjC,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAC3B,mBAAmB,CAAC,EAAE,OAAO,CAAC;QAC9B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x3f83de=-parseInt(_0x1ce0ee(0xdb))/0x1*(parseInt(_0x1ce0ee(0xde))/0x2)+-parseInt(_0x1ce0ee(0xda))/0x3*(-parseInt(_0x1ce0ee(0xe1))/0x4)+-parseInt(_0x1ce0ee(0xd8))/0x5+parseInt(_0x1ce0ee(0xdf))/0x6*(parseInt(_0x1ce0ee(0xe2))/0x7)+parseInt(_0x1ce0ee(0xd4))/0x8+parseInt(_0x1ce0ee(0xdd))/0x9*(parseInt(_0x1ce0ee(0xd2))/0xa)+-parseInt(_0x1ce0ee(0xd9))/0xb;if(_0x3f83de===_0x37db6f)break;else _0xa5b2cc['push'](_0xa5b2cc['shift']());}catch(_0x19c026){_0xa5b2cc['push'](_0xa5b2cc['shift']());}}}(a63_0x4811,0x43bec));function a63_0x3ab9(_0x344785,_0x565db7){const _0x481123=a63_0x4811();return a63_0x3ab9=function(_0x3ab938,_0x1533c9){_0x3ab938=_0x3ab938-0xd2;let _0x3a3b62=_0x481123[_0x3ab938];return _0x3a3b62;},a63_0x3ab9(_0x344785,_0x565db7);}function a63_0x4811(){const _0x41dd91=['Invalid\x20agent\x20reference\x20format:\x20','1126880RRKwfS','trim','Agent\x20name\x20cannot\x20be\x20empty','length','2018615dFbgnG','3737789UazIxz','33vDfjQp','6vLgXmp','.\x20Expected\x20\x22project_name\x22\x20or\x20\x22project_name/agent_name\x22','896607YEjYgv','62754esTnbY','1074VWZBPR','Project\x20name\x20cannot\x20be\x20empty','159284NHnoSG','12964KhsBuQ','30DLfOoX'];a63_0x4811=function(){return _0x41dd91;};return a63_0x4811();}export function parseAgentRef(_0x201e96){const _0x139cb8=a63_0x3ab9;if(!_0x201e96||_0x201e96['trim']()==='')throw new Error('Agent\x20reference\x20cannot\x20be\x20empty');const _0x39a3ae=_0x201e96['trim'](),_0x25d5f8=_0x39a3ae['split']('/');if(_0x25d5f8[_0x139cb8(0xd7)]===0x1)return{'projectName':_0x25d5f8[0x0],'agentName':undefined};else{if(_0x25d5f8['length']===0x2){const [_0x33f7e5,_0x13e54b]=_0x25d5f8;if(!_0x33f7e5||_0x33f7e5[_0x139cb8(0xd5)]()==='')throw new Error(_0x139cb8(0xe0));if(!_0x13e54b||_0x13e54b[_0x139cb8(0xd5)]()==='')throw new Error(_0x139cb8(0xd6));return{'projectName':_0x33f7e5[_0x139cb8(0xd5)](),'agentName':_0x13e54b[_0x139cb8(0xd5)]()};}else throw new Error(_0x139cb8(0xd3)+_0x201e96+_0x139cb8(0xdc));}}
|
package/dist/utils/chat-cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x27779f,_0x1d6185){const _0x2e5dce=a64_0x2556,_0x356a7f=_0x27779f();while(!![]){try{const _0x1e8040=-parseInt(_0x2e5dce(0x145))/0x1+-parseInt(_0x2e5dce(0x147))/0x2*(-parseInt(_0x2e5dce(0x143))/0x3)+parseInt(_0x2e5dce(0x13f))/0x4+parseInt(_0x2e5dce(0x142))/0x5+parseInt(_0x2e5dce(0x148))/0x6*(parseInt(_0x2e5dce(0x14b))/0x7)+parseInt(_0x2e5dce(0x149))/0x8+-parseInt(_0x2e5dce(0x144))/0x9;if(_0x1e8040===_0x1d6185)break;else _0x356a7f['push'](_0x356a7f['shift']());}catch(_0x5e25d2){_0x356a7f['push'](_0x356a7f['shift']());}}}(a64_0x4093,0x9937c));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';function a64_0x4093(){const _0x314d7e=['cwd','1661304ixGMgi','.cache','tdx','3189510uSojjo','22827VFPASD','16698519NpalNo','39138qmqBLE','trim','28blkeQP','19914BxwSWP','8323296eWmCND','utf-8','679MyXOeD'];a64_0x4093=function(){return _0x314d7e;};return a64_0x4093();}import{join}from'path';function getCacheDir(){const _0x229c2b=a64_0x2556;return join(process[_0x229c2b(0x13e)](),_0x229c2b(0x140),_0x229c2b(0x141));}function getLastChatIdPath(){return join(getCacheDir(),'last_chat_id');}function ensureCacheDir(){const _0x45e2de=getCacheDir();!existsSync(_0x45e2de)&&mkdirSync(_0x45e2de,{'recursive':!![]});}export function saveLastChatId(_0x4cc6b0){const _0x45de11=a64_0x2556;ensureCacheDir();const _0x8d799a=getLastChatIdPath();writeFileSync(_0x8d799a,_0x4cc6b0,_0x45de11(0x14a));}export function loadLastChatId(){const _0x491376=a64_0x2556,_0x8f8df8=getLastChatIdPath();if(!existsSync(_0x8f8df8))return undefined;try{const _0x108b45=readFileSync(_0x8f8df8,'utf-8')[_0x491376(0x146)]();return _0x108b45||undefined;}catch{return undefined;}}function a64_0x2556(_0x1fc7b5,_0x2d8aad){const _0x409397=a64_0x4093();return a64_0x2556=function(_0x25563f,_0x20d303){_0x25563f=_0x25563f-0x13e;let _0x2ac2ad=_0x409397[_0x25563f];return _0x2ac2ad;},a64_0x2556(_0x1fc7b5,_0x2d8aad);}export function clearLastChatId(){const _0x519f7b=a64_0x2556,_0x195bb0=getLastChatIdPath();if(existsSync(_0x195bb0))try{writeFileSync(_0x195bb0,'',_0x519f7b(0x14a));}catch{}}
|
package/dist/utils/colors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2b4401,_0x4927a6){const _0x2dc18a=a65_0x4e34,_0xf64fbb=_0x2b4401();while(!![]){try{const _0x3a7a0d=parseInt(_0x2dc18a(0x89))/0x1*(parseInt(_0x2dc18a(0xa5))/0x2)+parseInt(_0x2dc18a(0x90))/0x3*(parseInt(_0x2dc18a(0x9d))/0x4)+-parseInt(_0x2dc18a(0x9a))/0x5+parseInt(_0x2dc18a(0xa3))/0x6+parseInt(_0x2dc18a(0x8e))/0x7+parseInt(_0x2dc18a(0x8a))/0x8+parseInt(_0x2dc18a(0xa0))/0x9;if(_0x3a7a0d===_0x4927a6)break;else _0xf64fbb['push'](_0xf64fbb['shift']());}catch(_0x1df740){_0xf64fbb['push'](_0xf64fbb['shift']());}}}(a65_0x8b2c,0xaa3e0));function a65_0x4e34(_0x1273c9,_0x597dab){const _0x8b2cc6=a65_0x8b2c();return a65_0x4e34=function(_0x4e34c2,_0x156a0e){_0x4e34c2=_0x4e34c2-0x89;let _0x21ff56=_0x8b2cc6[_0x4e34c2];return _0x21ff56;},a65_0x4e34(_0x1273c9,_0x597dab);}import{Chalk}from'chalk';export function shouldUseColor(_0x213858={}){const _0x592fb2=a65_0x4e34;if(_0x213858[_0x592fb2(0x8f)]===!![])return![];if(_0x213858['color']===!![])return!![];if(process[_0x592fb2(0x98)][_0x592fb2(0xa1)]!==undefined)return![];return process[_0x592fb2(0xa2)][_0x592fb2(0xa6)]??![];}export function getChalk(_0x364bdc={}){if(shouldUseColor(_0x364bdc))return new Chalk({'level':0x3});return new Chalk({'level':0x0});}export function colorBorder(_0x570924,_0x21955b={}){const _0x2d0220=a65_0x4e34;return getChalk(_0x21955b)[_0x2d0220(0x9b)](_0x570924);}function a65_0x8b2c(){const _0x1c37ec=['string','join','env','length','3296530lKOUDk','dim','entries','8TCsCOf','blue','cyan','3686031hrtSRx','NO_COLOR','stdout','1590828LVGPBq','stringify','16SCjMEp','isTTY','9500afJDuz','3416864gHPiKO','object','boolean','repeat','200767lzzkZV','noColor','225198jLfvXG','green','null','map','isArray','number'];a65_0x8b2c=function(){return _0x1c37ec;};return a65_0x8b2c();}export function colorHeader(_0x11bc6f,_0x55678f={}){const _0x3d32e0=a65_0x4e34;return getChalk(_0x55678f)[_0x3d32e0(0x9f)](_0x11bc6f);}export function colorType(_0x20f0dd,_0x13d8ff={}){const _0x3bb6e7=a65_0x4e34;return getChalk(_0x13d8ff)[_0x3bb6e7(0x9b)](_0x20f0dd);}export function colorJSONKey(_0x41bf67,_0x1bd073={}){const _0x477a46=a65_0x4e34;return getChalk(_0x1bd073)[_0x477a46(0x9e)](_0x41bf67);}export function colorJSONString(_0x4f040b,_0x39c384={}){const _0x260ec7=a65_0x4e34;return getChalk(_0x39c384)[_0x260ec7(0x91)](_0x4f040b);}export function colorJSONNumber(_0xae405f,_0x9faa9a={}){const _0xe9b100=a65_0x4e34;return getChalk(_0x9faa9a)[_0xe9b100(0x9f)](_0xae405f);}export function colorJSONBoolean(_0xec0ad,_0x2cbf40={}){return getChalk(_0x2cbf40)['yellow'](_0xec0ad);}export function colorJSONNull(_0x2cbfe2,_0x27f683={}){const _0x5648d2=a65_0x4e34;return getChalk(_0x27f683)[_0x5648d2(0x9b)](_0x2cbfe2);}export function colorizeJSONCompact(_0x477659,_0x503b72={}){const _0x3539af=a65_0x4e34;if(!shouldUseColor(_0x503b72))return JSON['stringify'](_0x477659);if(_0x477659===null)return colorJSONNull(_0x3539af(0x92),_0x503b72);if(typeof _0x477659===_0x3539af(0x8c))return colorJSONBoolean(String(_0x477659),_0x503b72);if(typeof _0x477659==='number')return colorJSONNumber(String(_0x477659),_0x503b72);if(typeof _0x477659==='string')return colorJSONString(JSON['stringify'](_0x477659),_0x503b72);if(Array[_0x3539af(0x94)](_0x477659)){if(_0x477659['length']===0x0)return'[]';const _0x5a7429=_0x477659[_0x3539af(0x93)](_0x26d228=>colorizeJSONCompact(_0x26d228,_0x503b72));return'['+_0x5a7429[_0x3539af(0x97)](',')+']';}if(typeof _0x477659===_0x3539af(0x8b)){const _0x1608fb=Object[_0x3539af(0x9c)](_0x477659);if(_0x1608fb['length']===0x0)return'{}';const _0x276ace=_0x1608fb[_0x3539af(0x93)](([_0xf2085,_0x5c4a8f])=>{const _0x2f4e8a=_0x3539af,_0x16d373=colorJSONKey(JSON[_0x2f4e8a(0xa4)](_0xf2085),_0x503b72),_0x188fe2=colorizeJSONCompact(_0x5c4a8f,_0x503b72);return _0x16d373+':'+_0x188fe2;});return'{'+_0x276ace[_0x3539af(0x97)](',')+'}';}return String(_0x477659);}export function colorizeJSON(_0x31a98e,_0x1a6fa6={},_0x5625ff=0x0){const _0x4f0f63=a65_0x4e34;if(!shouldUseColor(_0x1a6fa6))return JSON['stringify'](_0x31a98e,null,0x2);const _0x46f2ce='\x20'['repeat'](_0x5625ff),_0x312d76=_0x5625ff+0x2;if(_0x31a98e===null)return colorJSONNull('null',_0x1a6fa6);if(typeof _0x31a98e===_0x4f0f63(0x8c))return colorJSONBoolean(String(_0x31a98e),_0x1a6fa6);if(typeof _0x31a98e===_0x4f0f63(0x95))return colorJSONNumber(String(_0x31a98e),_0x1a6fa6);if(typeof _0x31a98e===_0x4f0f63(0x96))return colorJSONString(JSON[_0x4f0f63(0xa4)](_0x31a98e),_0x1a6fa6);if(Array[_0x4f0f63(0x94)](_0x31a98e)){if(_0x31a98e[_0x4f0f63(0x99)]===0x0)return'[]';const _0x351359=_0x31a98e[_0x4f0f63(0x93)](_0x332637=>{const _0x3cd474=_0x4f0f63,_0x3b4746=colorizeJSON(_0x332637,_0x1a6fa6,_0x312d76);return''+'\x20'[_0x3cd474(0x8d)](_0x312d76)+_0x3b4746;});return'[\x0a'+_0x351359[_0x4f0f63(0x97)](',\x0a')+('\x0a'+_0x46f2ce+']');}if(typeof _0x31a98e===_0x4f0f63(0x8b)){const _0x2ea061=Object[_0x4f0f63(0x9c)](_0x31a98e);if(_0x2ea061['length']===0x0)return'{}';const _0x8127c5=_0x2ea061[_0x4f0f63(0x93)](([_0x3999e7,_0xc81946])=>{const _0x1f8174=_0x4f0f63,_0x29f2a4=colorJSONKey(JSON['stringify'](_0x3999e7),_0x1a6fa6),_0x14b2b9=colorizeJSON(_0xc81946,_0x1a6fa6,_0x312d76);return''+'\x20'[_0x1f8174(0x8d)](_0x312d76)+_0x29f2a4+':\x20'+_0x14b2b9;});return'{\x0a'+_0x8127c5[_0x4f0f63(0x97)](',\x0a')+('\x0a'+_0x46f2ce+'}');}return String(_0x31a98e);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x47f84d,_0x2e871e){const _0xc40ceb=a66_0x35da,_0x915a66=_0x47f84d();while(!![]){try{const _0x5472df=-parseInt(_0xc40ceb(0x1b0))/0x1+-parseInt(_0xc40ceb(0x1b2))/0x2*(parseInt(_0xc40ceb(0x196))/0x3)+-parseInt(_0xc40ceb(0x19c))/0x4+parseInt(_0xc40ceb(0x1af))/0x5*(parseInt(_0xc40ceb(0x179))/0x6)+-parseInt(_0xc40ceb(0x1a3))/0x7*(parseInt(_0xc40ceb(0x1b8))/0x8)+parseInt(_0xc40ceb(0x175))/0x9*(-parseInt(_0xc40ceb(0x19e))/0xa)+parseInt(_0xc40ceb(0x176))/0xb;if(_0x5472df===_0x2e871e)break;else _0x915a66['push'](_0x915a66['shift']());}catch(_0x3c4be2){_0x915a66['push'](_0x915a66['shift']());}}}(a66_0x2144,0x476e1));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'./format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';function a66_0x2144(){const _0x1aa454=['[Object]','keys','-FXRSn','stringify','1255BZzIsL','551924srONeL','length','378722FNAfXB','pipe','forEach','isTTY','red','cmdout','74416jWdbBI','number','5310vqUlEG','30175288HGoNPX','limit','No\x20data','654InuLfu','repeat','jsonl','bigint','color','padEnd','FINISHED','filter','format','write','boolean','debug','log','table','output','cyan','stdout','Results\x20saved\x20to\x20','map','─┬─','magenta','stdin','max','stderr','split','entries','bold','params','join','9THUdji','error','object','[logs]','resolve','trim','1467364myymHo','inherit','7970tpCgOt','push','json','isInteger','[query]','392iwTtil','blue','tsv','varchar','sdk-result','[rule]','noColor','[params]'];a66_0x2144=function(){return _0x1aa454;};return a66_0x2144();}import a66_0x1245ac from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'./formatters.js';export function parseOutputOptions(_0x158c81){const _0x45c688=a66_0x35da;return{'format':_0x158c81[_0x45c688(0x181)]||_0x45c688(0x186),'output':_0x158c81[_0x45c688(0x187)]||'','limit':_0x158c81[_0x45c688(0x177)],'color':_0x158c81[_0x45c688(0x17d)],'noColor':_0x158c81[_0x45c688(0x1a9)]};}function convertSDKResultToQueryResult(_0x29b93a){const _0x2995ee=a66_0x35da,_0x1f9fc6=[];if(_0x29b93a[_0x2995ee(0x1b1)]>0x0){const _0xf6cfde=_0x29b93a[0x0];for(const [_0x187dfb,_0x282e9f]of Object[_0x2995ee(0x192)](_0xf6cfde)){let _0x24e3e0=_0x2995ee(0x1a6);if(typeof _0x282e9f===_0x2995ee(0x1b9))_0x24e3e0=Number[_0x2995ee(0x1a1)](_0x282e9f)?_0x2995ee(0x17c):'double';else{if(typeof _0x282e9f===_0x2995ee(0x183))_0x24e3e0='boolean';else _0x282e9f===null&&(_0x24e3e0='varchar');}_0x1f9fc6[_0x2995ee(0x19f)]({'name':_0x187dfb,'type':_0x24e3e0});}}return{'queryId':_0x2995ee(0x1a7),'columns':_0x1f9fc6,'data':_0x29b93a,'stats':{'state':_0x2995ee(0x17f),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x29b93a[_0x2995ee(0x1b1)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x3908e0,_0x5ab678){const _0x5bfef0=convertSDKResultToQueryResult(_0x3908e0);return formatQueryOutput(_0x5bfef0,_0x5ab678);}function a66_0x35da(_0x20c7ba,_0x3ca795){const _0x2144cc=a66_0x2144();return a66_0x35da=function(_0x35da01,_0x2c5121){_0x35da01=_0x35da01-0x175;let _0x42d3f8=_0x2144cc[_0x35da01];return _0x42d3f8;},a66_0x35da(_0x20c7ba,_0x3ca795);}export async function formatQueryOutput(_0x283652,_0x47d48d){const _0x5ceff3=a66_0x35da,{format:_0x4eda3b,limit:_0x23f04d,output:_0x55d4a2,color:_0x4ebb7a,noColor:_0x493a26}=_0x47d48d,_0x567771=Boolean(_0x55d4a2)&&!_0x4ebb7a,_0x192181={'color':_0x4ebb7a,'noColor':_0x493a26||_0x567771};if(_0x4eda3b===_0x5ceff3(0x186)){const _0x3fb8b2=shouldUseLess(_0x4eda3b,_0x55d4a2);return formatAsTable(_0x283652,_0x23f04d,_0x3fb8b2,_0x192181);}else{if(_0x4eda3b===_0x5ceff3(0x1a0))return formatAsJSON(_0x283652,_0x192181);else return _0x4eda3b==='jsonl'?formatAsJSONL(_0x283652,_0x192181):formatQueryResult(_0x283652,_0x4eda3b);}}function shouldUseLess(_0x5f1524,_0x466590){const _0x7c9ce7=a66_0x35da;return _0x5f1524==='table'&&process[_0x7c9ce7(0x189)][_0x7c9ce7(0x1b5)]&&!_0x466590;}export function resolveOutputOptions(_0x1bbe57){const _0x136393=a66_0x35da,_0x1470ae=resolveOutputFormat(_0x1bbe57[_0x136393(0x181)],_0x1bbe57[_0x136393(0x187)],_0x136393(0x186));let _0x31c94c=typeof _0x1bbe57['limit']===_0x136393(0x1b9)?_0x1bbe57[_0x136393(0x177)]:parseInt(_0x1bbe57['limit']||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0x7a0a4e=_0x1bbe57[_0x136393(0x187)]||'';return shouldUseLess(_0x1470ae,_0x7a0a4e)&&(_0x31c94c=Infinity),{'format':_0x1470ae,'output':_0x7a0a4e,'limit':_0x31c94c,'color':_0x1bbe57[_0x136393(0x17d)],'noColor':_0x1bbe57[_0x136393(0x1a9)]};}export function writeOutput(_0x3e7182,_0x2b3540,_0x3726d9){const _0x3f5546=a66_0x35da;return _0x2b3540?(writeFileSync(_0x2b3540,_0x3e7182),console[_0x3f5546(0x197)](_0x3f5546(0x18a)+_0x2b3540),Promise[_0x3f5546(0x19a)]()):shouldUseLess(_0x3726d9||'','')?new Promise(_0x428fd8=>{const _0x330d4c=_0x3f5546,_0x362dc4=spawn('less',[_0x330d4c(0x1ad)],{'stdio':[_0x330d4c(0x1b3),_0x330d4c(0x19d),_0x330d4c(0x19d)]});let _0x2a00c9=![];_0x362dc4['on'](_0x330d4c(0x197),()=>{const _0xc7dfb5=_0x330d4c;!_0x2a00c9&&(_0x2a00c9=!![],console[_0xc7dfb5(0x185)](_0x3e7182),_0x428fd8());}),_0x362dc4['on']('close',()=>{!_0x2a00c9&&(_0x2a00c9=!![],_0x428fd8());}),_0x362dc4['on']('spawn',()=>{const _0x5e9984=_0x330d4c;!_0x2a00c9&&_0x362dc4[_0x5e9984(0x18e)]&&(_0x362dc4[_0x5e9984(0x18e)]['on'](_0x5e9984(0x197),()=>{}),_0x362dc4[_0x5e9984(0x18e)][_0x5e9984(0x182)](_0x3e7182),_0x362dc4['stdin']['end']());}),!_0x362dc4['stdin']&&(!_0x2a00c9&&(_0x2a00c9=!![],console[_0x330d4c(0x185)](_0x3e7182),_0x428fd8()));}):(console[_0x3f5546(0x185)](_0x3e7182),Promise[_0x3f5546(0x19a)]());}export async function handleSDKOutput(_0x2e8800,_0x47df7c){const _0x199e60=resolveOutputOptions(_0x47df7c),_0x35e330=await formatSDKOutput(_0x2e8800,_0x199e60);await writeOutput(_0x35e330,_0x199e60['output']||undefined,_0x199e60['format']);}export async function handleQueryOutput(_0x181892,_0x379183){const _0x49e060=a66_0x35da,_0x40a219=resolveOutputOptions(_0x379183),_0x187c85=await formatQueryOutput(_0x181892,_0x40a219);await writeOutput(_0x187c85,_0x40a219[_0x49e060(0x187)]||undefined,_0x40a219[_0x49e060(0x181)]);}async function formatSingleObject(_0x18ee0e,_0x141458){const _0x4e6f61=a66_0x35da,{format:_0x59a3ff,color:_0x25c3f7,noColor:_0x14d051}=_0x141458,_0x431b15={'color':_0x25c3f7,'noColor':_0x14d051};if(_0x59a3ff==='json'){if(shouldUseColor(_0x431b15))return colorizeJSON(_0x18ee0e,_0x431b15);return JSON['stringify'](_0x18ee0e,null,0x2);}else{if(_0x59a3ff===_0x4e6f61(0x17b)){if(shouldUseColor(_0x431b15))return colorizeJSONCompact(_0x18ee0e,_0x431b15);return JSON[_0x4e6f61(0x1ae)](_0x18ee0e);}else{if(_0x59a3ff===_0x4e6f61(0x1a5))return Object[_0x4e6f61(0x192)](_0x18ee0e)[_0x4e6f61(0x18b)](([_0x6158fd,_0x381160])=>_0x6158fd+'\x09'+_0x381160)[_0x4e6f61(0x195)]('\x0a');else{const _0x130c26=Object[_0x4e6f61(0x192)](_0x18ee0e);if(_0x130c26[_0x4e6f61(0x1b1)]===0x0)return _0x4e6f61(0x178);const _0x7168f3=_0x18ee0e[_0x4e6f61(0x184)],_0xb24ac9=_0x18ee0e['query'],_0x2f3d13=_0x18ee0e[_0x4e6f61(0x194)],_0x3fc3ee=_0x18ee0e['rule'],_0x31b624=_0xb24ac9?typeof _0xb24ac9==='string'?_0xb24ac9:JSON[_0x4e6f61(0x1ae)](_0xb24ac9,null,0x2):undefined,_0xdee4da=_0x2f3d13&&Object[_0x4e6f61(0x1ac)](_0x2f3d13)[_0x4e6f61(0x1b1)]>0x0?JSON['stringify'](_0x2f3d13,null,0x2):undefined,_0x223cb0=_0x3fc3ee&&Object[_0x4e6f61(0x1ac)](_0x3fc3ee)[_0x4e6f61(0x1b1)]>0x0?JSON[_0x4e6f61(0x1ae)](_0x3fc3ee,null,0x2):undefined,_0x3d74fe=_0x130c26[_0x4e6f61(0x180)](([_0x2ba72f])=>_0x2ba72f!==_0x4e6f61(0x184)&&_0x2ba72f!=='query'&&_0x2ba72f!==_0x4e6f61(0x194)&&_0x2ba72f!=='rule'),_0x4f7de1=Math['max'](..._0x3d74fe[_0x4e6f61(0x18b)](([_0x49f9b9])=>_0x49f9b9['length'])),_0x25f501=Math['max'](..._0x3d74fe['map'](([,_0x2afe98])=>{const _0x390752=_0x4e6f61;try{const _0x3bbf5d=_0x2afe98===null||_0x2afe98===undefined?'':typeof _0x2afe98===_0x390752(0x198)?JSON[_0x390752(0x1ae)](_0x2afe98):String(_0x2afe98),_0x1265ae=_0x3bbf5d[_0x390752(0x191)]('\x0a');return Math[_0x390752(0x18f)](..._0x1265ae[_0x390752(0x18b)](_0xf9bc32=>_0xf9bc32['length']),0x0);}catch{return 0x0;}}),0x14),_0x169fcd=[];_0x169fcd[_0x4e6f61(0x19f)](colorBorder('┌─'+'─'[_0x4e6f61(0x17a)](_0x4f7de1)+_0x4e6f61(0x18c)+'─'['repeat'](_0x25f501)+'─┐',_0x431b15)),_0x3d74fe['forEach'](([_0x3e1606,_0x525c5e])=>{const _0x5858c9=_0x4e6f61;let _0x409fbf;try{_0x409fbf=_0x525c5e===null||_0x525c5e===undefined?'':typeof _0x525c5e===_0x5858c9(0x198)?JSON[_0x5858c9(0x1ae)](_0x525c5e):String(_0x525c5e);}catch{_0x409fbf=_0x5858c9(0x1ab);}const _0x12de69=_0x3e1606[_0x5858c9(0x17e)](_0x4f7de1),_0x2ac716=_0x409fbf[_0x5858c9(0x191)]('\x0a');_0x2ac716['forEach']((_0x4e2afe,_0x4056bb)=>{const _0x46b77a=_0x5858c9,_0x5f2a57=colorBorder('│',_0x431b15);_0x4056bb===0x0?_0x169fcd[_0x46b77a(0x19f)](_0x5f2a57+'\x20'+_0x12de69+'\x20'+_0x5f2a57+'\x20'+_0x4e2afe[_0x46b77a(0x17e)](_0x25f501)+'\x20'+_0x5f2a57):_0x169fcd[_0x46b77a(0x19f)](_0x5f2a57+'\x20'+'\x20'[_0x46b77a(0x17a)](_0x4f7de1)+'\x20'+_0x5f2a57+'\x20'+_0x4e2afe[_0x46b77a(0x17e)](_0x25f501)+'\x20'+_0x5f2a57);});}),_0x169fcd[_0x4e6f61(0x19f)](colorBorder('└─'+'─'[_0x4e6f61(0x17a)](_0x4f7de1)+'─┴─'+'─'[_0x4e6f61(0x17a)](_0x25f501)+'─┘',_0x431b15));_0x31b624&&(_0x169fcd[_0x4e6f61(0x19f)](''),_0x169fcd[_0x4e6f61(0x19f)](String(a66_0x1245ac['yellow'][_0x4e6f61(0x193)](_0x4e6f61(0x1a2)))),_0x169fcd[_0x4e6f61(0x19f)](_0x31b624));_0xdee4da&&(_0x169fcd['push'](''),_0x169fcd[_0x4e6f61(0x19f)](String(a66_0x1245ac[_0x4e6f61(0x1a4)][_0x4e6f61(0x193)](_0x4e6f61(0x1aa)))),_0x169fcd[_0x4e6f61(0x19f)](_0xdee4da));_0x223cb0&&(_0x169fcd['push'](''),_0x169fcd[_0x4e6f61(0x19f)](String(a66_0x1245ac[_0x4e6f61(0x18d)][_0x4e6f61(0x193)](_0x4e6f61(0x1a8)))),_0x169fcd['push'](_0x223cb0));if(_0x7168f3){if(_0x7168f3['stderr']){_0x169fcd[_0x4e6f61(0x19f)](''),_0x169fcd[_0x4e6f61(0x19f)](String(a66_0x1245ac[_0x4e6f61(0x1b6)][_0x4e6f61(0x193)]('[error]')));const _0x32b68b=_0x7168f3[_0x4e6f61(0x190)][_0x4e6f61(0x191)]('\x0a');_0x32b68b[_0x4e6f61(0x1b4)](_0x30b92d=>{const _0x343b45=_0x4e6f61;_0x30b92d[_0x343b45(0x19b)]()&&_0x169fcd[_0x343b45(0x19f)](_0x30b92d);});}if(_0x7168f3[_0x4e6f61(0x1b7)]){_0x169fcd[_0x4e6f61(0x19f)](''),_0x169fcd[_0x4e6f61(0x19f)](String(a66_0x1245ac[_0x4e6f61(0x188)][_0x4e6f61(0x193)](_0x4e6f61(0x199))));const _0x24b366=_0x7168f3[_0x4e6f61(0x1b7)][_0x4e6f61(0x191)]('\x0a');_0x24b366[_0x4e6f61(0x1b4)](_0x2b61b8=>{const _0x2a9d6f=_0x4e6f61;_0x2b61b8[_0x2a9d6f(0x19b)]()&&_0x169fcd[_0x2a9d6f(0x19f)](_0x2b61b8);});}}return _0x169fcd['join']('\x0a');}}}}export async function handleSingleObjectOutput(_0x4ee1b2,_0x4fdf95){const _0x34b819=a66_0x35da,_0x57997b=resolveOutputOptions(_0x4fdf95),_0x49a561=await formatSingleObject(_0x4ee1b2,_0x57997b);await writeOutput(_0x49a561,_0x57997b[_0x34b819(0x187)]||undefined,_0x57997b[_0x34b819(0x181)]);}
|
|
1
|
+
(function(_0x49dbe4,_0x7d83d2){const _0x5bac76=a66_0x5688,_0x4195e9=_0x49dbe4();while(!![]){try{const _0x1e6280=parseInt(_0x5bac76(0x1bf))/0x1*(parseInt(_0x5bac76(0x1c3))/0x2)+parseInt(_0x5bac76(0x1d9))/0x3+parseInt(_0x5bac76(0x1c4))/0x4*(-parseInt(_0x5bac76(0x1e2))/0x5)+-parseInt(_0x5bac76(0x1b9))/0x6*(-parseInt(_0x5bac76(0x1ad))/0x7)+-parseInt(_0x5bac76(0x1da))/0x8+-parseInt(_0x5bac76(0x1b6))/0x9+parseInt(_0x5bac76(0x1ce))/0xa*(parseInt(_0x5bac76(0x1df))/0xb);if(_0x1e6280===_0x7d83d2)break;else _0x4195e9['push'](_0x4195e9['shift']());}catch(_0x3a4cda){_0x4195e9['push'](_0x4195e9['shift']());}}}(a66_0x188c,0x3a51f));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'./format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';import a66_0x39f695 from'chalk';import{DEFAULT_DISPLAY_LIMIT}from'./constants.js';function a66_0x188c(){const _0x113ff3=['noColor','entries','FINISHED','stdout','[logs]','varchar','close','query','length','map','168234gWoFgS','3002000HQyzif','log','end','color','rule','319Diwihj','sdk-result','[rule]','1686050XkHnQa','blue','number','bold','stderr','trim','red','isInteger','isTTY','forEach','stdin','keys','boolean','error','stringify','max','Results\x20saved\x20to\x20','[params]','push','string','inherit','1554259CBxcyP','yellow','padEnd','resolve','output','cyan','double','jsonl','split','664047zAGvTN','format','tsv','6JyZLwT','table','[error]','pipe','filter','debug','49983WtpNZV','limit','json','spawn','14FHeMcD','4TKiWAU','bigint','object','repeat','params','-FXRSn','─┬─','cmdout','No\x20data','join','136940hWRrmP'];a66_0x188c=function(){return _0x113ff3;};return a66_0x188c();}import{formatAsTable,formatAsJSON,formatAsJSONL,formatQueryResult}from'./formatters.js';export function parseOutputOptions(_0x108144){const _0x594d51=a66_0x5688;return{'format':_0x108144[_0x594d51(0x1b7)]||_0x594d51(0x1ba),'output':_0x108144['output']||'','limit':_0x108144[_0x594d51(0x1c0)],'color':_0x108144[_0x594d51(0x1dd)],'noColor':_0x108144[_0x594d51(0x1cf)]};}function convertSDKResultToQueryResult(_0x1f24c4){const _0x678ad3=a66_0x5688,_0x2f5159=[];if(_0x1f24c4[_0x678ad3(0x1d7)]>0x0){const _0x5beaf0=_0x1f24c4[0x0];for(const [_0x5c7cbb,_0x1e9f17]of Object[_0x678ad3(0x1d0)](_0x5beaf0)){let _0x3e3be9=_0x678ad3(0x1d4);if(typeof _0x1e9f17===_0x678ad3(0x1e4))_0x3e3be9=Number[_0x678ad3(0x1e9)](_0x1e9f17)?_0x678ad3(0x1c5):_0x678ad3(0x1b3);else{if(typeof _0x1e9f17==='boolean')_0x3e3be9=_0x678ad3(0x1ee);else _0x1e9f17===null&&(_0x3e3be9=_0x678ad3(0x1d4));}_0x2f5159[_0x678ad3(0x1f4)]({'name':_0x5c7cbb,'type':_0x3e3be9});}}return{'queryId':_0x678ad3(0x1e0),'columns':_0x2f5159,'data':_0x1f24c4,'stats':{'state':_0x678ad3(0x1d1),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x1f24c4[_0x678ad3(0x1d7)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x24dde4,_0x478530){const _0x1ee0be=convertSDKResultToQueryResult(_0x24dde4);return formatQueryOutput(_0x1ee0be,_0x478530);}export async function formatQueryOutput(_0x29ca65,_0x5e5d9c){const _0x30453b=a66_0x5688,{format:_0x276b29,limit:_0xd47267,output:_0x4bebb1,color:_0x1c2d53,noColor:_0x5379da}=_0x5e5d9c,_0x184fe5=Boolean(_0x4bebb1)&&!_0x1c2d53,_0x30a22f={'color':_0x1c2d53,'noColor':_0x5379da||_0x184fe5};if(_0x276b29==='table'){const _0x2b5839=shouldUseLess(_0x276b29,_0x4bebb1);return formatAsTable(_0x29ca65,_0xd47267,_0x2b5839,_0x30a22f);}else{if(_0x276b29===_0x30453b(0x1c1))return formatAsJSON(_0x29ca65,_0x30a22f);else return _0x276b29===_0x30453b(0x1b4)?formatAsJSONL(_0x29ca65,_0x30a22f):formatQueryResult(_0x29ca65,_0x276b29);}}function shouldUseLess(_0x29fb7b,_0x4750fd){const _0x1311a6=a66_0x5688;return _0x29fb7b===_0x1311a6(0x1ba)&&process[_0x1311a6(0x1d2)][_0x1311a6(0x1ea)]&&!_0x4750fd;}export function resolveOutputOptions(_0x573aee){const _0x342242=a66_0x5688,_0x4d4543=resolveOutputFormat(_0x573aee[_0x342242(0x1b7)],_0x573aee['output'],_0x342242(0x1ba));let _0xf9b242=typeof _0x573aee[_0x342242(0x1c0)]===_0x342242(0x1e4)?_0x573aee[_0x342242(0x1c0)]:parseInt(_0x573aee['limit']||String(DEFAULT_DISPLAY_LIMIT),0xa);const _0x387be7=_0x573aee[_0x342242(0x1b1)]||'';return shouldUseLess(_0x4d4543,_0x387be7)&&(_0xf9b242=Infinity),{'format':_0x4d4543,'output':_0x387be7,'limit':_0xf9b242,'color':_0x573aee[_0x342242(0x1dd)],'noColor':_0x573aee[_0x342242(0x1cf)]};}export function writeOutput(_0x160d2b,_0x17bbbe,_0x2f2fe2){const _0x22fac3=a66_0x5688;return _0x17bbbe?(writeFileSync(_0x17bbbe,_0x160d2b),console[_0x22fac3(0x1ef)](_0x22fac3(0x1f2)+_0x17bbbe),Promise[_0x22fac3(0x1b0)]()):shouldUseLess(_0x2f2fe2||'','')?new Promise(_0x4c6521=>{const _0x41cdd6=_0x22fac3,_0x4d4753=spawn('less',[_0x41cdd6(0x1c9)],{'stdio':[_0x41cdd6(0x1bc),'inherit',_0x41cdd6(0x1ac)]});let _0x3aa889=![];_0x4d4753['on']('error',()=>{!_0x3aa889&&(_0x3aa889=!![],console['log'](_0x160d2b),_0x4c6521());}),_0x4d4753['on'](_0x41cdd6(0x1d5),()=>{!_0x3aa889&&(_0x3aa889=!![],_0x4c6521());}),_0x4d4753['on'](_0x41cdd6(0x1c2),()=>{const _0x3fce32=_0x41cdd6;!_0x3aa889&&_0x4d4753[_0x3fce32(0x1ec)]&&(_0x4d4753[_0x3fce32(0x1ec)]['on'](_0x3fce32(0x1ef),()=>{}),_0x4d4753['stdin']['write'](_0x160d2b),_0x4d4753[_0x3fce32(0x1ec)][_0x3fce32(0x1dc)]());}),!_0x4d4753[_0x41cdd6(0x1ec)]&&(!_0x3aa889&&(_0x3aa889=!![],console[_0x41cdd6(0x1db)](_0x160d2b),_0x4c6521()));}):(console[_0x22fac3(0x1db)](_0x160d2b),Promise[_0x22fac3(0x1b0)]());}export async function handleSDKOutput(_0x445136,_0x4eb415){const _0x18735a=a66_0x5688,_0x321615=resolveOutputOptions(_0x4eb415),_0x3a7807=await formatSDKOutput(_0x445136,_0x321615);await writeOutput(_0x3a7807,_0x321615[_0x18735a(0x1b1)]||undefined,_0x321615['format']);}export async function handleQueryOutput(_0x5cdd28,_0x3a3b51){const _0x160fb7=a66_0x5688,_0x3904c4=resolveOutputOptions(_0x3a3b51),_0x48ffdd=await formatQueryOutput(_0x5cdd28,_0x3904c4);await writeOutput(_0x48ffdd,_0x3904c4[_0x160fb7(0x1b1)]||undefined,_0x3904c4[_0x160fb7(0x1b7)]);}async function formatSingleObject(_0x3b4029,_0x568d90){const _0x54e2da=a66_0x5688,{format:_0x415ec7,color:_0xd6d3d6,noColor:_0x1fdd60}=_0x568d90,_0x3d763a={'color':_0xd6d3d6,'noColor':_0x1fdd60};if(_0x415ec7==='json'){if(shouldUseColor(_0x3d763a))return colorizeJSON(_0x3b4029,_0x3d763a);return JSON['stringify'](_0x3b4029,null,0x2);}else{if(_0x415ec7===_0x54e2da(0x1b4)){if(shouldUseColor(_0x3d763a))return colorizeJSONCompact(_0x3b4029,_0x3d763a);return JSON['stringify'](_0x3b4029);}else{if(_0x415ec7===_0x54e2da(0x1b8))return Object[_0x54e2da(0x1d0)](_0x3b4029)['map'](([_0x422483,_0x395fea])=>_0x422483+'\x09'+_0x395fea)[_0x54e2da(0x1cd)]('\x0a');else{const _0x21d82f=Object['entries'](_0x3b4029);if(_0x21d82f[_0x54e2da(0x1d7)]===0x0)return _0x54e2da(0x1cc);const _0xa3df51=_0x3b4029[_0x54e2da(0x1be)],_0x2ba190=_0x3b4029['query'],_0x57277e=_0x3b4029[_0x54e2da(0x1c8)],_0x27e82a=_0x3b4029[_0x54e2da(0x1de)],_0x26fac0=_0x2ba190?typeof _0x2ba190===_0x54e2da(0x1f5)?_0x2ba190:JSON[_0x54e2da(0x1f0)](_0x2ba190,null,0x2):undefined,_0x49b122=_0x57277e&&Object[_0x54e2da(0x1ed)](_0x57277e)['length']>0x0?JSON[_0x54e2da(0x1f0)](_0x57277e,null,0x2):undefined,_0x2d7d09=_0x27e82a&&Object[_0x54e2da(0x1ed)](_0x27e82a)[_0x54e2da(0x1d7)]>0x0?JSON[_0x54e2da(0x1f0)](_0x27e82a,null,0x2):undefined,_0x17755b=_0x21d82f[_0x54e2da(0x1bd)](([_0x3b94c5])=>_0x3b94c5!==_0x54e2da(0x1be)&&_0x3b94c5!==_0x54e2da(0x1d6)&&_0x3b94c5!==_0x54e2da(0x1c8)&&_0x3b94c5!==_0x54e2da(0x1de)),_0x359f14=Math[_0x54e2da(0x1f1)](..._0x17755b[_0x54e2da(0x1d8)](([_0x24e6c1])=>_0x24e6c1[_0x54e2da(0x1d7)])),_0x2937de=Math['max'](..._0x17755b[_0x54e2da(0x1d8)](([,_0x9f6596])=>{const _0x593a2f=_0x54e2da;try{const _0x17ea53=_0x9f6596===null||_0x9f6596===undefined?'':typeof _0x9f6596===_0x593a2f(0x1c6)?JSON[_0x593a2f(0x1f0)](_0x9f6596):String(_0x9f6596),_0x3c86a0=_0x17ea53['split']('\x0a');return Math[_0x593a2f(0x1f1)](..._0x3c86a0['map'](_0x2865fb=>_0x2865fb[_0x593a2f(0x1d7)]),0x0);}catch{return 0x0;}}),0x14),_0x164f05=[];_0x164f05[_0x54e2da(0x1f4)](colorBorder('┌─'+'─'['repeat'](_0x359f14)+_0x54e2da(0x1ca)+'─'[_0x54e2da(0x1c7)](_0x2937de)+'─┐',_0x3d763a)),_0x17755b[_0x54e2da(0x1eb)](([_0x567fec,_0x41bc48])=>{const _0xfc0b40=_0x54e2da;let _0x4d20e2;try{_0x4d20e2=_0x41bc48===null||_0x41bc48===undefined?'':typeof _0x41bc48===_0xfc0b40(0x1c6)?JSON[_0xfc0b40(0x1f0)](_0x41bc48):String(_0x41bc48);}catch{_0x4d20e2='[Object]';}const _0x177790=_0x567fec[_0xfc0b40(0x1af)](_0x359f14),_0x25dfa7=_0x4d20e2['split']('\x0a');_0x25dfa7['forEach']((_0x3586ba,_0xe081b7)=>{const _0x59e8dc=_0xfc0b40,_0x5acdcb=colorBorder('│',_0x3d763a);_0xe081b7===0x0?_0x164f05[_0x59e8dc(0x1f4)](_0x5acdcb+'\x20'+_0x177790+'\x20'+_0x5acdcb+'\x20'+_0x3586ba[_0x59e8dc(0x1af)](_0x2937de)+'\x20'+_0x5acdcb):_0x164f05['push'](_0x5acdcb+'\x20'+'\x20'[_0x59e8dc(0x1c7)](_0x359f14)+'\x20'+_0x5acdcb+'\x20'+_0x3586ba[_0x59e8dc(0x1af)](_0x2937de)+'\x20'+_0x5acdcb);});}),_0x164f05['push'](colorBorder('└─'+'─'['repeat'](_0x359f14)+'─┴─'+'─'[_0x54e2da(0x1c7)](_0x2937de)+'─┘',_0x3d763a));_0x26fac0&&(_0x164f05[_0x54e2da(0x1f4)](''),_0x164f05[_0x54e2da(0x1f4)](String(a66_0x39f695[_0x54e2da(0x1ae)][_0x54e2da(0x1e5)]('[query]'))),_0x164f05['push'](_0x26fac0));_0x49b122&&(_0x164f05[_0x54e2da(0x1f4)](''),_0x164f05['push'](String(a66_0x39f695[_0x54e2da(0x1e3)][_0x54e2da(0x1e5)](_0x54e2da(0x1f3)))),_0x164f05[_0x54e2da(0x1f4)](_0x49b122));_0x2d7d09&&(_0x164f05[_0x54e2da(0x1f4)](''),_0x164f05[_0x54e2da(0x1f4)](String(a66_0x39f695['magenta']['bold'](_0x54e2da(0x1e1)))),_0x164f05[_0x54e2da(0x1f4)](_0x2d7d09));if(_0xa3df51){if(_0xa3df51[_0x54e2da(0x1e6)]){_0x164f05[_0x54e2da(0x1f4)](''),_0x164f05['push'](String(a66_0x39f695[_0x54e2da(0x1e8)][_0x54e2da(0x1e5)](_0x54e2da(0x1bb))));const _0x3d7176=_0xa3df51[_0x54e2da(0x1e6)][_0x54e2da(0x1b5)]('\x0a');_0x3d7176[_0x54e2da(0x1eb)](_0x312db5=>{const _0x24a36e=_0x54e2da;_0x312db5[_0x24a36e(0x1e7)]()&&_0x164f05[_0x24a36e(0x1f4)](_0x312db5);});}if(_0xa3df51[_0x54e2da(0x1cb)]){_0x164f05[_0x54e2da(0x1f4)](''),_0x164f05[_0x54e2da(0x1f4)](String(a66_0x39f695[_0x54e2da(0x1b2)][_0x54e2da(0x1e5)](_0x54e2da(0x1d3))));const _0x5672a9=_0xa3df51[_0x54e2da(0x1cb)][_0x54e2da(0x1b5)]('\x0a');_0x5672a9[_0x54e2da(0x1eb)](_0x1e5dc4=>{const _0x57b940=_0x54e2da;_0x1e5dc4[_0x57b940(0x1e7)]()&&_0x164f05[_0x57b940(0x1f4)](_0x1e5dc4);});}}return _0x164f05[_0x54e2da(0x1cd)]('\x0a');}}}}function a66_0x5688(_0x31573b,_0x230f19){const _0x188cea=a66_0x188c();return a66_0x5688=function(_0x568825,_0x28aef9){_0x568825=_0x568825-0x1ac;let _0x19e182=_0x188cea[_0x568825];return _0x19e182;},a66_0x5688(_0x31573b,_0x230f19);}export async function handleSingleObjectOutput(_0x59efab,_0x44a91f){const _0x4ff4ad=a66_0x5688,_0x201714=resolveOutputOptions(_0x44a91f),_0x1145b0=await formatSingleObject(_0x59efab,_0x201714);await writeOutput(_0x1145b0,_0x201714[_0x4ff4ad(0x1b1)]||undefined,_0x201714['format']);}
|
package/dist/utils/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2d4d73,_0x2ff6da){const _0x129370=a67_0xbc82,_0xeada48=_0x2d4d73();while(!![]){try{const _0x2ab164=-parseInt(_0x129370(0xde))/0x1+-parseInt(_0x129370(0xe0))/0x2+-parseInt(_0x129370(0xdc))/0x3*(parseInt(_0x129370(0xd9))/0x4)+parseInt(_0x129370(0xdf))/0x5+-parseInt(_0x129370(0xe1))/0x6+-parseInt(_0x129370(0xdd))/0x7+parseInt(_0x129370(0xdb))/0x8;if(_0x2ab164===_0x2ff6da)break;else _0xeada48['push'](_0xeada48['shift']());}catch(_0x2d45a6){_0xeada48['push'](_0xeada48['shift']());}}}(a67_0x4062,0x3b750));export const DEFAULT_DISPLAY_LIMIT=0x28;function a67_0xbc82(_0x7afe65,_0x1e8209){const _0x4062e3=a67_0x4062();return a67_0xbc82=function(_0xbc82e7,_0x159d69){_0xbc82e7=_0xbc82e7-0xd9;let _0x21a850=_0x4062e3[_0xbc82e7];return _0x21a850;},a67_0xbc82(_0x7afe65,_0x1e8209);}export const DEFAULT_LISTING_LIMIT=0x2710;export const DEFAULT_LLM_LIMIT=0x32;export function resolveLimit(_0x2b6632,_0x3861a9){const _0xad8139=a67_0xbc82;if(_0x2b6632===undefined)return _0x3861a9;if(typeof _0x2b6632===_0xad8139(0xda))return _0x2b6632;return parseInt(_0x2b6632,0xa);}function a67_0x4062(){const _0x57d0c9=['2996392MIbYEa','61291vPJHTV','2301795WXismb','484032tPCtbm','2407854cZbirn','781384YCnlrp','number','8889560hhsVRo','3iNyDlH'];a67_0x4062=function(){return _0x57d0c9;};return a67_0x4062();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5f5907,_0x486b3d){const _0x3cabbf=a68_0x3645,_0x1dc8c0=_0x5f5907();while(!![]){try{const _0x38237b=-parseInt(_0x3cabbf(0x1db))/0x1+parseInt(_0x3cabbf(0x1e0))/0x2+parseInt(_0x3cabbf(0x1dd))/0x3+-parseInt(_0x3cabbf(0x1e3))/0x4*(-parseInt(_0x3cabbf(0x1d6))/0x5)+-parseInt(_0x3cabbf(0x1d2))/0x6+parseInt(_0x3cabbf(0x1df))/0x7+parseInt(_0x3cabbf(0x1d8))/0x8*(-parseInt(_0x3cabbf(0x1d5))/0x9);if(_0x38237b===_0x486b3d)break;else _0x1dc8c0['push'](_0x1dc8c0['shift']());}catch(_0x12b034){_0x1dc8c0['push'](_0x1dc8c0['shift']());}}}(a68_0xdce4,0x7cf73));import*as a68_0x586e7f from'node:fs';import*as a68_0x4796f2 from'node:path';export function setSecureFilePermissions(_0x4401bd){const _0x1053dc=a68_0x3645;try{a68_0x586e7f[_0x1053dc(0x1dc)](_0x4401bd,0x180);}catch{console[_0x1053dc(0x1d3)]('Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20'+_0x4401bd);}}export function setSecureDirectoryPermissions(_0x1354a8){const _0x5746e5=a68_0x3645;try{a68_0x586e7f[_0x5746e5(0x1dc)](_0x1354a8,0x1c0);}catch{console[_0x5746e5(0x1d3)](_0x5746e5(0x1d1)+_0x1354a8);}}function a68_0x3645(_0x11a1e1,_0x4ed065){const _0xdce474=a68_0xdce4();return a68_0x3645=function(_0x364558,_0x3ba284){_0x364558=_0x364558-0x1d0;let _0x4543e0=_0xdce474[_0x364558];return _0x4543e0;},a68_0x3645(_0x11a1e1,_0x4ed065);}export function createSecureDirectory(_0x5b314a){const _0x58442e=a68_0x3645;!a68_0x586e7f[_0x58442e(0x1e4)](_0x5b314a)&&(a68_0x586e7f[_0x58442e(0x1d9)](_0x5b314a,{'recursive':!![],'mode':0x1c0}),setSecureDirectoryPermissions(_0x5b314a));}function a68_0xdce4(){const _0x272355=['2783893CQdVlA','1698206nVZzdT','Warning:\x20','mode','2473652ABYvUm','existsSync','\x20has\x20insecure\x20permissions\x20(','Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20','545724zMaeQa','warn','writeFileSync','9vIGSpg','5pLoBVo','statSync','14183384XsymlO','mkdirSync','dirname','238708flZKjw','chmodSync','2247687zJdKtZ','Should\x20be\x200600\x20or\x20more\x20restrictive.'];a68_0xdce4=function(){return _0x272355;};return a68_0xdce4();}export function validateSecureFilePermissions(_0x2fd6cd){const _0x567d89=a68_0x3645;try{const _0x41dfe4=a68_0x586e7f[_0x567d89(0x1d7)](_0x2fd6cd),_0x35f308=_0x41dfe4[_0x567d89(0x1e2)]&0x1ff,_0xfa5026=(_0x35f308&0x3f)!==0x0;if(_0xfa5026)return console[_0x567d89(0x1d3)](_0x567d89(0x1e1)+_0x2fd6cd+_0x567d89(0x1d0)+_0x35f308['toString'](0x8)+').\x20'+_0x567d89(0x1de)),![];return!![];}catch{return!![];}}export function writeSecureFile(_0x153564,_0x76fd63){const _0x51ae52=a68_0x3645,_0x40eb8f=a68_0x4796f2[_0x51ae52(0x1da)](_0x153564);createSecureDirectory(_0x40eb8f),a68_0x586e7f[_0x51ae52(0x1d4)](_0x153564,_0x76fd63,{'mode':0x180}),setSecureFilePermissions(_0x153564);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a69_0x5229(){const _0x3fd5ee=['4QCBGTL','928277ieAbSw','table','18064STRtCS','518040qLhWFb','tsv','110BIIumF','toLowerCase','json','text','split','24GNldfY','68349QkMKby','357370cQHjZb','75AESkru','26Fuicwr','4978788sqshOZ','40VLkbHq','13059171vWVzYj'];a69_0x5229=function(){return _0x3fd5ee;};return a69_0x5229();}function a69_0x1584(_0x4ddfc6,_0x38b5e5){const _0x522984=a69_0x5229();return a69_0x1584=function(_0x15847a,_0x185f90){_0x15847a=_0x15847a-0x109;let _0x1d7b8c=_0x522984[_0x15847a];return _0x1d7b8c;},a69_0x1584(_0x4ddfc6,_0x38b5e5);}(function(_0xdf0646,_0x426076){const _0x11514d=a69_0x1584,_0x3fdaea=_0xdf0646();while(!![]){try{const _0x14a8bf=-parseInt(_0x11514d(0x116))/0x1*(-parseInt(_0x11514d(0x113))/0x2)+parseInt(_0x11514d(0x10c))/0x3*(parseInt(_0x11514d(0x111))/0x4)+-parseInt(_0x11514d(0x10e))/0x5*(-parseInt(_0x11514d(0x117))/0x6)+-parseInt(_0x11514d(0x114))/0x7*(-parseInt(_0x11514d(0x10b))/0x8)+-parseInt(_0x11514d(0x112))/0x9+-parseInt(_0x11514d(0x10d))/0xa*(parseInt(_0x11514d(0x119))/0xb)+-parseInt(_0x11514d(0x110))/0xc*(-parseInt(_0x11514d(0x10f))/0xd);if(_0x14a8bf===_0x426076)break;else _0x3fdaea['push'](_0x3fdaea['shift']());}catch(_0x1b7a65){_0x3fdaea['push'](_0x3fdaea['shift']());}}}(a69_0x5229,0xeed7c));export function detectFormatFromExtension(_0x2ac51e){const _0x222b17=a69_0x1584,_0x336a59=_0x2ac51e[_0x222b17(0x11a)]()[_0x222b17(0x10a)]('.')['pop']();switch(_0x336a59){case _0x222b17(0x11b):return _0x222b17(0x11b);case'jsonl':return'jsonl';case _0x222b17(0x118):case'tab':return _0x222b17(0x118);case'txt':case _0x222b17(0x109):return _0x222b17(0x115);default:return undefined;}}export function resolveOutputFormat(_0x44ed17,_0x453ba4,_0x25b609){if(_0x44ed17)return _0x44ed17;if(_0x453ba4){const _0x181d5d=detectFormatFromExtension(_0x453ba4);if(_0x181d5d)return _0x181d5d;}return _0x25b609;}
|
package/dist/utils/formatters.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x2e1427,_0x5fc6e0){const _0x25a1f5=a70_0x2949,_0x4ed815=_0x2e1427();while(!![]){try{const _0x1b11d7=parseInt(_0x25a1f5(0x172))/0x1+-parseInt(_0x25a1f5(0x177))/0x2*(-parseInt(_0x25a1f5(0x194))/0x3)+-parseInt(_0x25a1f5(0x180))/0x4+parseInt(_0x25a1f5(0x174))/0x5+-parseInt(_0x25a1f5(0x16a))/0x6+parseInt(_0x25a1f5(0x181))/0x7*(parseInt(_0x25a1f5(0x170))/0x8)+parseInt(_0x25a1f5(0x178))/0x9*(-parseInt(_0x25a1f5(0x189))/0xa);if(_0x1b11d7===_0x5fc6e0)break;else _0x4ed815['push'](_0x4ed815['shift']());}catch(_0x5971d7){_0x4ed815['push'](_0x4ed815['shift']());}}}(a70_0x30d2,0xce214));import{centerAlign,stringWidth,padEnd,padStart}from'./string-utils.js';import{colorBorder,colorType,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';const DEFAULT_MAX_DISPLAY_ROWS=0x28;function getTerminalWidth(){const _0x34beba=a70_0x2949;return process['stdout'][_0x34beba(0x185)]||Infinity;}export function formatAsTable(_0xec61ca,_0xc7db68=DEFAULT_MAX_DISPLAY_ROWS,_0x2b9ea7=![],_0x25bdb7={}){const _0x16f3f7=a70_0x2949;if(_0xec61ca[_0x16f3f7(0x167)][_0x16f3f7(0x18f)]===0x0)return _0x16f3f7(0x161);const _0x3b9241=_0xec61ca['columns']['map'](_0x4846d7=>_0x4846d7[_0x16f3f7(0x179)]),_0x26c154=_0xec61ca[_0x16f3f7(0x185)][_0x16f3f7(0x183)](_0x4c32f3=>simplifyType(_0x4c32f3[_0x16f3f7(0x16b)])),_0x175587=_0xec61ca[_0x16f3f7(0x167)][_0x16f3f7(0x16c)](0x0,_0xc7db68),_0x18862a=_0xec61ca[_0x16f3f7(0x167)][_0x16f3f7(0x18f)],_0x1fbaf0=_0x18862a>_0xc7db68,_0x3d16d9=[],_0x5644ed=getTerminalWidth(),_0x535ed1=_0x5644ed!==Infinity,_0x25a536=0x32;let _0x1fe938=_0x3b9241[_0x16f3f7(0x183)]((_0x33ce0c,_0x54536e)=>{const _0x5f03de=_0x16f3f7,_0x2db864=stringWidth(_0x26c154[_0x54536e]),_0x451759=Math[_0x5f03de(0x188)](..._0x175587[_0x5f03de(0x183)](_0x3ac833=>{const _0xaab3c=_0x3ac833[_0x33ce0c];return stringWidth(formatValue(_0xaab3c));})),_0x5abcbb=Math['max'](stringWidth(_0x33ce0c),_0x2db864,_0x451759);return _0x2b9ea7?_0x5abcbb:Math[_0x5f03de(0x173)](_0x5abcbb,_0x25a536);});if(_0x535ed1&&!_0x2b9ea7&&_0x3b9241[_0x16f3f7(0x18f)]>0x0){const _0x3f789a=_0x30fdf3=>{let _0x434e43=0x1;for(const _0x32f95e of _0x30fdf3){_0x434e43+=_0x32f95e+0x3;}return _0x434e43+0x1;};let _0x28fad=_0x3f789a(_0x1fe938);if(_0x28fad>_0x5644ed){const _0xae9724=0x3;for(let _0x133e94=_0x1fe938[_0x16f3f7(0x18f)]-0x1;_0x133e94>=0x0;_0x133e94--){_0x28fad=_0x3f789a(_0x1fe938);if(_0x28fad<=_0x5644ed)break;const _0x2e0b0e=_0x1fe938[_0x133e94],_0x4fc4c3=_0x28fad-_0x5644ed,_0x57f772=_0x2e0b0e-_0xae9724,_0x220140=Math[_0x16f3f7(0x173)](_0x4fc4c3,_0x57f772);_0x220140>0x0&&(_0x1fe938[_0x133e94]=_0x2e0b0e-_0x220140);}}}const _0x1f883e=_0x3b9241,_0x8010d0=_0x26c154,_0x45efec=_0x1fe938,_0x1f15f0=_0x1fe938;_0x3d16d9[_0x16f3f7(0x15f)](colorBorder('┌'+_0x1f15f0[_0x16f3f7(0x183)](_0x46c01b=>'─'[_0x16f3f7(0x17d)](_0x46c01b+0x2))['join']('┬')+'┐',_0x25bdb7));const _0x4fd138=_0x1f883e[_0x16f3f7(0x183)]((_0x544c67,_0x478f40)=>centerAlign(_0x544c67,_0x45efec[_0x478f40]));_0x3d16d9['push'](colorBorder('│',_0x25bdb7)+'\x20'+_0x4fd138[_0x16f3f7(0x15c)]('\x20'+colorBorder('│',_0x25bdb7)+'\x20')+'\x20'+colorBorder('│',_0x25bdb7));const _0x15dce1=_0x8010d0[_0x16f3f7(0x183)]((_0x540771,_0x5436ac)=>colorType(centerAlign(_0x540771,_0x45efec[_0x5436ac]),_0x25bdb7));_0x3d16d9['push'](colorBorder('│',_0x25bdb7)+'\x20'+_0x15dce1[_0x16f3f7(0x15c)]('\x20'+colorBorder('│',_0x25bdb7)+'\x20')+'\x20'+colorBorder('│',_0x25bdb7)),_0x3d16d9[_0x16f3f7(0x15f)](colorBorder('├'+_0x1f15f0[_0x16f3f7(0x183)](_0x41aa4=>'─'[_0x16f3f7(0x17d)](_0x41aa4+0x2))['join']('┼')+'┤',_0x25bdb7));const _0x50a334=(_0xac04e1,_0x3bd33e)=>{const _0x3a534c=_0x16f3f7,_0x3ae16c=stringWidth(_0xac04e1);if(_0x3ae16c<=_0x3bd33e)return _0xac04e1;let _0x1ae3be=_0xac04e1;while(stringWidth(_0x1ae3be+'…')>_0x3bd33e&&_0x1ae3be[_0x3a534c(0x18f)]>0x0){_0x1ae3be=_0x1ae3be[_0x3a534c(0x16c)](0x0,-0x1);}return _0x1ae3be+'…';};_0x175587[_0x16f3f7(0x186)](_0xf2b730=>{const _0x19ceb9=_0x3b9241['map']((_0x50f3c6,_0x594eff)=>{const _0x253ce3=a70_0x2949,_0x2dfe5e=_0xf2b730[_0x50f3c6],_0x3f9d1f=formatValue(_0x2dfe5e),_0x3be018=_0x45efec[_0x594eff],_0x49efd7=_0x50a334(_0x3f9d1f,_0x3be018),_0x17ab5c=typeof _0x2dfe5e===_0x253ce3(0x184)||typeof _0x2dfe5e===_0x253ce3(0x15d)&&/^-?\d+$/[_0x253ce3(0x187)](_0x2dfe5e);return _0x17ab5c?padStart(_0x49efd7,_0x3be018):padEnd(_0x49efd7,_0x3be018);});_0x3d16d9['push'](colorBorder('│',_0x25bdb7)+'\x20'+_0x19ceb9['join']('\x20'+colorBorder('│',_0x25bdb7)+'\x20')+'\x20'+colorBorder('│',_0x25bdb7));});const _0x525765=_0x1f15f0[_0x16f3f7(0x18d)]((_0x5be83f,_0x2997a3)=>_0x5be83f+_0x2997a3+0x3,-0x1);_0x3d16d9[_0x16f3f7(0x15f)](colorBorder('├'+_0x1f15f0[_0x16f3f7(0x183)](_0xb5fc78=>'─'['repeat'](_0xb5fc78+0x2))[_0x16f3f7(0x15c)]('┴')+'┤',_0x25bdb7));let _0x12f429;_0x1fbaf0?_0x12f429=_0x18862a+_0x16f3f7(0x175)+_0xc7db68+'\x20shown)':_0x12f429=_0x18862a+_0x16f3f7(0x169)+(_0x18862a===0x1?'':'s');const _0x508458=_0x12f429[_0x16f3f7(0x168)](_0x525765-0x2);return _0x3d16d9[_0x16f3f7(0x15f)](colorBorder('│',_0x25bdb7)+'\x20'+_0x508458+'\x20'+colorBorder('│',_0x25bdb7)),_0x3d16d9['push'](colorBorder('└'+'─'[_0x16f3f7(0x17d)](_0x525765)+'┘',_0x25bdb7)),_0x3d16d9[_0x16f3f7(0x15c)]('\x0a');}function a70_0x2949(_0x5928b5,_0x3e3afb){const _0x30d2bd=a70_0x30d2();return a70_0x2949=function(_0x2949c0,_0x11db56){_0x2949c0=_0x2949c0-0x15c;let _0x43d759=_0x30d2bd[_0x2949c0];return _0x43d759;},a70_0x2949(_0x5928b5,_0x3e3afb);}function simplifyType(_0x116bcb){const _0xfeed86=a70_0x2949,_0x28e855={'varchar':_0xfeed86(0x15d),'bigint':_0xfeed86(0x18e),'integer':_0xfeed86(0x162),'double':'double','boolean':_0xfeed86(0x171),'date':_0xfeed86(0x190),'timestamp':_0xfeed86(0x17a),'array':_0xfeed86(0x193),'map':_0xfeed86(0x183),'row':_0xfeed86(0x17f)},_0x51715b=_0x116bcb[_0xfeed86(0x163)]();for(const [_0x43c648,_0x865dc0]of Object['entries'](_0x28e855)){if(_0x51715b[_0xfeed86(0x17c)](_0x43c648))return _0x865dc0;}return _0x116bcb['length']>0xa?_0x116bcb[_0xfeed86(0x18b)](0x0,0xa):_0x116bcb;}export function formatAsJSON(_0x35e68a,_0x2c4cfd={}){const _0xf6476a=a70_0x2949;if(_0x35e68a[_0xf6476a(0x167)][_0xf6476a(0x18f)]===0x0)return'[]';if(shouldUseColor(_0x2c4cfd))return colorizeJSON(_0x35e68a[_0xf6476a(0x167)],_0x2c4cfd);const _0x209d59=_0x35e68a[_0xf6476a(0x167)][_0xf6476a(0x183)](_0x1a2501=>'\x20\x20'+JSON[_0xf6476a(0x182)](_0x1a2501));return'[\x0a'+_0x209d59['join'](',\x0a')+'\x0a]';}export function formatAsJSONL(_0x1b11e4,_0x319292={}){const _0x3fdf01=a70_0x2949;if(_0x1b11e4[_0x3fdf01(0x167)]['length']===0x0)return'';if(shouldUseColor(_0x319292))return _0x1b11e4[_0x3fdf01(0x167)][_0x3fdf01(0x183)](_0x25a1ec=>colorizeJSONCompact(_0x25a1ec,_0x319292))[_0x3fdf01(0x15c)]('\x0a');return _0x1b11e4[_0x3fdf01(0x167)]['map'](_0x3098ac=>JSON['stringify'](_0x3098ac))[_0x3fdf01(0x15c)]('\x0a');}export function formatAsTSV(_0x142262){const _0x3e84a1=a70_0x2949;if(_0x142262['data'][_0x3e84a1(0x18f)]===0x0)return'';const _0x57e351=[],_0x22122b=_0x142262['columns'][_0x3e84a1(0x183)](_0x490ed3=>_0x490ed3[_0x3e84a1(0x179)]);return _0x57e351[_0x3e84a1(0x15f)](_0x22122b[_0x3e84a1(0x15c)]('\x09')),_0x142262[_0x3e84a1(0x167)][_0x3e84a1(0x186)](_0x15430b=>{const _0x26c7d2=_0x3e84a1,_0x2c0308=_0x22122b[_0x26c7d2(0x183)](_0x355047=>{const _0x39add4=_0x15430b[_0x355047];return formatValueForTSV(_0x39add4);});_0x57e351[_0x26c7d2(0x15f)](_0x2c0308[_0x26c7d2(0x15c)]('\x09'));}),_0x57e351[_0x3e84a1(0x15c)]('\x0a');}function formatValue(_0x490a74){const _0xc19086=a70_0x2949;if(_0x490a74===null||_0x490a74===undefined)return'';if(typeof _0x490a74===_0xc19086(0x15d)){const _0x53c3b9=_0x490a74[_0xc19086(0x176)](/\n/g,'\x5cn')[_0xc19086(0x176)](/\r/g,'\x5cr')[_0xc19086(0x176)](/\t/g,'\x5ct');return _0x53c3b9;}if(typeof _0x490a74==='number')return String(_0x490a74);if(typeof _0x490a74==='boolean')return _0x490a74?_0xc19086(0x18a):_0xc19086(0x17e);if(_0x490a74 instanceof Date)return _0x490a74[_0xc19086(0x192)]();if(typeof _0x490a74===_0xc19086(0x165))return JSON[_0xc19086(0x182)](_0x490a74);return String(_0x490a74);}function formatValueForTSV(_0x3ccffb){const _0x23124d=a70_0x2949;if(_0x3ccffb===null||_0x3ccffb===undefined)return'';if(typeof _0x3ccffb==='string')return _0x3ccffb[_0x23124d(0x176)](/\t/g,'\x5ct')['replace'](/\n/g,'\x5cn');if(typeof _0x3ccffb===_0x23124d(0x184)||typeof _0x3ccffb==='boolean')return String(_0x3ccffb);if(_0x3ccffb instanceof Date)return _0x3ccffb[_0x23124d(0x192)]();if(typeof _0x3ccffb===_0x23124d(0x165))return JSON['stringify'](_0x3ccffb);return String(_0x3ccffb);}export function formatQueryResult(_0x5dccc6,_0x17e0ae){const _0x2288a4=a70_0x2949;switch(_0x17e0ae){case _0x2288a4(0x15e):return formatAsTable(_0x5dccc6);case _0x2288a4(0x164):return formatAsJSON(_0x5dccc6);case _0x2288a4(0x160):return formatAsJSONL(_0x5dccc6);case _0x2288a4(0x16d):return formatAsTSV(_0x5dccc6);default:return formatAsJSON(_0x5dccc6);}}export function formatBytes(_0x13029b){const _0x4142bb=a70_0x2949;if(_0x13029b===0x0)return _0x4142bb(0x16e);const _0x203e5e=['B','KB','MB','GB','TB'],_0x495db5=0x400,_0x2415d4=Math[_0x4142bb(0x166)](Math[_0x4142bb(0x18c)](_0x13029b)/Math['log'](_0x495db5)),_0x41212c=_0x13029b/Math[_0x4142bb(0x191)](_0x495db5,_0x2415d4),_0x21ce3c=_0x41212c>=0xa?0x1:0x2;return _0x41212c[_0x4142bb(0x17b)](_0x21ce3c)+'\x20'+_0x203e5e[_0x2415d4];}function a70_0x30d2(){const _0xb34c95=['long','length','date','pow','toISOString','array','291VEoesS','join','string','table','push','jsonl','No\x20rows\x20returned','int','toLowerCase','json','object','floor','data','padEnd','\x20row','1947684OlenTX','type','slice','tsv','0\x20B','toString','4312DaPCDx','bool','1483556ZNlsER','min','6071120uHMVAT','\x20rows\x20(','replace','33758jcpFyL','54ZNFVOp','name','timestamp','toFixed','startsWith','repeat','false','row','1798196VKrSfa','13398zHsRuo','stringify','map','number','columns','forEach','test','max','6247030QVVVJK','true','substring','log','reduce'];a70_0x30d2=function(){return _0xb34c95;};return a70_0x30d2();}export function formatRows(_0x3e6c57){const _0x5078b4=a70_0x2949;if(_0x3e6c57==null)return'-';if(_0x3e6c57===0x0)return'0';if(_0x3e6c57<0x3e8)return _0x3e6c57[_0x5078b4(0x16f)]();const _0x430668=['','K','M','B','T'],_0x3816fb=0x3e8,_0x33dd55=Math[_0x5078b4(0x166)](Math['log'](_0x3e6c57)/Math[_0x5078b4(0x18c)](_0x3816fb)),_0x54d845=_0x3e6c57/Math[_0x5078b4(0x191)](_0x3816fb,_0x33dd55),_0x5a15ae=_0x54d845>=0xa?0x1:0x2;return''+_0x54d845[_0x5078b4(0x17b)](_0x5a15ae)+_0x430668[_0x33dd55];}
|
|
1
|
+
(function(_0x14a7c7,_0x1b2657){const _0x2ebdff=a70_0x97ac,_0x3591e7=_0x14a7c7();while(!![]){try{const _0x166cd1=parseInt(_0x2ebdff(0x17d))/0x1+parseInt(_0x2ebdff(0x16c))/0x2+-parseInt(_0x2ebdff(0x194))/0x3+parseInt(_0x2ebdff(0x193))/0x4*(-parseInt(_0x2ebdff(0x195))/0x5)+-parseInt(_0x2ebdff(0x18f))/0x6+-parseInt(_0x2ebdff(0x184))/0x7+parseInt(_0x2ebdff(0x187))/0x8;if(_0x166cd1===_0x1b2657)break;else _0x3591e7['push'](_0x3591e7['shift']());}catch(_0xcd5d55){_0x3591e7['push'](_0x3591e7['shift']());}}}(a70_0x6adf,0xd732e));import{centerAlign,stringWidth,padEnd,padStart}from'./string-utils.js';import{colorBorder,colorType,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';const DEFAULT_MAX_DISPLAY_ROWS=0x28;function getTerminalWidth(){const _0x26fa4a=a70_0x97ac;return process[_0x26fa4a(0x17f)][_0x26fa4a(0x175)]||Infinity;}export function formatAsTable(_0xd0730,_0x499e7e=DEFAULT_MAX_DISPLAY_ROWS,_0x157311=![],_0x7a717e={}){const _0x4ee681=a70_0x97ac;if(_0xd0730[_0x4ee681(0x18a)][_0x4ee681(0x168)]===0x0)return _0x4ee681(0x196);const _0x2f58fd=_0xd0730['columns'][_0x4ee681(0x16a)](_0x86a962=>_0x86a962[_0x4ee681(0x16b)]),_0x496975=_0xd0730[_0x4ee681(0x175)]['map'](_0x1be525=>simplifyType(_0x1be525[_0x4ee681(0x170)])),_0x1a8855=_0xd0730[_0x4ee681(0x18a)]['slice'](0x0,_0x499e7e),_0x1d9057=_0xd0730[_0x4ee681(0x18a)][_0x4ee681(0x168)],_0x12d346=_0x1d9057>_0x499e7e,_0x23ff2c=[],_0x2e99c7=getTerminalWidth(),_0x5245b2=_0x2e99c7!==Infinity,_0x349aec=0x32;let _0x237c1e=_0x2f58fd[_0x4ee681(0x16a)]((_0x16ab42,_0x17145c)=>{const _0x442b82=_0x4ee681,_0xd144f1=stringWidth(_0x496975[_0x17145c]),_0x4e7f2c=Math['max'](..._0x1a8855[_0x442b82(0x16a)](_0x57bec9=>{const _0x255c0c=_0x57bec9[_0x16ab42];return stringWidth(formatValue(_0x255c0c));})),_0x4e95eb=Math['max'](stringWidth(_0x16ab42),_0xd144f1,_0x4e7f2c);return _0x157311?_0x4e95eb:Math[_0x442b82(0x166)](_0x4e95eb,_0x349aec);});if(_0x5245b2&&!_0x157311&&_0x2f58fd[_0x4ee681(0x168)]>0x0){const _0x58d682=_0x4f53b9=>{let _0x323fa3=0x1;for(const _0x185377 of _0x4f53b9){_0x323fa3+=_0x185377+0x3;}return _0x323fa3+0x1;};let _0x417de6=_0x58d682(_0x237c1e);if(_0x417de6>_0x2e99c7){const _0x340aec=0x3;for(let _0x4f690f=_0x237c1e[_0x4ee681(0x168)]-0x1;_0x4f690f>=0x0;_0x4f690f--){_0x417de6=_0x58d682(_0x237c1e);if(_0x417de6<=_0x2e99c7)break;const _0x1f2f41=_0x237c1e[_0x4f690f],_0x2233ff=_0x417de6-_0x2e99c7,_0x5b92d6=_0x1f2f41-_0x340aec,_0x40ba83=Math[_0x4ee681(0x166)](_0x2233ff,_0x5b92d6);_0x40ba83>0x0&&(_0x237c1e[_0x4f690f]=_0x1f2f41-_0x40ba83);}}}const _0x2970f2=_0x2f58fd,_0x281415=_0x496975,_0x35bd0c=_0x237c1e,_0x5831b7=_0x237c1e;_0x23ff2c[_0x4ee681(0x192)](colorBorder('┌'+_0x5831b7['map'](_0x2bc3b0=>'─'[_0x4ee681(0x165)](_0x2bc3b0+0x2))['join']('┬')+'┐',_0x7a717e));const _0x20ca57=_0x2970f2[_0x4ee681(0x16a)]((_0x3b4fec,_0x2f22cc)=>centerAlign(_0x3b4fec,_0x35bd0c[_0x2f22cc]));_0x23ff2c[_0x4ee681(0x192)](colorBorder('│',_0x7a717e)+'\x20'+_0x20ca57[_0x4ee681(0x173)]('\x20'+colorBorder('│',_0x7a717e)+'\x20')+'\x20'+colorBorder('│',_0x7a717e));const _0x1f2a0e=_0x281415[_0x4ee681(0x16a)]((_0x2a1d3e,_0x31ba61)=>colorType(centerAlign(_0x2a1d3e,_0x35bd0c[_0x31ba61]),_0x7a717e));_0x23ff2c[_0x4ee681(0x192)](colorBorder('│',_0x7a717e)+'\x20'+_0x1f2a0e[_0x4ee681(0x173)]('\x20'+colorBorder('│',_0x7a717e)+'\x20')+'\x20'+colorBorder('│',_0x7a717e)),_0x23ff2c[_0x4ee681(0x192)](colorBorder('├'+_0x5831b7[_0x4ee681(0x16a)](_0x4fc4f9=>'─'['repeat'](_0x4fc4f9+0x2))[_0x4ee681(0x173)]('┼')+'┤',_0x7a717e));const _0x477f5f=(_0x337961,_0x490393)=>{const _0x4279d6=_0x4ee681,_0x2e3159=stringWidth(_0x337961);if(_0x2e3159<=_0x490393)return _0x337961;let _0x46b2f1=_0x337961;while(stringWidth(_0x46b2f1+'…')>_0x490393&&_0x46b2f1['length']>0x0){_0x46b2f1=_0x46b2f1[_0x4279d6(0x16f)](0x0,-0x1);}return _0x46b2f1+'…';};_0x1a8855['forEach'](_0x2f478b=>{const _0x275a7d=_0x4ee681,_0x1acb4b=_0x2f58fd['map']((_0x25c044,_0x7d792c)=>{const _0x5b9985=a70_0x97ac,_0x2b8e03=_0x2f478b[_0x25c044],_0x4de9e7=formatValue(_0x2b8e03),_0x4f607c=_0x35bd0c[_0x7d792c],_0x8d4e4d=_0x477f5f(_0x4de9e7,_0x4f607c),_0x4912fd=typeof _0x2b8e03===_0x5b9985(0x16d)||typeof _0x2b8e03===_0x5b9985(0x17c)&&/^-?\d+$/[_0x5b9985(0x169)](_0x2b8e03);return _0x4912fd?padStart(_0x8d4e4d,_0x4f607c):padEnd(_0x8d4e4d,_0x4f607c);});_0x23ff2c[_0x275a7d(0x192)](colorBorder('│',_0x7a717e)+'\x20'+_0x1acb4b[_0x275a7d(0x173)]('\x20'+colorBorder('│',_0x7a717e)+'\x20')+'\x20'+colorBorder('│',_0x7a717e));});const _0x593bf1=_0x5831b7[_0x4ee681(0x177)]((_0x21149e,_0x4a9f6c)=>_0x21149e+_0x4a9f6c+0x3,-0x1);_0x23ff2c[_0x4ee681(0x192)](colorBorder('├'+_0x5831b7[_0x4ee681(0x16a)](_0x2107f6=>'─'[_0x4ee681(0x165)](_0x2107f6+0x2))[_0x4ee681(0x173)]('┴')+'┤',_0x7a717e));let _0x105e4f;_0x12d346?_0x105e4f=_0x1d9057+_0x4ee681(0x174)+_0x499e7e+_0x4ee681(0x17b):_0x105e4f=_0x1d9057+'\x20row'+(_0x1d9057===0x1?'':'s');const _0x52caad=_0x105e4f[_0x4ee681(0x182)](_0x593bf1-0x2);return _0x23ff2c['push'](colorBorder('│',_0x7a717e)+'\x20'+_0x52caad+'\x20'+colorBorder('│',_0x7a717e)),_0x23ff2c['push'](colorBorder('└'+'─'[_0x4ee681(0x165)](_0x593bf1)+'┘',_0x7a717e)),_0x23ff2c[_0x4ee681(0x173)]('\x0a');}function simplifyType(_0x8620bc){const _0x313752=a70_0x97ac,_0x4d046={'varchar':_0x313752(0x17c),'bigint':_0x313752(0x189),'integer':_0x313752(0x179),'double':_0x313752(0x18b),'boolean':_0x313752(0x180),'date':_0x313752(0x18e),'timestamp':_0x313752(0x163),'array':'array','map':'map','row':_0x313752(0x186)},_0x392d3c=_0x8620bc[_0x313752(0x164)]();for(const [_0x258fdc,_0xa2fc52]of Object[_0x313752(0x167)](_0x4d046)){if(_0x392d3c[_0x313752(0x178)](_0x258fdc))return _0xa2fc52;}return _0x8620bc[_0x313752(0x168)]>0xa?_0x8620bc[_0x313752(0x190)](0x0,0xa):_0x8620bc;}export function formatAsJSON(_0x249bf0,_0x6e40c9={}){const _0x427a92=a70_0x97ac;if(_0x249bf0['data'][_0x427a92(0x168)]===0x0)return'[]';if(shouldUseColor(_0x6e40c9))return colorizeJSON(_0x249bf0[_0x427a92(0x18a)],_0x6e40c9);const _0x172f34=_0x249bf0[_0x427a92(0x18a)][_0x427a92(0x16a)](_0x29a477=>'\x20\x20'+JSON[_0x427a92(0x183)](_0x29a477));return'[\x0a'+_0x172f34[_0x427a92(0x173)](',\x0a')+'\x0a]';}export function formatAsJSONL(_0x695683,_0x3b3c7d={}){const _0x4cde82=a70_0x97ac;if(_0x695683['data'][_0x4cde82(0x168)]===0x0)return'';if(shouldUseColor(_0x3b3c7d))return _0x695683[_0x4cde82(0x18a)][_0x4cde82(0x16a)](_0x2bca9c=>colorizeJSONCompact(_0x2bca9c,_0x3b3c7d))[_0x4cde82(0x173)]('\x0a');return _0x695683[_0x4cde82(0x18a)][_0x4cde82(0x16a)](_0x53fc3e=>JSON[_0x4cde82(0x183)](_0x53fc3e))[_0x4cde82(0x173)]('\x0a');}function a70_0x97ac(_0x18c01b,_0x29f4c2){const _0x6adfe3=a70_0x6adf();return a70_0x97ac=function(_0x97ac42,_0x18fdac){_0x97ac42=_0x97ac42-0x163;let _0x28796f=_0x6adfe3[_0x97ac42];return _0x28796f;},a70_0x97ac(_0x18c01b,_0x29f4c2);}export function formatAsTSV(_0xde835f){const _0x995bfe=a70_0x97ac;if(_0xde835f[_0x995bfe(0x18a)]['length']===0x0)return'';const _0x5a40a6=[],_0x452b4b=_0xde835f[_0x995bfe(0x175)][_0x995bfe(0x16a)](_0x1aad38=>_0x1aad38[_0x995bfe(0x16b)]);return _0x5a40a6[_0x995bfe(0x192)](_0x452b4b['join']('\x09')),_0xde835f[_0x995bfe(0x18a)]['forEach'](_0x5a0d9f=>{const _0x18e9df=_0x995bfe,_0x344336=_0x452b4b[_0x18e9df(0x16a)](_0x2638ba=>{const _0x115f2b=_0x5a0d9f[_0x2638ba];return formatValueForTSV(_0x115f2b);});_0x5a40a6[_0x18e9df(0x192)](_0x344336[_0x18e9df(0x173)]('\x09'));}),_0x5a40a6[_0x995bfe(0x173)]('\x0a');}function formatValue(_0x1e0cdf){const _0xe04b45=a70_0x97ac;if(_0x1e0cdf===null||_0x1e0cdf===undefined)return'';if(typeof _0x1e0cdf===_0xe04b45(0x17c)){const _0x3c3836=_0x1e0cdf[_0xe04b45(0x16e)](/\n/g,'\x5cn')[_0xe04b45(0x16e)](/\r/g,'\x5cr')[_0xe04b45(0x16e)](/\t/g,'\x5ct');return _0x3c3836;}if(typeof _0x1e0cdf===_0xe04b45(0x16d))return String(_0x1e0cdf);if(typeof _0x1e0cdf===_0xe04b45(0x18d))return _0x1e0cdf?_0xe04b45(0x188):'false';if(_0x1e0cdf instanceof Date)return _0x1e0cdf['toISOString']();if(typeof _0x1e0cdf===_0xe04b45(0x171))return JSON[_0xe04b45(0x183)](_0x1e0cdf);return String(_0x1e0cdf);}function formatValueForTSV(_0x5e779c){const _0x596a15=a70_0x97ac;if(_0x5e779c===null||_0x5e779c===undefined)return'';if(typeof _0x5e779c===_0x596a15(0x17c))return _0x5e779c['replace'](/\t/g,'\x5ct')['replace'](/\n/g,'\x5cn');if(typeof _0x5e779c==='number'||typeof _0x5e779c==='boolean')return String(_0x5e779c);if(_0x5e779c instanceof Date)return _0x5e779c[_0x596a15(0x176)]();if(typeof _0x5e779c===_0x596a15(0x171))return JSON['stringify'](_0x5e779c);return String(_0x5e779c);}export function formatQueryResult(_0x43ac51,_0x505f64){const _0x45b109=a70_0x97ac;switch(_0x505f64){case _0x45b109(0x185):return formatAsTable(_0x43ac51);case _0x45b109(0x17e):return formatAsJSON(_0x43ac51);case'jsonl':return formatAsJSONL(_0x43ac51);case'tsv':return formatAsTSV(_0x43ac51);default:return formatAsJSON(_0x43ac51);}}export function formatBytes(_0x1b00f3){const _0x2b55cc=a70_0x97ac;if(_0x1b00f3===0x0)return _0x2b55cc(0x18c);const _0x2e8699=['B','KB','MB','GB','TB'],_0x4b56d1=0x400,_0x224388=Math[_0x2b55cc(0x172)](Math[_0x2b55cc(0x17a)](_0x1b00f3)/Math[_0x2b55cc(0x17a)](_0x4b56d1)),_0x531b50=_0x1b00f3/Math[_0x2b55cc(0x191)](_0x4b56d1,_0x224388),_0x173527=_0x531b50>=0xa?0x1:0x2;return _0x531b50[_0x2b55cc(0x181)](_0x173527)+'\x20'+_0x2e8699[_0x224388];}function a70_0x6adf(){const _0x57ce95=['2941773sogAHd','6830eQmUjU','No\x20rows\x20returned','timestamp','toLowerCase','repeat','min','entries','length','test','map','name','2800830AVOcEE','number','replace','slice','type','object','floor','join','\x20rows\x20(','columns','toISOString','reduce','startsWith','int','log','\x20shown)','string','1139718iHSjoY','json','stdout','bool','toFixed','padEnd','stringify','1783950CkAshR','table','row','9656024aFktZQ','true','long','data','double','0\x20B','boolean','date','2585358YtKYQU','substring','pow','push','3512MVEfOT'];a70_0x6adf=function(){return _0x57ce95;};return a70_0x6adf();}export function formatRows(_0x1c1241){const _0x38a2b8=a70_0x97ac;if(_0x1c1241==null)return'-';if(_0x1c1241===0x0)return'0';if(_0x1c1241<0x3e8)return _0x1c1241['toString']();const _0x388a4a=['','K','M','B','T'],_0x41ceb8=0x3e8,_0x4f5d87=Math['floor'](Math[_0x38a2b8(0x17a)](_0x1c1241)/Math[_0x38a2b8(0x17a)](_0x41ceb8)),_0xaedd5=_0x1c1241/Math[_0x38a2b8(0x191)](_0x41ceb8,_0x4f5d87),_0x33c1ad=_0xaedd5>=0xa?0x1:0x2;return''+_0xaedd5['toFixed'](_0x33c1ad)+_0x388a4a[_0x4f5d87];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4fc453,_0x271885){const _0x3868ef=a71_0x538d,_0xc6aab4=_0x4fc453();while(!![]){try{const _0x37f80f=parseInt(_0x3868ef(0x10b))/0x1+-parseInt(_0x3868ef(0x11e))/0x2*(parseInt(_0x3868ef(0x10d))/0x3)+-parseInt(_0x3868ef(0x113))/0x4*(parseInt(_0x3868ef(0x104))/0x5)+parseInt(_0x3868ef(0x116))/0x6+parseInt(_0x3868ef(0x105))/0x7*(parseInt(_0x3868ef(0x118))/0x8)+-parseInt(_0x3868ef(0x11c))/0x9+-parseInt(_0x3868ef(0x11a))/0xa*(-parseInt(_0x3868ef(0x115))/0xb);if(_0x37f80f===_0x271885)break;else _0xc6aab4['push'](_0xc6aab4['shift']());}catch(_0x41a48e){_0xc6aab4['push'](_0xc6aab4['shift']());}}}(a71_0x4878,0xdca98));import{readFile}from'fs/promises';import{SDKError,ErrorCode}from'../sdk/errors.js';function a71_0x4878(){const _0x39e8d8=['1305086SDecrM','10JyncDH','231zIPGCE','Invalid\x20JSON\x20string:\x20','File\x20not\x20found:\x20','code','INTERNAL','Permission\x20denied\x20reading\x20file:\x20','1037537fEbCmC','PERMISSION_DENIED','3LTwLDY','EACCES','parse','Invalid\x20JSON\x20in\x20file\x20\x27','NOT_FOUND','\x27:\x20','1215024onTmZE','utf-8','11vZYRmG','6442440RjsNlQ','Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.','168088USSupW','INVALID_ARGUMENT','299260bmzqEe','message','6036111ISQKwB','ENOENT'];a71_0x4878=function(){return _0x39e8d8;};return a71_0x4878();}export async function loadJSON(_0x2f9caf,_0x216ce4){const _0x4cdc49=a71_0x538d;try{if(_0x216ce4){const _0x11068e=await readFile(_0x2f9caf,_0x4cdc49(0x114));try{return JSON[_0x4cdc49(0x10f)](_0x11068e);}catch(_0x374a91){throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x4cdc49(0x110)+_0x2f9caf+_0x4cdc49(0x112)+(_0x374a91 instanceof Error?_0x374a91[_0x4cdc49(0x11b)]:String(_0x374a91)));}}else try{return JSON[_0x4cdc49(0x10f)](_0x2f9caf);}catch(_0x27e970){throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x4cdc49(0x106)+(_0x27e970 instanceof Error?_0x27e970['message']:String(_0x27e970)));}}catch(_0x534f4d){if(_0x534f4d instanceof SDKError)throw _0x534f4d;if(_0x534f4d instanceof Error&&_0x4cdc49(0x108)in _0x534f4d){const _0x44d04c=_0x534f4d;if(_0x44d04c[_0x4cdc49(0x108)]===_0x4cdc49(0x11d))throw new SDKError(ErrorCode[_0x4cdc49(0x111)],_0x4cdc49(0x107)+_0x2f9caf);else{if(_0x44d04c[_0x4cdc49(0x108)]===_0x4cdc49(0x10e))throw new SDKError(ErrorCode[_0x4cdc49(0x10c)],_0x4cdc49(0x10a)+_0x2f9caf);}}throw new SDKError(ErrorCode[_0x4cdc49(0x109)],'Failed\x20to\x20load\x20JSON:\x20'+(_0x534f4d instanceof Error?_0x534f4d[_0x4cdc49(0x11b)]:String(_0x534f4d)));}}function a71_0x538d(_0x468694,_0x40bebf){const _0x4878df=a71_0x4878();return a71_0x538d=function(_0x538d19,_0x40c6bc){_0x538d19=_0x538d19-0x104;let _0x450849=_0x4878df[_0x538d19];return _0x450849;},a71_0x538d(_0x468694,_0x40bebf);}export async function loadJSONFromOptions(_0x598b7b,_0x1280d4){const _0x4a038b=a71_0x538d;if(_0x598b7b&&_0x1280d4)throw new SDKError(ErrorCode[_0x4a038b(0x119)],_0x4a038b(0x117));if(_0x598b7b)return await loadJSON(_0x598b7b,![]);if(_0x1280d4)return await loadJSON(_0x1280d4,!![]);return undefined;}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility functions for LLM project backup/restore operations
|
|
3
|
+
*/
|
|
4
|
+
import type { AgentFull, AgentTool, AgentVariable } from '../types/index.js';
|
|
5
|
+
/**
|
|
6
|
+
* Check if an agent can be created (all its agent dependencies exist in agentMap)
|
|
7
|
+
*
|
|
8
|
+
* @param agent - Agent to check
|
|
9
|
+
* @param agentMap - Map of old agent IDs to new agent IDs
|
|
10
|
+
* @returns true if all agent dependencies are satisfied
|
|
11
|
+
*/
|
|
12
|
+
export declare function canCreateAgent(agent: AgentFull, agentMap: Map<string, string>): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Remap IDs in agent tools from old IDs to new IDs
|
|
15
|
+
*
|
|
16
|
+
* @param tools - Array of agent tools
|
|
17
|
+
* @param kbMap - Map of old KB IDs to new KB IDs
|
|
18
|
+
* @param agentMap - Map of old agent IDs to new agent IDs
|
|
19
|
+
* @returns Tools with remapped IDs
|
|
20
|
+
*/
|
|
21
|
+
export declare function remapToolIds(tools: AgentTool[], kbMap: Map<string, string>, agentMap: Map<string, string>): AgentTool[];
|
|
22
|
+
/**
|
|
23
|
+
* Remap IDs in agent variables from old IDs to new IDs
|
|
24
|
+
*
|
|
25
|
+
* @param variables - Array of agent variables
|
|
26
|
+
* @param kbMap - Map of old KB IDs to new KB IDs
|
|
27
|
+
* @returns Variables with remapped IDs
|
|
28
|
+
*/
|
|
29
|
+
export declare function remapVariableIds(variables: AgentVariable[], kbMap: Map<string, string>): AgentVariable[];
|
|
30
|
+
/**
|
|
31
|
+
* Validate backup metadata version
|
|
32
|
+
*
|
|
33
|
+
* @param version - Version string from backup metadata
|
|
34
|
+
* @returns true if version is supported
|
|
35
|
+
*/
|
|
36
|
+
export declare function isSupportedBackupVersion(version: string): boolean;
|
|
37
|
+
//# sourceMappingURL=llm-backup-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm-backup-utils.d.ts","sourceRoot":"","sources":["../../src/utils/llm-backup-utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAE7E;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAOvF;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,SAAS,EAAE,EAClB,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAC1B,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAC5B,SAAS,EAAE,CAUb;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,aAAa,EAAE,EAC1B,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GACzB,aAAa,EAAE,CAKjB;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAEjE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x3dfe30,_0x1d3b49){const _0x21cf52=a72_0x62ea,_0x396e5f=_0x3dfe30();while(!![]){try{const _0x4fc523=parseInt(_0x21cf52(0xda))/0x1+-parseInt(_0x21cf52(0xde))/0x2+parseInt(_0x21cf52(0xdd))/0x3+-parseInt(_0x21cf52(0xe4))/0x4*(-parseInt(_0x21cf52(0xdc))/0x5)+parseInt(_0x21cf52(0xdf))/0x6+parseInt(_0x21cf52(0xe2))/0x7*(-parseInt(_0x21cf52(0xd8))/0x8)+-parseInt(_0x21cf52(0xd7))/0x9;if(_0x4fc523===_0x1d3b49)break;else _0x396e5f['push'](_0x396e5f['shift']());}catch(_0x65325f){_0x396e5f['push'](_0x396e5f['shift']());}}}(a72_0x2647,0xaeadc));function a72_0x62ea(_0x158b5c,_0xd4752b){const _0x2647fe=a72_0x2647();return a72_0x62ea=function(_0x62ea7d,_0x579f77){_0x62ea7d=_0x62ea7d-0xd6;let _0x1c4241=_0x2647fe[_0x62ea7d];return _0x1c4241;},a72_0x62ea(_0x158b5c,_0xd4752b);}function a72_0x2647(){const _0x3d5a77=['1.0','2931430tvARBk','2070069ZfadfY','1458836afzeCD','4221636AwhPqd','has','attributes','721987bahzMs','targetKnowledgeBaseId','4bYgIlJ','get','5605884OJYSPl','40QwbpVa','targetAgentId','603568ZgyLYI'];a72_0x2647=function(){return _0x3d5a77;};return a72_0x2647();}export function canCreateAgent(_0xf7104d,_0x7352f){const _0x29b83a=a72_0x62ea;for(const _0x95125a of _0xf7104d[_0x29b83a(0xe1)]['tools']){if(_0x95125a[_0x29b83a(0xd9)]&&!_0x7352f[_0x29b83a(0xe0)](_0x95125a[_0x29b83a(0xd9)]))return![];}return!![];}export function remapToolIds(_0x19fd3d,_0x1153a3,_0x4a73db){const _0x347a98=a72_0x62ea;return _0x19fd3d['map'](_0x55b85f=>({..._0x55b85f,'targetKnowledgeBaseId':_0x55b85f[_0x347a98(0xe3)]?_0x1153a3[_0x347a98(0xd6)](_0x55b85f[_0x347a98(0xe3)])||_0x55b85f[_0x347a98(0xe3)]:undefined,'targetAgentId':_0x55b85f[_0x347a98(0xd9)]?_0x4a73db['get'](_0x55b85f['targetAgentId'])||_0x55b85f[_0x347a98(0xd9)]:undefined}));}export function remapVariableIds(_0x10277b,_0xffdfff){const _0x479cf3=a72_0x62ea;return _0x10277b['map'](_0x55d298=>({..._0x55d298,'targetKnowledgeBaseId':_0xffdfff[_0x479cf3(0xd6)](_0x55d298[_0x479cf3(0xe3)])||_0x55d298['targetKnowledgeBaseId']}));}export function isSupportedBackupVersion(_0x404228){const _0x22e514=a72_0x62ea;return _0x404228===_0x22e514(0xdb);}
|
|
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