@treasuredata/tdx 0.1.19 → 0.1.20
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 +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/client/cdp-client.js +1 -1
- package/dist/client/http-client.js +1 -1
- package/dist/client/llm-client.js +1 -1
- package/dist/client/rate-limiter.js +1 -1
- package/dist/client/td-client.js +1 -1
- package/dist/client/trino-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/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.js +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/global-context.js +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.d.ts.map +1 -1
- package/dist/proxy/anthropic-adapter.js +1 -1
- package/dist/proxy/anthropic-adapter.js.map +1 -1
- package/dist/proxy/server.d.ts.map +1 -1
- package/dist/proxy/server.js +1 -1
- package/dist/proxy/server.js.map +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/database.js +1 -1
- package/dist/sdk/errors.d.ts +3 -1
- package/dist/sdk/errors.d.ts.map +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/errors.js.map +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/llm.js +1 -1
- package/dist/sdk/query.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/table.js +1 -1
- package/dist/sdk/workflow.js +1 -1
- package/dist/types/endpoints.js +1 -1
- package/dist/types/index.js +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/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/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/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/sdk/table.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a50_0x378b(_0x420801,_0x49632d){const _0x130735=a50_0x1307();return a50_0x378b=function(_0x378bd1,_0xb2941e){_0x378bd1=_0x378bd1-0xa5;let _0x28126c=_0x130735[_0x378bd1];return _0x28126c;},a50_0x378b(_0x420801,_0x49632d);}const a50_0xf159d9=a50_0x378b;(function(_0x3d720c,_0x4e1a67){const _0x49be92=a50_0x378b,_0x5b48b5=_0x3d720c();while(!![]){try{const _0x510639=-parseInt(_0x49be92(0xaa))/0x1*(parseInt(_0x49be92(0xbb))/0x2)+-parseInt(_0x49be92(0xc8))/0x3+-parseInt(_0x49be92(0xa7))/0x4*(-parseInt(_0x49be92(0xb2))/0x5)+parseInt(_0x49be92(0xaf))/0x6+parseInt(_0x49be92(0xc7))/0x7*(parseInt(_0x49be92(0xad))/0x8)+parseInt(_0x49be92(0xac))/0x9+-parseInt(_0x49be92(0xcd))/0xa;if(_0x510639===_0x4e1a67)break;else _0x5b48b5['push'](_0x5b48b5['shift']());}catch(_0x20a381){_0x5b48b5['push'](_0x5b48b5['shift']());}}}(a50_0x1307,0xa975b));import{escapeStringLiteral,buildLikePattern}from'../utils/string-utils.js';function a50_0x1307(){const _0x2def52=['4113270ledFyB','23152xrlkPO','Usage:\x20tdx\x20show\x20<database.table>','13104gilIwI','\x0a\x20\x20\x20\x20\x20\x20SELECT\x201\x0a\x20\x20\x20\x20\x20\x20FROM\x20td.information_schema.tables\x0a\x20\x20\x20\x20\x20\x20WHERE\x20table_catalog\x20=\x20\x27td\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20AND\x20table_schema\x20=\x20','SELECT\x20*\x20FROM\x20','35555wjptAF','\x0a\x20\x20AND\x20table_name\x20LIKE\x20','\x0a\x20\x20\x20\x20\x20\x20\x20\x20SELECT\x20table_name\x0a\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20td.information_schema.tables\x0a\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20table_catalog\x20=\x20\x27td\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20AND\x20table_schema\x20=\x20','Table\x20name\x20is\x20required','slice','data','length','\x0a\x20\x20\x20\x20','\x0a\x20\x20\x20\x20\x20\x20\x20\x20AND\x20table_name\x20=\x20','42oeOVGf','\x20LIMIT\x20','INVALID_ARGUMENT','executeQuery','validateTable','client','Database\x20name\x20cannot\x20be\x20empty\x20or\x20whitespace-only','\x0a\x20\x20\x20\x20\x20\x20\x20\x20SELECT\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20table_schema\x20AS\x20database_name,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20table_name\x0a\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20td.information_schema.tables\x0a\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20table_catalog\x20=\x20\x27td\x27\x0a\x20\x20\x20\x20\x20\x20','Provide\x20a\x20valid\x20glob\x20pattern\x20(e.g.,\x20\x22prod_*\x22)\x20or\x20omit\x20to\x20search\x20all\x20databases.','validateDatabase','describe','\x0a\x20\x20\x20\x20\x20\x20SELECT\x201\x0a\x20\x20\x20\x20\x20\x20FROM\x20td.information_schema.schemata\x0a\x20\x20\x20\x20\x20\x20WHERE\x20catalog_name\x20=\x20\x27td\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20AND\x20schema_name\x20=\x20','2254luniwj','2664339KMWStL','\x20ESCAPE\x20\x27\x5c\x27','Provide\x20a\x20valid\x20glob\x20pattern\x20(e.g.,\x20\x22user_*\x22)\x20or\x20omit\x20to\x20list\x20all\x20tables.','show','MISSING_ARGUMENT','2482710UVjNUz','\x0a\x20\x20AND\x20table_schema\x20LIKE\x20','\x0a\x20\x20\x20\x20\x20\x20','Usage:\x20tdx\x20describe\x20<database.table>','trim','isInteger','260uXUoQE','\x0a\x20\x20\x20\x20\x20\x20SELECT\x0a\x20\x20\x20\x20\x20\x20\x20\x20column_name,\x0a\x20\x20\x20\x20\x20\x20\x20\x20data_type,\x0a\x20\x20\x20\x20\x20\x20\x20\x20is_nullable\x0a\x20\x20\x20\x20\x20\x20FROM\x20td.information_schema.columns\x0a\x20\x20\x20\x20\x20\x20WHERE\x20table_catalog\x20=\x20\x27td\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20AND\x20table_schema\x20=\x20','Database\x20name\x20is\x20required','1086tKAvoP','list'];a50_0x1307=function(){return _0x2def52;};return a50_0x1307();}import{SDKError,ErrorCode}from'./errors.js';export class TableAPI{[a50_0xf159d9(0xc0)];constructor(_0xe423d1){this['client']=_0xe423d1;}async[a50_0xf159d9(0xab)](_0x9334e9,_0x3c40fb,_0x4cb804){const _0xaf4f1d=a50_0xf159d9;if(_0x9334e9!==undefined&&_0x9334e9[_0xaf4f1d(0xa5)]()[_0xaf4f1d(0xb8)]===0x0)throw new SDKError(ErrorCode[_0xaf4f1d(0xbd)],_0xaf4f1d(0xc1),undefined,{'helpText':'Provide\x20a\x20valid\x20database\x20name\x20or\x20omit\x20to\x20list\x20tables\x20from\x20all\x20databases.'});if(_0x3c40fb!==undefined&&_0x3c40fb[_0xaf4f1d(0xa5)]()[_0xaf4f1d(0xb8)]===0x0)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],'Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only',undefined,{'helpText':_0xaf4f1d(0xca)});if(_0x4cb804!==undefined&&_0x4cb804['trim']()['length']===0x0)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],'Database\x20pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only',undefined,{'helpText':_0xaf4f1d(0xc3)});let _0x4f137f;_0x9334e9?(_0x4f137f=_0xaf4f1d(0xb4)+escapeStringLiteral(_0x9334e9)+_0xaf4f1d(0xcf),_0x3c40fb&&(_0x4f137f+=_0xaf4f1d(0xb3)+buildLikePattern(_0x3c40fb)+_0xaf4f1d(0xc9)),_0x4f137f+='\x0aORDER\x20BY\x20table_name\x0aLIMIT\x2010000'):(_0x4f137f=_0xaf4f1d(0xc2),_0x4cb804&&(_0x4f137f+=_0xaf4f1d(0xce)+buildLikePattern(_0x4cb804)+_0xaf4f1d(0xc9)),_0x3c40fb&&(_0x4f137f+=_0xaf4f1d(0xb3)+buildLikePattern(_0x3c40fb)+_0xaf4f1d(0xc9)),_0x4f137f+='\x0aORDER\x20BY\x20database_name,\x20table_name\x0aLIMIT\x2010000');const _0x14e0e9=await this[_0xaf4f1d(0xc0)][_0xaf4f1d(0xbe)](_0x4f137f['trim']());return _0x14e0e9[_0xaf4f1d(0xb7)];}async[a50_0xf159d9(0xc4)](_0x189f5e){const _0x46d04d=a50_0xf159d9,_0x28f553=(_0x46d04d(0xc6)+escapeStringLiteral(_0x189f5e)+_0x46d04d(0xb9))[_0x46d04d(0xa5)](),_0x292082=await this[_0x46d04d(0xc0)]['executeQuery'](_0x28f553);return _0x292082['data'][_0x46d04d(0xb8)]>0x0;}async[a50_0xf159d9(0xbf)](_0x1f2d5e,_0x1be964){const _0x1df4c7=a50_0xf159d9,_0x3ad4d3=(_0x1df4c7(0xb0)+escapeStringLiteral(_0x1f2d5e)+_0x1df4c7(0xba)+escapeStringLiteral(_0x1be964)+'\x0a\x20\x20\x20\x20')[_0x1df4c7(0xa5)](),_0x1e3013=await this['client'][_0x1df4c7(0xbe)](_0x3ad4d3);return _0x1e3013[_0x1df4c7(0xb7)][_0x1df4c7(0xb8)]>0x0;}async[a50_0xf159d9(0xc5)](_0x22d569,_0x3f4629){const _0x267102=a50_0xf159d9;if(!_0x22d569||_0x22d569[_0x267102(0xa5)]()[_0x267102(0xb8)]===0x0)throw new SDKError(ErrorCode['MISSING_ARGUMENT'],_0x267102(0xa9),undefined,{'helpText':_0x267102(0xd0)});if(!_0x3f4629||_0x3f4629[_0x267102(0xa5)]()[_0x267102(0xb8)]===0x0)throw new SDKError(ErrorCode[_0x267102(0xcc)],'Table\x20name\x20is\x20required',undefined,{'helpText':'Usage:\x20tdx\x20describe\x20<database.table>'});const _0x7dd85d=(_0x267102(0xa8)+escapeStringLiteral(_0x22d569)+_0x267102(0xba)+escapeStringLiteral(_0x3f4629)+'\x0a\x20\x20\x20\x20\x20\x20ORDER\x20BY\x20ordinal_position\x0a\x20\x20\x20\x20')['trim'](),_0x353392=await this[_0x267102(0xc0)][_0x267102(0xbe)](_0x7dd85d);return _0x353392['data'];}async[a50_0xf159d9(0xcb)](_0x2b8e96,_0x471e3d,_0x48e073=0x28,_0x142022){const _0x231acc=a50_0xf159d9;try{if(!_0x2b8e96||_0x2b8e96[_0x231acc(0xa5)]()['length']===0x0)throw new SDKError(ErrorCode['MISSING_ARGUMENT'],_0x231acc(0xa9),undefined,{'helpText':_0x231acc(0xae)});if(!_0x471e3d||_0x471e3d[_0x231acc(0xa5)]()[_0x231acc(0xb8)]===0x0)throw new SDKError(ErrorCode['MISSING_ARGUMENT'],_0x231acc(0xb5),undefined,{'helpText':_0x231acc(0xae)});if(!Number[_0x231acc(0xa6)](_0x48e073)||_0x48e073<=0x0)throw new SDKError(ErrorCode[_0x231acc(0xbd)],'Limit\x20must\x20be\x20a\x20positive\x20integer',undefined,{'helpText':'Use\x20--limit\x20<number>\x20to\x20specify\x20row\x20limit\x20(must\x20be\x20positive).'});const _0x23c417=escapeStringLiteral(_0x2b8e96)[_0x231acc(0xb6)](0x1,-0x1)+'.'+escapeStringLiteral(_0x471e3d)['slice'](0x1,-0x1),_0x5c9f64=_0x231acc(0xb1)+_0x23c417+_0x231acc(0xbc)+_0x48e073,_0x3908d9=await this[_0x231acc(0xc0)][_0x231acc(0xbe)](_0x5c9f64,{'catalog':_0x142022,'schema':_0x2b8e96});return _0x3908d9;}catch(_0x1ac140){if(_0x1ac140 instanceof SDKError)throw _0x1ac140;throw _0x1ac140;}}}
|
package/dist/sdk/workflow.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a51_0x2df6ca=a51_0x2f4b;function a51_0x2f4b(_0x152e45,_0x305742){const _0x4e3a54=a51_0x4e3a();return a51_0x2f4b=function(_0x2f4b22,_0x14e4f6){_0x2f4b22=_0x2f4b22-0x117;let _0x54e345=_0x4e3a54[_0x2f4b22];return _0x54e345;},a51_0x2f4b(_0x152e45,_0x305742);}(function(_0x49822d,_0x39fc2d){const _0xb7e59a=a51_0x2f4b,_0x30e5b2=_0x49822d();while(!![]){try{const _0x101bd5=parseInt(_0xb7e59a(0x121))/0x1+parseInt(_0xb7e59a(0x159))/0x2+-parseInt(_0xb7e59a(0x15a))/0x3*(parseInt(_0xb7e59a(0x119))/0x4)+-parseInt(_0xb7e59a(0x151))/0x5*(-parseInt(_0xb7e59a(0x15c))/0x6)+-parseInt(_0xb7e59a(0x179))/0x7*(-parseInt(_0xb7e59a(0x139))/0x8)+parseInt(_0xb7e59a(0x11a))/0x9*(parseInt(_0xb7e59a(0x12d))/0xa)+-parseInt(_0xb7e59a(0x158))/0xb*(parseInt(_0xb7e59a(0x13a))/0xc);if(_0x101bd5===_0x39fc2d)break;else _0x30e5b2['push'](_0x30e5b2['shift']());}catch(_0x295ae8){_0x30e5b2['push'](_0x30e5b2['shift']());}}}(a51_0x4e3a,0xbd496));function a51_0x4e3a(){const _0x2d7803=['workflowName','scheduleFrom','fromTime','name','16jBwdgl','9806526uUBAzc','test','toTime','cancelRequested','project','retryParams','config','1213939MOLTey','retryAt','getTaskLogs','.tar.gz','download','endsWith','client','resumeFrom','status','NUMERIC_ID_PATTERN','last_id','join','10AAanbj','startedAt','isGroup','limit','state','toISOString','unlink','kill','tdx-workflow-','find','killAttempt','sessionId','8956896koxFZa','3925632AceGup','No\x20','finishedAt','lastAttempt','Project\x20not\x20found:\x20','sessionTime','retryAttempt','retrySession','clearSchedule','length','getAttempt','resolveProjectId','parentId','listSessions','logs','success','now','error','listAttempts','index','delete','tdx-workflow-push-','exportParams','785065ncLPKQ','path','push','skipValidation','force','clearScheduleAll','storeParams','143OZgLrG','2361836nftpNv','35277NdQhPA','projectName','18VoCVwm','attempts','filter','done','access','includeRetried','retryAttemptName','revision','deleteProject','lastId','create','listProjects','createdAt','message','workflow','upstreams','mkdir','Cannot\x20read\x20workflow\x20file:\x20','fullName','data','tar','sessionUuid','downloadProjectArchive','tmpdir','tasks','readdir','workflows','map','projects','7EUISAn'];a51_0x4e3a=function(){return _0x2d7803;};return a51_0x4e3a();}import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION}from'../utils/workflow-utils.js';export class WorkflowAPI{['client'];static [a51_0x2df6ca(0x12a)]=/^\d+$/;constructor(_0x52154c){const _0xfabba0=a51_0x2df6ca;this[_0xfabba0(0x127)]=_0x52154c;}async[a51_0x2df6ca(0x145)](_0x5542d9){const _0x17f483=a51_0x2df6ca;if(WorkflowAPI[_0x17f483(0x12a)][_0x17f483(0x11b)](_0x5542d9))return{'id':_0x5542d9,'name':_0x5542d9};const _0x55b976=await this[_0x17f483(0x127)][_0x17f483(0x167)]({'name_pattern':_0x5542d9}),_0x3c3dc8=_0x55b976[_0x17f483(0x16f)][_0x17f483(0x136)](_0x22e3ec=>_0x22e3ec['name']===_0x5542d9);if(!_0x3c3dc8)throw new Error('Project\x20not\x20found:\x20'+_0x5542d9);return{'id':_0x3c3dc8['id'],'name':_0x3c3dc8['name']};}async[a51_0x2df6ca(0x178)](_0x3f67c6,_0x1867ab){const _0xd8a4b0=a51_0x2df6ca,_0x538793=await this[_0xd8a4b0(0x127)]['listProjects']({'name_pattern':_0x3f67c6,..._0x1867ab});return _0x538793[_0xd8a4b0(0x16f)][_0xd8a4b0(0x177)](_0x54232f=>({..._0x54232f,'project_id':_0x54232f['id'],'project_name':_0x54232f['name']}));}async[a51_0x2df6ca(0x176)](_0x499505,_0x454aaa){const _0x595dd6=a51_0x2df6ca,_0x3c02f9=await this[_0x595dd6(0x127)]['listWorkflows']({'project_name':_0x499505,..._0x454aaa});return _0x3c02f9['data']['map'](_0x16b55d=>({'project_id':_0x16b55d[_0x595dd6(0x11e)]?.['id'],'project_name':_0x16b55d[_0x595dd6(0x11e)]?.[_0x595dd6(0x118)],'workflow_id':_0x16b55d['id'],'workflow_name':_0x16b55d[_0x595dd6(0x118)],'revision':_0x16b55d['revision'],'timezone':_0x16b55d['timezone'],'config':_0x16b55d[_0x595dd6(0x120)],'id':_0x16b55d['id'],'name':_0x16b55d[_0x595dd6(0x118)],'project':_0x16b55d[_0x595dd6(0x11e)]}));}async['sessions'](_0x2ab3ce){const _0x3caa15=a51_0x2df6ca;let _0x44186d;if(_0x2ab3ce?.[_0x3caa15(0x15b)]){let _0x1e71f3,_0x42239f=![];while(!_0x42239f){const _0x234b7f=await this[_0x3caa15(0x127)][_0x3caa15(0x167)]({'limit':0x64,'last_id':_0x1e71f3}),_0x395bf6=_0x234b7f[_0x3caa15(0x16f)][_0x3caa15(0x136)](_0x34918c=>_0x34918c[_0x3caa15(0x118)]===_0x2ab3ce[_0x3caa15(0x15b)]);if(_0x395bf6){_0x44186d=_0x395bf6['id'],_0x42239f=!![];break;}if(!_0x234b7f[_0x3caa15(0x165)]||_0x234b7f[_0x3caa15(0x16f)]['length']===0x0)break;_0x1e71f3=_0x234b7f['lastId'];}if(!_0x44186d)throw new Error(_0x3caa15(0x13e)+_0x2ab3ce[_0x3caa15(0x15b)]);}const _0xc79784=await this[_0x3caa15(0x127)][_0x3caa15(0x147)]({'project_id':_0x44186d,'project_name':_0x2ab3ce?.[_0x3caa15(0x15b)],'workflow_name':_0x2ab3ce?.[_0x3caa15(0x17a)],'status':_0x2ab3ce?.[_0x3caa15(0x129)],'from_time':_0x2ab3ce?.[_0x3caa15(0x117)],'to_time':_0x2ab3ce?.[_0x3caa15(0x11c)],'limit':_0x2ab3ce?.['limit'],'last_id':_0x2ab3ce?.['last_id']});return _0xc79784[_0x3caa15(0x16f)][_0x3caa15(0x177)](_0xc9ba93=>({'project_id':_0xc9ba93[_0x3caa15(0x11e)]?.['id'],'project_name':_0xc9ba93['project']?.[_0x3caa15(0x118)],'workflow_id':_0xc9ba93['workflow']?.['id'],'workflow_name':_0xc9ba93['workflow']?.[_0x3caa15(0x118)],'session_id':_0xc9ba93['id'],'sessionUuid':_0xc9ba93[_0x3caa15(0x171)],'sessionTime':_0xc9ba93['sessionTime'],'lastAttempt':_0xc9ba93[_0x3caa15(0x13d)],'id':_0xc9ba93['id'],'project':_0xc9ba93[_0x3caa15(0x11e)],'workflow':_0xc9ba93[_0x3caa15(0x16a)]}));}async[a51_0x2df6ca(0x15d)](_0x58e5b8){const _0x29e539=a51_0x2df6ca,_0x5ea6ee=await this[_0x29e539(0x127)][_0x29e539(0x14c)]({'project_name':_0x58e5b8?.[_0x29e539(0x15b)],'workflow_name':_0x58e5b8?.[_0x29e539(0x17a)],'include_retried':_0x58e5b8?.[_0x29e539(0x161)],'limit':_0x58e5b8?.[_0x29e539(0x130)],'last_id':_0x58e5b8?.[_0x29e539(0x12b)]});return _0x5ea6ee[_0x29e539(0x16f)][_0x29e539(0x177)](_0x1f27bb=>({'project_id':_0x1f27bb[_0x29e539(0x11e)]?.['id'],'project_name':_0x1f27bb['project']?.[_0x29e539(0x118)],'workflow_id':_0x1f27bb[_0x29e539(0x16a)]?.['id'],'workflow_name':_0x1f27bb[_0x29e539(0x16a)]?.['name'],'session_id':_0x1f27bb[_0x29e539(0x138)],'sessionUuid':_0x1f27bb[_0x29e539(0x171)],'sessionTime':_0x1f27bb[_0x29e539(0x13f)],'attempt_id':_0x1f27bb['id'],'attempt_index':_0x1f27bb['index'],'retryAttemptName':_0x1f27bb[_0x29e539(0x162)],'done':_0x1f27bb[_0x29e539(0x15f)],'success':_0x1f27bb[_0x29e539(0x149)],'cancelRequested':_0x1f27bb[_0x29e539(0x11d)],'params':_0x1f27bb['params'],'createdAt':_0x1f27bb[_0x29e539(0x168)],'finishedAt':_0x1f27bb[_0x29e539(0x13c)],'id':_0x1f27bb['id'],'index':_0x1f27bb[_0x29e539(0x14d)],'project':_0x1f27bb[_0x29e539(0x11e)],'workflow':_0x1f27bb['workflow']}));}async['attempt'](_0x238ac5){const _0x93f2a=a51_0x2df6ca,_0x2d2e3e=await this['client'][_0x93f2a(0x144)](_0x238ac5);return _0x2d2e3e;}async[a51_0x2df6ca(0x174)](_0x1bca8c,_0x475bd1=![]){const _0x1fddd6=a51_0x2df6ca,_0x5c6baa=await this[_0x1fddd6(0x127)]['getAttemptTasks'](_0x1bca8c,_0x475bd1);return _0x5c6baa['map'](_0x32a4dc=>({'task_id':_0x32a4dc['id'],'task_name':_0x32a4dc[_0x1fddd6(0x16e)],'parentId':_0x32a4dc[_0x1fddd6(0x146)],'config':_0x32a4dc[_0x1fddd6(0x120)],'upstreams':_0x32a4dc[_0x1fddd6(0x16b)],'state':_0x32a4dc[_0x1fddd6(0x131)],'exportParams':_0x32a4dc[_0x1fddd6(0x150)],'storeParams':_0x32a4dc[_0x1fddd6(0x157)],'stateParams':_0x32a4dc['stateParams'],'updatedAt':_0x32a4dc['updatedAt'],'retryAt':_0x32a4dc[_0x1fddd6(0x122)],'startedAt':_0x32a4dc[_0x1fddd6(0x12e)],'error':_0x32a4dc[_0x1fddd6(0x14b)],'isGroup':_0x32a4dc[_0x1fddd6(0x12f)],'id':_0x32a4dc['id'],'fullName':_0x32a4dc[_0x1fddd6(0x16e)]}));}async[a51_0x2df6ca(0x148)](_0x743528,_0x74fffd,_0x2e7049){const _0x5b380b=a51_0x2df6ca;return await this['client'][_0x5b380b(0x123)](_0x743528,_0x74fffd,_0x2e7049);}async[a51_0x2df6ca(0x134)](_0x55bf6d,_0x3f9a85){const _0x2e9a2f=a51_0x2df6ca,_0x171c24=await this[_0x2e9a2f(0x127)][_0x2e9a2f(0x137)](_0x55bf6d,_0x3f9a85);return _0x171c24[_0x2e9a2f(0x169)];}async['retrySession'](_0x2cb5f2,_0x2d6f22){const _0x1eaab5=a51_0x2df6ca,_0x1e7a92=await this[_0x1eaab5(0x127)][_0x1eaab5(0x141)](_0x2cb5f2,{'from_task':_0x2d6f22?.['fromTask'],'retry_params':_0x2d6f22?.[_0x1eaab5(0x11f)]});return{'attemptId':_0x1e7a92['id'],'sessionId':_0x1e7a92[_0x1eaab5(0x138)]};}async[a51_0x2df6ca(0x140)](_0x55d7b2,_0x119477){const _0x227870=a51_0x2df6ca,_0x181fcf=await this[_0x227870(0x127)]['retryAttempt'](_0x55d7b2,{'resume_from':_0x119477?.[_0x227870(0x128)],'retry_params':_0x119477?.[_0x227870(0x11f)],'force':_0x119477?.[_0x227870(0x155)]});return{'attemptId':_0x181fcf['id'],'sessionId':_0x181fcf[_0x227870(0x138)]};}async[a51_0x2df6ca(0x125)](_0x1e9b84,_0x140039,_0x6604d5){const _0x44999c=a51_0x2df6ca,{promises:_0x18314e}=await import('fs'),_0x3dfec7=await import(_0x44999c(0x152)),_0x2d8989=await import('os'),_0x55e3b6=await import(_0x44999c(0x170)),{id:_0x381b03,name:_0x384bfa}=await this[_0x44999c(0x145)](_0x1e9b84),_0x2eaacf=_0x2d8989[_0x44999c(0x173)](),_0x4a3ae5=_0x3dfec7[_0x44999c(0x12c)](_0x2eaacf,_0x44999c(0x135)+_0x381b03+'-'+Date[_0x44999c(0x14a)]()+_0x44999c(0x124));try{await this[_0x44999c(0x127)][_0x44999c(0x172)](_0x381b03,_0x4a3ae5,_0x6604d5?.['revision']);const _0x1c0af2=_0x3dfec7[_0x44999c(0x12c)](_0x140039,_0x384bfa);await _0x18314e[_0x44999c(0x16c)](_0x1c0af2,{'recursive':!![]}),await _0x55e3b6['extract']({'file':_0x4a3ae5,'cwd':_0x1c0af2,'gzip':!![]});const _0x49a283=async _0x5cc485=>{const _0x572bbe=_0x44999c;let _0x75af9d=0x0;const _0x14e438=await _0x18314e[_0x572bbe(0x175)](_0x5cc485,{'withFileTypes':!![]});for(const _0x56c60f of _0x14e438){const _0xedb3b5=_0x3dfec7[_0x572bbe(0x12c)](_0x5cc485,_0x56c60f[_0x572bbe(0x118)]);if(_0x56c60f['isFile']())_0x75af9d++;else _0x56c60f['isDirectory']()&&(_0x75af9d+=await _0x49a283(_0xedb3b5));}return _0x75af9d;},_0x21d6f2=await _0x49a283(_0x1c0af2);return{'projectName':_0x384bfa,'revision':_0x6604d5?.[_0x44999c(0x163)]||'latest','filesExtracted':_0x21d6f2};}finally{try{await _0x18314e[_0x44999c(0x133)](_0x4a3ae5);}catch{}}}async[a51_0x2df6ca(0x153)](_0x5cd123,_0x52b014){const _0x563c48=a51_0x2df6ca,{promises:_0x3ac6fc}=await import('fs'),_0x35d5e8=await import(_0x563c48(0x152)),_0x320cf1=await import('tar'),_0x1ca37a=_0x52b014?.['projectName']||_0x35d5e8['basename'](_0x5cd123),_0x14a156=_0x52b014?.['revision']||new Date()[_0x563c48(0x132)]()['replace'](/[:.]/g,'-');try{await _0x3ac6fc[_0x563c48(0x160)](_0x5cd123);}catch{throw new Error('Project\x20directory\x20not\x20found:\x20'+_0x5cd123);}if(!_0x52b014?.[_0x563c48(0x154)]){const _0x163571=await _0x3ac6fc['readdir'](_0x5cd123),_0xe2015e=_0x163571[_0x563c48(0x15e)](_0x4e802d=>_0x4e802d[_0x563c48(0x126)](WORKFLOW_FILE_EXTENSION));if(_0xe2015e[_0x563c48(0x143)]===0x0)throw new Error(_0x563c48(0x13b)+WORKFLOW_FILE_EXTENSION+'\x20workflow\x20files\x20found\x20in\x20project\x20directory');for(const _0xb22ef1 of _0xe2015e){const _0x5e2584=_0x35d5e8[_0x563c48(0x12c)](_0x5cd123,_0xb22ef1);try{await _0x3ac6fc[_0x563c48(0x160)](_0x5e2584);}catch{throw new Error(_0x563c48(0x16d)+_0xb22ef1);}}}const _0xf87cad=async(_0x3b97e2,_0x251026='')=>{const _0x14ac4d=_0x563c48,_0x3b8a8c=await _0x3ac6fc[_0x14ac4d(0x175)](_0x3b97e2,{'withFileTypes':!![]}),_0x5b82f8=[];for(const _0x1896e2 of _0x3b8a8c){const _0x2ea19d=_0x35d5e8[_0x14ac4d(0x12c)](_0x251026,_0x1896e2['name']),_0x115c8d=_0x35d5e8[_0x14ac4d(0x12c)](_0x3b97e2,_0x1896e2['name']);if(!shouldIncludeInArchive(_0x1896e2[_0x14ac4d(0x118)]))continue;_0x1896e2['isDirectory']()?_0x5b82f8[_0x14ac4d(0x153)](...await _0xf87cad(_0x115c8d,_0x2ea19d)):_0x5b82f8[_0x14ac4d(0x153)](_0x2ea19d);}return _0x5b82f8;},_0x20b3df=await _0xf87cad(_0x5cd123),_0x444028=await import('os'),_0x4b4cf1=_0x444028['tmpdir'](),_0x3c23a7=_0x35d5e8[_0x563c48(0x12c)](_0x4b4cf1,_0x563c48(0x14f)+Date[_0x563c48(0x14a)]()+_0x563c48(0x124));try{await _0x320cf1[_0x563c48(0x166)]({'file':_0x3c23a7,'gzip':!![],'cwd':_0x5cd123,'portable':!![]},_0x20b3df);const _0x4e410b=await this[_0x563c48(0x127)]['uploadProjectArchive'](_0x1ca37a,_0x14a156,_0x3c23a7,{'scheduleFrom':_0x52b014?.[_0x563c48(0x17b)],'clearSchedule':_0x52b014?.[_0x563c48(0x142)],'clearScheduleAll':_0x52b014?.[_0x563c48(0x156)]});return{'projectId':_0x4e410b['id'],'projectName':_0x4e410b['name'],'revision':_0x4e410b[_0x563c48(0x163)]};}finally{try{await _0x3ac6fc[_0x563c48(0x133)](_0x3c23a7);}catch{}}}async[a51_0x2df6ca(0x14e)](_0x926f5e){const _0x216b98=a51_0x2df6ca,{id:_0x5d4f32}=await this['resolveProjectId'](_0x926f5e),_0xc52a56=await this[_0x216b98(0x127)][_0x216b98(0x164)](_0x5d4f32);return{'projectId':_0xc52a56['id'],'projectName':_0xc52a56[_0x216b98(0x118)]};}}
|
|
1
|
+
const a51_0x379a9e=a51_0x5bd3;(function(_0xe413e0,_0x4ea4b9){const _0x349414=a51_0x5bd3,_0x5acc49=_0xe413e0();while(!![]){try{const _0x560e3f=parseInt(_0x349414(0x108))/0x1+-parseInt(_0x349414(0x100))/0x2*(parseInt(_0x349414(0xea))/0x3)+parseInt(_0x349414(0xe5))/0x4*(-parseInt(_0x349414(0x10d))/0x5)+parseInt(_0x349414(0x103))/0x6*(-parseInt(_0x349414(0xda))/0x7)+-parseInt(_0x349414(0x123))/0x8+parseInt(_0x349414(0x10c))/0x9+parseInt(_0x349414(0xc8))/0xa;if(_0x560e3f===_0x4ea4b9)break;else _0x5acc49['push'](_0x5acc49['shift']());}catch(_0xc2416c){_0x5acc49['push'](_0x5acc49['shift']());}}}(a51_0x49dd,0x2987c));function a51_0x5bd3(_0x25ddd9,_0x5bfe55){const _0x49ddd7=a51_0x49dd();return a51_0x5bd3=function(_0x5bd372,_0x4b4b20){_0x5bd372=_0x5bd372-0xc8;let _0x38cbba=_0x49ddd7[_0x5bd372];return _0x38cbba;},a51_0x5bd3(_0x25ddd9,_0x5bfe55);}import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION}from'../utils/workflow-utils.js';export class WorkflowAPI{[a51_0x379a9e(0xcd)];static ['NUMERIC_ID_PATTERN']=/^\d+$/;constructor(_0x3c7875){const _0x3d1f46=a51_0x379a9e;this[_0x3d1f46(0xcd)]=_0x3c7875;}async['resolveProjectId'](_0x3dc56b){const _0x46efe1=a51_0x379a9e;if(WorkflowAPI['NUMERIC_ID_PATTERN'][_0x46efe1(0xd7)](_0x3dc56b))return{'id':_0x3dc56b,'name':_0x3dc56b};const _0x15ded4=await this['client'][_0x46efe1(0x114)]({'name_pattern':_0x3dc56b}),_0x37f8f0=_0x15ded4[_0x46efe1(0x121)]['find'](_0x4998ff=>_0x4998ff[_0x46efe1(0x11a)]===_0x3dc56b);if(!_0x37f8f0)throw new Error(_0x46efe1(0xef)+_0x3dc56b);return{'id':_0x37f8f0['id'],'name':_0x37f8f0[_0x46efe1(0x11a)]};}async[a51_0x379a9e(0x11d)](_0x5520c6,_0x308d1b){const _0x2aadc2=a51_0x379a9e,_0x29d7d6=await this[_0x2aadc2(0xcd)][_0x2aadc2(0x114)]({'name_pattern':_0x5520c6,..._0x308d1b});return _0x29d7d6[_0x2aadc2(0x121)][_0x2aadc2(0x112)](_0x160417=>({..._0x160417,'project_id':_0x160417['id'],'project_name':_0x160417['name']}));}async['workflows'](_0x52fd6a,_0x3d5b9c){const _0x46f608=a51_0x379a9e,_0x438b72=await this[_0x46f608(0xcd)][_0x46f608(0x106)]({'project_name':_0x52fd6a,..._0x3d5b9c});return _0x438b72[_0x46f608(0x121)][_0x46f608(0x112)](_0x3fc2c0=>({'project_id':_0x3fc2c0[_0x46f608(0x109)]?.['id'],'project_name':_0x3fc2c0[_0x46f608(0x109)]?.[_0x46f608(0x11a)],'workflow_id':_0x3fc2c0['id'],'workflow_name':_0x3fc2c0[_0x46f608(0x11a)],'revision':_0x3fc2c0['revision'],'timezone':_0x3fc2c0[_0x46f608(0x110)],'config':_0x3fc2c0[_0x46f608(0xfc)],'id':_0x3fc2c0['id'],'name':_0x3fc2c0[_0x46f608(0x11a)],'project':_0x3fc2c0[_0x46f608(0x109)]}));}async['sessions'](_0x547530){const _0x366c78=a51_0x379a9e;let _0xecfbb5;if(_0x547530?.[_0x366c78(0xf7)]){let _0x4452ba,_0x3d04f9=![];while(!_0x3d04f9){const _0x1291b9=await this[_0x366c78(0xcd)][_0x366c78(0x114)]({'limit':0x64,'last_id':_0x4452ba}),_0x4659f1=_0x1291b9[_0x366c78(0x121)]['find'](_0x3d17fb=>_0x3d17fb['name']===_0x547530[_0x366c78(0xf7)]);if(_0x4659f1){_0xecfbb5=_0x4659f1['id'],_0x3d04f9=!![];break;}if(!_0x1291b9[_0x366c78(0x107)]||_0x1291b9[_0x366c78(0x121)]['length']===0x0)break;_0x4452ba=_0x1291b9[_0x366c78(0x107)];}if(!_0xecfbb5)throw new Error(_0x366c78(0xef)+_0x547530[_0x366c78(0xf7)]);}const _0x3aac59=await this['client'][_0x366c78(0xe9)]({'project_id':_0xecfbb5,'project_name':_0x547530?.[_0x366c78(0xf7)],'workflow_name':_0x547530?.[_0x366c78(0xdb)],'status':_0x547530?.[_0x366c78(0x10f)],'from_time':_0x547530?.[_0x366c78(0xe1)],'to_time':_0x547530?.[_0x366c78(0xfe)],'limit':_0x547530?.[_0x366c78(0xe6)],'last_id':_0x547530?.[_0x366c78(0x11b)]});return _0x3aac59['data'][_0x366c78(0x112)](_0x483e35=>({'project_id':_0x483e35['project']?.['id'],'project_name':_0x483e35[_0x366c78(0x109)]?.[_0x366c78(0x11a)],'workflow_id':_0x483e35[_0x366c78(0xd1)]?.['id'],'workflow_name':_0x483e35[_0x366c78(0xd1)]?.[_0x366c78(0x11a)],'session_id':_0x483e35['id'],'sessionUuid':_0x483e35['sessionUuid'],'sessionTime':_0x483e35[_0x366c78(0xd2)],'lastAttempt':_0x483e35[_0x366c78(0xca)],'id':_0x483e35['id'],'project':_0x483e35[_0x366c78(0x109)],'workflow':_0x483e35[_0x366c78(0xd1)]}));}async[a51_0x379a9e(0xdc)](_0x4186c9){const _0x11bd20=a51_0x379a9e,_0x239b8c=await this[_0x11bd20(0xcd)]['listAttempts']({'project_name':_0x4186c9?.[_0x11bd20(0xf7)],'workflow_name':_0x4186c9?.[_0x11bd20(0xdb)],'include_retried':_0x4186c9?.['includeRetried'],'limit':_0x4186c9?.[_0x11bd20(0xe6)],'last_id':_0x4186c9?.[_0x11bd20(0x11b)]});return _0x239b8c['data'][_0x11bd20(0x112)](_0x37bc77=>({'project_id':_0x37bc77[_0x11bd20(0x109)]?.['id'],'project_name':_0x37bc77[_0x11bd20(0x109)]?.['name'],'workflow_id':_0x37bc77['workflow']?.['id'],'workflow_name':_0x37bc77[_0x11bd20(0xd1)]?.[_0x11bd20(0x11a)],'session_id':_0x37bc77['sessionId'],'sessionUuid':_0x37bc77['sessionUuid'],'sessionTime':_0x37bc77[_0x11bd20(0xd2)],'attempt_id':_0x37bc77['id'],'attempt_index':_0x37bc77[_0x11bd20(0xce)],'retryAttemptName':_0x37bc77[_0x11bd20(0x11c)],'done':_0x37bc77[_0x11bd20(0x111)],'success':_0x37bc77[_0x11bd20(0x117)],'cancelRequested':_0x37bc77[_0x11bd20(0xfd)],'params':_0x37bc77[_0x11bd20(0xc9)],'createdAt':_0x37bc77[_0x11bd20(0xd0)],'finishedAt':_0x37bc77['finishedAt'],'id':_0x37bc77['id'],'index':_0x37bc77['index'],'project':_0x37bc77[_0x11bd20(0x109)],'workflow':_0x37bc77[_0x11bd20(0xd1)]}));}async[a51_0x379a9e(0x113)](_0x1d2a12){const _0x303398=a51_0x379a9e,_0x269ba5=await this[_0x303398(0xcd)]['getAttempt'](_0x1d2a12);return _0x269ba5;}async['tasks'](_0xd0d9fe,_0x13d2b1=![]){const _0x273e0d=a51_0x379a9e,_0x426c35=await this[_0x273e0d(0xcd)]['getAttemptTasks'](_0xd0d9fe,_0x13d2b1);return _0x426c35['map'](_0x31e079=>({'task_id':_0x31e079['id'],'task_name':_0x31e079[_0x273e0d(0x120)],'parentId':_0x31e079[_0x273e0d(0xdd)],'config':_0x31e079[_0x273e0d(0xfc)],'upstreams':_0x31e079[_0x273e0d(0xfb)],'state':_0x31e079[_0x273e0d(0xcb)],'exportParams':_0x31e079[_0x273e0d(0x119)],'storeParams':_0x31e079['storeParams'],'stateParams':_0x31e079[_0x273e0d(0x11e)],'updatedAt':_0x31e079['updatedAt'],'retryAt':_0x31e079[_0x273e0d(0xf6)],'startedAt':_0x31e079[_0x273e0d(0xd9)],'error':_0x31e079[_0x273e0d(0xe4)],'isGroup':_0x31e079[_0x273e0d(0xf2)],'id':_0x31e079['id'],'fullName':_0x31e079[_0x273e0d(0x120)]}));}async[a51_0x379a9e(0xe7)](_0x45f87b,_0x202656,_0x2adc63){const _0x12c640=a51_0x379a9e;return await this[_0x12c640(0xcd)][_0x12c640(0x122)](_0x45f87b,_0x202656,_0x2adc63);}async[a51_0x379a9e(0xe2)](_0x16d9bd,_0x890010){const _0x45afea=a51_0x379a9e,_0x1f63d1=await this[_0x45afea(0xcd)][_0x45afea(0xde)](_0x16d9bd,_0x890010);return _0x1f63d1[_0x45afea(0xf5)];}async['retrySession'](_0x3a3be3,_0x9c504e){const _0x54f2c6=a51_0x379a9e,_0x2a9ecb=await this['client'][_0x54f2c6(0xd3)](_0x3a3be3,{'from_task':_0x9c504e?.['fromTask'],'retry_params':_0x9c504e?.[_0x54f2c6(0x10a)]});return{'attemptId':_0x2a9ecb['id'],'sessionId':_0x2a9ecb[_0x54f2c6(0x10e)]};}async[a51_0x379a9e(0xf3)](_0x1d8b41,_0x67beb6){const _0x4d7664=a51_0x379a9e,_0x35412e=await this[_0x4d7664(0xcd)][_0x4d7664(0xf3)](_0x1d8b41,{'resume_from':_0x67beb6?.[_0x4d7664(0xed)],'retry_params':_0x67beb6?.['retryParams'],'force':_0x67beb6?.[_0x4d7664(0xe0)]});return{'attemptId':_0x35412e['id'],'sessionId':_0x35412e[_0x4d7664(0x10e)]};}async[a51_0x379a9e(0x102)](_0x50ec1e,_0x1a2f4e,_0x3ab2e3){const _0x574b4b=a51_0x379a9e,{promises:_0x1ab971}=await import('fs'),_0x3ac9e8=await import(_0x574b4b(0xf8)),_0x3c90b0=await import('os'),_0x2e4137=await import(_0x574b4b(0xe8)),{id:_0x4848e8,name:_0x382bd4}=await this[_0x574b4b(0xd8)](_0x50ec1e),_0x196e90=_0x3c90b0['tmpdir'](),_0x24d922=_0x3ac9e8[_0x574b4b(0x101)](_0x196e90,_0x574b4b(0xe3)+_0x4848e8+'-'+Date[_0x574b4b(0x115)]()+_0x574b4b(0xfa));try{await this[_0x574b4b(0xcd)][_0x574b4b(0x118)](_0x4848e8,_0x24d922,_0x3ab2e3?.[_0x574b4b(0xcf)]);const _0x3c621c=_0x3ac9e8[_0x574b4b(0x101)](_0x1a2f4e,_0x382bd4);await _0x1ab971['mkdir'](_0x3c621c,{'recursive':!![]}),await _0x2e4137[_0x574b4b(0xd6)]({'file':_0x24d922,'cwd':_0x3c621c,'gzip':!![]});const _0x553217=async _0x327227=>{const _0x323889=_0x574b4b;let _0x3c7cf7=0x0;const _0xc6f5ed=await _0x1ab971[_0x323889(0xf0)](_0x327227,{'withFileTypes':!![]});for(const _0x490119 of _0xc6f5ed){const _0xb7766c=_0x3ac9e8[_0x323889(0x101)](_0x327227,_0x490119[_0x323889(0x11a)]);if(_0x490119['isFile']())_0x3c7cf7++;else _0x490119['isDirectory']()&&(_0x3c7cf7+=await _0x553217(_0xb7766c));}return _0x3c7cf7;},_0x3f765f=await _0x553217(_0x3c621c);return{'projectName':_0x382bd4,'revision':_0x3ab2e3?.[_0x574b4b(0xcf)]||_0x574b4b(0xf9),'filesExtracted':_0x3f765f};}finally{try{await _0x1ab971[_0x574b4b(0xeb)](_0x24d922);}catch{}}}async[a51_0x379a9e(0x104)](_0x2852ac,_0x4711ef){const _0x5d11cd=a51_0x379a9e,{promises:_0x2c847e}=await import('fs'),_0x46fe64=await import('path'),_0x2d69c6=await import(_0x5d11cd(0xe8)),_0x199d73=_0x4711ef?.[_0x5d11cd(0xf7)]||_0x46fe64[_0x5d11cd(0xee)](_0x2852ac),_0x1f4dfa=_0x4711ef?.[_0x5d11cd(0xcf)]||new Date()['toISOString']()[_0x5d11cd(0x11f)](/[:.]/g,'-');try{await _0x2c847e[_0x5d11cd(0x105)](_0x2852ac);}catch{throw new Error(_0x5d11cd(0x116)+_0x2852ac);}if(!_0x4711ef?.['skipValidation']){const _0x381586=await _0x2c847e['readdir'](_0x2852ac),_0x55e3c8=_0x381586[_0x5d11cd(0x10b)](_0x55469b=>_0x55469b[_0x5d11cd(0xcc)](WORKFLOW_FILE_EXTENSION));if(_0x55e3c8['length']===0x0)throw new Error('No\x20'+WORKFLOW_FILE_EXTENSION+_0x5d11cd(0xd4));for(const _0x493d64 of _0x55e3c8){const _0x2627c1=_0x46fe64[_0x5d11cd(0x101)](_0x2852ac,_0x493d64);try{await _0x2c847e[_0x5d11cd(0x105)](_0x2627c1);}catch{throw new Error(_0x5d11cd(0x124)+_0x493d64);}}}const _0xbc4241=async(_0x59e327,_0x3f4df9='')=>{const _0x5c53c0=_0x5d11cd,_0xe2f3b1=await _0x2c847e[_0x5c53c0(0xf0)](_0x59e327,{'withFileTypes':!![]}),_0x202499=[];for(const _0x3fcb8f of _0xe2f3b1){const _0x15749f=_0x46fe64[_0x5c53c0(0x101)](_0x3f4df9,_0x3fcb8f[_0x5c53c0(0x11a)]),_0x22d4fa=_0x46fe64[_0x5c53c0(0x101)](_0x59e327,_0x3fcb8f[_0x5c53c0(0x11a)]);if(!shouldIncludeInArchive(_0x3fcb8f[_0x5c53c0(0x11a)]))continue;_0x3fcb8f['isDirectory']()?_0x202499[_0x5c53c0(0x104)](...await _0xbc4241(_0x22d4fa,_0x15749f)):_0x202499['push'](_0x15749f);}return _0x202499;},_0x53a670=await _0xbc4241(_0x2852ac),_0x24a42a=await import('os'),_0x4689c2=_0x24a42a['tmpdir'](),_0x5089bc=_0x46fe64[_0x5d11cd(0x101)](_0x4689c2,_0x5d11cd(0xff)+Date[_0x5d11cd(0x115)]()+_0x5d11cd(0xfa));try{await _0x2d69c6['create']({'file':_0x5089bc,'gzip':!![],'cwd':_0x2852ac,'portable':!![]},_0x53a670);const _0x5383ea=await this['client'][_0x5d11cd(0xdf)](_0x199d73,_0x1f4dfa,_0x5089bc,{'scheduleFrom':_0x4711ef?.[_0x5d11cd(0xf1)],'clearSchedule':_0x4711ef?.[_0x5d11cd(0xf4)],'clearScheduleAll':_0x4711ef?.[_0x5d11cd(0xd5)]});return{'projectId':_0x5383ea['id'],'projectName':_0x5383ea[_0x5d11cd(0x11a)],'revision':_0x5383ea[_0x5d11cd(0xcf)]};}finally{try{await _0x2c847e[_0x5d11cd(0xeb)](_0x5089bc);}catch{}}}async['delete'](_0x418a2f){const _0x2275e2=a51_0x379a9e,{id:_0xd8b9a4}=await this[_0x2275e2(0xd8)](_0x418a2f),_0x1075f2=await this[_0x2275e2(0xcd)][_0x2275e2(0xec)](_0xd8b9a4);return{'projectId':_0x1075f2['id'],'projectName':_0x1075f2[_0x2275e2(0x11a)]};}}function a51_0x49dd(){const _0xff9047=['sessionId','status','timezone','done','map','attempt','listProjects','now','Project\x20directory\x20not\x20found:\x20','success','downloadProjectArchive','exportParams','name','last_id','retryAttemptName','projects','stateParams','replace','fullName','data','getTaskLogs','364696GezBNr','Cannot\x20read\x20workflow\x20file:\x20','3718770EAQJCf','params','lastAttempt','state','endsWith','client','index','revision','createdAt','workflow','sessionTime','retrySession','\x20workflow\x20files\x20found\x20in\x20project\x20directory','clearScheduleAll','extract','test','resolveProjectId','startedAt','233723cXhBEs','workflowName','attempts','parentId','killAttempt','uploadProjectArchive','force','fromTime','kill','tdx-workflow-','error','1065604jgmNGK','limit','logs','tar','listSessions','12LqZGPx','unlink','deleteProject','resumeFrom','basename','Project\x20not\x20found:\x20','readdir','scheduleFrom','isGroup','retryAttempt','clearSchedule','message','retryAt','projectName','path','latest','.tar.gz','upstreams','config','cancelRequested','toTime','tdx-workflow-push-','71594GGtNHo','join','download','18sBvhsf','push','access','listWorkflows','lastId','180879EhBrWS','project','retryParams','filter','1554255KLQolH','5FhsvcE'];a51_0x49dd=function(){return _0xff9047;};return a51_0x49dd();}
|
package/dist/types/endpoints.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a54_0x5d970=a54_0x7bcb;(function(_0x6ba220,_0x2f43bf){const _0x7b9927=a54_0x7bcb,_0x5e3aa3=_0x6ba220();while(!![]){try{const _0x5cf143=parseInt(_0x7b9927(0x93))/0x1+-parseInt(_0x7b9927(0xae))/0x2*(-parseInt(_0x7b9927(0x9f))/0x3)+-parseInt(_0x7b9927(0xaa))/0x4*(-parseInt(_0x7b9927(0x9b))/0x5)+parseInt(_0x7b9927(0xa8))/0x6+-parseInt(_0x7b9927(0xb4))/0x7+-parseInt(_0x7b9927(0xb8))/0x8+-parseInt(_0x7b9927(0x97))/0x9;if(_0x5cf143===_0x2f43bf)break;else _0x5e3aa3['push'](_0x5e3aa3['shift']());}catch(_0x5e983){_0x5e3aa3['push'](_0x5e3aa3['shift']());}}}(a54_0x2f00,0x74458));export const TD_ENDPOINTS={'us01':a54_0x5d970(0x96),'jp01':a54_0x5d970(0xa1),'eu01':a54_0x5d970(0x99),'ap02':'https://api.ap02.treasuredata.com','ap03':a54_0x5d970(0x9c),'dev-us01':'https://api-development.us01.treasuredata.com','dev-eu01':a54_0x5d970(0xa6),'stg-us01':a54_0x5d970(0x9e),'stg-jp01':'https://api-staging.treasuredata.co.jp','stg-ap03':'https://api-staging.ap03.treasuredata.com'};export const CDP_ENDPOINTS={'us01':'https://api-cdp.treasuredata.com','jp01':a54_0x5d970(0xa9),'eu01':a54_0x5d970(0xb3),'ap02':'https://api-cdp.ap02.treasuredata.com','ap03':a54_0x5d970(0xad),'dev-us01':a54_0x5d970(0xa4),'dev-eu01':a54_0x5d970(0xa2),'stg-us01':'https://api-staging-cdp.us01.treasuredata.com','stg-jp01':a54_0x5d970(0xb2),'stg-ap03':a54_0x5d970(0xab)};function a54_0x2f00(){const _0x3eeb49=['31925raoKsx','https://api.ap03.treasuredata.com','https://api-workflow.eu01.treasuredata.com','https://api-staging.us01.treasuredata.com','3DOBJin','https://api-development-presto.treasuredata.com','https://api.treasuredata.co.jp','https://api-development-cdp.eu01.treasuredata.com','https://llm-api-staging.treasuredata.co.jp','https://api-development-cdp.us01.treasuredata.com','https://llm-api-development.us01.treasuredata.com','https://api-development.eu01.treasuredata.com','\x27\x20and\x20site\x20\x27','4491780qWsukV','https://api-cdp.treasuredata.co.jp','24XHxXRo','https://api-staging-cdp.ap03.treasuredata.com','https://api-staging-presto.ap03.treasuredata.com','https://api-cdp.ap03.treasuredata.com','1410092KoeFWT','https://api-staging-workflow.ap03.treasuredata.com','https://llm-api.eu01.treasuredata.com','https://api-presto.ap02.treasuredata.com','https://api-staging-cdp.treasuredata.co.jp','https://api-cdp.eu01.treasuredata.com','3736866FzQpik','https://llm-api.ap03.treasuredata.com','https://llm-api.treasuredata.co.jp','No\x20endpoint\x20defined\x20for\x20API\x20type\x20\x27','745080qUxmGG','https://api-presto.eu01.treasuredata.com','https://api-staging-workflow.us01.treasuredata.com','586660yocGmU','https://llm-api.treasuredata.com','https://api-staging-presto.treasuredata.co.jp','https://api.treasuredata.com','8778825lkVDfJ','https://api-development-presto.eu01.treasuredata.com','https://api.eu01.treasuredata.com','https://llm-api.ap02.treasuredata.com'];a54_0x2f00=function(){return _0x3eeb49;};return a54_0x2f00();}export const WORKFLOW_ENDPOINTS={'us01':'https://api-workflow.treasuredata.com','jp01':'https://api-workflow.treasuredata.co.jp','eu01':a54_0x5d970(0x9d),'ap02':'https://api-workflow.ap02.treasuredata.com','ap03':'https://api-workflow.ap03.treasuredata.com','dev-us01':'https://api-development-workflow.us01.treasuredata.com','dev-eu01':'https://api-development-workflow.eu01.treasuredata.com','stg-us01':a54_0x5d970(0x92),'stg-jp01':'https://api-staging-workflow.treasuredata.co.jp','stg-ap03':a54_0x5d970(0xaf)};export const TRINO_ENDPOINTS={'us01':'https://api-presto.treasuredata.com','jp01':'https://api-presto.treasuredata.co.jp','eu01':a54_0x5d970(0xb9),'ap02':a54_0x5d970(0xb1),'ap03':'https://api-presto.ap03.treasuredata.com','dev-us01':a54_0x5d970(0xa0),'dev-eu01':a54_0x5d970(0x98),'stg-us01':'https://api-staging-presto.treasuredata.com','stg-jp01':a54_0x5d970(0x95),'stg-ap03':a54_0x5d970(0xac)};function a54_0x7bcb(_0x32314b,_0x368acd){const _0x2f0091=a54_0x2f00();return a54_0x7bcb=function(_0x7bcb1f,_0x3092e6){_0x7bcb1f=_0x7bcb1f-0x92;let _0x14127f=_0x2f0091[_0x7bcb1f];return _0x14127f;},a54_0x7bcb(_0x32314b,_0x368acd);}export const LLM_ENDPOINTS={'us01':a54_0x5d970(0x94),'jp01':a54_0x5d970(0xb6),'eu01':a54_0x5d970(0xb0),'ap02':a54_0x5d970(0x9a),'ap03':a54_0x5d970(0xb5),'dev-us01':a54_0x5d970(0xa5),'dev-eu01':'https://llm-api-development.eu01.treasuredata.com','stg-us01':'https://llm-api-staging.us01.treasuredata.com','stg-jp01':a54_0x5d970(0xa3),'stg-ap03':'https://llm-api-staging.ap03.treasuredata.com'};export const API_ENDPOINTS={'td':TD_ENDPOINTS,'cdp':CDP_ENDPOINTS,'workflow':WORKFLOW_ENDPOINTS,'trino':TRINO_ENDPOINTS,'llm':LLM_ENDPOINTS};export function getEndpoint(_0x2f7876,_0x8b23b2='td'){const _0x419ff4=a54_0x5d970,_0x3e41a7=API_ENDPOINTS[_0x8b23b2]?.[_0x2f7876];if(!_0x3e41a7)throw new Error(_0x419ff4(0xb7)+_0x8b23b2+_0x419ff4(0xa7)+_0x2f7876+'\x27');return _0x3e41a7;}
|
package/dist/types/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a55_0x4f59(){const _0x4b702c=['1599376GlCyCr','19314unQfTv','11420220UyAyUK','stg-us01','jp01','6656629CfkWRo','8LTscwb','9793629gGwhbn','2826300RUJnzt','41660FQxkfT','us01','1KdQGaD','66FbulBE','dev-us01','1675GLnZwX','12dGbNGK'];a55_0x4f59=function(){return _0x4b702c;};return a55_0x4f59();}const a55_0x50bb70=a55_0x402a;(function(_0x552f97,_0x219eb1){const _0x30d380=a55_0x402a,_0xabe15c=_0x552f97();while(!![]){try{const _0x4292d7=parseInt(_0x30d380(0xed))/0x1*(-parseInt(_0x30d380(0xf2))/0x2)+parseInt(_0x30d380(0xf1))/0x3*(parseInt(_0x30d380(0xeb))/0x4)+parseInt(_0x30d380(0xf0))/0x5*(-parseInt(_0x30d380(0xe3))/0x6)+parseInt(_0x30d380(0xe7))/0x7*(parseInt(_0x30d380(0xe8))/0x8)+-parseInt(_0x30d380(0xe9))/0x9+parseInt(_0x30d380(0xe4))/0xa+parseInt(_0x30d380(0xee))/0xb*(parseInt(_0x30d380(0xea))/0xc);if(_0x4292d7===_0x219eb1)break;else _0xabe15c['push'](_0xabe15c['shift']());}catch(_0x33c4af){_0xabe15c['push'](_0xabe15c['shift']());}}}(a55_0x4f59,0x8dfa9));export const SITE_ALIASES={'us':'us01','aws':a55_0x50bb70(0xec),'jp':a55_0x50bb70(0xe6),'aws-tokyo':a55_0x50bb70(0xe6),'dev':a55_0x50bb70(0xef),'stg':a55_0x50bb70(0xe5)};function a55_0x402a(_0x153411,_0x5da23e){const _0x4f596f=a55_0x4f59();return a55_0x402a=function(_0x402a73,_0x31fa16){_0x402a73=_0x402a73-0xe3;let _0x5a7f4b=_0x4f596f[_0x402a73];return _0x5a7f4b;},a55_0x402a(_0x153411,_0x5da23e);}export{getEndpoint,API_ENDPOINTS}from'./endpoints.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1b5e7f,_0x43f18e){const _0x502c84=a58_0x363c,_0x579ece=_0x1b5e7f();while(!![]){try{const _0x1dd95e=parseInt(_0x502c84(0xf0))/0x1+-parseInt(_0x502c84(0xf8))/0x2*(parseInt(_0x502c84(0xf6))/0x3)+parseInt(_0x502c84(0xfa))/0x4*(-parseInt(_0x502c84(0xec))/0x5)+parseInt(_0x502c84(0xed))/0x6*(-parseInt(_0x502c84(0xeb))/0x7)+-parseInt(_0x502c84(0xf9))/0x8+parseInt(_0x502c84(0xf5))/0x9*(-parseInt(_0x502c84(0xf2))/0xa)+parseInt(_0x502c84(0xfb))/0xb;if(_0x1dd95e===_0x43f18e)break;else _0x579ece['push'](_0x579ece['shift']());}catch(_0x173e8a){_0x579ece['push'](_0x579ece['shift']());}}}(a58_0xf9c4,0x9f267));function a58_0x363c(_0x12f534,_0x39ede1){const _0xf9c472=a58_0xf9c4();return a58_0x363c=function(_0x363c99,_0x2fa58f){_0x363c99=_0x363c99-0xea;let _0x109f68=_0xf9c472[_0x363c99];return _0x109f68;},a58_0x363c(_0x12f534,_0x39ede1);}export function parseAgentRef(_0x237022){const _0x39dd67=a58_0x363c;if(!_0x237022||_0x237022[_0x39dd67(0xf4)]()==='')throw new Error(_0x39dd67(0xf7));const _0x80d759=_0x237022['trim'](),_0x3c84ef=_0x80d759['split']('/');if(_0x3c84ef[_0x39dd67(0xef)]===0x1)return{'projectName':_0x3c84ef[0x0],'agentName':undefined};else{if(_0x3c84ef[_0x39dd67(0xef)]===0x2){const [_0x2943f1,_0x10f28f]=_0x3c84ef;if(!_0x2943f1||_0x2943f1[_0x39dd67(0xf4)]()==='')throw new Error(_0x39dd67(0xea));if(!_0x10f28f||_0x10f28f[_0x39dd67(0xf4)]()==='')throw new Error(_0x39dd67(0xf3));return{'projectName':_0x2943f1[_0x39dd67(0xf4)](),'agentName':_0x10f28f['trim']()};}else throw new Error(_0x39dd67(0xf1)+_0x237022+_0x39dd67(0xee));}}function a58_0xf9c4(){const _0x364d4c=['Agent\x20reference\x20cannot\x20be\x20empty','439238ZuwSQl','5965648yejOEh','12pgfRdl','37615160FiyGwM','Project\x20name\x20cannot\x20be\x20empty','42DErbxc','1868935BWCbWd','716070Zehvoq','.\x20Expected\x20\x22project_name\x22\x20or\x20\x22project_name/agent_name\x22','length','1032745ULRUER','Invalid\x20agent\x20reference\x20format:\x20','7780510hDDLkN','Agent\x20name\x20cannot\x20be\x20empty','trim','9YBYUcd','6rUhVqa'];a58_0xf9c4=function(){return _0x364d4c;};return a58_0xf9c4();}
|
package/dist/utils/chat-cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x37f8f8,_0x595123){const _0x4a33d9=a59_0x3b1e,_0x20c97c=_0x37f8f8();while(!![]){try{const _0x4e9d1d=-parseInt(_0x4a33d9(0xae))/0x1*(parseInt(_0x4a33d9(0xb3))/0x2)+-parseInt(_0x4a33d9(0xb8))/0x3*(parseInt(_0x4a33d9(0xaf))/0x4)+-parseInt(_0x4a33d9(0xb4))/0x5+-parseInt(_0x4a33d9(0xb1))/0x6+-parseInt(_0x4a33d9(0xba))/0x7+-parseInt(_0x4a33d9(0xb2))/0x8+parseInt(_0x4a33d9(0xbb))/0x9;if(_0x4e9d1d===_0x595123)break;else _0x20c97c['push'](_0x20c97c['shift']());}catch(_0x3701ad){_0x20c97c['push'](_0x20c97c['shift']());}}}(a59_0x5985,0xf38f6));function a59_0x3b1e(_0x5ea2ce,_0x5058bb){const _0x598555=a59_0x5985();return a59_0x3b1e=function(_0x3b1e3d,_0x30c290){_0x3b1e3d=_0x3b1e3d-0xae;let _0x15a45c=_0x598555[_0x3b1e3d];return _0x15a45c;},a59_0x3b1e(_0x5ea2ce,_0x5058bb);}import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';import{join}from'path';function getCacheDir(){const _0x56bb78=a59_0x3b1e;return join(process[_0x56bb78(0xb9)](),'.cache',_0x56bb78(0xb0));}function getLastChatIdPath(){const _0x245547=a59_0x3b1e;return join(getCacheDir(),_0x245547(0xb5));}function ensureCacheDir(){const _0x2379e1=getCacheDir();!existsSync(_0x2379e1)&&mkdirSync(_0x2379e1,{'recursive':!![]});}function a59_0x5985(){const _0x124246=['3HvPjtr','cwd','3987697omjYYz','50664573vTYCYz','9EoKxOZ','4680572GICuNP','tdx','1181748ursZaQ','14859640qepUyA','32582lHvqcG','3454645OWGQuK','last_chat_id','trim','utf-8'];a59_0x5985=function(){return _0x124246;};return a59_0x5985();}export function saveLastChatId(_0xf580a8){const _0x43a469=a59_0x3b1e;ensureCacheDir();const _0x80d2f2=getLastChatIdPath();writeFileSync(_0x80d2f2,_0xf580a8,_0x43a469(0xb7));}export function loadLastChatId(){const _0x1e2774=a59_0x3b1e,_0x3ac311=getLastChatIdPath();if(!existsSync(_0x3ac311))return undefined;try{const _0x25e94b=readFileSync(_0x3ac311,_0x1e2774(0xb7))[_0x1e2774(0xb6)]();return _0x25e94b||undefined;}catch{return undefined;}}export function clearLastChatId(){const _0x476a34=getLastChatIdPath();if(existsSync(_0x476a34))try{writeFileSync(_0x476a34,'','utf-8');}catch{}}
|
package/dist/utils/colors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1cf637,_0x2a0289){const _0x47ccb9=a60_0x4c9c,_0x4aed0d=_0x1cf637();while(!![]){try{const _0x5049a7=-parseInt(_0x47ccb9(0x1de))/0x1*(parseInt(_0x47ccb9(0x1ca))/0x2)+-parseInt(_0x47ccb9(0x1e1))/0x3+-parseInt(_0x47ccb9(0x1d2))/0x4+-parseInt(_0x47ccb9(0x1d9))/0x5*(parseInt(_0x47ccb9(0x1d3))/0x6)+parseInt(_0x47ccb9(0x1e4))/0x7*(parseInt(_0x47ccb9(0x1df))/0x8)+-parseInt(_0x47ccb9(0x1cf))/0x9+-parseInt(_0x47ccb9(0x1cc))/0xa*(-parseInt(_0x47ccb9(0x1dd))/0xb);if(_0x5049a7===_0x2a0289)break;else _0x4aed0d['push'](_0x4aed0d['shift']());}catch(_0x486a7f){_0x4aed0d['push'](_0x4aed0d['shift']());}}}(a60_0xec14,0x513ff));import{Chalk}from'chalk';export function shouldUseColor(_0x3bdf5a={}){const _0x4f0440=a60_0x4c9c;if(_0x3bdf5a[_0x4f0440(0x1e6)]===!![])return![];if(_0x3bdf5a[_0x4f0440(0x1e0)]===!![])return!![];if(process['env']['NO_COLOR']!==undefined)return![];return process[_0x4f0440(0x1e8)][_0x4f0440(0x1d1)]??![];}export function getChalk(_0x46e082={}){if(shouldUseColor(_0x46e082))return new Chalk({'level':0x3});return new Chalk({'level':0x0});}export function colorBorder(_0x306fed,_0x348e05={}){const _0x2bdcee=a60_0x4c9c;return getChalk(_0x348e05)[_0x2bdcee(0x1e2)](_0x306fed);}export function colorHeader(_0xe5145e,_0x346200={}){const _0x554dc1=a60_0x4c9c;return getChalk(_0x346200)[_0x554dc1(0x1d0)](_0xe5145e);}export function colorType(_0x2ce173,_0x18e28d={}){const _0x526bcb=a60_0x4c9c;return getChalk(_0x18e28d)[_0x526bcb(0x1e2)](_0x2ce173);}export function colorJSONKey(_0x2956ff,_0x3a3cbe={}){const _0x13d354=a60_0x4c9c;return getChalk(_0x3a3cbe)[_0x13d354(0x1d8)](_0x2956ff);}function a60_0xec14(){const _0x5a64c0=['64895JogHRt','null','entries','repeat','34287RWahCc','136811rKXkHj','8CLoSDX','color','860835oQQrbt','dim','string','762811JsBOLM','stringify','noColor','join','stdout','8lFeuRL','map','6490oXdAqn','object','isArray','1899ctmaXH','cyan','isTTY','2041768lUzbQW','210aipAps','boolean','yellow','number','length','blue'];a60_0xec14=function(){return _0x5a64c0;};return a60_0xec14();}export function colorJSONString(_0x43739b,_0x3630c8={}){return getChalk(_0x3630c8)['green'](_0x43739b);}export function colorJSONNumber(_0x75c1e4,_0x89d259={}){const _0x5162df=a60_0x4c9c;return getChalk(_0x89d259)[_0x5162df(0x1d0)](_0x75c1e4);}function a60_0x4c9c(_0x517920,_0x2bb8aa){const _0xec147d=a60_0xec14();return a60_0x4c9c=function(_0x4c9cb4,_0x2bd0a8){_0x4c9cb4=_0x4c9cb4-0x1ca;let _0x515744=_0xec147d[_0x4c9cb4];return _0x515744;},a60_0x4c9c(_0x517920,_0x2bb8aa);}export function colorJSONBoolean(_0x2b2fd7,_0x27d46c={}){const _0x1729a7=a60_0x4c9c;return getChalk(_0x27d46c)[_0x1729a7(0x1d5)](_0x2b2fd7);}export function colorJSONNull(_0x3c9794,_0x11e753={}){const _0x51eaf8=a60_0x4c9c;return getChalk(_0x11e753)[_0x51eaf8(0x1e2)](_0x3c9794);}export function colorizeJSONCompact(_0x4705cc,_0x4a50f4={}){const _0x15c457=a60_0x4c9c;if(!shouldUseColor(_0x4a50f4))return JSON[_0x15c457(0x1e5)](_0x4705cc);if(_0x4705cc===null)return colorJSONNull('null',_0x4a50f4);if(typeof _0x4705cc===_0x15c457(0x1d4))return colorJSONBoolean(String(_0x4705cc),_0x4a50f4);if(typeof _0x4705cc===_0x15c457(0x1d6))return colorJSONNumber(String(_0x4705cc),_0x4a50f4);if(typeof _0x4705cc===_0x15c457(0x1e3))return colorJSONString(JSON[_0x15c457(0x1e5)](_0x4705cc),_0x4a50f4);if(Array['isArray'](_0x4705cc)){if(_0x4705cc[_0x15c457(0x1d7)]===0x0)return'[]';const _0x468062=_0x4705cc[_0x15c457(0x1cb)](_0x498e0e=>colorizeJSONCompact(_0x498e0e,_0x4a50f4));return'['+_0x468062['join'](',')+']';}if(typeof _0x4705cc===_0x15c457(0x1cd)){const _0x44c8e3=Object[_0x15c457(0x1db)](_0x4705cc);if(_0x44c8e3['length']===0x0)return'{}';const _0x9f95eb=_0x44c8e3[_0x15c457(0x1cb)](([_0x196c41,_0x4e323b])=>{const _0x2e2950=_0x15c457,_0x4efe73=colorJSONKey(JSON[_0x2e2950(0x1e5)](_0x196c41),_0x4a50f4),_0x465a72=colorizeJSONCompact(_0x4e323b,_0x4a50f4);return _0x4efe73+':'+_0x465a72;});return'{'+_0x9f95eb[_0x15c457(0x1e7)](',')+'}';}return String(_0x4705cc);}export function colorizeJSON(_0x2c0f24,_0x17ea44={},_0x1d1f4a=0x0){const _0x5db91e=a60_0x4c9c;if(!shouldUseColor(_0x17ea44))return JSON[_0x5db91e(0x1e5)](_0x2c0f24,null,0x2);const _0x19d5af='\x20'[_0x5db91e(0x1dc)](_0x1d1f4a),_0x33a8e6=_0x1d1f4a+0x2;if(_0x2c0f24===null)return colorJSONNull(_0x5db91e(0x1da),_0x17ea44);if(typeof _0x2c0f24===_0x5db91e(0x1d4))return colorJSONBoolean(String(_0x2c0f24),_0x17ea44);if(typeof _0x2c0f24===_0x5db91e(0x1d6))return colorJSONNumber(String(_0x2c0f24),_0x17ea44);if(typeof _0x2c0f24===_0x5db91e(0x1e3))return colorJSONString(JSON[_0x5db91e(0x1e5)](_0x2c0f24),_0x17ea44);if(Array[_0x5db91e(0x1ce)](_0x2c0f24)){if(_0x2c0f24[_0x5db91e(0x1d7)]===0x0)return'[]';const _0x134fda=_0x2c0f24['map'](_0x3cecd3=>{const _0x4e4026=colorizeJSON(_0x3cecd3,_0x17ea44,_0x33a8e6);return''+'\x20'['repeat'](_0x33a8e6)+_0x4e4026;});return'[\x0a'+_0x134fda[_0x5db91e(0x1e7)](',\x0a')+('\x0a'+_0x19d5af+']');}if(typeof _0x2c0f24==='object'){const _0x26ef0a=Object[_0x5db91e(0x1db)](_0x2c0f24);if(_0x26ef0a[_0x5db91e(0x1d7)]===0x0)return'{}';const _0xf51ead=_0x26ef0a[_0x5db91e(0x1cb)](([_0x553ff9,_0x3b2cfc])=>{const _0x30f037=_0x5db91e,_0x15a02d=colorJSONKey(JSON[_0x30f037(0x1e5)](_0x553ff9),_0x17ea44),_0x436f7c=colorizeJSON(_0x3b2cfc,_0x17ea44,_0x33a8e6);return''+'\x20'[_0x30f037(0x1dc)](_0x33a8e6)+_0x15a02d+':\x20'+_0x436f7c;});return'{\x0a'+_0xf51ead[_0x5db91e(0x1e7)](',\x0a')+('\x0a'+_0x19d5af+'}');}return String(_0x2c0f24);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x48070d,_0xce91b7){const _0x12dd0d=a61_0x17df,_0x16d1db=_0x48070d();while(!![]){try{const _0xb96fc9=-parseInt(_0x12dd0d(0x11f))/0x1+parseInt(_0x12dd0d(0x10e))/0x2+parseInt(_0x12dd0d(0x10a))/0x3+parseInt(_0x12dd0d(0x116))/0x4*(-parseInt(_0x12dd0d(0xfe))/0x5)+-parseInt(_0x12dd0d(0x110))/0x6*(parseInt(_0x12dd0d(0x11c))/0x7)+-parseInt(_0x12dd0d(0xff))/0x8+parseInt(_0x12dd0d(0xf6))/0x9;if(_0xb96fc9===_0xce91b7)break;else _0x16d1db['push'](_0x16d1db['shift']());}catch(_0x513435){_0x16d1db['push'](_0x16d1db['shift']());}}}(a61_0x53f6,0xd8587));import{writeFileSync}from'fs';function a61_0x53f6(){const _0x4d5680=['split','147495SDxHCS','12060752enXzRx','json','limit','double','map','trim','resolve','cmdout','stdout','log','output','2747301BTwfDl','─┴─','number','[error]','1475920EVMqaT','boolean','47676srOaOg','[query]','jsonl','─┬─','noColor','max','72fiYnWs','forEach','stdin','filter','padEnd','bold','812ZwvwCS','stderr','pipe','675580DSeaWy','repeat','object','length','sdk-result','isTTY','yellow','No\x20data','debug','stringify','varchar','color','./formatters.js','end','bigint','[logs]','error','cyan','push','Results\x20saved\x20to\x20','[Object]','table','less','entries','25814844OPHEyX','tsv','inherit','query','format','red','FINISHED'];a61_0x53f6=function(){return _0x4d5680;};return a61_0x53f6();}import{spawn}from'child_process';import{resolveOutputFormat}from'./format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';import a61_0x3af0f4 from'chalk';export function parseOutputOptions(_0x123f15){const _0x8c67bc=a61_0x17df;return{'format':_0x123f15[_0x8c67bc(0xfa)]||_0x8c67bc(0xf3),'output':_0x123f15[_0x8c67bc(0x109)]||'','limit':_0x123f15[_0x8c67bc(0x101)],'color':_0x123f15['color'],'noColor':_0x123f15[_0x8c67bc(0x114)]};}function convertSDKResultToQueryResult(_0x3d6373){const _0x43dfae=a61_0x17df,_0x241a5d=[];if(_0x3d6373[_0x43dfae(0x122)]>0x0){const _0x5de2b0=_0x3d6373[0x0];for(const [_0x2ffddb,_0x3417f3]of Object[_0x43dfae(0xf5)](_0x5de2b0)){let _0x17f1f1=_0x43dfae(0x129);if(typeof _0x3417f3===_0x43dfae(0x10c))_0x17f1f1=Number['isInteger'](_0x3417f3)?_0x43dfae(0x12d):_0x43dfae(0x102);else{if(typeof _0x3417f3==='boolean')_0x17f1f1=_0x43dfae(0x10f);else _0x3417f3===null&&(_0x17f1f1=_0x43dfae(0x129));}_0x241a5d[_0x43dfae(0xf0)]({'name':_0x2ffddb,'type':_0x17f1f1});}}return{'queryId':_0x43dfae(0x123),'columns':_0x241a5d,'data':_0x3d6373,'stats':{'state':_0x43dfae(0xfc),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x3d6373['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x1e737f,_0x2892ed){const _0x88679c=convertSDKResultToQueryResult(_0x1e737f);return formatQueryOutput(_0x88679c,_0x2892ed);}export async function formatQueryOutput(_0x10a624,_0x214827){const _0x10f0e4=a61_0x17df,{format:_0x4ecbda,limit:_0x3c4121,output:_0x419926,color:_0x3bfdb6,noColor:_0x504bd7}=_0x214827,_0x56ee8a=Boolean(_0x419926)&&!_0x3bfdb6,_0x3d176e={'color':_0x3bfdb6,'noColor':_0x504bd7||_0x56ee8a};if(_0x4ecbda===_0x10f0e4(0xf3)){const {formatAsTable:_0x3249e9}=await import(_0x10f0e4(0x12b)),_0x8188b7=shouldUseLess(_0x4ecbda,_0x419926);return _0x3249e9(_0x10a624,_0x3c4121,_0x8188b7,_0x3d176e);}else{if(_0x4ecbda===_0x10f0e4(0x100)){const {formatAsJSON:_0x318460}=await import(_0x10f0e4(0x12b));return _0x318460(_0x10a624,_0x3d176e);}else{if(_0x4ecbda===_0x10f0e4(0x112)){const {formatAsJSONL:_0x3df8b9}=await import(_0x10f0e4(0x12b));return _0x3df8b9(_0x10a624,_0x3d176e);}else{const {formatQueryResult:_0x4fb27b}=await import(_0x10f0e4(0x12b));return _0x4fb27b(_0x10a624,_0x4ecbda);}}}}function shouldUseLess(_0xa1294a,_0x313b54){const _0x472393=a61_0x17df;return _0xa1294a==='table'&&process[_0x472393(0x107)][_0x472393(0x124)]&&!_0x313b54;}function a61_0x17df(_0x11a19f,_0x58f010){const _0x53f6ea=a61_0x53f6();return a61_0x17df=function(_0x17df73,_0x269fc7){_0x17df73=_0x17df73-0xef;let _0x2f9129=_0x53f6ea[_0x17df73];return _0x2f9129;},a61_0x17df(_0x11a19f,_0x58f010);}export function resolveOutputOptions(_0x202f0d){const _0x35f5d4=a61_0x17df,_0x52e78d=resolveOutputFormat(_0x202f0d[_0x35f5d4(0xfa)],_0x202f0d[_0x35f5d4(0x109)],_0x35f5d4(0xf3));let _0x5c0ec4=typeof _0x202f0d[_0x35f5d4(0x101)]===_0x35f5d4(0x10c)?_0x202f0d[_0x35f5d4(0x101)]:parseInt(_0x202f0d[_0x35f5d4(0x101)]||'40',0xa);const _0x38275c=_0x202f0d['output']||'';return shouldUseLess(_0x52e78d,_0x38275c)&&(_0x5c0ec4=Infinity),{'format':_0x52e78d,'output':_0x38275c,'limit':_0x5c0ec4,'color':_0x202f0d[_0x35f5d4(0x12a)],'noColor':_0x202f0d[_0x35f5d4(0x114)]};}export function writeOutput(_0x16741b,_0x169a69,_0x3e5d85){const _0x59b9b1=a61_0x17df;return _0x169a69?(writeFileSync(_0x169a69,_0x16741b),console[_0x59b9b1(0x12f)](_0x59b9b1(0xf1)+_0x169a69),Promise[_0x59b9b1(0x105)]()):shouldUseLess(_0x3e5d85||'','')?new Promise(_0x4cf79a=>{const _0x58a071=_0x59b9b1,_0x319774=spawn(_0x58a071(0xf4),['-FXRSn'],{'stdio':[_0x58a071(0x11e),'inherit',_0x58a071(0xf8)]});let _0x14f150=![];_0x319774['on'](_0x58a071(0x12f),()=>{!_0x14f150&&(_0x14f150=!![],console['log'](_0x16741b),_0x4cf79a());}),_0x319774['on']('close',()=>{!_0x14f150&&(_0x14f150=!![],_0x4cf79a());}),_0x319774['on']('spawn',()=>{const _0xf52041=_0x58a071;!_0x14f150&&_0x319774[_0xf52041(0x118)]&&(_0x319774[_0xf52041(0x118)]['on'](_0xf52041(0x12f),()=>{}),_0x319774['stdin']['write'](_0x16741b),_0x319774[_0xf52041(0x118)][_0xf52041(0x12c)]());}),!_0x319774[_0x58a071(0x118)]&&(!_0x14f150&&(_0x14f150=!![],console[_0x58a071(0x108)](_0x16741b),_0x4cf79a()));}):(console['log'](_0x16741b),Promise[_0x59b9b1(0x105)]());}export async function handleSDKOutput(_0x1d2688,_0x537f3e){const _0x42ea38=a61_0x17df,_0xeb2116=resolveOutputOptions(_0x537f3e),_0x41b0ed=await formatSDKOutput(_0x1d2688,_0xeb2116);await writeOutput(_0x41b0ed,_0xeb2116['output']||undefined,_0xeb2116[_0x42ea38(0xfa)]);}export async function handleQueryOutput(_0x3b19a5,_0x25b21c){const _0x4090fd=a61_0x17df,_0x1d09da=resolveOutputOptions(_0x25b21c),_0x5c9ee3=await formatQueryOutput(_0x3b19a5,_0x1d09da);await writeOutput(_0x5c9ee3,_0x1d09da[_0x4090fd(0x109)]||undefined,_0x1d09da[_0x4090fd(0xfa)]);}async function formatSingleObject(_0x1f43dd,_0x4f670e){const _0xec96ef=a61_0x17df,{format:_0x46ccbe,color:_0x4f4c1a,noColor:_0x58453f}=_0x4f670e,_0x1978d9={'color':_0x4f4c1a,'noColor':_0x58453f};if(_0x46ccbe===_0xec96ef(0x100)){if(shouldUseColor(_0x1978d9))return colorizeJSON(_0x1f43dd,_0x1978d9);return JSON[_0xec96ef(0x128)](_0x1f43dd,null,0x2);}else{if(_0x46ccbe===_0xec96ef(0x112)){if(shouldUseColor(_0x1978d9))return colorizeJSONCompact(_0x1f43dd,_0x1978d9);return JSON[_0xec96ef(0x128)](_0x1f43dd);}else{if(_0x46ccbe===_0xec96ef(0xf7))return Object[_0xec96ef(0xf5)](_0x1f43dd)['map'](([_0x1f188d,_0x5c235e])=>_0x1f188d+'\x09'+_0x5c235e)['join']('\x0a');else{const _0x49d1de=Object['entries'](_0x1f43dd);if(_0x49d1de[_0xec96ef(0x122)]===0x0)return _0xec96ef(0x126);const _0x4f7060=_0x1f43dd[_0xec96ef(0x127)],_0x150441=_0x1f43dd[_0xec96ef(0xf9)],_0x26e35=_0x150441?typeof _0x150441==='string'?_0x150441:JSON[_0xec96ef(0x128)](_0x150441,null,0x2):undefined,_0x5bbb3a=_0x49d1de[_0xec96ef(0x119)](([_0x1392e3])=>_0x1392e3!==_0xec96ef(0x127)&&_0x1392e3!==_0xec96ef(0xf9)),_0x42aef2=Math[_0xec96ef(0x115)](..._0x5bbb3a[_0xec96ef(0x103)](([_0x39d036])=>_0x39d036[_0xec96ef(0x122)])),_0xf25f2b=Math[_0xec96ef(0x115)](..._0x5bbb3a[_0xec96ef(0x103)](([,_0x2c534c])=>{const _0x10f62a=_0xec96ef;try{const _0x32eb7c=_0x2c534c===null||_0x2c534c===undefined?'':typeof _0x2c534c===_0x10f62a(0x121)?JSON[_0x10f62a(0x128)](_0x2c534c):String(_0x2c534c),_0x507873=_0x32eb7c[_0x10f62a(0xfd)]('\x0a');return Math[_0x10f62a(0x115)](..._0x507873[_0x10f62a(0x103)](_0x38940a=>_0x38940a['length']),0x0);}catch{return 0x0;}}),0x14),_0x1073b1=[];_0x1073b1[_0xec96ef(0xf0)](colorBorder('┌─'+'─'['repeat'](_0x42aef2)+_0xec96ef(0x113)+'─'['repeat'](_0xf25f2b)+'─┐',_0x1978d9)),_0x5bbb3a[_0xec96ef(0x117)](([_0x45b25c,_0x46d9eb])=>{const _0x21d7bf=_0xec96ef;let _0x2aa961;try{_0x2aa961=_0x46d9eb===null||_0x46d9eb===undefined?'':typeof _0x46d9eb===_0x21d7bf(0x121)?JSON[_0x21d7bf(0x128)](_0x46d9eb):String(_0x46d9eb);}catch{_0x2aa961=_0x21d7bf(0xf2);}const _0x3a496e=_0x45b25c[_0x21d7bf(0x11a)](_0x42aef2),_0x1c4637=_0x2aa961[_0x21d7bf(0xfd)]('\x0a');_0x1c4637[_0x21d7bf(0x117)]((_0x5166aa,_0x2e307e)=>{const _0xf2ffa=_0x21d7bf,_0x335b2d=colorBorder('│',_0x1978d9);_0x2e307e===0x0?_0x1073b1['push'](_0x335b2d+'\x20'+_0x3a496e+'\x20'+_0x335b2d+'\x20'+_0x5166aa['padEnd'](_0xf25f2b)+'\x20'+_0x335b2d):_0x1073b1[_0xf2ffa(0xf0)](_0x335b2d+'\x20'+'\x20'[_0xf2ffa(0x120)](_0x42aef2)+'\x20'+_0x335b2d+'\x20'+_0x5166aa[_0xf2ffa(0x11a)](_0xf25f2b)+'\x20'+_0x335b2d);});}),_0x1073b1[_0xec96ef(0xf0)](colorBorder('└─'+'─'['repeat'](_0x42aef2)+_0xec96ef(0x10b)+'─'[_0xec96ef(0x120)](_0xf25f2b)+'─┘',_0x1978d9));_0x26e35&&(_0x1073b1['push'](''),_0x1073b1[_0xec96ef(0xf0)](String(a61_0x3af0f4[_0xec96ef(0x125)][_0xec96ef(0x11b)](_0xec96ef(0x111)))),_0x1073b1[_0xec96ef(0xf0)](_0x26e35));if(_0x4f7060){if(_0x4f7060[_0xec96ef(0x11d)]){_0x1073b1['push'](''),_0x1073b1[_0xec96ef(0xf0)](String(a61_0x3af0f4[_0xec96ef(0xfb)][_0xec96ef(0x11b)](_0xec96ef(0x10d))));const _0x153fcc=_0x4f7060['stderr'][_0xec96ef(0xfd)]('\x0a');_0x153fcc[_0xec96ef(0x117)](_0x4e11bf=>{const _0x442130=_0xec96ef;_0x4e11bf[_0x442130(0x104)]()&&_0x1073b1['push'](_0x4e11bf);});}if(_0x4f7060[_0xec96ef(0x106)]){_0x1073b1[_0xec96ef(0xf0)](''),_0x1073b1['push'](String(a61_0x3af0f4[_0xec96ef(0xef)][_0xec96ef(0x11b)](_0xec96ef(0x12e))));const _0x5dd82f=_0x4f7060[_0xec96ef(0x106)][_0xec96ef(0xfd)]('\x0a');_0x5dd82f['forEach'](_0x2efe57=>{const _0x1937ee=_0xec96ef;_0x2efe57[_0x1937ee(0x104)]()&&_0x1073b1[_0x1937ee(0xf0)](_0x2efe57);});}}return _0x1073b1['join']('\x0a');}}}}export async function handleSingleObjectOutput(_0x4dc165,_0x391c30){const _0x3b7dbe=a61_0x17df,_0x16bc3b=resolveOutputOptions(_0x391c30),_0x352f29=await formatSingleObject(_0x4dc165,_0x16bc3b);await writeOutput(_0x352f29,_0x16bc3b[_0x3b7dbe(0x109)]||undefined,_0x16bc3b['format']);}
|
|
1
|
+
(function(_0x2149b9,_0x43b44c){const _0x464d12=a61_0x5890,_0x4f6b3c=_0x2149b9();while(!![]){try{const _0x111401=parseInt(_0x464d12(0x16e))/0x1+parseInt(_0x464d12(0x187))/0x2+-parseInt(_0x464d12(0x190))/0x3*(parseInt(_0x464d12(0x186))/0x4)+-parseInt(_0x464d12(0x16c))/0x5+-parseInt(_0x464d12(0x169))/0x6+parseInt(_0x464d12(0x184))/0x7*(parseInt(_0x464d12(0x194))/0x8)+-parseInt(_0x464d12(0x18c))/0x9;if(_0x111401===_0x43b44c)break;else _0x4f6b3c['push'](_0x4f6b3c['shift']());}catch(_0x491355){_0x4f6b3c['push'](_0x4f6b3c['shift']());}}}(a61_0x5011,0xae450));import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'./format-detector.js';import{colorBorder,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';import a61_0x487dbf from'chalk';export function parseOutputOptions(_0xf60225){const _0x53b4a4=a61_0x5890;return{'format':_0xf60225[_0x53b4a4(0x191)]||_0x53b4a4(0x179),'output':_0xf60225[_0x53b4a4(0x177)]||'','limit':_0xf60225[_0x53b4a4(0x1a7)],'color':_0xf60225[_0x53b4a4(0x17f)],'noColor':_0xf60225[_0x53b4a4(0x1a0)]};}function convertSDKResultToQueryResult(_0x24c604){const _0x574907=a61_0x5890,_0x530457=[];if(_0x24c604[_0x574907(0x174)]>0x0){const _0x46d2f0=_0x24c604[0x0];for(const [_0x129cab,_0x49dd6a]of Object[_0x574907(0x1a6)](_0x46d2f0)){let _0x30ccdf='varchar';if(typeof _0x49dd6a===_0x574907(0x17e))_0x30ccdf=Number['isInteger'](_0x49dd6a)?'bigint':_0x574907(0x189);else{if(typeof _0x49dd6a===_0x574907(0x192))_0x30ccdf='boolean';else _0x49dd6a===null&&(_0x30ccdf=_0x574907(0x16a));}_0x530457[_0x574907(0x188)]({'name':_0x129cab,'type':_0x30ccdf});}}return{'queryId':'sdk-result','columns':_0x530457,'data':_0x24c604,'stats':{'state':_0x574907(0x19f),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x24c604[_0x574907(0x174)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x4bcbb6,_0x1759db){const _0x7b46eb=convertSDKResultToQueryResult(_0x4bcbb6);return formatQueryOutput(_0x7b46eb,_0x1759db);}export async function formatQueryOutput(_0x583523,_0x3598a7){const _0x175040=a61_0x5890,{format:_0x154365,limit:_0x2562cc,output:_0x79aa61,color:_0x29580d,noColor:_0x56fbe6}=_0x3598a7,_0x39ddb4=Boolean(_0x79aa61)&&!_0x29580d,_0x3f5118={'color':_0x29580d,'noColor':_0x56fbe6||_0x39ddb4};if(_0x154365===_0x175040(0x179)){const {formatAsTable:_0x26aecc}=await import('./formatters.js'),_0x132cd4=shouldUseLess(_0x154365,_0x79aa61);return _0x26aecc(_0x583523,_0x2562cc,_0x132cd4,_0x3f5118);}else{if(_0x154365==='json'){const {formatAsJSON:_0x3e59d3}=await import(_0x175040(0x170));return _0x3e59d3(_0x583523,_0x3f5118);}else{if(_0x154365===_0x175040(0x180)){const {formatAsJSONL:_0xf383d8}=await import(_0x175040(0x170));return _0xf383d8(_0x583523,_0x3f5118);}else{const {formatQueryResult:_0x17f25c}=await import('./formatters.js');return _0x17f25c(_0x583523,_0x154365);}}}}function shouldUseLess(_0x51e1e0,_0x43e0dc){const _0x1fe036=a61_0x5890;return _0x51e1e0===_0x1fe036(0x179)&&process[_0x1fe036(0x17a)][_0x1fe036(0x199)]&&!_0x43e0dc;}export function resolveOutputOptions(_0x38e5ee){const _0x34dfd9=a61_0x5890,_0x85d589=resolveOutputFormat(_0x38e5ee[_0x34dfd9(0x191)],_0x38e5ee[_0x34dfd9(0x177)],_0x34dfd9(0x179));let _0x33241b=typeof _0x38e5ee[_0x34dfd9(0x1a7)]===_0x34dfd9(0x17e)?_0x38e5ee[_0x34dfd9(0x1a7)]:parseInt(_0x38e5ee[_0x34dfd9(0x1a7)]||'40',0xa);const _0x39e82c=_0x38e5ee[_0x34dfd9(0x177)]||'';return shouldUseLess(_0x85d589,_0x39e82c)&&(_0x33241b=Infinity),{'format':_0x85d589,'output':_0x39e82c,'limit':_0x33241b,'color':_0x38e5ee[_0x34dfd9(0x17f)],'noColor':_0x38e5ee[_0x34dfd9(0x1a0)]};}export function writeOutput(_0x235184,_0x39deff,_0x24ac18){const _0x27a8b7=a61_0x5890;return _0x39deff?(writeFileSync(_0x39deff,_0x235184),console[_0x27a8b7(0x175)](_0x27a8b7(0x16f)+_0x39deff),Promise[_0x27a8b7(0x19a)]()):shouldUseLess(_0x24ac18||'','')?new Promise(_0x42abfa=>{const _0x569bc9=_0x27a8b7,_0x4c5860=spawn(_0x569bc9(0x198),[_0x569bc9(0x17c)],{'stdio':[_0x569bc9(0x16b),_0x569bc9(0x19c),_0x569bc9(0x19c)]});let _0x276f8e=![];_0x4c5860['on'](_0x569bc9(0x175),()=>{const _0x62417b=_0x569bc9;!_0x276f8e&&(_0x276f8e=!![],console[_0x62417b(0x1a5)](_0x235184),_0x42abfa());}),_0x4c5860['on'](_0x569bc9(0x173),()=>{!_0x276f8e&&(_0x276f8e=!![],_0x42abfa());}),_0x4c5860['on'](_0x569bc9(0x171),()=>{const _0x7ab8fa=_0x569bc9;!_0x276f8e&&_0x4c5860[_0x7ab8fa(0x185)]&&(_0x4c5860['stdin']['on'](_0x7ab8fa(0x175),()=>{}),_0x4c5860[_0x7ab8fa(0x185)][_0x7ab8fa(0x17b)](_0x235184),_0x4c5860[_0x7ab8fa(0x185)][_0x7ab8fa(0x18a)]());}),!_0x4c5860[_0x569bc9(0x185)]&&(!_0x276f8e&&(_0x276f8e=!![],console['log'](_0x235184),_0x42abfa()));}):(console[_0x27a8b7(0x1a5)](_0x235184),Promise['resolve']());}export async function handleSDKOutput(_0x278495,_0x36ecd6){const _0x14b8fe=a61_0x5890,_0x46af2c=resolveOutputOptions(_0x36ecd6),_0x50c85b=await formatSDKOutput(_0x278495,_0x46af2c);await writeOutput(_0x50c85b,_0x46af2c[_0x14b8fe(0x177)]||undefined,_0x46af2c[_0x14b8fe(0x191)]);}function a61_0x5890(_0x5cd444,_0x269384){const _0x501123=a61_0x5011();return a61_0x5890=function(_0x589078,_0x39206e){_0x589078=_0x589078-0x168;let _0x616748=_0x501123[_0x589078];return _0x616748;},a61_0x5890(_0x5cd444,_0x269384);}function a61_0x5011(){const _0x2e0a47=['cmdout','575029sAHRNN','Results\x20saved\x20to\x20','./formatters.js','spawn','object','close','length','error','query','output','No\x20data','table','stdout','write','-FXRSn','repeat','number','color','jsonl','forEach','padEnd','debug','691453pYOCJo','stdin','1348ZKuIej','2422042dtTiZF','push','double','end','[query]','7972650zxttDw','trim','[error]','map','2544aYseIb','format','boolean','json','80zzkddd','bold','filter','split','less','isTTY','resolve','[logs]','inherit','─┴─','stderr','FINISHED','noColor','yellow','max','cyan','join','log','entries','limit','stringify','red','string','3763374qXbJih','varchar','pipe','1305885lZomVz'];a61_0x5011=function(){return _0x2e0a47;};return a61_0x5011();}export async function handleQueryOutput(_0x3f8569,_0x2db252){const _0x2085dd=a61_0x5890,_0x12e9c0=resolveOutputOptions(_0x2db252),_0x32e75f=await formatQueryOutput(_0x3f8569,_0x12e9c0);await writeOutput(_0x32e75f,_0x12e9c0[_0x2085dd(0x177)]||undefined,_0x12e9c0['format']);}async function formatSingleObject(_0x575472,_0x36da9a){const _0x4ff165=a61_0x5890,{format:_0xc1d247,color:_0x38f06b,noColor:_0x46e797}=_0x36da9a,_0x1c52f8={'color':_0x38f06b,'noColor':_0x46e797};if(_0xc1d247===_0x4ff165(0x193)){if(shouldUseColor(_0x1c52f8))return colorizeJSON(_0x575472,_0x1c52f8);return JSON['stringify'](_0x575472,null,0x2);}else{if(_0xc1d247===_0x4ff165(0x180)){if(shouldUseColor(_0x1c52f8))return colorizeJSONCompact(_0x575472,_0x1c52f8);return JSON[_0x4ff165(0x1a8)](_0x575472);}else{if(_0xc1d247==='tsv')return Object[_0x4ff165(0x1a6)](_0x575472)['map'](([_0x568af5,_0xa9377])=>_0x568af5+'\x09'+_0xa9377)[_0x4ff165(0x1a4)]('\x0a');else{const _0x5bd72d=Object[_0x4ff165(0x1a6)](_0x575472);if(_0x5bd72d[_0x4ff165(0x174)]===0x0)return _0x4ff165(0x178);const _0x13ffa0=_0x575472[_0x4ff165(0x183)],_0x14056f=_0x575472['query'],_0x165060=_0x14056f?typeof _0x14056f===_0x4ff165(0x168)?_0x14056f:JSON['stringify'](_0x14056f,null,0x2):undefined,_0x37942f=_0x5bd72d[_0x4ff165(0x196)](([_0x5c9552])=>_0x5c9552!==_0x4ff165(0x183)&&_0x5c9552!==_0x4ff165(0x176)),_0x4190f6=Math[_0x4ff165(0x1a2)](..._0x37942f['map'](([_0x4fed97])=>_0x4fed97[_0x4ff165(0x174)])),_0x3a1c6f=Math[_0x4ff165(0x1a2)](..._0x37942f[_0x4ff165(0x18f)](([,_0x418052])=>{const _0x2ab4d7=_0x4ff165;try{const _0x10c799=_0x418052===null||_0x418052===undefined?'':typeof _0x418052===_0x2ab4d7(0x172)?JSON['stringify'](_0x418052):String(_0x418052),_0x29b3ef=_0x10c799[_0x2ab4d7(0x197)]('\x0a');return Math[_0x2ab4d7(0x1a2)](..._0x29b3ef[_0x2ab4d7(0x18f)](_0x3433fe=>_0x3433fe[_0x2ab4d7(0x174)]),0x0);}catch{return 0x0;}}),0x14),_0x270082=[];_0x270082[_0x4ff165(0x188)](colorBorder('┌─'+'─'['repeat'](_0x4190f6)+'─┬─'+'─'[_0x4ff165(0x17d)](_0x3a1c6f)+'─┐',_0x1c52f8)),_0x37942f['forEach'](([_0x425533,_0x857da0])=>{const _0x192eaa=_0x4ff165;let _0x374cb2;try{_0x374cb2=_0x857da0===null||_0x857da0===undefined?'':typeof _0x857da0===_0x192eaa(0x172)?JSON[_0x192eaa(0x1a8)](_0x857da0):String(_0x857da0);}catch{_0x374cb2='[Object]';}const _0x11b5a3=_0x425533[_0x192eaa(0x182)](_0x4190f6),_0x4a8038=_0x374cb2[_0x192eaa(0x197)]('\x0a');_0x4a8038[_0x192eaa(0x181)]((_0x1de15b,_0x3bdd37)=>{const _0x491876=_0x192eaa,_0x4d57d7=colorBorder('│',_0x1c52f8);_0x3bdd37===0x0?_0x270082[_0x491876(0x188)](_0x4d57d7+'\x20'+_0x11b5a3+'\x20'+_0x4d57d7+'\x20'+_0x1de15b[_0x491876(0x182)](_0x3a1c6f)+'\x20'+_0x4d57d7):_0x270082[_0x491876(0x188)](_0x4d57d7+'\x20'+'\x20'['repeat'](_0x4190f6)+'\x20'+_0x4d57d7+'\x20'+_0x1de15b[_0x491876(0x182)](_0x3a1c6f)+'\x20'+_0x4d57d7);});}),_0x270082['push'](colorBorder('└─'+'─'[_0x4ff165(0x17d)](_0x4190f6)+_0x4ff165(0x19d)+'─'['repeat'](_0x3a1c6f)+'─┘',_0x1c52f8));_0x165060&&(_0x270082['push'](''),_0x270082[_0x4ff165(0x188)](String(a61_0x487dbf[_0x4ff165(0x1a1)]['bold'](_0x4ff165(0x18b)))),_0x270082['push'](_0x165060));if(_0x13ffa0){if(_0x13ffa0[_0x4ff165(0x19e)]){_0x270082[_0x4ff165(0x188)](''),_0x270082[_0x4ff165(0x188)](String(a61_0x487dbf[_0x4ff165(0x1a9)][_0x4ff165(0x195)](_0x4ff165(0x18e))));const _0x5bee02=_0x13ffa0['stderr'][_0x4ff165(0x197)]('\x0a');_0x5bee02[_0x4ff165(0x181)](_0x37ec46=>{const _0xd965e4=_0x4ff165;_0x37ec46[_0xd965e4(0x18d)]()&&_0x270082[_0xd965e4(0x188)](_0x37ec46);});}if(_0x13ffa0[_0x4ff165(0x16d)]){_0x270082['push'](''),_0x270082[_0x4ff165(0x188)](String(a61_0x487dbf[_0x4ff165(0x1a3)][_0x4ff165(0x195)](_0x4ff165(0x19b))));const _0x3d117c=_0x13ffa0[_0x4ff165(0x16d)]['split']('\x0a');_0x3d117c[_0x4ff165(0x181)](_0x349a0f=>{const _0x16e934=_0x4ff165;_0x349a0f[_0x16e934(0x18d)]()&&_0x270082['push'](_0x349a0f);});}}return _0x270082[_0x4ff165(0x1a4)]('\x0a');}}}}export async function handleSingleObjectOutput(_0x22c1cb,_0x2c5416){const _0x38e6b6=a61_0x5890,_0x44e8f3=resolveOutputOptions(_0x2c5416),_0x4d9659=await formatSingleObject(_0x22c1cb,_0x44e8f3);await writeOutput(_0x4d9659,_0x44e8f3[_0x38e6b6(0x177)]||undefined,_0x44e8f3[_0x38e6b6(0x191)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5344b0,_0x39e761){const _0x31abc5=a62_0xef17,_0x31cad4=_0x5344b0();while(!![]){try{const _0x46fbdd=-parseInt(_0x31abc5(0xa2))/0x1*(-parseInt(_0x31abc5(0xb0))/0x2)+parseInt(_0x31abc5(0xaa))/0x3+parseInt(_0x31abc5(0xad))/0x4+-parseInt(_0x31abc5(0xae))/0x5+parseInt(_0x31abc5(0xaf))/0x6+-parseInt(_0x31abc5(0xab))/0x7*(-parseInt(_0x31abc5(0xa9))/0x8)+-parseInt(_0x31abc5(0xa4))/0x9;if(_0x46fbdd===_0x39e761)break;else _0x31cad4['push'](_0x31cad4['shift']());}catch(_0x966eb){_0x31cad4['push'](_0x31cad4['shift']());}}}(a62_0x53e9,0x5d1ce));function a62_0xef17(_0x32787f,_0x4f0fed){const _0x53e940=a62_0x53e9();return a62_0xef17=function(_0xef17f9,_0x11086f){_0xef17f9=_0xef17f9-0xa2;let _0x38bc2f=_0x53e940[_0xef17f9];return _0x38bc2f;},a62_0xef17(_0x32787f,_0x4f0fed);}import*as a62_0x1579b0 from'node:fs';import*as a62_0x5509dc from'node:path';export function setSecureFilePermissions(_0x1d20db){const _0x54c53e=a62_0xef17;try{a62_0x1579b0[_0x54c53e(0xa6)](_0x1d20db,0x180);}catch{console[_0x54c53e(0xb4)](_0x54c53e(0xb3)+_0x1d20db);}}export function setSecureDirectoryPermissions(_0xf7d64a){const _0x2ab6fb=a62_0xef17;try{a62_0x1579b0[_0x2ab6fb(0xa6)](_0xf7d64a,0x1c0);}catch{console['warn'](_0x2ab6fb(0xb3)+_0xf7d64a);}}function a62_0x53e9(){const _0x29f1e9=['writeFileSync','dirname','Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20','warn','Warning:\x20','2AWEvDt',').\x20','14086386hBeLoB','statSync','chmodSync','mode','toString','16888YpJujM','2096346yQkrLv','1358keZEpe','existsSync','1482464iQjBBr','1390425ioYary','799998diVqCJ','612364yBLJeC'];a62_0x53e9=function(){return _0x29f1e9;};return a62_0x53e9();}export function createSecureDirectory(_0x1e8615){const _0x4ee4b1=a62_0xef17;!a62_0x1579b0[_0x4ee4b1(0xac)](_0x1e8615)&&(a62_0x1579b0['mkdirSync'](_0x1e8615,{'recursive':!![],'mode':0x1c0}),setSecureDirectoryPermissions(_0x1e8615));}export function validateSecureFilePermissions(_0x5291f8){const _0x5d44e4=a62_0xef17;try{const _0x4863b1=a62_0x1579b0[_0x5d44e4(0xa5)](_0x5291f8),_0x27641d=_0x4863b1[_0x5d44e4(0xa7)]&0x1ff,_0x4a5d27=(_0x27641d&0x3f)!==0x0;if(_0x4a5d27)return console['warn'](_0x5d44e4(0xb5)+_0x5291f8+'\x20has\x20insecure\x20permissions\x20('+_0x27641d[_0x5d44e4(0xa8)](0x8)+_0x5d44e4(0xa3)+'Should\x20be\x200600\x20or\x20more\x20restrictive.'),![];return!![];}catch{return!![];}}export function writeSecureFile(_0x5a789b,_0x48db99){const _0x311f42=a62_0xef17,_0x3625e1=a62_0x5509dc[_0x311f42(0xb2)](_0x5a789b);createSecureDirectory(_0x3625e1),a62_0x1579b0[_0x311f42(0xb1)](_0x5a789b,_0x48db99,{'mode':0x180}),setSecureFilePermissions(_0x5a789b);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x40a86b,_0x4aae25){const _0x41230f=a63_0x26ad,_0x31d6b4=_0x40a86b();while(!![]){try{const _0x3cf1f5=-parseInt(_0x41230f(0x1fd))/0x1*(parseInt(_0x41230f(0x1ec))/0x2)+-parseInt(_0x41230f(0x1ef))/0x3*(-parseInt(_0x41230f(0x1fe))/0x4)+-parseInt(_0x41230f(0x1f4))/0x5*(parseInt(_0x41230f(0x1ff))/0x6)+-parseInt(_0x41230f(0x1f0))/0x7*(-parseInt(_0x41230f(0x1f5))/0x8)+-parseInt(_0x41230f(0x1ed))/0x9+parseInt(_0x41230f(0x1fc))/0xa+parseInt(_0x41230f(0x1f9))/0xb*(parseInt(_0x41230f(0x1f7))/0xc);if(_0x3cf1f5===_0x4aae25)break;else _0x31d6b4['push'](_0x31d6b4['shift']());}catch(_0x3ef887){_0x31d6b4['push'](_0x31d6b4['shift']());}}}(a63_0x3df8,0xaa898));function a63_0x3df8(){const _0x1fa126=['346584LZpiRd','tsv','60YunoLc','tab','373769llqJTz','pop','json','9777770dUCBHP','26123VyefPO','10308EGlHRT','6vYIiPc','30vuahgW','7084359qHlDXL','table','1113QZFsPv','42GKZZzQ','jsonl','toLowerCase','txt','2430805NBzXhX'];a63_0x3df8=function(){return _0x1fa126;};return a63_0x3df8();}function a63_0x26ad(_0x2b8ac9,_0x5814af){const _0x3df8d0=a63_0x3df8();return a63_0x26ad=function(_0x26ad7d,_0x120ede){_0x26ad7d=_0x26ad7d-0x1ec;let _0x518337=_0x3df8d0[_0x26ad7d];return _0x518337;},a63_0x26ad(_0x2b8ac9,_0x5814af);}export function detectFormatFromExtension(_0x4c9749){const _0x1b4b45=a63_0x26ad,_0x2e2fcb=_0x4c9749[_0x1b4b45(0x1f2)]()['split']('.')[_0x1b4b45(0x1fa)]();switch(_0x2e2fcb){case _0x1b4b45(0x1fb):return _0x1b4b45(0x1fb);case _0x1b4b45(0x1f1):return _0x1b4b45(0x1f1);case _0x1b4b45(0x1f6):case _0x1b4b45(0x1f8):return _0x1b4b45(0x1f6);case _0x1b4b45(0x1f3):case'text':return _0x1b4b45(0x1ee);default:return undefined;}}export function resolveOutputFormat(_0x7670c5,_0x6484c1,_0x5e85bb){if(_0x7670c5)return _0x7670c5;if(_0x6484c1){const _0x509c8c=detectFormatFromExtension(_0x6484c1);if(_0x509c8c)return _0x509c8c;}return _0x5e85bb;}
|
package/dist/utils/formatters.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a64_0x4229(_0x3c9fb1,_0xfd6be8){const _0x1b81b8=a64_0x1b81();return a64_0x4229=function(_0x422901,_0x46880f){_0x422901=_0x422901-0x6c;let _0x40bf52=_0x1b81b8[_0x422901];return _0x40bf52;},a64_0x4229(_0x3c9fb1,_0xfd6be8);}(function(_0xbdace4,_0x3261ea){const _0x225509=a64_0x4229,_0x5e3021=_0xbdace4();while(!![]){try{const _0x2ce116=parseInt(_0x225509(0x8b))/0x1+-parseInt(_0x225509(0x6d))/0x2*(-parseInt(_0x225509(0xa0))/0x3)+-parseInt(_0x225509(0x77))/0x4+-parseInt(_0x225509(0x8a))/0x5*(parseInt(_0x225509(0x9d))/0x6)+parseInt(_0x225509(0x7b))/0x7*(parseInt(_0x225509(0x9e))/0x8)+-parseInt(_0x225509(0x78))/0x9+parseInt(_0x225509(0x7c))/0xa;if(_0x2ce116===_0x3261ea)break;else _0x5e3021['push'](_0x5e3021['shift']());}catch(_0x3e7eea){_0x5e3021['push'](_0x5e3021['shift']());}}}(a64_0x1b81,0xc7a5d));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 _0x2bba28=a64_0x4229;return process[_0x2bba28(0x7a)]['columns']||Infinity;}export function formatAsTable(_0x2eee06,_0x1ac5d0=DEFAULT_MAX_DISPLAY_ROWS,_0x4108cf=![],_0x4fc377={}){const _0x4d0597=a64_0x4229;if(_0x2eee06[_0x4d0597(0x8c)][_0x4d0597(0x95)]===0x0)return'No\x20rows\x20returned';const _0x12ef02=_0x2eee06[_0x4d0597(0x7e)]['map'](_0xf1ce51=>_0xf1ce51[_0x4d0597(0x9c)]),_0x575462=_0x2eee06[_0x4d0597(0x7e)][_0x4d0597(0x90)](_0x24231d=>simplifyType(_0x24231d[_0x4d0597(0x80)])),_0x29ee5a=_0x2eee06[_0x4d0597(0x8c)][_0x4d0597(0x74)](0x0,_0x1ac5d0),_0x19a732=_0x2eee06['data'][_0x4d0597(0x95)],_0x3c5031=_0x19a732>_0x1ac5d0,_0x14a5e3=[],_0x2d145c=getTerminalWidth(),_0x531400=_0x2d145c!==Infinity,_0x4a47a5=0x32;let _0x3d4a09=_0x12ef02[_0x4d0597(0x90)]((_0x56c180,_0xdb7ce5)=>{const _0x22ea8b=_0x4d0597,_0x34e3a3=stringWidth(_0x575462[_0xdb7ce5]),_0x55a353=Math[_0x22ea8b(0x98)](..._0x29ee5a[_0x22ea8b(0x90)](_0x2a292f=>{const _0x3265d8=_0x2a292f[_0x56c180];return stringWidth(formatValue(_0x3265d8));})),_0x594c32=Math[_0x22ea8b(0x98)](stringWidth(_0x56c180),_0x34e3a3,_0x55a353);return _0x4108cf?_0x594c32:Math[_0x22ea8b(0x91)](_0x594c32,_0x4a47a5);});if(_0x531400&&!_0x4108cf&&_0x12ef02['length']>0x0){const _0xe4341d=_0x53c2ee=>{let _0x53029=0x1;for(const _0x11093f of _0x53c2ee){_0x53029+=_0x11093f+0x3;}return _0x53029+0x1;};let _0x231634=_0xe4341d(_0x3d4a09);if(_0x231634>_0x2d145c){const _0x210941=0x3;for(let _0x15b773=_0x3d4a09[_0x4d0597(0x95)]-0x1;_0x15b773>=0x0;_0x15b773--){_0x231634=_0xe4341d(_0x3d4a09);if(_0x231634<=_0x2d145c)break;const _0x2be8b4=_0x3d4a09[_0x15b773],_0x2b6741=_0x231634-_0x2d145c,_0x1bd817=_0x2be8b4-_0x210941,_0x44fc52=Math['min'](_0x2b6741,_0x1bd817);_0x44fc52>0x0&&(_0x3d4a09[_0x15b773]=_0x2be8b4-_0x44fc52);}}}const _0x3a8761=_0x12ef02,_0x1b61d2=_0x575462,_0x1c9d6c=_0x3d4a09,_0xa08250=_0x3d4a09;_0x14a5e3[_0x4d0597(0x88)](colorBorder('┌'+_0xa08250['map'](_0x40bf87=>'─'[_0x4d0597(0x83)](_0x40bf87+0x2))['join']('┬')+'┐',_0x4fc377));const _0x4d5903=_0x3a8761['map']((_0x1346eb,_0x391c9e)=>centerAlign(_0x1346eb,_0x1c9d6c[_0x391c9e]));_0x14a5e3[_0x4d0597(0x88)](colorBorder('│',_0x4fc377)+'\x20'+_0x4d5903[_0x4d0597(0x9f)]('\x20'+colorBorder('│',_0x4fc377)+'\x20')+'\x20'+colorBorder('│',_0x4fc377));const _0x525adc=_0x1b61d2[_0x4d0597(0x90)]((_0x5ad991,_0x3910ef)=>colorType(centerAlign(_0x5ad991,_0x1c9d6c[_0x3910ef]),_0x4fc377));_0x14a5e3[_0x4d0597(0x88)](colorBorder('│',_0x4fc377)+'\x20'+_0x525adc['join']('\x20'+colorBorder('│',_0x4fc377)+'\x20')+'\x20'+colorBorder('│',_0x4fc377)),_0x14a5e3['push'](colorBorder('├'+_0xa08250[_0x4d0597(0x90)](_0x58af8d=>'─'['repeat'](_0x58af8d+0x2))[_0x4d0597(0x9f)]('┼')+'┤',_0x4fc377));const _0x780275=(_0x34c1b2,_0x351cf8)=>{const _0x2695d9=_0x4d0597,_0x4bb417=stringWidth(_0x34c1b2);if(_0x4bb417<=_0x351cf8)return _0x34c1b2;let _0x2de0a5=_0x34c1b2;while(stringWidth(_0x2de0a5+'…')>_0x351cf8&&_0x2de0a5[_0x2695d9(0x95)]>0x0){_0x2de0a5=_0x2de0a5[_0x2695d9(0x74)](0x0,-0x1);}return _0x2de0a5+'…';};_0x29ee5a[_0x4d0597(0x93)](_0x4ec89b=>{const _0x5060b2=_0x4d0597,_0xe1272f=_0x12ef02[_0x5060b2(0x90)]((_0x45792e,_0x1e01da)=>{const _0x1b1efe=_0x5060b2,_0x210502=_0x4ec89b[_0x45792e],_0x14c277=formatValue(_0x210502),_0x23d3ca=_0x1c9d6c[_0x1e01da],_0xef4f75=_0x780275(_0x14c277,_0x23d3ca),_0x399ef3=typeof _0x210502===_0x1b1efe(0x73)||typeof _0x210502==='string'&&/^-?\d+$/[_0x1b1efe(0x8d)](_0x210502);return _0x399ef3?padStart(_0xef4f75,_0x23d3ca):padEnd(_0xef4f75,_0x23d3ca);});_0x14a5e3[_0x5060b2(0x88)](colorBorder('│',_0x4fc377)+'\x20'+_0xe1272f[_0x5060b2(0x9f)]('\x20'+colorBorder('│',_0x4fc377)+'\x20')+'\x20'+colorBorder('│',_0x4fc377));});const _0x5ac9c2=_0xa08250[_0x4d0597(0xa1)]((_0x183ed7,_0x185c0d)=>_0x183ed7+_0x185c0d+0x3,-0x1);_0x14a5e3[_0x4d0597(0x88)](colorBorder('├'+_0xa08250['map'](_0x467093=>'─'[_0x4d0597(0x83)](_0x467093+0x2))[_0x4d0597(0x9f)]('┴')+'┤',_0x4fc377));let _0x53dad8;_0x3c5031?_0x53dad8=_0x19a732+'\x20rows\x20('+_0x1ac5d0+_0x4d0597(0xa2):_0x53dad8=_0x19a732+'\x20row'+(_0x19a732===0x1?'':'s');const _0x18bde1=_0x53dad8[_0x4d0597(0x7d)](_0x5ac9c2-0x2);return _0x14a5e3['push'](colorBorder('│',_0x4fc377)+'\x20'+_0x18bde1+'\x20'+colorBorder('│',_0x4fc377)),_0x14a5e3['push'](colorBorder('└'+'─'[_0x4d0597(0x83)](_0x5ac9c2)+'┘',_0x4fc377)),_0x14a5e3['join']('\x0a');}function simplifyType(_0x1e9d7d){const _0x49b2c6=a64_0x4229,_0xe9321b={'varchar':_0x49b2c6(0x70),'bigint':'long','integer':_0x49b2c6(0x9b),'double':_0x49b2c6(0x8f),'boolean':_0x49b2c6(0x89),'date':_0x49b2c6(0x94),'timestamp':_0x49b2c6(0x72),'array':_0x49b2c6(0x79),'map':'map','row':'row'},_0x34cb79=_0x1e9d7d[_0x49b2c6(0x7f)]();for(const [_0x52b9d1,_0x408e5a]of Object[_0x49b2c6(0x85)](_0xe9321b)){if(_0x34cb79['startsWith'](_0x52b9d1))return _0x408e5a;}return _0x1e9d7d['length']>0xa?_0x1e9d7d[_0x49b2c6(0x6c)](0x0,0xa):_0x1e9d7d;}function a64_0x1b81(){const _0x29d04c=['object','repeat','pow','entries','log','boolean','push','bool','72370WFnddl','609681PpoVaL','data','test','toString','double','map','min','stringify','forEach','date','length','tsv','toISOString','max','floor','table','int','name','474SOkFZR','208144ePsbzi','join','3gzSfsS','reduce','\x20shown)','substring','2661410HoyBOR','true','jsonl','string','0\x20B','timestamp','number','slice','false','json','2302776DTeFYo','10078587OePlXp','array','stdout','189MEjTkd','10138680JTSkfj','padEnd','columns','toLowerCase','type','replace'];a64_0x1b81=function(){return _0x29d04c;};return a64_0x1b81();}export function formatAsJSON(_0x4233f4,_0x1d5a3a={}){const _0x33d4dd=a64_0x4229;if(_0x4233f4['data'][_0x33d4dd(0x95)]===0x0)return'[]';if(shouldUseColor(_0x1d5a3a))return colorizeJSON(_0x4233f4[_0x33d4dd(0x8c)],_0x1d5a3a);const _0x4a2307=_0x4233f4[_0x33d4dd(0x8c)][_0x33d4dd(0x90)](_0x2d0164=>'\x20\x20'+JSON[_0x33d4dd(0x92)](_0x2d0164));return'[\x0a'+_0x4a2307[_0x33d4dd(0x9f)](',\x0a')+'\x0a]';}export function formatAsJSONL(_0x429de7,_0x4ff8e6={}){const _0x48f0f7=a64_0x4229;if(_0x429de7[_0x48f0f7(0x8c)][_0x48f0f7(0x95)]===0x0)return'';if(shouldUseColor(_0x4ff8e6))return _0x429de7[_0x48f0f7(0x8c)][_0x48f0f7(0x90)](_0x252bd2=>colorizeJSONCompact(_0x252bd2,_0x4ff8e6))[_0x48f0f7(0x9f)]('\x0a');return _0x429de7['data']['map'](_0x2a92b9=>JSON['stringify'](_0x2a92b9))[_0x48f0f7(0x9f)]('\x0a');}export function formatAsTSV(_0x23dcf3){const _0x3945c7=a64_0x4229;if(_0x23dcf3[_0x3945c7(0x8c)][_0x3945c7(0x95)]===0x0)return'';const _0x48064d=[],_0x513967=_0x23dcf3[_0x3945c7(0x7e)][_0x3945c7(0x90)](_0x8e154=>_0x8e154[_0x3945c7(0x9c)]);return _0x48064d['push'](_0x513967[_0x3945c7(0x9f)]('\x09')),_0x23dcf3[_0x3945c7(0x8c)][_0x3945c7(0x93)](_0x1aec3d=>{const _0x14ad93=_0x3945c7,_0x146b8d=_0x513967[_0x14ad93(0x90)](_0x17c43a=>{const _0x5bdbb2=_0x1aec3d[_0x17c43a];return formatValueForTSV(_0x5bdbb2);});_0x48064d[_0x14ad93(0x88)](_0x146b8d['join']('\x09'));}),_0x48064d[_0x3945c7(0x9f)]('\x0a');}function formatValue(_0x42b8d2){const _0x4ddadb=a64_0x4229;if(_0x42b8d2===null||_0x42b8d2===undefined)return'';if(typeof _0x42b8d2===_0x4ddadb(0x70)){const _0x32785b=_0x42b8d2[_0x4ddadb(0x81)](/\n/g,'\x5cn')[_0x4ddadb(0x81)](/\r/g,'\x5cr')['replace'](/\t/g,'\x5ct');return _0x32785b;}if(typeof _0x42b8d2===_0x4ddadb(0x73))return String(_0x42b8d2);if(typeof _0x42b8d2===_0x4ddadb(0x87))return _0x42b8d2?_0x4ddadb(0x6e):_0x4ddadb(0x75);if(_0x42b8d2 instanceof Date)return _0x42b8d2[_0x4ddadb(0x97)]();if(typeof _0x42b8d2===_0x4ddadb(0x82))return JSON[_0x4ddadb(0x92)](_0x42b8d2);return String(_0x42b8d2);}function formatValueForTSV(_0x3a4894){const _0x56e493=a64_0x4229;if(_0x3a4894===null||_0x3a4894===undefined)return'';if(typeof _0x3a4894===_0x56e493(0x70))return _0x3a4894[_0x56e493(0x81)](/\t/g,'\x5ct')[_0x56e493(0x81)](/\n/g,'\x5cn');if(typeof _0x3a4894===_0x56e493(0x73)||typeof _0x3a4894===_0x56e493(0x87))return String(_0x3a4894);if(_0x3a4894 instanceof Date)return _0x3a4894[_0x56e493(0x97)]();if(typeof _0x3a4894===_0x56e493(0x82))return JSON[_0x56e493(0x92)](_0x3a4894);return String(_0x3a4894);}export function formatQueryResult(_0x320004,_0x3d8edc){const _0x2eb287=a64_0x4229;switch(_0x3d8edc){case _0x2eb287(0x9a):return formatAsTable(_0x320004);case _0x2eb287(0x76):return formatAsJSON(_0x320004);case _0x2eb287(0x6f):return formatAsJSONL(_0x320004);case _0x2eb287(0x96):return formatAsTSV(_0x320004);default:return formatAsJSON(_0x320004);}}export function formatBytes(_0x2fc5ab){const _0x570b48=a64_0x4229;if(_0x2fc5ab===0x0)return _0x570b48(0x71);const _0x392ce4=['B','KB','MB','GB','TB'],_0x524832=0x400,_0x43ea3e=Math[_0x570b48(0x99)](Math['log'](_0x2fc5ab)/Math['log'](_0x524832)),_0x20abf6=_0x2fc5ab/Math[_0x570b48(0x84)](_0x524832,_0x43ea3e),_0x45e41e=_0x20abf6>=0xa?0x1:0x2;return _0x20abf6['toFixed'](_0x45e41e)+'\x20'+_0x392ce4[_0x43ea3e];}export function formatRows(_0x2154b0){const _0xdc69ed=a64_0x4229;if(_0x2154b0==null)return'-';if(_0x2154b0===0x0)return'0';if(_0x2154b0<0x3e8)return _0x2154b0[_0xdc69ed(0x8e)]();const _0x477ba6=['','K','M','B','T'],_0x2fe046=0x3e8,_0xfa934e=Math[_0xdc69ed(0x99)](Math[_0xdc69ed(0x86)](_0x2154b0)/Math[_0xdc69ed(0x86)](_0x2fe046)),_0x17dfb9=_0x2154b0/Math[_0xdc69ed(0x84)](_0x2fe046,_0xfa934e),_0x36fcb6=_0x17dfb9>=0xa?0x1:0x2;return''+_0x17dfb9['toFixed'](_0x36fcb6)+_0x477ba6[_0xfa934e];}
|
|
1
|
+
(function(_0x64a53f,_0x343bef){const _0x36e159=a64_0x57df,_0x478a42=_0x64a53f();while(!![]){try{const _0x3d9fa2=-parseInt(_0x36e159(0x152))/0x1+-parseInt(_0x36e159(0x16e))/0x2+-parseInt(_0x36e159(0x14e))/0x3*(-parseInt(_0x36e159(0x15e))/0x4)+parseInt(_0x36e159(0x171))/0x5+parseInt(_0x36e159(0x175))/0x6*(parseInt(_0x36e159(0x14c))/0x7)+parseInt(_0x36e159(0x17b))/0x8*(parseInt(_0x36e159(0x151))/0x9)+parseInt(_0x36e159(0x167))/0xa*(parseInt(_0x36e159(0x159))/0xb);if(_0x3d9fa2===_0x343bef)break;else _0x478a42['push'](_0x478a42['shift']());}catch(_0x21adcc){_0x478a42['push'](_0x478a42['shift']());}}}(a64_0x8165,0xe953b));import{centerAlign,stringWidth,padEnd,padStart}from'./string-utils.js';import{colorBorder,colorType,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';function a64_0x57df(_0x4d16ff,_0xbd2e6a){const _0x8165e6=a64_0x8165();return a64_0x57df=function(_0x57df10,_0x4bb17d){_0x57df10=_0x57df10-0x14c;let _0x31c9f9=_0x8165e6[_0x57df10];return _0x31c9f9;},a64_0x57df(_0x4d16ff,_0xbd2e6a);}const DEFAULT_MAX_DISPLAY_ROWS=0x28;function getTerminalWidth(){const _0x4012e3=a64_0x57df;return process['stdout'][_0x4012e3(0x154)]||Infinity;}export function formatAsTable(_0x3dfd06,_0x26ed39=DEFAULT_MAX_DISPLAY_ROWS,_0x5b3ae4=![],_0x76fb57={}){const _0x3b0429=a64_0x57df;if(_0x3dfd06[_0x3b0429(0x161)][_0x3b0429(0x168)]===0x0)return _0x3b0429(0x15f);const _0x445aa4=_0x3dfd06[_0x3b0429(0x154)][_0x3b0429(0x15a)](_0x2f9316=>_0x2f9316[_0x3b0429(0x155)]),_0x22b6d1=_0x3dfd06['columns'][_0x3b0429(0x15a)](_0x40875e=>simplifyType(_0x40875e[_0x3b0429(0x164)])),_0x225d91=_0x3dfd06[_0x3b0429(0x161)][_0x3b0429(0x157)](0x0,_0x26ed39),_0x5ef090=_0x3dfd06['data'][_0x3b0429(0x168)],_0x108f88=_0x5ef090>_0x26ed39,_0x30d4fd=[],_0x25a7e9=getTerminalWidth(),_0x2ee772=_0x25a7e9!==Infinity,_0x275053=0x32;let _0x5e40f8=_0x445aa4[_0x3b0429(0x15a)]((_0x55643b,_0x3ef95f)=>{const _0x973b71=_0x3b0429,_0x4d605e=stringWidth(_0x22b6d1[_0x3ef95f]),_0x268f7b=Math[_0x973b71(0x17c)](..._0x225d91[_0x973b71(0x15a)](_0x26a7e7=>{const _0x345a99=_0x26a7e7[_0x55643b];return stringWidth(formatValue(_0x345a99));})),_0x31f934=Math[_0x973b71(0x17c)](stringWidth(_0x55643b),_0x4d605e,_0x268f7b);return _0x5b3ae4?_0x31f934:Math[_0x973b71(0x172)](_0x31f934,_0x275053);});if(_0x2ee772&&!_0x5b3ae4&&_0x445aa4[_0x3b0429(0x168)]>0x0){const _0x47bfd2=_0x3a0e90=>{let _0x476184=0x1;for(const _0x478123 of _0x3a0e90){_0x476184+=_0x478123+0x3;}return _0x476184+0x1;};let _0x28760c=_0x47bfd2(_0x5e40f8);if(_0x28760c>_0x25a7e9){const _0x506f82=0x3;for(let _0x7e9db7=_0x5e40f8['length']-0x1;_0x7e9db7>=0x0;_0x7e9db7--){_0x28760c=_0x47bfd2(_0x5e40f8);if(_0x28760c<=_0x25a7e9)break;const _0x411a38=_0x5e40f8[_0x7e9db7],_0x37f4c3=_0x28760c-_0x25a7e9,_0xfb551=_0x411a38-_0x506f82,_0x17655e=Math[_0x3b0429(0x172)](_0x37f4c3,_0xfb551);_0x17655e>0x0&&(_0x5e40f8[_0x7e9db7]=_0x411a38-_0x17655e);}}}const _0x2ef669=_0x445aa4,_0x3bd7a4=_0x22b6d1,_0x5bb8e8=_0x5e40f8,_0xd7e93=_0x5e40f8;_0x30d4fd['push'](colorBorder('┌'+_0xd7e93[_0x3b0429(0x15a)](_0x494f31=>'─'[_0x3b0429(0x16a)](_0x494f31+0x2))[_0x3b0429(0x179)]('┬')+'┐',_0x76fb57));const _0x5c540d=_0x2ef669['map']((_0x59f4c7,_0x140ab6)=>centerAlign(_0x59f4c7,_0x5bb8e8[_0x140ab6]));_0x30d4fd[_0x3b0429(0x178)](colorBorder('│',_0x76fb57)+'\x20'+_0x5c540d['join']('\x20'+colorBorder('│',_0x76fb57)+'\x20')+'\x20'+colorBorder('│',_0x76fb57));const _0x56014c=_0x3bd7a4[_0x3b0429(0x15a)]((_0xa31d28,_0x5155aa)=>colorType(centerAlign(_0xa31d28,_0x5bb8e8[_0x5155aa]),_0x76fb57));_0x30d4fd['push'](colorBorder('│',_0x76fb57)+'\x20'+_0x56014c['join']('\x20'+colorBorder('│',_0x76fb57)+'\x20')+'\x20'+colorBorder('│',_0x76fb57)),_0x30d4fd['push'](colorBorder('├'+_0xd7e93[_0x3b0429(0x15a)](_0x3bfd2f=>'─'[_0x3b0429(0x16a)](_0x3bfd2f+0x2))['join']('┼')+'┤',_0x76fb57));const _0x168837=(_0x7d79ff,_0x433d02)=>{const _0x83ac01=_0x3b0429,_0x511e6e=stringWidth(_0x7d79ff);if(_0x511e6e<=_0x433d02)return _0x7d79ff;let _0x405ab5=_0x7d79ff;while(stringWidth(_0x405ab5+'…')>_0x433d02&&_0x405ab5[_0x83ac01(0x168)]>0x0){_0x405ab5=_0x405ab5[_0x83ac01(0x157)](0x0,-0x1);}return _0x405ab5+'…';};_0x225d91['forEach'](_0x3b966a=>{const _0x5b32a8=_0x3b0429,_0x340aa1=_0x445aa4[_0x5b32a8(0x15a)]((_0x33a09c,_0x1178aa)=>{const _0x471178=_0x5b32a8,_0x582ebe=_0x3b966a[_0x33a09c],_0x226477=formatValue(_0x582ebe),_0x19a87a=_0x5bb8e8[_0x1178aa],_0x391338=_0x168837(_0x226477,_0x19a87a),_0x242f13=typeof _0x582ebe===_0x471178(0x177)||typeof _0x582ebe==='string'&&/^-?\d+$/['test'](_0x582ebe);return _0x242f13?padStart(_0x391338,_0x19a87a):padEnd(_0x391338,_0x19a87a);});_0x30d4fd[_0x5b32a8(0x178)](colorBorder('│',_0x76fb57)+'\x20'+_0x340aa1[_0x5b32a8(0x179)]('\x20'+colorBorder('│',_0x76fb57)+'\x20')+'\x20'+colorBorder('│',_0x76fb57));});const _0x414aa5=_0xd7e93['reduce']((_0x5b9482,_0x22c554)=>_0x5b9482+_0x22c554+0x3,-0x1);_0x30d4fd[_0x3b0429(0x178)](colorBorder('├'+_0xd7e93[_0x3b0429(0x15a)](_0x15d5af=>'─'[_0x3b0429(0x16a)](_0x15d5af+0x2))[_0x3b0429(0x179)]('┴')+'┤',_0x76fb57));let _0x284d57;_0x108f88?_0x284d57=_0x5ef090+_0x3b0429(0x176)+_0x26ed39+_0x3b0429(0x165):_0x284d57=_0x5ef090+_0x3b0429(0x14f)+(_0x5ef090===0x1?'':'s');const _0x3c7351=_0x284d57['padEnd'](_0x414aa5-0x2);return _0x30d4fd[_0x3b0429(0x178)](colorBorder('│',_0x76fb57)+'\x20'+_0x3c7351+'\x20'+colorBorder('│',_0x76fb57)),_0x30d4fd[_0x3b0429(0x178)](colorBorder('└'+'─'[_0x3b0429(0x16a)](_0x414aa5)+'┘',_0x76fb57)),_0x30d4fd[_0x3b0429(0x179)]('\x0a');}function simplifyType(_0x1eef35){const _0x53093b=a64_0x57df,_0x1cb0ac={'varchar':_0x53093b(0x170),'bigint':'long','integer':_0x53093b(0x16c),'double':'double','boolean':'bool','date':_0x53093b(0x15b),'timestamp':_0x53093b(0x163),'array':_0x53093b(0x16f),'map':'map','row':_0x53093b(0x153)},_0x59a612=_0x1eef35[_0x53093b(0x14d)]();for(const [_0x3c3be2,_0x2312ef]of Object['entries'](_0x1cb0ac)){if(_0x59a612['startsWith'](_0x3c3be2))return _0x2312ef;}return _0x1eef35[_0x53093b(0x168)]>0xa?_0x1eef35['substring'](0x0,0xa):_0x1eef35;}export function formatAsJSON(_0x5c1d8c,_0x30a107={}){const _0x324a70=a64_0x57df;if(_0x5c1d8c[_0x324a70(0x161)][_0x324a70(0x168)]===0x0)return'[]';if(shouldUseColor(_0x30a107))return colorizeJSON(_0x5c1d8c[_0x324a70(0x161)],_0x30a107);const _0x906b62=_0x5c1d8c['data'][_0x324a70(0x15a)](_0xa73392=>'\x20\x20'+JSON[_0x324a70(0x160)](_0xa73392));return'[\x0a'+_0x906b62[_0x324a70(0x179)](',\x0a')+'\x0a]';}function a64_0x8165(){const _0x49bef0=['length','tsv','repeat','json','int','toFixed','347574ucMrdH','array','string','2346350sgnoYI','min','floor','pow','39966MbpFml','\x20rows\x20(','number','push','join','jsonl','41312bdaezO','max','791eOOUOs','toLowerCase','36CyCUaO','\x20row','boolean','27QiKKEv','349091weNyPx','row','columns','name','replace','slice','0\x20B','607541AxiKtV','map','date','toString','object','43556OwoROO','No\x20rows\x20returned','stringify','data','false','timestamp','type','\x20shown)','log','20CjZQNl'];a64_0x8165=function(){return _0x49bef0;};return a64_0x8165();}export function formatAsJSONL(_0x1838d1,_0x183189={}){const _0x79e69e=a64_0x57df;if(_0x1838d1['data']['length']===0x0)return'';if(shouldUseColor(_0x183189))return _0x1838d1[_0x79e69e(0x161)][_0x79e69e(0x15a)](_0x2ab2c3=>colorizeJSONCompact(_0x2ab2c3,_0x183189))[_0x79e69e(0x179)]('\x0a');return _0x1838d1[_0x79e69e(0x161)][_0x79e69e(0x15a)](_0xeca80f=>JSON[_0x79e69e(0x160)](_0xeca80f))[_0x79e69e(0x179)]('\x0a');}export function formatAsTSV(_0xcc4e1f){const _0x1eb49f=a64_0x57df;if(_0xcc4e1f['data'][_0x1eb49f(0x168)]===0x0)return'';const _0x4d9a55=[],_0x442c41=_0xcc4e1f[_0x1eb49f(0x154)][_0x1eb49f(0x15a)](_0x22a8a5=>_0x22a8a5[_0x1eb49f(0x155)]);return _0x4d9a55[_0x1eb49f(0x178)](_0x442c41['join']('\x09')),_0xcc4e1f['data']['forEach'](_0x21b987=>{const _0x124b24=_0x1eb49f,_0x57d6cf=_0x442c41[_0x124b24(0x15a)](_0x24ab33=>{const _0x482344=_0x21b987[_0x24ab33];return formatValueForTSV(_0x482344);});_0x4d9a55[_0x124b24(0x178)](_0x57d6cf[_0x124b24(0x179)]('\x09'));}),_0x4d9a55['join']('\x0a');}function formatValue(_0x3218a9){const _0x20175f=a64_0x57df;if(_0x3218a9===null||_0x3218a9===undefined)return'';if(typeof _0x3218a9===_0x20175f(0x170)){const _0x55e60a=_0x3218a9['replace'](/\n/g,'\x5cn')[_0x20175f(0x156)](/\r/g,'\x5cr')['replace'](/\t/g,'\x5ct');return _0x55e60a;}if(typeof _0x3218a9===_0x20175f(0x177))return String(_0x3218a9);if(typeof _0x3218a9==='boolean')return _0x3218a9?'true':_0x20175f(0x162);if(_0x3218a9 instanceof Date)return _0x3218a9['toISOString']();if(typeof _0x3218a9==='object')return JSON[_0x20175f(0x160)](_0x3218a9);return String(_0x3218a9);}function formatValueForTSV(_0x22e11d){const _0x4cab2e=a64_0x57df;if(_0x22e11d===null||_0x22e11d===undefined)return'';if(typeof _0x22e11d===_0x4cab2e(0x170))return _0x22e11d[_0x4cab2e(0x156)](/\t/g,'\x5ct')[_0x4cab2e(0x156)](/\n/g,'\x5cn');if(typeof _0x22e11d===_0x4cab2e(0x177)||typeof _0x22e11d===_0x4cab2e(0x150))return String(_0x22e11d);if(_0x22e11d instanceof Date)return _0x22e11d['toISOString']();if(typeof _0x22e11d===_0x4cab2e(0x15d))return JSON[_0x4cab2e(0x160)](_0x22e11d);return String(_0x22e11d);}export function formatQueryResult(_0x2da2a7,_0x3e0781){const _0x2595f0=a64_0x57df;switch(_0x3e0781){case'table':return formatAsTable(_0x2da2a7);case _0x2595f0(0x16b):return formatAsJSON(_0x2da2a7);case _0x2595f0(0x17a):return formatAsJSONL(_0x2da2a7);case _0x2595f0(0x169):return formatAsTSV(_0x2da2a7);default:return formatAsJSON(_0x2da2a7);}}export function formatBytes(_0x3fc564){const _0x42e18f=a64_0x57df;if(_0x3fc564===0x0)return _0x42e18f(0x158);const _0x1f20f0=['B','KB','MB','GB','TB'],_0x2e8e5c=0x400,_0xbe846d=Math[_0x42e18f(0x173)](Math[_0x42e18f(0x166)](_0x3fc564)/Math[_0x42e18f(0x166)](_0x2e8e5c)),_0x47f638=_0x3fc564/Math[_0x42e18f(0x174)](_0x2e8e5c,_0xbe846d),_0xdc6c81=_0x47f638>=0xa?0x1:0x2;return _0x47f638[_0x42e18f(0x16d)](_0xdc6c81)+'\x20'+_0x1f20f0[_0xbe846d];}export function formatRows(_0x4b77da){const _0x2b6f74=a64_0x57df;if(_0x4b77da==null)return'-';if(_0x4b77da===0x0)return'0';if(_0x4b77da<0x3e8)return _0x4b77da[_0x2b6f74(0x15c)]();const _0x183ae1=['','K','M','B','T'],_0x32a7c0=0x3e8,_0x2947ec=Math[_0x2b6f74(0x173)](Math[_0x2b6f74(0x166)](_0x4b77da)/Math[_0x2b6f74(0x166)](_0x32a7c0)),_0x47ce49=_0x4b77da/Math[_0x2b6f74(0x174)](_0x32a7c0,_0x2947ec),_0x2d4572=_0x47ce49>=0xa?0x1:0x2;return''+_0x47ce49[_0x2b6f74(0x16d)](_0x2d4572)+_0x183ae1[_0x2947ec];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a65_0x1cb4(){const _0x2367b0=['EACCES','800UYyeMh','\x27:\x20','7238dlVqeW','code','NOT_FOUND','utf-8','20JELhgS','File\x20not\x20found:\x20','395wvdMeo','message','ENOENT','parse','Failed\x20to\x20load\x20JSON:\x20','2110794NPykkB','5082xHLEyz','3yQlGmG','3182988dcZxFc','INTERNAL','617550bFuCwv','1699767hxEzRm','Invalid\x20JSON\x20in\x20file\x20\x27','4508652JOBFzU','11mCwkhf','PERMISSION_DENIED','Permission\x20denied\x20reading\x20file:\x20','INVALID_ARGUMENT'];a65_0x1cb4=function(){return _0x2367b0;};return a65_0x1cb4();}(function(_0x583cfb,_0x40de15){const _0x245856=a65_0x367a,_0x2d1c8b=_0x583cfb();while(!![]){try{const _0x320a9e=-parseInt(_0x245856(0x13c))/0x1+parseInt(_0x245856(0x137))/0x2+parseInt(_0x245856(0x139))/0x3*(-parseInt(_0x245856(0x13a))/0x4)+-parseInt(_0x245856(0x132))/0x5*(-parseInt(_0x245856(0x138))/0x6)+parseInt(_0x245856(0x147))/0x7*(parseInt(_0x245856(0x145))/0x8)+parseInt(_0x245856(0x13d))/0x9*(parseInt(_0x245856(0x14b))/0xa)+parseInt(_0x245856(0x140))/0xb*(parseInt(_0x245856(0x13f))/0xc);if(_0x320a9e===_0x40de15)break;else _0x2d1c8b['push'](_0x2d1c8b['shift']());}catch(_0x1080c1){_0x2d1c8b['push'](_0x2d1c8b['shift']());}}}(a65_0x1cb4,0x8a264));function a65_0x367a(_0x4a43b0,_0x2fbcfd){const _0x1cb4f3=a65_0x1cb4();return a65_0x367a=function(_0x367a4b,_0x2bb38d){_0x367a4b=_0x367a4b-0x132;let _0x11d04f=_0x1cb4f3[_0x367a4b];return _0x11d04f;},a65_0x367a(_0x4a43b0,_0x2fbcfd);}import{readFile}from'fs/promises';import{SDKError,ErrorCode}from'../sdk/errors.js';export async function loadJSON(_0xb81c23,_0x1b1f07){const _0x384503=a65_0x367a;try{if(_0x1b1f07){const _0x1942dd=await readFile(_0xb81c23,_0x384503(0x14a));try{return JSON[_0x384503(0x135)](_0x1942dd);}catch(_0x177d39){throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x384503(0x13e)+_0xb81c23+_0x384503(0x146)+(_0x177d39 instanceof Error?_0x177d39[_0x384503(0x133)]:String(_0x177d39)));}}else try{return JSON['parse'](_0xb81c23);}catch(_0x4e26bc){throw new SDKError(ErrorCode[_0x384503(0x143)],'Invalid\x20JSON\x20string:\x20'+(_0x4e26bc instanceof Error?_0x4e26bc[_0x384503(0x133)]:String(_0x4e26bc)));}}catch(_0x12ce77){if(_0x12ce77 instanceof SDKError)throw _0x12ce77;if(_0x12ce77 instanceof Error&&_0x384503(0x148)in _0x12ce77){const _0xade65c=_0x12ce77;if(_0xade65c['code']===_0x384503(0x134))throw new SDKError(ErrorCode[_0x384503(0x149)],_0x384503(0x14c)+_0xb81c23);else{if(_0xade65c[_0x384503(0x148)]===_0x384503(0x144))throw new SDKError(ErrorCode[_0x384503(0x141)],_0x384503(0x142)+_0xb81c23);}}throw new SDKError(ErrorCode[_0x384503(0x13b)],_0x384503(0x136)+(_0x12ce77 instanceof Error?_0x12ce77['message']:String(_0x12ce77)));}}export async function loadJSONFromOptions(_0x5c1b59,_0x233b22){const _0xfe53ed=a65_0x367a;if(_0x5c1b59&&_0x233b22)throw new SDKError(ErrorCode[_0xfe53ed(0x143)],'Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.');if(_0x5c1b59)return await loadJSON(_0x5c1b59,![]);if(_0x233b22)return await loadJSON(_0x233b22,!![]);return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a66_0x3288(){const _0x11bfc2=['3617728IlHYUV','2645657AIKBQB','326fcqfIn','match','15mCCoAE','691908LsTBZm','1623GTEmKL','1090536WVnPjB','1764996wRrytt','toLowerCase','2760210MPUHHk'];a66_0x3288=function(){return _0x11bfc2;};return a66_0x3288();}function a66_0x4e5e(_0x146783,_0x44411b){const _0x32889e=a66_0x3288();return a66_0x4e5e=function(_0x4e5eab,_0xf23c30){_0x4e5eab=_0x4e5eab-0xdb;let _0x20bf44=_0x32889e[_0x4e5eab];return _0x20bf44;},a66_0x4e5e(_0x146783,_0x44411b);}(function(_0x10c923,_0xd60cad){const _0x15f109=a66_0x4e5e,_0x27cbe3=_0x10c923();while(!![]){try{const _0x91012a=-parseInt(_0x15f109(0xdf))/0x1+-parseInt(_0x15f109(0xdc))/0x2*(-parseInt(_0x15f109(0xe0))/0x3)+parseInt(_0x15f109(0xe2))/0x4+parseInt(_0x15f109(0xde))/0x5*(parseInt(_0x15f109(0xe1))/0x6)+parseInt(_0x15f109(0xdb))/0x7+-parseInt(_0x15f109(0xe5))/0x8+parseInt(_0x15f109(0xe4))/0x9;if(_0x91012a===_0xd60cad)break;else _0x27cbe3['push'](_0x27cbe3['shift']());}catch(_0x361e02){_0x27cbe3['push'](_0x27cbe3['shift']());}}}(a66_0x3288,0x96331));const MODEL_ALIASES={'haiku':'claude-4.5-haiku','sonnet':'claude-4.5-sonnet'};export function extractModelAlias(_0x17a55c){const _0x25c207=a66_0x4e5e,_0x344184=_0x17a55c[_0x25c207(0xdd)](/^claude-(?:\d+-)?(?:\d+-?)?(sonnet|haiku|opus)/i);if(_0x344184)return _0x344184[0x1][_0x25c207(0xe3)]();return _0x17a55c;}export function resolveModelAlias(_0x2b2ac0){return MODEL_ALIASES[_0x2b2ac0['toLowerCase']()]||_0x2b2ac0;}export function getModelAliases(){return{...MODEL_ALIASES};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x199064,_0x580ec1){const _0x5e7e86=a67_0x10ee,_0x1b8b7c=_0x199064();while(!![]){try{const _0x296480=parseInt(_0x5e7e86(0x16b))/0x1*(-parseInt(_0x5e7e86(0x167))/0x2)+-parseInt(_0x5e7e86(0x161))/0x3*(-parseInt(_0x5e7e86(0x16e))/0x4)+parseInt(_0x5e7e86(0x16c))/0x5+parseInt(_0x5e7e86(0x164))/0x6+parseInt(_0x5e7e86(0x168))/0x7+-parseInt(_0x5e7e86(0x169))/0x8+-parseInt(_0x5e7e86(0x165))/0x9;if(_0x296480===_0x580ec1)break;else _0x1b8b7c['push'](_0x1b8b7c['shift']());}catch(_0x2c865e){_0x1b8b7c['push'](_0x1b8b7c['shift']());}}}(a67_0x4303,0xe6e62));function a67_0x4303(){const _0x2e9d31=['10146496VDUozc','.\x20Must\x20be\x20an\x20integer.','1071247reCkkv','4715155TBXFny','Invalid\x20limit\x20value:\x20','4AbkciA','2428143HGOgbK','.\x20Must\x20be\x20a\x20number.','Invalid\x20timeout\x20value:\x20','8806668hsuutS','12387357FDcvRs','number','2gEWozo','10090528uOnUUF'];a67_0x4303=function(){return _0x2e9d31;};return a67_0x4303();}export function validateLimitOption(_0x1c8639){const _0x4191f7=a67_0x10ee;if(!Number['isInteger'](_0x1c8639))return{'isValid':![],'error':_0x4191f7(0x16d)+_0x1c8639+_0x4191f7(0x16a)};if(_0x1c8639<=0x0)return{'isValid':![],'error':'Invalid\x20limit\x20value:\x20'+_0x1c8639+'.\x20Must\x20be\x20a\x20positive\x20integer.'};return{'isValid':!![],'value':_0x1c8639};}function a67_0x10ee(_0x2e1aa8,_0x532d41){const _0x430313=a67_0x4303();return a67_0x10ee=function(_0x10ee4f,_0x525dc8){_0x10ee4f=_0x10ee4f-0x161;let _0x2425db=_0x430313[_0x10ee4f];return _0x2425db;},a67_0x10ee(_0x2e1aa8,_0x532d41);}export function validateTimeoutOption(_0x5e6fd3,_0xe10734=0x1e){const _0x432e67=a67_0x10ee;if(_0x5e6fd3===undefined)return{'isValid':!![],'value':_0xe10734};const _0x57e175=typeof _0x5e6fd3===_0x432e67(0x166)?_0x5e6fd3:parseFloat(_0x5e6fd3);if(isNaN(_0x57e175))return{'isValid':![],'error':_0x432e67(0x163)+_0x5e6fd3+_0x432e67(0x162)};if(_0x57e175<=0x0)return{'isValid':![],'error':_0x432e67(0x163)+_0x57e175+'.\x20Must\x20be\x20a\x20positive\x20number.'};return{'isValid':!![],'value':_0x57e175};}
|
package/dist/utils/port.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x17ce01,_0x25df24){const _0x2a101d=a68_0x42c4,_0x2d1199=_0x17ce01();while(!![]){try{const _0x17bac3=parseInt(_0x2a101d(0xf8))/0x1*(-parseInt(_0x2a101d(0xf7))/0x2)+-parseInt(_0x2a101d(0xf2))/0x3*(-parseInt(_0x2a101d(0xf6))/0x4)+-parseInt(_0x2a101d(0xfc))/0x5+parseInt(_0x2a101d(0xfd))/0x6+parseInt(_0x2a101d(0xf5))/0x7*(parseInt(_0x2a101d(0xfb))/0x8)+parseInt(_0x2a101d(0xfe))/0x9+-parseInt(_0x2a101d(0xfa))/0xa;if(_0x17bac3===_0x25df24)break;else _0x2d1199['push'](_0x2d1199['shift']());}catch(_0x37251b){_0x2d1199['push'](_0x2d1199['shift']());}}}(a68_0x585f,0x7fade));function a68_0x585f(){const _0x4aa630=['4704264KmXELQ','6168051nHnMuj','listening','0.0.0.0','No\x20available\x20port\x20found\x20between\x20','error','EADDRINUSE','291WhkmKX','once','\x20and\x20','2892246krtrwt','15396nNiUzx','238WRMeGV','5779vIfbAq','code','10235190XjcpJi','16lsQPiU','2174490SwiuuE'];a68_0x585f=function(){return _0x4aa630;};return a68_0x585f();}function a68_0x42c4(_0x5575ac,_0x41d888){const _0x585fdf=a68_0x585f();return a68_0x42c4=function(_0x42c4c9,_0x3ecf27){_0x42c4c9=_0x42c4c9-0xf1;let _0x3811f2=_0x585fdf[_0x42c4c9];return _0x3811f2;},a68_0x42c4(_0x5575ac,_0x41d888);}import{createServer}from'node:net';export async function isPortAvailable(_0x1fa0a7){return new Promise(_0x31244b=>{const _0x252f14=a68_0x42c4,_0x28b5e8=createServer();_0x28b5e8[_0x252f14(0xf3)](_0x252f14(0x102),_0x435d4c=>{const _0x4e6e6d=_0x252f14;_0x435d4c[_0x4e6e6d(0xf9)]===_0x4e6e6d(0xf1)?_0x31244b(![]):_0x31244b(![]);}),_0x28b5e8['once'](_0x252f14(0xff),()=>{_0x28b5e8['close'](),_0x31244b(!![]);}),_0x28b5e8['listen'](_0x1fa0a7,_0x252f14(0x100));});}export async function findAvailablePort(_0x5d33a1=0xfa0,_0x204d53=0x64){const _0x32f4c5=a68_0x42c4;for(let _0x20fdb2=0x0;_0x20fdb2<_0x204d53;_0x20fdb2++){const _0x5539e8=_0x5d33a1+_0x20fdb2;if(await isPortAvailable(_0x5539e8))return _0x5539e8;}throw new Error(_0x32f4c5(0x101)+_0x5d33a1+_0x32f4c5(0xf4)+(_0x5d33a1+_0x204d53-0x1));}
|
package/dist/utils/process.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a69_0x10e52c=a69_0x68c3;(function(_0x1ef8d2,_0x5254c0){const _0x1e9334=a69_0x68c3,_0x2ca1ce=_0x1ef8d2();while(!![]){try{const _0x26e045=-parseInt(_0x1e9334(0xbc))/0x1*(-parseInt(_0x1e9334(0xd3))/0x2)+-parseInt(_0x1e9334(0xcb))/0x3*(parseInt(_0x1e9334(0xb0))/0x4)+-parseInt(_0x1e9334(0xb1))/0x5*(parseInt(_0x1e9334(0xd0))/0x6)+parseInt(_0x1e9334(0xbf))/0x7+-parseInt(_0x1e9334(0xd1))/0x8+parseInt(_0x1e9334(0xb9))/0x9*(parseInt(_0x1e9334(0xc5))/0xa)+-parseInt(_0x1e9334(0xcc))/0xb*(-parseInt(_0x1e9334(0xb5))/0xc);if(_0x26e045===_0x5254c0)break;else _0x2ca1ce['push'](_0x2ca1ce['shift']());}catch(_0x24c3a8){_0x2ca1ce['push'](_0x2ca1ce['shift']());}}}(a69_0x4b38,0xcd4e9));import{execSync}from'node:child_process';const SHELL_NAMES=new Set([a69_0x10e52c(0xc3),'zsh','sh','fish',a69_0x10e52c(0xb2),'tcsh',a69_0x10e52c(0xca),a69_0x10e52c(0xb3),'pwsh',a69_0x10e52c(0xc7),'nu','ion','elvish',a69_0x10e52c(0xcf)]);function a69_0x4b38(){const _0x5105ad=['csh','214467qPpQDq','1111pDhGWb','trim','pid','xonsh','75792fnhddw','12530296pfgJGb','DEBUG','660242PbJxvT','comm','join','has','\x20-o\x20ppid=,comm=','length','env','44SHNVhb','415eScDOp','ksh','dash','toLowerCase','163692NpxLHY','pop','split','\x20on\x20POSIX:','1989xTiadQ','wmic\x20process\x20where\x20ProcessId=','error','3wOIWZi','replace','filter','9921583ubvDMJ','Could\x20not\x20get\x20process\x20info\x20for\x20PID\x20','platform','Failed\x20to\x20get\x20process\x20info\x20for\x20PID\x20','bash','ppid','20660AYMWuW','No\x20shell\x20found\x20in\x20process\x20tree,\x20falling\x20back\x20to\x20process.ppid','powershell','kill',',\x20using\x20fallback'];a69_0x4b38=function(){return _0x5105ad;};return a69_0x4b38();}function getProcessInfoWindows(_0x25d0fe){const _0x4178f1=a69_0x10e52c;try{const _0x1715c3=execSync(_0x4178f1(0xba)+_0x25d0fe+'\x20get\x20ParentProcessId,Name\x20/format:csv',{'encoding':'utf-8','windowsHide':!![]})[_0x4178f1(0xcd)](),_0xf8d320=_0x1715c3[_0x4178f1(0xb7)]('\x0a')[_0x4178f1(0xbe)](_0x5434f0=>_0x5434f0[_0x4178f1(0xcd)]());if(_0xf8d320[_0x4178f1(0xd8)]<0x2)return null;const _0x143ead=_0xf8d320[_0xf8d320[_0x4178f1(0xd8)]-0x1][_0x4178f1(0xb7)](',');if(_0x143ead[_0x4178f1(0xd8)]<0x3)return null;const _0x5233b4=_0x143ead[0x1]?.[_0x4178f1(0xcd)]()||'',_0x52d0a2=parseInt(_0x143ead[0x2]?.[_0x4178f1(0xcd)]()||'0',0xa);if(isNaN(_0x52d0a2)||!_0x5233b4)return null;return{'pid':_0x25d0fe,'ppid':_0x52d0a2,'comm':_0x5233b4['replace'](/\.exe$/i,'')};}catch(_0x457dd3){return process[_0x4178f1(0xaf)]['DEBUG']&&console['error'](_0x4178f1(0xc2)+_0x25d0fe+'\x20on\x20Windows:',_0x457dd3),null;}}function getProcessInfoPosix(_0x18efb5){const _0x6e6181=a69_0x10e52c;try{const _0x444f8f=execSync('ps\x20-p\x20'+_0x18efb5+_0x6e6181(0xd7),{'encoding':'utf-8'})[_0x6e6181(0xcd)](),[_0x1c9ae1,..._0x3ab96d]=_0x444f8f[_0x6e6181(0xb7)](/\s+/),_0x5645c4=parseInt(_0x1c9ae1,0xa),_0x19dde8=_0x3ab96d[_0x6e6181(0xd5)]('\x20');if(isNaN(_0x5645c4))return null;return{'pid':_0x18efb5,'ppid':_0x5645c4,'comm':_0x19dde8};}catch(_0x46929b){return process[_0x6e6181(0xaf)][_0x6e6181(0xd2)]&&console[_0x6e6181(0xbb)](_0x6e6181(0xc2)+_0x18efb5+_0x6e6181(0xb8),_0x46929b),null;}}function getProcessInfo(_0x444475){const _0x3c0824=a69_0x10e52c;if(process[_0x3c0824(0xc1)]==='win32')return getProcessInfoWindows(_0x444475);return getProcessInfoPosix(_0x444475);}function isShell(_0x1d3f74){const _0x621369=a69_0x10e52c,_0x5290cb=_0x1d3f74[_0x621369(0xbd)](/^-/,'')[_0x621369(0xb7)]('/')[_0x621369(0xb6)]()||'';return SHELL_NAMES[_0x621369(0xd6)](_0x5290cb[_0x621369(0xb4)]());}let cachedShellPID;function a69_0x68c3(_0x39f87b,_0x451007){const _0x4b38d=a69_0x4b38();return a69_0x68c3=function(_0x68c39,_0x42f363){_0x68c39=_0x68c39-0xaf;let _0x419a97=_0x4b38d[_0x68c39];return _0x419a97;},a69_0x68c3(_0x39f87b,_0x451007);}function findShellPID(){const _0x2a86d9=a69_0x10e52c;let _0x4876e9=process['ppid'];const _0x12ad69=0xa;let _0x20d70e=0x0;while(_0x20d70e<_0x12ad69){const _0x2c096b=getProcessInfo(_0x4876e9);if(!_0x2c096b){process[_0x2a86d9(0xaf)][_0x2a86d9(0xd2)]&&console[_0x2a86d9(0xbb)](_0x2a86d9(0xc0)+_0x4876e9+_0x2a86d9(0xc9));break;}if(isShell(_0x2c096b['comm']))return _0x2c096b['pid'];if(_0x2c096b[_0x2a86d9(0xc4)]===0x0||_0x2c096b['ppid']===0x1){if(isShell(_0x2c096b[_0x2a86d9(0xd4)]))return _0x2c096b[_0x2a86d9(0xce)];break;}_0x4876e9=_0x2c096b[_0x2a86d9(0xc4)],_0x20d70e++;}return process['env'][_0x2a86d9(0xd2)]&&console[_0x2a86d9(0xbb)](_0x2a86d9(0xc6)),process[_0x2a86d9(0xc4)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x279f96){const _0xebeaa9=a69_0x10e52c;try{return process[_0xebeaa9(0xc8)](_0x279f96,0x0),!![];}catch{return![];}}
|
package/dist/utils/prompt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4b9089,_0x2add3a){const _0x19d8db=a70_0x2339,_0xdd961c=_0x4b9089();while(!![]){try{const _0xdac4f6=-parseInt(_0x19d8db(0x161))/0x1*(parseInt(_0x19d8db(0x168))/0x2)+parseInt(_0x19d8db(0x169))/0x3*(-parseInt(_0x19d8db(0x171))/0x4)+-parseInt(_0x19d8db(0x16e))/0x5*(-parseInt(_0x19d8db(0x163))/0x6)+-parseInt(_0x19d8db(0x170))/0x7*(parseInt(_0x19d8db(0x16d))/0x8)+-parseInt(_0x19d8db(0x16c))/0x9+-parseInt(_0x19d8db(0x160))/0xa*(-parseInt(_0x19d8db(0x162))/0xb)+parseInt(_0x19d8db(0x16f))/0xc;if(_0xdac4f6===_0x2add3a)break;else _0xdd961c['push'](_0xdd961c['shift']());}catch(_0x338470){_0xdd961c['push'](_0xdd961c['shift']());}}}(a70_0x4285,0xc20ae));function a70_0x2339(_0x39ad51,_0x528de6){const _0x4285e4=a70_0x4285();return a70_0x2339=function(_0x233960,_0x583e5a){_0x233960=_0x233960-0x160;let _0x90b6da=_0x4285e4[_0x233960];return _0x90b6da;},a70_0x2339(_0x39ad51,_0x528de6);}import*as a70_0x490944 from'readline';function a70_0x4285(){const _0x33c890=['3vfXAsy','stdin','\x20(y/N):\x20','5677650XAmOcC','8824gHEqmb','15IUjuOP','34816836MiTDiN','2569jrBEjB','5987084vdPBMD','toLowerCase','50TgWNHZ','11119RHdwjI','728618qJNFSE','1968294YHjZDS','close','question','stdout','createInterface','160LXNAEg'];a70_0x4285=function(){return _0x33c890;};return a70_0x4285();}export async function confirm(_0x45964e){const _0x568a18=a70_0x2339,_0x1474eb=a70_0x490944[_0x568a18(0x167)]({'input':process[_0x568a18(0x16a)],'output':process[_0x568a18(0x166)]});return new Promise(_0x262455=>{const _0x269eb1=_0x568a18;_0x1474eb[_0x269eb1(0x165)](_0x45964e+_0x269eb1(0x16b),_0x3d6cbe=>{const _0x5c415d=_0x269eb1;_0x1474eb[_0x5c415d(0x164)](),_0x262455(_0x3d6cbe[_0x5c415d(0x172)]()==='y'||_0x3d6cbe['toLowerCase']()==='yes');});});}
|