@treasuredata/tdx 0.8.9 → 0.8.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +2 -2
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/client/cdp-api-client.d.ts +10 -1
- package/dist/client/cdp-api-client.d.ts.map +1 -1
- package/dist/client/cdp-api-client.js +1 -1
- package/dist/client/cdp-api-client.js.map +1 -1
- package/dist/client/engage-api-client.js +1 -1
- package/dist/client/http-client.js +1 -1
- package/dist/client/llm-api-client.js +1 -1
- package/dist/client/rate-limiter.js +1 -1
- package/dist/client/td-api-client.js +1 -1
- package/dist/client/trino-api-client.js +1 -1
- package/dist/client/workflow-client.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-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/engage-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-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-pull-command.js +1 -1
- package/dist/commands/segment-push-command.d.ts.map +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-push-command.js.map +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/user-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/connection-cache.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.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/core/user-cache.js +1 -1
- package/dist/index.js +1 -1
- package/dist/proxy/anthropic-adapter.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/context-signature.js +1 -1
- package/dist/proxy/conversation-utils.js +1 -1
- package/dist/proxy/server.js +1 -1
- package/dist/proxy/session-cache.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm.js +1 -1
- package/dist/sdk/query.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.d.ts +4 -0
- package/dist/sdk/segment/child-segment-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js.map +1 -1
- package/dist/sdk/segment/journey-yaml.d.ts +6 -0
- package/dist/sdk/segment/journey-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/journey-yaml.js.map +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment.d.ts +15 -1
- package/dist/sdk/segment.d.ts.map +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/segment.js.map +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/workflow.js +1 -1
- package/dist/types/cdp.d.ts +30 -0
- package/dist/types/cdp.d.ts.map +1 -1
- package/dist/types/endpoints.js +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -1
- package/dist/utils/agent-ref-parser.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/chat-cache.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/command-output.js +1 -1
- package/dist/utils/constants.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/fields-display.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/journey-utils.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/llm-backup-utils.js +1 -1
- package/dist/utils/model-aliases.js +1 -1
- package/dist/utils/model-factors.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/port.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/segment-path-parser.js +1 -1
- package/dist/utils/segment-ref-parser.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sql-parser.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-config.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/tree-formatter.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/dist/utils/workflow-utils.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4ee5e0,_0x9a206b){const _0x42590a=a95_0x3139,_0x35ba53=_0x4ee5e0();while(!![]){try{const _0x3d3702=parseInt(_0x42590a(0x169))/0x1+-parseInt(_0x42590a(0x173))/0x2+-parseInt(_0x42590a(0x176))/0x3*(-parseInt(_0x42590a(0x14d))/0x4)+parseInt(_0x42590a(0x15a))/0x5+-parseInt(_0x42590a(0x179))/0x6+-parseInt(_0x42590a(0x14c))/0x7+-parseInt(_0x42590a(0x16a))/0x8;if(_0x3d3702===_0x9a206b)break;else _0x35ba53['push'](_0x35ba53['shift']());}catch(_0x3726aa){_0x35ba53['push'](_0x35ba53['shift']());}}}(a95_0xb361,0x4965b));import a95_0x3893f8 from'chalk';function a95_0x3139(_0x41ee6,_0x4ce87a){_0x41ee6=_0x41ee6-0x14c;const _0xb3610e=a95_0xb361();let _0x3139ff=_0xb3610e[_0x41ee6];return _0x3139ff;}import{withQuerySpinner}from'./spinner.js';export function buildSchemaResult(_0x423613){const _0x35c381=a95_0x3139,_0xa74069=_0x423613[_0x35c381(0x155)][_0x35c381(0x157)](_0x538ec5=>({'column_name':_0x538ec5['name'],'column_type':_0x538ec5[_0x35c381(0x166)],'null':_0x35c381(0x16b),'key':null,'default':null,'extra':null}));return{..._0x423613,'columns':[{'name':'column_name','type':_0x35c381(0x15d)},{'name':_0x35c381(0x156),'type':_0x35c381(0x15d)},{'name':'null','type':_0x35c381(0x15d)},{'name':_0x35c381(0x14e),'type':_0x35c381(0x15d)},{'name':_0x35c381(0x174),'type':_0x35c381(0x15d)},{'name':'extra','type':'varchar'}],'data':_0xa74069};}export async function executeSchemaQuery(_0x581f94,_0x10adfd,_0x25802b){const _0x30dec7=a95_0x3139,_0x4b0884=_0x581f94['trim']()[_0x30dec7(0x163)](/;+$/,''),_0x14fa6e=_0x30dec7(0x17a)+_0x4b0884+_0x30dec7(0x168);_0x25802b[_0x30dec7(0x171)]&&console[_0x30dec7(0x161)](_0x30dec7(0x17d)+_0x14fa6e);const _0x37aacf=await withQuerySpinner(_0x30dec7(0x178),async _0x5f2a6e=>{const _0x485a1d=_0x30dec7,_0x49ec9f=await _0x10adfd[_0x485a1d(0x165)]['execute'](_0x14fa6e,{'catalog':'td','schema':'information_schema','onJobId':_0xf645bc=>{const _0x5b71f3=_0x485a1d;_0x5f2a6e[_0x5b71f3(0x150)](_0xf645bc);}});return _0x49ec9f;},{'verbose':_0x25802b[_0x30dec7(0x171)]});return buildSchemaResult(_0x37aacf[_0x30dec7(0x15e)]);}export function displayFieldsHumanReadable(_0xfbb0b6,_0x20f3be){const _0xe182de=a95_0x3139,_0x5c75ae=_0xfbb0b6[_0xe182de(0x164)](_0x551db=>_0x551db[_0xe182de(0x16f)]===_0xe182de(0x15b)),_0x53a3aa=_0xfbb0b6['filter'](_0x1b88f8=>_0x1b88f8['source']==='behavior'),_0x3eeed9=new Map();for(const _0x1a2f6d of _0x5c75ae){const _0x328547=_0x1a2f6d[_0xe182de(0x16e)]||_0x1a2f6d[_0xe182de(0x153)]||_0xe182de(0x151),_0x2f476c=_0x3eeed9[_0xe182de(0x17b)](_0x328547);_0x2f476c?_0x2f476c['fields']['push'](_0x1a2f6d):_0x3eeed9[_0xe182de(0x175)](_0x328547,{'displayName':_0x328547,'tableName':_0x1a2f6d[_0xe182de(0x153)],'fields':[_0x1a2f6d]});}const _0xf54718=new Map();for(const _0x315683 of _0x53a3aa){const _0x251fd7=_0x315683[_0xe182de(0x17f)]||_0xe182de(0x151),_0x5e43bd=_0xf54718['get'](_0x251fd7)||[];_0x5e43bd[_0xe182de(0x159)](_0x315683),_0xf54718[_0xe182de(0x175)](_0x251fd7,_0x5e43bd);}console[_0xe182de(0x161)]('\x0a'+a95_0x3893f8['bold'](_0x20f3be));if(_0x3eeed9[_0xe182de(0x16d)]>0x0){console['error']('\x0a'+a95_0x3893f8[_0xe182de(0x158)]('Attributes'));const _0x3d97bf=[..._0x3eeed9[_0xe182de(0x177)]()]['sort']((_0x5c4c30,_0x1fffbf)=>_0x5c4c30[0x0][_0xe182de(0x14f)](_0x1fffbf[0x0]));for(const [,_0x375d05]of _0x3d97bf){const _0x5e9d02=_0x375d05[_0xe182de(0x15f)]&&_0x375d05['tableName']!==_0x375d05[_0xe182de(0x170)]?'\x20'+a95_0x3893f8[_0xe182de(0x158)]('('+_0x375d05[_0xe182de(0x15f)]+')'):'';console[_0xe182de(0x161)]('\x20\x20'+a95_0x3893f8[_0xe182de(0x167)](_0x375d05['displayName'])+_0x5e9d02);const _0x8d575d=[..._0x375d05[_0xe182de(0x16c)]]['sort']((_0x210621,_0x203128)=>_0x210621[_0xe182de(0x154)][_0xe182de(0x14f)](_0x203128[_0xe182de(0x154)]));for(const _0x5c04d8 of _0x8d575d){const _0x3828f9=_0x5c04d8['parentColumn']&&_0x5c04d8['parentColumn']!==_0x5c04d8[_0xe182de(0x154)]?'\x20'+a95_0x3893f8[_0xe182de(0x158)]('('+_0x5c04d8[_0xe182de(0x15c)]+')'):'';console[_0xe182de(0x161)](_0xe182de(0x17e)+_0x5c04d8['name']+_0x3828f9+':\x20'+a95_0x3893f8[_0xe182de(0x152)](_0x5c04d8[_0xe182de(0x166)]));}}}if(_0xf54718[_0xe182de(0x16d)]>0x0){console[_0xe182de(0x161)]('\x0a'+a95_0x3893f8[_0xe182de(0x158)](_0xe182de(0x172)));const _0x186660=[..._0xf54718[_0xe182de(0x177)]()][_0xe182de(0x160)]((_0x40ce18,_0x430916)=>_0x40ce18[0x0][_0xe182de(0x14f)](_0x430916[0x0]));for(const [_0x12354e,_0x2bd0cc]of _0x186660){const _0x45fc55=_0x2bd0cc[0x0],_0x5c3179=_0x45fc55?.[_0xe182de(0x153)]||'';console[_0xe182de(0x161)]('\x20\x20'+a95_0x3893f8[_0xe182de(0x167)](_0x12354e)+(_0x5c3179?'\x20'+a95_0x3893f8[_0xe182de(0x158)]('('+_0x5c3179+')'):''));const _0x215f37=[..._0x2bd0cc][_0xe182de(0x160)]((_0x1d201d,_0xd715d8)=>_0x1d201d[_0xe182de(0x154)][_0xe182de(0x14f)](_0xd715d8[_0xe182de(0x154)]));for(const _0xd57387 of _0x215f37){const _0x4dce64=_0xd57387[_0xe182de(0x154)][_0xe182de(0x17c)](_0x12354e+'.')?_0xd57387['name'][_0xe182de(0x162)](_0x12354e['length']+0x1):_0xd57387['name'],_0x5b18f6=_0xd57387[_0xe182de(0x15c)]&&_0xd57387[_0xe182de(0x15c)]!==_0x4dce64?'\x20'+a95_0x3893f8[_0xe182de(0x158)]('('+_0xd57387[_0xe182de(0x15c)]+')'):'';console[_0xe182de(0x161)]('\x20\x20\x20\x20'+_0x4dce64+_0x5b18f6+':\x20'+a95_0x3893f8['cyan'](_0xd57387[_0xe182de(0x166)]));}}}console[_0xe182de(0x161)]('');}function a95_0xb361(){const _0x307a71=['replace','filter','query','type','bold','\x0a)\x20AS\x20segment_query\x20LIMIT\x200','463938IQsfuh','5587576MbaePN','YES','fields','size','groupingName','source','displayName','verbose','Behaviors','31668gMxAHm','default','set','3MaIHYB','entries','Fetching\x20schema...','530844tBOqKt','SELECT\x20*\x20FROM\x20(\x0a','get','startsWith','Schema\x20query:\x0a','\x20\x20\x20\x20','behaviorName','251776wQKAOI','655256QBoJix','key','localeCompare','setJobId','Unknown','cyan','parentTableName','name','columns','column_type','map','dim','push','2558030pPXIBA','attribute','parentColumn','varchar','data','tableName','sort','error','slice'];a95_0xb361=function(){return _0x307a71;};return a95_0xb361();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a96_0x7be7(_0x29a6ac,_0x4c7c60){_0x29a6ac=_0x29a6ac-0x188;const _0x291528=a96_0x2915();let _0x7be700=_0x291528[_0x29a6ac];return _0x7be700;}(function(_0x4864b1,_0x349738){const _0x4fe717=a96_0x7be7,_0x18e3cd=_0x4864b1();while(!![]){try{const _0xaa3fdc=parseInt(_0x4fe717(0x199))/0x1+-parseInt(_0x4fe717(0x18c))/0x2*(parseInt(_0x4fe717(0x192))/0x3)+-parseInt(_0x4fe717(0x18a))/0x4+-parseInt(_0x4fe717(0x193))/0x5+-parseInt(_0x4fe717(0x191))/0x6*(-parseInt(_0x4fe717(0x19b))/0x7)+-parseInt(_0x4fe717(0x198))/0x8*(-parseInt(_0x4fe717(0x19d))/0x9)+-parseInt(_0x4fe717(0x188))/0xa*(-parseInt(_0x4fe717(0x19c))/0xb);if(_0xaa3fdc===_0x349738)break;else _0x18e3cd['push'](_0x18e3cd['shift']());}catch(_0x195cbe){_0x18e3cd['push'](_0x18e3cd['shift']());}}}(a96_0x2915,0x54dfe));function a96_0x2915(){const _0x2cdc8e=['805755uNtatY','\x20has\x20insecure\x20permissions\x20(','dirname',').\x20','Warning:\x20','220840CIZbdb','168286RaPEEM','existsSync','50918RfkLli','22pZfuNZ','54zwJzcU','766910SZtmnp','chmodSync','2438548wuNDyy','toString','8VBKnVN','statSync','warn','writeFileSync','mkdirSync','540uTlEUG','17643dpwgFI'];a96_0x2915=function(){return _0x2cdc8e;};return a96_0x2915();}import*as a96_0x5427c4 from'node:fs';import*as a96_0x392d0e from'node:path';export function setSecureFilePermissions(_0xbc1380){const _0x24b09b=a96_0x7be7;try{a96_0x5427c4[_0x24b09b(0x189)](_0xbc1380,0x180);}catch{console[_0x24b09b(0x18e)]('Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20'+_0xbc1380);}}export function setSecureDirectoryPermissions(_0x2e0925){const _0x3e01dd=a96_0x7be7;try{a96_0x5427c4[_0x3e01dd(0x189)](_0x2e0925,0x1c0);}catch{console[_0x3e01dd(0x18e)]('Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20'+_0x2e0925);}}export function createSecureDirectory(_0x32a41c){const _0x3bf82f=a96_0x7be7;!a96_0x5427c4[_0x3bf82f(0x19a)](_0x32a41c)&&(a96_0x5427c4[_0x3bf82f(0x190)](_0x32a41c,{'recursive':!![],'mode':0x1c0}),setSecureDirectoryPermissions(_0x32a41c));}export function validateSecureFilePermissions(_0x189baa){const _0x1c7f4a=a96_0x7be7;try{const _0x3679be=a96_0x5427c4[_0x1c7f4a(0x18d)](_0x189baa),_0x14a8a6=_0x3679be['mode']&0x1ff,_0x2036a5=(_0x14a8a6&0x3f)!==0x0;if(_0x2036a5)return console[_0x1c7f4a(0x18e)](_0x1c7f4a(0x197)+_0x189baa+_0x1c7f4a(0x194)+_0x14a8a6[_0x1c7f4a(0x18b)](0x8)+_0x1c7f4a(0x196)+'Should\x20be\x200600\x20or\x20more\x20restrictive.'),![];return!![];}catch{return!![];}}export function writeSecureFile(_0xd12734,_0x4aa7f5){const _0xd0ec95=a96_0x7be7,_0x548093=a96_0x392d0e[_0xd0ec95(0x195)](_0xd12734);createSecureDirectory(_0x548093),a96_0x5427c4[_0xd0ec95(0x18f)](_0xd12734,_0x4aa7f5,{'mode':0x180}),setSecureFilePermissions(_0xd12734);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x6184a,_0x27a39f){const _0x1afa06=a97_0x46d9,_0x2bfd9a=_0x6184a();while(!![]){try{const _0x1a97ba=-parseInt(_0x1afa06(0xe1))/0x1*(parseInt(_0x1afa06(0xe3))/0x2)+-parseInt(_0x1afa06(0xe7))/0x3+-parseInt(_0x1afa06(0xdd))/0x4*(parseInt(_0x1afa06(0xe2))/0x5)+-parseInt(_0x1afa06(0xe0))/0x6*(-parseInt(_0x1afa06(0xed))/0x7)+parseInt(_0x1afa06(0xec))/0x8*(-parseInt(_0x1afa06(0xdf))/0x9)+parseInt(_0x1afa06(0xe8))/0xa*(parseInt(_0x1afa06(0xe4))/0xb)+parseInt(_0x1afa06(0xe9))/0xc*(parseInt(_0x1afa06(0xeb))/0xd);if(_0x1a97ba===_0x27a39f)break;else _0x2bfd9a['push'](_0x2bfd9a['shift']());}catch(_0x1cdb2e){_0x2bfd9a['push'](_0x2bfd9a['shift']());}}}(a97_0x456f,0x8e032));function a97_0x456f(){const _0x409ef8=['jsonl','json','1631949pZSDSK','20tDhXCM','4047852lMQMGv','tab','39DzBLPh','24zytTLh','7595462dtdxpd','text','pop','1631112Zywtth','tsv','203085xyqLYW','6ZOXhKy','67iSiuVW','10JKCqYB','33962xhnzhU','5772877WzIyVs'];a97_0x456f=function(){return _0x409ef8;};return a97_0x456f();}export function detectFormatFromExtension(_0xdc93d3){const _0xffe5e5=a97_0x46d9,_0x2c84a1=_0xdc93d3['toLowerCase']()['split']('.')[_0xffe5e5(0xdc)]();switch(_0x2c84a1){case _0xffe5e5(0xe6):return _0xffe5e5(0xe6);case _0xffe5e5(0xe5):return'jsonl';case _0xffe5e5(0xde):case _0xffe5e5(0xea):return _0xffe5e5(0xde);case'txt':case _0xffe5e5(0xdb):return'table';default:return undefined;}}function a97_0x46d9(_0x27f573,_0x444d5a){_0x27f573=_0x27f573-0xdb;const _0x456f80=a97_0x456f();let _0x46d9e2=_0x456f80[_0x27f573];return _0x46d9e2;}export function resolveOutputFormat(_0x2bf065,_0x11bc11,_0x2968db){if(_0x2bf065)return _0x2bf065;if(_0x11bc11){const _0xa09b9b=detectFormatFromExtension(_0x11bc11);if(_0xa09b9b)return _0xa09b9b;}return _0x2968db;}
|
package/dist/utils/formatters.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a98_0x4579(_0x196d31,_0x51fb27){_0x196d31=_0x196d31-0x116;const _0x21431c=a98_0x2143();let _0x457970=_0x21431c[_0x196d31];return _0x457970;}(function(_0x252350,_0x26a085){const _0x2b7ef1=a98_0x4579,_0x3352ca=_0x252350();while(!![]){try{const _0x22ad0b=-parseInt(_0x2b7ef1(0x13c))/0x1*(-parseInt(_0x2b7ef1(0x12b))/0x2)+-parseInt(_0x2b7ef1(0x142))/0x3*(-parseInt(_0x2b7ef1(0x147))/0x4)+-parseInt(_0x2b7ef1(0x145))/0x5+parseInt(_0x2b7ef1(0x125))/0x6+parseInt(_0x2b7ef1(0x117))/0x7+parseInt(_0x2b7ef1(0x141))/0x8+-parseInt(_0x2b7ef1(0x129))/0x9*(parseInt(_0x2b7ef1(0x13d))/0xa);if(_0x22ad0b===_0x26a085)break;else _0x3352ca['push'](_0x3352ca['shift']());}catch(_0x16a55d){_0x3352ca['push'](_0x3352ca['shift']());}}}(a98_0x2143,0xac0fc));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 _0xec3bda=a98_0x4579;return process[_0xec3bda(0x138)][_0xec3bda(0x14e)]||Infinity;}export function formatAsTable(_0x4b8135,_0x4100f2=DEFAULT_MAX_DISPLAY_ROWS,_0x536835=![],_0x5e18dc={}){const _0x2278f2=a98_0x4579;if(_0x4b8135[_0x2278f2(0x14c)]['length']===0x0)return _0x2278f2(0x148);const _0x3b2516=_0x4b8135[_0x2278f2(0x14e)][_0x2278f2(0x130)](_0x29ccc0=>_0x29ccc0[_0x2278f2(0x118)]),_0x267943=_0x4b8135[_0x2278f2(0x14e)][_0x2278f2(0x130)](_0x2c0597=>simplifyType(_0x2c0597['type'])),_0x11d8c9=_0x4b8135[_0x2278f2(0x14c)][_0x2278f2(0x127)](0x0,_0x4100f2),_0x4e3aec=_0x4b8135[_0x2278f2(0x14c)][_0x2278f2(0x14d)],_0x3c2931=_0x4e3aec>_0x4100f2,_0xd3bd82=[],_0x26d4f5=getTerminalWidth(),_0x32ed4f=_0x26d4f5!==Infinity,_0x545c41=0x32;let _0xb3b56=_0x3b2516[_0x2278f2(0x130)]((_0x44f4e9,_0x204bc3)=>{const _0x51c8d0=_0x2278f2,_0x505f50=stringWidth(_0x267943[_0x204bc3]),_0x1fddb8=Math[_0x51c8d0(0x12f)](..._0x11d8c9[_0x51c8d0(0x130)](_0x304abc=>{const _0x38043f=_0x304abc[_0x44f4e9];return stringWidth(formatValue(_0x38043f));})),_0x2841f9=Math['max'](stringWidth(_0x44f4e9),_0x505f50,_0x1fddb8);return _0x536835?_0x2841f9:Math[_0x51c8d0(0x13f)](_0x2841f9,_0x545c41);});if(_0x32ed4f&&!_0x536835&&_0x3b2516[_0x2278f2(0x14d)]>0x0){const _0x2a5735=_0x233bf4=>{let _0x16fe43=0x1;for(const _0x2e8bf3 of _0x233bf4){_0x16fe43+=_0x2e8bf3+0x3;}return _0x16fe43+0x1;};let _0x9a2960=_0x2a5735(_0xb3b56);if(_0x9a2960>_0x26d4f5){const _0x804ba3=0x3;for(let _0x2054f0=_0xb3b56['length']-0x1;_0x2054f0>=0x0;_0x2054f0--){_0x9a2960=_0x2a5735(_0xb3b56);if(_0x9a2960<=_0x26d4f5)break;const _0x3f154c=_0xb3b56[_0x2054f0],_0x5a530d=_0x9a2960-_0x26d4f5,_0x46a996=_0x3f154c-_0x804ba3,_0x45d970=Math[_0x2278f2(0x13f)](_0x5a530d,_0x46a996);_0x45d970>0x0&&(_0xb3b56[_0x2054f0]=_0x3f154c-_0x45d970);}}}const _0x167a36=_0x3b2516,_0x34a1f8=_0x267943,_0x5ebf5e=_0xb3b56,_0x2904ed=_0xb3b56;_0xd3bd82[_0x2278f2(0x149)](colorBorder('┌'+_0x2904ed['map'](_0x55c0f7=>'─'[_0x2278f2(0x121)](_0x55c0f7+0x2))[_0x2278f2(0x123)]('┬')+'┐',_0x5e18dc));const _0x400f06=_0x167a36[_0x2278f2(0x130)]((_0x548a06,_0x2a8348)=>centerAlign(_0x548a06,_0x5ebf5e[_0x2a8348]));_0xd3bd82[_0x2278f2(0x149)](colorBorder('│',_0x5e18dc)+'\x20'+_0x400f06['join']('\x20'+colorBorder('│',_0x5e18dc)+'\x20')+'\x20'+colorBorder('│',_0x5e18dc));const _0x1eee80=_0x34a1f8[_0x2278f2(0x130)]((_0x2cc435,_0x44bf18)=>colorType(centerAlign(_0x2cc435,_0x5ebf5e[_0x44bf18]),_0x5e18dc));_0xd3bd82['push'](colorBorder('│',_0x5e18dc)+'\x20'+_0x1eee80[_0x2278f2(0x123)]('\x20'+colorBorder('│',_0x5e18dc)+'\x20')+'\x20'+colorBorder('│',_0x5e18dc)),_0xd3bd82[_0x2278f2(0x149)](colorBorder('├'+_0x2904ed[_0x2278f2(0x130)](_0x22deac=>'─'[_0x2278f2(0x121)](_0x22deac+0x2))['join']('┼')+'┤',_0x5e18dc));const _0x212cb1=(_0x55db4d,_0x1ca7fe)=>{const _0x2fd092=_0x2278f2,_0x2bc1ee=stringWidth(_0x55db4d);if(_0x2bc1ee<=_0x1ca7fe)return _0x55db4d;let _0x17c70c=_0x55db4d;while(stringWidth(_0x17c70c+'…')>_0x1ca7fe&&_0x17c70c[_0x2fd092(0x14d)]>0x0){_0x17c70c=_0x17c70c['slice'](0x0,-0x1);}return _0x17c70c+'…';};_0x11d8c9[_0x2278f2(0x124)](_0x56f37a=>{const _0x15adb6=_0x2278f2,_0x1dbdfe=_0x3b2516[_0x15adb6(0x130)]((_0x165577,_0x2e67b3)=>{const _0x136651=_0x15adb6,_0x5f166b=_0x56f37a[_0x165577],_0x5c6913=formatValue(_0x5f166b),_0x28b874=_0x5ebf5e[_0x2e67b3],_0x35ddc0=_0x212cb1(_0x5c6913,_0x28b874),_0x3569bc=typeof _0x5f166b===_0x136651(0x14b)||typeof _0x5f166b===_0x136651(0x11b)&&/^-?\d+$/[_0x136651(0x119)](_0x5f166b);return _0x3569bc?padStart(_0x35ddc0,_0x28b874):padEnd(_0x35ddc0,_0x28b874);});_0xd3bd82[_0x15adb6(0x149)](colorBorder('│',_0x5e18dc)+'\x20'+_0x1dbdfe['join']('\x20'+colorBorder('│',_0x5e18dc)+'\x20')+'\x20'+colorBorder('│',_0x5e18dc));});const _0x10216a=_0x2904ed[_0x2278f2(0x12c)]((_0x586300,_0x241cf0)=>_0x586300+_0x241cf0+0x3,-0x1);_0xd3bd82[_0x2278f2(0x149)](colorBorder('├'+_0x2904ed[_0x2278f2(0x130)](_0xf07faf=>'─'['repeat'](_0xf07faf+0x2))[_0x2278f2(0x123)]('┴')+'┤',_0x5e18dc));let _0x3a28f9;_0x3c2931?_0x3a28f9=_0x4e3aec+_0x2278f2(0x134)+_0x4100f2+_0x2278f2(0x14a):_0x3a28f9=_0x4e3aec+_0x2278f2(0x12a)+(_0x4e3aec===0x1?'':'s');const _0x24b811=_0x3a28f9[_0x2278f2(0x13a)](_0x10216a-0x2);return _0xd3bd82[_0x2278f2(0x149)](colorBorder('│',_0x5e18dc)+'\x20'+_0x24b811+'\x20'+colorBorder('│',_0x5e18dc)),_0xd3bd82[_0x2278f2(0x149)](colorBorder('└'+'─'[_0x2278f2(0x121)](_0x10216a)+'┘',_0x5e18dc)),_0xd3bd82[_0x2278f2(0x123)]('\x0a');}function simplifyType(_0x92d04d){const _0x492e7f=a98_0x4579,_0x4fb80c={'varchar':'string','bigint':_0x492e7f(0x122),'integer':_0x492e7f(0x12e),'double':_0x492e7f(0x13b),'boolean':_0x492e7f(0x140),'date':_0x492e7f(0x128),'timestamp':_0x492e7f(0x146),'array':_0x492e7f(0x135),'map':_0x492e7f(0x130),'row':_0x492e7f(0x136)},_0x1a63c5=_0x92d04d[_0x492e7f(0x131)]();for(const [_0x26f614,_0x2f82ed]of Object[_0x492e7f(0x143)](_0x4fb80c)){if(_0x1a63c5['startsWith'](_0x26f614))return _0x2f82ed;}return _0x92d04d[_0x492e7f(0x14d)]>0xa?_0x92d04d[_0x492e7f(0x133)](0x0,0xa):_0x92d04d;}export function formatAsJSON(_0x11ab5a,_0x1341f7={}){const _0x78663d=a98_0x4579;if(_0x11ab5a[_0x78663d(0x14c)][_0x78663d(0x14d)]===0x0)return'[]';if(shouldUseColor(_0x1341f7))return colorizeJSON(_0x11ab5a[_0x78663d(0x14c)],_0x1341f7);const _0x200f7b=_0x11ab5a[_0x78663d(0x14c)][_0x78663d(0x130)](_0x18e40a=>'\x20\x20'+JSON[_0x78663d(0x120)](_0x18e40a));return'[\x0a'+_0x200f7b[_0x78663d(0x123)](',\x0a')+'\x0a]';}export function formatAsJSONL(_0xee7b4,_0x323d36={}){const _0x58e8b4=a98_0x4579;if(_0xee7b4[_0x58e8b4(0x14c)]['length']===0x0)return'';if(shouldUseColor(_0x323d36))return _0xee7b4[_0x58e8b4(0x14c)]['map'](_0x170689=>colorizeJSONCompact(_0x170689,_0x323d36))['join']('\x0a');return _0xee7b4[_0x58e8b4(0x14c)][_0x58e8b4(0x130)](_0x1a454c=>JSON['stringify'](_0x1a454c))[_0x58e8b4(0x123)]('\x0a');}function a98_0x2143(){const _0x4906a8=['max','map','toLowerCase','toISOString','substring','\x20rows\x20(','array','row','false','stdout','table','padEnd','double','185497BzyvRH','20DUVsMW','0\x20B','min','bool','3892728AqEsyQ','997704wFSVaV','entries','pow','3371085Loebwd','timestamp','4dBxdkF','No\x20rows\x20returned','push','\x20shown)','number','data','length','columns','log','true','3213035ZXxqQN','name','test','boolean','string','object','toFixed','tsv','jsonl','stringify','repeat','long','join','forEach','3068568LPhYFY','floor','slice','date','4351959cvAcnR','\x20row','6NSgViy','reduce','replace','int'];a98_0x2143=function(){return _0x4906a8;};return a98_0x2143();}export function formatAsTSV(_0x23eeae){const _0x25138a=a98_0x4579;if(_0x23eeae[_0x25138a(0x14c)][_0x25138a(0x14d)]===0x0)return'';const _0x3be20b=[],_0x2659bb=_0x23eeae[_0x25138a(0x14e)]['map'](_0x299db1=>_0x299db1[_0x25138a(0x118)]);return _0x3be20b['push'](_0x2659bb['join']('\x09')),_0x23eeae[_0x25138a(0x14c)]['forEach'](_0x192464=>{const _0x2ec2e9=_0x25138a,_0x165698=_0x2659bb[_0x2ec2e9(0x130)](_0x2ddf2e=>{const _0x188f1a=_0x192464[_0x2ddf2e];return formatValueForTSV(_0x188f1a);});_0x3be20b[_0x2ec2e9(0x149)](_0x165698[_0x2ec2e9(0x123)]('\x09'));}),_0x3be20b['join']('\x0a');}function formatValue(_0x3f7dc2){const _0x52bae4=a98_0x4579;if(_0x3f7dc2===null||_0x3f7dc2===undefined)return'';if(typeof _0x3f7dc2===_0x52bae4(0x11b)){const _0x13e891=_0x3f7dc2['replace'](/\n/g,'\x5cn')[_0x52bae4(0x12d)](/\r/g,'\x5cr')[_0x52bae4(0x12d)](/\t/g,'\x5ct');return _0x13e891;}if(typeof _0x3f7dc2===_0x52bae4(0x14b))return String(_0x3f7dc2);if(typeof _0x3f7dc2===_0x52bae4(0x11a))return _0x3f7dc2?_0x52bae4(0x116):_0x52bae4(0x137);if(_0x3f7dc2 instanceof Date)return _0x3f7dc2[_0x52bae4(0x132)]();if(typeof _0x3f7dc2===_0x52bae4(0x11c))return JSON[_0x52bae4(0x120)](_0x3f7dc2);return String(_0x3f7dc2);}function formatValueForTSV(_0x5f4f0c){const _0x465628=a98_0x4579;if(_0x5f4f0c===null||_0x5f4f0c===undefined)return'';if(typeof _0x5f4f0c===_0x465628(0x11b))return _0x5f4f0c[_0x465628(0x12d)](/\t/g,'\x5ct')[_0x465628(0x12d)](/\n/g,'\x5cn');if(typeof _0x5f4f0c===_0x465628(0x14b)||typeof _0x5f4f0c===_0x465628(0x11a))return String(_0x5f4f0c);if(_0x5f4f0c instanceof Date)return _0x5f4f0c['toISOString']();if(typeof _0x5f4f0c===_0x465628(0x11c))return JSON['stringify'](_0x5f4f0c);return String(_0x5f4f0c);}export function formatQueryResult(_0xc4b840,_0x453396){const _0x437f0c=a98_0x4579;switch(_0x453396){case _0x437f0c(0x139):return formatAsTable(_0xc4b840);case'json':return formatAsJSON(_0xc4b840);case _0x437f0c(0x11f):return formatAsJSONL(_0xc4b840);case _0x437f0c(0x11e):return formatAsTSV(_0xc4b840);default:return formatAsJSON(_0xc4b840);}}export function formatBytes(_0x1b21af){const _0x4149de=a98_0x4579;if(_0x1b21af===0x0)return _0x4149de(0x13e);const _0x242de4=['B','KB','MB','GB','TB'],_0x46e955=0x400,_0x3a22bf=Math['floor'](Math[_0x4149de(0x14f)](_0x1b21af)/Math['log'](_0x46e955)),_0x315f8d=_0x1b21af/Math['pow'](_0x46e955,_0x3a22bf),_0x459c70=_0x315f8d>=0xa?0x1:0x2;return _0x315f8d[_0x4149de(0x11d)](_0x459c70)+'\x20'+_0x242de4[_0x3a22bf];}export function formatRows(_0x3add29){const _0x7c6d5e=a98_0x4579;if(_0x3add29==null)return'-';if(_0x3add29===0x0)return'0';if(_0x3add29<0x3e8)return _0x3add29['toString']();const _0x393002=['','K','M','B','T'],_0x103853=0x3e8,_0x1ae033=Math[_0x7c6d5e(0x126)](Math['log'](_0x3add29)/Math[_0x7c6d5e(0x14f)](_0x103853)),_0x3941ec=_0x3add29/Math[_0x7c6d5e(0x144)](_0x103853,_0x1ae033),_0x2d7cc5=_0x3941ec>=0xa?0x1:0x2;return''+_0x3941ec[_0x7c6d5e(0x11d)](_0x2d7cc5)+_0x393002[_0x1ae033];}
|
|
1
|
+
(function(_0xd696e0,_0x1a769d){const _0x46c3ab=a98_0xa888,_0x1d1bf8=_0xd696e0();while(!![]){try{const _0x29f6a4=parseInt(_0x46c3ab(0xf0))/0x1*(-parseInt(_0x46c3ab(0x10c))/0x2)+parseInt(_0x46c3ab(0x118))/0x3*(parseInt(_0x46c3ab(0x11f))/0x4)+-parseInt(_0x46c3ab(0x10a))/0x5*(-parseInt(_0x46c3ab(0x113))/0x6)+parseInt(_0x46c3ab(0x105))/0x7+-parseInt(_0x46c3ab(0x11c))/0x8*(parseInt(_0x46c3ab(0x108))/0x9)+parseInt(_0x46c3ab(0xe7))/0xa+-parseInt(_0x46c3ab(0xf5))/0xb*(parseInt(_0x46c3ab(0x106))/0xc);if(_0x29f6a4===_0x1a769d)break;else _0x1d1bf8['push'](_0x1d1bf8['shift']());}catch(_0x144462){_0x1d1bf8['push'](_0x1d1bf8['shift']());}}}(a98_0xa83b,0xa5de6));import{centerAlign,stringWidth,padEnd,padStart}from'./string-utils.js';function a98_0xa888(_0x32630f,_0x4d40f5){_0x32630f=_0x32630f-0xe6;const _0xa83bec=a98_0xa83b();let _0xa88830=_0xa83bec[_0x32630f];return _0xa88830;}import{colorBorder,colorType,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'./colors.js';const DEFAULT_MAX_DISPLAY_ROWS=0x28;function getTerminalWidth(){const _0x56f779=a98_0xa888;return process[_0x56f779(0x101)][_0x56f779(0x110)]||Infinity;}export function formatAsTable(_0x941925,_0x41278f=DEFAULT_MAX_DISPLAY_ROWS,_0x28c29e=![],_0x500b76={}){const _0x21da9b=a98_0xa888;if(_0x941925['data'][_0x21da9b(0xea)]===0x0)return'No\x20rows\x20returned';const _0x424818=_0x941925['columns'][_0x21da9b(0xee)](_0x4eeeda=>_0x4eeeda[_0x21da9b(0xf8)]),_0x4445d2=_0x941925['columns'][_0x21da9b(0xee)](_0x5e6662=>simplifyType(_0x5e6662[_0x21da9b(0xf4)])),_0x3a1c4a=_0x941925[_0x21da9b(0xfe)][_0x21da9b(0xfd)](0x0,_0x41278f),_0x56faf5=_0x941925[_0x21da9b(0xfe)][_0x21da9b(0xea)],_0x4b123b=_0x56faf5>_0x41278f,_0xdba5ae=[],_0x57f943=getTerminalWidth(),_0x2ec4c2=_0x57f943!==Infinity,_0x2515be=0x32;let _0x4dce8a=_0x424818[_0x21da9b(0xee)]((_0xd13b93,_0x37ed63)=>{const _0x5ac77b=_0x21da9b,_0x1f7940=stringWidth(_0x4445d2[_0x37ed63]),_0x1bfec4=Math[_0x5ac77b(0xf3)](..._0x3a1c4a[_0x5ac77b(0xee)](_0x4609c0=>{const _0x569927=_0x4609c0[_0xd13b93];return stringWidth(formatValue(_0x569927));})),_0x53cf0a=Math[_0x5ac77b(0xf3)](stringWidth(_0xd13b93),_0x1f7940,_0x1bfec4);return _0x28c29e?_0x53cf0a:Math['min'](_0x53cf0a,_0x2515be);});if(_0x2ec4c2&&!_0x28c29e&&_0x424818['length']>0x0){const _0x4550e7=_0x37eb99=>{let _0x4db70c=0x1;for(const _0x4fb3b0 of _0x37eb99){_0x4db70c+=_0x4fb3b0+0x3;}return _0x4db70c+0x1;};let _0x12011c=_0x4550e7(_0x4dce8a);if(_0x12011c>_0x57f943){const _0x195f62=0x3;for(let _0x47f9a8=_0x4dce8a[_0x21da9b(0xea)]-0x1;_0x47f9a8>=0x0;_0x47f9a8--){_0x12011c=_0x4550e7(_0x4dce8a);if(_0x12011c<=_0x57f943)break;const _0xfa5e4e=_0x4dce8a[_0x47f9a8],_0xdeec1b=_0x12011c-_0x57f943,_0x2a4ef3=_0xfa5e4e-_0x195f62,_0x5f2f14=Math[_0x21da9b(0x116)](_0xdeec1b,_0x2a4ef3);_0x5f2f14>0x0&&(_0x4dce8a[_0x47f9a8]=_0xfa5e4e-_0x5f2f14);}}}const _0x3026db=_0x424818,_0x3eb1af=_0x4445d2,_0x4b8d2d=_0x4dce8a,_0x1cb2db=_0x4dce8a;_0xdba5ae[_0x21da9b(0xef)](colorBorder('┌'+_0x1cb2db['map'](_0x2cffba=>'─'['repeat'](_0x2cffba+0x2))[_0x21da9b(0xf6)]('┬')+'┐',_0x500b76));const _0x2a45fa=_0x3026db[_0x21da9b(0xee)]((_0x44b59e,_0x1b7aa5)=>centerAlign(_0x44b59e,_0x4b8d2d[_0x1b7aa5]));_0xdba5ae[_0x21da9b(0xef)](colorBorder('│',_0x500b76)+'\x20'+_0x2a45fa[_0x21da9b(0xf6)]('\x20'+colorBorder('│',_0x500b76)+'\x20')+'\x20'+colorBorder('│',_0x500b76));const _0x19def9=_0x3eb1af[_0x21da9b(0xee)]((_0x4c73f6,_0x3c19b2)=>colorType(centerAlign(_0x4c73f6,_0x4b8d2d[_0x3c19b2]),_0x500b76));_0xdba5ae['push'](colorBorder('│',_0x500b76)+'\x20'+_0x19def9[_0x21da9b(0xf6)]('\x20'+colorBorder('│',_0x500b76)+'\x20')+'\x20'+colorBorder('│',_0x500b76)),_0xdba5ae[_0x21da9b(0xef)](colorBorder('├'+_0x1cb2db['map'](_0x5404c0=>'─'['repeat'](_0x5404c0+0x2))[_0x21da9b(0xf6)]('┼')+'┤',_0x500b76));const _0x374a84=(_0x2b5dc1,_0x1d61e2)=>{const _0x337ae3=_0x21da9b,_0x2d1d99=stringWidth(_0x2b5dc1);if(_0x2d1d99<=_0x1d61e2)return _0x2b5dc1;let _0x3a0ccf=_0x2b5dc1;while(stringWidth(_0x3a0ccf+'…')>_0x1d61e2&&_0x3a0ccf[_0x337ae3(0xea)]>0x0){_0x3a0ccf=_0x3a0ccf['slice'](0x0,-0x1);}return _0x3a0ccf+'…';};_0x3a1c4a[_0x21da9b(0xf1)](_0x550801=>{const _0x200000=_0x21da9b,_0x469cb8=_0x424818[_0x200000(0xee)]((_0x146648,_0x3a3e77)=>{const _0x15cb86=_0x200000,_0x3f709b=_0x550801[_0x146648],_0x115050=formatValue(_0x3f709b),_0x5c2426=_0x4b8d2d[_0x3a3e77],_0x1fba33=_0x374a84(_0x115050,_0x5c2426),_0x13574a=typeof _0x3f709b===_0x15cb86(0x11d)||typeof _0x3f709b==='string'&&/^-?\d+$/[_0x15cb86(0xe8)](_0x3f709b);return _0x13574a?padStart(_0x1fba33,_0x5c2426):padEnd(_0x1fba33,_0x5c2426);});_0xdba5ae[_0x200000(0xef)](colorBorder('│',_0x500b76)+'\x20'+_0x469cb8[_0x200000(0xf6)]('\x20'+colorBorder('│',_0x500b76)+'\x20')+'\x20'+colorBorder('│',_0x500b76));});const _0x4f1ae1=_0x1cb2db[_0x21da9b(0x102)]((_0x280bdc,_0x3fa857)=>_0x280bdc+_0x3fa857+0x3,-0x1);_0xdba5ae[_0x21da9b(0xef)](colorBorder('├'+_0x1cb2db[_0x21da9b(0xee)](_0x1ebbf8=>'─'['repeat'](_0x1ebbf8+0x2))[_0x21da9b(0xf6)]('┴')+'┤',_0x500b76));let _0x42cfa7;_0x4b123b?_0x42cfa7=_0x56faf5+_0x21da9b(0x104)+_0x41278f+_0x21da9b(0x10b):_0x42cfa7=_0x56faf5+_0x21da9b(0x109)+(_0x56faf5===0x1?'':'s');const _0x1ade3c=_0x42cfa7[_0x21da9b(0x11a)](_0x4f1ae1-0x2);return _0xdba5ae[_0x21da9b(0xef)](colorBorder('│',_0x500b76)+'\x20'+_0x1ade3c+'\x20'+colorBorder('│',_0x500b76)),_0xdba5ae[_0x21da9b(0xef)](colorBorder('└'+'─'[_0x21da9b(0xf7)](_0x4f1ae1)+'┘',_0x500b76)),_0xdba5ae[_0x21da9b(0xf6)]('\x0a');}function simplifyType(_0x37bb34){const _0x40c005=a98_0xa888,_0x5e690a={'varchar':_0x40c005(0xfa),'bigint':_0x40c005(0x114),'integer':_0x40c005(0x107),'double':_0x40c005(0xe6),'boolean':_0x40c005(0x10f),'date':_0x40c005(0x123),'timestamp':_0x40c005(0xf2),'array':_0x40c005(0x100),'map':'map','row':_0x40c005(0x119)},_0x2ae93f=_0x37bb34[_0x40c005(0x121)]();for(const [_0x6bc60d,_0x1a5cb5]of Object[_0x40c005(0x115)](_0x5e690a)){if(_0x2ae93f[_0x40c005(0x117)](_0x6bc60d))return _0x1a5cb5;}return _0x37bb34[_0x40c005(0xea)]>0xa?_0x37bb34['substring'](0x0,0xa):_0x37bb34;}export function formatAsJSON(_0x20fcef,_0x1fa5a3={}){const _0x502df1=a98_0xa888;if(_0x20fcef[_0x502df1(0xfe)][_0x502df1(0xea)]===0x0)return'[]';if(shouldUseColor(_0x1fa5a3))return colorizeJSON(_0x20fcef['data'],_0x1fa5a3);const _0x22f5c2=_0x20fcef['data'][_0x502df1(0xee)](_0x53abe2=>'\x20\x20'+JSON['stringify'](_0x53abe2));return'[\x0a'+_0x22f5c2[_0x502df1(0xf6)](',\x0a')+'\x0a]';}export function formatAsJSONL(_0x34c5fd,_0x4c48db={}){const _0x463595=a98_0xa888;if(_0x34c5fd[_0x463595(0xfe)][_0x463595(0xea)]===0x0)return'';if(shouldUseColor(_0x4c48db))return _0x34c5fd['data'][_0x463595(0xee)](_0x2efb5f=>colorizeJSONCompact(_0x2efb5f,_0x4c48db))[_0x463595(0xf6)]('\x0a');return _0x34c5fd['data'][_0x463595(0xee)](_0x3ad785=>JSON[_0x463595(0xeb)](_0x3ad785))[_0x463595(0xf6)]('\x0a');}export function formatAsTSV(_0x581bc8){const _0x8d2e2c=a98_0xa888;if(_0x581bc8[_0x8d2e2c(0xfe)][_0x8d2e2c(0xea)]===0x0)return'';const _0x55fa5b=[],_0x89d821=_0x581bc8['columns'][_0x8d2e2c(0xee)](_0xc20859=>_0xc20859['name']);return _0x55fa5b[_0x8d2e2c(0xef)](_0x89d821[_0x8d2e2c(0xf6)]('\x09')),_0x581bc8[_0x8d2e2c(0xfe)]['forEach'](_0x3515c2=>{const _0x58b371=_0x8d2e2c,_0x2ec8ab=_0x89d821[_0x58b371(0xee)](_0x30f54b=>{const _0x5ae53a=_0x3515c2[_0x30f54b];return formatValueForTSV(_0x5ae53a);});_0x55fa5b['push'](_0x2ec8ab[_0x58b371(0xf6)]('\x09'));}),_0x55fa5b[_0x8d2e2c(0xf6)]('\x0a');}function formatValue(_0x56ac48){const _0x3c9ae3=a98_0xa888;if(_0x56ac48===null||_0x56ac48===undefined)return'';if(typeof _0x56ac48===_0x3c9ae3(0xfa)){const _0x4ff9ad=_0x56ac48[_0x3c9ae3(0x11e)](/\n/g,'\x5cn')[_0x3c9ae3(0x11e)](/\r/g,'\x5cr')[_0x3c9ae3(0x11e)](/\t/g,'\x5ct');return _0x4ff9ad;}if(typeof _0x56ac48===_0x3c9ae3(0x11d))return String(_0x56ac48);if(typeof _0x56ac48===_0x3c9ae3(0x10d))return _0x56ac48?_0x3c9ae3(0xf9):_0x3c9ae3(0xfc);if(_0x56ac48 instanceof Date)return _0x56ac48['toISOString']();if(typeof _0x56ac48===_0x3c9ae3(0x112))return JSON[_0x3c9ae3(0xeb)](_0x56ac48);return String(_0x56ac48);}function a98_0xa83b(){const _0x595563=['columns','json','object','5856EKdkIU','long','entries','min','startsWith','3HzIlff','row','padEnd','table','8OLLnwC','number','replace','3124388ZbDaiE','pow','toLowerCase','floor','date','double','8655660OclgyP','test','toFixed','length','stringify','0\x20B','jsonl','map','push','1hnvWZm','forEach','timestamp','max','type','44beMTTV','join','repeat','name','true','string','toString','false','slice','data','toISOString','array','stdout','reduce','log','\x20rows\x20(','7409178WUYfmb','8434584rhCqwm','int','1143459GGUkOs','\x20row','4985GuXjTD','\x20shown)','120424jpOHXR','boolean','tsv','bool'];a98_0xa83b=function(){return _0x595563;};return a98_0xa83b();}function formatValueForTSV(_0x5eb7c9){const _0x51a38d=a98_0xa888;if(_0x5eb7c9===null||_0x5eb7c9===undefined)return'';if(typeof _0x5eb7c9===_0x51a38d(0xfa))return _0x5eb7c9['replace'](/\t/g,'\x5ct')[_0x51a38d(0x11e)](/\n/g,'\x5cn');if(typeof _0x5eb7c9===_0x51a38d(0x11d)||typeof _0x5eb7c9==='boolean')return String(_0x5eb7c9);if(_0x5eb7c9 instanceof Date)return _0x5eb7c9[_0x51a38d(0xff)]();if(typeof _0x5eb7c9===_0x51a38d(0x112))return JSON[_0x51a38d(0xeb)](_0x5eb7c9);return String(_0x5eb7c9);}export function formatQueryResult(_0x195af6,_0x34338d){const _0x3405fd=a98_0xa888;switch(_0x34338d){case _0x3405fd(0x11b):return formatAsTable(_0x195af6);case _0x3405fd(0x111):return formatAsJSON(_0x195af6);case _0x3405fd(0xed):return formatAsJSONL(_0x195af6);case _0x3405fd(0x10e):return formatAsTSV(_0x195af6);default:return formatAsJSON(_0x195af6);}}export function formatBytes(_0x4310ee){const _0x1c6a91=a98_0xa888;if(_0x4310ee===0x0)return _0x1c6a91(0xec);const _0x3a6660=['B','KB','MB','GB','TB'],_0x485ebd=0x400,_0x2d133b=Math[_0x1c6a91(0x122)](Math[_0x1c6a91(0x103)](_0x4310ee)/Math['log'](_0x485ebd)),_0x263f3e=_0x4310ee/Math[_0x1c6a91(0x120)](_0x485ebd,_0x2d133b),_0x102eb1=_0x263f3e>=0xa?0x1:0x2;return _0x263f3e[_0x1c6a91(0xe9)](_0x102eb1)+'\x20'+_0x3a6660[_0x2d133b];}export function formatRows(_0x3deabb){const _0x15f926=a98_0xa888;if(_0x3deabb==null)return'-';if(_0x3deabb===0x0)return'0';if(_0x3deabb<0x3e8)return _0x3deabb[_0x15f926(0xfb)]();const _0x29385c=['','K','M','B','T'],_0x8cd05d=0x3e8,_0x1850a3=Math[_0x15f926(0x122)](Math[_0x15f926(0x103)](_0x3deabb)/Math[_0x15f926(0x103)](_0x8cd05d)),_0x1817a0=_0x3deabb/Math[_0x15f926(0x120)](_0x8cd05d,_0x1850a3),_0x53b537=_0x1817a0>=0xa?0x1:0x2;return''+_0x1817a0['toFixed'](_0x53b537)+_0x29385c[_0x1850a3];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xb5ed88,_0x292550){const _0x38f800=a99_0x32c4,_0x3aef6c=_0xb5ed88();while(!![]){try{const _0x2763c2=parseInt(_0x38f800(0xbf))/0x1*(parseInt(_0x38f800(0xbd))/0x2)+parseInt(_0x38f800(0xb1))/0x3+-parseInt(_0x38f800(0xbc))/0x4+-parseInt(_0x38f800(0xc7))/0x5*(parseInt(_0x38f800(0xcb))/0x6)+parseInt(_0x38f800(0xcc))/0x7+parseInt(_0x38f800(0xb5))/0x8+parseInt(_0x38f800(0xcd))/0x9*(-parseInt(_0x38f800(0xa5))/0xa);if(_0x2763c2===_0x292550)break;else _0x3aef6c['push'](_0x3aef6c['shift']());}catch(_0x23c5ce){_0x3aef6c['push'](_0x3aef6c['shift']());}}}(a99_0x5251,0xa97a2));export const SEGMENT_KIND_JOURNEY=0x3;export function sanitizeYamlKey(_0xa56679){const _0x5b69f7=a99_0x32c4;return _0xa56679[_0x5b69f7(0xa9)]()[_0x5b69f7(0xb2)](/\s+/g,'_')['replace'](/[^a-z0-9_]/g,'')[_0x5b69f7(0xb2)](/_+/g,'_')[_0x5b69f7(0xb2)](/^_|_$/g,'');}function a99_0x32c4(_0x40377a,_0x2a914d){_0x40377a=_0x40377a-0xa2;const _0x525141=a99_0x5251();let _0x32c444=_0x525141[_0x40377a];return _0x32c444;}export function generateJourneyLocalName(_0x5e32cf){const _0x48828f=a99_0x32c4,_0x5521f5=_0x5e32cf[_0x48828f(0xc2)](/^journey_([a-z_]+)_([0-9a-f-]+)$/i);if(_0x5521f5){const _0x23fd0c=_0x5521f5[0x1][_0x48828f(0xa9)](),_0x4e4832=_0x5521f5[0x2],_0x3f38f5=_0x4e4832[_0x48828f(0xb2)](/-/g,'')[_0x48828f(0xa6)](0x0,0x4)[_0x48828f(0xa9)]();return _0x23fd0c+'_'+_0x3f38f5;}return undefined;}export function consolidateActivationsByContent(_0x1b4d09){const _0x6762e8=a99_0x32c4,_0x554d13={},_0x5362a6=new Map(),_0x5ed227=new Map();for(const _0x5a81e7 of _0x1b4d09){if(!_0x5a81e7)continue;for(const [_0xf4f997,_0x2462ec]of Object[_0x6762e8(0xa4)](_0x5a81e7)){const _0x299085=JSON[_0x6762e8(0xc0)]({'name':_0x2462ec[_0x6762e8(0xc4)],'connection':_0x2462ec[_0x6762e8(0xca)],'connector_config':_0x2462ec[_0x6762e8(0xc9)]}),_0x302bbf=_0x5ed227[_0x6762e8(0xba)](_0x299085);_0x302bbf?_0x5362a6[_0x6762e8(0xc6)](_0xf4f997,_0x302bbf):(_0x554d13[_0xf4f997]=_0x2462ec,_0x5362a6[_0x6762e8(0xc6)](_0xf4f997,_0xf4f997),_0x5ed227[_0x6762e8(0xc6)](_0x299085,_0xf4f997));}}return{'merged':_0x554d13,'nameMapping':_0x5362a6};}export function updateActivationReferences(_0x6b81c,_0x590223){const _0x214819=a99_0x32c4;if(!_0x6b81c)return;for(const _0x36f035 of _0x6b81c){if(!_0x36f035['steps'])continue;for(const _0x211817 of _0x36f035['steps']){if(_0x211817['type']===_0x214819(0xaa)&&_0x211817['with']?.[_0x214819(0xaa)]){const _0x1e4839=_0x590223[_0x214819(0xba)](_0x211817['with'][_0x214819(0xaa)]);_0x1e4839&&_0x1e4839!==_0x211817[_0x214819(0xc5)][_0x214819(0xaa)]&&(_0x211817[_0x214819(0xc5)][_0x214819(0xaa)]=_0x1e4839);}}}}function a99_0x5251(){const _0x3d036f=['versionNumber','3423894EEYIha','replace','attributes','keys','5624800gJhgVh','launched','bundle_name','max','bundle_id','get','latest','233712CSZcOj','1222YiuFia','yaml','1161RqxvNy','stringify','activations','match','segments','name','with','set','5GZzmYF','version_number','connector_config','connection','3813132rQgFfr','9107819bVBiOE','882kWgqBx','journeys','map','find','entries','251710fOhuHs','slice','journeyBundleName','stages','toLowerCase','activation','journey','goal','item','version','draft'];a99_0x5251=function(){return _0x3d036f;};return a99_0x5251();}export function buildJourneysArray(_0x330fac){const _0x2382ce=a99_0x32c4,_0x2266c4=Math[_0x2382ce(0xb8)](..._0x330fac['map'](_0x2d488e=>_0x2d488e[_0x2382ce(0xad)][_0x2382ce(0xb0)]||0x0));return _0x330fac[_0x2382ce(0xa2)](_0x75a0d6=>{const _0x4caec9=_0x2382ce,_0x32ccea=(_0x75a0d6['item']['versionNumber']||0x0)===_0x2266c4,_0x39ccf9=_0x75a0d6['yaml'][_0x4caec9(0xce)]?.[0x0],_0x1eb09d={'version':_0x39ccf9?.[_0x4caec9(0xae)]||_0x75a0d6['yaml'][_0x4caec9(0xae)]||_0x75a0d6['item'][_0x4caec9(0xc4)],'state':_0x75a0d6[_0x4caec9(0xad)]['state']===_0x4caec9(0xb6)?_0x4caec9(0xb6):_0x4caec9(0xaf),'stages':_0x39ccf9?.['stages']||_0x75a0d6['yaml'][_0x4caec9(0xa8)]||[],'id':_0x39ccf9?.['id']||_0x75a0d6['yaml']['id'],'version_number':_0x39ccf9?.[_0x4caec9(0xc8)]||_0x75a0d6['yaml'][_0x4caec9(0xc8)]};return _0x32ccea&&(_0x1eb09d[_0x4caec9(0xbb)]=!![]),_0x1eb09d;});}export function buildMergedJourneyYaml(_0x51f76f){const _0x16ffed=a99_0x32c4,_0x4729ff=_0x51f76f[0x0][_0x16ffed(0xbe)],_0x4b49cb=buildJourneysArray(_0x51f76f),{merged:_0x37c316,nameMapping:_0xd0ff31}=consolidateActivationsByContent(_0x51f76f[_0x16ffed(0xa2)](_0x1a61a4=>_0x1a61a4['yaml'][_0x16ffed(0xc1)]));for(const _0x3a4c0a of _0x4b49cb){updateActivationReferences(_0x3a4c0a[_0x16ffed(0xa8)],_0xd0ff31);}return{'type':_0x16ffed(0xab),'name':_0x4729ff[_0x16ffed(0xc4)],'description':_0x4729ff['description'],'segments':_0x4729ff[_0x16ffed(0xc3)],'activations':Object[_0x16ffed(0xb4)](_0x37c316)['length']>0x0?_0x37c316:undefined,'goal':_0x4729ff[_0x16ffed(0xac)],'reentry':_0x4729ff['reentry'],'journeys':_0x4b49cb,'bundle_id':_0x4729ff[_0x16ffed(0xb9)],'bundle_name':_0x4729ff[_0x16ffed(0xb7)]};}export function createJumpTargetCache(){return new Map();}export async function resolveJumpTarget(_0x1d4085,_0x3f9bd5,_0x434fc5,_0x54fc85){const _0x5e1af8=a99_0x32c4,_0xdf6287=_0x1d4085+':'+_0x3f9bd5,_0x4b9917=_0x434fc5[_0x5e1af8(0xba)](_0xdf6287);if(_0x4b9917)return _0x4b9917;const _0x3ff456=await _0x54fc85(_0x1d4085),_0x4bacc6=_0x3ff456['attributes'][_0x5e1af8(0xa7)]||_0x3ff456[_0x5e1af8(0xb3)][_0x5e1af8(0xc4)],_0x89500=_0x3ff456[_0x5e1af8(0xb3)]['journeyStages'][_0x5e1af8(0xa3)](_0x373663=>_0x373663['id']===_0x3f9bd5),_0x5a55ac=_0x89500?.[_0x5e1af8(0xc4)]||_0x3f9bd5,_0x2cf5ee={'journeyName':_0x4bacc6,'stageName':_0x5a55ac};return _0x434fc5['set'](_0xdf6287,_0x2cf5ee),_0x2cf5ee;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a100_0x1cc0(){const _0x40a7c2=['INVALID_ARGUMENT','NOT_FOUND','Failed\x20to\x20load\x20JSON:\x20','1583466yZOMVO','Invalid\x20JSON\x20string:\x20','\x27:\x20','1446651vItWUF','code','4jPTwhA','852368UysWOM','1uHZuaF','434049vQLCXz','INTERNAL','Permission\x20denied\x20reading\x20file:\x20','message','utf-8','Invalid\x20JSON\x20in\x20file\x20\x27','35954490LiOPsf','parse','63qtQBgw','Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.','ENOENT','PERMISSION_DENIED','4107126lIWNlQ','8532225TljQsQ','File\x20not\x20found:\x20'];a100_0x1cc0=function(){return _0x40a7c2;};return a100_0x1cc0();}(function(_0x14d029,_0x45eb74){const _0x2dec79=a100_0x5665,_0x3cbfc3=_0x14d029();while(!![]){try{const _0x5240e=-parseInt(_0x2dec79(0xd5))/0x1*(-parseInt(_0x2dec79(0xe8))/0x2)+parseInt(_0x2dec79(0xd1))/0x3+-parseInt(_0x2dec79(0xd3))/0x4*(-parseInt(_0x2dec79(0xe3))/0x5)+parseInt(_0x2dec79(0xe2))/0x6+parseInt(_0x2dec79(0xd6))/0x7+parseInt(_0x2dec79(0xd4))/0x8*(parseInt(_0x2dec79(0xde))/0x9)+-parseInt(_0x2dec79(0xdc))/0xa;if(_0x5240e===_0x45eb74)break;else _0x3cbfc3['push'](_0x3cbfc3['shift']());}catch(_0x2d509f){_0x3cbfc3['push'](_0x3cbfc3['shift']());}}}(a100_0x1cc0,0xd62f0));import{readFile}from'fs/promises';import{SDKError,ErrorCode}from'../sdk/errors.js';function a100_0x5665(_0xdf6588,_0x1201a5){_0xdf6588=_0xdf6588-0xcf;const _0x1cc050=a100_0x1cc0();let _0x56651d=_0x1cc050[_0xdf6588];return _0x56651d;}export async function loadJSON(_0x1a6a88,_0x14ff23){const _0x33451d=a100_0x5665;try{if(_0x14ff23){const _0x2a1100=await readFile(_0x1a6a88,_0x33451d(0xda));try{return JSON['parse'](_0x2a1100);}catch(_0x2b0067){throw new SDKError(ErrorCode[_0x33451d(0xe5)],_0x33451d(0xdb)+_0x1a6a88+_0x33451d(0xd0)+(_0x2b0067 instanceof Error?_0x2b0067[_0x33451d(0xd9)]:String(_0x2b0067)));}}else try{return JSON[_0x33451d(0xdd)](_0x1a6a88);}catch(_0x41dcc7){throw new SDKError(ErrorCode[_0x33451d(0xe5)],_0x33451d(0xcf)+(_0x41dcc7 instanceof Error?_0x41dcc7[_0x33451d(0xd9)]:String(_0x41dcc7)));}}catch(_0xfc00db){if(_0xfc00db instanceof SDKError)throw _0xfc00db;if(_0xfc00db instanceof Error&&_0x33451d(0xd2)in _0xfc00db){const _0xb76425=_0xfc00db;if(_0xb76425[_0x33451d(0xd2)]===_0x33451d(0xe0))throw new SDKError(ErrorCode[_0x33451d(0xe6)],_0x33451d(0xe4)+_0x1a6a88);else{if(_0xb76425[_0x33451d(0xd2)]==='EACCES')throw new SDKError(ErrorCode[_0x33451d(0xe1)],_0x33451d(0xd8)+_0x1a6a88);}}throw new SDKError(ErrorCode[_0x33451d(0xd7)],_0x33451d(0xe7)+(_0xfc00db instanceof Error?_0xfc00db[_0x33451d(0xd9)]:String(_0xfc00db)));}}export async function loadJSONFromOptions(_0x32b12c,_0x1d3702){const _0x1393bd=a100_0x5665;if(_0x32b12c&&_0x1d3702)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x1393bd(0xdf));if(_0x32b12c)return await loadJSON(_0x32b12c,![]);if(_0x1d3702)return await loadJSON(_0x1d3702,!![]);return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x129935,_0x35a45d){const _0x259273=a101_0x115a,_0x543c56=_0x129935();while(!![]){try{const _0x554bdd=-parseInt(_0x259273(0x15d))/0x1*(parseInt(_0x259273(0x15a))/0x2)+parseInt(_0x259273(0x154))/0x3+parseInt(_0x259273(0x156))/0x4*(-parseInt(_0x259273(0x153))/0x5)+-parseInt(_0x259273(0x163))/0x6+parseInt(_0x259273(0x160))/0x7+-parseInt(_0x259273(0x161))/0x8*(parseInt(_0x259273(0x15c))/0x9)+parseInt(_0x259273(0x159))/0xa*(parseInt(_0x259273(0x162))/0xb);if(_0x554bdd===_0x35a45d)break;else _0x543c56['push'](_0x543c56['shift']());}catch(_0x5f0fd7){_0x543c56['push'](_0x543c56['shift']());}}}(a101_0x452f,0x97334));export function canCreateAgent(_0x3e3a95,_0x428cae){const _0x27206b=a101_0x115a;for(const _0x20fc96 of _0x3e3a95[_0x27206b(0x157)]['tools']){if(_0x20fc96['targetAgentId']&&!_0x428cae[_0x27206b(0x155)](_0x20fc96['targetAgentId']))return![];}return!![];}function a101_0x452f(){const _0x49dcd8=['7605896oDPmkS','9135214DIMKJe','357042IpyXhW','targetAgentId','1355050ATnweR','2460918UPFyhW','has','4fHrlYc','attributes','targetKnowledgeBaseId','10kymDzC','1881246qYtMvz','1.0','9MzJyzZ','1zEjcxK','map','get','8332891jvMiRx'];a101_0x452f=function(){return _0x49dcd8;};return a101_0x452f();}export function remapToolIds(_0x3a3cda,_0x1aa8e8,_0x528e0a){const _0x198d05=a101_0x115a;return _0x3a3cda[_0x198d05(0x15e)](_0x148e58=>({..._0x148e58,'targetKnowledgeBaseId':_0x148e58[_0x198d05(0x158)]?_0x1aa8e8[_0x198d05(0x15f)](_0x148e58[_0x198d05(0x158)])||_0x148e58['targetKnowledgeBaseId']:undefined,'targetAgentId':_0x148e58['targetAgentId']?_0x528e0a[_0x198d05(0x15f)](_0x148e58[_0x198d05(0x152)])||_0x148e58[_0x198d05(0x152)]:undefined}));}function a101_0x115a(_0x5188b6,_0x1e581d){_0x5188b6=_0x5188b6-0x152;const _0x452fc2=a101_0x452f();let _0x115ad2=_0x452fc2[_0x5188b6];return _0x115ad2;}export function remapVariableIds(_0x50b4f5,_0x18bc2c){const _0x538767=a101_0x115a;return _0x50b4f5[_0x538767(0x15e)](_0x58b679=>({..._0x58b679,'targetKnowledgeBaseId':_0x18bc2c[_0x538767(0x15f)](_0x58b679[_0x538767(0x158)])||_0x58b679[_0x538767(0x158)]}));}export function isSupportedBackupVersion(_0x4d478a){const _0x217c30=a101_0x115a;return _0x4d478a===_0x217c30(0x15b);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a102_0x43ef3a=a102_0xb40e;function a102_0x241b(){const _0x24c2dc=['3036144uMueLu','259BUCizh','40023PPCtEG','1604Fkdcdf','claude-4.5-sonnet','200PKdfoh','574524hCFGLO','66000fqFtMM','toLowerCase','14nZCaqu','22472285TMuHUk','855956nLABab','25SKlYtG','match'];a102_0x241b=function(){return _0x24c2dc;};return a102_0x241b();}(function(_0x11cb44,_0x3b1c9d){const _0x181563=a102_0xb40e,_0x2a99e2=_0x11cb44();while(!![]){try{const _0x2dd8f8=parseInt(_0x181563(0x131))/0x1*(parseInt(_0x181563(0x133))/0x2)+parseInt(_0x181563(0x136))/0x3+parseInt(_0x181563(0x12d))/0x4*(-parseInt(_0x181563(0x12e))/0x5)+parseInt(_0x181563(0x137))/0x6+parseInt(_0x181563(0x12b))/0x7*(-parseInt(_0x181563(0x130))/0x8)+parseInt(_0x181563(0x132))/0x9*(-parseInt(_0x181563(0x135))/0xa)+parseInt(_0x181563(0x12c))/0xb;if(_0x2dd8f8===_0x3b1c9d)break;else _0x2a99e2['push'](_0x2a99e2['shift']());}catch(_0x3a3a2f){_0x2a99e2['push'](_0x2a99e2['shift']());}}}(a102_0x241b,0x82ac8));function a102_0xb40e(_0x3e9ea5,_0x13714e){_0x3e9ea5=_0x3e9ea5-0x12a;const _0x241b3b=a102_0x241b();let _0xb40e69=_0x241b3b[_0x3e9ea5];return _0xb40e69;}const MODEL_ALIASES={'haiku':'claude-4.5-haiku','sonnet':a102_0x43ef3a(0x134)};export function extractModelAlias(_0xff402f){const _0x32d164=a102_0x43ef3a,_0x46d891=_0xff402f[_0x32d164(0x12f)](/^claude-(?:\d+-)?(?:\d+-?)?(sonnet|haiku|opus)/i);if(_0x46d891)return _0x46d891[0x1][_0x32d164(0x12a)]();return _0xff402f;}export function resolveModelAlias(_0x2c767c){const _0x3f7911=a102_0x43ef3a;return MODEL_ALIASES[_0x2c767c[_0x3f7911(0x12a)]()]||_0x2c767c;}export function getModelAliases(){return{...MODEL_ALIASES};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x57e00,_0x5be2b2){const _0xf1feaa=a103_0x4490,_0x251cfa=_0x57e00();while(!![]){try{const _0x4ad106=-parseInt(_0xf1feaa(0x10f))/0x1+-parseInt(_0xf1feaa(0x10d))/0x2*(parseInt(_0xf1feaa(0x11b))/0x3)+-parseInt(_0xf1feaa(0x109))/0x4+-parseInt(_0xf1feaa(0x110))/0x5*(parseInt(_0xf1feaa(0x116))/0x6)+parseInt(_0xf1feaa(0x114))/0x7*(parseInt(_0xf1feaa(0x119))/0x8)+-parseInt(_0xf1feaa(0x113))/0x9+parseInt(_0xf1feaa(0x115))/0xa;if(_0x4ad106===_0x5be2b2)break;else _0x251cfa['push'](_0x251cfa['shift']());}catch(_0x47f6cc){_0x251cfa['push'](_0x251cfa['shift']());}}}(a103_0x3e23,0x466b3));export const MODEL_FACTORS={'sonnet':0xa,'claude-4.5-sonnet':0xa,'claude-sonnet-4':0xa,'haiku':3.4,'claude-4.5-haiku':3.4,'claude-haiku-4':3.4,'opus':0xf,'claude-4-opus':0xf,'claude-opus-4':0xf};export const CONTEXT_LIMITS={'sonnet':0x30d40,'haiku':0x30d40,'opus':0x30d40,'default':0x30d40};function a103_0x4490(_0x3fdad5,_0x609fcc){_0x3fdad5=_0x3fdad5-0x106;const _0x3e23c8=a103_0x3e23();let _0x4490e8=_0x3e23c8[_0x3fdad5];return _0x4490e8;}export function getModelFactor(_0x3a293c){const _0x50d418=a103_0x4490,_0x43397d=_0x3a293c[_0x50d418(0x112)]();if(MODEL_FACTORS[_0x43397d])return MODEL_FACTORS[_0x43397d];if(_0x43397d[_0x50d418(0x10e)](_0x50d418(0x10a)))return MODEL_FACTORS['sonnet'];if(_0x43397d[_0x50d418(0x10e)](_0x50d418(0x11d)))return MODEL_FACTORS[_0x50d418(0x11d)];if(_0x43397d[_0x50d418(0x10e)]('opus'))return MODEL_FACTORS[_0x50d418(0x11a)];return MODEL_FACTORS[_0x50d418(0x10a)];}export function getContextLimit(_0x5b0af2){const _0x20198c=a103_0x4490,_0x408e6d=_0x5b0af2[_0x20198c(0x112)]();if(_0x408e6d[_0x20198c(0x10e)](_0x20198c(0x10a)))return CONTEXT_LIMITS[_0x20198c(0x10a)];if(_0x408e6d['includes'](_0x20198c(0x11d)))return CONTEXT_LIMITS[_0x20198c(0x11d)];if(_0x408e6d[_0x20198c(0x10e)](_0x20198c(0x11a)))return CONTEXT_LIMITS[_0x20198c(0x11a)];return CONTEXT_LIMITS[_0x20198c(0x117)];}export function calculateChatUnit(_0x28af1e,_0x2a1843,_0x37dc45){return(_0x28af1e+_0x2a1843)/0x1388*_0x37dc45;}export function calculateCredits(_0x209766){return _0x209766/0x2904;}function a103_0x3e23(){const _0x4239f=['1029DGMkCe','13912770TeGxzK','102ACHIUO','default','Sonnet\x204','27480dqZoRc','opus','3HmpibM','Haiku\x204','haiku','4.5','toLocaleString','Haiku\x204.5','4-5','Opus\x204.5','1317708UaaHOm','sonnet','Claude','round','816934uFTOgX','includes','512944wfjxWs','255lVyqsI','en-US','toLowerCase','3204738rOnAPc'];a103_0x3e23=function(){return _0x4239f;};return a103_0x3e23();}export function getModelDisplayName(_0x5785f0){const _0x13dea4=a103_0x4490,_0x196d76=_0x5785f0[_0x13dea4(0x112)]();if(_0x196d76[_0x13dea4(0x10e)]('sonnet')){if(_0x196d76[_0x13dea4(0x10e)](_0x13dea4(0x107))||_0x196d76['includes'](_0x13dea4(0x11e)))return'Sonnet\x204.5';return _0x13dea4(0x118);}if(_0x196d76['includes'](_0x13dea4(0x11d))){if(_0x196d76[_0x13dea4(0x10e)](_0x13dea4(0x107))||_0x196d76[_0x13dea4(0x10e)](_0x13dea4(0x11e)))return _0x13dea4(0x106);return _0x13dea4(0x11c);}if(_0x196d76['includes']('opus')){if(_0x196d76[_0x13dea4(0x10e)](_0x13dea4(0x107))||_0x196d76[_0x13dea4(0x10e)]('4.5'))return _0x13dea4(0x108);return'Opus\x204';}return _0x13dea4(0x10b);}export function formatTokenCount(_0x17187a){const _0x3185d8=a103_0x4490;return _0x17187a[_0x3185d8(0x11f)](_0x3185d8(0x111));}export function calculateContextPercentage(_0x31a47c,_0x59d2a2){const _0x3a2571=a103_0x4490,_0x3377b2=getContextLimit(_0x59d2a2);return Math[_0x3a2571(0x10c)](_0x31a47c/_0x3377b2*0x64);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a104_0x2250(_0x5c902d,_0x232c62){_0x5c902d=_0x5c902d-0x1bd;const _0x353336=a104_0x3533();let _0x225019=_0x353336[_0x5c902d];return _0x225019;}function a104_0x3533(){const _0xc6091f=['number','25380640hUexyC','76657ugmDFA','Invalid\x20limit\x20value:\x20','.\x20Must\x20be\x20a\x20number.','5547339pQcasF','9307120CHQbdZ','3RSiSan','822lMeXkZ','285770ljrfTa','.\x20Must\x20be\x20a\x20positive\x20number.','Invalid\x20timeout\x20value:\x20','4083ivYCfs','4754225rSjYjp','1580yGULhj'];a104_0x3533=function(){return _0xc6091f;};return a104_0x3533();}(function(_0x59b993,_0x343a6e){const _0xf4aef0=a104_0x2250,_0x4af053=_0x59b993();while(!![]){try{const _0x503810=-parseInt(_0xf4aef0(0x1c9))/0x1*(-parseInt(_0xf4aef0(0x1cb))/0x2)+parseInt(_0xf4aef0(0x1bf))/0x3*(parseInt(_0xf4aef0(0x1c1))/0x4)+-parseInt(_0xf4aef0(0x1c0))/0x5+parseInt(_0xf4aef0(0x1ca))/0x6*(parseInt(_0xf4aef0(0x1c4))/0x7)+parseInt(_0xf4aef0(0x1c8))/0x8+parseInt(_0xf4aef0(0x1c7))/0x9+-parseInt(_0xf4aef0(0x1c3))/0xa;if(_0x503810===_0x343a6e)break;else _0x4af053['push'](_0x4af053['shift']());}catch(_0x556307){_0x4af053['push'](_0x4af053['shift']());}}}(a104_0x3533,0xb8e8d));export function validateLimitOption(_0x2019d7){const _0x4ba37b=a104_0x2250;if(!Number['isInteger'](_0x2019d7))return{'isValid':![],'error':_0x4ba37b(0x1c5)+_0x2019d7+'.\x20Must\x20be\x20an\x20integer.'};if(_0x2019d7<=0x0)return{'isValid':![],'error':'Invalid\x20limit\x20value:\x20'+_0x2019d7+'.\x20Must\x20be\x20a\x20positive\x20integer.'};return{'isValid':!![],'value':_0x2019d7};}export function validateTimeoutOption(_0x4a2557,_0x3ec544=0x1e){const _0x45b0c8=a104_0x2250;if(_0x4a2557===undefined)return{'isValid':!![],'value':_0x3ec544};const _0x38d5dc=typeof _0x4a2557===_0x45b0c8(0x1c2)?_0x4a2557:parseFloat(_0x4a2557);if(isNaN(_0x38d5dc))return{'isValid':![],'error':'Invalid\x20timeout\x20value:\x20'+_0x4a2557+_0x45b0c8(0x1c6)};if(_0x38d5dc<=0x0)return{'isValid':![],'error':_0x45b0c8(0x1be)+_0x38d5dc+_0x45b0c8(0x1bd)};return{'isValid':!![],'value':_0x38d5dc};}
|
package/dist/utils/port.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x441fd2,_0x26f9e6){const _0x4a41b6=a105_0xced4,_0x3cca3e=_0x441fd2();while(!![]){try{const _0x4abb84=parseInt(_0x4a41b6(0x168))/0x1*(-parseInt(_0x4a41b6(0x16f))/0x2)+parseInt(_0x4a41b6(0x163))/0x3*(parseInt(_0x4a41b6(0x16c))/0x4)+-parseInt(_0x4a41b6(0x164))/0x5*(-parseInt(_0x4a41b6(0x165))/0x6)+parseInt(_0x4a41b6(0x16b))/0x7+parseInt(_0x4a41b6(0x160))/0x8*(parseInt(_0x4a41b6(0x16e))/0x9)+parseInt(_0x4a41b6(0x161))/0xa+-parseInt(_0x4a41b6(0x170))/0xb;if(_0x4abb84===_0x26f9e6)break;else _0x3cca3e['push'](_0x3cca3e['shift']());}catch(_0x1c0c59){_0x3cca3e['push'](_0x3cca3e['shift']());}}}(a105_0x3254,0xc38f3));import{createServer}from'node:net';function a105_0xced4(_0x1a1bde,_0x1135f0){_0x1a1bde=_0x1a1bde-0x160;const _0x325441=a105_0x3254();let _0xced416=_0x325441[_0x1a1bde];return _0xced416;}function a105_0x3254(){const _0xbb6922=['code','45GAWvpQ','2Apihhu','36080858HnAhNJ','1948160frjdWP','2302010vQUzuu','listening','143457VHcbAV','835jlptBV','43158JnxHUe','once','No\x20available\x20port\x20found\x20between\x20','716872mPAOUi','error','listen','7678377IQEArc','88UwKmtJ'];a105_0x3254=function(){return _0xbb6922;};return a105_0x3254();}export async function isPortAvailable(_0x281ed4){return new Promise(_0x26a07f=>{const _0x34cd21=a105_0xced4,_0xdc4347=createServer();_0xdc4347[_0x34cd21(0x166)](_0x34cd21(0x169),_0x28c7c2=>{const _0x306697=_0x34cd21;_0x28c7c2[_0x306697(0x16d)]==='EADDRINUSE'?_0x26a07f(![]):_0x26a07f(![]);}),_0xdc4347[_0x34cd21(0x166)](_0x34cd21(0x162),()=>{_0xdc4347['close'](),_0x26a07f(!![]);}),_0xdc4347[_0x34cd21(0x16a)](_0x281ed4,'0.0.0.0');});}export async function findAvailablePort(_0x22b1f2=0xfa0,_0xb1bbcb=0x64){const _0x31c48b=a105_0xced4;for(let _0x43753d=0x0;_0x43753d<_0xb1bbcb;_0x43753d++){const _0x2f50ce=_0x22b1f2+_0x43753d;if(await isPortAvailable(_0x2f50ce))return _0x2f50ce;}throw new Error(_0x31c48b(0x167)+_0x22b1f2+'\x20and\x20'+(_0x22b1f2+_0xb1bbcb-0x1));}
|
package/dist/utils/process.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a106_0x26980e=a106_0x3cca;(function(_0x26b992,_0x550b27){const _0xb01564=a106_0x3cca,_0x1deaca=_0x26b992();while(!![]){try{const _0x7c938a=-parseInt(_0xb01564(0x178))/0x1*(-parseInt(_0xb01564(0x18c))/0x2)+parseInt(_0xb01564(0x19f))/0x3+-parseInt(_0xb01564(0x195))/0x4*(parseInt(_0xb01564(0x191))/0x5)+-parseInt(_0xb01564(0x18b))/0x6+-parseInt(_0xb01564(0x17c))/0x7+-parseInt(_0xb01564(0x192))/0x8+parseInt(_0xb01564(0x1a1))/0x9*(parseInt(_0xb01564(0x194))/0xa);if(_0x7c938a===_0x550b27)break;else _0x1deaca['push'](_0x1deaca['shift']());}catch(_0x3012e0){_0x1deaca['push'](_0x1deaca['shift']());}}}(a106_0x48fe,0x39dd2));function a106_0x48fe(){const _0x173f6c=['\x20-o\x20ppid=,comm=','189756LuWrXB','pid','1703943hTEzpZ','xdg-open','2UtJjyh','ps\x20-p\x20','length','isInteger','2662366zDNPlY','pwsh','platform','csh','tcsh','replace','fish','has','wmic\x20process\x20where\x20ProcessId=','ksh','darwin','trim','ignore','pop','xonsh','2359788SSWVZK','383576ZyZNUb','comm','elvish','ppid','ion','5ftMEUV','2620184yTIicG','kill','50zjfOgq','221176NMVqrf','\x20get\x20ParentProcessId,Name\x20/format:csv','pipe','filter','claude','start','win32','split','bash'];a106_0x48fe=function(){return _0x173f6c;};return a106_0x48fe();}function a106_0x3cca(_0x46a820,_0xed874a){_0x46a820=_0x46a820-0x178;const _0x48fed7=a106_0x48fe();let _0x3ccac6=_0x48fed7[_0x46a820];return _0x3ccac6;}import{execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set([a106_0x26980e(0x19d),'zsh','sh',a106_0x26980e(0x182),a106_0x26980e(0x185),a106_0x26980e(0x180),a106_0x26980e(0x17f),'dash',a106_0x26980e(0x17d),'powershell','nu',a106_0x26980e(0x190),a106_0x26980e(0x18e),a106_0x26980e(0x18a)]),EPHEMERAL_SHELL_SPAWNERS=new Set([a106_0x26980e(0x199),'code','cursor']);function getProcessInfoWindows(_0x3fb9c4){const _0x3d3f4f=a106_0x26980e;try{if(!Number[_0x3d3f4f(0x17b)](_0x3fb9c4)||_0x3fb9c4<=0x0)return null;const _0x19e7f0=execSync(_0x3d3f4f(0x184)+_0x3fb9c4+_0x3d3f4f(0x196),{'encoding':'utf-8','windowsHide':!![]})[_0x3d3f4f(0x187)](),_0x1277cc=_0x19e7f0[_0x3d3f4f(0x19c)]('\x0a')[_0x3d3f4f(0x198)](_0x3fa126=>_0x3fa126[_0x3d3f4f(0x187)]());if(_0x1277cc[_0x3d3f4f(0x17a)]<0x2)return null;const _0x10d7b8=_0x1277cc[_0x1277cc[_0x3d3f4f(0x17a)]-0x1][_0x3d3f4f(0x19c)](',');if(_0x10d7b8[_0x3d3f4f(0x17a)]<0x3)return null;const _0x48c708=_0x10d7b8[0x1]?.[_0x3d3f4f(0x187)]()||'',_0xc05f77=parseInt(_0x10d7b8[0x2]?.[_0x3d3f4f(0x187)]()||'0',0xa);if(isNaN(_0xc05f77)||!_0x48c708)return null;return{'pid':_0x3fb9c4,'ppid':_0xc05f77,'comm':_0x48c708[_0x3d3f4f(0x181)](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0x1668ae){const _0x40f86b=a106_0x26980e;try{const _0x5db4cb=0x400000;if(!Number['isInteger'](_0x1668ae)||_0x1668ae<=0x0||_0x1668ae>_0x5db4cb)return null;const _0x39f85a=execSync(_0x40f86b(0x179)+_0x1668ae+_0x40f86b(0x19e),{'encoding':'utf-8','stdio':_0x40f86b(0x197)})[_0x40f86b(0x187)](),[_0x2a752a,..._0x2e0e6f]=_0x39f85a['split'](/\s+/),_0x398900=parseInt(_0x2a752a,0xa),_0x2ba11c=_0x2e0e6f['join']('\x20');if(isNaN(_0x398900))return null;return{'pid':_0x1668ae,'ppid':_0x398900,'comm':_0x2ba11c};}catch{return null;}}function getProcessInfo(_0x1383d6){const _0x6744bd=a106_0x26980e;if(process[_0x6744bd(0x17e)]===_0x6744bd(0x19b))return getProcessInfoWindows(_0x1383d6);return getProcessInfoPosix(_0x1383d6);}function getBasename(_0x42eb40){const _0x426b08=a106_0x26980e;return _0x42eb40[_0x426b08(0x181)](/^-/,'')[_0x426b08(0x19c)]('/')[_0x426b08(0x189)]()?.['toLowerCase']()||'';}function isShell(_0x240091){const _0x9c0de2=a106_0x26980e;return SHELL_NAMES[_0x9c0de2(0x183)](getBasename(_0x240091));}function isEphemeralShellSpawner(_0x5735db){const _0x58ecee=a106_0x26980e;return EPHEMERAL_SHELL_SPAWNERS[_0x58ecee(0x183)](getBasename(_0x5735db));}let cachedShellPID;function findShellPID(){const _0x4ca8ad=a106_0x26980e;if(process['ppid']===undefined)return process[_0x4ca8ad(0x1a0)];let _0x510a9=process[_0x4ca8ad(0x18f)];const _0x1299ac=0xa;let _0x537818=0x0;while(_0x537818<_0x1299ac){const _0x331fca=getProcessInfo(_0x510a9);if(!_0x331fca)break;if(isShell(_0x331fca[_0x4ca8ad(0x18d)])){const _0x12587b=getProcessInfo(_0x331fca[_0x4ca8ad(0x18f)]);if(_0x12587b&&isEphemeralShellSpawner(_0x12587b[_0x4ca8ad(0x18d)])){_0x510a9=_0x331fca[_0x4ca8ad(0x18f)],_0x537818++;continue;}return _0x331fca[_0x4ca8ad(0x1a0)];}if(_0x331fca[_0x4ca8ad(0x18f)]===0x0||_0x331fca['ppid']===0x1){if(isShell(_0x331fca[_0x4ca8ad(0x18d)]))return _0x331fca[_0x4ca8ad(0x1a0)];break;}_0x510a9=_0x331fca['ppid'],_0x537818++;}return process[_0x4ca8ad(0x18f)]!==undefined?process[_0x4ca8ad(0x18f)]:process['pid'];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x58856d){const _0x39c27d=a106_0x26980e;if(!Number[_0x39c27d(0x17b)](_0x58856d)||_0x58856d<=0x0)return![];try{return process[_0x39c27d(0x193)](_0x58856d,0x0),!![];}catch{return![];}}export function openBrowser(_0x1c0f6c){const _0x30976e=a106_0x26980e,_0x12a019=process[_0x30976e(0x17e)],_0x382007=_0x12a019===_0x30976e(0x186)?'open':_0x12a019===_0x30976e(0x19b)?_0x30976e(0x19a):_0x30976e(0x1a2);spawn(_0x382007,[_0x1c0f6c],{'detached':!![],'stdio':_0x30976e(0x188)})['unref']();}
|
package/dist/utils/prompt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x148e9c,_0x1a4e26){const _0x2f1ef8=a107_0x5e2e,_0x2bee82=_0x148e9c();while(!![]){try{const _0x21cf11=-parseInt(_0x2f1ef8(0x187))/0x1+-parseInt(_0x2f1ef8(0x176))/0x2*(-parseInt(_0x2f1ef8(0x178))/0x3)+-parseInt(_0x2f1ef8(0x173))/0x4*(-parseInt(_0x2f1ef8(0x17e))/0x5)+parseInt(_0x2f1ef8(0x180))/0x6*(parseInt(_0x2f1ef8(0x183))/0x7)+-parseInt(_0x2f1ef8(0x18d))/0x8*(parseInt(_0x2f1ef8(0x181))/0x9)+-parseInt(_0x2f1ef8(0x179))/0xa+-parseInt(_0x2f1ef8(0x172))/0xb;if(_0x21cf11===_0x1a4e26)break;else _0x2bee82['push'](_0x2bee82['shift']());}catch(_0x19c159){_0x2bee82['push'](_0x2bee82['shift']());}}}(a107_0x400b,0x748d2));import*as a107_0x3c09af from'readline';export async function confirm(_0x5c900c){const _0x4644d=a107_0x5e2e,_0x751d2=a107_0x3c09af[_0x4644d(0x177)]({'input':process['stdin'],'output':process['stdout']});return new Promise(_0xe6636a=>{const _0x272dcf=_0x4644d;_0x751d2[_0x272dcf(0x186)](_0x5c900c+_0x272dcf(0x17a),_0x86f3a2=>{const _0x4e2929=_0x272dcf;_0x751d2[_0x4e2929(0x189)](),_0xe6636a(_0x86f3a2[_0x4e2929(0x188)]()==='y'||_0x86f3a2[_0x4e2929(0x188)]()===_0x4e2929(0x185));});});}function a107_0x5e2e(_0x15ce64,_0x476f7a){_0x15ce64=_0x15ce64-0x171;const _0x400b64=a107_0x400b();let _0x5e2ec8=_0x400b64[_0x15ce64];return _0x5e2ec8;}function a107_0x400b(){const _0x461a61=['exit','removeListener','195302vQbiWU','createInterface','27FFdyiL','4041540dRkobY','\x20(y/N):\x20','isTTY','pause','setEncoding','1125WPuhwB','stdin','1572nTWeNW','45OCjOwX','resume','8134uBpSgV','write','yes','question','209397EtzUMS','toLowerCase','close','setRawMode','data','stderr','277960irqeRJ','\x20[y/N]\x20','1978438EMqHbj','4644SbVjbG'];a107_0x400b=function(){return _0x461a61;};return a107_0x400b();}export async function confirmKey(_0x53fa1c){const _0x3f75b3=a107_0x5e2e;if(!process[_0x3f75b3(0x17f)][_0x3f75b3(0x17b)])return![];return process[_0x3f75b3(0x18c)][_0x3f75b3(0x184)](_0x53fa1c+_0x3f75b3(0x171)),new Promise(_0x3773e7=>{const _0x2c306b=_0x3f75b3,_0xe707aa=process[_0x2c306b(0x17f)];_0xe707aa[_0x2c306b(0x18a)](!![]),_0xe707aa[_0x2c306b(0x182)](),_0xe707aa[_0x2c306b(0x17d)]('utf8');const _0x5ef5d6=_0xbfc045=>{const _0x3d3386=_0x2c306b;_0xe707aa[_0x3d3386(0x18a)](![]),_0xe707aa[_0x3d3386(0x17c)](),_0xe707aa[_0x3d3386(0x175)](_0x3d3386(0x18b),_0x5ef5d6);if(_0xbfc045==='\x1b'){process[_0x3d3386(0x18c)][_0x3d3386(0x184)]('\x0a'),_0x3773e7(![]);return;}_0xbfc045==='\x03'&&(process[_0x3d3386(0x18c)][_0x3d3386(0x184)]('\x0a'),process[_0x3d3386(0x174)](0x82));if(_0xbfc045[_0x3d3386(0x188)]()==='y'){process[_0x3d3386(0x18c)][_0x3d3386(0x184)]('y\x0a'),_0x3773e7(!![]);return;}process[_0x3d3386(0x18c)][_0x3d3386(0x184)]('\x0a'),_0x3773e7(![]);};_0xe707aa['on'](_0x2c306b(0x18b),_0x5ef5d6);});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1ae79a,_0x38a3cb){const _0x161d13=a108_0x3696,_0x160250=_0x1ae79a();while(!![]){try{const _0x3fa72d=parseInt(_0x161d13(0x13c))/0x1+-parseInt(_0x161d13(0x14e))/0x2*(-parseInt(_0x161d13(0x145))/0x3)+parseInt(_0x161d13(0x13e))/0x4+-parseInt(_0x161d13(0x146))/0x5*(parseInt(_0x161d13(0x144))/0x6)+-parseInt(_0x161d13(0x14f))/0x7*(-parseInt(_0x161d13(0x13d))/0x8)+-parseInt(_0x161d13(0x14d))/0x9*(parseInt(_0x161d13(0x15d))/0xa)+parseInt(_0x161d13(0x159))/0xb;if(_0x3fa72d===_0x38a3cb)break;else _0x160250['push'](_0x160250['shift']());}catch(_0x5e5c0d){_0x160250['push'](_0x160250['shift']());}}}(a108_0x2209,0xcf63b));import{existsSync,readFileSync}from'fs';import a108_0x409135 from'path';import{parse as a108_0x39ae5f}from'yaml';export function parsePath(_0x106215){const _0xe6362e=a108_0x3696;if(!_0x106215||_0x106215[_0xe6362e(0x153)]()==='')throw new Error('Path\x20cannot\x20be\x20empty');const _0x2e6676=_0x106215[_0xe6362e(0x153)]();if(_0x2e6676==='/')return{'segments':[],'isAbsolute':!![],'raw':_0x106215};const _0x34a50b=_0x2e6676[_0xe6362e(0x14b)]('/')?_0x2e6676[_0xe6362e(0x154)](0x1):_0x2e6676,_0x1fe4fd=_0x34a50b['split']('/')[_0xe6362e(0x152)](_0x265a3b=>_0x265a3b!=='');if(_0x1fe4fd['length']===0x0)throw new Error(_0xe6362e(0x13a));const _0xadc58f=_0x2e6676['startsWith']('/')||!isRelativePathSegment(_0x1fe4fd[0x0]);for(const _0x57311f of _0x1fe4fd){validatePathSegment(_0x57311f);}return{'segments':_0x1fe4fd,'isAbsolute':_0xadc58f,'raw':_0x106215};}function a108_0x3696(_0x305adb,_0x589cb0){_0x305adb=_0x305adb-0x137;const _0x2209b6=a108_0x2209();let _0x36962f=_0x2209b6[_0x305adb];return _0x36962f;}function a108_0x2209(){const _0x46fa29=['test','11105127ouYhjn','name','resolve','journey','100jayKFg','.yml','segment','replace','parent_segment','Cannot\x20navigate\x20above\x20root','utf-8','slice','Path\x20must\x20contain\x20at\x20least\x20one\x20segment','endsWith','335313qvmwkL','136SMBBYb','3006536coEABZ','No\x20tdx.json\x20found\x20for\x20file:\x20','dirname','Invalid\x20tdx.json:\x20missing\x20parent_segment\x20field','Cannot\x20split\x20empty\x20path','relative','3972MDViCq','2040753FjGaTW','5205oivmYt','Absolute\x20path\x20cannot\x20start\x20with\x20\x22..\x22','root','parse','isAbsolute','startsWith','tdx.json','1350288Ftscyb','2suSVnX','107954YUfxQa','push','join','filter','trim','substring','length','raw','segments'];a108_0x2209=function(){return _0x46fa29;};return a108_0x2209();}function isRelativePathSegment(_0x177359){return _0x177359==='.'||_0x177359==='..';}function validatePathSegment(_0x1bce02){const _0x2ae2b1=a108_0x3696;if(_0x1bce02==='')throw new Error('Path\x20segment\x20cannot\x20be\x20empty');if(_0x1bce02==='.'||_0x1bce02==='..')return;if(/[\x00-\x1F\x7F]/[_0x2ae2b1(0x158)](_0x1bce02))throw new Error('Path\x20segment\x20contains\x20invalid\x20control\x20characters:\x20'+_0x1bce02);if(_0x1bce02!==_0x1bce02[_0x2ae2b1(0x153)]()){}}export function validatePath(_0x4634dd){const _0x4e973f=a108_0x3696;if(_0x4634dd[_0x4e973f(0x157)][_0x4e973f(0x155)]===0x0&&!_0x4634dd[_0x4e973f(0x14a)])throw new Error('Relative\x20path\x20cannot\x20be\x20empty');if(_0x4634dd[_0x4e973f(0x14a)]){if(_0x4634dd[_0x4e973f(0x157)][0x0]==='..')throw new Error(_0x4e973f(0x147));let _0x1a6bd0=0x0;for(const _0x37e386 of _0x4634dd[_0x4e973f(0x157)]){if(_0x37e386==='..'){if(_0x1a6bd0===0x0)throw new Error('Path\x20attempts\x20to\x20navigate\x20above\x20root');_0x1a6bd0--;}else _0x37e386!=='.'&&_0x1a6bd0++;}}}export function joinPaths(_0x179407,_0x51fb02){const _0x3543f0=a108_0x3696;if(!_0x179407||_0x179407==='/')return _0x51fb02;if(!_0x51fb02||_0x51fb02==='.')return _0x179407;if(_0x51fb02[_0x3543f0(0x14b)]('/'))return _0x51fb02;const _0x258085=parsePath(_0x179407),_0x5ca592=parsePath(_0x51fb02),_0x8589f3=[..._0x258085[_0x3543f0(0x157)]];for(const _0x8faf9 of _0x5ca592[_0x3543f0(0x157)]){if(_0x8faf9==='.')continue;else{if(_0x8faf9==='..'){if(_0x8589f3[_0x3543f0(0x155)]===0x0)throw new Error('Cannot\x20navigate\x20above\x20root');_0x8589f3['pop']();}else _0x8589f3[_0x3543f0(0x150)](_0x8faf9);}}const _0x2ac5cd=_0x8589f3[_0x3543f0(0x151)]('/');return _0x258085['raw'][_0x3543f0(0x14b)]('/')?'/'+_0x2ac5cd:_0x2ac5cd;}export function normalizePath(_0x116b28){const _0x44d84a=a108_0x3696,_0x16fcb3=parsePath(_0x116b28),_0x28259c=[];for(const _0x24a339 of _0x16fcb3['segments']){if(_0x24a339==='.')continue;else{if(_0x24a339==='..'){if(_0x28259c[_0x44d84a(0x155)]===0x0){if(_0x16fcb3[_0x44d84a(0x14a)])throw new Error(_0x44d84a(0x137));_0x28259c['push']('..');}else _0x28259c[_0x28259c['length']-0x1]==='..'?_0x28259c['push']('..'):_0x28259c['pop']();}else _0x28259c[_0x44d84a(0x150)](_0x24a339);}}if(_0x28259c[_0x44d84a(0x155)]===0x0)return _0x16fcb3[_0x44d84a(0x14a)]?'/':'.';const _0x1018c8=_0x28259c[_0x44d84a(0x151)]('/');return _0x16fcb3[_0x44d84a(0x156)][_0x44d84a(0x14b)]('/')?'/'+_0x1018c8:_0x1018c8;}export function getParentPath(_0x5dd925){const _0x402c46=a108_0x3696,_0x298ced=parsePath(_0x5dd925);if(_0x298ced[_0x402c46(0x157)][_0x402c46(0x155)]<=0x1)return'/';const _0x3b089b=_0x298ced[_0x402c46(0x157)][_0x402c46(0x139)](0x0,-0x1)[_0x402c46(0x151)]('/');return _0x298ced[_0x402c46(0x156)][_0x402c46(0x14b)]('/')?'/'+_0x3b089b:_0x3b089b;}export function getBaseName(_0x165d80){const _0x560f81=a108_0x3696,_0x51e644=parsePath(_0x165d80);return _0x51e644[_0x560f81(0x157)][_0x51e644[_0x560f81(0x157)]['length']-0x1]||'';}export function isChildPath(_0x4c3076,_0x23bb86){const _0x5b4791=a108_0x3696,_0x507d4=parsePath(_0x4c3076),_0x42c381=parsePath(_0x23bb86);if(_0x507d4[_0x5b4791(0x157)]['length']<=_0x42c381['segments'][_0x5b4791(0x155)])return![];for(let _0x594ad9=0x0;_0x594ad9<_0x42c381[_0x5b4791(0x157)][_0x5b4791(0x155)];_0x594ad9++){if(_0x507d4[_0x5b4791(0x157)][_0x594ad9]!==_0x42c381['segments'][_0x594ad9])return![];}return!![];}export function splitPath(_0x48b9b1){const _0x454077=a108_0x3696,_0x1edecb=parsePath(_0x48b9b1);if(_0x1edecb[_0x454077(0x157)][_0x454077(0x155)]===0x0)throw new Error(_0x454077(0x142));if(_0x1edecb[_0x454077(0x157)][_0x454077(0x155)]===0x1)return{'parent':_0x1edecb[_0x454077(0x157)][0x0]};return{'parent':_0x1edecb['segments'][0x0],'child':_0x1edecb['segments'][_0x454077(0x139)](0x1)[_0x454077(0x151)]('/')};}export function isYamlFilePath(_0x290304){const _0x1ea461=a108_0x3696;return _0x290304[_0x1ea461(0x13b)](_0x1ea461(0x15e))||_0x290304['endsWith']('.yaml');}export function resolveYamlFilePath(_0x4114a0){const _0x4fd6df=a108_0x3696,_0x2875d5=a108_0x409135[_0x4fd6df(0x15b)](_0x4114a0);if(!existsSync(_0x2875d5))throw new Error('File\x20not\x20found:\x20'+_0x4114a0);let _0x3b6277=a108_0x409135[_0x4fd6df(0x140)](_0x2875d5),_0x2cbbca=null,_0x23c7ac=null;const _0x357c2d=a108_0x409135[_0x4fd6df(0x149)](_0x3b6277)[_0x4fd6df(0x148)];while(_0x3b6277!==_0x357c2d){const _0x564034=a108_0x409135['join'](_0x3b6277,_0x4fd6df(0x14c));if(existsSync(_0x564034)){_0x2cbbca=_0x564034,_0x23c7ac=_0x3b6277;break;}_0x3b6277=a108_0x409135[_0x4fd6df(0x140)](_0x3b6277);}if(!_0x2cbbca||!_0x23c7ac)throw new Error(_0x4fd6df(0x13f)+_0x4114a0);const _0x467f92=readFileSync(_0x2cbbca,'utf-8'),_0x54f7f6=JSON['parse'](_0x467f92),_0x84275=_0x54f7f6[_0x4fd6df(0x161)];if(!_0x84275)throw new Error(_0x4fd6df(0x141));const _0x318931=readFileSync(_0x2875d5,_0x4fd6df(0x138)),_0x4f8aff=a108_0x39ae5f(_0x318931),_0x3ed385=_0x4f8aff[_0x4fd6df(0x15a)];if(!_0x3ed385)throw new Error('Invalid\x20YAML:\x20missing\x20name\x20field\x20in\x20'+_0x4114a0);const _0x21f594=_0x4f8aff['type']===_0x4fd6df(0x15c)?_0x4fd6df(0x15c):_0x4fd6df(0x15f),_0x17aa3c=a108_0x409135[_0x4fd6df(0x143)](_0x23c7ac,_0x2875d5),_0x37ace9=a108_0x409135[_0x4fd6df(0x140)](_0x17aa3c),_0x41a15e=_0x37ace9==='.'?'':_0x37ace9[_0x4fd6df(0x160)](/\\/g,'/'),_0x349a3d=_0x41a15e?_0x84275+'/'+_0x41a15e+'/'+_0x3ed385:_0x84275+'/'+_0x3ed385;return{'parentSegment':_0x84275,'segmentName':_0x3ed385,'folderPath':_0x41a15e,'fullPath':_0x349a3d,'resourceType':_0x21f594};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a109_0x2ab7(){const _0x259405=['24600fpoQch','substring','10rhRNAj','195390lvlYhl','indexOf','5391360RggnsB','130179jcYiTK','Invalid\x20segment\x20reference\x20format:\x20','376CNncrQ','.\x20Child\x20name\x20cannot\x20be\x20empty','1912190sAWBhe','12VXxCFG','.\x20Parent\x20name\x20cannot\x20be\x20empty','24264lAHFUA','73085HbYiaS'];a109_0x2ab7=function(){return _0x259405;};return a109_0x2ab7();}function a109_0xe6b5(_0x3e92aa,_0x21cb97){_0x3e92aa=_0x3e92aa-0x109;const _0x2ab7c1=a109_0x2ab7();let _0xe6b599=_0x2ab7c1[_0x3e92aa];return _0xe6b599;}(function(_0x496e33,_0x4ba81f){const _0x46fa45=a109_0xe6b5,_0x29f33b=_0x496e33();while(!![]){try{const _0x31a02d=parseInt(_0x46fa45(0x110))/0x1+parseInt(_0x46fa45(0x112))/0x2*(-parseInt(_0x46fa45(0x116))/0x3)+parseInt(_0x46fa45(0x10c))/0x4*(parseInt(_0x46fa45(0x10f))/0x5)+-parseInt(_0x46fa45(0x113))/0x6+-parseInt(_0x46fa45(0x10b))/0x7+parseInt(_0x46fa45(0x109))/0x8*(parseInt(_0x46fa45(0x10e))/0x9)+parseInt(_0x46fa45(0x115))/0xa;if(_0x31a02d===_0x4ba81f)break;else _0x29f33b['push'](_0x29f33b['shift']());}catch(_0xe21720){_0x29f33b['push'](_0x29f33b['shift']());}}}(a109_0x2ab7,0x33a8f));export function parseSegmentRef(_0xbf2b0e){const _0x297382=a109_0xe6b5,_0x532b91=_0xbf2b0e[_0x297382(0x114)]('/');if(_0x532b91===-0x1)return{'parentId':_0xbf2b0e};if(_0x532b91===0x0)throw new Error('Invalid\x20segment\x20reference\x20format:\x20'+_0xbf2b0e+_0x297382(0x10d));const _0x31a4f1=_0xbf2b0e[_0x297382(0x111)](0x0,_0x532b91),_0x50c399=_0xbf2b0e[_0x297382(0x111)](_0x532b91+0x1);if(_0x50c399==='')throw new Error(_0x297382(0x117)+_0xbf2b0e+_0x297382(0x10a));return{'parentId':_0x31a4f1,'childId':_0x50c399};}
|
package/dist/utils/spinner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a110_0x1773(){const _0x14149e=['text','jobId','2955316osOwRU','intervalFactory','2lTBnzw','1303460toENyd','phase','extra','\x20[Job\x20ID:\x20','9cvHsTv','clock','3431712cktZCl','2382jUmobH','stop','3716493TbiHBG','replace','toFixed','floor','start','3671540qofsml','27020TeCJHe','now','58831yOsTkU','isSpinning'];a110_0x1773=function(){return _0x14149e;};return a110_0x1773();}(function(_0x3cfee9,_0xb5ed23){const _0x144650=a110_0xda60,_0xb77633=_0x3cfee9();while(!![]){try{const _0x474506=-parseInt(_0x144650(0x194))/0x1*(-parseInt(_0x144650(0x182))/0x2)+-parseInt(_0x144650(0x18c))/0x3+parseInt(_0x144650(0x180))/0x4+-parseInt(_0x144650(0x183))/0x5+-parseInt(_0x144650(0x18a))/0x6*(-parseInt(_0x144650(0x192))/0x7)+-parseInt(_0x144650(0x189))/0x8+parseInt(_0x144650(0x187))/0x9*(parseInt(_0x144650(0x191))/0xa);if(_0x474506===_0xb5ed23)break;else _0xb77633['push'](_0xb77633['shift']());}catch(_0x2a2e70){_0xb77633['push'](_0xb77633['shift']());}}}(a110_0x1773,0xbbaeb));import a110_0x496363 from'ora';export function createCommandSpinner(_0x29e4bd,_0x26344b={}){const {verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x26344b;return a110_0x496363({'text':_0x29e4bd,'color':'cyan','isEnabled':forceEnabled||process['stdout']['isTTY']&&!verbose});}export async function withSpinner(_0x241a38,_0x95cbc8,_0x3ef1ad={}){const _0x3e5835=a110_0xda60,_0x176e7b=_0x3ef1ad[_0x3e5835(0x188)]??(()=>Date[_0x3e5835(0x193)]()),_0x3dff30=createCommandSpinner(_0x241a38,_0x3ef1ad);_0x3dff30[_0x3e5835(0x190)]();const _0x27d955=_0x176e7b();try{const _0x12c272=await _0x95cbc8(),_0x316b0d=_0x176e7b()-_0x27d955;return _0x3dff30[_0x3e5835(0x18b)](),{'data':_0x12c272,'elapsedMs':_0x316b0d};}catch(_0x4ab3ec){_0x3dff30[_0x3e5835(0x18b)]();throw _0x4ab3ec;}}function a110_0xda60(_0xe3c8f9,_0x1f64a6){_0xe3c8f9=_0xe3c8f9-0x180;const _0x177372=a110_0x1773();let _0xda6028=_0x177372[_0xe3c8f9];return _0xda6028;}export async function withQuerySpinner(_0x3e31b5,_0x3bd41b,_0x2a66f9={}){const _0x1071e3=a110_0xda60,_0x56409d=_0x2a66f9[_0x1071e3(0x188)]??(()=>Date[_0x1071e3(0x193)]()),_0xb093cb=_0x2a66f9[_0x1071e3(0x181)]??setInterval,_0x26ba70=createCommandSpinner(_0x3e31b5,_0x2a66f9);_0x26ba70[_0x1071e3(0x190)]();const _0x587e49=_0x56409d(),_0x290ed9=_0x3e31b5[_0x1071e3(0x18d)]('...',''),_0xed59d5={},_0x2827d5=()=>{const _0x43d4cb=_0x1071e3;if(!_0x26ba70[_0x43d4cb(0x195)])return;const _0x588242=_0x56409d()-_0x587e49,_0x4e7f77=formatElapsed(_0x588242),_0x7b96f8=_0xed59d5[_0x43d4cb(0x184)]??_0x290ed9,_0x23a1ad=_0xed59d5[_0x43d4cb(0x197)]?_0x43d4cb(0x186)+_0xed59d5[_0x43d4cb(0x197)]+']':'',_0x48f6f8=_0xed59d5['extra']?'\x20'+_0xed59d5[_0x43d4cb(0x185)]:'';_0x26ba70[_0x43d4cb(0x196)]=_0x7b96f8+'\x20'+_0x4e7f77+_0x48f6f8+_0x23a1ad;},_0x504184=_0xb093cb(()=>{_0x2827d5();},0x3e8),_0x32a945={'setPhase':_0xe5a36a=>{const _0x1eba86=_0x1071e3;_0xed59d5[_0x1eba86(0x184)]=_0xe5a36a,_0x2827d5();},'setJobId':_0x1d1a51=>{const _0x4e698d=_0x1071e3;_0xed59d5[_0x4e698d(0x197)]=_0x1d1a51,_0x2827d5();},'setExtra':_0x2d9818=>{const _0x5a7dcf=_0x1071e3;_0xed59d5[_0x5a7dcf(0x185)]=_0x2d9818,_0x2827d5();}};_0x2827d5();try{const _0x29a8bb=await _0x3bd41b(_0x32a945),_0x5c1941=_0x56409d()-_0x587e49;return{'data':_0x29a8bb,'elapsedMs':_0x5c1941};}finally{clearInterval(_0x504184),_0x26ba70[_0x1071e3(0x18b)]();}}export function formatElapsed(_0x43983f){const _0x47673f=a110_0xda60,_0x113275=Math[_0x47673f(0x18f)](_0x43983f/0x3e8);if(_0x113275<0x3c)return(_0x43983f/0x3e8)[_0x47673f(0x18e)](0x1)+'s';const _0x5b25ee=Math[_0x47673f(0x18f)](_0x113275/0x3c),_0x3a3591=_0x113275%0x3c;if(_0x5b25ee<0x3c)return _0x5b25ee+'m\x20'+_0x3a3591+'s';const _0x475387=Math[_0x47673f(0x18f)](_0x5b25ee/0x3c),_0x493422=_0x5b25ee%0x3c;return _0x475387+'h\x20'+_0x493422+'m';}
|
package/dist/utils/sql-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2c9fa0,_0x1105b4){const _0x298f2c=a111_0x41b7,_0x1656ea=_0x2c9fa0();while(!![]){try{const _0xf90db7=parseInt(_0x298f2c(0x6e))/0x1+parseInt(_0x298f2c(0x68))/0x2*(parseInt(_0x298f2c(0x85))/0x3)+parseInt(_0x298f2c(0x86))/0x4*(-parseInt(_0x298f2c(0x77))/0x5)+parseInt(_0x298f2c(0x69))/0x6*(-parseInt(_0x298f2c(0x7f))/0x7)+-parseInt(_0x298f2c(0x7e))/0x8+-parseInt(_0x298f2c(0x71))/0x9*(parseInt(_0x298f2c(0x79))/0xa)+parseInt(_0x298f2c(0x6b))/0xb;if(_0xf90db7===_0x1105b4)break;else _0x1656ea['push'](_0x1656ea['shift']());}catch(_0xeb3974){_0x1656ea['push'](_0x1656ea['shift']());}}}(a111_0x413f,0x74cb3));import{readFileSync}from'fs';import{createInterface}from'readline';export function stripSqlComments(_0x10700b){const _0x5ddf37=a111_0x41b7;let _0x5cbfd0=_0x10700b[_0x5ddf37(0x7a)](/\/\*(?:[^*]|\*(?!\/))*\*\//g,'');return _0x5cbfd0=_0x5cbfd0[_0x5ddf37(0x7a)](/--.*$/gm,''),_0x5cbfd0[_0x5ddf37(0x87)]();}function isEscaped(_0x443bcc,_0x52b619){let _0x548242=0x0;for(let _0x670851=_0x52b619-0x1;_0x670851>=0x0&&_0x443bcc[_0x670851]==='\x5c';_0x670851--){_0x548242++;}return _0x548242%0x2===0x1;}export function splitSqlStatements(_0x3690a5){const _0x93a0f7=a111_0x41b7,_0x30f280=stripSqlComments(_0x3690a5);if(!_0x30f280)throw new Error(_0x93a0f7(0x7b));const _0x3336ec=[];let _0x17612c='',_0xa7711f=![],_0x478d4a=![],_0x46c332=![];for(let _0x4de486=0x0;_0x4de486<_0x3690a5[_0x93a0f7(0x83)];_0x4de486++){const _0x4ee9a0=_0x3690a5[_0x4de486];if(_0x4ee9a0==='\x27'&&!isEscaped(_0x3690a5,_0x4de486)&&!_0x478d4a&&!_0x46c332)_0xa7711f=!_0xa7711f;else{if(_0x4ee9a0==='\x22'&&!isEscaped(_0x3690a5,_0x4de486)&&!_0xa7711f&&!_0x46c332)_0x478d4a=!_0x478d4a;else _0x4ee9a0==='`'&&!isEscaped(_0x3690a5,_0x4de486)&&!_0xa7711f&&!_0x478d4a&&(_0x46c332=!_0x46c332);}if(_0x4ee9a0===';'&&!_0xa7711f&&!_0x478d4a&&!_0x46c332){const _0x3eb4b9=_0x17612c['trim']();_0x3eb4b9&&_0x3336ec[_0x93a0f7(0x7d)](_0x3eb4b9),_0x17612c='';}else _0x17612c+=_0x4ee9a0;}const _0x15cfd5=_0x17612c[_0x93a0f7(0x87)]();_0x15cfd5&&_0x3336ec[_0x93a0f7(0x7d)](_0x15cfd5);const _0x2ac238=_0x3336ec[_0x93a0f7(0x72)](_0x3025a9=>_0x3025a9[_0x93a0f7(0x87)]())[_0x93a0f7(0x75)](_0x413a39=>{const _0x44450c=_0x93a0f7,_0x3d1866=stripSqlComments(_0x413a39);return _0x3d1866[_0x44450c(0x83)]>0x0;});if(_0x2ac238[_0x93a0f7(0x83)]===0x0)throw new Error(_0x93a0f7(0x7b));return _0x2ac238;}export function readFileContent(_0x171700){const _0xb2a909=a111_0x41b7;try{return readFileSync(_0x171700,'utf-8');}catch(_0x1aeb9f){const _0x16fba8=_0x1aeb9f[_0xb2a909(0x84)];if(_0x16fba8==='ENOENT')throw new Error('File\x20\x27'+_0x171700+_0xb2a909(0x80));else{if(_0x16fba8==='EACCES')throw new Error(_0xb2a909(0x8a)+_0x171700+'\x27');else throw new Error(_0xb2a909(0x88)+_0x171700+_0xb2a909(0x6d)+_0x1aeb9f[_0xb2a909(0x73)]);}}}export function readSqlStatementsFromFile(_0x53097d){const _0x29e44d=a111_0x41b7,_0x10568e=readFileContent(_0x53097d);try{return splitSqlStatements(_0x10568e);}catch(_0x4f984e){throw new Error(_0x29e44d(0x78)+_0x53097d+'\x27\x20'+_0x4f984e[_0x29e44d(0x73)][_0x29e44d(0x74)]());}}export async function readStdinContent(){const _0x4e01b5=a111_0x41b7;if(process[_0x4e01b5(0x6c)][_0x4e01b5(0x6f)])throw new Error(_0x4e01b5(0x82));return new Promise((_0x326000,_0x51efd9)=>{const _0x49676e=_0x4e01b5,_0x33a1a2=[],_0x2e3c9b=createInterface({'input':process[_0x49676e(0x6c)],'terminal':![]});_0x2e3c9b['on'](_0x49676e(0x89),_0x26a9f4=>{const _0x5d3e9a=_0x49676e;_0x33a1a2[_0x5d3e9a(0x7d)](_0x26a9f4);}),_0x2e3c9b['on']('close',()=>{const _0x49ffda=_0x49676e;_0x326000(_0x33a1a2[_0x49ffda(0x81)]('\x0a'));}),_0x2e3c9b['on'](_0x49676e(0x6a),_0x532004=>{const _0x810a18=_0x49676e;_0x2e3c9b['close'](),_0x51efd9(new Error(_0x810a18(0x7c)+_0x532004[_0x810a18(0x73)]));});});}function a111_0x413f(){const _0x929d63=['stdin','\x27:\x20','99371YxUqCP','isTTY','test','306JgFznN','map','message','toLowerCase','filter','stdin\x20','55dpQCXC','File\x20\x27','275390GnebrN','replace','Content\x20contains\x20no\x20SQL\x20statements','Error\x20reading\x20from\x20stdin:\x20','push','5601536bkUHia','439061gBOwZy','\x27\x20not\x20found','join','No\x20input\x20provided.\x20Pipe\x20SQL\x20to\x20stdin\x20or\x20use\x20a\x20file.\x0aExample:\x20echo\x20\x22SELECT\x201\x22\x20|\x20tdx\x20query\x20-','length','code','2661OwnMCy','124028wfxipI','trim','Error\x20reading\x20file\x20\x27','line','Permission\x20denied\x20reading\x20file\x20\x27','980hyXzdS','66eXKwUO','error','28731274ljkbcB'];a111_0x413f=function(){return _0x929d63;};return a111_0x413f();}function a111_0x41b7(_0x1d188f,_0x274949){_0x1d188f=_0x1d188f-0x68;const _0x413f2a=a111_0x413f();let _0x41b789=_0x413f2a[_0x1d188f];return _0x41b789;}export async function readSqlStatementsFromStdin(){const _0x12b314=a111_0x41b7,_0x13bb32=await readStdinContent();try{return splitSqlStatements(_0x13bb32);}catch(_0x4b1379){throw new Error(_0x12b314(0x76)+_0x4b1379[_0x12b314(0x73)][_0x12b314(0x74)]());}}export function isSqlFilePath(_0x281e9d){const _0x2b0af5=a111_0x41b7;return/\w\.sql$/[_0x2b0af5(0x70)](_0x281e9d);}
|