@treasuredata/tdx 2026.3.30 → 2026.3.31
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.d.ts +1 -1
- package/dist/cli-categories.d.ts.map +1 -1
- package/dist/cli-categories.js +1 -1
- package/dist/cli-categories.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/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/api-command.js.map +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-login-command.js +1 -1
- package/dist/commands/cas-command.d.ts +55 -0
- package/dist/commands/cas-command.d.ts.map +1 -0
- package/dist/commands/cas-command.js +1 -0
- package/dist/commands/cas-command.js.map +1 -0
- package/dist/commands/cas-segment-command.d.ts +18 -0
- package/dist/commands/cas-segment-command.d.ts.map +1 -0
- package/dist/commands/cas-segment-command.js +1 -0
- package/dist/commands/cas-segment-command.js.map +1 -0
- 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.d.ts.map +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/unset-command.js.map +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.d.ts.map +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/use-command.js.map +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.d.ts +1 -0
- package/dist/core/global-context.d.ts.map +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/global-context.js.map +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.d.ts +2 -1
- package/dist/core/session.d.ts.map +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/session.js.map +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/cas/cas-api-client.d.ts +77 -0
- package/dist/sdk/cas/cas-api-client.d.ts.map +1 -0
- package/dist/sdk/cas/cas-api-client.js +1 -0
- package/dist/sdk/cas/cas-api-client.js.map +1 -0
- package/dist/sdk/cas/cas-audience-yaml.d.ts +32 -0
- package/dist/sdk/cas/cas-audience-yaml.d.ts.map +1 -0
- package/dist/sdk/cas/cas-audience-yaml.js +1 -0
- package/dist/sdk/cas/cas-audience-yaml.js.map +1 -0
- package/dist/sdk/cas/cas-segment-yaml.d.ts +38 -0
- package/dist/sdk/cas/cas-segment-yaml.d.ts.map +1 -0
- package/dist/sdk/cas/cas-segment-yaml.js +1 -0
- package/dist/sdk/cas/cas-segment-yaml.js.map +1 -0
- package/dist/sdk/cas/index.d.ts +61 -0
- package/dist/sdk/cas/index.d.ts.map +1 -0
- package/dist/sdk/cas/index.js +1 -0
- package/dist/sdk/cas/index.js.map +1 -0
- package/dist/sdk/cas/pull-workflow.d.ts +53 -0
- package/dist/sdk/cas/pull-workflow.d.ts.map +1 -0
- package/dist/sdk/cas/pull-workflow.js +1 -0
- package/dist/sdk/cas/pull-workflow.js.map +1 -0
- package/dist/sdk/cas/push-workflow.d.ts +50 -0
- package/dist/sdk/cas/push-workflow.d.ts.map +1 -0
- package/dist/sdk/cas/push-workflow.js +1 -0
- package/dist/sdk/cas/push-workflow.js.map +1 -0
- package/dist/sdk/cas/types.d.ts +115 -0
- package/dist/sdk/cas/types.d.ts.map +1 -0
- package/dist/sdk/cas/types.js +1 -0
- package/dist/sdk/cas/types.js.map +1 -0
- 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.d.ts +4 -0
- package/dist/sdk/client/endpoints.d.ts.map +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/endpoints.js.map +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.d.ts +6 -0
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/index.js.map +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.js +1 -1
- package/dist/sdk/types/cas.d.ts +242 -0
- package/dist/sdk/types/cas.d.ts.map +1 -0
- package/dist/sdk/types/cas.js +1 -0
- package/dist/sdk/types/cas.js.map +1 -0
- package/dist/sdk/types/index.d.ts +3 -1
- package/dist/sdk/types/index.d.ts.map +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/index.js.map +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
|
-
const
|
|
1
|
+
const a194_0x505fd5=a194_0x4b29;(function(_0x3f3ba5,_0x9f5eee){const _0x22cdb5=a194_0x4b29,_0x5814d7=_0x3f3ba5();while(!![]){try{const _0x54c5cd=-parseInt(_0x22cdb5(0x121))/0x1*(-parseInt(_0x22cdb5(0x132))/0x2)+parseInt(_0x22cdb5(0x124))/0x3+-parseInt(_0x22cdb5(0x11f))/0x4*(-parseInt(_0x22cdb5(0x130))/0x5)+-parseInt(_0x22cdb5(0x129))/0x6*(parseInt(_0x22cdb5(0x138))/0x7)+parseInt(_0x22cdb5(0x12e))/0x8*(-parseInt(_0x22cdb5(0x12f))/0x9)+parseInt(_0x22cdb5(0x131))/0xa*(-parseInt(_0x22cdb5(0x11e))/0xb)+-parseInt(_0x22cdb5(0x125))/0xc*(-parseInt(_0x22cdb5(0x120))/0xd);if(_0x54c5cd===_0x9f5eee)break;else _0x5814d7['push'](_0x5814d7['shift']());}catch(_0x25e61d){_0x5814d7['push'](_0x5814d7['shift']());}}}(a194_0x2fa5,0x5aa21));import{promises as a194_0x6bae9b}from'fs';import a194_0x4b2b99 from'path';import a194_0x373a15 from'ignore';export const WORKFLOW_FILE_EXTENSION=a194_0x505fd5(0x133);function a194_0x4b29(_0x36812c,_0x3156ec){_0x36812c=_0x36812c-0x11c;const _0x2fa549=a194_0x2fa5();let _0x4b299e=_0x2fa549[_0x36812c];return _0x4b299e;}export function shouldIncludeInArchive(_0x28d4ca){const _0x15129b=a194_0x505fd5;if(_0x28d4ca===_0x15129b(0x136))return!![];if(_0x28d4ca['startsWith']('.'))return![];if(_0x28d4ca[_0x15129b(0x126)]('~'))return![];if(_0x28d4ca===_0x15129b(0x12b)||_0x28d4ca===_0x15129b(0x11d))return![];return!![];}export function parseDigdagignore(_0x463ee9){const _0x2931cd=a194_0x505fd5;return _0x463ee9[_0x2931cd(0x12c)]('\x0a')['map'](_0x14c237=>_0x14c237[_0x2931cd(0x127)]())['filter'](_0x4e2699=>_0x4e2699[_0x2931cd(0x128)]>0x0&&!_0x4e2699[_0x2931cd(0x11c)]('#'));}export async function loadDigdagignore(_0x2555ad){const _0x365775=a194_0x505fd5,_0x1fbc44=a194_0x4b2b99[_0x365775(0x139)](_0x2555ad,'.digdagignore');try{const _0x4446f8=await a194_0x6bae9b[_0x365775(0x12a)](_0x1fbc44,_0x365775(0x137));return parseDigdagignore(_0x4446f8);}catch(_0x59edf2){if(_0x59edf2[_0x365775(0x123)]===_0x365775(0x135))return null;throw _0x59edf2;}}function a194_0x2fa5(){const _0x12652a=['1092819UPUhEk','3459444ISdBrL','endsWith','trim','length','5448FlmoJv','readFile','Thumbs.db','split','slice','111248ElPRUS','9iolTce','5wTeGyY','4390070VjiTWO','2hFZllx','.dig','map','ENOENT','.digdag','utf-8','3521vkhmgP','join','startsWith','.DS_Store','11vSvVHw','2347676WsrZXe','13xJVeUu','41391Mbqzpt','add','code'];a194_0x2fa5=function(){return _0x12652a;};return a194_0x2fa5();}export function createIgnoreInstance(_0x8b8326){const _0x2d4c5a=a194_0x505fd5,_0x25eb4c=a194_0x373a15();return _0x8b8326&&_0x8b8326['length']>0x0&&_0x25eb4c[_0x2d4c5a(0x122)](_0x8b8326),_0x25eb4c;}export function addScopedPatterns(_0x1378b9,_0x498866,_0x3dc0fb){const _0x45c4d8=a194_0x505fd5,_0x58acb4=_0x498866[_0x45c4d8(0x134)](_0x4a4131=>{const _0x59ecfc=_0x45c4d8;if(_0x4a4131[_0x59ecfc(0x11c)]('!')){const _0x64109c=_0x4a4131[_0x59ecfc(0x12d)](0x1);if(_0x64109c['startsWith']('/'))return'!'+_0x3dc0fb+_0x64109c;return'!'+_0x3dc0fb+'/'+_0x64109c;}if(_0x4a4131[_0x59ecfc(0x11c)]('/'))return''+_0x3dc0fb+_0x4a4131;return _0x3dc0fb+'/'+_0x4a4131;});return _0x1378b9[_0x45c4d8(0x122)](_0x58acb4),_0x1378b9;}export function shouldIgnoreWithInstance(_0x174e28,_0x4e77df,_0xf22b4){const _0x590833=_0x4e77df['replace'](/\\/g,'/'),_0x4b85d3=_0xf22b4?_0x590833+'/':_0x590833;return _0x174e28['ignores'](_0x4b85d3);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a195_0x41c3f9=a195_0x424b;function a195_0x4c3d(){const _0x2bf186=['http','1051298rWryBR','test-api-key-id/test-api-key-secret','createFetch','2VFCTUJ','teardown','warn','11777778DLSTeV','args','run','originalFetch','map','fetch','options','8WqesOu','1218340AWjpQs','ERROR','fail','site','push','error','log','3386568IcFZaT','70LlgnHB','5zLybtA','reset','join','3730139JYIVKk','3666243wLqikP','us01','3363371UrvswK'];a195_0x4c3d=function(){return _0x2bf186;};return a195_0x4c3d();}(function(_0x5f0491,_0x12c38f){const _0x3e7253=a195_0x424b,_0x521a7f=_0x5f0491();while(!![]){try{const _0x4dfd5e=parseInt(_0x3e7253(0x1f6))/0x1+-parseInt(_0x3e7253(0x1f9))/0x2*(parseInt(_0x3e7253(0x1f2))/0x3)+parseInt(_0x3e7253(0x204))/0x4+parseInt(_0x3e7253(0x20d))/0x5*(-parseInt(_0x3e7253(0x20b))/0x6)+parseInt(_0x3e7253(0x1f1))/0x7+-parseInt(_0x3e7253(0x203))/0x8*(parseInt(_0x3e7253(0x1fc))/0x9)+-parseInt(_0x3e7253(0x20c))/0xa*(-parseInt(_0x3e7253(0x1f4))/0xb);if(_0x4dfd5e===_0x12c38f)break;else _0x521a7f['push'](_0x521a7f['shift']());}catch(_0x26252f){_0x521a7f['push'](_0x521a7f['shift']());}}}(a195_0x4c3d,0xe4030));import{TDX,LogLevel}from'../sdk/index.js';import{createHTTPMock}from'./http-mock.js';import{createTestGlobalOptions}from'./factories.js';function a195_0x424b(_0x10e5f8,_0x96e95c){_0x10e5f8=_0x10e5f8-0x1ef;const _0x4c3d59=a195_0x4c3d();let _0x424bd3=_0x4c3d59[_0x10e5f8];return _0x424bd3;}export class CommandRunner{[a195_0x41c3f9(0x1f5)];[a195_0x41c3f9(0x1ff)];constructor(){const _0x579a0=a195_0x41c3f9;this['http']=createHTTPMock(),this[_0x579a0(0x1ff)]=global[_0x579a0(0x201)];}['setup'](){const _0x150a1e=a195_0x41c3f9;this[_0x150a1e(0x1ff)]=global[_0x150a1e(0x201)],global[_0x150a1e(0x201)]=this[_0x150a1e(0x1f5)][_0x150a1e(0x1f8)]();}[a195_0x41c3f9(0x1fa)](_0x44557d){const _0xb1adc7=a195_0x41c3f9;try{_0x44557d?.[_0xb1adc7(0x206)]&&this['http']['verify'](_0x44557d);}finally{global[_0xb1adc7(0x201)]=this[_0xb1adc7(0x1ff)],this[_0xb1adc7(0x1f5)][_0xb1adc7(0x1ef)]();}}async[a195_0x41c3f9(0x1fe)](_0x43d700,_0x2ae76f={}){const _0x3d3487=a195_0x41c3f9,_0x5d79f3=[],_0x3c1933=[],_0x33302e=console[_0x3d3487(0x20a)],_0x4a9939=console[_0x3d3487(0x209)],_0x30a7fd=console[_0x3d3487(0x1fb)];console[_0x3d3487(0x20a)]=(..._0x721556)=>{const _0xd0720f=_0x3d3487;_0x5d79f3[_0xd0720f(0x208)](_0x721556[_0xd0720f(0x200)](String)[_0xd0720f(0x1f0)]('\x20'));},console[_0x3d3487(0x209)]=(..._0x3db78d)=>{const _0x3042b1=_0x3d3487;_0x3c1933['push'](_0x3db78d[_0x3042b1(0x200)](String)['join']('\x20'));},console[_0x3d3487(0x1fb)]=(..._0x869b29)=>{const _0xb11f6c=_0x3d3487;_0x3c1933['push'](_0x869b29['map'](String)[_0xb11f6c(0x1f0)]('\x20'));};try{const _0x4004c4=new TDX({'site':_0x2ae76f[_0x3d3487(0x202)]?.[_0x3d3487(0x207)]??_0x3d3487(0x1f3),'apiKey':_0x3d3487(0x1f7),'logLevel':LogLevel[_0x3d3487(0x205)]}),_0x55a56d={'options':createTestGlobalOptions(_0x2ae76f[_0x3d3487(0x202)]),'args':_0x2ae76f[_0x3d3487(0x1fd)]??[],'tdx':_0x4004c4},_0x24c5e6=new _0x43d700(),_0x179be7=await _0x24c5e6[_0x3d3487(0x1fe)](_0x55a56d);return{'exitCode':_0x179be7,'stdout':_0x5d79f3,'stderr':_0x3c1933};}finally{console[_0x3d3487(0x20a)]=_0x33302e,console[_0x3d3487(0x209)]=_0x4a9939,console[_0x3d3487(0x1fb)]=_0x30a7fd;}}async['runSequence'](_0x2da01a){const _0x123c7e=a195_0x41c3f9,_0x230573=[];for(const {command:_0x362ed4,options:_0x453cbd}of _0x2da01a){const _0x328295=await this[_0x123c7e(0x1fe)](_0x362ed4,_0x453cbd);_0x230573['push'](_0x328295);if(_0x328295['exitCode']!==0x0)break;}return _0x230573;}}export function createCommandRunner(){return new CommandRunner();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5c746d,_0x52bf31){const _0x203fcb=a196_0x34f5,_0x381ec7=_0x5c746d();while(!![]){try{const _0x384805=parseInt(_0x203fcb(0x82))/0x1+parseInt(_0x203fcb(0x7b))/0x2*(-parseInt(_0x203fcb(0x7e))/0x3)+-parseInt(_0x203fcb(0x6a))/0x4+parseInt(_0x203fcb(0x70))/0x5+-parseInt(_0x203fcb(0x78))/0x6+parseInt(_0x203fcb(0x74))/0x7+parseInt(_0x203fcb(0x7d))/0x8*(-parseInt(_0x203fcb(0x6b))/0x9);if(_0x384805===_0x52bf31)break;else _0x381ec7['push'](_0x381ec7['shift']());}catch(_0x12dd9e){_0x381ec7['push'](_0x381ec7['shift']());}}}(a196_0x4165,0xc7559));import{vi}from'vitest';import{join}from'path';import{Logger,LogLevel,FileHandler}from'../utils/logger/index.js';import{getGlobalCacheDir}from'../utils/global-cache.js';function a196_0x34f5(_0x149407,_0x315ddc){_0x149407=_0x149407-0x67;const _0x416558=a196_0x4165();let _0x34f5f9=_0x416558[_0x149407];return _0x34f5f9;}export function createTestSDKContext(_0x557e9b){const _0x491f2f=a196_0x34f5;return{'site':_0x491f2f(0x7f),'apiKey':_0x491f2f(0x79),'logLevel':LogLevel[_0x491f2f(0x72)],..._0x557e9b};}export function createTestGlobalOptions(_0x4f5e4f){const _0x16a6fe=a196_0x34f5;return{'site':_0x16a6fe(0x7f),'format':_0x16a6fe(0x7a),'noColor':!![],'limit':0x64,'verbose':![],'timeout':_0x16a6fe(0x68),'dryRun':![],'yes':![],'logLevel':LogLevel[_0x16a6fe(0x72)],..._0x4f5e4f};}function a196_0x4165(){const _0x5b5a23=['query','test-api-key','211107IJKhkj','segment','error','30000','init','2938388WtVUBR','18oQcsrW','log','logs','push','join','2140185eqkwaZ','map','ERROR','DEBUG','10631607MkIhkh','user','journey','reset','632310LReFra','test-api-key-id/test-api-key-secret','table','8EhvClx','warn','844328HcCTti','217806GpVHvT','us01'];a196_0x4165=function(){return _0x5b5a23;};return a196_0x4165();}export async function initTestLogger(){const _0x39f038=a196_0x34f5;Logger['reset']();const _0x3b486e=join(getGlobalCacheDir(),_0x39f038(0x6d),'tdx-test.log');await Logger[_0x39f038(0x69)]({'defaultLevel':LogLevel[_0x39f038(0x73)],'handlers':[new FileHandler({'filePath':_0x3b486e,'rotate':![]})]});}export function resetTestLogger(){const _0xe146d2=a196_0x34f5;Logger[_0xe146d2(0x77)]();}export function createMockTDX(_0x46cf99){const _0x55df00=a196_0x34f5;return{'context':{'site':'us01','apiKey':_0x55df00(0x81),'logLevel':LogLevel[_0x55df00(0x72)]},'query':{'execute':vi['fn'](),'listDatabases':vi['fn'](),'listTables':vi['fn'](),'describeTable':vi['fn'](),'showTable':vi['fn'](),..._0x46cf99?.[_0x55df00(0x80)]},'segment':{'listParents':vi['fn'](),'getParent':vi['fn'](),'list':vi['fn'](),'get':vi['fn'](),'create':vi['fn'](),'update':vi['fn'](),'delete':vi['fn'](),..._0x46cf99?.[_0x55df00(0x83)]},'journey':{'list':vi['fn'](),'get':vi['fn'](),'create':vi['fn'](),'update':vi['fn'](),'delete':vi['fn'](),..._0x46cf99?.[_0x55df00(0x76)]},'workflow':{'list':vi['fn'](),'get':vi['fn'](),'run':vi['fn'](),..._0x46cf99?.['workflow']},'user':{'show':vi['fn'](),..._0x46cf99?.[_0x55df00(0x75)]},'api':{'request':vi['fn'](),..._0x46cf99?.['api']},..._0x46cf99};}export function createTestCommandContext(_0x2e6396){const _0x4b1cbe=createTestGlobalOptions(_0x2e6396?.['options']),_0x3c6a00=_0x2e6396?.['tdx']??createMockTDX();return{'options':_0x4b1cbe,'args':_0x2e6396?.['args']??[],'tdx':_0x3c6a00};}export function captureConsole(){const _0x151ac9=a196_0x34f5,_0x2fc35c=[],_0x384fcf=[],_0x9c9d9=console['log'],_0x2a5af9=console[_0x151ac9(0x67)],_0x27cbd7=console[_0x151ac9(0x7c)];return console[_0x151ac9(0x6c)]=(..._0xbe03a0)=>{_0x2fc35c['push'](_0xbe03a0['map'](String)['join']('\x20'));},console['error']=(..._0x3b4618)=>{const _0x904369=_0x151ac9;_0x384fcf[_0x904369(0x6e)](_0x3b4618[_0x904369(0x71)](String)[_0x904369(0x6f)]('\x20'));},console['warn']=(..._0x3fdf49)=>{const _0x4356ec=_0x151ac9;_0x384fcf['push'](_0x3fdf49[_0x4356ec(0x71)](String)[_0x4356ec(0x6f)]('\x20'));},{'stdout':_0x2fc35c,'stderr':_0x384fcf,'restore':()=>{const _0x413d39=_0x151ac9;console[_0x413d39(0x6c)]=_0x9c9d9,console['error']=_0x2a5af9,console[_0x413d39(0x7c)]=_0x27cbd7;}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a187_0x23b23d=a187_0x1045;(function(_0x5a079e,_0x2fe437){const _0xfbb1c5=a187_0x1045,_0x51895c=_0x5a079e();while(!![]){try{const _0x456a1a=-parseInt(_0xfbb1c5(0x1ac))/0x1+-parseInt(_0xfbb1c5(0x184))/0x2*(parseInt(_0xfbb1c5(0x1b3))/0x3)+-parseInt(_0xfbb1c5(0x1a4))/0x4*(parseInt(_0xfbb1c5(0x170))/0x5)+parseInt(_0xfbb1c5(0x183))/0x6*(-parseInt(_0xfbb1c5(0x1a6))/0x7)+parseInt(_0xfbb1c5(0x18c))/0x8+-parseInt(_0xfbb1c5(0x192))/0x9+parseInt(_0xfbb1c5(0x15b))/0xa;if(_0x456a1a===_0x2fe437)break;else _0x51895c['push'](_0x51895c['shift']());}catch(_0x527866){_0x51895c['push'](_0x51895c['shift']());}}}(a187_0x5015,0x9520c));export const fixtures={'database':{'basic':{'name':'test_db','count':0x5,'created_at':a187_0x23b23d(0x160),'updated_at':a187_0x23b23d(0x160),'permission':a187_0x23b23d(0x1af)},'withTables':{'name':a187_0x23b23d(0x193),'count':0x64,'created_at':a187_0x23b23d(0x1ba),'updated_at':'2024-01-15T08:00:00Z','permission':a187_0x23b23d(0x1c1)}},'table':{'basic':{'id':0x3039,'name':a187_0x23b23d(0x173),'type':'log','schema':JSON[a187_0x23b23d(0x1aa)]([['id',a187_0x23b23d(0x187)],[a187_0x23b23d(0x157),a187_0x23b23d(0x1ab)],['name','string']]),'count':0x3e8,'estimated_storage_size':0x100000,'created_at':a187_0x23b23d(0x160),'updated_at':a187_0x23b23d(0x160)},'events':{'id':0x303a,'name':a187_0x23b23d(0x17a),'type':a187_0x23b23d(0x171),'schema':JSON[a187_0x23b23d(0x1aa)]([['event_id',a187_0x23b23d(0x187)],[a187_0x23b23d(0x157),a187_0x23b23d(0x1ab)],[a187_0x23b23d(0x179),'string'],[a187_0x23b23d(0x163),'string'],[a187_0x23b23d(0x1bb),a187_0x23b23d(0x177)]]),'count':0xc350,'estimated_storage_size':0x3200000,'created_at':a187_0x23b23d(0x160),'updated_at':a187_0x23b23d(0x161)}},'parentSegment':{'basic':{'id':a187_0x23b23d(0x17e),'name':a187_0x23b23d(0x1a1),'description':a187_0x23b23d(0x188),'status':a187_0x23b23d(0x199),'master_table':{'database':a187_0x23b23d(0x150),'table':'unified_customers'},'attributes':[{'name':a187_0x23b23d(0x1be),'type':'string','key':!![]},{'name':a187_0x23b23d(0x15a),'type':'string'},{'name':a187_0x23b23d(0x190),'type':'timestamp'}],'created_at':a187_0x23b23d(0x160),'updated_at':a187_0x23b23d(0x175)},'withBehaviors':{'id':a187_0x23b23d(0x197),'name':a187_0x23b23d(0x17c),'description':'Parent\x20segment\x20with\x20behavioral\x20data','status':a187_0x23b23d(0x199),'master_table':{'database':a187_0x23b23d(0x150),'table':a187_0x23b23d(0x19e)},'behaviors':[{'name':a187_0x23b23d(0x15d),'table':{'database':a187_0x23b23d(0x181),'table':a187_0x23b23d(0x15d)},'join_key':a187_0x23b23d(0x1be)},{'name':'page_views','table':{'database':a187_0x23b23d(0x181),'table':a187_0x23b23d(0x194)},'join_key':a187_0x23b23d(0x1be)}],'created_at':'2024-01-01T00:00:00Z','updated_at':a187_0x23b23d(0x175)}},'segment':{'basic':{'id':a187_0x23b23d(0x16f),'name':a187_0x23b23d(0x169),'description':a187_0x23b23d(0x15e),'parent_segment_id':a187_0x23b23d(0x17e),'status':a187_0x23b23d(0x199),'rules':[{'type':a187_0x23b23d(0x1c2),'field':a187_0x23b23d(0x1b1),'operator':a187_0x23b23d(0x18f),'value':'30d'}],'count':0x1388,'created_at':a187_0x23b23d(0x160),'updated_at':'2024-01-15T00:00:00Z'},'withMultipleRules':{'id':a187_0x23b23d(0x18b),'name':a187_0x23b23d(0x15f),'description':a187_0x23b23d(0x1a3),'parent_segment_id':a187_0x23b23d(0x17e),'status':a187_0x23b23d(0x199),'rules':[{'type':'attribute','field':a187_0x23b23d(0x1b1),'operator':a187_0x23b23d(0x18f),'value':a187_0x23b23d(0x19b)},{'type':a187_0x23b23d(0x1c2),'field':'lifetime_value','operator':a187_0x23b23d(0x1ad),'value':0x3e8}],'count':0x5dc,'created_at':a187_0x23b23d(0x160),'updated_at':a187_0x23b23d(0x175)}},'journey':{'basic':{'id':a187_0x23b23d(0x1c0),'name':a187_0x23b23d(0x1b0),'description':a187_0x23b23d(0x191),'status':'draft','version':0x1,'steps':[{'id':a187_0x23b23d(0x18e),'type':a187_0x23b23d(0x1bd),'duration':'1d'},{'id':'step-2','type':a187_0x23b23d(0x1b5),'activation_id':a187_0x23b23d(0x186)}],'created_at':a187_0x23b23d(0x160),'updated_at':a187_0x23b23d(0x175)},'withDecision':{'id':'j-def456','name':a187_0x23b23d(0x19f),'description':a187_0x23b23d(0x1a0),'status':a187_0x23b23d(0x199),'version':0x2,'steps':[{'id':a187_0x23b23d(0x18e),'type':a187_0x23b23d(0x162),'segment_id':a187_0x23b23d(0x16f),'yes_path':a187_0x23b23d(0x1b6),'no_path':a187_0x23b23d(0x156)},{'id':a187_0x23b23d(0x1b6),'type':a187_0x23b23d(0x1b5),'activation_id':'act-email'},{'id':a187_0x23b23d(0x156),'type':a187_0x23b23d(0x19c)}],'created_at':'2024-01-01T00:00:00Z','updated_at':a187_0x23b23d(0x175)}},'queryResult':{'basic':{'schema':[{'name':'id','type':a187_0x23b23d(0x1a9)},{'name':a187_0x23b23d(0x1b9),'type':a187_0x23b23d(0x1a9)},{'name':a187_0x23b23d(0x18d),'type':a187_0x23b23d(0x165)}],'data':[['user-1',a187_0x23b23d(0x166),0x64],[a187_0x23b23d(0x168),a187_0x23b23d(0x185),0xc8],['user-3',a187_0x23b23d(0x196),0x96]]},'empty':{'schema':[{'name':'id','type':a187_0x23b23d(0x1a9)},{'name':a187_0x23b23d(0x1b9),'type':a187_0x23b23d(0x1a9)}],'data':[]},'singleRow':{'schema':[{'name':a187_0x23b23d(0x19d),'type':a187_0x23b23d(0x165)}],'data':[[0x2a]]}},'user':{'basic':{'id':0x3039,'name':'Test\x20User','email':'test@example.com','created_at':a187_0x23b23d(0x160),'updated_at':a187_0x23b23d(0x175),'administrator':![]},'admin':{'id':0x1,'name':a187_0x23b23d(0x19a),'email':'admin@example.com','created_at':'2023-01-01T00:00:00Z','updated_at':a187_0x23b23d(0x175),'administrator':!![]}},'job':{'completed':{'job_id':0x75bcd15,'type':a187_0x23b23d(0x1bc),'database':'test_db','status':a187_0x23b23d(0x174),'query':a187_0x23b23d(0x151),'start_at':a187_0x23b23d(0x1b2),'end_at':a187_0x23b23d(0x172),'duration':0x5,'result_size':0x400},'running':{'job_id':0x75bcd16,'type':a187_0x23b23d(0x1bc),'database':a187_0x23b23d(0x195),'status':'running','query':a187_0x23b23d(0x153),'start_at':'2024-01-15T10:05:00Z','end_at':null,'duration':null,'result_size':null},'failed':{'job_id':0x75bcd17,'type':'presto','database':a187_0x23b23d(0x195),'status':'error','query':a187_0x23b23d(0x159),'start_at':a187_0x23b23d(0x18a),'end_at':a187_0x23b23d(0x189),'duration':0x1,'result_size':null,'error':a187_0x23b23d(0x155)}},'workflow':{'basic':{'id':a187_0x23b23d(0x1b4),'name':a187_0x23b23d(0x17d),'project':'data_pipeline','revision':'abc123','timezone':a187_0x23b23d(0x158),'schedule':{'cron':a187_0x23b23d(0x16d)}},'withSessions':{'id':'wf-67890','name':a187_0x23b23d(0x1ae),'project':a187_0x23b23d(0x1a7),'revision':'def456','timezone':a187_0x23b23d(0x16e),'schedule':{'cron':a187_0x23b23d(0x164)},'last_session':{'id':a187_0x23b23d(0x1b8),'status':a187_0x23b23d(0x174),'started_at':a187_0x23b23d(0x154),'finished_at':a187_0x23b23d(0x167)}}},'apiError':{'unauthorized':{'errors':{'error':a187_0x23b23d(0x1a2),'message':a187_0x23b23d(0x1a2),'severity':a187_0x23b23d(0x17f),'status_code':0x191}},'notFound':{'errors':{'error':a187_0x23b23d(0x178),'message':a187_0x23b23d(0x1b7),'severity':'error','status_code':0x194}},'rateLimited':{'detail':a187_0x23b23d(0x17b)},'rfc9457':{'type':a187_0x23b23d(0x16c),'title':a187_0x23b23d(0x1a5),'status':0x193,'detail':a187_0x23b23d(0x152),'instance':a187_0x23b23d(0x16a)}}};export function createDatabase(_0x335b19){const _0x173dac=a187_0x23b23d;return{...fixtures['database'][_0x173dac(0x1bf)],..._0x335b19};}function a187_0x1045(_0x3922b6,_0x3181b8){_0x3922b6=_0x3922b6-0x150;const _0x5015a5=a187_0x5015();let _0x10450c=_0x5015a5[_0x3922b6];return _0x10450c;}export function createTable(_0xd994e9){const _0x48bfba=a187_0x23b23d;return{...fixtures[_0x48bfba(0x180)][_0x48bfba(0x1bf)],..._0xd994e9};}export function createParentSegment(_0x349a92){const _0x88f9ef=a187_0x23b23d;return{...fixtures[_0x88f9ef(0x1a8)][_0x88f9ef(0x1bf)],..._0x349a92};}export function createSegment(_0x52a384){const _0x1df219=a187_0x23b23d;return{...fixtures[_0x1df219(0x182)][_0x1df219(0x1bf)],..._0x52a384};}export function createJourney(_0x4f7c8c){const _0x3b2cf2=a187_0x23b23d;return{...fixtures[_0x3b2cf2(0x1c3)]['basic'],..._0x4f7c8c};}export function createQueryResult(_0x250670){const _0xca65b2=a187_0x23b23d;return{...fixtures[_0xca65b2(0x16b)][_0xca65b2(0x1bf)],..._0x250670};}export function createUser(_0x4c11fb){const _0x335864=a187_0x23b23d;return{...fixtures[_0x335864(0x176)][_0x335864(0x1bf)],..._0x4c11fb};}export function createJob(_0x445127){const _0x203c92=a187_0x23b23d;return{...fixtures['job'][_0x203c92(0x198)],..._0x445127};}export function createWorkflow(_0x1205b4){const _0x213bbf=a187_0x23b23d;return{...fixtures[_0x213bbf(0x15c)][_0x213bbf(0x1bf)],..._0x1205b4};}function a187_0x5015(){const _0x90f984=['Bob','act-123','string','A\x20test\x20parent\x20segment\x20for\x20unit\x20tests','2024-01-15T10:10:01Z','2024-01-15T10:10:00Z','cs-111222','6283600ZuLWhp','count','step-1','TimeWithinPast','created_at','Onboarding\x20journey\x20for\x20new\x20users','5842962fYtiRv','production_db','pageviews','test_db','Charlie','ps-789012','completed','active','Admin\x20User','30d','end','total','customers','Purchase\x20Reminder','Journey\x20with\x20decision\x20point','Test\x20Parent\x20Segment','Invalid\x20API\x20key','Active\x20users\x20with\x20high\x20lifetime\x20value','18824QIwTZb','Forbidden','78827eawkve','data_sync','parentSegment','varchar','stringify','long','194680nCiFiS','Greater','hourly_sync','administrator','Welcome\x20Journey','last_login','2024-01-15T10:00:00Z','155799fIwJGQ','wf-12345','activation','step-2','The\x20requested\x20resource\x20does\x20not\x20exist','sess-111','name','2023-06-15T10:30:00Z','properties','presto','wait','customer_id','basic','j-abc123','full_access','attribute','journey','cdp_db','SELECT\x20*\x20FROM\x20users\x20LIMIT\x2010','You\x20do\x20not\x20have\x20permission\x20to\x20access\x20this\x20resource','SELECT\x20COUNT(*)\x20FROM\x20events','2024-01-15T09:00:00Z','Table\x20does\x20not\x20exist:\x20nonexistent_table','step-3','time','UTC','SELECT\x20*\x20FROM\x20nonexistent_table','email','19955330GTKxzO','workflow','purchases','Users\x20active\x20in\x20the\x20last\x2030\x20days','High\x20Value\x20Active\x20Users','2024-01-01T00:00:00Z','2024-01-15T12:00:00Z','decision_point','event_type','0\x20*\x20*\x20*\x20*','bigint','Alice','2024-01-15T09:05:00Z','user-2','Active\x20Users','/v3/database/list','queryResult','https://api.treasuredata.com/errors/forbidden','0\x200\x20*\x20*\x20*','America/Los_Angeles','cs-456789','75tBaGBe','log','2024-01-15T10:00:05Z','users','success','2024-01-15T00:00:00Z','user','map<string,string>','Resource\x20not\x20found','user_id','events','Rate\x20limit\x20exceeded.\x20Please\x20try\x20again\x20later.','Customers\x20with\x20Behaviors','daily_etl','ps-123456','error','table','events_db','segment','420XQllQc','18DNCCyS'];a187_0x5015=function(){return _0x90f984;};return a187_0x5015();}
|
|
1
|
+
const a197_0xde0ba3=a197_0x3a59;function a197_0x3a59(_0x1e421b,_0x1cc331){_0x1e421b=_0x1e421b-0x1c4;const _0x240290=a197_0x2402();let _0x3a5927=_0x240290[_0x1e421b];return _0x3a5927;}(function(_0x5b4e79,_0x1d39b3){const _0x4c6d55=a197_0x3a59,_0x276ba3=_0x5b4e79();while(!![]){try{const _0x294ed9=-parseInt(_0x4c6d55(0x20d))/0x1*(parseInt(_0x4c6d55(0x227))/0x2)+parseInt(_0x4c6d55(0x203))/0x3+parseInt(_0x4c6d55(0x1c6))/0x4+parseInt(_0x4c6d55(0x1db))/0x5*(parseInt(_0x4c6d55(0x1eb))/0x6)+parseInt(_0x4c6d55(0x1df))/0x7+-parseInt(_0x4c6d55(0x1e1))/0x8+-parseInt(_0x4c6d55(0x1f6))/0x9;if(_0x294ed9===_0x1d39b3)break;else _0x276ba3['push'](_0x276ba3['shift']());}catch(_0x260204){_0x276ba3['push'](_0x276ba3['shift']());}}}(a197_0x2402,0x90a4d));export const fixtures={'database':{'basic':{'name':a197_0xde0ba3(0x229),'count':0x5,'created_at':a197_0xde0ba3(0x207),'updated_at':a197_0xde0ba3(0x207),'permission':a197_0xde0ba3(0x1f0)},'withTables':{'name':a197_0xde0ba3(0x20e),'count':0x64,'created_at':a197_0xde0ba3(0x225),'updated_at':a197_0xde0ba3(0x1f8),'permission':a197_0xde0ba3(0x1ec)}},'table':{'basic':{'id':0x3039,'name':'users','type':a197_0xde0ba3(0x1da),'schema':JSON['stringify']([['id',a197_0xde0ba3(0x1fb)],['time',a197_0xde0ba3(0x1d9)],[a197_0xde0ba3(0x1ff),a197_0xde0ba3(0x1fb)]]),'count':0x3e8,'estimated_storage_size':0x100000,'created_at':a197_0xde0ba3(0x207),'updated_at':a197_0xde0ba3(0x207)},'events':{'id':0x303a,'name':'events','type':a197_0xde0ba3(0x1da),'schema':JSON[a197_0xde0ba3(0x1f4)]([[a197_0xde0ba3(0x1e2),a197_0xde0ba3(0x1fb)],['time',a197_0xde0ba3(0x1d9)],['user_id','string'],[a197_0xde0ba3(0x1c4),a197_0xde0ba3(0x1fb)],['properties','map<string,string>']]),'count':0xc350,'estimated_storage_size':0x3200000,'created_at':'2024-01-01T00:00:00Z','updated_at':'2024-01-15T12:00:00Z'}},'parentSegment':{'basic':{'id':a197_0xde0ba3(0x220),'name':'Test\x20Parent\x20Segment','description':a197_0xde0ba3(0x1ef),'status':'active','master_table':{'database':a197_0xde0ba3(0x210),'table':a197_0xde0ba3(0x1d2)},'attributes':[{'name':a197_0xde0ba3(0x1d6),'type':a197_0xde0ba3(0x1fb),'key':!![]},{'name':a197_0xde0ba3(0x22a),'type':a197_0xde0ba3(0x1fb)},{'name':a197_0xde0ba3(0x1fd),'type':a197_0xde0ba3(0x204)}],'created_at':'2024-01-01T00:00:00Z','updated_at':a197_0xde0ba3(0x214)},'withBehaviors':{'id':a197_0xde0ba3(0x209),'name':a197_0xde0ba3(0x230),'description':a197_0xde0ba3(0x1f9),'status':'active','master_table':{'database':'cdp_db','table':a197_0xde0ba3(0x212)},'behaviors':[{'name':a197_0xde0ba3(0x1fc),'table':{'database':a197_0xde0ba3(0x21a),'table':a197_0xde0ba3(0x1fc)},'join_key':a197_0xde0ba3(0x1d6)},{'name':a197_0xde0ba3(0x1ea),'table':{'database':a197_0xde0ba3(0x21a),'table':a197_0xde0ba3(0x20a)},'join_key':a197_0xde0ba3(0x1d6)}],'created_at':a197_0xde0ba3(0x207),'updated_at':'2024-01-15T00:00:00Z'}},'segment':{'basic':{'id':'cs-456789','name':a197_0xde0ba3(0x1e3),'description':a197_0xde0ba3(0x219),'parent_segment_id':a197_0xde0ba3(0x220),'status':a197_0xde0ba3(0x215),'rules':[{'type':a197_0xde0ba3(0x1e9),'field':a197_0xde0ba3(0x231),'operator':a197_0xde0ba3(0x1e0),'value':a197_0xde0ba3(0x21c)}],'count':0x1388,'created_at':a197_0xde0ba3(0x207),'updated_at':a197_0xde0ba3(0x214)},'withMultipleRules':{'id':a197_0xde0ba3(0x20b),'name':a197_0xde0ba3(0x1f3),'description':a197_0xde0ba3(0x1d1),'parent_segment_id':'ps-123456','status':a197_0xde0ba3(0x215),'rules':[{'type':a197_0xde0ba3(0x1e9),'field':a197_0xde0ba3(0x231),'operator':a197_0xde0ba3(0x1e0),'value':a197_0xde0ba3(0x21c)},{'type':a197_0xde0ba3(0x1e9),'field':'lifetime_value','operator':a197_0xde0ba3(0x1d8),'value':0x3e8}],'count':0x5dc,'created_at':'2024-01-01T00:00:00Z','updated_at':a197_0xde0ba3(0x214)}},'journey':{'basic':{'id':a197_0xde0ba3(0x22b),'name':'Welcome\x20Journey','description':a197_0xde0ba3(0x1c7),'status':a197_0xde0ba3(0x213),'version':0x1,'steps':[{'id':a197_0xde0ba3(0x1d0),'type':'wait','duration':'1d'},{'id':a197_0xde0ba3(0x21b),'type':a197_0xde0ba3(0x211),'activation_id':a197_0xde0ba3(0x222)}],'created_at':a197_0xde0ba3(0x207),'updated_at':a197_0xde0ba3(0x214)},'withDecision':{'id':a197_0xde0ba3(0x21e),'name':'Purchase\x20Reminder','description':a197_0xde0ba3(0x1ed),'status':a197_0xde0ba3(0x215),'version':0x2,'steps':[{'id':'step-1','type':'decision_point','segment_id':a197_0xde0ba3(0x1ca),'yes_path':a197_0xde0ba3(0x21b),'no_path':a197_0xde0ba3(0x1d5)},{'id':a197_0xde0ba3(0x21b),'type':'activation','activation_id':a197_0xde0ba3(0x1e5)},{'id':a197_0xde0ba3(0x1d5),'type':a197_0xde0ba3(0x1ce)}],'created_at':a197_0xde0ba3(0x207),'updated_at':a197_0xde0ba3(0x214)}},'queryResult':{'basic':{'schema':[{'name':'id','type':a197_0xde0ba3(0x1cb)},{'name':a197_0xde0ba3(0x1ff),'type':'varchar'},{'name':a197_0xde0ba3(0x1d3),'type':a197_0xde0ba3(0x1f5)}],'data':[['user-1',a197_0xde0ba3(0x1dd),0x64],[a197_0xde0ba3(0x1fa),a197_0xde0ba3(0x216),0xc8],[a197_0xde0ba3(0x223),a197_0xde0ba3(0x217),0x96]]},'empty':{'schema':[{'name':'id','type':a197_0xde0ba3(0x1cb)},{'name':a197_0xde0ba3(0x1ff),'type':a197_0xde0ba3(0x1cb)}],'data':[]},'singleRow':{'schema':[{'name':a197_0xde0ba3(0x1cf),'type':a197_0xde0ba3(0x1f5)}],'data':[[0x2a]]}},'user':{'basic':{'id':0x3039,'name':a197_0xde0ba3(0x1d4),'email':a197_0xde0ba3(0x1c8),'created_at':a197_0xde0ba3(0x207),'updated_at':a197_0xde0ba3(0x214),'administrator':![]},'admin':{'id':0x1,'name':a197_0xde0ba3(0x201),'email':'admin@example.com','created_at':a197_0xde0ba3(0x21d),'updated_at':a197_0xde0ba3(0x214),'administrator':!![]}},'job':{'completed':{'job_id':0x75bcd15,'type':a197_0xde0ba3(0x1cd),'database':a197_0xde0ba3(0x229),'status':a197_0xde0ba3(0x1f1),'query':a197_0xde0ba3(0x1c5),'start_at':a197_0xde0ba3(0x202),'end_at':a197_0xde0ba3(0x20c),'duration':0x5,'result_size':0x400},'running':{'job_id':0x75bcd16,'type':a197_0xde0ba3(0x1cd),'database':a197_0xde0ba3(0x229),'status':a197_0xde0ba3(0x221),'query':'SELECT\x20COUNT(*)\x20FROM\x20events','start_at':a197_0xde0ba3(0x1dc),'end_at':null,'duration':null,'result_size':null},'failed':{'job_id':0x75bcd17,'type':a197_0xde0ba3(0x1cd),'database':a197_0xde0ba3(0x229),'status':a197_0xde0ba3(0x1d7),'query':a197_0xde0ba3(0x1cc),'start_at':'2024-01-15T10:10:00Z','end_at':a197_0xde0ba3(0x21f),'duration':0x1,'result_size':null,'error':'Table\x20does\x20not\x20exist:\x20nonexistent_table'}},'workflow':{'basic':{'id':a197_0xde0ba3(0x218),'name':'daily_etl','project':a197_0xde0ba3(0x205),'revision':'abc123','timezone':a197_0xde0ba3(0x22f),'schedule':{'cron':'0\x200\x20*\x20*\x20*'}},'withSessions':{'id':'wf-67890','name':'hourly_sync','project':a197_0xde0ba3(0x1c9),'revision':a197_0xde0ba3(0x1e8),'timezone':a197_0xde0ba3(0x20f),'schedule':{'cron':'0\x20*\x20*\x20*\x20*'},'last_session':{'id':a197_0xde0ba3(0x22c),'status':a197_0xde0ba3(0x1f1),'started_at':'2024-01-15T09:00:00Z','finished_at':a197_0xde0ba3(0x22e)}}},'apiError':{'unauthorized':{'errors':{'error':a197_0xde0ba3(0x22d),'message':a197_0xde0ba3(0x22d),'severity':a197_0xde0ba3(0x1d7),'status_code':0x191}},'notFound':{'errors':{'error':a197_0xde0ba3(0x200),'message':a197_0xde0ba3(0x224),'severity':a197_0xde0ba3(0x1d7),'status_code':0x194}},'rateLimited':{'detail':a197_0xde0ba3(0x1f2)},'rfc9457':{'type':a197_0xde0ba3(0x1e6),'title':a197_0xde0ba3(0x1e7),'status':0x193,'detail':a197_0xde0ba3(0x1de),'instance':a197_0xde0ba3(0x1e4)}}};export function createDatabase(_0x1b99e1){const _0x635e17=a197_0xde0ba3;return{...fixtures[_0x635e17(0x1fe)][_0x635e17(0x226)],..._0x1b99e1};}function a197_0x2402(){const _0x1fc01e=['4880043UrkhiT','journey','2024-01-15T08:00:00Z','Parent\x20segment\x20with\x20behavioral\x20data','user-2','string','purchases','created_at','database','name','Resource\x20not\x20found','Admin\x20User','2024-01-15T10:00:00Z','425139DBtJlC','timestamp','data_pipeline','job','2024-01-01T00:00:00Z','user','ps-789012','pageviews','cs-111222','2024-01-15T10:00:05Z','554pMKjTZ','production_db','America/Los_Angeles','cdp_db','activation','customers','draft','2024-01-15T00:00:00Z','active','Bob','Charlie','wf-12345','Users\x20active\x20in\x20the\x20last\x2030\x20days','events_db','step-2','30d','2023-01-01T00:00:00Z','j-def456','2024-01-15T10:10:01Z','ps-123456','running','act-123','user-3','The\x20requested\x20resource\x20does\x20not\x20exist','2023-06-15T10:30:00Z','basic','4ovFdQF','parentSegment','test_db','email','j-abc123','sess-111','Invalid\x20API\x20key','2024-01-15T09:05:00Z','UTC','Customers\x20with\x20Behaviors','last_login','event_type','SELECT\x20*\x20FROM\x20users\x20LIMIT\x2010','2080444TKZaOg','Onboarding\x20journey\x20for\x20new\x20users','test@example.com','data_sync','cs-456789','varchar','SELECT\x20*\x20FROM\x20nonexistent_table','presto','end','total','step-1','Active\x20users\x20with\x20high\x20lifetime\x20value','unified_customers','count','Test\x20User','step-3','customer_id','error','Greater','long','log','328385WDRtvW','2024-01-15T10:05:00Z','Alice','You\x20do\x20not\x20have\x20permission\x20to\x20access\x20this\x20resource','2066337UxgGIE','TimeWithinPast','1722248oPxbwb','event_id','Active\x20Users','/v3/database/list','act-email','https://api.treasuredata.com/errors/forbidden','Forbidden','def456','attribute','page_views','36vwgXAq','full_access','Journey\x20with\x20decision\x20point','segment','A\x20test\x20parent\x20segment\x20for\x20unit\x20tests','administrator','success','Rate\x20limit\x20exceeded.\x20Please\x20try\x20again\x20later.','High\x20Value\x20Active\x20Users','stringify','bigint'];a197_0x2402=function(){return _0x1fc01e;};return a197_0x2402();}export function createTable(_0x4ecb44){const _0x35755b=a197_0xde0ba3;return{...fixtures['table'][_0x35755b(0x226)],..._0x4ecb44};}export function createParentSegment(_0x176990){const _0x5a61d3=a197_0xde0ba3;return{...fixtures[_0x5a61d3(0x228)][_0x5a61d3(0x226)],..._0x176990};}export function createSegment(_0x4f8e52){const _0x3fff21=a197_0xde0ba3;return{...fixtures[_0x3fff21(0x1ee)]['basic'],..._0x4f8e52};}export function createJourney(_0x1b6a78){const _0x22038e=a197_0xde0ba3;return{...fixtures[_0x22038e(0x1f7)]['basic'],..._0x1b6a78};}export function createQueryResult(_0x55fbe6){const _0x5f9e26=a197_0xde0ba3;return{...fixtures['queryResult'][_0x5f9e26(0x226)],..._0x55fbe6};}export function createUser(_0x2cf39f){const _0x26efc0=a197_0xde0ba3;return{...fixtures[_0x26efc0(0x208)][_0x26efc0(0x226)],..._0x2cf39f};}export function createJob(_0xd3c594){const _0x394d30=a197_0xde0ba3;return{...fixtures[_0x394d30(0x206)]['completed'],..._0xd3c594};}export function createWorkflow(_0x25edbe){return{...fixtures['workflow']['basic'],..._0x25edbe};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a198_0x2f5059=a198_0xeab7;(function(_0xde7995,_0x154f9e){const _0x65a830=a198_0xeab7,_0xee7209=_0xde7995();while(!![]){try{const _0x10e9d1=-parseInt(_0x65a830(0x202))/0x1+parseInt(_0x65a830(0x1e6))/0x2+-parseInt(_0x65a830(0x1e1))/0x3*(-parseInt(_0x65a830(0x20c))/0x4)+-parseInt(_0x65a830(0x1fd))/0x5+parseInt(_0x65a830(0x1d0))/0x6*(parseInt(_0x65a830(0x1f9))/0x7)+-parseInt(_0x65a830(0x1f3))/0x8+parseInt(_0x65a830(0x1ea))/0x9*(-parseInt(_0x65a830(0x1d4))/0xa);if(_0x10e9d1===_0x154f9e)break;else _0xee7209['push'](_0xee7209['shift']());}catch(_0x53f591){_0xee7209['push'](_0xee7209['shift']());}}}(a198_0x3367,0x1ac3e));import{vi}from'vitest';function a198_0x3367(){const _0x2b21b5=['6104xrCgyz','responder','string','every','136125KXAnva','Internal\x20Server\x20Error','getLastRequest','matcher','filter','36112hvciYL','body','networkError','stringify','get','isArray','fail','searchParams','parseRequest','register','16TNeLJQ','length','pathname','No\x20stub\x20matched\x20request:\x20','reset','jsonResponseWithHeaders','Unmatched\x20stub','mockImplementation','REST','test','getRequests','slice','includes','toLowerCase','text/plain','simple','Too\x20Many\x20Requests','1050OIXNtn','join','matchCount','entries','117640jmLQdF','parse','stubs','map','fetchMock','td-api','error','wasCalled','Unknown','push','unnamed\x20stub','withBody','getMatchCount','30417MUFptb','withHost','rfc9457','Unprocessable\x20Entity','url','432726CTFuHW','toUpperCase','description','\x20stub(s)\x20were\x20not\x20matched:\x0a\x0a','27kIphAr','Not\x20Found','https://api.treasuredata.com/errors/','host','verify','requests','matched','application/json','function','1610080PwVhFE','stack','getStatusText','headers','Request\x20body:\x20','method'];a198_0x3367=function(){return _0x2b21b5;};return a198_0x3367();}function a198_0xeab7(_0x5dbaa9,_0x415d80){_0x5dbaa9=_0x5dbaa9-0x1cc;const _0x33678b=a198_0x3367();let _0xeab745=_0x33678b[_0x5dbaa9];return _0xeab745;}export class HTTPMockRegistry{[a198_0x2f5059(0x1d6)]=[];[a198_0x2f5059(0x1ef)]=[];[a198_0x2f5059(0x1d8)]=null;[a198_0x2f5059(0x214)](_0x3f7fc6,_0x2b916d){return _0x34d212=>{const _0x29fc66=a198_0xeab7;if(_0x34d212[_0x29fc66(0x1f8)][_0x29fc66(0x1e7)]()!==_0x3f7fc6[_0x29fc66(0x1e7)]())return![];const _0x15541d=new URL(_0x34d212[_0x29fc66(0x1e5)]);if(typeof _0x2b916d===_0x29fc66(0x1fb))return _0x15541d[_0x29fc66(0x20e)]===_0x2b916d||_0x15541d['pathname'][_0x29fc66(0x218)](_0x2b916d);return _0x2b916d[_0x29fc66(0x215)](_0x15541d[_0x29fc66(0x20e)]);};}['withQuery'](_0x295f52,_0x2151be){return _0x4f017c=>{const _0x12dfc3=a198_0xeab7;if(!_0x295f52(_0x4f017c))return![];const _0x2f69f3=new URL(_0x4f017c['url']);return Object['entries'](_0x2151be)[_0x12dfc3(0x1fc)](([_0x29d9f7,_0x23fade])=>_0x2f69f3[_0x12dfc3(0x209)][_0x12dfc3(0x206)](_0x29d9f7)===_0x23fade);};}[a198_0x2f5059(0x1df)](_0x4cf339,_0xb04981){return _0x3667e5=>{const _0xfded79=a198_0xeab7;if(!_0x4cf339(_0x3667e5))return![];if(typeof _0xb04981===_0xfded79(0x1f2))return _0xb04981(_0x3667e5['body']);return JSON[_0xfded79(0x205)](_0x3667e5[_0xfded79(0x203)])===JSON[_0xfded79(0x205)](_0xb04981);};}[a198_0x2f5059(0x1e2)](_0x21871d,_0x13b1ae){return _0x191356=>{const _0x5ed845=a198_0xeab7;if(!_0x21871d(_0x191356))return![];const _0xf1ca88=new URL(_0x191356[_0x5ed845(0x1e5)]);return _0xf1ca88[_0x5ed845(0x1ed)]===_0x13b1ae;};}[a198_0x2f5059(0x20b)](_0x1b6138,_0x3d2a86,_0x3b5255){const _0x7d014d=a198_0x2f5059;this[_0x7d014d(0x1d6)][_0x7d014d(0x1dd)]({'matcher':_0x1b6138,'responder':_0x3d2a86,'matched':![],'matchCount':0x0,'stack':new Error()['stack']??'','description':_0x3b5255?.['description']});}['registerWithInspector'](_0xf1675d,_0x439e31,_0x2da44e){const _0x89e8d4=a198_0x2f5059,_0xde063b=_0x33896f=>{const _0x2fe25c=a198_0xeab7;return _0x2da44e(_0x33896f[_0x2fe25c(0x203)],_0x33896f),_0x439e31(_0x33896f);};this[_0x89e8d4(0x20b)](_0xf1675d,_0xde063b);}static['jsonResponse'](_0x17a1b0,_0x41f50a=0xc8){const _0x5e709b=a198_0x2f5059;return()=>new Response(JSON[_0x5e709b(0x205)](_0x17a1b0),{'status':_0x41f50a,'headers':{'Content-Type':'application/json'}});}static['errorResponse'](_0x1bf5a7,_0x3060cf,_0x2425f1=a198_0x2f5059(0x1ce)){return()=>{const _0x5182aa=a198_0xeab7;let _0x20ef6d;switch(_0x2425f1){case _0x5182aa(0x1d9):_0x20ef6d={'errors':{'error':_0x3060cf,'message':_0x3060cf,'severity':_0x5182aa(0x1da),'status_code':_0x1bf5a7}};break;case _0x5182aa(0x1e3):_0x20ef6d={'type':_0x5182aa(0x1ec)+_0x1bf5a7,'title':HTTPMockRegistry[_0x5182aa(0x1f5)](_0x1bf5a7),'status':_0x1bf5a7,'detail':_0x3060cf};break;default:_0x20ef6d={'error':_0x3060cf};}return new Response(JSON[_0x5182aa(0x205)](_0x20ef6d),{'status':_0x1bf5a7,'headers':{'Content-Type':_0x5182aa(0x1f1)}});};}static[a198_0x2f5059(0x211)](_0x137754,_0x3e13c6,_0x4b8c4e=0xc8){const _0x1971d6=a198_0x2f5059;return()=>new Response(JSON[_0x1971d6(0x205)](_0x137754),{'status':_0x4b8c4e,'headers':{'Content-Type':_0x1971d6(0x1f1),..._0x3e13c6}});}static['textResponse'](_0x18045a,_0x3d9c70=0xc8){const _0x3fc9fa=a198_0x2f5059;return()=>new Response(_0x18045a,{'status':_0x3d9c70,'headers':{'Content-Type':_0x3fc9fa(0x1cd)}});}static[a198_0x2f5059(0x204)](_0x272b7e){return()=>{throw new Error(_0x272b7e);};}['createFetch'](){const _0x37b0c7=a198_0x2f5059;return this[_0x37b0c7(0x1d8)]=vi['fn']()[_0x37b0c7(0x213)](async(_0x101e88,_0x67dfd5)=>{const _0x29d412=_0x37b0c7,_0x581a97=this[_0x29d412(0x20a)](_0x101e88,_0x67dfd5);this[_0x29d412(0x1ef)]['push'](_0x581a97);for(const _0x4e9fef of this[_0x29d412(0x1d6)]){if(_0x4e9fef[_0x29d412(0x200)](_0x581a97))return _0x4e9fef['matched']=!![],_0x4e9fef[_0x29d412(0x1d2)]++,_0x4e9fef[_0x29d412(0x1fa)](_0x581a97);}const _0x22a3a9=this[_0x29d412(0x1d6)][_0x29d412(0x1d7)]((_0xf5801c,_0x411101)=>'\x20\x20'+(_0x411101+0x1)+'.\x20'+(_0xf5801c[_0x29d412(0x1e8)]??_0x29d412(0x1de)))[_0x29d412(0x1d1)]('\x0a');throw new Error(_0x29d412(0x20f)+_0x581a97[_0x29d412(0x1f8)]+'\x20'+_0x581a97['url']+'\x0a'+(_0x29d412(0x1f7)+JSON['stringify'](_0x581a97[_0x29d412(0x203)])+'\x0a')+('Registered\x20stubs:\x0a'+(_0x22a3a9||'\x20\x20(none)')));}),this[_0x37b0c7(0x1d8)];}['parseRequest'](_0x219c05,_0x13cb2e){const _0x42e431=a198_0x2f5059,_0x2a1dff={};if(_0x13cb2e?.['headers']){if(_0x13cb2e[_0x42e431(0x1f6)]instanceof Headers)_0x13cb2e['headers']['forEach']((_0x1c9cd0,_0x5b088d)=>{const _0x164eb1=_0x42e431;_0x2a1dff[_0x5b088d[_0x164eb1(0x1cc)]()]=_0x1c9cd0;});else{if(Array[_0x42e431(0x207)](_0x13cb2e[_0x42e431(0x1f6)]))for(const [_0x344dce,_0x3a8a77]of _0x13cb2e[_0x42e431(0x1f6)]){_0x2a1dff[_0x344dce['toLowerCase']()]=_0x3a8a77;}else for(const [_0x405f6,_0x4ba4da]of Object[_0x42e431(0x1d3)](_0x13cb2e[_0x42e431(0x1f6)])){_0x4ba4da!==undefined&&(_0x2a1dff[_0x405f6['toLowerCase']()]=_0x4ba4da);}}}let _0x2def58;if(_0x13cb2e?.[_0x42e431(0x203)])try{_0x2def58=JSON[_0x42e431(0x1d5)](_0x13cb2e[_0x42e431(0x203)]);}catch{_0x2def58=_0x13cb2e['body'];}return{'method':_0x13cb2e?.[_0x42e431(0x1f8)]??'GET','url':_0x219c05,'headers':_0x2a1dff,'body':_0x2def58};}[a198_0x2f5059(0x1ee)](_0x978a7d){const _0x37fffa=a198_0x2f5059,_0x166ebf=this['stubs'][_0x37fffa(0x201)](_0x28199d=>!_0x28199d[_0x37fffa(0x1f0)]);if(_0x166ebf[_0x37fffa(0x20d)]>0x0){const _0x6af6fc=_0x166ebf[_0x37fffa(0x1d7)](_0x48b5cc=>{const _0x283e92=_0x37fffa,_0x374541=_0x48b5cc[_0x283e92(0x1e8)]?'\x20('+_0x48b5cc['description']+')':'',_0x220cb3=_0x48b5cc[_0x283e92(0x1f4)]['split']('\x0a')[_0x283e92(0x217)](0x2,0x5)[_0x283e92(0x1d1)]('\x0a');return _0x283e92(0x212)+_0x374541+'\x20registered\x20at:\x0a'+_0x220cb3;});_0x978a7d[_0x37fffa(0x208)](_0x166ebf[_0x37fffa(0x20d)]+_0x37fffa(0x1e9)+_0x6af6fc[_0x37fffa(0x1d1)]('\x0a\x0a'));}}[a198_0x2f5059(0x216)](){const _0x55a8c0=a198_0x2f5059;return[...this[_0x55a8c0(0x1ef)]];}[a198_0x2f5059(0x1ff)](){const _0xaccdd6=a198_0x2f5059;return this['requests'][this[_0xaccdd6(0x1ef)][_0xaccdd6(0x20d)]-0x1];}[a198_0x2f5059(0x1db)](_0x508ddc,_0x13795e){return this['requests']['some'](_0x526a0c=>{const _0x12356a=a198_0xeab7;if(_0x526a0c[_0x12356a(0x1f8)][_0x12356a(0x1e7)]()!==_0x508ddc[_0x12356a(0x1e7)]())return![];if(typeof _0x13795e===_0x12356a(0x1fb))return _0x526a0c[_0x12356a(0x1e5)]['includes'](_0x13795e);return _0x13795e[_0x12356a(0x215)](_0x526a0c['url']);});}[a198_0x2f5059(0x1e0)](_0x1a9364){const _0x2fc3c7=a198_0x2f5059;return this[_0x2fc3c7(0x1d6)][_0x1a9364]?.[_0x2fc3c7(0x1d2)]??0x0;}[a198_0x2f5059(0x210)](){const _0x3fc4c5=a198_0x2f5059;this[_0x3fc4c5(0x1d6)]=[],this[_0x3fc4c5(0x1ef)]=[],this[_0x3fc4c5(0x1d8)]=null;}static[a198_0x2f5059(0x1f5)](_0x1a7767){const _0xdbf6c9=a198_0x2f5059,_0xe96c4c={0xc8:'OK',0xc9:'Created',0xcc:'No\x20Content',0x190:'Bad\x20Request',0x191:'Unauthorized',0x193:'Forbidden',0x194:_0xdbf6c9(0x1eb),0x199:'Conflict',0x1a6:_0xdbf6c9(0x1e4),0x1ad:_0xdbf6c9(0x1cf),0x1f4:_0xdbf6c9(0x1fe),0x1f6:'Bad\x20Gateway',0x1f7:'Service\x20Unavailable'};return _0xe96c4c[_0x1a7767]??_0xdbf6c9(0x1dc);}}export function createHTTPMock(){return new HTTPMockRegistry();}
|
package/dist/test-utils/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x44d145,_0x3c1aec){var _0x5aa481=a199_0xf1a7,_0x5ba0b7=_0x44d145();while(!![]){try{var _0x739a92=parseInt(_0x5aa481(0xee))/0x1+parseInt(_0x5aa481(0xf5))/0x2+-parseInt(_0x5aa481(0xf4))/0x3+-parseInt(_0x5aa481(0xf3))/0x4*(parseInt(_0x5aa481(0xf6))/0x5)+parseInt(_0x5aa481(0xf0))/0x6*(-parseInt(_0x5aa481(0xf2))/0x7)+-parseInt(_0x5aa481(0xf7))/0x8*(parseInt(_0x5aa481(0xed))/0x9)+-parseInt(_0x5aa481(0xef))/0xa*(-parseInt(_0x5aa481(0xf1))/0xb);if(_0x739a92===_0x3c1aec)break;else _0x5ba0b7['push'](_0x5ba0b7['shift']());}catch(_0x3793fd){_0x5ba0b7['push'](_0x5ba0b7['shift']());}}}(a199_0x2aaa,0x71640));function a199_0xf1a7(_0x5cf489,_0x595edf){_0x5cf489=_0x5cf489-0xed;var _0x2aaaef=a199_0x2aaa();var _0xf1a76=_0x2aaaef[_0x5cf489];return _0xf1a76;}export{HTTPMockRegistry,createHTTPMock}from'./http-mock.js';export{createTestSDKContext,createTestGlobalOptions,createTestCommandContext,createMockTDX,captureConsole}from'./factories.js';export{fixtures,createDatabase,createTable,createParentSegment,createSegment,createJourney,createQueryResult,createUser,createJob,createWorkflow}from'./fixtures.js';function a199_0x2aaa(){var _0x3a0953=['1506252rJmLOG','4493215eJmgHH','7024ZaSPct','7182nUgnVO','598733dDtOmf','425690qitxEr','4486578ZZFKob','517xzFuwj','7QVRCiK','4OEfkuy','1623312fLnKIn'];a199_0x2aaa=function(){return _0x3a0953;};return a199_0x2aaa();}export{CommandRunner,createCommandRunner}from'./command-runner.js';
|
package/dist/utils/async.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a200_0x95ca(){const _0xd937e5=['slice','1732804wWnyQJ','10aKvmST','9mXQYne','5605464AqKmic','map','2957676IpDxJg','43968HwqjTD','28374730OZQWPY','935343JmdVDn','70664bqgGQS','238BzeowN'];a200_0x95ca=function(){return _0xd937e5;};return a200_0x95ca();}function a200_0x196a(_0x2b2527,_0x26a394){_0x2b2527=_0x2b2527-0x118;const _0x95ca4=a200_0x95ca();let _0x196aad=_0x95ca4[_0x2b2527];return _0x196aad;}(function(_0x45754d,_0x4cf114){const _0xa43372=a200_0x196a,_0x46b376=_0x45754d();while(!![]){try{const _0x587561=parseInt(_0xa43372(0x118))/0x1+-parseInt(_0xa43372(0x122))/0x2+parseInt(_0xa43372(0x121))/0x3+parseInt(_0xa43372(0x11c))/0x4*(parseInt(_0xa43372(0x11d))/0x5)+parseInt(_0xa43372(0x11f))/0x6+-parseInt(_0xa43372(0x11a))/0x7*(parseInt(_0xa43372(0x119))/0x8)+parseInt(_0xa43372(0x11e))/0x9*(-parseInt(_0xa43372(0x123))/0xa);if(_0x587561===_0x4cf114)break;else _0x46b376['push'](_0x46b376['shift']());}catch(_0x4521d2){_0x46b376['push'](_0x46b376['shift']());}}}(a200_0x95ca,0x893b6));export async function batchAsync(_0x206811,_0x4868aa,_0x1795ce=0xa){const _0x518172=a200_0x196a,_0x4a6c0c=[];for(let _0x284dfe=0x0;_0x284dfe<_0x206811['length'];_0x284dfe+=_0x1795ce){const _0x3b1c7e=_0x206811[_0x518172(0x11b)](_0x284dfe,_0x284dfe+_0x1795ce),_0x5b8dfa=await Promise['all'](_0x3b1c7e[_0x518172(0x120)](_0x4868aa));_0x4a6c0c['push'](..._0x5b8dfa);}return _0x4a6c0c;}
|
package/dist/utils/colors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a201_0x22b967=a201_0x42a8;(function(_0x622bfa,_0x10e83f){const _0x317aac=a201_0x42a8,_0x8b1148=_0x622bfa();while(!![]){try{const _0xa32779=parseInt(_0x317aac(0x131))/0x1*(parseInt(_0x317aac(0x13e))/0x2)+parseInt(_0x317aac(0x144))/0x3+parseInt(_0x317aac(0x140))/0x4*(-parseInt(_0x317aac(0x130))/0x5)+parseInt(_0x317aac(0x14b))/0x6*(parseInt(_0x317aac(0x147))/0x7)+parseInt(_0x317aac(0x135))/0x8*(-parseInt(_0x317aac(0x13d))/0x9)+-parseInt(_0x317aac(0x139))/0xa+-parseInt(_0x317aac(0x13c))/0xb*(-parseInt(_0x317aac(0x12e))/0xc);if(_0xa32779===_0x10e83f)break;else _0x8b1148['push'](_0x8b1148['shift']());}catch(_0x551396){_0x8b1148['push'](_0x8b1148['shift']());}}}(a201_0x3c8d,0x56c24));import*as a201_0x4c5a07 from'chalk';const Chalk=a201_0x4c5a07[a201_0x22b967(0x148)];export function shouldUseColor(_0x2ea51a={}){const _0x114911=a201_0x22b967;if(_0x2ea51a['noColor']===!![])return![];if(_0x2ea51a[_0x114911(0x132)]===!![])return!![];if(process.env.NO_COLOR!==undefined)return![];return process[_0x114911(0x145)][_0x114911(0x133)]??![];}export function getChalk(_0x1c109b={}){if(shouldUseColor(_0x1c109b))return new Chalk({'level':0x3});return new Chalk({'level':0x0});}export function colorBorder(_0x2e9a6c,_0x22ef75={}){return getChalk(_0x22ef75)['dim'](_0x2e9a6c);}function a201_0x42a8(_0x434f30,_0x3fb220){_0x434f30=_0x434f30-0x12e;const _0x3c8dc0=a201_0x3c8d();let _0x42a820=_0x3c8dc0[_0x434f30];return _0x42a820;}export function colorHeader(_0x337afd,_0x2db460={}){const _0x4920d3=a201_0x22b967;return getChalk(_0x2db460)[_0x4920d3(0x13f)](_0x337afd);}export function colorType(_0x4a6293,_0x382a57={}){return getChalk(_0x382a57)['dim'](_0x4a6293);}export function colorJSONKey(_0x11a89c,_0x3a5c00={}){const _0x2b95b4=a201_0x22b967;return getChalk(_0x3a5c00)[_0x2b95b4(0x14a)](_0x11a89c);}function a201_0x3c8d(){const _0x36a351=['length','137203pNQytd','585ovBxyk','10dOPlLM','cyan','427388puLsPO','stringify','boolean','map','432882TSYewx','stdout','object','133FXXHey','Chalk','green','blue','129384ICzYSG','264tNRxUc','number','30GODKyf','80603dsxrGo','color','isTTY','yellow','7664noOQBw','null','repeat','string','1727150YrkUKf','join'];a201_0x3c8d=function(){return _0x36a351;};return a201_0x3c8d();}export function colorJSONString(_0x22e4d4,_0x3d3e80={}){const _0x30c45b=a201_0x22b967;return getChalk(_0x3d3e80)[_0x30c45b(0x149)](_0x22e4d4);}export function colorJSONNumber(_0x347048,_0x4e88d4={}){const _0x4d218f=a201_0x22b967;return getChalk(_0x4e88d4)[_0x4d218f(0x13f)](_0x347048);}export function colorJSONBoolean(_0x16d759,_0x4114d3={}){const _0xdc030f=a201_0x22b967;return getChalk(_0x4114d3)[_0xdc030f(0x134)](_0x16d759);}export function colorJSONNull(_0x438a49,_0x27889c={}){return getChalk(_0x27889c)['dim'](_0x438a49);}export function colorizeJSONCompact(_0x49c828,_0x17875b={}){const _0x1cdd24=a201_0x22b967;if(!shouldUseColor(_0x17875b))return JSON[_0x1cdd24(0x141)](_0x49c828);if(_0x49c828===null)return colorJSONNull(_0x1cdd24(0x136),_0x17875b);if(typeof _0x49c828===_0x1cdd24(0x142))return colorJSONBoolean(String(_0x49c828),_0x17875b);if(typeof _0x49c828===_0x1cdd24(0x12f))return colorJSONNumber(String(_0x49c828),_0x17875b);if(typeof _0x49c828===_0x1cdd24(0x138))return colorJSONString(JSON[_0x1cdd24(0x141)](_0x49c828),_0x17875b);if(Array['isArray'](_0x49c828)){if(_0x49c828[_0x1cdd24(0x13b)]===0x0)return'[]';const _0x237006=_0x49c828['map'](_0x2ed144=>colorizeJSONCompact(_0x2ed144,_0x17875b));return'['+_0x237006[_0x1cdd24(0x13a)](',')+']';}if(typeof _0x49c828==='object'){const _0x5bffef=Object['entries'](_0x49c828);if(_0x5bffef[_0x1cdd24(0x13b)]===0x0)return'{}';const _0x38486e=_0x5bffef[_0x1cdd24(0x143)](([_0x4dc474,_0x316c86])=>{const _0x1f8fd3=_0x1cdd24,_0x4a2718=colorJSONKey(JSON[_0x1f8fd3(0x141)](_0x4dc474),_0x17875b),_0xd0b2cc=colorizeJSONCompact(_0x316c86,_0x17875b);return _0x4a2718+':'+_0xd0b2cc;});return'{'+_0x38486e['join'](',')+'}';}return String(_0x49c828);}export function colorizeJSON(_0x374c87,_0x1cc443={},_0x4987dc=0x0){const _0x4f42e4=a201_0x22b967;if(!shouldUseColor(_0x1cc443))return JSON[_0x4f42e4(0x141)](_0x374c87,null,0x2);const _0x98d857='\x20'[_0x4f42e4(0x137)](_0x4987dc),_0x2721c5=_0x4987dc+0x2;if(_0x374c87===null)return colorJSONNull(_0x4f42e4(0x136),_0x1cc443);if(typeof _0x374c87===_0x4f42e4(0x142))return colorJSONBoolean(String(_0x374c87),_0x1cc443);if(typeof _0x374c87===_0x4f42e4(0x12f))return colorJSONNumber(String(_0x374c87),_0x1cc443);if(typeof _0x374c87===_0x4f42e4(0x138))return colorJSONString(JSON[_0x4f42e4(0x141)](_0x374c87),_0x1cc443);if(Array['isArray'](_0x374c87)){if(_0x374c87[_0x4f42e4(0x13b)]===0x0)return'[]';const _0x183094=_0x374c87[_0x4f42e4(0x143)](_0x7cb88e=>{const _0x38c4b9=_0x4f42e4,_0x12628b=colorizeJSON(_0x7cb88e,_0x1cc443,_0x2721c5);return''+'\x20'[_0x38c4b9(0x137)](_0x2721c5)+_0x12628b;});return'[\x0a'+_0x183094[_0x4f42e4(0x13a)](',\x0a')+('\x0a'+_0x98d857+']');}if(typeof _0x374c87===_0x4f42e4(0x146)){const _0x50b9b8=Object['entries'](_0x374c87);if(_0x50b9b8[_0x4f42e4(0x13b)]===0x0)return'{}';const _0x570e4d=_0x50b9b8['map'](([_0x5c57a3,_0x2360e5])=>{const _0x2cc895=_0x4f42e4,_0x153826=colorJSONKey(JSON[_0x2cc895(0x141)](_0x5c57a3),_0x1cc443),_0x2bb81c=colorizeJSON(_0x2360e5,_0x1cc443,_0x2721c5);return''+'\x20'[_0x2cc895(0x137)](_0x2721c5)+_0x153826+':\x20'+_0x2bb81c;});return'{\x0a'+_0x570e4d[_0x4f42e4(0x13a)](',\x0a')+('\x0a'+_0x98d857+'}');}return String(_0x374c87);}
|
package/dist/utils/diff.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x795ff6,_0x13954a){const _0x27343f=a202_0x1ec9,_0x5d4a48=_0x795ff6();while(!![]){try{const _0xd6ee9b=-parseInt(_0x27343f(0x1a8))/0x1*(parseInt(_0x27343f(0x1b0))/0x2)+parseInt(_0x27343f(0x1ad))/0x3+-parseInt(_0x27343f(0x194))/0x4*(parseInt(_0x27343f(0x18d))/0x5)+parseInt(_0x27343f(0x1a5))/0x6*(-parseInt(_0x27343f(0x19f))/0x7)+-parseInt(_0x27343f(0x193))/0x8+parseInt(_0x27343f(0x1ae))/0x9+parseInt(_0x27343f(0x1aa))/0xa;if(_0xd6ee9b===_0x13954a)break;else _0x5d4a48['push'](_0x5d4a48['shift']());}catch(_0x3a74d1){_0x5d4a48['push'](_0x5d4a48['shift']());}}}(a202_0x2b92,0xdecfa));import a202_0x37b7a7 from'chalk';export function generateDiff(_0x3e0d27,_0xa22fd2){const _0x43a0bf=a202_0x1ec9,_0x3a17c9=_0x3e0d27[_0x43a0bf(0x19c)]('\x0a'),_0x1b883a=_0xa22fd2[_0x43a0bf(0x19c)]('\x0a'),_0x223efd=[],_0x20a655=computeLCS(_0x3a17c9,_0x1b883a);let _0x1a5e89=0x0,_0x49e873=0x0,_0x5267a3=0x0;while(_0x1a5e89<_0x3a17c9[_0x43a0bf(0x19d)]||_0x49e873<_0x1b883a['length']){if(_0x5267a3<_0x20a655['length']&&_0x1a5e89<_0x3a17c9[_0x43a0bf(0x19d)]&&_0x3a17c9[_0x1a5e89]===_0x20a655[_0x5267a3])_0x49e873<_0x1b883a['length']&&_0x1b883a[_0x49e873]===_0x20a655[_0x5267a3]?(_0x223efd[_0x43a0bf(0x1ab)]({'type':_0x43a0bf(0x1ac),'content':_0x3a17c9[_0x1a5e89]}),_0x1a5e89++,_0x49e873++,_0x5267a3++):(_0x223efd['push']({'type':'added','content':_0x1b883a[_0x49e873]}),_0x49e873++);else{if(_0x5267a3<_0x20a655[_0x43a0bf(0x19d)]&&_0x49e873<_0x1b883a[_0x43a0bf(0x19d)]&&_0x1b883a[_0x49e873]===_0x20a655[_0x5267a3])_0x223efd['push']({'type':_0x43a0bf(0x1a7),'content':_0x3a17c9[_0x1a5e89]}),_0x1a5e89++;else{if(_0x1a5e89<_0x3a17c9[_0x43a0bf(0x19d)]&&(_0x5267a3>=_0x20a655[_0x43a0bf(0x19d)]||_0x3a17c9[_0x1a5e89]!==_0x20a655[_0x5267a3]))_0x223efd[_0x43a0bf(0x1ab)]({'type':_0x43a0bf(0x1a7),'content':_0x3a17c9[_0x1a5e89]}),_0x1a5e89++;else _0x49e873<_0x1b883a['length']&&(_0x223efd[_0x43a0bf(0x1ab)]({'type':_0x43a0bf(0x18f),'content':_0x1b883a[_0x49e873]}),_0x49e873++);}}}return _0x223efd;}function computeLCS(_0x597bb1,_0x4dcd57){const _0x5f1ef5=a202_0x1ec9,_0x34282d=_0x597bb1['length'],_0x465bd0=_0x4dcd57[_0x5f1ef5(0x19d)],_0x29a66f=Array(_0x34282d+0x1)[_0x5f1ef5(0x1a3)](null)[_0x5f1ef5(0x1a2)](()=>Array(_0x465bd0+0x1)[_0x5f1ef5(0x1a3)](0x0));for(let _0x531d4b=0x1;_0x531d4b<=_0x34282d;_0x531d4b++){for(let _0x4aa2ff=0x1;_0x4aa2ff<=_0x465bd0;_0x4aa2ff++){_0x597bb1[_0x531d4b-0x1]===_0x4dcd57[_0x4aa2ff-0x1]?_0x29a66f[_0x531d4b][_0x4aa2ff]=_0x29a66f[_0x531d4b-0x1][_0x4aa2ff-0x1]+0x1:_0x29a66f[_0x531d4b][_0x4aa2ff]=Math[_0x5f1ef5(0x191)](_0x29a66f[_0x531d4b-0x1][_0x4aa2ff],_0x29a66f[_0x531d4b][_0x4aa2ff-0x1]);}}const _0x511bae=[];let _0x465dce=_0x34282d,_0x207736=_0x465bd0;while(_0x465dce>0x0&&_0x207736>0x0){if(_0x597bb1[_0x465dce-0x1]===_0x4dcd57[_0x207736-0x1])_0x511bae[_0x5f1ef5(0x1b1)](_0x597bb1[_0x465dce-0x1]),_0x465dce--,_0x207736--;else _0x29a66f[_0x465dce-0x1][_0x207736]>_0x29a66f[_0x465dce][_0x207736-0x1]?_0x465dce--:_0x207736--;}return _0x511bae;}export function formatDiffWithColors(_0x37ae3a,_0x2f75b2=0x3){const _0x1e5d4d=a202_0x1ec9,_0x25cded=new Set();_0x37ae3a[_0x1e5d4d(0x19b)]((_0x266860,_0x5ab023)=>{const _0x36e94d=_0x1e5d4d;_0x266860[_0x36e94d(0x199)]!=='unchanged'&&_0x25cded[_0x36e94d(0x195)](_0x5ab023);});if(_0x25cded[_0x1e5d4d(0x197)]===0x0)return'';const _0x4a0201=new Set();for(const _0x5c17c0 of _0x25cded){for(let _0x871425=Math['max'](0x0,_0x5c17c0-_0x2f75b2);_0x871425<=Math[_0x1e5d4d(0x19e)](_0x37ae3a[_0x1e5d4d(0x19d)]-0x1,_0x5c17c0+_0x2f75b2);_0x871425++){_0x4a0201['add'](_0x871425);}}const _0x42381b=[];let _0x168205=-0x1;const _0x55aa20=_0x37ae3a[_0x1e5d4d(0x19d)],_0x4b8507=Math[_0x1e5d4d(0x191)](0x3,String(_0x55aa20)[_0x1e5d4d(0x19d)]),_0xe2031=[];let _0x3e2f8c=0x0,_0x441dcf=0x0;for(const _0x320488 of _0x37ae3a){if(_0x320488['type']===_0x1e5d4d(0x1a7))_0x3e2f8c++,_0xe2031['push']({'old':_0x3e2f8c,'new':0x0});else _0x320488['type']===_0x1e5d4d(0x18f)?(_0x441dcf++,_0xe2031['push']({'old':0x0,'new':_0x441dcf})):(_0x3e2f8c++,_0x441dcf++,_0xe2031[_0x1e5d4d(0x1ab)]({'old':_0x3e2f8c,'new':_0x441dcf}));}for(let _0x389131=0x0;_0x389131<_0x37ae3a['length'];_0x389131++){if(!_0x4a0201[_0x1e5d4d(0x196)](_0x389131))continue;_0x168205!==-0x1&&_0x389131>_0x168205+0x1&&_0x42381b[_0x1e5d4d(0x1ab)](a202_0x37b7a7[_0x1e5d4d(0x1a1)]('\x20\x20...'));_0x168205=_0x389131;const _0x30d006=_0x37ae3a[_0x389131],_0x436f60=_0xe2031[_0x389131],_0x171761=_0x436f60[_0x1e5d4d(0x198)]>0x0?String(_0x436f60[_0x1e5d4d(0x198)])[_0x1e5d4d(0x1af)](_0x4b8507):'\x20'[_0x1e5d4d(0x1a9)](_0x4b8507),_0x123f1b=_0x436f60[_0x1e5d4d(0x1a0)]>0x0?String(_0x436f60[_0x1e5d4d(0x1a0)])[_0x1e5d4d(0x1af)](_0x4b8507):'\x20'[_0x1e5d4d(0x1a9)](_0x4b8507);switch(_0x30d006[_0x1e5d4d(0x199)]){case _0x1e5d4d(0x1a7):_0x42381b[_0x1e5d4d(0x1ab)](a202_0x37b7a7['red'](_0x171761+'\x20'+_0x123f1b+_0x1e5d4d(0x192)+_0x30d006[_0x1e5d4d(0x1a6)]));break;case _0x1e5d4d(0x18f):_0x42381b[_0x1e5d4d(0x1ab)](a202_0x37b7a7[_0x1e5d4d(0x18e)](_0x171761+'\x20'+_0x123f1b+_0x1e5d4d(0x19a)+_0x30d006[_0x1e5d4d(0x1a6)]));break;default:_0x42381b['push'](a202_0x37b7a7['dim'](_0x171761+'\x20'+_0x123f1b+_0x1e5d4d(0x190)+_0x30d006[_0x1e5d4d(0x1a6)]));break;}}return _0x42381b[_0x1e5d4d(0x1b2)]('\x0a');}export function hasChanges(_0x5b0ca1){const _0x4e4235=a202_0x1ec9;return _0x5b0ca1[_0x4e4235(0x1a4)](_0x3490c1=>_0x3490c1[_0x4e4235(0x199)]!==_0x4e4235(0x1ac));}function a202_0x1ec9(_0x5a13fc,_0x2b7e75){_0x5a13fc=_0x5a13fc-0x18d;const _0x2b92fc=a202_0x2b92();let _0x1ec915=_0x2b92fc[_0x5a13fc];return _0x1ec915;}function a202_0x2b92(){const _0x157556=['size','old','type','\x20+\x20','forEach','split','length','min','7jcsZNt','new','cyan','map','fill','some','632976cVpXug','content','removed','1riBLNe','repeat','20873020dSyrFw','push','unchanged','568851mlkxww','3608307yfuJHq','padStart','821566HjXqPx','unshift','join','5310SdLDwS','green','added','\x20\x20\x20','max','\x20-\x20','9948952cdpXHc','20zxhAuR','add','has'];a202_0x2b92=function(){return _0x157556;};return a202_0x2b92();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a203_0x4d77(_0x5c4d01,_0x3cfcfc){_0x5c4d01=_0x5c4d01-0x1ed;const _0x2b8fde=a203_0x2b8f();let _0x4d77a4=_0x2b8fde[_0x5c4d01];return _0x4d77a4;}function a203_0x2b8f(){const _0x3c7eb8=['toString','existsSync','1341kDfgNM','2568xOFmSV','chmodSync','writeFileSync','290160DKHQAB','mkdirSync','215387AaQTsO','Warning:\x20','statSync','warn','2GTazYH','\x20has\x20insecure\x20permissions\x20(','mode','1104790ZEctyM','7ShfmtL','640848BAuivA','444285NOOzbR','Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20','106140fDuWqq'];a203_0x2b8f=function(){return _0x3c7eb8;};return a203_0x2b8f();}(function(_0x389c5b,_0x4d8299){const _0x742e56=a203_0x4d77,_0x1d087c=_0x389c5b();while(!![]){try{const _0x46af7a=-parseInt(_0x742e56(0x1f8))/0x1*(-parseInt(_0x742e56(0x1fc))/0x2)+-parseInt(_0x742e56(0x1f6))/0x3+-parseInt(_0x742e56(0x201))/0x4+parseInt(_0x742e56(0x1ed))/0x5+-parseInt(_0x742e56(0x1ef))/0x6*(-parseInt(_0x742e56(0x200))/0x7)+-parseInt(_0x742e56(0x1f3))/0x8*(parseInt(_0x742e56(0x1f2))/0x9)+parseInt(_0x742e56(0x1ff))/0xa;if(_0x46af7a===_0x4d8299)break;else _0x1d087c['push'](_0x1d087c['shift']());}catch(_0x4de79d){_0x1d087c['push'](_0x1d087c['shift']());}}}(a203_0x2b8f,0x1f2a4));import*as a203_0x41f26f from'node:fs';import*as a203_0x5e09a3 from'node:path';export function setSecureFilePermissions(_0x3720ef){const _0x4f8a9a=a203_0x4d77;try{a203_0x41f26f[_0x4f8a9a(0x1f4)](_0x3720ef,0x180);}catch{console[_0x4f8a9a(0x1fb)](_0x4f8a9a(0x1ee)+_0x3720ef);}}export function setSecureDirectoryPermissions(_0x56d427){const _0x2ab6ba=a203_0x4d77;try{a203_0x41f26f[_0x2ab6ba(0x1f4)](_0x56d427,0x1c0);}catch{console[_0x2ab6ba(0x1fb)](_0x2ab6ba(0x1ee)+_0x56d427);}}export function createSecureDirectory(_0x1f8d6d){const _0xd10c49=a203_0x4d77;!a203_0x41f26f[_0xd10c49(0x1f1)](_0x1f8d6d)&&(a203_0x41f26f[_0xd10c49(0x1f7)](_0x1f8d6d,{'recursive':!![],'mode':0x1c0}),setSecureDirectoryPermissions(_0x1f8d6d));}export function validateSecureFilePermissions(_0x444662){const _0x269681=a203_0x4d77;try{const _0x3381dc=a203_0x41f26f[_0x269681(0x1fa)](_0x444662),_0x14db84=_0x3381dc[_0x269681(0x1fe)]&0x1ff,_0x35ef02=(_0x14db84&0x3f)!==0x0;if(_0x35ef02)return console['warn'](_0x269681(0x1f9)+_0x444662+_0x269681(0x1fd)+_0x14db84[_0x269681(0x1f0)](0x8)+').\x20'+'Should\x20be\x200600\x20or\x20more\x20restrictive.'),![];return!![];}catch{return!![];}}export function writeSecureFile(_0x16d3dc,_0x2e3149){const _0x406f79=a203_0x4d77,_0x4ab2cc=a203_0x5e09a3['dirname'](_0x16d3dc);createSecureDirectory(_0x4ab2cc),a203_0x41f26f[_0x406f79(0x1f5)](_0x16d3dc,_0x2e3149,{'mode':0x180}),setSecureFilePermissions(_0x16d3dc);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a204_0x2006(_0x2c97ba,_0xd1cf2){_0x2c97ba=_0x2c97ba-0x11c;const _0x4dd9b4=a204_0x4dd9();let _0x2006c9=_0x4dd9b4[_0x2c97ba];return _0x2006c9;}(function(_0x25fcc2,_0x48dfff){const _0x1ead09=a204_0x2006,_0x25426c=_0x25fcc2();while(!![]){try{const _0x85f92e=parseInt(_0x1ead09(0x124))/0x1*(parseInt(_0x1ead09(0x11f))/0x2)+-parseInt(_0x1ead09(0x12d))/0x3+parseInt(_0x1ead09(0x125))/0x4+-parseInt(_0x1ead09(0x12e))/0x5+-parseInt(_0x1ead09(0x12c))/0x6+parseInt(_0x1ead09(0x127))/0x7+parseInt(_0x1ead09(0x12b))/0x8*(parseInt(_0x1ead09(0x129))/0x9);if(_0x85f92e===_0x48dfff)break;else _0x25426c['push'](_0x25426c['shift']());}catch(_0x5c5c65){_0x25426c['push'](_0x25426c['shift']());}}}(a204_0x4dd9,0x49aa4));import{readFileSync}from'fs';import{SDKError,ErrorCode}from'../sdk/errors.js';function a204_0x4dd9(){const _0x2b3755=['1111124bUXZVZ','message','51786QfmIne','File\x20\x27','584qUpViM','576012BdpMUm','614379cospgN','2556845udFHnG','EACCES','\x27\x20not\x20found','utf-8','217132bIEKrE','code','NOT_FOUND','INTERNAL','Error\x20reading\x20file\x20\x27','4WrpJby','403432bBtPZk','ENOENT'];a204_0x4dd9=function(){return _0x2b3755;};return a204_0x4dd9();}export function readFileContent(_0x545d59){const _0x991b44=a204_0x2006;try{return readFileSync(_0x545d59,_0x991b44(0x11e));}catch(_0x4b3324){const _0x1b9660=_0x4b3324[_0x991b44(0x120)];if(_0x1b9660===_0x991b44(0x126))throw new SDKError(ErrorCode[_0x991b44(0x121)],_0x991b44(0x12a)+_0x545d59+_0x991b44(0x11d),_0x4b3324);else{if(_0x1b9660===_0x991b44(0x11c))throw new SDKError(ErrorCode['PERMISSION_DENIED'],'Permission\x20denied\x20reading\x20file\x20\x27'+_0x545d59+'\x27',_0x4b3324);else throw new SDKError(ErrorCode[_0x991b44(0x122)],_0x991b44(0x123)+_0x545d59+'\x27:\x20'+_0x4b3324[_0x991b44(0x128)],_0x4b3324);}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x517d94,_0x119130){const _0x27b9db=a205_0x57a9,_0x3e0957=_0x517d94();while(!![]){try{const _0xe2d282=parseInt(_0x27b9db(0x1e0))/0x1*(parseInt(_0x27b9db(0x1d7))/0x2)+parseInt(_0x27b9db(0x1e4))/0x3+-parseInt(_0x27b9db(0x1e2))/0x4*(-parseInt(_0x27b9db(0x1d1))/0x5)+parseInt(_0x27b9db(0x1cf))/0x6*(-parseInt(_0x27b9db(0x1dc))/0x7)+parseInt(_0x27b9db(0x1da))/0x8+parseInt(_0x27b9db(0x1cb))/0x9+-parseInt(_0x27b9db(0x1d5))/0xa;if(_0xe2d282===_0x119130)break;else _0x3e0957['push'](_0x3e0957['shift']());}catch(_0x1e764f){_0x3e0957['push'](_0x3e0957['shift']());}}}(a205_0x3611,0x3cf6a));import*as a205_0x5d2b00 from'node:https';const REQUEST_TIMEOUT_MS=0x2710,CACHE_TTL_MS=0x5*0x3c*0x3e8,cache=new Map();export function fetchGitHubReleases(_0x5439be,_0x1096cb,_0x47aec1){const _0x3ea0d8=a205_0x57a9,_0x184bdd=_0x5439be+'/'+_0x1096cb,_0x496bc9=cache[_0x3ea0d8(0x1ca)](_0x184bdd);if(_0x496bc9&&Date[_0x3ea0d8(0x1cc)]()-_0x496bc9[_0x3ea0d8(0x1ce)]<CACHE_TTL_MS)return Promise[_0x3ea0d8(0x1d0)](_0x496bc9[_0x3ea0d8(0x1de)]);return new Promise((_0x340717,_0x1e7d84)=>{const _0x7361bb=_0x3ea0d8,_0x295981={'hostname':_0x7361bb(0x1d3),'path':_0x7361bb(0x1cd)+_0x5439be+'/'+_0x1096cb+_0x7361bb(0x1d4),'headers':{'User-Agent':_0x47aec1,'Accept':'application/vnd.github+json'},'timeout':REQUEST_TIMEOUT_MS},_0x17e281=a205_0x5d2b00[_0x7361bb(0x1ca)](_0x295981,_0x295b98=>{let _0xa73faa='';_0x295b98['on']('data',_0x671797=>{const _0x2c7bbb=a205_0x57a9;_0xa73faa+=_0x671797[_0x2c7bbb(0x1e3)]();}),_0x295b98['on']('end',()=>{const _0x13fa5d=a205_0x57a9;if(_0x295b98[_0x13fa5d(0x1db)]!==0xc8){_0x1e7d84(new Error(_0x13fa5d(0x1df)+_0x295b98[_0x13fa5d(0x1db)]+':\x20'+_0xa73faa[_0x13fa5d(0x1d8)](0x0,0xc8)));return;}try{const _0x874531=JSON[_0x13fa5d(0x1e1)](_0xa73faa);cache['set'](_0x184bdd,{'releases':_0x874531,'fetchedAt':Date[_0x13fa5d(0x1cc)]()}),_0x340717(_0x874531);}catch(_0x26dd84){_0x1e7d84(_0x26dd84);}});});_0x17e281['on']('timeout',()=>{const _0x1b39a3=_0x7361bb;_0x17e281[_0x1b39a3(0x1d2)](),_0x1e7d84(new Error(_0x1b39a3(0x1dd)+REQUEST_TIMEOUT_MS+'ms'));}),_0x17e281['on'](_0x7361bb(0x1c9),_0x1e7d84);});}function a205_0x57a9(_0x5dedb4,_0x38bb8b){_0x5dedb4=_0x5dedb4-0x1c8;const _0x361193=a205_0x3611();let _0x57a9fa=_0x361193[_0x5dedb4];return _0x57a9fa;}function a205_0x3611(){const _0x195b3b=['statusCode','7EtMZUG','GitHub\x20API\x20request\x20timed\x20out\x20after\x20','releases','GitHub\x20API\x20returned\x20','2Bwylpm','parse','208vbmXFK','toString','152190XNoPhi','length','error','get','3477510nttpSk','now','/repos/','fetchedAt','2021766dHGXyj','resolve','1735PlZvVr','destroy','api.github.com','/releases?per_page=20','1924980KMzAJY','tag_name','205628IJxhSa','slice','find','946984MXtAPv'];a205_0x3611=function(){return _0x195b3b;};return a205_0x3611();}export async function resolveReleaseTag(_0x208e36,_0x254959,_0x520aa0,_0xb25ca){const _0x144057=a205_0x57a9,_0x5d9ea7=await fetchGitHubReleases(_0x254959,_0x520aa0,_0xb25ca);if(_0x5d9ea7[_0x144057(0x1c8)]===0x0)return null;if(_0x208e36==='next')return _0x5d9ea7[0x0][_0x144057(0x1d6)];const _0x124084=_0x5d9ea7[_0x144057(0x1d9)](_0x4ca6e8=>!_0x4ca6e8['prerelease']);return _0x124084?_0x124084['tag_name']:null;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x393d67,_0x23789e){const _0x4fc116=a206_0x1ef4,_0xbe784f=_0x393d67();while(!![]){try{const _0x4a9b70=-parseInt(_0x4fc116(0x17f))/0x1+parseInt(_0x4fc116(0x172))/0x2+parseInt(_0x4fc116(0x170))/0x3+-parseInt(_0x4fc116(0x179))/0x4+parseInt(_0x4fc116(0x178))/0x5*(parseInt(_0x4fc116(0x16f))/0x6)+-parseInt(_0x4fc116(0x177))/0x7*(-parseInt(_0x4fc116(0x176))/0x8)+-parseInt(_0x4fc116(0x17a))/0x9;if(_0x4a9b70===_0x23789e)break;else _0xbe784f['push'](_0xbe784f['shift']());}catch(_0x2e16f4){_0xbe784f['push'](_0xbe784f['shift']());}}}(a206_0x250f,0x9da14));import{existsSync,mkdirSync,readFileSync,writeFileSync,unlinkSync}from'fs';import{join}from'path';import{homedir}from'os';export function getGlobalCacheDir(){const _0x32d196=a206_0x1ef4;return process.env.TDX_CACHE_DIR||join(homedir(),_0x32d196(0x175),_0x32d196(0x17b));}const registry=new Map();export function registerGlobalCacheKey(_0x315541,_0x5d3829){const _0x596e1c=a206_0x1ef4,_0x57f3be=registry['get'](_0x315541);if(_0x57f3be&&_0x57f3be!==_0x5d3829)throw new Error('Global\x20cache\x20key\x20\x22'+_0x315541+_0x596e1c(0x180)+_0x57f3be+_0x596e1c(0x17c)+_0x5d3829+'\x22');registry[_0x596e1c(0x17d)](_0x315541,_0x5d3829);}export function getGlobalCachePath(_0x5e2e97){return join(getGlobalCacheDir(),_0x5e2e97);}function ensureGlobalCacheDir(){const _0x5014bf=getGlobalCacheDir();!existsSync(_0x5014bf)&&mkdirSync(_0x5014bf,{'recursive':!![]});}function readCacheJson(_0x45bd3e){const _0x24e5d1=a206_0x1ef4,_0x495ffb=getGlobalCachePath(_0x45bd3e);if(!existsSync(_0x495ffb))return undefined;try{const _0x20cdb1=readFileSync(_0x495ffb,'utf-8');return JSON[_0x24e5d1(0x173)](_0x20cdb1);}catch{return undefined;}}function writeCacheJson(_0x45bffc,_0x43076d){const _0x2deb98=a206_0x1ef4;ensureGlobalCacheDir(),writeFileSync(getGlobalCachePath(_0x45bffc),JSON[_0x2deb98(0x16e)](_0x43076d,null,0x2),'utf-8');}function readCacheText(_0x2b2796){const _0x5eadd9=a206_0x1ef4,_0x55abf1=getGlobalCachePath(_0x2b2796);if(!existsSync(_0x55abf1))return undefined;try{return readFileSync(_0x55abf1,_0x5eadd9(0x17e));}catch{return undefined;}}function writeCacheText(_0x4999cf,_0x5238c4){const _0x4104c2=a206_0x1ef4;ensureGlobalCacheDir(),writeFileSync(getGlobalCachePath(_0x4999cf),_0x5238c4,_0x4104c2(0x17e));}function clearCache(_0x4b28f2){const _0x44dfe0=getGlobalCachePath(_0x4b28f2);if(existsSync(_0x44dfe0))try{unlinkSync(_0x44dfe0);}catch{}}function cacheExists(_0x5a2d09){return existsSync(getGlobalCachePath(_0x5a2d09));}export function createGlobalCache(_0x1c8e16,_0x597934){return registerGlobalCacheKey(_0x1c8e16,_0x597934),{'read':()=>readCacheJson(_0x1c8e16),'write':_0x4eef72=>writeCacheJson(_0x1c8e16,_0x4eef72),'clear':()=>clearCache(_0x1c8e16),'exists':()=>cacheExists(_0x1c8e16),'path':()=>getGlobalCachePath(_0x1c8e16)};}function a206_0x1ef4(_0xf685e7,_0x2b8330){_0xf685e7=_0xf685e7-0x16e;const _0x250f1d=a206_0x250f();let _0x1ef4c7=_0x250f1d[_0xf685e7];return _0x1ef4c7;}export function createGlobalTextCache(_0x4d82be,_0x4a10e6){return registerGlobalCacheKey(_0x4d82be,_0x4a10e6),{'read':()=>readCacheText(_0x4d82be)?.['trim']()||undefined,'write':_0xe61a81=>writeCacheText(_0x4d82be,_0xe61a81),'clear':()=>clearCache(_0x4d82be),'exists':()=>cacheExists(_0x4d82be),'path':()=>getGlobalCachePath(_0x4d82be)};}export function createProfileCache(_0x51a810,_0x8f309b){const _0x3d090f=_0x371ea3=>{const _0x203aff=a206_0x1ef4,_0x5d656b=_0x371ea3||'default';return _0x51a810['replace'](_0x203aff(0x174),_0x5d656b);};return{'read':_0x154b47=>{const _0xeb9cb=_0x3d090f(_0x154b47);return registerGlobalCacheKey(_0xeb9cb,_0x8f309b),readCacheJson(_0xeb9cb);},'write':(_0xf2fba7,_0x320c62)=>{const _0x433607=_0x3d090f(_0xf2fba7);registerGlobalCacheKey(_0x433607,_0x8f309b),writeCacheJson(_0x433607,_0x320c62);},'clear':_0x32ca9e=>{const _0x12935e=_0x3d090f(_0x32ca9e);clearCache(_0x12935e);},'exists':_0x27feef=>{const _0x505892=_0x3d090f(_0x27feef);return cacheExists(_0x505892);},'path':_0x32f2dd=>{const _0x1e8260=_0x3d090f(_0x32f2dd);return getGlobalCachePath(_0x1e8260);}};}function a206_0x250f(){const _0x4effa8=['345426KicwsH','1801236QzcaLa','clear','1418528ocaihV','parse','{profile}','.cache','8wjYXen','2569889THZFzo','50gymfyZ','3127840WYgktk','540639TryBTn','tdx','\x22,\x20cannot\x20register\x20for\x20\x22','set','utf-8','764830EVWanm','\x22\x20already\x20registered\x20by\x20\x22','stringify'];a206_0x250f=function(){return _0x4effa8;};return a206_0x250f();}export function createOptionalProfileCache(_0x7b1be8,_0x347f76,_0x2af500={}){const {profileSeparator:profileSeparator='.',suffix:suffix=''}=_0x2af500,_0x33719a=_0x2daf7f=>{return _0x2daf7f?''+_0x7b1be8+profileSeparator+_0x2daf7f+suffix:''+_0x7b1be8+suffix;};return{'read':_0x232a82=>{const _0x4c3886=_0x33719a(_0x232a82);return registerGlobalCacheKey(_0x4c3886,_0x347f76),readCacheJson(_0x4c3886);},'write':(_0x5fc246,_0x50c1a4)=>{const _0x30a45a=_0x33719a(_0x50c1a4);registerGlobalCacheKey(_0x30a45a,_0x347f76),writeCacheJson(_0x30a45a,_0x5fc246);},'clear':_0x2abca1=>{const _0x4cdc82=_0x33719a(_0x2abca1);clearCache(_0x4cdc82);},'exists':_0x2682a9=>{const _0x5aae13=_0x33719a(_0x2682a9);return cacheExists(_0x5aae13);},'path':_0x3d5a62=>{const _0x1de78a=_0x33719a(_0x3d5a62);return getGlobalCachePath(_0x1de78a);}};}export function clearGlobalRegistry(){const _0x4d0e32=a206_0x1ef4;registry[_0x4d0e32(0x171)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5545c3,_0x5de93a){const _0x42f14f=a207_0x39c1,_0x3a7326=_0x5545c3();while(!![]){try{const _0x59e322=parseInt(_0x42f14f(0x16e))/0x1+-parseInt(_0x42f14f(0x178))/0x2+-parseInt(_0x42f14f(0x170))/0x3*(parseInt(_0x42f14f(0x16f))/0x4)+parseInt(_0x42f14f(0x166))/0x5+parseInt(_0x42f14f(0x16b))/0x6+parseInt(_0x42f14f(0x179))/0x7*(parseInt(_0x42f14f(0x177))/0x8)+parseInt(_0x42f14f(0x168))/0x9;if(_0x59e322===_0x5de93a)break;else _0x3a7326['push'](_0x3a7326['shift']());}catch(_0x19e3ec){_0x3a7326['push'](_0x3a7326['shift']());}}}(a207_0x3132,0x43407));function a207_0x3132(){const _0x5b3647=['INVALID_ARGUMENT','code','NOT_FOUND','ENOENT','24ylGSUM','816766NPKyhp','770147JGymUp','\x27:\x20','Failed\x20to\x20load\x20JSON:\x20','516805jtSkIB','message','273447CDEorv','utf-8','PERMISSION_DENIED','1091442LKlWRY','File\x20not\x20found:\x20','INTERNAL','473856zGgmXv','8rJWBIQ','653586vqgcHt','Permission\x20denied\x20reading\x20file:\x20','parse'];a207_0x3132=function(){return _0x5b3647;};return a207_0x3132();}import{readFile}from'fs/promises';import{SDKError,ErrorCode}from'../sdk/errors.js';export async function loadJSON(_0x174625,_0x520726){const _0x1f10d1=a207_0x39c1;try{if(_0x520726){const _0x26b0c9=await readFile(_0x174625,_0x1f10d1(0x169));try{return JSON[_0x1f10d1(0x172)](_0x26b0c9);}catch(_0x2c5193){throw new SDKError(ErrorCode[_0x1f10d1(0x173)],'Invalid\x20JSON\x20in\x20file\x20\x27'+_0x174625+_0x1f10d1(0x17a)+(_0x2c5193 instanceof Error?_0x2c5193[_0x1f10d1(0x167)]:String(_0x2c5193)));}}else try{return JSON['parse'](_0x174625);}catch(_0x1f3d81){throw new SDKError(ErrorCode[_0x1f10d1(0x173)],'Invalid\x20JSON\x20string:\x20'+(_0x1f3d81 instanceof Error?_0x1f3d81[_0x1f10d1(0x167)]:String(_0x1f3d81)));}}catch(_0x564117){if(_0x564117 instanceof SDKError)throw _0x564117;if(_0x564117 instanceof Error&&_0x1f10d1(0x174)in _0x564117){const _0x3d09b5=_0x564117;if(_0x3d09b5[_0x1f10d1(0x174)]===_0x1f10d1(0x176))throw new SDKError(ErrorCode[_0x1f10d1(0x175)],_0x1f10d1(0x16c)+_0x174625);else{if(_0x3d09b5[_0x1f10d1(0x174)]==='EACCES')throw new SDKError(ErrorCode[_0x1f10d1(0x16a)],_0x1f10d1(0x171)+_0x174625);}}throw new SDKError(ErrorCode[_0x1f10d1(0x16d)],_0x1f10d1(0x165)+(_0x564117 instanceof Error?_0x564117[_0x1f10d1(0x167)]:String(_0x564117)));}}function a207_0x39c1(_0x47bbe1,_0x3c364e){_0x47bbe1=_0x47bbe1-0x165;const _0x3132a9=a207_0x3132();let _0x39c1cb=_0x3132a9[_0x47bbe1];return _0x39c1cb;}export async function loadJSONFromOptions(_0x2fcac3,_0x48d05f){const _0x4a8e8e=a207_0x39c1;if(_0x2fcac3&&_0x48d05f)throw new SDKError(ErrorCode[_0x4a8e8e(0x173)],'Cannot\x20specify\x20both\x20inline\x20JSON\x20and\x20file\x20path.\x20Use\x20one\x20or\x20the\x20other.');if(_0x2fcac3)return await loadJSON(_0x2fcac3,![]);if(_0x48d05f)return await loadJSON(_0x48d05f,!![]);return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a208_0x38b37=a208_0x1050;(function(_0x55a643,_0x1a24f8){const _0xbe509f=a208_0x1050,_0x1717aa=_0x55a643();while(!![]){try{const _0x331531=parseInt(_0xbe509f(0x82))/0x1+parseInt(_0xbe509f(0x8d))/0x2+parseInt(_0xbe509f(0x8b))/0x3*(-parseInt(_0xbe509f(0x86))/0x4)+-parseInt(_0xbe509f(0x7b))/0x5+-parseInt(_0xbe509f(0x81))/0x6+parseInt(_0xbe509f(0x88))/0x7*(-parseInt(_0xbe509f(0x89))/0x8)+parseInt(_0xbe509f(0x7d))/0x9;if(_0x331531===_0x1a24f8)break;else _0x1717aa['push'](_0x1717aa['shift']());}catch(_0x3e4f6b){_0x1717aa['push'](_0x1717aa['shift']());}}}(a208_0x38fd,0x37bd4));import{existsSync,mkdirSync,readFileSync,writeFileSync,unlinkSync}from'fs';import{join,parse}from'path';import{homedir}from'os';const LOCAL_CACHE_DIR=a208_0x38b37(0x80),registry=new Map();export function registerCacheKey(_0x218bd3,_0x922fb7){const _0x45411b=a208_0x38b37,_0x399d25=registry[_0x45411b(0x83)](_0x218bd3);if(_0x399d25&&_0x399d25!==_0x922fb7)throw new Error(_0x45411b(0x7f)+_0x218bd3+_0x45411b(0x7c)+_0x399d25+_0x45411b(0x8e)+_0x922fb7+'\x22');registry[_0x45411b(0x85)](_0x218bd3,_0x922fb7);}export function getCacheDir(){const _0x3ca6cc=a208_0x38b37,_0x65aebc=process['cwd'](),_0x170021=_0x65aebc===parse(_0x65aebc)[_0x3ca6cc(0x87)]?homedir():_0x65aebc;return join(_0x170021,LOCAL_CACHE_DIR);}export function getCachePath(_0x2549f7){return join(getCacheDir(),_0x2549f7);}function ensureCacheDir(){const _0x3688f8=getCacheDir();!existsSync(_0x3688f8)&&mkdirSync(_0x3688f8,{'recursive':!![]});}function a208_0x1050(_0x1df37a,_0x64ee2e){_0x1df37a=_0x1df37a-0x7b;const _0x38fd75=a208_0x38fd();let _0x10500f=_0x38fd75[_0x1df37a];return _0x10500f;}function readCacheJson(_0x5683e2){const _0x5d83fb=a208_0x38b37,_0x260470=getCachePath(_0x5683e2);if(!existsSync(_0x260470))return undefined;try{const _0x2eee77=readFileSync(_0x260470,_0x5d83fb(0x8c));return JSON[_0x5d83fb(0x8a)](_0x2eee77);}catch{return undefined;}}function writeCacheJson(_0x5167b1,_0x1956a7){const _0x43d575=a208_0x38b37;ensureCacheDir(),writeFileSync(getCachePath(_0x5167b1),JSON[_0x43d575(0x7e)](_0x1956a7,null,0x2),'utf-8');}function a208_0x38fd(){const _0x2c489a=['\x22,\x20cannot\x20register\x20for\x20\x22','649915HIvOhm','\x22\x20already\x20registered\x20by\x20\x22','1155078DqplOr','stringify','Cache\x20key\x20\x22','.cache/tdx','287280ldJgvs','423721wSUjQn','get','clear','set','333772LBKpMm','root','92519hKlrwe','200YrQEpI','parse','9JtflZe','utf-8','869724HqrTPp'];a208_0x38fd=function(){return _0x2c489a;};return a208_0x38fd();}function readCacheText(_0x34091c){const _0x680d8a=a208_0x38b37,_0x4d8e21=getCachePath(_0x34091c);if(!existsSync(_0x4d8e21))return undefined;try{return readFileSync(_0x4d8e21,_0x680d8a(0x8c));}catch{return undefined;}}function writeCacheText(_0x372398,_0x586f4f){const _0x22f936=a208_0x38b37;ensureCacheDir(),writeFileSync(getCachePath(_0x372398),_0x586f4f,_0x22f936(0x8c));}function clearCache(_0x29e9f8){const _0x223624=getCachePath(_0x29e9f8);if(existsSync(_0x223624))try{unlinkSync(_0x223624);}catch{}}function cacheExists(_0x18d612){return existsSync(getCachePath(_0x18d612));}export function createCache(_0x3a48fa,_0x4fafe2){return registerCacheKey(_0x3a48fa,_0x4fafe2),{'read':()=>readCacheJson(_0x3a48fa),'write':_0x5cb202=>writeCacheJson(_0x3a48fa,_0x5cb202),'clear':()=>clearCache(_0x3a48fa),'exists':()=>cacheExists(_0x3a48fa),'path':()=>getCachePath(_0x3a48fa)};}export function createTextCache(_0x1e7973,_0x3e6c6c){return registerCacheKey(_0x1e7973,_0x3e6c6c),{'read':()=>readCacheText(_0x1e7973)?.['trim']()||undefined,'write':_0x42cb12=>writeCacheText(_0x1e7973,_0x42cb12),'clear':()=>clearCache(_0x1e7973),'exists':()=>cacheExists(_0x1e7973),'path':()=>getCachePath(_0x1e7973)};}export function clearRegistry(){const _0x3545d1=a208_0x38b37;registry[_0x3545d1(0x84)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a209_0x4c1d5e=a209_0x2562;(function(_0x480b4e,_0x4c002e){const _0x8ef0b=a209_0x2562,_0x374140=_0x480b4e();while(!![]){try{const _0x4fec72=parseInt(_0x8ef0b(0xbe))/0x1+-parseInt(_0x8ef0b(0xbf))/0x2+-parseInt(_0x8ef0b(0xb0))/0x3+parseInt(_0x8ef0b(0xc1))/0x4*(-parseInt(_0x8ef0b(0xae))/0x5)+parseInt(_0x8ef0b(0xc0))/0x6*(parseInt(_0x8ef0b(0xb2))/0x7)+parseInt(_0x8ef0b(0xbd))/0x8+parseInt(_0x8ef0b(0xbb))/0x9;if(_0x4fec72===_0x4c002e)break;else _0x374140['push'](_0x374140['shift']());}catch(_0x53755e){_0x374140['push'](_0x374140['shift']());}}}(a209_0x374d,0x45b02));import a209_0x3b7034 from'chalk';import{LogLevel,logLevelToString,formatTimestamp}from'../types.js';function a209_0x2562(_0x5b6808,_0x55b5e2){_0x5b6808=_0x5b6808-0xa7;const _0x374df2=a209_0x374d();let _0x256269=_0x374df2[_0x5b6808];return _0x256269;}const chalkModule=a209_0x3b7034,ChalkClass=chalkModule[a209_0x4c1d5e(0xac)]||chalkModule[a209_0x4c1d5e(0xa9)]?.[a209_0x4c1d5e(0xac)];export class DefaultLogFormatter{[a209_0x4c1d5e(0xaa)];['chalk'];constructor(_0x396833={}){const _0x3a246c=a209_0x4c1d5e;this['colors']=_0x396833[_0x3a246c(0xaa)]??![],this[_0x3a246c(0xb9)]=_0x396833[_0x3a246c(0xaa)]&&ChalkClass?new ChalkClass({'level':0x3}):a209_0x3b7034;}[a209_0x4c1d5e(0xb6)](_0x3fdc5d){const _0x3c60f1=a209_0x4c1d5e,_0x4f7bda=formatTimestamp(_0x3fdc5d['timestamp']),_0x93f952=logLevelToString(_0x3fdc5d[_0x3c60f1(0xbc)]);if(!this['colors'])return _0x4f7bda+'\x20['+_0x93f952+_0x3c60f1(0xb7)+_0x3fdc5d[_0x3c60f1(0xaf)]+']\x20'+_0x3fdc5d['message'];const _0x1210ac=this['chalk'][_0x3c60f1(0xb4)](_0x4f7bda),_0xc18e3b=this[_0x3c60f1(0xab)](_0x93f952,_0x3fdc5d[_0x3c60f1(0xbc)]),_0x49be6d=this[_0x3c60f1(0xb9)]['blue']('['+_0x3fdc5d[_0x3c60f1(0xaf)]+']');return _0x1210ac+'\x20'+_0xc18e3b+'\x20'+_0x49be6d+'\x20'+_0x3fdc5d['message'];}[a209_0x4c1d5e(0xab)](_0x484416,_0x2a0401){const _0x593ac0=a209_0x4c1d5e;switch(_0x2a0401){case LogLevel[_0x593ac0(0xb3)]:return this[_0x593ac0(0xb9)][_0x593ac0(0xb1)]('['+_0x484416+']');case LogLevel[_0x593ac0(0xa7)]:return this['chalk'][_0x593ac0(0xb8)]('['+_0x484416+']');case LogLevel[_0x593ac0(0xa8)]:return this[_0x593ac0(0xb9)][_0x593ac0(0xba)]('['+_0x484416+']');case LogLevel['WARN']:return this['chalk']['yellow']('['+_0x484416+']');case LogLevel[_0x593ac0(0xb5)]:return this['chalk'][_0x593ac0(0xad)]('['+_0x484416+']');default:return'['+_0x484416+']';}}}function a209_0x374d(){const _0x302888=['1037200RCVpTf','89306cVdrXv','1056920SxhlXj','6lyEfBK','1649216TynpGp','DEBUG','INFO','default','colors','colorLevel','Chalk','red','5xbdUcx','component','43248FteFhu','gray','810005SvQjJT','TRACE','dim','ERROR','format',']\x20[','green','chalk','cyan','8153559qmcdkY','level'];a209_0x374d=function(){return _0x302888;};return a209_0x374d();}
|