@treasuredata/tdx 2026.7.6 → 2026.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.d.ts.map +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/api-command.js.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-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.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.d.ts +8 -0
- package/dist/commands/command.d.ts.map +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/command.js.map +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.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.d.ts +16 -0
- package/dist/commands/engage-always-on-campaign-pull-command.d.ts.map +1 -0
- package/dist/commands/engage-always-on-campaign-pull-command.js +1 -0
- package/dist/commands/engage-always-on-campaign-pull-command.js.map +1 -0
- package/dist/commands/engage-always-on-campaign-push-command.d.ts +16 -0
- package/dist/commands/engage-always-on-campaign-push-command.d.ts.map +1 -0
- package/dist/commands/engage-always-on-campaign-push-command.js +1 -0
- package/dist/commands/engage-always-on-campaign-push-command.js.map +1 -0
- package/dist/commands/engage-always-on-campaign-validate-command.d.ts +16 -0
- package/dist/commands/engage-always-on-campaign-validate-command.d.ts.map +1 -0
- package/dist/commands/engage-always-on-campaign-validate-command.js +1 -0
- package/dist/commands/engage-always-on-campaign-validate-command.js.map +1 -0
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.d.ts +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profile-command.js.map +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-move-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.d.ts.map +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-push-command.js.map +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.d.ts.map +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/status-command.js.map +1 -1
- package/dist/commands/table-deleted.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.d.ts.map +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/use-command.js.map +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.d.ts +35 -1
- package/dist/core/global-context.d.ts.map +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/global-context.js.map +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/site-mismatch.d.ts +68 -0
- package/dist/core/site-mismatch.d.ts.map +1 -0
- package/dist/core/site-mismatch.js +1 -0
- package/dist/core/site-mismatch.js.map +1 -0
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/tools/work-create-item.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-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-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/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.d.ts +1 -1
- package/dist/sdk/client/engage-api-client.d.ts.map +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/engage-api-client.js.map +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.d.ts +7 -4
- package/dist/sdk/connection-validator.d.ts.map +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection-validator.js.map +1 -1
- package/dist/sdk/connection.d.ts +15 -0
- package/dist/sdk/connection.d.ts.map +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/connection.js.map +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/always-on-campaign-pull.d.ts +66 -0
- package/dist/sdk/engage/always-on-campaign-pull.d.ts.map +1 -0
- package/dist/sdk/engage/always-on-campaign-pull.js +1 -0
- package/dist/sdk/engage/always-on-campaign-pull.js.map +1 -0
- package/dist/sdk/engage/always-on-campaign-push.d.ts +93 -0
- package/dist/sdk/engage/always-on-campaign-push.d.ts.map +1 -0
- package/dist/sdk/engage/always-on-campaign-push.js +1 -0
- package/dist/sdk/engage/always-on-campaign-push.js.map +1 -0
- package/dist/sdk/engage/always-on-campaign-validator.d.ts +18 -0
- package/dist/sdk/engage/always-on-campaign-validator.d.ts.map +1 -0
- package/dist/sdk/engage/always-on-campaign-validator.js +1 -0
- package/dist/sdk/engage/always-on-campaign-validator.js.map +1 -0
- package/dist/sdk/engage/always-on-campaign-yaml.d.ts +62 -0
- package/dist/sdk/engage/always-on-campaign-yaml.d.ts.map +1 -0
- package/dist/sdk/engage/always-on-campaign-yaml.js +1 -0
- package/dist/sdk/engage/always-on-campaign-yaml.js.map +1 -0
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js.map +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.d.ts +125 -0
- package/dist/sdk/engage/types/always-on-campaign-schema.d.ts.map +1 -0
- package/dist/sdk/engage/types/always-on-campaign-schema.js +1 -0
- package/dist/sdk/engage/types/always-on-campaign-schema.js.map +1 -0
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.d.ts +8 -8
- package/dist/sdk/engage/types/campaign-schema.d.ts.map +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js.map +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.d.ts +20 -0
- package/dist/sdk/engage.d.ts.map +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/engage.js.map +1 -1
- package/dist/sdk/errors.d.ts +13 -2
- package/dist/sdk/errors.d.ts.map +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/errors.js.map +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.d.ts.map +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/llm/model-factors.js.map +1 -1
- package/dist/sdk/llm/user-settings.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/deleted-table-validation.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.d.ts +12 -2
- package/dist/sdk/segment/child-segment-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js.map +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.d.ts +6 -1
- package/dist/sdk/segment/validate-files.d.ts.map +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/validate-files.js.map +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/engage.d.ts +31 -5
- package/dist/sdk/types/engage.d.ts.map +1 -1
- package/dist/sdk/types/index.d.ts +1 -1
- package/dist/sdk/types/index.d.ts.map +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/util/tree-search.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.d.ts +6 -0
- package/dist/test-utils/factories.d.ts.map +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/factories.js.map +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.d.ts +1 -1
- package/dist/test-utils/index.d.ts.map +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/test-utils/index.js.map +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/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x194f49,_0xf3a48){const _0x465574=a193_0x13b9,_0x28d1ef=_0x194f49();while(!![]){try{const _0xe7b3a6=parseInt(_0x465574(0x146))/0x1*(parseInt(_0x465574(0x14a))/0x2)+parseInt(_0x465574(0x151))/0x3+parseInt(_0x465574(0x129))/0x4+-parseInt(_0x465574(0x12e))/0x5+-parseInt(_0x465574(0x13b))/0x6+parseInt(_0x465574(0x14e))/0x7+-parseInt(_0x465574(0x13f))/0x8;if(_0xe7b3a6===_0xf3a48)break;else _0x28d1ef['push'](_0x28d1ef['shift']());}catch(_0x54116d){_0x28d1ef['push'](_0x28d1ef['shift']());}}}(a193_0x3f1d,0xd0f6e));import{centerAlign,stringWidth,padEnd,padStart}from'../../utils/string-utils.js';import{colorBorder,colorType,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../../utils/colors.js';const DEFAULT_MAX_DISPLAY_ROWS=0x28;function getTerminalWidth(){const _0x3efd0b=a193_0x13b9;return process[_0x3efd0b(0x132)][_0x3efd0b(0x121)]||Infinity;}export function formatAsTable(_0xc03194,_0x47f8e4=DEFAULT_MAX_DISPLAY_ROWS,_0x511a33=![],_0xb3189e={}){const _0xc09f11=a193_0x13b9;if(_0xc03194[_0xc09f11(0x13c)][_0xc09f11(0x149)]===0x0)return'No\x20rows\x20returned';const _0x254bbf=_0xc03194[_0xc09f11(0x121)][_0xc09f11(0x11f)](_0x329d20=>_0x329d20[_0xc09f11(0x125)]),_0x582b9e=_0xc03194[_0xc09f11(0x121)][_0xc09f11(0x11f)](_0x2c4c46=>simplifyType(_0x2c4c46[_0xc09f11(0x12c)])),_0x2f2bf3=_0xc03194[_0xc09f11(0x13c)][_0xc09f11(0x127)](0x0,_0x47f8e4),_0x3ea53d=_0xc03194['data'][_0xc09f11(0x149)],_0x275096=_0x3ea53d>_0x47f8e4,_0x23b768=[],_0x2d6c18=getTerminalWidth(),_0x87917b=_0x2d6c18!==Infinity,_0x5562ee=0x32;let _0x4699ae=_0x254bbf[_0xc09f11(0x11f)]((_0x59f43b,_0x409f2c)=>{const _0xbd42eb=_0xc09f11,_0x4a76e3=stringWidth(_0x582b9e[_0x409f2c]),_0x1915f9=Math[_0xbd42eb(0x12b)](..._0x2f2bf3['map'](_0x5524d3=>{const _0xf7cf1=_0x5524d3[_0x59f43b];return stringWidth(formatValue(_0xf7cf1));})),_0x491717=Math[_0xbd42eb(0x12b)](stringWidth(_0x59f43b),_0x4a76e3,_0x1915f9);return _0x511a33?_0x491717:Math[_0xbd42eb(0x150)](_0x491717,_0x5562ee);});if(_0x87917b&&!_0x511a33&&_0x254bbf['length']>0x0){const _0x429dcc=_0x2439ac=>{let _0x19c397=0x1;for(const _0x554184 of _0x2439ac){_0x19c397+=_0x554184+0x3;}return _0x19c397+0x1;};let _0x8e3ade=_0x429dcc(_0x4699ae);if(_0x8e3ade>_0x2d6c18){const _0x32fd8e=0x3;for(let _0x1d7683=_0x4699ae[_0xc09f11(0x149)]-0x1;_0x1d7683>=0x0;_0x1d7683--){_0x8e3ade=_0x429dcc(_0x4699ae);if(_0x8e3ade<=_0x2d6c18)break;const _0x523c33=_0x4699ae[_0x1d7683],_0x46fac0=_0x8e3ade-_0x2d6c18,_0x22487b=_0x523c33-_0x32fd8e,_0x14b0dc=Math['min'](_0x46fac0,_0x22487b);_0x14b0dc>0x0&&(_0x4699ae[_0x1d7683]=_0x523c33-_0x14b0dc);}}}const _0xcbd2b7=_0x254bbf,_0x5da75f=_0x582b9e,_0x3fb60b=_0x4699ae,_0xbbc675=_0x4699ae;_0x23b768[_0xc09f11(0x130)](colorBorder('┌'+_0xbbc675[_0xc09f11(0x11f)](_0x4825a2=>'─'[_0xc09f11(0x13d)](_0x4825a2+0x2))['join']('┬')+'┐',_0xb3189e));const _0x36673a=_0xcbd2b7[_0xc09f11(0x11f)]((_0x696125,_0x66100)=>centerAlign(_0x696125,_0x3fb60b[_0x66100]));_0x23b768[_0xc09f11(0x130)](colorBorder('│',_0xb3189e)+'\x20'+_0x36673a['join']('\x20'+colorBorder('│',_0xb3189e)+'\x20')+'\x20'+colorBorder('│',_0xb3189e));const _0x142d0a=_0x5da75f[_0xc09f11(0x11f)]((_0x2d4a3d,_0x41bdb1)=>colorType(centerAlign(_0x2d4a3d,_0x3fb60b[_0x41bdb1]),_0xb3189e));_0x23b768[_0xc09f11(0x130)](colorBorder('│',_0xb3189e)+'\x20'+_0x142d0a[_0xc09f11(0x134)]('\x20'+colorBorder('│',_0xb3189e)+'\x20')+'\x20'+colorBorder('│',_0xb3189e)),_0x23b768[_0xc09f11(0x130)](colorBorder('├'+_0xbbc675[_0xc09f11(0x11f)](_0x5374cb=>'─'[_0xc09f11(0x13d)](_0x5374cb+0x2))[_0xc09f11(0x134)]('┼')+'┤',_0xb3189e));const _0x4d47ec=(_0x14e89a,_0x2b087d)=>{const _0x22dcb9=_0xc09f11,_0x3e738b=stringWidth(_0x14e89a);if(_0x3e738b<=_0x2b087d)return _0x14e89a;let _0x1cd8e1=_0x14e89a;while(stringWidth(_0x1cd8e1+'…')>_0x2b087d&&_0x1cd8e1[_0x22dcb9(0x149)]>0x0){_0x1cd8e1=_0x1cd8e1[_0x22dcb9(0x127)](0x0,-0x1);}return _0x1cd8e1+'…';};_0x2f2bf3['forEach'](_0x4191c3=>{const _0x29caf2=_0xc09f11,_0x18387c=_0x254bbf[_0x29caf2(0x11f)]((_0x151b0e,_0x51c4e0)=>{const _0x539b80=_0x29caf2,_0xee128a=_0x4191c3[_0x151b0e],_0xc9f4b9=formatValue(_0xee128a),_0x5b4ddc=_0x3fb60b[_0x51c4e0],_0x40f030=_0x4d47ec(_0xc9f4b9,_0x5b4ddc),_0x3a18e3=typeof _0xee128a===_0x539b80(0x142)||typeof _0xee128a===_0x539b80(0x123)&&/^-?\d+$/[_0x539b80(0x14b)](_0xee128a);return _0x3a18e3?padStart(_0x40f030,_0x5b4ddc):padEnd(_0x40f030,_0x5b4ddc);});_0x23b768[_0x29caf2(0x130)](colorBorder('│',_0xb3189e)+'\x20'+_0x18387c['join']('\x20'+colorBorder('│',_0xb3189e)+'\x20')+'\x20'+colorBorder('│',_0xb3189e));});const _0x9a49c=_0xbbc675[_0xc09f11(0x128)]((_0x13610a,_0x1bb266)=>_0x13610a+_0x1bb266+0x3,-0x1);_0x23b768[_0xc09f11(0x130)](colorBorder('├'+_0xbbc675[_0xc09f11(0x11f)](_0xaf40bd=>'─'[_0xc09f11(0x13d)](_0xaf40bd+0x2))[_0xc09f11(0x134)]('┴')+'┤',_0xb3189e));let _0x47bd6c;_0x275096?_0x47bd6c=_0x3ea53d+_0xc09f11(0x12d)+_0x47f8e4+_0xc09f11(0x14c):_0x47bd6c=_0x3ea53d+_0xc09f11(0x13a)+(_0x3ea53d===0x1?'':'s');const _0x4b975c=_0x47bd6c[_0xc09f11(0x11d)](_0x9a49c-0x2);return _0x23b768[_0xc09f11(0x130)](colorBorder('│',_0xb3189e)+'\x20'+_0x4b975c+'\x20'+colorBorder('│',_0xb3189e)),_0x23b768[_0xc09f11(0x130)](colorBorder('└'+'─'[_0xc09f11(0x13d)](_0x9a49c)+'┘',_0xb3189e)),_0x23b768['join']('\x0a');}function simplifyType(_0x3d654f){const _0x322288=a193_0x13b9,_0x354d66={'varchar':_0x322288(0x123),'bigint':_0x322288(0x147),'integer':_0x322288(0x120),'double':_0x322288(0x14d),'boolean':_0x322288(0x126),'date':_0x322288(0x131),'timestamp':_0x322288(0x11e),'array':'array','map':_0x322288(0x11f),'row':'row'},_0x55044c=_0x3d654f[_0x322288(0x145)]();for(const [_0x30d02c,_0x177cc1]of Object[_0x322288(0x14f)](_0x354d66)){if(_0x55044c[_0x322288(0x143)](_0x30d02c))return _0x177cc1;}return _0x3d654f[_0x322288(0x149)]>0xa?_0x3d654f['substring'](0x0,0xa):_0x3d654f;}export function formatAsJSON(_0x48b4a9,_0x4a98a0={}){const _0x2311e3=a193_0x13b9;if(_0x48b4a9['data']['length']===0x0)return'[]';if(shouldUseColor(_0x4a98a0))return colorizeJSON(_0x48b4a9[_0x2311e3(0x13c)],_0x4a98a0);const _0x33e3a1=_0x48b4a9[_0x2311e3(0x13c)]['map'](_0x5bfff1=>'\x20\x20'+JSON[_0x2311e3(0x124)](_0x5bfff1));return'[\x0a'+_0x33e3a1[_0x2311e3(0x134)](',\x0a')+'\x0a]';}export function formatAsJSONL(_0x4e31b9,_0x23326c={}){const _0x26ad21=a193_0x13b9;if(_0x4e31b9['data'][_0x26ad21(0x149)]===0x0)return'';if(shouldUseColor(_0x23326c))return _0x4e31b9[_0x26ad21(0x13c)][_0x26ad21(0x11f)](_0x87e59e=>colorizeJSONCompact(_0x87e59e,_0x23326c))['join']('\x0a');return _0x4e31b9[_0x26ad21(0x13c)][_0x26ad21(0x11f)](_0x487c4b=>JSON[_0x26ad21(0x124)](_0x487c4b))['join']('\x0a');}export function formatAsTSV(_0x4eda4d){const _0x2219ca=a193_0x13b9;if(_0x4eda4d[_0x2219ca(0x13c)][_0x2219ca(0x149)]===0x0)return'';const _0x24875f=[],_0x4fbc37=_0x4eda4d[_0x2219ca(0x121)][_0x2219ca(0x11f)](_0x2f7ab0=>_0x2f7ab0[_0x2219ca(0x125)]);return _0x24875f['push'](_0x4fbc37['join']('\x09')),_0x4eda4d['data']['forEach'](_0x14ca84=>{const _0x514474=_0x2219ca,_0x10157a=_0x4fbc37[_0x514474(0x11f)](_0x253168=>{const _0xe2b463=_0x14ca84[_0x253168];return formatValueForTSV(_0xe2b463);});_0x24875f[_0x514474(0x130)](_0x10157a['join']('\x09'));}),_0x24875f[_0x2219ca(0x134)]('\x0a');}function formatValue(_0x3b0e71){const _0x17baa9=a193_0x13b9;if(_0x3b0e71===null||_0x3b0e71===undefined)return'';if(typeof _0x3b0e71===_0x17baa9(0x123)){const _0x3acda0=_0x3b0e71['replace'](/\n/g,'\x5cn')[_0x17baa9(0x136)](/\r/g,'\x5cr')[_0x17baa9(0x136)](/\t/g,'\x5ct');return _0x3acda0;}if(typeof _0x3b0e71===_0x17baa9(0x142))return String(_0x3b0e71);if(typeof _0x3b0e71===_0x17baa9(0x12a))return _0x3b0e71?'true':_0x17baa9(0x148);if(_0x3b0e71 instanceof Date)return _0x3b0e71[_0x17baa9(0x12f)]();if(typeof _0x3b0e71===_0x17baa9(0x133))return JSON['stringify'](_0x3b0e71);return String(_0x3b0e71);}function a193_0x13b9(_0x2a41f8,_0x481b38){_0x2a41f8=_0x2a41f8-0x11d;const _0x3f1d4d=a193_0x3f1d();let _0x13b91d=_0x3f1d4d[_0x2a41f8];return _0x13b91d;}function a193_0x3f1d(){const _0xfc3037=['\x1b]8;;\x07','toLowerCase','127549HDfnZO','long','false','length','4tOuToQ','test','\x20shown)','double','4784689Ueiuqh','entries','min','3074955AeOjil','padEnd','timestamp','map','int','columns','0\x20B','string','stringify','name','bool','slice','reduce','583132oxWWBA','boolean','max','type','\x20rows\x20(','1988870dDFfpu','toISOString','push','date','stdout','object','join','json','replace','toFixed','pow','floor','\x20row','4430712sbzoQh','data','repeat','log','937992LONueL','toString','jsonl','number','startsWith'];a193_0x3f1d=function(){return _0xfc3037;};return a193_0x3f1d();}function formatValueForTSV(_0x439e8b){const _0x19ac68=a193_0x13b9;if(_0x439e8b===null||_0x439e8b===undefined)return'';if(typeof _0x439e8b==='string')return _0x439e8b['replace'](/\t/g,'\x5ct')[_0x19ac68(0x136)](/\n/g,'\x5cn');if(typeof _0x439e8b===_0x19ac68(0x142)||typeof _0x439e8b===_0x19ac68(0x12a))return String(_0x439e8b);if(_0x439e8b instanceof Date)return _0x439e8b[_0x19ac68(0x12f)]();if(typeof _0x439e8b===_0x19ac68(0x133))return JSON['stringify'](_0x439e8b);return String(_0x439e8b);}export function formatQueryResult(_0x3211fc,_0xa333e7){const _0x315f0e=a193_0x13b9;switch(_0xa333e7){case'table':return formatAsTable(_0x3211fc);case _0x315f0e(0x135):return formatAsJSON(_0x3211fc);case _0x315f0e(0x141):return formatAsJSONL(_0x3211fc);case'tsv':return formatAsTSV(_0x3211fc);default:return formatAsJSON(_0x3211fc);}}export function formatBytes(_0x357b22){const _0x55bf15=a193_0x13b9;if(_0x357b22===0x0)return _0x55bf15(0x122);const _0x4fbc7f=['B','KB','MB','GB','TB'],_0x5b8c3d=0x400,_0x593923=Math[_0x55bf15(0x139)](Math[_0x55bf15(0x13e)](_0x357b22)/Math[_0x55bf15(0x13e)](_0x5b8c3d)),_0x2ff74d=_0x357b22/Math[_0x55bf15(0x138)](_0x5b8c3d,_0x593923),_0x3f39b9=_0x2ff74d>=0xa?0x1:0x2;return _0x2ff74d['toFixed'](_0x3f39b9)+'\x20'+_0x4fbc7f[_0x593923];}export function formatRows(_0x3e4b3){const _0x3937f2=a193_0x13b9;if(_0x3e4b3==null)return'-';if(_0x3e4b3===0x0)return'0';if(_0x3e4b3<0x3e8)return _0x3e4b3[_0x3937f2(0x140)]();const _0x4621c4=['','K','M','B','T'],_0x1a3feb=0x3e8,_0x540e7b=Math[_0x3937f2(0x139)](Math['log'](_0x3e4b3)/Math[_0x3937f2(0x13e)](_0x1a3feb)),_0x371ac6=_0x3e4b3/Math['pow'](_0x1a3feb,_0x540e7b),_0xa172db=_0x371ac6>=0xa?0x1:0x2;return''+_0x371ac6[_0x3937f2(0x137)](_0xa172db)+_0x4621c4[_0x540e7b];}export function hyperlink(_0x212928,_0x1fb8d9){const _0x8fe92b=a193_0x13b9;if(!process['stdout']['isTTY'])return _0x212928;return'\x1b]8;;'+_0x1fb8d9+'\x07'+_0x212928+_0x8fe92b(0x144);}
|
|
1
|
+
(function(_0x408529,_0x31e214){const _0x36a74c=a202_0x3c24,_0x32c6f2=_0x408529();while(!![]){try{const _0x286c31=-parseInt(_0x36a74c(0xdf))/0x1*(parseInt(_0x36a74c(0xcf))/0x2)+-parseInt(_0x36a74c(0xde))/0x3+parseInt(_0x36a74c(0xeb))/0x4*(-parseInt(_0x36a74c(0xe5))/0x5)+parseInt(_0x36a74c(0xc0))/0x6*(parseInt(_0x36a74c(0xcb))/0x7)+parseInt(_0x36a74c(0xee))/0x8+parseInt(_0x36a74c(0xe7))/0x9+-parseInt(_0x36a74c(0xef))/0xa*(-parseInt(_0x36a74c(0xd4))/0xb);if(_0x286c31===_0x31e214)break;else _0x32c6f2['push'](_0x32c6f2['shift']());}catch(_0x2b802a){_0x32c6f2['push'](_0x32c6f2['shift']());}}}(a202_0x3f68,0x3c8b2));import{centerAlign,stringWidth,padEnd,padStart}from'../../utils/string-utils.js';function a202_0x3c24(_0x1d6ef6,_0x46d7b6){_0x1d6ef6=_0x1d6ef6-0xb8;const _0x3f681c=a202_0x3f68();let _0x3c24a2=_0x3f681c[_0x1d6ef6];return _0x3c24a2;}import{colorBorder,colorType,colorizeJSON,colorizeJSONCompact,shouldUseColor}from'../../utils/colors.js';const DEFAULT_MAX_DISPLAY_ROWS=0x28;function getTerminalWidth(){const _0x3725fd=a202_0x3c24;return process[_0x3725fd(0xdb)]['columns']||Infinity;}export function formatAsTable(_0x3bf1b9,_0x54868a=DEFAULT_MAX_DISPLAY_ROWS,_0xba339e=![],_0x54f0b4={}){const _0x4ae4f3=a202_0x3c24;if(_0x3bf1b9[_0x4ae4f3(0xe8)][_0x4ae4f3(0xca)]===0x0)return _0x4ae4f3(0xc5);const _0xa76b2a=_0x3bf1b9[_0x4ae4f3(0xe9)][_0x4ae4f3(0xc8)](_0x258d38=>_0x258d38[_0x4ae4f3(0xd2)]),_0x522d11=_0x3bf1b9[_0x4ae4f3(0xe9)][_0x4ae4f3(0xc8)](_0x337a58=>simplifyType(_0x337a58['type'])),_0xedae56=_0x3bf1b9[_0x4ae4f3(0xe8)]['slice'](0x0,_0x54868a),_0x3eb31f=_0x3bf1b9[_0x4ae4f3(0xe8)][_0x4ae4f3(0xca)],_0x3bdca4=_0x3eb31f>_0x54868a,_0x19d4af=[],_0x20809a=getTerminalWidth(),_0x49a4bd=_0x20809a!==Infinity,_0x26c7b9=0x32;let _0x529546=_0xa76b2a[_0x4ae4f3(0xc8)]((_0x49bea3,_0x21cfeb)=>{const _0x517d47=_0x4ae4f3,_0x37b02e=stringWidth(_0x522d11[_0x21cfeb]),_0x179bef=Math[_0x517d47(0xda)](..._0xedae56[_0x517d47(0xc8)](_0x18198a=>{const _0xe8de43=_0x18198a[_0x49bea3];return stringWidth(formatValue(_0xe8de43));})),_0x4c2e47=Math[_0x517d47(0xda)](stringWidth(_0x49bea3),_0x37b02e,_0x179bef);return _0xba339e?_0x4c2e47:Math['min'](_0x4c2e47,_0x26c7b9);});if(_0x49a4bd&&!_0xba339e&&_0xa76b2a['length']>0x0){const _0x354f13=_0x39a38d=>{let _0x2d41d2=0x1;for(const _0x4de250 of _0x39a38d){_0x2d41d2+=_0x4de250+0x3;}return _0x2d41d2+0x1;};let _0x3d9a2d=_0x354f13(_0x529546);if(_0x3d9a2d>_0x20809a){const _0x3138de=0x3;for(let _0x16e7d1=_0x529546[_0x4ae4f3(0xca)]-0x1;_0x16e7d1>=0x0;_0x16e7d1--){_0x3d9a2d=_0x354f13(_0x529546);if(_0x3d9a2d<=_0x20809a)break;const _0x18b2f9=_0x529546[_0x16e7d1],_0x593ec1=_0x3d9a2d-_0x20809a,_0x3464bc=_0x18b2f9-_0x3138de,_0x3047b7=Math[_0x4ae4f3(0xd7)](_0x593ec1,_0x3464bc);_0x3047b7>0x0&&(_0x529546[_0x16e7d1]=_0x18b2f9-_0x3047b7);}}}const _0x4b6b44=_0xa76b2a,_0x4ab313=_0x522d11,_0x5819bd=_0x529546,_0xf68492=_0x529546;_0x19d4af[_0x4ae4f3(0xd9)](colorBorder('┌'+_0xf68492[_0x4ae4f3(0xc8)](_0x510781=>'─'[_0x4ae4f3(0xea)](_0x510781+0x2))['join']('┬')+'┐',_0x54f0b4));const _0x1b1111=_0x4b6b44[_0x4ae4f3(0xc8)]((_0x432f5a,_0x46bf33)=>centerAlign(_0x432f5a,_0x5819bd[_0x46bf33]));_0x19d4af[_0x4ae4f3(0xd9)](colorBorder('│',_0x54f0b4)+'\x20'+_0x1b1111[_0x4ae4f3(0xc6)]('\x20'+colorBorder('│',_0x54f0b4)+'\x20')+'\x20'+colorBorder('│',_0x54f0b4));const _0x337ae8=_0x4ab313['map']((_0x5c50b0,_0x8e32a1)=>colorType(centerAlign(_0x5c50b0,_0x5819bd[_0x8e32a1]),_0x54f0b4));_0x19d4af['push'](colorBorder('│',_0x54f0b4)+'\x20'+_0x337ae8[_0x4ae4f3(0xc6)]('\x20'+colorBorder('│',_0x54f0b4)+'\x20')+'\x20'+colorBorder('│',_0x54f0b4)),_0x19d4af[_0x4ae4f3(0xd9)](colorBorder('├'+_0xf68492['map'](_0x2f3330=>'─'[_0x4ae4f3(0xea)](_0x2f3330+0x2))['join']('┼')+'┤',_0x54f0b4));const _0x15dce3=(_0x54f945,_0x159c36)=>{const _0xee15cf=_0x4ae4f3,_0x37d86b=stringWidth(_0x54f945);if(_0x37d86b<=_0x159c36)return _0x54f945;let _0xcd17ff=_0x54f945;while(stringWidth(_0xcd17ff+'…')>_0x159c36&&_0xcd17ff[_0xee15cf(0xca)]>0x0){_0xcd17ff=_0xcd17ff['slice'](0x0,-0x1);}return _0xcd17ff+'…';};_0xedae56[_0x4ae4f3(0xe2)](_0x50148b=>{const _0xcbc1e=_0x4ae4f3,_0xd735cc=_0xa76b2a[_0xcbc1e(0xc8)]((_0x29dd91,_0x34853b)=>{const _0x1db06d=_0xcbc1e,_0xebfdfa=_0x50148b[_0x29dd91],_0x32a0af=formatValue(_0xebfdfa),_0x4fc9d5=_0x5819bd[_0x34853b],_0x46fd91=_0x15dce3(_0x32a0af,_0x4fc9d5),_0x282695=typeof _0xebfdfa===_0x1db06d(0xb8)||typeof _0xebfdfa==='string'&&/^-?\d+$/[_0x1db06d(0xed)](_0xebfdfa);return _0x282695?padStart(_0x46fd91,_0x4fc9d5):padEnd(_0x46fd91,_0x4fc9d5);});_0x19d4af['push'](colorBorder('│',_0x54f0b4)+'\x20'+_0xd735cc[_0xcbc1e(0xc6)]('\x20'+colorBorder('│',_0x54f0b4)+'\x20')+'\x20'+colorBorder('│',_0x54f0b4));});const _0x3a9a06=_0xf68492[_0x4ae4f3(0xdd)]((_0x376b58,_0x4cc8bf)=>_0x376b58+_0x4cc8bf+0x3,-0x1);_0x19d4af['push'](colorBorder('├'+_0xf68492['map'](_0x2d38d6=>'─'[_0x4ae4f3(0xea)](_0x2d38d6+0x2))[_0x4ae4f3(0xc6)]('┴')+'┤',_0x54f0b4));let _0x46d9f2;_0x3bdca4?_0x46d9f2=_0x3eb31f+_0x4ae4f3(0xc4)+_0x54868a+_0x4ae4f3(0xc1):_0x46d9f2=_0x3eb31f+_0x4ae4f3(0xd1)+(_0x3eb31f===0x1?'':'s');const _0x1c6c95=_0x46d9f2[_0x4ae4f3(0xe0)](_0x3a9a06-0x2);return _0x19d4af['push'](colorBorder('│',_0x54f0b4)+'\x20'+_0x1c6c95+'\x20'+colorBorder('│',_0x54f0b4)),_0x19d4af[_0x4ae4f3(0xd9)](colorBorder('└'+'─'[_0x4ae4f3(0xea)](_0x3a9a06)+'┘',_0x54f0b4)),_0x19d4af[_0x4ae4f3(0xc6)]('\x0a');}function simplifyType(_0x1eb3b6){const _0x38809a=a202_0x3c24,_0x4a533c={'varchar':_0x38809a(0xbe),'bigint':_0x38809a(0xc9),'integer':'int','double':_0x38809a(0xc3),'boolean':'bool','date':_0x38809a(0xe6),'timestamp':_0x38809a(0xe3),'array':_0x38809a(0xe1),'map':'map','row':_0x38809a(0xce)},_0x15d8ed=_0x1eb3b6[_0x38809a(0xcc)]();for(const [_0x3347e6,_0x5048da]of Object[_0x38809a(0xdc)](_0x4a533c)){if(_0x15d8ed[_0x38809a(0xbf)](_0x3347e6))return _0x5048da;}return _0x1eb3b6[_0x38809a(0xca)]>0xa?_0x1eb3b6['substring'](0x0,0xa):_0x1eb3b6;}export function formatAsJSON(_0x217db,_0x3e76f2={}){const _0x50f7c4=a202_0x3c24;if(_0x217db[_0x50f7c4(0xe8)]['length']===0x0)return'[]';if(shouldUseColor(_0x3e76f2))return colorizeJSON(_0x217db['data'],_0x3e76f2);const _0x69487e=_0x217db['data']['map'](_0x2c64f1=>'\x20\x20'+JSON[_0x50f7c4(0xbd)](_0x2c64f1));return'[\x0a'+_0x69487e['join'](',\x0a')+'\x0a]';}export function formatAsJSONL(_0xbbaeb4,_0x2eb12f={}){const _0x2f6c76=a202_0x3c24;if(_0xbbaeb4[_0x2f6c76(0xe8)]['length']===0x0)return'';if(shouldUseColor(_0x2eb12f))return _0xbbaeb4[_0x2f6c76(0xe8)][_0x2f6c76(0xc8)](_0x792169=>colorizeJSONCompact(_0x792169,_0x2eb12f))[_0x2f6c76(0xc6)]('\x0a');return _0xbbaeb4[_0x2f6c76(0xe8)][_0x2f6c76(0xc8)](_0x46516e=>JSON[_0x2f6c76(0xbd)](_0x46516e))['join']('\x0a');}export function formatAsTSV(_0x2ffe7d){const _0x17d8c8=a202_0x3c24;if(_0x2ffe7d[_0x17d8c8(0xe8)][_0x17d8c8(0xca)]===0x0)return'';const _0x238629=[],_0x492e87=_0x2ffe7d[_0x17d8c8(0xe9)][_0x17d8c8(0xc8)](_0x2b3434=>_0x2b3434[_0x17d8c8(0xd2)]);return _0x238629[_0x17d8c8(0xd9)](_0x492e87[_0x17d8c8(0xc6)]('\x09')),_0x2ffe7d[_0x17d8c8(0xe8)]['forEach'](_0xd52b4d=>{const _0x511537=_0x17d8c8,_0x59a40e=_0x492e87[_0x511537(0xc8)](_0x182d5d=>{const _0x3e9591=_0xd52b4d[_0x182d5d];return formatValueForTSV(_0x3e9591);});_0x238629[_0x511537(0xd9)](_0x59a40e['join']('\x09'));}),_0x238629[_0x17d8c8(0xc6)]('\x0a');}function formatValue(_0x2d3cf6){const _0x29ea1a=a202_0x3c24;if(_0x2d3cf6===null||_0x2d3cf6===undefined)return'';if(typeof _0x2d3cf6===_0x29ea1a(0xbe)){const _0x20f558=_0x2d3cf6['replace'](/\n/g,'\x5cn')[_0x29ea1a(0xba)](/\r/g,'\x5cr')['replace'](/\t/g,'\x5ct');return _0x20f558;}if(typeof _0x2d3cf6===_0x29ea1a(0xb8))return String(_0x2d3cf6);if(typeof _0x2d3cf6===_0x29ea1a(0xd3))return _0x2d3cf6?'true':_0x29ea1a(0xd8);if(_0x2d3cf6 instanceof Date)return _0x2d3cf6[_0x29ea1a(0xf0)]();if(typeof _0x2d3cf6===_0x29ea1a(0xd6))return JSON[_0x29ea1a(0xbd)](_0x2d3cf6);return String(_0x2d3cf6);}function formatValueForTSV(_0x3ed2b7){const _0x15d745=a202_0x3c24;if(_0x3ed2b7===null||_0x3ed2b7===undefined)return'';if(typeof _0x3ed2b7===_0x15d745(0xbe))return _0x3ed2b7[_0x15d745(0xba)](/\t/g,'\x5ct')[_0x15d745(0xba)](/\n/g,'\x5cn');if(typeof _0x3ed2b7===_0x15d745(0xb8)||typeof _0x3ed2b7===_0x15d745(0xd3))return String(_0x3ed2b7);if(_0x3ed2b7 instanceof Date)return _0x3ed2b7['toISOString']();if(typeof _0x3ed2b7===_0x15d745(0xd6))return JSON[_0x15d745(0xbd)](_0x3ed2b7);return String(_0x3ed2b7);}function a202_0x3f68(){const _0x43a16c=['join','0\x20B','map','long','length','7QSdvWS','toLowerCase','floor','row','58NZmBSt','log','\x20row','name','boolean','4224737rErpxC','table','object','min','false','push','max','stdout','entries','reduce','189849UEFaUL','8491ViuMwJ','padEnd','array','forEach','timestamp','isTTY','1915BQBAwK','date','1624158sTRIVl','data','columns','repeat','1188tYuTYf','toFixed','test','125064ETkAXD','10kBygnX','toISOString','number','pow','replace','\x1b]8;;','toString','stringify','string','startsWith','546582qXQGBZ','\x20shown)','\x1b]8;;\x07','double','\x20rows\x20(','No\x20rows\x20returned'];a202_0x3f68=function(){return _0x43a16c;};return a202_0x3f68();}export function formatQueryResult(_0x563432,_0x309654){const _0x51aade=a202_0x3c24;switch(_0x309654){case _0x51aade(0xd5):return formatAsTable(_0x563432);case'json':return formatAsJSON(_0x563432);case'jsonl':return formatAsJSONL(_0x563432);case'tsv':return formatAsTSV(_0x563432);default:return formatAsJSON(_0x563432);}}export function formatBytes(_0x568da0){const _0x59c5e8=a202_0x3c24;if(_0x568da0===0x0)return _0x59c5e8(0xc7);const _0xade375=['B','KB','MB','GB','TB'],_0x39e021=0x400,_0x4b36f6=Math[_0x59c5e8(0xcd)](Math[_0x59c5e8(0xd0)](_0x568da0)/Math[_0x59c5e8(0xd0)](_0x39e021)),_0x162a79=_0x568da0/Math[_0x59c5e8(0xb9)](_0x39e021,_0x4b36f6),_0x2223d4=_0x162a79>=0xa?0x1:0x2;return _0x162a79[_0x59c5e8(0xec)](_0x2223d4)+'\x20'+_0xade375[_0x4b36f6];}export function formatRows(_0x57f265){const _0x31f714=a202_0x3c24;if(_0x57f265==null)return'-';if(_0x57f265===0x0)return'0';if(_0x57f265<0x3e8)return _0x57f265[_0x31f714(0xbc)]();const _0x23f66e=['','K','M','B','T'],_0x11e74c=0x3e8,_0x5cfe0d=Math[_0x31f714(0xcd)](Math[_0x31f714(0xd0)](_0x57f265)/Math[_0x31f714(0xd0)](_0x11e74c)),_0x119a4b=_0x57f265/Math[_0x31f714(0xb9)](_0x11e74c,_0x5cfe0d),_0x3f63cb=_0x119a4b>=0xa?0x1:0x2;return''+_0x119a4b['toFixed'](_0x3f63cb)+_0x23f66e[_0x5cfe0d];}export function hyperlink(_0x3c67e7,_0x566815){const _0x1babab=a202_0x3c24;if(!process['stdout'][_0x1babab(0xe4)])return _0x3c67e7;return _0x1babab(0xbb)+_0x566815+'\x07'+_0x3c67e7+_0x1babab(0xc2);}
|
package/dist/sdk/util/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a203_0x39b2(_0x1e7861,_0x3e24ca){_0x1e7861=_0x1e7861-0x9b;var _0x499596=a203_0x4995();var _0x39b2af=_0x499596[_0x1e7861];return _0x39b2af;}(function(_0x18e61f,_0x423308){var _0x216bcc=a203_0x39b2,_0x209ad1=_0x18e61f();while(!![]){try{var _0x2583d0=-parseInt(_0x216bcc(0xa4))/0x1*(-parseInt(_0x216bcc(0x9c))/0x2)+-parseInt(_0x216bcc(0xa2))/0x3+parseInt(_0x216bcc(0x9f))/0x4*(-parseInt(_0x216bcc(0xa6))/0x5)+parseInt(_0x216bcc(0xa5))/0x6*(parseInt(_0x216bcc(0x9b))/0x7)+parseInt(_0x216bcc(0xa3))/0x8*(parseInt(_0x216bcc(0x9e))/0x9)+parseInt(_0x216bcc(0xa0))/0xa*(parseInt(_0x216bcc(0x9d))/0xb)+parseInt(_0x216bcc(0xa1))/0xc*(parseInt(_0x216bcc(0xa7))/0xd);if(_0x2583d0===_0x423308)break;else _0x209ad1['push'](_0x209ad1['shift']());}catch(_0x483211){_0x209ad1['push'](_0x209ad1['shift']());}}}(a203_0x4995,0x1f467));export*from'./formatters.js';export*from'./format-detector.js';export*from'./tree-formatter.js';export*from'./paginate.js';function a203_0x4995(){var _0x3063ed=['7076ZdfFqk','10820nuccHh','779388gqyVDw','643260ZdikYn','66152Iubxmt','40283Ondhto','6kcXTiU','125ftTewA','13JkWEIR','421813etoXiA','2QDINiN','484cfmFgR','189DVvsDQ'];a203_0x4995=function(){return _0x3063ed;};return a203_0x4995();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x52003e,_0x490e8c){const _0x58811d=a204_0x3e92,_0x257201=_0x52003e();while(!![]){try{const _0x33a90a=-parseInt(_0x58811d(0xd6))/0x1+parseInt(_0x58811d(0xcf))/0x2+-parseInt(_0x58811d(0xcd))/0x3*(parseInt(_0x58811d(0xcc))/0x4)+parseInt(_0x58811d(0xd7))/0x5+-parseInt(_0x58811d(0xd2))/0x6*(-parseInt(_0x58811d(0xce))/0x7)+parseInt(_0x58811d(0xd9))/0x8+parseInt(_0x58811d(0xd5))/0x9*(-parseInt(_0x58811d(0xdb))/0xa);if(_0x33a90a===_0x490e8c)break;else _0x257201['push'](_0x257201['shift']());}catch(_0x1f7d23){_0x257201['push'](_0x257201['shift']());}}}(a204_0x3406,0xf25c9));function a204_0x3406(){const _0x2652f4=['3711788KgoBXk','isArray','data','8966352BBgKHk','push','length','9QkVbcF','1781219eSfSxo','3654465VaQPZg','min','8054856asFYAu','slice','13572410ucuEUs','3827452qwfWwS','3JNEOgm','7DqtGKd'];a204_0x3406=function(){return _0x2652f4;};return a204_0x3406();}function a204_0x3e92(_0x3cbf57,_0x5c964e){_0x3cbf57=_0x3cbf57-0xcc;const _0x3406fa=a204_0x3406();let _0x3e92cc=_0x3406fa[_0x3cbf57];return _0x3e92cc;}export const PAGE_SIZE=0x64;export const MAX_PAGINATION_LIMIT=0x2710;export async function paginate(_0xf2cd14,_0x24d885=MAX_PAGINATION_LIMIT,_0x2ab098=0x0){const _0x1d38a0=a204_0x3e92,_0x170a9b=Math[_0x1d38a0(0xd8)](_0x24d885,MAX_PAGINATION_LIMIT),_0x3ce1ef=[];let _0x4a2a54=_0x2ab098;while(_0x3ce1ef[_0x1d38a0(0xd4)]<_0x170a9b){const _0x4191e5=Math[_0x1d38a0(0xd8)](PAGE_SIZE,_0x170a9b-_0x3ce1ef['length']),_0x6fd139=await _0xf2cd14(_0x4191e5,_0x4a2a54),_0x147975=Array[_0x1d38a0(0xd0)](_0x6fd139[_0x1d38a0(0xd1)])?_0x6fd139['data']:[_0x6fd139[_0x1d38a0(0xd1)]];_0x3ce1ef[_0x1d38a0(0xd3)](..._0x147975);if(_0x147975[_0x1d38a0(0xd4)]<_0x4191e5)break;_0x4a2a54+=_0x4191e5;}return _0x3ce1ef[_0x1d38a0(0xd4)]>_0x170a9b?_0x3ce1ef[_0x1d38a0(0xda)](0x0,_0x170a9b):_0x3ce1ef;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xaaa04d,_0x4355f3){const _0x36651d=a205_0x3391,_0x2031d2=_0xaaa04d();while(!![]){try{const _0x3d0b66=parseInt(_0x36651d(0x1e2))/0x1+-parseInt(_0x36651d(0x20c))/0x2+-parseInt(_0x36651d(0x1fc))/0x3*(parseInt(_0x36651d(0x1db))/0x4)+-parseInt(_0x36651d(0x1ea))/0x5*(-parseInt(_0x36651d(0x203))/0x6)+parseInt(_0x36651d(0x1f6))/0x7*(parseInt(_0x36651d(0x202))/0x8)+-parseInt(_0x36651d(0x20a))/0x9*(-parseInt(_0x36651d(0x208))/0xa)+parseInt(_0x36651d(0x205))/0xb*(-parseInt(_0x36651d(0x1f2))/0xc);if(_0x3d0b66===_0x4355f3)break;else _0x2031d2['push'](_0x2031d2['shift']());}catch(_0x17df52){_0x2031d2['push'](_0x2031d2['shift']());}}}(a205_0x2147,0x6fed3));import{formatRows,hyperlink}from'./formatters.js';import a205_0x17601d from'chalk';const DEFAULT_OPTIONS={'showTreeLines':!![],'showIcons':!![],'showMetadata':!![],'indent':'\x20\x20','getSegmentUrl':undefined,'getJourneyUrl':undefined};function a205_0x3391(_0x46f7bd,_0x3e669e){_0x46f7bd=_0x46f7bd-0x1db;const _0x21470b=a205_0x2147();let _0x33915a=_0x21470b[_0x46f7bd];return _0x33915a;}export function formatTree(_0x5af02f,_0xb024ef={},_0x1ebb65=0x0,_0x62466b=''){const _0x337a0=a205_0x3391,_0x5beb25={...DEFAULT_OPTIONS,..._0xb024ef},_0x33b2f3=[],_0x4cb6a6=[..._0x5af02f][_0x337a0(0x1e6)]((_0x5988b3,_0x3bab73)=>_0x5988b3[_0x337a0(0x1e7)][_0x337a0(0x1fa)](_0x3bab73[_0x337a0(0x1e7)],undefined,{'sensitivity':'base'}));for(let _0xf314c5=0x0;_0xf314c5<_0x4cb6a6[_0x337a0(0x1e9)];_0xf314c5++){const _0x3fc1af=_0x4cb6a6[_0xf314c5],_0x53d028=_0xf314c5===_0x4cb6a6[_0x337a0(0x1e9)]-0x1;let _0x24ce3b='';_0x1ebb65>0x0&&(_0x24ce3b+=_0x62466b);_0x5beb25['showTreeLines']&&_0x1ebb65>0x0&&(_0x24ce3b+=a205_0x17601d['dim'](_0x53d028?'└──\x20':'├──\x20'));if(_0x5beb25[_0x337a0(0x1fb)]){if(_0x3fc1af[_0x337a0(0x1f5)]==='folder')_0x24ce3b+='📁\x20';else _0x3fc1af[_0x337a0(0x1f5)]===_0x337a0(0x1f7)?_0x24ce3b+='🗺️\x20':_0x24ce3b+=_0x337a0(0x1e5);}if(_0x5beb25[_0x337a0(0x1f8)]&&_0x3fc1af[_0x337a0(0x1f5)]===_0x337a0(0x1eb))_0x24ce3b+=hyperlink(_0x3fc1af[_0x337a0(0x1e7)],_0x5beb25[_0x337a0(0x1f8)](_0x3fc1af['id']));else _0x5beb25[_0x337a0(0x209)]&&_0x3fc1af[_0x337a0(0x1f5)]===_0x337a0(0x1f7)?_0x24ce3b+=hyperlink(_0x3fc1af[_0x337a0(0x1e7)],_0x5beb25['getJourneyUrl'](_0x3fc1af['id'])):_0x24ce3b+=_0x3fc1af[_0x337a0(0x1e7)];if(_0x5beb25[_0x337a0(0x1de)]){if(_0x3fc1af[_0x337a0(0x1f5)]===_0x337a0(0x1ed)){const _0x1d48c6=[];_0x3fc1af[_0x337a0(0x1ff)][_0x337a0(0x20b)]&&_0x1d48c6[_0x337a0(0x1dd)](_0x3fc1af[_0x337a0(0x1ff)][_0x337a0(0x20b)]+'\x20segment'+(_0x3fc1af[_0x337a0(0x1ff)][_0x337a0(0x20b)]!==0x1?'s':'')),_0x3fc1af[_0x337a0(0x1ff)]['folderCount']&&_0x1d48c6['push'](_0x3fc1af[_0x337a0(0x1ff)][_0x337a0(0x1f3)]+'\x20folder'+(_0x3fc1af[_0x337a0(0x1ff)]['folderCount']!==0x1?'s':'')),_0x3fc1af[_0x337a0(0x1ff)][_0x337a0(0x1e1)]&&_0x1d48c6[_0x337a0(0x1dd)](_0x3fc1af[_0x337a0(0x1ff)]['journeyCount']+_0x337a0(0x1e0)+(_0x3fc1af[_0x337a0(0x1ff)][_0x337a0(0x1e1)]!==0x1?'s':'')),_0x1d48c6[_0x337a0(0x1e9)]>0x0&&(_0x24ce3b+=a205_0x17601d[_0x337a0(0x1ee)]('\x20('+_0x1d48c6[_0x337a0(0x201)](',\x20')+')'));}else{if(_0x3fc1af[_0x337a0(0x1f5)]==='segment'&&_0x3fc1af['population']!==undefined)_0x24ce3b+=a205_0x17601d[_0x337a0(0x1ee)]('\x20('+formatRows(_0x3fc1af[_0x337a0(0x1dc)])+')');else _0x3fc1af['type']===_0x337a0(0x1f7)&&_0x3fc1af[_0x337a0(0x204)]&&(_0x24ce3b+=a205_0x17601d[_0x337a0(0x1ee)]('\x20'+getJourneyStateIndicator(_0x3fc1af['state'])));}}_0x33b2f3[_0x337a0(0x1dd)](_0x24ce3b);if(_0x3fc1af['children']&&_0x3fc1af[_0x337a0(0x1ec)][_0x337a0(0x1e9)]>0x0){let _0xb1376;if(_0x1ebb65===0x0)_0xb1376='';else _0x5beb25[_0x337a0(0x200)]?_0xb1376=_0x62466b+(_0x53d028?_0x337a0(0x1df):a205_0x17601d[_0x337a0(0x1ee)]('│')+'\x20\x20\x20'):_0xb1376=_0x62466b+_0x5beb25[_0x337a0(0x1f4)];const _0x521c37=formatTree(_0x3fc1af[_0x337a0(0x1ec)],_0x5beb25,_0x1ebb65+0x1,_0xb1376);_0x33b2f3[_0x337a0(0x1dd)](_0x521c37);}}return _0x33b2f3[_0x337a0(0x201)]('\x0a');}export function formatFlatList(_0x7b0ecf,_0x34d410,_0x44301f={},_0xfb85f7=[]){const _0x438987=a205_0x3391,_0x191d5b={...DEFAULT_OPTIONS,..._0x44301f},_0x10750c=[];for(const _0x2887e3 of _0x7b0ecf){_0x10750c[_0x438987(0x1dd)]({'sortKey':_0x2887e3[_0x438987(0x1e7)],'displayName':_0x2887e3[_0x438987(0x1e7)],'icon':_0x191d5b[_0x438987(0x1fb)]?'📁':'','metadata':undefined});}for(const _0x2e8a76 of _0x34d410){const _0x5d1a38=_0x191d5b[_0x438987(0x1de)]&&_0x2e8a76[_0x438987(0x1dc)]!==undefined?a205_0x17601d[_0x438987(0x1ee)]('\x20('+formatRows(_0x2e8a76[_0x438987(0x1dc)])+')'):'',_0x1ffed1=_0x191d5b[_0x438987(0x1f8)]?hyperlink(_0x2e8a76[_0x438987(0x1e7)],_0x191d5b[_0x438987(0x1f8)](_0x2e8a76['id'])):_0x2e8a76[_0x438987(0x1e7)];_0x10750c['push']({'sortKey':_0x2e8a76[_0x438987(0x1e7)],'displayName':_0x1ffed1,'icon':_0x191d5b['showIcons']?'🎯':'','metadata':_0x5d1a38});}for(const _0x191d6c of _0xfb85f7){const _0x16e0ad=getJourneyStateIndicator(_0x191d6c[_0x438987(0x204)]),_0x6bb73e=_0x191d5b[_0x438987(0x1de)]?a205_0x17601d['dim']('\x20'+_0x16e0ad):'',_0x5b5c73=_0x191d5b[_0x438987(0x209)]?hyperlink(_0x191d6c[_0x438987(0x1fe)],_0x191d5b[_0x438987(0x209)](_0x191d6c['id'])):_0x191d6c[_0x438987(0x1fe)];_0x10750c['push']({'sortKey':_0x191d6c['journeyBundleName'],'displayName':_0x5b5c73,'icon':_0x191d5b[_0x438987(0x1fb)]?_0x438987(0x1e8):'','metadata':_0x6bb73e});}_0x10750c['sort']((_0x571489,_0x34f889)=>_0x571489[_0x438987(0x1f9)][_0x438987(0x1fa)](_0x34f889['sortKey'],undefined,{'sensitivity':'base'}));if(_0x10750c[_0x438987(0x1e9)]===0x0)return'(empty)';const _0x1e2497=_0x10750c[_0x438987(0x1fd)](_0x37b825=>{const _0x42d84a=_0x438987,_0x2fbc03=_0x37b825[_0x42d84a(0x20d)]?_0x37b825['icon']+'\x20':'',_0x5c28a3=_0x37b825[_0x42d84a(0x1ff)]||'';return''+_0x2fbc03+_0x37b825[_0x42d84a(0x207)]+_0x5c28a3;});return _0x1e2497[_0x438987(0x201)]('\x0a');}function getJourneyStateIndicator(_0x28d2eb){const _0x3de119=a205_0x3391;switch(_0x28d2eb){case'draft':return _0x3de119(0x1e3);case _0x3de119(0x1e4):return'(running)';case _0x3de119(0x1f0):return _0x3de119(0x206);case _0x3de119(0x1f1):return _0x3de119(0x1ef);default:return'('+_0x28d2eb+')';}}function a205_0x2147(){const _0x467458=['join','8thefQn','3792042ZYIavo','state','22EqwBmq','(paused)','displayName','22870oNkoEf','getJourneyUrl','3222DQkFhZ','segmentCount','272762ukzcZp','icon','37896QPAQbB','population','push','showMetadata','\x20\x20\x20\x20','\x20journey','journeyCount','62343lktpSL','(draft)','launched','🎯\x20','sort','name','🗺️','length','5eTRTkH','segment','children','folder','dim','(completed)','paused','completed','4930356zRSyMV','folderCount','indent','type','4828628dYeAQE','journey','getSegmentUrl','sortKey','localeCompare','showIcons','249QNuYQK','map','journeyBundleName','metadata','showTreeLines'];a205_0x2147=function(){return _0x467458;};return a205_0x2147();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x13d426,_0x48eabb){const _0x3effd7=a206_0xcc61,_0x1e39ad=_0x13d426();while(!![]){try{const _0x263712=parseInt(_0x3effd7(0x1bc))/0x1*(parseInt(_0x3effd7(0x1be))/0x2)+-parseInt(_0x3effd7(0x1b7))/0x3+parseInt(_0x3effd7(0x1ba))/0x4*(parseInt(_0x3effd7(0x1c3))/0x5)+-parseInt(_0x3effd7(0x1b4))/0x6*(parseInt(_0x3effd7(0x1bf))/0x7)+-parseInt(_0x3effd7(0x1c2))/0x8+parseInt(_0x3effd7(0x1b5))/0x9+parseInt(_0x3effd7(0x1bb))/0xa;if(_0x263712===_0x48eabb)break;else _0x1e39ad['push'](_0x1e39ad['shift']());}catch(_0x5afc46){_0x1e39ad['push'](_0x1e39ad['shift']());}}}(a206_0xb8e8,0xb2d0e));function a206_0xcc61(_0x1505e0,_0x362c3c){_0x1505e0=_0x1505e0-0x1b4;const _0xb8e852=a206_0xb8e8();let _0xcc612a=_0xb8e852[_0x1505e0];return _0xcc612a;}function a206_0xb8e8(){const _0xae647=['name','join','4268HTJexO','1178780KYMYnc','2stoCAQ','replace','696022KlbfVx','51149SFhfMH','type','children','9371216hJanPJ','2905nqVIGQ','318dxIwsI','12319227sgafYG','length','1534581fmbvaW'];a206_0xb8e8=function(){return _0xae647;};return a206_0xb8e8();}export function globToMatcher(_0x553b49){const _0xa3ce2f=a206_0xcc61,_0x585948=_0x553b49['replace'](/[.+^${}()|[\]\\]/g,'\x5c$&')[_0xa3ce2f(0x1bd)](/\*/g,'.*')[_0xa3ce2f(0x1bd)](/\?/g,'.'),_0x4d106e=new RegExp(_0x585948,'i');return _0x5ef672=>_0x4d106e['test'](_0x5ef672);}export function searchTreeByName(_0xb8889,_0x428858){const _0x2afc46=globToMatcher(_0x428858),_0x11d54f=[],_0x2644c8=(_0x430d8b,_0x4904cc)=>{const _0x4e3cc5=a206_0xcc61;for(const _0x35882b of _0x430d8b){const _0x4f8bed=[..._0x4904cc,_0x35882b[_0x4e3cc5(0x1b8)]][_0x4e3cc5(0x1b9)]('/');_0x2afc46(_0x35882b[_0x4e3cc5(0x1b8)])&&_0x11d54f['push']({'type':_0x35882b[_0x4e3cc5(0x1c0)],'id':_0x35882b['id'],'name':_0x35882b[_0x4e3cc5(0x1b8)],'path':_0x4f8bed}),_0x35882b[_0x4e3cc5(0x1c1)]?.[_0x4e3cc5(0x1b6)]&&_0x2644c8(_0x35882b[_0x4e3cc5(0x1c1)],[..._0x4904cc,_0x35882b['name']]);}};return _0x2644c8(_0xb8889,[]),_0x11d54f;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a207_0x2551da=a207_0x5993;(function(_0x3ef61f,_0x118788){const _0x551fa8=a207_0x5993,_0x39e6e3=_0x3ef61f();while(!![]){try{const _0x18c5d0=-parseInt(_0x551fa8(0x1b9))/0x1*(-parseInt(_0x551fa8(0x1b6))/0x2)+parseInt(_0x551fa8(0x1ae))/0x3+-parseInt(_0x551fa8(0x1b1))/0x4*(parseInt(_0x551fa8(0x1a8))/0x5)+-parseInt(_0x551fa8(0x1a9))/0x6+-parseInt(_0x551fa8(0x1af))/0x7*(-parseInt(_0x551fa8(0x1a6))/0x8)+-parseInt(_0x551fa8(0x1ab))/0x9+parseInt(_0x551fa8(0x1a2))/0xa;if(_0x18c5d0===_0x118788)break;else _0x39e6e3['push'](_0x39e6e3['shift']());}catch(_0x1388b2){_0x39e6e3['push'](_0x39e6e3['shift']());}}}(a207_0x5bb7,0x3bb96));function a207_0x5bb7(){const _0x5f5939=['1518584ipSYlw','charCodeAt','5ejtlFZ','2865420pLKzUN','\x20bytes).\x20The\x20server\x20may\x20have\x20returned\x20an\x20error\x20or\x20empty\x20response.','3911265siXJxv','helpText','trim','1064607zwdOzp','7jmPqpr','Check\x20if\x20the\x20project\x20exists\x20and\x20has\x20been\x20pushed\x20at\x20least\x20once.','189172iuHUjv','length','from','error','(empty\x20response)','242446HzFbdw','message','equals','4QqjLrv','split','The\x20server\x20may\x20have\x20returned\x20an\x20error\x20page\x20instead\x20of\x20the\x20archive.\x20Try\x20pushing\x20a\x20new\x20revision.','1744940JMNXCl','WORKFLOW_ARCHIVE_CORRUPTED','\x20Server\x20response\x20preview:\x20','subarray'];a207_0x5bb7=function(){return _0x5f5939;};return a207_0x5bb7();}import{SDKError,ErrorCode}from'../errors.js';function a207_0x5993(_0x6e6279,_0x3f9d7d){_0x6e6279=_0x6e6279-0x1a0;const _0x5bb7bb=a207_0x5bb7();let _0x59930d=_0x5bb7bb[_0x6e6279];return _0x59930d;}const GZIP_MAGIC=Buffer[a207_0x2551da(0x1b3)]([0x1f,0x8b]),MIN_GZIP_SIZE=0x14;export function validateGzipArchive(_0x1651e0){const _0x2a2a13=a207_0x2551da;if(_0x1651e0['length']<MIN_GZIP_SIZE)return{'isValid':![],'size':_0x1651e0['length'],'error':{'message':'Downloaded\x20archive\x20is\x20too\x20small\x20('+_0x1651e0[_0x2a2a13(0x1b2)]+_0x2a2a13(0x1aa),'preview':getContentPreview(_0x1651e0),'helpText':_0x2a2a13(0x1b0)}};if(!_0x1651e0[_0x2a2a13(0x1a5)](0x0,0x2)[_0x2a2a13(0x1b8)](GZIP_MAGIC)){const _0x568a3e=getContentPreview(_0x1651e0),_0x5e7667=_0x568a3e?_0x2a2a13(0x1a4)+_0x568a3e:'';return{'isValid':![],'size':_0x1651e0[_0x2a2a13(0x1b2)],'error':{'message':'Downloaded\x20file\x20is\x20not\x20a\x20valid\x20gzip\x20archive.'+_0x5e7667,'preview':_0x568a3e,'helpText':_0x2a2a13(0x1a1)}};}return{'isValid':!![],'size':_0x1651e0[_0x2a2a13(0x1b2)]};}function getContentPreview(_0x110da0){const _0x575ae0=a207_0x2551da;if(_0x110da0[_0x575ae0(0x1b2)]===0x0)return _0x575ae0(0x1b5);const _0x1acc0a=_0x110da0[_0x575ae0(0x1a5)](0x0,0xc8)['toString']('utf-8'),_0x24c450=_0x1acc0a[_0x575ae0(0x1a0)]('')['filter'](_0x5400f2=>{const _0x3d5cf8=_0x575ae0,_0xeb14fb=_0x5400f2[_0x3d5cf8(0x1a7)](0x0);return _0xeb14fb>=0x20&&_0xeb14fb<0x7f||_0xeb14fb===0xa||_0xeb14fb===0xd||_0xeb14fb===0x9;})[_0x575ae0(0x1b2)],_0x46b752=_0x24c450/_0x1acc0a[_0x575ae0(0x1b2)];if(_0x46b752>0.8){const _0x4d7a7a=_0x1acc0a['slice'](0x0,0x64)[_0x575ae0(0x1ad)]();return _0x4d7a7a['length']<_0x1acc0a['trim']()[_0x575ae0(0x1b2)]?_0x4d7a7a+'...':_0x4d7a7a;}return undefined;}export function throwArchiveValidationError(_0x22c974){const _0x53fe16=a207_0x2551da;if(!_0x22c974['error'])throw new SDKError(ErrorCode['WORKFLOW_ARCHIVE_CORRUPTED'],'Archive\x20validation\x20failed\x20with\x20unknown\x20error');throw new SDKError(ErrorCode[_0x53fe16(0x1a3)],_0x22c974[_0x53fe16(0x1b4)][_0x53fe16(0x1b7)],undefined,{'helpText':_0x22c974['error'][_0x53fe16(0x1ac)]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1eb8da,_0x28af9b){const _0x19a038=a208_0x5206,_0x5b9a0b=_0x1eb8da();while(!![]){try{const _0x53bbad=-parseInt(_0x19a038(0x10c))/0x1*(parseInt(_0x19a038(0x11b))/0x2)+-parseInt(_0x19a038(0x11d))/0x3+-parseInt(_0x19a038(0x113))/0x4*(-parseInt(_0x19a038(0x114))/0x5)+parseInt(_0x19a038(0x11e))/0x6*(-parseInt(_0x19a038(0x121))/0x7)+parseInt(_0x19a038(0x107))/0x8*(parseInt(_0x19a038(0x11f))/0x9)+parseInt(_0x19a038(0x101))/0xa+parseInt(_0x19a038(0x112))/0xb;if(_0x53bbad===_0x28af9b)break;else _0x5b9a0b['push'](_0x5b9a0b['shift']());}catch(_0x412229){_0x5b9a0b['push'](_0x5b9a0b['shift']());}}}(a208_0x2c6a,0xde9ff));import{promises as a208_0x3886a6}from'fs';import a208_0xb2762b from'path';import a208_0x587371 from'os';import{tryFindWorkflowTdxConfig}from'./tdx-config.js';import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION}from'./workflow-utils.js';export async function prepareCloneWorkflow(_0x46c1e8,_0x3730e6,_0x480bae,_0x5f013d={}){const _0x5075d7=a208_0x5206,{client:_0x35fb86}=_0x46c1e8,_0xa33785=a208_0xb2762b[_0x5075d7(0x119)](_0x3730e6);try{await a208_0x3886a6[_0x5075d7(0x115)](_0xa33785);}catch{throw new Error(_0x5075d7(0x110)+_0x3730e6);}const _0x2b7a31=tryFindWorkflowTdxConfig(_0xa33785),_0x18059e=_0x2b7a31?.['config']['workflow_project'],_0x40908d=_0x5f013d['revision']||new Date()['toISOString']()[_0x5075d7(0x10f)](/[:.]/g,'-');if(!_0x5f013d[_0x5075d7(0x10e)]){const _0x497c69=await a208_0x3886a6[_0x5075d7(0x116)](_0xa33785),_0x3f4720=_0x497c69[_0x5075d7(0x11c)](_0x3b123c=>_0x3b123c[_0x5075d7(0x103)](WORKFLOW_FILE_EXTENSION));if(_0x3f4720[_0x5075d7(0x108)]===0x0)throw new Error(_0x5075d7(0x11a)+WORKFLOW_FILE_EXTENSION+_0x5075d7(0x120)+_0xa33785);}const _0xae02eb=await getProjectFiles(_0xa33785);let _0x3f3050=![],_0x3d021d;try{const _0x3e108b=await _0x35fb86[_0x5075d7(0x102)]({'name_pattern':_0x480bae}),_0xcb5d6d=_0x3e108b[_0x5075d7(0x10a)][_0x5075d7(0x109)](_0x28bd1d=>_0x28bd1d[_0x5075d7(0x117)]===_0x480bae);_0xcb5d6d&&(_0x3f3050=!![],_0x3d021d=_0xcb5d6d['id']);}catch{}return{'sourceDir':_0xa33785,'sourceProjectName':_0x18059e,'newProjectName':_0x480bae,'revision':_0x40908d,'fileCount':_0xae02eb[_0x5075d7(0x108)],'files':_0xae02eb,'targetExists':_0x3f3050,'existingProjectId':_0x3d021d};}export async function executeCloneWorkflow(_0x360dac,_0x1c9398){const _0x2f8c82=a208_0x5206,_0x53b815=await import(_0x2f8c82(0x105)),{client:_0x54fabc}=_0x360dac,_0x1a54c2=await getProjectFiles(_0x1c9398[_0x2f8c82(0x10d)]),_0x18aa69=await a208_0x3886a6['mkdtemp'](a208_0xb2762b[_0x2f8c82(0x122)](a208_0x587371[_0x2f8c82(0x104)](),'tdx-wf-clone-')),_0x5f2e92=a208_0xb2762b['join'](_0x18aa69,_0x2f8c82(0x106));try{await _0x53b815['create']({'file':_0x5f2e92,'gzip':!![],'cwd':_0x1c9398[_0x2f8c82(0x10d)],'portable':!![]},_0x1a54c2);const _0x1dd55b=await _0x54fabc['uploadProjectArchive'](_0x1c9398[_0x2f8c82(0x111)],_0x1c9398[_0x2f8c82(0x100)],_0x5f2e92);return{'sourceDir':_0x1c9398['sourceDir'],'sourceProjectName':_0x1c9398['sourceProjectName'],'newProjectName':_0x1dd55b[_0x2f8c82(0x117)],'newProjectId':_0x1dd55b['id'],'revision':_0x1dd55b[_0x2f8c82(0x100)],'fileCount':_0x1a54c2[_0x2f8c82(0x108)],'files':_0x1a54c2};}finally{await a208_0x3886a6['rm'](_0x18aa69,{'recursive':!![],'force':!![]});}}function a208_0x5206(_0x307aa4,_0x452f61){_0x307aa4=_0x307aa4-0x100;const _0x2c6a63=a208_0x2c6a();let _0x52062d=_0x2c6a63[_0x307aa4];return _0x52062d;}function a208_0x2c6a(){const _0x254ea5=['readdir','name','isDirectory','resolve','No\x20','2ezrmAG','filter','1900005uDPGty','3000258deNYri','9iphAPX','\x20workflow\x20files\x20found\x20in\x20','21dcZaXq','join','revision','7141720OXgWnY','listProjects','endsWith','tmpdir','tar','archive.tar.gz','8715688SXWvZJ','length','find','data','push','843910QZLjGE','sourceDir','skipValidation','replace','Source\x20directory\x20not\x20found:\x20','newProjectName','8165388ZQzNCU','7776SuqiAD','3455lQaxdB','access'];a208_0x2c6a=function(){return _0x254ea5;};return a208_0x2c6a();}async function getProjectFiles(_0xb8c398,_0xb8ad05=''){const _0x47d951=a208_0x5206,_0x3c80be=[],_0x5b7413=await a208_0x3886a6[_0x47d951(0x116)](_0xb8c398,{'withFileTypes':!![]});for(const _0x2faa56 of _0x5b7413){const _0x21799f=_0xb8ad05?a208_0xb2762b[_0x47d951(0x122)](_0xb8ad05,_0x2faa56[_0x47d951(0x117)]):_0x2faa56['name'];if(_0x2faa56[_0x47d951(0x117)]==='tdx.json')continue;if(!shouldIncludeInArchive(_0x2faa56[_0x47d951(0x117)]))continue;if(_0x2faa56[_0x47d951(0x118)]()){const _0x15553b=await getProjectFiles(a208_0xb2762b['join'](_0xb8c398,_0x2faa56['name']),_0x21799f);_0x3c80be[_0x47d951(0x10b)](..._0x15553b);}else _0x3c80be[_0x47d951(0x10b)](_0x21799f);}return _0x3c80be;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a200_0x3acd(){const _0x1f48c4=['144845fCsQRF','last_id','startAttempt','tmpdir','prepareCloneProject','join','WORKFLOW_SECRET_SET_FAILED','Failed\x20to\x20set\x20secret','map','applyPullProject','client','isDirectory','rejected','arrayBuffer','Invalid\x20workflow\x20format:\x20','getAttemptTasks','tar','144487SOnSwu','.tar.gz','revision','retrySession','getWorkflow','length','listSchedules','basename','direct','executePushProject','logFiles','Failed\x20to\x20download\x20log\x20file:\x20','tasks','status','exportParams','parseWorkflowId','workflowName','344620WhDmJM','extract','mkdir','getSchedule','kill','download','retryAttemptName','cancelRequested','params','listAttempts','unlink','name','NUMERIC_ID_PATTERN','enableSchedule','lastId','sessionId','7496019NcCGCn','getProjectWorkflow','done','indexOf','resumeFrom','retryAttempt','listLogFiles','INVALID_ARGUMENT','run','fullName','2313093bvPjKq','updatedAt','Project\x20not\x20found:\x20','util','clearSchedule','listSecrets','downloadProjectArchive','index','.\x20Expected\x20\x22project.workflow\x22','\x20workflow\x20files\x20found\x20in\x20project\x20directory','upstreams','scheduleFrom','WORKFLOW_PROJECT_NOT_FOUND','min','delete','listSessions','limit','toString','toISOString','216RjIpVv','slice','891hdRhlj','246aKTwQH','now','1129150xloGkX','listWorkflows','bind','tdx-workflow-','executeCloneProject','config','tdx-workflow-push-','projects','4ospcxJ','projectName','sessionUuid','from','data','listProjectSchedules','459070EgaIxs','disableSchedule','resolveProjectId','finishedAt','preparePushProject','startedAt','setSecret','latest','setSecrets','endsWith','test','No\x20','retryParams','killAttempt','sessionTime','fromTime','includeRetried','gunzip','getAttempt','filter','fromTask','getProject','message','readdir','path','workflow','access','push','state','project','attempt','listProjects','retryAt'];a200_0x3acd=function(){return _0x1f48c4;};return a200_0x3acd();}const a200_0x2c90df=a200_0x2fb9;(function(_0x3aeff9,_0x2e9329){const _0x34af82=a200_0x2fb9,_0x3243b0=_0x3aeff9();while(!![]){try{const _0x27b905=-parseInt(_0x34af82(0x187))/0x1+-parseInt(_0x34af82(0x155))/0x2+parseInt(_0x34af82(0x16f))/0x3*(parseInt(_0x34af82(0x18f))/0x4)+parseInt(_0x34af82(0x133))/0x5*(-parseInt(_0x34af82(0x185))/0x6)+parseInt(_0x34af82(0x144))/0x7*(-parseInt(_0x34af82(0x182))/0x8)+-parseInt(_0x34af82(0x165))/0x9+parseInt(_0x34af82(0x195))/0xa*(parseInt(_0x34af82(0x184))/0xb);if(_0x27b905===_0x2e9329)break;else _0x3243b0['push'](_0x3243b0['shift']());}catch(_0x179323){_0x3243b0['push'](_0x3243b0['shift']());}}}(a200_0x3acd,0x94f3f));import{WorkflowApiClient}from'../client/workflow-client.js';import{SDKError,ErrorCode}from'../errors.js';import{MAX_PAGINATION_LIMIT}from'../util/paginate.js';async function paginateResults(_0x20e6eb,_0xca4982,_0x11f18e=0x64){const _0x43d51e=a200_0x2fb9,_0x2c4906=Math[_0x43d51e(0x17c)](_0xca4982,MAX_PAGINATION_LIMIT),_0x1e6ab7=[];let _0x45910e;while(_0x1e6ab7[_0x43d51e(0x149)]<_0x2c4906){const _0x460308=await _0x20e6eb(_0x11f18e,_0x45910e),_0x4bdde1=_0x460308['rawCount']??_0x460308[_0x43d51e(0x193)][_0x43d51e(0x149)];if(_0x4bdde1===0x0)break;_0x1e6ab7[_0x43d51e(0x1b0)](..._0x460308[_0x43d51e(0x193)]);if(!_0x460308[_0x43d51e(0x163)]||_0x4bdde1<_0x11f18e)break;_0x45910e=_0x460308['lastId'];}return _0x1e6ab7[_0x43d51e(0x183)](0x0,_0x2c4906);}import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION}from'./workflow-utils.js';import{pullWorkflow,applyPullResult}from'./pull-workflow.js';function a200_0x2fb9(_0x2a3b60,_0x55cd17){_0x2a3b60=_0x2a3b60-0x131;const _0x3acd43=a200_0x3acd();let _0x2fb9a0=_0x3acd43[_0x2a3b60];return _0x2fb9a0;}import{preparePushWorkflow,executePushWorkflow}from'./push-workflow.js';import{prepareCloneWorkflow,executeCloneWorkflow}from'./clone-workflow.js';export class WorkflowSDK{static [a200_0x2c90df(0x161)]=/^\d+$/;[a200_0x2c90df(0x13d)];constructor(_0x3a7a1d){this['client']=new WorkflowApiClient(_0x3a7a1d);}async['resolveProjectId'](_0x1fb2bf){const _0x3acb5a=a200_0x2c90df;if(WorkflowSDK['NUMERIC_ID_PATTERN'][_0x3acb5a(0x19f)](_0x1fb2bf)){const _0x1c73d2=await this[_0x3acb5a(0x13d)][_0x3acb5a(0x1aa)](_0x1fb2bf);return{'id':_0x1c73d2['id'],'name':_0x1c73d2[_0x3acb5a(0x160)]};}const _0x1c43f7=await this[_0x3acb5a(0x13d)][_0x3acb5a(0x131)]({'name_pattern':_0x1fb2bf}),_0x277289=_0x1c43f7['data']['find'](_0x284c67=>_0x284c67[_0x3acb5a(0x160)]===_0x1fb2bf);if(!_0x277289)throw new SDKError(ErrorCode[_0x3acb5a(0x17b)],_0x3acb5a(0x171)+_0x1fb2bf);return{'id':_0x277289['id'],'name':_0x277289[_0x3acb5a(0x160)]};}async[a200_0x2c90df(0x18e)](_0x240f83,_0x427866){const _0x51dea6=a200_0x2c90df,_0x3ad96e=_0x427866?.[_0x51dea6(0x17f)]||MAX_PAGINATION_LIMIT,_0x3ac742=await paginateResults((_0x4647c3,_0x51c540)=>this[_0x51dea6(0x13d)][_0x51dea6(0x131)]({'name_pattern':_0x240f83,'limit':_0x4647c3,'last_id':_0x51c540??_0x427866?.[_0x51dea6(0x134)]}),_0x3ad96e);return _0x3ac742[_0x51dea6(0x13b)](_0x47ced1=>({..._0x47ced1,'project_id':_0x47ced1['id'],'project_name':_0x47ced1['name']}));}async['workflows'](_0x5839ef,_0x18b18c){const _0x1ee612=a200_0x2c90df,_0x2d45c4=_0x18b18c?.[_0x1ee612(0x17f)]||MAX_PAGINATION_LIMIT,_0x41bb24=await paginateResults((_0x3bd75b,_0x2ca309)=>this['client'][_0x1ee612(0x188)]({'project_name':_0x5839ef,'limit':_0x3bd75b,'last_id':_0x2ca309??_0x18b18c?.[_0x1ee612(0x134)]}),_0x2d45c4);return _0x41bb24[_0x1ee612(0x13b)](_0x474617=>({'project_id':_0x474617[_0x1ee612(0x1b2)]?.['id'],'project_name':_0x474617['project']?.[_0x1ee612(0x160)],'workflow_id':_0x474617['id'],'workflow_name':_0x474617[_0x1ee612(0x160)],'revision':_0x474617[_0x1ee612(0x146)],'timezone':_0x474617['timezone'],'config':_0x474617[_0x1ee612(0x18c)],'id':_0x474617['id'],'name':_0x474617[_0x1ee612(0x160)],'project':_0x474617[_0x1ee612(0x1b2)]}));}async['sessions'](_0x1537ec){const _0x4cee55=a200_0x2c90df;let _0x5d16a3;if(_0x1537ec?.[_0x4cee55(0x190)]){let _0x423fec,_0x1823cc=![];while(!_0x1823cc){const _0x1e4c1f=await this['client'][_0x4cee55(0x131)]({'limit':0x64,'last_id':_0x423fec}),_0x40c721=_0x1e4c1f[_0x4cee55(0x193)]['find'](_0x5bc392=>_0x5bc392['name']===_0x1537ec['projectName']);if(_0x40c721){_0x5d16a3=_0x40c721['id'],_0x1823cc=!![];break;}if(!_0x1e4c1f[_0x4cee55(0x163)]||_0x1e4c1f[_0x4cee55(0x193)][_0x4cee55(0x149)]===0x0)break;_0x423fec=_0x1e4c1f[_0x4cee55(0x163)];}if(!_0x5d16a3)throw new SDKError(ErrorCode[_0x4cee55(0x17b)],_0x4cee55(0x171)+_0x1537ec[_0x4cee55(0x190)]);}const _0x144a83=_0x1537ec?.['limit']||0x64,_0x3940aa=await paginateResults((_0x46eb3c,_0x5a0177)=>this[_0x4cee55(0x13d)][_0x4cee55(0x17e)]({'project_id':_0x5d16a3,'project_name':_0x1537ec?.['projectName'],'workflow_name':_0x1537ec?.[_0x4cee55(0x154)],'status':_0x1537ec?.[_0x4cee55(0x151)],'from_time':_0x1537ec?.[_0x4cee55(0x1a4)],'to_time':_0x1537ec?.['toTime'],'limit':_0x46eb3c,'last_id':_0x5a0177??_0x1537ec?.['last_id']}),_0x144a83);return _0x3940aa['map'](_0x9de294=>({'project_id':_0x9de294[_0x4cee55(0x1b2)]?.['id'],'project_name':_0x9de294['project']?.[_0x4cee55(0x160)],'workflow_id':_0x9de294[_0x4cee55(0x1ae)]?.['id'],'workflow_name':_0x9de294[_0x4cee55(0x1ae)]?.[_0x4cee55(0x160)],'session_id':_0x9de294['id'],'sessionUuid':_0x9de294['sessionUuid'],'sessionTime':_0x9de294[_0x4cee55(0x1a3)],'lastAttempt':_0x9de294['lastAttempt'],'id':_0x9de294['id'],'project':_0x9de294[_0x4cee55(0x1b2)],'workflow':_0x9de294[_0x4cee55(0x1ae)]}));}async['attempts'](_0x2d2502){const _0x15aea4=a200_0x2c90df,_0x220045=_0x2d2502?.[_0x15aea4(0x17f)]||0x64,_0x3f0744=await paginateResults((_0x59e7c3,_0x4b84a6)=>this[_0x15aea4(0x13d)][_0x15aea4(0x15e)]({'project_name':_0x2d2502?.[_0x15aea4(0x190)],'workflow_name':_0x2d2502?.[_0x15aea4(0x154)],'include_retried':_0x2d2502?.[_0x15aea4(0x1a5)],'limit':_0x59e7c3,'last_id':_0x4b84a6??_0x2d2502?.[_0x15aea4(0x134)]}),_0x220045);return _0x3f0744[_0x15aea4(0x13b)](_0x4a93a5=>({'project_id':_0x4a93a5[_0x15aea4(0x1b2)]?.['id'],'project_name':_0x4a93a5['project']?.[_0x15aea4(0x160)],'workflow_id':_0x4a93a5[_0x15aea4(0x1ae)]?.['id'],'workflow_name':_0x4a93a5[_0x15aea4(0x1ae)]?.[_0x15aea4(0x160)],'session_id':_0x4a93a5[_0x15aea4(0x164)],'sessionUuid':_0x4a93a5[_0x15aea4(0x191)],'sessionTime':_0x4a93a5[_0x15aea4(0x1a3)],'attempt_id':_0x4a93a5['id'],'attempt_index':_0x4a93a5['index'],'retryAttemptName':_0x4a93a5[_0x15aea4(0x15b)],'done':_0x4a93a5[_0x15aea4(0x167)],'success':_0x4a93a5['success'],'cancelRequested':_0x4a93a5[_0x15aea4(0x15c)],'params':_0x4a93a5[_0x15aea4(0x15d)],'createdAt':_0x4a93a5['createdAt'],'finishedAt':_0x4a93a5[_0x15aea4(0x198)],'id':_0x4a93a5['id'],'index':_0x4a93a5[_0x15aea4(0x176)],'project':_0x4a93a5['project'],'workflow':_0x4a93a5[_0x15aea4(0x1ae)]}));}async[a200_0x2c90df(0x1b3)](_0x54edb9){const _0x58c04f=a200_0x2c90df,_0x17e1ca=await this[_0x58c04f(0x13d)][_0x58c04f(0x1a7)](_0x54edb9);return _0x17e1ca;}async[a200_0x2c90df(0x150)](_0x37aced,_0x1623d2=![]){const _0x549da0=a200_0x2c90df,_0x39bbb9=await this[_0x549da0(0x13d)][_0x549da0(0x142)](_0x37aced,_0x1623d2);return _0x39bbb9[_0x549da0(0x13b)](_0x371fa4=>({'task_id':_0x371fa4['id'],'task_name':_0x371fa4[_0x549da0(0x16e)],'parentId':_0x371fa4['parentId'],'config':_0x371fa4[_0x549da0(0x18c)],'upstreams':_0x371fa4[_0x549da0(0x179)],'state':_0x371fa4[_0x549da0(0x1b1)],'exportParams':_0x371fa4[_0x549da0(0x152)],'storeParams':_0x371fa4['storeParams'],'stateParams':_0x371fa4['stateParams'],'updatedAt':_0x371fa4[_0x549da0(0x170)],'retryAt':_0x371fa4[_0x549da0(0x132)],'startedAt':_0x371fa4[_0x549da0(0x19a)],'error':_0x371fa4['error'],'isGroup':_0x371fa4['isGroup'],'id':_0x371fa4['id'],'fullName':_0x371fa4['fullName']}));}async[a200_0x2c90df(0x14e)](_0x1ed507,_0x43763e){const _0x2bd393=a200_0x2c90df;return await this[_0x2bd393(0x13d)][_0x2bd393(0x16b)](_0x1ed507,_0x43763e);}async['logs'](_0x764e6d,_0x4b3fdf){const _0x1a88bc=a200_0x2c90df,_0x5b7f6d=await import('zlib'),{promisify:_0x5b9d0a}=await import(_0x1a88bc(0x172)),_0x308710=_0x5b9d0a(_0x5b7f6d[_0x1a88bc(0x1a6)]),_0x222f4f=await this[_0x1a88bc(0x13d)][_0x1a88bc(0x16b)](_0x764e6d,_0x4b3fdf);if(_0x222f4f[_0x1a88bc(0x149)]===0x0)return'';const _0x5eeb7b=[];for(const _0xe4fc3b of _0x222f4f){if(!_0xe4fc3b[_0x1a88bc(0x14c)])continue;const _0x1e4fb1=await fetch(_0xe4fc3b['direct']);if(!_0x1e4fb1['ok'])throw new Error(_0x1a88bc(0x14f)+_0x1e4fb1[_0x1a88bc(0x151)]);const _0xbf0e61=Buffer[_0x1a88bc(0x192)](await _0x1e4fb1[_0x1a88bc(0x140)]()),_0x4b1e11=await _0x308710(_0xbf0e61);_0x5eeb7b['push'](_0x4b1e11[_0x1a88bc(0x180)]('utf-8'));}return _0x5eeb7b[_0x1a88bc(0x138)]('\x0a');}async[a200_0x2c90df(0x159)](_0x35af99,_0x3991af){const _0x4655b6=a200_0x2c90df,_0x20044f=await this['client'][_0x4655b6(0x1a2)](_0x35af99,_0x3991af);return _0x20044f?.[_0x4655b6(0x1ab)]??'Kill\x20request\x20accepted';}async[a200_0x2c90df(0x147)](_0x4a6e2a,_0x19760a){const _0x1ca1fd=a200_0x2c90df,_0x202c34=await this[_0x1ca1fd(0x13d)][_0x1ca1fd(0x147)](_0x4a6e2a,{'from_task':_0x19760a?.[_0x1ca1fd(0x1a9)],'retry_params':_0x19760a?.[_0x1ca1fd(0x1a1)]});return{'attemptId':_0x202c34['id'],'sessionId':_0x202c34['sessionId']};}async[a200_0x2c90df(0x16a)](_0x351259,_0x9c8b00){const _0x4b89eb=a200_0x2c90df,_0x8570b2=await this[_0x4b89eb(0x13d)][_0x4b89eb(0x16a)](_0x351259,{'resume_from':_0x9c8b00?.[_0x4b89eb(0x169)],'retry_params':_0x9c8b00?.[_0x4b89eb(0x1a1)],'force':_0x9c8b00?.['force']});return{'attemptId':_0x8570b2['id'],'sessionId':_0x8570b2[_0x4b89eb(0x164)]};}[a200_0x2c90df(0x153)](_0x38de5b){const _0x1bd49f=a200_0x2c90df,_0x1f5f63=_0x38de5b[_0x1bd49f(0x168)]('.');if(_0x1f5f63===-0x1)throw new SDKError(ErrorCode[_0x1bd49f(0x16c)],'Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format:\x20'+_0x38de5b);const _0x108447=_0x38de5b['substring'](0x0,_0x1f5f63),_0x1f5e21=_0x38de5b['substring'](_0x1f5f63+0x1);if(!_0x108447||!_0x1f5e21)throw new SDKError(ErrorCode[_0x1bd49f(0x16c)],_0x1bd49f(0x141)+_0x38de5b+_0x1bd49f(0x177));return{'projectName':_0x108447,'workflowName':_0x1f5e21};}async[a200_0x2c90df(0x16d)](_0xe2aa63,_0xffad5b={},_0x488c41){const _0x318a82=a200_0x2c90df,{projectName:_0x1565d1,workflowName:_0x24fd21}=this[_0x318a82(0x153)](_0xe2aa63),_0x4842b6=_0x488c41?.['sessionTime']||new Date()[_0x318a82(0x181)]();return await this[_0x318a82(0x13d)][_0x318a82(0x135)]({'projectName':_0x1565d1,'workflowName':_0x24fd21,'sessionTime':_0x4842b6,'params':_0xffad5b});}async[a200_0x2c90df(0x148)](_0x3cbc3a){const _0x48967e=a200_0x2c90df,{projectName:_0x1a85c1,workflowName:_0x28f011}=this[_0x48967e(0x153)](_0x3cbc3a),{id:_0x56899d}=await this[_0x48967e(0x197)](_0x1a85c1);return await this[_0x48967e(0x13d)][_0x48967e(0x166)](_0x56899d,_0x28f011);}async[a200_0x2c90df(0x15a)](_0x44a790,_0x3d0f45,_0x543f42){const _0xe76564=a200_0x2c90df,{promises:_0x18f8d8}=await import('fs'),_0x1cbf5e=await import(_0xe76564(0x1ad)),_0x2f6b87=await import('os'),_0x58e7c8=await import(_0xe76564(0x143)),{id:_0x5915f6,name:_0x3ef1cb}=await this['resolveProjectId'](_0x44a790),_0x28bf27=_0x2f6b87[_0xe76564(0x136)](),_0x57cf7c=_0x1cbf5e[_0xe76564(0x138)](_0x28bf27,_0xe76564(0x18a)+_0x5915f6+'-'+Date[_0xe76564(0x186)]()+'.tar.gz');try{await this['client'][_0xe76564(0x175)](_0x5915f6,_0x57cf7c,_0x543f42?.[_0xe76564(0x146)]);const _0x362be4=_0x1cbf5e[_0xe76564(0x138)](_0x3d0f45,_0x3ef1cb);await _0x18f8d8[_0xe76564(0x157)](_0x362be4,{'recursive':!![]}),await _0x58e7c8[_0xe76564(0x156)]({'file':_0x57cf7c,'cwd':_0x362be4,'gzip':!![]});const _0x5cf880=async _0xd9be31=>{const _0x425ab9=_0xe76564;let _0x2b3d6f=0x0;const _0x347b65=await _0x18f8d8[_0x425ab9(0x1ac)](_0xd9be31,{'withFileTypes':!![]});for(const _0x643f7c of _0x347b65){const _0x5bb97a=_0x1cbf5e['join'](_0xd9be31,_0x643f7c['name']);if(_0x643f7c['isFile']())_0x2b3d6f++;else _0x643f7c['isDirectory']()&&(_0x2b3d6f+=await _0x5cf880(_0x5bb97a));}return _0x2b3d6f;},_0x2b33a5=await _0x5cf880(_0x362be4);return{'projectName':_0x3ef1cb,'revision':_0x543f42?.[_0xe76564(0x146)]||_0xe76564(0x19c),'filesExtracted':_0x2b33a5};}finally{try{await _0x18f8d8[_0xe76564(0x15f)](_0x57cf7c);}catch{}}}async[a200_0x2c90df(0x1b0)](_0x30e818,_0x26d6e8){const _0xd8035d=a200_0x2c90df,{promises:_0x14cc6f}=await import('fs'),_0x55ff6c=await import(_0xd8035d(0x1ad)),_0x191c26=await import(_0xd8035d(0x143)),_0x48a557=_0x26d6e8?.[_0xd8035d(0x190)]||_0x55ff6c[_0xd8035d(0x14b)](_0x30e818),_0x343367=_0x26d6e8?.[_0xd8035d(0x146)]||new Date()[_0xd8035d(0x181)]()['replace'](/[:.]/g,'-');try{await _0x14cc6f[_0xd8035d(0x1af)](_0x30e818);}catch{throw new Error('Project\x20directory\x20not\x20found:\x20'+_0x30e818);}if(!_0x26d6e8?.['skipValidation']){const _0x53967c=await _0x14cc6f[_0xd8035d(0x1ac)](_0x30e818),_0x32b21f=_0x53967c[_0xd8035d(0x1a8)](_0xe409c0=>_0xe409c0[_0xd8035d(0x19e)](WORKFLOW_FILE_EXTENSION));if(_0x32b21f[_0xd8035d(0x149)]===0x0)throw new Error(_0xd8035d(0x1a0)+WORKFLOW_FILE_EXTENSION+_0xd8035d(0x178));for(const _0x38cdd3 of _0x32b21f){const _0x454f23=_0x55ff6c['join'](_0x30e818,_0x38cdd3);try{await _0x14cc6f[_0xd8035d(0x1af)](_0x454f23);}catch{throw new Error('Cannot\x20read\x20workflow\x20file:\x20'+_0x38cdd3);}}}const _0x18d3fd=async(_0x1d6ea2,_0x28d8f9='')=>{const _0x1645fe=_0xd8035d,_0x544bf7=await _0x14cc6f[_0x1645fe(0x1ac)](_0x1d6ea2,{'withFileTypes':!![]}),_0x52d41c=[];for(const _0x5a760f of _0x544bf7){const _0x465f3d=_0x55ff6c[_0x1645fe(0x138)](_0x28d8f9,_0x5a760f[_0x1645fe(0x160)]),_0x1fe79b=_0x55ff6c[_0x1645fe(0x138)](_0x1d6ea2,_0x5a760f[_0x1645fe(0x160)]);if(!shouldIncludeInArchive(_0x5a760f[_0x1645fe(0x160)]))continue;_0x5a760f[_0x1645fe(0x13e)]()?_0x52d41c[_0x1645fe(0x1b0)](...await _0x18d3fd(_0x1fe79b,_0x465f3d)):_0x52d41c['push'](_0x465f3d);}return _0x52d41c;},_0x54216d=await _0x18d3fd(_0x30e818),_0x47dacf=await import('os'),_0x4994b0=_0x47dacf[_0xd8035d(0x136)](),_0x12875e=_0x55ff6c[_0xd8035d(0x138)](_0x4994b0,_0xd8035d(0x18d)+Date[_0xd8035d(0x186)]()+_0xd8035d(0x145));try{await _0x191c26['create']({'file':_0x12875e,'gzip':!![],'cwd':_0x30e818,'portable':!![]},_0x54216d);const _0x20d967=await this[_0xd8035d(0x13d)]['uploadProjectArchive'](_0x48a557,_0x343367,_0x12875e,{'scheduleFrom':_0x26d6e8?.[_0xd8035d(0x17a)],'clearSchedule':_0x26d6e8?.[_0xd8035d(0x173)],'clearScheduleAll':_0x26d6e8?.['clearScheduleAll']});return{'projectId':_0x20d967['id'],'projectName':_0x20d967['name'],'revision':_0x20d967['revision']};}finally{try{await _0x14cc6f[_0xd8035d(0x15f)](_0x12875e);}catch{}}}async[a200_0x2c90df(0x17d)](_0x355248){const _0x4bdff8=a200_0x2c90df,{id:_0x2f7e35}=await this['resolveProjectId'](_0x355248),_0x3b2c1b=await this[_0x4bdff8(0x13d)]['deleteProject'](_0x2f7e35);return{'projectId':_0x3b2c1b['id'],'projectName':_0x3b2c1b['name']};}async[a200_0x2c90df(0x174)](_0x50d0b8){const _0x23954f=a200_0x2c90df,{id:_0x135d08,name:_0x29ed4d}=await this[_0x23954f(0x197)](_0x50d0b8),_0x2a3fd4=await this[_0x23954f(0x13d)][_0x23954f(0x174)](_0x135d08);return{'projectName':_0x29ed4d,'secrets':_0x2a3fd4};}async[a200_0x2c90df(0x19b)](_0x54e5e1,_0x5808f7,_0x5bbe67){const _0x17f235=a200_0x2c90df,{id:_0x4148af,name:_0x4e9608}=await this[_0x17f235(0x197)](_0x54e5e1);return await this[_0x17f235(0x13d)][_0x17f235(0x19b)](_0x4148af,_0x5808f7,_0x5bbe67),{'projectName':_0x4e9608,'key':_0x5808f7};}async[a200_0x2c90df(0x19d)](_0x4c0aa1,_0x8cec15){const _0x5f20af=a200_0x2c90df,{id:_0x2911a3,name:_0x119e35}=await this[_0x5f20af(0x197)](_0x4c0aa1),_0x21bbbb=Object['keys'](_0x8cec15),_0x84fc27=await Promise['allSettled'](_0x21bbbb[_0x5f20af(0x13b)](_0x4eaaeb=>this[_0x5f20af(0x13d)]['setSecret'](_0x2911a3,_0x4eaaeb,_0x8cec15[_0x4eaaeb]))),_0x50f152=_0x84fc27['map']((_0x4e8194,_0x5d4ca3)=>_0x4e8194['status']===_0x5f20af(0x13f)?_0x21bbbb[_0x5d4ca3]:null)[_0x5f20af(0x1a8)](_0x4d6129=>_0x4d6129!==null);if(_0x50f152[_0x5f20af(0x149)]>0x0)throw new SDKError(ErrorCode[_0x5f20af(0x139)],_0x5f20af(0x13a)+(_0x50f152[_0x5f20af(0x149)]>0x1?'s':'')+':\x20'+_0x50f152[_0x5f20af(0x138)](',\x20'));return{'projectName':_0x119e35,'keys':_0x21bbbb};}async['deleteSecret'](_0x3890bc,_0x2cd4b3){const _0xc51228=a200_0x2c90df,{id:_0x294bc5,name:_0x1ea272}=await this[_0xc51228(0x197)](_0x3890bc);return await this[_0xc51228(0x13d)]['deleteSecret'](_0x294bc5,_0x2cd4b3),{'projectName':_0x1ea272,'key':_0x2cd4b3};}async['pullProject'](_0x2167a7,_0x36ffc5){const _0x58864e=a200_0x2c90df;return pullWorkflow({'client':this[_0x58864e(0x13d)],'resolveProjectId':this['resolveProjectId']['bind'](this)},_0x2167a7,_0x36ffc5);}async[a200_0x2c90df(0x13c)](_0x3b268b,_0x462791){const _0x2f092e=a200_0x2c90df;return applyPullResult({'client':this[_0x2f092e(0x13d)],'resolveProjectId':this[_0x2f092e(0x197)]['bind'](this)},_0x3b268b,_0x462791);}async[a200_0x2c90df(0x199)](_0x3bde98){const _0x1f9602=a200_0x2c90df;return preparePushWorkflow({'client':this['client'],'resolveProjectId':this[_0x1f9602(0x197)][_0x1f9602(0x189)](this)},_0x3bde98);}async[a200_0x2c90df(0x14d)](_0x317fa3){const _0x547bee=a200_0x2c90df;return executePushWorkflow({'client':this[_0x547bee(0x13d)],'resolveProjectId':this[_0x547bee(0x197)][_0x547bee(0x189)](this)},_0x317fa3);}async[a200_0x2c90df(0x137)](_0x4c6892,_0x27e83e,_0x3d28ab){const _0x30b4fd=a200_0x2c90df;return prepareCloneWorkflow({'client':this[_0x30b4fd(0x13d)]},_0x4c6892,_0x27e83e,_0x3d28ab);}async[a200_0x2c90df(0x18b)](_0x2e6a9a){return executeCloneWorkflow({'client':this['client']},_0x2e6a9a);}async[a200_0x2c90df(0x14a)](_0x5dd0af){const _0x163e09=a200_0x2c90df,_0x3e9067=Math['min'](Number(_0x5dd0af?.[_0x163e09(0x17f)])||MAX_PAGINATION_LIMIT,MAX_PAGINATION_LIMIT);return await this['client'][_0x163e09(0x14a)]({'limit':_0x3e9067});}async['listProjectSchedules'](_0x34508c,_0x1f14d5){const _0x16037b=a200_0x2c90df,{id:_0x4415bd}=await this['resolveProjectId'](_0x34508c),_0x7b5c5e=Math[_0x16037b(0x17c)](Number(_0x1f14d5?.['limit'])||MAX_PAGINATION_LIMIT,MAX_PAGINATION_LIMIT);return await this[_0x16037b(0x13d)][_0x16037b(0x194)](_0x4415bd,{'workflow':_0x1f14d5?.[_0x16037b(0x1ae)],'limit':_0x7b5c5e});}async[a200_0x2c90df(0x158)](_0x254be8){const _0x57c8ee=a200_0x2c90df;return await this[_0x57c8ee(0x13d)][_0x57c8ee(0x158)](_0x254be8);}async[a200_0x2c90df(0x162)](_0x315934,_0x2de44a){const _0x4a23dd=a200_0x2c90df;return await this['client'][_0x4a23dd(0x162)](_0x315934,_0x2de44a);}async[a200_0x2c90df(0x196)](_0x384bc9){const _0x198476=a200_0x2c90df;return await this[_0x198476(0x13d)]['disableSchedule'](_0x384bc9);}}
|
|
1
|
+
const a209_0x5160b2=a209_0x4431;(function(_0x41fe2e,_0x5421cf){const _0x39982f=a209_0x4431,_0x3d5e0f=_0x41fe2e();while(!![]){try{const _0x363057=parseInt(_0x39982f(0xe3))/0x1+parseInt(_0x39982f(0x137))/0x2*(-parseInt(_0x39982f(0xec))/0x3)+-parseInt(_0x39982f(0x115))/0x4*(-parseInt(_0x39982f(0xb6))/0x5)+-parseInt(_0x39982f(0xea))/0x6+parseInt(_0x39982f(0x130))/0x7+parseInt(_0x39982f(0xc2))/0x8*(-parseInt(_0x39982f(0xfd))/0x9)+parseInt(_0x39982f(0xb7))/0xa*(-parseInt(_0x39982f(0x136))/0xb);if(_0x363057===_0x5421cf)break;else _0x3d5e0f['push'](_0x3d5e0f['shift']());}catch(_0x3013c4){_0x3d5e0f['push'](_0x3d5e0f['shift']());}}}(a209_0x5a31,0xbde4a));import{WorkflowApiClient}from'../client/workflow-client.js';import{SDKError,ErrorCode}from'../errors.js';function a209_0x4431(_0x2dd011,_0x117c07){_0x2dd011=_0x2dd011-0xb0;const _0x5a31c7=a209_0x5a31();let _0x44317d=_0x5a31c7[_0x2dd011];return _0x44317d;}import{MAX_PAGINATION_LIMIT}from'../util/paginate.js';async function paginateResults(_0x339904,_0x1d6bb1,_0x59c139=0x64){const _0x199f14=a209_0x4431,_0x53f5fb=Math[_0x199f14(0x11c)](_0x1d6bb1,MAX_PAGINATION_LIMIT),_0x37823e=[];let _0x4b56eb;while(_0x37823e[_0x199f14(0xda)]<_0x53f5fb){const _0x261588=await _0x339904(_0x59c139,_0x4b56eb),_0x5db92e=_0x261588[_0x199f14(0xd1)]??_0x261588[_0x199f14(0x11d)][_0x199f14(0xda)];if(_0x5db92e===0x0)break;_0x37823e[_0x199f14(0xde)](..._0x261588[_0x199f14(0x11d)]);if(!_0x261588[_0x199f14(0x119)]||_0x5db92e<_0x59c139)break;_0x4b56eb=_0x261588['lastId'];}return _0x37823e[_0x199f14(0xe5)](0x0,_0x53f5fb);}function a209_0x5a31(){const _0x2ebb80=['force','sessionUuid','retryParams','executeCloneProject','toISOString','resumeFrom','projects','listSchedules','attempts','limit','success','Invalid\x20workflow\x20format:\x20','mkdir','enableSchedule','skipValidation','from','sessionTime','9458211ZwAXNJ','getAttemptTasks','NUMERIC_ID_PATTERN','name','getWorkflow','timezone','231033VeYAMu','984068sSuLlX','util','updatedAt','replace','keys','No\x20','tasks','retryAt','client','3939340PXcmOQ','280sOjAdA','find','now','startAttempt','config','sessionId','attempt','tmpdir','Failed\x20to\x20download\x20log\x20file:\x20','tdx-workflow-push-','project','24fFCRbb','last_id','prepareCloneProject','resolveProjectId','Failed\x20to\x20set\x20secret','done','cancelRequested','map','setSecrets','endsWith','setSecret','latest','error','gunzip','sessions','rawCount','logs','killAttempt','fromTime','zlib','utf-8','deleteSecret','extract','finishedAt','length','exportParams','path','listSecrets','push','.\x20Expected\x20\x22project.workflow\x22','revision','isDirectory','projectName','38169gUryJw','Project\x20directory\x20not\x20found:\x20','slice','listAttempts','disableSchedule','uploadProjectArchive','join','316440yusiqQ','access','3AfVWtD','test','Kill\x20request\x20accepted','readdir','.tar.gz','logFiles','parentId','listSessions','bind','lastAttempt','pullProject','substring','listProjects','getAttempt','isGroup','getProjectWorkflow','unlink','799650OUvvZD','\x20workflow\x20files\x20found\x20in\x20project\x20directory','allSettled','clearSchedule','retryAttemptName','filter','direct','createdAt','scheduleFrom','tdx-workflow-','includeRetried','workflow','applyPullProject','INVALID_ARGUMENT','create','executePushProject','status','fullName','params','listLogFiles','WORKFLOW_PROJECT_NOT_FOUND','parseWorkflowId','getSchedule','stateParams','4URSpts','workflowName','retrySession','Project\x20not\x20found:\x20','lastId','indexOf','run','min','data','listProjectSchedules'];a209_0x5a31=function(){return _0x2ebb80;};return a209_0x5a31();}import{shouldIncludeInArchive,WORKFLOW_FILE_EXTENSION}from'./workflow-utils.js';import{pullWorkflow,applyPullResult}from'./pull-workflow.js';import{preparePushWorkflow,executePushWorkflow}from'./push-workflow.js';import{prepareCloneWorkflow,executeCloneWorkflow}from'./clone-workflow.js';export class WorkflowSDK{static [a209_0x5160b2(0x132)]=/^\d+$/;[a209_0x5160b2(0xb5)];constructor(_0x483f32){this['client']=new WorkflowApiClient(_0x483f32);}async[a209_0x5160b2(0xc5)](_0x421230){const _0x4dc29d=a209_0x5160b2;if(WorkflowSDK['NUMERIC_ID_PATTERN'][_0x4dc29d(0xed)](_0x421230)){const _0x950a49=await this[_0x4dc29d(0xb5)]['getProject'](_0x421230);return{'id':_0x950a49['id'],'name':_0x950a49[_0x4dc29d(0x133)]};}const _0x3cf5a4=await this[_0x4dc29d(0xb5)]['listProjects']({'name_pattern':_0x421230}),_0x1e8c2b=_0x3cf5a4[_0x4dc29d(0x11d)][_0x4dc29d(0xb8)](_0x2d9afb=>_0x2d9afb[_0x4dc29d(0x133)]===_0x421230);if(!_0x1e8c2b)throw new SDKError(ErrorCode['WORKFLOW_PROJECT_NOT_FOUND'],_0x4dc29d(0x118)+_0x421230);return{'id':_0x1e8c2b['id'],'name':_0x1e8c2b[_0x4dc29d(0x133)]};}async[a209_0x5160b2(0x125)](_0x11142d,_0x1fac48){const _0x654b31=a209_0x5160b2,_0x9f557b=_0x1fac48?.[_0x654b31(0x128)]||MAX_PAGINATION_LIMIT,_0x446129=await paginateResults((_0x284426,_0x3846a4)=>this[_0x654b31(0xb5)][_0x654b31(0xf8)]({'name_pattern':_0x11142d,'limit':_0x284426,'last_id':_0x3846a4??_0x1fac48?.[_0x654b31(0xc3)]}),_0x9f557b);return _0x446129[_0x654b31(0xc9)](_0x54f2df=>({..._0x54f2df,'project_id':_0x54f2df['id'],'project_name':_0x54f2df['name']}));}async['workflows'](_0x3b00f8,_0x32ed05){const _0x58ad8a=a209_0x5160b2,_0x57bcb0=_0x32ed05?.[_0x58ad8a(0x128)]||MAX_PAGINATION_LIMIT,_0x44d019=await paginateResults((_0x6a4d0,_0x2fb4f0)=>this[_0x58ad8a(0xb5)]['listWorkflows']({'project_name':_0x3b00f8,'limit':_0x6a4d0,'last_id':_0x2fb4f0??_0x32ed05?.[_0x58ad8a(0xc3)]}),_0x57bcb0);return _0x44d019[_0x58ad8a(0xc9)](_0x1a1619=>({'project_id':_0x1a1619[_0x58ad8a(0xc1)]?.['id'],'project_name':_0x1a1619[_0x58ad8a(0xc1)]?.[_0x58ad8a(0x133)],'workflow_id':_0x1a1619['id'],'workflow_name':_0x1a1619['name'],'revision':_0x1a1619[_0x58ad8a(0xe0)],'timezone':_0x1a1619[_0x58ad8a(0x135)],'config':_0x1a1619[_0x58ad8a(0xbb)],'id':_0x1a1619['id'],'name':_0x1a1619['name'],'project':_0x1a1619[_0x58ad8a(0xc1)]}));}async[a209_0x5160b2(0xd0)](_0x50a812){const _0x47eb59=a209_0x5160b2;let _0x548be7;if(_0x50a812?.['projectName']){let _0x449599,_0x3a07ba=![];while(!_0x3a07ba){const _0x2b0dee=await this['client'][_0x47eb59(0xf8)]({'limit':0x64,'last_id':_0x449599}),_0x4c3892=_0x2b0dee[_0x47eb59(0x11d)][_0x47eb59(0xb8)](_0xba2275=>_0xba2275['name']===_0x50a812[_0x47eb59(0xe2)]);if(_0x4c3892){_0x548be7=_0x4c3892['id'],_0x3a07ba=!![];break;}if(!_0x2b0dee[_0x47eb59(0x119)]||_0x2b0dee[_0x47eb59(0x11d)][_0x47eb59(0xda)]===0x0)break;_0x449599=_0x2b0dee[_0x47eb59(0x119)];}if(!_0x548be7)throw new SDKError(ErrorCode[_0x47eb59(0x111)],_0x47eb59(0x118)+_0x50a812[_0x47eb59(0xe2)]);}const _0x1d94fc=_0x50a812?.[_0x47eb59(0x128)]||0x64,_0x5f30e6=await paginateResults((_0x429501,_0x2d64bc)=>this['client'][_0x47eb59(0xf3)]({'project_id':_0x548be7,'project_name':_0x50a812?.[_0x47eb59(0xe2)],'workflow_name':_0x50a812?.[_0x47eb59(0x116)],'status':_0x50a812?.['status'],'from_time':_0x50a812?.[_0x47eb59(0xd4)],'to_time':_0x50a812?.['toTime'],'limit':_0x429501,'last_id':_0x2d64bc??_0x50a812?.[_0x47eb59(0xc3)]}),_0x1d94fc);return _0x5f30e6[_0x47eb59(0xc9)](_0x147fbd=>({'project_id':_0x147fbd['project']?.['id'],'project_name':_0x147fbd[_0x47eb59(0xc1)]?.[_0x47eb59(0x133)],'workflow_id':_0x147fbd[_0x47eb59(0x108)]?.['id'],'workflow_name':_0x147fbd[_0x47eb59(0x108)]?.['name'],'session_id':_0x147fbd['id'],'sessionUuid':_0x147fbd['sessionUuid'],'sessionTime':_0x147fbd[_0x47eb59(0x12f)],'lastAttempt':_0x147fbd[_0x47eb59(0xf5)],'id':_0x147fbd['id'],'project':_0x147fbd[_0x47eb59(0xc1)],'workflow':_0x147fbd['workflow']}));}async[a209_0x5160b2(0x127)](_0x5d8cac){const _0x15b52e=a209_0x5160b2,_0x3667dc=_0x5d8cac?.[_0x15b52e(0x128)]||0x64,_0x2c4eda=await paginateResults((_0x1f6335,_0x5dcb8a)=>this[_0x15b52e(0xb5)][_0x15b52e(0xe6)]({'project_name':_0x5d8cac?.['projectName'],'workflow_name':_0x5d8cac?.[_0x15b52e(0x116)],'include_retried':_0x5d8cac?.[_0x15b52e(0x107)],'limit':_0x1f6335,'last_id':_0x5dcb8a??_0x5d8cac?.[_0x15b52e(0xc3)]}),_0x3667dc);return _0x2c4eda[_0x15b52e(0xc9)](_0x5c5f04=>({'project_id':_0x5c5f04[_0x15b52e(0xc1)]?.['id'],'project_name':_0x5c5f04[_0x15b52e(0xc1)]?.[_0x15b52e(0x133)],'workflow_id':_0x5c5f04[_0x15b52e(0x108)]?.['id'],'workflow_name':_0x5c5f04[_0x15b52e(0x108)]?.['name'],'session_id':_0x5c5f04[_0x15b52e(0xbc)],'sessionUuid':_0x5c5f04[_0x15b52e(0x120)],'sessionTime':_0x5c5f04[_0x15b52e(0x12f)],'attempt_id':_0x5c5f04['id'],'attempt_index':_0x5c5f04['index'],'retryAttemptName':_0x5c5f04[_0x15b52e(0x101)],'done':_0x5c5f04[_0x15b52e(0xc7)],'success':_0x5c5f04[_0x15b52e(0x129)],'cancelRequested':_0x5c5f04[_0x15b52e(0xc8)],'params':_0x5c5f04[_0x15b52e(0x10f)],'createdAt':_0x5c5f04[_0x15b52e(0x104)],'finishedAt':_0x5c5f04[_0x15b52e(0xd9)],'id':_0x5c5f04['id'],'index':_0x5c5f04['index'],'project':_0x5c5f04[_0x15b52e(0xc1)],'workflow':_0x5c5f04[_0x15b52e(0x108)]}));}async[a209_0x5160b2(0xbd)](_0xb85df8){const _0xff1353=a209_0x5160b2,_0x2fe98e=await this[_0xff1353(0xb5)][_0xff1353(0xf9)](_0xb85df8);return _0x2fe98e;}async[a209_0x5160b2(0xb3)](_0x723f01,_0x45d1ca=![]){const _0x284e17=a209_0x5160b2,_0x3f8401=await this[_0x284e17(0xb5)][_0x284e17(0x131)](_0x723f01,_0x45d1ca);return _0x3f8401['map'](_0x13f4d1=>({'task_id':_0x13f4d1['id'],'task_name':_0x13f4d1['fullName'],'parentId':_0x13f4d1[_0x284e17(0xf2)],'config':_0x13f4d1[_0x284e17(0xbb)],'upstreams':_0x13f4d1['upstreams'],'state':_0x13f4d1['state'],'exportParams':_0x13f4d1[_0x284e17(0xdb)],'storeParams':_0x13f4d1['storeParams'],'stateParams':_0x13f4d1[_0x284e17(0x114)],'updatedAt':_0x13f4d1[_0x284e17(0x139)],'retryAt':_0x13f4d1[_0x284e17(0xb4)],'startedAt':_0x13f4d1['startedAt'],'error':_0x13f4d1[_0x284e17(0xce)],'isGroup':_0x13f4d1[_0x284e17(0xfa)],'id':_0x13f4d1['id'],'fullName':_0x13f4d1[_0x284e17(0x10e)]}));}async[a209_0x5160b2(0xf1)](_0x274b86,_0x61ce68){const _0x223765=a209_0x5160b2;return await this[_0x223765(0xb5)]['listLogFiles'](_0x274b86,_0x61ce68);}async[a209_0x5160b2(0xd2)](_0x597728,_0x5dd534){const _0xd7ecc=a209_0x5160b2,_0x454b9a=await import(_0xd7ecc(0xd5)),{promisify:_0x8e5a4f}=await import(_0xd7ecc(0x138)),_0x15200b=_0x8e5a4f(_0x454b9a[_0xd7ecc(0xcf)]),_0x44764e=await this[_0xd7ecc(0xb5)][_0xd7ecc(0x110)](_0x597728,_0x5dd534);if(_0x44764e[_0xd7ecc(0xda)]===0x0)return'';const _0x213341=[];for(const _0xc4166f of _0x44764e){if(!_0xc4166f[_0xd7ecc(0x103)])continue;const _0x147709=await fetch(_0xc4166f[_0xd7ecc(0x103)]);if(!_0x147709['ok'])throw new Error(_0xd7ecc(0xbf)+_0x147709[_0xd7ecc(0x10d)]);const _0x5b8357=Buffer[_0xd7ecc(0x12e)](await _0x147709['arrayBuffer']()),_0x2d48f2=await _0x15200b(_0x5b8357);_0x213341['push'](_0x2d48f2['toString'](_0xd7ecc(0xd6)));}return _0x213341[_0xd7ecc(0xe9)]('\x0a');}async['kill'](_0x85a31,_0x479727){const _0x12ebde=a209_0x5160b2,_0x44ddab=await this[_0x12ebde(0xb5)][_0x12ebde(0xd3)](_0x85a31,_0x479727);return _0x44ddab?.['message']??_0x12ebde(0xee);}async['retrySession'](_0xabffc5,_0x45ac90){const _0x178939=a209_0x5160b2,_0x2ba6df=await this['client'][_0x178939(0x117)](_0xabffc5,{'from_task':_0x45ac90?.['fromTask'],'retry_params':_0x45ac90?.['retryParams']});return{'attemptId':_0x2ba6df['id'],'sessionId':_0x2ba6df[_0x178939(0xbc)]};}async['retryAttempt'](_0x7b48ad,_0x519bf4){const _0x401d32=a209_0x5160b2,_0x1732ef=await this[_0x401d32(0xb5)]['retryAttempt'](_0x7b48ad,{'resume_from':_0x519bf4?.[_0x401d32(0x124)],'retry_params':_0x519bf4?.[_0x401d32(0x121)],'force':_0x519bf4?.[_0x401d32(0x11f)]});return{'attemptId':_0x1732ef['id'],'sessionId':_0x1732ef['sessionId']};}[a209_0x5160b2(0x112)](_0x38003b){const _0x485fa4=a209_0x5160b2,_0x4f1124=_0x38003b[_0x485fa4(0x11a)]('.');if(_0x4f1124===-0x1)throw new SDKError(ErrorCode[_0x485fa4(0x10a)],'Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format:\x20'+_0x38003b);const _0x324a37=_0x38003b[_0x485fa4(0xf7)](0x0,_0x4f1124),_0x10a229=_0x38003b[_0x485fa4(0xf7)](_0x4f1124+0x1);if(!_0x324a37||!_0x10a229)throw new SDKError(ErrorCode[_0x485fa4(0x10a)],_0x485fa4(0x12a)+_0x38003b+_0x485fa4(0xdf));return{'projectName':_0x324a37,'workflowName':_0x10a229};}async[a209_0x5160b2(0x11b)](_0x2bd964,_0x2667a2={},_0x5657df){const _0x350df5=a209_0x5160b2,{projectName:_0x4d17c9,workflowName:_0x4d1b98}=this['parseWorkflowId'](_0x2bd964),_0x5573a8=_0x5657df?.[_0x350df5(0x12f)]||new Date()['toISOString']();return await this[_0x350df5(0xb5)][_0x350df5(0xba)]({'projectName':_0x4d17c9,'workflowName':_0x4d1b98,'sessionTime':_0x5573a8,'params':_0x2667a2});}async[a209_0x5160b2(0x134)](_0x23f80b){const _0x57b7db=a209_0x5160b2,{projectName:_0x4d082e,workflowName:_0x5d86f4}=this[_0x57b7db(0x112)](_0x23f80b),{id:_0x45997d}=await this[_0x57b7db(0xc5)](_0x4d082e);return await this[_0x57b7db(0xb5)][_0x57b7db(0xfb)](_0x45997d,_0x5d86f4);}async['download'](_0x47d544,_0x4a071c,_0x3e3c55){const _0x12a1b1=a209_0x5160b2,{promises:_0x4c18e6}=await import('fs'),_0x2096c9=await import('path'),_0x374164=await import('os'),_0x41d10b=await import('tar'),{id:_0x10e1a3,name:_0x2b94eb}=await this['resolveProjectId'](_0x47d544),_0x5c3fd3=_0x374164['tmpdir'](),_0x3d909e=_0x2096c9[_0x12a1b1(0xe9)](_0x5c3fd3,_0x12a1b1(0x106)+_0x10e1a3+'-'+Date[_0x12a1b1(0xb9)]()+_0x12a1b1(0xf0));try{await this[_0x12a1b1(0xb5)]['downloadProjectArchive'](_0x10e1a3,_0x3d909e,_0x3e3c55?.[_0x12a1b1(0xe0)]);const _0x199e4e=_0x2096c9[_0x12a1b1(0xe9)](_0x4a071c,_0x2b94eb);await _0x4c18e6[_0x12a1b1(0x12b)](_0x199e4e,{'recursive':!![]}),await _0x41d10b[_0x12a1b1(0xd8)]({'file':_0x3d909e,'cwd':_0x199e4e,'gzip':!![]});const _0x428b6d=async _0xf011e0=>{const _0x3b4053=_0x12a1b1;let _0x3f94fb=0x0;const _0x215f25=await _0x4c18e6[_0x3b4053(0xef)](_0xf011e0,{'withFileTypes':!![]});for(const _0x1b79be of _0x215f25){const _0x48fe36=_0x2096c9[_0x3b4053(0xe9)](_0xf011e0,_0x1b79be[_0x3b4053(0x133)]);if(_0x1b79be['isFile']())_0x3f94fb++;else _0x1b79be[_0x3b4053(0xe1)]()&&(_0x3f94fb+=await _0x428b6d(_0x48fe36));}return _0x3f94fb;},_0x3166e7=await _0x428b6d(_0x199e4e);return{'projectName':_0x2b94eb,'revision':_0x3e3c55?.[_0x12a1b1(0xe0)]||_0x12a1b1(0xcd),'filesExtracted':_0x3166e7};}finally{try{await _0x4c18e6[_0x12a1b1(0xfc)](_0x3d909e);}catch{}}}async[a209_0x5160b2(0xde)](_0x2c2626,_0x36f450){const _0x141eb5=a209_0x5160b2,{promises:_0x2b55ed}=await import('fs'),_0x98e56e=await import(_0x141eb5(0xdc)),_0x12eca4=await import('tar'),_0x4c0ea1=_0x36f450?.[_0x141eb5(0xe2)]||_0x98e56e['basename'](_0x2c2626),_0x5c59b2=_0x36f450?.[_0x141eb5(0xe0)]||new Date()[_0x141eb5(0x123)]()[_0x141eb5(0xb0)](/[:.]/g,'-');try{await _0x2b55ed['access'](_0x2c2626);}catch{throw new Error(_0x141eb5(0xe4)+_0x2c2626);}if(!_0x36f450?.[_0x141eb5(0x12d)]){const _0x55e8c1=await _0x2b55ed[_0x141eb5(0xef)](_0x2c2626),_0x1900a4=_0x55e8c1['filter'](_0x16e3db=>_0x16e3db[_0x141eb5(0xcb)](WORKFLOW_FILE_EXTENSION));if(_0x1900a4[_0x141eb5(0xda)]===0x0)throw new Error(_0x141eb5(0xb2)+WORKFLOW_FILE_EXTENSION+_0x141eb5(0xfe));for(const _0x32058e of _0x1900a4){const _0x5953eb=_0x98e56e[_0x141eb5(0xe9)](_0x2c2626,_0x32058e);try{await _0x2b55ed[_0x141eb5(0xeb)](_0x5953eb);}catch{throw new Error('Cannot\x20read\x20workflow\x20file:\x20'+_0x32058e);}}}const _0x3473b8=async(_0x3051f2,_0x128d33='')=>{const _0x49d195=_0x141eb5,_0xa9a5e2=await _0x2b55ed[_0x49d195(0xef)](_0x3051f2,{'withFileTypes':!![]}),_0x5a2a8c=[];for(const _0x1d650d of _0xa9a5e2){const _0x426015=_0x98e56e[_0x49d195(0xe9)](_0x128d33,_0x1d650d['name']),_0x267443=_0x98e56e[_0x49d195(0xe9)](_0x3051f2,_0x1d650d[_0x49d195(0x133)]);if(!shouldIncludeInArchive(_0x1d650d[_0x49d195(0x133)]))continue;_0x1d650d[_0x49d195(0xe1)]()?_0x5a2a8c['push'](...await _0x3473b8(_0x267443,_0x426015)):_0x5a2a8c[_0x49d195(0xde)](_0x426015);}return _0x5a2a8c;},_0x3ab9a5=await _0x3473b8(_0x2c2626),_0x178ab9=await import('os'),_0x26bb4e=_0x178ab9[_0x141eb5(0xbe)](),_0x8448ae=_0x98e56e[_0x141eb5(0xe9)](_0x26bb4e,_0x141eb5(0xc0)+Date[_0x141eb5(0xb9)]()+_0x141eb5(0xf0));try{await _0x12eca4[_0x141eb5(0x10b)]({'file':_0x8448ae,'gzip':!![],'cwd':_0x2c2626,'portable':!![]},_0x3ab9a5);const _0x33568b=await this[_0x141eb5(0xb5)][_0x141eb5(0xe8)](_0x4c0ea1,_0x5c59b2,_0x8448ae,{'scheduleFrom':_0x36f450?.[_0x141eb5(0x105)],'clearSchedule':_0x36f450?.[_0x141eb5(0x100)],'clearScheduleAll':_0x36f450?.['clearScheduleAll']});return{'projectId':_0x33568b['id'],'projectName':_0x33568b['name'],'revision':_0x33568b[_0x141eb5(0xe0)]};}finally{try{await _0x2b55ed[_0x141eb5(0xfc)](_0x8448ae);}catch{}}}async['delete'](_0x363ed8){const _0x52fe6e=a209_0x5160b2,{id:_0x29a4a1}=await this[_0x52fe6e(0xc5)](_0x363ed8),_0x316e6d=await this[_0x52fe6e(0xb5)]['deleteProject'](_0x29a4a1);return{'projectId':_0x316e6d['id'],'projectName':_0x316e6d['name']};}async['listSecrets'](_0x53bc25){const _0xb2796a=a209_0x5160b2,{id:_0x30d509,name:_0xb16eb1}=await this[_0xb2796a(0xc5)](_0x53bc25),_0x319dec=await this[_0xb2796a(0xb5)][_0xb2796a(0xdd)](_0x30d509);return{'projectName':_0xb16eb1,'secrets':_0x319dec};}async[a209_0x5160b2(0xcc)](_0x1fbaf8,_0x3b0799,_0x3344ee){const _0x2a376b=a209_0x5160b2,{id:_0x6f72c,name:_0x36df27}=await this[_0x2a376b(0xc5)](_0x1fbaf8);return await this['client'][_0x2a376b(0xcc)](_0x6f72c,_0x3b0799,_0x3344ee),{'projectName':_0x36df27,'key':_0x3b0799};}async[a209_0x5160b2(0xca)](_0x27dcbc,_0x1c7adc){const _0x4b852c=a209_0x5160b2,{id:_0x4cf584,name:_0x5f0106}=await this[_0x4b852c(0xc5)](_0x27dcbc),_0xcf55bf=Object[_0x4b852c(0xb1)](_0x1c7adc),_0x1cf4d6=await Promise[_0x4b852c(0xff)](_0xcf55bf[_0x4b852c(0xc9)](_0x158602=>this[_0x4b852c(0xb5)][_0x4b852c(0xcc)](_0x4cf584,_0x158602,_0x1c7adc[_0x158602]))),_0x36697c=_0x1cf4d6[_0x4b852c(0xc9)]((_0x587c3a,_0x5c5812)=>_0x587c3a['status']==='rejected'?_0xcf55bf[_0x5c5812]:null)[_0x4b852c(0x102)](_0x178fd9=>_0x178fd9!==null);if(_0x36697c[_0x4b852c(0xda)]>0x0)throw new SDKError(ErrorCode['WORKFLOW_SECRET_SET_FAILED'],_0x4b852c(0xc6)+(_0x36697c[_0x4b852c(0xda)]>0x1?'s':'')+':\x20'+_0x36697c[_0x4b852c(0xe9)](',\x20'));return{'projectName':_0x5f0106,'keys':_0xcf55bf};}async['deleteSecret'](_0x53829b,_0x1f4557){const _0x54b77d=a209_0x5160b2,{id:_0x42ac5f,name:_0x5d40b3}=await this[_0x54b77d(0xc5)](_0x53829b);return await this['client'][_0x54b77d(0xd7)](_0x42ac5f,_0x1f4557),{'projectName':_0x5d40b3,'key':_0x1f4557};}async[a209_0x5160b2(0xf6)](_0x2ccc15,_0x34ff8a){const _0x28ccf5=a209_0x5160b2;return pullWorkflow({'client':this[_0x28ccf5(0xb5)],'resolveProjectId':this[_0x28ccf5(0xc5)][_0x28ccf5(0xf4)](this)},_0x2ccc15,_0x34ff8a);}async[a209_0x5160b2(0x109)](_0x2ba46d,_0x5629f){const _0x238bd3=a209_0x5160b2;return applyPullResult({'client':this[_0x238bd3(0xb5)],'resolveProjectId':this['resolveProjectId'][_0x238bd3(0xf4)](this)},_0x2ba46d,_0x5629f);}async['preparePushProject'](_0x507de5){const _0x3d039b=a209_0x5160b2;return preparePushWorkflow({'client':this[_0x3d039b(0xb5)],'resolveProjectId':this[_0x3d039b(0xc5)][_0x3d039b(0xf4)](this)},_0x507de5);}async[a209_0x5160b2(0x10c)](_0x30c917){const _0xbe93ef=a209_0x5160b2;return executePushWorkflow({'client':this['client'],'resolveProjectId':this[_0xbe93ef(0xc5)][_0xbe93ef(0xf4)](this)},_0x30c917);}async[a209_0x5160b2(0xc4)](_0x347236,_0x4642f6,_0x1d3489){const _0x555edb=a209_0x5160b2;return prepareCloneWorkflow({'client':this[_0x555edb(0xb5)]},_0x347236,_0x4642f6,_0x1d3489);}async[a209_0x5160b2(0x122)](_0x5997c1){const _0x318f35=a209_0x5160b2;return executeCloneWorkflow({'client':this[_0x318f35(0xb5)]},_0x5997c1);}async['listSchedules'](_0x380bc5){const _0x3bee94=a209_0x5160b2,_0x3fea00=Math[_0x3bee94(0x11c)](Number(_0x380bc5?.[_0x3bee94(0x128)])||MAX_PAGINATION_LIMIT,MAX_PAGINATION_LIMIT);return await this[_0x3bee94(0xb5)][_0x3bee94(0x126)]({'limit':_0x3fea00});}async[a209_0x5160b2(0x11e)](_0x5912a4,_0x251383){const _0x526b77=a209_0x5160b2,{id:_0x1cd1c8}=await this['resolveProjectId'](_0x5912a4),_0x37eaec=Math[_0x526b77(0x11c)](Number(_0x251383?.['limit'])||MAX_PAGINATION_LIMIT,MAX_PAGINATION_LIMIT);return await this[_0x526b77(0xb5)][_0x526b77(0x11e)](_0x1cd1c8,{'workflow':_0x251383?.[_0x526b77(0x108)],'limit':_0x37eaec});}async[a209_0x5160b2(0x113)](_0x5a309c){const _0x82f110=a209_0x5160b2;return await this[_0x82f110(0xb5)][_0x82f110(0x113)](_0x5a309c);}async[a209_0x5160b2(0x12c)](_0x5a3a60,_0x1fe6f8){const _0x4a0b0d=a209_0x5160b2;return await this[_0x4a0b0d(0xb5)][_0x4a0b0d(0x12c)](_0x5a3a60,_0x1fe6f8);}async['disableSchedule'](_0x1cc4dd){const _0x2c8ac0=a209_0x5160b2;return await this['client'][_0x2c8ac0(0xe7)](_0x1cc4dd);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a210_0x279a(_0x104092,_0x24f744){_0x104092=_0x104092-0x96;const _0x198c8d=a210_0x198c();let _0x279aa3=_0x198c8d[_0x104092];return _0x279aa3;}(function(_0x387662,_0x511f28){const _0x44758a=a210_0x279a,_0x500060=_0x387662();while(!![]){try{const _0x195a5f=-parseInt(_0x44758a(0xc6))/0x1+parseInt(_0x44758a(0xcd))/0x2+-parseInt(_0x44758a(0xaf))/0x3+-parseInt(_0x44758a(0xce))/0x4*(-parseInt(_0x44758a(0xb0))/0x5)+-parseInt(_0x44758a(0x99))/0x6+-parseInt(_0x44758a(0x9d))/0x7*(-parseInt(_0x44758a(0xac))/0x8)+parseInt(_0x44758a(0xab))/0x9*(parseInt(_0x44758a(0xbf))/0xa);if(_0x195a5f===_0x511f28)break;else _0x500060['push'](_0x500060['shift']());}catch(_0x1af9cb){_0x500060['push'](_0x500060['shift']());}}}(a210_0x198c,0x1cd72));import{existsSync,promises as a210_0x5b02c0}from'fs';import a210_0x4be5fd from'path';import a210_0x447cae from'os';import{generateDiff,formatDiffWithColors,hasChanges}from'../../utils/diff.js';import{getWorkflowProjectDir,createWorkflowTdxConfigContent,updateWorkflowTdxConfig}from'./tdx-config.js';import{SDKError,ErrorCode}from'../errors.js';function a210_0x198c(){const _0x3435a7=['utf-8','length','1283514bUDHNN','name','WORKFLOW_ARCHIVE_CORRUPTED','isNewProject','133KRygZu','filter','message','The\x20archive\x20may\x20be\x20truncated\x20or\x20corrupted.\x20Try\x20pushing\x20a\x20new\x20revision\x20or\x20contact\x20support.','changes','tar','writeFile','join','path','modified','archive.tar.gz','add','latest','downloadProjectArchive','2169FUxsUh','9320AzPvLq','targetDir','deleted','386841fbDQqm','265YRprKP','projectId','readdir','mkdtemp','\x20(archive\x20size:\x20','toISOString','new','Failed\x20to\x20extract\x20project\x20archive','stat','localeCompare','unlink','\x20bytes)','The\x20archive\x20passed\x20initial\x20validation\x20but\x20extraction\x20failed.\x20','baseDir','extract','15230yQNXBj','getProject','zlib','mkdir','revision','projectName','TAR_BAD_ARCHIVE','175727AYxfIT','tdx.json','includes','tdx-wf-pull-','size','push','catch','450146mmMAcK','1696XXZJlL','isDirectory','type','tmpdir','readFile','unchanged'];a210_0x198c=function(){return _0x3435a7;};return a210_0x198c();}export async function pullWorkflow(_0x17063a,_0x18875b,_0x256e0a={}){const _0x149d58=a210_0x279a,_0x526b6f=await import(_0x149d58(0xa2)),{client:_0x330b2f,resolveProjectId:_0x1a8618}=_0x17063a,{id:_0x8ee15d,name:_0x220cc9}=await _0x1a8618(_0x18875b),_0x5a2536=_0x256e0a[_0x149d58(0xbd)]||process['cwd'](),_0x568aa8=_0x256e0a[_0x149d58(0xad)]||getWorkflowProjectDir(_0x220cc9,_0x5a2536),_0x3d7f11=a210_0x4be5fd[_0x149d58(0xa4)](_0x568aa8,'tdx.json'),_0x154eb7=!existsSync(_0x3d7f11),_0x13cd15=await a210_0x5b02c0[_0x149d58(0xb3)](a210_0x4be5fd[_0x149d58(0xa4)](a210_0x447cae[_0x149d58(0xd1)](),_0x149d58(0xc9))),_0xdcc081=a210_0x4be5fd['join'](_0x13cd15,_0x149d58(0xa7)),_0x562eb6=a210_0x4be5fd[_0x149d58(0xa4)](_0x13cd15,'extracted');try{await _0x330b2f[_0x149d58(0xaa)](_0x8ee15d,_0xdcc081,_0x256e0a[_0x149d58(0xc3)]),await a210_0x5b02c0[_0x149d58(0xc2)](_0x562eb6,{'recursive':!![]});try{await _0x526b6f[_0x149d58(0xbe)]({'file':_0xdcc081,'cwd':_0x562eb6,'gzip':!![]});}catch(_0x5471ab){const _0x2ffc9f=_0x5471ab instanceof Error?_0x5471ab[_0x149d58(0x9f)]:String(_0x5471ab);if(_0x2ffc9f[_0x149d58(0xc8)](_0x149d58(0xc5))||_0x2ffc9f[_0x149d58(0xc8)]('zlib')){const _0x345086=await a210_0x5b02c0[_0x149d58(0xb8)](_0xdcc081)[_0x149d58(0xcc)](()=>null),_0x4dac60=_0x345086?_0x149d58(0xb4)+_0x345086['size']+_0x149d58(0xbb):'';throw new SDKError(ErrorCode['WORKFLOW_ARCHIVE_CORRUPTED'],_0x149d58(0xb7)+_0x4dac60+':\x20'+_0x2ffc9f,_0x5471ab,{'helpText':'The\x20archive\x20passed\x20initial\x20validation\x20but\x20extraction\x20failed.\x20'+_0x149d58(0xa0)});}throw _0x5471ab;}const _0x3dbd2d=await _0x330b2f[_0x149d58(0xc0)](_0x8ee15d),_0x5e8343=_0x256e0a[_0x149d58(0xc3)]||_0x3dbd2d[_0x149d58(0xc3)]||_0x149d58(0xa9),_0x43e8a3=await calculateChanges(_0x568aa8,_0x562eb6,_0x154eb7),_0x46d97b={'new':_0x43e8a3['filter'](_0xbbf7b8=>_0xbbf7b8[_0x149d58(0xd0)]===_0x149d58(0xb6))[_0x149d58(0x98)],'modified':_0x43e8a3['filter'](_0x356940=>_0x356940[_0x149d58(0xd0)]===_0x149d58(0xa6))[_0x149d58(0x98)],'deleted':_0x43e8a3[_0x149d58(0x9e)](_0x1d1bc5=>_0x1d1bc5['type']===_0x149d58(0xae))[_0x149d58(0x98)],'unchanged':_0x43e8a3[_0x149d58(0x9e)](_0x3e8bc5=>_0x3e8bc5[_0x149d58(0xd0)]===_0x149d58(0x96))['length']};return{'projectName':_0x220cc9,'projectId':_0x8ee15d,'revision':_0x5e8343,'targetDir':_0x568aa8,'changes':_0x43e8a3,'summary':_0x46d97b,'hasChanges':_0x46d97b['new']>0x0||_0x46d97b[_0x149d58(0xa6)]>0x0||_0x46d97b[_0x149d58(0xae)]>0x0,'isNewProject':_0x154eb7};}finally{await a210_0x5b02c0['rm'](_0x13cd15,{'recursive':!![],'force':!![]});}}export async function applyPullResult(_0x5c6a40,_0x533ab8,_0x1fc118={}){const _0x1f4611=a210_0x279a,_0x45607c=await import(_0x1f4611(0xa2)),{client:_0x20bda7}=_0x5c6a40,_0x56a95f=await a210_0x5b02c0[_0x1f4611(0xb3)](a210_0x4be5fd[_0x1f4611(0xa4)](a210_0x447cae[_0x1f4611(0xd1)](),'tdx-wf-apply-')),_0x3ea552=a210_0x4be5fd[_0x1f4611(0xa4)](_0x56a95f,'archive.tar.gz');try{await _0x20bda7[_0x1f4611(0xaa)](_0x533ab8['projectId'],_0x3ea552,_0x1fc118[_0x1f4611(0xc3)]),await a210_0x5b02c0[_0x1f4611(0xc2)](_0x533ab8[_0x1f4611(0xad)],{'recursive':!![]});for(const _0x9aad40 of _0x533ab8[_0x1f4611(0xa1)]){if(_0x9aad40['type']==='deleted'){const _0x4d73e6=a210_0x4be5fd[_0x1f4611(0xa4)](_0x533ab8[_0x1f4611(0xad)],_0x9aad40[_0x1f4611(0xa5)]);await a210_0x5b02c0[_0x1f4611(0xba)](_0x4d73e6)[_0x1f4611(0xcc)](()=>{});}}try{await _0x45607c[_0x1f4611(0xbe)]({'file':_0x3ea552,'cwd':_0x533ab8['targetDir'],'gzip':!![]});}catch(_0x5dbc3c){const _0x5cdbf0=_0x5dbc3c instanceof Error?_0x5dbc3c[_0x1f4611(0x9f)]:String(_0x5dbc3c);if(_0x5cdbf0[_0x1f4611(0xc8)]('TAR_BAD_ARCHIVE')||_0x5cdbf0[_0x1f4611(0xc8)](_0x1f4611(0xc1))){const _0x2d5bb1=await a210_0x5b02c0[_0x1f4611(0xb8)](_0x3ea552)[_0x1f4611(0xcc)](()=>null),_0x26e373=_0x2d5bb1?_0x1f4611(0xb4)+_0x2d5bb1[_0x1f4611(0xca)]+_0x1f4611(0xbb):'';throw new SDKError(ErrorCode[_0x1f4611(0x9b)],'Failed\x20to\x20extract\x20project\x20archive'+_0x26e373+':\x20'+_0x5cdbf0,_0x5dbc3c,{'helpText':_0x1f4611(0xbc)+_0x1f4611(0xa0)});}throw _0x5dbc3c;}const _0x450fff=a210_0x4be5fd[_0x1f4611(0xa4)](_0x533ab8['targetDir'],_0x1f4611(0xc7));if(_0x533ab8[_0x1f4611(0x9c)]){const _0x24a15f=createWorkflowTdxConfigContent(_0x533ab8[_0x1f4611(0xc4)],_0x533ab8[_0x1f4611(0xb1)],_0x533ab8['revision']);await a210_0x5b02c0[_0x1f4611(0xa3)](_0x450fff,_0x24a15f,'utf-8');}else updateWorkflowTdxConfig(_0x450fff,{'last_pulled_revision':_0x533ab8[_0x1f4611(0xc3)],'last_pulled_at':new Date()[_0x1f4611(0xb5)]()});}finally{await a210_0x5b02c0['rm'](_0x56a95f,{'recursive':!![],'force':!![]});}}async function calculateChanges(_0x1ffd93,_0x43108b,_0x3a360c){const _0x32d480=a210_0x279a,_0x25f00a=[],_0x38d8f3=await getAllFiles(_0x43108b),_0x8dc9b9=existsSync(_0x1ffd93)?await getAllFiles(_0x1ffd93):new Set();for(const _0x850396 of _0x38d8f3){const _0x5e1aa5=a210_0x4be5fd[_0x32d480(0xa4)](_0x1ffd93,_0x850396),_0xea3081=a210_0x4be5fd[_0x32d480(0xa4)](_0x43108b,_0x850396);if(_0x850396===_0x32d480(0xc7))continue;const _0x2920aa=await a210_0x5b02c0[_0x32d480(0xd2)](_0xea3081,'utf-8')['catch'](()=>null);if(_0x2920aa===null)continue;if(!existsSync(_0x5e1aa5)||_0x3a360c)_0x25f00a['push']({'path':_0x850396,'type':_0x32d480(0xb6),'newContent':_0x2920aa});else{const _0x3b41c5=await a210_0x5b02c0[_0x32d480(0xd2)](_0x5e1aa5,_0x32d480(0x97))[_0x32d480(0xcc)](()=>null);if(_0x3b41c5===null)_0x25f00a['push']({'path':_0x850396,'type':'modified','newContent':_0x2920aa});else{if(_0x3b41c5!==_0x2920aa){const _0x3d284d=generateDiff(_0x3b41c5,_0x2920aa),_0x43f956=hasChanges(_0x3d284d)?formatDiffWithColors(_0x3d284d):undefined;_0x25f00a['push']({'path':_0x850396,'type':_0x32d480(0xa6),'oldContent':_0x3b41c5,'newContent':_0x2920aa,'diff':_0x43f956});}else _0x25f00a[_0x32d480(0xcb)]({'path':_0x850396,'type':_0x32d480(0x96)});}}}if(!_0x3a360c)for(const _0x14632d of _0x8dc9b9){if(_0x14632d===_0x32d480(0xc7))continue;if(!_0x38d8f3['has'](_0x14632d)){const _0x58ae8a=a210_0x4be5fd[_0x32d480(0xa4)](_0x1ffd93,_0x14632d),_0x332d00=await a210_0x5b02c0[_0x32d480(0xd2)](_0x58ae8a,_0x32d480(0x97))[_0x32d480(0xcc)](()=>undefined);_0x25f00a[_0x32d480(0xcb)]({'path':_0x14632d,'type':'deleted','oldContent':_0x332d00});}}return _0x25f00a['sort']((_0x6fe075,_0x1b3333)=>_0x6fe075[_0x32d480(0xa5)][_0x32d480(0xb9)](_0x1b3333[_0x32d480(0xa5)])),_0x25f00a;}async function getAllFiles(_0x156b76,_0x397649=''){const _0x4c3451=a210_0x279a,_0x173569=new Set();if(!existsSync(_0x156b76))return _0x173569;const _0x34afbb=await a210_0x5b02c0[_0x4c3451(0xb2)](_0x156b76,{'withFileTypes':!![]});for(const _0x271be0 of _0x34afbb){const _0x3247d9=_0x397649?a210_0x4be5fd[_0x4c3451(0xa4)](_0x397649,_0x271be0[_0x4c3451(0x9a)]):_0x271be0[_0x4c3451(0x9a)];if(_0x271be0[_0x4c3451(0xcf)]()){const _0x15b289=await getAllFiles(a210_0x4be5fd[_0x4c3451(0xa4)](_0x156b76,_0x271be0[_0x4c3451(0x9a)]),_0x3247d9);for(const _0xa9babb of _0x15b289){_0x173569['add'](_0xa9babb);}}else _0x173569[_0x4c3451(0xa8)](_0x3247d9);}return _0x173569;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a211_0x360f(_0x354421,_0x4d8c66){_0x354421=_0x354421-0x1b8;const _0x156d6e=a211_0x156d();let _0x360fe3=_0x156d6e[_0x354421];return _0x360fe3;}(function(_0x2330ae,_0x46e42e){const _0x43ac98=a211_0x360f,_0x478b2c=_0x2330ae();while(!![]){try{const _0x58cc48=parseInt(_0x43ac98(0x1f7))/0x1+-parseInt(_0x43ac98(0x1ea))/0x2*(parseInt(_0x43ac98(0x1cf))/0x3)+parseInt(_0x43ac98(0x1f3))/0x4*(-parseInt(_0x43ac98(0x1df))/0x5)+-parseInt(_0x43ac98(0x1d8))/0x6*(parseInt(_0x43ac98(0x1c5))/0x7)+parseInt(_0x43ac98(0x1c8))/0x8+-parseInt(_0x43ac98(0x1e7))/0x9+parseInt(_0x43ac98(0x1ca))/0xa;if(_0x58cc48===_0x46e42e)break;else _0x478b2c['push'](_0x478b2c['shift']());}catch(_0x59fbed){_0x478b2c['push'](_0x478b2c['shift']());}}}(a211_0x156d,0x4bb2a));import{promises as a211_0x1c74ec}from'fs';import a211_0x5b6e1c from'path';import a211_0x1efc52 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(_0x5340c3,_0x201324={}){const _0xd84174=a211_0x360f,_0x345b55=await import(_0xd84174(0x1c4)),{client:_0x2215e3,resolveProjectId:_0x19b9fe}=_0x5340c3,_0x1e450b=_0x201324[_0xd84174(0x1d6)]||process['cwd'](),_0x2abe47=findWorkflowTdxConfig(_0x1e450b),{config:_0x4c7d4e,configDir:_0x335361}=_0x2abe47;let _0x5efed9,_0x222a96=_0x4c7d4e[_0xd84174(0x1ed)];try{const _0x4b2fe4=await _0x19b9fe(_0x4c7d4e[_0xd84174(0x1ed)]);_0x5efed9=_0x4b2fe4['id'],_0x222a96=_0x4b2fe4[_0xd84174(0x1bc)];}catch{_0x5efed9='';}const _0x521363=_0x201324[_0xd84174(0x1dd)]||new Date()[_0xd84174(0x1c6)]()['replace'](/[:.]/g,'-');if(!_0x201324[_0xd84174(0x1c0)]){const _0x5375a8=await a211_0x1c74ec['readdir'](_0x335361),_0x15df6c=_0x5375a8['filter'](_0x2b2fde=>_0x2b2fde['endsWith'](WORKFLOW_FILE_EXTENSION));if(_0x15df6c[_0xd84174(0x1d1)]===0x0)throw new Error(_0xd84174(0x1d3)+WORKFLOW_FILE_EXTENSION+_0xd84174(0x1cc)+_0x335361);}const _0x543cb8=await getProjectFiles(_0x335361);let _0x18c785;if(_0x5efed9){const _0x557765=await a211_0x1c74ec[_0xd84174(0x1ce)](a211_0x5b6e1c[_0xd84174(0x1cb)](a211_0x1efc52[_0xd84174(0x1bd)](),'tdx-wf-push-')),_0x8457b6=a211_0x5b6e1c['join'](_0x557765,'archive.tar.gz'),_0xdb2750=a211_0x5b6e1c[_0xd84174(0x1cb)](_0x557765,_0xd84174(0x1e3));try{await _0x2215e3[_0xd84174(0x1de)](_0x5efed9,_0x8457b6),await a211_0x1c74ec[_0xd84174(0x1ec)](_0xdb2750,{'recursive':!![]});try{await _0x345b55[_0xd84174(0x1c7)]({'file':_0x8457b6,'cwd':_0xdb2750,'gzip':!![]});}catch(_0x5c13ee){const _0x3af045=_0x5c13ee instanceof Error?_0x5c13ee[_0xd84174(0x1bb)]:String(_0x5c13ee);if(_0x3af045['includes'](_0xd84174(0x1db))||_0x3af045['includes'](_0xd84174(0x1c3))){const _0x3e7c57=await a211_0x1c74ec[_0xd84174(0x1d9)](_0x8457b6)[_0xd84174(0x1f1)](()=>null),_0x238839=_0x3e7c57?_0xd84174(0x1f2)+_0x3e7c57[_0xd84174(0x1e6)]+_0xd84174(0x1e4):'';throw new SDKError(ErrorCode[_0xd84174(0x1e5)],_0xd84174(0x1ee)+_0x238839+':\x20'+_0x3af045,_0x5c13ee,{'helpText':'Use\x20\x27tdx\x20wf\x20upload\x27\x20to\x20force\x20push\x20without\x20comparison.'});}throw _0x5c13ee;}_0x18c785=await calculatePushChanges(_0x335361,_0xdb2750,_0x543cb8);}finally{await a211_0x1c74ec['rm'](_0x557765,{'recursive':!![],'force':!![]});}}else{_0x18c785=[];for(const _0x2d556b of _0x543cb8){const _0x3afd38=a211_0x5b6e1c['join'](_0x335361,_0x2d556b),_0xf46dff=await a211_0x1c74ec[_0xd84174(0x1e0)](_0x3afd38,_0xd84174(0x1e8))[_0xd84174(0x1f1)](()=>null);_0x18c785[_0xd84174(0x1ef)]({'path':_0x2d556b,'type':'new','newContent':_0xf46dff||undefined});}}const _0x9c2ce5={'new':_0x18c785[_0xd84174(0x1d5)](_0x5e7c0b=>_0x5e7c0b[_0xd84174(0x1d4)]===_0xd84174(0x1ba))[_0xd84174(0x1d1)],'modified':_0x18c785[_0xd84174(0x1d5)](_0x3145c5=>_0x3145c5[_0xd84174(0x1d4)]==='modified')[_0xd84174(0x1d1)],'deleted':_0x18c785[_0xd84174(0x1d5)](_0x563daa=>_0x563daa['type']==='deleted')[_0xd84174(0x1d1)],'unchanged':_0x18c785['filter'](_0x4201fd=>_0x4201fd['type']===_0xd84174(0x1c1))[_0xd84174(0x1d1)]};return{'projectName':_0x222a96,'projectId':_0x5efed9,'revision':_0x521363,'sourceDir':_0x335361,'changes':_0x18c785,'summary':_0x9c2ce5,'hasChanges':_0x9c2ce5[_0xd84174(0x1ba)]>0x0||_0x9c2ce5[_0xd84174(0x1f4)]>0x0||_0x9c2ce5[_0xd84174(0x1eb)]>0x0,'configResult':_0x2abe47,'skipSchedule':_0x201324[_0xd84174(0x1da)]};}export async function executePushWorkflow(_0x29f304,_0x20312c){const _0xac5f71=a211_0x360f,_0x2b1dc7=await import(_0xac5f71(0x1c4)),{client:_0x469b01}=_0x29f304,_0x25f88c=await getProjectFiles(_0x20312c[_0xac5f71(0x1d6)]),_0x3c687a=await a211_0x1c74ec[_0xac5f71(0x1ce)](a211_0x5b6e1c[_0xac5f71(0x1cb)](a211_0x1efc52[_0xac5f71(0x1bd)](),_0xac5f71(0x1be))),_0x58c283=a211_0x5b6e1c['join'](_0x3c687a,_0xac5f71(0x1f0));try{await _0x2b1dc7[_0xac5f71(0x1c9)]({'file':_0x58c283,'gzip':!![],'cwd':_0x20312c[_0xac5f71(0x1d6)],'portable':!![]},_0x25f88c);const _0x60ac10=await _0x469b01[_0xac5f71(0x1f5)](_0x20312c[_0xac5f71(0x1cd)],_0x20312c['revision'],_0x58c283,{'skipSchedule':_0x20312c[_0xac5f71(0x1da)]});return updateWorkflowTdxConfig(_0x20312c[_0xac5f71(0x1c2)]['configPath'],{'workflow_project_id':_0x60ac10['id'],'last_pushed_revision':_0x60ac10[_0xac5f71(0x1dd)],'last_pushed_at':new Date()[_0xac5f71(0x1c6)]()}),{'projectId':_0x60ac10['id'],'projectName':_0x60ac10[_0xac5f71(0x1bc)],'revision':_0x60ac10[_0xac5f71(0x1dd)]};}finally{await a211_0x1c74ec['rm'](_0x3c687a,{'recursive':!![],'force':!![]});}}async function getProjectFiles(_0x2b70eb,_0x361f90=_0x2b70eb,_0x2ad647='',_0x8735ea=null){const _0x48aa59=a211_0x360f,_0x9d03c4=[];if(_0x8735ea===null){_0x8735ea=createIgnoreInstance();const _0x5b8197=await loadDigdagignore(_0x2b70eb);_0x5b8197&&_0x8735ea[_0x48aa59(0x1e1)](_0x5b8197);}if(_0x2ad647!==''){const _0xb50fb5=await loadDigdagignore(_0x361f90);_0xb50fb5&&addScopedPatterns(_0x8735ea,_0xb50fb5,_0x2ad647);}const _0x47e8ff=await a211_0x1c74ec[_0x48aa59(0x1f6)](_0x361f90,{'withFileTypes':!![]});for(const _0x3dbb53 of _0x47e8ff){const _0x49f9b6=_0x2ad647?a211_0x5b6e1c[_0x48aa59(0x1e2)][_0x48aa59(0x1cb)](_0x2ad647,_0x3dbb53[_0x48aa59(0x1bc)]):_0x3dbb53[_0x48aa59(0x1bc)];if(_0x3dbb53[_0x48aa59(0x1bc)]===_0x48aa59(0x1d2))continue;if(_0x3dbb53['name']===_0x48aa59(0x1d0))continue;if(!shouldIncludeInArchive(_0x3dbb53[_0x48aa59(0x1bc)]))continue;if(shouldIgnoreWithInstance(_0x8735ea,_0x49f9b6,_0x3dbb53[_0x48aa59(0x1dc)]()))continue;if(_0x3dbb53[_0x48aa59(0x1dc)]()){const _0x5d208a=await getProjectFiles(_0x2b70eb,a211_0x5b6e1c[_0x48aa59(0x1cb)](_0x361f90,_0x3dbb53['name']),_0x49f9b6,_0x8735ea);_0x9d03c4[_0x48aa59(0x1ef)](..._0x5d208a);}else _0x9d03c4[_0x48aa59(0x1ef)](_0x49f9b6);}return _0x9d03c4;}function a211_0x156d(){const _0x4954e3=['extracted','\x20bytes)','WORKFLOW_ARCHIVE_CORRUPTED','size','296514UGVRBj','utf-8','has','22502CLYXvO','deleted','mkdir','workflow_project','Failed\x20to\x20extract\x20remote\x20project\x20archive\x20for\x20comparison','push','archive.tar.gz','catch','\x20(archive\x20size:\x20','5416jxEtyg','modified','uploadProjectArchive','readdir','511556uCnSpx','includes','sort','new','message','name','tmpdir','tdx-wf-push-archive-','localeCompare','skipValidation','unchanged','configResult','zlib','tar','7bIbhHw','toISOString','extract','2593264nmILSH','create','10398760DheqqP','join','\x20workflow\x20files\x20found\x20in\x20','projectName','mkdtemp','159PyTBdP','.digdagignore','length','tdx.json','No\x20','type','filter','sourceDir','path','3050514DFfhLE','stat','skipSchedule','TAR_BAD_ARCHIVE','isDirectory','revision','downloadProjectArchive','1580GcIEvU','readFile','add','posix'];a211_0x156d=function(){return _0x4954e3;};return a211_0x156d();}async function calculatePushChanges(_0x3f91e4,_0x17180d,_0x528f85){const _0xee1c6c=a211_0x360f,_0x3c6e4d=[],_0x53335f=new Set(await getProjectFiles(_0x17180d));for(const _0x22ead3 of _0x528f85){const _0x4b2282=a211_0x5b6e1c[_0xee1c6c(0x1cb)](_0x3f91e4,_0x22ead3),_0x44c1c9=a211_0x5b6e1c[_0xee1c6c(0x1cb)](_0x17180d,_0x22ead3),_0x5aac1b=await a211_0x1c74ec[_0xee1c6c(0x1e0)](_0x4b2282,'utf-8')[_0xee1c6c(0x1f1)](()=>null);if(_0x5aac1b===null)continue;if(!_0x53335f[_0xee1c6c(0x1e9)](_0x22ead3))_0x3c6e4d[_0xee1c6c(0x1ef)]({'path':_0x22ead3,'type':_0xee1c6c(0x1ba),'newContent':_0x5aac1b});else{const _0x51e44f=await a211_0x1c74ec[_0xee1c6c(0x1e0)](_0x44c1c9,_0xee1c6c(0x1e8))[_0xee1c6c(0x1f1)](()=>null);if(_0x51e44f===null)_0x3c6e4d[_0xee1c6c(0x1ef)]({'path':_0x22ead3,'type':_0xee1c6c(0x1f4),'newContent':_0x5aac1b});else{if(_0x51e44f!==_0x5aac1b){const _0x49694a=generateDiff(_0x51e44f,_0x5aac1b),_0x1a6a66=hasChanges(_0x49694a)?formatDiffWithColors(_0x49694a):undefined;_0x3c6e4d['push']({'path':_0x22ead3,'type':'modified','oldContent':_0x51e44f,'newContent':_0x5aac1b,'diff':_0x1a6a66});}else _0x3c6e4d[_0xee1c6c(0x1ef)]({'path':_0x22ead3,'type':'unchanged'});}}}for(const _0x59d1f7 of _0x53335f){if(!_0x528f85[_0xee1c6c(0x1b8)](_0x59d1f7)){const _0x3e7191=a211_0x5b6e1c[_0xee1c6c(0x1cb)](_0x17180d,_0x59d1f7),_0x1947d5=await a211_0x1c74ec['readFile'](_0x3e7191,_0xee1c6c(0x1e8))[_0xee1c6c(0x1f1)](()=>undefined);_0x3c6e4d[_0xee1c6c(0x1ef)]({'path':_0x59d1f7,'type':'deleted','oldContent':_0x1947d5});}}return _0x3c6e4d[_0xee1c6c(0x1b9)]((_0x446034,_0x4f6950)=>_0x446034['path'][_0xee1c6c(0x1bf)](_0x4f6950[_0xee1c6c(0x1d7)])),_0x3c6e4d;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a212_0xcfc070=a212_0xf6ef;(function(_0xf6e2e3,_0x5515ab){const _0x585b2f=a212_0xf6ef,_0x43736f=_0xf6e2e3();while(!![]){try{const _0x385111=parseInt(_0x585b2f(0x1ca))/0x1+-parseInt(_0x585b2f(0x1e5))/0x2*(parseInt(_0x585b2f(0x1db))/0x3)+parseInt(_0x585b2f(0x1ee))/0x4+-parseInt(_0x585b2f(0x1f1))/0x5+-parseInt(_0x585b2f(0x1d5))/0x6*(parseInt(_0x585b2f(0x1f2))/0x7)+-parseInt(_0x585b2f(0x1e4))/0x8+parseInt(_0x585b2f(0x1df))/0x9*(parseInt(_0x585b2f(0x1f0))/0xa);if(_0x385111===_0x5515ab)break;else _0x43736f['push'](_0x43736f['shift']());}catch(_0x1ad2a6){_0x43736f['push'](_0x43736f['shift']());}}}(a212_0x20d3,0xb089c));function a212_0x20d3(){const _0x4658ca=['slice','1293210rvGBxo','3174575UnXwkx','7Gyjthk','data\x20exports','length','⚠️\x20\x20ACTIVATION','warning','warningDetail','http','38206TTzbJI','⚠️\x20\x20DATA\x20EXPORT','command','string','activations','⚠️\x20\x20Email\x20send','children','email\x20sends','stringify','name','startsWith','4384608ccftlM','td>','HTTP\x20calls','join',',\x20and\x20','operator','432483PBiZhd','label','baseIndent','keys','153RqOMwT','export','\x20\x20\x20←\x20','result_url','activation','3188032fzezIQ','6rgLGVI','entries','endsWith','⚠️\x20\x20This\x20workflow\x20contains\x20','object','repeat','push','⚠️\x20\x20HTTP\x20call','\x20→\x20','2732428xzTRQb'];a212_0x20d3=function(){return _0x4658ca;};return a212_0x20d3();}const OPERATOR_WARNINGS={'td_run>':a212_0xcfc070(0x1e3),'http>':a212_0xcfc070(0x1f8),'http_call>':'http','mail>':'mail'},WARNING_META={'activation':{'label':a212_0xcfc070(0x1f5),'singular':a212_0xcfc070(0x1e3),'plural':a212_0xcfc070(0x1ce)},'http':{'label':a212_0xcfc070(0x1ec),'singular':'HTTP\x20call','plural':a212_0xcfc070(0x1d7)},'mail':{'label':a212_0xcfc070(0x1cf),'singular':'email\x20send','plural':a212_0xcfc070(0x1d1)},'export':{'label':a212_0xcfc070(0x1cb),'singular':'data\x20export','plural':a212_0xcfc070(0x1f3)}};function emptySummary(){return{'activation':0x0,'http':0x0,'mail':0x0,'export':0x0};}function collectTasks(_0x44d1fc){const _0x13b0ce=a212_0xcfc070;if(!_0x44d1fc||typeof _0x44d1fc!==_0x13b0ce(0x1e9))return[];if(Array['isArray'](_0x44d1fc))return _0x44d1fc['flatMap'](collectTasks);const _0xe548cb=_0x44d1fc,_0x4bd401=[];for(const [_0x4cc3fe,_0x2235fd]of Object[_0x13b0ce(0x1e6)](_0xe548cb)){if(_0x4cc3fe[_0x13b0ce(0x1e7)]('>'))continue;_0x4cc3fe[_0x13b0ce(0x1d4)]('+')?_0x4bd401[_0x13b0ce(0x1eb)](buildTaskNode(_0x4cc3fe,_0x2235fd)):_0x4bd401[_0x13b0ce(0x1eb)](...collectTasks(_0x2235fd));}return _0x4bd401;}function pickResultTarget(_0x4c9a50){const _0x4e01b9=a212_0xcfc070,_0x22d70a=_0x4c9a50['result_connection'];if(typeof _0x22d70a===_0x4e01b9(0x1cd)&&_0x22d70a[_0x4e01b9(0x1f4)]>0x0)return _0x22d70a;const _0x40d607=_0x4c9a50[_0x4e01b9(0x1e2)];if(typeof _0x40d607==='string'&&_0x40d607['length']>0x0)return _0x40d607;return undefined;}function buildTaskNode(_0x359251,_0x46df7e){const _0x4da6b0=a212_0xcfc070,_0x24695d={'name':_0x359251,'children':[]};if(!_0x46df7e||typeof _0x46df7e!=='object')return _0x24695d;const _0x120c25=_0x46df7e;for(const [_0x5c097a,_0x6b1a56]of Object[_0x4da6b0(0x1e6)](_0x120c25)){if(!_0x5c097a[_0x4da6b0(0x1e7)]('>'))continue;_0x24695d[_0x4da6b0(0x1da)]=_0x5c097a,_0x24695d['command']=typeof _0x6b1a56===_0x4da6b0(0x1cd)?_0x6b1a56:JSON[_0x4da6b0(0x1d2)](_0x6b1a56),_0x24695d['warning']=OPERATOR_WARNINGS[_0x5c097a];break;}if(_0x24695d['operator']===_0x4da6b0(0x1d6)||_0x24695d[_0x4da6b0(0x1da)]==='td_for_each>'){const _0x603982=pickResultTarget(_0x120c25);_0x603982&&(_0x24695d[_0x4da6b0(0x1f6)]=_0x4da6b0(0x1e0),_0x24695d['warningDetail']=_0x603982);}return _0x24695d['children']=collectTasks(_0x120c25),_0x24695d;}export function parseTaskGraph(_0x94d503){return collectTasks(_0x94d503);}function a212_0xf6ef(_0xd499a7,_0x4a0346){_0xd499a7=_0xd499a7-0x1ca;const _0x20d36d=a212_0x20d3();let _0xf6ef08=_0x20d36d[_0xd499a7];return _0xf6ef08;}export function summarizeTaskGraph(_0x14c59f){const _0x1ed113=emptySummary(),_0x1b8246=_0x271a16=>{const _0x4d9341=a212_0xf6ef;for(const _0x2ab594 of _0x271a16){if(_0x2ab594['warning'])_0x1ed113[_0x2ab594['warning']]++;_0x1b8246(_0x2ab594[_0x4d9341(0x1d0)]);}};return _0x1b8246(_0x14c59f),_0x1ed113;}const MAX_COMMAND_LENGTH=0x50;function truncate(_0x4eb6e2,_0x41743e){const _0x1164f4=a212_0xcfc070;if(_0x4eb6e2[_0x1164f4(0x1f4)]<=_0x41743e)return _0x4eb6e2;return _0x4eb6e2[_0x1164f4(0x1ef)](0x0,Math['max'](0x0,_0x41743e-0x1))+'…';}export function formatTaskGraph(_0x10f90a,_0x590de6={}){const _0x478438=a212_0xcfc070,_0x2689d8=_0x590de6[_0x478438(0x1dd)]??0x1,_0x22b8ef=[],_0x433b66=(_0x5c0d85,_0x4bcd64)=>{const _0x4c0aae=_0x478438;for(const _0x4e9a7b of _0x5c0d85){const _0x1d33ee='\x20\x20'[_0x4c0aae(0x1ea)](_0x2689d8+_0x4bcd64);_0x22b8ef[_0x4c0aae(0x1eb)](''+_0x1d33ee+_0x4e9a7b[_0x4c0aae(0x1d3)]);if(_0x4e9a7b[_0x4c0aae(0x1da)]){const _0x51268a='\x20\x20'[_0x4c0aae(0x1ea)](_0x2689d8+_0x4bcd64+0x1),_0x43193d=_0x4e9a7b[_0x4c0aae(0x1cc)]?'\x20'+truncate(_0x4e9a7b[_0x4c0aae(0x1cc)],MAX_COMMAND_LENGTH):'',_0x4e4e89=_0x4e9a7b[_0x4c0aae(0x1f6)]?_0x4c0aae(0x1e1)+WARNING_META[_0x4e9a7b[_0x4c0aae(0x1f6)]][_0x4c0aae(0x1dc)]+(_0x4e9a7b[_0x4c0aae(0x1f7)]?_0x4c0aae(0x1ed)+_0x4e9a7b[_0x4c0aae(0x1f7)]:''):'';_0x22b8ef['push'](''+_0x51268a+_0x4e9a7b[_0x4c0aae(0x1da)]+_0x43193d+_0x4e4e89);}_0x433b66(_0x4e9a7b[_0x4c0aae(0x1d0)],_0x4bcd64+0x1);}};return _0x433b66(_0x10f90a,0x0),_0x22b8ef;}export function formatWarningSummary(_0x18adbc){const _0x54c8f7=a212_0xcfc070,_0x135432=[];for(const _0x2e9251 of Object[_0x54c8f7(0x1de)](WARNING_META)){const _0x44cb86=_0x18adbc[_0x2e9251];if(_0x44cb86>0x0){const {singular:_0x438bb2,plural:_0x1b8b1f}=WARNING_META[_0x2e9251];_0x135432[_0x54c8f7(0x1eb)](_0x44cb86+'\x20'+(_0x44cb86===0x1?_0x438bb2:_0x1b8b1f));}}if(_0x135432['length']===0x0)return null;if(_0x135432['length']===0x1)return _0x54c8f7(0x1e8)+_0x135432[0x0]+'.';if(_0x135432[_0x54c8f7(0x1f4)]===0x2)return _0x54c8f7(0x1e8)+_0x135432[0x0]+'\x20and\x20'+_0x135432[0x1]+'.';const _0x53145d=_0x135432[_0x135432['length']-0x1];return _0x54c8f7(0x1e8)+_0x135432['slice'](0x0,-0x1)[_0x54c8f7(0x1d8)](',\x20')+_0x54c8f7(0x1d9)+_0x53145d+'.';}
|