@lovrabet/rabetbase-cli 2.5.12 → 2.5.13-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/instant-api-policy/endpoints.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase/guides/custom-page-workflow.md +32 -2
- package/skills/rabetbase/knowledge/custom-page/generation-standards.md +106 -6
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
- package/templates/custom-pages/blank.json +1 -1
- package/templates/custom-pages/dashboard.json +1 -1
package/lib/commands/bff/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a44_0x512383=a44_0x2869;(function(_0xb59d2c,_0x2a0140){const _0x4be259=a44_0x2869,_0x6c9633=_0xb59d2c();while(!![]){try{const _0x406d08=-parseInt(_0x4be259(0x1ee))/0x1*(-parseInt(_0x4be259(0x20d))/0x2)+-parseInt(_0x4be259(0x1e2))/0x3*(-parseInt(_0x4be259(0x228))/0x4)+parseInt(_0x4be259(0x1c5))/0x5*(-parseInt(_0x4be259(0x1e5))/0x6)+parseInt(_0x4be259(0x1fe))/0x7+-parseInt(_0x4be259(0x209))/0x8+-parseInt(_0x4be259(0x205))/0x9*(-parseInt(_0x4be259(0x1fd))/0xa)+-parseInt(_0x4be259(0x222))/0xb;if(_0x406d08===_0x2a0140)break;else _0x6c9633['push'](_0x6c9633['shift']());}catch(_0x34fe90){_0x6c9633['push'](_0x6c9633['shift']());}}}(a44_0x4f9f,0xc738d));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,getBffScriptStatistics,getPlatformErrorCode,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiModelSource}from'../../api/model-source.js';import{loadBffProjectConfig}from'../../core/bff/config.js';function a44_0x4f9f(){const _0x26b87f=['size','Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.','defaultApp','3813359gjZdMH','profileName','selectedAppName','lockFilePath','before','filePath','40yvdnpf','mergedCli','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','currentApp','set','string','force','review_remote_and_merge','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','get','hash','some','\x20conflict','create','40yQmbGw','stringify','Review\x20the\x20current\x20remote\x20source,\x20merge\x20it\x20into\x20the\x20local\x20script,\x20then\x20retry\x20push.\x20Do\x20not\x20use\x20--force\x20unless\x20you\x20intentionally\x20discard\x20local\x20changes.','appCode','dataset','filter','remoteId','Lock\x20scope\x20for\x20app\x20\x22','runtime\x20cache\x20clear\x20failed','cleared','No\x20local\x20Backend\x20Function\x20scripts\x20found.','Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.','every','Force\x20push\x20ignoring\x20hash\x20protection','beforeScriptId','write','operationType','parse','functionNode','lastSync','validation','script','datasetCode','map','ENDPOINT','scriptsRoot','functionName','version','existingHooks','430725INlUAF','HOOK_DATASET_NOT_FOUND:','description','1061124jGGvAP','after','delete','Push\x20only\x20this\x20script\x20type','Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20','\x20skipped','afterScriptId','failed','\x20bff\x20detail\x20--id\x20','718043sWCHGt','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','failures','conflict','toISOString','Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','Local\x20function\x20not\x20found:\x20','str','Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.','type','\x22\x20not\x20found\x20after\x20ensureLockScope.','apps','unchanged','functions','1049470BqTbxd','10337061aUJvFs','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','name','flatMap','join','Would\x20inspect\x20','message','45hBSjkE','boolean','warnings','has','12621896DHhJdN','status','HOOK','Incomplete\x20HOOK\x20path:\x20','2EgIkdt','test','requires','scriptType','add','bff','values','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','push','lockKey','length','BFF_REMOTE_VERSION_MISSING','startsWith','bool','alias','would_push','resolutions','runtime\x20cache\x20not\x20needed'];a44_0x4f9f=function(){return _0x26b87f;};return a44_0x4f9f();}import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{buildHookDirectoryIndexes,assertUnambiguousHookAliases,assertUnambiguousHookDirectoryMappings,preflightPushHookDirectories,trackedHookDirectoryMappings}from'../../core/bff/hook-directory.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';function a44_0x2869(_0x1804f8,_0x31dbfc){_0x1804f8=_0x1804f8-0x1c1;const _0x4f9f01=a44_0x4f9f();let _0x2869c5=_0x4f9f01[_0x1804f8];return _0x2869c5;}import{extractScriptDescription,snakeToCamel}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a44_0x512383(0x212),'command':a44_0x512383(0x215),'description':a44_0x512383(0x1f4),'risk':a44_0x512383(0x1d4),'structuredErrors':!![],'flags':[{'name':a44_0x512383(0x1f8),'type':a44_0x512383(0x22d),'description':a44_0x512383(0x1e8),'enum':['COMMON',a44_0x512383(0x1dd),a44_0x512383(0x20b)]},{'name':a44_0x512383(0x200),'type':a44_0x512383(0x22d),'description':a44_0x512383(0x22a)},{'name':'force','type':a44_0x512383(0x206),'description':a44_0x512383(0x1d2)}],async 'dryRun'(_0x2669d8){const _0x56e7b7=a44_0x512383,_0x34ff1b=loadBffProjectConfig(_0x2669d8[_0x56e7b7(0x1c8)]),_0xef7f86=await readBffLockFile(_0x34ff1b['lockFilePath']),{appLock:_0x46c02f}=ensureLockScope(_0xef7f86??createEmptyBffLock(),_0x2669d8['appCode'],_0x34ff1b[_0x56e7b7(0x1de)],_0x56e7b7(0x215)),_0x4fb660=await getTargetFunctions(_0x34ff1b,_0x2669d8),_0x28cb6d=_0x4fb660[_0x56e7b7(0x1c2)](_0x1f7edc=>_0x1f7edc[_0x56e7b7(0x1f8)]===_0x56e7b7(0x20b))?await scanLocalBffFunctions(_0x34ff1b,_0x56e7b7(0x20b)):_0x4fb660,_0x4eef7b=await buildHookMaps(_0x2669d8[_0x56e7b7(0x1c8)],_0x2669d8['apiDir'],_0x28cb6d,_0x46c02f,_0x2669d8[_0x56e7b7(0x224)]||_0x2669d8[_0x56e7b7(0x229)]?.[_0x56e7b7(0x22b)]||_0x2669d8['mergedCli']?.['defaultApp']),_0x35babe=_0x2669d8['bool'](_0x56e7b7(0x22e)),_0x526565=[];for(const _0x562223 of _0x4fb660){const _0x28e3ab=await computeFileHash(_0x562223[_0x56e7b7(0x227)]),_0x27cb58=_0x46c02f['functions'][_0x562223[_0x56e7b7(0x216)]],_0xa802d=!!_0x27cb58&&_0x27cb58[_0x56e7b7(0x1c1)]===_0x28e3ab,_0x40962d=_0x4eef7b[_0x56e7b7(0x21d)][_0x56e7b7(0x231)](_0x562223['lockKey']),_0x37c6dd=!!_0x27cb58?.[_0x56e7b7(0x1cb)]&&_0x27cb58['version']==null&&(_0x35babe||!_0xa802d),_0x5dc7ea=_0x37c6dd?missingRemoteVersionConflict(_0x562223,_0x27cb58):undefined,_0x4bdd54=_0x4eef7b['failures'][_0x56e7b7(0x208)](_0x562223[_0x56e7b7(0x216)])?_0x56e7b7(0x1ec):!_0x35babe&&_0xa802d?_0x56e7b7(0x1fb):_0x5dc7ea?_0x56e7b7(0x1f1):_0x56e7b7(0x21c);_0x526565['push']({'lockKey':_0x562223[_0x56e7b7(0x216)],'filePath':_0x562223['filePath'],'remoteId':_0x27cb58?.['remoteId']??null,'mode':_0x27cb58?.[_0x56e7b7(0x1cb)]?'update':_0x56e7b7(0x1c4),'status':_0x4bdd54,..._0x4eef7b[_0x56e7b7(0x1f0)]['has'](_0x562223[_0x56e7b7(0x216)])?{'error':_0x4eef7b[_0x56e7b7(0x1f0)][_0x56e7b7(0x231)](_0x562223[_0x56e7b7(0x216)])}:{},..._0x5dc7ea?{'conflict':_0x5dc7ea}:{},..._0x4eef7b[_0x56e7b7(0x1e1)][_0x56e7b7(0x208)](_0x562223[_0x56e7b7(0x216)])?{'datasetCode':_0x27cb58?.[_0x56e7b7(0x1db)],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x562223[_0x56e7b7(0x216)])]}:{},..._0x40962d?{'alias':_0x40962d['alias']??null,'datasetCode':_0x40962d[_0x56e7b7(0x1db)],'operationType':_0x562223[_0x56e7b7(0x1d5)],'functionNode':_0x562223[_0x56e7b7(0x1d7)],'warnings':_0x40962d[_0x56e7b7(0x207)]}:{}});}return{'method':'POST','url':'/api/management/library/scripts/save','body':{'appCode':_0x2669d8[_0x56e7b7(0x1c8)],'force':_0x35babe,'files':_0x526565,'cacheClearAtRuntime':_0x526565[_0x56e7b7(0x1c2)](_0x1e2255=>_0x1e2255[_0x56e7b7(0x20a)]===_0x56e7b7(0x21c)),'cacheClearAtRuntimeTimes':_0x526565['some'](_0x30339f=>_0x30339f['status']===_0x56e7b7(0x21c))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x56e7b7(0x203)+_0x526565[_0x56e7b7(0x217)]+_0x56e7b7(0x230)};},async 'execute'(_0x3ad306){const _0x777269=a44_0x512383,_0x343127=loadBffProjectConfig(_0x3ad306[_0x777269(0x1c8)]),_0x3e0baa=await readBffLockFile(_0x343127['lockFilePath']),{lockData:_0x3dd3f2,appLock:_0x1e291c}=ensureLockScope(_0x3e0baa??createEmptyBffLock(),_0x3ad306[_0x777269(0x1c8)],_0x343127[_0x777269(0x1de)],_0x777269(0x215)),_0x400e0f=await getTargetFunctions(_0x343127,_0x3ad306);if(_0x400e0f[_0x777269(0x217)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':_0x777269(0x1cf)};const _0x13e7a1=_0x3ad306[_0x777269(0x21a)](_0x777269(0x22e)),_0x17471e=JSON[_0x777269(0x1d6)](JSON[_0x777269(0x1c6)](_0x3dd3f2)),_0x4d8600=_0x17471e['apps'][_0x3ad306[_0x777269(0x1c8)]];if(!_0x4d8600)throw new Error(_0x777269(0x1cc)+_0x3ad306[_0x777269(0x1c8)]+_0x777269(0x1f9));const _0x35ee73=_0x400e0f[_0x777269(0x1c2)](_0x4f9366=>_0x4f9366[_0x777269(0x1f8)]===_0x777269(0x20b))?await scanLocalBffFunctions(_0x343127,_0x777269(0x20b)):_0x400e0f,_0x3b30c1=await buildHookMaps(_0x3ad306[_0x777269(0x1c8)],_0x3ad306['apiDir'],_0x35ee73,_0x4d8600,_0x3ad306[_0x777269(0x224)]||_0x3ad306[_0x777269(0x229)]?.[_0x777269(0x22b)]||_0x3ad306[_0x777269(0x229)]?.[_0x777269(0x221)]),_0x17a64a=[],_0x4f4d77=[],_0x1be606=[],_0x594fb9=[];for(const _0x30e0a1 of _0x400e0f){const _0x1f4cdb=_0x3b30c1[_0x777269(0x1f0)][_0x777269(0x231)](_0x30e0a1[_0x777269(0x216)]);if(_0x1f4cdb){_0x594fb9[_0x777269(0x215)]({'lockKey':_0x30e0a1[_0x777269(0x216)],'error':_0x1f4cdb});continue;}const _0x24e98f=await computeFileHash(_0x30e0a1['filePath']),_0x4c2c73=_0x4d8600[_0x777269(0x1fc)][_0x30e0a1[_0x777269(0x216)]];if(!_0x13e7a1&&_0x4c2c73&&_0x4c2c73[_0x777269(0x1c1)]===_0x24e98f){_0x4f4d77['push']({'lockKey':_0x30e0a1[_0x777269(0x216)],'reason':'unchanged'});continue;}if(_0x4c2c73?.[_0x777269(0x1cb)]&&_0x4c2c73[_0x777269(0x1e0)]==null){_0x1be606['push'](missingRemoteVersionConflict(_0x30e0a1,_0x4c2c73));continue;}try{await uploadSingleFunction(_0x3ad306[_0x777269(0x1c8)],_0x30e0a1,_0x4d8600,_0x3b30c1);const _0x2f85ec=_0x4d8600[_0x777269(0x1fc)][_0x30e0a1[_0x777269(0x216)]];_0x17a64a[_0x777269(0x215)]({'lockKey':_0x30e0a1['lockKey'],'remoteId':_0x2f85ec?.[_0x777269(0x1cb)]??0x0});}catch(_0x3bc43e){const _0x22f6d3=remoteVersionChangedConflict(_0x30e0a1,_0x4c2c73,_0x3bc43e);if(_0x22f6d3){_0x1be606[_0x777269(0x215)](_0x22f6d3);continue;}_0x594fb9[_0x777269(0x215)]({'lockKey':_0x30e0a1[_0x777269(0x216)],'error':_0x3bc43e instanceof Error?_0x3bc43e[_0x777269(0x204)]:String(_0x3bc43e)});}}_0x4d8600[_0x777269(0x1d8)]=new Date()[_0x777269(0x1f2)](),await writeBffLockFile(_0x343127[_0x777269(0x225)],_0x17471e),await waitForUploadedLockEntries(_0x343127[_0x777269(0x225)],_0x3ad306[_0x777269(0x1c8)],_0x17a64a['map'](_0x2abbc8=>_0x2abbc8[_0x777269(0x216)]));let _0x259f11={'attempted':![],'cleared':![]};if(_0x17a64a[_0x777269(0x217)]>0x0)try{let _0xd979d6='';for(let _0x28970a=0x0;_0x28970a<CACHE_CLEAR_ATTEMPTS;_0x28970a+=0x1){_0xd979d6=await clearBffScriptCache(),_0x28970a<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x259f11={'attempted':!![],'cleared':!![],'message':_0xd979d6||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0x518a26){_0x259f11={'attempted':!![],'cleared':![],'error':_0x518a26 instanceof Error?_0x518a26['message']:String(_0x518a26)};}const _0x43dc62=_0x594fb9[_0x777269(0x217)]===0x0&&(_0x259f11['attempted']?_0x259f11[_0x777269(0x1ce)]:!![]),_0xc4be53=_0x43dc62,_0x373930=_0x259f11['attempted']?_0x259f11[_0x777269(0x1ce)]?'runtime\x20cache\x20cleared':_0x777269(0x1cd):_0x777269(0x21e);return{'ok':_0xc4be53,'data':{'uploaded':_0x17a64a,'skipped':_0x4f4d77,'conflicts':_0x1be606,'failed':_0x594fb9,'cacheClear':_0x259f11,'warnings':[...[..._0x3b30c1[_0x777269(0x21d)][_0x777269(0x213)]()][_0x777269(0x201)](_0x4d4a19=>_0x4d4a19[_0x777269(0x207)]),...[..._0x3b30c1[_0x777269(0x1e1)]][_0x777269(0x1dc)](existingHookWarning)]},'message':formatPushMessage(_0x17a64a[_0x777269(0x217)],_0x4f4d77[_0x777269(0x217)],_0x1be606[_0x777269(0x217)],_0x594fb9['length'],_0x373930)};}};function missingRemoteVersionConflict(_0x597e1a,_0x1b9dba){const _0x241cc0=a44_0x512383;return remoteVersionConflict(_0x597e1a,_0x1b9dba,_0x241cc0(0x218),_0x241cc0(0x214));}function remoteVersionChangedConflict(_0x3011ae,_0x36e9dc,_0x1dc11f){const _0xdf8044=a44_0x512383;if(!_0x36e9dc?.[_0xdf8044(0x1cb)]||_0x36e9dc[_0xdf8044(0x1e0)]==null||!isRemoteVersionConflict(_0x1dc11f))return undefined;return remoteVersionConflict(_0x3011ae,_0x36e9dc,'BFF_REMOTE_VERSION_CHANGED',_0xdf8044(0x1f7));}function remoteVersionConflict(_0x3b76e5,_0x4f6b17,_0x5339c4,_0x5771f3){const _0x3f0f52=a44_0x512383;return{'code':_0x5339c4,'lockKey':_0x3b76e5[_0x3f0f52(0x216)],'filePath':_0x3b76e5[_0x3f0f52(0x227)],'remoteId':_0x4f6b17[_0x3f0f52(0x1cb)],..._0x4f6b17[_0x3f0f52(0x1e0)]!=null?{'expectedVersion':_0x4f6b17[_0x3f0f52(0x1e0)]}:{},'message':_0x5771f3,'nextAction':{'action':_0x3f0f52(0x22f),'command':CLI_BIN_NAME+_0x3f0f52(0x1ed)+_0x4f6b17[_0x3f0f52(0x1cb)]+'\x20--format\x20compress','requiresReview':!![],'message':_0x3f0f52(0x1c7)}};}function isRemoteVersionConflict(_0x1b77ad){const _0x177741=a44_0x512383,_0x3914aa=_0x1b77ad instanceof Error?_0x1b77ad[_0x177741(0x204)]:String(_0x1b77ad),_0x35cfbe=getPlatformErrorCode(_0x1b77ad)??'';return[_0x3914aa,_0x35cfbe][_0x177741(0x1c2)](_0x2622c3=>/(?:version|optimistic)[\s_-]*(?:conflict|mismatch|changed|stale|out[\s_-]*of[\s_-]*date)|(?:conflict|mismatch|changed|stale|out[\s_-]*of[\s_-]*date)[\s_-]*(?:version|optimistic)/i[_0x177741(0x20e)](_0x2622c3));}function formatPushMessage(_0x41043c,_0x255ae0,_0x312b7e,_0x46aea0,_0x4a06dd){const _0x570092=a44_0x512383,_0x10a8b3=['Push\x20complete:\x20'+_0x41043c+'\x20uploaded',_0x255ae0+_0x570092(0x1ea)];_0x312b7e>0x0&&_0x10a8b3[_0x570092(0x215)](_0x312b7e+_0x570092(0x1c3)+(_0x312b7e===0x1?'':'s')+'\x20'+(_0x312b7e===0x1?_0x570092(0x20f):'require')+'\x20resolution');if(_0x46aea0>0x0)_0x10a8b3[_0x570092(0x215)](_0x46aea0+'\x20failed');return _0x10a8b3[_0x570092(0x215)](_0x4a06dd),_0x10a8b3['join'](',\x20');}async function getTargetFunctions(_0x20a757,_0x50a79c){const _0x42ac24=a44_0x512383,_0x54d56f=_0x50a79c[_0x42ac24(0x1f6)]('type'),_0xc45085=_0x50a79c[_0x42ac24(0x1f6)](_0x42ac24(0x200)),_0x4f3f93=normalizeBffType(_0x54d56f)??undefined;if(_0xc45085&&!_0x4f3f93)throw CliErrors[_0x42ac24(0x1d9)](_0x42ac24(0x1ff));const _0x104b0a=await scanLocalBffFunctions(_0x20a757,_0x4f3f93);if(_0xc45085){const _0x12d48a=_0x104b0a[_0x42ac24(0x1ca)](_0x3f813f=>_0x3f813f[_0x42ac24(0x200)]===_0xc45085);if(_0x12d48a[_0x42ac24(0x217)]===0x0)throw CliErrors['validation'](_0x42ac24(0x1f5)+_0x4f3f93+'/'+_0xc45085);return _0x12d48a;}return _0x104b0a;}function existingHookWarning(_0xc38e75){const _0x826abd=a44_0x512383;return{'code':'EXISTING_HOOK_BINDING_PRESERVED','lockKey':_0xc38e75,'message':_0x826abd(0x1d0)};}async function buildHookMaps(_0x19a7e5,_0x3c8e8e,_0x5e4f91,_0x2d2e95,_0x14015a){const _0x127868=a44_0x512383,_0x20ea88=_0x5e4f91[_0x127868(0x1c2)](_0x40998f=>_0x40998f[_0x127868(0x1f8)]===_0x127868(0x20b));if(!_0x20ea88)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0x1619a0=resolveApiModelSource(_0x3c8e8e,_0x19a7e5,_0x14015a),_0x392cbd=loadAliasMap(_0x3c8e8e,undefined,_0x1619a0['filePath'],_0x1619a0[_0x127868(0x223)]);assertUnambiguousHookAliases(_0x392cbd);const _0x46e2d4=[..._0x392cbd[_0x127868(0x1dc)](_0x2f06d7=>[_0x2f06d7[_0x127868(0x21b)],_0x2f06d7[_0x127868(0x1db)]]),...trackedHookDirectoryMappings(_0x2d2e95)['map'](_0x259f7c=>[_0x259f7c[_0x127868(0x21b)],_0x259f7c[_0x127868(0x1db)]])],_0x3c2ac4=await listDatasets(_0x19a7e5);assertUnambiguousHookDirectoryMappings(_0x46e2d4[_0x127868(0x1dc)](([_0x7aa4a8,_0x3b7a6d])=>({'alias':_0x7aa4a8,'datasetCode':_0x3b7a6d})));const _0x172bdd=buildHookDirectoryIndexes(_0x3c2ac4,_0x46e2d4),_0x13e5f4=new Map(),_0x3ffeea=preflightPushHookDirectories(_0x5e4f91,_0x2d2e95,_0x172bdd,_0x13e5f4),_0x4f88b3=new Set(),_0x1d2e9b=_0x5e4f91[_0x127868(0x1ca)](_0x5f1854=>_0x13e5f4[_0x127868(0x231)](_0x5f1854[_0x127868(0x216)])?.[_0x127868(0x219)](_0x127868(0x1e3))&&_0x2d2e95[_0x127868(0x1fc)][_0x5f1854[_0x127868(0x216)]]?.[_0x127868(0x1cb)]&&_0x2d2e95['functions'][_0x5f1854['lockKey']]?.[_0x127868(0x1db)]);if(_0x1d2e9b[_0x127868(0x217)]>0x0){let _0x48b04a;try{_0x48b04a=await getBffScriptStatistics(_0x19a7e5);}catch(_0x6f7a4e){for(const _0x4e2512 of _0x1d2e9b)_0x13e5f4[_0x127868(0x22c)](_0x4e2512[_0x127868(0x216)],_0x127868(0x1e9)+(_0x6f7a4e instanceof Error?_0x6f7a4e['message']:String(_0x6f7a4e)));return{'resolutions':_0x3ffeea,'failures':_0x13e5f4,'existingHooks':_0x4f88b3};}for(const _0x233da8 of _0x1d2e9b){const _0x507d8b=_0x2d2e95[_0x127868(0x1fc)][_0x233da8[_0x127868(0x216)]];try{const _0x223025=new Set(_0x5e4f91[_0x127868(0x1ca)](_0x2bfea5=>_0x2bfea5[_0x127868(0x1f8)]==='HOOK'&&_0x2d2e95[_0x127868(0x1fc)][_0x2bfea5['lockKey']]?.['datasetCode']===_0x507d8b[_0x127868(0x1db)])[_0x127868(0x1dc)](_0x511c9d=>_0x511c9d[_0x127868(0x21b)]));if(_0x223025[_0x127868(0x21f)]>0x1)throw CliErrors['validation'](_0x127868(0x220));const _0x22660a=_0x48b04a[_0x127868(0x201)](_0x4b10b7=>[{'datasetCode':_0x4b10b7[_0x127868(0x1db)],'operationType':snakeToCamel(_0x4b10b7[_0x127868(0x1d5)]),'functionNode':_0x127868(0x226),'id':_0x4b10b7[_0x127868(0x1d3)]},{'datasetCode':_0x4b10b7[_0x127868(0x1db)],'operationType':snakeToCamel(_0x4b10b7[_0x127868(0x1d5)]),'functionNode':_0x127868(0x1e6),'id':_0x4b10b7[_0x127868(0x1eb)]}])[_0x127868(0x1ca)](_0x20ab09=>_0x20ab09['id']===_0x507d8b[_0x127868(0x1cb)]),_0x5f0aee=await getBffScriptInfo(_0x507d8b[_0x127868(0x1cb)]);if(_0x5f0aee['id']!==_0x507d8b['remoteId']||_0x5f0aee[_0x127868(0x1c8)]!==_0x19a7e5||_0x5f0aee[_0x127868(0x210)]!==_0x127868(0x20b)||_0x5f0aee[_0x127868(0x1df)]!==_0x233da8[_0x127868(0x200)]||_0x507d8b['version']==null||_0x5f0aee['version']!==_0x507d8b[_0x127868(0x1e0)]||_0x22660a[_0x127868(0x217)]!==0x1||_0x22660a[0x0]['datasetCode']!==_0x507d8b[_0x127868(0x1db)]||_0x22660a[0x0][_0x127868(0x1d5)]!==_0x233da8[_0x127868(0x1d5)]||_0x22660a[0x0]['functionNode']!==_0x233da8[_0x127868(0x1d7)]||_0x507d8b[_0x127868(0x1d5)]!==_0x233da8[_0x127868(0x1d5)]||_0x507d8b[_0x127868(0x1d7)]!==_0x233da8[_0x127868(0x1d7)])throw CliErrors[_0x127868(0x1d9)](_0x127868(0x1f3));_0x4f88b3[_0x127868(0x211)](_0x233da8[_0x127868(0x216)]),_0x13e5f4[_0x127868(0x1e7)](_0x233da8[_0x127868(0x216)]);}catch(_0x113ac5){_0x13e5f4[_0x127868(0x22c)](_0x233da8['lockKey'],_0x113ac5 instanceof Error?_0x113ac5['message']:String(_0x113ac5));}}}return{'resolutions':_0x3ffeea,'failures':_0x13e5f4,'existingHooks':_0x4f88b3};}async function uploadSingleFunction(_0x26bdd9,_0x2bb7c1,_0x2f2e14,_0x5e43e0){const _0x6f9fce=a44_0x512383,_0x3fa578=await readFile(_0x2bb7c1[_0x6f9fce(0x227)],'utf8'),_0x262c39=await computeFileHash(_0x2bb7c1[_0x6f9fce(0x227)]),_0x36d103=_0x2f2e14[_0x6f9fce(0x1fc)][_0x2bb7c1[_0x6f9fce(0x216)]];if(_0x36d103?.[_0x6f9fce(0x1cb)]&&_0x36d103['version']==null)throw CliErrors[_0x6f9fce(0x1d9)](_0x2bb7c1[_0x6f9fce(0x216)]+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x526348=extractScriptDescription(_0x3fa578);if(!_0x526348&&_0x36d103?.['remoteId']){const _0x527fba=await getBffScriptInfo(_0x36d103[_0x6f9fce(0x1cb)]);_0x526348=_0x527fba[_0x6f9fce(0x1e4)]||undefined;}const _0x5bc1ec={'appCode':_0x26bdd9,'functionName':_0x2bb7c1[_0x6f9fce(0x200)],'scriptType':_0x2bb7c1['type'],'scriptContent':_0x3fa578};if(_0x36d103?.[_0x6f9fce(0x1cb)])_0x5bc1ec['id']=_0x36d103['remoteId'];if(_0x36d103?.[_0x6f9fce(0x1e0)]!=null)_0x5bc1ec[_0x6f9fce(0x1e0)]=_0x36d103[_0x6f9fce(0x1e0)];if(_0x526348)_0x5bc1ec['description']=_0x526348;if(_0x2bb7c1[_0x6f9fce(0x1f8)]===_0x6f9fce(0x20b)){const _0xef2288=_0x5e43e0['resolutions']['get'](_0x2bb7c1['lockKey']);if(!_0xef2288&&!_0x5e43e0[_0x6f9fce(0x1e1)]['has'](_0x2bb7c1[_0x6f9fce(0x216)])||!_0x2bb7c1['operationType']||!_0x2bb7c1[_0x6f9fce(0x1d7)])throw CliErrors[_0x6f9fce(0x1d9)](_0x6f9fce(0x20c)+_0x2bb7c1[_0x6f9fce(0x216)]);_0xef2288&&(_0x5bc1ec['datasetId']=_0xef2288[_0x6f9fce(0x1c9)]['id'],_0x5bc1ec['operationType']=_0x2bb7c1[_0x6f9fce(0x1d5)]),_0x5bc1ec[_0x6f9fce(0x1d7)]=_0x2bb7c1[_0x6f9fce(0x1d7)];}const _0x492b13=await saveBffScript(_0x5bc1ec),_0x3dd8f0=_0x492b13['id'],_0x277ba5=_0x492b13[_0x6f9fce(0x1da)]??await getBffScriptInfo(_0x3dd8f0),_0x141d31={'hash':_0x262c39,'remoteId':_0x3dd8f0,'version':_0x277ba5[_0x6f9fce(0x1e0)]};if(_0x2bb7c1[_0x6f9fce(0x1f8)]==='HOOK'){const _0x936ffc=_0x5e43e0[_0x6f9fce(0x21d)][_0x6f9fce(0x231)](_0x2bb7c1['lockKey']);if(!_0x936ffc){_0x2f2e14['functions'][_0x2bb7c1[_0x6f9fce(0x216)]]={..._0x36d103,..._0x141d31};return;}_0x141d31[_0x6f9fce(0x21b)]=_0x936ffc[_0x6f9fce(0x21b)]??_0x36d103?.[_0x6f9fce(0x21b)],_0x141d31[_0x6f9fce(0x1db)]=_0x936ffc['datasetCode'],_0x141d31[_0x6f9fce(0x1d5)]=_0x2bb7c1[_0x6f9fce(0x1d5)],_0x141d31['functionNode']=_0x2bb7c1[_0x6f9fce(0x1d7)];}_0x2f2e14[_0x6f9fce(0x1fc)][_0x2bb7c1['lockKey']]=_0x141d31;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x23b11c,_0x575c79,_0xd29baf){const _0xe73acf=a44_0x512383;if(_0xd29baf[_0xe73acf(0x217)]===0x0)return;for(let _0x30c63d=0x0;_0x30c63d<LOCK_SETTLE_RETRY_COUNT;_0x30c63d+=0x1){const _0x3c0b18=await readBffLockFile(_0x23b11c),_0x1a0acf=_0x3c0b18?.[_0xe73acf(0x1fa)]?.[_0x575c79]?.['functions']??{},_0xbc3443=_0xd29baf[_0xe73acf(0x1d1)](_0x13ee11=>!!_0x1a0acf[_0x13ee11]?.[_0xe73acf(0x1cb)]);if(_0xbc3443)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0xe73acf(0x1ef)+_0xd29baf[_0xe73acf(0x202)](',\x20')+'.');}
|
|
1
|
+
const a44_0xad0615=a44_0x3e85;(function(_0x1960fc,_0x6e2039){const _0x227280=a44_0x3e85,_0x29b8fd=_0x1960fc();while(!![]){try{const _0x32354c=-parseInt(_0x227280(0x1da))/0x1+parseInt(_0x227280(0x21f))/0x2+-parseInt(_0x227280(0x1f4))/0x3+-parseInt(_0x227280(0x206))/0x4*(parseInt(_0x227280(0x201))/0x5)+-parseInt(_0x227280(0x1e1))/0x6+parseInt(_0x227280(0x228))/0x7*(parseInt(_0x227280(0x219))/0x8)+parseInt(_0x227280(0x1bc))/0x9*(parseInt(_0x227280(0x208))/0xa);if(_0x32354c===_0x6e2039)break;else _0x29b8fd['push'](_0x29b8fd['shift']());}catch(_0x5a363c){_0x29b8fd['push'](_0x29b8fd['shift']());}}}(a44_0x3283,0x2ec7f));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,getBffScriptStatistics,getPlatformErrorCode,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';function a44_0x3e85(_0x521c7a,_0x3281db){_0x521c7a=_0x521c7a-0x1b7;const _0x328300=a44_0x3283();let _0x3e855c=_0x328300[_0x521c7a];return _0x3e855c;}import{resolveApiModelSource}from'../../api/model-source.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{buildHookDirectoryIndexes,assertUnambiguousHookAliases,assertUnambiguousHookDirectoryMappings,preflightPushHookDirectories,trackedHookDirectoryMappings}from'../../core/bff/hook-directory.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription,snakeToCamel}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a44_0xad0615(0x20f),'command':a44_0xad0615(0x225),'description':'Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','risk':a44_0xad0615(0x21d),'structuredErrors':!![],'flags':[{'name':a44_0xad0615(0x22b),'type':a44_0xad0615(0x1cd),'description':a44_0xad0615(0x1cc),'enum':['COMMON','ENDPOINT',a44_0xad0615(0x21b)]},{'name':a44_0xad0615(0x1e8),'type':a44_0xad0615(0x1cd),'description':a44_0xad0615(0x1be)},{'name':a44_0xad0615(0x1f9),'type':'boolean','description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x1369e3){const _0x3dfc88=a44_0xad0615,_0x43fc33=loadBffProjectConfig(_0x1369e3[_0x3dfc88(0x1fd)]),_0x557633=await readBffLockFile(_0x43fc33['lockFilePath']),{appLock:_0x54a637}=ensureLockScope(_0x557633??createEmptyBffLock(),_0x1369e3[_0x3dfc88(0x1fd)],_0x43fc33[_0x3dfc88(0x1ec)],'push'),_0x4503df=await getTargetFunctions(_0x43fc33,_0x1369e3),_0x148e38=_0x4503df['some'](_0x3757e0=>_0x3757e0[_0x3dfc88(0x22b)]===_0x3dfc88(0x21b))?await scanLocalBffFunctions(_0x43fc33,_0x3dfc88(0x21b)):_0x4503df,_0x2cac38=await buildHookMaps(_0x1369e3[_0x3dfc88(0x1fd)],_0x1369e3[_0x3dfc88(0x1e7)],_0x148e38,_0x54a637,_0x1369e3[_0x3dfc88(0x202)]||_0x1369e3[_0x3dfc88(0x1c1)]?.['currentApp']||_0x1369e3[_0x3dfc88(0x1c1)]?.[_0x3dfc88(0x1db)]),_0x8452e9=_0x1369e3[_0x3dfc88(0x1f5)](_0x3dfc88(0x1f9)),_0x439961=[];for(const _0x290381 of _0x4503df){const _0x4d24b7=await computeFileHash(_0x290381['filePath']),_0xde73e5=_0x54a637['functions'][_0x290381[_0x3dfc88(0x1f3)]],_0x2cd334=!!_0xde73e5&&_0xde73e5[_0x3dfc88(0x220)]===_0x4d24b7,_0x5a30e4=_0x2cac38[_0x3dfc88(0x1c5)]['get'](_0x290381[_0x3dfc88(0x1f3)]),_0x4e2b6f=!!_0xde73e5?.[_0x3dfc88(0x1fa)]&&_0xde73e5[_0x3dfc88(0x1ef)]==null&&(_0x8452e9||!_0x2cd334),_0x5aee6c=_0x4e2b6f?missingRemoteVersionConflict(_0x290381,_0xde73e5):undefined,_0x15d3a6=_0x2cac38[_0x3dfc88(0x1d1)]['has'](_0x290381[_0x3dfc88(0x1f3)])?_0x3dfc88(0x217):!_0x8452e9&&_0x2cd334?_0x3dfc88(0x1d0):_0x5aee6c?_0x3dfc88(0x1fe):_0x3dfc88(0x21c);_0x439961['push']({'lockKey':_0x290381[_0x3dfc88(0x1f3)],'filePath':_0x290381[_0x3dfc88(0x1de)],'remoteId':_0xde73e5?.[_0x3dfc88(0x1fa)]??null,'mode':_0xde73e5?.[_0x3dfc88(0x1fa)]?'update':_0x3dfc88(0x214),'status':_0x15d3a6,..._0x2cac38[_0x3dfc88(0x1d1)]['has'](_0x290381[_0x3dfc88(0x1f3)])?{'error':_0x2cac38[_0x3dfc88(0x1d1)][_0x3dfc88(0x226)](_0x290381[_0x3dfc88(0x1f3)])}:{},..._0x5aee6c?{'conflict':_0x5aee6c}:{},..._0x2cac38['existingHooks']['has'](_0x290381[_0x3dfc88(0x1f3)])?{'datasetCode':_0xde73e5?.[_0x3dfc88(0x1d9)],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x290381['lockKey'])]}:{},..._0x5a30e4?{'alias':_0x5a30e4[_0x3dfc88(0x1e6)]??null,'datasetCode':_0x5a30e4[_0x3dfc88(0x1d9)],'operationType':_0x290381[_0x3dfc88(0x1ed)],'functionNode':_0x290381['functionNode'],'warnings':_0x5a30e4['warnings']}:{}});}return{'method':'POST','url':_0x3dfc88(0x21a),'body':{'appCode':_0x1369e3[_0x3dfc88(0x1fd)],'force':_0x8452e9,'files':_0x439961,'cacheClearAtRuntime':_0x439961[_0x3dfc88(0x223)](_0xf00931=>_0xf00931['status']===_0x3dfc88(0x21c)),'cacheClearAtRuntimeTimes':_0x439961[_0x3dfc88(0x223)](_0x225372=>_0x225372['status']===_0x3dfc88(0x21c))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x3dfc88(0x221)+_0x439961[_0x3dfc88(0x1f1)]+_0x3dfc88(0x1f6)};},async 'execute'(_0x546e4d){const _0x4e24bc=a44_0xad0615,_0x1e0fa0=loadBffProjectConfig(_0x546e4d[_0x4e24bc(0x1fd)]),_0x198079=await readBffLockFile(_0x1e0fa0[_0x4e24bc(0x1d2)]),{lockData:_0x5bc079,appLock:_0x11da3e}=ensureLockScope(_0x198079??createEmptyBffLock(),_0x546e4d[_0x4e24bc(0x1fd)],_0x1e0fa0[_0x4e24bc(0x1ec)],_0x4e24bc(0x225)),_0x55b057=await getTargetFunctions(_0x1e0fa0,_0x546e4d);if(_0x55b057[_0x4e24bc(0x1f1)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':_0x4e24bc(0x1e0)};const _0x16621e=_0x546e4d[_0x4e24bc(0x1f5)](_0x4e24bc(0x1f9)),_0x1a0147=JSON[_0x4e24bc(0x203)](JSON[_0x4e24bc(0x1c3)](_0x5bc079)),_0x7a9c95=_0x1a0147[_0x4e24bc(0x215)][_0x546e4d[_0x4e24bc(0x1fd)]];if(!_0x7a9c95)throw new Error(_0x4e24bc(0x1bf)+_0x546e4d['appCode']+_0x4e24bc(0x1eb));const _0x175215=_0x55b057[_0x4e24bc(0x223)](_0x32510e=>_0x32510e[_0x4e24bc(0x22b)]==='HOOK')?await scanLocalBffFunctions(_0x1e0fa0,_0x4e24bc(0x21b)):_0x55b057,_0x36bfd1=await buildHookMaps(_0x546e4d['appCode'],_0x546e4d[_0x4e24bc(0x1e7)],_0x175215,_0x7a9c95,_0x546e4d[_0x4e24bc(0x202)]||_0x546e4d[_0x4e24bc(0x1c1)]?.[_0x4e24bc(0x1c0)]||_0x546e4d[_0x4e24bc(0x1c1)]?.[_0x4e24bc(0x1db)]),_0x5c6ab6=[],_0x572eac=[],_0x19e72f=[],_0x47d0cb=[];for(const _0x1d9195 of _0x55b057){const _0x20f35c=_0x36bfd1['failures'][_0x4e24bc(0x226)](_0x1d9195[_0x4e24bc(0x1f3)]);if(_0x20f35c){_0x47d0cb[_0x4e24bc(0x225)]({'lockKey':_0x1d9195[_0x4e24bc(0x1f3)],'error':_0x20f35c});continue;}const _0x2c0d5c=await computeFileHash(_0x1d9195[_0x4e24bc(0x1de)]),_0x57c1f5=_0x7a9c95[_0x4e24bc(0x1e4)][_0x1d9195[_0x4e24bc(0x1f3)]];if(!_0x16621e&&_0x57c1f5&&_0x57c1f5[_0x4e24bc(0x220)]===_0x2c0d5c){_0x572eac[_0x4e24bc(0x225)]({'lockKey':_0x1d9195[_0x4e24bc(0x1f3)],'reason':_0x4e24bc(0x1d0)});continue;}if(_0x57c1f5?.[_0x4e24bc(0x1fa)]&&_0x57c1f5[_0x4e24bc(0x1ef)]==null){_0x19e72f[_0x4e24bc(0x225)](missingRemoteVersionConflict(_0x1d9195,_0x57c1f5));continue;}try{await uploadSingleFunction(_0x546e4d[_0x4e24bc(0x1fd)],_0x1d9195,_0x7a9c95,_0x36bfd1);const _0x1c2659=_0x7a9c95[_0x4e24bc(0x1e4)][_0x1d9195[_0x4e24bc(0x1f3)]];_0x5c6ab6['push']({'lockKey':_0x1d9195['lockKey'],'remoteId':_0x1c2659?.[_0x4e24bc(0x1fa)]??0x0});}catch(_0x214777){const _0x2aa472=remoteVersionChangedConflict(_0x1d9195,_0x57c1f5,_0x214777);if(_0x2aa472){_0x19e72f[_0x4e24bc(0x225)](_0x2aa472);continue;}_0x47d0cb[_0x4e24bc(0x225)]({'lockKey':_0x1d9195[_0x4e24bc(0x1f3)],'error':_0x214777 instanceof Error?_0x214777[_0x4e24bc(0x1df)]:String(_0x214777)});}}_0x7a9c95[_0x4e24bc(0x1dd)]=new Date()['toISOString'](),await writeBffLockFile(_0x1e0fa0[_0x4e24bc(0x1d2)],_0x1a0147),await waitForUploadedLockEntries(_0x1e0fa0[_0x4e24bc(0x1d2)],_0x546e4d[_0x4e24bc(0x1fd)],_0x5c6ab6['map'](_0x13cacb=>_0x13cacb[_0x4e24bc(0x1f3)]));let _0x4447ff={'attempted':![],'cleared':![]};if(_0x5c6ab6['length']>0x0)try{let _0x5198df='';for(let _0x2445eb=0x0;_0x2445eb<CACHE_CLEAR_ATTEMPTS;_0x2445eb+=0x1){_0x5198df=await clearBffScriptCache(),_0x2445eb<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x4447ff={'attempted':!![],'cleared':!![],'message':_0x5198df||_0x4e24bc(0x229)};}catch(_0x110e0a){_0x4447ff={'attempted':!![],'cleared':![],'error':_0x110e0a instanceof Error?_0x110e0a[_0x4e24bc(0x1df)]:String(_0x110e0a)};}const _0x29db53=_0x47d0cb[_0x4e24bc(0x1f1)]===0x0&&(_0x4447ff[_0x4e24bc(0x1ff)]?_0x4447ff[_0x4e24bc(0x1e9)]:!![]),_0x41e941=_0x29db53,_0x4d7520=_0x4447ff[_0x4e24bc(0x1ff)]?_0x4447ff[_0x4e24bc(0x1e9)]?_0x4e24bc(0x1dc):_0x4e24bc(0x1bb):_0x4e24bc(0x224);return{'ok':_0x41e941,'data':{'uploaded':_0x5c6ab6,'skipped':_0x572eac,'conflicts':_0x19e72f,'failed':_0x47d0cb,'cacheClear':_0x4447ff,'warnings':[...[..._0x36bfd1[_0x4e24bc(0x1c5)][_0x4e24bc(0x1d8)]()][_0x4e24bc(0x210)](_0x3a5c91=>_0x3a5c91['warnings']),...[..._0x36bfd1[_0x4e24bc(0x1e2)]][_0x4e24bc(0x1c6)](existingHookWarning)]},'message':formatPushMessage(_0x5c6ab6['length'],_0x572eac[_0x4e24bc(0x1f1)],_0x19e72f[_0x4e24bc(0x1f1)],_0x47d0cb['length'],_0x4d7520)};}};function missingRemoteVersionConflict(_0x14251e,_0x5a9afe){const _0x1b47e2=a44_0xad0615;return remoteVersionConflict(_0x14251e,_0x5a9afe,_0x1b47e2(0x212),_0x1b47e2(0x1ea));}function remoteVersionChangedConflict(_0x487e2e,_0x3ad80c,_0x207844){const _0x1c0816=a44_0xad0615;if(!_0x3ad80c?.['remoteId']||_0x3ad80c['version']==null||!isRemoteVersionConflict(_0x207844))return undefined;return remoteVersionConflict(_0x487e2e,_0x3ad80c,_0x1c0816(0x20b),_0x1c0816(0x1fb));}function remoteVersionConflict(_0x17b2e9,_0x2c8b30,_0x483cc0,_0xd1016){const _0x121e43=a44_0xad0615;return{'code':_0x483cc0,'lockKey':_0x17b2e9[_0x121e43(0x1f3)],'filePath':_0x17b2e9[_0x121e43(0x1de)],'remoteId':_0x2c8b30[_0x121e43(0x1fa)],..._0x2c8b30[_0x121e43(0x1ef)]!=null?{'expectedVersion':_0x2c8b30[_0x121e43(0x1ef)]}:{},'message':_0xd1016,'nextAction':{'action':_0x121e43(0x1f0),'command':CLI_BIN_NAME+'\x20bff\x20detail\x20--id\x20'+_0x2c8b30[_0x121e43(0x1fa)]+_0x121e43(0x1bd),'requiresReview':!![],'message':_0x121e43(0x204)}};}function isRemoteVersionConflict(_0x4d094f){const _0x4a53ab=a44_0xad0615,_0x31f6b9=_0x4d094f instanceof Error?_0x4d094f[_0x4a53ab(0x1df)]:String(_0x4d094f),_0x298b6b=getPlatformErrorCode(_0x4d094f)??'';return[_0x31f6b9,_0x298b6b]['some'](_0x3edd7c=>/(?:version|optimistic)[\s_-]*(?:conflict|mismatch|changed|stale|out[\s_-]*of[\s_-]*date)|(?:conflict|mismatch|changed|stale|out[\s_-]*of[\s_-]*date)[\s_-]*(?:version|optimistic)/i[_0x4a53ab(0x200)](_0x3edd7c));}function a44_0x3283(){const _0x204300=['9EpSqmE','\x20--format\x20compress','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','Lock\x20scope\x20for\x20app\x20\x22','currentApp','mergedCli','afterScriptId','stringify','description','resolutions','map','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','size','dataset','functionName','\x20conflict','Push\x20only\x20this\x20script\x20type','string','before','script','unchanged','failures','lockFilePath','profileName','set','filter','Local\x20function\x20not\x20found:\x20','startsWith','values','datasetCode','58685kRCirP','defaultApp','runtime\x20cache\x20cleared','lastSync','filePath','message','No\x20local\x20Backend\x20Function\x20scripts\x20found.','1515840KRLRnj','existingHooks','\x20uploaded','functions','scriptType','alias','apiDir','name','cleared','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','\x22\x20not\x20found\x20after\x20ensureLockScope.','scriptsRoot','operationType','HOOK_DATASET_NOT_FOUND:','version','review_remote_and_merge','length','datasetId','lockKey','326082OWseyF','bool','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','Incomplete\x20HOOK\x20path:\x20','str','force','remoteId','Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.','Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.','appCode','conflict','attempted','test','15INZrch','selectedAppName','parse','Review\x20the\x20current\x20remote\x20source,\x20merge\x20it\x20into\x20the\x20local\x20script,\x20then\x20retry\x20push.\x20Do\x20not\x20use\x20--force\x20unless\x20you\x20intentionally\x20discard\x20local\x20changes.','every','283924OZkqOX','Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20','5985680ADfByf','requires','Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.','BFF_REMOTE_VERSION_CHANGED','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','functionNode','Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.','bff','flatMap','delete','BFF_REMOTE_VERSION_MISSING','\x20resolution','create','apps',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','failed','join','22736BNgSkk','/api/management/library/scripts/save','HOOK','would_push','write','add','25718QDfpqc','hash','Would\x20inspect\x20','require','some','runtime\x20cache\x20not\x20needed','push','get','beforeScriptId','525OqukVa','Runtime\x20script\x20cache\x20cleared.','Push\x20complete:\x20','type','has','EXISTING_HOOK_BINDING_PRESERVED','utf8','validation','runtime\x20cache\x20clear\x20failed'];a44_0x3283=function(){return _0x204300;};return a44_0x3283();}function formatPushMessage(_0x5e031d,_0x3e1fda,_0x1a3e8f,_0x4054c5,_0x2140ed){const _0x35676c=a44_0xad0615,_0x116840=[_0x35676c(0x22a)+_0x5e031d+_0x35676c(0x1e3),_0x3e1fda+'\x20skipped'];_0x1a3e8f>0x0&&_0x116840[_0x35676c(0x225)](_0x1a3e8f+_0x35676c(0x1cb)+(_0x1a3e8f===0x1?'':'s')+'\x20'+(_0x1a3e8f===0x1?_0x35676c(0x209):_0x35676c(0x222))+_0x35676c(0x213));if(_0x4054c5>0x0)_0x116840['push'](_0x4054c5+'\x20failed');return _0x116840[_0x35676c(0x225)](_0x2140ed),_0x116840[_0x35676c(0x218)](',\x20');}async function getTargetFunctions(_0x2eaa5b,_0x448ab0){const _0x5243ea=a44_0xad0615,_0x337f17=_0x448ab0[_0x5243ea(0x1f8)]('type'),_0x1488bd=_0x448ab0[_0x5243ea(0x1f8)](_0x5243ea(0x1e8)),_0x27d159=normalizeBffType(_0x337f17)??undefined;if(_0x1488bd&&!_0x27d159)throw CliErrors[_0x5243ea(0x1ba)](_0x5243ea(0x1c7));const _0x330b0d=await scanLocalBffFunctions(_0x2eaa5b,_0x27d159);if(_0x1488bd){const _0x234dec=_0x330b0d[_0x5243ea(0x1d5)](_0x8968ee=>_0x8968ee[_0x5243ea(0x1e8)]===_0x1488bd);if(_0x234dec[_0x5243ea(0x1f1)]===0x0)throw CliErrors['validation'](_0x5243ea(0x1d6)+_0x27d159+'/'+_0x1488bd);return _0x234dec;}return _0x330b0d;}function existingHookWarning(_0x4719e7){const _0x48f89b=a44_0xad0615;return{'code':_0x48f89b(0x1b8),'lockKey':_0x4719e7,'message':_0x48f89b(0x1fc)};}async function buildHookMaps(_0x4e2b8f,_0x2624d1,_0x272340,_0x18d400,_0x3bbf26){const _0x199866=a44_0xad0615,_0x17c5a0=_0x272340[_0x199866(0x223)](_0x3f0f24=>_0x3f0f24[_0x199866(0x22b)]==='HOOK');if(!_0x17c5a0)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0x2d6e2e=resolveApiModelSource(_0x2624d1,_0x4e2b8f,_0x3bbf26),_0x1ce584=loadAliasMap(_0x2624d1,undefined,_0x2d6e2e['filePath'],_0x2d6e2e[_0x199866(0x1d3)]);assertUnambiguousHookAliases(_0x1ce584);const _0x54c25c=[..._0x1ce584[_0x199866(0x1c6)](_0x525ebc=>[_0x525ebc[_0x199866(0x1e6)],_0x525ebc[_0x199866(0x1d9)]]),...trackedHookDirectoryMappings(_0x18d400)[_0x199866(0x1c6)](_0x4fafe8=>[_0x4fafe8[_0x199866(0x1e6)],_0x4fafe8[_0x199866(0x1d9)]])],_0x3077b7=await listDatasets(_0x4e2b8f);assertUnambiguousHookDirectoryMappings(_0x54c25c[_0x199866(0x1c6)](([_0x41f303,_0x13f596])=>({'alias':_0x41f303,'datasetCode':_0x13f596})));const _0x348128=buildHookDirectoryIndexes(_0x3077b7,_0x54c25c),_0x3c9795=new Map(),_0x57af78=preflightPushHookDirectories(_0x272340,_0x18d400,_0x348128,_0x3c9795),_0x3a5b80=new Set(),_0x373b2d=_0x272340['filter'](_0x16a75a=>_0x3c9795[_0x199866(0x226)](_0x16a75a[_0x199866(0x1f3)])?.[_0x199866(0x1d7)](_0x199866(0x1ee))&&_0x18d400[_0x199866(0x1e4)][_0x16a75a[_0x199866(0x1f3)]]?.[_0x199866(0x1fa)]&&_0x18d400[_0x199866(0x1e4)][_0x16a75a[_0x199866(0x1f3)]]?.[_0x199866(0x1d9)]);if(_0x373b2d[_0x199866(0x1f1)]>0x0){let _0x445a60;try{_0x445a60=await getBffScriptStatistics(_0x4e2b8f);}catch(_0x317dd4){for(const _0x4ace7d of _0x373b2d)_0x3c9795['set'](_0x4ace7d[_0x199866(0x1f3)],_0x199866(0x207)+(_0x317dd4 instanceof Error?_0x317dd4[_0x199866(0x1df)]:String(_0x317dd4)));return{'resolutions':_0x57af78,'failures':_0x3c9795,'existingHooks':_0x3a5b80};}for(const _0x15e312 of _0x373b2d){const _0x1af62c=_0x18d400[_0x199866(0x1e4)][_0x15e312['lockKey']];try{const _0xb71ffd=new Set(_0x272340[_0x199866(0x1d5)](_0x2f18b7=>_0x2f18b7[_0x199866(0x22b)]===_0x199866(0x21b)&&_0x18d400[_0x199866(0x1e4)][_0x2f18b7['lockKey']]?.['datasetCode']===_0x1af62c[_0x199866(0x1d9)])[_0x199866(0x1c6)](_0x20fe21=>_0x20fe21[_0x199866(0x1e6)]));if(_0xb71ffd[_0x199866(0x1c8)]>0x1)throw CliErrors[_0x199866(0x1ba)](_0x199866(0x20a));const _0x3a6a08=_0x445a60[_0x199866(0x210)](_0x26f7a2=>[{'datasetCode':_0x26f7a2['datasetCode'],'operationType':snakeToCamel(_0x26f7a2[_0x199866(0x1ed)]),'functionNode':_0x199866(0x1ce),'id':_0x26f7a2[_0x199866(0x227)]},{'datasetCode':_0x26f7a2['datasetCode'],'operationType':snakeToCamel(_0x26f7a2['operationType']),'functionNode':'after','id':_0x26f7a2[_0x199866(0x1c2)]}])[_0x199866(0x1d5)](_0x31f27d=>_0x31f27d['id']===_0x1af62c[_0x199866(0x1fa)]),_0x68a49b=await getBffScriptInfo(_0x1af62c[_0x199866(0x1fa)]);if(_0x68a49b['id']!==_0x1af62c['remoteId']||_0x68a49b[_0x199866(0x1fd)]!==_0x4e2b8f||_0x68a49b[_0x199866(0x1e5)]!==_0x199866(0x21b)||_0x68a49b[_0x199866(0x1ca)]!==_0x15e312[_0x199866(0x1e8)]||_0x1af62c['version']==null||_0x68a49b[_0x199866(0x1ef)]!==_0x1af62c['version']||_0x3a6a08[_0x199866(0x1f1)]!==0x1||_0x3a6a08[0x0]['datasetCode']!==_0x1af62c[_0x199866(0x1d9)]||_0x3a6a08[0x0][_0x199866(0x1ed)]!==_0x15e312[_0x199866(0x1ed)]||_0x3a6a08[0x0][_0x199866(0x20d)]!==_0x15e312[_0x199866(0x20d)]||_0x1af62c[_0x199866(0x1ed)]!==_0x15e312[_0x199866(0x1ed)]||_0x1af62c['functionNode']!==_0x15e312['functionNode'])throw CliErrors['validation'](_0x199866(0x20e));_0x3a5b80[_0x199866(0x21e)](_0x15e312['lockKey']),_0x3c9795[_0x199866(0x211)](_0x15e312[_0x199866(0x1f3)]);}catch(_0x1421b3){_0x3c9795[_0x199866(0x1d4)](_0x15e312[_0x199866(0x1f3)],_0x1421b3 instanceof Error?_0x1421b3[_0x199866(0x1df)]:String(_0x1421b3));}}}return{'resolutions':_0x57af78,'failures':_0x3c9795,'existingHooks':_0x3a5b80};}async function uploadSingleFunction(_0x41082a,_0x252b88,_0xcae50b,_0x504c0e){const _0x818bb1=a44_0xad0615,_0x20081f=await readFile(_0x252b88[_0x818bb1(0x1de)],_0x818bb1(0x1b9)),_0x5ac78e=await computeFileHash(_0x252b88[_0x818bb1(0x1de)]),_0x11d353=_0xcae50b[_0x818bb1(0x1e4)][_0x252b88['lockKey']];if(_0x11d353?.[_0x818bb1(0x1fa)]&&_0x11d353[_0x818bb1(0x1ef)]==null)throw CliErrors[_0x818bb1(0x1ba)](_0x252b88[_0x818bb1(0x1f3)]+_0x818bb1(0x216));let _0x20e499=extractScriptDescription(_0x20081f);if(!_0x20e499&&_0x11d353?.['remoteId']){const _0x437872=await getBffScriptInfo(_0x11d353['remoteId']);_0x20e499=_0x437872[_0x818bb1(0x1c4)]||undefined;}const _0x1413f1={'appCode':_0x41082a,'functionName':_0x252b88[_0x818bb1(0x1e8)],'scriptType':_0x252b88[_0x818bb1(0x22b)],'scriptContent':_0x20081f};if(_0x11d353?.['remoteId'])_0x1413f1['id']=_0x11d353[_0x818bb1(0x1fa)];if(_0x11d353?.[_0x818bb1(0x1ef)]!=null)_0x1413f1[_0x818bb1(0x1ef)]=_0x11d353[_0x818bb1(0x1ef)];if(_0x20e499)_0x1413f1[_0x818bb1(0x1c4)]=_0x20e499;if(_0x252b88[_0x818bb1(0x22b)]==='HOOK'){const _0x43ed73=_0x504c0e['resolutions'][_0x818bb1(0x226)](_0x252b88[_0x818bb1(0x1f3)]);if(!_0x43ed73&&!_0x504c0e['existingHooks'][_0x818bb1(0x1b7)](_0x252b88[_0x818bb1(0x1f3)])||!_0x252b88[_0x818bb1(0x1ed)]||!_0x252b88[_0x818bb1(0x20d)])throw CliErrors['validation'](_0x818bb1(0x1f7)+_0x252b88[_0x818bb1(0x1f3)]);_0x43ed73&&(_0x1413f1[_0x818bb1(0x1f2)]=_0x43ed73[_0x818bb1(0x1c9)]['id'],_0x1413f1[_0x818bb1(0x1ed)]=_0x252b88[_0x818bb1(0x1ed)]),_0x1413f1[_0x818bb1(0x20d)]=_0x252b88[_0x818bb1(0x20d)];}const _0x4d3495=await saveBffScript(_0x1413f1),_0x3b295a=_0x4d3495['id'],_0x364f97=_0x4d3495[_0x818bb1(0x1cf)]??await getBffScriptInfo(_0x3b295a),_0x12c99d={'hash':_0x5ac78e,'remoteId':_0x3b295a,'version':_0x364f97[_0x818bb1(0x1ef)]};if(_0x252b88[_0x818bb1(0x22b)]===_0x818bb1(0x21b)){const _0x556d1a=_0x504c0e[_0x818bb1(0x1c5)][_0x818bb1(0x226)](_0x252b88[_0x818bb1(0x1f3)]);if(!_0x556d1a){_0xcae50b[_0x818bb1(0x1e4)][_0x252b88[_0x818bb1(0x1f3)]]={..._0x11d353,..._0x12c99d};return;}_0x12c99d[_0x818bb1(0x1e6)]=_0x556d1a[_0x818bb1(0x1e6)]??_0x11d353?.[_0x818bb1(0x1e6)],_0x12c99d[_0x818bb1(0x1d9)]=_0x556d1a['datasetCode'],_0x12c99d[_0x818bb1(0x1ed)]=_0x252b88[_0x818bb1(0x1ed)],_0x12c99d[_0x818bb1(0x20d)]=_0x252b88[_0x818bb1(0x20d)];}_0xcae50b[_0x818bb1(0x1e4)][_0x252b88[_0x818bb1(0x1f3)]]=_0x12c99d;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x16b99b,_0x15fac8,_0x2cc9f0){const _0x1f9fc7=a44_0xad0615;if(_0x2cc9f0[_0x1f9fc7(0x1f1)]===0x0)return;for(let _0x1b8dfa=0x0;_0x1b8dfa<LOCK_SETTLE_RETRY_COUNT;_0x1b8dfa+=0x1){const _0x13eed1=await readBffLockFile(_0x16b99b),_0x545abe=_0x13eed1?.['apps']?.[_0x15fac8]?.['functions']??{},_0x59d6f7=_0x2cc9f0[_0x1f9fc7(0x205)](_0x2ea208=>!!_0x545abe[_0x2ea208]?.[_0x1f9fc7(0x1fa)]);if(_0x59d6f7)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x1f9fc7(0x20c)+_0x2cc9f0['join'](',\x20')+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a45_0x20a382=a45_0x3564;(function(_0x277e1d,_0x5a69ff){const _0x5b71bb=a45_0x3564,_0x44c136=_0x277e1d();while(!![]){try{const _0x49a2d6=-parseInt(_0x5b71bb(0xfc))/0x1+-parseInt(_0x5b71bb(0xff))/0x2+parseInt(_0x5b71bb(0xef))/0x3*(-parseInt(_0x5b71bb(0x112))/0x4)+-parseInt(_0x5b71bb(0x10c))/0x5+-parseInt(_0x5b71bb(0x104))/0x6*(-parseInt(_0x5b71bb(0xfe))/0x7)+-parseInt(_0x5b71bb(0x107))/0x8+parseInt(_0x5b71bb(0x105))/0x9;if(_0x49a2d6===_0x5a69ff)break;else _0x44c136['push'](_0x44c136['shift']());}catch(_0x3abda4){_0x44c136['push'](_0x44c136['shift']());}}}(a45_0x5aca,0x710be));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiModelSource}from'../../api/model-source.js';import{loadBffProjectConfig}from'../../core/bff/config.js';function a45_0x5aca(){const _0x398dc1=['profileName','boolean','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','all','2508540jtFQBX','defaultApp','datasetCode','remote','\x20modified,\x20','All\x20Backend\x20Function\x20scripts\x20are\x20in\x20sync.','104OccGIL','hash','6504cBuKNS','appCode','apiDir','filePath','length','currentApp','has','read','map','\x20added,\x20','status','bff','\x20remote-only','766729wclWQd','mergedCli','23891yBXwEI','568806NYdWBM','Check\x20local\x20Backend\x20Function\x20sync\x20status\x20against\x20lock\x20file','bool','\x20unchanged','functions','36LbMWCz','25412346ntIZhH','lockKey','6174608wEbdir'];a45_0x5aca=function(){return _0x398dc1;};return a45_0x5aca();}import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';function a45_0x3564(_0x3cca7b,_0x45eb24){_0x3cca7b=_0x3cca7b-0xef;const _0x5aca54=a45_0x5aca();let _0x35644d=_0x5aca54[_0x3cca7b];return _0x35644d;}export const bffStatus={'service':a45_0x20a382(0xfa),'command':'status','description':a45_0x20a382(0x100),'risk':a45_0x20a382(0xf6),'flags':[{'name':a45_0x20a382(0x10f),'type':a45_0x20a382(0x109),'description':a45_0x20a382(0x10a)}],async 'execute'(_0x58397b){const _0x2af1c9=a45_0x20a382,_0x594e9f=loadBffProjectConfig(_0x58397b[_0x2af1c9(0xf0)]),_0x168a75=await readBffLockFile(_0x594e9f['lockFilePath']),{appLock:_0x4b9436}=ensureLockScope(_0x168a75??createEmptyBffLock(),_0x58397b[_0x2af1c9(0xf0)],_0x594e9f['scriptsRoot'],_0x2af1c9(0xf9)),_0x4bd572=await scanLocalBffFunctions(_0x594e9f),_0x40eb4c=[],_0x534170=[],_0x7c27a3=[];for(const _0x5a305a of _0x4bd572){const _0x5dc466=await computeFileHash(_0x5a305a['filePath']),_0x1dc141=_0x4b9436[_0x2af1c9(0x103)][_0x5a305a[_0x2af1c9(0x106)]];if(!_0x1dc141)_0x40eb4c['push'](_0x5a305a[_0x2af1c9(0x106)]);else _0x1dc141[_0x2af1c9(0x113)]!==_0x5dc466?_0x534170['push'](_0x5a305a[_0x2af1c9(0x106)]):_0x7c27a3['push'](_0x5a305a[_0x2af1c9(0x106)]);}const _0x29c63f=[];if(_0x58397b[_0x2af1c9(0x101)]('remote')){const _0xd67065=resolveApiModelSource(_0x58397b[_0x2af1c9(0xf1)],_0x58397b[_0x2af1c9(0xf0)],_0x58397b['selectedAppName']||_0x58397b[_0x2af1c9(0xfd)]?.[_0x2af1c9(0xf4)]||_0x58397b[_0x2af1c9(0xfd)]?.[_0x2af1c9(0x10d)]),_0x3c17f7=loadAliasMap(_0x58397b[_0x2af1c9(0xf1)],undefined,_0xd67065[_0x2af1c9(0xf2)],_0xd67065[_0x2af1c9(0x108)]),_0x4d55a7=new Map(_0x3c17f7[_0x2af1c9(0xf7)](_0x3692f0=>[_0x3692f0[_0x2af1c9(0x10e)],_0x3692f0['alias']])),[_0x192d3c,_0x5b7129]=await Promise[_0x2af1c9(0x10b)]([listBffScripts(_0x58397b['appCode']),getBffScriptStatistics(_0x58397b['appCode'])]),_0x587419=createHookLocationMap(_0x5b7129),_0x3e12d6=new Set(_0x4bd572[_0x2af1c9(0xf7)](_0x20e2a2=>_0x20e2a2['lockKey']));for(const _0x210efb of _0x192d3c){const _0x2b4853=resolveRemoteScriptTarget(_0x594e9f,_0x210efb,_0x587419,_0x4b9436['functions'],_0x4d55a7);_0x2b4853&&!_0x3e12d6[_0x2af1c9(0xf5)](_0x2b4853['lockKey'])&&_0x29c63f['push'](_0x2b4853['lockKey']);}}const _0xab5f95=_0x40eb4c['length']===0x0&&_0x534170[_0x2af1c9(0xf3)]===0x0&&_0x29c63f[_0x2af1c9(0xf3)]===0x0;return{'ok':!![],'data':{'added':_0x40eb4c,'modified':_0x534170,'unchanged':_0x7c27a3,'remoteOnly':_0x29c63f},'message':_0xab5f95?_0x2af1c9(0x111):_0x40eb4c[_0x2af1c9(0xf3)]+_0x2af1c9(0xf8)+_0x534170[_0x2af1c9(0xf3)]+_0x2af1c9(0x110)+_0x7c27a3[_0x2af1c9(0xf3)]+_0x2af1c9(0x102)+(_0x29c63f[_0x2af1c9(0xf3)]>0x0?',\x20'+_0x29c63f[_0x2af1c9(0xf3)]+_0x2af1c9(0xfb):'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a46_0x1efc(){const _0x4d9526=['inherit','2010306PkURHL','read','apiError','576279hTzDWH','\x20via\x20skills@latest','1756263xmbYBk','CLI\x20Built-in\x20Skill\x20','88dFDBlk','10STujrL','error','repairCommand','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','\x20installed','cli-skill','installedPath','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','\x20at\x20','skillVersion','969160gmZSqT','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.','log',']:\x20','\x20is\x20already\x20current','3813754BVVprL','626233aBijtf','info','496496ioxDTm'];a46_0x1efc=function(){return _0x4d9526;};return a46_0x1efc();}const a46_0xa3a594=a46_0x2c1a;function a46_0x2c1a(_0x1db1b5,_0xc890f5){_0x1db1b5=_0x1db1b5-0x169;const _0x1efc71=a46_0x1efc();let _0x2c1a42=_0x1efc71[_0x1db1b5];return _0x2c1a42;}(function(_0x58e954,_0x3368e0){const _0x88a1f9=a46_0x2c1a,_0x27fad5=_0x58e954();while(!![]){try{const _0x2df87d=-parseInt(_0x88a1f9(0x170))/0x1+-parseInt(_0x88a1f9(0x16a))/0x2+-parseInt(_0x88a1f9(0x179))/0x3+parseInt(_0x88a1f9(0x172))/0x4+parseInt(_0x88a1f9(0x17c))/0x5*(parseInt(_0x88a1f9(0x174))/0x6)+parseInt(_0x88a1f9(0x16f))/0x7+parseInt(_0x88a1f9(0x17b))/0x8*(parseInt(_0x88a1f9(0x177))/0x9);if(_0x2df87d===_0x3368e0)break;else _0x27fad5['push'](_0x27fad5['shift']());}catch(_0x2c4ad3){_0x27fad5['push'](_0x27fad5['shift']());}}}(a46_0x1efc,0x54c13));import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a46_0xa3a594(0x181),'command':'install','description':a46_0xa3a594(0x17f),'risk':a46_0xa3a594(0x175),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x569e7d){const _0x100cd9=a46_0xa3a594;logger['setLogPath'](process['cwd']()),logger[_0x100cd9(0x171)]('cli-skill-install',_0x100cd9(0x16b));const _0x47b7af=installBuiltinSkill({'stdio':_0x569e7d['nonInteractive']?'pipe':_0x100cd9(0x173)});if(!_0x47b7af['ok'])throw CliErrors[_0x100cd9(0x176)]('Built-in\x20Skill\x20install\x20failed\x20['+_0x47b7af['code']+_0x100cd9(0x16d)+(_0x47b7af[_0x100cd9(0x17d)]||'unknown'),_0x100cd9(0x183)+_0x47b7af[_0x100cd9(0x17e)]);return console[_0x100cd9(0x16c)](_0x47b7af['changed']?_0x100cd9(0x17a)+_0x47b7af[_0x100cd9(0x169)]+_0x100cd9(0x180)+(_0x47b7af[_0x100cd9(0x182)]?_0x100cd9(0x184)+_0x47b7af[_0x100cd9(0x182)]:_0x100cd9(0x178)):_0x100cd9(0x17a)+_0x47b7af[_0x100cd9(0x169)]+_0x100cd9(0x16e)+(_0x47b7af['installedPath']?'\x20at\x20'+_0x47b7af['installedPath']:'')),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a47_0x4a4ad6=a47_0x1022;(function(_0x590a4,_0x2d020d){const _0x1ac6c8=a47_0x1022,_0xa484e8=_0x590a4();while(!![]){try{const _0x6f8a3=-parseInt(_0x1ac6c8(0x19d))/0x1+-parseInt(_0x1ac6c8(0x1a8))/0x2*(parseInt(_0x1ac6c8(0x16f))/0x3)+parseInt(_0x1ac6c8(0x177))/0x4*(parseInt(_0x1ac6c8(0x1a1))/0x5)+parseInt(_0x1ac6c8(0x16a))/0x6*(parseInt(_0x1ac6c8(0x15e))/0x7)+-parseInt(_0x1ac6c8(0x1b0))/0x8*(-parseInt(_0x1ac6c8(0x196))/0x9)+-parseInt(_0x1ac6c8(0x19e))/0xa+-parseInt(_0x1ac6c8(0x192))/0xb*(parseInt(_0x1ac6c8(0x16e))/0xc);if(_0x6f8a3===_0x2d020d)break;else _0xa484e8['push'](_0xa484e8['shift']());}catch(_0x1c2e03){_0xa484e8['push'](_0xa484e8['shift']());}}}(a47_0xe046,0xafa97));import a47_0x2cd555 from'chalk';function a47_0x1022(_0x456692,_0x3939c8){_0x456692=_0x456692-0x15e;const _0xe04678=a47_0xe046();let _0x1022cf=_0xe04678[_0x456692];return _0x1022cf;}import a47_0x9ca438 from'ora';import a47_0x128e4e from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x536ccf=a47_0x1022;return GIT_COMMIT!==_0x536ccf(0x166)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x536ccf(0x1af)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x43c63a=a47_0x1022,_0x46548d=process[_0x43c63a(0x179)][_0x43c63a(0x1a5)]();if(_0x46548d[_0x43c63a(0x1a2)](_0x43c63a(0x182)))return _0x43c63a(0x182);return _0x43c63a(0x183);}const updateFlags=[{'name':a47_0x4a4ad6(0x18b),'type':a47_0x4a4ad6(0x185),'description':a47_0x4a4ad6(0x186),'default':![]},{'name':a47_0x4a4ad6(0x173),'type':a47_0x4a4ad6(0x163),'description':a47_0x4a4ad6(0x172)}];function getRequestedVersion(_0x5003e1){const _0x359ac3=a47_0x4a4ad6;return _0x5003e1[_0x359ac3(0x176)](_0x359ac3(0x173))[_0x359ac3(0x18f)]();}async function validateUpdateFlags(_0x582c40){const _0x1b92dc=a47_0x4a4ad6,_0x3e09d5=_0x582c40[_0x1b92dc(0x1a3)](_0x1b92dc(0x18b)),_0x5cc3f2=getRequestedVersion(_0x582c40);if(_0x3e09d5&&_0x5cc3f2)throw CliErrors[_0x1b92dc(0x1ad)](_0x1b92dc(0x16b),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x5cc3f2&&!a47_0x128e4e[_0x1b92dc(0x17b)](_0x5cc3f2))throw CliErrors[_0x1b92dc(0x1ad)](_0x1b92dc(0x17a)+_0x5cc3f2,_0x1b92dc(0x160));}async function fetchNpmDistTags(){const _0x5b0580=a47_0x4a4ad6;try{const _0x592f3c=await fetch(_0x5b0580(0x171)+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0x5b0580(0x168)](0x2710)});if(!_0x592f3c['ok'])return null;const _0x534132=await _0x592f3c['json']();if(!_0x534132||typeof _0x534132!==_0x5b0580(0x190))return null;return Object[_0x5b0580(0x1ac)](Object[_0x5b0580(0x18e)](_0x534132)[_0x5b0580(0x161)](([,_0x4e65eb])=>typeof _0x4e65eb===_0x5b0580(0x163)&&_0x4e65eb[_0x5b0580(0x18f)]()[_0x5b0580(0x187)]>0x0)['map'](([_0x13ec1f,_0x26bbe6])=>[_0x13ec1f,String(_0x26bbe6)[_0x5b0580(0x18f)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x68aff3){const _0x45ebea=await fetchNpmDistTags();return _0x45ebea?.[_0x68aff3]??null;}async function fetchLatestVersion(){return fetchNpmDistTagVersion('latest');}async function resolveTargetVersion(_0x481a24){const _0x74faf2=a47_0x4a4ad6,_0x120c8f=getRequestedVersion(_0x481a24);if(_0x120c8f)return{'version':_0x120c8f,'source':_0x74faf2(0x173)};if(_0x481a24[_0x74faf2(0x1a3)](_0x74faf2(0x18b))){const _0x178712=await fetchNpmDistTagVersion(_0x74faf2(0x18b));if(!_0x178712)return null;return{'version':_0x178712,'source':_0x74faf2(0x18b)};}const _0x2a4193=await fetchLatestVersion();if(!_0x2a4193)return null;return{'version':_0x2a4193,'source':_0x74faf2(0x19c)};}function shouldInstallTarget(_0x31caff,_0xdee013){const _0xf6ae57=a47_0x4a4ad6;if(_0xdee013[_0xf6ae57(0x188)]==='version'||_0xdee013['source']===_0xf6ae57(0x18b))return!a47_0x128e4e['eq'](_0x31caff,_0xdee013[_0xf6ae57(0x173)]);return a47_0x128e4e['lt'](_0x31caff,_0xdee013['version']);}function getInstallPlanLabel(_0x9301be,_0x3709f1){const _0x4b5ee6=a47_0x4a4ad6;switch(_0x3709f1[_0x4b5ee6(0x188)]){case'beta':return'Beta\x20version:\x20'+a47_0x2cd555[_0x4b5ee6(0x164)](_0x9301be)+'\x20→\x20'+a47_0x2cd555[_0x4b5ee6(0x199)](_0x3709f1[_0x4b5ee6(0x173)]);case _0x4b5ee6(0x173):return'Requested\x20version:\x20'+a47_0x2cd555[_0x4b5ee6(0x164)](_0x9301be)+'\x20→\x20'+a47_0x2cd555['green'](_0x3709f1[_0x4b5ee6(0x173)]);case _0x4b5ee6(0x19c):default:return _0x4b5ee6(0x175)+a47_0x2cd555[_0x4b5ee6(0x164)](_0x9301be)+_0x4b5ee6(0x184)+a47_0x2cd555[_0x4b5ee6(0x199)](_0x3709f1[_0x4b5ee6(0x173)]);}}function repairCurrentBuiltinSkill(){const _0x2b30e7=a47_0x4a4ad6;console[_0x2b30e7(0x197)](a47_0x2cd555[_0x2b30e7(0x17d)]('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x72889a=installBuiltinSkill();if(_0x72889a['ok']){console[_0x2b30e7(0x197)](a47_0x2cd555['gray'](_0x2b30e7(0x194)+_0x72889a[_0x2b30e7(0x19f)]+'\x20is\x20up\x20to\x20date.'));return;}throw CliErrors[_0x2b30e7(0x18d)]('CLI\x20Built-in\x20Skill\x20repair\x20failed\x20['+_0x72889a[_0x2b30e7(0x193)]+_0x2b30e7(0x18c)+(_0x72889a[_0x2b30e7(0x181)]||'unknown'),_0x2b30e7(0x1ab)+_0x72889a[_0x2b30e7(0x17f)]+',\x20then\x20verify\x20with:\x20'+CLI_BIN_NAME+_0x2b30e7(0x17e));}function a47_0xe046(){const _0x438059=['5766306kjnJMi','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','expected\x20','Update\x20failed','3757692pNJMUB','1683WKPEpd','read','https://registry.npmjs.org/-/package/','Install\x20a\x20specific\x20CLI\x20version','version','update','Update\x20available:\x20','str','2478612FhoFiR','install','execPath','Invalid\x20version:\x20','valid','...','gray','\x20doctor','repairCommand','succeed','error','bun','npm','\x20→\x20','boolean','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','length','source','Current\x20version\x20v','Update\x20failed:\x20','beta',']:\x20','apiError','entries','trim','object','current','33xfzVKN','code','\x20\x20CLI\x20Built-in\x20Skill\x20','Check\x20the\x20CLI\x20and\x20npm\x20versions,\x20then\x20retry:\x20','766278QBXgxd','log','start','green','message','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','latest','431093GEUtVc','6732250cBnAeR','skillVersion','pipe','10jClcCQ','includes','bool','Current\x20version:\x20','toLowerCase','Try\x20manually:\x20npm\x20install\x20-g\x20','CLI\x20updated\x20to\x20v','118NVHcVi','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','info','Run:\x20','fromEntries','validation','state','slice','56rCcgPZ','fail','7mEzwEf','Version\x20comparison\x20failed','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','filter','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','string','yellow','Try\x20manually:\x20','unknown','run','timeout','Updated\x20to\x20v'];a47_0xe046=function(){return _0x438059;};return a47_0xe046();}function verifyUpdatedBuiltinSkill(_0x225756){const _0x265465=a47_0x4a4ad6,_0x550fcf=inspectInstalledBuiltinSkillVersion(_0x225756);if(_0x550fcf['state']===_0x265465(0x191)){console[_0x265465(0x197)](a47_0x2cd555[_0x265465(0x17d)]('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x225756+'\x20is\x20up\x20to\x20date.'));return;}const _0x32be2a=_0x550fcf[_0x265465(0x19f)]?_0x265465(0x16c)+_0x225756+',\x20found\x20'+_0x550fcf[_0x265465(0x19f)]:_0x265465(0x16c)+_0x225756+',\x20state\x20'+_0x550fcf[_0x265465(0x1ae)];throw CliErrors[_0x265465(0x18d)](_0x265465(0x1a7)+_0x225756+',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20'+_0x32be2a,_0x265465(0x1ab)+_0x550fcf[_0x265465(0x17f)]+',\x20then\x20verify\x20with:\x20'+CLI_BIN_NAME+_0x265465(0x17e));}async function execute(_0x48d364){const _0x5dde9c=a47_0x4a4ad6;await validateUpdateFlags(_0x48d364);const _0x2b19d1=getCurrentVersion();console[_0x5dde9c(0x197)](_0x5dde9c(0x1a4)+_0x2b19d1);const _0x4402b8=a47_0x9ca438('Checking\x20for\x20updates...')[_0x5dde9c(0x198)](),_0x3c4c62=await resolveTargetVersion(_0x48d364);if(!_0x3c4c62){const _0x22fdcd=_0x48d364[_0x5dde9c(0x1a3)](_0x5dde9c(0x18b))?'Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm':_0x5dde9c(0x1a9);_0x4402b8[_0x5dde9c(0x1b1)](_0x22fdcd);throw CliErrors[_0x5dde9c(0x18d)](_0x22fdcd,_0x5dde9c(0x1a6)+NPM_PACKAGE_NAME+'@'+(_0x48d364[_0x5dde9c(0x1a3)](_0x5dde9c(0x18b))?_0x5dde9c(0x18b):_0x5dde9c(0x19c)));}const _0x147398=a47_0x128e4e['valid'](VERSION),_0x34aa09=a47_0x128e4e[_0x5dde9c(0x17b)](_0x3c4c62[_0x5dde9c(0x173)]);if(!_0x147398||!_0x34aa09){_0x4402b8['fail']('Version\x20comparison\x20failed');throw CliErrors[_0x5dde9c(0x18d)](_0x5dde9c(0x15f),_0x5dde9c(0x195)+CLI_BIN_NAME+'\x20update\x20--version\x20<version>');}if(!shouldInstallTarget(_0x147398,_0x3c4c62)){const _0xa2285=_0x3c4c62[_0x5dde9c(0x188)]==='version'?'Already\x20on\x20requested\x20version\x20(v'+_0x3c4c62[_0x5dde9c(0x173)]+')':a47_0x128e4e['gt'](_0x147398,_0x34aa09)?_0x5dde9c(0x189)+_0x2b19d1+'\x20is\x20newer\x20than\x20npm\x20latest\x20v'+_0x3c4c62[_0x5dde9c(0x173)]:'Already\x20up\x20to\x20date\x20(v'+_0x3c4c62[_0x5dde9c(0x173)]+')';return _0x4402b8['succeed'](_0xa2285),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x4402b8[_0x5dde9c(0x1aa)](getInstallPlanLabel(_0x2b19d1,_0x3c4c62));const _0xa0edbf=detectPackageManager(),_0x4e0a18=_0xa0edbf===_0x5dde9c(0x183)?resolveNpmBin('npm'):_0xa0edbf,_0x10e6da=a47_0x9ca438('Updating\x20via\x20'+_0xa0edbf+_0x5dde9c(0x17c))[_0x5dde9c(0x198)]();try{await execa(_0x4e0a18,[_0x5dde9c(0x178),'-g',NPM_PACKAGE_NAME+'@'+_0x3c4c62[_0x5dde9c(0x173)]],{'stdio':_0x5dde9c(0x1a0)}),_0x10e6da[_0x5dde9c(0x180)](_0x5dde9c(0x169)+_0x3c4c62[_0x5dde9c(0x173)]),console['log'](a47_0x2cd555[_0x5dde9c(0x17d)](_0x5dde9c(0x19b)));}catch(_0x456595){_0x10e6da[_0x5dde9c(0x1b1)](_0x5dde9c(0x16d));throw CliErrors[_0x5dde9c(0x18d)](_0x5dde9c(0x18a)+(_0x456595 instanceof Error?_0x456595[_0x5dde9c(0x19a)]:String(_0x456595)),_0x5dde9c(0x165)+_0xa0edbf+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x3c4c62['version']);}return verifyUpdatedBuiltinSkill(_0x3c4c62[_0x5dde9c(0x173)]),{'ok':!![]};}export const updateDefinition={'service':a47_0x4a4ad6(0x174),'command':a47_0x4a4ad6(0x167),'description':a47_0x4a4ad6(0x162),'risk':a47_0x4a4ad6(0x170),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a47_0x5bb842=a47_0x107d;(function(_0x3e79cb,_0x23ea10){const _0x5be222=a47_0x107d,_0x1d64a9=_0x3e79cb();while(!![]){try{const _0x2160bb=parseInt(_0x5be222(0xf7))/0x1+parseInt(_0x5be222(0xeb))/0x2*(parseInt(_0x5be222(0xb1))/0x3)+-parseInt(_0x5be222(0xed))/0x4+-parseInt(_0x5be222(0xba))/0x5+-parseInt(_0x5be222(0xe8))/0x6*(parseInt(_0x5be222(0xf1))/0x7)+parseInt(_0x5be222(0xad))/0x8+parseInt(_0x5be222(0xc8))/0x9;if(_0x2160bb===_0x23ea10)break;else _0x1d64a9['push'](_0x1d64a9['shift']());}catch(_0x438460){_0x1d64a9['push'](_0x1d64a9['shift']());}}}(a47_0xf05d,0x495fe));import a47_0x378bf7 from'chalk';import a47_0xf35b70 from'ora';import a47_0x353f3f from'semver';import{execa}from'execa';function a47_0x107d(_0x47ccbe,_0x2c5152){_0x47ccbe=_0x47ccbe-0xac;const _0xf05d67=a47_0xf05d();let _0x107d2a=_0xf05d67[_0x47ccbe];return _0x107d2a;}import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0xea799e=a47_0x107d;return GIT_COMMIT!==_0xea799e(0xdb)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0xea799e(0xb7)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x5c6c72=a47_0x107d,_0x57f798=process['execPath'][_0x5c6c72(0xc6)]();if(_0x57f798['includes']('bun'))return'bun';return _0x5c6c72(0xbf);}const updateFlags=[{'name':'beta','type':a47_0x5bb842(0xe0),'description':a47_0x5bb842(0xb9),'default':![]},{'name':a47_0x5bb842(0xdd),'type':a47_0x5bb842(0xb6),'description':'Install\x20a\x20specific\x20CLI\x20version'}];function getRequestedVersion(_0x9241d5){const _0x4bc17b=a47_0x5bb842;return _0x9241d5[_0x4bc17b(0x100)](_0x4bc17b(0xdd))[_0x4bc17b(0xe9)]();}function a47_0xf05d(){const _0x361814=['Try\x20manually:\x20','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','source','Run:\x20','expected\x20','state','/dist-tags','Current\x20version:\x20',',\x20then\x20verify\x20with:\x20','beta','unknown','Update\x20failed','version','start','valid','boolean','repairCommand',',\x20state\x20','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','read','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','object','1223058FIbCAI','trim','Beta\x20version:\x20','186qaVulK','fail','418996cwcdjk','\x20doctor','message','run','7zwVwnS','Already\x20on\x20requested\x20version\x20(v','\x20→\x20','Update\x20available:\x20','json','Requested\x20version:\x20','306549GFULoI','current','Try\x20manually:\x20npm\x20install\x20-g\x20','map','\x20update\x20--version\x20<version>','CLI\x20updated\x20to\x20v','bool','length','Updating\x20via\x20','str','validation','skillVersion','272624GKWcSN','pipe','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','filter','3447rCvIuN','update','Checking\x20for\x20updates...','green','Invalid\x20version:\x20','string','slice','\x20install\x20-g\x20','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','1433920BAuhSN','\x20is\x20newer\x20than\x20npm\x20latest\x20v','yellow','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','code','npm','succeed','...','https://registry.npmjs.org/-/package/','error','latest','\x20\x20CLI\x20Built-in\x20Skill\x20','toLowerCase','Already\x20up\x20to\x20date\x20(v','4035906cptpAc','log','apiError','gray','timeout',',\x20found\x20','Updated\x20to\x20v','Version\x20comparison\x20failed','\x20is\x20up\x20to\x20date.'];a47_0xf05d=function(){return _0x361814;};return a47_0xf05d();}async function validateUpdateFlags(_0x409ba7){const _0x270042=a47_0x5bb842,_0x45e429=_0x409ba7[_0x270042(0xfd)](_0x270042(0xda)),_0x3b50eb=getRequestedVersion(_0x409ba7);if(_0x45e429&&_0x3b50eb)throw CliErrors['validation'](_0x270042(0xe6),_0x270042(0xbd));if(_0x3b50eb&&!a47_0x353f3f[_0x270042(0xdf)](_0x3b50eb))throw CliErrors[_0x270042(0x101)](_0x270042(0xb5)+_0x3b50eb,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x478dd0=a47_0x5bb842;try{const _0x574525=await fetch(_0x478dd0(0xc2)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x478dd0(0xd7),{'signal':AbortSignal[_0x478dd0(0xcc)](0x2710)});if(!_0x574525['ok'])return null;const _0x3514d2=await _0x574525[_0x478dd0(0xf5)]();if(!_0x3514d2||typeof _0x3514d2!==_0x478dd0(0xe7))return null;return Object['fromEntries'](Object['entries'](_0x3514d2)[_0x478dd0(0xb0)](([,_0x312e0a])=>typeof _0x312e0a===_0x478dd0(0xb6)&&_0x312e0a['trim']()[_0x478dd0(0xfe)]>0x0)[_0x478dd0(0xfa)](([_0x4e8de,_0x2dc194])=>[_0x4e8de,String(_0x2dc194)[_0x478dd0(0xe9)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x589d90){const _0x21dbc2=await fetchNpmDistTags();return _0x21dbc2?.[_0x589d90]??null;}async function fetchLatestVersion(){return fetchNpmDistTagVersion('latest');}async function resolveTargetVersion(_0x1e90ea){const _0x4a2615=a47_0x5bb842,_0x24dcde=getRequestedVersion(_0x1e90ea);if(_0x24dcde)return{'version':_0x24dcde,'source':_0x4a2615(0xdd)};if(_0x1e90ea[_0x4a2615(0xfd)](_0x4a2615(0xda))){const _0x97a04a=await fetchNpmDistTagVersion(_0x4a2615(0xda));if(!_0x97a04a)return null;return{'version':_0x97a04a,'source':_0x4a2615(0xda)};}const _0x1db257=await fetchLatestVersion();if(!_0x1db257)return null;return{'version':_0x1db257,'source':_0x4a2615(0xc4)};}function shouldInstallTarget(_0x111c93,_0x1940be){const _0xa90901=a47_0x5bb842;if(_0x1940be[_0xa90901(0xd3)]===_0xa90901(0xdd)||_0x1940be[_0xa90901(0xd3)]==='beta')return!a47_0x353f3f['eq'](_0x111c93,_0x1940be[_0xa90901(0xdd)]);return a47_0x353f3f['lt'](_0x111c93,_0x1940be[_0xa90901(0xdd)]);}function getInstallPlanLabel(_0xca0e0f,_0x105160){const _0x303131=a47_0x5bb842;switch(_0x105160['source']){case _0x303131(0xda):return _0x303131(0xea)+a47_0x378bf7[_0x303131(0xbc)](_0xca0e0f)+'\x20→\x20'+a47_0x378bf7[_0x303131(0xb4)](_0x105160[_0x303131(0xdd)]);case'version':return _0x303131(0xf6)+a47_0x378bf7[_0x303131(0xbc)](_0xca0e0f)+_0x303131(0xf3)+a47_0x378bf7['green'](_0x105160['version']);case _0x303131(0xc4):default:return _0x303131(0xf4)+a47_0x378bf7[_0x303131(0xbc)](_0xca0e0f)+'\x20→\x20'+a47_0x378bf7['green'](_0x105160[_0x303131(0xdd)]);}}function repairCurrentBuiltinSkill(){const _0x58eec5=a47_0x5bb842;console[_0x58eec5(0xc9)](a47_0x378bf7[_0x58eec5(0xcb)]('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x581ad7=installBuiltinSkill();if(_0x581ad7['ok']){console['log'](a47_0x378bf7[_0x58eec5(0xcb)](_0x58eec5(0xc5)+_0x581ad7[_0x58eec5(0xac)]+_0x58eec5(0xd0)));return;}throw CliErrors[_0x58eec5(0xca)](_0x58eec5(0xe3)+_0x581ad7[_0x58eec5(0xbe)]+']:\x20'+(_0x581ad7[_0x58eec5(0xc3)]||'unknown'),_0x58eec5(0xd4)+_0x581ad7[_0x58eec5(0xe1)]+',\x20then\x20verify\x20with:\x20'+CLI_BIN_NAME+_0x58eec5(0xee));}function verifyUpdatedBuiltinSkill(_0x37fba0){const _0x32f171=a47_0x5bb842,_0x42476e=inspectInstalledBuiltinSkillVersion(_0x37fba0);if(_0x42476e[_0x32f171(0xd6)]===_0x32f171(0xf8)){console['log'](a47_0x378bf7[_0x32f171(0xcb)](_0x32f171(0xc5)+_0x37fba0+_0x32f171(0xd0)));return;}const _0x183b5b=_0x42476e[_0x32f171(0xac)]?_0x32f171(0xd5)+_0x37fba0+_0x32f171(0xcd)+_0x42476e[_0x32f171(0xac)]:_0x32f171(0xd5)+_0x37fba0+_0x32f171(0xe2)+_0x42476e[_0x32f171(0xd6)];throw CliErrors['apiError'](_0x32f171(0xfc)+_0x37fba0+',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20'+_0x183b5b,'Run:\x20'+_0x42476e['repairCommand']+_0x32f171(0xd9)+CLI_BIN_NAME+_0x32f171(0xee));}async function execute(_0x316267){const _0x6939a4=a47_0x5bb842;await validateUpdateFlags(_0x316267);const _0x289679=getCurrentVersion();console[_0x6939a4(0xc9)](_0x6939a4(0xd8)+_0x289679);const _0x4aab4c=a47_0xf35b70(_0x6939a4(0xb3))['start'](),_0xd1855=await resolveTargetVersion(_0x316267);if(!_0xd1855){const _0x4bac05=_0x316267[_0x6939a4(0xfd)](_0x6939a4(0xda))?_0x6939a4(0xd2):_0x6939a4(0xe5);_0x4aab4c[_0x6939a4(0xec)](_0x4bac05);throw CliErrors[_0x6939a4(0xca)](_0x4bac05,_0x6939a4(0xf9)+NPM_PACKAGE_NAME+'@'+(_0x316267[_0x6939a4(0xfd)](_0x6939a4(0xda))?_0x6939a4(0xda):_0x6939a4(0xc4)));}const _0x2cc82c=a47_0x353f3f[_0x6939a4(0xdf)](VERSION),_0x4cbffd=a47_0x353f3f['valid'](_0xd1855[_0x6939a4(0xdd)]);if(!_0x2cc82c||!_0x4cbffd){_0x4aab4c[_0x6939a4(0xec)](_0x6939a4(0xcf));throw CliErrors[_0x6939a4(0xca)]('Version\x20comparison\x20failed','Check\x20the\x20CLI\x20and\x20npm\x20versions,\x20then\x20retry:\x20'+CLI_BIN_NAME+_0x6939a4(0xfb));}if(!shouldInstallTarget(_0x2cc82c,_0xd1855)){const _0x19517f=_0xd1855[_0x6939a4(0xd3)]===_0x6939a4(0xdd)?_0x6939a4(0xf2)+_0xd1855[_0x6939a4(0xdd)]+')':a47_0x353f3f['gt'](_0x2cc82c,_0x4cbffd)?'Current\x20version\x20v'+_0x289679+_0x6939a4(0xbb)+_0xd1855['version']:_0x6939a4(0xc7)+_0xd1855[_0x6939a4(0xdd)]+')';return _0x4aab4c[_0x6939a4(0xc0)](_0x19517f),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x4aab4c['info'](getInstallPlanLabel(_0x289679,_0xd1855));const _0x451be4=detectPackageManager(),_0x9920c1=_0x451be4===_0x6939a4(0xbf)?resolveNpmBin(_0x6939a4(0xbf)):_0x451be4,_0x33b9b6=a47_0xf35b70(_0x6939a4(0xff)+_0x451be4+_0x6939a4(0xc1))[_0x6939a4(0xde)]();try{await execa(_0x9920c1,['install','-g',NPM_PACKAGE_NAME+'@'+_0xd1855[_0x6939a4(0xdd)]],{'stdio':_0x6939a4(0xae)}),_0x33b9b6['succeed'](_0x6939a4(0xce)+_0xd1855[_0x6939a4(0xdd)]),console['log'](a47_0x378bf7[_0x6939a4(0xcb)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.'));}catch(_0x5b0382){_0x33b9b6[_0x6939a4(0xec)](_0x6939a4(0xdc));throw CliErrors['apiError']('Update\x20failed:\x20'+(_0x5b0382 instanceof Error?_0x5b0382[_0x6939a4(0xef)]:String(_0x5b0382)),_0x6939a4(0xd1)+_0x451be4+_0x6939a4(0xb8)+NPM_PACKAGE_NAME+'@'+_0xd1855['version']);}return verifyUpdatedBuiltinSkill(_0xd1855[_0x6939a4(0xdd)]),{'ok':!![]};}export const updateDefinition={'service':a47_0x5bb842(0xb2),'command':a47_0x5bb842(0xf0),'description':a47_0x5bb842(0xaf),'risk':a47_0x5bb842(0xe4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a48_0x3b56(_0x56492f,_0x40af5e){_0x56492f=_0x56492f-0xb6;const _0x46fd33=a48_0x46fd();let _0x3b56dc=_0x46fd33[_0x56492f];return _0x3b56dc;}(function(_0x5910fe,_0x10a2f5){const _0xe65b61=a48_0x3b56,_0x1c8bda=_0x5910fe();while(!![]){try{const _0x420c15=-parseInt(_0xe65b61(0xbb))/0x1*(parseInt(_0xe65b61(0xb8))/0x2)+parseInt(_0xe65b61(0xbe))/0x3*(-parseInt(_0xe65b61(0xbf))/0x4)+parseInt(_0xe65b61(0xb6))/0x5*(-parseInt(_0xe65b61(0xb9))/0x6)+-parseInt(_0xe65b61(0xba))/0x7*(-parseInt(_0xe65b61(0xc0))/0x8)+-parseInt(_0xe65b61(0xb7))/0x9*(-parseInt(_0xe65b61(0xc1))/0xa)+parseInt(_0xe65b61(0xbc))/0xb+parseInt(_0xe65b61(0xbd))/0xc;if(_0x420c15===_0x10a2f5)break;else _0x1c8bda['push'](_0x1c8bda['shift']());}catch(_0x3d197c){_0x1c8bda['push'](_0x1c8bda['shift']());}}}(a48_0x46fd,0x62166));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];function a48_0x46fd(){const _0x4e9c6a=['3094350ScqSZK','5jOzSpX','9PJVQhR','2QBWoNQ','2757912JRpUOj','252eAvhis','157159XxDynD','2546566YdsqpC','6766464ZXvfpN','16584YqwCmi','104tTAFKL','12776rizYuq'];a48_0x46fd=function(){return _0x4e9c6a;};return a48_0x46fd();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a49_0x32ae(){const _0x340428=['read','9anpKIi','str','2QXufIB','bool','5856EtPIaw','1006192AaujNh','6969300djVdiv','code','tableName','boolean','operation','32VfysHS','appCode','72969kGYpZF','string','9306sASriK','skip-imports','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','911125wWFPem','38826jqGzWG','12851470vNOzkQ','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','1799zQJhaW','alias','sdk'];a49_0x32ae=function(){return _0x340428;};return a49_0x32ae();}const a49_0x543c25=a49_0x59c6;(function(_0x51d905,_0x1b6988){const _0x3922e4=a49_0x59c6,_0x25d29b=_0x51d905();while(!![]){try{const _0x11d116=-parseInt(_0x3922e4(0x16d))/0x1*(parseInt(_0x3922e4(0x177))/0x2)+parseInt(_0x3922e4(0x182))/0x3*(parseInt(_0x3922e4(0x180))/0x4)+parseInt(_0x3922e4(0x17b))/0x5+parseInt(_0x3922e4(0x16e))/0x6*(-parseInt(_0x3922e4(0x171))/0x7)+parseInt(_0x3922e4(0x17a))/0x8+parseInt(_0x3922e4(0x175))/0x9*(parseInt(_0x3922e4(0x16f))/0xa)+-parseInt(_0x3922e4(0x169))/0xb*(-parseInt(_0x3922e4(0x179))/0xc);if(_0x11d116===_0x1b6988)break;else _0x25d29b['push'](_0x25d29b['shift']());}catch(_0x875e42){_0x25d29b['push'](_0x25d29b['shift']());}}}(a49_0x32ae,0xcc999));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';function a49_0x59c6(_0xe19bbe,_0x1a5a0b){_0xe19bbe=_0xe19bbe-0x169;const _0x32aeae=a49_0x32ae();let _0x59c689=_0x32aeae[_0xe19bbe];return _0x59c689;}import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':'codegen','command':a49_0x543c25(0x173),'description':a49_0x543c25(0x170),'risk':a49_0x543c25(0x174),'flags':[CODE_FLAG_OPTIONAL,{'name':a49_0x543c25(0x172),'type':a49_0x543c25(0x183),'description':a49_0x543c25(0x16b)},{'name':a49_0x543c25(0x17f),'type':a49_0x543c25(0x183),'required':!![],'description':a49_0x543c25(0x16c)},{'name':a49_0x543c25(0x16a),'type':a49_0x543c25(0x17e),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x132603){const _0x43e600=a49_0x543c25,{dataset:_0x2dd463,operation:_0x43fc8a}=await getOperationDetail(_0x132603[_0x43e600(0x181)],_0x132603[_0x43e600(0x176)](_0x43e600(0x17c)),_0x132603[_0x43e600(0x176)](_0x43e600(0x17f))),_0x20b792=generateSdkCode(_0x2dd463,_0x43fc8a,{'includeImports':!_0x132603[_0x43e600(0x178)]('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x2dd463['name'],'code':_0x2dd463[_0x43e600(0x17c)],'tableName':_0x2dd463[_0x43e600(0x17d)]},'operation':_0x132603[_0x43e600(0x176)](_0x43e600(0x17f)),'code':_0x20b792}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a50_0x1e58f2=a50_0x49da;(function(_0x4453cf,_0x59c0f1){const _0x1da548=a50_0x49da,_0x5bf710=_0x4453cf();while(!![]){try{const _0x446d04=-parseInt(_0x1da548(0x118))/0x1*(parseInt(_0x1da548(0x10c))/0x2)+parseInt(_0x1da548(0x10a))/0x3+parseInt(_0x1da548(0x121))/0x4*(-parseInt(_0x1da548(0x112))/0x5)+-parseInt(_0x1da548(0x109))/0x6+-parseInt(_0x1da548(0x116))/0x7*(parseInt(_0x1da548(0x10f))/0x8)+-parseInt(_0x1da548(0x114))/0x9+parseInt(_0x1da548(0x113))/0xa*(parseInt(_0x1da548(0x10b))/0xb);if(_0x446d04===_0x59c0f1)break;else _0x5bf710['push'](_0x5bf710['shift']());}catch(_0x1c0665){_0x5bf710['push'](_0x5bf710['shift']());}}}(a50_0x1f21,0x39a85));function a50_0x49da(_0x270032,_0x2acc85){_0x270032=_0x270032-0x108;const _0x1f213b=a50_0x1f21();let _0x49da4f=_0x1f213b[_0x270032];return _0x49da4f;}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';function a50_0x1f21(){const _0x114be1=['appCode','Omit\x20import\x20statements\x20from\x20generated\x20code','string','no-imports','sqlCode','67444Qscucs','sdk','387576jDbuML','1383276nGJrAB','7794875SRAzzc','146WkRGkN','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','boolean','152KHDMEm','bff','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','55TnVeYz','10qbbdvE','3381543mTKtiA','read','50155LJJZdZ','codegen','2351oZxool','str','target','sqlcode'];a50_0x1f21=function(){return _0x114be1;};return a50_0x1f21();}import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a50_0x1e58f2(0x117),'command':'sql','description':a50_0x1e58f2(0x10d),'risk':a50_0x1e58f2(0x115),'flags':[SQLCODE_FLAG,{'name':'target','type':a50_0x1e58f2(0x11e),'description':a50_0x1e58f2(0x111),'default':a50_0x1e58f2(0x108),'enum':[a50_0x1e58f2(0x108),a50_0x1e58f2(0x110)]},{'name':a50_0x1e58f2(0x11f),'type':a50_0x1e58f2(0x10e),'description':a50_0x1e58f2(0x11d)}],async 'execute'(_0x406e3f){const _0x5a9a18=a50_0x1e58f2,_0x3673ab=await getSqlQueryInfo(_0x406e3f[_0x5a9a18(0x11c)],_0x406e3f[_0x5a9a18(0x119)](_0x5a9a18(0x11b))),_0x170431=_0x406e3f[_0x5a9a18(0x119)](_0x5a9a18(0x11a))||'sdk',_0x58b2f3=generateSqlCodeTemplate(_0x3673ab,{'target':_0x170431,'includeImports':!_0x406e3f['bool']('no-imports')});return{'ok':!![],'data':{'sqlCode':_0x3673ab[_0x5a9a18(0x120)],'sqlName':_0x3673ab['sqlName'],'target':_0x170431,'code':_0x58b2f3}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1059a5,_0x2326c3){const _0x4e781b=a51_0x367a,_0x144e88=_0x1059a5();while(!![]){try{const _0xd3ba57=parseInt(_0x4e781b(0x11e))/0x1+parseInt(_0x4e781b(0x100))/0x2*(parseInt(_0x4e781b(0x117))/0x3)+parseInt(_0x4e781b(0x107))/0x4+-parseInt(_0x4e781b(0x11b))/0x5*(-parseInt(_0x4e781b(0x104))/0x6)+parseInt(_0x4e781b(0x125))/0x7*(parseInt(_0x4e781b(0x103))/0x8)+-parseInt(_0x4e781b(0x108))/0x9*(parseInt(_0x4e781b(0x10d))/0xa)+-parseInt(_0x4e781b(0x129))/0xb;if(_0xd3ba57===_0x2326c3)break;else _0x144e88['push'](_0x144e88['shift']());}catch(_0x2c51e9){_0x144e88['push'](_0x144e88['shift']());}}}(a51_0x150a,0xb67d6));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs,normalizeStoredDefaultApp}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x1494b5=a51_0x367a;return[{'name':'appcode','type':_0x1494b5(0x112),'description':_0x1494b5(0x128),'required':!![]},{'name':_0x1494b5(0x116),'type':_0x1494b5(0x11a),'description':_0x1494b5(0x11c),'default':![]},...getAppProfileFlagDefs()];}function a51_0x367a(_0x5752e6,_0x1a7e62){_0x5752e6=_0x5752e6-0x100;const _0x150ab2=a51_0x150a();let _0x367aa0=_0x150ab2[_0x5752e6];return _0x367aa0;}export function buildAppRemoveFlags(){const _0xcebb91=a51_0x367a;return[{'name':_0xcebb91(0x116),'type':_0xcebb91(0x11a),'description':'Use\x20global\x20config\x20scope','default':![]}];}function a51_0x150a(){const _0x4f2023=['apps','329791uxauxT','\x22\x20not\x20found.','appcode','App\x20code','28233315eKniaZ','length','args','2DPrmCH','Usage:\x20','\x22\x20(appcode:\x20','16imXcNa','162QjqhvA','str','project','5256004EfEIYp','27MZBnYY','\x22\x20is\x20selected\x20automatically.','defaultApp','validation','\x20<name>\x20--appcode\x20<code>','2869450eHOgSt','\x20Note:\x20app\x20\x22','bool','trim','\x20<name>','string','\x20<name>\x20[--global]','App\x20\x22','globalConfig','global','3290343JEPfUx','\x20Remaining\x20app\x20\x22','\x20Default\x20app\x20changed\x20to\x20\x22','boolean','59525hSOnpW','Use\x20global\x20config\x20scope','projectConfig','1348535hvSnee','keys','Updated','flagMissing','\x22\x20still\x20defined\x20in\x20','object'];a51_0x150a=function(){return _0x4f2023;};return a51_0x150a();}export async function validateAppName(_0x3ab488,_0x2bfe69){const _0x28cc32=a51_0x367a,_0x255154=_0x3ab488['args'][0x0]?.[_0x28cc32(0x110)]();if(!_0x255154)throw CliErrors[_0x28cc32(0x10b)]('Missing\x20app\x20name.',_0x28cc32(0x101)+CLI_BIN_NAME+'\x20'+_0x2bfe69+_0x28cc32(0x111));}export async function runAppAdd(_0x504da3,_0x59285b){const _0x2d94ba=a51_0x367a,_0xfe559a=_0x504da3[_0x2d94ba(0x12b)][0x0]?.[_0x2d94ba(0x110)]();if(!_0xfe559a)throw CliErrors[_0x2d94ba(0x10b)]('Missing\x20app\x20name.',_0x2d94ba(0x101)+CLI_BIN_NAME+'\x20'+_0x59285b+_0x2d94ba(0x10c));const _0x5a8c2d=_0x504da3['str'](_0x2d94ba(0x127));if(!_0x5a8c2d)throw CliErrors[_0x2d94ba(0x121)]('appcode','Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x59285b+_0x2d94ba(0x10c));const _0x377a23={'global':_0x504da3[_0x2d94ba(0x10f)](_0x2d94ba(0x116))},_0x271da4=readConfig(_0x377a23);if(!_0x271da4[_0x2d94ba(0x124)])_0x271da4[_0x2d94ba(0x124)]={};const _0x224a4a={'appcode':_0x5a8c2d,...collectAppProfileOverrides(_0x3fe1b6=>_0x504da3[_0x2d94ba(0x105)](_0x3fe1b6))},_0x474632=_0x271da4[_0x2d94ba(0x124)],_0x48feb6=Object[_0x2d94ba(0x11f)](_0x474632),_0xd8e2b5=typeof _0x271da4[_0x2d94ba(0x10a)]===_0x2d94ba(0x112)&&_0x474632[_0x271da4[_0x2d94ba(0x10a)]]?_0x271da4['defaultApp']:_0x48feb6[_0x2d94ba(0x12a)]===0x1?_0x48feb6[0x0]:undefined,_0x414874=!!_0x474632[_0xfe559a];_0x474632[_0xfe559a]=_0x224a4a;const _0x12abfd=normalizeStoredDefaultApp(_0x271da4,_0xd8e2b5);writeConfig(_0x271da4,_0x377a23);const _0x116f25=!_0x414874&&_0x12abfd?'\x20Default\x20app\x20is\x20\x22'+_0x12abfd+'\x22.':'',_0x1512f5=(_0x414874?_0x2d94ba(0x120):'Added')+'\x20app\x20\x22'+_0xfe559a+_0x2d94ba(0x102)+_0x5a8c2d+')'+scopeLabel(_0x377a23)+'.'+_0x116f25;return{'ok':!![],'message':_0x1512f5};}export async function runAppRemove(_0x1bcb01,_0x574a43){const _0x2658ca=a51_0x367a,_0x1a4737=_0x1bcb01[_0x2658ca(0x12b)][0x0]?.[_0x2658ca(0x110)]();if(!_0x1a4737)throw CliErrors['validation']('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x574a43+_0x2658ca(0x113));const _0x2b09b5=_0x1bcb01[_0x2658ca(0x10f)]('global'),{config:_0x426c63,layers:_0xdbad76}=readRawConfigWithLayers(),_0x1684ec=_0x426c63[_0x2658ca(0x124)]??{};if(!_0x1684ec[_0x1a4737])throw CliErrors[_0x2658ca(0x10b)](_0x2658ca(0x114)+_0x1a4737+_0x2658ca(0x126));const _0x40a9ce=_0xdbad76[_0x2658ca(0x115)]['apps']&&typeof _0xdbad76[_0x2658ca(0x115)][_0x2658ca(0x124)]===_0x2658ca(0x123)?_0xdbad76[_0x2658ca(0x115)][_0x2658ca(0x124)]:{},_0x53ee2d=_0xdbad76[_0x2658ca(0x11d)][_0x2658ca(0x124)]&&typeof _0xdbad76[_0x2658ca(0x11d)][_0x2658ca(0x124)]===_0x2658ca(0x123)?_0xdbad76[_0x2658ca(0x11d)][_0x2658ca(0x124)]:{},_0x788ccf=appDefinedIn(_0x1a4737,_0x40a9ce,_0x53ee2d),_0x31e077=resolveAppScopeForWrite(_0x1a4737,_0x2b09b5,_0xdbad76),_0x262067={'global':_0x31e077===_0x2658ca(0x116)},_0x53655a=readConfig(_0x262067),_0x452ace=_0x53655a[_0x2658ca(0x124)];if(!_0x452ace||!_0x452ace[_0x1a4737])throw CliErrors[_0x2658ca(0x10b)](_0x2658ca(0x114)+_0x1a4737+_0x2658ca(0x126));delete _0x452ace[_0x1a4737];let _0x11c297='';const _0x4b3ae2=typeof _0x53655a[_0x2658ca(0x10a)]===_0x2658ca(0x112)?_0x53655a[_0x2658ca(0x10a)]:undefined,_0x25ab58=Object[_0x2658ca(0x11f)](_0x452ace),_0x594eaa=_0x4b3ae2===_0x1a4737?_0x25ab58[0x0]:_0x4b3ae2,_0xa3ab0f=normalizeStoredDefaultApp(_0x53655a,_0x594eaa);if(_0x4b3ae2===_0x1a4737&&_0x25ab58[_0x2658ca(0x12a)]===0x1)_0x11c297=_0x2658ca(0x118)+_0x25ab58[0x0]+_0x2658ca(0x109);else _0x4b3ae2===_0x1a4737&&_0xa3ab0f&&(_0x11c297=_0x2658ca(0x119)+_0xa3ab0f+'\x22.');Object[_0x2658ca(0x11f)](_0x452ace)['length']===0x0&&(delete _0x53655a['apps'],delete _0x53655a[_0x2658ca(0x10a)]);writeConfig(_0x53655a,_0x262067);const _0x517714=_0x788ccf==='both'?_0x2658ca(0x10e)+_0x1a4737+_0x2658ca(0x122)+(_0x31e077==='project'?_0x2658ca(0x116):_0x2658ca(0x106))+'\x20config.':'';return{'ok':!![],'message':'Removed\x20app\x20\x22'+_0x1a4737+'\x22'+scopeLabel(_0x262067)+'.'+_0x11c297+_0x517714};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x800b2b,_0xf13666){const _0x47a074=a52_0x55fb,_0x245a79=_0x800b2b();while(!![]){try{const _0x498c67=-parseInt(_0x47a074(0xc0))/0x1+parseInt(_0x47a074(0xc1))/0x2+parseInt(_0x47a074(0xb1))/0x3*(parseInt(_0x47a074(0xb6))/0x4)+-parseInt(_0x47a074(0xc4))/0x5*(-parseInt(_0x47a074(0xc8))/0x6)+-parseInt(_0x47a074(0xb0))/0x7+-parseInt(_0x47a074(0xb9))/0x8+parseInt(_0x47a074(0xbc))/0x9;if(_0x498c67===_0xf13666)break;else _0x245a79['push'](_0x245a79['shift']());}catch(_0x21c2f2){_0x245a79['push'](_0x245a79['shift']());}}}(a52_0x5a15,0xe2884));import{input,checkbox,select}from'@inquirer/prompts';import a52_0x548d01 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';function a52_0x55fb(_0x3694b4,_0x4c8c12){_0x3694b4=_0x3694b4-0xa7;const _0x5a1544=a52_0x5a15();let _0x55fb1f=_0x5a1544[_0x3694b4];return _0x55fb1f;}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x23f4f2=a52_0x55fb,_0x54d5ac=await input({'message':'App\x20Code:','validate':_0x200711=>{const _0x5c8f18=a52_0x55fb,_0x35ea74=validateAppcode(_0x200711[_0x5c8f18(0xaf)]());return _0x35ea74[_0x5c8f18(0xc3)]||_0x35ea74[_0x5c8f18(0xb8)]||_0x5c8f18(0xb5);}});return _0x54d5ac[_0x23f4f2(0xaf)]();}export async function promptAppSelection(_0x160f56){const _0xac74e8=a52_0x55fb,_0x339991=[{'name':a52_0x548d01[_0xac74e8(0xc2)](_0xac74e8(0xac)),'value':-0x1},..._0x160f56[_0xac74e8(0xcb)]((_0x29656b,_0x269f2f)=>({'name':_0x29656b[_0xac74e8(0xca)]+'\x20\x20'+a52_0x548d01['gray']('('+_0x29656b[_0xac74e8(0xb3)]+')'),'value':_0x269f2f}))],_0x40fdf1=await checkbox({'message':_0xac74e8(0xa9)+a52_0x548d01[_0xac74e8(0xbe)](_0x160f56['length'])+_0xac74e8(0xc9),'choices':_0x339991,'loop':![]});if(_0x40fdf1[_0xac74e8(0xaa)](-0x1))return _0xac74e8(0xcc);if(_0x40fdf1[_0xac74e8(0xbd)]===0x0)return'custom';return _0x40fdf1[_0xac74e8(0xcb)](_0x45be76=>_0x160f56[_0x45be76]);}export async function promptSingleAppSelection(_0x4e4216){const _0xc7b3e9=a52_0x55fb,_0x42ba8e=[{'name':a52_0x548d01['gray'](_0xc7b3e9(0xa7)),'value':_0xc7b3e9(0xbb)},{'name':a52_0x548d01[_0xc7b3e9(0xc2)]('✎\x20Enter\x20appcode\x20manually'),'value':_0xc7b3e9(0xcc)},..._0x4e4216[_0xc7b3e9(0xcb)](_0x3f1207=>({'name':_0x3f1207[_0xc7b3e9(0xca)]+'\x20\x20'+a52_0x548d01['gray']('('+_0x3f1207[_0xc7b3e9(0xb3)]+')'),'value':_0x3f1207[_0xc7b3e9(0xb3)]}))],_0x55b40a=await select({'message':_0xc7b3e9(0xab),'choices':_0x42ba8e});if(_0x55b40a===_0xc7b3e9(0xbb))return _0xc7b3e9(0xbb);if(_0x55b40a===_0xc7b3e9(0xcc))return'custom';return _0x4e4216[_0xc7b3e9(0xb2)](_0x3add34=>_0x3add34[_0xc7b3e9(0xb3)]===_0x55b40a);}function a52_0x5a15(){const _0x3eeed2=['find','appCode','\x0aCould\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','Invalid\x20App\x20Code','18092FOOfve','Fetching\x20available\x20apps...','message','10060440efUVlP','✎\x20Enter\x20manually','skip','20467098OPKizQ','length','cyan','App\x20Code:','1628723pluGJy','1208112dddmNR','yellow','valid','1037725XLzHUg','No\x20available\x20apps\x20found.','Could\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','gray','12aSBAIB','\x20apps.\x20Select\x20with\x20space,\x20a=all,\x20i=invert:','appName','map','custom','(Skip;\x20configure\x20later\x20with\x20config\x20set\x20appcode)','(No\x20login\x20session.\x20Enter\x20an\x20App\x20Code\x20manually\x20or\x20skip.)','Found\x20','includes','Select\x20the\x20app\x20to\x20bind:','✎\x20Enter\x20appcode\x20manually','\x20\x20(','manual','trim','3857455CFANex','711NUCORs'];a52_0x5a15=function(){return _0x3eeed2;};return a52_0x5a15();}export async function selectSingleAppcode(_0x142f6c){const _0x2a3fd6=a52_0x55fb;if(!_0x142f6c)return writeCliSideChannelLine(a52_0x548d01[_0x2a3fd6(0xc7)](_0x2a3fd6(0xa8))),_fallbackOrSkip();writeCliSideChannelLine('Fetching\x20available\x20apps...');let _0x15e614;try{_0x15e614=await withActiveCookie(_0x142f6c,()=>listRemoteApps());}catch(_0x533a8e){writeCliSideChannelLine(a52_0x548d01[_0x2a3fd6(0xc2)](_0x2a3fd6(0xc6)));if(_0x533a8e instanceof Error)writeCliSideChannelLine(a52_0x548d01[_0x2a3fd6(0xc7)]('\x20\x20('+_0x533a8e['message']+')'));return _fallbackOrSkip();}if(_0x15e614['length']===0x0)return writeCliSideChannelLine(a52_0x548d01[_0x2a3fd6(0xc2)](_0x2a3fd6(0xc5))),_fallbackOrSkip();const _0x458b6c=await promptSingleAppSelection(_0x15e614);if(_0x458b6c===_0x2a3fd6(0xbb))return'';if(_0x458b6c===_0x2a3fd6(0xcc))return promptCustomAppcode();return _0x458b6c['appCode'];}export async function selectMultipleApps(_0x53de7e){const _0x42f056=a52_0x55fb;writeCliSideChannelLine(_0x42f056(0xb7));let _0x5a7d09;try{_0x5a7d09=await withActiveCookie(_0x53de7e,()=>listRemoteApps());}catch(_0x16dc2b){writeCliSideChannelLine(_0x42f056(0xb4));if(_0x16dc2b instanceof Error)writeCliSideChannelLine(_0x42f056(0xad)+_0x16dc2b[_0x42f056(0xb8)]+')');return _0x42f056(0xcc);}if(_0x5a7d09[_0x42f056(0xbd)]===0x0)return writeCliSideChannelLine('\x0aNo\x20available\x20apps\x20found.'),_0x42f056(0xcc);return promptAppSelection(_0x5a7d09);}async function _fallbackOrSkip(){const _0x5cf878=a52_0x55fb,_0x3ae390=await select({'message':_0x5cf878(0xbf),'choices':[{'name':a52_0x548d01['gray']('(Skip;\x20configure\x20later)'),'value':_0x5cf878(0xbb)},{'name':a52_0x548d01[_0x5cf878(0xc2)](_0x5cf878(0xba)),'value':_0x5cf878(0xae)}]});if(_0x3ae390===_0x5cf878(0xbb))return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a53_0x37c8be=a53_0x471c;(function(_0x27358a,_0x4fffdb){const _0x2d7f71=a53_0x471c,_0x9063d8=_0x27358a();while(!![]){try{const _0x1d9abc=parseInt(_0x2d7f71(0x164))/0x1+parseInt(_0x2d7f71(0x16c))/0x2*(parseInt(_0x2d7f71(0x170))/0x3)+-parseInt(_0x2d7f71(0x15e))/0x4*(parseInt(_0x2d7f71(0x15d))/0x5)+parseInt(_0x2d7f71(0x16a))/0x6*(parseInt(_0x2d7f71(0x175))/0x7)+-parseInt(_0x2d7f71(0x171))/0x8*(-parseInt(_0x2d7f71(0x166))/0x9)+parseInt(_0x2d7f71(0x178))/0xa+-parseInt(_0x2d7f71(0x162))/0xb*(parseInt(_0x2d7f71(0x17c))/0xc);if(_0x1d9abc===_0x4fffdb)break;else _0x9063d8['push'](_0x9063d8['shift']());}catch(_0x3dc2c1){_0x9063d8['push'](_0x9063d8['shift']());}}}(a53_0x94a1,0xa6757));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a53_0x37c8be(0x17e),a53_0x37c8be(0x161)]),NON_TERMINAL_STATUSES=new Set([a53_0x37c8be(0x177),a53_0x37c8be(0x16b)]);export function normalizeAsyncTask(_0x3dcabe){const _0x3b7006=a53_0x37c8be,_0x55d3fc=typeof _0x3dcabe?.[_0x3b7006(0x17b)]==='string'?_0x3dcabe[_0x3b7006(0x17b)][_0x3b7006(0x16d)]():'';if(!_0x55d3fc)throw CliErrors[_0x3b7006(0x17d)]('Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.');const _0x22c7a2=typeof _0x3dcabe[_0x3b7006(0x160)]==='string'?_0x3dcabe[_0x3b7006(0x160)][_0x3b7006(0x16d)]()['toUpperCase']():'';if(!_0x22c7a2)throw CliErrors[_0x3b7006(0x17d)](_0x3b7006(0x167)+_0x55d3fc+_0x3b7006(0x17f));return{'taskId':_0x55d3fc,'status':_0x22c7a2,'errorMessage':typeof _0x3dcabe['errorMessage']==='string'&&_0x3dcabe['errorMessage'][_0x3b7006(0x16d)]()?_0x3dcabe[_0x3b7006(0x163)]['trim']():null,'isTerminal':TERMINAL_STATUSES[_0x3b7006(0x15f)](_0x22c7a2),'knownStatus':TERMINAL_STATUSES[_0x3b7006(0x15f)](_0x22c7a2)||NON_TERMINAL_STATUSES[_0x3b7006(0x15f)](_0x22c7a2)};}export function buildAsyncTaskStatusCommand(_0x72af9c,_0x173683){const _0x28c369=a53_0x37c8be;return CLI_BIN_NAME+_0x28c369(0x179)+quoteShellArg(_0x72af9c)+_0x28c369(0x165)+quoteShellArg(_0x173683)+'\x20--format\x20compress';}function a53_0x471c(_0x3abd07,_0x106569){_0x3abd07=_0x3abd07-0x15d;const _0x94a15a=a53_0x94a1();let _0x471ccf=_0x94a15a[_0x3abd07];return _0x471ccf;}export function asyncTaskMessage(_0x29e8e8){const _0x3f3ee3=a53_0x37c8be;switch(_0x29e8e8['status']){case'PENDING':return _0x3f3ee3(0x168)+_0x29e8e8[_0x3f3ee3(0x17b)]+_0x3f3ee3(0x174);case _0x3f3ee3(0x16b):return'Task\x20'+_0x29e8e8[_0x3f3ee3(0x17b)]+_0x3f3ee3(0x176);case _0x3f3ee3(0x17e):return _0x3f3ee3(0x168)+_0x29e8e8[_0x3f3ee3(0x17b)]+_0x3f3ee3(0x172);case _0x3f3ee3(0x161):return _0x29e8e8[_0x3f3ee3(0x163)]?_0x3f3ee3(0x168)+_0x29e8e8[_0x3f3ee3(0x17b)]+_0x3f3ee3(0x173)+_0x29e8e8[_0x3f3ee3(0x163)]:'Task\x20'+_0x29e8e8[_0x3f3ee3(0x17b)]+_0x3f3ee3(0x16e);default:return'Task\x20'+_0x29e8e8[_0x3f3ee3(0x17b)]+_0x3f3ee3(0x16f)+_0x29e8e8[_0x3f3ee3(0x160)]+'.';}}function quoteShellArg(_0x4fcee7){const _0x4621aa=a53_0x37c8be;return'\x27'+_0x4fcee7[_0x4621aa(0x17a)](/'/g,_0x4621aa(0x169))+'\x27';}function a53_0x94a1(){const _0x186693=['\x20failed:\x20','\x20is\x20pending.','3066931PxjhxN','\x20is\x20processing.','PENDING','9024460eNtzGT','\x20task\x20status\x20--task-id\x20','replace','taskId','11709828AvKyQQ','apiError','SUCCESS','\x20response\x20did\x20not\x20contain\x20a\x20status.','6329515WlGURl','4aJZwie','has','status','FAILED','11ylklAI','errorMessage','1020116IilRyw','\x20--appcode\x20','32976ePTaNk','Async\x20task\x20','Task\x20','\x27\x5c\x27\x27','6bLGWux','PROCESSING','116WjnpxP','trim','\x20failed.','\x20returned\x20unknown\x20status\x20','12435bQqfEG','704QjVJUz','\x20completed\x20successfully.'];a53_0x94a1=function(){return _0x186693;};return a53_0x94a1();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4eb665,_0x1e6bf9){var _0xc29be2=a54_0x2f90,_0x27035b=_0x4eb665();while(!![]){try{var _0x41fd58=parseInt(_0xc29be2(0x83))/0x1+parseInt(_0xc29be2(0x84))/0x2+-parseInt(_0xc29be2(0x82))/0x3+parseInt(_0xc29be2(0x8b))/0x4*(-parseInt(_0xc29be2(0x8c))/0x5)+-parseInt(_0xc29be2(0x7f))/0x6+-parseInt(_0xc29be2(0x8a))/0x7*(parseInt(_0xc29be2(0x86))/0x8)+-parseInt(_0xc29be2(0x80))/0x9*(-parseInt(_0xc29be2(0x89))/0xa);if(_0x41fd58===_0x1e6bf9)break;else _0x27035b['push'](_0x27035b['shift']());}catch(_0x15ab6a){_0x27035b['push'](_0x27035b['shift']());}}}(a54_0x4725,0xe0f57));function a54_0x2f90(_0x37f223,_0x5d2984){_0x37f223=_0x37f223-0x7f;var _0x472538=a54_0x4725();var _0x2f90eb=_0x472538[_0x37f223];return _0x2f90eb;}export function asDryRunResult(_0x22ebf3,_0x39e04a){var _0x15762e=a54_0x2f90;return Object[_0x15762e(0x85)](_0x22ebf3,{'method':{'value':_0x39e04a[_0x15762e(0x88)],'enumerable':![]},'url':{'value':_0x39e04a[_0x15762e(0x81)],'enumerable':![]},..._0x39e04a['description']?{'description':{'value':_0x39e04a[_0x15762e(0x87)],'enumerable':![]}}:{}});}function a54_0x4725(){var _0x3e3838=['description','method','881730ZeFmjJ','7hlVCTQ','4NuBhOf','3765035qrClMB','3291774efclbv','126DwygUB','url','1414554KscGAW','791119gqQzZF','3643606stxAAg','defineProperties','9222072AzLUoH'];a54_0x4725=function(){return _0x3e3838;};return a54_0x4725();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a55_0x284042=a55_0x5e6c;function a55_0xc85f(){const _0x4611a9=['1564668jzNkIg','2098302AgtvMO','9034970vUqLdb','2568105xbRFkp','Source\x20field\x20name\x20used\x20to\x20locate\x20the\x20relation','MANY_TO_MANY','531055taNgFO','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','ONE_TO_MANY','2187258prOkjX','Relation\x20cardinality;\x20create\x20leaves\x20it\x20unset\x20when\x20omitted,\x20update\x20keeps\x20the\x20current\x20value','MYSQL','Source\x20database\x20connection\x20ID;\x20derived\x20from\x20the\x20source\x20dataset\x20when\x20omitted','datasetcode','from-datasetcode','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','104eFUpUT','Source\x20DB_TABLE\x20dataset\x20code','15mEKSEA','Database\x20product\x20type','number','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','to-datasetcode','Write\x20to\x20the\x20global\x20configuration','from-column','global','Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update','string','Target\x20display\x20field;\x20create\x20defaults\x20to\x20the\x20target\x20field,\x20update\x20keeps\x20the\x20current\x20value','ONE_TO_ONE','Target\x20field\x20name','MANY_TO_ONE','sqlcode','App\x20code\x20(e.g.\x20app-xxxxx)','skip-connection-test','788038NqVCix','appcode','Target\x20DB_TABLE\x20dataset\x20code','4IWsSBu','boolean'];a55_0xc85f=function(){return _0x4611a9;};return a55_0xc85f();}(function(_0x4a260a,_0x2fc4d2){const _0x122cbd=a55_0x5e6c,_0x2ffb07=_0x4a260a();while(!![]){try{const _0x4b3215=-parseInt(_0x122cbd(0x14d))/0x1+parseInt(_0x122cbd(0x152))/0x2+-parseInt(_0x122cbd(0x153))/0x3*(parseInt(_0x122cbd(0x150))/0x4)+parseInt(_0x122cbd(0x164))/0x5*(parseInt(_0x122cbd(0x15b))/0x6)+-parseInt(_0x122cbd(0x158))/0x7*(-parseInt(_0x122cbd(0x162))/0x8)+parseInt(_0x122cbd(0x155))/0x9+-parseInt(_0x122cbd(0x154))/0xa;if(_0x4b3215===_0x2fc4d2)break;else _0x2ffb07['push'](_0x2ffb07['shift']());}catch(_0x51e15d){_0x2ffb07['push'](_0x2ffb07['shift']());}}}(a55_0xc85f,0xb8b68));export const CROSS_RELATION_FROM_DATASET_FLAG={'name':a55_0x284042(0x160),'type':a55_0x284042(0x16d),'required':!![],'description':a55_0x284042(0x163)};export const CROSS_RELATION_FROM_COLUMN_FLAG={'name':a55_0x284042(0x16a),'type':a55_0x284042(0x16d),'required':!![],'description':a55_0x284042(0x156)};export const CROSS_RELATION_TO_DATASET_FLAG={'name':a55_0x284042(0x168),'type':'string','required':!![],'description':a55_0x284042(0x14f)};export const CROSS_RELATION_TO_COLUMN_FLAG={'name':'to-column','type':a55_0x284042(0x16d),'required':!![],'description':a55_0x284042(0x170)};export const CROSS_RELATION_DBLINK_FLAG={'name':'from-dblink-id','type':'number','description':a55_0x284042(0x15e)};export const CROSS_RELATION_LABEL_FLAG={'name':'to-label-column','type':a55_0x284042(0x16d),'description':a55_0x284042(0x16e)};export const CROSS_RELATION_CARDINALITY_FLAG={'name':'cardinality','type':'string','enum':[a55_0x284042(0x16f),a55_0x284042(0x15a),a55_0x284042(0x171),a55_0x284042(0x157)],'description':a55_0x284042(0x15c)};export const GLOBAL_SCOPE_FLAG={'name':a55_0x284042(0x16b),'type':a55_0x284042(0x151),'default':![],'description':a55_0x284042(0x169)};function a55_0x5e6c(_0x205fe5,_0xde5541){_0x205fe5=_0x205fe5-0x14b;const _0xc85f3b=a55_0xc85f();let _0x5e6cd4=_0xc85f3b[_0x205fe5];return _0x5e6cd4;}export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':'a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)'};export const CODE_FLAG={'name':'code','type':a55_0x284042(0x16d),'required':!![],'description':a55_0x284042(0x167),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a55_0x284042(0x15f),'description':a55_0x284042(0x167)};export const SQLCODE_FLAG={'name':a55_0x284042(0x172),'type':a55_0x284042(0x16d),'required':!![],'description':a55_0x284042(0x161),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const APPCODE_FLAG_OPTIONAL={'name':a55_0x284042(0x14e),'type':'string','required':![],'description':a55_0x284042(0x159)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a55_0x284042(0x14b)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a55_0x284042(0x166),'required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'};export const DB_TYPE_FLAG={'name':'dbtype','type':a55_0x284042(0x16d),'required':!![],'description':a55_0x284042(0x165),'enum':[a55_0x284042(0x15d),'POSTGRESQL']};export const SKIP_CONNECTION_TEST_FLAG={'name':a55_0x284042(0x14c),'type':a55_0x284042(0x151),'description':a55_0x284042(0x16c)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a56_0x4935(_0x2d0860,_0x42bce1){_0x2d0860=_0x2d0860-0x1af;const _0x50bd40=a56_0x50bd();let _0x493518=_0x50bd40[_0x2d0860];return _0x493518;}(function(_0x1d4a1b,_0x3a958c){const _0x38e724=a56_0x4935,_0x48dc75=_0x1d4a1b();while(!![]){try{const _0x1ffb04=-parseInt(_0x38e724(0x1b1))/0x1*(-parseInt(_0x38e724(0x1c0))/0x2)+parseInt(_0x38e724(0x1b8))/0x3+parseInt(_0x38e724(0x1b7))/0x4*(parseInt(_0x38e724(0x1b6))/0x5)+-parseInt(_0x38e724(0x1b0))/0x6+parseInt(_0x38e724(0x1ba))/0x7+-parseInt(_0x38e724(0x1bd))/0x8*(parseInt(_0x38e724(0x1b3))/0x9)+-parseInt(_0x38e724(0x1b5))/0xa;if(_0x1ffb04===_0x3a958c)break;else _0x48dc75['push'](_0x48dc75['shift']());}catch(_0x5e877e){_0x48dc75['push'](_0x48dc75['shift']());}}}(a56_0x50bd,0xe7812));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;function a56_0x50bd(){const _0x3eb8a1=['toFixed','9441775vTFjxT','isFile','\x20path\x20is\x20required.','2504yhXyFX','size','trim','1294ZGqpsi','validation','File\x20not\x20found:\x20','11146728yNulss','837mcPtFM','\x20MB','7695XDvnsS','File\x20is\x20not\x20a\x20regular\x20file:\x20','5373410tjwpml','471995SUIYWN','28zgEyUl','3179487VCMEal'];a56_0x50bd=function(){return _0x3eb8a1;};return a56_0x50bd();}export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x58d653){const _0x2ae2eb=a56_0x4935;if(_0x58d653>=BYTES_PER_MB){const _0x399d68=Math['ceil'](_0x58d653/BYTES_PER_MB*0x64)/0x64;return _0x399d68[_0x2ae2eb(0x1b9)](0x2)+_0x2ae2eb(0x1b2);}return _0x58d653+'\x20B';}export function requireDevelopmentUploadFile(_0x3859dc,_0x8b5681){const _0x405a19=a56_0x4935,_0x496d06=_0x3859dc[_0x405a19(0x1bf)]();if(!_0x496d06)throw CliErrors[_0x405a19(0x1c1)](_0x8b5681+_0x405a19(0x1bc));if(!existsSync(_0x496d06))throw CliErrors[_0x405a19(0x1c1)](_0x405a19(0x1af)+_0x496d06);const _0x576830=statSync(_0x496d06);if(!_0x576830[_0x405a19(0x1bb)]())throw CliErrors['validation'](_0x405a19(0x1b4)+_0x496d06);if(_0x576830['size']>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x405a19(0x1c1)]('File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20'+_0x496d06+'\x20('+formatBytes(_0x576830[_0x405a19(0x1be)])+')');return{'path':_0x496d06,'size':_0x576830[_0x405a19(0x1be)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x42fd4,_0x236c6c){const _0x55c1b5=a57_0x254e,_0x3fbbd1=_0x42fd4();while(!![]){try{const _0x50b967=parseInt(_0x55c1b5(0x1ff))/0x1+-parseInt(_0x55c1b5(0x1fa))/0x2+-parseInt(_0x55c1b5(0x1f4))/0x3+-parseInt(_0x55c1b5(0x1f6))/0x4*(parseInt(_0x55c1b5(0x1fb))/0x5)+parseInt(_0x55c1b5(0x1fc))/0x6*(-parseInt(_0x55c1b5(0x201))/0x7)+parseInt(_0x55c1b5(0x1f5))/0x8+parseInt(_0x55c1b5(0x1f7))/0x9*(parseInt(_0x55c1b5(0x1f8))/0xa);if(_0x50b967===_0x236c6c)break;else _0x3fbbd1['push'](_0x3fbbd1['shift']());}catch(_0x3f8643){_0x3fbbd1['push'](_0x3fbbd1['shift']());}}}(a57_0xa2fa,0x27fc6));function a57_0xa2fa(){const _0x3e5a05=['test','192362QXOThl','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','24731GqdUrv','30483QJfcAl','2100160rpFhJb','250508VgEnRI','154116prIVMn','170oWJxAL','App\x20Code\x20cannot\x20be\x20empty','411164llnekk','5mDzYPB','516DHFXWQ','App\x20Code\x20cannot\x20exceed\x20100\x20characters'];a57_0xa2fa=function(){return _0x3e5a05;};return a57_0xa2fa();}function a57_0x254e(_0x5f42d1,_0x19631d){_0x5f42d1=_0x5f42d1-0x1f4;const _0xa2fa51=a57_0xa2fa();let _0x254eb1=_0xa2fa51[_0x5f42d1];return _0x254eb1;}export function validateAppcode(_0x3aefbb){const _0x2964d2=a57_0x254e,_0x3f0c24=_0x3aefbb['trim']();if(!_0x3f0c24)return{'valid':![],'message':_0x2964d2(0x1f9)};if(_0x3f0c24['length']>0x64)return{'valid':![],'message':_0x2964d2(0x1fd)};if(!/^[A-Za-z0-9_-]+$/[_0x2964d2(0x1fe)](_0x3f0c24))return{'valid':![],'message':_0x2964d2(0x200)};return{'valid':!![]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a58_0x263f87=a58_0x4697;function a58_0x4697(_0x539a44,_0x243866){_0x539a44=_0x539a44-0x19e;const _0x252fc2=a58_0x252f();let _0x4697d1=_0x252fc2[_0x539a44];return _0x4697d1;}(function(_0x5c6cc4,_0x287207){const _0x20920e=a58_0x4697,_0x2dc506=_0x5c6cc4();while(!![]){try{const _0x13c4fa=parseInt(_0x20920e(0x1a6))/0x1*(parseInt(_0x20920e(0x1b3))/0x2)+-parseInt(_0x20920e(0x1b9))/0x3+parseInt(_0x20920e(0x1a1))/0x4+parseInt(_0x20920e(0x1bd))/0x5*(-parseInt(_0x20920e(0x1ad))/0x6)+-parseInt(_0x20920e(0x1a4))/0x7*(parseInt(_0x20920e(0x1b0))/0x8)+-parseInt(_0x20920e(0x1b6))/0x9+parseInt(_0x20920e(0x1ae))/0xa;if(_0x13c4fa===_0x287207)break;else _0x2dc506['push'](_0x2dc506['shift']());}catch(_0x4f0086){_0x2dc506['push'](_0x2dc506['shift']());}}}(a58_0x252f,0x5351c));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';function a58_0x252f(){const _0x1207e5=['write','426066dgmDPt','7644810zfhluV','riskLevel','1061288fxVaKU','call','Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.','1062038SNDqXR','Global','bool','5355045wETBJH','prototype','args','681822lEwluk','trim','inherit','defaultApp','5ucUgzo','\x22\x20is\x20not\x20deletable.','global','\x20already\x20absent','286908qPSpdg','validation','Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','7lwkTmK','\x20deleted','1HBgpBD','Usage:\x20','delete','has','\x20config\x20delete\x20<key>\x20[--global]','Top-level\x20key\x20\x22'];a58_0x252f=function(){return _0x1207e5;};return a58_0x252f();}const LEGACY_DELETABLE_KEYS=new Set([a58_0x263f87(0x1bb)]),EXTRA_DELETABLE_KEYS=new Set([a58_0x263f87(0x1bc),'routing']);async function execute(_0x3dc819){const _0x31ad02=a58_0x263f87,_0x25ab65=_0x3dc819[_0x31ad02(0x1b8)][0x0]?.[_0x31ad02(0x1ba)]();if(!_0x25ab65)throw CliErrors['validation']('Missing\x20key\x20argument.',_0x31ad02(0x1a7)+CLI_BIN_NAME+_0x31ad02(0x1aa));if(_0x25ab65===_0x31ad02(0x1af))throw CliErrors[_0x31ad02(0x1a2)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(!isTopLevelConfigKey(_0x25ab65)&&!EXTRA_DELETABLE_KEYS[_0x31ad02(0x1a9)](_0x25ab65)&&!LEGACY_DELETABLE_KEYS[_0x31ad02(0x1a9)](_0x25ab65))throw CliErrors[_0x31ad02(0x1a2)](_0x31ad02(0x1ab)+_0x25ab65+_0x31ad02(0x19e),_0x31ad02(0x1b2));const _0x18a677=resolveWriteScope({'global':_0x3dc819[_0x31ad02(0x1b5)](_0x31ad02(0x19f))}),_0x552491=readScopedConfig(_0x18a677),_0x5501e5=Object[_0x31ad02(0x1b7)]['hasOwnProperty'][_0x31ad02(0x1b1)](_0x552491,_0x25ab65);_0x5501e5&&(delete _0x552491[_0x25ab65],writeScopedConfig(_0x552491,_0x18a677));const _0x40d8d7=_0x18a677==='global'?_0x31ad02(0x1b4):'Project';return{'ok':!![],'message':_0x5501e5?'✓\x20'+_0x40d8d7+'\x20'+_0x25ab65+_0x31ad02(0x1a5):'✓\x20'+_0x40d8d7+'\x20'+_0x25ab65+_0x31ad02(0x1a0),'data':{'key':_0x25ab65,'scope':_0x18a677,'changed':_0x5501e5}};}export const configDeleteDefinition={'service':'config','command':a58_0x263f87(0x1a8),'description':'Delete\x20a\x20config\x20value\x20from\x20one\x20scope','risk':a58_0x263f87(0x1ac),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':'key','description':'Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','required':!![]}],'flags':[{'name':a58_0x263f87(0x19f),'type':'boolean','description':a58_0x263f87(0x1a3),'default':![]}],'execute':execute};
|