@treasuredata/tdx 0.8.1 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +2 -2
- package/dist/cli-categories.js +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +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.d.ts.map +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-command.js.map +1 -1
- package/dist/commands/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/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/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/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.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/segment-path-parser.js +1 -1
- package/dist/utils/segment-ref-parser.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sql-parser.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-config.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/tree-formatter.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/dist/utils/workflow-utils.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3e1d69,_0x3180f7){const _0x148c65=a110_0x1ab9,_0x574a4a=_0x3e1d69();while(!![]){try{const _0x55ab18=-parseInt(_0x148c65(0xc5))/0x1*(-parseInt(_0x148c65(0xc3))/0x2)+-parseInt(_0x148c65(0xc1))/0x3*(-parseInt(_0x148c65(0xc7))/0x4)+parseInt(_0x148c65(0xb9))/0x5*(parseInt(_0x148c65(0xcf))/0x6)+parseInt(_0x148c65(0xc2))/0x7+parseInt(_0x148c65(0xc9))/0x8+parseInt(_0x148c65(0xca))/0x9*(-parseInt(_0x148c65(0xbe))/0xa)+-parseInt(_0x148c65(0xcd))/0xb*(parseInt(_0x148c65(0xc0))/0xc);if(_0x55ab18===_0x3180f7)break;else _0x574a4a['push'](_0x574a4a['shift']());}catch(_0x455041){_0x574a4a['push'](_0x574a4a['shift']());}}}(a110_0x54af,0x69e38));function a110_0x54af(){const _0x1e6ec3=['2327916ZSTGjM','Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)','2102320iklRKi','185589FAuLfE','length','trim','8767mYzyTI','Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)','78RKrDvI','Pattern\x20cannot\x20be\x20just\x20a\x20dot','table','join','Table\x20name\x20is\x20required\x20for\x20describe\x20operation','218090oKbXNo','database','catalog','Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','150tWInDm','includes','15636jMzsrB','3QOachw','217931wRMLCA','338590MGlkMs','split','2ccggYQ','push'];a110_0x54af=function(){return _0x1e6ec3;};return a110_0x54af();}function a110_0x1ab9(_0x1cdb9a,_0x240dda){_0x1cdb9a=_0x1cdb9a-0xb7;const _0x54af7e=a110_0x54af();let _0x1ab969=_0x54af7e[_0x1cdb9a];return _0x1ab969;}function hasWildcard(_0x15cdeb){const _0x21e57a=a110_0x1ab9;return _0x15cdeb[_0x21e57a(0xbf)]('*')||_0x15cdeb[_0x21e57a(0xbf)]('?');}export function parseTableReference(_0x3beba0){const _0x3aca21=a110_0x1ab9;if(!_0x3beba0||_0x3beba0[_0x3aca21(0xcc)]()['length']===0x0)throw new Error('Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only');const _0x2e8e85=_0x3beba0[_0x3aca21(0xcc)](),_0xe28553={'original':_0x2e8e85},_0x101844=_0x2e8e85[_0x3aca21(0xc4)]('.');if(_0x101844[_0x3aca21(0xcb)]===0x1){const _0x1ae4f5=_0x101844[0x0];if(!_0x1ae4f5)throw new Error(_0x3aca21(0xd0));_0xe28553[_0x3aca21(0xd1)]=_0x1ae4f5;}else{if(_0x101844[_0x3aca21(0xcb)]===0x2){const [_0xc3b9c9,_0x715fd1]=_0x101844;if(!_0xc3b9c9)throw new Error(_0x3aca21(0xbc));if(!_0x715fd1)throw new Error(_0x3aca21(0xc8));_0xe28553[_0x3aca21(0xba)]=_0xc3b9c9,_0xe28553[_0x3aca21(0xd1)]=_0x715fd1;}else{if(_0x101844[_0x3aca21(0xcb)]===0x3){const [_0x1356d9,_0x56895d,_0x19b934]=_0x101844;if(!_0x1356d9||!_0x56895d||!_0x19b934)throw new Error('Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty');_0xe28553[_0x3aca21(0xbb)]=_0x1356d9,_0xe28553[_0x3aca21(0xba)]=_0x56895d,_0xe28553[_0x3aca21(0xd1)]=_0x19b934;}else throw new Error(_0x3aca21(0xce));}}return _0xe28553;}export function formatTableReference(_0x4d8bbf){const _0x557667=a110_0x1ab9,_0x1a992a=[];return _0x4d8bbf[_0x557667(0xbb)]&&_0x1a992a[_0x557667(0xc6)](_0x4d8bbf['catalog']),_0x4d8bbf['database']&&_0x1a992a[_0x557667(0xc6)](_0x4d8bbf[_0x557667(0xba)]),_0x4d8bbf[_0x557667(0xd1)]&&_0x1a992a[_0x557667(0xc6)](_0x4d8bbf[_0x557667(0xd1)]),_0x1a992a[_0x557667(0xb7)]('.');}export function validateTableListReference(_0x503072){return undefined;}export function validateTableDescribeReference(_0x3ecee1){const _0x436a12=a110_0x1ab9;if(!_0x3ecee1[_0x436a12(0xd1)])return _0x436a12(0xb8);if(_0x3ecee1['database']&&hasWildcard(_0x3ecee1[_0x436a12(0xba)]))return _0x436a12(0xbd);if(hasWildcard(_0x3ecee1[_0x436a12(0xd1)]))return'Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation';return undefined;}
|
package/dist/utils/tdx-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a111_0x64ea03=a111_0xd07e;function a111_0xd07e(_0xbf4e2f,_0x24a1e2){_0xbf4e2f=_0xbf4e2f-0xbc;const _0x35d584=a111_0x35d5();let _0xd07ee0=_0x35d584[_0xbf4e2f];return _0xd07ee0;}(function(_0x4d0e28,_0x1d9885){const _0xd1b98d=a111_0xd07e,_0x26a3fe=_0x4d0e28();while(!![]){try{const _0x363c99=parseInt(_0xd1b98d(0xcc))/0x1*(parseInt(_0xd1b98d(0xd6))/0x2)+-parseInt(_0xd1b98d(0xd5))/0x3+parseInt(_0xd1b98d(0xbd))/0x4+-parseInt(_0xd1b98d(0xc5))/0x5*(-parseInt(_0xd1b98d(0xc1))/0x6)+-parseInt(_0xd1b98d(0xd1))/0x7+parseInt(_0xd1b98d(0xc9))/0x8+-parseInt(_0xd1b98d(0xcd))/0x9;if(_0x363c99===_0x1d9885)break;else _0x26a3fe['push'](_0x26a3fe['shift']());}catch(_0x2a0c19){_0x26a3fe['push'](_0x26a3fe['shift']());}}}(a111_0x35d5,0x99003));import{existsSync,readFileSync}from'fs';import a111_0x190012 from'path';const TDX_CONFIG_FILE=a111_0x64ea03(0xc3),SEGMENTS_DIR='segments';export function findTdxConfigPath(_0x39f1d4=process['cwd']()){const _0x42c8ae=a111_0x64ea03;let _0x3dd12b=a111_0x190012['resolve'](_0x39f1d4);const _0x4443df=a111_0x190012[_0x42c8ae(0xd3)](_0x3dd12b)[_0x42c8ae(0xd2)];while(_0x3dd12b!==_0x4443df){const _0x50d827=a111_0x190012['join'](_0x3dd12b,TDX_CONFIG_FILE);if(existsSync(_0x50d827))return _0x50d827;_0x3dd12b=a111_0x190012[_0x42c8ae(0xd4)](_0x3dd12b);}return null;}export function loadTdxConfig(_0x39fb34){const _0x4c9d10=a111_0x64ea03,_0x530303=readFileSync(_0x39fb34,_0x4c9d10(0xc2));let _0x5a06cb;try{_0x5a06cb=JSON[_0x4c9d10(0xd3)](_0x530303);}catch{throw new Error(_0x4c9d10(0xc6)+_0x39fb34);}if(!_0x5a06cb||typeof _0x5a06cb!==_0x4c9d10(0xbc))throw new Error(_0x4c9d10(0xd0));const _0x450ccb=_0x5a06cb;if(!_0x450ccb['parent_segment']||typeof _0x450ccb[_0x4c9d10(0xbf)]!==_0x4c9d10(0xca))throw new Error(_0x4c9d10(0xbe));return{'parent_segment':_0x450ccb[_0x4c9d10(0xbf)]};}export function findTdxConfig(_0x4979d3=process[a111_0x64ea03(0xcf)]()){const _0x592eaf=a111_0x64ea03,_0x50ea9c=findTdxConfigPath(_0x4979d3);if(!_0x50ea9c)throw new Error(_0x592eaf(0xc8));const _0x59ba5d=loadTdxConfig(_0x50ea9c),_0x4426b0=a111_0x190012[_0x592eaf(0xd4)](_0x50ea9c);return{'config':_0x59ba5d,'configPath':_0x50ea9c,'configDir':_0x4426b0};}function a111_0x35d5(){const _0x533cad=['resolve','No\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20sg\x20pull\x20<parent_segment>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','934840ZQhSOb','string','relative','992421gkeMVW','4294215kpcHoa','join','cwd','Invalid\x20tdx.json:\x20expected\x20object','8581965FoqULR','root','parse','dirname','947697IcgSgR','2FfexFI','object','2778904FioBIe','Invalid\x20tdx.json:\x20missing\x20or\x20invalid\x20\x27parent_segment\x27\x20field','parent_segment','stringify','6mVwVwM','utf-8','tdx.json','replace','4208590cPqkfH','Invalid\x20JSON\x20in\x20'];a111_0x35d5=function(){return _0x533cad;};return a111_0x35d5();}export function getSegmentRootDir(_0xc12b78,_0x35890e=process['cwd']()){const _0x4f9232=a111_0x64ea03;return a111_0x190012[_0x4f9232(0xce)](_0x35890e,SEGMENTS_DIR,_0xc12b78);}export function getTdxConfigPath(_0x458cde,_0x90ec33=process[a111_0x64ea03(0xcf)]()){const _0x5b803e=a111_0x64ea03;return a111_0x190012[_0x5b803e(0xce)](getSegmentRootDir(_0x458cde,_0x90ec33),TDX_CONFIG_FILE);}export function getRelativePathFromConfig(_0x595290,_0x33d5a4){const _0x4b51fd=a111_0x64ea03,_0x364cb0=a111_0x190012[_0x4b51fd(0xc7)](_0x595290),_0x2ceaa7=a111_0x190012[_0x4b51fd(0xcb)](_0x33d5a4,_0x364cb0);if(_0x2ceaa7['startsWith']('..'))return'';return _0x2ceaa7;}export function localPathToTdFolderPath(_0x781d12){const _0x26995c=a111_0x64ea03,_0x461ce5=a111_0x190012[_0x26995c(0xd4)](_0x781d12);if(_0x461ce5==='.'||_0x461ce5==='')return'';return _0x461ce5[_0x26995c(0xc4)](/\\/g,'/');}export function tdFolderPathToLocalPath(_0x429ec9,_0xc76772){if(!_0x429ec9)return _0xc76772;return a111_0x190012['join'](_0xc76772,_0x429ec9);}export function createTdxConfigContent(_0x59ef9c){const _0x5629b4=a111_0x64ea03,_0x120fba={'parent_segment':_0x59ef9c};return JSON[_0x5629b4(0xc0)](_0x120fba,null,0x2)+'\x0a';}
|
package/dist/utils/tdx-logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a112_0x2bfe61=a112_0x345e;(function(_0x2325ef,_0x4e6b0){const _0x34de62=a112_0x345e,_0x4561f5=_0x2325ef();while(!![]){try{const _0x2e4da0=parseInt(_0x34de62(0x10c))/0x1*(parseInt(_0x34de62(0x115))/0x2)+-parseInt(_0x34de62(0x11c))/0x3*(parseInt(_0x34de62(0xf9))/0x4)+parseInt(_0x34de62(0xfa))/0x5+-parseInt(_0x34de62(0x135))/0x6+-parseInt(_0x34de62(0x116))/0x7+parseInt(_0x34de62(0x131))/0x8+-parseInt(_0x34de62(0x11b))/0x9;if(_0x2e4da0===_0x4e6b0)break;else _0x4561f5['push'](_0x4561f5['shift']());}catch(_0x2f4ff9){_0x4561f5['push'](_0x4561f5['shift']());}}}(a112_0x54e0,0xa028e));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';import a112_0xfcbce0 from'chalk';function safeStringify(_0x186908){const _0x1e347b=a112_0x345e;if(typeof _0x186908==='string')return _0x186908;if(_0x186908 instanceof Error)return _0x186908[_0x1e347b(0x110)]||_0x186908[_0x1e347b(0x102)]+':\x20'+_0x186908[_0x1e347b(0x125)];try{return JSON[_0x1e347b(0xfb)](_0x186908,(_0x432792,_0x18e8c2)=>{const _0x4d08de=_0x1e347b;if(_0x18e8c2 instanceof Error)return{'name':_0x18e8c2['name'],'message':_0x18e8c2[_0x4d08de(0x125)],'stack':_0x18e8c2[_0x4d08de(0x110)],'cause':_0x18e8c2['cause']};return _0x18e8c2;});}catch{return String(_0x186908);}}function getTimezoneOffset(){const _0x29b6d8=a112_0x345e,_0xc07569=-new Date()[_0x29b6d8(0x11d)](),_0x3eb9c1=Math[_0x29b6d8(0x100)](Math[_0x29b6d8(0x12e)](_0xc07569)/0x3c),_0xb9532f=Math[_0x29b6d8(0x12e)](_0xc07569)%0x3c,_0x597010=_0xc07569>=0x0?'+':'-';return''+_0x597010+_0x3eb9c1[_0x29b6d8(0x12a)]()[_0x29b6d8(0x127)](0x2,'0')+_0xb9532f[_0x29b6d8(0x12a)]()[_0x29b6d8(0x127)](0x2,'0');}function formatTimestamp(){const _0x3fb304=a112_0x345e,_0x363b3a=new Date(),_0x578627=_0x363b3a[_0x3fb304(0x10a)](),_0xf50d2c=(_0x363b3a[_0x3fb304(0x112)]()+0x1)[_0x3fb304(0x12a)]()['padStart'](0x2,'0'),_0x27d5c=_0x363b3a[_0x3fb304(0x121)]()[_0x3fb304(0x12a)]()[_0x3fb304(0x127)](0x2,'0'),_0xc9f3cf=_0x363b3a[_0x3fb304(0x118)]()[_0x3fb304(0x12a)]()[_0x3fb304(0x127)](0x2,'0'),_0x2f4222=_0x363b3a['getMinutes']()[_0x3fb304(0x12a)]()[_0x3fb304(0x127)](0x2,'0'),_0x163011=_0x363b3a[_0x3fb304(0x123)]()[_0x3fb304(0x12a)]()['padStart'](0x2,'0'),_0x31735a=_0x363b3a[_0x3fb304(0x12d)]()['toString']()[_0x3fb304(0x127)](0x3,'0'),_0x4853ca=getTimezoneOffset();return _0x578627+'-'+_0xf50d2c+'-'+_0x27d5c+'\x20'+_0xc9f3cf+':'+_0x2f4222+':'+_0x163011+'.'+_0x31735a+_0x4853ca;}function a112_0x345e(_0x3ed54,_0x2f7bbd){_0x3ed54=_0x3ed54-0xf9;const _0x54e034=a112_0x54e0();let _0x345e37=_0x54e034[_0x3ed54];return _0x345e37;}function formatColoredLogEntry(_0x2a4a57,_0x384ef0){const _0x5379f2=a112_0x345e,_0x3af48a=formatTimestamp(),_0x1cc280=_0x384ef0[_0x5379f2(0x132)](safeStringify)[_0x5379f2(0x11e)]('\x20'),_0xbd9405=a112_0xfcbce0['gray'](_0x3af48a);let _0x43a6a5;switch(_0x2a4a57){case _0x5379f2(0x114):_0x43a6a5=a112_0xfcbce0[_0x5379f2(0xff)]('['+_0x2a4a57+']\x20');break;case _0x5379f2(0x128):_0x43a6a5=a112_0xfcbce0['yellow']('['+_0x2a4a57+']\x20');break;case _0x5379f2(0x111):_0x43a6a5=a112_0xfcbce0[_0x5379f2(0x107)]('['+_0x2a4a57+']');break;case _0x5379f2(0xfe):_0x43a6a5=a112_0xfcbce0[_0x5379f2(0x108)]('['+_0x2a4a57+']');break;default:_0x43a6a5='['+_0x2a4a57+']';}return _0xbd9405+'\x20'+_0x43a6a5+'\x20'+_0x1cc280;}function a112_0x54e0(){const _0x26a137=['tdx','.cache','red','gray','trace','getFullYear','Warning:\x20Failed\x20to\x20compress\x20','860599aTPOUG','logStream','TRACE','WARN','stack','error','getMonth','Warning:\x20Error\x20writing\x20to\x20tdx.log:','info','2MBhlEF','4808776TCefKt','getLogPath','getHours','rotateOldLogs','toISOString','7846767ZuFuwJ','677082EWvlVK','getTimezoneOffset','join','split','logLevel','getDate','test','getSeconds','Proxy\x20session\x20ended','message','fileOnly','padStart','warn','end','toString','ERROR','Warning:\x20Failed\x20to\x20initialize\x20log\x20files:','getMilliseconds','abs','INFO','mtime','9026328QmYBXj','map','.gz','logDir','1713624fhmtjE','12xwNdJx','5943205xRcyjo','stringify','DEBUG','write','debug','cyan','floor','tdx.log','name','includes','.log'];a112_0x54e0=function(){return _0x26a137;};return a112_0x54e0();}export var LogLevel;(function(_0x346d71){const _0x56f45c=a112_0x345e;_0x346d71[_0x346d71['TRACE']=-0x2]=_0x56f45c(0x10e),_0x346d71[_0x346d71[_0x56f45c(0xfc)]=-0x1]=_0x56f45c(0xfc),_0x346d71[_0x346d71[_0x56f45c(0x12f)]=0x0]=_0x56f45c(0x12f),_0x346d71[_0x346d71[_0x56f45c(0x10f)]=0x1]=_0x56f45c(0x10f),_0x346d71[_0x346d71[_0x56f45c(0x12b)]=0x2]=_0x56f45c(0x12b);}(LogLevel||(LogLevel={})));export class TDXLogger{[a112_0x2bfe61(0x10d)];[a112_0x2bfe61(0x134)];[a112_0x2bfe61(0x120)];['fileOnly'];constructor(_0x479c57=LogLevel[a112_0x2bfe61(0x12f)],_0x2d78dc=![]){const _0x191910=a112_0x2bfe61;this['logDir']=join(homedir(),_0x191910(0x106),_0x191910(0x105),'logs'),this[_0x191910(0x120)]=_0x479c57,this[_0x191910(0x126)]=_0x2d78dc;}async['init'](){const _0x557d85=a112_0x2bfe61;try{await mkdir(this['logDir'],{'recursive':!![]}),await this[_0x557d85(0x119)]();const _0x348b31=join(this[_0x557d85(0x134)],_0x557d85(0x101));this['logStream']=createWriteStream(_0x348b31,{'flags':'a'}),this['logStream']['on']('error',_0x3f45ab=>{const _0x3b9394=_0x557d85;console[_0x3b9394(0x111)](_0x3b9394(0x113),_0x3f45ab['message']);});}catch(_0x568853){console['error'](_0x557d85(0x12c),_0x568853);}}async[a112_0x2bfe61(0x119)](){const _0x365db7=a112_0x2bfe61;try{const _0xc8a3db=await readdir(this[_0x365db7(0x134)]),_0x30d944=new Date()[_0x365db7(0x11a)]()[_0x365db7(0x11f)]('T')[0x0];if(_0xc8a3db[_0x365db7(0x103)](_0x365db7(0x101))){const _0xa9dae0=join(this[_0x365db7(0x134)],_0x365db7(0x101)),_0x44eafc=await stat(_0xa9dae0),_0x15b700=new Date(_0x44eafc[_0x365db7(0x130)])['toISOString']()[_0x365db7(0x11f)]('T')[0x0];if(_0x15b700<_0x30d944){const _0x506683=join(this['logDir'],'tdx-'+_0x15b700+_0x365db7(0x104));await rename(_0xa9dae0,_0x506683);}}const _0x5c0de8=await readdir(this[_0x365db7(0x134)]),_0x57724d=/^tdx-(\d{4}-\d{2}-\d{2})\.log$/,_0x944315=_0x5c0de8['filter'](_0x3c71a1=>_0x57724d[_0x365db7(0x122)](_0x3c71a1));for(const _0x172a54 of _0x944315){const _0xe817af=join(this[_0x365db7(0x134)],_0x172a54),_0x2a68bf=join(this[_0x365db7(0x134)],_0x172a54+_0x365db7(0x133));try{await pipeline(createReadStream(_0xe817af),createGzip(),createWriteStream(_0x2a68bf)),await unlink(_0xe817af);}catch(_0x1168dd){console['error'](_0x365db7(0x10b)+_0x172a54+':',_0x1168dd);}}}catch{}}[a112_0x2bfe61(0xfe)](..._0xb50f4c){const _0x1ac6b0=a112_0x2bfe61;if(this[_0x1ac6b0(0x120)]>LogLevel[_0x1ac6b0(0xfc)])return;const _0x170a54=formatColoredLogEntry(_0x1ac6b0(0xfe),_0xb50f4c);this[_0x1ac6b0(0x10d)]?.['write'](_0x170a54+'\x0a');}[a112_0x2bfe61(0x109)](..._0x1806e2){const _0x54f8d6=a112_0x2bfe61;if(this['logLevel']>LogLevel[_0x54f8d6(0x10e)])return;const _0x5d8b5=formatColoredLogEntry(_0x54f8d6(0x109),_0x1806e2);this[_0x54f8d6(0x10d)]?.['write'](_0x5d8b5+'\x0a');}[a112_0x2bfe61(0x114)](..._0x411da1){const _0x18495c=a112_0x2bfe61;if(this[_0x18495c(0x120)]>LogLevel['INFO'])return;const _0x14ce29=formatColoredLogEntry(_0x18495c(0x114),_0x411da1);!this[_0x18495c(0x126)]&&console['log'](_0x14ce29),this['logStream']?.[_0x18495c(0xfd)](_0x14ce29+'\x0a');}[a112_0x2bfe61(0x128)](..._0x192bb3){const _0x5a9906=a112_0x2bfe61;if(this['logLevel']>LogLevel[_0x5a9906(0x10f)])return;const _0x489dd2=formatColoredLogEntry('warn',_0x192bb3);!this['fileOnly']&&console['error'](_0x489dd2),this['logStream']?.[_0x5a9906(0xfd)](_0x489dd2+'\x0a');}[a112_0x2bfe61(0x111)](..._0x1b4f9a){const _0x128061=a112_0x2bfe61,_0x47e473=formatColoredLogEntry(_0x128061(0x111),_0x1b4f9a);!this['fileOnly']&&console[_0x128061(0x111)](_0x47e473),this[_0x128061(0x10d)]?.[_0x128061(0xfd)](_0x47e473+'\x0a');}async['close'](){const _0x243849=a112_0x2bfe61;return this[_0x243849(0x114)](_0x243849(0x124)),new Promise(_0xe8f99=>{const _0x450685=_0x243849;this[_0x450685(0x10d)]?this['logStream'][_0x450685(0x129)](()=>{_0xe8f99();}):_0xe8f99();});}[a112_0x2bfe61(0x117)](){const _0x119aad=a112_0x2bfe61;return join(this['logDir'],_0x119aad(0x101));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x550704,_0x5578f4){const _0x539642=a113_0x371b,_0x1e18a1=_0x550704();while(!![]){try{const _0x4ba687=-parseInt(_0x539642(0x93))/0x1+parseInt(_0x539642(0x7c))/0x2*(parseInt(_0x539642(0x8d))/0x3)+parseInt(_0x539642(0x7b))/0x4+-parseInt(_0x539642(0x8c))/0x5+-parseInt(_0x539642(0x83))/0x6+parseInt(_0x539642(0x92))/0x7*(-parseInt(_0x539642(0x76))/0x8)+parseInt(_0x539642(0x89))/0x9*(parseInt(_0x539642(0x81))/0xa);if(_0x4ba687===_0x5578f4)break;else _0x1e18a1['push'](_0x1e18a1['shift']());}catch(_0x2f74ca){_0x1e18a1['push'](_0x1e18a1['shift']());}}}(a113_0x5a72,0x7fce6));import{formatRows}from'./formatters.js';import a113_0x13d2a2 from'chalk';const DEFAULT_OPTIONS={'showTreeLines':!![],'showIcons':!![],'showMetadata':!![],'indent':'\x20\x20'};function a113_0x5a72(){const _0x450692=['sort','children','66735KbXBXN','length','\x20segment','2476435nAxVKe','25302kBcUAK','join','showMetadata','icon','folderCount','1673ZmzVEK','792292qoCxqs','└──\x20','push','🎯\x20','2712IgIvpA','├──\x20','showIcons','indent','metadata','1206624fSizfQ','32luJfer','name','segmentCount','map','population','3220dYfRwr','showTreeLines','5592816FmvTHZ','dim','folder','type'];a113_0x5a72=function(){return _0x450692;};return a113_0x5a72();}function a113_0x371b(_0x534edb,_0x29dfc8){_0x534edb=_0x534edb-0x74;const _0x5a728a=a113_0x5a72();let _0x371bb2=_0x5a728a[_0x534edb];return _0x371bb2;}export function formatTree(_0x4af358,_0x121731={},_0x192503=0x0,_0x56a7a0=''){const _0x3c7363=a113_0x371b,_0x4577c3={...DEFAULT_OPTIONS,..._0x121731},_0xafb228=[],_0xbaa463=[..._0x4af358]['sort']((_0x3d5733,_0x516c19)=>_0x3d5733[_0x3c7363(0x7d)]['localeCompare'](_0x516c19[_0x3c7363(0x7d)]));for(let _0x127532=0x0;_0x127532<_0xbaa463[_0x3c7363(0x8a)];_0x127532++){const _0x525e8e=_0xbaa463[_0x127532],_0x568d65=_0x127532===_0xbaa463[_0x3c7363(0x8a)]-0x1;let _0x3809fc='';_0x192503>0x0&&(_0x3809fc+=_0x56a7a0);_0x4577c3[_0x3c7363(0x82)]&&_0x192503>0x0&&(_0x3809fc+=a113_0x13d2a2['dim'](_0x568d65?_0x3c7363(0x94):_0x3c7363(0x77)));_0x4577c3[_0x3c7363(0x78)]&&(_0x3809fc+=_0x525e8e[_0x3c7363(0x86)]===_0x3c7363(0x85)?'📁\x20':_0x3c7363(0x75));_0x3809fc+=_0x525e8e[_0x3c7363(0x7d)];if(_0x4577c3[_0x3c7363(0x8f)]){if(_0x525e8e[_0x3c7363(0x86)]===_0x3c7363(0x85)){const _0x6c9e36=[];_0x525e8e[_0x3c7363(0x7a)][_0x3c7363(0x7e)]&&_0x6c9e36[_0x3c7363(0x74)](_0x525e8e[_0x3c7363(0x7a)][_0x3c7363(0x7e)]+_0x3c7363(0x8b)+(_0x525e8e['metadata']['segmentCount']!==0x1?'s':'')),_0x525e8e[_0x3c7363(0x7a)][_0x3c7363(0x91)]&&_0x6c9e36['push'](_0x525e8e[_0x3c7363(0x7a)][_0x3c7363(0x91)]+'\x20folder'+(_0x525e8e['metadata'][_0x3c7363(0x91)]!==0x1?'s':'')),_0x6c9e36[_0x3c7363(0x8a)]>0x0&&(_0x3809fc+=a113_0x13d2a2['dim']('\x20('+_0x6c9e36['join'](',\x20')+')'));}else _0x525e8e[_0x3c7363(0x86)]==='segment'&&_0x525e8e[_0x3c7363(0x80)]!==undefined&&(_0x3809fc+=a113_0x13d2a2[_0x3c7363(0x84)]('\x20('+formatRows(_0x525e8e[_0x3c7363(0x80)])+')'));}_0xafb228[_0x3c7363(0x74)](_0x3809fc);if(_0x525e8e[_0x3c7363(0x88)]&&_0x525e8e[_0x3c7363(0x88)][_0x3c7363(0x8a)]>0x0){let _0x2315d8;if(_0x192503===0x0)_0x2315d8='';else _0x4577c3['showTreeLines']?_0x2315d8=_0x56a7a0+(_0x568d65?'\x20\x20\x20\x20':a113_0x13d2a2['dim']('│')+'\x20\x20\x20'):_0x2315d8=_0x56a7a0+_0x4577c3[_0x3c7363(0x79)];const _0x2889e3=formatTree(_0x525e8e[_0x3c7363(0x88)],_0x4577c3,_0x192503+0x1,_0x2315d8);_0xafb228['push'](_0x2889e3);}}return _0xafb228[_0x3c7363(0x8e)]('\x0a');}export function formatFlatList(_0x45906c,_0x5b8c5c,_0xad1d8={}){const _0x186741=a113_0x371b,_0x2d7b98={...DEFAULT_OPTIONS,..._0xad1d8},_0x4c7da0=[];for(const _0x3fe26c of _0x45906c){_0x4c7da0[_0x186741(0x74)]({'name':_0x3fe26c[_0x186741(0x7d)],'icon':_0x2d7b98[_0x186741(0x78)]?'📁':'','metadata':undefined});}for(const _0x56d14f of _0x5b8c5c){const _0x9f8efd=_0x2d7b98[_0x186741(0x8f)]&&_0x56d14f[_0x186741(0x80)]!==undefined?a113_0x13d2a2[_0x186741(0x84)]('\x20('+formatRows(_0x56d14f['population'])+')'):'';_0x4c7da0[_0x186741(0x74)]({'name':_0x56d14f[_0x186741(0x7d)],'icon':_0x2d7b98[_0x186741(0x78)]?'🎯':'','metadata':_0x9f8efd});}_0x4c7da0[_0x186741(0x87)]((_0x5a972d,_0xfbb487)=>_0x5a972d[_0x186741(0x7d)]['localeCompare'](_0xfbb487[_0x186741(0x7d)]));if(_0x4c7da0[_0x186741(0x8a)]===0x0)return'(empty)';const _0x3766c4=_0x4c7da0[_0x186741(0x7f)](_0x5bf45d=>{const _0x1afe03=_0x186741,_0x551d3d=_0x5bf45d[_0x1afe03(0x90)]?_0x5bf45d[_0x1afe03(0x90)]+'\x20':'',_0x55136a=_0x5bf45d[_0x1afe03(0x7a)]||'';return''+_0x551d3d+_0x5bf45d[_0x1afe03(0x7d)]+_0x55136a;});return _0x3766c4[_0x186741(0x8e)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a114_0x5aec22=a114_0x3de9;(function(_0x3d6ee2,_0x2d1f2c){const _0x2026ee=a114_0x3de9,_0x8c751b=_0x3d6ee2();while(!![]){try{const _0x1c12f2=-parseInt(_0x2026ee(0x14e))/0x1*(-parseInt(_0x2026ee(0x135))/0x2)+parseInt(_0x2026ee(0x131))/0x3+parseInt(_0x2026ee(0x13b))/0x4+parseInt(_0x2026ee(0x14d))/0x5+parseInt(_0x2026ee(0x13f))/0x6*(-parseInt(_0x2026ee(0x132))/0x7)+-parseInt(_0x2026ee(0x12f))/0x8*(parseInt(_0x2026ee(0x134))/0x9)+parseInt(_0x2026ee(0x13d))/0xa;if(_0x1c12f2===_0x2d1f2c)break;else _0x8c751b['push'](_0x8c751b['shift']());}catch(_0x2e39c0){_0x8c751b['push'](_0x8c751b['shift']());}}}(a114_0x27f6,0xf341a));import{get}from'https';import{readFileSync,writeFileSync,mkdirSync}from'fs';import{join}from'path';function a114_0x3de9(_0x24b117,_0x4fe326){_0x24b117=_0x24b117-0x12b;const _0x27f635=a114_0x27f6();let _0x3de906=_0x27f635[_0x24b117];return _0x3de906;}import{gt,valid}from'semver';import a114_0x30f0e3 from'chalk';import{getCacheDir}from'../core/config.js';const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_URL=a114_0x5aec22(0x148),TIMEOUT_MS=0x7d0;function getCacheFilePath(){const _0x35cdbd=a114_0x5aec22,_0x33f633=getCacheDir();return join(_0x33f633,_0x35cdbd(0x147));}function readCache(){const _0x5f44e3=a114_0x5aec22;try{const _0x16254f=getCacheFilePath(),_0x5543a6=readFileSync(_0x16254f,_0x5f44e3(0x13a));return JSON[_0x5f44e3(0x14b)](_0x5543a6);}catch{return null;}}function writeCache(_0x504cd1){const _0x237ab2=a114_0x5aec22;try{const _0x4ce180=getCacheDir();mkdirSync(_0x4ce180,{'recursive':!![]});const _0x247e37={'lastCheck':new Date()['toISOString'](),'latestVersion':_0x504cd1},_0x2e533d=getCacheFilePath();writeFileSync(_0x2e533d,JSON[_0x237ab2(0x144)](_0x247e37,null,0x2),'utf-8');}catch{}}function isCacheValid(_0x403cd2){const _0x3cb29a=a114_0x5aec22;if(!_0x403cd2)return![];const _0x204770=new Date(_0x403cd2['lastCheck'])[_0x3cb29a(0x130)](),_0x3ceaa3=Date[_0x3cb29a(0x141)]();return _0x3ceaa3-_0x204770<CACHE_DURATION_MS;}function fetchLatestVersion(){return new Promise((_0x328331,_0x5c3649)=>{const _0x2a9feb=a114_0x3de9,_0x291f0f=get(NPM_REGISTRY_URL,_0x599b59=>{const _0x23d232=a114_0x3de9;if(_0x599b59[_0x23d232(0x13e)]!==0xc8){clearTimeout(_0x1e91b8),_0x5c3649(new Error(_0x23d232(0x146)+_0x599b59[_0x23d232(0x13e)]));return;}let _0x4c9eaf='';_0x599b59['on'](_0x23d232(0x14a),_0x3a908f=>{_0x4c9eaf+=_0x3a908f;}),_0x599b59['on'](_0x23d232(0x12e),()=>{const _0x2dee0e=_0x23d232;clearTimeout(_0x1e91b8);try{const _0x3c0abd=JSON[_0x2dee0e(0x14b)](_0x4c9eaf);if(!valid(_0x3c0abd['version'])){_0x5c3649(new Error(_0x2dee0e(0x12d)));return;}_0x328331(_0x3c0abd['version']);}catch(_0x1b1f2e){_0x5c3649(_0x1b1f2e);}});})['on'](_0x2a9feb(0x12b),_0x1825ca=>{clearTimeout(_0x1e91b8),_0x5c3649(_0x1825ca);}),_0x1e91b8=setTimeout(()=>{_0x291f0f['destroy'](),_0x5c3649(new Error('Request\x20timeout'));},TIMEOUT_MS);});}export async function checkForUpdate(_0x1b5092){const _0x287340=a114_0x5aec22;try{const _0x42abbc=readCache();if(isCacheValid(_0x42abbc)){const _0x1b75ff=gt(_0x42abbc[_0x287340(0x145)],_0x1b5092);return{'updateAvailable':_0x1b75ff,'currentVersion':_0x1b5092,'latestVersion':_0x42abbc[_0x287340(0x145)]};}const _0x254365=await fetchLatestVersion();writeCache(_0x254365);const _0x42d293=gt(_0x254365,_0x1b5092);return{'updateAvailable':_0x42d293,'currentVersion':_0x1b5092,'latestVersion':_0x254365};}catch{return null;}}export function displayUpdateNotification(_0x3130a0){const _0x34d1cc=a114_0x5aec22;if(!_0x3130a0[_0x34d1cc(0x136)])return;const _0xf0dcbd=process['stderr']['isTTY']&&!process[_0x34d1cc(0x138)][_0x34d1cc(0x133)],_0x2c6aef=_0xf0dcbd?a114_0x30f0e3[_0x34d1cc(0x12c)]('→'):'→',_0x21dd24=_0xf0dcbd?a114_0x30f0e3[_0x34d1cc(0x139)](_0x3130a0[_0x34d1cc(0x14c)]):_0x3130a0['currentVersion'],_0x238890=_0xf0dcbd?a114_0x30f0e3['green'](_0x3130a0[_0x34d1cc(0x145)]):_0x3130a0[_0x34d1cc(0x145)],_0x811be0=_0xf0dcbd?a114_0x30f0e3[_0x34d1cc(0x140)](_0x34d1cc(0x13c)):_0x34d1cc(0x13c),_0x4d1567=_0xf0dcbd?'\x0a'+a114_0x30f0e3['yellow'](_0x34d1cc(0x143))+'\x20'+_0x21dd24+'\x20'+_0x2c6aef+'\x20'+_0x238890+'\x0a'+a114_0x30f0e3[_0x34d1cc(0x139)](_0x34d1cc(0x142))+'\x20'+_0x811be0+'\x0a':'\x0aUpdate\x20available:\x20'+_0x21dd24+'\x20'+_0x2c6aef+'\x20'+_0x238890+'\x0aRun:\x20'+_0x811be0+'\x0a';process[_0x34d1cc(0x137)][_0x34d1cc(0x149)](_0x4d1567);}function a114_0x27f6(){const _0x526eb0=['dim','utf-8','2460660WZORWW','npm\x20install\x20-g\x20@treasuredata/tdx@latest','4118850fXyJrl','statusCode','162qmKjUk','cyan','now','Run:','Update\x20available:','stringify','latestVersion','HTTP\x20','last_version_check','https://registry.npmjs.org/@treasuredata/tdx/latest','write','data','parse','currentVersion','4046040byJHLs','1XRpNjc','error','gray','Invalid\x20version\x20format','end','32mQQHtK','getTime','2321337JcmNYt','414890XoTtFZ','NO_COLOR','1427328yOElZA','1241998JYZIeB','updateAvailable','stderr','env'];a114_0x27f6=function(){return _0x526eb0;};return a114_0x27f6();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a115_0x12b934=a115_0x5b99;function a115_0x5b99(_0x175fe9,_0xbbb57a){_0x175fe9=_0x175fe9-0x177;const _0x205f41=a115_0x205f();let _0x5b992d=_0x205f41[_0x175fe9];return _0x5b992d;}(function(_0x5cb8b5,_0x15b046){const _0x3407d6=a115_0x5b99,_0x3f3193=_0x5cb8b5();while(!![]){try{const _0x185c8e=-parseInt(_0x3407d6(0x178))/0x1*(parseInt(_0x3407d6(0x17f))/0x2)+-parseInt(_0x3407d6(0x183))/0x3*(-parseInt(_0x3407d6(0x179))/0x4)+parseInt(_0x3407d6(0x17d))/0x5+-parseInt(_0x3407d6(0x182))/0x6+-parseInt(_0x3407d6(0x180))/0x7*(parseInt(_0x3407d6(0x17b))/0x8)+-parseInt(_0x3407d6(0x177))/0x9+parseInt(_0x3407d6(0x181))/0xa;if(_0x185c8e===_0x15b046)break;else _0x3f3193['push'](_0x3f3193['shift']());}catch(_0x26c69f){_0x3f3193['push'](_0x3f3193['shift']());}}}(a115_0x205f,0x1dbb0));export const WORKFLOW_FILE_EXTENSION=a115_0x12b934(0x17e);export function shouldIncludeInArchive(_0x16838e){const _0x3e5f40=a115_0x12b934;if(_0x16838e===_0x3e5f40(0x17a))return!![];if(_0x16838e[_0x3e5f40(0x17c)]('.'))return![];return!![];}function a115_0x205f(){const _0x5d93e7=['761415DzfPZf','.dig','42066FTZrxC','140zQbLAV','2479370czvBHc','742212rJuBJB','3copyaC','865773FCkzRJ','6sDpFDV','302692XsGAPx','.digdag','3208cXAyyg','startsWith'];a115_0x205f=function(){return _0x5d93e7;};return a115_0x205f();}
|