@treasuredata/tdx 2026.3.25 → 2026.3.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-login-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.d.ts.map +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/oauth.js.map +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.d.ts +5 -0
- package/dist/sdk/segment.d.ts.map +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/segment.js.map +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
package/dist/sdk/util/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x224cdf,_0x157cf2){var _0x1ad375=a175_0x4b04,_0xef924c=_0x224cdf();while(!![]){try{var _0x1fcb0e=-parseInt(_0x1ad375(0x191))/0x1+parseInt(_0x1ad375(0x192))/0x2+parseInt(_0x1ad375(0x195))/0x3+parseInt(_0x1ad375(0x190))/0x4*(parseInt(_0x1ad375(0x18e))/0x5)+parseInt(_0x1ad375(0x196))/0x6*(parseInt(_0x1ad375(0x193))/0x7)+-parseInt(_0x1ad375(0x18f))/0x8+-parseInt(_0x1ad375(0x194))/0x9;if(_0x1fcb0e===_0x157cf2)break;else _0xef924c['push'](_0xef924c['shift']());}catch(_0x4dc164){_0xef924c['push'](_0xef924c['shift']());}}}(a175_0x38f2,0xa10a2));function a175_0x4b04(_0x296b9c,_0x487d07){_0x296b9c=_0x296b9c-0x18e;var _0x38f237=a175_0x38f2();var _0x4b0453=_0x38f237[_0x296b9c];return _0x4b0453;}export*from'./formatters.js';function a175_0x38f2(){var _0x4cf937=['876376dChRgf','4DEatwY','330664gPCxjJ','1536212KySGGj','7SVjrVx','23090301zKxLhi','3691878sFwWal','6523806vLyMpp','2896925QcWuAS'];a175_0x38f2=function(){return _0x4cf937;};return a175_0x38f2();}export*from'./format-detector.js';export*from'./tree-formatter.js';export*from'./paginate.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xe0d55e,_0x33635d){const _0x8a85b5=a176_0x16d0,_0x452df=_0xe0d55e();while(!![]){try{const _0x3310cb=-parseInt(_0x8a85b5(0x1ce))/0x1*(parseInt(_0x8a85b5(0x1cf))/0x2)+-parseInt(_0x8a85b5(0x1d0))/0x3+parseInt(_0x8a85b5(0x1d1))/0x4*(parseInt(_0x8a85b5(0x1cd))/0x5)+-parseInt(_0x8a85b5(0x1ca))/0x6+parseInt(_0x8a85b5(0x1cc))/0x7*(parseInt(_0x8a85b5(0x1d2))/0x8)+parseInt(_0x8a85b5(0x1cb))/0x9+-parseInt(_0x8a85b5(0x1d3))/0xa*(-parseInt(_0x8a85b5(0x1c6))/0xb);if(_0x3310cb===_0x33635d)break;else _0x452df['push'](_0x452df['shift']());}catch(_0x39b268){_0x452df['push'](_0x452df['shift']());}}}(a176_0x7415,0x72d65));export const PAGE_SIZE=0x64;function a176_0x7415(){const _0x410448=['5XmglTu','7ZeSfSM','154802hBduSC','1833417UcjtMQ','1465196ErGEiV','8SZwYOV','250OwpXLJ','push','length','164362AeWFBH','min','isArray','data','4146348DWkTPf','7260273uaeXKx','5374817eytBDs'];a176_0x7415=function(){return _0x410448;};return a176_0x7415();}export const MAX_PAGINATION_LIMIT=0x2710;function a176_0x16d0(_0x4d07b9,_0x414a3a){_0x4d07b9=_0x4d07b9-0x1c6;const _0x741504=a176_0x7415();let _0x16d03f=_0x741504[_0x4d07b9];return _0x16d03f;}export async function paginate(_0x33bca7,_0x4f498c=MAX_PAGINATION_LIMIT,_0x10c920=0x0){const _0x586956=a176_0x16d0,_0x523199=Math[_0x586956(0x1c7)](_0x4f498c,MAX_PAGINATION_LIMIT),_0x5281de=[];let _0xe23cc8=_0x10c920;while(_0x5281de['length']<_0x523199){const _0x24abf0=Math[_0x586956(0x1c7)](PAGE_SIZE,_0x523199-_0x5281de['length']),_0x5641ac=await _0x33bca7(_0x24abf0,_0xe23cc8),_0x5b011c=Array[_0x586956(0x1c8)](_0x5641ac[_0x586956(0x1c9)])?_0x5641ac['data']:[_0x5641ac[_0x586956(0x1c9)]];_0x5281de[_0x586956(0x1d4)](..._0x5b011c);if(_0x5b011c[_0x586956(0x1d5)]<_0x24abf0)break;_0xe23cc8+=_0x24abf0;}return _0x5281de['length']>_0x523199?_0x5281de['slice'](0x0,_0x523199):_0x5281de;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xca2c04,_0x7abcbd){const _0x4e25bd=a177_0x5510,_0x859434=_0xca2c04();while(!![]){try{const _0x57c833=parseInt(_0x4e25bd(0x168))/0x1+parseInt(_0x4e25bd(0x18a))/0x2*(-parseInt(_0x4e25bd(0x18b))/0x3)+-parseInt(_0x4e25bd(0x166))/0x4*(-parseInt(_0x4e25bd(0x189))/0x5)+parseInt(_0x4e25bd(0x186))/0x6+-parseInt(_0x4e25bd(0x179))/0x7+-parseInt(_0x4e25bd(0x180))/0x8*(-parseInt(_0x4e25bd(0x16f))/0x9)+-parseInt(_0x4e25bd(0x17a))/0xa;if(_0x57c833===_0x7abcbd)break;else _0x859434['push'](_0x859434['shift']());}catch(_0x5e8da3){_0x859434['push'](_0x859434['shift']());}}}(a177_0x55a7,0xe8485));function a177_0x55a7(){const _0x2c7bee=['600fprHXd','paused','1324653QkraqK','launched','localeCompare','push','🗺️','icon','sortKey','9xcEXrU','journeyCount','population','state','indent','\x20segment','showMetadata','🎯\x20','└──\x20','metadata','6158712fCShiL','12999630zUHlBW','map','dim','\x20\x20\x20\x20','name','segment','550232YYHvSs','journey','children','type','(running)','getJourneyUrl','5145012qoLPpe','showIcons','folderCount','55435YxNENa','2ZwzXkG','2348328qHDtzR','showTreeLines','journeyBundleName','sort','\x20\x20\x20','(paused)','folder','segmentCount','displayName','length','draft','completed','join','getSegmentUrl'];a177_0x55a7=function(){return _0x2c7bee;};return a177_0x55a7();}function a177_0x5510(_0x1fb9b6,_0xc5e0e6){_0x1fb9b6=_0x1fb9b6-0x15f;const _0x55a7ee=a177_0x55a7();let _0x5510da=_0x55a7ee[_0x1fb9b6];return _0x5510da;}import{formatRows,hyperlink}from'./formatters.js';import a177_0x2d2eb2 from'chalk';const DEFAULT_OPTIONS={'showTreeLines':!![],'showIcons':!![],'showMetadata':!![],'indent':'\x20\x20','getSegmentUrl':undefined,'getJourneyUrl':undefined};export function formatTree(_0x2afc4f,_0x2f11b5={},_0xcdefb8=0x0,_0x19f6dd=''){const _0x217768=a177_0x5510,_0x4bc193={...DEFAULT_OPTIONS,..._0x2f11b5},_0x21d196=[],_0x11961e=[..._0x2afc4f][_0x217768(0x18e)]((_0x531ff9,_0x311e97)=>_0x531ff9['name'][_0x217768(0x16a)](_0x311e97[_0x217768(0x17e)],undefined,{'sensitivity':'base'}));for(let _0x1a8159=0x0;_0x1a8159<_0x11961e['length'];_0x1a8159++){const _0x48f5e0=_0x11961e[_0x1a8159],_0x5efbcd=_0x1a8159===_0x11961e[_0x217768(0x161)]-0x1;let _0x8779d6='';_0xcdefb8>0x0&&(_0x8779d6+=_0x19f6dd);_0x4bc193['showTreeLines']&&_0xcdefb8>0x0&&(_0x8779d6+=a177_0x2d2eb2[_0x217768(0x17c)](_0x5efbcd?_0x217768(0x177):'├──\x20'));if(_0x4bc193[_0x217768(0x187)]){if(_0x48f5e0[_0x217768(0x183)]==='folder')_0x8779d6+='📁\x20';else _0x48f5e0[_0x217768(0x183)]===_0x217768(0x181)?_0x8779d6+='🗺️\x20':_0x8779d6+=_0x217768(0x176);}if(_0x4bc193[_0x217768(0x165)]&&_0x48f5e0[_0x217768(0x183)]==='segment')_0x8779d6+=hyperlink(_0x48f5e0['name'],_0x4bc193[_0x217768(0x165)](_0x48f5e0['id']));else _0x4bc193[_0x217768(0x185)]&&_0x48f5e0['type']==='journey'?_0x8779d6+=hyperlink(_0x48f5e0['name'],_0x4bc193[_0x217768(0x185)](_0x48f5e0['id'])):_0x8779d6+=_0x48f5e0[_0x217768(0x17e)];if(_0x4bc193[_0x217768(0x175)]){if(_0x48f5e0[_0x217768(0x183)]===_0x217768(0x191)){const _0x5ac144=[];_0x48f5e0[_0x217768(0x178)][_0x217768(0x15f)]&&_0x5ac144[_0x217768(0x16b)](_0x48f5e0[_0x217768(0x178)]['segmentCount']+_0x217768(0x174)+(_0x48f5e0[_0x217768(0x178)][_0x217768(0x15f)]!==0x1?'s':'')),_0x48f5e0[_0x217768(0x178)][_0x217768(0x188)]&&_0x5ac144['push'](_0x48f5e0[_0x217768(0x178)]['folderCount']+'\x20folder'+(_0x48f5e0[_0x217768(0x178)][_0x217768(0x188)]!==0x1?'s':'')),_0x48f5e0[_0x217768(0x178)][_0x217768(0x170)]&&_0x5ac144[_0x217768(0x16b)](_0x48f5e0[_0x217768(0x178)][_0x217768(0x170)]+'\x20journey'+(_0x48f5e0[_0x217768(0x178)][_0x217768(0x170)]!==0x1?'s':'')),_0x5ac144[_0x217768(0x161)]>0x0&&(_0x8779d6+=a177_0x2d2eb2[_0x217768(0x17c)]('\x20('+_0x5ac144[_0x217768(0x164)](',\x20')+')'));}else{if(_0x48f5e0[_0x217768(0x183)]===_0x217768(0x17f)&&_0x48f5e0[_0x217768(0x171)]!==undefined)_0x8779d6+=a177_0x2d2eb2[_0x217768(0x17c)]('\x20('+formatRows(_0x48f5e0[_0x217768(0x171)])+')');else _0x48f5e0[_0x217768(0x183)]===_0x217768(0x181)&&_0x48f5e0[_0x217768(0x172)]&&(_0x8779d6+=a177_0x2d2eb2[_0x217768(0x17c)]('\x20'+getJourneyStateIndicator(_0x48f5e0[_0x217768(0x172)])));}}_0x21d196[_0x217768(0x16b)](_0x8779d6);if(_0x48f5e0[_0x217768(0x182)]&&_0x48f5e0[_0x217768(0x182)][_0x217768(0x161)]>0x0){let _0x490f37;if(_0xcdefb8===0x0)_0x490f37='';else _0x4bc193[_0x217768(0x18c)]?_0x490f37=_0x19f6dd+(_0x5efbcd?_0x217768(0x17d):a177_0x2d2eb2[_0x217768(0x17c)]('│')+_0x217768(0x18f)):_0x490f37=_0x19f6dd+_0x4bc193[_0x217768(0x173)];const _0x28b154=formatTree(_0x48f5e0[_0x217768(0x182)],_0x4bc193,_0xcdefb8+0x1,_0x490f37);_0x21d196[_0x217768(0x16b)](_0x28b154);}}return _0x21d196[_0x217768(0x164)]('\x0a');}export function formatFlatList(_0x19d8c0,_0x4fb0bc,_0x16a517={},_0x32ea86=[]){const _0x5493cc=a177_0x5510,_0x4bca1b={...DEFAULT_OPTIONS,..._0x16a517},_0x2aeb13=[];for(const _0x45a477 of _0x19d8c0){_0x2aeb13['push']({'sortKey':_0x45a477[_0x5493cc(0x17e)],'displayName':_0x45a477[_0x5493cc(0x17e)],'icon':_0x4bca1b['showIcons']?'📁':'','metadata':undefined});}for(const _0x306a7b of _0x4fb0bc){const _0x1e9937=_0x4bca1b[_0x5493cc(0x175)]&&_0x306a7b[_0x5493cc(0x171)]!==undefined?a177_0x2d2eb2[_0x5493cc(0x17c)]('\x20('+formatRows(_0x306a7b[_0x5493cc(0x171)])+')'):'',_0x341d76=_0x4bca1b['getSegmentUrl']?hyperlink(_0x306a7b[_0x5493cc(0x17e)],_0x4bca1b[_0x5493cc(0x165)](_0x306a7b['id'])):_0x306a7b[_0x5493cc(0x17e)];_0x2aeb13[_0x5493cc(0x16b)]({'sortKey':_0x306a7b[_0x5493cc(0x17e)],'displayName':_0x341d76,'icon':_0x4bca1b[_0x5493cc(0x187)]?'🎯':'','metadata':_0x1e9937});}for(const _0x1cd9bd of _0x32ea86){const _0x446676=getJourneyStateIndicator(_0x1cd9bd[_0x5493cc(0x172)]),_0x378d74=_0x4bca1b[_0x5493cc(0x175)]?a177_0x2d2eb2['dim']('\x20'+_0x446676):'',_0x5db5a6=_0x4bca1b[_0x5493cc(0x185)]?hyperlink(_0x1cd9bd[_0x5493cc(0x18d)],_0x4bca1b[_0x5493cc(0x185)](_0x1cd9bd['id'])):_0x1cd9bd[_0x5493cc(0x18d)];_0x2aeb13[_0x5493cc(0x16b)]({'sortKey':_0x1cd9bd[_0x5493cc(0x18d)],'displayName':_0x5db5a6,'icon':_0x4bca1b[_0x5493cc(0x187)]?_0x5493cc(0x16c):'','metadata':_0x378d74});}_0x2aeb13['sort']((_0x312d91,_0x2e485c)=>_0x312d91['sortKey'][_0x5493cc(0x16a)](_0x2e485c[_0x5493cc(0x16e)],undefined,{'sensitivity':'base'}));if(_0x2aeb13[_0x5493cc(0x161)]===0x0)return'(empty)';const _0x49a1f6=_0x2aeb13[_0x5493cc(0x17b)](_0x16289f=>{const _0x23ec36=_0x5493cc,_0x1dfb9c=_0x16289f[_0x23ec36(0x16d)]?_0x16289f[_0x23ec36(0x16d)]+'\x20':'',_0x1ec45a=_0x16289f[_0x23ec36(0x178)]||'';return''+_0x1dfb9c+_0x16289f[_0x23ec36(0x160)]+_0x1ec45a;});return _0x49a1f6[_0x5493cc(0x164)]('\x0a');}function getJourneyStateIndicator(_0x44c2fa){const _0xf4e2f6=a177_0x5510;switch(_0x44c2fa){case _0xf4e2f6(0x162):return'(draft)';case _0xf4e2f6(0x169):return _0xf4e2f6(0x184);case _0xf4e2f6(0x167):return _0xf4e2f6(0x190);case _0xf4e2f6(0x163):return'(completed)';default:return'('+_0x44c2fa+')';}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a178_0x1c80eb=a178_0x5a26;(function(_0x4cddb1,_0x2fef4e){const _0x3c58db=a178_0x5a26,_0x47b5ba=_0x4cddb1();while(!![]){try{const _0x13eff8=parseInt(_0x3c58db(0x134))/0x1*(parseInt(_0x3c58db(0x12f))/0x2)+parseInt(_0x3c58db(0x11a))/0x3*(-parseInt(_0x3c58db(0x12a))/0x4)+parseInt(_0x3c58db(0x11e))/0x5*(-parseInt(_0x3c58db(0x125))/0x6)+-parseInt(_0x3c58db(0x11d))/0x7*(-parseInt(_0x3c58db(0x120))/0x8)+parseInt(_0x3c58db(0x12d))/0x9*(-parseInt(_0x3c58db(0x138))/0xa)+-parseInt(_0x3c58db(0x11c))/0xb*(parseInt(_0x3c58db(0x130))/0xc)+parseInt(_0x3c58db(0x129))/0xd;if(_0x13eff8===_0x2fef4e)break;else _0x47b5ba['push'](_0x47b5ba['shift']());}catch(_0x16a0d4){_0x47b5ba['push'](_0x47b5ba['shift']());}}}(a178_0x5044,0xad4db));function a178_0x5044(){const _0x576213=['...','split','error','2010DLOqri','trim','(empty\x20response)','WORKFLOW_ARCHIVE_CORRUPTED','41416960ZsbLDG','16dHuxGt','helpText','utf-8','9FoWzUD','charCodeAt','6YmhEnd','7548DIquKK','slice','subarray','The\x20server\x20may\x20have\x20returned\x20an\x20error\x20page\x20instead\x20of\x20the\x20archive.\x20Try\x20pushing\x20a\x20new\x20revision.','40019pSDKBI','length','filter','toString','3786820hWhKWb','Archive\x20validation\x20failed\x20with\x20unknown\x20error','Downloaded\x20file\x20is\x20not\x20a\x20valid\x20gzip\x20archive.','1041645ufKEiT','\x20Server\x20response\x20preview:\x20','17039MBWqQL','161FygOSt','4570UDCXVX','from','157192dQcLKv','equals'];a178_0x5044=function(){return _0x576213;};return a178_0x5044();}function a178_0x5a26(_0x44edf0,_0x1ff1b3){_0x44edf0=_0x44edf0-0x11a;const _0x5044d9=a178_0x5044();let _0x5a262c=_0x5044d9[_0x44edf0];return _0x5a262c;}import{SDKError,ErrorCode}from'../errors.js';const GZIP_MAGIC=Buffer[a178_0x1c80eb(0x11f)]([0x1f,0x8b]),MIN_GZIP_SIZE=0x14;export function validateGzipArchive(_0x5d8ea1){const _0x36cd60=a178_0x1c80eb;if(_0x5d8ea1[_0x36cd60(0x135)]<MIN_GZIP_SIZE)return{'isValid':![],'size':_0x5d8ea1[_0x36cd60(0x135)],'error':{'message':'Downloaded\x20archive\x20is\x20too\x20small\x20('+_0x5d8ea1[_0x36cd60(0x135)]+'\x20bytes).\x20The\x20server\x20may\x20have\x20returned\x20an\x20error\x20or\x20empty\x20response.','preview':getContentPreview(_0x5d8ea1),'helpText':'Check\x20if\x20the\x20project\x20exists\x20and\x20has\x20been\x20pushed\x20at\x20least\x20once.'}};if(!_0x5d8ea1[_0x36cd60(0x132)](0x0,0x2)[_0x36cd60(0x121)](GZIP_MAGIC)){const _0x3c9a74=getContentPreview(_0x5d8ea1),_0x42e592=_0x3c9a74?_0x36cd60(0x11b)+_0x3c9a74:'';return{'isValid':![],'size':_0x5d8ea1[_0x36cd60(0x135)],'error':{'message':_0x36cd60(0x13a)+_0x42e592,'preview':_0x3c9a74,'helpText':_0x36cd60(0x133)}};}return{'isValid':!![],'size':_0x5d8ea1[_0x36cd60(0x135)]};}function getContentPreview(_0x10b63b){const _0x43e084=a178_0x1c80eb;if(_0x10b63b[_0x43e084(0x135)]===0x0)return _0x43e084(0x127);const _0x19df0a=_0x10b63b[_0x43e084(0x132)](0x0,0xc8)[_0x43e084(0x137)](_0x43e084(0x12c)),_0x1aefac=_0x19df0a[_0x43e084(0x123)]('')[_0x43e084(0x136)](_0x4999b5=>{const _0x21ed53=_0x43e084,_0x13ed03=_0x4999b5[_0x21ed53(0x12e)](0x0);return _0x13ed03>=0x20&&_0x13ed03<0x7f||_0x13ed03===0xa||_0x13ed03===0xd||_0x13ed03===0x9;})[_0x43e084(0x135)],_0x4fdceb=_0x1aefac/_0x19df0a['length'];if(_0x4fdceb>0.8){const _0x252c02=_0x19df0a[_0x43e084(0x131)](0x0,0x64)[_0x43e084(0x126)]();return _0x252c02[_0x43e084(0x135)]<_0x19df0a[_0x43e084(0x126)]()['length']?_0x252c02+_0x43e084(0x122):_0x252c02;}return undefined;}export function throwArchiveValidationError(_0x5c5bf3){const _0xf4e51d=a178_0x1c80eb;if(!_0x5c5bf3[_0xf4e51d(0x124)])throw new SDKError(ErrorCode[_0xf4e51d(0x128)],_0xf4e51d(0x139));throw new SDKError(ErrorCode[_0xf4e51d(0x128)],_0x5c5bf3[_0xf4e51d(0x124)]['message'],undefined,{'helpText':_0x5c5bf3[_0xf4e51d(0x124)][_0xf4e51d(0x12b)]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xef9ba2,_0x1ad03c){const _0x13f0fb=a179_0x69ed,_0x17cf53=_0xef9ba2();while(!![]){try{const _0x30df24=parseInt(_0x13f0fb(0x14a))/0x1+parseInt(_0x13f0fb(0x163))/0x2*(parseInt(_0x13f0fb(0x153))/0x3)+parseInt(_0x13f0fb(0x15f))/0x4+parseInt(_0x13f0fb(0x15a))/0x5+parseInt(_0x13f0fb(0x150))/0x6*(-parseInt(_0x13f0fb(0x14c))/0x7)+parseInt(_0x13f0fb(0x149))/0x8+-parseInt(_0x13f0fb(0x15d))/0x9*(parseInt(_0x13f0fb(0x148))/0xa);if(_0x30df24===_0x1ad03c)break;else _0x17cf53['push'](_0x17cf53['shift']());}catch(_0x3d75d7){_0x17cf53['push'](_0x17cf53['shift']());}}}(a179_0x1f68,0x36fa7));import{promises as a179_0x2b0aec}from'fs';function a179_0x69ed(_0x1cd558,_0x2cc4f1){_0x1cd558=_0x1cd558-0x148;const _0x1f6814=a179_0x1f68();let _0x69ed56=_0x1f6814[_0x1cd558];return _0x69ed56;}import a179_0x563523 from'path';import a179_0x3e857d from'os';import{tryFindWorkflowTdxConfig}from'./tdx-config.js';import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION}from'./workflow-utils.js';function a179_0x1f68(){const _0x1b00e4=['skipValidation','436470NFHsJH','push','tdx.json','resolve','mkdtemp','tdx-wf-clone-','join','561760FvUqnc','sourceDir','replace','72gNWKqw','toISOString','450812VnXFwZ','endsWith','revision','length','2uiLUOA','create','uploadProjectArchive','newProjectName','264430YrBVsT','2733504vVqOzx','90754GTXAWC','No\x20','161joKWYY','data','readdir','find','95544UjCIRA','name'];a179_0x1f68=function(){return _0x1b00e4;};return a179_0x1f68();}export async function prepareCloneWorkflow(_0x48f588,_0x583a5b,_0x142947,_0x54809d={}){const _0x323e9c=a179_0x69ed,{client:_0x13b5f1}=_0x48f588,_0x193450=a179_0x563523[_0x323e9c(0x156)](_0x583a5b);try{await a179_0x2b0aec['access'](_0x193450);}catch{throw new Error('Source\x20directory\x20not\x20found:\x20'+_0x583a5b);}const _0xea924=tryFindWorkflowTdxConfig(_0x193450),_0x273450=_0xea924?.['config']['workflow_project'],_0x4c1c25=_0x54809d['revision']||new Date()[_0x323e9c(0x15e)]()[_0x323e9c(0x15c)](/[:.]/g,'-');if(!_0x54809d[_0x323e9c(0x152)]){const _0x16154c=await a179_0x2b0aec[_0x323e9c(0x14e)](_0x193450),_0x4d7721=_0x16154c['filter'](_0x262431=>_0x262431[_0x323e9c(0x160)](WORKFLOW_FILE_EXTENSION));if(_0x4d7721['length']===0x0)throw new Error(_0x323e9c(0x14b)+WORKFLOW_FILE_EXTENSION+'\x20workflow\x20files\x20found\x20in\x20'+_0x193450);}const _0x1464d0=await getProjectFiles(_0x193450);let _0x3775ec=![],_0x10cb5a;try{const _0x143b71=await _0x13b5f1['listProjects']({'name_pattern':_0x142947}),_0x5558f0=_0x143b71[_0x323e9c(0x14d)][_0x323e9c(0x14f)](_0x254a27=>_0x254a27['name']===_0x142947);_0x5558f0&&(_0x3775ec=!![],_0x10cb5a=_0x5558f0['id']);}catch{}return{'sourceDir':_0x193450,'sourceProjectName':_0x273450,'newProjectName':_0x142947,'revision':_0x4c1c25,'fileCount':_0x1464d0[_0x323e9c(0x162)],'files':_0x1464d0,'targetExists':_0x3775ec,'existingProjectId':_0x10cb5a};}export async function executeCloneWorkflow(_0x3f4cf9,_0x1b9760){const _0x3be87f=a179_0x69ed,_0x2a4ff4=await import('tar'),{client:_0x1ddaa5}=_0x3f4cf9,_0x749437=await getProjectFiles(_0x1b9760[_0x3be87f(0x15b)]),_0x2bd4bd=await a179_0x2b0aec[_0x3be87f(0x157)](a179_0x563523['join'](a179_0x3e857d['tmpdir'](),_0x3be87f(0x158))),_0x374980=a179_0x563523[_0x3be87f(0x159)](_0x2bd4bd,'archive.tar.gz');try{await _0x2a4ff4[_0x3be87f(0x164)]({'file':_0x374980,'gzip':!![],'cwd':_0x1b9760[_0x3be87f(0x15b)],'portable':!![]},_0x749437);const _0x31bcfa=await _0x1ddaa5[_0x3be87f(0x165)](_0x1b9760[_0x3be87f(0x166)],_0x1b9760[_0x3be87f(0x161)],_0x374980);return{'sourceDir':_0x1b9760[_0x3be87f(0x15b)],'sourceProjectName':_0x1b9760['sourceProjectName'],'newProjectName':_0x31bcfa[_0x3be87f(0x151)],'newProjectId':_0x31bcfa['id'],'revision':_0x31bcfa[_0x3be87f(0x161)],'fileCount':_0x749437[_0x3be87f(0x162)],'files':_0x749437};}finally{await a179_0x2b0aec['rm'](_0x2bd4bd,{'recursive':!![],'force':!![]});}}async function getProjectFiles(_0x359a81,_0x27dd1a=''){const _0x12db1c=a179_0x69ed,_0x41dc59=[],_0x469354=await a179_0x2b0aec[_0x12db1c(0x14e)](_0x359a81,{'withFileTypes':!![]});for(const _0x1c4515 of _0x469354){const _0x1a8bb2=_0x27dd1a?a179_0x563523[_0x12db1c(0x159)](_0x27dd1a,_0x1c4515['name']):_0x1c4515[_0x12db1c(0x151)];if(_0x1c4515[_0x12db1c(0x151)]===_0x12db1c(0x155))continue;if(!shouldIncludeInArchive(_0x1c4515[_0x12db1c(0x151)]))continue;if(_0x1c4515['isDirectory']()){const _0x3253db=await getProjectFiles(a179_0x563523[_0x12db1c(0x159)](_0x359a81,_0x1c4515[_0x12db1c(0x151)]),_0x1a8bb2);_0x41dc59[_0x12db1c(0x154)](..._0x3253db);}else _0x41dc59[_0x12db1c(0x154)](_0x1a8bb2);}return _0x41dc59;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a180_0x41f030=a180_0x51e0;(function(_0x594e5c,_0x62a113){const _0x5043b7=a180_0x51e0,_0x1d5cab=_0x594e5c();while(!![]){try{const _0x367de1=parseInt(_0x5043b7(0x1ff))/0x1+parseInt(_0x5043b7(0x1cf))/0x2*(-parseInt(_0x5043b7(0x22f))/0x3)+parseInt(_0x5043b7(0x22d))/0x4+-parseInt(_0x5043b7(0x1c0))/0x5+-parseInt(_0x5043b7(0x230))/0x6+-parseInt(_0x5043b7(0x1c7))/0x7+parseInt(_0x5043b7(0x1fe))/0x8*(parseInt(_0x5043b7(0x21e))/0x9);if(_0x367de1===_0x62a113)break;else _0x1d5cab['push'](_0x1d5cab['shift']());}catch(_0x5a74f9){_0x1d5cab['push'](_0x1d5cab['shift']());}}}(a180_0x69f9,0x3e7db));import{WorkflowApiClient}from'../client/workflow-client.js';import{SDKError,ErrorCode}from'../errors.js';import{MAX_PAGINATION_LIMIT}from'../util/paginate.js';async function paginateResults(_0x338b16,_0x1fad1d,_0x20ec81=0x64){const _0x1bbd41=a180_0x51e0,_0x51b04b=Math[_0x1bbd41(0x1d7)](_0x1fad1d,MAX_PAGINATION_LIMIT),_0x4dd660=[];let _0x4e660b;while(_0x4dd660[_0x1bbd41(0x1e8)]<_0x51b04b){const _0x2b9248=await _0x338b16(_0x20ec81,_0x4e660b),_0x167d61=_0x2b9248['rawCount']??_0x2b9248[_0x1bbd41(0x1d1)]['length'];if(_0x167d61===0x0)break;_0x4dd660[_0x1bbd41(0x222)](..._0x2b9248['data']);if(!_0x2b9248[_0x1bbd41(0x20a)]||_0x167d61<_0x20ec81)break;_0x4e660b=_0x2b9248['lastId'];}return _0x4dd660['slice'](0x0,_0x51b04b);}import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION}from'./workflow-utils.js';function a180_0x51e0(_0x3f7597,_0x25c490){_0x3f7597=_0x3f7597-0x1bd;const _0x69f974=a180_0x69f9();let _0x51e085=_0x69f974[_0x3f7597];return _0x51e085;}function a180_0x69f9(){const _0x5469ea=['tmpdir','parentId','448504aRxJpl','map','90bWAyNC','291240excKsT','upstreams','latest','attempt','state','sessionId','unlink','create','retryAttempt','listProjects','Cannot\x20read\x20workflow\x20file:\x20','fullName','status','fromTask','sessionTime','bind','scheduleFrom','isGroup','projectName','785015BzSYHD','endsWith','workflows','name','download','test','Project\x20directory\x20not\x20found:\x20','1057721bNSDTZ','toISOString','No\x20','deleteSecret','executePushProject','createdAt','listLogFiles','pullProject','20278nKKvJb','retryAttemptName','data','exportParams','deleteProject','access','NUMERIC_ID_PATTERN','cancelRequested','min','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','substring','readdir','path','listWorkflows','clearScheduleAll','getProject','tasks','Invalid\x20workflow\x20format:\x20','rejected','sessionUuid','last_id','toString','getAttempt','allSettled','projects','length','revision','now','.\x20Expected\x20\x22project.workflow\x22','client','stateParams','retryParams','attempts','error','tdx-workflow-push-','workflowName','downloadProjectArchive','storeParams','basename','direct','done','setSecret','run','index','join','delete','retrySession','1261976LROSVt','489159UuFTPZ','setSecrets','force','skipValidation','lastAttempt','listAttempts','\x20workflow\x20files\x20found\x20in\x20project\x20directory','Failed\x20to\x20set\x20secret','includeRetried','message','sessions','lastId','project','workflow','filter','preparePushProject','success','Failed\x20to\x20download\x20log\x20file:\x20','listSecrets','Project\x20not\x20found:\x20','from','find','resolveProjectId','indexOf','kill','listSessions','mkdir','limit','util','zlib','WORKFLOW_PROJECT_NOT_FOUND','18IeYWNI','config','.tar.gz','finishedAt','push','fromTime','isDirectory','logs','replace','logFiles','gunzip','resumeFrom','applyPullProject'];a180_0x69f9=function(){return _0x5469ea;};return a180_0x69f9();}import{pullWorkflow,applyPullResult}from'./pull-workflow.js';import{preparePushWorkflow,executePushWorkflow}from'./push-workflow.js';import{prepareCloneWorkflow,executeCloneWorkflow}from'./clone-workflow.js';export class WorkflowSDK{static [a180_0x41f030(0x1d5)]=/^\d+$/;[a180_0x41f030(0x1ec)];constructor(_0x1aca6f){const _0x1267cb=a180_0x41f030;this[_0x1267cb(0x1ec)]=new WorkflowApiClient(_0x1aca6f);}async[a180_0x41f030(0x215)](_0x160dc2){const _0x52977c=a180_0x41f030;if(WorkflowSDK[_0x52977c(0x1d5)][_0x52977c(0x1c5)](_0x160dc2)){const _0x465158=await this[_0x52977c(0x1ec)][_0x52977c(0x1de)](_0x160dc2);return{'id':_0x465158['id'],'name':_0x465158[_0x52977c(0x1c3)]};}const _0x1bf9fd=await this['client']['listProjects']({'name_pattern':_0x160dc2}),_0x1c1da5=_0x1bf9fd['data'][_0x52977c(0x214)](_0x51fe0a=>_0x51fe0a[_0x52977c(0x1c3)]===_0x160dc2);if(!_0x1c1da5)throw new SDKError(ErrorCode[_0x52977c(0x21d)],_0x52977c(0x212)+_0x160dc2);return{'id':_0x1c1da5['id'],'name':_0x1c1da5[_0x52977c(0x1c3)]};}async[a180_0x41f030(0x1e7)](_0x202160,_0x5908bd){const _0x8bf4fe=a180_0x41f030,_0x70af3c=_0x5908bd?.[_0x8bf4fe(0x21a)]||0x64,_0x166b1f=await paginateResults((_0x1ac1e7,_0xf0a960)=>this['client'][_0x8bf4fe(0x239)]({'name_pattern':_0x202160,'limit':_0x1ac1e7,'last_id':_0xf0a960??_0x5908bd?.['last_id']}),_0x70af3c);return _0x166b1f[_0x8bf4fe(0x22e)](_0xaff4a9=>({..._0xaff4a9,'project_id':_0xaff4a9['id'],'project_name':_0xaff4a9['name']}));}async[a180_0x41f030(0x1c2)](_0x43e546,_0x4ba0e9){const _0x3e0ed2=a180_0x41f030,_0x4408a2=_0x4ba0e9?.[_0x3e0ed2(0x21a)]||0x64,_0x1c0aad=await paginateResults((_0x2bda6c,_0x4319f2)=>this[_0x3e0ed2(0x1ec)][_0x3e0ed2(0x1dc)]({'project_name':_0x43e546,'limit':_0x2bda6c,'last_id':_0x4319f2??_0x4ba0e9?.[_0x3e0ed2(0x1e3)]}),_0x4408a2);return _0x1c0aad[_0x3e0ed2(0x22e)](_0x463151=>({'project_id':_0x463151[_0x3e0ed2(0x20b)]?.['id'],'project_name':_0x463151['project']?.[_0x3e0ed2(0x1c3)],'workflow_id':_0x463151['id'],'workflow_name':_0x463151[_0x3e0ed2(0x1c3)],'revision':_0x463151[_0x3e0ed2(0x1e9)],'timezone':_0x463151['timezone'],'config':_0x463151[_0x3e0ed2(0x21f)],'id':_0x463151['id'],'name':_0x463151[_0x3e0ed2(0x1c3)],'project':_0x463151[_0x3e0ed2(0x20b)]}));}async[a180_0x41f030(0x209)](_0x175384){const _0x4275de=a180_0x41f030;let _0x472cbb;if(_0x175384?.[_0x4275de(0x1bf)]){let _0x475011,_0x4f7ddd=![];while(!_0x4f7ddd){const _0x5c47c9=await this[_0x4275de(0x1ec)]['listProjects']({'limit':0x64,'last_id':_0x475011}),_0x3e4167=_0x5c47c9[_0x4275de(0x1d1)][_0x4275de(0x214)](_0x4abc47=>_0x4abc47['name']===_0x175384['projectName']);if(_0x3e4167){_0x472cbb=_0x3e4167['id'],_0x4f7ddd=!![];break;}if(!_0x5c47c9[_0x4275de(0x20a)]||_0x5c47c9[_0x4275de(0x1d1)][_0x4275de(0x1e8)]===0x0)break;_0x475011=_0x5c47c9[_0x4275de(0x20a)];}if(!_0x472cbb)throw new SDKError(ErrorCode[_0x4275de(0x21d)],_0x4275de(0x212)+_0x175384[_0x4275de(0x1bf)]);}const _0x4c6bf2=_0x175384?.[_0x4275de(0x21a)]||0x64,_0x3e10bb=await paginateResults((_0x3bc103,_0x52213d)=>this[_0x4275de(0x1ec)][_0x4275de(0x218)]({'project_id':_0x472cbb,'project_name':_0x175384?.['projectName'],'workflow_name':_0x175384?.[_0x4275de(0x1f2)],'status':_0x175384?.[_0x4275de(0x23c)],'from_time':_0x175384?.[_0x4275de(0x223)],'to_time':_0x175384?.['toTime'],'limit':_0x3bc103,'last_id':_0x52213d??_0x175384?.[_0x4275de(0x1e3)]}),_0x4c6bf2);return _0x3e10bb[_0x4275de(0x22e)](_0x206c64=>({'project_id':_0x206c64[_0x4275de(0x20b)]?.['id'],'project_name':_0x206c64[_0x4275de(0x20b)]?.[_0x4275de(0x1c3)],'workflow_id':_0x206c64[_0x4275de(0x20c)]?.['id'],'workflow_name':_0x206c64[_0x4275de(0x20c)]?.['name'],'session_id':_0x206c64['id'],'sessionUuid':_0x206c64[_0x4275de(0x1e2)],'sessionTime':_0x206c64['sessionTime'],'lastAttempt':_0x206c64[_0x4275de(0x203)],'id':_0x206c64['id'],'project':_0x206c64[_0x4275de(0x20b)],'workflow':_0x206c64[_0x4275de(0x20c)]}));}async[a180_0x41f030(0x1ef)](_0x25218c){const _0x1b8719=a180_0x41f030,_0x269ce0=_0x25218c?.[_0x1b8719(0x21a)]||0x64,_0x280b0b=await paginateResults((_0x1621c5,_0x41666c)=>this[_0x1b8719(0x1ec)][_0x1b8719(0x204)]({'project_name':_0x25218c?.['projectName'],'workflow_name':_0x25218c?.[_0x1b8719(0x1f2)],'include_retried':_0x25218c?.[_0x1b8719(0x207)],'limit':_0x1621c5,'last_id':_0x41666c??_0x25218c?.[_0x1b8719(0x1e3)]}),_0x269ce0);return _0x280b0b[_0x1b8719(0x22e)](_0x5893ed=>({'project_id':_0x5893ed[_0x1b8719(0x20b)]?.['id'],'project_name':_0x5893ed['project']?.[_0x1b8719(0x1c3)],'workflow_id':_0x5893ed[_0x1b8719(0x20c)]?.['id'],'workflow_name':_0x5893ed[_0x1b8719(0x20c)]?.['name'],'session_id':_0x5893ed[_0x1b8719(0x235)],'sessionUuid':_0x5893ed[_0x1b8719(0x1e2)],'sessionTime':_0x5893ed[_0x1b8719(0x23e)],'attempt_id':_0x5893ed['id'],'attempt_index':_0x5893ed[_0x1b8719(0x1fa)],'retryAttemptName':_0x5893ed[_0x1b8719(0x1d0)],'done':_0x5893ed[_0x1b8719(0x1f7)],'success':_0x5893ed[_0x1b8719(0x20f)],'cancelRequested':_0x5893ed[_0x1b8719(0x1d6)],'params':_0x5893ed['params'],'createdAt':_0x5893ed[_0x1b8719(0x1cc)],'finishedAt':_0x5893ed[_0x1b8719(0x221)],'id':_0x5893ed['id'],'index':_0x5893ed['index'],'project':_0x5893ed[_0x1b8719(0x20b)],'workflow':_0x5893ed['workflow']}));}async[a180_0x41f030(0x233)](_0x22a356){const _0x29541a=a180_0x41f030,_0x12ee0d=await this[_0x29541a(0x1ec)][_0x29541a(0x1e5)](_0x22a356);return _0x12ee0d;}async[a180_0x41f030(0x1df)](_0x294304,_0x593b24=![]){const _0x52cf6b=a180_0x41f030,_0x4ce56f=await this[_0x52cf6b(0x1ec)]['getAttemptTasks'](_0x294304,_0x593b24);return _0x4ce56f[_0x52cf6b(0x22e)](_0x237a83=>({'task_id':_0x237a83['id'],'task_name':_0x237a83[_0x52cf6b(0x23b)],'parentId':_0x237a83[_0x52cf6b(0x22c)],'config':_0x237a83[_0x52cf6b(0x21f)],'upstreams':_0x237a83[_0x52cf6b(0x231)],'state':_0x237a83[_0x52cf6b(0x234)],'exportParams':_0x237a83[_0x52cf6b(0x1d2)],'storeParams':_0x237a83[_0x52cf6b(0x1f4)],'stateParams':_0x237a83[_0x52cf6b(0x1ed)],'updatedAt':_0x237a83['updatedAt'],'retryAt':_0x237a83['retryAt'],'startedAt':_0x237a83['startedAt'],'error':_0x237a83[_0x52cf6b(0x1f0)],'isGroup':_0x237a83[_0x52cf6b(0x1be)],'id':_0x237a83['id'],'fullName':_0x237a83[_0x52cf6b(0x23b)]}));}async[a180_0x41f030(0x227)](_0x48a3ae,_0x5627d4){const _0x2ce976=a180_0x41f030;return await this[_0x2ce976(0x1ec)][_0x2ce976(0x1cd)](_0x48a3ae,_0x5627d4);}async[a180_0x41f030(0x225)](_0x32a15e,_0x343d66){const _0x5d2d34=a180_0x41f030,_0x1b91a5=await import(_0x5d2d34(0x21c)),{promisify:_0x2283f0}=await import(_0x5d2d34(0x21b)),_0x54b741=_0x2283f0(_0x1b91a5[_0x5d2d34(0x228)]),_0x338d0e=await this['client']['listLogFiles'](_0x32a15e,_0x343d66);if(_0x338d0e[_0x5d2d34(0x1e8)]===0x0)return'';const _0x119ff5=[];for(const _0x32a623 of _0x338d0e){if(!_0x32a623[_0x5d2d34(0x1f6)])continue;const _0x3919f7=await fetch(_0x32a623['direct']);if(!_0x3919f7['ok'])throw new Error(_0x5d2d34(0x210)+_0x3919f7['status']);const _0x2eb0ff=Buffer[_0x5d2d34(0x213)](await _0x3919f7['arrayBuffer']()),_0x54fe41=await _0x54b741(_0x2eb0ff);_0x119ff5['push'](_0x54fe41[_0x5d2d34(0x1e4)]('utf-8'));}return _0x119ff5[_0x5d2d34(0x1fb)]('\x0a');}async[a180_0x41f030(0x217)](_0x4765dc,_0x13c6dc){const _0x282955=a180_0x41f030,_0x3167cf=await this['client']['killAttempt'](_0x4765dc,_0x13c6dc);return _0x3167cf?.[_0x282955(0x208)]??'Kill\x20request\x20accepted';}async[a180_0x41f030(0x1fd)](_0x1cc3a0,_0x31f33b){const _0x2a4e71=a180_0x41f030,_0x48143e=await this['client'][_0x2a4e71(0x1fd)](_0x1cc3a0,{'from_task':_0x31f33b?.[_0x2a4e71(0x23d)],'retry_params':_0x31f33b?.[_0x2a4e71(0x1ee)]});return{'attemptId':_0x48143e['id'],'sessionId':_0x48143e[_0x2a4e71(0x235)]};}async['retryAttempt'](_0x9d609d,_0x57d039){const _0x5ed4af=a180_0x41f030,_0x20caf9=await this[_0x5ed4af(0x1ec)][_0x5ed4af(0x238)](_0x9d609d,{'resume_from':_0x57d039?.[_0x5ed4af(0x229)],'retry_params':_0x57d039?.[_0x5ed4af(0x1ee)],'force':_0x57d039?.[_0x5ed4af(0x201)]});return{'attemptId':_0x20caf9['id'],'sessionId':_0x20caf9['sessionId']};}async[a180_0x41f030(0x1f9)](_0x76290c,_0x347526={},_0x37d1a1){const _0x4a1afb=a180_0x41f030,_0x31839d=_0x76290c[_0x4a1afb(0x216)]('.');let _0x198fc4,_0x416e94;if(_0x31839d===-0x1)throw new Error(_0x4a1afb(0x1d8));_0x198fc4=_0x76290c[_0x4a1afb(0x1d9)](0x0,_0x31839d),_0x416e94=_0x76290c[_0x4a1afb(0x1d9)](_0x31839d+0x1);if(!_0x198fc4||!_0x416e94)throw new Error(_0x4a1afb(0x1e0)+_0x76290c+_0x4a1afb(0x1eb));const _0x3a9554=_0x37d1a1?.[_0x4a1afb(0x23e)]||new Date()['toISOString']();return await this[_0x4a1afb(0x1ec)]['startAttempt']({'projectName':_0x198fc4,'workflowName':_0x416e94,'sessionTime':_0x3a9554,'params':_0x347526});}async[a180_0x41f030(0x1c4)](_0x4df113,_0x3d6cf1,_0x4bca8c){const _0x1dee91=a180_0x41f030,{promises:_0x18a347}=await import('fs'),_0xf4a8ab=await import(_0x1dee91(0x1db)),_0x1e55af=await import('os'),_0x49b729=await import('tar'),{id:_0x11bc1f,name:_0x3318b6}=await this[_0x1dee91(0x215)](_0x4df113),_0x14a8f8=_0x1e55af[_0x1dee91(0x22b)](),_0x4e3898=_0xf4a8ab[_0x1dee91(0x1fb)](_0x14a8f8,'tdx-workflow-'+_0x11bc1f+'-'+Date[_0x1dee91(0x1ea)]()+_0x1dee91(0x220));try{await this['client'][_0x1dee91(0x1f3)](_0x11bc1f,_0x4e3898,_0x4bca8c?.['revision']);const _0x3d572f=_0xf4a8ab['join'](_0x3d6cf1,_0x3318b6);await _0x18a347[_0x1dee91(0x219)](_0x3d572f,{'recursive':!![]}),await _0x49b729['extract']({'file':_0x4e3898,'cwd':_0x3d572f,'gzip':!![]});const _0x1e5ae1=async _0x27f369=>{const _0x5564ca=_0x1dee91;let _0x76a18a=0x0;const _0xe8a7ae=await _0x18a347['readdir'](_0x27f369,{'withFileTypes':!![]});for(const _0x410678 of _0xe8a7ae){const _0x176587=_0xf4a8ab[_0x5564ca(0x1fb)](_0x27f369,_0x410678[_0x5564ca(0x1c3)]);if(_0x410678['isFile']())_0x76a18a++;else _0x410678[_0x5564ca(0x224)]()&&(_0x76a18a+=await _0x1e5ae1(_0x176587));}return _0x76a18a;},_0x28fdbe=await _0x1e5ae1(_0x3d572f);return{'projectName':_0x3318b6,'revision':_0x4bca8c?.[_0x1dee91(0x1e9)]||_0x1dee91(0x232),'filesExtracted':_0x28fdbe};}finally{try{await _0x18a347[_0x1dee91(0x236)](_0x4e3898);}catch{}}}async[a180_0x41f030(0x222)](_0x5d0577,_0x4fbf6f){const _0x2a45b6=a180_0x41f030,{promises:_0x3a470e}=await import('fs'),_0x37aaa1=await import(_0x2a45b6(0x1db)),_0x259372=await import('tar'),_0x2d6ac5=_0x4fbf6f?.[_0x2a45b6(0x1bf)]||_0x37aaa1[_0x2a45b6(0x1f5)](_0x5d0577),_0x14369f=_0x4fbf6f?.['revision']||new Date()[_0x2a45b6(0x1c8)]()[_0x2a45b6(0x226)](/[:.]/g,'-');try{await _0x3a470e[_0x2a45b6(0x1d4)](_0x5d0577);}catch{throw new Error(_0x2a45b6(0x1c6)+_0x5d0577);}if(!_0x4fbf6f?.[_0x2a45b6(0x202)]){const _0x1e8f7c=await _0x3a470e[_0x2a45b6(0x1da)](_0x5d0577),_0x11e192=_0x1e8f7c[_0x2a45b6(0x20d)](_0x302920=>_0x302920[_0x2a45b6(0x1c1)](WORKFLOW_FILE_EXTENSION));if(_0x11e192[_0x2a45b6(0x1e8)]===0x0)throw new Error(_0x2a45b6(0x1c9)+WORKFLOW_FILE_EXTENSION+_0x2a45b6(0x205));for(const _0x5ac5e9 of _0x11e192){const _0x51d98f=_0x37aaa1[_0x2a45b6(0x1fb)](_0x5d0577,_0x5ac5e9);try{await _0x3a470e[_0x2a45b6(0x1d4)](_0x51d98f);}catch{throw new Error(_0x2a45b6(0x23a)+_0x5ac5e9);}}}const _0x5f41e1=async(_0x53f5c1,_0x316bfb='')=>{const _0x235324=_0x2a45b6,_0x24093d=await _0x3a470e[_0x235324(0x1da)](_0x53f5c1,{'withFileTypes':!![]}),_0x35b376=[];for(const _0x2730e0 of _0x24093d){const _0x1e7792=_0x37aaa1[_0x235324(0x1fb)](_0x316bfb,_0x2730e0[_0x235324(0x1c3)]),_0x1f4248=_0x37aaa1['join'](_0x53f5c1,_0x2730e0[_0x235324(0x1c3)]);if(!shouldIncludeInArchive(_0x2730e0['name']))continue;_0x2730e0[_0x235324(0x224)]()?_0x35b376['push'](...await _0x5f41e1(_0x1f4248,_0x1e7792)):_0x35b376[_0x235324(0x222)](_0x1e7792);}return _0x35b376;},_0x4ac2bb=await _0x5f41e1(_0x5d0577),_0x555922=await import('os'),_0x18aa0f=_0x555922[_0x2a45b6(0x22b)](),_0x491354=_0x37aaa1['join'](_0x18aa0f,_0x2a45b6(0x1f1)+Date[_0x2a45b6(0x1ea)]()+'.tar.gz');try{await _0x259372[_0x2a45b6(0x237)]({'file':_0x491354,'gzip':!![],'cwd':_0x5d0577,'portable':!![]},_0x4ac2bb);const _0x689e11=await this['client']['uploadProjectArchive'](_0x2d6ac5,_0x14369f,_0x491354,{'scheduleFrom':_0x4fbf6f?.[_0x2a45b6(0x1bd)],'clearSchedule':_0x4fbf6f?.['clearSchedule'],'clearScheduleAll':_0x4fbf6f?.[_0x2a45b6(0x1dd)]});return{'projectId':_0x689e11['id'],'projectName':_0x689e11[_0x2a45b6(0x1c3)],'revision':_0x689e11[_0x2a45b6(0x1e9)]};}finally{try{await _0x3a470e[_0x2a45b6(0x236)](_0x491354);}catch{}}}async[a180_0x41f030(0x1fc)](_0x34bf1d){const _0x8fc9d=a180_0x41f030,{id:_0x147e78}=await this[_0x8fc9d(0x215)](_0x34bf1d),_0x4e1c02=await this[_0x8fc9d(0x1ec)][_0x8fc9d(0x1d3)](_0x147e78);return{'projectId':_0x4e1c02['id'],'projectName':_0x4e1c02[_0x8fc9d(0x1c3)]};}async[a180_0x41f030(0x211)](_0x3d5a13){const _0x1aa602=a180_0x41f030,{id:_0x65320a,name:_0x56acc6}=await this[_0x1aa602(0x215)](_0x3d5a13),_0x424a53=await this['client'][_0x1aa602(0x211)](_0x65320a);return{'projectName':_0x56acc6,'secrets':_0x424a53};}async[a180_0x41f030(0x1f8)](_0x1da104,_0x51bc64,_0x2628bd){const _0x26bf22=a180_0x41f030,{id:_0x4e2168,name:_0x241003}=await this[_0x26bf22(0x215)](_0x1da104);return await this[_0x26bf22(0x1ec)]['setSecret'](_0x4e2168,_0x51bc64,_0x2628bd),{'projectName':_0x241003,'key':_0x51bc64};}async[a180_0x41f030(0x200)](_0x72b7a8,_0xd63602){const _0xd57ab2=a180_0x41f030,{id:_0x33440d,name:_0x1a6b11}=await this[_0xd57ab2(0x215)](_0x72b7a8),_0x3a4149=Object['keys'](_0xd63602),_0x322d2a=await Promise[_0xd57ab2(0x1e6)](_0x3a4149[_0xd57ab2(0x22e)](_0x27383b=>this[_0xd57ab2(0x1ec)][_0xd57ab2(0x1f8)](_0x33440d,_0x27383b,_0xd63602[_0x27383b]))),_0x145745=_0x322d2a['map']((_0x4dfd7f,_0x48a690)=>_0x4dfd7f[_0xd57ab2(0x23c)]===_0xd57ab2(0x1e1)?_0x3a4149[_0x48a690]:null)[_0xd57ab2(0x20d)](_0x492150=>_0x492150!==null);if(_0x145745[_0xd57ab2(0x1e8)]>0x0)throw new SDKError(ErrorCode['WORKFLOW_SECRET_SET_FAILED'],_0xd57ab2(0x206)+(_0x145745[_0xd57ab2(0x1e8)]>0x1?'s':'')+':\x20'+_0x145745[_0xd57ab2(0x1fb)](',\x20'));return{'projectName':_0x1a6b11,'keys':_0x3a4149};}async[a180_0x41f030(0x1ca)](_0x438b60,_0x4ac81b){const _0x1a1143=a180_0x41f030,{id:_0x55e4e9,name:_0x272059}=await this['resolveProjectId'](_0x438b60);return await this[_0x1a1143(0x1ec)][_0x1a1143(0x1ca)](_0x55e4e9,_0x4ac81b),{'projectName':_0x272059,'key':_0x4ac81b};}async[a180_0x41f030(0x1ce)](_0x2499ab,_0x585704){const _0x1d6c3b=a180_0x41f030;return pullWorkflow({'client':this[_0x1d6c3b(0x1ec)],'resolveProjectId':this[_0x1d6c3b(0x215)][_0x1d6c3b(0x23f)](this)},_0x2499ab,_0x585704);}async[a180_0x41f030(0x22a)](_0x340794,_0xec9819){const _0x44158a=a180_0x41f030;return applyPullResult({'client':this[_0x44158a(0x1ec)],'resolveProjectId':this[_0x44158a(0x215)][_0x44158a(0x23f)](this)},_0x340794,_0xec9819);}async[a180_0x41f030(0x20e)](_0x3c5951){return preparePushWorkflow({'client':this['client'],'resolveProjectId':this['resolveProjectId']['bind'](this)},_0x3c5951);}async[a180_0x41f030(0x1cb)](_0x5e11f3){const _0x45e681=a180_0x41f030;return executePushWorkflow({'client':this['client'],'resolveProjectId':this['resolveProjectId'][_0x45e681(0x23f)](this)},_0x5e11f3);}async['prepareCloneProject'](_0x5886f3,_0x2d8b34,_0x8d62e4){const _0x108693=a180_0x41f030;return prepareCloneWorkflow({'client':this[_0x108693(0x1ec)]},_0x5886f3,_0x2d8b34,_0x8d62e4);}async['executeCloneProject'](_0x2ccd37){const _0x4f9440=a180_0x41f030;return executeCloneWorkflow({'client':this[_0x4f9440(0x1ec)]},_0x2ccd37);}}
|
|
1
|
+
function a180_0x10b0(_0x554748,_0xf9b777){_0x554748=_0x554748-0x9a;const _0x136566=a180_0x1365();let _0x10b04d=_0x136566[_0x554748];return _0x10b04d;}const a180_0x53c093=a180_0x10b0;(function(_0xf09915,_0x4af965){const _0x470c90=a180_0x10b0,_0x2a30d8=_0xf09915();while(!![]){try{const _0x4d3cf0=parseInt(_0x470c90(0xea))/0x1*(parseInt(_0x470c90(0xb3))/0x2)+parseInt(_0x470c90(0xed))/0x3+-parseInt(_0x470c90(0xde))/0x4+-parseInt(_0x470c90(0x9a))/0x5+parseInt(_0x470c90(0xbd))/0x6+parseInt(_0x470c90(0x108))/0x7+-parseInt(_0x470c90(0xf9))/0x8;if(_0x4d3cf0===_0x4af965)break;else _0x2a30d8['push'](_0x2a30d8['shift']());}catch(_0x47566c){_0x2a30d8['push'](_0x2a30d8['shift']());}}}(a180_0x1365,0xc02c2));import{WorkflowApiClient}from'../client/workflow-client.js';function a180_0x1365(){const _0x4ae0db=['3613KKwdzz','unlink','length','4171527WjAiHg','deleteProject','projectName','from','push','fullName','isGroup','bind','preparePushProject','parentId','indexOf','map','14734336WsSsNY','toString','listProjects','min','lastId','Failed\x20to\x20download\x20log\x20file:\x20','direct','getAttempt','\x20workflow\x20files\x20found\x20in\x20project\x20directory','tdx-workflow-','executePushProject','retrySession','getProject','listAttempts','kill','7509614VGNWuQ','setSecret','listLogFiles','Failed\x20to\x20set\x20secret','includeRetried','executeCloneProject','access','sessions','NUMERIC_ID_PATTERN','killAttempt','deleteSecret','attempt','slice','utf-8','fromTime','sessionUuid','listWorkflows','applyPullProject','state','workflows','lastAttempt','Kill\x20request\x20accepted','tmpdir','Cannot\x20read\x20workflow\x20file:\x20','3856310byMYhj','createdAt','last_id','workflow','isDirectory','downloadProjectArchive','extract','gunzip','endsWith','pullProject','cancelRequested','force','name','tar','isFile','basename','rawCount','listSecrets','Project\x20not\x20found:\x20','prepareCloneProject','tasks','toTime','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','listSessions','retryAttemptName','514fAafGb','path','WORKFLOW_PROJECT_NOT_FOUND','exportParams','finishedAt','clearSchedule','retryAttempt','toISOString','status','stateParams','5008764xWWAnW','delete','revision','test','find','keys','Project\x20directory\x20not\x20found:\x20','logFiles','join','config','sessionTime','resolveProjectId','No\x20','sessionId','skipValidation','error','.tar.gz','create','success','clearScheduleAll','startedAt','retryParams','uploadProjectArchive','util','done','setSecrets','index','latest','run','download','now','projects','allSettled','3305816jTJNRo','Invalid\x20workflow\x20format:\x20','substring','readdir','project','updatedAt','limit','params','client','retryAt','filter','data'];a180_0x1365=function(){return _0x4ae0db;};return a180_0x1365();}import{SDKError,ErrorCode}from'../errors.js';import{MAX_PAGINATION_LIMIT}from'../util/paginate.js';async function paginateResults(_0x1f778b,_0x4c11ed,_0x4fb1f1=0x64){const _0x179158=a180_0x10b0,_0x4cfe6c=Math[_0x179158(0xfc)](_0x4c11ed,MAX_PAGINATION_LIMIT),_0x37e917=[];let _0x5b1602;while(_0x37e917[_0x179158(0xec)]<_0x4cfe6c){const _0x43b36e=await _0x1f778b(_0x4fb1f1,_0x5b1602),_0x598aac=_0x43b36e[_0x179158(0xaa)]??_0x43b36e[_0x179158(0xe9)][_0x179158(0xec)];if(_0x598aac===0x0)break;_0x37e917[_0x179158(0xf1)](..._0x43b36e['data']);if(!_0x43b36e[_0x179158(0xfd)]||_0x598aac<_0x4fb1f1)break;_0x5b1602=_0x43b36e[_0x179158(0xfd)];}return _0x37e917[_0x179158(0x114)](0x0,_0x4cfe6c);}import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION}from'./workflow-utils.js';import{pullWorkflow,applyPullResult}from'./pull-workflow.js';import{preparePushWorkflow,executePushWorkflow}from'./push-workflow.js';import{prepareCloneWorkflow,executeCloneWorkflow}from'./clone-workflow.js';export class WorkflowSDK{static [a180_0x53c093(0x110)]=/^\d+$/;[a180_0x53c093(0xe6)];constructor(_0x52253f){const _0xe9a58e=a180_0x53c093;this[_0xe9a58e(0xe6)]=new WorkflowApiClient(_0x52253f);}async[a180_0x53c093(0xc8)](_0x11817e){const _0x56954a=a180_0x53c093;if(WorkflowSDK['NUMERIC_ID_PATTERN'][_0x56954a(0xc0)](_0x11817e)){const _0x239c79=await this['client'][_0x56954a(0x105)](_0x11817e);return{'id':_0x239c79['id'],'name':_0x239c79[_0x56954a(0xa6)]};}const _0x281e2d=await this[_0x56954a(0xe6)]['listProjects']({'name_pattern':_0x11817e}),_0x31f90c=_0x281e2d[_0x56954a(0xe9)]['find'](_0x49a6a9=>_0x49a6a9['name']===_0x11817e);if(!_0x31f90c)throw new SDKError(ErrorCode[_0x56954a(0xb5)],_0x56954a(0xac)+_0x11817e);return{'id':_0x31f90c['id'],'name':_0x31f90c['name']};}async[a180_0x53c093(0xdc)](_0x158bdb,_0x4147eb){const _0x1032a1=a180_0x53c093,_0x1666b9=_0x4147eb?.[_0x1032a1(0xe4)]||0x64,_0x13e0b5=await paginateResults((_0x5ab103,_0x32a57c)=>this['client'][_0x1032a1(0xfb)]({'name_pattern':_0x158bdb,'limit':_0x5ab103,'last_id':_0x32a57c??_0x4147eb?.['last_id']}),_0x1666b9);return _0x13e0b5[_0x1032a1(0xf8)](_0x5cd2e2=>({..._0x5cd2e2,'project_id':_0x5cd2e2['id'],'project_name':_0x5cd2e2['name']}));}async[a180_0x53c093(0x11b)](_0x3e11c2,_0x12568d){const _0xd99c8e=a180_0x53c093,_0xc5c335=_0x12568d?.[_0xd99c8e(0xe4)]||0x64,_0x1b5d24=await paginateResults((_0x56b068,_0x2e8faf)=>this[_0xd99c8e(0xe6)][_0xd99c8e(0x118)]({'project_name':_0x3e11c2,'limit':_0x56b068,'last_id':_0x2e8faf??_0x12568d?.[_0xd99c8e(0x9c)]}),_0xc5c335);return _0x1b5d24[_0xd99c8e(0xf8)](_0xe808cf=>({'project_id':_0xe808cf[_0xd99c8e(0xe2)]?.['id'],'project_name':_0xe808cf[_0xd99c8e(0xe2)]?.['name'],'workflow_id':_0xe808cf['id'],'workflow_name':_0xe808cf[_0xd99c8e(0xa6)],'revision':_0xe808cf[_0xd99c8e(0xbf)],'timezone':_0xe808cf['timezone'],'config':_0xe808cf[_0xd99c8e(0xc6)],'id':_0xe808cf['id'],'name':_0xe808cf['name'],'project':_0xe808cf['project']}));}async[a180_0x53c093(0x10f)](_0x26068c){const _0x408ec1=a180_0x53c093;let _0x1bc1ad;if(_0x26068c?.[_0x408ec1(0xef)]){let _0x4d41f3,_0x374893=![];while(!_0x374893){const _0x582999=await this['client']['listProjects']({'limit':0x64,'last_id':_0x4d41f3}),_0x4a218a=_0x582999[_0x408ec1(0xe9)][_0x408ec1(0xc1)](_0x32a727=>_0x32a727[_0x408ec1(0xa6)]===_0x26068c[_0x408ec1(0xef)]);if(_0x4a218a){_0x1bc1ad=_0x4a218a['id'],_0x374893=!![];break;}if(!_0x582999[_0x408ec1(0xfd)]||_0x582999[_0x408ec1(0xe9)]['length']===0x0)break;_0x4d41f3=_0x582999[_0x408ec1(0xfd)];}if(!_0x1bc1ad)throw new SDKError(ErrorCode[_0x408ec1(0xb5)],_0x408ec1(0xac)+_0x26068c[_0x408ec1(0xef)]);}const _0xf1c000=_0x26068c?.[_0x408ec1(0xe4)]||0x64,_0x7d7c6a=await paginateResults((_0x15bdff,_0xa70774)=>this['client'][_0x408ec1(0xb1)]({'project_id':_0x1bc1ad,'project_name':_0x26068c?.[_0x408ec1(0xef)],'workflow_name':_0x26068c?.['workflowName'],'status':_0x26068c?.['status'],'from_time':_0x26068c?.[_0x408ec1(0x116)],'to_time':_0x26068c?.[_0x408ec1(0xaf)],'limit':_0x15bdff,'last_id':_0xa70774??_0x26068c?.[_0x408ec1(0x9c)]}),_0xf1c000);return _0x7d7c6a[_0x408ec1(0xf8)](_0x34c8eb=>({'project_id':_0x34c8eb['project']?.['id'],'project_name':_0x34c8eb[_0x408ec1(0xe2)]?.[_0x408ec1(0xa6)],'workflow_id':_0x34c8eb[_0x408ec1(0x9d)]?.['id'],'workflow_name':_0x34c8eb['workflow']?.['name'],'session_id':_0x34c8eb['id'],'sessionUuid':_0x34c8eb[_0x408ec1(0x117)],'sessionTime':_0x34c8eb['sessionTime'],'lastAttempt':_0x34c8eb[_0x408ec1(0x11c)],'id':_0x34c8eb['id'],'project':_0x34c8eb[_0x408ec1(0xe2)],'workflow':_0x34c8eb[_0x408ec1(0x9d)]}));}async['attempts'](_0xcba6f3){const _0x3d72ab=a180_0x53c093,_0x3adc64=_0xcba6f3?.[_0x3d72ab(0xe4)]||0x64,_0x56b697=await paginateResults((_0x20f6cf,_0x3dc7c4)=>this[_0x3d72ab(0xe6)][_0x3d72ab(0x106)]({'project_name':_0xcba6f3?.[_0x3d72ab(0xef)],'workflow_name':_0xcba6f3?.['workflowName'],'include_retried':_0xcba6f3?.[_0x3d72ab(0x10c)],'limit':_0x20f6cf,'last_id':_0x3dc7c4??_0xcba6f3?.[_0x3d72ab(0x9c)]}),_0x3adc64);return _0x56b697[_0x3d72ab(0xf8)](_0x10ffcc=>({'project_id':_0x10ffcc['project']?.['id'],'project_name':_0x10ffcc[_0x3d72ab(0xe2)]?.[_0x3d72ab(0xa6)],'workflow_id':_0x10ffcc[_0x3d72ab(0x9d)]?.['id'],'workflow_name':_0x10ffcc['workflow']?.[_0x3d72ab(0xa6)],'session_id':_0x10ffcc[_0x3d72ab(0xca)],'sessionUuid':_0x10ffcc['sessionUuid'],'sessionTime':_0x10ffcc['sessionTime'],'attempt_id':_0x10ffcc['id'],'attempt_index':_0x10ffcc['index'],'retryAttemptName':_0x10ffcc[_0x3d72ab(0xb2)],'done':_0x10ffcc[_0x3d72ab(0xd5)],'success':_0x10ffcc[_0x3d72ab(0xcf)],'cancelRequested':_0x10ffcc[_0x3d72ab(0xa4)],'params':_0x10ffcc[_0x3d72ab(0xe5)],'createdAt':_0x10ffcc[_0x3d72ab(0x9b)],'finishedAt':_0x10ffcc[_0x3d72ab(0xb7)],'id':_0x10ffcc['id'],'index':_0x10ffcc[_0x3d72ab(0xd7)],'project':_0x10ffcc[_0x3d72ab(0xe2)],'workflow':_0x10ffcc[_0x3d72ab(0x9d)]}));}async[a180_0x53c093(0x113)](_0x514a25){const _0x29a361=a180_0x53c093,_0x970dad=await this[_0x29a361(0xe6)][_0x29a361(0x100)](_0x514a25);return _0x970dad;}async[a180_0x53c093(0xae)](_0x295e9b,_0x4c7295=![]){const _0x356d34=a180_0x53c093,_0x23a06d=await this[_0x356d34(0xe6)]['getAttemptTasks'](_0x295e9b,_0x4c7295);return _0x23a06d[_0x356d34(0xf8)](_0x137396=>({'task_id':_0x137396['id'],'task_name':_0x137396['fullName'],'parentId':_0x137396[_0x356d34(0xf6)],'config':_0x137396[_0x356d34(0xc6)],'upstreams':_0x137396['upstreams'],'state':_0x137396[_0x356d34(0x11a)],'exportParams':_0x137396[_0x356d34(0xb6)],'storeParams':_0x137396['storeParams'],'stateParams':_0x137396[_0x356d34(0xbc)],'updatedAt':_0x137396[_0x356d34(0xe3)],'retryAt':_0x137396[_0x356d34(0xe7)],'startedAt':_0x137396[_0x356d34(0xd1)],'error':_0x137396[_0x356d34(0xcc)],'isGroup':_0x137396[_0x356d34(0xf3)],'id':_0x137396['id'],'fullName':_0x137396[_0x356d34(0xf2)]}));}async[a180_0x53c093(0xc4)](_0x155dad,_0x30b376){const _0x41a5e8=a180_0x53c093;return await this['client'][_0x41a5e8(0x10a)](_0x155dad,_0x30b376);}async['logs'](_0x479dec,_0x24d368){const _0x41b0c2=a180_0x53c093,_0x1408c9=await import('zlib'),{promisify:_0x33f88e}=await import(_0x41b0c2(0xd4)),_0x34e942=_0x33f88e(_0x1408c9[_0x41b0c2(0xa1)]),_0x10774f=await this[_0x41b0c2(0xe6)][_0x41b0c2(0x10a)](_0x479dec,_0x24d368);if(_0x10774f[_0x41b0c2(0xec)]===0x0)return'';const _0x43157a=[];for(const _0x285fe0 of _0x10774f){if(!_0x285fe0['direct'])continue;const _0x29abfc=await fetch(_0x285fe0[_0x41b0c2(0xff)]);if(!_0x29abfc['ok'])throw new Error(_0x41b0c2(0xfe)+_0x29abfc[_0x41b0c2(0xbb)]);const _0x39dbad=Buffer[_0x41b0c2(0xf0)](await _0x29abfc['arrayBuffer']()),_0x292f88=await _0x34e942(_0x39dbad);_0x43157a['push'](_0x292f88[_0x41b0c2(0xfa)](_0x41b0c2(0x115)));}return _0x43157a[_0x41b0c2(0xc5)]('\x0a');}async[a180_0x53c093(0x107)](_0x2fa203,_0x2cc509){const _0x5d6792=a180_0x53c093,_0x449491=await this[_0x5d6792(0xe6)][_0x5d6792(0x111)](_0x2fa203,_0x2cc509);return _0x449491?.['message']??_0x5d6792(0x11d);}async[a180_0x53c093(0x104)](_0x2dd7da,_0x5a7771){const _0x1d08bb=a180_0x53c093,_0x5adf17=await this['client']['retrySession'](_0x2dd7da,{'from_task':_0x5a7771?.['fromTask'],'retry_params':_0x5a7771?.[_0x1d08bb(0xd2)]});return{'attemptId':_0x5adf17['id'],'sessionId':_0x5adf17[_0x1d08bb(0xca)]};}async[a180_0x53c093(0xb9)](_0x38f3ad,_0x2619ba){const _0x4d9159=a180_0x53c093,_0x30f89a=await this[_0x4d9159(0xe6)][_0x4d9159(0xb9)](_0x38f3ad,{'resume_from':_0x2619ba?.['resumeFrom'],'retry_params':_0x2619ba?.['retryParams'],'force':_0x2619ba?.[_0x4d9159(0xa5)]});return{'attemptId':_0x30f89a['id'],'sessionId':_0x30f89a[_0x4d9159(0xca)]};}async[a180_0x53c093(0xd9)](_0xfa353d,_0x2bc03b={},_0x2f9fb9){const _0x463485=a180_0x53c093,_0x55ebb6=_0xfa353d[_0x463485(0xf7)]('.');let _0x167a3b,_0x53fdc7;if(_0x55ebb6===-0x1)throw new Error(_0x463485(0xb0));_0x167a3b=_0xfa353d[_0x463485(0xe0)](0x0,_0x55ebb6),_0x53fdc7=_0xfa353d[_0x463485(0xe0)](_0x55ebb6+0x1);if(!_0x167a3b||!_0x53fdc7)throw new Error(_0x463485(0xdf)+_0xfa353d+'.\x20Expected\x20\x22project.workflow\x22');const _0x233016=_0x2f9fb9?.[_0x463485(0xc7)]||new Date()[_0x463485(0xba)]();return await this[_0x463485(0xe6)]['startAttempt']({'projectName':_0x167a3b,'workflowName':_0x53fdc7,'sessionTime':_0x233016,'params':_0x2bc03b});}async[a180_0x53c093(0xda)](_0x216087,_0x20689d,_0x1d4edd){const _0x5b3f1f=a180_0x53c093,{promises:_0xfaf1f6}=await import('fs'),_0x2873fc=await import('path'),_0x21983a=await import('os'),_0x11a57f=await import(_0x5b3f1f(0xa7)),{id:_0x135557,name:_0x7c0126}=await this[_0x5b3f1f(0xc8)](_0x216087),_0x11fb91=_0x21983a[_0x5b3f1f(0x11e)](),_0x5ecae8=_0x2873fc[_0x5b3f1f(0xc5)](_0x11fb91,_0x5b3f1f(0x102)+_0x135557+'-'+Date[_0x5b3f1f(0xdb)]()+_0x5b3f1f(0xcd));try{await this[_0x5b3f1f(0xe6)][_0x5b3f1f(0x9f)](_0x135557,_0x5ecae8,_0x1d4edd?.[_0x5b3f1f(0xbf)]);const _0x590488=_0x2873fc[_0x5b3f1f(0xc5)](_0x20689d,_0x7c0126);await _0xfaf1f6['mkdir'](_0x590488,{'recursive':!![]}),await _0x11a57f[_0x5b3f1f(0xa0)]({'file':_0x5ecae8,'cwd':_0x590488,'gzip':!![]});const _0x37cfdf=async _0x3828bc=>{const _0x5dce83=_0x5b3f1f;let _0x199e8e=0x0;const _0x436a45=await _0xfaf1f6[_0x5dce83(0xe1)](_0x3828bc,{'withFileTypes':!![]});for(const _0x830f7f of _0x436a45){const _0x1deea1=_0x2873fc['join'](_0x3828bc,_0x830f7f[_0x5dce83(0xa6)]);if(_0x830f7f[_0x5dce83(0xa8)]())_0x199e8e++;else _0x830f7f[_0x5dce83(0x9e)]()&&(_0x199e8e+=await _0x37cfdf(_0x1deea1));}return _0x199e8e;},_0x1facdd=await _0x37cfdf(_0x590488);return{'projectName':_0x7c0126,'revision':_0x1d4edd?.[_0x5b3f1f(0xbf)]||_0x5b3f1f(0xd8),'filesExtracted':_0x1facdd};}finally{try{await _0xfaf1f6['unlink'](_0x5ecae8);}catch{}}}async[a180_0x53c093(0xf1)](_0x4c0ad2,_0x5f2ef3){const _0xc6c9ca=a180_0x53c093,{promises:_0x1bb831}=await import('fs'),_0x3e2c3b=await import(_0xc6c9ca(0xb4)),_0x4bc7a0=await import(_0xc6c9ca(0xa7)),_0x40b853=_0x5f2ef3?.[_0xc6c9ca(0xef)]||_0x3e2c3b[_0xc6c9ca(0xa9)](_0x4c0ad2),_0xf9c666=_0x5f2ef3?.[_0xc6c9ca(0xbf)]||new Date()[_0xc6c9ca(0xba)]()['replace'](/[:.]/g,'-');try{await _0x1bb831[_0xc6c9ca(0x10e)](_0x4c0ad2);}catch{throw new Error(_0xc6c9ca(0xc3)+_0x4c0ad2);}if(!_0x5f2ef3?.[_0xc6c9ca(0xcb)]){const _0x2982ab=await _0x1bb831[_0xc6c9ca(0xe1)](_0x4c0ad2),_0x2da8ba=_0x2982ab[_0xc6c9ca(0xe8)](_0x77c2a6=>_0x77c2a6[_0xc6c9ca(0xa2)](WORKFLOW_FILE_EXTENSION));if(_0x2da8ba[_0xc6c9ca(0xec)]===0x0)throw new Error(_0xc6c9ca(0xc9)+WORKFLOW_FILE_EXTENSION+_0xc6c9ca(0x101));for(const _0x17d7a9 of _0x2da8ba){const _0x15d232=_0x3e2c3b[_0xc6c9ca(0xc5)](_0x4c0ad2,_0x17d7a9);try{await _0x1bb831[_0xc6c9ca(0x10e)](_0x15d232);}catch{throw new Error(_0xc6c9ca(0x11f)+_0x17d7a9);}}}const _0xea415f=async(_0x37b52a,_0xb5398c='')=>{const _0x379fe4=_0xc6c9ca,_0x12cd2d=await _0x1bb831[_0x379fe4(0xe1)](_0x37b52a,{'withFileTypes':!![]}),_0x12bb37=[];for(const _0x465fe1 of _0x12cd2d){const _0x58ec28=_0x3e2c3b['join'](_0xb5398c,_0x465fe1['name']),_0x110ecb=_0x3e2c3b[_0x379fe4(0xc5)](_0x37b52a,_0x465fe1['name']);if(!shouldIncludeInArchive(_0x465fe1['name']))continue;_0x465fe1[_0x379fe4(0x9e)]()?_0x12bb37[_0x379fe4(0xf1)](...await _0xea415f(_0x110ecb,_0x58ec28)):_0x12bb37[_0x379fe4(0xf1)](_0x58ec28);}return _0x12bb37;},_0x4d84d7=await _0xea415f(_0x4c0ad2),_0x32a2a8=await import('os'),_0x44d9fb=_0x32a2a8['tmpdir'](),_0x4918cc=_0x3e2c3b[_0xc6c9ca(0xc5)](_0x44d9fb,'tdx-workflow-push-'+Date['now']()+_0xc6c9ca(0xcd));try{await _0x4bc7a0[_0xc6c9ca(0xce)]({'file':_0x4918cc,'gzip':!![],'cwd':_0x4c0ad2,'portable':!![]},_0x4d84d7);const _0x541b69=await this[_0xc6c9ca(0xe6)][_0xc6c9ca(0xd3)](_0x40b853,_0xf9c666,_0x4918cc,{'scheduleFrom':_0x5f2ef3?.['scheduleFrom'],'clearSchedule':_0x5f2ef3?.[_0xc6c9ca(0xb8)],'clearScheduleAll':_0x5f2ef3?.[_0xc6c9ca(0xd0)]});return{'projectId':_0x541b69['id'],'projectName':_0x541b69[_0xc6c9ca(0xa6)],'revision':_0x541b69[_0xc6c9ca(0xbf)]};}finally{try{await _0x1bb831[_0xc6c9ca(0xeb)](_0x4918cc);}catch{}}}async[a180_0x53c093(0xbe)](_0xcfc367){const _0x28b30a=a180_0x53c093,{id:_0x63cdc1}=await this[_0x28b30a(0xc8)](_0xcfc367),_0x233660=await this[_0x28b30a(0xe6)][_0x28b30a(0xee)](_0x63cdc1);return{'projectId':_0x233660['id'],'projectName':_0x233660[_0x28b30a(0xa6)]};}async[a180_0x53c093(0xab)](_0x5a18ac){const _0x45b615=a180_0x53c093,{id:_0x475a25,name:_0x18fee0}=await this[_0x45b615(0xc8)](_0x5a18ac),_0x59977b=await this[_0x45b615(0xe6)]['listSecrets'](_0x475a25);return{'projectName':_0x18fee0,'secrets':_0x59977b};}async['setSecret'](_0x5bd775,_0x226191,_0x416f0a){const _0x12f474=a180_0x53c093,{id:_0x1041cd,name:_0x23fe1c}=await this['resolveProjectId'](_0x5bd775);return await this[_0x12f474(0xe6)]['setSecret'](_0x1041cd,_0x226191,_0x416f0a),{'projectName':_0x23fe1c,'key':_0x226191};}async[a180_0x53c093(0xd6)](_0x1a4e67,_0x4cbbfe){const _0x3067ef=a180_0x53c093,{id:_0x7abc1e,name:_0x4b17a8}=await this[_0x3067ef(0xc8)](_0x1a4e67),_0x453996=Object[_0x3067ef(0xc2)](_0x4cbbfe),_0x3b12f9=await Promise[_0x3067ef(0xdd)](_0x453996[_0x3067ef(0xf8)](_0x4af093=>this[_0x3067ef(0xe6)][_0x3067ef(0x109)](_0x7abc1e,_0x4af093,_0x4cbbfe[_0x4af093]))),_0x5169e0=_0x3b12f9[_0x3067ef(0xf8)]((_0x57958e,_0x4b5cf9)=>_0x57958e[_0x3067ef(0xbb)]==='rejected'?_0x453996[_0x4b5cf9]:null)[_0x3067ef(0xe8)](_0x256659=>_0x256659!==null);if(_0x5169e0[_0x3067ef(0xec)]>0x0)throw new SDKError(ErrorCode['WORKFLOW_SECRET_SET_FAILED'],_0x3067ef(0x10b)+(_0x5169e0[_0x3067ef(0xec)]>0x1?'s':'')+':\x20'+_0x5169e0[_0x3067ef(0xc5)](',\x20'));return{'projectName':_0x4b17a8,'keys':_0x453996};}async[a180_0x53c093(0x112)](_0x276143,_0x10a74d){const _0x11b71c=a180_0x53c093,{id:_0x3ffec5,name:_0x34082a}=await this[_0x11b71c(0xc8)](_0x276143);return await this[_0x11b71c(0xe6)][_0x11b71c(0x112)](_0x3ffec5,_0x10a74d),{'projectName':_0x34082a,'key':_0x10a74d};}async[a180_0x53c093(0xa3)](_0x3a9133,_0x3e4fc6){const _0x6361e2=a180_0x53c093;return pullWorkflow({'client':this['client'],'resolveProjectId':this[_0x6361e2(0xc8)]['bind'](this)},_0x3a9133,_0x3e4fc6);}async[a180_0x53c093(0x119)](_0xfb3cad,_0x4f90e7){const _0x18d715=a180_0x53c093;return applyPullResult({'client':this[_0x18d715(0xe6)],'resolveProjectId':this['resolveProjectId'][_0x18d715(0xf4)](this)},_0xfb3cad,_0x4f90e7);}async[a180_0x53c093(0xf5)](_0x5667ac){const _0x208506=a180_0x53c093;return preparePushWorkflow({'client':this[_0x208506(0xe6)],'resolveProjectId':this[_0x208506(0xc8)][_0x208506(0xf4)](this)},_0x5667ac);}async[a180_0x53c093(0x103)](_0x105161){const _0x3cd528=a180_0x53c093;return executePushWorkflow({'client':this[_0x3cd528(0xe6)],'resolveProjectId':this[_0x3cd528(0xc8)][_0x3cd528(0xf4)](this)},_0x105161);}async[a180_0x53c093(0xad)](_0x4c65ae,_0x4f7130,_0x1d47cb){const _0x221dad=a180_0x53c093;return prepareCloneWorkflow({'client':this[_0x221dad(0xe6)]},_0x4c65ae,_0x4f7130,_0x1d47cb);}async[a180_0x53c093(0x10d)](_0x53d12d){const _0x9f0ab=a180_0x53c093;return executeCloneWorkflow({'client':this[_0x9f0ab(0xe6)]},_0x53d12d);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5de281,_0x2fd257){const _0x5c74ea=a181_0x2d6c,_0x1f85ee=_0x5de281();while(!![]){try{const _0xb03d6e=-parseInt(_0x5c74ea(0x10f))/0x1+-parseInt(_0x5c74ea(0x119))/0x2+-parseInt(_0x5c74ea(0xf3))/0x3*(parseInt(_0x5c74ea(0xff))/0x4)+-parseInt(_0x5c74ea(0x104))/0x5+-parseInt(_0x5c74ea(0xf1))/0x6*(parseInt(_0x5c74ea(0x105))/0x7)+-parseInt(_0x5c74ea(0xed))/0x8+parseInt(_0x5c74ea(0xeb))/0x9*(parseInt(_0x5c74ea(0x10c))/0xa);if(_0xb03d6e===_0x2fd257)break;else _0x1f85ee['push'](_0x1f85ee['shift']());}catch(_0x3a4d7d){_0x1f85ee['push'](_0x1f85ee['shift']());}}}(a181_0x509b,0x3ec0c));function a181_0x2d6c(_0x246988,_0x3e8280){_0x246988=_0x246988-0xe5;const _0x509b45=a181_0x509b();let _0x2d6cd0=_0x509b45[_0x246988];return _0x2d6cd0;}import{existsSync,promises as a181_0x41611c}from'fs';import a181_0x3bb6df from'path';import a181_0x53e3bd from'os';import{generateDiff,formatDiffWithColors,hasChanges}from'../../utils/diff.js';function a181_0x509b(){const _0x757804=['tmpdir','latest','join','TAR_BAD_ARCHIVE','\x20(archive\x20size:\x20','extract','writeFile','503290ocTvnH','new','localeCompare','isNewProject','archive.tar.gz','message','size','downloadProjectArchive','\x20bytes)','zlib','projectId','push','path','27onPkfE','cwd','120456kuwOMk','readdir','revision','targetDir','1353822xgszuU','has','963633MHdSQG','mkdtemp','includes','modified','filter','catch','length','toISOString','The\x20archive\x20may\x20be\x20truncated\x20or\x20corrupted.\x20Try\x20pushing\x20a\x20new\x20revision\x20or\x20contact\x20support.','sort','tar','isDirectory','4jdNWQl','unchanged','extracted','deleted','tdx.json','68665jNgxIC','14lujEEV','stat','mkdir','WORKFLOW_ARCHIVE_CORRUPTED','readFile','utf-8','The\x20archive\x20passed\x20initial\x20validation\x20but\x20extraction\x20failed.\x20','4866930PHYXRJ','Failed\x20to\x20extract\x20project\x20archive','name','150123tYBhvy','changes','type'];a181_0x509b=function(){return _0x757804;};return a181_0x509b();}import{getWorkflowProjectDir,createWorkflowTdxConfigContent,updateWorkflowTdxConfig}from'./tdx-config.js';import{SDKError,ErrorCode}from'../errors.js';export async function pullWorkflow(_0x2d443f,_0xbbcec5,_0x9fe5ab={}){const _0x4f2206=a181_0x2d6c,_0x4a4c27=await import(_0x4f2206(0xfd)),{client:_0x510f2b,resolveProjectId:_0x2a08a9}=_0x2d443f,{id:_0x2ccee8,name:_0x49c919}=await _0x2a08a9(_0xbbcec5),_0x3502ba=_0x9fe5ab['baseDir']||process[_0x4f2206(0xec)](),_0x4edb08=_0x9fe5ab[_0x4f2206(0xf0)]||getWorkflowProjectDir(_0x49c919,_0x3502ba),_0x1bdab4=a181_0x3bb6df['join'](_0x4edb08,_0x4f2206(0x103)),_0x4384c5=!existsSync(_0x1bdab4),_0x119eca=await a181_0x41611c['mkdtemp'](a181_0x3bb6df[_0x4f2206(0x114)](a181_0x53e3bd[_0x4f2206(0x112)](),'tdx-wf-pull-')),_0x3e769c=a181_0x3bb6df['join'](_0x119eca,_0x4f2206(0x11d)),_0x1cabf8=a181_0x3bb6df[_0x4f2206(0x114)](_0x119eca,_0x4f2206(0x101));try{await _0x510f2b['downloadProjectArchive'](_0x2ccee8,_0x3e769c,_0x9fe5ab[_0x4f2206(0xef)]),await a181_0x41611c[_0x4f2206(0x107)](_0x1cabf8,{'recursive':!![]});try{await _0x4a4c27[_0x4f2206(0x117)]({'file':_0x3e769c,'cwd':_0x1cabf8,'gzip':!![]});}catch(_0x1b4113){const _0x1d39bb=_0x1b4113 instanceof Error?_0x1b4113[_0x4f2206(0x11e)]:String(_0x1b4113);if(_0x1d39bb[_0x4f2206(0xf5)](_0x4f2206(0x115))||_0x1d39bb['includes']('zlib')){const _0x22aef9=await a181_0x41611c[_0x4f2206(0x106)](_0x3e769c)[_0x4f2206(0xf8)](()=>null),_0x3c47eb=_0x22aef9?'\x20(archive\x20size:\x20'+_0x22aef9[_0x4f2206(0x11f)]+_0x4f2206(0xe6):'';throw new SDKError(ErrorCode[_0x4f2206(0x108)],_0x4f2206(0x10d)+_0x3c47eb+':\x20'+_0x1d39bb,_0x1b4113,{'helpText':'The\x20archive\x20passed\x20initial\x20validation\x20but\x20extraction\x20failed.\x20'+_0x4f2206(0xfb)});}throw _0x1b4113;}const _0xaa6ff6=await _0x510f2b['getProject'](_0x2ccee8),_0x57ab94=_0x9fe5ab[_0x4f2206(0xef)]||_0xaa6ff6['revision']||_0x4f2206(0x113),_0x33f142=await calculateChanges(_0x4edb08,_0x1cabf8,_0x4384c5),_0x43b659={'new':_0x33f142['filter'](_0x3a3bd1=>_0x3a3bd1['type']==='new')['length'],'modified':_0x33f142['filter'](_0x552f54=>_0x552f54['type']===_0x4f2206(0xf6))[_0x4f2206(0xf9)],'deleted':_0x33f142[_0x4f2206(0xf7)](_0x109ab0=>_0x109ab0['type']===_0x4f2206(0x102))[_0x4f2206(0xf9)],'unchanged':_0x33f142[_0x4f2206(0xf7)](_0x32ffba=>_0x32ffba['type']===_0x4f2206(0x100))['length']};return{'projectName':_0x49c919,'projectId':_0x2ccee8,'revision':_0x57ab94,'targetDir':_0x4edb08,'changes':_0x33f142,'summary':_0x43b659,'hasChanges':_0x43b659[_0x4f2206(0x11a)]>0x0||_0x43b659[_0x4f2206(0xf6)]>0x0||_0x43b659[_0x4f2206(0x102)]>0x0,'isNewProject':_0x4384c5};}finally{await a181_0x41611c['rm'](_0x119eca,{'recursive':!![],'force':!![]});}}export async function applyPullResult(_0x2990fe,_0x395fc5,_0x6bc5d6={}){const _0x589312=a181_0x2d6c,_0x2c92e2=await import(_0x589312(0xfd)),{client:_0x3527cc}=_0x2990fe,_0x3ca9de=await a181_0x41611c[_0x589312(0xf4)](a181_0x3bb6df[_0x589312(0x114)](a181_0x53e3bd[_0x589312(0x112)](),'tdx-wf-apply-')),_0x2a49d2=a181_0x3bb6df[_0x589312(0x114)](_0x3ca9de,_0x589312(0x11d));try{await _0x3527cc[_0x589312(0xe5)](_0x395fc5[_0x589312(0xe8)],_0x2a49d2,_0x6bc5d6[_0x589312(0xef)]),await a181_0x41611c[_0x589312(0x107)](_0x395fc5[_0x589312(0xf0)],{'recursive':!![]});for(const _0xb8f518 of _0x395fc5[_0x589312(0x110)]){if(_0xb8f518[_0x589312(0x111)]===_0x589312(0x102)){const _0x1bf948=a181_0x3bb6df[_0x589312(0x114)](_0x395fc5[_0x589312(0xf0)],_0xb8f518[_0x589312(0xea)]);await a181_0x41611c['unlink'](_0x1bf948)['catch'](()=>{});}}try{await _0x2c92e2[_0x589312(0x117)]({'file':_0x2a49d2,'cwd':_0x395fc5[_0x589312(0xf0)],'gzip':!![]});}catch(_0x4f680f){const _0x16c250=_0x4f680f instanceof Error?_0x4f680f[_0x589312(0x11e)]:String(_0x4f680f);if(_0x16c250[_0x589312(0xf5)]('TAR_BAD_ARCHIVE')||_0x16c250[_0x589312(0xf5)](_0x589312(0xe7))){const _0xfebedc=await a181_0x41611c[_0x589312(0x106)](_0x2a49d2)[_0x589312(0xf8)](()=>null),_0x214123=_0xfebedc?_0x589312(0x116)+_0xfebedc['size']+'\x20bytes)':'';throw new SDKError(ErrorCode[_0x589312(0x108)],_0x589312(0x10d)+_0x214123+':\x20'+_0x16c250,_0x4f680f,{'helpText':_0x589312(0x10b)+_0x589312(0xfb)});}throw _0x4f680f;}const _0x2671a1=a181_0x3bb6df[_0x589312(0x114)](_0x395fc5[_0x589312(0xf0)],_0x589312(0x103));if(_0x395fc5[_0x589312(0x11c)]){const _0x465a7d=createWorkflowTdxConfigContent(_0x395fc5['projectName'],_0x395fc5['projectId'],_0x395fc5['revision']);await a181_0x41611c[_0x589312(0x118)](_0x2671a1,_0x465a7d,_0x589312(0x10a));}else updateWorkflowTdxConfig(_0x2671a1,{'last_pulled_revision':_0x395fc5['revision'],'last_pulled_at':new Date()[_0x589312(0xfa)]()});}finally{await a181_0x41611c['rm'](_0x3ca9de,{'recursive':!![],'force':!![]});}}async function calculateChanges(_0x1cb74d,_0x1ae4f8,_0x3a7e3c){const _0x18d0bf=a181_0x2d6c,_0x412735=[],_0x301ad9=await getAllFiles(_0x1ae4f8),_0x2c80e6=existsSync(_0x1cb74d)?await getAllFiles(_0x1cb74d):new Set();for(const _0x50e635 of _0x301ad9){const _0x493bd8=a181_0x3bb6df[_0x18d0bf(0x114)](_0x1cb74d,_0x50e635),_0x3b2227=a181_0x3bb6df[_0x18d0bf(0x114)](_0x1ae4f8,_0x50e635);if(_0x50e635===_0x18d0bf(0x103))continue;const _0x15ca06=await a181_0x41611c[_0x18d0bf(0x109)](_0x3b2227,_0x18d0bf(0x10a))[_0x18d0bf(0xf8)](()=>null);if(_0x15ca06===null)continue;if(!existsSync(_0x493bd8)||_0x3a7e3c)_0x412735[_0x18d0bf(0xe9)]({'path':_0x50e635,'type':_0x18d0bf(0x11a),'newContent':_0x15ca06});else{const _0x55702b=await a181_0x41611c[_0x18d0bf(0x109)](_0x493bd8,_0x18d0bf(0x10a))[_0x18d0bf(0xf8)](()=>null);if(_0x55702b===null)_0x412735[_0x18d0bf(0xe9)]({'path':_0x50e635,'type':'modified','newContent':_0x15ca06});else{if(_0x55702b!==_0x15ca06){const _0x1842f4=generateDiff(_0x55702b,_0x15ca06),_0x51e0a4=hasChanges(_0x1842f4)?formatDiffWithColors(_0x1842f4):undefined;_0x412735[_0x18d0bf(0xe9)]({'path':_0x50e635,'type':'modified','oldContent':_0x55702b,'newContent':_0x15ca06,'diff':_0x51e0a4});}else _0x412735[_0x18d0bf(0xe9)]({'path':_0x50e635,'type':_0x18d0bf(0x100)});}}}if(!_0x3a7e3c)for(const _0x54e13e of _0x2c80e6){if(_0x54e13e===_0x18d0bf(0x103))continue;if(!_0x301ad9[_0x18d0bf(0xf2)](_0x54e13e)){const _0x418874=a181_0x3bb6df[_0x18d0bf(0x114)](_0x1cb74d,_0x54e13e),_0x253f74=await a181_0x41611c[_0x18d0bf(0x109)](_0x418874,_0x18d0bf(0x10a))[_0x18d0bf(0xf8)](()=>undefined);_0x412735[_0x18d0bf(0xe9)]({'path':_0x54e13e,'type':'deleted','oldContent':_0x253f74});}}return _0x412735[_0x18d0bf(0xfc)]((_0x47ca25,_0x593b90)=>_0x47ca25[_0x18d0bf(0xea)][_0x18d0bf(0x11b)](_0x593b90[_0x18d0bf(0xea)])),_0x412735;}async function getAllFiles(_0xd1b4,_0x5d94ed=''){const _0x880b62=a181_0x2d6c,_0x184564=new Set();if(!existsSync(_0xd1b4))return _0x184564;const _0x12360c=await a181_0x41611c[_0x880b62(0xee)](_0xd1b4,{'withFileTypes':!![]});for(const _0x74e539 of _0x12360c){const _0x440dff=_0x5d94ed?a181_0x3bb6df['join'](_0x5d94ed,_0x74e539[_0x880b62(0x10e)]):_0x74e539['name'];if(_0x74e539[_0x880b62(0xfe)]()){const _0x56e0ab=await getAllFiles(a181_0x3bb6df[_0x880b62(0x114)](_0xd1b4,_0x74e539[_0x880b62(0x10e)]),_0x440dff);for(const _0x352403 of _0x56e0ab){_0x184564['add'](_0x352403);}}else _0x184564['add'](_0x440dff);}return _0x184564;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a182_0x274b(_0x323c85,_0x459298){_0x323c85=_0x323c85-0x12c;const _0x29f56e=a182_0x29f5();let _0x274b4c=_0x29f56e[_0x323c85];return _0x274b4c;}(function(_0x4f1370,_0x1346dc){const _0x5a4940=a182_0x274b,_0x4919ec=_0x4f1370();while(!![]){try{const _0x59cb47=parseInt(_0x5a4940(0x136))/0x1+parseInt(_0x5a4940(0x13f))/0x2*(parseInt(_0x5a4940(0x133))/0x3)+parseInt(_0x5a4940(0x14c))/0x4*(-parseInt(_0x5a4940(0x159))/0x5)+-parseInt(_0x5a4940(0x163))/0x6+-parseInt(_0x5a4940(0x162))/0x7*(parseInt(_0x5a4940(0x144))/0x8)+-parseInt(_0x5a4940(0x130))/0x9+parseInt(_0x5a4940(0x15e))/0xa;if(_0x59cb47===_0x1346dc)break;else _0x4919ec['push'](_0x4919ec['shift']());}catch(_0x4a051f){_0x4919ec['push'](_0x4919ec['shift']());}}}(a182_0x29f5,0xd7d29));import{promises as a182_0x5ae37d}from'fs';import a182_0x31f677 from'path';import a182_0x5c1693 from'os';import{generateDiff,formatDiffWithColors,hasChanges}from'../../utils/diff.js';import{findWorkflowTdxConfig,updateWorkflowTdxConfig}from'./tdx-config.js';import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION,loadDigdagignore,createIgnoreInstance,addScopedPatterns,shouldIgnoreWithInstance}from'./workflow-utils.js';import{SDKError,ErrorCode}from'../errors.js';export async function preparePushWorkflow(_0x1af787,_0x76044f={}){const _0x1a500e=a182_0x274b,_0x4c26c6=await import(_0x1a500e(0x151)),{client:_0xe45a5c,resolveProjectId:_0x4e15aa}=_0x1af787,_0x58ad42=_0x76044f['sourceDir']||process['cwd'](),_0x58e4f2=findWorkflowTdxConfig(_0x58ad42),{config:_0x4cd4c2,configDir:_0x4da549}=_0x58e4f2;let _0x2b6968,_0x412cbc=_0x4cd4c2[_0x1a500e(0x14a)];try{const _0x1b976d=await _0x4e15aa(_0x4cd4c2[_0x1a500e(0x14a)]);_0x2b6968=_0x1b976d['id'],_0x412cbc=_0x1b976d[_0x1a500e(0x145)];}catch{_0x2b6968='';}const _0x414639=_0x76044f['revision']||new Date()[_0x1a500e(0x15b)]()[_0x1a500e(0x12d)](/[:.]/g,'-');if(!_0x76044f['skipValidation']){const _0x30b02c=await a182_0x5ae37d[_0x1a500e(0x140)](_0x4da549),_0x23ae87=_0x30b02c[_0x1a500e(0x132)](_0x17e178=>_0x17e178[_0x1a500e(0x157)](WORKFLOW_FILE_EXTENSION));if(_0x23ae87[_0x1a500e(0x131)]===0x0)throw new Error(_0x1a500e(0x154)+WORKFLOW_FILE_EXTENSION+_0x1a500e(0x138)+_0x4da549);}const _0x47f399=await getProjectFiles(_0x4da549);let _0x38f1a0;if(_0x2b6968){const _0x5496e1=await a182_0x5ae37d['mkdtemp'](a182_0x31f677[_0x1a500e(0x147)](a182_0x5c1693[_0x1a500e(0x14b)](),'tdx-wf-push-')),_0x5ba48a=a182_0x31f677[_0x1a500e(0x147)](_0x5496e1,_0x1a500e(0x12c)),_0x3214b1=a182_0x31f677[_0x1a500e(0x147)](_0x5496e1,'extracted');try{await _0xe45a5c['downloadProjectArchive'](_0x2b6968,_0x5ba48a),await a182_0x5ae37d[_0x1a500e(0x15f)](_0x3214b1,{'recursive':!![]});try{await _0x4c26c6[_0x1a500e(0x14e)]({'file':_0x5ba48a,'cwd':_0x3214b1,'gzip':!![]});}catch(_0x1053c9){const _0x1929c4=_0x1053c9 instanceof Error?_0x1053c9['message']:String(_0x1053c9);if(_0x1929c4[_0x1a500e(0x14d)](_0x1a500e(0x15c))||_0x1929c4[_0x1a500e(0x14d)](_0x1a500e(0x135))){const _0x1432a1=await a182_0x5ae37d[_0x1a500e(0x141)](_0x5ba48a)[_0x1a500e(0x165)](()=>null),_0xca0a28=_0x1432a1?'\x20(archive\x20size:\x20'+_0x1432a1[_0x1a500e(0x12f)]+'\x20bytes)':'';throw new SDKError(ErrorCode[_0x1a500e(0x134)],_0x1a500e(0x148)+_0xca0a28+':\x20'+_0x1929c4,_0x1053c9,{'helpText':_0x1a500e(0x13a)});}throw _0x1053c9;}_0x38f1a0=await calculatePushChanges(_0x4da549,_0x3214b1,_0x47f399);}finally{await a182_0x5ae37d['rm'](_0x5496e1,{'recursive':!![],'force':!![]});}}else{_0x38f1a0=[];for(const _0x30104b of _0x47f399){const _0x42cc17=a182_0x31f677[_0x1a500e(0x147)](_0x4da549,_0x30104b),_0x461a14=await a182_0x5ae37d['readFile'](_0x42cc17,_0x1a500e(0x142))[_0x1a500e(0x165)](()=>null);_0x38f1a0['push']({'path':_0x30104b,'type':'new','newContent':_0x461a14||undefined});}}const _0x2951ec={'new':_0x38f1a0[_0x1a500e(0x132)](_0x2df310=>_0x2df310[_0x1a500e(0x13c)]===_0x1a500e(0x150))['length'],'modified':_0x38f1a0[_0x1a500e(0x132)](_0x109415=>_0x109415[_0x1a500e(0x13c)]===_0x1a500e(0x160))['length'],'deleted':_0x38f1a0[_0x1a500e(0x132)](_0x2b65fc=>_0x2b65fc['type']===_0x1a500e(0x13b))[_0x1a500e(0x131)],'unchanged':_0x38f1a0[_0x1a500e(0x132)](_0x539d81=>_0x539d81['type']===_0x1a500e(0x14f))[_0x1a500e(0x131)]};return{'projectName':_0x412cbc,'projectId':_0x2b6968,'revision':_0x414639,'sourceDir':_0x4da549,'changes':_0x38f1a0,'summary':_0x2951ec,'hasChanges':_0x2951ec['new']>0x0||_0x2951ec[_0x1a500e(0x160)]>0x0||_0x2951ec['deleted']>0x0,'configResult':_0x58e4f2};}export async function executePushWorkflow(_0x1e5c59,_0xae8150){const _0x41d412=a182_0x274b,_0x274fb4=await import(_0x41d412(0x151)),{client:_0x349f73}=_0x1e5c59,_0x4a0bf4=await getProjectFiles(_0xae8150[_0x41d412(0x13e)]),_0x5e39e8=await a182_0x5ae37d['mkdtemp'](a182_0x31f677['join'](a182_0x5c1693[_0x41d412(0x14b)](),_0x41d412(0x137))),_0x2309f8=a182_0x31f677['join'](_0x5e39e8,_0x41d412(0x12c));try{await _0x274fb4[_0x41d412(0x12e)]({'file':_0x2309f8,'gzip':!![],'cwd':_0xae8150[_0x41d412(0x13e)],'portable':!![]},_0x4a0bf4);const _0x5cd4ec=await _0x349f73[_0x41d412(0x152)](_0xae8150['projectName'],_0xae8150[_0x41d412(0x153)],_0x2309f8);return updateWorkflowTdxConfig(_0xae8150[_0x41d412(0x161)][_0x41d412(0x155)],{'workflow_project_id':_0x5cd4ec['id'],'last_pushed_revision':_0x5cd4ec[_0x41d412(0x153)],'last_pushed_at':new Date()[_0x41d412(0x15b)]()}),{'projectId':_0x5cd4ec['id'],'projectName':_0x5cd4ec[_0x41d412(0x145)],'revision':_0x5cd4ec[_0x41d412(0x153)]};}finally{await a182_0x5ae37d['rm'](_0x5e39e8,{'recursive':!![],'force':!![]});}}async function getProjectFiles(_0x3873b8,_0x4805bf=_0x3873b8,_0x3050b4='',_0x1e31b2=null){const _0x11bc24=a182_0x274b,_0x2ae8ca=[];if(_0x1e31b2===null){_0x1e31b2=createIgnoreInstance();const _0x43f5b6=await loadDigdagignore(_0x3873b8);_0x43f5b6&&_0x1e31b2[_0x11bc24(0x146)](_0x43f5b6);}if(_0x3050b4!==''){const _0x1f23d5=await loadDigdagignore(_0x4805bf);_0x1f23d5&&addScopedPatterns(_0x1e31b2,_0x1f23d5,_0x3050b4);}const _0x308c7d=await a182_0x5ae37d[_0x11bc24(0x140)](_0x4805bf,{'withFileTypes':!![]});for(const _0x3301bd of _0x308c7d){const _0x5a0ff1=_0x3050b4?a182_0x31f677[_0x11bc24(0x13d)][_0x11bc24(0x147)](_0x3050b4,_0x3301bd[_0x11bc24(0x145)]):_0x3301bd[_0x11bc24(0x145)];if(_0x3301bd[_0x11bc24(0x145)]===_0x11bc24(0x139))continue;if(_0x3301bd[_0x11bc24(0x145)]===_0x11bc24(0x156))continue;if(!shouldIncludeInArchive(_0x3301bd[_0x11bc24(0x145)]))continue;if(shouldIgnoreWithInstance(_0x1e31b2,_0x5a0ff1,_0x3301bd[_0x11bc24(0x164)]()))continue;if(_0x3301bd[_0x11bc24(0x164)]()){const _0x31927e=await getProjectFiles(_0x3873b8,a182_0x31f677[_0x11bc24(0x147)](_0x4805bf,_0x3301bd['name']),_0x5a0ff1,_0x1e31b2);_0x2ae8ca[_0x11bc24(0x15a)](..._0x31927e);}else _0x2ae8ca[_0x11bc24(0x15a)](_0x5a0ff1);}return _0x2ae8ca;}async function calculatePushChanges(_0x3d655b,_0x22edb4,_0x44448b){const _0x38c720=a182_0x274b,_0x3129dd=[],_0x431f07=new Set(await getProjectFiles(_0x22edb4));for(const _0x51e729 of _0x44448b){const _0x5735ca=a182_0x31f677[_0x38c720(0x147)](_0x3d655b,_0x51e729),_0x5027b3=a182_0x31f677[_0x38c720(0x147)](_0x22edb4,_0x51e729),_0x183f84=await a182_0x5ae37d[_0x38c720(0x143)](_0x5735ca,'utf-8')[_0x38c720(0x165)](()=>null);if(_0x183f84===null)continue;if(!_0x431f07[_0x38c720(0x158)](_0x51e729))_0x3129dd[_0x38c720(0x15a)]({'path':_0x51e729,'type':_0x38c720(0x150),'newContent':_0x183f84});else{const _0x1a872f=await a182_0x5ae37d['readFile'](_0x5027b3,_0x38c720(0x142))[_0x38c720(0x165)](()=>null);if(_0x1a872f===null)_0x3129dd[_0x38c720(0x15a)]({'path':_0x51e729,'type':_0x38c720(0x160),'newContent':_0x183f84});else{if(_0x1a872f!==_0x183f84){const _0x39d856=generateDiff(_0x1a872f,_0x183f84),_0x4ecf1e=hasChanges(_0x39d856)?formatDiffWithColors(_0x39d856):undefined;_0x3129dd[_0x38c720(0x15a)]({'path':_0x51e729,'type':_0x38c720(0x160),'oldContent':_0x1a872f,'newContent':_0x183f84,'diff':_0x4ecf1e});}else _0x3129dd[_0x38c720(0x15a)]({'path':_0x51e729,'type':_0x38c720(0x14f)});}}}for(const _0x47fd0f of _0x431f07){if(!_0x44448b[_0x38c720(0x14d)](_0x47fd0f)){const _0x8d98b2=a182_0x31f677[_0x38c720(0x147)](_0x22edb4,_0x47fd0f),_0x20ac17=await a182_0x5ae37d[_0x38c720(0x143)](_0x8d98b2,_0x38c720(0x142))['catch'](()=>undefined);_0x3129dd[_0x38c720(0x15a)]({'path':_0x47fd0f,'type':_0x38c720(0x13b),'oldContent':_0x20ac17});}}return _0x3129dd[_0x38c720(0x149)]((_0x4ae40d,_0x376a61)=>_0x4ae40d['path'][_0x38c720(0x15d)](_0x376a61['path'])),_0x3129dd;}function a182_0x29f5(){const _0x4b35d7=['modified','configResult','28sbstcw','7125138YdhwHL','isDirectory','catch','archive.tar.gz','replace','create','size','5817618grNkHl','length','filter','25527EFmDPh','WORKFLOW_ARCHIVE_CORRUPTED','zlib','247996DJFnPd','tdx-wf-push-archive-','\x20workflow\x20files\x20found\x20in\x20','tdx.json','Use\x20\x27tdx\x20wf\x20upload\x27\x20to\x20force\x20push\x20without\x20comparison.','deleted','type','posix','sourceDir','120GISjmX','readdir','stat','utf-8','readFile','729560UoTZEb','name','add','join','Failed\x20to\x20extract\x20remote\x20project\x20archive\x20for\x20comparison','sort','workflow_project','tmpdir','44LWNyfO','includes','extract','unchanged','new','tar','uploadProjectArchive','revision','No\x20','configPath','.digdagignore','endsWith','has','60575ySLmWY','push','toISOString','TAR_BAD_ARCHIVE','localeCompare','24574430eGEJOT','mkdir'];a182_0x29f5=function(){return _0x4b35d7;};return a182_0x29f5();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a183_0x2a1e32=a183_0x5a78;(function(_0x589da8,_0x5de28d){const _0xae9f97=a183_0x5a78,_0x35b4a5=_0x589da8();while(!![]){try{const _0x278a75=parseInt(_0xae9f97(0x101))/0x1+parseInt(_0xae9f97(0x10e))/0x2+parseInt(_0xae9f97(0xf8))/0x3*(-parseInt(_0xae9f97(0x112))/0x4)+parseInt(_0xae9f97(0x111))/0x5*(parseInt(_0xae9f97(0x106))/0x6)+parseInt(_0xae9f97(0x10b))/0x7+parseInt(_0xae9f97(0x108))/0x8*(parseInt(_0xae9f97(0xfd))/0x9)+-parseInt(_0xae9f97(0x103))/0xa;if(_0x278a75===_0x5de28d)break;else _0x35b4a5['push'](_0x35b4a5['shift']());}catch(_0x1d4061){_0x35b4a5['push'](_0x35b4a5['shift']());}}}(a183_0x34e8,0xcc38f));import{existsSync,readFileSync,writeFileSync}from'fs';import a183_0x4c50a6 from'path';const TDX_CONFIG_FILE='tdx.json',WORKFLOWS_DIR=a183_0x2a1e32(0x113);export function findWorkflowTdxConfigPath(_0x1f3675=process[a183_0x2a1e32(0x104)]()){const _0x4931fe=a183_0x2a1e32;let _0x5b57e2=a183_0x4c50a6[_0x4931fe(0xfc)](_0x1f3675);const _0xec7ca2=a183_0x4c50a6['parse'](_0x5b57e2)[_0x4931fe(0x107)];while(_0x5b57e2!==_0xec7ca2){const _0x31ce13=a183_0x4c50a6['join'](_0x5b57e2,TDX_CONFIG_FILE);if(existsSync(_0x31ce13))try{const _0x512956=readFileSync(_0x31ce13,_0x4931fe(0x105)),_0x328556=JSON[_0x4931fe(0x10c)](_0x512956);if(_0x328556&&typeof _0x328556===_0x4931fe(0xfe)&&_0x4931fe(0xf5)in _0x328556)return _0x31ce13;}catch{}_0x5b57e2=a183_0x4c50a6[_0x4931fe(0xf6)](_0x5b57e2);}return null;}export function loadWorkflowTdxConfig(_0x3fbf60){const _0x40a601=a183_0x2a1e32,_0x3567cf=readFileSync(_0x3fbf60,_0x40a601(0x105));let _0xa007ff;try{_0xa007ff=JSON[_0x40a601(0x10c)](_0x3567cf);}catch{throw new Error(_0x40a601(0xfa)+_0x3fbf60);}if(!_0xa007ff||typeof _0xa007ff!==_0x40a601(0xfe))throw new Error(_0x40a601(0xfb));const _0x48f6a5=_0xa007ff;if(!_0x48f6a5['workflow_project']||typeof _0x48f6a5[_0x40a601(0xf5)]!=='string')throw new Error(_0x40a601(0x10a));return{'workflow_project':_0x48f6a5[_0x40a601(0xf5)],'workflow_project_id':typeof _0x48f6a5[_0x40a601(0x100)]===_0x40a601(0x10d)?_0x48f6a5[_0x40a601(0x100)]:undefined,'last_pulled_revision':typeof _0x48f6a5['last_pulled_revision']===_0x40a601(0x10d)?_0x48f6a5['last_pulled_revision']:undefined,'last_pulled_at':typeof _0x48f6a5[_0x40a601(0x102)]===_0x40a601(0x10d)?_0x48f6a5['last_pulled_at']:undefined,'last_pushed_revision':typeof _0x48f6a5[_0x40a601(0xff)]===_0x40a601(0x10d)?_0x48f6a5[_0x40a601(0xff)]:undefined,'last_pushed_at':typeof _0x48f6a5[_0x40a601(0x110)]===_0x40a601(0x10d)?_0x48f6a5[_0x40a601(0x110)]:undefined};}export function findWorkflowTdxConfig(_0x45b3f8=process['cwd']()){const _0x52fe=a183_0x2a1e32,_0x26947d=findWorkflowTdxConfigPath(_0x45b3f8);if(!_0x26947d)throw new Error(_0x52fe(0xf7));const _0x5d9286=loadWorkflowTdxConfig(_0x26947d),_0x1a1181=a183_0x4c50a6[_0x52fe(0xf6)](_0x26947d);return{'config':_0x5d9286,'configPath':_0x26947d,'configDir':_0x1a1181};}function a183_0x5a78(_0x3b0c4d,_0x4f1d15){_0x3b0c4d=_0x3b0c4d-0xf5;const _0x34e8c5=a183_0x34e8();let _0x5a7862=_0x34e8c5[_0x3b0c4d];return _0x5a7862;}export function tryFindWorkflowTdxConfig(_0x3a4509){try{return findWorkflowTdxConfig(_0x3a4509);}catch{return null;}}export function getWorkflowProjectDir(_0x53b5ea,_0x452785=process[a183_0x2a1e32(0x104)]()){const _0x149a67=a183_0x2a1e32;return a183_0x4c50a6[_0x149a67(0x10f)](_0x452785,WORKFLOWS_DIR,_0x53b5ea);}export function getWorkflowTdxConfigPath(_0x5d95bb,_0x32f6d9=process['cwd']()){const _0x29765b=a183_0x2a1e32;return a183_0x4c50a6[_0x29765b(0x10f)](getWorkflowProjectDir(_0x5d95bb,_0x32f6d9),TDX_CONFIG_FILE);}export function createWorkflowTdxConfigContent(_0x4bb48c,_0x5d0de7,_0x15246a){const _0x19670c=a183_0x2a1e32,_0x5d6abc={'workflow_project':_0x4bb48c,..._0x5d0de7&&{'workflow_project_id':_0x5d0de7},..._0x15246a&&{'last_pulled_revision':_0x15246a},'last_pulled_at':new Date()[_0x19670c(0xf9)]()};return JSON[_0x19670c(0x109)](_0x5d6abc,null,0x2)+'\x0a';}export function saveWorkflowTdxConfig(_0x2700f6,_0x71c9ba){const _0x39b9c4=a183_0x2a1e32,_0x15d7a3=JSON[_0x39b9c4(0x109)](_0x71c9ba,null,0x2)+'\x0a';writeFileSync(_0x2700f6,_0x15d7a3,_0x39b9c4(0x105));}export function updateWorkflowTdxConfig(_0x595823,_0x389f39){const _0x1cf559=loadWorkflowTdxConfig(_0x595823),_0x4a3fa7={..._0x1cf559,..._0x389f39};saveWorkflowTdxConfig(_0x595823,_0x4a3fa7);}function a183_0x34e8(){const _0x207f52=['workflows','workflow_project','dirname','No\x20workflow\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','33585VNfLel','toISOString','Invalid\x20JSON\x20in\x20','Invalid\x20tdx.json:\x20expected\x20object','resolve','9mLJOGx','object','last_pushed_revision','workflow_project_id','1639944AVliDI','last_pulled_at','16702950kmtWcK','cwd','utf-8','177306wFGpor','root','1089968LtwTAr','stringify','Invalid\x20tdx.json:\x20missing\x20or\x20invalid\x20\x27workflow_project\x27\x20field','1696331HezSpu','parse','string','1672438HUJRih','join','last_pushed_at','15fsgMQq','156LYAavJ'];a183_0x34e8=function(){return _0x207f52;};return a183_0x34e8();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a184_0x237284=a184_0x25e5;(function(_0x58bb38,_0x575656){const _0x593453=a184_0x25e5,_0x1e48f2=_0x58bb38();while(!![]){try{const _0x3573e3=-parseInt(_0x593453(0x17f))/0x1+-parseInt(_0x593453(0x191))/0x2+parseInt(_0x593453(0x18e))/0x3*(-parseInt(_0x593453(0x196))/0x4)+parseInt(_0x593453(0x184))/0x5*(-parseInt(_0x593453(0x18c))/0x6)+parseInt(_0x593453(0x192))/0x7*(parseInt(_0x593453(0x18f))/0x8)+parseInt(_0x593453(0x17d))/0x9+parseInt(_0x593453(0x17e))/0xa*(parseInt(_0x593453(0x193))/0xb);if(_0x3573e3===_0x575656)break;else _0x1e48f2['push'](_0x1e48f2['shift']());}catch(_0x558c70){_0x1e48f2['push'](_0x1e48f2['shift']());}}}(a184_0x453a,0x7a605));import{promises as a184_0x41db61}from'fs';import a184_0x32aadb from'path';import a184_0x23a21a from'ignore';export const WORKFLOW_FILE_EXTENSION=a184_0x237284(0x189);function a184_0x25e5(_0x470a32,_0x335c68){_0x470a32=_0x470a32-0x17c;const _0x453a4a=a184_0x453a();let _0x25e5d7=_0x453a4a[_0x470a32];return _0x25e5d7;}export function shouldIncludeInArchive(_0x2b4e1e){const _0x1e2e85=a184_0x237284;if(_0x2b4e1e===_0x1e2e85(0x17c))return!![];if(_0x2b4e1e[_0x1e2e85(0x197)]('.'))return![];if(_0x2b4e1e['endsWith']('~'))return![];if(_0x2b4e1e===_0x1e2e85(0x186)||_0x2b4e1e===_0x1e2e85(0x18a))return![];return!![];}export function parseDigdagignore(_0x1a3be0){const _0x256f22=a184_0x237284;return _0x1a3be0[_0x256f22(0x190)]('\x0a')[_0x256f22(0x188)](_0x4b7ecd=>_0x4b7ecd['trim']())[_0x256f22(0x194)](_0x152945=>_0x152945[_0x256f22(0x183)]>0x0&&!_0x152945[_0x256f22(0x197)]('#'));}export async function loadDigdagignore(_0x17f057){const _0x40e22f=a184_0x237284,_0x20462d=a184_0x32aadb[_0x40e22f(0x18b)](_0x17f057,_0x40e22f(0x182));try{const _0x30055d=await a184_0x41db61[_0x40e22f(0x195)](_0x20462d,_0x40e22f(0x187));return parseDigdagignore(_0x30055d);}catch(_0x1a8c3f){if(_0x1a8c3f[_0x40e22f(0x185)]===_0x40e22f(0x181))return null;throw _0x1a8c3f;}}function a184_0x453a(){const _0x3d3740=['filter','readFile','50788yzOsmW','startsWith','slice','.digdag','8562411rDkxYz','14217310SHnDAu','569034XOskEP','add','ENOENT','.digdagignore','length','1332745VgbePp','code','Thumbs.db','utf-8','map','.dig','.DS_Store','join','12hmJKNR','ignores','219pKnsGr','21496yJcoEp','split','1082928AMWhtL','1820IlCxNd','11COcbRc'];a184_0x453a=function(){return _0x3d3740;};return a184_0x453a();}export function createIgnoreInstance(_0x1c290b){const _0x588cad=a184_0x237284,_0x44394e=a184_0x23a21a();return _0x1c290b&&_0x1c290b['length']>0x0&&_0x44394e[_0x588cad(0x180)](_0x1c290b),_0x44394e;}export function addScopedPatterns(_0xcf32e,_0x2c1f88,_0x1c8190){const _0x2535d2=a184_0x237284,_0x61e0d2=_0x2c1f88['map'](_0x2a475e=>{const _0x45a9e2=a184_0x25e5;if(_0x2a475e['startsWith']('!')){const _0x6eeaaf=_0x2a475e[_0x45a9e2(0x198)](0x1);if(_0x6eeaaf['startsWith']('/'))return'!'+_0x1c8190+_0x6eeaaf;return'!'+_0x1c8190+'/'+_0x6eeaaf;}if(_0x2a475e[_0x45a9e2(0x197)]('/'))return''+_0x1c8190+_0x2a475e;return _0x1c8190+'/'+_0x2a475e;});return _0xcf32e[_0x2535d2(0x180)](_0x61e0d2),_0xcf32e;}export function shouldIgnoreWithInstance(_0x184a20,_0x5107b4,_0x4be617){const _0x3269c0=a184_0x237284,_0x5b9eac=_0x5107b4['replace'](/\\/g,'/'),_0x53daf8=_0x4be617?_0x5b9eac+'/':_0x5b9eac;return _0x184a20[_0x3269c0(0x18d)](_0x53daf8);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a185_0x1f7b6c=a185_0x4e89;function a185_0x4e89(_0x51a3d9,_0x5b8dfb){_0x51a3d9=_0x51a3d9-0x143;const _0x3f0c23=a185_0x3f0c();let _0x4e89c8=_0x3f0c23[_0x51a3d9];return _0x4e89c8;}(function(_0xd69cae,_0x54c4b1){const _0x7ec826=a185_0x4e89,_0x72df92=_0xd69cae();while(!![]){try{const _0x2c9b47=-parseInt(_0x7ec826(0x143))/0x1+parseInt(_0x7ec826(0x14d))/0x2+parseInt(_0x7ec826(0x14e))/0x3+-parseInt(_0x7ec826(0x14c))/0x4+parseInt(_0x7ec826(0x161))/0x5*(-parseInt(_0x7ec826(0x148))/0x6)+-parseInt(_0x7ec826(0x147))/0x7*(-parseInt(_0x7ec826(0x14b))/0x8)+-parseInt(_0x7ec826(0x15c))/0x9*(parseInt(_0x7ec826(0x150))/0xa);if(_0x2c9b47===_0x54c4b1)break;else _0x72df92['push'](_0x72df92['shift']());}catch(_0x1ba496){_0x72df92['push'](_0x72df92['shift']());}}}(a185_0x3f0c,0x43585));import{TDX,LogLevel}from'../sdk/index.js';import{createHTTPMock}from'./http-mock.js';import{createTestGlobalOptions}from'./factories.js';export class CommandRunner{['http'];['originalFetch'];constructor(){const _0x2e139a=a185_0x4e89;this[_0x2e139a(0x15e)]=createHTTPMock(),this[_0x2e139a(0x14a)]=global['fetch'];}[a185_0x1f7b6c(0x153)](){const _0xf6792=a185_0x1f7b6c;this['originalFetch']=global[_0xf6792(0x157)],global[_0xf6792(0x157)]=this['http'][_0xf6792(0x156)]();}[a185_0x1f7b6c(0x162)](_0x54a2e7){const _0xb3c7aa=a185_0x1f7b6c;try{_0x54a2e7?.[_0xb3c7aa(0x15f)]&&this[_0xb3c7aa(0x15e)][_0xb3c7aa(0x15a)](_0x54a2e7);}finally{global[_0xb3c7aa(0x157)]=this[_0xb3c7aa(0x14a)],this[_0xb3c7aa(0x15e)][_0xb3c7aa(0x163)]();}}async['run'](_0x40f993,_0x185d38={}){const _0x4ba0fe=a185_0x1f7b6c,_0x5c4d59=[],_0x54c59a=[],_0x3fb69d=console[_0x4ba0fe(0x145)],_0x11c2e1=console[_0x4ba0fe(0x144)],_0x313260=console[_0x4ba0fe(0x154)];console[_0x4ba0fe(0x145)]=(..._0x36b090)=>{const _0xca5bb7=_0x4ba0fe;_0x5c4d59[_0xca5bb7(0x151)](_0x36b090[_0xca5bb7(0x14f)](String)['join']('\x20'));},console[_0x4ba0fe(0x144)]=(..._0x33f2d3)=>{const _0x5b7c1a=_0x4ba0fe;_0x54c59a[_0x5b7c1a(0x151)](_0x33f2d3['map'](String)[_0x5b7c1a(0x149)]('\x20'));},console[_0x4ba0fe(0x154)]=(..._0x258209)=>{_0x54c59a['push'](_0x258209['map'](String)['join']('\x20'));};try{const _0x181664=new TDX({'site':_0x185d38[_0x4ba0fe(0x15d)]?.[_0x4ba0fe(0x159)]??_0x4ba0fe(0x160),'apiKey':_0x4ba0fe(0x146),'logLevel':LogLevel[_0x4ba0fe(0x155)]}),_0x9c9297={'options':createTestGlobalOptions(_0x185d38['options']),'args':_0x185d38['args']??[],'tdx':_0x181664},_0x519105=new _0x40f993(),_0x577c45=await _0x519105[_0x4ba0fe(0x15b)](_0x9c9297);return{'exitCode':_0x577c45,'stdout':_0x5c4d59,'stderr':_0x54c59a};}finally{console[_0x4ba0fe(0x145)]=_0x3fb69d,console['error']=_0x11c2e1,console[_0x4ba0fe(0x154)]=_0x313260;}}async[a185_0x1f7b6c(0x158)](_0xb63be3){const _0x2ba54b=a185_0x1f7b6c,_0x4ec525=[];for(const {command:_0xf6f3c2,options:_0x52a948}of _0xb63be3){const _0x418175=await this[_0x2ba54b(0x15b)](_0xf6f3c2,_0x52a948);_0x4ec525['push'](_0x418175);if(_0x418175[_0x2ba54b(0x152)]!==0x0)break;}return _0x4ec525;}}function a185_0x3f0c(){const _0x776a6d=['fail','us01','2151340aFAQsD','teardown','reset','21340rTROBq','error','log','test-api-key-id/test-api-key-secret','49jzKCKj','6MaLjGC','join','originalFetch','480944bxJPHG','585728UtzEJZ','886534XIluON','673545DsnPOY','map','10Fqjqdz','push','exitCode','setup','warn','ERROR','createFetch','fetch','runSequence','site','verify','run','1932507OawAAL','options','http'];a185_0x3f0c=function(){return _0x776a6d;};return a185_0x3f0c();}export function createCommandRunner(){return new CommandRunner();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1ba29a,_0x9fac7b){const _0x3a0744=a186_0x1989,_0x5f004d=_0x1ba29a();while(!![]){try{const _0x2d2fe1=-parseInt(_0x3a0744(0x151))/0x1*(-parseInt(_0x3a0744(0x163))/0x2)+-parseInt(_0x3a0744(0x148))/0x3*(-parseInt(_0x3a0744(0x14f))/0x4)+-parseInt(_0x3a0744(0x149))/0x5*(parseInt(_0x3a0744(0x15f))/0x6)+-parseInt(_0x3a0744(0x15a))/0x7*(parseInt(_0x3a0744(0x15b))/0x8)+-parseInt(_0x3a0744(0x150))/0x9*(parseInt(_0x3a0744(0x14c))/0xa)+parseInt(_0x3a0744(0x15e))/0xb*(parseInt(_0x3a0744(0x158))/0xc)+parseInt(_0x3a0744(0x160))/0xd;if(_0x2d2fe1===_0x9fac7b)break;else _0x5f004d['push'](_0x5f004d['shift']());}catch(_0x5e6745){_0x5f004d['push'](_0x5f004d['shift']());}}}(a186_0x2bf8,0x414f8));import{vi}from'vitest';import{join}from'path';import{Logger,LogLevel,FileHandler}from'../utils/logger/index.js';function a186_0x1989(_0x2425cf,_0x41b1a2){_0x2425cf=_0x2425cf-0x146;const _0x2bf862=a186_0x2bf8();let _0x1989e1=_0x2bf862[_0x2425cf];return _0x1989e1;}import{getGlobalCacheDir}from'../utils/global-cache.js';export function createTestSDKContext(_0x1ec5ae){const _0x58b426=a186_0x1989;return{'site':_0x58b426(0x154),'apiKey':_0x58b426(0x14b),'logLevel':LogLevel[_0x58b426(0x14d)],..._0x1ec5ae};}export function createTestGlobalOptions(_0x35270b){const _0x418bb4=a186_0x1989;return{'site':_0x418bb4(0x154),'format':_0x418bb4(0x162),'noColor':!![],'limit':0x64,'verbose':![],'timeout':_0x418bb4(0x153),'dryRun':![],'yes':![],'logLevel':LogLevel['ERROR'],..._0x35270b};}export async function initTestLogger(){const _0x4b361d=a186_0x1989;Logger['reset']();const _0x2784d9=join(getGlobalCacheDir(),_0x4b361d(0x147),'tdx-test.log');await Logger[_0x4b361d(0x159)]({'defaultLevel':LogLevel[_0x4b361d(0x157)],'handlers':[new FileHandler({'filePath':_0x2784d9,'rotate':![]})]});}function a186_0x2bf8(){const _0x18c5e9=['join','965239IBLjnz','598884FpmvHf','4634175lmQGhY','map','table','32106kCmrTl','args','segment','log','test-api-key','workflow','error','reset','logs','33wYgDfq','5GAbtFV','push','test-api-key-id/test-api-key-secret','40uWDTBB','ERROR','options','38140luJdxH','901656hWFHSL','12wzwtKQ','tdx','30000','us01','user','journey','DEBUG','60QwEuRf','init','55433dCGtSn','328qvXuXv','warn'];a186_0x2bf8=function(){return _0x18c5e9;};return a186_0x2bf8();}export function resetTestLogger(){const _0x3deb90=a186_0x1989;Logger[_0x3deb90(0x146)]();}export function createMockTDX(_0x35f293){const _0x16530=a186_0x1989;return{'context':{'site':_0x16530(0x154),'apiKey':_0x16530(0x167),'logLevel':LogLevel[_0x16530(0x14d)]},'query':{'execute':vi['fn'](),'listDatabases':vi['fn'](),'listTables':vi['fn'](),'describeTable':vi['fn'](),'showTable':vi['fn'](),..._0x35f293?.['query']},'segment':{'listParents':vi['fn'](),'getParent':vi['fn'](),'list':vi['fn'](),'get':vi['fn'](),'create':vi['fn'](),'update':vi['fn'](),'delete':vi['fn'](),..._0x35f293?.[_0x16530(0x165)]},'journey':{'list':vi['fn'](),'get':vi['fn'](),'create':vi['fn'](),'update':vi['fn'](),'delete':vi['fn'](),..._0x35f293?.[_0x16530(0x156)]},'workflow':{'list':vi['fn'](),'get':vi['fn'](),'run':vi['fn'](),..._0x35f293?.[_0x16530(0x168)]},'user':{'show':vi['fn'](),..._0x35f293?.[_0x16530(0x155)]},'api':{'request':vi['fn'](),..._0x35f293?.['api']},..._0x35f293};}export function createTestCommandContext(_0x205c44){const _0x100e47=a186_0x1989,_0x330af0=createTestGlobalOptions(_0x205c44?.[_0x100e47(0x14e)]),_0x4f712a=_0x205c44?.[_0x100e47(0x152)]??createMockTDX();return{'options':_0x330af0,'args':_0x205c44?.[_0x100e47(0x164)]??[],'tdx':_0x4f712a};}export function captureConsole(){const _0x13c3eb=a186_0x1989,_0xeaac39=[],_0x4afbb1=[],_0x440e69=console['log'],_0x226a81=console[_0x13c3eb(0x169)],_0x15a1d0=console[_0x13c3eb(0x15c)];return console['log']=(..._0x25459e)=>{const _0x1ca46d=_0x13c3eb;_0xeaac39['push'](_0x25459e[_0x1ca46d(0x161)](String)['join']('\x20'));},console[_0x13c3eb(0x169)]=(..._0x3eeea4)=>{const _0x5a07f9=_0x13c3eb;_0x4afbb1[_0x5a07f9(0x14a)](_0x3eeea4['map'](String)['join']('\x20'));},console[_0x13c3eb(0x15c)]=(..._0x152ab1)=>{const _0x26d3c9=_0x13c3eb;_0x4afbb1['push'](_0x152ab1[_0x26d3c9(0x161)](String)[_0x26d3c9(0x15d)]('\x20'));},{'stdout':_0xeaac39,'stderr':_0x4afbb1,'restore':()=>{const _0x1f56fc=_0x13c3eb;console[_0x1f56fc(0x166)]=_0x440e69,console[_0x1f56fc(0x169)]=_0x226a81,console['warn']=_0x15a1d0;}};}
|