@lovrabet/rabetbase-cli 2.5.3-beta.2 → 2.5.3-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.d.ts +22 -0
- package/lib/api/api-group.js +1 -0
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.d.ts +18 -2
- 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.d.ts +11 -0
- package/lib/api/legacy-api-file.js +1 -0
- package/lib/api/model-registry-file.d.ts +36 -0
- package/lib/api/model-registry-file.js +1 -0
- package/lib/api/model-registry-scaffold.d.ts +7 -0
- package/lib/api/model-registry-scaffold.js +1 -0
- package/lib/api/model-source.d.ts +6 -0
- package/lib/api/model-source.js +1 -0
- 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/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.d.ts +7 -0
- 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.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-create.js +1 -0
- package/lib/commands/dataset/cross-relation-delete.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-delete.js +1 -0
- package/lib/commands/dataset/cross-relation-list.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-list.js +1 -0
- package/lib/commands/dataset/cross-relation-shared.d.ts +190 -0
- package/lib/commands/dataset/cross-relation-shared.js +1 -0
- package/lib/commands/dataset/cross-relation-update.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-update.js +1 -0
- 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.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/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.d.ts +28 -0
- package/lib/commands/project/api-architecture-upgrade.js +1 -0
- 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.d.ts +30 -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/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.d.ts +2 -0
- 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.d.ts +2 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.d.ts +13 -17
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +6 -0
- 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.d.ts +41 -0
- package/lib/core/cross-db-relation.js +1 -0
- 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.d.ts +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.d.ts +0 -10
- 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/types/index.d.ts +11 -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.d.ts +12 -0
- 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 +4 -1
- package/skills/rabetbase/SKILL.md +10 -6
- package/skills/rabetbase/guides/sdk-client-generation.md +112 -61
- package/skills/rabetbase/guides/typescript-sdk.md +9 -0
- package/skills/rabetbase/references/rabetbase-api-pull.md +30 -19
- package/skills/rabetbase/references/rabetbase-app-list.md +1 -1
- package/skills/rabetbase/references/rabetbase-config.md +2 -1
- package/skills/rabetbase/references/rabetbase-dataset-cross-relations.md +60 -0
- package/skills/rabetbase/references/rabetbase-project-create.md +3 -3
- package/skills/rabetbase/references/rabetbase-project-upgrade.md +24 -13
- package/skills/rabetbase.manifest.json +4 -3
- package/templates/README.md +16 -4
- package/templates/generate-api/model-runtime.ts.tpl +101 -0
- package/templates/generate-api/profile-api.ts.tpl +21 -0
- package/templates/generate-api/profile-client.ts.tpl +14 -0
package/lib/commands/bff/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a38_0x391df8=a38_0x4a08;(function(_0x22d0da,_0x54c554){const _0x4550dd=a38_0x4a08,_0x65cb4f=_0x22d0da();while(!![]){try{const _0x36099e=parseInt(_0x4550dd(0xab))/0x1+parseInt(_0x4550dd(0xbe))/0x2*(parseInt(_0x4550dd(0xb0))/0x3)+parseInt(_0x4550dd(0xc2))/0x4*(parseInt(_0x4550dd(0xa6))/0x5)+parseInt(_0x4550dd(0x8d))/0x6+parseInt(_0x4550dd(0xda))/0x7*(-parseInt(_0x4550dd(0xca))/0x8)+-parseInt(_0x4550dd(0x73))/0x9*(parseInt(_0x4550dd(0x75))/0xa)+parseInt(_0x4550dd(0xb2))/0xb*(-parseInt(_0x4550dd(0xa7))/0xc);if(_0x36099e===_0x54c554)break;else _0x65cb4f['push'](_0x65cb4f['shift']());}catch(_0x1af402){_0x65cb4f['push'](_0x65cb4f['shift']());}}}(a38_0x4ef9,0x8d97a));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{resolveApiFilePath}from'../../context.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';function a38_0x4ef9(){const _0x18b57c=['Local\x20function\x20not\x20found:\x20','functions','toISOString','flatMap','runtime\x20cache\x20not\x20needed','117ivvmax','\x20skipped','766430LenQDN','script','str','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','requires','validation',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','string','Force\x20push\x20ignoring\x20hash\x20protection','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.','afterScriptId','operationType','runtime\x20cache\x20cleared','apps','write','join','has','attempted','datasetCode','BFF_REMOTE_VERSION_CHANGED','functionNode','Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.','delete','appCode','2136192voIgBo','before','bff','size','apiDir','name','push','type','/api/management/library/scripts/save','lockFilePath','startsWith','HOOK','Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','runtime\x20cache\x20clear\x20failed','every','Push\x20only\x20this\x20script\x20type','ENDPOINT','BFF_REMOTE_VERSION_MISSING','failed','some','bool','beforeScriptId','conflict','remoteId','85ourvEv','9892752voMlLl','version','lockKey','utf8','891496ENMDFr','dataset','alias','Push\x20complete:\x20','\x20conflict','6bPaoQR','scriptsRoot','11LGBWMI','require','\x20failed','HOOK_DATASET_NOT_FOUND:','warnings','scriptType','hash','get','COMMON','values','POST','datasetId','576454iUapdH','cleared','\x20--format\x20compress','filter','219892LiSKAK','description','length','\x22\x20not\x20found\x20after\x20ensureLockScope.','Runtime\x20script\x20cache\x20cleared.','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','message','update','2862448MDZAJh','test','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','set','existingHooks','No\x20local\x20Backend\x20Function\x20scripts\x20found.','stringify','would_push','force','map','Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20','resolutions','filePath','failures','parse','status','7daAcAu','create','functionName'];a38_0x4ef9=function(){return _0x18b57c;};return a38_0x4ef9();}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':a38_0x391df8(0x8f),'command':a38_0x391df8(0x93),'description':a38_0x391df8(0x78),'risk':a38_0x391df8(0x83),'structuredErrors':!![],'flags':[{'name':a38_0x391df8(0x94),'type':a38_0x391df8(0x7c),'description':a38_0x391df8(0x9d),'enum':[a38_0x391df8(0xba),a38_0x391df8(0x9e),a38_0x391df8(0x98)]},{'name':a38_0x391df8(0x92),'type':a38_0x391df8(0x7c),'description':a38_0x391df8(0x9a)},{'name':a38_0x391df8(0xd2),'type':'boolean','description':a38_0x391df8(0x7d)}],async 'dryRun'(_0x387d59){const _0x3be4f8=a38_0x391df8,_0x1507bb=loadBffProjectConfig(_0x387d59[_0x3be4f8(0x8c)]),_0x24e3ff=await readBffLockFile(_0x1507bb[_0x3be4f8(0x96)]),{appLock:_0x1cec24}=ensureLockScope(_0x24e3ff??createEmptyBffLock(),_0x387d59[_0x3be4f8(0x8c)],_0x1507bb[_0x3be4f8(0xb1)],'push'),_0x45f75d=await getTargetFunctions(_0x1507bb,_0x387d59),_0x3ade05=_0x45f75d[_0x3be4f8(0xa1)](_0x4886c9=>_0x4886c9[_0x3be4f8(0x94)]===_0x3be4f8(0x98))?await scanLocalBffFunctions(_0x1507bb,'HOOK'):_0x45f75d,_0x28464e=await buildHookMaps(_0x387d59[_0x3be4f8(0x8c)],_0x387d59['apiDir'],_0x3ade05,_0x1cec24),_0x154941=_0x387d59['bool']('force'),_0x34bd6c=[];for(const _0x4eba69 of _0x45f75d){const _0x42c717=await computeFileHash(_0x4eba69['filePath']),_0x498942=_0x1cec24[_0x3be4f8(0xde)][_0x4eba69['lockKey']],_0x3f7a7e=!!_0x498942&&_0x498942[_0x3be4f8(0xb8)]===_0x42c717,_0x12cae5=_0x28464e[_0x3be4f8(0xd5)][_0x3be4f8(0xb9)](_0x4eba69[_0x3be4f8(0xa9)]),_0x541674=!!_0x498942?.[_0x3be4f8(0xa5)]&&_0x498942['version']==null&&(_0x154941||!_0x3f7a7e),_0x1f5aa2=_0x541674?missingRemoteVersionConflict(_0x4eba69,_0x498942):undefined,_0x3340cc=_0x28464e[_0x3be4f8(0xd7)][_0x3be4f8(0x85)](_0x4eba69[_0x3be4f8(0xa9)])?_0x3be4f8(0xa0):!_0x154941&&_0x3f7a7e?'unchanged':_0x1f5aa2?_0x3be4f8(0xa4):'would_push';_0x34bd6c[_0x3be4f8(0x93)]({'lockKey':_0x4eba69[_0x3be4f8(0xa9)],'filePath':_0x4eba69['filePath'],'remoteId':_0x498942?.[_0x3be4f8(0xa5)]??null,'mode':_0x498942?.[_0x3be4f8(0xa5)]?_0x3be4f8(0xc9):_0x3be4f8(0xdb),'status':_0x3340cc,..._0x28464e[_0x3be4f8(0xd7)][_0x3be4f8(0x85)](_0x4eba69[_0x3be4f8(0xa9)])?{'error':_0x28464e[_0x3be4f8(0xd7)][_0x3be4f8(0xb9)](_0x4eba69[_0x3be4f8(0xa9)])}:{},..._0x1f5aa2?{'conflict':_0x1f5aa2}:{},..._0x28464e[_0x3be4f8(0xce)]['has'](_0x4eba69[_0x3be4f8(0xa9)])?{'datasetCode':_0x498942?.['datasetCode'],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x4eba69[_0x3be4f8(0xa9)])]}:{},..._0x12cae5?{'alias':_0x12cae5[_0x3be4f8(0xad)]??null,'datasetCode':_0x12cae5[_0x3be4f8(0x87)],'operationType':_0x4eba69[_0x3be4f8(0x80)],'functionNode':_0x4eba69[_0x3be4f8(0x89)],'warnings':_0x12cae5[_0x3be4f8(0xb6)]}:{}});}return{'method':_0x3be4f8(0xbc),'url':_0x3be4f8(0x95),'body':{'appCode':_0x387d59[_0x3be4f8(0x8c)],'force':_0x154941,'files':_0x34bd6c,'cacheClearAtRuntime':_0x34bd6c[_0x3be4f8(0xa1)](_0xb97ffb=>_0xb97ffb[_0x3be4f8(0xd9)]===_0x3be4f8(0xd1)),'cacheClearAtRuntimeTimes':_0x34bd6c['some'](_0x55c59e=>_0x55c59e['status']===_0x3be4f8(0xd1))?CACHE_CLEAR_ATTEMPTS:0x0},'description':'Would\x20inspect\x20'+_0x34bd6c[_0x3be4f8(0xc4)]+_0x3be4f8(0xc7)};},async 'execute'(_0x1309d3){const _0x3ea39f=a38_0x391df8,_0x16b532=loadBffProjectConfig(_0x1309d3[_0x3ea39f(0x8c)]),_0x387f34=await readBffLockFile(_0x16b532[_0x3ea39f(0x96)]),{lockData:_0x57e95c,appLock:_0x561115}=ensureLockScope(_0x387f34??createEmptyBffLock(),_0x1309d3['appCode'],_0x16b532[_0x3ea39f(0xb1)],_0x3ea39f(0x93)),_0x5c3fad=await getTargetFunctions(_0x16b532,_0x1309d3);if(_0x5c3fad[_0x3ea39f(0xc4)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':_0x3ea39f(0xcf)};const _0x38f18c=_0x1309d3[_0x3ea39f(0xa2)](_0x3ea39f(0xd2)),_0xa700bf=JSON[_0x3ea39f(0xd8)](JSON[_0x3ea39f(0xd0)](_0x57e95c)),_0x53d80d=_0xa700bf['apps'][_0x1309d3[_0x3ea39f(0x8c)]];if(!_0x53d80d)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x1309d3[_0x3ea39f(0x8c)]+_0x3ea39f(0xc5));const _0x3631a7=_0x5c3fad[_0x3ea39f(0xa1)](_0x5757de=>_0x5757de[_0x3ea39f(0x94)]===_0x3ea39f(0x98))?await scanLocalBffFunctions(_0x16b532,'HOOK'):_0x5c3fad,_0x5b47d0=await buildHookMaps(_0x1309d3['appCode'],_0x1309d3[_0x3ea39f(0x91)],_0x3631a7,_0x53d80d),_0x5ec21c=[],_0x451190=[],_0x2065f3=[],_0x3fcc2b=[];for(const _0x69316 of _0x5c3fad){const _0x2ae4d5=_0x5b47d0[_0x3ea39f(0xd7)][_0x3ea39f(0xb9)](_0x69316[_0x3ea39f(0xa9)]);if(_0x2ae4d5){_0x3fcc2b[_0x3ea39f(0x93)]({'lockKey':_0x69316['lockKey'],'error':_0x2ae4d5});continue;}const _0x347cce=await computeFileHash(_0x69316['filePath']),_0x2d519d=_0x53d80d[_0x3ea39f(0xde)][_0x69316['lockKey']];if(!_0x38f18c&&_0x2d519d&&_0x2d519d[_0x3ea39f(0xb8)]===_0x347cce){_0x451190['push']({'lockKey':_0x69316[_0x3ea39f(0xa9)],'reason':'unchanged'});continue;}if(_0x2d519d?.['remoteId']&&_0x2d519d['version']==null){_0x2065f3[_0x3ea39f(0x93)](missingRemoteVersionConflict(_0x69316,_0x2d519d));continue;}try{await uploadSingleFunction(_0x1309d3[_0x3ea39f(0x8c)],_0x69316,_0x53d80d,_0x5b47d0);const _0x33906d=_0x53d80d[_0x3ea39f(0xde)][_0x69316['lockKey']];_0x5ec21c[_0x3ea39f(0x93)]({'lockKey':_0x69316[_0x3ea39f(0xa9)],'remoteId':_0x33906d?.[_0x3ea39f(0xa5)]??0x0});}catch(_0x2a59e1){const _0x25b551=remoteVersionChangedConflict(_0x69316,_0x2d519d,_0x2a59e1);if(_0x25b551){_0x2065f3[_0x3ea39f(0x93)](_0x25b551);continue;}_0x3fcc2b['push']({'lockKey':_0x69316[_0x3ea39f(0xa9)],'error':_0x2a59e1 instanceof Error?_0x2a59e1[_0x3ea39f(0xc8)]:String(_0x2a59e1)});}}_0x53d80d['lastSync']=new Date()[_0x3ea39f(0x70)](),await writeBffLockFile(_0x16b532['lockFilePath'],_0xa700bf),await waitForUploadedLockEntries(_0x16b532['lockFilePath'],_0x1309d3[_0x3ea39f(0x8c)],_0x5ec21c[_0x3ea39f(0xd3)](_0x45d214=>_0x45d214[_0x3ea39f(0xa9)]));let _0x141eb9={'attempted':![],'cleared':![]};if(_0x5ec21c[_0x3ea39f(0xc4)]>0x0)try{let _0x2da719='';for(let _0x3b97cc=0x0;_0x3b97cc<CACHE_CLEAR_ATTEMPTS;_0x3b97cc+=0x1){_0x2da719=await clearBffScriptCache(),_0x3b97cc<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x141eb9={'attempted':!![],'cleared':!![],'message':_0x2da719||_0x3ea39f(0xc6)};}catch(_0x2f43b2){_0x141eb9={'attempted':!![],'cleared':![],'error':_0x2f43b2 instanceof Error?_0x2f43b2[_0x3ea39f(0xc8)]:String(_0x2f43b2)};}const _0x36a592=_0x3fcc2b['length']===0x0&&(_0x141eb9[_0x3ea39f(0x86)]?_0x141eb9[_0x3ea39f(0xbf)]:!![]),_0x484a8b=_0x36a592,_0x4f63e2=_0x141eb9['attempted']?_0x141eb9['cleared']?_0x3ea39f(0x81):_0x3ea39f(0x9b):_0x3ea39f(0x72);return{'ok':_0x484a8b,'data':{'uploaded':_0x5ec21c,'skipped':_0x451190,'conflicts':_0x2065f3,'failed':_0x3fcc2b,'cacheClear':_0x141eb9,'warnings':[...[..._0x5b47d0[_0x3ea39f(0xd5)][_0x3ea39f(0xbb)]()][_0x3ea39f(0x71)](_0x1524ab=>_0x1524ab[_0x3ea39f(0xb6)]),...[..._0x5b47d0[_0x3ea39f(0xce)]][_0x3ea39f(0xd3)](existingHookWarning)]},'message':formatPushMessage(_0x5ec21c['length'],_0x451190['length'],_0x2065f3[_0x3ea39f(0xc4)],_0x3fcc2b[_0x3ea39f(0xc4)],_0x4f63e2)};}};function missingRemoteVersionConflict(_0x1718ac,_0x18f2a7){const _0x3d04c1=a38_0x391df8;return remoteVersionConflict(_0x1718ac,_0x18f2a7,_0x3d04c1(0x9f),_0x3d04c1(0xcc));}function remoteVersionChangedConflict(_0x3069b7,_0x14dbca,_0x4c08de){const _0x159fe8=a38_0x391df8;if(!_0x14dbca?.[_0x159fe8(0xa5)]||_0x14dbca[_0x159fe8(0xa8)]==null||!isRemoteVersionConflict(_0x4c08de))return undefined;return remoteVersionConflict(_0x3069b7,_0x14dbca,_0x159fe8(0x88),'Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.');}function remoteVersionConflict(_0x39b11b,_0x1dbe18,_0x1cf75a,_0x2445a2){const _0x3acdb0=a38_0x391df8;return{'code':_0x1cf75a,'lockKey':_0x39b11b[_0x3acdb0(0xa9)],'filePath':_0x39b11b[_0x3acdb0(0xd6)],'remoteId':_0x1dbe18['remoteId'],..._0x1dbe18[_0x3acdb0(0xa8)]!=null?{'expectedVersion':_0x1dbe18['version']}:{},'message':_0x2445a2,'nextAction':{'action':'review_remote_and_merge','command':CLI_BIN_NAME+'\x20bff\x20detail\x20--id\x20'+_0x1dbe18[_0x3acdb0(0xa5)]+_0x3acdb0(0xc0),'requiresReview':!![],'message':_0x3acdb0(0x7e)}};}function isRemoteVersionConflict(_0x38dd39){const _0x166f56=a38_0x391df8,_0xcfc6c5=_0x38dd39 instanceof Error?_0x38dd39[_0x166f56(0xc8)]:String(_0x38dd39),_0x47faa3=getPlatformErrorCode(_0x38dd39)??'';return[_0xcfc6c5,_0x47faa3]['some'](_0x22df07=>/(?: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[_0x166f56(0xcb)](_0x22df07));}function a38_0x4a08(_0x252b35,_0x3b8e96){_0x252b35=_0x252b35-0x70;const _0x4ef9b1=a38_0x4ef9();let _0x4a0804=_0x4ef9b1[_0x252b35];return _0x4a0804;}function formatPushMessage(_0x252e95,_0x446291,_0x262129,_0x21a451,_0x27ab6d){const _0x512bfd=a38_0x391df8,_0x1c8e52=[_0x512bfd(0xae)+_0x252e95+'\x20uploaded',_0x446291+_0x512bfd(0x74)];_0x262129>0x0&&_0x1c8e52[_0x512bfd(0x93)](_0x262129+_0x512bfd(0xaf)+(_0x262129===0x1?'':'s')+'\x20'+(_0x262129===0x1?_0x512bfd(0x79):_0x512bfd(0xb3))+'\x20resolution');if(_0x21a451>0x0)_0x1c8e52[_0x512bfd(0x93)](_0x21a451+_0x512bfd(0xb4));return _0x1c8e52[_0x512bfd(0x93)](_0x27ab6d),_0x1c8e52[_0x512bfd(0x84)](',\x20');}async function getTargetFunctions(_0x184dde,_0x178244){const _0x32c976=a38_0x391df8,_0x28da77=_0x178244[_0x32c976(0x77)](_0x32c976(0x94)),_0x2bc9e1=_0x178244[_0x32c976(0x77)](_0x32c976(0x92)),_0x528987=normalizeBffType(_0x28da77)??undefined;if(_0x2bc9e1&&!_0x528987)throw CliErrors[_0x32c976(0x7a)]('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x4d1498=await scanLocalBffFunctions(_0x184dde,_0x528987);if(_0x2bc9e1){const _0x343f57=_0x4d1498[_0x32c976(0xc1)](_0x4e97f2=>_0x4e97f2[_0x32c976(0x92)]===_0x2bc9e1);if(_0x343f57[_0x32c976(0xc4)]===0x0)throw CliErrors['validation'](_0x32c976(0xdd)+_0x528987+'/'+_0x2bc9e1);return _0x343f57;}return _0x4d1498;}function existingHookWarning(_0xeb4781){const _0xec1948=a38_0x391df8;return{'code':'EXISTING_HOOK_BINDING_PRESERVED','lockKey':_0xeb4781,'message':_0xec1948(0x8a)};}async function buildHookMaps(_0x263cc3,_0x11663c,_0x532461,_0xa09f01){const _0x28a0e0=a38_0x391df8,_0x40e7af=_0x532461['some'](_0x96aaf=>_0x96aaf[_0x28a0e0(0x94)]===_0x28a0e0(0x98));if(!_0x40e7af)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0x10ccfe=loadAliasMap(_0x11663c,undefined,resolveApiFilePath(_0x11663c,_0x263cc3));assertUnambiguousHookAliases(_0x10ccfe);const _0x2329a2=[..._0x10ccfe['map'](_0x1b352e=>[_0x1b352e[_0x28a0e0(0xad)],_0x1b352e[_0x28a0e0(0x87)]]),...trackedHookDirectoryMappings(_0xa09f01)['map'](_0x481ea9=>[_0x481ea9['alias'],_0x481ea9[_0x28a0e0(0x87)]])],_0x3b9ab4=await listDatasets(_0x263cc3);assertUnambiguousHookDirectoryMappings(_0x2329a2['map'](([_0x10b308,_0x13c36b])=>({'alias':_0x10b308,'datasetCode':_0x13c36b})));const _0x6633fc=buildHookDirectoryIndexes(_0x3b9ab4,_0x2329a2),_0x4073dd=new Map(),_0x3aca43=preflightPushHookDirectories(_0x532461,_0xa09f01,_0x6633fc,_0x4073dd),_0x21f7aa=new Set(),_0x23a9e8=_0x532461[_0x28a0e0(0xc1)](_0x275450=>_0x4073dd[_0x28a0e0(0xb9)](_0x275450['lockKey'])?.[_0x28a0e0(0x97)](_0x28a0e0(0xb5))&&_0xa09f01[_0x28a0e0(0xde)][_0x275450['lockKey']]?.[_0x28a0e0(0xa5)]&&_0xa09f01[_0x28a0e0(0xde)][_0x275450[_0x28a0e0(0xa9)]]?.[_0x28a0e0(0x87)]);if(_0x23a9e8[_0x28a0e0(0xc4)]>0x0){let _0x2937c1;try{_0x2937c1=await getBffScriptStatistics(_0x263cc3);}catch(_0x634a95){for(const _0x571e00 of _0x23a9e8)_0x4073dd[_0x28a0e0(0xcd)](_0x571e00[_0x28a0e0(0xa9)],_0x28a0e0(0xd4)+(_0x634a95 instanceof Error?_0x634a95[_0x28a0e0(0xc8)]:String(_0x634a95)));return{'resolutions':_0x3aca43,'failures':_0x4073dd,'existingHooks':_0x21f7aa};}for(const _0x3807ff of _0x23a9e8){const _0x8b0854=_0xa09f01['functions'][_0x3807ff[_0x28a0e0(0xa9)]];try{const _0x1fcaa4=new Set(_0x532461['filter'](_0x2ae0b6=>_0x2ae0b6[_0x28a0e0(0x94)]==='HOOK'&&_0xa09f01[_0x28a0e0(0xde)][_0x2ae0b6[_0x28a0e0(0xa9)]]?.['datasetCode']===_0x8b0854[_0x28a0e0(0x87)])[_0x28a0e0(0xd3)](_0x48f940=>_0x48f940[_0x28a0e0(0xad)]));if(_0x1fcaa4[_0x28a0e0(0x90)]>0x1)throw CliErrors[_0x28a0e0(0x7a)](_0x28a0e0(0x99));const _0x3a6da9=_0x2937c1[_0x28a0e0(0x71)](_0x45d75d=>[{'datasetCode':_0x45d75d[_0x28a0e0(0x87)],'operationType':snakeToCamel(_0x45d75d[_0x28a0e0(0x80)]),'functionNode':_0x28a0e0(0x8e),'id':_0x45d75d[_0x28a0e0(0xa3)]},{'datasetCode':_0x45d75d[_0x28a0e0(0x87)],'operationType':snakeToCamel(_0x45d75d['operationType']),'functionNode':'after','id':_0x45d75d[_0x28a0e0(0x7f)]}])[_0x28a0e0(0xc1)](_0x47651c=>_0x47651c['id']===_0x8b0854[_0x28a0e0(0xa5)]),_0x57e1e3=await getBffScriptInfo(_0x8b0854[_0x28a0e0(0xa5)]);if(_0x57e1e3['id']!==_0x8b0854['remoteId']||_0x57e1e3[_0x28a0e0(0x8c)]!==_0x263cc3||_0x57e1e3[_0x28a0e0(0xb7)]!==_0x28a0e0(0x98)||_0x57e1e3[_0x28a0e0(0xdc)]!==_0x3807ff[_0x28a0e0(0x92)]||_0x8b0854['version']==null||_0x57e1e3['version']!==_0x8b0854['version']||_0x3a6da9[_0x28a0e0(0xc4)]!==0x1||_0x3a6da9[0x0][_0x28a0e0(0x87)]!==_0x8b0854[_0x28a0e0(0x87)]||_0x3a6da9[0x0][_0x28a0e0(0x80)]!==_0x3807ff[_0x28a0e0(0x80)]||_0x3a6da9[0x0][_0x28a0e0(0x89)]!==_0x3807ff[_0x28a0e0(0x89)]||_0x8b0854['operationType']!==_0x3807ff[_0x28a0e0(0x80)]||_0x8b0854[_0x28a0e0(0x89)]!==_0x3807ff[_0x28a0e0(0x89)])throw CliErrors[_0x28a0e0(0x7a)]('Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.');_0x21f7aa['add'](_0x3807ff[_0x28a0e0(0xa9)]),_0x4073dd[_0x28a0e0(0x8b)](_0x3807ff[_0x28a0e0(0xa9)]);}catch(_0x797f15){_0x4073dd[_0x28a0e0(0xcd)](_0x3807ff[_0x28a0e0(0xa9)],_0x797f15 instanceof Error?_0x797f15[_0x28a0e0(0xc8)]:String(_0x797f15));}}}return{'resolutions':_0x3aca43,'failures':_0x4073dd,'existingHooks':_0x21f7aa};}async function uploadSingleFunction(_0x147fc3,_0x3e6536,_0x157722,_0x2497c9){const _0x2c1f6a=a38_0x391df8,_0x43f884=await readFile(_0x3e6536[_0x2c1f6a(0xd6)],_0x2c1f6a(0xaa)),_0x2720f9=await computeFileHash(_0x3e6536[_0x2c1f6a(0xd6)]),_0x43ecf4=_0x157722[_0x2c1f6a(0xde)][_0x3e6536[_0x2c1f6a(0xa9)]];if(_0x43ecf4?.['remoteId']&&_0x43ecf4[_0x2c1f6a(0xa8)]==null)throw CliErrors[_0x2c1f6a(0x7a)](_0x3e6536[_0x2c1f6a(0xa9)]+_0x2c1f6a(0x7b));let _0x3e02e9=extractScriptDescription(_0x43f884);if(!_0x3e02e9&&_0x43ecf4?.[_0x2c1f6a(0xa5)]){const _0x5aa462=await getBffScriptInfo(_0x43ecf4[_0x2c1f6a(0xa5)]);_0x3e02e9=_0x5aa462[_0x2c1f6a(0xc3)]||undefined;}const _0x28f942={'appCode':_0x147fc3,'functionName':_0x3e6536[_0x2c1f6a(0x92)],'scriptType':_0x3e6536[_0x2c1f6a(0x94)],'scriptContent':_0x43f884};if(_0x43ecf4?.[_0x2c1f6a(0xa5)])_0x28f942['id']=_0x43ecf4[_0x2c1f6a(0xa5)];if(_0x43ecf4?.[_0x2c1f6a(0xa8)]!=null)_0x28f942['version']=_0x43ecf4[_0x2c1f6a(0xa8)];if(_0x3e02e9)_0x28f942[_0x2c1f6a(0xc3)]=_0x3e02e9;if(_0x3e6536['type']===_0x2c1f6a(0x98)){const _0x4b2e02=_0x2497c9[_0x2c1f6a(0xd5)][_0x2c1f6a(0xb9)](_0x3e6536[_0x2c1f6a(0xa9)]);if(!_0x4b2e02&&!_0x2497c9['existingHooks'][_0x2c1f6a(0x85)](_0x3e6536['lockKey'])||!_0x3e6536[_0x2c1f6a(0x80)]||!_0x3e6536[_0x2c1f6a(0x89)])throw CliErrors[_0x2c1f6a(0x7a)]('Incomplete\x20HOOK\x20path:\x20'+_0x3e6536[_0x2c1f6a(0xa9)]);_0x4b2e02&&(_0x28f942[_0x2c1f6a(0xbd)]=_0x4b2e02[_0x2c1f6a(0xac)]['id'],_0x28f942[_0x2c1f6a(0x80)]=_0x3e6536['operationType']),_0x28f942['functionNode']=_0x3e6536[_0x2c1f6a(0x89)];}const _0x52c682=await saveBffScript(_0x28f942),_0x5a964a=_0x52c682['id'],_0x37e130=_0x52c682[_0x2c1f6a(0x76)]??await getBffScriptInfo(_0x5a964a),_0x5aa78f={'hash':_0x2720f9,'remoteId':_0x5a964a,'version':_0x37e130['version']};if(_0x3e6536['type']===_0x2c1f6a(0x98)){const _0x1c992a=_0x2497c9['resolutions'][_0x2c1f6a(0xb9)](_0x3e6536['lockKey']);if(!_0x1c992a){_0x157722[_0x2c1f6a(0xde)][_0x3e6536['lockKey']]={..._0x43ecf4,..._0x5aa78f};return;}_0x5aa78f[_0x2c1f6a(0xad)]=_0x1c992a[_0x2c1f6a(0xad)]??_0x43ecf4?.['alias'],_0x5aa78f[_0x2c1f6a(0x87)]=_0x1c992a['datasetCode'],_0x5aa78f[_0x2c1f6a(0x80)]=_0x3e6536[_0x2c1f6a(0x80)],_0x5aa78f['functionNode']=_0x3e6536[_0x2c1f6a(0x89)];}_0x157722[_0x2c1f6a(0xde)][_0x3e6536[_0x2c1f6a(0xa9)]]=_0x5aa78f;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x3c3ec6,_0x57dd67,_0x4f1bca){const _0x509ff4=a38_0x391df8;if(_0x4f1bca[_0x509ff4(0xc4)]===0x0)return;for(let _0x321dfe=0x0;_0x321dfe<LOCK_SETTLE_RETRY_COUNT;_0x321dfe+=0x1){const _0x4c66b8=await readBffLockFile(_0x3c3ec6),_0x2a55c5=_0x4c66b8?.[_0x509ff4(0x82)]?.[_0x57dd67]?.['functions']??{},_0x3d45ea=_0x4f1bca[_0x509ff4(0x9c)](_0x2051b3=>!!_0x2a55c5[_0x2051b3]?.[_0x509ff4(0xa5)]);if(_0x3d45ea)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0x4f1bca[_0x509ff4(0x84)](',\x20')+'.');}
|
|
1
|
+
const a43_0x3b97bc=a43_0x71b6;function a43_0x33aa(){const _0x34c047=['filePath','update',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','\x20bff\x20detail\x20--id\x20','review_remote_and_merge','string','apps','message','size','HOOK','currentApp','operationType','Would\x20inspect\x20','mergedCli','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','POST','appCode','runtime\x20cache\x20cleared','set','EXISTING_HOOK_BINDING_PRESERVED','cleared','1000629EyYqzE','156uzHINy','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','3918DWvIzP','531771vBuheK','script','runtime\x20cache\x20clear\x20failed','push','33620LjCGBA','attempted','hash','delete','apiDir','\x20resolution','conflict','164240zjNbFE','Lock\x20scope\x20for\x20app\x20\x22','remoteId','scriptsRoot','dataset','stringify','8ZeGdOP','before','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.','status','some','map','\x20uploaded','length','No\x20local\x20Backend\x20Function\x20scripts\x20found.','\x20--format\x20compress','get','ENDPOINT','alias','Force\x20push\x20ignoring\x20hash\x20protection','HOOK_DATASET_NOT_FOUND:','resolutions','warnings','functions','9177JwJoWE','existingHooks','1255310KjivOM','Local\x20function\x20not\x20found:\x20','str','BFF_REMOTE_VERSION_CHANGED','force','lockKey','type','validation','failures','flatMap','every','Push\x20only\x20this\x20script\x20type','profileName','lockFilePath','failed','functionName','lastSync','\x20conflict','scriptType','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','unchanged','Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.','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.','1158IEPgjc','has','join','boolean','create','filter','description','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','version','name','startsWith','functionNode','Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.','require','selectedAppName','BFF_REMOTE_VERSION_MISSING','COMMON','datasetCode','Push\x20complete:\x20','Incomplete\x20HOOK\x20path:\x20','datasetId','afterScriptId','bool','defaultApp','would_push','Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20'];a43_0x33aa=function(){return _0x34c047;};return a43_0x33aa();}(function(_0x45d8dc,_0x3d2d2b){const _0x306357=a43_0x71b6,_0x2bc9df=_0x45d8dc();while(!![]){try{const _0x12f096=parseInt(_0x306357(0xe4))/0x1*(parseInt(_0x306357(0xe6))/0x2)+-parseInt(_0x306357(0xe7))/0x3*(-parseInt(_0x306357(0xf8))/0x4)+-parseInt(_0x306357(0xeb))/0x5+parseInt(_0x306357(0xb4))/0x6*(-parseInt(_0x306357(0x10b))/0x7)+parseInt(_0x306357(0xf2))/0x8+-parseInt(_0x306357(0xe3))/0x9+-parseInt(_0x306357(0x10d))/0xa;if(_0x12f096===_0x3d2d2b)break;else _0x2bc9df['push'](_0x2bc9df['shift']());}catch(_0x163ccb){_0x2bc9df['push'](_0x2bc9df['shift']());}}}(a43_0x33aa,0x2cf7d));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';function a43_0x71b6(_0x3886ac,_0x1a4ddd){_0x3886ac=_0x3886ac-0xb3;const _0x33aa13=a43_0x33aa();let _0x71b6d6=_0x33aa13[_0x3886ac];return _0x71b6d6;}import{CliErrors}from'../../errors.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':'bff','command':a43_0x3b97bc(0xea),'description':'Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','risk':'write','structuredErrors':!![],'flags':[{'name':a43_0x3b97bc(0x113),'type':'string','description':a43_0x3b97bc(0x118),'enum':[a43_0x3b97bc(0xc4),a43_0x3b97bc(0x104),a43_0x3b97bc(0xd7)]},{'name':'name','type':a43_0x3b97bc(0xd3),'description':a43_0x3b97bc(0xe5)},{'name':'force','type':a43_0x3b97bc(0xb7),'description':a43_0x3b97bc(0x106)}],async 'dryRun'(_0x4d58a6){const _0x50ce96=a43_0x3b97bc,_0x3d7b43=loadBffProjectConfig(_0x4d58a6['appCode']),_0x2e213c=await readBffLockFile(_0x3d7b43['lockFilePath']),{appLock:_0x444cd5}=ensureLockScope(_0x2e213c??createEmptyBffLock(),_0x4d58a6[_0x50ce96(0xde)],_0x3d7b43['scriptsRoot'],_0x50ce96(0xea)),_0x226dcf=await getTargetFunctions(_0x3d7b43,_0x4d58a6),_0x49d98e=_0x226dcf[_0x50ce96(0xfd)](_0x1eacda=>_0x1eacda['type']===_0x50ce96(0xd7))?await scanLocalBffFunctions(_0x3d7b43,_0x50ce96(0xd7)):_0x226dcf,_0x2dd27f=await buildHookMaps(_0x4d58a6[_0x50ce96(0xde)],_0x4d58a6[_0x50ce96(0xef)],_0x49d98e,_0x444cd5,_0x4d58a6['selectedAppName']||_0x4d58a6[_0x50ce96(0xdb)]?.[_0x50ce96(0xd8)]||_0x4d58a6[_0x50ce96(0xdb)]?.['defaultApp']),_0x3cf14b=_0x4d58a6[_0x50ce96(0xca)]('force'),_0x20a7c7=[];for(const _0x62787e of _0x226dcf){const _0x58b226=await computeFileHash(_0x62787e[_0x50ce96(0xce)]),_0x526afb=_0x444cd5[_0x50ce96(0x10a)][_0x62787e['lockKey']],_0x534323=!!_0x526afb&&_0x526afb[_0x50ce96(0xed)]===_0x58b226,_0x1c7397=_0x2dd27f[_0x50ce96(0x108)][_0x50ce96(0x103)](_0x62787e[_0x50ce96(0x112)]),_0x1b7159=!!_0x526afb?.[_0x50ce96(0xf4)]&&_0x526afb[_0x50ce96(0xbc)]==null&&(_0x3cf14b||!_0x534323),_0x2abb96=_0x1b7159?missingRemoteVersionConflict(_0x62787e,_0x526afb):undefined,_0x1412e6=_0x2dd27f[_0x50ce96(0x115)][_0x50ce96(0xb5)](_0x62787e[_0x50ce96(0x112)])?_0x50ce96(0x11b):!_0x3cf14b&&_0x534323?_0x50ce96(0x121):_0x2abb96?_0x50ce96(0xf1):_0x50ce96(0xcc);_0x20a7c7[_0x50ce96(0xea)]({'lockKey':_0x62787e[_0x50ce96(0x112)],'filePath':_0x62787e['filePath'],'remoteId':_0x526afb?.['remoteId']??null,'mode':_0x526afb?.['remoteId']?_0x50ce96(0xcf):_0x50ce96(0xb8),'status':_0x1412e6,..._0x2dd27f[_0x50ce96(0x115)][_0x50ce96(0xb5)](_0x62787e[_0x50ce96(0x112)])?{'error':_0x2dd27f[_0x50ce96(0x115)]['get'](_0x62787e[_0x50ce96(0x112)])}:{},..._0x2abb96?{'conflict':_0x2abb96}:{},..._0x2dd27f[_0x50ce96(0x10c)][_0x50ce96(0xb5)](_0x62787e[_0x50ce96(0x112)])?{'datasetCode':_0x526afb?.[_0x50ce96(0xc5)],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x62787e['lockKey'])]}:{},..._0x1c7397?{'alias':_0x1c7397[_0x50ce96(0x105)]??null,'datasetCode':_0x1c7397[_0x50ce96(0xc5)],'operationType':_0x62787e[_0x50ce96(0xd9)],'functionNode':_0x62787e[_0x50ce96(0xbf)],'warnings':_0x1c7397[_0x50ce96(0x109)]}:{}});}return{'method':_0x50ce96(0xdd),'url':'/api/management/library/scripts/save','body':{'appCode':_0x4d58a6['appCode'],'force':_0x3cf14b,'files':_0x20a7c7,'cacheClearAtRuntime':_0x20a7c7['some'](_0x423093=>_0x423093[_0x50ce96(0xfc)]===_0x50ce96(0xcc)),'cacheClearAtRuntimeTimes':_0x20a7c7[_0x50ce96(0xfd)](_0x2a66df=>_0x2a66df[_0x50ce96(0xfc)]===_0x50ce96(0xcc))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x50ce96(0xda)+_0x20a7c7[_0x50ce96(0x100)]+_0x50ce96(0xdc)};},async 'execute'(_0xe95505){const _0x306b4e=a43_0x3b97bc,_0x26bd40=loadBffProjectConfig(_0xe95505['appCode']),_0x3ca318=await readBffLockFile(_0x26bd40['lockFilePath']),{lockData:_0x2c3f9b,appLock:_0x575f6d}=ensureLockScope(_0x3ca318??createEmptyBffLock(),_0xe95505['appCode'],_0x26bd40[_0x306b4e(0xf5)],_0x306b4e(0xea)),_0x40faf9=await getTargetFunctions(_0x26bd40,_0xe95505);if(_0x40faf9[_0x306b4e(0x100)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':_0x306b4e(0x101)};const _0x14a059=_0xe95505[_0x306b4e(0xca)](_0x306b4e(0x111)),_0x4e8a94=JSON['parse'](JSON[_0x306b4e(0xf7)](_0x2c3f9b)),_0x494c4d=_0x4e8a94[_0x306b4e(0xd4)][_0xe95505[_0x306b4e(0xde)]];if(!_0x494c4d)throw new Error(_0x306b4e(0xf3)+_0xe95505[_0x306b4e(0xde)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x1a3341=_0x40faf9[_0x306b4e(0xfd)](_0x1281b4=>_0x1281b4[_0x306b4e(0x113)]===_0x306b4e(0xd7))?await scanLocalBffFunctions(_0x26bd40,'HOOK'):_0x40faf9,_0xd94f64=await buildHookMaps(_0xe95505[_0x306b4e(0xde)],_0xe95505[_0x306b4e(0xef)],_0x1a3341,_0x494c4d,_0xe95505[_0x306b4e(0xc2)]||_0xe95505[_0x306b4e(0xdb)]?.[_0x306b4e(0xd8)]||_0xe95505[_0x306b4e(0xdb)]?.[_0x306b4e(0xcb)]),_0x581e9f=[],_0x1034ce=[],_0x116842=[],_0x2b0fb1=[];for(const _0x3acaf5 of _0x40faf9){const _0xf9b8ff=_0xd94f64[_0x306b4e(0x115)]['get'](_0x3acaf5[_0x306b4e(0x112)]);if(_0xf9b8ff){_0x2b0fb1[_0x306b4e(0xea)]({'lockKey':_0x3acaf5[_0x306b4e(0x112)],'error':_0xf9b8ff});continue;}const _0x11b2d1=await computeFileHash(_0x3acaf5['filePath']),_0x293147=_0x494c4d[_0x306b4e(0x10a)][_0x3acaf5[_0x306b4e(0x112)]];if(!_0x14a059&&_0x293147&&_0x293147['hash']===_0x11b2d1){_0x1034ce['push']({'lockKey':_0x3acaf5[_0x306b4e(0x112)],'reason':_0x306b4e(0x121)});continue;}if(_0x293147?.[_0x306b4e(0xf4)]&&_0x293147[_0x306b4e(0xbc)]==null){_0x116842[_0x306b4e(0xea)](missingRemoteVersionConflict(_0x3acaf5,_0x293147));continue;}try{await uploadSingleFunction(_0xe95505[_0x306b4e(0xde)],_0x3acaf5,_0x494c4d,_0xd94f64);const _0x2f480d=_0x494c4d[_0x306b4e(0x10a)][_0x3acaf5[_0x306b4e(0x112)]];_0x581e9f[_0x306b4e(0xea)]({'lockKey':_0x3acaf5['lockKey'],'remoteId':_0x2f480d?.['remoteId']??0x0});}catch(_0x3f1bbd){const _0x110407=remoteVersionChangedConflict(_0x3acaf5,_0x293147,_0x3f1bbd);if(_0x110407){_0x116842['push'](_0x110407);continue;}_0x2b0fb1[_0x306b4e(0xea)]({'lockKey':_0x3acaf5[_0x306b4e(0x112)],'error':_0x3f1bbd instanceof Error?_0x3f1bbd[_0x306b4e(0xd5)]:String(_0x3f1bbd)});}}_0x494c4d[_0x306b4e(0x11d)]=new Date()['toISOString'](),await writeBffLockFile(_0x26bd40[_0x306b4e(0x11a)],_0x4e8a94),await waitForUploadedLockEntries(_0x26bd40[_0x306b4e(0x11a)],_0xe95505[_0x306b4e(0xde)],_0x581e9f[_0x306b4e(0xfe)](_0x18bcfa=>_0x18bcfa[_0x306b4e(0x112)]));let _0x5ca175={'attempted':![],'cleared':![]};if(_0x581e9f[_0x306b4e(0x100)]>0x0)try{let _0x5f2909='';for(let _0x1db719=0x0;_0x1db719<CACHE_CLEAR_ATTEMPTS;_0x1db719+=0x1){_0x5f2909=await clearBffScriptCache(),_0x1db719<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x5ca175={'attempted':!![],'cleared':!![],'message':_0x5f2909||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0x1e760f){_0x5ca175={'attempted':!![],'cleared':![],'error':_0x1e760f instanceof Error?_0x1e760f[_0x306b4e(0xd5)]:String(_0x1e760f)};}const _0x4be922=_0x2b0fb1[_0x306b4e(0x100)]===0x0&&(_0x5ca175[_0x306b4e(0xec)]?_0x5ca175[_0x306b4e(0xe2)]:!![]),_0x9964ac=_0x4be922,_0x73e5ba=_0x5ca175[_0x306b4e(0xec)]?_0x5ca175[_0x306b4e(0xe2)]?_0x306b4e(0xdf):_0x306b4e(0xe9):'runtime\x20cache\x20not\x20needed';return{'ok':_0x9964ac,'data':{'uploaded':_0x581e9f,'skipped':_0x1034ce,'conflicts':_0x116842,'failed':_0x2b0fb1,'cacheClear':_0x5ca175,'warnings':[...[..._0xd94f64['resolutions']['values']()][_0x306b4e(0x116)](_0x5db908=>_0x5db908['warnings']),...[..._0xd94f64[_0x306b4e(0x10c)]][_0x306b4e(0xfe)](existingHookWarning)]},'message':formatPushMessage(_0x581e9f[_0x306b4e(0x100)],_0x1034ce[_0x306b4e(0x100)],_0x116842[_0x306b4e(0x100)],_0x2b0fb1[_0x306b4e(0x100)],_0x73e5ba)};}};function missingRemoteVersionConflict(_0x2d0446,_0x1b0093){const _0x49f3bf=a43_0x3b97bc;return remoteVersionConflict(_0x2d0446,_0x1b0093,_0x49f3bf(0xc3),_0x49f3bf(0x120));}function remoteVersionChangedConflict(_0x594a55,_0x26b0e4,_0x393875){const _0x551139=a43_0x3b97bc;if(!_0x26b0e4?.[_0x551139(0xf4)]||_0x26b0e4[_0x551139(0xbc)]==null||!isRemoteVersionConflict(_0x393875))return undefined;return remoteVersionConflict(_0x594a55,_0x26b0e4,_0x551139(0x110),_0x551139(0xfb));}function remoteVersionConflict(_0x1cf124,_0x356bbb,_0x3cbda9,_0x2cf481){const _0x26312b=a43_0x3b97bc;return{'code':_0x3cbda9,'lockKey':_0x1cf124[_0x26312b(0x112)],'filePath':_0x1cf124[_0x26312b(0xce)],'remoteId':_0x356bbb[_0x26312b(0xf4)],..._0x356bbb[_0x26312b(0xbc)]!=null?{'expectedVersion':_0x356bbb[_0x26312b(0xbc)]}:{},'message':_0x2cf481,'nextAction':{'action':_0x26312b(0xd2),'command':CLI_BIN_NAME+_0x26312b(0xd1)+_0x356bbb[_0x26312b(0xf4)]+_0x26312b(0x102),'requiresReview':!![],'message':_0x26312b(0xb3)}};}function isRemoteVersionConflict(_0x317098){const _0x3a7622=a43_0x3b97bc,_0x759662=_0x317098 instanceof Error?_0x317098[_0x3a7622(0xd5)]:String(_0x317098),_0x53e81a=getPlatformErrorCode(_0x317098)??'';return[_0x759662,_0x53e81a][_0x3a7622(0xfd)](_0x156fc0=>/(?: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['test'](_0x156fc0));}function formatPushMessage(_0x17f77d,_0x16eb1b,_0x412246,_0x44caf1,_0x54d168){const _0x582cd4=a43_0x3b97bc,_0x20cd98=[_0x582cd4(0xc6)+_0x17f77d+_0x582cd4(0xff),_0x16eb1b+'\x20skipped'];_0x412246>0x0&&_0x20cd98[_0x582cd4(0xea)](_0x412246+_0x582cd4(0x11e)+(_0x412246===0x1?'':'s')+'\x20'+(_0x412246===0x1?'requires':_0x582cd4(0xc1))+_0x582cd4(0xf0));if(_0x44caf1>0x0)_0x20cd98[_0x582cd4(0xea)](_0x44caf1+'\x20failed');return _0x20cd98[_0x582cd4(0xea)](_0x54d168),_0x20cd98[_0x582cd4(0xb6)](',\x20');}async function getTargetFunctions(_0x404ec0,_0x59ac89){const _0x4dad38=a43_0x3b97bc,_0x4690b6=_0x59ac89['str'](_0x4dad38(0x113)),_0x247ab2=_0x59ac89[_0x4dad38(0x10f)]('name'),_0x50823b=normalizeBffType(_0x4690b6)??undefined;if(_0x247ab2&&!_0x50823b)throw CliErrors[_0x4dad38(0x114)](_0x4dad38(0xbb));const _0x7da617=await scanLocalBffFunctions(_0x404ec0,_0x50823b);if(_0x247ab2){const _0x2bffbe=_0x7da617[_0x4dad38(0xb9)](_0x38f265=>_0x38f265[_0x4dad38(0xbd)]===_0x247ab2);if(_0x2bffbe[_0x4dad38(0x100)]===0x0)throw CliErrors['validation'](_0x4dad38(0x10e)+_0x50823b+'/'+_0x247ab2);return _0x2bffbe;}return _0x7da617;}function existingHookWarning(_0x223440){const _0x2d279b=a43_0x3b97bc;return{'code':_0x2d279b(0xe1),'lockKey':_0x223440,'message':_0x2d279b(0xc0)};}async function buildHookMaps(_0x497d1f,_0x466651,_0x5c0814,_0x380052,_0x4a68c0){const _0x24342c=a43_0x3b97bc,_0x3564fe=_0x5c0814[_0x24342c(0xfd)](_0x23f612=>_0x23f612[_0x24342c(0x113)]===_0x24342c(0xd7));if(!_0x3564fe)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0x276c4d=resolveApiModelSource(_0x466651,_0x497d1f,_0x4a68c0),_0x4c0ea2=loadAliasMap(_0x466651,undefined,_0x276c4d[_0x24342c(0xce)],_0x276c4d[_0x24342c(0x119)]);assertUnambiguousHookAliases(_0x4c0ea2);const _0x44ec6e=[..._0x4c0ea2['map'](_0x51cf02=>[_0x51cf02[_0x24342c(0x105)],_0x51cf02['datasetCode']]),...trackedHookDirectoryMappings(_0x380052)[_0x24342c(0xfe)](_0x3c1bd5=>[_0x3c1bd5[_0x24342c(0x105)],_0x3c1bd5[_0x24342c(0xc5)]])],_0xca0ee9=await listDatasets(_0x497d1f);assertUnambiguousHookDirectoryMappings(_0x44ec6e['map'](([_0x229650,_0x37b18c])=>({'alias':_0x229650,'datasetCode':_0x37b18c})));const _0xea724d=buildHookDirectoryIndexes(_0xca0ee9,_0x44ec6e),_0x4e145b=new Map(),_0x228117=preflightPushHookDirectories(_0x5c0814,_0x380052,_0xea724d,_0x4e145b),_0xd65c70=new Set(),_0x585076=_0x5c0814['filter'](_0x262f1c=>_0x4e145b[_0x24342c(0x103)](_0x262f1c[_0x24342c(0x112)])?.[_0x24342c(0xbe)](_0x24342c(0x107))&&_0x380052['functions'][_0x262f1c[_0x24342c(0x112)]]?.[_0x24342c(0xf4)]&&_0x380052['functions'][_0x262f1c[_0x24342c(0x112)]]?.[_0x24342c(0xc5)]);if(_0x585076[_0x24342c(0x100)]>0x0){let _0x20c9bf;try{_0x20c9bf=await getBffScriptStatistics(_0x497d1f);}catch(_0x35e880){for(const _0x4f4dfd of _0x585076)_0x4e145b[_0x24342c(0xe0)](_0x4f4dfd['lockKey'],_0x24342c(0xcd)+(_0x35e880 instanceof Error?_0x35e880['message']:String(_0x35e880)));return{'resolutions':_0x228117,'failures':_0x4e145b,'existingHooks':_0xd65c70};}for(const _0x4cb223 of _0x585076){const _0x5b9c51=_0x380052[_0x24342c(0x10a)][_0x4cb223[_0x24342c(0x112)]];try{const _0xfbf923=new Set(_0x5c0814[_0x24342c(0xb9)](_0x5aaf1b=>_0x5aaf1b[_0x24342c(0x113)]==='HOOK'&&_0x380052[_0x24342c(0x10a)][_0x5aaf1b[_0x24342c(0x112)]]?.[_0x24342c(0xc5)]===_0x5b9c51['datasetCode'])['map'](_0x31f82b=>_0x31f82b['alias']));if(_0xfbf923[_0x24342c(0xd6)]>0x1)throw CliErrors[_0x24342c(0x114)]('Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.');const _0x4190ba=_0x20c9bf[_0x24342c(0x116)](_0x5c6345=>[{'datasetCode':_0x5c6345['datasetCode'],'operationType':snakeToCamel(_0x5c6345['operationType']),'functionNode':_0x24342c(0xf9),'id':_0x5c6345['beforeScriptId']},{'datasetCode':_0x5c6345['datasetCode'],'operationType':snakeToCamel(_0x5c6345['operationType']),'functionNode':'after','id':_0x5c6345[_0x24342c(0xc9)]}])['filter'](_0x5d4bf3=>_0x5d4bf3['id']===_0x5b9c51['remoteId']),_0x465c77=await getBffScriptInfo(_0x5b9c51['remoteId']);if(_0x465c77['id']!==_0x5b9c51[_0x24342c(0xf4)]||_0x465c77[_0x24342c(0xde)]!==_0x497d1f||_0x465c77[_0x24342c(0x11f)]!==_0x24342c(0xd7)||_0x465c77[_0x24342c(0x11c)]!==_0x4cb223[_0x24342c(0xbd)]||_0x5b9c51['version']==null||_0x465c77[_0x24342c(0xbc)]!==_0x5b9c51[_0x24342c(0xbc)]||_0x4190ba[_0x24342c(0x100)]!==0x1||_0x4190ba[0x0][_0x24342c(0xc5)]!==_0x5b9c51['datasetCode']||_0x4190ba[0x0][_0x24342c(0xd9)]!==_0x4cb223[_0x24342c(0xd9)]||_0x4190ba[0x0][_0x24342c(0xbf)]!==_0x4cb223[_0x24342c(0xbf)]||_0x5b9c51['operationType']!==_0x4cb223[_0x24342c(0xd9)]||_0x5b9c51[_0x24342c(0xbf)]!==_0x4cb223[_0x24342c(0xbf)])throw CliErrors['validation'](_0x24342c(0x122));_0xd65c70['add'](_0x4cb223[_0x24342c(0x112)]),_0x4e145b[_0x24342c(0xee)](_0x4cb223[_0x24342c(0x112)]);}catch(_0x1de0ac){_0x4e145b[_0x24342c(0xe0)](_0x4cb223['lockKey'],_0x1de0ac instanceof Error?_0x1de0ac['message']:String(_0x1de0ac));}}}return{'resolutions':_0x228117,'failures':_0x4e145b,'existingHooks':_0xd65c70};}async function uploadSingleFunction(_0x6be797,_0x9f5290,_0x40fd0f,_0x1fc7df){const _0x1ee8fc=a43_0x3b97bc,_0x42d6e9=await readFile(_0x9f5290['filePath'],'utf8'),_0x4f2c7a=await computeFileHash(_0x9f5290[_0x1ee8fc(0xce)]),_0x30aad2=_0x40fd0f[_0x1ee8fc(0x10a)][_0x9f5290['lockKey']];if(_0x30aad2?.[_0x1ee8fc(0xf4)]&&_0x30aad2[_0x1ee8fc(0xbc)]==null)throw CliErrors[_0x1ee8fc(0x114)](_0x9f5290[_0x1ee8fc(0x112)]+_0x1ee8fc(0xd0));let _0x4e74bf=extractScriptDescription(_0x42d6e9);if(!_0x4e74bf&&_0x30aad2?.[_0x1ee8fc(0xf4)]){const _0x99ae4=await getBffScriptInfo(_0x30aad2[_0x1ee8fc(0xf4)]);_0x4e74bf=_0x99ae4['description']||undefined;}const _0x470d93={'appCode':_0x6be797,'functionName':_0x9f5290['name'],'scriptType':_0x9f5290[_0x1ee8fc(0x113)],'scriptContent':_0x42d6e9};if(_0x30aad2?.[_0x1ee8fc(0xf4)])_0x470d93['id']=_0x30aad2[_0x1ee8fc(0xf4)];if(_0x30aad2?.['version']!=null)_0x470d93[_0x1ee8fc(0xbc)]=_0x30aad2[_0x1ee8fc(0xbc)];if(_0x4e74bf)_0x470d93[_0x1ee8fc(0xba)]=_0x4e74bf;if(_0x9f5290['type']===_0x1ee8fc(0xd7)){const _0x490190=_0x1fc7df['resolutions'][_0x1ee8fc(0x103)](_0x9f5290[_0x1ee8fc(0x112)]);if(!_0x490190&&!_0x1fc7df[_0x1ee8fc(0x10c)][_0x1ee8fc(0xb5)](_0x9f5290[_0x1ee8fc(0x112)])||!_0x9f5290[_0x1ee8fc(0xd9)]||!_0x9f5290[_0x1ee8fc(0xbf)])throw CliErrors[_0x1ee8fc(0x114)](_0x1ee8fc(0xc7)+_0x9f5290[_0x1ee8fc(0x112)]);_0x490190&&(_0x470d93[_0x1ee8fc(0xc8)]=_0x490190[_0x1ee8fc(0xf6)]['id'],_0x470d93[_0x1ee8fc(0xd9)]=_0x9f5290[_0x1ee8fc(0xd9)]),_0x470d93[_0x1ee8fc(0xbf)]=_0x9f5290[_0x1ee8fc(0xbf)];}const _0x56b08d=await saveBffScript(_0x470d93),_0x491e1e=_0x56b08d['id'],_0x7a073b=_0x56b08d[_0x1ee8fc(0xe8)]??await getBffScriptInfo(_0x491e1e),_0x27730f={'hash':_0x4f2c7a,'remoteId':_0x491e1e,'version':_0x7a073b['version']};if(_0x9f5290[_0x1ee8fc(0x113)]===_0x1ee8fc(0xd7)){const _0x49e8bf=_0x1fc7df['resolutions'][_0x1ee8fc(0x103)](_0x9f5290['lockKey']);if(!_0x49e8bf){_0x40fd0f[_0x1ee8fc(0x10a)][_0x9f5290['lockKey']]={..._0x30aad2,..._0x27730f};return;}_0x27730f['alias']=_0x49e8bf[_0x1ee8fc(0x105)]??_0x30aad2?.['alias'],_0x27730f[_0x1ee8fc(0xc5)]=_0x49e8bf[_0x1ee8fc(0xc5)],_0x27730f['operationType']=_0x9f5290['operationType'],_0x27730f[_0x1ee8fc(0xbf)]=_0x9f5290[_0x1ee8fc(0xbf)];}_0x40fd0f[_0x1ee8fc(0x10a)][_0x9f5290[_0x1ee8fc(0x112)]]=_0x27730f;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x4858b2,_0x34d0bc,_0x8ea953){const _0xc17c8f=a43_0x3b97bc;if(_0x8ea953[_0xc17c8f(0x100)]===0x0)return;for(let _0x54ff15=0x0;_0x54ff15<LOCK_SETTLE_RETRY_COUNT;_0x54ff15+=0x1){const _0x36355f=await readBffLockFile(_0x4858b2),_0x27549b=_0x36355f?.[_0xc17c8f(0xd4)]?.[_0x34d0bc]?.[_0xc17c8f(0x10a)]??{},_0x489468=_0x8ea953[_0xc17c8f(0x117)](_0x1a5f8f=>!!_0x27549b[_0x1a5f8f]?.[_0xc17c8f(0xf4)]);if(_0x489468)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0xc17c8f(0xfa)+_0x8ea953[_0xc17c8f(0xb6)](',\x20')+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a44_0x410065=a44_0x51e6;(function(_0x263b16,_0x5850f5){const _0x4f2e14=a44_0x51e6,_0x5e104b=_0x263b16();while(!![]){try{const _0x51acee=parseInt(_0x4f2e14(0x19f))/0x1*(parseInt(_0x4f2e14(0x19c))/0x2)+parseInt(_0x4f2e14(0x1a2))/0x3*(-parseInt(_0x4f2e14(0x1a5))/0x4)+parseInt(_0x4f2e14(0x19b))/0x5+parseInt(_0x4f2e14(0x197))/0x6+-parseInt(_0x4f2e14(0x1a3))/0x7+parseInt(_0x4f2e14(0x19e))/0x8*(-parseInt(_0x4f2e14(0x194))/0x9)+parseInt(_0x4f2e14(0x19a))/0xa;if(_0x51acee===_0x5850f5)break;else _0x5e104b['push'](_0x5e104b['shift']());}catch(_0x1d6791){_0x5e104b['push'](_0x5e104b['shift']());}}}(a44_0x26de,0x24710));function a44_0x26de(){const _0x12751f=['all','functions','datasetCode','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','\x20unchanged','All\x20Backend\x20Function\x20scripts\x20are\x20in\x20sync.','selectedAppName','has','remote','18DBHVgX','scriptsRoot','\x20remote-only','761142MXlojQ','currentApp','push','3491740dgksFY','559785yaZiEf','16JqNihO','lockKey','156856lPCPBb','12952GQWDiQ','length','lockFilePath','296601hMWReJ','1445675aEEcXe','status','12kQfsZq','apiDir','filePath','hash','mergedCli','\x20added,\x20','\x20modified,\x20','appCode','defaultApp','map','boolean','alias'];a44_0x26de=function(){return _0x12751f;};return a44_0x26de();}function a44_0x51e6(_0x50e57d,_0x1c2f1c){_0x50e57d=_0x50e57d-0x182;const _0x26dec0=a44_0x26de();let _0x51e694=_0x26dec0[_0x50e57d];return _0x51e694;}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';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':'bff','command':a44_0x410065(0x1a4),'description':'Check\x20local\x20Backend\x20Function\x20sync\x20status\x20against\x20lock\x20file','risk':'read','flags':[{'name':a44_0x410065(0x193),'type':a44_0x410065(0x189),'description':a44_0x410065(0x18e)}],async 'execute'(_0x54c50d){const _0x4f6630=a44_0x410065,_0x1ca6eb=loadBffProjectConfig(_0x54c50d[_0x4f6630(0x186)]),_0x5ab944=await readBffLockFile(_0x1ca6eb[_0x4f6630(0x1a1)]),{appLock:_0x3a65c9}=ensureLockScope(_0x5ab944??createEmptyBffLock(),_0x54c50d[_0x4f6630(0x186)],_0x1ca6eb[_0x4f6630(0x195)],'status'),_0xd61318=await scanLocalBffFunctions(_0x1ca6eb),_0x312398=[],_0x5e661c=[],_0x185d33=[];for(const _0x2f66c4 of _0xd61318){const _0x2c34fe=await computeFileHash(_0x2f66c4[_0x4f6630(0x1a7)]),_0x6f14b2=_0x3a65c9[_0x4f6630(0x18c)][_0x2f66c4[_0x4f6630(0x19d)]];if(!_0x6f14b2)_0x312398[_0x4f6630(0x199)](_0x2f66c4[_0x4f6630(0x19d)]);else _0x6f14b2[_0x4f6630(0x182)]!==_0x2c34fe?_0x5e661c['push'](_0x2f66c4['lockKey']):_0x185d33['push'](_0x2f66c4[_0x4f6630(0x19d)]);}const _0x32b6d6=[];if(_0x54c50d['bool'](_0x4f6630(0x193))){const _0xfe967a=resolveApiModelSource(_0x54c50d[_0x4f6630(0x1a6)],_0x54c50d[_0x4f6630(0x186)],_0x54c50d[_0x4f6630(0x191)]||_0x54c50d['mergedCli']?.[_0x4f6630(0x198)]||_0x54c50d[_0x4f6630(0x183)]?.[_0x4f6630(0x187)]),_0x4bde7a=loadAliasMap(_0x54c50d[_0x4f6630(0x1a6)],undefined,_0xfe967a[_0x4f6630(0x1a7)],_0xfe967a['profileName']),_0x8cfe1c=new Map(_0x4bde7a['map'](_0x57e5ce=>[_0x57e5ce[_0x4f6630(0x18d)],_0x57e5ce[_0x4f6630(0x18a)]])),[_0x407ad8,_0x548783]=await Promise[_0x4f6630(0x18b)]([listBffScripts(_0x54c50d[_0x4f6630(0x186)]),getBffScriptStatistics(_0x54c50d[_0x4f6630(0x186)])]),_0x5bd529=createHookLocationMap(_0x548783),_0x308352=new Set(_0xd61318[_0x4f6630(0x188)](_0x1521c0=>_0x1521c0[_0x4f6630(0x19d)]));for(const _0x173da1 of _0x407ad8){const _0xd728eb=resolveRemoteScriptTarget(_0x1ca6eb,_0x173da1,_0x5bd529,_0x3a65c9[_0x4f6630(0x18c)],_0x8cfe1c);_0xd728eb&&!_0x308352[_0x4f6630(0x192)](_0xd728eb['lockKey'])&&_0x32b6d6[_0x4f6630(0x199)](_0xd728eb[_0x4f6630(0x19d)]);}}const _0x323a0b=_0x312398[_0x4f6630(0x1a0)]===0x0&&_0x5e661c[_0x4f6630(0x1a0)]===0x0&&_0x32b6d6[_0x4f6630(0x1a0)]===0x0;return{'ok':!![],'data':{'added':_0x312398,'modified':_0x5e661c,'unchanged':_0x185d33,'remoteOnly':_0x32b6d6},'message':_0x323a0b?_0x4f6630(0x190):_0x312398[_0x4f6630(0x1a0)]+_0x4f6630(0x184)+_0x5e661c[_0x4f6630(0x1a0)]+_0x4f6630(0x185)+_0x185d33['length']+_0x4f6630(0x18f)+(_0x32b6d6['length']>0x0?',\x20'+_0x32b6d6[_0x4f6630(0x1a0)]+_0x4f6630(0x196):'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a45_0x50c7(){const _0x365acd=['repairCommand','CLI\x20Built-in\x20Skill\x20','\x20at\x20','561JEivFx','error','4274010RgLYXm','18CfDSEi','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','156YxxFgM','installedPath','3ymHyXO','\x20installed','cwd','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','code','1197836oghndn','6291940VDUoIA','changed','151IxppsK','986195DqiDRb','pipe','\x20via\x20skills@latest','\x20is\x20already\x20current','read','inherit','Built-in\x20Skill\x20install\x20failed\x20[','18MPPVDD','unknown','5011456cBSIUA','skillVersion','77388LkjeqL','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.'];a45_0x50c7=function(){return _0x365acd;};return a45_0x50c7();}const a45_0x409c8=a45_0x2ab9;(function(_0x57aec2,_0x426907){const _0x1e312b=a45_0x2ab9,_0x2b751d=_0x57aec2();while(!![]){try{const _0x37ccf1=parseInt(_0x1e312b(0x1e5))/0x1*(parseInt(_0x1e312b(0x1fb))/0x2)+-parseInt(_0x1e312b(0x1fd))/0x3*(parseInt(_0x1e312b(0x1e2))/0x4)+-parseInt(_0x1e312b(0x1f8))/0x5+parseInt(_0x1e312b(0x1f9))/0x6*(-parseInt(_0x1e312b(0x1e6))/0x7)+parseInt(_0x1e312b(0x1ef))/0x8+-parseInt(_0x1e312b(0x1ed))/0x9*(-parseInt(_0x1e312b(0x1e3))/0xa)+parseInt(_0x1e312b(0x1f6))/0xb*(parseInt(_0x1e312b(0x1f1))/0xc);if(_0x37ccf1===_0x426907)break;else _0x2b751d['push'](_0x2b751d['shift']());}catch(_0x181ccb){_0x2b751d['push'](_0x2b751d['shift']());}}}(a45_0x50c7,0x9e585));import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';function a45_0x2ab9(_0x4665e6,_0x36f37a){_0x4665e6=_0x4665e6-0x1e0;const _0x50c7bf=a45_0x50c7();let _0x2ab95c=_0x50c7bf[_0x4665e6];return _0x2ab95c;}export const cliSkillDefinitions=[{'service':'cli-skill','command':'install','description':a45_0x409c8(0x1fa),'risk':a45_0x409c8(0x1ea),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x18b802){const _0x29464e=a45_0x409c8;logger['setLogPath'](process[_0x29464e(0x1ff)]()),logger['info']('cli-skill-install',_0x29464e(0x1f2));const _0x3a39e1=installBuiltinSkill({'stdio':_0x18b802['nonInteractive']?_0x29464e(0x1e7):_0x29464e(0x1eb)});if(!_0x3a39e1['ok'])throw CliErrors['apiError'](_0x29464e(0x1ec)+_0x3a39e1[_0x29464e(0x1e1)]+']:\x20'+(_0x3a39e1[_0x29464e(0x1f7)]||_0x29464e(0x1ee)),_0x29464e(0x1e0)+_0x3a39e1[_0x29464e(0x1f3)]);return console['log'](_0x3a39e1[_0x29464e(0x1e4)]?_0x29464e(0x1f4)+_0x3a39e1[_0x29464e(0x1f0)]+_0x29464e(0x1fe)+(_0x3a39e1['installedPath']?_0x29464e(0x1f5)+_0x3a39e1[_0x29464e(0x1fc)]:_0x29464e(0x1e8)):_0x29464e(0x1f4)+_0x3a39e1['skillVersion']+_0x29464e(0x1e9)+(_0x3a39e1[_0x29464e(0x1fc)]?'\x20at\x20'+_0x3a39e1[_0x29464e(0x1fc)]:'')),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a41_0x13f6a6=a41_0x595f;function a41_0x595f(_0x5beb32,_0xd843b7){_0x5beb32=_0x5beb32-0x64;const _0x11147c=a41_0x1114();let _0x595fe9=_0x11147c[_0x5beb32];return _0x595fe9;}(function(_0x4ffcce,_0x4bd1fe){const _0x5b1c73=a41_0x595f,_0x533cd4=_0x4ffcce();while(!![]){try{const _0x2d78b3=-parseInt(_0x5b1c73(0x65))/0x1*(-parseInt(_0x5b1c73(0x90))/0x2)+-parseInt(_0x5b1c73(0x7c))/0x3+-parseInt(_0x5b1c73(0xb3))/0x4+parseInt(_0x5b1c73(0x88))/0x5+parseInt(_0x5b1c73(0x8c))/0x6+-parseInt(_0x5b1c73(0x68))/0x7+-parseInt(_0x5b1c73(0x6d))/0x8*(-parseInt(_0x5b1c73(0x6a))/0x9);if(_0x2d78b3===_0x4bd1fe)break;else _0x533cd4['push'](_0x533cd4['shift']());}catch(_0x461923){_0x533cd4['push'](_0x533cd4['shift']());}}}(a41_0x1114,0xb8f15));import a41_0x38cd94 from'chalk';import a41_0x501352 from'ora';function a41_0x1114(){const _0xe6603a=['yellow','bool','1GXRtMQ','beta','bun','4372830PqURtS','code','9pJQkIG',',\x20then\x20verify\x20with:\x20','Invalid\x20version:\x20','12112312lbyjYV','slice','install','apiError','start','length','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','\x20install\x20-g\x20','Install\x20a\x20specific\x20CLI\x20version','log','\x20doctor','...','Updated\x20to\x20v','validation','3331428HjxSWW','toLowerCase','\x20\x20CLI\x20Built-in\x20Skill\x20','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','execPath','\x20\x20Try\x20manually:\x20','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','update','str','message','current','boolean','237675UYPBDk','object','Already\x20on\x20requested\x20version\x20(v','green','8253360SqRkHX','Current\x20version:\x20','info','Current\x20version\x20v','904746DaDDjG','trim','fail','valid',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','repairCommand','succeed','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','unknown','latest','Run:\x20','timeout','json','Checking\x20CLI\x20Built-in\x20Skill...','skillVersion','Update\x20failed','red','fromEntries','Update\x20available:\x20','version','CLI\x20updated\x20to\x20v','Beta\x20version:\x20','npm','\x20→\x20','map','error','gray','pipe','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','\x20is\x20up\x20to\x20date.','state','source','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','expected\x20','Checking\x20for\x20updates...','3587264QdWiXb','Version\x20comparison\x20failed'];a41_0x1114=function(){return _0xe6603a;};return a41_0x1114();}import a41_0x382b3c 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 _0x4279f9=a41_0x595f;return GIT_COMMIT!==_0x4279f9(0x98)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x4279f9(0x6e)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x3a1ce0=a41_0x595f,_0x1d772a=process[_0x3a1ce0(0x80)][_0x3a1ce0(0x7d)]();if(_0x1d772a['includes'](_0x3a1ce0(0x67)))return _0x3a1ce0(0x67);return _0x3a1ce0(0xa6);}const updateFlags=[{'name':'beta','type':a41_0x13f6a6(0x87),'description':a41_0x13f6a6(0x74),'default':![]},{'name':a41_0x13f6a6(0xa3),'type':'string','description':a41_0x13f6a6(0x76)}];function getRequestedVersion(_0x5c27c1){const _0x374f84=a41_0x13f6a6;return _0x5c27c1[_0x374f84(0x84)](_0x374f84(0xa3))[_0x374f84(0x91)]();}async function validateUpdateFlags(_0x4a21ad){const _0x2fa454=a41_0x13f6a6,_0x129a70=_0x4a21ad[_0x2fa454(0x64)]('beta'),_0x4dcd75=getRequestedVersion(_0x4a21ad);if(_0x129a70&&_0x4dcd75)throw CliErrors[_0x2fa454(0x7b)](_0x2fa454(0x7f),_0x2fa454(0x73));if(_0x4dcd75&&!a41_0x382b3c[_0x2fa454(0x93)](_0x4dcd75))throw CliErrors[_0x2fa454(0x7b)](_0x2fa454(0x6c)+_0x4dcd75,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x58de07=a41_0x13f6a6;try{const _0x3e59cf=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0x58de07(0x9b)](0x2710)});if(!_0x3e59cf['ok'])return null;const _0x3811b2=await _0x3e59cf[_0x58de07(0x9c)]();if(!_0x3811b2||typeof _0x3811b2!==_0x58de07(0x89))return null;return Object[_0x58de07(0xa1)](Object['entries'](_0x3811b2)['filter'](([,_0x457855])=>typeof _0x457855==='string'&&_0x457855[_0x58de07(0x91)]()[_0x58de07(0x72)]>0x0)[_0x58de07(0xa8)](([_0x5f514c,_0xec8c82])=>[_0x5f514c,String(_0xec8c82)['trim']()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x35e0dc){const _0x6374f=await fetchNpmDistTags();return _0x6374f?.[_0x35e0dc]??null;}async function fetchLatestVersion(){const _0x21d936=a41_0x13f6a6;return fetchNpmDistTagVersion(_0x21d936(0x99));}async function resolveTargetVersion(_0x2a7385){const _0x105108=a41_0x13f6a6,_0x3585ca=getRequestedVersion(_0x2a7385);if(_0x3585ca)return{'version':_0x3585ca,'source':_0x105108(0xa3)};if(_0x2a7385['bool']('beta')){const _0xd7417b=await fetchNpmDistTagVersion('beta');if(!_0xd7417b)return null;return{'version':_0xd7417b,'source':'beta'};}const _0x3b1369=await fetchLatestVersion();if(!_0x3b1369)return null;return{'version':_0x3b1369,'source':_0x105108(0x99)};}function shouldInstallTarget(_0x3a3868,_0x5e4e7c){const _0x4e6605=a41_0x13f6a6;if(_0x5e4e7c[_0x4e6605(0xaf)]==='version'||_0x5e4e7c[_0x4e6605(0xaf)]===_0x4e6605(0x66))return!a41_0x382b3c['eq'](_0x3a3868,_0x5e4e7c['version']);return a41_0x382b3c['lt'](_0x3a3868,_0x5e4e7c[_0x4e6605(0xa3)]);}function getInstallPlanLabel(_0x3cf037,_0x20c343){const _0x36d350=a41_0x13f6a6;switch(_0x20c343[_0x36d350(0xaf)]){case _0x36d350(0x66):return _0x36d350(0xa5)+a41_0x38cd94[_0x36d350(0xb5)](_0x3cf037)+'\x20→\x20'+a41_0x38cd94['green'](_0x20c343['version']);case'version':return'Requested\x20version:\x20'+a41_0x38cd94[_0x36d350(0xb5)](_0x3cf037)+_0x36d350(0xa7)+a41_0x38cd94[_0x36d350(0x8b)](_0x20c343[_0x36d350(0xa3)]);case _0x36d350(0x99):default:return _0x36d350(0xa2)+a41_0x38cd94[_0x36d350(0xb5)](_0x3cf037)+_0x36d350(0xa7)+a41_0x38cd94[_0x36d350(0x8b)](_0x20c343[_0x36d350(0xa3)]);}}function repairCurrentBuiltinSkill(){const _0xff0499=a41_0x13f6a6;console[_0xff0499(0x77)](a41_0x38cd94[_0xff0499(0xaa)](_0xff0499(0x9d)));const _0x35c217=installBuiltinSkill();if(_0x35c217['ok']){console[_0xff0499(0x77)](a41_0x38cd94['gray'](_0xff0499(0x7e)+_0x35c217[_0xff0499(0x9e)]+_0xff0499(0xad)));return;}throw CliErrors[_0xff0499(0x70)](_0xff0499(0x97)+_0x35c217[_0xff0499(0x69)]+']:\x20'+(_0x35c217[_0xff0499(0xa9)]||_0xff0499(0x98)),_0xff0499(0x9a)+_0x35c217[_0xff0499(0x95)]+_0xff0499(0x6b)+CLI_BIN_NAME+_0xff0499(0x78));}function verifyUpdatedBuiltinSkill(_0x47761e){const _0x2823cd=a41_0x13f6a6,_0x2f6210=inspectInstalledBuiltinSkillVersion(_0x47761e);if(_0x2f6210[_0x2823cd(0xae)]===_0x2823cd(0x86)){console[_0x2823cd(0x77)](a41_0x38cd94[_0x2823cd(0xaa)]('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x47761e+_0x2823cd(0xad)));return;}const _0x400ce6=_0x2f6210[_0x2823cd(0x9e)]?_0x2823cd(0xb1)+_0x47761e+',\x20found\x20'+_0x2f6210[_0x2823cd(0x9e)]:_0x2823cd(0xb1)+_0x47761e+',\x20state\x20'+_0x2f6210[_0x2823cd(0xae)];throw CliErrors['apiError'](_0x2823cd(0xa4)+_0x47761e+_0x2823cd(0x94)+_0x400ce6,'Run:\x20'+_0x2f6210[_0x2823cd(0x95)]+',\x20then\x20verify\x20with:\x20'+CLI_BIN_NAME+_0x2823cd(0x78));}async function execute(_0x42cb84){const _0x4d5517=a41_0x13f6a6;await validateUpdateFlags(_0x42cb84);const _0x339b4a=getCurrentVersion();console[_0x4d5517(0x77)](_0x4d5517(0x8d)+_0x339b4a);const _0x3fbb7c=a41_0x501352(_0x4d5517(0xb2))[_0x4d5517(0x71)](),_0x3b65d8=await resolveTargetVersion(_0x42cb84);if(!_0x3b65d8){const _0x103083=_0x42cb84['bool'](_0x4d5517(0x66))?_0x4d5517(0xb0):'Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)';return _0x3fbb7c[_0x4d5517(0x92)](_0x103083),console[_0x4d5517(0x77)](a41_0x38cd94[_0x4d5517(0xaa)](_0x4d5517(0x82)+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x103083};}const _0x4a2a3a=a41_0x382b3c[_0x4d5517(0x93)](VERSION),_0x415964=a41_0x382b3c[_0x4d5517(0x93)](_0x3b65d8[_0x4d5517(0xa3)]);if(!_0x4a2a3a||!_0x415964)return _0x3fbb7c[_0x4d5517(0x92)](_0x4d5517(0xb4)),{'ok':![],'message':_0x4d5517(0xb4)};if(!shouldInstallTarget(_0x4a2a3a,_0x3b65d8)){const _0x453f69=_0x3b65d8[_0x4d5517(0xaf)]===_0x4d5517(0xa3)?_0x4d5517(0x8a)+_0x3b65d8[_0x4d5517(0xa3)]+')':a41_0x382b3c['gt'](_0x4a2a3a,_0x415964)?_0x4d5517(0x8f)+_0x339b4a+'\x20is\x20newer\x20than\x20npm\x20latest\x20v'+_0x3b65d8[_0x4d5517(0xa3)]:'Already\x20up\x20to\x20date\x20(v'+_0x3b65d8[_0x4d5517(0xa3)]+')';return _0x3fbb7c[_0x4d5517(0x96)](_0x453f69),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x3fbb7c[_0x4d5517(0x8e)](getInstallPlanLabel(_0x339b4a,_0x3b65d8));const _0x45566c=detectPackageManager(),_0x1fbf36=_0x45566c===_0x4d5517(0xa6)?resolveNpmBin(_0x4d5517(0xa6)):_0x45566c,_0x205729=a41_0x501352('Updating\x20via\x20'+_0x45566c+_0x4d5517(0x79))[_0x4d5517(0x71)]();try{await execa(_0x1fbf36,[_0x4d5517(0x6f),'-g',NPM_PACKAGE_NAME+'@'+_0x3b65d8[_0x4d5517(0xa3)]],{'stdio':_0x4d5517(0xab)}),_0x205729['succeed'](_0x4d5517(0x7a)+_0x3b65d8['version']),console[_0x4d5517(0x77)](a41_0x38cd94[_0x4d5517(0xaa)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.'));}catch(_0x571a67){return _0x205729['fail'](_0x4d5517(0x9f)),console['error'](a41_0x38cd94[_0x4d5517(0xa0)]('\x20\x20'+_0x571a67[_0x4d5517(0x85)])),console['log'](a41_0x38cd94['gray'](_0x4d5517(0x81)+_0x45566c+_0x4d5517(0x75)+NPM_PACKAGE_NAME+'@'+_0x3b65d8['version'])),{'ok':![],'message':_0x571a67['message']};}return verifyUpdatedBuiltinSkill(_0x3b65d8[_0x4d5517(0xa3)]),{'ok':!![]};}export const updateDefinition={'service':a41_0x13f6a6(0x83),'command':'run','description':a41_0x13f6a6(0xac),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a46_0x4a3465=a46_0x4db3;(function(_0x22a88b,_0x20d447){const _0x502a5a=a46_0x4db3,_0x1db634=_0x22a88b();while(!![]){try{const _0x16a216=-parseInt(_0x502a5a(0x8d))/0x1+parseInt(_0x502a5a(0x8c))/0x2+parseInt(_0x502a5a(0x6e))/0x3*(parseInt(_0x502a5a(0x9d))/0x4)+-parseInt(_0x502a5a(0x79))/0x5+parseInt(_0x502a5a(0x6c))/0x6+-parseInt(_0x502a5a(0xae))/0x7+parseInt(_0x502a5a(0xb7))/0x8;if(_0x16a216===_0x20d447)break;else _0x1db634['push'](_0x1db634['shift']());}catch(_0xc9c8ce){_0x1db634['push'](_0x1db634['shift']());}}}(a46_0x2628,0x634b4));import a46_0x3182e3 from'chalk';import a46_0x4f9234 from'ora';function a46_0x4db3(_0x5bf36d,_0x59c451){_0x5bf36d=_0x5bf36d-0x6b;const _0x262851=a46_0x2628();let _0x4db3d6=_0x262851[_0x5bf36d];return _0x4db3d6;}import a46_0x2df4cb 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 _0x2700a8=a46_0x4db3;return GIT_COMMIT!==_0x2700a8(0xa5)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x2700a8(0x80)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x56cc9a=a46_0x4db3,_0x46378a=process['execPath'][_0x56cc9a(0xc1)]();if(_0x46378a[_0x56cc9a(0xc0)](_0x56cc9a(0xab)))return _0x56cc9a(0xab);return'npm';}const updateFlags=[{'name':'beta','type':a46_0x4a3465(0x6d),'description':a46_0x4a3465(0xa0),'default':![]},{'name':a46_0x4a3465(0xa1),'type':a46_0x4a3465(0xb5),'description':a46_0x4a3465(0x9a)}];function getRequestedVersion(_0xb26d0e){const _0x4e4f9f=a46_0x4a3465;return _0xb26d0e[_0x4e4f9f(0x8a)](_0x4e4f9f(0xa1))[_0x4e4f9f(0x92)]();}async function validateUpdateFlags(_0x33ef00){const _0x3ac951=a46_0x4a3465,_0x4ff8d4=_0x33ef00[_0x3ac951(0xbc)](_0x3ac951(0x77)),_0x19c300=getRequestedVersion(_0x33ef00);if(_0x4ff8d4&&_0x19c300)throw CliErrors[_0x3ac951(0x8b)](_0x3ac951(0xb9),_0x3ac951(0xbf));if(_0x19c300&&!a46_0x2df4cb[_0x3ac951(0x73)](_0x19c300))throw CliErrors[_0x3ac951(0x8b)]('Invalid\x20version:\x20'+_0x19c300,_0x3ac951(0xba));}async function fetchNpmDistTags(){const _0x34580a=a46_0x4a3465;try{const _0x6c3e12=await fetch(_0x34580a(0x8f)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x34580a(0x7b),{'signal':AbortSignal['timeout'](0x2710)});if(!_0x6c3e12['ok'])return null;const _0x2e6c57=await _0x6c3e12[_0x34580a(0xc2)]();if(!_0x2e6c57||typeof _0x2e6c57!==_0x34580a(0x7e))return null;return Object[_0x34580a(0x85)](Object['entries'](_0x2e6c57)[_0x34580a(0xac)](([,_0x47080a])=>typeof _0x47080a===_0x34580a(0xb5)&&_0x47080a['trim']()[_0x34580a(0x81)]>0x0)[_0x34580a(0xb6)](([_0xa55558,_0x1ca64d])=>[_0xa55558,String(_0x1ca64d)[_0x34580a(0x92)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x187aea){const _0x5a81b1=await fetchNpmDistTags();return _0x5a81b1?.[_0x187aea]??null;}async function fetchLatestVersion(){return fetchNpmDistTagVersion('latest');}async function resolveTargetVersion(_0x22256c){const _0x59b896=a46_0x4a3465,_0x2413f1=getRequestedVersion(_0x22256c);if(_0x2413f1)return{'version':_0x2413f1,'source':'version'};if(_0x22256c[_0x59b896(0xbc)](_0x59b896(0x77))){const _0x31c4cb=await fetchNpmDistTagVersion(_0x59b896(0x77));if(!_0x31c4cb)return null;return{'version':_0x31c4cb,'source':'beta'};}const _0x394e45=await fetchLatestVersion();if(!_0x394e45)return null;return{'version':_0x394e45,'source':_0x59b896(0xbd)};}function shouldInstallTarget(_0x39fe5f,_0x278d1b){const _0xb56395=a46_0x4a3465;if(_0x278d1b[_0xb56395(0x87)]===_0xb56395(0xa1)||_0x278d1b[_0xb56395(0x87)]===_0xb56395(0x77))return!a46_0x2df4cb['eq'](_0x39fe5f,_0x278d1b['version']);return a46_0x2df4cb['lt'](_0x39fe5f,_0x278d1b[_0xb56395(0xa1)]);}function a46_0x2628(){const _0x179c20=['\x20\x20Try\x20manually:\x20','apiError','install','code','Install\x20a\x20specific\x20CLI\x20version','Already\x20up\x20to\x20date\x20(v','current','8GALkTm','expected\x20','Update\x20available:\x20','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','version','npm',',\x20then\x20verify\x20with:\x20',',\x20state\x20','unknown','Version\x20comparison\x20failed','\x20doctor','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','yellow','update','bun','filter','pipe','2393678iwVusH','CLI\x20updated\x20to\x20v','red','Updating\x20via\x20','log','\x20\x20CLI\x20Built-in\x20Skill\x20',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','string','map','4719360MwKqVt','state','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','bool','latest','repairCommand','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','includes','toLowerCase','json','read','\x20is\x20newer\x20than\x20npm\x20latest\x20v','Checking\x20for\x20updates...','1256346MiLsJf','boolean','194658XVLogs','...','Current\x20version\x20v','run','Update\x20failed','valid','Run:\x20','Beta\x20version:\x20','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','beta','\x20is\x20up\x20to\x20date.','2468865bqIgmn','\x20install\x20-g\x20','/dist-tags','green','info','object','Current\x20version:\x20','slice','length','message','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','gray','fromEntries','Requested\x20version:\x20','source','start','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','str','validation','828612vcgBta','100954wfCuHV','fail','https://registry.npmjs.org/-/package/','succeed','\x20→\x20','trim','skillVersion','error',']:\x20'];a46_0x2628=function(){return _0x179c20;};return a46_0x2628();}function getInstallPlanLabel(_0x538a7d,_0x18bb52){const _0x2de6c0=a46_0x4a3465;switch(_0x18bb52['source']){case'beta':return _0x2de6c0(0x75)+a46_0x3182e3['yellow'](_0x538a7d)+_0x2de6c0(0x91)+a46_0x3182e3[_0x2de6c0(0x7c)](_0x18bb52[_0x2de6c0(0xa1)]);case _0x2de6c0(0xa1):return _0x2de6c0(0x86)+a46_0x3182e3[_0x2de6c0(0xa9)](_0x538a7d)+_0x2de6c0(0x91)+a46_0x3182e3[_0x2de6c0(0x7c)](_0x18bb52[_0x2de6c0(0xa1)]);case'latest':default:return _0x2de6c0(0x9f)+a46_0x3182e3[_0x2de6c0(0xa9)](_0x538a7d)+_0x2de6c0(0x91)+a46_0x3182e3[_0x2de6c0(0x7c)](_0x18bb52[_0x2de6c0(0xa1)]);}}function repairCurrentBuiltinSkill(){const _0x3db9f1=a46_0x4a3465;console[_0x3db9f1(0xb2)](a46_0x3182e3['gray']('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x52c25b=installBuiltinSkill();if(_0x52c25b['ok']){console[_0x3db9f1(0xb2)](a46_0x3182e3[_0x3db9f1(0x84)](_0x3db9f1(0xb3)+_0x52c25b[_0x3db9f1(0x93)]+_0x3db9f1(0x78)));return;}throw CliErrors[_0x3db9f1(0x97)]('CLI\x20Built-in\x20Skill\x20repair\x20failed\x20['+_0x52c25b[_0x3db9f1(0x99)]+_0x3db9f1(0x95)+(_0x52c25b['error']||_0x3db9f1(0xa5)),_0x3db9f1(0x74)+_0x52c25b[_0x3db9f1(0xbe)]+_0x3db9f1(0xa3)+CLI_BIN_NAME+_0x3db9f1(0xa7));}function verifyUpdatedBuiltinSkill(_0x266591){const _0x198c18=a46_0x4a3465,_0x43a92d=inspectInstalledBuiltinSkillVersion(_0x266591);if(_0x43a92d[_0x198c18(0xb8)]===_0x198c18(0x9c)){console[_0x198c18(0xb2)](a46_0x3182e3[_0x198c18(0x84)](_0x198c18(0xb3)+_0x266591+_0x198c18(0x78)));return;}const _0x8b6f59=_0x43a92d[_0x198c18(0x93)]?_0x198c18(0x9e)+_0x266591+',\x20found\x20'+_0x43a92d['skillVersion']:_0x198c18(0x9e)+_0x266591+_0x198c18(0xa4)+_0x43a92d['state'];throw CliErrors[_0x198c18(0x97)](_0x198c18(0xaf)+_0x266591+_0x198c18(0xb4)+_0x8b6f59,_0x198c18(0x74)+_0x43a92d['repairCommand']+_0x198c18(0xa3)+CLI_BIN_NAME+_0x198c18(0xa7));}async function execute(_0x733b35){const _0x210d64=a46_0x4a3465;await validateUpdateFlags(_0x733b35);const _0xfa1c19=getCurrentVersion();console['log'](_0x210d64(0x7f)+_0xfa1c19);const _0x37abc6=a46_0x4f9234(_0x210d64(0x6b))[_0x210d64(0x88)](),_0x38567e=await resolveTargetVersion(_0x733b35);if(!_0x38567e){const _0x5f328b=_0x733b35[_0x210d64(0xbc)](_0x210d64(0x77))?_0x210d64(0xa8):_0x210d64(0xbb);return _0x37abc6[_0x210d64(0x8e)](_0x5f328b),console[_0x210d64(0xb2)](a46_0x3182e3['gray'](_0x210d64(0x76)+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x5f328b};}const _0x1ad58b=a46_0x2df4cb[_0x210d64(0x73)](VERSION),_0x321c84=a46_0x2df4cb[_0x210d64(0x73)](_0x38567e[_0x210d64(0xa1)]);if(!_0x1ad58b||!_0x321c84)return _0x37abc6[_0x210d64(0x8e)](_0x210d64(0xa6)),{'ok':![],'message':_0x210d64(0xa6)};if(!shouldInstallTarget(_0x1ad58b,_0x38567e)){const _0x41123c=_0x38567e[_0x210d64(0x87)]===_0x210d64(0xa1)?'Already\x20on\x20requested\x20version\x20(v'+_0x38567e['version']+')':a46_0x2df4cb['gt'](_0x1ad58b,_0x321c84)?_0x210d64(0x70)+_0xfa1c19+_0x210d64(0xc4)+_0x38567e['version']:_0x210d64(0x9b)+_0x38567e[_0x210d64(0xa1)]+')';return _0x37abc6[_0x210d64(0x90)](_0x41123c),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x37abc6[_0x210d64(0x7d)](getInstallPlanLabel(_0xfa1c19,_0x38567e));const _0x10f224=detectPackageManager(),_0x5d4ba8=_0x10f224==='npm'?resolveNpmBin(_0x210d64(0xa2)):_0x10f224,_0x90c65b=a46_0x4f9234(_0x210d64(0xb1)+_0x10f224+_0x210d64(0x6f))[_0x210d64(0x88)]();try{await execa(_0x5d4ba8,[_0x210d64(0x98),'-g',NPM_PACKAGE_NAME+'@'+_0x38567e['version']],{'stdio':_0x210d64(0xad)}),_0x90c65b[_0x210d64(0x90)]('Updated\x20to\x20v'+_0x38567e[_0x210d64(0xa1)]),console[_0x210d64(0xb2)](a46_0x3182e3[_0x210d64(0x84)](_0x210d64(0x89)));}catch(_0x55fdc7){return _0x90c65b[_0x210d64(0x8e)](_0x210d64(0x72)),console[_0x210d64(0x94)](a46_0x3182e3[_0x210d64(0xb0)]('\x20\x20'+_0x55fdc7[_0x210d64(0x82)])),console[_0x210d64(0xb2)](a46_0x3182e3[_0x210d64(0x84)](_0x210d64(0x96)+_0x10f224+_0x210d64(0x7a)+NPM_PACKAGE_NAME+'@'+_0x38567e[_0x210d64(0xa1)])),{'ok':![],'message':_0x55fdc7[_0x210d64(0x82)]};}return verifyUpdatedBuiltinSkill(_0x38567e[_0x210d64(0xa1)]),{'ok':!![]};}export const updateDefinition={'service':a46_0x4a3465(0xaa),'command':a46_0x4a3465(0x71),'description':a46_0x4a3465(0x83),'risk':a46_0x4a3465(0xc3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x36f58c,_0x18ea74){const _0xbc994f=a47_0x385c,_0x333e2c=_0x36f58c();while(!![]){try{const _0xf461a6=parseInt(_0xbc994f(0x11d))/0x1*(-parseInt(_0xbc994f(0x119))/0x2)+-parseInt(_0xbc994f(0x11a))/0x3+parseInt(_0xbc994f(0x112))/0x4*(-parseInt(_0xbc994f(0x116))/0x5)+-parseInt(_0xbc994f(0x11b))/0x6+-parseInt(_0xbc994f(0x117))/0x7*(-parseInt(_0xbc994f(0x113))/0x8)+-parseInt(_0xbc994f(0x118))/0x9*(parseInt(_0xbc994f(0x114))/0xa)+-parseInt(_0xbc994f(0x115))/0xb*(-parseInt(_0xbc994f(0x11c))/0xc);if(_0xf461a6===_0x18ea74)break;else _0x333e2c['push'](_0x333e2c['shift']());}catch(_0x4c582d){_0x333e2c['push'](_0x333e2c['shift']());}}}(a47_0x12ce,0xa2dee));function a47_0x385c(_0x235624,_0x4520ed){_0x235624=_0x235624-0x112;const _0x12cec7=a47_0x12ce();let _0x385c82=_0x12cec7[_0x235624];return _0x385c82;}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';function a47_0x12ce(){const _0x104f08=['14KbwfEE','36VLirbw','2koISup','2562678TxHMzW','7956KVBqKl','22008cWtJWG','1291429hTKUII','276dMtbVa','1759328LUlAOo','1402810ugdhzW','24343tpWpJG','81395IDbPwI'];a47_0x12ce=function(){return _0x104f08;};return a47_0x12ce();}export const codegenDefinitions=[codegenSdk,codegenSql];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a48_0x4abaab=a48_0xcc78;(function(_0x4510b5,_0x5df41b){const _0x21efea=a48_0xcc78,_0x17d5eb=_0x4510b5();while(!![]){try{const _0x13e733=parseInt(_0x21efea(0xa9))/0x1+-parseInt(_0x21efea(0xb5))/0x2*(parseInt(_0x21efea(0xa3))/0x3)+parseInt(_0x21efea(0xad))/0x4+-parseInt(_0x21efea(0xb8))/0x5*(-parseInt(_0x21efea(0xa2))/0x6)+-parseInt(_0x21efea(0xba))/0x7*(parseInt(_0x21efea(0xbc))/0x8)+parseInt(_0x21efea(0xa8))/0x9*(-parseInt(_0x21efea(0xb6))/0xa)+-parseInt(_0x21efea(0xb1))/0xb;if(_0x13e733===_0x5df41b)break;else _0x17d5eb['push'](_0x17d5eb['shift']());}catch(_0x59997c){_0x17d5eb['push'](_0x17d5eb['shift']());}}}(a48_0x1f43,0x4ca1e));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a48_0xcc78(_0xad865e,_0x3b9763){_0xad865e=_0xad865e-0xa2;const _0x1f43d5=a48_0x1f43();let _0xcc7868=_0x1f43d5[_0xad865e];return _0xcc7868;}function a48_0x1f43(){const _0x2b6e1c=['20zqueQq','appCode','5eRgwYW','sdk','1484arHfMf','Omit\x20import\x20statements\x20from\x20generated\x20code','16752FiFwhc','2960886UfNwJA','34674XxyNkm','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','boolean','operation','alias','2338983PvpRxO','286349FubiEu','codegen','skip-imports','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','2465796kkdGID','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','string','name','415635rhczCF','str','read','tableName','14LGLBcm'];a48_0x1f43=function(){return _0x2b6e1c;};return a48_0x1f43();}export const codegenSdk={'service':a48_0x4abaab(0xaa),'command':a48_0x4abaab(0xb9),'description':a48_0x4abaab(0xae),'risk':a48_0x4abaab(0xb3),'flags':[CODE_FLAG_OPTIONAL,{'name':a48_0x4abaab(0xa7),'type':a48_0x4abaab(0xaf),'description':a48_0x4abaab(0xa4)},{'name':a48_0x4abaab(0xa6),'type':a48_0x4abaab(0xaf),'required':!![],'description':a48_0x4abaab(0xac)},{'name':a48_0x4abaab(0xab),'type':a48_0x4abaab(0xa5),'description':a48_0x4abaab(0xbb)}],async 'execute'(_0x2734da){const _0x38e691=a48_0x4abaab,{dataset:_0x220d9c,operation:_0xd6d895}=await getOperationDetail(_0x2734da[_0x38e691(0xb7)],_0x2734da['str']('code'),_0x2734da[_0x38e691(0xb2)](_0x38e691(0xa6))),_0x3a5a6c=generateSdkCode(_0x220d9c,_0xd6d895,{'includeImports':!_0x2734da['bool'](_0x38e691(0xab))});return{'ok':!![],'data':{'dataset':{'name':_0x220d9c[_0x38e691(0xb0)],'code':_0x220d9c['code'],'tableName':_0x220d9c[_0x38e691(0xb4)]},'operation':_0x2734da[_0x38e691(0xb2)]('operation'),'code':_0x3a5a6c}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a49_0x5ae27b=a49_0x5483;(function(_0x262640,_0x583c46){const _0x3a98df=a49_0x5483,_0x311af6=_0x262640();while(!![]){try{const _0x3829c9=-parseInt(_0x3a98df(0x12a))/0x1+-parseInt(_0x3a98df(0x11d))/0x2*(parseInt(_0x3a98df(0x116))/0x3)+-parseInt(_0x3a98df(0x122))/0x4+-parseInt(_0x3a98df(0x113))/0x5*(parseInt(_0x3a98df(0x120))/0x6)+-parseInt(_0x3a98df(0x127))/0x7+-parseInt(_0x3a98df(0x11c))/0x8*(-parseInt(_0x3a98df(0x129))/0x9)+-parseInt(_0x3a98df(0x117))/0xa*(-parseInt(_0x3a98df(0x126))/0xb);if(_0x3829c9===_0x583c46)break;else _0x311af6['push'](_0x311af6['shift']());}catch(_0x45ce79){_0x311af6['push'](_0x311af6['shift']());}}}(a49_0x833f,0xdee29));function a49_0x833f(){const _0x3690d9=['sqlCode','3609phGPes','209752doFXxq','bool','read','165uohfsa','sqlName','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','3FljrAB','330ytRueG','target','appCode','sqlcode','Omit\x20import\x20statements\x20from\x20generated\x20code','25744EIrgbU','999946jcGaPB','string','sdk','10122PjUpYT','no-imports','2439140SSejqc','str','sql','boolean','794002fjduDt','9690142aBWANq'];a49_0x833f=function(){return _0x3690d9;};return a49_0x833f();}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a49_0x5483(_0x912b64,_0x8ff76a){_0x912b64=_0x912b64-0x112;const _0x833fae=a49_0x833f();let _0x5483e0=_0x833fae[_0x912b64];return _0x5483e0;}export const codegenSql={'service':'codegen','command':a49_0x5ae27b(0x124),'description':a49_0x5ae27b(0x115),'risk':a49_0x5ae27b(0x112),'flags':[SQLCODE_FLAG,{'name':'target','type':a49_0x5ae27b(0x11e),'description':'Code\x20target:\x20sdk\x20(default)\x20or\x20bff','default':a49_0x5ae27b(0x11f),'enum':[a49_0x5ae27b(0x11f),'bff']},{'name':'no-imports','type':a49_0x5ae27b(0x125),'description':a49_0x5ae27b(0x11b)}],async 'execute'(_0x381bb9){const _0x1dbe22=a49_0x5ae27b,_0x8d683d=await getSqlQueryInfo(_0x381bb9[_0x1dbe22(0x119)],_0x381bb9[_0x1dbe22(0x123)](_0x1dbe22(0x11a))),_0xfbba63=_0x381bb9[_0x1dbe22(0x123)](_0x1dbe22(0x118))||_0x1dbe22(0x11f),_0x5553de=generateSqlCodeTemplate(_0x8d683d,{'target':_0xfbba63,'includeImports':!_0x381bb9[_0x1dbe22(0x12b)](_0x1dbe22(0x121))});return{'ok':!![],'data':{'sqlCode':_0x8d683d[_0x1dbe22(0x128)],'sqlName':_0x8d683d[_0x1dbe22(0x114)],'target':_0xfbba63,'code':_0x5553de}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x10de3a,_0x11a7ce){const _0x49ce91=a50_0x1c9c,_0x5cec15=_0x10de3a();while(!![]){try{const _0x41a147=-parseInt(_0x49ce91(0x9c))/0x1*(-parseInt(_0x49ce91(0x7f))/0x2)+-parseInt(_0x49ce91(0xa3))/0x3+parseInt(_0x49ce91(0x96))/0x4*(parseInt(_0x49ce91(0x9f))/0x5)+parseInt(_0x49ce91(0x8d))/0x6*(parseInt(_0x49ce91(0xa2))/0x7)+-parseInt(_0x49ce91(0x9b))/0x8*(-parseInt(_0x49ce91(0x91))/0x9)+parseInt(_0x49ce91(0x7e))/0xa*(parseInt(_0x49ce91(0x77))/0xb)+-parseInt(_0x49ce91(0x8c))/0xc;if(_0x41a147===_0x11a7ce)break;else _0x5cec15['push'](_0x5cec15['shift']());}catch(_0x673bd){_0x5cec15['push'](_0x5cec15['shift']());}}}(a50_0x3f0b,0x53b67));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a50_0x3f0b(){const _0xa54e59=['project','\x22\x20still\x20defined\x20in\x20','21LtsHNu','237492eSdZVj','keys','\x20Default\x20app\x20changed\x20to\x20\x22','\x20Note:\x20app\x20\x22','length','1529hKpROT','apps','Use\x20global\x20config\x20scope','App\x20code','boolean','Missing\x20app\x20name.','flagMissing','28970BnYTiS','17746uponYY','global','trim','string','Usage:\x20','\x20Remaining\x20app\x20\x22','object','str','\x20<name>\x20[--global]','projectConfig','Removed\x20app\x20\x22','both','Updated','15919224snxUGU','523446Eacmdd','appcode','globalConfig','\x20app\x20\x22','402390qKgCqJ','\x22\x20is\x20selected\x20automatically.','\x22\x20not\x20found.','bool','\x20<name>','15316ZNjnMv','defaultApp','\x20Default\x20app\x20is\x20\x22','validation','\x22\x20(appcode:\x20','72pWmErL','16rvtWuR','args','\x20config.','705sqZdAP'];a50_0x3f0b=function(){return _0xa54e59;};return a50_0x3f0b();}import{collectAppProfileOverrides,getAppProfileFlagDefs,normalizeStoredDefaultApp}from'../../config/schema.js';function a50_0x1c9c(_0x6e9f86,_0x3be904){_0x6e9f86=_0x6e9f86-0x77;const _0x3f0b61=a50_0x3f0b();let _0x1c9ce5=_0x3f0b61[_0x6e9f86];return _0x1c9ce5;}import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x85562a=a50_0x1c9c;return[{'name':_0x85562a(0x8e),'type':_0x85562a(0x82),'description':_0x85562a(0x7a),'required':!![]},{'name':_0x85562a(0x80),'type':_0x85562a(0x7b),'description':_0x85562a(0x79),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x4c07ad=a50_0x1c9c;return[{'name':'global','type':_0x4c07ad(0x7b),'description':_0x4c07ad(0x79),'default':![]}];}export async function validateAppName(_0x2946d3,_0x58cb88){const _0x54ec22=a50_0x1c9c,_0x16305a=_0x2946d3[_0x54ec22(0x9d)][0x0]?.['trim']();if(!_0x16305a)throw CliErrors[_0x54ec22(0x99)]('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x58cb88+_0x54ec22(0x95));}export async function runAppAdd(_0x5c0743,_0x14116a){const _0x3a45a3=a50_0x1c9c,_0x4b793e=_0x5c0743['args'][0x0]?.['trim']();if(!_0x4b793e)throw CliErrors[_0x3a45a3(0x99)](_0x3a45a3(0x7c),_0x3a45a3(0x83)+CLI_BIN_NAME+'\x20'+_0x14116a+'\x20<name>\x20--appcode\x20<code>');const _0x36bf45=_0x5c0743['str'](_0x3a45a3(0x8e));if(!_0x36bf45)throw CliErrors[_0x3a45a3(0x7d)](_0x3a45a3(0x8e),_0x3a45a3(0x83)+CLI_BIN_NAME+'\x20'+_0x14116a+'\x20<name>\x20--appcode\x20<code>');const _0x386746={'global':_0x5c0743[_0x3a45a3(0x94)](_0x3a45a3(0x80))},_0x13a6cd=readConfig(_0x386746);if(!_0x13a6cd['apps'])_0x13a6cd[_0x3a45a3(0x78)]={};const _0x2ef736={'appcode':_0x36bf45,...collectAppProfileOverrides(_0x2e26c1=>_0x5c0743[_0x3a45a3(0x86)](_0x2e26c1))},_0xf6f7b5=_0x13a6cd[_0x3a45a3(0x78)],_0x3c6442=Object['keys'](_0xf6f7b5),_0x453a4a=typeof _0x13a6cd['defaultApp']===_0x3a45a3(0x82)&&_0xf6f7b5[_0x13a6cd[_0x3a45a3(0x97)]]?_0x13a6cd[_0x3a45a3(0x97)]:_0x3c6442[_0x3a45a3(0xa7)]===0x1?_0x3c6442[0x0]:undefined,_0x1488df=!!_0xf6f7b5[_0x4b793e];_0xf6f7b5[_0x4b793e]=_0x2ef736;const _0x4b59a4=normalizeStoredDefaultApp(_0x13a6cd,_0x453a4a);writeConfig(_0x13a6cd,_0x386746);const _0x13f1c9=!_0x1488df&&_0x4b59a4?_0x3a45a3(0x98)+_0x4b59a4+'\x22.':'',_0x2893a4=(_0x1488df?_0x3a45a3(0x8b):'Added')+_0x3a45a3(0x90)+_0x4b793e+_0x3a45a3(0x9a)+_0x36bf45+')'+scopeLabel(_0x386746)+'.'+_0x13f1c9;return{'ok':!![],'message':_0x2893a4};}export async function runAppRemove(_0x2e3622,_0xc4b63){const _0x869d74=a50_0x1c9c,_0x4fa4b1=_0x2e3622[_0x869d74(0x9d)][0x0]?.[_0x869d74(0x81)]();if(!_0x4fa4b1)throw CliErrors[_0x869d74(0x99)](_0x869d74(0x7c),_0x869d74(0x83)+CLI_BIN_NAME+'\x20'+_0xc4b63+_0x869d74(0x87));const _0x6704d2=_0x2e3622[_0x869d74(0x94)](_0x869d74(0x80)),{config:_0x46693c,layers:_0x5314ad}=readRawConfigWithLayers(),_0x2ec12b=_0x46693c[_0x869d74(0x78)]??{};if(!_0x2ec12b[_0x4fa4b1])throw CliErrors['validation']('App\x20\x22'+_0x4fa4b1+_0x869d74(0x93));const _0x35670b=_0x5314ad[_0x869d74(0x8f)][_0x869d74(0x78)]&&typeof _0x5314ad[_0x869d74(0x8f)]['apps']===_0x869d74(0x85)?_0x5314ad[_0x869d74(0x8f)][_0x869d74(0x78)]:{},_0x78608d=_0x5314ad[_0x869d74(0x88)][_0x869d74(0x78)]&&typeof _0x5314ad['projectConfig'][_0x869d74(0x78)]===_0x869d74(0x85)?_0x5314ad['projectConfig']['apps']:{},_0x52ad0f=appDefinedIn(_0x4fa4b1,_0x35670b,_0x78608d),_0x205855=resolveAppScopeForWrite(_0x4fa4b1,_0x6704d2,_0x5314ad),_0x600020={'global':_0x205855===_0x869d74(0x80)},_0x19edac=readConfig(_0x600020),_0x4b2df4=_0x19edac['apps'];if(!_0x4b2df4||!_0x4b2df4[_0x4fa4b1])throw CliErrors['validation']('App\x20\x22'+_0x4fa4b1+_0x869d74(0x93));delete _0x4b2df4[_0x4fa4b1];let _0x109c38='';const _0x5c11ec=typeof _0x19edac[_0x869d74(0x97)]===_0x869d74(0x82)?_0x19edac[_0x869d74(0x97)]:undefined,_0x70b318=Object[_0x869d74(0xa4)](_0x4b2df4),_0x257286=_0x5c11ec===_0x4fa4b1?_0x70b318[0x0]:_0x5c11ec,_0x2bc52b=normalizeStoredDefaultApp(_0x19edac,_0x257286);if(_0x5c11ec===_0x4fa4b1&&_0x70b318[_0x869d74(0xa7)]===0x1)_0x109c38=_0x869d74(0x84)+_0x70b318[0x0]+_0x869d74(0x92);else _0x5c11ec===_0x4fa4b1&&_0x2bc52b&&(_0x109c38=_0x869d74(0xa5)+_0x2bc52b+'\x22.');Object['keys'](_0x4b2df4)[_0x869d74(0xa7)]===0x0&&(delete _0x19edac[_0x869d74(0x78)],delete _0x19edac[_0x869d74(0x97)]);writeConfig(_0x19edac,_0x600020);const _0x2c3307=_0x52ad0f===_0x869d74(0x8a)?_0x869d74(0xa6)+_0x4fa4b1+_0x869d74(0xa1)+(_0x205855===_0x869d74(0xa0)?_0x869d74(0x80):_0x869d74(0xa0))+_0x869d74(0x9e):'';return{'ok':!![],'message':_0x869d74(0x89)+_0x4fa4b1+'\x22'+scopeLabel(_0x600020)+'.'+_0x109c38+_0x2c3307};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x137fad,_0x5f2976){const _0x28ec57=a51_0x1db6,_0x3cc5d8=_0x137fad();while(!![]){try{const _0x19e890=-parseInt(_0x28ec57(0x7b))/0x1+parseInt(_0x28ec57(0x7a))/0x2*(-parseInt(_0x28ec57(0x8a))/0x3)+parseInt(_0x28ec57(0x8f))/0x4*(parseInt(_0x28ec57(0x78))/0x5)+-parseInt(_0x28ec57(0x85))/0x6+-parseInt(_0x28ec57(0x80))/0x7+-parseInt(_0x28ec57(0x8b))/0x8+parseInt(_0x28ec57(0x92))/0x9;if(_0x19e890===_0x5f2976)break;else _0x3cc5d8['push'](_0x3cc5d8['shift']());}catch(_0x5f3dd6){_0x3cc5d8['push'](_0x3cc5d8['shift']());}}}(a51_0x5a5f,0x991db));import{input,checkbox,select}from'@inquirer/prompts';import a51_0x2e122c from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';function a51_0x1db6(_0x4e7e3a,_0x6b33f8){_0x4e7e3a=_0x4e7e3a-0x73;const _0x5a5fd9=a51_0x5a5f();let _0x1db6e3=_0x5a5fd9[_0x4e7e3a];return _0x1db6e3;}import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0xf2c03f=a51_0x1db6,_0x253dd3=await input({'message':_0xf2c03f(0x88),'validate':_0x1c37c0=>{const _0x978f83=_0xf2c03f,_0x515555=validateAppcode(_0x1c37c0['trim']());return _0x515555[_0x978f83(0x87)]||_0x515555[_0x978f83(0x8c)]||'Invalid\x20App\x20Code';}});return _0x253dd3[_0xf2c03f(0x77)]();}export async function promptAppSelection(_0xc10a20){const _0xda9e2a=a51_0x1db6,_0xb4ca50=[{'name':a51_0x2e122c['yellow'](_0xda9e2a(0x7e)),'value':-0x1},..._0xc10a20[_0xda9e2a(0x83)]((_0x4bbd29,_0x40c8a3)=>({'name':_0x4bbd29['appName']+'\x20\x20'+a51_0x2e122c[_0xda9e2a(0x7f)]('('+_0x4bbd29['appCode']+')'),'value':_0x40c8a3}))],_0x12ab43=await checkbox({'message':_0xda9e2a(0x89)+a51_0x2e122c[_0xda9e2a(0x75)](_0xc10a20[_0xda9e2a(0x73)])+_0xda9e2a(0x74),'choices':_0xb4ca50,'loop':![]});if(_0x12ab43['includes'](-0x1))return _0xda9e2a(0x79);if(_0x12ab43[_0xda9e2a(0x73)]===0x0)return'custom';return _0x12ab43['map'](_0xce5450=>_0xc10a20[_0xce5450]);}export async function promptSingleAppSelection(_0xb3c16c){const _0x215fd8=a51_0x1db6,_0x32b051=[{'name':a51_0x2e122c[_0x215fd8(0x7f)]('(Skip;\x20configure\x20later\x20with\x20config\x20set\x20appcode)'),'value':_0x215fd8(0x7d)},{'name':a51_0x2e122c[_0x215fd8(0x81)](_0x215fd8(0x7e)),'value':_0x215fd8(0x79)},..._0xb3c16c[_0x215fd8(0x83)](_0x2909cd=>({'name':_0x2909cd['appName']+'\x20\x20'+a51_0x2e122c['gray']('('+_0x2909cd[_0x215fd8(0x93)]+')'),'value':_0x2909cd[_0x215fd8(0x93)]}))],_0x594e39=await select({'message':_0x215fd8(0x82),'choices':_0x32b051});if(_0x594e39==='skip')return _0x215fd8(0x7d);if(_0x594e39===_0x215fd8(0x79))return'custom';return _0xb3c16c[_0x215fd8(0x86)](_0x45d520=>_0x45d520[_0x215fd8(0x93)]===_0x594e39);}export async function selectSingleAppcode(_0x39fad9){const _0x1d745a=a51_0x1db6;if(!_0x39fad9)return writeCliSideChannelLine(a51_0x2e122c[_0x1d745a(0x7f)]('(No\x20login\x20session.\x20Enter\x20an\x20App\x20Code\x20manually\x20or\x20skip.)')),_fallbackOrSkip();writeCliSideChannelLine(_0x1d745a(0x90));let _0x27b9d1;try{_0x27b9d1=await withActiveCookie(_0x39fad9,()=>listRemoteApps());}catch(_0x2d7d00){writeCliSideChannelLine(a51_0x2e122c[_0x1d745a(0x81)](_0x1d745a(0x76)));if(_0x2d7d00 instanceof Error)writeCliSideChannelLine(a51_0x2e122c[_0x1d745a(0x7f)](_0x1d745a(0x8e)+_0x2d7d00['message']+')'));return _fallbackOrSkip();}if(_0x27b9d1[_0x1d745a(0x73)]===0x0)return writeCliSideChannelLine(a51_0x2e122c['yellow']('No\x20available\x20apps\x20found.')),_fallbackOrSkip();const _0x2341e2=await promptSingleAppSelection(_0x27b9d1);if(_0x2341e2===_0x1d745a(0x7d))return'';if(_0x2341e2===_0x1d745a(0x79))return promptCustomAppcode();return _0x2341e2[_0x1d745a(0x93)];}export async function selectMultipleApps(_0x2e9d40){const _0x2f6bb8=a51_0x1db6;writeCliSideChannelLine(_0x2f6bb8(0x90));let _0x36c90d;try{_0x36c90d=await withActiveCookie(_0x2e9d40,()=>listRemoteApps());}catch(_0x12a835){writeCliSideChannelLine(_0x2f6bb8(0x8d));if(_0x12a835 instanceof Error)writeCliSideChannelLine(_0x2f6bb8(0x8e)+_0x12a835[_0x2f6bb8(0x8c)]+')');return _0x2f6bb8(0x79);}if(_0x36c90d[_0x2f6bb8(0x73)]===0x0)return writeCliSideChannelLine(_0x2f6bb8(0x7c)),_0x2f6bb8(0x79);return promptAppSelection(_0x36c90d);}function a51_0x5a5f(){const _0x2819a4=['\x0aCould\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','\x20\x20(','12nqstBR','Fetching\x20available\x20apps...','(Skip;\x20configure\x20later)','31461759ioivwg','appCode','length','\x20apps.\x20Select\x20with\x20space,\x20a=all,\x20i=invert:','cyan','Could\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','trim','50105luEsTT','custom','9514UMeahp','205395sSNjTh','\x0aNo\x20available\x20apps\x20found.','skip','✎\x20Enter\x20appcode\x20manually','gray','7521374veuGUn','yellow','Select\x20the\x20app\x20to\x20bind:','map','✎\x20Enter\x20manually','139878ewZkwq','find','valid','App\x20Code:','Found\x20','297toouVp','8996144OfSmSh','message'];a51_0x5a5f=function(){return _0x2819a4;};return a51_0x5a5f();}async function _fallbackOrSkip(){const _0x238525=a51_0x1db6,_0x45fe2a=await select({'message':_0x238525(0x88),'choices':[{'name':a51_0x2e122c[_0x238525(0x7f)](_0x238525(0x91)),'value':_0x238525(0x7d)},{'name':a51_0x2e122c['yellow'](_0x238525(0x84)),'value':'manual'}]});if(_0x45fe2a===_0x238525(0x7d))return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a52_0x1dc69d=a52_0x5a91;(function(_0x350810,_0x39d039){const _0x1a89d0=a52_0x5a91,_0xa327e6=_0x350810();while(!![]){try{const _0x48c704=parseInt(_0x1a89d0(0x121))/0x1*(-parseInt(_0x1a89d0(0x119))/0x2)+-parseInt(_0x1a89d0(0x138))/0x3+parseInt(_0x1a89d0(0x130))/0x4+parseInt(_0x1a89d0(0x11f))/0x5+parseInt(_0x1a89d0(0x11e))/0x6*(-parseInt(_0x1a89d0(0x11a))/0x7)+parseInt(_0x1a89d0(0x12e))/0x8+parseInt(_0x1a89d0(0x11c))/0x9;if(_0x48c704===_0x39d039)break;else _0xa327e6['push'](_0xa327e6['shift']());}catch(_0x17d3b5){_0xa327e6['push'](_0xa327e6['shift']());}}}(a52_0x2448,0xc29aa));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a52_0x1dc69d(0x127),a52_0x1dc69d(0x124)]),NON_TERMINAL_STATUSES=new Set(['PENDING',a52_0x1dc69d(0x120)]);export function normalizeAsyncTask(_0x1d15f3){const _0xd3b2bc=a52_0x1dc69d,_0xcbb8f8=typeof _0x1d15f3?.[_0xd3b2bc(0x12d)]===_0xd3b2bc(0x137)?_0x1d15f3['taskId'][_0xd3b2bc(0x123)]():'';if(!_0xcbb8f8)throw CliErrors[_0xd3b2bc(0x136)](_0xd3b2bc(0x12f));const _0x1dcf0d=typeof _0x1d15f3[_0xd3b2bc(0x135)]==='string'?_0x1d15f3[_0xd3b2bc(0x135)]['trim']()[_0xd3b2bc(0x12b)]():'';if(!_0x1dcf0d)throw CliErrors[_0xd3b2bc(0x136)](_0xd3b2bc(0x12a)+_0xcbb8f8+_0xd3b2bc(0x129));return{'taskId':_0xcbb8f8,'status':_0x1dcf0d,'errorMessage':typeof _0x1d15f3[_0xd3b2bc(0x117)]===_0xd3b2bc(0x137)&&_0x1d15f3[_0xd3b2bc(0x117)][_0xd3b2bc(0x123)]()?_0x1d15f3[_0xd3b2bc(0x117)][_0xd3b2bc(0x123)]():null,'isTerminal':TERMINAL_STATUSES[_0xd3b2bc(0x133)](_0x1dcf0d),'knownStatus':TERMINAL_STATUSES[_0xd3b2bc(0x133)](_0x1dcf0d)||NON_TERMINAL_STATUSES['has'](_0x1dcf0d)};}function a52_0x2448(){const _0x29db0d=['\x20is\x20pending.','\x20response\x20did\x20not\x20contain\x20a\x20status.','Async\x20task\x20','toUpperCase','PENDING','taskId','6682504MOZVfn','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','3570692MxeOXp','replace','\x20is\x20processing.','has','\x20failed.','status','apiError','string','4722738tCFXxh','\x20--format\x20compress','errorMessage','\x20task\x20status\x20--task-id\x20','236IhVROX','33313zrEZAe','\x20completed\x20successfully.','3627675lWDOhu','\x20--appcode\x20','678CGpAaE','5275570EKPVtm','PROCESSING','2348QBSZPr','\x20failed:\x20','trim','FAILED','\x20returned\x20unknown\x20status\x20','Task\x20','SUCCESS'];a52_0x2448=function(){return _0x29db0d;};return a52_0x2448();}export function buildAsyncTaskStatusCommand(_0x237c9e,_0x27cf6c){const _0x402e38=a52_0x1dc69d;return CLI_BIN_NAME+_0x402e38(0x118)+quoteShellArg(_0x237c9e)+_0x402e38(0x11d)+quoteShellArg(_0x27cf6c)+_0x402e38(0x139);}function a52_0x5a91(_0x16e7f0,_0x4597e2){_0x16e7f0=_0x16e7f0-0x117;const _0x2448fa=a52_0x2448();let _0x5a9192=_0x2448fa[_0x16e7f0];return _0x5a9192;}export function asyncTaskMessage(_0x7e0516){const _0x1c3de4=a52_0x1dc69d;switch(_0x7e0516['status']){case _0x1c3de4(0x12c):return _0x1c3de4(0x126)+_0x7e0516['taskId']+_0x1c3de4(0x128);case _0x1c3de4(0x120):return'Task\x20'+_0x7e0516[_0x1c3de4(0x12d)]+_0x1c3de4(0x132);case _0x1c3de4(0x127):return _0x1c3de4(0x126)+_0x7e0516[_0x1c3de4(0x12d)]+_0x1c3de4(0x11b);case _0x1c3de4(0x124):return _0x7e0516[_0x1c3de4(0x117)]?_0x1c3de4(0x126)+_0x7e0516[_0x1c3de4(0x12d)]+_0x1c3de4(0x122)+_0x7e0516[_0x1c3de4(0x117)]:_0x1c3de4(0x126)+_0x7e0516[_0x1c3de4(0x12d)]+_0x1c3de4(0x134);default:return _0x1c3de4(0x126)+_0x7e0516['taskId']+_0x1c3de4(0x125)+_0x7e0516[_0x1c3de4(0x135)]+'.';}}function quoteShellArg(_0x53d1e3){const _0x3b6a29=a52_0x1dc69d;return'\x27'+_0x53d1e3[_0x3b6a29(0x131)](/'/g,'\x27\x5c\x27\x27')+'\x27';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2ee287,_0x142e7a){var _0x1588f1=a53_0x4242,_0x10c859=_0x2ee287();while(!![]){try{var _0x2d36cd=-parseInt(_0x1588f1(0x8b))/0x1*(parseInt(_0x1588f1(0x8f))/0x2)+-parseInt(_0x1588f1(0x92))/0x3+parseInt(_0x1588f1(0x8d))/0x4*(-parseInt(_0x1588f1(0x95))/0x5)+parseInt(_0x1588f1(0x94))/0x6+-parseInt(_0x1588f1(0x8c))/0x7+parseInt(_0x1588f1(0x91))/0x8*(parseInt(_0x1588f1(0x8a))/0x9)+parseInt(_0x1588f1(0x89))/0xa;if(_0x2d36cd===_0x142e7a)break;else _0x10c859['push'](_0x10c859['shift']());}catch(_0x50b0d3){_0x10c859['push'](_0x10c859['shift']());}}}(a53_0x9b34,0x25810));function a53_0x4242(_0xfc3310,_0x34dbbc){_0xfc3310=_0xfc3310-0x89;var _0x9b3442=a53_0x9b34();var _0x424294=_0x9b3442[_0xfc3310];return _0x424294;}export function asDryRunResult(_0x1e3eaa,_0x584ab4){var _0x31264b=a53_0x4242;return Object[_0x31264b(0x90)](_0x1e3eaa,{'method':{'value':_0x584ab4[_0x31264b(0x8e)],'enumerable':![]},'url':{'value':_0x584ab4['url'],'enumerable':![]},..._0x584ab4[_0x31264b(0x93)]?{'description':{'value':_0x584ab4[_0x31264b(0x93)],'enumerable':![]}}:{}});}function a53_0x9b34(){var _0x18b3f7=['64549KLsxFA','44492tqJCKa','283256RBnTjB','method','4wPwyZa','defineProperties','16wWWnzu','921252HHaGRP','description','991632FPTvcU','5phaOVA','2648680WdOSxW','1065726wMvnCc'];a53_0x9b34=function(){return _0x18b3f7;};return a53_0x9b34();}
|
|
@@ -5,6 +5,13 @@
|
|
|
5
5
|
* 确保 pattern / description / required 等元数据保持一致。
|
|
6
6
|
*/
|
|
7
7
|
import type { FlagDef } from "../../framework/types.js";
|
|
8
|
+
export declare const CROSS_RELATION_FROM_DATASET_FLAG: FlagDef;
|
|
9
|
+
export declare const CROSS_RELATION_FROM_COLUMN_FLAG: FlagDef;
|
|
10
|
+
export declare const CROSS_RELATION_TO_DATASET_FLAG: FlagDef;
|
|
11
|
+
export declare const CROSS_RELATION_TO_COLUMN_FLAG: FlagDef;
|
|
12
|
+
export declare const CROSS_RELATION_DBLINK_FLAG: FlagDef;
|
|
13
|
+
export declare const CROSS_RELATION_LABEL_FLAG: FlagDef;
|
|
14
|
+
export declare const CROSS_RELATION_CARDINALITY_FLAG: FlagDef;
|
|
8
15
|
/** Write configuration to the user-level config instead of the current project. */
|
|
9
16
|
export declare const GLOBAL_SCOPE_FLAG: FlagDef;
|
|
10
17
|
export declare const DATASET_CODE_PATTERN: NonNullable<FlagDef["pattern"]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a54_0x56e796=a54_0x2dd1;(function(_0xfc6c84,_0x498af3){const _0x6b4324=a54_0x2dd1,_0x247131=_0xfc6c84();while(!![]){try{const _0x33120e=parseInt(_0x6b4324(0x1f5))/0x1*(-parseInt(_0x6b4324(0x1ed))/0x2)+-parseInt(_0x6b4324(0x1f3))/0x3+parseInt(_0x6b4324(0x1e8))/0x4+parseInt(_0x6b4324(0x1e3))/0x5*(parseInt(_0x6b4324(0x1d5))/0x6)+parseInt(_0x6b4324(0x1ce))/0x7+parseInt(_0x6b4324(0x1f0))/0x8*(-parseInt(_0x6b4324(0x1d3))/0x9)+parseInt(_0x6b4324(0x1f8))/0xa*(-parseInt(_0x6b4324(0x1e4))/0xb);if(_0x33120e===_0x498af3)break;else _0x247131['push'](_0x247131['shift']());}catch(_0x29c28a){_0x247131['push'](_0x247131['shift']());}}}(a54_0x1351,0x419b7));export const CROSS_RELATION_FROM_DATASET_FLAG={'name':a54_0x56e796(0x1e1),'type':a54_0x56e796(0x1d6),'required':!![],'description':a54_0x56e796(0x1df)};export const CROSS_RELATION_FROM_COLUMN_FLAG={'name':a54_0x56e796(0x1f6),'type':a54_0x56e796(0x1d6),'required':!![],'description':a54_0x56e796(0x1d8)};export const CROSS_RELATION_TO_DATASET_FLAG={'name':a54_0x56e796(0x1cc),'type':a54_0x56e796(0x1d6),'required':!![],'description':a54_0x56e796(0x1d2)};export const CROSS_RELATION_TO_COLUMN_FLAG={'name':a54_0x56e796(0x1f4),'type':a54_0x56e796(0x1d6),'required':!![],'description':a54_0x56e796(0x1cd)};export const CROSS_RELATION_DBLINK_FLAG={'name':a54_0x56e796(0x1d1),'type':a54_0x56e796(0x1de),'description':a54_0x56e796(0x1db)};export const CROSS_RELATION_LABEL_FLAG={'name':'to-label-column','type':a54_0x56e796(0x1d6),'description':a54_0x56e796(0x1d4)};export const CROSS_RELATION_CARDINALITY_FLAG={'name':a54_0x56e796(0x1e0),'type':'string','enum':[a54_0x56e796(0x1eb),'ONE_TO_MANY',a54_0x56e796(0x1cb),a54_0x56e796(0x1ec)],'description':'Relation\x20cardinality;\x20create\x20leaves\x20it\x20unset\x20when\x20omitted,\x20update\x20keeps\x20the\x20current\x20value'};export const GLOBAL_SCOPE_FLAG={'name':a54_0x56e796(0x1e6),'type':'boolean','default':![],'description':a54_0x56e796(0x1f7)};export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a54_0x56e796(0x1e7)};function a54_0x2dd1(_0x46a011,_0x1dac54){_0x46a011=_0x46a011-0x1cb;const _0x135138=a54_0x1351();let _0x2dd15a=_0x135138[_0x46a011];return _0x2dd15a;}export const CODE_FLAG={'name':a54_0x56e796(0x1d9),'type':a54_0x56e796(0x1d6),'required':!![],'description':a54_0x56e796(0x1e9),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a54_0x56e796(0x1e5),'description':a54_0x56e796(0x1e9)};export const SQLCODE_FLAG={'name':a54_0x56e796(0x1d7),'type':a54_0x56e796(0x1d6),'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':a54_0x56e796(0x1dd)}};function a54_0x1351(){const _0x47c64b=['Source\x20DB_TABLE\x20dataset\x20code','cardinality','from-datasetcode','appcode','1235ZnQpNb','11gnpMvb','datasetcode','global','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','2026524qrfhNB','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','boolean','ONE_TO_ONE','MANY_TO_MANY','188JXjqrS','Database\x20product\x20type','skip-connection-test','360jwXRuM','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','App\x20code\x20(e.g.\x20app-xxxxx)','1252326nCkutj','to-column','1159PXInVw','from-column','Write\x20to\x20the\x20global\x20configuration','1303880WVZNER','MANY_TO_ONE','to-datasetcode','Target\x20field\x20name','2237501rVRSgb','Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update','dbtype','from-dblink-id','Target\x20DB_TABLE\x20dataset\x20code','6435gYEeiN','Target\x20display\x20field;\x20create\x20defaults\x20to\x20the\x20target\x20field,\x20update\x20keeps\x20the\x20current\x20value','3192VYqunV','string','sqlcode','Source\x20field\x20name\x20used\x20to\x20locate\x20the\x20relation','code','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','Source\x20database\x20connection\x20ID;\x20derived\x20from\x20the\x20source\x20dataset\x20when\x20omitted','POSTGRESQL','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','number'];a54_0x1351=function(){return _0x47c64b;};return a54_0x1351();}export const APPCODE_FLAG_OPTIONAL={'name':a54_0x56e796(0x1e2),'type':a54_0x56e796(0x1d6),'required':![],'description':a54_0x56e796(0x1da)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a54_0x56e796(0x1f2)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a54_0x56e796(0x1de),'required':!![],'description':a54_0x56e796(0x1f1)};export const DB_TYPE_FLAG={'name':a54_0x56e796(0x1d0),'type':a54_0x56e796(0x1d6),'required':!![],'description':a54_0x56e796(0x1ee),'enum':['MYSQL',a54_0x56e796(0x1dc)]};export const SKIP_CONNECTION_TEST_FLAG={'name':a54_0x56e796(0x1ef),'type':a54_0x56e796(0x1ea),'description':a54_0x56e796(0x1cf)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x25ea73,_0x3f8e37){const _0x2fde3b=a55_0x85dc,_0x1a8f83=_0x25ea73();while(!![]){try{const _0x12154d=-parseInt(_0x2fde3b(0x1e7))/0x1+-parseInt(_0x2fde3b(0x1e0))/0x2+parseInt(_0x2fde3b(0x1e2))/0x3*(-parseInt(_0x2fde3b(0x1e1))/0x4)+-parseInt(_0x2fde3b(0x1df))/0x5*(parseInt(_0x2fde3b(0x1db))/0x6)+-parseInt(_0x2fde3b(0x1de))/0x7+-parseInt(_0x2fde3b(0x1e8))/0x8*(parseInt(_0x2fde3b(0x1e5))/0x9)+-parseInt(_0x2fde3b(0x1da))/0xa*(-parseInt(_0x2fde3b(0x1e3))/0xb);if(_0x12154d===_0x3f8e37)break;else _0x1a8f83['push'](_0x1a8f83['shift']());}catch(_0x925cfd){_0x1a8f83['push'](_0x1a8f83['shift']());}}}(a55_0x3a16,0x3c6f3));import{existsSync,statSync}from'node:fs';function a55_0x3a16(){const _0x3742a9=['44RKPzUK','isFile','9xpMQHP','size','134064NqYFek','3444576PwedeO','trim','\x20path\x20is\x20required.','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','3871900pmxrVl','8196oQdpDo','toFixed','validation','957068wtArBy','190ViWJnH','947036HItAVU','297740zZrmIL','3wuuSAA'];a55_0x3a16=function(){return _0x3742a9;};return a55_0x3a16();}import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;function a55_0x85dc(_0x5039fb,_0x59eb83){_0x5039fb=_0x5039fb-0x1d9;const _0x3a169b=a55_0x3a16();let _0x85dc67=_0x3a169b[_0x5039fb];return _0x85dc67;}export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x10d5f2){const _0x345b59=a55_0x85dc;if(_0x10d5f2>=BYTES_PER_MB){const _0x5940d2=Math['ceil'](_0x10d5f2/BYTES_PER_MB*0x64)/0x64;return _0x5940d2[_0x345b59(0x1dc)](0x2)+'\x20MB';}return _0x10d5f2+'\x20B';}export function requireDevelopmentUploadFile(_0x50770f,_0x3d9a5d){const _0x4e512d=a55_0x85dc,_0x256881=_0x50770f[_0x4e512d(0x1e9)]();if(!_0x256881)throw CliErrors['validation'](_0x3d9a5d+_0x4e512d(0x1ea));if(!existsSync(_0x256881))throw CliErrors['validation']('File\x20not\x20found:\x20'+_0x256881);const _0x1e058f=statSync(_0x256881);if(!_0x1e058f[_0x4e512d(0x1e4)]())throw CliErrors[_0x4e512d(0x1dd)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x256881);if(_0x1e058f[_0x4e512d(0x1e6)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x4e512d(0x1dd)](_0x4e512d(0x1d9)+_0x256881+'\x20('+formatBytes(_0x1e058f[_0x4e512d(0x1e6)])+')');return{'path':_0x256881,'size':_0x1e058f['size']};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a56_0x2c0e(_0x3329e4,_0xea71d){_0x3329e4=_0x3329e4-0xb0;const _0x988dde=a56_0x988d();let _0x2c0e25=_0x988dde[_0x3329e4];return _0x2c0e25;}function a56_0x988d(){const _0x3d0dca=['4422TCMRst','test','length','trim','4679171DGZCRn','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','2757582uaiDcc','9913510kBrrIK','2TUHtgj','2094Asmbhb','144IoulIr','12435tGNJcJ','8KNibTL','679330sKxpMQ','90948EQLqsI','App\x20Code\x20cannot\x20be\x20empty','31965cUYZpD'];a56_0x988d=function(){return _0x3d0dca;};return a56_0x988d();}(function(_0x463b4e,_0x315bc4){const _0x26293d=a56_0x2c0e,_0x37c2a3=_0x463b4e();while(!![]){try{const _0x4744d1=parseInt(_0x26293d(0xbf))/0x1*(parseInt(_0x26293d(0xb3))/0x2)+parseInt(_0x26293d(0xb6))/0x3*(-parseInt(_0x26293d(0xb0))/0x4)+parseInt(_0x26293d(0xb1))/0x5*(-parseInt(_0x26293d(0xc0))/0x6)+parseInt(_0x26293d(0xbb))/0x7*(-parseInt(_0x26293d(0xb2))/0x8)+-parseInt(_0x26293d(0xbd))/0x9+-parseInt(_0x26293d(0xbe))/0xa+-parseInt(_0x26293d(0xb7))/0xb*(-parseInt(_0x26293d(0xb4))/0xc);if(_0x4744d1===_0x315bc4)break;else _0x37c2a3['push'](_0x37c2a3['shift']());}catch(_0xe6f2dc){_0x37c2a3['push'](_0x37c2a3['shift']());}}}(a56_0x988d,0x7c1b7));export function validateAppcode(_0x3e3254){const _0x3da912=a56_0x2c0e,_0xd38ee9=_0x3e3254[_0x3da912(0xba)]();if(!_0xd38ee9)return{'valid':![],'message':_0x3da912(0xb5)};if(_0xd38ee9[_0x3da912(0xb9)]>0x64)return{'valid':![],'message':'App\x20Code\x20cannot\x20exceed\x20100\x20characters'};if(!/^[A-Za-z0-9_-]+$/[_0x3da912(0xb8)](_0xd38ee9))return{'valid':![],'message':_0x3da912(0xbc)};return{'valid':!![]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a57_0x5df0c9=a57_0x5443;function a57_0x31fe(){const _0x250d04=['prototype','routing','bool','85ntUqQz','hasOwnProperty','Missing\x20key\x20argument.','8MXsvYN','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','Top-level\x20key\x20\x22','inherit','trim','config','\x22\x20is\x20not\x20deletable.','222272xtilXE','31866GviCUM','3777DPQlTu','has','24625LhWwnk','722907WmWhRq','args','Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','validation','Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.','delete','call','global','348qTsmoO','write','304157xrMMcX','Project','Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','Usage:\x20','2834070bCVDPX'];a57_0x31fe=function(){return _0x250d04;};return a57_0x31fe();}(function(_0x58b44c,_0x1a7f10){const _0x34fcc1=a57_0x5443,_0x395b47=_0x58b44c();while(!![]){try{const _0x2e044e=parseInt(_0x34fcc1(0x154))/0x1*(-parseInt(_0x34fcc1(0x149))/0x2)+parseInt(_0x34fcc1(0x152))/0x3*(-parseInt(_0x34fcc1(0x13c))/0x4)+-parseInt(_0x34fcc1(0x146))/0x5*(-parseInt(_0x34fcc1(0x151))/0x6)+parseInt(_0x34fcc1(0x13e))/0x7+-parseInt(_0x34fcc1(0x150))/0x8+-parseInt(_0x34fcc1(0x155))/0x9+parseInt(_0x34fcc1(0x142))/0xa;if(_0x2e044e===_0x1a7f10)break;else _0x395b47['push'](_0x395b47['shift']());}catch(_0x372bdf){_0x395b47['push'](_0x395b47['shift']());}}}(a57_0x31fe,0x18a8d));function a57_0x5443(_0x3c0c7d,_0x16859a){_0x3c0c7d=_0x3c0c7d-0x13c;const _0x31feec=a57_0x31fe();let _0x544313=_0x31feec[_0x3c0c7d];return _0x544313;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';const LEGACY_DELETABLE_KEYS=new Set([a57_0x5df0c9(0x14c)]),EXTRA_DELETABLE_KEYS=new Set(['defaultApp',a57_0x5df0c9(0x144)]);async function execute(_0x460441){const _0x4a02ca=a57_0x5df0c9,_0x182056=_0x460441[_0x4a02ca(0x156)][0x0]?.[_0x4a02ca(0x14d)]();if(!_0x182056)throw CliErrors['validation'](_0x4a02ca(0x148),_0x4a02ca(0x141)+CLI_BIN_NAME+'\x20config\x20delete\x20<key>\x20[--global]');if(_0x182056==='riskLevel')throw CliErrors[_0x4a02ca(0x158)](_0x4a02ca(0x14a));if(!isTopLevelConfigKey(_0x182056)&&!EXTRA_DELETABLE_KEYS[_0x4a02ca(0x153)](_0x182056)&&!LEGACY_DELETABLE_KEYS[_0x4a02ca(0x153)](_0x182056))throw CliErrors['validation'](_0x4a02ca(0x14b)+_0x182056+_0x4a02ca(0x14f),_0x4a02ca(0x159));const _0xdb459=resolveWriteScope({'global':_0x460441[_0x4a02ca(0x145)](_0x4a02ca(0x15c))}),_0x3bf00b=readScopedConfig(_0xdb459),_0x250a15=Object[_0x4a02ca(0x143)][_0x4a02ca(0x147)][_0x4a02ca(0x15b)](_0x3bf00b,_0x182056);_0x250a15&&(delete _0x3bf00b[_0x182056],writeScopedConfig(_0x3bf00b,_0xdb459));const _0x503c8f=_0xdb459===_0x4a02ca(0x15c)?'Global':_0x4a02ca(0x13f);return{'ok':!![],'message':_0x250a15?'✓\x20'+_0x503c8f+'\x20'+_0x182056+'\x20deleted':'✓\x20'+_0x503c8f+'\x20'+_0x182056+'\x20already\x20absent','data':{'key':_0x182056,'scope':_0xdb459,'changed':_0x250a15}};}export const configDeleteDefinition={'service':a57_0x5df0c9(0x14e),'command':a57_0x5df0c9(0x15a),'description':'Delete\x20a\x20config\x20value\x20from\x20one\x20scope','risk':a57_0x5df0c9(0x13d),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':'key','description':a57_0x5df0c9(0x140),'required':!![]}],'flags':[{'name':a57_0x5df0c9(0x15c),'type':'boolean','description':a57_0x5df0c9(0x157),'default':![]}],'execute':execute};
|