@lovrabet/rabetbase-cli 2.5.9-beta.1 → 2.5.10-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/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/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +2 -2
- package/skills/rabetbase/SKILL.md +2 -2
- package/skills/rabetbase-dataset-generation/SKILL.md +2 -2
- package/skills/rabetbase-page-generation/SKILL.md +2 -2
- package/skills/rabetbase.manifest.json +3 -3
package/lib/commands/bff/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a44_0x56f74b=a44_0x5f1d;(function(_0x4f077b,_0x3f6f96){const _0x2979f9=a44_0x5f1d,_0x55af67=_0x4f077b();while(!![]){try{const _0x591a66=parseInt(_0x2979f9(0x1bb))/0x1+-parseInt(_0x2979f9(0x1bc))/0x2*(parseInt(_0x2979f9(0x1f8))/0x3)+-parseInt(_0x2979f9(0x1b8))/0x4*(parseInt(_0x2979f9(0x1c2))/0x5)+-parseInt(_0x2979f9(0x1f3))/0x6*(-parseInt(_0x2979f9(0x1a7))/0x7)+parseInt(_0x2979f9(0x1f1))/0x8*(-parseInt(_0x2979f9(0x1cb))/0x9)+parseInt(_0x2979f9(0x193))/0xa+parseInt(_0x2979f9(0x1d7))/0xb*(parseInt(_0x2979f9(0x198))/0xc);if(_0x591a66===_0x3f6f96)break;else _0x55af67['push'](_0x55af67['shift']());}catch(_0x17a4b8){_0x55af67['push'](_0x55af67['shift']());}}}(a44_0x2f6b,0x74df3));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';function a44_0x2f6b(){const _0x1e0030=['Would\x20inspect\x20','existingHooks','\x20resolution','BFF_REMOTE_VERSION_CHANGED','6849hkmuDF','bool','Incomplete\x20HOOK\x20path:\x20','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','startsWith','flatMap','description','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','appCode','apps','push','after','55uXjvZB','No\x20local\x20Backend\x20Function\x20scripts\x20found.','selectedAppName','apiDir','warnings','failures','datasetId','force','EXISTING_HOOK_BINDING_PRESERVED','parse','Force\x20push\x20ignoring\x20hash\x20protection','HOOK','name','scriptsRoot','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','update','\x22\x20not\x20found\x20after\x20ensureLockScope.','create','filter','\x20uploaded','runtime\x20cache\x20cleared','get','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','lastSync','attempted','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','8040ukltDq','str','29760hYSvhA','Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.','lockFilePath','version','datasetCode','17175nJRwEN','delete','map','remoteId','\x20failed','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','runtime\x20cache\x20not\x20needed','resolutions','6352390KMIQOH','unchanged','has','before','would_push','1129272SllYEw','filePath','Push\x20complete:\x20','type','utf8','values','BFF_REMOTE_VERSION_MISSING','test','\x20skipped','boolean','Push\x20only\x20this\x20script\x20type','add','string','operationType','dataset','224lZBVCd','HOOK_DATASET_NOT_FOUND:','functions',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','\x20bff\x20detail\x20--id\x20','defaultApp','lockKey','alias','require','size','functionName','Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20','validation','Lock\x20scope\x20for\x20app\x20\x22','every','COMMON','runtime\x20cache\x20clear\x20failed','4660WzxWRS','mergedCli','status','783793uBCApJ','168aMYCfM','length','functionNode','Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.','message','join','1390WNMPtI','some','Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.','set','hash'];a44_0x2f6b=function(){return _0x1e0030;};return a44_0x2f6b();}import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription,snakeToCamel}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';function a44_0x5f1d(_0x133b78,_0x52c12b){_0x133b78=_0x133b78-0x18d;const _0x2f6bd2=a44_0x2f6b();let _0x5f1d9e=_0x2f6bd2[_0x133b78];return _0x5f1d9e;}const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':'bff','command':a44_0x56f74b(0x1d5),'description':a44_0x56f74b(0x190),'risk':'write','structuredErrors':!![],'flags':[{'name':'type','type':a44_0x56f74b(0x1a4),'description':a44_0x56f74b(0x1a2),'enum':[a44_0x56f74b(0x1b6),'ENDPOINT','HOOK']},{'name':a44_0x56f74b(0x1e3),'type':a44_0x56f74b(0x1a4),'description':a44_0x56f74b(0x1d2)},{'name':a44_0x56f74b(0x1de),'type':a44_0x56f74b(0x1a1),'description':a44_0x56f74b(0x1e1)}],async 'dryRun'(_0x72dd35){const _0x368cea=a44_0x56f74b,_0x461edf=loadBffProjectConfig(_0x72dd35[_0x368cea(0x1d3)]),_0x267ff4=await readBffLockFile(_0x461edf[_0x368cea(0x1f5)]),{appLock:_0x5e8e94}=ensureLockScope(_0x267ff4??createEmptyBffLock(),_0x72dd35[_0x368cea(0x1d3)],_0x461edf[_0x368cea(0x1e4)],_0x368cea(0x1d5)),_0x254b54=await getTargetFunctions(_0x461edf,_0x72dd35),_0x53dbb4=_0x254b54[_0x368cea(0x1c3)](_0x422547=>_0x422547[_0x368cea(0x19b)]===_0x368cea(0x1e2))?await scanLocalBffFunctions(_0x461edf,_0x368cea(0x1e2)):_0x254b54,_0x5ad9b6=await buildHookMaps(_0x72dd35[_0x368cea(0x1d3)],_0x72dd35['apiDir'],_0x53dbb4,_0x5e8e94,_0x72dd35[_0x368cea(0x1d9)]||_0x72dd35[_0x368cea(0x1b9)]?.['currentApp']||_0x72dd35[_0x368cea(0x1b9)]?.[_0x368cea(0x1ac)]),_0x2f77a4=_0x72dd35['bool'](_0x368cea(0x1de)),_0x582861=[];for(const _0x5f5af6 of _0x254b54){const _0xbafa79=await computeFileHash(_0x5f5af6[_0x368cea(0x199)]),_0x580db5=_0x5e8e94[_0x368cea(0x1a9)][_0x5f5af6[_0x368cea(0x1ad)]],_0x5ca10a=!!_0x580db5&&_0x580db5[_0x368cea(0x1c6)]===_0xbafa79,_0x52486a=_0x5ad9b6[_0x368cea(0x192)][_0x368cea(0x1ec)](_0x5f5af6[_0x368cea(0x1ad)]),_0x19be78=!!_0x580db5?.[_0x368cea(0x18e)]&&_0x580db5['version']==null&&(_0x2f77a4||!_0x5ca10a),_0x18f9f3=_0x19be78?missingRemoteVersionConflict(_0x5f5af6,_0x580db5):undefined,_0x2da105=_0x5ad9b6[_0x368cea(0x1dc)]['has'](_0x5f5af6[_0x368cea(0x1ad)])?'failed':!_0x2f77a4&&_0x5ca10a?_0x368cea(0x194):_0x18f9f3?'conflict':'would_push';_0x582861[_0x368cea(0x1d5)]({'lockKey':_0x5f5af6[_0x368cea(0x1ad)],'filePath':_0x5f5af6[_0x368cea(0x199)],'remoteId':_0x580db5?.['remoteId']??null,'mode':_0x580db5?.['remoteId']?_0x368cea(0x1e6):_0x368cea(0x1e8),'status':_0x2da105,..._0x5ad9b6['failures'][_0x368cea(0x195)](_0x5f5af6[_0x368cea(0x1ad)])?{'error':_0x5ad9b6[_0x368cea(0x1dc)][_0x368cea(0x1ec)](_0x5f5af6['lockKey'])}:{},..._0x18f9f3?{'conflict':_0x18f9f3}:{},..._0x5ad9b6['existingHooks'][_0x368cea(0x195)](_0x5f5af6[_0x368cea(0x1ad)])?{'datasetCode':_0x580db5?.[_0x368cea(0x1f7)],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x5f5af6[_0x368cea(0x1ad)])]}:{},..._0x52486a?{'alias':_0x52486a[_0x368cea(0x1ae)]??null,'datasetCode':_0x52486a[_0x368cea(0x1f7)],'operationType':_0x5f5af6[_0x368cea(0x1a5)],'functionNode':_0x5f5af6[_0x368cea(0x1be)],'warnings':_0x52486a[_0x368cea(0x1db)]}:{}});}return{'method':'POST','url':'/api/management/library/scripts/save','body':{'appCode':_0x72dd35['appCode'],'force':_0x2f77a4,'files':_0x582861,'cacheClearAtRuntime':_0x582861[_0x368cea(0x1c3)](_0x1dcddb=>_0x1dcddb[_0x368cea(0x1ba)]==='would_push'),'cacheClearAtRuntimeTimes':_0x582861['some'](_0x2b1dc3=>_0x2b1dc3[_0x368cea(0x1ba)]===_0x368cea(0x197))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x368cea(0x1c7)+_0x582861['length']+_0x368cea(0x1ce)};},async 'execute'(_0x5e7d52){const _0x5c6760=a44_0x56f74b,_0x9b7e14=loadBffProjectConfig(_0x5e7d52[_0x5c6760(0x1d3)]),_0x489a5d=await readBffLockFile(_0x9b7e14['lockFilePath']),{lockData:_0x196268,appLock:_0x46de7f}=ensureLockScope(_0x489a5d??createEmptyBffLock(),_0x5e7d52[_0x5c6760(0x1d3)],_0x9b7e14[_0x5c6760(0x1e4)],_0x5c6760(0x1d5)),_0x84a6c=await getTargetFunctions(_0x9b7e14,_0x5e7d52);if(_0x84a6c[_0x5c6760(0x1bd)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':_0x5c6760(0x1d8)};const _0x5019f9=_0x5e7d52[_0x5c6760(0x1cc)]('force'),_0x4fd62f=JSON[_0x5c6760(0x1e0)](JSON['stringify'](_0x196268)),_0x37067c=_0x4fd62f[_0x5c6760(0x1d4)][_0x5e7d52[_0x5c6760(0x1d3)]];if(!_0x37067c)throw new Error(_0x5c6760(0x1b4)+_0x5e7d52[_0x5c6760(0x1d3)]+_0x5c6760(0x1e7));const _0xcbd774=_0x84a6c[_0x5c6760(0x1c3)](_0x4a4d51=>_0x4a4d51['type']===_0x5c6760(0x1e2))?await scanLocalBffFunctions(_0x9b7e14,_0x5c6760(0x1e2)):_0x84a6c,_0x751df4=await buildHookMaps(_0x5e7d52[_0x5c6760(0x1d3)],_0x5e7d52[_0x5c6760(0x1da)],_0xcbd774,_0x37067c,_0x5e7d52[_0x5c6760(0x1d9)]||_0x5e7d52[_0x5c6760(0x1b9)]?.['currentApp']||_0x5e7d52[_0x5c6760(0x1b9)]?.[_0x5c6760(0x1ac)]),_0x2735e3=[],_0x4548c3=[],_0x27fb88=[],_0x21ed05=[];for(const _0x38856c of _0x84a6c){const _0x188f22=_0x751df4[_0x5c6760(0x1dc)]['get'](_0x38856c[_0x5c6760(0x1ad)]);if(_0x188f22){_0x21ed05[_0x5c6760(0x1d5)]({'lockKey':_0x38856c[_0x5c6760(0x1ad)],'error':_0x188f22});continue;}const _0x1a0e4c=await computeFileHash(_0x38856c['filePath']),_0x49b3b1=_0x37067c[_0x5c6760(0x1a9)][_0x38856c['lockKey']];if(!_0x5019f9&&_0x49b3b1&&_0x49b3b1[_0x5c6760(0x1c6)]===_0x1a0e4c){_0x4548c3[_0x5c6760(0x1d5)]({'lockKey':_0x38856c[_0x5c6760(0x1ad)],'reason':'unchanged'});continue;}if(_0x49b3b1?.['remoteId']&&_0x49b3b1[_0x5c6760(0x1f6)]==null){_0x27fb88[_0x5c6760(0x1d5)](missingRemoteVersionConflict(_0x38856c,_0x49b3b1));continue;}try{await uploadSingleFunction(_0x5e7d52['appCode'],_0x38856c,_0x37067c,_0x751df4);const _0x981b66=_0x37067c[_0x5c6760(0x1a9)][_0x38856c[_0x5c6760(0x1ad)]];_0x2735e3[_0x5c6760(0x1d5)]({'lockKey':_0x38856c[_0x5c6760(0x1ad)],'remoteId':_0x981b66?.['remoteId']??0x0});}catch(_0x3a68df){const _0x4a8bf9=remoteVersionChangedConflict(_0x38856c,_0x49b3b1,_0x3a68df);if(_0x4a8bf9){_0x27fb88[_0x5c6760(0x1d5)](_0x4a8bf9);continue;}_0x21ed05[_0x5c6760(0x1d5)]({'lockKey':_0x38856c['lockKey'],'error':_0x3a68df instanceof Error?_0x3a68df['message']:String(_0x3a68df)});}}_0x37067c[_0x5c6760(0x1ee)]=new Date()['toISOString'](),await writeBffLockFile(_0x9b7e14['lockFilePath'],_0x4fd62f),await waitForUploadedLockEntries(_0x9b7e14[_0x5c6760(0x1f5)],_0x5e7d52[_0x5c6760(0x1d3)],_0x2735e3['map'](_0x457b09=>_0x457b09[_0x5c6760(0x1ad)]));let _0x4b15d4={'attempted':![],'cleared':![]};if(_0x2735e3['length']>0x0)try{let _0xbd7496='';for(let _0x4ac2b9=0x0;_0x4ac2b9<CACHE_CLEAR_ATTEMPTS;_0x4ac2b9+=0x1){_0xbd7496=await clearBffScriptCache(),_0x4ac2b9<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x4b15d4={'attempted':!![],'cleared':!![],'message':_0xbd7496||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0x44a9d2){_0x4b15d4={'attempted':!![],'cleared':![],'error':_0x44a9d2 instanceof Error?_0x44a9d2[_0x5c6760(0x1c0)]:String(_0x44a9d2)};}const _0x3e81c9=_0x21ed05[_0x5c6760(0x1bd)]===0x0&&(_0x4b15d4['attempted']?_0x4b15d4['cleared']:!![]),_0x538e2f=_0x3e81c9,_0x44e21d=_0x4b15d4[_0x5c6760(0x1ef)]?_0x4b15d4['cleared']?_0x5c6760(0x1eb):_0x5c6760(0x1b7):_0x5c6760(0x191);return{'ok':_0x538e2f,'data':{'uploaded':_0x2735e3,'skipped':_0x4548c3,'conflicts':_0x27fb88,'failed':_0x21ed05,'cacheClear':_0x4b15d4,'warnings':[...[..._0x751df4[_0x5c6760(0x192)][_0x5c6760(0x19d)]()][_0x5c6760(0x1d0)](_0x4c5519=>_0x4c5519[_0x5c6760(0x1db)]),...[..._0x751df4[_0x5c6760(0x1c8)]]['map'](existingHookWarning)]},'message':formatPushMessage(_0x2735e3[_0x5c6760(0x1bd)],_0x4548c3[_0x5c6760(0x1bd)],_0x27fb88[_0x5c6760(0x1bd)],_0x21ed05[_0x5c6760(0x1bd)],_0x44e21d)};}};function missingRemoteVersionConflict(_0x496eae,_0x332325){const _0x2ffe97=a44_0x56f74b;return remoteVersionConflict(_0x496eae,_0x332325,_0x2ffe97(0x19e),_0x2ffe97(0x1ed));}function remoteVersionChangedConflict(_0x17b4a3,_0x34f34d,_0xd03b76){const _0x528795=a44_0x56f74b;if(!_0x34f34d?.['remoteId']||_0x34f34d[_0x528795(0x1f6)]==null||!isRemoteVersionConflict(_0xd03b76))return undefined;return remoteVersionConflict(_0x17b4a3,_0x34f34d,_0x528795(0x1ca),_0x528795(0x1c4));}function remoteVersionConflict(_0x1383b9,_0x303ab7,_0x5e4f0a,_0x4dffa0){const _0x210c3f=a44_0x56f74b;return{'code':_0x5e4f0a,'lockKey':_0x1383b9[_0x210c3f(0x1ad)],'filePath':_0x1383b9[_0x210c3f(0x199)],'remoteId':_0x303ab7['remoteId'],..._0x303ab7[_0x210c3f(0x1f6)]!=null?{'expectedVersion':_0x303ab7[_0x210c3f(0x1f6)]}:{},'message':_0x4dffa0,'nextAction':{'action':'review_remote_and_merge','command':CLI_BIN_NAME+_0x210c3f(0x1ab)+_0x303ab7[_0x210c3f(0x18e)]+'\x20--format\x20compress','requiresReview':!![],'message':'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.'}};}function isRemoteVersionConflict(_0x12d6b5){const _0x506984=a44_0x56f74b,_0x144a50=_0x12d6b5 instanceof Error?_0x12d6b5['message']:String(_0x12d6b5),_0x3cbe9f=getPlatformErrorCode(_0x12d6b5)??'';return[_0x144a50,_0x3cbe9f][_0x506984(0x1c3)](_0x1e8c5e=>/(?: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[_0x506984(0x19f)](_0x1e8c5e));}function formatPushMessage(_0x2e55fc,_0x23114b,_0x238fa9,_0x279b0b,_0x1061c4){const _0x54efca=a44_0x56f74b,_0x5cf752=[_0x54efca(0x19a)+_0x2e55fc+_0x54efca(0x1ea),_0x23114b+_0x54efca(0x1a0)];_0x238fa9>0x0&&_0x5cf752['push'](_0x238fa9+'\x20conflict'+(_0x238fa9===0x1?'':'s')+'\x20'+(_0x238fa9===0x1?'requires':_0x54efca(0x1af))+_0x54efca(0x1c9));if(_0x279b0b>0x0)_0x5cf752[_0x54efca(0x1d5)](_0x279b0b+_0x54efca(0x18f));return _0x5cf752['push'](_0x1061c4),_0x5cf752['join'](',\x20');}async function getTargetFunctions(_0x2f971c,_0x324000){const _0x5f0cf8=a44_0x56f74b,_0x3bdb49=_0x324000[_0x5f0cf8(0x1f2)](_0x5f0cf8(0x19b)),_0x4d0a51=_0x324000[_0x5f0cf8(0x1f2)](_0x5f0cf8(0x1e3)),_0x16be92=normalizeBffType(_0x3bdb49)??undefined;if(_0x4d0a51&&!_0x16be92)throw CliErrors[_0x5f0cf8(0x1b3)](_0x5f0cf8(0x1f0));const _0x5790c4=await scanLocalBffFunctions(_0x2f971c,_0x16be92);if(_0x4d0a51){const _0x4f6bec=_0x5790c4[_0x5f0cf8(0x1e9)](_0x524669=>_0x524669[_0x5f0cf8(0x1e3)]===_0x4d0a51);if(_0x4f6bec[_0x5f0cf8(0x1bd)]===0x0)throw CliErrors[_0x5f0cf8(0x1b3)]('Local\x20function\x20not\x20found:\x20'+_0x16be92+'/'+_0x4d0a51);return _0x4f6bec;}return _0x5790c4;}function existingHookWarning(_0x1f26a8){const _0x22bcbe=a44_0x56f74b;return{'code':_0x22bcbe(0x1df),'lockKey':_0x1f26a8,'message':'Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.'};}async function buildHookMaps(_0x4d4372,_0x6047e5,_0x2e5fe2,_0x335c22,_0x19f7a0){const _0x56c95d=a44_0x56f74b,_0x3153a9=_0x2e5fe2[_0x56c95d(0x1c3)](_0x3ffb7a=>_0x3ffb7a['type']===_0x56c95d(0x1e2));if(!_0x3153a9)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0x3a7b9e=resolveApiModelSource(_0x6047e5,_0x4d4372,_0x19f7a0),_0x214571=loadAliasMap(_0x6047e5,undefined,_0x3a7b9e[_0x56c95d(0x199)],_0x3a7b9e['profileName']);assertUnambiguousHookAliases(_0x214571);const _0x1e6d11=[..._0x214571[_0x56c95d(0x18d)](_0x1e68d6=>[_0x1e68d6[_0x56c95d(0x1ae)],_0x1e68d6[_0x56c95d(0x1f7)]]),...trackedHookDirectoryMappings(_0x335c22)['map'](_0x2f90ac=>[_0x2f90ac[_0x56c95d(0x1ae)],_0x2f90ac[_0x56c95d(0x1f7)]])],_0x18409a=await listDatasets(_0x4d4372);assertUnambiguousHookDirectoryMappings(_0x1e6d11['map'](([_0xc419f8,_0x302c9b])=>({'alias':_0xc419f8,'datasetCode':_0x302c9b})));const _0x2e535a=buildHookDirectoryIndexes(_0x18409a,_0x1e6d11),_0x501415=new Map(),_0x67e93a=preflightPushHookDirectories(_0x2e5fe2,_0x335c22,_0x2e535a,_0x501415),_0x580b98=new Set(),_0x45be4c=_0x2e5fe2[_0x56c95d(0x1e9)](_0x35dabb=>_0x501415[_0x56c95d(0x1ec)](_0x35dabb['lockKey'])?.[_0x56c95d(0x1cf)](_0x56c95d(0x1a8))&&_0x335c22[_0x56c95d(0x1a9)][_0x35dabb[_0x56c95d(0x1ad)]]?.['remoteId']&&_0x335c22[_0x56c95d(0x1a9)][_0x35dabb[_0x56c95d(0x1ad)]]?.[_0x56c95d(0x1f7)]);if(_0x45be4c[_0x56c95d(0x1bd)]>0x0){let _0x422dad;try{_0x422dad=await getBffScriptStatistics(_0x4d4372);}catch(_0x404edc){for(const _0x1f1e41 of _0x45be4c)_0x501415[_0x56c95d(0x1c5)](_0x1f1e41[_0x56c95d(0x1ad)],_0x56c95d(0x1b2)+(_0x404edc instanceof Error?_0x404edc[_0x56c95d(0x1c0)]:String(_0x404edc)));return{'resolutions':_0x67e93a,'failures':_0x501415,'existingHooks':_0x580b98};}for(const _0xf621ba of _0x45be4c){const _0x1bd367=_0x335c22[_0x56c95d(0x1a9)][_0xf621ba[_0x56c95d(0x1ad)]];try{const _0x586ac4=new Set(_0x2e5fe2[_0x56c95d(0x1e9)](_0x54b3d6=>_0x54b3d6[_0x56c95d(0x19b)]===_0x56c95d(0x1e2)&&_0x335c22[_0x56c95d(0x1a9)][_0x54b3d6['lockKey']]?.['datasetCode']===_0x1bd367[_0x56c95d(0x1f7)])[_0x56c95d(0x18d)](_0x283ced=>_0x283ced[_0x56c95d(0x1ae)]));if(_0x586ac4[_0x56c95d(0x1b0)]>0x1)throw CliErrors['validation'](_0x56c95d(0x1bf));const _0x4ead70=_0x422dad[_0x56c95d(0x1d0)](_0x403d2e=>[{'datasetCode':_0x403d2e['datasetCode'],'operationType':snakeToCamel(_0x403d2e[_0x56c95d(0x1a5)]),'functionNode':_0x56c95d(0x196),'id':_0x403d2e['beforeScriptId']},{'datasetCode':_0x403d2e[_0x56c95d(0x1f7)],'operationType':snakeToCamel(_0x403d2e[_0x56c95d(0x1a5)]),'functionNode':_0x56c95d(0x1d6),'id':_0x403d2e['afterScriptId']}])[_0x56c95d(0x1e9)](_0x58ef4c=>_0x58ef4c['id']===_0x1bd367[_0x56c95d(0x18e)]),_0x1832c=await getBffScriptInfo(_0x1bd367[_0x56c95d(0x18e)]);if(_0x1832c['id']!==_0x1bd367[_0x56c95d(0x18e)]||_0x1832c[_0x56c95d(0x1d3)]!==_0x4d4372||_0x1832c['scriptType']!==_0x56c95d(0x1e2)||_0x1832c[_0x56c95d(0x1b1)]!==_0xf621ba[_0x56c95d(0x1e3)]||_0x1bd367[_0x56c95d(0x1f6)]==null||_0x1832c[_0x56c95d(0x1f6)]!==_0x1bd367[_0x56c95d(0x1f6)]||_0x4ead70[_0x56c95d(0x1bd)]!==0x1||_0x4ead70[0x0][_0x56c95d(0x1f7)]!==_0x1bd367['datasetCode']||_0x4ead70[0x0][_0x56c95d(0x1a5)]!==_0xf621ba[_0x56c95d(0x1a5)]||_0x4ead70[0x0][_0x56c95d(0x1be)]!==_0xf621ba[_0x56c95d(0x1be)]||_0x1bd367[_0x56c95d(0x1a5)]!==_0xf621ba['operationType']||_0x1bd367[_0x56c95d(0x1be)]!==_0xf621ba[_0x56c95d(0x1be)])throw CliErrors['validation'](_0x56c95d(0x1f4));_0x580b98[_0x56c95d(0x1a3)](_0xf621ba[_0x56c95d(0x1ad)]),_0x501415[_0x56c95d(0x1f9)](_0xf621ba[_0x56c95d(0x1ad)]);}catch(_0x4f2df9){_0x501415[_0x56c95d(0x1c5)](_0xf621ba[_0x56c95d(0x1ad)],_0x4f2df9 instanceof Error?_0x4f2df9[_0x56c95d(0x1c0)]:String(_0x4f2df9));}}}return{'resolutions':_0x67e93a,'failures':_0x501415,'existingHooks':_0x580b98};}async function uploadSingleFunction(_0x56331f,_0x1a7766,_0x28fc81,_0x4e8359){const _0x2f7ea7=a44_0x56f74b,_0x5e7f37=await readFile(_0x1a7766['filePath'],_0x2f7ea7(0x19c)),_0x14fe23=await computeFileHash(_0x1a7766['filePath']),_0x119d17=_0x28fc81['functions'][_0x1a7766[_0x2f7ea7(0x1ad)]];if(_0x119d17?.[_0x2f7ea7(0x18e)]&&_0x119d17[_0x2f7ea7(0x1f6)]==null)throw CliErrors[_0x2f7ea7(0x1b3)](_0x1a7766[_0x2f7ea7(0x1ad)]+_0x2f7ea7(0x1aa));let _0x328f8f=extractScriptDescription(_0x5e7f37);if(!_0x328f8f&&_0x119d17?.[_0x2f7ea7(0x18e)]){const _0x3fc0b2=await getBffScriptInfo(_0x119d17[_0x2f7ea7(0x18e)]);_0x328f8f=_0x3fc0b2[_0x2f7ea7(0x1d1)]||undefined;}const _0x4ac952={'appCode':_0x56331f,'functionName':_0x1a7766[_0x2f7ea7(0x1e3)],'scriptType':_0x1a7766[_0x2f7ea7(0x19b)],'scriptContent':_0x5e7f37};if(_0x119d17?.[_0x2f7ea7(0x18e)])_0x4ac952['id']=_0x119d17[_0x2f7ea7(0x18e)];if(_0x119d17?.[_0x2f7ea7(0x1f6)]!=null)_0x4ac952[_0x2f7ea7(0x1f6)]=_0x119d17[_0x2f7ea7(0x1f6)];if(_0x328f8f)_0x4ac952[_0x2f7ea7(0x1d1)]=_0x328f8f;if(_0x1a7766[_0x2f7ea7(0x19b)]==='HOOK'){const _0x2aacaa=_0x4e8359[_0x2f7ea7(0x192)][_0x2f7ea7(0x1ec)](_0x1a7766[_0x2f7ea7(0x1ad)]);if(!_0x2aacaa&&!_0x4e8359[_0x2f7ea7(0x1c8)][_0x2f7ea7(0x195)](_0x1a7766[_0x2f7ea7(0x1ad)])||!_0x1a7766[_0x2f7ea7(0x1a5)]||!_0x1a7766['functionNode'])throw CliErrors[_0x2f7ea7(0x1b3)](_0x2f7ea7(0x1cd)+_0x1a7766['lockKey']);_0x2aacaa&&(_0x4ac952[_0x2f7ea7(0x1dd)]=_0x2aacaa[_0x2f7ea7(0x1a6)]['id'],_0x4ac952['operationType']=_0x1a7766[_0x2f7ea7(0x1a5)]),_0x4ac952[_0x2f7ea7(0x1be)]=_0x1a7766[_0x2f7ea7(0x1be)];}const _0x3162b4=await saveBffScript(_0x4ac952),_0x5f161d=_0x3162b4['id'],_0x25f818=_0x3162b4['script']??await getBffScriptInfo(_0x5f161d),_0x2e4eba={'hash':_0x14fe23,'remoteId':_0x5f161d,'version':_0x25f818[_0x2f7ea7(0x1f6)]};if(_0x1a7766[_0x2f7ea7(0x19b)]===_0x2f7ea7(0x1e2)){const _0x310518=_0x4e8359[_0x2f7ea7(0x192)]['get'](_0x1a7766[_0x2f7ea7(0x1ad)]);if(!_0x310518){_0x28fc81[_0x2f7ea7(0x1a9)][_0x1a7766[_0x2f7ea7(0x1ad)]]={..._0x119d17,..._0x2e4eba};return;}_0x2e4eba[_0x2f7ea7(0x1ae)]=_0x310518[_0x2f7ea7(0x1ae)]??_0x119d17?.[_0x2f7ea7(0x1ae)],_0x2e4eba[_0x2f7ea7(0x1f7)]=_0x310518[_0x2f7ea7(0x1f7)],_0x2e4eba[_0x2f7ea7(0x1a5)]=_0x1a7766[_0x2f7ea7(0x1a5)],_0x2e4eba['functionNode']=_0x1a7766[_0x2f7ea7(0x1be)];}_0x28fc81[_0x2f7ea7(0x1a9)][_0x1a7766['lockKey']]=_0x2e4eba;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x593c41,_0x3578ed,_0x289dc5){const _0x99cf6f=a44_0x56f74b;if(_0x289dc5[_0x99cf6f(0x1bd)]===0x0)return;for(let _0x3fb712=0x0;_0x3fb712<LOCK_SETTLE_RETRY_COUNT;_0x3fb712+=0x1){const _0x4d5a83=await readBffLockFile(_0x593c41),_0x8c6601=_0x4d5a83?.[_0x99cf6f(0x1d4)]?.[_0x3578ed]?.[_0x99cf6f(0x1a9)]??{},_0x28a1b0=_0x289dc5[_0x99cf6f(0x1b5)](_0xfe1501=>!!_0x8c6601[_0xfe1501]?.[_0x99cf6f(0x18e)]);if(_0x28a1b0)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x99cf6f(0x1e5)+_0x289dc5[_0x99cf6f(0x1c1)](',\x20')+'.');}
|
|
1
|
+
const a44_0x595ca0=a44_0x3f87;(function(_0x2b7c7e,_0x2630f3){const _0xa67110=a44_0x3f87,_0xd66a2e=_0x2b7c7e();while(!![]){try{const _0x560ca2=parseInt(_0xa67110(0xde))/0x1*(parseInt(_0xa67110(0xd6))/0x2)+parseInt(_0xa67110(0xf2))/0x3+parseInt(_0xa67110(0xc4))/0x4+-parseInt(_0xa67110(0xa0))/0x5*(parseInt(_0xa67110(0xbc))/0x6)+-parseInt(_0xa67110(0x8e))/0x7*(parseInt(_0xa67110(0xc2))/0x8)+-parseInt(_0xa67110(0xd5))/0x9*(parseInt(_0xa67110(0xa1))/0xa)+parseInt(_0xa67110(0x9d))/0xb*(parseInt(_0xa67110(0xa4))/0xc);if(_0x560ca2===_0x2630f3)break;else _0xd66a2e['push'](_0xd66a2e['shift']());}catch(_0x1654f3){_0xd66a2e['push'](_0xd66a2e['shift']());}}}(a44_0x251c,0x5db8a));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,getBffScriptStatistics,getPlatformErrorCode,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiModelSource}from'../../api/model-source.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{buildHookDirectoryIndexes,assertUnambiguousHookAliases,assertUnambiguousHookDirectoryMappings,preflightPushHookDirectories,trackedHookDirectoryMappings}from'../../core/bff/hook-directory.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription,snakeToCamel}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a44_0x595ca0(0xec),'command':'push','description':a44_0x595ca0(0x98),'risk':'write','structuredErrors':!![],'flags':[{'name':a44_0x595ca0(0xdc),'type':a44_0x595ca0(0xcf),'description':a44_0x595ca0(0xf8),'enum':['COMMON',a44_0x595ca0(0x95),'HOOK']},{'name':a44_0x595ca0(0xe5),'type':'string','description':a44_0x595ca0(0xe9)},{'name':'force','type':a44_0x595ca0(0xd4),'description':a44_0x595ca0(0xb2)}],async 'dryRun'(_0x258d70){const _0x384254=a44_0x595ca0,_0x2af153=loadBffProjectConfig(_0x258d70[_0x384254(0xf9)]),_0x8eedf1=await readBffLockFile(_0x2af153[_0x384254(0xf1)]),{appLock:_0x1604eb}=ensureLockScope(_0x8eedf1??createEmptyBffLock(),_0x258d70['appCode'],_0x2af153[_0x384254(0xea)],_0x384254(0x99)),_0x1c54b0=await getTargetFunctions(_0x2af153,_0x258d70),_0x5c3a1e=_0x1c54b0[_0x384254(0x91)](_0xd79dd8=>_0xd79dd8[_0x384254(0xdc)]===_0x384254(0xa7))?await scanLocalBffFunctions(_0x2af153,_0x384254(0xa7)):_0x1c54b0,_0x28b017=await buildHookMaps(_0x258d70[_0x384254(0xf9)],_0x258d70['apiDir'],_0x5c3a1e,_0x1604eb,_0x258d70[_0x384254(0xf7)]||_0x258d70[_0x384254(0xb8)]?.['currentApp']||_0x258d70[_0x384254(0xb8)]?.['defaultApp']),_0x3cb4d2=_0x258d70[_0x384254(0xeb)](_0x384254(0x9e)),_0x17da38=[];for(const _0x31e0a6 of _0x1c54b0){const _0x57862b=await computeFileHash(_0x31e0a6[_0x384254(0xdb)]),_0x3863c8=_0x1604eb['functions'][_0x31e0a6[_0x384254(0xae)]],_0x4b1b0d=!!_0x3863c8&&_0x3863c8[_0x384254(0xe8)]===_0x57862b,_0x456795=_0x28b017[_0x384254(0xd8)]['get'](_0x31e0a6['lockKey']),_0x327ad9=!!_0x3863c8?.[_0x384254(0x92)]&&_0x3863c8[_0x384254(0xd3)]==null&&(_0x3cb4d2||!_0x4b1b0d),_0x1bd08f=_0x327ad9?missingRemoteVersionConflict(_0x31e0a6,_0x3863c8):undefined,_0x4c6ff1=_0x28b017[_0x384254(0x9a)]['has'](_0x31e0a6[_0x384254(0xae)])?'failed':!_0x3cb4d2&&_0x4b1b0d?_0x384254(0xa6):_0x1bd08f?_0x384254(0xbd):_0x384254(0xbe);_0x17da38[_0x384254(0x99)]({'lockKey':_0x31e0a6[_0x384254(0xae)],'filePath':_0x31e0a6['filePath'],'remoteId':_0x3863c8?.[_0x384254(0x92)]??null,'mode':_0x3863c8?.['remoteId']?'update':'create','status':_0x4c6ff1,..._0x28b017[_0x384254(0x9a)]['has'](_0x31e0a6[_0x384254(0xae)])?{'error':_0x28b017['failures'][_0x384254(0x90)](_0x31e0a6[_0x384254(0xae)])}:{},..._0x1bd08f?{'conflict':_0x1bd08f}:{},..._0x28b017['existingHooks'][_0x384254(0xcd)](_0x31e0a6[_0x384254(0xae)])?{'datasetCode':_0x3863c8?.[_0x384254(0xb7)],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x31e0a6[_0x384254(0xae)])]}:{},..._0x456795?{'alias':_0x456795[_0x384254(0xb0)]??null,'datasetCode':_0x456795[_0x384254(0xb7)],'operationType':_0x31e0a6['operationType'],'functionNode':_0x31e0a6['functionNode'],'warnings':_0x456795['warnings']}:{}});}return{'method':_0x384254(0xe2),'url':'/api/management/library/scripts/save','body':{'appCode':_0x258d70[_0x384254(0xf9)],'force':_0x3cb4d2,'files':_0x17da38,'cacheClearAtRuntime':_0x17da38['some'](_0x4b71d3=>_0x4b71d3[_0x384254(0x96)]===_0x384254(0xbe)),'cacheClearAtRuntimeTimes':_0x17da38[_0x384254(0x91)](_0x69279a=>_0x69279a[_0x384254(0x96)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':'Would\x20inspect\x20'+_0x17da38[_0x384254(0xd9)]+_0x384254(0xd7)};},async 'execute'(_0x43c715){const _0x11b8e6=a44_0x595ca0,_0x419cdc=loadBffProjectConfig(_0x43c715[_0x11b8e6(0xf9)]),_0x5d506a=await readBffLockFile(_0x419cdc[_0x11b8e6(0xf1)]),{lockData:_0x376286,appLock:_0x43513f}=ensureLockScope(_0x5d506a??createEmptyBffLock(),_0x43c715[_0x11b8e6(0xf9)],_0x419cdc[_0x11b8e6(0xea)],_0x11b8e6(0x99)),_0x46b3c0=await getTargetFunctions(_0x419cdc,_0x43c715);if(_0x46b3c0[_0x11b8e6(0xd9)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':'No\x20local\x20Backend\x20Function\x20scripts\x20found.'};const _0x46ef7f=_0x43c715[_0x11b8e6(0xeb)]('force'),_0x255447=JSON[_0x11b8e6(0xf4)](JSON[_0x11b8e6(0xc9)](_0x376286)),_0x949cfc=_0x255447[_0x11b8e6(0xe1)][_0x43c715[_0x11b8e6(0xf9)]];if(!_0x949cfc)throw new Error(_0x11b8e6(0xf5)+_0x43c715[_0x11b8e6(0xf9)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x3f3909=_0x46b3c0['some'](_0x2e6e86=>_0x2e6e86[_0x11b8e6(0xdc)]===_0x11b8e6(0xa7))?await scanLocalBffFunctions(_0x419cdc,_0x11b8e6(0xa7)):_0x46b3c0,_0x372b79=await buildHookMaps(_0x43c715[_0x11b8e6(0xf9)],_0x43c715[_0x11b8e6(0xef)],_0x3f3909,_0x949cfc,_0x43c715['selectedAppName']||_0x43c715[_0x11b8e6(0xb8)]?.[_0x11b8e6(0xaf)]||_0x43c715[_0x11b8e6(0xb8)]?.[_0x11b8e6(0xd1)]),_0x299c4d=[],_0x5337d7=[],_0x20026f=[],_0x3fc02a=[];for(const _0x25c92e of _0x46b3c0){const _0x2899ae=_0x372b79[_0x11b8e6(0x9a)][_0x11b8e6(0x90)](_0x25c92e['lockKey']);if(_0x2899ae){_0x3fc02a[_0x11b8e6(0x99)]({'lockKey':_0x25c92e[_0x11b8e6(0xae)],'error':_0x2899ae});continue;}const _0x48a7e3=await computeFileHash(_0x25c92e[_0x11b8e6(0xdb)]),_0x6c67d1=_0x949cfc['functions'][_0x25c92e[_0x11b8e6(0xae)]];if(!_0x46ef7f&&_0x6c67d1&&_0x6c67d1['hash']===_0x48a7e3){_0x5337d7[_0x11b8e6(0x99)]({'lockKey':_0x25c92e['lockKey'],'reason':'unchanged'});continue;}if(_0x6c67d1?.['remoteId']&&_0x6c67d1['version']==null){_0x20026f[_0x11b8e6(0x99)](missingRemoteVersionConflict(_0x25c92e,_0x6c67d1));continue;}try{await uploadSingleFunction(_0x43c715[_0x11b8e6(0xf9)],_0x25c92e,_0x949cfc,_0x372b79);const _0xa20b05=_0x949cfc[_0x11b8e6(0xaa)][_0x25c92e['lockKey']];_0x299c4d[_0x11b8e6(0x99)]({'lockKey':_0x25c92e[_0x11b8e6(0xae)],'remoteId':_0xa20b05?.[_0x11b8e6(0x92)]??0x0});}catch(_0x1e3379){const _0x56cefe=remoteVersionChangedConflict(_0x25c92e,_0x6c67d1,_0x1e3379);if(_0x56cefe){_0x20026f['push'](_0x56cefe);continue;}_0x3fc02a[_0x11b8e6(0x99)]({'lockKey':_0x25c92e[_0x11b8e6(0xae)],'error':_0x1e3379 instanceof Error?_0x1e3379[_0x11b8e6(0xc7)]:String(_0x1e3379)});}}_0x949cfc[_0x11b8e6(0xee)]=new Date()[_0x11b8e6(0xa2)](),await writeBffLockFile(_0x419cdc[_0x11b8e6(0xf1)],_0x255447),await waitForUploadedLockEntries(_0x419cdc['lockFilePath'],_0x43c715['appCode'],_0x299c4d[_0x11b8e6(0xce)](_0x4d6c0d=>_0x4d6c0d['lockKey']));let _0xb934b8={'attempted':![],'cleared':![]};if(_0x299c4d[_0x11b8e6(0xd9)]>0x0)try{let _0x8d1dd3='';for(let _0x37b3fb=0x0;_0x37b3fb<CACHE_CLEAR_ATTEMPTS;_0x37b3fb+=0x1){_0x8d1dd3=await clearBffScriptCache(),_0x37b3fb<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0xb934b8={'attempted':!![],'cleared':!![],'message':_0x8d1dd3||_0x11b8e6(0xc0)};}catch(_0x476cc1){_0xb934b8={'attempted':!![],'cleared':![],'error':_0x476cc1 instanceof Error?_0x476cc1[_0x11b8e6(0xc7)]:String(_0x476cc1)};}const _0x51430a=_0x3fc02a[_0x11b8e6(0xd9)]===0x0&&(_0xb934b8[_0x11b8e6(0xbb)]?_0xb934b8[_0x11b8e6(0xbf)]:!![]),_0x1f66d7=_0x51430a,_0x2f04b7=_0xb934b8[_0x11b8e6(0xbb)]?_0xb934b8[_0x11b8e6(0xbf)]?_0x11b8e6(0x93):_0x11b8e6(0xf6):_0x11b8e6(0xed);return{'ok':_0x1f66d7,'data':{'uploaded':_0x299c4d,'skipped':_0x5337d7,'conflicts':_0x20026f,'failed':_0x3fc02a,'cacheClear':_0xb934b8,'warnings':[...[..._0x372b79[_0x11b8e6(0xd8)][_0x11b8e6(0xd2)]()][_0x11b8e6(0xb5)](_0x22a601=>_0x22a601[_0x11b8e6(0xe6)]),...[..._0x372b79[_0x11b8e6(0xad)]][_0x11b8e6(0xce)](existingHookWarning)]},'message':formatPushMessage(_0x299c4d[_0x11b8e6(0xd9)],_0x5337d7[_0x11b8e6(0xd9)],_0x20026f['length'],_0x3fc02a[_0x11b8e6(0xd9)],_0x2f04b7)};}};function missingRemoteVersionConflict(_0x4da6fe,_0x17edc5){const _0x1ef79d=a44_0x595ca0;return remoteVersionConflict(_0x4da6fe,_0x17edc5,_0x1ef79d(0xb9),_0x1ef79d(0x9c));}function remoteVersionChangedConflict(_0x4d55ba,_0x4f2650,_0x4a3714){const _0x191aed=a44_0x595ca0;if(!_0x4f2650?.[_0x191aed(0x92)]||_0x4f2650[_0x191aed(0xd3)]==null||!isRemoteVersionConflict(_0x4a3714))return undefined;return remoteVersionConflict(_0x4d55ba,_0x4f2650,'BFF_REMOTE_VERSION_CHANGED','Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.');}function remoteVersionConflict(_0x199b31,_0x9ce929,_0x39425a,_0x3e6be2){const _0xddcb2b=a44_0x595ca0;return{'code':_0x39425a,'lockKey':_0x199b31[_0xddcb2b(0xae)],'filePath':_0x199b31[_0xddcb2b(0xdb)],'remoteId':_0x9ce929[_0xddcb2b(0x92)],..._0x9ce929[_0xddcb2b(0xd3)]!=null?{'expectedVersion':_0x9ce929['version']}:{},'message':_0x3e6be2,'nextAction':{'action':_0xddcb2b(0xa3),'command':CLI_BIN_NAME+'\x20bff\x20detail\x20--id\x20'+_0x9ce929[_0xddcb2b(0x92)]+_0xddcb2b(0xc6),'requiresReview':!![],'message':_0xddcb2b(0xe0)}};}function isRemoteVersionConflict(_0x448489){const _0x4d4496=a44_0x595ca0,_0x4935da=_0x448489 instanceof Error?_0x448489[_0x4d4496(0xc7)]:String(_0x448489),_0x5b796c=getPlatformErrorCode(_0x448489)??'';return[_0x4935da,_0x5b796c][_0x4d4496(0x91)](_0x3e551f=>/(?: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'](_0x3e551f));}function formatPushMessage(_0x514ba9,_0x1d80a8,_0x16e7f4,_0x2e47e,_0x2394df){const _0x4ab151=a44_0x595ca0,_0x4ac4e7=[_0x4ab151(0x9b)+_0x514ba9+_0x4ab151(0xe3),_0x1d80a8+'\x20skipped'];_0x16e7f4>0x0&&_0x4ac4e7['push'](_0x16e7f4+_0x4ab151(0xc8)+(_0x16e7f4===0x1?'':'s')+'\x20'+(_0x16e7f4===0x1?_0x4ab151(0xb4):_0x4ab151(0xab))+_0x4ab151(0xca));if(_0x2e47e>0x0)_0x4ac4e7[_0x4ab151(0x99)](_0x2e47e+_0x4ab151(0xdd));return _0x4ac4e7[_0x4ab151(0x99)](_0x2394df),_0x4ac4e7[_0x4ab151(0x9f)](',\x20');}async function getTargetFunctions(_0x15eb5a,_0x3d9980){const _0x4df4a0=a44_0x595ca0,_0x215e9b=_0x3d9980[_0x4df4a0(0xe7)](_0x4df4a0(0xdc)),_0x29178c=_0x3d9980[_0x4df4a0(0xe7)](_0x4df4a0(0xe5)),_0x441477=normalizeBffType(_0x215e9b)??undefined;if(_0x29178c&&!_0x441477)throw CliErrors[_0x4df4a0(0xa9)]('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x1829df=await scanLocalBffFunctions(_0x15eb5a,_0x441477);if(_0x29178c){const _0x422ae2=_0x1829df['filter'](_0x487f94=>_0x487f94[_0x4df4a0(0xe5)]===_0x29178c);if(_0x422ae2[_0x4df4a0(0xd9)]===0x0)throw CliErrors[_0x4df4a0(0xa9)](_0x4df4a0(0xcc)+_0x441477+'/'+_0x29178c);return _0x422ae2;}return _0x1829df;}function existingHookWarning(_0x354d12){const _0x1d8a47=a44_0x595ca0;return{'code':'EXISTING_HOOK_BINDING_PRESERVED','lockKey':_0x354d12,'message':_0x1d8a47(0xf0)};}function a44_0x3f87(_0x1e15d3,_0x2a4389){_0x1e15d3=_0x1e15d3-0x8e;const _0x251c76=a44_0x251c();let _0x3f87e8=_0x251c76[_0x1e15d3];return _0x3f87e8;}function a44_0x251c(){const _0x8f4f3=['size','name','warnings','str','hash','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','scriptsRoot','bool','bff','runtime\x20cache\x20not\x20needed','lastSync','apiDir','Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.','lockFilePath','1074573LyNhSr','operationType','parse','Lock\x20scope\x20for\x20app\x20\x22','runtime\x20cache\x20clear\x20failed','selectedAppName','Push\x20only\x20this\x20script\x20type','appCode','8981bMSZEo','functionName','get','some','remoteId','runtime\x20cache\x20cleared','Incomplete\x20HOOK\x20path:\x20','ENDPOINT','status','Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','push','failures','Push\x20complete:\x20','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','48851uyTjgE','force','join','535GoOVSZ','7415540LAVBHY','toISOString','review_remote_and_merge','516foMBAF','beforeScriptId','unchanged','HOOK','profileName','validation','functions','require','scriptType','existingHooks','lockKey','currentApp','alias','filter','Force\x20push\x20ignoring\x20hash\x20protection','Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.','requires','flatMap','functionNode','datasetCode','mergedCli','BFF_REMOTE_VERSION_MISSING',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','attempted','5790CPVzBg','conflict','would_push','cleared','Runtime\x20script\x20cache\x20cleared.','startsWith','3784FVeATj','description','2942924QyELGN','after','\x20--format\x20compress','message','\x20conflict','stringify','\x20resolution','delete','Local\x20function\x20not\x20found:\x20','has','map','string','dataset','defaultApp','values','version','boolean','9rDlDae','24474lHtqbE','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','resolutions','length','set','filePath','type','\x20failed','45LDNrYj','utf8','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.','apps','POST','\x20uploaded'];a44_0x251c=function(){return _0x8f4f3;};return a44_0x251c();}async function buildHookMaps(_0x55ae70,_0x9b9cf5,_0x9841ba,_0x4ea79e,_0x3bd971){const _0x3f79ce=a44_0x595ca0,_0x5d8b95=_0x9841ba[_0x3f79ce(0x91)](_0x3c0466=>_0x3c0466[_0x3f79ce(0xdc)]===_0x3f79ce(0xa7));if(!_0x5d8b95)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0xbaa6d3=resolveApiModelSource(_0x9b9cf5,_0x55ae70,_0x3bd971),_0x19a8bd=loadAliasMap(_0x9b9cf5,undefined,_0xbaa6d3['filePath'],_0xbaa6d3[_0x3f79ce(0xa8)]);assertUnambiguousHookAliases(_0x19a8bd);const _0x6baba0=[..._0x19a8bd[_0x3f79ce(0xce)](_0x3f0cad=>[_0x3f0cad[_0x3f79ce(0xb0)],_0x3f0cad['datasetCode']]),...trackedHookDirectoryMappings(_0x4ea79e)[_0x3f79ce(0xce)](_0xe22140=>[_0xe22140['alias'],_0xe22140['datasetCode']])],_0x528ac0=await listDatasets(_0x55ae70);assertUnambiguousHookDirectoryMappings(_0x6baba0['map'](([_0xa49469,_0x3eee71])=>({'alias':_0xa49469,'datasetCode':_0x3eee71})));const _0x5e6362=buildHookDirectoryIndexes(_0x528ac0,_0x6baba0),_0x3fd92b=new Map(),_0x3cdc20=preflightPushHookDirectories(_0x9841ba,_0x4ea79e,_0x5e6362,_0x3fd92b),_0x43902b=new Set(),_0x5df31d=_0x9841ba[_0x3f79ce(0xb1)](_0x176137=>_0x3fd92b['get'](_0x176137['lockKey'])?.[_0x3f79ce(0xc1)]('HOOK_DATASET_NOT_FOUND:')&&_0x4ea79e[_0x3f79ce(0xaa)][_0x176137['lockKey']]?.[_0x3f79ce(0x92)]&&_0x4ea79e['functions'][_0x176137[_0x3f79ce(0xae)]]?.[_0x3f79ce(0xb7)]);if(_0x5df31d['length']>0x0){let _0x41758e;try{_0x41758e=await getBffScriptStatistics(_0x55ae70);}catch(_0xbb7386){for(const _0x21e319 of _0x5df31d)_0x3fd92b[_0x3f79ce(0xda)](_0x21e319['lockKey'],'Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20'+(_0xbb7386 instanceof Error?_0xbb7386[_0x3f79ce(0xc7)]:String(_0xbb7386)));return{'resolutions':_0x3cdc20,'failures':_0x3fd92b,'existingHooks':_0x43902b};}for(const _0x362b2e of _0x5df31d){const _0xae60ee=_0x4ea79e[_0x3f79ce(0xaa)][_0x362b2e[_0x3f79ce(0xae)]];try{const _0x493c78=new Set(_0x9841ba[_0x3f79ce(0xb1)](_0x4f6d6c=>_0x4f6d6c[_0x3f79ce(0xdc)]===_0x3f79ce(0xa7)&&_0x4ea79e[_0x3f79ce(0xaa)][_0x4f6d6c[_0x3f79ce(0xae)]]?.[_0x3f79ce(0xb7)]===_0xae60ee[_0x3f79ce(0xb7)])[_0x3f79ce(0xce)](_0x2ed925=>_0x2ed925[_0x3f79ce(0xb0)]));if(_0x493c78[_0x3f79ce(0xe4)]>0x1)throw CliErrors[_0x3f79ce(0xa9)](_0x3f79ce(0xb3));const _0xaa058e=_0x41758e[_0x3f79ce(0xb5)](_0x1c4f26=>[{'datasetCode':_0x1c4f26[_0x3f79ce(0xb7)],'operationType':snakeToCamel(_0x1c4f26[_0x3f79ce(0xf3)]),'functionNode':'before','id':_0x1c4f26[_0x3f79ce(0xa5)]},{'datasetCode':_0x1c4f26[_0x3f79ce(0xb7)],'operationType':snakeToCamel(_0x1c4f26[_0x3f79ce(0xf3)]),'functionNode':_0x3f79ce(0xc5),'id':_0x1c4f26['afterScriptId']}])[_0x3f79ce(0xb1)](_0x16f914=>_0x16f914['id']===_0xae60ee[_0x3f79ce(0x92)]),_0x28fa79=await getBffScriptInfo(_0xae60ee[_0x3f79ce(0x92)]);if(_0x28fa79['id']!==_0xae60ee[_0x3f79ce(0x92)]||_0x28fa79[_0x3f79ce(0xf9)]!==_0x55ae70||_0x28fa79[_0x3f79ce(0xac)]!==_0x3f79ce(0xa7)||_0x28fa79[_0x3f79ce(0x8f)]!==_0x362b2e[_0x3f79ce(0xe5)]||_0xae60ee[_0x3f79ce(0xd3)]==null||_0x28fa79[_0x3f79ce(0xd3)]!==_0xae60ee[_0x3f79ce(0xd3)]||_0xaa058e[_0x3f79ce(0xd9)]!==0x1||_0xaa058e[0x0][_0x3f79ce(0xb7)]!==_0xae60ee[_0x3f79ce(0xb7)]||_0xaa058e[0x0]['operationType']!==_0x362b2e[_0x3f79ce(0xf3)]||_0xaa058e[0x0][_0x3f79ce(0xb6)]!==_0x362b2e['functionNode']||_0xae60ee['operationType']!==_0x362b2e[_0x3f79ce(0xf3)]||_0xae60ee[_0x3f79ce(0xb6)]!==_0x362b2e[_0x3f79ce(0xb6)])throw CliErrors[_0x3f79ce(0xa9)](_0x3f79ce(0x97));_0x43902b['add'](_0x362b2e[_0x3f79ce(0xae)]),_0x3fd92b[_0x3f79ce(0xcb)](_0x362b2e[_0x3f79ce(0xae)]);}catch(_0x2e01c4){_0x3fd92b['set'](_0x362b2e['lockKey'],_0x2e01c4 instanceof Error?_0x2e01c4[_0x3f79ce(0xc7)]:String(_0x2e01c4));}}}return{'resolutions':_0x3cdc20,'failures':_0x3fd92b,'existingHooks':_0x43902b};}async function uploadSingleFunction(_0x2b2a48,_0x482646,_0x3e6e2a,_0x1fd89c){const _0x184b64=a44_0x595ca0,_0x4a45bd=await readFile(_0x482646[_0x184b64(0xdb)],_0x184b64(0xdf)),_0x1d5487=await computeFileHash(_0x482646[_0x184b64(0xdb)]),_0x1e43c2=_0x3e6e2a[_0x184b64(0xaa)][_0x482646[_0x184b64(0xae)]];if(_0x1e43c2?.[_0x184b64(0x92)]&&_0x1e43c2[_0x184b64(0xd3)]==null)throw CliErrors[_0x184b64(0xa9)](_0x482646[_0x184b64(0xae)]+_0x184b64(0xba));let _0x1d2270=extractScriptDescription(_0x4a45bd);if(!_0x1d2270&&_0x1e43c2?.[_0x184b64(0x92)]){const _0x34feae=await getBffScriptInfo(_0x1e43c2['remoteId']);_0x1d2270=_0x34feae[_0x184b64(0xc3)]||undefined;}const _0x1f9342={'appCode':_0x2b2a48,'functionName':_0x482646[_0x184b64(0xe5)],'scriptType':_0x482646[_0x184b64(0xdc)],'scriptContent':_0x4a45bd};if(_0x1e43c2?.[_0x184b64(0x92)])_0x1f9342['id']=_0x1e43c2['remoteId'];if(_0x1e43c2?.['version']!=null)_0x1f9342['version']=_0x1e43c2[_0x184b64(0xd3)];if(_0x1d2270)_0x1f9342[_0x184b64(0xc3)]=_0x1d2270;if(_0x482646[_0x184b64(0xdc)]==='HOOK'){const _0x42c47f=_0x1fd89c['resolutions'][_0x184b64(0x90)](_0x482646['lockKey']);if(!_0x42c47f&&!_0x1fd89c[_0x184b64(0xad)][_0x184b64(0xcd)](_0x482646[_0x184b64(0xae)])||!_0x482646[_0x184b64(0xf3)]||!_0x482646[_0x184b64(0xb6)])throw CliErrors[_0x184b64(0xa9)](_0x184b64(0x94)+_0x482646[_0x184b64(0xae)]);_0x42c47f&&(_0x1f9342['datasetId']=_0x42c47f[_0x184b64(0xd0)]['id'],_0x1f9342[_0x184b64(0xf3)]=_0x482646[_0x184b64(0xf3)]),_0x1f9342[_0x184b64(0xb6)]=_0x482646[_0x184b64(0xb6)];}const _0x402fec=await saveBffScript(_0x1f9342),_0x5c87ed=_0x402fec['id'],_0x3d9277=_0x402fec['script']??await getBffScriptInfo(_0x5c87ed),_0x3378f2={'hash':_0x1d5487,'remoteId':_0x5c87ed,'version':_0x3d9277['version']};if(_0x482646[_0x184b64(0xdc)]===_0x184b64(0xa7)){const _0x24483f=_0x1fd89c[_0x184b64(0xd8)][_0x184b64(0x90)](_0x482646[_0x184b64(0xae)]);if(!_0x24483f){_0x3e6e2a[_0x184b64(0xaa)][_0x482646[_0x184b64(0xae)]]={..._0x1e43c2,..._0x3378f2};return;}_0x3378f2['alias']=_0x24483f[_0x184b64(0xb0)]??_0x1e43c2?.[_0x184b64(0xb0)],_0x3378f2['datasetCode']=_0x24483f[_0x184b64(0xb7)],_0x3378f2[_0x184b64(0xf3)]=_0x482646[_0x184b64(0xf3)],_0x3378f2[_0x184b64(0xb6)]=_0x482646[_0x184b64(0xb6)];}_0x3e6e2a[_0x184b64(0xaa)][_0x482646[_0x184b64(0xae)]]=_0x3378f2;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x3e2c3d,_0x476fca,_0x3f756c){const _0x49b326=a44_0x595ca0;if(_0x3f756c['length']===0x0)return;for(let _0x2d45fe=0x0;_0x2d45fe<LOCK_SETTLE_RETRY_COUNT;_0x2d45fe+=0x1){const _0x41b4bd=await readBffLockFile(_0x3e2c3d),_0x90f3f1=_0x41b4bd?.[_0x49b326(0xe1)]?.[_0x476fca]?.[_0x49b326(0xaa)]??{},_0x257a98=_0x3f756c['every'](_0x56cdee=>!!_0x90f3f1[_0x56cdee]?.[_0x49b326(0x92)]);if(_0x257a98)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0x3f756c[_0x49b326(0x9f)](',\x20')+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a45_0x3efa0f=a45_0x50e6;(function(_0x41879f,_0xd880e2){const _0x482389=a45_0x50e6,_0x1c7ea8=_0x41879f();while(!![]){try{const _0x4b5db0=-parseInt(_0x482389(0xb3))/0x1+-parseInt(_0x482389(0xbd))/0x2+parseInt(_0x482389(0xc7))/0x3*(parseInt(_0x482389(0xc9))/0x4)+-parseInt(_0x482389(0xad))/0x5*(parseInt(_0x482389(0xbe))/0x6)+parseInt(_0x482389(0xb8))/0x7+-parseInt(_0x482389(0xb6))/0x8*(parseInt(_0x482389(0xb2))/0x9)+-parseInt(_0x482389(0xbb))/0xa*(-parseInt(_0x482389(0xc1))/0xb);if(_0x4b5db0===_0xd880e2)break;else _0x1c7ea8['push'](_0x1c7ea8['shift']());}catch(_0x3414cd){_0x1c7ea8['push'](_0x1c7ea8['shift']());}}}(a45_0x16e6,0xa34c6));function a45_0x50e6(_0x4d90c3,_0x38b559){_0x4d90c3=_0x4d90c3-0xa9;const _0x16e6da=a45_0x16e6();let _0x50e60d=_0x16e6da[_0x4d90c3];return _0x50e60d;}function a45_0x16e6(){const _0x4930bc=['lockKey','11vntLWi','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','boolean','mergedCli','\x20modified,\x20','map','3ekMKIq','profileName','1594816THnlDy','\x20added,\x20','alias','All\x20Backend\x20Function\x20scripts\x20are\x20in\x20sync.','\x20remote-only','length','bool','appCode','status','datasetCode','filePath','864750aApLEY','functions','selectedAppName','apiDir','Check\x20local\x20Backend\x20Function\x20sync\x20status\x20against\x20lock\x20file','117bPcXTq','374362QBJIJl','bff','\x20unchanged','248904erCXkB','lockFilePath','3379075ejsWtD','push','remote','20696910WfTFge','has','2660938MUbczu','6yDdIKO','currentApp'];a45_0x16e6=function(){return _0x4930bc;};return a45_0x16e6();}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':a45_0x3efa0f(0xb4),'command':'status','description':a45_0x3efa0f(0xb1),'risk':'read','flags':[{'name':a45_0x3efa0f(0xba),'type':a45_0x3efa0f(0xc3),'description':a45_0x3efa0f(0xc2)}],async 'execute'(_0xcc49ea){const _0x3cd302=a45_0x3efa0f,_0x14666f=loadBffProjectConfig(_0xcc49ea['appCode']),_0x30afe9=await readBffLockFile(_0x14666f[_0x3cd302(0xb7)]),{appLock:_0x352e39}=ensureLockScope(_0x30afe9??createEmptyBffLock(),_0xcc49ea[_0x3cd302(0xa9)],_0x14666f['scriptsRoot'],_0x3cd302(0xaa)),_0x176307=await scanLocalBffFunctions(_0x14666f),_0x1ad76d=[],_0x353cde=[],_0x5c0cf8=[];for(const _0x3c3c94 of _0x176307){const _0x11aeb4=await computeFileHash(_0x3c3c94[_0x3cd302(0xac)]),_0x2eff4f=_0x352e39[_0x3cd302(0xae)][_0x3c3c94[_0x3cd302(0xc0)]];if(!_0x2eff4f)_0x1ad76d[_0x3cd302(0xb9)](_0x3c3c94[_0x3cd302(0xc0)]);else _0x2eff4f['hash']!==_0x11aeb4?_0x353cde[_0x3cd302(0xb9)](_0x3c3c94[_0x3cd302(0xc0)]):_0x5c0cf8[_0x3cd302(0xb9)](_0x3c3c94[_0x3cd302(0xc0)]);}const _0x2e63d1=[];if(_0xcc49ea[_0x3cd302(0xcf)](_0x3cd302(0xba))){const _0x1361a0=resolveApiModelSource(_0xcc49ea[_0x3cd302(0xb0)],_0xcc49ea['appCode'],_0xcc49ea[_0x3cd302(0xaf)]||_0xcc49ea[_0x3cd302(0xc4)]?.[_0x3cd302(0xbf)]||_0xcc49ea[_0x3cd302(0xc4)]?.['defaultApp']),_0x2a9be7=loadAliasMap(_0xcc49ea[_0x3cd302(0xb0)],undefined,_0x1361a0[_0x3cd302(0xac)],_0x1361a0[_0x3cd302(0xc8)]),_0x5e458d=new Map(_0x2a9be7['map'](_0x248e1e=>[_0x248e1e[_0x3cd302(0xab)],_0x248e1e[_0x3cd302(0xcb)]])),[_0x461dbd,_0x19aa4e]=await Promise['all']([listBffScripts(_0xcc49ea['appCode']),getBffScriptStatistics(_0xcc49ea[_0x3cd302(0xa9)])]),_0x4ccaf2=createHookLocationMap(_0x19aa4e),_0x1df539=new Set(_0x176307[_0x3cd302(0xc6)](_0x5e97ae=>_0x5e97ae['lockKey']));for(const _0x1dbdc4 of _0x461dbd){const _0x4cf260=resolveRemoteScriptTarget(_0x14666f,_0x1dbdc4,_0x4ccaf2,_0x352e39[_0x3cd302(0xae)],_0x5e458d);_0x4cf260&&!_0x1df539[_0x3cd302(0xbc)](_0x4cf260[_0x3cd302(0xc0)])&&_0x2e63d1[_0x3cd302(0xb9)](_0x4cf260[_0x3cd302(0xc0)]);}}const _0x30014f=_0x1ad76d['length']===0x0&&_0x353cde['length']===0x0&&_0x2e63d1[_0x3cd302(0xce)]===0x0;return{'ok':!![],'data':{'added':_0x1ad76d,'modified':_0x353cde,'unchanged':_0x5c0cf8,'remoteOnly':_0x2e63d1},'message':_0x30014f?_0x3cd302(0xcc):_0x1ad76d[_0x3cd302(0xce)]+_0x3cd302(0xca)+_0x353cde['length']+_0x3cd302(0xc5)+_0x5c0cf8['length']+_0x3cd302(0xb5)+(_0x2e63d1[_0x3cd302(0xce)]>0x0?',\x20'+_0x2e63d1[_0x3cd302(0xce)]+_0x3cd302(0xcd):'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a46_0x491687=a46_0x450f;(function(_0x2aee93,_0x340c29){const _0x3b2741=a46_0x450f,_0x544ee9=_0x2aee93();while(!![]){try{const _0x2e9f7a=parseInt(_0x3b2741(0xfb))/0x1*(parseInt(_0x3b2741(0xf4))/0x2)+-parseInt(_0x3b2741(0xe5))/0x3*(-parseInt(_0x3b2741(0xe4))/0x4)+-parseInt(_0x3b2741(0xe9))/0x5+parseInt(_0x3b2741(0xdc))/0x6+-parseInt(_0x3b2741(0xf7))/0x7+parseInt(_0x3b2741(0xe3))/0x8+parseInt(_0x3b2741(0xeb))/0x9*(parseInt(_0x3b2741(0xea))/0xa);if(_0x2e9f7a===_0x340c29)break;else _0x544ee9['push'](_0x544ee9['shift']());}catch(_0x47683d){_0x544ee9['push'](_0x544ee9['shift']());}}}(a46_0x2c5c,0xaa7d3));import{CliErrors}from'../../errors.js';function a46_0x2c5c(){const _0xacd230=['error','7430535LIqGLY','pipe','setLogPath','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','133597QJiJbQ','7089942JuzBcW','install','cli-skill-install','repairCommand','cli-skill','apiError','info','6424040NZPYcE','13592rMJGub','489zOVOCD','CLI\x20Built-in\x20Skill\x20','cwd','changed','5801710UwAvbI','286100yFhHAX','36vwMrMf','code',']:\x20','skillVersion','\x20at\x20','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.','\x20via\x20skills@latest','log','installedPath','4HKosPc','\x20is\x20already\x20current'];a46_0x2c5c=function(){return _0xacd230;};return a46_0x2c5c();}function a46_0x450f(_0xf8586e,_0x36e346){_0xf8586e=_0xf8586e-0xdc;const _0x2c5c31=a46_0x2c5c();let _0x450fe5=_0x2c5c31[_0xf8586e];return _0x450fe5;}import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a46_0x491687(0xe0),'command':a46_0x491687(0xdd),'description':a46_0x491687(0xfa),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x53c3b4){const _0x44a63b=a46_0x491687;logger[_0x44a63b(0xf9)](process[_0x44a63b(0xe7)]()),logger[_0x44a63b(0xe2)](_0x44a63b(0xde),_0x44a63b(0xf0));const _0x297559=installBuiltinSkill({'stdio':_0x53c3b4['nonInteractive']?_0x44a63b(0xf8):'inherit'});if(!_0x297559['ok'])throw CliErrors[_0x44a63b(0xe1)]('Built-in\x20Skill\x20install\x20failed\x20['+_0x297559[_0x44a63b(0xec)]+_0x44a63b(0xed)+(_0x297559[_0x44a63b(0xf6)]||'unknown'),'Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20'+_0x297559[_0x44a63b(0xdf)]);return console[_0x44a63b(0xf2)](_0x297559[_0x44a63b(0xe8)]?_0x44a63b(0xe6)+_0x297559[_0x44a63b(0xee)]+'\x20installed'+(_0x297559[_0x44a63b(0xf3)]?_0x44a63b(0xef)+_0x297559[_0x44a63b(0xf3)]:_0x44a63b(0xf1)):_0x44a63b(0xe6)+_0x297559[_0x44a63b(0xee)]+_0x44a63b(0xf5)+(_0x297559['installedPath']?_0x44a63b(0xef)+_0x297559['installedPath']:'')),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a47_0x1f60a3=a47_0x2008;(function(_0x231407,_0x533231){const _0x2aa1bb=a47_0x2008,_0x38a39f=_0x231407();while(!![]){try{const _0x2d5b0e=-parseInt(_0x2aa1bb(0x15f))/0x1*(parseInt(_0x2aa1bb(0x157))/0x2)+parseInt(_0x2aa1bb(0x16c))/0x3*(parseInt(_0x2aa1bb(0x13c))/0x4)+parseInt(_0x2aa1bb(0x186))/0x5*(-parseInt(_0x2aa1bb(0x152))/0x6)+parseInt(_0x2aa1bb(0x14e))/0x7+parseInt(_0x2aa1bb(0x15a))/0x8*(-parseInt(_0x2aa1bb(0x15b))/0x9)+parseInt(_0x2aa1bb(0x16e))/0xa+parseInt(_0x2aa1bb(0x148))/0xb*(parseInt(_0x2aa1bb(0x177))/0xc);if(_0x2d5b0e===_0x533231)break;else _0x38a39f['push'](_0x38a39f['shift']());}catch(_0x5224d5){_0x38a39f['push'](_0x38a39f['shift']());}}}(a47_0x2b7b,0x262be));import a47_0x503bfe from'chalk';function a47_0x2008(_0x2f8b49,_0x4d0852){_0x2f8b49=_0x2f8b49-0x13a;const _0x2b7b64=a47_0x2b7b();let _0x20080a=_0x2b7b64[_0x2f8b49];return _0x20080a;}import a47_0x38be19 from'ora';import a47_0x241aba 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 _0x23a4d4=a47_0x2008;return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x23a4d4(0x17c)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x571151=a47_0x2008,_0x397ceb=process[_0x571151(0x18c)]['toLowerCase']();if(_0x397ceb[_0x571151(0x166)]('bun'))return _0x571151(0x18e);return _0x571151(0x182);}const updateFlags=[{'name':'beta','type':a47_0x1f60a3(0x17d),'description':a47_0x1f60a3(0x13b),'default':![]},{'name':a47_0x1f60a3(0x156),'type':a47_0x1f60a3(0x158),'description':a47_0x1f60a3(0x151)}];function getRequestedVersion(_0x13a50f){const _0x57bb89=a47_0x1f60a3;return _0x13a50f[_0x57bb89(0x149)](_0x57bb89(0x156))[_0x57bb89(0x164)]();}async function validateUpdateFlags(_0x5437db){const _0x5e1fe6=a47_0x1f60a3,_0x4e5cd0=_0x5437db[_0x5e1fe6(0x173)](_0x5e1fe6(0x140)),_0x5a41d7=getRequestedVersion(_0x5437db);if(_0x4e5cd0&&_0x5a41d7)throw CliErrors['validation']('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.',_0x5e1fe6(0x14a));if(_0x5a41d7&&!a47_0x241aba['valid'](_0x5a41d7))throw CliErrors[_0x5e1fe6(0x174)](_0x5e1fe6(0x150)+_0x5a41d7,_0x5e1fe6(0x176));}async function fetchNpmDistTags(){const _0x52bf4d=a47_0x1f60a3;try{const _0x22bf94=await fetch(_0x52bf4d(0x13a)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x52bf4d(0x144),{'signal':AbortSignal[_0x52bf4d(0x178)](0x2710)});if(!_0x22bf94['ok'])return null;const _0xd92217=await _0x22bf94[_0x52bf4d(0x160)]();if(!_0xd92217||typeof _0xd92217!=='object')return null;return Object[_0x52bf4d(0x17a)](Object[_0x52bf4d(0x162)](_0xd92217)[_0x52bf4d(0x168)](([,_0xeb908c])=>typeof _0xeb908c==='string'&&_0xeb908c['trim']()[_0x52bf4d(0x13e)]>0x0)[_0x52bf4d(0x175)](([_0x2f1727,_0x161d8a])=>[_0x2f1727,String(_0x161d8a)[_0x52bf4d(0x164)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x3c403e){const _0x3b912f=await fetchNpmDistTags();return _0x3b912f?.[_0x3c403e]??null;}async function fetchLatestVersion(){return fetchNpmDistTagVersion('latest');}async function resolveTargetVersion(_0x49bf12){const _0x56588c=a47_0x1f60a3,_0x510174=getRequestedVersion(_0x49bf12);if(_0x510174)return{'version':_0x510174,'source':_0x56588c(0x156)};if(_0x49bf12['bool'](_0x56588c(0x140))){const _0x4f775c=await fetchNpmDistTagVersion(_0x56588c(0x140));if(!_0x4f775c)return null;return{'version':_0x4f775c,'source':_0x56588c(0x140)};}const _0x19c9bf=await fetchLatestVersion();if(!_0x19c9bf)return null;return{'version':_0x19c9bf,'source':_0x56588c(0x13f)};}function shouldInstallTarget(_0xe41120,_0x259865){const _0x2024bd=a47_0x1f60a3;if(_0x259865[_0x2024bd(0x15d)]==='version'||_0x259865[_0x2024bd(0x15d)]==='beta')return!a47_0x241aba['eq'](_0xe41120,_0x259865[_0x2024bd(0x156)]);return a47_0x241aba['lt'](_0xe41120,_0x259865['version']);}function getInstallPlanLabel(_0x3ddc91,_0x41cab9){const _0x3495a3=a47_0x1f60a3;switch(_0x41cab9[_0x3495a3(0x15d)]){case _0x3495a3(0x140):return _0x3495a3(0x18a)+a47_0x503bfe['yellow'](_0x3ddc91)+_0x3495a3(0x16b)+a47_0x503bfe['green'](_0x41cab9[_0x3495a3(0x156)]);case'version':return _0x3495a3(0x15c)+a47_0x503bfe['yellow'](_0x3ddc91)+_0x3495a3(0x16b)+a47_0x503bfe['green'](_0x41cab9[_0x3495a3(0x156)]);case _0x3495a3(0x13f):default:return _0x3495a3(0x179)+a47_0x503bfe[_0x3495a3(0x14d)](_0x3ddc91)+_0x3495a3(0x16b)+a47_0x503bfe[_0x3495a3(0x194)](_0x41cab9[_0x3495a3(0x156)]);}}function repairCurrentBuiltinSkill(){const _0x36c049=a47_0x1f60a3;console[_0x36c049(0x181)](a47_0x503bfe['gray'](_0x36c049(0x142)));const _0x10a970=installBuiltinSkill();if(_0x10a970['ok']){console[_0x36c049(0x181)](a47_0x503bfe['gray'](_0x36c049(0x17f)+_0x10a970[_0x36c049(0x145)]+_0x36c049(0x154)));return;}throw CliErrors[_0x36c049(0x171)](_0x36c049(0x170)+_0x10a970[_0x36c049(0x14b)]+_0x36c049(0x184)+(_0x10a970[_0x36c049(0x187)]||_0x36c049(0x14f)),_0x36c049(0x18d)+_0x10a970[_0x36c049(0x159)]+_0x36c049(0x189)+CLI_BIN_NAME+_0x36c049(0x16f));}function verifyUpdatedBuiltinSkill(_0x4cb920){const _0x1ccb7e=a47_0x1f60a3,_0x471ff8=inspectInstalledBuiltinSkillVersion(_0x4cb920);if(_0x471ff8['state']===_0x1ccb7e(0x15e)){console['log'](a47_0x503bfe['gray'](_0x1ccb7e(0x17f)+_0x4cb920+'\x20is\x20up\x20to\x20date.'));return;}const _0x4e8b86=_0x471ff8[_0x1ccb7e(0x145)]?_0x1ccb7e(0x155)+_0x4cb920+_0x1ccb7e(0x188)+_0x471ff8[_0x1ccb7e(0x145)]:_0x1ccb7e(0x155)+_0x4cb920+_0x1ccb7e(0x17e)+_0x471ff8[_0x1ccb7e(0x191)];throw CliErrors[_0x1ccb7e(0x171)]('CLI\x20updated\x20to\x20v'+_0x4cb920+',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20'+_0x4e8b86,_0x1ccb7e(0x18d)+_0x471ff8['repairCommand']+_0x1ccb7e(0x189)+CLI_BIN_NAME+_0x1ccb7e(0x16f));}async function execute(_0x40c83e){const _0xd4e1f5=a47_0x1f60a3;await validateUpdateFlags(_0x40c83e);const _0x4afb1b=getCurrentVersion();console[_0xd4e1f5(0x181)](_0xd4e1f5(0x163)+_0x4afb1b);const _0x1d821d=a47_0x38be19(_0xd4e1f5(0x192))[_0xd4e1f5(0x165)](),_0x3a6fd5=await resolveTargetVersion(_0x40c83e);if(!_0x3a6fd5){const _0x4b52cb=_0x40c83e[_0xd4e1f5(0x173)](_0xd4e1f5(0x140))?_0xd4e1f5(0x16d):'Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)';return _0x1d821d[_0xd4e1f5(0x185)](_0x4b52cb),console[_0xd4e1f5(0x181)](a47_0x503bfe[_0xd4e1f5(0x17b)]('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x4b52cb};}const _0x4d2dac=a47_0x241aba[_0xd4e1f5(0x193)](VERSION),_0x31d0bd=a47_0x241aba[_0xd4e1f5(0x193)](_0x3a6fd5['version']);if(!_0x4d2dac||!_0x31d0bd)return _0x1d821d['fail'](_0xd4e1f5(0x169)),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x4d2dac,_0x3a6fd5)){const _0x4cf475=_0x3a6fd5[_0xd4e1f5(0x15d)]==='version'?'Already\x20on\x20requested\x20version\x20(v'+_0x3a6fd5['version']+')':a47_0x241aba['gt'](_0x4d2dac,_0x31d0bd)?_0xd4e1f5(0x153)+_0x4afb1b+_0xd4e1f5(0x161)+_0x3a6fd5['version']:_0xd4e1f5(0x143)+_0x3a6fd5[_0xd4e1f5(0x156)]+')';return _0x1d821d[_0xd4e1f5(0x146)](_0x4cf475),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x1d821d[_0xd4e1f5(0x147)](getInstallPlanLabel(_0x4afb1b,_0x3a6fd5));const _0x1cf16d=detectPackageManager(),_0x34f2c3=_0x1cf16d===_0xd4e1f5(0x182)?resolveNpmBin(_0xd4e1f5(0x182)):_0x1cf16d,_0x57e678=a47_0x38be19(_0xd4e1f5(0x16a)+_0x1cf16d+_0xd4e1f5(0x18f))['start']();try{await execa(_0x34f2c3,[_0xd4e1f5(0x180),'-g',NPM_PACKAGE_NAME+'@'+_0x3a6fd5['version']],{'stdio':_0xd4e1f5(0x18b)}),_0x57e678[_0xd4e1f5(0x146)](_0xd4e1f5(0x167)+_0x3a6fd5['version']),console[_0xd4e1f5(0x181)](a47_0x503bfe[_0xd4e1f5(0x17b)](_0xd4e1f5(0x14c)));}catch(_0x260530){return _0x57e678[_0xd4e1f5(0x185)](_0xd4e1f5(0x183)),console[_0xd4e1f5(0x187)](a47_0x503bfe[_0xd4e1f5(0x172)]('\x20\x20'+_0x260530[_0xd4e1f5(0x141)])),console[_0xd4e1f5(0x181)](a47_0x503bfe[_0xd4e1f5(0x17b)](_0xd4e1f5(0x190)+_0x1cf16d+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x3a6fd5[_0xd4e1f5(0x156)])),{'ok':![],'message':_0x260530[_0xd4e1f5(0x141)]};}return verifyUpdatedBuiltinSkill(_0x3a6fd5[_0xd4e1f5(0x156)]),{'ok':!![]};}export const updateDefinition={'service':'update','command':'run','description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':a47_0x1f60a3(0x13d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};function a47_0x2b7b(){const _0x4b82e3=['unknown','Invalid\x20version:\x20','Install\x20a\x20specific\x20CLI\x20version','1278372BzpEZp','Current\x20version\x20v','\x20is\x20up\x20to\x20date.','expected\x20','version','320898zxozBE','string','repairCommand','138616InlUlv','9CYZdNr','Requested\x20version:\x20','source','current','1EwEVVG','json','\x20is\x20newer\x20than\x20npm\x20latest\x20v','entries','Current\x20version:\x20','trim','start','includes','Updated\x20to\x20v','filter','Version\x20comparison\x20failed','Updating\x20via\x20','\x20→\x20','3xJCQpd','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','221050DrKhys','\x20doctor','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','apiError','red','bool','validation','map','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','3500364hDBMVs','timeout','Update\x20available:\x20','fromEntries','gray','slice','boolean',',\x20state\x20','\x20\x20CLI\x20Built-in\x20Skill\x20','install','log','npm','Update\x20failed',']:\x20','fail','5XEqmDG','error',',\x20found\x20',',\x20then\x20verify\x20with:\x20','Beta\x20version:\x20','pipe','execPath','Run:\x20','bun','...','\x20\x20Try\x20manually:\x20','state','Checking\x20for\x20updates...','valid','green','https://registry.npmjs.org/-/package/','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','893492YBdRII','read','length','latest','beta','message','Checking\x20CLI\x20Built-in\x20Skill...','Already\x20up\x20to\x20date\x20(v','/dist-tags','skillVersion','succeed','info','11TtNgrx','str','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','code','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','yellow','70091FxhPGo'];a47_0x2b7b=function(){return _0x4b82e3;};return a47_0x2b7b();}
|
|
1
|
+
const a47_0x196e9a=a47_0x4bdb;(function(_0x3d9283,_0x3c566b){const _0x663578=a47_0x4bdb,_0x545bf6=_0x3d9283();while(!![]){try{const _0x245421=parseInt(_0x663578(0x159))/0x1*(parseInt(_0x663578(0x160))/0x2)+parseInt(_0x663578(0x156))/0x3+parseInt(_0x663578(0x153))/0x4*(-parseInt(_0x663578(0x137))/0x5)+parseInt(_0x663578(0x136))/0x6*(-parseInt(_0x663578(0x16a))/0x7)+parseInt(_0x663578(0x13d))/0x8+parseInt(_0x663578(0x148))/0x9*(parseInt(_0x663578(0x15e))/0xa)+parseInt(_0x663578(0x118))/0xb*(-parseInt(_0x663578(0x140))/0xc);if(_0x245421===_0x3c566b)break;else _0x545bf6['push'](_0x545bf6['shift']());}catch(_0xb80c99){_0x545bf6['push'](_0x545bf6['shift']());}}}(a47_0x2f99,0x3b734));import a47_0x3edd9d from'chalk';import a47_0x1b4479 from'ora';import a47_0x53c8ff from'semver';import{execa}from'execa';function a47_0x2f99(){const _0x4d7967=['Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','119413fQrcpO','fromEntries','message','\x20install\x20-g\x20','map','4763mBnjbe','info','CLI\x20updated\x20to\x20v','Update\x20failed','Install\x20a\x20specific\x20CLI\x20version','timeout','Version\x20comparison\x20failed',']:\x20','\x20→\x20','apiError','install','json','string',',\x20state\x20','Checking\x20for\x20updates...','\x20is\x20up\x20to\x20date.','state','bool','toLowerCase','code','Run:\x20','expected\x20','start','skillVersion','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','\x20is\x20newer\x20than\x20npm\x20latest\x20v','read','update','Updated\x20to\x20v','source','150IsaMvu','2044390ZXDEGQ',',\x20found\x20','str','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','object','log','395976DrdsVt','Invalid\x20version:\x20','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','3864MEMBJI','fail',',\x20then\x20verify\x20with:\x20','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','bun','beta','length','\x20\x20CLI\x20Built-in\x20Skill\x20','1683SwRBhX','npm','Requested\x20version:\x20','includes','unknown','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','Current\x20version:\x20','yellow','red','filter','@latest','4JPdymW','Update\x20available:\x20','gray','1171338cSvdDG','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','latest','3UCUNYn','succeed','error','current','green','19770yBdwpq','valid','272430ImAOVX','validation','entries','trim','repairCommand','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','boolean','Already\x20up\x20to\x20date\x20(v','version'];a47_0x2f99=function(){return _0x4d7967;};return a47_0x2f99();}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 _0x4d5ec6=a47_0x4bdb;return GIT_COMMIT!==_0x4d5ec6(0x14c)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x1062df=a47_0x4bdb,_0x3d9c93=process['execPath'][_0x1062df(0x12a)]();if(_0x3d9c93[_0x1062df(0x14b)]('bun'))return _0x1062df(0x144);return _0x1062df(0x149);}const updateFlags=[{'name':a47_0x196e9a(0x145),'type':a47_0x196e9a(0x166),'description':a47_0x196e9a(0x157),'default':![]},{'name':a47_0x196e9a(0x168),'type':a47_0x196e9a(0x124),'description':a47_0x196e9a(0x11c)}];function getRequestedVersion(_0xbdc810){const _0x13255d=a47_0x196e9a;return _0xbdc810[_0x13255d(0x139)]('version')[_0x13255d(0x163)]();}async function validateUpdateFlags(_0x185631){const _0x232553=a47_0x196e9a,_0x365698=_0x185631[_0x232553(0x129)](_0x232553(0x145)),_0x56df89=getRequestedVersion(_0x185631);if(_0x365698&&_0x56df89)throw CliErrors[_0x232553(0x161)](_0x232553(0x130),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x56df89&&!a47_0x53c8ff[_0x232553(0x15f)](_0x56df89))throw CliErrors[_0x232553(0x161)](_0x232553(0x13e)+_0x56df89,_0x232553(0x13a));}async function fetchNpmDistTags(){const _0x40ba35=a47_0x196e9a;try{const _0x591450=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0x40ba35(0x11d)](0x2710)});if(!_0x591450['ok'])return null;const _0x1aa012=await _0x591450[_0x40ba35(0x123)]();if(!_0x1aa012||typeof _0x1aa012!==_0x40ba35(0x13b))return null;return Object[_0x40ba35(0x16b)](Object[_0x40ba35(0x162)](_0x1aa012)[_0x40ba35(0x151)](([,_0x315a09])=>typeof _0x315a09==='string'&&_0x315a09[_0x40ba35(0x163)]()[_0x40ba35(0x146)]>0x0)[_0x40ba35(0x117)](([_0x57ed41,_0x2008e2])=>[_0x57ed41,String(_0x2008e2)['trim']()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x556947){const _0x2c0b93=await fetchNpmDistTags();return _0x2c0b93?.[_0x556947]??null;}async function fetchLatestVersion(){const _0x1a64cb=a47_0x196e9a;return fetchNpmDistTagVersion(_0x1a64cb(0x158));}async function resolveTargetVersion(_0x41739c){const _0x4f3795=a47_0x196e9a,_0x585abd=getRequestedVersion(_0x41739c);if(_0x585abd)return{'version':_0x585abd,'source':_0x4f3795(0x168)};if(_0x41739c[_0x4f3795(0x129)](_0x4f3795(0x145))){const _0x539e88=await fetchNpmDistTagVersion('beta');if(!_0x539e88)return null;return{'version':_0x539e88,'source':_0x4f3795(0x145)};}const _0x7b7329=await fetchLatestVersion();if(!_0x7b7329)return null;return{'version':_0x7b7329,'source':'latest'};}function shouldInstallTarget(_0x1afd16,_0x434b99){const _0x51cc02=a47_0x196e9a;if(_0x434b99[_0x51cc02(0x135)]===_0x51cc02(0x168)||_0x434b99[_0x51cc02(0x135)]==='beta')return!a47_0x53c8ff['eq'](_0x1afd16,_0x434b99[_0x51cc02(0x168)]);return a47_0x53c8ff['lt'](_0x1afd16,_0x434b99[_0x51cc02(0x168)]);}function getInstallPlanLabel(_0x18b4d9,_0x32beb1){const _0x269889=a47_0x196e9a;switch(_0x32beb1[_0x269889(0x135)]){case'beta':return'Beta\x20version:\x20'+a47_0x3edd9d['yellow'](_0x18b4d9)+_0x269889(0x120)+a47_0x3edd9d[_0x269889(0x15d)](_0x32beb1['version']);case _0x269889(0x168):return _0x269889(0x14a)+a47_0x3edd9d[_0x269889(0x14f)](_0x18b4d9)+_0x269889(0x120)+a47_0x3edd9d[_0x269889(0x15d)](_0x32beb1[_0x269889(0x168)]);case _0x269889(0x158):default:return _0x269889(0x154)+a47_0x3edd9d[_0x269889(0x14f)](_0x18b4d9)+'\x20→\x20'+a47_0x3edd9d[_0x269889(0x15d)](_0x32beb1[_0x269889(0x168)]);}}function repairCurrentBuiltinSkill(){const _0x12f7ef=a47_0x196e9a;console['log'](a47_0x3edd9d['gray']('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x35f1d9=installBuiltinSkill();if(_0x35f1d9['ok']){console['log'](a47_0x3edd9d['gray']('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x35f1d9[_0x12f7ef(0x12f)]+'\x20is\x20up\x20to\x20date.'));return;}throw CliErrors[_0x12f7ef(0x121)](_0x12f7ef(0x14d)+_0x35f1d9[_0x12f7ef(0x12b)]+_0x12f7ef(0x11f)+(_0x35f1d9[_0x12f7ef(0x15b)]||_0x12f7ef(0x14c)),_0x12f7ef(0x12c)+_0x35f1d9[_0x12f7ef(0x164)]+_0x12f7ef(0x142)+CLI_BIN_NAME+'\x20doctor');}function verifyUpdatedBuiltinSkill(_0x4f4206){const _0x1ea508=a47_0x196e9a,_0x4befbb=inspectInstalledBuiltinSkillVersion(_0x4f4206);if(_0x4befbb['state']===_0x1ea508(0x15c)){console[_0x1ea508(0x13c)](a47_0x3edd9d[_0x1ea508(0x155)](_0x1ea508(0x147)+_0x4f4206+_0x1ea508(0x127)));return;}const _0x4260fe=_0x4befbb[_0x1ea508(0x12f)]?_0x1ea508(0x12d)+_0x4f4206+_0x1ea508(0x138)+_0x4befbb['skillVersion']:'expected\x20'+_0x4f4206+_0x1ea508(0x125)+_0x4befbb[_0x1ea508(0x128)];throw CliErrors[_0x1ea508(0x121)](_0x1ea508(0x11a)+_0x4f4206+',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20'+_0x4260fe,_0x1ea508(0x12c)+_0x4befbb[_0x1ea508(0x164)]+_0x1ea508(0x142)+CLI_BIN_NAME+'\x20doctor');}async function execute(_0x35d9cd){const _0x41c30d=a47_0x196e9a;await validateUpdateFlags(_0x35d9cd);const _0x3d77d1=getCurrentVersion();console['log'](_0x41c30d(0x14e)+_0x3d77d1);const _0x474f3c=a47_0x1b4479(_0x41c30d(0x126))['start'](),_0x2a04a8=await resolveTargetVersion(_0x35d9cd);if(!_0x2a04a8){const _0x50da45=_0x35d9cd[_0x41c30d(0x129)](_0x41c30d(0x145))?'Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm':_0x41c30d(0x165);return _0x474f3c['fail'](_0x50da45),console[_0x41c30d(0x13c)](a47_0x3edd9d['gray'](_0x41c30d(0x13f)+NPM_PACKAGE_NAME+_0x41c30d(0x152))),{'ok':![],'message':_0x50da45};}const _0x51a51c=a47_0x53c8ff[_0x41c30d(0x15f)](VERSION),_0xc5787a=a47_0x53c8ff[_0x41c30d(0x15f)](_0x2a04a8[_0x41c30d(0x168)]);if(!_0x51a51c||!_0xc5787a)return _0x474f3c[_0x41c30d(0x141)](_0x41c30d(0x11e)),{'ok':![],'message':_0x41c30d(0x11e)};if(!shouldInstallTarget(_0x51a51c,_0x2a04a8)){const _0x310238=_0x2a04a8['source']===_0x41c30d(0x168)?'Already\x20on\x20requested\x20version\x20(v'+_0x2a04a8[_0x41c30d(0x168)]+')':a47_0x53c8ff['gt'](_0x51a51c,_0xc5787a)?'Current\x20version\x20v'+_0x3d77d1+_0x41c30d(0x131)+_0x2a04a8[_0x41c30d(0x168)]:_0x41c30d(0x167)+_0x2a04a8[_0x41c30d(0x168)]+')';return _0x474f3c[_0x41c30d(0x15a)](_0x310238),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x474f3c[_0x41c30d(0x119)](getInstallPlanLabel(_0x3d77d1,_0x2a04a8));const _0x4988ad=detectPackageManager(),_0xcd194e=_0x4988ad===_0x41c30d(0x149)?resolveNpmBin(_0x41c30d(0x149)):_0x4988ad,_0x3093e9=a47_0x1b4479('Updating\x20via\x20'+_0x4988ad+'...')[_0x41c30d(0x12e)]();try{await execa(_0xcd194e,[_0x41c30d(0x122),'-g',NPM_PACKAGE_NAME+'@'+_0x2a04a8['version']],{'stdio':'pipe'}),_0x3093e9[_0x41c30d(0x15a)](_0x41c30d(0x134)+_0x2a04a8[_0x41c30d(0x168)]),console[_0x41c30d(0x13c)](a47_0x3edd9d[_0x41c30d(0x155)](_0x41c30d(0x143)));}catch(_0x48fb28){return _0x3093e9[_0x41c30d(0x141)](_0x41c30d(0x11b)),console[_0x41c30d(0x15b)](a47_0x3edd9d[_0x41c30d(0x150)]('\x20\x20'+_0x48fb28['message'])),console[_0x41c30d(0x13c)](a47_0x3edd9d[_0x41c30d(0x155)]('\x20\x20Try\x20manually:\x20'+_0x4988ad+_0x41c30d(0x116)+NPM_PACKAGE_NAME+'@'+_0x2a04a8['version'])),{'ok':![],'message':_0x48fb28[_0x41c30d(0x16c)]};}return verifyUpdatedBuiltinSkill(_0x2a04a8[_0x41c30d(0x168)]),{'ok':!![]};}function a47_0x4bdb(_0x14a49c,_0x8e7f92){_0x14a49c=_0x14a49c-0x116;const _0x2f99e7=a47_0x2f99();let _0x4bdb1b=_0x2f99e7[_0x14a49c];return _0x4bdb1b;}export const updateDefinition={'service':a47_0x196e9a(0x133),'command':'run','description':a47_0x196e9a(0x169),'risk':a47_0x196e9a(0x132),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a48_0x4f20(){const _0x2acbc0=['275351oQCOkg','8pwzDTB','3366576zENJvA','141328qrJgwu','924763opShdO','2855814GwxALp','2539350BvBIMU','9578zcysoK','20jXIRIy'];a48_0x4f20=function(){return _0x2acbc0;};return a48_0x4f20();}(function(_0x17cfea,_0x367ecb){const _0x4a3ebb=a48_0x2620,_0x1c649a=_0x17cfea();while(!![]){try{const _0x15c3f3=parseInt(_0x4a3ebb(0xf2))/0x1+-parseInt(_0x4a3ebb(0xf0))/0x2+parseInt(_0x4a3ebb(0xf7))/0x3+-parseInt(_0x4a3ebb(0xf5))/0x4*(-parseInt(_0x4a3ebb(0xf1))/0x5)+-parseInt(_0x4a3ebb(0xf8))/0x6+parseInt(_0x4a3ebb(0xf6))/0x7*(parseInt(_0x4a3ebb(0xf3))/0x8)+-parseInt(_0x4a3ebb(0xf4))/0x9;if(_0x15c3f3===_0x367ecb)break;else _0x1c649a['push'](_0x1c649a['shift']());}catch(_0x213668){_0x1c649a['push'](_0x1c649a['shift']());}}}(a48_0x4f20,0xaa918));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';function a48_0x2620(_0x294d30,_0x46c517){_0x294d30=_0x294d30-0xf0;const _0x4f2072=a48_0x4f20();let _0x2620a5=_0x4f2072[_0x294d30];return _0x2620a5;}export const codegenDefinitions=[codegenSdk,codegenSql];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a49_0x4beec2=a49_0x58f2;(function(_0x302acf,_0x37d749){const _0x415759=a49_0x58f2,_0x564d1d=_0x302acf();while(!![]){try{const _0x3f54b3=parseInt(_0x415759(0x13f))/0x1*(-parseInt(_0x415759(0x130))/0x2)+-parseInt(_0x415759(0x142))/0x3+parseInt(_0x415759(0x13a))/0x4+parseInt(_0x415759(0x136))/0x5*(-parseInt(_0x415759(0x13d))/0x6)+parseInt(_0x415759(0x13b))/0x7*(parseInt(_0x415759(0x13e))/0x8)+parseInt(_0x415759(0x140))/0x9*(-parseInt(_0x415759(0x13c))/0xa)+-parseInt(_0x415759(0x138))/0xb*(-parseInt(_0x415759(0x12d))/0xc);if(_0x3f54b3===_0x37d749)break;else _0x564d1d['push'](_0x564d1d['shift']());}catch(_0x3c39b2){_0x564d1d['push'](_0x564d1d['shift']());}}}(a49_0x3bd3,0xc4553));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a49_0x3bd3(){const _0x5a207f=['10BRTVFH','94998tTyATY','494888UJTvvf','34249iGQLTJ','6923628cLMjQq','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','2943240rRHoJD','codegen','read','string','22404nwenHR','operation','name','52RHQXxv','bool','str','skip-imports','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','sdk','55llxgcf','Omit\x20import\x20statements\x20from\x20generated\x20code','12683qsSQdJ','alias','5123816WkhHfU','21ZYkJNb'];a49_0x3bd3=function(){return _0x5a207f;};return a49_0x3bd3();}function a49_0x58f2(_0x5a23a0,_0x2a9712){_0x5a23a0=_0x5a23a0-0x12c;const _0x3bd3ea=a49_0x3bd3();let _0x58f2ea=_0x3bd3ea[_0x5a23a0];return _0x58f2ea;}export const codegenSdk={'service':a49_0x4beec2(0x143),'command':a49_0x4beec2(0x135),'description':a49_0x4beec2(0x134),'risk':a49_0x4beec2(0x144),'flags':[CODE_FLAG_OPTIONAL,{'name':a49_0x4beec2(0x139),'type':'string','description':a49_0x4beec2(0x141)},{'name':a49_0x4beec2(0x12e),'type':a49_0x4beec2(0x12c),'required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':a49_0x4beec2(0x133),'type':'boolean','description':a49_0x4beec2(0x137)}],async 'execute'(_0x245bdf){const _0x4aabf9=a49_0x4beec2,{dataset:_0x19b103,operation:_0x444b07}=await getOperationDetail(_0x245bdf['appCode'],_0x245bdf[_0x4aabf9(0x132)]('code'),_0x245bdf[_0x4aabf9(0x132)](_0x4aabf9(0x12e))),_0x174dcc=generateSdkCode(_0x19b103,_0x444b07,{'includeImports':!_0x245bdf[_0x4aabf9(0x131)](_0x4aabf9(0x133))});return{'ok':!![],'data':{'dataset':{'name':_0x19b103[_0x4aabf9(0x12f)],'code':_0x19b103['code'],'tableName':_0x19b103['tableName']},'operation':_0x245bdf[_0x4aabf9(0x132)](_0x4aabf9(0x12e)),'code':_0x174dcc}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a50_0x7ecb6d=a50_0x35c3;function a50_0x35c3(_0x397d4d,_0x554e96){_0x397d4d=_0x397d4d-0x119;const _0x4e2837=a50_0x4e28();let _0x35c3e4=_0x4e2837[_0x397d4d];return _0x35c3e4;}(function(_0x158d1d,_0x259f44){const _0x5d9e3c=a50_0x35c3,_0x48aa1f=_0x158d1d();while(!![]){try{const _0x344111=-parseInt(_0x5d9e3c(0x130))/0x1+parseInt(_0x5d9e3c(0x12b))/0x2*(parseInt(_0x5d9e3c(0x12d))/0x3)+-parseInt(_0x5d9e3c(0x11c))/0x4*(-parseInt(_0x5d9e3c(0x11d))/0x5)+parseInt(_0x5d9e3c(0x126))/0x6*(parseInt(_0x5d9e3c(0x11b))/0x7)+-parseInt(_0x5d9e3c(0x129))/0x8*(-parseInt(_0x5d9e3c(0x11a))/0x9)+parseInt(_0x5d9e3c(0x119))/0xa*(-parseInt(_0x5d9e3c(0x12f))/0xb)+-parseInt(_0x5d9e3c(0x123))/0xc;if(_0x344111===_0x259f44)break;else _0x48aa1f['push'](_0x48aa1f['shift']());}catch(_0xc6b739){_0x48aa1f['push'](_0x48aa1f['shift']());}}}(a50_0x4e28,0xa0ea6));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a50_0x4e28(){const _0x2f79ab=['sqlCode','sqlcode','6822480bMxrqC','Omit\x20import\x20statements\x20from\x20generated\x20code','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','36aOtsHe','str','boolean','496RZoQlW','string','2dAftYh','no-imports','1567521tTiqPM','bool','218911lvvKyt','619087glGBWq','590fbRfRR','169560KjjYuy','1044939fwRujm','4qhLoWZ','2173235lrcyaM','sdk','sqlName','target'];a50_0x4e28=function(){return _0x2f79ab;};return a50_0x4e28();}export const codegenSql={'service':'codegen','command':'sql','description':a50_0x7ecb6d(0x125),'risk':'read','flags':[SQLCODE_FLAG,{'name':a50_0x7ecb6d(0x120),'type':a50_0x7ecb6d(0x12a),'description':'Code\x20target:\x20sdk\x20(default)\x20or\x20bff','default':a50_0x7ecb6d(0x11e),'enum':[a50_0x7ecb6d(0x11e),'bff']},{'name':a50_0x7ecb6d(0x12c),'type':a50_0x7ecb6d(0x128),'description':a50_0x7ecb6d(0x124)}],async 'execute'(_0x4a9ed3){const _0x49b362=a50_0x7ecb6d,_0x3c583d=await getSqlQueryInfo(_0x4a9ed3['appCode'],_0x4a9ed3[_0x49b362(0x127)](_0x49b362(0x122))),_0x23ccda=_0x4a9ed3[_0x49b362(0x127)](_0x49b362(0x120))||_0x49b362(0x11e),_0x104103=generateSqlCodeTemplate(_0x3c583d,{'target':_0x23ccda,'includeImports':!_0x4a9ed3[_0x49b362(0x12e)](_0x49b362(0x12c))});return{'ok':!![],'data':{'sqlCode':_0x3c583d[_0x49b362(0x121)],'sqlName':_0x3c583d[_0x49b362(0x11f)],'target':_0x23ccda,'code':_0x104103}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4b7a4c,_0xac55a3){const _0xc11d83=a51_0x5c3d,_0x1471df=_0x4b7a4c();while(!![]){try{const _0x4908fc=parseInt(_0xc11d83(0xd0))/0x1*(parseInt(_0xc11d83(0xe1))/0x2)+-parseInt(_0xc11d83(0xcf))/0x3+parseInt(_0xc11d83(0xd9))/0x4+parseInt(_0xc11d83(0xe3))/0x5+parseInt(_0xc11d83(0xee))/0x6*(parseInt(_0xc11d83(0xe8))/0x7)+-parseInt(_0xc11d83(0xde))/0x8+-parseInt(_0xc11d83(0xf9))/0x9;if(_0x4908fc===_0xac55a3)break;else _0x1471df['push'](_0x1471df['shift']());}catch(_0x3f2867){_0x1471df['push'](_0x1471df['shift']());}}}(a51_0x13ca,0xc7de3));import{CliErrors}from'../../errors.js';function a51_0x13ca(){const _0x52010a=['string','object','global','apps','\x20<name>','\x22\x20still\x20defined\x20in\x20','both','bool','globalConfig','3442752wDdnmS','length','validation','flagMissing','1933515EFAhpW','3uqvICW','\x20Note:\x20app\x20\x22','\x20app\x20\x22','\x20config.','Removed\x20app\x20\x22','Missing\x20app\x20name.','Updated','\x22\x20not\x20found.','App\x20\x22','5326860NPHyPp','trim','keys','\x20<name>\x20[--global]','\x22\x20is\x20selected\x20automatically.','12881808xwEEfL','projectConfig','appcode','383222XYxqjJ','Added','7526740PyFKlN','boolean','\x20Remaining\x20app\x20\x22','\x20<name>\x20--appcode\x20<code>','Usage:\x20','77uprWGg','str','args','\x20Default\x20app\x20is\x20\x22','project','defaultApp','24012KQfxTp','Use\x20global\x20config\x20scope'];a51_0x13ca=function(){return _0x52010a;};return a51_0x13ca();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs,normalizeStoredDefaultApp}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x3932ec=a51_0x5c3d;return[{'name':_0x3932ec(0xe0),'type':_0x3932ec(0xf0),'description':'App\x20code','required':!![]},{'name':_0x3932ec(0xf2),'type':_0x3932ec(0xe4),'description':_0x3932ec(0xef),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x70554=a51_0x5c3d;return[{'name':_0x70554(0xf2),'type':_0x70554(0xe4),'description':_0x70554(0xef),'default':![]}];}export async function validateAppName(_0x134310,_0x170fb6){const _0xa87863=a51_0x5c3d,_0x4df9c3=_0x134310[_0xa87863(0xea)][0x0]?.[_0xa87863(0xda)]();if(!_0x4df9c3)throw CliErrors[_0xa87863(0xcd)](_0xa87863(0xd5),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x170fb6+_0xa87863(0xf4));}function a51_0x5c3d(_0x21f426,_0x29d99d){_0x21f426=_0x21f426-0xcd;const _0x13cab7=a51_0x13ca();let _0x5c3dd2=_0x13cab7[_0x21f426];return _0x5c3dd2;}export async function runAppAdd(_0x284323,_0x211ac2){const _0x4442cd=a51_0x5c3d,_0x5d8925=_0x284323[_0x4442cd(0xea)][0x0]?.[_0x4442cd(0xda)]();if(!_0x5d8925)throw CliErrors[_0x4442cd(0xcd)]('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x211ac2+_0x4442cd(0xe6));const _0x3a1f8c=_0x284323['str'](_0x4442cd(0xe0));if(!_0x3a1f8c)throw CliErrors[_0x4442cd(0xce)](_0x4442cd(0xe0),_0x4442cd(0xe7)+CLI_BIN_NAME+'\x20'+_0x211ac2+_0x4442cd(0xe6));const _0x127857={'global':_0x284323[_0x4442cd(0xf7)](_0x4442cd(0xf2))},_0x29e30f=readConfig(_0x127857);if(!_0x29e30f[_0x4442cd(0xf3)])_0x29e30f[_0x4442cd(0xf3)]={};const _0x13bb02={'appcode':_0x3a1f8c,...collectAppProfileOverrides(_0x14d752=>_0x284323[_0x4442cd(0xe9)](_0x14d752))},_0x735b49=_0x29e30f[_0x4442cd(0xf3)],_0x239d8f=Object[_0x4442cd(0xdb)](_0x735b49),_0x48cfbf=typeof _0x29e30f[_0x4442cd(0xed)]===_0x4442cd(0xf0)&&_0x735b49[_0x29e30f[_0x4442cd(0xed)]]?_0x29e30f[_0x4442cd(0xed)]:_0x239d8f[_0x4442cd(0xfa)]===0x1?_0x239d8f[0x0]:undefined,_0x57de6c=!!_0x735b49[_0x5d8925];_0x735b49[_0x5d8925]=_0x13bb02;const _0x56bbbb=normalizeStoredDefaultApp(_0x29e30f,_0x48cfbf);writeConfig(_0x29e30f,_0x127857);const _0x564b2a=!_0x57de6c&&_0x56bbbb?_0x4442cd(0xeb)+_0x56bbbb+'\x22.':'',_0x5134da=(_0x57de6c?_0x4442cd(0xd6):_0x4442cd(0xe2))+_0x4442cd(0xd2)+_0x5d8925+'\x22\x20(appcode:\x20'+_0x3a1f8c+')'+scopeLabel(_0x127857)+'.'+_0x564b2a;return{'ok':!![],'message':_0x5134da};}export async function runAppRemove(_0x2bfc95,_0x389bee){const _0x4602d9=a51_0x5c3d,_0x2417f5=_0x2bfc95[_0x4602d9(0xea)][0x0]?.['trim']();if(!_0x2417f5)throw CliErrors[_0x4602d9(0xcd)](_0x4602d9(0xd5),_0x4602d9(0xe7)+CLI_BIN_NAME+'\x20'+_0x389bee+_0x4602d9(0xdc));const _0xd96a98=_0x2bfc95[_0x4602d9(0xf7)]('global'),{config:_0x421788,layers:_0x1939d8}=readRawConfigWithLayers(),_0x10b52e=_0x421788[_0x4602d9(0xf3)]??{};if(!_0x10b52e[_0x2417f5])throw CliErrors[_0x4602d9(0xcd)](_0x4602d9(0xd8)+_0x2417f5+_0x4602d9(0xd7));const _0x4bec0a=_0x1939d8['globalConfig'][_0x4602d9(0xf3)]&&typeof _0x1939d8[_0x4602d9(0xf8)][_0x4602d9(0xf3)]===_0x4602d9(0xf1)?_0x1939d8[_0x4602d9(0xf8)][_0x4602d9(0xf3)]:{},_0x53a38d=_0x1939d8[_0x4602d9(0xdf)][_0x4602d9(0xf3)]&&typeof _0x1939d8['projectConfig'][_0x4602d9(0xf3)]===_0x4602d9(0xf1)?_0x1939d8[_0x4602d9(0xdf)]['apps']:{},_0x502295=appDefinedIn(_0x2417f5,_0x4bec0a,_0x53a38d),_0x4bcd96=resolveAppScopeForWrite(_0x2417f5,_0xd96a98,_0x1939d8),_0x46a0a5={'global':_0x4bcd96===_0x4602d9(0xf2)},_0x1a043c=readConfig(_0x46a0a5),_0x3e2455=_0x1a043c[_0x4602d9(0xf3)];if(!_0x3e2455||!_0x3e2455[_0x2417f5])throw CliErrors[_0x4602d9(0xcd)](_0x4602d9(0xd8)+_0x2417f5+_0x4602d9(0xd7));delete _0x3e2455[_0x2417f5];let _0x28a610='';const _0x46769d=typeof _0x1a043c['defaultApp']===_0x4602d9(0xf0)?_0x1a043c[_0x4602d9(0xed)]:undefined,_0xce57cc=Object[_0x4602d9(0xdb)](_0x3e2455),_0x300291=_0x46769d===_0x2417f5?_0xce57cc[0x0]:_0x46769d,_0x583782=normalizeStoredDefaultApp(_0x1a043c,_0x300291);if(_0x46769d===_0x2417f5&&_0xce57cc['length']===0x1)_0x28a610=_0x4602d9(0xe5)+_0xce57cc[0x0]+_0x4602d9(0xdd);else _0x46769d===_0x2417f5&&_0x583782&&(_0x28a610='\x20Default\x20app\x20changed\x20to\x20\x22'+_0x583782+'\x22.');Object[_0x4602d9(0xdb)](_0x3e2455)['length']===0x0&&(delete _0x1a043c[_0x4602d9(0xf3)],delete _0x1a043c[_0x4602d9(0xed)]);writeConfig(_0x1a043c,_0x46a0a5);const _0x279e5e=_0x502295===_0x4602d9(0xf6)?_0x4602d9(0xd1)+_0x2417f5+_0x4602d9(0xf5)+(_0x4bcd96===_0x4602d9(0xec)?'global':_0x4602d9(0xec))+_0x4602d9(0xd3):'';return{'ok':!![],'message':_0x4602d9(0xd4)+_0x2417f5+'\x22'+scopeLabel(_0x46a0a5)+'.'+_0x28a610+_0x279e5e};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1ce130,_0x30ff4a){const _0x34564d=a52_0x1719,_0x2dfd1a=_0x1ce130();while(!![]){try{const _0x5cd4a7=parseInt(_0x34564d(0x95))/0x1+parseInt(_0x34564d(0x90))/0x2+-parseInt(_0x34564d(0xa2))/0x3+parseInt(_0x34564d(0xb5))/0x4+parseInt(_0x34564d(0xb2))/0x5+parseInt(_0x34564d(0x9c))/0x6*(parseInt(_0x34564d(0x9b))/0x7)+-parseInt(_0x34564d(0xad))/0x8*(parseInt(_0x34564d(0xa3))/0x9);if(_0x5cd4a7===_0x30ff4a)break;else _0x2dfd1a['push'](_0x2dfd1a['shift']());}catch(_0x4867ea){_0x2dfd1a['push'](_0x2dfd1a['shift']());}}}(a52_0x5bf8,0x61692));import{input,checkbox,select}from'@inquirer/prompts';function a52_0x5bf8(){const _0x358b2a=['2738310uEvSao','skip','Found\x20','No\x20available\x20apps\x20found.','includes','length','973176TGQBsC','182124FVywjT','cyan','(Skip;\x20configure\x20later\x20with\x20config\x20set\x20appcode)','find','\x0aCould\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','custom','map','\x20apps.\x20Select\x20with\x20space,\x20a=all,\x20i=invert:','Invalid\x20App\x20Code','\x20\x20(','664WMyQRZ','(Skip;\x20configure\x20later)','appName','✎\x20Enter\x20appcode\x20manually','gray','2555415uEGchv','valid','✎\x20Enter\x20manually','2482688ZYJknq','389930DKyBnU','yellow','App\x20Code:','message','Could\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','619869phiWSP','manual','appCode','\x0aNo\x20available\x20apps\x20found.','trim','(No\x20login\x20session.\x20Enter\x20an\x20App\x20Code\x20manually\x20or\x20skip.)','7mLQDED'];a52_0x5bf8=function(){return _0x358b2a;};return a52_0x5bf8();}import a52_0x2340b8 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';function a52_0x1719(_0x148b70,_0x239f8d){_0x148b70=_0x148b70-0x90;const _0x5bf8fb=a52_0x5bf8();let _0x171989=_0x5bf8fb[_0x148b70];return _0x171989;}export async function promptCustomAppcode(){const _0x201333=a52_0x1719,_0x232304=await input({'message':'App\x20Code:','validate':_0x384e39=>{const _0x105fb1=a52_0x1719,_0x428198=validateAppcode(_0x384e39[_0x105fb1(0x99)]());return _0x428198[_0x105fb1(0xb3)]||_0x428198[_0x105fb1(0x93)]||_0x105fb1(0xab);}});return _0x232304[_0x201333(0x99)]();}export async function promptAppSelection(_0x28e62b){const _0x54aa22=a52_0x1719,_0x4a393c=[{'name':a52_0x2340b8[_0x54aa22(0x91)]('✎\x20Enter\x20appcode\x20manually'),'value':-0x1},..._0x28e62b[_0x54aa22(0xa9)]((_0x432a1d,_0x31fbe8)=>({'name':_0x432a1d[_0x54aa22(0xaf)]+'\x20\x20'+a52_0x2340b8[_0x54aa22(0xb1)]('('+_0x432a1d[_0x54aa22(0x97)]+')'),'value':_0x31fbe8}))],_0x5646da=await checkbox({'message':_0x54aa22(0x9e)+a52_0x2340b8[_0x54aa22(0xa4)](_0x28e62b[_0x54aa22(0xa1)])+_0x54aa22(0xaa),'choices':_0x4a393c,'loop':![]});if(_0x5646da[_0x54aa22(0xa0)](-0x1))return'custom';if(_0x5646da[_0x54aa22(0xa1)]===0x0)return _0x54aa22(0xa8);return _0x5646da[_0x54aa22(0xa9)](_0x3b4bbc=>_0x28e62b[_0x3b4bbc]);}export async function promptSingleAppSelection(_0x18ce25){const _0x1ca2fc=a52_0x1719,_0x3f0789=[{'name':a52_0x2340b8[_0x1ca2fc(0xb1)](_0x1ca2fc(0xa5)),'value':'skip'},{'name':a52_0x2340b8['yellow'](_0x1ca2fc(0xb0)),'value':_0x1ca2fc(0xa8)},..._0x18ce25[_0x1ca2fc(0xa9)](_0x18b2ee=>({'name':_0x18b2ee['appName']+'\x20\x20'+a52_0x2340b8['gray']('('+_0x18b2ee[_0x1ca2fc(0x97)]+')'),'value':_0x18b2ee[_0x1ca2fc(0x97)]}))],_0x1dc9e4=await select({'message':'Select\x20the\x20app\x20to\x20bind:','choices':_0x3f0789});if(_0x1dc9e4===_0x1ca2fc(0x9d))return _0x1ca2fc(0x9d);if(_0x1dc9e4===_0x1ca2fc(0xa8))return _0x1ca2fc(0xa8);return _0x18ce25[_0x1ca2fc(0xa6)](_0x13e34d=>_0x13e34d[_0x1ca2fc(0x97)]===_0x1dc9e4);}export async function selectSingleAppcode(_0xb75c4b){const _0xb7c794=a52_0x1719;if(!_0xb75c4b)return writeCliSideChannelLine(a52_0x2340b8[_0xb7c794(0xb1)](_0xb7c794(0x9a))),_fallbackOrSkip();writeCliSideChannelLine('Fetching\x20available\x20apps...');let _0x42600c;try{_0x42600c=await withActiveCookie(_0xb75c4b,()=>listRemoteApps());}catch(_0x3c3929){writeCliSideChannelLine(a52_0x2340b8[_0xb7c794(0x91)](_0xb7c794(0x94)));if(_0x3c3929 instanceof Error)writeCliSideChannelLine(a52_0x2340b8[_0xb7c794(0xb1)]('\x20\x20('+_0x3c3929[_0xb7c794(0x93)]+')'));return _fallbackOrSkip();}if(_0x42600c[_0xb7c794(0xa1)]===0x0)return writeCliSideChannelLine(a52_0x2340b8[_0xb7c794(0x91)](_0xb7c794(0x9f))),_fallbackOrSkip();const _0x51fa4f=await promptSingleAppSelection(_0x42600c);if(_0x51fa4f===_0xb7c794(0x9d))return'';if(_0x51fa4f===_0xb7c794(0xa8))return promptCustomAppcode();return _0x51fa4f[_0xb7c794(0x97)];}export async function selectMultipleApps(_0x5c08c6){const _0x3cb2dd=a52_0x1719;writeCliSideChannelLine('Fetching\x20available\x20apps...');let _0x34eaa3;try{_0x34eaa3=await withActiveCookie(_0x5c08c6,()=>listRemoteApps());}catch(_0x5c8968){writeCliSideChannelLine(_0x3cb2dd(0xa7));if(_0x5c8968 instanceof Error)writeCliSideChannelLine(_0x3cb2dd(0xac)+_0x5c8968[_0x3cb2dd(0x93)]+')');return'custom';}if(_0x34eaa3[_0x3cb2dd(0xa1)]===0x0)return writeCliSideChannelLine(_0x3cb2dd(0x98)),_0x3cb2dd(0xa8);return promptAppSelection(_0x34eaa3);}async function _fallbackOrSkip(){const _0x45f764=a52_0x1719,_0x328e63=await select({'message':_0x45f764(0x92),'choices':[{'name':a52_0x2340b8[_0x45f764(0xb1)](_0x45f764(0xae)),'value':_0x45f764(0x9d)},{'name':a52_0x2340b8['yellow'](_0x45f764(0xb4)),'value':_0x45f764(0x96)}]});if(_0x328e63===_0x45f764(0x9d))return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a53_0x5bd192=a53_0x563d;(function(_0x263b83,_0x5ed3ef){const _0x2770a5=a53_0x563d,_0x32abb0=_0x263b83();while(!![]){try{const _0x141f9b=-parseInt(_0x2770a5(0x195))/0x1+-parseInt(_0x2770a5(0x193))/0x2+-parseInt(_0x2770a5(0x18c))/0x3+-parseInt(_0x2770a5(0x198))/0x4*(-parseInt(_0x2770a5(0x189))/0x5)+parseInt(_0x2770a5(0x188))/0x6*(parseInt(_0x2770a5(0x18b))/0x7)+-parseInt(_0x2770a5(0x187))/0x8+parseInt(_0x2770a5(0x181))/0x9*(parseInt(_0x2770a5(0x182))/0xa);if(_0x141f9b===_0x5ed3ef)break;else _0x32abb0['push'](_0x32abb0['shift']());}catch(_0x2136bc){_0x32abb0['push'](_0x32abb0['shift']());}}}(a53_0x308e,0xe51ea));function a53_0x563d(_0x1be8ee,_0x169b02){_0x1be8ee=_0x1be8ee-0x17d;const _0x308eb4=a53_0x308e();let _0x563ded=_0x308eb4[_0x1be8ee];return _0x563ded;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a53_0x5bd192(0x18d),a53_0x5bd192(0x197)]),NON_TERMINAL_STATUSES=new Set(['PENDING',a53_0x5bd192(0x18e)]);export function normalizeAsyncTask(_0x428a65){const _0x4a2320=a53_0x5bd192,_0x325d8a=typeof _0x428a65?.[_0x4a2320(0x194)]===_0x4a2320(0x190)?_0x428a65[_0x4a2320(0x194)]['trim']():'';if(!_0x325d8a)throw CliErrors[_0x4a2320(0x192)](_0x4a2320(0x185));const _0x201ee1=typeof _0x428a65[_0x4a2320(0x19c)]==='string'?_0x428a65[_0x4a2320(0x19c)][_0x4a2320(0x191)]()['toUpperCase']():'';if(!_0x201ee1)throw CliErrors[_0x4a2320(0x192)](_0x4a2320(0x19b)+_0x325d8a+_0x4a2320(0x199));return{'taskId':_0x325d8a,'status':_0x201ee1,'errorMessage':typeof _0x428a65[_0x4a2320(0x17e)]===_0x4a2320(0x190)&&_0x428a65[_0x4a2320(0x17e)]['trim']()?_0x428a65['errorMessage'][_0x4a2320(0x191)]():null,'isTerminal':TERMINAL_STATUSES['has'](_0x201ee1),'knownStatus':TERMINAL_STATUSES[_0x4a2320(0x186)](_0x201ee1)||NON_TERMINAL_STATUSES[_0x4a2320(0x186)](_0x201ee1)};}function a53_0x308e(){const _0x2f89f0=['Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','has','12564720hysmYP','1287114JTCilm','15bZJRTw','\x20--format\x20compress','35ZQjLsp','568371hblSgR','SUCCESS','PROCESSING','\x20failed.','string','trim','apiError','1356224aEAacC','taskId','1623516BZGrMl','\x20returned\x20unknown\x20status\x20','FAILED','2359404UrCKHj','\x20response\x20did\x20not\x20contain\x20a\x20status.','\x27\x5c\x27\x27','Async\x20task\x20','status','\x20is\x20pending.','Task\x20','\x20--appcode\x20','errorMessage','\x20task\x20status\x20--task-id\x20','PENDING','477qYRToq','407170KoVepV','\x20failed:\x20','replace'];a53_0x308e=function(){return _0x2f89f0;};return a53_0x308e();}export function buildAsyncTaskStatusCommand(_0x5c2300,_0x2a8422){const _0x38e4ce=a53_0x5bd192;return CLI_BIN_NAME+_0x38e4ce(0x17f)+quoteShellArg(_0x5c2300)+_0x38e4ce(0x17d)+quoteShellArg(_0x2a8422)+_0x38e4ce(0x18a);}export function asyncTaskMessage(_0x20b710){const _0x252c26=a53_0x5bd192;switch(_0x20b710['status']){case _0x252c26(0x180):return _0x252c26(0x19e)+_0x20b710[_0x252c26(0x194)]+_0x252c26(0x19d);case _0x252c26(0x18e):return _0x252c26(0x19e)+_0x20b710[_0x252c26(0x194)]+'\x20is\x20processing.';case _0x252c26(0x18d):return _0x252c26(0x19e)+_0x20b710[_0x252c26(0x194)]+'\x20completed\x20successfully.';case _0x252c26(0x197):return _0x20b710[_0x252c26(0x17e)]?_0x252c26(0x19e)+_0x20b710['taskId']+_0x252c26(0x183)+_0x20b710[_0x252c26(0x17e)]:_0x252c26(0x19e)+_0x20b710[_0x252c26(0x194)]+_0x252c26(0x18f);default:return _0x252c26(0x19e)+_0x20b710[_0x252c26(0x194)]+_0x252c26(0x196)+_0x20b710[_0x252c26(0x19c)]+'.';}}function quoteShellArg(_0x145927){const _0x4e6ff2=a53_0x5bd192;return'\x27'+_0x145927[_0x4e6ff2(0x184)](/'/g,_0x4e6ff2(0x19a))+'\x27';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a54_0x1ca1(_0x361d57,_0x24bea8){_0x361d57=_0x361d57-0x118;var _0x2bccb5=a54_0x2bcc();var _0x1ca11f=_0x2bccb5[_0x361d57];return _0x1ca11f;}function a54_0x2bcc(){var _0xf4b0b7=['1312872ANIyFg','7lKOBFt','1065025ZWxXLA','546843ZCuixC','description','7417449pfcnhw','url','method','4OXzFfk','177378HdlnWZ','602112bmluMT','417186rOkMLR'];a54_0x2bcc=function(){return _0xf4b0b7;};return a54_0x2bcc();}(function(_0x252d43,_0x242efd){var _0x575a93=a54_0x1ca1,_0x1cfd0d=_0x252d43();while(!![]){try{var _0x1e6b0b=-parseInt(_0x575a93(0x121))/0x1+-parseInt(_0x575a93(0x123))/0x2+parseInt(_0x575a93(0x11b))/0x3*(-parseInt(_0x575a93(0x120))/0x4)+-parseInt(_0x575a93(0x11a))/0x5+-parseInt(_0x575a93(0x122))/0x6+parseInt(_0x575a93(0x119))/0x7*(parseInt(_0x575a93(0x118))/0x8)+parseInt(_0x575a93(0x11d))/0x9;if(_0x1e6b0b===_0x242efd)break;else _0x1cfd0d['push'](_0x1cfd0d['shift']());}catch(_0x11f934){_0x1cfd0d['push'](_0x1cfd0d['shift']());}}}(a54_0x2bcc,0x1a0a5));export function asDryRunResult(_0x58a3a2,_0x1ead88){var _0x4bc78d=a54_0x1ca1;return Object['defineProperties'](_0x58a3a2,{'method':{'value':_0x1ead88[_0x4bc78d(0x11f)],'enumerable':![]},'url':{'value':_0x1ead88[_0x4bc78d(0x11e)],'enumerable':![]},..._0x1ead88[_0x4bc78d(0x11c)]?{'description':{'value':_0x1ead88[_0x4bc78d(0x11c)],'enumerable':![]}}:{}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a55_0x5b293a=a55_0x1d7b;(function(_0x4a18af,_0x10d7b0){const _0x56ac73=a55_0x1d7b,_0x3a6663=_0x4a18af();while(!![]){try{const _0x2def22=-parseInt(_0x56ac73(0x107))/0x1+-parseInt(_0x56ac73(0xe8))/0x2+parseInt(_0x56ac73(0x104))/0x3+-parseInt(_0x56ac73(0xf1))/0x4+-parseInt(_0x56ac73(0xf4))/0x5*(parseInt(_0x56ac73(0x100))/0x6)+parseInt(_0x56ac73(0xe5))/0x7*(parseInt(_0x56ac73(0xf7))/0x8)+parseInt(_0x56ac73(0x10a))/0x9*(parseInt(_0x56ac73(0xec))/0xa);if(_0x2def22===_0x10d7b0)break;else _0x3a6663['push'](_0x3a6663['shift']());}catch(_0x56bef1){_0x3a6663['push'](_0x3a6663['shift']());}}}(a55_0xf033,0x8923f));export const CROSS_RELATION_FROM_DATASET_FLAG={'name':'from-datasetcode','type':'string','required':!![],'description':'Source\x20DB_TABLE\x20dataset\x20code'};export const CROSS_RELATION_FROM_COLUMN_FLAG={'name':'from-column','type':a55_0x5b293a(0xf5),'required':!![],'description':'Source\x20field\x20name\x20used\x20to\x20locate\x20the\x20relation'};export const CROSS_RELATION_TO_DATASET_FLAG={'name':a55_0x5b293a(0x108),'type':a55_0x5b293a(0xf5),'required':!![],'description':a55_0x5b293a(0xf0)};export const CROSS_RELATION_TO_COLUMN_FLAG={'name':a55_0x5b293a(0x10b),'type':a55_0x5b293a(0xf5),'required':!![],'description':a55_0x5b293a(0x102)};export const CROSS_RELATION_DBLINK_FLAG={'name':'from-dblink-id','type':a55_0x5b293a(0xef),'description':a55_0x5b293a(0xf8)};export const CROSS_RELATION_LABEL_FLAG={'name':a55_0x5b293a(0xfb),'type':a55_0x5b293a(0xf5),'description':a55_0x5b293a(0xee)};export const CROSS_RELATION_CARDINALITY_FLAG={'name':a55_0x5b293a(0xfe),'type':a55_0x5b293a(0xf5),'enum':[a55_0x5b293a(0xf2),'ONE_TO_MANY','MANY_TO_ONE','MANY_TO_MANY'],'description':a55_0x5b293a(0x10d)};export const GLOBAL_SCOPE_FLAG={'name':a55_0x5b293a(0xf3),'type':'boolean','default':![],'description':a55_0x5b293a(0x105)};export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a55_0x5b293a(0x106)};export const CODE_FLAG={'name':a55_0x5b293a(0xf9),'type':a55_0x5b293a(0xf5),'required':!![],'description':a55_0x5b293a(0xe6),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a55_0x5b293a(0xfd),'description':a55_0x5b293a(0xe6)};export const SQLCODE_FLAG={'name':a55_0x5b293a(0xff),'type':'string','required':!![],'description':a55_0x5b293a(0x10c),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a55_0x5b293a(0xf6)}};export const APPCODE_FLAG_OPTIONAL={'name':a55_0x5b293a(0xfc),'type':'string','required':![],'description':a55_0x5b293a(0x101)};function a55_0xf033(){const _0x49d8f7=['Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','Target\x20display\x20field;\x20create\x20defaults\x20to\x20the\x20target\x20field,\x20update\x20keeps\x20the\x20current\x20value','number','Target\x20DB_TABLE\x20dataset\x20code','4252124ZBDxxv','ONE_TO_ONE','global','2088040UgpUjm','string','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','573944PZMEag','Source\x20database\x20connection\x20ID;\x20derived\x20from\x20the\x20source\x20dataset\x20when\x20omitted','code','dbtype','to-label-column','appcode','datasetcode','cardinality','sqlcode','6cvZEPj','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','Target\x20field\x20name','boolean','136452CbVaJq','Write\x20to\x20the\x20global\x20configuration','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','841866iMUiWo','to-datasetcode','POSTGRESQL','45xdKbnN','to-column','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','Relation\x20cardinality;\x20create\x20leaves\x20it\x20unset\x20when\x20omitted,\x20update\x20keeps\x20the\x20current\x20value','28VORuou','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','App\x20code\x20(e.g.\x20app-xxxxx)','1452988GVICrG','Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update','MYSQL','Database\x20product\x20type','6556540VLXdxa'];a55_0xf033=function(){return _0x49d8f7;};return a55_0xf033();}export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a55_0x5b293a(0xe7)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a55_0x5b293a(0xef),'required':!![],'description':a55_0x5b293a(0xed)};export const DB_TYPE_FLAG={'name':a55_0x5b293a(0xfa),'type':a55_0x5b293a(0xf5),'required':!![],'description':a55_0x5b293a(0xeb),'enum':[a55_0x5b293a(0xea),a55_0x5b293a(0x109)]};function a55_0x1d7b(_0x33481b,_0x45d866){_0x33481b=_0x33481b-0xe5;const _0xf033db=a55_0xf033();let _0x1d7b59=_0xf033db[_0x33481b];return _0x1d7b59;}export const SKIP_CONNECTION_TEST_FLAG={'name':'skip-connection-test','type':a55_0x5b293a(0x103),'description':a55_0x5b293a(0xe9)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x206c90,_0x27f093){const _0x23c575=a56_0x5c75,_0x2d4459=_0x206c90();while(!![]){try{const _0x4fc370=-parseInt(_0x23c575(0xe7))/0x1*(parseInt(_0x23c575(0xe4))/0x2)+-parseInt(_0x23c575(0xed))/0x3+-parseInt(_0x23c575(0xf1))/0x4+-parseInt(_0x23c575(0xef))/0x5+parseInt(_0x23c575(0xe2))/0x6+parseInt(_0x23c575(0xf2))/0x7*(parseInt(_0x23c575(0xee))/0x8)+parseInt(_0x23c575(0xe8))/0x9;if(_0x4fc370===_0x27f093)break;else _0x2d4459['push'](_0x2d4459['shift']());}catch(_0x209e27){_0x2d4459['push'](_0x2d4459['shift']());}}}(a56_0x30cd,0xdebc9));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';function a56_0x30cd(){const _0x522a66=['7238514KfUdtL','toFixed','89786qRmppd','validation','size','15gmLPvH','14997069DhCuYa','isFile','\x20path\x20is\x20required.','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','ceil','2614158icTBKB','496APSlaj','6901105oPSCdR','\x20MB','2951052qFxOBu','192199jdasoM','File\x20is\x20not\x20a\x20regular\x20file:\x20'];a56_0x30cd=function(){return _0x522a66;};return a56_0x30cd();}const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function a56_0x5c75(_0x1ade39,_0x3f0b63){_0x1ade39=_0x1ade39-0xe1;const _0x30cd36=a56_0x30cd();let _0x5c7559=_0x30cd36[_0x1ade39];return _0x5c7559;}function formatBytes(_0x4f4e51){const _0x46420d=a56_0x5c75;if(_0x4f4e51>=BYTES_PER_MB){const _0x229c87=Math[_0x46420d(0xec)](_0x4f4e51/BYTES_PER_MB*0x64)/0x64;return _0x229c87[_0x46420d(0xe3)](0x2)+_0x46420d(0xf0);}return _0x4f4e51+'\x20B';}export function requireDevelopmentUploadFile(_0x1e35ad,_0x35ad37){const _0x114493=a56_0x5c75,_0x33f6ee=_0x1e35ad['trim']();if(!_0x33f6ee)throw CliErrors[_0x114493(0xe5)](_0x35ad37+_0x114493(0xea));if(!existsSync(_0x33f6ee))throw CliErrors[_0x114493(0xe5)]('File\x20not\x20found:\x20'+_0x33f6ee);const _0x54802a=statSync(_0x33f6ee);if(!_0x54802a[_0x114493(0xe9)]())throw CliErrors[_0x114493(0xe5)](_0x114493(0xe1)+_0x33f6ee);if(_0x54802a[_0x114493(0xe6)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x114493(0xe5)](_0x114493(0xeb)+_0x33f6ee+'\x20('+formatBytes(_0x54802a[_0x114493(0xe6)])+')');return{'path':_0x33f6ee,'size':_0x54802a[_0x114493(0xe6)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a57_0x2cdb(){const _0x39c8b9=['1854392JEBpYZ','1425258lKtVSI','App\x20Code\x20cannot\x20be\x20empty','1NjoACg','240646bnCtaF','789102iOXTvA','826790sKcQZo','9500LCISMc','5650570LjCVdL','7NyCGee','trim','69UeFLFf'];a57_0x2cdb=function(){return _0x39c8b9;};return a57_0x2cdb();}function a57_0x3c61(_0xef2f89,_0x1b19b0){_0xef2f89=_0xef2f89-0x1ef;const _0x2cdb2e=a57_0x2cdb();let _0x3c61b4=_0x2cdb2e[_0xef2f89];return _0x3c61b4;}(function(_0x45fc05,_0x2b53d9){const _0x128ae3=a57_0x3c61,_0x12f70b=_0x45fc05();while(!![]){try{const _0x2f8841=-parseInt(_0x128ae3(0x1f1))/0x1*(parseInt(_0x128ae3(0x1f2))/0x2)+-parseInt(_0x128ae3(0x1f9))/0x3*(-parseInt(_0x128ae3(0x1f5))/0x4)+parseInt(_0x128ae3(0x1f4))/0x5+parseInt(_0x128ae3(0x1f3))/0x6*(-parseInt(_0x128ae3(0x1f7))/0x7)+-parseInt(_0x128ae3(0x1fa))/0x8+-parseInt(_0x128ae3(0x1ef))/0x9+parseInt(_0x128ae3(0x1f6))/0xa;if(_0x2f8841===_0x2b53d9)break;else _0x12f70b['push'](_0x12f70b['shift']());}catch(_0x705e95){_0x12f70b['push'](_0x12f70b['shift']());}}}(a57_0x2cdb,0x22ebf));export function validateAppcode(_0x56e9c9){const _0x3af9c1=a57_0x3c61,_0x2a97d8=_0x56e9c9[_0x3af9c1(0x1f8)]();if(!_0x2a97d8)return{'valid':![],'message':_0x3af9c1(0x1f0)};if(_0x2a97d8['length']>0x64)return{'valid':![],'message':'App\x20Code\x20cannot\x20exceed\x20100\x20characters'};if(!/^[A-Za-z0-9_-]+$/['test'](_0x2a97d8))return{'valid':![],'message':'Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'};return{'valid':!![]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a58_0x3d8268=a58_0x2b36;function a58_0x1085(){const _0x12e174=['Missing\x20key\x20argument.','\x20already\x20absent','boolean','8BKUiIz','15020690vZZkAM','1420069WVsWVJ','7682IZsvKG','1298549VEfOqJ','Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.','6hODVtE','validation','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','hasOwnProperty','defaultApp','309rrUFcx','\x22\x20is\x20not\x20deletable.','4295500jrynjv','4044186gEDAbh','Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','prototype','riskLevel','config','Project','Top-level\x20key\x20\x22','Usage:\x20','1341050FSEjpl','key'];a58_0x1085=function(){return _0x12e174;};return a58_0x1085();}(function(_0x478eea,_0x12e366){const _0xc9f9f7=a58_0x2b36,_0x273ab4=_0x478eea();while(!![]){try{const _0x77d3e8=-parseInt(_0xc9f9f7(0x174))/0x1+parseInt(_0xc9f9f7(0x175))/0x2*(-parseInt(_0xc9f9f7(0x17d))/0x3)+parseInt(_0xc9f9f7(0x17f))/0x4+-parseInt(_0xc9f9f7(0x189))/0x5*(parseInt(_0xc9f9f7(0x178))/0x6)+-parseInt(_0xc9f9f7(0x176))/0x7*(parseInt(_0xc9f9f7(0x172))/0x8)+parseInt(_0xc9f9f7(0x180))/0x9+parseInt(_0xc9f9f7(0x173))/0xa;if(_0x77d3e8===_0x12e366)break;else _0x273ab4['push'](_0x273ab4['shift']());}catch(_0x3d3273){_0x273ab4['push'](_0x273ab4['shift']());}}}(a58_0x1085,0xb88b1));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';const LEGACY_DELETABLE_KEYS=new Set(['inherit']),EXTRA_DELETABLE_KEYS=new Set([a58_0x3d8268(0x17c),'routing']);function a58_0x2b36(_0x249202,_0x3b7c59){_0x249202=_0x249202-0x16f;const _0x108588=a58_0x1085();let _0x2b362a=_0x108588[_0x249202];return _0x2b362a;}async function execute(_0x2b3914){const _0x1fd8aa=a58_0x3d8268,_0x3a44df=_0x2b3914['args'][0x0]?.['trim']();if(!_0x3a44df)throw CliErrors[_0x1fd8aa(0x179)](_0x1fd8aa(0x16f),_0x1fd8aa(0x188)+CLI_BIN_NAME+'\x20config\x20delete\x20<key>\x20[--global]');if(_0x3a44df===_0x1fd8aa(0x184))throw CliErrors['validation'](_0x1fd8aa(0x17a));if(!isTopLevelConfigKey(_0x3a44df)&&!EXTRA_DELETABLE_KEYS['has'](_0x3a44df)&&!LEGACY_DELETABLE_KEYS['has'](_0x3a44df))throw CliErrors[_0x1fd8aa(0x179)](_0x1fd8aa(0x187)+_0x3a44df+_0x1fd8aa(0x17e),_0x1fd8aa(0x177));const _0x3204f0=resolveWriteScope({'global':_0x2b3914['bool']('global')}),_0x328559=readScopedConfig(_0x3204f0),_0x5a3ce2=Object[_0x1fd8aa(0x183)][_0x1fd8aa(0x17b)]['call'](_0x328559,_0x3a44df);_0x5a3ce2&&(delete _0x328559[_0x3a44df],writeScopedConfig(_0x328559,_0x3204f0));const _0x24f211=_0x3204f0==='global'?'Global':_0x1fd8aa(0x186);return{'ok':!![],'message':_0x5a3ce2?'✓\x20'+_0x24f211+'\x20'+_0x3a44df+'\x20deleted':'✓\x20'+_0x24f211+'\x20'+_0x3a44df+_0x1fd8aa(0x170),'data':{'key':_0x3a44df,'scope':_0x3204f0,'changed':_0x5a3ce2}};}export const configDeleteDefinition={'service':a58_0x3d8268(0x185),'command':'delete','description':'Delete\x20a\x20config\x20value\x20from\x20one\x20scope','risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[{'name':a58_0x3d8268(0x18a),'description':a58_0x3d8268(0x182),'required':!![]}],'flags':[{'name':'global','type':a58_0x3d8268(0x171),'description':a58_0x3d8268(0x181),'default':![]}],'execute':execute};
|