@treasuredata/tdx 0.29.1 → 0.29.3
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/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/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/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/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/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/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.d.ts +1 -2
- package/dist/sdk/engage/types/campaign-schema.d.ts.map +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js.map +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.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.d.ts +13 -6
- package/dist/sdk/segment/journey-validator.d.ts.map +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-validator.js.map +1 -1
- 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.js +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/segment-validator.d.ts.map +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/segment-validator.js.map +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.d.ts +184 -0
- package/dist/sdk/segment/types/activation-schema.d.ts.map +1 -0
- package/dist/sdk/segment/types/activation-schema.js +1 -0
- package/dist/sdk/segment/types/activation-schema.js.map +1 -0
- package/dist/sdk/segment/types/journey-def.d.ts +5 -0
- package/dist/sdk/segment/types/journey-def.d.ts.map +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-def.js.map +1 -1
- package/dist/sdk/segment/types/journey-schema.d.ts +419 -0
- package/dist/sdk/segment/types/journey-schema.d.ts.map +1 -0
- package/dist/sdk/segment/types/journey-schema.js +1 -0
- package/dist/sdk/segment/types/journey-schema.js.map +1 -0
- package/dist/sdk/segment/types/segment-def.d.ts +4 -87
- package/dist/sdk/segment/types/segment-def.d.ts.map +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-def.js.map +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/validate-files.js.map +1 -1
- package/dist/sdk/segment/yaml-validator.d.ts +14 -1
- 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.js +1 -1
- package/dist/sdk/types/cdp.d.ts +3 -3
- 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/file-reader.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
|
-
(function(
|
|
1
|
+
(function(_0x204644,_0x51fb80){const _0x407de7=a177_0x15f0,_0x2a9f6d=_0x204644();while(!![]){try{const _0x1667c6=-parseInt(_0x407de7(0x14e))/0x1+-parseInt(_0x407de7(0x15b))/0x2+parseInt(_0x407de7(0x156))/0x3*(-parseInt(_0x407de7(0x157))/0x4)+-parseInt(_0x407de7(0x155))/0x5+-parseInt(_0x407de7(0x15e))/0x6+parseInt(_0x407de7(0x152))/0x7*(parseInt(_0x407de7(0x159))/0x8)+parseInt(_0x407de7(0x150))/0x9;if(_0x1667c6===_0x51fb80)break;else _0x2a9f6d['push'](_0x2a9f6d['shift']());}catch(_0x55b50f){_0x2a9f6d['push'](_0x2a9f6d['shift']());}}}(a177_0x4df9,0x5ae37));import*as a177_0x460e00 from'node:fs';import*as a177_0x577450 from'node:path';function a177_0x15f0(_0x44b046,_0x423f97){_0x44b046=_0x44b046-0x14c;const _0x4df9da=a177_0x4df9();let _0x15f080=_0x4df9da[_0x44b046];return _0x15f080;}export function setSecureFilePermissions(_0x514280){const _0x48c98b=a177_0x15f0;try{a177_0x460e00[_0x48c98b(0x153)](_0x514280,0x180);}catch{console[_0x48c98b(0x14f)](_0x48c98b(0x14c)+_0x514280);}}function a177_0x4df9(){const _0x442f8b=['9165gHtlvy','76SSedSJ','existsSync','1656HkJJzf','mode','113664GaabfF','statSync','mkdirSync','1481082LRrbac','dirname','Warning:\x20','Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20','Should\x20be\x200600\x20or\x20more\x20restrictive.','95962kKfeBH','warn','9880344jeOWny','\x20has\x20insecure\x20permissions\x20(','8169IqXqhV','chmodSync','writeFileSync','2547100sfqbwO'];a177_0x4df9=function(){return _0x442f8b;};return a177_0x4df9();}export function setSecureDirectoryPermissions(_0x1a2120){const _0x5f2fb6=a177_0x15f0;try{a177_0x460e00[_0x5f2fb6(0x153)](_0x1a2120,0x1c0);}catch{console[_0x5f2fb6(0x14f)](_0x5f2fb6(0x14c)+_0x1a2120);}}export function createSecureDirectory(_0x5e21a9){const _0x5ce1ba=a177_0x15f0;!a177_0x460e00[_0x5ce1ba(0x158)](_0x5e21a9)&&(a177_0x460e00[_0x5ce1ba(0x15d)](_0x5e21a9,{'recursive':!![],'mode':0x1c0}),setSecureDirectoryPermissions(_0x5e21a9));}export function validateSecureFilePermissions(_0x3145cc){const _0x1b5f44=a177_0x15f0;try{const _0x407c6c=a177_0x460e00[_0x1b5f44(0x15c)](_0x3145cc),_0x1ab388=_0x407c6c[_0x1b5f44(0x15a)]&0x1ff,_0x544571=(_0x1ab388&0x3f)!==0x0;if(_0x544571)return console['warn'](_0x1b5f44(0x160)+_0x3145cc+_0x1b5f44(0x151)+_0x1ab388['toString'](0x8)+').\x20'+_0x1b5f44(0x14d)),![];return!![];}catch{return!![];}}export function writeSecureFile(_0x19d7e9,_0x512f07){const _0x123e7c=a177_0x15f0,_0x4e4f9e=a177_0x577450[_0x123e7c(0x15f)](_0x19d7e9);createSecureDirectory(_0x4e4f9e),a177_0x460e00[_0x123e7c(0x154)](_0x19d7e9,_0x512f07,{'mode':0x180}),setSecureFilePermissions(_0x19d7e9);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x157755,_0xd884e5){const _0x126a58=a178_0x3669,_0x3896ad=_0x157755();while(!![]){try{const _0x768334=parseInt(_0x126a58(0xe1))/0x1*(-parseInt(_0x126a58(0xe0))/0x2)+parseInt(_0x126a58(0xd9))/0x3*(-parseInt(_0x126a58(0xcd))/0x4)+parseInt(_0x126a58(0xd2))/0x5*(-parseInt(_0x126a58(0xdf))/0x6)+parseInt(_0x126a58(0xca))/0x7+parseInt(_0x126a58(0xd7))/0x8*(parseInt(_0x126a58(0xdb))/0x9)+-parseInt(_0x126a58(0xcf))/0xa*(-parseInt(_0x126a58(0xcc))/0xb)+-parseInt(_0x126a58(0xd6))/0xc;if(_0x768334===_0xd884e5)break;else _0x3896ad['push'](_0x3896ad['shift']());}catch(_0x3392eb){_0x3896ad['push'](_0x3896ad['shift']());}}}(a178_0xcf3b,0x26d25));function a178_0x3669(_0xcb15b6,_0x512ad2){_0xcb15b6=_0xcb15b6-0xca;const _0xcf3b12=a178_0xcf3b();let _0x366956=_0xcf3b12[_0xcb15b6];return _0x366956;}import{readFileSync}from'fs';import{SDKError,ErrorCode}from'../sdk/errors.js';function a178_0xcf3b(){const _0x4c7e5a=['Error\x20reading\x20file\x20\x27','code','NOT_FOUND','1038804ftWyAv','57272YKfCJF','\x27:\x20','349719lvnVjq','EACCES','162hWxYKS','utf-8','PERMISSION_DENIED','File\x20\x27','17106flTtKQ','67826zYxCVI','4InNIHA','2039254TlTcaz','Permission\x20denied\x20reading\x20file\x20\x27','389147svqHcy','4eroGEc','message','30LDphIC','\x27\x20not\x20found','INTERNAL','50mVgnIF'];a178_0xcf3b=function(){return _0x4c7e5a;};return a178_0xcf3b();}export function readFileContent(_0x307b6f){const _0x483ef0=a178_0x3669;try{return readFileSync(_0x307b6f,_0x483ef0(0xdc));}catch(_0x4f50f3){const _0x4f784f=_0x4f50f3[_0x483ef0(0xd4)];if(_0x4f784f==='ENOENT')throw new SDKError(ErrorCode[_0x483ef0(0xd5)],_0x483ef0(0xde)+_0x307b6f+_0x483ef0(0xd0),_0x4f50f3);else{if(_0x4f784f===_0x483ef0(0xda))throw new SDKError(ErrorCode[_0x483ef0(0xdd)],_0x483ef0(0xcb)+_0x307b6f+'\x27',_0x4f50f3);else throw new SDKError(ErrorCode[_0x483ef0(0xd1)],_0x483ef0(0xd3)+_0x307b6f+_0x483ef0(0xd8)+_0x4f50f3[_0x483ef0(0xce)],_0x4f50f3);}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1f7a97,_0x5de2dc){const _0x3b2f49=a179_0x3ca8,_0x5dd3fb=_0x1f7a97();while(!![]){try{const _0x4f2172=-parseInt(_0x3b2f49(0x17a))/0x1*(parseInt(_0x3b2f49(0x183))/0x2)+parseInt(_0x3b2f49(0x175))/0x3*(-parseInt(_0x3b2f49(0x179))/0x4)+-parseInt(_0x3b2f49(0x17f))/0x5*(parseInt(_0x3b2f49(0x17d))/0x6)+parseInt(_0x3b2f49(0x181))/0x7*(parseInt(_0x3b2f49(0x185))/0x8)+-parseInt(_0x3b2f49(0x186))/0x9*(-parseInt(_0x3b2f49(0x187))/0xa)+parseInt(_0x3b2f49(0x176))/0xb*(-parseInt(_0x3b2f49(0x177))/0xc)+parseInt(_0x3b2f49(0x18a))/0xd*(parseInt(_0x3b2f49(0x188))/0xe);if(_0x4f2172===_0x5de2dc)break;else _0x5dd3fb['push'](_0x5dd3fb['shift']());}catch(_0x40db20){_0x5dd3fb['push'](_0x5dd3fb['shift']());}}}(a179_0x1893,0x2bd36));import{existsSync,mkdirSync,readFileSync,writeFileSync,unlinkSync}from'fs';import{join}from'path';import{homedir}from'os';export function getGlobalCacheDir(){const _0x51fd38=a179_0x3ca8;return process.env.TDX_CACHE_DIR||join(homedir(),_0x51fd38(0x17c),'tdx');}const registry=new Map();export function registerGlobalCacheKey(_0x228141,_0x4f5fad){const _0x16d939=a179_0x3ca8,_0x4e6f9c=registry['get'](_0x228141);if(_0x4e6f9c&&_0x4e6f9c!==_0x4f5fad)throw new Error(_0x16d939(0x18b)+_0x228141+'\x22\x20already\x20registered\x20by\x20\x22'+_0x4e6f9c+_0x16d939(0x180)+_0x4f5fad+'\x22');registry[_0x16d939(0x189)](_0x228141,_0x4f5fad);}export function getGlobalCachePath(_0x2282bf){return join(getGlobalCacheDir(),_0x2282bf);}function ensureGlobalCacheDir(){const _0x5b2cf2=getGlobalCacheDir();!existsSync(_0x5b2cf2)&&mkdirSync(_0x5b2cf2,{'recursive':!![]});}function readCacheJson(_0x46eda3){const _0x9cf4ca=getGlobalCachePath(_0x46eda3);if(!existsSync(_0x9cf4ca))return undefined;try{const _0x1373b7=readFileSync(_0x9cf4ca,'utf-8');return JSON['parse'](_0x1373b7);}catch{return undefined;}}function writeCacheJson(_0x39bc19,_0x33c3a6){const _0xe6b544=a179_0x3ca8;ensureGlobalCacheDir(),writeFileSync(getGlobalCachePath(_0x39bc19),JSON[_0xe6b544(0x178)](_0x33c3a6,null,0x2),'utf-8');}function readCacheText(_0xb6ceb9){const _0x37cf0c=a179_0x3ca8,_0x3ce17c=getGlobalCachePath(_0xb6ceb9);if(!existsSync(_0x3ce17c))return undefined;try{return readFileSync(_0x3ce17c,_0x37cf0c(0x17e));}catch{return undefined;}}function writeCacheText(_0x4f852b,_0x4f5af2){const _0x31ea35=a179_0x3ca8;ensureGlobalCacheDir(),writeFileSync(getGlobalCachePath(_0x4f852b),_0x4f5af2,_0x31ea35(0x17e));}function clearCache(_0x191206){const _0x1cbdc3=getGlobalCachePath(_0x191206);if(existsSync(_0x1cbdc3))try{unlinkSync(_0x1cbdc3);}catch{}}function cacheExists(_0x3f2323){return existsSync(getGlobalCachePath(_0x3f2323));}export function createGlobalCache(_0x37667d,_0x4239e9){return registerGlobalCacheKey(_0x37667d,_0x4239e9),{'read':()=>readCacheJson(_0x37667d),'write':_0x1fe654=>writeCacheJson(_0x37667d,_0x1fe654),'clear':()=>clearCache(_0x37667d),'exists':()=>cacheExists(_0x37667d),'path':()=>getGlobalCachePath(_0x37667d)};}function a179_0x3ca8(_0x2263fe,_0x4de2b6){_0x2263fe=_0x2263fe-0x175;const _0x1893f1=a179_0x1893();let _0x3ca81c=_0x1893f1[_0x2263fe];return _0x3ca81c;}export function createGlobalTextCache(_0x381b69,_0x55ea89){return registerGlobalCacheKey(_0x381b69,_0x55ea89),{'read':()=>readCacheText(_0x381b69)?.['trim']()||undefined,'write':_0x14948b=>writeCacheText(_0x381b69,_0x14948b),'clear':()=>clearCache(_0x381b69),'exists':()=>cacheExists(_0x381b69),'path':()=>getGlobalCachePath(_0x381b69)};}export function createProfileCache(_0xf7a900,_0x5dc883){const _0x259280=_0x3d32c7=>{const _0x467341=a179_0x3ca8,_0x3af5e9=_0x3d32c7||_0x467341(0x182);return _0xf7a900[_0x467341(0x18c)](_0x467341(0x17b),_0x3af5e9);};return{'read':_0x14bc04=>{const _0x2d22e3=_0x259280(_0x14bc04);return registerGlobalCacheKey(_0x2d22e3,_0x5dc883),readCacheJson(_0x2d22e3);},'write':(_0x5343c6,_0x1ad9f0)=>{const _0x2264e0=_0x259280(_0x5343c6);registerGlobalCacheKey(_0x2264e0,_0x5dc883),writeCacheJson(_0x2264e0,_0x1ad9f0);},'clear':_0x2c2dfc=>{const _0x44ba4e=_0x259280(_0x2c2dfc);clearCache(_0x44ba4e);},'exists':_0x17a962=>{const _0x24ebb4=_0x259280(_0x17a962);return cacheExists(_0x24ebb4);},'path':_0x46a15d=>{const _0x4fc45d=_0x259280(_0x46a15d);return getGlobalCachePath(_0x4fc45d);}};}export function createOptionalProfileCache(_0x21dbba,_0x2944c0,_0x26ba8c={}){const {profileSeparator:profileSeparator='.',suffix:suffix=''}=_0x26ba8c,_0x1d706c=_0x1e2c59=>{return _0x1e2c59?''+_0x21dbba+profileSeparator+_0x1e2c59+suffix:''+_0x21dbba+suffix;};return{'read':_0x13d21e=>{const _0x445932=_0x1d706c(_0x13d21e);return registerGlobalCacheKey(_0x445932,_0x2944c0),readCacheJson(_0x445932);},'write':(_0x150f45,_0x435e8f)=>{const _0x4840f7=_0x1d706c(_0x435e8f);registerGlobalCacheKey(_0x4840f7,_0x2944c0),writeCacheJson(_0x4840f7,_0x150f45);},'clear':_0xf4e3e0=>{const _0x4e026f=_0x1d706c(_0xf4e3e0);clearCache(_0x4e026f);},'exists':_0x132229=>{const _0x481c37=_0x1d706c(_0x132229);return cacheExists(_0x481c37);},'path':_0x2e7c78=>{const _0x96ab74=_0x1d706c(_0x2e7c78);return getGlobalCachePath(_0x96ab74);}};}function a179_0x1893(){const _0x5ef102=['Global\x20cache\x20key\x20\x22','replace','95184ilMfLJ','11QRYNPN','3825708ejNunk','stringify','40GPolhZ','9OuALiQ','{profile}','.cache','282SgtOZl','utf-8','8765WGrCin','\x22,\x20cannot\x20register\x20for\x20\x22','438004WjqMEK','default','71826dYxjml','clear','16GvsmlR','18EpYQhP','315750KaTJEt','50386jzOQKy','set','3731cTFolL'];a179_0x1893=function(){return _0x5ef102;};return a179_0x1893();}export function clearGlobalRegistry(){const _0x302a0b=a179_0x3ca8;registry[_0x302a0b(0x184)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x158d88,_0x51e3fb){const _0xba597d=a180_0xb0af,_0x4e1154=_0x158d88();while(!![]){try{const _0x4cb907=parseInt(_0xba597d(0x198))/0x1*(-parseInt(_0xba597d(0x19d))/0x2)+parseInt(_0xba597d(0x1a2))/0x3*(-parseInt(_0xba597d(0x18e))/0x4)+parseInt(_0xba597d(0x1a3))/0x5*(parseInt(_0xba597d(0x199))/0x6)+parseInt(_0xba597d(0x196))/0x7+parseInt(_0xba597d(0x19b))/0x8+-parseInt(_0xba597d(0x1a5))/0x9+-parseInt(_0xba597d(0x195))/0xa*(-parseInt(_0xba597d(0x1a0))/0xb);if(_0x4cb907===_0x51e3fb)break;else _0x4e1154['push'](_0x4e1154['shift']());}catch(_0x948c96){_0x4e1154['push'](_0x4e1154['shift']());}}}(a180_0x41b7,0xedf04));import{readFile}from'fs/promises';function a180_0x41b7(){const _0x55ce6a=['537999sQOgtr','Invalid\x20JSON\x20in\x20file\x20\x27','89dxGhzO','52002sieTlF','code','12051824UjxNNB','utf-8','7618htVEut','Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.','PERMISSION_DENIED','3969273AKzLKo','ENOENT','2046027KMwRPk','15yWvrXw','Failed\x20to\x20load\x20JSON:\x20','3018744wWvLNC','4neslTx','\x27:\x20','message','NOT_FOUND','parse','Invalid\x20JSON\x20string:\x20','INVALID_ARGUMENT','20CcUygF'];a180_0x41b7=function(){return _0x55ce6a;};return a180_0x41b7();}import{SDKError,ErrorCode}from'../sdk/errors.js';function a180_0xb0af(_0x3a220f,_0x3be521){_0x3a220f=_0x3a220f-0x18e;const _0x41b7ab=a180_0x41b7();let _0xb0aff2=_0x41b7ab[_0x3a220f];return _0xb0aff2;}export async function loadJSON(_0x39a38b,_0xad261e){const _0x263f1a=a180_0xb0af;try{if(_0xad261e){const _0x25f592=await readFile(_0x39a38b,_0x263f1a(0x19c));try{return JSON[_0x263f1a(0x192)](_0x25f592);}catch(_0x5ea1fe){throw new SDKError(ErrorCode[_0x263f1a(0x194)],_0x263f1a(0x197)+_0x39a38b+_0x263f1a(0x18f)+(_0x5ea1fe instanceof Error?_0x5ea1fe[_0x263f1a(0x190)]:String(_0x5ea1fe)));}}else try{return JSON['parse'](_0x39a38b);}catch(_0xd2c1f0){throw new SDKError(ErrorCode[_0x263f1a(0x194)],_0x263f1a(0x193)+(_0xd2c1f0 instanceof Error?_0xd2c1f0[_0x263f1a(0x190)]:String(_0xd2c1f0)));}}catch(_0x21ded6){if(_0x21ded6 instanceof SDKError)throw _0x21ded6;if(_0x21ded6 instanceof Error&&_0x263f1a(0x19a)in _0x21ded6){const _0x5374a3=_0x21ded6;if(_0x5374a3['code']===_0x263f1a(0x1a1))throw new SDKError(ErrorCode[_0x263f1a(0x191)],'File\x20not\x20found:\x20'+_0x39a38b);else{if(_0x5374a3[_0x263f1a(0x19a)]==='EACCES')throw new SDKError(ErrorCode[_0x263f1a(0x19f)],'Permission\x20denied\x20reading\x20file:\x20'+_0x39a38b);}}throw new SDKError(ErrorCode['INTERNAL'],_0x263f1a(0x1a4)+(_0x21ded6 instanceof Error?_0x21ded6[_0x263f1a(0x190)]:String(_0x21ded6)));}}export async function loadJSONFromOptions(_0x3a801c,_0x52a4d0){const _0x518c12=a180_0xb0af;if(_0x3a801c&&_0x52a4d0)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x518c12(0x19e));if(_0x3a801c)return await loadJSON(_0x3a801c,![]);if(_0x52a4d0)return await loadJSON(_0x52a4d0,!![]);return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a181_0x5c99ca=a181_0x4f68;(function(_0x340a79,_0x590946){const _0x878913=a181_0x4f68,_0x524fae=_0x340a79();while(!![]){try{const _0x512917=parseInt(_0x878913(0x19c))/0x1*(parseInt(_0x878913(0x198))/0x2)+parseInt(_0x878913(0x1a3))/0x3*(-parseInt(_0x878913(0x19a))/0x4)+-parseInt(_0x878913(0x19d))/0x5*(parseInt(_0x878913(0x1a7))/0x6)+parseInt(_0x878913(0x19b))/0x7*(-parseInt(_0x878913(0x1a1))/0x8)+-parseInt(_0x878913(0x1a6))/0x9+-parseInt(_0x878913(0x1a0))/0xa+-parseInt(_0x878913(0x197))/0xb*(-parseInt(_0x878913(0x1a4))/0xc);if(_0x512917===_0x590946)break;else _0x524fae['push'](_0x524fae['shift']());}catch(_0x5e2b64){_0x524fae['push'](_0x524fae['shift']());}}}(a181_0x23d3,0xe4f93));import{existsSync,mkdirSync,readFileSync,writeFileSync,unlinkSync}from'fs';import{join,parse}from'path';import{homedir}from'os';const LOCAL_CACHE_DIR=a181_0x5c99ca(0x1a5),registry=new Map();export function registerCacheKey(_0x221b36,_0x1aa938){const _0x88f789=a181_0x5c99ca,_0x41b303=registry['get'](_0x221b36);if(_0x41b303&&_0x41b303!==_0x1aa938)throw new Error(_0x88f789(0x1ab)+_0x221b36+'\x22\x20already\x20registered\x20by\x20\x22'+_0x41b303+_0x88f789(0x196)+_0x1aa938+'\x22');registry[_0x88f789(0x19f)](_0x221b36,_0x1aa938);}export function getCacheDir(){const _0x2cb9b3=a181_0x5c99ca,_0x4ca8fc=process['cwd'](),_0x1cfc3b=_0x4ca8fc===parse(_0x4ca8fc)[_0x2cb9b3(0x1aa)]?homedir():_0x4ca8fc;return join(_0x1cfc3b,LOCAL_CACHE_DIR);}function a181_0x4f68(_0xb6611f,_0x33e4b2){_0xb6611f=_0xb6611f-0x196;const _0x23d3ca=a181_0x23d3();let _0x4f6844=_0x23d3ca[_0xb6611f];return _0x4f6844;}export function getCachePath(_0x3c306f){return join(getCacheDir(),_0x3c306f);}function ensureCacheDir(){const _0x2c31a1=getCacheDir();!existsSync(_0x2c31a1)&&mkdirSync(_0x2c31a1,{'recursive':!![]});}function readCacheJson(_0x5ec984){const _0x5507a9=a181_0x5c99ca,_0x1f8b11=getCachePath(_0x5ec984);if(!existsSync(_0x1f8b11))return undefined;try{const _0x14b3b2=readFileSync(_0x1f8b11,_0x5507a9(0x1a9));return JSON[_0x5507a9(0x199)](_0x14b3b2);}catch{return undefined;}}function writeCacheJson(_0x11a3b0,_0x523aff){const _0x266a06=a181_0x5c99ca;ensureCacheDir(),writeFileSync(getCachePath(_0x11a3b0),JSON[_0x266a06(0x1a2)](_0x523aff,null,0x2),'utf-8');}function readCacheText(_0x4c3e0f){const _0x21bd2c=a181_0x5c99ca,_0x4a0c46=getCachePath(_0x4c3e0f);if(!existsSync(_0x4a0c46))return undefined;try{return readFileSync(_0x4a0c46,_0x21bd2c(0x1a9));}catch{return undefined;}}function writeCacheText(_0x5ed7d3,_0x41fa7a){const _0x3aa481=a181_0x5c99ca;ensureCacheDir(),writeFileSync(getCachePath(_0x5ed7d3),_0x41fa7a,_0x3aa481(0x1a9));}function clearCache(_0x475a35){const _0x545dc0=getCachePath(_0x475a35);if(existsSync(_0x545dc0))try{unlinkSync(_0x545dc0);}catch{}}function cacheExists(_0x54c7ca){return existsSync(getCachePath(_0x54c7ca));}export function createCache(_0x4f0e74,_0x13f9c9){return registerCacheKey(_0x4f0e74,_0x13f9c9),{'read':()=>readCacheJson(_0x4f0e74),'write':_0x19d549=>writeCacheJson(_0x4f0e74,_0x19d549),'clear':()=>clearCache(_0x4f0e74),'exists':()=>cacheExists(_0x4f0e74),'path':()=>getCachePath(_0x4f0e74)};}export function createTextCache(_0xb01e79,_0x686f74){const _0x52c81f=a181_0x5c99ca;return registerCacheKey(_0xb01e79,_0x686f74),{'read':()=>readCacheText(_0xb01e79)?.[_0x52c81f(0x1a8)]()||undefined,'write':_0x17c2ce=>writeCacheText(_0xb01e79,_0x17c2ce),'clear':()=>clearCache(_0xb01e79),'exists':()=>cacheExists(_0xb01e79),'path':()=>getCachePath(_0xb01e79)};}export function clearRegistry(){const _0x3c54d8=a181_0x5c99ca;registry[_0x3c54d8(0x19e)]();}function a181_0x23d3(){const _0x3689ae=['1092337cOwVzw','1661820UodbeP','clear','set','8935660VMtNfV','564016xTIDhb','stringify','1881786yBeVlN','636576ThfOim','.cache/tdx','10886148SCWYFT','30riQOEQ','trim','utf-8','root','Cache\x20key\x20\x22','\x22,\x20cannot\x20register\x20for\x20\x22','1155mYGpCU','2fwsKax','parse','8hzxmPx','70KxlGjf'];a181_0x23d3=function(){return _0x3689ae;};return a181_0x23d3();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a182_0x34d804=a182_0x4c6a;(function(_0x39ddb3,_0x119c86){const _0x42d9c1=a182_0x4c6a,_0x4e2540=_0x39ddb3();while(!![]){try{const _0x2a430e=-parseInt(_0x42d9c1(0x1e6))/0x1*(-parseInt(_0x42d9c1(0x1e2))/0x2)+parseInt(_0x42d9c1(0x1e7))/0x3*(parseInt(_0x42d9c1(0x1d9))/0x4)+-parseInt(_0x42d9c1(0x1da))/0x5+parseInt(_0x42d9c1(0x1e0))/0x6+-parseInt(_0x42d9c1(0x1e1))/0x7+parseInt(_0x42d9c1(0x1dd))/0x8*(parseInt(_0x42d9c1(0x1e4))/0x9)+parseInt(_0x42d9c1(0x1d8))/0xa*(-parseInt(_0x42d9c1(0x1ea))/0xb);if(_0x2a430e===_0x119c86)break;else _0x4e2540['push'](_0x4e2540['shift']());}catch(_0x409d31){_0x4e2540['push'](_0x4e2540['shift']());}}}(a182_0x2c4d,0xcbc93));import a182_0x5a78c5 from'chalk';function a182_0x4c6a(_0x1a56cd,_0x327c5e){_0x1a56cd=_0x1a56cd-0x1d4;const _0x2c4dcc=a182_0x2c4d();let _0x4c6a53=_0x2c4dcc[_0x1a56cd];return _0x4c6a53;}import{LogLevel,logLevelToString,formatTimestamp}from'../types.js';function a182_0x2c4d(){const _0x115434=['1605488wzrUCG','red','10242HNoTnR','gray','2GllrGO','156YpntcH','ERROR','timestamp','493427pzjVbB','Chalk','blue','chalk','level','DEBUG','colors','colorLevel','message','640TMesXm','115316QjECbJ','7986115LHjmIy','green',']\x20[','7736MYojlV','format','default','6993954lLXEad','475461RVxtEp'];a182_0x2c4d=function(){return _0x115434;};return a182_0x2c4d();}const chalkModule=a182_0x5a78c5,ChalkClass=chalkModule[a182_0x34d804(0x1eb)]||chalkModule[a182_0x34d804(0x1df)]?.['Chalk'];export class DefaultLogFormatter{['colors'];[a182_0x34d804(0x1ed)];constructor(_0x240126={}){const _0xd941c5=a182_0x34d804;this['colors']=_0x240126[_0xd941c5(0x1d5)]??![],this[_0xd941c5(0x1ed)]=_0x240126[_0xd941c5(0x1d5)]&&ChalkClass?new ChalkClass({'level':0x3}):a182_0x5a78c5;}[a182_0x34d804(0x1de)](_0x20ee85){const _0x516f75=a182_0x34d804,_0x546990=formatTimestamp(_0x20ee85[_0x516f75(0x1e9)]),_0x2f310d=logLevelToString(_0x20ee85['level']);if(!this[_0x516f75(0x1d5)])return _0x546990+'\x20['+_0x2f310d+_0x516f75(0x1dc)+_0x20ee85['component']+']\x20'+_0x20ee85[_0x516f75(0x1d7)];const _0x11d4c4=this[_0x516f75(0x1ed)]['dim'](_0x546990),_0x40091c=this[_0x516f75(0x1d6)](_0x2f310d,_0x20ee85[_0x516f75(0x1ee)]),_0x8c39f3=this[_0x516f75(0x1ed)][_0x516f75(0x1ec)]('['+_0x20ee85['component']+']');return _0x11d4c4+'\x20'+_0x40091c+'\x20'+_0x8c39f3+'\x20'+_0x20ee85[_0x516f75(0x1d7)];}[a182_0x34d804(0x1d6)](_0x1b84d4,_0x49ab89){const _0x2e9284=a182_0x34d804;switch(_0x49ab89){case LogLevel['TRACE']:return this[_0x2e9284(0x1ed)][_0x2e9284(0x1e5)]('['+_0x1b84d4+']');case LogLevel[_0x2e9284(0x1d4)]:return this[_0x2e9284(0x1ed)][_0x2e9284(0x1db)]('['+_0x1b84d4+']');case LogLevel['INFO']:return this[_0x2e9284(0x1ed)]['cyan']('['+_0x1b84d4+']');case LogLevel['WARN']:return this[_0x2e9284(0x1ed)]['yellow']('['+_0x1b84d4+']');case LogLevel[_0x2e9284(0x1e8)]:return this[_0x2e9284(0x1ed)][_0x2e9284(0x1e3)]('['+_0x1b84d4+']');default:return'['+_0x1b84d4+']';}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xab6dcf,_0x4b5f89){var _0x54c834=a183_0x47b1,_0x5da49d=_0xab6dcf();while(!![]){try{var _0x2b9523=parseInt(_0x54c834(0x76))/0x1*(-parseInt(_0x54c834(0x71))/0x2)+parseInt(_0x54c834(0x79))/0x3+parseInt(_0x54c834(0x77))/0x4+parseInt(_0x54c834(0x72))/0x5+parseInt(_0x54c834(0x73))/0x6*(-parseInt(_0x54c834(0x75))/0x7)+parseInt(_0x54c834(0x78))/0x8+-parseInt(_0x54c834(0x74))/0x9;if(_0x2b9523===_0x4b5f89)break;else _0x5da49d['push'](_0x5da49d['shift']());}catch(_0x30ff09){_0x5da49d['push'](_0x5da49d['shift']());}}}(a183_0x2a06,0x22105));export{DefaultLogFormatter}from'./default-formatter.js';function a183_0x47b1(_0x7f40de,_0x25215e){_0x7f40de=_0x7f40de-0x71;var _0x2a06a7=a183_0x2a06();var _0x47b151=_0x2a06a7[_0x7f40de];return _0x47b151;}function a183_0x2a06(){var _0x1668af=['619680TWyqyG','275600bdYpLj','781266jXhvKx','158ZNafpk','94040eJbFZk','383556XorsFh','1986759kdntPP','7hIheXN','562vcEBwz'];a183_0x2a06=function(){return _0x1668af;};return a183_0x2a06();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a184_0x208edc=a184_0x203a;(function(_0x8b4a87,_0x1ff37c){const _0x6daca1=a184_0x203a,_0x43da54=_0x8b4a87();while(!![]){try{const _0x3b02bc=parseInt(_0x6daca1(0x1aa))/0x1*(-parseInt(_0x6daca1(0x1ba))/0x2)+parseInt(_0x6daca1(0x1b8))/0x3*(-parseInt(_0x6daca1(0x1b6))/0x4)+parseInt(_0x6daca1(0x1b7))/0x5*(parseInt(_0x6daca1(0x1b1))/0x6)+parseInt(_0x6daca1(0x1ab))/0x7*(-parseInt(_0x6daca1(0x1ac))/0x8)+-parseInt(_0x6daca1(0x1b4))/0x9*(-parseInt(_0x6daca1(0x1b0))/0xa)+parseInt(_0x6daca1(0x1bc))/0xb+parseInt(_0x6daca1(0x1bb))/0xc;if(_0x3b02bc===_0x1ff37c)break;else _0x43da54['push'](_0x43da54['shift']());}catch(_0xf42eba){_0x43da54['push'](_0x43da54['shift']());}}}(a184_0x3567,0xa9b24));function a184_0x203a(_0x5474fa,_0xa0752a){_0x5474fa=_0x5474fa-0x1aa;const _0x3567d2=a184_0x3567();let _0x203aa9=_0x3567d2[_0x5474fa];return _0x203aa9;}import{LogLevel as a184_0x262059}from'../types.js';function a184_0x3567(){const _0x4452e5=['3nejzjB','WARN','8bVEmex','34868052fsqbDS','906455zxMADZ','error','useStderr','108093uQSfcD','35YcRyPE','1960760IEnrBA','handle','minLevel','colors','2765860meqFfb','271308UfEpUe','log','level','9TNwpal','formatter','4370444GSkqMz','20rKLJxY'];a184_0x3567=function(){return _0x4452e5;};return a184_0x3567();}import{DefaultLogFormatter}from'../formatters/index.js';export class ConsoleHandler{[a184_0x208edc(0x1ae)];[a184_0x208edc(0x1be)];[a184_0x208edc(0x1b5)];constructor(_0x366e5e={}){const _0x1ed8bb=a184_0x208edc;this[_0x1ed8bb(0x1ae)]=_0x366e5e[_0x1ed8bb(0x1ae)]??a184_0x262059[_0x1ed8bb(0x1b9)],this['useStderr']=_0x366e5e[_0x1ed8bb(0x1be)]??!![],this[_0x1ed8bb(0x1b5)]=new DefaultLogFormatter({'colors':_0x366e5e[_0x1ed8bb(0x1af)]??!![]});}[a184_0x208edc(0x1ad)](_0x300a1a){const _0x217cb5=a184_0x208edc;if(_0x300a1a['level']<this[_0x217cb5(0x1ae)])return;const _0xa32378=this[_0x217cb5(0x1b5)]['format'](_0x300a1a);this['useStderr']&&_0x300a1a[_0x217cb5(0x1b3)]>=a184_0x262059['WARN']?console[_0x217cb5(0x1bd)](_0xa32378):console[_0x217cb5(0x1b2)](_0xa32378);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a185_0x23b5(_0x351881,_0x45e73f){_0x351881=_0x351881-0x185;const _0x2dd77d=a185_0x2dd7();let _0x23b5d2=_0x2dd77d[_0x351881];return _0x23b5d2;}const a185_0x1fd5a3=a185_0x23b5;(function(_0x54345f,_0x5278aa){const _0x5ae40d=a185_0x23b5,_0x236e51=_0x54345f();while(!![]){try{const _0x34f114=-parseInt(_0x5ae40d(0x194))/0x1*(-parseInt(_0x5ae40d(0x1a5))/0x2)+parseInt(_0x5ae40d(0x19f))/0x3+-parseInt(_0x5ae40d(0x195))/0x4+-parseInt(_0x5ae40d(0x19d))/0x5+-parseInt(_0x5ae40d(0x193))/0x6*(parseInt(_0x5ae40d(0x19a))/0x7)+-parseInt(_0x5ae40d(0x197))/0x8*(parseInt(_0x5ae40d(0x1a6))/0x9)+parseInt(_0x5ae40d(0x1a0))/0xa*(parseInt(_0x5ae40d(0x18a))/0xb);if(_0x34f114===_0x5278aa)break;else _0x236e51['push'](_0x236e51['shift']());}catch(_0xf124bf){_0x236e51['push'](_0x236e51['shift']());}}}(a185_0x2dd7,0xea646));import{createWriteStream,createReadStream}from'fs';import{mkdir,readdir,unlink,stat,rename}from'fs/promises';import{join,dirname,basename}from'path';import{createGzip}from'zlib';import{pipeline}from'stream/promises';function a185_0x2dd7(){const _0x11fd78=['logPath','55jfNQPd','filter','filePath','Warning:\x20Error\x20writing\x20to\x20','logDir','.log','write','error','logBaseName','294NETaFq','1KAYzyj','4041292IhdkSD','replace','8qbDXYO','Warning:\x20Failed\x20to\x20initialize\x20log\x20file:','rotateOldLogs','215313JRWvnL','includes','logs','2348450Jbfims','getLogPath','5566344wMwDwc','1966480eWlneC','logStream','message','close','rotate','2662818gdmRGq','2005407BCclzq','test','toISOString','logFileName','split','tdx.log'];a185_0x2dd7=function(){return _0x11fd78;};return a185_0x2dd7();}import{Logger}from'../logger.js';import{getGlobalCacheDir}from'../../global-cache.js';export class FileHandler{[a185_0x1fd5a3(0x189)];[a185_0x1fd5a3(0x18e)];[a185_0x1fd5a3(0x186)];['logBaseName'];[a185_0x1fd5a3(0x1a1)]=null;['rotate'];constructor(_0xabf875={}){const _0x5ae2d3=a185_0x1fd5a3;this[_0x5ae2d3(0x189)]=_0xabf875[_0x5ae2d3(0x18c)]??join(getGlobalCacheDir(),_0x5ae2d3(0x19c),_0x5ae2d3(0x188)),this['logDir']=dirname(this[_0x5ae2d3(0x189)]),this[_0x5ae2d3(0x186)]=basename(this[_0x5ae2d3(0x189)]),this['logBaseName']=this[_0x5ae2d3(0x186)][_0x5ae2d3(0x196)](/\.log$/,''),this[_0x5ae2d3(0x1a4)]=_0xabf875[_0x5ae2d3(0x1a4)]??!![];}async['init'](){const _0x2f166c=a185_0x1fd5a3;try{await mkdir(this[_0x2f166c(0x18e)],{'recursive':!![]}),this[_0x2f166c(0x1a4)]&&await this['rotateOldLogs'](),this['logStream']=createWriteStream(this[_0x2f166c(0x189)],{'flags':'a'}),this[_0x2f166c(0x1a1)]['on'](_0x2f166c(0x191),_0x3464a8=>{const _0x21b502=_0x2f166c;console['error'](_0x21b502(0x18d)+this[_0x21b502(0x186)]+':',_0x3464a8[_0x21b502(0x1a2)]);});}catch(_0x243689){console[_0x2f166c(0x191)](_0x2f166c(0x198),_0x243689);}}['handle'](_0x1d287d){const _0x53f6c8=a185_0x1fd5a3;if(!this['logStream'])return;const _0x1ffd7e=Logger['format'](_0x1d287d);this[_0x53f6c8(0x1a1)][_0x53f6c8(0x190)](_0x1ffd7e+'\x0a');}async[a185_0x1fd5a3(0x1a3)](){return new Promise(_0x57b63e=>{const _0x242540=a185_0x23b5;this[_0x242540(0x1a1)]?this[_0x242540(0x1a1)]['end'](()=>{const _0x2fbf26=_0x242540;this[_0x2fbf26(0x1a1)]=null,_0x57b63e();}):_0x57b63e();});}[a185_0x1fd5a3(0x19e)](){return this['logPath'];}async[a185_0x1fd5a3(0x199)](){const _0x11fc52=a185_0x1fd5a3;try{const _0x55b688=await readdir(this[_0x11fc52(0x18e)]),_0x10064f=new Date()[_0x11fc52(0x185)]()[_0x11fc52(0x187)]('T')[0x0];if(_0x55b688[_0x11fc52(0x19b)](this[_0x11fc52(0x186)])){const _0x436044=join(this[_0x11fc52(0x18e)],this[_0x11fc52(0x186)]),_0x56d975=await stat(_0x436044),_0x11c295=new Date(_0x56d975['mtime'])[_0x11fc52(0x185)]()[_0x11fc52(0x187)]('T')[0x0];if(_0x11c295<_0x10064f){const _0x36883e=join(this[_0x11fc52(0x18e)],this[_0x11fc52(0x192)]+'-'+_0x11c295+_0x11fc52(0x18f));await rename(_0x436044,_0x36883e);}}const _0x39054d=await readdir(this[_0x11fc52(0x18e)]),_0x3fbda7=this['logBaseName'][_0x11fc52(0x196)](/[.*+?^${}()|[\]\\]/g,'\x5c$&'),_0x3def02=new RegExp('^'+_0x3fbda7+'-(\x5cd{4}-\x5cd{2}-\x5cd{2})\x5c.log$'),_0xfd1a87=_0x39054d[_0x11fc52(0x18b)](_0x129766=>_0x3def02[_0x11fc52(0x1a7)](_0x129766));for(const _0x488ade of _0xfd1a87){const _0xbd61ab=join(this[_0x11fc52(0x18e)],_0x488ade),_0x2f7e66=join(this[_0x11fc52(0x18e)],_0x488ade+'.gz');try{await pipeline(createReadStream(_0xbd61ab),createGzip(),createWriteStream(_0x2f7e66)),await unlink(_0xbd61ab);}catch(_0xe6e5f7){console[_0x11fc52(0x191)]('Warning:\x20Failed\x20to\x20compress\x20'+_0x488ade+':',_0xe6e5f7);}}}catch{}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a186_0x1d61(_0x5267ce,_0x4c923c){_0x5267ce=_0x5267ce-0x15a;var _0x441c6d=a186_0x441c();var _0x1d61a6=_0x441c6d[_0x5267ce];return _0x1d61a6;}(function(_0x235cab,_0x5e4885){var _0x5a06e1=a186_0x1d61,_0x12277c=_0x235cab();while(!![]){try{var _0x29f519=-parseInt(_0x5a06e1(0x162))/0x1+-parseInt(_0x5a06e1(0x15f))/0x2*(parseInt(_0x5a06e1(0x15e))/0x3)+parseInt(_0x5a06e1(0x160))/0x4+parseInt(_0x5a06e1(0x15d))/0x5+parseInt(_0x5a06e1(0x161))/0x6+parseInt(_0x5a06e1(0x15a))/0x7*(-parseInt(_0x5a06e1(0x15b))/0x8)+parseInt(_0x5a06e1(0x15c))/0x9;if(_0x29f519===_0x5e4885)break;else _0x12277c['push'](_0x12277c['shift']());}catch(_0x5f4ffc){_0x12277c['push'](_0x12277c['shift']());}}}(a186_0x441c,0xf3ff8));export{FileHandler}from'./file-handler.js';function a186_0x441c(){var _0x364e8b=['7983PFOfAh','1256pLyaXG','5468696Kabgmp','11644314lFtdGY','1315330YQEDyY','57995iZGvOH','40AaZmVA','2807937nEjFht','2036965gqRvgl'];a186_0x441c=function(){return _0x364e8b;};return a186_0x441c();}export{ConsoleHandler}from'./console-handler.js';export{NullHandler}from'./null-handler.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
function a187_0x2ddf(){var _0x39d17a=['21BItJVT','8332040JFdpGt','4080042foWZyt','50780iUbZRR','215154ktFvah','348032Wieqnj','300906VjPeLH','85CwMfPc','942126RUJroD','6PgxStv','handle'];a187_0x2ddf=function(){return _0x39d17a;};return a187_0x2ddf();}var a187_0x929e77=a187_0x3bb5;function a187_0x3bb5(_0x3e4631,_0x5586f2){_0x3e4631=_0x3e4631-0x152;var _0x2ddf91=a187_0x2ddf();var _0x3bb5b8=_0x2ddf91[_0x3e4631];return _0x3bb5b8;}(function(_0x3d97af,_0x2161b9){var _0x128217=a187_0x3bb5,_0x57b2dc=_0x3d97af();while(!![]){try{var _0x2087ca=-parseInt(_0x128217(0x152))/0x1+-parseInt(_0x128217(0x154))/0x2+parseInt(_0x128217(0x155))/0x3*(-parseInt(_0x128217(0x15a))/0x4)+-parseInt(_0x128217(0x153))/0x5*(-parseInt(_0x128217(0x15b))/0x6)+-parseInt(_0x128217(0x157))/0x7*(-parseInt(_0x128217(0x15c))/0x8)+-parseInt(_0x128217(0x159))/0x9+parseInt(_0x128217(0x158))/0xa;if(_0x2087ca===_0x2161b9)break;else _0x57b2dc['push'](_0x57b2dc['shift']());}catch(_0x3c1e2c){_0x57b2dc['push'](_0x57b2dc['shift']());}}}(a187_0x2ddf,0x4ec3e));export class NullHandler{[a187_0x929e77(0x156)](_0x54ec6d){}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x67c701,_0x2a5ab5){var _0x5a2c91=a188_0xedc7,_0x3e4382=_0x67c701();while(!![]){try{var _0xb098b0=parseInt(_0x5a2c91(0x17a))/0x1*(parseInt(_0x5a2c91(0x17c))/0x2)+parseInt(_0x5a2c91(0x181))/0x3*(-parseInt(_0x5a2c91(0x17e))/0x4)+-parseInt(_0x5a2c91(0x182))/0x5*(parseInt(_0x5a2c91(0x17b))/0x6)+-parseInt(_0x5a2c91(0x180))/0x7+-parseInt(_0x5a2c91(0x17f))/0x8+parseInt(_0x5a2c91(0x17d))/0x9+parseInt(_0x5a2c91(0x183))/0xa;if(_0xb098b0===_0x2a5ab5)break;else _0x3e4382['push'](_0x3e4382['shift']());}catch(_0xa65386){_0x3e4382['push'](_0x3e4382['shift']());}}}(a188_0x70c7,0x2a9e7));export{Logger}from'./logger.js';function a188_0xedc7(_0x3ecb47,_0x3030cd){_0x3ecb47=_0x3ecb47-0x17a;var _0x70c7e0=a188_0x70c7();var _0xedc723=_0x70c7e0[_0x3ecb47];return _0xedc723;}export{LogLevel,parseLogLevel,logLevelToString}from'./types.js';function a188_0x70c7(){var _0x3c82a5=['81543bsIOKi','15075JWoSUg','5ciWVsZ','1160760gqcUzm','166312bKKhvC','550626jruVRm','4emHluP','1755JZASzJ','36SycrEq','1005464rIOvTD'];a188_0x70c7=function(){return _0x3c82a5;};return a188_0x70c7();}export{FileHandler,ConsoleHandler,NullHandler}from'./handlers/index.js';export{DefaultLogFormatter}from'./formatters/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a189_0x3110(_0x2a7aed,_0x4fc14a){_0x2a7aed=_0x2a7aed-0x8e;const _0x45a607=a189_0x45a6();let _0x3110bf=_0x45a607[_0x2a7aed];return _0x3110bf;}const a189_0x7e6438=a189_0x3110;(function(_0x2f1eeb,_0x416338){const _0x264a7c=a189_0x3110,_0xeda627=_0x2f1eeb();while(!![]){try{const _0x197bbe=parseInt(_0x264a7c(0xb4))/0x1+-parseInt(_0x264a7c(0x9e))/0x2*(parseInt(_0x264a7c(0x97))/0x3)+-parseInt(_0x264a7c(0xaf))/0x4+-parseInt(_0x264a7c(0x9c))/0x5*(-parseInt(_0x264a7c(0xc3))/0x6)+-parseInt(_0x264a7c(0xb8))/0x7+-parseInt(_0x264a7c(0xa2))/0x8+parseInt(_0x264a7c(0xc2))/0x9;if(_0x197bbe===_0x416338)break;else _0xeda627['push'](_0xeda627['shift']());}catch(_0x43af01){_0xeda627['push'](_0xeda627['shift']());}}}(a189_0x45a6,0xec555));import{LogLevel as a189_0x33e263,logLevelToString}from'./types.js';const MAX_PENDING_RECORDS=0x3e8,state={'initialized':![],'defaultLevel':a189_0x33e263[a189_0x7e6438(0x99)],'levelOverrides':new Map(),'handlers':[],'formatter':null,'loggers':new Map(),'pendingRecords':[]};function safeStringify(_0x65d148){const _0x2c43ba=a189_0x7e6438;if(typeof _0x65d148===_0x2c43ba(0xbd))return _0x65d148;if(_0x65d148 instanceof Error)return _0x65d148[_0x2c43ba(0xb3)]||_0x65d148[_0x2c43ba(0xb7)]+':\x20'+_0x65d148[_0x2c43ba(0xc0)];try{return JSON['stringify'](_0x65d148,(_0x97ab61,_0x259770)=>{const _0x1c040a=_0x2c43ba;if(_0x259770 instanceof Error)return{'name':_0x259770[_0x1c040a(0xb7)],'message':_0x259770[_0x1c040a(0xc0)],'stack':_0x259770[_0x1c040a(0xb3)],'cause':_0x259770[_0x1c040a(0xa9)]};return _0x259770;});}catch{return String(_0x65d148);}}function a189_0x45a6(){const _0x20795e=['cause','push','initialized','format','level','DEBUG','2584952TWNotK',']\x20[','map','component','stack','419524oWTovA','clear','formatter','name','8021426RNWxqx','function','toISOString','init','log','string','loggers','debug','message','WARN','28870803Qctbpl','1122qJLbjM','pendingRecords','split','entries','handlers','trace','length','setLogLevel','levelOverrides','getEffectiveLevel','handle','timestamp','ERROR','has','slice','isInitialized','2427507dNEzJh','info','INFO','addHandler','close','47065fuHEDR','get','2rsBBLG','defaultLevel','set','clearHandlers','14546208sIOvTQ','warn','TRACE','join','reset','setDefaultLevel','dispatch'];a189_0x45a6=function(){return _0x20795e;};return a189_0x45a6();}export class Logger{['component'];constructor(_0x3a1023){const _0x41a5ae=a189_0x7e6438;this[_0x41a5ae(0xb2)]=_0x3a1023;}static['of'](_0xc4e238){const _0x8783dd=a189_0x7e6438,_0x513dcc=typeof _0xc4e238===_0x8783dd(0xbd)?_0xc4e238:_0xc4e238['name'];let _0x4b6425=state[_0x8783dd(0xbe)][_0x8783dd(0x9d)](_0x513dcc);return!_0x4b6425&&(_0x4b6425=new Logger(_0x513dcc),state['loggers']['set'](_0x513dcc,_0x4b6425)),_0x4b6425;}static async['init'](_0x5b0434={}){const _0xca1edb=a189_0x7e6438;state[_0xca1edb(0x9f)]=_0x5b0434['defaultLevel']??a189_0x33e263['INFO'],state[_0xca1edb(0xc7)]=_0x5b0434[_0xca1edb(0xc7)]??[],state[_0xca1edb(0xb6)]=_0x5b0434[_0xca1edb(0xb6)]??null,state['levelOverrides']['clear']();if(_0x5b0434[_0xca1edb(0x8f)])for(const [_0x3ddd62,_0x3a8119]of Object[_0xca1edb(0xc6)](_0x5b0434[_0xca1edb(0x8f)])){state['levelOverrides'][_0xca1edb(0xa0)](_0x3ddd62,_0x3a8119);}for(const _0x3219c8 of state['handlers']){_0x3219c8[_0xca1edb(0xbb)]&&await _0x3219c8['init']();}state[_0xca1edb(0xab)]=!![];for(const _0x509eef of state[_0xca1edb(0xc4)]){Logger[_0xca1edb(0xa8)](_0x509eef);}state[_0xca1edb(0xc4)]=[];}static[a189_0x7e6438(0x8e)](_0x2bdb95,_0x5b922f){const _0x28b61c=a189_0x7e6438;state['levelOverrides'][_0x28b61c(0xa0)](_0x2bdb95,_0x5b922f);}static[a189_0x7e6438(0xa7)](_0x5f5c9d){const _0x3648f7=a189_0x7e6438;state[_0x3648f7(0x9f)]=_0x5f5c9d;}static[a189_0x7e6438(0x9a)](_0xf079af){const _0x40e9eb=a189_0x7e6438;state['handlers'][_0x40e9eb(0xaa)](_0xf079af),state[_0x40e9eb(0xab)]&&_0xf079af[_0x40e9eb(0xbb)]&&_0xf079af[_0x40e9eb(0xbb)]();}static[a189_0x7e6438(0xa1)](){state['handlers']=[];}static async['shutdown'](){const _0x55bc75=a189_0x7e6438;for(const _0x2c241c of state[_0x55bc75(0xc7)]){_0x2c241c[_0x55bc75(0x9b)]&&await _0x2c241c[_0x55bc75(0x9b)]();}state[_0x55bc75(0xc7)]=[],state[_0x55bc75(0xab)]=![],state[_0x55bc75(0xbe)][_0x55bc75(0xb5)](),state[_0x55bc75(0xc4)]=[];}static[a189_0x7e6438(0xa6)](){const _0x45a0bf=a189_0x7e6438;state[_0x45a0bf(0xab)]=![],state[_0x45a0bf(0x9f)]=a189_0x33e263[_0x45a0bf(0x99)],state[_0x45a0bf(0x8f)][_0x45a0bf(0xb5)](),state[_0x45a0bf(0xc7)]=[],state[_0x45a0bf(0xb6)]=null,state[_0x45a0bf(0xbe)][_0x45a0bf(0xb5)](),state['pendingRecords']=[];}static[a189_0x7e6438(0x96)](){const _0x24f33a=a189_0x7e6438;return state[_0x24f33a(0xab)];}static[a189_0x7e6438(0x90)](_0x49cadf){const _0x1fab2a=a189_0x7e6438;if(state[_0x1fab2a(0x8f)]['has'](_0x49cadf))return state[_0x1fab2a(0x8f)][_0x1fab2a(0x9d)](_0x49cadf);const _0x4a3909=_0x49cadf[_0x1fab2a(0xc5)]('.');for(let _0x2575ad=_0x4a3909[_0x1fab2a(0xc9)]-0x1;_0x2575ad>0x0;_0x2575ad--){const _0x53614d=_0x4a3909[_0x1fab2a(0x95)](0x0,_0x2575ad)[_0x1fab2a(0xa5)]('.');if(state[_0x1fab2a(0x8f)][_0x1fab2a(0x94)](_0x53614d))return state['levelOverrides'][_0x1fab2a(0x9d)](_0x53614d);}return state['defaultLevel'];}['shouldLog'](_0x19c2c1){const _0x5b8f31=a189_0x7e6438,_0x33d264=Logger[_0x5b8f31(0x90)](this[_0x5b8f31(0xb2)]);return _0x19c2c1>=_0x33d264;}static[a189_0x7e6438(0xa8)](_0x51d5bf){const _0x200d28=a189_0x7e6438;for(const _0x138ce3 of state[_0x200d28(0xc7)]){_0x138ce3[_0x200d28(0x91)](_0x51d5bf);}}['log'](_0x1cb15f,_0x230448){const _0x52079b=a189_0x7e6438;if(!this['shouldLog'](_0x1cb15f))return;const _0x37bc6a=_0x230448[_0x52079b(0xb1)](_0x383f7d=>typeof _0x383f7d===_0x52079b(0xb9)?_0x383f7d():_0x383f7d),_0x4ce3b8=_0x37bc6a['map'](safeStringify)[_0x52079b(0xa5)]('\x20'),_0x53bfcb={'timestamp':new Date(),'level':_0x1cb15f,'component':this[_0x52079b(0xb2)],'message':_0x4ce3b8};if(!state['initialized']){state[_0x52079b(0xc4)][_0x52079b(0xc9)]<MAX_PENDING_RECORDS&&state[_0x52079b(0xc4)][_0x52079b(0xaa)](_0x53bfcb);return;}Logger[_0x52079b(0xa8)](_0x53bfcb);}[a189_0x7e6438(0xc8)](..._0x468305){const _0x47b639=a189_0x7e6438;this[_0x47b639(0xbc)](a189_0x33e263[_0x47b639(0xa4)],_0x468305);}[a189_0x7e6438(0xbf)](..._0x56557e){const _0x212057=a189_0x7e6438;this['log'](a189_0x33e263[_0x212057(0xae)],_0x56557e);}[a189_0x7e6438(0x98)](..._0x1f58fd){const _0x114991=a189_0x7e6438;this[_0x114991(0xbc)](a189_0x33e263[_0x114991(0x99)],_0x1f58fd);}[a189_0x7e6438(0xa3)](..._0x1f35a3){const _0x233df8=a189_0x7e6438;this[_0x233df8(0xbc)](a189_0x33e263[_0x233df8(0xc1)],_0x1f35a3);}['error'](..._0x2d659e){const _0x3c940c=a189_0x7e6438;this[_0x3c940c(0xbc)](a189_0x33e263[_0x3c940c(0x93)],_0x2d659e);}static['getFormatter'](){const _0x302a12=a189_0x7e6438;return state[_0x302a12(0xb6)];}static['format'](_0x5657ad){const _0x169216=a189_0x7e6438;if(state['formatter'])return state[_0x169216(0xb6)][_0x169216(0xac)](_0x5657ad);return _0x5657ad[_0x169216(0x92)][_0x169216(0xba)]()+'\x20['+logLevelToString(_0x5657ad[_0x169216(0xad)])+_0x169216(0xb0)+_0x5657ad[_0x169216(0xb2)]+']\x20'+_0x5657ad[_0x169216(0xc0)];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x49f254,_0x13fe92){const _0x5d6618=a190_0x19cd,_0x420770=_0x49f254();while(!![]){try{const _0x77c28d=parseInt(_0x5d6618(0x112))/0x1*(-parseInt(_0x5d6618(0x119))/0x2)+parseInt(_0x5d6618(0x117))/0x3+-parseInt(_0x5d6618(0x10f))/0x4*(parseInt(_0x5d6618(0x10d))/0x5)+parseInt(_0x5d6618(0x107))/0x6+parseInt(_0x5d6618(0x111))/0x7+-parseInt(_0x5d6618(0x11a))/0x8+parseInt(_0x5d6618(0x118))/0x9*(-parseInt(_0x5d6618(0x109))/0xa);if(_0x77c28d===_0x13fe92)break;else _0x420770['push'](_0x420770['shift']());}catch(_0x45fb9d){_0x420770['push'](_0x420770['shift']());}}}(a190_0xf6b6,0x6b9c9));export var LogLevel;function a190_0xf6b6(){const _0x193b1b=['4234986kcapHL','19301mQSeMV','getSeconds','getMinutes','DEBUG','getTimezoneOffset','316071MWRLWD','36xGvYcp','18HiVGhb','572928nFUFcI','getMilliseconds','INFO','toString','getDate','getFullYear','TRACE','ERROR','WARN','4292154XaHvlj','info','875150ABQLwf','toUpperCase','error','abs','40ZWLsoC','getMonth','194776BeXRQY','padStart'];a190_0xf6b6=function(){return _0x193b1b;};return a190_0xf6b6();}(function(_0x5bdc0d){const _0x5e2a0c=a190_0x19cd;_0x5bdc0d[_0x5bdc0d['TRACE']=-0x2]='TRACE',_0x5bdc0d[_0x5bdc0d[_0x5e2a0c(0x115)]=-0x1]=_0x5e2a0c(0x115),_0x5bdc0d[_0x5bdc0d[_0x5e2a0c(0x100)]=0x0]=_0x5e2a0c(0x100),_0x5bdc0d[_0x5bdc0d[_0x5e2a0c(0x106)]=0x1]=_0x5e2a0c(0x106),_0x5bdc0d[_0x5bdc0d[_0x5e2a0c(0x105)]=0x2]='ERROR';}(LogLevel||(LogLevel={})));function a190_0x19cd(_0x470cc5,_0x4f7198){_0x470cc5=_0x470cc5-0x100;const _0xf6b61c=a190_0xf6b6();let _0x19cdef=_0xf6b61c[_0x470cc5];return _0x19cdef;}export function parseLogLevel(_0x234377){const _0x43d941=a190_0x19cd;switch(_0x234377[_0x43d941(0x10a)]()){case'TRACE':return LogLevel['TRACE'];case _0x43d941(0x115):return LogLevel[_0x43d941(0x115)];case'INFO':return LogLevel[_0x43d941(0x100)];case'WARN':case'WARNING':return LogLevel['WARN'];case'ERROR':return LogLevel[_0x43d941(0x105)];default:return LogLevel[_0x43d941(0x100)];}}export function logLevelToString(_0x15f131){const _0x494939=a190_0x19cd;switch(_0x15f131){case LogLevel[_0x494939(0x104)]:return'trace';case LogLevel[_0x494939(0x115)]:return'debug';case LogLevel[_0x494939(0x100)]:return _0x494939(0x108);case LogLevel['WARN']:return'warn';case LogLevel[_0x494939(0x105)]:return _0x494939(0x10b);default:return _0x494939(0x108);}}export function formatTimestamp(_0x49c119){const _0x364e65=a190_0x19cd,_0x13221a=_0x49c119[_0x364e65(0x103)](),_0x1e1f0b=(_0x49c119[_0x364e65(0x10e)]()+0x1)[_0x364e65(0x101)]()[_0x364e65(0x110)](0x2,'0'),_0x352a57=_0x49c119[_0x364e65(0x102)]()[_0x364e65(0x101)]()[_0x364e65(0x110)](0x2,'0'),_0x5a3ec0=_0x49c119['getHours']()[_0x364e65(0x101)]()[_0x364e65(0x110)](0x2,'0'),_0x5a245=_0x49c119[_0x364e65(0x114)]()[_0x364e65(0x101)]()[_0x364e65(0x110)](0x2,'0'),_0x22e37c=_0x49c119[_0x364e65(0x113)]()[_0x364e65(0x101)]()['padStart'](0x2,'0'),_0x40b14e=_0x49c119[_0x364e65(0x11b)]()[_0x364e65(0x101)]()['padStart'](0x3,'0'),_0x2872a4=-_0x49c119[_0x364e65(0x116)](),_0x1a2bb5=Math['floor'](Math[_0x364e65(0x10c)](_0x2872a4)/0x3c),_0x30d684=Math[_0x364e65(0x10c)](_0x2872a4)%0x3c,_0x51e7c4=_0x2872a4>=0x0?'+':'-',_0x18f847=''+_0x51e7c4+_0x1a2bb5['toString']()[_0x364e65(0x110)](0x2,'0')+_0x30d684[_0x364e65(0x101)]()[_0x364e65(0x110)](0x2,'0');return _0x13221a+'-'+_0x1e1f0b+'-'+_0x352a57+'\x20'+_0x5a3ec0+':'+_0x5a245+':'+_0x22e37c+'.'+_0x40b14e+_0x18f847;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x260caf,_0x28cc5f){const _0x120bc9=a191_0x20aa,_0x5d7267=_0x260caf();while(!![]){try{const _0x430bd5=-parseInt(_0x120bc9(0x121))/0x1*(-parseInt(_0x120bc9(0x129))/0x2)+parseInt(_0x120bc9(0x124))/0x3*(-parseInt(_0x120bc9(0x12e))/0x4)+-parseInt(_0x120bc9(0x128))/0x5*(-parseInt(_0x120bc9(0x126))/0x6)+parseInt(_0x120bc9(0x125))/0x7+parseInt(_0x120bc9(0x12d))/0x8+parseInt(_0x120bc9(0x130))/0x9*(-parseInt(_0x120bc9(0x123))/0xa)+-parseInt(_0x120bc9(0x127))/0xb*(parseInt(_0x120bc9(0x12a))/0xc);if(_0x430bd5===_0x28cc5f)break;else _0x5d7267['push'](_0x5d7267['shift']());}catch(_0x5cc45c){_0x5d7267['push'](_0x5d7267['shift']());}}}(a191_0x2827,0x1f9aa));function a191_0x2827(){const _0x28709e=['Invalid\x20limit\x20value:\x20','370760wBGBxh','1724SeoWnG','Invalid\x20timeout\x20value:\x20','4527CyJwXW','26OrJnxb','.\x20Must\x20be\x20a\x20positive\x20integer.','1210NWMIrX','489nuckBY','353171neLeXU','6KsUvQP','1301905hVGjoD','631135muiUyT','11992PmUWuG','12kkkuKS','.\x20Must\x20be\x20an\x20integer.'];a191_0x2827=function(){return _0x28709e;};return a191_0x2827();}export function validateLimitOption(_0x190915){const _0x20f0ff=a191_0x20aa;if(!Number['isInteger'](_0x190915))return{'isValid':![],'error':_0x20f0ff(0x12c)+_0x190915+_0x20f0ff(0x12b)};if(_0x190915<=0x0)return{'isValid':![],'error':_0x20f0ff(0x12c)+_0x190915+_0x20f0ff(0x122)};return{'isValid':!![],'value':_0x190915};}function a191_0x20aa(_0x273f42,_0x231c1f){_0x273f42=_0x273f42-0x121;const _0x282772=a191_0x2827();let _0x20aaad=_0x282772[_0x273f42];return _0x20aaad;}export function validateTimeoutOption(_0x42ecda,_0x58830f=0x1e){const _0x4fdb10=a191_0x20aa;if(_0x42ecda===undefined)return{'isValid':!![],'value':_0x58830f};const _0x14a002=typeof _0x42ecda==='number'?_0x42ecda:parseFloat(_0x42ecda);if(isNaN(_0x14a002))return{'isValid':![],'error':_0x4fdb10(0x12f)+_0x42ecda+'.\x20Must\x20be\x20a\x20number.'};if(_0x14a002<=0x0)return{'isValid':![],'error':_0x4fdb10(0x12f)+_0x14a002+'.\x20Must\x20be\x20a\x20positive\x20number.'};return{'isValid':!![],'value':_0x14a002};}
|
package/dist/utils/process.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a192_0x5239e9=a192_0x28ab;(function(_0x5017f6,_0x4000e4){const _0x19ddee=a192_0x28ab,_0x2cb0bc=_0x5017f6();while(!![]){try{const _0x23c19a=parseInt(_0x19ddee(0xde))/0x1*(parseInt(_0x19ddee(0xc6))/0x2)+-parseInt(_0x19ddee(0xd4))/0x3*(-parseInt(_0x19ddee(0xe0))/0x4)+parseInt(_0x19ddee(0xdf))/0x5*(-parseInt(_0x19ddee(0xce))/0x6)+parseInt(_0x19ddee(0xca))/0x7+parseInt(_0x19ddee(0xc2))/0x8*(parseInt(_0x19ddee(0xe6))/0x9)+parseInt(_0x19ddee(0xd3))/0xa+-parseInt(_0x19ddee(0xe1))/0xb;if(_0x23c19a===_0x4000e4)break;else _0x2cb0bc['push'](_0x2cb0bc['shift']());}catch(_0x5308e1){_0x2cb0bc['push'](_0x2cb0bc['shift']());}}}(a192_0x39fc,0x6b84f));import{execSync,spawn}from'node:child_process';const SHELL_NAMES=new Set(['bash','zsh','sh',a192_0x5239e9(0xec),a192_0x5239e9(0xe7),'tcsh',a192_0x5239e9(0xc5),a192_0x5239e9(0xc1),a192_0x5239e9(0xe9),a192_0x5239e9(0xc0),'nu',a192_0x5239e9(0xb5),a192_0x5239e9(0xea),'xonsh']),EPHEMERAL_SHELL_SPAWNERS=new Set(['claude','code',a192_0x5239e9(0xd7),'electron',a192_0x5239e9(0xdb)]);function a192_0x39fc(){const _0x518541=['cmd.exe','Get-CimInstance\x20Win32_Process\x20-Filter\x20\x22ProcessId=','href','Invalid\x20URL:\x20','open','win32','ignore','start','error','powershell','dash','1713552zehZZN','ppid','comm','csh','2pJjsKI','platform','stderr','kill','657398QRHaYy','data','trim','map','4146jjNiTT','\x20-o\x20ppid=,comm=','darwin','protocol','replace','3343470VkfAsd','66LSvkQu','isInteger','stdout','cursor','pipe','where.exe','exit','treasure\x20studio','unref','https:','616982WzievX','10lgZnQn','8044aBIZex','9480878BLFRuh','which','pid','split','xdg-open','9ZdmnAP','ksh','http:','pwsh','elvish','join','fish','ion','toLowerCase'];a192_0x39fc=function(){return _0x518541;};return a192_0x39fc();}function getProcessInfoWindows(_0x281910){const _0x18fe31=a192_0x5239e9;try{if(!Number['isInteger'](_0x281910)||_0x281910<=0x0)return null;const _0x461e0b=_0x18fe31(0xb8)+_0x281910+'\x22\x20|\x20Select-Object\x20-Property\x20ParentProcessId,Name\x20|\x20ForEach-Object\x20{\x20\x22$($_.ParentProcessId),$($_.Name)\x22\x20}',_0x17340b=execSync('powershell.exe\x20-NoProfile\x20-NonInteractive\x20-Command\x20\x22'+_0x461e0b+'\x22',{'encoding':'utf-8','windowsHide':!![],'stdio':[_0x18fe31(0xd8),_0x18fe31(0xd8),_0x18fe31(0xd8)]})[_0x18fe31(0xcc)]();if(!_0x17340b)return null;const [_0x4edf04,..._0x39f590]=_0x17340b[_0x18fe31(0xe4)](','),_0x241d80=parseInt(_0x4edf04,0xa),_0x48da73=_0x39f590[_0x18fe31(0xeb)](',')[_0x18fe31(0xcc)]();if(isNaN(_0x241d80)||!_0x48da73)return null;return{'pid':_0x281910,'ppid':_0x241d80,'comm':_0x48da73[_0x18fe31(0xd2)](/\.exe$/i,'')};}catch{return null;}}function getProcessInfoPosix(_0x59de00){const _0x56c358=a192_0x5239e9;try{const _0x3d1ad9=0x400000;if(!Number[_0x56c358(0xd5)](_0x59de00)||_0x59de00<=0x0||_0x59de00>_0x3d1ad9)return null;const _0x41f5b0=execSync('ps\x20-p\x20'+_0x59de00+_0x56c358(0xcf),{'encoding':'utf-8','stdio':'pipe'})['trim'](),[_0x551f41,..._0x180075]=_0x41f5b0[_0x56c358(0xe4)](/\s+/),_0x356ef0=parseInt(_0x551f41,0xa),_0x2c64d4=_0x180075[_0x56c358(0xeb)]('\x20');if(isNaN(_0x356ef0))return null;return{'pid':_0x59de00,'ppid':_0x356ef0,'comm':_0x2c64d4};}catch{return null;}}function getProcessInfo(_0x177f47){if(process['platform']==='win32')return getProcessInfoWindows(_0x177f47);return getProcessInfoPosix(_0x177f47);}function getBasename(_0x451035){const _0x257255=a192_0x5239e9;return _0x451035[_0x257255(0xd2)](/^-/,'')[_0x257255(0xe4)]('/')['pop']()?.[_0x257255(0xb6)]()||'';}function isShell(_0x260470){return SHELL_NAMES['has'](getBasename(_0x260470));}function isEphemeralShellSpawner(_0x120b78){return EPHEMERAL_SHELL_SPAWNERS['has'](getBasename(_0x120b78));}let cachedShellPID;function findShellPID(){const _0x57d1e1=a192_0x5239e9;if(process['ppid']===undefined)return process[_0x57d1e1(0xe3)];let _0x2b7d7b=process['ppid'];const _0x3ce725=0xa;let _0x4272dd=0x0;while(_0x4272dd<_0x3ce725){const _0x5009c4=getProcessInfo(_0x2b7d7b);if(!_0x5009c4)break;if(isShell(_0x5009c4['comm'])){const _0x2b5de1=getProcessInfo(_0x5009c4[_0x57d1e1(0xc3)]);if(_0x2b5de1&&isEphemeralShellSpawner(_0x2b5de1[_0x57d1e1(0xc4)])){_0x2b7d7b=_0x5009c4['ppid'],_0x4272dd++;continue;}return _0x5009c4[_0x57d1e1(0xe3)];}if(_0x5009c4[_0x57d1e1(0xc3)]===0x0||_0x5009c4[_0x57d1e1(0xc3)]===0x1){if(isShell(_0x5009c4[_0x57d1e1(0xc4)]))return _0x5009c4[_0x57d1e1(0xe3)];break;}_0x2b7d7b=_0x5009c4[_0x57d1e1(0xc3)],_0x4272dd++;}return process['ppid']!==undefined?process[_0x57d1e1(0xc3)]:process[_0x57d1e1(0xe3)];}export function getPPID(){return cachedShellPID===undefined&&(cachedShellPID=findShellPID()),cachedShellPID;}export function clearPPIDCache(){cachedShellPID=undefined;}export function isProcessRunning(_0x439679){const _0x423e1b=a192_0x5239e9;if(!Number[_0x423e1b(0xd5)](_0x439679)||_0x439679<=0x0)return![];try{return process[_0x423e1b(0xc9)](_0x439679,0x0),!![];}catch{return![];}}export function openBrowser(_0x2f6da4){const _0x7e8f20=a192_0x5239e9;let _0x254c60;try{_0x254c60=new URL(_0x2f6da4);}catch{throw new Error(_0x7e8f20(0xba)+_0x2f6da4);}if(_0x254c60['protocol']!==_0x7e8f20(0xe8)&&_0x254c60['protocol']!==_0x7e8f20(0xdd))throw new Error('Unsupported\x20protocol:\x20'+_0x254c60[_0x7e8f20(0xd1)]);const _0x295363=_0x254c60[_0x7e8f20(0xb9)],_0x341fb3=process[_0x7e8f20(0xc7)];if(_0x341fb3===_0x7e8f20(0xbc))spawn(_0x7e8f20(0xb7),['/c',_0x7e8f20(0xbe),'',_0x295363],{'detached':!![],'stdio':_0x7e8f20(0xbd)})[_0x7e8f20(0xdc)]();else{const _0x542434=_0x341fb3===_0x7e8f20(0xd0)?_0x7e8f20(0xbb):_0x7e8f20(0xe5);spawn(_0x542434,[_0x295363],{'detached':!![],'stdio':_0x7e8f20(0xbd)})['unref']();}}export function isWindows(){const _0x319332=a192_0x5239e9;return process[_0x319332(0xc7)]===_0x319332(0xbc);}function a192_0x28ab(_0x1c03a9,_0x1e22c4){_0x1c03a9=_0x1c03a9-0xb5;const _0x39fc48=a192_0x39fc();let _0x28ab3b=_0x39fc48[_0x1c03a9];return _0x28ab3b;}export function getCrossSpawnOptions(_0x435b78){return{..._0x435b78??{},'shell':isWindows()};}export function escapeWindowsArg(_0x20a76f){const _0x5d0ff3=a192_0x5239e9;if(!/[ \t"&|<>^%!`\r\n]/['test'](_0x20a76f))return _0x20a76f;const _0x3f8e42=_0x20a76f[_0x5d0ff3(0xd2)](/"/g,'\x22\x22');return'\x22'+_0x3f8e42+'\x22';}export function crossSpawn(_0xa01b98,_0x20b7e0,_0x502ed3){const _0x469f30=a192_0x5239e9;if(isWindows()){const _0x47ae57=escapeWindowsArg(_0xa01b98),_0x17aa07=_0x20b7e0[_0x469f30(0xcd)](escapeWindowsArg),_0x4523a5=[_0x47ae57,..._0x17aa07][_0x469f30(0xeb)]('\x20');return spawn(_0x4523a5,[],{..._0x502ed3,'shell':!![]});}return spawn(_0xa01b98,_0x20b7e0,{..._0x502ed3,'shell':![]});}export function gracefulExit(_0x43b946=0x0){const _0xce86c5=a192_0x5239e9;isWindows()?setImmediate(()=>process[_0xce86c5(0xda)](_0x43b946)):process[_0xce86c5(0xda)](_0x43b946);}export function findExecutable(_0x5c6cb6,_0xbe62ac=0x1388){return new Promise(_0x18566d=>{const _0x3269d4=a192_0x28ab,_0x3d0499=isWindows()?_0x3269d4(0xd9):_0x3269d4(0xe2);let _0x2357e6=![];const _0x55db78=crossSpawn(_0x3d0499,[_0x5c6cb6],{'stdio':'pipe','shell':isWindows()}),_0x21b85c=setTimeout(()=>{const _0x554f5b=_0x3269d4;!_0x2357e6&&(_0x2357e6=!![],_0x55db78[_0x554f5b(0xc9)](),_0x18566d(null));},_0xbe62ac);let _0x3c1b7a='';_0x55db78[_0x3269d4(0xd6)]?.['on'](_0x3269d4(0xcb),_0x4b5e5d=>{_0x3c1b7a+=_0x4b5e5d['toString']();}),_0x55db78[_0x3269d4(0xc8)]?.['on'](_0x3269d4(0xcb),()=>{}),_0x55db78['on']('exit',_0x4a55fe=>{const _0x48bfb4=_0x3269d4;if(_0x2357e6)return;_0x2357e6=!![],clearTimeout(_0x21b85c);if(_0x4a55fe===0x0&&_0x3c1b7a[_0x48bfb4(0xcc)]()){const _0x20b8d1=_0x3c1b7a[_0x48bfb4(0xcc)]()['split'](/\r?\n/)[0x0];_0x18566d(_0x20b8d1);}else _0x18566d(null);}),_0x55db78['on'](_0x3269d4(0xbf),()=>{if(_0x2357e6)return;_0x2357e6=!![],clearTimeout(_0x21b85c),_0x18566d(null);});});}
|
package/dist/utils/prompt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x12e66e,_0x5b621c){const _0xb0aee1=a193_0x5a3f,_0x265d06=_0x12e66e();while(!![]){try{const _0x5260fa=parseInt(_0xb0aee1(0x7b))/0x1*(-parseInt(_0xb0aee1(0x85))/0x2)+-parseInt(_0xb0aee1(0x8a))/0x3*(-parseInt(_0xb0aee1(0x8f))/0x4)+parseInt(_0xb0aee1(0x78))/0x5*(parseInt(_0xb0aee1(0x8d))/0x6)+-parseInt(_0xb0aee1(0x8c))/0x7+-parseInt(_0xb0aee1(0x84))/0x8*(parseInt(_0xb0aee1(0x86))/0x9)+parseInt(_0xb0aee1(0x7d))/0xa*(-parseInt(_0xb0aee1(0x8e))/0xb)+parseInt(_0xb0aee1(0x91))/0xc;if(_0x5260fa===_0x5b621c)break;else _0x265d06['push'](_0x265d06['shift']());}catch(_0x2c557c){_0x265d06['push'](_0x265d06['shift']());}}}(a193_0x1e70,0xa23f3));import*as a193_0x4c6df5 from'readline';export function isInteractive(){const _0x35f3a4=a193_0x5a3f;return process[_0x35f3a4(0x7e)][_0x35f3a4(0x7f)]===!![];}export async function confirm(_0x2709d9){const _0x1e6e7d=a193_0x5a3f,_0xa53ccd=a193_0x4c6df5['createInterface']({'input':process['stdin'],'output':process[_0x1e6e7d(0x83)]});return new Promise(_0x1e6be7=>{const _0x1b4e48=_0x1e6e7d;_0xa53ccd[_0x1b4e48(0x76)](_0x2709d9+_0x1b4e48(0x75),_0x9a5ca2=>{const _0x5b14d1=_0x1b4e48;_0xa53ccd[_0x5b14d1(0x81)](),_0x1e6be7(_0x9a5ca2[_0x5b14d1(0x88)]()==='y'||_0x9a5ca2[_0x5b14d1(0x88)]()===_0x5b14d1(0x87));});});}export async function confirmKey(_0x276059){const _0x3d2d45=a193_0x5a3f;if(!process[_0x3d2d45(0x7e)][_0x3d2d45(0x7f)])return![];return process[_0x3d2d45(0x7c)][_0x3d2d45(0x80)](_0x276059+_0x3d2d45(0x79)),new Promise(_0x4140bf=>{const _0x3b9da9=_0x3d2d45,_0x54f1b3=process[_0x3b9da9(0x7e)];_0x54f1b3['setRawMode'](!![]),_0x54f1b3[_0x3b9da9(0x77)](),_0x54f1b3[_0x3b9da9(0x8b)](_0x3b9da9(0x82));const _0x375cad=_0x392464=>{const _0x551ced=_0x3b9da9;_0x54f1b3[_0x551ced(0x89)](![]),_0x54f1b3['pause'](),_0x54f1b3[_0x551ced(0x90)]('data',_0x375cad);if(_0x392464==='\x1b'){process[_0x551ced(0x7c)][_0x551ced(0x80)]('\x0a'),_0x4140bf(![]);return;}_0x392464==='\x03'&&(process[_0x551ced(0x7c)][_0x551ced(0x80)]('\x0a'),process[_0x551ced(0x7a)](0x82));if(_0x392464[_0x551ced(0x88)]()==='y'){process[_0x551ced(0x7c)][_0x551ced(0x80)]('y\x0a'),_0x4140bf(!![]);return;}process[_0x551ced(0x7c)][_0x551ced(0x80)]('\x0a'),_0x4140bf(![]);};_0x54f1b3['on']('data',_0x375cad);});}function a193_0x5a3f(_0x3f15cc,_0x3a17a2){_0x3f15cc=_0x3f15cc-0x75;const _0x1e70d0=a193_0x1e70();let _0x5a3fe2=_0x1e70d0[_0x3f15cc];return _0x5a3fe2;}function a193_0x1e70(){const _0x75d26e=['8331WBSfOw','setEncoding','8888047tYFidV','1220646ylJgdd','8679IaHbKo','508CzGcFo','removeListener','49263516Fweqdq','\x20(y/N):\x20','question','resume','10cwsfNL','\x20[y/N]\x20','exit','5WMcaBr','stderr','16210BiSHBm','stdin','isTTY','write','close','utf8','stdout','736328XMCUeX','439742gnEBJN','54zxdzQA','yes','toLowerCase','setRawMode'];a193_0x1e70=function(){return _0x75d26e;};return a193_0x1e70();}
|
package/dist/utils/spinner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x336295,_0x2313fa){const _0xd367d0=a194_0x349e,_0x1ccb97=_0x336295();while(!![]){try{const _0x1f971e=parseInt(_0xd367d0(0x86))/0x1+parseInt(_0xd367d0(0x89))/0x2+-parseInt(_0xd367d0(0x8e))/0x3+parseInt(_0xd367d0(0x81))/0x4+parseInt(_0xd367d0(0x7c))/0x5*(parseInt(_0xd367d0(0x75))/0x6)+parseInt(_0xd367d0(0x79))/0x7+parseInt(_0xd367d0(0x8f))/0x8*(-parseInt(_0xd367d0(0x7d))/0x9);if(_0x1f971e===_0x2313fa)break;else _0x1ccb97['push'](_0x1ccb97['shift']());}catch(_0x2b5e3f){_0x1ccb97['push'](_0x1ccb97['shift']());}}}(a194_0x285e,0xcd9c7));import a194_0x37d6ae from'ora';import{isWindows}from'./process.js';const windowsSpinner={'interval':0x3e8,'frames':['•']};export function createCommandSpinner(_0x41f990,_0x1cc92d={}){const _0x5f27e5=a194_0x349e,{verbose:verbose=![],forceEnabled:forceEnabled=![]}=_0x1cc92d;return a194_0x37d6ae({'text':_0x41f990,'color':'cyan','stream':process['stderr'],'isEnabled':forceEnabled||process['stderr'][_0x5f27e5(0x88)]&&!verbose,...isWindows()&&{'spinner':windowsSpinner}});}export async function withSpinner(_0x390e1f,_0x350ba8,_0x2cac72={}){const _0x2f6e47=a194_0x349e,_0x4802c9=_0x2cac72[_0x2f6e47(0x8a)]??(()=>Date['now']()),_0xfe27de=createCommandSpinner(_0x390e1f,_0x2cac72);_0xfe27de[_0x2f6e47(0x77)]();const _0x14c160=_0x4802c9();try{const _0x287df5=await _0x350ba8(),_0x96cb4a=_0x4802c9()-_0x14c160;return _0xfe27de[_0x2f6e47(0x7f)](),{'data':_0x287df5,'elapsedMs':_0x96cb4a};}catch(_0x57598b){_0xfe27de[_0x2f6e47(0x7f)]();throw _0x57598b;}}export async function withProgressSpinner(_0x5257f3,_0x18144b,_0x524d1f={}){const _0x90ea68=a194_0x349e,_0x30153d=_0x524d1f[_0x90ea68(0x8a)]??(()=>Date[_0x90ea68(0x84)]()),_0x47c576=_0x524d1f[_0x90ea68(0x8d)]??setInterval,_0x20464e=createCommandSpinner(_0x5257f3,_0x524d1f);_0x20464e[_0x90ea68(0x77)]();const _0x545fd0=_0x30153d(),_0x45974d=_0x5257f3[_0x90ea68(0x76)](_0x90ea68(0x83),'')[_0x90ea68(0x87)]()||_0x90ea68(0x85),_0x363dc2={};let _0x4c6ef2=_0x5257f3;const _0xaae078=()=>{const _0x44e5eb=_0x90ea68;if(!_0x20464e[_0x44e5eb(0x7b)])return;const _0x340334=_0x30153d()-_0x545fd0,_0x76fae8=formatElapsed(_0x340334),_0x4470a6=_0x363dc2[_0x44e5eb(0x78)]?.['trim']()||_0x45974d,_0x43faa9=_0x363dc2['jobId']?_0x44e5eb(0x8b)+_0x363dc2[_0x44e5eb(0x8c)]+']':'',_0x186cd=_0x363dc2['extra']?'\x20'+_0x363dc2[_0x44e5eb(0x80)]:'',_0xdddd63=_0x4470a6+'\x20'+_0x76fae8+_0x186cd+_0x43faa9;_0xdddd63!==_0x4c6ef2&&_0xdddd63[_0x44e5eb(0x87)]()&&(_0x20464e[_0x44e5eb(0x7e)]=_0xdddd63,_0x4c6ef2=_0xdddd63);},_0x4a412f=_0x47c576(()=>{_0xaae078();},0x3e8),_0x2691e7={'setPhase':_0x5d1090=>{const _0x4db94b=_0x90ea68;_0x363dc2[_0x4db94b(0x78)]=_0x5d1090;const _0x3fe9fc=_0x5d1090?.[_0x4db94b(0x87)]()||_0x45974d,_0xf7d298=_0x30153d()-_0x545fd0,_0x4a5ef3=formatElapsed(_0xf7d298),_0x438e0e=_0x363dc2[_0x4db94b(0x8c)]?_0x4db94b(0x8b)+_0x363dc2[_0x4db94b(0x8c)]+']':'',_0x502928=_0x363dc2[_0x4db94b(0x80)]?'\x20'+_0x363dc2[_0x4db94b(0x80)]:'',_0x80a1fe=_0x3fe9fc+'\x20'+_0x4a5ef3+_0x502928+_0x438e0e;_0x20464e[_0x4db94b(0x7b)]&&_0x80a1fe['trim']()&&(_0x20464e[_0x4db94b(0x7e)]=_0x80a1fe,_0x4c6ef2=_0x80a1fe);},'setJobId':_0x5bb10f=>{_0x363dc2['jobId']=_0x5bb10f,_0xaae078();},'setExtra':_0x599ce1=>{const _0x32a10f=_0x90ea68;_0x363dc2[_0x32a10f(0x80)]=_0x599ce1,_0xaae078();}};_0xaae078();try{const _0x11f54e=await _0x18144b(_0x2691e7),_0x18e03a=_0x30153d()-_0x545fd0;return{'data':_0x11f54e,'elapsedMs':_0x18e03a};}finally{clearInterval(_0x4a412f),_0x20464e[_0x90ea68(0x7f)]();}}function a194_0x349e(_0x567c50,_0x3942ff){_0x567c50=_0x567c50-0x75;const _0x285e63=a194_0x285e();let _0x349edc=_0x285e63[_0x567c50];return _0x349edc;}function a194_0x285e(){const _0x5f5095=['clock','\x20[Job\x20ID:\x20','jobId','intervalFactory','3992889nUDDaR','3894448JFfkJg','3134316gDvPtG','replace','start','phase','899479stIHZZ','toFixed','isSpinning','15LxnnAc','72fDlCvl','text','stop','extra','4524652VhiCgK','floor','...','now','Processing','1567190SWuUmD','trim','isTTY','3347172RgRHXi'];a194_0x285e=function(){return _0x5f5095;};return a194_0x285e();}export function formatElapsed(_0x490e0c){const _0x26679c=a194_0x349e,_0x36ccf0=Math[_0x26679c(0x82)](_0x490e0c/0x3e8);if(_0x36ccf0<0x3c)return(_0x490e0c/0x3e8)[_0x26679c(0x7a)](0x1)+'s';const _0x3a679d=Math[_0x26679c(0x82)](_0x36ccf0/0x3c),_0x3d5fdf=_0x36ccf0%0x3c;if(_0x3a679d<0x3c)return _0x3a679d+'m\x20'+_0x3d5fdf+'s';const _0x1eeab9=Math[_0x26679c(0x82)](_0x3a679d/0x3c),_0x478efe=_0x3a679d%0x3c;return _0x1eeab9+'h\x20'+_0x478efe+'m';}
|
package/dist/utils/sse-parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x258ad2,_0x4883a3){const _0x4521d3=a195_0x2214,_0x4ff959=_0x258ad2();while(!![]){try{const _0x562b64=-parseInt(_0x4521d3(0x1d7))/0x1*(-parseInt(_0x4521d3(0x1d2))/0x2)+-parseInt(_0x4521d3(0x1cb))/0x3+-parseInt(_0x4521d3(0x1d9))/0x4+parseInt(_0x4521d3(0x1d0))/0x5*(-parseInt(_0x4521d3(0x1de))/0x6)+-parseInt(_0x4521d3(0x1df))/0x7+parseInt(_0x4521d3(0x1cc))/0x8+parseInt(_0x4521d3(0x1da))/0x9;if(_0x562b64===_0x4883a3)break;else _0x4ff959['push'](_0x4ff959['shift']());}catch(_0xa5813d){_0x4ff959['push'](_0x4ff959['shift']());}}}(a195_0x60fd,0x73af1));export async function*parseSSEStream(_0x296609,_0x20d907){const _0xcdd4d5=a195_0x2214;if(!_0x296609[_0xcdd4d5(0x1ca)])throw new Error(_0xcdd4d5(0x1ce));const _0x44cc7f=_0x296609['body'][_0xcdd4d5(0x1d5)](),_0x8bddd6=new TextDecoder();let _0x2224f3='',_0xcd33fe={};try{while(!![]){const {done:_0x52301b,value:_0x17656e}=await _0x44cc7f['read']();if(_0x52301b){if(_0xcd33fe[_0xcdd4d5(0x1dd)]){_0x20d907?.['debug'](_0xcdd4d5(0x1dc)+_0xcd33fe[_0xcdd4d5(0x1dd)]);const _0x8f17be=parseSSEData(_0xcd33fe['data']);yield _0x8f17be;}break;}_0x2224f3+=_0x8bddd6['decode'](_0x17656e,{'stream':!![]});const _0x344da5=_0x2224f3[_0xcdd4d5(0x1e0)]('\x0a');_0x2224f3=_0x344da5[_0xcdd4d5(0x1cd)]()||'';for(const _0x32efe6 of _0x344da5){if(_0x32efe6[_0xcdd4d5(0x1e1)]()===''){if(_0xcd33fe['data']){_0x20d907?.[_0xcdd4d5(0x1d4)](_0xcdd4d5(0x1dc)+_0xcd33fe[_0xcdd4d5(0x1dd)]);const _0x4e08b7=parseSSEData(_0xcd33fe[_0xcdd4d5(0x1dd)]);yield _0x4e08b7,_0xcd33fe={};}continue;}if(_0x32efe6[_0xcdd4d5(0x1e2)](':'))continue;const _0x4bdb83=_0x32efe6[_0xcdd4d5(0x1d1)](':');if(_0x4bdb83===-0x1)continue;const _0x419458=_0x32efe6[_0xcdd4d5(0x1cf)](0x0,_0x4bdb83);let _0x13e31b=_0x32efe6[_0xcdd4d5(0x1cf)](_0x4bdb83+0x1);_0x13e31b[_0xcdd4d5(0x1e2)]('\x20')&&(_0x13e31b=_0x13e31b[_0xcdd4d5(0x1cf)](0x1));switch(_0x419458){case'event':_0xcd33fe[_0xcdd4d5(0x1db)]=_0x13e31b;break;case'data':_0xcd33fe[_0xcdd4d5(0x1dd)]=_0xcd33fe[_0xcdd4d5(0x1dd)]?_0xcd33fe['data']+'\x0a'+_0x13e31b:_0x13e31b;break;case'id':_0xcd33fe['id']=_0x13e31b;break;}}}}finally{_0x44cc7f[_0xcdd4d5(0x1d6)]();}}function a195_0x2214(_0x3411ad,_0x57589b){_0x3411ad=_0x3411ad-0x1ca;const _0x60fdd9=a195_0x60fd();let _0x2214e9=_0x60fdd9[_0x3411ad];return _0x2214e9;}function a195_0x60fd(){const _0x268895=['2696036zvDtSz','split','trim','startsWith','body','2754801jWdtKb','7017392sYHmyk','pop','Response\x20body\x20is\x20null','slice','5VWPhFZ','indexOf','8tyCxay','Failed\x20to\x20parse\x20SSE\x20data\x20as\x20JSON:\x20','debug','getReader','releaseLock','81047dKSIgQ','parse','1528044KRuySo','15527142epizPJ','event','[LLM\x20API\x20SSE]\x20','data','4603998zJYOvP'];a195_0x60fd=function(){return _0x268895;};return a195_0x60fd();}function parseSSEData(_0x334702){const _0x15283f=a195_0x2214;try{return JSON[_0x15283f(0x1d8)](_0x334702);}catch(_0x86e0d7){throw new Error(_0x15283f(0x1d3)+_0x334702,{'cause':_0x86e0d7});}}
|