@treasuredata/tdx 0.9.1 β 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +2 -2
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/client/cdp-api-client.js +1 -1
- package/dist/client/engage-api-client.js +1 -1
- package/dist/client/http-client.js +1 -1
- package/dist/client/llm-api-client.js +1 -1
- package/dist/client/rate-limiter.js +1 -1
- package/dist/client/td-api-client.js +1 -1
- package/dist/client/trino-api-client.js +1 -1
- package/dist/client/workflow-client.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/context-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/llm-proxy.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/index.js +1 -1
- package/dist/proxy/anthropic-adapter.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/context-signature.js +1 -1
- package/dist/proxy/conversation-utils.js +1 -1
- package/dist/proxy/server.js +1 -1
- package/dist/proxy/session-cache.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm.d.ts +27 -20
- package/dist/sdk/llm.d.ts.map +1 -1
- package/dist/sdk/llm.js +1 -1
- package/dist/sdk/llm.js.map +1 -1
- package/dist/sdk/query.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/user.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-config.js +1 -1
- package/dist/utils/agent-ref-parser.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/chat-cache.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/command-output.js +1 -1
- package/dist/utils/constants.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/fields-display.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/format-detector.js +1 -1
- package/dist/utils/formatters.js +1 -1
- package/dist/utils/journey-utils.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/llm-backup-utils.js +1 -1
- package/dist/utils/model-aliases.js +1 -1
- package/dist/utils/model-factors.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/port.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/segment-path-parser.js +1 -1
- package/dist/utils/segment-ref-parser.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sql-parser.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-config.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/tree-formatter.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/dist/utils/workflow-utils.js +1 -1
- package/package.json +1 -1
package/dist/utils/process.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a109_0x8603d3=a109_0x297c;function a109_0x297c(_0x406bd7,_0x4bb61e){_0x406bd7=_0x406bd7-0xdc;const _0x5ce910=a109_0x5ce9();let _0x297c44=_0x5ce910[_0x406bd7];return _0x297c44;}(function(_0x3395a9,_0x537104){const _0x1095c0=a109_0x297c,_0x3d45a2=_0x3395a9();while(!![]){try{const _0x27467a=-parseInt(_0x1095c0(0xfe))/0x1*(parseInt(_0x1095c0(0x106))/0x2)+-parseInt(_0x1095c0(0xf5))/0x3*(-parseInt(_0x1095c0(0x10c))/0x4)+-parseInt(_0x1095c0(0xdf))/0x5*(parseInt(_0x1095c0(0x104))/0x6)+parseInt(_0x1095c0(0xe5))/0x7+-parseInt(_0x1095c0(0xf1))/0x8+-parseInt(_0x1095c0(0x101))/0x9*(parseInt(_0x1095c0(0xef))/0xa)+parseInt(_0x1095c0(0x100))/0xb;if(_0x27467a===_0x537104)break;else _0x3d45a2['push'](_0x3d45a2['shift']());}catch(_0x3908b7){_0x3d45a2['push'](_0x3d45a2['shift']());}}}(a109_0x5ce9,0x9fe74));import{execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set([a109_0x8603d3(0xfc),a109_0x8603d3(0xff),'sh',a109_0x8603d3(0xe7),a109_0x8603d3(0xf7),a109_0x8603d3(0x105),a109_0x8603d3(0xe1),a109_0x8603d3(0xe3),a109_0x8603d3(0xe4),a109_0x8603d3(0x10b),'nu','ion',a109_0x8603d3(0xeb),a109_0x8603d3(0xdc)]),EPHEMERAL_SHELL_SPAWNERS=new Set([a109_0x8603d3(0xec),a109_0x8603d3(0xf6),a109_0x8603d3(0xf0)]);function getProcessInfoWindows(_0x55c1e3){const _0x5259ab=a109_0x8603d3;try{if(!Number[_0x5259ab(0xf9)](_0x55c1e3)||_0x55c1e3<=0x0)return null;const _0x3925ab=execSync(_0x5259ab(0xf8)+_0x55c1e3+_0x5259ab(0x103),{'encoding':_0x5259ab(0x10a),'windowsHide':!![]})[_0x5259ab(0xe6)](),_0xc116bd=_0x3925ab[_0x5259ab(0xe0)]('\x0a')[_0x5259ab(0x109)](_0x11770d=>_0x11770d['trim']());if(_0xc116bd['length']<0x2)return null;const _0x105f4a=_0xc116bd[_0xc116bd['length']-0x1][_0x5259ab(0xe0)](',');if(_0x105f4a['length']<0x3)return null;const _0x489f95=_0x105f4a[0x1]?.[_0x5259ab(0xe6)]()||'',_0x2a5169=parseInt(_0x105f4a[0x2]?.[_0x5259ab(0xe6)]()||'0',0xa);if(isNaN(_0x2a5169)||!_0x489f95)return null;return{'pid':_0x55c1e3,'ppid':_0x2a5169,'comm':_0x489f95['replace'](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0x528686){const _0x445ce3=a109_0x8603d3;try{const _0x3a6c55=0x400000;if(!Number[_0x445ce3(0xf9)](_0x528686)||_0x528686<=0x0||_0x528686>_0x3a6c55)return null;const _0xd7fd81=execSync(_0x445ce3(0xfa)+_0x528686+_0x445ce3(0xdd),{'encoding':_0x445ce3(0x10a),'stdio':'pipe'})[_0x445ce3(0xe6)](),[_0x5d4478,..._0x2a0cdf]=_0xd7fd81[_0x445ce3(0xe0)](/\s+/),_0xd2af93=parseInt(_0x5d4478,0xa),_0x106a38=_0x2a0cdf['join']('\x20');if(isNaN(_0xd2af93))return null;return{'pid':_0x528686,'ppid':_0xd2af93,'comm':_0x106a38};}catch{return null;}}function getProcessInfo(_0x2f918e){const _0x5d9d34=a109_0x8603d3;if(process[_0x5d9d34(0x102)]===_0x5d9d34(0xea))return getProcessInfoWindows(_0x2f918e);return getProcessInfoPosix(_0x2f918e);}function getBasename(_0x355390){const _0x302523=a109_0x8603d3;return _0x355390[_0x302523(0xee)](/^-/,'')[_0x302523(0xe0)]('/')['pop']()?.[_0x302523(0x107)]()||'';}function isShell(_0x9467e3){const _0x43dcb0=a109_0x8603d3;return SHELL_NAMES[_0x43dcb0(0xf3)](getBasename(_0x9467e3));}function isEphemeralShellSpawner(_0x17dcd6){const _0x26c202=a109_0x8603d3;return EPHEMERAL_SHELL_SPAWNERS[_0x26c202(0xf3)](getBasename(_0x17dcd6));}let cachedShellPID;function findShellPID(){const _0x561182=a109_0x8603d3;if(process[_0x561182(0xde)]===undefined)return process['pid'];let _0x57b803=process[_0x561182(0xde)];const _0x20d718=0xa;let _0x2728f0=0x0;while(_0x2728f0<_0x20d718){const _0x125d6a=getProcessInfo(_0x57b803);if(!_0x125d6a)break;if(isShell(_0x125d6a['comm'])){const _0x5d5c3c=getProcessInfo(_0x125d6a[_0x561182(0xde)]);if(_0x5d5c3c&&isEphemeralShellSpawner(_0x5d5c3c['comm'])){_0x57b803=_0x125d6a[_0x561182(0xde)],_0x2728f0++;continue;}return _0x125d6a[_0x561182(0x108)];}if(_0x125d6a['ppid']===0x0||_0x125d6a[_0x561182(0xde)]===0x1){if(isShell(_0x125d6a[_0x561182(0xf4)]))return _0x125d6a[_0x561182(0x108)];break;}_0x57b803=_0x125d6a[_0x561182(0xde)],_0x2728f0++;}return process[_0x561182(0xde)]!==undefined?process[_0x561182(0xde)]:process[_0x561182(0x108)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}function a109_0x5ce9(){const _0xeb64cf=['darwin','start','win32','elvish','claude','ignore','replace','10vcRURP','cursor','7929328sXyjdR','unref','has','comm','45dnsFjZ','code','ksh','wmic\x20process\x20where\x20ProcessId=','isInteger','ps\x20-p\x20','xdg-open','bash','open','28802euEFoS','zsh','28795019Vphwes','10982331JVfDlG','platform','\x20get\x20ParentProcessId,Name\x20/format:csv','2211966WmkcMS','tcsh','12FFcCfl','toLowerCase','pid','filter','utf-8','powershell','224564cLXmtf','xonsh','\x20-o\x20ppid=,comm=','ppid','15tofIYV','split','csh','kill','dash','pwsh','4797380ESKwdH','trim','fish'];a109_0x5ce9=function(){return _0xeb64cf;};return a109_0x5ce9();}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x562fcb){const _0x285970=a109_0x8603d3;if(!Number[_0x285970(0xf9)](_0x562fcb)||_0x562fcb<=0x0)return![];try{return process[_0x285970(0xe2)](_0x562fcb,0x0),!![];}catch{return![];}}export function openBrowser(_0x5a2556){const _0x48166b=a109_0x8603d3,_0x6745a7=process[_0x48166b(0x102)],_0x3f4227=_0x6745a7===_0x48166b(0xe8)?_0x48166b(0xfd):_0x6745a7===_0x48166b(0xea)?_0x48166b(0xe9):_0x48166b(0xfb);spawn(_0x3f4227,[_0x5a2556],{'detached':!![],'stdio':_0x48166b(0xed)})[_0x48166b(0xf2)]();}
|
package/dist/utils/prompt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x32e01d,_0x5cec2b){const _0x3c904c=a110_0x5737,_0x4b0016=_0x32e01d();while(!![]){try{const _0x167c18=-parseInt(_0x3c904c(0x106))/0x1*(parseInt(_0x3c904c(0x10e))/0x2)+-parseInt(_0x3c904c(0x114))/0x3+-parseInt(_0x3c904c(0x10c))/0x4+parseInt(_0x3c904c(0x103))/0x5+-parseInt(_0x3c904c(0x115))/0x6*(parseInt(_0x3c904c(0x10f))/0x7)+parseInt(_0x3c904c(0x102))/0x8+-parseInt(_0x3c904c(0x10a))/0x9*(-parseInt(_0x3c904c(0x111))/0xa);if(_0x167c18===_0x5cec2b)break;else _0x4b0016['push'](_0x4b0016['shift']());}catch(_0x531e01){_0x4b0016['push'](_0x4b0016['shift']());}}}(a110_0x25c8,0x8316e));import*as a110_0x2f74f8 from'readline';export async function confirm(_0x19e3aa){const _0x2339b1=a110_0x5737,_0x1d9c43=a110_0x2f74f8['createInterface']({'input':process['stdin'],'output':process[_0x2339b1(0x116)]});return new Promise(_0x9df20c=>{const _0x1fcaec=_0x2339b1;_0x1d9c43[_0x1fcaec(0x10d)](_0x19e3aa+_0x1fcaec(0x118),_0x54034d=>{const _0x2c6bfa=_0x1fcaec;_0x1d9c43[_0x2c6bfa(0x105)](),_0x9df20c(_0x54034d[_0x2c6bfa(0x11d)]()==='y'||_0x54034d['toLowerCase']()===_0x2c6bfa(0x110));});});}function a110_0x5737(_0x23e5c2,_0x3dec33){_0x23e5c2=_0x23e5c2-0x102;const _0x25c815=a110_0x25c8();let _0x5737c0=_0x25c815[_0x23e5c2];return _0x5737c0;}function a110_0x25c8(){const _0x4525c9=['stderr','write','data','resume','toLowerCase','7936776zJHGny','2837400KMXdom','\x20[y/N]\x20','close','52bEezAP','isTTY','pause','setEncoding','40419etivxw','stdin','3075620aNWNSG','question','30688bsryzO','1876ylVNvr','yes','3750eENKsK','setRawMode','exit','3218097jKMlzx','1506WLqXgy','stdout','utf8','\x20(y/N):\x20'];a110_0x25c8=function(){return _0x4525c9;};return a110_0x25c8();}export async function confirmKey(_0x431fba){const _0x3cafeb=a110_0x5737;if(!process[_0x3cafeb(0x10b)][_0x3cafeb(0x107)])return![];return process[_0x3cafeb(0x119)]['write'](_0x431fba+_0x3cafeb(0x104)),new Promise(_0x1da02e=>{const _0x54fcff=_0x3cafeb,_0xf846f5=process[_0x54fcff(0x10b)];_0xf846f5[_0x54fcff(0x112)](!![]),_0xf846f5[_0x54fcff(0x11c)](),_0xf846f5[_0x54fcff(0x109)](_0x54fcff(0x117));const _0x5436d3=_0x59847b=>{const _0x278b9c=_0x54fcff;_0xf846f5[_0x278b9c(0x112)](![]),_0xf846f5[_0x278b9c(0x108)](),_0xf846f5['removeListener'](_0x278b9c(0x11b),_0x5436d3);if(_0x59847b==='\x1b'){process[_0x278b9c(0x119)]['write']('\x0a'),_0x1da02e(![]);return;}_0x59847b==='\x03'&&(process[_0x278b9c(0x119)][_0x278b9c(0x11a)]('\x0a'),process[_0x278b9c(0x113)](0x82));if(_0x59847b[_0x278b9c(0x11d)]()==='y'){process[_0x278b9c(0x119)][_0x278b9c(0x11a)]('y\x0a'),_0x1da02e(!![]);return;}process['stderr']['write']('\x0a'),_0x1da02e(![]);};_0xf846f5['on'](_0x54fcff(0x11b),_0x5436d3);});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x501219,_0x23cd5e){const _0x76b70f=a111_0x4804,_0x138996=_0x501219();while(!![]){try{const _0x1bba95=-parseInt(_0x76b70f(0x18a))/0x1*(-parseInt(_0x76b70f(0x184))/0x2)+-parseInt(_0x76b70f(0x182))/0x3*(-parseInt(_0x76b70f(0x185))/0x4)+-parseInt(_0x76b70f(0x16f))/0x5*(-parseInt(_0x76b70f(0x174))/0x6)+-parseInt(_0x76b70f(0x16d))/0x7+parseInt(_0x76b70f(0x170))/0x8*(parseInt(_0x76b70f(0x164))/0x9)+parseInt(_0x76b70f(0x17f))/0xa+-parseInt(_0x76b70f(0x17b))/0xb;if(_0x1bba95===_0x23cd5e)break;else _0x138996['push'](_0x138996['shift']());}catch(_0x17c8df){_0x138996['push'](_0x138996['shift']());}}}(a111_0x8c01,0xaaea6));import{existsSync,readFileSync}from'fs';import a111_0xa72ae0 from'path';import{parse as a111_0x1f6881}from'yaml';export function parsePath(_0x32ccfd){const _0x3ea306=a111_0x4804;if(!_0x32ccfd||_0x32ccfd[_0x3ea306(0x16c)]()==='')throw new Error(_0x3ea306(0x160));const _0x2239ca=_0x32ccfd['trim']();if(_0x2239ca==='/')return{'segments':[],'isAbsolute':!![],'raw':_0x32ccfd};const _0x1f8b22=_0x2239ca[_0x3ea306(0x171)]('/')?_0x2239ca[_0x3ea306(0x189)](0x1):_0x2239ca,_0x4d6575=_0x1f8b22[_0x3ea306(0x18b)]('/')['filter'](_0x14a197=>_0x14a197!=='');if(_0x4d6575[_0x3ea306(0x169)]===0x0)throw new Error('Path\x20must\x20contain\x20at\x20least\x20one\x20segment');const _0x130f14=_0x2239ca[_0x3ea306(0x171)]('/')||!isRelativePathSegment(_0x4d6575[0x0]);for(const _0x41d72c of _0x4d6575){validatePathSegment(_0x41d72c);}return{'segments':_0x4d6575,'isAbsolute':_0x130f14,'raw':_0x32ccfd};}function a111_0x4804(_0x2a793e,_0x2ec6fd){_0x2a793e=_0x2a793e-0x160;const _0x8c015f=a111_0x8c01();let _0x4804a9=_0x8c015f[_0x2a793e];return _0x4804a9;}function isRelativePathSegment(_0x2f77b1){return _0x2f77b1==='.'||_0x2f77b1==='..';}function validatePathSegment(_0x330a96){const _0x2b8953=a111_0x4804;if(_0x330a96==='')throw new Error('Path\x20segment\x20cannot\x20be\x20empty');if(_0x330a96==='.'||_0x330a96==='..')return;if(/[\x00-\x1F\x7F]/[_0x2b8953(0x17e)](_0x330a96))throw new Error(_0x2b8953(0x16a)+_0x330a96);if(_0x330a96!==_0x330a96[_0x2b8953(0x16c)]()){}}export function validatePath(_0x32d942){const _0xe5c81=a111_0x4804;if(_0x32d942[_0xe5c81(0x161)][_0xe5c81(0x169)]===0x0&&!_0x32d942[_0xe5c81(0x175)])throw new Error(_0xe5c81(0x188));if(_0x32d942[_0xe5c81(0x175)]){if(_0x32d942[_0xe5c81(0x161)][0x0]==='..')throw new Error(_0xe5c81(0x165));let _0x347026=0x0;for(const _0x5e9d33 of _0x32d942['segments']){if(_0x5e9d33==='..'){if(_0x347026===0x0)throw new Error(_0xe5c81(0x16b));_0x347026--;}else _0x5e9d33!=='.'&&_0x347026++;}}}export function joinPaths(_0x6fee11,_0x112074){const _0x551bb2=a111_0x4804;if(!_0x6fee11||_0x6fee11==='/')return _0x112074;if(!_0x112074||_0x112074==='.')return _0x6fee11;if(_0x112074[_0x551bb2(0x171)]('/'))return _0x112074;const _0x2fa51e=parsePath(_0x6fee11),_0x1da591=parsePath(_0x112074),_0x481840=[..._0x2fa51e[_0x551bb2(0x161)]];for(const _0x2896fa of _0x1da591[_0x551bb2(0x161)]){if(_0x2896fa==='.')continue;else{if(_0x2896fa==='..'){if(_0x481840[_0x551bb2(0x169)]===0x0)throw new Error(_0x551bb2(0x181));_0x481840['pop']();}else _0x481840['push'](_0x2896fa);}}const _0x3b1c0e=_0x481840[_0x551bb2(0x177)]('/');return _0x2fa51e[_0x551bb2(0x173)][_0x551bb2(0x171)]('/')?'/'+_0x3b1c0e:_0x3b1c0e;}export function normalizePath(_0xc55d7f){const _0x36e43b=a111_0x4804,_0x11e928=parsePath(_0xc55d7f),_0x3935fa=[];for(const _0x4118b5 of _0x11e928[_0x36e43b(0x161)]){if(_0x4118b5==='.')continue;else{if(_0x4118b5==='..'){if(_0x3935fa[_0x36e43b(0x169)]===0x0){if(_0x11e928[_0x36e43b(0x175)])throw new Error('Cannot\x20navigate\x20above\x20root');_0x3935fa[_0x36e43b(0x172)]('..');}else _0x3935fa[_0x3935fa[_0x36e43b(0x169)]-0x1]==='..'?_0x3935fa[_0x36e43b(0x172)]('..'):_0x3935fa[_0x36e43b(0x16e)]();}else _0x3935fa[_0x36e43b(0x172)](_0x4118b5);}}if(_0x3935fa['length']===0x0)return _0x11e928['isAbsolute']?'/':'.';const _0x5d0515=_0x3935fa[_0x36e43b(0x177)]('/');return _0x11e928['raw'][_0x36e43b(0x171)]('/')?'/'+_0x5d0515:_0x5d0515;}export function getParentPath(_0x193c0a){const _0x12fa0c=a111_0x4804,_0x3fa03d=parsePath(_0x193c0a);if(_0x3fa03d[_0x12fa0c(0x161)][_0x12fa0c(0x169)]<=0x1)return'/';const _0x42110c=_0x3fa03d['segments'][_0x12fa0c(0x176)](0x0,-0x1)[_0x12fa0c(0x177)]('/');return _0x3fa03d[_0x12fa0c(0x173)][_0x12fa0c(0x171)]('/')?'/'+_0x42110c:_0x42110c;}export function getBaseName(_0x385f2d){const _0x5afb89=a111_0x4804,_0x7ccef5=parsePath(_0x385f2d);return _0x7ccef5['segments'][_0x7ccef5[_0x5afb89(0x161)][_0x5afb89(0x169)]-0x1]||'';}export function isChildPath(_0x3da17d,_0x48bd46){const _0x3eea61=a111_0x4804,_0x49c09d=parsePath(_0x3da17d),_0x1c8786=parsePath(_0x48bd46);if(_0x49c09d[_0x3eea61(0x161)]['length']<=_0x1c8786[_0x3eea61(0x161)]['length'])return![];for(let _0x507dec=0x0;_0x507dec<_0x1c8786[_0x3eea61(0x161)][_0x3eea61(0x169)];_0x507dec++){if(_0x49c09d[_0x3eea61(0x161)][_0x507dec]!==_0x1c8786[_0x3eea61(0x161)][_0x507dec])return![];}return!![];}function a111_0x8c01(){const _0x433c0f=['pop','1780xoUqak','320NPvyvm','startsWith','push','raw','12918IVYewV','isAbsolute','slice','join','.yml','tdx.json','dirname','26483281YDVzVH','.yaml','parse','test','6869700ERdmnR','Invalid\x20tdx.json:\x20missing\x20parent_segment\x20field','Cannot\x20navigate\x20above\x20root','1348149zMYEWw','No\x20tdx.json\x20found\x20for\x20file:\x20','3768ziCABY','8HZEfFK','name','utf-8','Relative\x20path\x20cannot\x20be\x20empty','substring','118pHmlbE','split','parent_segment','Path\x20cannot\x20be\x20empty','segments','relative','Cannot\x20split\x20empty\x20path','197982GeNqlR','Absolute\x20path\x20cannot\x20start\x20with\x20\x22..\x22','type','endsWith','journey','length','Path\x20segment\x20contains\x20invalid\x20control\x20characters:\x20','Path\x20attempts\x20to\x20navigate\x20above\x20root','trim','2427565FBjAWL'];a111_0x8c01=function(){return _0x433c0f;};return a111_0x8c01();}export function splitPath(_0x49344c){const _0x56f078=a111_0x4804,_0x4aa206=parsePath(_0x49344c);if(_0x4aa206[_0x56f078(0x161)][_0x56f078(0x169)]===0x0)throw new Error(_0x56f078(0x163));if(_0x4aa206['segments'][_0x56f078(0x169)]===0x1)return{'parent':_0x4aa206[_0x56f078(0x161)][0x0]};return{'parent':_0x4aa206[_0x56f078(0x161)][0x0],'child':_0x4aa206[_0x56f078(0x161)][_0x56f078(0x176)](0x1)[_0x56f078(0x177)]('/')};}export function isYamlFilePath(_0x49efe0){const _0x3ff319=a111_0x4804;return _0x49efe0[_0x3ff319(0x167)](_0x3ff319(0x178))||_0x49efe0['endsWith'](_0x3ff319(0x17c));}export function resolveYamlFilePath(_0x22b7fa){const _0x301e32=a111_0x4804,_0x414a25=a111_0xa72ae0['resolve'](_0x22b7fa);if(!existsSync(_0x414a25))throw new Error('File\x20not\x20found:\x20'+_0x22b7fa);let _0x25fefe=a111_0xa72ae0[_0x301e32(0x17a)](_0x414a25),_0x1ccd33=null,_0x2e0bad=null;const _0x38e3f5=a111_0xa72ae0[_0x301e32(0x17d)](_0x25fefe)['root'];while(_0x25fefe!==_0x38e3f5){const _0x21acb0=a111_0xa72ae0[_0x301e32(0x177)](_0x25fefe,_0x301e32(0x179));if(existsSync(_0x21acb0)){_0x1ccd33=_0x21acb0,_0x2e0bad=_0x25fefe;break;}_0x25fefe=a111_0xa72ae0['dirname'](_0x25fefe);}if(!_0x1ccd33||!_0x2e0bad)throw new Error(_0x301e32(0x183)+_0x22b7fa);const _0x1cd736=readFileSync(_0x1ccd33,_0x301e32(0x187)),_0x1d27f1=JSON[_0x301e32(0x17d)](_0x1cd736),_0x7e605b=_0x1d27f1[_0x301e32(0x18c)];if(!_0x7e605b)throw new Error(_0x301e32(0x180));const _0x20d04c=readFileSync(_0x414a25,_0x301e32(0x187)),_0x5e14fe=a111_0x1f6881(_0x20d04c),_0xf015b1=_0x5e14fe[_0x301e32(0x186)];if(!_0xf015b1)throw new Error('Invalid\x20YAML:\x20missing\x20name\x20field\x20in\x20'+_0x22b7fa);const _0x5073ab=_0x5e14fe[_0x301e32(0x166)]===_0x301e32(0x168)?'journey':'segment',_0x4f2e32=a111_0xa72ae0[_0x301e32(0x162)](_0x2e0bad,_0x414a25),_0x39440d=a111_0xa72ae0[_0x301e32(0x17a)](_0x4f2e32),_0x58eb2b=_0x39440d==='.'?'':_0x39440d['replace'](/\\/g,'/'),_0xc1f58d=_0x58eb2b?_0x7e605b+'/'+_0x58eb2b+'/'+_0xf015b1:_0x7e605b+'/'+_0xf015b1;return{'parentSegment':_0x7e605b,'segmentName':_0xf015b1,'folderPath':_0x58eb2b,'fullPath':_0xc1f58d,'resourceType':_0x5073ab};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a112_0x2c48(_0x578b50,_0x122856){_0x578b50=_0x578b50-0x191;const _0x3e64f6=a112_0x3e64();let _0x2c48cf=_0x3e64f6[_0x578b50];return _0x2c48cf;}(function(_0xe9d699,_0xc5ae35){const _0x9633a2=a112_0x2c48,_0x16d032=_0xe9d699();while(!![]){try{const _0x56c82e=parseInt(_0x9633a2(0x19f))/0x1*(parseInt(_0x9633a2(0x199))/0x2)+-parseInt(_0x9633a2(0x1a0))/0x3+parseInt(_0x9633a2(0x198))/0x4*(parseInt(_0x9633a2(0x191))/0x5)+parseInt(_0x9633a2(0x196))/0x6*(-parseInt(_0x9633a2(0x19e))/0x7)+parseInt(_0x9633a2(0x195))/0x8*(-parseInt(_0x9633a2(0x19b))/0x9)+parseInt(_0x9633a2(0x19c))/0xa*(-parseInt(_0x9633a2(0x197))/0xb)+parseInt(_0x9633a2(0x194))/0xc;if(_0x56c82e===_0xc5ae35)break;else _0x16d032['push'](_0x16d032['shift']());}catch(_0x25952){_0x16d032['push'](_0x16d032['shift']());}}}(a112_0x3e64,0x7d7cd));export function parseSegmentRef(_0x2ecb8c){const _0x219ab9=a112_0x2c48,_0x4c7d7d=_0x2ecb8c['indexOf']('/');if(_0x4c7d7d===-0x1)return{'parentId':_0x2ecb8c};if(_0x4c7d7d===0x0)throw new Error('Invalid\x20segment\x20reference\x20format:\x20'+_0x2ecb8c+_0x219ab9(0x193));const _0x711ad8=_0x2ecb8c[_0x219ab9(0x19d)](0x0,_0x4c7d7d),_0x1404a6=_0x2ecb8c['substring'](_0x4c7d7d+0x1);if(_0x1404a6==='')throw new Error(_0x219ab9(0x192)+_0x2ecb8c+_0x219ab9(0x19a));return{'parentId':_0x711ad8,'childId':_0x1404a6};}function a112_0x3e64(){const _0x3ad746=['.\x20Parent\x20name\x20cannot\x20be\x20empty','19370736NijbnB','95120tKntbf','2320062uigOir','157839RhGJjw','569140soHvjD','2JTtriy','.\x20Child\x20name\x20cannot\x20be\x20empty','198DfAIWW','610lUVnwX','substring','14mSgYng','729127aifymS','611115jQHtvN','10dtmDFP','Invalid\x20segment\x20reference\x20format:\x20'];a112_0x3e64=function(){return _0x3ad746;};return a112_0x3e64();}
|
package/dist/utils/spinner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a113_0x4c1c(_0xc03c24,_0x3c8832){_0xc03c24=_0xc03c24-0x74;const _0x441b44=a113_0x441b();let _0x4c1c18=_0x441b44[_0xc03c24];return _0x4c1c18;}(function(_0x484b97,_0x350b02){const _0x31e93a=a113_0x4c1c,_0x4852c9=_0x484b97();while(!![]){try{const _0x53698a=parseInt(_0x31e93a(0x78))/0x1*(-parseInt(_0x31e93a(0x87))/0x2)+-parseInt(_0x31e93a(0x7d))/0x3+-parseInt(_0x31e93a(0x88))/0x4+-parseInt(_0x31e93a(0x83))/0x5+parseInt(_0x31e93a(0x82))/0x6*(parseInt(_0x31e93a(0x76))/0x7)+-parseInt(_0x31e93a(0x7a))/0x8*(-parseInt(_0x31e93a(0x7c))/0x9)+-parseInt(_0x31e93a(0x89))/0xa*(-parseInt(_0x31e93a(0x84))/0xb);if(_0x53698a===_0x350b02)break;else _0x4852c9['push'](_0x4852c9['shift']());}catch(_0x35c41c){_0x4852c9['push'](_0x4852c9['shift']());}}}(a113_0x441b,0x931e9));import a113_0x5aaaf3 from'ora';export function createCommandSpinner(_0xf40490,_0x2bc67f={}){const _0x108253=a113_0x4c1c,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x2bc67f;return a113_0x5aaaf3({'text':_0xf40490,'color':_0x108253(0x8d),'isEnabled':forceEnabled||process[_0x108253(0x74)][_0x108253(0x86)]&&!verbose});}export async function withSpinner(_0x3ae917,_0x5242b8,_0x3d8d46={}){const _0x2016b8=a113_0x4c1c,_0x47f6fa=_0x3d8d46['clock']??(()=>Date['now']()),_0x1419dd=createCommandSpinner(_0x3ae917,_0x3d8d46);_0x1419dd[_0x2016b8(0x7b)]();const _0x5a2ef8=_0x47f6fa();try{const _0x2c4709=await _0x5242b8(),_0x4b0e13=_0x47f6fa()-_0x5a2ef8;return _0x1419dd[_0x2016b8(0x8b)](),{'data':_0x2c4709,'elapsedMs':_0x4b0e13};}catch(_0x263b19){_0x1419dd[_0x2016b8(0x8b)]();throw _0x263b19;}}function a113_0x441b(){const _0x2d85d1=['269631XdVQmG','3430068kaKFUN','floor','isSpinning','jobId','\x20[Job\x20ID:\x20','470658DOGSQj','3155585PncbJV','34393656opLOAP','intervalFactory','isTTY','4IaDSjF','4186504axhRnV','10XLJrxn','clock','stop','now','cyan','stdout','phase','7KZVYfT','extra','295166wjZsuI','text','216Yutadb','start'];a113_0x441b=function(){return _0x2d85d1;};return a113_0x441b();}export async function withQuerySpinner(_0x54d400,_0x589d29,_0x1cb8a3={}){const _0x5d693e=a113_0x4c1c,_0x2360d3=_0x1cb8a3[_0x5d693e(0x8a)]??(()=>Date[_0x5d693e(0x8c)]()),_0x39c600=_0x1cb8a3[_0x5d693e(0x85)]??setInterval,_0x32217e=createCommandSpinner(_0x54d400,_0x1cb8a3);_0x32217e[_0x5d693e(0x7b)]();const _0x492317=_0x2360d3(),_0x1a8093=_0x54d400['replace']('...',''),_0x51843d={},_0x701121=()=>{const _0x1020ec=_0x5d693e;if(!_0x32217e[_0x1020ec(0x7f)])return;const _0x49108d=_0x2360d3()-_0x492317,_0x391ac5=formatElapsed(_0x49108d),_0x22fccb=_0x51843d[_0x1020ec(0x75)]??_0x1a8093,_0x13d62a=_0x51843d[_0x1020ec(0x80)]?_0x1020ec(0x81)+_0x51843d[_0x1020ec(0x80)]+']':'',_0x21bff8=_0x51843d[_0x1020ec(0x77)]?'\x20'+_0x51843d[_0x1020ec(0x77)]:'';_0x32217e[_0x1020ec(0x79)]=_0x22fccb+'\x20'+_0x391ac5+_0x21bff8+_0x13d62a;},_0x29f837=_0x39c600(()=>{_0x701121();},0x3e8),_0xdd8897={'setPhase':_0x85a015=>{const _0x15bebc=_0x5d693e;_0x51843d[_0x15bebc(0x75)]=_0x85a015,_0x701121();},'setJobId':_0x21c826=>{const _0x16d023=_0x5d693e;_0x51843d[_0x16d023(0x80)]=_0x21c826,_0x701121();},'setExtra':_0x3826c1=>{const _0x62ab87=_0x5d693e;_0x51843d[_0x62ab87(0x77)]=_0x3826c1,_0x701121();}};_0x701121();try{const _0x42d700=await _0x589d29(_0xdd8897),_0xa997e7=_0x2360d3()-_0x492317;return{'data':_0x42d700,'elapsedMs':_0xa997e7};}finally{clearInterval(_0x29f837),_0x32217e['stop']();}}export function formatElapsed(_0xbc8e0f){const _0x4b3520=a113_0x4c1c,_0x104071=Math[_0x4b3520(0x7e)](_0xbc8e0f/0x3e8);if(_0x104071<0x3c)return(_0xbc8e0f/0x3e8)['toFixed'](0x1)+'s';const _0x4e56ce=Math[_0x4b3520(0x7e)](_0x104071/0x3c),_0x59ab68=_0x104071%0x3c;if(_0x4e56ce<0x3c)return _0x4e56ce+'m\x20'+_0x59ab68+'s';const _0x42e21e=Math['floor'](_0x4e56ce/0x3c),_0x34011e=_0x4e56ce%0x3c;return _0x42e21e+'h\x20'+_0x34011e+'m';}
|
package/dist/utils/sql-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xb7d40e,_0x166a67){const _0x1dd348=a114_0x5115,_0xb3359e=_0xb7d40e();while(!![]){try{const _0x21d9cd=parseInt(_0x1dd348(0x173))/0x1+parseInt(_0x1dd348(0x181))/0x2*(-parseInt(_0x1dd348(0x183))/0x3)+parseInt(_0x1dd348(0x178))/0x4*(-parseInt(_0x1dd348(0x17e))/0x5)+-parseInt(_0x1dd348(0x16b))/0x6+-parseInt(_0x1dd348(0x170))/0x7+-parseInt(_0x1dd348(0x186))/0x8+parseInt(_0x1dd348(0x172))/0x9;if(_0x21d9cd===_0x166a67)break;else _0xb3359e['push'](_0xb3359e['shift']());}catch(_0x4ae626){_0xb3359e['push'](_0xb3359e['shift']());}}}(a114_0x2f15,0x2ce30));import{readFileSync}from'fs';import{createInterface}from'readline';function a114_0x2f15(){const _0x2c22ac=['Content\x20contains\x20no\x20SQL\x20statements','map','EACCES','error','5bPuqdJ','message','No\x20input\x20provided.\x20Pipe\x20SQL\x20to\x20stdin\x20or\x20use\x20a\x20file.\x0aExample:\x20echo\x20\x22SELECT\x201\x22\x20|\x20tdx\x20query\x20-','2ExfAhK','Error\x20reading\x20from\x20stdin:\x20','821865EqNcTd','trim','File\x20\x27','2669080cQnVvG','toLowerCase','length','\x27\x20not\x20found','line','895548DjLDWr','push','replace','isTTY','join','476882fUaUCT','filter','9497502VOzgOx','282333YQOQKQ','code','close','Permission\x20denied\x20reading\x20file\x20\x27','utf-8','1315124mCvxMo','stdin\x20'];a114_0x2f15=function(){return _0x2c22ac;};return a114_0x2f15();}export function stripSqlComments(_0x2fa379){const _0x19b063=a114_0x5115;let _0x3dfd51=_0x2fa379[_0x19b063(0x16d)](/\/\*(?:[^*]|\*(?!\/))*\*\//g,'');return _0x3dfd51=_0x3dfd51['replace'](/--.*$/gm,''),_0x3dfd51[_0x19b063(0x184)]();}function isEscaped(_0x207b61,_0x2428f0){let _0x55b24d=0x0;for(let _0x5b12dd=_0x2428f0-0x1;_0x5b12dd>=0x0&&_0x207b61[_0x5b12dd]==='\x5c';_0x5b12dd--){_0x55b24d++;}return _0x55b24d%0x2===0x1;}export function splitSqlStatements(_0x23d1ba){const _0x199828=a114_0x5115,_0x19666c=stripSqlComments(_0x23d1ba);if(!_0x19666c)throw new Error(_0x199828(0x17a));const _0x11fa72=[];let _0x508a58='',_0x4e12d2=![],_0x2d19d3=![],_0x16348e=![];for(let _0x15726d=0x0;_0x15726d<_0x23d1ba[_0x199828(0x188)];_0x15726d++){const _0x5cdfa7=_0x23d1ba[_0x15726d];if(_0x5cdfa7==='\x27'&&!isEscaped(_0x23d1ba,_0x15726d)&&!_0x2d19d3&&!_0x16348e)_0x4e12d2=!_0x4e12d2;else{if(_0x5cdfa7==='\x22'&&!isEscaped(_0x23d1ba,_0x15726d)&&!_0x4e12d2&&!_0x16348e)_0x2d19d3=!_0x2d19d3;else _0x5cdfa7==='`'&&!isEscaped(_0x23d1ba,_0x15726d)&&!_0x4e12d2&&!_0x2d19d3&&(_0x16348e=!_0x16348e);}if(_0x5cdfa7===';'&&!_0x4e12d2&&!_0x2d19d3&&!_0x16348e){const _0x1ed657=_0x508a58[_0x199828(0x184)]();_0x1ed657&&_0x11fa72[_0x199828(0x16c)](_0x1ed657),_0x508a58='';}else _0x508a58+=_0x5cdfa7;}const _0x460732=_0x508a58[_0x199828(0x184)]();_0x460732&&_0x11fa72[_0x199828(0x16c)](_0x460732);const _0x429483=_0x11fa72[_0x199828(0x17b)](_0x4c7b71=>_0x4c7b71[_0x199828(0x184)]())[_0x199828(0x171)](_0x2c1431=>{const _0x50f189=_0x199828,_0x47753f=stripSqlComments(_0x2c1431);return _0x47753f[_0x50f189(0x188)]>0x0;});if(_0x429483[_0x199828(0x188)]===0x0)throw new Error('Content\x20contains\x20no\x20SQL\x20statements');return _0x429483;}export function readFileContent(_0x536654){const _0x5552f6=a114_0x5115;try{return readFileSync(_0x536654,_0x5552f6(0x177));}catch(_0x20a0b3){const _0x21a6d6=_0x20a0b3[_0x5552f6(0x174)];if(_0x21a6d6==='ENOENT')throw new Error('File\x20\x27'+_0x536654+_0x5552f6(0x169));else{if(_0x21a6d6===_0x5552f6(0x17c))throw new Error(_0x5552f6(0x176)+_0x536654+'\x27');else throw new Error('Error\x20reading\x20file\x20\x27'+_0x536654+'\x27:\x20'+_0x20a0b3[_0x5552f6(0x17f)]);}}}export function readSqlStatementsFromFile(_0x4a0c69){const _0x548067=a114_0x5115,_0x39c480=readFileContent(_0x4a0c69);try{return splitSqlStatements(_0x39c480);}catch(_0x81d7f6){throw new Error(_0x548067(0x185)+_0x4a0c69+'\x27\x20'+_0x81d7f6[_0x548067(0x17f)][_0x548067(0x187)]());}}function a114_0x5115(_0x3ca215,_0x2a8c4d){_0x3ca215=_0x3ca215-0x169;const _0x2f15dd=a114_0x2f15();let _0x511505=_0x2f15dd[_0x3ca215];return _0x511505;}export async function readStdinContent(){const _0x2af1b1=a114_0x5115;if(process['stdin'][_0x2af1b1(0x16e)])throw new Error(_0x2af1b1(0x180));return new Promise((_0x1a6671,_0x188ac8)=>{const _0x5253da=_0x2af1b1,_0x50e90b=[],_0x1b3010=createInterface({'input':process['stdin'],'terminal':![]});_0x1b3010['on'](_0x5253da(0x16a),_0x1e17fa=>{const _0x45e185=_0x5253da;_0x50e90b[_0x45e185(0x16c)](_0x1e17fa);}),_0x1b3010['on'](_0x5253da(0x175),()=>{const _0x231441=_0x5253da;_0x1a6671(_0x50e90b[_0x231441(0x16f)]('\x0a'));}),_0x1b3010['on'](_0x5253da(0x17d),_0x420bb2=>{const _0x1b8821=_0x5253da;_0x1b3010[_0x1b8821(0x175)](),_0x188ac8(new Error(_0x1b8821(0x182)+_0x420bb2[_0x1b8821(0x17f)]));});});}export async function readSqlStatementsFromStdin(){const _0x385cef=a114_0x5115,_0x363777=await readStdinContent();try{return splitSqlStatements(_0x363777);}catch(_0x3a89b8){throw new Error(_0x385cef(0x179)+_0x3a89b8[_0x385cef(0x17f)][_0x385cef(0x187)]());}}export function isSqlFilePath(_0x100908){return/\w\.sql$/['test'](_0x100908);}
|
package/dist/utils/sse-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x30c1df,_0x38037c){const _0x50fcf7=a115_0x39db,_0xf14f53=_0x30c1df();while(!![]){try{const _0x37e6a6=parseInt(_0x50fcf7(0x1e7))/0x1*(parseInt(_0x50fcf7(0x1d9))/0x2)+-parseInt(_0x50fcf7(0x1e2))/0x3*(-parseInt(_0x50fcf7(0x1e1))/0x4)+-parseInt(_0x50fcf7(0x1e8))/0x5*(parseInt(_0x50fcf7(0x1db))/0x6)+-parseInt(_0x50fcf7(0x1d3))/0x7*(parseInt(_0x50fcf7(0x1d4))/0x8)+parseInt(_0x50fcf7(0x1e5))/0x9*(-parseInt(_0x50fcf7(0x1e0))/0xa)+parseInt(_0x50fcf7(0x1e9))/0xb+-parseInt(_0x50fcf7(0x1dd))/0xc*(parseInt(_0x50fcf7(0x1d1))/0xd);if(_0x37e6a6===_0x38037c)break;else _0xf14f53['push'](_0xf14f53['shift']());}catch(_0x39a701){_0xf14f53['push'](_0xf14f53['shift']());}}}(a115_0x42f8,0x19e49));export async function*parseSSEStream(_0x2316b5,_0x2cfa55){const _0x26fcfc=a115_0x39db;if(!_0x2316b5[_0x26fcfc(0x1e6)])throw new Error('Response\x20body\x20is\x20null');const _0x4b07f9=_0x2316b5[_0x26fcfc(0x1e6)][_0x26fcfc(0x1da)](),_0x33d10d=new TextDecoder();let _0x48181f='',_0x3f65d0={};try{while(!![]){const {done:_0x4e28fc,value:_0xfefe39}=await _0x4b07f9['read']();if(_0x4e28fc){if(_0x3f65d0[_0x26fcfc(0x1d5)]){_0x2cfa55?.[_0x26fcfc(0x1d8)]('[LLM\x20API\x20SSE]\x20'+_0x3f65d0[_0x26fcfc(0x1d5)]);const _0xb6374a=parseSSEData(_0x3f65d0[_0x26fcfc(0x1d5)]);yield _0xb6374a;}break;}_0x48181f+=_0x33d10d[_0x26fcfc(0x1ea)](_0xfefe39,{'stream':!![]});const _0x1b91fa=_0x48181f['split']('\x0a');_0x48181f=_0x1b91fa[_0x26fcfc(0x1e4)]()||'';for(const _0x594b66 of _0x1b91fa){if(_0x594b66[_0x26fcfc(0x1de)]()===''){if(_0x3f65d0[_0x26fcfc(0x1d5)]){_0x2cfa55?.[_0x26fcfc(0x1d8)]('[LLM\x20API\x20SSE]\x20'+_0x3f65d0['data']);const _0x1ac1f7=parseSSEData(_0x3f65d0[_0x26fcfc(0x1d5)]);yield _0x1ac1f7,_0x3f65d0={};}continue;}if(_0x594b66[_0x26fcfc(0x1df)](':'))continue;const _0x6d600c=_0x594b66['indexOf'](':');if(_0x6d600c===-0x1)continue;const _0x4bf007=_0x594b66['slice'](0x0,_0x6d600c);let _0x1a0895=_0x594b66['slice'](_0x6d600c+0x1);_0x1a0895['startsWith']('\x20')&&(_0x1a0895=_0x1a0895[_0x26fcfc(0x1d2)](0x1));switch(_0x4bf007){case _0x26fcfc(0x1d6):_0x3f65d0['event']=_0x1a0895;break;case _0x26fcfc(0x1d5):_0x3f65d0[_0x26fcfc(0x1d5)]=_0x3f65d0[_0x26fcfc(0x1d5)]?_0x3f65d0[_0x26fcfc(0x1d5)]+'\x0a'+_0x1a0895:_0x1a0895;break;case'id':_0x3f65d0['id']=_0x1a0895;break;}}}}finally{_0x4b07f9[_0x26fcfc(0x1d7)]();}}function a115_0x39db(_0x2b1f8f,_0x3f18f6){_0x2b1f8f=_0x2b1f8f-0x1d1;const _0x42f8f3=a115_0x42f8();let _0x39db60=_0x42f8f3[_0x2b1f8f];return _0x39db60;}function a115_0x42f8(){const _0x5ee75f=['data','event','releaseLock','debug','4550vIDXOp','getReader','6pcbBmF','parse','411588oTjQvY','trim','startsWith','26890mdMcZi','276QwUGlF','8094RNOVsC','Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20','pop','279sntHiQ','body','71rXztmD','26570mEceBJ','558525rPgvwJ','decode','13UgHnTn','slice','1477TchPMz','6424SlykAW'];a115_0x42f8=function(){return _0x5ee75f;};return a115_0x42f8();}function parseSSEData(_0x541b6e){const _0x3bfa26=a115_0x39db;try{return JSON[_0x3bfa26(0x1dc)](_0x541b6e);}catch(_0x3599e9){throw new Error(_0x3bfa26(0x1e3)+_0x541b6e,{'cause':_0x3599e9});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1fb4f3,_0x3d3713){const _0x438f98=a116_0x3e06,_0x6dd051=_0x1fb4f3();while(!![]){try{const _0x35078c=-parseInt(_0x438f98(0x200))/0x1+-parseInt(_0x438f98(0x1ef))/0x2*(-parseInt(_0x438f98(0x1f9))/0x3)+-parseInt(_0x438f98(0x1fc))/0x4+-parseInt(_0x438f98(0x1fa))/0x5*(-parseInt(_0x438f98(0x1ee))/0x6)+parseInt(_0x438f98(0x1f1))/0x7+parseInt(_0x438f98(0x202))/0x8*(-parseInt(_0x438f98(0x1fe))/0x9)+parseInt(_0x438f98(0x1f7))/0xa;if(_0x35078c===_0x3d3713)break;else _0x6dd051['push'](_0x6dd051['shift']());}catch(_0x12a33b){_0x6dd051['push'](_0x6dd051['shift']());}}}(a116_0x3d66,0x2c3f5));import a116_0x50a890 from'string-width';export function stringWidth(_0x2e51f8){return a116_0x50a890(_0x2e51f8);}export function padEnd(_0x4bdd65,_0x23e827){const _0xc99565=a116_0x3e06,_0x51ab92=stringWidth(_0x4bdd65);if(_0x51ab92>=_0x23e827)return _0x4bdd65;return _0x4bdd65+'\x20'[_0xc99565(0x1f2)](_0x23e827-_0x51ab92);}export function padStart(_0x3cab8d,_0x17728d){const _0x3d6f9f=stringWidth(_0x3cab8d);if(_0x3d6f9f>=_0x17728d)return _0x3cab8d;return'\x20'['repeat'](_0x17728d-_0x3d6f9f)+_0x3cab8d;}export function centerAlign(_0x28cfcf,_0x1fe254){const _0x4f3351=a116_0x3e06,_0x135509=stringWidth(_0x28cfcf);if(_0x135509>_0x1fe254){if(_0x1fe254<=0x1)return'β¦'[_0x4f3351(0x1ec)](0x0,_0x1fe254);let _0x426ec2=_0x28cfcf;while(stringWidth(_0x426ec2+'β¦')>_0x1fe254){_0x426ec2=_0x426ec2[_0x4f3351(0x1ed)](0x0,-0x1);}return _0x426ec2+'β¦';}if(_0x135509===_0x1fe254)return _0x28cfcf;const _0x34d41c=_0x1fe254-_0x135509,_0x17de2d=Math[_0x4f3351(0x201)](_0x34d41c/0x2),_0xe66da1=_0x34d41c-_0x17de2d;return'\x20'[_0x4f3351(0x1f2)](_0x17de2d)+_0x28cfcf+'\x20'[_0x4f3351(0x1f2)](_0xe66da1);}export function escapeStringLiteral(_0x378a08){const _0x24609e=a116_0x3e06;if(!_0x378a08||_0x378a08[_0x24609e(0x1f3)]()[_0x24609e(0x204)]===0x0)throw new Error(_0x24609e(0x1fb));const _0x3414f3=_0x378a08['replace'](/'/g,'\x27\x27');return'\x27'+_0x3414f3+'\x27';}export function globToLike(_0x2afc47){const _0x2fe750=a116_0x3e06;let _0x27a6a7=_0x2afc47[_0x2fe750(0x1f4)](/\\/g,'\x5c\x5c')[_0x2fe750(0x1f4)](/%/g,'\x5c%')['replace'](/_/g,'\x5c_');return _0x27a6a7=_0x27a6a7['replace'](/\*/g,'%')[_0x2fe750(0x1f4)](/\?/g,'_'),_0x27a6a7;}export function buildLikePattern(_0x3042cb){const _0x41f65d=a116_0x3e06;if(!_0x3042cb||_0x3042cb[_0x41f65d(0x1f3)]()[_0x41f65d(0x204)]===0x0)throw new Error(_0x41f65d(0x1f6));const _0x509313=globToLike(_0x3042cb),_0x265855=_0x509313['replace'](/'/g,'\x27\x27');return'\x27'+_0x265855+'\x27';}function a116_0x3e06(_0x75f124,_0x39ea5e){_0x75f124=_0x75f124-0x1ec;const _0x3d669b=a116_0x3d66();let _0x3e065e=_0x3d669b[_0x75f124];return _0x3e065e;}function a116_0x3d66(){const _0x573dd1=['602700EqXpov','unknown','3OABSRB','10ACZqDM','Cannot\x20escape\x20empty\x20string\x20literal','101372AOGfZC','toLowerCase','1032390hLYflK','env','42622SeDkfB','floor','24qNbpPI','toString','length','USER','substring','slice','885594DwzDzs','129494zpmDdT','\x5c$&','1211819ugZeCq','repeat','trim','replace','random','Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string'];a116_0x3d66=function(){return _0x573dd1;};return a116_0x3d66();}export function matchGlobPattern(_0x16896c,_0x399ab8){const _0x55474e=a116_0x3e06,_0xf2ae9c=_0x399ab8[_0x55474e(0x1f4)](/[.+^${}()|[\]\\]/g,_0x55474e(0x1f0))[_0x55474e(0x1f4)](/\*/g,'.*')[_0x55474e(0x1f4)](/\?/g,'.'),_0x1d8948=new RegExp('^'+_0xf2ae9c+'$');return _0x1d8948['test'](_0x16896c);}export function getSanitizedUsername(){const _0x44f79a=a116_0x3e06,_0x45f9ee=process[_0x44f79a(0x1ff)][_0x44f79a(0x205)]||process['env']['USERNAME']||_0x44f79a(0x1f8);return _0x45f9ee[_0x44f79a(0x1f4)](/[^a-zA-Z0-9]/g,'')[_0x44f79a(0x1fd)]();}export function generateRandomHex(){const _0x10e8b3=a116_0x3e06,_0x23c0e0=Math['floor'](Math[_0x10e8b3(0x1f5)]()*0xfffff);return _0x23c0e0[_0x10e8b3(0x203)](0x10)['padStart'](0x5,'0');}export function sanitizeFileName(_0x1554cc){const _0xd5b2e2=a116_0x3e06;return _0x1554cc[_0xd5b2e2(0x1fd)]()[_0xd5b2e2(0x1f4)](/[/\\:*?"<>|]/g,'-')[_0xd5b2e2(0x1f4)](/\s+/g,'-')['replace'](/-+/g,'-')[_0xd5b2e2(0x1f4)](/^-|-$/g,'');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x58cd41,_0x413cd8){const _0x4865f7=a117_0x4963,_0x1d5d06=_0x58cd41();while(!![]){try{const _0x16b445=-parseInt(_0x4865f7(0x175))/0x1+-parseInt(_0x4865f7(0x176))/0x2*(-parseInt(_0x4865f7(0x167))/0x3)+-parseInt(_0x4865f7(0x15d))/0x4*(-parseInt(_0x4865f7(0x15f))/0x5)+-parseInt(_0x4865f7(0x16c))/0x6+parseInt(_0x4865f7(0x173))/0x7+-parseInt(_0x4865f7(0x162))/0x8*(-parseInt(_0x4865f7(0x161))/0x9)+-parseInt(_0x4865f7(0x170))/0xa;if(_0x16b445===_0x413cd8)break;else _0x1d5d06['push'](_0x1d5d06['shift']());}catch(_0x47d1f7){_0x1d5d06['push'](_0x1d5d06['shift']());}}}(a117_0x44ad,0x4324f));function a117_0x4963(_0x373e96,_0x17fe78){_0x373e96=_0x373e96-0x15d;const _0x44ad91=a117_0x44ad();let _0x49636a=_0x44ad91[_0x373e96];return _0x49636a;}function hasWildcard(_0x513999){const _0x1b7fb0=a117_0x4963;return _0x513999[_0x1b7fb0(0x160)]('*')||_0x513999[_0x1b7fb0(0x160)]('?');}export function parseTableReference(_0x3195d4){const _0xa2eb09=a117_0x4963;if(!_0x3195d4||_0x3195d4['trim']()[_0xa2eb09(0x16d)]===0x0)throw new Error(_0xa2eb09(0x15e));const _0x388813=_0x3195d4[_0xa2eb09(0x172)](),_0x1ab95f={'original':_0x388813},_0x504b41=_0x388813[_0xa2eb09(0x178)]('.');if(_0x504b41[_0xa2eb09(0x16d)]===0x1){const _0x24d20f=_0x504b41[0x0];if(!_0x24d20f)throw new Error(_0xa2eb09(0x174));_0x1ab95f[_0xa2eb09(0x171)]=_0x24d20f;}else{if(_0x504b41[_0xa2eb09(0x16d)]===0x2){const [_0x451d71,_0x301cf4]=_0x504b41;if(!_0x451d71)throw new Error(_0xa2eb09(0x163));if(!_0x301cf4)throw new Error(_0xa2eb09(0x16a));_0x1ab95f[_0xa2eb09(0x165)]=_0x451d71,_0x1ab95f[_0xa2eb09(0x171)]=_0x301cf4;}else{if(_0x504b41[_0xa2eb09(0x16d)]===0x3){const [_0x3cffad,_0x16f817,_0x1c671c]=_0x504b41;if(!_0x3cffad||!_0x16f817||!_0x1c671c)throw new Error(_0xa2eb09(0x16e));_0x1ab95f[_0xa2eb09(0x177)]=_0x3cffad,_0x1ab95f[_0xa2eb09(0x165)]=_0x16f817,_0x1ab95f[_0xa2eb09(0x171)]=_0x1c671c;}else throw new Error(_0xa2eb09(0x16b));}}return _0x1ab95f;}export function formatTableReference(_0x228eeb){const _0x349a9f=a117_0x4963,_0x496624=[];return _0x228eeb[_0x349a9f(0x177)]&&_0x496624['push'](_0x228eeb[_0x349a9f(0x177)]),_0x228eeb[_0x349a9f(0x165)]&&_0x496624[_0x349a9f(0x168)](_0x228eeb[_0x349a9f(0x165)]),_0x228eeb[_0x349a9f(0x171)]&&_0x496624[_0x349a9f(0x168)](_0x228eeb['table']),_0x496624[_0x349a9f(0x169)]('.');}export function validateTableListReference(_0x5cdca5){return undefined;}export function validateTableDescribeReference(_0x1db3c5){const _0x558bb1=a117_0x4963;if(!_0x1db3c5['table'])return _0x558bb1(0x166);if(_0x1db3c5[_0x558bb1(0x165)]&&hasWildcard(_0x1db3c5[_0x558bb1(0x165)]))return _0x558bb1(0x164);if(hasWildcard(_0x1db3c5[_0x558bb1(0x171)]))return _0x558bb1(0x16f);return undefined;}function a117_0x44ad(){const _0x2e9463=['12MyGtSB','push','join','Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)','Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)','2062770joWSzK','length','Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty','Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation','2244740zLVnIF','table','trim','2550723pqbqWS','Pattern\x20cannot\x20be\x20just\x20a\x20dot','88903AJSZFn','43178zQiRZR','catalog','split','4CLETqv','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','2033855RFguPN','includes','99urShiI','54312kWKPGw','Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','database','Table\x20name\x20is\x20required\x20for\x20describe\x20operation'];a117_0x44ad=function(){return _0x2e9463;};return a117_0x44ad();}
|
package/dist/utils/tdx-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a118_0x5f9ae8=a118_0x5cea;(function(_0x37c6c2,_0x483eb2){const _0x2a79a1=a118_0x5cea,_0x59ad64=_0x37c6c2();while(!![]){try{const _0x2bb812=parseInt(_0x2a79a1(0x139))/0x1+parseInt(_0x2a79a1(0x13c))/0x2+-parseInt(_0x2a79a1(0x137))/0x3*(parseInt(_0x2a79a1(0x12f))/0x4)+parseInt(_0x2a79a1(0x136))/0x5+-parseInt(_0x2a79a1(0x12e))/0x6*(parseInt(_0x2a79a1(0x131))/0x7)+parseInt(_0x2a79a1(0x134))/0x8*(parseInt(_0x2a79a1(0x146))/0x9)+-parseInt(_0x2a79a1(0x13f))/0xa;if(_0x2bb812===_0x483eb2)break;else _0x59ad64['push'](_0x59ad64['shift']());}catch(_0xcc5b13){_0x59ad64['push'](_0x59ad64['shift']());}}}(a118_0x394a,0x27599));import{existsSync,readFileSync}from'fs';import a118_0x1ea36a from'path';const TDX_CONFIG_FILE='tdx.json',SEGMENTS_DIR=a118_0x5f9ae8(0x135);export function findTdxConfigPath(_0x1f246b=process[a118_0x5f9ae8(0x142)]()){const _0x2bf4ce=a118_0x5f9ae8;let _0x7220fc=a118_0x1ea36a[_0x2bf4ce(0x138)](_0x1f246b);const _0x530a82=a118_0x1ea36a['parse'](_0x7220fc)[_0x2bf4ce(0x132)];while(_0x7220fc!==_0x530a82){const _0x57df20=a118_0x1ea36a[_0x2bf4ce(0x145)](_0x7220fc,TDX_CONFIG_FILE);if(existsSync(_0x57df20))return _0x57df20;_0x7220fc=a118_0x1ea36a['dirname'](_0x7220fc);}return null;}function a118_0x394a(){const _0x2e7d38=['44DZkjSu','dirname','37170ZDAjks','root','parse','48sgvzmL','segments','1598645kdGEpk','82437hGDfTH','resolve','179134VxEYbt','object','replace','582080KThXuO','parent_segment','stringify','2603250PPXJXv','startsWith','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','cwd','Invalid\x20tdx.json:\x20expected\x20object','utf-8','join','131787cmbnQy','string','174jrceSw'];a118_0x394a=function(){return _0x2e7d38;};return a118_0x394a();}export function loadTdxConfig(_0x242649){const _0x320a2c=a118_0x5f9ae8,_0x4d8b70=readFileSync(_0x242649,_0x320a2c(0x144));let _0x1aedcb;try{_0x1aedcb=JSON[_0x320a2c(0x133)](_0x4d8b70);}catch{throw new Error('Invalid\x20JSON\x20in\x20'+_0x242649);}if(!_0x1aedcb||typeof _0x1aedcb!==_0x320a2c(0x13a))throw new Error(_0x320a2c(0x143));const _0x17803b=_0x1aedcb;if(!_0x17803b[_0x320a2c(0x13d)]||typeof _0x17803b[_0x320a2c(0x13d)]!==_0x320a2c(0x12d))throw new Error('Invalid\x20tdx.json:\x20missing\x20or\x20invalid\x20\x27parent_segment\x27\x20field');return{'parent_segment':_0x17803b[_0x320a2c(0x13d)]};}export function findTdxConfig(_0x2d18ff=process['cwd']()){const _0x5ae16e=a118_0x5f9ae8,_0x455b04=findTdxConfigPath(_0x2d18ff);if(!_0x455b04)throw new Error(_0x5ae16e(0x141));const _0x1fadde=loadTdxConfig(_0x455b04),_0xa21f98=a118_0x1ea36a[_0x5ae16e(0x130)](_0x455b04);return{'config':_0x1fadde,'configPath':_0x455b04,'configDir':_0xa21f98};}export function getSegmentRootDir(_0x484c8b,_0x1e7a70=process['cwd']()){const _0x2fa45f=a118_0x5f9ae8;return a118_0x1ea36a[_0x2fa45f(0x145)](_0x1e7a70,SEGMENTS_DIR,_0x484c8b);}export function getTdxConfigPath(_0x485b4c,_0x134cde=process['cwd']()){const _0x2c8c20=a118_0x5f9ae8;return a118_0x1ea36a[_0x2c8c20(0x145)](getSegmentRootDir(_0x485b4c,_0x134cde),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x450233,_0x209ead){const _0x486087=a118_0x5f9ae8,_0x55c359=a118_0x1ea36a[_0x486087(0x138)](_0x450233),_0x29505d=a118_0x1ea36a['relative'](_0x209ead,_0x55c359);if(_0x29505d[_0x486087(0x140)]('..'))return'';return _0x29505d;}function a118_0x5cea(_0x3912e5,_0x14f096){_0x3912e5=_0x3912e5-0x12d;const _0x394aab=a118_0x394a();let _0x5ceaa4=_0x394aab[_0x3912e5];return _0x5ceaa4;}export function localPathToTdFolderPath(_0x21fc4b){const _0x94f1c7=a118_0x5f9ae8,_0x319b0c=a118_0x1ea36a[_0x94f1c7(0x130)](_0x21fc4b);if(_0x319b0c==='.'||_0x319b0c==='')return'';return _0x319b0c[_0x94f1c7(0x13b)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x4c4ddf,_0x43336a){const _0x15828a=a118_0x5f9ae8;if(!_0x4c4ddf)return _0x43336a;return a118_0x1ea36a[_0x15828a(0x145)](_0x43336a,_0x4c4ddf);}export function createTdxConfigContent(_0x3040c2){const _0xb526bd=a118_0x5f9ae8,_0x292854={'parent_segment':_0x3040c2};return JSON[_0xb526bd(0x13e)](_0x292854,null,0x2)+'\x0a';}
|
package/dist/utils/tdx-logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a119_0x2f2064=a119_0x558b;(function(_0x27c103,_0x301c7f){const _0x1d896e=a119_0x558b,_0x3973e8=_0x27c103();while(!![]){try{const _0x1e126e=-parseInt(_0x1d896e(0x202))/0x1*(-parseInt(_0x1d896e(0x1e8))/0x2)+parseInt(_0x1d896e(0x1f4))/0x3*(-parseInt(_0x1d896e(0x1fe))/0x4)+-parseInt(_0x1d896e(0x1ff))/0x5*(-parseInt(_0x1d896e(0x1f7))/0x6)+parseInt(_0x1d896e(0x1ca))/0x7+-parseInt(_0x1d896e(0x1df))/0x8*(parseInt(_0x1d896e(0x1f0))/0x9)+-parseInt(_0x1d896e(0x1d1))/0xa+-parseInt(_0x1d896e(0x1fb))/0xb;if(_0x1e126e===_0x301c7f)break;else _0x3973e8['push'](_0x3973e8['shift']());}catch(_0x5b7c6c){_0x3973e8['push'](_0x3973e8['shift']());}}}(a119_0x1a3b,0xac4cf));import{createWriteStream,createReadStream}from'fs';function a119_0x1a3b(){const _0x388dca=['.gz','2561049WezqyG','join','toString','init','33nKlMnl','stack','end','18YnEuDF','abs','rotateOldLogs','Warning:\x20Failed\x20to\x20initialize\x20log\x20files:','5939274ASGHaY','getLogPath','getSeconds','66428fpxYwQ','2061345iTFKHg','string','getMilliseconds','10259wbrnQg','fileOnly','split','message','floor','log','logDir','red','debug','Warning:\x20Error\x20writing\x20to\x20tdx.log:','2347051DShLEl','ERROR','error','getFullYear','trace','toISOString','test','951420SrISPj','WARN','.cache','padStart','filter','cause','getTimezoneOffset','.log','getMonth','INFO','write','mtime','Warning:\x20Failed\x20to\x20compress\x20','TRACE','8WxYhVa','warn','logStream','tdx-','logLevel','Proxy\x20session\x20ended','info','getMinutes','name','46ukFHqI','tdx.log','logs','DEBUG','map','gray','tdx'];a119_0x1a3b=function(){return _0x388dca;};return a119_0x1a3b();}import{mkdir,readdir,unlink,stat,rename}from'fs/promises';import{join}from'path';import{homedir}from'os';import{createGzip}from'zlib';function a119_0x558b(_0x4811de,_0x2d7792){_0x4811de=_0x4811de-0x1c6;const _0x1a3bef=a119_0x1a3b();let _0x558bc9=_0x1a3bef[_0x4811de];return _0x558bc9;}import{pipeline}from'stream/promises';import a119_0x3b0935 from'chalk';function safeStringify(_0x46e60d){const _0x16c068=a119_0x558b;if(typeof _0x46e60d===_0x16c068(0x200))return _0x46e60d;if(_0x46e60d instanceof Error)return _0x46e60d[_0x16c068(0x1f5)]||_0x46e60d[_0x16c068(0x1e7)]+':\x20'+_0x46e60d[_0x16c068(0x205)];try{return JSON['stringify'](_0x46e60d,(_0x84381a,_0x409fd1)=>{const _0x180e73=_0x16c068;if(_0x409fd1 instanceof Error)return{'name':_0x409fd1[_0x180e73(0x1e7)],'message':_0x409fd1[_0x180e73(0x205)],'stack':_0x409fd1[_0x180e73(0x1f5)],'cause':_0x409fd1[_0x180e73(0x1d6)]};return _0x409fd1;});}catch{return String(_0x46e60d);}}function getTimezoneOffset(){const _0xf6713c=a119_0x558b,_0x3015ae=-new Date()[_0xf6713c(0x1d7)](),_0x13e9b1=Math[_0xf6713c(0x206)](Math[_0xf6713c(0x1f8)](_0x3015ae)/0x3c),_0x51cf0e=Math[_0xf6713c(0x1f8)](_0x3015ae)%0x3c,_0x257fc4=_0x3015ae>=0x0?'+':'-';return''+_0x257fc4+_0x13e9b1['toString']()[_0xf6713c(0x1d4)](0x2,'0')+_0x51cf0e[_0xf6713c(0x1f2)]()['padStart'](0x2,'0');}function formatTimestamp(){const _0x1b2895=a119_0x558b,_0x3d4363=new Date(),_0x1e22e9=_0x3d4363[_0x1b2895(0x1cd)](),_0x1f1e07=(_0x3d4363[_0x1b2895(0x1d9)]()+0x1)['toString']()['padStart'](0x2,'0'),_0x3d0dea=_0x3d4363['getDate']()[_0x1b2895(0x1f2)]()[_0x1b2895(0x1d4)](0x2,'0'),_0x350ab7=_0x3d4363['getHours']()[_0x1b2895(0x1f2)]()['padStart'](0x2,'0'),_0x2fa5a9=_0x3d4363[_0x1b2895(0x1e6)]()['toString']()['padStart'](0x2,'0'),_0x1a7443=_0x3d4363[_0x1b2895(0x1fd)]()['toString']()[_0x1b2895(0x1d4)](0x2,'0'),_0x26006f=_0x3d4363[_0x1b2895(0x201)]()[_0x1b2895(0x1f2)]()[_0x1b2895(0x1d4)](0x3,'0'),_0x1874d2=getTimezoneOffset();return _0x1e22e9+'-'+_0x1f1e07+'-'+_0x3d0dea+'\x20'+_0x350ab7+':'+_0x2fa5a9+':'+_0x1a7443+'.'+_0x26006f+_0x1874d2;}function formatColoredLogEntry(_0x12b8a6,_0x461b7e){const _0x58356d=a119_0x558b,_0x21f2ac=formatTimestamp(),_0x40147e=_0x461b7e[_0x58356d(0x1ec)](safeStringify)[_0x58356d(0x1f1)]('\x20'),_0x593ee8=a119_0x3b0935[_0x58356d(0x1ed)](_0x21f2ac);let _0x28ea8f;switch(_0x12b8a6){case'info':_0x28ea8f=a119_0x3b0935['cyan']('['+_0x12b8a6+']\x20');break;case _0x58356d(0x1e0):_0x28ea8f=a119_0x3b0935['yellow']('['+_0x12b8a6+']\x20');break;case'error':_0x28ea8f=a119_0x3b0935[_0x58356d(0x1c7)]('['+_0x12b8a6+']');break;case _0x58356d(0x1c8):_0x28ea8f=a119_0x3b0935[_0x58356d(0x1ed)]('['+_0x12b8a6+']');break;default:_0x28ea8f='['+_0x12b8a6+']';}return _0x593ee8+'\x20'+_0x28ea8f+'\x20'+_0x40147e;}export var LogLevel;(function(_0x4dbb53){const _0x210dcf=a119_0x558b;_0x4dbb53[_0x4dbb53[_0x210dcf(0x1de)]=-0x2]='TRACE',_0x4dbb53[_0x4dbb53[_0x210dcf(0x1eb)]=-0x1]=_0x210dcf(0x1eb),_0x4dbb53[_0x4dbb53[_0x210dcf(0x1da)]=0x0]=_0x210dcf(0x1da),_0x4dbb53[_0x4dbb53[_0x210dcf(0x1d2)]=0x1]='WARN',_0x4dbb53[_0x4dbb53[_0x210dcf(0x1cb)]=0x2]=_0x210dcf(0x1cb);}(LogLevel||(LogLevel={})));export class TDXLogger{['logStream'];['logDir'];['logLevel'];[a119_0x2f2064(0x203)];constructor(_0x2d393c=LogLevel['INFO'],_0x4e86c3=![]){const _0x445ef4=a119_0x2f2064;this['logDir']=join(homedir(),_0x445ef4(0x1d3),_0x445ef4(0x1ee),_0x445ef4(0x1ea)),this[_0x445ef4(0x1e3)]=_0x2d393c,this[_0x445ef4(0x203)]=_0x4e86c3;}async[a119_0x2f2064(0x1f3)](){const _0x2cce11=a119_0x2f2064;try{await mkdir(this[_0x2cce11(0x1c6)],{'recursive':!![]}),await this[_0x2cce11(0x1f9)]();const _0x373c5c=join(this['logDir'],'tdx.log');this[_0x2cce11(0x1e1)]=createWriteStream(_0x373c5c,{'flags':'a'}),this[_0x2cce11(0x1e1)]['on'](_0x2cce11(0x1cc),_0x5e06a2=>{const _0x497cd8=_0x2cce11;console[_0x497cd8(0x1cc)](_0x497cd8(0x1c9),_0x5e06a2['message']);});}catch(_0x20b266){console[_0x2cce11(0x1cc)](_0x2cce11(0x1fa),_0x20b266);}}async['rotateOldLogs'](){const _0x314d5e=a119_0x2f2064;try{const _0x47af36=await readdir(this[_0x314d5e(0x1c6)]),_0x5ee456=new Date()[_0x314d5e(0x1cf)]()[_0x314d5e(0x204)]('T')[0x0];if(_0x47af36['includes'](_0x314d5e(0x1e9))){const _0x203f4f=join(this[_0x314d5e(0x1c6)],_0x314d5e(0x1e9)),_0x1bf7e8=await stat(_0x203f4f),_0x2a4f52=new Date(_0x1bf7e8[_0x314d5e(0x1dc)])[_0x314d5e(0x1cf)]()[_0x314d5e(0x204)]('T')[0x0];if(_0x2a4f52<_0x5ee456){const _0x2cafab=join(this[_0x314d5e(0x1c6)],_0x314d5e(0x1e2)+_0x2a4f52+_0x314d5e(0x1d8));await rename(_0x203f4f,_0x2cafab);}}const _0x43193a=await readdir(this[_0x314d5e(0x1c6)]),_0x3d61a6=/^tdx-(\d{4}-\d{2}-\d{2})\.log$/,_0x304f9b=_0x43193a[_0x314d5e(0x1d5)](_0x2ab0c8=>_0x3d61a6[_0x314d5e(0x1d0)](_0x2ab0c8));for(const _0x412075 of _0x304f9b){const _0x329a43=join(this[_0x314d5e(0x1c6)],_0x412075),_0x105a07=join(this[_0x314d5e(0x1c6)],_0x412075+_0x314d5e(0x1ef));try{await pipeline(createReadStream(_0x329a43),createGzip(),createWriteStream(_0x105a07)),await unlink(_0x329a43);}catch(_0x499aa8){console[_0x314d5e(0x1cc)](_0x314d5e(0x1dd)+_0x412075+':',_0x499aa8);}}}catch{}}[a119_0x2f2064(0x1c8)](..._0x230f38){const _0x4ad192=a119_0x2f2064;if(this[_0x4ad192(0x1e3)]>LogLevel[_0x4ad192(0x1eb)])return;const _0x1ae2a2=formatColoredLogEntry(_0x4ad192(0x1c8),_0x230f38);this[_0x4ad192(0x1e1)]?.['write'](_0x1ae2a2+'\x0a');}[a119_0x2f2064(0x1ce)](..._0x9de2e3){const _0x4c1040=a119_0x2f2064;if(this[_0x4c1040(0x1e3)]>LogLevel[_0x4c1040(0x1de)])return;const _0x51e428=formatColoredLogEntry('trace',_0x9de2e3);this[_0x4c1040(0x1e1)]?.[_0x4c1040(0x1db)](_0x51e428+'\x0a');}['info'](..._0x11682e){const _0xd199cd=a119_0x2f2064;if(this['logLevel']>LogLevel[_0xd199cd(0x1da)])return;const _0x1fc02f=formatColoredLogEntry('info',_0x11682e);!this['fileOnly']&&console[_0xd199cd(0x207)](_0x1fc02f),this[_0xd199cd(0x1e1)]?.['write'](_0x1fc02f+'\x0a');}['warn'](..._0x5f0630){const _0x1031c0=a119_0x2f2064;if(this['logLevel']>LogLevel[_0x1031c0(0x1d2)])return;const _0x44f260=formatColoredLogEntry('warn',_0x5f0630);!this['fileOnly']&&console[_0x1031c0(0x1cc)](_0x44f260),this[_0x1031c0(0x1e1)]?.[_0x1031c0(0x1db)](_0x44f260+'\x0a');}[a119_0x2f2064(0x1cc)](..._0x248829){const _0x2a807b=a119_0x2f2064,_0xafd278=formatColoredLogEntry(_0x2a807b(0x1cc),_0x248829);!this[_0x2a807b(0x203)]&&console[_0x2a807b(0x1cc)](_0xafd278),this[_0x2a807b(0x1e1)]?.[_0x2a807b(0x1db)](_0xafd278+'\x0a');}async['close'](){const _0xc4cd52=a119_0x2f2064;return this[_0xc4cd52(0x1e5)](_0xc4cd52(0x1e4)),new Promise(_0x6df869=>{const _0x4ae0dd=_0xc4cd52;this[_0x4ae0dd(0x1e1)]?this[_0x4ae0dd(0x1e1)][_0x4ae0dd(0x1f6)](()=>{_0x6df869();}):_0x6df869();});}[a119_0x2f2064(0x1fc)](){const _0x4a2cee=a119_0x2f2064;return join(this[_0x4a2cee(0x1c6)],_0x4a2cee(0x1e9));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a120_0x508e(_0x47af45,_0x1dd6ce){_0x47af45=_0x47af45-0x15e;const _0x53998d=a120_0x5399();let _0x508e8b=_0x53998d[_0x47af45];return _0x508e8b;}(function(_0x399b7d,_0x31e5cc){const _0x5d8bf1=a120_0x508e,_0x4553e9=_0x399b7d();while(!![]){try{const _0x114e93=-parseInt(_0x5d8bf1(0x17c))/0x1+parseInt(_0x5d8bf1(0x169))/0x2+-parseInt(_0x5d8bf1(0x16d))/0x3*(-parseInt(_0x5d8bf1(0x163))/0x4)+-parseInt(_0x5d8bf1(0x173))/0x5+parseInt(_0x5d8bf1(0x186))/0x6+-parseInt(_0x5d8bf1(0x17a))/0x7*(parseInt(_0x5d8bf1(0x174))/0x8)+-parseInt(_0x5d8bf1(0x176))/0x9*(-parseInt(_0x5d8bf1(0x18b))/0xa);if(_0x114e93===_0x31e5cc)break;else _0x4553e9['push'](_0x4553e9['shift']());}catch(_0x3bb067){_0x4553e9['push'](_0x4553e9['shift']());}}}(a120_0x5399,0xca1ec));import{formatRows}from'./formatters.js';import a120_0x4c0fac from'chalk';const DEFAULT_OPTIONS={'showTreeLines':!![],'showIcons':!![],'showMetadata':!![],'indent':'\x20\x20','showUrl':![],'getSegmentUrl':undefined};export function formatTree(_0x5392e0,_0x3b7fcc={},_0x2ca932=0x0,_0x4eefd9=''){const _0x2e9540=a120_0x508e,_0x14e4ff={...DEFAULT_OPTIONS,..._0x3b7fcc},_0x38f260=[],_0x2bc3d0=[..._0x5392e0][_0x2e9540(0x179)]((_0x3c03d2,_0x1b15d0)=>_0x3c03d2[_0x2e9540(0x168)][_0x2e9540(0x160)](_0x1b15d0[_0x2e9540(0x168)]));for(let _0x48dcbe=0x0;_0x48dcbe<_0x2bc3d0[_0x2e9540(0x18a)];_0x48dcbe++){const _0x2cd51f=_0x2bc3d0[_0x48dcbe],_0x50a61e=_0x48dcbe===_0x2bc3d0[_0x2e9540(0x18a)]-0x1;let _0x5a759d='';_0x2ca932>0x0&&(_0x5a759d+=_0x4eefd9);_0x14e4ff['showTreeLines']&&_0x2ca932>0x0&&(_0x5a759d+=a120_0x4c0fac[_0x2e9540(0x178)](_0x50a61e?_0x2e9540(0x16c):_0x2e9540(0x182)));_0x14e4ff['showIcons']&&(_0x5a759d+=_0x2cd51f[_0x2e9540(0x175)]===_0x2e9540(0x16e)?'π\x20':'π―\x20');_0x5a759d+=_0x2cd51f['name'];if(_0x14e4ff[_0x2e9540(0x17f)]){if(_0x2cd51f['type']===_0x2e9540(0x16e)){const _0x599e9c=[];_0x2cd51f[_0x2e9540(0x170)][_0x2e9540(0x17b)]&&_0x599e9c['push'](_0x2cd51f['metadata'][_0x2e9540(0x17b)]+_0x2e9540(0x177)+(_0x2cd51f[_0x2e9540(0x170)]['segmentCount']!==0x1?'s':'')),_0x2cd51f[_0x2e9540(0x170)][_0x2e9540(0x164)]&&_0x599e9c['push'](_0x2cd51f['metadata'][_0x2e9540(0x164)]+'\x20folder'+(_0x2cd51f[_0x2e9540(0x170)][_0x2e9540(0x164)]!==0x1?'s':'')),_0x599e9c[_0x2e9540(0x18a)]>0x0&&(_0x5a759d+=a120_0x4c0fac[_0x2e9540(0x178)]('\x20('+_0x599e9c[_0x2e9540(0x167)](',\x20')+')'));}else _0x2cd51f[_0x2e9540(0x175)]===_0x2e9540(0x16a)&&_0x2cd51f[_0x2e9540(0x162)]!==undefined&&(_0x5a759d+=a120_0x4c0fac[_0x2e9540(0x178)]('\x20('+formatRows(_0x2cd51f['population'])+')'));}_0x14e4ff[_0x2e9540(0x184)]&&_0x14e4ff[_0x2e9540(0x188)]&&_0x2cd51f[_0x2e9540(0x175)]===_0x2e9540(0x16a)&&(_0x5a759d+='\x20'+a120_0x4c0fac['cyan'](_0x14e4ff[_0x2e9540(0x188)](_0x2cd51f['id'])));_0x38f260['push'](_0x5a759d);if(_0x2cd51f['children']&&_0x2cd51f[_0x2e9540(0x15f)][_0x2e9540(0x18a)]>0x0){let _0x2fb5de;if(_0x2ca932===0x0)_0x2fb5de='';else _0x14e4ff[_0x2e9540(0x172)]?_0x2fb5de=_0x4eefd9+(_0x50a61e?'\x20\x20\x20\x20':a120_0x4c0fac['dim']('β')+_0x2e9540(0x171)):_0x2fb5de=_0x4eefd9+_0x14e4ff[_0x2e9540(0x17e)];const _0x18ef53=formatTree(_0x2cd51f[_0x2e9540(0x15f)],_0x14e4ff,_0x2ca932+0x1,_0x2fb5de);_0x38f260[_0x2e9540(0x189)](_0x18ef53);}}return _0x38f260[_0x2e9540(0x167)]('\x0a');}export function formatFlatList(_0x3e01af,_0x10362d,_0xf2950b={},_0x25c955=[]){const _0x27394b=a120_0x508e,_0x25e109={...DEFAULT_OPTIONS,..._0xf2950b},_0x22a8cf=[];for(const _0x52d70b of _0x3e01af){_0x22a8cf[_0x27394b(0x189)]({'name':_0x52d70b['name'],'icon':_0x25e109[_0x27394b(0x165)]?'π':'','metadata':undefined});}for(const _0x2d92d0 of _0x10362d){const _0x165311=_0x25e109[_0x27394b(0x17f)]&&_0x2d92d0[_0x27394b(0x162)]!==undefined?a120_0x4c0fac[_0x27394b(0x178)]('\x20('+formatRows(_0x2d92d0['population'])+')'):'',_0x4eed59=_0x25e109[_0x27394b(0x184)]&&_0x25e109[_0x27394b(0x188)]?_0x25e109[_0x27394b(0x188)](_0x2d92d0['id']):undefined;_0x22a8cf[_0x27394b(0x189)]({'name':_0x2d92d0[_0x27394b(0x168)],'icon':_0x25e109[_0x27394b(0x165)]?'π―':'','metadata':_0x165311,'url':_0x4eed59});}for(const _0x24a8f6 of _0x25c955){const _0x12e81a=getJourneyStateIndicator(_0x24a8f6[_0x27394b(0x181)]),_0x326dd9=_0x25e109[_0x27394b(0x17f)]?a120_0x4c0fac[_0x27394b(0x178)]('\x20'+_0x12e81a):'',_0x48b136=_0x25e109[_0x27394b(0x184)]&&_0x25e109['getJourneyUrl']?_0x25e109[_0x27394b(0x18c)](_0x24a8f6['id']):undefined;_0x22a8cf['push']({'name':_0x24a8f6[_0x27394b(0x166)],'icon':_0x25e109[_0x27394b(0x165)]?_0x27394b(0x185):'','metadata':_0x326dd9,'url':_0x48b136});}_0x22a8cf['sort']((_0x52710e,_0x265893)=>_0x52710e['name'][_0x27394b(0x160)](_0x265893['name']));if(_0x22a8cf['length']===0x0)return _0x27394b(0x17d);const _0x291fdb=_0x22a8cf[_0x27394b(0x183)](_0x4b7bdb=>{const _0x3aaa14=_0x27394b,_0xbec5fa=_0x4b7bdb['icon']?_0x4b7bdb['icon']+'\x20':'',_0x145765=_0x4b7bdb[_0x3aaa14(0x170)]||'',_0x269057=_0x4b7bdb[_0x3aaa14(0x180)]?'\x20'+a120_0x4c0fac['cyan'](_0x4b7bdb['url']):'';return''+_0xbec5fa+_0x4b7bdb[_0x3aaa14(0x168)]+_0x145765+_0x269057;});return _0x291fdb[_0x27394b(0x167)]('\x0a');}function getJourneyStateIndicator(_0xc8765e){const _0x180f84=a120_0x508e;switch(_0xc8765e){case _0x180f84(0x187):return _0x180f84(0x16b);case'launched':return _0x180f84(0x16f);case'paused':return _0x180f84(0x161);case _0x180f84(0x18d):return _0x180f84(0x15e);default:return'('+_0xc8765e+')';}}function a120_0x5399(){const _0x2b06e1=['(empty)','indent','showMetadata','url','state','βββ\x20','map','showUrl','πΊοΈ','7835820bBoKxi','draft','getSegmentUrl','push','length','3874060arCwYH','getJourneyUrl','completed','(completed)','children','localeCompare','(paused)','population','436dooZgK','folderCount','showIcons','journeyBundleName','join','name','856284aNolYN','segment','(draft)','βββ\x20','16281qmFkaA','folder','(running)','metadata','\x20\x20\x20','showTreeLines','5367965TZrkAP','256176hhWGOJ','type','27jwFkog','\x20segment','dim','sort','161MhuiHF','segmentCount','849890tCqXgb'];a120_0x5399=function(){return _0x2b06e1;};return a120_0x5399();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a121_0x46f31b=a121_0xba94;(function(_0x429bc7,_0x4585fa){const _0x576b9=a121_0xba94,_0x3db58e=_0x429bc7();while(!![]){try{const _0x258e55=parseInt(_0x576b9(0xcf))/0x1+parseInt(_0x576b9(0xeb))/0x2*(-parseInt(_0x576b9(0xe6))/0x3)+parseInt(_0x576b9(0xe8))/0x4*(-parseInt(_0x576b9(0xd2))/0x5)+parseInt(_0x576b9(0xdc))/0x6+parseInt(_0x576b9(0xd1))/0x7+parseInt(_0x576b9(0xd3))/0x8*(-parseInt(_0x576b9(0xde))/0x9)+-parseInt(_0x576b9(0xea))/0xa;if(_0x258e55===_0x4585fa)break;else _0x3db58e['push'](_0x3db58e['shift']());}catch(_0x52c818){_0x3db58e['push'](_0x3db58e['shift']());}}}(a121_0x48e0,0x7281e));import{get}from'https';function a121_0x48e0(){const _0x4831c=['getTime','now','last_version_check','version','utf-8','updateAvailable','4935714ITJGCg','cyan','27SHOEgN','HTTP\x20','env','stringify','dim','currentVersion','lastCheck','https://registry.npmjs.org/@treasuredata/tdx/latest','8355IsjFay','\x0aRun:\x20','605064uTuAAw','isTTY','2057420akRBMw','16eUSBqJ','Request\x20timeout','toISOString','write','stderr','error','Run:','npm\x20install\x20-g\x20@treasuredata/tdx@latest','latestVersion','statusCode','NO_COLOR','green','parse','212951ogldHc','Invalid\x20version\x20format','4645221kZaPRF','15Ccajtj','1462216oRePsD','destroy','\x0aUpdate\x20available:\x20'];a121_0x48e0=function(){return _0x4831c;};return a121_0x48e0();}import{readFileSync,writeFileSync,mkdirSync}from'fs';import{join}from'path';import{gt,valid}from'semver';import a121_0x5886ca from'chalk';import{getCacheDir}from'../core/config.js';const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_URL=a121_0x46f31b(0xe5),TIMEOUT_MS=0x7d0;function a121_0xba94(_0x32006,_0xfd035b){_0x32006=_0x32006-0xc3;const _0x48e029=a121_0x48e0();let _0xba941=_0x48e029[_0x32006];return _0xba941;}function getCacheFilePath(){const _0x26a334=a121_0x46f31b,_0x2cee0d=getCacheDir();return join(_0x2cee0d,_0x26a334(0xd8));}function readCache(){const _0x57fb36=a121_0x46f31b;try{const _0xc9515c=getCacheFilePath(),_0x2930b8=readFileSync(_0xc9515c,_0x57fb36(0xda));return JSON[_0x57fb36(0xce)](_0x2930b8);}catch{return null;}}function writeCache(_0x2161ca){const _0x3947ae=a121_0x46f31b;try{const _0x4866cd=getCacheDir();mkdirSync(_0x4866cd,{'recursive':!![]});const _0x221f18={'lastCheck':new Date()[_0x3947ae(0xc4)](),'latestVersion':_0x2161ca},_0x3462df=getCacheFilePath();writeFileSync(_0x3462df,JSON[_0x3947ae(0xe1)](_0x221f18,null,0x2),_0x3947ae(0xda));}catch{}}function isCacheValid(_0x39943b){const _0x325c94=a121_0x46f31b;if(!_0x39943b)return![];const _0x1d2ba2=new Date(_0x39943b[_0x325c94(0xe4)])[_0x325c94(0xd6)](),_0x67815d=Date[_0x325c94(0xd7)]();return _0x67815d-_0x1d2ba2<CACHE_DURATION_MS;}function fetchLatestVersion(){return new Promise((_0x6c037a,_0x5b581b)=>{const _0x53d157=a121_0xba94,_0x5c2985=get(NPM_REGISTRY_URL,_0x2d386b=>{const _0x2ddad3=a121_0xba94;if(_0x2d386b[_0x2ddad3(0xcb)]!==0xc8){clearTimeout(_0x20745d),_0x5b581b(new Error(_0x2ddad3(0xdf)+_0x2d386b['statusCode']));return;}let _0x3a3be9='';_0x2d386b['on']('data',_0x4bef9b=>{_0x3a3be9+=_0x4bef9b;}),_0x2d386b['on']('end',()=>{const _0xc36329=_0x2ddad3;clearTimeout(_0x20745d);try{const _0x402f26=JSON[_0xc36329(0xce)](_0x3a3be9);if(!valid(_0x402f26[_0xc36329(0xd9)])){_0x5b581b(new Error(_0xc36329(0xd0)));return;}_0x6c037a(_0x402f26[_0xc36329(0xd9)]);}catch(_0x7ac1d){_0x5b581b(_0x7ac1d);}});})['on'](_0x53d157(0xc7),_0x3b8dee=>{clearTimeout(_0x20745d),_0x5b581b(_0x3b8dee);}),_0x20745d=setTimeout(()=>{const _0x1c8d8b=_0x53d157;_0x5c2985[_0x1c8d8b(0xd4)](),_0x5b581b(new Error(_0x1c8d8b(0xc3)));},TIMEOUT_MS);});}export async function checkForUpdate(_0x5babff){const _0x139c4e=a121_0x46f31b;try{const _0x169c36=readCache();if(isCacheValid(_0x169c36)){const _0x15be59=gt(_0x169c36['latestVersion'],_0x5babff);return{'updateAvailable':_0x15be59,'currentVersion':_0x5babff,'latestVersion':_0x169c36[_0x139c4e(0xca)]};}const _0x4005d4=await fetchLatestVersion();writeCache(_0x4005d4);const _0xf9a28b=gt(_0x4005d4,_0x5babff);return{'updateAvailable':_0xf9a28b,'currentVersion':_0x5babff,'latestVersion':_0x4005d4};}catch{return null;}}export function displayUpdateNotification(_0x217b29){const _0x289edb=a121_0x46f31b;if(!_0x217b29[_0x289edb(0xdb)])return;const _0x3ef753=process['stderr'][_0x289edb(0xe9)]&&!process[_0x289edb(0xe0)][_0x289edb(0xcc)],_0x3a2a0a=_0x3ef753?a121_0x5886ca['gray']('β'):'β',_0x15001f=_0x3ef753?a121_0x5886ca[_0x289edb(0xe2)](_0x217b29[_0x289edb(0xe3)]):_0x217b29[_0x289edb(0xe3)],_0x643ab5=_0x3ef753?a121_0x5886ca[_0x289edb(0xcd)](_0x217b29[_0x289edb(0xca)]):_0x217b29[_0x289edb(0xca)],_0x8b0a32=_0x3ef753?a121_0x5886ca[_0x289edb(0xdd)](_0x289edb(0xc9)):_0x289edb(0xc9),_0x3ea6c7=_0x3ef753?'\x0a'+a121_0x5886ca['yellow']('Update\x20available:')+'\x20'+_0x15001f+'\x20'+_0x3a2a0a+'\x20'+_0x643ab5+'\x0a'+a121_0x5886ca[_0x289edb(0xe2)](_0x289edb(0xc8))+'\x20'+_0x8b0a32+'\x0a':_0x289edb(0xd5)+_0x15001f+'\x20'+_0x3a2a0a+'\x20'+_0x643ab5+_0x289edb(0xe7)+_0x8b0a32+'\x0a';process[_0x289edb(0xc6)][_0x289edb(0xc5)](_0x3ea6c7);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a122_0x100d07=a122_0x275a;(function(_0x521a20,_0x2db770){const _0x41b5f2=a122_0x275a,_0x4f5426=_0x521a20();while(!![]){try{const _0x481ac9=parseInt(_0x41b5f2(0xcb))/0x1+parseInt(_0x41b5f2(0xcc))/0x2*(-parseInt(_0x41b5f2(0xce))/0x3)+-parseInt(_0x41b5f2(0xd0))/0x4*(-parseInt(_0x41b5f2(0xcf))/0x5)+parseInt(_0x41b5f2(0xc6))/0x6+-parseInt(_0x41b5f2(0xc8))/0x7+-parseInt(_0x41b5f2(0xc7))/0x8+parseInt(_0x41b5f2(0xca))/0x9*(parseInt(_0x41b5f2(0xd1))/0xa);if(_0x481ac9===_0x2db770)break;else _0x4f5426['push'](_0x4f5426['shift']());}catch(_0x143b1c){_0x4f5426['push'](_0x4f5426['shift']());}}}(a122_0x5f32,0x4c32c));function a122_0x275a(_0x55df98,_0x3240a5){_0x55df98=_0x55df98-0xc6;const _0x5f3219=a122_0x5f32();let _0x275a5d=_0x5f3219[_0x55df98];return _0x275a5d;}export const WORKFLOW_FILE_EXTENSION=a122_0x100d07(0xc9);function a122_0x5f32(){const _0x4d7d90=['9yrvLRL','95VRtsyM','105724lAwzFV','699990tkstfQ','490170NwodZk','4702824ZKfoJg','1443204YWccls','.dig','27gCIrUq','588399KgDFtV','184098wiGeMV','startsWith'];a122_0x5f32=function(){return _0x4d7d90;};return a122_0x5f32();}export function shouldIncludeInArchive(_0x5ccd34){const _0x33f218=a122_0x100d07;if(_0x5ccd34==='.digdag')return!![];if(_0x5ccd34[_0x33f218(0xcd)]('.'))return![];return!![];}
|