@treasuredata/tdx 2026.6.5 → 2026.7.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.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/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.d.ts.map +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/command.js.map +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.d.ts.map +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/databases.js.map +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-command.js.map +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-move-command.d.ts +7 -0
- package/dist/commands/segment-move-command.d.ts.map +1 -1
- package/dist/commands/segment-move-command.js +1 -1
- package/dist/commands/segment-move-command.js.map +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.d.ts +9 -0
- package/dist/commands/segments.d.ts.map +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/segments.js.map +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.d.ts.map +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/command-output.js.map +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/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.d.ts +1 -0
- package/dist/sdk/client/http-client.d.ts.map +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/http-client.js.map +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/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.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.d.ts +6 -2
- package/dist/sdk/segment/journey-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/journey-yaml.js.map +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/push-workflow.js.map +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.d.ts.map +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js.map +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.d.ts +2 -5
- package/dist/sdk/segment/validate-files.d.ts.map +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/validate-files.js.map +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.d.ts +55 -1
- package/dist/sdk/segment.d.ts.map +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/segment.js.map +1 -1
- package/dist/sdk/types/cdp.d.ts +21 -0
- 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/util/tree-search.d.ts +35 -0
- package/dist/sdk/util/tree-search.d.ts.map +1 -0
- package/dist/sdk/util/tree-search.js +1 -0
- package/dist/sdk/util/tree-search.js.map +1 -0
- 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.d.ts +6 -0
- package/dist/utils/process.d.ts.map +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/process.js.map +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a196_0x1c04d9=a196_0x501f;(function(_0x27bba1,_0x1beea3){const _0xe02133=a196_0x501f,_0x2e8080=_0x27bba1();while(!![]){try{const _0x536ca4=-parseInt(_0xe02133(0x1a6))/0x1*(-parseInt(_0xe02133(0x1a1))/0x2)+-parseInt(_0xe02133(0x1c5))/0x3+-parseInt(_0xe02133(0x1a7))/0x4*(parseInt(_0xe02133(0x185))/0x5)+-parseInt(_0xe02133(0x17b))/0x6*(parseInt(_0xe02133(0x17f))/0x7)+parseInt(_0xe02133(0x1b7))/0x8*(-parseInt(_0xe02133(0x170))/0x9)+-parseInt(_0xe02133(0x1ab))/0xa+parseInt(_0xe02133(0x177))/0xb;if(_0x536ca4===_0x1beea3)break;else _0x2e8080['push'](_0x2e8080['shift']());}catch(_0x19fde7){_0x2e8080['push'](_0x2e8080['shift']());}}}(a196_0x1dfd,0x3e87d));import{WorkflowApiClient}from'../client/workflow-client.js';import{SDKError,ErrorCode}from'../errors.js';import{MAX_PAGINATION_LIMIT}from'../util/paginate.js';async function paginateResults(_0x567f47,_0x2efd10,_0x410a6c=0x64){const _0x5db7b=a196_0x501f,_0x533258=Math['min'](_0x2efd10,MAX_PAGINATION_LIMIT),_0x2615ec=[];let _0x106eb2;while(_0x2615ec[_0x5db7b(0x1cd)]<_0x533258){const _0x96256c=await _0x567f47(_0x410a6c,_0x106eb2),_0x562ce5=_0x96256c[_0x5db7b(0x178)]??_0x96256c[_0x5db7b(0x1cc)][_0x5db7b(0x1cd)];if(_0x562ce5===0x0)break;_0x2615ec[_0x5db7b(0x190)](..._0x96256c[_0x5db7b(0x1cc)]);if(!_0x96256c['lastId']||_0x562ce5<_0x410a6c)break;_0x106eb2=_0x96256c[_0x5db7b(0x1b9)];}return _0x2615ec['slice'](0x0,_0x533258);}function a196_0x501f(_0x39dfaf,_0x2adb09){_0x39dfaf=_0x39dfaf-0x15f;const _0x1dfde3=a196_0x1dfd();let _0x501f6e=_0x1dfde3[_0x39dfaf];return _0x501f6e;}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';function a196_0x1dfd(){const _0x5ca92a=['1009160PWnSVL','limit','indexOf','retryParams','setSecrets','error','lastAttempt','listSchedules','createdAt','direct','tmpdir','name','104JNOufp','params','lastId','min','.\x20Expected\x20\x22project.workflow\x22','getProjectWorkflow','retryAttemptName','project','resumeFrom','.tar.gz','tdx-workflow-push-','downloadProjectArchive','clearSchedule','fromTime','655326vnzaEu','last_id','projects','listSecrets','path','listProjectSchedules','resolveProjectId','data','length','Project\x20directory\x20not\x20found:\x20','sessionId','killAttempt','Failed\x20to\x20download\x20log\x20file:\x20','startAttempt','deleteProject','keys','scheduleFrom','tdx-workflow-','enableSchedule','test','utf-8','listAttempts','cancelRequested','download','fullName','mkdir','join','find','pullProject','executePushProject','sessionUuid','WORKFLOW_PROJECT_NOT_FOUND','attempt','retryAt','isDirectory','finishedAt','workflows','upstreams','rejected','listProjects','revision','toString','Failed\x20to\x20set\x20secret','extract','isGroup','bind','sessions','retrySession','retryAttempt','NUMERIC_ID_PATTERN','tar','delete','arrayBuffer','getWorkflow','toISOString','Kill\x20request\x20accepted','create','parseWorkflowId','index','workflow','fromTask','168615cXVfFW','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format:\x20','state','listLogFiles','map','updatedAt','access','12378564TCJjlF','rawCount','WORKFLOW_SECRET_SET_FAILED','kill','216ecnVob','endsWith','listSessions','gunzip','86429xShrgK','basename','uploadProjectArchive','Invalid\x20workflow\x20format:\x20','config','projectName','10uaeNJt','done','exportParams','isFile','disableSchedule','Project\x20not\x20found:\x20','getAttemptTasks','util','workflowName','substring','status','push','setSecret','latest','run','unlink','sessionTime','No\x20','readdir','getSchedule','startedAt','attempts','logFiles','parentId','Cannot\x20read\x20workflow\x20file:\x20','allSettled','client','skipValidation','202chXCXX','deleteSecret','\x20workflow\x20files\x20found\x20in\x20project\x20directory','applyPullProject','prepareCloneProject','5040gpwDqj','741668mBsraf','getAttempt','includeRetried','INVALID_ARGUMENT'];a196_0x1dfd=function(){return _0x5ca92a;};return a196_0x1dfd();}export class WorkflowSDK{static [a196_0x1c04d9(0x164)]=/^\d+$/;[a196_0x1c04d9(0x19f)];constructor(_0x14ea38){const _0x16cdd7=a196_0x1c04d9;this[_0x16cdd7(0x19f)]=new WorkflowApiClient(_0x14ea38);}async['resolveProjectId'](_0x2ac0cb){const _0x3ebb8d=a196_0x1c04d9;if(WorkflowSDK[_0x3ebb8d(0x164)][_0x3ebb8d(0x1d8)](_0x2ac0cb)){const _0x5018e5=await this['client']['getProject'](_0x2ac0cb);return{'id':_0x5018e5['id'],'name':_0x5018e5['name']};}const _0x5b0ee6=await this[_0x3ebb8d(0x19f)]['listProjects']({'name_pattern':_0x2ac0cb}),_0x3695d1=_0x5b0ee6['data'][_0x3ebb8d(0x1e0)](_0x421ed8=>_0x421ed8[_0x3ebb8d(0x1b6)]===_0x2ac0cb);if(!_0x3695d1)throw new SDKError(ErrorCode[_0x3ebb8d(0x1e4)],_0x3ebb8d(0x18a)+_0x2ac0cb);return{'id':_0x3695d1['id'],'name':_0x3695d1['name']};}async[a196_0x1c04d9(0x1c7)](_0x5da872,_0x5cde6c){const _0x50428b=a196_0x1c04d9,_0x7d2d8c=_0x5cde6c?.[_0x50428b(0x1ac)]||MAX_PAGINATION_LIMIT,_0x478642=await paginateResults((_0x58ae77,_0x5b3d92)=>this['client']['listProjects']({'name_pattern':_0x5da872,'limit':_0x58ae77,'last_id':_0x5b3d92??_0x5cde6c?.[_0x50428b(0x1c6)]}),_0x7d2d8c);return _0x478642[_0x50428b(0x174)](_0x2b55bf=>({..._0x2b55bf,'project_id':_0x2b55bf['id'],'project_name':_0x2b55bf[_0x50428b(0x1b6)]}));}async[a196_0x1c04d9(0x1e9)](_0xcc8130,_0x2403c0){const _0x4f25bd=a196_0x1c04d9,_0x3034da=_0x2403c0?.[_0x4f25bd(0x1ac)]||MAX_PAGINATION_LIMIT,_0x16d3fb=await paginateResults((_0x1e35a1,_0xdf6222)=>this['client']['listWorkflows']({'project_name':_0xcc8130,'limit':_0x1e35a1,'last_id':_0xdf6222??_0x2403c0?.['last_id']}),_0x3034da);return _0x16d3fb[_0x4f25bd(0x174)](_0x355a03=>({'project_id':_0x355a03[_0x4f25bd(0x1be)]?.['id'],'project_name':_0x355a03['project']?.['name'],'workflow_id':_0x355a03['id'],'workflow_name':_0x355a03['name'],'revision':_0x355a03[_0x4f25bd(0x1ed)],'timezone':_0x355a03['timezone'],'config':_0x355a03[_0x4f25bd(0x183)],'id':_0x355a03['id'],'name':_0x355a03[_0x4f25bd(0x1b6)],'project':_0x355a03[_0x4f25bd(0x1be)]}));}async[a196_0x1c04d9(0x161)](_0x2adb65){const _0x38e952=a196_0x1c04d9;let _0x51924b;if(_0x2adb65?.[_0x38e952(0x184)]){let _0x17fe0f,_0x43ac1b=![];while(!_0x43ac1b){const _0x11e5e3=await this[_0x38e952(0x19f)][_0x38e952(0x1ec)]({'limit':0x64,'last_id':_0x17fe0f}),_0x10dfa6=_0x11e5e3[_0x38e952(0x1cc)][_0x38e952(0x1e0)](_0x4401ca=>_0x4401ca[_0x38e952(0x1b6)]===_0x2adb65[_0x38e952(0x184)]);if(_0x10dfa6){_0x51924b=_0x10dfa6['id'],_0x43ac1b=!![];break;}if(!_0x11e5e3[_0x38e952(0x1b9)]||_0x11e5e3['data']['length']===0x0)break;_0x17fe0f=_0x11e5e3[_0x38e952(0x1b9)];}if(!_0x51924b)throw new SDKError(ErrorCode[_0x38e952(0x1e4)],'Project\x20not\x20found:\x20'+_0x2adb65[_0x38e952(0x184)]);}const _0xa5feaf=_0x2adb65?.[_0x38e952(0x1ac)]||0x64,_0x104829=await paginateResults((_0x4e0eae,_0x2a4b98)=>this[_0x38e952(0x19f)][_0x38e952(0x17d)]({'project_id':_0x51924b,'project_name':_0x2adb65?.[_0x38e952(0x184)],'workflow_name':_0x2adb65?.[_0x38e952(0x18d)],'status':_0x2adb65?.[_0x38e952(0x18f)],'from_time':_0x2adb65?.[_0x38e952(0x1c4)],'to_time':_0x2adb65?.['toTime'],'limit':_0x4e0eae,'last_id':_0x2a4b98??_0x2adb65?.[_0x38e952(0x1c6)]}),_0xa5feaf);return _0x104829['map'](_0x40dfbc=>({'project_id':_0x40dfbc[_0x38e952(0x1be)]?.['id'],'project_name':_0x40dfbc[_0x38e952(0x1be)]?.[_0x38e952(0x1b6)],'workflow_id':_0x40dfbc[_0x38e952(0x16e)]?.['id'],'workflow_name':_0x40dfbc[_0x38e952(0x16e)]?.[_0x38e952(0x1b6)],'session_id':_0x40dfbc['id'],'sessionUuid':_0x40dfbc[_0x38e952(0x1e3)],'sessionTime':_0x40dfbc[_0x38e952(0x195)],'lastAttempt':_0x40dfbc[_0x38e952(0x1b1)],'id':_0x40dfbc['id'],'project':_0x40dfbc[_0x38e952(0x1be)],'workflow':_0x40dfbc[_0x38e952(0x16e)]}));}async[a196_0x1c04d9(0x19a)](_0xa002b){const _0x4fa05a=a196_0x1c04d9,_0xb3fc0c=_0xa002b?.['limit']||0x64,_0x9aed95=await paginateResults((_0x120c1f,_0x945f4f)=>this[_0x4fa05a(0x19f)][_0x4fa05a(0x1da)]({'project_name':_0xa002b?.[_0x4fa05a(0x184)],'workflow_name':_0xa002b?.['workflowName'],'include_retried':_0xa002b?.[_0x4fa05a(0x1a9)],'limit':_0x120c1f,'last_id':_0x945f4f??_0xa002b?.['last_id']}),_0xb3fc0c);return _0x9aed95[_0x4fa05a(0x174)](_0x5a9832=>({'project_id':_0x5a9832[_0x4fa05a(0x1be)]?.['id'],'project_name':_0x5a9832['project']?.[_0x4fa05a(0x1b6)],'workflow_id':_0x5a9832['workflow']?.['id'],'workflow_name':_0x5a9832['workflow']?.[_0x4fa05a(0x1b6)],'session_id':_0x5a9832[_0x4fa05a(0x1cf)],'sessionUuid':_0x5a9832[_0x4fa05a(0x1e3)],'sessionTime':_0x5a9832[_0x4fa05a(0x195)],'attempt_id':_0x5a9832['id'],'attempt_index':_0x5a9832[_0x4fa05a(0x16d)],'retryAttemptName':_0x5a9832[_0x4fa05a(0x1bd)],'done':_0x5a9832[_0x4fa05a(0x186)],'success':_0x5a9832['success'],'cancelRequested':_0x5a9832[_0x4fa05a(0x1db)],'params':_0x5a9832[_0x4fa05a(0x1b8)],'createdAt':_0x5a9832[_0x4fa05a(0x1b3)],'finishedAt':_0x5a9832[_0x4fa05a(0x1e8)],'id':_0x5a9832['id'],'index':_0x5a9832[_0x4fa05a(0x16d)],'project':_0x5a9832[_0x4fa05a(0x1be)],'workflow':_0x5a9832[_0x4fa05a(0x16e)]}));}async[a196_0x1c04d9(0x1e5)](_0x5a9b4e){const _0x2efca5=a196_0x1c04d9,_0x20d9b1=await this[_0x2efca5(0x19f)][_0x2efca5(0x1a8)](_0x5a9b4e);return _0x20d9b1;}async['tasks'](_0x1411c7,_0x26e825=![]){const _0x518e30=a196_0x1c04d9,_0x17bdf8=await this[_0x518e30(0x19f)][_0x518e30(0x18b)](_0x1411c7,_0x26e825);return _0x17bdf8[_0x518e30(0x174)](_0x2b0507=>({'task_id':_0x2b0507['id'],'task_name':_0x2b0507[_0x518e30(0x1dd)],'parentId':_0x2b0507[_0x518e30(0x19c)],'config':_0x2b0507[_0x518e30(0x183)],'upstreams':_0x2b0507[_0x518e30(0x1ea)],'state':_0x2b0507[_0x518e30(0x172)],'exportParams':_0x2b0507[_0x518e30(0x187)],'storeParams':_0x2b0507['storeParams'],'stateParams':_0x2b0507['stateParams'],'updatedAt':_0x2b0507[_0x518e30(0x175)],'retryAt':_0x2b0507[_0x518e30(0x1e6)],'startedAt':_0x2b0507[_0x518e30(0x199)],'error':_0x2b0507[_0x518e30(0x1b0)],'isGroup':_0x2b0507[_0x518e30(0x15f)],'id':_0x2b0507['id'],'fullName':_0x2b0507[_0x518e30(0x1dd)]}));}async[a196_0x1c04d9(0x19b)](_0x79ec63,_0x2ec2bd){const _0x194a32=a196_0x1c04d9;return await this['client'][_0x194a32(0x173)](_0x79ec63,_0x2ec2bd);}async['logs'](_0x266617,_0x42ce53){const _0x2738f5=a196_0x1c04d9,_0x7a0861=await import('zlib'),{promisify:_0x2abf69}=await import(_0x2738f5(0x18c)),_0x32322e=_0x2abf69(_0x7a0861[_0x2738f5(0x17e)]),_0x402c39=await this[_0x2738f5(0x19f)]['listLogFiles'](_0x266617,_0x42ce53);if(_0x402c39[_0x2738f5(0x1cd)]===0x0)return'';const _0x33d715=[];for(const _0x5e98f0 of _0x402c39){if(!_0x5e98f0[_0x2738f5(0x1b4)])continue;const _0x4eccf3=await fetch(_0x5e98f0['direct']);if(!_0x4eccf3['ok'])throw new Error(_0x2738f5(0x1d1)+_0x4eccf3['status']);const _0x11a2ee=Buffer['from'](await _0x4eccf3[_0x2738f5(0x167)]()),_0x3a7682=await _0x32322e(_0x11a2ee);_0x33d715[_0x2738f5(0x190)](_0x3a7682[_0x2738f5(0x1ee)](_0x2738f5(0x1d9)));}return _0x33d715[_0x2738f5(0x1df)]('\x0a');}async[a196_0x1c04d9(0x17a)](_0x239ad8,_0x5ef12d){const _0xb02742=a196_0x1c04d9,_0x1ace05=await this['client'][_0xb02742(0x1d0)](_0x239ad8,_0x5ef12d);return _0x1ace05?.['message']??_0xb02742(0x16a);}async[a196_0x1c04d9(0x162)](_0x541411,_0x4aff66){const _0x17a308=a196_0x1c04d9,_0xd97f90=await this[_0x17a308(0x19f)][_0x17a308(0x162)](_0x541411,{'from_task':_0x4aff66?.[_0x17a308(0x16f)],'retry_params':_0x4aff66?.[_0x17a308(0x1ae)]});return{'attemptId':_0xd97f90['id'],'sessionId':_0xd97f90[_0x17a308(0x1cf)]};}async[a196_0x1c04d9(0x163)](_0xcf209f,_0x4791ee){const _0x52814b=a196_0x1c04d9,_0x452bde=await this[_0x52814b(0x19f)][_0x52814b(0x163)](_0xcf209f,{'resume_from':_0x4791ee?.[_0x52814b(0x1bf)],'retry_params':_0x4791ee?.[_0x52814b(0x1ae)],'force':_0x4791ee?.['force']});return{'attemptId':_0x452bde['id'],'sessionId':_0x452bde[_0x52814b(0x1cf)]};}[a196_0x1c04d9(0x16c)](_0x179aea){const _0x5c3577=a196_0x1c04d9,_0x48a726=_0x179aea[_0x5c3577(0x1ad)]('.');if(_0x48a726===-0x1)throw new SDKError(ErrorCode[_0x5c3577(0x1aa)],_0x5c3577(0x171)+_0x179aea);const _0x312f17=_0x179aea[_0x5c3577(0x18e)](0x0,_0x48a726),_0x558f13=_0x179aea[_0x5c3577(0x18e)](_0x48a726+0x1);if(!_0x312f17||!_0x558f13)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x5c3577(0x182)+_0x179aea+_0x5c3577(0x1bb));return{'projectName':_0x312f17,'workflowName':_0x558f13};}async[a196_0x1c04d9(0x193)](_0x3eb9fc,_0x4c4740={},_0xb4582){const _0x551855=a196_0x1c04d9,{projectName:_0xb758b7,workflowName:_0x49c3b0}=this['parseWorkflowId'](_0x3eb9fc),_0x14c781=_0xb4582?.['sessionTime']||new Date()[_0x551855(0x169)]();return await this[_0x551855(0x19f)][_0x551855(0x1d2)]({'projectName':_0xb758b7,'workflowName':_0x49c3b0,'sessionTime':_0x14c781,'params':_0x4c4740});}async[a196_0x1c04d9(0x168)](_0x5590b4){const _0x14bd33=a196_0x1c04d9,{projectName:_0x3071e0,workflowName:_0x12f577}=this[_0x14bd33(0x16c)](_0x5590b4),{id:_0xf2eb4c}=await this['resolveProjectId'](_0x3071e0);return await this[_0x14bd33(0x19f)][_0x14bd33(0x1bc)](_0xf2eb4c,_0x12f577);}async[a196_0x1c04d9(0x1dc)](_0x41fa1f,_0x2600c1,_0x592593){const _0x4d833b=a196_0x1c04d9,{promises:_0x307ff5}=await import('fs'),_0x182142=await import(_0x4d833b(0x1c9)),_0x13d34b=await import('os'),_0x3f1b3e=await import(_0x4d833b(0x165)),{id:_0x1ec65b,name:_0x344df6}=await this[_0x4d833b(0x1cb)](_0x41fa1f),_0x5ac9f4=_0x13d34b[_0x4d833b(0x1b5)](),_0x2b0729=_0x182142[_0x4d833b(0x1df)](_0x5ac9f4,_0x4d833b(0x1d6)+_0x1ec65b+'-'+Date['now']()+'.tar.gz');try{await this['client'][_0x4d833b(0x1c2)](_0x1ec65b,_0x2b0729,_0x592593?.[_0x4d833b(0x1ed)]);const _0x22c4ce=_0x182142[_0x4d833b(0x1df)](_0x2600c1,_0x344df6);await _0x307ff5[_0x4d833b(0x1de)](_0x22c4ce,{'recursive':!![]}),await _0x3f1b3e[_0x4d833b(0x1f0)]({'file':_0x2b0729,'cwd':_0x22c4ce,'gzip':!![]});const _0x3ed623=async _0x2722e9=>{const _0x3317a8=_0x4d833b;let _0x104b9f=0x0;const _0x1e152f=await _0x307ff5[_0x3317a8(0x197)](_0x2722e9,{'withFileTypes':!![]});for(const _0x1c46b0 of _0x1e152f){const _0x1726a0=_0x182142[_0x3317a8(0x1df)](_0x2722e9,_0x1c46b0[_0x3317a8(0x1b6)]);if(_0x1c46b0[_0x3317a8(0x188)]())_0x104b9f++;else _0x1c46b0[_0x3317a8(0x1e7)]()&&(_0x104b9f+=await _0x3ed623(_0x1726a0));}return _0x104b9f;},_0x5f57ea=await _0x3ed623(_0x22c4ce);return{'projectName':_0x344df6,'revision':_0x592593?.[_0x4d833b(0x1ed)]||_0x4d833b(0x192),'filesExtracted':_0x5f57ea};}finally{try{await _0x307ff5[_0x4d833b(0x194)](_0x2b0729);}catch{}}}async[a196_0x1c04d9(0x190)](_0x1bfba4,_0x3c9380){const _0x2976fd=a196_0x1c04d9,{promises:_0x404cd8}=await import('fs'),_0x115b73=await import(_0x2976fd(0x1c9)),_0x3388ca=await import(_0x2976fd(0x165)),_0x48305d=_0x3c9380?.[_0x2976fd(0x184)]||_0x115b73[_0x2976fd(0x180)](_0x1bfba4),_0x41a120=_0x3c9380?.[_0x2976fd(0x1ed)]||new Date()['toISOString']()['replace'](/[:.]/g,'-');try{await _0x404cd8[_0x2976fd(0x176)](_0x1bfba4);}catch{throw new Error(_0x2976fd(0x1ce)+_0x1bfba4);}if(!_0x3c9380?.[_0x2976fd(0x1a0)]){const _0x181571=await _0x404cd8[_0x2976fd(0x197)](_0x1bfba4),_0x56f3f4=_0x181571['filter'](_0x4c65d7=>_0x4c65d7[_0x2976fd(0x17c)](WORKFLOW_FILE_EXTENSION));if(_0x56f3f4[_0x2976fd(0x1cd)]===0x0)throw new Error(_0x2976fd(0x196)+WORKFLOW_FILE_EXTENSION+_0x2976fd(0x1a3));for(const _0x1e32c4 of _0x56f3f4){const _0x31da8e=_0x115b73[_0x2976fd(0x1df)](_0x1bfba4,_0x1e32c4);try{await _0x404cd8[_0x2976fd(0x176)](_0x31da8e);}catch{throw new Error(_0x2976fd(0x19d)+_0x1e32c4);}}}const _0x14c5f4=async(_0x237684,_0xeeeec='')=>{const _0x2d6c0c=_0x2976fd,_0x3290d8=await _0x404cd8[_0x2d6c0c(0x197)](_0x237684,{'withFileTypes':!![]}),_0x2c3f93=[];for(const _0x4ad3c7 of _0x3290d8){const _0x2b38df=_0x115b73[_0x2d6c0c(0x1df)](_0xeeeec,_0x4ad3c7[_0x2d6c0c(0x1b6)]),_0xc2f747=_0x115b73[_0x2d6c0c(0x1df)](_0x237684,_0x4ad3c7[_0x2d6c0c(0x1b6)]);if(!shouldIncludeInArchive(_0x4ad3c7[_0x2d6c0c(0x1b6)]))continue;_0x4ad3c7[_0x2d6c0c(0x1e7)]()?_0x2c3f93['push'](...await _0x14c5f4(_0xc2f747,_0x2b38df)):_0x2c3f93[_0x2d6c0c(0x190)](_0x2b38df);}return _0x2c3f93;},_0x2e1045=await _0x14c5f4(_0x1bfba4),_0x13f558=await import('os'),_0xb4f9c1=_0x13f558['tmpdir'](),_0x39b48b=_0x115b73[_0x2976fd(0x1df)](_0xb4f9c1,_0x2976fd(0x1c1)+Date['now']()+_0x2976fd(0x1c0));try{await _0x3388ca[_0x2976fd(0x16b)]({'file':_0x39b48b,'gzip':!![],'cwd':_0x1bfba4,'portable':!![]},_0x2e1045);const _0x33a62f=await this['client'][_0x2976fd(0x181)](_0x48305d,_0x41a120,_0x39b48b,{'scheduleFrom':_0x3c9380?.[_0x2976fd(0x1d5)],'clearSchedule':_0x3c9380?.[_0x2976fd(0x1c3)],'clearScheduleAll':_0x3c9380?.['clearScheduleAll']});return{'projectId':_0x33a62f['id'],'projectName':_0x33a62f[_0x2976fd(0x1b6)],'revision':_0x33a62f[_0x2976fd(0x1ed)]};}finally{try{await _0x404cd8[_0x2976fd(0x194)](_0x39b48b);}catch{}}}async[a196_0x1c04d9(0x166)](_0x59c8a8){const _0x29bc16=a196_0x1c04d9,{id:_0x5ad0dd}=await this[_0x29bc16(0x1cb)](_0x59c8a8),_0x1d346f=await this[_0x29bc16(0x19f)][_0x29bc16(0x1d3)](_0x5ad0dd);return{'projectId':_0x1d346f['id'],'projectName':_0x1d346f[_0x29bc16(0x1b6)]};}async[a196_0x1c04d9(0x1c8)](_0x1ec80b){const _0x35ae25=a196_0x1c04d9,{id:_0x36d922,name:_0x29a164}=await this[_0x35ae25(0x1cb)](_0x1ec80b),_0x1bcc5e=await this['client'][_0x35ae25(0x1c8)](_0x36d922);return{'projectName':_0x29a164,'secrets':_0x1bcc5e};}async[a196_0x1c04d9(0x191)](_0x12c833,_0x561345,_0x1269dc){const _0x12e23c=a196_0x1c04d9,{id:_0x24e865,name:_0x672e4c}=await this[_0x12e23c(0x1cb)](_0x12c833);return await this[_0x12e23c(0x19f)]['setSecret'](_0x24e865,_0x561345,_0x1269dc),{'projectName':_0x672e4c,'key':_0x561345};}async[a196_0x1c04d9(0x1af)](_0x1e3166,_0xd40436){const _0x5d7d68=a196_0x1c04d9,{id:_0x5a937e,name:_0x2659da}=await this[_0x5d7d68(0x1cb)](_0x1e3166),_0x30d106=Object[_0x5d7d68(0x1d4)](_0xd40436),_0x196616=await Promise[_0x5d7d68(0x19e)](_0x30d106[_0x5d7d68(0x174)](_0x1edaa2=>this[_0x5d7d68(0x19f)][_0x5d7d68(0x191)](_0x5a937e,_0x1edaa2,_0xd40436[_0x1edaa2]))),_0x5cfb29=_0x196616[_0x5d7d68(0x174)]((_0x509132,_0x3cd22b)=>_0x509132[_0x5d7d68(0x18f)]===_0x5d7d68(0x1eb)?_0x30d106[_0x3cd22b]:null)['filter'](_0x11c46c=>_0x11c46c!==null);if(_0x5cfb29['length']>0x0)throw new SDKError(ErrorCode[_0x5d7d68(0x179)],_0x5d7d68(0x1ef)+(_0x5cfb29['length']>0x1?'s':'')+':\x20'+_0x5cfb29[_0x5d7d68(0x1df)](',\x20'));return{'projectName':_0x2659da,'keys':_0x30d106};}async[a196_0x1c04d9(0x1a2)](_0x155fe9,_0x26404b){const _0x4b3d91=a196_0x1c04d9,{id:_0x2e94bf,name:_0x6e2bc7}=await this[_0x4b3d91(0x1cb)](_0x155fe9);return await this['client'][_0x4b3d91(0x1a2)](_0x2e94bf,_0x26404b),{'projectName':_0x6e2bc7,'key':_0x26404b};}async[a196_0x1c04d9(0x1e1)](_0x1ed8bf,_0x7e3671){const _0x2b3571=a196_0x1c04d9;return pullWorkflow({'client':this['client'],'resolveProjectId':this['resolveProjectId'][_0x2b3571(0x160)](this)},_0x1ed8bf,_0x7e3671);}async[a196_0x1c04d9(0x1a4)](_0x31eedf,_0x4c8e02){const _0x417062=a196_0x1c04d9;return applyPullResult({'client':this['client'],'resolveProjectId':this[_0x417062(0x1cb)][_0x417062(0x160)](this)},_0x31eedf,_0x4c8e02);}async['preparePushProject'](_0x2f286e){const _0x458a3c=a196_0x1c04d9;return preparePushWorkflow({'client':this[_0x458a3c(0x19f)],'resolveProjectId':this[_0x458a3c(0x1cb)][_0x458a3c(0x160)](this)},_0x2f286e);}async[a196_0x1c04d9(0x1e2)](_0x42f471){const _0x15d582=a196_0x1c04d9;return executePushWorkflow({'client':this[_0x15d582(0x19f)],'resolveProjectId':this[_0x15d582(0x1cb)][_0x15d582(0x160)](this)},_0x42f471);}async[a196_0x1c04d9(0x1a5)](_0x19cad9,_0x219c56,_0x258515){const _0x37acd9=a196_0x1c04d9;return prepareCloneWorkflow({'client':this[_0x37acd9(0x19f)]},_0x19cad9,_0x219c56,_0x258515);}async['executeCloneProject'](_0x22294a){const _0x1b6858=a196_0x1c04d9;return executeCloneWorkflow({'client':this[_0x1b6858(0x19f)]},_0x22294a);}async[a196_0x1c04d9(0x1b2)](_0x55aca4){const _0x19830c=a196_0x1c04d9,_0x4f98e5=Math['min'](Number(_0x55aca4?.[_0x19830c(0x1ac)])||MAX_PAGINATION_LIMIT,MAX_PAGINATION_LIMIT);return await this[_0x19830c(0x19f)][_0x19830c(0x1b2)]({'limit':_0x4f98e5});}async[a196_0x1c04d9(0x1ca)](_0x4b5045,_0x5b2820){const _0x5a24cc=a196_0x1c04d9,{id:_0x149c87}=await this[_0x5a24cc(0x1cb)](_0x4b5045),_0xc87ef0=Math[_0x5a24cc(0x1ba)](Number(_0x5b2820?.[_0x5a24cc(0x1ac)])||MAX_PAGINATION_LIMIT,MAX_PAGINATION_LIMIT);return await this[_0x5a24cc(0x19f)]['listProjectSchedules'](_0x149c87,{'workflow':_0x5b2820?.[_0x5a24cc(0x16e)],'limit':_0xc87ef0});}async[a196_0x1c04d9(0x198)](_0x9f3174){const _0xdd4260=a196_0x1c04d9;return await this[_0xdd4260(0x19f)][_0xdd4260(0x198)](_0x9f3174);}async[a196_0x1c04d9(0x1d7)](_0x33b4b9,_0x377ce2){const _0x1d01da=a196_0x1c04d9;return await this[_0x1d01da(0x19f)]['enableSchedule'](_0x33b4b9,_0x377ce2);}async[a196_0x1c04d9(0x189)](_0x24fc43){const _0x39209f=a196_0x1c04d9;return await this[_0x39209f(0x19f)][_0x39209f(0x189)](_0x24fc43);}}
|
|
1
|
+
const a197_0x18e98c=a197_0x1698;(function(_0x2794ac,_0x51c77d){const _0x31f7cc=a197_0x1698,_0x2857cd=_0x2794ac();while(!![]){try{const _0xe250a2=parseInt(_0x31f7cc(0x1ad))/0x1*(parseInt(_0x31f7cc(0x182))/0x2)+-parseInt(_0x31f7cc(0x1a5))/0x3+parseInt(_0x31f7cc(0x177))/0x4+-parseInt(_0x31f7cc(0x18c))/0x5+parseInt(_0x31f7cc(0x1d7))/0x6+-parseInt(_0x31f7cc(0x1cc))/0x7*(-parseInt(_0x31f7cc(0x17f))/0x8)+parseInt(_0x31f7cc(0x1d0))/0x9*(-parseInt(_0x31f7cc(0x1ca))/0xa);if(_0xe250a2===_0x51c77d)break;else _0x2857cd['push'](_0x2857cd['shift']());}catch(_0x1cd5b0){_0x2857cd['push'](_0x2857cd['shift']());}}}(a197_0x27e3,0xca185));import{WorkflowApiClient}from'../client/workflow-client.js';import{SDKError,ErrorCode}from'../errors.js';import{MAX_PAGINATION_LIMIT}from'../util/paginate.js';async function paginateResults(_0x1b1cc4,_0xd61fa0,_0x2b5e34=0x64){const _0x2a4bd1=a197_0x1698,_0x48c732=Math[_0x2a4bd1(0x19d)](_0xd61fa0,MAX_PAGINATION_LIMIT),_0x15d58f=[];let _0x1c1343;while(_0x15d58f[_0x2a4bd1(0x191)]<_0x48c732){const _0x31e594=await _0x1b1cc4(_0x2b5e34,_0x1c1343),_0x184558=_0x31e594[_0x2a4bd1(0x1c8)]??_0x31e594[_0x2a4bd1(0x1e2)]['length'];if(_0x184558===0x0)break;_0x15d58f[_0x2a4bd1(0x1ab)](..._0x31e594['data']);if(!_0x31e594[_0x2a4bd1(0x198)]||_0x184558<_0x2b5e34)break;_0x1c1343=_0x31e594['lastId'];}return _0x15d58f[_0x2a4bd1(0x1bc)](0x0,_0x48c732);}import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION}from'./workflow-utils.js';function a197_0x27e3(){const _0x159c44=['listLogFiles','.\x20Expected\x20\x22project.workflow\x22','uploadProjectArchive','data','success','getAttemptTasks','now','Project\x20not\x20found:\x20','Kill\x20request\x20accepted','timezone','Project\x20directory\x20not\x20found:\x20','isFile','stateParams','retryAttemptName','tdx-workflow-','limit','includeRetried','force','prepareCloneProject','INVALID_ARGUMENT','getAttempt','cancelRequested','resolveProjectId','WORKFLOW_PROJECT_NOT_FOUND','workflowName','zlib','params','map','path','listSecrets','listProjects','retrySession','message','tar','client','applyPullProject','skipValidation','downloadProjectArchive','preparePushProject','scheduleFrom','738236ThnRfq','error','Cannot\x20read\x20workflow\x20file:\x20','workflow','sessions','attempts','listSchedules','toTime','685664FrIGNg','status','killAttempt','44414nIZokR','sessionId','getWorkflow','revision','index','done','disableSchedule','.tar.gz','tmpdir','retryAt','2715785FfFXkM','basename','NUMERIC_ID_PATTERN','fromTime','util','length','test','last_id','from','find','Invalid\x20workflow\x20format:\x20','name','lastId','project','join','state','kill','min','exportParams','delete','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format:\x20','retryAttempt','workflows','indexOf','bind','3493875KwrZMm','access','deleteSecret','tasks','getSchedule','listProjectSchedules','push','enableSchedule','61sJXokc','parseWorkflowId','executePushProject','createdAt','setSecrets','utf-8','storeParams','listWorkflows','fromTask','logFiles','resumeFrom','readdir','run','fullName','arrayBuffer','slice','Failed\x20to\x20download\x20log\x20file:\x20','sessionUuid','clearScheduleAll','startAttempt','getProject','config','allSettled','retryParams','sessionTime','Failed\x20to\x20set\x20secret','\x20workflow\x20files\x20found\x20in\x20project\x20directory','rawCount','gunzip','110pwOjNr','setSecret','63UTmxdU','parentId','No\x20','toISOString','855648LOzKEC','isDirectory','extract','substring','unlink','attempt','finishedAt','7624782qRpMJG','filter','lastAttempt','replace','tdx-workflow-push-','toString','keys','projectName'];a197_0x27e3=function(){return _0x159c44;};return a197_0x27e3();}import{pullWorkflow,applyPullResult}from'./pull-workflow.js';import{preparePushWorkflow,executePushWorkflow}from'./push-workflow.js';import{prepareCloneWorkflow,executeCloneWorkflow}from'./clone-workflow.js';function a197_0x1698(_0x2bf12c,_0x4614b0){_0x2bf12c=_0x2bf12c-0x159;const _0x27e306=a197_0x27e3();let _0x1698c3=_0x27e306[_0x2bf12c];return _0x1698c3;}export class WorkflowSDK{static ['NUMERIC_ID_PATTERN']=/^\d+$/;[a197_0x18e98c(0x171)];constructor(_0x2ed0da){this['client']=new WorkflowApiClient(_0x2ed0da);}async[a197_0x18e98c(0x165)](_0x1b9de3){const _0x1592dc=a197_0x18e98c;if(WorkflowSDK[_0x1592dc(0x18e)][_0x1592dc(0x192)](_0x1b9de3)){const _0x4aa68f=await this['client'][_0x1592dc(0x1c1)](_0x1b9de3);return{'id':_0x4aa68f['id'],'name':_0x4aa68f['name']};}const _0xdbdaf5=await this[_0x1592dc(0x171)]['listProjects']({'name_pattern':_0x1b9de3}),_0x116e47=_0xdbdaf5[_0x1592dc(0x1e2)]['find'](_0x2a643a=>_0x2a643a['name']===_0x1b9de3);if(!_0x116e47)throw new SDKError(ErrorCode[_0x1592dc(0x166)],_0x1592dc(0x1e6)+_0x1b9de3);return{'id':_0x116e47['id'],'name':_0x116e47[_0x1592dc(0x197)]};}async['projects'](_0x48ef7b,_0x1dd2bc){const _0x39503c=a197_0x18e98c,_0x395d53=_0x1dd2bc?.[_0x39503c(0x15e)]||MAX_PAGINATION_LIMIT,_0x3ed605=await paginateResults((_0x56791e,_0x4863ce)=>this[_0x39503c(0x171)][_0x39503c(0x16d)]({'name_pattern':_0x48ef7b,'limit':_0x56791e,'last_id':_0x4863ce??_0x1dd2bc?.['last_id']}),_0x395d53);return _0x3ed605['map'](_0x31cf90=>({..._0x31cf90,'project_id':_0x31cf90['id'],'project_name':_0x31cf90['name']}));}async[a197_0x18e98c(0x1a2)](_0x4fd2dd,_0x192983){const _0x2737d4=a197_0x18e98c,_0x12291d=_0x192983?.[_0x2737d4(0x15e)]||MAX_PAGINATION_LIMIT,_0x41c357=await paginateResults((_0x49cae2,_0xe70ce3)=>this[_0x2737d4(0x171)][_0x2737d4(0x1b4)]({'project_name':_0x4fd2dd,'limit':_0x49cae2,'last_id':_0xe70ce3??_0x192983?.['last_id']}),_0x12291d);return _0x41c357[_0x2737d4(0x16a)](_0x936bf2=>({'project_id':_0x936bf2['project']?.['id'],'project_name':_0x936bf2[_0x2737d4(0x199)]?.[_0x2737d4(0x197)],'workflow_id':_0x936bf2['id'],'workflow_name':_0x936bf2[_0x2737d4(0x197)],'revision':_0x936bf2[_0x2737d4(0x185)],'timezone':_0x936bf2[_0x2737d4(0x1e8)],'config':_0x936bf2['config'],'id':_0x936bf2['id'],'name':_0x936bf2[_0x2737d4(0x197)],'project':_0x936bf2[_0x2737d4(0x199)]}));}async[a197_0x18e98c(0x17b)](_0x178126){const _0x19aebc=a197_0x18e98c;let _0x139b81;if(_0x178126?.['projectName']){let _0x3378a0,_0xe3bed7=![];while(!_0xe3bed7){const _0x24205e=await this[_0x19aebc(0x171)][_0x19aebc(0x16d)]({'limit':0x64,'last_id':_0x3378a0}),_0x4f5263=_0x24205e[_0x19aebc(0x1e2)][_0x19aebc(0x195)](_0x590e00=>_0x590e00['name']===_0x178126['projectName']);if(_0x4f5263){_0x139b81=_0x4f5263['id'],_0xe3bed7=!![];break;}if(!_0x24205e[_0x19aebc(0x198)]||_0x24205e[_0x19aebc(0x1e2)][_0x19aebc(0x191)]===0x0)break;_0x3378a0=_0x24205e[_0x19aebc(0x198)];}if(!_0x139b81)throw new SDKError(ErrorCode[_0x19aebc(0x166)],_0x19aebc(0x1e6)+_0x178126['projectName']);}const _0x564583=_0x178126?.[_0x19aebc(0x15e)]||0x64,_0x48660e=await paginateResults((_0x103e19,_0x54179a)=>this[_0x19aebc(0x171)]['listSessions']({'project_id':_0x139b81,'project_name':_0x178126?.[_0x19aebc(0x1de)],'workflow_name':_0x178126?.[_0x19aebc(0x167)],'status':_0x178126?.[_0x19aebc(0x180)],'from_time':_0x178126?.[_0x19aebc(0x18f)],'to_time':_0x178126?.[_0x19aebc(0x17e)],'limit':_0x103e19,'last_id':_0x54179a??_0x178126?.[_0x19aebc(0x193)]}),_0x564583);return _0x48660e[_0x19aebc(0x16a)](_0x2d24f2=>({'project_id':_0x2d24f2['project']?.['id'],'project_name':_0x2d24f2[_0x19aebc(0x199)]?.[_0x19aebc(0x197)],'workflow_id':_0x2d24f2[_0x19aebc(0x17a)]?.['id'],'workflow_name':_0x2d24f2[_0x19aebc(0x17a)]?.[_0x19aebc(0x197)],'session_id':_0x2d24f2['id'],'sessionUuid':_0x2d24f2[_0x19aebc(0x1be)],'sessionTime':_0x2d24f2['sessionTime'],'lastAttempt':_0x2d24f2[_0x19aebc(0x1d9)],'id':_0x2d24f2['id'],'project':_0x2d24f2[_0x19aebc(0x199)],'workflow':_0x2d24f2[_0x19aebc(0x17a)]}));}async[a197_0x18e98c(0x17c)](_0x20a97d){const _0x2e0f29=a197_0x18e98c,_0x303896=_0x20a97d?.[_0x2e0f29(0x15e)]||0x64,_0x3ef156=await paginateResults((_0x32583a,_0x1986db)=>this['client']['listAttempts']({'project_name':_0x20a97d?.[_0x2e0f29(0x1de)],'workflow_name':_0x20a97d?.['workflowName'],'include_retried':_0x20a97d?.[_0x2e0f29(0x15f)],'limit':_0x32583a,'last_id':_0x1986db??_0x20a97d?.[_0x2e0f29(0x193)]}),_0x303896);return _0x3ef156['map'](_0x30e2db=>({'project_id':_0x30e2db[_0x2e0f29(0x199)]?.['id'],'project_name':_0x30e2db[_0x2e0f29(0x199)]?.['name'],'workflow_id':_0x30e2db['workflow']?.['id'],'workflow_name':_0x30e2db[_0x2e0f29(0x17a)]?.[_0x2e0f29(0x197)],'session_id':_0x30e2db['sessionId'],'sessionUuid':_0x30e2db[_0x2e0f29(0x1be)],'sessionTime':_0x30e2db[_0x2e0f29(0x1c5)],'attempt_id':_0x30e2db['id'],'attempt_index':_0x30e2db[_0x2e0f29(0x186)],'retryAttemptName':_0x30e2db[_0x2e0f29(0x15c)],'done':_0x30e2db[_0x2e0f29(0x187)],'success':_0x30e2db[_0x2e0f29(0x1e3)],'cancelRequested':_0x30e2db[_0x2e0f29(0x164)],'params':_0x30e2db[_0x2e0f29(0x169)],'createdAt':_0x30e2db[_0x2e0f29(0x1b0)],'finishedAt':_0x30e2db[_0x2e0f29(0x1d6)],'id':_0x30e2db['id'],'index':_0x30e2db[_0x2e0f29(0x186)],'project':_0x30e2db[_0x2e0f29(0x199)],'workflow':_0x30e2db['workflow']}));}async[a197_0x18e98c(0x1d5)](_0x2516dc){const _0x4f2579=a197_0x18e98c,_0x31d14b=await this['client'][_0x4f2579(0x163)](_0x2516dc);return _0x31d14b;}async[a197_0x18e98c(0x1a8)](_0x4959a7,_0x4adcc8=![]){const _0x2ae46f=a197_0x18e98c,_0x59b065=await this[_0x2ae46f(0x171)][_0x2ae46f(0x1e4)](_0x4959a7,_0x4adcc8);return _0x59b065[_0x2ae46f(0x16a)](_0x23fa11=>({'task_id':_0x23fa11['id'],'task_name':_0x23fa11[_0x2ae46f(0x1ba)],'parentId':_0x23fa11[_0x2ae46f(0x1cd)],'config':_0x23fa11[_0x2ae46f(0x1c2)],'upstreams':_0x23fa11['upstreams'],'state':_0x23fa11[_0x2ae46f(0x19b)],'exportParams':_0x23fa11[_0x2ae46f(0x19e)],'storeParams':_0x23fa11[_0x2ae46f(0x1b3)],'stateParams':_0x23fa11[_0x2ae46f(0x15b)],'updatedAt':_0x23fa11['updatedAt'],'retryAt':_0x23fa11[_0x2ae46f(0x18b)],'startedAt':_0x23fa11['startedAt'],'error':_0x23fa11[_0x2ae46f(0x178)],'isGroup':_0x23fa11['isGroup'],'id':_0x23fa11['id'],'fullName':_0x23fa11[_0x2ae46f(0x1ba)]}));}async[a197_0x18e98c(0x1b6)](_0x991df8,_0x1b5d98){const _0x197b44=a197_0x18e98c;return await this[_0x197b44(0x171)][_0x197b44(0x1df)](_0x991df8,_0x1b5d98);}async['logs'](_0x33aeee,_0x8f9cb1){const _0x274efb=a197_0x18e98c,_0x48e55e=await import(_0x274efb(0x168)),{promisify:_0xdb667e}=await import(_0x274efb(0x190)),_0x4cfce6=_0xdb667e(_0x48e55e[_0x274efb(0x1c9)]),_0x1c1593=await this['client']['listLogFiles'](_0x33aeee,_0x8f9cb1);if(_0x1c1593[_0x274efb(0x191)]===0x0)return'';const _0x2ec7be=[];for(const _0x2c42c1 of _0x1c1593){if(!_0x2c42c1['direct'])continue;const _0x35a158=await fetch(_0x2c42c1['direct']);if(!_0x35a158['ok'])throw new Error(_0x274efb(0x1bd)+_0x35a158[_0x274efb(0x180)]);const _0x301700=Buffer[_0x274efb(0x194)](await _0x35a158[_0x274efb(0x1bb)]()),_0xc769de=await _0x4cfce6(_0x301700);_0x2ec7be['push'](_0xc769de[_0x274efb(0x1dc)](_0x274efb(0x1b2)));}return _0x2ec7be['join']('\x0a');}async[a197_0x18e98c(0x19c)](_0x1ea41f,_0x3bf435){const _0x52dfd8=a197_0x18e98c,_0x58cfc8=await this[_0x52dfd8(0x171)][_0x52dfd8(0x181)](_0x1ea41f,_0x3bf435);return _0x58cfc8?.[_0x52dfd8(0x16f)]??_0x52dfd8(0x1e7);}async[a197_0x18e98c(0x16e)](_0x1a9f63,_0x77ff57){const _0x4c2f09=a197_0x18e98c,_0x28c98e=await this[_0x4c2f09(0x171)][_0x4c2f09(0x16e)](_0x1a9f63,{'from_task':_0x77ff57?.[_0x4c2f09(0x1b5)],'retry_params':_0x77ff57?.['retryParams']});return{'attemptId':_0x28c98e['id'],'sessionId':_0x28c98e[_0x4c2f09(0x183)]};}async[a197_0x18e98c(0x1a1)](_0x40acaa,_0x59e39f){const _0x1cd350=a197_0x18e98c,_0x182fbb=await this['client']['retryAttempt'](_0x40acaa,{'resume_from':_0x59e39f?.[_0x1cd350(0x1b7)],'retry_params':_0x59e39f?.[_0x1cd350(0x1c4)],'force':_0x59e39f?.[_0x1cd350(0x160)]});return{'attemptId':_0x182fbb['id'],'sessionId':_0x182fbb[_0x1cd350(0x183)]};}['parseWorkflowId'](_0xca4670){const _0x2cb196=a197_0x18e98c,_0x430cda=_0xca4670[_0x2cb196(0x1a3)]('.');if(_0x430cda===-0x1)throw new SDKError(ErrorCode[_0x2cb196(0x162)],_0x2cb196(0x1a0)+_0xca4670);const _0x57762d=_0xca4670['substring'](0x0,_0x430cda),_0x163dab=_0xca4670[_0x2cb196(0x1d3)](_0x430cda+0x1);if(!_0x57762d||!_0x163dab)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x2cb196(0x196)+_0xca4670+_0x2cb196(0x1e0));return{'projectName':_0x57762d,'workflowName':_0x163dab};}async[a197_0x18e98c(0x1b9)](_0x48006d,_0x5eeae4={},_0x3a5036){const _0x34632a=a197_0x18e98c,{projectName:_0x3fb995,workflowName:_0x1f62c9}=this[_0x34632a(0x1ae)](_0x48006d),_0x41cdab=_0x3a5036?.[_0x34632a(0x1c5)]||new Date()['toISOString']();return await this[_0x34632a(0x171)][_0x34632a(0x1c0)]({'projectName':_0x3fb995,'workflowName':_0x1f62c9,'sessionTime':_0x41cdab,'params':_0x5eeae4});}async[a197_0x18e98c(0x184)](_0x37f440){const _0x3b0b45=a197_0x18e98c,{projectName:_0x57e906,workflowName:_0x32a687}=this[_0x3b0b45(0x1ae)](_0x37f440),{id:_0x40a080}=await this[_0x3b0b45(0x165)](_0x57e906);return await this['client']['getProjectWorkflow'](_0x40a080,_0x32a687);}async['download'](_0x240dd3,_0x131915,_0x585a15){const _0x2af9a8=a197_0x18e98c,{promises:_0xc10456}=await import('fs'),_0x48ce28=await import(_0x2af9a8(0x16b)),_0x17a3c3=await import('os'),_0x33eefc=await import(_0x2af9a8(0x170)),{id:_0x47602a,name:_0x81f347}=await this[_0x2af9a8(0x165)](_0x240dd3),_0x1c9d58=_0x17a3c3['tmpdir'](),_0x348948=_0x48ce28[_0x2af9a8(0x19a)](_0x1c9d58,_0x2af9a8(0x15d)+_0x47602a+'-'+Date[_0x2af9a8(0x1e5)]()+'.tar.gz');try{await this['client'][_0x2af9a8(0x174)](_0x47602a,_0x348948,_0x585a15?.[_0x2af9a8(0x185)]);const _0x58d14d=_0x48ce28[_0x2af9a8(0x19a)](_0x131915,_0x81f347);await _0xc10456['mkdir'](_0x58d14d,{'recursive':!![]}),await _0x33eefc[_0x2af9a8(0x1d2)]({'file':_0x348948,'cwd':_0x58d14d,'gzip':!![]});const _0x29f34a=async _0x3bb2cc=>{const _0x5df869=_0x2af9a8;let _0x3502b4=0x0;const _0x32a2d3=await _0xc10456['readdir'](_0x3bb2cc,{'withFileTypes':!![]});for(const _0x40d7fd of _0x32a2d3){const _0x1cec28=_0x48ce28['join'](_0x3bb2cc,_0x40d7fd[_0x5df869(0x197)]);if(_0x40d7fd[_0x5df869(0x15a)]())_0x3502b4++;else _0x40d7fd['isDirectory']()&&(_0x3502b4+=await _0x29f34a(_0x1cec28));}return _0x3502b4;},_0x3cc078=await _0x29f34a(_0x58d14d);return{'projectName':_0x81f347,'revision':_0x585a15?.['revision']||'latest','filesExtracted':_0x3cc078};}finally{try{await _0xc10456[_0x2af9a8(0x1d4)](_0x348948);}catch{}}}async[a197_0x18e98c(0x1ab)](_0x10258d,_0x52df49){const _0x56f431=a197_0x18e98c,{promises:_0x3002f9}=await import('fs'),_0x7d31d=await import(_0x56f431(0x16b)),_0x5639df=await import(_0x56f431(0x170)),_0x3b6aea=_0x52df49?.[_0x56f431(0x1de)]||_0x7d31d[_0x56f431(0x18d)](_0x10258d),_0xd1524b=_0x52df49?.[_0x56f431(0x185)]||new Date()[_0x56f431(0x1cf)]()[_0x56f431(0x1da)](/[:.]/g,'-');try{await _0x3002f9[_0x56f431(0x1a6)](_0x10258d);}catch{throw new Error(_0x56f431(0x159)+_0x10258d);}if(!_0x52df49?.[_0x56f431(0x173)]){const _0x31f1b7=await _0x3002f9[_0x56f431(0x1b8)](_0x10258d),_0x130284=_0x31f1b7[_0x56f431(0x1d8)](_0x3c0cb6=>_0x3c0cb6['endsWith'](WORKFLOW_FILE_EXTENSION));if(_0x130284['length']===0x0)throw new Error(_0x56f431(0x1ce)+WORKFLOW_FILE_EXTENSION+_0x56f431(0x1c7));for(const _0x10f8ec of _0x130284){const _0x594984=_0x7d31d[_0x56f431(0x19a)](_0x10258d,_0x10f8ec);try{await _0x3002f9[_0x56f431(0x1a6)](_0x594984);}catch{throw new Error(_0x56f431(0x179)+_0x10f8ec);}}}const _0x30ee5f=async(_0x1fb18a,_0x25fbb0='')=>{const _0x198f84=_0x56f431,_0x2c02fb=await _0x3002f9[_0x198f84(0x1b8)](_0x1fb18a,{'withFileTypes':!![]}),_0x301b9d=[];for(const _0x1273bc of _0x2c02fb){const _0x57c4ff=_0x7d31d[_0x198f84(0x19a)](_0x25fbb0,_0x1273bc['name']),_0x4cef9c=_0x7d31d[_0x198f84(0x19a)](_0x1fb18a,_0x1273bc[_0x198f84(0x197)]);if(!shouldIncludeInArchive(_0x1273bc[_0x198f84(0x197)]))continue;_0x1273bc[_0x198f84(0x1d1)]()?_0x301b9d[_0x198f84(0x1ab)](...await _0x30ee5f(_0x4cef9c,_0x57c4ff)):_0x301b9d[_0x198f84(0x1ab)](_0x57c4ff);}return _0x301b9d;},_0x21724a=await _0x30ee5f(_0x10258d),_0x5a1804=await import('os'),_0x39aef6=_0x5a1804[_0x56f431(0x18a)](),_0x44aa4e=_0x7d31d[_0x56f431(0x19a)](_0x39aef6,_0x56f431(0x1db)+Date[_0x56f431(0x1e5)]()+_0x56f431(0x189));try{await _0x5639df['create']({'file':_0x44aa4e,'gzip':!![],'cwd':_0x10258d,'portable':!![]},_0x21724a);const _0x3554ee=await this['client'][_0x56f431(0x1e1)](_0x3b6aea,_0xd1524b,_0x44aa4e,{'scheduleFrom':_0x52df49?.[_0x56f431(0x176)],'clearSchedule':_0x52df49?.['clearSchedule'],'clearScheduleAll':_0x52df49?.[_0x56f431(0x1bf)]});return{'projectId':_0x3554ee['id'],'projectName':_0x3554ee[_0x56f431(0x197)],'revision':_0x3554ee['revision']};}finally{try{await _0x3002f9['unlink'](_0x44aa4e);}catch{}}}async[a197_0x18e98c(0x19f)](_0x5be9af){const _0x1b6924=a197_0x18e98c,{id:_0x38b3c0}=await this[_0x1b6924(0x165)](_0x5be9af),_0x4bfebe=await this[_0x1b6924(0x171)]['deleteProject'](_0x38b3c0);return{'projectId':_0x4bfebe['id'],'projectName':_0x4bfebe['name']};}async[a197_0x18e98c(0x16c)](_0x336940){const _0x5bc908=a197_0x18e98c,{id:_0x5827f3,name:_0x42da9}=await this[_0x5bc908(0x165)](_0x336940),_0x409b36=await this[_0x5bc908(0x171)]['listSecrets'](_0x5827f3);return{'projectName':_0x42da9,'secrets':_0x409b36};}async[a197_0x18e98c(0x1cb)](_0x555714,_0x4fa40c,_0xaebfca){const _0x164e95=a197_0x18e98c,{id:_0x10f069,name:_0x1d0d08}=await this[_0x164e95(0x165)](_0x555714);return await this[_0x164e95(0x171)][_0x164e95(0x1cb)](_0x10f069,_0x4fa40c,_0xaebfca),{'projectName':_0x1d0d08,'key':_0x4fa40c};}async[a197_0x18e98c(0x1b1)](_0x266d42,_0xecf444){const _0x161d18=a197_0x18e98c,{id:_0x5721d2,name:_0x2c486e}=await this[_0x161d18(0x165)](_0x266d42),_0x27fad6=Object[_0x161d18(0x1dd)](_0xecf444),_0x4ad4aa=await Promise[_0x161d18(0x1c3)](_0x27fad6['map'](_0x3f1948=>this['client'][_0x161d18(0x1cb)](_0x5721d2,_0x3f1948,_0xecf444[_0x3f1948]))),_0x58a4f2=_0x4ad4aa[_0x161d18(0x16a)]((_0x248194,_0x371058)=>_0x248194[_0x161d18(0x180)]==='rejected'?_0x27fad6[_0x371058]:null)['filter'](_0x4f40b5=>_0x4f40b5!==null);if(_0x58a4f2[_0x161d18(0x191)]>0x0)throw new SDKError(ErrorCode['WORKFLOW_SECRET_SET_FAILED'],_0x161d18(0x1c6)+(_0x58a4f2[_0x161d18(0x191)]>0x1?'s':'')+':\x20'+_0x58a4f2['join'](',\x20'));return{'projectName':_0x2c486e,'keys':_0x27fad6};}async[a197_0x18e98c(0x1a7)](_0x2d6901,_0x7dc209){const _0x1e4ac1=a197_0x18e98c,{id:_0x4b3c02,name:_0x10dcf8}=await this['resolveProjectId'](_0x2d6901);return await this[_0x1e4ac1(0x171)][_0x1e4ac1(0x1a7)](_0x4b3c02,_0x7dc209),{'projectName':_0x10dcf8,'key':_0x7dc209};}async['pullProject'](_0x674cf6,_0xeb6546){const _0x58100b=a197_0x18e98c;return pullWorkflow({'client':this[_0x58100b(0x171)],'resolveProjectId':this['resolveProjectId'][_0x58100b(0x1a4)](this)},_0x674cf6,_0xeb6546);}async[a197_0x18e98c(0x172)](_0x295a5a,_0x33b4c5){const _0x23898b=a197_0x18e98c;return applyPullResult({'client':this['client'],'resolveProjectId':this[_0x23898b(0x165)][_0x23898b(0x1a4)](this)},_0x295a5a,_0x33b4c5);}async[a197_0x18e98c(0x175)](_0x2eb767){const _0x232d2e=a197_0x18e98c;return preparePushWorkflow({'client':this[_0x232d2e(0x171)],'resolveProjectId':this[_0x232d2e(0x165)][_0x232d2e(0x1a4)](this)},_0x2eb767);}async[a197_0x18e98c(0x1af)](_0x5bdeaf){const _0x1cfadb=a197_0x18e98c;return executePushWorkflow({'client':this['client'],'resolveProjectId':this[_0x1cfadb(0x165)][_0x1cfadb(0x1a4)](this)},_0x5bdeaf);}async[a197_0x18e98c(0x161)](_0x5d5a11,_0x56e862,_0x40a670){const _0x12f4c4=a197_0x18e98c;return prepareCloneWorkflow({'client':this[_0x12f4c4(0x171)]},_0x5d5a11,_0x56e862,_0x40a670);}async['executeCloneProject'](_0xe7acfa){return executeCloneWorkflow({'client':this['client']},_0xe7acfa);}async[a197_0x18e98c(0x17d)](_0x948a36){const _0x28c92a=a197_0x18e98c,_0x5a7b82=Math[_0x28c92a(0x19d)](Number(_0x948a36?.[_0x28c92a(0x15e)])||MAX_PAGINATION_LIMIT,MAX_PAGINATION_LIMIT);return await this[_0x28c92a(0x171)][_0x28c92a(0x17d)]({'limit':_0x5a7b82});}async[a197_0x18e98c(0x1aa)](_0x1a1d7b,_0x3ff1f3){const _0xdeb168=a197_0x18e98c,{id:_0xadbdb6}=await this[_0xdeb168(0x165)](_0x1a1d7b),_0x44931b=Math[_0xdeb168(0x19d)](Number(_0x3ff1f3?.[_0xdeb168(0x15e)])||MAX_PAGINATION_LIMIT,MAX_PAGINATION_LIMIT);return await this[_0xdeb168(0x171)]['listProjectSchedules'](_0xadbdb6,{'workflow':_0x3ff1f3?.[_0xdeb168(0x17a)],'limit':_0x44931b});}async[a197_0x18e98c(0x1a9)](_0x128053){const _0x52b2e7=a197_0x18e98c;return await this[_0x52b2e7(0x171)][_0x52b2e7(0x1a9)](_0x128053);}async[a197_0x18e98c(0x1ac)](_0x162882,_0x5d98fc){const _0x260e84=a197_0x18e98c;return await this[_0x260e84(0x171)][_0x260e84(0x1ac)](_0x162882,_0x5d98fc);}async[a197_0x18e98c(0x188)](_0x357360){const _0x535097=a197_0x18e98c;return await this['client'][_0x535097(0x188)](_0x357360);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1fd728,_0x27614d){const _0x426608=a198_0x2cb6,_0x5a2763=_0x1fd728();while(!![]){try{const _0x1b29e3=-parseInt(_0x426608(0x112))/0x1+parseInt(_0x426608(0xe4))/0x2+parseInt(_0x426608(0x10d))/0x3+-parseInt(_0x426608(0x103))/0x4*(parseInt(_0x426608(0x114))/0x5)+-parseInt(_0x426608(0x107))/0x6*(-parseInt(_0x426608(0x10f))/0x7)+parseInt(_0x426608(0xf8))/0x8+-parseInt(_0x426608(0xf6))/0x9;if(_0x1b29e3===_0x27614d)break;else _0x5a2763['push'](_0x5a2763['shift']());}catch(_0x592fea){_0x5a2763['push'](_0x5a2763['shift']());}}}(a198_0x195e,0xd64c9));import{existsSync,promises as a198_0x2766ab}from'fs';import a198_0x3f57c1 from'path';import a198_0x1a339a from'os';import{generateDiff,formatDiffWithColors,hasChanges}from'../../utils/diff.js';function a198_0x2cb6(_0x5cb499,_0x4e9c57){_0x5cb499=_0x5cb499-0xe3;const _0x195e45=a198_0x195e();let _0x2cb65a=_0x195e45[_0x5cb499];return _0x2cb65a;}import{getWorkflowProjectDir,createWorkflowTdxConfigContent,updateWorkflowTdxConfig}from'./tdx-config.js';function a198_0x195e(){const _0x24b6fa=['size','tmpdir','join','modified','writeFile','path','stat','revision','2806554DSBWxa','tar','localeCompare','tdx-wf-apply-','changes','unchanged','name','toISOString','\x20(archive\x20size:\x20','message','extracted','archive.tar.gz','length','baseDir','projectId','targetDir','getProject','type','7700715QdrszD','\x20bytes)','9085416NDSJFC','deleted','The\x20archive\x20passed\x20initial\x20validation\x20but\x20extraction\x20failed.\x20','tdx.json','includes','new','utf-8','tdx-wf-pull-','latest','zlib','WORKFLOW_ARCHIVE_CORRUPTED','4EgLtUP','extract','has','catch','2038278FIapNv','TAR_BAD_ARCHIVE','downloadProjectArchive','Failed\x20to\x20extract\x20project\x20archive','mkdtemp','sort','794874tPJXbo','add','35GFJYll','readFile','mkdir','1566182Ncmcdd','push','6014455IJAdZZ','filter','isDirectory','unlink'];a198_0x195e=function(){return _0x24b6fa;};return a198_0x195e();}import{SDKError,ErrorCode}from'../errors.js';export async function pullWorkflow(_0x38c1ef,_0xcc9407,_0x44e637={}){const _0x1e7f81=a198_0x2cb6,_0x3bbb91=await import(_0x1e7f81(0xe5)),{client:_0x5456f2,resolveProjectId:_0x3c7b11}=_0x38c1ef,{id:_0x54ac80,name:_0x4a6174}=await _0x3c7b11(_0xcc9407),_0x7d13f2=_0x44e637[_0x1e7f81(0xf1)]||process['cwd'](),_0x1b35b2=_0x44e637[_0x1e7f81(0xf3)]||getWorkflowProjectDir(_0x4a6174,_0x7d13f2),_0x310254=a198_0x3f57c1[_0x1e7f81(0x11a)](_0x1b35b2,_0x1e7f81(0xfb)),_0x1be2cb=!existsSync(_0x310254),_0xc70be3=await a198_0x2766ab[_0x1e7f81(0x10b)](a198_0x3f57c1[_0x1e7f81(0x11a)](a198_0x1a339a[_0x1e7f81(0x119)](),_0x1e7f81(0xff))),_0x1f79a1=a198_0x3f57c1[_0x1e7f81(0x11a)](_0xc70be3,_0x1e7f81(0xef)),_0x462b75=a198_0x3f57c1[_0x1e7f81(0x11a)](_0xc70be3,_0x1e7f81(0xee));try{await _0x5456f2[_0x1e7f81(0x109)](_0x54ac80,_0x1f79a1,_0x44e637[_0x1e7f81(0xe3)]),await a198_0x2766ab[_0x1e7f81(0x111)](_0x462b75,{'recursive':!![]});try{await _0x3bbb91['extract']({'file':_0x1f79a1,'cwd':_0x462b75,'gzip':!![]});}catch(_0x419ce2){const _0x35c667=_0x419ce2 instanceof Error?_0x419ce2[_0x1e7f81(0xed)]:String(_0x419ce2);if(_0x35c667[_0x1e7f81(0xfc)](_0x1e7f81(0x108))||_0x35c667[_0x1e7f81(0xfc)]('zlib')){const _0x274ecd=await a198_0x2766ab[_0x1e7f81(0x11e)](_0x1f79a1)[_0x1e7f81(0x106)](()=>null),_0x9699ef=_0x274ecd?'\x20(archive\x20size:\x20'+_0x274ecd[_0x1e7f81(0x118)]+_0x1e7f81(0xf7):'';throw new SDKError(ErrorCode[_0x1e7f81(0x102)],_0x1e7f81(0x10a)+_0x9699ef+':\x20'+_0x35c667,_0x419ce2,{'helpText':_0x1e7f81(0xfa)+'The\x20archive\x20may\x20be\x20truncated\x20or\x20corrupted.\x20Try\x20pushing\x20a\x20new\x20revision\x20or\x20contact\x20support.'});}throw _0x419ce2;}const _0x5b3156=await _0x5456f2[_0x1e7f81(0xf4)](_0x54ac80),_0x497807=_0x44e637['revision']||_0x5b3156[_0x1e7f81(0xe3)]||_0x1e7f81(0x100),_0x1a7d7c=await calculateChanges(_0x1b35b2,_0x462b75,_0x1be2cb),_0x446dec={'new':_0x1a7d7c['filter'](_0x34ab09=>_0x34ab09[_0x1e7f81(0xf5)]==='new')[_0x1e7f81(0xf0)],'modified':_0x1a7d7c['filter'](_0x2049a8=>_0x2049a8[_0x1e7f81(0xf5)]===_0x1e7f81(0x11b))[_0x1e7f81(0xf0)],'deleted':_0x1a7d7c['filter'](_0x180676=>_0x180676[_0x1e7f81(0xf5)]===_0x1e7f81(0xf9))[_0x1e7f81(0xf0)],'unchanged':_0x1a7d7c[_0x1e7f81(0x115)](_0x20c465=>_0x20c465[_0x1e7f81(0xf5)]===_0x1e7f81(0xe9))[_0x1e7f81(0xf0)]};return{'projectName':_0x4a6174,'projectId':_0x54ac80,'revision':_0x497807,'targetDir':_0x1b35b2,'changes':_0x1a7d7c,'summary':_0x446dec,'hasChanges':_0x446dec[_0x1e7f81(0xfd)]>0x0||_0x446dec[_0x1e7f81(0x11b)]>0x0||_0x446dec[_0x1e7f81(0xf9)]>0x0,'isNewProject':_0x1be2cb};}finally{await a198_0x2766ab['rm'](_0xc70be3,{'recursive':!![],'force':!![]});}}export async function applyPullResult(_0x52899e,_0x28eba9,_0x47d764={}){const _0x24af56=a198_0x2cb6,_0x374900=await import('tar'),{client:_0x221936}=_0x52899e,_0x880cb5=await a198_0x2766ab[_0x24af56(0x10b)](a198_0x3f57c1[_0x24af56(0x11a)](a198_0x1a339a['tmpdir'](),_0x24af56(0xe7))),_0x564d4a=a198_0x3f57c1[_0x24af56(0x11a)](_0x880cb5,_0x24af56(0xef));try{await _0x221936[_0x24af56(0x109)](_0x28eba9[_0x24af56(0xf2)],_0x564d4a,_0x47d764[_0x24af56(0xe3)]),await a198_0x2766ab[_0x24af56(0x111)](_0x28eba9[_0x24af56(0xf3)],{'recursive':!![]});for(const _0x31e34b of _0x28eba9[_0x24af56(0xe8)]){if(_0x31e34b['type']==='deleted'){const _0x320490=a198_0x3f57c1[_0x24af56(0x11a)](_0x28eba9[_0x24af56(0xf3)],_0x31e34b['path']);await a198_0x2766ab[_0x24af56(0x117)](_0x320490)[_0x24af56(0x106)](()=>{});}}try{await _0x374900[_0x24af56(0x104)]({'file':_0x564d4a,'cwd':_0x28eba9[_0x24af56(0xf3)],'gzip':!![]});}catch(_0x1af4ca){const _0xc19d77=_0x1af4ca instanceof Error?_0x1af4ca['message']:String(_0x1af4ca);if(_0xc19d77[_0x24af56(0xfc)](_0x24af56(0x108))||_0xc19d77['includes'](_0x24af56(0x101))){const _0x5a0adc=await a198_0x2766ab[_0x24af56(0x11e)](_0x564d4a)[_0x24af56(0x106)](()=>null),_0x12c3c6=_0x5a0adc?_0x24af56(0xec)+_0x5a0adc['size']+_0x24af56(0xf7):'';throw new SDKError(ErrorCode[_0x24af56(0x102)],_0x24af56(0x10a)+_0x12c3c6+':\x20'+_0xc19d77,_0x1af4ca,{'helpText':'The\x20archive\x20passed\x20initial\x20validation\x20but\x20extraction\x20failed.\x20'+'The\x20archive\x20may\x20be\x20truncated\x20or\x20corrupted.\x20Try\x20pushing\x20a\x20new\x20revision\x20or\x20contact\x20support.'});}throw _0x1af4ca;}const _0x2330ca=a198_0x3f57c1[_0x24af56(0x11a)](_0x28eba9[_0x24af56(0xf3)],_0x24af56(0xfb));if(_0x28eba9['isNewProject']){const _0x1ca56c=createWorkflowTdxConfigContent(_0x28eba9['projectName'],_0x28eba9['projectId'],_0x28eba9[_0x24af56(0xe3)]);await a198_0x2766ab[_0x24af56(0x11c)](_0x2330ca,_0x1ca56c,'utf-8');}else updateWorkflowTdxConfig(_0x2330ca,{'last_pulled_revision':_0x28eba9[_0x24af56(0xe3)],'last_pulled_at':new Date()[_0x24af56(0xeb)]()});}finally{await a198_0x2766ab['rm'](_0x880cb5,{'recursive':!![],'force':!![]});}}async function calculateChanges(_0x48eef8,_0x281031,_0x50bf4e){const _0xe1d546=a198_0x2cb6,_0x20a7c1=[],_0x30ad5e=await getAllFiles(_0x281031),_0x553c52=existsSync(_0x48eef8)?await getAllFiles(_0x48eef8):new Set();for(const _0x288e65 of _0x30ad5e){const _0x48b768=a198_0x3f57c1['join'](_0x48eef8,_0x288e65),_0x381f47=a198_0x3f57c1['join'](_0x281031,_0x288e65);if(_0x288e65===_0xe1d546(0xfb))continue;const _0x148c70=await a198_0x2766ab[_0xe1d546(0x110)](_0x381f47,_0xe1d546(0xfe))[_0xe1d546(0x106)](()=>null);if(_0x148c70===null)continue;if(!existsSync(_0x48b768)||_0x50bf4e)_0x20a7c1['push']({'path':_0x288e65,'type':_0xe1d546(0xfd),'newContent':_0x148c70});else{const _0x2c1b5e=await a198_0x2766ab[_0xe1d546(0x110)](_0x48b768,_0xe1d546(0xfe))['catch'](()=>null);if(_0x2c1b5e===null)_0x20a7c1[_0xe1d546(0x113)]({'path':_0x288e65,'type':_0xe1d546(0x11b),'newContent':_0x148c70});else{if(_0x2c1b5e!==_0x148c70){const _0x52f827=generateDiff(_0x2c1b5e,_0x148c70),_0x510508=hasChanges(_0x52f827)?formatDiffWithColors(_0x52f827):undefined;_0x20a7c1['push']({'path':_0x288e65,'type':'modified','oldContent':_0x2c1b5e,'newContent':_0x148c70,'diff':_0x510508});}else _0x20a7c1[_0xe1d546(0x113)]({'path':_0x288e65,'type':'unchanged'});}}}if(!_0x50bf4e)for(const _0x2d2a52 of _0x553c52){if(_0x2d2a52===_0xe1d546(0xfb))continue;if(!_0x30ad5e[_0xe1d546(0x105)](_0x2d2a52)){const _0x400cc8=a198_0x3f57c1[_0xe1d546(0x11a)](_0x48eef8,_0x2d2a52),_0x1ece38=await a198_0x2766ab[_0xe1d546(0x110)](_0x400cc8,_0xe1d546(0xfe))[_0xe1d546(0x106)](()=>undefined);_0x20a7c1[_0xe1d546(0x113)]({'path':_0x2d2a52,'type':_0xe1d546(0xf9),'oldContent':_0x1ece38});}}return _0x20a7c1[_0xe1d546(0x10c)]((_0x394409,_0x2a4636)=>_0x394409[_0xe1d546(0x11d)][_0xe1d546(0xe6)](_0x2a4636[_0xe1d546(0x11d)])),_0x20a7c1;}async function getAllFiles(_0x4be437,_0x3be6e8=''){const _0x12e971=a198_0x2cb6,_0x475258=new Set();if(!existsSync(_0x4be437))return _0x475258;const _0x1792a1=await a198_0x2766ab['readdir'](_0x4be437,{'withFileTypes':!![]});for(const _0x4fbed5 of _0x1792a1){const _0x229687=_0x3be6e8?a198_0x3f57c1[_0x12e971(0x11a)](_0x3be6e8,_0x4fbed5[_0x12e971(0xea)]):_0x4fbed5[_0x12e971(0xea)];if(_0x4fbed5[_0x12e971(0x116)]()){const _0x3772e9=await getAllFiles(a198_0x3f57c1[_0x12e971(0x11a)](_0x4be437,_0x4fbed5[_0x12e971(0xea)]),_0x229687);for(const _0x1f0b62 of _0x3772e9){_0x475258[_0x12e971(0x10e)](_0x1f0b62);}}else _0x475258[_0x12e971(0x10e)](_0x229687);}return _0x475258;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x291e83,_0x4d0403){const _0x2db9ce=a199_0x3b66,_0x50b576=_0x291e83();while(!![]){try{const _0x41d188=-parseInt(_0x2db9ce(0xe7))/0x1+parseInt(_0x2db9ce(0xd3))/0x2+parseInt(_0x2db9ce(0xbf))/0x3+parseInt(_0x2db9ce(0xd9))/0x4*(-parseInt(_0x2db9ce(0xe5))/0x5)+parseInt(_0x2db9ce(0xd4))/0x6*(-parseInt(_0x2db9ce(0xca))/0x7)+parseInt(_0x2db9ce(0xb8))/0x8+parseInt(_0x2db9ce(0xc4))/0x9;if(_0x41d188===_0x4d0403)break;else _0x50b576['push'](_0x50b576['shift']());}catch(_0x460c69){_0x50b576['push'](_0x50b576['shift']());}}}(a199_0x5d9a,0xd2594));import{promises as a199_0x217b51}from'fs';import a199_0x24b78b from'path';import a199_0x290cb4 from'os';import{generateDiff,formatDiffWithColors,hasChanges}from'../../utils/diff.js';function a199_0x3b66(_0x3394ef,_0x31c51b){_0x3394ef=_0x3394ef-0xb1;const _0x5d9ad9=a199_0x5d9a();let _0x3b66ee=_0x5d9ad9[_0x3394ef];return _0x3b66ee;}import{findWorkflowTdxConfig,updateWorkflowTdxConfig}from'./tdx-config.js';import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION,loadDigdagignore,createIgnoreInstance,addScopedPatterns,shouldIgnoreWithInstance}from'./workflow-utils.js';import{SDKError,ErrorCode}from'../errors.js';export async function preparePushWorkflow(_0x1f179b,_0x3204b1={}){const _0x4f4f87=a199_0x3b66,_0x18e4de=await import(_0x4f4f87(0xde)),{client:_0x1e2fdd,resolveProjectId:_0xb3a272}=_0x1f179b,_0x1901d9=_0x3204b1[_0x4f4f87(0xc3)]||process[_0x4f4f87(0xd8)](),_0x5ecd1b=findWorkflowTdxConfig(_0x1901d9),{config:_0x56c00b,configDir:_0x4d0f8c}=_0x5ecd1b;let _0x671260,_0x4383b8=_0x56c00b['workflow_project'];try{const _0x4e80bf=await _0xb3a272(_0x56c00b['workflow_project']);_0x671260=_0x4e80bf['id'],_0x4383b8=_0x4e80bf[_0x4f4f87(0xbd)];}catch{_0x671260='';}const _0x578446=_0x3204b1[_0x4f4f87(0xc6)]||new Date()[_0x4f4f87(0xce)]()[_0x4f4f87(0xd1)](/[:.]/g,'-');if(!_0x3204b1['skipValidation']){const _0x2c253d=await a199_0x217b51[_0x4f4f87(0xd2)](_0x4d0f8c),_0x5d29e8=_0x2c253d['filter'](_0x2aa89f=>_0x2aa89f[_0x4f4f87(0xcb)](WORKFLOW_FILE_EXTENSION));if(_0x5d29e8['length']===0x0)throw new Error(_0x4f4f87(0xc0)+WORKFLOW_FILE_EXTENSION+_0x4f4f87(0xc1)+_0x4d0f8c);}const _0x1a1286=await getProjectFiles(_0x4d0f8c);let _0x10a718;if(_0x671260){const _0x4b2ace=await a199_0x217b51[_0x4f4f87(0xbb)](a199_0x24b78b[_0x4f4f87(0xe8)](a199_0x290cb4['tmpdir'](),'tdx-wf-push-')),_0x58ee16=a199_0x24b78b['join'](_0x4b2ace,'archive.tar.gz'),_0x2aa989=a199_0x24b78b[_0x4f4f87(0xe8)](_0x4b2ace,_0x4f4f87(0xe0));try{await _0x1e2fdd['downloadProjectArchive'](_0x671260,_0x58ee16),await a199_0x217b51[_0x4f4f87(0xb5)](_0x2aa989,{'recursive':!![]});try{await _0x18e4de[_0x4f4f87(0xe4)]({'file':_0x58ee16,'cwd':_0x2aa989,'gzip':!![]});}catch(_0x592f6f){const _0x8ba24d=_0x592f6f instanceof Error?_0x592f6f['message']:String(_0x592f6f);if(_0x8ba24d['includes'](_0x4f4f87(0xc9))||_0x8ba24d[_0x4f4f87(0xe9)](_0x4f4f87(0xdb))){const _0x4178cd=await a199_0x217b51[_0x4f4f87(0xeb)](_0x58ee16)['catch'](()=>null),_0x1d4448=_0x4178cd?_0x4f4f87(0xba)+_0x4178cd[_0x4f4f87(0xb9)]+_0x4f4f87(0xe1):'';throw new SDKError(ErrorCode[_0x4f4f87(0xb4)],_0x4f4f87(0xc2)+_0x1d4448+':\x20'+_0x8ba24d,_0x592f6f,{'helpText':_0x4f4f87(0xbe)});}throw _0x592f6f;}_0x10a718=await calculatePushChanges(_0x4d0f8c,_0x2aa989,_0x1a1286);}finally{await a199_0x217b51['rm'](_0x4b2ace,{'recursive':!![],'force':!![]});}}else{_0x10a718=[];for(const _0x194d55 of _0x1a1286){const _0x93aa44=a199_0x24b78b[_0x4f4f87(0xe8)](_0x4d0f8c,_0x194d55),_0x3e9611=await a199_0x217b51[_0x4f4f87(0xd5)](_0x93aa44,'utf-8')[_0x4f4f87(0xd7)](()=>null);_0x10a718[_0x4f4f87(0xc8)]({'path':_0x194d55,'type':_0x4f4f87(0xe2),'newContent':_0x3e9611||undefined});}}const _0x13654d={'new':_0x10a718[_0x4f4f87(0xea)](_0x4f82d1=>_0x4f82d1[_0x4f4f87(0xb1)]==='new')[_0x4f4f87(0xd0)],'modified':_0x10a718[_0x4f4f87(0xea)](_0x3df008=>_0x3df008['type']==='modified')[_0x4f4f87(0xd0)],'deleted':_0x10a718['filter'](_0xc30a66=>_0xc30a66[_0x4f4f87(0xb1)]===_0x4f4f87(0xdc))[_0x4f4f87(0xd0)],'unchanged':_0x10a718[_0x4f4f87(0xea)](_0x3ebe9f=>_0x3ebe9f[_0x4f4f87(0xb1)]==='unchanged')[_0x4f4f87(0xd0)]};return{'projectName':_0x4383b8,'projectId':_0x671260,'revision':_0x578446,'sourceDir':_0x4d0f8c,'changes':_0x10a718,'summary':_0x13654d,'hasChanges':_0x13654d['new']>0x0||_0x13654d[_0x4f4f87(0xb7)]>0x0||_0x13654d[_0x4f4f87(0xdc)]>0x0,'configResult':_0x5ecd1b,'skipSchedule':_0x3204b1['skipSchedule']};}export async function executePushWorkflow(_0x31f869,_0xfb6438){const _0x29efea=a199_0x3b66,_0x5c6e72=await import(_0x29efea(0xde)),{client:_0x541501}=_0x31f869,_0x4dc286=await getProjectFiles(_0xfb6438[_0x29efea(0xc3)]),_0xda2aa2=await a199_0x217b51[_0x29efea(0xbb)](a199_0x24b78b[_0x29efea(0xe8)](a199_0x290cb4[_0x29efea(0xcd)](),_0x29efea(0xd6))),_0x1111c1=a199_0x24b78b['join'](_0xda2aa2,_0x29efea(0xdd));try{await _0x5c6e72[_0x29efea(0xb2)]({'file':_0x1111c1,'gzip':!![],'cwd':_0xfb6438[_0x29efea(0xc3)],'portable':!![]},_0x4dc286);const _0x240d4d=await _0x541501[_0x29efea(0xe6)](_0xfb6438[_0x29efea(0xda)],_0xfb6438['revision'],_0x1111c1,{'skipSchedule':_0xfb6438['skipSchedule']});return updateWorkflowTdxConfig(_0xfb6438[_0x29efea(0xc7)][_0x29efea(0xe3)],{'workflow_project_id':_0x240d4d['id'],'last_pushed_revision':_0x240d4d[_0x29efea(0xc6)],'last_pushed_at':new Date()[_0x29efea(0xce)]()}),{'projectId':_0x240d4d['id'],'projectName':_0x240d4d[_0x29efea(0xbd)],'revision':_0x240d4d[_0x29efea(0xc6)]};}finally{await a199_0x217b51['rm'](_0xda2aa2,{'recursive':!![],'force':!![]});}}async function getProjectFiles(_0x2e9316,_0x23c2e4=_0x2e9316,_0x2710b8='',_0x3c850e=null){const _0x23611e=a199_0x3b66,_0x307fd8=[];if(_0x3c850e===null){_0x3c850e=createIgnoreInstance();const _0x1d55ac=await loadDigdagignore(_0x2e9316);_0x1d55ac&&_0x3c850e['add'](_0x1d55ac);}if(_0x2710b8!==''){const _0x22b162=await loadDigdagignore(_0x23c2e4);_0x22b162&&addScopedPatterns(_0x3c850e,_0x22b162,_0x2710b8);}const _0x6af48=await a199_0x217b51[_0x23611e(0xd2)](_0x23c2e4,{'withFileTypes':!![]});for(const _0x2b3667 of _0x6af48){const _0x68aef4=_0x2710b8?a199_0x24b78b[_0x23611e(0xec)][_0x23611e(0xe8)](_0x2710b8,_0x2b3667[_0x23611e(0xbd)]):_0x2b3667[_0x23611e(0xbd)];if(_0x2b3667[_0x23611e(0xbd)]==='tdx.json')continue;if(_0x2b3667[_0x23611e(0xbd)]===_0x23611e(0xb6))continue;if(!shouldIncludeInArchive(_0x2b3667[_0x23611e(0xbd)]))continue;if(shouldIgnoreWithInstance(_0x3c850e,_0x68aef4,_0x2b3667['isDirectory']()))continue;if(_0x2b3667[_0x23611e(0xcf)]()){const _0x4430cb=await getProjectFiles(_0x2e9316,a199_0x24b78b[_0x23611e(0xe8)](_0x23c2e4,_0x2b3667[_0x23611e(0xbd)]),_0x68aef4,_0x3c850e);_0x307fd8[_0x23611e(0xc8)](..._0x4430cb);}else _0x307fd8['push'](_0x68aef4);}return _0x307fd8;}function a199_0x5d9a(){const _0x47cc30=['name','Use\x20\x27tdx\x20wf\x20upload\x27\x20to\x20force\x20push\x20without\x20comparison.','2877615WRioil','No\x20','\x20workflow\x20files\x20found\x20in\x20','Failed\x20to\x20extract\x20remote\x20project\x20archive\x20for\x20comparison','sourceDir','7507863BwqQhf','utf-8','revision','configResult','push','TAR_BAD_ARCHIVE','5999AtzvOJ','endsWith','sort','tmpdir','toISOString','isDirectory','length','replace','readdir','286558KWGCPA','606xQbVgZ','readFile','tdx-wf-push-archive-','catch','cwd','4586364FNHBYK','projectName','zlib','deleted','archive.tar.gz','tar','localeCompare','extracted','\x20bytes)','new','configPath','extract','5fouCrg','uploadProjectArchive','1025051NjtAYU','join','includes','filter','stat','posix','type','create','has','WORKFLOW_ARCHIVE_CORRUPTED','mkdir','.digdagignore','modified','9464768pxWmws','size','\x20(archive\x20size:\x20','mkdtemp','path'];a199_0x5d9a=function(){return _0x47cc30;};return a199_0x5d9a();}async function calculatePushChanges(_0x510d3c,_0x3f88af,_0x4e6ac4){const _0x2764fe=a199_0x3b66,_0x54c2d8=[],_0x24b7f8=new Set(await getProjectFiles(_0x3f88af));for(const _0x2e4a9c of _0x4e6ac4){const _0x511dd2=a199_0x24b78b[_0x2764fe(0xe8)](_0x510d3c,_0x2e4a9c),_0x13dfdc=a199_0x24b78b[_0x2764fe(0xe8)](_0x3f88af,_0x2e4a9c),_0x4c8ff3=await a199_0x217b51['readFile'](_0x511dd2,_0x2764fe(0xc5))['catch'](()=>null);if(_0x4c8ff3===null)continue;if(!_0x24b7f8[_0x2764fe(0xb3)](_0x2e4a9c))_0x54c2d8[_0x2764fe(0xc8)]({'path':_0x2e4a9c,'type':_0x2764fe(0xe2),'newContent':_0x4c8ff3});else{const _0x1ed047=await a199_0x217b51[_0x2764fe(0xd5)](_0x13dfdc,_0x2764fe(0xc5))[_0x2764fe(0xd7)](()=>null);if(_0x1ed047===null)_0x54c2d8[_0x2764fe(0xc8)]({'path':_0x2e4a9c,'type':_0x2764fe(0xb7),'newContent':_0x4c8ff3});else{if(_0x1ed047!==_0x4c8ff3){const _0x228e81=generateDiff(_0x1ed047,_0x4c8ff3),_0x54771c=hasChanges(_0x228e81)?formatDiffWithColors(_0x228e81):undefined;_0x54c2d8['push']({'path':_0x2e4a9c,'type':'modified','oldContent':_0x1ed047,'newContent':_0x4c8ff3,'diff':_0x54771c});}else _0x54c2d8[_0x2764fe(0xc8)]({'path':_0x2e4a9c,'type':'unchanged'});}}}for(const _0x334a32 of _0x24b7f8){if(!_0x4e6ac4[_0x2764fe(0xe9)](_0x334a32)){const _0x50571d=a199_0x24b78b[_0x2764fe(0xe8)](_0x3f88af,_0x334a32),_0x2ce4f3=await a199_0x217b51[_0x2764fe(0xd5)](_0x50571d,_0x2764fe(0xc5))[_0x2764fe(0xd7)](()=>undefined);_0x54c2d8[_0x2764fe(0xc8)]({'path':_0x334a32,'type':_0x2764fe(0xdc),'oldContent':_0x2ce4f3});}}return _0x54c2d8[_0x2764fe(0xcc)]((_0x4263ab,_0x58a67a)=>_0x4263ab[_0x2764fe(0xbc)][_0x2764fe(0xdf)](_0x58a67a['path'])),_0x54c2d8;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a200_0x39f457=a200_0x17ae;(function(_0xb5cd1a,_0x55ccf6){const _0x1829f0=a200_0x17ae,_0x12db2c=_0xb5cd1a();while(!![]){try{const _0x59550d=-parseInt(_0x1829f0(0x1d5))/0x1*(-parseInt(_0x1829f0(0x1d9))/0x2)+parseInt(_0x1829f0(0x1f2))/0x3*(parseInt(_0x1829f0(0x1f1))/0x4)+parseInt(_0x1829f0(0x1e2))/0x5*(parseInt(_0x1829f0(0x1db))/0x6)+parseInt(_0x1829f0(0x1eb))/0x7+parseInt(_0x1829f0(0x1dc))/0x8*(parseInt(_0x1829f0(0x1ea))/0x9)+-parseInt(_0x1829f0(0x1cb))/0xa+-parseInt(_0x1829f0(0x1f8))/0xb;if(_0x59550d===_0x55ccf6)break;else _0x12db2c['push'](_0x12db2c['shift']());}catch(_0x48cf59){_0x12db2c['push'](_0x12db2c['shift']());}}}(a200_0x5274,0x5067f));const OPERATOR_WARNINGS={'td_run>':a200_0x39f457(0x1e3),'http>':a200_0x39f457(0x1da),'http_call>':a200_0x39f457(0x1da),'mail>':a200_0x39f457(0x1d3)},WARNING_META={'activation':{'label':'⚠️\x20\x20ACTIVATION','singular':'activation','plural':a200_0x39f457(0x1d6)},'http':{'label':a200_0x39f457(0x1de),'singular':a200_0x39f457(0x1e0),'plural':a200_0x39f457(0x1ce)},'mail':{'label':a200_0x39f457(0x1e8),'singular':a200_0x39f457(0x1cd),'plural':a200_0x39f457(0x1f5)},'export':{'label':a200_0x39f457(0x1e4),'singular':'data\x20export','plural':'data\x20exports'}};function emptySummary(){return{'activation':0x0,'http':0x0,'mail':0x0,'export':0x0};}function collectTasks(_0x2ce113){const _0x116396=a200_0x39f457;if(!_0x2ce113||typeof _0x2ce113!==_0x116396(0x1ee))return[];if(Array[_0x116396(0x1d0)](_0x2ce113))return _0x2ce113['flatMap'](collectTasks);const _0x36d1de=_0x2ce113,_0x35aac6=[];for(const [_0x13b631,_0x2e2814]of Object[_0x116396(0x1e1)](_0x36d1de)){if(_0x13b631[_0x116396(0x1c8)]('>'))continue;_0x13b631['startsWith']('+')?_0x35aac6[_0x116396(0x1cf)](buildTaskNode(_0x13b631,_0x2e2814)):_0x35aac6[_0x116396(0x1cf)](...collectTasks(_0x2e2814));}return _0x35aac6;}function pickResultTarget(_0x4d9916){const _0x105d1e=a200_0x39f457,_0x5ded32=_0x4d9916[_0x105d1e(0x1d8)];if(typeof _0x5ded32===_0x105d1e(0x1dd)&&_0x5ded32[_0x105d1e(0x1e7)]>0x0)return _0x5ded32;const _0x428236=_0x4d9916[_0x105d1e(0x1d4)];if(typeof _0x428236===_0x105d1e(0x1dd)&&_0x428236[_0x105d1e(0x1e7)]>0x0)return _0x428236;return undefined;}function a200_0x17ae(_0x3c2d2b,_0x466ba2){_0x3c2d2b=_0x3c2d2b-0x1c7;const _0x527413=a200_0x5274();let _0x17ae3f=_0x527413[_0x3c2d2b];return _0x17ae3f;}function buildTaskNode(_0x3505d0,_0x17eeb1){const _0x486006=a200_0x39f457,_0x1506fc={'name':_0x3505d0,'children':[]};if(!_0x17eeb1||typeof _0x17eeb1!=='object')return _0x1506fc;const _0x20e057=_0x17eeb1;for(const [_0x567ba3,_0x4e8327]of Object[_0x486006(0x1e1)](_0x20e057)){if(!_0x567ba3['endsWith']('>'))continue;_0x1506fc[_0x486006(0x1f3)]=_0x567ba3,_0x1506fc[_0x486006(0x1df)]=typeof _0x4e8327===_0x486006(0x1dd)?_0x4e8327:JSON[_0x486006(0x1d1)](_0x4e8327),_0x1506fc[_0x486006(0x1c7)]=OPERATOR_WARNINGS[_0x567ba3];break;}if(_0x1506fc['operator']===_0x486006(0x1ec)||_0x1506fc[_0x486006(0x1f3)]===_0x486006(0x1d7)){const _0x576d45=pickResultTarget(_0x20e057);_0x576d45&&(_0x1506fc['warning']='export',_0x1506fc[_0x486006(0x1f0)]=_0x576d45);}return _0x1506fc[_0x486006(0x1ca)]=collectTasks(_0x20e057),_0x1506fc;}export function parseTaskGraph(_0x1a7b19){return collectTasks(_0x1a7b19);}export function summarizeTaskGraph(_0x1348a9){const _0x3cfc75=emptySummary(),_0x113f17=_0x549178=>{const _0x11cce3=a200_0x17ae;for(const _0x21dfb6 of _0x549178){if(_0x21dfb6[_0x11cce3(0x1c7)])_0x3cfc75[_0x21dfb6[_0x11cce3(0x1c7)]]++;_0x113f17(_0x21dfb6[_0x11cce3(0x1ca)]);}};return _0x113f17(_0x1348a9),_0x3cfc75;}function a200_0x5274(){const _0x76fc1e=['children','2048130bUVWpJ','\x20and\x20','email\x20send','HTTP\x20calls','push','isArray','stringify',',\x20and\x20','mail','result_url','10445lzPQCk','activations','td_for_each>','result_connection','2FfvNix','http','913812ttowdO','4247024aSeOWI','string','⚠️\x20\x20HTTP\x20call','command','HTTP\x20call','entries','15IddGrY','activation','⚠️\x20\x20DATA\x20EXPORT','name','slice','length','⚠️\x20\x20Email\x20send','\x20\x20\x20←\x20','9LMgIOA','4352033Ljwkzg','td>','\x20→\x20','object','baseIndent','warningDetail','44fdOcTk','91083ARuUmi','operator','join','email\x20sends','label','repeat','15617393HoUswJ','warning','endsWith','⚠️\x20\x20This\x20workflow\x20contains\x20'];a200_0x5274=function(){return _0x76fc1e;};return a200_0x5274();}const MAX_COMMAND_LENGTH=0x50;function truncate(_0x16d8d0,_0x2af196){const _0x5721ed=a200_0x39f457;if(_0x16d8d0[_0x5721ed(0x1e7)]<=_0x2af196)return _0x16d8d0;return _0x16d8d0[_0x5721ed(0x1e6)](0x0,Math['max'](0x0,_0x2af196-0x1))+'…';}export function formatTaskGraph(_0x4eb674,_0x3faa73={}){const _0x554adc=a200_0x39f457,_0x10088b=_0x3faa73[_0x554adc(0x1ef)]??0x1,_0x2c387c=[],_0x1c393c=(_0x4f94c3,_0x34488f)=>{const _0x301edf=_0x554adc;for(const _0x1f1b94 of _0x4f94c3){const _0x11e01a='\x20\x20'[_0x301edf(0x1f7)](_0x10088b+_0x34488f);_0x2c387c[_0x301edf(0x1cf)](''+_0x11e01a+_0x1f1b94[_0x301edf(0x1e5)]);if(_0x1f1b94[_0x301edf(0x1f3)]){const _0x391130='\x20\x20'[_0x301edf(0x1f7)](_0x10088b+_0x34488f+0x1),_0x50ffdc=_0x1f1b94['command']?'\x20'+truncate(_0x1f1b94[_0x301edf(0x1df)],MAX_COMMAND_LENGTH):'',_0xf7368f=_0x1f1b94[_0x301edf(0x1c7)]?_0x301edf(0x1e9)+WARNING_META[_0x1f1b94[_0x301edf(0x1c7)]][_0x301edf(0x1f6)]+(_0x1f1b94[_0x301edf(0x1f0)]?_0x301edf(0x1ed)+_0x1f1b94['warningDetail']:''):'';_0x2c387c[_0x301edf(0x1cf)](''+_0x391130+_0x1f1b94[_0x301edf(0x1f3)]+_0x50ffdc+_0xf7368f);}_0x1c393c(_0x1f1b94['children'],_0x34488f+0x1);}};return _0x1c393c(_0x4eb674,0x0),_0x2c387c;}export function formatWarningSummary(_0x4258e1){const _0x5e48cf=a200_0x39f457,_0x270f7a=[];for(const _0x428ac8 of Object['keys'](WARNING_META)){const _0x4b70db=_0x4258e1[_0x428ac8];if(_0x4b70db>0x0){const {singular:_0x381f32,plural:_0x1c8fd0}=WARNING_META[_0x428ac8];_0x270f7a[_0x5e48cf(0x1cf)](_0x4b70db+'\x20'+(_0x4b70db===0x1?_0x381f32:_0x1c8fd0));}}if(_0x270f7a[_0x5e48cf(0x1e7)]===0x0)return null;if(_0x270f7a[_0x5e48cf(0x1e7)]===0x1)return _0x5e48cf(0x1c9)+_0x270f7a[0x0]+'.';if(_0x270f7a['length']===0x2)return _0x5e48cf(0x1c9)+_0x270f7a[0x0]+_0x5e48cf(0x1cc)+_0x270f7a[0x1]+'.';const _0x132e44=_0x270f7a[_0x270f7a[_0x5e48cf(0x1e7)]-0x1];return'⚠️\x20\x20This\x20workflow\x20contains\x20'+_0x270f7a['slice'](0x0,-0x1)[_0x5e48cf(0x1f4)](',\x20')+_0x5e48cf(0x1d2)+_0x132e44+'.';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a201_0x567947=a201_0x5c23;function a201_0x212f(){const _0x1adf33=['utf-8','8ArwuLG','string','12282VXwYWP','dirname','last_pulled_revision','cwd','last_pushed_at','2420scolLl','workflow_project_id','No\x20workflow\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','workflow_project','last_pushed_revision','26428110NFRSHn','1128736GWheNt','last_pulled_at','1900449KPRnCO','Invalid\x20tdx.json:\x20expected\x20object','workflows','7099372fwONqX','4586421RoCJaf','object','parse','651110hishHn','resolve','join','2NCgbKL','stringify'];a201_0x212f=function(){return _0x1adf33;};return a201_0x212f();}(function(_0x3b8d56,_0x2316ba){const _0x103932=a201_0x5c23,_0x1582fe=_0x3b8d56();while(!![]){try{const _0x7ae171=-parseInt(_0x103932(0xea))/0x1*(-parseInt(_0x103932(0xed))/0x2)+-parseInt(_0x103932(0xe7))/0x3+-parseInt(_0x103932(0xe6))/0x4+parseInt(_0x103932(0xf7))/0x5*(parseInt(_0x103932(0xf2))/0x6)+parseInt(_0x103932(0xe1))/0x7+parseInt(_0x103932(0xf0))/0x8*(-parseInt(_0x103932(0xe3))/0x9)+parseInt(_0x103932(0xe0))/0xa;if(_0x7ae171===_0x2316ba)break;else _0x1582fe['push'](_0x1582fe['shift']());}catch(_0x357a35){_0x1582fe['push'](_0x1582fe['shift']());}}}(a201_0x212f,0xe3522));import{existsSync,readFileSync,writeFileSync}from'fs';import a201_0x18d23c from'path';const TDX_CONFIG_FILE='tdx.json',WORKFLOWS_DIR=a201_0x567947(0xe5);export function findWorkflowTdxConfigPath(_0x4e717e=process[a201_0x567947(0xf5)]()){const _0x246466=a201_0x567947;let _0x446509=a201_0x18d23c[_0x246466(0xeb)](_0x4e717e);const _0x286e84=a201_0x18d23c[_0x246466(0xe9)](_0x446509)['root'];while(_0x446509!==_0x286e84){const _0x1013ad=a201_0x18d23c[_0x246466(0xec)](_0x446509,TDX_CONFIG_FILE);if(existsSync(_0x1013ad))try{const _0x22b4cd=readFileSync(_0x1013ad,_0x246466(0xef)),_0x954bc8=JSON['parse'](_0x22b4cd);if(_0x954bc8&&typeof _0x954bc8===_0x246466(0xe8)&&_0x246466(0xfa)in _0x954bc8)return _0x1013ad;}catch{}_0x446509=a201_0x18d23c['dirname'](_0x446509);}return null;}export function loadWorkflowTdxConfig(_0x13269a){const _0x388b23=a201_0x567947,_0x361053=readFileSync(_0x13269a,_0x388b23(0xef));let _0x211658;try{_0x211658=JSON[_0x388b23(0xe9)](_0x361053);}catch{throw new Error('Invalid\x20JSON\x20in\x20'+_0x13269a);}if(!_0x211658||typeof _0x211658!=='object')throw new Error(_0x388b23(0xe4));const _0x5664aa=_0x211658;if(!_0x5664aa[_0x388b23(0xfa)]||typeof _0x5664aa['workflow_project']!=='string')throw new Error('Invalid\x20tdx.json:\x20missing\x20or\x20invalid\x20\x27workflow_project\x27\x20field');return{'workflow_project':_0x5664aa[_0x388b23(0xfa)],'workflow_project_id':typeof _0x5664aa[_0x388b23(0xf8)]===_0x388b23(0xf1)?_0x5664aa[_0x388b23(0xf8)]:undefined,'last_pulled_revision':typeof _0x5664aa['last_pulled_revision']===_0x388b23(0xf1)?_0x5664aa[_0x388b23(0xf4)]:undefined,'last_pulled_at':typeof _0x5664aa[_0x388b23(0xe2)]===_0x388b23(0xf1)?_0x5664aa['last_pulled_at']:undefined,'last_pushed_revision':typeof _0x5664aa[_0x388b23(0xfb)]==='string'?_0x5664aa[_0x388b23(0xfb)]:undefined,'last_pushed_at':typeof _0x5664aa[_0x388b23(0xf6)]===_0x388b23(0xf1)?_0x5664aa[_0x388b23(0xf6)]:undefined};}export function findWorkflowTdxConfig(_0x4cd6e3=process[a201_0x567947(0xf5)]()){const _0x573a9a=a201_0x567947,_0x4bb444=findWorkflowTdxConfigPath(_0x4cd6e3);if(!_0x4bb444)throw new Error(_0x573a9a(0xf9));const _0x328817=loadWorkflowTdxConfig(_0x4bb444),_0x2572b4=a201_0x18d23c[_0x573a9a(0xf3)](_0x4bb444);return{'config':_0x328817,'configPath':_0x4bb444,'configDir':_0x2572b4};}export function tryFindWorkflowTdxConfig(_0x12abdf){try{return findWorkflowTdxConfig(_0x12abdf);}catch{return null;}}export function getWorkflowProjectDir(_0x375136,_0x5cde7c=process['cwd']()){const _0x8db71a=a201_0x567947;return a201_0x18d23c[_0x8db71a(0xec)](_0x5cde7c,WORKFLOWS_DIR,_0x375136);}export function getWorkflowTdxConfigPath(_0x410221,_0x4277f8=process[a201_0x567947(0xf5)]()){const _0x35be6c=a201_0x567947;return a201_0x18d23c[_0x35be6c(0xec)](getWorkflowProjectDir(_0x410221,_0x4277f8),TDX_CONFIG_FILE);}function a201_0x5c23(_0x1cbe01,_0x1e9334){_0x1cbe01=_0x1cbe01-0xe0;const _0x212f0c=a201_0x212f();let _0x5c23a0=_0x212f0c[_0x1cbe01];return _0x5c23a0;}export function createWorkflowTdxConfigContent(_0x25a4b6,_0x22d371,_0x31482b){const _0x433d33=a201_0x567947,_0x14cae0={'workflow_project':_0x25a4b6,..._0x22d371&&{'workflow_project_id':_0x22d371},..._0x31482b&&{'last_pulled_revision':_0x31482b},'last_pulled_at':new Date()['toISOString']()};return JSON[_0x433d33(0xee)](_0x14cae0,null,0x2)+'\x0a';}export function saveWorkflowTdxConfig(_0x457c37,_0x466689){const _0xfac971=JSON['stringify'](_0x466689,null,0x2)+'\x0a';writeFileSync(_0x457c37,_0xfac971,'utf-8');}export function updateWorkflowTdxConfig(_0x1ffd34,_0x5aad37){const _0x36875b=loadWorkflowTdxConfig(_0x1ffd34),_0x48e977={..._0x36875b,..._0x5aad37};saveWorkflowTdxConfig(_0x1ffd34,_0x48e977);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a202_0x54c125=a202_0x1006;(function(_0x394209,_0x1df4c3){const _0x552ab6=a202_0x1006,_0x3f1da1=_0x394209();while(!![]){try{const _0x25a816=-parseInt(_0x552ab6(0x1d9))/0x1*(-parseInt(_0x552ab6(0x1d8))/0x2)+-parseInt(_0x552ab6(0x1d4))/0x3*(parseInt(_0x552ab6(0x1e0))/0x4)+-parseInt(_0x552ab6(0x1c6))/0x5+-parseInt(_0x552ab6(0x1df))/0x6+parseInt(_0x552ab6(0x1c9))/0x7*(-parseInt(_0x552ab6(0x1d1))/0x8)+parseInt(_0x552ab6(0x1c4))/0x9*(parseInt(_0x552ab6(0x1e1))/0xa)+parseInt(_0x552ab6(0x1de))/0xb;if(_0x25a816===_0x1df4c3)break;else _0x3f1da1['push'](_0x3f1da1['shift']());}catch(_0x139080){_0x3f1da1['push'](_0x3f1da1['shift']());}}}(a202_0x3b53,0xbea72));import{promises as a202_0xbfcf69}from'fs';import a202_0xcdb856 from'path';import a202_0x3f3824 from'ignore';function a202_0x3b53(){const _0x159de3=['117thdvLP','ignores','5318760fEjviJ','startsWith','filter','2604xzwzjG','add','split','.dig','utf-8','.digdagignore','ENOENT','readFile','9904aoTsxF','replace','code','1054488RZQWld','trim','length','join','199370aYvbhC','13hEujaI','Thumbs.db','map','endsWith','.DS_Store','22225995wouxRz','5087838UEUfjp','16rubStt','955930WELXLn','.digdag'];a202_0x3b53=function(){return _0x159de3;};return a202_0x3b53();}export const WORKFLOW_FILE_EXTENSION=a202_0x54c125(0x1cc);function a202_0x1006(_0x5b75ae,_0x59ca4){_0x5b75ae=_0x5b75ae-0x1c4;const _0x3b5338=a202_0x3b53();let _0x10060a=_0x3b5338[_0x5b75ae];return _0x10060a;}export function shouldIncludeInArchive(_0x1b3030){const _0x4edc33=a202_0x54c125;if(_0x1b3030===_0x4edc33(0x1e2))return!![];if(_0x1b3030[_0x4edc33(0x1c7)]('.'))return![];if(_0x1b3030[_0x4edc33(0x1dc)]('~'))return![];if(_0x1b3030===_0x4edc33(0x1da)||_0x1b3030===_0x4edc33(0x1dd))return![];return!![];}export function parseDigdagignore(_0x48c339){const _0x1d82ec=a202_0x54c125;return _0x48c339[_0x1d82ec(0x1cb)]('\x0a')[_0x1d82ec(0x1db)](_0x449eb6=>_0x449eb6[_0x1d82ec(0x1d5)]())[_0x1d82ec(0x1c8)](_0x471869=>_0x471869[_0x1d82ec(0x1d6)]>0x0&&!_0x471869[_0x1d82ec(0x1c7)]('#'));}export async function loadDigdagignore(_0x1595a9){const _0x497528=a202_0x54c125,_0x25d817=a202_0xcdb856[_0x497528(0x1d7)](_0x1595a9,_0x497528(0x1ce));try{const _0x216090=await a202_0xbfcf69[_0x497528(0x1d0)](_0x25d817,_0x497528(0x1cd));return parseDigdagignore(_0x216090);}catch(_0x280186){if(_0x280186[_0x497528(0x1d3)]===_0x497528(0x1cf))return null;throw _0x280186;}}export function createIgnoreInstance(_0x204a2d){const _0x54afb6=a202_0x54c125,_0x387aff=a202_0x3f3824();return _0x204a2d&&_0x204a2d[_0x54afb6(0x1d6)]>0x0&&_0x387aff[_0x54afb6(0x1ca)](_0x204a2d),_0x387aff;}export function addScopedPatterns(_0x5e4c1f,_0x148743,_0x191f96){const _0x25cee5=_0x148743['map'](_0x1fede2=>{const _0x59af2b=a202_0x1006;if(_0x1fede2[_0x59af2b(0x1c7)]('!')){const _0x309f33=_0x1fede2['slice'](0x1);if(_0x309f33[_0x59af2b(0x1c7)]('/'))return'!'+_0x191f96+_0x309f33;return'!'+_0x191f96+'/'+_0x309f33;}if(_0x1fede2[_0x59af2b(0x1c7)]('/'))return''+_0x191f96+_0x1fede2;return _0x191f96+'/'+_0x1fede2;});return _0x5e4c1f['add'](_0x25cee5),_0x5e4c1f;}export function shouldIgnoreWithInstance(_0x5dd986,_0x4540c8,_0x10155b){const _0xc1b1a0=a202_0x54c125,_0x48c402=_0x4540c8[_0xc1b1a0(0x1d2)](/\\/g,'/'),_0x1a0f32=_0x10155b?_0x48c402+'/':_0x48c402;return _0x5dd986[_0xc1b1a0(0x1c5)](_0x1a0f32);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a203_0x57840a=a203_0x14b4;function a203_0x14b4(_0x1f852e,_0x3ae137){_0x1f852e=_0x1f852e-0x1a5;const _0x2650dc=a203_0x2650();let _0x14b492=_0x2650dc[_0x1f852e];return _0x14b492;}(function(_0x137a01,_0x1e7849){const _0x2479db=a203_0x14b4,_0x3f0d08=_0x137a01();while(!![]){try{const _0x4fd049=-parseInt(_0x2479db(0x1ae))/0x1+parseInt(_0x2479db(0x1a9))/0x2+parseInt(_0x2479db(0x1b6))/0x3+-parseInt(_0x2479db(0x1ab))/0x4+parseInt(_0x2479db(0x1a7))/0x5+parseInt(_0x2479db(0x1ac))/0x6+-parseInt(_0x2479db(0x1a6))/0x7;if(_0x4fd049===_0x1e7849)break;else _0x3f0d08['push'](_0x3f0d08['shift']());}catch(_0x70fdce){_0x3f0d08['push'](_0x3f0d08['shift']());}}}(a203_0x2650,0x8e229));import*as a203_0x2cd35d from'node:fs';import{join,resolve}from'node:path';import{getGlobalCacheDir}from'../../utils/global-cache.js';function a203_0x2650(){const _0x1a945b=['logs','parse','get','slice','sort','path','343524jeHrRG','work','map','access.jsonl','set','5366291gaYwCz','4446240hXkfSC','stringify','831246hFcohR','entries','1070652Rhgqpe','4913418RrzChr','utf-8','621821uaeNGW','appendFileSync'];a203_0x2650=function(){return _0x1a945b;};return a203_0x2650();}const LOG_FILE=join(a203_0x57840a(0x1b7),a203_0x57840a(0x1b0),a203_0x57840a(0x1b9));function getLogPath(){return join(getGlobalCacheDir(),LOG_FILE);}export function logAccess(_0x443e97,_0x677b91){const _0x227add=a203_0x57840a,_0x23b154=getLogPath();a203_0x2cd35d['mkdirSync'](join(_0x23b154,'..'),{'recursive':!![]});const _0x321d5f={'ts':Date['now'](),'ws':resolve(_0x443e97),'path':_0x677b91};a203_0x2cd35d[_0x227add(0x1af)](_0x23b154,JSON[_0x227add(0x1a8)](_0x321d5f)+'\x0a');}export function getRecentDocuments(_0x14e9b3,_0x6cd11b=0x14){const _0x22122a=a203_0x57840a,_0x553df0=getLastAccessedMap(_0x14e9b3);return[..._0x553df0[_0x22122a(0x1aa)]()][_0x22122a(0x1b4)]((_0x4db0f6,_0x108052)=>_0x108052[0x1]-_0x4db0f6[0x1])[_0x22122a(0x1b3)](0x0,_0x6cd11b)[_0x22122a(0x1b8)](([_0x2775aa])=>_0x2775aa);}export function getLastAccessedMap(_0x9f7a5){const _0x4bdf71=a203_0x57840a,_0x5857fd=resolve(_0x9f7a5),_0x2aa662=new Map();let _0x5984d8;try{_0x5984d8=a203_0x2cd35d['readFileSync'](getLogPath(),_0x4bdf71(0x1ad));}catch{return _0x2aa662;}for(const _0x22b00e of _0x5984d8['split']('\x0a')){if(!_0x22b00e)continue;try{const _0x16d264=JSON[_0x4bdf71(0x1b1)](_0x22b00e);if(_0x16d264['ws']!==_0x5857fd)continue;const _0x37dad8=_0x2aa662[_0x4bdf71(0x1b2)](_0x16d264[_0x4bdf71(0x1b5)]);if(!_0x37dad8||_0x16d264['ts']>_0x37dad8)_0x2aa662[_0x4bdf71(0x1a5)](_0x16d264[_0x4bdf71(0x1b5)],_0x16d264['ts']);}catch{}}return _0x2aa662;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1c922d,_0x1fa42c){const _0x22e0fd=a204_0x4a7f,_0x371a4f=_0x1c922d();while(!![]){try{const _0x4066c9=parseInt(_0x22e0fd(0xdd))/0x1+parseInt(_0x22e0fd(0xe2))/0x2+parseInt(_0x22e0fd(0xd6))/0x3+parseInt(_0x22e0fd(0xd5))/0x4+-parseInt(_0x22e0fd(0xc5))/0x5*(-parseInt(_0x22e0fd(0xd3))/0x6)+-parseInt(_0x22e0fd(0xcd))/0x7*(-parseInt(_0x22e0fd(0xd4))/0x8)+-parseInt(_0x22e0fd(0xd0))/0x9;if(_0x4066c9===_0x1fa42c)break;else _0x371a4f['push'](_0x371a4f['shift']());}catch(_0x1ad9d3){_0x371a4f['push'](_0x371a4f['shift']());}}}(a204_0x54dd,0x53319));export function parseFrontmatter(_0x3ba2ba){const _0x57fff8=a204_0x4a7f,_0x2d91d4=_0x3ba2ba[_0x57fff8(0xc4)](/^---\s*\n([\s\S]*?)\n---\s*\n?([\s\S]*)$/);if(!_0x2d91d4)return{'frontmatter':{},'body':_0x3ba2ba[_0x57fff8(0xce)]()};const _0x189799=_0x2d91d4[0x1],_0x50075b=_0x2d91d4[0x2][_0x57fff8(0xce)](),_0x57251b=parseSimpleYaml(_0x189799);return{'frontmatter':_0x57251b,'body':_0x50075b};}export function serializeFrontmatter(_0x18168c,_0x382a5a){const _0x47658a=a204_0x4a7f,_0x17b686=[];for(const [_0x12185e,_0x22d7a6]of Object[_0x47658a(0xd1)](_0x18168c)){if(_0x22d7a6===undefined||_0x22d7a6===null)continue;if(Array[_0x47658a(0xde)](_0x22d7a6))_0x22d7a6[_0x47658a(0xcc)]===0x0?_0x17b686['push'](_0x12185e+_0x47658a(0xe1)):_0x17b686[_0x47658a(0xc8)](_0x12185e+_0x47658a(0xc7)+_0x22d7a6[_0x47658a(0xcf)](_0x2bdda1=>formatYamlValue(String(_0x2bdda1)))[_0x47658a(0xd7)](',\x20')+']');else{if(typeof _0x22d7a6==='boolean')_0x17b686['push'](_0x12185e+':\x20'+_0x22d7a6);else typeof _0x22d7a6===_0x47658a(0xda)?_0x17b686[_0x47658a(0xc8)](_0x12185e+':\x20'+_0x22d7a6):_0x17b686['push'](_0x12185e+':\x20'+formatYamlValue(String(_0x22d7a6)));}}const _0xfd1d87=_0x17b686[_0x47658a(0xd7)]('\x0a');return _0x47658a(0xd9)+_0xfd1d87+_0x47658a(0xca)+_0x382a5a+'\x0a';}function a204_0x4a7f(_0x12afc1,_0x5ad151){_0x12afc1=_0x12afc1-0xc3;const _0x54dd60=a204_0x54dd();let _0x4a7fd8=_0x54dd60[_0x12afc1];return _0x4a7fd8;}function formatYamlValue(_0x274197){const _0x47fbac=a204_0x4a7f;if(_0x274197[_0x47fbac(0xdc)](':')||_0x274197['includes']('#')||_0x274197[_0x47fbac(0xdc)]('\x27')||_0x274197[_0x47fbac(0xdc)]('\x22')||_0x274197['includes']('\x0a')||_0x274197[_0x47fbac(0xc6)]('\x20')||_0x274197[_0x47fbac(0xdb)]('\x20'))return'\x22'+_0x274197[_0x47fbac(0xc9)](/\\/g,'\x5c\x5c')['replace'](/"/g,'\x5c\x22')+'\x22';return _0x274197;}function parseSimpleYaml(_0xa81ef9){const _0x1353b0=a204_0x4a7f,_0x1b1102={},_0x16f0d8=_0xa81ef9[_0x1353b0(0xdf)]('\x0a');for(const _0x552038 of _0x16f0d8){const _0x56b701=_0x552038[_0x1353b0(0xce)]();if(!_0x56b701||_0x56b701['startsWith']('#'))continue;const _0x314616=_0x56b701[_0x1353b0(0xd2)](':');if(_0x314616===-0x1)continue;const _0x5629a2=_0x56b701['slice'](0x0,_0x314616)[_0x1353b0(0xce)]();let _0x572da4=_0x56b701['slice'](_0x314616+0x1)[_0x1353b0(0xce)]();const _0x4f7a4e=_0x572da4[_0x1353b0(0xd2)]('\x20#');_0x4f7a4e!==-0x1&&!_0x572da4[_0x1353b0(0xc6)]('\x22')&&!_0x572da4[_0x1353b0(0xc6)]('\x27')&&(_0x572da4=_0x572da4['slice'](0x0,_0x4f7a4e)['trim']()),_0x1b1102[_0x5629a2]=parseYamlValue(_0x572da4);}return _0x1b1102;}function a204_0x54dd(){const _0x4c4184=[':\x20[]','70838KzsvVc','true','match','15QiQfns','startsWith',':\x20[','push','replace','\x0a---\x0a\x0a','slice','length','144263jwpAEH','trim','map','11441205iRRHFI','entries','indexOf','334770TXFoUg','136gvaybZ','757920cteqZX','985008MXVGHL','join','test','---\x0a','number','endsWith','includes','541033peJSKn','isArray','split','false'];a204_0x54dd=function(){return _0x4c4184;};return a204_0x54dd();}function parseYamlValue(_0x30cfa4){const _0xe3999b=a204_0x4a7f;if(!_0x30cfa4||_0x30cfa4==='~'||_0x30cfa4==='null')return null;if(_0x30cfa4===_0xe3999b(0xc3))return!![];if(_0x30cfa4===_0xe3999b(0xe0))return![];if(_0x30cfa4[_0xe3999b(0xc6)]('[')&&_0x30cfa4[_0xe3999b(0xdb)](']')){const _0x1b462e=_0x30cfa4['slice'](0x1,-0x1)[_0xe3999b(0xce)]();if(!_0x1b462e)return[];return _0x1b462e['split'](',')['map'](_0x418493=>{const _0x41950e=_0xe3999b,_0x24fb82=_0x418493[_0x41950e(0xce)]();return parseYamlScalar(_0x24fb82);});}if(_0x30cfa4[_0xe3999b(0xc6)]('\x22')&&_0x30cfa4[_0xe3999b(0xdb)]('\x22'))return _0x30cfa4[_0xe3999b(0xcb)](0x1,-0x1)[_0xe3999b(0xc9)](/\\"/g,'\x22')['replace'](/\\\\/g,'\x5c');if(_0x30cfa4[_0xe3999b(0xc6)]('\x27')&&_0x30cfa4[_0xe3999b(0xdb)]('\x27'))return _0x30cfa4[_0xe3999b(0xcb)](0x1,-0x1);if(/^-?\d+(\.\d+)?$/[_0xe3999b(0xd8)](_0x30cfa4))return Number(_0x30cfa4);return _0x30cfa4;}function parseYamlScalar(_0x45da16){const _0x16609d=a204_0x4a7f;if(_0x45da16[_0x16609d(0xc6)]('\x22')&&_0x45da16[_0x16609d(0xdb)]('\x22'))return _0x45da16[_0x16609d(0xcb)](0x1,-0x1)[_0x16609d(0xc9)](/\\"/g,'\x22')[_0x16609d(0xc9)](/\\\\/g,'\x5c');if(_0x45da16[_0x16609d(0xc6)]('\x27')&&_0x45da16[_0x16609d(0xdb)]('\x27'))return _0x45da16['slice'](0x1,-0x1);if(_0x45da16===_0x16609d(0xc3))return!![];if(_0x45da16===_0x16609d(0xe0))return![];if(/^-?\d+(\.\d+)?$/[_0x16609d(0xd8)](_0x45da16))return Number(_0x45da16);return _0x45da16;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a205_0x472822=a205_0x181e;function a205_0x23f0(){const _0x2b6553=['stdout','remote','296zASQsN','protocol','writeFileSync','pendingMessage','replaceAll','config','relative','split','commitStaged','149096bIppkT','rev-parse','from','3842965FMPryG','password','remove','hasRemote','7274840qmaNZU','624230vJjvdb','utf-8','--git-dir','getCurrentBranch','3LVqBdz','removeRemote','isRepo','toString','--pretty=format:%H|%aI|%s','commit','getRemoteUrl','1583122aofebI','size','message','batchMs','x-access-token','#\x20Session\x20artifacts\x0achat-*/\x0a\x0a#\x20Cache\x20(access\x20log,\x20etc.)\x0a.cache/\x0a\x0a#\x20OS\x20files\x0a.DS_Store\x0a','main','workspacePath','5cYOPFO','--porcelain','username','--quiet','--cached','pendingFiles','pipe','push','branch','trim','log','authedRemoteUrl','flush','29556mHrQmJ','set-url','cachedIsRepo','map','gitWithTokenRedacted','ensureRepo','existsSync','commitAll','pull','add','join','string','git','init','batchTimer','stderr','5606058WekCxR','setRemote','origin','***','.git'];a205_0x23f0=function(){return _0x2b6553;};return a205_0x23f0();}(function(_0x3d6834,_0x15949f){const _0xe04859=a205_0x181e,_0x198653=_0x3d6834();while(!![]){try{const _0x13226e=parseInt(_0xe04859(0x1f4))/0x1+-parseInt(_0xe04859(0x1ff))/0x2+parseInt(_0xe04859(0x1f8))/0x3*(parseInt(_0xe04859(0x1ec))/0x4)+-parseInt(_0xe04859(0x1bf))/0x5*(-parseInt(_0xe04859(0x1dc))/0x6)+parseInt(_0xe04859(0x1ef))/0x7+parseInt(_0xe04859(0x1e3))/0x8*(-parseInt(_0xe04859(0x1cc))/0x9)+-parseInt(_0xe04859(0x1f3))/0xa;if(_0x13226e===_0x15949f)break;else _0x198653['push'](_0x198653['shift']());}catch(_0x1f02d5){_0x198653['push'](_0x198653['shift']());}}}(a205_0x23f0,0x7b1e1));import{execFileSync}from'node:child_process';import*as a205_0x292403 from'node:fs';import*as a205_0x178415 from'node:path';export const WORKSPACE_GITIGNORE=a205_0x472822(0x1bc);function a205_0x181e(_0x54a13d,_0x213c48){_0x54a13d=_0x54a13d-0x1ba;const _0x23f0bd=a205_0x23f0();let _0x181eea=_0x23f0bd[_0x54a13d];return _0x181eea;}const DEFAULT_CONFIG={'autoCommit':!![],'batchMs':0x7d0};export class WorkspaceGit{[a205_0x472822(0x1be)];['config'];[a205_0x472822(0x1da)]=null;[a205_0x472822(0x1c4)]=new Set();[a205_0x472822(0x1e6)]=null;[a205_0x472822(0x1ce)]=null;constructor(_0x417ec6,_0x283ab4){const _0x436b53=a205_0x472822;this[_0x436b53(0x1be)]=_0x417ec6,this['config']={...DEFAULT_CONFIG,..._0x283ab4};}[a205_0x472822(0x1d1)](){const _0x538fbc=a205_0x472822,_0x4c4a87=a205_0x178415['join'](this[_0x538fbc(0x1be)],_0x538fbc(0x1e0));!a205_0x292403[_0x538fbc(0x1d2)](_0x4c4a87)&&(this[_0x538fbc(0x1d8)](_0x538fbc(0x1d9)),this[_0x538fbc(0x1ce)]=!![]);const _0x341c33=a205_0x178415[_0x538fbc(0x1d6)](this['workspacePath'],'.gitignore');!a205_0x292403[_0x538fbc(0x1d2)](_0x341c33)&&a205_0x292403[_0x538fbc(0x1e5)](_0x341c33,WORKSPACE_GITIGNORE,_0x538fbc(0x1f5));}[a205_0x472822(0x1fa)](){const _0x5a4aeb=a205_0x472822;if(this[_0x5a4aeb(0x1ce)]!==null)return this['cachedIsRepo'];try{this[_0x5a4aeb(0x1d8)](_0x5a4aeb(0x1ed),_0x5a4aeb(0x1f6)),this[_0x5a4aeb(0x1ce)]=!![];}catch{this[_0x5a4aeb(0x1ce)]=![];}return this[_0x5a4aeb(0x1ce)];}['commit'](_0x1ed1ae,_0x48f310){const _0xd6e122=a205_0x472822;if(!this[_0xd6e122(0x1e8)]['autoCommit'])return;if(!this[_0xd6e122(0x1fa)]())return;const _0x4e0388=a205_0x178415[_0xd6e122(0x1e9)](this['workspacePath'],_0x1ed1ae);this['pendingFiles'][_0xd6e122(0x1d5)](_0x4e0388),this[_0xd6e122(0x1e6)]=_0x48f310,this['batchTimer']&&clearTimeout(this[_0xd6e122(0x1da)]),this[_0xd6e122(0x1e8)][_0xd6e122(0x1ba)]===0x0?this['flush']():this[_0xd6e122(0x1da)]=setTimeout(()=>this[_0xd6e122(0x1cb)](),this[_0xd6e122(0x1e8)][_0xd6e122(0x1ba)]);}[a205_0x472822(0x1cb)](){const _0x34f392=a205_0x472822;if(this[_0x34f392(0x1c4)][_0x34f392(0x200)]===0x0)return;const _0x31f99c=Array[_0x34f392(0x1ee)](this[_0x34f392(0x1c4)]),_0x4de31=this[_0x34f392(0x1e6)]||'work:\x20update';this['pendingFiles']['clear'](),this[_0x34f392(0x1e6)]=null;this['batchTimer']&&(clearTimeout(this[_0x34f392(0x1da)]),this[_0x34f392(0x1da)]=null);try{this[_0x34f392(0x1d8)]('add','--',..._0x31f99c);}catch{return;}this[_0x34f392(0x1eb)](_0x4de31);}[a205_0x472822(0x1d3)](_0x2402e1){const _0x4bdde7=a205_0x472822;if(!this['config']['autoCommit'])return;if(!this['hasDirtyFiles']())return;try{this[_0x4bdde7(0x1d8)](_0x4bdde7(0x1d5),'-A');}catch{return;}this[_0x4bdde7(0x1eb)](_0x2402e1);}['hasDirtyFiles'](){const _0x28c22e=a205_0x472822;if(!this[_0x28c22e(0x1fa)]())return![];try{const _0x5a4081=this[_0x28c22e(0x1d8)]('status',_0x28c22e(0x1c0));return _0x5a4081[_0x28c22e(0x1c8)]()['length']>0x0;}catch{return![];}}['fileHistory'](_0x257547,_0x23fa99=0xa){const _0x2f8998=a205_0x472822;if(!this[_0x2f8998(0x1fa)]())return[];const _0x37df13=a205_0x178415['relative'](this[_0x2f8998(0x1be)],_0x257547);try{const _0x2a99e8=this['git'](_0x2f8998(0x1c9),_0x2f8998(0x1fc),'-n',String(_0x23fa99),'--',_0x37df13);if(!_0x2a99e8[_0x2f8998(0x1c8)]())return[];return _0x2a99e8[_0x2f8998(0x1c8)]()['split']('\x0a')[_0x2f8998(0x1cf)](_0xba8d6a=>{const _0x54747c=_0x2f8998,[_0x2ac024,_0x2d3b59,..._0x2dcd16]=_0xba8d6a[_0x54747c(0x1ea)]('|');return{'hash':_0x2ac024,'date':_0x2d3b59,'message':_0x2dcd16[_0x54747c(0x1d6)]('|')};});}catch{return[];}}[a205_0x472822(0x1eb)](_0x175d38){const _0x4ac104=a205_0x472822;try{try{this[_0x4ac104(0x1d8)]('diff',_0x4ac104(0x1c3),_0x4ac104(0x1c2));return;}catch{}this[_0x4ac104(0x1d8)](_0x4ac104(0x1fd),'-m',_0x175d38);}catch{}}[a205_0x472822(0x1fe)](_0x36eed6=a205_0x472822(0x1de)){const _0x17f376=a205_0x472822;if(!this[_0x17f376(0x1fa)]())return null;try{return this[_0x17f376(0x1d8)](_0x17f376(0x1e2),'get-url',_0x36eed6)[_0x17f376(0x1c8)]()||null;}catch{return null;}}[a205_0x472822(0x1f2)](_0x1094a9='origin'){const _0x4c4aac=a205_0x472822;return this[_0x4c4aac(0x1fe)](_0x1094a9)!==null;}[a205_0x472822(0x1dd)](_0x3155f2,_0x4275f6=a205_0x472822(0x1de)){const _0x271315=a205_0x472822;!this['isRepo']()&&this[_0x271315(0x1d1)](),this[_0x271315(0x1fe)](_0x4275f6)!==null?this['git']('remote',_0x271315(0x1cd),_0x4275f6,_0x3155f2):this[_0x271315(0x1d8)](_0x271315(0x1e2),_0x271315(0x1d5),_0x4275f6,_0x3155f2);}[a205_0x472822(0x1f9)](_0x1cd018=a205_0x472822(0x1de)){const _0x1127c2=a205_0x472822;if(!this[_0x1127c2(0x1fa)]())return;if(this[_0x1127c2(0x1fe)](_0x1cd018)===null)return;this[_0x1127c2(0x1d8)]('remote',_0x1127c2(0x1f1),_0x1cd018);}[a205_0x472822(0x1f7)](){const _0x503bef=a205_0x472822;if(!this['isRepo']())return _0x503bef(0x1bd);try{return this['git']('rev-parse','--abbrev-ref','HEAD')['trim']()||'main';}catch{return _0x503bef(0x1bd);}}[a205_0x472822(0x1c6)](_0xe86475){const _0x56ea7b=a205_0x472822,{remote:remote=_0x56ea7b(0x1de),token:_0x2d4ed4}=_0xe86475??{},_0x10c4a0=_0xe86475?.[_0x56ea7b(0x1c7)]||this[_0x56ea7b(0x1f7)]();if(_0x2d4ed4){const _0x200bfc=this[_0x56ea7b(0x1ca)](remote,_0x2d4ed4);if(_0x200bfc)return this[_0x56ea7b(0x1d0)](_0x56ea7b(0x1c6),_0x2d4ed4,'-u',_0x200bfc,_0x10c4a0);}return this['git']('push','-u',remote,_0x10c4a0);}[a205_0x472822(0x1d4)](_0x405a69){const _0x5a0d03=a205_0x472822,{remote:remote='origin',token:_0x4de609}=_0x405a69??{},_0x4728d0=_0x405a69?.['branch']||this[_0x5a0d03(0x1f7)]();if(_0x4de609){const _0x4969fd=this[_0x5a0d03(0x1ca)](remote,_0x4de609);if(_0x4969fd)return this[_0x5a0d03(0x1d0)]('pull',_0x4de609,_0x4969fd,_0x4728d0);}return this[_0x5a0d03(0x1d8)](_0x5a0d03(0x1d4),remote,_0x4728d0);}[a205_0x472822(0x1ca)](_0x4524b5,_0x2fabdd){const _0x48170b=a205_0x472822,_0x43f0e7=this['getRemoteUrl'](_0x4524b5);if(!_0x43f0e7)return null;try{const _0x2cdbf0=new URL(_0x43f0e7);if(_0x2cdbf0[_0x48170b(0x1e4)]!=='https:')return null;return _0x2cdbf0[_0x48170b(0x1c1)]=_0x48170b(0x1bb),_0x2cdbf0[_0x48170b(0x1f0)]=_0x2fabdd,_0x2cdbf0[_0x48170b(0x1fb)]();}catch{return null;}}[a205_0x472822(0x1d8)](..._0x283a84){const _0x325332=a205_0x472822;return execFileSync(_0x325332(0x1d8),_0x283a84,{'cwd':this['workspacePath'],'encoding':_0x325332(0x1f5),'stdio':['pipe',_0x325332(0x1c5),_0x325332(0x1c5)]});}[a205_0x472822(0x1d0)](_0x1e73ec,_0x52b2c0,..._0x197a40){const _0x3fdf2d=a205_0x472822;try{return this[_0x3fdf2d(0x1d8)](_0x1e73ec,..._0x197a40);}catch(_0x3ce4a0){if(_0x3ce4a0 instanceof Error){const _0x2f47d9=_0x473ca3=>_0x473ca3[_0x3fdf2d(0x1e7)](_0x52b2c0,_0x3fdf2d(0x1df));_0x3ce4a0[_0x3fdf2d(0x201)]=_0x2f47d9(_0x3ce4a0[_0x3fdf2d(0x201)]);const _0xc7558e=_0x3ce4a0;if(typeof _0xc7558e['stderr']===_0x3fdf2d(0x1d7))_0xc7558e[_0x3fdf2d(0x1db)]=_0x2f47d9(_0xc7558e[_0x3fdf2d(0x1db)]);if(typeof _0xc7558e[_0x3fdf2d(0x1e1)]===_0x3fdf2d(0x1d7))_0xc7558e[_0x3fdf2d(0x1e1)]=_0x2f47d9(_0xc7558e[_0x3fdf2d(0x1e1)]);}throw _0x3ce4a0;}}}
|