@lovrabet/rabetbase-cli 2.5.4-beta.3 → 2.5.4-beta.5
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/README.md +8 -2
- 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.d.ts +2 -0
- package/lib/commands/app/detail.js +1 -0
- 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/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/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/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/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.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.d.ts +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.d.ts +3 -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.d.ts +2 -0
- package/lib/commands/menu/shared/path.js +1 -0
- package/lib/commands/menu/shared/service.d.ts +6 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.d.ts +28 -0
- package/lib/commands/menu/shared/subapp-assets.js +1 -0
- package/lib/commands/menu/shared/sync-core.d.ts +2 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/types.d.ts +14 -4
- 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.d.ts +2 -0
- package/lib/commands/menu/subapp-assets-status.js +1 -0
- package/lib/commands/menu/subapp-assets-update.d.ts +2 -0
- package/lib/commands/menu/subapp-assets-update.js +1 -0
- 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.d.ts +16 -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-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/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/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/telemetry/send-platform-issue-collect-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 +22 -13
- package/skills/rabetbase/guides/backend-function.md +2 -7
- package/skills/rabetbase/guides/bff-creation-workflow.md +24 -23
- package/skills/rabetbase/guides/host-frontend-integration.md +62 -0
- package/skills/rabetbase/guides/independent-deployment.md +45 -0
- package/skills/rabetbase/guides/troubleshooting.md +9 -1
- package/skills/rabetbase/references/rabetbase-app-detail.md +31 -0
- package/skills/rabetbase/references/rabetbase-bff-detail.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-push.md +2 -2
- package/skills/rabetbase/references/rabetbase-data-list-status.md +1 -0
- package/skills/rabetbase/references/rabetbase-deployment-sync-all.md +5 -1
- package/skills/rabetbase/references/rabetbase-menu-asset-update.md +9 -7
- package/skills/rabetbase/references/rabetbase-menu-list.md +2 -2
- package/skills/rabetbase/references/rabetbase-menu-subapp-assets-status.md +19 -0
- package/skills/rabetbase/references/rabetbase-menu-subapp-assets-update.md +27 -0
- package/skills/rabetbase/references/rabetbase-menu-sync.md +40 -14
- package/skills/rabetbase/references/rabetbase-page-create.md +1 -1
- package/skills/rabetbase/references/rabetbase-page-generate-start.md +5 -3
- package/skills/rabetbase/references/rabetbase-page-generate-status.md +1 -0
- package/skills/rabetbase/references/rabetbase-user-account.md +8 -8
- package/skills/rabetbase.manifest.json +8 -3
package/lib/commands/bff/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a43_0x254bcd=a43_0x4ea9;(function(_0x13cdc4,_0x5b0eb3){const _0x243309=a43_0x4ea9,_0x49bf6f=_0x13cdc4();while(!![]){try{const _0x297e6b=parseInt(_0x243309(0x1af))/0x1+-parseInt(_0x243309(0x1de))/0x2*(-parseInt(_0x243309(0x1c3))/0x3)+-parseInt(_0x243309(0x1da))/0x4+parseInt(_0x243309(0x197))/0x5*(parseInt(_0x243309(0x19f))/0x6)+parseInt(_0x243309(0x1e7))/0x7+parseInt(_0x243309(0x1c5))/0x8*(parseInt(_0x243309(0x1ec))/0x9)+-parseInt(_0x243309(0x1b7))/0xa;if(_0x297e6b===_0x5b0eb3)break;else _0x49bf6f['push'](_0x49bf6f['shift']());}catch(_0x2ecd5f){_0x49bf6f['push'](_0x49bf6f['shift']());}}}(a43_0x1857,0x7d949));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';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 a43_0x4ea9(_0x52f7ff,_0x3ba263){_0x52f7ff=_0x52f7ff-0x197;const _0x1857cd=a43_0x1857();let _0x4ea9bf=_0x1857cd[_0x52f7ff];return _0x4ea9bf;}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':'bff','command':a43_0x254bcd(0x1d2),'description':a43_0x254bcd(0x1f6),'risk':a43_0x254bcd(0x1d1),'structuredErrors':!![],'flags':[{'name':a43_0x254bcd(0x19c),'type':a43_0x254bcd(0x1e8),'description':'Push\x20only\x20this\x20script\x20type','enum':['COMMON','ENDPOINT',a43_0x254bcd(0x1c4)]},{'name':a43_0x254bcd(0x1c7),'type':a43_0x254bcd(0x1e8),'description':a43_0x254bcd(0x1c0)},{'name':a43_0x254bcd(0x200),'type':'boolean','description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x2d8649){const _0xb2a441=a43_0x254bcd,_0x13018d=loadBffProjectConfig(_0x2d8649[_0xb2a441(0x1b1)]),_0x3fc8e9=await readBffLockFile(_0x13018d['lockFilePath']),{appLock:_0x5af0bb}=ensureLockScope(_0x3fc8e9??createEmptyBffLock(),_0x2d8649[_0xb2a441(0x1b1)],_0x13018d[_0xb2a441(0x1b2)],_0xb2a441(0x1d2)),_0x12d8a1=await getTargetFunctions(_0x13018d,_0x2d8649),_0x1e804a=_0x12d8a1[_0xb2a441(0x1d5)](_0x3c7693=>_0x3c7693[_0xb2a441(0x19c)]===_0xb2a441(0x1c4))?await scanLocalBffFunctions(_0x13018d,_0xb2a441(0x1c4)):_0x12d8a1,_0x508752=await buildHookMaps(_0x2d8649[_0xb2a441(0x1b1)],_0x2d8649['apiDir'],_0x1e804a,_0x5af0bb,_0x2d8649[_0xb2a441(0x1e2)]||_0x2d8649[_0xb2a441(0x1cf)]?.[_0xb2a441(0x198)]||_0x2d8649[_0xb2a441(0x1cf)]?.[_0xb2a441(0x1fd)]),_0x778d07=_0x2d8649['bool']('force'),_0x16e457=[];for(const _0x5bcf1c of _0x12d8a1){const _0x5e6134=await computeFileHash(_0x5bcf1c['filePath']),_0x49281a=_0x5af0bb['functions'][_0x5bcf1c['lockKey']],_0x875525=!!_0x49281a&&_0x49281a['hash']===_0x5e6134,_0x288890=_0x508752[_0xb2a441(0x1a4)]['get'](_0x5bcf1c['lockKey']),_0x15f470=!!_0x49281a?.['remoteId']&&_0x49281a[_0xb2a441(0x1c1)]==null&&(_0x778d07||!_0x875525),_0x4b589e=_0x15f470?missingRemoteVersionConflict(_0x5bcf1c,_0x49281a):undefined,_0x33b21e=_0x508752[_0xb2a441(0x1ce)][_0xb2a441(0x1a9)](_0x5bcf1c[_0xb2a441(0x1ff)])?_0xb2a441(0x1a5):!_0x778d07&&_0x875525?_0xb2a441(0x1d3):_0x4b589e?_0xb2a441(0x1f4):'would_push';_0x16e457[_0xb2a441(0x1d2)]({'lockKey':_0x5bcf1c['lockKey'],'filePath':_0x5bcf1c[_0xb2a441(0x1ba)],'remoteId':_0x49281a?.[_0xb2a441(0x1b4)]??null,'mode':_0x49281a?.[_0xb2a441(0x1b4)]?'update':'create','status':_0x33b21e,..._0x508752[_0xb2a441(0x1ce)][_0xb2a441(0x1a9)](_0x5bcf1c[_0xb2a441(0x1ff)])?{'error':_0x508752['failures'][_0xb2a441(0x1c9)](_0x5bcf1c[_0xb2a441(0x1ff)])}:{},..._0x4b589e?{'conflict':_0x4b589e}:{},..._0x508752['existingHooks'][_0xb2a441(0x1a9)](_0x5bcf1c[_0xb2a441(0x1ff)])?{'datasetCode':_0x49281a?.[_0xb2a441(0x19a)],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x5bcf1c[_0xb2a441(0x1ff)])]}:{},..._0x288890?{'alias':_0x288890[_0xb2a441(0x1a7)]??null,'datasetCode':_0x288890[_0xb2a441(0x19a)],'operationType':_0x5bcf1c[_0xb2a441(0x1db)],'functionNode':_0x5bcf1c[_0xb2a441(0x1ac)],'warnings':_0x288890[_0xb2a441(0x199)]}:{}});}return{'method':_0xb2a441(0x1b0),'url':_0xb2a441(0x1ae),'body':{'appCode':_0x2d8649[_0xb2a441(0x1b1)],'force':_0x778d07,'files':_0x16e457,'cacheClearAtRuntime':_0x16e457[_0xb2a441(0x1d5)](_0x289185=>_0x289185[_0xb2a441(0x202)]===_0xb2a441(0x1f9)),'cacheClearAtRuntimeTimes':_0x16e457['some'](_0x1bc0c9=>_0x1bc0c9[_0xb2a441(0x202)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0xb2a441(0x1bb)+_0x16e457[_0xb2a441(0x1b6)]+_0xb2a441(0x1b8)};},async 'execute'(_0x223dba){const _0x21a8cb=a43_0x254bcd,_0x59122d=loadBffProjectConfig(_0x223dba[_0x21a8cb(0x1b1)]),_0x20a553=await readBffLockFile(_0x59122d['lockFilePath']),{lockData:_0xfd7f53,appLock:_0x1406ae}=ensureLockScope(_0x20a553??createEmptyBffLock(),_0x223dba[_0x21a8cb(0x1b1)],_0x59122d[_0x21a8cb(0x1b2)],_0x21a8cb(0x1d2)),_0x412f0a=await getTargetFunctions(_0x59122d,_0x223dba);if(_0x412f0a[_0x21a8cb(0x1b6)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':_0x21a8cb(0x1ea)};const _0xf9d7d2=_0x223dba['bool']('force'),_0x42a1a0=JSON['parse'](JSON[_0x21a8cb(0x1ca)](_0xfd7f53)),_0x255f3b=_0x42a1a0[_0x21a8cb(0x1bf)][_0x223dba[_0x21a8cb(0x1b1)]];if(!_0x255f3b)throw new Error(_0x21a8cb(0x1aa)+_0x223dba[_0x21a8cb(0x1b1)]+_0x21a8cb(0x1be));const _0x4ad1f1=_0x412f0a[_0x21a8cb(0x1d5)](_0x25d34d=>_0x25d34d[_0x21a8cb(0x19c)]===_0x21a8cb(0x1c4))?await scanLocalBffFunctions(_0x59122d,_0x21a8cb(0x1c4)):_0x412f0a,_0x1c6212=await buildHookMaps(_0x223dba[_0x21a8cb(0x1b1)],_0x223dba['apiDir'],_0x4ad1f1,_0x255f3b,_0x223dba[_0x21a8cb(0x1e2)]||_0x223dba[_0x21a8cb(0x1cf)]?.[_0x21a8cb(0x198)]||_0x223dba[_0x21a8cb(0x1cf)]?.['defaultApp']),_0x5e31e6=[],_0xa1c29c=[],_0x449434=[],_0x34369c=[];for(const _0xaebfba of _0x412f0a){const _0x3dfc45=_0x1c6212[_0x21a8cb(0x1ce)][_0x21a8cb(0x1c9)](_0xaebfba[_0x21a8cb(0x1ff)]);if(_0x3dfc45){_0x34369c[_0x21a8cb(0x1d2)]({'lockKey':_0xaebfba[_0x21a8cb(0x1ff)],'error':_0x3dfc45});continue;}const _0x54f4e2=await computeFileHash(_0xaebfba['filePath']),_0x28d370=_0x255f3b[_0x21a8cb(0x1df)][_0xaebfba[_0x21a8cb(0x1ff)]];if(!_0xf9d7d2&&_0x28d370&&_0x28d370[_0x21a8cb(0x1bc)]===_0x54f4e2){_0xa1c29c[_0x21a8cb(0x1d2)]({'lockKey':_0xaebfba['lockKey'],'reason':'unchanged'});continue;}if(_0x28d370?.[_0x21a8cb(0x1b4)]&&_0x28d370[_0x21a8cb(0x1c1)]==null){_0x449434['push'](missingRemoteVersionConflict(_0xaebfba,_0x28d370));continue;}try{await uploadSingleFunction(_0x223dba[_0x21a8cb(0x1b1)],_0xaebfba,_0x255f3b,_0x1c6212);const _0x2cd6f2=_0x255f3b['functions'][_0xaebfba['lockKey']];_0x5e31e6[_0x21a8cb(0x1d2)]({'lockKey':_0xaebfba[_0x21a8cb(0x1ff)],'remoteId':_0x2cd6f2?.[_0x21a8cb(0x1b4)]??0x0});}catch(_0x35505c){const _0x2298a0=remoteVersionChangedConflict(_0xaebfba,_0x28d370,_0x35505c);if(_0x2298a0){_0x449434[_0x21a8cb(0x1d2)](_0x2298a0);continue;}_0x34369c[_0x21a8cb(0x1d2)]({'lockKey':_0xaebfba['lockKey'],'error':_0x35505c instanceof Error?_0x35505c[_0x21a8cb(0x1f8)]:String(_0x35505c)});}}_0x255f3b[_0x21a8cb(0x1e3)]=new Date()[_0x21a8cb(0x1e0)](),await writeBffLockFile(_0x59122d[_0x21a8cb(0x1fe)],_0x42a1a0),await waitForUploadedLockEntries(_0x59122d['lockFilePath'],_0x223dba['appCode'],_0x5e31e6[_0x21a8cb(0x1f7)](_0x542958=>_0x542958[_0x21a8cb(0x1ff)]));let _0x201d72={'attempted':![],'cleared':![]};if(_0x5e31e6['length']>0x0)try{let _0x407a31='';for(let _0x2306f0=0x0;_0x2306f0<CACHE_CLEAR_ATTEMPTS;_0x2306f0+=0x1){_0x407a31=await clearBffScriptCache(),_0x2306f0<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x201d72={'attempted':!![],'cleared':!![],'message':_0x407a31||_0x21a8cb(0x19d)};}catch(_0x3378b8){_0x201d72={'attempted':!![],'cleared':![],'error':_0x3378b8 instanceof Error?_0x3378b8[_0x21a8cb(0x1f8)]:String(_0x3378b8)};}const _0xe2ace1=_0x34369c[_0x21a8cb(0x1b6)]===0x0&&(_0x201d72['attempted']?_0x201d72[_0x21a8cb(0x1bd)]:!![]),_0x1bd856=_0xe2ace1,_0x266ea4=_0x201d72['attempted']?_0x201d72[_0x21a8cb(0x1bd)]?_0x21a8cb(0x1f2):_0x21a8cb(0x1d7):_0x21a8cb(0x1f3);return{'ok':_0x1bd856,'data':{'uploaded':_0x5e31e6,'skipped':_0xa1c29c,'conflicts':_0x449434,'failed':_0x34369c,'cacheClear':_0x201d72,'warnings':[...[..._0x1c6212[_0x21a8cb(0x1a4)]['values']()][_0x21a8cb(0x1d9)](_0x379aff=>_0x379aff[_0x21a8cb(0x199)]),...[..._0x1c6212['existingHooks']][_0x21a8cb(0x1f7)](existingHookWarning)]},'message':formatPushMessage(_0x5e31e6[_0x21a8cb(0x1b6)],_0xa1c29c[_0x21a8cb(0x1b6)],_0x449434[_0x21a8cb(0x1b6)],_0x34369c[_0x21a8cb(0x1b6)],_0x266ea4)};}};function missingRemoteVersionConflict(_0x4c060c,_0x27b47e){const _0x3b1724=a43_0x254bcd;return remoteVersionConflict(_0x4c060c,_0x27b47e,_0x3b1724(0x1ed),_0x3b1724(0x1a6));}function remoteVersionChangedConflict(_0x454c22,_0x16a8fb,_0x3091f3){const _0x356092=a43_0x254bcd;if(!_0x16a8fb?.[_0x356092(0x1b4)]||_0x16a8fb['version']==null||!isRemoteVersionConflict(_0x3091f3))return undefined;return remoteVersionConflict(_0x454c22,_0x16a8fb,_0x356092(0x1d0),'Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.');}function remoteVersionConflict(_0x468980,_0x2ac06f,_0x3907fe,_0x1a431d){const _0x3a6f76=a43_0x254bcd;return{'code':_0x3907fe,'lockKey':_0x468980[_0x3a6f76(0x1ff)],'filePath':_0x468980[_0x3a6f76(0x1ba)],'remoteId':_0x2ac06f['remoteId'],..._0x2ac06f['version']!=null?{'expectedVersion':_0x2ac06f['version']}:{},'message':_0x1a431d,'nextAction':{'action':_0x3a6f76(0x1e9),'command':CLI_BIN_NAME+_0x3a6f76(0x1c2)+_0x2ac06f[_0x3a6f76(0x1b4)]+_0x3a6f76(0x1a0),'requiresReview':!![],'message':_0x3a6f76(0x1f1)}};}function isRemoteVersionConflict(_0x3e6566){const _0x92af24=a43_0x254bcd,_0x24ef9a=_0x3e6566 instanceof Error?_0x3e6566[_0x92af24(0x1f8)]:String(_0x3e6566),_0x2a5a8f=getPlatformErrorCode(_0x3e6566)??'';return[_0x24ef9a,_0x2a5a8f][_0x92af24(0x1d5)](_0x878431=>/(?: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[_0x92af24(0x1e5)](_0x878431));}function formatPushMessage(_0x5a2c84,_0x3f7635,_0x1ac85c,_0x55f6ca,_0x20ece6){const _0x2a318f=a43_0x254bcd,_0x4b7641=[_0x2a318f(0x1a1)+_0x5a2c84+_0x2a318f(0x1c6),_0x3f7635+'\x20skipped'];_0x1ac85c>0x0&&_0x4b7641[_0x2a318f(0x1d2)](_0x1ac85c+_0x2a318f(0x1dd)+(_0x1ac85c===0x1?'':'s')+'\x20'+(_0x1ac85c===0x1?_0x2a318f(0x1cb):_0x2a318f(0x1b9))+_0x2a318f(0x201));if(_0x55f6ca>0x0)_0x4b7641[_0x2a318f(0x1d2)](_0x55f6ca+_0x2a318f(0x1d8));return _0x4b7641[_0x2a318f(0x1d2)](_0x20ece6),_0x4b7641[_0x2a318f(0x1e1)](',\x20');}async function getTargetFunctions(_0x4c30ff,_0xa8fe30){const _0x6e4250=a43_0x254bcd,_0x4db6fe=_0xa8fe30[_0x6e4250(0x1a3)](_0x6e4250(0x19c)),_0x1e9325=_0xa8fe30[_0x6e4250(0x1a3)](_0x6e4250(0x1c7)),_0x1d00ed=normalizeBffType(_0x4db6fe)??undefined;if(_0x1e9325&&!_0x1d00ed)throw CliErrors[_0x6e4250(0x1fb)](_0x6e4250(0x19b));const _0x59b48b=await scanLocalBffFunctions(_0x4c30ff,_0x1d00ed);if(_0x1e9325){const _0x109fd5=_0x59b48b[_0x6e4250(0x1cd)](_0x38a57f=>_0x38a57f['name']===_0x1e9325);if(_0x109fd5[_0x6e4250(0x1b6)]===0x0)throw CliErrors[_0x6e4250(0x1fb)](_0x6e4250(0x1ab)+_0x1d00ed+'/'+_0x1e9325);return _0x109fd5;}return _0x59b48b;}function existingHookWarning(_0x389363){const _0x1f3411=a43_0x254bcd;return{'code':_0x1f3411(0x1f5),'lockKey':_0x389363,'message':_0x1f3411(0x1cc)};}function a43_0x1857(){const _0x3a6c70=['appCode','scriptsRoot','script','remoteId','Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.','length','19629190clKZaD','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','require','filePath','Would\x20inspect\x20','hash','cleared','\x22\x20not\x20found\x20after\x20ensureLockScope.','apps','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','version','\x20bff\x20detail\x20--id\x20','543GbmqCO','HOOK','35656ApsRPa','\x20uploaded','name','utf8','get','stringify','requires','Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.','filter','failures','mergedCli','BFF_REMOTE_VERSION_CHANGED','write','push','unchanged','every','some','existingHooks','runtime\x20cache\x20clear\x20failed','\x20failed','flatMap','1522536AFHXzj','operationType','set','\x20conflict','9578RUcOFQ','functions','toISOString','join','selectedAppName','lastSync','HOOK_DATASET_NOT_FOUND:','test','beforeScriptId','5469499tHdBPN','string','review_remote_and_merge','No\x20local\x20Backend\x20Function\x20scripts\x20found.','datasetId','1917CizQEG','BFF_REMOTE_VERSION_MISSING','Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.','dataset','description','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.','runtime\x20cache\x20cleared','runtime\x20cache\x20not\x20needed','conflict','EXISTING_HOOK_BINDING_PRESERVED','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','map','message','would_push',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','validation','add','defaultApp','lockFilePath','lockKey','force','\x20resolution','status','20WNuBav','currentApp','warnings','datasetCode','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','type','Runtime\x20script\x20cache\x20cleared.','delete','203754RojoLa','\x20--format\x20compress','Push\x20complete:\x20','startsWith','str','resolutions','failed','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','alias','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','has','Lock\x20scope\x20for\x20app\x20\x22','Local\x20function\x20not\x20found:\x20','functionNode','Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20','/api/management/library/scripts/save','124587jdmpEj','POST'];a43_0x1857=function(){return _0x3a6c70;};return a43_0x1857();}async function buildHookMaps(_0xab5fc6,_0x1bb6b1,_0x48e64c,_0x5e0362,_0x47aa8e){const _0x1ae22d=a43_0x254bcd,_0x5d239b=_0x48e64c[_0x1ae22d(0x1d5)](_0x1d38c6=>_0x1d38c6['type']===_0x1ae22d(0x1c4));if(!_0x5d239b)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0x5a1462=resolveApiModelSource(_0x1bb6b1,_0xab5fc6,_0x47aa8e),_0x2fa2d9=loadAliasMap(_0x1bb6b1,undefined,_0x5a1462[_0x1ae22d(0x1ba)],_0x5a1462['profileName']);assertUnambiguousHookAliases(_0x2fa2d9);const _0x289087=[..._0x2fa2d9[_0x1ae22d(0x1f7)](_0x429b55=>[_0x429b55[_0x1ae22d(0x1a7)],_0x429b55[_0x1ae22d(0x19a)]]),...trackedHookDirectoryMappings(_0x5e0362)[_0x1ae22d(0x1f7)](_0x5f5bc0=>[_0x5f5bc0[_0x1ae22d(0x1a7)],_0x5f5bc0[_0x1ae22d(0x19a)]])],_0x2aa81a=await listDatasets(_0xab5fc6);assertUnambiguousHookDirectoryMappings(_0x289087[_0x1ae22d(0x1f7)](([_0x359e28,_0x1950a3])=>({'alias':_0x359e28,'datasetCode':_0x1950a3})));const _0x58da4e=buildHookDirectoryIndexes(_0x2aa81a,_0x289087),_0x14bccc=new Map(),_0x18ade9=preflightPushHookDirectories(_0x48e64c,_0x5e0362,_0x58da4e,_0x14bccc),_0x5b6b84=new Set(),_0x51fe59=_0x48e64c[_0x1ae22d(0x1cd)](_0x3a46d6=>_0x14bccc[_0x1ae22d(0x1c9)](_0x3a46d6[_0x1ae22d(0x1ff)])?.[_0x1ae22d(0x1a2)](_0x1ae22d(0x1e4))&&_0x5e0362['functions'][_0x3a46d6[_0x1ae22d(0x1ff)]]?.['remoteId']&&_0x5e0362['functions'][_0x3a46d6['lockKey']]?.[_0x1ae22d(0x19a)]);if(_0x51fe59[_0x1ae22d(0x1b6)]>0x0){let _0x3368b4;try{_0x3368b4=await getBffScriptStatistics(_0xab5fc6);}catch(_0x21fb27){for(const _0x4e090e of _0x51fe59)_0x14bccc[_0x1ae22d(0x1dc)](_0x4e090e['lockKey'],_0x1ae22d(0x1ad)+(_0x21fb27 instanceof Error?_0x21fb27[_0x1ae22d(0x1f8)]:String(_0x21fb27)));return{'resolutions':_0x18ade9,'failures':_0x14bccc,'existingHooks':_0x5b6b84};}for(const _0x286b2c of _0x51fe59){const _0x2d5906=_0x5e0362['functions'][_0x286b2c[_0x1ae22d(0x1ff)]];try{const _0x20e1e8=new Set(_0x48e64c[_0x1ae22d(0x1cd)](_0x29a750=>_0x29a750[_0x1ae22d(0x19c)]===_0x1ae22d(0x1c4)&&_0x5e0362[_0x1ae22d(0x1df)][_0x29a750[_0x1ae22d(0x1ff)]]?.[_0x1ae22d(0x19a)]===_0x2d5906[_0x1ae22d(0x19a)])['map'](_0x446d37=>_0x446d37[_0x1ae22d(0x1a7)]));if(_0x20e1e8['size']>0x1)throw CliErrors['validation'](_0x1ae22d(0x1b5));const _0x109a89=_0x3368b4[_0x1ae22d(0x1d9)](_0x1767dc=>[{'datasetCode':_0x1767dc['datasetCode'],'operationType':snakeToCamel(_0x1767dc['operationType']),'functionNode':'before','id':_0x1767dc[_0x1ae22d(0x1e6)]},{'datasetCode':_0x1767dc['datasetCode'],'operationType':snakeToCamel(_0x1767dc[_0x1ae22d(0x1db)]),'functionNode':'after','id':_0x1767dc['afterScriptId']}])[_0x1ae22d(0x1cd)](_0x505e0b=>_0x505e0b['id']===_0x2d5906['remoteId']),_0x3f2c80=await getBffScriptInfo(_0x2d5906[_0x1ae22d(0x1b4)]);if(_0x3f2c80['id']!==_0x2d5906[_0x1ae22d(0x1b4)]||_0x3f2c80['appCode']!==_0xab5fc6||_0x3f2c80['scriptType']!==_0x1ae22d(0x1c4)||_0x3f2c80['functionName']!==_0x286b2c[_0x1ae22d(0x1c7)]||_0x2d5906[_0x1ae22d(0x1c1)]==null||_0x3f2c80[_0x1ae22d(0x1c1)]!==_0x2d5906[_0x1ae22d(0x1c1)]||_0x109a89[_0x1ae22d(0x1b6)]!==0x1||_0x109a89[0x0][_0x1ae22d(0x19a)]!==_0x2d5906['datasetCode']||_0x109a89[0x0][_0x1ae22d(0x1db)]!==_0x286b2c[_0x1ae22d(0x1db)]||_0x109a89[0x0][_0x1ae22d(0x1ac)]!==_0x286b2c['functionNode']||_0x2d5906['operationType']!==_0x286b2c['operationType']||_0x2d5906[_0x1ae22d(0x1ac)]!==_0x286b2c['functionNode'])throw CliErrors[_0x1ae22d(0x1fb)](_0x1ae22d(0x1ee));_0x5b6b84[_0x1ae22d(0x1fc)](_0x286b2c['lockKey']),_0x14bccc[_0x1ae22d(0x19e)](_0x286b2c['lockKey']);}catch(_0x121f0c){_0x14bccc[_0x1ae22d(0x1dc)](_0x286b2c[_0x1ae22d(0x1ff)],_0x121f0c instanceof Error?_0x121f0c['message']:String(_0x121f0c));}}}return{'resolutions':_0x18ade9,'failures':_0x14bccc,'existingHooks':_0x5b6b84};}async function uploadSingleFunction(_0x1811c6,_0x17489a,_0x306538,_0x21375b){const _0x3b728b=a43_0x254bcd,_0xb41902=await readFile(_0x17489a[_0x3b728b(0x1ba)],_0x3b728b(0x1c8)),_0x35100e=await computeFileHash(_0x17489a[_0x3b728b(0x1ba)]),_0x59cf52=_0x306538['functions'][_0x17489a[_0x3b728b(0x1ff)]];if(_0x59cf52?.['remoteId']&&_0x59cf52[_0x3b728b(0x1c1)]==null)throw CliErrors['validation'](_0x17489a[_0x3b728b(0x1ff)]+_0x3b728b(0x1fa));let _0x5ac50b=extractScriptDescription(_0xb41902);if(!_0x5ac50b&&_0x59cf52?.[_0x3b728b(0x1b4)]){const _0xddf6da=await getBffScriptInfo(_0x59cf52[_0x3b728b(0x1b4)]);_0x5ac50b=_0xddf6da[_0x3b728b(0x1f0)]||undefined;}const _0x54eae3={'appCode':_0x1811c6,'functionName':_0x17489a[_0x3b728b(0x1c7)],'scriptType':_0x17489a[_0x3b728b(0x19c)],'scriptContent':_0xb41902};if(_0x59cf52?.[_0x3b728b(0x1b4)])_0x54eae3['id']=_0x59cf52[_0x3b728b(0x1b4)];if(_0x59cf52?.[_0x3b728b(0x1c1)]!=null)_0x54eae3[_0x3b728b(0x1c1)]=_0x59cf52[_0x3b728b(0x1c1)];if(_0x5ac50b)_0x54eae3[_0x3b728b(0x1f0)]=_0x5ac50b;if(_0x17489a[_0x3b728b(0x19c)]===_0x3b728b(0x1c4)){const _0x188cc5=_0x21375b['resolutions'][_0x3b728b(0x1c9)](_0x17489a[_0x3b728b(0x1ff)]);if(!_0x188cc5&&!_0x21375b[_0x3b728b(0x1d6)]['has'](_0x17489a[_0x3b728b(0x1ff)])||!_0x17489a[_0x3b728b(0x1db)]||!_0x17489a[_0x3b728b(0x1ac)])throw CliErrors[_0x3b728b(0x1fb)]('Incomplete\x20HOOK\x20path:\x20'+_0x17489a[_0x3b728b(0x1ff)]);_0x188cc5&&(_0x54eae3[_0x3b728b(0x1eb)]=_0x188cc5[_0x3b728b(0x1ef)]['id'],_0x54eae3[_0x3b728b(0x1db)]=_0x17489a[_0x3b728b(0x1db)]),_0x54eae3[_0x3b728b(0x1ac)]=_0x17489a[_0x3b728b(0x1ac)];}const _0x4576a8=await saveBffScript(_0x54eae3),_0x283539=_0x4576a8['id'],_0x3dfc38=_0x4576a8[_0x3b728b(0x1b3)]??await getBffScriptInfo(_0x283539),_0x4bd4b8={'hash':_0x35100e,'remoteId':_0x283539,'version':_0x3dfc38[_0x3b728b(0x1c1)]};if(_0x17489a[_0x3b728b(0x19c)]===_0x3b728b(0x1c4)){const _0x18b6e0=_0x21375b[_0x3b728b(0x1a4)][_0x3b728b(0x1c9)](_0x17489a[_0x3b728b(0x1ff)]);if(!_0x18b6e0){_0x306538['functions'][_0x17489a[_0x3b728b(0x1ff)]]={..._0x59cf52,..._0x4bd4b8};return;}_0x4bd4b8[_0x3b728b(0x1a7)]=_0x18b6e0['alias']??_0x59cf52?.['alias'],_0x4bd4b8[_0x3b728b(0x19a)]=_0x18b6e0[_0x3b728b(0x19a)],_0x4bd4b8[_0x3b728b(0x1db)]=_0x17489a[_0x3b728b(0x1db)],_0x4bd4b8[_0x3b728b(0x1ac)]=_0x17489a[_0x3b728b(0x1ac)];}_0x306538[_0x3b728b(0x1df)][_0x17489a[_0x3b728b(0x1ff)]]=_0x4bd4b8;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x192d13,_0x21fbdf,_0x1d48e3){const _0x2f74fb=a43_0x254bcd;if(_0x1d48e3[_0x2f74fb(0x1b6)]===0x0)return;for(let _0x17b430=0x0;_0x17b430<LOCK_SETTLE_RETRY_COUNT;_0x17b430+=0x1){const _0x18296b=await readBffLockFile(_0x192d13),_0x5195c0=_0x18296b?.[_0x2f74fb(0x1bf)]?.[_0x21fbdf]?.['functions']??{},_0x15685c=_0x1d48e3[_0x2f74fb(0x1d4)](_0x50b184=>!!_0x5195c0[_0x50b184]?.[_0x2f74fb(0x1b4)]);if(_0x15685c)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x2f74fb(0x1a8)+_0x1d48e3[_0x2f74fb(0x1e1)](',\x20')+'.');}
|
|
1
|
+
const a44_0x5e6ad6=a44_0x5d1e;(function(_0x578b5c,_0x38f6bc){const _0x393c19=a44_0x5d1e,_0x55197c=_0x578b5c();while(!![]){try{const _0x2da655=-parseInt(_0x393c19(0x1fc))/0x1+-parseInt(_0x393c19(0x205))/0x2+-parseInt(_0x393c19(0x21f))/0x3*(-parseInt(_0x393c19(0x1d1))/0x4)+-parseInt(_0x393c19(0x220))/0x5+parseInt(_0x393c19(0x1fb))/0x6*(-parseInt(_0x393c19(0x234))/0x7)+-parseInt(_0x393c19(0x1c5))/0x8*(parseInt(_0x393c19(0x1d9))/0x9)+parseInt(_0x393c19(0x1e3))/0xa;if(_0x2da655===_0x38f6bc)break;else _0x55197c['push'](_0x55197c['shift']());}catch(_0x127a00){_0x55197c['push'](_0x55197c['shift']());}}}(a44_0x2718,0xaec51));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';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_0x5e6ad6(0x22b),'command':a44_0x5e6ad6(0x1d8),'description':a44_0x5e6ad6(0x1e6),'risk':a44_0x5e6ad6(0x1ca),'structuredErrors':!![],'flags':[{'name':a44_0x5e6ad6(0x1df),'type':a44_0x5e6ad6(0x1d2),'description':a44_0x5e6ad6(0x235),'enum':[a44_0x5e6ad6(0x210),a44_0x5e6ad6(0x1fd),a44_0x5e6ad6(0x1d7)]},{'name':'name','type':a44_0x5e6ad6(0x1d2),'description':'Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)'},{'name':a44_0x5e6ad6(0x233),'type':a44_0x5e6ad6(0x1c6),'description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x4c937b){const _0x2be0ee=a44_0x5e6ad6,_0x3781b9=loadBffProjectConfig(_0x4c937b[_0x2be0ee(0x1f9)]),_0x8edab0=await readBffLockFile(_0x3781b9[_0x2be0ee(0x1d5)]),{appLock:_0x5ac13d}=ensureLockScope(_0x8edab0??createEmptyBffLock(),_0x4c937b[_0x2be0ee(0x1f9)],_0x3781b9[_0x2be0ee(0x216)],_0x2be0ee(0x1d8)),_0x2dfde0=await getTargetFunctions(_0x3781b9,_0x4c937b),_0x55e914=_0x2dfde0[_0x2be0ee(0x1cf)](_0x551f68=>_0x551f68[_0x2be0ee(0x1df)]===_0x2be0ee(0x1d7))?await scanLocalBffFunctions(_0x3781b9,_0x2be0ee(0x1d7)):_0x2dfde0,_0x381eb5=await buildHookMaps(_0x4c937b[_0x2be0ee(0x1f9)],_0x4c937b['apiDir'],_0x55e914,_0x5ac13d,_0x4c937b[_0x2be0ee(0x1e0)]||_0x4c937b['mergedCli']?.[_0x2be0ee(0x1f8)]||_0x4c937b[_0x2be0ee(0x1c7)]?.[_0x2be0ee(0x1dc)]),_0x2aa751=_0x4c937b[_0x2be0ee(0x212)](_0x2be0ee(0x233)),_0x404dbc=[];for(const _0x455d6d of _0x2dfde0){const _0x1ec0dc=await computeFileHash(_0x455d6d[_0x2be0ee(0x1d6)]),_0x13e6c2=_0x5ac13d[_0x2be0ee(0x1c4)][_0x455d6d[_0x2be0ee(0x20f)]],_0x24ac44=!!_0x13e6c2&&_0x13e6c2[_0x2be0ee(0x20b)]===_0x1ec0dc,_0x33ba74=_0x381eb5[_0x2be0ee(0x1ea)][_0x2be0ee(0x221)](_0x455d6d['lockKey']),_0x1dcb48=!!_0x13e6c2?.[_0x2be0ee(0x1f6)]&&_0x13e6c2[_0x2be0ee(0x1f3)]==null&&(_0x2aa751||!_0x24ac44),_0x1fa08a=_0x1dcb48?missingRemoteVersionConflict(_0x455d6d,_0x13e6c2):undefined,_0x34575c=_0x381eb5[_0x2be0ee(0x226)][_0x2be0ee(0x218)](_0x455d6d[_0x2be0ee(0x20f)])?_0x2be0ee(0x1f0):!_0x2aa751&&_0x24ac44?'unchanged':_0x1fa08a?_0x2be0ee(0x203):_0x2be0ee(0x21a);_0x404dbc['push']({'lockKey':_0x455d6d[_0x2be0ee(0x20f)],'filePath':_0x455d6d['filePath'],'remoteId':_0x13e6c2?.['remoteId']??null,'mode':_0x13e6c2?.['remoteId']?_0x2be0ee(0x1e8):_0x2be0ee(0x1c9),'status':_0x34575c,..._0x381eb5[_0x2be0ee(0x226)][_0x2be0ee(0x218)](_0x455d6d['lockKey'])?{'error':_0x381eb5[_0x2be0ee(0x226)]['get'](_0x455d6d[_0x2be0ee(0x20f)])}:{},..._0x1fa08a?{'conflict':_0x1fa08a}:{},..._0x381eb5[_0x2be0ee(0x22a)]['has'](_0x455d6d['lockKey'])?{'datasetCode':_0x13e6c2?.['datasetCode'],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x455d6d['lockKey'])]}:{},..._0x33ba74?{'alias':_0x33ba74[_0x2be0ee(0x20d)]??null,'datasetCode':_0x33ba74[_0x2be0ee(0x225)],'operationType':_0x455d6d['operationType'],'functionNode':_0x455d6d[_0x2be0ee(0x1cd)],'warnings':_0x33ba74[_0x2be0ee(0x1d4)]}:{}});}return{'method':_0x2be0ee(0x1c8),'url':_0x2be0ee(0x217),'body':{'appCode':_0x4c937b[_0x2be0ee(0x1f9)],'force':_0x2aa751,'files':_0x404dbc,'cacheClearAtRuntime':_0x404dbc[_0x2be0ee(0x1cf)](_0x3fc7b1=>_0x3fc7b1['status']===_0x2be0ee(0x21a)),'cacheClearAtRuntimeTimes':_0x404dbc[_0x2be0ee(0x1cf)](_0x90899e=>_0x90899e[_0x2be0ee(0x20a)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x2be0ee(0x232)+_0x404dbc[_0x2be0ee(0x1e4)]+_0x2be0ee(0x21b)};},async 'execute'(_0x373c4d){const _0x6e6f3b=a44_0x5e6ad6,_0x4d2c1=loadBffProjectConfig(_0x373c4d[_0x6e6f3b(0x1f9)]),_0x4b4b02=await readBffLockFile(_0x4d2c1[_0x6e6f3b(0x1d5)]),{lockData:_0x3093af,appLock:_0x472915}=ensureLockScope(_0x4b4b02??createEmptyBffLock(),_0x373c4d[_0x6e6f3b(0x1f9)],_0x4d2c1[_0x6e6f3b(0x216)],'push'),_0x1c353c=await getTargetFunctions(_0x4d2c1,_0x373c4d);if(_0x1c353c[_0x6e6f3b(0x1e4)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':_0x6e6f3b(0x1e1)};const _0x47ea6e=_0x373c4d[_0x6e6f3b(0x212)]('force'),_0x198457=JSON[_0x6e6f3b(0x222)](JSON['stringify'](_0x3093af)),_0x44e0b2=_0x198457['apps'][_0x373c4d[_0x6e6f3b(0x1f9)]];if(!_0x44e0b2)throw new Error(_0x6e6f3b(0x214)+_0x373c4d['appCode']+_0x6e6f3b(0x1da));const _0x5144cc=_0x1c353c['some'](_0x33d978=>_0x33d978[_0x6e6f3b(0x1df)]===_0x6e6f3b(0x1d7))?await scanLocalBffFunctions(_0x4d2c1,_0x6e6f3b(0x1d7)):_0x1c353c,_0x14d97c=await buildHookMaps(_0x373c4d[_0x6e6f3b(0x1f9)],_0x373c4d['apiDir'],_0x5144cc,_0x44e0b2,_0x373c4d['selectedAppName']||_0x373c4d[_0x6e6f3b(0x1c7)]?.[_0x6e6f3b(0x1f8)]||_0x373c4d[_0x6e6f3b(0x1c7)]?.[_0x6e6f3b(0x1dc)]),_0x4e914f=[],_0x22e0eb=[],_0x56a6de=[],_0x504706=[];for(const _0x11ff82 of _0x1c353c){const _0x557adb=_0x14d97c[_0x6e6f3b(0x226)][_0x6e6f3b(0x221)](_0x11ff82['lockKey']);if(_0x557adb){_0x504706[_0x6e6f3b(0x1d8)]({'lockKey':_0x11ff82[_0x6e6f3b(0x20f)],'error':_0x557adb});continue;}const _0x56cf85=await computeFileHash(_0x11ff82[_0x6e6f3b(0x1d6)]),_0xe0496f=_0x44e0b2['functions'][_0x11ff82[_0x6e6f3b(0x20f)]];if(!_0x47ea6e&&_0xe0496f&&_0xe0496f[_0x6e6f3b(0x20b)]===_0x56cf85){_0x22e0eb[_0x6e6f3b(0x1d8)]({'lockKey':_0x11ff82['lockKey'],'reason':_0x6e6f3b(0x1ed)});continue;}if(_0xe0496f?.[_0x6e6f3b(0x1f6)]&&_0xe0496f[_0x6e6f3b(0x1f3)]==null){_0x56a6de[_0x6e6f3b(0x1d8)](missingRemoteVersionConflict(_0x11ff82,_0xe0496f));continue;}try{await uploadSingleFunction(_0x373c4d[_0x6e6f3b(0x1f9)],_0x11ff82,_0x44e0b2,_0x14d97c);const _0x12c26e=_0x44e0b2[_0x6e6f3b(0x1c4)][_0x11ff82[_0x6e6f3b(0x20f)]];_0x4e914f[_0x6e6f3b(0x1d8)]({'lockKey':_0x11ff82['lockKey'],'remoteId':_0x12c26e?.[_0x6e6f3b(0x1f6)]??0x0});}catch(_0x3fdd52){const _0x483f75=remoteVersionChangedConflict(_0x11ff82,_0xe0496f,_0x3fdd52);if(_0x483f75){_0x56a6de['push'](_0x483f75);continue;}_0x504706[_0x6e6f3b(0x1d8)]({'lockKey':_0x11ff82[_0x6e6f3b(0x20f)],'error':_0x3fdd52 instanceof Error?_0x3fdd52['message']:String(_0x3fdd52)});}}_0x44e0b2[_0x6e6f3b(0x1cc)]=new Date()['toISOString'](),await writeBffLockFile(_0x4d2c1[_0x6e6f3b(0x1d5)],_0x198457),await waitForUploadedLockEntries(_0x4d2c1[_0x6e6f3b(0x1d5)],_0x373c4d[_0x6e6f3b(0x1f9)],_0x4e914f['map'](_0xaaeff0=>_0xaaeff0[_0x6e6f3b(0x20f)]));let _0x2ccd15={'attempted':![],'cleared':![]};if(_0x4e914f[_0x6e6f3b(0x1e4)]>0x0)try{let _0x1b87f4='';for(let _0x98cb31=0x0;_0x98cb31<CACHE_CLEAR_ATTEMPTS;_0x98cb31+=0x1){_0x1b87f4=await clearBffScriptCache(),_0x98cb31<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x2ccd15={'attempted':!![],'cleared':!![],'message':_0x1b87f4||_0x6e6f3b(0x224)};}catch(_0x47f551){_0x2ccd15={'attempted':!![],'cleared':![],'error':_0x47f551 instanceof Error?_0x47f551[_0x6e6f3b(0x229)]:String(_0x47f551)};}const _0x16c9a4=_0x504706[_0x6e6f3b(0x1e4)]===0x0&&(_0x2ccd15['attempted']?_0x2ccd15[_0x6e6f3b(0x1de)]:!![]),_0x39b27d=_0x16c9a4,_0x34d48e=_0x2ccd15['attempted']?_0x2ccd15[_0x6e6f3b(0x1de)]?_0x6e6f3b(0x1f1):'runtime\x20cache\x20clear\x20failed':_0x6e6f3b(0x230);return{'ok':_0x39b27d,'data':{'uploaded':_0x4e914f,'skipped':_0x22e0eb,'conflicts':_0x56a6de,'failed':_0x504706,'cacheClear':_0x2ccd15,'warnings':[...[..._0x14d97c[_0x6e6f3b(0x1ea)][_0x6e6f3b(0x21c)]()]['flatMap'](_0x386c0f=>_0x386c0f['warnings']),...[..._0x14d97c['existingHooks']][_0x6e6f3b(0x22f)](existingHookWarning)]},'message':formatPushMessage(_0x4e914f[_0x6e6f3b(0x1e4)],_0x22e0eb[_0x6e6f3b(0x1e4)],_0x56a6de[_0x6e6f3b(0x1e4)],_0x504706['length'],_0x34d48e)};}};function missingRemoteVersionConflict(_0x53363f,_0x285e04){const _0x2cdea5=a44_0x5e6ad6;return remoteVersionConflict(_0x53363f,_0x285e04,_0x2cdea5(0x211),_0x2cdea5(0x1ef));}function remoteVersionChangedConflict(_0x161a62,_0x185e9f,_0x4cab46){const _0x55fa7b=a44_0x5e6ad6;if(!_0x185e9f?.[_0x55fa7b(0x1f6)]||_0x185e9f[_0x55fa7b(0x1f3)]==null||!isRemoteVersionConflict(_0x4cab46))return undefined;return remoteVersionConflict(_0x161a62,_0x185e9f,_0x55fa7b(0x1e7),_0x55fa7b(0x1e2));}function remoteVersionConflict(_0x11f855,_0x173aa9,_0x418d5b,_0x32ea65){const _0x1c9d62=a44_0x5e6ad6;return{'code':_0x418d5b,'lockKey':_0x11f855[_0x1c9d62(0x20f)],'filePath':_0x11f855[_0x1c9d62(0x1d6)],'remoteId':_0x173aa9['remoteId'],..._0x173aa9['version']!=null?{'expectedVersion':_0x173aa9[_0x1c9d62(0x1f3)]}:{},'message':_0x32ea65,'nextAction':{'action':_0x1c9d62(0x1e5),'command':CLI_BIN_NAME+'\x20bff\x20detail\x20--id\x20'+_0x173aa9[_0x1c9d62(0x1f6)]+'\x20--format\x20compress','requiresReview':!![],'message':_0x1c9d62(0x228)}};}function isRemoteVersionConflict(_0x126ddd){const _0x3ad184=a44_0x5e6ad6,_0x24ae30=_0x126ddd instanceof Error?_0x126ddd['message']:String(_0x126ddd),_0x112a12=getPlatformErrorCode(_0x126ddd)??'';return[_0x24ae30,_0x112a12][_0x3ad184(0x1cf)](_0x24b851=>/(?: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[_0x3ad184(0x213)](_0x24b851));}function formatPushMessage(_0x17c218,_0x28e3c8,_0x389eef,_0x2c5eda,_0x4aa569){const _0x4ffdde=a44_0x5e6ad6,_0xb57c48=[_0x4ffdde(0x20c)+_0x17c218+'\x20uploaded',_0x28e3c8+_0x4ffdde(0x1f7)];_0x389eef>0x0&&_0xb57c48[_0x4ffdde(0x1d8)](_0x389eef+'\x20conflict'+(_0x389eef===0x1?'':'s')+'\x20'+(_0x389eef===0x1?'requires':_0x4ffdde(0x1ce))+_0x4ffdde(0x231));if(_0x2c5eda>0x0)_0xb57c48[_0x4ffdde(0x1d8)](_0x2c5eda+_0x4ffdde(0x223));return _0xb57c48[_0x4ffdde(0x1d8)](_0x4aa569),_0xb57c48['join'](',\x20');}async function getTargetFunctions(_0x435ad0,_0xf2cb4){const _0x4c0324=a44_0x5e6ad6,_0xeecb91=_0xf2cb4[_0x4c0324(0x22e)](_0x4c0324(0x1df)),_0x4ecf4f=_0xf2cb4[_0x4c0324(0x22e)](_0x4c0324(0x1fe)),_0x5f6946=normalizeBffType(_0xeecb91)??undefined;if(_0x4ecf4f&&!_0x5f6946)throw CliErrors['validation'](_0x4c0324(0x1d0));const _0x113ecd=await scanLocalBffFunctions(_0x435ad0,_0x5f6946);if(_0x4ecf4f){const _0x2c72ab=_0x113ecd['filter'](_0x1b2cba=>_0x1b2cba['name']===_0x4ecf4f);if(_0x2c72ab[_0x4c0324(0x1e4)]===0x0)throw CliErrors['validation'](_0x4c0324(0x22c)+_0x5f6946+'/'+_0x4ecf4f);return _0x2c72ab;}return _0x113ecd;}function existingHookWarning(_0x425415){const _0x2d48de=a44_0x5e6ad6;return{'code':'EXISTING_HOOK_BINDING_PRESERVED','lockKey':_0x425415,'message':_0x2d48de(0x202)};}async function buildHookMaps(_0x500505,_0x23b06b,_0x47b277,_0x5c4d90,_0x220557){const _0x5d42f4=a44_0x5e6ad6,_0x492976=_0x47b277[_0x5d42f4(0x1cf)](_0x43e78f=>_0x43e78f[_0x5d42f4(0x1df)]===_0x5d42f4(0x1d7));if(!_0x492976)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0x308751=resolveApiModelSource(_0x23b06b,_0x500505,_0x220557),_0x8205c7=loadAliasMap(_0x23b06b,undefined,_0x308751[_0x5d42f4(0x1d6)],_0x308751[_0x5d42f4(0x215)]);assertUnambiguousHookAliases(_0x8205c7);const _0x4e0740=[..._0x8205c7['map'](_0x5381d9=>[_0x5381d9[_0x5d42f4(0x20d)],_0x5381d9[_0x5d42f4(0x225)]]),...trackedHookDirectoryMappings(_0x5c4d90)[_0x5d42f4(0x22f)](_0x3bc108=>[_0x3bc108[_0x5d42f4(0x20d)],_0x3bc108[_0x5d42f4(0x225)]])],_0xd97c5f=await listDatasets(_0x500505);assertUnambiguousHookDirectoryMappings(_0x4e0740[_0x5d42f4(0x22f)](([_0x441e0b,_0x24ae12])=>({'alias':_0x441e0b,'datasetCode':_0x24ae12})));const _0x14c36c=buildHookDirectoryIndexes(_0xd97c5f,_0x4e0740),_0x57fc89=new Map(),_0x25d031=preflightPushHookDirectories(_0x47b277,_0x5c4d90,_0x14c36c,_0x57fc89),_0x31890c=new Set(),_0x51a682=_0x47b277[_0x5d42f4(0x21d)](_0x1fb42d=>_0x57fc89[_0x5d42f4(0x221)](_0x1fb42d[_0x5d42f4(0x20f)])?.[_0x5d42f4(0x219)](_0x5d42f4(0x1d3))&&_0x5c4d90[_0x5d42f4(0x1c4)][_0x1fb42d[_0x5d42f4(0x20f)]]?.[_0x5d42f4(0x1f6)]&&_0x5c4d90[_0x5d42f4(0x1c4)][_0x1fb42d[_0x5d42f4(0x20f)]]?.[_0x5d42f4(0x225)]);if(_0x51a682['length']>0x0){let _0x3244ad;try{_0x3244ad=await getBffScriptStatistics(_0x500505);}catch(_0xb3f802){for(const _0x492688 of _0x51a682)_0x57fc89['set'](_0x492688[_0x5d42f4(0x20f)],_0x5d42f4(0x20e)+(_0xb3f802 instanceof Error?_0xb3f802[_0x5d42f4(0x229)]:String(_0xb3f802)));return{'resolutions':_0x25d031,'failures':_0x57fc89,'existingHooks':_0x31890c};}for(const _0x3ac947 of _0x51a682){const _0xf276d5=_0x5c4d90[_0x5d42f4(0x1c4)][_0x3ac947[_0x5d42f4(0x20f)]];try{const _0xabb484=new Set(_0x47b277[_0x5d42f4(0x21d)](_0x4379b7=>_0x4379b7[_0x5d42f4(0x1df)]==='HOOK'&&_0x5c4d90[_0x5d42f4(0x1c4)][_0x4379b7[_0x5d42f4(0x20f)]]?.[_0x5d42f4(0x225)]===_0xf276d5[_0x5d42f4(0x225)])[_0x5d42f4(0x22f)](_0x3712cd=>_0x3712cd[_0x5d42f4(0x20d)]));if(_0xabb484[_0x5d42f4(0x1dd)]>0x1)throw CliErrors[_0x5d42f4(0x1cb)](_0x5d42f4(0x1eb));const _0x3ed9f4=_0x3244ad[_0x5d42f4(0x201)](_0x19ac0b=>[{'datasetCode':_0x19ac0b[_0x5d42f4(0x225)],'operationType':snakeToCamel(_0x19ac0b[_0x5d42f4(0x209)]),'functionNode':_0x5d42f4(0x207),'id':_0x19ac0b[_0x5d42f4(0x1ec)]},{'datasetCode':_0x19ac0b['datasetCode'],'operationType':snakeToCamel(_0x19ac0b['operationType']),'functionNode':_0x5d42f4(0x21e),'id':_0x19ac0b[_0x5d42f4(0x1fa)]}])[_0x5d42f4(0x21d)](_0x3930cb=>_0x3930cb['id']===_0xf276d5[_0x5d42f4(0x1f6)]),_0x54aa17=await getBffScriptInfo(_0xf276d5[_0x5d42f4(0x1f6)]);if(_0x54aa17['id']!==_0xf276d5[_0x5d42f4(0x1f6)]||_0x54aa17[_0x5d42f4(0x1f9)]!==_0x500505||_0x54aa17[_0x5d42f4(0x1ee)]!=='HOOK'||_0x54aa17[_0x5d42f4(0x1db)]!==_0x3ac947[_0x5d42f4(0x1fe)]||_0xf276d5[_0x5d42f4(0x1f3)]==null||_0x54aa17[_0x5d42f4(0x1f3)]!==_0xf276d5['version']||_0x3ed9f4[_0x5d42f4(0x1e4)]!==0x1||_0x3ed9f4[0x0][_0x5d42f4(0x225)]!==_0xf276d5[_0x5d42f4(0x225)]||_0x3ed9f4[0x0][_0x5d42f4(0x209)]!==_0x3ac947['operationType']||_0x3ed9f4[0x0][_0x5d42f4(0x1cd)]!==_0x3ac947['functionNode']||_0xf276d5['operationType']!==_0x3ac947[_0x5d42f4(0x209)]||_0xf276d5[_0x5d42f4(0x1cd)]!==_0x3ac947['functionNode'])throw CliErrors[_0x5d42f4(0x1cb)](_0x5d42f4(0x1f2));_0x31890c[_0x5d42f4(0x227)](_0x3ac947[_0x5d42f4(0x20f)]),_0x57fc89[_0x5d42f4(0x1f5)](_0x3ac947[_0x5d42f4(0x20f)]);}catch(_0x29a19e){_0x57fc89['set'](_0x3ac947[_0x5d42f4(0x20f)],_0x29a19e instanceof Error?_0x29a19e['message']:String(_0x29a19e));}}}return{'resolutions':_0x25d031,'failures':_0x57fc89,'existingHooks':_0x31890c};}function a44_0x2718(){const _0x4cd64b=['delete','remoteId','\x20skipped','currentApp','appCode','afterScriptId','4707498ilytym','976608qrymTh','ENDPOINT','name','Incomplete\x20HOOK\x20path:\x20','apps','flatMap','Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.','conflict','datasetId','1993690FPTYKa','every','before','description','operationType','status','hash','Push\x20complete:\x20','alias','Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20','lockKey','COMMON','BFF_REMOTE_VERSION_MISSING','bool','test','Lock\x20scope\x20for\x20app\x20\x22','profileName','scriptsRoot','/api/management/library/scripts/save','has','startsWith','would_push','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','values','filter','after','1036920LkjlUW','3301950ikdlKG','get','parse','\x20failed','Runtime\x20script\x20cache\x20cleared.','datasetCode','failures','add','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.','message','existingHooks','bff','Local\x20function\x20not\x20found:\x20','utf8','str','map','runtime\x20cache\x20not\x20needed','\x20resolution','Would\x20inspect\x20','force','7RglDHa','Push\x20only\x20this\x20script\x20type','functions','1182616NztuOh','boolean','mergedCli','POST','create','write','validation','lastSync','functionNode','require','some','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','16kPAbGz','string','HOOK_DATASET_NOT_FOUND:','warnings','lockFilePath','filePath','HOOK','push','45svbYrw','\x22\x20not\x20found\x20after\x20ensureLockScope.','functionName','defaultApp','size','cleared','type','selectedAppName','No\x20local\x20Backend\x20Function\x20scripts\x20found.','Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.','34908580mOZtTP','length','review_remote_and_merge','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','BFF_REMOTE_VERSION_CHANGED','update','dataset','resolutions','Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.','beforeScriptId','unchanged','scriptType','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','failed','runtime\x20cache\x20cleared','Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.','version','script'];a44_0x2718=function(){return _0x4cd64b;};return a44_0x2718();}async function uploadSingleFunction(_0x51a3af,_0x3166f3,_0x1d3bbd,_0x2c9aac){const _0x33896d=a44_0x5e6ad6,_0x564a0b=await readFile(_0x3166f3['filePath'],_0x33896d(0x22d)),_0x4e26bc=await computeFileHash(_0x3166f3['filePath']),_0x4d5a1a=_0x1d3bbd[_0x33896d(0x1c4)][_0x3166f3[_0x33896d(0x20f)]];if(_0x4d5a1a?.[_0x33896d(0x1f6)]&&_0x4d5a1a[_0x33896d(0x1f3)]==null)throw CliErrors['validation'](_0x3166f3[_0x33896d(0x20f)]+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x29d801=extractScriptDescription(_0x564a0b);if(!_0x29d801&&_0x4d5a1a?.[_0x33896d(0x1f6)]){const _0x3856ee=await getBffScriptInfo(_0x4d5a1a[_0x33896d(0x1f6)]);_0x29d801=_0x3856ee[_0x33896d(0x208)]||undefined;}const _0x18ccc0={'appCode':_0x51a3af,'functionName':_0x3166f3[_0x33896d(0x1fe)],'scriptType':_0x3166f3['type'],'scriptContent':_0x564a0b};if(_0x4d5a1a?.[_0x33896d(0x1f6)])_0x18ccc0['id']=_0x4d5a1a[_0x33896d(0x1f6)];if(_0x4d5a1a?.[_0x33896d(0x1f3)]!=null)_0x18ccc0[_0x33896d(0x1f3)]=_0x4d5a1a['version'];if(_0x29d801)_0x18ccc0[_0x33896d(0x208)]=_0x29d801;if(_0x3166f3[_0x33896d(0x1df)]==='HOOK'){const _0x5b531a=_0x2c9aac['resolutions'][_0x33896d(0x221)](_0x3166f3['lockKey']);if(!_0x5b531a&&!_0x2c9aac[_0x33896d(0x22a)]['has'](_0x3166f3['lockKey'])||!_0x3166f3[_0x33896d(0x209)]||!_0x3166f3['functionNode'])throw CliErrors[_0x33896d(0x1cb)](_0x33896d(0x1ff)+_0x3166f3[_0x33896d(0x20f)]);_0x5b531a&&(_0x18ccc0[_0x33896d(0x204)]=_0x5b531a[_0x33896d(0x1e9)]['id'],_0x18ccc0[_0x33896d(0x209)]=_0x3166f3[_0x33896d(0x209)]),_0x18ccc0['functionNode']=_0x3166f3['functionNode'];}const _0x575c88=await saveBffScript(_0x18ccc0),_0x3b1e1a=_0x575c88['id'],_0x2acf2f=_0x575c88[_0x33896d(0x1f4)]??await getBffScriptInfo(_0x3b1e1a),_0x591e92={'hash':_0x4e26bc,'remoteId':_0x3b1e1a,'version':_0x2acf2f['version']};if(_0x3166f3['type']===_0x33896d(0x1d7)){const _0x4b2d85=_0x2c9aac[_0x33896d(0x1ea)][_0x33896d(0x221)](_0x3166f3['lockKey']);if(!_0x4b2d85){_0x1d3bbd[_0x33896d(0x1c4)][_0x3166f3[_0x33896d(0x20f)]]={..._0x4d5a1a,..._0x591e92};return;}_0x591e92[_0x33896d(0x20d)]=_0x4b2d85['alias']??_0x4d5a1a?.[_0x33896d(0x20d)],_0x591e92[_0x33896d(0x225)]=_0x4b2d85[_0x33896d(0x225)],_0x591e92[_0x33896d(0x209)]=_0x3166f3[_0x33896d(0x209)],_0x591e92['functionNode']=_0x3166f3[_0x33896d(0x1cd)];}_0x1d3bbd[_0x33896d(0x1c4)][_0x3166f3[_0x33896d(0x20f)]]=_0x591e92;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;function a44_0x5d1e(_0x345575,_0x2a1861){_0x345575=_0x345575-0x1c4;const _0x27180a=a44_0x2718();let _0x5d1e1c=_0x27180a[_0x345575];return _0x5d1e1c;}async function waitForUploadedLockEntries(_0x12c23b,_0x44e38f,_0x23be84){const _0x204716=a44_0x5e6ad6;if(_0x23be84[_0x204716(0x1e4)]===0x0)return;for(let _0xe6404c=0x0;_0xe6404c<LOCK_SETTLE_RETRY_COUNT;_0xe6404c+=0x1){const _0x47b1f0=await readBffLockFile(_0x12c23b),_0x1b3023=_0x47b1f0?.[_0x204716(0x200)]?.[_0x44e38f]?.[_0x204716(0x1c4)]??{},_0x3c268e=_0x23be84[_0x204716(0x206)](_0x3e2e1c=>!!_0x1b3023[_0x3e2e1c]?.[_0x204716(0x1f6)]);if(_0x3c268e)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0x23be84['join'](',\x20')+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a45_0x16fd7e=a45_0x51b2;function a45_0x16ae(){const _0x385a38=['2086294EzsUAT','push','3194780LCrpFb','All\x20Backend\x20Function\x20scripts\x20are\x20in\x20sync.','9199416RacZmJ','status','has','read','filePath','hash','appCode','228DNvCIs','apiDir','1515458FCdcOX','lockFilePath','functions','lockKey','529500ZXGIUN','\x20remote-only','602911Xlqjot','selectedAppName','bff','datasetCode','remote','boolean','mergedCli','map','Check\x20local\x20Backend\x20Function\x20sync\x20status\x20against\x20lock\x20file','\x20added,\x20','currentApp','25505HCFsmH','defaultApp','alias','length'];a45_0x16ae=function(){return _0x385a38;};return a45_0x16ae();}(function(_0x4eacd6,_0xdcc7e5){const _0x20a5bc=a45_0x51b2,_0x1d089e=_0x4eacd6();while(!![]){try{const _0x1c25a7=-parseInt(_0x20a5bc(0x1b7))/0x1+parseInt(_0x20a5bc(0x1c6))/0x2+parseInt(_0x20a5bc(0x1b5))/0x3+-parseInt(_0x20a5bc(0x1c8))/0x4+parseInt(_0x20a5bc(0x1c2))/0x5*(-parseInt(_0x20a5bc(0x1d1))/0x6)+-parseInt(_0x20a5bc(0x1b1))/0x7+parseInt(_0x20a5bc(0x1ca))/0x8;if(_0x1c25a7===_0xdcc7e5)break;else _0x1d089e['push'](_0x1d089e['shift']());}catch(_0x1df4bb){_0x1d089e['push'](_0x1d089e['shift']());}}}(a45_0x16ae,0x88244));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_0x51b2(_0x2c381d,_0x5df64c){_0x2c381d=_0x2c381d-0x1b1;const _0x16aefb=a45_0x16ae();let _0x51b29e=_0x16aefb[_0x2c381d];return _0x51b29e;}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';export const bffStatus={'service':a45_0x16fd7e(0x1b9),'command':'status','description':a45_0x16fd7e(0x1bf),'risk':a45_0x16fd7e(0x1cd),'flags':[{'name':a45_0x16fd7e(0x1bb),'type':a45_0x16fd7e(0x1bc),'description':'Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally'}],async 'execute'(_0x219bba){const _0x351855=a45_0x16fd7e,_0x4518cd=loadBffProjectConfig(_0x219bba[_0x351855(0x1d0)]),_0x10c839=await readBffLockFile(_0x4518cd[_0x351855(0x1b2)]),{appLock:_0x3d06bd}=ensureLockScope(_0x10c839??createEmptyBffLock(),_0x219bba[_0x351855(0x1d0)],_0x4518cd['scriptsRoot'],_0x351855(0x1cb)),_0x22481d=await scanLocalBffFunctions(_0x4518cd),_0x5f1a2d=[],_0x443e5d=[],_0x4a3dc3=[];for(const _0x5cd639 of _0x22481d){const _0x2ba140=await computeFileHash(_0x5cd639[_0x351855(0x1ce)]),_0x53a5ba=_0x3d06bd[_0x351855(0x1b3)][_0x5cd639[_0x351855(0x1b4)]];if(!_0x53a5ba)_0x5f1a2d[_0x351855(0x1c7)](_0x5cd639[_0x351855(0x1b4)]);else _0x53a5ba[_0x351855(0x1cf)]!==_0x2ba140?_0x443e5d[_0x351855(0x1c7)](_0x5cd639[_0x351855(0x1b4)]):_0x4a3dc3[_0x351855(0x1c7)](_0x5cd639[_0x351855(0x1b4)]);}const _0x1fdedd=[];if(_0x219bba['bool']('remote')){const _0x239045=resolveApiModelSource(_0x219bba[_0x351855(0x1d2)],_0x219bba[_0x351855(0x1d0)],_0x219bba[_0x351855(0x1b8)]||_0x219bba['mergedCli']?.[_0x351855(0x1c1)]||_0x219bba[_0x351855(0x1bd)]?.[_0x351855(0x1c3)]),_0x2f23f9=loadAliasMap(_0x219bba[_0x351855(0x1d2)],undefined,_0x239045[_0x351855(0x1ce)],_0x239045['profileName']),_0x2a9dcf=new Map(_0x2f23f9[_0x351855(0x1be)](_0x15344a=>[_0x15344a[_0x351855(0x1ba)],_0x15344a[_0x351855(0x1c4)]])),[_0x4c791c,_0x46b5f1]=await Promise['all']([listBffScripts(_0x219bba['appCode']),getBffScriptStatistics(_0x219bba['appCode'])]),_0x5205f1=createHookLocationMap(_0x46b5f1),_0x1223d4=new Set(_0x22481d[_0x351855(0x1be)](_0x20830f=>_0x20830f[_0x351855(0x1b4)]));for(const _0x573059 of _0x4c791c){const _0x48fe2a=resolveRemoteScriptTarget(_0x4518cd,_0x573059,_0x5205f1,_0x3d06bd[_0x351855(0x1b3)],_0x2a9dcf);_0x48fe2a&&!_0x1223d4[_0x351855(0x1cc)](_0x48fe2a[_0x351855(0x1b4)])&&_0x1fdedd['push'](_0x48fe2a['lockKey']);}}const _0x28f648=_0x5f1a2d[_0x351855(0x1c5)]===0x0&&_0x443e5d[_0x351855(0x1c5)]===0x0&&_0x1fdedd['length']===0x0;return{'ok':!![],'data':{'added':_0x5f1a2d,'modified':_0x443e5d,'unchanged':_0x4a3dc3,'remoteOnly':_0x1fdedd},'message':_0x28f648?_0x351855(0x1c9):_0x5f1a2d[_0x351855(0x1c5)]+_0x351855(0x1c0)+_0x443e5d['length']+'\x20modified,\x20'+_0x4a3dc3[_0x351855(0x1c5)]+'\x20unchanged'+(_0x1fdedd[_0x351855(0x1c5)]>0x0?',\x20'+_0x1fdedd[_0x351855(0x1c5)]+_0x351855(0x1b6):'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a46_0x1dce2e=a46_0x5b71;function a46_0x5b71(_0x4c2e33,_0x27306f){_0x4c2e33=_0x4c2e33-0x102;const _0x1214b5=a46_0x1214();let _0x5b714d=_0x1214b5[_0x4c2e33];return _0x5b714d;}(function(_0x31381b,_0x4d3238){const _0x19be10=a46_0x5b71,_0x593a68=_0x31381b();while(!![]){try{const _0x274fee=-parseInt(_0x19be10(0x10f))/0x1*(-parseInt(_0x19be10(0x11c))/0x2)+-parseInt(_0x19be10(0x103))/0x3+-parseInt(_0x19be10(0x117))/0x4*(parseInt(_0x19be10(0x118))/0x5)+parseInt(_0x19be10(0x10c))/0x6*(parseInt(_0x19be10(0x111))/0x7)+parseInt(_0x19be10(0x11e))/0x8*(parseInt(_0x19be10(0x104))/0x9)+parseInt(_0x19be10(0x11a))/0xa+parseInt(_0x19be10(0x11d))/0xb;if(_0x274fee===_0x4d3238)break;else _0x593a68['push'](_0x593a68['shift']());}catch(_0x3c7123){_0x593a68['push'](_0x593a68['shift']());}}}(a46_0x1214,0xa4cee));function a46_0x1214(){const _0x2ce657=['read','620644aSeAnm','1340724EbyHcF','16tSkGvv','cli-skill-install','log','Built-in\x20Skill\x20install\x20failed\x20[','unknown','error','install','2938554xYNfbw','1429416GClJcP','cli-skill','apiError','code','inherit','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.','changed','repairCommand','6vAbUSS','pipe','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','2EDnVui','CLI\x20Built-in\x20Skill\x20','5843278UVQeMp','skillVersion','\x20at\x20','installedPath','\x20installed',']:\x20','4QfjUKo','1814770wMRUke','nonInteractive','1225960DFbwJP'];a46_0x1214=function(){return _0x2ce657;};return a46_0x1214();}import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a46_0x1dce2e(0x105),'command':a46_0x1dce2e(0x102),'description':a46_0x1dce2e(0x10e),'risk':a46_0x1dce2e(0x11b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x3866f6){const _0x19ef1d=a46_0x1dce2e;logger['setLogPath'](process['cwd']()),logger['info'](_0x19ef1d(0x11f),_0x19ef1d(0x109));const _0x12d54e=installBuiltinSkill({'stdio':_0x3866f6[_0x19ef1d(0x119)]?_0x19ef1d(0x10d):_0x19ef1d(0x108)});if(!_0x12d54e['ok'])throw CliErrors[_0x19ef1d(0x106)](_0x19ef1d(0x121)+_0x12d54e[_0x19ef1d(0x107)]+_0x19ef1d(0x116)+(_0x12d54e[_0x19ef1d(0x123)]||_0x19ef1d(0x122)),'Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20'+_0x12d54e[_0x19ef1d(0x10b)]);return console[_0x19ef1d(0x120)](_0x12d54e[_0x19ef1d(0x10a)]?_0x19ef1d(0x110)+_0x12d54e[_0x19ef1d(0x112)]+_0x19ef1d(0x115)+(_0x12d54e[_0x19ef1d(0x114)]?_0x19ef1d(0x113)+_0x12d54e['installedPath']:'\x20via\x20skills@latest'):_0x19ef1d(0x110)+_0x12d54e[_0x19ef1d(0x112)]+'\x20is\x20already\x20current'+(_0x12d54e[_0x19ef1d(0x114)]?_0x19ef1d(0x113)+_0x12d54e[_0x19ef1d(0x114)]:'')),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a46_0x532fea=a46_0x1887;(function(_0x588f3e,_0xc529d){const _0x2d05d2=a46_0x1887,_0x4678e4=_0x588f3e();while(!![]){try{const _0x239180=-parseInt(_0x2d05d2(0x102))/0x1+parseInt(_0x2d05d2(0xef))/0x2*(-parseInt(_0x2d05d2(0xea))/0x3)+parseInt(_0x2d05d2(0x10a))/0x4*(-parseInt(_0x2d05d2(0x106))/0x5)+-parseInt(_0x2d05d2(0x12b))/0x6*(parseInt(_0x2d05d2(0x12d))/0x7)+parseInt(_0x2d05d2(0xe9))/0x8+-parseInt(_0x2d05d2(0x117))/0x9*(-parseInt(_0x2d05d2(0xed))/0xa)+parseInt(_0x2d05d2(0x124))/0xb;if(_0x239180===_0xc529d)break;else _0x4678e4['push'](_0x4678e4['shift']());}catch(_0x23f4f1){_0x4678e4['push'](_0x4678e4['shift']());}}}(a46_0x3891,0x99995));import a46_0x29a64a from'chalk';import a46_0x49fe43 from'ora';import a46_0x1493d8 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 a46_0x1887(_0xffa483,_0x6024f9){_0xffa483=_0xffa483-0xe5;const _0x389113=a46_0x3891();let _0x18871c=_0x389113[_0xffa483];return _0x18871c;}function getCurrentVersion(){const _0x4ba7ef=a46_0x1887;return GIT_COMMIT!==_0x4ba7ef(0x131)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x4ba7ef(0xf2)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0xcd085a=a46_0x1887,_0x517927=process[_0xcd085a(0x103)][_0xcd085a(0xe5)]();if(_0x517927['includes'](_0xcd085a(0x120)))return _0xcd085a(0x120);return _0xcd085a(0x123);}const updateFlags=[{'name':'beta','type':a46_0x532fea(0x12e),'description':a46_0x532fea(0x11d),'default':![]},{'name':'version','type':a46_0x532fea(0xf7),'description':a46_0x532fea(0x113)}];function a46_0x3891(){const _0x38ed26=['succeed','bool','latest','str','fail','filter','read','Install\x20a\x20specific\x20CLI\x20version','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','code','run','2667618ONxHgg','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','Already\x20on\x20requested\x20version\x20(v','\x20→\x20','Beta\x20version:\x20',',\x20state\x20','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','Current\x20version\x20v','Updated\x20to\x20v','bun','Version\x20comparison\x20failed','skillVersion','npm','27753781hNKEQh','\x20\x20CLI\x20Built-in\x20Skill\x20','pipe','Checking\x20for\x20updates...','validation','Updating\x20via\x20','...','6sGpvKL','state','4210066XFRVKx','boolean','error','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','unknown','Update\x20failed','map','message','source','\x20doctor','fromEntries','toLowerCase','green','gray','Run:\x20','3071752kHikGF','21SoIhIl',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','20LmwjcH','version','157198pZOjiT','install','@latest','slice',',\x20then\x20verify\x20with:\x20','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','beta','log','string','Invalid\x20version:\x20','repairCommand','\x20is\x20up\x20to\x20date.','expected\x20','apiError','update','yellow','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','entries','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','700452jDXDdW','execPath','valid','length','60mfGTIG','object','red','\x20\x20Try\x20manually:\x20','339540gQbVrz','start'];a46_0x3891=function(){return _0x38ed26;};return a46_0x3891();}function getRequestedVersion(_0x5be0fe){const _0x3bcd63=a46_0x532fea;return _0x5be0fe[_0x3bcd63(0x10f)](_0x3bcd63(0xee))['trim']();}async function validateUpdateFlags(_0x251ce4){const _0xf9217f=a46_0x532fea,_0x45eb76=_0x251ce4['bool'](_0xf9217f(0xf5)),_0x4f685e=getRequestedVersion(_0x251ce4);if(_0x45eb76&&_0x4f685e)throw CliErrors[_0xf9217f(0x128)](_0xf9217f(0x118),_0xf9217f(0x101));if(_0x4f685e&&!a46_0x1493d8['valid'](_0x4f685e))throw CliErrors[_0xf9217f(0x128)](_0xf9217f(0xf8)+_0x4f685e,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x3951e5=a46_0x532fea;try{const _0x4bfcbe=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal['timeout'](0x2710)});if(!_0x4bfcbe['ok'])return null;const _0x3fc81c=await _0x4bfcbe['json']();if(!_0x3fc81c||typeof _0x3fc81c!==_0x3951e5(0x107))return null;return Object[_0x3951e5(0x137)](Object[_0x3951e5(0x100)](_0x3fc81c)[_0x3951e5(0x111)](([,_0x2dbc26])=>typeof _0x2dbc26==='string'&&_0x2dbc26['trim']()[_0x3951e5(0x105)]>0x0)[_0x3951e5(0x133)](([_0x1315fc,_0x1eb2b8])=>[_0x1315fc,String(_0x1eb2b8)['trim']()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x432b2e){const _0x2a68e6=await fetchNpmDistTags();return _0x2a68e6?.[_0x432b2e]??null;}async function fetchLatestVersion(){const _0x4fceba=a46_0x532fea;return fetchNpmDistTagVersion(_0x4fceba(0x10e));}async function resolveTargetVersion(_0x247c6d){const _0x254547=a46_0x532fea,_0x30f1d0=getRequestedVersion(_0x247c6d);if(_0x30f1d0)return{'version':_0x30f1d0,'source':_0x254547(0xee)};if(_0x247c6d[_0x254547(0x10d)]('beta')){const _0x45249=await fetchNpmDistTagVersion(_0x254547(0xf5));if(!_0x45249)return null;return{'version':_0x45249,'source':_0x254547(0xf5)};}const _0x37d0c9=await fetchLatestVersion();if(!_0x37d0c9)return null;return{'version':_0x37d0c9,'source':_0x254547(0x10e)};}function shouldInstallTarget(_0x13c26c,_0xe6f1cb){const _0x53cc62=a46_0x532fea;if(_0xe6f1cb[_0x53cc62(0x135)]===_0x53cc62(0xee)||_0xe6f1cb[_0x53cc62(0x135)]===_0x53cc62(0xf5))return!a46_0x1493d8['eq'](_0x13c26c,_0xe6f1cb[_0x53cc62(0xee)]);return a46_0x1493d8['lt'](_0x13c26c,_0xe6f1cb[_0x53cc62(0xee)]);}function getInstallPlanLabel(_0x1ee935,_0x3bacd2){const _0x14a5ea=a46_0x532fea;switch(_0x3bacd2[_0x14a5ea(0x135)]){case _0x14a5ea(0xf5):return _0x14a5ea(0x11b)+a46_0x29a64a[_0x14a5ea(0xfe)](_0x1ee935)+'\x20→\x20'+a46_0x29a64a[_0x14a5ea(0xe6)](_0x3bacd2[_0x14a5ea(0xee)]);case _0x14a5ea(0xee):return'Requested\x20version:\x20'+a46_0x29a64a[_0x14a5ea(0xfe)](_0x1ee935)+_0x14a5ea(0x11a)+a46_0x29a64a[_0x14a5ea(0xe6)](_0x3bacd2[_0x14a5ea(0xee)]);case _0x14a5ea(0x10e):default:return'Update\x20available:\x20'+a46_0x29a64a[_0x14a5ea(0xfe)](_0x1ee935)+_0x14a5ea(0x11a)+a46_0x29a64a[_0x14a5ea(0xe6)](_0x3bacd2['version']);}}function repairCurrentBuiltinSkill(){const _0x2b6885=a46_0x532fea;console['log'](a46_0x29a64a[_0x2b6885(0xe7)]('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x9dd1b3=installBuiltinSkill();if(_0x9dd1b3['ok']){console[_0x2b6885(0xf6)](a46_0x29a64a['gray'](_0x2b6885(0x125)+_0x9dd1b3[_0x2b6885(0x122)]+'\x20is\x20up\x20to\x20date.'));return;}throw CliErrors[_0x2b6885(0xfc)](_0x2b6885(0xf4)+_0x9dd1b3[_0x2b6885(0x115)]+']:\x20'+(_0x9dd1b3[_0x2b6885(0x12f)]||_0x2b6885(0x131)),_0x2b6885(0xe8)+_0x9dd1b3[_0x2b6885(0xf9)]+_0x2b6885(0xf3)+CLI_BIN_NAME+'\x20doctor');}function verifyUpdatedBuiltinSkill(_0x2d32ab){const _0xcbd8e7=a46_0x532fea,_0x3a5890=inspectInstalledBuiltinSkillVersion(_0x2d32ab);if(_0x3a5890[_0xcbd8e7(0x12c)]==='current'){console['log'](a46_0x29a64a[_0xcbd8e7(0xe7)](_0xcbd8e7(0x125)+_0x2d32ab+_0xcbd8e7(0xfa)));return;}const _0x1d54b0=_0x3a5890[_0xcbd8e7(0x122)]?'expected\x20'+_0x2d32ab+',\x20found\x20'+_0x3a5890['skillVersion']:_0xcbd8e7(0xfb)+_0x2d32ab+_0xcbd8e7(0x11c)+_0x3a5890['state'];throw CliErrors[_0xcbd8e7(0xfc)]('CLI\x20updated\x20to\x20v'+_0x2d32ab+_0xcbd8e7(0xeb)+_0x1d54b0,_0xcbd8e7(0xe8)+_0x3a5890[_0xcbd8e7(0xf9)]+_0xcbd8e7(0xf3)+CLI_BIN_NAME+_0xcbd8e7(0x136));}async function execute(_0x4602cd){const _0x12da9e=a46_0x532fea;await validateUpdateFlags(_0x4602cd);const _0x539d70=getCurrentVersion();console[_0x12da9e(0xf6)]('Current\x20version:\x20'+_0x539d70);const _0x46f1a2=a46_0x49fe43(_0x12da9e(0x127))[_0x12da9e(0x10b)](),_0x4db213=await resolveTargetVersion(_0x4602cd);if(!_0x4db213){const _0x411ed6=_0x4602cd[_0x12da9e(0x10d)]('beta')?_0x12da9e(0xff):'Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)';return _0x46f1a2['fail'](_0x411ed6),console[_0x12da9e(0xf6)](a46_0x29a64a[_0x12da9e(0xe7)](_0x12da9e(0x130)+NPM_PACKAGE_NAME+_0x12da9e(0xf1))),{'ok':![],'message':_0x411ed6};}const _0x114112=a46_0x1493d8[_0x12da9e(0x104)](VERSION),_0x48262b=a46_0x1493d8[_0x12da9e(0x104)](_0x4db213[_0x12da9e(0xee)]);if(!_0x114112||!_0x48262b)return _0x46f1a2[_0x12da9e(0x110)](_0x12da9e(0x121)),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x114112,_0x4db213)){const _0x3e74a7=_0x4db213[_0x12da9e(0x135)]==='version'?_0x12da9e(0x119)+_0x4db213['version']+')':a46_0x1493d8['gt'](_0x114112,_0x48262b)?_0x12da9e(0x11e)+_0x539d70+'\x20is\x20newer\x20than\x20npm\x20latest\x20v'+_0x4db213[_0x12da9e(0xee)]:'Already\x20up\x20to\x20date\x20(v'+_0x4db213[_0x12da9e(0xee)]+')';return _0x46f1a2[_0x12da9e(0x10c)](_0x3e74a7),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x46f1a2['info'](getInstallPlanLabel(_0x539d70,_0x4db213));const _0x348d48=detectPackageManager(),_0x58c5ec=_0x348d48==='npm'?resolveNpmBin(_0x12da9e(0x123)):_0x348d48,_0x3ace5e=a46_0x49fe43(_0x12da9e(0x129)+_0x348d48+_0x12da9e(0x12a))['start']();try{await execa(_0x58c5ec,[_0x12da9e(0xf0),'-g',NPM_PACKAGE_NAME+'@'+_0x4db213[_0x12da9e(0xee)]],{'stdio':_0x12da9e(0x126)}),_0x3ace5e['succeed'](_0x12da9e(0x11f)+_0x4db213[_0x12da9e(0xee)]),console[_0x12da9e(0xf6)](a46_0x29a64a[_0x12da9e(0xe7)](_0x12da9e(0x114)));}catch(_0x3e068d){return _0x3ace5e[_0x12da9e(0x110)](_0x12da9e(0x132)),console[_0x12da9e(0x12f)](a46_0x29a64a[_0x12da9e(0x108)]('\x20\x20'+_0x3e068d[_0x12da9e(0x134)])),console[_0x12da9e(0xf6)](a46_0x29a64a[_0x12da9e(0xe7)](_0x12da9e(0x109)+_0x348d48+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x4db213['version'])),{'ok':![],'message':_0x3e068d[_0x12da9e(0x134)]};}return verifyUpdatedBuiltinSkill(_0x4db213[_0x12da9e(0xee)]),{'ok':!![]};}export const updateDefinition={'service':a46_0x532fea(0xfd),'command':a46_0x532fea(0x116),'description':a46_0x532fea(0xec),'risk':a46_0x532fea(0x112),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a47_0x3a3251=a47_0x38f1;function a47_0x43d9(){const _0x15da06=['timeout','394064cVRcbG','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','start','...','45hujvrv','npm',',\x20state\x20','state','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','Current\x20version:\x20','fail','succeed','valid','2578302tgQubo','beta','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','filter','str','Update\x20failed','pipe','error','info','yellow','\x20\x20Try\x20manually:\x20','Checking\x20for\x20updates...','red',',\x20found\x20','execPath','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','entries','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','163254BTiOnD','Install\x20a\x20specific\x20CLI\x20version','bun','run','8RRUepO','\x20\x20CLI\x20Built-in\x20Skill\x20','CLI\x20updated\x20to\x20v','install','latest','\x20doctor','apiError','expected\x20','json','Requested\x20version:\x20',']:\x20','gray','Update\x20available:\x20','unknown','\x20→\x20','validation','skillVersion','current','repairCommand','slice','258DzeKoS','trim','fromEntries','2079119VhlWtm','map','length',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','code','boolean','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','Updating\x20via\x20','source','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','Version\x20comparison\x20failed','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','19119kmIwUk','Already\x20on\x20requested\x20version\x20(v','12740240ePjJsV',',\x20then\x20verify\x20with:\x20','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','Run:\x20','version','log','@latest','bool','33gKinpR','toLowerCase','green'];a47_0x43d9=function(){return _0x15da06;};return a47_0x43d9();}(function(_0x94088b,_0x3c02eb){const _0x460d3f=a47_0x38f1,_0x224ff8=_0x94088b();while(!![]){try{const _0x588cc7=parseInt(_0x460d3f(0x181))/0x1*(-parseInt(_0x460d3f(0x168))/0x2)+-parseInt(_0x460d3f(0x177))/0x3*(-parseInt(_0x460d3f(0x154))/0x4)+parseInt(_0x460d3f(0x189))/0x5*(-parseInt(_0x460d3f(0x150))/0x6)+-parseInt(_0x460d3f(0x16b))/0x7+parseInt(_0x460d3f(0x185))/0x8+-parseInt(_0x460d3f(0x192))/0x9+parseInt(_0x460d3f(0x179))/0xa;if(_0x588cc7===_0x3c02eb)break;else _0x224ff8['push'](_0x224ff8['shift']());}catch(_0x39ac9a){_0x224ff8['push'](_0x224ff8['shift']());}}}(a47_0x43d9,0x7ae63));import a47_0x2acea7 from'chalk';import a47_0x40890d from'ora';import a47_0x4bee9d 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 _0x4a651b=a47_0x38f1;return GIT_COMMIT!==_0x4a651b(0x161)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x4a651b(0x167)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0xc338b4=a47_0x38f1,_0x12b9f6=process[_0xc338b4(0x14c)][_0xc338b4(0x182)]();if(_0x12b9f6['includes']('bun'))return _0xc338b4(0x152);return _0xc338b4(0x18a);}const updateFlags=[{'name':a47_0x3a3251(0x193),'type':a47_0x3a3251(0x170),'description':a47_0x3a3251(0x171),'default':![]},{'name':a47_0x3a3251(0x17d),'type':'string','description':a47_0x3a3251(0x151)}];function getRequestedVersion(_0x28eb3a){const _0x27659f=a47_0x3a3251;return _0x28eb3a[_0x27659f(0x196)](_0x27659f(0x17d))[_0x27659f(0x169)]();}async function validateUpdateFlags(_0x2176b9){const _0x1af38c=a47_0x3a3251,_0x58337d=_0x2176b9[_0x1af38c(0x180)](_0x1af38c(0x193)),_0x184bfd=getRequestedVersion(_0x2176b9);if(_0x58337d&&_0x184bfd)throw CliErrors['validation'](_0x1af38c(0x14d),_0x1af38c(0x14f));if(_0x184bfd&&!a47_0x4bee9d[_0x1af38c(0x191)](_0x184bfd))throw CliErrors[_0x1af38c(0x163)]('Invalid\x20version:\x20'+_0x184bfd,_0x1af38c(0x174));}async function fetchNpmDistTags(){const _0x85a232=a47_0x3a3251;try{const _0x4fcbe2=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0x85a232(0x184)](0x2710)});if(!_0x4fcbe2['ok'])return null;const _0x138a34=await _0x4fcbe2[_0x85a232(0x15c)]();if(!_0x138a34||typeof _0x138a34!=='object')return null;return Object[_0x85a232(0x16a)](Object[_0x85a232(0x14e)](_0x138a34)[_0x85a232(0x195)](([,_0x174b3b])=>typeof _0x174b3b==='string'&&_0x174b3b[_0x85a232(0x169)]()[_0x85a232(0x16d)]>0x0)[_0x85a232(0x16c)](([_0x436e5b,_0x3c78e0])=>[_0x436e5b,String(_0x3c78e0)[_0x85a232(0x169)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0xee2abf){const _0x4cd433=await fetchNpmDistTags();return _0x4cd433?.[_0xee2abf]??null;}async function fetchLatestVersion(){const _0x81ac87=a47_0x3a3251;return fetchNpmDistTagVersion(_0x81ac87(0x158));}async function resolveTargetVersion(_0x39b093){const _0x5f25ba=a47_0x3a3251,_0x34acb7=getRequestedVersion(_0x39b093);if(_0x34acb7)return{'version':_0x34acb7,'source':_0x5f25ba(0x17d)};if(_0x39b093[_0x5f25ba(0x180)](_0x5f25ba(0x193))){const _0x71cb2c=await fetchNpmDistTagVersion(_0x5f25ba(0x193));if(!_0x71cb2c)return null;return{'version':_0x71cb2c,'source':_0x5f25ba(0x193)};}const _0x1ba810=await fetchLatestVersion();if(!_0x1ba810)return null;return{'version':_0x1ba810,'source':'latest'};}function shouldInstallTarget(_0x13d023,_0x5abcf1){const _0x41e1f0=a47_0x3a3251;if(_0x5abcf1[_0x41e1f0(0x173)]==='version'||_0x5abcf1[_0x41e1f0(0x173)]===_0x41e1f0(0x193))return!a47_0x4bee9d['eq'](_0x13d023,_0x5abcf1[_0x41e1f0(0x17d)]);return a47_0x4bee9d['lt'](_0x13d023,_0x5abcf1[_0x41e1f0(0x17d)]);}function a47_0x38f1(_0x37e3a2,_0x4f4279){_0x37e3a2=_0x37e3a2-0x148;const _0x43d93b=a47_0x43d9();let _0x38f1f6=_0x43d93b[_0x37e3a2];return _0x38f1f6;}function getInstallPlanLabel(_0x935b71,_0x242386){const _0x527f8d=a47_0x3a3251;switch(_0x242386[_0x527f8d(0x173)]){case _0x527f8d(0x193):return'Beta\x20version:\x20'+a47_0x2acea7[_0x527f8d(0x19b)](_0x935b71)+_0x527f8d(0x162)+a47_0x2acea7[_0x527f8d(0x183)](_0x242386['version']);case _0x527f8d(0x17d):return _0x527f8d(0x15d)+a47_0x2acea7['yellow'](_0x935b71)+_0x527f8d(0x162)+a47_0x2acea7[_0x527f8d(0x183)](_0x242386['version']);case _0x527f8d(0x158):default:return _0x527f8d(0x160)+a47_0x2acea7[_0x527f8d(0x19b)](_0x935b71)+_0x527f8d(0x162)+a47_0x2acea7[_0x527f8d(0x183)](_0x242386[_0x527f8d(0x17d)]);}}function repairCurrentBuiltinSkill(){const _0x22b7e6=a47_0x3a3251;console[_0x22b7e6(0x17e)](a47_0x2acea7[_0x22b7e6(0x15f)]('Checking\x20CLI\x20Built-in\x20Skill...'));const _0xc17d82=installBuiltinSkill();if(_0xc17d82['ok']){console[_0x22b7e6(0x17e)](a47_0x2acea7[_0x22b7e6(0x15f)]('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0xc17d82['skillVersion']+'\x20is\x20up\x20to\x20date.'));return;}throw CliErrors[_0x22b7e6(0x15a)](_0x22b7e6(0x176)+_0xc17d82[_0x22b7e6(0x16f)]+_0x22b7e6(0x15e)+(_0xc17d82[_0x22b7e6(0x199)]||'unknown'),'Run:\x20'+_0xc17d82[_0x22b7e6(0x166)]+_0x22b7e6(0x17a)+CLI_BIN_NAME+_0x22b7e6(0x159));}function verifyUpdatedBuiltinSkill(_0x4b49b4){const _0x1e5054=a47_0x3a3251,_0xa33f85=inspectInstalledBuiltinSkillVersion(_0x4b49b4);if(_0xa33f85[_0x1e5054(0x18c)]===_0x1e5054(0x165)){console[_0x1e5054(0x17e)](a47_0x2acea7['gray'](_0x1e5054(0x155)+_0x4b49b4+'\x20is\x20up\x20to\x20date.'));return;}const _0x391276=_0xa33f85['skillVersion']?'expected\x20'+_0x4b49b4+_0x1e5054(0x14b)+_0xa33f85[_0x1e5054(0x164)]:_0x1e5054(0x15b)+_0x4b49b4+_0x1e5054(0x18b)+_0xa33f85[_0x1e5054(0x18c)];throw CliErrors[_0x1e5054(0x15a)](_0x1e5054(0x156)+_0x4b49b4+_0x1e5054(0x16e)+_0x391276,_0x1e5054(0x17c)+_0xa33f85[_0x1e5054(0x166)]+_0x1e5054(0x17a)+CLI_BIN_NAME+_0x1e5054(0x159));}async function execute(_0x56fa64){const _0x408d55=a47_0x3a3251;await validateUpdateFlags(_0x56fa64);const _0x5397f1=getCurrentVersion();console[_0x408d55(0x17e)](_0x408d55(0x18e)+_0x5397f1);const _0x25a2ac=a47_0x40890d(_0x408d55(0x149))['start'](),_0x50c6ab=await resolveTargetVersion(_0x56fa64);if(!_0x50c6ab){const _0xad1dda=_0x56fa64[_0x408d55(0x180)]('beta')?_0x408d55(0x194):_0x408d55(0x17b);return _0x25a2ac[_0x408d55(0x18f)](_0xad1dda),console['log'](a47_0x2acea7['gray'](_0x408d55(0x186)+NPM_PACKAGE_NAME+_0x408d55(0x17f))),{'ok':![],'message':_0xad1dda};}const _0x5ac0ac=a47_0x4bee9d[_0x408d55(0x191)](VERSION),_0x54a0eb=a47_0x4bee9d[_0x408d55(0x191)](_0x50c6ab['version']);if(!_0x5ac0ac||!_0x54a0eb)return _0x25a2ac[_0x408d55(0x18f)]('Version\x20comparison\x20failed'),{'ok':![],'message':_0x408d55(0x175)};if(!shouldInstallTarget(_0x5ac0ac,_0x50c6ab)){const _0x15efd7=_0x50c6ab[_0x408d55(0x173)]===_0x408d55(0x17d)?_0x408d55(0x178)+_0x50c6ab['version']+')':a47_0x4bee9d['gt'](_0x5ac0ac,_0x54a0eb)?'Current\x20version\x20v'+_0x5397f1+'\x20is\x20newer\x20than\x20npm\x20latest\x20v'+_0x50c6ab[_0x408d55(0x17d)]:'Already\x20up\x20to\x20date\x20(v'+_0x50c6ab[_0x408d55(0x17d)]+')';return _0x25a2ac[_0x408d55(0x190)](_0x15efd7),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x25a2ac[_0x408d55(0x19a)](getInstallPlanLabel(_0x5397f1,_0x50c6ab));const _0x4cc215=detectPackageManager(),_0x4c251c=_0x4cc215===_0x408d55(0x18a)?resolveNpmBin(_0x408d55(0x18a)):_0x4cc215,_0xcfaf16=a47_0x40890d(_0x408d55(0x172)+_0x4cc215+_0x408d55(0x188))[_0x408d55(0x187)]();try{await execa(_0x4c251c,[_0x408d55(0x157),'-g',NPM_PACKAGE_NAME+'@'+_0x50c6ab[_0x408d55(0x17d)]],{'stdio':_0x408d55(0x198)}),_0xcfaf16[_0x408d55(0x190)]('Updated\x20to\x20v'+_0x50c6ab[_0x408d55(0x17d)]),console[_0x408d55(0x17e)](a47_0x2acea7['gray']('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.'));}catch(_0x141856){return _0xcfaf16[_0x408d55(0x18f)](_0x408d55(0x197)),console[_0x408d55(0x199)](a47_0x2acea7[_0x408d55(0x14a)]('\x20\x20'+_0x141856['message'])),console[_0x408d55(0x17e)](a47_0x2acea7['gray'](_0x408d55(0x148)+_0x4cc215+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x50c6ab['version'])),{'ok':![],'message':_0x141856['message']};}return verifyUpdatedBuiltinSkill(_0x50c6ab['version']),{'ok':!![]};}export const updateDefinition={'service':'update','command':a47_0x3a3251(0x153),'description':a47_0x3a3251(0x18d),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a48_0x2604(_0xcacb46,_0x58648e){_0xcacb46=_0xcacb46-0x152;const _0x20e67b=a48_0x20e6();let _0x2604b8=_0x20e67b[_0xcacb46];return _0x2604b8;}(function(_0x17a61f,_0x14d7bc){const _0x31288c=a48_0x2604,_0x249a05=_0x17a61f();while(!![]){try{const _0x500b1c=-parseInt(_0x31288c(0x156))/0x1+parseInt(_0x31288c(0x153))/0x2*(-parseInt(_0x31288c(0x15b))/0x3)+-parseInt(_0x31288c(0x158))/0x4*(parseInt(_0x31288c(0x15c))/0x5)+-parseInt(_0x31288c(0x15a))/0x6+parseInt(_0x31288c(0x155))/0x7*(parseInt(_0x31288c(0x157))/0x8)+-parseInt(_0x31288c(0x152))/0x9+parseInt(_0x31288c(0x154))/0xa*(parseInt(_0x31288c(0x159))/0xb);if(_0x500b1c===_0x14d7bc)break;else _0x249a05['push'](_0x249a05['shift']());}catch(_0x1b71ee){_0x249a05['push'](_0x249a05['shift']());}}}(a48_0x20e6,0xdbb39));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';function a48_0x20e6(){const _0x3b5116=['4TZfMNF','2552TnnIzZ','4985700TnEdIz','115833FoPoUs','6262645rLsKNY','3735234gmmoSl','62dkPpmx','186380tBJCjw','359002JeZtnz','1472397gbEUCQ','272yAWOhX'];a48_0x20e6=function(){return _0x3b5116;};return a48_0x20e6();}export const codegenDefinitions=[codegenSdk,codegenSql];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a49_0x54bc9a=a49_0x33b6;(function(_0x17b7e5,_0xabca33){const _0x30ee66=a49_0x33b6,_0x3162ac=_0x17b7e5();while(!![]){try{const _0x1ba294=parseInt(_0x30ee66(0x1d9))/0x1+-parseInt(_0x30ee66(0x1ec))/0x2+-parseInt(_0x30ee66(0x1db))/0x3*(parseInt(_0x30ee66(0x1dc))/0x4)+parseInt(_0x30ee66(0x1e5))/0x5*(-parseInt(_0x30ee66(0x1df))/0x6)+parseInt(_0x30ee66(0x1ee))/0x7+parseInt(_0x30ee66(0x1d7))/0x8+parseInt(_0x30ee66(0x1da))/0x9*(parseInt(_0x30ee66(0x1dd))/0xa);if(_0x1ba294===_0xabca33)break;else _0x3162ac['push'](_0x3162ac['shift']());}catch(_0x17b2dd){_0x3162ac['push'](_0x3162ac['shift']());}}}(a49_0x379d,0x1e889));function a49_0x33b6(_0x245c61,_0x3f1ae2){_0x245c61=_0x245c61-0x1d7;const _0x379db8=a49_0x379d();let _0x33b6ba=_0x379db8[_0x245c61];return _0x33b6ba;}function a49_0x379d(){const _0x180c85=['read','code','bool','name','125800bzIxmI','operation','1652994fOocnG','skip-imports','435232QDpwmT','appCode','56153XuPhTk','124857Apkimp','425319SHZlKR','4GsbdBD','10pvBlag','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','61668MgvGUv','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','codegen','sdk','string','boolean','15FjeAKJ','tableName','alias'];a49_0x379d=function(){return _0x180c85;};return a49_0x379d();}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a49_0x54bc9a(0x1e1),'command':a49_0x54bc9a(0x1e2),'description':a49_0x54bc9a(0x1e0),'risk':a49_0x54bc9a(0x1e8),'flags':[CODE_FLAG_OPTIONAL,{'name':a49_0x54bc9a(0x1e7),'type':a49_0x54bc9a(0x1e3),'description':a49_0x54bc9a(0x1de)},{'name':a49_0x54bc9a(0x1ed),'type':a49_0x54bc9a(0x1e3),'required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':a49_0x54bc9a(0x1ef),'type':a49_0x54bc9a(0x1e4),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x20607e){const _0xd07daa=a49_0x54bc9a,{dataset:_0x2627e8,operation:_0x3df8dd}=await getOperationDetail(_0x20607e[_0xd07daa(0x1d8)],_0x20607e['str'](_0xd07daa(0x1e9)),_0x20607e['str']('operation')),_0x1722ac=generateSdkCode(_0x2627e8,_0x3df8dd,{'includeImports':!_0x20607e[_0xd07daa(0x1ea)]('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x2627e8[_0xd07daa(0x1eb)],'code':_0x2627e8[_0xd07daa(0x1e9)],'tableName':_0x2627e8[_0xd07daa(0x1e6)]},'operation':_0x20607e['str'](_0xd07daa(0x1ed)),'code':_0x1722ac}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a50_0xa7af44=a50_0x4114;(function(_0x391ace,_0x418e7e){const _0x44dd46=a50_0x4114,_0x1ac07e=_0x391ace();while(!![]){try{const _0x1e0e7e=-parseInt(_0x44dd46(0x1eb))/0x1+parseInt(_0x44dd46(0x1ec))/0x2*(parseInt(_0x44dd46(0x1ed))/0x3)+parseInt(_0x44dd46(0x1f2))/0x4*(parseInt(_0x44dd46(0x1f6))/0x5)+parseInt(_0x44dd46(0x1f3))/0x6*(-parseInt(_0x44dd46(0x1ea))/0x7)+parseInt(_0x44dd46(0x1fa))/0x8+-parseInt(_0x44dd46(0x1f5))/0x9+parseInt(_0x44dd46(0x1e6))/0xa*(parseInt(_0x44dd46(0x1fb))/0xb);if(_0x1e0e7e===_0x418e7e)break;else _0x1ac07e['push'](_0x1ac07e['shift']());}catch(_0x2a8a0a){_0x1ac07e['push'](_0x1ac07e['shift']());}}}(a50_0x21c4,0x44f5e));function a50_0x21c4(){const _0x4b51c1=['sqlcode','sqlName','610IhUTOC','sdk','bool','sql','1127bmbgTQ','371767vHXsVP','548juethY','1125yhyLUa','target','str','appCode','string','24HmChku','3066sPeVfs','sqlCode','2950074uFCQUh','336785YCeoVK','Omit\x20import\x20statements\x20from\x20generated\x20code','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','bff','1468200jyPnJH','67419CtZmaO'];a50_0x21c4=function(){return _0x4b51c1;};return a50_0x21c4();}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';function a50_0x4114(_0x36b949,_0x5e172c){_0x36b949=_0x36b949-0x1e5;const _0x21c4dc=a50_0x21c4();let _0x411434=_0x21c4dc[_0x36b949];return _0x411434;}import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':'codegen','command':a50_0xa7af44(0x1e9),'description':'Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','risk':'read','flags':[SQLCODE_FLAG,{'name':a50_0xa7af44(0x1ee),'type':a50_0xa7af44(0x1f1),'description':a50_0xa7af44(0x1f8),'default':a50_0xa7af44(0x1e7),'enum':[a50_0xa7af44(0x1e7),a50_0xa7af44(0x1f9)]},{'name':'no-imports','type':'boolean','description':a50_0xa7af44(0x1f7)}],async 'execute'(_0x7f3b06){const _0x4f887f=a50_0xa7af44,_0x633883=await getSqlQueryInfo(_0x7f3b06[_0x4f887f(0x1f0)],_0x7f3b06[_0x4f887f(0x1ef)](_0x4f887f(0x1fc))),_0xd27759=_0x7f3b06[_0x4f887f(0x1ef)]('target')||_0x4f887f(0x1e7),_0x2c1da4=generateSqlCodeTemplate(_0x633883,{'target':_0xd27759,'includeImports':!_0x7f3b06[_0x4f887f(0x1e8)]('no-imports')});return{'ok':!![],'data':{'sqlCode':_0x633883[_0x4f887f(0x1f4)],'sqlName':_0x633883[_0x4f887f(0x1e5)],'target':_0xd27759,'code':_0x2c1da4}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x40e250,_0x3e25d6){const _0x56214e=a51_0x29c6,_0x1606f4=_0x40e250();while(!![]){try{const _0x5e2182=-parseInt(_0x56214e(0xb6))/0x1*(parseInt(_0x56214e(0xbd))/0x2)+parseInt(_0x56214e(0xa9))/0x3*(-parseInt(_0x56214e(0xc2))/0x4)+-parseInt(_0x56214e(0xb8))/0x5*(-parseInt(_0x56214e(0xd0))/0x6)+-parseInt(_0x56214e(0xc0))/0x7*(parseInt(_0x56214e(0xd1))/0x8)+parseInt(_0x56214e(0xcc))/0x9*(parseInt(_0x56214e(0xab))/0xa)+parseInt(_0x56214e(0xae))/0xb*(parseInt(_0x56214e(0xa7))/0xc)+parseInt(_0x56214e(0xd4))/0xd*(parseInt(_0x56214e(0xd3))/0xe);if(_0x5e2182===_0x3e25d6)break;else _0x1606f4['push'](_0x1606f4['shift']());}catch(_0xe21f6b){_0x1606f4['push'](_0x1606f4['shift']());}}}(a51_0x43c1,0x23ec1));import{CliErrors}from'../../errors.js';function a51_0x29c6(_0x995cac,_0x5f16a8){_0x995cac=_0x995cac-0xa4;const _0x43c1ad=a51_0x43c1();let _0x29c628=_0x43c1ad[_0x995cac];return _0x29c628;}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 _0x3476f4=a51_0x29c6;return[{'name':_0x3476f4(0xb1),'type':'string','description':_0x3476f4(0xc3),'required':!![]},{'name':_0x3476f4(0xb5),'type':_0x3476f4(0xbc),'description':_0x3476f4(0xce),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x31610f=a51_0x29c6;return[{'name':_0x31610f(0xb5),'type':_0x31610f(0xbc),'description':_0x31610f(0xce),'default':![]}];}export async function validateAppName(_0x45db17,_0x24a627){const _0x3f4c43=a51_0x29c6,_0x145976=_0x45db17['args'][0x0]?.[_0x3f4c43(0xb0)]();if(!_0x145976)throw CliErrors[_0x3f4c43(0xad)]('Missing\x20app\x20name.',_0x3f4c43(0xc9)+CLI_BIN_NAME+'\x20'+_0x24a627+_0x3f4c43(0xac));}function a51_0x43c1(){const _0x1833c0=['\x22\x20(appcode:\x20','Missing\x20app\x20name.','Usage:\x20','App\x20\x22','keys','828DtUBDe','globalConfig','Use\x20global\x20config\x20scope','project','180UmRacP','168VlpatT','\x20config.','148330mlqWjs','13lzGnEU','\x20Note:\x20app\x20\x22','\x22\x20not\x20found.','\x20Remaining\x20app\x20\x22','24DMDNlg','both','3RydQHN','length','26710NNlNPK','\x20<name>','validation','353463kPmFLM','\x20<name>\x20[--global]','trim','appcode','defaultApp','projectConfig','bool','global','44724AOrqQo','\x20app\x20\x22','41895YluLHD','object','args','string','boolean','2roJbdP','\x22\x20is\x20selected\x20automatically.','Updated','91413cirdqr','str','423452OaafVU','App\x20code','\x20<name>\x20--appcode\x20<code>','apps','\x20Default\x20app\x20is\x20\x22'];a51_0x43c1=function(){return _0x1833c0;};return a51_0x43c1();}export async function runAppAdd(_0x9e1991,_0x2b901b){const _0x14825e=a51_0x29c6,_0x44eac7=_0x9e1991['args'][0x0]?.[_0x14825e(0xb0)]();if(!_0x44eac7)throw CliErrors['validation'](_0x14825e(0xc8),_0x14825e(0xc9)+CLI_BIN_NAME+'\x20'+_0x2b901b+_0x14825e(0xc4));const _0x33684d=_0x9e1991[_0x14825e(0xc1)](_0x14825e(0xb1));if(!_0x33684d)throw CliErrors['flagMissing'](_0x14825e(0xb1),_0x14825e(0xc9)+CLI_BIN_NAME+'\x20'+_0x2b901b+_0x14825e(0xc4));const _0x1d2819={'global':_0x9e1991[_0x14825e(0xb4)]('global')},_0xf48bd8=readConfig(_0x1d2819);if(!_0xf48bd8[_0x14825e(0xc5)])_0xf48bd8[_0x14825e(0xc5)]={};const _0x612dc2={'appcode':_0x33684d,...collectAppProfileOverrides(_0x426ff9=>_0x9e1991[_0x14825e(0xc1)](_0x426ff9))},_0x5033cf=_0xf48bd8[_0x14825e(0xc5)],_0x17d1f1=Object[_0x14825e(0xcb)](_0x5033cf),_0x2cd0dd=typeof _0xf48bd8[_0x14825e(0xb2)]===_0x14825e(0xbb)&&_0x5033cf[_0xf48bd8[_0x14825e(0xb2)]]?_0xf48bd8[_0x14825e(0xb2)]:_0x17d1f1[_0x14825e(0xaa)]===0x1?_0x17d1f1[0x0]:undefined,_0x2a293d=!!_0x5033cf[_0x44eac7];_0x5033cf[_0x44eac7]=_0x612dc2;const _0x520102=normalizeStoredDefaultApp(_0xf48bd8,_0x2cd0dd);writeConfig(_0xf48bd8,_0x1d2819);const _0x21590c=!_0x2a293d&&_0x520102?_0x14825e(0xc6)+_0x520102+'\x22.':'',_0x35404c=(_0x2a293d?_0x14825e(0xbf):'Added')+_0x14825e(0xb7)+_0x44eac7+_0x14825e(0xc7)+_0x33684d+')'+scopeLabel(_0x1d2819)+'.'+_0x21590c;return{'ok':!![],'message':_0x35404c};}export async function runAppRemove(_0x41d67d,_0x50a82f){const _0x165db4=a51_0x29c6,_0xc615c5=_0x41d67d[_0x165db4(0xba)][0x0]?.['trim']();if(!_0xc615c5)throw CliErrors[_0x165db4(0xad)](_0x165db4(0xc8),_0x165db4(0xc9)+CLI_BIN_NAME+'\x20'+_0x50a82f+_0x165db4(0xaf));const _0x53b832=_0x41d67d[_0x165db4(0xb4)](_0x165db4(0xb5)),{config:_0x51f668,layers:_0x3c276d}=readRawConfigWithLayers(),_0x484ffc=_0x51f668[_0x165db4(0xc5)]??{};if(!_0x484ffc[_0xc615c5])throw CliErrors[_0x165db4(0xad)](_0x165db4(0xca)+_0xc615c5+_0x165db4(0xa5));const _0x221db9=_0x3c276d[_0x165db4(0xcd)][_0x165db4(0xc5)]&&typeof _0x3c276d[_0x165db4(0xcd)]['apps']===_0x165db4(0xb9)?_0x3c276d[_0x165db4(0xcd)][_0x165db4(0xc5)]:{},_0x243424=_0x3c276d[_0x165db4(0xb3)][_0x165db4(0xc5)]&&typeof _0x3c276d['projectConfig']['apps']===_0x165db4(0xb9)?_0x3c276d[_0x165db4(0xb3)]['apps']:{},_0x33c75b=appDefinedIn(_0xc615c5,_0x221db9,_0x243424),_0x5c526c=resolveAppScopeForWrite(_0xc615c5,_0x53b832,_0x3c276d),_0x189e8={'global':_0x5c526c===_0x165db4(0xb5)},_0x5e3c26=readConfig(_0x189e8),_0x557b7b=_0x5e3c26[_0x165db4(0xc5)];if(!_0x557b7b||!_0x557b7b[_0xc615c5])throw CliErrors[_0x165db4(0xad)]('App\x20\x22'+_0xc615c5+_0x165db4(0xa5));delete _0x557b7b[_0xc615c5];let _0x34ddac='';const _0x6f9b6e=typeof _0x5e3c26['defaultApp']===_0x165db4(0xbb)?_0x5e3c26[_0x165db4(0xb2)]:undefined,_0x3aaa52=Object[_0x165db4(0xcb)](_0x557b7b),_0x34d6f4=_0x6f9b6e===_0xc615c5?_0x3aaa52[0x0]:_0x6f9b6e,_0x4a8856=normalizeStoredDefaultApp(_0x5e3c26,_0x34d6f4);if(_0x6f9b6e===_0xc615c5&&_0x3aaa52[_0x165db4(0xaa)]===0x1)_0x34ddac=_0x165db4(0xa6)+_0x3aaa52[0x0]+_0x165db4(0xbe);else _0x6f9b6e===_0xc615c5&&_0x4a8856&&(_0x34ddac='\x20Default\x20app\x20changed\x20to\x20\x22'+_0x4a8856+'\x22.');Object['keys'](_0x557b7b)[_0x165db4(0xaa)]===0x0&&(delete _0x5e3c26[_0x165db4(0xc5)],delete _0x5e3c26[_0x165db4(0xb2)]);writeConfig(_0x5e3c26,_0x189e8);const _0x393a44=_0x33c75b===_0x165db4(0xa8)?_0x165db4(0xa4)+_0xc615c5+'\x22\x20still\x20defined\x20in\x20'+(_0x5c526c===_0x165db4(0xcf)?_0x165db4(0xb5):_0x165db4(0xcf))+_0x165db4(0xd2):'';return{'ok':!![],'message':'Removed\x20app\x20\x22'+_0xc615c5+'\x22'+scopeLabel(_0x189e8)+'.'+_0x34ddac+_0x393a44};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x24aadd,_0x34a5b2){const _0x29ea54=a52_0x89d3,_0x2cfbdb=_0x24aadd();while(!![]){try{const _0x3f335f=parseInt(_0x29ea54(0xb0))/0x1*(parseInt(_0x29ea54(0x95))/0x2)+parseInt(_0x29ea54(0xb3))/0x3+parseInt(_0x29ea54(0xab))/0x4*(-parseInt(_0x29ea54(0x94))/0x5)+-parseInt(_0x29ea54(0x96))/0x6+parseInt(_0x29ea54(0x99))/0x7*(parseInt(_0x29ea54(0xb5))/0x8)+parseInt(_0x29ea54(0xa2))/0x9+parseInt(_0x29ea54(0xa7))/0xa*(-parseInt(_0x29ea54(0xb4))/0xb);if(_0x3f335f===_0x34a5b2)break;else _0x2cfbdb['push'](_0x2cfbdb['shift']());}catch(_0x30be9c){_0x2cfbdb['push'](_0x2cfbdb['shift']());}}}(a52_0x4bd2,0xbd012));import{input,checkbox,select}from'@inquirer/prompts';function a52_0x89d3(_0x404eb9,_0x1f3a14){_0x404eb9=_0x404eb9-0x94;const _0x4bd2c0=a52_0x4bd2();let _0x89d379=_0x4bd2c0[_0x404eb9];return _0x89d379;}function a52_0x4bd2(){const _0x2e59cc=['Could\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','\x20\x20(','6169768rZLEYh','App\x20Code:','\x20apps.\x20Select\x20with\x20space,\x20a=all,\x20i=invert:','appCode','Invalid\x20App\x20Code','440315ipJwoG','Fetching\x20available\x20apps...','(Skip;\x20configure\x20later)','2622312sVIUIq','594352bEnirf','1915840RIaLhm','5ZGQPxW','6MhkLMB','5829720cmnBsJ','trim','valid','7kZgjlB','skip','map','length','includes','find','message','Found\x20','custom','11087271LccnTE','yellow','(No\x20login\x20session.\x20Enter\x20an\x20App\x20Code\x20manually\x20or\x20skip.)','gray','manual','70UObwJR','appName'];a52_0x4bd2=function(){return _0x2e59cc;};return a52_0x4bd2();}import a52_0x26c6f0 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x222625=a52_0x89d3,_0x3780eb=await input({'message':'App\x20Code:','validate':_0x15f47e=>{const _0x51004=a52_0x89d3,_0x2fb5d2=validateAppcode(_0x15f47e[_0x51004(0x97)]());return _0x2fb5d2[_0x51004(0x98)]||_0x2fb5d2[_0x51004(0x9f)]||_0x51004(0xaf);}});return _0x3780eb[_0x222625(0x97)]();}export async function promptAppSelection(_0x120eed){const _0x1b8032=a52_0x89d3,_0x3b25e4=[{'name':a52_0x26c6f0[_0x1b8032(0xa3)]('✎\x20Enter\x20appcode\x20manually'),'value':-0x1},..._0x120eed[_0x1b8032(0x9b)]((_0x1c1aa5,_0x15e941)=>({'name':_0x1c1aa5[_0x1b8032(0xa8)]+'\x20\x20'+a52_0x26c6f0[_0x1b8032(0xa5)]('('+_0x1c1aa5[_0x1b8032(0xae)]+')'),'value':_0x15e941}))],_0x2f3c64=await checkbox({'message':_0x1b8032(0xa0)+a52_0x26c6f0['cyan'](_0x120eed[_0x1b8032(0x9c)])+_0x1b8032(0xad),'choices':_0x3b25e4,'loop':![]});if(_0x2f3c64[_0x1b8032(0x9d)](-0x1))return _0x1b8032(0xa1);if(_0x2f3c64['length']===0x0)return'custom';return _0x2f3c64['map'](_0x17d07a=>_0x120eed[_0x17d07a]);}export async function promptSingleAppSelection(_0x194338){const _0x433b0f=a52_0x89d3,_0x448637=[{'name':a52_0x26c6f0[_0x433b0f(0xa5)]('(Skip;\x20configure\x20later\x20with\x20config\x20set\x20appcode)'),'value':_0x433b0f(0x9a)},{'name':a52_0x26c6f0[_0x433b0f(0xa3)]('✎\x20Enter\x20appcode\x20manually'),'value':'custom'},..._0x194338[_0x433b0f(0x9b)](_0x5b97e3=>({'name':_0x5b97e3[_0x433b0f(0xa8)]+'\x20\x20'+a52_0x26c6f0[_0x433b0f(0xa5)]('('+_0x5b97e3[_0x433b0f(0xae)]+')'),'value':_0x5b97e3['appCode']}))],_0x418efe=await select({'message':'Select\x20the\x20app\x20to\x20bind:','choices':_0x448637});if(_0x418efe===_0x433b0f(0x9a))return _0x433b0f(0x9a);if(_0x418efe===_0x433b0f(0xa1))return _0x433b0f(0xa1);return _0x194338[_0x433b0f(0x9e)](_0x34b578=>_0x34b578[_0x433b0f(0xae)]===_0x418efe);}export async function selectSingleAppcode(_0x55017a){const _0x262f66=a52_0x89d3;if(!_0x55017a)return writeCliSideChannelLine(a52_0x26c6f0[_0x262f66(0xa5)](_0x262f66(0xa4))),_fallbackOrSkip();writeCliSideChannelLine(_0x262f66(0xb1));let _0x416f90;try{_0x416f90=await withActiveCookie(_0x55017a,()=>listRemoteApps());}catch(_0x64ca4b){writeCliSideChannelLine(a52_0x26c6f0['yellow'](_0x262f66(0xa9)));if(_0x64ca4b instanceof Error)writeCliSideChannelLine(a52_0x26c6f0[_0x262f66(0xa5)](_0x262f66(0xaa)+_0x64ca4b['message']+')'));return _fallbackOrSkip();}if(_0x416f90[_0x262f66(0x9c)]===0x0)return writeCliSideChannelLine(a52_0x26c6f0[_0x262f66(0xa3)]('No\x20available\x20apps\x20found.')),_fallbackOrSkip();const _0x165b1d=await promptSingleAppSelection(_0x416f90);if(_0x165b1d==='skip')return'';if(_0x165b1d===_0x262f66(0xa1))return promptCustomAppcode();return _0x165b1d[_0x262f66(0xae)];}export async function selectMultipleApps(_0x5f3824){const _0x315e28=a52_0x89d3;writeCliSideChannelLine(_0x315e28(0xb1));let _0x19812c;try{_0x19812c=await withActiveCookie(_0x5f3824,()=>listRemoteApps());}catch(_0x5d496d){writeCliSideChannelLine('\x0aCould\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.');if(_0x5d496d instanceof Error)writeCliSideChannelLine(_0x315e28(0xaa)+_0x5d496d[_0x315e28(0x9f)]+')');return _0x315e28(0xa1);}if(_0x19812c['length']===0x0)return writeCliSideChannelLine('\x0aNo\x20available\x20apps\x20found.'),'custom';return promptAppSelection(_0x19812c);}async function _fallbackOrSkip(){const _0x1b056d=a52_0x89d3,_0x43deb2=await select({'message':_0x1b056d(0xac),'choices':[{'name':a52_0x26c6f0[_0x1b056d(0xa5)](_0x1b056d(0xb2)),'value':_0x1b056d(0x9a)},{'name':a52_0x26c6f0[_0x1b056d(0xa3)]('✎\x20Enter\x20manually'),'value':_0x1b056d(0xa6)}]});if(_0x43deb2==='skip')return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a53_0x1ff2(){const _0x2ff9eb=['335085LTXDWY','trim','string','taskId','\x20returned\x20unknown\x20status\x20','10eQSRUe','907283NllltX','\x20--appcode\x20','replace','has','\x20task\x20status\x20--task-id\x20','FAILED','637443xqfEPn','258DjtEyP','PENDING','\x20failed.','apiError','\x20completed\x20successfully.','21YJHUKT','Task\x20','80324uDRJoS','Async\x20task\x20','\x20failed:\x20','\x20response\x20did\x20not\x20contain\x20a\x20status.','\x20--format\x20compress','\x20is\x20processing.','62783MxYOMY','4755664xYxfYA','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','toUpperCase','3354417bWpUgZ','PROCESSING','\x27\x5c\x27\x27','status','errorMessage','32eOLTWv'];a53_0x1ff2=function(){return _0x2ff9eb;};return a53_0x1ff2();}const a53_0x3e09ad=a53_0x5f37;(function(_0x175d84,_0x117250){const _0x1744c5=a53_0x5f37,_0x28fc6e=_0x175d84();while(!![]){try{const _0x163148=-parseInt(_0x1744c5(0x1a4))/0x1+parseInt(_0x1744c5(0x1b2))/0x2*(parseInt(_0x1744c5(0x1b0))/0x3)+parseInt(_0x1744c5(0x1c1))/0x4*(parseInt(_0x1744c5(0x19e))/0x5)+parseInt(_0x1744c5(0x1ab))/0x6*(-parseInt(_0x1744c5(0x1b8))/0x7)+parseInt(_0x1744c5(0x1b9))/0x8+parseInt(_0x1744c5(0x1aa))/0x9*(parseInt(_0x1744c5(0x1a3))/0xa)+parseInt(_0x1744c5(0x1bc))/0xb;if(_0x163148===_0x117250)break;else _0x28fc6e['push'](_0x28fc6e['shift']());}catch(_0x4a51e2){_0x28fc6e['push'](_0x28fc6e['shift']());}}}(a53_0x1ff2,0x78bd8));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';function a53_0x5f37(_0x31e250,_0x260b50){_0x31e250=_0x31e250-0x19e;const _0x1ff2d1=a53_0x1ff2();let _0x5f3736=_0x1ff2d1[_0x31e250];return _0x5f3736;}const TERMINAL_STATUSES=new Set(['SUCCESS',a53_0x3e09ad(0x1a9)]),NON_TERMINAL_STATUSES=new Set([a53_0x3e09ad(0x1ac),a53_0x3e09ad(0x1bd)]);export function normalizeAsyncTask(_0x4a7f1b){const _0xd52fbc=a53_0x3e09ad,_0x426766=typeof _0x4a7f1b?.['taskId']===_0xd52fbc(0x1a0)?_0x4a7f1b[_0xd52fbc(0x1a1)][_0xd52fbc(0x19f)]():'';if(!_0x426766)throw CliErrors[_0xd52fbc(0x1ae)](_0xd52fbc(0x1ba));const _0x29bb7e=typeof _0x4a7f1b[_0xd52fbc(0x1bf)]===_0xd52fbc(0x1a0)?_0x4a7f1b[_0xd52fbc(0x1bf)]['trim']()[_0xd52fbc(0x1bb)]():'';if(!_0x29bb7e)throw CliErrors['apiError'](_0xd52fbc(0x1b3)+_0x426766+_0xd52fbc(0x1b5));return{'taskId':_0x426766,'status':_0x29bb7e,'errorMessage':typeof _0x4a7f1b['errorMessage']===_0xd52fbc(0x1a0)&&_0x4a7f1b[_0xd52fbc(0x1c0)][_0xd52fbc(0x19f)]()?_0x4a7f1b[_0xd52fbc(0x1c0)][_0xd52fbc(0x19f)]():null,'isTerminal':TERMINAL_STATUSES[_0xd52fbc(0x1a7)](_0x29bb7e),'knownStatus':TERMINAL_STATUSES[_0xd52fbc(0x1a7)](_0x29bb7e)||NON_TERMINAL_STATUSES[_0xd52fbc(0x1a7)](_0x29bb7e)};}export function buildAsyncTaskStatusCommand(_0x4d3807,_0x386df6){const _0x584612=a53_0x3e09ad;return CLI_BIN_NAME+_0x584612(0x1a8)+quoteShellArg(_0x4d3807)+_0x584612(0x1a5)+quoteShellArg(_0x386df6)+_0x584612(0x1b6);}export function asyncTaskMessage(_0x343b24){const _0x362301=a53_0x3e09ad;switch(_0x343b24[_0x362301(0x1bf)]){case _0x362301(0x1ac):return _0x362301(0x1b1)+_0x343b24[_0x362301(0x1a1)]+'\x20is\x20pending.';case _0x362301(0x1bd):return _0x362301(0x1b1)+_0x343b24[_0x362301(0x1a1)]+_0x362301(0x1b7);case'SUCCESS':return _0x362301(0x1b1)+_0x343b24[_0x362301(0x1a1)]+_0x362301(0x1af);case _0x362301(0x1a9):return _0x343b24[_0x362301(0x1c0)]?_0x362301(0x1b1)+_0x343b24['taskId']+_0x362301(0x1b4)+_0x343b24[_0x362301(0x1c0)]:_0x362301(0x1b1)+_0x343b24[_0x362301(0x1a1)]+_0x362301(0x1ad);default:return _0x362301(0x1b1)+_0x343b24[_0x362301(0x1a1)]+_0x362301(0x1a2)+_0x343b24[_0x362301(0x1bf)]+'.';}}function quoteShellArg(_0x381721){const _0x5ab4a6=a53_0x3e09ad;return'\x27'+_0x381721[_0x5ab4a6(0x1a6)](/'/g,_0x5ab4a6(0x1be))+'\x27';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5c3451,_0x240bb1){var _0x47c721=a54_0xeea0,_0x2eff97=_0x5c3451();while(!![]){try{var _0x473b56=parseInt(_0x47c721(0x120))/0x1+parseInt(_0x47c721(0x117))/0x2*(-parseInt(_0x47c721(0x114))/0x3)+parseInt(_0x47c721(0x11e))/0x4+-parseInt(_0x47c721(0x116))/0x5+parseInt(_0x47c721(0x115))/0x6*(parseInt(_0x47c721(0x11f))/0x7)+-parseInt(_0x47c721(0x119))/0x8*(-parseInt(_0x47c721(0x11b))/0x9)+-parseInt(_0x47c721(0x11d))/0xa;if(_0x473b56===_0x240bb1)break;else _0x2eff97['push'](_0x2eff97['shift']());}catch(_0x989aa7){_0x2eff97['push'](_0x2eff97['shift']());}}}(a54_0x2823,0xe50fb));function a54_0x2823(){var _0xf01072=['1976900whfXrs','2XHZIdK','url','104uYkYft','method','859149BchYeA','description','23942420tBIAPk','2587508tMfdhW','594923MQiLWw','890303TMGkHN','1995321ObygSM','114DESfma'];a54_0x2823=function(){return _0xf01072;};return a54_0x2823();}function a54_0xeea0(_0x309a1b,_0x2aa830){_0x309a1b=_0x309a1b-0x114;var _0x2823f0=a54_0x2823();var _0xeea0f=_0x2823f0[_0x309a1b];return _0xeea0f;}export function asDryRunResult(_0x4dce87,_0x3db7c5){var _0x3c6007=a54_0xeea0;return Object['defineProperties'](_0x4dce87,{'method':{'value':_0x3db7c5[_0x3c6007(0x11a)],'enumerable':![]},'url':{'value':_0x3db7c5[_0x3c6007(0x118)],'enumerable':![]},..._0x3db7c5['description']?{'description':{'value':_0x3db7c5[_0x3c6007(0x11c)],'enumerable':![]}}:{}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a55_0x1e805f=a55_0x5321;(function(_0x1f4ceb,_0x17f7da){const _0x173639=a55_0x5321,_0x1c539e=_0x1f4ceb();while(!![]){try{const _0x5189e7=parseInt(_0x173639(0x139))/0x1+parseInt(_0x173639(0x12e))/0x2+-parseInt(_0x173639(0x122))/0x3+-parseInt(_0x173639(0x135))/0x4*(-parseInt(_0x173639(0x130))/0x5)+parseInt(_0x173639(0x132))/0x6*(-parseInt(_0x173639(0x11e))/0x7)+-parseInt(_0x173639(0x136))/0x8+parseInt(_0x173639(0x13c))/0x9*(parseInt(_0x173639(0x11b))/0xa);if(_0x5189e7===_0x17f7da)break;else _0x1c539e['push'](_0x1c539e['shift']());}catch(_0x138a03){_0x1c539e['push'](_0x1c539e['shift']());}}}(a55_0x5054,0x885fc));function a55_0x5321(_0x4ac9f4,_0x3f9c51){_0x4ac9f4=_0x4ac9f4-0x119;const _0x50549b=a55_0x5054();let _0x5321a1=_0x50549b[_0x4ac9f4];return _0x5321a1;}export const CROSS_RELATION_FROM_DATASET_FLAG={'name':a55_0x1e805f(0x133),'type':a55_0x1e805f(0x13a),'required':!![],'description':a55_0x1e805f(0x12b)};export const CROSS_RELATION_FROM_COLUMN_FLAG={'name':a55_0x1e805f(0x128),'type':a55_0x1e805f(0x13a),'required':!![],'description':a55_0x1e805f(0x11f)};export const CROSS_RELATION_TO_DATASET_FLAG={'name':a55_0x1e805f(0x138),'type':a55_0x1e805f(0x13a),'required':!![],'description':a55_0x1e805f(0x123)};export const CROSS_RELATION_TO_COLUMN_FLAG={'name':'to-column','type':a55_0x1e805f(0x13a),'required':!![],'description':'Target\x20field\x20name'};function a55_0x5054(){const _0x23df75=['SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','Source\x20DB_TABLE\x20dataset\x20code','sqlcode','skip-connection-test','1325260WIPQyY','datasetcode','28465IReCVC','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','96NcCOYY','from-datasetcode','ONE_TO_MANY','332zaYmjJ','8577424PERndy','POSTGRESQL','to-datasetcode','827895RYTMia','string','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','94230zyYbPo','number','dbtype','boolean','MANY_TO_ONE','Write\x20to\x20the\x20global\x20configuration','cardinality','MYSQL','Database\x20product\x20type','320ZLPrGD','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update','45010JiipeH','Source\x20field\x20name\x20used\x20to\x20locate\x20the\x20relation','Relation\x20cardinality;\x20create\x20leaves\x20it\x20unset\x20when\x20omitted,\x20update\x20keeps\x20the\x20current\x20value','App\x20code\x20(e.g.\x20app-xxxxx)','1693314AikcFp','Target\x20DB_TABLE\x20dataset\x20code','from-dblink-id','global','to-label-column','code','from-column','appcode'];a55_0x5054=function(){return _0x23df75;};return a55_0x5054();}export const CROSS_RELATION_DBLINK_FLAG={'name':a55_0x1e805f(0x124),'type':a55_0x1e805f(0x13d),'description':'Source\x20database\x20connection\x20ID;\x20derived\x20from\x20the\x20source\x20dataset\x20when\x20omitted'};export const CROSS_RELATION_LABEL_FLAG={'name':a55_0x1e805f(0x126),'type':a55_0x1e805f(0x13a),'description':'Target\x20display\x20field;\x20create\x20defaults\x20to\x20the\x20target\x20field,\x20update\x20keeps\x20the\x20current\x20value'};export const CROSS_RELATION_CARDINALITY_FLAG={'name':a55_0x1e805f(0x142),'type':a55_0x1e805f(0x13a),'enum':['ONE_TO_ONE',a55_0x1e805f(0x134),a55_0x1e805f(0x140),'MANY_TO_MANY'],'description':a55_0x1e805f(0x120)};export const GLOBAL_SCOPE_FLAG={'name':a55_0x1e805f(0x125),'type':a55_0x1e805f(0x13f),'default':![],'description':a55_0x1e805f(0x141)};export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a55_0x1e805f(0x131)};export const CODE_FLAG={'name':a55_0x1e805f(0x127),'type':a55_0x1e805f(0x13a),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a55_0x1e805f(0x12f),'description':a55_0x1e805f(0x13b)};export const SQLCODE_FLAG={'name':a55_0x1e805f(0x12c),'type':a55_0x1e805f(0x13a),'required':!![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a55_0x1e805f(0x12a)}};export const APPCODE_FLAG_OPTIONAL={'name':a55_0x1e805f(0x129),'type':a55_0x1e805f(0x13a),'required':![],'description':'App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)'};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a55_0x1e805f(0x121)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':'number','required':!![],'description':a55_0x1e805f(0x11c)};export const DB_TYPE_FLAG={'name':a55_0x1e805f(0x13e),'type':a55_0x1e805f(0x13a),'required':!![],'description':a55_0x1e805f(0x11a),'enum':[a55_0x1e805f(0x119),a55_0x1e805f(0x137)]};export const SKIP_CONNECTION_TEST_FLAG={'name':a55_0x1e805f(0x12d),'type':'boolean','description':a55_0x1e805f(0x11d)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x598fd1,_0x2d19d0){const _0x4f803a=a56_0x5ede,_0x3ae87c=_0x598fd1();while(!![]){try{const _0x580b14=parseInt(_0x4f803a(0xbf))/0x1*(-parseInt(_0x4f803a(0xc6))/0x2)+-parseInt(_0x4f803a(0xc4))/0x3+-parseInt(_0x4f803a(0xcc))/0x4*(parseInt(_0x4f803a(0xce))/0x5)+parseInt(_0x4f803a(0xbc))/0x6*(parseInt(_0x4f803a(0xbd))/0x7)+parseInt(_0x4f803a(0xba))/0x8*(-parseInt(_0x4f803a(0xc5))/0x9)+-parseInt(_0x4f803a(0xca))/0xa+-parseInt(_0x4f803a(0xc0))/0xb*(-parseInt(_0x4f803a(0xc9))/0xc);if(_0x580b14===_0x2d19d0)break;else _0x3ae87c['push'](_0x3ae87c['shift']());}catch(_0x1e530e){_0x3ae87c['push'](_0x3ae87c['shift']());}}}(a56_0x3068,0xbc6ee));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';function a56_0x3068(){const _0x24189=['4LaYXkm','validation','trim','53847732LLhDRL','6443900RfGxdW','isFile','4dyeMnR','size','7194225GgpYtK','\x20path\x20is\x20required.','154848LtgmgZ','File\x20not\x20found:\x20','23202ogaYTj','1631OOxVlf','ceil','495373GGfuOf','11YxwvYc','toFixed','\x20MB','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','3640401BkMKkK','153zZKnIn'];a56_0x3068=function(){return _0x24189;};return a56_0x3068();}const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x2b0f86){const _0x61f1ae=a56_0x5ede;if(_0x2b0f86>=BYTES_PER_MB){const _0xc48559=Math[_0x61f1ae(0xbe)](_0x2b0f86/BYTES_PER_MB*0x64)/0x64;return _0xc48559[_0x61f1ae(0xc1)](0x2)+_0x61f1ae(0xc2);}return _0x2b0f86+'\x20B';}function a56_0x5ede(_0x23fab4,_0x3abc6a){_0x23fab4=_0x23fab4-0xba;const _0x306854=a56_0x3068();let _0x5ede2c=_0x306854[_0x23fab4];return _0x5ede2c;}export function requireDevelopmentUploadFile(_0x2f54ef,_0x2ebffd){const _0xd22902=a56_0x5ede,_0x4500c2=_0x2f54ef[_0xd22902(0xc8)]();if(!_0x4500c2)throw CliErrors[_0xd22902(0xc7)](_0x2ebffd+_0xd22902(0xcf));if(!existsSync(_0x4500c2))throw CliErrors[_0xd22902(0xc7)](_0xd22902(0xbb)+_0x4500c2);const _0x1e4d4a=statSync(_0x4500c2);if(!_0x1e4d4a[_0xd22902(0xcb)]())throw CliErrors[_0xd22902(0xc7)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x4500c2);if(_0x1e4d4a[_0xd22902(0xcd)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0xd22902(0xc7)](_0xd22902(0xc3)+_0x4500c2+'\x20('+formatBytes(_0x1e4d4a[_0xd22902(0xcd)])+')');return{'path':_0x4500c2,'size':_0x1e4d4a['size']};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x370f34,_0x1c8ab0){const _0x32db59=a57_0x371b,_0x387592=_0x370f34();while(!![]){try{const _0x77903=-parseInt(_0x32db59(0x7b))/0x1*(-parseInt(_0x32db59(0x84))/0x2)+-parseInt(_0x32db59(0x7d))/0x3*(-parseInt(_0x32db59(0x7c))/0x4)+-parseInt(_0x32db59(0x78))/0x5*(parseInt(_0x32db59(0x81))/0x6)+parseInt(_0x32db59(0x7f))/0x7*(-parseInt(_0x32db59(0x7e))/0x8)+-parseInt(_0x32db59(0x85))/0x9+-parseInt(_0x32db59(0x82))/0xa+parseInt(_0x32db59(0x79))/0xb;if(_0x77903===_0x1c8ab0)break;else _0x387592['push'](_0x387592['shift']());}catch(_0x14dde4){_0x387592['push'](_0x387592['shift']());}}}(a57_0x8781,0x306d4));function a57_0x8781(){const _0x2569d5=['615IETwwU','3963190uXPOSg','App\x20Code\x20cannot\x20exceed\x20100\x20characters','31351iSVBiz','4koMlzm','506118QHWKIr','8EXEDRp','845929Sarfiu','length','1974ziboOS','1735980uqFDAU','test','2ZIhwZj','243711LwwDrf','trim'];a57_0x8781=function(){return _0x2569d5;};return a57_0x8781();}function a57_0x371b(_0x1ced8a,_0x521f56){_0x1ced8a=_0x1ced8a-0x78;const _0x8781c7=a57_0x8781();let _0x371b47=_0x8781c7[_0x1ced8a];return _0x371b47;}export function validateAppcode(_0x266b6d){const _0x355887=a57_0x371b,_0x36c613=_0x266b6d[_0x355887(0x86)]();if(!_0x36c613)return{'valid':![],'message':'App\x20Code\x20cannot\x20be\x20empty'};if(_0x36c613[_0x355887(0x80)]>0x64)return{'valid':![],'message':_0x355887(0x7a)};if(!/^[A-Za-z0-9_-]+$/[_0x355887(0x83)](_0x36c613))return{'valid':![],'message':'Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'};return{'valid':!![]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a58_0x565f(_0x3ea170,_0x435048){_0x3ea170=_0x3ea170-0x120;const _0x22f536=a58_0x22f5();let _0x565f85=_0x22f536[_0x3ea170];return _0x565f85;}const a58_0x367d26=a58_0x565f;(function(_0x412194,_0x46ecc8){const _0x427cb7=a58_0x565f,_0x36baf6=_0x412194();while(!![]){try{const _0x56101d=parseInt(_0x427cb7(0x138))/0x1+-parseInt(_0x427cb7(0x127))/0x2*(parseInt(_0x427cb7(0x134))/0x3)+-parseInt(_0x427cb7(0x13e))/0x4+-parseInt(_0x427cb7(0x13d))/0x5+-parseInt(_0x427cb7(0x133))/0x6*(-parseInt(_0x427cb7(0x135))/0x7)+-parseInt(_0x427cb7(0x122))/0x8+parseInt(_0x427cb7(0x125))/0x9;if(_0x56101d===_0x46ecc8)break;else _0x36baf6['push'](_0x36baf6['shift']());}catch(_0x46affb){_0x36baf6['push'](_0x36baf6['shift']());}}}(a58_0x22f5,0x28361));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';const LEGACY_DELETABLE_KEYS=new Set(['inherit']),EXTRA_DELETABLE_KEYS=new Set(['defaultApp',a58_0x367d26(0x121)]);function a58_0x22f5(){const _0x52c25f=['1228460ReGhCB','289836ETYxOo','\x20already\x20absent','has','global','routing','2287880eAgrGb','Missing\x20key\x20argument.','\x20config\x20delete\x20<key>\x20[--global]','5790978FixERZ','Delete\x20a\x20config\x20value\x20from\x20one\x20scope','2nBhdCC','hasOwnProperty','\x22\x20is\x20not\x20deletable.','call','Global','prototype','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','Top-level\x20key\x20\x22','boolean','write','Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.','Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','1740jQsReS','447219wfUOvC','4858FJmICv','validation','riskLevel','73212GctTSv','Usage:\x20','Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','trim','Project'];a58_0x22f5=function(){return _0x52c25f;};return a58_0x22f5();}async function execute(_0x50dd55){const _0x37ab7f=a58_0x367d26,_0xc93f59=_0x50dd55['args'][0x0]?.[_0x37ab7f(0x13b)]();if(!_0xc93f59)throw CliErrors[_0x37ab7f(0x136)](_0x37ab7f(0x123),_0x37ab7f(0x139)+CLI_BIN_NAME+_0x37ab7f(0x124));if(_0xc93f59===_0x37ab7f(0x137))throw CliErrors['validation'](_0x37ab7f(0x12d));if(!isTopLevelConfigKey(_0xc93f59)&&!EXTRA_DELETABLE_KEYS[_0x37ab7f(0x140)](_0xc93f59)&&!LEGACY_DELETABLE_KEYS[_0x37ab7f(0x140)](_0xc93f59))throw CliErrors[_0x37ab7f(0x136)](_0x37ab7f(0x12e)+_0xc93f59+_0x37ab7f(0x129),_0x37ab7f(0x131));const _0x38a322=resolveWriteScope({'global':_0x50dd55['bool'](_0x37ab7f(0x120))}),_0x352779=readScopedConfig(_0x38a322),_0x37c4ab=Object[_0x37ab7f(0x12c)][_0x37ab7f(0x128)][_0x37ab7f(0x12a)](_0x352779,_0xc93f59);_0x37c4ab&&(delete _0x352779[_0xc93f59],writeScopedConfig(_0x352779,_0x38a322));const _0x5b92b8=_0x38a322===_0x37ab7f(0x120)?_0x37ab7f(0x12b):_0x37ab7f(0x13c);return{'ok':!![],'message':_0x37c4ab?'✓\x20'+_0x5b92b8+'\x20'+_0xc93f59+'\x20deleted':'✓\x20'+_0x5b92b8+'\x20'+_0xc93f59+_0x37ab7f(0x13f),'data':{'key':_0xc93f59,'scope':_0x38a322,'changed':_0x37c4ab}};}export const configDeleteDefinition={'service':'config','command':'delete','description':a58_0x367d26(0x126),'risk':a58_0x367d26(0x130),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':'key','description':a58_0x367d26(0x13a),'required':!![]}],'flags':[{'name':a58_0x367d26(0x120),'type':a58_0x367d26(0x12f),'description':a58_0x367d26(0x132),'default':![]}],'execute':execute};
|