@treasuredata/tdx 2026.9.3 → 2026.10.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.d.ts +1 -1
- package/dist/cli-categories.js +1 -1
- package/dist/cli-categories.js.map +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.d.ts.map +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-command.js.map +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-journey-command.d.ts +34 -0
- package/dist/commands/cas-journey-command.d.ts.map +1 -0
- package/dist/commands/cas-journey-command.js +1 -0
- package/dist/commands/cas-journey-command.js.map +1 -0
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.d.ts.map +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-command.js.map +1 -1
- package/dist/commands/claude-statusline-command.d.ts.map +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-statusline-command.js.map +1 -1
- package/dist/commands/codex-command.d.ts.map +1 -1
- package/dist/commands/codex-command.js +1 -1
- package/dist/commands/codex-command.js.map +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-always-on-campaign-pull-command.js +1 -1
- package/dist/commands/engage-always-on-campaign-push-command.js +1 -1
- package/dist/commands/engage-always-on-campaign-validate-command.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-readiness-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-in-browser-message-command.js +1 -1
- package/dist/commands/engage-landing-page-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/engage-workspace-assignment-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.d.ts +46 -0
- package/dist/commands/journey-command.d.ts.map +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/opencode-command.d.ts +33 -1
- package/dist/commands/opencode-command.d.ts.map +1 -1
- package/dist/commands/opencode-command.js +1 -1
- package/dist/commands/opencode-command.js.map +1 -1
- package/dist/commands/p13n-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.d.ts.map +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/profiles-command.js.map +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.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/table-deleted.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/usage-command.d.ts +10 -0
- package/dist/commands/usage-command.d.ts.map +1 -0
- package/dist/commands/usage-command.js +1 -0
- package/dist/commands/usage-command.js.map +1 -0
- 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.d.ts +10 -1
- package/dist/core/auth.d.ts.map +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/auth.js.map +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.d.ts +2 -1
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/config.js.map +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.d.ts +1 -0
- package/dist/core/profile.d.ts.map +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/profile.js.map +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/site-mismatch.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.d.ts +5 -4
- package/dist/proxy/claude-usage-tracker.d.ts.map +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/claude-usage-tracker.js.map +1 -1
- package/dist/proxy/passthrough-server.d.ts +2 -0
- package/dist/proxy/passthrough-server.d.ts.map +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/passthrough-server.js.map +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/auth-token.js +1 -1
- package/dist/sdk/cas/audience-context.d.ts +33 -0
- package/dist/sdk/cas/audience-context.d.ts.map +1 -0
- package/dist/sdk/cas/audience-context.js +1 -0
- package/dist/sdk/cas/audience-context.js.map +1 -0
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-schema.js +1 -1
- package/dist/sdk/cas/cas-audience-validator.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-schema.js +1 -1
- package/dist/sdk/cas/cas-segment-validator.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.d.ts +8 -0
- package/dist/sdk/cas/index.d.ts.map +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/index.js.map +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/cas/validate-files.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/p13n-studio-api-client.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/always-on-campaign-pull.js +1 -1
- package/dist/sdk/engage/always-on-campaign-push.js +1 -1
- package/dist/sdk/engage/always-on-campaign-validator.js +1 -1
- package/dist/sdk/engage/always-on-campaign-yaml.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-readiness-workflow.js +1 -1
- package/dist/sdk/engage/campaign-readiness.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/in-browser-message-pull.js +1 -1
- package/dist/sdk/engage/in-browser-message-push.js +1 -1
- package/dist/sdk/engage/in-browser-message-validator.js +1 -1
- package/dist/sdk/engage/in-browser-message-yaml.js +1 -1
- package/dist/sdk/engage/landing-page-init.js +1 -1
- package/dist/sdk/engage/landing-page-public-asset.js +1 -1
- package/dist/sdk/engage/landing-page-pull.js +1 -1
- package/dist/sdk/engage/landing-page-push.js +1 -1
- package/dist/sdk/engage/landing-page-static-site.js +1 -1
- package/dist/sdk/engage/landing-page-validator.js +1 -1
- package/dist/sdk/engage/landing-page-workspace.js +1 -1
- package/dist/sdk/engage/landing-page-yaml.js +1 -1
- package/dist/sdk/engage/list-campaign-schema.js +1 -1
- package/dist/sdk/engage/list-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/always-on-campaign-schema.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/in-browser-message-schema.js +1 -1
- package/dist/sdk/engage/types/landing-page-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage/workspace-assignments.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.d.ts +4 -1
- package/dist/sdk/journey.d.ts.map +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/journey.js.map +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/codex-usage.d.ts +13 -0
- package/dist/sdk/llm/codex-usage.d.ts.map +1 -0
- package/dist/sdk/llm/codex-usage.js +1 -0
- package/dist/sdk/llm/codex-usage.js.map +1 -0
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.d.ts.map +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/llm/model-factors.js.map +1 -1
- package/dist/sdk/llm/user-settings.js +1 -1
- package/dist/sdk/llm/work-models.d.ts +52 -0
- package/dist/sdk/llm/work-models.d.ts.map +1 -0
- package/dist/sdk/llm/work-models.js +1 -0
- package/dist/sdk/llm/work-models.js.map +1 -0
- package/dist/sdk/p13n-studio-errors.js +1 -1
- package/dist/sdk/p13n-studio.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/audience-context.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/util/tree-search.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/task-graph.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/access-tracker.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/claude-code-state.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/proxy-fetch.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/td-user.d.ts +3 -0
- package/dist/utils/td-user.d.ts.map +1 -0
- package/dist/utils/td-user.js +1 -0
- package/dist/utils/td-user.js.map +1 -0
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +2 -1
- package/dist/commands/ai-usage-command-base.d.ts +0 -26
- package/dist/commands/ai-usage-command-base.d.ts.map +0 -1
- package/dist/commands/ai-usage-command-base.js +0 -1
- package/dist/commands/ai-usage-command-base.js.map +0 -1
- package/dist/commands/claude-usage-command.d.ts +0 -19
- package/dist/commands/claude-usage-command.d.ts.map +0 -1
- package/dist/commands/claude-usage-command.js +0 -1
- package/dist/commands/claude-usage-command.js.map +0 -1
- package/dist/commands/opencode-usage-command.d.ts +0 -19
- package/dist/commands/opencode-usage-command.d.ts.map +0 -1
- package/dist/commands/opencode-usage-command.js +0 -1
- package/dist/commands/opencode-usage-command.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a245_0x228efe=a245_0x1186;(function(_0x2ccb67,_0x2c29ed){const _0x3f606c=a245_0x1186,_0x1a949c=_0x2ccb67();while(!![]){try{const _0x8f66a4=parseInt(_0x3f606c(0x10e))/0x1*(parseInt(_0x3f606c(0x113))/0x2)+parseInt(_0x3f606c(0x128))/0x3*(-parseInt(_0x3f606c(0x122))/0x4)+parseInt(_0x3f606c(0x126))/0x5+parseInt(_0x3f606c(0x129))/0x6*(-parseInt(_0x3f606c(0x11a))/0x7)+-parseInt(_0x3f606c(0x11b))/0x8*(parseInt(_0x3f606c(0x120))/0x9)+-parseInt(_0x3f606c(0x11c))/0xa*(parseInt(_0x3f606c(0x11e))/0xb)+-parseInt(_0x3f606c(0x111))/0xc*(-parseInt(_0x3f606c(0x127))/0xd);if(_0x8f66a4===_0x2c29ed)break;else _0x1a949c['push'](_0x1a949c['shift']());}catch(_0x401132){_0x1a949c['push'](_0x1a949c['shift']());}}}(a245_0x54c4,0xde290));import{SDKError,ErrorCode}from'../errors.js';const GZIP_MAGIC=Buffer[a245_0x228efe(0x119)]([0x1f,0x8b]),MIN_GZIP_SIZE=0x14;function a245_0x54c4(){const _0x12e60a=['subarray','9ExUFDv','toString','4qArjuT','charCodeAt','(empty\x20response)','message','8761180OOkglx','3548012wHyRNK','2513319qwSQBI','2949810dDkCJs','...','\x20Server\x20response\x20preview:\x20','utf-8','trim','85UimBOX','length','helpText','72HTVlVi','Archive\x20validation\x20failed\x20with\x20unknown\x20error','17942XUADCD','Downloaded\x20file\x20is\x20not\x20a\x20valid\x20gzip\x20archive.','filter','split','error','The\x20server\x20may\x20have\x20returned\x20an\x20error\x20page\x20instead\x20of\x20the\x20archive.\x20Try\x20pushing\x20a\x20new\x20revision.','from','7oaWJma','2206480WtQYLD','130PtXaZo','Check\x20if\x20the\x20project\x20exists\x20and\x20has\x20been\x20pushed\x20at\x20least\x20once.','1385263hYCOOL'];a245_0x54c4=function(){return _0x12e60a;};return a245_0x54c4();}export function validateGzipArchive(_0x5bffc4){const _0x33091b=a245_0x228efe;if(_0x5bffc4[_0x33091b(0x10f)]<MIN_GZIP_SIZE)return{'isValid':![],'size':_0x5bffc4['length'],'error':{'message':'Downloaded\x20archive\x20is\x20too\x20small\x20('+_0x5bffc4['length']+'\x20bytes).\x20The\x20server\x20may\x20have\x20returned\x20an\x20error\x20or\x20empty\x20response.','preview':getContentPreview(_0x5bffc4),'helpText':_0x33091b(0x11d)}};if(!_0x5bffc4[_0x33091b(0x11f)](0x0,0x2)['equals'](GZIP_MAGIC)){const _0x2332f2=getContentPreview(_0x5bffc4),_0x126b9f=_0x2332f2?_0x33091b(0x12b)+_0x2332f2:'';return{'isValid':![],'size':_0x5bffc4[_0x33091b(0x10f)],'error':{'message':_0x33091b(0x114)+_0x126b9f,'preview':_0x2332f2,'helpText':_0x33091b(0x118)}};}return{'isValid':!![],'size':_0x5bffc4['length']};}function getContentPreview(_0x562a4d){const _0x4821e5=a245_0x228efe;if(_0x562a4d[_0x4821e5(0x10f)]===0x0)return _0x4821e5(0x124);const _0x4137b5=_0x562a4d[_0x4821e5(0x11f)](0x0,0xc8)[_0x4821e5(0x121)](_0x4821e5(0x12c)),_0x137d37=_0x4137b5[_0x4821e5(0x116)]('')[_0x4821e5(0x115)](_0x294286=>{const _0x2dfef=_0x4821e5,_0x1dbd39=_0x294286[_0x2dfef(0x123)](0x0);return _0x1dbd39>=0x20&&_0x1dbd39<0x7f||_0x1dbd39===0xa||_0x1dbd39===0xd||_0x1dbd39===0x9;})[_0x4821e5(0x10f)],_0x17082f=_0x137d37/_0x4137b5['length'];if(_0x17082f>0.8){const _0x3f25a5=_0x4137b5['slice'](0x0,0x64)[_0x4821e5(0x10d)]();return _0x3f25a5[_0x4821e5(0x10f)]<_0x4137b5[_0x4821e5(0x10d)]()[_0x4821e5(0x10f)]?_0x3f25a5+_0x4821e5(0x12a):_0x3f25a5;}return undefined;}function a245_0x1186(_0xedb6de,_0x457716){_0xedb6de=_0xedb6de-0x10d;const _0x54c49a=a245_0x54c4();let _0x1186fe=_0x54c49a[_0xedb6de];return _0x1186fe;}export function throwArchiveValidationError(_0x211311){const _0x2a1376=a245_0x228efe;if(!_0x211311[_0x2a1376(0x117)])throw new SDKError(ErrorCode['WORKFLOW_ARCHIVE_CORRUPTED'],_0x2a1376(0x112));throw new SDKError(ErrorCode['WORKFLOW_ARCHIVE_CORRUPTED'],_0x211311['error'][_0x2a1376(0x125)],undefined,{'helpText':_0x211311[_0x2a1376(0x117)][_0x2a1376(0x110)]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a246_0x4476(_0x2a3163,_0x494f12){_0x2a3163=_0x2a3163-0x1d0;const _0x381cf7=a246_0x381c();let _0x44764e=_0x381cf7[_0x2a3163];return _0x44764e;}(function(_0x597c82,_0x5533e8){const _0x7990f3=a246_0x4476,_0x4d299b=_0x597c82();while(!![]){try{const _0x653ebb=-parseInt(_0x7990f3(0x1ee))/0x1+-parseInt(_0x7990f3(0x1db))/0x2+parseInt(_0x7990f3(0x1d7))/0x3*(parseInt(_0x7990f3(0x1d2))/0x4)+-parseInt(_0x7990f3(0x1e7))/0x5+-parseInt(_0x7990f3(0x1dd))/0x6+-parseInt(_0x7990f3(0x1d0))/0x7*(parseInt(_0x7990f3(0x1e6))/0x8)+parseInt(_0x7990f3(0x1ec))/0x9;if(_0x653ebb===_0x5533e8)break;else _0x4d299b['push'](_0x4d299b['shift']());}catch(_0x447155){_0x4d299b['push'](_0x4d299b['shift']());}}}(a246_0x381c,0x42615));import{promises as a246_0x19fdbc}from'fs';import a246_0x59339f from'path';import a246_0x28f8f9 from'os';import{tryFindWorkflowTdxConfig}from'./tdx-config.js';import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION}from'./workflow-utils.js';export async function prepareCloneWorkflow(_0x31f74a,_0x17a817,_0x45c553,_0x3ef793={}){const _0x56a070=a246_0x4476,{client:_0x1b2389}=_0x31f74a,_0xe63fbd=a246_0x59339f[_0x56a070(0x1f1)](_0x17a817);try{await a246_0x19fdbc[_0x56a070(0x1de)](_0xe63fbd);}catch{throw new Error(_0x56a070(0x1d6)+_0x17a817);}const _0x5f2179=tryFindWorkflowTdxConfig(_0xe63fbd),_0x2533f1=_0x5f2179?.['config'][_0x56a070(0x1e2)],_0x4ee98d=_0x3ef793[_0x56a070(0x1f0)]||new Date()[_0x56a070(0x1ed)]()['replace'](/[:.]/g,'-');if(!_0x3ef793[_0x56a070(0x1e9)]){const _0x345632=await a246_0x19fdbc['readdir'](_0xe63fbd),_0x58af94=_0x345632['filter'](_0x2e2ec3=>_0x2e2ec3[_0x56a070(0x1e5)](WORKFLOW_FILE_EXTENSION));if(_0x58af94[_0x56a070(0x1d5)]===0x0)throw new Error('No\x20'+WORKFLOW_FILE_EXTENSION+_0x56a070(0x1d8)+_0xe63fbd);}const _0x459436=await getProjectFiles(_0xe63fbd);let _0x33d9a0=![],_0x3d7a86;try{const _0x1e4214=await _0x1b2389[_0x56a070(0x1e1)]({'name_pattern':_0x45c553}),_0x1c3859=_0x1e4214[_0x56a070(0x1da)][_0x56a070(0x1e8)](_0x299fe3=>_0x299fe3[_0x56a070(0x1df)]===_0x45c553);_0x1c3859&&(_0x33d9a0=!![],_0x3d7a86=_0x1c3859['id']);}catch{}return{'sourceDir':_0xe63fbd,'sourceProjectName':_0x2533f1,'newProjectName':_0x45c553,'revision':_0x4ee98d,'fileCount':_0x459436[_0x56a070(0x1d5)],'files':_0x459436,'targetExists':_0x33d9a0,'existingProjectId':_0x3d7a86};}export async function executeCloneWorkflow(_0x23855b,_0x4eab8e){const _0x43f0db=a246_0x4476,_0x24475d=await import(_0x43f0db(0x1e3)),{client:_0x1f2243}=_0x23855b,_0xc67d5d=await getProjectFiles(_0x4eab8e[_0x43f0db(0x1dc)]),_0x55a83c=await a246_0x19fdbc[_0x43f0db(0x1ea)](a246_0x59339f['join'](a246_0x28f8f9[_0x43f0db(0x1eb)](),_0x43f0db(0x1ef))),_0x1c9df7=a246_0x59339f[_0x43f0db(0x1f2)](_0x55a83c,'archive.tar.gz');try{await _0x24475d[_0x43f0db(0x1d4)]({'file':_0x1c9df7,'gzip':!![],'cwd':_0x4eab8e[_0x43f0db(0x1dc)],'portable':!![]},_0xc67d5d);const _0x45424e=await _0x1f2243[_0x43f0db(0x1d9)](_0x4eab8e['newProjectName'],_0x4eab8e[_0x43f0db(0x1f0)],_0x1c9df7);return{'sourceDir':_0x4eab8e['sourceDir'],'sourceProjectName':_0x4eab8e[_0x43f0db(0x1d1)],'newProjectName':_0x45424e[_0x43f0db(0x1df)],'newProjectId':_0x45424e['id'],'revision':_0x45424e[_0x43f0db(0x1f0)],'fileCount':_0xc67d5d[_0x43f0db(0x1d5)],'files':_0xc67d5d};}finally{await a246_0x19fdbc['rm'](_0x55a83c,{'recursive':!![],'force':!![]});}}async function getProjectFiles(_0x2f8399,_0x3b7bdf=''){const _0x2b9e98=a246_0x4476,_0x4637b0=[],_0x4ada4d=await a246_0x19fdbc[_0x2b9e98(0x1d3)](_0x2f8399,{'withFileTypes':!![]});for(const _0xfbde36 of _0x4ada4d){const _0x383bca=_0x3b7bdf?a246_0x59339f['join'](_0x3b7bdf,_0xfbde36[_0x2b9e98(0x1df)]):_0xfbde36[_0x2b9e98(0x1df)];if(_0xfbde36['name']==='tdx.json')continue;if(!shouldIncludeInArchive(_0xfbde36[_0x2b9e98(0x1df)]))continue;if(_0xfbde36[_0x2b9e98(0x1e4)]()){const _0x2302bd=await getProjectFiles(a246_0x59339f[_0x2b9e98(0x1f2)](_0x2f8399,_0xfbde36[_0x2b9e98(0x1df)]),_0x383bca);_0x4637b0[_0x2b9e98(0x1e0)](..._0x2302bd);}else _0x4637b0[_0x2b9e98(0x1e0)](_0x383bca);}return _0x4637b0;}function a246_0x381c(){const _0x30f162=['4iVtbPU','readdir','create','length','Source\x20directory\x20not\x20found:\x20','1075425BqCgIV','\x20workflow\x20files\x20found\x20in\x20','uploadProjectArchive','data','898956FCJJmy','sourceDir','1420458hQZMxx','access','name','push','listProjects','workflow_project','tar','isDirectory','endsWith','56vaRlZO','2212685CcEEtp','find','skipValidation','mkdtemp','tmpdir','17886996JpNzNn','toISOString','525723DnSdGy','tdx-wf-clone-','revision','resolve','join','419545fNpfuC','sourceProjectName'];a246_0x381c=function(){return _0x30f162;};return a246_0x381c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a245_0x20d5a5=a245_0x2c4c;(function(_0x5b1af2,_0x309e02){const _0x458032=a245_0x2c4c,_0x2fe7bd=_0x5b1af2();while(!![]){try{const _0x38e012=parseInt(_0x458032(0x83))/0x1*(-parseInt(_0x458032(0x75))/0x2)+-parseInt(_0x458032(0x70))/0x3*(-parseInt(_0x458032(0xcb))/0x4)+parseInt(_0x458032(0xe1))/0x5*(parseInt(_0x458032(0x7a))/0x6)+parseInt(_0x458032(0x6a))/0x7+parseInt(_0x458032(0xc2))/0x8+parseInt(_0x458032(0xcd))/0x9+-parseInt(_0x458032(0xd1))/0xa;if(_0x38e012===_0x309e02)break;else _0x2fe7bd['push'](_0x2fe7bd['shift']());}catch(_0x2af1cc){_0x2fe7bd['push'](_0x2fe7bd['shift']());}}}(a245_0x18fa,0x3d524));import{WorkflowApiClient}from'../client/workflow-client.js';import{SDKError,ErrorCode}from'../errors.js';import{MAX_PAGINATION_LIMIT}from'../util/paginate.js';async function paginateResults(_0x9c519c,_0x4a2cd5,_0x276f86=0x64){const _0x1766b5=a245_0x2c4c,_0xdf9c9a=Math[_0x1766b5(0x89)](_0x4a2cd5,MAX_PAGINATION_LIMIT),_0x28f470=[];let _0x48c673;while(_0x28f470[_0x1766b5(0xd8)]<_0xdf9c9a){const _0x549e97=await _0x9c519c(_0x276f86,_0x48c673),_0x52c9b8=_0x549e97[_0x1766b5(0xef)]??_0x549e97[_0x1766b5(0xf0)]['length'];if(_0x52c9b8===0x0)break;_0x28f470[_0x1766b5(0x8d)](..._0x549e97[_0x1766b5(0xf0)]);if(!_0x549e97[_0x1766b5(0xac)]||_0x52c9b8<_0x276f86)break;_0x48c673=_0x549e97[_0x1766b5(0xac)];}return _0x28f470[_0x1766b5(0xe7)](0x0,_0xdf9c9a);}function a245_0x18fa(){const _0x6b72f2=['tdx-workflow-','\x20workflow\x20files\x20found\x20in\x20project\x20directory','Cannot\x20read\x20workflow\x20file:\x20','33018YrJsXj','create','toISOString','.tar.gz','readdir','retryParams','tdx-workflow-push-','Failed\x20to\x20set\x20secret','index','9GnGlfw','WORKFLOW_PROJECT_NOT_FOUND','bind','sessionTime','direct','deleteSecret','min','project','killAttempt','projects','push','retryAttemptName','from','deleteProject','unlink','workflow','last_id','listSecrets','listAttempts','util','lastAttempt','setSecret','substring','mkdir','prepareCloneProject','keys','workflowName','disableSchedule','resolveProjectId','Project\x20not\x20found:\x20','Invalid\x20workflow\x20format:\x20','stateParams','sessionUuid','tmpdir','tasks','isDirectory','tar','Project\x20directory\x20not\x20found:\x20','Kill\x20request\x20accepted','listLogFiles','attempt','lastId','executePushProject','params','path','fromTime','parentId','toString','cancelRequested','limit','access','download','kill','getSchedule','join','exportParams','resumeFrom','delete','NUMERIC_ID_PATTERN','startedAt','retryAt','workflows','preparePushProject','1782840GYqDck','toTime','listProjectSchedules','No\x20','map','revision','force','listSchedules','listProjects','72yXaHNB','storeParams','4319730XCXomq','WORKFLOW_SECRET_SET_FAILED','pullProject','client','11244390vdUSoQ','.\x20Expected\x20\x22project.workflow\x22','status','arrayBuffer','endsWith','downloadProjectArchive','test','length','name','uploadProjectArchive','zlib','getAttempt','upstreams','rejected','gunzip','retryAttempt','145ZFEXtx','indexOf','projectName','enableSchedule','parseWorkflowId','replace','slice','getProject','INVALID_ARGUMENT','allSettled','finishedAt','updatedAt','now','sessionId','rawCount','data','done','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format:\x20','1558690VmtFlR','timezone','basename','Failed\x20to\x20download\x20log\x20file:\x20','getAttemptTasks','getProjectWorkflow','67407qmwAmD','scheduleFrom','config','retrySession','sessions','25314gumQDP','fullName'];a245_0x18fa=function(){return _0x6b72f2;};return a245_0x18fa();}import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION}from'./workflow-utils.js';function a245_0x2c4c(_0x4b405f,_0x11f21f){_0x4b405f=_0x4b405f-0x6a;const _0x18fabd=a245_0x18fa();let _0x2c4c96=_0x18fabd[_0x4b405f];return _0x2c4c96;}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 [a245_0x20d5a5(0xbd)]=/^\d+$/;['client'];constructor(_0x2c49b1){const _0x2da549=a245_0x20d5a5;this[_0x2da549(0xd0)]=new WorkflowApiClient(_0x2c49b1);}async[a245_0x20d5a5(0x9f)](_0x47b995){const _0x443a77=a245_0x20d5a5;if(WorkflowSDK['NUMERIC_ID_PATTERN'][_0x443a77(0xd7)](_0x47b995)){const _0x2f005a=await this[_0x443a77(0xd0)][_0x443a77(0xe8)](_0x47b995);return{'id':_0x2f005a['id'],'name':_0x2f005a[_0x443a77(0xd9)]};}const _0xd259c5=await this[_0x443a77(0xd0)]['listProjects']({'name_pattern':_0x47b995}),_0x3fb4f9=_0xd259c5[_0x443a77(0xf0)]['find'](_0x1aba8a=>_0x1aba8a[_0x443a77(0xd9)]===_0x47b995);if(!_0x3fb4f9)throw new SDKError(ErrorCode['WORKFLOW_PROJECT_NOT_FOUND'],_0x443a77(0xa0)+_0x47b995);return{'id':_0x3fb4f9['id'],'name':_0x3fb4f9[_0x443a77(0xd9)]};}async[a245_0x20d5a5(0x8c)](_0x34c164,_0xd1598f){const _0x368e48=a245_0x20d5a5,_0xe61a47=_0xd1598f?.[_0x368e48(0xb4)]||MAX_PAGINATION_LIMIT,_0xd64143=await paginateResults((_0x271dff,_0x3ce150)=>this[_0x368e48(0xd0)][_0x368e48(0xca)]({'name_pattern':_0x34c164,'limit':_0x271dff,'last_id':_0x3ce150??_0xd1598f?.['last_id']}),_0xe61a47);return _0xd64143[_0x368e48(0xc6)](_0x4165f6=>({..._0x4165f6,'project_id':_0x4165f6['id'],'project_name':_0x4165f6[_0x368e48(0xd9)]}));}async[a245_0x20d5a5(0xc0)](_0x15741e,_0x3a4516){const _0x37d2d9=a245_0x20d5a5,_0x5297b9=_0x3a4516?.[_0x37d2d9(0xb4)]||MAX_PAGINATION_LIMIT,_0x52c4ae=await paginateResults((_0x342b52,_0x3b1221)=>this[_0x37d2d9(0xd0)]['listWorkflows']({'project_name':_0x15741e,'limit':_0x342b52,'last_id':_0x3b1221??_0x3a4516?.['last_id']}),_0x5297b9);return _0x52c4ae[_0x37d2d9(0xc6)](_0x31dcf8=>({'project_id':_0x31dcf8[_0x37d2d9(0x8a)]?.['id'],'project_name':_0x31dcf8[_0x37d2d9(0x8a)]?.[_0x37d2d9(0xd9)],'workflow_id':_0x31dcf8['id'],'workflow_name':_0x31dcf8['name'],'revision':_0x31dcf8['revision'],'timezone':_0x31dcf8[_0x37d2d9(0x6b)],'config':_0x31dcf8[_0x37d2d9(0x72)],'id':_0x31dcf8['id'],'name':_0x31dcf8[_0x37d2d9(0xd9)],'project':_0x31dcf8[_0x37d2d9(0x8a)]}));}async[a245_0x20d5a5(0x74)](_0x2a1a36){const _0x238f34=a245_0x20d5a5;let _0x462b5d;if(_0x2a1a36?.[_0x238f34(0xe3)]){let _0x113f9d,_0x27e715=![];while(!_0x27e715){const _0x2d7bd0=await this[_0x238f34(0xd0)][_0x238f34(0xca)]({'limit':0x64,'last_id':_0x113f9d}),_0x3a3731=_0x2d7bd0[_0x238f34(0xf0)]['find'](_0x1b2b97=>_0x1b2b97[_0x238f34(0xd9)]===_0x2a1a36['projectName']);if(_0x3a3731){_0x462b5d=_0x3a3731['id'],_0x27e715=!![];break;}if(!_0x2d7bd0['lastId']||_0x2d7bd0['data'][_0x238f34(0xd8)]===0x0)break;_0x113f9d=_0x2d7bd0[_0x238f34(0xac)];}if(!_0x462b5d)throw new SDKError(ErrorCode[_0x238f34(0x84)],'Project\x20not\x20found:\x20'+_0x2a1a36[_0x238f34(0xe3)]);}const _0x17e3fb=_0x2a1a36?.[_0x238f34(0xb4)]||0x64,_0x3cbbbc=await paginateResults((_0x2665ab,_0x53829e)=>this['client']['listSessions']({'project_id':_0x462b5d,'project_name':_0x2a1a36?.[_0x238f34(0xe3)],'workflow_name':_0x2a1a36?.[_0x238f34(0x9d)],'status':_0x2a1a36?.[_0x238f34(0xd3)],'from_time':_0x2a1a36?.[_0x238f34(0xb0)],'to_time':_0x2a1a36?.[_0x238f34(0xc3)],'limit':_0x2665ab,'last_id':_0x53829e??_0x2a1a36?.[_0x238f34(0x93)]}),_0x17e3fb);return _0x3cbbbc[_0x238f34(0xc6)](_0x494882=>({'project_id':_0x494882['project']?.['id'],'project_name':_0x494882[_0x238f34(0x8a)]?.[_0x238f34(0xd9)],'workflow_id':_0x494882['workflow']?.['id'],'workflow_name':_0x494882[_0x238f34(0x92)]?.['name'],'session_id':_0x494882['id'],'sessionUuid':_0x494882[_0x238f34(0xa3)],'sessionTime':_0x494882[_0x238f34(0x86)],'lastAttempt':_0x494882[_0x238f34(0x97)],'id':_0x494882['id'],'project':_0x494882['project'],'workflow':_0x494882[_0x238f34(0x92)]}));}async['attempts'](_0x1a3b2e){const _0xba7e52=a245_0x20d5a5,_0x43009f=_0x1a3b2e?.['limit']||0x64,_0x511aa3=await paginateResults((_0x5d9ac5,_0x3d6e23)=>this[_0xba7e52(0xd0)][_0xba7e52(0x95)]({'project_name':_0x1a3b2e?.['projectName'],'workflow_name':_0x1a3b2e?.['workflowName'],'include_retried':_0x1a3b2e?.['includeRetried'],'limit':_0x5d9ac5,'last_id':_0x3d6e23??_0x1a3b2e?.['last_id']}),_0x43009f);return _0x511aa3['map'](_0x347d68=>({'project_id':_0x347d68[_0xba7e52(0x8a)]?.['id'],'project_name':_0x347d68[_0xba7e52(0x8a)]?.['name'],'workflow_id':_0x347d68['workflow']?.['id'],'workflow_name':_0x347d68['workflow']?.[_0xba7e52(0xd9)],'session_id':_0x347d68['sessionId'],'sessionUuid':_0x347d68[_0xba7e52(0xa3)],'sessionTime':_0x347d68[_0xba7e52(0x86)],'attempt_id':_0x347d68['id'],'attempt_index':_0x347d68[_0xba7e52(0x82)],'retryAttemptName':_0x347d68[_0xba7e52(0x8e)],'done':_0x347d68[_0xba7e52(0xf1)],'success':_0x347d68['success'],'cancelRequested':_0x347d68[_0xba7e52(0xb3)],'params':_0x347d68[_0xba7e52(0xae)],'createdAt':_0x347d68['createdAt'],'finishedAt':_0x347d68[_0xba7e52(0xeb)],'id':_0x347d68['id'],'index':_0x347d68[_0xba7e52(0x82)],'project':_0x347d68[_0xba7e52(0x8a)],'workflow':_0x347d68[_0xba7e52(0x92)]}));}async[a245_0x20d5a5(0xab)](_0x2a17f0){const _0x5b8a43=a245_0x20d5a5,_0x49e86d=await this[_0x5b8a43(0xd0)][_0x5b8a43(0xdc)](_0x2a17f0);return _0x49e86d;}async[a245_0x20d5a5(0xa5)](_0x138388,_0x2a42b0=![]){const _0x28d774=a245_0x20d5a5,_0x26f87a=await this[_0x28d774(0xd0)][_0x28d774(0x6e)](_0x138388,_0x2a42b0);return _0x26f87a[_0x28d774(0xc6)](_0x32c627=>({'task_id':_0x32c627['id'],'task_name':_0x32c627[_0x28d774(0x76)],'parentId':_0x32c627[_0x28d774(0xb1)],'config':_0x32c627[_0x28d774(0x72)],'upstreams':_0x32c627[_0x28d774(0xdd)],'state':_0x32c627['state'],'exportParams':_0x32c627[_0x28d774(0xba)],'storeParams':_0x32c627[_0x28d774(0xcc)],'stateParams':_0x32c627[_0x28d774(0xa2)],'updatedAt':_0x32c627[_0x28d774(0xec)],'retryAt':_0x32c627[_0x28d774(0xbf)],'startedAt':_0x32c627[_0x28d774(0xbe)],'error':_0x32c627['error'],'isGroup':_0x32c627['isGroup'],'id':_0x32c627['id'],'fullName':_0x32c627['fullName']}));}async['logFiles'](_0x4a0574,_0xf68aec){const _0x227b66=a245_0x20d5a5;return await this[_0x227b66(0xd0)][_0x227b66(0xaa)](_0x4a0574,_0xf68aec);}async['logs'](_0x23d1d0,_0x508ba4){const _0x4c34ad=a245_0x20d5a5,_0x2185a9=await import(_0x4c34ad(0xdb)),{promisify:_0x3b9b5e}=await import(_0x4c34ad(0x96)),_0x55944d=_0x3b9b5e(_0x2185a9[_0x4c34ad(0xdf)]),_0x27bb98=await this[_0x4c34ad(0xd0)][_0x4c34ad(0xaa)](_0x23d1d0,_0x508ba4);if(_0x27bb98[_0x4c34ad(0xd8)]===0x0)return'';const _0x177f3d=[];for(const _0x490f39 of _0x27bb98){if(!_0x490f39['direct'])continue;const _0x5a3fd8=await fetch(_0x490f39[_0x4c34ad(0x87)]);if(!_0x5a3fd8['ok'])throw new Error(_0x4c34ad(0x6d)+_0x5a3fd8[_0x4c34ad(0xd3)]);const _0x3d21e1=Buffer[_0x4c34ad(0x8f)](await _0x5a3fd8[_0x4c34ad(0xd4)]()),_0x51dc5f=await _0x55944d(_0x3d21e1);_0x177f3d[_0x4c34ad(0x8d)](_0x51dc5f[_0x4c34ad(0xb2)]('utf-8'));}return _0x177f3d[_0x4c34ad(0xb9)]('\x0a');}async[a245_0x20d5a5(0xb7)](_0x4833ba,_0x5cfa4a){const _0x1a20ac=a245_0x20d5a5,_0x19b8f9=await this['client'][_0x1a20ac(0x8b)](_0x4833ba,_0x5cfa4a);return _0x19b8f9?.['message']??_0x1a20ac(0xa9);}async['retrySession'](_0x3e64e3,_0x6fd310){const _0x548710=a245_0x20d5a5,_0xdc2e80=await this[_0x548710(0xd0)][_0x548710(0x73)](_0x3e64e3,{'from_task':_0x6fd310?.['fromTask'],'retry_params':_0x6fd310?.[_0x548710(0x7f)]});return{'attemptId':_0xdc2e80['id'],'sessionId':_0xdc2e80[_0x548710(0xee)]};}async['retryAttempt'](_0x8881c4,_0xd0a165){const _0x2f6da0=a245_0x20d5a5,_0x3cb80e=await this[_0x2f6da0(0xd0)][_0x2f6da0(0xe0)](_0x8881c4,{'resume_from':_0xd0a165?.[_0x2f6da0(0xbb)],'retry_params':_0xd0a165?.[_0x2f6da0(0x7f)],'force':_0xd0a165?.[_0x2f6da0(0xc8)]});return{'attemptId':_0x3cb80e['id'],'sessionId':_0x3cb80e[_0x2f6da0(0xee)]};}['parseWorkflowId'](_0x135889){const _0x129443=a245_0x20d5a5,_0x49d10e=_0x135889[_0x129443(0xe2)]('.');if(_0x49d10e===-0x1)throw new SDKError(ErrorCode[_0x129443(0xe9)],_0x129443(0xf2)+_0x135889);const _0x113964=_0x135889['substring'](0x0,_0x49d10e),_0x1d41db=_0x135889[_0x129443(0x99)](_0x49d10e+0x1);if(!_0x113964||!_0x1d41db)throw new SDKError(ErrorCode[_0x129443(0xe9)],_0x129443(0xa1)+_0x135889+_0x129443(0xd2));return{'projectName':_0x113964,'workflowName':_0x1d41db};}async['run'](_0x2085b5,_0x30a651={},_0x1d6fdd){const _0x2d53bf=a245_0x20d5a5,{projectName:_0x71cfb1,workflowName:_0x2dd216}=this['parseWorkflowId'](_0x2085b5),_0x64b0d=_0x1d6fdd?.[_0x2d53bf(0x86)]||new Date()[_0x2d53bf(0x7c)]();return await this['client']['startAttempt']({'projectName':_0x71cfb1,'workflowName':_0x2dd216,'sessionTime':_0x64b0d,'params':_0x30a651});}async['getWorkflow'](_0xb29380){const _0x2cb67a=a245_0x20d5a5,{projectName:_0x32228f,workflowName:_0x1dd2c5}=this[_0x2cb67a(0xe5)](_0xb29380),{id:_0x38d4e}=await this[_0x2cb67a(0x9f)](_0x32228f);return await this[_0x2cb67a(0xd0)][_0x2cb67a(0x6f)](_0x38d4e,_0x1dd2c5);}async[a245_0x20d5a5(0xb6)](_0x4f61c3,_0x354171,_0x302473){const _0xc3d3c5=a245_0x20d5a5,{promises:_0x3e8526}=await import('fs'),_0x4ddc0b=await import(_0xc3d3c5(0xaf)),_0x7e0996=await import('os'),_0x2373c8=await import(_0xc3d3c5(0xa7)),{id:_0x3a4586,name:_0x2103ed}=await this[_0xc3d3c5(0x9f)](_0x4f61c3),_0x13b74b=_0x7e0996[_0xc3d3c5(0xa4)](),_0x576c9c=_0x4ddc0b[_0xc3d3c5(0xb9)](_0x13b74b,_0xc3d3c5(0x77)+_0x3a4586+'-'+Date[_0xc3d3c5(0xed)]()+_0xc3d3c5(0x7d));try{await this['client'][_0xc3d3c5(0xd6)](_0x3a4586,_0x576c9c,_0x302473?.[_0xc3d3c5(0xc7)]);const _0x51c50a=_0x4ddc0b[_0xc3d3c5(0xb9)](_0x354171,_0x2103ed);await _0x3e8526[_0xc3d3c5(0x9a)](_0x51c50a,{'recursive':!![]}),await _0x2373c8['extract']({'file':_0x576c9c,'cwd':_0x51c50a,'gzip':!![]});const _0x4b44ff=async _0x27d952=>{const _0x2b3714=_0xc3d3c5;let _0x23f1d4=0x0;const _0x241396=await _0x3e8526[_0x2b3714(0x7e)](_0x27d952,{'withFileTypes':!![]});for(const _0x4688d3 of _0x241396){const _0x4197b4=_0x4ddc0b[_0x2b3714(0xb9)](_0x27d952,_0x4688d3[_0x2b3714(0xd9)]);if(_0x4688d3['isFile']())_0x23f1d4++;else _0x4688d3[_0x2b3714(0xa6)]()&&(_0x23f1d4+=await _0x4b44ff(_0x4197b4));}return _0x23f1d4;},_0xf5ff25=await _0x4b44ff(_0x51c50a);return{'projectName':_0x2103ed,'revision':_0x302473?.[_0xc3d3c5(0xc7)]||'latest','filesExtracted':_0xf5ff25};}finally{try{await _0x3e8526[_0xc3d3c5(0x91)](_0x576c9c);}catch{}}}async[a245_0x20d5a5(0x8d)](_0x47c96f,_0x5d0dc8){const _0x5327e9=a245_0x20d5a5,{promises:_0x19aa47}=await import('fs'),_0x503cb7=await import(_0x5327e9(0xaf)),_0x2da3a9=await import(_0x5327e9(0xa7)),_0x4b850e=_0x5d0dc8?.['projectName']||_0x503cb7[_0x5327e9(0x6c)](_0x47c96f),_0x3589e2=_0x5d0dc8?.[_0x5327e9(0xc7)]||new Date()[_0x5327e9(0x7c)]()[_0x5327e9(0xe6)](/[:.]/g,'-');try{await _0x19aa47[_0x5327e9(0xb5)](_0x47c96f);}catch{throw new Error(_0x5327e9(0xa8)+_0x47c96f);}if(!_0x5d0dc8?.['skipValidation']){const _0x398f19=await _0x19aa47[_0x5327e9(0x7e)](_0x47c96f),_0x304473=_0x398f19['filter'](_0x25cd33=>_0x25cd33[_0x5327e9(0xd5)](WORKFLOW_FILE_EXTENSION));if(_0x304473[_0x5327e9(0xd8)]===0x0)throw new Error(_0x5327e9(0xc5)+WORKFLOW_FILE_EXTENSION+_0x5327e9(0x78));for(const _0x35aa7c of _0x304473){const _0x53809b=_0x503cb7[_0x5327e9(0xb9)](_0x47c96f,_0x35aa7c);try{await _0x19aa47['access'](_0x53809b);}catch{throw new Error(_0x5327e9(0x79)+_0x35aa7c);}}}const _0x58a4e2=async(_0x4f1d56,_0x1e0178='')=>{const _0x26a609=_0x5327e9,_0x3a9169=await _0x19aa47['readdir'](_0x4f1d56,{'withFileTypes':!![]}),_0xf43456=[];for(const _0xaebf8e of _0x3a9169){const _0x1c6dbe=_0x503cb7[_0x26a609(0xb9)](_0x1e0178,_0xaebf8e[_0x26a609(0xd9)]),_0xa25acf=_0x503cb7[_0x26a609(0xb9)](_0x4f1d56,_0xaebf8e[_0x26a609(0xd9)]);if(!shouldIncludeInArchive(_0xaebf8e[_0x26a609(0xd9)]))continue;_0xaebf8e[_0x26a609(0xa6)]()?_0xf43456['push'](...await _0x58a4e2(_0xa25acf,_0x1c6dbe)):_0xf43456[_0x26a609(0x8d)](_0x1c6dbe);}return _0xf43456;},_0x289574=await _0x58a4e2(_0x47c96f),_0x36d05a=await import('os'),_0x2beb84=_0x36d05a[_0x5327e9(0xa4)](),_0x20af7b=_0x503cb7[_0x5327e9(0xb9)](_0x2beb84,_0x5327e9(0x80)+Date['now']()+_0x5327e9(0x7d));try{await _0x2da3a9[_0x5327e9(0x7b)]({'file':_0x20af7b,'gzip':!![],'cwd':_0x47c96f,'portable':!![]},_0x289574);const _0x20d30c=await this[_0x5327e9(0xd0)][_0x5327e9(0xda)](_0x4b850e,_0x3589e2,_0x20af7b,{'scheduleFrom':_0x5d0dc8?.[_0x5327e9(0x71)],'clearSchedule':_0x5d0dc8?.['clearSchedule'],'clearScheduleAll':_0x5d0dc8?.['clearScheduleAll']});return{'projectId':_0x20d30c['id'],'projectName':_0x20d30c['name'],'revision':_0x20d30c[_0x5327e9(0xc7)]};}finally{try{await _0x19aa47['unlink'](_0x20af7b);}catch{}}}async[a245_0x20d5a5(0xbc)](_0x4fe9ea){const _0x36286a=a245_0x20d5a5,{id:_0x1e9182}=await this[_0x36286a(0x9f)](_0x4fe9ea),_0x12a1ac=await this['client'][_0x36286a(0x90)](_0x1e9182);return{'projectId':_0x12a1ac['id'],'projectName':_0x12a1ac[_0x36286a(0xd9)]};}async[a245_0x20d5a5(0x94)](_0x10d8a4){const _0x1e3ab8=a245_0x20d5a5,{id:_0x534748,name:_0x5a4364}=await this[_0x1e3ab8(0x9f)](_0x10d8a4),_0x235f0f=await this[_0x1e3ab8(0xd0)][_0x1e3ab8(0x94)](_0x534748);return{'projectName':_0x5a4364,'secrets':_0x235f0f};}async[a245_0x20d5a5(0x98)](_0x3a7f44,_0x3b9fd2,_0x59876e){const _0x31d03e=a245_0x20d5a5,{id:_0x12886e,name:_0x49e727}=await this[_0x31d03e(0x9f)](_0x3a7f44);return await this[_0x31d03e(0xd0)][_0x31d03e(0x98)](_0x12886e,_0x3b9fd2,_0x59876e),{'projectName':_0x49e727,'key':_0x3b9fd2};}async['setSecrets'](_0x4e833f,_0x37d2f3){const _0x22d205=a245_0x20d5a5,{id:_0x55fcc0,name:_0x5dc034}=await this[_0x22d205(0x9f)](_0x4e833f),_0xd4ff30=Object[_0x22d205(0x9c)](_0x37d2f3),_0x146d27=await Promise[_0x22d205(0xea)](_0xd4ff30[_0x22d205(0xc6)](_0x40593a=>this[_0x22d205(0xd0)][_0x22d205(0x98)](_0x55fcc0,_0x40593a,_0x37d2f3[_0x40593a]))),_0x59936f=_0x146d27[_0x22d205(0xc6)]((_0x216fdc,_0x471e48)=>_0x216fdc['status']===_0x22d205(0xde)?_0xd4ff30[_0x471e48]:null)['filter'](_0xa3f4c2=>_0xa3f4c2!==null);if(_0x59936f[_0x22d205(0xd8)]>0x0)throw new SDKError(ErrorCode[_0x22d205(0xce)],_0x22d205(0x81)+(_0x59936f[_0x22d205(0xd8)]>0x1?'s':'')+':\x20'+_0x59936f[_0x22d205(0xb9)](',\x20'));return{'projectName':_0x5dc034,'keys':_0xd4ff30};}async[a245_0x20d5a5(0x88)](_0x55eed4,_0x1791ea){const _0x267316=a245_0x20d5a5,{id:_0x426eb9,name:_0x4372bc}=await this[_0x267316(0x9f)](_0x55eed4);return await this[_0x267316(0xd0)][_0x267316(0x88)](_0x426eb9,_0x1791ea),{'projectName':_0x4372bc,'key':_0x1791ea};}async[a245_0x20d5a5(0xcf)](_0x29099d,_0x3de807){const _0x31bea6=a245_0x20d5a5;return pullWorkflow({'client':this[_0x31bea6(0xd0)],'resolveProjectId':this[_0x31bea6(0x9f)][_0x31bea6(0x85)](this)},_0x29099d,_0x3de807);}async['applyPullProject'](_0x2262ab,_0x16ece6){const _0x3d5caf=a245_0x20d5a5;return applyPullResult({'client':this[_0x3d5caf(0xd0)],'resolveProjectId':this[_0x3d5caf(0x9f)]['bind'](this)},_0x2262ab,_0x16ece6);}async[a245_0x20d5a5(0xc1)](_0x2272dd){const _0x1cb1eb=a245_0x20d5a5;return preparePushWorkflow({'client':this[_0x1cb1eb(0xd0)],'resolveProjectId':this[_0x1cb1eb(0x9f)][_0x1cb1eb(0x85)](this)},_0x2272dd);}async[a245_0x20d5a5(0xad)](_0x59065d){const _0x1a53c7=a245_0x20d5a5;return executePushWorkflow({'client':this[_0x1a53c7(0xd0)],'resolveProjectId':this[_0x1a53c7(0x9f)][_0x1a53c7(0x85)](this)},_0x59065d);}async[a245_0x20d5a5(0x9b)](_0x2cbc2b,_0x3e8334,_0x586c1e){const _0x5b529f=a245_0x20d5a5;return prepareCloneWorkflow({'client':this[_0x5b529f(0xd0)]},_0x2cbc2b,_0x3e8334,_0x586c1e);}async['executeCloneProject'](_0x5b097b){return executeCloneWorkflow({'client':this['client']},_0x5b097b);}async[a245_0x20d5a5(0xc9)](_0x150edb){const _0x5206bf=a245_0x20d5a5,_0x27843b=Math[_0x5206bf(0x89)](Number(_0x150edb?.[_0x5206bf(0xb4)])||MAX_PAGINATION_LIMIT,MAX_PAGINATION_LIMIT);return await this['client'][_0x5206bf(0xc9)]({'limit':_0x27843b});}async[a245_0x20d5a5(0xc4)](_0x2fe60d,_0x5e9560){const _0x3e47ac=a245_0x20d5a5,{id:_0x1ea56f}=await this['resolveProjectId'](_0x2fe60d),_0xe43b13=Math[_0x3e47ac(0x89)](Number(_0x5e9560?.['limit'])||MAX_PAGINATION_LIMIT,MAX_PAGINATION_LIMIT);return await this['client'][_0x3e47ac(0xc4)](_0x1ea56f,{'workflow':_0x5e9560?.[_0x3e47ac(0x92)],'limit':_0xe43b13});}async[a245_0x20d5a5(0xb8)](_0x30d5ab){return await this['client']['getSchedule'](_0x30d5ab);}async[a245_0x20d5a5(0xe4)](_0x56491e,_0x3913d5){const _0x30b5f5=a245_0x20d5a5;return await this[_0x30b5f5(0xd0)][_0x30b5f5(0xe4)](_0x56491e,_0x3913d5);}async[a245_0x20d5a5(0x9e)](_0x4c310e){const _0x3dd08a=a245_0x20d5a5;return await this[_0x3dd08a(0xd0)][_0x3dd08a(0x9e)](_0x4c310e);}}
|
|
1
|
+
const a247_0x4713dd=a247_0x5021;(function(_0x33ea09,_0x2067b1){const _0x5b216c=a247_0x5021,_0x2caf41=_0x33ea09();while(!![]){try{const _0x41518a=parseInt(_0x5b216c(0x88))/0x1+-parseInt(_0x5b216c(0x89))/0x2*(parseInt(_0x5b216c(0x9f))/0x3)+-parseInt(_0x5b216c(0x100))/0x4+parseInt(_0x5b216c(0xb5))/0x5+parseInt(_0x5b216c(0x94))/0x6*(-parseInt(_0x5b216c(0xdb))/0x7)+-parseInt(_0x5b216c(0xdc))/0x8*(-parseInt(_0x5b216c(0xb3))/0x9)+-parseInt(_0x5b216c(0xbd))/0xa*(parseInt(_0x5b216c(0xb6))/0xb);if(_0x41518a===_0x2067b1)break;else _0x2caf41['push'](_0x2caf41['shift']());}catch(_0x53742c){_0x2caf41['push'](_0x2caf41['shift']());}}}(a247_0x3f08,0x74e0a));import{WorkflowApiClient}from'../client/workflow-client.js';import{SDKError,ErrorCode}from'../errors.js';import{MAX_PAGINATION_LIMIT}from'../util/paginate.js';function a247_0x3f08(){const _0x54f1d8=['clearSchedule','index','status','toString','revision','isDirectory','toTime','isFile','sessionTime','rawCount','retrySession','unlink','stateParams','executeCloneProject','killAttempt','zlib','rejected','workflows','tdx-workflow-','tar','uploadProjectArchive','skipValidation','gunzip','workflowName','153582hHhJdW','6PMXWdQ','data','now','deleteSecret','NUMERIC_ID_PATTERN','logFiles','filter','finishedAt','setSecret','parseWorkflowId','delete','18tzkjrK','keys','listAttempts','setSecrets','exportParams','access','listProjects','listWorkflows','fromTime','client','readdir','110037ywaLGn','replace','extract','retryAttempt','getSchedule','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format:\x20','upstreams','retryAt','sessions','enableSchedule','WORKFLOW_PROJECT_NOT_FOUND','sessionId','projectName','listSchedules','path','\x20workflow\x20files\x20found\x20in\x20project\x20directory','disableSchedule','listProjectSchedules','bind','INVALID_ARGUMENT','9JhjWIl','Invalid\x20workflow\x20format:\x20','4431985xEEupI','22SuRxlz','isGroup','Failed\x20to\x20set\x20secret','find','from','tmpdir','length','622580DpUcDJ','state','getAttempt','WORKFLOW_SECRET_SET_FAILED','pullProject','message','allSettled','preparePushProject','getAttemptTasks','force','min','join','name','error','lastId','resumeFrom','project','arrayBuffer','config','substring','getProjectWorkflow','Kill\x20request\x20accepted','toISOString','cancelRequested','prepareCloneProject','executePushProject','fullName','tdx-workflow-push-','run','downloadProjectArchive','656957xDUYZy','7213832MXcBgU','retryParams','Project\x20not\x20found:\x20','endsWith','success','applyPullProject','push','kill','direct','getWorkflow','map','resolveProjectId','deleteProject','workflow','parentId','listSessions','tasks','listLogFiles','Project\x20directory\x20not\x20found:\x20','lastAttempt','download','No\x20','params','attempt','.tar.gz','projects','getProject','indexOf','clearScheduleAll','listSecrets','logs','last_id','basename','includeRetried','limit','sessionUuid','3787488RwinDq'];a247_0x3f08=function(){return _0x54f1d8;};return a247_0x3f08();}async function paginateResults(_0x141ae9,_0x404984,_0x48f654=0x64){const _0x5cc10a=a247_0x5021,_0x5cf126=Math['min'](_0x404984,MAX_PAGINATION_LIMIT),_0x589cd8=[];let _0x4941cb;while(_0x589cd8[_0x5cc10a(0xbc)]<_0x5cf126){const _0x268647=await _0x141ae9(_0x48f654,_0x4941cb),_0x5aa4f0=_0x268647[_0x5cc10a(0x10a)]??_0x268647['data'][_0x5cc10a(0xbc)];if(_0x5aa4f0===0x0)break;_0x589cd8[_0x5cc10a(0xe2)](..._0x268647[_0x5cc10a(0x8a)]);if(!_0x268647[_0x5cc10a(0xcb)]||_0x5aa4f0<_0x48f654)break;_0x4941cb=_0x268647[_0x5cc10a(0xcb)];}return _0x589cd8['slice'](0x0,_0x5cf126);}import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION}from'./workflow-utils.js';import{pullWorkflow,applyPullResult}from'./pull-workflow.js';function a247_0x5021(_0x3c87a7,_0x46da81){_0x3c87a7=_0x3c87a7-0x88;const _0x3f085c=a247_0x3f08();let _0x50210b=_0x3f085c[_0x3c87a7];return _0x50210b;}import{preparePushWorkflow,executePushWorkflow}from'./push-workflow.js';import{prepareCloneWorkflow,executeCloneWorkflow}from'./clone-workflow.js';export class WorkflowSDK{static [a247_0x4713dd(0x8d)]=/^\d+$/;[a247_0x4713dd(0x9d)];constructor(_0x132ea9){this['client']=new WorkflowApiClient(_0x132ea9);}async[a247_0x4713dd(0xe7)](_0x423a5b){const _0x1f4d96=a247_0x4713dd;if(WorkflowSDK[_0x1f4d96(0x8d)]['test'](_0x423a5b)){const _0x1af055=await this[_0x1f4d96(0x9d)][_0x1f4d96(0xf6)](_0x423a5b);return{'id':_0x1af055['id'],'name':_0x1af055[_0x1f4d96(0xc9)]};}const _0x1f31b2=await this['client']['listProjects']({'name_pattern':_0x423a5b}),_0x554813=_0x1f31b2[_0x1f4d96(0x8a)][_0x1f4d96(0xb9)](_0x3de8d4=>_0x3de8d4[_0x1f4d96(0xc9)]===_0x423a5b);if(!_0x554813)throw new SDKError(ErrorCode[_0x1f4d96(0xa9)],_0x1f4d96(0xde)+_0x423a5b);return{'id':_0x554813['id'],'name':_0x554813['name']};}async[a247_0x4713dd(0xf5)](_0x4e2f2e,_0x3d221c){const _0x403390=a247_0x4713dd,_0xdb1e86=_0x3d221c?.[_0x403390(0xfe)]||MAX_PAGINATION_LIMIT,_0x59d7c8=await paginateResults((_0x1c6d46,_0x4c9712)=>this[_0x403390(0x9d)][_0x403390(0x9a)]({'name_pattern':_0x4e2f2e,'limit':_0x1c6d46,'last_id':_0x4c9712??_0x3d221c?.[_0x403390(0xfb)]}),_0xdb1e86);return _0x59d7c8['map'](_0x11eca0=>({..._0x11eca0,'project_id':_0x11eca0['id'],'project_name':_0x11eca0[_0x403390(0xc9)]}));}async[a247_0x4713dd(0x112)](_0x3899a3,_0x39e413){const _0x15539f=a247_0x4713dd,_0x5092bd=_0x39e413?.[_0x15539f(0xfe)]||MAX_PAGINATION_LIMIT,_0x2b5c16=await paginateResults((_0x21367f,_0x2f45ea)=>this[_0x15539f(0x9d)][_0x15539f(0x9b)]({'project_name':_0x3899a3,'limit':_0x21367f,'last_id':_0x2f45ea??_0x39e413?.[_0x15539f(0xfb)]}),_0x5092bd);return _0x2b5c16['map'](_0xa3341b=>({'project_id':_0xa3341b[_0x15539f(0xcd)]?.['id'],'project_name':_0xa3341b['project']?.[_0x15539f(0xc9)],'workflow_id':_0xa3341b['id'],'workflow_name':_0xa3341b[_0x15539f(0xc9)],'revision':_0xa3341b['revision'],'timezone':_0xa3341b['timezone'],'config':_0xa3341b['config'],'id':_0xa3341b['id'],'name':_0xa3341b[_0x15539f(0xc9)],'project':_0xa3341b[_0x15539f(0xcd)]}));}async[a247_0x4713dd(0xa7)](_0x3d46e9){const _0xfd02bd=a247_0x4713dd;let _0xe1b201;if(_0x3d46e9?.[_0xfd02bd(0xab)]){let _0x2ea1a0,_0x81b934=![];while(!_0x81b934){const _0x55e4e9=await this[_0xfd02bd(0x9d)][_0xfd02bd(0x9a)]({'limit':0x64,'last_id':_0x2ea1a0}),_0x3337aa=_0x55e4e9[_0xfd02bd(0x8a)][_0xfd02bd(0xb9)](_0x2294ce=>_0x2294ce[_0xfd02bd(0xc9)]===_0x3d46e9[_0xfd02bd(0xab)]);if(_0x3337aa){_0xe1b201=_0x3337aa['id'],_0x81b934=!![];break;}if(!_0x55e4e9[_0xfd02bd(0xcb)]||_0x55e4e9[_0xfd02bd(0x8a)]['length']===0x0)break;_0x2ea1a0=_0x55e4e9['lastId'];}if(!_0xe1b201)throw new SDKError(ErrorCode[_0xfd02bd(0xa9)],_0xfd02bd(0xde)+_0x3d46e9[_0xfd02bd(0xab)]);}const _0x231d67=_0x3d46e9?.[_0xfd02bd(0xfe)]||0x64,_0x385806=await paginateResults((_0x31730c,_0x170b4f)=>this[_0xfd02bd(0x9d)][_0xfd02bd(0xeb)]({'project_id':_0xe1b201,'project_name':_0x3d46e9?.[_0xfd02bd(0xab)],'workflow_name':_0x3d46e9?.[_0xfd02bd(0x118)],'status':_0x3d46e9?.[_0xfd02bd(0x103)],'from_time':_0x3d46e9?.[_0xfd02bd(0x9c)],'to_time':_0x3d46e9?.[_0xfd02bd(0x107)],'limit':_0x31730c,'last_id':_0x170b4f??_0x3d46e9?.['last_id']}),_0x231d67);return _0x385806[_0xfd02bd(0xe6)](_0x1b5b88=>({'project_id':_0x1b5b88[_0xfd02bd(0xcd)]?.['id'],'project_name':_0x1b5b88[_0xfd02bd(0xcd)]?.[_0xfd02bd(0xc9)],'workflow_id':_0x1b5b88[_0xfd02bd(0xe9)]?.['id'],'workflow_name':_0x1b5b88[_0xfd02bd(0xe9)]?.['name'],'session_id':_0x1b5b88['id'],'sessionUuid':_0x1b5b88['sessionUuid'],'sessionTime':_0x1b5b88[_0xfd02bd(0x109)],'lastAttempt':_0x1b5b88[_0xfd02bd(0xef)],'id':_0x1b5b88['id'],'project':_0x1b5b88['project'],'workflow':_0x1b5b88[_0xfd02bd(0xe9)]}));}async['attempts'](_0x4b7952){const _0x1cfa73=a247_0x4713dd,_0x60f1e1=_0x4b7952?.['limit']||0x64,_0x4c0092=await paginateResults((_0x57eb7c,_0xe5ecbf)=>this[_0x1cfa73(0x9d)][_0x1cfa73(0x96)]({'project_name':_0x4b7952?.[_0x1cfa73(0xab)],'workflow_name':_0x4b7952?.['workflowName'],'include_retried':_0x4b7952?.[_0x1cfa73(0xfd)],'limit':_0x57eb7c,'last_id':_0xe5ecbf??_0x4b7952?.[_0x1cfa73(0xfb)]}),_0x60f1e1);return _0x4c0092[_0x1cfa73(0xe6)](_0x403f58=>({'project_id':_0x403f58[_0x1cfa73(0xcd)]?.['id'],'project_name':_0x403f58[_0x1cfa73(0xcd)]?.[_0x1cfa73(0xc9)],'workflow_id':_0x403f58[_0x1cfa73(0xe9)]?.['id'],'workflow_name':_0x403f58[_0x1cfa73(0xe9)]?.[_0x1cfa73(0xc9)],'session_id':_0x403f58[_0x1cfa73(0xaa)],'sessionUuid':_0x403f58[_0x1cfa73(0xff)],'sessionTime':_0x403f58[_0x1cfa73(0x109)],'attempt_id':_0x403f58['id'],'attempt_index':_0x403f58[_0x1cfa73(0x102)],'retryAttemptName':_0x403f58['retryAttemptName'],'done':_0x403f58['done'],'success':_0x403f58[_0x1cfa73(0xe0)],'cancelRequested':_0x403f58[_0x1cfa73(0xd4)],'params':_0x403f58[_0x1cfa73(0xf2)],'createdAt':_0x403f58['createdAt'],'finishedAt':_0x403f58[_0x1cfa73(0x90)],'id':_0x403f58['id'],'index':_0x403f58[_0x1cfa73(0x102)],'project':_0x403f58[_0x1cfa73(0xcd)],'workflow':_0x403f58['workflow']}));}async[a247_0x4713dd(0xf3)](_0x36b072){const _0xfc2033=a247_0x4713dd,_0x157d61=await this[_0xfc2033(0x9d)][_0xfc2033(0xbf)](_0x36b072);return _0x157d61;}async[a247_0x4713dd(0xec)](_0x3a0637,_0x55cc10=![]){const _0x58817c=a247_0x4713dd,_0x1ae065=await this[_0x58817c(0x9d)][_0x58817c(0xc5)](_0x3a0637,_0x55cc10);return _0x1ae065[_0x58817c(0xe6)](_0x2e9fc5=>({'task_id':_0x2e9fc5['id'],'task_name':_0x2e9fc5[_0x58817c(0xd7)],'parentId':_0x2e9fc5[_0x58817c(0xea)],'config':_0x2e9fc5[_0x58817c(0xcf)],'upstreams':_0x2e9fc5[_0x58817c(0xa5)],'state':_0x2e9fc5[_0x58817c(0xbe)],'exportParams':_0x2e9fc5[_0x58817c(0x98)],'storeParams':_0x2e9fc5['storeParams'],'stateParams':_0x2e9fc5[_0x58817c(0x10d)],'updatedAt':_0x2e9fc5['updatedAt'],'retryAt':_0x2e9fc5[_0x58817c(0xa6)],'startedAt':_0x2e9fc5['startedAt'],'error':_0x2e9fc5[_0x58817c(0xca)],'isGroup':_0x2e9fc5[_0x58817c(0xb7)],'id':_0x2e9fc5['id'],'fullName':_0x2e9fc5[_0x58817c(0xd7)]}));}async[a247_0x4713dd(0x8e)](_0x3dc1d8,_0x46aeac){const _0xd8cc16=a247_0x4713dd;return await this[_0xd8cc16(0x9d)][_0xd8cc16(0xed)](_0x3dc1d8,_0x46aeac);}async[a247_0x4713dd(0xfa)](_0x55a7e2,_0x38ace3){const _0x39b9fc=a247_0x4713dd,_0x1646d3=await import(_0x39b9fc(0x110)),{promisify:_0x8a62de}=await import('util'),_0x504855=_0x8a62de(_0x1646d3[_0x39b9fc(0x117)]),_0x1fdc33=await this[_0x39b9fc(0x9d)]['listLogFiles'](_0x55a7e2,_0x38ace3);if(_0x1fdc33[_0x39b9fc(0xbc)]===0x0)return'';const _0x24eda2=[];for(const _0x50d44a of _0x1fdc33){if(!_0x50d44a[_0x39b9fc(0xe4)])continue;const _0x3a7106=await fetch(_0x50d44a[_0x39b9fc(0xe4)]);if(!_0x3a7106['ok'])throw new Error('Failed\x20to\x20download\x20log\x20file:\x20'+_0x3a7106[_0x39b9fc(0x103)]);const _0x30b337=Buffer[_0x39b9fc(0xba)](await _0x3a7106[_0x39b9fc(0xce)]()),_0x392138=await _0x504855(_0x30b337);_0x24eda2[_0x39b9fc(0xe2)](_0x392138[_0x39b9fc(0x104)]('utf-8'));}return _0x24eda2[_0x39b9fc(0xc8)]('\x0a');}async[a247_0x4713dd(0xe3)](_0x278f6f,_0x4f14f2){const _0x429cc0=a247_0x4713dd,_0x1f836c=await this['client'][_0x429cc0(0x10f)](_0x278f6f,_0x4f14f2);return _0x1f836c?.[_0x429cc0(0xc2)]??_0x429cc0(0xd2);}async['retrySession'](_0x282c9f,_0x44e67c){const _0x3ab025=a247_0x4713dd,_0x3ea5fb=await this[_0x3ab025(0x9d)][_0x3ab025(0x10b)](_0x282c9f,{'from_task':_0x44e67c?.['fromTask'],'retry_params':_0x44e67c?.[_0x3ab025(0xdd)]});return{'attemptId':_0x3ea5fb['id'],'sessionId':_0x3ea5fb[_0x3ab025(0xaa)]};}async[a247_0x4713dd(0xa2)](_0x39566b,_0x4ce727){const _0x3407ac=a247_0x4713dd,_0x1c5cb3=await this[_0x3407ac(0x9d)][_0x3407ac(0xa2)](_0x39566b,{'resume_from':_0x4ce727?.[_0x3407ac(0xcc)],'retry_params':_0x4ce727?.[_0x3407ac(0xdd)],'force':_0x4ce727?.[_0x3407ac(0xc6)]});return{'attemptId':_0x1c5cb3['id'],'sessionId':_0x1c5cb3['sessionId']};}[a247_0x4713dd(0x92)](_0x57abbf){const _0x2e6f27=a247_0x4713dd,_0x20c9a4=_0x57abbf[_0x2e6f27(0xf7)]('.');if(_0x20c9a4===-0x1)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x2e6f27(0xa4)+_0x57abbf);const _0x417c1f=_0x57abbf[_0x2e6f27(0xd0)](0x0,_0x20c9a4),_0x40b797=_0x57abbf[_0x2e6f27(0xd0)](_0x20c9a4+0x1);if(!_0x417c1f||!_0x40b797)throw new SDKError(ErrorCode[_0x2e6f27(0xb2)],_0x2e6f27(0xb4)+_0x57abbf+'.\x20Expected\x20\x22project.workflow\x22');return{'projectName':_0x417c1f,'workflowName':_0x40b797};}async[a247_0x4713dd(0xd9)](_0x361931,_0xb56d0e={},_0x2d7979){const _0x5d8993=a247_0x4713dd,{projectName:_0x2f2537,workflowName:_0x407a96}=this[_0x5d8993(0x92)](_0x361931),_0x5e42da=_0x2d7979?.[_0x5d8993(0x109)]||new Date()[_0x5d8993(0xd3)]();return await this['client']['startAttempt']({'projectName':_0x2f2537,'workflowName':_0x407a96,'sessionTime':_0x5e42da,'params':_0xb56d0e});}async[a247_0x4713dd(0xe5)](_0xcdb0e){const _0x365d5a=a247_0x4713dd,{projectName:_0x5166b3,workflowName:_0x5f1dc2}=this[_0x365d5a(0x92)](_0xcdb0e),{id:_0x12db4a}=await this['resolveProjectId'](_0x5166b3);return await this[_0x365d5a(0x9d)][_0x365d5a(0xd1)](_0x12db4a,_0x5f1dc2);}async[a247_0x4713dd(0xf0)](_0x1d68ab,_0x6ed312,_0x3ce217){const _0x364b04=a247_0x4713dd,{promises:_0x5b16b2}=await import('fs'),_0x26a4e6=await import(_0x364b04(0xad)),_0x272354=await import('os'),_0x122310=await import(_0x364b04(0x114)),{id:_0x1b3559,name:_0x2165ed}=await this[_0x364b04(0xe7)](_0x1d68ab),_0x1a3712=_0x272354[_0x364b04(0xbb)](),_0x55ff7b=_0x26a4e6[_0x364b04(0xc8)](_0x1a3712,_0x364b04(0x113)+_0x1b3559+'-'+Date[_0x364b04(0x8b)]()+_0x364b04(0xf4));try{await this[_0x364b04(0x9d)][_0x364b04(0xda)](_0x1b3559,_0x55ff7b,_0x3ce217?.[_0x364b04(0x105)]);const _0xbd0ba2=_0x26a4e6['join'](_0x6ed312,_0x2165ed);await _0x5b16b2['mkdir'](_0xbd0ba2,{'recursive':!![]}),await _0x122310[_0x364b04(0xa1)]({'file':_0x55ff7b,'cwd':_0xbd0ba2,'gzip':!![]});const _0x95310f=async _0xb8344b=>{const _0x1d83f0=_0x364b04;let _0x2a991a=0x0;const _0x4ef7ed=await _0x5b16b2[_0x1d83f0(0x9e)](_0xb8344b,{'withFileTypes':!![]});for(const _0x282b44 of _0x4ef7ed){const _0x57403d=_0x26a4e6[_0x1d83f0(0xc8)](_0xb8344b,_0x282b44[_0x1d83f0(0xc9)]);if(_0x282b44[_0x1d83f0(0x108)]())_0x2a991a++;else _0x282b44['isDirectory']()&&(_0x2a991a+=await _0x95310f(_0x57403d));}return _0x2a991a;},_0x46ad3b=await _0x95310f(_0xbd0ba2);return{'projectName':_0x2165ed,'revision':_0x3ce217?.[_0x364b04(0x105)]||'latest','filesExtracted':_0x46ad3b};}finally{try{await _0x5b16b2[_0x364b04(0x10c)](_0x55ff7b);}catch{}}}async['push'](_0x4c2967,_0x3a22b1){const _0x2bc4b5=a247_0x4713dd,{promises:_0xbe5900}=await import('fs'),_0x3fc91e=await import(_0x2bc4b5(0xad)),_0x41041f=await import('tar'),_0x1d4d62=_0x3a22b1?.[_0x2bc4b5(0xab)]||_0x3fc91e[_0x2bc4b5(0xfc)](_0x4c2967),_0x848923=_0x3a22b1?.['revision']||new Date()[_0x2bc4b5(0xd3)]()[_0x2bc4b5(0xa0)](/[:.]/g,'-');try{await _0xbe5900[_0x2bc4b5(0x99)](_0x4c2967);}catch{throw new Error(_0x2bc4b5(0xee)+_0x4c2967);}if(!_0x3a22b1?.[_0x2bc4b5(0x116)]){const _0x3333c7=await _0xbe5900['readdir'](_0x4c2967),_0x3b005e=_0x3333c7['filter'](_0xa1b957=>_0xa1b957[_0x2bc4b5(0xdf)](WORKFLOW_FILE_EXTENSION));if(_0x3b005e[_0x2bc4b5(0xbc)]===0x0)throw new Error(_0x2bc4b5(0xf1)+WORKFLOW_FILE_EXTENSION+_0x2bc4b5(0xae));for(const _0xc5ab0b of _0x3b005e){const _0x45769a=_0x3fc91e[_0x2bc4b5(0xc8)](_0x4c2967,_0xc5ab0b);try{await _0xbe5900['access'](_0x45769a);}catch{throw new Error('Cannot\x20read\x20workflow\x20file:\x20'+_0xc5ab0b);}}}const _0x3a76a6=async(_0x2a97f7,_0x1f6329='')=>{const _0x4bcea8=_0x2bc4b5,_0x1c4da2=await _0xbe5900[_0x4bcea8(0x9e)](_0x2a97f7,{'withFileTypes':!![]}),_0x111887=[];for(const _0x138da8 of _0x1c4da2){const _0x5f5354=_0x3fc91e[_0x4bcea8(0xc8)](_0x1f6329,_0x138da8['name']),_0x1b3310=_0x3fc91e[_0x4bcea8(0xc8)](_0x2a97f7,_0x138da8[_0x4bcea8(0xc9)]);if(!shouldIncludeInArchive(_0x138da8[_0x4bcea8(0xc9)]))continue;_0x138da8[_0x4bcea8(0x106)]()?_0x111887[_0x4bcea8(0xe2)](...await _0x3a76a6(_0x1b3310,_0x5f5354)):_0x111887[_0x4bcea8(0xe2)](_0x5f5354);}return _0x111887;},_0x535fff=await _0x3a76a6(_0x4c2967),_0x4482d1=await import('os'),_0x4e4d6e=_0x4482d1[_0x2bc4b5(0xbb)](),_0x290a74=_0x3fc91e[_0x2bc4b5(0xc8)](_0x4e4d6e,_0x2bc4b5(0xd8)+Date[_0x2bc4b5(0x8b)]()+_0x2bc4b5(0xf4));try{await _0x41041f['create']({'file':_0x290a74,'gzip':!![],'cwd':_0x4c2967,'portable':!![]},_0x535fff);const _0x3ade46=await this['client'][_0x2bc4b5(0x115)](_0x1d4d62,_0x848923,_0x290a74,{'scheduleFrom':_0x3a22b1?.['scheduleFrom'],'clearSchedule':_0x3a22b1?.[_0x2bc4b5(0x101)],'clearScheduleAll':_0x3a22b1?.[_0x2bc4b5(0xf8)]});return{'projectId':_0x3ade46['id'],'projectName':_0x3ade46[_0x2bc4b5(0xc9)],'revision':_0x3ade46['revision']};}finally{try{await _0xbe5900[_0x2bc4b5(0x10c)](_0x290a74);}catch{}}}async[a247_0x4713dd(0x93)](_0x56b0df){const _0x4ebc55=a247_0x4713dd,{id:_0x1a1652}=await this[_0x4ebc55(0xe7)](_0x56b0df),_0x45684a=await this['client'][_0x4ebc55(0xe8)](_0x1a1652);return{'projectId':_0x45684a['id'],'projectName':_0x45684a[_0x4ebc55(0xc9)]};}async[a247_0x4713dd(0xf9)](_0x144f9d){const _0xf19895=a247_0x4713dd,{id:_0x10c053,name:_0x5f5647}=await this[_0xf19895(0xe7)](_0x144f9d),_0x76137a=await this[_0xf19895(0x9d)][_0xf19895(0xf9)](_0x10c053);return{'projectName':_0x5f5647,'secrets':_0x76137a};}async[a247_0x4713dd(0x91)](_0x558d7a,_0x282745,_0xeb8b9d){const _0x2666f1=a247_0x4713dd,{id:_0x538eb6,name:_0xda3311}=await this[_0x2666f1(0xe7)](_0x558d7a);return await this['client'][_0x2666f1(0x91)](_0x538eb6,_0x282745,_0xeb8b9d),{'projectName':_0xda3311,'key':_0x282745};}async[a247_0x4713dd(0x97)](_0x6dcc0f,_0xac2ce5){const _0x24b3b1=a247_0x4713dd,{id:_0xa1c931,name:_0x18fddd}=await this[_0x24b3b1(0xe7)](_0x6dcc0f),_0x174e05=Object[_0x24b3b1(0x95)](_0xac2ce5),_0x27c989=await Promise[_0x24b3b1(0xc3)](_0x174e05[_0x24b3b1(0xe6)](_0x272a15=>this[_0x24b3b1(0x9d)]['setSecret'](_0xa1c931,_0x272a15,_0xac2ce5[_0x272a15]))),_0x4feb7a=_0x27c989[_0x24b3b1(0xe6)]((_0xc8edda,_0x50e93c)=>_0xc8edda[_0x24b3b1(0x103)]===_0x24b3b1(0x111)?_0x174e05[_0x50e93c]:null)[_0x24b3b1(0x8f)](_0x2fe773=>_0x2fe773!==null);if(_0x4feb7a[_0x24b3b1(0xbc)]>0x0)throw new SDKError(ErrorCode[_0x24b3b1(0xc0)],_0x24b3b1(0xb8)+(_0x4feb7a[_0x24b3b1(0xbc)]>0x1?'s':'')+':\x20'+_0x4feb7a[_0x24b3b1(0xc8)](',\x20'));return{'projectName':_0x18fddd,'keys':_0x174e05};}async['deleteSecret'](_0x487015,_0x2d5b5d){const _0x13d561=a247_0x4713dd,{id:_0x5c1cc6,name:_0x4d6881}=await this[_0x13d561(0xe7)](_0x487015);return await this[_0x13d561(0x9d)][_0x13d561(0x8c)](_0x5c1cc6,_0x2d5b5d),{'projectName':_0x4d6881,'key':_0x2d5b5d};}async[a247_0x4713dd(0xc1)](_0x340655,_0x4602c4){const _0x527c96=a247_0x4713dd;return pullWorkflow({'client':this['client'],'resolveProjectId':this[_0x527c96(0xe7)][_0x527c96(0xb1)](this)},_0x340655,_0x4602c4);}async[a247_0x4713dd(0xe1)](_0x19f059,_0x2b82b4){const _0x168e3b=a247_0x4713dd;return applyPullResult({'client':this[_0x168e3b(0x9d)],'resolveProjectId':this['resolveProjectId'][_0x168e3b(0xb1)](this)},_0x19f059,_0x2b82b4);}async[a247_0x4713dd(0xc4)](_0xbc9b39){const _0x396c9d=a247_0x4713dd;return preparePushWorkflow({'client':this[_0x396c9d(0x9d)],'resolveProjectId':this[_0x396c9d(0xe7)][_0x396c9d(0xb1)](this)},_0xbc9b39);}async[a247_0x4713dd(0xd6)](_0x1e9707){const _0x3c7b26=a247_0x4713dd;return executePushWorkflow({'client':this[_0x3c7b26(0x9d)],'resolveProjectId':this[_0x3c7b26(0xe7)][_0x3c7b26(0xb1)](this)},_0x1e9707);}async[a247_0x4713dd(0xd5)](_0x5dc1a9,_0x144ba2,_0x319ea6){const _0x411c54=a247_0x4713dd;return prepareCloneWorkflow({'client':this[_0x411c54(0x9d)]},_0x5dc1a9,_0x144ba2,_0x319ea6);}async[a247_0x4713dd(0x10e)](_0x550f74){const _0x5d2d19=a247_0x4713dd;return executeCloneWorkflow({'client':this[_0x5d2d19(0x9d)]},_0x550f74);}async['listSchedules'](_0x17ffb5){const _0x858e1b=a247_0x4713dd,_0x1f483a=Math[_0x858e1b(0xc7)](Number(_0x17ffb5?.[_0x858e1b(0xfe)])||MAX_PAGINATION_LIMIT,MAX_PAGINATION_LIMIT);return await this['client'][_0x858e1b(0xac)]({'limit':_0x1f483a});}async[a247_0x4713dd(0xb0)](_0x581aba,_0x78a4e8){const _0x4d2524=a247_0x4713dd,{id:_0x2f6452}=await this[_0x4d2524(0xe7)](_0x581aba),_0x36da01=Math[_0x4d2524(0xc7)](Number(_0x78a4e8?.['limit'])||MAX_PAGINATION_LIMIT,MAX_PAGINATION_LIMIT);return await this['client'][_0x4d2524(0xb0)](_0x2f6452,{'workflow':_0x78a4e8?.[_0x4d2524(0xe9)],'limit':_0x36da01});}async[a247_0x4713dd(0xa3)](_0x2b3284){const _0xca67bc=a247_0x4713dd;return await this[_0xca67bc(0x9d)][_0xca67bc(0xa3)](_0x2b3284);}async[a247_0x4713dd(0xa8)](_0x20005f,_0x4867e8){const _0x1d8be7=a247_0x4713dd;return await this['client'][_0x1d8be7(0xa8)](_0x20005f,_0x4867e8);}async[a247_0x4713dd(0xaf)](_0x1238b2){const _0x375203=a247_0x4713dd;return await this[_0x375203(0x9d)][_0x375203(0xaf)](_0x1238b2);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3beb2b,_0x293a7a){const _0x5796aa=a248_0x1b4a,_0x129212=_0x3beb2b();while(!![]){try{const _0x2cf435=parseInt(_0x5796aa(0x90))/0x1*(-parseInt(_0x5796aa(0x8a))/0x2)+parseInt(_0x5796aa(0x9b))/0x3+parseInt(_0x5796aa(0x85))/0x4*(-parseInt(_0x5796aa(0xa1))/0x5)+parseInt(_0x5796aa(0xa5))/0x6*(-parseInt(_0x5796aa(0x8d))/0x7)+parseInt(_0x5796aa(0x8f))/0x8*(parseInt(_0x5796aa(0x75))/0x9)+parseInt(_0x5796aa(0x9f))/0xa*(parseInt(_0x5796aa(0x83))/0xb)+parseInt(_0x5796aa(0x93))/0xc;if(_0x2cf435===_0x293a7a)break;else _0x129212['push'](_0x129212['shift']());}catch(_0xe06930){_0x129212['push'](_0x129212['shift']());}}}(a248_0xa679,0x686fa));import{existsSync,promises as a248_0x223d3b}from'fs';import a248_0x52a108 from'path';import a248_0xdc9bcb from'os';function a248_0x1b4a(_0x4e51d0,_0x3b3cad){_0x4e51d0=_0x4e51d0-0x69;const _0xa6793b=a248_0xa679();let _0x1b4a7d=_0xa6793b[_0x4e51d0];return _0x1b4a7d;}import{generateDiff,formatDiffWithColors,hasChanges}from'../../utils/diff.js';function a248_0xa679(){const _0x1bbcf2=['catch','\x20(archive\x20size:\x20','sort','type','Failed\x20to\x20extract\x20project\x20archive','tdx-wf-apply-','has','archive.tar.gz','push','tmpdir','path','cwd','modified','new','9PWjmNq','stat','unlink','revision','join','add','mkdir','projectId','readFile','filter','downloadProjectArchive','unchanged','extracted','isNewProject','2619012UQYgVL','tar','28MUnmfT','changes','tdx-wf-pull-','tdx.json','mkdtemp','193106ZioYqk','getProject','length','63dEFDDm','name','2389944sARYiB','7bXXxZJ','The\x20archive\x20may\x20be\x20truncated\x20or\x20corrupted.\x20Try\x20pushing\x20a\x20new\x20revision\x20or\x20contact\x20support.','targetDir','18586200ImFwnF','TAR_BAD_ARCHIVE','extract','readdir','size','\x20bytes)','projectName','latest','79158TWZcCN','utf-8','WORKFLOW_ARCHIVE_CORRUPTED','The\x20archive\x20passed\x20initial\x20validation\x20but\x20extraction\x20failed.\x20','20AMVSXw','message','347435bOhdtS','zlib','writeFile','includes','506742BDGtNp','deleted'];a248_0xa679=function(){return _0x1bbcf2;};return a248_0xa679();}import{getWorkflowProjectDir,createWorkflowTdxConfigContent,updateWorkflowTdxConfig}from'./tdx-config.js';import{SDKError,ErrorCode}from'../errors.js';export async function pullWorkflow(_0x232375,_0x466439,_0x24f75d={}){const _0x42d58c=a248_0x1b4a,_0x55eba7=await import(_0x42d58c(0x84)),{client:_0x4977f2,resolveProjectId:_0x949a5e}=_0x232375,{id:_0x2af270,name:_0x585b53}=await _0x949a5e(_0x466439),_0x52a35d=_0x24f75d['baseDir']||process[_0x42d58c(0x72)](),_0x59209a=_0x24f75d[_0x42d58c(0x92)]||getWorkflowProjectDir(_0x585b53,_0x52a35d),_0x3777cc=a248_0x52a108[_0x42d58c(0x79)](_0x59209a,_0x42d58c(0x88)),_0x360ac2=!existsSync(_0x3777cc),_0x4b4e4c=await a248_0x223d3b[_0x42d58c(0x89)](a248_0x52a108[_0x42d58c(0x79)](a248_0xdc9bcb[_0x42d58c(0x70)](),_0x42d58c(0x87))),_0x40e601=a248_0x52a108[_0x42d58c(0x79)](_0x4b4e4c,_0x42d58c(0x6e)),_0x34ce9e=a248_0x52a108[_0x42d58c(0x79)](_0x4b4e4c,_0x42d58c(0x81));try{await _0x4977f2[_0x42d58c(0x7f)](_0x2af270,_0x40e601,_0x24f75d[_0x42d58c(0x78)]),await a248_0x223d3b[_0x42d58c(0x7b)](_0x34ce9e,{'recursive':!![]});try{await _0x55eba7[_0x42d58c(0x95)]({'file':_0x40e601,'cwd':_0x34ce9e,'gzip':!![]});}catch(_0xb18efb){const _0x315ba9=_0xb18efb instanceof Error?_0xb18efb[_0x42d58c(0xa0)]:String(_0xb18efb);if(_0x315ba9[_0x42d58c(0xa4)](_0x42d58c(0x94))||_0x315ba9[_0x42d58c(0xa4)](_0x42d58c(0xa2))){const _0x3f153d=await a248_0x223d3b[_0x42d58c(0x76)](_0x40e601)[_0x42d58c(0xa7)](()=>null),_0x2cbb58=_0x3f153d?_0x42d58c(0xa8)+_0x3f153d[_0x42d58c(0x97)]+_0x42d58c(0x98):'';throw new SDKError(ErrorCode[_0x42d58c(0x9d)],_0x42d58c(0x6b)+_0x2cbb58+':\x20'+_0x315ba9,_0xb18efb,{'helpText':_0x42d58c(0x9e)+_0x42d58c(0x91)});}throw _0xb18efb;}const _0x20c109=await _0x4977f2[_0x42d58c(0x8b)](_0x2af270),_0x1ca211=_0x24f75d[_0x42d58c(0x78)]||_0x20c109['revision']||_0x42d58c(0x9a),_0x7c4dce=await calculateChanges(_0x59209a,_0x34ce9e,_0x360ac2),_0x8587c4={'new':_0x7c4dce['filter'](_0x5d77fe=>_0x5d77fe[_0x42d58c(0x6a)]==='new')['length'],'modified':_0x7c4dce[_0x42d58c(0x7e)](_0x2067f2=>_0x2067f2['type']===_0x42d58c(0x73))[_0x42d58c(0x8c)],'deleted':_0x7c4dce[_0x42d58c(0x7e)](_0x408e46=>_0x408e46[_0x42d58c(0x6a)]==='deleted')['length'],'unchanged':_0x7c4dce['filter'](_0x39e9b4=>_0x39e9b4[_0x42d58c(0x6a)]===_0x42d58c(0x80))[_0x42d58c(0x8c)]};return{'projectName':_0x585b53,'projectId':_0x2af270,'revision':_0x1ca211,'targetDir':_0x59209a,'changes':_0x7c4dce,'summary':_0x8587c4,'hasChanges':_0x8587c4[_0x42d58c(0x74)]>0x0||_0x8587c4[_0x42d58c(0x73)]>0x0||_0x8587c4[_0x42d58c(0xa6)]>0x0,'isNewProject':_0x360ac2};}finally{await a248_0x223d3b['rm'](_0x4b4e4c,{'recursive':!![],'force':!![]});}}export async function applyPullResult(_0x4ada26,_0x282296,_0x2788e6={}){const _0x31a036=a248_0x1b4a,_0x1468b3=await import(_0x31a036(0x84)),{client:_0x34e8ea}=_0x4ada26,_0x5c8b6d=await a248_0x223d3b['mkdtemp'](a248_0x52a108['join'](a248_0xdc9bcb[_0x31a036(0x70)](),_0x31a036(0x6c))),_0x404db1=a248_0x52a108[_0x31a036(0x79)](_0x5c8b6d,_0x31a036(0x6e));try{await _0x34e8ea[_0x31a036(0x7f)](_0x282296[_0x31a036(0x7c)],_0x404db1,_0x2788e6['revision']),await a248_0x223d3b[_0x31a036(0x7b)](_0x282296[_0x31a036(0x92)],{'recursive':!![]});for(const _0x50af9b of _0x282296[_0x31a036(0x86)]){if(_0x50af9b[_0x31a036(0x6a)]===_0x31a036(0xa6)){const _0x1b4b39=a248_0x52a108[_0x31a036(0x79)](_0x282296[_0x31a036(0x92)],_0x50af9b[_0x31a036(0x71)]);await a248_0x223d3b[_0x31a036(0x77)](_0x1b4b39)[_0x31a036(0xa7)](()=>{});}}try{await _0x1468b3['extract']({'file':_0x404db1,'cwd':_0x282296[_0x31a036(0x92)],'gzip':!![]});}catch(_0x2d6e6b){const _0x4ef2b1=_0x2d6e6b instanceof Error?_0x2d6e6b['message']:String(_0x2d6e6b);if(_0x4ef2b1[_0x31a036(0xa4)]('TAR_BAD_ARCHIVE')||_0x4ef2b1[_0x31a036(0xa4)](_0x31a036(0xa2))){const _0x300881=await a248_0x223d3b[_0x31a036(0x76)](_0x404db1)['catch'](()=>null),_0x546887=_0x300881?_0x31a036(0xa8)+_0x300881[_0x31a036(0x97)]+_0x31a036(0x98):'';throw new SDKError(ErrorCode[_0x31a036(0x9d)],_0x31a036(0x6b)+_0x546887+':\x20'+_0x4ef2b1,_0x2d6e6b,{'helpText':_0x31a036(0x9e)+_0x31a036(0x91)});}throw _0x2d6e6b;}const _0x5d2cfd=a248_0x52a108[_0x31a036(0x79)](_0x282296[_0x31a036(0x92)],_0x31a036(0x88));if(_0x282296[_0x31a036(0x82)]){const _0x57485c=createWorkflowTdxConfigContent(_0x282296[_0x31a036(0x99)],_0x282296[_0x31a036(0x7c)],_0x282296[_0x31a036(0x78)]);await a248_0x223d3b[_0x31a036(0xa3)](_0x5d2cfd,_0x57485c,'utf-8');}else updateWorkflowTdxConfig(_0x5d2cfd,{'last_pulled_revision':_0x282296[_0x31a036(0x78)],'last_pulled_at':new Date()['toISOString']()});}finally{await a248_0x223d3b['rm'](_0x5c8b6d,{'recursive':!![],'force':!![]});}}async function calculateChanges(_0x562181,_0x6b3277,_0x997250){const _0x403f80=a248_0x1b4a,_0x14fd7e=[],_0x1c889e=await getAllFiles(_0x6b3277),_0x3ae748=existsSync(_0x562181)?await getAllFiles(_0x562181):new Set();for(const _0x34d886 of _0x1c889e){const _0x9ea4cc=a248_0x52a108[_0x403f80(0x79)](_0x562181,_0x34d886),_0x5396fb=a248_0x52a108[_0x403f80(0x79)](_0x6b3277,_0x34d886);if(_0x34d886===_0x403f80(0x88))continue;const _0x3f70e4=await a248_0x223d3b['readFile'](_0x5396fb,_0x403f80(0x9c))[_0x403f80(0xa7)](()=>null);if(_0x3f70e4===null)continue;if(!existsSync(_0x9ea4cc)||_0x997250)_0x14fd7e['push']({'path':_0x34d886,'type':'new','newContent':_0x3f70e4});else{const _0xba0752=await a248_0x223d3b[_0x403f80(0x7d)](_0x9ea4cc,'utf-8')[_0x403f80(0xa7)](()=>null);if(_0xba0752===null)_0x14fd7e[_0x403f80(0x6f)]({'path':_0x34d886,'type':_0x403f80(0x73),'newContent':_0x3f70e4});else{if(_0xba0752!==_0x3f70e4){const _0x4376c6=generateDiff(_0xba0752,_0x3f70e4),_0x362482=hasChanges(_0x4376c6)?formatDiffWithColors(_0x4376c6):undefined;_0x14fd7e['push']({'path':_0x34d886,'type':_0x403f80(0x73),'oldContent':_0xba0752,'newContent':_0x3f70e4,'diff':_0x362482});}else _0x14fd7e[_0x403f80(0x6f)]({'path':_0x34d886,'type':_0x403f80(0x80)});}}}if(!_0x997250)for(const _0x490b9f of _0x3ae748){if(_0x490b9f==='tdx.json')continue;if(!_0x1c889e[_0x403f80(0x6d)](_0x490b9f)){const _0x2e8e34=a248_0x52a108[_0x403f80(0x79)](_0x562181,_0x490b9f),_0x501dd3=await a248_0x223d3b[_0x403f80(0x7d)](_0x2e8e34,_0x403f80(0x9c))[_0x403f80(0xa7)](()=>undefined);_0x14fd7e[_0x403f80(0x6f)]({'path':_0x490b9f,'type':_0x403f80(0xa6),'oldContent':_0x501dd3});}}return _0x14fd7e[_0x403f80(0x69)]((_0xf1674b,_0x22daaa)=>_0xf1674b[_0x403f80(0x71)]['localeCompare'](_0x22daaa[_0x403f80(0x71)])),_0x14fd7e;}async function getAllFiles(_0x5e24ed,_0x5be1d4=''){const _0x57bd4b=a248_0x1b4a,_0x596036=new Set();if(!existsSync(_0x5e24ed))return _0x596036;const _0x462b15=await a248_0x223d3b[_0x57bd4b(0x96)](_0x5e24ed,{'withFileTypes':!![]});for(const _0x1b3acd of _0x462b15){const _0x15c4b0=_0x5be1d4?a248_0x52a108[_0x57bd4b(0x79)](_0x5be1d4,_0x1b3acd['name']):_0x1b3acd[_0x57bd4b(0x8e)];if(_0x1b3acd['isDirectory']()){const _0x387c4b=await getAllFiles(a248_0x52a108[_0x57bd4b(0x79)](_0x5e24ed,_0x1b3acd[_0x57bd4b(0x8e)]),_0x15c4b0);for(const _0x3d4aee of _0x387c4b){_0x596036[_0x57bd4b(0x7a)](_0x3d4aee);}}else _0x596036[_0x57bd4b(0x7a)](_0x15c4b0);}return _0x596036;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x462c2b,_0x55190d){const _0x518a2c=a249_0x23b0,_0x8085ef=_0x462c2b();while(!![]){try{const _0x2b5e79=-parseInt(_0x518a2c(0x1ce))/0x1*(parseInt(_0x518a2c(0x1d4))/0x2)+-parseInt(_0x518a2c(0x1d3))/0x3+-parseInt(_0x518a2c(0x1f5))/0x4+-parseInt(_0x518a2c(0x1ed))/0x5*(parseInt(_0x518a2c(0x1f1))/0x6)+-parseInt(_0x518a2c(0x1e9))/0x7*(parseInt(_0x518a2c(0x1ca))/0x8)+parseInt(_0x518a2c(0x1cc))/0x9+parseInt(_0x518a2c(0x1e4))/0xa*(parseInt(_0x518a2c(0x1f8))/0xb);if(_0x2b5e79===_0x55190d)break;else _0x8085ef['push'](_0x8085ef['shift']());}catch(_0x15b7f3){_0x8085ef['push'](_0x8085ef['shift']());}}}(a249_0x5854,0x56113));import{promises as a249_0x459fa0}from'fs';function a249_0x5854(){const _0x34e65f=['projectName','TAR_BAD_ARCHIVE','stat','tdx-wf-push-','configResult','Failed\x20to\x20extract\x20remote\x20project\x20archive\x20for\x20comparison','join','has','53432rXxuHv','.digdagignore','1657854FzrLPX','workflow_project','4Omtinq','filter','new','tar','extracted','1185717ZlMBQb','110870GsmkkI','sort','modified','mkdir','toISOString','configPath','posix','revision','archive.tar.gz','zlib','name','push','endsWith','downloadProjectArchive','deleted','path','10wYFDuZ','includes','isDirectory','message','readdir','518oQpdVl','readFile','add','unchanged','2845CCCLkD','type','skipSchedule','cwd','4710YvufqY','catch','sourceDir','tmpdir','1821776gNJIOd','length','WORKFLOW_ARCHIVE_CORRUPTED','23998249pQGjXS','tdx.json','skipValidation','create','utf-8','size','replace','Use\x20\x27tdx\x20wf\x20upload\x27\x20to\x20force\x20push\x20without\x20comparison.'];a249_0x5854=function(){return _0x34e65f;};return a249_0x5854();}import a249_0x4c132c from'path';import a249_0x400882 from'os';import{generateDiff,formatDiffWithColors,hasChanges}from'../../utils/diff.js';import{findWorkflowTdxConfig,updateWorkflowTdxConfig}from'./tdx-config.js';import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION,loadDigdagignore,createIgnoreInstance,addScopedPatterns,shouldIgnoreWithInstance}from'./workflow-utils.js';import{SDKError,ErrorCode}from'../errors.js';export async function preparePushWorkflow(_0x206c30,_0x5d740b={}){const _0x42fcef=a249_0x23b0,_0x4f9ff2=await import(_0x42fcef(0x1d1)),{client:_0x326e88,resolveProjectId:_0x33becc}=_0x206c30,_0x14e6b1=_0x5d740b['sourceDir']||process[_0x42fcef(0x1f0)](),_0x1fda9b=findWorkflowTdxConfig(_0x14e6b1),{config:_0xb619c7,configDir:_0x2708ef}=_0x1fda9b;let _0x232b3a,_0x1e94e5=_0xb619c7['workflow_project'];try{const _0xfd6388=await _0x33becc(_0xb619c7[_0x42fcef(0x1cd)]);_0x232b3a=_0xfd6388['id'],_0x1e94e5=_0xfd6388[_0x42fcef(0x1de)];}catch{_0x232b3a='';}const _0x8064a6=_0x5d740b[_0x42fcef(0x1db)]||new Date()['toISOString']()[_0x42fcef(0x1fe)](/[:.]/g,'-');if(!_0x5d740b[_0x42fcef(0x1fa)]){const _0x5b3086=await a249_0x459fa0[_0x42fcef(0x1e8)](_0x2708ef),_0x532d5a=_0x5b3086['filter'](_0x271825=>_0x271825[_0x42fcef(0x1e0)](WORKFLOW_FILE_EXTENSION));if(_0x532d5a[_0x42fcef(0x1f6)]===0x0)throw new Error('No\x20'+WORKFLOW_FILE_EXTENSION+'\x20workflow\x20files\x20found\x20in\x20'+_0x2708ef);}const _0x399750=await getProjectFiles(_0x2708ef);let _0x3983ab;if(_0x232b3a){const _0x19d70b=await a249_0x459fa0['mkdtemp'](a249_0x4c132c['join'](a249_0x400882['tmpdir'](),_0x42fcef(0x203))),_0x36950c=a249_0x4c132c[_0x42fcef(0x1c8)](_0x19d70b,'archive.tar.gz'),_0x2fc4b9=a249_0x4c132c[_0x42fcef(0x1c8)](_0x19d70b,_0x42fcef(0x1d2));try{await _0x326e88[_0x42fcef(0x1e1)](_0x232b3a,_0x36950c),await a249_0x459fa0[_0x42fcef(0x1d7)](_0x2fc4b9,{'recursive':!![]});try{await _0x4f9ff2['extract']({'file':_0x36950c,'cwd':_0x2fc4b9,'gzip':!![]});}catch(_0x3324db){const _0x5db1c9=_0x3324db instanceof Error?_0x3324db[_0x42fcef(0x1e7)]:String(_0x3324db);if(_0x5db1c9['includes'](_0x42fcef(0x201))||_0x5db1c9[_0x42fcef(0x1e5)](_0x42fcef(0x1dd))){const _0x449559=await a249_0x459fa0[_0x42fcef(0x202)](_0x36950c)[_0x42fcef(0x1f2)](()=>null),_0x274ed3=_0x449559?'\x20(archive\x20size:\x20'+_0x449559[_0x42fcef(0x1fd)]+'\x20bytes)':'';throw new SDKError(ErrorCode[_0x42fcef(0x1f7)],_0x42fcef(0x1c7)+_0x274ed3+':\x20'+_0x5db1c9,_0x3324db,{'helpText':_0x42fcef(0x1ff)});}throw _0x3324db;}_0x3983ab=await calculatePushChanges(_0x2708ef,_0x2fc4b9,_0x399750);}finally{await a249_0x459fa0['rm'](_0x19d70b,{'recursive':!![],'force':!![]});}}else{_0x3983ab=[];for(const _0x3f05b7 of _0x399750){const _0x17f415=a249_0x4c132c[_0x42fcef(0x1c8)](_0x2708ef,_0x3f05b7),_0x1c80fd=await a249_0x459fa0[_0x42fcef(0x1ea)](_0x17f415,_0x42fcef(0x1fc))[_0x42fcef(0x1f2)](()=>null);_0x3983ab[_0x42fcef(0x1df)]({'path':_0x3f05b7,'type':_0x42fcef(0x1d0),'newContent':_0x1c80fd||undefined});}}const _0x14b124={'new':_0x3983ab[_0x42fcef(0x1cf)](_0x278ac6=>_0x278ac6[_0x42fcef(0x1ee)]==='new')[_0x42fcef(0x1f6)],'modified':_0x3983ab[_0x42fcef(0x1cf)](_0x379b81=>_0x379b81[_0x42fcef(0x1ee)]===_0x42fcef(0x1d6))[_0x42fcef(0x1f6)],'deleted':_0x3983ab['filter'](_0x3f6528=>_0x3f6528[_0x42fcef(0x1ee)]==='deleted')['length'],'unchanged':_0x3983ab[_0x42fcef(0x1cf)](_0x116481=>_0x116481[_0x42fcef(0x1ee)]==='unchanged')[_0x42fcef(0x1f6)]};return{'projectName':_0x1e94e5,'projectId':_0x232b3a,'revision':_0x8064a6,'sourceDir':_0x2708ef,'changes':_0x3983ab,'summary':_0x14b124,'hasChanges':_0x14b124[_0x42fcef(0x1d0)]>0x0||_0x14b124['modified']>0x0||_0x14b124[_0x42fcef(0x1e2)]>0x0,'configResult':_0x1fda9b,'skipSchedule':_0x5d740b[_0x42fcef(0x1ef)]};}function a249_0x23b0(_0x516da3,_0x5dca39){_0x516da3=_0x516da3-0x1c6;const _0x5854ff=a249_0x5854();let _0x23b019=_0x5854ff[_0x516da3];return _0x23b019;}export async function executePushWorkflow(_0xf1bb64,_0x585775){const _0x54639a=a249_0x23b0,_0x245e9a=await import('tar'),{client:_0x458ab0}=_0xf1bb64,_0xb32c50=await getProjectFiles(_0x585775['sourceDir']),_0x428850=await a249_0x459fa0['mkdtemp'](a249_0x4c132c[_0x54639a(0x1c8)](a249_0x400882[_0x54639a(0x1f4)](),'tdx-wf-push-archive-')),_0x3ade52=a249_0x4c132c[_0x54639a(0x1c8)](_0x428850,_0x54639a(0x1dc));try{await _0x245e9a[_0x54639a(0x1fb)]({'file':_0x3ade52,'gzip':!![],'cwd':_0x585775[_0x54639a(0x1f3)],'portable':!![]},_0xb32c50);const _0xc77312=await _0x458ab0['uploadProjectArchive'](_0x585775[_0x54639a(0x200)],_0x585775[_0x54639a(0x1db)],_0x3ade52,{'skipSchedule':_0x585775['skipSchedule']});return updateWorkflowTdxConfig(_0x585775[_0x54639a(0x1c6)][_0x54639a(0x1d9)],{'workflow_project_id':_0xc77312['id'],'last_pushed_revision':_0xc77312[_0x54639a(0x1db)],'last_pushed_at':new Date()[_0x54639a(0x1d8)]()}),{'projectId':_0xc77312['id'],'projectName':_0xc77312[_0x54639a(0x1de)],'revision':_0xc77312['revision']};}finally{await a249_0x459fa0['rm'](_0x428850,{'recursive':!![],'force':!![]});}}async function getProjectFiles(_0x5751e6,_0x48d1be=_0x5751e6,_0x1d6792='',_0x12fdbc=null){const _0x218c2b=a249_0x23b0,_0xb0d2cf=[];if(_0x12fdbc===null){_0x12fdbc=createIgnoreInstance();const _0xa33caa=await loadDigdagignore(_0x5751e6);_0xa33caa&&_0x12fdbc[_0x218c2b(0x1eb)](_0xa33caa);}if(_0x1d6792!==''){const _0x1a9c8c=await loadDigdagignore(_0x48d1be);_0x1a9c8c&&addScopedPatterns(_0x12fdbc,_0x1a9c8c,_0x1d6792);}const _0x46a885=await a249_0x459fa0['readdir'](_0x48d1be,{'withFileTypes':!![]});for(const _0x1c241d of _0x46a885){const _0x1e448c=_0x1d6792?a249_0x4c132c[_0x218c2b(0x1da)][_0x218c2b(0x1c8)](_0x1d6792,_0x1c241d[_0x218c2b(0x1de)]):_0x1c241d[_0x218c2b(0x1de)];if(_0x1c241d['name']===_0x218c2b(0x1f9))continue;if(_0x1c241d['name']===_0x218c2b(0x1cb))continue;if(!shouldIncludeInArchive(_0x1c241d[_0x218c2b(0x1de)]))continue;if(shouldIgnoreWithInstance(_0x12fdbc,_0x1e448c,_0x1c241d['isDirectory']()))continue;if(_0x1c241d[_0x218c2b(0x1e6)]()){const _0x2eca1=await getProjectFiles(_0x5751e6,a249_0x4c132c[_0x218c2b(0x1c8)](_0x48d1be,_0x1c241d[_0x218c2b(0x1de)]),_0x1e448c,_0x12fdbc);_0xb0d2cf[_0x218c2b(0x1df)](..._0x2eca1);}else _0xb0d2cf[_0x218c2b(0x1df)](_0x1e448c);}return _0xb0d2cf;}async function calculatePushChanges(_0x219e75,_0x1c9dd9,_0x18de7e){const _0x41edd4=a249_0x23b0,_0x315309=[],_0x569468=new Set(await getProjectFiles(_0x1c9dd9));for(const _0x58abed of _0x18de7e){const _0x11c27f=a249_0x4c132c['join'](_0x219e75,_0x58abed),_0x22d8f2=a249_0x4c132c[_0x41edd4(0x1c8)](_0x1c9dd9,_0x58abed),_0x254e1f=await a249_0x459fa0[_0x41edd4(0x1ea)](_0x11c27f,_0x41edd4(0x1fc))[_0x41edd4(0x1f2)](()=>null);if(_0x254e1f===null)continue;if(!_0x569468[_0x41edd4(0x1c9)](_0x58abed))_0x315309['push']({'path':_0x58abed,'type':_0x41edd4(0x1d0),'newContent':_0x254e1f});else{const _0x1f23d7=await a249_0x459fa0[_0x41edd4(0x1ea)](_0x22d8f2,'utf-8')['catch'](()=>null);if(_0x1f23d7===null)_0x315309[_0x41edd4(0x1df)]({'path':_0x58abed,'type':_0x41edd4(0x1d6),'newContent':_0x254e1f});else{if(_0x1f23d7!==_0x254e1f){const _0x464ac1=generateDiff(_0x1f23d7,_0x254e1f),_0x7ce539=hasChanges(_0x464ac1)?formatDiffWithColors(_0x464ac1):undefined;_0x315309['push']({'path':_0x58abed,'type':_0x41edd4(0x1d6),'oldContent':_0x1f23d7,'newContent':_0x254e1f,'diff':_0x7ce539});}else _0x315309[_0x41edd4(0x1df)]({'path':_0x58abed,'type':_0x41edd4(0x1ec)});}}}for(const _0x465430 of _0x569468){if(!_0x18de7e[_0x41edd4(0x1e5)](_0x465430)){const _0xe3cba3=a249_0x4c132c[_0x41edd4(0x1c8)](_0x1c9dd9,_0x465430),_0x350557=await a249_0x459fa0[_0x41edd4(0x1ea)](_0xe3cba3,'utf-8')[_0x41edd4(0x1f2)](()=>undefined);_0x315309[_0x41edd4(0x1df)]({'path':_0x465430,'type':_0x41edd4(0x1e2),'oldContent':_0x350557});}}return _0x315309[_0x41edd4(0x1d5)]((_0x11a0cc,_0x5cfa2e)=>_0x11a0cc[_0x41edd4(0x1e3)]['localeCompare'](_0x5cfa2e[_0x41edd4(0x1e3)])),_0x315309;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a250_0x5985be=a250_0x4357;(function(_0x5dfc4d,_0x4e21ed){const _0xc8f35d=a250_0x4357,_0x56780e=_0x5dfc4d();while(!![]){try{const _0x250399=parseInt(_0xc8f35d(0xac))/0x1*(-parseInt(_0xc8f35d(0xaa))/0x2)+parseInt(_0xc8f35d(0xcb))/0x3+parseInt(_0xc8f35d(0xb0))/0x4*(-parseInt(_0xc8f35d(0xc0))/0x5)+-parseInt(_0xc8f35d(0xcf))/0x6+parseInt(_0xc8f35d(0xb5))/0x7+-parseInt(_0xc8f35d(0xc4))/0x8+-parseInt(_0xc8f35d(0xb4))/0x9*(-parseInt(_0xc8f35d(0xd9))/0xa);if(_0x250399===_0x4e21ed)break;else _0x56780e['push'](_0x56780e['shift']());}catch(_0x2c8079){_0x56780e['push'](_0x56780e['shift']());}}}(a250_0x2b93,0x47049));function a250_0x2b93(){const _0x4062e6=['label','activations','4615720lioJew','\x20\x20\x20←\x20','warning','⚠️\x20\x20This\x20workflow\x20contains\x20','⚠️\x20\x20ACTIVATION','entries',',\x20and\x20','515694dnGjdj','result_url','startsWith','⚠️\x20\x20HTTP\x20call','2862726RSiCkj','endsWith','email\x20sends','operator','⚠️\x20\x20DATA\x20EXPORT','⚠️\x20\x20Email\x20send','td>','mail','keys','\x20and\x20','12439470EBqfmH','children','repeat','326ZJjIsl','data\x20exports','2343EVJStM','td_for_each>','join','warningDetail','4ZpLsmO','result_connection','email\x20send','command','9wOcXTK','2402911ABEcBu','slice','name','string','isArray','max','baseIndent','HTTP\x20calls','push','object','http','161170hWwTKz','length'];a250_0x2b93=function(){return _0x4062e6;};return a250_0x2b93();}const OPERATOR_WARNINGS={'td_run>':'activation','http>':a250_0x5985be(0xbf),'http_call>':a250_0x5985be(0xbf),'mail>':a250_0x5985be(0xd6)},WARNING_META={'activation':{'label':a250_0x5985be(0xc8),'singular':'activation','plural':a250_0x5985be(0xc3)},'http':{'label':a250_0x5985be(0xce),'singular':'HTTP\x20call','plural':a250_0x5985be(0xbc)},'mail':{'label':a250_0x5985be(0xd4),'singular':a250_0x5985be(0xb2),'plural':a250_0x5985be(0xd1)},'export':{'label':a250_0x5985be(0xd3),'singular':'data\x20export','plural':a250_0x5985be(0xab)}};function emptySummary(){return{'activation':0x0,'http':0x0,'mail':0x0,'export':0x0};}function collectTasks(_0x5a78a7){const _0x2d25f3=a250_0x5985be;if(!_0x5a78a7||typeof _0x5a78a7!=='object')return[];if(Array[_0x2d25f3(0xb9)](_0x5a78a7))return _0x5a78a7['flatMap'](collectTasks);const _0x85e7bd=_0x5a78a7,_0x48dad3=[];for(const [_0x1739bb,_0x3c65d6]of Object[_0x2d25f3(0xc9)](_0x85e7bd)){if(_0x1739bb[_0x2d25f3(0xd0)]('>'))continue;_0x1739bb[_0x2d25f3(0xcd)]('+')?_0x48dad3[_0x2d25f3(0xbd)](buildTaskNode(_0x1739bb,_0x3c65d6)):_0x48dad3[_0x2d25f3(0xbd)](...collectTasks(_0x3c65d6));}return _0x48dad3;}function pickResultTarget(_0x2e76a0){const _0x32d6de=a250_0x5985be,_0x12a61d=_0x2e76a0[_0x32d6de(0xb1)];if(typeof _0x12a61d===_0x32d6de(0xb8)&&_0x12a61d[_0x32d6de(0xc1)]>0x0)return _0x12a61d;const _0x32e415=_0x2e76a0[_0x32d6de(0xcc)];if(typeof _0x32e415==='string'&&_0x32e415[_0x32d6de(0xc1)]>0x0)return _0x32e415;return undefined;}function buildTaskNode(_0x58b955,_0x41adcc){const _0x43be21=a250_0x5985be,_0x17faca={'name':_0x58b955,'children':[]};if(!_0x41adcc||typeof _0x41adcc!==_0x43be21(0xbe))return _0x17faca;const _0x49dd76=_0x41adcc;for(const [_0x574039,_0x3d9f9d]of Object['entries'](_0x49dd76)){if(!_0x574039[_0x43be21(0xd0)]('>'))continue;_0x17faca['operator']=_0x574039,_0x17faca[_0x43be21(0xb3)]=typeof _0x3d9f9d===_0x43be21(0xb8)?_0x3d9f9d:JSON['stringify'](_0x3d9f9d),_0x17faca[_0x43be21(0xc6)]=OPERATOR_WARNINGS[_0x574039];break;}if(_0x17faca['operator']===_0x43be21(0xd5)||_0x17faca[_0x43be21(0xd2)]===_0x43be21(0xad)){const _0x887434=pickResultTarget(_0x49dd76);_0x887434&&(_0x17faca[_0x43be21(0xc6)]='export',_0x17faca[_0x43be21(0xaf)]=_0x887434);}return _0x17faca[_0x43be21(0xda)]=collectTasks(_0x49dd76),_0x17faca;}export function parseTaskGraph(_0x155437){return collectTasks(_0x155437);}export function summarizeTaskGraph(_0x14a844){const _0x5e850e=emptySummary(),_0x39b709=_0x180f46=>{const _0x586fcd=a250_0x4357;for(const _0x5513ff of _0x180f46){if(_0x5513ff['warning'])_0x5e850e[_0x5513ff[_0x586fcd(0xc6)]]++;_0x39b709(_0x5513ff[_0x586fcd(0xda)]);}};return _0x39b709(_0x14a844),_0x5e850e;}const MAX_COMMAND_LENGTH=0x50;function a250_0x4357(_0x1e0647,_0x136712){_0x1e0647=_0x1e0647-0xa9;const _0x2b93b3=a250_0x2b93();let _0x4357c2=_0x2b93b3[_0x1e0647];return _0x4357c2;}function truncate(_0x5a9335,_0x48ac10){const _0x43819=a250_0x5985be;if(_0x5a9335[_0x43819(0xc1)]<=_0x48ac10)return _0x5a9335;return _0x5a9335[_0x43819(0xb6)](0x0,Math[_0x43819(0xba)](0x0,_0x48ac10-0x1))+'…';}export function formatTaskGraph(_0x2a7fad,_0x4acbfa={}){const _0x39782a=a250_0x5985be,_0x10b534=_0x4acbfa[_0x39782a(0xbb)]??0x1,_0x5a3ef2=[],_0x1c7191=(_0x1c27f8,_0x492947)=>{const _0x54ef53=_0x39782a;for(const _0x5bbd07 of _0x1c27f8){const _0x2812e9='\x20\x20'['repeat'](_0x10b534+_0x492947);_0x5a3ef2[_0x54ef53(0xbd)](''+_0x2812e9+_0x5bbd07[_0x54ef53(0xb7)]);if(_0x5bbd07[_0x54ef53(0xd2)]){const _0x14dee8='\x20\x20'[_0x54ef53(0xa9)](_0x10b534+_0x492947+0x1),_0x44a09e=_0x5bbd07['command']?'\x20'+truncate(_0x5bbd07['command'],MAX_COMMAND_LENGTH):'',_0x284d5b=_0x5bbd07['warning']?_0x54ef53(0xc5)+WARNING_META[_0x5bbd07[_0x54ef53(0xc6)]][_0x54ef53(0xc2)]+(_0x5bbd07[_0x54ef53(0xaf)]?'\x20→\x20'+_0x5bbd07[_0x54ef53(0xaf)]:''):'';_0x5a3ef2[_0x54ef53(0xbd)](''+_0x14dee8+_0x5bbd07[_0x54ef53(0xd2)]+_0x44a09e+_0x284d5b);}_0x1c7191(_0x5bbd07['children'],_0x492947+0x1);}};return _0x1c7191(_0x2a7fad,0x0),_0x5a3ef2;}export function formatWarningSummary(_0xa8f335){const _0x1f801c=a250_0x5985be,_0xedee0f=[];for(const _0x4c9358 of Object[_0x1f801c(0xd7)](WARNING_META)){const _0x3bb9cc=_0xa8f335[_0x4c9358];if(_0x3bb9cc>0x0){const {singular:_0x5ac0b6,plural:_0x213aee}=WARNING_META[_0x4c9358];_0xedee0f[_0x1f801c(0xbd)](_0x3bb9cc+'\x20'+(_0x3bb9cc===0x1?_0x5ac0b6:_0x213aee));}}if(_0xedee0f[_0x1f801c(0xc1)]===0x0)return null;if(_0xedee0f[_0x1f801c(0xc1)]===0x1)return _0x1f801c(0xc7)+_0xedee0f[0x0]+'.';if(_0xedee0f['length']===0x2)return _0x1f801c(0xc7)+_0xedee0f[0x0]+_0x1f801c(0xd8)+_0xedee0f[0x1]+'.';const _0x2b1d61=_0xedee0f[_0xedee0f['length']-0x1];return _0x1f801c(0xc7)+_0xedee0f[_0x1f801c(0xb6)](0x0,-0x1)[_0x1f801c(0xae)](',\x20')+_0x1f801c(0xca)+_0x2b1d61+'.';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a251_0x248fb5=a251_0x509d;(function(_0x308e34,_0x3b2261){const _0x19d8bd=a251_0x509d,_0x9236b4=_0x308e34();while(!![]){try{const _0x393be2=-parseInt(_0x19d8bd(0xf6))/0x1*(-parseInt(_0x19d8bd(0xee))/0x2)+-parseInt(_0x19d8bd(0xe7))/0x3+parseInt(_0x19d8bd(0xf8))/0x4*(-parseInt(_0x19d8bd(0xf4))/0x5)+parseInt(_0x19d8bd(0xf1))/0x6*(parseInt(_0x19d8bd(0xed))/0x7)+parseInt(_0x19d8bd(0xe2))/0x8*(parseInt(_0x19d8bd(0xfa))/0x9)+parseInt(_0x19d8bd(0xe6))/0xa+-parseInt(_0x19d8bd(0xe4))/0xb;if(_0x393be2===_0x3b2261)break;else _0x9236b4['push'](_0x9236b4['shift']());}catch(_0x4a618f){_0x9236b4['push'](_0x9236b4['shift']());}}}(a251_0x558a,0x46071));import{existsSync,readFileSync,writeFileSync}from'fs';import a251_0x508aae from'path';const TDX_CONFIG_FILE='tdx.json',WORKFLOWS_DIR=a251_0x248fb5(0xec);export function findWorkflowTdxConfigPath(_0x289fc4=process[a251_0x248fb5(0xf2)]()){const _0x3a7e83=a251_0x248fb5;let _0x2834c2=a251_0x508aae[_0x3a7e83(0xf9)](_0x289fc4);const _0x35a4dc=a251_0x508aae[_0x3a7e83(0xf0)](_0x2834c2)[_0x3a7e83(0xeb)];while(_0x2834c2!==_0x35a4dc){const _0x1700a6=a251_0x508aae[_0x3a7e83(0xf3)](_0x2834c2,TDX_CONFIG_FILE);if(existsSync(_0x1700a6))try{const _0x2086cf=readFileSync(_0x1700a6,'utf-8'),_0x4c321c=JSON[_0x3a7e83(0xf0)](_0x2086cf);if(_0x4c321c&&typeof _0x4c321c==='object'&&'workflow_project'in _0x4c321c)return _0x1700a6;}catch{}_0x2834c2=a251_0x508aae['dirname'](_0x2834c2);}return null;}export function loadWorkflowTdxConfig(_0x2f2e1b){const _0x4cb980=a251_0x248fb5,_0x64ff47=readFileSync(_0x2f2e1b,_0x4cb980(0xea));let _0x3bfb1e;try{_0x3bfb1e=JSON[_0x4cb980(0xf0)](_0x64ff47);}catch{throw new Error('Invalid\x20JSON\x20in\x20'+_0x2f2e1b);}if(!_0x3bfb1e||typeof _0x3bfb1e!==_0x4cb980(0xfc))throw new Error(_0x4cb980(0xfd));const _0x163e05=_0x3bfb1e;if(!_0x163e05[_0x4cb980(0xff)]||typeof _0x163e05[_0x4cb980(0xff)]!==_0x4cb980(0xe3))throw new Error(_0x4cb980(0xe9));return{'workflow_project':_0x163e05[_0x4cb980(0xff)],'workflow_project_id':typeof _0x163e05['workflow_project_id']===_0x4cb980(0xe3)?_0x163e05[_0x4cb980(0xfe)]:undefined,'last_pulled_revision':typeof _0x163e05[_0x4cb980(0xe8)]===_0x4cb980(0xe3)?_0x163e05[_0x4cb980(0xe8)]:undefined,'last_pulled_at':typeof _0x163e05[_0x4cb980(0xf7)]===_0x4cb980(0xe3)?_0x163e05[_0x4cb980(0xf7)]:undefined,'last_pushed_revision':typeof _0x163e05[_0x4cb980(0xe1)]==='string'?_0x163e05[_0x4cb980(0xe1)]:undefined,'last_pushed_at':typeof _0x163e05[_0x4cb980(0xfb)]==='string'?_0x163e05[_0x4cb980(0xfb)]:undefined};}export function findWorkflowTdxConfig(_0x194644=process[a251_0x248fb5(0xf2)]()){const _0x5c7be1=a251_0x248fb5,_0x1d0206=findWorkflowTdxConfigPath(_0x194644);if(!_0x1d0206)throw new Error('No\x20workflow\x20tdx.json\x20found.\x20Please\x20run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.');const _0x206209=loadWorkflowTdxConfig(_0x1d0206),_0x3fa8ee=a251_0x508aae[_0x5c7be1(0xef)](_0x1d0206);return{'config':_0x206209,'configPath':_0x1d0206,'configDir':_0x3fa8ee};}export function tryFindWorkflowTdxConfig(_0x3dd2ac){try{return findWorkflowTdxConfig(_0x3dd2ac);}catch{return null;}}function a251_0x509d(_0x1d0028,_0x2ab52f){_0x1d0028=_0x1d0028-0xe1;const _0x558a69=a251_0x558a();let _0x509dbe=_0x558a69[_0x1d0028];return _0x509dbe;}export function getWorkflowProjectDir(_0x48af8e,_0x49d1cb=process[a251_0x248fb5(0xf2)]()){const _0x191ce5=a251_0x248fb5;return a251_0x508aae[_0x191ce5(0xf3)](_0x49d1cb,WORKFLOWS_DIR,_0x48af8e);}export function getWorkflowTdxConfigPath(_0x306aca,_0x249fbb=process[a251_0x248fb5(0xf2)]()){const _0x4d4c3a=a251_0x248fb5;return a251_0x508aae[_0x4d4c3a(0xf3)](getWorkflowProjectDir(_0x306aca,_0x249fbb),TDX_CONFIG_FILE);}function a251_0x558a(){const _0x2fa6aa=['parse','24QkWDpi','cwd','join','839110KOGPeI','toISOString','6234uBvpOE','last_pulled_at','8hGkNYe','resolve','1597203RKiByo','last_pushed_at','object','Invalid\x20tdx.json:\x20expected\x20object','workflow_project_id','workflow_project','last_pushed_revision','8hfoTFy','string','7019221djeyLx','stringify','4000600sxCBmr','1187553uYXxgS','last_pulled_revision','Invalid\x20tdx.json:\x20missing\x20or\x20invalid\x20\x27workflow_project\x27\x20field','utf-8','root','workflows','993517dxnNIP','164aXqahZ','dirname'];a251_0x558a=function(){return _0x2fa6aa;};return a251_0x558a();}export function createWorkflowTdxConfigContent(_0x539690,_0x1840e8,_0xf92360){const _0x2c8705=a251_0x248fb5,_0x1ba2e3={'workflow_project':_0x539690,..._0x1840e8&&{'workflow_project_id':_0x1840e8},..._0xf92360&&{'last_pulled_revision':_0xf92360},'last_pulled_at':new Date()[_0x2c8705(0xf5)]()};return JSON[_0x2c8705(0xe5)](_0x1ba2e3,null,0x2)+'\x0a';}export function saveWorkflowTdxConfig(_0x180803,_0x307f65){const _0x12ebe6=a251_0x248fb5,_0x53651e=JSON[_0x12ebe6(0xe5)](_0x307f65,null,0x2)+'\x0a';writeFileSync(_0x180803,_0x53651e,_0x12ebe6(0xea));}export function updateWorkflowTdxConfig(_0xb71040,_0x19e73b){const _0x29a069=loadWorkflowTdxConfig(_0xb71040),_0x41e591={..._0x29a069,..._0x19e73b};saveWorkflowTdxConfig(_0xb71040,_0x41e591);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a252_0x4fb81a=a252_0x1c26;(function(_0x3530c2,_0x397a4a){const _0x18d31=a252_0x1c26,_0x4963e0=_0x3530c2();while(!![]){try{const _0x2c8a14=-parseInt(_0x18d31(0x1bf))/0x1*(-parseInt(_0x18d31(0x1b3))/0x2)+-parseInt(_0x18d31(0x1b4))/0x3*(parseInt(_0x18d31(0x1be))/0x4)+parseInt(_0x18d31(0x1ae))/0x5+parseInt(_0x18d31(0x1b0))/0x6*(-parseInt(_0x18d31(0x1b6))/0x7)+-parseInt(_0x18d31(0x1c6))/0x8*(parseInt(_0x18d31(0x1b8))/0x9)+-parseInt(_0x18d31(0x1c4))/0xa*(-parseInt(_0x18d31(0x1b7))/0xb)+parseInt(_0x18d31(0x1c2))/0xc*(parseInt(_0x18d31(0x1c8))/0xd);if(_0x2c8a14===_0x397a4a)break;else _0x4963e0['push'](_0x4963e0['shift']());}catch(_0x1805f){_0x4963e0['push'](_0x4963e0['shift']());}}}(a252_0x2fc4,0x7fbf6));import{promises as a252_0x284097}from'fs';import a252_0x3f7f54 from'path';import a252_0x70a27a from'ignore';export const WORKFLOW_FILE_EXTENSION=a252_0x4fb81a(0x1c3);function a252_0x1c26(_0x46dad6,_0x16a963){_0x46dad6=_0x46dad6-0x1ad;const _0x2fc41e=a252_0x2fc4();let _0x1c2653=_0x2fc41e[_0x46dad6];return _0x1c2653;}export function shouldIncludeInArchive(_0x5823ef){const _0x56e9fe=a252_0x4fb81a;if(_0x5823ef===_0x56e9fe(0x1bd))return!![];if(_0x5823ef[_0x56e9fe(0x1af)]('.'))return![];if(_0x5823ef[_0x56e9fe(0x1b1)]('~'))return![];if(_0x5823ef==='Thumbs.db'||_0x5823ef===_0x56e9fe(0x1ad))return![];return!![];}export function parseDigdagignore(_0x132cfe){const _0x458347=a252_0x4fb81a;return _0x132cfe[_0x458347(0x1c1)]('\x0a')[_0x458347(0x1b9)](_0x4e21b0=>_0x4e21b0[_0x458347(0x1bb)]())[_0x458347(0x1c5)](_0x2517ab=>_0x2517ab[_0x458347(0x1c7)]>0x0&&!_0x2517ab[_0x458347(0x1af)]('#'));}export async function loadDigdagignore(_0x287add){const _0x494cf0=a252_0x4fb81a,_0x8e1612=a252_0x3f7f54[_0x494cf0(0x1ba)](_0x287add,_0x494cf0(0x1b2));try{const _0x292033=await a252_0x284097['readFile'](_0x8e1612,_0x494cf0(0x1b5));return parseDigdagignore(_0x292033);}catch(_0x45b53f){if(_0x45b53f['code']===_0x494cf0(0x1c0))return null;throw _0x45b53f;}}function a252_0x2fc4(){const _0x1b8818=['80EOLCbS','length','118040DNIXJv','.DS_Store','1524325PGChvL','startsWith','38274kvZRcG','endsWith','.digdagignore','10AvMTlk','15807qFWzPv','utf-8','434RaggMA','11VKWIjp','232569kBqxUJ','map','join','trim','add','.digdag','252QoIzAZ','109961zOCfpH','ENOENT','split','156FUZaSE','.dig','5363990MHfmuo','filter'];a252_0x2fc4=function(){return _0x1b8818;};return a252_0x2fc4();}export function createIgnoreInstance(_0x47b902){const _0x34859c=a252_0x4fb81a,_0x39ce7f=a252_0x70a27a();return _0x47b902&&_0x47b902[_0x34859c(0x1c7)]>0x0&&_0x39ce7f[_0x34859c(0x1bc)](_0x47b902),_0x39ce7f;}export function addScopedPatterns(_0x12a178,_0x14abdc,_0xb9ade1){const _0x421108=a252_0x4fb81a,_0x57943e=_0x14abdc[_0x421108(0x1b9)](_0x18981b=>{const _0x6693dc=_0x421108;if(_0x18981b['startsWith']('!')){const _0x1788bb=_0x18981b['slice'](0x1);if(_0x1788bb[_0x6693dc(0x1af)]('/'))return'!'+_0xb9ade1+_0x1788bb;return'!'+_0xb9ade1+'/'+_0x1788bb;}if(_0x18981b['startsWith']('/'))return''+_0xb9ade1+_0x18981b;return _0xb9ade1+'/'+_0x18981b;});return _0x12a178[_0x421108(0x1bc)](_0x57943e),_0x12a178;}export function shouldIgnoreWithInstance(_0x49f0e0,_0x4a522c,_0x2c9fa2){const _0x37de9f=_0x4a522c['replace'](/\\/g,'/'),_0x159375=_0x2c9fa2?_0x37de9f+'/':_0x37de9f;return _0x49f0e0['ignores'](_0x159375);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a253_0xd84692=a253_0x1af4;(function(_0x2fa1c6,_0x24dfd6){const _0xbd1b0b=a253_0x1af4,_0x20b786=_0x2fa1c6();while(!![]){try{const _0x49ee7c=parseInt(_0xbd1b0b(0x179))/0x1+parseInt(_0xbd1b0b(0x17d))/0x2*(-parseInt(_0xbd1b0b(0x186))/0x3)+-parseInt(_0xbd1b0b(0x182))/0x4*(parseInt(_0xbd1b0b(0x180))/0x5)+-parseInt(_0xbd1b0b(0x173))/0x6+-parseInt(_0xbd1b0b(0x189))/0x7+-parseInt(_0xbd1b0b(0x188))/0x8*(-parseInt(_0xbd1b0b(0x187))/0x9)+parseInt(_0xbd1b0b(0x176))/0xa;if(_0x49ee7c===_0x24dfd6)break;else _0x20b786['push'](_0x20b786['shift']());}catch(_0x23a3b7){_0x20b786['push'](_0x20b786['shift']());}}}(a253_0x5bdb,0x6b7d4));function a253_0x1af4(_0x28c9f5,_0x10cb26){_0x28c9f5=_0x28c9f5-0x173;const _0x5bdbf3=a253_0x5bdb();let _0x1af46a=_0x5bdbf3[_0x28c9f5];return _0x1af46a;}import*as a253_0x3a8b11 from'node:fs';import{join,resolve}from'node:path';import{getGlobalCacheDir}from'../../utils/global-cache.js';const LOG_FILE=join('work',a253_0xd84692(0x184),'access.jsonl');function getLogPath(){return join(getGlobalCacheDir(),LOG_FILE);}export function logAccess(_0x568fce,_0x5928f3){const _0x5003ba=a253_0xd84692,_0x3d8fa7=getLogPath();a253_0x3a8b11[_0x5003ba(0x17b)](join(_0x3d8fa7,'..'),{'recursive':!![]});const _0x4a23c9={'ts':Date[_0x5003ba(0x17a)](),'ws':resolve(_0x568fce),'path':_0x5928f3};a253_0x3a8b11[_0x5003ba(0x17c)](_0x3d8fa7,JSON[_0x5003ba(0x181)](_0x4a23c9)+'\x0a');}function a253_0x5bdb(){const _0x1dd135=['entries','logs','split','51qSwmTv','1557bDyZTH','33928oIUagU','3386600mnvtFO','path','4366416gZXstC','slice','readFileSync','20306280PliYID','map','get','488453fGQKwu','now','mkdirSync','appendFileSync','98502AJofHG','parse','set','135WxYzkO','stringify','113140lAYqjo'];a253_0x5bdb=function(){return _0x1dd135;};return a253_0x5bdb();}export function getRecentDocuments(_0x5849fb,_0x38187b=0x14){const _0x1a8b75=a253_0xd84692,_0x649bbd=getLastAccessedMap(_0x5849fb);return[..._0x649bbd[_0x1a8b75(0x183)]()]['sort']((_0x3d9968,_0x1d42e6)=>_0x1d42e6[0x1]-_0x3d9968[0x1])[_0x1a8b75(0x174)](0x0,_0x38187b)[_0x1a8b75(0x177)](([_0x27b741])=>_0x27b741);}export function getLastAccessedMap(_0x30f6ff){const _0x3fa54e=a253_0xd84692,_0x6a9d88=resolve(_0x30f6ff),_0x3abb7d=new Map();let _0x3419a6;try{_0x3419a6=a253_0x3a8b11[_0x3fa54e(0x175)](getLogPath(),'utf-8');}catch{return _0x3abb7d;}for(const _0x315e78 of _0x3419a6[_0x3fa54e(0x185)]('\x0a')){if(!_0x315e78)continue;try{const _0x18adeb=JSON[_0x3fa54e(0x17e)](_0x315e78);if(_0x18adeb['ws']!==_0x6a9d88)continue;const _0x12eb6f=_0x3abb7d[_0x3fa54e(0x178)](_0x18adeb[_0x3fa54e(0x18a)]);if(!_0x12eb6f||_0x18adeb['ts']>_0x12eb6f)_0x3abb7d[_0x3fa54e(0x17f)](_0x18adeb[_0x3fa54e(0x18a)],_0x18adeb['ts']);}catch{}}return _0x3abb7d;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1781d7,_0x51c3d5){const _0x2f7252=a254_0x2e2d,_0x3808d3=_0x1781d7();while(!![]){try{const _0x3fd5fe=parseInt(_0x2f7252(0x155))/0x1*(-parseInt(_0x2f7252(0x150))/0x2)+parseInt(_0x2f7252(0x142))/0x3+-parseInt(_0x2f7252(0x146))/0x4+parseInt(_0x2f7252(0x15a))/0x5*(parseInt(_0x2f7252(0x157))/0x6)+-parseInt(_0x2f7252(0x160))/0x7*(-parseInt(_0x2f7252(0x148))/0x8)+parseInt(_0x2f7252(0x14d))/0x9+-parseInt(_0x2f7252(0x15d))/0xa*(parseInt(_0x2f7252(0x14f))/0xb);if(_0x3fd5fe===_0x51c3d5)break;else _0x3808d3['push'](_0x3808d3['shift']());}catch(_0x1dfba4){_0x3808d3['push'](_0x3808d3['shift']());}}}(a254_0x1e3e,0x822c5));export function parseFrontmatter(_0x2a67ce){const _0x471fb2=a254_0x2e2d,_0x1a4bb2=_0x2a67ce[_0x471fb2(0x143)](/^---\s*\n([\s\S]*?)\n---\s*\n?([\s\S]*)$/);if(!_0x1a4bb2)return{'frontmatter':{},'body':_0x2a67ce[_0x471fb2(0x149)]()};const _0x27cd75=_0x1a4bb2[0x1],_0x2f3ae5=_0x1a4bb2[0x2][_0x471fb2(0x149)](),_0x3abe9c=parseSimpleYaml(_0x27cd75);return{'frontmatter':_0x3abe9c,'body':_0x2f3ae5};}export function serializeFrontmatter(_0x114a55,_0x41e341){const _0x24d6e6=a254_0x2e2d,_0x23fa2c=[];for(const [_0x186b76,_0x20d9e6]of Object['entries'](_0x114a55)){if(_0x20d9e6===undefined||_0x20d9e6===null)continue;if(Array[_0x24d6e6(0x151)](_0x20d9e6))_0x20d9e6['length']===0x0?_0x23fa2c[_0x24d6e6(0x15c)](_0x186b76+':\x20[]'):_0x23fa2c[_0x24d6e6(0x15c)](_0x186b76+_0x24d6e6(0x14c)+_0x20d9e6[_0x24d6e6(0x145)](_0x16b653=>formatYamlValue(String(_0x16b653)))['join'](',\x20')+']');else{if(typeof _0x20d9e6===_0x24d6e6(0x15b))_0x23fa2c['push'](_0x186b76+':\x20'+_0x20d9e6);else typeof _0x20d9e6===_0x24d6e6(0x144)?_0x23fa2c['push'](_0x186b76+':\x20'+_0x20d9e6):_0x23fa2c['push'](_0x186b76+':\x20'+formatYamlValue(String(_0x20d9e6)));}}const _0x3f3340=_0x23fa2c[_0x24d6e6(0x14a)]('\x0a');return _0x24d6e6(0x147)+_0x3f3340+_0x24d6e6(0x14b)+_0x41e341+'\x0a';}function formatYamlValue(_0x49a81e){const _0x57021b=a254_0x2e2d;if(_0x49a81e[_0x57021b(0x154)](':')||_0x49a81e['includes']('#')||_0x49a81e['includes']('\x27')||_0x49a81e['includes']('\x22')||_0x49a81e[_0x57021b(0x154)]('\x0a')||_0x49a81e[_0x57021b(0x152)]('\x20')||_0x49a81e[_0x57021b(0x159)]('\x20'))return'\x22'+_0x49a81e[_0x57021b(0x158)](/\\/g,'\x5c\x5c')[_0x57021b(0x158)](/"/g,'\x5c\x22')+'\x22';return _0x49a81e;}function parseSimpleYaml(_0x50b9a0){const _0x1adecd=a254_0x2e2d,_0x32fb47={},_0x4f67ce=_0x50b9a0[_0x1adecd(0x15f)]('\x0a');for(const _0xf03895 of _0x4f67ce){const _0x4c2962=_0xf03895[_0x1adecd(0x149)]();if(!_0x4c2962||_0x4c2962['startsWith']('#'))continue;const _0x5be4bc=_0x4c2962[_0x1adecd(0x153)](':');if(_0x5be4bc===-0x1)continue;const _0xb6ff5b=_0x4c2962[_0x1adecd(0x15e)](0x0,_0x5be4bc)[_0x1adecd(0x149)]();let _0x377de3=_0x4c2962[_0x1adecd(0x15e)](_0x5be4bc+0x1)['trim']();const _0xfaa59b=_0x377de3[_0x1adecd(0x153)]('\x20#');_0xfaa59b!==-0x1&&!_0x377de3[_0x1adecd(0x152)]('\x22')&&!_0x377de3[_0x1adecd(0x152)]('\x27')&&(_0x377de3=_0x377de3[_0x1adecd(0x15e)](0x0,_0xfaa59b)['trim']()),_0x32fb47[_0xb6ff5b]=parseYamlValue(_0x377de3);}return _0x32fb47;}function parseYamlValue(_0x5912ea){const _0x5c5c99=a254_0x2e2d;if(!_0x5912ea||_0x5912ea==='~'||_0x5912ea===_0x5c5c99(0x140))return null;if(_0x5912ea===_0x5c5c99(0x141))return!![];if(_0x5912ea===_0x5c5c99(0x156))return![];if(_0x5912ea[_0x5c5c99(0x152)]('[')&&_0x5912ea[_0x5c5c99(0x159)](']')){const _0x5daa76=_0x5912ea['slice'](0x1,-0x1)[_0x5c5c99(0x149)]();if(!_0x5daa76)return[];return _0x5daa76[_0x5c5c99(0x15f)](',')[_0x5c5c99(0x145)](_0x5a36c2=>{const _0xaa17d7=_0x5c5c99,_0x1c721c=_0x5a36c2[_0xaa17d7(0x149)]();return parseYamlScalar(_0x1c721c);});}if(_0x5912ea['startsWith']('\x22')&&_0x5912ea[_0x5c5c99(0x159)]('\x22'))return _0x5912ea[_0x5c5c99(0x15e)](0x1,-0x1)[_0x5c5c99(0x158)](/\\"/g,'\x22')[_0x5c5c99(0x158)](/\\\\/g,'\x5c');if(_0x5912ea[_0x5c5c99(0x152)]('\x27')&&_0x5912ea[_0x5c5c99(0x159)]('\x27'))return _0x5912ea[_0x5c5c99(0x15e)](0x1,-0x1);if(/^-?\d+(\.\d+)?$/[_0x5c5c99(0x14e)](_0x5912ea))return Number(_0x5912ea);return _0x5912ea;}function parseYamlScalar(_0x3abc5d){const _0x1db2ae=a254_0x2e2d;if(_0x3abc5d[_0x1db2ae(0x152)]('\x22')&&_0x3abc5d[_0x1db2ae(0x159)]('\x22'))return _0x3abc5d[_0x1db2ae(0x15e)](0x1,-0x1)[_0x1db2ae(0x158)](/\\"/g,'\x22')[_0x1db2ae(0x158)](/\\\\/g,'\x5c');if(_0x3abc5d[_0x1db2ae(0x152)]('\x27')&&_0x3abc5d[_0x1db2ae(0x159)]('\x27'))return _0x3abc5d[_0x1db2ae(0x15e)](0x1,-0x1);if(_0x3abc5d===_0x1db2ae(0x141))return!![];if(_0x3abc5d===_0x1db2ae(0x156))return![];if(/^-?\d+(\.\d+)?$/[_0x1db2ae(0x14e)](_0x3abc5d))return Number(_0x3abc5d);return _0x3abc5d;}function a254_0x2e2d(_0xc6f4ab,_0x12b13c){_0xc6f4ab=_0xc6f4ab-0x140;const _0x1e3eed=a254_0x1e3e();let _0x2e2d4b=_0x1e3eed[_0xc6f4ab];return _0x2e2d4b;}function a254_0x1e3e(){const _0x16e7a5=['734871gTNQOl','match','number','map','3327648yUlOta','---\x0a','168twCMlY','trim','join','\x0a---\x0a\x0a',':\x20[','7903899OfKGeT','test','11bDHjct','6NiNEJF','isArray','startsWith','indexOf','includes','85427RDnLna','false','83814vzcTtm','replace','endsWith','175EwmVRm','boolean','push','6607480dIxTJB','slice','split','223349ZjxufP','null','true'];a254_0x1e3e=function(){return _0x16e7a5;};return a254_0x1e3e();}
|