@treasuredata/tdx 0.8.6 → 0.8.7
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/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/api.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm.js +1 -1
- package/dist/sdk/query.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.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-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/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.d.ts.map +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/process.js.map +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/sse-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x32de9e,_0x12cd2a){const _0x3b2c86=a111_0x3c39,_0x3fc1fe=_0x32de9e();while(!![]){try{const _0x1d8c4d=-parseInt(_0x3b2c86(0x1a7))/0x1*(-parseInt(_0x3b2c86(0x1aa))/0x2)+parseInt(_0x3b2c86(0x1a4))/0x3+-parseInt(_0x3b2c86(0x1ac))/0x4+-parseInt(_0x3b2c86(0x1b0))/0x5+-parseInt(_0x3b2c86(0x1a9))/0x6*(parseInt(_0x3b2c86(0x1b4))/0x7)+-parseInt(_0x3b2c86(0x1ab))/0x8*(parseInt(_0x3b2c86(0x1b5))/0x9)+parseInt(_0x3b2c86(0x1b1))/0xa;if(_0x1d8c4d===_0x12cd2a)break;else _0x3fc1fe['push'](_0x3fc1fe['shift']());}catch(_0x49bb88){_0x3fc1fe['push'](_0x3fc1fe['shift']());}}}(a111_0x975e,0x61ae2));function a111_0x3c39(_0xb1e8e3,_0x3c0e50){_0xb1e8e3=_0xb1e8e3-0x1a3;const _0x975ee7=a111_0x975e();let _0x3c3937=_0x975ee7[_0xb1e8e3];return _0x3c3937;}function a111_0x975e(){const _0x712151=['883218MDSmPj','[LLM\x20API\x20SSE]\x20','event','37063NfvpyU','debug','2281908BSsKgq','4CVPirt','640gmDwbT','478652nkdijJ','body','slice','parse','1920745ziaGvM','14555340iNQAIt','Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20','startsWith','14Dsagbq','17946FIXdtg','getReader','data','decode','read'];a111_0x975e=function(){return _0x712151;};return a111_0x975e();}export async function*parseSSEStream(_0x17144b,_0x34ed86){const _0x38e6e7=a111_0x3c39;if(!_0x17144b[_0x38e6e7(0x1ad)])throw new Error('Response\x20body\x20is\x20null');const _0x24fba2=_0x17144b[_0x38e6e7(0x1ad)][_0x38e6e7(0x1b6)](),_0x6ccb2a=new TextDecoder();let _0x56d348='',_0x431b4f={};try{while(!![]){const {done:_0x15b84e,value:_0x146a77}=await _0x24fba2[_0x38e6e7(0x1a3)]();if(_0x15b84e){if(_0x431b4f[_0x38e6e7(0x1b7)]){_0x34ed86?.[_0x38e6e7(0x1a8)](_0x38e6e7(0x1a5)+_0x431b4f['data']);const _0xc3d06c=parseSSEData(_0x431b4f[_0x38e6e7(0x1b7)]);yield _0xc3d06c;}break;}_0x56d348+=_0x6ccb2a[_0x38e6e7(0x1b8)](_0x146a77,{'stream':!![]});const _0x10adb8=_0x56d348['split']('\x0a');_0x56d348=_0x10adb8['pop']()||'';for(const _0x38c162 of _0x10adb8){if(_0x38c162['trim']()===''){if(_0x431b4f['data']){_0x34ed86?.[_0x38e6e7(0x1a8)](_0x38e6e7(0x1a5)+_0x431b4f['data']);const _0x317209=parseSSEData(_0x431b4f[_0x38e6e7(0x1b7)]);yield _0x317209,_0x431b4f={};}continue;}if(_0x38c162[_0x38e6e7(0x1b3)](':'))continue;const _0x54dfc6=_0x38c162['indexOf'](':');if(_0x54dfc6===-0x1)continue;const _0x43064e=_0x38c162[_0x38e6e7(0x1ae)](0x0,_0x54dfc6);let _0x2a7bc6=_0x38c162[_0x38e6e7(0x1ae)](_0x54dfc6+0x1);_0x2a7bc6[_0x38e6e7(0x1b3)]('\x20')&&(_0x2a7bc6=_0x2a7bc6[_0x38e6e7(0x1ae)](0x1));switch(_0x43064e){case _0x38e6e7(0x1a6):_0x431b4f[_0x38e6e7(0x1a6)]=_0x2a7bc6;break;case _0x38e6e7(0x1b7):_0x431b4f[_0x38e6e7(0x1b7)]=_0x431b4f['data']?_0x431b4f[_0x38e6e7(0x1b7)]+'\x0a'+_0x2a7bc6:_0x2a7bc6;break;case'id':_0x431b4f['id']=_0x2a7bc6;break;}}}}finally{_0x24fba2['releaseLock']();}}function parseSSEData(_0x566ac3){const _0x458f3f=a111_0x3c39;try{return JSON[_0x458f3f(0x1af)](_0x566ac3);}catch(_0x22ff2a){throw new Error(_0x458f3f(0x1b2)+_0x566ac3,{'cause':_0x22ff2a});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4e55c2,_0x3f132f){const _0x35fad2=a112_0x2794,_0x4f2a42=_0x4e55c2();while(!![]){try{const _0x175342=parseInt(_0x35fad2(0x1ed))/0x1+-parseInt(_0x35fad2(0x1f6))/0x2*(-parseInt(_0x35fad2(0x1f8))/0x3)+-parseInt(_0x35fad2(0x202))/0x4*(-parseInt(_0x35fad2(0x200))/0x5)+parseInt(_0x35fad2(0x1fb))/0x6*(-parseInt(_0x35fad2(0x1fe))/0x7)+parseInt(_0x35fad2(0x1f4))/0x8*(-parseInt(_0x35fad2(0x1ef))/0x9)+parseInt(_0x35fad2(0x1f7))/0xa*(parseInt(_0x35fad2(0x1ee))/0xb)+parseInt(_0x35fad2(0x1fc))/0xc;if(_0x175342===_0x3f132f)break;else _0x4f2a42['push'](_0x4f2a42['shift']());}catch(_0x575189){_0x4f2a42['push'](_0x4f2a42['shift']());}}}(a112_0x52f0,0xa4a16));import a112_0x4912ee from'string-width';export function stringWidth(_0xd5c6dd){return a112_0x4912ee(_0xd5c6dd);}export function padEnd(_0x41d905,_0x430ef4){const _0xdc5945=stringWidth(_0x41d905);if(_0xdc5945>=_0x430ef4)return _0x41d905;return _0x41d905+'\x20'['repeat'](_0x430ef4-_0xdc5945);}function a112_0x2794(_0x3a0b39,_0x27d371){_0x3a0b39=_0x3a0b39-0x1ec;const _0x52f088=a112_0x52f0();let _0x2794fd=_0x52f088[_0x3a0b39];return _0x2794fd;}export function padStart(_0x585710,_0x327003){const _0x55d4df=stringWidth(_0x585710);if(_0x55d4df>=_0x327003)return _0x585710;return'\x20'['repeat'](_0x327003-_0x55d4df)+_0x585710;}export function centerAlign(_0x3eaca9,_0x3b0f4e){const _0x58131b=a112_0x2794,_0x2b64f5=stringWidth(_0x3eaca9);if(_0x2b64f5>_0x3b0f4e){if(_0x3b0f4e<=0x1)return'…'[_0x58131b(0x1f2)](0x0,_0x3b0f4e);let _0x1a4f81=_0x3eaca9;while(stringWidth(_0x1a4f81+'…')>_0x3b0f4e){_0x1a4f81=_0x1a4f81['slice'](0x0,-0x1);}return _0x1a4f81+'…';}if(_0x2b64f5===_0x3b0f4e)return _0x3eaca9;const _0xa385d6=_0x3b0f4e-_0x2b64f5,_0x2d2ce9=Math['floor'](_0xa385d6/0x2),_0x23c40b=_0xa385d6-_0x2d2ce9;return'\x20'[_0x58131b(0x1f3)](_0x2d2ce9)+_0x3eaca9+'\x20'[_0x58131b(0x1f3)](_0x23c40b);}export function escapeStringLiteral(_0x261fbe){const _0x3e848c=a112_0x2794;if(!_0x261fbe||_0x261fbe[_0x3e848c(0x1ff)]()[_0x3e848c(0x1ec)]===0x0)throw new Error('Cannot\x20escape\x20empty\x20string\x20literal');const _0x3d3803=_0x261fbe[_0x3e848c(0x1f0)](/'/g,'\x27\x27');return'\x27'+_0x3d3803+'\x27';}function a112_0x52f0(){const _0x3e1f0b=['repeat','1492280bHzAwB','USERNAME','23990pKXazu','3160hvwIpG','3IWUMle','toLowerCase','USER','12168YLdtBJ','7164876oCWXUO','\x5c$&','1848PVxINX','trim','535090sIfZQA','padStart','12xYsKVY','length','412696MRzAUz','21340whhHFT','36MdoLlN','replace','toString','substring'];a112_0x52f0=function(){return _0x3e1f0b;};return a112_0x52f0();}export function globToLike(_0x4f6033){const _0x492505=a112_0x2794;let _0x193ce3=_0x4f6033['replace'](/\\/g,'\x5c\x5c')[_0x492505(0x1f0)](/%/g,'\x5c%')[_0x492505(0x1f0)](/_/g,'\x5c_');return _0x193ce3=_0x193ce3['replace'](/\*/g,'%')[_0x492505(0x1f0)](/\?/g,'_'),_0x193ce3;}export function buildLikePattern(_0x3ba2e2){const _0x97f505=a112_0x2794;if(!_0x3ba2e2||_0x3ba2e2[_0x97f505(0x1ff)]()['length']===0x0)throw new Error('Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string');const _0x5b2d1a=globToLike(_0x3ba2e2),_0x29e8cb=_0x5b2d1a[_0x97f505(0x1f0)](/'/g,'\x27\x27');return'\x27'+_0x29e8cb+'\x27';}export function matchGlobPattern(_0x5b0e03,_0x596c81){const _0x578e30=a112_0x2794,_0xc10923=_0x596c81[_0x578e30(0x1f0)](/[.+^${}()|[\]\\]/g,_0x578e30(0x1fd))[_0x578e30(0x1f0)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x2f6d7a=new RegExp('^'+_0xc10923+'$');return _0x2f6d7a['test'](_0x5b0e03);}export function getSanitizedUsername(){const _0x59fd00=a112_0x2794,_0x541570=process['env'][_0x59fd00(0x1fa)]||process['env'][_0x59fd00(0x1f5)]||'unknown';return _0x541570[_0x59fd00(0x1f0)](/[^a-zA-Z0-9]/g,'')['toLowerCase']();}export function generateRandomHex(){const _0x33d4a1=a112_0x2794,_0xb7d0ba=Math['floor'](Math['random']()*0xfffff);return _0xb7d0ba[_0x33d4a1(0x1f1)](0x10)[_0x33d4a1(0x201)](0x5,'0');}export function sanitizeFileName(_0x428c72){const _0x94afb6=a112_0x2794;return _0x428c72[_0x94afb6(0x1f9)]()['replace'](/[/\\:*?"<>|]/g,'-')['replace'](/\s+/g,'-')[_0x94afb6(0x1f0)](/-+/g,'-')[_0x94afb6(0x1f0)](/^-|-$/g,'');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2ed691,_0x37ade9){const _0x1256de=a113_0xb521,_0x2bb3ce=_0x2ed691();while(!![]){try{const _0x350e97=parseInt(_0x1256de(0x142))/0x1+parseInt(_0x1256de(0x155))/0x2+-parseInt(_0x1256de(0x141))/0x3*(-parseInt(_0x1256de(0x14a))/0x4)+-parseInt(_0x1256de(0x154))/0x5*(parseInt(_0x1256de(0x145))/0x6)+parseInt(_0x1256de(0x159))/0x7+-parseInt(_0x1256de(0x146))/0x8+parseInt(_0x1256de(0x157))/0x9*(-parseInt(_0x1256de(0x150))/0xa);if(_0x350e97===_0x37ade9)break;else _0x2bb3ce['push'](_0x2bb3ce['shift']());}catch(_0x3254fc){_0x2bb3ce['push'](_0x2bb3ce['shift']());}}}(a113_0x27dd,0xa0360));function hasWildcard(_0x1605a7){const _0xea8e89=a113_0xb521;return _0x1605a7[_0xea8e89(0x14c)]('*')||_0x1605a7[_0xea8e89(0x14c)]('?');}export function parseTableReference(_0x53f72a){const _0x2b95b1=a113_0xb521;if(!_0x53f72a||_0x53f72a[_0x2b95b1(0x143)]()['length']===0x0)throw new Error(_0x2b95b1(0x149));const _0x1fe883=_0x53f72a[_0x2b95b1(0x143)](),_0x521d80={'original':_0x1fe883},_0x39ab76=_0x1fe883['split']('.');if(_0x39ab76[_0x2b95b1(0x14d)]===0x1){const _0x30309e=_0x39ab76[0x0];if(!_0x30309e)throw new Error(_0x2b95b1(0x14e));_0x521d80[_0x2b95b1(0x148)]=_0x30309e;}else{if(_0x39ab76[_0x2b95b1(0x14d)]===0x2){const [_0x262140,_0x3f4faa]=_0x39ab76;if(!_0x262140)throw new Error(_0x2b95b1(0x144));if(!_0x3f4faa)throw new Error('Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)');_0x521d80[_0x2b95b1(0x153)]=_0x262140,_0x521d80[_0x2b95b1(0x148)]=_0x3f4faa;}else{if(_0x39ab76[_0x2b95b1(0x14d)]===0x3){const [_0x195f4e,_0x56e79c,_0x4def45]=_0x39ab76;if(!_0x195f4e||!_0x56e79c||!_0x4def45)throw new Error('Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty');_0x521d80[_0x2b95b1(0x14f)]=_0x195f4e,_0x521d80[_0x2b95b1(0x153)]=_0x56e79c,_0x521d80[_0x2b95b1(0x148)]=_0x4def45;}else throw new Error(_0x2b95b1(0x151));}}return _0x521d80;}export function formatTableReference(_0x4fca77){const _0x3701f8=a113_0xb521,_0x3ee8ce=[];return _0x4fca77['catalog']&&_0x3ee8ce[_0x3701f8(0x152)](_0x4fca77[_0x3701f8(0x14f)]),_0x4fca77[_0x3701f8(0x153)]&&_0x3ee8ce[_0x3701f8(0x152)](_0x4fca77[_0x3701f8(0x153)]),_0x4fca77[_0x3701f8(0x148)]&&_0x3ee8ce[_0x3701f8(0x152)](_0x4fca77[_0x3701f8(0x148)]),_0x3ee8ce[_0x3701f8(0x156)]('.');}function a113_0xb521(_0x565357,_0x57ef82){_0x565357=_0x565357-0x141;const _0x27ddf2=a113_0x27dd();let _0xb5211d=_0x27ddf2[_0x565357];return _0xb5211d;}export function validateTableListReference(_0x497f19){return undefined;}function a113_0x27dd(){const _0x356d79=['includes','length','Pattern\x20cannot\x20be\x20just\x20a\x20dot','catalog','6868930Njtgdd','Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)','push','database','2305igulEF','523774BQmHpO','join','9UpXTjd','Table\x20name\x20is\x20required\x20for\x20describe\x20operation','6477590eTaCjk','3889068ELcjFW','220908XCQBVN','trim','Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)','1326visSxx','10076184vllUQe','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','table','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','4bTaarY','Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation'];a113_0x27dd=function(){return _0x356d79;};return a113_0x27dd();}export function validateTableDescribeReference(_0x3ca351){const _0x18f156=a113_0xb521;if(!_0x3ca351[_0x18f156(0x148)])return _0x18f156(0x158);if(_0x3ca351[_0x18f156(0x153)]&&hasWildcard(_0x3ca351[_0x18f156(0x153)]))return _0x18f156(0x147);if(hasWildcard(_0x3ca351[_0x18f156(0x148)]))return _0x18f156(0x14b);return undefined;}
|
package/dist/utils/tdx-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a114_0x43a602=a114_0x15d3;function a114_0x4ccd(){const _0x48872d=['string','554556lIjytZ','relative','cwd','parse','356544QyPbGR','join','Invalid\x20tdx.json:\x20missing\x20or\x20invalid\x20\x27parent_segment\x27\x20field','root','startsWith','dirname','parent_segment','8860zYSksq','resolve','4086vHsDqN','4000AUgwfi','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','1166710LRrlmV','object','Invalid\x20JSON\x20in\x20','tdx.json','2430LWTfLr','1320swjzBv','1603fsBxeV','168KeACcw','segments'];a114_0x4ccd=function(){return _0x48872d;};return a114_0x4ccd();}(function(_0x389df3,_0x4f3a53){const _0xe7d7d5=a114_0x15d3,_0x2db7d7=_0x389df3();while(!![]){try{const _0x47b4a7=parseInt(_0xe7d7d5(0x194))/0x1+parseInt(_0xe7d7d5(0x191))/0x2*(-parseInt(_0xe7d7d5(0x19d))/0x3)+parseInt(_0xe7d7d5(0x18a))/0x4+parseInt(_0xe7d7d5(0x196))/0x5+-parseInt(_0xe7d7d5(0x186))/0x6+-parseInt(_0xe7d7d5(0x19c))/0x7*(-parseInt(_0xe7d7d5(0x19b))/0x8)+-parseInt(_0xe7d7d5(0x193))/0x9*(-parseInt(_0xe7d7d5(0x19a))/0xa);if(_0x47b4a7===_0x4f3a53)break;else _0x2db7d7['push'](_0x2db7d7['shift']());}catch(_0x2372d7){_0x2db7d7['push'](_0x2db7d7['shift']());}}}(a114_0x4ccd,0x20bbf));import{existsSync,readFileSync}from'fs';import a114_0x29be5a from'path';const TDX_CONFIG_FILE=a114_0x43a602(0x199),SEGMENTS_DIR=a114_0x43a602(0x19e);export function findTdxConfigPath(_0xa8f3f9=process['cwd']()){const _0x67bc5d=a114_0x43a602;let _0x35c9a4=a114_0x29be5a[_0x67bc5d(0x192)](_0xa8f3f9);const _0x490987=a114_0x29be5a[_0x67bc5d(0x189)](_0x35c9a4)[_0x67bc5d(0x18d)];while(_0x35c9a4!==_0x490987){const _0xd5fe82=a114_0x29be5a[_0x67bc5d(0x18b)](_0x35c9a4,TDX_CONFIG_FILE);if(existsSync(_0xd5fe82))return _0xd5fe82;_0x35c9a4=a114_0x29be5a[_0x67bc5d(0x18f)](_0x35c9a4);}return null;}export function loadTdxConfig(_0x4fbbc6){const _0x274aea=a114_0x43a602,_0x389367=readFileSync(_0x4fbbc6,'utf-8');let _0x361f4c;try{_0x361f4c=JSON[_0x274aea(0x189)](_0x389367);}catch{throw new Error(_0x274aea(0x198)+_0x4fbbc6);}if(!_0x361f4c||typeof _0x361f4c!==_0x274aea(0x197))throw new Error('Invalid\x20tdx.json:\x20expected\x20object');const _0x17127c=_0x361f4c;if(!_0x17127c[_0x274aea(0x190)]||typeof _0x17127c['parent_segment']!==_0x274aea(0x19f))throw new Error(_0x274aea(0x18c));return{'parent_segment':_0x17127c['parent_segment']};}export function findTdxConfig(_0x2d7727=process[a114_0x43a602(0x188)]()){const _0x405db1=a114_0x43a602,_0x46f6b6=findTdxConfigPath(_0x2d7727);if(!_0x46f6b6)throw new Error(_0x405db1(0x195));const _0x13ac65=loadTdxConfig(_0x46f6b6),_0x3ddfec=a114_0x29be5a[_0x405db1(0x18f)](_0x46f6b6);return{'config':_0x13ac65,'configPath':_0x46f6b6,'configDir':_0x3ddfec};}export function getSegmentRootDir(_0x121c41,_0x1b9380=process['cwd']()){const _0x1cd5fc=a114_0x43a602;return a114_0x29be5a[_0x1cd5fc(0x18b)](_0x1b9380,SEGMENTS_DIR,_0x121c41);}export function getTdxConfigPath(_0x56122e,_0x5104cc=process[a114_0x43a602(0x188)]()){const _0x2c9cfd=a114_0x43a602;return a114_0x29be5a[_0x2c9cfd(0x18b)](getSegmentRootDir(_0x56122e,_0x5104cc),TDX_CONFIG_FILE);}function a114_0x15d3(_0x422cc5,_0x45b80a){_0x422cc5=_0x422cc5-0x186;const _0x4ccdad=a114_0x4ccd();let _0x15d38b=_0x4ccdad[_0x422cc5];return _0x15d38b;}export function getRelativePathFromConfig(_0x539af6,_0x2ea8aa){const _0x2130fe=a114_0x43a602,_0x4d7cde=a114_0x29be5a[_0x2130fe(0x192)](_0x539af6),_0x3014fc=a114_0x29be5a[_0x2130fe(0x187)](_0x2ea8aa,_0x4d7cde);if(_0x3014fc[_0x2130fe(0x18e)]('..'))return'';return _0x3014fc;}export function localPathToTdFolderPath(_0xfb94fb){const _0x2283ac=a114_0x29be5a['dirname'](_0xfb94fb);if(_0x2283ac==='.'||_0x2283ac==='')return'';return _0x2283ac['replace'](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x1e996a,_0x11351f){const _0x3f00f7=a114_0x43a602;if(!_0x1e996a)return _0x11351f;return a114_0x29be5a[_0x3f00f7(0x18b)](_0x11351f,_0x1e996a);}export function createTdxConfigContent(_0xd053d1){const _0x3ab9aa={'parent_segment':_0xd053d1};return JSON['stringify'](_0x3ab9aa,null,0x2)+'\x0a';}
|
package/dist/utils/tdx-logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a115_0x3908eb=a115_0x2c57;(function(_0x248e9b,_0x9b1e0f){const _0x1acce1=a115_0x2c57,_0x28b847=_0x248e9b();while(!![]){try{const _0x3eb711=-parseInt(_0x1acce1(0x149))/0x1+parseInt(_0x1acce1(0x144))/0x2+-parseInt(_0x1acce1(0x150))/0x3*(-parseInt(_0x1acce1(0x14a))/0x4)+-parseInt(_0x1acce1(0x140))/0x5*(-parseInt(_0x1acce1(0x11d))/0x6)+-parseInt(_0x1acce1(0x125))/0x7+-parseInt(_0x1acce1(0x13d))/0x8*(parseInt(_0x1acce1(0x124))/0x9)+parseInt(_0x1acce1(0x14c))/0xa*(parseInt(_0x1acce1(0x12a))/0xb);if(_0x3eb711===_0x9b1e0f)break;else _0x28b847['push'](_0x28b847['shift']());}catch(_0x3aed76){_0x28b847['push'](_0x28b847['shift']());}}}(a115_0x34c6,0x62106));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';function a115_0x34c6(){const _0x36fba6=['logs','gray','logLevel','297937ZvkQon','4WnSLCy','getMonth','50KFegWp','TRACE','init','getTimezoneOffset','1141509znqMGC','logDir','toString','logStream','end','Warning:\x20Failed\x20to\x20initialize\x20log\x20files:','stringify','Proxy\x20session\x20ended','getMinutes','info','getDate','join','tdx-','12akzgzP','cyan','getSeconds','abs','log','name','getFullYear','55179DangLk','4452826SEtxCa','getHours','toISOString','rotateOldLogs','filter','163273lLgrxO','trace','INFO','map','tdx.log','.gz','red','.log','warn','debug','DEBUG','includes','fileOnly','tdx','close','.cache','write','message','stack','616CRBzDF','split','error','1875490OCieRy','string','padStart','WARN','1205796mfOBCA','ERROR'];a115_0x34c6=function(){return _0x36fba6;};return a115_0x34c6();}function a115_0x2c57(_0x430125,_0x53111f){_0x430125=_0x430125-0x11a;const _0x34c60e=a115_0x34c6();let _0x2c572d=_0x34c60e[_0x430125];return _0x2c572d;}import{pipeline}from'stream/promises';import a115_0x39b38f from'chalk';function safeStringify(_0x34a802){const _0x27f063=a115_0x2c57;if(typeof _0x34a802===_0x27f063(0x141))return _0x34a802;if(_0x34a802 instanceof Error)return _0x34a802[_0x27f063(0x13c)]||_0x34a802['name']+':\x20'+_0x34a802[_0x27f063(0x13b)];try{return JSON[_0x27f063(0x156)](_0x34a802,(_0x21af6e,_0x1af46e)=>{const _0x5e16b0=_0x27f063;if(_0x1af46e instanceof Error)return{'name':_0x1af46e[_0x5e16b0(0x122)],'message':_0x1af46e['message'],'stack':_0x1af46e[_0x5e16b0(0x13c)],'cause':_0x1af46e['cause']};return _0x1af46e;});}catch{return String(_0x34a802);}}function getTimezoneOffset(){const _0x515e97=a115_0x2c57,_0x44888f=-new Date()[_0x515e97(0x14f)](),_0x49fdb8=Math['floor'](Math[_0x515e97(0x120)](_0x44888f)/0x3c),_0x5c6637=Math[_0x515e97(0x120)](_0x44888f)%0x3c,_0x245b86=_0x44888f>=0x0?'+':'-';return''+_0x245b86+_0x49fdb8[_0x515e97(0x152)]()['padStart'](0x2,'0')+_0x5c6637[_0x515e97(0x152)]()[_0x515e97(0x142)](0x2,'0');}function formatTimestamp(){const _0x13b36c=a115_0x2c57,_0x3b6be1=new Date(),_0x497e71=_0x3b6be1[_0x13b36c(0x123)](),_0x3c1bb4=(_0x3b6be1[_0x13b36c(0x14b)]()+0x1)[_0x13b36c(0x152)]()['padStart'](0x2,'0'),_0x35a9fc=_0x3b6be1[_0x13b36c(0x11a)]()[_0x13b36c(0x152)]()[_0x13b36c(0x142)](0x2,'0'),_0x51d4a5=_0x3b6be1[_0x13b36c(0x126)]()[_0x13b36c(0x152)]()['padStart'](0x2,'0'),_0x51f98f=_0x3b6be1[_0x13b36c(0x158)]()[_0x13b36c(0x152)]()[_0x13b36c(0x142)](0x2,'0'),_0x1ab6b8=_0x3b6be1[_0x13b36c(0x11f)]()[_0x13b36c(0x152)]()[_0x13b36c(0x142)](0x2,'0'),_0x8aa456=_0x3b6be1['getMilliseconds']()['toString']()['padStart'](0x3,'0'),_0x5841bb=getTimezoneOffset();return _0x497e71+'-'+_0x3c1bb4+'-'+_0x35a9fc+'\x20'+_0x51d4a5+':'+_0x51f98f+':'+_0x1ab6b8+'.'+_0x8aa456+_0x5841bb;}function formatColoredLogEntry(_0x583bb9,_0x4eda07){const _0x4d26c0=a115_0x2c57,_0x35e817=formatTimestamp(),_0x4885c4=_0x4eda07[_0x4d26c0(0x12d)](safeStringify)[_0x4d26c0(0x11b)]('\x20'),_0x34bfbd=a115_0x39b38f[_0x4d26c0(0x147)](_0x35e817);let _0x28b69b;switch(_0x583bb9){case'info':_0x28b69b=a115_0x39b38f[_0x4d26c0(0x11e)]('['+_0x583bb9+']\x20');break;case _0x4d26c0(0x132):_0x28b69b=a115_0x39b38f['yellow']('['+_0x583bb9+']\x20');break;case'error':_0x28b69b=a115_0x39b38f[_0x4d26c0(0x130)]('['+_0x583bb9+']');break;case _0x4d26c0(0x133):_0x28b69b=a115_0x39b38f[_0x4d26c0(0x147)]('['+_0x583bb9+']');break;default:_0x28b69b='['+_0x583bb9+']';}return _0x34bfbd+'\x20'+_0x28b69b+'\x20'+_0x4885c4;}export var LogLevel;(function(_0x4b7c48){const _0x14723e=a115_0x2c57;_0x4b7c48[_0x4b7c48[_0x14723e(0x14d)]=-0x2]=_0x14723e(0x14d),_0x4b7c48[_0x4b7c48[_0x14723e(0x134)]=-0x1]=_0x14723e(0x134),_0x4b7c48[_0x4b7c48['INFO']=0x0]=_0x14723e(0x12c),_0x4b7c48[_0x4b7c48[_0x14723e(0x143)]=0x1]=_0x14723e(0x143),_0x4b7c48[_0x4b7c48['ERROR']=0x2]=_0x14723e(0x145);}(LogLevel||(LogLevel={})));export class TDXLogger{[a115_0x3908eb(0x153)];[a115_0x3908eb(0x151)];[a115_0x3908eb(0x148)];[a115_0x3908eb(0x136)];constructor(_0x5b2307=LogLevel['INFO'],_0x350aa0=![]){const _0x34b44a=a115_0x3908eb;this['logDir']=join(homedir(),_0x34b44a(0x139),_0x34b44a(0x137),_0x34b44a(0x146)),this[_0x34b44a(0x148)]=_0x5b2307,this[_0x34b44a(0x136)]=_0x350aa0;}async[a115_0x3908eb(0x14e)](){const _0x2a7feb=a115_0x3908eb;try{await mkdir(this[_0x2a7feb(0x151)],{'recursive':!![]}),await this[_0x2a7feb(0x128)]();const _0x1bd73d=join(this[_0x2a7feb(0x151)],_0x2a7feb(0x12e));this['logStream']=createWriteStream(_0x1bd73d,{'flags':'a'}),this['logStream']['on'](_0x2a7feb(0x13f),_0x4796c3=>{const _0x2a246c=_0x2a7feb;console['error']('Warning:\x20Error\x20writing\x20to\x20tdx.log:',_0x4796c3[_0x2a246c(0x13b)]);});}catch(_0x346a9d){console[_0x2a7feb(0x13f)](_0x2a7feb(0x155),_0x346a9d);}}async[a115_0x3908eb(0x128)](){const _0x2093ea=a115_0x3908eb;try{const _0x5dc9b5=await readdir(this['logDir']),_0x466e95=new Date()[_0x2093ea(0x127)]()[_0x2093ea(0x13e)]('T')[0x0];if(_0x5dc9b5[_0x2093ea(0x135)]('tdx.log')){const _0x534c40=join(this['logDir'],'tdx.log'),_0x55d82e=await stat(_0x534c40),_0x3c7ecf=new Date(_0x55d82e['mtime'])['toISOString']()[_0x2093ea(0x13e)]('T')[0x0];if(_0x3c7ecf<_0x466e95){const _0x46ee2a=join(this['logDir'],_0x2093ea(0x11c)+_0x3c7ecf+_0x2093ea(0x131));await rename(_0x534c40,_0x46ee2a);}}const _0xa741b9=await readdir(this[_0x2093ea(0x151)]),_0x2ebe5f=/^tdx-(\d{4}-\d{2}-\d{2})\.log$/,_0x279d67=_0xa741b9[_0x2093ea(0x129)](_0x152167=>_0x2ebe5f['test'](_0x152167));for(const _0x4104e3 of _0x279d67){const _0x121bb9=join(this['logDir'],_0x4104e3),_0x80cf58=join(this[_0x2093ea(0x151)],_0x4104e3+_0x2093ea(0x12f));try{await pipeline(createReadStream(_0x121bb9),createGzip(),createWriteStream(_0x80cf58)),await unlink(_0x121bb9);}catch(_0x597d09){console['error']('Warning:\x20Failed\x20to\x20compress\x20'+_0x4104e3+':',_0x597d09);}}}catch{}}['debug'](..._0x2a9070){const _0xeb1ee4=a115_0x3908eb;if(this['logLevel']>LogLevel[_0xeb1ee4(0x134)])return;const _0x2a8b58=formatColoredLogEntry(_0xeb1ee4(0x133),_0x2a9070);this[_0xeb1ee4(0x153)]?.[_0xeb1ee4(0x13a)](_0x2a8b58+'\x0a');}[a115_0x3908eb(0x12b)](..._0x4b34c1){const _0x2fac5a=a115_0x3908eb;if(this[_0x2fac5a(0x148)]>LogLevel[_0x2fac5a(0x14d)])return;const _0x4bb50b=formatColoredLogEntry(_0x2fac5a(0x12b),_0x4b34c1);this[_0x2fac5a(0x153)]?.[_0x2fac5a(0x13a)](_0x4bb50b+'\x0a');}[a115_0x3908eb(0x159)](..._0x2a5d56){const _0x518f98=a115_0x3908eb;if(this[_0x518f98(0x148)]>LogLevel[_0x518f98(0x12c)])return;const _0x291c04=formatColoredLogEntry(_0x518f98(0x159),_0x2a5d56);!this[_0x518f98(0x136)]&&console[_0x518f98(0x121)](_0x291c04),this[_0x518f98(0x153)]?.[_0x518f98(0x13a)](_0x291c04+'\x0a');}[a115_0x3908eb(0x132)](..._0x2f2fc9){const _0x259bbc=a115_0x3908eb;if(this[_0x259bbc(0x148)]>LogLevel[_0x259bbc(0x143)])return;const _0x517fce=formatColoredLogEntry(_0x259bbc(0x132),_0x2f2fc9);!this[_0x259bbc(0x136)]&&console[_0x259bbc(0x13f)](_0x517fce),this['logStream']?.[_0x259bbc(0x13a)](_0x517fce+'\x0a');}[a115_0x3908eb(0x13f)](..._0x51254c){const _0x5f10f4=a115_0x3908eb,_0x4281b6=formatColoredLogEntry('error',_0x51254c);!this['fileOnly']&&console[_0x5f10f4(0x13f)](_0x4281b6),this[_0x5f10f4(0x153)]?.[_0x5f10f4(0x13a)](_0x4281b6+'\x0a');}async[a115_0x3908eb(0x138)](){const _0x5c2b78=a115_0x3908eb;return this[_0x5c2b78(0x159)](_0x5c2b78(0x157)),new Promise(_0x3c6d7b=>{const _0x30ba33=_0x5c2b78;this[_0x30ba33(0x153)]?this[_0x30ba33(0x153)][_0x30ba33(0x154)](()=>{_0x3c6d7b();}):_0x3c6d7b();});}['getLogPath'](){const _0x942961=a115_0x3908eb;return join(this[_0x942961(0x151)],'tdx.log');}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1604aa,_0x4c81a7){const _0x3a5496=a116_0x8345,_0xb36f1e=_0x1604aa();while(!![]){try{const _0x4dc428=parseInt(_0x3a5496(0xed))/0x1+-parseInt(_0x3a5496(0xcc))/0x2*(-parseInt(_0x3a5496(0xd7))/0x3)+-parseInt(_0x3a5496(0xf2))/0x4*(-parseInt(_0x3a5496(0xd0))/0x5)+-parseInt(_0x3a5496(0xce))/0x6+parseInt(_0x3a5496(0xd5))/0x7*(-parseInt(_0x3a5496(0xe6))/0x8)+-parseInt(_0x3a5496(0xf3))/0x9*(parseInt(_0x3a5496(0xf4))/0xa)+-parseInt(_0x3a5496(0xe8))/0xb*(-parseInt(_0x3a5496(0xf5))/0xc);if(_0x4dc428===_0x4c81a7)break;else _0xb36f1e['push'](_0xb36f1e['shift']());}catch(_0x29eee3){_0xb36f1e['push'](_0xb36f1e['shift']());}}}(a116_0x4f7e,0x66b52));function a116_0x8345(_0x53ebfb,_0x4b8f75){_0x53ebfb=_0x53ebfb-0xcc;const _0x4f7e0a=a116_0x4f7e();let _0x8345da=_0x4f7e0a[_0x53ebfb];return _0x8345da;}function a116_0x4f7e(){const _0x16c5ea=['2284308UJbRDs','└──\x20','690OqHlRs','indent','map','📁\x20','cyan','993727QxlTeJ','showUrl','15dYnPwZ','showTreeLines','folder','segmentCount','url','🎯\x20','type','segment','metadata','dim','\x20segment','showIcons','localeCompare','\x20\x20\x20\x20','\x20folder','40dcgvHj','\x20\x20\x20','297bweaJF','getSegmentUrl','sort','name','folderCount','215327InPSjH','children','population','length','showMetadata','5008CQLmWY','45693TRKSjX','1010PEDDAT','576852qgeJWy','├──\x20','push','135188YYjGsq','join'];a116_0x4f7e=function(){return _0x16c5ea;};return a116_0x4f7e();}import{formatRows}from'./formatters.js';import a116_0x2c93a1 from'chalk';const DEFAULT_OPTIONS={'showTreeLines':!![],'showIcons':!![],'showMetadata':!![],'indent':'\x20\x20','showUrl':![],'getSegmentUrl':undefined};export function formatTree(_0x470c5c,_0x303493={},_0x3643b2=0x0,_0x160a7b=''){const _0x2d7b2a=a116_0x8345,_0x2b2cc4={...DEFAULT_OPTIONS,..._0x303493},_0x3c4860=[],_0x46c15d=[..._0x470c5c][_0x2d7b2a(0xea)]((_0x2b2418,_0x1eec8c)=>_0x2b2418['name']['localeCompare'](_0x1eec8c[_0x2d7b2a(0xeb)]));for(let _0x5730fc=0x0;_0x5730fc<_0x46c15d[_0x2d7b2a(0xf0)];_0x5730fc++){const _0x1c29ad=_0x46c15d[_0x5730fc],_0x4120f4=_0x5730fc===_0x46c15d[_0x2d7b2a(0xf0)]-0x1;let _0x14ca04='';_0x3643b2>0x0&&(_0x14ca04+=_0x160a7b);_0x2b2cc4[_0x2d7b2a(0xd8)]&&_0x3643b2>0x0&&(_0x14ca04+=a116_0x2c93a1[_0x2d7b2a(0xe0)](_0x4120f4?_0x2d7b2a(0xcf):_0x2d7b2a(0xf6)));_0x2b2cc4['showIcons']&&(_0x14ca04+=_0x1c29ad[_0x2d7b2a(0xdd)]===_0x2d7b2a(0xd9)?_0x2d7b2a(0xd3):_0x2d7b2a(0xdc));_0x14ca04+=_0x1c29ad[_0x2d7b2a(0xeb)];if(_0x2b2cc4[_0x2d7b2a(0xf1)]){if(_0x1c29ad[_0x2d7b2a(0xdd)]===_0x2d7b2a(0xd9)){const _0x4e73b8=[];_0x1c29ad['metadata'][_0x2d7b2a(0xda)]&&_0x4e73b8['push'](_0x1c29ad[_0x2d7b2a(0xdf)][_0x2d7b2a(0xda)]+_0x2d7b2a(0xe1)+(_0x1c29ad[_0x2d7b2a(0xdf)][_0x2d7b2a(0xda)]!==0x1?'s':'')),_0x1c29ad[_0x2d7b2a(0xdf)][_0x2d7b2a(0xec)]&&_0x4e73b8[_0x2d7b2a(0xf7)](_0x1c29ad[_0x2d7b2a(0xdf)][_0x2d7b2a(0xec)]+_0x2d7b2a(0xe5)+(_0x1c29ad['metadata'][_0x2d7b2a(0xec)]!==0x1?'s':'')),_0x4e73b8[_0x2d7b2a(0xf0)]>0x0&&(_0x14ca04+=a116_0x2c93a1['dim']('\x20('+_0x4e73b8[_0x2d7b2a(0xcd)](',\x20')+')'));}else _0x1c29ad['type']===_0x2d7b2a(0xde)&&_0x1c29ad['population']!==undefined&&(_0x14ca04+=a116_0x2c93a1[_0x2d7b2a(0xe0)]('\x20('+formatRows(_0x1c29ad[_0x2d7b2a(0xef)])+')'));}_0x2b2cc4['showUrl']&&_0x2b2cc4[_0x2d7b2a(0xe9)]&&_0x1c29ad['type']===_0x2d7b2a(0xde)&&(_0x14ca04+='\x20'+a116_0x2c93a1[_0x2d7b2a(0xd4)](_0x2b2cc4[_0x2d7b2a(0xe9)](_0x1c29ad['id'])));_0x3c4860[_0x2d7b2a(0xf7)](_0x14ca04);if(_0x1c29ad['children']&&_0x1c29ad[_0x2d7b2a(0xee)][_0x2d7b2a(0xf0)]>0x0){let _0x4f109e;if(_0x3643b2===0x0)_0x4f109e='';else _0x2b2cc4[_0x2d7b2a(0xd8)]?_0x4f109e=_0x160a7b+(_0x4120f4?_0x2d7b2a(0xe4):a116_0x2c93a1[_0x2d7b2a(0xe0)]('│')+_0x2d7b2a(0xe7)):_0x4f109e=_0x160a7b+_0x2b2cc4[_0x2d7b2a(0xd1)];const _0x21cd17=formatTree(_0x1c29ad['children'],_0x2b2cc4,_0x3643b2+0x1,_0x4f109e);_0x3c4860[_0x2d7b2a(0xf7)](_0x21cd17);}}return _0x3c4860[_0x2d7b2a(0xcd)]('\x0a');}export function formatFlatList(_0x3fd4cb,_0x31033b,_0x343231={}){const _0x5e57bd=a116_0x8345,_0x4ba4c1={...DEFAULT_OPTIONS,..._0x343231},_0xe35baa=[];for(const _0x59c9f8 of _0x3fd4cb){_0xe35baa[_0x5e57bd(0xf7)]({'name':_0x59c9f8['name'],'icon':_0x4ba4c1[_0x5e57bd(0xe2)]?'📁':'','metadata':undefined});}for(const _0x5e4caa of _0x31033b){const _0x26ee96=_0x4ba4c1[_0x5e57bd(0xf1)]&&_0x5e4caa[_0x5e57bd(0xef)]!==undefined?a116_0x2c93a1[_0x5e57bd(0xe0)]('\x20('+formatRows(_0x5e4caa['population'])+')'):'',_0x148e63=_0x4ba4c1[_0x5e57bd(0xd6)]&&_0x4ba4c1[_0x5e57bd(0xe9)]?_0x4ba4c1['getSegmentUrl'](_0x5e4caa['id']):undefined;_0xe35baa['push']({'name':_0x5e4caa[_0x5e57bd(0xeb)],'icon':_0x4ba4c1['showIcons']?'🎯':'','metadata':_0x26ee96,'url':_0x148e63});}_0xe35baa[_0x5e57bd(0xea)]((_0x2faed1,_0x381c5f)=>_0x2faed1[_0x5e57bd(0xeb)][_0x5e57bd(0xe3)](_0x381c5f['name']));if(_0xe35baa[_0x5e57bd(0xf0)]===0x0)return'(empty)';const _0x31cf77=_0xe35baa[_0x5e57bd(0xd2)](_0x1e694c=>{const _0x2b1167=_0x5e57bd,_0x59963f=_0x1e694c['icon']?_0x1e694c['icon']+'\x20':'',_0xa330d8=_0x1e694c[_0x2b1167(0xdf)]||'',_0x3f3cf2=_0x1e694c[_0x2b1167(0xdb)]?'\x20'+a116_0x2c93a1[_0x2b1167(0xd4)](_0x1e694c['url']):'';return''+_0x59963f+_0x1e694c[_0x2b1167(0xeb)]+_0xa330d8+_0x3f3cf2;});return _0x31cf77[_0x5e57bd(0xcd)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a117_0x217ae8=a117_0x14d9;(function(_0x4bf83a,_0x189582){const _0x27671d=a117_0x14d9,_0x40ce78=_0x4bf83a();while(!![]){try{const _0x30af0d=parseInt(_0x27671d(0x200))/0x1+-parseInt(_0x27671d(0x1fb))/0x2+-parseInt(_0x27671d(0x1e5))/0x3*(-parseInt(_0x27671d(0x1e3))/0x4)+-parseInt(_0x27671d(0x1ff))/0x5+parseInt(_0x27671d(0x1e4))/0x6+-parseInt(_0x27671d(0x1fc))/0x7*(-parseInt(_0x27671d(0x1ed))/0x8)+parseInt(_0x27671d(0x1f7))/0x9*(-parseInt(_0x27671d(0x204))/0xa);if(_0x30af0d===_0x189582)break;else _0x40ce78['push'](_0x40ce78['shift']());}catch(_0x35653d){_0x40ce78['push'](_0x40ce78['shift']());}}}(a117_0x5bff,0x1adff));import{get}from'https';function a117_0x5bff(){const _0x39c895=['1005336fDbbYI','9621wTtzOI','HTTP\x20','npm\x20install\x20-g\x20@treasuredata/tdx@latest','data','isTTY','utf-8','toISOString','https://registry.npmjs.org/@treasuredata/tdx/latest','43368SUVVkn','now','Run:','getTime','\x0aRun:\x20','gray','Invalid\x20version\x20format','yellow','write','currentVersion','11871zkrRqu','Request\x20timeout','Update\x20available:','statusCode','421976IAStMW','70OTaaMz','cyan','env','129955bFzxEE','89083bqWVzP','parse','version','green','1160uDmPqt','destroy','latestVersion','stderr','dim','\x0aUpdate\x20available:\x20','lastCheck','236FNupks'];a117_0x5bff=function(){return _0x39c895;};return a117_0x5bff();}import{readFileSync,writeFileSync,mkdirSync}from'fs';import{join}from'path';import{gt,valid}from'semver';import a117_0x54bb7c from'chalk';function a117_0x14d9(_0x38d201,_0x2631eb){_0x38d201=_0x38d201-0x1e2;const _0x5bffa3=a117_0x5bff();let _0x14d9e0=_0x5bffa3[_0x38d201];return _0x14d9e0;}import{getCacheDir}from'../core/config.js';const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_URL=a117_0x217ae8(0x1ec),TIMEOUT_MS=0x7d0;function getCacheFilePath(){const _0x4b1618=getCacheDir();return join(_0x4b1618,'last_version_check');}function readCache(){const _0x1429a7=a117_0x217ae8;try{const _0x54a8e2=getCacheFilePath(),_0x5abf6c=readFileSync(_0x54a8e2,_0x1429a7(0x1ea));return JSON[_0x1429a7(0x201)](_0x5abf6c);}catch{return null;}}function writeCache(_0x2913d9){const _0x36eb35=a117_0x217ae8;try{const _0x5f247c=getCacheDir();mkdirSync(_0x5f247c,{'recursive':!![]});const _0x142baa={'lastCheck':new Date()[_0x36eb35(0x1eb)](),'latestVersion':_0x2913d9},_0x4a0edf=getCacheFilePath();writeFileSync(_0x4a0edf,JSON['stringify'](_0x142baa,null,0x2),_0x36eb35(0x1ea));}catch{}}function isCacheValid(_0x556d60){const _0x2280a5=a117_0x217ae8;if(!_0x556d60)return![];const _0x358f66=new Date(_0x556d60[_0x2280a5(0x1e2)])[_0x2280a5(0x1f0)](),_0x3082a3=Date[_0x2280a5(0x1ee)]();return _0x3082a3-_0x358f66<CACHE_DURATION_MS;}function fetchLatestVersion(){return new Promise((_0x3b4bd7,_0x3db4db)=>{const _0x541de6=get(NPM_REGISTRY_URL,_0x490126=>{const _0x4cb700=a117_0x14d9;if(_0x490126['statusCode']!==0xc8){clearTimeout(_0x456d91),_0x3db4db(new Error(_0x4cb700(0x1e6)+_0x490126[_0x4cb700(0x1fa)]));return;}let _0x30a843='';_0x490126['on'](_0x4cb700(0x1e8),_0x3f0aac=>{_0x30a843+=_0x3f0aac;}),_0x490126['on']('end',()=>{const _0x46e810=_0x4cb700;clearTimeout(_0x456d91);try{const _0x1d2182=JSON[_0x46e810(0x201)](_0x30a843);if(!valid(_0x1d2182[_0x46e810(0x202)])){_0x3db4db(new Error(_0x46e810(0x1f3)));return;}_0x3b4bd7(_0x1d2182[_0x46e810(0x202)]);}catch(_0x25f403){_0x3db4db(_0x25f403);}});})['on']('error',_0x55de45=>{clearTimeout(_0x456d91),_0x3db4db(_0x55de45);}),_0x456d91=setTimeout(()=>{const _0x429c57=a117_0x14d9;_0x541de6[_0x429c57(0x205)](),_0x3db4db(new Error(_0x429c57(0x1f8)));},TIMEOUT_MS);});}export async function checkForUpdate(_0xf958d5){const _0x4ad6f7=a117_0x217ae8;try{const _0x597024=readCache();if(isCacheValid(_0x597024)){const _0x4f6fb4=gt(_0x597024[_0x4ad6f7(0x206)],_0xf958d5);return{'updateAvailable':_0x4f6fb4,'currentVersion':_0xf958d5,'latestVersion':_0x597024[_0x4ad6f7(0x206)]};}const _0x58fb1b=await fetchLatestVersion();writeCache(_0x58fb1b);const _0x2d458a=gt(_0x58fb1b,_0xf958d5);return{'updateAvailable':_0x2d458a,'currentVersion':_0xf958d5,'latestVersion':_0x58fb1b};}catch{return null;}}export function displayUpdateNotification(_0x150900){const _0x15a17a=a117_0x217ae8;if(!_0x150900['updateAvailable'])return;const _0x1e860a=process['stderr'][_0x15a17a(0x1e9)]&&!process[_0x15a17a(0x1fe)]['NO_COLOR'],_0x3f36d6=_0x1e860a?a117_0x54bb7c[_0x15a17a(0x1f2)]('→'):'→',_0x41ae57=_0x1e860a?a117_0x54bb7c[_0x15a17a(0x208)](_0x150900[_0x15a17a(0x1f6)]):_0x150900[_0x15a17a(0x1f6)],_0x24f448=_0x1e860a?a117_0x54bb7c[_0x15a17a(0x203)](_0x150900['latestVersion']):_0x150900[_0x15a17a(0x206)],_0x26af63=_0x1e860a?a117_0x54bb7c[_0x15a17a(0x1fd)](_0x15a17a(0x1e7)):_0x15a17a(0x1e7),_0x4c1d33=_0x1e860a?'\x0a'+a117_0x54bb7c[_0x15a17a(0x1f4)](_0x15a17a(0x1f9))+'\x20'+_0x41ae57+'\x20'+_0x3f36d6+'\x20'+_0x24f448+'\x0a'+a117_0x54bb7c[_0x15a17a(0x208)](_0x15a17a(0x1ef))+'\x20'+_0x26af63+'\x0a':_0x15a17a(0x209)+_0x41ae57+'\x20'+_0x3f36d6+'\x20'+_0x24f448+_0x15a17a(0x1f1)+_0x26af63+'\x0a';process[_0x15a17a(0x207)][_0x15a17a(0x1f5)](_0x4c1d33);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a118_0x42a4(){const _0x5681f1=['3853ZVYpSZ','96xDaIrK','4762870EhrAFF','.dig','24912jFzzLN','56367Zfqrpg','.digdag','7139000DLVGox','588RMWCsn','74494PKJEmX','7607240zteyQh','274LBjTJI','2079cqLBFp'];a118_0x42a4=function(){return _0x5681f1;};return a118_0x42a4();}const a118_0x5304c6=a118_0x18cd;(function(_0x58c855,_0xa0e19d){const _0x464d1e=a118_0x18cd,_0x4de4ed=_0x58c855();while(!![]){try{const _0x4f8691=-parseInt(_0x464d1e(0x1b7))/0x1*(-parseInt(_0x464d1e(0x1b5))/0x2)+parseInt(_0x464d1e(0x1bc))/0x3*(-parseInt(_0x464d1e(0x1b8))/0x4)+parseInt(_0x464d1e(0x1b9))/0x5+-parseInt(_0x464d1e(0x1bf))/0x6*(parseInt(_0x464d1e(0x1b3))/0x7)+parseInt(_0x464d1e(0x1bb))/0x8*(parseInt(_0x464d1e(0x1b6))/0x9)+-parseInt(_0x464d1e(0x1b4))/0xa+parseInt(_0x464d1e(0x1be))/0xb;if(_0x4f8691===_0xa0e19d)break;else _0x4de4ed['push'](_0x4de4ed['shift']());}catch(_0x1483ef){_0x4de4ed['push'](_0x4de4ed['shift']());}}}(a118_0x42a4,0x91111));function a118_0x18cd(_0x3185d2,_0x2efb1a){_0x3185d2=_0x3185d2-0x1b3;const _0x42a428=a118_0x42a4();let _0x18cdab=_0x42a428[_0x3185d2];return _0x18cdab;}export const WORKFLOW_FILE_EXTENSION=a118_0x5304c6(0x1ba);export function shouldIncludeInArchive(_0x1d211a){const _0x1bf2cb=a118_0x5304c6;if(_0x1d211a===_0x1bf2cb(0x1bd))return!![];if(_0x1d211a['startsWith']('.'))return![];return!![];}
|