@treasuredata/tdx 0.1.10 → 0.1.12
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.d.ts +0 -6
- package/dist/core/auth.d.ts.map +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/auth.js.map +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/types/endpoints.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a45_0x1ff9(_0x20ad10,_0x5c2bcf){const _0x43c15b=a45_0x43c1();return a45_0x1ff9=function(_0x1ff930,_0x2510e1){_0x1ff930=_0x1ff930-0x15e;let _0x2740f3=_0x43c15b[_0x1ff930];return _0x2740f3;},a45_0x1ff9(_0x20ad10,_0x5c2bcf);}const a45_0x4ffd93=a45_0x1ff9;(function(_0xb60a88,_0x3d9427){const _0xbb4ba2=a45_0x1ff9,_0x5454ae=_0xb60a88();while(!![]){try{const _0xc4d9a6=-parseInt(_0xbb4ba2(0x175))/0x1+-parseInt(_0xbb4ba2(0x16b))/0x2*(-parseInt(_0xbb4ba2(0x184))/0x3)+-parseInt(_0xbb4ba2(0x188))/0x4*(parseInt(_0xbb4ba2(0x189))/0x5)+parseInt(_0xbb4ba2(0x17f))/0x6*(parseInt(_0xbb4ba2(0x182))/0x7)+-parseInt(_0xbb4ba2(0x18b))/0x8*(parseInt(_0xbb4ba2(0x186))/0x9)+-parseInt(_0xbb4ba2(0x15e))/0xa+parseInt(_0xbb4ba2(0x170))/0xb;if(_0xc4d9a6===_0x3d9427)break;else _0x5454ae['push'](_0x5454ae['shift']());}catch(_0x137e5b){_0x5454ae['push'](_0x5454ae['shift']());}}}(a45_0x43c1,0xa403f));export const TD_ENDPOINTS={'us01':a45_0x4ffd93(0x181),'jp01':a45_0x4ffd93(0x185),'eu01':a45_0x4ffd93(0x15f),'ap02':'https://api.ap02.treasuredata.com','ap03':a45_0x4ffd93(0x16e),'dev-us01':a45_0x4ffd93(0x176),'dev-eu01':a45_0x4ffd93(0x160),'stg-us01':'https://api-staging.us01.treasuredata.com','stg-jp01':'https://api-staging.treasuredata.co.jp','stg-ap03':a45_0x4ffd93(0x167)};function a45_0x43c1(){const _0xd21f54=['https://api.eu01.treasuredata.com','https://api-development.eu01.treasuredata.com','https://llm-api-development.eu01.treasuredata.com','https://api-presto.treasuredata.co.jp','https://api-cdp.ap03.treasuredata.com','https://api-workflow.eu01.treasuredata.com','No\x20endpoint\x20defined\x20for\x20API\x20type\x20\x27','https://api-cdp.eu01.treasuredata.com','https://api-staging.ap03.treasuredata.com','https://api-workflow.treasuredata.co.jp','https://api-presto.ap03.treasuredata.com','https://llm-api-staging.treasuredata.co.jp','2MTpqYx','https://api-staging-workflow.treasuredata.co.jp','https://api-development-presto.treasuredata.com','https://api.ap03.treasuredata.com','https://api-staging-workflow.us01.treasuredata.com','11131208dDJEte','https://api-workflow.ap03.treasuredata.com','https://api-development-presto.eu01.treasuredata.com','https://api-staging-presto.ap03.treasuredata.com','https://llm-api.treasuredata.co.jp','927046yDMBFm','https://api-development.us01.treasuredata.com','https://llm-api-staging.us01.treasuredata.com','https://llm-api.ap03.treasuredata.com','https://api-workflow.ap02.treasuredata.com','https://api-staging-presto.treasuredata.co.jp','\x27\x20and\x20site\x20\x27','https://api-cdp.ap02.treasuredata.com','https://api-development-cdp.us01.treasuredata.com','https://api-staging-cdp.us01.treasuredata.com','3995736ZocAvh','https://api-presto.ap02.treasuredata.com','https://api.treasuredata.com','14yHXbOb','https://api-staging-presto.treasuredata.com','3085374ZImoMK','https://api.treasuredata.co.jp','9obEYFp','https://api-cdp.treasuredata.co.jp','12cfCwsO','1220025CyBalY','https://api-staging-workflow.ap03.treasuredata.com','247768IAvJFB','https://llm-api-staging.ap03.treasuredata.com','https://api-development-workflow.us01.treasuredata.com','https://api-presto.treasuredata.com','https://api-workflow.treasuredata.com','10104590BCDvTL'];a45_0x43c1=function(){return _0xd21f54;};return a45_0x43c1();}export const CDP_ENDPOINTS={'us01':'https://api-cdp.treasuredata.com','jp01':a45_0x4ffd93(0x187),'eu01':a45_0x4ffd93(0x166),'ap02':a45_0x4ffd93(0x17c),'ap03':a45_0x4ffd93(0x163),'dev-us01':a45_0x4ffd93(0x17d),'dev-eu01':'https://api-development-cdp.eu01.treasuredata.com','stg-us01':a45_0x4ffd93(0x17e),'stg-jp01':'https://api-staging-cdp.treasuredata.co.jp','stg-ap03':'https://api-staging-cdp.ap03.treasuredata.com'};export const WORKFLOW_ENDPOINTS={'us01':a45_0x4ffd93(0x18f),'jp01':a45_0x4ffd93(0x168),'eu01':a45_0x4ffd93(0x164),'ap02':a45_0x4ffd93(0x179),'ap03':a45_0x4ffd93(0x171),'dev-us01':a45_0x4ffd93(0x18d),'dev-eu01':'https://api-development-workflow.eu01.treasuredata.com','stg-us01':a45_0x4ffd93(0x16f),'stg-jp01':a45_0x4ffd93(0x16c),'stg-ap03':a45_0x4ffd93(0x18a)};export const TRINO_ENDPOINTS={'us01':a45_0x4ffd93(0x18e),'jp01':a45_0x4ffd93(0x162),'eu01':'https://api-presto.eu01.treasuredata.com','ap02':a45_0x4ffd93(0x180),'ap03':a45_0x4ffd93(0x169),'dev-us01':a45_0x4ffd93(0x16d),'dev-eu01':a45_0x4ffd93(0x172),'stg-us01':a45_0x4ffd93(0x183),'stg-jp01':a45_0x4ffd93(0x17a),'stg-ap03':a45_0x4ffd93(0x173)};export const LLM_ENDPOINTS={'us01':'https://llm-api.treasuredata.com','jp01':a45_0x4ffd93(0x174),'eu01':'https://llm-api.eu01.treasuredata.com','ap02':'https://llm-api.ap02.treasuredata.com','ap03':a45_0x4ffd93(0x178),'dev-us01':'https://llm-api-development.us01.treasuredata.com','dev-eu01':a45_0x4ffd93(0x161),'stg-us01':a45_0x4ffd93(0x177),'stg-jp01':a45_0x4ffd93(0x16a),'stg-ap03':a45_0x4ffd93(0x18c)};export const API_ENDPOINTS={'td':TD_ENDPOINTS,'cdp':CDP_ENDPOINTS,'workflow':WORKFLOW_ENDPOINTS,'trino':TRINO_ENDPOINTS,'llm':LLM_ENDPOINTS};export function getEndpoint(_0x46ae0b,_0x40799f='td'){const _0x39f981=a45_0x4ffd93,_0x1f0821=API_ENDPOINTS[_0x40799f]?.[_0x46ae0b];if(!_0x1f0821)throw new Error(_0x39f981(0x165)+_0x40799f+_0x39f981(0x17b)+_0x46ae0b+'\x27');return _0x1f0821;}
|
package/dist/types/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a46_0x191bf9=a46_0x7e8e;function a46_0x1388(){const _0x4a5c2b=['1053650DIJgPw','472129jrvpOn','4shgClx','802533nUYJCw','stg-us01','16748XQJVwU','18OdnKdm','dev-us01','1570YzfdHN','jp01','5CmKBgd','46270917qdeVSz','1467EIKCeD','12836016oFoEDP'];a46_0x1388=function(){return _0x4a5c2b;};return a46_0x1388();}function a46_0x7e8e(_0x55a981,_0x335367){const _0x1388a0=a46_0x1388();return a46_0x7e8e=function(_0x7e8e1b,_0x2879d8){_0x7e8e1b=_0x7e8e1b-0x82;let _0x2f91c4=_0x1388a0[_0x7e8e1b];return _0x2f91c4;},a46_0x7e8e(_0x55a981,_0x335367);}(function(_0x4f715e,_0x3b42d7){const _0x5b6675=a46_0x7e8e,_0x5e7db6=_0x4f715e();while(!![]){try{const _0x3ce964=-parseInt(_0x5b6675(0x89))/0x1+-parseInt(_0x5b6675(0x8b))/0x2*(parseInt(_0x5b6675(0x8c))/0x3)+parseInt(_0x5b6675(0x8e))/0x4*(-parseInt(_0x5b6675(0x85))/0x5)+parseInt(_0x5b6675(0x8f))/0x6*(-parseInt(_0x5b6675(0x8a))/0x7)+-parseInt(_0x5b6675(0x88))/0x8+parseInt(_0x5b6675(0x87))/0x9*(parseInt(_0x5b6675(0x83))/0xa)+parseInt(_0x5b6675(0x86))/0xb;if(_0x3ce964===_0x3b42d7)break;else _0x5e7db6['push'](_0x5e7db6['shift']());}catch(_0x3978dd){_0x5e7db6['push'](_0x5e7db6['shift']());}}}(a46_0x1388,0xcb350));export const SITE_ALIASES={'us':'us01','aws':'us01','jp':a46_0x191bf9(0x84),'aws-tokyo':'jp01','dev':a46_0x191bf9(0x82),'stg':a46_0x191bf9(0x8d)};export{getEndpoint,API_ENDPOINTS}from'./endpoints.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a49_0x2318(){const _0x90a414=['139fZosyH','620hNbvvl','6Xscezu','9426664QRCCMC','Project\x20name\x20cannot\x20be\x20empty','length','92790oTQaho','split','21859827JYWmUK','614TTyVCp','.\x20Expected\x20\x22project_name\x22\x20or\x20\x22project_name/agent_name\x22','80340hgxBHT','201364hNYekv','trim','14dUDeTX','Invalid\x20agent\x20reference\x20format:\x20','2650062AXLtjw'];a49_0x2318=function(){return _0x90a414;};return a49_0x2318();}function a49_0x580f(_0x42e4ee,_0x7a711){const _0x231804=a49_0x2318();return a49_0x580f=function(_0x580f1a,_0x2c2cf6){_0x580f1a=_0x580f1a-0xca;let _0x2789ee=_0x231804[_0x580f1a];return _0x2789ee;},a49_0x580f(_0x42e4ee,_0x7a711);}(function(_0x255016,_0x3e3833){const _0x85d891=a49_0x580f,_0xe20968=_0x255016();while(!![]){try{const _0x289fda=-parseInt(_0x85d891(0xd3))/0x1*(parseInt(_0x85d891(0xcb))/0x2)+-parseInt(_0x85d891(0xd5))/0x3*(-parseInt(_0x85d891(0xce))/0x4)+parseInt(_0x85d891(0xcd))/0x5+-parseInt(_0x85d891(0xd2))/0x6*(parseInt(_0x85d891(0xd0))/0x7)+-parseInt(_0x85d891(0xd6))/0x8+parseInt(_0x85d891(0xd9))/0x9*(parseInt(_0x85d891(0xd4))/0xa)+parseInt(_0x85d891(0xca))/0xb;if(_0x289fda===_0x3e3833)break;else _0xe20968['push'](_0xe20968['shift']());}catch(_0x26e1ea){_0xe20968['push'](_0xe20968['shift']());}}}(a49_0x2318,0x9bf93));export function parseAgentRef(_0x6fcf9a){const _0x2b2f38=a49_0x580f;if(!_0x6fcf9a||_0x6fcf9a[_0x2b2f38(0xcf)]()==='')throw new Error('Agent\x20reference\x20cannot\x20be\x20empty');const _0x4b358b=_0x6fcf9a[_0x2b2f38(0xcf)](),_0x4ec67e=_0x4b358b[_0x2b2f38(0xda)]('/');if(_0x4ec67e[_0x2b2f38(0xd8)]===0x1)return{'projectName':_0x4ec67e[0x0],'agentName':undefined};else{if(_0x4ec67e[_0x2b2f38(0xd8)]===0x2){const [_0x251cd4,_0x1bda47]=_0x4ec67e;if(!_0x251cd4||_0x251cd4[_0x2b2f38(0xcf)]()==='')throw new Error(_0x2b2f38(0xd7));if(!_0x1bda47||_0x1bda47['trim']()==='')throw new Error('Agent\x20name\x20cannot\x20be\x20empty');return{'projectName':_0x251cd4['trim'](),'agentName':_0x1bda47[_0x2b2f38(0xcf)]()};}else throw new Error(_0x2b2f38(0xd1)+_0x6fcf9a+_0x2b2f38(0xcc));}}
|
package/dist/utils/chat-cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a50_0x165c(_0x322732,_0x1c5200){const _0x216f56=a50_0x216f();return a50_0x165c=function(_0x165cb6,_0x2b92b3){_0x165cb6=_0x165cb6-0x1c8;let _0x3e5011=_0x216f56[_0x165cb6];return _0x3e5011;},a50_0x165c(_0x322732,_0x1c5200);}(function(_0x357b2c,_0x46631c){const _0x51ae4f=a50_0x165c,_0x4b8562=_0x357b2c();while(!![]){try{const _0x163b80=-parseInt(_0x51ae4f(0x1cd))/0x1+parseInt(_0x51ae4f(0x1cf))/0x2*(-parseInt(_0x51ae4f(0x1c9))/0x3)+parseInt(_0x51ae4f(0x1cc))/0x4*(-parseInt(_0x51ae4f(0x1cb))/0x5)+parseInt(_0x51ae4f(0x1d4))/0x6+-parseInt(_0x51ae4f(0x1d0))/0x7*(-parseInt(_0x51ae4f(0x1d7))/0x8)+parseInt(_0x51ae4f(0x1c8))/0x9*(parseInt(_0x51ae4f(0x1d2))/0xa)+parseInt(_0x51ae4f(0x1ce))/0xb;if(_0x163b80===_0x46631c)break;else _0x4b8562['push'](_0x4b8562['shift']());}catch(_0xf69b02){_0x4b8562['push'](_0x4b8562['shift']());}}}(a50_0x216f,0xa8dfb));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';import{join}from'path';function getCacheDir(){const _0x18564d=a50_0x165c;return join(process['cwd'](),_0x18564d(0x1ca),_0x18564d(0x1d5));}function getLastChatIdPath(){const _0x3426fd=a50_0x165c;return join(getCacheDir(),_0x3426fd(0x1d1));}function ensureCacheDir(){const _0x2e8b1c=getCacheDir();!existsSync(_0x2e8b1c)&&mkdirSync(_0x2e8b1c,{'recursive':!![]});}function a50_0x216f(){const _0x5a5afc=['6041892GsPJNE','tdx','utf-8','24MKIwFY','5465682XrfaDG','3bgQTaD','.cache','5wuiUYo','3310736PVXDnG','1239026dAcmJQ','13166274yAqghf','2572036dlCAbi','1460487xNfeZC','last_chat_id','20ffgNdz','trim'];a50_0x216f=function(){return _0x5a5afc;};return a50_0x216f();}export function saveLastChatId(_0x5f351d){const _0x5f1c81=a50_0x165c;ensureCacheDir();const _0xfcf840=getLastChatIdPath();writeFileSync(_0xfcf840,_0x5f351d,_0x5f1c81(0x1d6));}export function loadLastChatId(){const _0x21b47a=a50_0x165c,_0x5a016e=getLastChatIdPath();if(!existsSync(_0x5a016e))return undefined;try{const _0xc40815=readFileSync(_0x5a016e,_0x21b47a(0x1d6))[_0x21b47a(0x1d3)]();return _0xc40815||undefined;}catch{return undefined;}}export function clearLastChatId(){const _0x47e764=a50_0x165c,_0x1a0cd0=getLastChatIdPath();if(existsSync(_0x1a0cd0))try{writeFileSync(_0x1a0cd0,'',_0x47e764(0x1d6));}catch{}}
|
package/dist/utils/colors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a51_0x2f0e(){const _0x4f48e9=['stringify','entries','cyan','boolean','green','object','95208AAQCfO','string','42oXTcVm','join','repeat','916065piBhCl','length','isTTY','noColor','number','416708sKgXLn','3662690FJguVg','NO_COLOR','yellow','null','8pnHbAC','dim','color','blue','191085ZrOtGp','8932800mfopXo','44dfNSMb','map','841830ZtlMNw'];a51_0x2f0e=function(){return _0x4f48e9;};return a51_0x2f0e();}(function(_0x504a64,_0x5d9108){const _0x313b79=a51_0x4187,_0x69e5e2=_0x504a64();while(!![]){try{const _0x40397f=parseInt(_0x313b79(0xf5))/0x1+-parseInt(_0x313b79(0x102))/0x2+parseInt(_0x313b79(0xfe))/0x3*(parseInt(_0x313b79(0x100))/0x4)+parseInt(_0x313b79(0xf6))/0x5+parseInt(_0x313b79(0xeb))/0x6*(-parseInt(_0x313b79(0xed))/0x7)+-parseInt(_0x313b79(0xfa))/0x8*(-parseInt(_0x313b79(0xf0))/0x9)+-parseInt(_0x313b79(0xff))/0xa;if(_0x40397f===_0x5d9108)break;else _0x69e5e2['push'](_0x69e5e2['shift']());}catch(_0x508d4e){_0x69e5e2['push'](_0x69e5e2['shift']());}}}(a51_0x2f0e,0x84641));import{Chalk}from'chalk';export function shouldUseColor(_0x5cf349={}){const _0x1cd654=a51_0x4187;if(_0x5cf349[_0x1cd654(0xf3)]===!![])return![];if(_0x5cf349[_0x1cd654(0xfc)]===!![])return!![];if(process['env'][_0x1cd654(0xf7)]!==undefined)return![];return process['stdout'][_0x1cd654(0xf2)]??![];}function getChalk(_0x2dfbb5={}){if(shouldUseColor(_0x2dfbb5))return new Chalk({'level':0x3});return new Chalk({'level':0x0});}export function colorBorder(_0x4cc1c5,_0x1a968c={}){const _0x1abb24=a51_0x4187;return getChalk(_0x1a968c)[_0x1abb24(0xfb)](_0x4cc1c5);}export function colorHeader(_0x375e92,_0x4faac8={}){const _0x76255=a51_0x4187;return getChalk(_0x4faac8)[_0x76255(0x105)](_0x375e92);}export function colorType(_0x73d9af,_0x4cac99={}){const _0x5b7ae0=a51_0x4187;return getChalk(_0x4cac99)[_0x5b7ae0(0xfb)](_0x73d9af);}function a51_0x4187(_0x23a45d,_0x581492){const _0x2f0e79=a51_0x2f0e();return a51_0x4187=function(_0x418700,_0x434392){_0x418700=_0x418700-0xe9;let _0x908652=_0x2f0e79[_0x418700];return _0x908652;},a51_0x4187(_0x23a45d,_0x581492);}export function colorJSONKey(_0xffb879,_0x366eea={}){const _0x36a64c=a51_0x4187;return getChalk(_0x366eea)[_0x36a64c(0xfd)](_0xffb879);}export function colorJSONString(_0x360537,_0x3eca05={}){const _0x3bb4fd=a51_0x4187;return getChalk(_0x3eca05)[_0x3bb4fd(0xe9)](_0x360537);}export function colorJSONNumber(_0xc7ae65,_0x35878b={}){return getChalk(_0x35878b)['cyan'](_0xc7ae65);}export function colorJSONBoolean(_0xb22ace,_0x4e0a1f={}){const _0x5b7397=a51_0x4187;return getChalk(_0x4e0a1f)[_0x5b7397(0xf8)](_0xb22ace);}export function colorJSONNull(_0x2c70c2,_0x215be3={}){const _0x260bf9=a51_0x4187;return getChalk(_0x215be3)[_0x260bf9(0xfb)](_0x2c70c2);}export function colorizeJSONCompact(_0x298364,_0x3ff0e5={}){const _0x5cf5ee=a51_0x4187;if(!shouldUseColor(_0x3ff0e5))return JSON[_0x5cf5ee(0x103)](_0x298364);if(_0x298364===null)return colorJSONNull(_0x5cf5ee(0xf9),_0x3ff0e5);if(typeof _0x298364==='boolean')return colorJSONBoolean(String(_0x298364),_0x3ff0e5);if(typeof _0x298364===_0x5cf5ee(0xf4))return colorJSONNumber(String(_0x298364),_0x3ff0e5);if(typeof _0x298364===_0x5cf5ee(0xec))return colorJSONString(JSON[_0x5cf5ee(0x103)](_0x298364),_0x3ff0e5);if(Array['isArray'](_0x298364)){if(_0x298364[_0x5cf5ee(0xf1)]===0x0)return'[]';const _0x20e083=_0x298364[_0x5cf5ee(0x101)](_0x4592a1=>colorizeJSONCompact(_0x4592a1,_0x3ff0e5));return'['+_0x20e083['join'](',')+']';}if(typeof _0x298364===_0x5cf5ee(0xea)){const _0x1fb7be=Object[_0x5cf5ee(0x104)](_0x298364);if(_0x1fb7be[_0x5cf5ee(0xf1)]===0x0)return'{}';const _0x5a2be0=_0x1fb7be[_0x5cf5ee(0x101)](([_0x26404f,_0x200141])=>{const _0x25a2ec=_0x5cf5ee,_0x4d2ac9=colorJSONKey(JSON[_0x25a2ec(0x103)](_0x26404f),_0x3ff0e5),_0x3fdc00=colorizeJSONCompact(_0x200141,_0x3ff0e5);return _0x4d2ac9+':'+_0x3fdc00;});return'{'+_0x5a2be0[_0x5cf5ee(0xee)](',')+'}';}return String(_0x298364);}export function colorizeJSON(_0x3e5259,_0xc0bc67={},_0x2edf34=0x0){const _0x430892=a51_0x4187;if(!shouldUseColor(_0xc0bc67))return JSON['stringify'](_0x3e5259,null,0x2);const _0x4181d1='\x20'[_0x430892(0xef)](_0x2edf34),_0x3701c4=_0x2edf34+0x2;if(_0x3e5259===null)return colorJSONNull(_0x430892(0xf9),_0xc0bc67);if(typeof _0x3e5259===_0x430892(0x106))return colorJSONBoolean(String(_0x3e5259),_0xc0bc67);if(typeof _0x3e5259===_0x430892(0xf4))return colorJSONNumber(String(_0x3e5259),_0xc0bc67);if(typeof _0x3e5259===_0x430892(0xec))return colorJSONString(JSON[_0x430892(0x103)](_0x3e5259),_0xc0bc67);if(Array['isArray'](_0x3e5259)){if(_0x3e5259[_0x430892(0xf1)]===0x0)return'[]';const _0x1abad3=_0x3e5259['map'](_0x48e88e=>{const _0x49465b=_0x430892,_0x3f91b6=colorizeJSON(_0x48e88e,_0xc0bc67,_0x3701c4);return''+'\x20'[_0x49465b(0xef)](_0x3701c4)+_0x3f91b6;});return'[\x0a'+_0x1abad3[_0x430892(0xee)](',\x0a')+('\x0a'+_0x4181d1+']');}if(typeof _0x3e5259===_0x430892(0xea)){const _0x1fc492=Object['entries'](_0x3e5259);if(_0x1fc492[_0x430892(0xf1)]===0x0)return'{}';const _0x415cdd=_0x1fc492[_0x430892(0x101)](([_0x5d3a0e,_0x3f6a5d])=>{const _0x4114fb=_0x430892,_0x4be673=colorJSONKey(JSON['stringify'](_0x5d3a0e),_0xc0bc67),_0xfc0b4f=colorizeJSON(_0x3f6a5d,_0xc0bc67,_0x3701c4);return''+'\x20'[_0x4114fb(0xef)](_0x3701c4)+_0x4be673+':\x20'+_0xfc0b4f;});return'{\x0a'+_0x415cdd['join'](',\x0a')+('\x0a'+_0x4181d1+'}');}return String(_0x3e5259);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4ac102,_0x23bef2){const _0x22c492=a52_0x49a3,_0x32d9f5=_0x4ac102();while(!![]){try{const _0xc29cca=parseInt(_0x22c492(0xcc))/0x1*(-parseInt(_0x22c492(0xcd))/0x2)+parseInt(_0x22c492(0xe1))/0x3*(parseInt(_0x22c492(0xd4))/0x4)+-parseInt(_0x22c492(0xc8))/0x5*(-parseInt(_0x22c492(0xe6))/0x6)+-parseInt(_0x22c492(0xed))/0x7+parseInt(_0x22c492(0xe9))/0x8*(parseInt(_0x22c492(0xc7))/0x9)+parseInt(_0x22c492(0xda))/0xa+-parseInt(_0x22c492(0xec))/0xb*(-parseInt(_0x22c492(0xc6))/0xc);if(_0xc29cca===_0x23bef2)break;else _0x32d9f5['push'](_0x32d9f5['shift']());}catch(_0x5a90b7){_0x32d9f5['push'](_0x32d9f5['shift']());}}}(a52_0x3aca,0xf1721));function a52_0x49a3(_0x52c199,_0x523836){const _0x3aca75=a52_0x3aca();return a52_0x49a3=function(_0x49a34c,_0x1472db){_0x49a34c=_0x49a34c-0xc6;let _0x49cde4=_0x3aca75[_0x49a34c];return _0x49cde4;},a52_0x49a3(_0x52c199,_0x523836);}import{writeFileSync}from'fs';import{spawn}from'child_process';import{resolveOutputFormat}from'./format-detector.js';export function parseOutputOptions(_0x2cc5d6){const _0x529c76=a52_0x49a3;return{'format':_0x2cc5d6[_0x529c76(0xc9)]||_0x529c76(0xcb),'output':_0x2cc5d6[_0x529c76(0xea)]||'','limit':_0x2cc5d6[_0x529c76(0xe5)],'color':_0x2cc5d6['color'],'noColor':_0x2cc5d6['noColor']};}function convertSDKResultToQueryResult(_0x58ffd3){const _0x5728ed=a52_0x49a3,_0x277207=[];if(_0x58ffd3[_0x5728ed(0xde)]>0x0){const _0x340c48=_0x58ffd3[0x0];for(const [_0x5904f7,_0x1df9d7]of Object[_0x5728ed(0xe0)](_0x340c48)){let _0x5168ac=_0x5728ed(0xd8);if(typeof _0x1df9d7===_0x5728ed(0xe2))_0x5168ac=Number[_0x5728ed(0xdd)](_0x1df9d7)?_0x5728ed(0xe3):'double';else{if(typeof _0x1df9d7===_0x5728ed(0xe4))_0x5168ac=_0x5728ed(0xe4);else _0x1df9d7===null&&(_0x5168ac=_0x5728ed(0xd8));}_0x277207['push']({'name':_0x5904f7,'type':_0x5168ac});}}return{'queryId':_0x5728ed(0xd6),'columns':_0x277207,'data':_0x58ffd3,'stats':{'state':_0x5728ed(0xdc),'queued':![],'scheduled':!![],'nodes':0x0,'totalSplits':0x0,'queuedSplits':0x0,'runningSplits':0x0,'completedSplits':0x0,'cpuTimeMillis':0x0,'wallTimeMillis':0x0,'queuedTimeMillis':0x0,'elapsedTimeMillis':0x0,'processedRows':_0x58ffd3[_0x5728ed(0xde)],'processedBytes':0x0,'physicalInputBytes':0x0,'peakMemoryBytes':0x0,'spilledBytes':0x0}};}export async function formatSDKOutput(_0x3a2122,_0x579423){const _0x47cdb0=convertSDKResultToQueryResult(_0x3a2122);return formatQueryOutput(_0x47cdb0,_0x579423);}export async function formatQueryOutput(_0x2da8c4,_0x1b9805){const _0x348ecb=a52_0x49a3,{format:_0x5dd302,limit:_0x3e660d,output:_0x156fa6,color:_0x5b393c,noColor:_0x307278}=_0x1b9805,_0x35ceec=Boolean(_0x156fa6)&&!_0x5b393c,_0xa9a613={'color':_0x5b393c,'noColor':_0x307278||_0x35ceec};if(_0x5dd302===_0x348ecb(0xcb)){const {formatAsTable:_0x17dd4a}=await import(_0x348ecb(0xd5)),_0x2adaf1=shouldUseLess(_0x5dd302,_0x156fa6);return _0x17dd4a(_0x2da8c4,_0x3e660d,_0x2adaf1,_0xa9a613);}else{if(_0x5dd302==='json'){const {formatAsJSON:_0x5b620b}=await import(_0x348ecb(0xd5));return _0x5b620b(_0x2da8c4,_0xa9a613);}else{if(_0x5dd302===_0x348ecb(0xd1)){const {formatAsJSONL:_0x10c1df}=await import(_0x348ecb(0xd5));return _0x10c1df(_0x2da8c4,_0xa9a613);}else{const {formatQueryResult:_0x5166ec}=await import('./formatters.js');return _0x5166ec(_0x2da8c4,_0x5dd302);}}}}function shouldUseLess(_0x2f0c6d,_0x54d0bb){const _0x5022bc=a52_0x49a3;return _0x2f0c6d===_0x5022bc(0xcb)&&process[_0x5022bc(0xd9)][_0x5022bc(0xca)]&&!_0x54d0bb;}export function resolveOutputOptions(_0x391664){const _0x551604=a52_0x49a3,_0x5c4f86=resolveOutputFormat(_0x391664[_0x551604(0xc9)],_0x391664[_0x551604(0xea)],_0x551604(0xcb));let _0x4bc0e7=typeof _0x391664[_0x551604(0xe5)]===_0x551604(0xe2)?_0x391664['limit']:parseInt(_0x391664['limit']||'40',0xa);const _0x4be202=_0x391664[_0x551604(0xea)]||'';return shouldUseLess(_0x5c4f86,_0x4be202)&&(_0x4bc0e7=Infinity),{'format':_0x5c4f86,'output':_0x4be202,'limit':_0x4bc0e7,'color':_0x391664[_0x551604(0xd7)],'noColor':_0x391664[_0x551604(0xce)]};}export function writeOutput(_0x25da8e,_0x2b329c,_0x2429ee){const _0x4b426a=a52_0x49a3;return _0x2b329c?(writeFileSync(_0x2b329c,_0x25da8e),console['error']('Results\x20saved\x20to\x20'+_0x2b329c),Promise[_0x4b426a(0xe8)]()):shouldUseLess(_0x2429ee||'','')?new Promise(_0x2ada9e=>{const _0x178b52=_0x4b426a,_0x15666b=spawn('less',[_0x178b52(0xdf)],{'stdio':[_0x178b52(0xd0),_0x178b52(0xeb),_0x178b52(0xeb)]});let _0x3f839e=![];_0x15666b['on'](_0x178b52(0xdb),()=>{const _0x5dcb81=_0x178b52;!_0x3f839e&&(_0x3f839e=!![],console[_0x5dcb81(0xcf)](_0x25da8e),_0x2ada9e());}),_0x15666b['on']('close',()=>{!_0x3f839e&&(_0x3f839e=!![],_0x2ada9e());}),_0x15666b['on']('spawn',()=>{const _0x46f4af=_0x178b52;!_0x3f839e&&_0x15666b['stdin']&&(_0x15666b[_0x46f4af(0xd3)]['on'](_0x46f4af(0xdb),()=>{}),_0x15666b[_0x46f4af(0xd3)][_0x46f4af(0xd2)](_0x25da8e),_0x15666b[_0x46f4af(0xd3)][_0x46f4af(0xe7)]());}),!_0x15666b[_0x178b52(0xd3)]&&(!_0x3f839e&&(_0x3f839e=!![],console[_0x178b52(0xcf)](_0x25da8e),_0x2ada9e()));}):(console[_0x4b426a(0xcf)](_0x25da8e),Promise['resolve']());}function a52_0x3aca(){const _0x551b18=['276111kwYSxt','7938070wKHegz','396XkRCaN','3286863KVqsws','6069265LIKHpM','format','isTTY','table','1528361zzsCSP','2hKxjEo','noColor','log','pipe','jsonl','write','stdin','12136yVIdme','./formatters.js','sdk-result','color','varchar','stdout','11650550awWZAe','error','FINISHED','isInteger','length','-FXRSn','entries','78GeqbqS','number','bigint','boolean','limit','6ZDWnxQ','end','resolve','8qGqWFJ','output','inherit'];a52_0x3aca=function(){return _0x551b18;};return a52_0x3aca();}export async function handleSDKOutput(_0x17e602,_0x28cdc3){const _0x1ffe4d=a52_0x49a3,_0x217f1a=resolveOutputOptions(_0x28cdc3),_0x9468df=await formatSDKOutput(_0x17e602,_0x217f1a);await writeOutput(_0x9468df,_0x217f1a[_0x1ffe4d(0xea)]||undefined,_0x217f1a[_0x1ffe4d(0xc9)]);}export async function handleQueryOutput(_0x7cf51b,_0x1b1cbd){const _0x2c07c8=a52_0x49a3,_0x4bae9d=resolveOutputOptions(_0x1b1cbd),_0x8e0e4d=await formatQueryOutput(_0x7cf51b,_0x4bae9d);await writeOutput(_0x8e0e4d,_0x4bae9d[_0x2c07c8(0xea)]||undefined,_0x4bae9d[_0x2c07c8(0xc9)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x19a86e,_0x25531f){const _0x18f935=a53_0x4ed1,_0x224805=_0x19a86e();while(!![]){try{const _0x30b1d1=-parseInt(_0x18f935(0xea))/0x1+parseInt(_0x18f935(0xf0))/0x2+parseInt(_0x18f935(0xf5))/0x3+parseInt(_0x18f935(0xf1))/0x4+parseInt(_0x18f935(0xe8))/0x5*(parseInt(_0x18f935(0xeb))/0x6)+-parseInt(_0x18f935(0xf2))/0x7+parseInt(_0x18f935(0xf6))/0x8*(-parseInt(_0x18f935(0xec))/0x9);if(_0x30b1d1===_0x25531f)break;else _0x224805['push'](_0x224805['shift']());}catch(_0x4a395a){_0x224805['push'](_0x224805['shift']());}}}(a53_0x2352,0x2878f));function a53_0x4ed1(_0x53ec1b,_0xb89668){const _0x235298=a53_0x2352();return a53_0x4ed1=function(_0x4ed136,_0x18c251){_0x4ed136=_0x4ed136-0xe7;let _0x21e352=_0x235298[_0x4ed136];return _0x21e352;},a53_0x4ed1(_0x53ec1b,_0xb89668);}import*as a53_0x1db0c8 from'node:fs';import*as a53_0x2fe16b from'node:path';function a53_0x2352(){const _0x4bbbaf=['601428jLaHDi','1707416sPvkou','dirname','Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20','chmodSync','924115RyVLWD','warn','268197ffEXFI','6scqSKk','9CdMYCT','mkdirSync','Should\x20be\x200600\x20or\x20more\x20restrictive.','\x20has\x20insecure\x20permissions\x20(','491754zbmmzT','319552EBFHhy','445655KpobJD',').\x20','mode'];a53_0x2352=function(){return _0x4bbbaf;};return a53_0x2352();}export function setSecureFilePermissions(_0x434b8f){const _0x1285be=a53_0x4ed1;try{a53_0x1db0c8[_0x1285be(0xe7)](_0x434b8f,0x180);}catch{console['warn'](_0x1285be(0xf8)+_0x434b8f);}}export function setSecureDirectoryPermissions(_0x493f0b){const _0x405d84=a53_0x4ed1;try{a53_0x1db0c8[_0x405d84(0xe7)](_0x493f0b,0x1c0);}catch{console['warn'](_0x405d84(0xf8)+_0x493f0b);}}export function createSecureDirectory(_0x1598dd){const _0x22ba17=a53_0x4ed1;!a53_0x1db0c8['existsSync'](_0x1598dd)&&(a53_0x1db0c8[_0x22ba17(0xed)](_0x1598dd,{'recursive':!![],'mode':0x1c0}),setSecureDirectoryPermissions(_0x1598dd));}export function validateSecureFilePermissions(_0x2cff0e){const _0x3fd88f=a53_0x4ed1;try{const _0x58c933=a53_0x1db0c8['statSync'](_0x2cff0e),_0x3c30f4=_0x58c933[_0x3fd88f(0xf4)]&0x1ff,_0x96d2bc=(_0x3c30f4&0x3f)!==0x0;if(_0x96d2bc)return console[_0x3fd88f(0xe9)]('Warning:\x20'+_0x2cff0e+_0x3fd88f(0xef)+_0x3c30f4['toString'](0x8)+_0x3fd88f(0xf3)+_0x3fd88f(0xee)),![];return!![];}catch{return!![];}}export function writeSecureFile(_0x536f1a,_0x15467e){const _0x16f116=a53_0x4ed1,_0x208bb2=a53_0x2fe16b[_0x16f116(0xf7)](_0x536f1a);createSecureDirectory(_0x208bb2),a53_0x1db0c8['writeFileSync'](_0x536f1a,_0x15467e,{'mode':0x180}),setSecureFilePermissions(_0x536f1a);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x28475b,_0xb0f1d6){const _0x5d6d69=a54_0x85a4,_0x43ffd=_0x28475b();while(!![]){try{const _0x1ba104=-parseInt(_0x5d6d69(0x1b6))/0x1*(-parseInt(_0x5d6d69(0x1b7))/0x2)+parseInt(_0x5d6d69(0x1af))/0x3*(parseInt(_0x5d6d69(0x1b4))/0x4)+-parseInt(_0x5d6d69(0x1a7))/0x5+-parseInt(_0x5d6d69(0x1ad))/0x6+-parseInt(_0x5d6d69(0x1bb))/0x7*(-parseInt(_0x5d6d69(0x1b8))/0x8)+-parseInt(_0x5d6d69(0x1b1))/0x9+parseInt(_0x5d6d69(0x1b3))/0xa*(parseInt(_0x5d6d69(0x1b0))/0xb);if(_0x1ba104===_0xb0f1d6)break;else _0x43ffd['push'](_0x43ffd['shift']());}catch(_0x614f5b){_0x43ffd['push'](_0x43ffd['shift']());}}}(a54_0x2e95,0xcad58));function a54_0x85a4(_0x14cd85,_0x4837c3){const _0x2e953b=a54_0x2e95();return a54_0x85a4=function(_0x85a4cd,_0x496853){_0x85a4cd=_0x85a4cd-0x1a7;let _0x129023=_0x2e953b[_0x85a4cd];return _0x129023;},a54_0x85a4(_0x14cd85,_0x4837c3);}function a54_0x2e95(){const _0x20167f=['5831706oltWjG','txt','19815tRAgxp','3715118AAPlKu','12618882KhhVLo','json','30vhDjBf','676PUVBdN','text','2NOTzuP','1292102UEVOhm','2454488XBSPQs','toLowerCase','split','7lOAPVe','2617575MjKLrK','table','pop','jsonl','tsv','tab'];a54_0x2e95=function(){return _0x20167f;};return a54_0x2e95();}export function detectFormatFromExtension(_0x3c8a74){const _0x5deb5b=a54_0x85a4,_0x18003f=_0x3c8a74[_0x5deb5b(0x1b9)]()[_0x5deb5b(0x1ba)]('.')[_0x5deb5b(0x1a9)]();switch(_0x18003f){case _0x5deb5b(0x1b2):return _0x5deb5b(0x1b2);case _0x5deb5b(0x1aa):return'jsonl';case _0x5deb5b(0x1ab):case _0x5deb5b(0x1ac):return _0x5deb5b(0x1ab);case _0x5deb5b(0x1ae):case _0x5deb5b(0x1b5):return _0x5deb5b(0x1a8);default:return undefined;}}export function resolveOutputFormat(_0x32a697,_0x27b3ca,_0x6c5f99){if(_0x32a697)return _0x32a697;if(_0x27b3ca){const _0x4a7811=detectFormatFromExtension(_0x27b3ca);if(_0x4a7811)return _0x4a7811;}return _0x6c5f99;}
|
package/dist/utils/formatters.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3b57ed,_0x367f52){const _0x634ccf=a55_0x193f,_0x2e7bee=_0x3b57ed();while(!![]){try{const _0x4247ee=-parseInt(_0x634ccf(0x190))/0x1*(-parseInt(_0x634ccf(0x184))/0x2)+parseInt(_0x634ccf(0x18b))/0x3+parseInt(_0x634ccf(0x189))/0x4+-parseInt(_0x634ccf(0x198))/0x5*(-parseInt(_0x634ccf(0x191))/0x6)+parseInt(_0x634ccf(0x186))/0x7+-parseInt(_0x634ccf(0x19f))/0x8+-parseInt(_0x634ccf(0x19d))/0x9;if(_0x4247ee===_0x367f52)break;else _0x2e7bee['push'](_0x2e7bee['shift']());}catch(_0x39d495){_0x2e7bee['push'](_0x2e7bee['shift']());}}}(a55_0x378d,0xee778));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 _0x36b1e0=a55_0x193f;return process[_0x36b1e0(0x17a)][_0x36b1e0(0x178)]||Infinity;}export function formatAsTable(_0x3479bd,_0x2195cb=DEFAULT_MAX_DISPLAY_ROWS,_0x380e1b=![],_0x26c859={}){const _0x401f8f=a55_0x193f;if(_0x3479bd[_0x401f8f(0x17f)]['length']===0x0)return _0x401f8f(0x187);const _0x1c4a96=_0x3479bd[_0x401f8f(0x178)][_0x401f8f(0x17b)](_0x11a344=>_0x11a344[_0x401f8f(0x17c)]),_0x8da36f=_0x3479bd[_0x401f8f(0x178)][_0x401f8f(0x17b)](_0x16a22f=>simplifyType(_0x16a22f[_0x401f8f(0x195)])),_0x5a8109=_0x3479bd['data'][_0x401f8f(0x18e)](0x0,_0x2195cb),_0x51d853=_0x3479bd[_0x401f8f(0x17f)][_0x401f8f(0x188)],_0x3a16fd=_0x51d853>_0x2195cb,_0x366dd4=[],_0x3f0cd6=getTerminalWidth(),_0x344730=_0x3f0cd6!==Infinity,_0x14a139=0x32;let _0x1fc2d9=_0x1c4a96['map']((_0x87c55d,_0x59150a)=>{const _0x2fde4a=_0x401f8f,_0x555e30=stringWidth(_0x8da36f[_0x59150a]),_0x3e7771=Math[_0x2fde4a(0x17e)](..._0x5a8109[_0x2fde4a(0x17b)](_0x47f3db=>{const _0x2a3717=_0x47f3db[_0x87c55d];return stringWidth(formatValue(_0x2a3717));})),_0x28b6ff=Math[_0x2fde4a(0x17e)](stringWidth(_0x87c55d),_0x555e30,_0x3e7771);return _0x380e1b?_0x28b6ff:Math[_0x2fde4a(0x177)](_0x28b6ff,_0x14a139);});if(_0x344730&&!_0x380e1b&&_0x1c4a96[_0x401f8f(0x188)]>0x0){const _0x3ec646=_0x331f5c=>{let _0x26b91b=0x1;for(const _0x349333 of _0x331f5c){_0x26b91b+=_0x349333+0x3;}return _0x26b91b+0x1;};let _0x23825f=_0x3ec646(_0x1fc2d9);if(_0x23825f>_0x3f0cd6){const _0x2fb31e=0x3;for(let _0x379038=_0x1fc2d9[_0x401f8f(0x188)]-0x1;_0x379038>=0x0;_0x379038--){_0x23825f=_0x3ec646(_0x1fc2d9);if(_0x23825f<=_0x3f0cd6)break;const _0x106fac=_0x1fc2d9[_0x379038],_0x573564=_0x23825f-_0x3f0cd6,_0x205b3a=_0x106fac-_0x2fb31e,_0x2ecbc8=Math[_0x401f8f(0x177)](_0x573564,_0x205b3a);_0x2ecbc8>0x0&&(_0x1fc2d9[_0x379038]=_0x106fac-_0x2ecbc8);}}}const _0x4c0888=_0x1c4a96,_0xe83b18=_0x8da36f,_0x4cdc30=_0x1fc2d9,_0x5b95e9=_0x1fc2d9;_0x366dd4['push'](colorBorder('┌'+_0x5b95e9[_0x401f8f(0x17b)](_0x1d8f3f=>'─'['repeat'](_0x1d8f3f+0x2))['join']('┬')+'┐',_0x26c859));const _0x267126=_0x4c0888[_0x401f8f(0x17b)]((_0x17631f,_0x3cc4be)=>centerAlign(_0x17631f,_0x4cdc30[_0x3cc4be]));_0x366dd4['push'](colorBorder('│',_0x26c859)+'\x20'+_0x267126[_0x401f8f(0x183)]('\x20'+colorBorder('│',_0x26c859)+'\x20')+'\x20'+colorBorder('│',_0x26c859));const _0x458464=_0xe83b18[_0x401f8f(0x17b)]((_0x1da3d9,_0x37727f)=>colorType(centerAlign(_0x1da3d9,_0x4cdc30[_0x37727f]),_0x26c859));_0x366dd4[_0x401f8f(0x196)](colorBorder('│',_0x26c859)+'\x20'+_0x458464[_0x401f8f(0x183)]('\x20'+colorBorder('│',_0x26c859)+'\x20')+'\x20'+colorBorder('│',_0x26c859)),_0x366dd4[_0x401f8f(0x196)](colorBorder('├'+_0x5b95e9[_0x401f8f(0x17b)](_0x31edfe=>'─'['repeat'](_0x31edfe+0x2))[_0x401f8f(0x183)]('┼')+'┤',_0x26c859));const _0x4a7d82=(_0x2a4fd9,_0x26cbdc)=>{const _0x584597=_0x401f8f,_0x5d40ac=stringWidth(_0x2a4fd9);if(_0x5d40ac<=_0x26cbdc)return _0x2a4fd9;let _0x3b28d6=_0x2a4fd9;while(stringWidth(_0x3b28d6+'…')>_0x26cbdc&&_0x3b28d6[_0x584597(0x188)]>0x0){_0x3b28d6=_0x3b28d6[_0x584597(0x18e)](0x0,-0x1);}return _0x3b28d6+'…';};_0x5a8109['forEach'](_0x16bfc8=>{const _0xfe1831=_0x401f8f,_0x399f84=_0x1c4a96[_0xfe1831(0x17b)]((_0x407510,_0x3c0cbb)=>{const _0x2e0da3=_0xfe1831,_0x5c6d98=_0x16bfc8[_0x407510],_0x14b996=formatValue(_0x5c6d98),_0x204db2=_0x4cdc30[_0x3c0cbb],_0x330f4d=_0x4a7d82(_0x14b996,_0x204db2),_0x218672=typeof _0x5c6d98===_0x2e0da3(0x199)||typeof _0x5c6d98==='string'&&/^-?\d+$/[_0x2e0da3(0x18d)](_0x5c6d98);return _0x218672?padStart(_0x330f4d,_0x204db2):padEnd(_0x330f4d,_0x204db2);});_0x366dd4[_0xfe1831(0x196)](colorBorder('│',_0x26c859)+'\x20'+_0x399f84['join']('\x20'+colorBorder('│',_0x26c859)+'\x20')+'\x20'+colorBorder('│',_0x26c859));});const _0x5466ba=_0x5b95e9['reduce']((_0x550f1a,_0x3d630e)=>_0x550f1a+_0x3d630e+0x3,-0x1);_0x366dd4[_0x401f8f(0x196)](colorBorder('├'+_0x5b95e9[_0x401f8f(0x17b)](_0x160c24=>'─'[_0x401f8f(0x19b)](_0x160c24+0x2))[_0x401f8f(0x183)]('┴')+'┤',_0x26c859));let _0x1478bf;_0x3a16fd?_0x1478bf=_0x51d853+'\x20rows\x20('+_0x2195cb+_0x401f8f(0x19c):_0x1478bf=_0x51d853+_0x401f8f(0x180)+(_0x51d853===0x1?'':'s');const _0xaa671a=_0x1478bf['padEnd'](_0x5466ba-0x2);return _0x366dd4[_0x401f8f(0x196)](colorBorder('│',_0x26c859)+'\x20'+_0xaa671a+'\x20'+colorBorder('│',_0x26c859)),_0x366dd4['push'](colorBorder('└'+'─'[_0x401f8f(0x19b)](_0x5466ba)+'┘',_0x26c859)),_0x366dd4[_0x401f8f(0x183)]('\x0a');}function a55_0x193f(_0x5453a4,_0x200f2b){const _0x378dfd=a55_0x378d();return a55_0x193f=function(_0x193fce,_0x221c55){_0x193fce=_0x193fce-0x173;let _0x1de96b=_0x378dfd[_0x193fce];return _0x1de96b;},a55_0x193f(_0x5453a4,_0x200f2b);}function simplifyType(_0x3172a4){const _0x212142=a55_0x193f,_0x3fe445={'varchar':'string','bigint':'long','integer':'int','double':'double','boolean':_0x212142(0x179),'date':_0x212142(0x19a),'timestamp':_0x212142(0x1a0),'array':_0x212142(0x197),'map':_0x212142(0x17b),'row':_0x212142(0x18a)},_0xab0e87=_0x3172a4[_0x212142(0x17d)]();for(const [_0x9fe9ea,_0x118ce9]of Object[_0x212142(0x193)](_0x3fe445)){if(_0xab0e87['startsWith'](_0x9fe9ea))return _0x118ce9;}return _0x3172a4['length']>0xa?_0x3172a4['substring'](0x0,0xa):_0x3172a4;}export function formatAsJSON(_0x208459,_0x3eeac9={}){const _0x25908e=a55_0x193f;if(_0x208459[_0x25908e(0x17f)]['length']===0x0)return'[]';if(shouldUseColor(_0x3eeac9))return colorizeJSON(_0x208459[_0x25908e(0x17f)],_0x3eeac9);const _0x45d93b=_0x208459[_0x25908e(0x17f)][_0x25908e(0x17b)](_0x2f3f6c=>'\x20\x20'+JSON[_0x25908e(0x181)](_0x2f3f6c));return'[\x0a'+_0x45d93b[_0x25908e(0x183)](',\x0a')+'\x0a]';}export function formatAsJSONL(_0x30b330,_0x4a23f8={}){const _0x440631=a55_0x193f;if(_0x30b330['data'][_0x440631(0x188)]===0x0)return'';if(shouldUseColor(_0x4a23f8))return _0x30b330['data'][_0x440631(0x17b)](_0x5c47bc=>colorizeJSONCompact(_0x5c47bc,_0x4a23f8))[_0x440631(0x183)]('\x0a');return _0x30b330['data'][_0x440631(0x17b)](_0x246339=>JSON[_0x440631(0x181)](_0x246339))[_0x440631(0x183)]('\x0a');}export function formatAsTSV(_0x31354c){const _0x4e517f=a55_0x193f;if(_0x31354c[_0x4e517f(0x17f)][_0x4e517f(0x188)]===0x0)return'';const _0x56767d=[],_0x4098df=_0x31354c['columns'][_0x4e517f(0x17b)](_0x2f007a=>_0x2f007a['name']);return _0x56767d['push'](_0x4098df['join']('\x09')),_0x31354c[_0x4e517f(0x17f)][_0x4e517f(0x173)](_0x14592d=>{const _0x2b054a=_0x4e517f,_0x22b6bc=_0x4098df['map'](_0x2e727a=>{const _0x322058=_0x14592d[_0x2e727a];return formatValueForTSV(_0x322058);});_0x56767d[_0x2b054a(0x196)](_0x22b6bc[_0x2b054a(0x183)]('\x09'));}),_0x56767d['join']('\x0a');}function formatValue(_0x5585d8){const _0x1abae2=a55_0x193f;if(_0x5585d8===null||_0x5585d8===undefined)return'';if(typeof _0x5585d8===_0x1abae2(0x174)){const _0x449e65=_0x5585d8['replace'](/\n/g,'\x5cn')[_0x1abae2(0x18f)](/\r/g,'\x5cr')[_0x1abae2(0x18f)](/\t/g,'\x5ct');return _0x449e65;}if(typeof _0x5585d8==='number')return String(_0x5585d8);if(typeof _0x5585d8===_0x1abae2(0x176))return _0x5585d8?'true':_0x1abae2(0x192);if(_0x5585d8 instanceof Date)return _0x5585d8['toISOString']();if(typeof _0x5585d8===_0x1abae2(0x194))return JSON['stringify'](_0x5585d8);return String(_0x5585d8);}function a55_0x378d(){const _0x43a4df=['toLowerCase','max','data','\x20row','stringify','table','join','5650hESdnR','tsv','4296957QBpoPQ','No\x20rows\x20returned','length','6532272BjjLFZ','row','537882SvVSaw','jsonl','test','slice','replace','253kYqroi','3546QCOFic','false','entries','object','type','push','array','2225VAYdPQ','number','date','repeat','\x20shown)','21497508YybcEv','json','308488qeKaVf','timestamp','forEach','string','toISOString','boolean','min','columns','bool','stdout','map','name'];a55_0x378d=function(){return _0x43a4df;};return a55_0x378d();}function formatValueForTSV(_0x471c8c){const _0xb5a114=a55_0x193f;if(_0x471c8c===null||_0x471c8c===undefined)return'';if(typeof _0x471c8c===_0xb5a114(0x174))return _0x471c8c[_0xb5a114(0x18f)](/\t/g,'\x5ct')[_0xb5a114(0x18f)](/\n/g,'\x5cn');if(typeof _0x471c8c===_0xb5a114(0x199)||typeof _0x471c8c===_0xb5a114(0x176))return String(_0x471c8c);if(_0x471c8c instanceof Date)return _0x471c8c[_0xb5a114(0x175)]();if(typeof _0x471c8c===_0xb5a114(0x194))return JSON['stringify'](_0x471c8c);return String(_0x471c8c);}export function formatQueryResult(_0x14d5ec,_0x162652){const _0x2ba028=a55_0x193f;switch(_0x162652){case _0x2ba028(0x182):return formatAsTable(_0x14d5ec);case _0x2ba028(0x19e):return formatAsJSON(_0x14d5ec);case _0x2ba028(0x18c):return formatAsJSONL(_0x14d5ec);case _0x2ba028(0x185):return formatAsTSV(_0x14d5ec);default:return formatAsJSON(_0x14d5ec);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a56_0x263cba=a56_0x43d7;(function(_0x3855af,_0x204c6c){const _0x56c064=a56_0x43d7,_0x3d51e8=_0x3855af();while(!![]){try{const _0x1307fb=parseInt(_0x56c064(0x188))/0x1+parseInt(_0x56c064(0x18f))/0x2*(parseInt(_0x56c064(0x18b))/0x3)+-parseInt(_0x56c064(0x189))/0x4*(parseInt(_0x56c064(0x18e))/0x5)+-parseInt(_0x56c064(0x18d))/0x6+parseInt(_0x56c064(0x192))/0x7+parseInt(_0x56c064(0x190))/0x8*(-parseInt(_0x56c064(0x18c))/0x9)+parseInt(_0x56c064(0x191))/0xa*(parseInt(_0x56c064(0x195))/0xb);if(_0x1307fb===_0x204c6c)break;else _0x3d51e8['push'](_0x3d51e8['shift']());}catch(_0x50fd01){_0x3d51e8['push'](_0x3d51e8['shift']());}}}(a56_0x1672,0xe48cd));const MODEL_ALIASES={'haiku':a56_0x263cba(0x194),'sonnet':a56_0x263cba(0x193)};function a56_0x43d7(_0x2e53d4,_0x38971c){const _0x1672c9=a56_0x1672();return a56_0x43d7=function(_0x43d7a3,_0x47f829){_0x43d7a3=_0x43d7a3-0x188;let _0x2d8f6d=_0x1672c9[_0x43d7a3];return _0x2d8f6d;},a56_0x43d7(_0x2e53d4,_0x38971c);}export function resolveModelAlias(_0x53197b){const _0x1e7e7a=a56_0x263cba;return MODEL_ALIASES[_0x53197b[_0x1e7e7a(0x18a)]()]||_0x53197b;}function a56_0x1672(){const _0x59e854=['126672UMtRit','claude-4.5-sonnet','claude-4.5-haiku','737473SvZCrZ','1712905Jfyypp','35884XWAQgm','toLowerCase','1299pCddsX','15471522BRaZqo','6988074RuWgVP','645RPxVjQ','1678YiySJJ','8KdqDnV','430jJtHvG'];a56_0x1672=function(){return _0x59e854;};return a56_0x1672();}export function getModelAliases(){return{...MODEL_ALIASES};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a57_0x2535(_0x240820,_0x281bd6){const _0x3e42e9=a57_0x3e42();return a57_0x2535=function(_0x253544,_0x5ca305){_0x253544=_0x253544-0x64;let _0x2227ff=_0x3e42e9[_0x253544];return _0x2227ff;},a57_0x2535(_0x240820,_0x281bd6);}(function(_0x493c03,_0x3c1578){const _0x3fa243=a57_0x2535,_0x1c7ddc=_0x493c03();while(!![]){try{const _0x265f57=parseInt(_0x3fa243(0x69))/0x1+-parseInt(_0x3fa243(0x6f))/0x2*(parseInt(_0x3fa243(0x6e))/0x3)+-parseInt(_0x3fa243(0x6c))/0x4+parseInt(_0x3fa243(0x64))/0x5+parseInt(_0x3fa243(0x72))/0x6*(parseInt(_0x3fa243(0x66))/0x7)+-parseInt(_0x3fa243(0x65))/0x8+parseInt(_0x3fa243(0x6d))/0x9*(parseInt(_0x3fa243(0x71))/0xa);if(_0x265f57===_0x3c1578)break;else _0x1c7ddc['push'](_0x1c7ddc['shift']());}catch(_0x41cb71){_0x1c7ddc['push'](_0x1c7ddc['shift']());}}}(a57_0x3e42,0xb008c));export function validateLimitOption(_0x312dc6){const _0x225d4c=a57_0x2535;if(!Number[_0x225d4c(0x70)](_0x312dc6))return{'isValid':![],'error':_0x225d4c(0x73)+_0x312dc6+'.\x20Must\x20be\x20an\x20integer.'};if(_0x312dc6<=0x0)return{'isValid':![],'error':_0x225d4c(0x73)+_0x312dc6+_0x225d4c(0x68)};return{'isValid':!![],'value':_0x312dc6};}export function validateTimeoutOption(_0x554a23,_0xb9439e=0x1e){const _0x31de43=a57_0x2535;if(_0x554a23===undefined)return{'isValid':!![],'value':_0xb9439e};const _0x202a6b=typeof _0x554a23===_0x31de43(0x6a)?_0x554a23:parseFloat(_0x554a23);if(isNaN(_0x202a6b))return{'isValid':![],'error':_0x31de43(0x67)+_0x554a23+'.\x20Must\x20be\x20a\x20number.'};if(_0x202a6b<=0x0)return{'isValid':![],'error':_0x31de43(0x67)+_0x202a6b+_0x31de43(0x6b)};return{'isValid':!![],'value':_0x202a6b};}function a57_0x3e42(){const _0x1694e3=['.\x20Must\x20be\x20a\x20positive\x20integer.','524317HGNyRH','number','.\x20Must\x20be\x20a\x20positive\x20number.','4361720bYiHXw','108iBmEsb','9003Qsshjn','194AvvEgh','isInteger','242070XzwyKg','6GnHTIE','Invalid\x20limit\x20value:\x20','2701685oJoUQa','3009064gFvuHt','7864906IbQHOd','Invalid\x20timeout\x20value:\x20'];a57_0x3e42=function(){return _0x1694e3;};return a57_0x3e42();}
|
package/dist/utils/port.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a58_0x21f4(){const _0x538d70=['listening','once','293955nyUJhi','4saDKrP','No\x20available\x20port\x20found\x20between\x20','94629byDxYt','1982104fBUWgT','3957630WdbiCj','error','1623167wQtTSc','listen','3678MnVGWw','18QOwyZy','close','780gulIsk','953060jBEzsF'];a58_0x21f4=function(){return _0x538d70;};return a58_0x21f4();}(function(_0x9b8ed8,_0x4502fd){const _0xfe7597=a58_0x4e70,_0x10c10f=_0x9b8ed8();while(!![]){try{const _0x2af82c=-parseInt(_0xfe7597(0x1b2))/0x1+-parseInt(_0xfe7597(0x1c0))/0x2*(parseInt(_0xfe7597(0x1bf))/0x3)+-parseInt(_0xfe7597(0x1bc))/0x4+parseInt(_0xfe7597(0x1bb))/0x5*(-parseInt(_0xfe7597(0x1b8))/0x6)+-parseInt(_0xfe7597(0x1b6))/0x7+parseInt(_0xfe7597(0x1b3))/0x8+parseInt(_0xfe7597(0x1b9))/0x9*(parseInt(_0xfe7597(0x1b4))/0xa);if(_0x2af82c===_0x4502fd)break;else _0x10c10f['push'](_0x10c10f['shift']());}catch(_0x369c9c){_0x10c10f['push'](_0x10c10f['shift']());}}}(a58_0x21f4,0x2ca84));function a58_0x4e70(_0x3da536,_0x422315){const _0x21f451=a58_0x21f4();return a58_0x4e70=function(_0x4e70eb,_0x460590){_0x4e70eb=_0x4e70eb-0x1b1;let _0x4dc7d1=_0x21f451[_0x4e70eb];return _0x4dc7d1;},a58_0x4e70(_0x3da536,_0x422315);}import{createServer}from'node:net';export async function isPortAvailable(_0x46ceea){return new Promise(_0x1d7e68=>{const _0x2c816e=a58_0x4e70,_0x2023ea=createServer();_0x2023ea['once'](_0x2c816e(0x1b5),_0x378901=>{_0x378901['code']==='EADDRINUSE'?_0x1d7e68(![]):_0x1d7e68(![]);}),_0x2023ea[_0x2c816e(0x1be)](_0x2c816e(0x1bd),()=>{const _0x29c920=_0x2c816e;_0x2023ea[_0x29c920(0x1ba)](),_0x1d7e68(!![]);}),_0x2023ea[_0x2c816e(0x1b7)](_0x46ceea,'127.0.0.1');});}export async function findAvailablePort(_0x590681=0xfa0,_0xa3c937=0x64){const _0x30dd9b=a58_0x4e70;for(let _0x58da8f=0x0;_0x58da8f<_0xa3c937;_0x58da8f++){const _0x3feed4=_0x590681+_0x58da8f;if(await isPortAvailable(_0x3feed4))return _0x3feed4;}throw new Error(_0x30dd9b(0x1b1)+_0x590681+'\x20and\x20'+(_0x590681+_0xa3c937-0x1));}
|
package/dist/utils/process.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a59_0x29a3(_0x3eb84a,_0x1243ca){var _0x56b63d=a59_0x56b6();return a59_0x29a3=function(_0x29a3f4,_0x2bde0c){_0x29a3f4=_0x29a3f4-0x106;var _0x43ce71=_0x56b63d[_0x29a3f4];return _0x43ce71;},a59_0x29a3(_0x3eb84a,_0x1243ca);}(function(_0x183ed3,_0x4490cd){var _0x152019=a59_0x29a3,_0x14a658=_0x183ed3();while(!![]){try{var _0x33bdc6=parseInt(_0x152019(0x113))/0x1*(parseInt(_0x152019(0x109))/0x2)+-parseInt(_0x152019(0x10b))/0x3+-parseInt(_0x152019(0x106))/0x4*(parseInt(_0x152019(0x10c))/0x5)+parseInt(_0x152019(0x111))/0x6*(-parseInt(_0x152019(0x10a))/0x7)+-parseInt(_0x152019(0x10f))/0x8*(-parseInt(_0x152019(0x10e))/0x9)+-parseInt(_0x152019(0x112))/0xa*(parseInt(_0x152019(0x110))/0xb)+-parseInt(_0x152019(0x108))/0xc*(-parseInt(_0x152019(0x107))/0xd);if(_0x33bdc6===_0x4490cd)break;else _0x14a658['push'](_0x14a658['shift']());}catch(_0x2c8eb1){_0x14a658['push'](_0x14a658['shift']());}}}(a59_0x56b6,0xa7048));export function getPPID(){return process['ppid'];}function a59_0x56b6(){var _0x29efb2=['4949575ynEjnT','kill','14418iojxhz','288cwkhnS','2827TSvbcN','1446UqvJoN','44410UykxeS','72214BGSKgd','4yuNoLh','52953355srMAbc','12wjPkLd','12VdyjHH','13636EuonNg','3838401AkgWQB'];a59_0x56b6=function(){return _0x29efb2;};return a59_0x56b6();}export function isProcessRunning(_0x570344){var _0x546f21=a59_0x29a3;try{return process[_0x546f21(0x10d)](_0x570344,0x0),!![];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a60_0x5368(_0xe8a7b9,_0xf1c4fe){const _0x343b4d=a60_0x343b();return a60_0x5368=function(_0x5368fa,_0x2620f9){_0x5368fa=_0x5368fa-0x116;let _0x3e5add=_0x343b4d[_0x5368fa];return _0x3e5add;},a60_0x5368(_0xe8a7b9,_0xf1c4fe);}(function(_0x437d16,_0x3b50da){const _0x3faa13=a60_0x5368,_0x399032=_0x437d16();while(!![]){try{const _0x44a442=parseInt(_0x3faa13(0x122))/0x1*(-parseInt(_0x3faa13(0x116))/0x2)+parseInt(_0x3faa13(0x120))/0x3*(-parseInt(_0x3faa13(0x118))/0x4)+-parseInt(_0x3faa13(0x11d))/0x5*(-parseInt(_0x3faa13(0x11b))/0x6)+-parseInt(_0x3faa13(0x124))/0x7+parseInt(_0x3faa13(0x125))/0x8+-parseInt(_0x3faa13(0x123))/0x9+parseInt(_0x3faa13(0x117))/0xa*(parseInt(_0x3faa13(0x11c))/0xb);if(_0x44a442===_0x3b50da)break;else _0x399032['push'](_0x399032['shift']());}catch(_0x14f7a7){_0x399032['push'](_0x399032['shift']());}}}(a60_0x343b,0x802f7));export function parseSegmentRef(_0x208c8c){const _0x2b87bf=a60_0x5368,_0x433a0a=_0x208c8c[_0x2b87bf(0x121)]('/');if(_0x433a0a===-0x1)return{'parentId':_0x208c8c};if(_0x433a0a===0x0)throw new Error(_0x2b87bf(0x11f)+_0x208c8c+_0x2b87bf(0x119));const _0x2c11ce=_0x208c8c[_0x2b87bf(0x11e)](0x0,_0x433a0a),_0x2f15a1=_0x208c8c[_0x2b87bf(0x11e)](_0x433a0a+0x1);if(_0x2f15a1==='')throw new Error(_0x2b87bf(0x11f)+_0x208c8c+_0x2b87bf(0x11a));return{'parentId':_0x2c11ce,'childId':_0x2f15a1};}function a60_0x343b(){const _0x2e402b=['1574ZwPgRs','5737797YVmweY','466935DomjvF','1734624xSCfDo','344gZsIsW','938390pwmxjl','4sTAQJw','.\x20Parent\x20name\x20cannot\x20be\x20empty','.\x20Child\x20name\x20cannot\x20be\x20empty','6iPAoWT','209bKykYH','1906715rlpnnd','substring','Invalid\x20segment\x20reference\x20format:\x20','2643297SHZCpf','indexOf'];a60_0x343b=function(){return _0x2e402b;};return a60_0x343b();}
|
package/dist/utils/spinner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4dc56e,_0x34e248){const _0x4339db=a61_0x28e9,_0x554d4b=_0x4dc56e();while(!![]){try{const _0xccdcf2=parseInt(_0x4339db(0x12a))/0x1*(-parseInt(_0x4339db(0x125))/0x2)+-parseInt(_0x4339db(0x124))/0x3+-parseInt(_0x4339db(0x131))/0x4+parseInt(_0x4339db(0x130))/0x5+parseInt(_0x4339db(0x12c))/0x6+-parseInt(_0x4339db(0x12f))/0x7+parseInt(_0x4339db(0x120))/0x8;if(_0xccdcf2===_0x34e248)break;else _0x554d4b['push'](_0x554d4b['shift']());}catch(_0x33641b){_0x554d4b['push'](_0x554d4b['shift']());}}}(a61_0x33a9,0x65eb7));import a61_0x2e2023 from'ora';export function createCommandSpinner(_0x1108e8,_0x27b764={}){const _0x4412b7=a61_0x28e9,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x27b764;return a61_0x2e2023({'text':_0x1108e8,'color':_0x4412b7(0x123),'isEnabled':forceEnabled||process[_0x4412b7(0x132)][_0x4412b7(0x11d)]&&!verbose});}export async function withSpinner(_0x50704c,_0x7d7240,_0x427c7e={}){const _0x588ecc=a61_0x28e9,_0x4cacce=_0x427c7e[_0x588ecc(0x12b)]??(()=>Date['now']()),_0x5d4051=createCommandSpinner(_0x50704c,_0x427c7e);_0x5d4051[_0x588ecc(0x129)]();const _0x5ef960=_0x4cacce();try{const _0x1ce498=await _0x7d7240(),_0x23bc37=_0x4cacce()-_0x5ef960;return _0x5d4051[_0x588ecc(0x128)](),{'data':_0x1ce498,'elapsedMs':_0x23bc37};}catch(_0xbf68b5){_0x5d4051['stop']();throw _0xbf68b5;}}export async function withQuerySpinner(_0x57c742,_0x4f9e76,_0x312688={}){const _0x5f2088=a61_0x28e9,_0x55dab5=_0x312688[_0x5f2088(0x12b)]??(()=>Date[_0x5f2088(0x12e)]()),_0x59cf40=_0x312688['intervalFactory']??setInterval,_0x43eb78=createCommandSpinner(_0x57c742,_0x312688);_0x43eb78[_0x5f2088(0x129)]();const _0x2bae7b=_0x55dab5(),_0x1ccedf=_0x57c742[_0x5f2088(0x127)](_0x5f2088(0x11f),''),_0x12ffa0={},_0x2ba402=()=>{const _0x285e51=_0x5f2088;if(!_0x43eb78['isSpinning'])return;const _0x5d8f63=((_0x55dab5()-_0x2bae7b)/0x3e8)[_0x285e51(0x126)](0x1),_0xae7846=_0x12ffa0[_0x285e51(0x133)]??_0x1ccedf,_0x175203=_0x12ffa0[_0x285e51(0x12d)]?_0x285e51(0x11e)+_0x12ffa0[_0x285e51(0x12d)]+']':'',_0x53d1d2=_0x12ffa0[_0x285e51(0x122)]?'\x20'+_0x12ffa0[_0x285e51(0x122)]:'';_0x43eb78[_0x285e51(0x121)]=_0xae7846+'\x20('+_0x5d8f63+'s)'+_0x53d1d2+_0x175203;},_0xe532df=_0x59cf40(()=>{_0x2ba402();},0x3e8),_0x3121cc={'setPhase':_0x2c7881=>{const _0x907bc6=_0x5f2088;_0x12ffa0[_0x907bc6(0x133)]=_0x2c7881,_0x2ba402();},'setJobId':_0x5f1677=>{const _0x113a57=_0x5f2088;_0x12ffa0[_0x113a57(0x12d)]=_0x5f1677,_0x2ba402();},'setExtra':_0x52720d=>{_0x12ffa0['extra']=_0x52720d,_0x2ba402();}};_0x2ba402();try{const _0x55e005=await _0x4f9e76(_0x3121cc),_0x10e705=_0x55dab5()-_0x2bae7b;return{'data':_0x55e005,'elapsedMs':_0x10e705};}finally{clearInterval(_0xe532df),_0x43eb78[_0x5f2088(0x128)]();}}function a61_0x28e9(_0x33144d,_0x45ee0c){const _0x33a91a=a61_0x33a9();return a61_0x28e9=function(_0x28e910,_0x253dfe){_0x28e910=_0x28e910-0x11d;let _0x4744fa=_0x33a91a[_0x28e910];return _0x4744fa;},a61_0x28e9(_0x33144d,_0x45ee0c);}export function formatElapsed(_0x4936c8){return(_0x4936c8/0x3e8)['toFixed'](0x2)+'s';}function a61_0x33a9(){const _0x4a53a8=['1330878DNUksM','toFixed','replace','stop','start','1uJsWko','clock','2759244utwPOp','jobId','now','4382014RyTSKe','2315085Hvjzqs','1808028YQereO','stdout','phase','isTTY','\x20[Job\x20ID:\x20','...','16490576qSDFyq','text','extra','cyan','2469906VHerSO'];a61_0x33a9=function(){return _0x4a53a8;};return a61_0x33a9();}
|
package/dist/utils/sql-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2922c6,_0x42985a){const _0x37dfd3=a62_0x5b5c,_0x1b884d=_0x2922c6();while(!![]){try{const _0x225db8=parseInt(_0x37dfd3(0x97))/0x1*(-parseInt(_0x37dfd3(0x93))/0x2)+parseInt(_0x37dfd3(0x90))/0x3*(-parseInt(_0x37dfd3(0x92))/0x4)+-parseInt(_0x37dfd3(0x8e))/0x5+parseInt(_0x37dfd3(0x89))/0x6*(parseInt(_0x37dfd3(0x87))/0x7)+parseInt(_0x37dfd3(0x80))/0x8*(parseInt(_0x37dfd3(0x8d))/0x9)+-parseInt(_0x37dfd3(0x81))/0xa*(parseInt(_0x37dfd3(0x8b))/0xb)+parseInt(_0x37dfd3(0x9a))/0xc*(parseInt(_0x37dfd3(0x88))/0xd);if(_0x225db8===_0x42985a)break;else _0x1b884d['push'](_0x1b884d['shift']());}catch(_0x4bb175){_0x1b884d['push'](_0x1b884d['shift']());}}}(a62_0x5a0f,0x4a334));import{readFileSync}from'fs';function a62_0x5a0f(){const _0x18a487=['8ywMvgI','4953550mBOMkx','\x27:\x20','filter','code','map','ENOENT','13811FKQfxO','44824WHPtWQ','1362pHrEJY','message','11QafVgD','length','507096JnbhoL','2475750SiEvsL','Permission\x20denied\x20reading\x20file\x20\x27','6SXKqmT','toLowerCase','438436krIrmP','40hAsaRw','replace','trim','push','14006GmNOeN','Content\x20contains\x20no\x20SQL\x20statements','File\x20\x27','4488dvhcoh'];a62_0x5a0f=function(){return _0x18a487;};return a62_0x5a0f();}export function stripSqlComments(_0x234ae1){const _0x1f1eb0=a62_0x5b5c;let _0x381ca3=_0x234ae1[_0x1f1eb0(0x94)](/\/\*(?:[^*]|\*(?!\/))*\*\//g,'');return _0x381ca3=_0x381ca3[_0x1f1eb0(0x94)](/--.*$/gm,''),_0x381ca3[_0x1f1eb0(0x95)]();}function a62_0x5b5c(_0xc1d13b,_0x38a661){const _0x5a0fd4=a62_0x5a0f();return a62_0x5b5c=function(_0x5b5cd9,_0x5d7154){_0x5b5cd9=_0x5b5cd9-0x80;let _0x4cbb73=_0x5a0fd4[_0x5b5cd9];return _0x4cbb73;},a62_0x5b5c(_0xc1d13b,_0x38a661);}function isEscaped(_0x90cefa,_0x5b548c){let _0x5aa4f9=0x0;for(let _0x383f53=_0x5b548c-0x1;_0x383f53>=0x0&&_0x90cefa[_0x383f53]==='\x5c';_0x383f53--){_0x5aa4f9++;}return _0x5aa4f9%0x2===0x1;}export function splitSqlStatements(_0x10a6da){const _0x3cb536=a62_0x5b5c,_0x415bcd=stripSqlComments(_0x10a6da);if(!_0x415bcd)throw new Error(_0x3cb536(0x98));const _0x451501=[];let _0x13805f='',_0x44a98d=![],_0x1f29e0=![],_0x5400e9=![];for(let _0x2e0f03=0x0;_0x2e0f03<_0x10a6da[_0x3cb536(0x8c)];_0x2e0f03++){const _0x9cebc=_0x10a6da[_0x2e0f03];if(_0x9cebc==='\x27'&&!isEscaped(_0x10a6da,_0x2e0f03)&&!_0x1f29e0&&!_0x5400e9)_0x44a98d=!_0x44a98d;else{if(_0x9cebc==='\x22'&&!isEscaped(_0x10a6da,_0x2e0f03)&&!_0x44a98d&&!_0x5400e9)_0x1f29e0=!_0x1f29e0;else _0x9cebc==='`'&&!isEscaped(_0x10a6da,_0x2e0f03)&&!_0x44a98d&&!_0x1f29e0&&(_0x5400e9=!_0x5400e9);}if(_0x9cebc===';'&&!_0x44a98d&&!_0x1f29e0&&!_0x5400e9){const _0x3ad361=_0x13805f['trim']();_0x3ad361&&_0x451501[_0x3cb536(0x96)](_0x3ad361),_0x13805f='';}else _0x13805f+=_0x9cebc;}const _0x5c5bdf=_0x13805f[_0x3cb536(0x95)]();_0x5c5bdf&&_0x451501['push'](_0x5c5bdf);const _0xb0a8e5=_0x451501[_0x3cb536(0x85)](_0x5b8b78=>_0x5b8b78[_0x3cb536(0x95)]())[_0x3cb536(0x83)](_0x3f8054=>{const _0x235d72=_0x3cb536,_0x17cf4b=stripSqlComments(_0x3f8054);return _0x17cf4b[_0x235d72(0x8c)]>0x0;});if(_0xb0a8e5[_0x3cb536(0x8c)]===0x0)throw new Error(_0x3cb536(0x98));return _0xb0a8e5;}export function readFileContent(_0x28bb1d){const _0x17fb49=a62_0x5b5c;try{return readFileSync(_0x28bb1d,'utf-8');}catch(_0x15c5d5){const _0x64433=_0x15c5d5[_0x17fb49(0x84)];if(_0x64433===_0x17fb49(0x86))throw new Error(_0x17fb49(0x99)+_0x28bb1d+'\x27\x20not\x20found');else{if(_0x64433==='EACCES')throw new Error(_0x17fb49(0x8f)+_0x28bb1d+'\x27');else throw new Error('Error\x20reading\x20file\x20\x27'+_0x28bb1d+_0x17fb49(0x82)+_0x15c5d5[_0x17fb49(0x8a)]);}}}export function readSqlStatementsFromFile(_0x16b0ec){const _0x19222a=a62_0x5b5c,_0x21f5f7=readFileContent(_0x16b0ec);try{return splitSqlStatements(_0x21f5f7);}catch(_0x507fd1){throw new Error(_0x19222a(0x99)+_0x16b0ec+'\x27\x20'+_0x507fd1[_0x19222a(0x8a)][_0x19222a(0x91)]());}}
|
package/dist/utils/sse-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x51417b,_0x548962){const _0x27c9f1=a63_0x30d2,_0x1a5dd8=_0x51417b();while(!![]){try{const _0x4e3498=-parseInt(_0x27c9f1(0x131))/0x1*(-parseInt(_0x27c9f1(0x12a))/0x2)+-parseInt(_0x27c9f1(0x139))/0x3*(-parseInt(_0x27c9f1(0x12d))/0x4)+-parseInt(_0x27c9f1(0x12f))/0x5+parseInt(_0x27c9f1(0x133))/0x6*(-parseInt(_0x27c9f1(0x137))/0x7)+-parseInt(_0x27c9f1(0x127))/0x8+-parseInt(_0x27c9f1(0x138))/0x9*(-parseInt(_0x27c9f1(0x134))/0xa)+parseInt(_0x27c9f1(0x12c))/0xb;if(_0x4e3498===_0x548962)break;else _0x1a5dd8['push'](_0x1a5dd8['shift']());}catch(_0x2aaa51){_0x1a5dd8['push'](_0x1a5dd8['shift']());}}}(a63_0x3ecf,0x8a7dd));export async function*parseSSEStream(_0x44b7f9){const _0x3e52ff=a63_0x30d2;if(!_0x44b7f9[_0x3e52ff(0x125)])throw new Error(_0x3e52ff(0x13b));const _0x284fa2=_0x44b7f9[_0x3e52ff(0x125)][_0x3e52ff(0x12b)](),_0x5a8121=new TextDecoder();let _0x409266='',_0x1181d5={};try{while(!![]){const {done:_0x2e3c5d,value:_0x3d91a4}=await _0x284fa2[_0x3e52ff(0x130)]();if(_0x2e3c5d){_0x1181d5['data']&&(yield parseSSEData(_0x1181d5[_0x3e52ff(0x13a)]));break;}_0x409266+=_0x5a8121[_0x3e52ff(0x132)](_0x3d91a4,{'stream':!![]});const _0x4ad6e4=_0x409266[_0x3e52ff(0x129)]('\x0a');_0x409266=_0x4ad6e4['pop']()||'';for(const _0xa81b58 of _0x4ad6e4){if(_0xa81b58[_0x3e52ff(0x135)]()===''){_0x1181d5[_0x3e52ff(0x13a)]&&(yield parseSSEData(_0x1181d5[_0x3e52ff(0x13a)]),_0x1181d5={});continue;}if(_0xa81b58[_0x3e52ff(0x12e)](':'))continue;const _0x2dc312=_0xa81b58['indexOf'](':');if(_0x2dc312===-0x1)continue;const _0x39824d=_0xa81b58[_0x3e52ff(0x126)](0x0,_0x2dc312);let _0x5f26cf=_0xa81b58['slice'](_0x2dc312+0x1);_0x5f26cf['startsWith']('\x20')&&(_0x5f26cf=_0x5f26cf[_0x3e52ff(0x126)](0x1));switch(_0x39824d){case _0x3e52ff(0x136):_0x1181d5[_0x3e52ff(0x136)]=_0x5f26cf;break;case _0x3e52ff(0x13a):_0x1181d5[_0x3e52ff(0x13a)]=_0x1181d5[_0x3e52ff(0x13a)]?_0x1181d5[_0x3e52ff(0x13a)]+'\x0a'+_0x5f26cf:_0x5f26cf;break;case'id':_0x1181d5['id']=_0x5f26cf;break;}}}}finally{_0x284fa2['releaseLock']();}}function parseSSEData(_0x235646){const _0x7889d=a63_0x30d2;try{return JSON[_0x7889d(0x124)](_0x235646);}catch(_0x2aed1a){throw new Error(_0x7889d(0x128)+_0x235646,{'cause':_0x2aed1a});}}function a63_0x30d2(_0x3e6d33,_0x3c34ba){const _0x3ecfb7=a63_0x3ecf();return a63_0x30d2=function(_0x30d238,_0x37b17a){_0x30d238=_0x30d238-0x124;let _0x39123a=_0x3ecfb7[_0x30d238];return _0x39123a;},a63_0x30d2(_0x3e6d33,_0x3c34ba);}function a63_0x3ecf(){const _0x413beb=['decode','323262biqaqf','9893280LsRAMg','trim','event','56AhypWJ','9ranABJ','50103BlmjYD','data','Response\x20body\x20is\x20null','parse','body','slice','1150128xgYFNk','Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20','split','7588HpfwZu','getReader','718927VBPikz','4anPwcF','startsWith','64055AQtWMv','read','22Vangiq'];a63_0x3ecf=function(){return _0x413beb;};return a63_0x3ecf();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1a0791,_0x5be21d){const _0x4b1acf=a64_0x2ec1,_0x3b9652=_0x1a0791();while(!![]){try{const _0x49d887=parseInt(_0x4b1acf(0x1ea))/0x1*(parseInt(_0x4b1acf(0x1ed))/0x2)+-parseInt(_0x4b1acf(0x1e9))/0x3*(parseInt(_0x4b1acf(0x1e2))/0x4)+parseInt(_0x4b1acf(0x1f5))/0x5*(parseInt(_0x4b1acf(0x1f4))/0x6)+parseInt(_0x4b1acf(0x1f6))/0x7+parseInt(_0x4b1acf(0x1ee))/0x8+parseInt(_0x4b1acf(0x1e0))/0x9+-parseInt(_0x4b1acf(0x1f7))/0xa*(parseInt(_0x4b1acf(0x1f0))/0xb);if(_0x49d887===_0x5be21d)break;else _0x3b9652['push'](_0x3b9652['shift']());}catch(_0x5b325e){_0x3b9652['push'](_0x3b9652['shift']());}}}(a64_0x1f01,0x845bd));function a64_0x2ec1(_0x3ac0fe,_0x56249d){const _0x1f0123=a64_0x1f01();return a64_0x2ec1=function(_0x2ec1a8,_0x21b260){_0x2ec1a8=_0x2ec1a8-0x1e0;let _0x52ce04=_0x1f0123[_0x2ec1a8];return _0x52ce04;},a64_0x2ec1(_0x3ac0fe,_0x56249d);}import a64_0x4e3aa3 from'string-width';export function stringWidth(_0x2ad99c){return a64_0x4e3aa3(_0x2ad99c);}export function padEnd(_0x1c84cd,_0x237d25){const _0x65f159=stringWidth(_0x1c84cd);if(_0x65f159>=_0x237d25)return _0x1c84cd;return _0x1c84cd+'\x20'['repeat'](_0x237d25-_0x65f159);}export function padStart(_0x1b564d,_0x52a67f){const _0x28b750=a64_0x2ec1,_0x36a71c=stringWidth(_0x1b564d);if(_0x36a71c>=_0x52a67f)return _0x1b564d;return'\x20'[_0x28b750(0x1ef)](_0x52a67f-_0x36a71c)+_0x1b564d;}export function centerAlign(_0x1f1db9,_0x2d6516){const _0x3e40fe=a64_0x2ec1,_0x5830d0=stringWidth(_0x1f1db9);if(_0x5830d0>_0x2d6516){if(_0x2d6516<=0x1)return'…'[_0x3e40fe(0x1f8)](0x0,_0x2d6516);let _0x577cf0=_0x1f1db9;while(stringWidth(_0x577cf0+'…')>_0x2d6516){_0x577cf0=_0x577cf0['slice'](0x0,-0x1);}return _0x577cf0+'…';}if(_0x5830d0===_0x2d6516)return _0x1f1db9;const _0x5c93a7=_0x2d6516-_0x5830d0,_0xd15580=Math[_0x3e40fe(0x1e1)](_0x5c93a7/0x2),_0x54ea06=_0x5c93a7-_0xd15580;return'\x20'['repeat'](_0xd15580)+_0x1f1db9+'\x20'[_0x3e40fe(0x1ef)](_0x54ea06);}export function escapeStringLiteral(_0x245a8b){const _0x4e2cec=a64_0x2ec1;if(!_0x245a8b||_0x245a8b[_0x4e2cec(0x1e5)]()[_0x4e2cec(0x1ec)]===0x0)throw new Error(_0x4e2cec(0x1e7));const _0x41e0a3=_0x245a8b[_0x4e2cec(0x1eb)](/'/g,'\x27\x27');return'\x27'+_0x41e0a3+'\x27';}export function globToLike(_0x2f0047){const _0x374a32=a64_0x2ec1;let _0x496eaa=_0x2f0047['replace'](/\\/g,'\x5c\x5c')[_0x374a32(0x1eb)](/%/g,'\x5c%')[_0x374a32(0x1eb)](/_/g,'\x5c_');return _0x496eaa=_0x496eaa[_0x374a32(0x1eb)](/\*/g,'%')['replace'](/\?/g,'_'),_0x496eaa;}export function buildLikePattern(_0x530e9e){const _0x446b89=a64_0x2ec1;if(!_0x530e9e||_0x530e9e[_0x446b89(0x1e5)]()[_0x446b89(0x1ec)]===0x0)throw new Error('Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string');const _0x198ab7=globToLike(_0x530e9e),_0x622f33=_0x198ab7[_0x446b89(0x1eb)](/'/g,'\x27\x27');return'\x27'+_0x622f33+'\x27';}export function matchGlobPattern(_0x1dd65e,_0x392703){const _0x30fb45=a64_0x2ec1,_0x38589f=_0x392703[_0x30fb45(0x1eb)](/[.+^${}()|[\]\\]/g,'\x5c$&')['replace'](/\*/g,'.*')[_0x30fb45(0x1eb)](/\?/g,'.'),_0x30ec9b=new RegExp('^'+_0x38589f+'$');return _0x30ec9b[_0x30fb45(0x1e8)](_0x1dd65e);}function a64_0x1f01(){const _0x4ccac5=['Cannot\x20escape\x20empty\x20string\x20literal','test','51JWwyob','128437SDKwVB','replace','length','16ZSjyqS','7478312nxwQYm','repeat','44fBBxiO','unknown','padStart','random','729012wEwzFD','10UbHlAc','3727465PnmRoQ','7476310pFABEj','substring','8850087pzfYjS','floor','44344jrkvhr','toLowerCase','env','trim','USERNAME'];a64_0x1f01=function(){return _0x4ccac5;};return a64_0x1f01();}export function getSanitizedUsername(){const _0x381dfe=a64_0x2ec1,_0x22389f=process[_0x381dfe(0x1e4)]['USER']||process['env'][_0x381dfe(0x1e6)]||_0x381dfe(0x1f1);return _0x22389f['replace'](/[^a-zA-Z0-9]/g,'')[_0x381dfe(0x1e3)]();}export function generateRandomHex(){const _0x2b218c=a64_0x2ec1,_0x97cd8f=Math[_0x2b218c(0x1e1)](Math[_0x2b218c(0x1f3)]()*0xfffff);return _0x97cd8f['toString'](0x10)[_0x2b218c(0x1f2)](0x5,'0');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a65_0x3c56(){const _0x3b025c=['trim','Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)','13045MObVNa','table','3WsUmcf','117332NwTUrP','length','Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)','split','push','11nCYTUD','652939azNHHI','Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation','includes','join','Table\x20name\x20is\x20required\x20for\x20describe\x20operation','16ApyYnj','309146SaHXtM','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','Pattern\x20cannot\x20be\x20just\x20a\x20dot','10wqcgwG','catalog','745479KOLgXy','53420plZkPx','6fjvjTR','database','1557576llASRa','Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty'];a65_0x3c56=function(){return _0x3b025c;};return a65_0x3c56();}(function(_0x30417c,_0x539ae2){const _0x5b9d47=a65_0x234c,_0x51932f=_0x30417c();while(!![]){try{const _0x1e4e24=parseInt(_0x5b9d47(0x160))/0x1+-parseInt(_0x5b9d47(0x15a))/0x2+-parseInt(_0x5b9d47(0x169))/0x3*(parseInt(_0x5b9d47(0x16a))/0x4)+-parseInt(_0x5b9d47(0x167))/0x5*(parseInt(_0x5b9d47(0x161))/0x6)+-parseInt(_0x5b9d47(0x170))/0x7*(-parseInt(_0x5b9d47(0x159))/0x8)+-parseInt(_0x5b9d47(0x15f))/0x9*(parseInt(_0x5b9d47(0x15d))/0xa)+parseInt(_0x5b9d47(0x16f))/0xb*(parseInt(_0x5b9d47(0x163))/0xc);if(_0x1e4e24===_0x539ae2)break;else _0x51932f['push'](_0x51932f['shift']());}catch(_0x556c1d){_0x51932f['push'](_0x51932f['shift']());}}}(a65_0x3c56,0x1884a));function hasWildcard(_0x27960d){const _0x11ba08=a65_0x234c;return _0x27960d[_0x11ba08(0x172)]('*')||_0x27960d['includes']('?');}export function parseTableReference(_0x417d09){const _0x3a6f8a=a65_0x234c;if(!_0x417d09||_0x417d09[_0x3a6f8a(0x165)]()[_0x3a6f8a(0x16b)]===0x0)throw new Error('Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only');const _0x2cb38c=_0x417d09['trim'](),_0x19975f={'original':_0x2cb38c},_0xf3cac4=_0x2cb38c[_0x3a6f8a(0x16d)]('.');if(_0xf3cac4[_0x3a6f8a(0x16b)]===0x1){const _0x1e1d53=_0xf3cac4[0x0];if(!_0x1e1d53)throw new Error(_0x3a6f8a(0x15c));_0x19975f[_0x3a6f8a(0x168)]=_0x1e1d53;}else{if(_0xf3cac4[_0x3a6f8a(0x16b)]===0x2){const [_0x5ae8a4,_0x2fde0d]=_0xf3cac4;if(!_0x5ae8a4)throw new Error('Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)');if(!_0x2fde0d)throw new Error(_0x3a6f8a(0x166));_0x19975f[_0x3a6f8a(0x162)]=_0x5ae8a4,_0x19975f[_0x3a6f8a(0x168)]=_0x2fde0d;}else{if(_0xf3cac4[_0x3a6f8a(0x16b)]===0x3){const [_0x50c2d4,_0x395df4,_0x1a3ea6]=_0xf3cac4;if(!_0x50c2d4||!_0x395df4||!_0x1a3ea6)throw new Error(_0x3a6f8a(0x164));_0x19975f['catalog']=_0x50c2d4,_0x19975f[_0x3a6f8a(0x162)]=_0x395df4,_0x19975f[_0x3a6f8a(0x168)]=_0x1a3ea6;}else throw new Error(_0x3a6f8a(0x16c));}}return _0x19975f;}function a65_0x234c(_0x4a20ab,_0x2048c8){const _0x3c561d=a65_0x3c56();return a65_0x234c=function(_0x234c6b,_0x2cf878){_0x234c6b=_0x234c6b-0x157;let _0x2d033e=_0x3c561d[_0x234c6b];return _0x2d033e;},a65_0x234c(_0x4a20ab,_0x2048c8);}export function formatTableReference(_0x20e178){const _0x471e3a=a65_0x234c,_0x4bdf7f=[];return _0x20e178[_0x471e3a(0x15e)]&&_0x4bdf7f[_0x471e3a(0x16e)](_0x20e178[_0x471e3a(0x15e)]),_0x20e178[_0x471e3a(0x162)]&&_0x4bdf7f[_0x471e3a(0x16e)](_0x20e178[_0x471e3a(0x162)]),_0x20e178[_0x471e3a(0x168)]&&_0x4bdf7f[_0x471e3a(0x16e)](_0x20e178[_0x471e3a(0x168)]),_0x4bdf7f[_0x471e3a(0x157)]('.');}export function validateTableListReference(_0x2c0bc6){return undefined;}export function validateTableDescribeReference(_0x4d0470){const _0x339e5d=a65_0x234c;if(!_0x4d0470[_0x339e5d(0x168)])return _0x339e5d(0x158);if(_0x4d0470[_0x339e5d(0x162)]&&hasWildcard(_0x4d0470[_0x339e5d(0x162)]))return _0x339e5d(0x15b);if(hasWildcard(_0x4d0470[_0x339e5d(0x168)]))return _0x339e5d(0x171);return undefined;}
|