@treasuredata/tdx 0.1.10 → 0.1.11
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/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.d.ts +1 -0
- package/dist/commands/claude-command.d.ts.map +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-command.js.map +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/llm-command.js +1 -1
- package/dist/commands/llm-proxy.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/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.js +1 -1
- package/dist/proxy/server.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/database.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.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/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/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/workflow-utils.js +1 -1
- package/package.json +1 -1
package/dist/utils/colors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x40485a,_0x453465){const _0xaee46b=a51_0xc1c4,_0x3bd385=_0x40485a();while(!![]){try{const _0x107395=-parseInt(_0xaee46b(0x1d6))/0x1*(parseInt(_0xaee46b(0x1d3))/0x2)+-parseInt(_0xaee46b(0x1d1))/0x3*(-parseInt(_0xaee46b(0x1ec))/0x4)+-parseInt(_0xaee46b(0x1ce))/0x5*(-parseInt(_0xaee46b(0x1d5))/0x6)+-parseInt(_0xaee46b(0x1e6))/0x7+parseInt(_0xaee46b(0x1df))/0x8+parseInt(_0xaee46b(0x1da))/0x9+parseInt(_0xaee46b(0x1ea))/0xa*(-parseInt(_0xaee46b(0x1d8))/0xb);if(_0x107395===_0x453465)break;else _0x3bd385['push'](_0x3bd385['shift']());}catch(_0x543c6f){_0x3bd385['push'](_0x3bd385['shift']());}}}(a51_0x4b1c,0xeddbb));import{Chalk}from'chalk';function a51_0xc1c4(_0x44a84e,_0x4e3857){const _0x4b1c0a=a51_0x4b1c();return a51_0xc1c4=function(_0xc1c4a9,_0x1df223){_0xc1c4a9=_0xc1c4a9-0x1ce;let _0x26fdd=_0x4b1c0a[_0xc1c4a9];return _0x26fdd;},a51_0xc1c4(_0x44a84e,_0x4e3857);}export function shouldUseColor(_0x364f3e={}){const _0x460de8=a51_0xc1c4;if(_0x364f3e[_0x460de8(0x1ee)]===!![])return![];if(_0x364f3e[_0x460de8(0x1dd)]===!![])return!![];if(process[_0x460de8(0x1d7)][_0x460de8(0x1d2)]!==undefined)return![];return process[_0x460de8(0x1cf)][_0x460de8(0x1db)]??![];}function getChalk(_0x2b4198={}){if(shouldUseColor(_0x2b4198))return new Chalk({'level':0x3});return new Chalk({'level':0x0});}export function colorBorder(_0x7dbddd,_0x34a59e={}){return getChalk(_0x34a59e)['dim'](_0x7dbddd);}export function colorHeader(_0xdc1185,_0x193ff8={}){const _0x90a802=a51_0xc1c4;return getChalk(_0x193ff8)[_0x90a802(0x1e4)](_0xdc1185);}export function colorType(_0x4ef2a6,_0x7faf85={}){const _0x2f98af=a51_0xc1c4;return getChalk(_0x7faf85)[_0x2f98af(0x1d9)](_0x4ef2a6);}export function colorJSONKey(_0x21d980,_0xd735ac={}){const _0x44a1b6=a51_0xc1c4;return getChalk(_0xd735ac)[_0x44a1b6(0x1e9)](_0x21d980);}export function colorJSONString(_0x27cd15,_0x200ce2={}){return getChalk(_0x200ce2)['green'](_0x27cd15);}function a51_0x4b1c(){const _0x4ee759=['noColor','1224095oQwCVy','stdout','length','3sAYpNd','NO_COLOR','19662TZozeY','boolean','42tFHstf','135IRUrcq','env','399784PzimzR','dim','8855352dYfbqK','isTTY','yellow','color','stringify','6175704fQZBNn','null','isArray','number','entries','cyan','join','13509797GnPqZv','repeat','string','blue','260QdXank','map','6826972LgOiMB','object'];a51_0x4b1c=function(){return _0x4ee759;};return a51_0x4b1c();}export function colorJSONNumber(_0x53fb27,_0x401e87={}){return getChalk(_0x401e87)['cyan'](_0x53fb27);}export function colorJSONBoolean(_0xc3ed08,_0x12db0c={}){const _0x243b23=a51_0xc1c4;return getChalk(_0x12db0c)[_0x243b23(0x1dc)](_0xc3ed08);}export function colorJSONNull(_0x5f3dda,_0x466bac={}){const _0x123850=a51_0xc1c4;return getChalk(_0x466bac)[_0x123850(0x1d9)](_0x5f3dda);}export function colorizeJSONCompact(_0x3c3eaa,_0x59ed3e={}){const _0x113d88=a51_0xc1c4;if(!shouldUseColor(_0x59ed3e))return JSON[_0x113d88(0x1de)](_0x3c3eaa);if(_0x3c3eaa===null)return colorJSONNull(_0x113d88(0x1e0),_0x59ed3e);if(typeof _0x3c3eaa===_0x113d88(0x1d4))return colorJSONBoolean(String(_0x3c3eaa),_0x59ed3e);if(typeof _0x3c3eaa===_0x113d88(0x1e2))return colorJSONNumber(String(_0x3c3eaa),_0x59ed3e);if(typeof _0x3c3eaa===_0x113d88(0x1e8))return colorJSONString(JSON[_0x113d88(0x1de)](_0x3c3eaa),_0x59ed3e);if(Array['isArray'](_0x3c3eaa)){if(_0x3c3eaa[_0x113d88(0x1d0)]===0x0)return'[]';const _0x8286a3=_0x3c3eaa[_0x113d88(0x1eb)](_0x1b16b2=>colorizeJSONCompact(_0x1b16b2,_0x59ed3e));return'['+_0x8286a3[_0x113d88(0x1e5)](',')+']';}if(typeof _0x3c3eaa===_0x113d88(0x1ed)){const _0x2b31f4=Object[_0x113d88(0x1e3)](_0x3c3eaa);if(_0x2b31f4[_0x113d88(0x1d0)]===0x0)return'{}';const _0x21c190=_0x2b31f4[_0x113d88(0x1eb)](([_0x1f5477,_0x3df32b])=>{const _0xc7226a=_0x113d88,_0x35916b=colorJSONKey(JSON[_0xc7226a(0x1de)](_0x1f5477),_0x59ed3e),_0x3ecc2d=colorizeJSONCompact(_0x3df32b,_0x59ed3e);return _0x35916b+':'+_0x3ecc2d;});return'{'+_0x21c190['join'](',')+'}';}return String(_0x3c3eaa);}export function colorizeJSON(_0x4e2f10,_0x300edd={},_0x42d4b2=0x0){const _0x2f53e1=a51_0xc1c4;if(!shouldUseColor(_0x300edd))return JSON[_0x2f53e1(0x1de)](_0x4e2f10,null,0x2);const _0x446612='\x20'['repeat'](_0x42d4b2),_0x2abbf2=_0x42d4b2+0x2;if(_0x4e2f10===null)return colorJSONNull(_0x2f53e1(0x1e0),_0x300edd);if(typeof _0x4e2f10===_0x2f53e1(0x1d4))return colorJSONBoolean(String(_0x4e2f10),_0x300edd);if(typeof _0x4e2f10===_0x2f53e1(0x1e2))return colorJSONNumber(String(_0x4e2f10),_0x300edd);if(typeof _0x4e2f10==='string')return colorJSONString(JSON[_0x2f53e1(0x1de)](_0x4e2f10),_0x300edd);if(Array[_0x2f53e1(0x1e1)](_0x4e2f10)){if(_0x4e2f10[_0x2f53e1(0x1d0)]===0x0)return'[]';const _0x134ed7=_0x4e2f10[_0x2f53e1(0x1eb)](_0x903809=>{const _0x459ef5=_0x2f53e1,_0x1913f3=colorizeJSON(_0x903809,_0x300edd,_0x2abbf2);return''+'\x20'[_0x459ef5(0x1e7)](_0x2abbf2)+_0x1913f3;});return'[\x0a'+_0x134ed7['join'](',\x0a')+('\x0a'+_0x446612+']');}if(typeof _0x4e2f10===_0x2f53e1(0x1ed)){const _0x319ef6=Object['entries'](_0x4e2f10);if(_0x319ef6[_0x2f53e1(0x1d0)]===0x0)return'{}';const _0x5e9578=_0x319ef6['map'](([_0x136da8,_0x106725])=>{const _0x1f9f30=_0x2f53e1,_0x21bc75=colorJSONKey(JSON[_0x1f9f30(0x1de)](_0x136da8),_0x300edd),_0x1f7e62=colorizeJSON(_0x106725,_0x300edd,_0x2abbf2);return''+'\x20'[_0x1f9f30(0x1e7)](_0x2abbf2)+_0x21bc75+':\x20'+_0x1f7e62;});return'{\x0a'+_0x5e9578['join'](',\x0a')+('\x0a'+_0x446612+'}');}return String(_0x4e2f10);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x42c0f0,_0x42bbc3){const _0xb65c76=a52_0x4ee4,_0x380003=_0x42c0f0();while(!![]){try{const _0x46a396=-parseInt(_0xb65c76(0x92))/0x1+parseInt(_0xb65c76(0xaf))/0x2+parseInt(_0xb65c76(0x93))/0x3+-parseInt(_0xb65c76(0xa4))/0x4+parseInt(_0xb65c76(0xa5))/0x5*(parseInt(_0xb65c76(0xa1))/0x6)+parseInt(_0xb65c76(0x96))/0x7*(parseInt(_0xb65c76(0xa3))/0x8)+-parseInt(_0xb65c76(0x9f))/0x9;if(_0x46a396===_0x42bbc3)break;else _0x380003['push'](_0x380003['shift']());}catch(_0x204061){_0x380003['push'](_0x380003['shift']());}}}(a52_0x1c06,0xe4daf));import{writeFileSync}from'fs';function a52_0x4ee4(_0x185586,_0x30e239){const _0x1c067c=a52_0x1c06();return a52_0x4ee4=function(_0x4ee4ee,_0x20263a){_0x4ee4ee=_0x4ee4ee-0x89;let _0x4708ac=_0x1c067c[_0x4ee4ee];return _0x4708ac;},a52_0x4ee4(_0x185586,_0x30e239);}import{spawn}from'child_process';import{resolveOutputFormat}from'./format-detector.js';export function parseOutputOptions(_0x4505d2){const _0x4eb6d7=a52_0x4ee4;return{'format':_0x4505d2[_0x4eb6d7(0x9b)]||_0x4eb6d7(0xae),'output':_0x4505d2[_0x4eb6d7(0xac)]||'','limit':_0x4505d2[_0x4eb6d7(0x9d)],'color':_0x4505d2['color'],'noColor':_0x4505d2[_0x4eb6d7(0xad)]};}function convertSDKResultToQueryResult(_0x4d8a48){const _0x3672a4=a52_0x4ee4,_0x42c934=[];if(_0x4d8a48[_0x3672a4(0xb0)]>0x0){const _0x9babf9=_0x4d8a48[0x0];for(const [_0x450c38,_0x2e5c87]of Object[_0x3672a4(0x9c)](_0x9babf9)){let _0x1ab3b7=_0x3672a4(0x8e);if(typeof _0x2e5c87===_0x3672a4(0xa0))_0x1ab3b7=Number[_0x3672a4(0x99)](_0x2e5c87)?'bigint':_0x3672a4(0x89);else{if(typeof _0x2e5c87===_0x3672a4(0xb1))_0x1ab3b7=_0x3672a4(0xb1);else _0x2e5c87===null&&(_0x1ab3b7=_0x3672a4(0x8e));}_0x42c934[_0x3672a4(0x91)]({'name':_0x450c38,'type':_0x1ab3b7});}}return{'queryId':_0x3672a4(0x97),'columns':_0x42c934,'data':_0x4d8a48,'stats':{'state':_0x3672a4(0x8a),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x4d8a48['length'],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x3483b5,_0x195232){const _0xb7ae57=convertSDKResultToQueryResult(_0x3483b5);return formatQueryOutput(_0xb7ae57,_0x195232);}export async function formatQueryOutput(_0x3a7600,_0x50ccff){const _0x55d156=a52_0x4ee4,{format:_0x2e54ce,limit:_0x22058d,output:_0x2787b8,color:_0x152d07,noColor:_0x88b603}=_0x50ccff,_0x1e4dee=Boolean(_0x2787b8)&&!_0x152d07,_0x4de1a0={'color':_0x152d07,'noColor':_0x88b603||_0x1e4dee};if(_0x2e54ce===_0x55d156(0xae)){const {formatAsTable:_0x51aeaa}=await import('./formatters.js'),_0xedeae=shouldUseLess(_0x2e54ce,_0x2787b8);return _0x51aeaa(_0x3a7600,_0x22058d,_0xedeae,_0x4de1a0);}else{if(_0x2e54ce==='json'){const {formatAsJSON:_0x3991fa}=await import('./formatters.js');return _0x3991fa(_0x3a7600,_0x4de1a0);}else{if(_0x2e54ce===_0x55d156(0x8c)){const {formatAsJSONL:_0xe12250}=await import(_0x55d156(0x9e));return _0xe12250(_0x3a7600,_0x4de1a0);}else{const {formatQueryResult:_0x576897}=await import(_0x55d156(0x9e));return _0x576897(_0x3a7600,_0x2e54ce);}}}}function shouldUseLess(_0x59a553,_0x828a23){const _0x6c615c=a52_0x4ee4;return _0x59a553===_0x6c615c(0xae)&&process[_0x6c615c(0xa9)]['isTTY']&&!_0x828a23;}export function resolveOutputOptions(_0x2eaaff){const _0x430ab8=a52_0x4ee4,_0x44acc0=resolveOutputFormat(_0x2eaaff[_0x430ab8(0x9b)],_0x2eaaff[_0x430ab8(0xac)],_0x430ab8(0xae));let _0x1d1693=typeof _0x2eaaff[_0x430ab8(0x9d)]===_0x430ab8(0xa0)?_0x2eaaff[_0x430ab8(0x9d)]:parseInt(_0x2eaaff[_0x430ab8(0x9d)]||'40',0xa);const _0x3e57a2=_0x2eaaff[_0x430ab8(0xac)]||'';return shouldUseLess(_0x44acc0,_0x3e57a2)&&(_0x1d1693=Infinity),{'format':_0x44acc0,'output':_0x3e57a2,'limit':_0x1d1693,'color':_0x2eaaff[_0x430ab8(0xaa)],'noColor':_0x2eaaff['noColor']};}function a52_0x1c06(){const _0x57f92e=['table','2730320iACvlv','length','boolean','double','FINISHED','-FXRSn','jsonl','write','varchar','spawn','pipe','push','1202818TjEcMI','621642HcbpzZ','close','stdin','959630KbbXJl','sdk-result','log','isInteger','end','format','entries','limit','./formatters.js','1374993lWeyjK','number','3018tojaIe','resolve','80ybjDbl','3719824ENPWLj','2780lOBJTb','error','Results\x20saved\x20to\x20','inherit','stdout','color','less','output','noColor'];a52_0x1c06=function(){return _0x57f92e;};return a52_0x1c06();}export function writeOutput(_0x1923fc,_0x339033,_0x370bad){const _0xc3e532=a52_0x4ee4;return _0x339033?(writeFileSync(_0x339033,_0x1923fc),console['error'](_0xc3e532(0xa7)+_0x339033),Promise[_0xc3e532(0xa2)]()):shouldUseLess(_0x370bad||'','')?new Promise(_0x472add=>{const _0x2d1d6a=_0xc3e532,_0x25eac8=spawn(_0x2d1d6a(0xab),[_0x2d1d6a(0x8b)],{'stdio':[_0x2d1d6a(0x90),_0x2d1d6a(0xa8),_0x2d1d6a(0xa8)]});let _0x49a0d1=![];_0x25eac8['on'](_0x2d1d6a(0xa6),()=>{const _0x583d25=_0x2d1d6a;!_0x49a0d1&&(_0x49a0d1=!![],console[_0x583d25(0x98)](_0x1923fc),_0x472add());}),_0x25eac8['on'](_0x2d1d6a(0x94),()=>{!_0x49a0d1&&(_0x49a0d1=!![],_0x472add());}),_0x25eac8['on'](_0x2d1d6a(0x8f),()=>{const _0xe5e9f6=_0x2d1d6a;!_0x49a0d1&&_0x25eac8['stdin']&&(_0x25eac8[_0xe5e9f6(0x95)]['on'](_0xe5e9f6(0xa6),()=>{}),_0x25eac8[_0xe5e9f6(0x95)][_0xe5e9f6(0x8d)](_0x1923fc),_0x25eac8['stdin'][_0xe5e9f6(0x9a)]());}),!_0x25eac8[_0x2d1d6a(0x95)]&&(!_0x49a0d1&&(_0x49a0d1=!![],console[_0x2d1d6a(0x98)](_0x1923fc),_0x472add()));}):(console['log'](_0x1923fc),Promise[_0xc3e532(0xa2)]());}export async function handleSDKOutput(_0x34ffff,_0x3df066){const _0x182e9f=a52_0x4ee4,_0x3b8dba=resolveOutputOptions(_0x3df066),_0x8955ba=await formatSDKOutput(_0x34ffff,_0x3b8dba);await writeOutput(_0x8955ba,_0x3b8dba['output']||undefined,_0x3b8dba[_0x182e9f(0x9b)]);}export async function handleQueryOutput(_0x2aba44,_0x21a4e3){const _0x59f64e=a52_0x4ee4,_0x5e0a5c=resolveOutputOptions(_0x21a4e3),_0x28c72e=await formatQueryOutput(_0x2aba44,_0x5e0a5c);await writeOutput(_0x28c72e,_0x5e0a5c['output']||undefined,_0x5e0a5c[_0x59f64e(0x9b)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2031aa,_0x5cad44){const _0x45f4e3=a53_0x2be4,_0xfed5d1=_0x2031aa();while(!![]){try{const _0x2fe4c6=parseInt(_0x45f4e3(0xf0))/0x1*(-parseInt(_0x45f4e3(0xf1))/0x2)+-parseInt(_0x45f4e3(0xed))/0x3+-parseInt(_0x45f4e3(0xe6))/0x4*(-parseInt(_0x45f4e3(0xe9))/0x5)+-parseInt(_0x45f4e3(0xf7))/0x6*(-parseInt(_0x45f4e3(0xe8))/0x7)+parseInt(_0x45f4e3(0xeb))/0x8+parseInt(_0x45f4e3(0xfc))/0x9*(-parseInt(_0x45f4e3(0xfd))/0xa)+parseInt(_0x45f4e3(0xea))/0xb;if(_0x2fe4c6===_0x5cad44)break;else _0xfed5d1['push'](_0xfed5d1['shift']());}catch(_0x22b089){_0xfed5d1['push'](_0xfed5d1['shift']());}}}(a53_0x197f,0xb966a));import*as a53_0xbe58c5 from'node:fs';function a53_0x2be4(_0x2f81ab,_0xce7793){const _0x197f1c=a53_0x197f();return a53_0x2be4=function(_0x2be4c7,_0x2344bf){_0x2be4c7=_0x2be4c7-0xe6;let _0x3a6057=_0x197f1c[_0x2be4c7];return _0x3a6057;},a53_0x2be4(_0x2f81ab,_0xce7793);}import*as a53_0x32e344 from'node:path';export function setSecureFilePermissions(_0x12a1f0){const _0x1b79ca=a53_0x2be4;try{a53_0xbe58c5[_0x1b79ca(0xf4)](_0x12a1f0,0x180);}catch{console[_0x1b79ca(0xf8)](_0x1b79ca(0xf3)+_0x12a1f0);}}export function setSecureDirectoryPermissions(_0x5d837e){const _0x21ef49=a53_0x2be4;try{a53_0xbe58c5[_0x21ef49(0xf4)](_0x5d837e,0x1c0);}catch{console[_0x21ef49(0xf8)]('Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20'+_0x5d837e);}}export function createSecureDirectory(_0x5a3b96){const _0x329214=a53_0x2be4;!a53_0xbe58c5['existsSync'](_0x5a3b96)&&(a53_0xbe58c5[_0x329214(0xf9)](_0x5a3b96,{'recursive':!![],'mode':0x1c0}),setSecureDirectoryPermissions(_0x5a3b96));}export function validateSecureFilePermissions(_0x3c7f6e){const _0x307f9f=a53_0x2be4;try{const _0x50d7d1=a53_0xbe58c5[_0x307f9f(0xfa)](_0x3c7f6e),_0x44f7a6=_0x50d7d1[_0x307f9f(0xfb)]&0x1ff,_0x38ec7b=(_0x44f7a6&0x3f)!==0x0;if(_0x38ec7b)return console[_0x307f9f(0xf8)](_0x307f9f(0xee)+_0x3c7f6e+_0x307f9f(0xec)+_0x44f7a6[_0x307f9f(0xf2)](0x8)+_0x307f9f(0xe7)+_0x307f9f(0xef)),![];return!![];}catch{return!![];}}function a53_0x197f(){const _0x1d4412=['1028965kTInFS','35KuMAFh','14102165EoTdpo','9543592LlyqJH','\x20has\x20insecure\x20permissions\x20(','3908043bKASiQ','Warning:\x20','Should\x20be\x200600\x20or\x20more\x20restrictive.','3VjXoEb','667578VfAPFz','toString','Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20','chmodSync','dirname','writeFileSync','6wNUJSj','warn','mkdirSync','statSync','mode','746289meltjK','80OhGJGY','631348JayrnE',').\x20'];a53_0x197f=function(){return _0x1d4412;};return a53_0x197f();}export function writeSecureFile(_0x2ed9ce,_0xae0942){const _0x484d5b=a53_0x2be4,_0x287ca7=a53_0x32e344[_0x484d5b(0xf5)](_0x2ed9ce);createSecureDirectory(_0x287ca7),a53_0xbe58c5[_0x484d5b(0xf6)](_0x2ed9ce,_0xae0942,{'mode':0x180}),setSecureFilePermissions(_0x2ed9ce);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a54_0x1eab(_0x2db34b,_0x1c54ff){const _0x573f29=a54_0x573f();return a54_0x1eab=function(_0x1eab42,_0x44cb5e){_0x1eab42=_0x1eab42-0xa7;let _0x2b1269=_0x573f29[_0x1eab42];return _0x2b1269;},a54_0x1eab(_0x2db34b,_0x1c54ff);}(function(_0x351407,_0x58d50a){const _0x45fb91=a54_0x1eab,_0x1a9ff7=_0x351407();while(!![]){try{const _0xabfbe=parseInt(_0x45fb91(0xac))/0x1+parseInt(_0x45fb91(0xb1))/0x2*(-parseInt(_0x45fb91(0xaa))/0x3)+parseInt(_0x45fb91(0xb5))/0x4+-parseInt(_0x45fb91(0xae))/0x5*(parseInt(_0x45fb91(0xb3))/0x6)+parseInt(_0x45fb91(0xb2))/0x7+parseInt(_0x45fb91(0xab))/0x8+-parseInt(_0x45fb91(0xb4))/0x9;if(_0xabfbe===_0x58d50a)break;else _0x1a9ff7['push'](_0x1a9ff7['shift']());}catch(_0x4b801b){_0x1a9ff7['push'](_0x1a9ff7['shift']());}}}(a54_0x573f,0x43c02));function a54_0x573f(){const _0x39217d=['381399GjALPz','pop','5jFWKpt','tab','json','992QwDZMT','2378670PVTmXP','2233614IkxaGr','4868163zOtxjn','689652jEwFBu','text','tsv','table','jsonl','split','txt','1197TUiDtN','3959712YHqDgk'];a54_0x573f=function(){return _0x39217d;};return a54_0x573f();}export function detectFormatFromExtension(_0x4a9b7a){const _0x19b691=a54_0x1eab,_0x519089=_0x4a9b7a['toLowerCase']()[_0x19b691(0xa8)]('.')[_0x19b691(0xad)]();switch(_0x519089){case _0x19b691(0xb0):return _0x19b691(0xb0);case'jsonl':return _0x19b691(0xa7);case _0x19b691(0xb7):case _0x19b691(0xaf):return _0x19b691(0xb7);case _0x19b691(0xa9):case _0x19b691(0xb6):return _0x19b691(0xb8);default:return undefined;}}export function resolveOutputFormat(_0x5746cf,_0x783b6d,_0xdab938){if(_0x5746cf)return _0x5746cf;if(_0x783b6d){const _0x4940bd=detectFormatFromExtension(_0x783b6d);if(_0x4940bd)return _0x4940bd;}return _0xdab938;}
|
package/dist/utils/formatters.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5b4a4e,_0x30318c){const _0x39a2a9=a55_0x4211,_0x1bde05=_0x5b4a4e();while(!![]){try{const _0x2ef9e3=-parseInt(_0x39a2a9(0x84))/0x1*(parseInt(_0x39a2a9(0x70))/0x2)+parseInt(_0x39a2a9(0x88))/0x3*(-parseInt(_0x39a2a9(0x7a))/0x4)+-parseInt(_0x39a2a9(0x98))/0x5+parseInt(_0x39a2a9(0x80))/0x6*(parseInt(_0x39a2a9(0x6d))/0x7)+parseInt(_0x39a2a9(0x93))/0x8*(-parseInt(_0x39a2a9(0x97))/0x9)+-parseInt(_0x39a2a9(0x8f))/0xa*(parseInt(_0x39a2a9(0x8c))/0xb)+parseInt(_0x39a2a9(0x79))/0xc;if(_0x2ef9e3===_0x30318c)break;else _0x1bde05['push'](_0x1bde05['shift']());}catch(_0x38d239){_0x1bde05['push'](_0x1bde05['shift']());}}}(a55_0x5fd6,0x3d977));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 a55_0x5fd6(){const _0x1de468=['20334576OXzMtH','4gvDgoK','string','json','date','forEach','entries','323106LxdVPK','jsonl','\x20shown)','timestamp','159nVwBOg','boolean','test','number','1297713PqZaLC','\x20rows\x20(','repeat','stringify','11wYkOUa','stdout','\x20row','4079890LYNwZz','bool','row','array','32wICqzq','push','type','false','182799MqtLon','1651005wkXoBk','columns','min','replace','max','data','long','length','14OCfsTW','table','startsWith','3748OBBnzP','true','reduce','slice','name','tsv','toLowerCase','join','map'];a55_0x5fd6=function(){return _0x1de468;};return a55_0x5fd6();}function getTerminalWidth(){const _0x2c3bc9=a55_0x4211;return process[_0x2c3bc9(0x8d)][_0x2c3bc9(0x99)]||Infinity;}export function formatAsTable(_0xa884b8,_0x462106=DEFAULT_MAX_DISPLAY_ROWS,_0x155acd=![],_0x395e53={}){const _0x1278ea=a55_0x4211;if(_0xa884b8[_0x1278ea(0x9d)][_0x1278ea(0x6c)]===0x0)return'No\x20rows\x20returned';const _0x364e08=_0xa884b8['columns']['map'](_0x12b6b5=>_0x12b6b5[_0x1278ea(0x74)]),_0xf18acb=_0xa884b8[_0x1278ea(0x99)][_0x1278ea(0x78)](_0x1770c0=>simplifyType(_0x1770c0[_0x1278ea(0x95)])),_0x1411f5=_0xa884b8[_0x1278ea(0x9d)][_0x1278ea(0x73)](0x0,_0x462106),_0x31d1ba=_0xa884b8[_0x1278ea(0x9d)]['length'],_0x4837af=_0x31d1ba>_0x462106,_0x4cb32c=[],_0x5692a8=getTerminalWidth(),_0x57ab73=_0x5692a8!==Infinity,_0x5ceeb3=0x32;let _0x4d5eb7=_0x364e08['map']((_0x72ae91,_0x412673)=>{const _0x53a3be=_0x1278ea,_0x6a2d48=stringWidth(_0xf18acb[_0x412673]),_0x4c44f8=Math[_0x53a3be(0x9c)](..._0x1411f5[_0x53a3be(0x78)](_0x272e53=>{const _0x356ecd=_0x272e53[_0x72ae91];return stringWidth(formatValue(_0x356ecd));})),_0x2ada67=Math[_0x53a3be(0x9c)](stringWidth(_0x72ae91),_0x6a2d48,_0x4c44f8);return _0x155acd?_0x2ada67:Math[_0x53a3be(0x9a)](_0x2ada67,_0x5ceeb3);});if(_0x57ab73&&!_0x155acd&&_0x364e08[_0x1278ea(0x6c)]>0x0){const _0x4a3ab6=_0x2ea706=>{let _0xfb904e=0x1;for(const _0xb0972c of _0x2ea706){_0xfb904e+=_0xb0972c+0x3;}return _0xfb904e+0x1;};let _0x1ee9e5=_0x4a3ab6(_0x4d5eb7);if(_0x1ee9e5>_0x5692a8){const _0x463e90=0x3;for(let _0x309046=_0x4d5eb7[_0x1278ea(0x6c)]-0x1;_0x309046>=0x0;_0x309046--){_0x1ee9e5=_0x4a3ab6(_0x4d5eb7);if(_0x1ee9e5<=_0x5692a8)break;const _0x8421de=_0x4d5eb7[_0x309046],_0x2ce148=_0x1ee9e5-_0x5692a8,_0xd1af02=_0x8421de-_0x463e90,_0x27671f=Math['min'](_0x2ce148,_0xd1af02);_0x27671f>0x0&&(_0x4d5eb7[_0x309046]=_0x8421de-_0x27671f);}}}const _0x1a5aec=_0x364e08,_0x3f35c0=_0xf18acb,_0xf28bb6=_0x4d5eb7,_0x48262d=_0x4d5eb7;_0x4cb32c[_0x1278ea(0x94)](colorBorder('┌'+_0x48262d[_0x1278ea(0x78)](_0x4aad98=>'─'[_0x1278ea(0x8a)](_0x4aad98+0x2))['join']('┬')+'┐',_0x395e53));const _0x2f3618=_0x1a5aec[_0x1278ea(0x78)]((_0x20c0a5,_0x805515)=>centerAlign(_0x20c0a5,_0xf28bb6[_0x805515]));_0x4cb32c[_0x1278ea(0x94)](colorBorder('│',_0x395e53)+'\x20'+_0x2f3618[_0x1278ea(0x77)]('\x20'+colorBorder('│',_0x395e53)+'\x20')+'\x20'+colorBorder('│',_0x395e53));const _0x4b948b=_0x3f35c0[_0x1278ea(0x78)]((_0x4a201a,_0x3ff570)=>colorType(centerAlign(_0x4a201a,_0xf28bb6[_0x3ff570]),_0x395e53));_0x4cb32c['push'](colorBorder('│',_0x395e53)+'\x20'+_0x4b948b[_0x1278ea(0x77)]('\x20'+colorBorder('│',_0x395e53)+'\x20')+'\x20'+colorBorder('│',_0x395e53)),_0x4cb32c[_0x1278ea(0x94)](colorBorder('├'+_0x48262d[_0x1278ea(0x78)](_0x254945=>'─'['repeat'](_0x254945+0x2))[_0x1278ea(0x77)]('┼')+'┤',_0x395e53));const _0x55f950=(_0x26ed18,_0xc39fe4)=>{const _0x24f484=_0x1278ea,_0x18851a=stringWidth(_0x26ed18);if(_0x18851a<=_0xc39fe4)return _0x26ed18;let _0x3ce88f=_0x26ed18;while(stringWidth(_0x3ce88f+'…')>_0xc39fe4&&_0x3ce88f['length']>0x0){_0x3ce88f=_0x3ce88f[_0x24f484(0x73)](0x0,-0x1);}return _0x3ce88f+'…';};_0x1411f5[_0x1278ea(0x7e)](_0x8e2924=>{const _0x356e75=_0x1278ea,_0x4186bb=_0x364e08[_0x356e75(0x78)]((_0x49dbb0,_0x2a50cb)=>{const _0x44975f=_0x356e75,_0x9960c6=_0x8e2924[_0x49dbb0],_0x5f3215=formatValue(_0x9960c6),_0x54915b=_0xf28bb6[_0x2a50cb],_0x45cf62=_0x55f950(_0x5f3215,_0x54915b),_0x2735ab=typeof _0x9960c6==='number'||typeof _0x9960c6===_0x44975f(0x7b)&&/^-?\d+$/[_0x44975f(0x86)](_0x9960c6);return _0x2735ab?padStart(_0x45cf62,_0x54915b):padEnd(_0x45cf62,_0x54915b);});_0x4cb32c[_0x356e75(0x94)](colorBorder('│',_0x395e53)+'\x20'+_0x4186bb[_0x356e75(0x77)]('\x20'+colorBorder('│',_0x395e53)+'\x20')+'\x20'+colorBorder('│',_0x395e53));});const _0x3f4ba6=_0x48262d[_0x1278ea(0x72)]((_0x450188,_0x25b5ee)=>_0x450188+_0x25b5ee+0x3,-0x1);_0x4cb32c[_0x1278ea(0x94)](colorBorder('├'+_0x48262d[_0x1278ea(0x78)](_0x3868f3=>'─'[_0x1278ea(0x8a)](_0x3868f3+0x2))[_0x1278ea(0x77)]('┴')+'┤',_0x395e53));let _0x99c26b;_0x4837af?_0x99c26b=_0x31d1ba+_0x1278ea(0x89)+_0x462106+_0x1278ea(0x82):_0x99c26b=_0x31d1ba+_0x1278ea(0x8e)+(_0x31d1ba===0x1?'':'s');const _0x2d46f1=_0x99c26b['padEnd'](_0x3f4ba6-0x2);return _0x4cb32c[_0x1278ea(0x94)](colorBorder('│',_0x395e53)+'\x20'+_0x2d46f1+'\x20'+colorBorder('│',_0x395e53)),_0x4cb32c[_0x1278ea(0x94)](colorBorder('└'+'─'['repeat'](_0x3f4ba6)+'┘',_0x395e53)),_0x4cb32c['join']('\x0a');}function simplifyType(_0x3e3381){const _0x1dcbd5=a55_0x4211,_0x35443f={'varchar':_0x1dcbd5(0x7b),'bigint':_0x1dcbd5(0x9e),'integer':'int','double':'double','boolean':_0x1dcbd5(0x90),'date':_0x1dcbd5(0x7d),'timestamp':_0x1dcbd5(0x83),'array':_0x1dcbd5(0x92),'map':'map','row':_0x1dcbd5(0x91)},_0x46d92b=_0x3e3381[_0x1dcbd5(0x76)]();for(const [_0x3f770d,_0x28bfb8]of Object[_0x1dcbd5(0x7f)](_0x35443f)){if(_0x46d92b[_0x1dcbd5(0x6f)](_0x3f770d))return _0x28bfb8;}return _0x3e3381[_0x1dcbd5(0x6c)]>0xa?_0x3e3381['substring'](0x0,0xa):_0x3e3381;}export function formatAsJSON(_0xec01f2,_0x2c0ee8={}){const _0x47e08e=a55_0x4211;if(_0xec01f2[_0x47e08e(0x9d)][_0x47e08e(0x6c)]===0x0)return'[]';if(shouldUseColor(_0x2c0ee8))return colorizeJSON(_0xec01f2[_0x47e08e(0x9d)],_0x2c0ee8);const _0x271cea=_0xec01f2[_0x47e08e(0x9d)][_0x47e08e(0x78)](_0x1c2d56=>'\x20\x20'+JSON[_0x47e08e(0x8b)](_0x1c2d56));return'[\x0a'+_0x271cea[_0x47e08e(0x77)](',\x0a')+'\x0a]';}export function formatAsJSONL(_0x20189,_0x12f67c={}){const _0x270125=a55_0x4211;if(_0x20189[_0x270125(0x9d)][_0x270125(0x6c)]===0x0)return'';if(shouldUseColor(_0x12f67c))return _0x20189[_0x270125(0x9d)][_0x270125(0x78)](_0x225850=>colorizeJSONCompact(_0x225850,_0x12f67c))[_0x270125(0x77)]('\x0a');return _0x20189['data'][_0x270125(0x78)](_0x51023f=>JSON['stringify'](_0x51023f))[_0x270125(0x77)]('\x0a');}export function formatAsTSV(_0x5e457e){const _0x25b5f0=a55_0x4211;if(_0x5e457e[_0x25b5f0(0x9d)][_0x25b5f0(0x6c)]===0x0)return'';const _0xfdb790=[],_0xa58b6b=_0x5e457e[_0x25b5f0(0x99)][_0x25b5f0(0x78)](_0xfce829=>_0xfce829[_0x25b5f0(0x74)]);return _0xfdb790[_0x25b5f0(0x94)](_0xa58b6b[_0x25b5f0(0x77)]('\x09')),_0x5e457e[_0x25b5f0(0x9d)][_0x25b5f0(0x7e)](_0x599b08=>{const _0x25341a=_0x25b5f0,_0xed6e14=_0xa58b6b[_0x25341a(0x78)](_0x29d85b=>{const _0x432e22=_0x599b08[_0x29d85b];return formatValueForTSV(_0x432e22);});_0xfdb790[_0x25341a(0x94)](_0xed6e14[_0x25341a(0x77)]('\x09'));}),_0xfdb790[_0x25b5f0(0x77)]('\x0a');}function formatValue(_0x36db89){const _0x43d124=a55_0x4211;if(_0x36db89===null||_0x36db89===undefined)return'';if(typeof _0x36db89===_0x43d124(0x7b)){const _0x6e49f2=_0x36db89['replace'](/\n/g,'\x5cn')['replace'](/\r/g,'\x5cr')[_0x43d124(0x9b)](/\t/g,'\x5ct');return _0x6e49f2;}if(typeof _0x36db89==='number')return String(_0x36db89);if(typeof _0x36db89===_0x43d124(0x85))return _0x36db89?_0x43d124(0x71):_0x43d124(0x96);if(_0x36db89 instanceof Date)return _0x36db89['toISOString']();if(typeof _0x36db89==='object')return JSON['stringify'](_0x36db89);return String(_0x36db89);}function formatValueForTSV(_0x3f27cc){const _0x8942bd=a55_0x4211;if(_0x3f27cc===null||_0x3f27cc===undefined)return'';if(typeof _0x3f27cc===_0x8942bd(0x7b))return _0x3f27cc[_0x8942bd(0x9b)](/\t/g,'\x5ct')['replace'](/\n/g,'\x5cn');if(typeof _0x3f27cc===_0x8942bd(0x87)||typeof _0x3f27cc===_0x8942bd(0x85))return String(_0x3f27cc);if(_0x3f27cc instanceof Date)return _0x3f27cc['toISOString']();if(typeof _0x3f27cc==='object')return JSON[_0x8942bd(0x8b)](_0x3f27cc);return String(_0x3f27cc);}function a55_0x4211(_0x5c0386,_0x4bdd2d){const _0x5fd6ce=a55_0x5fd6();return a55_0x4211=function(_0x421123,_0x140ee1){_0x421123=_0x421123-0x6c;let _0x54abd6=_0x5fd6ce[_0x421123];return _0x54abd6;},a55_0x4211(_0x5c0386,_0x4bdd2d);}export function formatQueryResult(_0x3ec975,_0x3e4200){const _0xd4f5e5=a55_0x4211;switch(_0x3e4200){case _0xd4f5e5(0x6e):return formatAsTable(_0x3ec975);case _0xd4f5e5(0x7c):return formatAsJSON(_0x3ec975);case _0xd4f5e5(0x81):return formatAsJSONL(_0x3ec975);case _0xd4f5e5(0x75):return formatAsTSV(_0x3ec975);default:return formatAsJSON(_0x3ec975);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a56_0x23365e=a56_0x2dbe;(function(_0x230f6b,_0x4a82de){const _0x3eec1f=a56_0x2dbe,_0x1062e4=_0x230f6b();while(!![]){try{const _0x521737=parseInt(_0x3eec1f(0x10f))/0x1*(parseInt(_0x3eec1f(0x10a))/0x2)+-parseInt(_0x3eec1f(0x104))/0x3+parseInt(_0x3eec1f(0x103))/0x4+-parseInt(_0x3eec1f(0x106))/0x5+parseInt(_0x3eec1f(0x109))/0x6*(-parseInt(_0x3eec1f(0x10e))/0x7)+-parseInt(_0x3eec1f(0x10d))/0x8*(-parseInt(_0x3eec1f(0x105))/0x9)+parseInt(_0x3eec1f(0x10c))/0xa;if(_0x521737===_0x4a82de)break;else _0x1062e4['push'](_0x1062e4['shift']());}catch(_0x2f7d2a){_0x1062e4['push'](_0x1062e4['shift']());}}}(a56_0xfb5c,0x825cf));const MODEL_ALIASES={'haiku':a56_0x23365e(0x107),'sonnet':a56_0x23365e(0x108)};export function resolveModelAlias(_0x28d61a){const _0x1f27fc=a56_0x23365e;return MODEL_ALIASES[_0x28d61a[_0x1f27fc(0x10b)]()]||_0x28d61a;}function a56_0x2dbe(_0x4248b1,_0x9125d7){const _0xfb5cae=a56_0xfb5c();return a56_0x2dbe=function(_0x2dbec7,_0x22db21){_0x2dbec7=_0x2dbec7-0x103;let _0x3d4de4=_0xfb5cae[_0x2dbec7];return _0x3d4de4;},a56_0x2dbe(_0x4248b1,_0x9125d7);}function a56_0xfb5c(){const _0x18d02d=['1CsgYaw','3337752UMybvH','1476369oJrKTi','8256744LIpzPn','1116715fdXlrs','claude-4.5-haiku','claude-4.5-sonnet','157704nJucet','591388ybssNl','toLowerCase','1743930WDtkrj','8LpKRdj','259tbubHp'];a56_0xfb5c=function(){return _0x18d02d;};return a56_0xfb5c();}export function getModelAliases(){return{...MODEL_ALIASES};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4c9736,_0x2cacb1){const _0x524a11=a57_0x5287,_0xe53b07=_0x4c9736();while(!![]){try{const _0x338728=-parseInt(_0x524a11(0x1c2))/0x1+parseInt(_0x524a11(0x1c8))/0x2+parseInt(_0x524a11(0x1cf))/0x3+-parseInt(_0x524a11(0x1cc))/0x4+parseInt(_0x524a11(0x1cb))/0x5*(parseInt(_0x524a11(0x1ca))/0x6)+-parseInt(_0x524a11(0x1c5))/0x7+-parseInt(_0x524a11(0x1c4))/0x8*(parseInt(_0x524a11(0x1c7))/0x9);if(_0x338728===_0x2cacb1)break;else _0xe53b07['push'](_0xe53b07['shift']());}catch(_0x5aa9fa){_0xe53b07['push'](_0xe53b07['shift']());}}}(a57_0x208a,0x2d5ce));function a57_0x208a(){const _0xed8fd4=['647455aFIZTZ','1040288bWobHv','number','.\x20Must\x20be\x20a\x20positive\x20number.','892245eIEqIr','.\x20Must\x20be\x20a\x20number.','125616Oljeuz','Invalid\x20timeout\x20value:\x20','8BruNiz','1175650JVMKKM','isInteger','252603lLDIXC','422228NwcUcT','.\x20Must\x20be\x20an\x20integer.','12oqWcYh'];a57_0x208a=function(){return _0xed8fd4;};return a57_0x208a();}function a57_0x5287(_0x1ee3c5,_0x51a089){const _0x208acb=a57_0x208a();return a57_0x5287=function(_0x528779,_0x4b7c87){_0x528779=_0x528779-0x1c2;let _0xaade7e=_0x208acb[_0x528779];return _0xaade7e;},a57_0x5287(_0x1ee3c5,_0x51a089);}export function validateLimitOption(_0x2776ba){const _0x47d996=a57_0x5287;if(!Number[_0x47d996(0x1c6)](_0x2776ba))return{'isValid':![],'error':'Invalid\x20limit\x20value:\x20'+_0x2776ba+_0x47d996(0x1c9)};if(_0x2776ba<=0x0)return{'isValid':![],'error':'Invalid\x20limit\x20value:\x20'+_0x2776ba+'.\x20Must\x20be\x20a\x20positive\x20integer.'};return{'isValid':!![],'value':_0x2776ba};}export function validateTimeoutOption(_0x2a8247,_0x48e0d9=0x1e){const _0x4afc41=a57_0x5287;if(_0x2a8247===undefined)return{'isValid':!![],'value':_0x48e0d9};const _0x4886b6=typeof _0x2a8247===_0x4afc41(0x1cd)?_0x2a8247:parseFloat(_0x2a8247);if(isNaN(_0x4886b6))return{'isValid':![],'error':_0x4afc41(0x1c3)+_0x2a8247+_0x4afc41(0x1d0)};if(_0x4886b6<=0x0)return{'isValid':![],'error':_0x4afc41(0x1c3)+_0x4886b6+_0x4afc41(0x1ce)};return{'isValid':!![],'value':_0x4886b6};}
|
package/dist/utils/port.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4ef085,_0x2f212b){const _0x5e5d6c=a58_0xfb12,_0x37c031=_0x4ef085();while(!![]){try{const _0x5027ad=parseInt(_0x5e5d6c(0xf0))/0x1+-parseInt(_0x5e5d6c(0xec))/0x2*(parseInt(_0x5e5d6c(0xef))/0x3)+-parseInt(_0x5e5d6c(0xf3))/0x4+parseInt(_0x5e5d6c(0xee))/0x5+-parseInt(_0x5e5d6c(0xe7))/0x6+-parseInt(_0x5e5d6c(0xea))/0x7*(parseInt(_0x5e5d6c(0xed))/0x8)+-parseInt(_0x5e5d6c(0xe9))/0x9*(-parseInt(_0x5e5d6c(0xf2))/0xa);if(_0x5027ad===_0x2f212b)break;else _0x37c031['push'](_0x37c031['shift']());}catch(_0x2df83d){_0x37c031['push'](_0x37c031['shift']());}}}(a58_0x3b0a,0x82adf));function a58_0xfb12(_0x3ac74d,_0x4a1853){const _0x3b0a42=a58_0x3b0a();return a58_0xfb12=function(_0xfb1251,_0x4fa723){_0xfb1251=_0xfb1251-0xe5;let _0x41a9e6=_0x3b0a42[_0xfb1251];return _0x41a9e6;},a58_0xfb12(_0x3ac74d,_0x4a1853);}import{createServer}from'node:net';export async function isPortAvailable(_0x43e632){return new Promise(_0x3327dd=>{const _0x105b12=a58_0xfb12,_0xfcdc95=createServer();_0xfcdc95['once'](_0x105b12(0xf1),_0xaaa364=>{const _0x550d54=_0x105b12;_0xaaa364[_0x550d54(0xe6)]==='EADDRINUSE'?_0x3327dd(![]):_0x3327dd(![]);}),_0xfcdc95['once'](_0x105b12(0xe8),()=>{const _0x3020e8=_0x105b12;_0xfcdc95[_0x3020e8(0xeb)](),_0x3327dd(!![]);}),_0xfcdc95[_0x105b12(0xe5)](_0x43e632,'127.0.0.1');});}export async function findAvailablePort(_0x2820dc=0xfa0,_0x3987aa=0x64){for(let _0x33be6b=0x0;_0x33be6b<_0x3987aa;_0x33be6b++){const _0x120b2a=_0x2820dc+_0x33be6b;if(await isPortAvailable(_0x120b2a))return _0x120b2a;}throw new Error('No\x20available\x20port\x20found\x20between\x20'+_0x2820dc+'\x20and\x20'+(_0x2820dc+_0x3987aa-0x1));}function a58_0x3b0a(){const _0x45176d=['31146DbwYnc','28952FrNNlH','507500qRyZuT','129TLMDOk','916433KQXhWW','error','1990eQJmck','2288748bNSYwe','listen','code','4279308lWWWKG','listening','71991iptRhZ','231Rdftca','close'];a58_0x3b0a=function(){return _0x45176d;};return a58_0x3b0a();}
|
package/dist/utils/process.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1ecb9a,_0x26b916){var _0x46a5ec=a59_0x5b87,_0x5583ed=_0x1ecb9a();while(!![]){try{var _0x3edd85=parseInt(_0x46a5ec(0x16d))/0x1+-parseInt(_0x46a5ec(0x16f))/0x2+parseInt(_0x46a5ec(0x173))/0x3*(-parseInt(_0x46a5ec(0x16e))/0x4)+parseInt(_0x46a5ec(0x170))/0x5+-parseInt(_0x46a5ec(0x16a))/0x6*(parseInt(_0x46a5ec(0x16c))/0x7)+-parseInt(_0x46a5ec(0x171))/0x8+parseInt(_0x46a5ec(0x174))/0x9*(parseInt(_0x46a5ec(0x16b))/0xa);if(_0x3edd85===_0x26b916)break;else _0x5583ed['push'](_0x5583ed['shift']());}catch(_0xe46a8){_0x5583ed['push'](_0x5583ed['shift']());}}}(a59_0x2b0a,0x9e1ce));export function getPPID(){return process['ppid'];}function a59_0x5b87(_0x106965,_0x51edc1){var _0x2b0a9c=a59_0x2b0a();return a59_0x5b87=function(_0x5b87c9,_0x40a098){_0x5b87c9=_0x5b87c9-0x16a;var _0x519060=_0x2b0a9c[_0x5b87c9];return _0x519060;},a59_0x5b87(_0x106965,_0x51edc1);}function a59_0x2b0a(){var _0x418bb0=['710754cKhRBC','3123610kndutU','3182336ZFYHID','kill','111aYwCEh','9245214cKBmMe','4187532kWSBcD','20ytCheA','7kUUVEM','610796PbAQUB','128788OIPFzR'];a59_0x2b0a=function(){return _0x418bb0;};return a59_0x2b0a();}export function isProcessRunning(_0x2e6395){var _0x51d34d=a59_0x5b87;try{return process[_0x51d34d(0x172)](_0x2e6395,0x0),!![];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x411433,_0x3ece76){const _0x276720=a60_0x6f3e,_0x1c2e0d=_0x411433();while(!![]){try{const _0x11613b=-parseInt(_0x276720(0xd4))/0x1+-parseInt(_0x276720(0xd2))/0x2*(-parseInt(_0x276720(0xd5))/0x3)+-parseInt(_0x276720(0xd9))/0x4+parseInt(_0x276720(0xdb))/0x5*(-parseInt(_0x276720(0xd1))/0x6)+parseInt(_0x276720(0xcf))/0x7*(parseInt(_0x276720(0xd3))/0x8)+parseInt(_0x276720(0xd7))/0x9+parseInt(_0x276720(0xd0))/0xa;if(_0x11613b===_0x3ece76)break;else _0x1c2e0d['push'](_0x1c2e0d['shift']());}catch(_0x3891da){_0x1c2e0d['push'](_0x1c2e0d['shift']());}}}(a60_0x4410,0xc3585));function a60_0x6f3e(_0xa75fa4,_0x3abc05){const _0x441096=a60_0x4410();return a60_0x6f3e=function(_0x6f3e9e,_0x7ad157){_0x6f3e9e=_0x6f3e9e-0xcf;let _0x79d286=_0x441096[_0x6f3e9e];return _0x79d286;},a60_0x6f3e(_0xa75fa4,_0x3abc05);}function a60_0x4410(){const _0x73cb0=['81080zlUUBl','165957iIHFjA','443829zIbaHX','.\x20Child\x20name\x20cannot\x20be\x20empty','13062879CggnHQ','Invalid\x20segment\x20reference\x20format:\x20','5864360wCeNHP','substring','2621470jzSXDF','indexOf','98YWMWqG','7039030FJEglD','12iTZAtX','16BTYeQI'];a60_0x4410=function(){return _0x73cb0;};return a60_0x4410();}export function parseSegmentRef(_0x3fbd06){const _0x4cb51d=a60_0x6f3e,_0x185349=_0x3fbd06[_0x4cb51d(0xdc)]('/');if(_0x185349===-0x1)return{'parentId':_0x3fbd06};if(_0x185349===0x0)throw new Error(_0x4cb51d(0xd8)+_0x3fbd06+'.\x20Parent\x20name\x20cannot\x20be\x20empty');const _0x27e614=_0x3fbd06[_0x4cb51d(0xda)](0x0,_0x185349),_0x315315=_0x3fbd06['substring'](_0x185349+0x1);if(_0x315315==='')throw new Error(_0x4cb51d(0xd8)+_0x3fbd06+_0x4cb51d(0xd6));return{'parentId':_0x27e614,'childId':_0x315315};}
|
package/dist/utils/spinner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x429848,_0xafc38d){const _0x596440=a61_0x2a15,_0x463ec8=_0x429848();while(!![]){try{const _0x595441=parseInt(_0x596440(0x19b))/0x1*(parseInt(_0x596440(0x1a4))/0x2)+-parseInt(_0x596440(0x193))/0x3*(parseInt(_0x596440(0x1a8))/0x4)+-parseInt(_0x596440(0x192))/0x5*(-parseInt(_0x596440(0x1a1))/0x6)+-parseInt(_0x596440(0x196))/0x7+-parseInt(_0x596440(0x19c))/0x8+-parseInt(_0x596440(0x191))/0x9*(-parseInt(_0x596440(0x19d))/0xa)+-parseInt(_0x596440(0x197))/0xb*(-parseInt(_0x596440(0x19a))/0xc);if(_0x595441===_0xafc38d)break;else _0x463ec8['push'](_0x463ec8['shift']());}catch(_0x2fd0e8){_0x463ec8['push'](_0x463ec8['shift']());}}}(a61_0x3156,0xb42d4));function a61_0x3156(){const _0x556759=['extra','1538184FaqWwn','stdout','5949HnXvaL','65xLUXTj','6HkvUeE','isSpinning','now','334523iCjLSj','1485ofsKGI','clock','start','2124eXyMwT','7TAsUOp','6041456yrRmlB','13900KidbKF','cyan','stop','jobId','474294BuSrPT','phase','replace','97070YdGmFI','...','toFixed'];a61_0x3156=function(){return _0x556759;};return a61_0x3156();}import a61_0x59adaa from'ora';function a61_0x2a15(_0x1fc10d,_0x2e570e){const _0x315608=a61_0x3156();return a61_0x2a15=function(_0x2a15f0,_0x5870c4){_0x2a15f0=_0x2a15f0-0x191;let _0x2dae6a=_0x315608[_0x2a15f0];return _0x2dae6a;},a61_0x2a15(_0x1fc10d,_0x2e570e);}export function createCommandSpinner(_0x1a8b72,_0x39afdc={}){const _0x4ad8d2=a61_0x2a15,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x39afdc;return a61_0x59adaa({'text':_0x1a8b72,'color':_0x4ad8d2(0x19e),'isEnabled':forceEnabled||process[_0x4ad8d2(0x1a9)]['isTTY']&&!verbose});}export async function withSpinner(_0x3606af,_0x1746db,_0x1b278b={}){const _0x1227dc=a61_0x2a15,_0x4ec56e=_0x1b278b[_0x1227dc(0x198)]??(()=>Date[_0x1227dc(0x195)]()),_0x545ada=createCommandSpinner(_0x3606af,_0x1b278b);_0x545ada[_0x1227dc(0x199)]();const _0x320611=_0x4ec56e();try{const _0xe074e4=await _0x1746db(),_0x2b659b=_0x4ec56e()-_0x320611;return _0x545ada[_0x1227dc(0x19f)](),{'data':_0xe074e4,'elapsedMs':_0x2b659b};}catch(_0x3b749c){_0x545ada[_0x1227dc(0x19f)]();throw _0x3b749c;}}export async function withQuerySpinner(_0x1a806e,_0xf33241,_0xb79864={}){const _0x551384=a61_0x2a15,_0x3171e1=_0xb79864[_0x551384(0x198)]??(()=>Date[_0x551384(0x195)]()),_0x40d289=_0xb79864['intervalFactory']??setInterval,_0x318949=createCommandSpinner(_0x1a806e,_0xb79864);_0x318949[_0x551384(0x199)]();const _0x1e59e1=_0x3171e1(),_0x37164f=_0x1a806e[_0x551384(0x1a3)](_0x551384(0x1a5),''),_0x3faf58={},_0x51bbd4=()=>{const _0x8692c9=_0x551384;if(!_0x318949[_0x8692c9(0x194)])return;const _0x313a55=((_0x3171e1()-_0x1e59e1)/0x3e8)[_0x8692c9(0x1a6)](0x1),_0x50d448=_0x3faf58['phase']??_0x37164f,_0x4569a0=_0x3faf58[_0x8692c9(0x1a0)]?'\x20[Job\x20ID:\x20'+_0x3faf58[_0x8692c9(0x1a0)]+']':'',_0xbe17be=_0x3faf58['extra']?'\x20'+_0x3faf58[_0x8692c9(0x1a7)]:'';_0x318949['text']=_0x50d448+'\x20('+_0x313a55+'s)'+_0xbe17be+_0x4569a0;},_0x5a10c8=_0x40d289(()=>{_0x51bbd4();},0x3e8),_0x9269ca={'setPhase':_0x37f1bd=>{const _0x444897=_0x551384;_0x3faf58[_0x444897(0x1a2)]=_0x37f1bd,_0x51bbd4();},'setJobId':_0x5c8c5a=>{const _0x45371a=_0x551384;_0x3faf58[_0x45371a(0x1a0)]=_0x5c8c5a,_0x51bbd4();},'setExtra':_0x269e4f=>{const _0x1bfd9c=_0x551384;_0x3faf58[_0x1bfd9c(0x1a7)]=_0x269e4f,_0x51bbd4();}};_0x51bbd4();try{const _0x3f1d94=await _0xf33241(_0x9269ca),_0x3a31b2=_0x3171e1()-_0x1e59e1;return{'data':_0x3f1d94,'elapsedMs':_0x3a31b2};}finally{clearInterval(_0x5a10c8),_0x318949[_0x551384(0x19f)]();}}export function formatElapsed(_0x27d099){return(_0x27d099/0x3e8)['toFixed'](0x2)+'s';}
|
package/dist/utils/sql-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a62_0xb9e2(_0x173b4e,_0x5548fb){const _0x15b1d0=a62_0x15b1();return a62_0xb9e2=function(_0xb9e2db,_0x302f52){_0xb9e2db=_0xb9e2db-0x1e5;let _0x5acf2d=_0x15b1d0[_0xb9e2db];return _0x5acf2d;},a62_0xb9e2(_0x173b4e,_0x5548fb);}(function(_0x191d87,_0x74cd1b){const _0x1a2c6f=a62_0xb9e2,_0x4cc8b2=_0x191d87();while(!![]){try{const _0x3585c0=parseInt(_0x1a2c6f(0x1ef))/0x1+parseInt(_0x1a2c6f(0x1e8))/0x2+-parseInt(_0x1a2c6f(0x1f9))/0x3*(parseInt(_0x1a2c6f(0x1fa))/0x4)+-parseInt(_0x1a2c6f(0x1ed))/0x5+parseInt(_0x1a2c6f(0x1f4))/0x6*(-parseInt(_0x1a2c6f(0x1ec))/0x7)+parseInt(_0x1a2c6f(0x1eb))/0x8+-parseInt(_0x1a2c6f(0x1f5))/0x9*(-parseInt(_0x1a2c6f(0x1e9))/0xa);if(_0x3585c0===_0x74cd1b)break;else _0x4cc8b2['push'](_0x4cc8b2['shift']());}catch(_0x1c36dc){_0x4cc8b2['push'](_0x4cc8b2['shift']());}}}(a62_0x15b1,0xec670));import{readFileSync}from'fs';export function stripSqlComments(_0xeb8948){const _0x5b1cf1=a62_0xb9e2;let _0x3501f1=_0xeb8948[_0x5b1cf1(0x1f6)](/\/\*(?:[^*]|\*(?!\/))*\*\//g,'');return _0x3501f1=_0x3501f1[_0x5b1cf1(0x1f6)](/--.*$/gm,''),_0x3501f1[_0x5b1cf1(0x1e5)]();}function isEscaped(_0x57e5d6,_0x333dc0){let _0x369d9f=0x0;for(let _0x51e756=_0x333dc0-0x1;_0x51e756>=0x0&&_0x57e5d6[_0x51e756]==='\x5c';_0x51e756--){_0x369d9f++;}return _0x369d9f%0x2===0x1;}export function splitSqlStatements(_0x4c77d6){const _0x3e96fe=a62_0xb9e2,_0x380ec5=stripSqlComments(_0x4c77d6);if(!_0x380ec5)throw new Error('Content\x20contains\x20no\x20SQL\x20statements');const _0x5384f0=[];let _0x5c19f8='',_0x511e85=![],_0xb38465=![],_0x580713=![];for(let _0x5c915f=0x0;_0x5c915f<_0x4c77d6['length'];_0x5c915f++){const _0x339b6c=_0x4c77d6[_0x5c915f];if(_0x339b6c==='\x27'&&!isEscaped(_0x4c77d6,_0x5c915f)&&!_0xb38465&&!_0x580713)_0x511e85=!_0x511e85;else{if(_0x339b6c==='\x22'&&!isEscaped(_0x4c77d6,_0x5c915f)&&!_0x511e85&&!_0x580713)_0xb38465=!_0xb38465;else _0x339b6c==='`'&&!isEscaped(_0x4c77d6,_0x5c915f)&&!_0x511e85&&!_0xb38465&&(_0x580713=!_0x580713);}if(_0x339b6c===';'&&!_0x511e85&&!_0xb38465&&!_0x580713){const _0x503538=_0x5c19f8[_0x3e96fe(0x1e5)]();_0x503538&&_0x5384f0[_0x3e96fe(0x1f1)](_0x503538),_0x5c19f8='';}else _0x5c19f8+=_0x339b6c;}const _0x3a5a99=_0x5c19f8[_0x3e96fe(0x1e5)]();_0x3a5a99&&_0x5384f0[_0x3e96fe(0x1f1)](_0x3a5a99);const _0x3d317e=_0x5384f0['map'](_0x3c0bcb=>_0x3c0bcb[_0x3e96fe(0x1e5)]())['filter'](_0x1bd0a3=>{const _0x5d97da=_0x3e96fe,_0x175b7b=stripSqlComments(_0x1bd0a3);return _0x175b7b[_0x5d97da(0x1f7)]>0x0;});if(_0x3d317e[_0x3e96fe(0x1f7)]===0x0)throw new Error(_0x3e96fe(0x1ea));return _0x3d317e;}function a62_0x15b1(){const _0x2680e1=['toLowerCase','EACCES','1832872LeqlVo','1770HxEFrK','Content\x20contains\x20no\x20SQL\x20statements','10006056tPwPjJ','1449oMRIwt','2462855IHlHbe','ENOENT','978910zfbdSx','message','push','Permission\x20denied\x20reading\x20file\x20\x27','File\x20\x27','53406orjPjp','74484hCwifn','replace','length','utf-8','69PQFewv','227404gyJxSx','trim'];a62_0x15b1=function(){return _0x2680e1;};return a62_0x15b1();}export function readFileContent(_0x5e0e54){const _0x7bce5=a62_0xb9e2;try{return readFileSync(_0x5e0e54,_0x7bce5(0x1f8));}catch(_0x5c1ba6){const _0x327d96=_0x5c1ba6['code'];if(_0x327d96===_0x7bce5(0x1ee))throw new Error(_0x7bce5(0x1f3)+_0x5e0e54+'\x27\x20not\x20found');else{if(_0x327d96===_0x7bce5(0x1e7))throw new Error(_0x7bce5(0x1f2)+_0x5e0e54+'\x27');else throw new Error('Error\x20reading\x20file\x20\x27'+_0x5e0e54+'\x27:\x20'+_0x5c1ba6[_0x7bce5(0x1f0)]);}}}export function readSqlStatementsFromFile(_0x3de3ca){const _0x1c7b27=a62_0xb9e2,_0x3477f9=readFileContent(_0x3de3ca);try{return splitSqlStatements(_0x3477f9);}catch(_0x3eca1a){throw new Error('File\x20\x27'+_0x3de3ca+'\x27\x20'+_0x3eca1a[_0x1c7b27(0x1f0)][_0x1c7b27(0x1e6)]());}}
|
package/dist/utils/sse-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a63_0x3333(){const _0x3cf30c=['4595805VzGCcl','444160ACmXle','data','trim','74804NmVnmY','startsWith','Response\x20body\x20is\x20null','2407944asRwZz','33380dsBfGg','874300olRGBe','8heaaAq','39SSVzoy','getReader','decode','slice','484392KUBPCl','event','body','split'];a63_0x3333=function(){return _0x3cf30c;};return a63_0x3333();}function a63_0x38bf(_0x4d3dc8,_0xc5a083){const _0x333315=a63_0x3333();return a63_0x38bf=function(_0x38bf3a,_0x613cac){_0x38bf3a=_0x38bf3a-0x11b;let _0x8d6afd=_0x333315[_0x38bf3a];return _0x8d6afd;},a63_0x38bf(_0x4d3dc8,_0xc5a083);}(function(_0x2334e9,_0x5e09b0){const _0x18c866=a63_0x38bf,_0x466317=_0x2334e9();while(!![]){try{const _0x521f1a=-parseInt(_0x18c866(0x11b))/0x1*(-parseInt(_0x18c866(0x128))/0x2)+-parseInt(_0x18c866(0x11c))/0x3*(-parseInt(_0x18c866(0x12c))/0x4)+-parseInt(_0x18c866(0x12d))/0x5+parseInt(_0x18c866(0x120))/0x6+parseInt(_0x18c866(0x12b))/0x7+parseInt(_0x18c866(0x125))/0x8+-parseInt(_0x18c866(0x124))/0x9;if(_0x521f1a===_0x5e09b0)break;else _0x466317['push'](_0x466317['shift']());}catch(_0x543041){_0x466317['push'](_0x466317['shift']());}}}(a63_0x3333,0x316c8));export async function*parseSSEStream(_0x42030e){const _0x290739=a63_0x38bf;if(!_0x42030e['body'])throw new Error(_0x290739(0x12a));const _0x2cb104=_0x42030e[_0x290739(0x122)][_0x290739(0x11d)](),_0x6dee17=new TextDecoder();let _0x3e749d='',_0x416d69={};try{while(!![]){const {done:_0x258c36,value:_0x5aea24}=await _0x2cb104['read']();if(_0x258c36){_0x416d69[_0x290739(0x126)]&&(yield parseSSEData(_0x416d69['data']));break;}_0x3e749d+=_0x6dee17[_0x290739(0x11e)](_0x5aea24,{'stream':!![]});const _0x409680=_0x3e749d[_0x290739(0x123)]('\x0a');_0x3e749d=_0x409680['pop']()||'';for(const _0x507755 of _0x409680){if(_0x507755[_0x290739(0x127)]()===''){_0x416d69[_0x290739(0x126)]&&(yield parseSSEData(_0x416d69['data']),_0x416d69={});continue;}if(_0x507755[_0x290739(0x129)](':'))continue;const _0x245c80=_0x507755['indexOf'](':');if(_0x245c80===-0x1)continue;const _0x1acd5a=_0x507755['slice'](0x0,_0x245c80);let _0x921d64=_0x507755[_0x290739(0x11f)](_0x245c80+0x1);_0x921d64[_0x290739(0x129)]('\x20')&&(_0x921d64=_0x921d64[_0x290739(0x11f)](0x1));switch(_0x1acd5a){case _0x290739(0x121):_0x416d69[_0x290739(0x121)]=_0x921d64;break;case _0x290739(0x126):_0x416d69[_0x290739(0x126)]=_0x416d69[_0x290739(0x126)]?_0x416d69[_0x290739(0x126)]+'\x0a'+_0x921d64:_0x921d64;break;case'id':_0x416d69['id']=_0x921d64;break;}}}}finally{_0x2cb104['releaseLock']();}}function parseSSEData(_0x428055){try{return JSON['parse'](_0x428055);}catch(_0x4c7059){throw new Error('Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20'+_0x428055,{'cause':_0x4c7059});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2fc60e,_0x37a191){const _0x583eb2=a64_0x11b4,_0x574df2=_0x2fc60e();while(!![]){try{const _0x3088b6=-parseInt(_0x583eb2(0xc5))/0x1*(parseInt(_0x583eb2(0xc7))/0x2)+parseInt(_0x583eb2(0xbc))/0x3*(-parseInt(_0x583eb2(0xbf))/0x4)+-parseInt(_0x583eb2(0xc2))/0x5*(-parseInt(_0x583eb2(0xcc))/0x6)+parseInt(_0x583eb2(0xc9))/0x7+parseInt(_0x583eb2(0xb3))/0x8+-parseInt(_0x583eb2(0xc6))/0x9+-parseInt(_0x583eb2(0xcb))/0xa*(parseInt(_0x583eb2(0xbb))/0xb);if(_0x3088b6===_0x37a191)break;else _0x574df2['push'](_0x574df2['shift']());}catch(_0x46fc3f){_0x574df2['push'](_0x574df2['shift']());}}}(a64_0x5d8b,0xc7f80));import a64_0x48f2fb from'string-width';export function stringWidth(_0x48290c){return a64_0x48f2fb(_0x48290c);}function a64_0x11b4(_0x3f4daa,_0x3339ed){const _0x5d8bd6=a64_0x5d8b();return a64_0x11b4=function(_0x11b4e8,_0x20e4e1){_0x11b4e8=_0x11b4e8-0xb3;let _0x3f7e62=_0x5d8bd6[_0x11b4e8];return _0x3f7e62;},a64_0x11b4(_0x3f4daa,_0x3339ed);}export function padEnd(_0x23f144,_0x28376b){const _0x5275f6=a64_0x11b4,_0x2e23e8=stringWidth(_0x23f144);if(_0x2e23e8>=_0x28376b)return _0x23f144;return _0x23f144+'\x20'[_0x5275f6(0xbe)](_0x28376b-_0x2e23e8);}export function padStart(_0x1d9b0b,_0x376058){const _0x195ada=a64_0x11b4,_0x4cf4e5=stringWidth(_0x1d9b0b);if(_0x4cf4e5>=_0x376058)return _0x1d9b0b;return'\x20'[_0x195ada(0xbe)](_0x376058-_0x4cf4e5)+_0x1d9b0b;}function a64_0x5d8b(){const _0x27352f=['unknown','padStart','replace','toString','11gtXHRf','78153REVFKu','env','repeat','152aenhTF','USERNAME','Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string','5HRLCOw','random','\x5c$&','230wXgRJo','305046GsCjEs','4038ivdFAv','test','7832223EiCYSU','USER','15764410KPAcBH','8334486DjcpnB','floor','11005960KCcrWw','trim','substring','length'];a64_0x5d8b=function(){return _0x27352f;};return a64_0x5d8b();}export function centerAlign(_0x4b6c45,_0xe3a707){const _0x44e86a=a64_0x11b4,_0x4d0fb0=stringWidth(_0x4b6c45);if(_0x4d0fb0>_0xe3a707){if(_0xe3a707<=0x1)return'…'[_0x44e86a(0xb5)](0x0,_0xe3a707);let _0x15e8f7=_0x4b6c45;while(stringWidth(_0x15e8f7+'…')>_0xe3a707){_0x15e8f7=_0x15e8f7['slice'](0x0,-0x1);}return _0x15e8f7+'…';}if(_0x4d0fb0===_0xe3a707)return _0x4b6c45;const _0x2aa90d=_0xe3a707-_0x4d0fb0,_0x160df3=Math[_0x44e86a(0xcd)](_0x2aa90d/0x2),_0x2fe523=_0x2aa90d-_0x160df3;return'\x20'[_0x44e86a(0xbe)](_0x160df3)+_0x4b6c45+'\x20'[_0x44e86a(0xbe)](_0x2fe523);}export function escapeStringLiteral(_0x4fded5){const _0xd1201e=a64_0x11b4;if(!_0x4fded5||_0x4fded5[_0xd1201e(0xb4)]()['length']===0x0)throw new Error('Cannot\x20escape\x20empty\x20string\x20literal');const _0x12b8be=_0x4fded5[_0xd1201e(0xb9)](/'/g,'\x27\x27');return'\x27'+_0x12b8be+'\x27';}export function globToLike(_0x18658f){const _0x20afd0=a64_0x11b4;let _0x4eb844=_0x18658f[_0x20afd0(0xb9)](/\\/g,'\x5c\x5c')[_0x20afd0(0xb9)](/%/g,'\x5c%')[_0x20afd0(0xb9)](/_/g,'\x5c_');return _0x4eb844=_0x4eb844[_0x20afd0(0xb9)](/\*/g,'%')['replace'](/\?/g,'_'),_0x4eb844;}export function buildLikePattern(_0x9379ee){const _0x46bfe9=a64_0x11b4;if(!_0x9379ee||_0x9379ee[_0x46bfe9(0xb4)]()[_0x46bfe9(0xb6)]===0x0)throw new Error(_0x46bfe9(0xc1));const _0x570403=globToLike(_0x9379ee),_0x3f9c1a=_0x570403[_0x46bfe9(0xb9)](/'/g,'\x27\x27');return'\x27'+_0x3f9c1a+'\x27';}export function matchGlobPattern(_0x2af1ee,_0x3b9d62){const _0x5a5a03=a64_0x11b4,_0x244b00=_0x3b9d62[_0x5a5a03(0xb9)](/[.+^${}()|[\]\\]/g,_0x5a5a03(0xc4))['replace'](/\*/g,'.*')['replace'](/\?/g,'.'),_0x429acc=new RegExp('^'+_0x244b00+'$');return _0x429acc[_0x5a5a03(0xc8)](_0x2af1ee);}export function getSanitizedUsername(){const _0x4327e7=a64_0x11b4,_0x5c1f0f=process['env'][_0x4327e7(0xca)]||process[_0x4327e7(0xbd)][_0x4327e7(0xc0)]||_0x4327e7(0xb7);return _0x5c1f0f[_0x4327e7(0xb9)](/[^a-zA-Z0-9]/g,'')['toLowerCase']();}export function generateRandomHex(){const _0x4c66a6=a64_0x11b4,_0x15e601=Math[_0x4c66a6(0xcd)](Math[_0x4c66a6(0xc3)]()*0xfffff);return _0x15e601[_0x4c66a6(0xba)](0x10)[_0x4c66a6(0xb8)](0x5,'0');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a65_0x23ad(){const _0x3a9b32=['Table\x20name\x20is\x20required\x20for\x20describe\x20operation','419811Avwpvj','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','table','includes','414fEHRpd','Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)','1276448ePfMlO','1660582lndsiH','47830owaZDt','5ogMDhL','length','split','Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)','6035232GohmXy','catalog','126cpfAja','769CHQlHX','48zWLkyQ','trim','66WlvJvx','613104mTGmeQ','Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty','push','database','join'];a65_0x23ad=function(){return _0x3a9b32;};return a65_0x23ad();}(function(_0x8f4e9a,_0x2021eb){const _0xfaa035=a65_0x432e,_0x5a7cc8=_0x8f4e9a();while(!![]){try{const _0x16e0de=parseInt(_0xfaa035(0xfd))/0x1*(-parseInt(_0xfaa035(0xfc))/0x2)+-parseInt(_0xfaa035(0x101))/0x3+parseInt(_0xfaa035(0x10d))/0x4*(-parseInt(_0xfaa035(0xf6))/0x5)+parseInt(_0xfaa035(0x100))/0x6*(parseInt(_0xfaa035(0x107))/0x7)+parseInt(_0xfaa035(0xfa))/0x8+parseInt(_0xfaa035(0x10b))/0x9*(parseInt(_0xfaa035(0xf5))/0xa)+parseInt(_0xfaa035(0xf4))/0xb*(-parseInt(_0xfaa035(0xfe))/0xc);if(_0x16e0de===_0x2021eb)break;else _0x5a7cc8['push'](_0x5a7cc8['shift']());}catch(_0x8a7513){_0x5a7cc8['push'](_0x5a7cc8['shift']());}}}(a65_0x23ad,0x6fe6e));function hasWildcard(_0x2a9992){const _0x40b651=a65_0x432e;return _0x2a9992[_0x40b651(0x10a)]('*')||_0x2a9992[_0x40b651(0x10a)]('?');}export function parseTableReference(_0x5856b8){const _0x46918d=a65_0x432e;if(!_0x5856b8||_0x5856b8[_0x46918d(0xff)]()[_0x46918d(0xf7)]===0x0)throw new Error('Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only');const _0x538c8b=_0x5856b8[_0x46918d(0xff)](),_0x1b096a={'original':_0x538c8b},_0x20f669=_0x538c8b[_0x46918d(0xf8)]('.');if(_0x20f669[_0x46918d(0xf7)]===0x1){const _0x21e9e3=_0x20f669[0x0];if(!_0x21e9e3)throw new Error('Pattern\x20cannot\x20be\x20just\x20a\x20dot');_0x1b096a['table']=_0x21e9e3;}else{if(_0x20f669[_0x46918d(0xf7)]===0x2){const [_0x5e1220,_0x1573d7]=_0x20f669;if(!_0x5e1220)throw new Error('Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)');if(!_0x1573d7)throw new Error(_0x46918d(0xf9));_0x1b096a['database']=_0x5e1220,_0x1b096a[_0x46918d(0x109)]=_0x1573d7;}else{if(_0x20f669[_0x46918d(0xf7)]===0x3){const [_0x4da1de,_0x5a672c,_0x27df9d]=_0x20f669;if(!_0x4da1de||!_0x5a672c||!_0x27df9d)throw new Error(_0x46918d(0x102));_0x1b096a[_0x46918d(0xfb)]=_0x4da1de,_0x1b096a[_0x46918d(0x104)]=_0x5a672c,_0x1b096a[_0x46918d(0x109)]=_0x27df9d;}else throw new Error(_0x46918d(0x10c));}}return _0x1b096a;}export function formatTableReference(_0x20687a){const _0x3b749b=a65_0x432e,_0x83ecd9=[];return _0x20687a[_0x3b749b(0xfb)]&&_0x83ecd9['push'](_0x20687a['catalog']),_0x20687a[_0x3b749b(0x104)]&&_0x83ecd9[_0x3b749b(0x103)](_0x20687a[_0x3b749b(0x104)]),_0x20687a['table']&&_0x83ecd9[_0x3b749b(0x103)](_0x20687a[_0x3b749b(0x109)]),_0x83ecd9[_0x3b749b(0x105)]('.');}function a65_0x432e(_0x2e7e2c,_0x5693e6){const _0x23ad27=a65_0x23ad();return a65_0x432e=function(_0x432ea6,_0x51e944){_0x432ea6=_0x432ea6-0xf4;let _0x5ea0f0=_0x23ad27[_0x432ea6];return _0x5ea0f0;},a65_0x432e(_0x2e7e2c,_0x5693e6);}export function validateTableListReference(_0x373e4d){return undefined;}export function validateTableDescribeReference(_0x9df721){const _0x5953da=a65_0x432e;if(!_0x9df721[_0x5953da(0x109)])return _0x5953da(0x106);if(_0x9df721[_0x5953da(0x104)]&&hasWildcard(_0x9df721[_0x5953da(0x104)]))return _0x5953da(0x108);if(hasWildcard(_0x9df721['table']))return'Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation';return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a66_0x1df1(_0x1b0384,_0x2868e2){const _0x1253e0=a66_0x1253();return a66_0x1df1=function(_0x1df12e,_0xd381ac){_0x1df12e=_0x1df12e-0xd0;let _0x2e5f21=_0x1253e0[_0x1df12e];return _0x2e5f21;},a66_0x1df1(_0x1b0384,_0x2868e2);}function a66_0x1253(){const _0x4e4577=['8ZYwkcB','startsWith','50RtYmlS','24686DGGMCJ','8808821SOdZfK','2174368NkkFQY','2184876yeGtrn','78oAIsOv','.digdag','3414771rZWbZT','2449320Yvnubn','1302282kQkIId'];a66_0x1253=function(){return _0x4e4577;};return a66_0x1253();}(function(_0x91c9c5,_0x2907e1){const _0xcb2b8=a66_0x1df1,_0x223c3c=_0x91c9c5();while(!![]){try{const _0x5d1fe1=parseInt(_0xcb2b8(0xd5))/0x1+-parseInt(_0xcb2b8(0xd9))/0x2*(-parseInt(_0xcb2b8(0xd1))/0x3)+-parseInt(_0xcb2b8(0xdb))/0x4+-parseInt(_0xcb2b8(0xd4))/0x5+-parseInt(_0xcb2b8(0xd0))/0x6+parseInt(_0xcb2b8(0xda))/0x7*(-parseInt(_0xcb2b8(0xd6))/0x8)+-parseInt(_0xcb2b8(0xd3))/0x9*(-parseInt(_0xcb2b8(0xd8))/0xa);if(_0x5d1fe1===_0x2907e1)break;else _0x223c3c['push'](_0x223c3c['shift']());}catch(_0x196f36){_0x223c3c['push'](_0x223c3c['shift']());}}}(a66_0x1253,0xd3022));export const WORKFLOW_FILE_EXTENSION='.dig';export function shouldIncludeInArchive(_0x1fdba1){const _0x40ebc2=a66_0x1df1;if(_0x1fdba1===_0x40ebc2(0xd2))return!![];if(_0x1fdba1[_0x40ebc2(0xd7)]('.'))return![];return!![];}
|