@treasuredata/tdx 2026.6.0 → 2026.6.1
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/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/table-deleted.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/tools/work-create-item.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/cdp-api-client.js.map +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.d.ts +8 -4
- package/dist/sdk/llm/model-factors.d.ts.map +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/llm/model-factors.js.map +1 -1
- package/dist/sdk/llm/user-settings.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/deleted-table-validation.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js.map +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/cdp.d.ts +4 -3
- package/dist/sdk/types/cdp.d.ts.map +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.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/task-graph.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/access-tracker.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
package/dist/sdk/util/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a190_0x16f1(_0x17f323,_0x584fa3){_0x17f323=_0x17f323-0x147;var _0x4f49a=a190_0x4f49();var _0x16f107=_0x4f49a[_0x17f323];return _0x16f107;}(function(_0x5421a3,_0x4dd650){var _0x27dd42=a190_0x16f1,_0x4a526a=_0x5421a3();while(!![]){try{var _0x4edf78=parseInt(_0x27dd42(0x14c))/0x1*(-parseInt(_0x27dd42(0x148))/0x2)+-parseInt(_0x27dd42(0x149))/0x3+parseInt(_0x27dd42(0x14e))/0x4+parseInt(_0x27dd42(0x14f))/0x5*(-parseInt(_0x27dd42(0x147))/0x6)+-parseInt(_0x27dd42(0x14a))/0x7+parseInt(_0x27dd42(0x14d))/0x8+parseInt(_0x27dd42(0x14b))/0x9;if(_0x4edf78===_0x4dd650)break;else _0x4a526a['push'](_0x4a526a['shift']());}catch(_0x26180c){_0x4a526a['push'](_0x4a526a['shift']());}}}(a190_0x4f49,0x97f1e));function a190_0x4f49(){var _0x486168=['2068685EtLouG','6mqGcuu','8090WqVZBX','1473861fQelUK','1533581huoXjQ','5215878vPsMMh','206ygFpHp','7941784bpagrd','4029912EmXQyY'];a190_0x4f49=function(){return _0x486168;};return a190_0x4f49();}export*from'./formatters.js';export*from'./format-detector.js';export*from'./tree-formatter.js';export*from'./paginate.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x34e7cb,_0x769bed){const _0x5c4cff=a191_0x2f0b,_0x30704e=_0x34e7cb();while(!![]){try{const _0x345994=-parseInt(_0x5c4cff(0x12c))/0x1+parseInt(_0x5c4cff(0x12b))/0x2*(-parseInt(_0x5c4cff(0x12e))/0x3)+-parseInt(_0x5c4cff(0x131))/0x4+parseInt(_0x5c4cff(0x130))/0x5*(-parseInt(_0x5c4cff(0x129))/0x6)+-parseInt(_0x5c4cff(0x132))/0x7*(-parseInt(_0x5c4cff(0x12a))/0x8)+parseInt(_0x5c4cff(0x135))/0x9+parseInt(_0x5c4cff(0x12f))/0xa*(parseInt(_0x5c4cff(0x12d))/0xb);if(_0x345994===_0x769bed)break;else _0x30704e['push'](_0x30704e['shift']());}catch(_0x5d70f2){_0x30704e['push'](_0x30704e['shift']());}}}(a191_0x224b,0xb1308));export const PAGE_SIZE=0x64;function a191_0x2f0b(_0x3516c5,_0x45f75f){_0x3516c5=_0x3516c5-0x127;const _0x224b0d=a191_0x224b();let _0x2f0bb4=_0x224b0d[_0x3516c5];return _0x2f0bb4;}export const MAX_PAGINATION_LIMIT=0x2710;export async function paginate(_0x5fa7a6,_0x44d719=MAX_PAGINATION_LIMIT,_0x157709=0x0){const _0x4b0555=a191_0x2f0b,_0x162887=Math[_0x4b0555(0x136)](_0x44d719,MAX_PAGINATION_LIMIT),_0x18cb42=[];let _0x3b0aea=_0x157709;while(_0x18cb42[_0x4b0555(0x133)]<_0x162887){const _0x234377=Math[_0x4b0555(0x136)](PAGE_SIZE,_0x162887-_0x18cb42[_0x4b0555(0x133)]),_0x37bb06=await _0x5fa7a6(_0x234377,_0x3b0aea),_0x2e6719=Array[_0x4b0555(0x128)](_0x37bb06[_0x4b0555(0x127)])?_0x37bb06[_0x4b0555(0x127)]:[_0x37bb06['data']];_0x18cb42[_0x4b0555(0x134)](..._0x2e6719);if(_0x2e6719['length']<_0x234377)break;_0x3b0aea+=_0x234377;}return _0x18cb42['length']>_0x162887?_0x18cb42['slice'](0x0,_0x162887):_0x18cb42;}function a191_0x224b(){const _0x1fd6dc=['push','1611126QwZpUJ','min','data','isArray','2851638hQcLWA','1017064VjpEwQ','2lpWeji','719929ogsQqo','11vwdicW','1494897ShztWw','26389210Sqbugp','5TDcGUX','2103196nNDvfu','7mUaxuS','length'];a191_0x224b=function(){return _0x1fd6dc;};return a191_0x224b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x12c048,_0x4a505e){const _0x1eecf2=a192_0x5ad7,_0x4483e7=_0x12c048();while(!![]){try{const _0x432af5=-parseInt(_0x1eecf2(0x1ae))/0x1+parseInt(_0x1eecf2(0x1aa))/0x2*(-parseInt(_0x1eecf2(0x180))/0x3)+-parseInt(_0x1eecf2(0x185))/0x4+parseInt(_0x1eecf2(0x196))/0x5*(parseInt(_0x1eecf2(0x1ac))/0x6)+parseInt(_0x1eecf2(0x1ab))/0x7+-parseInt(_0x1eecf2(0x1a8))/0x8+-parseInt(_0x1eecf2(0x190))/0x9*(-parseInt(_0x1eecf2(0x195))/0xa);if(_0x432af5===_0x4a505e)break;else _0x4483e7['push'](_0x4483e7['shift']());}catch(_0x1c4dce){_0x4483e7['push'](_0x4483e7['shift']());}}}(a192_0x5d20,0x9d126));import{formatRows,hyperlink}from'./formatters.js';import a192_0x38a7bf from'chalk';function a192_0x5ad7(_0x1ff4fa,_0x38805b){_0x1ff4fa=_0x1ff4fa-0x17d;const _0x5d2029=a192_0x5d20();let _0x5ad76b=_0x5d2029[_0x1ff4fa];return _0x5ad76b;}const DEFAULT_OPTIONS={'showTreeLines':!![],'showIcons':!![],'showMetadata':!![],'indent':'\x20\x20','getSegmentUrl':undefined,'getJourneyUrl':undefined};export function formatTree(_0x4c1bf8,_0xdee38b={},_0x5fa6df=0x0,_0x4893bb=''){const _0xf81fa2=a192_0x5ad7,_0x29aacd={...DEFAULT_OPTIONS,..._0xdee38b},_0xd39684=[],_0x43bc36=[..._0x4c1bf8]['sort']((_0x322881,_0x34524c)=>_0x322881[_0xf81fa2(0x1b0)][_0xf81fa2(0x1a1)](_0x34524c[_0xf81fa2(0x1b0)],undefined,{'sensitivity':'base'}));for(let _0x549ef3=0x0;_0x549ef3<_0x43bc36[_0xf81fa2(0x184)];_0x549ef3++){const _0x348582=_0x43bc36[_0x549ef3],_0x58ce13=_0x549ef3===_0x43bc36[_0xf81fa2(0x184)]-0x1;let _0xb1b7cb='';_0x5fa6df>0x0&&(_0xb1b7cb+=_0x4893bb);_0x29aacd[_0xf81fa2(0x19c)]&&_0x5fa6df>0x0&&(_0xb1b7cb+=a192_0x38a7bf[_0xf81fa2(0x1a4)](_0x58ce13?'└──\x20':_0xf81fa2(0x19d)));if(_0x29aacd[_0xf81fa2(0x19e)]){if(_0x348582['type']===_0xf81fa2(0x18a))_0xb1b7cb+=_0xf81fa2(0x194);else _0x348582[_0xf81fa2(0x1a6)]===_0xf81fa2(0x1ad)?_0xb1b7cb+=_0xf81fa2(0x181):_0xb1b7cb+='🎯\x20';}if(_0x29aacd[_0xf81fa2(0x1a7)]&&_0x348582[_0xf81fa2(0x1a6)]===_0xf81fa2(0x18b))_0xb1b7cb+=hyperlink(_0x348582[_0xf81fa2(0x1b0)],_0x29aacd[_0xf81fa2(0x1a7)](_0x348582['id']));else _0x29aacd['getJourneyUrl']&&_0x348582[_0xf81fa2(0x1a6)]===_0xf81fa2(0x1ad)?_0xb1b7cb+=hyperlink(_0x348582[_0xf81fa2(0x1b0)],_0x29aacd[_0xf81fa2(0x17e)](_0x348582['id'])):_0xb1b7cb+=_0x348582[_0xf81fa2(0x1b0)];if(_0x29aacd[_0xf81fa2(0x198)]){if(_0x348582['type']===_0xf81fa2(0x18a)){const _0x451a91=[];_0x348582[_0xf81fa2(0x186)][_0xf81fa2(0x183)]&&_0x451a91['push'](_0x348582[_0xf81fa2(0x186)][_0xf81fa2(0x183)]+_0xf81fa2(0x19f)+(_0x348582[_0xf81fa2(0x186)][_0xf81fa2(0x183)]!==0x1?'s':'')),_0x348582['metadata'][_0xf81fa2(0x192)]&&_0x451a91[_0xf81fa2(0x17d)](_0x348582[_0xf81fa2(0x186)][_0xf81fa2(0x192)]+_0xf81fa2(0x193)+(_0x348582[_0xf81fa2(0x186)][_0xf81fa2(0x192)]!==0x1?'s':'')),_0x348582[_0xf81fa2(0x186)][_0xf81fa2(0x19b)]&&_0x451a91[_0xf81fa2(0x17d)](_0x348582[_0xf81fa2(0x186)][_0xf81fa2(0x19b)]+_0xf81fa2(0x199)+(_0x348582[_0xf81fa2(0x186)][_0xf81fa2(0x19b)]!==0x1?'s':'')),_0x451a91['length']>0x0&&(_0xb1b7cb+=a192_0x38a7bf['dim']('\x20('+_0x451a91[_0xf81fa2(0x1a2)](',\x20')+')'));}else{if(_0x348582['type']==='segment'&&_0x348582[_0xf81fa2(0x197)]!==undefined)_0xb1b7cb+=a192_0x38a7bf[_0xf81fa2(0x1a4)]('\x20('+formatRows(_0x348582[_0xf81fa2(0x197)])+')');else _0x348582[_0xf81fa2(0x1a6)]===_0xf81fa2(0x1ad)&&_0x348582[_0xf81fa2(0x18c)]&&(_0xb1b7cb+=a192_0x38a7bf['dim']('\x20'+getJourneyStateIndicator(_0x348582['state'])));}}_0xd39684[_0xf81fa2(0x17d)](_0xb1b7cb);if(_0x348582[_0xf81fa2(0x187)]&&_0x348582[_0xf81fa2(0x187)][_0xf81fa2(0x184)]>0x0){let _0x3a180e;if(_0x5fa6df===0x0)_0x3a180e='';else _0x29aacd['showTreeLines']?_0x3a180e=_0x4893bb+(_0x58ce13?_0xf81fa2(0x1a3):a192_0x38a7bf[_0xf81fa2(0x1a4)]('│')+_0xf81fa2(0x1a9)):_0x3a180e=_0x4893bb+_0x29aacd[_0xf81fa2(0x1a0)];const _0x650d72=formatTree(_0x348582[_0xf81fa2(0x187)],_0x29aacd,_0x5fa6df+0x1,_0x3a180e);_0xd39684[_0xf81fa2(0x17d)](_0x650d72);}}return _0xd39684[_0xf81fa2(0x1a2)]('\x0a');}export function formatFlatList(_0x15cfcb,_0x310da4,_0x404aec={},_0x348247=[]){const _0x22fcf9=a192_0x5ad7,_0x3ec73b={...DEFAULT_OPTIONS,..._0x404aec},_0x325a17=[];for(const _0x5b8f5e of _0x15cfcb){_0x325a17[_0x22fcf9(0x17d)]({'sortKey':_0x5b8f5e[_0x22fcf9(0x1b0)],'displayName':_0x5b8f5e[_0x22fcf9(0x1b0)],'icon':_0x3ec73b[_0x22fcf9(0x19e)]?'📁':'','metadata':undefined});}for(const _0x35daa1 of _0x310da4){const _0x20c3c7=_0x3ec73b[_0x22fcf9(0x198)]&&_0x35daa1[_0x22fcf9(0x197)]!==undefined?a192_0x38a7bf[_0x22fcf9(0x1a4)]('\x20('+formatRows(_0x35daa1[_0x22fcf9(0x197)])+')'):'',_0x387328=_0x3ec73b[_0x22fcf9(0x1a7)]?hyperlink(_0x35daa1[_0x22fcf9(0x1b0)],_0x3ec73b['getSegmentUrl'](_0x35daa1['id'])):_0x35daa1[_0x22fcf9(0x1b0)];_0x325a17[_0x22fcf9(0x17d)]({'sortKey':_0x35daa1[_0x22fcf9(0x1b0)],'displayName':_0x387328,'icon':_0x3ec73b[_0x22fcf9(0x19e)]?'🎯':'','metadata':_0x20c3c7});}for(const _0x27c8a8 of _0x348247){const _0x487d0d=getJourneyStateIndicator(_0x27c8a8['state']),_0x30aaf1=_0x3ec73b['showMetadata']?a192_0x38a7bf[_0x22fcf9(0x1a4)]('\x20'+_0x487d0d):'',_0x1e882a=_0x3ec73b[_0x22fcf9(0x17e)]?hyperlink(_0x27c8a8[_0x22fcf9(0x1a5)],_0x3ec73b['getJourneyUrl'](_0x27c8a8['id'])):_0x27c8a8[_0x22fcf9(0x1a5)];_0x325a17[_0x22fcf9(0x17d)]({'sortKey':_0x27c8a8['journeyBundleName'],'displayName':_0x1e882a,'icon':_0x3ec73b[_0x22fcf9(0x19e)]?'🗺️':'','metadata':_0x30aaf1});}_0x325a17['sort']((_0x2994d5,_0x2c27ac)=>_0x2994d5['sortKey']['localeCompare'](_0x2c27ac[_0x22fcf9(0x182)],undefined,{'sensitivity':_0x22fcf9(0x191)}));if(_0x325a17[_0x22fcf9(0x184)]===0x0)return'(empty)';const _0x4efff2=_0x325a17[_0x22fcf9(0x18f)](_0x580c2c=>{const _0x23df9a=_0x22fcf9,_0x5b2cd6=_0x580c2c[_0x23df9a(0x18e)]?_0x580c2c['icon']+'\x20':'',_0x3e838a=_0x580c2c[_0x23df9a(0x186)]||'';return''+_0x5b2cd6+_0x580c2c[_0x23df9a(0x1af)]+_0x3e838a;});return _0x4efff2[_0x22fcf9(0x1a2)]('\x0a');}function getJourneyStateIndicator(_0x4d406c){const _0x3cb765=a192_0x5ad7;switch(_0x4d406c){case'draft':return'(draft)';case _0x3cb765(0x189):return _0x3cb765(0x19a);case _0x3cb765(0x188):return'(paused)';case _0x3cb765(0x17f):return _0x3cb765(0x18d);default:return'('+_0x4d406c+')';}}function a192_0x5d20(){const _0x2beedf=['3169530pVYrxy','population','showMetadata','\x20journey','(running)','journeyCount','showTreeLines','├──\x20','showIcons','\x20segment','indent','localeCompare','join','\x20\x20\x20\x20','dim','journeyBundleName','type','getSegmentUrl','6530928JrhJcK','\x20\x20\x20','12hPZYSt','5922056BDptzY','6XTRWRl','journey','754560jwhkSy','displayName','name','push','getJourneyUrl','completed','245013xQlRzT','🗺️\x20','sortKey','segmentCount','length','4249476jLjpyU','metadata','children','paused','launched','folder','segment','state','(completed)','icon','map','9DSkZyL','base','folderCount','\x20folder','📁\x20','22867730lPymhd'];a192_0x5d20=function(){return _0x2beedf;};return a192_0x5d20();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a193_0xdc7bd2=a193_0x410e;function a193_0x12c5(){const _0x1fc0e5=['4411122pGsBzl','length','\x20Server\x20response\x20preview:\x20','trim','utf-8','split','4928MPbgnS','Downloaded\x20archive\x20is\x20too\x20small\x20(','helpText','subarray','from','2825040NKpuJb','291426uyZPDV','WORKFLOW_ARCHIVE_CORRUPTED','28YgAVaD','3267985XpyrxH','Downloaded\x20file\x20is\x20not\x20a\x20valid\x20gzip\x20archive.','Check\x20if\x20the\x20project\x20exists\x20and\x20has\x20been\x20pushed\x20at\x20least\x20once.','...','\x20bytes).\x20The\x20server\x20may\x20have\x20returned\x20an\x20error\x20or\x20empty\x20response.','29052gPhInr','toString','900046YvVOyZ','error','message','Archive\x20validation\x20failed\x20with\x20unknown\x20error','(empty\x20response)','112809CMBFtW'];a193_0x12c5=function(){return _0x1fc0e5;};return a193_0x12c5();}(function(_0x1d7b3d,_0x44b1d7){const _0x234368=a193_0x410e,_0x3e9d54=_0x1d7b3d();while(!![]){try{const _0x274d75=parseInt(_0x234368(0x1a5))/0x1+parseInt(_0x234368(0x1b7))/0x2+parseInt(_0x234368(0x1aa))/0x3*(-parseInt(_0x234368(0x1b9))/0x4)+parseInt(_0x234368(0x1b6))/0x5+parseInt(_0x234368(0x1ab))/0x6+parseInt(_0x234368(0x1ba))/0x7+parseInt(_0x234368(0x1b1))/0x8*(-parseInt(_0x234368(0x1a3))/0x9);if(_0x274d75===_0x44b1d7)break;else _0x3e9d54['push'](_0x3e9d54['shift']());}catch(_0x5a0da6){_0x3e9d54['push'](_0x3e9d54['shift']());}}}(a193_0x12c5,0x88ff4));function a193_0x410e(_0x11d7a1,_0xfa42c2){_0x11d7a1=_0x11d7a1-0x1a0;const _0x12c56a=a193_0x12c5();let _0x410e31=_0x12c56a[_0x11d7a1];return _0x410e31;}import{SDKError,ErrorCode}from'../errors.js';const GZIP_MAGIC=Buffer[a193_0xdc7bd2(0x1b5)]([0x1f,0x8b]),MIN_GZIP_SIZE=0x14;export function validateGzipArchive(_0x4b37a8){const _0x1ba343=a193_0xdc7bd2;if(_0x4b37a8['length']<MIN_GZIP_SIZE)return{'isValid':![],'size':_0x4b37a8[_0x1ba343(0x1ac)],'error':{'message':_0x1ba343(0x1b2)+_0x4b37a8[_0x1ba343(0x1ac)]+_0x1ba343(0x1a2),'preview':getContentPreview(_0x4b37a8),'helpText':_0x1ba343(0x1a0)}};if(!_0x4b37a8[_0x1ba343(0x1b4)](0x0,0x2)['equals'](GZIP_MAGIC)){const _0x206659=getContentPreview(_0x4b37a8),_0x1184d0=_0x206659?_0x1ba343(0x1ad)+_0x206659:'';return{'isValid':![],'size':_0x4b37a8['length'],'error':{'message':_0x1ba343(0x1bb)+_0x1184d0,'preview':_0x206659,'helpText':'The\x20server\x20may\x20have\x20returned\x20an\x20error\x20page\x20instead\x20of\x20the\x20archive.\x20Try\x20pushing\x20a\x20new\x20revision.'}};}return{'isValid':!![],'size':_0x4b37a8['length']};}function getContentPreview(_0x2c881f){const _0x287c66=a193_0xdc7bd2;if(_0x2c881f[_0x287c66(0x1ac)]===0x0)return _0x287c66(0x1a9);const _0x47eba7=_0x2c881f[_0x287c66(0x1b4)](0x0,0xc8)[_0x287c66(0x1a4)](_0x287c66(0x1af)),_0x510e37=_0x47eba7[_0x287c66(0x1b0)]('')['filter'](_0x406578=>{const _0x3fe7bf=_0x406578['charCodeAt'](0x0);return _0x3fe7bf>=0x20&&_0x3fe7bf<0x7f||_0x3fe7bf===0xa||_0x3fe7bf===0xd||_0x3fe7bf===0x9;})['length'],_0x5b7c40=_0x510e37/_0x47eba7[_0x287c66(0x1ac)];if(_0x5b7c40>0.8){const _0xcf9774=_0x47eba7['slice'](0x0,0x64)[_0x287c66(0x1ae)]();return _0xcf9774[_0x287c66(0x1ac)]<_0x47eba7[_0x287c66(0x1ae)]()[_0x287c66(0x1ac)]?_0xcf9774+_0x287c66(0x1a1):_0xcf9774;}return undefined;}export function throwArchiveValidationError(_0x1b48c3){const _0x5b6a33=a193_0xdc7bd2;if(!_0x1b48c3[_0x5b6a33(0x1a6)])throw new SDKError(ErrorCode[_0x5b6a33(0x1b8)],_0x5b6a33(0x1a8));throw new SDKError(ErrorCode[_0x5b6a33(0x1b8)],_0x1b48c3[_0x5b6a33(0x1a6)][_0x5b6a33(0x1a7)],undefined,{'helpText':_0x1b48c3[_0x5b6a33(0x1a6)][_0x5b6a33(0x1b3)]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x353c26,_0x39dd85){const _0x47b5d5=a194_0xee87,_0x4ccc21=_0x353c26();while(!![]){try{const _0x54d160=-parseInt(_0x47b5d5(0x1fc))/0x1+parseInt(_0x47b5d5(0x1fa))/0x2+parseInt(_0x47b5d5(0x200))/0x3+parseInt(_0x47b5d5(0x1ff))/0x4*(parseInt(_0x47b5d5(0x1eb))/0x5)+parseInt(_0x47b5d5(0x206))/0x6+-parseInt(_0x47b5d5(0x1f5))/0x7*(-parseInt(_0x47b5d5(0x208))/0x8)+-parseInt(_0x47b5d5(0x1ee))/0x9*(parseInt(_0x47b5d5(0x202))/0xa);if(_0x54d160===_0x39dd85)break;else _0x4ccc21['push'](_0x4ccc21['shift']());}catch(_0x32273a){_0x4ccc21['push'](_0x4ccc21['shift']());}}}(a194_0x45f5,0xd4ccb));function a194_0x45f5(){const _0xbb7fbd=['archive.tar.gz','data','replace','tmpdir','endsWith','name','resolve','mkdtemp','5ELloSY','tar','workflow_project','1198521COPiOx','sourceDir','revision','\x20workflow\x20files\x20found\x20in\x20','length','tdx.json','skipValidation','6993210MTnMPT','create','toISOString','join','filter','265396MtLHBX','push','364109NGTMpH','sourceProjectName','No\x20','3505716iMLSBm','3230115qTQylQ','tdx-wf-clone-','150ekCZBA','listProjects','readdir','isDirectory','890454VOUmJl','Source\x20directory\x20not\x20found:\x20','8vCuGlu','find'];a194_0x45f5=function(){return _0xbb7fbd;};return a194_0x45f5();}function a194_0xee87(_0x36c88b,_0x59d4b3){_0x36c88b=_0x36c88b-0x1e9;const _0x45f594=a194_0x45f5();let _0xee87b=_0x45f594[_0x36c88b];return _0xee87b;}import{promises as a194_0x232195}from'fs';import a194_0x5a5463 from'path';import a194_0x3ae3cd from'os';import{tryFindWorkflowTdxConfig}from'./tdx-config.js';import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION}from'./workflow-utils.js';export async function prepareCloneWorkflow(_0x5e6cc5,_0x2e9683,_0x49a2c0,_0xfe0578={}){const _0x490565=a194_0xee87,{client:_0x2ed483}=_0x5e6cc5,_0x411687=a194_0x5a5463[_0x490565(0x1e9)](_0x2e9683);try{await a194_0x232195['access'](_0x411687);}catch{throw new Error(_0x490565(0x207)+_0x2e9683);}const _0x26e01d=tryFindWorkflowTdxConfig(_0x411687),_0x277069=_0x26e01d?.['config'][_0x490565(0x1ed)],_0x1a531d=_0xfe0578[_0x490565(0x1f0)]||new Date()[_0x490565(0x1f7)]()[_0x490565(0x20c)](/[:.]/g,'-');if(!_0xfe0578[_0x490565(0x1f4)]){const _0x2cccf9=await a194_0x232195[_0x490565(0x204)](_0x411687),_0x127c81=_0x2cccf9[_0x490565(0x1f9)](_0x3ab4c2=>_0x3ab4c2[_0x490565(0x20e)](WORKFLOW_FILE_EXTENSION));if(_0x127c81[_0x490565(0x1f2)]===0x0)throw new Error(_0x490565(0x1fe)+WORKFLOW_FILE_EXTENSION+_0x490565(0x1f1)+_0x411687);}const _0x54b862=await getProjectFiles(_0x411687);let _0x4c6048=![],_0x2169ae;try{const _0x22d0da=await _0x2ed483[_0x490565(0x203)]({'name_pattern':_0x49a2c0}),_0x213d39=_0x22d0da[_0x490565(0x20b)][_0x490565(0x209)](_0x433570=>_0x433570['name']===_0x49a2c0);_0x213d39&&(_0x4c6048=!![],_0x2169ae=_0x213d39['id']);}catch{}return{'sourceDir':_0x411687,'sourceProjectName':_0x277069,'newProjectName':_0x49a2c0,'revision':_0x1a531d,'fileCount':_0x54b862[_0x490565(0x1f2)],'files':_0x54b862,'targetExists':_0x4c6048,'existingProjectId':_0x2169ae};}export async function executeCloneWorkflow(_0x4f9536,_0xd7fd3e){const _0x2af64e=a194_0xee87,_0x254fab=await import(_0x2af64e(0x1ec)),{client:_0x23061d}=_0x4f9536,_0x57387c=await getProjectFiles(_0xd7fd3e[_0x2af64e(0x1ef)]),_0x3941fa=await a194_0x232195[_0x2af64e(0x1ea)](a194_0x5a5463['join'](a194_0x3ae3cd[_0x2af64e(0x20d)](),_0x2af64e(0x201))),_0x4d8cd4=a194_0x5a5463[_0x2af64e(0x1f8)](_0x3941fa,_0x2af64e(0x20a));try{await _0x254fab[_0x2af64e(0x1f6)]({'file':_0x4d8cd4,'gzip':!![],'cwd':_0xd7fd3e[_0x2af64e(0x1ef)],'portable':!![]},_0x57387c);const _0x439d98=await _0x23061d['uploadProjectArchive'](_0xd7fd3e['newProjectName'],_0xd7fd3e['revision'],_0x4d8cd4);return{'sourceDir':_0xd7fd3e[_0x2af64e(0x1ef)],'sourceProjectName':_0xd7fd3e[_0x2af64e(0x1fd)],'newProjectName':_0x439d98[_0x2af64e(0x20f)],'newProjectId':_0x439d98['id'],'revision':_0x439d98[_0x2af64e(0x1f0)],'fileCount':_0x57387c[_0x2af64e(0x1f2)],'files':_0x57387c};}finally{await a194_0x232195['rm'](_0x3941fa,{'recursive':!![],'force':!![]});}}async function getProjectFiles(_0x48bad6,_0x3a717f=''){const _0x453ec0=a194_0xee87,_0x549aac=[],_0xcbeedf=await a194_0x232195[_0x453ec0(0x204)](_0x48bad6,{'withFileTypes':!![]});for(const _0xcea76 of _0xcbeedf){const _0x13ddbf=_0x3a717f?a194_0x5a5463['join'](_0x3a717f,_0xcea76[_0x453ec0(0x20f)]):_0xcea76['name'];if(_0xcea76['name']===_0x453ec0(0x1f3))continue;if(!shouldIncludeInArchive(_0xcea76['name']))continue;if(_0xcea76[_0x453ec0(0x205)]()){const _0x5b82bb=await getProjectFiles(a194_0x5a5463[_0x453ec0(0x1f8)](_0x48bad6,_0xcea76[_0x453ec0(0x20f)]),_0x13ddbf);_0x549aac[_0x453ec0(0x1fb)](..._0x5b82bb);}else _0x549aac[_0x453ec0(0x1fb)](_0x13ddbf);}return _0x549aac;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a195_0x7bbdf0=a195_0x12ac;function a195_0x37d5(){const _0x4d8b2d=['toTime','basename','error','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format:\x20','415460lSfwNV','listSecrets','length','8KSvtFP','Project\x20not\x20found:\x20','includeRetried','delete','workflow','Failed\x20to\x20download\x20log\x20file:\x20','394416AiYSCw','mkdir','attempts','WORKFLOW_PROJECT_NOT_FOUND','force','replace','timezone','Kill\x20request\x20accepted','path','5879496lXzhTX','state','exportParams','\x20workflow\x20files\x20found\x20in\x20project\x20directory','clearSchedule','lastId','workflows','retryParams','run','push','name','client','extract','tar','logFiles','slice','parseWorkflowId','keys','filter','allSettled','getProjectWorkflow','getAttempt','retryAttempt','isGroup','12dNtaZt','uploadProjectArchive','WORKFLOW_SECRET_SET_FAILED','clearScheduleAll','zlib','getProject','isDirectory','toISOString','projectName','done','deleteSecret','retrySession','finishedAt','kill','getWorkflow','setSecrets','setSecret','join','33mNBYQS','.\x20Expected\x20\x22project.workflow\x22','last_id','upstreams','tmpdir','now','revision','test','retryAt','fromTime','INVALID_ARGUMENT','status','tasks','from','188464gBQeHo','preparePushProject','latest','listSchedules','min','deleteProject','access','substring','listAttempts','.tar.gz','Failed\x20to\x20set\x20secret','executeCloneProject','1796990ujIQac','readdir','attempt','arrayBuffer','map','rawCount','limit','6132VtdSgB','tdx-workflow-','bind','enableSchedule','project','direct','No\x20','disableSchedule','NUMERIC_ID_PATTERN','pullProject','sessionId','unlink','sessionUuid','listProjects','158560nPQSPT','listLogFiles','resolveProjectId','createdAt','stateParams','skipValidation','getAttemptTasks','tdx-workflow-push-','listSessions','prepareCloneProject','isFile','data','sessionTime','updatedAt','killAttempt','fullName','parentId','startAttempt','15RQRJlW','create','workflowName','112kMPazr','retryAttemptName'];a195_0x37d5=function(){return _0x4d8b2d;};return a195_0x37d5();}(function(_0x5e56da,_0x2c1388){const _0x59148f=a195_0x12ac,_0x14ec43=_0x5e56da();while(!![]){try{const _0x3107cf=parseInt(_0x59148f(0x1b0))/0x1+parseInt(_0x59148f(0x18f))/0x2*(parseInt(_0x59148f(0x1c2))/0x3)+parseInt(_0x59148f(0x16f))/0x4*(-parseInt(_0x59148f(0x1cb))/0x5)+-parseInt(_0x59148f(0x1a2))/0x6*(parseInt(_0x59148f(0x1c5))/0x7)+parseInt(_0x59148f(0x1ce))/0x8*(-parseInt(_0x59148f(0x14e))/0x9)+parseInt(_0x59148f(0x19b))/0xa*(-parseInt(_0x59148f(0x181))/0xb)+parseInt(_0x59148f(0x157))/0xc;if(_0x3107cf===_0x2c1388)break;else _0x14ec43['push'](_0x14ec43['shift']());}catch(_0x2dd636){_0x14ec43['push'](_0x14ec43['shift']());}}}(a195_0x37d5,0x42319));import{WorkflowApiClient}from'../client/workflow-client.js';import{SDKError,ErrorCode}from'../errors.js';import{MAX_PAGINATION_LIMIT}from'../util/paginate.js';async function paginateResults(_0x5bc3c8,_0xeda47f,_0xe08ffd=0x64){const _0x353b34=a195_0x12ac,_0x4ad61b=Math[_0x353b34(0x193)](_0xeda47f,MAX_PAGINATION_LIMIT),_0x826e59=[];let _0x41689a;while(_0x826e59['length']<_0x4ad61b){const _0x1d0bf7=await _0x5bc3c8(_0xe08ffd,_0x41689a),_0x280665=_0x1d0bf7[_0x353b34(0x1a0)]??_0x1d0bf7[_0x353b34(0x1bb)]['length'];if(_0x280665===0x0)break;_0x826e59[_0x353b34(0x160)](..._0x1d0bf7[_0x353b34(0x1bb)]);if(!_0x1d0bf7[_0x353b34(0x15c)]||_0x280665<_0xe08ffd)break;_0x41689a=_0x1d0bf7[_0x353b34(0x15c)];}return _0x826e59[_0x353b34(0x166)](0x0,_0x4ad61b);}import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION}from'./workflow-utils.js';import{pullWorkflow,applyPullResult}from'./pull-workflow.js';import{preparePushWorkflow,executePushWorkflow}from'./push-workflow.js';function a195_0x12ac(_0x5154b1,_0x143e02){_0x5154b1=_0x5154b1-0x14a;const _0x37d5cf=a195_0x37d5();let _0x12ac96=_0x37d5cf[_0x5154b1];return _0x12ac96;}import{prepareCloneWorkflow,executeCloneWorkflow}from'./clone-workflow.js';export class WorkflowSDK{static [a195_0x7bbdf0(0x1aa)]=/^\d+$/;['client'];constructor(_0x4c09ed){const _0x4e3c07=a195_0x7bbdf0;this[_0x4e3c07(0x162)]=new WorkflowApiClient(_0x4c09ed);}async[a195_0x7bbdf0(0x1b2)](_0x32d0b2){const _0x1dcf42=a195_0x7bbdf0;if(WorkflowSDK[_0x1dcf42(0x1aa)][_0x1dcf42(0x188)](_0x32d0b2)){const _0x21b5b5=await this[_0x1dcf42(0x162)][_0x1dcf42(0x174)](_0x32d0b2);return{'id':_0x21b5b5['id'],'name':_0x21b5b5[_0x1dcf42(0x161)]};}const _0x5683f4=await this[_0x1dcf42(0x162)][_0x1dcf42(0x1af)]({'name_pattern':_0x32d0b2}),_0x172031=_0x5683f4[_0x1dcf42(0x1bb)]['find'](_0x17969e=>_0x17969e[_0x1dcf42(0x161)]===_0x32d0b2);if(!_0x172031)throw new SDKError(ErrorCode['WORKFLOW_PROJECT_NOT_FOUND'],'Project\x20not\x20found:\x20'+_0x32d0b2);return{'id':_0x172031['id'],'name':_0x172031['name']};}async['projects'](_0x545907,_0x2abc7e){const _0x22ed7e=a195_0x7bbdf0,_0x1fd62c=_0x2abc7e?.['limit']||MAX_PAGINATION_LIMIT,_0x3892e3=await paginateResults((_0x49b6bb,_0x53a18a)=>this['client'][_0x22ed7e(0x1af)]({'name_pattern':_0x545907,'limit':_0x49b6bb,'last_id':_0x53a18a??_0x2abc7e?.[_0x22ed7e(0x183)]}),_0x1fd62c);return _0x3892e3[_0x22ed7e(0x19f)](_0x13bd6e=>({..._0x13bd6e,'project_id':_0x13bd6e['id'],'project_name':_0x13bd6e['name']}));}async[a195_0x7bbdf0(0x15d)](_0x494ce0,_0xa9e11b){const _0x42d069=a195_0x7bbdf0,_0x5a2f88=_0xa9e11b?.[_0x42d069(0x1a1)]||MAX_PAGINATION_LIMIT,_0x46d417=await paginateResults((_0x2f65e7,_0x3f530b)=>this[_0x42d069(0x162)]['listWorkflows']({'project_name':_0x494ce0,'limit':_0x2f65e7,'last_id':_0x3f530b??_0xa9e11b?.[_0x42d069(0x183)]}),_0x5a2f88);return _0x46d417[_0x42d069(0x19f)](_0x6288d6=>({'project_id':_0x6288d6[_0x42d069(0x1a6)]?.['id'],'project_name':_0x6288d6[_0x42d069(0x1a6)]?.['name'],'workflow_id':_0x6288d6['id'],'workflow_name':_0x6288d6[_0x42d069(0x161)],'revision':_0x6288d6['revision'],'timezone':_0x6288d6[_0x42d069(0x154)],'config':_0x6288d6['config'],'id':_0x6288d6['id'],'name':_0x6288d6[_0x42d069(0x161)],'project':_0x6288d6['project']}));}async['sessions'](_0x2b1025){const _0x44706e=a195_0x7bbdf0;let _0x5af236;if(_0x2b1025?.[_0x44706e(0x177)]){let _0x67fd20,_0x2fb73d=![];while(!_0x2fb73d){const _0x399577=await this[_0x44706e(0x162)][_0x44706e(0x1af)]({'limit':0x64,'last_id':_0x67fd20}),_0x438e85=_0x399577[_0x44706e(0x1bb)]['find'](_0x2e8525=>_0x2e8525[_0x44706e(0x161)]===_0x2b1025[_0x44706e(0x177)]);if(_0x438e85){_0x5af236=_0x438e85['id'],_0x2fb73d=!![];break;}if(!_0x399577['lastId']||_0x399577[_0x44706e(0x1bb)][_0x44706e(0x1cd)]===0x0)break;_0x67fd20=_0x399577[_0x44706e(0x15c)];}if(!_0x5af236)throw new SDKError(ErrorCode[_0x44706e(0x151)],_0x44706e(0x1cf)+_0x2b1025[_0x44706e(0x177)]);}const _0x4c4d04=_0x2b1025?.[_0x44706e(0x1a1)]||0x64,_0x1f80b8=await paginateResults((_0x16f9e9,_0x5494c7)=>this[_0x44706e(0x162)][_0x44706e(0x1b8)]({'project_id':_0x5af236,'project_name':_0x2b1025?.[_0x44706e(0x177)],'workflow_name':_0x2b1025?.[_0x44706e(0x1c4)],'status':_0x2b1025?.[_0x44706e(0x18c)],'from_time':_0x2b1025?.[_0x44706e(0x18a)],'to_time':_0x2b1025?.[_0x44706e(0x1c7)],'limit':_0x16f9e9,'last_id':_0x5494c7??_0x2b1025?.[_0x44706e(0x183)]}),_0x4c4d04);return _0x1f80b8['map'](_0x1a72a0=>({'project_id':_0x1a72a0[_0x44706e(0x1a6)]?.['id'],'project_name':_0x1a72a0[_0x44706e(0x1a6)]?.[_0x44706e(0x161)],'workflow_id':_0x1a72a0['workflow']?.['id'],'workflow_name':_0x1a72a0['workflow']?.['name'],'session_id':_0x1a72a0['id'],'sessionUuid':_0x1a72a0[_0x44706e(0x1ae)],'sessionTime':_0x1a72a0[_0x44706e(0x1bc)],'lastAttempt':_0x1a72a0['lastAttempt'],'id':_0x1a72a0['id'],'project':_0x1a72a0[_0x44706e(0x1a6)],'workflow':_0x1a72a0[_0x44706e(0x14c)]}));}async[a195_0x7bbdf0(0x150)](_0x428c0f){const _0xfc0c1f=a195_0x7bbdf0,_0x39c162=_0x428c0f?.['limit']||0x64,_0x3f46fe=await paginateResults((_0x8a0a43,_0x175bbe)=>this['client'][_0xfc0c1f(0x197)]({'project_name':_0x428c0f?.[_0xfc0c1f(0x177)],'workflow_name':_0x428c0f?.[_0xfc0c1f(0x1c4)],'include_retried':_0x428c0f?.[_0xfc0c1f(0x14a)],'limit':_0x8a0a43,'last_id':_0x175bbe??_0x428c0f?.[_0xfc0c1f(0x183)]}),_0x39c162);return _0x3f46fe['map'](_0x167f15=>({'project_id':_0x167f15[_0xfc0c1f(0x1a6)]?.['id'],'project_name':_0x167f15[_0xfc0c1f(0x1a6)]?.['name'],'workflow_id':_0x167f15[_0xfc0c1f(0x14c)]?.['id'],'workflow_name':_0x167f15['workflow']?.[_0xfc0c1f(0x161)],'session_id':_0x167f15[_0xfc0c1f(0x1ac)],'sessionUuid':_0x167f15[_0xfc0c1f(0x1ae)],'sessionTime':_0x167f15[_0xfc0c1f(0x1bc)],'attempt_id':_0x167f15['id'],'attempt_index':_0x167f15['index'],'retryAttemptName':_0x167f15[_0xfc0c1f(0x1c6)],'done':_0x167f15[_0xfc0c1f(0x178)],'success':_0x167f15['success'],'cancelRequested':_0x167f15['cancelRequested'],'params':_0x167f15['params'],'createdAt':_0x167f15[_0xfc0c1f(0x1b3)],'finishedAt':_0x167f15[_0xfc0c1f(0x17b)],'id':_0x167f15['id'],'index':_0x167f15['index'],'project':_0x167f15[_0xfc0c1f(0x1a6)],'workflow':_0x167f15[_0xfc0c1f(0x14c)]}));}async[a195_0x7bbdf0(0x19d)](_0x3dc22d){const _0x3bde1f=a195_0x7bbdf0,_0xa04151=await this[_0x3bde1f(0x162)][_0x3bde1f(0x16c)](_0x3dc22d);return _0xa04151;}async[a195_0x7bbdf0(0x18d)](_0x17c1a6,_0x5d1ae2=![]){const _0x5ad1ba=a195_0x7bbdf0,_0x17f686=await this[_0x5ad1ba(0x162)][_0x5ad1ba(0x1b6)](_0x17c1a6,_0x5d1ae2);return _0x17f686[_0x5ad1ba(0x19f)](_0x531fb2=>({'task_id':_0x531fb2['id'],'task_name':_0x531fb2[_0x5ad1ba(0x1bf)],'parentId':_0x531fb2[_0x5ad1ba(0x1c0)],'config':_0x531fb2['config'],'upstreams':_0x531fb2[_0x5ad1ba(0x184)],'state':_0x531fb2[_0x5ad1ba(0x158)],'exportParams':_0x531fb2[_0x5ad1ba(0x159)],'storeParams':_0x531fb2['storeParams'],'stateParams':_0x531fb2[_0x5ad1ba(0x1b4)],'updatedAt':_0x531fb2[_0x5ad1ba(0x1bd)],'retryAt':_0x531fb2[_0x5ad1ba(0x189)],'startedAt':_0x531fb2['startedAt'],'error':_0x531fb2[_0x5ad1ba(0x1c9)],'isGroup':_0x531fb2[_0x5ad1ba(0x16e)],'id':_0x531fb2['id'],'fullName':_0x531fb2[_0x5ad1ba(0x1bf)]}));}async[a195_0x7bbdf0(0x165)](_0x495b8d,_0x169778){const _0x180387=a195_0x7bbdf0;return await this[_0x180387(0x162)][_0x180387(0x1b1)](_0x495b8d,_0x169778);}async['logs'](_0x397eb9,_0xb65b6b){const _0x154888=a195_0x7bbdf0,_0x5d5af0=await import(_0x154888(0x173)),{promisify:_0x55b391}=await import('util'),_0x298d2d=_0x55b391(_0x5d5af0['gunzip']),_0x40a4e1=await this[_0x154888(0x162)][_0x154888(0x1b1)](_0x397eb9,_0xb65b6b);if(_0x40a4e1[_0x154888(0x1cd)]===0x0)return'';const _0x51b03f=[];for(const _0x433582 of _0x40a4e1){if(!_0x433582[_0x154888(0x1a7)])continue;const _0x26d1cc=await fetch(_0x433582['direct']);if(!_0x26d1cc['ok'])throw new Error(_0x154888(0x14d)+_0x26d1cc[_0x154888(0x18c)]);const _0x404713=Buffer[_0x154888(0x18e)](await _0x26d1cc[_0x154888(0x19e)]()),_0x8ecba4=await _0x298d2d(_0x404713);_0x51b03f[_0x154888(0x160)](_0x8ecba4['toString']('utf-8'));}return _0x51b03f[_0x154888(0x180)]('\x0a');}async[a195_0x7bbdf0(0x17c)](_0xde662,_0x213c37){const _0x2c8e27=a195_0x7bbdf0,_0x15dafe=await this[_0x2c8e27(0x162)][_0x2c8e27(0x1be)](_0xde662,_0x213c37);return _0x15dafe?.['message']??_0x2c8e27(0x155);}async[a195_0x7bbdf0(0x17a)](_0x529060,_0x40e44f){const _0x501730=a195_0x7bbdf0,_0x18902e=await this[_0x501730(0x162)][_0x501730(0x17a)](_0x529060,{'from_task':_0x40e44f?.['fromTask'],'retry_params':_0x40e44f?.[_0x501730(0x15e)]});return{'attemptId':_0x18902e['id'],'sessionId':_0x18902e[_0x501730(0x1ac)]};}async[a195_0x7bbdf0(0x16d)](_0x2670e5,_0x14136b){const _0x250899=a195_0x7bbdf0,_0x5293da=await this[_0x250899(0x162)][_0x250899(0x16d)](_0x2670e5,{'resume_from':_0x14136b?.['resumeFrom'],'retry_params':_0x14136b?.['retryParams'],'force':_0x14136b?.[_0x250899(0x152)]});return{'attemptId':_0x5293da['id'],'sessionId':_0x5293da[_0x250899(0x1ac)]};}[a195_0x7bbdf0(0x167)](_0x40f531){const _0x381516=a195_0x7bbdf0,_0x32cc62=_0x40f531['indexOf']('.');if(_0x32cc62===-0x1)throw new SDKError(ErrorCode[_0x381516(0x18b)],_0x381516(0x1ca)+_0x40f531);const _0x418597=_0x40f531[_0x381516(0x196)](0x0,_0x32cc62),_0x38a6c3=_0x40f531[_0x381516(0x196)](_0x32cc62+0x1);if(!_0x418597||!_0x38a6c3)throw new SDKError(ErrorCode[_0x381516(0x18b)],'Invalid\x20workflow\x20format:\x20'+_0x40f531+_0x381516(0x182));return{'projectName':_0x418597,'workflowName':_0x38a6c3};}async[a195_0x7bbdf0(0x15f)](_0x10eebc,_0x50dd95={},_0x44f856){const _0x3a4f27=a195_0x7bbdf0,{projectName:_0x425587,workflowName:_0x221565}=this[_0x3a4f27(0x167)](_0x10eebc),_0x2a122c=_0x44f856?.[_0x3a4f27(0x1bc)]||new Date()['toISOString']();return await this[_0x3a4f27(0x162)][_0x3a4f27(0x1c1)]({'projectName':_0x425587,'workflowName':_0x221565,'sessionTime':_0x2a122c,'params':_0x50dd95});}async[a195_0x7bbdf0(0x17d)](_0x108e17){const _0x47c2f0=a195_0x7bbdf0,{projectName:_0x231451,workflowName:_0x36707a}=this['parseWorkflowId'](_0x108e17),{id:_0x14cdb8}=await this[_0x47c2f0(0x1b2)](_0x231451);return await this['client'][_0x47c2f0(0x16b)](_0x14cdb8,_0x36707a);}async['download'](_0x3d0c2b,_0x1bf64a,_0x2903a6){const _0x35c885=a195_0x7bbdf0,{promises:_0x21a595}=await import('fs'),_0x1a02cf=await import(_0x35c885(0x156)),_0x4267c6=await import('os'),_0x3b3faa=await import(_0x35c885(0x164)),{id:_0x57352b,name:_0x13a24b}=await this['resolveProjectId'](_0x3d0c2b),_0x459c14=_0x4267c6[_0x35c885(0x185)](),_0x3a77b7=_0x1a02cf[_0x35c885(0x180)](_0x459c14,_0x35c885(0x1a3)+_0x57352b+'-'+Date[_0x35c885(0x186)]()+_0x35c885(0x198));try{await this['client']['downloadProjectArchive'](_0x57352b,_0x3a77b7,_0x2903a6?.[_0x35c885(0x187)]);const _0x9c4ec5=_0x1a02cf['join'](_0x1bf64a,_0x13a24b);await _0x21a595[_0x35c885(0x14f)](_0x9c4ec5,{'recursive':!![]}),await _0x3b3faa[_0x35c885(0x163)]({'file':_0x3a77b7,'cwd':_0x9c4ec5,'gzip':!![]});const _0x484b93=async _0x1f9e28=>{const _0x199799=_0x35c885;let _0x1ecbf4=0x0;const _0x43eee4=await _0x21a595[_0x199799(0x19c)](_0x1f9e28,{'withFileTypes':!![]});for(const _0x119cba of _0x43eee4){const _0x568739=_0x1a02cf[_0x199799(0x180)](_0x1f9e28,_0x119cba['name']);if(_0x119cba[_0x199799(0x1ba)]())_0x1ecbf4++;else _0x119cba[_0x199799(0x175)]()&&(_0x1ecbf4+=await _0x484b93(_0x568739));}return _0x1ecbf4;},_0x1ea17c=await _0x484b93(_0x9c4ec5);return{'projectName':_0x13a24b,'revision':_0x2903a6?.['revision']||_0x35c885(0x191),'filesExtracted':_0x1ea17c};}finally{try{await _0x21a595[_0x35c885(0x1ad)](_0x3a77b7);}catch{}}}async[a195_0x7bbdf0(0x160)](_0x4c524a,_0x56190b){const _0x1eb668=a195_0x7bbdf0,{promises:_0x3a70a4}=await import('fs'),_0x458447=await import(_0x1eb668(0x156)),_0x18cf36=await import(_0x1eb668(0x164)),_0x409808=_0x56190b?.[_0x1eb668(0x177)]||_0x458447[_0x1eb668(0x1c8)](_0x4c524a),_0x576c6a=_0x56190b?.['revision']||new Date()[_0x1eb668(0x176)]()[_0x1eb668(0x153)](/[:.]/g,'-');try{await _0x3a70a4['access'](_0x4c524a);}catch{throw new Error('Project\x20directory\x20not\x20found:\x20'+_0x4c524a);}if(!_0x56190b?.[_0x1eb668(0x1b5)]){const _0x46b096=await _0x3a70a4[_0x1eb668(0x19c)](_0x4c524a),_0x5120d9=_0x46b096[_0x1eb668(0x169)](_0x3120b3=>_0x3120b3['endsWith'](WORKFLOW_FILE_EXTENSION));if(_0x5120d9['length']===0x0)throw new Error(_0x1eb668(0x1a8)+WORKFLOW_FILE_EXTENSION+_0x1eb668(0x15a));for(const _0x273bc4 of _0x5120d9){const _0x4e4ff9=_0x458447[_0x1eb668(0x180)](_0x4c524a,_0x273bc4);try{await _0x3a70a4[_0x1eb668(0x195)](_0x4e4ff9);}catch{throw new Error('Cannot\x20read\x20workflow\x20file:\x20'+_0x273bc4);}}}const _0x297284=async(_0x345ece,_0x49003f='')=>{const _0x19e2dd=_0x1eb668,_0x4d09af=await _0x3a70a4[_0x19e2dd(0x19c)](_0x345ece,{'withFileTypes':!![]}),_0x1546e2=[];for(const _0x8fba25 of _0x4d09af){const _0x5e5d3e=_0x458447[_0x19e2dd(0x180)](_0x49003f,_0x8fba25[_0x19e2dd(0x161)]),_0x28d807=_0x458447[_0x19e2dd(0x180)](_0x345ece,_0x8fba25[_0x19e2dd(0x161)]);if(!shouldIncludeInArchive(_0x8fba25[_0x19e2dd(0x161)]))continue;_0x8fba25[_0x19e2dd(0x175)]()?_0x1546e2[_0x19e2dd(0x160)](...await _0x297284(_0x28d807,_0x5e5d3e)):_0x1546e2[_0x19e2dd(0x160)](_0x5e5d3e);}return _0x1546e2;},_0x2f288d=await _0x297284(_0x4c524a),_0x4368b9=await import('os'),_0x249848=_0x4368b9['tmpdir'](),_0x316d77=_0x458447[_0x1eb668(0x180)](_0x249848,_0x1eb668(0x1b7)+Date['now']()+'.tar.gz');try{await _0x18cf36[_0x1eb668(0x1c3)]({'file':_0x316d77,'gzip':!![],'cwd':_0x4c524a,'portable':!![]},_0x2f288d);const _0x472808=await this['client'][_0x1eb668(0x170)](_0x409808,_0x576c6a,_0x316d77,{'scheduleFrom':_0x56190b?.['scheduleFrom'],'clearSchedule':_0x56190b?.[_0x1eb668(0x15b)],'clearScheduleAll':_0x56190b?.[_0x1eb668(0x172)]});return{'projectId':_0x472808['id'],'projectName':_0x472808[_0x1eb668(0x161)],'revision':_0x472808[_0x1eb668(0x187)]};}finally{try{await _0x3a70a4[_0x1eb668(0x1ad)](_0x316d77);}catch{}}}async[a195_0x7bbdf0(0x14b)](_0xf033e7){const _0x2d7fa0=a195_0x7bbdf0,{id:_0x35b64a}=await this['resolveProjectId'](_0xf033e7),_0x5852c0=await this[_0x2d7fa0(0x162)][_0x2d7fa0(0x194)](_0x35b64a);return{'projectId':_0x5852c0['id'],'projectName':_0x5852c0[_0x2d7fa0(0x161)]};}async[a195_0x7bbdf0(0x1cc)](_0x3fc8ad){const _0x44b4f2=a195_0x7bbdf0,{id:_0x4ab31b,name:_0x277472}=await this[_0x44b4f2(0x1b2)](_0x3fc8ad),_0x39fe70=await this[_0x44b4f2(0x162)][_0x44b4f2(0x1cc)](_0x4ab31b);return{'projectName':_0x277472,'secrets':_0x39fe70};}async['setSecret'](_0x36c2a1,_0x181f38,_0x2bf660){const _0x208ac4=a195_0x7bbdf0,{id:_0x486a8c,name:_0x362e08}=await this['resolveProjectId'](_0x36c2a1);return await this[_0x208ac4(0x162)][_0x208ac4(0x17f)](_0x486a8c,_0x181f38,_0x2bf660),{'projectName':_0x362e08,'key':_0x181f38};}async[a195_0x7bbdf0(0x17e)](_0x31b542,_0x4c6f0b){const _0x5a5a12=a195_0x7bbdf0,{id:_0x459595,name:_0x4f3437}=await this[_0x5a5a12(0x1b2)](_0x31b542),_0x2072e=Object[_0x5a5a12(0x168)](_0x4c6f0b),_0x4fc502=await Promise[_0x5a5a12(0x16a)](_0x2072e[_0x5a5a12(0x19f)](_0x5ada6c=>this[_0x5a5a12(0x162)][_0x5a5a12(0x17f)](_0x459595,_0x5ada6c,_0x4c6f0b[_0x5ada6c]))),_0x1061da=_0x4fc502['map']((_0x37302b,_0x30a846)=>_0x37302b[_0x5a5a12(0x18c)]==='rejected'?_0x2072e[_0x30a846]:null)[_0x5a5a12(0x169)](_0x19162d=>_0x19162d!==null);if(_0x1061da['length']>0x0)throw new SDKError(ErrorCode[_0x5a5a12(0x171)],_0x5a5a12(0x199)+(_0x1061da[_0x5a5a12(0x1cd)]>0x1?'s':'')+':\x20'+_0x1061da['join'](',\x20'));return{'projectName':_0x4f3437,'keys':_0x2072e};}async[a195_0x7bbdf0(0x179)](_0x241f5d,_0x56e7a5){const _0x51d889=a195_0x7bbdf0,{id:_0x8a5508,name:_0x2dfe4f}=await this[_0x51d889(0x1b2)](_0x241f5d);return await this['client'][_0x51d889(0x179)](_0x8a5508,_0x56e7a5),{'projectName':_0x2dfe4f,'key':_0x56e7a5};}async[a195_0x7bbdf0(0x1ab)](_0x392670,_0x28b9da){const _0xaf2a38=a195_0x7bbdf0;return pullWorkflow({'client':this[_0xaf2a38(0x162)],'resolveProjectId':this[_0xaf2a38(0x1b2)][_0xaf2a38(0x1a4)](this)},_0x392670,_0x28b9da);}async['applyPullProject'](_0x1c9692,_0x4eb67c){const _0x3aee69=a195_0x7bbdf0;return applyPullResult({'client':this[_0x3aee69(0x162)],'resolveProjectId':this[_0x3aee69(0x1b2)]['bind'](this)},_0x1c9692,_0x4eb67c);}async[a195_0x7bbdf0(0x190)](_0x2c82c4){const _0x46cf0c=a195_0x7bbdf0;return preparePushWorkflow({'client':this[_0x46cf0c(0x162)],'resolveProjectId':this[_0x46cf0c(0x1b2)][_0x46cf0c(0x1a4)](this)},_0x2c82c4);}async['executePushProject'](_0x420505){const _0x534ad2=a195_0x7bbdf0;return executePushWorkflow({'client':this[_0x534ad2(0x162)],'resolveProjectId':this['resolveProjectId'][_0x534ad2(0x1a4)](this)},_0x420505);}async[a195_0x7bbdf0(0x1b9)](_0x55a877,_0x594923,_0x2eded8){return prepareCloneWorkflow({'client':this['client']},_0x55a877,_0x594923,_0x2eded8);}async[a195_0x7bbdf0(0x19a)](_0x9f58af){const _0x3be575=a195_0x7bbdf0;return executeCloneWorkflow({'client':this[_0x3be575(0x162)]},_0x9f58af);}async['listSchedules'](){const _0x7d375e=a195_0x7bbdf0;return await this[_0x7d375e(0x162)][_0x7d375e(0x192)]();}async[a195_0x7bbdf0(0x1a5)](_0x490614,_0x41c1aa){const _0x113815=a195_0x7bbdf0;return await this[_0x113815(0x162)]['enableSchedule'](_0x490614,_0x41c1aa);}async['disableSchedule'](_0x5d46be){const _0x3796a1=a195_0x7bbdf0;return await this['client'][_0x3796a1(0x1a9)](_0x5d46be);}}
|
|
1
|
+
function a195_0x5c27(_0x27000d,_0x4d6b8b){_0x27000d=_0x27000d-0x12a;const _0x22885d=a195_0x2288();let _0x5c27b4=_0x22885d[_0x27000d];return _0x5c27b4;}const a195_0x5c339e=a195_0x5c27;(function(_0x2f246b,_0x2708f6){const _0x4722a5=a195_0x5c27,_0x59c124=_0x2f246b();while(!![]){try{const _0x1daf2a=-parseInt(_0x4722a5(0x195))/0x1+parseInt(_0x4722a5(0x137))/0x2+parseInt(_0x4722a5(0x163))/0x3*(-parseInt(_0x4722a5(0x14d))/0x4)+parseInt(_0x4722a5(0x15e))/0x5+-parseInt(_0x4722a5(0x19e))/0x6*(-parseInt(_0x4722a5(0x141))/0x7)+parseInt(_0x4722a5(0x145))/0x8*(-parseInt(_0x4722a5(0x14f))/0x9)+parseInt(_0x4722a5(0x18d))/0xa;if(_0x1daf2a===_0x2708f6)break;else _0x59c124['push'](_0x59c124['shift']());}catch(_0x66eb6a){_0x59c124['push'](_0x59c124['shift']());}}}(a195_0x2288,0x4a9f2));import{WorkflowApiClient}from'../client/workflow-client.js';import{SDKError,ErrorCode}from'../errors.js';import{MAX_PAGINATION_LIMIT}from'../util/paginate.js';function a195_0x2288(){const _0x533917=['workflow','project','listAttempts','deleteProject','readdir','executePushProject','setSecret','replace','parseWorkflowId','rejected','skipValidation','error','endsWith','INVALID_ARGUMENT','now','client','5187260XMWgfq','Project\x20directory\x20not\x20found:\x20','getProjectWorkflow','attempt','download','sessionId','revision','config','544319eQaiUL','test','clearScheduleAll','allSettled','done','listProjects','sessionTime','listSecrets','getAttemptTasks','30840phqGgH','applyPullProject','cancelRequested','success','getWorkflow','fromTask','NUMERIC_ID_PATTERN','run','startedAt','path','stateParams','workflows','resolveProjectId','tdx-workflow-push-','projects','workflowName','fullName','kill','map','join','sessions','downloadProjectArchive','logs','retryAttempt','find','createdAt','785006hhoWcy','util','tar','direct','keys','push','.tar.gz','getProject','logFiles','disableSchedule','126NtFDmq','exportParams','Failed\x20to\x20set\x20secret','toString','5384EdgPbI','index','lastId','scheduleFrom','unlink','prepareCloneProject','utf-8','limit','74812UmCwuF','from','2313tpIrPv','fromTime','length','listSchedules','slice','last_id','killAttempt','extract','Invalid\x20workflow\x20format:\x20','tdx-workflow-','No\x20','retryParams','status','access','uploadProjectArchive','1685660GagjZc','lastAttempt','sessionUuid','force','tmpdir','51YNlkNL','executeCloneProject','retrySession','latest','Cannot\x20read\x20workflow\x20file:\x20','projectName','finishedAt','gunzip','retryAt','storeParams','listLogFiles','WORKFLOW_SECRET_SET_FAILED','deleteSecret','min','retryAttemptName','message','timezone','listWorkflows','substring','getAttempt','WORKFLOW_PROJECT_NOT_FOUND','isDirectory','name','bind','filter','data'];a195_0x2288=function(){return _0x533917;};return a195_0x2288();}async function paginateResults(_0x22ec01,_0x29adf6,_0x50ee45=0x64){const _0x53275f=a195_0x5c27,_0x9855b9=Math[_0x53275f(0x170)](_0x29adf6,MAX_PAGINATION_LIMIT),_0x151518=[];let _0x2e2d44;while(_0x151518[_0x53275f(0x151)]<_0x9855b9){const _0x1bf11a=await _0x22ec01(_0x50ee45,_0x2e2d44),_0x2e906d=_0x1bf11a['rawCount']??_0x1bf11a[_0x53275f(0x17c)][_0x53275f(0x151)];if(_0x2e906d===0x0)break;_0x151518[_0x53275f(0x13c)](..._0x1bf11a['data']);if(!_0x1bf11a['lastId']||_0x2e906d<_0x50ee45)break;_0x2e2d44=_0x1bf11a[_0x53275f(0x147)];}return _0x151518[_0x53275f(0x153)](0x0,_0x9855b9);}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 [a195_0x5c339e(0x1a4)]=/^\d+$/;[a195_0x5c339e(0x18c)];constructor(_0x581a7c){const _0x3347d3=a195_0x5c339e;this[_0x3347d3(0x18c)]=new WorkflowApiClient(_0x581a7c);}async[a195_0x5c339e(0x1aa)](_0x462bef){const _0x32a057=a195_0x5c339e;if(WorkflowSDK['NUMERIC_ID_PATTERN'][_0x32a057(0x196)](_0x462bef)){const _0x6a5df5=await this[_0x32a057(0x18c)][_0x32a057(0x13e)](_0x462bef);return{'id':_0x6a5df5['id'],'name':_0x6a5df5[_0x32a057(0x179)]};}const _0x5b61e7=await this['client'][_0x32a057(0x19a)]({'name_pattern':_0x462bef}),_0x13e0ec=_0x5b61e7['data'][_0x32a057(0x135)](_0x5bcb5d=>_0x5bcb5d[_0x32a057(0x179)]===_0x462bef);if(!_0x13e0ec)throw new SDKError(ErrorCode[_0x32a057(0x177)],'Project\x20not\x20found:\x20'+_0x462bef);return{'id':_0x13e0ec['id'],'name':_0x13e0ec[_0x32a057(0x179)]};}async[a195_0x5c339e(0x12b)](_0x2a0a98,_0x271477){const _0x1e0ef1=a195_0x5c339e,_0xf69fbc=_0x271477?.[_0x1e0ef1(0x14c)]||MAX_PAGINATION_LIMIT,_0x97e957=await paginateResults((_0x32252a,_0x5896a0)=>this['client'][_0x1e0ef1(0x19a)]({'name_pattern':_0x2a0a98,'limit':_0x32252a,'last_id':_0x5896a0??_0x271477?.[_0x1e0ef1(0x154)]}),_0xf69fbc);return _0x97e957['map'](_0x56206b=>({..._0x56206b,'project_id':_0x56206b['id'],'project_name':_0x56206b[_0x1e0ef1(0x179)]}));}async[a195_0x5c339e(0x1a9)](_0x5e421f,_0x46fb60){const _0x322c2c=a195_0x5c339e,_0x594098=_0x46fb60?.[_0x322c2c(0x14c)]||MAX_PAGINATION_LIMIT,_0x2218ad=await paginateResults((_0x128cad,_0x3b2b97)=>this['client'][_0x322c2c(0x174)]({'project_name':_0x5e421f,'limit':_0x128cad,'last_id':_0x3b2b97??_0x46fb60?.[_0x322c2c(0x154)]}),_0x594098);return _0x2218ad[_0x322c2c(0x12f)](_0x7169a1=>({'project_id':_0x7169a1[_0x322c2c(0x17e)]?.['id'],'project_name':_0x7169a1['project']?.['name'],'workflow_id':_0x7169a1['id'],'workflow_name':_0x7169a1[_0x322c2c(0x179)],'revision':_0x7169a1[_0x322c2c(0x193)],'timezone':_0x7169a1[_0x322c2c(0x173)],'config':_0x7169a1[_0x322c2c(0x194)],'id':_0x7169a1['id'],'name':_0x7169a1['name'],'project':_0x7169a1[_0x322c2c(0x17e)]}));}async[a195_0x5c339e(0x131)](_0x6a7ef5){const _0x3d364a=a195_0x5c339e;let _0xee994c;if(_0x6a7ef5?.[_0x3d364a(0x168)]){let _0x2b1f06,_0x513557=![];while(!_0x513557){const _0x39b43e=await this[_0x3d364a(0x18c)]['listProjects']({'limit':0x64,'last_id':_0x2b1f06}),_0x3b36e2=_0x39b43e[_0x3d364a(0x17c)][_0x3d364a(0x135)](_0x202dce=>_0x202dce['name']===_0x6a7ef5[_0x3d364a(0x168)]);if(_0x3b36e2){_0xee994c=_0x3b36e2['id'],_0x513557=!![];break;}if(!_0x39b43e[_0x3d364a(0x147)]||_0x39b43e[_0x3d364a(0x17c)]['length']===0x0)break;_0x2b1f06=_0x39b43e['lastId'];}if(!_0xee994c)throw new SDKError(ErrorCode[_0x3d364a(0x177)],'Project\x20not\x20found:\x20'+_0x6a7ef5['projectName']);}const _0x2e39fb=_0x6a7ef5?.[_0x3d364a(0x14c)]||0x64,_0xe40d0b=await paginateResults((_0x213e02,_0x534009)=>this['client']['listSessions']({'project_id':_0xee994c,'project_name':_0x6a7ef5?.[_0x3d364a(0x168)],'workflow_name':_0x6a7ef5?.[_0x3d364a(0x12c)],'status':_0x6a7ef5?.[_0x3d364a(0x15b)],'from_time':_0x6a7ef5?.[_0x3d364a(0x150)],'to_time':_0x6a7ef5?.['toTime'],'limit':_0x213e02,'last_id':_0x534009??_0x6a7ef5?.[_0x3d364a(0x154)]}),_0x2e39fb);return _0xe40d0b['map'](_0xaedd10=>({'project_id':_0xaedd10[_0x3d364a(0x17e)]?.['id'],'project_name':_0xaedd10[_0x3d364a(0x17e)]?.['name'],'workflow_id':_0xaedd10[_0x3d364a(0x17d)]?.['id'],'workflow_name':_0xaedd10[_0x3d364a(0x17d)]?.['name'],'session_id':_0xaedd10['id'],'sessionUuid':_0xaedd10[_0x3d364a(0x160)],'sessionTime':_0xaedd10[_0x3d364a(0x19b)],'lastAttempt':_0xaedd10[_0x3d364a(0x15f)],'id':_0xaedd10['id'],'project':_0xaedd10[_0x3d364a(0x17e)],'workflow':_0xaedd10[_0x3d364a(0x17d)]}));}async['attempts'](_0x5aeea6){const _0x203b00=a195_0x5c339e,_0x5e7539=_0x5aeea6?.[_0x203b00(0x14c)]||0x64,_0xd5ecbc=await paginateResults((_0x239749,_0x4a86a2)=>this[_0x203b00(0x18c)][_0x203b00(0x17f)]({'project_name':_0x5aeea6?.[_0x203b00(0x168)],'workflow_name':_0x5aeea6?.['workflowName'],'include_retried':_0x5aeea6?.['includeRetried'],'limit':_0x239749,'last_id':_0x4a86a2??_0x5aeea6?.[_0x203b00(0x154)]}),_0x5e7539);return _0xd5ecbc[_0x203b00(0x12f)](_0x229105=>({'project_id':_0x229105[_0x203b00(0x17e)]?.['id'],'project_name':_0x229105['project']?.[_0x203b00(0x179)],'workflow_id':_0x229105[_0x203b00(0x17d)]?.['id'],'workflow_name':_0x229105[_0x203b00(0x17d)]?.[_0x203b00(0x179)],'session_id':_0x229105[_0x203b00(0x192)],'sessionUuid':_0x229105['sessionUuid'],'sessionTime':_0x229105[_0x203b00(0x19b)],'attempt_id':_0x229105['id'],'attempt_index':_0x229105['index'],'retryAttemptName':_0x229105[_0x203b00(0x171)],'done':_0x229105[_0x203b00(0x199)],'success':_0x229105[_0x203b00(0x1a1)],'cancelRequested':_0x229105[_0x203b00(0x1a0)],'params':_0x229105['params'],'createdAt':_0x229105[_0x203b00(0x136)],'finishedAt':_0x229105[_0x203b00(0x169)],'id':_0x229105['id'],'index':_0x229105[_0x203b00(0x146)],'project':_0x229105[_0x203b00(0x17e)],'workflow':_0x229105['workflow']}));}async[a195_0x5c339e(0x190)](_0x3872a8){const _0x1027b6=a195_0x5c339e,_0x4ad668=await this[_0x1027b6(0x18c)][_0x1027b6(0x176)](_0x3872a8);return _0x4ad668;}async['tasks'](_0x1fb765,_0x8beb39=![]){const _0x5c4331=a195_0x5c339e,_0x5c49c1=await this[_0x5c4331(0x18c)][_0x5c4331(0x19d)](_0x1fb765,_0x8beb39);return _0x5c49c1[_0x5c4331(0x12f)](_0x7a5fc4=>({'task_id':_0x7a5fc4['id'],'task_name':_0x7a5fc4[_0x5c4331(0x12d)],'parentId':_0x7a5fc4['parentId'],'config':_0x7a5fc4['config'],'upstreams':_0x7a5fc4['upstreams'],'state':_0x7a5fc4['state'],'exportParams':_0x7a5fc4[_0x5c4331(0x142)],'storeParams':_0x7a5fc4[_0x5c4331(0x16c)],'stateParams':_0x7a5fc4[_0x5c4331(0x1a8)],'updatedAt':_0x7a5fc4['updatedAt'],'retryAt':_0x7a5fc4[_0x5c4331(0x16b)],'startedAt':_0x7a5fc4[_0x5c4331(0x1a6)],'error':_0x7a5fc4[_0x5c4331(0x188)],'isGroup':_0x7a5fc4['isGroup'],'id':_0x7a5fc4['id'],'fullName':_0x7a5fc4[_0x5c4331(0x12d)]}));}async[a195_0x5c339e(0x13f)](_0x2049db,_0x253b77){const _0x15da06=a195_0x5c339e;return await this[_0x15da06(0x18c)][_0x15da06(0x16d)](_0x2049db,_0x253b77);}async[a195_0x5c339e(0x133)](_0x45039b,_0x564149){const _0x3f9197=a195_0x5c339e,_0x564625=await import('zlib'),{promisify:_0x571d52}=await import(_0x3f9197(0x138)),_0x33aed0=_0x571d52(_0x564625[_0x3f9197(0x16a)]),_0x17f8f0=await this[_0x3f9197(0x18c)][_0x3f9197(0x16d)](_0x45039b,_0x564149);if(_0x17f8f0['length']===0x0)return'';const _0x226db5=[];for(const _0x109c3d of _0x17f8f0){if(!_0x109c3d[_0x3f9197(0x13a)])continue;const _0x587b3a=await fetch(_0x109c3d['direct']);if(!_0x587b3a['ok'])throw new Error('Failed\x20to\x20download\x20log\x20file:\x20'+_0x587b3a[_0x3f9197(0x15b)]);const _0x55ecd6=Buffer[_0x3f9197(0x14e)](await _0x587b3a['arrayBuffer']()),_0x336e29=await _0x33aed0(_0x55ecd6);_0x226db5[_0x3f9197(0x13c)](_0x336e29[_0x3f9197(0x144)](_0x3f9197(0x14b)));}return _0x226db5['join']('\x0a');}async[a195_0x5c339e(0x12e)](_0x190ed4,_0x49902f){const _0x6974c6=a195_0x5c339e,_0x3f4515=await this[_0x6974c6(0x18c)][_0x6974c6(0x155)](_0x190ed4,_0x49902f);return _0x3f4515?.[_0x6974c6(0x172)]??'Kill\x20request\x20accepted';}async[a195_0x5c339e(0x165)](_0xe54a82,_0x37947b){const _0x66e0af=a195_0x5c339e,_0x11a0b3=await this[_0x66e0af(0x18c)][_0x66e0af(0x165)](_0xe54a82,{'from_task':_0x37947b?.[_0x66e0af(0x1a3)],'retry_params':_0x37947b?.[_0x66e0af(0x15a)]});return{'attemptId':_0x11a0b3['id'],'sessionId':_0x11a0b3[_0x66e0af(0x192)]};}async[a195_0x5c339e(0x134)](_0x141a8d,_0x12ceca){const _0x2d0359=a195_0x5c339e,_0xeefa91=await this[_0x2d0359(0x18c)][_0x2d0359(0x134)](_0x141a8d,{'resume_from':_0x12ceca?.['resumeFrom'],'retry_params':_0x12ceca?.[_0x2d0359(0x15a)],'force':_0x12ceca?.[_0x2d0359(0x161)]});return{'attemptId':_0xeefa91['id'],'sessionId':_0xeefa91[_0x2d0359(0x192)]};}[a195_0x5c339e(0x185)](_0x1b37b9){const _0x110ea6=a195_0x5c339e,_0x47dc21=_0x1b37b9['indexOf']('.');if(_0x47dc21===-0x1)throw new SDKError(ErrorCode[_0x110ea6(0x18a)],'Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format:\x20'+_0x1b37b9);const _0x50556f=_0x1b37b9[_0x110ea6(0x175)](0x0,_0x47dc21),_0x46c56f=_0x1b37b9[_0x110ea6(0x175)](_0x47dc21+0x1);if(!_0x50556f||!_0x46c56f)throw new SDKError(ErrorCode[_0x110ea6(0x18a)],_0x110ea6(0x157)+_0x1b37b9+'.\x20Expected\x20\x22project.workflow\x22');return{'projectName':_0x50556f,'workflowName':_0x46c56f};}async[a195_0x5c339e(0x1a5)](_0x1a0d8d,_0x2bba57={},_0x2ae5d5){const _0x50e603=a195_0x5c339e,{projectName:_0x2f58bc,workflowName:_0x3b11c9}=this[_0x50e603(0x185)](_0x1a0d8d),_0x1e3b61=_0x2ae5d5?.['sessionTime']||new Date()['toISOString']();return await this[_0x50e603(0x18c)]['startAttempt']({'projectName':_0x2f58bc,'workflowName':_0x3b11c9,'sessionTime':_0x1e3b61,'params':_0x2bba57});}async[a195_0x5c339e(0x1a2)](_0x36cb38){const _0x2e518e=a195_0x5c339e,{projectName:_0x287450,workflowName:_0x4dc127}=this[_0x2e518e(0x185)](_0x36cb38),{id:_0x39ee2f}=await this[_0x2e518e(0x1aa)](_0x287450);return await this[_0x2e518e(0x18c)][_0x2e518e(0x18f)](_0x39ee2f,_0x4dc127);}async[a195_0x5c339e(0x191)](_0x2cf5d3,_0xdb3290,_0x362185){const _0x188180=a195_0x5c339e,{promises:_0x3ab37c}=await import('fs'),_0xc48efd=await import(_0x188180(0x1a7)),_0x4f8d84=await import('os'),_0x2e4fd2=await import(_0x188180(0x139)),{id:_0x17b5cd,name:_0x391dad}=await this[_0x188180(0x1aa)](_0x2cf5d3),_0x38b756=_0x4f8d84[_0x188180(0x162)](),_0x217d0e=_0xc48efd[_0x188180(0x130)](_0x38b756,_0x188180(0x158)+_0x17b5cd+'-'+Date[_0x188180(0x18b)]()+_0x188180(0x13d));try{await this['client'][_0x188180(0x132)](_0x17b5cd,_0x217d0e,_0x362185?.[_0x188180(0x193)]);const _0x3e2b3d=_0xc48efd['join'](_0xdb3290,_0x391dad);await _0x3ab37c['mkdir'](_0x3e2b3d,{'recursive':!![]}),await _0x2e4fd2[_0x188180(0x156)]({'file':_0x217d0e,'cwd':_0x3e2b3d,'gzip':!![]});const _0x1b0b3a=async _0xc15953=>{const _0xca0b51=_0x188180;let _0x5c5044=0x0;const _0x148afc=await _0x3ab37c['readdir'](_0xc15953,{'withFileTypes':!![]});for(const _0x877506 of _0x148afc){const _0x3efb17=_0xc48efd[_0xca0b51(0x130)](_0xc15953,_0x877506[_0xca0b51(0x179)]);if(_0x877506['isFile']())_0x5c5044++;else _0x877506['isDirectory']()&&(_0x5c5044+=await _0x1b0b3a(_0x3efb17));}return _0x5c5044;},_0x15314f=await _0x1b0b3a(_0x3e2b3d);return{'projectName':_0x391dad,'revision':_0x362185?.['revision']||_0x188180(0x166),'filesExtracted':_0x15314f};}finally{try{await _0x3ab37c[_0x188180(0x149)](_0x217d0e);}catch{}}}async[a195_0x5c339e(0x13c)](_0xd12926,_0x500220){const _0x28ef30=a195_0x5c339e,{promises:_0x2ac1f6}=await import('fs'),_0x385eec=await import('path'),_0x675bb7=await import(_0x28ef30(0x139)),_0x2b06b9=_0x500220?.[_0x28ef30(0x168)]||_0x385eec['basename'](_0xd12926),_0x94f47f=_0x500220?.[_0x28ef30(0x193)]||new Date()['toISOString']()[_0x28ef30(0x184)](/[:.]/g,'-');try{await _0x2ac1f6[_0x28ef30(0x15c)](_0xd12926);}catch{throw new Error(_0x28ef30(0x18e)+_0xd12926);}if(!_0x500220?.[_0x28ef30(0x187)]){const _0x40f12c=await _0x2ac1f6[_0x28ef30(0x181)](_0xd12926),_0x18d248=_0x40f12c[_0x28ef30(0x17b)](_0x4ec557=>_0x4ec557[_0x28ef30(0x189)](WORKFLOW_FILE_EXTENSION));if(_0x18d248[_0x28ef30(0x151)]===0x0)throw new Error(_0x28ef30(0x159)+WORKFLOW_FILE_EXTENSION+'\x20workflow\x20files\x20found\x20in\x20project\x20directory');for(const _0x28450a of _0x18d248){const _0x3c5cbd=_0x385eec[_0x28ef30(0x130)](_0xd12926,_0x28450a);try{await _0x2ac1f6['access'](_0x3c5cbd);}catch{throw new Error(_0x28ef30(0x167)+_0x28450a);}}}const _0x2383b7=async(_0x4f4114,_0x5f4ebb='')=>{const _0x4b8ff4=_0x28ef30,_0x189459=await _0x2ac1f6['readdir'](_0x4f4114,{'withFileTypes':!![]}),_0x330376=[];for(const _0x44e780 of _0x189459){const _0x27c6d0=_0x385eec[_0x4b8ff4(0x130)](_0x5f4ebb,_0x44e780[_0x4b8ff4(0x179)]),_0x53ac0d=_0x385eec['join'](_0x4f4114,_0x44e780[_0x4b8ff4(0x179)]);if(!shouldIncludeInArchive(_0x44e780[_0x4b8ff4(0x179)]))continue;_0x44e780[_0x4b8ff4(0x178)]()?_0x330376[_0x4b8ff4(0x13c)](...await _0x2383b7(_0x53ac0d,_0x27c6d0)):_0x330376[_0x4b8ff4(0x13c)](_0x27c6d0);}return _0x330376;},_0x480af7=await _0x2383b7(_0xd12926),_0x247234=await import('os'),_0x5130d7=_0x247234['tmpdir'](),_0x530c7c=_0x385eec[_0x28ef30(0x130)](_0x5130d7,_0x28ef30(0x12a)+Date[_0x28ef30(0x18b)]()+_0x28ef30(0x13d));try{await _0x675bb7['create']({'file':_0x530c7c,'gzip':!![],'cwd':_0xd12926,'portable':!![]},_0x480af7);const _0x475504=await this[_0x28ef30(0x18c)][_0x28ef30(0x15d)](_0x2b06b9,_0x94f47f,_0x530c7c,{'scheduleFrom':_0x500220?.[_0x28ef30(0x148)],'clearSchedule':_0x500220?.['clearSchedule'],'clearScheduleAll':_0x500220?.[_0x28ef30(0x197)]});return{'projectId':_0x475504['id'],'projectName':_0x475504[_0x28ef30(0x179)],'revision':_0x475504['revision']};}finally{try{await _0x2ac1f6[_0x28ef30(0x149)](_0x530c7c);}catch{}}}async['delete'](_0x57f70c){const _0x6aad53=a195_0x5c339e,{id:_0x4e9b0b}=await this[_0x6aad53(0x1aa)](_0x57f70c),_0x186eee=await this[_0x6aad53(0x18c)][_0x6aad53(0x180)](_0x4e9b0b);return{'projectId':_0x186eee['id'],'projectName':_0x186eee[_0x6aad53(0x179)]};}async[a195_0x5c339e(0x19c)](_0x5dc39d){const _0xeb276b=a195_0x5c339e,{id:_0x1c87a2,name:_0x2de918}=await this[_0xeb276b(0x1aa)](_0x5dc39d),_0x34397a=await this['client']['listSecrets'](_0x1c87a2);return{'projectName':_0x2de918,'secrets':_0x34397a};}async[a195_0x5c339e(0x183)](_0x3be15a,_0x4502df,_0x1c2eb4){const _0x95e0d3=a195_0x5c339e,{id:_0x216758,name:_0x1f3475}=await this['resolveProjectId'](_0x3be15a);return await this[_0x95e0d3(0x18c)][_0x95e0d3(0x183)](_0x216758,_0x4502df,_0x1c2eb4),{'projectName':_0x1f3475,'key':_0x4502df};}async['setSecrets'](_0x1fd209,_0x1921b4){const _0xb74d39=a195_0x5c339e,{id:_0x579477,name:_0x44caeb}=await this[_0xb74d39(0x1aa)](_0x1fd209),_0x183c20=Object[_0xb74d39(0x13b)](_0x1921b4),_0x3902e6=await Promise[_0xb74d39(0x198)](_0x183c20[_0xb74d39(0x12f)](_0x1e628f=>this[_0xb74d39(0x18c)][_0xb74d39(0x183)](_0x579477,_0x1e628f,_0x1921b4[_0x1e628f]))),_0x3cf321=_0x3902e6[_0xb74d39(0x12f)]((_0x12e333,_0x11594f)=>_0x12e333['status']===_0xb74d39(0x186)?_0x183c20[_0x11594f]:null)[_0xb74d39(0x17b)](_0xf6c073=>_0xf6c073!==null);if(_0x3cf321['length']>0x0)throw new SDKError(ErrorCode[_0xb74d39(0x16e)],_0xb74d39(0x143)+(_0x3cf321[_0xb74d39(0x151)]>0x1?'s':'')+':\x20'+_0x3cf321[_0xb74d39(0x130)](',\x20'));return{'projectName':_0x44caeb,'keys':_0x183c20};}async[a195_0x5c339e(0x16f)](_0x55c21b,_0x35f3ee){const _0x27a733=a195_0x5c339e,{id:_0x2abfc2,name:_0x5e5a8c}=await this[_0x27a733(0x1aa)](_0x55c21b);return await this[_0x27a733(0x18c)][_0x27a733(0x16f)](_0x2abfc2,_0x35f3ee),{'projectName':_0x5e5a8c,'key':_0x35f3ee};}async['pullProject'](_0x456348,_0xec87ca){const _0x268996=a195_0x5c339e;return pullWorkflow({'client':this['client'],'resolveProjectId':this[_0x268996(0x1aa)][_0x268996(0x17a)](this)},_0x456348,_0xec87ca);}async[a195_0x5c339e(0x19f)](_0x1b7134,_0x78be30){const _0x2de949=a195_0x5c339e;return applyPullResult({'client':this[_0x2de949(0x18c)],'resolveProjectId':this[_0x2de949(0x1aa)][_0x2de949(0x17a)](this)},_0x1b7134,_0x78be30);}async['preparePushProject'](_0x1fa0a1){const _0x30531e=a195_0x5c339e;return preparePushWorkflow({'client':this[_0x30531e(0x18c)],'resolveProjectId':this['resolveProjectId']['bind'](this)},_0x1fa0a1);}async[a195_0x5c339e(0x182)](_0x506e21){const _0x35306b=a195_0x5c339e;return executePushWorkflow({'client':this[_0x35306b(0x18c)],'resolveProjectId':this['resolveProjectId'][_0x35306b(0x17a)](this)},_0x506e21);}async[a195_0x5c339e(0x14a)](_0x2a39f4,_0x263577,_0x3877b0){const _0x5c0b68=a195_0x5c339e;return prepareCloneWorkflow({'client':this[_0x5c0b68(0x18c)]},_0x2a39f4,_0x263577,_0x3877b0);}async[a195_0x5c339e(0x164)](_0x1f66a6){return executeCloneWorkflow({'client':this['client']},_0x1f66a6);}async[a195_0x5c339e(0x152)](){const _0x4a1e8c=a195_0x5c339e;return await this[_0x4a1e8c(0x18c)][_0x4a1e8c(0x152)]();}async['enableSchedule'](_0x126eec,_0x1f142d){return await this['client']['enableSchedule'](_0x126eec,_0x1f142d);}async[a195_0x5c339e(0x140)](_0x453289){const _0x4888a=a195_0x5c339e;return await this[_0x4888a(0x18c)][_0x4888a(0x140)](_0x453289);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x15d5a9,_0x55bce4){const _0x1cbe3f=a196_0x409b,_0x1d188b=_0x15d5a9();while(!![]){try{const _0x51ec5b=-parseInt(_0x1cbe3f(0x172))/0x1*(-parseInt(_0x1cbe3f(0x141))/0x2)+-parseInt(_0x1cbe3f(0x170))/0x3*(-parseInt(_0x1cbe3f(0x14e))/0x4)+-parseInt(_0x1cbe3f(0x15b))/0x5+-parseInt(_0x1cbe3f(0x143))/0x6+parseInt(_0x1cbe3f(0x16a))/0x7+parseInt(_0x1cbe3f(0x159))/0x8+parseInt(_0x1cbe3f(0x151))/0x9*(-parseInt(_0x1cbe3f(0x142))/0xa);if(_0x51ec5b===_0x55bce4)break;else _0x1d188b['push'](_0x1d188b['shift']());}catch(_0x51c7ab){_0x1d188b['push'](_0x1d188b['shift']());}}}(a196_0x222f,0xe2dbf));import{existsSync,promises as a196_0xd4831e}from'fs';function a196_0x409b(_0x5dfb56,_0x2e7840){_0x5dfb56=_0x5dfb56-0x140;const _0x222f14=a196_0x222f();let _0x409b2e=_0x222f14[_0x5dfb56];return _0x409b2e;}import a196_0x437c56 from'path';import a196_0x413e90 from'os';import{generateDiff,formatDiffWithColors,hasChanges}from'../../utils/diff.js';import{getWorkflowProjectDir,createWorkflowTdxConfigContent,updateWorkflowTdxConfig}from'./tdx-config.js';import{SDKError,ErrorCode}from'../errors.js';function a196_0x222f(){const _0x10e948=['latest','\x20bytes)','TAR_BAD_ARCHIVE','add','size','getProject','unlink','12400312njzOco','projectId','1722505uiOZGw','baseDir','path','catch','isDirectory','type','writeFile','WORKFLOW_ARCHIVE_CORRUPTED','length','\x20(archive\x20size:\x20','cwd','projectName','archive.tar.gz','sort','push','1821883vKFuyr','tmpdir','modified','name','includes','toISOString','3YbPMBz','message','41VbhNHd','readFile','localeCompare','The\x20archive\x20may\x20be\x20truncated\x20or\x20corrupted.\x20Try\x20pushing\x20a\x20new\x20revision\x20or\x20contact\x20support.','join','mkdtemp','unchanged','revision','utf-8','readdir','Failed\x20to\x20extract\x20project\x20archive','extracted','tdx.json','60586xQmELk','1429730NUfwKz','5271240kVKCeC','tdx-wf-pull-','filter','new','deleted','has','downloadProjectArchive','tar','targetDir','changes','zlib','2690552HdQnTB','mkdir','The\x20archive\x20passed\x20initial\x20validation\x20but\x20extraction\x20failed.\x20','99ZEzGgz'];a196_0x222f=function(){return _0x10e948;};return a196_0x222f();}export async function pullWorkflow(_0x5c608f,_0x4b675f,_0x58fea6={}){const _0x226327=a196_0x409b,_0x38b89d=await import(_0x226327(0x14a)),{client:_0x24cbd0,resolveProjectId:_0x2dd806}=_0x5c608f,{id:_0xe1332d,name:_0x19d2d4}=await _0x2dd806(_0x4b675f),_0x25ed14=_0x58fea6[_0x226327(0x15c)]||process[_0x226327(0x165)](),_0x220dc0=_0x58fea6['targetDir']||getWorkflowProjectDir(_0x19d2d4,_0x25ed14),_0x75655=a196_0x437c56[_0x226327(0x176)](_0x220dc0,_0x226327(0x140)),_0x164667=!existsSync(_0x75655),_0xebbbaf=await a196_0xd4831e[_0x226327(0x177)](a196_0x437c56[_0x226327(0x176)](a196_0x413e90[_0x226327(0x16b)](),_0x226327(0x144))),_0x8aa575=a196_0x437c56[_0x226327(0x176)](_0xebbbaf,'archive.tar.gz'),_0x4460cf=a196_0x437c56['join'](_0xebbbaf,_0x226327(0x17d));try{await _0x24cbd0[_0x226327(0x149)](_0xe1332d,_0x8aa575,_0x58fea6['revision']),await a196_0xd4831e[_0x226327(0x14f)](_0x4460cf,{'recursive':!![]});try{await _0x38b89d['extract']({'file':_0x8aa575,'cwd':_0x4460cf,'gzip':!![]});}catch(_0x5069a4){const _0x4260ff=_0x5069a4 instanceof Error?_0x5069a4[_0x226327(0x171)]:String(_0x5069a4);if(_0x4260ff[_0x226327(0x16e)](_0x226327(0x154))||_0x4260ff[_0x226327(0x16e)](_0x226327(0x14d))){const _0x4c00f6=await a196_0xd4831e['stat'](_0x8aa575)[_0x226327(0x15e)](()=>null),_0x4933c4=_0x4c00f6?_0x226327(0x164)+_0x4c00f6[_0x226327(0x156)]+_0x226327(0x153):'';throw new SDKError(ErrorCode[_0x226327(0x162)],_0x226327(0x17c)+_0x4933c4+':\x20'+_0x4260ff,_0x5069a4,{'helpText':_0x226327(0x150)+_0x226327(0x175)});}throw _0x5069a4;}const _0x1022f6=await _0x24cbd0[_0x226327(0x157)](_0xe1332d),_0x51621b=_0x58fea6[_0x226327(0x179)]||_0x1022f6[_0x226327(0x179)]||_0x226327(0x152),_0x817879=await calculateChanges(_0x220dc0,_0x4460cf,_0x164667),_0x3e5e3b={'new':_0x817879[_0x226327(0x145)](_0x28df72=>_0x28df72[_0x226327(0x160)]===_0x226327(0x146))[_0x226327(0x163)],'modified':_0x817879[_0x226327(0x145)](_0x517579=>_0x517579[_0x226327(0x160)]===_0x226327(0x16c))[_0x226327(0x163)],'deleted':_0x817879[_0x226327(0x145)](_0x6a0bfe=>_0x6a0bfe[_0x226327(0x160)]===_0x226327(0x147))[_0x226327(0x163)],'unchanged':_0x817879[_0x226327(0x145)](_0x34b9fa=>_0x34b9fa[_0x226327(0x160)]===_0x226327(0x178))[_0x226327(0x163)]};return{'projectName':_0x19d2d4,'projectId':_0xe1332d,'revision':_0x51621b,'targetDir':_0x220dc0,'changes':_0x817879,'summary':_0x3e5e3b,'hasChanges':_0x3e5e3b[_0x226327(0x146)]>0x0||_0x3e5e3b[_0x226327(0x16c)]>0x0||_0x3e5e3b[_0x226327(0x147)]>0x0,'isNewProject':_0x164667};}finally{await a196_0xd4831e['rm'](_0xebbbaf,{'recursive':!![],'force':!![]});}}export async function applyPullResult(_0x2d404c,_0xeb1535,_0x50535e={}){const _0x1b1a27=a196_0x409b,_0x1c279d=await import('tar'),{client:_0xb773f1}=_0x2d404c,_0x340cd5=await a196_0xd4831e[_0x1b1a27(0x177)](a196_0x437c56['join'](a196_0x413e90[_0x1b1a27(0x16b)](),'tdx-wf-apply-')),_0x2d343e=a196_0x437c56[_0x1b1a27(0x176)](_0x340cd5,_0x1b1a27(0x167));try{await _0xb773f1[_0x1b1a27(0x149)](_0xeb1535[_0x1b1a27(0x15a)],_0x2d343e,_0x50535e[_0x1b1a27(0x179)]),await a196_0xd4831e['mkdir'](_0xeb1535[_0x1b1a27(0x14b)],{'recursive':!![]});for(const _0x9cdd28 of _0xeb1535[_0x1b1a27(0x14c)]){if(_0x9cdd28[_0x1b1a27(0x160)]===_0x1b1a27(0x147)){const _0x4011de=a196_0x437c56[_0x1b1a27(0x176)](_0xeb1535[_0x1b1a27(0x14b)],_0x9cdd28['path']);await a196_0xd4831e[_0x1b1a27(0x158)](_0x4011de)[_0x1b1a27(0x15e)](()=>{});}}try{await _0x1c279d['extract']({'file':_0x2d343e,'cwd':_0xeb1535['targetDir'],'gzip':!![]});}catch(_0x3de120){const _0x2fa442=_0x3de120 instanceof Error?_0x3de120[_0x1b1a27(0x171)]:String(_0x3de120);if(_0x2fa442['includes'](_0x1b1a27(0x154))||_0x2fa442[_0x1b1a27(0x16e)](_0x1b1a27(0x14d))){const _0x71c81f=await a196_0xd4831e['stat'](_0x2d343e)[_0x1b1a27(0x15e)](()=>null),_0x578e89=_0x71c81f?_0x1b1a27(0x164)+_0x71c81f[_0x1b1a27(0x156)]+_0x1b1a27(0x153):'';throw new SDKError(ErrorCode[_0x1b1a27(0x162)],_0x1b1a27(0x17c)+_0x578e89+':\x20'+_0x2fa442,_0x3de120,{'helpText':'The\x20archive\x20passed\x20initial\x20validation\x20but\x20extraction\x20failed.\x20'+_0x1b1a27(0x175)});}throw _0x3de120;}const _0x19bc7d=a196_0x437c56[_0x1b1a27(0x176)](_0xeb1535[_0x1b1a27(0x14b)],_0x1b1a27(0x140));if(_0xeb1535['isNewProject']){const _0x4ac509=createWorkflowTdxConfigContent(_0xeb1535[_0x1b1a27(0x166)],_0xeb1535[_0x1b1a27(0x15a)],_0xeb1535[_0x1b1a27(0x179)]);await a196_0xd4831e[_0x1b1a27(0x161)](_0x19bc7d,_0x4ac509,_0x1b1a27(0x17a));}else updateWorkflowTdxConfig(_0x19bc7d,{'last_pulled_revision':_0xeb1535['revision'],'last_pulled_at':new Date()[_0x1b1a27(0x16f)]()});}finally{await a196_0xd4831e['rm'](_0x340cd5,{'recursive':!![],'force':!![]});}}async function calculateChanges(_0x4343a2,_0x54673f,_0x4ac906){const _0x4e6ecf=a196_0x409b,_0x5d43b8=[],_0x480fe0=await getAllFiles(_0x54673f),_0x1d2485=existsSync(_0x4343a2)?await getAllFiles(_0x4343a2):new Set();for(const _0xbbef71 of _0x480fe0){const _0x33a99e=a196_0x437c56[_0x4e6ecf(0x176)](_0x4343a2,_0xbbef71),_0x36240e=a196_0x437c56[_0x4e6ecf(0x176)](_0x54673f,_0xbbef71);if(_0xbbef71===_0x4e6ecf(0x140))continue;const _0x5ec840=await a196_0xd4831e[_0x4e6ecf(0x173)](_0x36240e,_0x4e6ecf(0x17a))['catch'](()=>null);if(_0x5ec840===null)continue;if(!existsSync(_0x33a99e)||_0x4ac906)_0x5d43b8[_0x4e6ecf(0x169)]({'path':_0xbbef71,'type':_0x4e6ecf(0x146),'newContent':_0x5ec840});else{const _0x2c24d9=await a196_0xd4831e['readFile'](_0x33a99e,_0x4e6ecf(0x17a))[_0x4e6ecf(0x15e)](()=>null);if(_0x2c24d9===null)_0x5d43b8['push']({'path':_0xbbef71,'type':_0x4e6ecf(0x16c),'newContent':_0x5ec840});else{if(_0x2c24d9!==_0x5ec840){const _0x5732b7=generateDiff(_0x2c24d9,_0x5ec840),_0x3beffd=hasChanges(_0x5732b7)?formatDiffWithColors(_0x5732b7):undefined;_0x5d43b8[_0x4e6ecf(0x169)]({'path':_0xbbef71,'type':_0x4e6ecf(0x16c),'oldContent':_0x2c24d9,'newContent':_0x5ec840,'diff':_0x3beffd});}else _0x5d43b8[_0x4e6ecf(0x169)]({'path':_0xbbef71,'type':_0x4e6ecf(0x178)});}}}if(!_0x4ac906)for(const _0x53c565 of _0x1d2485){if(_0x53c565==='tdx.json')continue;if(!_0x480fe0[_0x4e6ecf(0x148)](_0x53c565)){const _0xc23c9c=a196_0x437c56[_0x4e6ecf(0x176)](_0x4343a2,_0x53c565),_0x3088f2=await a196_0xd4831e[_0x4e6ecf(0x173)](_0xc23c9c,_0x4e6ecf(0x17a))['catch'](()=>undefined);_0x5d43b8['push']({'path':_0x53c565,'type':_0x4e6ecf(0x147),'oldContent':_0x3088f2});}}return _0x5d43b8[_0x4e6ecf(0x168)]((_0x20228d,_0x2df8b1)=>_0x20228d[_0x4e6ecf(0x15d)][_0x4e6ecf(0x174)](_0x2df8b1[_0x4e6ecf(0x15d)])),_0x5d43b8;}async function getAllFiles(_0x2b454e,_0x1d5b5d=''){const _0x550613=a196_0x409b,_0x1f7e3b=new Set();if(!existsSync(_0x2b454e))return _0x1f7e3b;const _0xc78a2e=await a196_0xd4831e[_0x550613(0x17b)](_0x2b454e,{'withFileTypes':!![]});for(const _0x2bcc84 of _0xc78a2e){const _0x35c2f8=_0x1d5b5d?a196_0x437c56[_0x550613(0x176)](_0x1d5b5d,_0x2bcc84['name']):_0x2bcc84[_0x550613(0x16d)];if(_0x2bcc84[_0x550613(0x15f)]()){const _0x11cff7=await getAllFiles(a196_0x437c56['join'](_0x2b454e,_0x2bcc84[_0x550613(0x16d)]),_0x35c2f8);for(const _0x299d75 of _0x11cff7){_0x1f7e3b[_0x550613(0x155)](_0x299d75);}}else _0x1f7e3b['add'](_0x35c2f8);}return _0x1f7e3b;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a197_0x3ece(){const _0x46fa3a=['has','unchanged','cwd','769368jwVMfE','323486lrCSjW','zlib','toISOString','revision','\x20workflow\x20files\x20found\x20in\x20','localeCompare','push','type','length','sort','posix','74559RTdarV','includes','.digdagignore','filter','\x20(archive\x20size:\x20','stat','replace','archive.tar.gz','mkdir','deleted','uploadProjectArchive','catch','10798248ENJCbg','message','4dvENKH','7oVXSKf','171oWzSXZ','extracted','Failed\x20to\x20extract\x20remote\x20project\x20archive\x20for\x20comparison','sourceDir','create','projectName','readdir','name','isDirectory','size','utf-8','791485iSrXHh','tar','modified','readFile','extract','No\x20','2102560kdiepk','new','tdx-wf-push-','13560850myFuCb','tmpdir','workflow_project','path','skipValidation','configResult','join'];a197_0x3ece=function(){return _0x46fa3a;};return a197_0x3ece();}(function(_0x22238f,_0x3f63c0){const _0xe235cb=a197_0x3d8f,_0x113f2e=_0x22238f();while(!![]){try{const _0x3b8bc7=-parseInt(_0xe235cb(0x121))/0x1*(parseInt(_0xe235cb(0x142))/0x2)+parseInt(_0xe235cb(0x14d))/0x3+-parseInt(_0xe235cb(0x134))/0x4+-parseInt(_0xe235cb(0x12e))/0x5+-parseInt(_0xe235cb(0x11f))/0x6*(-parseInt(_0xe235cb(0x122))/0x7)+parseInt(_0xe235cb(0x141))/0x8*(parseInt(_0xe235cb(0x123))/0x9)+-parseInt(_0xe235cb(0x137))/0xa;if(_0x3b8bc7===_0x3f63c0)break;else _0x113f2e['push'](_0x113f2e['shift']());}catch(_0x16afd9){_0x113f2e['push'](_0x113f2e['shift']());}}}(a197_0x3ece,0xeb8d0));import{promises as a197_0x848fd8}from'fs';import a197_0x3710f3 from'path';import a197_0x403a2e 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';function a197_0x3d8f(_0x180b72,_0x5ba220){_0x180b72=_0x180b72-0x118;const _0x3ece20=a197_0x3ece();let _0x3d8ffb=_0x3ece20[_0x180b72];return _0x3d8ffb;}import{SDKError,ErrorCode}from'../errors.js';export async function preparePushWorkflow(_0x4b6906,_0x3e40e8={}){const _0x486cea=a197_0x3d8f,_0x2506c6=await import(_0x486cea(0x12f)),{client:_0x3205b3,resolveProjectId:_0x320c79}=_0x4b6906,_0x436cf5=_0x3e40e8[_0x486cea(0x126)]||process[_0x486cea(0x140)](),_0x27c742=findWorkflowTdxConfig(_0x436cf5),{config:_0x146d45,configDir:_0x18cafc}=_0x27c742;let _0x7e778f,_0x163f6e=_0x146d45[_0x486cea(0x139)];try{const _0x1c3e63=await _0x320c79(_0x146d45[_0x486cea(0x139)]);_0x7e778f=_0x1c3e63['id'],_0x163f6e=_0x1c3e63['name'];}catch{_0x7e778f='';}const _0x11d966=_0x3e40e8[_0x486cea(0x145)]||new Date()[_0x486cea(0x144)]()[_0x486cea(0x119)](/[:.]/g,'-');if(!_0x3e40e8[_0x486cea(0x13b)]){const _0x29d2d1=await a197_0x848fd8[_0x486cea(0x129)](_0x18cafc),_0x3b70de=_0x29d2d1[_0x486cea(0x150)](_0x7f8b0=>_0x7f8b0['endsWith'](WORKFLOW_FILE_EXTENSION));if(_0x3b70de[_0x486cea(0x14a)]===0x0)throw new Error(_0x486cea(0x133)+WORKFLOW_FILE_EXTENSION+_0x486cea(0x146)+_0x18cafc);}const _0x532157=await getProjectFiles(_0x18cafc);let _0x344990;if(_0x7e778f){const _0x33dce2=await a197_0x848fd8['mkdtemp'](a197_0x3710f3['join'](a197_0x403a2e[_0x486cea(0x138)](),_0x486cea(0x136))),_0xbe199a=a197_0x3710f3[_0x486cea(0x13d)](_0x33dce2,'archive.tar.gz'),_0x20ba1d=a197_0x3710f3[_0x486cea(0x13d)](_0x33dce2,_0x486cea(0x124));try{await _0x3205b3['downloadProjectArchive'](_0x7e778f,_0xbe199a),await a197_0x848fd8[_0x486cea(0x11b)](_0x20ba1d,{'recursive':!![]});try{await _0x2506c6[_0x486cea(0x132)]({'file':_0xbe199a,'cwd':_0x20ba1d,'gzip':!![]});}catch(_0x42d257){const _0x4dfdb7=_0x42d257 instanceof Error?_0x42d257[_0x486cea(0x120)]:String(_0x42d257);if(_0x4dfdb7[_0x486cea(0x14e)]('TAR_BAD_ARCHIVE')||_0x4dfdb7[_0x486cea(0x14e)](_0x486cea(0x143))){const _0x32a02b=await a197_0x848fd8[_0x486cea(0x118)](_0xbe199a)['catch'](()=>null),_0x33c734=_0x32a02b?_0x486cea(0x151)+_0x32a02b[_0x486cea(0x12c)]+'\x20bytes)':'';throw new SDKError(ErrorCode['WORKFLOW_ARCHIVE_CORRUPTED'],_0x486cea(0x125)+_0x33c734+':\x20'+_0x4dfdb7,_0x42d257,{'helpText':'Use\x20\x27tdx\x20wf\x20upload\x27\x20to\x20force\x20push\x20without\x20comparison.'});}throw _0x42d257;}_0x344990=await calculatePushChanges(_0x18cafc,_0x20ba1d,_0x532157);}finally{await a197_0x848fd8['rm'](_0x33dce2,{'recursive':!![],'force':!![]});}}else{_0x344990=[];for(const _0x19171b of _0x532157){const _0x17be83=a197_0x3710f3['join'](_0x18cafc,_0x19171b),_0x27db29=await a197_0x848fd8['readFile'](_0x17be83,_0x486cea(0x12d))['catch'](()=>null);_0x344990[_0x486cea(0x148)]({'path':_0x19171b,'type':_0x486cea(0x135),'newContent':_0x27db29||undefined});}}const _0x48a258={'new':_0x344990['filter'](_0x323f1b=>_0x323f1b[_0x486cea(0x149)]===_0x486cea(0x135))[_0x486cea(0x14a)],'modified':_0x344990['filter'](_0x2b787a=>_0x2b787a['type']===_0x486cea(0x130))[_0x486cea(0x14a)],'deleted':_0x344990[_0x486cea(0x150)](_0x3fd80d=>_0x3fd80d['type']===_0x486cea(0x11c))[_0x486cea(0x14a)],'unchanged':_0x344990[_0x486cea(0x150)](_0x170817=>_0x170817['type']===_0x486cea(0x13f))[_0x486cea(0x14a)]};return{'projectName':_0x163f6e,'projectId':_0x7e778f,'revision':_0x11d966,'sourceDir':_0x18cafc,'changes':_0x344990,'summary':_0x48a258,'hasChanges':_0x48a258[_0x486cea(0x135)]>0x0||_0x48a258[_0x486cea(0x130)]>0x0||_0x48a258['deleted']>0x0,'configResult':_0x27c742};}export async function executePushWorkflow(_0x22fff9,_0xa2a585){const _0x3e139c=a197_0x3d8f,_0x405605=await import('tar'),{client:_0x374eeb}=_0x22fff9,_0x58506d=await getProjectFiles(_0xa2a585['sourceDir']),_0x4d1b8c=await a197_0x848fd8['mkdtemp'](a197_0x3710f3[_0x3e139c(0x13d)](a197_0x403a2e[_0x3e139c(0x138)](),'tdx-wf-push-archive-')),_0x3cbff9=a197_0x3710f3[_0x3e139c(0x13d)](_0x4d1b8c,_0x3e139c(0x11a));try{await _0x405605[_0x3e139c(0x127)]({'file':_0x3cbff9,'gzip':!![],'cwd':_0xa2a585[_0x3e139c(0x126)],'portable':!![]},_0x58506d);const _0x4ebeae=await _0x374eeb[_0x3e139c(0x11d)](_0xa2a585[_0x3e139c(0x128)],_0xa2a585['revision'],_0x3cbff9);return updateWorkflowTdxConfig(_0xa2a585[_0x3e139c(0x13c)]['configPath'],{'workflow_project_id':_0x4ebeae['id'],'last_pushed_revision':_0x4ebeae[_0x3e139c(0x145)],'last_pushed_at':new Date()[_0x3e139c(0x144)]()}),{'projectId':_0x4ebeae['id'],'projectName':_0x4ebeae[_0x3e139c(0x12a)],'revision':_0x4ebeae[_0x3e139c(0x145)]};}finally{await a197_0x848fd8['rm'](_0x4d1b8c,{'recursive':!![],'force':!![]});}}async function getProjectFiles(_0x53d9c2,_0x24c9aa=_0x53d9c2,_0x1f772e='',_0x15854b=null){const _0xb0c27e=a197_0x3d8f,_0x1b3cdd=[];if(_0x15854b===null){_0x15854b=createIgnoreInstance();const _0x4db1ff=await loadDigdagignore(_0x53d9c2);_0x4db1ff&&_0x15854b['add'](_0x4db1ff);}if(_0x1f772e!==''){const _0x32dfcd=await loadDigdagignore(_0x24c9aa);_0x32dfcd&&addScopedPatterns(_0x15854b,_0x32dfcd,_0x1f772e);}const _0x363dc8=await a197_0x848fd8[_0xb0c27e(0x129)](_0x24c9aa,{'withFileTypes':!![]});for(const _0x4f274d of _0x363dc8){const _0x566175=_0x1f772e?a197_0x3710f3[_0xb0c27e(0x14c)]['join'](_0x1f772e,_0x4f274d[_0xb0c27e(0x12a)]):_0x4f274d['name'];if(_0x4f274d[_0xb0c27e(0x12a)]==='tdx.json')continue;if(_0x4f274d['name']===_0xb0c27e(0x14f))continue;if(!shouldIncludeInArchive(_0x4f274d[_0xb0c27e(0x12a)]))continue;if(shouldIgnoreWithInstance(_0x15854b,_0x566175,_0x4f274d[_0xb0c27e(0x12b)]()))continue;if(_0x4f274d[_0xb0c27e(0x12b)]()){const _0x3d6f53=await getProjectFiles(_0x53d9c2,a197_0x3710f3[_0xb0c27e(0x13d)](_0x24c9aa,_0x4f274d['name']),_0x566175,_0x15854b);_0x1b3cdd[_0xb0c27e(0x148)](..._0x3d6f53);}else _0x1b3cdd[_0xb0c27e(0x148)](_0x566175);}return _0x1b3cdd;}async function calculatePushChanges(_0x3e9a63,_0x1936a2,_0x5d44c9){const _0x134161=a197_0x3d8f,_0x1f43cd=[],_0x391c33=new Set(await getProjectFiles(_0x1936a2));for(const _0x2bcbb0 of _0x5d44c9){const _0xe4ceed=a197_0x3710f3[_0x134161(0x13d)](_0x3e9a63,_0x2bcbb0),_0x6bf106=a197_0x3710f3[_0x134161(0x13d)](_0x1936a2,_0x2bcbb0),_0x11a0a=await a197_0x848fd8[_0x134161(0x131)](_0xe4ceed,_0x134161(0x12d))['catch'](()=>null);if(_0x11a0a===null)continue;if(!_0x391c33[_0x134161(0x13e)](_0x2bcbb0))_0x1f43cd['push']({'path':_0x2bcbb0,'type':_0x134161(0x135),'newContent':_0x11a0a});else{const _0x998342=await a197_0x848fd8['readFile'](_0x6bf106,_0x134161(0x12d))[_0x134161(0x11e)](()=>null);if(_0x998342===null)_0x1f43cd[_0x134161(0x148)]({'path':_0x2bcbb0,'type':_0x134161(0x130),'newContent':_0x11a0a});else{if(_0x998342!==_0x11a0a){const _0x502af9=generateDiff(_0x998342,_0x11a0a),_0xb9bae7=hasChanges(_0x502af9)?formatDiffWithColors(_0x502af9):undefined;_0x1f43cd[_0x134161(0x148)]({'path':_0x2bcbb0,'type':_0x134161(0x130),'oldContent':_0x998342,'newContent':_0x11a0a,'diff':_0xb9bae7});}else _0x1f43cd[_0x134161(0x148)]({'path':_0x2bcbb0,'type':_0x134161(0x13f)});}}}for(const _0x325130 of _0x391c33){if(!_0x5d44c9[_0x134161(0x14e)](_0x325130)){const _0x2fde0d=a197_0x3710f3[_0x134161(0x13d)](_0x1936a2,_0x325130),_0x730b64=await a197_0x848fd8['readFile'](_0x2fde0d,_0x134161(0x12d))[_0x134161(0x11e)](()=>undefined);_0x1f43cd[_0x134161(0x148)]({'path':_0x325130,'type':_0x134161(0x11c),'oldContent':_0x730b64});}}return _0x1f43cd[_0x134161(0x14b)]((_0x43d29a,_0x59821a)=>_0x43d29a[_0x134161(0x13a)][_0x134161(0x147)](_0x59821a[_0x134161(0x13a)])),_0x1f43cd;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a198_0x8449(){const _0x4c269e=['name','export','29672lWMnzk','5318907zFPFQJ','push','\x20\x20\x20←\x20','http','join','stringify','data\x20export','data\x20exports','4RnHfdP','object','children','2406833GaKwcm','email\x20sends','680785odtJGM','keys','repeat','10445zuXhqt','1467nXyrVa','flatMap','baseIndent','td_for_each>','13668662onjbeH','email\x20send','slice','1506epBeQp','warningDetail','command','⚠️\x20\x20HTTP\x20call','⚠️\x20\x20This\x20workflow\x20contains\x20','length','1762724UFYqse','operator','warning','max','50vYiVzG','string','HTTP\x20calls',',\x20and\x20','activations','\x20→\x20','isArray','activation'];a198_0x8449=function(){return _0x4c269e;};return a198_0x8449();}const a198_0x194cbe=a198_0x4c60;(function(_0x439169,_0x33c2bd){const _0x556e2f=a198_0x4c60,_0x4d6fe9=_0x439169();while(!![]){try{const _0x22997a=parseInt(_0x556e2f(0xc1))/0x1+-parseInt(_0x556e2f(0xa5))/0x2+parseInt(_0x556e2f(0xb4))/0x3*(-parseInt(_0x556e2f(0xbc))/0x4)+parseInt(_0x556e2f(0xc4))/0x5*(parseInt(_0x556e2f(0x9f))/0x6)+parseInt(_0x556e2f(0x9c))/0x7+-parseInt(_0x556e2f(0xb3))/0x8*(parseInt(_0x556e2f(0xc5))/0x9)+-parseInt(_0x556e2f(0xa9))/0xa*(-parseInt(_0x556e2f(0xbf))/0xb);if(_0x22997a===_0x33c2bd)break;else _0x4d6fe9['push'](_0x4d6fe9['shift']());}catch(_0x4d2a6f){_0x4d6fe9['push'](_0x4d6fe9['shift']());}}}(a198_0x8449,0xf268b));const OPERATOR_WARNINGS={'td_run>':a198_0x194cbe(0xb0),'http>':a198_0x194cbe(0xb7),'http_call>':a198_0x194cbe(0xb7),'mail>':'mail'},WARNING_META={'activation':{'label':'⚠️\x20\x20ACTIVATION','singular':'activation','plural':a198_0x194cbe(0xad)},'http':{'label':a198_0x194cbe(0xa2),'singular':'HTTP\x20call','plural':a198_0x194cbe(0xab)},'mail':{'label':'⚠️\x20\x20Email\x20send','singular':a198_0x194cbe(0x9d),'plural':a198_0x194cbe(0xc0)},'export':{'label':'⚠️\x20\x20DATA\x20EXPORT','singular':a198_0x194cbe(0xba),'plural':a198_0x194cbe(0xbb)}};function emptySummary(){return{'activation':0x0,'http':0x0,'mail':0x0,'export':0x0};}function collectTasks(_0x272b86){const _0x4df024=a198_0x194cbe;if(!_0x272b86||typeof _0x272b86!==_0x4df024(0xbd))return[];if(Array[_0x4df024(0xaf)](_0x272b86))return _0x272b86[_0x4df024(0xc6)](collectTasks);const _0x5b3cac=_0x272b86,_0x2b5d43=[];for(const [_0x28bc28,_0x312466]of Object['entries'](_0x5b3cac)){if(_0x28bc28['endsWith']('>'))continue;_0x28bc28['startsWith']('+')?_0x2b5d43['push'](buildTaskNode(_0x28bc28,_0x312466)):_0x2b5d43['push'](...collectTasks(_0x312466));}return _0x2b5d43;}function pickResultTarget(_0xc86c33){const _0x49cfde=a198_0x194cbe,_0x41c5d5=_0xc86c33['result_connection'];if(typeof _0x41c5d5===_0x49cfde(0xaa)&&_0x41c5d5[_0x49cfde(0xa4)]>0x0)return _0x41c5d5;const _0x2cc634=_0xc86c33['result_url'];if(typeof _0x2cc634===_0x49cfde(0xaa)&&_0x2cc634[_0x49cfde(0xa4)]>0x0)return _0x2cc634;return undefined;}function buildTaskNode(_0x442f9d,_0x2c31a0){const _0x2fc5cf=a198_0x194cbe,_0x254d89={'name':_0x442f9d,'children':[]};if(!_0x2c31a0||typeof _0x2c31a0!=='object')return _0x254d89;const _0x3e7305=_0x2c31a0;for(const [_0x2ea825,_0x3eb1b5]of Object['entries'](_0x3e7305)){if(!_0x2ea825['endsWith']('>'))continue;_0x254d89[_0x2fc5cf(0xa6)]=_0x2ea825,_0x254d89[_0x2fc5cf(0xa1)]=typeof _0x3eb1b5===_0x2fc5cf(0xaa)?_0x3eb1b5:JSON[_0x2fc5cf(0xb9)](_0x3eb1b5),_0x254d89[_0x2fc5cf(0xa7)]=OPERATOR_WARNINGS[_0x2ea825];break;}if(_0x254d89['operator']==='td>'||_0x254d89['operator']===_0x2fc5cf(0x9b)){const _0x212ed6=pickResultTarget(_0x3e7305);_0x212ed6&&(_0x254d89['warning']=_0x2fc5cf(0xb2),_0x254d89[_0x2fc5cf(0xa0)]=_0x212ed6);}return _0x254d89[_0x2fc5cf(0xbe)]=collectTasks(_0x3e7305),_0x254d89;}export function parseTaskGraph(_0x357069){return collectTasks(_0x357069);}export function summarizeTaskGraph(_0x8333c6){const _0x7fce72=emptySummary(),_0x597689=_0x573284=>{const _0x4d704a=a198_0x4c60;for(const _0x345527 of _0x573284){if(_0x345527[_0x4d704a(0xa7)])_0x7fce72[_0x345527['warning']]++;_0x597689(_0x345527[_0x4d704a(0xbe)]);}};return _0x597689(_0x8333c6),_0x7fce72;}const MAX_COMMAND_LENGTH=0x50;function truncate(_0x4f1f1a,_0x3da796){const _0x330388=a198_0x194cbe;if(_0x4f1f1a[_0x330388(0xa4)]<=_0x3da796)return _0x4f1f1a;return _0x4f1f1a[_0x330388(0x9e)](0x0,Math[_0x330388(0xa8)](0x0,_0x3da796-0x1))+'…';}export function formatTaskGraph(_0x961c9c,_0x513064={}){const _0x3f054b=a198_0x194cbe,_0x5667b5=_0x513064[_0x3f054b(0x9a)]??0x1,_0x31d2f9=[],_0x5de704=(_0x473713,_0x4930af)=>{const _0x658a6b=_0x3f054b;for(const _0x1fb33a of _0x473713){const _0x497a37='\x20\x20'[_0x658a6b(0xc3)](_0x5667b5+_0x4930af);_0x31d2f9[_0x658a6b(0xb5)](''+_0x497a37+_0x1fb33a[_0x658a6b(0xb1)]);if(_0x1fb33a[_0x658a6b(0xa6)]){const _0x2b433e='\x20\x20'[_0x658a6b(0xc3)](_0x5667b5+_0x4930af+0x1),_0x2afe45=_0x1fb33a[_0x658a6b(0xa1)]?'\x20'+truncate(_0x1fb33a['command'],MAX_COMMAND_LENGTH):'',_0x22c93e=_0x1fb33a[_0x658a6b(0xa7)]?_0x658a6b(0xb6)+WARNING_META[_0x1fb33a['warning']]['label']+(_0x1fb33a[_0x658a6b(0xa0)]?_0x658a6b(0xae)+_0x1fb33a[_0x658a6b(0xa0)]:''):'';_0x31d2f9[_0x658a6b(0xb5)](''+_0x2b433e+_0x1fb33a['operator']+_0x2afe45+_0x22c93e);}_0x5de704(_0x1fb33a[_0x658a6b(0xbe)],_0x4930af+0x1);}};return _0x5de704(_0x961c9c,0x0),_0x31d2f9;}function a198_0x4c60(_0x3a146f,_0x311206){_0x3a146f=_0x3a146f-0x9a;const _0x844950=a198_0x8449();let _0x4c60f2=_0x844950[_0x3a146f];return _0x4c60f2;}export function formatWarningSummary(_0x3b09c0){const _0x50868c=a198_0x194cbe,_0x5d3728=[];for(const _0x3575b3 of Object[_0x50868c(0xc2)](WARNING_META)){const _0x1672da=_0x3b09c0[_0x3575b3];if(_0x1672da>0x0){const {singular:_0x34a241,plural:_0x43a2ea}=WARNING_META[_0x3575b3];_0x5d3728[_0x50868c(0xb5)](_0x1672da+'\x20'+(_0x1672da===0x1?_0x34a241:_0x43a2ea));}}if(_0x5d3728['length']===0x0)return null;if(_0x5d3728[_0x50868c(0xa4)]===0x1)return'⚠️\x20\x20This\x20workflow\x20contains\x20'+_0x5d3728[0x0]+'.';if(_0x5d3728[_0x50868c(0xa4)]===0x2)return _0x50868c(0xa3)+_0x5d3728[0x0]+'\x20and\x20'+_0x5d3728[0x1]+'.';const _0x4aca2e=_0x5d3728[_0x5d3728[_0x50868c(0xa4)]-0x1];return _0x50868c(0xa3)+_0x5d3728[_0x50868c(0x9e)](0x0,-0x1)[_0x50868c(0xb8)](',\x20')+_0x50868c(0xac)+_0x4aca2e+'.';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a199_0x1f54f7=a199_0x4d48;(function(_0x3164ae,_0x45ca86){const _0x50c1bb=a199_0x4d48,_0x1c4163=_0x3164ae();while(!![]){try{const _0x24b2d0=parseInt(_0x50c1bb(0xb4))/0x1*(-parseInt(_0x50c1bb(0xb5))/0x2)+-parseInt(_0x50c1bb(0xc1))/0x3+parseInt(_0x50c1bb(0xbb))/0x4*(-parseInt(_0x50c1bb(0xca))/0x5)+-parseInt(_0x50c1bb(0xc0))/0x6+parseInt(_0x50c1bb(0xaf))/0x7+-parseInt(_0x50c1bb(0xbe))/0x8+parseInt(_0x50c1bb(0xc2))/0x9*(parseInt(_0x50c1bb(0xb0))/0xa);if(_0x24b2d0===_0x45ca86)break;else _0x1c4163['push'](_0x1c4163['shift']());}catch(_0x19199a){_0x1c4163['push'](_0x1c4163['shift']());}}}(a199_0x3569,0xec89a));import{existsSync,readFileSync,writeFileSync}from'fs';import a199_0x514d5f from'path';const TDX_CONFIG_FILE='tdx.json',WORKFLOWS_DIR=a199_0x1f54f7(0xc5);export function findWorkflowTdxConfigPath(_0x43ce6d=process[a199_0x1f54f7(0xb6)]()){const _0x22fcef=a199_0x1f54f7;let _0x8d6601=a199_0x514d5f[_0x22fcef(0xc9)](_0x43ce6d);const _0x254094=a199_0x514d5f[_0x22fcef(0xb7)](_0x8d6601)[_0x22fcef(0xc7)];while(_0x8d6601!==_0x254094){const _0xd9bacd=a199_0x514d5f[_0x22fcef(0xb1)](_0x8d6601,TDX_CONFIG_FILE);if(existsSync(_0xd9bacd))try{const _0x53bdcb=readFileSync(_0xd9bacd,_0x22fcef(0xbf)),_0x4ea83b=JSON['parse'](_0x53bdcb);if(_0x4ea83b&&typeof _0x4ea83b===_0x22fcef(0xb3)&&_0x22fcef(0xc3)in _0x4ea83b)return _0xd9bacd;}catch{}_0x8d6601=a199_0x514d5f['dirname'](_0x8d6601);}return null;}export function loadWorkflowTdxConfig(_0x3e31c2){const _0xb34860=a199_0x1f54f7,_0x95f7fe=readFileSync(_0x3e31c2,_0xb34860(0xbf));let _0x21dc6d;try{_0x21dc6d=JSON[_0xb34860(0xb7)](_0x95f7fe);}catch{throw new Error(_0xb34860(0xcc)+_0x3e31c2);}if(!_0x21dc6d||typeof _0x21dc6d!==_0xb34860(0xb3))throw new Error(_0xb34860(0xba));const _0x154bb0=_0x21dc6d;if(!_0x154bb0[_0xb34860(0xc3)]||typeof _0x154bb0[_0xb34860(0xc3)]!==_0xb34860(0xc6))throw new Error(_0xb34860(0xcb));return{'workflow_project':_0x154bb0[_0xb34860(0xc3)],'workflow_project_id':typeof _0x154bb0[_0xb34860(0xb8)]===_0xb34860(0xc6)?_0x154bb0['workflow_project_id']:undefined,'last_pulled_revision':typeof _0x154bb0['last_pulled_revision']==='string'?_0x154bb0[_0xb34860(0xc8)]:undefined,'last_pulled_at':typeof _0x154bb0['last_pulled_at']==='string'?_0x154bb0[_0xb34860(0xb2)]:undefined,'last_pushed_revision':typeof _0x154bb0[_0xb34860(0xae)]===_0xb34860(0xc6)?_0x154bb0[_0xb34860(0xae)]:undefined,'last_pushed_at':typeof _0x154bb0['last_pushed_at']===_0xb34860(0xc6)?_0x154bb0[_0xb34860(0xbc)]:undefined};}export function findWorkflowTdxConfig(_0x526caa=process[a199_0x1f54f7(0xb6)]()){const _0x480790=a199_0x1f54f7,_0x553a47=findWorkflowTdxConfigPath(_0x526caa);if(!_0x553a47)throw new Error(_0x480790(0xc4));const _0x3f477c=loadWorkflowTdxConfig(_0x553a47),_0x238e0c=a199_0x514d5f[_0x480790(0xb9)](_0x553a47);return{'config':_0x3f477c,'configPath':_0x553a47,'configDir':_0x238e0c};}export function tryFindWorkflowTdxConfig(_0x5cf911){try{return findWorkflowTdxConfig(_0x5cf911);}catch{return null;}}export function getWorkflowProjectDir(_0x1b6da4,_0x4c9d3b=process[a199_0x1f54f7(0xb6)]()){return a199_0x514d5f['join'](_0x4c9d3b,WORKFLOWS_DIR,_0x1b6da4);}export function getWorkflowTdxConfigPath(_0x36844e,_0x35e1ad=process[a199_0x1f54f7(0xb6)]()){const _0x347afe=a199_0x1f54f7;return a199_0x514d5f[_0x347afe(0xb1)](getWorkflowProjectDir(_0x36844e,_0x35e1ad),TDX_CONFIG_FILE);}export function createWorkflowTdxConfigContent(_0x143292,_0x2f91ae,_0x22a0aa){const _0x20c507=a199_0x1f54f7,_0x50d8a0={'workflow_project':_0x143292,..._0x2f91ae&&{'workflow_project_id':_0x2f91ae},..._0x22a0aa&&{'last_pulled_revision':_0x22a0aa},'last_pulled_at':new Date()[_0x20c507(0xcd)]()};return JSON[_0x20c507(0xbd)](_0x50d8a0,null,0x2)+'\x0a';}function a199_0x4d48(_0x2bcd46,_0x20e1d1){_0x2bcd46=_0x2bcd46-0xae;const _0x35690c=a199_0x3569();let _0x4d4882=_0x35690c[_0x2bcd46];return _0x4d4882;}export function saveWorkflowTdxConfig(_0x5d4824,_0x1980b4){const _0x3e0af0=a199_0x1f54f7,_0x32cb5f=JSON[_0x3e0af0(0xbd)](_0x1980b4,null,0x2)+'\x0a';writeFileSync(_0x5d4824,_0x32cb5f,'utf-8');}export function updateWorkflowTdxConfig(_0x104f7f,_0x4e751d){const _0x242fb8=loadWorkflowTdxConfig(_0x104f7f),_0x4192d0={..._0x242fb8,..._0x4e751d};saveWorkflowTdxConfig(_0x104f7f,_0x4192d0);}function a199_0x3569(){const _0x88ac59=['7064260PpuWcz','603390JOQXSA','join','last_pulled_at','object','498512gxfeMU','2FksMdc','cwd','parse','workflow_project_id','dirname','Invalid\x20tdx.json:\x20expected\x20object','114804SlULWB','last_pushed_at','stringify','14208432CxCCoy','utf-8','7584984lsGgRW','3948102qMuTdd','945ejKMDE','workflow_project','No\x20workflow\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','workflows','string','root','last_pulled_revision','resolve','265hnnEmQ','Invalid\x20tdx.json:\x20missing\x20or\x20invalid\x20\x27workflow_project\x27\x20field','Invalid\x20JSON\x20in\x20','toISOString','last_pushed_revision'];a199_0x3569=function(){return _0x88ac59;};return a199_0x3569();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a200_0x44d8bc=a200_0x3e13;(function(_0x284966,_0x2df6ec){const _0x174bd0=a200_0x3e13,_0x4644e7=_0x284966();while(!![]){try{const _0x2d1d12=parseInt(_0x174bd0(0x1f7))/0x1+-parseInt(_0x174bd0(0x206))/0x2+-parseInt(_0x174bd0(0x205))/0x3+parseInt(_0x174bd0(0x208))/0x4*(parseInt(_0x174bd0(0x1fc))/0x5)+-parseInt(_0x174bd0(0x207))/0x6*(parseInt(_0x174bd0(0x1f4))/0x7)+-parseInt(_0x174bd0(0x1f6))/0x8+parseInt(_0x174bd0(0x203))/0x9;if(_0x2d1d12===_0x2df6ec)break;else _0x4644e7['push'](_0x4644e7['shift']());}catch(_0x5a600c){_0x4644e7['push'](_0x4644e7['shift']());}}}(a200_0x2bda,0x9eda6));import{promises as a200_0x536023}from'fs';import a200_0x1bc2a0 from'path';import a200_0x4812cd from'ignore';export const WORKFLOW_FILE_EXTENSION=a200_0x44d8bc(0x20a);function a200_0x2bda(){const _0x5cbaff=['add','filter','28MgnWyz','Thumbs.db','8338856FbvvwR','1092663tUEYdJ','.digdagignore','split','.DS_Store','map','809650VrRMga','utf-8','length','join','startsWith','endsWith','.digdag','25451010lDRwOH','code','3842202svuabf','1508516UujQxM','1017498hsDKMB','12ZkTQgB','slice','.dig'];a200_0x2bda=function(){return _0x5cbaff;};return a200_0x2bda();}export function shouldIncludeInArchive(_0x45abab){const _0xdcd12e=a200_0x44d8bc;if(_0x45abab===_0xdcd12e(0x202))return!![];if(_0x45abab[_0xdcd12e(0x200)]('.'))return![];if(_0x45abab[_0xdcd12e(0x201)]('~'))return![];if(_0x45abab===_0xdcd12e(0x1f5)||_0x45abab===_0xdcd12e(0x1fa))return![];return!![];}export function parseDigdagignore(_0x5ee478){const _0x579137=a200_0x44d8bc;return _0x5ee478[_0x579137(0x1f9)]('\x0a')[_0x579137(0x1fb)](_0x21949f=>_0x21949f['trim']())[_0x579137(0x1f3)](_0x2d5d6a=>_0x2d5d6a[_0x579137(0x1fe)]>0x0&&!_0x2d5d6a['startsWith']('#'));}function a200_0x3e13(_0xc919cc,_0x508546){_0xc919cc=_0xc919cc-0x1f3;const _0x2bda7f=a200_0x2bda();let _0x3e1308=_0x2bda7f[_0xc919cc];return _0x3e1308;}export async function loadDigdagignore(_0x16743f){const _0x127903=a200_0x44d8bc,_0x49988b=a200_0x1bc2a0[_0x127903(0x1ff)](_0x16743f,_0x127903(0x1f8));try{const _0x53ee2f=await a200_0x536023['readFile'](_0x49988b,_0x127903(0x1fd));return parseDigdagignore(_0x53ee2f);}catch(_0x199c23){if(_0x199c23[_0x127903(0x204)]==='ENOENT')return null;throw _0x199c23;}}export function createIgnoreInstance(_0x5db790){const _0x242b4a=a200_0x44d8bc,_0xddb2b4=a200_0x4812cd();return _0x5db790&&_0x5db790[_0x242b4a(0x1fe)]>0x0&&_0xddb2b4[_0x242b4a(0x20b)](_0x5db790),_0xddb2b4;}export function addScopedPatterns(_0x4a8ed9,_0x5db13b,_0x555489){const _0xfe5a4=a200_0x44d8bc,_0x5e96cf=_0x5db13b[_0xfe5a4(0x1fb)](_0x4990dd=>{const _0x821a27=_0xfe5a4;if(_0x4990dd[_0x821a27(0x200)]('!')){const _0x1a90cd=_0x4990dd[_0x821a27(0x209)](0x1);if(_0x1a90cd['startsWith']('/'))return'!'+_0x555489+_0x1a90cd;return'!'+_0x555489+'/'+_0x1a90cd;}if(_0x4990dd['startsWith']('/'))return''+_0x555489+_0x4990dd;return _0x555489+'/'+_0x4990dd;});return _0x4a8ed9[_0xfe5a4(0x20b)](_0x5e96cf),_0x4a8ed9;}export function shouldIgnoreWithInstance(_0x48d125,_0x346d6e,_0x3e3b58){const _0x21e76a=_0x346d6e['replace'](/\\/g,'/'),_0x45c33b=_0x3e3b58?_0x21e76a+'/':_0x21e76a;return _0x48d125['ignores'](_0x45c33b);}
|