@treasuredata/tdx 0.25.7 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/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/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.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/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.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/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.d.ts +7 -0
- package/dist/sdk/client/cdp-api-client.d.ts.map +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/cdp-api-client.js.map +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js.map +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.d.ts +19 -0
- package/dist/sdk/segment/journey-validator.d.ts.map +1 -0
- package/dist/sdk/segment/journey-validator.js +1 -0
- package/dist/sdk/segment/journey-validator.js.map +1 -0
- package/dist/sdk/segment/journey-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/journey-yaml.js.map +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.d.ts +42 -0
- package/dist/sdk/segment/push-recovery.d.ts.map +1 -0
- package/dist/sdk/segment/push-recovery.js +1 -0
- package/dist/sdk/segment/push-recovery.js.map +1 -0
- package/dist/sdk/segment/push-workflow.d.ts +18 -12
- package/dist/sdk/segment/push-workflow.d.ts.map +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/push-workflow.js.map +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/segment-def.d.ts +2 -0
- package/dist/sdk/segment/types/segment-def.d.ts.map +1 -1
- package/dist/sdk/segment/validate-files.d.ts.map +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/validate-files.js.map +1 -1
- package/dist/sdk/segment/yaml-validator.d.ts +7 -7
- package/dist/sdk/segment/yaml-validator.d.ts.map +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment/yaml-validator.js.map +1 -1
- package/dist/sdk/segment.d.ts +5 -0
- package/dist/sdk/segment.d.ts.map +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/segment.js.map +1 -1
- package/dist/sdk/types/cdp.d.ts +117 -0
- package/dist/sdk/types/cdp.d.ts.map +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/port.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1e0397,_0x5c57b3){const _0x2059bc=a178_0x320a,_0xaaae70=_0x1e0397();while(!![]){try{const _0x4a59bd=parseInt(_0x2059bc(0x71))/0x1*(parseInt(_0x2059bc(0x74))/0x2)+-parseInt(_0x2059bc(0x6b))/0x3*(parseInt(_0x2059bc(0x72))/0x4)+-parseInt(_0x2059bc(0x73))/0x5+parseInt(_0x2059bc(0x76))/0x6*(parseInt(_0x2059bc(0x67))/0x7)+-parseInt(_0x2059bc(0x7a))/0x8*(-parseInt(_0x2059bc(0x79))/0x9)+-parseInt(_0x2059bc(0x75))/0xa+parseInt(_0x2059bc(0x6a))/0xb*(parseInt(_0x2059bc(0x7c))/0xc);if(_0x4a59bd===_0x5c57b3)break;else _0xaaae70['push'](_0xaaae70['shift']());}catch(_0x4bc243){_0xaaae70['push'](_0xaaae70['shift']());}}}(a178_0x31ac,0xa9d19));import a178_0xb05826 from'string-width';function a178_0x31ac(){const _0x5d9034=['toString','replace','71337XhSceN','padStart','slice','2550053LhyUuO','49641iNTAEi','Cannot\x20escape\x20empty\x20string\x20literal','length','Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string','trim','test','1352701RiDjad','84rPWXMc','6942545OMSJbm','2dQWCQv','7559140OflaFd','618snwfZN','random','repeat','9pywPwu','2571736QssVjC','unknown','24eYcWjk','toLowerCase'];a178_0x31ac=function(){return _0x5d9034;};return a178_0x31ac();}export function stringWidth(_0x4f4797){return a178_0xb05826(_0x4f4797);}export function padEnd(_0x52edce,_0x14f738){const _0x3757eb=stringWidth(_0x52edce);if(_0x3757eb>=_0x14f738)return _0x52edce;return _0x52edce+'\x20'['repeat'](_0x14f738-_0x3757eb);}export function padStart(_0x4b233e,_0x38b8da){const _0x2da53f=a178_0x320a,_0x3df445=stringWidth(_0x4b233e);if(_0x3df445>=_0x38b8da)return _0x4b233e;return'\x20'[_0x2da53f(0x78)](_0x38b8da-_0x3df445)+_0x4b233e;}export function centerAlign(_0x9df03c,_0x2d7780){const _0x5a4af6=a178_0x320a,_0x1a5f2a=stringWidth(_0x9df03c);if(_0x1a5f2a>_0x2d7780){if(_0x2d7780<=0x1)return'…'['substring'](0x0,_0x2d7780);let _0x145be0=_0x9df03c;while(stringWidth(_0x145be0+'…')>_0x2d7780){_0x145be0=_0x145be0[_0x5a4af6(0x69)](0x0,-0x1);}return _0x145be0+'…';}if(_0x1a5f2a===_0x2d7780)return _0x9df03c;const _0xebe295=_0x2d7780-_0x1a5f2a,_0x27227a=Math['floor'](_0xebe295/0x2),_0x134e3d=_0xebe295-_0x27227a;return'\x20'['repeat'](_0x27227a)+_0x9df03c+'\x20'['repeat'](_0x134e3d);}export function escapeStringLiteral(_0x1e2356){const _0x156dc0=a178_0x320a;if(!_0x1e2356||_0x1e2356['trim']()[_0x156dc0(0x6d)]===0x0)throw new Error(_0x156dc0(0x6c));const _0x5ec6d3=_0x1e2356[_0x156dc0(0x66)](/'/g,'\x27\x27');return'\x27'+_0x5ec6d3+'\x27';}export function globToLike(_0x562e1f){const _0x3fce31=a178_0x320a;let _0x18b503=_0x562e1f[_0x3fce31(0x66)](/\\/g,'\x5c\x5c')[_0x3fce31(0x66)](/%/g,'\x5c%')['replace'](/_/g,'\x5c_');return _0x18b503=_0x18b503[_0x3fce31(0x66)](/\*/g,'%')['replace'](/\?/g,'_'),_0x18b503;}export function buildLikePattern(_0x1eabe0){const _0x1dd5d1=a178_0x320a;if(!_0x1eabe0||_0x1eabe0[_0x1dd5d1(0x6f)]()['length']===0x0)throw new Error(_0x1dd5d1(0x6e));const _0x3a1c44=globToLike(_0x1eabe0),_0x16c600=_0x3a1c44[_0x1dd5d1(0x66)](/'/g,'\x27\x27');return'\x27'+_0x16c600+'\x27';}export function matchGlobPattern(_0x6f6533,_0x19a0d2){const _0x186a82=a178_0x320a,_0x4b4e76=_0x19a0d2[_0x186a82(0x66)](/[.+^${}()|[\]\\]/g,'\x5c$&')['replace'](/\*/g,'.*')[_0x186a82(0x66)](/\?/g,'.'),_0x1550c0=new RegExp('^'+_0x4b4e76+'$');return _0x1550c0[_0x186a82(0x70)](_0x6f6533);}function a178_0x320a(_0x1469f7,_0x55537a){_0x1469f7=_0x1469f7-0x65;const _0x31ac19=a178_0x31ac();let _0x320a27=_0x31ac19[_0x1469f7];return _0x320a27;}export function getSanitizedUsername(){const _0x47af12=a178_0x320a,_0x2ddf65=process.env.USER||process.env.USERNAME||_0x47af12(0x7b);return _0x2ddf65['replace'](/[^a-zA-Z0-9]/g,'')['toLowerCase']();}export function generateRandomHex(){const _0x340d94=a178_0x320a,_0x3a9de4=Math['floor'](Math[_0x340d94(0x77)]()*0xfffff);return _0x3a9de4[_0x340d94(0x65)](0x10)[_0x340d94(0x68)](0x5,'0');}export function sanitizeFileName(_0x267f8f){const _0x5ca89f=a178_0x320a;return _0x267f8f[_0x5ca89f(0x7d)]()[_0x5ca89f(0x66)](/[/\\:*?"<>|]/g,'-')[_0x5ca89f(0x66)](/\s+/g,'-')[_0x5ca89f(0x66)](/-+/g,'-')[_0x5ca89f(0x66)](/^-|-$/g,'');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x31c5b6,_0x32c784){const _0x54cbf7=a179_0x2b1e,_0x1771a9=_0x31c5b6();while(!![]){try{const _0x72f9af=-parseInt(_0x54cbf7(0x203))/0x1+parseInt(_0x54cbf7(0x201))/0x2+parseInt(_0x54cbf7(0x20a))/0x3+-parseInt(_0x54cbf7(0x1f7))/0x4+parseInt(_0x54cbf7(0x1f8))/0x5+parseInt(_0x54cbf7(0x204))/0x6+-parseInt(_0x54cbf7(0x1f4))/0x7;if(_0x72f9af===_0x32c784)break;else _0x1771a9['push'](_0x1771a9['shift']());}catch(_0x526230){_0x1771a9['push'](_0x1771a9['shift']());}}}(a179_0x49a0,0x67dae));function hasWildcard(_0x27d571){const _0x43efdd=a179_0x2b1e;return _0x27d571[_0x43efdd(0x1f6)]('*')||_0x27d571[_0x43efdd(0x1f6)]('?');}function a179_0x2b1e(_0x114165,_0x27b328){_0x114165=_0x114165-0x1f4;const _0x49a033=a179_0x49a0();let _0x2b1e7b=_0x49a033[_0x114165];return _0x2b1e7b;}export function parseTableReference(_0x1b041b){const _0x35bcc8=a179_0x2b1e;if(!_0x1b041b||_0x1b041b[_0x35bcc8(0x207)]()[_0x35bcc8(0x208)]===0x0)throw new Error(_0x35bcc8(0x1f9));const _0x20a825=_0x1b041b['trim'](),_0x4d5bde={'original':_0x20a825},_0x13669f=_0x20a825[_0x35bcc8(0x1ff)]('.');if(_0x13669f[_0x35bcc8(0x208)]===0x1){const _0x51b326=_0x13669f[0x0];if(!_0x51b326)throw new Error(_0x35bcc8(0x1fa));_0x4d5bde['table']=_0x51b326;}else{if(_0x13669f[_0x35bcc8(0x208)]===0x2){const [_0x5e058a,_0x244d13]=_0x13669f;if(!_0x5e058a)throw new Error(_0x35bcc8(0x1fb));if(!_0x244d13)throw new Error(_0x35bcc8(0x206));_0x4d5bde[_0x35bcc8(0x205)]=_0x5e058a,_0x4d5bde[_0x35bcc8(0x1fc)]=_0x244d13;}else{if(_0x13669f[_0x35bcc8(0x208)]===0x3){const [_0x3cca58,_0x426ab5,_0xa44c94]=_0x13669f;if(!_0x3cca58||!_0x426ab5||!_0xa44c94)throw new Error('Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty');_0x4d5bde[_0x35bcc8(0x202)]=_0x3cca58,_0x4d5bde[_0x35bcc8(0x205)]=_0x426ab5,_0x4d5bde[_0x35bcc8(0x1fc)]=_0xa44c94;}else throw new Error(_0x35bcc8(0x200));}}return _0x4d5bde;}export function formatTableReference(_0x17451a){const _0x338c8d=a179_0x2b1e,_0x1bf1bf=[];return _0x17451a['catalog']&&_0x1bf1bf[_0x338c8d(0x20b)](_0x17451a[_0x338c8d(0x202)]),_0x17451a[_0x338c8d(0x205)]&&_0x1bf1bf['push'](_0x17451a[_0x338c8d(0x205)]),_0x17451a['table']&&_0x1bf1bf['push'](_0x17451a['table']),_0x1bf1bf[_0x338c8d(0x209)]('.');}function a179_0x49a0(){const _0x15703d=['Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)','table','Table\x20name\x20is\x20required\x20for\x20describe\x20operation','Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation','split','Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)','364134dhRGvR','catalog','501656CzjABN','3313122tjBYyw','database','Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)','trim','length','join','2083254LTuDZu','push','6335819VDngnc','Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation','includes','799004AaNjlB','3016210EKEZcf','Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only','Pattern\x20cannot\x20be\x20just\x20a\x20dot'];a179_0x49a0=function(){return _0x15703d;};return a179_0x49a0();}export function validateTableListReference(_0x439680){return undefined;}export function validateTableDescribeReference(_0x10990d){const _0x4c02b2=a179_0x2b1e;if(!_0x10990d[_0x4c02b2(0x1fc)])return _0x4c02b2(0x1fd);if(_0x10990d[_0x4c02b2(0x205)]&&hasWildcard(_0x10990d[_0x4c02b2(0x205)]))return _0x4c02b2(0x1fe);if(hasWildcard(_0x10990d[_0x4c02b2(0x1fc)]))return _0x4c02b2(0x1f5);return undefined;}
|
package/dist/utils/tdx-logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a180_0x5685b6=a180_0x38c5;function a180_0x3992(){const _0xd3f502=['getLogPath','2658lxKaVz','push','trace','8nrVjWc','addHandler','INFO','init','info','3718628mxGbtd','2285450ajieXd','19495SgFzZg','Session\x20ended','3jMbaaR','fileOnly','160456eIksTD','debug','logDir','logs','tdx','51858390WGtCNh','consoleHandler','warn','3736000ioDaMU','fileHandler','logFileName','close','error','logger','14611887ZXsYWW','logLevel','isInitialized'];a180_0x3992=function(){return _0xd3f502;};return a180_0x3992();}(function(_0x4c1810,_0x4aca49){const _0x5e3449=a180_0x38c5,_0x27a18f=_0x4c1810();while(!![]){try{const _0x147dd7=-parseInt(_0x5e3449(0xe8))/0x1+-parseInt(_0x5e3449(0x103))/0x2*(parseInt(_0x5e3449(0xe6))/0x3)+-parseInt(_0x5e3449(0x102))/0x4+parseInt(_0x5e3449(0xf0))/0x5+parseInt(_0x5e3449(0xfa))/0x6*(-parseInt(_0x5e3449(0x104))/0x7)+-parseInt(_0x5e3449(0xfd))/0x8*(parseInt(_0x5e3449(0xf6))/0x9)+parseInt(_0x5e3449(0xed))/0xa;if(_0x147dd7===_0x4aca49)break;else _0x27a18f['push'](_0x27a18f['shift']());}catch(_0x132fb3){_0x27a18f['push'](_0x27a18f['shift']());}}}(a180_0x3992,0xcdc97));import{join}from'path';import{Logger,LogLevel,FileHandler,ConsoleHandler,DefaultLogFormatter}from'./logger/index.js';import{getGlobalCacheDir}from'./global-cache.js';export{LogLevel}from'./logger/index.js';function a180_0x38c5(_0x409dad,_0x57d5c2){_0x409dad=_0x409dad-0xe6;const _0x399201=a180_0x3992();let _0x38c573=_0x399201[_0x409dad];return _0x38c573;}export class TDXLogger{[a180_0x5685b6(0xf7)];[a180_0x5685b6(0xe7)];[a180_0x5685b6(0xea)];['logFileName'];[a180_0x5685b6(0xf5)];[a180_0x5685b6(0xf1)]=null;[a180_0x5685b6(0xee)]=null;constructor(_0x297de9=LogLevel[a180_0x5685b6(0xff)],_0x5c9701=![],_0x345d5f,_0x5d55a9='tdx.log'){const _0x3b7534=a180_0x5685b6;this[_0x3b7534(0xf7)]=_0x297de9,this[_0x3b7534(0xe7)]=_0x5c9701,this['logDir']=_0x345d5f||join(getGlobalCacheDir(),_0x3b7534(0xeb)),this[_0x3b7534(0xf2)]=_0x5d55a9,this['logger']=Logger['of'](_0x3b7534(0xec));}async[a180_0x5685b6(0x100)](){const _0x253537=a180_0x5685b6,_0xd5acfe=join(this['logDir'],this[_0x253537(0xf2)]);if(Logger[_0x253537(0xf8)]()){!this[_0x253537(0xe7)]&&(this[_0x253537(0xee)]=new ConsoleHandler({'minLevel':LogLevel[_0x253537(0xff)],'colors':!![]}),Logger[_0x253537(0xfe)](this[_0x253537(0xee)]));return;}this['fileHandler']=new FileHandler({'filePath':_0xd5acfe});const _0x5a7a10=[this[_0x253537(0xf1)]];!this[_0x253537(0xe7)]&&(this[_0x253537(0xee)]=new ConsoleHandler({'minLevel':LogLevel[_0x253537(0xff)],'colors':!![]}),_0x5a7a10[_0x253537(0xfb)](this[_0x253537(0xee)])),await Logger['init']({'defaultLevel':this['logLevel'],'handlers':_0x5a7a10,'formatter':new DefaultLogFormatter({'colors':!![]})});}[a180_0x5685b6(0xe9)](..._0x1fce76){const _0x3695ca=a180_0x5685b6;this[_0x3695ca(0xf5)][_0x3695ca(0xe9)](..._0x1fce76);}[a180_0x5685b6(0xfc)](..._0x1b577e){const _0x40fd40=a180_0x5685b6;this[_0x40fd40(0xf5)][_0x40fd40(0xfc)](..._0x1b577e);}[a180_0x5685b6(0x101)](..._0xef43c5){const _0x40915d=a180_0x5685b6;this[_0x40915d(0xf5)]['info'](..._0xef43c5);}[a180_0x5685b6(0xef)](..._0x50b523){const _0x5135d1=a180_0x5685b6;this['logger'][_0x5135d1(0xef)](..._0x50b523);}['error'](..._0x205190){const _0x3fc8cc=a180_0x5685b6;this['logger'][_0x3fc8cc(0xf4)](..._0x205190);}async[a180_0x5685b6(0xf3)](){const _0x21dd55=a180_0x5685b6;this[_0x21dd55(0xf5)]['info'](_0x21dd55(0x105)),await Logger['shutdown']();}[a180_0x5685b6(0xf9)](){const _0x2d885f=a180_0x5685b6;return join(this[_0x2d885f(0xea)],this[_0x2d885f(0xf2)]);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a181_0x34c4e8=a181_0x155f;function a181_0x155f(_0x44bf85,_0x52d63b){_0x44bf85=_0x44bf85-0xe7;const _0x28934b=a181_0x2893();let _0x155f08=_0x28934b[_0x44bf85];return _0x155f08;}(function(_0xf264b4,_0x338f3e){const _0x153606=a181_0x155f,_0x4ef972=_0xf264b4();while(!![]){try{const _0x4edabe=parseInt(_0x153606(0x113))/0x1*(-parseInt(_0x153606(0x10b))/0x2)+parseInt(_0x153606(0x105))/0x3+-parseInt(_0x153606(0xee))/0x4*(parseInt(_0x153606(0x104))/0x5)+parseInt(_0x153606(0xe7))/0x6+parseInt(_0x153606(0xf2))/0x7*(parseInt(_0x153606(0xf0))/0x8)+-parseInt(_0x153606(0xf5))/0x9*(parseInt(_0x153606(0xf7))/0xa)+parseInt(_0x153606(0xfe))/0xb;if(_0x4edabe===_0x338f3e)break;else _0x4ef972['push'](_0x4ef972['shift']());}catch(_0x143b84){_0x4ef972['push'](_0x4ef972['shift']());}}}(a181_0x2893,0x9425b));import{get}from'https';import{gt,valid}from'semver';import a181_0x4cd40b from'chalk';import{createGlobalCache}from'./global-cache.js';const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_BASE=a181_0x34c4e8(0xe9),TIMEOUT_MS=0x7d0,stableVersionCache=createGlobalCache(a181_0x34c4e8(0x111),'utils/version-check'),nextVersionCache=createGlobalCache(a181_0x34c4e8(0xef),a181_0x34c4e8(0xfc));function a181_0x2893(){const _0x3c5938=['toISOString','stable','yellow','12glcLUd','last_version_check_next','13576JzZgWy','updateAvailable','3269nWpMob','latest','data','108FxInGf','Update\x20available:','499060yWeCKX','error','HTTP\x20','cyan','currentVersion','utils/version-check-next','\x0aUpdate\x20available:\x20','8067796chkQsv','channel','end','npm\x20install\x20-g\x20@treasuredata/tdx@','version','now','1256840cYPkUK','1002807VmDmop','latestVersion','dim','lastCheck','parse','green','3164LOIyPB','next','\x0aRun:\x20','write','stderr','Run:','last_version_check','read','581iERPfa','getTime','Invalid\x20version\x20format','6112350hiyjdB','gray','https://registry.npmjs.org/@treasuredata/tdx','statusCode'];a181_0x2893=function(){return _0x3c5938;};return a181_0x2893();}function getCacheForChannel(_0x4690b3){const _0x2588ce=a181_0x34c4e8;return _0x4690b3===_0x2588ce(0x10c)?nextVersionCache:stableVersionCache;}function readCache(_0x33f902){const _0xe4c26=a181_0x34c4e8;return getCacheForChannel(_0x33f902)[_0xe4c26(0x112)]()??null;}function writeCache(_0x639575,_0x174d03){const _0x2c2e71=a181_0x34c4e8;try{getCacheForChannel(_0x174d03)['write']({'lastCheck':new Date()[_0x2c2e71(0xeb)](),'latestVersion':_0x639575});}catch{}}function isCacheValid(_0x2d9b18){const _0x55f639=a181_0x34c4e8;if(!_0x2d9b18)return![];const _0x3d825c=new Date(_0x2d9b18[_0x55f639(0x108)])[_0x55f639(0x114)](),_0x1276e5=Date[_0x55f639(0x103)]();return _0x1276e5-_0x3d825c<CACHE_DURATION_MS;}function fetchLatestVersion(_0x66c600='stable'){const _0x26431f=a181_0x34c4e8,_0x4eb34d=_0x66c600==='next'?_0x26431f(0x10c):'latest',_0x2576aa=NPM_REGISTRY_BASE+'/'+_0x4eb34d;return new Promise((_0xf22f7c,_0x340ef0)=>{const _0x5a0fe2=_0x26431f,_0x304854=get(_0x2576aa,_0x18fe83=>{const _0x415ad5=a181_0x155f;if(_0x18fe83['statusCode']!==0xc8){clearTimeout(_0x1cd18c),_0x340ef0(new Error(_0x415ad5(0xf9)+_0x18fe83[_0x415ad5(0xea)]));return;}let _0x255110='';_0x18fe83['on'](_0x415ad5(0xf4),_0x28c379=>{_0x255110+=_0x28c379;}),_0x18fe83['on'](_0x415ad5(0x100),()=>{const _0x267155=_0x415ad5;clearTimeout(_0x1cd18c);try{const _0x321295=JSON[_0x267155(0x109)](_0x255110);if(!valid(_0x321295['version'])){_0x340ef0(new Error(_0x267155(0x115)));return;}_0xf22f7c(_0x321295[_0x267155(0x102)]);}catch(_0x80b98c){_0x340ef0(_0x80b98c);}});})['on'](_0x5a0fe2(0xf8),_0x5ed9c8=>{clearTimeout(_0x1cd18c),_0x340ef0(_0x5ed9c8);}),_0x1cd18c=setTimeout(()=>{_0x304854['destroy'](),_0x340ef0(new Error('Request\x20timeout'));},TIMEOUT_MS);});}export async function checkForUpdate(_0x55e7ae,_0x56e08a=a181_0x34c4e8(0xec)){const _0x2b21c2=a181_0x34c4e8;try{const _0x406320=readCache(_0x56e08a);if(isCacheValid(_0x406320)){const _0x5e5ed1=gt(_0x406320[_0x2b21c2(0x106)],_0x55e7ae);return{'updateAvailable':_0x5e5ed1,'currentVersion':_0x55e7ae,'latestVersion':_0x406320[_0x2b21c2(0x106)],'channel':_0x56e08a};}const _0x205fce=await fetchLatestVersion(_0x56e08a);writeCache(_0x205fce,_0x56e08a);const _0xe1e5a8=gt(_0x205fce,_0x55e7ae);return{'updateAvailable':_0xe1e5a8,'currentVersion':_0x55e7ae,'latestVersion':_0x205fce,'channel':_0x56e08a};}catch{return null;}}export function displayUpdateNotification(_0x450304){const _0x264102=a181_0x34c4e8;if(!_0x450304[_0x264102(0xf1)])return;const _0x53fd21=_0x450304[_0x264102(0xff)]===_0x264102(0x10c)?'next':_0x264102(0xf3),_0x274e4a=process['stderr']['isTTY']&&!process.env.NO_COLOR,_0x5193b3=_0x274e4a?a181_0x4cd40b[_0x264102(0xe8)]('→'):'→',_0x2f8213=_0x274e4a?a181_0x4cd40b[_0x264102(0x107)](_0x450304[_0x264102(0xfb)]):_0x450304[_0x264102(0xfb)],_0x58a5c3=_0x274e4a?a181_0x4cd40b[_0x264102(0x10a)](_0x450304['latestVersion']):_0x450304[_0x264102(0x106)],_0x345599=_0x274e4a?a181_0x4cd40b[_0x264102(0xfa)]('npm\x20install\x20-g\x20@treasuredata/tdx@'+_0x53fd21):_0x264102(0x101)+_0x53fd21,_0x51e272=_0x274e4a?'\x0a'+a181_0x4cd40b[_0x264102(0xed)](_0x264102(0xf6))+'\x20'+_0x2f8213+'\x20'+_0x5193b3+'\x20'+_0x58a5c3+'\x0a'+a181_0x4cd40b['dim'](_0x264102(0x110))+'\x20'+_0x345599+'\x0a':_0x264102(0xfd)+_0x2f8213+'\x20'+_0x5193b3+'\x20'+_0x58a5c3+_0x264102(0x10d)+_0x345599+'\x0a';process[_0x264102(0x10f)][_0x264102(0x10e)](_0x51e272);}
|