@treasuredata/tdx 2026.3.25 → 2026.3.26
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/auth-login-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/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-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/policy-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/upgrade-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/oauth-keychain.js +1 -1
- package/dist/core/oauth.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/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +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/oauth-refresh.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/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.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/policy.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.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.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/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.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/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/paginate.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/file-reader.js +1 -1
- package/dist/utils/github-releases.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/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
|
-
|
|
1
|
+
(function(_0x14086b,_0x430087){var _0x483f3d=a204_0x2458,_0x1952ff=_0x14086b();while(!![]){try{var _0x3858b9=parseInt(_0x483f3d(0x193))/0x1+-parseInt(_0x483f3d(0x191))/0x2*(parseInt(_0x483f3d(0x192))/0x3)+parseInt(_0x483f3d(0x18c))/0x4+-parseInt(_0x483f3d(0x190))/0x5*(parseInt(_0x483f3d(0x18d))/0x6)+parseInt(_0x483f3d(0x18e))/0x7*(-parseInt(_0x483f3d(0x194))/0x8)+-parseInt(_0x483f3d(0x18f))/0x9+parseInt(_0x483f3d(0x18b))/0xa;if(_0x3858b9===_0x430087)break;else _0x1952ff['push'](_0x1952ff['shift']());}catch(_0x1f7baa){_0x1952ff['push'](_0x1952ff['shift']());}}}(a204_0x22df,0xc1e26));function a204_0x2458(_0x4220e4,_0x39c24c){_0x4220e4=_0x4220e4-0x18b;var _0x22dfb0=a204_0x22df();var _0x24589c=_0x22dfb0[_0x4220e4];return _0x24589c;}function a204_0x22df(){var _0x1564f8=['387uMmfam','1485128FmWfeq','32DGctaC','28339830fxVZiA','1402160fxyCba','9258svETlj','105903odurdr','8652717JQeEQG','4810yULDdY','21228jcereK'];a204_0x22df=function(){return _0x1564f8;};return a204_0x22df();}export class NullHandler{['handle'](_0x71975f){}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2cb995,_0x35fbdf){var _0x183b95=a205_0x4afb,_0x217639=_0x2cb995();while(!![]){try{var _0x3f0b63=parseInt(_0x183b95(0x12c))/0x1*(parseInt(_0x183b95(0x126))/0x2)+parseInt(_0x183b95(0x12d))/0x3+parseInt(_0x183b95(0x124))/0x4*(-parseInt(_0x183b95(0x12a))/0x5)+-parseInt(_0x183b95(0x125))/0x6+parseInt(_0x183b95(0x12b))/0x7*(parseInt(_0x183b95(0x128))/0x8)+-parseInt(_0x183b95(0x127))/0x9+parseInt(_0x183b95(0x129))/0xa;if(_0x3f0b63===_0x35fbdf)break;else _0x217639['push'](_0x217639['shift']());}catch(_0x466573){_0x217639['push'](_0x217639['shift']());}}}(a205_0x4c2d,0xd2c59));function a205_0x4c2d(){var _0x4934bd=['5978178icsaAp','2kegXlW','14855238ahyMul','80HcujnE','40820110YxyfGH','24155aogkEy','156149uwtkXq','414707aeVdan','1516449QPupoA','1420BfNuTz'];a205_0x4c2d=function(){return _0x4934bd;};return a205_0x4c2d();}export{Logger}from'./logger.js';function a205_0x4afb(_0x3b176e,_0x274163){_0x3b176e=_0x3b176e-0x124;var _0x4c2de6=a205_0x4c2d();var _0x4afb56=_0x4c2de6[_0x3b176e];return _0x4afb56;}export{LogLevel,parseLogLevel,logLevelToString}from'./types.js';export{FileHandler,ConsoleHandler,NullHandler}from'./handlers/index.js';export{DefaultLogFormatter}from'./formatters/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a206_0x3cac3e=a206_0xdf53;(function(_0x47dbe5,_0x39cae3){const _0x2159dc=a206_0xdf53,_0x28fbfa=_0x47dbe5();while(!![]){try{const _0x146adb=parseInt(_0x2159dc(0x123))/0x1*(-parseInt(_0x2159dc(0x12d))/0x2)+-parseInt(_0x2159dc(0x147))/0x3+-parseInt(_0x2159dc(0x159))/0x4+-parseInt(_0x2159dc(0x129))/0x5+-parseInt(_0x2159dc(0x144))/0x6*(-parseInt(_0x2159dc(0x136))/0x7)+parseInt(_0x2159dc(0x126))/0x8+parseInt(_0x2159dc(0x13b))/0x9;if(_0x146adb===_0x39cae3)break;else _0x28fbfa['push'](_0x28fbfa['shift']());}catch(_0xa77ad4){_0x28fbfa['push'](_0x28fbfa['shift']());}}}(a206_0x22f8,0xab976));import{LogLevel as a206_0x25cc54,logLevelToString}from'./types.js';function a206_0x22f8(){const _0x15437b=['close','24971247SqhrCb','clear','shouldLog','getEffectiveLevel','clearHandlers','defaultLevel','handle','levelOverrides','DEBUG','700464yxCbtN','has','ERROR','2523747ECTdGd','slice','name',']\x20[','dispatch','stringify','initialized','pendingRecords','isInitialized','component','WARN','setDefaultLevel','entries','join','string','warn','message','formatter','2687656KZmQaG','log','get','trace','timestamp','30kxEfPF','handlers','addHandler','3852104rgPGfH','INFO','set','2637925mPwDQS','length','level','split','73082hsSdJD','stack','info','format','toISOString','map','loggers','setLogLevel','init','35uhYudK','cause','push','debug'];a206_0x22f8=function(){return _0x15437b;};return a206_0x22f8();}function a206_0xdf53(_0x492aac,_0x10fcb7){_0x492aac=_0x492aac-0x11f;const _0x22f803=a206_0x22f8();let _0xdf5316=_0x22f803[_0x492aac];return _0xdf5316;}const MAX_PENDING_RECORDS=0x3e8,state={'initialized':![],'defaultLevel':a206_0x25cc54[a206_0x3cac3e(0x127)],'levelOverrides':new Map(),'handlers':[],'formatter':null,'loggers':new Map(),'pendingRecords':[]};function safeStringify(_0x31774d){const _0x15b3d3=a206_0x3cac3e;if(typeof _0x31774d===_0x15b3d3(0x155))return _0x31774d;if(_0x31774d instanceof Error)return _0x31774d[_0x15b3d3(0x12e)]||_0x31774d[_0x15b3d3(0x149)]+':\x20'+_0x31774d['message'];try{return JSON[_0x15b3d3(0x14c)](_0x31774d,(_0x14cd7f,_0x26c9a7)=>{const _0xdf2903=_0x15b3d3;if(_0x26c9a7 instanceof Error)return{'name':_0x26c9a7['name'],'message':_0x26c9a7[_0xdf2903(0x157)],'stack':_0x26c9a7[_0xdf2903(0x12e)],'cause':_0x26c9a7[_0xdf2903(0x137)]};return _0x26c9a7;});}catch{return String(_0x31774d);}}export class Logger{[a206_0x3cac3e(0x150)];constructor(_0x5373ee){const _0x3a958b=a206_0x3cac3e;this[_0x3a958b(0x150)]=_0x5373ee;}static['of'](_0x460f90){const _0x103daa=a206_0x3cac3e,_0x5123de=typeof _0x460f90===_0x103daa(0x155)?_0x460f90:_0x460f90[_0x103daa(0x149)];let _0x463c1f=state['loggers']['get'](_0x5123de);return!_0x463c1f&&(_0x463c1f=new Logger(_0x5123de),state[_0x103daa(0x133)][_0x103daa(0x128)](_0x5123de,_0x463c1f)),_0x463c1f;}static async[a206_0x3cac3e(0x135)](_0x5b8dbb={}){const _0x350370=a206_0x3cac3e;state[_0x350370(0x140)]=_0x5b8dbb[_0x350370(0x140)]??a206_0x25cc54[_0x350370(0x127)],state[_0x350370(0x124)]=_0x5b8dbb['handlers']??[],state[_0x350370(0x158)]=_0x5b8dbb[_0x350370(0x158)]??null,state['levelOverrides'][_0x350370(0x13c)]();if(_0x5b8dbb[_0x350370(0x142)])for(const [_0x370181,_0x4aeb19]of Object[_0x350370(0x153)](_0x5b8dbb[_0x350370(0x142)])){state[_0x350370(0x142)]['set'](_0x370181,_0x4aeb19);}for(const _0x15e177 of state[_0x350370(0x124)]){_0x15e177[_0x350370(0x135)]&&await _0x15e177[_0x350370(0x135)]();}state['initialized']=!![];for(const _0x5b5df5 of state[_0x350370(0x14e)]){Logger[_0x350370(0x14b)](_0x5b5df5);}state[_0x350370(0x14e)]=[];}static[a206_0x3cac3e(0x134)](_0x2a6b5d,_0x2a45fa){const _0x20a39c=a206_0x3cac3e;state[_0x20a39c(0x142)][_0x20a39c(0x128)](_0x2a6b5d,_0x2a45fa);}static[a206_0x3cac3e(0x152)](_0x1b8280){state['defaultLevel']=_0x1b8280;}static[a206_0x3cac3e(0x125)](_0x5028dc){const _0x1d969a=a206_0x3cac3e;state[_0x1d969a(0x124)][_0x1d969a(0x138)](_0x5028dc),state[_0x1d969a(0x14d)]&&_0x5028dc['init']&&_0x5028dc[_0x1d969a(0x135)]();}static[a206_0x3cac3e(0x13f)](){const _0xe0cf87=a206_0x3cac3e;state[_0xe0cf87(0x124)]=[];}static async['shutdown'](){const _0x4f7552=a206_0x3cac3e;for(const _0x30f720 of state[_0x4f7552(0x124)]){_0x30f720[_0x4f7552(0x13a)]&&await _0x30f720[_0x4f7552(0x13a)]();}state['handlers']=[],state[_0x4f7552(0x14d)]=![],state[_0x4f7552(0x133)][_0x4f7552(0x13c)](),state[_0x4f7552(0x14e)]=[];}static['reset'](){const _0x16df2b=a206_0x3cac3e;state[_0x16df2b(0x14d)]=![],state[_0x16df2b(0x140)]=a206_0x25cc54['INFO'],state[_0x16df2b(0x142)]['clear'](),state[_0x16df2b(0x124)]=[],state['formatter']=null,state[_0x16df2b(0x133)][_0x16df2b(0x13c)](),state[_0x16df2b(0x14e)]=[];}static[a206_0x3cac3e(0x14f)](){const _0x67f7cb=a206_0x3cac3e;return state[_0x67f7cb(0x14d)];}static['getEffectiveLevel'](_0x10b5cb){const _0x49c257=a206_0x3cac3e;if(state['levelOverrides'][_0x49c257(0x145)](_0x10b5cb))return state[_0x49c257(0x142)][_0x49c257(0x120)](_0x10b5cb);const _0x57cae9=_0x10b5cb[_0x49c257(0x12c)]('.');for(let _0x8fdd9a=_0x57cae9['length']-0x1;_0x8fdd9a>0x0;_0x8fdd9a--){const _0x1accf6=_0x57cae9[_0x49c257(0x148)](0x0,_0x8fdd9a)['join']('.');if(state[_0x49c257(0x142)]['has'](_0x1accf6))return state['levelOverrides']['get'](_0x1accf6);}return state[_0x49c257(0x140)];}['shouldLog'](_0x6a5886){const _0x5b7fe2=a206_0x3cac3e,_0x3fc205=Logger[_0x5b7fe2(0x13e)](this[_0x5b7fe2(0x150)]);return _0x6a5886>=_0x3fc205;}static[a206_0x3cac3e(0x14b)](_0x197336){const _0x587d44=a206_0x3cac3e;for(const _0xc40809 of state[_0x587d44(0x124)]){_0xc40809[_0x587d44(0x141)](_0x197336);}}[a206_0x3cac3e(0x11f)](_0x4c1fa9,_0x4a7c2f){const _0x277e64=a206_0x3cac3e;if(!this[_0x277e64(0x13d)](_0x4c1fa9))return;const _0x166b76=_0x4a7c2f[_0x277e64(0x132)](_0x2debd2=>typeof _0x2debd2==='function'?_0x2debd2():_0x2debd2),_0x43bd64=_0x166b76[_0x277e64(0x132)](safeStringify)[_0x277e64(0x154)]('\x20'),_0x53b36c={'timestamp':new Date(),'level':_0x4c1fa9,'component':this[_0x277e64(0x150)],'message':_0x43bd64};if(!state[_0x277e64(0x14d)]){state['pendingRecords'][_0x277e64(0x12a)]<MAX_PENDING_RECORDS&&state[_0x277e64(0x14e)][_0x277e64(0x138)](_0x53b36c);return;}Logger[_0x277e64(0x14b)](_0x53b36c);}[a206_0x3cac3e(0x121)](..._0x25265a){const _0x2508b5=a206_0x3cac3e;this[_0x2508b5(0x11f)](a206_0x25cc54['TRACE'],_0x25265a);}[a206_0x3cac3e(0x139)](..._0x3521a2){const _0x2864ce=a206_0x3cac3e;this['log'](a206_0x25cc54[_0x2864ce(0x143)],_0x3521a2);}[a206_0x3cac3e(0x12f)](..._0x2165c2){const _0x72c615=a206_0x3cac3e;this[_0x72c615(0x11f)](a206_0x25cc54['INFO'],_0x2165c2);}[a206_0x3cac3e(0x156)](..._0x1b8f17){const _0x46ca23=a206_0x3cac3e;this[_0x46ca23(0x11f)](a206_0x25cc54[_0x46ca23(0x151)],_0x1b8f17);}['error'](..._0x47ee2c){const _0x32d66c=a206_0x3cac3e;this[_0x32d66c(0x11f)](a206_0x25cc54[_0x32d66c(0x146)],_0x47ee2c);}static['getFormatter'](){return state['formatter'];}static['format'](_0x186adb){const _0x2cd13d=a206_0x3cac3e;if(state[_0x2cd13d(0x158)])return state[_0x2cd13d(0x158)][_0x2cd13d(0x130)](_0x186adb);return _0x186adb[_0x2cd13d(0x122)][_0x2cd13d(0x131)]()+'\x20['+logLevelToString(_0x186adb[_0x2cd13d(0x12b)])+_0x2cd13d(0x14a)+_0x186adb[_0x2cd13d(0x150)]+']\x20'+_0x186adb[_0x2cd13d(0x157)];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a207_0x13ac(_0x2a8980,_0x3097ac){_0x2a8980=_0x2a8980-0xc8;const _0x23ee85=a207_0x23ee();let _0x13ac68=_0x23ee85[_0x2a8980];return _0x13ac68;}(function(_0x45a6a1,_0x575e8c){const _0x58dc7e=a207_0x13ac,_0x53c748=_0x45a6a1();while(!![]){try{const _0x5e8f1d=parseInt(_0x58dc7e(0xd1))/0x1*(-parseInt(_0x58dc7e(0xe0))/0x2)+parseInt(_0x58dc7e(0xd8))/0x3*(parseInt(_0x58dc7e(0xda))/0x4)+parseInt(_0x58dc7e(0xe3))/0x5*(parseInt(_0x58dc7e(0xdb))/0x6)+parseInt(_0x58dc7e(0xd6))/0x7*(parseInt(_0x58dc7e(0xcd))/0x8)+-parseInt(_0x58dc7e(0xe5))/0x9*(parseInt(_0x58dc7e(0xce))/0xa)+parseInt(_0x58dc7e(0xdc))/0xb+parseInt(_0x58dc7e(0xe2))/0xc*(-parseInt(_0x58dc7e(0xd5))/0xd);if(_0x5e8f1d===_0x575e8c)break;else _0x53c748['push'](_0x53c748['shift']());}catch(_0x5e2fff){_0x53c748['push'](_0x53c748['shift']());}}}(a207_0x23ee,0x2b364));export var LogLevel;function a207_0x23ee(){const _0x30aa47=['2008690eDKzuL','ERROR','WARN','66959zfFJUw','INFO','toString','trace','4755673FYzdLg','97972zjcteN','info','6VwyQJM','getMilliseconds','201448YplNXE','6YitEFw','3793108bdDfKL','getMinutes','getTimezoneOffset','getDate','2gKmCha','floor','12yGHIoA','1685505LVqYJy','getFullYear','9KnPbKO','TRACE','WARNING','toUpperCase','padStart','getMonth','warn','DEBUG','16WqePwq'];a207_0x23ee=function(){return _0x30aa47;};return a207_0x23ee();}(function(_0x1a5fe9){const _0x26defe=a207_0x13ac;_0x1a5fe9[_0x1a5fe9[_0x26defe(0xe6)]=-0x2]=_0x26defe(0xe6),_0x1a5fe9[_0x1a5fe9[_0x26defe(0xcc)]=-0x1]=_0x26defe(0xcc),_0x1a5fe9[_0x1a5fe9[_0x26defe(0xd2)]=0x0]=_0x26defe(0xd2),_0x1a5fe9[_0x1a5fe9[_0x26defe(0xd0)]=0x1]='WARN',_0x1a5fe9[_0x1a5fe9[_0x26defe(0xcf)]=0x2]=_0x26defe(0xcf);}(LogLevel||(LogLevel={})));export function parseLogLevel(_0x11dec2){const _0x2e5c6b=a207_0x13ac;switch(_0x11dec2[_0x2e5c6b(0xc8)]()){case _0x2e5c6b(0xe6):return LogLevel['TRACE'];case'DEBUG':return LogLevel[_0x2e5c6b(0xcc)];case _0x2e5c6b(0xd2):return LogLevel[_0x2e5c6b(0xd2)];case _0x2e5c6b(0xd0):case _0x2e5c6b(0xe7):return LogLevel[_0x2e5c6b(0xd0)];case _0x2e5c6b(0xcf):return LogLevel['ERROR'];default:return LogLevel[_0x2e5c6b(0xd2)];}}export function logLevelToString(_0x10aab1){const _0x28a0f8=a207_0x13ac;switch(_0x10aab1){case LogLevel[_0x28a0f8(0xe6)]:return _0x28a0f8(0xd4);case LogLevel[_0x28a0f8(0xcc)]:return'debug';case LogLevel[_0x28a0f8(0xd2)]:return _0x28a0f8(0xd7);case LogLevel[_0x28a0f8(0xd0)]:return _0x28a0f8(0xcb);case LogLevel[_0x28a0f8(0xcf)]:return'error';default:return _0x28a0f8(0xd7);}}export function formatTimestamp(_0xdad9f7){const _0x59f8c0=a207_0x13ac,_0x246bc6=_0xdad9f7[_0x59f8c0(0xe4)](),_0x2cd148=(_0xdad9f7[_0x59f8c0(0xca)]()+0x1)[_0x59f8c0(0xd3)]()[_0x59f8c0(0xc9)](0x2,'0'),_0x936c23=_0xdad9f7[_0x59f8c0(0xdf)]()[_0x59f8c0(0xd3)]()[_0x59f8c0(0xc9)](0x2,'0'),_0xdc3dbe=_0xdad9f7['getHours']()[_0x59f8c0(0xd3)]()[_0x59f8c0(0xc9)](0x2,'0'),_0x48e731=_0xdad9f7[_0x59f8c0(0xdd)]()[_0x59f8c0(0xd3)]()[_0x59f8c0(0xc9)](0x2,'0'),_0x159f59=_0xdad9f7['getSeconds']()[_0x59f8c0(0xd3)]()[_0x59f8c0(0xc9)](0x2,'0'),_0x23e641=_0xdad9f7[_0x59f8c0(0xd9)]()[_0x59f8c0(0xd3)]()[_0x59f8c0(0xc9)](0x3,'0'),_0x132996=-_0xdad9f7[_0x59f8c0(0xde)](),_0x29b36c=Math[_0x59f8c0(0xe1)](Math['abs'](_0x132996)/0x3c),_0x3cb4d9=Math['abs'](_0x132996)%0x3c,_0x237de5=_0x132996>=0x0?'+':'-',_0x42f4a3=''+_0x237de5+_0x29b36c[_0x59f8c0(0xd3)]()['padStart'](0x2,'0')+_0x3cb4d9[_0x59f8c0(0xd3)]()[_0x59f8c0(0xc9)](0x2,'0');return _0x246bc6+'-'+_0x2cd148+'-'+_0x936c23+'\x20'+_0xdc3dbe+':'+_0x48e731+':'+_0x159f59+'.'+_0x23e641+_0x42f4a3;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a208_0x57f3(){const _0x42d2b9=['Invalid\x20timeout\x20value:\x20','1369648QuABVY','number','isInteger','.\x20Must\x20be\x20a\x20positive\x20number.','1116344DgiWCs','50bSqsdG','2218736UHYETq','Invalid\x20limit\x20value:\x20','174789enfYRp','570kKypkZ','.\x20Must\x20be\x20a\x20number.','816636gRJmwT','.\x20Must\x20be\x20an\x20integer.','62945gzufJs','18185wuVXPb','108ukJqDr'];a208_0x57f3=function(){return _0x42d2b9;};return a208_0x57f3();}(function(_0x175117,_0x361581){const _0xcabd74=a208_0xb45d,_0x20c46a=_0x175117();while(!![]){try{const _0xe7b717=parseInt(_0xcabd74(0xa0))/0x1*(-parseInt(_0xcabd74(0x97))/0x2)+-parseInt(_0xcabd74(0x9d))/0x3+parseInt(_0xcabd74(0x96))/0x4+parseInt(_0xcabd74(0x9f))/0x5*(-parseInt(_0xcabd74(0xa1))/0x6)+parseInt(_0xcabd74(0x92))/0x7+-parseInt(_0xcabd74(0x98))/0x8+-parseInt(_0xcabd74(0x9a))/0x9*(-parseInt(_0xcabd74(0x9b))/0xa);if(_0xe7b717===_0x361581)break;else _0x20c46a['push'](_0x20c46a['shift']());}catch(_0x303c74){_0x20c46a['push'](_0x20c46a['shift']());}}}(a208_0x57f3,0x55af6));function a208_0xb45d(_0x50efce,_0x1b3674){_0x50efce=_0x50efce-0x92;const _0x57f3a4=a208_0x57f3();let _0xb45dfa=_0x57f3a4[_0x50efce];return _0xb45dfa;}export function validateLimitOption(_0x349a05){const _0x272737=a208_0xb45d;if(!Number[_0x272737(0x94)](_0x349a05))return{'isValid':![],'error':_0x272737(0x99)+_0x349a05+_0x272737(0x9e)};if(_0x349a05<=0x0)return{'isValid':![],'error':_0x272737(0x99)+_0x349a05+'.\x20Must\x20be\x20a\x20positive\x20integer.'};return{'isValid':!![],'value':_0x349a05};}export function validateTimeoutOption(_0x5ff2bb,_0x145ae5=0x1e){const _0x351d0f=a208_0xb45d;if(_0x5ff2bb===undefined)return{'isValid':!![],'value':_0x145ae5};const _0xc8d6bf=typeof _0x5ff2bb===_0x351d0f(0x93)?_0x5ff2bb:parseFloat(_0x5ff2bb);if(isNaN(_0xc8d6bf))return{'isValid':![],'error':_0x351d0f(0xa2)+_0x5ff2bb+_0x351d0f(0x9c)};if(_0xc8d6bf<=0x0)return{'isValid':![],'error':_0x351d0f(0xa2)+_0xc8d6bf+_0x351d0f(0x95)};return{'isValid':!![],'value':_0xc8d6bf};}
|
package/dist/utils/process.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a209_0x19efc8=a209_0x1cc7;(function(_0x42f647,_0x1fdf5d){const _0x57858e=a209_0x1cc7,_0x4994f2=_0x42f647();while(!![]){try{const _0x5ad317=parseInt(_0x57858e(0x18f))/0x1+-parseInt(_0x57858e(0x17a))/0x2*(-parseInt(_0x57858e(0x1ac))/0x3)+parseInt(_0x57858e(0x198))/0x4+parseInt(_0x57858e(0x189))/0x5*(-parseInt(_0x57858e(0x19a))/0x6)+-parseInt(_0x57858e(0x177))/0x7*(-parseInt(_0x57858e(0x193))/0x8)+parseInt(_0x57858e(0x178))/0x9+parseInt(_0x57858e(0x190))/0xa*(-parseInt(_0x57858e(0x179))/0xb);if(_0x5ad317===_0x1fdf5d)break;else _0x4994f2['push'](_0x4994f2['shift']());}catch(_0x36c303){_0x4994f2['push'](_0x4994f2['shift']());}}}(a209_0x8dbf,0xd4209));import{execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set([a209_0x19efc8(0x183),a209_0x19efc8(0x173),'sh',a209_0x19efc8(0x170),a209_0x19efc8(0x1ab),a209_0x19efc8(0x181),a209_0x19efc8(0x17c),a209_0x19efc8(0x197),'pwsh',a209_0x19efc8(0x1a5),'nu',a209_0x19efc8(0x172),a209_0x19efc8(0x17d),a209_0x19efc8(0x175)]),EPHEMERAL_SHELL_SPAWNERS=new Set([a209_0x19efc8(0x1a0),a209_0x19efc8(0x176),a209_0x19efc8(0x1aa),a209_0x19efc8(0x1ae),a209_0x19efc8(0x195)]);function getProcessInfoWindows(_0x4e515e){const _0x3aa7aa=a209_0x19efc8;try{if(!Number[_0x3aa7aa(0x19f)](_0x4e515e)||_0x4e515e<=0x0)return null;const _0x4e9738=_0x3aa7aa(0x18c)+_0x4e515e+_0x3aa7aa(0x192),_0x2f8e93=execSync(_0x3aa7aa(0x18a)+_0x4e9738+'\x22',{'encoding':'utf-8','windowsHide':!![],'stdio':['pipe',_0x3aa7aa(0x18e),_0x3aa7aa(0x18e)]})['trim']();if(!_0x2f8e93)return null;const [_0x28dac8,..._0x5c2338]=_0x2f8e93[_0x3aa7aa(0x1af)](','),_0x2875ec=parseInt(_0x28dac8,0xa),_0x1e3006=_0x5c2338['join'](',')[_0x3aa7aa(0x188)]();if(isNaN(_0x2875ec)||!_0x1e3006)return null;return{'pid':_0x4e515e,'ppid':_0x2875ec,'comm':_0x1e3006[_0x3aa7aa(0x1a6)](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0x572219){const _0x28c66f=a209_0x19efc8;try{const _0x2ef189=0x400000;if(!Number['isInteger'](_0x572219)||_0x572219<=0x0||_0x572219>_0x2ef189)return null;const _0x2cf50c=execSync(_0x28c66f(0x19e)+_0x572219+_0x28c66f(0x1a4),{'encoding':'utf-8','stdio':'pipe'})['trim'](),[_0x5c2bb8,..._0x1c8e7c]=_0x2cf50c[_0x28c66f(0x1af)](/\s+/),_0x453b8f=parseInt(_0x5c2bb8,0xa),_0x3da51b=_0x1c8e7c['join']('\x20');if(isNaN(_0x453b8f))return null;return{'pid':_0x572219,'ppid':_0x453b8f,'comm':_0x3da51b};}catch{return null;}}function getProcessInfo(_0x4f5d1b){const _0x3d0246=a209_0x19efc8;if(process[_0x3d0246(0x196)]===_0x3d0246(0x171))return getProcessInfoWindows(_0x4f5d1b);return getProcessInfoPosix(_0x4f5d1b);}function getBasename(_0x481f2d){const _0x31e532=a209_0x19efc8;return _0x481f2d[_0x31e532(0x1a6)](/^-/,'')[_0x31e532(0x1af)]('/')['pop']()?.[_0x31e532(0x18b)]()||'';}function a209_0x8dbf(){const _0xa42195=['csh','elvish','unref','map','where.exe','tcsh','ignore','bash','kill','join','comm','cmd.exe','trim','10WYTYew','powershell.exe\x20-NoProfile\x20-NonInteractive\x20-Command\x20\x22','toLowerCase','Get-CimInstance\x20Win32_Process\x20-Filter\x20\x22ProcessId=','start','pipe','876292PkNcEr','400bDwzwB','has','\x22\x20|\x20Select-Object\x20-Property\x20ParentProcessId,Name\x20|\x20ForEach-Object\x20{\x20\x22$($_.ParentProcessId),$($_.Name)\x22\x20}','8291544TNcZqm','Invalid\x20URL:\x20','treasure\x20studio','platform','dash','4958612QxkQpi','ppid','3666924YlILYY','protocol','xdg-open','pid','ps\x20-p\x20','isInteger','claude','data','Unsupported\x20protocol:\x20','https:','\x20-o\x20ppid=,comm=','powershell','replace','stderr','open','which','cursor','ksh','105iTDlGB','exit','electron','split','fish','win32','ion','zsh','http:','xonsh','code','7IlEyEu','7045992gchhdK','543961JgztjV','7654cxyCzN','stdout'];a209_0x8dbf=function(){return _0xa42195;};return a209_0x8dbf();}function isShell(_0x33658b){return SHELL_NAMES['has'](getBasename(_0x33658b));}function a209_0x1cc7(_0x3696d2,_0x52afa1){_0x3696d2=_0x3696d2-0x170;const _0x8dbfba=a209_0x8dbf();let _0x1cc7d8=_0x8dbfba[_0x3696d2];return _0x1cc7d8;}function isEphemeralShellSpawner(_0x386f8b){const _0x53b13f=a209_0x19efc8;return EPHEMERAL_SHELL_SPAWNERS[_0x53b13f(0x191)](getBasename(_0x386f8b));}let cachedShellPID;function findShellPID(){const _0x1908aa=a209_0x19efc8;if(process['ppid']===undefined)return process['pid'];let _0x417a42=process[_0x1908aa(0x199)];const _0x143511=0xa;let _0x57eef3=0x0;while(_0x57eef3<_0x143511){const _0x5bfc24=getProcessInfo(_0x417a42);if(!_0x5bfc24)break;if(isShell(_0x5bfc24[_0x1908aa(0x186)])){const _0x5c4174=getProcessInfo(_0x5bfc24[_0x1908aa(0x199)]);if(_0x5c4174&&isEphemeralShellSpawner(_0x5c4174[_0x1908aa(0x186)])){_0x417a42=_0x5bfc24[_0x1908aa(0x199)],_0x57eef3++;continue;}return _0x5bfc24['pid'];}if(_0x5bfc24[_0x1908aa(0x199)]===0x0||_0x5bfc24[_0x1908aa(0x199)]===0x1){if(isShell(_0x5bfc24[_0x1908aa(0x186)]))return _0x5bfc24[_0x1908aa(0x19d)];break;}_0x417a42=_0x5bfc24['ppid'],_0x57eef3++;}return process['ppid']!==undefined?process['ppid']:process['pid'];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x23c96f){const _0x15f739=a209_0x19efc8;if(!Number[_0x15f739(0x19f)](_0x23c96f)||_0x23c96f<=0x0)return![];try{return process[_0x15f739(0x184)](_0x23c96f,0x0),!![];}catch{return![];}}export function openBrowser(_0x272b67){const _0x1fe529=a209_0x19efc8;let _0x3fb4fa;try{_0x3fb4fa=new URL(_0x272b67);}catch{throw new Error(_0x1fe529(0x194)+_0x272b67);}if(_0x3fb4fa[_0x1fe529(0x19b)]!==_0x1fe529(0x174)&&_0x3fb4fa['protocol']!==_0x1fe529(0x1a3))throw new Error(_0x1fe529(0x1a2)+_0x3fb4fa['protocol']);const _0x243931=_0x3fb4fa['href'],_0x43ff11=process['platform'];if(_0x43ff11===_0x1fe529(0x171))spawn(_0x1fe529(0x187),['/c',_0x1fe529(0x18d),'',_0x243931],{'detached':!![],'stdio':_0x1fe529(0x182)})[_0x1fe529(0x17e)]();else{const _0x5dcda6=_0x43ff11==='darwin'?_0x1fe529(0x1a8):_0x1fe529(0x19c);spawn(_0x5dcda6,[_0x243931],{'detached':!![],'stdio':'ignore'})[_0x1fe529(0x17e)]();}}export function isWindows(){const _0x23c46d=a209_0x19efc8;return process[_0x23c46d(0x196)]===_0x23c46d(0x171);}export function getCrossSpawnOptions(_0x2d0fe6){return{..._0x2d0fe6??{},'shell':isWindows()};}export function escapeWindowsArg(_0x11cd56){const _0x48ef5a=a209_0x19efc8;if(!/[ \t"&|<>^%!`\r\n]/['test'](_0x11cd56))return _0x11cd56;const _0x277b5f=_0x11cd56[_0x48ef5a(0x1a6)](/"/g,'\x22\x22');return'\x22'+_0x277b5f+'\x22';}export function crossSpawn(_0x512664,_0x417071,_0x299097){const _0x480d76=a209_0x19efc8;if(isWindows()){const _0x4bd037=escapeWindowsArg(_0x512664),_0x8c406e=_0x417071[_0x480d76(0x17f)](escapeWindowsArg),_0x16ebc0=[_0x4bd037,..._0x8c406e][_0x480d76(0x185)]('\x20');return spawn(_0x16ebc0,[],{..._0x299097,'shell':!![]});}return spawn(_0x512664,_0x417071,{..._0x299097,'shell':![]});}export function gracefulExit(_0x4c0aae=0x0){const _0x446476=a209_0x19efc8;isWindows()?setTimeout(()=>process[_0x446476(0x1ad)](_0x4c0aae),0x32):process[_0x446476(0x1ad)](_0x4c0aae);}export function findExecutable(_0xbaa4cb,_0x8750b3=0x1388){return new Promise(_0x2473fd=>{const _0x5796ee=a209_0x1cc7,_0x51efe5=isWindows()?_0x5796ee(0x180):_0x5796ee(0x1a9);let _0x5d2f2f=![];const _0x3d5b42=crossSpawn(_0x51efe5,[_0xbaa4cb],{'stdio':'pipe','shell':isWindows()}),_0xa8e76a=setTimeout(()=>{const _0x107e21=_0x5796ee;!_0x5d2f2f&&(_0x5d2f2f=!![],_0x3d5b42[_0x107e21(0x184)](),_0x2473fd(null));},_0x8750b3);let _0x5419ce='';_0x3d5b42[_0x5796ee(0x17b)]?.['on'](_0x5796ee(0x1a1),_0xd34bc1=>{_0x5419ce+=_0xd34bc1['toString']();}),_0x3d5b42[_0x5796ee(0x1a7)]?.['on'](_0x5796ee(0x1a1),()=>{}),_0x3d5b42['on'](_0x5796ee(0x1ad),_0x1a6dee=>{const _0x34d47a=_0x5796ee;if(_0x5d2f2f)return;_0x5d2f2f=!![],clearTimeout(_0xa8e76a);if(_0x1a6dee===0x0&&_0x5419ce[_0x34d47a(0x188)]()){const _0x4dd73f=_0x5419ce[_0x34d47a(0x188)]()['split'](/\r?\n/)[0x0];_0x2473fd(_0x4dd73f);}else _0x2473fd(null);}),_0x3d5b42['on']('error',()=>{if(_0x5d2f2f)return;_0x5d2f2f=!![],clearTimeout(_0xa8e76a),_0x2473fd(null);});});}
|
package/dist/utils/prompt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x131a3a,_0x62aa23){const _0x4ee16e=a210_0xbd75,_0x3d44cd=_0x131a3a();while(!![]){try{const _0x1e9b37=parseInt(_0x4ee16e(0xa4))/0x1+parseInt(_0x4ee16e(0xa8))/0x2+-parseInt(_0x4ee16e(0x9e))/0x3*(parseInt(_0x4ee16e(0x97))/0x4)+parseInt(_0x4ee16e(0x9b))/0x5*(parseInt(_0x4ee16e(0x99))/0x6)+parseInt(_0x4ee16e(0xa2))/0x7+parseInt(_0x4ee16e(0xa6))/0x8+-parseInt(_0x4ee16e(0x96))/0x9*(parseInt(_0x4ee16e(0xa5))/0xa);if(_0x1e9b37===_0x62aa23)break;else _0x3d44cd['push'](_0x3d44cd['shift']());}catch(_0x260e66){_0x3d44cd['push'](_0x3d44cd['shift']());}}}(a210_0x522b,0x4745b));function a210_0x522b(){const _0x4110f2=['874348ZZwNTJ','stdin','setRawMode','question','\x20(y/N):\x20','data','10376550zJwVNg','26392ChocdU','close','1800768IVoGPJ','toLowerCase','5dFWEVU','stderr','stdout','108KiykIg','createInterface','write','yes','3961475zkesSK','setEncoding','197579uBjElJ','10rqcHAj','1452824BqijvA','utf8'];a210_0x522b=function(){return _0x4110f2;};return a210_0x522b();}import*as a210_0x32c82a from'readline';function a210_0xbd75(_0x2f3ee2,_0x5bdb07){_0x2f3ee2=_0x2f3ee2-0x91;const _0x522b65=a210_0x522b();let _0xbd75fc=_0x522b65[_0x2f3ee2];return _0xbd75fc;}import{gracefulExit}from'./process.js';export function isInteractive(){const _0x30e1e1=a210_0xbd75;return process[_0x30e1e1(0x91)]['isTTY']===!![];}export async function confirm(_0x193ddd){const _0x45da5d=a210_0xbd75,_0x206809=a210_0x32c82a[_0x45da5d(0x9f)]({'input':process['stdin'],'output':process[_0x45da5d(0x9d)]});return new Promise(_0x6ea607=>{const _0x1f352a=_0x45da5d;_0x206809[_0x1f352a(0x93)](_0x193ddd+_0x1f352a(0x94),_0x5815c1=>{const _0x5e86fe=_0x1f352a;_0x206809[_0x5e86fe(0x98)](),_0x6ea607(_0x5815c1[_0x5e86fe(0x9a)]()==='y'||_0x5815c1['toLowerCase']()===_0x5e86fe(0xa1));});});}export async function confirmKey(_0x5c69bc){const _0xd40e3c=a210_0xbd75;if(!process['stdin']['isTTY'])return![];return process[_0xd40e3c(0x9c)][_0xd40e3c(0xa0)](_0x5c69bc+'\x20[y/N]\x20'),new Promise(_0x213fad=>{const _0x5a03f7=_0xd40e3c,_0x5c5f89=process[_0x5a03f7(0x91)];_0x5c5f89[_0x5a03f7(0x92)](!![]),_0x5c5f89['resume'](),_0x5c5f89[_0x5a03f7(0xa3)](_0x5a03f7(0xa7));const _0x4d54f4=_0x1c1856=>{const _0x174f7f=_0x5a03f7;_0x5c5f89['setRawMode'](![]),_0x5c5f89['pause'](),_0x5c5f89['removeListener'](_0x174f7f(0x95),_0x4d54f4);if(_0x1c1856==='\x1b'){process[_0x174f7f(0x9c)][_0x174f7f(0xa0)]('\x0a'),_0x213fad(![]);return;}_0x1c1856==='\x03'&&(process[_0x174f7f(0x9c)][_0x174f7f(0xa0)]('\x0a'),gracefulExit(0x82));if(_0x1c1856[_0x174f7f(0x9a)]()==='y'){process[_0x174f7f(0x9c)]['write']('y\x0a'),_0x213fad(!![]);return;}process[_0x174f7f(0x9c)]['write']('\x0a'),_0x213fad(![]);};_0x5c5f89['on'](_0x5a03f7(0x95),_0x4d54f4);});}
|
package/dist/utils/spinner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x298ec8,_0xe3ea1d){const _0x47869c=a211_0x2e7c,_0x557fcc=_0x298ec8();while(!![]){try{const _0x5cfc6b=-parseInt(_0x47869c(0x1a2))/0x1*(parseInt(_0x47869c(0x1ab))/0x2)+-parseInt(_0x47869c(0x1a9))/0x3+parseInt(_0x47869c(0x19c))/0x4*(parseInt(_0x47869c(0x1a5))/0x5)+parseInt(_0x47869c(0x1a6))/0x6*(parseInt(_0x47869c(0x19a))/0x7)+parseInt(_0x47869c(0x19e))/0x8+-parseInt(_0x47869c(0x199))/0x9+parseInt(_0x47869c(0x1ac))/0xa;if(_0x5cfc6b===_0xe3ea1d)break;else _0x557fcc['push'](_0x557fcc['shift']());}catch(_0x25d9ce){_0x557fcc['push'](_0x557fcc['shift']());}}}(a211_0x5e65,0x804b8));import a211_0x3fa10f from'ora';import{isWindows}from'./process.js';const windowsSpinner={'interval':0x3e8,'frames':['•']};export function createCommandSpinner(_0x52a7d0,_0x4cfe20={}){const _0x2f5435=a211_0x2e7c,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x4cfe20;return a211_0x3fa10f({'text':_0x52a7d0,'color':_0x2f5435(0x1af),'stream':process[_0x2f5435(0x1a4)],'isEnabled':forceEnabled||process['stderr'][_0x2f5435(0x194)]&&!verbose,...isWindows()&&{'spinner':windowsSpinner}});}export async function withSpinner(_0x5bb42f,_0x54ff84,_0x25fdee={}){const _0x505d8a=a211_0x2e7c,_0x2e929f=_0x25fdee[_0x505d8a(0x1ad)]??(()=>Date['now']()),_0x21a5c0=createCommandSpinner(_0x5bb42f,_0x25fdee);_0x21a5c0['start']();const _0x9c4af8=_0x2e929f();try{const _0x587e8f=await _0x54ff84(),_0x5d4d9f=_0x2e929f()-_0x9c4af8;return _0x21a5c0[_0x505d8a(0x1a3)](),{'data':_0x587e8f,'elapsedMs':_0x5d4d9f};}catch(_0x3b55f5){_0x21a5c0[_0x505d8a(0x1a3)]();throw _0x3b55f5;}}function a211_0x5e65(){const _0x2adddb=['floor','extra','1pQKkTw','stop','stderr','21380rpNuZV','672vQdOip','trim','jobId','640599ZiNuns','Processing','2033854AlEahy','2896730hNBSFY','clock','isSpinning','cyan','isTTY','phase','\x20[Job\x20ID:\x20','text','now','2752875hgELjV','56504XSBUUP','start','428xGhLiG','replace','3284496EKkGLA','toFixed'];a211_0x5e65=function(){return _0x2adddb;};return a211_0x5e65();}export async function withProgressSpinner(_0xc64116,_0x5539d9,_0x4a94b5={}){const _0x2f19a2=a211_0x2e7c,_0x45cdaf=_0x4a94b5[_0x2f19a2(0x1ad)]??(()=>Date[_0x2f19a2(0x198)]()),_0x455104=_0x4a94b5['intervalFactory']??setInterval,_0x217c64=createCommandSpinner(_0xc64116,_0x4a94b5);_0x217c64[_0x2f19a2(0x19b)]();const _0x2b300c=_0x45cdaf(),_0x1f2b93=_0xc64116[_0x2f19a2(0x19d)]('...','')['trim']()||_0x2f19a2(0x1aa),_0x54e869={};let _0x4fc83d=_0xc64116;const _0x45756f=()=>{const _0x16a9db=_0x2f19a2;if(!_0x217c64['isSpinning'])return;const _0x3d2864=_0x45cdaf()-_0x2b300c,_0x2e4134=formatElapsed(_0x3d2864),_0x30c5ee=_0x54e869[_0x16a9db(0x195)]?.[_0x16a9db(0x1a7)]()||_0x1f2b93,_0x81f669=_0x54e869[_0x16a9db(0x1a8)]?_0x16a9db(0x196)+_0x54e869['jobId']+']':'',_0x4196f3=_0x54e869[_0x16a9db(0x1a1)]?'\x20'+_0x54e869[_0x16a9db(0x1a1)]:'',_0x3a8d36=_0x30c5ee+'\x20'+_0x2e4134+_0x4196f3+_0x81f669;_0x3a8d36!==_0x4fc83d&&_0x3a8d36[_0x16a9db(0x1a7)]()&&(_0x217c64[_0x16a9db(0x197)]=_0x3a8d36,_0x4fc83d=_0x3a8d36);},_0x5849a7=_0x455104(()=>{_0x45756f();},0x3e8),_0x1e1f4f={'setPhase':_0x188ae9=>{const _0x61ec89=_0x2f19a2;_0x54e869[_0x61ec89(0x195)]=_0x188ae9;const _0x571920=_0x188ae9?.['trim']()||_0x1f2b93,_0x42cf5b=_0x45cdaf()-_0x2b300c,_0x2ecacf=formatElapsed(_0x42cf5b),_0x4325d1=_0x54e869[_0x61ec89(0x1a8)]?'\x20[Job\x20ID:\x20'+_0x54e869['jobId']+']':'',_0x100444=_0x54e869[_0x61ec89(0x1a1)]?'\x20'+_0x54e869[_0x61ec89(0x1a1)]:'',_0x24eb0b=_0x571920+'\x20'+_0x2ecacf+_0x100444+_0x4325d1;_0x217c64[_0x61ec89(0x1ae)]&&_0x24eb0b[_0x61ec89(0x1a7)]()&&(_0x217c64['text']=_0x24eb0b,_0x4fc83d=_0x24eb0b);},'setJobId':_0x365945=>{const _0x5c833c=_0x2f19a2;_0x54e869[_0x5c833c(0x1a8)]=_0x365945,_0x45756f();},'setExtra':_0x10a11b=>{const _0x5e7c8e=_0x2f19a2;_0x54e869[_0x5e7c8e(0x1a1)]=_0x10a11b,_0x45756f();}};_0x45756f();try{const _0x3e0efe=await _0x5539d9(_0x1e1f4f),_0x4778dc=_0x45cdaf()-_0x2b300c;return{'data':_0x3e0efe,'elapsedMs':_0x4778dc};}finally{clearInterval(_0x5849a7),_0x217c64[_0x2f19a2(0x1a3)]();}}function a211_0x2e7c(_0x500fe9,_0x372f77){_0x500fe9=_0x500fe9-0x194;const _0x5e6553=a211_0x5e65();let _0x2e7c5f=_0x5e6553[_0x500fe9];return _0x2e7c5f;}export function formatElapsed(_0x3a7c31){const _0x5d6c6c=a211_0x2e7c,_0x391517=Math['floor'](_0x3a7c31/0x3e8);if(_0x391517<0x3c)return(_0x3a7c31/0x3e8)[_0x5d6c6c(0x19f)](0x1)+'s';const _0x425284=Math[_0x5d6c6c(0x1a0)](_0x391517/0x3c),_0x2e0351=_0x391517%0x3c;if(_0x425284<0x3c)return _0x425284+'m\x20'+_0x2e0351+'s';const _0x493776=Math[_0x5d6c6c(0x1a0)](_0x425284/0x3c),_0x1d2fea=_0x425284%0x3c;return _0x493776+'h\x20'+_0x1d2fea+'m';}
|
package/dist/utils/sse-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5ee277,_0x2e17f2){const _0x3fb064=a212_0xb310,_0x520dc8=_0x5ee277();while(!![]){try{const _0x4f19a2=parseInt(_0x3fb064(0xb1))/0x1*(parseInt(_0x3fb064(0xb0))/0x2)+parseInt(_0x3fb064(0xaf))/0x3+parseInt(_0x3fb064(0xae))/0x4*(parseInt(_0x3fb064(0x9e))/0x5)+-parseInt(_0x3fb064(0xab))/0x6+-parseInt(_0x3fb064(0xa8))/0x7*(parseInt(_0x3fb064(0x9d))/0x8)+parseInt(_0x3fb064(0xa1))/0x9+-parseInt(_0x3fb064(0xa5))/0xa;if(_0x4f19a2===_0x2e17f2)break;else _0x520dc8['push'](_0x520dc8['shift']());}catch(_0x1ba193){_0x520dc8['push'](_0x520dc8['shift']());}}}(a212_0xcc91,0x759c5));function a212_0xcc91(){const _0x5c5bd7=['trim','[LLM\x20API\x20SSE]\x20','323598CKCOAQ','split','body','8kunCrB','627189ltAlhF','2xInrip','266206UDAMoh','indexOf','releaseLock','parse','slice','338432qrtYAl','907190kynDSS','event','Response\x20body\x20is\x20null','2801754MmSCgH','Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20','debug','data','3176570itzaaH','decode','startsWith','49RhtdOV'];a212_0xcc91=function(){return _0x5c5bd7;};return a212_0xcc91();}export async function*parseSSEStream(_0x308484,_0x4b55f7){const _0x581cfb=a212_0xb310;if(!_0x308484[_0x581cfb(0xad)])throw new Error(_0x581cfb(0xa0));const _0x161353=_0x308484[_0x581cfb(0xad)]['getReader'](),_0x472215=new TextDecoder();let _0x3fb929='',_0x340ff5={};try{while(!![]){const {done:_0x531973,value:_0x2fd8a2}=await _0x161353['read']();if(_0x531973){if(_0x340ff5['data']){_0x4b55f7?.['debug']('[LLM\x20API\x20SSE]\x20'+_0x340ff5[_0x581cfb(0xa4)]);const _0x5ecdb5=parseSSEData(_0x340ff5[_0x581cfb(0xa4)]);yield _0x5ecdb5;}break;}_0x3fb929+=_0x472215[_0x581cfb(0xa6)](_0x2fd8a2,{'stream':!![]});const _0x3fe0e0=_0x3fb929[_0x581cfb(0xac)]('\x0a');_0x3fb929=_0x3fe0e0['pop']()||'';for(const _0x20cbeb of _0x3fe0e0){if(_0x20cbeb[_0x581cfb(0xa9)]()===''){if(_0x340ff5[_0x581cfb(0xa4)]){_0x4b55f7?.[_0x581cfb(0xa3)](_0x581cfb(0xaa)+_0x340ff5['data']);const _0xc19aa9=parseSSEData(_0x340ff5[_0x581cfb(0xa4)]);yield _0xc19aa9,_0x340ff5={};}continue;}if(_0x20cbeb['startsWith'](':'))continue;const _0x471313=_0x20cbeb[_0x581cfb(0xb2)](':');if(_0x471313===-0x1)continue;const _0x597c40=_0x20cbeb[_0x581cfb(0x9c)](0x0,_0x471313);let _0x41b549=_0x20cbeb[_0x581cfb(0x9c)](_0x471313+0x1);_0x41b549[_0x581cfb(0xa7)]('\x20')&&(_0x41b549=_0x41b549[_0x581cfb(0x9c)](0x1));switch(_0x597c40){case _0x581cfb(0x9f):_0x340ff5[_0x581cfb(0x9f)]=_0x41b549;break;case'data':_0x340ff5[_0x581cfb(0xa4)]=_0x340ff5[_0x581cfb(0xa4)]?_0x340ff5['data']+'\x0a'+_0x41b549:_0x41b549;break;case'id':_0x340ff5['id']=_0x41b549;break;}}}}finally{_0x161353[_0x581cfb(0x9a)]();}}function a212_0xb310(_0x2738d3,_0x1ad6f5){_0x2738d3=_0x2738d3-0x9a;const _0xcc9191=a212_0xcc91();let _0xb310dd=_0xcc9191[_0x2738d3];return _0xb310dd;}function parseSSEData(_0x536621){const _0x3a9d9f=a212_0xb310;try{return JSON[_0x3a9d9f(0x9b)](_0x536621);}catch(_0xd4b60){throw new Error(_0x3a9d9f(0xa2)+_0x536621,{'cause':_0xd4b60});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2d33b4,_0x3af1ad){const _0x5e2a47=a213_0x52b8,_0x3ada18=_0x2d33b4();while(!![]){try{const _0x22d620=parseInt(_0x5e2a47(0x1af))/0x1*(-parseInt(_0x5e2a47(0x1a8))/0x2)+-parseInt(_0x5e2a47(0x1ae))/0x3*(parseInt(_0x5e2a47(0x1be))/0x4)+parseInt(_0x5e2a47(0x1bd))/0x5*(parseInt(_0x5e2a47(0x1a9))/0x6)+-parseInt(_0x5e2a47(0x1b5))/0x7+-parseInt(_0x5e2a47(0x1b2))/0x8*(parseInt(_0x5e2a47(0x1bb))/0x9)+parseInt(_0x5e2a47(0x1b7))/0xa+parseInt(_0x5e2a47(0x1b9))/0xb;if(_0x22d620===_0x3af1ad)break;else _0x3ada18['push'](_0x3ada18['shift']());}catch(_0x4651ee){_0x3ada18['push'](_0x3ada18['shift']());}}}(a213_0xd2e3,0x98174));import a213_0x25668a from'string-width';export function stringWidth(_0x36c8de){return a213_0x25668a(_0x36c8de);}export function padEnd(_0x3d7a86,_0x51b0c5){const _0x2d24c2=stringWidth(_0x3d7a86);if(_0x2d24c2>=_0x51b0c5)return _0x3d7a86;return _0x3d7a86+'\x20'['repeat'](_0x51b0c5-_0x2d24c2);}export function padStart(_0x1cf9e8,_0xf8c04){const _0x1cec81=a213_0x52b8,_0xe1a520=stringWidth(_0x1cf9e8);if(_0xe1a520>=_0xf8c04)return _0x1cf9e8;return'\x20'[_0x1cec81(0x1b8)](_0xf8c04-_0xe1a520)+_0x1cf9e8;}export function centerAlign(_0x5e6bce,_0x184773){const _0x3920dd=a213_0x52b8,_0x1c23a9=stringWidth(_0x5e6bce);if(_0x1c23a9>_0x184773){if(_0x184773<=0x1)return'…'[_0x3920dd(0x1b4)](0x0,_0x184773);let _0x26eb4d=_0x5e6bce;while(stringWidth(_0x26eb4d+'…')>_0x184773){_0x26eb4d=_0x26eb4d[_0x3920dd(0x1b1)](0x0,-0x1);}return _0x26eb4d+'…';}if(_0x1c23a9===_0x184773)return _0x5e6bce;const _0x39cc49=_0x184773-_0x1c23a9,_0x5c070b=Math[_0x3920dd(0x1ab)](_0x39cc49/0x2),_0x4c0e28=_0x39cc49-_0x5c070b;return'\x20'[_0x3920dd(0x1b8)](_0x5c070b)+_0x5e6bce+'\x20'['repeat'](_0x4c0e28);}function a213_0x52b8(_0x118b69,_0x30f0b2){_0x118b69=_0x118b69-0x1a8;const _0xd2e3b3=a213_0xd2e3();let _0x52b80f=_0xd2e3b3[_0x118b69];return _0x52b80f;}export function escapeStringLiteral(_0x385382){const _0x3fc900=a213_0x52b8;if(!_0x385382||_0x385382[_0x3fc900(0x1ad)]()['length']===0x0)throw new Error(_0x3fc900(0x1ac));const _0x1cdbe0=_0x385382[_0x3fc900(0x1ba)](/'/g,'\x27\x27');return'\x27'+_0x1cdbe0+'\x27';}export function globToLike(_0x1bb08e){const _0x1e1e92=a213_0x52b8;let _0x354034=_0x1bb08e[_0x1e1e92(0x1ba)](/\\/g,'\x5c\x5c')['replace'](/%/g,'\x5c%')['replace'](/_/g,'\x5c_');return _0x354034=_0x354034[_0x1e1e92(0x1ba)](/\*/g,'%')[_0x1e1e92(0x1ba)](/\?/g,'_'),_0x354034;}export function buildLikePattern(_0x418280){const _0x755d88=a213_0x52b8;if(!_0x418280||_0x418280[_0x755d88(0x1ad)]()[_0x755d88(0x1b0)]===0x0)throw new Error(_0x755d88(0x1aa));const _0x4ac939=globToLike(_0x418280),_0x31e49b=_0x4ac939['replace'](/'/g,'\x27\x27');return'\x27'+_0x31e49b+'\x27';}export function matchGlobPattern(_0x2f615c,_0x208558){const _0x18cc98=a213_0x52b8,_0xbad4f9=_0x208558[_0x18cc98(0x1ba)](/[.+^${}()|[\]\\]/g,_0x18cc98(0x1bf))[_0x18cc98(0x1ba)](/\*/g,'.*')['replace'](/\?/g,'.'),_0x3b083a=new RegExp('^'+_0xbad4f9+'$');return _0x3b083a['test'](_0x2f615c);}export function getSanitizedUsername(){const _0x379d12=a213_0x52b8,_0x5154be=process.env.USER||process.env.USERNAME||_0x379d12(0x1b6);return _0x5154be['replace'](/[^a-zA-Z0-9]/g,'')[_0x379d12(0x1b3)]();}export function generateRandomHex(){const _0x758dc8=a213_0x52b8,_0x1b5adf=Math[_0x758dc8(0x1ab)](Math[_0x758dc8(0x1bc)]()*0xfffff);return _0x1b5adf['toString'](0x10)['padStart'](0x5,'0');}function a213_0xd2e3(){const _0x3257e4=['2389030tERPRC','repeat','37588606DKzrJC','replace','105201kNxgZO','random','7135McKaRY','892xxWtQM','\x5c$&','2vNzfIi','1446KZfBhD','Cannot\x20build\x20LIKE\x20pattern\x20from\x20empty\x20string','floor','Cannot\x20escape\x20empty\x20string\x20literal','trim','13569RDkmoV','941384xhWxIJ','length','slice','208wiPhiK','toLowerCase','substring','7861455YTjUpN','unknown'];a213_0xd2e3=function(){return _0x3257e4;};return a213_0xd2e3();}export function sanitizeFileName(_0x1a4c01){const _0x4aa923=a213_0x52b8;return _0x1a4c01[_0x4aa923(0x1b3)]()[_0x4aa923(0x1ba)](/[/\\:*?"<>|]/g,'-')[_0x4aa923(0x1ba)](/\s+/g,'-')[_0x4aa923(0x1ba)](/-+/g,'-')['replace'](/^-|-$/g,'');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a214_0x3e3a(_0x1591b2,_0x529740){_0x1591b2=_0x1591b2-0x1d5;const _0x18dfd0=a214_0x18df();let _0x3e3a16=_0x18dfd0[_0x1591b2];return _0x3e3a16;}(function(_0x574399,_0x57831c){const _0x3da8eb=a214_0x3e3a,_0x490b51=_0x574399();while(!![]){try{const _0x39f1ad=parseInt(_0x3da8eb(0x1ea))/0x1+parseInt(_0x3da8eb(0x1df))/0x2*(-parseInt(_0x3da8eb(0x1e5))/0x3)+parseInt(_0x3da8eb(0x1e8))/0x4*(parseInt(_0x3da8eb(0x1ec))/0x5)+parseInt(_0x3da8eb(0x1e2))/0x6*(-parseInt(_0x3da8eb(0x1e3))/0x7)+parseInt(_0x3da8eb(0x1e7))/0x8+parseInt(_0x3da8eb(0x1d7))/0x9*(parseInt(_0x3da8eb(0x1e6))/0xa)+-parseInt(_0x3da8eb(0x1de))/0xb;if(_0x39f1ad===_0x57831c)break;else _0x490b51['push'](_0x490b51['shift']());}catch(_0x563f1b){_0x490b51['push'](_0x490b51['shift']());}}}(a214_0x18df,0xd8eff));function hasWildcard(_0x40eee2){const _0x2c241a=a214_0x3e3a;return _0x40eee2[_0x2c241a(0x1db)]('*')||_0x40eee2[_0x2c241a(0x1db)]('?');}function a214_0x18df(){const _0x301dfe=['9177864AelUai','124836pEkVsF','table','237843ICcRWW','Invalid\x20pattern\x20format\x20-\x20too\x20many\x20dots\x20(max:\x20catalog.database.table)','40KXaFjo','Table\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20tables\x20(e.g.,\x20\x22mydb.*\x22)','Pattern\x20cannot\x20be\x20just\x20a\x20dot','569367mUiTPo','database','catalog','Invalid\x20catalog.database.table\x20format\x20-\x20all\x20parts\x20must\x20be\x20non-empty','includes','trim','push','20109122oQuCDF','8hWbfKF','split','Database\x20part\x20cannot\x20be\x20empty\x20-\x20use\x20\x22*\x22\x20for\x20all\x20databases\x20(e.g.,\x20\x22*.mytable\x22)','24UyKYwX','790132aqGoWM','length','131001AjPvbq','270QjCcJw'];a214_0x18df=function(){return _0x301dfe;};return a214_0x18df();}export function parseTableReference(_0x2212bd){const _0x34b2c8=a214_0x3e3a;if(!_0x2212bd||_0x2212bd['trim']()[_0x34b2c8(0x1e4)]===0x0)throw new Error('Pattern\x20cannot\x20be\x20empty\x20or\x20whitespace-only');const _0x136b27=_0x2212bd[_0x34b2c8(0x1dc)](),_0x1b6d34={'original':_0x136b27},_0x3c602f=_0x136b27[_0x34b2c8(0x1e0)]('.');if(_0x3c602f['length']===0x1){const _0x2c9702=_0x3c602f[0x0];if(!_0x2c9702)throw new Error(_0x34b2c8(0x1d6));_0x1b6d34[_0x34b2c8(0x1e9)]=_0x2c9702;}else{if(_0x3c602f['length']===0x2){const [_0x48cb77,_0x381c12]=_0x3c602f;if(!_0x48cb77)throw new Error(_0x34b2c8(0x1e1));if(!_0x381c12)throw new Error(_0x34b2c8(0x1d5));_0x1b6d34['database']=_0x48cb77,_0x1b6d34[_0x34b2c8(0x1e9)]=_0x381c12;}else{if(_0x3c602f['length']===0x3){const [_0xed846e,_0x4645c3,_0x26cb60]=_0x3c602f;if(!_0xed846e||!_0x4645c3||!_0x26cb60)throw new Error(_0x34b2c8(0x1da));_0x1b6d34[_0x34b2c8(0x1d9)]=_0xed846e,_0x1b6d34['database']=_0x4645c3,_0x1b6d34[_0x34b2c8(0x1e9)]=_0x26cb60;}else throw new Error(_0x34b2c8(0x1eb));}}return _0x1b6d34;}export function formatTableReference(_0x2f9612){const _0xf62a54=a214_0x3e3a,_0x4b48c2=[];return _0x2f9612[_0xf62a54(0x1d9)]&&_0x4b48c2[_0xf62a54(0x1dd)](_0x2f9612[_0xf62a54(0x1d9)]),_0x2f9612[_0xf62a54(0x1d8)]&&_0x4b48c2[_0xf62a54(0x1dd)](_0x2f9612[_0xf62a54(0x1d8)]),_0x2f9612['table']&&_0x4b48c2[_0xf62a54(0x1dd)](_0x2f9612['table']),_0x4b48c2['join']('.');}export function validateTableListReference(_0xa3e8d4){return undefined;}export function validateTableDescribeReference(_0x315279){const _0x33190f=a214_0x3e3a;if(!_0x315279[_0x33190f(0x1e9)])return'Table\x20name\x20is\x20required\x20for\x20describe\x20operation';if(_0x315279[_0x33190f(0x1d8)]&&hasWildcard(_0x315279[_0x33190f(0x1d8)]))return'Wildcards\x20are\x20not\x20allowed\x20in\x20database\x20name\x20for\x20describe\x20operation';if(hasWildcard(_0x315279['table']))return'Wildcards\x20are\x20not\x20allowed\x20in\x20table\x20name\x20for\x20describe\x20operation';return undefined;}
|
package/dist/utils/tdx-logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a215_0x4f868e=a215_0x1daf;function a215_0x5b13(){const _0x14bac9=['12162TecfyG','fileHandler','fileOnly','Session\x20ended','close','754524mnDNdV','3LCMDQp','5sQqEjq','shutdown','176058nPmqwy','logDir','error','INFO','debug','12456950fmSffi','3175860sCUcPC','info','12dSfWok','739172nvkNXT','push','logFileName','warn','logs','consoleHandler','isInitialized','init','32sHAiuI','logLevel','1232014GBgXgm','tdx.log','getLogPath','trace','logger'];a215_0x5b13=function(){return _0x14bac9;};return a215_0x5b13();}(function(_0x36ace2,_0x4264ea){const _0x2c856d=a215_0x1daf,_0x5b38c4=_0x36ace2();while(!![]){try{const _0x1d8aeb=-parseInt(_0x2c856d(0xa6))/0x1*(parseInt(_0x2c856d(0xa0))/0x2)+-parseInt(_0x2c856d(0xa9))/0x3+-parseInt(_0x2c856d(0xb2))/0x4*(-parseInt(_0x2c856d(0xa7))/0x5)+parseInt(_0x2c856d(0xb1))/0x6*(-parseInt(_0x2c856d(0x9b))/0x7)+-parseInt(_0x2c856d(0x99))/0x8*(parseInt(_0x2c856d(0xa5))/0x9)+-parseInt(_0x2c856d(0xaf))/0xa+parseInt(_0x2c856d(0xae))/0xb;if(_0x1d8aeb===_0x4264ea)break;else _0x5b38c4['push'](_0x5b38c4['shift']());}catch(_0x338294){_0x5b38c4['push'](_0x5b38c4['shift']());}}}(a215_0x5b13,0x39774));import{join}from'path';function a215_0x1daf(_0x4634f4,_0x1238eb){_0x4634f4=_0x4634f4-0x97;const _0x5b139a=a215_0x5b13();let _0x1daf97=_0x5b139a[_0x4634f4];return _0x1daf97;}import{Logger,LogLevel,FileHandler,ConsoleHandler,DefaultLogFormatter}from'./logger/index.js';import{getGlobalCacheDir}from'./global-cache.js';export{LogLevel}from'./logger/index.js';export class TDXLogger{[a215_0x4f868e(0x9a)];[a215_0x4f868e(0xa2)];[a215_0x4f868e(0xaa)];['logFileName'];[a215_0x4f868e(0x9f)];[a215_0x4f868e(0xa1)]=null;[a215_0x4f868e(0xb7)]=null;constructor(_0xc046ae=LogLevel[a215_0x4f868e(0xac)],_0x3e13f4=![],_0x3cee41,_0x13f451=a215_0x4f868e(0x9c)){const _0x2f7fe1=a215_0x4f868e;this[_0x2f7fe1(0x9a)]=_0xc046ae,this[_0x2f7fe1(0xa2)]=_0x3e13f4,this['logDir']=_0x3cee41||join(getGlobalCacheDir(),_0x2f7fe1(0xb6)),this[_0x2f7fe1(0xb4)]=_0x13f451,this[_0x2f7fe1(0x9f)]=Logger['of']('tdx');}async[a215_0x4f868e(0x98)](){const _0x10d127=a215_0x4f868e,_0x29dc1c=join(this[_0x10d127(0xaa)],this[_0x10d127(0xb4)]);if(Logger[_0x10d127(0x97)]()){!this['fileOnly']&&(this['consoleHandler']=new ConsoleHandler({'minLevel':LogLevel[_0x10d127(0xac)],'colors':!![]}),Logger['addHandler'](this['consoleHandler']));return;}this[_0x10d127(0xa1)]=new FileHandler({'filePath':_0x29dc1c});const _0x141f17=[this[_0x10d127(0xa1)]];!this[_0x10d127(0xa2)]&&(this[_0x10d127(0xb7)]=new ConsoleHandler({'minLevel':LogLevel[_0x10d127(0xac)],'colors':!![]}),_0x141f17[_0x10d127(0xb3)](this[_0x10d127(0xb7)])),await Logger[_0x10d127(0x98)]({'defaultLevel':this['logLevel'],'handlers':_0x141f17,'formatter':new DefaultLogFormatter({'colors':!![]})});}[a215_0x4f868e(0xad)](..._0x2170de){const _0x59e062=a215_0x4f868e;this[_0x59e062(0x9f)][_0x59e062(0xad)](..._0x2170de);}[a215_0x4f868e(0x9e)](..._0x581439){const _0x12f617=a215_0x4f868e;this['logger'][_0x12f617(0x9e)](..._0x581439);}[a215_0x4f868e(0xb0)](..._0x2dbd39){const _0x1e9598=a215_0x4f868e;this[_0x1e9598(0x9f)][_0x1e9598(0xb0)](..._0x2dbd39);}[a215_0x4f868e(0xb5)](..._0x1b35e5){const _0x3d337b=a215_0x4f868e;this[_0x3d337b(0x9f)][_0x3d337b(0xb5)](..._0x1b35e5);}['error'](..._0x14666a){const _0x2324a6=a215_0x4f868e;this[_0x2324a6(0x9f)][_0x2324a6(0xab)](..._0x14666a);}async[a215_0x4f868e(0xa4)](){const _0x14af45=a215_0x4f868e;this[_0x14af45(0x9f)][_0x14af45(0xb0)](_0x14af45(0xa3)),await Logger[_0x14af45(0xa8)]();}[a215_0x4f868e(0x9d)](){const _0x124935=a215_0x4f868e;return join(this[_0x124935(0xaa)],this[_0x124935(0xb4)]);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a216_0x1b6eeb=a216_0x537c;(function(_0x36ea8d,_0x2d0edc){const _0x12148f=a216_0x537c,_0x5d9f18=_0x36ea8d();while(!![]){try{const _0x339704=-parseInt(_0x12148f(0xdc))/0x1*(-parseInt(_0x12148f(0xf5))/0x2)+-parseInt(_0x12148f(0xe0))/0x3+parseInt(_0x12148f(0xd8))/0x4*(parseInt(_0x12148f(0xd2))/0x5)+-parseInt(_0x12148f(0xd3))/0x6+-parseInt(_0x12148f(0xef))/0x7+-parseInt(_0x12148f(0xd0))/0x8*(-parseInt(_0x12148f(0xdb))/0x9)+parseInt(_0x12148f(0xde))/0xa;if(_0x339704===_0x2d0edc)break;else _0x5d9f18['push'](_0x5d9f18['shift']());}catch(_0x1364fa){_0x5d9f18['push'](_0x5d9f18['shift']());}}}(a216_0x3fff,0x41415));import{get}from'https';import{gt,valid}from'semver';import a216_0x5c2e56 from'chalk';import{createGlobalCache}from'./global-cache.js';function a216_0x537c(_0x4b1d76,_0x13b9cd){_0x4b1d76=_0x4b1d76-0xc9;const _0x3fffce=a216_0x3fff();let _0x537c56=_0x3fffce[_0x4b1d76];return _0x537c56;}const CACHE_DURATION_MS=0x18*0x3c*0x3c*0x3e8,NPM_REGISTRY_BASE=a216_0x1b6eeb(0xcf),TIMEOUT_MS=0x7d0,stableVersionCache=createGlobalCache(a216_0x1b6eeb(0xf2),a216_0x1b6eeb(0xcb)),nextVersionCache=createGlobalCache('last_version_check_next','utils/version-check-next');function getCacheForChannel(_0x296854){const _0x3be630=a216_0x1b6eeb;return _0x296854===_0x3be630(0xd6)?nextVersionCache:stableVersionCache;}function readCache(_0x5d8667){const _0x1af194=a216_0x1b6eeb;return getCacheForChannel(_0x5d8667)[_0x1af194(0xf3)]()??null;}function writeCache(_0x5dc363,_0x6d18d3){const _0x18b4be=a216_0x1b6eeb;try{getCacheForChannel(_0x6d18d3)[_0x18b4be(0xeb)]({'lastCheck':new Date()[_0x18b4be(0xd4)](),'latestVersion':_0x5dc363});}catch{}}function isCacheValid(_0x91dd6f){const _0x51c35f=a216_0x1b6eeb;if(!_0x91dd6f)return![];const _0x1819b4=new Date(_0x91dd6f[_0x51c35f(0xe4)])[_0x51c35f(0xce)](),_0x54a11f=Date[_0x51c35f(0xc9)]();return _0x54a11f-_0x1819b4<CACHE_DURATION_MS;}export function fetchLatestVersion(_0x13a779=a216_0x1b6eeb(0xe5)){const _0x3e8b1c=a216_0x1b6eeb,_0x1d23c9=_0x13a779===_0x3e8b1c(0xd6)?_0x3e8b1c(0xd6):'latest',_0x388f60=NPM_REGISTRY_BASE+'/'+_0x1d23c9;return new Promise((_0x5e126e,_0x110edf)=>{const _0x10ff95=_0x3e8b1c,_0x594b6b=get(_0x388f60,{'timeout':TIMEOUT_MS},_0x464f13=>{const _0x998e6b=a216_0x537c;if(_0x464f13['statusCode']!==0xc8){clearTimeout(_0x5218ad),_0x110edf(new Error(_0x998e6b(0xd9)+_0x464f13['statusCode']));return;}let _0xf24ff='';_0x464f13['on'](_0x998e6b(0xcc),_0x286ccd=>{_0xf24ff+=_0x286ccd;}),_0x464f13['on'](_0x998e6b(0xf1),()=>{const _0x2b96f7=_0x998e6b;clearTimeout(_0x5218ad);try{const _0x34ec77=JSON[_0x2b96f7(0xea)](_0xf24ff);if(!valid(_0x34ec77['version'])){_0x110edf(new Error('Invalid\x20version\x20format'));return;}_0x5e126e(_0x34ec77[_0x2b96f7(0xe2)]);}catch(_0x123832){_0x110edf(_0x123832);}});})['on'](_0x10ff95(0xda),_0x35f68d=>{clearTimeout(_0x5218ad),_0x110edf(_0x35f68d);});_0x594b6b['on'](_0x10ff95(0xed),_0x45e6fa=>{const _0x542b56=_0x10ff95;_0x45e6fa[_0x542b56(0xf0)]();});const _0x5218ad=setTimeout(()=>{const _0x222e36=_0x10ff95;_0x594b6b['destroy'](),_0x110edf(new Error(_0x222e36(0xf4)));},TIMEOUT_MS);_0x5218ad[_0x10ff95(0xf0)]();});}function a216_0x3fff(){const _0x354d1c=['now','Run:','utils/version-check','data','channel','getTime','https://registry.npmjs.org/@treasuredata/tdx','653232YbLcaT','gray','93715dIXGxT','2853444iOKuCk','toISOString','green','next','stderr','76HkKjdG','HTTP\x20','error','18KMGRLs','155JpdXVU','updateAvailable','3788140yhJFYw','tdx\x20upgrade\x20--next','117837ReZBmN','cyan','version','yellow','lastCheck','stable','currentVersion','isTTY','\x0aUpdate\x20available:\x20','dim','parse','write','latestVersion','socket','Update\x20available:','3697722TQugMF','unref','end','last_version_check','read','Request\x20timeout','5318exgyZX'];a216_0x3fff=function(){return _0x354d1c;};return a216_0x3fff();}export async function checkForUpdate(_0x22d5b5,_0x4ed787=a216_0x1b6eeb(0xe5)){const _0x1393c8=a216_0x1b6eeb;try{const _0x3f59b5=readCache(_0x4ed787);if(isCacheValid(_0x3f59b5)){const _0x324bf3=gt(_0x3f59b5[_0x1393c8(0xec)],_0x22d5b5);return{'updateAvailable':_0x324bf3,'currentVersion':_0x22d5b5,'latestVersion':_0x3f59b5[_0x1393c8(0xec)],'channel':_0x4ed787};}const _0x1ed7be=await fetchLatestVersion(_0x4ed787);writeCache(_0x1ed7be,_0x4ed787);const _0x49d814=gt(_0x1ed7be,_0x22d5b5);return{'updateAvailable':_0x49d814,'currentVersion':_0x22d5b5,'latestVersion':_0x1ed7be,'channel':_0x4ed787};}catch{return null;}}export function displayUpdateNotification(_0x2c38eb){const _0x33996a=a216_0x1b6eeb;if(!_0x2c38eb[_0x33996a(0xdd)])return;const _0x4aa672=_0x2c38eb[_0x33996a(0xcd)]==='next'?_0x33996a(0xdf):'tdx\x20upgrade',_0x915589=process['stderr'][_0x33996a(0xe7)]&&!process.env.NO_COLOR,_0x2bba00=_0x915589?a216_0x5c2e56[_0x33996a(0xd1)]('→'):'→',_0x4c9f54=_0x915589?a216_0x5c2e56[_0x33996a(0xe9)](_0x2c38eb['currentVersion']):_0x2c38eb[_0x33996a(0xe6)],_0x106906=_0x915589?a216_0x5c2e56[_0x33996a(0xd5)](_0x2c38eb['latestVersion']):_0x2c38eb[_0x33996a(0xec)],_0x29ff09=_0x915589?a216_0x5c2e56[_0x33996a(0xe1)](_0x4aa672):_0x4aa672,_0x21476c=_0x915589?'\x0a'+a216_0x5c2e56[_0x33996a(0xe3)](_0x33996a(0xee))+'\x20'+_0x4c9f54+'\x20'+_0x2bba00+'\x20'+_0x106906+'\x0a'+a216_0x5c2e56['dim'](_0x33996a(0xca))+'\x20'+_0x29ff09+'\x0a':_0x33996a(0xe8)+_0x4c9f54+'\x20'+_0x2bba00+'\x20'+_0x106906+'\x0aRun:\x20'+_0x29ff09+'\x0a';process[_0x33996a(0xd7)][_0x33996a(0xeb)](_0x21476c);}
|