@treasuredata/tdx 0.3.5 → 0.4.1

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.
Files changed (113) hide show
  1. package/dist/build-info.json +2 -2
  2. package/dist/cli.js +1 -1
  3. package/dist/cli.js.map +1 -1
  4. package/dist/client/cdp-api-client.js +1 -1
  5. package/dist/client/http-client.d.ts +4 -0
  6. package/dist/client/http-client.d.ts.map +1 -1
  7. package/dist/client/http-client.js +1 -1
  8. package/dist/client/http-client.js.map +1 -1
  9. package/dist/client/llm-api-client.js +1 -1
  10. package/dist/client/rate-limiter.js +1 -1
  11. package/dist/client/td-api-client.js +1 -1
  12. package/dist/client/trino-api-client.js +1 -1
  13. package/dist/client/workflow-client.js +1 -1
  14. package/dist/commands/activations.js +1 -1
  15. package/dist/commands/api-command.js +1 -1
  16. package/dist/commands/auth-command.d.ts +9 -0
  17. package/dist/commands/auth-command.d.ts.map +1 -1
  18. package/dist/commands/auth-command.js +1 -1
  19. package/dist/commands/auth-command.js.map +1 -1
  20. package/dist/commands/chat-command.js +1 -1
  21. package/dist/commands/claude-command.js +1 -1
  22. package/dist/commands/command.d.ts +5 -0
  23. package/dist/commands/command.d.ts.map +1 -1
  24. package/dist/commands/command.js +1 -1
  25. package/dist/commands/command.js.map +1 -1
  26. package/dist/commands/context-command.js +1 -1
  27. package/dist/commands/databases.js +1 -1
  28. package/dist/commands/describe.js +1 -1
  29. package/dist/commands/job-command.js +1 -1
  30. package/dist/commands/llm-command.js +1 -1
  31. package/dist/commands/llm-proxy.js +1 -1
  32. package/dist/commands/parent-segment-command.js +1 -1
  33. package/dist/commands/profiles-command.js +1 -1
  34. package/dist/commands/query-command.js +1 -1
  35. package/dist/commands/segment-command.d.ts +9 -6
  36. package/dist/commands/segment-command.d.ts.map +1 -1
  37. package/dist/commands/segment-command.js +1 -1
  38. package/dist/commands/segment-command.js.map +1 -1
  39. package/dist/commands/segment-create-command.js +1 -1
  40. package/dist/commands/segment-fields-command.d.ts +3 -1
  41. package/dist/commands/segment-fields-command.d.ts.map +1 -1
  42. package/dist/commands/segment-fields-command.js +1 -1
  43. package/dist/commands/segment-fields-command.js.map +1 -1
  44. package/dist/commands/segment-pwd-command.js +1 -1
  45. package/dist/commands/segment-update-command.js +1 -1
  46. package/dist/commands/segment-use-command.js +1 -1
  47. package/dist/commands/segments.js +1 -1
  48. package/dist/commands/show.js +1 -1
  49. package/dist/commands/tables.js +1 -1
  50. package/dist/commands/use-command.js +1 -1
  51. package/dist/commands/workflow-command.js +1 -1
  52. package/dist/core/auth.js +1 -1
  53. package/dist/core/config.d.ts +25 -0
  54. package/dist/core/config.d.ts.map +1 -1
  55. package/dist/core/config.js +1 -1
  56. package/dist/core/config.js.map +1 -1
  57. package/dist/core/credential-cache.d.ts +35 -0
  58. package/dist/core/credential-cache.d.ts.map +1 -0
  59. package/dist/core/credential-cache.js +1 -0
  60. package/dist/core/credential-cache.js.map +1 -0
  61. package/dist/core/global-context.d.ts +19 -0
  62. package/dist/core/global-context.d.ts.map +1 -1
  63. package/dist/core/global-context.js +1 -1
  64. package/dist/core/global-context.js.map +1 -1
  65. package/dist/core/keychain.d.ts +38 -0
  66. package/dist/core/keychain.d.ts.map +1 -0
  67. package/dist/core/keychain.js +1 -0
  68. package/dist/core/keychain.js.map +1 -0
  69. package/dist/core/profile.js +1 -1
  70. package/dist/core/project-config.js +1 -1
  71. package/dist/core/session.js +1 -1
  72. package/dist/index.js +1 -1
  73. package/dist/proxy/anthropic-adapter.js +1 -1
  74. package/dist/proxy/server.js +1 -1
  75. package/dist/proxy/session-cache.js +1 -1
  76. package/dist/sdk/api.js +1 -1
  77. package/dist/sdk/errors.js +1 -1
  78. package/dist/sdk/index.js +1 -1
  79. package/dist/sdk/job.js +1 -1
  80. package/dist/sdk/llm.js +1 -1
  81. package/dist/sdk/query.js +1 -1
  82. package/dist/sdk/segment.js +1 -1
  83. package/dist/sdk/workflow.js +1 -1
  84. package/dist/types/endpoints.js +1 -1
  85. package/dist/types/index.js +1 -1
  86. package/dist/utils/agent-ref-parser.js +1 -1
  87. package/dist/utils/chat-cache.js +1 -1
  88. package/dist/utils/colors.js +1 -1
  89. package/dist/utils/command-output.d.ts.map +1 -1
  90. package/dist/utils/command-output.js +1 -1
  91. package/dist/utils/command-output.js.map +1 -1
  92. package/dist/utils/constants.js +1 -1
  93. package/dist/utils/file-permissions.js +1 -1
  94. package/dist/utils/format-detector.js +1 -1
  95. package/dist/utils/formatters.js +1 -1
  96. package/dist/utils/json-loader.js +1 -1
  97. package/dist/utils/model-aliases.js +1 -1
  98. package/dist/utils/option-validation.js +1 -1
  99. package/dist/utils/port.js +1 -1
  100. package/dist/utils/process.js +1 -1
  101. package/dist/utils/prompt.js +1 -1
  102. package/dist/utils/segment-path-parser.js +1 -1
  103. package/dist/utils/segment-ref-parser.js +1 -1
  104. package/dist/utils/spinner.js +1 -1
  105. package/dist/utils/sql-parser.js +1 -1
  106. package/dist/utils/sse-parser.js +1 -1
  107. package/dist/utils/string-utils.js +1 -1
  108. package/dist/utils/table-ref-parser.js +1 -1
  109. package/dist/utils/tdx-logger.js +1 -1
  110. package/dist/utils/tree-formatter.js +1 -1
  111. package/dist/utils/version-check.js +1 -1
  112. package/dist/utils/workflow-utils.js +1 -1
  113. package/package.json +3 -1
