@treasuredata/tdx 2026.3.53 → 2026.3.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/tools/work-create-item.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a192_0x32f324=a192_0x2f9a;(function(_0x17e75d,_0x3cb34a){const _0x234606=a192_0x2f9a,_0x2bce79=_0x17e75d();while(!![]){try{const _0x9cf056=parseInt(_0x234606(0x112))/0x1*(parseInt(_0x234606(0x164))/0x2)+parseInt(_0x234606(0x13e))/0x3*(parseInt(_0x234606(0x107))/0x4)+-parseInt(_0x234606(0x12e))/0x5*(parseInt(_0x234606(0x13a))/0x6)+-parseInt(_0x234606(0x12c))/0x7+parseInt(_0x234606(0x12a))/0x8*(-parseInt(_0x234606(0x154))/0x9)+-parseInt(_0x234606(0x126))/0xa*(parseInt(_0x234606(0x134))/0xb)+parseInt(_0x234606(0x108))/0xc;if(_0x9cf056===_0x3cb34a)break;else _0x2bce79['push'](_0x2bce79['shift']());}catch(_0x2659a1){_0x2bce79['push'](_0x2bce79['shift']());}}}(a192_0x50a0,0xf1000));import{WorkflowApiClient}from'../client/workflow-client.js';import{SDKError,ErrorCode}from'../errors.js';import{MAX_PAGINATION_LIMIT}from'../util/paginate.js';function a192_0x2f9a(_0xef56b8,_0x2448c){_0xef56b8=_0xef56b8-0xea;const _0x50a06d=a192_0x50a0();let _0x2f9ab3=_0x50a06d[_0xef56b8];return _0x2f9ab3;}async function paginateResults(_0x41e014,_0x29b16b,_0x467d53=0x64){const _0x26f6dd=a192_0x2f9a,_0x15538b=Math[_0x26f6dd(0xf9)](_0x29b16b,MAX_PAGINATION_LIMIT),_0x2ae986=[];let _0x501bf5;while(_0x2ae986[_0x26f6dd(0x113)]<_0x15538b){const _0x563722=await _0x41e014(_0x467d53,_0x501bf5),_0x4900cb=_0x563722['rawCount']??_0x563722['data'][_0x26f6dd(0x113)];if(_0x4900cb===0x0)break;_0x2ae986['push'](..._0x563722[_0x26f6dd(0x153)]);if(!_0x563722['lastId']||_0x4900cb<_0x467d53)break;_0x501bf5=_0x563722['lastId'];}return _0x2ae986['slice'](0x0,_0x15538b);}import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION}from'./workflow-utils.js';import{pullWorkflow,applyPullResult}from'./pull-workflow.js';import{preparePushWorkflow,executePushWorkflow}from'./push-workflow.js';function a192_0x50a0(){const _0x3967b1=['length','readdir','path','isFile','exportParams','retryParams','workflow','workflowName','bind','sessionId','upstreams','keys','tdx-workflow-push-','project','basename','push','Project\x20not\x20found:\x20','error','logs','17307890KAsZRs','find','skipValidation','lastAttempt','19688BqQoBN','delete','12867855FrkRWw','logFiles','3327290rVgRUz','index','status','attempt','from','timezone','11fxGDax','setSecret','allSettled','downloadProjectArchive','access','extract','6GoRyRw','fullName','listAttempts','startedAt','3WJIzQx','zlib','last_id','gunzip','deleteProject','pullProject','force','download','substring','revision','limit','retrySession','updatedAt','getProject','scheduleFrom','listSecrets','join','WORKFLOW_PROJECT_NOT_FOUND','client','name','replace','data','7110DINhnE','run','Failed\x20to\x20download\x20log\x20file:\x20','killAttempt','startAttempt','clearScheduleAll','tasks','tar','tmpdir','utf-8','now','projectName','mkdir','Failed\x20to\x20set\x20secret','NUMERIC_ID_PATTERN','rejected','202532kOAnzN','success','unlink','setSecrets','sessionUuid','includeRetried','executeCloneProject','deleteSecret','filter','workflows','direct','getAttemptTasks','lastId','\x20workflow\x20files\x20found\x20in\x20project\x20directory','getAttempt','retryAttemptName','params','min','kill','applyPullProject','isDirectory','state','arrayBuffer','util','fromTime','prepareCloneProject','WORKFLOW_SECRET_SET_FAILED','attempts','Kill\x20request\x20accepted','latest','Cannot\x20read\x20workflow\x20file:\x20','4707188vsJwcQ','65792532BbEdog','sessionTime','toISOString','resolveProjectId','projects','map','retryAttempt','config','listProjects','endsWith','5qgbaQo'];a192_0x50a0=function(){return _0x3967b1;};return a192_0x50a0();}import{prepareCloneWorkflow,executeCloneWorkflow}from'./clone-workflow.js';export class WorkflowSDK{static [a192_0x32f324(0x162)]=/^\d+$/;['client'];constructor(_0x507fbe){const _0xc939a8=a192_0x32f324;this[_0xc939a8(0x150)]=new WorkflowApiClient(_0x507fbe);}async[a192_0x32f324(0x10b)](_0x4a3e64){const _0x4fae45=a192_0x32f324;if(WorkflowSDK[_0x4fae45(0x162)]['test'](_0x4a3e64)){const _0x54ed0c=await this[_0x4fae45(0x150)][_0x4fae45(0x14b)](_0x4a3e64);return{'id':_0x54ed0c['id'],'name':_0x54ed0c[_0x4fae45(0x151)]};}const _0x27fe1b=await this[_0x4fae45(0x150)][_0x4fae45(0x110)]({'name_pattern':_0x4a3e64}),_0x577587=_0x27fe1b[_0x4fae45(0x153)][_0x4fae45(0x127)](_0x5c2169=>_0x5c2169[_0x4fae45(0x151)]===_0x4a3e64);if(!_0x577587)throw new SDKError(ErrorCode['WORKFLOW_PROJECT_NOT_FOUND'],'Project\x20not\x20found:\x20'+_0x4a3e64);return{'id':_0x577587['id'],'name':_0x577587[_0x4fae45(0x151)]};}async[a192_0x32f324(0x10c)](_0x573d29,_0x440a66){const _0x1558ce=a192_0x32f324,_0x8202f8=_0x440a66?.['limit']||0x64,_0x5250b5=await paginateResults((_0x30a46f,_0x4b21ab)=>this[_0x1558ce(0x150)]['listProjects']({'name_pattern':_0x573d29,'limit':_0x30a46f,'last_id':_0x4b21ab??_0x440a66?.['last_id']}),_0x8202f8);return _0x5250b5[_0x1558ce(0x10d)](_0xde5d81=>({..._0xde5d81,'project_id':_0xde5d81['id'],'project_name':_0xde5d81[_0x1558ce(0x151)]}));}async[a192_0x32f324(0xf1)](_0x53a79c,_0x3f4e68){const _0x50e76a=a192_0x32f324,_0x584f6f=_0x3f4e68?.[_0x50e76a(0x148)]||0x64,_0x10199e=await paginateResults((_0x281ca1,_0xe13c5d)=>this[_0x50e76a(0x150)]['listWorkflows']({'project_name':_0x53a79c,'limit':_0x281ca1,'last_id':_0xe13c5d??_0x3f4e68?.['last_id']}),_0x584f6f);return _0x10199e['map'](_0x31161f=>({'project_id':_0x31161f[_0x50e76a(0x120)]?.['id'],'project_name':_0x31161f[_0x50e76a(0x120)]?.[_0x50e76a(0x151)],'workflow_id':_0x31161f['id'],'workflow_name':_0x31161f[_0x50e76a(0x151)],'revision':_0x31161f[_0x50e76a(0x147)],'timezone':_0x31161f[_0x50e76a(0x133)],'config':_0x31161f[_0x50e76a(0x10f)],'id':_0x31161f['id'],'name':_0x31161f['name'],'project':_0x31161f[_0x50e76a(0x120)]}));}async['sessions'](_0x5ced96){const _0x15d6a5=a192_0x32f324;let _0x14e52f;if(_0x5ced96?.['projectName']){let _0xcf45ea,_0x8865e7=![];while(!_0x8865e7){const _0x1b90e1=await this['client'][_0x15d6a5(0x110)]({'limit':0x64,'last_id':_0xcf45ea}),_0x17b009=_0x1b90e1[_0x15d6a5(0x153)][_0x15d6a5(0x127)](_0x5e654b=>_0x5e654b['name']===_0x5ced96[_0x15d6a5(0x15f)]);if(_0x17b009){_0x14e52f=_0x17b009['id'],_0x8865e7=!![];break;}if(!_0x1b90e1[_0x15d6a5(0xf4)]||_0x1b90e1[_0x15d6a5(0x153)][_0x15d6a5(0x113)]===0x0)break;_0xcf45ea=_0x1b90e1['lastId'];}if(!_0x14e52f)throw new SDKError(ErrorCode[_0x15d6a5(0x14f)],_0x15d6a5(0x123)+_0x5ced96[_0x15d6a5(0x15f)]);}const _0x386768=_0x5ced96?.[_0x15d6a5(0x148)]||0x64,_0x3510f4=await paginateResults((_0x14c8dc,_0xd51a7e)=>this[_0x15d6a5(0x150)]['listSessions']({'project_id':_0x14e52f,'project_name':_0x5ced96?.[_0x15d6a5(0x15f)],'workflow_name':_0x5ced96?.[_0x15d6a5(0x11a)],'status':_0x5ced96?.[_0x15d6a5(0x130)],'from_time':_0x5ced96?.[_0x15d6a5(0x100)],'to_time':_0x5ced96?.['toTime'],'limit':_0x14c8dc,'last_id':_0xd51a7e??_0x5ced96?.[_0x15d6a5(0x140)]}),_0x386768);return _0x3510f4[_0x15d6a5(0x10d)](_0x466f74=>({'project_id':_0x466f74['project']?.['id'],'project_name':_0x466f74[_0x15d6a5(0x120)]?.[_0x15d6a5(0x151)],'workflow_id':_0x466f74['workflow']?.['id'],'workflow_name':_0x466f74[_0x15d6a5(0x119)]?.[_0x15d6a5(0x151)],'session_id':_0x466f74['id'],'sessionUuid':_0x466f74[_0x15d6a5(0xec)],'sessionTime':_0x466f74[_0x15d6a5(0x109)],'lastAttempt':_0x466f74[_0x15d6a5(0x129)],'id':_0x466f74['id'],'project':_0x466f74[_0x15d6a5(0x120)],'workflow':_0x466f74[_0x15d6a5(0x119)]}));}async[a192_0x32f324(0x103)](_0xf4c4be){const _0x1a724e=a192_0x32f324,_0x46bf89=_0xf4c4be?.[_0x1a724e(0x148)]||0x64,_0x593680=await paginateResults((_0x1dc529,_0x11691f)=>this[_0x1a724e(0x150)][_0x1a724e(0x13c)]({'project_name':_0xf4c4be?.[_0x1a724e(0x15f)],'workflow_name':_0xf4c4be?.[_0x1a724e(0x11a)],'include_retried':_0xf4c4be?.[_0x1a724e(0xed)],'limit':_0x1dc529,'last_id':_0x11691f??_0xf4c4be?.[_0x1a724e(0x140)]}),_0x46bf89);return _0x593680[_0x1a724e(0x10d)](_0x57bd6c=>({'project_id':_0x57bd6c[_0x1a724e(0x120)]?.['id'],'project_name':_0x57bd6c[_0x1a724e(0x120)]?.[_0x1a724e(0x151)],'workflow_id':_0x57bd6c[_0x1a724e(0x119)]?.['id'],'workflow_name':_0x57bd6c[_0x1a724e(0x119)]?.[_0x1a724e(0x151)],'session_id':_0x57bd6c[_0x1a724e(0x11c)],'sessionUuid':_0x57bd6c[_0x1a724e(0xec)],'sessionTime':_0x57bd6c[_0x1a724e(0x109)],'attempt_id':_0x57bd6c['id'],'attempt_index':_0x57bd6c[_0x1a724e(0x12f)],'retryAttemptName':_0x57bd6c[_0x1a724e(0xf7)],'done':_0x57bd6c['done'],'success':_0x57bd6c[_0x1a724e(0x165)],'cancelRequested':_0x57bd6c['cancelRequested'],'params':_0x57bd6c[_0x1a724e(0xf8)],'createdAt':_0x57bd6c['createdAt'],'finishedAt':_0x57bd6c['finishedAt'],'id':_0x57bd6c['id'],'index':_0x57bd6c['index'],'project':_0x57bd6c[_0x1a724e(0x120)],'workflow':_0x57bd6c[_0x1a724e(0x119)]}));}async[a192_0x32f324(0x131)](_0x5286af){const _0x225a40=a192_0x32f324,_0xbd4356=await this[_0x225a40(0x150)][_0x225a40(0xf6)](_0x5286af);return _0xbd4356;}async[a192_0x32f324(0x15a)](_0x7795ed,_0x3eefe4=![]){const _0x2bc9b0=a192_0x32f324,_0x1cd025=await this[_0x2bc9b0(0x150)][_0x2bc9b0(0xf3)](_0x7795ed,_0x3eefe4);return _0x1cd025[_0x2bc9b0(0x10d)](_0x11880c=>({'task_id':_0x11880c['id'],'task_name':_0x11880c[_0x2bc9b0(0x13b)],'parentId':_0x11880c['parentId'],'config':_0x11880c[_0x2bc9b0(0x10f)],'upstreams':_0x11880c[_0x2bc9b0(0x11d)],'state':_0x11880c[_0x2bc9b0(0xfd)],'exportParams':_0x11880c[_0x2bc9b0(0x117)],'storeParams':_0x11880c['storeParams'],'stateParams':_0x11880c['stateParams'],'updatedAt':_0x11880c[_0x2bc9b0(0x14a)],'retryAt':_0x11880c['retryAt'],'startedAt':_0x11880c[_0x2bc9b0(0x13d)],'error':_0x11880c[_0x2bc9b0(0x124)],'isGroup':_0x11880c['isGroup'],'id':_0x11880c['id'],'fullName':_0x11880c['fullName']}));}async[a192_0x32f324(0x12d)](_0x254c84,_0x4f658f){const _0x4d1960=a192_0x32f324;return await this[_0x4d1960(0x150)]['listLogFiles'](_0x254c84,_0x4f658f);}async[a192_0x32f324(0x125)](_0x20aa14,_0x1f14db){const _0x35a3ee=a192_0x32f324,_0x1e5904=await import(_0x35a3ee(0x13f)),{promisify:_0xb1ed50}=await import(_0x35a3ee(0xff)),_0x547593=_0xb1ed50(_0x1e5904[_0x35a3ee(0x141)]),_0x15b111=await this[_0x35a3ee(0x150)]['listLogFiles'](_0x20aa14,_0x1f14db);if(_0x15b111[_0x35a3ee(0x113)]===0x0)return'';const _0xc0070d=[];for(const _0x45103a of _0x15b111){if(!_0x45103a['direct'])continue;const _0x4e059d=await fetch(_0x45103a[_0x35a3ee(0xf2)]);if(!_0x4e059d['ok'])throw new Error(_0x35a3ee(0x156)+_0x4e059d['status']);const _0x56e055=Buffer[_0x35a3ee(0x132)](await _0x4e059d[_0x35a3ee(0xfe)]()),_0x1de6f3=await _0x547593(_0x56e055);_0xc0070d['push'](_0x1de6f3['toString'](_0x35a3ee(0x15d)));}return _0xc0070d[_0x35a3ee(0x14e)]('\x0a');}async[a192_0x32f324(0xfa)](_0x20399b,_0x181122){const _0x434832=a192_0x32f324,_0x369115=await this['client'][_0x434832(0x157)](_0x20399b,_0x181122);return _0x369115?.['message']??_0x434832(0x104);}async[a192_0x32f324(0x149)](_0x29bee5,_0x5df4ba){const _0x1b59d5=a192_0x32f324,_0x42cc3e=await this['client'][_0x1b59d5(0x149)](_0x29bee5,{'from_task':_0x5df4ba?.['fromTask'],'retry_params':_0x5df4ba?.[_0x1b59d5(0x118)]});return{'attemptId':_0x42cc3e['id'],'sessionId':_0x42cc3e[_0x1b59d5(0x11c)]};}async[a192_0x32f324(0x10e)](_0x105d51,_0x169c58){const _0x2023e5=a192_0x32f324,_0x2c4c97=await this['client'][_0x2023e5(0x10e)](_0x105d51,{'resume_from':_0x169c58?.['resumeFrom'],'retry_params':_0x169c58?.['retryParams'],'force':_0x169c58?.[_0x2023e5(0x144)]});return{'attemptId':_0x2c4c97['id'],'sessionId':_0x2c4c97[_0x2023e5(0x11c)]};}async[a192_0x32f324(0x155)](_0x56ffc2,_0x1f9f02={},_0x49d0a2){const _0x522fda=a192_0x32f324,_0x47d9cd=_0x56ffc2['indexOf']('.');let _0x4939a6,_0x39c869;if(_0x47d9cd===-0x1)throw new Error('Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format');_0x4939a6=_0x56ffc2[_0x522fda(0x146)](0x0,_0x47d9cd),_0x39c869=_0x56ffc2[_0x522fda(0x146)](_0x47d9cd+0x1);if(!_0x4939a6||!_0x39c869)throw new Error('Invalid\x20workflow\x20format:\x20'+_0x56ffc2+'.\x20Expected\x20\x22project.workflow\x22');const _0x3b6463=_0x49d0a2?.['sessionTime']||new Date()[_0x522fda(0x10a)]();return await this[_0x522fda(0x150)][_0x522fda(0x158)]({'projectName':_0x4939a6,'workflowName':_0x39c869,'sessionTime':_0x3b6463,'params':_0x1f9f02});}async[a192_0x32f324(0x145)](_0x27afa1,_0x213042,_0x482f14){const _0x205bdd=a192_0x32f324,{promises:_0x5a2f09}=await import('fs'),_0x152e0b=await import(_0x205bdd(0x115)),_0x36a699=await import('os'),_0x307d8d=await import(_0x205bdd(0x15b)),{id:_0x419e65,name:_0x3138f7}=await this[_0x205bdd(0x10b)](_0x27afa1),_0x4573ad=_0x36a699[_0x205bdd(0x15c)](),_0xd9360e=_0x152e0b[_0x205bdd(0x14e)](_0x4573ad,'tdx-workflow-'+_0x419e65+'-'+Date[_0x205bdd(0x15e)]()+'.tar.gz');try{await this[_0x205bdd(0x150)][_0x205bdd(0x137)](_0x419e65,_0xd9360e,_0x482f14?.[_0x205bdd(0x147)]);const _0x12b7bf=_0x152e0b['join'](_0x213042,_0x3138f7);await _0x5a2f09[_0x205bdd(0x160)](_0x12b7bf,{'recursive':!![]}),await _0x307d8d[_0x205bdd(0x139)]({'file':_0xd9360e,'cwd':_0x12b7bf,'gzip':!![]});const _0x42e425=async _0x451df8=>{const _0x3d8699=_0x205bdd;let _0x47316a=0x0;const _0x275182=await _0x5a2f09[_0x3d8699(0x114)](_0x451df8,{'withFileTypes':!![]});for(const _0x154237 of _0x275182){const _0x4cde2d=_0x152e0b[_0x3d8699(0x14e)](_0x451df8,_0x154237['name']);if(_0x154237[_0x3d8699(0x116)]())_0x47316a++;else _0x154237[_0x3d8699(0xfc)]()&&(_0x47316a+=await _0x42e425(_0x4cde2d));}return _0x47316a;},_0x4d1916=await _0x42e425(_0x12b7bf);return{'projectName':_0x3138f7,'revision':_0x482f14?.['revision']||_0x205bdd(0x105),'filesExtracted':_0x4d1916};}finally{try{await _0x5a2f09[_0x205bdd(0xea)](_0xd9360e);}catch{}}}async[a192_0x32f324(0x122)](_0x264ae4,_0x150db0){const _0x124d7c=a192_0x32f324,{promises:_0xb75ee3}=await import('fs'),_0x1e0c3c=await import(_0x124d7c(0x115)),_0x11ada2=await import(_0x124d7c(0x15b)),_0x1de20b=_0x150db0?.[_0x124d7c(0x15f)]||_0x1e0c3c[_0x124d7c(0x121)](_0x264ae4),_0x250bb3=_0x150db0?.[_0x124d7c(0x147)]||new Date()[_0x124d7c(0x10a)]()[_0x124d7c(0x152)](/[:.]/g,'-');try{await _0xb75ee3[_0x124d7c(0x138)](_0x264ae4);}catch{throw new Error('Project\x20directory\x20not\x20found:\x20'+_0x264ae4);}if(!_0x150db0?.[_0x124d7c(0x128)]){const _0x54bfbd=await _0xb75ee3['readdir'](_0x264ae4),_0x2ae47a=_0x54bfbd[_0x124d7c(0xf0)](_0x5cdc0f=>_0x5cdc0f[_0x124d7c(0x111)](WORKFLOW_FILE_EXTENSION));if(_0x2ae47a[_0x124d7c(0x113)]===0x0)throw new Error('No\x20'+WORKFLOW_FILE_EXTENSION+_0x124d7c(0xf5));for(const _0x1f4593 of _0x2ae47a){const _0x73d253=_0x1e0c3c[_0x124d7c(0x14e)](_0x264ae4,_0x1f4593);try{await _0xb75ee3[_0x124d7c(0x138)](_0x73d253);}catch{throw new Error(_0x124d7c(0x106)+_0x1f4593);}}}const _0x24669f=async(_0x405f4b,_0x5e656e='')=>{const _0xefe520=_0x124d7c,_0x526197=await _0xb75ee3['readdir'](_0x405f4b,{'withFileTypes':!![]}),_0x433396=[];for(const _0x42199d of _0x526197){const _0x221787=_0x1e0c3c[_0xefe520(0x14e)](_0x5e656e,_0x42199d[_0xefe520(0x151)]),_0x5c66d4=_0x1e0c3c[_0xefe520(0x14e)](_0x405f4b,_0x42199d[_0xefe520(0x151)]);if(!shouldIncludeInArchive(_0x42199d['name']))continue;_0x42199d[_0xefe520(0xfc)]()?_0x433396[_0xefe520(0x122)](...await _0x24669f(_0x5c66d4,_0x221787)):_0x433396[_0xefe520(0x122)](_0x221787);}return _0x433396;},_0x30d251=await _0x24669f(_0x264ae4),_0x336a98=await import('os'),_0x483368=_0x336a98['tmpdir'](),_0x2f6415=_0x1e0c3c[_0x124d7c(0x14e)](_0x483368,_0x124d7c(0x11f)+Date[_0x124d7c(0x15e)]()+'.tar.gz');try{await _0x11ada2['create']({'file':_0x2f6415,'gzip':!![],'cwd':_0x264ae4,'portable':!![]},_0x30d251);const _0x5a45ba=await this[_0x124d7c(0x150)]['uploadProjectArchive'](_0x1de20b,_0x250bb3,_0x2f6415,{'scheduleFrom':_0x150db0?.[_0x124d7c(0x14c)],'clearSchedule':_0x150db0?.['clearSchedule'],'clearScheduleAll':_0x150db0?.[_0x124d7c(0x159)]});return{'projectId':_0x5a45ba['id'],'projectName':_0x5a45ba[_0x124d7c(0x151)],'revision':_0x5a45ba['revision']};}finally{try{await _0xb75ee3[_0x124d7c(0xea)](_0x2f6415);}catch{}}}async[a192_0x32f324(0x12b)](_0x1c5dae){const _0x140e64=a192_0x32f324,{id:_0x587a20}=await this[_0x140e64(0x10b)](_0x1c5dae),_0xbe2b1d=await this['client'][_0x140e64(0x142)](_0x587a20);return{'projectId':_0xbe2b1d['id'],'projectName':_0xbe2b1d[_0x140e64(0x151)]};}async[a192_0x32f324(0x14d)](_0x426dc4){const _0x20d88c=a192_0x32f324,{id:_0x55675b,name:_0x2411cc}=await this[_0x20d88c(0x10b)](_0x426dc4),_0x3cd9c8=await this[_0x20d88c(0x150)]['listSecrets'](_0x55675b);return{'projectName':_0x2411cc,'secrets':_0x3cd9c8};}async[a192_0x32f324(0x135)](_0xc843e4,_0x874685,_0xf73fd8){const _0x42f7c4=a192_0x32f324,{id:_0x590cd4,name:_0x51c5f6}=await this[_0x42f7c4(0x10b)](_0xc843e4);return await this['client'][_0x42f7c4(0x135)](_0x590cd4,_0x874685,_0xf73fd8),{'projectName':_0x51c5f6,'key':_0x874685};}async[a192_0x32f324(0xeb)](_0x2204ae,_0x4e2be1){const _0x5d13eb=a192_0x32f324,{id:_0x3a2c14,name:_0x326513}=await this[_0x5d13eb(0x10b)](_0x2204ae),_0x1eb0af=Object[_0x5d13eb(0x11e)](_0x4e2be1),_0x2ce6c0=await Promise[_0x5d13eb(0x136)](_0x1eb0af[_0x5d13eb(0x10d)](_0x494775=>this['client'][_0x5d13eb(0x135)](_0x3a2c14,_0x494775,_0x4e2be1[_0x494775]))),_0x32fe1f=_0x2ce6c0[_0x5d13eb(0x10d)]((_0xb51998,_0x103b88)=>_0xb51998[_0x5d13eb(0x130)]===_0x5d13eb(0x163)?_0x1eb0af[_0x103b88]:null)[_0x5d13eb(0xf0)](_0xac381a=>_0xac381a!==null);if(_0x32fe1f[_0x5d13eb(0x113)]>0x0)throw new SDKError(ErrorCode[_0x5d13eb(0x102)],_0x5d13eb(0x161)+(_0x32fe1f[_0x5d13eb(0x113)]>0x1?'s':'')+':\x20'+_0x32fe1f[_0x5d13eb(0x14e)](',\x20'));return{'projectName':_0x326513,'keys':_0x1eb0af};}async[a192_0x32f324(0xef)](_0x2448d4,_0x3d3eb8){const _0x57db5f=a192_0x32f324,{id:_0x49d4ff,name:_0x5d9534}=await this[_0x57db5f(0x10b)](_0x2448d4);return await this['client'][_0x57db5f(0xef)](_0x49d4ff,_0x3d3eb8),{'projectName':_0x5d9534,'key':_0x3d3eb8};}async[a192_0x32f324(0x143)](_0x453c82,_0x26e01c){const _0x5f53f6=a192_0x32f324;return pullWorkflow({'client':this[_0x5f53f6(0x150)],'resolveProjectId':this['resolveProjectId'][_0x5f53f6(0x11b)](this)},_0x453c82,_0x26e01c);}async[a192_0x32f324(0xfb)](_0x13ce1c,_0x43380a){const _0x3c1479=a192_0x32f324;return applyPullResult({'client':this[_0x3c1479(0x150)],'resolveProjectId':this[_0x3c1479(0x10b)]['bind'](this)},_0x13ce1c,_0x43380a);}async['preparePushProject'](_0x57e79a){const _0x3f7db7=a192_0x32f324;return preparePushWorkflow({'client':this['client'],'resolveProjectId':this[_0x3f7db7(0x10b)]['bind'](this)},_0x57e79a);}async['executePushProject'](_0x4aebee){const _0x57bfab=a192_0x32f324;return executePushWorkflow({'client':this[_0x57bfab(0x150)],'resolveProjectId':this['resolveProjectId']['bind'](this)},_0x4aebee);}async[a192_0x32f324(0x101)](_0x4d5267,_0x1ad957,_0x52c5da){const _0x341661=a192_0x32f324;return prepareCloneWorkflow({'client':this[_0x341661(0x150)]},_0x4d5267,_0x1ad957,_0x52c5da);}async[a192_0x32f324(0xee)](_0x137002){const _0x4a56a6=a192_0x32f324;return executeCloneWorkflow({'client':this[_0x4a56a6(0x150)]},_0x137002);}}
|
|
1
|
+
const a192_0x20786a=a192_0x3337;function a192_0x3337(_0x3eeee8,_0x36f407){_0x3eeee8=_0x3eeee8-0x1ad;const _0x5e663b=a192_0x5e66();let _0x3337ae=_0x5e663b[_0x3eeee8];return _0x3337ae;}(function(_0x41ea8e,_0x250c01){const _0x42c34=a192_0x3337,_0x35eca6=_0x41ea8e();while(!![]){try{const _0x21c9d3=-parseInt(_0x42c34(0x22d))/0x1*(parseInt(_0x42c34(0x1c5))/0x2)+-parseInt(_0x42c34(0x213))/0x3*(parseInt(_0x42c34(0x21f))/0x4)+parseInt(_0x42c34(0x1ed))/0x5+parseInt(_0x42c34(0x21c))/0x6+-parseInt(_0x42c34(0x202))/0x7+parseInt(_0x42c34(0x216))/0x8*(-parseInt(_0x42c34(0x1d0))/0x9)+parseInt(_0x42c34(0x22b))/0xa;if(_0x21c9d3===_0x250c01)break;else _0x35eca6['push'](_0x35eca6['shift']());}catch(_0x5de82e){_0x35eca6['push'](_0x35eca6['shift']());}}}(a192_0x5e66,0xa948a));import{WorkflowApiClient}from'../client/workflow-client.js';import{SDKError,ErrorCode}from'../errors.js';import{MAX_PAGINATION_LIMIT}from'../util/paginate.js';async function paginateResults(_0x55b2ab,_0x5edd19,_0x344fae=0x64){const _0x23aaf1=a192_0x3337,_0x4f60a1=Math[_0x23aaf1(0x1df)](_0x5edd19,MAX_PAGINATION_LIMIT),_0x47c96a=[];let _0x5bd3e2;while(_0x47c96a[_0x23aaf1(0x225)]<_0x4f60a1){const _0x45f2a0=await _0x55b2ab(_0x344fae,_0x5bd3e2),_0x54bc10=_0x45f2a0[_0x23aaf1(0x207)]??_0x45f2a0[_0x23aaf1(0x1b0)][_0x23aaf1(0x225)];if(_0x54bc10===0x0)break;_0x47c96a[_0x23aaf1(0x1c6)](..._0x45f2a0[_0x23aaf1(0x1b0)]);if(!_0x45f2a0[_0x23aaf1(0x1e7)]||_0x54bc10<_0x344fae)break;_0x5bd3e2=_0x45f2a0[_0x23aaf1(0x1e7)];}return _0x47c96a[_0x23aaf1(0x220)](0x0,_0x4f60a1);}import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION}from'./workflow-utils.js';function a192_0x5e66(){const _0x2a9e12=['tar','finishedAt','getAttemptTasks','data','parentId','fromTask','last_id','sessionId','indexOf','done','kill','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','gunzip','sessions','limit','delete','createdAt','latest','storeParams','find','toString','force','setSecret','retryParams','4CPualE','push','listSessions','listProjects','create','listAttempts','success','NUMERIC_ID_PATTERN','status','readdir','retrySession','44082YCtfyq','state','substring','workflow','tdx-workflow-push-','name','.\x20Expected\x20\x22project.workflow\x22','resolveProjectId','updatedAt','timezone','params','pullProject','No\x20','revision','deleteSecret','min','workflows','getAttempt','isFile','listLogFiles','projectName','client','logs','lastId','project','tasks','retryAttemptName','preparePushProject','bind','4459365oXZugp','config','WORKFLOW_PROJECT_NOT_FOUND','test','clearScheduleAll','from','Invalid\x20workflow\x20format:\x20','Cannot\x20read\x20workflow\x20file:\x20','upstreams','filter','download','Failed\x20to\x20set\x20secret','run','Kill\x20request\x20accepted','endsWith','cancelRequested','replace','includeRetried','fromTime','tmpdir','Project\x20directory\x20not\x20found:\x20','2257598LZtluw','scheduleFrom','listSecrets','fullName','retryAttempt','rawCount','toISOString','rejected','tdx-workflow-','join','extract','WORKFLOW_SECRET_SET_FAILED','skipValidation','lastAttempt','isGroup','index','downloadProjectArchive','177xXwqkT','basename','zlib','944UwsUru','now','unlink','Project\x20not\x20found:\x20','workflowName','access','5039070qDnxfl','stateParams','uploadProjectArchive','66436hOOnUn','slice','.tar.gz','attempt','listWorkflows','sessionTime','length','map','direct','setSecrets','util','message','14646150cxluHc','allSettled','311269AOuplh','prepareCloneProject'];a192_0x5e66=function(){return _0x2a9e12;};return a192_0x5e66();}import{pullWorkflow,applyPullResult}from'./pull-workflow.js';import{preparePushWorkflow,executePushWorkflow}from'./push-workflow.js';import{prepareCloneWorkflow,executeCloneWorkflow}from'./clone-workflow.js';export class WorkflowSDK{static [a192_0x20786a(0x1cc)]=/^\d+$/;[a192_0x20786a(0x1e5)];constructor(_0x382e5c){const _0x496168=a192_0x20786a;this[_0x496168(0x1e5)]=new WorkflowApiClient(_0x382e5c);}async[a192_0x20786a(0x1d7)](_0x54007a){const _0x5d0a06=a192_0x20786a;if(WorkflowSDK[_0x5d0a06(0x1cc)][_0x5d0a06(0x1f0)](_0x54007a)){const _0x36f8c9=await this[_0x5d0a06(0x1e5)]['getProject'](_0x54007a);return{'id':_0x36f8c9['id'],'name':_0x36f8c9['name']};}const _0x51d36e=await this[_0x5d0a06(0x1e5)][_0x5d0a06(0x1c8)]({'name_pattern':_0x54007a}),_0x59acf1=_0x51d36e['data'][_0x5d0a06(0x1c0)](_0x1f0b37=>_0x1f0b37['name']===_0x54007a);if(!_0x59acf1)throw new SDKError(ErrorCode[_0x5d0a06(0x1ef)],_0x5d0a06(0x219)+_0x54007a);return{'id':_0x59acf1['id'],'name':_0x59acf1['name']};}async['projects'](_0x3d1a80,_0x3b6e86){const _0x14630b=a192_0x20786a,_0x51a3e9=_0x3b6e86?.[_0x14630b(0x1bb)]||0x64,_0x393892=await paginateResults((_0x34d43b,_0x24743c)=>this['client']['listProjects']({'name_pattern':_0x3d1a80,'limit':_0x34d43b,'last_id':_0x24743c??_0x3b6e86?.[_0x14630b(0x1b3)]}),_0x51a3e9);return _0x393892[_0x14630b(0x226)](_0x419db4=>({..._0x419db4,'project_id':_0x419db4['id'],'project_name':_0x419db4['name']}));}async[a192_0x20786a(0x1e0)](_0x203ff4,_0x3b23fa){const _0x53f002=a192_0x20786a,_0x2b1adc=_0x3b23fa?.[_0x53f002(0x1bb)]||0x64,_0xf63199=await paginateResults((_0x255e8e,_0x4ab2f9)=>this['client'][_0x53f002(0x223)]({'project_name':_0x203ff4,'limit':_0x255e8e,'last_id':_0x4ab2f9??_0x3b23fa?.[_0x53f002(0x1b3)]}),_0x2b1adc);return _0xf63199[_0x53f002(0x226)](_0x136758=>({'project_id':_0x136758[_0x53f002(0x1e8)]?.['id'],'project_name':_0x136758[_0x53f002(0x1e8)]?.[_0x53f002(0x1d5)],'workflow_id':_0x136758['id'],'workflow_name':_0x136758['name'],'revision':_0x136758[_0x53f002(0x1dd)],'timezone':_0x136758[_0x53f002(0x1d9)],'config':_0x136758['config'],'id':_0x136758['id'],'name':_0x136758['name'],'project':_0x136758[_0x53f002(0x1e8)]}));}async[a192_0x20786a(0x1ba)](_0x13f71a){const _0x52749=a192_0x20786a;let _0x1c6625;if(_0x13f71a?.[_0x52749(0x1e4)]){let _0x11e1f5,_0x4ee3cf=![];while(!_0x4ee3cf){const _0x26a829=await this[_0x52749(0x1e5)][_0x52749(0x1c8)]({'limit':0x64,'last_id':_0x11e1f5}),_0x4e0c37=_0x26a829[_0x52749(0x1b0)][_0x52749(0x1c0)](_0x3d4a7b=>_0x3d4a7b[_0x52749(0x1d5)]===_0x13f71a[_0x52749(0x1e4)]);if(_0x4e0c37){_0x1c6625=_0x4e0c37['id'],_0x4ee3cf=!![];break;}if(!_0x26a829[_0x52749(0x1e7)]||_0x26a829[_0x52749(0x1b0)]['length']===0x0)break;_0x11e1f5=_0x26a829[_0x52749(0x1e7)];}if(!_0x1c6625)throw new SDKError(ErrorCode[_0x52749(0x1ef)],_0x52749(0x219)+_0x13f71a[_0x52749(0x1e4)]);}const _0x1862c8=_0x13f71a?.['limit']||0x64,_0x13b247=await paginateResults((_0x14f3aa,_0x43d3a4)=>this[_0x52749(0x1e5)][_0x52749(0x1c7)]({'project_id':_0x1c6625,'project_name':_0x13f71a?.[_0x52749(0x1e4)],'workflow_name':_0x13f71a?.[_0x52749(0x21a)],'status':_0x13f71a?.[_0x52749(0x1cd)],'from_time':_0x13f71a?.[_0x52749(0x1ff)],'to_time':_0x13f71a?.['toTime'],'limit':_0x14f3aa,'last_id':_0x43d3a4??_0x13f71a?.['last_id']}),_0x1862c8);return _0x13b247[_0x52749(0x226)](_0x3bdd3c=>({'project_id':_0x3bdd3c[_0x52749(0x1e8)]?.['id'],'project_name':_0x3bdd3c['project']?.[_0x52749(0x1d5)],'workflow_id':_0x3bdd3c['workflow']?.['id'],'workflow_name':_0x3bdd3c[_0x52749(0x1d3)]?.[_0x52749(0x1d5)],'session_id':_0x3bdd3c['id'],'sessionUuid':_0x3bdd3c['sessionUuid'],'sessionTime':_0x3bdd3c[_0x52749(0x224)],'lastAttempt':_0x3bdd3c[_0x52749(0x20f)],'id':_0x3bdd3c['id'],'project':_0x3bdd3c[_0x52749(0x1e8)],'workflow':_0x3bdd3c[_0x52749(0x1d3)]}));}async['attempts'](_0x1e46bb){const _0x2b0b49=a192_0x20786a,_0x42c7b9=_0x1e46bb?.[_0x2b0b49(0x1bb)]||0x64,_0x27c705=await paginateResults((_0x108b1e,_0x28a21a)=>this['client'][_0x2b0b49(0x1ca)]({'project_name':_0x1e46bb?.['projectName'],'workflow_name':_0x1e46bb?.[_0x2b0b49(0x21a)],'include_retried':_0x1e46bb?.[_0x2b0b49(0x1fe)],'limit':_0x108b1e,'last_id':_0x28a21a??_0x1e46bb?.[_0x2b0b49(0x1b3)]}),_0x42c7b9);return _0x27c705[_0x2b0b49(0x226)](_0x4e330b=>({'project_id':_0x4e330b[_0x2b0b49(0x1e8)]?.['id'],'project_name':_0x4e330b[_0x2b0b49(0x1e8)]?.[_0x2b0b49(0x1d5)],'workflow_id':_0x4e330b[_0x2b0b49(0x1d3)]?.['id'],'workflow_name':_0x4e330b[_0x2b0b49(0x1d3)]?.[_0x2b0b49(0x1d5)],'session_id':_0x4e330b[_0x2b0b49(0x1b4)],'sessionUuid':_0x4e330b['sessionUuid'],'sessionTime':_0x4e330b[_0x2b0b49(0x224)],'attempt_id':_0x4e330b['id'],'attempt_index':_0x4e330b[_0x2b0b49(0x211)],'retryAttemptName':_0x4e330b[_0x2b0b49(0x1ea)],'done':_0x4e330b[_0x2b0b49(0x1b6)],'success':_0x4e330b[_0x2b0b49(0x1cb)],'cancelRequested':_0x4e330b[_0x2b0b49(0x1fc)],'params':_0x4e330b[_0x2b0b49(0x1da)],'createdAt':_0x4e330b[_0x2b0b49(0x1bd)],'finishedAt':_0x4e330b[_0x2b0b49(0x1ae)],'id':_0x4e330b['id'],'index':_0x4e330b[_0x2b0b49(0x211)],'project':_0x4e330b[_0x2b0b49(0x1e8)],'workflow':_0x4e330b[_0x2b0b49(0x1d3)]}));}async[a192_0x20786a(0x222)](_0x5568ef){const _0x33b743=a192_0x20786a,_0x59b760=await this[_0x33b743(0x1e5)][_0x33b743(0x1e1)](_0x5568ef);return _0x59b760;}async[a192_0x20786a(0x1e9)](_0x472a3e,_0x538269=![]){const _0xbcbb2c=a192_0x20786a,_0xb5492f=await this[_0xbcbb2c(0x1e5)][_0xbcbb2c(0x1af)](_0x472a3e,_0x538269);return _0xb5492f[_0xbcbb2c(0x226)](_0xc85d63=>({'task_id':_0xc85d63['id'],'task_name':_0xc85d63[_0xbcbb2c(0x205)],'parentId':_0xc85d63[_0xbcbb2c(0x1b1)],'config':_0xc85d63[_0xbcbb2c(0x1ee)],'upstreams':_0xc85d63[_0xbcbb2c(0x1f5)],'state':_0xc85d63[_0xbcbb2c(0x1d1)],'exportParams':_0xc85d63['exportParams'],'storeParams':_0xc85d63[_0xbcbb2c(0x1bf)],'stateParams':_0xc85d63[_0xbcbb2c(0x21d)],'updatedAt':_0xc85d63[_0xbcbb2c(0x1d8)],'retryAt':_0xc85d63['retryAt'],'startedAt':_0xc85d63['startedAt'],'error':_0xc85d63['error'],'isGroup':_0xc85d63[_0xbcbb2c(0x210)],'id':_0xc85d63['id'],'fullName':_0xc85d63['fullName']}));}async['logFiles'](_0x382238,_0x17b43c){const _0x20255a=a192_0x20786a;return await this['client'][_0x20255a(0x1e3)](_0x382238,_0x17b43c);}async[a192_0x20786a(0x1e6)](_0x2e37bd,_0x156a51){const _0x1791b0=a192_0x20786a,_0x15a422=await import(_0x1791b0(0x215)),{promisify:_0x9fdf54}=await import(_0x1791b0(0x229)),_0x434964=_0x9fdf54(_0x15a422[_0x1791b0(0x1b9)]),_0x4b8d1b=await this[_0x1791b0(0x1e5)][_0x1791b0(0x1e3)](_0x2e37bd,_0x156a51);if(_0x4b8d1b[_0x1791b0(0x225)]===0x0)return'';const _0x5198e0=[];for(const _0x39ed3b of _0x4b8d1b){if(!_0x39ed3b[_0x1791b0(0x227)])continue;const _0x1363d2=await fetch(_0x39ed3b[_0x1791b0(0x227)]);if(!_0x1363d2['ok'])throw new Error('Failed\x20to\x20download\x20log\x20file:\x20'+_0x1363d2['status']);const _0x5b8513=Buffer[_0x1791b0(0x1f2)](await _0x1363d2['arrayBuffer']()),_0x1d16cd=await _0x434964(_0x5b8513);_0x5198e0['push'](_0x1d16cd[_0x1791b0(0x1c1)]('utf-8'));}return _0x5198e0[_0x1791b0(0x20b)]('\x0a');}async[a192_0x20786a(0x1b7)](_0x247b49,_0x28431c){const _0x2d06d9=a192_0x20786a,_0x2ade41=await this[_0x2d06d9(0x1e5)]['killAttempt'](_0x247b49,_0x28431c);return _0x2ade41?.[_0x2d06d9(0x22a)]??_0x2d06d9(0x1fa);}async[a192_0x20786a(0x1cf)](_0x5f521d,_0x5d670c){const _0x406b13=a192_0x20786a,_0x185ece=await this[_0x406b13(0x1e5)][_0x406b13(0x1cf)](_0x5f521d,{'from_task':_0x5d670c?.[_0x406b13(0x1b2)],'retry_params':_0x5d670c?.[_0x406b13(0x1c4)]});return{'attemptId':_0x185ece['id'],'sessionId':_0x185ece[_0x406b13(0x1b4)]};}async[a192_0x20786a(0x206)](_0x3c9e7b,_0x10d674){const _0x47e7fb=a192_0x20786a,_0x1d343c=await this[_0x47e7fb(0x1e5)][_0x47e7fb(0x206)](_0x3c9e7b,{'resume_from':_0x10d674?.['resumeFrom'],'retry_params':_0x10d674?.[_0x47e7fb(0x1c4)],'force':_0x10d674?.[_0x47e7fb(0x1c2)]});return{'attemptId':_0x1d343c['id'],'sessionId':_0x1d343c[_0x47e7fb(0x1b4)]};}async[a192_0x20786a(0x1f9)](_0x5a77ad,_0x49bf32={},_0x1dcb62){const _0x119a0e=a192_0x20786a,_0xdc4358=_0x5a77ad[_0x119a0e(0x1b5)]('.');let _0x4624b1,_0x1d7603;if(_0xdc4358===-0x1)throw new Error(_0x119a0e(0x1b8));_0x4624b1=_0x5a77ad[_0x119a0e(0x1d2)](0x0,_0xdc4358),_0x1d7603=_0x5a77ad[_0x119a0e(0x1d2)](_0xdc4358+0x1);if(!_0x4624b1||!_0x1d7603)throw new Error(_0x119a0e(0x1f3)+_0x5a77ad+_0x119a0e(0x1d6));const _0x1a0812=_0x1dcb62?.[_0x119a0e(0x224)]||new Date()[_0x119a0e(0x208)]();return await this[_0x119a0e(0x1e5)]['startAttempt']({'projectName':_0x4624b1,'workflowName':_0x1d7603,'sessionTime':_0x1a0812,'params':_0x49bf32});}async[a192_0x20786a(0x1f7)](_0x4d35a8,_0x56d689,_0x21eae6){const _0x4eec2e=a192_0x20786a,{promises:_0x3c8dea}=await import('fs'),_0x3eef03=await import('path'),_0x2c4825=await import('os'),_0x583579=await import(_0x4eec2e(0x1ad)),{id:_0x638893,name:_0x4bc3f6}=await this['resolveProjectId'](_0x4d35a8),_0x4427ff=_0x2c4825[_0x4eec2e(0x200)](),_0xfed142=_0x3eef03[_0x4eec2e(0x20b)](_0x4427ff,_0x4eec2e(0x20a)+_0x638893+'-'+Date[_0x4eec2e(0x217)]()+_0x4eec2e(0x221));try{await this[_0x4eec2e(0x1e5)][_0x4eec2e(0x212)](_0x638893,_0xfed142,_0x21eae6?.[_0x4eec2e(0x1dd)]);const _0x119fee=_0x3eef03[_0x4eec2e(0x20b)](_0x56d689,_0x4bc3f6);await _0x3c8dea['mkdir'](_0x119fee,{'recursive':!![]}),await _0x583579[_0x4eec2e(0x20c)]({'file':_0xfed142,'cwd':_0x119fee,'gzip':!![]});const _0x5832e4=async _0x18a3e2=>{const _0x3c1080=_0x4eec2e;let _0x59d3e4=0x0;const _0x57b0e0=await _0x3c8dea[_0x3c1080(0x1ce)](_0x18a3e2,{'withFileTypes':!![]});for(const _0xa493dd of _0x57b0e0){const _0x49af44=_0x3eef03[_0x3c1080(0x20b)](_0x18a3e2,_0xa493dd[_0x3c1080(0x1d5)]);if(_0xa493dd[_0x3c1080(0x1e2)]())_0x59d3e4++;else _0xa493dd['isDirectory']()&&(_0x59d3e4+=await _0x5832e4(_0x49af44));}return _0x59d3e4;},_0x3255c7=await _0x5832e4(_0x119fee);return{'projectName':_0x4bc3f6,'revision':_0x21eae6?.[_0x4eec2e(0x1dd)]||_0x4eec2e(0x1be),'filesExtracted':_0x3255c7};}finally{try{await _0x3c8dea[_0x4eec2e(0x218)](_0xfed142);}catch{}}}async[a192_0x20786a(0x1c6)](_0x50e7e7,_0x39afb4){const _0x48c7d4=a192_0x20786a,{promises:_0x204da7}=await import('fs'),_0x69667=await import('path'),_0x6f36b6=await import(_0x48c7d4(0x1ad)),_0x483ff9=_0x39afb4?.[_0x48c7d4(0x1e4)]||_0x69667[_0x48c7d4(0x214)](_0x50e7e7),_0x270b06=_0x39afb4?.[_0x48c7d4(0x1dd)]||new Date()[_0x48c7d4(0x208)]()[_0x48c7d4(0x1fd)](/[:.]/g,'-');try{await _0x204da7[_0x48c7d4(0x21b)](_0x50e7e7);}catch{throw new Error(_0x48c7d4(0x201)+_0x50e7e7);}if(!_0x39afb4?.[_0x48c7d4(0x20e)]){const _0x4191e5=await _0x204da7[_0x48c7d4(0x1ce)](_0x50e7e7),_0x53eb2a=_0x4191e5[_0x48c7d4(0x1f6)](_0x3b3a86=>_0x3b3a86[_0x48c7d4(0x1fb)](WORKFLOW_FILE_EXTENSION));if(_0x53eb2a['length']===0x0)throw new Error(_0x48c7d4(0x1dc)+WORKFLOW_FILE_EXTENSION+'\x20workflow\x20files\x20found\x20in\x20project\x20directory');for(const _0x2d9e6d of _0x53eb2a){const _0x5959f8=_0x69667[_0x48c7d4(0x20b)](_0x50e7e7,_0x2d9e6d);try{await _0x204da7['access'](_0x5959f8);}catch{throw new Error(_0x48c7d4(0x1f4)+_0x2d9e6d);}}}const _0x46937c=async(_0x507d5d,_0x2549b4='')=>{const _0x18e982=_0x48c7d4,_0x306a6e=await _0x204da7[_0x18e982(0x1ce)](_0x507d5d,{'withFileTypes':!![]}),_0x1da0aa=[];for(const _0x21e915 of _0x306a6e){const _0x38f891=_0x69667[_0x18e982(0x20b)](_0x2549b4,_0x21e915[_0x18e982(0x1d5)]),_0x4828f3=_0x69667[_0x18e982(0x20b)](_0x507d5d,_0x21e915[_0x18e982(0x1d5)]);if(!shouldIncludeInArchive(_0x21e915[_0x18e982(0x1d5)]))continue;_0x21e915['isDirectory']()?_0x1da0aa[_0x18e982(0x1c6)](...await _0x46937c(_0x4828f3,_0x38f891)):_0x1da0aa[_0x18e982(0x1c6)](_0x38f891);}return _0x1da0aa;},_0x5b373e=await _0x46937c(_0x50e7e7),_0x5da40e=await import('os'),_0x3e243b=_0x5da40e[_0x48c7d4(0x200)](),_0x202038=_0x69667[_0x48c7d4(0x20b)](_0x3e243b,_0x48c7d4(0x1d4)+Date['now']()+_0x48c7d4(0x221));try{await _0x6f36b6[_0x48c7d4(0x1c9)]({'file':_0x202038,'gzip':!![],'cwd':_0x50e7e7,'portable':!![]},_0x5b373e);const _0x46303b=await this[_0x48c7d4(0x1e5)][_0x48c7d4(0x21e)](_0x483ff9,_0x270b06,_0x202038,{'scheduleFrom':_0x39afb4?.[_0x48c7d4(0x203)],'clearSchedule':_0x39afb4?.['clearSchedule'],'clearScheduleAll':_0x39afb4?.[_0x48c7d4(0x1f1)]});return{'projectId':_0x46303b['id'],'projectName':_0x46303b[_0x48c7d4(0x1d5)],'revision':_0x46303b[_0x48c7d4(0x1dd)]};}finally{try{await _0x204da7[_0x48c7d4(0x218)](_0x202038);}catch{}}}async[a192_0x20786a(0x1bc)](_0x574e6e){const _0x1704f3=a192_0x20786a,{id:_0x321212}=await this['resolveProjectId'](_0x574e6e),_0x511806=await this[_0x1704f3(0x1e5)]['deleteProject'](_0x321212);return{'projectId':_0x511806['id'],'projectName':_0x511806[_0x1704f3(0x1d5)]};}async[a192_0x20786a(0x204)](_0x70f36c){const _0x2aeb42=a192_0x20786a,{id:_0xf86f45,name:_0x479ac8}=await this[_0x2aeb42(0x1d7)](_0x70f36c),_0x2fb594=await this[_0x2aeb42(0x1e5)][_0x2aeb42(0x204)](_0xf86f45);return{'projectName':_0x479ac8,'secrets':_0x2fb594};}async[a192_0x20786a(0x1c3)](_0x371690,_0x297d42,_0x293d7a){const _0x4a51c7=a192_0x20786a,{id:_0xaed9c6,name:_0xe9bfa4}=await this['resolveProjectId'](_0x371690);return await this[_0x4a51c7(0x1e5)]['setSecret'](_0xaed9c6,_0x297d42,_0x293d7a),{'projectName':_0xe9bfa4,'key':_0x297d42};}async[a192_0x20786a(0x228)](_0x1be6ca,_0x52b3d4){const _0x351dc1=a192_0x20786a,{id:_0x5d2618,name:_0x1ee8e3}=await this['resolveProjectId'](_0x1be6ca),_0x160374=Object['keys'](_0x52b3d4),_0x4bdf40=await Promise[_0x351dc1(0x22c)](_0x160374[_0x351dc1(0x226)](_0x19e0b0=>this[_0x351dc1(0x1e5)][_0x351dc1(0x1c3)](_0x5d2618,_0x19e0b0,_0x52b3d4[_0x19e0b0]))),_0x891589=_0x4bdf40[_0x351dc1(0x226)]((_0x115c69,_0x2fe342)=>_0x115c69[_0x351dc1(0x1cd)]===_0x351dc1(0x209)?_0x160374[_0x2fe342]:null)['filter'](_0x109982=>_0x109982!==null);if(_0x891589[_0x351dc1(0x225)]>0x0)throw new SDKError(ErrorCode[_0x351dc1(0x20d)],_0x351dc1(0x1f8)+(_0x891589[_0x351dc1(0x225)]>0x1?'s':'')+':\x20'+_0x891589[_0x351dc1(0x20b)](',\x20'));return{'projectName':_0x1ee8e3,'keys':_0x160374};}async[a192_0x20786a(0x1de)](_0xd3ff09,_0x16d4c2){const _0x33ed05=a192_0x20786a,{id:_0x19d762,name:_0x2241e2}=await this[_0x33ed05(0x1d7)](_0xd3ff09);return await this[_0x33ed05(0x1e5)][_0x33ed05(0x1de)](_0x19d762,_0x16d4c2),{'projectName':_0x2241e2,'key':_0x16d4c2};}async[a192_0x20786a(0x1db)](_0x250670,_0x373b2a){const _0x874f5f=a192_0x20786a;return pullWorkflow({'client':this['client'],'resolveProjectId':this['resolveProjectId'][_0x874f5f(0x1ec)](this)},_0x250670,_0x373b2a);}async['applyPullProject'](_0x588a6,_0xe48e8b){const _0x35fe3a=a192_0x20786a;return applyPullResult({'client':this[_0x35fe3a(0x1e5)],'resolveProjectId':this[_0x35fe3a(0x1d7)][_0x35fe3a(0x1ec)](this)},_0x588a6,_0xe48e8b);}async[a192_0x20786a(0x1eb)](_0x1a0bbf){const _0xe2dbc3=a192_0x20786a;return preparePushWorkflow({'client':this[_0xe2dbc3(0x1e5)],'resolveProjectId':this[_0xe2dbc3(0x1d7)][_0xe2dbc3(0x1ec)](this)},_0x1a0bbf);}async['executePushProject'](_0x1022a0){const _0x255c7d=a192_0x20786a;return executePushWorkflow({'client':this[_0x255c7d(0x1e5)],'resolveProjectId':this[_0x255c7d(0x1d7)]['bind'](this)},_0x1022a0);}async[a192_0x20786a(0x22e)](_0x1773f1,_0x175751,_0x56a705){return prepareCloneWorkflow({'client':this['client']},_0x1773f1,_0x175751,_0x56a705);}async['executeCloneProject'](_0x5f2fe6){return executeCloneWorkflow({'client':this['client']},_0x5f2fe6);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a193_0x4f3c(_0x1e0da0,_0x385036){_0x1e0da0=_0x1e0da0-0xf6;const _0x1c0a6e=a193_0x1c0a();let _0x4f3c61=_0x1c0a6e[_0x1e0da0];return _0x4f3c61;}(function(_0x200dcd,_0x135046){const _0x3738f=a193_0x4f3c,_0x87efdd=_0x200dcd();while(!![]){try{const _0x6a1db3=parseInt(_0x3738f(0x110))/0x1*(-parseInt(_0x3738f(0x10d))/0x2)+parseInt(_0x3738f(0x119))/0x3+-parseInt(_0x3738f(0xf6))/0x4+parseInt(_0x3738f(0x100))/0x5+-parseInt(_0x3738f(0x115))/0x6*(parseInt(_0x3738f(0x126))/0x7)+parseInt(_0x3738f(0x12a))/0x8+parseInt(_0x3738f(0x10b))/0x9;if(_0x6a1db3===_0x135046)break;else _0x87efdd['push'](_0x87efdd['shift']());}catch(_0x21244c){_0x87efdd['push'](_0x87efdd['shift']());}}}(a193_0x1c0a,0xbc5ae));import{existsSync,promises as a193_0x28577d}from'fs';import a193_0x254276 from'path';import a193_0x1317a0 from'os';import{generateDiff,formatDiffWithColors,hasChanges}from'../../utils/diff.js';import{getWorkflowProjectDir,createWorkflowTdxConfigContent,updateWorkflowTdxConfig}from'./tdx-config.js';import{SDKError,ErrorCode}from'../errors.js';export async function pullWorkflow(_0x310e73,_0xd649e6,_0x2cdfee={}){const _0x32b7f5=a193_0x4f3c,_0x552a93=await import(_0x32b7f5(0x106)),{client:_0x3e7af2,resolveProjectId:_0x4cfffd}=_0x310e73,{id:_0x359bd5,name:_0x2396de}=await _0x4cfffd(_0xd649e6),_0x255c1d=_0x2cdfee['baseDir']||process[_0x32b7f5(0x10a)](),_0x1fc1a4=_0x2cdfee[_0x32b7f5(0x12c)]||getWorkflowProjectDir(_0x2396de,_0x255c1d),_0x14d0b4=a193_0x254276['join'](_0x1fc1a4,_0x32b7f5(0x114)),_0x14101a=!existsSync(_0x14d0b4),_0x155f01=await a193_0x28577d[_0x32b7f5(0xfc)](a193_0x254276[_0x32b7f5(0xfb)](a193_0x1317a0[_0x32b7f5(0x117)](),_0x32b7f5(0xf8))),_0x2c009e=a193_0x254276[_0x32b7f5(0xfb)](_0x155f01,'archive.tar.gz'),_0x324d5a=a193_0x254276[_0x32b7f5(0xfb)](_0x155f01,_0x32b7f5(0x124));try{await _0x3e7af2[_0x32b7f5(0x11d)](_0x359bd5,_0x2c009e,_0x2cdfee[_0x32b7f5(0x105)]),await a193_0x28577d[_0x32b7f5(0xfe)](_0x324d5a,{'recursive':!![]});try{await _0x552a93['extract']({'file':_0x2c009e,'cwd':_0x324d5a,'gzip':!![]});}catch(_0x524604){const _0x189cc3=_0x524604 instanceof Error?_0x524604['message']:String(_0x524604);if(_0x189cc3[_0x32b7f5(0x113)](_0x32b7f5(0x116))||_0x189cc3[_0x32b7f5(0x113)](_0x32b7f5(0x129))){const _0x1180e0=await a193_0x28577d['stat'](_0x2c009e)[_0x32b7f5(0x111)](()=>null),_0x5942ce=_0x1180e0?_0x32b7f5(0x10e)+_0x1180e0['size']+'\x20bytes)':'';throw new SDKError(ErrorCode[_0x32b7f5(0x12b)],'Failed\x20to\x20extract\x20project\x20archive'+_0x5942ce+':\x20'+_0x189cc3,_0x524604,{'helpText':_0x32b7f5(0x104)+_0x32b7f5(0x10f)});}throw _0x524604;}const _0x20db87=await _0x3e7af2['getProject'](_0x359bd5),_0x424bc9=_0x2cdfee[_0x32b7f5(0x105)]||_0x20db87[_0x32b7f5(0x105)]||_0x32b7f5(0x122),_0x15f920=await calculateChanges(_0x1fc1a4,_0x324d5a,_0x14101a),_0x554801={'new':_0x15f920[_0x32b7f5(0x109)](_0x32db8b=>_0x32db8b['type']===_0x32b7f5(0x11b))[_0x32b7f5(0x123)],'modified':_0x15f920[_0x32b7f5(0x109)](_0x415353=>_0x415353[_0x32b7f5(0x102)]===_0x32b7f5(0x11e))[_0x32b7f5(0x123)],'deleted':_0x15f920['filter'](_0x96c853=>_0x96c853[_0x32b7f5(0x102)]===_0x32b7f5(0x11a))[_0x32b7f5(0x123)],'unchanged':_0x15f920[_0x32b7f5(0x109)](_0x39de20=>_0x39de20[_0x32b7f5(0x102)]===_0x32b7f5(0x10c))[_0x32b7f5(0x123)]};return{'projectName':_0x2396de,'projectId':_0x359bd5,'revision':_0x424bc9,'targetDir':_0x1fc1a4,'changes':_0x15f920,'summary':_0x554801,'hasChanges':_0x554801[_0x32b7f5(0x11b)]>0x0||_0x554801[_0x32b7f5(0x11e)]>0x0||_0x554801[_0x32b7f5(0x11a)]>0x0,'isNewProject':_0x14101a};}finally{await a193_0x28577d['rm'](_0x155f01,{'recursive':!![],'force':!![]});}}export async function applyPullResult(_0x115f91,_0x281801,_0x46e453={}){const _0x37f08f=a193_0x4f3c,_0x59c9a8=await import(_0x37f08f(0x106)),{client:_0x2f3a6a}=_0x115f91,_0x207f24=await a193_0x28577d[_0x37f08f(0xfc)](a193_0x254276['join'](a193_0x1317a0[_0x37f08f(0x117)](),_0x37f08f(0xfd))),_0x1e98bf=a193_0x254276[_0x37f08f(0xfb)](_0x207f24,'archive.tar.gz');try{await _0x2f3a6a['downloadProjectArchive'](_0x281801[_0x37f08f(0x112)],_0x1e98bf,_0x46e453[_0x37f08f(0x105)]),await a193_0x28577d['mkdir'](_0x281801[_0x37f08f(0x12c)],{'recursive':!![]});for(const _0x371f1d of _0x281801[_0x37f08f(0x125)]){if(_0x371f1d[_0x37f08f(0x102)]===_0x37f08f(0x11a)){const _0x4c38b4=a193_0x254276[_0x37f08f(0xfb)](_0x281801[_0x37f08f(0x12c)],_0x371f1d['path']);await a193_0x28577d['unlink'](_0x4c38b4)['catch'](()=>{});}}try{await _0x59c9a8['extract']({'file':_0x1e98bf,'cwd':_0x281801[_0x37f08f(0x12c)],'gzip':!![]});}catch(_0x5a19e9){const _0x420c0a=_0x5a19e9 instanceof Error?_0x5a19e9[_0x37f08f(0x11c)]:String(_0x5a19e9);if(_0x420c0a[_0x37f08f(0x113)](_0x37f08f(0x116))||_0x420c0a[_0x37f08f(0x113)](_0x37f08f(0x129))){const _0xeaf11d=await a193_0x28577d[_0x37f08f(0xf7)](_0x1e98bf)['catch'](()=>null),_0x2cdb73=_0xeaf11d?'\x20(archive\x20size:\x20'+_0xeaf11d['size']+_0x37f08f(0x118):'';throw new SDKError(ErrorCode[_0x37f08f(0x12b)],'Failed\x20to\x20extract\x20project\x20archive'+_0x2cdb73+':\x20'+_0x420c0a,_0x5a19e9,{'helpText':_0x37f08f(0x104)+_0x37f08f(0x10f)});}throw _0x5a19e9;}const _0x5cc96d=a193_0x254276[_0x37f08f(0xfb)](_0x281801['targetDir'],_0x37f08f(0x114));if(_0x281801['isNewProject']){const _0x5b906e=createWorkflowTdxConfigContent(_0x281801[_0x37f08f(0x121)],_0x281801['projectId'],_0x281801[_0x37f08f(0x105)]);await a193_0x28577d[_0x37f08f(0x103)](_0x5cc96d,_0x5b906e,_0x37f08f(0x11f));}else updateWorkflowTdxConfig(_0x5cc96d,{'last_pulled_revision':_0x281801[_0x37f08f(0x105)],'last_pulled_at':new Date()['toISOString']()});}finally{await a193_0x28577d['rm'](_0x207f24,{'recursive':!![],'force':!![]});}}async function calculateChanges(_0x463a6a,_0x14d97c,_0x3f367a){const _0x1a9c5d=a193_0x4f3c,_0x5f3efd=[],_0x31968e=await getAllFiles(_0x14d97c),_0x248478=existsSync(_0x463a6a)?await getAllFiles(_0x463a6a):new Set();for(const _0x3e08b3 of _0x31968e){const _0xb8a235=a193_0x254276['join'](_0x463a6a,_0x3e08b3),_0xd96c18=a193_0x254276[_0x1a9c5d(0xfb)](_0x14d97c,_0x3e08b3);if(_0x3e08b3===_0x1a9c5d(0x114))continue;const _0xf63381=await a193_0x28577d[_0x1a9c5d(0x120)](_0xd96c18,_0x1a9c5d(0x11f))[_0x1a9c5d(0x111)](()=>null);if(_0xf63381===null)continue;if(!existsSync(_0xb8a235)||_0x3f367a)_0x5f3efd[_0x1a9c5d(0x127)]({'path':_0x3e08b3,'type':_0x1a9c5d(0x11b),'newContent':_0xf63381});else{const _0x13e589=await a193_0x28577d[_0x1a9c5d(0x120)](_0xb8a235,'utf-8')[_0x1a9c5d(0x111)](()=>null);if(_0x13e589===null)_0x5f3efd[_0x1a9c5d(0x127)]({'path':_0x3e08b3,'type':_0x1a9c5d(0x11e),'newContent':_0xf63381});else{if(_0x13e589!==_0xf63381){const _0x32a25b=generateDiff(_0x13e589,_0xf63381),_0x42faa0=hasChanges(_0x32a25b)?formatDiffWithColors(_0x32a25b):undefined;_0x5f3efd['push']({'path':_0x3e08b3,'type':_0x1a9c5d(0x11e),'oldContent':_0x13e589,'newContent':_0xf63381,'diff':_0x42faa0});}else _0x5f3efd[_0x1a9c5d(0x127)]({'path':_0x3e08b3,'type':_0x1a9c5d(0x10c)});}}}if(!_0x3f367a)for(const _0x492d5e of _0x248478){if(_0x492d5e===_0x1a9c5d(0x114))continue;if(!_0x31968e[_0x1a9c5d(0xf9)](_0x492d5e)){const _0x24c169=a193_0x254276[_0x1a9c5d(0xfb)](_0x463a6a,_0x492d5e),_0x2867f4=await a193_0x28577d['readFile'](_0x24c169,_0x1a9c5d(0x11f))[_0x1a9c5d(0x111)](()=>undefined);_0x5f3efd['push']({'path':_0x492d5e,'type':'deleted','oldContent':_0x2867f4});}}return _0x5f3efd[_0x1a9c5d(0x101)]((_0x29046b,_0x24ab49)=>_0x29046b[_0x1a9c5d(0xfa)][_0x1a9c5d(0x128)](_0x24ab49[_0x1a9c5d(0xfa)])),_0x5f3efd;}async function getAllFiles(_0x4eee59,_0x20c177=''){const _0x56db9e=a193_0x4f3c,_0x4afadf=new Set();if(!existsSync(_0x4eee59))return _0x4afadf;const _0x280bcd=await a193_0x28577d[_0x56db9e(0x108)](_0x4eee59,{'withFileTypes':!![]});for(const _0x10bda3 of _0x280bcd){const _0x15333e=_0x20c177?a193_0x254276[_0x56db9e(0xfb)](_0x20c177,_0x10bda3[_0x56db9e(0x107)]):_0x10bda3[_0x56db9e(0x107)];if(_0x10bda3['isDirectory']()){const _0x4b7458=await getAllFiles(a193_0x254276[_0x56db9e(0xfb)](_0x4eee59,_0x10bda3[_0x56db9e(0x107)]),_0x15333e);for(const _0xa8f4c9 of _0x4b7458){_0x4afadf[_0x56db9e(0xff)](_0xa8f4c9);}}else _0x4afadf[_0x56db9e(0xff)](_0x15333e);}return _0x4afadf;}function a193_0x1c0a(){const _0x466d41=['tar','name','readdir','filter','cwd','6278958XxpobJ','unchanged','2jOfjzy','\x20(archive\x20size:\x20','The\x20archive\x20may\x20be\x20truncated\x20or\x20corrupted.\x20Try\x20pushing\x20a\x20new\x20revision\x20or\x20contact\x20support.','719309vuYNOQ','catch','projectId','includes','tdx.json','12IanIyD','TAR_BAD_ARCHIVE','tmpdir','\x20bytes)','1556817UENSfI','deleted','new','message','downloadProjectArchive','modified','utf-8','readFile','projectName','latest','length','extracted','changes','3999639TiAUEZ','push','localeCompare','zlib','10361704nGXKYq','WORKFLOW_ARCHIVE_CORRUPTED','targetDir','3890916LXWSoI','stat','tdx-wf-pull-','has','path','join','mkdtemp','tdx-wf-apply-','mkdir','add','5472400afVuxo','sort','type','writeFile','The\x20archive\x20passed\x20initial\x20validation\x20but\x20extraction\x20failed.\x20','revision'];a193_0x1c0a=function(){return _0x466d41;};return a193_0x1c0a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x29a11d,_0x1ea3e1){const _0x234181=a194_0x49bf,_0x5c7b73=_0x29a11d();while(!![]){try{const _0x28dd13=parseInt(_0x234181(0x1e0))/0x1*(parseInt(_0x234181(0x1e9))/0x2)+parseInt(_0x234181(0x1ed))/0x3+-parseInt(_0x234181(0x213))/0x4*(-parseInt(_0x234181(0x1e1))/0x5)+-parseInt(_0x234181(0x1f7))/0x6*(-parseInt(_0x234181(0x205))/0x7)+parseInt(_0x234181(0x1f4))/0x8+parseInt(_0x234181(0x1f0))/0x9*(-parseInt(_0x234181(0x1eb))/0xa)+-parseInt(_0x234181(0x1f6))/0xb;if(_0x28dd13===_0x1ea3e1)break;else _0x5c7b73['push'](_0x5c7b73['shift']());}catch(_0x281be1){_0x5c7b73['push'](_0x5c7b73['shift']());}}}(a194_0x20fe,0x29d6b));import{promises as a194_0x357ef0}from'fs';import a194_0x431a85 from'path';import a194_0x3aff4f from'os';import{generateDiff,formatDiffWithColors,hasChanges}from'../../utils/diff.js';import{findWorkflowTdxConfig,updateWorkflowTdxConfig}from'./tdx-config.js';function a194_0x20fe(){const _0x2b0495=['includes','catch','type','name','readFile','unchanged','readdir','modified','tdx.json','TAR_BAD_ARCHIVE','840XQgnAM','configResult','Use\x20\x27tdx\x20wf\x20upload\x27\x20to\x20force\x20push\x20without\x20comparison.','tdx-wf-push-','message','new','toISOString','1zChPqY','5755xAMCAr','extract','length','mkdtemp','extracted','\x20(archive\x20size:\x20','create','configPath','92014TEwcEd','stat','1831100ywoqaL','\x20workflow\x20files\x20found\x20in\x20','354999bvQkgl','push','\x20bytes)','9epFaHP','workflow_project','No\x20','join','1374632CzdhRk','replace','4006761OoqOxu','9714JYeDWQ','tar','uploadProjectArchive','revision','utf-8','isDirectory','filter','sourceDir','Failed\x20to\x20extract\x20remote\x20project\x20archive\x20for\x20comparison','path','tmpdir','WORKFLOW_ARCHIVE_CORRUPTED','localeCompare','deleted','609COMkGC','size','posix','cwd'];a194_0x20fe=function(){return _0x2b0495;};return a194_0x20fe();}import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION,loadDigdagignore,createIgnoreInstance,addScopedPatterns,shouldIgnoreWithInstance}from'./workflow-utils.js';import{SDKError,ErrorCode}from'../errors.js';export async function preparePushWorkflow(_0x4449c8,_0x176ed0={}){const _0x5e835f=a194_0x49bf,_0x1beb24=await import(_0x5e835f(0x1f8)),{client:_0x11dbdf,resolveProjectId:_0x426749}=_0x4449c8,_0x32bc96=_0x176ed0[_0x5e835f(0x1fe)]||process[_0x5e835f(0x208)](),_0x47a741=findWorkflowTdxConfig(_0x32bc96),{config:_0x143073,configDir:_0x52f755}=_0x47a741;let _0x2e55a1,_0x5865a3=_0x143073[_0x5e835f(0x1f1)];try{const _0x3dd882=await _0x426749(_0x143073['workflow_project']);_0x2e55a1=_0x3dd882['id'],_0x5865a3=_0x3dd882[_0x5e835f(0x20c)];}catch{_0x2e55a1='';}const _0x33c6f7=_0x176ed0[_0x5e835f(0x1fa)]||new Date()[_0x5e835f(0x1df)]()[_0x5e835f(0x1f5)](/[:.]/g,'-');if(!_0x176ed0['skipValidation']){const _0x3b33dc=await a194_0x357ef0['readdir'](_0x52f755),_0x7de748=_0x3b33dc[_0x5e835f(0x1fd)](_0x26064f=>_0x26064f['endsWith'](WORKFLOW_FILE_EXTENSION));if(_0x7de748[_0x5e835f(0x1e3)]===0x0)throw new Error(_0x5e835f(0x1f2)+WORKFLOW_FILE_EXTENSION+_0x5e835f(0x1ec)+_0x52f755);}const _0x10d198=await getProjectFiles(_0x52f755);let _0x3351a6;if(_0x2e55a1){const _0x1ed1e8=await a194_0x357ef0['mkdtemp'](a194_0x431a85['join'](a194_0x3aff4f[_0x5e835f(0x201)](),_0x5e835f(0x216))),_0x541600=a194_0x431a85[_0x5e835f(0x1f3)](_0x1ed1e8,'archive.tar.gz'),_0x529375=a194_0x431a85['join'](_0x1ed1e8,_0x5e835f(0x1e5));try{await _0x11dbdf['downloadProjectArchive'](_0x2e55a1,_0x541600),await a194_0x357ef0['mkdir'](_0x529375,{'recursive':!![]});try{await _0x1beb24[_0x5e835f(0x1e2)]({'file':_0x541600,'cwd':_0x529375,'gzip':!![]});}catch(_0x115393){const _0x2a8039=_0x115393 instanceof Error?_0x115393[_0x5e835f(0x217)]:String(_0x115393);if(_0x2a8039[_0x5e835f(0x209)](_0x5e835f(0x212))||_0x2a8039['includes']('zlib')){const _0x5b5d88=await a194_0x357ef0[_0x5e835f(0x1ea)](_0x541600)[_0x5e835f(0x20a)](()=>null),_0x4c1bbc=_0x5b5d88?_0x5e835f(0x1e6)+_0x5b5d88[_0x5e835f(0x206)]+_0x5e835f(0x1ef):'';throw new SDKError(ErrorCode[_0x5e835f(0x202)],_0x5e835f(0x1ff)+_0x4c1bbc+':\x20'+_0x2a8039,_0x115393,{'helpText':_0x5e835f(0x215)});}throw _0x115393;}_0x3351a6=await calculatePushChanges(_0x52f755,_0x529375,_0x10d198);}finally{await a194_0x357ef0['rm'](_0x1ed1e8,{'recursive':!![],'force':!![]});}}else{_0x3351a6=[];for(const _0x5d8fa4 of _0x10d198){const _0x475919=a194_0x431a85[_0x5e835f(0x1f3)](_0x52f755,_0x5d8fa4),_0x817942=await a194_0x357ef0[_0x5e835f(0x20d)](_0x475919,_0x5e835f(0x1fb))['catch'](()=>null);_0x3351a6[_0x5e835f(0x1ee)]({'path':_0x5d8fa4,'type':_0x5e835f(0x1de),'newContent':_0x817942||undefined});}}const _0x582c6d={'new':_0x3351a6['filter'](_0x249e04=>_0x249e04[_0x5e835f(0x20b)]===_0x5e835f(0x1de))[_0x5e835f(0x1e3)],'modified':_0x3351a6[_0x5e835f(0x1fd)](_0x3f3676=>_0x3f3676[_0x5e835f(0x20b)]===_0x5e835f(0x210))[_0x5e835f(0x1e3)],'deleted':_0x3351a6['filter'](_0x26e303=>_0x26e303[_0x5e835f(0x20b)]===_0x5e835f(0x204))[_0x5e835f(0x1e3)],'unchanged':_0x3351a6[_0x5e835f(0x1fd)](_0x439e90=>_0x439e90[_0x5e835f(0x20b)]==='unchanged')['length']};return{'projectName':_0x5865a3,'projectId':_0x2e55a1,'revision':_0x33c6f7,'sourceDir':_0x52f755,'changes':_0x3351a6,'summary':_0x582c6d,'hasChanges':_0x582c6d[_0x5e835f(0x1de)]>0x0||_0x582c6d[_0x5e835f(0x210)]>0x0||_0x582c6d[_0x5e835f(0x204)]>0x0,'configResult':_0x47a741};}export async function executePushWorkflow(_0x1ebbe4,_0x4e08b6){const _0x114a79=a194_0x49bf,_0x218be9=await import(_0x114a79(0x1f8)),{client:_0x3ecae8}=_0x1ebbe4,_0x1d9c95=await getProjectFiles(_0x4e08b6[_0x114a79(0x1fe)]),_0x1c8756=await a194_0x357ef0[_0x114a79(0x1e4)](a194_0x431a85['join'](a194_0x3aff4f[_0x114a79(0x201)](),'tdx-wf-push-archive-')),_0x4f82e4=a194_0x431a85[_0x114a79(0x1f3)](_0x1c8756,'archive.tar.gz');try{await _0x218be9[_0x114a79(0x1e7)]({'file':_0x4f82e4,'gzip':!![],'cwd':_0x4e08b6[_0x114a79(0x1fe)],'portable':!![]},_0x1d9c95);const _0xa407b9=await _0x3ecae8[_0x114a79(0x1f9)](_0x4e08b6['projectName'],_0x4e08b6[_0x114a79(0x1fa)],_0x4f82e4);return updateWorkflowTdxConfig(_0x4e08b6[_0x114a79(0x214)][_0x114a79(0x1e8)],{'workflow_project_id':_0xa407b9['id'],'last_pushed_revision':_0xa407b9['revision'],'last_pushed_at':new Date()[_0x114a79(0x1df)]()}),{'projectId':_0xa407b9['id'],'projectName':_0xa407b9[_0x114a79(0x20c)],'revision':_0xa407b9[_0x114a79(0x1fa)]};}finally{await a194_0x357ef0['rm'](_0x1c8756,{'recursive':!![],'force':!![]});}}function a194_0x49bf(_0x4db6f6,_0x30b071){_0x4db6f6=_0x4db6f6-0x1de;const _0x20fef5=a194_0x20fe();let _0x49bf6b=_0x20fef5[_0x4db6f6];return _0x49bf6b;}async function getProjectFiles(_0x44174c,_0x4a72d1=_0x44174c,_0x493fac='',_0x88c04a=null){const _0x499528=a194_0x49bf,_0xd596c0=[];if(_0x88c04a===null){_0x88c04a=createIgnoreInstance();const _0x7c5f12=await loadDigdagignore(_0x44174c);_0x7c5f12&&_0x88c04a['add'](_0x7c5f12);}if(_0x493fac!==''){const _0x589924=await loadDigdagignore(_0x4a72d1);_0x589924&&addScopedPatterns(_0x88c04a,_0x589924,_0x493fac);}const _0x2bae3b=await a194_0x357ef0[_0x499528(0x20f)](_0x4a72d1,{'withFileTypes':!![]});for(const _0x41eb8b of _0x2bae3b){const _0x476dde=_0x493fac?a194_0x431a85[_0x499528(0x207)]['join'](_0x493fac,_0x41eb8b[_0x499528(0x20c)]):_0x41eb8b['name'];if(_0x41eb8b[_0x499528(0x20c)]===_0x499528(0x211))continue;if(_0x41eb8b[_0x499528(0x20c)]==='.digdagignore')continue;if(!shouldIncludeInArchive(_0x41eb8b[_0x499528(0x20c)]))continue;if(shouldIgnoreWithInstance(_0x88c04a,_0x476dde,_0x41eb8b[_0x499528(0x1fc)]()))continue;if(_0x41eb8b[_0x499528(0x1fc)]()){const _0x517a4f=await getProjectFiles(_0x44174c,a194_0x431a85[_0x499528(0x1f3)](_0x4a72d1,_0x41eb8b['name']),_0x476dde,_0x88c04a);_0xd596c0[_0x499528(0x1ee)](..._0x517a4f);}else _0xd596c0[_0x499528(0x1ee)](_0x476dde);}return _0xd596c0;}async function calculatePushChanges(_0xd9669c,_0x1bc1c0,_0x3bdcb5){const _0x40cf3e=a194_0x49bf,_0x18b306=[],_0x5e106a=new Set(await getProjectFiles(_0x1bc1c0));for(const _0x4d5f8e of _0x3bdcb5){const _0x309b93=a194_0x431a85[_0x40cf3e(0x1f3)](_0xd9669c,_0x4d5f8e),_0xbd59f1=a194_0x431a85[_0x40cf3e(0x1f3)](_0x1bc1c0,_0x4d5f8e),_0x48b08b=await a194_0x357ef0[_0x40cf3e(0x20d)](_0x309b93,_0x40cf3e(0x1fb))[_0x40cf3e(0x20a)](()=>null);if(_0x48b08b===null)continue;if(!_0x5e106a['has'](_0x4d5f8e))_0x18b306[_0x40cf3e(0x1ee)]({'path':_0x4d5f8e,'type':_0x40cf3e(0x1de),'newContent':_0x48b08b});else{const _0x46f415=await a194_0x357ef0[_0x40cf3e(0x20d)](_0xbd59f1,'utf-8')[_0x40cf3e(0x20a)](()=>null);if(_0x46f415===null)_0x18b306[_0x40cf3e(0x1ee)]({'path':_0x4d5f8e,'type':_0x40cf3e(0x210),'newContent':_0x48b08b});else{if(_0x46f415!==_0x48b08b){const _0x472da1=generateDiff(_0x46f415,_0x48b08b),_0x47536e=hasChanges(_0x472da1)?formatDiffWithColors(_0x472da1):undefined;_0x18b306[_0x40cf3e(0x1ee)]({'path':_0x4d5f8e,'type':_0x40cf3e(0x210),'oldContent':_0x46f415,'newContent':_0x48b08b,'diff':_0x47536e});}else _0x18b306['push']({'path':_0x4d5f8e,'type':_0x40cf3e(0x20e)});}}}for(const _0x534030 of _0x5e106a){if(!_0x3bdcb5[_0x40cf3e(0x209)](_0x534030)){const _0x5661e6=a194_0x431a85[_0x40cf3e(0x1f3)](_0x1bc1c0,_0x534030),_0x3a1621=await a194_0x357ef0[_0x40cf3e(0x20d)](_0x5661e6,_0x40cf3e(0x1fb))[_0x40cf3e(0x20a)](()=>undefined);_0x18b306[_0x40cf3e(0x1ee)]({'path':_0x534030,'type':_0x40cf3e(0x204),'oldContent':_0x3a1621});}}return _0x18b306['sort']((_0x201099,_0x7c7752)=>_0x201099[_0x40cf3e(0x200)][_0x40cf3e(0x203)](_0x7c7752['path'])),_0x18b306;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a195_0x56bcfc=a195_0x5846;(function(_0x477298,_0x11a36a){const _0x3630c3=a195_0x5846,_0x4068e1=_0x477298();while(!![]){try{const _0x1ffec2=parseInt(_0x3630c3(0xfb))/0x1+-parseInt(_0x3630c3(0x106))/0x2+-parseInt(_0x3630c3(0x107))/0x3*(parseInt(_0x3630c3(0x10c))/0x4)+parseInt(_0x3630c3(0x101))/0x5+-parseInt(_0x3630c3(0x10f))/0x6*(-parseInt(_0x3630c3(0x10d))/0x7)+parseInt(_0x3630c3(0xf8))/0x8*(parseInt(_0x3630c3(0x10a))/0x9)+parseInt(_0x3630c3(0xf9))/0xa;if(_0x1ffec2===_0x11a36a)break;else _0x4068e1['push'](_0x4068e1['shift']());}catch(_0x203023){_0x4068e1['push'](_0x4068e1['shift']());}}}(a195_0xaa87,0x5ff0a));import{existsSync,readFileSync,writeFileSync}from'fs';import a195_0x4e839d from'path';const TDX_CONFIG_FILE=a195_0x56bcfc(0x108),WORKFLOWS_DIR=a195_0x56bcfc(0x10e);export function findWorkflowTdxConfigPath(_0x32d96a=process['cwd']()){const _0xe659c6=a195_0x56bcfc;let _0x2964b3=a195_0x4e839d[_0xe659c6(0xfd)](_0x32d96a);const _0x18c708=a195_0x4e839d[_0xe659c6(0xf6)](_0x2964b3)['root'];while(_0x2964b3!==_0x18c708){const _0x5bf6da=a195_0x4e839d[_0xe659c6(0xf4)](_0x2964b3,TDX_CONFIG_FILE);if(existsSync(_0x5bf6da))try{const _0x49eb7d=readFileSync(_0x5bf6da,_0xe659c6(0xff)),_0x3e1468=JSON[_0xe659c6(0xf6)](_0x49eb7d);if(_0x3e1468&&typeof _0x3e1468==='object'&&'workflow_project'in _0x3e1468)return _0x5bf6da;}catch{}_0x2964b3=a195_0x4e839d[_0xe659c6(0xfa)](_0x2964b3);}return null;}export function loadWorkflowTdxConfig(_0x4b6a06){const _0x3a5e47=a195_0x56bcfc,_0x490c66=readFileSync(_0x4b6a06,'utf-8');let _0x368333;try{_0x368333=JSON['parse'](_0x490c66);}catch{throw new Error(_0x3a5e47(0xfe)+_0x4b6a06);}if(!_0x368333||typeof _0x368333!=='object')throw new Error(_0x3a5e47(0xf7));const _0x890db6=_0x368333;if(!_0x890db6[_0x3a5e47(0xfc)]||typeof _0x890db6['workflow_project']!==_0x3a5e47(0x102))throw new Error(_0x3a5e47(0xf5));return{'workflow_project':_0x890db6['workflow_project'],'workflow_project_id':typeof _0x890db6[_0x3a5e47(0x109)]==='string'?_0x890db6[_0x3a5e47(0x109)]:undefined,'last_pulled_revision':typeof _0x890db6['last_pulled_revision']===_0x3a5e47(0x102)?_0x890db6[_0x3a5e47(0x110)]:undefined,'last_pulled_at':typeof _0x890db6[_0x3a5e47(0x104)]==='string'?_0x890db6['last_pulled_at']:undefined,'last_pushed_revision':typeof _0x890db6[_0x3a5e47(0x112)]===_0x3a5e47(0x102)?_0x890db6[_0x3a5e47(0x112)]:undefined,'last_pushed_at':typeof _0x890db6[_0x3a5e47(0x105)]===_0x3a5e47(0x102)?_0x890db6[_0x3a5e47(0x105)]:undefined};}function a195_0xaa87(){const _0x5876bf=['8nEBhEv','716650BOFDUL','dirname','45806VmAwkJ','workflow_project','resolve','Invalid\x20JSON\x20in\x20','utf-8','No\x20workflow\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.','3096895BlpaaT','string','stringify','last_pulled_at','last_pushed_at','1203988yDOniK','1607862bxYsNj','tdx.json','workflow_project_id','4158045ZOUIwP','toISOString','4kviIka','7dwspDh','workflows','1992378ndEDPu','last_pulled_revision','cwd','last_pushed_revision','join','Invalid\x20tdx.json:\x20missing\x20or\x20invalid\x20\x27workflow_project\x27\x20field','parse','Invalid\x20tdx.json:\x20expected\x20object'];a195_0xaa87=function(){return _0x5876bf;};return a195_0xaa87();}export function findWorkflowTdxConfig(_0x4ad402=process[a195_0x56bcfc(0x111)]()){const _0x3cee41=a195_0x56bcfc,_0xbee926=findWorkflowTdxConfigPath(_0x4ad402);if(!_0xbee926)throw new Error(_0x3cee41(0x100));const _0x1ffe1a=loadWorkflowTdxConfig(_0xbee926),_0xdeb3af=a195_0x4e839d[_0x3cee41(0xfa)](_0xbee926);return{'config':_0x1ffe1a,'configPath':_0xbee926,'configDir':_0xdeb3af};}export function tryFindWorkflowTdxConfig(_0x1dc921){try{return findWorkflowTdxConfig(_0x1dc921);}catch{return null;}}export function getWorkflowProjectDir(_0x2fd051,_0x4e11f5=process['cwd']()){const _0x5500b6=a195_0x56bcfc;return a195_0x4e839d[_0x5500b6(0xf4)](_0x4e11f5,WORKFLOWS_DIR,_0x2fd051);}function a195_0x5846(_0x435c60,_0x821905){_0x435c60=_0x435c60-0xf4;const _0xaa8703=a195_0xaa87();let _0x58464b=_0xaa8703[_0x435c60];return _0x58464b;}export function getWorkflowTdxConfigPath(_0x41f811,_0x1723e7=process[a195_0x56bcfc(0x111)]()){const _0x5343b7=a195_0x56bcfc;return a195_0x4e839d[_0x5343b7(0xf4)](getWorkflowProjectDir(_0x41f811,_0x1723e7),TDX_CONFIG_FILE);}export function createWorkflowTdxConfigContent(_0x3b1c8f,_0x6f659a,_0x286cac){const _0x5a7093=a195_0x56bcfc,_0xdcd953={'workflow_project':_0x3b1c8f,..._0x6f659a&&{'workflow_project_id':_0x6f659a},..._0x286cac&&{'last_pulled_revision':_0x286cac},'last_pulled_at':new Date()[_0x5a7093(0x10b)]()};return JSON[_0x5a7093(0x103)](_0xdcd953,null,0x2)+'\x0a';}export function saveWorkflowTdxConfig(_0x340026,_0x402183){const _0x9283d2=a195_0x56bcfc,_0x46e66c=JSON[_0x9283d2(0x103)](_0x402183,null,0x2)+'\x0a';writeFileSync(_0x340026,_0x46e66c,_0x9283d2(0xff));}export function updateWorkflowTdxConfig(_0x85af6b,_0x4823e4){const _0x1cc88c=loadWorkflowTdxConfig(_0x85af6b),_0x4e218f={..._0x1cc88c,..._0x4823e4};saveWorkflowTdxConfig(_0x85af6b,_0x4e218f);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x35c366,_0x3589e7){const _0x47cc04=a196_0x338a,_0x3a4794=_0x35c366();while(!![]){try{const _0xa79218=parseInt(_0x47cc04(0x195))/0x1+parseInt(_0x47cc04(0x199))/0x2+-parseInt(_0x47cc04(0x18b))/0x3+parseInt(_0x47cc04(0x198))/0x4+parseInt(_0x47cc04(0x194))/0x5+-parseInt(_0x47cc04(0x19a))/0x6*(-parseInt(_0x47cc04(0x19c))/0x7)+-parseInt(_0x47cc04(0x192))/0x8;if(_0xa79218===_0x3589e7)break;else _0x3a4794['push'](_0x3a4794['shift']());}catch(_0x30cd8f){_0x3a4794['push'](_0x3a4794['shift']());}}}(a196_0x49de,0x95c9a));function a196_0x49de(){const _0x592546=['length','startsWith','2116533RqAJTO','Thumbs.db','ENOENT','trim','add','endsWith','map','21209864BmOREV','utf-8','836300aMQeYX','1206918HGNyVA','.digdagignore','join','4384320pTPNfU','2174550PacfJu','2476446MnWhml','split','7ieIcMU','filter','code','slice','replace','readFile','.digdag'];a196_0x49de=function(){return _0x592546;};return a196_0x49de();}import{promises as a196_0x390e0d}from'fs';import a196_0x332d55 from'path';import a196_0x250b3e from'ignore';export const WORKFLOW_FILE_EXTENSION='.dig';export function shouldIncludeInArchive(_0x4245bb){const _0x50ca2b=a196_0x338a;if(_0x4245bb===_0x50ca2b(0x188))return!![];if(_0x4245bb[_0x50ca2b(0x18a)]('.'))return![];if(_0x4245bb[_0x50ca2b(0x190)]('~'))return![];if(_0x4245bb===_0x50ca2b(0x18c)||_0x4245bb==='.DS_Store')return![];return!![];}function a196_0x338a(_0x2756a3,_0x1f94ff){_0x2756a3=_0x2756a3-0x183;const _0x49de49=a196_0x49de();let _0x338aec=_0x49de49[_0x2756a3];return _0x338aec;}export function parseDigdagignore(_0x47c6bd){const _0xd70d51=a196_0x338a;return _0x47c6bd[_0xd70d51(0x19b)]('\x0a')[_0xd70d51(0x191)](_0xe05fc=>_0xe05fc[_0xd70d51(0x18e)]())[_0xd70d51(0x183)](_0x492f1e=>_0x492f1e[_0xd70d51(0x189)]>0x0&&!_0x492f1e[_0xd70d51(0x18a)]('#'));}export async function loadDigdagignore(_0x2c7576){const _0x5dab8e=a196_0x338a,_0x3ca034=a196_0x332d55[_0x5dab8e(0x197)](_0x2c7576,_0x5dab8e(0x196));try{const _0x1979cb=await a196_0x390e0d[_0x5dab8e(0x187)](_0x3ca034,_0x5dab8e(0x193));return parseDigdagignore(_0x1979cb);}catch(_0x4485f4){if(_0x4485f4[_0x5dab8e(0x184)]===_0x5dab8e(0x18d))return null;throw _0x4485f4;}}export function createIgnoreInstance(_0x47340b){const _0x4d9ad3=a196_0x250b3e();return _0x47340b&&_0x47340b['length']>0x0&&_0x4d9ad3['add'](_0x47340b),_0x4d9ad3;}export function addScopedPatterns(_0xd44061,_0xe23952,_0x100eaf){const _0x5256e4=a196_0x338a,_0x241c3c=_0xe23952[_0x5256e4(0x191)](_0x17a053=>{const _0x526121=_0x5256e4;if(_0x17a053[_0x526121(0x18a)]('!')){const _0x521969=_0x17a053[_0x526121(0x185)](0x1);if(_0x521969[_0x526121(0x18a)]('/'))return'!'+_0x100eaf+_0x521969;return'!'+_0x100eaf+'/'+_0x521969;}if(_0x17a053[_0x526121(0x18a)]('/'))return''+_0x100eaf+_0x17a053;return _0x100eaf+'/'+_0x17a053;});return _0xd44061[_0x5256e4(0x18f)](_0x241c3c),_0xd44061;}export function shouldIgnoreWithInstance(_0xca430e,_0x524c25,_0x4113c2){const _0x45b1e6=a196_0x338a,_0xdbe31b=_0x524c25[_0x45b1e6(0x186)](/\\/g,'/'),_0x2738c8=_0x4113c2?_0xdbe31b+'/':_0xdbe31b;return _0xca430e['ignores'](_0x2738c8);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x31aba1,_0xbd3872){const _0x304758=a197_0x3c26,_0x353553=_0x31aba1();while(!![]){try{const _0x438b2d=-parseInt(_0x304758(0x181))/0x1*(-parseInt(_0x304758(0x18c))/0x2)+-parseInt(_0x304758(0x18e))/0x3+parseInt(_0x304758(0x18f))/0x4*(-parseInt(_0x304758(0x189))/0x5)+-parseInt(_0x304758(0x196))/0x6*(-parseInt(_0x304758(0x18d))/0x7)+parseInt(_0x304758(0x17b))/0x8+-parseInt(_0x304758(0x180))/0x9*(parseInt(_0x304758(0x193))/0xa)+parseInt(_0x304758(0x184))/0xb*(parseInt(_0x304758(0x18a))/0xc);if(_0x438b2d===_0xbd3872)break;else _0x353553['push'](_0x353553['shift']());}catch(_0x1fbc08){_0x353553['push'](_0x353553['shift']());}}}(a197_0x5265,0x2a6cc));export function parseFrontmatter(_0x1e73db){const _0x24e14d=a197_0x3c26,_0x3a6a3a=_0x1e73db[_0x24e14d(0x198)](/^---\s*\n([\s\S]*?)\n---\s*\n?([\s\S]*)$/);if(!_0x3a6a3a)return{'frontmatter':{},'body':_0x1e73db[_0x24e14d(0x17e)]()};const _0x215063=_0x3a6a3a[0x1],_0x5fa78f=_0x3a6a3a[0x2][_0x24e14d(0x17e)](),_0x14c9f8=parseSimpleYaml(_0x215063);return{'frontmatter':_0x14c9f8,'body':_0x5fa78f};}export function serializeFrontmatter(_0x559538,_0x7b7b38){const _0x3512f4=a197_0x3c26,_0x1ff26e=[];for(const [_0x5af3ed,_0x2df786]of Object[_0x3512f4(0x186)](_0x559538)){if(_0x2df786===undefined||_0x2df786===null)continue;if(Array[_0x3512f4(0x185)](_0x2df786))_0x2df786['length']===0x0?_0x1ff26e[_0x3512f4(0x17f)](_0x5af3ed+_0x3512f4(0x182)):_0x1ff26e[_0x3512f4(0x17f)](_0x5af3ed+':\x20['+_0x2df786[_0x3512f4(0x194)](_0x1d5c57=>formatYamlValue(String(_0x1d5c57)))[_0x3512f4(0x17d)](',\x20')+']');else{if(typeof _0x2df786===_0x3512f4(0x178))_0x1ff26e[_0x3512f4(0x17f)](_0x5af3ed+':\x20'+_0x2df786);else typeof _0x2df786===_0x3512f4(0x192)?_0x1ff26e[_0x3512f4(0x17f)](_0x5af3ed+':\x20'+_0x2df786):_0x1ff26e[_0x3512f4(0x17f)](_0x5af3ed+':\x20'+formatYamlValue(String(_0x2df786)));}}const _0x3b0fdd=_0x1ff26e[_0x3512f4(0x17d)]('\x0a');return _0x3512f4(0x183)+_0x3b0fdd+_0x3512f4(0x187)+_0x7b7b38+'\x0a';}function a197_0x5265(){const _0x36df52=['5OaIvfi','84mfWLXJ','false','154QJHERz','584353lHieWm','122595CGLuRq','1167620qQfXek','slice','includes','number','10VZVAjX','map','split','12wJUWuq','replace','match','startsWith','boolean','test','indexOf','594496HhJyBX','endsWith','join','trim','push','2823408FnxRDD','1721OcAxTY',':\x20[]','---\x0a','701591IvXDam','isArray','entries','\x0a---\x0a\x0a','true'];a197_0x5265=function(){return _0x36df52;};return a197_0x5265();}function a197_0x3c26(_0x4fe73d,_0x26b983){_0x4fe73d=_0x4fe73d-0x177;const _0x526543=a197_0x5265();let _0x3c26ae=_0x526543[_0x4fe73d];return _0x3c26ae;}function formatYamlValue(_0x102e38){const _0x590973=a197_0x3c26;if(_0x102e38['includes'](':')||_0x102e38['includes']('#')||_0x102e38[_0x590973(0x191)]('\x27')||_0x102e38[_0x590973(0x191)]('\x22')||_0x102e38[_0x590973(0x191)]('\x0a')||_0x102e38['startsWith']('\x20')||_0x102e38[_0x590973(0x17c)]('\x20'))return'\x22'+_0x102e38[_0x590973(0x197)](/\\/g,'\x5c\x5c')[_0x590973(0x197)](/"/g,'\x5c\x22')+'\x22';return _0x102e38;}function parseSimpleYaml(_0x31482b){const _0x1de7e0=a197_0x3c26,_0x96d3ee={},_0x323cb7=_0x31482b[_0x1de7e0(0x195)]('\x0a');for(const _0x37fb11 of _0x323cb7){const _0x2edd4d=_0x37fb11[_0x1de7e0(0x17e)]();if(!_0x2edd4d||_0x2edd4d[_0x1de7e0(0x177)]('#'))continue;const _0x5679bd=_0x2edd4d[_0x1de7e0(0x17a)](':');if(_0x5679bd===-0x1)continue;const _0x117352=_0x2edd4d[_0x1de7e0(0x190)](0x0,_0x5679bd)[_0x1de7e0(0x17e)]();let _0x16a78e=_0x2edd4d['slice'](_0x5679bd+0x1)[_0x1de7e0(0x17e)]();const _0x5322e2=_0x16a78e[_0x1de7e0(0x17a)]('\x20#');_0x5322e2!==-0x1&&!_0x16a78e[_0x1de7e0(0x177)]('\x22')&&!_0x16a78e[_0x1de7e0(0x177)]('\x27')&&(_0x16a78e=_0x16a78e[_0x1de7e0(0x190)](0x0,_0x5322e2)[_0x1de7e0(0x17e)]()),_0x96d3ee[_0x117352]=parseYamlValue(_0x16a78e);}return _0x96d3ee;}function parseYamlValue(_0x4153f6){const _0x22a1c4=a197_0x3c26;if(!_0x4153f6||_0x4153f6==='~'||_0x4153f6==='null')return null;if(_0x4153f6===_0x22a1c4(0x188))return!![];if(_0x4153f6===_0x22a1c4(0x18b))return![];if(_0x4153f6[_0x22a1c4(0x177)]('[')&&_0x4153f6[_0x22a1c4(0x17c)](']')){const _0x174261=_0x4153f6[_0x22a1c4(0x190)](0x1,-0x1)[_0x22a1c4(0x17e)]();if(!_0x174261)return[];return _0x174261[_0x22a1c4(0x195)](',')[_0x22a1c4(0x194)](_0x93f93e=>{const _0x4188cd=_0x22a1c4,_0x4bfea2=_0x93f93e[_0x4188cd(0x17e)]();return parseYamlScalar(_0x4bfea2);});}if(_0x4153f6[_0x22a1c4(0x177)]('\x22')&&_0x4153f6[_0x22a1c4(0x17c)]('\x22'))return _0x4153f6[_0x22a1c4(0x190)](0x1,-0x1)[_0x22a1c4(0x197)](/\\"/g,'\x22')[_0x22a1c4(0x197)](/\\\\/g,'\x5c');if(_0x4153f6['startsWith']('\x27')&&_0x4153f6[_0x22a1c4(0x17c)]('\x27'))return _0x4153f6[_0x22a1c4(0x190)](0x1,-0x1);if(/^-?\d+(\.\d+)?$/[_0x22a1c4(0x179)](_0x4153f6))return Number(_0x4153f6);return _0x4153f6;}function parseYamlScalar(_0x3f9f99){const _0x20e3d8=a197_0x3c26;if(_0x3f9f99[_0x20e3d8(0x177)]('\x22')&&_0x3f9f99['endsWith']('\x22'))return _0x3f9f99[_0x20e3d8(0x190)](0x1,-0x1)[_0x20e3d8(0x197)](/\\"/g,'\x22')['replace'](/\\\\/g,'\x5c');if(_0x3f9f99[_0x20e3d8(0x177)]('\x27')&&_0x3f9f99['endsWith']('\x27'))return _0x3f9f99[_0x20e3d8(0x190)](0x1,-0x1);if(_0x3f9f99===_0x20e3d8(0x188))return!![];if(_0x3f9f99===_0x20e3d8(0x18b))return![];if(/^-?\d+(\.\d+)?$/[_0x20e3d8(0x179)](_0x3f9f99))return Number(_0x3f9f99);return _0x3f9f99;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a198_0x27af(_0x3fa660,_0x3cc218){_0x3fa660=_0x3fa660-0x141;const _0x349fc0=a198_0x349f();let _0x27af5c=_0x349fc0[_0x3fa660];return _0x27af5c;}const a198_0x4c3b4c=a198_0x27af;(function(_0x1de3ba,_0x55f8c9){const _0x5756cd=a198_0x27af,_0x196172=_0x1de3ba();while(!![]){try{const _0x5ed24f=-parseInt(_0x5756cd(0x155))/0x1*(parseInt(_0x5756cd(0x14d))/0x2)+-parseInt(_0x5756cd(0x167))/0x3*(-parseInt(_0x5756cd(0x15d))/0x4)+parseInt(_0x5756cd(0x146))/0x5+-parseInt(_0x5756cd(0x161))/0x6*(-parseInt(_0x5756cd(0x16e))/0x7)+parseInt(_0x5756cd(0x144))/0x8+parseInt(_0x5756cd(0x15b))/0x9*(-parseInt(_0x5756cd(0x14b))/0xa)+parseInt(_0x5756cd(0x169))/0xb;if(_0x5ed24f===_0x55f8c9)break;else _0x196172['push'](_0x196172['shift']());}catch(_0xff307a){_0x196172['push'](_0x196172['shift']());}}}(a198_0x349f,0x67a15));import{execFileSync}from'node:child_process';import*as a198_0x4fcbb4 from'node:fs';import*as a198_0x3ab9ba from'node:path';function a198_0x349f(){const _0x488ead=['batchTimer','2238245usEktK','log','existsSync','flush','--quiet','5777830PrbPaa','map','2naMCvI','git','cachedIsRepo','pendingMessage','--git-dir','config','utf-8','isRepo','668769OevJXL','commit','pendingFiles','init','commitStaged','batchMs','9xuhHNJ','hasDirtyFiles','16WpIYoS','rev-parse','workspacePath','split','4216650XJPayz','join','size','--porcelain','.git','work:\x20update','60069JvoLox','clear','1875280XtvAhE','ensureRepo','from','writeFileSync','pipe','7MOdaDJ','add','trim','autoCommit','2160200CzkBGE'];a198_0x349f=function(){return _0x488ead;};return a198_0x349f();}export const WORKSPACE_GITIGNORE='#\x20Session\x20artifacts\x0achat-*/\x0a\x0a#\x20OS\x20files\x0a.DS_Store\x0a';const DEFAULT_CONFIG={'autoCommit':!![],'batchMs':0x7d0};export class WorkspaceGit{['workspacePath'];[a198_0x4c3b4c(0x152)];['batchTimer']=null;[a198_0x4c3b4c(0x157)]=new Set();['pendingMessage']=null;['cachedIsRepo']=null;constructor(_0x38322b,_0x3968b8){const _0x52a6f9=a198_0x4c3b4c;this[_0x52a6f9(0x15f)]=_0x38322b,this[_0x52a6f9(0x152)]={...DEFAULT_CONFIG,..._0x3968b8};}[a198_0x4c3b4c(0x16a)](){const _0x1acca5=a198_0x4c3b4c,_0x4690a5=a198_0x3ab9ba[_0x1acca5(0x162)](this[_0x1acca5(0x15f)],_0x1acca5(0x165));!a198_0x4fcbb4['existsSync'](_0x4690a5)&&(this[_0x1acca5(0x14e)](_0x1acca5(0x158)),this[_0x1acca5(0x14f)]=!![]);const _0xe9cd82=a198_0x3ab9ba[_0x1acca5(0x162)](this[_0x1acca5(0x15f)],'.gitignore');!a198_0x4fcbb4[_0x1acca5(0x148)](_0xe9cd82)&&a198_0x4fcbb4[_0x1acca5(0x16c)](_0xe9cd82,WORKSPACE_GITIGNORE,_0x1acca5(0x153));}['isRepo'](){const _0x36e47f=a198_0x4c3b4c;if(this[_0x36e47f(0x14f)]!==null)return this[_0x36e47f(0x14f)];try{this[_0x36e47f(0x14e)](_0x36e47f(0x15e),_0x36e47f(0x151)),this[_0x36e47f(0x14f)]=!![];}catch{this[_0x36e47f(0x14f)]=![];}return this[_0x36e47f(0x14f)];}[a198_0x4c3b4c(0x156)](_0x312e26,_0x3d8ea3){const _0x19dcdc=a198_0x4c3b4c;if(!this[_0x19dcdc(0x152)][_0x19dcdc(0x143)])return;if(!this[_0x19dcdc(0x154)]())return;const _0x459cee=a198_0x3ab9ba['relative'](this[_0x19dcdc(0x15f)],_0x312e26);this[_0x19dcdc(0x157)][_0x19dcdc(0x141)](_0x459cee),this[_0x19dcdc(0x150)]=_0x3d8ea3,this[_0x19dcdc(0x145)]&&clearTimeout(this[_0x19dcdc(0x145)]),this[_0x19dcdc(0x152)][_0x19dcdc(0x15a)]===0x0?this[_0x19dcdc(0x149)]():this[_0x19dcdc(0x145)]=setTimeout(()=>this[_0x19dcdc(0x149)](),this[_0x19dcdc(0x152)][_0x19dcdc(0x15a)]);}[a198_0x4c3b4c(0x149)](){const _0x18a09b=a198_0x4c3b4c;if(this[_0x18a09b(0x157)][_0x18a09b(0x163)]===0x0)return;const _0x366556=Array[_0x18a09b(0x16b)](this['pendingFiles']),_0x5a81b4=this[_0x18a09b(0x150)]||_0x18a09b(0x166);this['pendingFiles'][_0x18a09b(0x168)](),this['pendingMessage']=null;this['batchTimer']&&(clearTimeout(this[_0x18a09b(0x145)]),this[_0x18a09b(0x145)]=null);try{this['git'](_0x18a09b(0x141),'--',..._0x366556);}catch{return;}this[_0x18a09b(0x159)](_0x5a81b4);}['commitAll'](_0x507c40){const _0x2b9b2c=a198_0x4c3b4c;if(!this['config'][_0x2b9b2c(0x143)])return;if(!this[_0x2b9b2c(0x15c)]())return;try{this[_0x2b9b2c(0x14e)](_0x2b9b2c(0x141),'-A');}catch{return;}this[_0x2b9b2c(0x159)](_0x507c40);}[a198_0x4c3b4c(0x15c)](){const _0x570559=a198_0x4c3b4c;if(!this[_0x570559(0x154)]())return![];try{const _0x41cc9a=this[_0x570559(0x14e)]('status',_0x570559(0x164));return _0x41cc9a[_0x570559(0x142)]()['length']>0x0;}catch{return![];}}['fileHistory'](_0x4dbbcb,_0x253d89=0xa){const _0x5edeb3=a198_0x4c3b4c;if(!this[_0x5edeb3(0x154)]())return[];const _0x38f9f6=a198_0x3ab9ba['relative'](this[_0x5edeb3(0x15f)],_0x4dbbcb);try{const _0x5a6ca8=this['git'](_0x5edeb3(0x147),'--pretty=format:%H|%aI|%s','-n',String(_0x253d89),'--',_0x38f9f6);if(!_0x5a6ca8[_0x5edeb3(0x142)]())return[];return _0x5a6ca8[_0x5edeb3(0x142)]()['split']('\x0a')[_0x5edeb3(0x14c)](_0x417225=>{const _0x3a8774=_0x5edeb3,[_0x1a0812,_0x273fee,..._0x44665e]=_0x417225[_0x3a8774(0x160)]('|');return{'hash':_0x1a0812,'date':_0x273fee,'message':_0x44665e['join']('|')};});}catch{return[];}}[a198_0x4c3b4c(0x159)](_0x17a092){const _0x20f244=a198_0x4c3b4c;try{try{this['git']('diff','--cached',_0x20f244(0x14a));return;}catch{}this[_0x20f244(0x14e)](_0x20f244(0x156),'-m',_0x17a092);}catch{}}[a198_0x4c3b4c(0x14e)](..._0x286fd8){const _0x4bd113=a198_0x4c3b4c;return execFileSync(_0x4bd113(0x14e),_0x286fd8,{'cwd':this[_0x4bd113(0x15f)],'encoding':_0x4bd113(0x153),'stdio':[_0x4bd113(0x16d),'pipe',_0x4bd113(0x16d)]});}}
|