@treasuredata/tdx 2026.3.37 → 2026.3.38
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.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/auth-command.js +1 -1
- package/dist/commands/auth-login-command.js +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.d.ts +8 -2
- package/dist/commands/work-command.d.ts.map +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/work-command.js.map +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.d.ts.map +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js.map +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.d.ts +9 -7
- package/dist/sdk/segment/child-segment-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js.map +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.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/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.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.d.ts +3 -0
- package/dist/sdk/segment/types/activation-schema.d.ts.map +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js.map +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 +2 -1
- package/dist/sdk/types/cas.d.ts.map +1 -1
- package/dist/sdk/types/cdp.d.ts +16 -1
- 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/types/workspace.d.ts +19 -0
- package/dist/sdk/types/workspace.d.ts.map +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/types/workspace.js.map +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/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.d.ts +12 -4
- package/dist/sdk/workspace/index.d.ts.map +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/index.js.map +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.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
|
-
(function(
|
|
1
|
+
(function(_0x12a7c9,_0x2fd88a){const _0x92d214=a201_0x1ca4,_0x31d2d1=_0x12a7c9();while(!![]){try{const _0xbd90a7=-parseInt(_0x92d214(0x18e))/0x1*(-parseInt(_0x92d214(0x1a6))/0x2)+parseInt(_0x92d214(0x1a9))/0x3+parseInt(_0x92d214(0x193))/0x4+-parseInt(_0x92d214(0x1a0))/0x5+-parseInt(_0x92d214(0x1a1))/0x6+-parseInt(_0x92d214(0x1ab))/0x7*(-parseInt(_0x92d214(0x189))/0x8)+-parseInt(_0x92d214(0x18f))/0x9*(parseInt(_0x92d214(0x19c))/0xa);if(_0xbd90a7===_0x2fd88a)break;else _0x31d2d1['push'](_0x31d2d1['shift']());}catch(_0x1192fd){_0x31d2d1['push'](_0x31d2d1['shift']());}}}(a201_0x556d,0x71326));import*as a201_0xfdc705 from'node:fs';import*as a201_0xa3a8b2 from'node:path';import{serializeFrontmatter}from'./frontmatter.js';function a201_0x556d(){const _0x3cd47b=['goals','##\x20Reflection','items','backlog','-\x20[\x20]\x20','##\x20This\x20Week','join','filter','length','-\x20[x]\x20','_No\x20items\x20yet._','getMonth','percentage','8fbSSNg','planning','getGoalProgress','short','includes','17975zZZdNN','639CxmKdv','push','getTime','title','2043576DKONqR','Week\x20','en-US','setDate','ceil','basename','todo','getDay','utf-8','138340nCspOY','in_progress','getFullYear','padStart','2548070kOXRuw','1878132uWmfXP',']]\x20—\x20','done',']]\x20—\x20no\x20items\x20linked','.md','44UcIJTP','total','toLocaleDateString','2758866cXPwTJ','mkdirSync','3097766PfdMkV','getDate','frontmatter','review','weekly','design_review','toISOString','status','-\x20[[','getUTCDate','notes','setUTCDate','writeFileSync','UTC'];a201_0x556d=function(){return _0x3cd47b;};return a201_0x556d();}function getWeekNumber(_0x2f1b99){const _0x5e08ae=a201_0x1ca4,_0x46cf8e=new Date(Date[_0x5e08ae(0x17b)](_0x2f1b99[_0x5e08ae(0x19e)](),_0x2f1b99[_0x5e08ae(0x187)](),_0x2f1b99[_0x5e08ae(0x1ac)]())),_0x5f0ef8=_0x46cf8e['getUTCDay']()||0x7;_0x46cf8e[_0x5e08ae(0x1b6)](_0x46cf8e[_0x5e08ae(0x1b4)]()+0x4-_0x5f0ef8);const _0x2b6953=new Date(Date[_0x5e08ae(0x17b)](_0x46cf8e['getUTCFullYear'](),0x0,0x1));return Math[_0x5e08ae(0x197)](((_0x46cf8e[_0x5e08ae(0x191)]()-_0x2b6953[_0x5e08ae(0x191)]())/0x5265c00+0x1)/0x7);}function getWeekRange(_0x119b12){const _0x500946=a201_0x1ca4,_0x339f2b=new Date(_0x119b12),_0x34bd6e=_0x339f2b[_0x500946(0x19a)](),_0x957144=_0x339f2b[_0x500946(0x1ac)]()-_0x34bd6e+(_0x34bd6e===0x0?-0x6:0x1),_0x5e7526=new Date(_0x339f2b[_0x500946(0x196)](_0x957144)),_0xe62238=new Date(_0x5e7526);return _0xe62238[_0x500946(0x196)](_0x5e7526['getDate']()+0x4),{'monday':_0x5e7526,'friday':_0xe62238};}function formatShortDate(_0x1e6239){const _0x183266=a201_0x1ca4;return _0x1e6239[_0x183266(0x1a8)](_0x183266(0x195),{'month':_0x183266(0x18c),'day':'numeric'});}export function generateWeeklyNote(_0x106434){const _0x2ffcdd=a201_0x1ca4,_0x5264b1=_0x106434['weekDate']||new Date(),_0x12e498=getWeekNumber(_0x5264b1),_0x4d1a68=_0x5264b1[_0x2ffcdd(0x19e)](),{monday:_0x8067a9,friday:_0x10fc83}=getWeekRange(_0x5264b1),_0x2b4cf7=_0x2ffcdd(0x194)+_0x12e498+'\x20('+formatShortDate(_0x8067a9)+'-'+formatShortDate(_0x10fc83)+')',_0x46efb3=_0x4d1a68+'-W'+String(_0x12e498)[_0x2ffcdd(0x19f)](0x2,'0')+'.md',_0x56b49c={'title':_0x2b4cf7,'tags':[_0x2ffcdd(0x1af)],'created':_0x5264b1[_0x2ffcdd(0x1b1)]()['slice'](0x0,0xa)},_0x52afd3=[];if(_0x106434[_0x2ffcdd(0x17c)]['length']>0x0){_0x52afd3['push']('##\x20Goals\x20Progress');for(const _0x368ab6 of _0x106434[_0x2ffcdd(0x17c)]){const _0x2a3b93=a201_0xa3a8b2[_0x2ffcdd(0x198)](_0x368ab6['fileName'],_0x2ffcdd(0x1a5)),_0x2cec1a=_0x106434[_0x2ffcdd(0x18b)](_0x368ab6['filePath']),_0x3d6754=_0x368ab6[_0x2ffcdd(0x1ad)][_0x2ffcdd(0x192)]||_0x2a3b93;_0x2cec1a[_0x2ffcdd(0x1a7)]>0x0?_0x52afd3['push'](_0x2ffcdd(0x1b3)+_0x2a3b93+'|'+_0x3d6754+_0x2ffcdd(0x1a2)+_0x2cec1a[_0x2ffcdd(0x1a3)]+'/'+_0x2cec1a[_0x2ffcdd(0x1a7)]+'\x20items\x20done\x20('+_0x2cec1a[_0x2ffcdd(0x188)]+'%)'):_0x52afd3['push'](_0x2ffcdd(0x1b3)+_0x2a3b93+'|'+_0x3d6754+_0x2ffcdd(0x1a4));}_0x52afd3['push']('');}const _0x5ab258=_0x106434[_0x2ffcdd(0x17e)][_0x2ffcdd(0x183)](_0x34655b=>_0x34655b[_0x2ffcdd(0x1ad)][_0x2ffcdd(0x1b2)]===_0x2ffcdd(0x1a3)),_0x32203d=_0x106434[_0x2ffcdd(0x17e)][_0x2ffcdd(0x183)](_0xc938fa=>[_0x2ffcdd(0x19d),_0x2ffcdd(0x1ae),_0x2ffcdd(0x18a),_0x2ffcdd(0x1b0)][_0x2ffcdd(0x18d)](_0xc938fa[_0x2ffcdd(0x1ad)][_0x2ffcdd(0x1b2)])),_0x38eb62=_0x106434[_0x2ffcdd(0x17e)][_0x2ffcdd(0x183)](_0x57fa5b=>[_0x2ffcdd(0x17f),_0x2ffcdd(0x199)]['includes'](_0x57fa5b[_0x2ffcdd(0x1ad)][_0x2ffcdd(0x1b2)]));_0x52afd3['push'](_0x2ffcdd(0x181));if(_0x5ab258[_0x2ffcdd(0x184)]>0x0)for(const _0x286bdd of _0x5ab258){_0x52afd3['push'](_0x2ffcdd(0x185)+_0x286bdd[_0x2ffcdd(0x1ad)][_0x2ffcdd(0x192)]);}if(_0x32203d['length']>0x0)for(const _0x5a783b of _0x32203d){_0x52afd3[_0x2ffcdd(0x190)](_0x2ffcdd(0x180)+_0x5a783b['frontmatter']['title']+'\x20_('+_0x5a783b[_0x2ffcdd(0x1ad)][_0x2ffcdd(0x1b2)]+')_');}if(_0x38eb62[_0x2ffcdd(0x184)]>0x0)for(const _0x42f03f of _0x38eb62){_0x52afd3[_0x2ffcdd(0x190)]('-\x20[\x20]\x20'+_0x42f03f[_0x2ffcdd(0x1ad)][_0x2ffcdd(0x192)]);}_0x5ab258[_0x2ffcdd(0x184)]===0x0&&_0x32203d['length']===0x0&&_0x38eb62[_0x2ffcdd(0x184)]===0x0&&_0x52afd3[_0x2ffcdd(0x190)](_0x2ffcdd(0x186));_0x52afd3[_0x2ffcdd(0x190)](''),_0x52afd3['push'](_0x2ffcdd(0x17d)),_0x52afd3[_0x2ffcdd(0x190)](''),_0x52afd3['push']('');const _0x199906=_0x52afd3[_0x2ffcdd(0x182)]('\x0a'),_0x53f47a=serializeFrontmatter(_0x56b49c,_0x199906);return{'fileName':_0x46efb3,'content':_0x53f47a};}function a201_0x1ca4(_0x25a866,_0x43def7){_0x25a866=_0x25a866-0x17b;const _0x556d30=a201_0x556d();let _0x1ca4ef=_0x556d30[_0x25a866];return _0x1ca4ef;}export function writeWeeklyNote(_0x38b0b0,_0xf13dd3){const _0x43d416=a201_0x1ca4,{fileName:_0x2e4676,content:_0x175d6b}=generateWeeklyNote(_0xf13dd3),_0x1997a7=a201_0xa3a8b2[_0x43d416(0x182)](_0x38b0b0,_0x43d416(0x1b5),_0x43d416(0x1af));a201_0xfdc705[_0x43d416(0x1aa)](_0x1997a7,{'recursive':!![]});const _0xaa6b55=a201_0xa3a8b2[_0x43d416(0x182)](_0x1997a7,_0x2e4676);return a201_0xfdc705[_0x43d416(0x1b7)](_0xaa6b55,_0x175d6b,_0x43d416(0x19b)),{'filePath':_0xaa6b55,'fileName':_0x2e4676};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x367c78,_0x267fad){const _0x1c6f2f=a202_0x4c15,_0x13b757=_0x367c78();while(!![]){try{const _0x6e02fd=parseInt(_0x1c6f2f(0x105))/0x1*(parseInt(_0x1c6f2f(0x104))/0x2)+parseInt(_0x1c6f2f(0xf6))/0x3*(-parseInt(_0x1c6f2f(0xe8))/0x4)+parseInt(_0x1c6f2f(0xff))/0x5+parseInt(_0x1c6f2f(0xf4))/0x6+-parseInt(_0x1c6f2f(0xf2))/0x7+-parseInt(_0x1c6f2f(0x106))/0x8+-parseInt(_0x1c6f2f(0x102))/0x9;if(_0x6e02fd===_0x267fad)break;else _0x13b757['push'](_0x13b757['shift']());}catch(_0x400812){_0x13b757['push'](_0x13b757['shift']());}}}(a202_0x508f,0x2b807));function a202_0x508f(){const _0x1d0b4a=['get','lastIndex','1502505GUsEtA','resolvedKind','indexOf','644040UFiIJA','find','204922PQZWQW','3jTUhJD','270544QvZUEl','readFileSync','4mryvmK','join','resolvedPath','readdirSync','sort','kind','basename','startsWith','length','slug','1883280dSvMjD','name','1093998ijNOMu','existsSync','712848sHhLcH','slice','push','trim','filePath','isDirectory','isSymbolicLink'];a202_0x508f=function(){return _0x1d0b4a;};return a202_0x508f();}import*as a202_0xf2aafa from'node:fs';import*as a202_0x206bcf from'node:path';import{DOCUMENT_KIND_FOLDERS,KIND_PRIORITY}from'../types/workspace.js';const WIKI_LINK_REGEX=/\[\[([^\[\]]+)\]\]/g;export function parseWikiLinks(_0x3dbc03){const _0x166097=a202_0x4c15,_0x134106=[];let _0x39d18e;WIKI_LINK_REGEX[_0x166097(0xfe)]=0x0;while((_0x39d18e=WIKI_LINK_REGEX['exec'](_0x3dbc03))!==null){const _0x2e2478=_0x39d18e[0x1],_0x490396=_0x2e2478[_0x166097(0x101)]('|');let _0xc48a48,_0x3d7f7d;_0x490396!==-0x1?(_0xc48a48=_0x2e2478[_0x166097(0xf7)](0x0,_0x490396)[_0x166097(0xf9)](),_0x3d7f7d=_0x2e2478[_0x166097(0xf7)](_0x490396+0x1)['trim']()):_0xc48a48=_0x2e2478['trim'](),_0x134106[_0x166097(0xf8)]({'raw':_0x39d18e[0x0],'slug':_0xc48a48,'displayText':_0x3d7f7d});}return _0x134106;}export function collectMarkdownFiles(_0x2bbfd0,_0x380c43=0x0){const _0x1af3ca=a202_0x4c15;if(_0x380c43>0x5)return[];if(!a202_0xf2aafa[_0x1af3ca(0xf5)](_0x2bbfd0))return[];const _0x1411bf=[];try{for(const _0x4f1372 of a202_0xf2aafa[_0x1af3ca(0xeb)](_0x2bbfd0,{'withFileTypes':!![]})){if(_0x4f1372['name'][_0x1af3ca(0xef)]('.'))continue;if(_0x4f1372[_0x1af3ca(0xfc)]())continue;const _0x48f5bf=a202_0x206bcf['join'](_0x2bbfd0,_0x4f1372[_0x1af3ca(0xf3)]);if(_0x4f1372[_0x1af3ca(0xfb)]())_0x1411bf[_0x1af3ca(0xf8)](...collectMarkdownFiles(_0x48f5bf,_0x380c43+0x1));else _0x4f1372['name']['endsWith']('.md')&&_0x1411bf[_0x1af3ca(0xf8)](_0x48f5bf);}}catch{}return _0x1411bf;}export function buildFileIndex(_0x4a91a3){const _0x44d6da=a202_0x4c15,_0x553eb9=new Map();for(const [_0xbfa9ca,_0x4b0da0]of Object['entries'](DOCUMENT_KIND_FOLDERS)){const _0x1f2894=a202_0x206bcf[_0x44d6da(0xe9)](_0x4a91a3,_0x4b0da0),_0x4056f8=collectMarkdownFiles(_0x1f2894);for(const _0x3f0eca of _0x4056f8){const _0x5a7e43=a202_0x206bcf[_0x44d6da(0xee)](_0x3f0eca,'.md'),_0x224387={'stem':_0x5a7e43,'kind':_0xbfa9ca,'filePath':_0x3f0eca,'folder':_0x4b0da0},_0x4b9efb=_0x553eb9[_0x44d6da(0xfd)](_0x5a7e43)||[];_0x4b9efb[_0x44d6da(0xf8)](_0x224387),_0x553eb9['set'](_0x5a7e43,_0x4b9efb);}}return _0x553eb9;}export function resolveWikiLinks(_0x51127b,_0x5c6006){const _0x23f649=a202_0x4c15,_0xbb645a=parseWikiLinks(_0x51127b);for(const _0x1fc308 of _0xbb645a){const {slug:_0x5c82cd}=_0x1fc308,_0x2a37d3=_0x5c82cd[_0x23f649(0x101)]('/');if(_0x2a37d3!==-0x1){const _0x263b4e=_0x5c82cd[_0x23f649(0xf7)](0x0,_0x2a37d3),_0x574815=_0x5c82cd['slice'](_0x2a37d3+0x1),_0xd59965=_0x5c6006[_0x23f649(0xfd)](_0x574815);if(_0xd59965){const _0x1cb801=_0xd59965[_0x23f649(0x103)](_0x1a0eb8=>_0x1a0eb8['folder']===_0x263b4e);_0x1cb801&&(_0x1fc308[_0x23f649(0xea)]=_0x1cb801[_0x23f649(0xfa)],_0x1fc308[_0x23f649(0x100)]=_0x1cb801[_0x23f649(0xed)]);}continue;}const _0x55bc23=_0x5c6006[_0x23f649(0xfd)](_0x5c82cd);if(_0x55bc23&&_0x55bc23[_0x23f649(0xf0)]>0x0){const _0x32528e=_0x55bc23[_0x23f649(0xec)]((_0x4fbaa5,_0x40c325)=>(KIND_PRIORITY[_0x40c325[_0x23f649(0xed)]]||0x0)-(KIND_PRIORITY[_0x4fbaa5['kind']]||0x0));_0x1fc308['resolvedPath']=_0x32528e[0x0]['filePath'],_0x1fc308['resolvedKind']=_0x32528e[0x0][_0x23f649(0xed)];}}return _0xbb645a;}function a202_0x4c15(_0x554567,_0x283471){_0x554567=_0x554567-0xe7;const _0x508fdf=a202_0x508f();let _0x4c1590=_0x508fdf[_0x554567];return _0x4c1590;}export function getBacklinks(_0x487f65,_0x51dddf){const _0x37c844=a202_0x4c15,_0x461e3b=[];for(const [_0x1647dd,_0x2ee476]of Object['entries'](DOCUMENT_KIND_FOLDERS)){const _0x59a7bc=a202_0x206bcf[_0x37c844(0xe9)](_0x51dddf,_0x2ee476),_0x4e7016=collectMarkdownFiles(_0x59a7bc);for(const _0x4e2d19 of _0x4e7016){const _0x31198a=a202_0xf2aafa[_0x37c844(0xe7)](_0x4e2d19,'utf-8'),_0x4b0922=parseWikiLinks(_0x31198a),_0x1d580f=_0x4b0922['some'](_0x2cd63f=>{const _0x5c80f1=_0x37c844,_0x36820f=_0x2cd63f[_0x5c80f1(0xf1)][_0x5c80f1(0x101)]('/'),_0x216e01=_0x36820f!==-0x1?_0x2cd63f[_0x5c80f1(0xf1)][_0x5c80f1(0xf7)](_0x36820f+0x1):_0x2cd63f[_0x5c80f1(0xf1)];return _0x216e01===_0x487f65;});if(_0x1d580f){const _0x48db6a=_0x31198a['match'](/^---[\s\S]*?title:\s*(.+?)[\s]*\n/m),_0x4ccf0d=a202_0x206bcf[_0x37c844(0xee)](_0x4e2d19),_0x3a5199=_0x48db6a?_0x48db6a[0x1]['replace'](/^['"]|['"]$/g,''):_0x4ccf0d;_0x461e3b[_0x37c844(0xf8)]({'filePath':_0x4e2d19,'kind':_0x1647dd,'title':_0x3a5199});}}}return _0x461e3b;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a203_0x776a14=a203_0x2cfd;function a203_0x2cfd(_0x2da710,_0x10caa0){_0x2da710=_0x2da710-0xaa;const _0x4609bf=a203_0x4609();let _0x2cfdf0=_0x4609bf[_0x2da710];return _0x2cfdf0;}(function(_0xfe6458,_0x48104c){const _0x2be322=a203_0x2cfd,_0x162b73=_0xfe6458();while(!![]){try{const _0x282084=parseInt(_0x2be322(0xb8))/0x1*(parseInt(_0x2be322(0xca))/0x2)+parseInt(_0x2be322(0xbe))/0x3+parseInt(_0x2be322(0xc9))/0x4*(-parseInt(_0x2be322(0xb5))/0x5)+-parseInt(_0x2be322(0xaa))/0x6*(parseInt(_0x2be322(0xb0))/0x7)+parseInt(_0x2be322(0xb1))/0x8+-parseInt(_0x2be322(0xc2))/0x9*(parseInt(_0x2be322(0xbc))/0xa)+parseInt(_0x2be322(0xc7))/0xb;if(_0x282084===_0x48104c)break;else _0x162b73['push'](_0x162b73['shift']());}catch(_0xd0163a){_0x162b73['push'](_0x162b73['shift']());}}}(a203_0x4609,0xf3736));import{TDX,LogLevel}from'../sdk/index.js';import{createHTTPMock}from'./http-mock.js';import{createTestGlobalOptions}from'./factories.js';function a203_0x4609(){const _0x49daa6=['runSequence','5iBVqEH','warn','fetch','1299941gxsNKZ','ERROR','site','verify','17913930zKkbWB','fail','5167179yIgXiy','log','http','originalFetch','9QARIGJ','reset','setup','map','args','9167103nqrijL','join','3337484BimFPw','2ymoGxo','error','48xIEnZo','exitCode','teardown','createFetch','test-api-key-id/test-api-key-secret','options','819861vNOzuE','5633720mXLVpt','run','push'];a203_0x4609=function(){return _0x49daa6;};return a203_0x4609();}export class CommandRunner{['http'];['originalFetch'];constructor(){const _0x2a4e86=a203_0x2cfd;this[_0x2a4e86(0xc0)]=createHTTPMock(),this[_0x2a4e86(0xc1)]=global[_0x2a4e86(0xb7)];}[a203_0x776a14(0xc4)](){const _0x2aa443=a203_0x776a14;this[_0x2aa443(0xc1)]=global[_0x2aa443(0xb7)],global[_0x2aa443(0xb7)]=this[_0x2aa443(0xc0)][_0x2aa443(0xad)]();}[a203_0x776a14(0xac)](_0x27bb1e){const _0x1a7328=a203_0x776a14;try{_0x27bb1e?.[_0x1a7328(0xbd)]&&this[_0x1a7328(0xc0)][_0x1a7328(0xbb)](_0x27bb1e);}finally{global[_0x1a7328(0xb7)]=this['originalFetch'],this['http'][_0x1a7328(0xc3)]();}}async[a203_0x776a14(0xb2)](_0xf21b59,_0x3b13d3={}){const _0x2ddd74=a203_0x776a14,_0x36e8bc=[],_0x5d529d=[],_0x45c32d=console[_0x2ddd74(0xbf)],_0x2b8059=console[_0x2ddd74(0xcb)],_0x4fbf55=console[_0x2ddd74(0xb6)];console[_0x2ddd74(0xbf)]=(..._0xaa3555)=>{const _0x4f19e9=_0x2ddd74;_0x36e8bc[_0x4f19e9(0xb3)](_0xaa3555['map'](String)[_0x4f19e9(0xc8)]('\x20'));},console[_0x2ddd74(0xcb)]=(..._0x1369d1)=>{const _0x5106f9=_0x2ddd74;_0x5d529d[_0x5106f9(0xb3)](_0x1369d1[_0x5106f9(0xc5)](String)[_0x5106f9(0xc8)]('\x20'));},console[_0x2ddd74(0xb6)]=(..._0x965e0f)=>{const _0x1c7fec=_0x2ddd74;_0x5d529d['push'](_0x965e0f['map'](String)[_0x1c7fec(0xc8)]('\x20'));};try{const _0x462e47=new TDX({'site':_0x3b13d3[_0x2ddd74(0xaf)]?.[_0x2ddd74(0xba)]??'us01','apiKey':_0x2ddd74(0xae),'logLevel':LogLevel[_0x2ddd74(0xb9)]}),_0x5929ad={'options':createTestGlobalOptions(_0x3b13d3[_0x2ddd74(0xaf)]),'args':_0x3b13d3[_0x2ddd74(0xc6)]??[],'tdx':_0x462e47},_0x433972=new _0xf21b59(),_0x457d1f=await _0x433972[_0x2ddd74(0xb2)](_0x5929ad);return{'exitCode':_0x457d1f,'stdout':_0x36e8bc,'stderr':_0x5d529d};}finally{console[_0x2ddd74(0xbf)]=_0x45c32d,console[_0x2ddd74(0xcb)]=_0x2b8059,console['warn']=_0x4fbf55;}}async[a203_0x776a14(0xb4)](_0x125a33){const _0x280136=a203_0x776a14,_0x1eed93=[];for(const {command:_0x185681,options:_0x2eacb1}of _0x125a33){const _0xd7c168=await this[_0x280136(0xb2)](_0x185681,_0x2eacb1);_0x1eed93['push'](_0xd7c168);if(_0xd7c168[_0x280136(0xab)]!==0x0)break;}return _0x1eed93;}}export function createCommandRunner(){return new CommandRunner();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4c0df2,_0x1b37fc){const _0x4b45fb=a204_0x410a,_0x25ea4e=_0x4c0df2();while(!![]){try{const _0x442679=-parseInt(_0x4b45fb(0xc0))/0x1*(-parseInt(_0x4b45fb(0xb5))/0x2)+-parseInt(_0x4b45fb(0xa9))/0x3*(parseInt(_0x4b45fb(0xbd))/0x4)+-parseInt(_0x4b45fb(0xab))/0x5*(-parseInt(_0x4b45fb(0xaf))/0x6)+parseInt(_0x4b45fb(0xba))/0x7+parseInt(_0x4b45fb(0xc4))/0x8*(parseInt(_0x4b45fb(0xb1))/0x9)+-parseInt(_0x4b45fb(0xb6))/0xa+-parseInt(_0x4b45fb(0xbf))/0xb;if(_0x442679===_0x1b37fc)break;else _0x25ea4e['push'](_0x25ea4e['shift']());}catch(_0x431522){_0x25ea4e['push'](_0x25ea4e['shift']());}}}(a204_0x8dfd,0x23c6d));import{vi}from'vitest';import{join}from'path';import{Logger,LogLevel,FileHandler}from'../utils/logger/index.js';import{getGlobalCacheDir}from'../utils/global-cache.js';export function createTestSDKContext(_0x351d50){const _0x3ba29a=a204_0x410a;return{'site':_0x3ba29a(0xbb),'apiKey':_0x3ba29a(0xbe),'logLevel':LogLevel[_0x3ba29a(0xac)],..._0x351d50};}export function createTestGlobalOptions(_0xb06115){const _0x243b97=a204_0x410a;return{'site':_0x243b97(0xbb),'format':'table','noColor':!![],'limit':0x64,'verbose':![],'timeout':'30000','dryRun':![],'yes':![],'logLevel':LogLevel[_0x243b97(0xac)],..._0xb06115};}export async function initTestLogger(){const _0x37e101=a204_0x410a;Logger[_0x37e101(0xc6)]();const _0x4b112c=join(getGlobalCacheDir(),_0x37e101(0xbc),'tdx-test.log');await Logger[_0x37e101(0xb8)]({'defaultLevel':LogLevel['DEBUG'],'handlers':[new FileHandler({'filePath':_0x4b112c,'rotate':![]})]});}export function resetTestLogger(){const _0x42f518=a204_0x410a;Logger[_0x42f518(0xc6)]();}export function createMockTDX(_0xc6a709){const _0xad00b5=a204_0x410a;return{'context':{'site':_0xad00b5(0xbb),'apiKey':_0xad00b5(0xc5),'logLevel':LogLevel[_0xad00b5(0xac)]},'query':{'execute':vi['fn'](),'listDatabases':vi['fn'](),'listTables':vi['fn'](),'describeTable':vi['fn'](),'showTable':vi['fn'](),..._0xc6a709?.[_0xad00b5(0xc1)]},'segment':{'listParents':vi['fn'](),'getParent':vi['fn'](),'list':vi['fn'](),'get':vi['fn'](),'create':vi['fn'](),'update':vi['fn'](),'delete':vi['fn'](),..._0xc6a709?.['segment']},'journey':{'list':vi['fn'](),'get':vi['fn'](),'create':vi['fn'](),'update':vi['fn'](),'delete':vi['fn'](),..._0xc6a709?.['journey']},'workflow':{'list':vi['fn'](),'get':vi['fn'](),'run':vi['fn'](),..._0xc6a709?.[_0xad00b5(0xb4)]},'user':{'show':vi['fn'](),..._0xc6a709?.[_0xad00b5(0xb3)]},'api':{'request':vi['fn'](),..._0xc6a709?.[_0xad00b5(0xb0)]},..._0xc6a709};}function a204_0x8dfd(){const _0x4c4395=['ERROR','error','push','5298SHfzTz','api','846495oEAPqo','args','user','workflow','374042kPNMIU','380750ROInSu','warn','init','log','1791636mxiJqB','us01','logs','5240aJspzG','test-api-key-id/test-api-key-secret','2052017vuoYzz','1rkwVqx','query','join','map','8VTSvBz','test-api-key','reset','669vTVzhH','options','715ERiOcF'];a204_0x8dfd=function(){return _0x4c4395;};return a204_0x8dfd();}function a204_0x410a(_0x58be84,_0x3830e8){_0x58be84=_0x58be84-0xa9;const _0x8dfd87=a204_0x8dfd();let _0x410aa1=_0x8dfd87[_0x58be84];return _0x410aa1;}export function createTestCommandContext(_0x6ae642){const _0x2270a4=a204_0x410a,_0x27582f=createTestGlobalOptions(_0x6ae642?.[_0x2270a4(0xaa)]),_0x1904be=_0x6ae642?.['tdx']??createMockTDX();return{'options':_0x27582f,'args':_0x6ae642?.[_0x2270a4(0xb2)]??[],'tdx':_0x1904be};}export function captureConsole(){const _0x443882=a204_0x410a,_0xdcb072=[],_0x586a92=[],_0x3fbd55=console[_0x443882(0xb9)],_0x1ca746=console[_0x443882(0xad)],_0x4d1246=console[_0x443882(0xb7)];return console[_0x443882(0xb9)]=(..._0x2c26fa)=>{const _0x4c2fa5=_0x443882;_0xdcb072[_0x4c2fa5(0xae)](_0x2c26fa[_0x4c2fa5(0xc3)](String)[_0x4c2fa5(0xc2)]('\x20'));},console['error']=(..._0x1bad89)=>{const _0x38f144=_0x443882;_0x586a92['push'](_0x1bad89[_0x38f144(0xc3)](String)[_0x38f144(0xc2)]('\x20'));},console['warn']=(..._0x32f2dc)=>{const _0x56fdc1=_0x443882;_0x586a92[_0x56fdc1(0xae)](_0x32f2dc[_0x56fdc1(0xc3)](String)[_0x56fdc1(0xc2)]('\x20'));},{'stdout':_0xdcb072,'stderr':_0x586a92,'restore':()=>{const _0x5d0ed4=_0x443882;console['log']=_0x3fbd55,console[_0x5d0ed4(0xad)]=_0x1ca746,console[_0x5d0ed4(0xb7)]=_0x4d1246;}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a205_0x11bb82=a205_0x339d;(function(_0x1b621a,_0xb9393f){const _0x131ac7=a205_0x339d,_0x28965c=_0x1b621a();while(!![]){try{const _0x3bf621=parseInt(_0x131ac7(0xc3))/0x1+parseInt(_0x131ac7(0xe5))/0x2*(-parseInt(_0x131ac7(0xc7))/0x3)+parseInt(_0x131ac7(0x10c))/0x4+-parseInt(_0x131ac7(0xcb))/0x5*(parseInt(_0x131ac7(0xe8))/0x6)+-parseInt(_0x131ac7(0xd0))/0x7*(parseInt(_0x131ac7(0x105))/0x8)+-parseInt(_0x131ac7(0xda))/0x9+-parseInt(_0x131ac7(0x108))/0xa*(-parseInt(_0x131ac7(0x106))/0xb);if(_0x3bf621===_0xb9393f)break;else _0x28965c['push'](_0x28965c['shift']());}catch(_0x1489fb){_0x28965c['push'](_0x28965c['shift']());}}}(a205_0x4148,0x2cd56));function a205_0x4148(){const _0x409dcd=['2263869ykRNut','Resource\x20not\x20found','active','UTC','activation','2024-01-15T10:10:00Z','j-abc123','total','production_db','wf-67890','user-3','10ZUQFYa','administrator','Table\x20does\x20not\x20exist:\x20nonexistent_table','6ovRIXI','Active\x20users\x20with\x20high\x20lifetime\x20value','Users\x20active\x20in\x20the\x20last\x2030\x20days','email','Invalid\x20API\x20key','SELECT\x20*\x20FROM\x20nonexistent_table','Onboarding\x20journey\x20for\x20new\x20users','step-2','Admin\x20User','Alice','events','pageviews','TimeWithinPast','act-123','2023-06-15T10:30:00Z','log','error','long','0\x200\x20*\x20*\x20*','step-3','daily_etl','2024-01-01T00:00:00Z','2024-01-15T09:00:00Z','page_views','customer_id','queryResult','A\x20test\x20parent\x20segment\x20for\x20unit\x20tests','bigint','Test\x20Parent\x20Segment','8RrSjay','6243919HGwgRE','last_login','10NbRKXW','Test\x20User','ps-123456','user-1','387624hIjuXm','data_pipeline','Welcome\x20Journey','table','name','j-def456','Greater','running','events_db','Rate\x20limit\x20exceeded.\x20Please\x20try\x20again\x20later.','created_at','cs-456789','2024-01-15T12:00:00Z','user','Forbidden','lifetime_value','varchar','The\x20requested\x20resource\x20does\x20not\x20exist','hourly_sync','data_sync','abc123','completed','users','admin@example.com','SELECT\x20*\x20FROM\x20users\x20LIMIT\x2010','You\x20do\x20not\x20have\x20permission\x20to\x20access\x20this\x20resource','draft','count','SELECT\x20COUNT(*)\x20FROM\x20events','timestamp','map<string,string>','0\x20*\x20*\x20*\x20*','basic','2024-01-15T00:00:00Z','High\x20Value\x20Active\x20Users','event_type','https://api.treasuredata.com/errors/forbidden','321126jrPdBW','presto','2024-01-15T09:05:00Z','string','11718JbrdCu','Active\x20Users','properties','purchases','1445810OOHcHt','wf-12345','wait','Customers\x20with\x20Behaviors','step-1','1692530hUmhza','time','success','Charlie','test@example.com','test_db','30d','database','stringify','event_id'];a205_0x4148=function(){return _0x409dcd;};return a205_0x4148();}export const fixtures={'database':{'basic':{'name':a205_0x11bb82(0xd5),'count':0x5,'created_at':a205_0x11bb82(0xfd),'updated_at':a205_0x11bb82(0xfd),'permission':a205_0x11bb82(0xe6)},'withTables':{'name':a205_0x11bb82(0xe2),'count':0x64,'created_at':a205_0x11bb82(0xf6),'updated_at':'2024-01-15T08:00:00Z','permission':'full_access'}},'table':{'basic':{'id':0x3039,'name':a205_0x11bb82(0xb4),'type':'log','schema':JSON[a205_0x11bb82(0xd8)]([['id',a205_0x11bb82(0xc6)],['time',a205_0x11bb82(0xf9)],[a205_0x11bb82(0xa2),a205_0x11bb82(0xc6)]]),'count':0x3e8,'estimated_storage_size':0x100000,'created_at':a205_0x11bb82(0xfd),'updated_at':a205_0x11bb82(0xfd)},'events':{'id':0x303a,'name':a205_0x11bb82(0xf2),'type':a205_0x11bb82(0xf7),'schema':JSON[a205_0x11bb82(0xd8)]([[a205_0x11bb82(0xd9),a205_0x11bb82(0xc6)],[a205_0x11bb82(0xd1),a205_0x11bb82(0xf9)],['user_id','string'],[a205_0x11bb82(0xc1),a205_0x11bb82(0xc6)],[a205_0x11bb82(0xc9),a205_0x11bb82(0xbc)]]),'count':0xc350,'estimated_storage_size':0x3200000,'created_at':a205_0x11bb82(0xfd),'updated_at':a205_0x11bb82(0xaa)}},'parentSegment':{'basic':{'id':a205_0x11bb82(0x10a),'name':a205_0x11bb82(0x104),'description':a205_0x11bb82(0x102),'status':a205_0x11bb82(0xdc),'master_table':{'database':'cdp_db','table':'unified_customers'},'attributes':[{'name':a205_0x11bb82(0x100),'type':'string','key':!![]},{'name':a205_0x11bb82(0xeb),'type':a205_0x11bb82(0xc6)},{'name':a205_0x11bb82(0xa8),'type':a205_0x11bb82(0xbb)}],'created_at':a205_0x11bb82(0xfd),'updated_at':a205_0x11bb82(0xbf)},'withBehaviors':{'id':'ps-789012','name':a205_0x11bb82(0xce),'description':'Parent\x20segment\x20with\x20behavioral\x20data','status':a205_0x11bb82(0xdc),'master_table':{'database':'cdp_db','table':'customers'},'behaviors':[{'name':'purchases','table':{'database':a205_0x11bb82(0xa6),'table':a205_0x11bb82(0xca)},'join_key':'customer_id'},{'name':a205_0x11bb82(0xff),'table':{'database':'events_db','table':a205_0x11bb82(0xf3)},'join_key':a205_0x11bb82(0x100)}],'created_at':a205_0x11bb82(0xfd),'updated_at':a205_0x11bb82(0xbf)}},'segment':{'basic':{'id':a205_0x11bb82(0xa9),'name':a205_0x11bb82(0xc8),'description':a205_0x11bb82(0xea),'parent_segment_id':a205_0x11bb82(0x10a),'status':a205_0x11bb82(0xdc),'rules':[{'type':'attribute','field':a205_0x11bb82(0x107),'operator':a205_0x11bb82(0xf4),'value':a205_0x11bb82(0xd6)}],'count':0x1388,'created_at':a205_0x11bb82(0xfd),'updated_at':a205_0x11bb82(0xbf)},'withMultipleRules':{'id':'cs-111222','name':a205_0x11bb82(0xc0),'description':a205_0x11bb82(0xe9),'parent_segment_id':a205_0x11bb82(0x10a),'status':'active','rules':[{'type':'attribute','field':a205_0x11bb82(0x107),'operator':a205_0x11bb82(0xf4),'value':a205_0x11bb82(0xd6)},{'type':'attribute','field':a205_0x11bb82(0xad),'operator':a205_0x11bb82(0xa4),'value':0x3e8}],'count':0x5dc,'created_at':a205_0x11bb82(0xfd),'updated_at':a205_0x11bb82(0xbf)}},'journey':{'basic':{'id':a205_0x11bb82(0xe0),'name':a205_0x11bb82(0xa0),'description':a205_0x11bb82(0xee),'status':a205_0x11bb82(0xb8),'version':0x1,'steps':[{'id':a205_0x11bb82(0xcf),'type':a205_0x11bb82(0xcd),'duration':'1d'},{'id':'step-2','type':a205_0x11bb82(0xde),'activation_id':a205_0x11bb82(0xf5)}],'created_at':'2024-01-01T00:00:00Z','updated_at':'2024-01-15T00:00:00Z'},'withDecision':{'id':a205_0x11bb82(0xa3),'name':'Purchase\x20Reminder','description':'Journey\x20with\x20decision\x20point','status':a205_0x11bb82(0xdc),'version':0x2,'steps':[{'id':a205_0x11bb82(0xcf),'type':'decision_point','segment_id':a205_0x11bb82(0xa9),'yes_path':a205_0x11bb82(0xef),'no_path':a205_0x11bb82(0xfb)},{'id':a205_0x11bb82(0xef),'type':a205_0x11bb82(0xde),'activation_id':'act-email'},{'id':a205_0x11bb82(0xfb),'type':'end'}],'created_at':a205_0x11bb82(0xfd),'updated_at':a205_0x11bb82(0xbf)}},'queryResult':{'basic':{'schema':[{'name':'id','type':'varchar'},{'name':a205_0x11bb82(0xa2),'type':'varchar'},{'name':a205_0x11bb82(0xb9),'type':a205_0x11bb82(0x103)}],'data':[[a205_0x11bb82(0x10b),a205_0x11bb82(0xf1),0x64],['user-2','Bob',0xc8],[a205_0x11bb82(0xe4),a205_0x11bb82(0xd3),0x96]]},'empty':{'schema':[{'name':'id','type':a205_0x11bb82(0xae)},{'name':a205_0x11bb82(0xa2),'type':a205_0x11bb82(0xae)}],'data':[]},'singleRow':{'schema':[{'name':a205_0x11bb82(0xe1),'type':'bigint'}],'data':[[0x2a]]}},'user':{'basic':{'id':0x3039,'name':a205_0x11bb82(0x109),'email':a205_0x11bb82(0xd4),'created_at':'2024-01-01T00:00:00Z','updated_at':a205_0x11bb82(0xbf),'administrator':![]},'admin':{'id':0x1,'name':a205_0x11bb82(0xf0),'email':a205_0x11bb82(0xb5),'created_at':'2023-01-01T00:00:00Z','updated_at':'2024-01-15T00:00:00Z','administrator':!![]}},'job':{'completed':{'job_id':0x75bcd15,'type':a205_0x11bb82(0xc4),'database':a205_0x11bb82(0xd5),'status':a205_0x11bb82(0xd2),'query':a205_0x11bb82(0xb6),'start_at':'2024-01-15T10:00:00Z','end_at':'2024-01-15T10:00:05Z','duration':0x5,'result_size':0x400},'running':{'job_id':0x75bcd16,'type':a205_0x11bb82(0xc4),'database':'test_db','status':a205_0x11bb82(0xa5),'query':a205_0x11bb82(0xba),'start_at':'2024-01-15T10:05:00Z','end_at':null,'duration':null,'result_size':null},'failed':{'job_id':0x75bcd17,'type':a205_0x11bb82(0xc4),'database':'test_db','status':a205_0x11bb82(0xf8),'query':a205_0x11bb82(0xed),'start_at':a205_0x11bb82(0xdf),'end_at':'2024-01-15T10:10:01Z','duration':0x1,'result_size':null,'error':a205_0x11bb82(0xe7)}},'workflow':{'basic':{'id':a205_0x11bb82(0xcc),'name':a205_0x11bb82(0xfc),'project':a205_0x11bb82(0x10d),'revision':a205_0x11bb82(0xb2),'timezone':a205_0x11bb82(0xdd),'schedule':{'cron':a205_0x11bb82(0xfa)}},'withSessions':{'id':a205_0x11bb82(0xe3),'name':a205_0x11bb82(0xb0),'project':a205_0x11bb82(0xb1),'revision':'def456','timezone':'America/Los_Angeles','schedule':{'cron':a205_0x11bb82(0xbd)},'last_session':{'id':'sess-111','status':a205_0x11bb82(0xd2),'started_at':a205_0x11bb82(0xfe),'finished_at':a205_0x11bb82(0xc5)}}},'apiError':{'unauthorized':{'errors':{'error':a205_0x11bb82(0xec),'message':a205_0x11bb82(0xec),'severity':'error','status_code':0x191}},'notFound':{'errors':{'error':a205_0x11bb82(0xdb),'message':a205_0x11bb82(0xaf),'severity':a205_0x11bb82(0xf8),'status_code':0x194}},'rateLimited':{'detail':a205_0x11bb82(0xa7)},'rfc9457':{'type':a205_0x11bb82(0xc2),'title':a205_0x11bb82(0xac),'status':0x193,'detail':a205_0x11bb82(0xb7),'instance':'/v3/database/list'}}};function a205_0x339d(_0x3f1082,_0x40525b){_0x3f1082=_0x3f1082-0xa0;const _0x41480c=a205_0x4148();let _0x339d04=_0x41480c[_0x3f1082];return _0x339d04;}export function createDatabase(_0x4f6ad6){const _0x41ee54=a205_0x11bb82;return{...fixtures[_0x41ee54(0xd7)]['basic'],..._0x4f6ad6};}export function createTable(_0x38e3ef){const _0x2dc101=a205_0x11bb82;return{...fixtures[_0x2dc101(0xa1)][_0x2dc101(0xbe)],..._0x38e3ef};}export function createParentSegment(_0x41df0c){return{...fixtures['parentSegment']['basic'],..._0x41df0c};}export function createSegment(_0x9aeb9f){const _0x124e79=a205_0x11bb82;return{...fixtures['segment'][_0x124e79(0xbe)],..._0x9aeb9f};}export function createJourney(_0x48a438){return{...fixtures['journey']['basic'],..._0x48a438};}export function createQueryResult(_0xec6bc4){const _0x4870ec=a205_0x11bb82;return{...fixtures[_0x4870ec(0x101)][_0x4870ec(0xbe)],..._0xec6bc4};}export function createUser(_0x1cfdba){const _0x5e967a=a205_0x11bb82;return{...fixtures[_0x5e967a(0xab)][_0x5e967a(0xbe)],..._0x1cfdba};}export function createJob(_0x288968){const _0x4a5a3a=a205_0x11bb82;return{...fixtures['job'][_0x4a5a3a(0xb3)],..._0x288968};}export function createWorkflow(_0x486d33){const _0x529dcb=a205_0x11bb82;return{...fixtures['workflow'][_0x529dcb(0xbe)],..._0x486d33};}
|
|
1
|
+
const a205_0x16b376=a205_0x5259;(function(_0x11422b,_0x2b6b82){const _0x2fc4de=a205_0x5259,_0x45b77a=_0x11422b();while(!![]){try{const _0x1d2808=parseInt(_0x2fc4de(0x1bb))/0x1*(-parseInt(_0x2fc4de(0x16a))/0x2)+-parseInt(_0x2fc4de(0x186))/0x3+-parseInt(_0x2fc4de(0x1a2))/0x4*(-parseInt(_0x2fc4de(0x1d7))/0x5)+parseInt(_0x2fc4de(0x1c0))/0x6+parseInt(_0x2fc4de(0x1c6))/0x7+parseInt(_0x2fc4de(0x198))/0x8*(parseInt(_0x2fc4de(0x1d8))/0x9)+parseInt(_0x2fc4de(0x1c8))/0xa*(parseInt(_0x2fc4de(0x1ce))/0xb);if(_0x1d2808===_0x2b6b82)break;else _0x45b77a['push'](_0x45b77a['shift']());}catch(_0x531458){_0x45b77a['push'](_0x45b77a['shift']());}}}(a205_0x2127,0x7fb9b));export const fixtures={'database':{'basic':{'name':a205_0x16b376(0x1b6),'count':0x5,'created_at':a205_0x16b376(0x1d0),'updated_at':a205_0x16b376(0x1d0),'permission':a205_0x16b376(0x1ac)},'withTables':{'name':'production_db','count':0x64,'created_at':a205_0x16b376(0x18b),'updated_at':'2024-01-15T08:00:00Z','permission':a205_0x16b376(0x1a8)}},'table':{'basic':{'id':0x3039,'name':a205_0x16b376(0x1d5),'type':a205_0x16b376(0x1d4),'schema':JSON[a205_0x16b376(0x1b9)]([['id',a205_0x16b376(0x170)],[a205_0x16b376(0x19c),a205_0x16b376(0x197)],[a205_0x16b376(0x1da),a205_0x16b376(0x170)]]),'count':0x3e8,'estimated_storage_size':0x100000,'created_at':a205_0x16b376(0x1d0),'updated_at':a205_0x16b376(0x1d0)},'events':{'id':0x303a,'name':a205_0x16b376(0x1b7),'type':a205_0x16b376(0x1d4),'schema':JSON['stringify']([[a205_0x16b376(0x1ad),'string'],['time','long'],[a205_0x16b376(0x191),a205_0x16b376(0x170)],[a205_0x16b376(0x1ab),a205_0x16b376(0x170)],[a205_0x16b376(0x1cf),a205_0x16b376(0x19b)]]),'count':0xc350,'estimated_storage_size':0x3200000,'created_at':a205_0x16b376(0x1d0),'updated_at':'2024-01-15T12:00:00Z'}},'parentSegment':{'basic':{'id':'ps-123456','name':a205_0x16b376(0x182),'description':a205_0x16b376(0x180),'status':a205_0x16b376(0x1a6),'master_table':{'database':'cdp_db','table':a205_0x16b376(0x181)},'attributes':[{'name':a205_0x16b376(0x1a4),'type':a205_0x16b376(0x170),'key':!![]},{'name':'email','type':a205_0x16b376(0x170)},{'name':'created_at','type':a205_0x16b376(0x171)}],'created_at':a205_0x16b376(0x1d0),'updated_at':a205_0x16b376(0x1bf)},'withBehaviors':{'id':a205_0x16b376(0x1bc),'name':a205_0x16b376(0x1b8),'description':a205_0x16b376(0x1b1),'status':a205_0x16b376(0x1a6),'master_table':{'database':'cdp_db','table':'customers'},'behaviors':[{'name':a205_0x16b376(0x1aa),'table':{'database':a205_0x16b376(0x19f),'table':a205_0x16b376(0x1aa)},'join_key':a205_0x16b376(0x1a4)},{'name':a205_0x16b376(0x187),'table':{'database':a205_0x16b376(0x19f),'table':'pageviews'},'join_key':'customer_id'}],'created_at':a205_0x16b376(0x1d0),'updated_at':'2024-01-15T00:00:00Z'}},'segment':{'basic':{'id':a205_0x16b376(0x184),'name':a205_0x16b376(0x1d9),'description':a205_0x16b376(0x16c),'parent_segment_id':'ps-123456','status':a205_0x16b376(0x1a6),'rules':[{'type':a205_0x16b376(0x1b4),'field':a205_0x16b376(0x16f),'operator':a205_0x16b376(0x1d3),'value':a205_0x16b376(0x17e)}],'count':0x1388,'created_at':'2024-01-01T00:00:00Z','updated_at':'2024-01-15T00:00:00Z'},'withMultipleRules':{'id':a205_0x16b376(0x176),'name':'High\x20Value\x20Active\x20Users','description':'Active\x20users\x20with\x20high\x20lifetime\x20value','parent_segment_id':'ps-123456','status':a205_0x16b376(0x1a6),'rules':[{'type':a205_0x16b376(0x1b4),'field':a205_0x16b376(0x16f),'operator':a205_0x16b376(0x1d3),'value':'30d'},{'type':a205_0x16b376(0x1b4),'field':a205_0x16b376(0x19a),'operator':a205_0x16b376(0x196),'value':0x3e8}],'count':0x5dc,'created_at':a205_0x16b376(0x1d0),'updated_at':'2024-01-15T00:00:00Z'}},'journey':{'basic':{'id':'j-abc123','name':a205_0x16b376(0x1c4),'description':a205_0x16b376(0x1b2),'status':a205_0x16b376(0x173),'version':0x1,'steps':[{'id':'step-1','type':'wait','duration':'1d'},{'id':a205_0x16b376(0x1c9),'type':a205_0x16b376(0x174),'activation_id':a205_0x16b376(0x193)}],'created_at':a205_0x16b376(0x1d0),'updated_at':'2024-01-15T00:00:00Z'},'withDecision':{'id':a205_0x16b376(0x1d6),'name':a205_0x16b376(0x1c1),'description':'Journey\x20with\x20decision\x20point','status':a205_0x16b376(0x1a6),'version':0x2,'steps':[{'id':a205_0x16b376(0x17d),'type':a205_0x16b376(0x189),'segment_id':a205_0x16b376(0x184),'yes_path':a205_0x16b376(0x1c9),'no_path':a205_0x16b376(0x1be)},{'id':a205_0x16b376(0x1c9),'type':a205_0x16b376(0x174),'activation_id':a205_0x16b376(0x1b3)},{'id':a205_0x16b376(0x1be),'type':a205_0x16b376(0x19e)}],'created_at':a205_0x16b376(0x1d0),'updated_at':a205_0x16b376(0x1bf)}},'queryResult':{'basic':{'schema':[{'name':'id','type':'varchar'},{'name':'name','type':a205_0x16b376(0x1ae)},{'name':a205_0x16b376(0x172),'type':'bigint'}],'data':[[a205_0x16b376(0x1ba),a205_0x16b376(0x1c5),0x64],[a205_0x16b376(0x17a),a205_0x16b376(0x183),0xc8],[a205_0x16b376(0x199),a205_0x16b376(0x16b),0x96]]},'empty':{'schema':[{'name':'id','type':'varchar'},{'name':a205_0x16b376(0x1da),'type':'varchar'}],'data':[]},'singleRow':{'schema':[{'name':a205_0x16b376(0x169),'type':a205_0x16b376(0x18e)}],'data':[[0x2a]]}},'user':{'basic':{'id':0x3039,'name':a205_0x16b376(0x195),'email':a205_0x16b376(0x1a0),'created_at':a205_0x16b376(0x1d0),'updated_at':a205_0x16b376(0x1bf),'administrator':![]},'admin':{'id':0x1,'name':'Admin\x20User','email':a205_0x16b376(0x18d),'created_at':a205_0x16b376(0x18c),'updated_at':a205_0x16b376(0x1bf),'administrator':!![]}},'job':{'completed':{'job_id':0x75bcd15,'type':'presto','database':'test_db','status':a205_0x16b376(0x178),'query':a205_0x16b376(0x16e),'start_at':'2024-01-15T10:00:00Z','end_at':a205_0x16b376(0x1af),'duration':0x5,'result_size':0x400},'running':{'job_id':0x75bcd16,'type':'presto','database':a205_0x16b376(0x1b6),'status':a205_0x16b376(0x17f),'query':'SELECT\x20COUNT(*)\x20FROM\x20events','start_at':a205_0x16b376(0x177),'end_at':null,'duration':null,'result_size':null},'failed':{'job_id':0x75bcd17,'type':a205_0x16b376(0x16d),'database':a205_0x16b376(0x1b6),'status':a205_0x16b376(0x18f),'query':a205_0x16b376(0x1b5),'start_at':a205_0x16b376(0x18a),'end_at':a205_0x16b376(0x168),'duration':0x1,'result_size':null,'error':a205_0x16b376(0x192)}},'workflow':{'basic':{'id':a205_0x16b376(0x1a3),'name':'daily_etl','project':a205_0x16b376(0x1cd),'revision':'abc123','timezone':a205_0x16b376(0x1a9),'schedule':{'cron':a205_0x16b376(0x1d1)}},'withSessions':{'id':a205_0x16b376(0x175),'name':'hourly_sync','project':a205_0x16b376(0x1b0),'revision':a205_0x16b376(0x1a5),'timezone':a205_0x16b376(0x188),'schedule':{'cron':a205_0x16b376(0x17b)},'last_session':{'id':a205_0x16b376(0x190),'status':a205_0x16b376(0x178),'started_at':'2024-01-15T09:00:00Z','finished_at':a205_0x16b376(0x1c2)}}},'apiError':{'unauthorized':{'errors':{'error':a205_0x16b376(0x185),'message':a205_0x16b376(0x185),'severity':'error','status_code':0x191}},'notFound':{'errors':{'error':'Resource\x20not\x20found','message':a205_0x16b376(0x19d),'severity':'error','status_code':0x194}},'rateLimited':{'detail':'Rate\x20limit\x20exceeded.\x20Please\x20try\x20again\x20later.'},'rfc9457':{'type':a205_0x16b376(0x1a7),'title':'Forbidden','status':0x193,'detail':a205_0x16b376(0x1cb),'instance':a205_0x16b376(0x1a1)}}};export function createDatabase(_0x401b8c){const _0x73fd09=a205_0x16b376;return{...fixtures[_0x73fd09(0x17c)][_0x73fd09(0x1bd)],..._0x401b8c};}export function createTable(_0x4748c4){const _0x38d15c=a205_0x16b376;return{...fixtures[_0x38d15c(0x194)][_0x38d15c(0x1bd)],..._0x4748c4};}export function createParentSegment(_0x8c466e){return{...fixtures['parentSegment']['basic'],..._0x8c466e};}export function createSegment(_0x48a1ce){const _0x3c4839=a205_0x16b376;return{...fixtures[_0x3c4839(0x1c3)]['basic'],..._0x48a1ce};}export function createJourney(_0x1c44c4){const _0xa8d077=a205_0x16b376;return{...fixtures[_0xa8d077(0x1c7)][_0xa8d077(0x1bd)],..._0x1c44c4};}export function createQueryResult(_0x56eb22){const _0x1a13a4=a205_0x16b376;return{...fixtures[_0x1a13a4(0x1d2)][_0x1a13a4(0x1bd)],..._0x56eb22};}export function createUser(_0x4dc79d){const _0x40d497=a205_0x16b376;return{...fixtures[_0x40d497(0x1cc)]['basic'],..._0x4dc79d};}function a205_0x2127(){const _0x2f479c=['segment','Welcome\x20Journey','Alice','2717540BrVnJS','journey','80ZbCtUv','step-2','completed','You\x20do\x20not\x20have\x20permission\x20to\x20access\x20this\x20resource','user','data_pipeline','248116spwekC','properties','2024-01-01T00:00:00Z','0\x200\x20*\x20*\x20*','queryResult','TimeWithinPast','log','users','j-def456','25moXxzg','645858otFMyr','Active\x20Users','name','2024-01-15T10:10:01Z','total','341302eWQiOI','Charlie','Users\x20active\x20in\x20the\x20last\x2030\x20days','presto','SELECT\x20*\x20FROM\x20users\x20LIMIT\x2010','last_login','string','timestamp','count','draft','activation','wf-67890','cs-111222','2024-01-15T10:05:00Z','success','workflow','user-2','0\x20*\x20*\x20*\x20*','database','step-1','30d','running','A\x20test\x20parent\x20segment\x20for\x20unit\x20tests','unified_customers','Test\x20Parent\x20Segment','Bob','cs-456789','Invalid\x20API\x20key','2397696SpqCgH','page_views','America/Los_Angeles','decision_point','2024-01-15T10:10:00Z','2023-06-15T10:30:00Z','2023-01-01T00:00:00Z','admin@example.com','bigint','error','sess-111','user_id','Table\x20does\x20not\x20exist:\x20nonexistent_table','act-123','table','Test\x20User','Greater','long','96FkKYBW','user-3','lifetime_value','map<string,string>','time','The\x20requested\x20resource\x20does\x20not\x20exist','end','events_db','test@example.com','/v3/database/list','524OgGCeO','wf-12345','customer_id','def456','active','https://api.treasuredata.com/errors/forbidden','full_access','UTC','purchases','event_type','administrator','event_id','varchar','2024-01-15T10:00:05Z','data_sync','Parent\x20segment\x20with\x20behavioral\x20data','Onboarding\x20journey\x20for\x20new\x20users','act-email','attribute','SELECT\x20*\x20FROM\x20nonexistent_table','test_db','events','Customers\x20with\x20Behaviors','stringify','user-1','3AelUyz','ps-789012','basic','step-3','2024-01-15T00:00:00Z','2423286JKniIc','Purchase\x20Reminder','2024-01-15T09:05:00Z'];a205_0x2127=function(){return _0x2f479c;};return a205_0x2127();}function a205_0x5259(_0xee74de,_0x59e416){_0xee74de=_0xee74de-0x168;const _0x212701=a205_0x2127();let _0x52598c=_0x212701[_0xee74de];return _0x52598c;}export function createJob(_0x5dfc0b){const _0x30f6f8=a205_0x16b376;return{...fixtures['job'][_0x30f6f8(0x1ca)],..._0x5dfc0b};}export function createWorkflow(_0x18d879){const _0x4455c1=a205_0x16b376;return{...fixtures[_0x4455c1(0x179)]['basic'],..._0x18d879};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a206_0x15f30a=a206_0x1347;function a206_0x5754(){const _0x5a75ca=['map','getMatchCount','registerWithInspector','No\x20Content','headers','Internal\x20Server\x20Error','isArray','stubs','11rZsVwZ','16644SlUutH','get','9loXfJn','slice','https://api.treasuredata.com/errors/','responder','Forbidden','Unknown','773874FdrutZ','host','description','119QTXGIl','filter','matchCount','simple','stringify','parseRequest','267309jqdSsd','textResponse','\x20registered\x20at:\x0a','split','join','rfc9457','5593060aSfwyC','forEach','Bad\x20Request','35oDzytz','parse','mockImplementation','method','Unprocessable\x20Entity','Unmatched\x20stub','2986616kimUTH','every','entries','stack','body','toLowerCase','register','reset','Request\x20body:\x20','networkError','unnamed\x20stub','createFetch','fail','wasCalled','150158XNJLIu','push','matched','text/plain','fetchMock','searchParams','string','requests','Service\x20Unavailable','\x20\x20(none)','toUpperCase','matcher','errorResponse','getStatusText','jsonResponse','withBody','243028mafBgS','function','test','length','getLastRequest','application/json','url','pathname','REST','getRequests','includes'];a206_0x5754=function(){return _0x5a75ca;};return a206_0x5754();}(function(_0x2057bc,_0x58eeee){const _0x4a7b9d=a206_0x1347,_0x2808e3=_0x2057bc();while(!![]){try{const _0x3c66a9=parseInt(_0x4a7b9d(0x1e8))/0x1+-parseInt(_0x4a7b9d(0x214))/0x2+-parseInt(_0x4a7b9d(0x1cb))/0x3+-parseInt(_0x4a7b9d(0x1f8))/0x4*(-parseInt(_0x4a7b9d(0x1d4))/0x5)+-parseInt(_0x4a7b9d(0x20c))/0x6*(parseInt(_0x4a7b9d(0x1c5))/0x7)+-parseInt(_0x4a7b9d(0x1da))/0x8*(parseInt(_0x4a7b9d(0x20e))/0x9)+-parseInt(_0x4a7b9d(0x1d1))/0xa*(-parseInt(_0x4a7b9d(0x20b))/0xb);if(_0x3c66a9===_0x58eeee)break;else _0x2808e3['push'](_0x2808e3['shift']());}catch(_0x55918d){_0x2808e3['push'](_0x2808e3['shift']());}}}(a206_0x5754,0x3a29e));import{vi}from'vitest';export class HTTPMockRegistry{['stubs']=[];[a206_0x15f30a(0x1ef)]=[];['fetchMock']=null;[a206_0x15f30a(0x200)](_0x90f394,_0x389cc6){return _0x28b271=>{const _0x3af8c3=a206_0x1347;if(_0x28b271['method'][_0x3af8c3(0x1f2)]()!==_0x90f394[_0x3af8c3(0x1f2)]())return![];const _0xf431e=new URL(_0x28b271['url']);if(typeof _0x389cc6==='string')return _0xf431e[_0x3af8c3(0x1ff)]===_0x389cc6||_0xf431e[_0x3af8c3(0x1ff)][_0x3af8c3(0x202)](_0x389cc6);return _0x389cc6[_0x3af8c3(0x1fa)](_0xf431e[_0x3af8c3(0x1ff)]);};}['withQuery'](_0x138604,_0x255fde){return _0x2cd650=>{const _0x593eeb=a206_0x1347;if(!_0x138604(_0x2cd650))return![];const _0x589f57=new URL(_0x2cd650[_0x593eeb(0x1fe)]);return Object['entries'](_0x255fde)[_0x593eeb(0x1db)](([_0xfc9583,_0x422fc9])=>_0x589f57[_0x593eeb(0x1ed)][_0x593eeb(0x20d)](_0xfc9583)===_0x422fc9);};}[a206_0x15f30a(0x1f7)](_0x4e4ece,_0x5e2b8c){return _0x5e5b1a=>{const _0x40dfef=a206_0x1347;if(!_0x4e4ece(_0x5e5b1a))return![];if(typeof _0x5e2b8c===_0x40dfef(0x1f9))return _0x5e2b8c(_0x5e5b1a[_0x40dfef(0x1de)]);return JSON[_0x40dfef(0x1c9)](_0x5e5b1a[_0x40dfef(0x1de)])===JSON[_0x40dfef(0x1c9)](_0x5e2b8c);};}['withHost'](_0x439660,_0x5786b2){return _0x4baadf=>{const _0x7ae4c5=a206_0x1347;if(!_0x439660(_0x4baadf))return![];const _0x6ae28e=new URL(_0x4baadf[_0x7ae4c5(0x1fe)]);return _0x6ae28e[_0x7ae4c5(0x215)]===_0x5786b2;};}[a206_0x15f30a(0x1e0)](_0x15f87c,_0x30d852,_0x319f1e){const _0x5bd1f4=a206_0x15f30a;this[_0x5bd1f4(0x20a)]['push']({'matcher':_0x15f87c,'responder':_0x30d852,'matched':![],'matchCount':0x0,'stack':new Error()[_0x5bd1f4(0x1dd)]??'','description':_0x319f1e?.[_0x5bd1f4(0x216)]});}[a206_0x15f30a(0x205)](_0x33560b,_0x14ab88,_0x221b69){const _0x2915e3=a206_0x15f30a,_0x49c4b5=_0x14fb8a=>{const _0x2e3340=a206_0x1347;return _0x221b69(_0x14fb8a[_0x2e3340(0x1de)],_0x14fb8a),_0x14ab88(_0x14fb8a);};this[_0x2915e3(0x1e0)](_0x33560b,_0x49c4b5);}static[a206_0x15f30a(0x1f6)](_0x47d992,_0xbc1fc8=0xc8){const _0x44f8f2=a206_0x15f30a;return()=>new Response(JSON['stringify'](_0x47d992),{'status':_0xbc1fc8,'headers':{'Content-Type':_0x44f8f2(0x1fd)}});}static[a206_0x15f30a(0x1f4)](_0x22067a,_0x4bd38e,_0x2dee18=a206_0x15f30a(0x1c8)){return()=>{const _0x3240b7=a206_0x1347;let _0xccf6e9;switch(_0x2dee18){case'td-api':_0xccf6e9={'errors':{'error':_0x4bd38e,'message':_0x4bd38e,'severity':'error','status_code':_0x22067a}};break;case _0x3240b7(0x1d0):_0xccf6e9={'type':_0x3240b7(0x210)+_0x22067a,'title':HTTPMockRegistry['getStatusText'](_0x22067a),'status':_0x22067a,'detail':_0x4bd38e};break;default:_0xccf6e9={'error':_0x4bd38e};}return new Response(JSON[_0x3240b7(0x1c9)](_0xccf6e9),{'status':_0x22067a,'headers':{'Content-Type':_0x3240b7(0x1fd)}});};}static['jsonResponseWithHeaders'](_0x58090c,_0x24bec8,_0x214e0b=0xc8){const _0x3d952a=a206_0x15f30a;return()=>new Response(JSON[_0x3d952a(0x1c9)](_0x58090c),{'status':_0x214e0b,'headers':{'Content-Type':_0x3d952a(0x1fd),..._0x24bec8}});}static[a206_0x15f30a(0x1cc)](_0x3c3abc,_0xf8dc55=0xc8){const _0x16d84a=a206_0x15f30a;return()=>new Response(_0x3c3abc,{'status':_0xf8dc55,'headers':{'Content-Type':_0x16d84a(0x1eb)}});}static[a206_0x15f30a(0x1e3)](_0x34e61f){return()=>{throw new Error(_0x34e61f);};}[a206_0x15f30a(0x1e5)](){const _0x49f948=a206_0x15f30a;return this[_0x49f948(0x1ec)]=vi['fn']()[_0x49f948(0x1d6)](async(_0x599ac4,_0x2ae6fb)=>{const _0x41abe9=_0x49f948,_0x3548cc=this[_0x41abe9(0x1ca)](_0x599ac4,_0x2ae6fb);this['requests'][_0x41abe9(0x1e9)](_0x3548cc);for(const _0x48565a of this[_0x41abe9(0x20a)]){if(_0x48565a[_0x41abe9(0x1f3)](_0x3548cc))return _0x48565a[_0x41abe9(0x1ea)]=!![],_0x48565a[_0x41abe9(0x1c7)]++,_0x48565a[_0x41abe9(0x211)](_0x3548cc);}const _0x349647=this[_0x41abe9(0x20a)][_0x41abe9(0x203)]((_0x557e0f,_0x194b4b)=>'\x20\x20'+(_0x194b4b+0x1)+'.\x20'+(_0x557e0f[_0x41abe9(0x216)]??_0x41abe9(0x1e4)))[_0x41abe9(0x1cf)]('\x0a');throw new Error('No\x20stub\x20matched\x20request:\x20'+_0x3548cc[_0x41abe9(0x1d7)]+'\x20'+_0x3548cc['url']+'\x0a'+(_0x41abe9(0x1e2)+JSON['stringify'](_0x3548cc['body'])+'\x0a')+('Registered\x20stubs:\x0a'+(_0x349647||_0x41abe9(0x1f1))));}),this['fetchMock'];}['parseRequest'](_0x391087,_0x272bcf){const _0x326295=a206_0x15f30a,_0x270fd2={};if(_0x272bcf?.[_0x326295(0x207)]){if(_0x272bcf[_0x326295(0x207)]instanceof Headers)_0x272bcf['headers'][_0x326295(0x1d2)]((_0x322120,_0x54d3e9)=>{const _0x1689aa=_0x326295;_0x270fd2[_0x54d3e9[_0x1689aa(0x1df)]()]=_0x322120;});else{if(Array[_0x326295(0x209)](_0x272bcf[_0x326295(0x207)]))for(const [_0x584551,_0x538466]of _0x272bcf[_0x326295(0x207)]){_0x270fd2[_0x584551['toLowerCase']()]=_0x538466;}else for(const [_0x4f8a8c,_0x5d550b]of Object[_0x326295(0x1dc)](_0x272bcf['headers'])){_0x5d550b!==undefined&&(_0x270fd2[_0x4f8a8c[_0x326295(0x1df)]()]=_0x5d550b);}}}let _0x229e50;if(_0x272bcf?.[_0x326295(0x1de)])try{_0x229e50=JSON[_0x326295(0x1d5)](_0x272bcf[_0x326295(0x1de)]);}catch{_0x229e50=_0x272bcf['body'];}return{'method':_0x272bcf?.[_0x326295(0x1d7)]??'GET','url':_0x391087,'headers':_0x270fd2,'body':_0x229e50};}['verify'](_0x5d7728){const _0x42d52d=a206_0x15f30a,_0x9150a3=this[_0x42d52d(0x20a)][_0x42d52d(0x1c6)](_0x2e66b1=>!_0x2e66b1[_0x42d52d(0x1ea)]);if(_0x9150a3[_0x42d52d(0x1fb)]>0x0){const _0x55d110=_0x9150a3[_0x42d52d(0x203)](_0x210571=>{const _0x8a946d=_0x42d52d,_0x4bec63=_0x210571[_0x8a946d(0x216)]?'\x20('+_0x210571['description']+')':'',_0x445075=_0x210571[_0x8a946d(0x1dd)][_0x8a946d(0x1ce)]('\x0a')[_0x8a946d(0x20f)](0x2,0x5)[_0x8a946d(0x1cf)]('\x0a');return _0x8a946d(0x1d9)+_0x4bec63+_0x8a946d(0x1cd)+_0x445075;});_0x5d7728[_0x42d52d(0x1e6)](_0x9150a3[_0x42d52d(0x1fb)]+'\x20stub(s)\x20were\x20not\x20matched:\x0a\x0a'+_0x55d110['join']('\x0a\x0a'));}}[a206_0x15f30a(0x201)](){return[...this['requests']];}[a206_0x15f30a(0x1fc)](){const _0x4bc2de=a206_0x15f30a;return this[_0x4bc2de(0x1ef)][this[_0x4bc2de(0x1ef)][_0x4bc2de(0x1fb)]-0x1];}[a206_0x15f30a(0x1e7)](_0x594808,_0x55a0c4){const _0x338ff9=a206_0x15f30a;return this[_0x338ff9(0x1ef)]['some'](_0x38e7ba=>{const _0x5944f1=_0x338ff9;if(_0x38e7ba[_0x5944f1(0x1d7)][_0x5944f1(0x1f2)]()!==_0x594808[_0x5944f1(0x1f2)]())return![];if(typeof _0x55a0c4===_0x5944f1(0x1ee))return _0x38e7ba[_0x5944f1(0x1fe)]['includes'](_0x55a0c4);return _0x55a0c4[_0x5944f1(0x1fa)](_0x38e7ba[_0x5944f1(0x1fe)]);});}[a206_0x15f30a(0x204)](_0x4bf33){const _0x3b0db7=a206_0x15f30a;return this[_0x3b0db7(0x20a)][_0x4bf33]?.['matchCount']??0x0;}[a206_0x15f30a(0x1e1)](){const _0x2e8f77=a206_0x15f30a;this['stubs']=[],this['requests']=[],this[_0x2e8f77(0x1ec)]=null;}static[a206_0x15f30a(0x1f5)](_0x4d37c4){const _0x40024c=a206_0x15f30a,_0x3880f3={0xc8:'OK',0xc9:'Created',0xcc:_0x40024c(0x206),0x190:_0x40024c(0x1d3),0x191:'Unauthorized',0x193:_0x40024c(0x212),0x194:'Not\x20Found',0x199:'Conflict',0x1a6:_0x40024c(0x1d8),0x1ad:'Too\x20Many\x20Requests',0x1f4:_0x40024c(0x208),0x1f6:'Bad\x20Gateway',0x1f7:_0x40024c(0x1f0)};return _0x3880f3[_0x4d37c4]??_0x40024c(0x213);}}function a206_0x1347(_0x88c172,_0x3655a8){_0x88c172=_0x88c172-0x1c5;const _0x5754d5=a206_0x5754();let _0x13470a=_0x5754d5[_0x88c172];return _0x13470a;}export function createHTTPMock(){return new HTTPMockRegistry();}
|
package/dist/test-utils/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a207_0x4a20(){var _0x48a788=['291923OfqMgJ','8cqziAu','11369248BALRyx','12MaBZEb','12xLWxMS','9PgQZQw','2913455xqVLKa','4032132bgCgWq','6732929pRRJrt','2234336zMRjqt','487590UCIvnF','3ZPNJNr'];a207_0x4a20=function(){return _0x48a788;};return a207_0x4a20();}function a207_0x30fd(_0x37e4cb,_0x331021){_0x37e4cb=_0x37e4cb-0x14d;var _0x4a206d=a207_0x4a20();var _0x30fdf2=_0x4a206d[_0x37e4cb];return _0x30fdf2;}(function(_0x3d956c,_0x2f3e0d){var _0x584af4=a207_0x30fd,_0x47e4c3=_0x3d956c();while(!![]){try{var _0x3821ed=parseInt(_0x584af4(0x14e))/0x1*(parseInt(_0x584af4(0x14f))/0x2)+-parseInt(_0x584af4(0x14d))/0x3*(-parseInt(_0x584af4(0x155))/0x4)+-parseInt(_0x584af4(0x154))/0x5*(parseInt(_0x584af4(0x152))/0x6)+parseInt(_0x584af4(0x156))/0x7+-parseInt(_0x584af4(0x157))/0x8+-parseInt(_0x584af4(0x153))/0x9*(-parseInt(_0x584af4(0x158))/0xa)+-parseInt(_0x584af4(0x150))/0xb*(parseInt(_0x584af4(0x151))/0xc);if(_0x3821ed===_0x2f3e0d)break;else _0x47e4c3['push'](_0x47e4c3['shift']());}catch(_0x45fbf6){_0x47e4c3['push'](_0x47e4c3['shift']());}}}(a207_0x4a20,0xacdf9));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';export{CommandRunner,createCommandRunner}from'./command-runner.js';
|
package/dist/utils/async.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a208_0x4405(_0xb81096,_0x7e1b17){_0xb81096=_0xb81096-0xbf;const _0x2a0f8c=a208_0x2a0f();let _0x440560=_0x2a0f8c[_0xb81096];return _0x440560;}function a208_0x2a0f(){const _0x238ec0=['51160wJKyho','175680yCiQtG','push','length','2915253IBKMEE','30NpWHiU','119cNMCDh','slice','all','1100VVnPcs','269415poFNkw','6afFSVi','909SMmfSo','707499dDFAMS','map','1066608kqPyCO'];a208_0x2a0f=function(){return _0x238ec0;};return a208_0x2a0f();}(function(_0x287adc,_0x2c28cb){const _0x4ac084=a208_0x4405,_0x3ccb41=_0x287adc();while(!![]){try{const _0x42f420=parseInt(_0x4ac084(0xc0))/0x1+parseInt(_0x4ac084(0xbf))/0x2*(-parseInt(_0x4ac084(0xc2))/0x3)+parseInt(_0x4ac084(0xc5))/0x4+parseInt(_0x4ac084(0xc7))/0x5*(parseInt(_0x4ac084(0xc1))/0x6)+parseInt(_0x4ac084(0xcc))/0x7*(-parseInt(_0x4ac084(0xc6))/0x8)+parseInt(_0x4ac084(0xc3))/0x9*(-parseInt(_0x4ac084(0xcb))/0xa)+parseInt(_0x4ac084(0xca))/0xb;if(_0x42f420===_0x2c28cb)break;else _0x3ccb41['push'](_0x3ccb41['shift']());}catch(_0x23082b){_0x3ccb41['push'](_0x3ccb41['shift']());}}}(a208_0x2a0f,0x4f5a4));export async function batchAsync(_0x1b8524,_0x41ebee,_0xce2059=0xa){const _0x14eeef=a208_0x4405,_0x180faa=[];for(let _0x5defdf=0x0;_0x5defdf<_0x1b8524[_0x14eeef(0xc9)];_0x5defdf+=_0xce2059){const _0x2b0ea5=_0x1b8524[_0x14eeef(0xcd)](_0x5defdf,_0x5defdf+_0xce2059),_0x2d2317=await Promise[_0x14eeef(0xce)](_0x2b0ea5[_0x14eeef(0xc4)](_0x41ebee));_0x180faa[_0x14eeef(0xc8)](..._0x2d2317);}return _0x180faa;}
|
package/dist/utils/colors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3d88e5,_0x12dd9d){const _0x192703=a209_0x5d29,_0x310e9e=_0x3d88e5();while(!![]){try{const _0x4f48b0=parseInt(_0x192703(0xb7))/0x1*(-parseInt(_0x192703(0xb5))/0x2)+-parseInt(_0x192703(0xbc))/0x3*(-parseInt(_0x192703(0xac))/0x4)+parseInt(_0x192703(0xad))/0x5*(-parseInt(_0x192703(0xb8))/0x6)+parseInt(_0x192703(0xba))/0x7+parseInt(_0x192703(0xae))/0x8+parseInt(_0x192703(0xaa))/0x9+-parseInt(_0x192703(0xbb))/0xa*(parseInt(_0x192703(0xab))/0xb);if(_0x4f48b0===_0x12dd9d)break;else _0x310e9e['push'](_0x310e9e['shift']());}catch(_0x261820){_0x310e9e['push'](_0x310e9e['shift']());}}}(a209_0x34c3,0x9fb34));import*as a209_0x170eb8 from'chalk';const Chalk=a209_0x170eb8['Chalk'];function a209_0x34c3(){const _0x4d28b8=['string','7971817rrnysL','20siMbsX','1915137Gxzgbs','blue','cyan','isArray','stringify','entries','color','length','yellow','repeat','dim','250128iZNakc','4452712DLboNt','4QEIFdH','10UDktUO','3828416SzxiKR','number','object','noColor','boolean','green','join','4178eaqrop','map','204pgBoSw','1181046yXYCmQ'];a209_0x34c3=function(){return _0x4d28b8;};return a209_0x34c3();}export function shouldUseColor(_0x10b5ad={}){const _0x482caf=a209_0x5d29;if(_0x10b5ad[_0x482caf(0xb1)]===!![])return![];if(_0x10b5ad[_0x482caf(0xa5)]===!![])return!![];if(process.env.NO_COLOR!==undefined)return![];return process['stdout']['isTTY']??![];}export function getChalk(_0x35db8c={}){if(shouldUseColor(_0x35db8c))return new Chalk({'level':0x3});return new Chalk({'level':0x0});}export function colorBorder(_0x844060,_0x5d7c14={}){const _0x14e234=a209_0x5d29;return getChalk(_0x5d7c14)[_0x14e234(0xa9)](_0x844060);}export function colorHeader(_0x364e00,_0x377d54={}){const _0x116d09=a209_0x5d29;return getChalk(_0x377d54)[_0x116d09(0xa1)](_0x364e00);}export function colorType(_0x27aa16,_0x5ca25d={}){return getChalk(_0x5ca25d)['dim'](_0x27aa16);}function a209_0x5d29(_0x48d809,_0x3b6750){_0x48d809=_0x48d809-0xa0;const _0x34c377=a209_0x34c3();let _0x5d29e1=_0x34c377[_0x48d809];return _0x5d29e1;}export function colorJSONKey(_0x176c97,_0x17fc27={}){const _0x2939bc=a209_0x5d29;return getChalk(_0x17fc27)[_0x2939bc(0xa0)](_0x176c97);}export function colorJSONString(_0x5459ba,_0x17a09f={}){const _0x28072f=a209_0x5d29;return getChalk(_0x17a09f)[_0x28072f(0xb3)](_0x5459ba);}export function colorJSONNumber(_0x39835c,_0x61f522={}){const _0x140cd7=a209_0x5d29;return getChalk(_0x61f522)[_0x140cd7(0xa1)](_0x39835c);}export function colorJSONBoolean(_0x282234,_0x2e579c={}){const _0xa0a5e2=a209_0x5d29;return getChalk(_0x2e579c)[_0xa0a5e2(0xa7)](_0x282234);}export function colorJSONNull(_0x568119,_0x1f375a={}){const _0x4ef010=a209_0x5d29;return getChalk(_0x1f375a)[_0x4ef010(0xa9)](_0x568119);}export function colorizeJSONCompact(_0x5d3d2b,_0x5d9ca1={}){const _0x3484ba=a209_0x5d29;if(!shouldUseColor(_0x5d9ca1))return JSON[_0x3484ba(0xa3)](_0x5d3d2b);if(_0x5d3d2b===null)return colorJSONNull('null',_0x5d9ca1);if(typeof _0x5d3d2b===_0x3484ba(0xb2))return colorJSONBoolean(String(_0x5d3d2b),_0x5d9ca1);if(typeof _0x5d3d2b===_0x3484ba(0xaf))return colorJSONNumber(String(_0x5d3d2b),_0x5d9ca1);if(typeof _0x5d3d2b===_0x3484ba(0xb9))return colorJSONString(JSON[_0x3484ba(0xa3)](_0x5d3d2b),_0x5d9ca1);if(Array[_0x3484ba(0xa2)](_0x5d3d2b)){if(_0x5d3d2b['length']===0x0)return'[]';const _0x1c0839=_0x5d3d2b['map'](_0x4cb740=>colorizeJSONCompact(_0x4cb740,_0x5d9ca1));return'['+_0x1c0839[_0x3484ba(0xb4)](',')+']';}if(typeof _0x5d3d2b===_0x3484ba(0xb0)){const _0x9bed5a=Object[_0x3484ba(0xa4)](_0x5d3d2b);if(_0x9bed5a[_0x3484ba(0xa6)]===0x0)return'{}';const _0x2b1abc=_0x9bed5a[_0x3484ba(0xb6)](([_0x198974,_0x39466d])=>{const _0xdd9c0d=_0x3484ba,_0x50efd8=colorJSONKey(JSON[_0xdd9c0d(0xa3)](_0x198974),_0x5d9ca1),_0x35b172=colorizeJSONCompact(_0x39466d,_0x5d9ca1);return _0x50efd8+':'+_0x35b172;});return'{'+_0x2b1abc[_0x3484ba(0xb4)](',')+'}';}return String(_0x5d3d2b);}export function colorizeJSON(_0x24c7da,_0x98d070={},_0x4832f1=0x0){const _0x5a12e1=a209_0x5d29;if(!shouldUseColor(_0x98d070))return JSON['stringify'](_0x24c7da,null,0x2);const _0x6d78a='\x20'['repeat'](_0x4832f1),_0x563d64=_0x4832f1+0x2;if(_0x24c7da===null)return colorJSONNull('null',_0x98d070);if(typeof _0x24c7da===_0x5a12e1(0xb2))return colorJSONBoolean(String(_0x24c7da),_0x98d070);if(typeof _0x24c7da===_0x5a12e1(0xaf))return colorJSONNumber(String(_0x24c7da),_0x98d070);if(typeof _0x24c7da===_0x5a12e1(0xb9))return colorJSONString(JSON['stringify'](_0x24c7da),_0x98d070);if(Array[_0x5a12e1(0xa2)](_0x24c7da)){if(_0x24c7da[_0x5a12e1(0xa6)]===0x0)return'[]';const _0x55af8a=_0x24c7da['map'](_0x4a07e0=>{const _0x2160b6=_0x5a12e1,_0x3e9647=colorizeJSON(_0x4a07e0,_0x98d070,_0x563d64);return''+'\x20'[_0x2160b6(0xa8)](_0x563d64)+_0x3e9647;});return'[\x0a'+_0x55af8a[_0x5a12e1(0xb4)](',\x0a')+('\x0a'+_0x6d78a+']');}if(typeof _0x24c7da==='object'){const _0x24de33=Object['entries'](_0x24c7da);if(_0x24de33[_0x5a12e1(0xa6)]===0x0)return'{}';const _0x8148c5=_0x24de33[_0x5a12e1(0xb6)](([_0x490b62,_0xccb4db])=>{const _0x304655=_0x5a12e1,_0x410d69=colorJSONKey(JSON[_0x304655(0xa3)](_0x490b62),_0x98d070),_0x166ad7=colorizeJSON(_0xccb4db,_0x98d070,_0x563d64);return''+'\x20'[_0x304655(0xa8)](_0x563d64)+_0x410d69+':\x20'+_0x166ad7;});return'{\x0a'+_0x8148c5[_0x5a12e1(0xb4)](',\x0a')+('\x0a'+_0x6d78a+'}');}return String(_0x24c7da);}
|
package/dist/utils/diff.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x215381,_0x3e9949){const _0x3962de=a210_0x41e5,_0x20b8ab=_0x215381();while(!![]){try{const _0x5a9bcd=parseInt(_0x3962de(0x16a))/0x1*(parseInt(_0x3962de(0x165))/0x2)+parseInt(_0x3962de(0x166))/0x3*(-parseInt(_0x3962de(0x15f))/0x4)+parseInt(_0x3962de(0x161))/0x5+-parseInt(_0x3962de(0x163))/0x6+parseInt(_0x3962de(0x17c))/0x7+-parseInt(_0x3962de(0x16c))/0x8+parseInt(_0x3962de(0x15e))/0x9;if(_0x5a9bcd===_0x3e9949)break;else _0x20b8ab['push'](_0x20b8ab['shift']());}catch(_0x405e23){_0x20b8ab['push'](_0x20b8ab['shift']());}}}(a210_0x5d5d,0x72876));function a210_0x5d5d(){const _0x4a3378=['new','content','367982yBfdhf','added','4041752IKzuKD','has','removed','old','join','\x20\x20...','split','\x20+\x20','min','fill','\x20-\x20','red','add','max','repeat','push','1604204dObNyA','padStart','some','map','cyan','dim','6135408RqqQKC','2124092aCNTNL','length','164505IauZoh','unchanged','1046382hRKsMF','unshift','4zdLgly','3SPAWcj','type'];a210_0x5d5d=function(){return _0x4a3378;};return a210_0x5d5d();}function a210_0x41e5(_0x1e37db,_0x8db684){_0x1e37db=_0x1e37db-0x15d;const _0x5d5d89=a210_0x5d5d();let _0x41e5e0=_0x5d5d89[_0x1e37db];return _0x41e5e0;}import a210_0x488589 from'chalk';export function generateDiff(_0x3917ce,_0x202cee){const _0x2eb527=a210_0x41e5,_0x333f5a=_0x3917ce[_0x2eb527(0x172)]('\x0a'),_0x2c02e4=_0x202cee['split']('\x0a'),_0x16a975=[],_0x81e7b0=computeLCS(_0x333f5a,_0x2c02e4);let _0x4454d6=0x0,_0xcf65df=0x0,_0x121af4=0x0;while(_0x4454d6<_0x333f5a[_0x2eb527(0x160)]||_0xcf65df<_0x2c02e4['length']){if(_0x121af4<_0x81e7b0[_0x2eb527(0x160)]&&_0x4454d6<_0x333f5a[_0x2eb527(0x160)]&&_0x333f5a[_0x4454d6]===_0x81e7b0[_0x121af4])_0xcf65df<_0x2c02e4['length']&&_0x2c02e4[_0xcf65df]===_0x81e7b0[_0x121af4]?(_0x16a975[_0x2eb527(0x17b)]({'type':_0x2eb527(0x162),'content':_0x333f5a[_0x4454d6]}),_0x4454d6++,_0xcf65df++,_0x121af4++):(_0x16a975[_0x2eb527(0x17b)]({'type':'added','content':_0x2c02e4[_0xcf65df]}),_0xcf65df++);else{if(_0x121af4<_0x81e7b0[_0x2eb527(0x160)]&&_0xcf65df<_0x2c02e4[_0x2eb527(0x160)]&&_0x2c02e4[_0xcf65df]===_0x81e7b0[_0x121af4])_0x16a975[_0x2eb527(0x17b)]({'type':'removed','content':_0x333f5a[_0x4454d6]}),_0x4454d6++;else{if(_0x4454d6<_0x333f5a['length']&&(_0x121af4>=_0x81e7b0[_0x2eb527(0x160)]||_0x333f5a[_0x4454d6]!==_0x81e7b0[_0x121af4]))_0x16a975[_0x2eb527(0x17b)]({'type':_0x2eb527(0x16e),'content':_0x333f5a[_0x4454d6]}),_0x4454d6++;else _0xcf65df<_0x2c02e4[_0x2eb527(0x160)]&&(_0x16a975[_0x2eb527(0x17b)]({'type':_0x2eb527(0x16b),'content':_0x2c02e4[_0xcf65df]}),_0xcf65df++);}}}return _0x16a975;}function computeLCS(_0xb8d641,_0x298cef){const _0x3b3948=a210_0x41e5,_0x24d6fd=_0xb8d641[_0x3b3948(0x160)],_0x15d768=_0x298cef[_0x3b3948(0x160)],_0x3f2ee1=Array(_0x24d6fd+0x1)[_0x3b3948(0x175)](null)[_0x3b3948(0x17f)](()=>Array(_0x15d768+0x1)[_0x3b3948(0x175)](0x0));for(let _0x175362=0x1;_0x175362<=_0x24d6fd;_0x175362++){for(let _0x4cdbfc=0x1;_0x4cdbfc<=_0x15d768;_0x4cdbfc++){_0xb8d641[_0x175362-0x1]===_0x298cef[_0x4cdbfc-0x1]?_0x3f2ee1[_0x175362][_0x4cdbfc]=_0x3f2ee1[_0x175362-0x1][_0x4cdbfc-0x1]+0x1:_0x3f2ee1[_0x175362][_0x4cdbfc]=Math['max'](_0x3f2ee1[_0x175362-0x1][_0x4cdbfc],_0x3f2ee1[_0x175362][_0x4cdbfc-0x1]);}}const _0x2318f0=[];let _0x5f00cd=_0x24d6fd,_0x530201=_0x15d768;while(_0x5f00cd>0x0&&_0x530201>0x0){if(_0xb8d641[_0x5f00cd-0x1]===_0x298cef[_0x530201-0x1])_0x2318f0[_0x3b3948(0x164)](_0xb8d641[_0x5f00cd-0x1]),_0x5f00cd--,_0x530201--;else _0x3f2ee1[_0x5f00cd-0x1][_0x530201]>_0x3f2ee1[_0x5f00cd][_0x530201-0x1]?_0x5f00cd--:_0x530201--;}return _0x2318f0;}export function formatDiffWithColors(_0x342dd7,_0x2df3a6=0x3){const _0x41d4ee=a210_0x41e5,_0x25b181=new Set();_0x342dd7['forEach']((_0x416ec4,_0x2f663d)=>{const _0x2d3477=a210_0x41e5;_0x416ec4[_0x2d3477(0x167)]!==_0x2d3477(0x162)&&_0x25b181[_0x2d3477(0x178)](_0x2f663d);});if(_0x25b181['size']===0x0)return'';const _0x1e6759=new Set();for(const _0x172271 of _0x25b181){for(let _0x4a0c76=Math[_0x41d4ee(0x179)](0x0,_0x172271-_0x2df3a6);_0x4a0c76<=Math[_0x41d4ee(0x174)](_0x342dd7['length']-0x1,_0x172271+_0x2df3a6);_0x4a0c76++){_0x1e6759[_0x41d4ee(0x178)](_0x4a0c76);}}const _0x40bd3f=[];let _0x12b92e=-0x1;const _0x199f28=_0x342dd7[_0x41d4ee(0x160)],_0x4cc4c9=Math[_0x41d4ee(0x179)](0x3,String(_0x199f28)[_0x41d4ee(0x160)]),_0x26d56d=[];let _0xd72583=0x0,_0x454636=0x0;for(const _0x5a1be1 of _0x342dd7){if(_0x5a1be1[_0x41d4ee(0x167)]===_0x41d4ee(0x16e))_0xd72583++,_0x26d56d[_0x41d4ee(0x17b)]({'old':_0xd72583,'new':0x0});else _0x5a1be1['type']===_0x41d4ee(0x16b)?(_0x454636++,_0x26d56d['push']({'old':0x0,'new':_0x454636})):(_0xd72583++,_0x454636++,_0x26d56d[_0x41d4ee(0x17b)]({'old':_0xd72583,'new':_0x454636}));}for(let _0x1b7542=0x0;_0x1b7542<_0x342dd7[_0x41d4ee(0x160)];_0x1b7542++){if(!_0x1e6759[_0x41d4ee(0x16d)](_0x1b7542))continue;_0x12b92e!==-0x1&&_0x1b7542>_0x12b92e+0x1&&_0x40bd3f[_0x41d4ee(0x17b)](a210_0x488589[_0x41d4ee(0x180)](_0x41d4ee(0x171)));_0x12b92e=_0x1b7542;const _0x25ecdf=_0x342dd7[_0x1b7542],_0x86c30a=_0x26d56d[_0x1b7542],_0x10c4c2=_0x86c30a[_0x41d4ee(0x16f)]>0x0?String(_0x86c30a[_0x41d4ee(0x16f)])[_0x41d4ee(0x17d)](_0x4cc4c9):'\x20'[_0x41d4ee(0x17a)](_0x4cc4c9),_0x53fb6a=_0x86c30a[_0x41d4ee(0x168)]>0x0?String(_0x86c30a[_0x41d4ee(0x168)])['padStart'](_0x4cc4c9):'\x20'[_0x41d4ee(0x17a)](_0x4cc4c9);switch(_0x25ecdf[_0x41d4ee(0x167)]){case'removed':_0x40bd3f[_0x41d4ee(0x17b)](a210_0x488589[_0x41d4ee(0x177)](_0x10c4c2+'\x20'+_0x53fb6a+_0x41d4ee(0x176)+_0x25ecdf[_0x41d4ee(0x169)]));break;case _0x41d4ee(0x16b):_0x40bd3f[_0x41d4ee(0x17b)](a210_0x488589['green'](_0x10c4c2+'\x20'+_0x53fb6a+_0x41d4ee(0x173)+_0x25ecdf[_0x41d4ee(0x169)]));break;default:_0x40bd3f[_0x41d4ee(0x17b)](a210_0x488589[_0x41d4ee(0x15d)](_0x10c4c2+'\x20'+_0x53fb6a+'\x20\x20\x20'+_0x25ecdf[_0x41d4ee(0x169)]));break;}}return _0x40bd3f[_0x41d4ee(0x170)]('\x0a');}export function hasChanges(_0x493437){const _0x4256bb=a210_0x41e5;return _0x493437[_0x4256bb(0x17e)](_0x518ddb=>_0x518ddb[_0x4256bb(0x167)]!==_0x4256bb(0x162));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a211_0x4d94(){const _0x240224=['writeFileSync','mode','8083405UNyMQm','531grzSCA','Warning:\x20','\x20has\x20insecure\x20permissions\x20(','1336wmExRg','statSync','1994956YymLOx','2scyoVt','1496142XKBYIq','dirname','3974814ztNYyj','40430xaaOuq','255681TMOyNk',').\x20','Warning:\x20Could\x20not\x20set\x20secure\x20permissions\x20on\x20','warn','chmodSync','existsSync','mkdirSync','13062KZbuwq','5UtleHN','Should\x20be\x200600\x20or\x20more\x20restrictive.'];a211_0x4d94=function(){return _0x240224;};return a211_0x4d94();}(function(_0x4bcb99,_0x23486b){const _0x3311f2=a211_0x4597,_0xc457e9=_0x4bcb99();while(!![]){try{const _0x261a97=parseInt(_0x3311f2(0x190))/0x1+parseInt(_0x3311f2(0x1a3))/0x2*(parseInt(_0x3311f2(0x18e))/0x3)+-parseInt(_0x3311f2(0x1a2))/0x4+-parseInt(_0x3311f2(0x198))/0x5*(-parseInt(_0x3311f2(0x18c))/0x6)+-parseInt(_0x3311f2(0x197))/0x7*(-parseInt(_0x3311f2(0x1a0))/0x8)+-parseInt(_0x3311f2(0x19d))/0x9*(parseInt(_0x3311f2(0x18f))/0xa)+-parseInt(_0x3311f2(0x19c))/0xb;if(_0x261a97===_0x23486b)break;else _0xc457e9['push'](_0xc457e9['shift']());}catch(_0x14afba){_0xc457e9['push'](_0xc457e9['shift']());}}}(a211_0x4d94,0xa371b));import*as a211_0x4be101 from'node:fs';import*as a211_0x5ef53c from'node:path';export function setSecureFilePermissions(_0x332132){const _0xa78c34=a211_0x4597;try{a211_0x4be101[_0xa78c34(0x194)](_0x332132,0x180);}catch{console[_0xa78c34(0x193)](_0xa78c34(0x192)+_0x332132);}}export function setSecureDirectoryPermissions(_0x51f249){const _0x46d6dc=a211_0x4597;try{a211_0x4be101['chmodSync'](_0x51f249,0x1c0);}catch{console[_0x46d6dc(0x193)](_0x46d6dc(0x192)+_0x51f249);}}export function createSecureDirectory(_0x536c53){const _0x23e0bb=a211_0x4597;!a211_0x4be101[_0x23e0bb(0x195)](_0x536c53)&&(a211_0x4be101[_0x23e0bb(0x196)](_0x536c53,{'recursive':!![],'mode':0x1c0}),setSecureDirectoryPermissions(_0x536c53));}export function validateSecureFilePermissions(_0x58132a){const _0x14aac1=a211_0x4597;try{const _0x4c770c=a211_0x4be101[_0x14aac1(0x1a1)](_0x58132a),_0xc044fa=_0x4c770c[_0x14aac1(0x19b)]&0x1ff,_0x53e66e=(_0xc044fa&0x3f)!==0x0;if(_0x53e66e)return console[_0x14aac1(0x193)](_0x14aac1(0x19e)+_0x58132a+_0x14aac1(0x19f)+_0xc044fa['toString'](0x8)+_0x14aac1(0x191)+_0x14aac1(0x199)),![];return!![];}catch{return!![];}}function a211_0x4597(_0x1d2875,_0x12012c){_0x1d2875=_0x1d2875-0x18c;const _0x4d9498=a211_0x4d94();let _0x459749=_0x4d9498[_0x1d2875];return _0x459749;}export function writeSecureFile(_0x569e11,_0x88f137){const _0x1b2efa=a211_0x4597,_0x1d58d6=a211_0x5ef53c[_0x1b2efa(0x18d)](_0x569e11);createSecureDirectory(_0x1d58d6),a211_0x4be101[_0x1b2efa(0x19a)](_0x569e11,_0x88f137,{'mode':0x180}),setSecureFilePermissions(_0x569e11);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a212_0xdf3a(){const _0x372a26=['11457OoVuHu','38532NWxgsv','code','341361rwWCtm','Permission\x20denied\x20reading\x20file\x20\x27','18804EEMbYP','780bliwBq','ENOENT','500428bgmrph','1351GyeKkJ','message','12wUEKIn','EACCES','14940eprPMd','5291tJryNa','1556FQCLem','490776UrxfBB','utf-8','NOT_FOUND'];a212_0xdf3a=function(){return _0x372a26;};return a212_0xdf3a();}(function(_0x4dc037,_0x159189){const _0x1a25b0=a212_0x3d36,_0x44ed84=_0x4dc037();while(!![]){try{const _0x4699aa=-parseInt(_0x1a25b0(0x15f))/0x1+-parseInt(_0x1a25b0(0x164))/0x2*(-parseInt(_0x1a25b0(0x167))/0x3)+-parseInt(_0x1a25b0(0x16b))/0x4*(parseInt(_0x1a25b0(0x169))/0x5)+-parseInt(_0x1a25b0(0x161))/0x6*(parseInt(_0x1a25b0(0x165))/0x7)+parseInt(_0x1a25b0(0x16c))/0x8+-parseInt(_0x1a25b0(0x16f))/0x9*(-parseInt(_0x1a25b0(0x162))/0xa)+parseInt(_0x1a25b0(0x16a))/0xb*(parseInt(_0x1a25b0(0x15d))/0xc);if(_0x4699aa===_0x159189)break;else _0x44ed84['push'](_0x44ed84['shift']());}catch(_0x545c3b){_0x44ed84['push'](_0x44ed84['shift']());}}}(a212_0xdf3a,0x91db9));import{readFileSync}from'fs';function a212_0x3d36(_0x4d575f,_0x1c1da7){_0x4d575f=_0x4d575f-0x15d;const _0xdf3ac4=a212_0xdf3a();let _0x3d36ec=_0xdf3ac4[_0x4d575f];return _0x3d36ec;}import{SDKError,ErrorCode}from'../sdk/errors.js';export function readFileContent(_0x568335){const _0x20c780=a212_0x3d36;try{return readFileSync(_0x568335,_0x20c780(0x16d));}catch(_0x923155){const _0xaffe9b=_0x923155[_0x20c780(0x15e)];if(_0xaffe9b===_0x20c780(0x163))throw new SDKError(ErrorCode[_0x20c780(0x16e)],'File\x20\x27'+_0x568335+'\x27\x20not\x20found',_0x923155);else{if(_0xaffe9b===_0x20c780(0x168))throw new SDKError(ErrorCode['PERMISSION_DENIED'],_0x20c780(0x160)+_0x568335+'\x27',_0x923155);else throw new SDKError(ErrorCode['INTERNAL'],'Error\x20reading\x20file\x20\x27'+_0x568335+'\x27:\x20'+_0x923155[_0x20c780(0x166)],_0x923155);}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4727c2,_0x5e0772){const _0x558349=a213_0x5a77,_0x5ad265=_0x4727c2();while(!![]){try{const _0x5984a2=-parseInt(_0x558349(0x1e4))/0x1+parseInt(_0x558349(0x1ec))/0x2*(parseInt(_0x558349(0x1d9))/0x3)+parseInt(_0x558349(0x1eb))/0x4*(parseInt(_0x558349(0x1df))/0x5)+-parseInt(_0x558349(0x1ef))/0x6+parseInt(_0x558349(0x1ed))/0x7+parseInt(_0x558349(0x1f4))/0x8*(-parseInt(_0x558349(0x1e0))/0x9)+parseInt(_0x558349(0x1ee))/0xa;if(_0x5984a2===_0x5e0772)break;else _0x5ad265['push'](_0x5ad265['shift']());}catch(_0x2f1705){_0x5ad265['push'](_0x5ad265['shift']());}}}(a213_0x2ef0,0xc58ed));import*as a213_0x38c5a1 from'node:https';const REQUEST_TIMEOUT_MS=0x2710,CACHE_TTL_MS=0x5*0x3c*0x3e8,cache=new Map();function a213_0x5a77(_0x38e05d,_0x1d0099){_0x38e05d=_0x38e05d-0x1d7;const _0x2ef02c=a213_0x2ef0();let _0x5a7779=_0x2ef02c[_0x38e05d];return _0x5a7779;}export function fetchGitHubReleases(_0x3c4bba,_0xfa69d2,_0x561740){const _0x47ebc3=a213_0x5a77,_0x4043a0=_0x3c4bba+'/'+_0xfa69d2,_0x121b3f=cache[_0x47ebc3(0x1e8)](_0x4043a0);if(_0x121b3f&&Date[_0x47ebc3(0x1d7)]()-_0x121b3f[_0x47ebc3(0x1d8)]<CACHE_TTL_MS)return Promise[_0x47ebc3(0x1e2)](_0x121b3f[_0x47ebc3(0x1e7)]);return new Promise((_0x238ae1,_0x1f696b)=>{const _0x13a37e=_0x47ebc3,_0x433049={'hostname':_0x13a37e(0x1f0),'path':_0x13a37e(0x1f3)+_0x3c4bba+'/'+_0xfa69d2+_0x13a37e(0x1e6),'headers':{'User-Agent':_0x561740,'Accept':_0x13a37e(0x1de)},'timeout':REQUEST_TIMEOUT_MS},_0x49d2b8=a213_0x38c5a1[_0x13a37e(0x1e8)](_0x433049,_0x1dc533=>{const _0x8e33b1=_0x13a37e;let _0x270df0='';_0x1dc533['on'](_0x8e33b1(0x1e9),_0x359259=>{const _0x2e6025=_0x8e33b1;_0x270df0+=_0x359259[_0x2e6025(0x1f1)]();}),_0x1dc533['on'](_0x8e33b1(0x1f2),()=>{const _0x16a24f=_0x8e33b1;if(_0x1dc533[_0x16a24f(0x1e5)]!==0xc8){_0x1f696b(new Error('GitHub\x20API\x20returned\x20'+_0x1dc533[_0x16a24f(0x1e5)]+':\x20'+_0x270df0[_0x16a24f(0x1db)](0x0,0xc8)));return;}try{const _0x2b2e54=JSON[_0x16a24f(0x1ea)](_0x270df0);cache[_0x16a24f(0x1e3)](_0x4043a0,{'releases':_0x2b2e54,'fetchedAt':Date[_0x16a24f(0x1d7)]()}),_0x238ae1(_0x2b2e54);}catch(_0x3f08a3){_0x1f696b(_0x3f08a3);}});});_0x49d2b8['on']('timeout',()=>{const _0x40a0e5=_0x13a37e;_0x49d2b8[_0x40a0e5(0x1e1)](),_0x1f696b(new Error(_0x40a0e5(0x1f6)+REQUEST_TIMEOUT_MS+'ms'));}),_0x49d2b8['on']('error',_0x1f696b);});}function a213_0x2ef0(){const _0x5a0abd=['1233WVQoMV','destroy','resolve','set','1004733ewxHop','statusCode','/releases?per_page=20','releases','get','data','parse','284236LCcbKi','2vtchFE','1238209AcMYAb','26350900gVGKTY','9450774HpqKuh','api.github.com','toString','end','/repos/','88176LPSfsF','next','GitHub\x20API\x20request\x20timed\x20out\x20after\x20','now','fetchedAt','4769049uvJtas','find','slice','tag_name','prerelease','application/vnd.github+json','35cCastJ'];a213_0x2ef0=function(){return _0x5a0abd;};return a213_0x2ef0();}export async function resolveReleaseTag(_0x23aff7,_0x215ed9,_0xa32782,_0x5eeb02){const _0x1d5df6=a213_0x5a77,_0x25c17e=await fetchGitHubReleases(_0x215ed9,_0xa32782,_0x5eeb02);if(_0x25c17e['length']===0x0)return null;if(_0x23aff7===_0x1d5df6(0x1f5))return _0x25c17e[0x0][_0x1d5df6(0x1dc)];const _0x5bf656=_0x25c17e[_0x1d5df6(0x1da)](_0xd9cf30=>!_0xd9cf30[_0x1d5df6(0x1dd)]);return _0x5bf656?_0x5bf656[_0x1d5df6(0x1dc)]:null;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4d393b,_0x51e52f){const _0x26c45d=a214_0x2860,_0x56129c=_0x4d393b();while(!![]){try{const _0x393136=-parseInt(_0x26c45d(0xcf))/0x1+-parseInt(_0x26c45d(0xd3))/0x2*(parseInt(_0x26c45d(0xc2))/0x3)+-parseInt(_0x26c45d(0xd7))/0x4+-parseInt(_0x26c45d(0xc0))/0x5+parseInt(_0x26c45d(0xd2))/0x6*(-parseInt(_0x26c45d(0xc1))/0x7)+-parseInt(_0x26c45d(0xcd))/0x8*(-parseInt(_0x26c45d(0xd1))/0x9)+-parseInt(_0x26c45d(0xcc))/0xa*(-parseInt(_0x26c45d(0xd0))/0xb);if(_0x393136===_0x51e52f)break;else _0x56129c['push'](_0x56129c['shift']());}catch(_0x40e5a3){_0x56129c['push'](_0x56129c['shift']());}}}(a214_0x37d6,0xa1d4e));import{existsSync,mkdirSync,readFileSync,writeFileSync,unlinkSync}from'fs';import{join}from'path';import{homedir}from'os';export function getGlobalCacheDir(){const _0x29002a=a214_0x2860;return process.env.TDX_CACHE_DIR||join(homedir(),_0x29002a(0xc3),_0x29002a(0xc6));}function a214_0x37d6(){const _0x5dd3a9=['2425913GLcDhR','97611UWKUWQ','.cache','{profile}','set','tdx','clear','trim','replace','\x22\x20already\x20registered\x20by\x20\x22','utf-8','494290KXrQCU','88zkgrDX','Global\x20cache\x20key\x20\x22','60708hICpfE','473fdvIvz','660969tNuqHL','6yowwkY','26hSLtwt','stringify','parse','\x22,\x20cannot\x20register\x20for\x20\x22','3509980jHsDkV','default','get','2813465uMGqFt'];a214_0x37d6=function(){return _0x5dd3a9;};return a214_0x37d6();}const registry=new Map();export function registerGlobalCacheKey(_0x1a2e7b,_0x189df9){const _0x36120b=a214_0x2860,_0x2fab88=registry[_0x36120b(0xbf)](_0x1a2e7b);if(_0x2fab88&&_0x2fab88!==_0x189df9)throw new Error(_0x36120b(0xce)+_0x1a2e7b+_0x36120b(0xca)+_0x2fab88+_0x36120b(0xd6)+_0x189df9+'\x22');registry[_0x36120b(0xc5)](_0x1a2e7b,_0x189df9);}function a214_0x2860(_0x5251c6,_0x38c000){_0x5251c6=_0x5251c6-0xbe;const _0x37d69f=a214_0x37d6();let _0x2860cf=_0x37d69f[_0x5251c6];return _0x2860cf;}export function getGlobalCachePath(_0x30c013){return join(getGlobalCacheDir(),_0x30c013);}function ensureGlobalCacheDir(){const _0xbd336f=getGlobalCacheDir();!existsSync(_0xbd336f)&&mkdirSync(_0xbd336f,{'recursive':!![]});}function readCacheJson(_0x5bd99c){const _0x2091b3=a214_0x2860,_0x59b1e2=getGlobalCachePath(_0x5bd99c);if(!existsSync(_0x59b1e2))return undefined;try{const _0x21b74f=readFileSync(_0x59b1e2,_0x2091b3(0xcb));return JSON[_0x2091b3(0xd5)](_0x21b74f);}catch{return undefined;}}function writeCacheJson(_0x4036ec,_0x11f180){const _0x515d39=a214_0x2860;ensureGlobalCacheDir(),writeFileSync(getGlobalCachePath(_0x4036ec),JSON[_0x515d39(0xd4)](_0x11f180,null,0x2),_0x515d39(0xcb));}function readCacheText(_0x4173d1){const _0x39c614=a214_0x2860,_0x4498fb=getGlobalCachePath(_0x4173d1);if(!existsSync(_0x4498fb))return undefined;try{return readFileSync(_0x4498fb,_0x39c614(0xcb));}catch{return undefined;}}function writeCacheText(_0x252b0c,_0x39ae1f){ensureGlobalCacheDir(),writeFileSync(getGlobalCachePath(_0x252b0c),_0x39ae1f,'utf-8');}function clearCache(_0x4a4a63){const _0x2eab35=getGlobalCachePath(_0x4a4a63);if(existsSync(_0x2eab35))try{unlinkSync(_0x2eab35);}catch{}}function cacheExists(_0x292982){return existsSync(getGlobalCachePath(_0x292982));}export function createGlobalCache(_0x171a37,_0xb9ecfa){return registerGlobalCacheKey(_0x171a37,_0xb9ecfa),{'read':()=>readCacheJson(_0x171a37),'write':_0x1c0627=>writeCacheJson(_0x171a37,_0x1c0627),'clear':()=>clearCache(_0x171a37),'exists':()=>cacheExists(_0x171a37),'path':()=>getGlobalCachePath(_0x171a37)};}export function createGlobalTextCache(_0x5080e1,_0x5eaf52){const _0x4e4ce1=a214_0x2860;return registerGlobalCacheKey(_0x5080e1,_0x5eaf52),{'read':()=>readCacheText(_0x5080e1)?.[_0x4e4ce1(0xc8)]()||undefined,'write':_0x277391=>writeCacheText(_0x5080e1,_0x277391),'clear':()=>clearCache(_0x5080e1),'exists':()=>cacheExists(_0x5080e1),'path':()=>getGlobalCachePath(_0x5080e1)};}export function createProfileCache(_0x152bf3,_0x57549c){const _0x36bbc0=_0x5c8cff=>{const _0x2eaad3=a214_0x2860,_0x209fd9=_0x5c8cff||_0x2eaad3(0xbe);return _0x152bf3[_0x2eaad3(0xc9)](_0x2eaad3(0xc4),_0x209fd9);};return{'read':_0x1c9e5f=>{const _0x2d22ef=_0x36bbc0(_0x1c9e5f);return registerGlobalCacheKey(_0x2d22ef,_0x57549c),readCacheJson(_0x2d22ef);},'write':(_0x42afbf,_0x46707e)=>{const _0x27bc1a=_0x36bbc0(_0x42afbf);registerGlobalCacheKey(_0x27bc1a,_0x57549c),writeCacheJson(_0x27bc1a,_0x46707e);},'clear':_0x361f10=>{const _0x5d2627=_0x36bbc0(_0x361f10);clearCache(_0x5d2627);},'exists':_0xfcd793=>{const _0x2cf6ab=_0x36bbc0(_0xfcd793);return cacheExists(_0x2cf6ab);},'path':_0x3f3cc0=>{const _0x58f3c3=_0x36bbc0(_0x3f3cc0);return getGlobalCachePath(_0x58f3c3);}};}export function createOptionalProfileCache(_0x41cdb8,_0x22602e,_0x219f60={}){const {profileSeparator:profileSeparator='.',suffix:suffix=''}=_0x219f60,_0x14f34e=_0x2e3650=>{return _0x2e3650?''+_0x41cdb8+profileSeparator+_0x2e3650+suffix:''+_0x41cdb8+suffix;};return{'read':_0x2dd880=>{const _0x1aa2c0=_0x14f34e(_0x2dd880);return registerGlobalCacheKey(_0x1aa2c0,_0x22602e),readCacheJson(_0x1aa2c0);},'write':(_0xb26569,_0x32774b)=>{const _0x53e653=_0x14f34e(_0x32774b);registerGlobalCacheKey(_0x53e653,_0x22602e),writeCacheJson(_0x53e653,_0xb26569);},'clear':_0x15b480=>{const _0x42a18a=_0x14f34e(_0x15b480);clearCache(_0x42a18a);},'exists':_0x269330=>{const _0x3875f9=_0x14f34e(_0x269330);return cacheExists(_0x3875f9);},'path':_0x2e2faf=>{const _0x4f15d0=_0x14f34e(_0x2e2faf);return getGlobalCachePath(_0x4f15d0);}};}export function clearGlobalRegistry(){const _0x3580b6=a214_0x2860;registry[_0x3580b6(0xc7)]();}
|