@@ -1 +1 @@
1
- function a83_0x1c26(){const _0x3966f5=['push','showTreeLines','showIcons','dim','population','\x20segment','32guvOhU','name','join','folderCount','181736qyidkv','type','folder','showMetadata','7662130MkraZf','map','\x20folder','🎯\x20','888652lRUCbt','4554627zUOzzM','icon','├──\x20','length','8fnlGrV','segmentCount','298755enCnla','localeCompare','1114017mWPsqo','(empty)','sort','children','\x20\x20\x20\x20','102PlPnqE','233005IJdAOj','📁\x20','metadata','indent'];a83_0x1c26=function(){return _0x3966f5;};return a83_0x1c26();}function a83_0x4dfb(_0x5677bf,_0x10e696){const _0x1c2698=a83_0x1c26();return a83_0x4dfb=function(_0x4dfbfa,_0x582c5a){_0x4dfbfa=_0x4dfbfa-0xe5;let _0xb2c8bf=_0x1c2698[_0x4dfbfa];return _0xb2c8bf;},a83_0x4dfb(_0x5677bf,_0x10e696);}(function(_0x28e452,_0x4549ad){const _0x119abc=a83_0x4dfb,_0x2bdc2a=_0x28e452();while(!![]){try{const _0x4018bb=parseInt(_0x119abc(0xeb))/0x1+-parseInt(_0x119abc(0x108))/0x2+parseInt(_0x119abc(0xf4))/0x3*(parseInt(_0x119abc(0xf0))/0x4)+-parseInt(_0x119abc(0xfa))/0x5*(parseInt(_0x119abc(0xf9))/0x6)+parseInt(_0x119abc(0xec))/0x7+parseInt(_0x119abc(0x104))/0x8*(-parseInt(_0x119abc(0xf2))/0x9)+-parseInt(_0x119abc(0xe7))/0xa;if(_0x4018bb===_0x4549ad)break;else _0x2bdc2a['push'](_0x2bdc2a['shift']());}catch(_0x4f81c3){_0x2bdc2a['push'](_0x2bdc2a['shift']());}}}(a83_0x1c26,0x7a0c9));import{formatRows}from'./formatters.js';import a83_0x3a1b4f from'chalk';const DEFAULT_OPTIONS={'showTreeLines':!![],'showIcons':!![],'showMetadata':!![],'indent':'\x20\x20'};export function formatTree(_0x44cde9,_0x2e9f1f={},_0x32455d=0x0,_0x61c44b=''){const _0x3fb930=a83_0x4dfb,_0x35a329={...DEFAULT_OPTIONS,..._0x2e9f1f},_0x590071=[],_0x31ca32=[..._0x44cde9][_0x3fb930(0xf6)]((_0x3c5b6a,_0x26b1a1)=>_0x3c5b6a[_0x3fb930(0x105)][_0x3fb930(0xf3)](_0x26b1a1[_0x3fb930(0x105)]));for(let _0x45a1c4=0x0;_0x45a1c4<_0x31ca32[_0x3fb930(0xef)];_0x45a1c4++){const _0x3c2f2e=_0x31ca32[_0x45a1c4],_0x544c64=_0x45a1c4===_0x31ca32['length']-0x1;let _0x288757='';_0x32455d>0x0&&(_0x288757+=_0x61c44b);_0x35a329['showTreeLines']&&_0x32455d>0x0&&(_0x288757+=a83_0x3a1b4f['dim'](_0x544c64?'└──\x20':_0x3fb930(0xee)));_0x35a329[_0x3fb930(0x100)]&&(_0x288757+=_0x3c2f2e['type']===_0x3fb930(0xe5)?_0x3fb930(0xfb):_0x3fb930(0xea));_0x288757+=_0x3c2f2e['name'];if(_0x35a329['showMetadata']){if(_0x3c2f2e[_0x3fb930(0x109)]===_0x3fb930(0xe5)){const _0x3da859=[];_0x3c2f2e['metadata']['segmentCount']&&_0x3da859['push'](_0x3c2f2e[_0x3fb930(0xfc)][_0x3fb930(0xf1)]+_0x3fb930(0x103)+(_0x3c2f2e['metadata']['segmentCount']!==0x1?'s':'')),_0x3c2f2e[_0x3fb930(0xfc)]['folderCount']&&_0x3da859[_0x3fb930(0xfe)](_0x3c2f2e['metadata'][_0x3fb930(0x107)]+_0x3fb930(0xe9)+(_0x3c2f2e[_0x3fb930(0xfc)][_0x3fb930(0x107)]!==0x1?'s':'')),_0x3da859[_0x3fb930(0xef)]>0x0&&(_0x288757+=a83_0x3a1b4f[_0x3fb930(0x101)]('\x20('+_0x3da859[_0x3fb930(0x106)](',\x20')+')'));}else _0x3c2f2e[_0x3fb930(0x109)]==='segment'&&_0x3c2f2e[_0x3fb930(0x102)]!==undefined&&(_0x288757+=a83_0x3a1b4f[_0x3fb930(0x101)]('\x20('+formatRows(_0x3c2f2e[_0x3fb930(0x102)])+')'));}_0x590071[_0x3fb930(0xfe)](_0x288757);if(_0x3c2f2e[_0x3fb930(0xf7)]&&_0x3c2f2e['children'][_0x3fb930(0xef)]>0x0){let _0x5401d7;if(_0x32455d===0x0)_0x5401d7='';else _0x35a329[_0x3fb930(0xff)]?_0x5401d7=_0x61c44b+(_0x544c64?_0x3fb930(0xf8):a83_0x3a1b4f['dim']('│')+'\x20\x20\x20'):_0x5401d7=_0x61c44b+_0x35a329[_0x3fb930(0xfd)];const _0x40b4cd=formatTree(_0x3c2f2e[_0x3fb930(0xf7)],_0x35a329,_0x32455d+0x1,_0x5401d7);_0x590071['push'](_0x40b4cd);}}return _0x590071['join']('\x0a');}export function formatFlatList(_0x31e845,_0x1f0fad,_0x2a60d8={}){const _0x39d941=a83_0x4dfb,_0x28a34d={...DEFAULT_OPTIONS,..._0x2a60d8},_0x5a4785=[];for(const _0x2d7e4c of _0x31e845){_0x5a4785[_0x39d941(0xfe)]({'name':_0x2d7e4c['name'],'icon':_0x28a34d[_0x39d941(0x100)]?'📁':'','metadata':undefined});}for(const _0x5a1cf0 of _0x1f0fad){const _0x2b1ac5=_0x28a34d[_0x39d941(0xe6)]&&_0x5a1cf0[_0x39d941(0x102)]!==undefined?a83_0x3a1b4f[_0x39d941(0x101)]('\x20('+formatRows(_0x5a1cf0[_0x39d941(0x102)])+')'):'';_0x5a4785[_0x39d941(0xfe)]({'name':_0x5a1cf0[_0x39d941(0x105)],'icon':_0x28a34d['showIcons']?'🎯':'','metadata':_0x2b1ac5});}_0x5a4785['sort']((_0x5ac615,_0x5d2175)=>_0x5ac615[_0x39d941(0x105)]['localeCompare'](_0x5d2175[_0x39d941(0x105)]));if(_0x5a4785['length']===0x0)return _0x39d941(0xf5);const _0x543aa6=_0x5a4785[_0x39d941(0xe8)](_0x33a674=>{const _0x46cd7a=_0x39d941,_0x496cac=_0x33a674[_0x46cd7a(0xed)]?_0x33a674[_0x46cd7a(0xed)]+'\x20':'',_0x3388dc=_0x33a674['metadata']||'';return''+_0x496cac+_0x33a674[_0x46cd7a(0x105)]+_0x3388dc;});return _0x543aa6[_0x39d941(0x106)]('\x0a');}
1
+ (function(_0x1a1565,_0x432bda){const _0x182371=a85_0x1764,_0x5c34f6=_0x1a1565();while(!![]){try{const _0x76f490=-parseInt(_0x182371(0x191))/0x1+parseInt(_0x182371(0x19a))/0x2*(parseInt(_0x182371(0x17a))/0x3)+-parseInt(_0x182371(0x195))/0x4+parseInt(_0x182371(0x188))/0x5+-parseInt(_0x182371(0x18a))/0x6*(parseInt(_0x182371(0x197))/0x7)+parseInt(_0x182371(0x18d))/0x8+parseInt(_0x182371(0x182))/0x9;if(_0x76f490===_0x432bda)break;else _0x5c34f6['push'](_0x5c34f6['shift']());}catch(_0x18c17f){_0x5c34f6['push'](_0x5c34f6['shift']());}}}(a85_0x55fd,0x99859));import{formatRows}from'./formatters.js';import a85_0x4d5f86 from'chalk';const DEFAULT_OPTIONS={'showTreeLines':!![],'showIcons':!![],'showMetadata':!![],'indent':'\x20\x20'};export function formatTree(_0x747616,_0xd39985={},_0x4c6894=0x0,_0x3942f9=''){const _0x29596b=a85_0x1764,_0x4121f4={...DEFAULT_OPTIONS,..._0xd39985},_0x5589ed=[],_0x19a052=[..._0x747616]['sort']((_0x2f4f9d,_0x10b761)=>_0x2f4f9d[_0x29596b(0x17e)][_0x29596b(0x183)](_0x10b761[_0x29596b(0x17e)]));for(let _0x52dc97=0x0;_0x52dc97<_0x19a052[_0x29596b(0x17f)];_0x52dc97++){const _0x489fcb=_0x19a052[_0x52dc97],_0x223aac=_0x52dc97===_0x19a052['length']-0x1;let _0x5eca16='';_0x4c6894>0x0&&(_0x5eca16+=_0x3942f9);_0x4121f4[_0x29596b(0x196)]&&_0x4c6894>0x0&&(_0x5eca16+=a85_0x4d5f86[_0x29596b(0x193)](_0x223aac?_0x29596b(0x17b):_0x29596b(0x187)));_0x4121f4[_0x29596b(0x190)]&&(_0x5eca16+=_0x489fcb['type']===_0x29596b(0x192)?'📁\x20':_0x29596b(0x198));_0x5eca16+=_0x489fcb[_0x29596b(0x17e)];if(_0x4121f4[_0x29596b(0x181)]){if(_0x489fcb[_0x29596b(0x18e)]===_0x29596b(0x192)){const _0x520eae=[];_0x489fcb[_0x29596b(0x189)][_0x29596b(0x186)]&&_0x520eae[_0x29596b(0x17d)](_0x489fcb[_0x29596b(0x189)][_0x29596b(0x186)]+_0x29596b(0x199)+(_0x489fcb[_0x29596b(0x189)][_0x29596b(0x186)]!==0x1?'s':'')),_0x489fcb['metadata'][_0x29596b(0x18b)]&&_0x520eae[_0x29596b(0x17d)](_0x489fcb[_0x29596b(0x189)][_0x29596b(0x18b)]+'\x20folder'+(_0x489fcb['metadata'][_0x29596b(0x18b)]!==0x1?'s':'')),_0x520eae[_0x29596b(0x17f)]>0x0&&(_0x5eca16+=a85_0x4d5f86['dim']('\x20('+_0x520eae[_0x29596b(0x18c)](',\x20')+')'));}else _0x489fcb[_0x29596b(0x18e)]===_0x29596b(0x18f)&&_0x489fcb['population']!==undefined&&(_0x5eca16+=a85_0x4d5f86['dim']('\x20('+formatRows(_0x489fcb[_0x29596b(0x17c)])+')'));}_0x5589ed[_0x29596b(0x17d)](_0x5eca16);if(_0x489fcb['children']&&_0x489fcb[_0x29596b(0x184)][_0x29596b(0x17f)]>0x0){let _0x476a2b;if(_0x4c6894===0x0)_0x476a2b='';else _0x4121f4['showTreeLines']?_0x476a2b=_0x3942f9+(_0x223aac?_0x29596b(0x185):a85_0x4d5f86[_0x29596b(0x193)]('│')+'\x20\x20\x20'):_0x476a2b=_0x3942f9+_0x4121f4[_0x29596b(0x180)];const _0x459424=formatTree(_0x489fcb[_0x29596b(0x184)],_0x4121f4,_0x4c6894+0x1,_0x476a2b);_0x5589ed[_0x29596b(0x17d)](_0x459424);}}return _0x5589ed[_0x29596b(0x18c)]('\x0a');}function a85_0x1764(_0xc2a6f4,_0x5adbd5){const _0x55fdb3=a85_0x55fd();return a85_0x1764=function(_0x1764e2,_0x5dda46){_0x1764e2=_0x1764e2-0x17a;let _0x1b633d=_0x55fdb3[_0x1764e2];return _0x1b633d;},a85_0x1764(_0xc2a6f4,_0x5adbd5);}export function formatFlatList(_0x2e24a1,_0x63dd31,_0x12074e={}){const _0x54454b=a85_0x1764,_0x4c5b4d={...DEFAULT_OPTIONS,..._0x12074e},_0x239f1c=[];for(const _0x20d12e of _0x2e24a1){_0x239f1c[_0x54454b(0x17d)]({'name':_0x20d12e[_0x54454b(0x17e)],'icon':_0x4c5b4d[_0x54454b(0x190)]?'📁':'','metadata':undefined});}for(const _0x3dd127 of _0x63dd31){const _0x476e4a=_0x4c5b4d[_0x54454b(0x181)]&&_0x3dd127['population']!==undefined?a85_0x4d5f86['dim']('\x20('+formatRows(_0x3dd127[_0x54454b(0x17c)])+')'):'';_0x239f1c[_0x54454b(0x17d)]({'name':_0x3dd127['name'],'icon':_0x4c5b4d['showIcons']?'🎯':'','metadata':_0x476e4a});}_0x239f1c['sort']((_0x13387f,_0x301250)=>_0x13387f[_0x54454b(0x17e)][_0x54454b(0x183)](_0x301250[_0x54454b(0x17e)]));if(_0x239f1c[_0x54454b(0x17f)]===0x0)return _0x54454b(0x194);const _0x6bb1c1=_0x239f1c['map'](_0x3b01b9=>{const _0x262b1f=_0x54454b,_0x55fed4=_0x3b01b9[_0x262b1f(0x19b)]?_0x3b01b9['icon']+'\x20':'',_0x4c222f=_0x3b01b9['metadata']||'';return''+_0x55fed4+_0x3b01b9[_0x262b1f(0x17e)]+_0x4c222f;});return _0x6bb1c1[_0x54454b(0x18c)]('\x0a');}function a85_0x55fd(){const _0x28e66d=['🎯\x20','\x20segment','30oTQINz','icon','136644BiimXi','└──\x20','population','push','name','length','indent','showMetadata','6085845AmrSQi','localeCompare','children','\x20\x20\x20\x20','segmentCount','├──\x20','444675UhxNfL','metadata','12GmiVoE','folderCount','join','9373584CbPBkg','type','segment','showIcons','630110LgPMDB','folder','dim','(empty)','4905620nospTT','showTreeLines','471513gNLUFY'];a85_0x55fd=function(){return _0x28e66d;};return a85_0x55fd();}
@@ -1 +1 @@
1
- function a84_0x4a32(_0x33c093,_0x4599a5){const _0x214f8c=a84_0x214f();return a84_0x4a32=function(_0x4a32fb,_0x5c172b){_0x4a32fb=_0x4a32fb-0x7c;let _0x4433e3=_0x214f8c[_0x4a32fb];return _0x4433e3;},a84_0x4a32(_0x33c093,_0x4599a5);}function a84_0x214f(){const _0x3e7aed=['dim','6cQBOzi','Run:','version','7842528YGfKOI','npm\x20install\x20-g\x20@treasuredata/tdx@latest','Invalid\x20version\x20format','parse','last_version_check','end','isTTY','https://registry.npmjs.org/@treasuredata/tdx/latest','HTTP\x20','green','174JFQzKR','4094870MxwgAx','error','yellow','toISOString','gray','stderr','\x0aUpdate\x20available:\x20','216jnAGcQ','lastCheck','cyan','env','data','currentVersion','NO_COLOR','Request\x20timeout','1908PYcgJH','165739tyLxNy','utf-8','5484265VrmJbR','\x0aRun:\x20','4289992sRDZgC','getTime','destroy','statusCode','Update\x20available:','1679166NNwqlA'];a84_0x214f=function(){return _0x3e7aed;};return a84_0x214f();}const a84_0x1dea99=a84_0x4a32;(function(_0x1b597f,_0x2d1b55){const _0x54ad52=a84_0x4a32,_0x4c27ae=_0x1b597f();while(!![]){try{const _0x3d4054=-parseInt(_0x54ad52(0x99))/0x1*(parseInt(_0x54ad52(0x89))/0x2)+parseInt(_0x54ad52(0xa3))/0x3+parseInt(_0x54ad52(0x9e))/0x4+-parseInt(_0x54ad52(0x9c))/0x5*(-parseInt(_0x54ad52(0x7c))/0x6)+-parseInt(_0x54ad52(0x9a))/0x7*(parseInt(_0x54ad52(0x91))/0x8)+-parseInt(_0x54ad52(0x7f))/0x9+-parseInt(_0x54ad52(0x8a))/0xa;if(_0x3d4054===_0x2d1b55)break;else _0x4c27ae['push'](_0x4c27ae['shift']());}catch(_0x1c8b29){_0x4c27ae['push'](_0x4c27ae['shift']());}}}(a84_0x214f,0x9cf67));import{get}from'https';import{readFileSync,writeFileSync,mkdirSync}from'fs';import{join}from'path';import{gt,valid}from'semver';import a84_0x3dfd05 from'chalk';import{getCacheDir}from'../core/config.js';const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_URL=a84_0x1dea99(0x86),TIMEOUT_MS=0x7d0;function getCacheFilePath(){const _0xdf25a5=a84_0x1dea99,_0x37be6c=getCacheDir();return join(_0x37be6c,_0xdf25a5(0x83));}function readCache(){const _0x3e2def=a84_0x1dea99;try{const _0x5c9a56=getCacheFilePath(),_0x413f62=readFileSync(_0x5c9a56,_0x3e2def(0x9b));return JSON[_0x3e2def(0x82)](_0x413f62);}catch{return null;}}function writeCache(_0x455c00){const _0x366a6c=a84_0x1dea99;try{const _0x7b94d2=getCacheDir();mkdirSync(_0x7b94d2,{'recursive':!![]});const _0x599ece={'lastCheck':new Date()[_0x366a6c(0x8d)](),'latestVersion':_0x455c00},_0x388052=getCacheFilePath();writeFileSync(_0x388052,JSON['stringify'](_0x599ece,null,0x2),'utf-8');}catch{}}function isCacheValid(_0x30e547){const _0x9105eb=a84_0x1dea99;if(!_0x30e547)return![];const _0x41f346=new Date(_0x30e547[_0x9105eb(0x92)])[_0x9105eb(0x9f)](),_0xe364f1=Date['now']();return _0xe364f1-_0x41f346<CACHE_DURATION_MS;}function fetchLatestVersion(){return new Promise((_0x371b8c,_0x44d421)=>{const _0x44d959=a84_0x4a32,_0x5cf979=get(NPM_REGISTRY_URL,_0xa9e73b=>{const _0x2eaab8=a84_0x4a32;if(_0xa9e73b[_0x2eaab8(0xa1)]!==0xc8){clearTimeout(_0x205945),_0x44d421(new Error(_0x2eaab8(0x87)+_0xa9e73b[_0x2eaab8(0xa1)]));return;}let _0xd817e9='';_0xa9e73b['on'](_0x2eaab8(0x95),_0x12f2c2=>{_0xd817e9+=_0x12f2c2;}),_0xa9e73b['on'](_0x2eaab8(0x84),()=>{const _0x4315b2=_0x2eaab8;clearTimeout(_0x205945);try{const _0x2a132f=JSON[_0x4315b2(0x82)](_0xd817e9);if(!valid(_0x2a132f[_0x4315b2(0x7e)])){_0x44d421(new Error(_0x4315b2(0x81)));return;}_0x371b8c(_0x2a132f[_0x4315b2(0x7e)]);}catch(_0xf9e7d5){_0x44d421(_0xf9e7d5);}});})['on'](_0x44d959(0x8b),_0x2a1352=>{clearTimeout(_0x205945),_0x44d421(_0x2a1352);}),_0x205945=setTimeout(()=>{const _0x31766d=_0x44d959;_0x5cf979[_0x31766d(0xa0)](),_0x44d421(new Error(_0x31766d(0x98)));},TIMEOUT_MS);});}export async function checkForUpdate(_0x315a24){try{const _0x2e9825=readCache();if(isCacheValid(_0x2e9825)){const _0x3f5a91=gt(_0x2e9825['latestVersion'],_0x315a24);return{'updateAvailable':_0x3f5a91,'currentVersion':_0x315a24,'latestVersion':_0x2e9825['latestVersion']};}const _0x501bfa=await fetchLatestVersion();writeCache(_0x501bfa);const _0x22f570=gt(_0x501bfa,_0x315a24);return{'updateAvailable':_0x22f570,'currentVersion':_0x315a24,'latestVersion':_0x501bfa};}catch{return null;}}export function displayUpdateNotification(_0x13db70){const _0x382f08=a84_0x1dea99;if(!_0x13db70['updateAvailable'])return;const _0x5cad7c=process[_0x382f08(0x8f)][_0x382f08(0x85)]&&!process[_0x382f08(0x94)][_0x382f08(0x97)],_0x41c9e1=_0x5cad7c?a84_0x3dfd05[_0x382f08(0x8e)]('→'):'→',_0x483cfa=_0x5cad7c?a84_0x3dfd05[_0x382f08(0xa4)](_0x13db70['currentVersion']):_0x13db70[_0x382f08(0x96)],_0x37b147=_0x5cad7c?a84_0x3dfd05[_0x382f08(0x88)](_0x13db70['latestVersion']):_0x13db70['latestVersion'],_0x2323dc=_0x5cad7c?a84_0x3dfd05[_0x382f08(0x93)](_0x382f08(0x80)):_0x382f08(0x80),_0x39929d=_0x5cad7c?'\x0a'+a84_0x3dfd05[_0x382f08(0x8c)](_0x382f08(0xa2))+'\x20'+_0x483cfa+'\x20'+_0x41c9e1+'\x20'+_0x37b147+'\x0a'+a84_0x3dfd05['dim'](_0x382f08(0x7d))+'\x20'+_0x2323dc+'\x0a':_0x382f08(0x90)+_0x483cfa+'\x20'+_0x41c9e1+'\x20'+_0x37b147+_0x382f08(0x9d)+_0x2323dc+'\x0a';process[_0x382f08(0x8f)]['write'](_0x39929d);}
1
+ (function(_0x2bb175,_0x5bf314){const _0x133386=a86_0x54a3,_0x5000ed=_0x2bb175();while(!![]){try{const _0x24384e=-parseInt(_0x133386(0xf3))/0x1+parseInt(_0x133386(0x108))/0x2+-parseInt(_0x133386(0x106))/0x3+parseInt(_0x133386(0x100))/0x4+-parseInt(_0x133386(0x104))/0x5+parseInt(_0x133386(0xec))/0x6*(-parseInt(_0x133386(0xf8))/0x7)+parseInt(_0x133386(0xfc))/0x8*(parseInt(_0x133386(0xf2))/0x9);if(_0x24384e===_0x5bf314)break;else _0x5000ed['push'](_0x5000ed['shift']());}catch(_0x1a3874){_0x5000ed['push'](_0x5000ed['shift']());}}}(a86_0x12bb,0x57aab));import{get}from'https';function a86_0x54a3(_0x28efa0,_0x23e1f1){const _0x12bb5=a86_0x12bb();return a86_0x54a3=function(_0x54a3ed,_0x2c43e7){_0x54a3ed=_0x54a3ed-0xe6;let _0x4236d6=_0x12bb5[_0x54a3ed];return _0x4236d6;},a86_0x54a3(_0x28efa0,_0x23e1f1);}import{readFileSync,writeFileSync,mkdirSync}from'fs';import{join}from'path';import{gt,valid}from'semver';import a86_0x194a1d from'chalk';import{getCacheDir}from'../core/config.js';const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_URL='https://registry.npmjs.org/@treasuredata/tdx/latest',TIMEOUT_MS=0x7d0;function getCacheFilePath(){const _0x535974=a86_0x54a3,_0x5d7ca7=getCacheDir();return join(_0x5d7ca7,_0x535974(0x107));}function readCache(){const _0x35f155=a86_0x54a3;try{const _0x5b3fd8=getCacheFilePath(),_0x43df9b=readFileSync(_0x5b3fd8,_0x35f155(0xeb));return JSON[_0x35f155(0xf6)](_0x43df9b);}catch{return null;}}function writeCache(_0x18dc60){const _0x22d807=a86_0x54a3;try{const _0x3ff9a4=getCacheDir();mkdirSync(_0x3ff9a4,{'recursive':!![]});const _0x27c88e={'lastCheck':new Date()[_0x22d807(0xe8)](),'latestVersion':_0x18dc60},_0x7d277=getCacheFilePath();writeFileSync(_0x7d277,JSON[_0x22d807(0xe9)](_0x27c88e,null,0x2),_0x22d807(0xeb));}catch{}}function isCacheValid(_0x4a645a){const _0x6741f8=a86_0x54a3;if(!_0x4a645a)return![];const _0x330315=new Date(_0x4a645a[_0x6741f8(0xf7)])['getTime'](),_0x5855d7=Date[_0x6741f8(0xf0)]();return _0x5855d7-_0x330315<CACHE_DURATION_MS;}function fetchLatestVersion(){return new Promise((_0x91f72c,_0x4b047f)=>{const _0x4874d2=a86_0x54a3,_0x56ec16=get(NPM_REGISTRY_URL,_0x21ad02=>{const _0x5df245=a86_0x54a3;if(_0x21ad02['statusCode']!==0xc8){clearTimeout(_0x1135a6),_0x4b047f(new Error('HTTP\x20'+_0x21ad02[_0x5df245(0x101)]));return;}let _0x83b812='';_0x21ad02['on']('data',_0x2886b1=>{_0x83b812+=_0x2886b1;}),_0x21ad02['on'](_0x5df245(0xfb),()=>{const _0x17e45c=_0x5df245;clearTimeout(_0x1135a6);try{const _0x394293=JSON[_0x17e45c(0xf6)](_0x83b812);if(!valid(_0x394293['version'])){_0x4b047f(new Error(_0x17e45c(0xfa)));return;}_0x91f72c(_0x394293['version']);}catch(_0x27975e){_0x4b047f(_0x27975e);}});})['on'](_0x4874d2(0xf4),_0x40c920=>{clearTimeout(_0x1135a6),_0x4b047f(_0x40c920);}),_0x1135a6=setTimeout(()=>{const _0x28192c=_0x4874d2;_0x56ec16[_0x28192c(0xfd)](),_0x4b047f(new Error(_0x28192c(0xf9)));},TIMEOUT_MS);});}export async function checkForUpdate(_0xfd1b80){const _0x1a478e=a86_0x54a3;try{const _0xc7e262=readCache();if(isCacheValid(_0xc7e262)){const _0x551ad7=gt(_0xc7e262[_0x1a478e(0x102)],_0xfd1b80);return{'updateAvailable':_0x551ad7,'currentVersion':_0xfd1b80,'latestVersion':_0xc7e262[_0x1a478e(0x102)]};}const _0x3dfd12=await fetchLatestVersion();writeCache(_0x3dfd12);const _0x26f187=gt(_0x3dfd12,_0xfd1b80);return{'updateAvailable':_0x26f187,'currentVersion':_0xfd1b80,'latestVersion':_0x3dfd12};}catch{return null;}}function a86_0x12bb(){const _0xe50597=['Request\x20timeout','Invalid\x20version\x20format','end','4152vtBScR','destroy','isTTY','Run:','575640oNwwav','statusCode','latestVersion','currentVersion','2976285pluNXu','Update\x20available:','1480983WGYORC','last_version_check','440954Ylpdfk','stderr','yellow','\x0aRun:\x20','toISOString','stringify','npm\x20install\x20-g\x20@treasuredata/tdx@latest','utf-8','12mxpnQM','\x0aUpdate\x20available:\x20','dim','env','now','updateAvailable','34011WMYGcn','291073jexjbc','error','cyan','parse','lastCheck','2053149kPsPDq'];a86_0x12bb=function(){return _0xe50597;};return a86_0x12bb();}export function displayUpdateNotification(_0x3e641e){const _0x289f8a=a86_0x54a3;if(!_0x3e641e[_0x289f8a(0xf1)])return;const _0x2a832f=process['stderr'][_0x289f8a(0xfe)]&&!process[_0x289f8a(0xef)]['NO_COLOR'],_0x1a4554=_0x2a832f?a86_0x194a1d['gray']('→'):'→',_0xb6cdb0=_0x2a832f?a86_0x194a1d[_0x289f8a(0xee)](_0x3e641e[_0x289f8a(0x103)]):_0x3e641e[_0x289f8a(0x103)],_0x41e30a=_0x2a832f?a86_0x194a1d['green'](_0x3e641e[_0x289f8a(0x102)]):_0x3e641e['latestVersion'],_0x2a3cfa=_0x2a832f?a86_0x194a1d[_0x289f8a(0xf5)]('npm\x20install\x20-g\x20@treasuredata/tdx@latest'):_0x289f8a(0xea),_0x369d84=_0x2a832f?'\x0a'+a86_0x194a1d[_0x289f8a(0xe6)](_0x289f8a(0x105))+'\x20'+_0xb6cdb0+'\x20'+_0x1a4554+'\x20'+_0x41e30a+'\x0a'+a86_0x194a1d[_0x289f8a(0xee)](_0x289f8a(0xff))+'\x20'+_0x2a3cfa+'\x0a':_0x289f8a(0xed)+_0xb6cdb0+'\x20'+_0x1a4554+'\x20'+_0x41e30a+_0x289f8a(0xe7)+_0x2a3cfa+'\x0a';process[_0x289f8a(0x109)]['write'](_0x369d84);}
@@ -1 +1 @@
1
- function a85_0x2891(){const _0x52e102=['1858374aYEOLw','5533350ZTgQhV','3976959vNylDw','startsWith','464777phnGbT','4vAgYUY','20BVZeap','8ZuvVOB','19692TIkRIb','.digdag','7193456bCCZKo','8908821agBKdL'];a85_0x2891=function(){return _0x52e102;};return a85_0x2891();}(function(_0x302033,_0x13cb30){const _0x3c5001=a85_0x47bf,_0x1980e4=_0x302033();while(!![]){try{const _0x27d358=parseInt(_0x3c5001(0x117))/0x1*(-parseInt(_0x3c5001(0x10e))/0x2)+-parseInt(_0x3c5001(0x115))/0x3*(-parseInt(_0x3c5001(0x10c))/0x4)+-parseInt(_0x3c5001(0x114))/0x5+-parseInt(_0x3c5001(0x10f))/0x6+-parseInt(_0x3c5001(0x113))/0x7+parseInt(_0x3c5001(0x111))/0x8+-parseInt(_0x3c5001(0x112))/0x9*(-parseInt(_0x3c5001(0x10d))/0xa);if(_0x27d358===_0x13cb30)break;else _0x1980e4['push'](_0x1980e4['shift']());}catch(_0x344b77){_0x1980e4['push'](_0x1980e4['shift']());}}}(a85_0x2891,0xecd2f));export const WORKFLOW_FILE_EXTENSION='.dig';function a85_0x47bf(_0x357cf4,_0x1b8401){const _0x2891cb=a85_0x2891();return a85_0x47bf=function(_0x47bfce,_0x27637f){_0x47bfce=_0x47bfce-0x10c;let _0x4d1d05=_0x2891cb[_0x47bfce];return _0x4d1d05;},a85_0x47bf(_0x357cf4,_0x1b8401);}export function shouldIncludeInArchive(_0x34f96c){const _0x2f7b22=a85_0x47bf;if(_0x34f96c===_0x2f7b22(0x110))return!![];if(_0x34f96c[_0x2f7b22(0x116)]('.'))return![];return!![];}
1
+ const a87_0x571943=a87_0x35b3;(function(_0x18a09c,_0x1537e8){const _0x5ead0d=a87_0x35b3,_0x5b017a=_0x18a09c();while(!![]){try{const _0x6c2fe2=-parseInt(_0x5ead0d(0xca))/0x1*(-parseInt(_0x5ead0d(0xd1))/0x2)+parseInt(_0x5ead0d(0xd5))/0x3*(parseInt(_0x5ead0d(0xcf))/0x4)+-parseInt(_0x5ead0d(0xd2))/0x5*(-parseInt(_0x5ead0d(0xd3))/0x6)+-parseInt(_0x5ead0d(0xcb))/0x7+parseInt(_0x5ead0d(0xd4))/0x8+parseInt(_0x5ead0d(0xcc))/0x9+parseInt(_0x5ead0d(0xd0))/0xa*(-parseInt(_0x5ead0d(0xce))/0xb);if(_0x6c2fe2===_0x1537e8)break;else _0x5b017a['push'](_0x5b017a['shift']());}catch(_0x4905b3){_0x5b017a['push'](_0x5b017a['shift']());}}}(a87_0x3ad9,0x6a3fa));export const WORKFLOW_FILE_EXTENSION=a87_0x571943(0xcd);function a87_0x3ad9(){const _0x218f61=['2644468DFTEpe','100570pZDlaC','2QJcWhK','655qLtcjU','10986BBpBwa','1391520EEwrph','3WDJZrm','.digdag','409177qemtIT','3298806KMVzwx','7744572fNVwub','.dig','1573MlSsQv'];a87_0x3ad9=function(){return _0x218f61;};return a87_0x3ad9();}function a87_0x35b3(_0x9cb664,_0x54ae73){const _0x3ad973=a87_0x3ad9();return a87_0x35b3=function(_0x35b3de,_0x12266d){_0x35b3de=_0x35b3de-0xc9;let _0x313398=_0x3ad973[_0x35b3de];return _0x313398;},a87_0x35b3(_0x9cb664,_0x54ae73);}export function shouldIncludeInArchive(_0x3e9973){const _0x405d5c=a87_0x571943;if(_0x3e9973===_0x405d5c(0xc9))return!![];if(_0x3e9973['startsWith']('.'))return![];return!![];}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@treasuredata/tdx",
3
- "version": "0.3.5",
3
+ "version": "0.4.1",
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": {
@@ -29,6 +29,7 @@
29
29
  "scripts": {
30
30
  "build:info": "bash scripts/generate-build-info.sh",
31
31
  "build:ts": "tsc && chmod +x dist/cli.js && cp src/build-info.json dist/build-info.json",
32
+ "build:install": "npm run build:ts && npm install -g",
32
33
  "build:obfuscate": "javascript-obfuscator ./dist --output ./dist",
33
34
  "build": "npm run build:info && npm run build:ts && npm run build:obfuscate",
34
35
  "prepublishOnly": "npm run build",
@@ -67,6 +68,7 @@
67
68
  "dependencies": {
68
69
  "@fastify/cors": "^11.1.0",
69
70
  "@types/json-bigint": "^1.0.4",
71
+ "@zowe/secrets-for-zowe-sdk": "^8.29.4",
70
72
  "chalk": "^5.3.0",
71
73
  "cli-table3": "^0.6.5",
72
74
  "commander": "^14.0.2",