@treasuredata/tdx 0.12.0 → 0.13.0
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 +3 -2
- package/dist/cli-categories.d.ts +1 -1
- package/dist/cli-categories.js +1 -1
- package/dist/cli-categories.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.d.ts.map +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-command.js.map +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/databases.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-command.js.map +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-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/profile-command.d.ts +50 -0
- package/dist/commands/profile-command.d.ts.map +1 -0
- package/dist/commands/profile-command.js +1 -0
- package/dist/commands/profile-command.js.map +1 -0
- 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/segment-use-command.js.map +1 -1
- package/dist/commands/segment-validate-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.d.ts.map +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/commands/workflow-command.js.map +1 -1
- package/dist/core/auth.d.ts +2 -4
- 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/command-output.js +1 -1
- package/dist/core/command-output.js.map +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.d.ts.map +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/global-context.js.map +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/profile.d.ts +9 -1
- package/dist/core/profile.d.ts.map +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/profile.js.map +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/core/version.d.ts +45 -0
- package/dist/core/version.d.ts.map +1 -0
- package/dist/core/version.js +1 -0
- package/dist/core/version.js.map +1 -0
- 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-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/endpoints.d.ts +19 -0
- package/dist/sdk/client/endpoints.d.ts.map +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/endpoints.js.map +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.d.ts.map +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/client/workflow-client.js.map +1 -1
- package/dist/sdk/connection-validator.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/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-aliases.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.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/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workflow.d.ts +6 -0
- package/dist/sdk/types/workflow.d.ts.map +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.d.ts +11 -0
- package/dist/sdk/util/formatters.d.ts.map +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/formatters.js.map +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.d.ts.map +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/index.js.map +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/json-loader.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/spinner.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-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +2 -3
- package/LICENSE +0 -190
- package/dist/commands/context-command.d.ts +0 -15
- package/dist/commands/context-command.d.ts.map +0 -1
- package/dist/commands/context-command.js +0 -1
- package/dist/commands/context-command.js.map +0 -1
package/dist/utils/async.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a134_0x5de7(){const _0x14b12e=['185787GGQVoM','159855QxlNPT','140oJMkCU','150wNdCQD','16638589zOFXQe','81NrwXuG','map','10282pKnNcI','push','824iizFVy','123865nsEzwe','slice','961764ptjlyo','all','4tSpeoK','182fgCFvM','4272987yEOPIU'];a134_0x5de7=function(){return _0x14b12e;};return a134_0x5de7();}(function(_0x24757f,_0x4862fa){const _0x532b3e=a134_0xaf3f,_0x234451=_0x24757f();while(!![]){try{const _0x5bb02a=parseInt(_0x532b3e(0x17f))/0x1*(parseInt(_0x532b3e(0x181))/0x2)+parseInt(_0x532b3e(0x18a))/0x3*(parseInt(_0x532b3e(0x188))/0x4)+parseInt(_0x532b3e(0x18c))/0x5*(parseInt(_0x532b3e(0x18e))/0x6)+-parseInt(_0x532b3e(0x184))/0x7*(parseInt(_0x532b3e(0x183))/0x8)+-parseInt(_0x532b3e(0x18b))/0x9*(parseInt(_0x532b3e(0x18d))/0xa)+parseInt(_0x532b3e(0x17e))/0xb+-parseInt(_0x532b3e(0x186))/0xc*(parseInt(_0x532b3e(0x189))/0xd);if(_0x5bb02a===_0x4862fa)break;else _0x234451['push'](_0x234451['shift']());}catch(_0x166a90){_0x234451['push'](_0x234451['shift']());}}}(a134_0x5de7,0xe05c3));function a134_0xaf3f(_0x56c3f5,_0x18a1ab){_0x56c3f5=_0x56c3f5-0x17e;const _0x5de723=a134_0x5de7();let _0xaf3f5b=_0x5de723[_0x56c3f5];return _0xaf3f5b;}export async function batchAsync(_0x58111f,_0x564374,_0x3f658f=0xa){const _0x3ae693=a134_0xaf3f,_0x44f520=[];for(let _0x81522f=0x0;_0x81522f<_0x58111f['length'];_0x81522f+=_0x3f658f){const _0xed9f75=_0x58111f[_0x3ae693(0x185)](_0x81522f,_0x81522f+_0x3f658f),_0x1a7a07=await Promise[_0x3ae693(0x187)](_0xed9f75[_0x3ae693(0x180)](_0x564374));_0x44f520[_0x3ae693(0x182)](..._0x1a7a07);}return _0x44f520;}
|
package/dist/utils/colors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x55814a,_0x5ec5d1){const _0xca5011=a135_0x4b77,_0x269c2d=_0x55814a();while(!![]){try{const _0x18c304=-parseInt(_0xca5011(0xa5))/0x1+parseInt(_0xca5011(0xb5))/0x2+parseInt(_0xca5011(0xb2))/0x3+parseInt(_0xca5011(0xae))/0x4+parseInt(_0xca5011(0xac))/0x5*(-parseInt(_0xca5011(0x9d))/0x6)+-parseInt(_0xca5011(0xb8))/0x7*(-parseInt(_0xca5011(0x9f))/0x8)+-parseInt(_0xca5011(0x9e))/0x9;if(_0x18c304===_0x5ec5d1)break;else _0x269c2d['push'](_0x269c2d['shift']());}catch(_0x4fe8e8){_0x269c2d['push'](_0x269c2d['shift']());}}}(a135_0x3638,0xb0721));import{Chalk}from'chalk';export function shouldUseColor(_0x2c526f={}){const _0x2f18da=a135_0x4b77;if(_0x2c526f[_0x2f18da(0xa4)]===!![])return![];if(_0x2c526f[_0x2f18da(0x9b)]===!![])return!![];if(process['env'][_0x2f18da(0xa9)]!==undefined)return![];return process['stdout'][_0x2f18da(0xa7)]??![];}export function getChalk(_0x319f1f={}){if(shouldUseColor(_0x319f1f))return new Chalk({'level':0x3});return new Chalk({'level':0x0});}export function colorBorder(_0x597962,_0x2e78ac={}){return getChalk(_0x2e78ac)['dim'](_0x597962);}export function colorHeader(_0x3ebf19,_0x29ac14={}){return getChalk(_0x29ac14)['cyan'](_0x3ebf19);}export function colorType(_0x2637ea,_0x163cb1={}){return getChalk(_0x163cb1)['dim'](_0x2637ea);}export function colorJSONKey(_0x40802d,_0xc2299f={}){const _0x4b9149=a135_0x4b77;return getChalk(_0xc2299f)[_0x4b9149(0xb3)](_0x40802d);}export function colorJSONString(_0x18b273,_0x8d09e4={}){const _0x5554bd=a135_0x4b77;return getChalk(_0x8d09e4)[_0x5554bd(0xa2)](_0x18b273);}export function colorJSONNumber(_0x1f3745,_0x3c1bf5={}){const _0x503576=a135_0x4b77;return getChalk(_0x3c1bf5)[_0x503576(0xa6)](_0x1f3745);}function a135_0x4b77(_0x124898,_0xe5369b){_0x124898=_0x124898-0x9b;const _0x363886=a135_0x3638();let _0x4b7762=_0x363886[_0x124898];return _0x4b7762;}export function colorJSONBoolean(_0x55d59b,_0x5ed4a8={}){const _0x4aaed4=a135_0x4b77;return getChalk(_0x5ed4a8)[_0x4aaed4(0xb7)](_0x55d59b);}export function colorJSONNull(_0x4b265f,_0x190d5c={}){const _0x15591b=a135_0x4b77;return getChalk(_0x190d5c)[_0x15591b(0xa8)](_0x4b265f);}export function colorizeJSONCompact(_0x5f1df5,_0x500e5e={}){const _0x491d57=a135_0x4b77;if(!shouldUseColor(_0x500e5e))return JSON[_0x491d57(0xa1)](_0x5f1df5);if(_0x5f1df5===null)return colorJSONNull(_0x491d57(0xab),_0x500e5e);if(typeof _0x5f1df5===_0x491d57(0xb4))return colorJSONBoolean(String(_0x5f1df5),_0x500e5e);if(typeof _0x5f1df5==='number')return colorJSONNumber(String(_0x5f1df5),_0x500e5e);if(typeof _0x5f1df5===_0x491d57(0xaa))return colorJSONString(JSON['stringify'](_0x5f1df5),_0x500e5e);if(Array['isArray'](_0x5f1df5)){if(_0x5f1df5['length']===0x0)return'[]';const _0x244399=_0x5f1df5[_0x491d57(0xa0)](_0x28261b=>colorizeJSONCompact(_0x28261b,_0x500e5e));return'['+_0x244399[_0x491d57(0xb1)](',')+']';}if(typeof _0x5f1df5===_0x491d57(0xb0)){const _0x5b1334=Object['entries'](_0x5f1df5);if(_0x5b1334[_0x491d57(0xa3)]===0x0)return'{}';const _0x1893a6=_0x5b1334[_0x491d57(0xa0)](([_0x566c40,_0x37715c])=>{const _0x5775a6=colorJSONKey(JSON['stringify'](_0x566c40),_0x500e5e),_0x19dd48=colorizeJSONCompact(_0x37715c,_0x500e5e);return _0x5775a6+':'+_0x19dd48;});return'{'+_0x1893a6['join'](',')+'}';}return String(_0x5f1df5);}export function colorizeJSON(_0x49685,_0x43ee74={},_0x537e25=0x0){const _0x562ac5=a135_0x4b77;if(!shouldUseColor(_0x43ee74))return JSON[_0x562ac5(0xa1)](_0x49685,null,0x2);const _0x1c547c='\x20'[_0x562ac5(0xb6)](_0x537e25),_0x5a5fbb=_0x537e25+0x2;if(_0x49685===null)return colorJSONNull(_0x562ac5(0xab),_0x43ee74);if(typeof _0x49685==='boolean')return colorJSONBoolean(String(_0x49685),_0x43ee74);if(typeof _0x49685===_0x562ac5(0x9c))return colorJSONNumber(String(_0x49685),_0x43ee74);if(typeof _0x49685==='string')return colorJSONString(JSON['stringify'](_0x49685),_0x43ee74);if(Array[_0x562ac5(0xaf)](_0x49685)){if(_0x49685[_0x562ac5(0xa3)]===0x0)return'[]';const _0x3427ba=_0x49685[_0x562ac5(0xa0)](_0x4e9225=>{const _0x15d21d=colorizeJSON(_0x4e9225,_0x43ee74,_0x5a5fbb);return''+'\x20'['repeat'](_0x5a5fbb)+_0x15d21d;});return'[\x0a'+_0x3427ba[_0x562ac5(0xb1)](',\x0a')+('\x0a'+_0x1c547c+']');}if(typeof _0x49685==='object'){const _0x2f4371=Object[_0x562ac5(0xad)](_0x49685);if(_0x2f4371[_0x562ac5(0xa3)]===0x0)return'{}';const _0x2adb4a=_0x2f4371['map'](([_0x167d4d,_0x5049a1])=>{const _0x1372b2=_0x562ac5,_0x32f8c7=colorJSONKey(JSON[_0x1372b2(0xa1)](_0x167d4d),_0x43ee74),_0x4a8b09=colorizeJSON(_0x5049a1,_0x43ee74,_0x5a5fbb);return''+'\x20'[_0x1372b2(0xb6)](_0x5a5fbb)+_0x32f8c7+':\x20'+_0x4a8b09;});return'{\x0a'+_0x2adb4a['join'](',\x0a')+('\x0a'+_0x1c547c+'}');}return String(_0x49685);}function a135_0x3638(){const _0x4c6c80=['blue','boolean','2153944CQhHxi','repeat','yellow','25249UwJZWF','color','number','12WlEXtA','15774813BngpXn','3096BzRzco','map','stringify','green','length','noColor','699800KvfTFY','cyan','isTTY','dim','NO_COLOR','string','null','1691625IyjRGH','entries','3867424gPiDne','isArray','object','join','1236573hOYkxr'];a135_0x3638=function(){return _0x4c6c80;};return a135_0x3638();}
|
package/dist/utils/diff.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x559210,_0x3c98e7){const _0x4f81ce=a136_0x2f31,_0x250da3=_0x559210();while(!![]){try{const _0x79807b=-parseInt(_0x4f81ce(0x143))/0x1*(parseInt(_0x4f81ce(0x131))/0x2)+-parseInt(_0x4f81ce(0x12e))/0x3*(-parseInt(_0x4f81ce(0x141))/0x4)+-parseInt(_0x4f81ce(0x128))/0x5*(parseInt(_0x4f81ce(0x12b))/0x6)+-parseInt(_0x4f81ce(0x121))/0x7+-parseInt(_0x4f81ce(0x135))/0x8+parseInt(_0x4f81ce(0x134))/0x9+-parseInt(_0x4f81ce(0x13a))/0xa*(-parseInt(_0x4f81ce(0x139))/0xb);if(_0x79807b===_0x3c98e7)break;else _0x250da3['push'](_0x250da3['shift']());}catch(_0x8c2d41){_0x250da3['push'](_0x250da3['shift']());}}}(a136_0x41b5,0x806f7));import a136_0x1e3846 from'chalk';export function generateDiff(_0x374564,_0x220875){const _0x97db7d=a136_0x2f31,_0x19a00c=_0x374564[_0x97db7d(0x13e)]('\x0a'),_0x10b382=_0x220875[_0x97db7d(0x13e)]('\x0a'),_0x2238b7=[],_0xdfb362=computeLCS(_0x19a00c,_0x10b382);let _0x591641=0x0,_0x28b66c=0x0,_0x26baa7=0x0;while(_0x591641<_0x19a00c['length']||_0x28b66c<_0x10b382[_0x97db7d(0x13c)]){if(_0x26baa7<_0xdfb362[_0x97db7d(0x13c)]&&_0x591641<_0x19a00c['length']&&_0x19a00c[_0x591641]===_0xdfb362[_0x26baa7])_0x28b66c<_0x10b382['length']&&_0x10b382[_0x28b66c]===_0xdfb362[_0x26baa7]?(_0x2238b7['push']({'type':'unchanged','content':_0x19a00c[_0x591641]}),_0x591641++,_0x28b66c++,_0x26baa7++):(_0x2238b7[_0x97db7d(0x129)]({'type':'added','content':_0x10b382[_0x28b66c]}),_0x28b66c++);else{if(_0x26baa7<_0xdfb362[_0x97db7d(0x13c)]&&_0x28b66c<_0x10b382['length']&&_0x10b382[_0x28b66c]===_0xdfb362[_0x26baa7])_0x2238b7[_0x97db7d(0x129)]({'type':_0x97db7d(0x124),'content':_0x19a00c[_0x591641]}),_0x591641++;else{if(_0x591641<_0x19a00c['length']&&(_0x26baa7>=_0xdfb362[_0x97db7d(0x13c)]||_0x19a00c[_0x591641]!==_0xdfb362[_0x26baa7]))_0x2238b7[_0x97db7d(0x129)]({'type':_0x97db7d(0x124),'content':_0x19a00c[_0x591641]}),_0x591641++;else _0x28b66c<_0x10b382['length']&&(_0x2238b7[_0x97db7d(0x129)]({'type':_0x97db7d(0x132),'content':_0x10b382[_0x28b66c]}),_0x28b66c++);}}}return _0x2238b7;}function computeLCS(_0x49a8cc,_0x2a949c){const _0x344893=a136_0x2f31,_0xc0e081=_0x49a8cc[_0x344893(0x13c)],_0x5aa34b=_0x2a949c[_0x344893(0x13c)],_0x2c239d=Array(_0xc0e081+0x1)['fill'](null)[_0x344893(0x12c)](()=>Array(_0x5aa34b+0x1)[_0x344893(0x140)](0x0));for(let _0x4f2d5c=0x1;_0x4f2d5c<=_0xc0e081;_0x4f2d5c++){for(let _0x198a6b=0x1;_0x198a6b<=_0x5aa34b;_0x198a6b++){_0x49a8cc[_0x4f2d5c-0x1]===_0x2a949c[_0x198a6b-0x1]?_0x2c239d[_0x4f2d5c][_0x198a6b]=_0x2c239d[_0x4f2d5c-0x1][_0x198a6b-0x1]+0x1:_0x2c239d[_0x4f2d5c][_0x198a6b]=Math[_0x344893(0x136)](_0x2c239d[_0x4f2d5c-0x1][_0x198a6b],_0x2c239d[_0x4f2d5c][_0x198a6b-0x1]);}}const _0x3533d6=[];let _0x4375ae=_0xc0e081,_0x559429=_0x5aa34b;while(_0x4375ae>0x0&&_0x559429>0x0){if(_0x49a8cc[_0x4375ae-0x1]===_0x2a949c[_0x559429-0x1])_0x3533d6[_0x344893(0x145)](_0x49a8cc[_0x4375ae-0x1]),_0x4375ae--,_0x559429--;else _0x2c239d[_0x4375ae-0x1][_0x559429]>_0x2c239d[_0x4375ae][_0x559429-0x1]?_0x4375ae--:_0x559429--;}return _0x3533d6;}function a136_0x2f31(_0x4eabe7,_0x29fa3e){_0x4eabe7=_0x4eabe7-0x120;const _0x41b593=a136_0x41b5();let _0x2f3130=_0x41b593[_0x4eabe7];return _0x2f3130;}export function formatDiffWithColors(_0x28162f,_0x59f04d=0x3){const _0x2ed1d0=a136_0x2f31,_0x5773f4=new Set();_0x28162f[_0x2ed1d0(0x130)]((_0x2b7ee5,_0x1accb6)=>{const _0x59ae82=_0x2ed1d0;_0x2b7ee5['type']!==_0x59ae82(0x126)&&_0x5773f4[_0x59ae82(0x120)](_0x1accb6);});if(_0x5773f4[_0x2ed1d0(0x133)]===0x0)return'';const _0xde9d0f=new Set();for(const _0x2d3231 of _0x5773f4){for(let _0x4a8a47=Math[_0x2ed1d0(0x136)](0x0,_0x2d3231-_0x59f04d);_0x4a8a47<=Math[_0x2ed1d0(0x12a)](_0x28162f['length']-0x1,_0x2d3231+_0x59f04d);_0x4a8a47++){_0xde9d0f['add'](_0x4a8a47);}}const _0x4e035f=[];let _0x11b5ef=-0x1;const _0x855670=_0x28162f[_0x2ed1d0(0x13c)],_0x25b5d3=Math[_0x2ed1d0(0x136)](0x3,String(_0x855670)[_0x2ed1d0(0x13c)]),_0x21cbd1=[];let _0x54e367=0x0,_0x921a1b=0x0;for(const _0x1a76b1 of _0x28162f){if(_0x1a76b1[_0x2ed1d0(0x138)]==='removed')_0x54e367++,_0x21cbd1['push']({'old':_0x54e367,'new':0x0});else _0x1a76b1[_0x2ed1d0(0x138)]===_0x2ed1d0(0x132)?(_0x921a1b++,_0x21cbd1[_0x2ed1d0(0x129)]({'old':0x0,'new':_0x921a1b})):(_0x54e367++,_0x921a1b++,_0x21cbd1[_0x2ed1d0(0x129)]({'old':_0x54e367,'new':_0x921a1b}));}for(let _0x2c0ef0=0x0;_0x2c0ef0<_0x28162f[_0x2ed1d0(0x13c)];_0x2c0ef0++){if(!_0xde9d0f[_0x2ed1d0(0x12f)](_0x2c0ef0))continue;_0x11b5ef!==-0x1&&_0x2c0ef0>_0x11b5ef+0x1&&_0x4e035f['push'](a136_0x1e3846[_0x2ed1d0(0x147)](_0x2ed1d0(0x142)));_0x11b5ef=_0x2c0ef0;const _0xe6671=_0x28162f[_0x2c0ef0],_0x321452=_0x21cbd1[_0x2c0ef0],_0x36f041=_0x321452[_0x2ed1d0(0x13b)]>0x0?String(_0x321452['old'])[_0x2ed1d0(0x146)](_0x25b5d3):'\x20'['repeat'](_0x25b5d3),_0x4e381e=_0x321452[_0x2ed1d0(0x137)]>0x0?String(_0x321452[_0x2ed1d0(0x137)])['padStart'](_0x25b5d3):'\x20'[_0x2ed1d0(0x123)](_0x25b5d3);switch(_0xe6671[_0x2ed1d0(0x138)]){case _0x2ed1d0(0x124):_0x4e035f['push'](a136_0x1e3846['red'](_0x36f041+'\x20'+_0x4e381e+_0x2ed1d0(0x122)+_0xe6671[_0x2ed1d0(0x125)]));break;case _0x2ed1d0(0x132):_0x4e035f[_0x2ed1d0(0x129)](a136_0x1e3846[_0x2ed1d0(0x12d)](_0x36f041+'\x20'+_0x4e381e+_0x2ed1d0(0x144)+_0xe6671['content']));break;default:_0x4e035f[_0x2ed1d0(0x129)](a136_0x1e3846[_0x2ed1d0(0x127)](_0x36f041+'\x20'+_0x4e381e+_0x2ed1d0(0x13d)+_0xe6671['content']));break;}}return _0x4e035f[_0x2ed1d0(0x13f)]('\x0a');}export function hasChanges(_0x432d64){const _0xb6d87a=a136_0x2f31;return _0x432d64['some'](_0x680d38=>_0x680d38[_0xb6d87a(0x138)]!==_0xb6d87a(0x126));}function a136_0x41b5(){const _0x46dde6=['forEach','279580ZjWLqi','added','size','3372453lKieZk','1978184HkBoNC','max','new','type','22GEEXzX','10086620vjApHy','old','length','\x20\x20\x20','split','join','fill','228824xtYzoK','\x20\x20...','5KlTlmN','\x20+\x20','unshift','padStart','cyan','add','5466139YtoHep','\x20-\x20','repeat','removed','content','unchanged','dim','1550UTtsEZ','push','min','19296CHyqpA','map','green','45KrqlDX','has'];a136_0x41b5=function(){return _0x46dde6;};return a136_0x41b5();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1bdc24,_0x52f351){const _0xcfed74=a137_0x86c7,_0x1a9af6=_0x1bdc24();while(!![]){try{const _0x43b80d=-parseInt(_0xcfed74(0xf8))/0x1+parseInt(_0xcfed74(0xea))/0x2*(-parseInt(_0xcfed74(0xf9))/0x3)+-parseInt(_0xcfed74(0xe9))/0x4+parseInt(_0xcfed74(0xf4))/0x5+parseInt(_0xcfed74(0xf0))/0x6+parseInt(_0xcfed74(0xf7))/0x7*(-parseInt(_0xcfed74(0xf6))/0x8)+parseInt(_0xcfed74(0xf5))/0x9*(parseInt(_0xcfed74(0xef))/0xa);if(_0x43b80d===_0x52f351)break;else _0x1a9af6['push'](_0x1a9af6['shift']());}catch(_0x4c64cc){_0x1a9af6['push'](_0x1a9af6['shift']());}}}(a137_0x4f80,0xe0cdd));import*as a137_0xa5fff7 from'node:fs';import*as a137_0xa4585e from'node:path';export function setSecureFilePermissions(_0x21218a){const _0x2c2ad0=a137_0x86c7;try{a137_0xa5fff7[_0x2c2ad0(0xe7)](_0x21218a,0x180);}catch{console[_0x2c2ad0(0xec)](_0x2c2ad0(0xe8)+_0x21218a);}}function a137_0x86c7(_0x4fcc22,_0x39ba01){_0x4fcc22=_0x4fcc22-0xe7;const _0x4f80d2=a137_0x4f80();let _0x86c7a=_0x4f80d2[_0x4fcc22];return _0x86c7a;}export function setSecureDirectoryPermissions(_0x4d1ff3){const _0x316f4a=a137_0x86c7;try{a137_0xa5fff7[_0x316f4a(0xe7)](_0x4d1ff3,0x1c0);}catch{console[_0x316f4a(0xec)](_0x316f4a(0xe8)+_0x4d1ff3);}}export function createSecureDirectory(_0x20f81d){const _0xac2e3=a137_0x86c7;!a137_0xa5fff7['existsSync'](_0x20f81d)&&(a137_0xa5fff7[_0xac2e3(0xfb)](_0x20f81d,{'recursive':!![],'mode':0x1c0}),setSecureDirectoryPermissions(_0x20f81d));}export function validateSecureFilePermissions(_0x25b09a){const _0x3990ab=a137_0x86c7;try{const _0x5acc0c=a137_0xa5fff7[_0x3990ab(0xf1)](_0x25b09a),_0x12949c=_0x5acc0c[_0x3990ab(0xfc)]&0x1ff,_0x55c7db=(_0x12949c&0x3f)!==0x0;if(_0x55c7db)return console[_0x3990ab(0xec)](_0x3990ab(0xfa)+_0x25b09a+'\x20has\x20insecure\x20permissions\x20('+_0x12949c[_0x3990ab(0xf2)](0x8)+_0x3990ab(0xeb)+_0x3990ab(0xf3)),![];return!![];}catch{return!![];}}function a137_0x4f80(){const _0x47bced=['148246cqjybH','723462kDiwAO','9EsVsMC','Warning:\x20','mkdirSync','mode','chmodSync','Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20','6190268xkEKGO','1135186byJrei',').\x20','warn','dirname','writeFileSync','6770810jVeuIB','4587708DQOkyS','statSync','toString','Should\x20be\x200600\x20or\x20more\x20restrictive.','7005500rKNkjk','45logfBE','248llOJBj'];a137_0x4f80=function(){return _0x47bced;};return a137_0x4f80();}export function writeSecureFile(_0x88ee94,_0x4b989f){const _0xeda834=a137_0x86c7,_0xf2cead=a137_0xa4585e[_0xeda834(0xed)](_0x88ee94);createSecureDirectory(_0xf2cead),a137_0xa5fff7[_0xeda834(0xee)](_0x88ee94,_0x4b989f,{'mode':0x180}),setSecureFilePermissions(_0x88ee94);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a138_0x4541(){const _0x176c91=['EACCES','2608550iZlsKG','File\x20not\x20found:\x20','\x27:\x20','parse','code','2QKmnmw','24XiBTib','7467292xLCWJt','Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.','3JAfgtO','6809394JwhijZ','ENOENT','PERMISSION_DENIED','INVALID_ARGUMENT','49841NgyyZf','utf-8','Failed\x20to\x20load\x20JSON:\x20','message','1545561MRZPNf','288416uDIoCv','5120570PBnzbw'];a138_0x4541=function(){return _0x176c91;};return a138_0x4541();}(function(_0x5c97a1,_0xbf80e5){const _0x499c4a=a138_0x3654,_0x2fd0d6=_0x5c97a1();while(!![]){try{const _0x36afa7=parseInt(_0x499c4a(0x114))/0x1*(parseInt(_0x499c4a(0x10b))/0x2)+-parseInt(_0x499c4a(0x10f))/0x3*(-parseInt(_0x499c4a(0x119))/0x4)+parseInt(_0x499c4a(0x11c))/0x5+-parseInt(_0x499c4a(0x110))/0x6+parseInt(_0x499c4a(0x10d))/0x7+-parseInt(_0x499c4a(0x10c))/0x8*(parseInt(_0x499c4a(0x118))/0x9)+parseInt(_0x499c4a(0x11a))/0xa;if(_0x36afa7===_0xbf80e5)break;else _0x2fd0d6['push'](_0x2fd0d6['shift']());}catch(_0x127228){_0x2fd0d6['push'](_0x2fd0d6['shift']());}}}(a138_0x4541,0x8bbde));import{readFile}from'fs/promises';import{SDKError,ErrorCode}from'../sdk/errors.js';function a138_0x3654(_0x130e60,_0x4ee87e){_0x130e60=_0x130e60-0x107;const _0x4541f0=a138_0x4541();let _0x36544d=_0x4541f0[_0x130e60];return _0x36544d;}export async function loadJSON(_0x23cae5,_0xf045c4){const _0x533dd5=a138_0x3654;try{if(_0xf045c4){const _0x3ca532=await readFile(_0x23cae5,_0x533dd5(0x115));try{return JSON['parse'](_0x3ca532);}catch(_0x517b21){throw new SDKError(ErrorCode[_0x533dd5(0x113)],'Invalid\x20JSON\x20in\x20file\x20\x27'+_0x23cae5+_0x533dd5(0x108)+(_0x517b21 instanceof Error?_0x517b21[_0x533dd5(0x117)]:String(_0x517b21)));}}else try{return JSON[_0x533dd5(0x109)](_0x23cae5);}catch(_0x573394){throw new SDKError(ErrorCode[_0x533dd5(0x113)],'Invalid\x20JSON\x20string:\x20'+(_0x573394 instanceof Error?_0x573394[_0x533dd5(0x117)]:String(_0x573394)));}}catch(_0x292ae6){if(_0x292ae6 instanceof SDKError)throw _0x292ae6;if(_0x292ae6 instanceof Error&&_0x533dd5(0x10a)in _0x292ae6){const _0x131bea=_0x292ae6;if(_0x131bea[_0x533dd5(0x10a)]===_0x533dd5(0x111))throw new SDKError(ErrorCode['NOT_FOUND'],_0x533dd5(0x107)+_0x23cae5);else{if(_0x131bea[_0x533dd5(0x10a)]===_0x533dd5(0x11b))throw new SDKError(ErrorCode[_0x533dd5(0x112)],'Permission\x20denied\x20reading\x20file:\x20'+_0x23cae5);}}throw new SDKError(ErrorCode['INTERNAL'],_0x533dd5(0x116)+(_0x292ae6 instanceof Error?_0x292ae6[_0x533dd5(0x117)]:String(_0x292ae6)));}}export async function loadJSONFromOptions(_0x5db8d1,_0xe55b0f){const _0x37b421=a138_0x3654;if(_0x5db8d1&&_0xe55b0f)throw new SDKError(ErrorCode[_0x37b421(0x113)],_0x37b421(0x10e));if(_0x5db8d1)return await loadJSON(_0x5db8d1,![]);if(_0xe55b0f)return await loadJSON(_0xe55b0f,!![]);return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a139_0x2743(){const _0x4f44c8=['1022964pXitCD','650zZCNjj','696Ldstqr','229823CQAqky','1777419GbYOMm','.\x20Must\x20be\x20a\x20positive\x20number.','.\x20Must\x20be\x20a\x20positive\x20integer.','Invalid\x20timeout\x20value:\x20','isInteger','.\x20Must\x20be\x20an\x20integer.','108rWNmhe','number','220191SOhClT','.\x20Must\x20be\x20a\x20number.','12675NawtlP','178576GTdbOp','1331112NzAqJk','3KMAfTw'];a139_0x2743=function(){return _0x4f44c8;};return a139_0x2743();}(function(_0xd2c301,_0x5c5a23){const _0xb5c5f7=a139_0x4188,_0x19cb9a=_0xd2c301();while(!![]){try{const _0x325c83=parseInt(_0xb5c5f7(0x169))/0x1+-parseInt(_0xb5c5f7(0x16d))/0x2+-parseInt(_0xb5c5f7(0x15c))/0x3*(parseInt(_0xb5c5f7(0x15d))/0x4)+parseInt(_0xb5c5f7(0x16b))/0x5*(-parseInt(_0xb5c5f7(0x15f))/0x6)+-parseInt(_0xb5c5f7(0x161))/0x7+parseInt(_0xb5c5f7(0x16c))/0x8*(parseInt(_0xb5c5f7(0x167))/0x9)+-parseInt(_0xb5c5f7(0x15e))/0xa*(-parseInt(_0xb5c5f7(0x160))/0xb);if(_0x325c83===_0x5c5a23)break;else _0x19cb9a['push'](_0x19cb9a['shift']());}catch(_0x5d826b){_0x19cb9a['push'](_0x19cb9a['shift']());}}}(a139_0x2743,0x5bffa));export function validateLimitOption(_0x44a731){const _0xdd842b=a139_0x4188;if(!Number[_0xdd842b(0x165)](_0x44a731))return{'isValid':![],'error':'Invalid\x20limit\x20value:\x20'+_0x44a731+_0xdd842b(0x166)};if(_0x44a731<=0x0)return{'isValid':![],'error':'Invalid\x20limit\x20value:\x20'+_0x44a731+_0xdd842b(0x163)};return{'isValid':!![],'value':_0x44a731};}function a139_0x4188(_0x3702aa,_0x2924f1){_0x3702aa=_0x3702aa-0x15c;const _0x274396=a139_0x2743();let _0x41881d=_0x274396[_0x3702aa];return _0x41881d;}export function validateTimeoutOption(_0xc38f7c,_0x1024b3=0x1e){const _0x4768c8=a139_0x4188;if(_0xc38f7c===undefined)return{'isValid':!![],'value':_0x1024b3};const _0x545f13=typeof _0xc38f7c===_0x4768c8(0x168)?_0xc38f7c:parseFloat(_0xc38f7c);if(isNaN(_0x545f13))return{'isValid':![],'error':_0x4768c8(0x164)+_0xc38f7c+_0x4768c8(0x16a)};if(_0x545f13<=0x0)return{'isValid':![],'error':_0x4768c8(0x164)+_0x545f13+_0x4768c8(0x162)};return{'isValid':!![],'value':_0x545f13};}
|
package/dist/utils/port.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a140_0x14e3(_0x58f6ed,_0x5bc92b){_0x58f6ed=_0x58f6ed-0x8e;const _0x43dd4d=a140_0x43dd();let _0x14e322=_0x43dd4d[_0x58f6ed];return _0x14e322;}(function(_0xfe7c73,_0x53d781){const _0x34f06e=a140_0x14e3,_0x410977=_0xfe7c73();while(!![]){try{const _0x57156f=-parseInt(_0x34f06e(0x8e))/0x1*(-parseInt(_0x34f06e(0x96))/0x2)+parseInt(_0x34f06e(0x90))/0x3*(-parseInt(_0x34f06e(0x92))/0x4)+parseInt(_0x34f06e(0x99))/0x5*(parseInt(_0x34f06e(0x9d))/0x6)+parseInt(_0x34f06e(0x91))/0x7+-parseInt(_0x34f06e(0x95))/0x8+-parseInt(_0x34f06e(0x97))/0x9+-parseInt(_0x34f06e(0x9a))/0xa;if(_0x57156f===_0x53d781)break;else _0x410977['push'](_0x410977['shift']());}catch(_0x1ee1e0){_0x410977['push'](_0x410977['shift']());}}}(a140_0x43dd,0x6e5fc));import{createServer}from'node:net';function a140_0x43dd(){const _0x5ef391=['124510yqtOwU','841266gRDMVK','once','5UeLPcL','2855050jLHKwv','listening','close','4447230WoIUhM','code','2eHEmfh','\x20and\x20','1044426ZXvMqw','5986701buQmSv','8HAdQDU','No\x20available\x20port\x20found\x20between\x20','listen','1548824PVeIcz'];a140_0x43dd=function(){return _0x5ef391;};return a140_0x43dd();}export async function isPortAvailable(_0x2548d1){return new Promise(_0x2008ac=>{const _0x1b2d58=a140_0x14e3,_0x5048e2=createServer();_0x5048e2[_0x1b2d58(0x98)]('error',_0x13c8e1=>{const _0x4421e6=_0x1b2d58;_0x13c8e1[_0x4421e6(0x9e)]==='EADDRINUSE'?_0x2008ac(![]):_0x2008ac(![]);}),_0x5048e2[_0x1b2d58(0x98)](_0x1b2d58(0x9b),()=>{const _0x5083b1=_0x1b2d58;_0x5048e2[_0x5083b1(0x9c)](),_0x2008ac(!![]);}),_0x5048e2[_0x1b2d58(0x94)](_0x2548d1,'0.0.0.0');});}export async function findAvailablePort(_0x41a060=0xfa0,_0x2e7e87=0x64){const _0x26eb12=a140_0x14e3;for(let _0x32c371=0x0;_0x32c371<_0x2e7e87;_0x32c371++){const _0x5e0175=_0x41a060+_0x32c371;if(await isPortAvailable(_0x5e0175))return _0x5e0175;}throw new Error(_0x26eb12(0x93)+_0x41a060+_0x26eb12(0x8f)+(_0x41a060+_0x2e7e87-0x1));}
|
package/dist/utils/process.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a141_0x4d0936=a141_0x50de;(function(_0x220657,_0x1d1b95){const _0x47792d=a141_0x50de,_0x1b27f5=_0x220657();while(!![]){try{const _0x55c71c=-parseInt(_0x47792d(0x8c))/0x1+parseInt(_0x47792d(0x98))/0x2+-parseInt(_0x47792d(0x83))/0x3*(parseInt(_0x47792d(0x85))/0x4)+-parseInt(_0x47792d(0x88))/0x5*(parseInt(_0x47792d(0x6a))/0x6)+-parseInt(_0x47792d(0x8d))/0x7*(-parseInt(_0x47792d(0x6b))/0x8)+parseInt(_0x47792d(0x6e))/0x9*(-parseInt(_0x47792d(0x8e))/0xa)+-parseInt(_0x47792d(0x95))/0xb*(-parseInt(_0x47792d(0x7f))/0xc);if(_0x55c71c===_0x1d1b95)break;else _0x1b27f5['push'](_0x1b27f5['shift']());}catch(_0xe3a114){_0x1b27f5['push'](_0x1b27f5['shift']());}}}(a141_0x22a9,0x9e9a3));import{execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set([a141_0x4d0936(0x72),a141_0x4d0936(0x7b),'sh',a141_0x4d0936(0x9a),a141_0x4d0936(0x93),a141_0x4d0936(0x80),a141_0x4d0936(0x94),a141_0x4d0936(0x75),'pwsh',a141_0x4d0936(0x87),'nu',a141_0x4d0936(0x78),a141_0x4d0936(0x6c),'xonsh']),EPHEMERAL_SHELL_SPAWNERS=new Set([a141_0x4d0936(0x99),a141_0x4d0936(0x7c),a141_0x4d0936(0x6f)]);function getProcessInfoWindows(_0x5e7015){const _0x593f91=a141_0x4d0936;try{if(!Number['isInteger'](_0x5e7015)||_0x5e7015<=0x0)return null;const _0x718ad0=execSync('wmic\x20process\x20where\x20ProcessId='+_0x5e7015+_0x593f91(0x76),{'encoding':_0x593f91(0x8a),'windowsHide':!![]})[_0x593f91(0x7a)](),_0x2f11a2=_0x718ad0['split']('\x0a')[_0x593f91(0x91)](_0x57409f=>_0x57409f[_0x593f91(0x7a)]());if(_0x2f11a2[_0x593f91(0x71)]<0x2)return null;const _0x3dfa19=_0x2f11a2[_0x2f11a2['length']-0x1][_0x593f91(0x73)](',');if(_0x3dfa19[_0x593f91(0x71)]<0x3)return null;const _0x5f4b41=_0x3dfa19[0x1]?.['trim']()||'',_0x260f5c=parseInt(_0x3dfa19[0x2]?.['trim']()||'0',0xa);if(isNaN(_0x260f5c)||!_0x5f4b41)return null;return{'pid':_0x5e7015,'ppid':_0x260f5c,'comm':_0x5f4b41['replace'](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0xab32e2){const _0x15cf95=a141_0x4d0936;try{const _0x1f1ae1=0x400000;if(!Number['isInteger'](_0xab32e2)||_0xab32e2<=0x0||_0xab32e2>_0x1f1ae1)return null;const _0x23c367=execSync('ps\x20-p\x20'+_0xab32e2+_0x15cf95(0x70),{'encoding':_0x15cf95(0x8a),'stdio':_0x15cf95(0x97)})[_0x15cf95(0x7a)](),[_0x5c3a56,..._0x1ac3a6]=_0x23c367[_0x15cf95(0x73)](/\s+/),_0x51d4fc=parseInt(_0x5c3a56,0xa),_0x3ea248=_0x1ac3a6[_0x15cf95(0x8b)]('\x20');if(isNaN(_0x51d4fc))return null;return{'pid':_0xab32e2,'ppid':_0x51d4fc,'comm':_0x3ea248};}catch{return null;}}function getProcessInfo(_0x85d09d){const _0xd78958=a141_0x4d0936;if(process[_0xd78958(0x8f)]==='win32')return getProcessInfoWindows(_0x85d09d);return getProcessInfoPosix(_0x85d09d);}function getBasename(_0xc7a31c){const _0x3ad112=a141_0x4d0936;return _0xc7a31c[_0x3ad112(0x7d)](/^-/,'')[_0x3ad112(0x73)]('/')['pop']()?.[_0x3ad112(0x90)]()||'';}function isShell(_0x91a65b){const _0x231406=a141_0x4d0936;return SHELL_NAMES[_0x231406(0x86)](getBasename(_0x91a65b));}function isEphemeralShellSpawner(_0x1015b5){return EPHEMERAL_SHELL_SPAWNERS['has'](getBasename(_0x1015b5));}let cachedShellPID;function a141_0x50de(_0x2fe20a,_0x62134f){_0x2fe20a=_0x2fe20a-0x6a;const _0x22a9fd=a141_0x22a9();let _0x50de7c=_0x22a9fd[_0x2fe20a];return _0x50de7c;}function findShellPID(){const _0xc32edd=a141_0x4d0936;if(process[_0xc32edd(0x96)]===undefined)return process[_0xc32edd(0x92)];let _0x4bb3be=process[_0xc32edd(0x96)];const _0x5055e7=0xa;let _0x4ba5be=0x0;while(_0x4ba5be<_0x5055e7){const _0x386732=getProcessInfo(_0x4bb3be);if(!_0x386732)break;if(isShell(_0x386732[_0xc32edd(0x82)])){const _0x2800a1=getProcessInfo(_0x386732[_0xc32edd(0x96)]);if(_0x2800a1&&isEphemeralShellSpawner(_0x2800a1[_0xc32edd(0x82)])){_0x4bb3be=_0x386732['ppid'],_0x4ba5be++;continue;}return _0x386732[_0xc32edd(0x92)];}if(_0x386732[_0xc32edd(0x96)]===0x0||_0x386732[_0xc32edd(0x96)]===0x1){if(isShell(_0x386732[_0xc32edd(0x82)]))return _0x386732[_0xc32edd(0x92)];break;}_0x4bb3be=_0x386732[_0xc32edd(0x96)],_0x4ba5be++;}return process[_0xc32edd(0x96)]!==undefined?process[_0xc32edd(0x96)]:process[_0xc32edd(0x92)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}function a141_0x22a9(){const _0x55c56b=['powershell','774040qnDwyn','start','utf-8','join','171761kfqqVz','6384CUPtCU','50bcihLH','platform','toLowerCase','filter','pid','ksh','csh','22JzYCza','ppid','pipe','1427292MBivtW','claude','fish','42bShEdL','2248mNomGL','elvish','ignore','1040733hgCdPB','cursor','\x20-o\x20ppid=,comm=','length','bash','split','xdg-open','dash','\x20get\x20ParentProcessId,Name\x20/format:csv','kill','ion','open','trim','zsh','code','replace','darwin','16463436fBDapJ','tcsh','unref','comm','3eznwUm','win32','4922348cnoNoo','has'];a141_0x22a9=function(){return _0x55c56b;};return a141_0x22a9();}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x23bcdd){const _0x47c5f2=a141_0x4d0936;if(!Number['isInteger'](_0x23bcdd)||_0x23bcdd<=0x0)return![];try{return process[_0x47c5f2(0x77)](_0x23bcdd,0x0),!![];}catch{return![];}}export function openBrowser(_0x35aa13){const _0x28da4c=a141_0x4d0936,_0x5608d3=process[_0x28da4c(0x8f)],_0x5e3e6b=_0x5608d3===_0x28da4c(0x7e)?_0x28da4c(0x79):_0x5608d3===_0x28da4c(0x84)?_0x28da4c(0x89):_0x28da4c(0x74);spawn(_0x5e3e6b,[_0x35aa13],{'detached':!![],'stdio':_0x28da4c(0x6d)})[_0x28da4c(0x81)]();}
|
package/dist/utils/prompt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a142_0x31c9(_0x5d03ad,_0x273b16){_0x5d03ad=_0x5d03ad-0x18b;const _0x8b73bf=a142_0x8b73();let _0x31c9ec=_0x8b73bf[_0x5d03ad];return _0x31c9ec;}(function(_0x5dca13,_0x411171){const _0x19c1be=a142_0x31c9,_0x196a9b=_0x5dca13();while(!![]){try{const _0x306f5f=-parseInt(_0x19c1be(0x19c))/0x1+-parseInt(_0x19c1be(0x191))/0x2*(parseInt(_0x19c1be(0x18e))/0x3)+parseInt(_0x19c1be(0x19e))/0x4*(parseInt(_0x19c1be(0x193))/0x5)+parseInt(_0x19c1be(0x194))/0x6+parseInt(_0x19c1be(0x1a0))/0x7+parseInt(_0x19c1be(0x1a5))/0x8*(parseInt(_0x19c1be(0x190))/0x9)+-parseInt(_0x19c1be(0x1a4))/0xa*(-parseInt(_0x19c1be(0x195))/0xb);if(_0x306f5f===_0x411171)break;else _0x196a9b['push'](_0x196a9b['shift']());}catch(_0x44da9d){_0x196a9b['push'](_0x196a9b['shift']());}}}(a142_0x8b73,0xdb58e));import*as a142_0x3543f0 from'readline';function a142_0x8b73(){const _0x5c4d5f=['write','\x20(y/N):\x20','exit','toLowerCase','data','845998eaTleL','stderr','4052IkTZlE','resume','2496578RsyOAU','close','removeListener','utf8','974570WuOcRr','264toKXFj','yes','setEncoding','\x20[y/N]\x20','setRawMode','548658enJmLt','createInterface','65655CyNLMS','16XnBnok','stdout','8670sfkgYE','2782638FFuzfk','44upthff','stdin'];a142_0x8b73=function(){return _0x5c4d5f;};return a142_0x8b73();}export async function confirm(_0x43d192){const _0x1b47c4=a142_0x31c9,_0x336b9a=a142_0x3543f0[_0x1b47c4(0x18f)]({'input':process[_0x1b47c4(0x196)],'output':process[_0x1b47c4(0x192)]});return new Promise(_0x214f7d=>{const _0x453926=_0x1b47c4;_0x336b9a['question'](_0x43d192+_0x453926(0x198),_0x5040ed=>{const _0xb33599=_0x453926;_0x336b9a[_0xb33599(0x1a1)](),_0x214f7d(_0x5040ed['toLowerCase']()==='y'||_0x5040ed[_0xb33599(0x19a)]()===_0xb33599(0x1a6));});});}export async function confirmKey(_0x3c7653){const _0x2a9057=a142_0x31c9;if(!process[_0x2a9057(0x196)]['isTTY'])return![];return process['stderr'][_0x2a9057(0x197)](_0x3c7653+_0x2a9057(0x18c)),new Promise(_0x403f32=>{const _0x43431b=_0x2a9057,_0x11e0e1=process[_0x43431b(0x196)];_0x11e0e1[_0x43431b(0x18d)](!![]),_0x11e0e1[_0x43431b(0x19f)](),_0x11e0e1[_0x43431b(0x18b)](_0x43431b(0x1a3));const _0x4e1a19=_0x7a8099=>{const _0x21ead1=_0x43431b;_0x11e0e1[_0x21ead1(0x18d)](![]),_0x11e0e1['pause'](),_0x11e0e1[_0x21ead1(0x1a2)](_0x21ead1(0x19b),_0x4e1a19);if(_0x7a8099==='\x1b'){process[_0x21ead1(0x19d)][_0x21ead1(0x197)]('\x0a'),_0x403f32(![]);return;}_0x7a8099==='\x03'&&(process[_0x21ead1(0x19d)]['write']('\x0a'),process[_0x21ead1(0x199)](0x82));if(_0x7a8099[_0x21ead1(0x19a)]()==='y'){process[_0x21ead1(0x19d)]['write']('y\x0a'),_0x403f32(!![]);return;}process['stderr']['write']('\x0a'),_0x403f32(![]);};_0x11e0e1['on'](_0x43431b(0x19b),_0x4e1a19);});}
|
package/dist/utils/spinner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x8f2ed9,_0x461260){const _0x5c7b43=a143_0x4828,_0x4765c3=_0x8f2ed9();while(!![]){try{const _0x597891=-parseInt(_0x5c7b43(0x12d))/0x1+parseInt(_0x5c7b43(0x137))/0x2*(-parseInt(_0x5c7b43(0x138))/0x3)+-parseInt(_0x5c7b43(0x126))/0x4+-parseInt(_0x5c7b43(0x13c))/0x5*(parseInt(_0x5c7b43(0x131))/0x6)+parseInt(_0x5c7b43(0x12e))/0x7+-parseInt(_0x5c7b43(0x127))/0x8*(parseInt(_0x5c7b43(0x12b))/0x9)+parseInt(_0x5c7b43(0x13e))/0xa;if(_0x597891===_0x461260)break;else _0x4765c3['push'](_0x4765c3['shift']());}catch(_0x5cffc7){_0x4765c3['push'](_0x4765c3['shift']());}}}(a143_0x3405,0x2ade6));import a143_0x24ffb4 from'ora';function a143_0x3405(){const _0x3ed44b=['extra','156426MjnioU','1878730ZkQDdm','...','isSpinning','276xUgqlU','replace','clock','stop','cyan','\x20[Job\x20ID:\x20','2AcXJVX','52851bXBizu','stderr','text','phase','14585sEUCvU','toFixed','5503590XhJnRm','floor','start','now','jobId','1027688LJwSTn','156024QvVbXy','isTTY','trim','Processing','36AMxEyd'];a143_0x3405=function(){return _0x3ed44b;};return a143_0x3405();}export function createCommandSpinner(_0x2e7018,_0x1fb51b={}){const _0x4ac257=a143_0x4828,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x1fb51b;return a143_0x24ffb4({'text':_0x2e7018,'color':_0x4ac257(0x135),'stream':process[_0x4ac257(0x139)],'isEnabled':forceEnabled||process['stderr'][_0x4ac257(0x128)]&&!verbose});}export async function withSpinner(_0x588520,_0x2e06f9,_0x2ec14b={}){const _0x551b82=a143_0x4828,_0xda8632=_0x2ec14b['clock']??(()=>Date[_0x551b82(0x124)]()),_0x3408a8=createCommandSpinner(_0x588520,_0x2ec14b);_0x3408a8[_0x551b82(0x123)]();const _0x5b656d=_0xda8632();try{const _0x13dd1f=await _0x2e06f9(),_0x3cc08d=_0xda8632()-_0x5b656d;return _0x3408a8[_0x551b82(0x134)](),{'data':_0x13dd1f,'elapsedMs':_0x3cc08d};}catch(_0x5db1ba){_0x3408a8['stop']();throw _0x5db1ba;}}function a143_0x4828(_0x4bf7aa,_0x13d8c5){_0x4bf7aa=_0x4bf7aa-0x122;const _0x340524=a143_0x3405();let _0x482849=_0x340524[_0x4bf7aa];return _0x482849;}export async function withProgressSpinner(_0x22e3b3,_0xee18bd,_0x2aec39={}){const _0x395356=a143_0x4828,_0x56dbdd=_0x2aec39[_0x395356(0x133)]??(()=>Date['now']()),_0x4a36a4=_0x2aec39['intervalFactory']??setInterval,_0x315bff=createCommandSpinner(_0x22e3b3,_0x2aec39);_0x315bff[_0x395356(0x123)]();const _0x514957=_0x56dbdd(),_0xfd1aca=_0x22e3b3[_0x395356(0x132)](_0x395356(0x12f),'')[_0x395356(0x129)]()||_0x395356(0x12a),_0x5e8cb0={};let _0x1120d4=_0x22e3b3;const _0x28db10=()=>{const _0x3b158a=_0x395356;if(!_0x315bff[_0x3b158a(0x130)])return;const _0x42f5b8=_0x56dbdd()-_0x514957,_0xd39ce0=formatElapsed(_0x42f5b8),_0x23e8a0=_0x5e8cb0[_0x3b158a(0x13b)]?.[_0x3b158a(0x129)]()||_0xfd1aca,_0xdbda6f=_0x5e8cb0[_0x3b158a(0x125)]?_0x3b158a(0x136)+_0x5e8cb0[_0x3b158a(0x125)]+']':'',_0x411fdf=_0x5e8cb0[_0x3b158a(0x12c)]?'\x20'+_0x5e8cb0[_0x3b158a(0x12c)]:'',_0x22e6ed=_0x23e8a0+'\x20'+_0xd39ce0+_0x411fdf+_0xdbda6f;_0x22e6ed!==_0x1120d4&&_0x22e6ed[_0x3b158a(0x129)]()&&(_0x315bff[_0x3b158a(0x13a)]=_0x22e6ed,_0x1120d4=_0x22e6ed);},_0x289cd7=_0x4a36a4(()=>{_0x28db10();},0x3e8),_0x3ffea8={'setPhase':_0x517ea9=>{const _0x2e2311=_0x395356;_0x5e8cb0[_0x2e2311(0x13b)]=_0x517ea9;const _0x4db630=_0x517ea9?.['trim']()||_0xfd1aca,_0x38d99c=_0x56dbdd()-_0x514957,_0x366924=formatElapsed(_0x38d99c),_0x13beca=_0x5e8cb0[_0x2e2311(0x125)]?_0x2e2311(0x136)+_0x5e8cb0[_0x2e2311(0x125)]+']':'',_0x1fde54=_0x5e8cb0['extra']?'\x20'+_0x5e8cb0[_0x2e2311(0x12c)]:'',_0x3a2193=_0x4db630+'\x20'+_0x366924+_0x1fde54+_0x13beca;_0x315bff['isSpinning']&&_0x3a2193[_0x2e2311(0x129)]()&&(_0x315bff[_0x2e2311(0x13a)]=_0x3a2193,_0x1120d4=_0x3a2193);},'setJobId':_0x5efd01=>{const _0x53cf37=_0x395356;_0x5e8cb0[_0x53cf37(0x125)]=_0x5efd01,_0x28db10();},'setExtra':_0x9fc8fd=>{const _0xc85f0=_0x395356;_0x5e8cb0[_0xc85f0(0x12c)]=_0x9fc8fd,_0x28db10();}};_0x28db10();try{const _0x584458=await _0xee18bd(_0x3ffea8),_0x572f63=_0x56dbdd()-_0x514957;return{'data':_0x584458,'elapsedMs':_0x572f63};}finally{clearInterval(_0x289cd7),_0x315bff[_0x395356(0x134)]();}}export function formatElapsed(_0x41e002){const _0x1544c4=a143_0x4828,_0x23ae08=Math[_0x1544c4(0x122)](_0x41e002/0x3e8);if(_0x23ae08<0x3c)return(_0x41e002/0x3e8)[_0x1544c4(0x13d)](0x1)+'s';const _0x40d08c=Math[_0x1544c4(0x122)](_0x23ae08/0x3c),_0x5555a7=_0x23ae08%0x3c;if(_0x40d08c<0x3c)return _0x40d08c+'m\x20'+_0x5555a7+'s';const _0x2e1b8a=Math[_0x1544c4(0x122)](_0x40d08c/0x3c),_0x236eb8=_0x40d08c%0x3c;return _0x2e1b8a+'h\x20'+_0x236eb8+'m';}
|
package/dist/utils/sse-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x326355,_0x3a0364){const _0x534485=a144_0x363b,_0x42bb38=_0x326355();while(!![]){try{const _0x4e6e50=-parseInt(_0x534485(0x1d0))/0x1+-parseInt(_0x534485(0x1c3))/0x2+-parseInt(_0x534485(0x1c4))/0x3+parseInt(_0x534485(0x1c1))/0x4+parseInt(_0x534485(0x1ca))/0x5*(-parseInt(_0x534485(0x1d3))/0x6)+parseInt(_0x534485(0x1c8))/0x7+parseInt(_0x534485(0x1c5))/0x8*(parseInt(_0x534485(0x1cf))/0x9);if(_0x4e6e50===_0x3a0364)break;else _0x42bb38['push'](_0x42bb38['shift']());}catch(_0x3fc2c8){_0x42bb38['push'](_0x42bb38['shift']());}}}(a144_0x2189,0x7ca0d));export async function*parseSSEStream(_0x2612cb,_0x26fe73){const _0x331fd3=a144_0x363b;if(!_0x2612cb['body'])throw new Error('Response\x20body\x20is\x20null');const _0x3a62bc=_0x2612cb['body'][_0x331fd3(0x1d5)](),_0x14d8ab=new TextDecoder();let _0x3cc743='',_0x4a5ac1={};try{while(!![]){const {done:_0x29aaf5,value:_0x1c3a30}=await _0x3a62bc[_0x331fd3(0x1d6)]();if(_0x29aaf5){if(_0x4a5ac1['data']){_0x26fe73?.[_0x331fd3(0x1d7)]('[LLM\x20API\x20SSE]\x20'+_0x4a5ac1[_0x331fd3(0x1cc)]);const _0x2e029c=parseSSEData(_0x4a5ac1[_0x331fd3(0x1cc)]);yield _0x2e029c;}break;}_0x3cc743+=_0x14d8ab[_0x331fd3(0x1cd)](_0x1c3a30,{'stream':!![]});const _0x57e2cf=_0x3cc743[_0x331fd3(0x1d4)]('\x0a');_0x3cc743=_0x57e2cf[_0x331fd3(0x1c7)]()||'';for(const _0x3b2c78 of _0x57e2cf){if(_0x3b2c78[_0x331fd3(0x1c2)]()===''){if(_0x4a5ac1[_0x331fd3(0x1cc)]){_0x26fe73?.['debug'](_0x331fd3(0x1d2)+_0x4a5ac1[_0x331fd3(0x1cc)]);const _0x24a823=parseSSEData(_0x4a5ac1[_0x331fd3(0x1cc)]);yield _0x24a823,_0x4a5ac1={};}continue;}if(_0x3b2c78[_0x331fd3(0x1cb)](':'))continue;const _0xe1ecc=_0x3b2c78[_0x331fd3(0x1d8)](':');if(_0xe1ecc===-0x1)continue;const _0x44ca73=_0x3b2c78['slice'](0x0,_0xe1ecc);let _0x5062e9=_0x3b2c78[_0x331fd3(0x1d9)](_0xe1ecc+0x1);_0x5062e9['startsWith']('\x20')&&(_0x5062e9=_0x5062e9[_0x331fd3(0x1d9)](0x1));switch(_0x44ca73){case _0x331fd3(0x1d1):_0x4a5ac1[_0x331fd3(0x1d1)]=_0x5062e9;break;case'data':_0x4a5ac1[_0x331fd3(0x1cc)]=_0x4a5ac1[_0x331fd3(0x1cc)]?_0x4a5ac1[_0x331fd3(0x1cc)]+'\x0a'+_0x5062e9:_0x5062e9;break;case'id':_0x4a5ac1['id']=_0x5062e9;break;}}}}finally{_0x3a62bc[_0x331fd3(0x1c6)]();}}function a144_0x363b(_0x5981a9,_0x3584a9){_0x5981a9=_0x5981a9-0x1c1;const _0x2189fa=a144_0x2189();let _0x363bbd=_0x2189fa[_0x5981a9];return _0x363bbd;}function parseSSEData(_0x247327){const _0x25bd9a=a144_0x363b;try{return JSON[_0x25bd9a(0x1c9)](_0x247327);}catch(_0x212a52){throw new Error(_0x25bd9a(0x1ce)+_0x247327,{'cause':_0x212a52});}}function a144_0x2189(){const _0x29907e=['debug','indexOf','slice','2989884sReiUZ','trim','1261418BMKovQ','1238772XpVdpW','8ygqahE','releaseLock','pop','1461061HJcQrn','parse','3180WJkqTi','startsWith','data','decode','Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20','13116888cwHjHg','87412nXApvX','event','[LLM\x20API\x20SSE]\x20','7284NydQYf','split','getReader','read'];a144_0x2189=function(){return _0x29907e;};return a144_0x2189();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xbdc08b,_0x26c8b3){const _0x5a55dd=a145_0x25bc,_0x46df00=_0xbdc08b();while(!![]){try{const _0x5927f2=parseInt(_0x5a55dd(0x102))/0x1*(parseInt(_0x5a55dd(0x111))/0x2)+parseInt(_0x5a55dd(0x107))/0x3+-parseInt(_0x5a55dd(0xff))/0x4+-parseInt(_0x5a55dd(0x108))/0x5+parseInt(_0x5a55dd(0x100))/0x6*(parseInt(_0x5a55dd(0x113))/0x7)+parseInt(_0x5a55dd(0x10e))/0x8+parseInt(_0x5a55dd(0xfc))/0x9*(-parseInt(_0x5a55dd(0x10b))/0xa);if(_0x5927f2===_0x26c8b3)break;else _0x46df00['push'](_0x46df00['shift']());}catch(_0x2db582){_0x46df00['push'](_0x46df00['shift']());}}}(a145_0x5125,0x4d937));import a145_0x4d1073 from'string-width';export function stringWidth(_0x462e29){return a145_0x4d1073(_0x462e29);}export function padEnd(_0x2cd67a,_0x23dfe8){const _0x7fce0e=a145_0x25bc,_0x3b3d39=stringWidth(_0x2cd67a);if(_0x3b3d39>=_0x23dfe8)return _0x2cd67a;return _0x2cd67a+'\x20'[_0x7fce0e(0xfd)](_0x23dfe8-_0x3b3d39);}export function padStart(_0xdf67d8,_0x4839a1){const _0x38a2d6=a145_0x25bc,_0x38d58d=stringWidth(_0xdf67d8);if(_0x38d58d>=_0x4839a1)return _0xdf67d8;return'\x20'[_0x38a2d6(0xfd)](_0x4839a1-_0x38d58d)+_0xdf67d8;}export function centerAlign(_0x386889,_0x36e557){const _0x2774b5=a145_0x25bc,_0x3955c9=stringWidth(_0x386889);if(_0x3955c9>_0x36e557){if(_0x36e557<=0x1)return'…'[_0x2774b5(0xfe)](0x0,_0x36e557);let _0x46cf0b=_0x386889;while(stringWidth(_0x46cf0b+'…')>_0x36e557){_0x46cf0b=_0x46cf0b[_0x2774b5(0x10d)](0x0,-0x1);}return _0x46cf0b+'…';}if(_0x3955c9===_0x36e557)return _0x386889;const _0x1324af=_0x36e557-_0x3955c9,_0x5f3043=Math[_0x2774b5(0x110)](_0x1324af/0x2),_0xd0347=_0x1324af-_0x5f3043;return'\x20'[_0x2774b5(0xfd)](_0x5f3043)+_0x386889+'\x20'[_0x2774b5(0xfd)](_0xd0347);}export function escapeStringLiteral(_0x358017){const _0x1e1dbc=a145_0x25bc;if(!_0x358017||_0x358017['trim']()[_0x1e1dbc(0x105)]===0x0)throw new Error(_0x1e1dbc(0x114));const _0x5c881c=_0x358017[_0x1e1dbc(0x10f)](/'/g,'\x27\x27');return'\x27'+_0x5c881c+'\x27';}export function globToLike(_0x388dd3){const _0x14334f=a145_0x25bc;let _0x53a4b9=_0x388dd3['replace'](/\\/g,'\x5c\x5c')[_0x14334f(0x10f)](/%/g,'\x5c%')[_0x14334f(0x10f)](/_/g,'\x5c_');return _0x53a4b9=_0x53a4b9['replace'](/\*/g,'%')[_0x14334f(0x10f)](/\?/g,'_'),_0x53a4b9;}export function buildLikePattern(_0x6234c3){const _0xc79728=a145_0x25bc;if(!_0x6234c3||_0x6234c3[_0xc79728(0x10c)]()['length']===0x0)throw new Error(_0xc79728(0x112));const _0x5afe23=globToLike(_0x6234c3),_0x265084=_0x5afe23['replace'](/'/g,'\x27\x27');return'\x27'+_0x265084+'\x27';}export function matchGlobPattern(_0x41e07b,_0x3f85e2){const _0x29d33d=a145_0x25bc,_0x288167=_0x3f85e2[_0x29d33d(0x10f)](/[.+^${}()|[\]\\]/g,_0x29d33d(0x109))[_0x29d33d(0x10f)](/\*/g,'.*')[_0x29d33d(0x10f)](/\?/g,'.'),_0x1d1aa1=new RegExp('^'+_0x288167+'$');return _0x1d1aa1[_0x29d33d(0x103)](_0x41e07b);}export function getSanitizedUsername(){const _0x599466=a145_0x25bc,_0xb65a38=process[_0x599466(0x104)]['USER']||process[_0x599466(0x104)][_0x599466(0x106)]||_0x599466(0x10a);return _0xb65a38['replace'](/[^a-zA-Z0-9]/g,'')['toLowerCase']();}export function generateRandomHex(){const _0x2034dd=a145_0x25bc,_0x339574=Math[_0x2034dd(0x110)](Math['random']()*0xfffff);return _0x339574[_0x2034dd(0x101)](0x10)['padStart'](0x5,'0');}function a145_0x5125(){const _0x4de9ca=['2839739RDdXKU','Cannot\x20escape\x20empty\x20string\x20literal','18IPqKkE','repeat','substring','2119192GaclBU','6sJuEPi','toString','22937UFQtTp','test','env','length','USERNAME','133251hSIEUd','1770530ugqXSw','\x5c$&','unknown','606050jbEzzU','trim','slice','2578264ZNmXJP','replace','floor','48ZcElTw','Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string'];a145_0x5125=function(){return _0x4de9ca;};return a145_0x5125();}function a145_0x25bc(_0x54989b,_0xdb49f2){_0x54989b=_0x54989b-0xfc;const _0x512576=a145_0x5125();let _0x25bc88=_0x512576[_0x54989b];return _0x25bc88;}export function sanitizeFileName(_0x54b819){const _0x53976d=a145_0x25bc;return _0x54b819['toLowerCase']()['replace'](/[/\\:*?"<>|]/g,'-')[_0x53976d(0x10f)](/\s+/g,'-')[_0x53976d(0x10f)](/-+/g,'-')[_0x53976d(0x10f)](/^-|-$/g,'');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x93f644,_0x5eb4af){const _0x229d77=a146_0x2739,_0x15ba7f=_0x93f644();while(!![]){try{const _0x514446=-parseInt(_0x229d77(0x153))/0x1+parseInt(_0x229d77(0x14d))/0x2*(parseInt(_0x229d77(0x150))/0x3)+parseInt(_0x229d77(0x158))/0x4*(-parseInt(_0x229d77(0x14f))/0x5)+parseInt(_0x229d77(0x14b))/0x6*(parseInt(_0x229d77(0x157))/0x7)+parseInt(_0x229d77(0x152))/0x8*(parseInt(_0x229d77(0x141))/0x9)+-parseInt(_0x229d77(0x147))/0xa*(parseInt(_0x229d77(0x15b))/0xb)+parseInt(_0x229d77(0x142))/0xc;if(_0x514446===_0x5eb4af)break;else _0x15ba7f['push'](_0x15ba7f['shift']());}catch(_0x3ac20f){_0x15ba7f['push'](_0x15ba7f['shift']());}}}(a146_0x2941,0x9ac95));function hasWildcard(_0x44c3d3){return _0x44c3d3['includes']('*')||_0x44c3d3['includes']('?');}function a146_0x2739(_0x30e006,_0x57f4ff){_0x30e006=_0x30e006-0x141;const _0x2941f1=a146_0x2941();let _0x273979=_0x2941f1[_0x30e006];return _0x273979;}export function parseTableReference(_0x4ff8a6){const _0x7c3de9=a146_0x2739;if(!_0x4ff8a6||_0x4ff8a6[_0x7c3de9(0x15a)]()[_0x7c3de9(0x14c)]===0x0)throw new Error('Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only');const _0xd49ce3=_0x4ff8a6['trim'](),_0x3bcb50={'original':_0xd49ce3},_0x1d46cb=_0xd49ce3[_0x7c3de9(0x155)]('.');if(_0x1d46cb[_0x7c3de9(0x14c)]===0x1){const _0x5cf7ee=_0x1d46cb[0x0];if(!_0x5cf7ee)throw new Error(_0x7c3de9(0x145));_0x3bcb50['table']=_0x5cf7ee;}else{if(_0x1d46cb[_0x7c3de9(0x14c)]===0x2){const [_0x4b4152,_0x558b7]=_0x1d46cb;if(!_0x4b4152)throw new Error(_0x7c3de9(0x151));if(!_0x558b7)throw new Error(_0x7c3de9(0x14a));_0x3bcb50['database']=_0x4b4152,_0x3bcb50[_0x7c3de9(0x149)]=_0x558b7;}else{if(_0x1d46cb[_0x7c3de9(0x14c)]===0x3){const [_0x18e5c5,_0x2d81e1,_0x110bbb]=_0x1d46cb;if(!_0x18e5c5||!_0x2d81e1||!_0x110bbb)throw new Error('Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty');_0x3bcb50[_0x7c3de9(0x148)]=_0x18e5c5,_0x3bcb50[_0x7c3de9(0x154)]=_0x2d81e1,_0x3bcb50[_0x7c3de9(0x149)]=_0x110bbb;}else throw new Error(_0x7c3de9(0x159));}}return _0x3bcb50;}export function formatTableReference(_0x117925){const _0x5591f3=a146_0x2739,_0x3ad400=[];return _0x117925[_0x5591f3(0x148)]&&_0x3ad400[_0x5591f3(0x14e)](_0x117925[_0x5591f3(0x148)]),_0x117925[_0x5591f3(0x154)]&&_0x3ad400['push'](_0x117925[_0x5591f3(0x154)]),_0x117925[_0x5591f3(0x149)]&&_0x3ad400['push'](_0x117925[_0x5591f3(0x149)]),_0x3ad400[_0x5591f3(0x144)]('.');}export function validateTableListReference(_0xa5aab4){return undefined;}export function validateTableDescribeReference(_0x446a27){const _0x1ba4bd=a146_0x2739;if(!_0x446a27['table'])return _0x1ba4bd(0x146);if(_0x446a27[_0x1ba4bd(0x154)]&&hasWildcard(_0x446a27[_0x1ba4bd(0x154)]))return _0x1ba4bd(0x143);if(hasWildcard(_0x446a27[_0x1ba4bd(0x149)]))return _0x1ba4bd(0x156);return undefined;}function a146_0x2941(){const _0xeb35d=['length','4OOhQcC','push','25890oJZOvw','1767669vuPwlB','Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)','8SITgIm','1228131lydidh','database','split','Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation','7SLOsRv','640veCPGL','Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)','trim','3927RgTkJB','1168542UkIWiq','10146372MbbXbQ','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','join','Pattern\x20cannot\x20be\x20just\x20a\x20dot','Table\x20name\x20is\x20required\x20for\x20describe\x20operation','20330UUMUCl','catalog','table','Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)','7575492USiVIq'];a146_0x2941=function(){return _0xeb35d;};return a146_0x2941();}
|
package/dist/utils/tdx-logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a147_0x136fcb=a147_0x5d16;function a147_0x3cfd(){const _0x28029f=['Warning:\x20Failed\x20to\x20compress\x20','mtime','2666757EzWKrd','1737948jBKTiN','4ONuhQi','tdx-','logDir','fileOnly','stack','.log','Warning:\x20Failed\x20to\x20initialize\x20log\x20files:','join','warn','4dKWVvq','logStream','207125BXjybG','includes','cyan','trace','info','5840VHmtqN','.gz','debug','abs','stringify','string','message','split','36cZADVp','ERROR','cause','getHours','init','floor','gray','error','INFO','40rPBkLw','DEBUG','toString','492174KvdLGT','getTimezoneOffset','tdx.log','TRACE','169SfnyXc','rotateOldLogs','10998427xVjcHr','filter','name','logLevel','getLogPath','1302stpADn','write','logs','WARN','257387TEByVx','Warning:\x20Error\x20writing\x20to\x20tdx.log:','toISOString','yellow','padStart','getDate','getMinutes'];a147_0x3cfd=function(){return _0x28029f;};return a147_0x3cfd();}(function(_0x1b9baf,_0x3b1fda){const _0x3c5552=a147_0x5d16,_0x1b71bd=_0x1b9baf();while(!![]){try{const _0x4384f5=-parseInt(_0x3c5552(0x11e))/0x1*(parseInt(_0x3c5552(0x129))/0x2)+parseInt(_0x3c5552(0x127))/0x3*(parseInt(_0x3c5552(0x132))/0x4)+parseInt(_0x3c5552(0x134))/0x5*(-parseInt(_0x3c5552(0x141))/0x6)+-parseInt(_0x3c5552(0x11a))/0x7*(parseInt(_0x3c5552(0x139))/0x8)+-parseInt(_0x3c5552(0x14d))/0x9*(parseInt(_0x3c5552(0x14a))/0xa)+-parseInt(_0x3c5552(0x115))/0xb+parseInt(_0x3c5552(0x128))/0xc*(parseInt(_0x3c5552(0x151))/0xd);if(_0x4384f5===_0x3b1fda)break;else _0x1b71bd['push'](_0x1b71bd['shift']());}catch(_0x5c35a0){_0x1b71bd['push'](_0x1b71bd['shift']());}}}(a147_0x3cfd,0x9faa7));import{createWriteStream,createReadStream}from'fs';import{mkdir,readdir,unlink,stat,rename}from'fs/promises';import{join}from'path';import{homedir}from'os';import{createGzip}from'zlib';import{pipeline}from'stream/promises';function a147_0x5d16(_0x4264ae,_0x45d2e2){_0x4264ae=_0x4264ae-0x115;const _0x3cfd82=a147_0x3cfd();let _0x5d16a3=_0x3cfd82[_0x4264ae];return _0x5d16a3;}import a147_0x5ec22a from'chalk';function safeStringify(_0x32237e){const _0x593ab4=a147_0x5d16;if(typeof _0x32237e===_0x593ab4(0x13e))return _0x32237e;if(_0x32237e instanceof Error)return _0x32237e[_0x593ab4(0x12d)]||_0x32237e[_0x593ab4(0x117)]+':\x20'+_0x32237e[_0x593ab4(0x13f)];try{return JSON[_0x593ab4(0x13d)](_0x32237e,(_0x3d8c73,_0x2de5d8)=>{const _0x35ee92=_0x593ab4;if(_0x2de5d8 instanceof Error)return{'name':_0x2de5d8[_0x35ee92(0x117)],'message':_0x2de5d8[_0x35ee92(0x13f)],'stack':_0x2de5d8['stack'],'cause':_0x2de5d8[_0x35ee92(0x143)]};return _0x2de5d8;});}catch{return String(_0x32237e);}}function getTimezoneOffset(){const _0x86d40a=a147_0x5d16,_0x480b2f=-new Date()[_0x86d40a(0x14e)](),_0x5cf825=Math[_0x86d40a(0x146)](Math[_0x86d40a(0x13c)](_0x480b2f)/0x3c),_0x137466=Math[_0x86d40a(0x13c)](_0x480b2f)%0x3c,_0x8d6881=_0x480b2f>=0x0?'+':'-';return''+_0x8d6881+_0x5cf825['toString']()[_0x86d40a(0x122)](0x2,'0')+_0x137466[_0x86d40a(0x14c)]()[_0x86d40a(0x122)](0x2,'0');}function formatTimestamp(){const _0x11b3e7=a147_0x5d16,_0x42a771=new Date(),_0x409291=_0x42a771['getFullYear'](),_0x2063f5=(_0x42a771['getMonth']()+0x1)['toString']()['padStart'](0x2,'0'),_0x42e1bd=_0x42a771[_0x11b3e7(0x123)]()[_0x11b3e7(0x14c)]()['padStart'](0x2,'0'),_0x245ea4=_0x42a771[_0x11b3e7(0x144)]()['toString']()['padStart'](0x2,'0'),_0x51ad5a=_0x42a771[_0x11b3e7(0x124)]()['toString']()[_0x11b3e7(0x122)](0x2,'0'),_0x4276e7=_0x42a771['getSeconds']()[_0x11b3e7(0x14c)]()[_0x11b3e7(0x122)](0x2,'0'),_0x375687=_0x42a771['getMilliseconds']()[_0x11b3e7(0x14c)]()[_0x11b3e7(0x122)](0x3,'0'),_0x54fe50=getTimezoneOffset();return _0x409291+'-'+_0x2063f5+'-'+_0x42e1bd+'\x20'+_0x245ea4+':'+_0x51ad5a+':'+_0x4276e7+'.'+_0x375687+_0x54fe50;}function formatColoredLogEntry(_0x4a86e3,_0x2a8aee){const _0x1230b1=a147_0x5d16,_0x760862=formatTimestamp(),_0x5cbe4d=_0x2a8aee['map'](safeStringify)[_0x1230b1(0x130)]('\x20'),_0x2b9dae=a147_0x5ec22a['gray'](_0x760862);let _0x5a243e;switch(_0x4a86e3){case _0x1230b1(0x138):_0x5a243e=a147_0x5ec22a[_0x1230b1(0x136)]('['+_0x4a86e3+']\x20');break;case _0x1230b1(0x131):_0x5a243e=a147_0x5ec22a[_0x1230b1(0x121)]('['+_0x4a86e3+']\x20');break;case _0x1230b1(0x148):_0x5a243e=a147_0x5ec22a['red']('['+_0x4a86e3+']');break;case _0x1230b1(0x13b):_0x5a243e=a147_0x5ec22a[_0x1230b1(0x147)]('['+_0x4a86e3+']');break;default:_0x5a243e='['+_0x4a86e3+']';}return _0x2b9dae+'\x20'+_0x5a243e+'\x20'+_0x5cbe4d;}export var LogLevel;(function(_0x36e904){const _0xe9f8d1=a147_0x5d16;_0x36e904[_0x36e904[_0xe9f8d1(0x150)]=-0x2]=_0xe9f8d1(0x150),_0x36e904[_0x36e904['DEBUG']=-0x1]=_0xe9f8d1(0x14b),_0x36e904[_0x36e904[_0xe9f8d1(0x149)]=0x0]=_0xe9f8d1(0x149),_0x36e904[_0x36e904['WARN']=0x1]=_0xe9f8d1(0x11d),_0x36e904[_0x36e904[_0xe9f8d1(0x142)]=0x2]=_0xe9f8d1(0x142);}(LogLevel||(LogLevel={})));export class TDXLogger{[a147_0x136fcb(0x133)];[a147_0x136fcb(0x12b)];['logLevel'];[a147_0x136fcb(0x12c)];constructor(_0x184463=LogLevel[a147_0x136fcb(0x149)],_0x2f75e6=![]){const _0x5148c1=a147_0x136fcb;this[_0x5148c1(0x12b)]=join(homedir(),'.cache','tdx',_0x5148c1(0x11c)),this['logLevel']=_0x184463,this[_0x5148c1(0x12c)]=_0x2f75e6;}async[a147_0x136fcb(0x145)](){const _0x16c189=a147_0x136fcb;try{await mkdir(this[_0x16c189(0x12b)],{'recursive':!![]}),await this[_0x16c189(0x152)]();const _0x795712=join(this[_0x16c189(0x12b)],_0x16c189(0x14f));this[_0x16c189(0x133)]=createWriteStream(_0x795712,{'flags':'a'}),this['logStream']['on'](_0x16c189(0x148),_0x326602=>{const _0x350cbe=_0x16c189;console['error'](_0x350cbe(0x11f),_0x326602[_0x350cbe(0x13f)]);});}catch(_0x3e567d){console[_0x16c189(0x148)](_0x16c189(0x12f),_0x3e567d);}}async[a147_0x136fcb(0x152)](){const _0xa389a=a147_0x136fcb;try{const _0x165afb=await readdir(this['logDir']),_0x22654f=new Date()['toISOString']()[_0xa389a(0x140)]('T')[0x0];if(_0x165afb[_0xa389a(0x135)](_0xa389a(0x14f))){const _0x23404f=join(this[_0xa389a(0x12b)],_0xa389a(0x14f)),_0x2fca6d=await stat(_0x23404f),_0x25ae7d=new Date(_0x2fca6d[_0xa389a(0x126)])[_0xa389a(0x120)]()[_0xa389a(0x140)]('T')[0x0];if(_0x25ae7d<_0x22654f){const _0x17c5f8=join(this[_0xa389a(0x12b)],_0xa389a(0x12a)+_0x25ae7d+_0xa389a(0x12e));await rename(_0x23404f,_0x17c5f8);}}const _0x49bce8=await readdir(this[_0xa389a(0x12b)]),_0x27c262=/^tdx-(\d{4}-\d{2}-\d{2})\.log$/,_0xf840b8=_0x49bce8[_0xa389a(0x116)](_0x5d5e3f=>_0x27c262['test'](_0x5d5e3f));for(const _0x99d6ec of _0xf840b8){const _0x2d30da=join(this[_0xa389a(0x12b)],_0x99d6ec),_0x343e95=join(this[_0xa389a(0x12b)],_0x99d6ec+_0xa389a(0x13a));try{await pipeline(createReadStream(_0x2d30da),createGzip(),createWriteStream(_0x343e95)),await unlink(_0x2d30da);}catch(_0x67dc5a){console[_0xa389a(0x148)](_0xa389a(0x125)+_0x99d6ec+':',_0x67dc5a);}}}catch{}}['debug'](..._0x501bc5){const _0x3f83f7=a147_0x136fcb;if(this['logLevel']>LogLevel[_0x3f83f7(0x14b)])return;const _0x195587=formatColoredLogEntry(_0x3f83f7(0x13b),_0x501bc5);this[_0x3f83f7(0x133)]?.[_0x3f83f7(0x11b)](_0x195587+'\x0a');}[a147_0x136fcb(0x137)](..._0x879c46){const _0x5832d4=a147_0x136fcb;if(this['logLevel']>LogLevel['TRACE'])return;const _0xdfed42=formatColoredLogEntry(_0x5832d4(0x137),_0x879c46);this[_0x5832d4(0x133)]?.[_0x5832d4(0x11b)](_0xdfed42+'\x0a');}[a147_0x136fcb(0x138)](..._0x1e4fc5){const _0x29d597=a147_0x136fcb;if(this[_0x29d597(0x118)]>LogLevel[_0x29d597(0x149)])return;const _0x4122f9=formatColoredLogEntry(_0x29d597(0x138),_0x1e4fc5);!this[_0x29d597(0x12c)]&&console['log'](_0x4122f9),this[_0x29d597(0x133)]?.[_0x29d597(0x11b)](_0x4122f9+'\x0a');}['warn'](..._0x515c56){const _0x35051b=a147_0x136fcb;if(this[_0x35051b(0x118)]>LogLevel['WARN'])return;const _0x35528f=formatColoredLogEntry('warn',_0x515c56);!this[_0x35051b(0x12c)]&&console[_0x35051b(0x148)](_0x35528f),this['logStream']?.[_0x35051b(0x11b)](_0x35528f+'\x0a');}['error'](..._0x25cb20){const _0x3e1ef6=a147_0x136fcb,_0x48b7ae=formatColoredLogEntry(_0x3e1ef6(0x148),_0x25cb20);!this[_0x3e1ef6(0x12c)]&&console[_0x3e1ef6(0x148)](_0x48b7ae),this[_0x3e1ef6(0x133)]?.['write'](_0x48b7ae+'\x0a');}async['close'](){const _0x20aa48=a147_0x136fcb;return this[_0x20aa48(0x138)]('Proxy\x20session\x20ended'),new Promise(_0x4280f0=>{const _0x170c2c=_0x20aa48;this[_0x170c2c(0x133)]?this['logStream']['end'](()=>{_0x4280f0();}):_0x4280f0();});}[a147_0x136fcb(0x119)](){const _0x22173c=a147_0x136fcb;return join(this[_0x22173c(0x12b)],_0x22173c(0x14f));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a148_0x318355=a148_0xebf3;(function(_0x1a3b0a,_0x2d26b3){const _0x4a9e35=a148_0xebf3,_0x21e553=_0x1a3b0a();while(!![]){try{const _0x35f645=-parseInt(_0x4a9e35(0x1bf))/0x1+parseInt(_0x4a9e35(0x1c3))/0x2+parseInt(_0x4a9e35(0x1bb))/0x3*(parseInt(_0x4a9e35(0x1c4))/0x4)+-parseInt(_0x4a9e35(0x1b0))/0x5+-parseInt(_0x4a9e35(0x1a3))/0x6+-parseInt(_0x4a9e35(0x1b8))/0x7*(-parseInt(_0x4a9e35(0x1af))/0x8)+parseInt(_0x4a9e35(0x1a4))/0x9*(parseInt(_0x4a9e35(0x1be))/0xa);if(_0x35f645===_0x2d26b3)break;else _0x21e553['push'](_0x21e553['shift']());}catch(_0x5d6b58){_0x21e553['push'](_0x21e553['shift']());}}}(a148_0x14d8,0x9456e));import{get}from'https';function a148_0x14d8(){const _0x2dd44d=['npm\x20install\x20-g\x20@treasuredata/tdx@latest','HTTP\x20','last_version_check','data','1953XtnlBr','Request\x20timeout','dim','18OSgGVW','latestVersion','\x0aUpdate\x20available:\x20','210XWuNIR','732293mUJPRs','gray','yellow','Run:','2388874PneHIr','5420gkjdfq','destroy','Invalid\x20version\x20format','6398646hjYAlU','402858yrxpRD','NO_COLOR','isTTY','statusCode','lastCheck','stringify','stderr','version','env','https://registry.npmjs.org/@treasuredata/tdx/latest','updateAvailable','24952PzgSYN','3032190OFJfPt','\x0aRun:\x20','currentVersion','parse'];a148_0x14d8=function(){return _0x2dd44d;};return a148_0x14d8();}import{readFileSync,writeFileSync,mkdirSync}from'fs';import{join}from'path';import{gt,valid}from'semver';import a148_0x6eceb1 from'chalk';import{getCacheDir}from'../core/config.js';const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_URL=a148_0x318355(0x1ad),TIMEOUT_MS=0x7d0;function getCacheFilePath(){const _0x7344e0=a148_0x318355,_0xa1803b=getCacheDir();return join(_0xa1803b,_0x7344e0(0x1b6));}function readCache(){const _0x1de98a=a148_0x318355;try{const _0x32e2b4=getCacheFilePath(),_0x35ff92=readFileSync(_0x32e2b4,'utf-8');return JSON[_0x1de98a(0x1b3)](_0x35ff92);}catch{return null;}}function a148_0xebf3(_0x1ae89c,_0x2c42c0){_0x1ae89c=_0x1ae89c-0x1a2;const _0x14d8e3=a148_0x14d8();let _0xebf36=_0x14d8e3[_0x1ae89c];return _0xebf36;}function writeCache(_0x4bc2cd){const _0x33243b=a148_0x318355;try{const _0x114672=getCacheDir();mkdirSync(_0x114672,{'recursive':!![]});const _0x4cf16e={'lastCheck':new Date()['toISOString'](),'latestVersion':_0x4bc2cd},_0x48ec38=getCacheFilePath();writeFileSync(_0x48ec38,JSON[_0x33243b(0x1a9)](_0x4cf16e,null,0x2),'utf-8');}catch{}}function isCacheValid(_0x2dd832){const _0x3b1d6c=a148_0x318355;if(!_0x2dd832)return![];const _0x13c781=new Date(_0x2dd832[_0x3b1d6c(0x1a8)])['getTime'](),_0x4994bc=Date['now']();return _0x4994bc-_0x13c781<CACHE_DURATION_MS;}function fetchLatestVersion(){return new Promise((_0x457af5,_0x1eb80a)=>{const _0x64154b=get(NPM_REGISTRY_URL,_0x2149c9=>{const _0x1dfd93=a148_0xebf3;if(_0x2149c9['statusCode']!==0xc8){clearTimeout(_0x11bd8c),_0x1eb80a(new Error(_0x1dfd93(0x1b5)+_0x2149c9[_0x1dfd93(0x1a7)]));return;}let _0x17ecc2='';_0x2149c9['on'](_0x1dfd93(0x1b7),_0x28513a=>{_0x17ecc2+=_0x28513a;}),_0x2149c9['on']('end',()=>{const _0x22bf30=_0x1dfd93;clearTimeout(_0x11bd8c);try{const _0x214699=JSON[_0x22bf30(0x1b3)](_0x17ecc2);if(!valid(_0x214699[_0x22bf30(0x1ab)])){_0x1eb80a(new Error(_0x22bf30(0x1a2)));return;}_0x457af5(_0x214699[_0x22bf30(0x1ab)]);}catch(_0x4638e7){_0x1eb80a(_0x4638e7);}});})['on']('error',_0x17d494=>{clearTimeout(_0x11bd8c),_0x1eb80a(_0x17d494);}),_0x11bd8c=setTimeout(()=>{const _0x208a98=a148_0xebf3;_0x64154b[_0x208a98(0x1c5)](),_0x1eb80a(new Error(_0x208a98(0x1b9)));},TIMEOUT_MS);});}export async function checkForUpdate(_0x156a35){const _0x2002f0=a148_0x318355;try{const _0x2909e8=readCache();if(isCacheValid(_0x2909e8)){const _0x4b81cd=gt(_0x2909e8[_0x2002f0(0x1bc)],_0x156a35);return{'updateAvailable':_0x4b81cd,'currentVersion':_0x156a35,'latestVersion':_0x2909e8[_0x2002f0(0x1bc)]};}const _0x2570a1=await fetchLatestVersion();writeCache(_0x2570a1);const _0x35f67c=gt(_0x2570a1,_0x156a35);return{'updateAvailable':_0x35f67c,'currentVersion':_0x156a35,'latestVersion':_0x2570a1};}catch{return null;}}export function displayUpdateNotification(_0x467b34){const _0x250f72=a148_0x318355;if(!_0x467b34[_0x250f72(0x1ae)])return;const _0x4e9000=process[_0x250f72(0x1aa)][_0x250f72(0x1a6)]&&!process[_0x250f72(0x1ac)][_0x250f72(0x1a5)],_0x6e9de7=_0x4e9000?a148_0x6eceb1[_0x250f72(0x1c0)]('→'):'→',_0x31c032=_0x4e9000?a148_0x6eceb1[_0x250f72(0x1ba)](_0x467b34[_0x250f72(0x1b2)]):_0x467b34[_0x250f72(0x1b2)],_0x3edc8b=_0x4e9000?a148_0x6eceb1['green'](_0x467b34[_0x250f72(0x1bc)]):_0x467b34['latestVersion'],_0x4dac7d=_0x4e9000?a148_0x6eceb1['cyan'](_0x250f72(0x1b4)):_0x250f72(0x1b4),_0x329c61=_0x4e9000?'\x0a'+a148_0x6eceb1[_0x250f72(0x1c1)]('Update\x20available:')+'\x20'+_0x31c032+'\x20'+_0x6e9de7+'\x20'+_0x3edc8b+'\x0a'+a148_0x6eceb1['dim'](_0x250f72(0x1c2))+'\x20'+_0x4dac7d+'\x0a':_0x250f72(0x1bd)+_0x31c032+'\x20'+_0x6e9de7+'\x20'+_0x3edc8b+_0x250f72(0x1b1)+_0x4dac7d+'\x0a';process[_0x250f72(0x1aa)]['write'](_0x329c61);}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@treasuredata/tdx",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "AI-native CLI for Treasure Data - optimized for both human engineers and AI coding assistants",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -20,8 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"files": [
|
|
22
22
|
"dist",
|
|
23
|
-
"README.md"
|
|
24
|
-
"LICENSE"
|
|
23
|
+
"README.md"
|
|
25
24
|
],
|
|
26
25
|
"engines": {
|
|
27
26
|
"node": ">=22.12.0"
|