@lovrabet/rabetbase-cli 2.5.4-beta.5 → 2.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/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-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
package/lib/commands/bff/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a44_0x5e6ad6=a44_0x5d1e;(function(_0x578b5c,_0x38f6bc){const _0x393c19=a44_0x5d1e,_0x55197c=_0x578b5c();while(!![]){try{const _0x2da655=-parseInt(_0x393c19(0x1fc))/0x1+-parseInt(_0x393c19(0x205))/0x2+-parseInt(_0x393c19(0x21f))/0x3*(-parseInt(_0x393c19(0x1d1))/0x4)+-parseInt(_0x393c19(0x220))/0x5+parseInt(_0x393c19(0x1fb))/0x6*(-parseInt(_0x393c19(0x234))/0x7)+-parseInt(_0x393c19(0x1c5))/0x8*(parseInt(_0x393c19(0x1d9))/0x9)+parseInt(_0x393c19(0x1e3))/0xa;if(_0x2da655===_0x38f6bc)break;else _0x55197c['push'](_0x55197c['shift']());}catch(_0x127a00){_0x55197c['push'](_0x55197c['shift']());}}}(a44_0x2718,0xaec51));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,getBffScriptStatistics,getPlatformErrorCode,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiModelSource}from'../../api/model-source.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{buildHookDirectoryIndexes,assertUnambiguousHookAliases,assertUnambiguousHookDirectoryMappings,preflightPushHookDirectories,trackedHookDirectoryMappings}from'../../core/bff/hook-directory.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription,snakeToCamel}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a44_0x5e6ad6(0x22b),'command':a44_0x5e6ad6(0x1d8),'description':a44_0x5e6ad6(0x1e6),'risk':a44_0x5e6ad6(0x1ca),'structuredErrors':!![],'flags':[{'name':a44_0x5e6ad6(0x1df),'type':a44_0x5e6ad6(0x1d2),'description':a44_0x5e6ad6(0x235),'enum':[a44_0x5e6ad6(0x210),a44_0x5e6ad6(0x1fd),a44_0x5e6ad6(0x1d7)]},{'name':'name','type':a44_0x5e6ad6(0x1d2),'description':'Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)'},{'name':a44_0x5e6ad6(0x233),'type':a44_0x5e6ad6(0x1c6),'description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x4c937b){const _0x2be0ee=a44_0x5e6ad6,_0x3781b9=loadBffProjectConfig(_0x4c937b[_0x2be0ee(0x1f9)]),_0x8edab0=await readBffLockFile(_0x3781b9[_0x2be0ee(0x1d5)]),{appLock:_0x5ac13d}=ensureLockScope(_0x8edab0??createEmptyBffLock(),_0x4c937b[_0x2be0ee(0x1f9)],_0x3781b9[_0x2be0ee(0x216)],_0x2be0ee(0x1d8)),_0x2dfde0=await getTargetFunctions(_0x3781b9,_0x4c937b),_0x55e914=_0x2dfde0[_0x2be0ee(0x1cf)](_0x551f68=>_0x551f68[_0x2be0ee(0x1df)]===_0x2be0ee(0x1d7))?await scanLocalBffFunctions(_0x3781b9,_0x2be0ee(0x1d7)):_0x2dfde0,_0x381eb5=await buildHookMaps(_0x4c937b[_0x2be0ee(0x1f9)],_0x4c937b['apiDir'],_0x55e914,_0x5ac13d,_0x4c937b[_0x2be0ee(0x1e0)]||_0x4c937b['mergedCli']?.[_0x2be0ee(0x1f8)]||_0x4c937b[_0x2be0ee(0x1c7)]?.[_0x2be0ee(0x1dc)]),_0x2aa751=_0x4c937b[_0x2be0ee(0x212)](_0x2be0ee(0x233)),_0x404dbc=[];for(const _0x455d6d of _0x2dfde0){const _0x1ec0dc=await computeFileHash(_0x455d6d[_0x2be0ee(0x1d6)]),_0x13e6c2=_0x5ac13d[_0x2be0ee(0x1c4)][_0x455d6d[_0x2be0ee(0x20f)]],_0x24ac44=!!_0x13e6c2&&_0x13e6c2[_0x2be0ee(0x20b)]===_0x1ec0dc,_0x33ba74=_0x381eb5[_0x2be0ee(0x1ea)][_0x2be0ee(0x221)](_0x455d6d['lockKey']),_0x1dcb48=!!_0x13e6c2?.[_0x2be0ee(0x1f6)]&&_0x13e6c2[_0x2be0ee(0x1f3)]==null&&(_0x2aa751||!_0x24ac44),_0x1fa08a=_0x1dcb48?missingRemoteVersionConflict(_0x455d6d,_0x13e6c2):undefined,_0x34575c=_0x381eb5[_0x2be0ee(0x226)][_0x2be0ee(0x218)](_0x455d6d[_0x2be0ee(0x20f)])?_0x2be0ee(0x1f0):!_0x2aa751&&_0x24ac44?'unchanged':_0x1fa08a?_0x2be0ee(0x203):_0x2be0ee(0x21a);_0x404dbc['push']({'lockKey':_0x455d6d[_0x2be0ee(0x20f)],'filePath':_0x455d6d['filePath'],'remoteId':_0x13e6c2?.['remoteId']??null,'mode':_0x13e6c2?.['remoteId']?_0x2be0ee(0x1e8):_0x2be0ee(0x1c9),'status':_0x34575c,..._0x381eb5[_0x2be0ee(0x226)][_0x2be0ee(0x218)](_0x455d6d['lockKey'])?{'error':_0x381eb5[_0x2be0ee(0x226)]['get'](_0x455d6d[_0x2be0ee(0x20f)])}:{},..._0x1fa08a?{'conflict':_0x1fa08a}:{},..._0x381eb5[_0x2be0ee(0x22a)]['has'](_0x455d6d['lockKey'])?{'datasetCode':_0x13e6c2?.['datasetCode'],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x455d6d['lockKey'])]}:{},..._0x33ba74?{'alias':_0x33ba74[_0x2be0ee(0x20d)]??null,'datasetCode':_0x33ba74[_0x2be0ee(0x225)],'operationType':_0x455d6d['operationType'],'functionNode':_0x455d6d[_0x2be0ee(0x1cd)],'warnings':_0x33ba74[_0x2be0ee(0x1d4)]}:{}});}return{'method':_0x2be0ee(0x1c8),'url':_0x2be0ee(0x217),'body':{'appCode':_0x4c937b[_0x2be0ee(0x1f9)],'force':_0x2aa751,'files':_0x404dbc,'cacheClearAtRuntime':_0x404dbc[_0x2be0ee(0x1cf)](_0x3fc7b1=>_0x3fc7b1['status']===_0x2be0ee(0x21a)),'cacheClearAtRuntimeTimes':_0x404dbc[_0x2be0ee(0x1cf)](_0x90899e=>_0x90899e[_0x2be0ee(0x20a)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x2be0ee(0x232)+_0x404dbc[_0x2be0ee(0x1e4)]+_0x2be0ee(0x21b)};},async 'execute'(_0x373c4d){const _0x6e6f3b=a44_0x5e6ad6,_0x4d2c1=loadBffProjectConfig(_0x373c4d[_0x6e6f3b(0x1f9)]),_0x4b4b02=await readBffLockFile(_0x4d2c1[_0x6e6f3b(0x1d5)]),{lockData:_0x3093af,appLock:_0x472915}=ensureLockScope(_0x4b4b02??createEmptyBffLock(),_0x373c4d[_0x6e6f3b(0x1f9)],_0x4d2c1[_0x6e6f3b(0x216)],'push'),_0x1c353c=await getTargetFunctions(_0x4d2c1,_0x373c4d);if(_0x1c353c[_0x6e6f3b(0x1e4)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':_0x6e6f3b(0x1e1)};const _0x47ea6e=_0x373c4d[_0x6e6f3b(0x212)]('force'),_0x198457=JSON[_0x6e6f3b(0x222)](JSON['stringify'](_0x3093af)),_0x44e0b2=_0x198457['apps'][_0x373c4d[_0x6e6f3b(0x1f9)]];if(!_0x44e0b2)throw new Error(_0x6e6f3b(0x214)+_0x373c4d['appCode']+_0x6e6f3b(0x1da));const _0x5144cc=_0x1c353c['some'](_0x33d978=>_0x33d978[_0x6e6f3b(0x1df)]===_0x6e6f3b(0x1d7))?await scanLocalBffFunctions(_0x4d2c1,_0x6e6f3b(0x1d7)):_0x1c353c,_0x14d97c=await buildHookMaps(_0x373c4d[_0x6e6f3b(0x1f9)],_0x373c4d['apiDir'],_0x5144cc,_0x44e0b2,_0x373c4d['selectedAppName']||_0x373c4d[_0x6e6f3b(0x1c7)]?.[_0x6e6f3b(0x1f8)]||_0x373c4d[_0x6e6f3b(0x1c7)]?.[_0x6e6f3b(0x1dc)]),_0x4e914f=[],_0x22e0eb=[],_0x56a6de=[],_0x504706=[];for(const _0x11ff82 of _0x1c353c){const _0x557adb=_0x14d97c[_0x6e6f3b(0x226)][_0x6e6f3b(0x221)](_0x11ff82['lockKey']);if(_0x557adb){_0x504706[_0x6e6f3b(0x1d8)]({'lockKey':_0x11ff82[_0x6e6f3b(0x20f)],'error':_0x557adb});continue;}const _0x56cf85=await computeFileHash(_0x11ff82[_0x6e6f3b(0x1d6)]),_0xe0496f=_0x44e0b2['functions'][_0x11ff82[_0x6e6f3b(0x20f)]];if(!_0x47ea6e&&_0xe0496f&&_0xe0496f[_0x6e6f3b(0x20b)]===_0x56cf85){_0x22e0eb[_0x6e6f3b(0x1d8)]({'lockKey':_0x11ff82['lockKey'],'reason':_0x6e6f3b(0x1ed)});continue;}if(_0xe0496f?.[_0x6e6f3b(0x1f6)]&&_0xe0496f[_0x6e6f3b(0x1f3)]==null){_0x56a6de[_0x6e6f3b(0x1d8)](missingRemoteVersionConflict(_0x11ff82,_0xe0496f));continue;}try{await uploadSingleFunction(_0x373c4d[_0x6e6f3b(0x1f9)],_0x11ff82,_0x44e0b2,_0x14d97c);const _0x12c26e=_0x44e0b2[_0x6e6f3b(0x1c4)][_0x11ff82[_0x6e6f3b(0x20f)]];_0x4e914f[_0x6e6f3b(0x1d8)]({'lockKey':_0x11ff82['lockKey'],'remoteId':_0x12c26e?.[_0x6e6f3b(0x1f6)]??0x0});}catch(_0x3fdd52){const _0x483f75=remoteVersionChangedConflict(_0x11ff82,_0xe0496f,_0x3fdd52);if(_0x483f75){_0x56a6de['push'](_0x483f75);continue;}_0x504706[_0x6e6f3b(0x1d8)]({'lockKey':_0x11ff82[_0x6e6f3b(0x20f)],'error':_0x3fdd52 instanceof Error?_0x3fdd52['message']:String(_0x3fdd52)});}}_0x44e0b2[_0x6e6f3b(0x1cc)]=new Date()['toISOString'](),await writeBffLockFile(_0x4d2c1[_0x6e6f3b(0x1d5)],_0x198457),await waitForUploadedLockEntries(_0x4d2c1[_0x6e6f3b(0x1d5)],_0x373c4d[_0x6e6f3b(0x1f9)],_0x4e914f['map'](_0xaaeff0=>_0xaaeff0[_0x6e6f3b(0x20f)]));let _0x2ccd15={'attempted':![],'cleared':![]};if(_0x4e914f[_0x6e6f3b(0x1e4)]>0x0)try{let _0x1b87f4='';for(let _0x98cb31=0x0;_0x98cb31<CACHE_CLEAR_ATTEMPTS;_0x98cb31+=0x1){_0x1b87f4=await clearBffScriptCache(),_0x98cb31<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x2ccd15={'attempted':!![],'cleared':!![],'message':_0x1b87f4||_0x6e6f3b(0x224)};}catch(_0x47f551){_0x2ccd15={'attempted':!![],'cleared':![],'error':_0x47f551 instanceof Error?_0x47f551[_0x6e6f3b(0x229)]:String(_0x47f551)};}const _0x16c9a4=_0x504706[_0x6e6f3b(0x1e4)]===0x0&&(_0x2ccd15['attempted']?_0x2ccd15[_0x6e6f3b(0x1de)]:!![]),_0x39b27d=_0x16c9a4,_0x34d48e=_0x2ccd15['attempted']?_0x2ccd15[_0x6e6f3b(0x1de)]?_0x6e6f3b(0x1f1):'runtime\x20cache\x20clear\x20failed':_0x6e6f3b(0x230);return{'ok':_0x39b27d,'data':{'uploaded':_0x4e914f,'skipped':_0x22e0eb,'conflicts':_0x56a6de,'failed':_0x504706,'cacheClear':_0x2ccd15,'warnings':[...[..._0x14d97c[_0x6e6f3b(0x1ea)][_0x6e6f3b(0x21c)]()]['flatMap'](_0x386c0f=>_0x386c0f['warnings']),...[..._0x14d97c['existingHooks']][_0x6e6f3b(0x22f)](existingHookWarning)]},'message':formatPushMessage(_0x4e914f[_0x6e6f3b(0x1e4)],_0x22e0eb[_0x6e6f3b(0x1e4)],_0x56a6de[_0x6e6f3b(0x1e4)],_0x504706['length'],_0x34d48e)};}};function missingRemoteVersionConflict(_0x53363f,_0x285e04){const _0x2cdea5=a44_0x5e6ad6;return remoteVersionConflict(_0x53363f,_0x285e04,_0x2cdea5(0x211),_0x2cdea5(0x1ef));}function remoteVersionChangedConflict(_0x161a62,_0x185e9f,_0x4cab46){const _0x55fa7b=a44_0x5e6ad6;if(!_0x185e9f?.[_0x55fa7b(0x1f6)]||_0x185e9f[_0x55fa7b(0x1f3)]==null||!isRemoteVersionConflict(_0x4cab46))return undefined;return remoteVersionConflict(_0x161a62,_0x185e9f,_0x55fa7b(0x1e7),_0x55fa7b(0x1e2));}function remoteVersionConflict(_0x11f855,_0x173aa9,_0x418d5b,_0x32ea65){const _0x1c9d62=a44_0x5e6ad6;return{'code':_0x418d5b,'lockKey':_0x11f855[_0x1c9d62(0x20f)],'filePath':_0x11f855[_0x1c9d62(0x1d6)],'remoteId':_0x173aa9['remoteId'],..._0x173aa9['version']!=null?{'expectedVersion':_0x173aa9[_0x1c9d62(0x1f3)]}:{},'message':_0x32ea65,'nextAction':{'action':_0x1c9d62(0x1e5),'command':CLI_BIN_NAME+'\x20bff\x20detail\x20--id\x20'+_0x173aa9[_0x1c9d62(0x1f6)]+'\x20--format\x20compress','requiresReview':!![],'message':_0x1c9d62(0x228)}};}function isRemoteVersionConflict(_0x126ddd){const _0x3ad184=a44_0x5e6ad6,_0x24ae30=_0x126ddd instanceof Error?_0x126ddd['message']:String(_0x126ddd),_0x112a12=getPlatformErrorCode(_0x126ddd)??'';return[_0x24ae30,_0x112a12][_0x3ad184(0x1cf)](_0x24b851=>/(?:version|optimistic)[\s_-]*(?:conflict|mismatch|changed|stale|out[\s_-]*of[\s_-]*date)|(?:conflict|mismatch|changed|stale|out[\s_-]*of[\s_-]*date)[\s_-]*(?:version|optimistic)/i[_0x3ad184(0x213)](_0x24b851));}function formatPushMessage(_0x17c218,_0x28e3c8,_0x389eef,_0x2c5eda,_0x4aa569){const _0x4ffdde=a44_0x5e6ad6,_0xb57c48=[_0x4ffdde(0x20c)+_0x17c218+'\x20uploaded',_0x28e3c8+_0x4ffdde(0x1f7)];_0x389eef>0x0&&_0xb57c48[_0x4ffdde(0x1d8)](_0x389eef+'\x20conflict'+(_0x389eef===0x1?'':'s')+'\x20'+(_0x389eef===0x1?'requires':_0x4ffdde(0x1ce))+_0x4ffdde(0x231));if(_0x2c5eda>0x0)_0xb57c48[_0x4ffdde(0x1d8)](_0x2c5eda+_0x4ffdde(0x223));return _0xb57c48[_0x4ffdde(0x1d8)](_0x4aa569),_0xb57c48['join'](',\x20');}async function getTargetFunctions(_0x435ad0,_0xf2cb4){const _0x4c0324=a44_0x5e6ad6,_0xeecb91=_0xf2cb4[_0x4c0324(0x22e)](_0x4c0324(0x1df)),_0x4ecf4f=_0xf2cb4[_0x4c0324(0x22e)](_0x4c0324(0x1fe)),_0x5f6946=normalizeBffType(_0xeecb91)??undefined;if(_0x4ecf4f&&!_0x5f6946)throw CliErrors['validation'](_0x4c0324(0x1d0));const _0x113ecd=await scanLocalBffFunctions(_0x435ad0,_0x5f6946);if(_0x4ecf4f){const _0x2c72ab=_0x113ecd['filter'](_0x1b2cba=>_0x1b2cba['name']===_0x4ecf4f);if(_0x2c72ab[_0x4c0324(0x1e4)]===0x0)throw CliErrors['validation'](_0x4c0324(0x22c)+_0x5f6946+'/'+_0x4ecf4f);return _0x2c72ab;}return _0x113ecd;}function existingHookWarning(_0x425415){const _0x2d48de=a44_0x5e6ad6;return{'code':'EXISTING_HOOK_BINDING_PRESERVED','lockKey':_0x425415,'message':_0x2d48de(0x202)};}async function buildHookMaps(_0x500505,_0x23b06b,_0x47b277,_0x5c4d90,_0x220557){const _0x5d42f4=a44_0x5e6ad6,_0x492976=_0x47b277[_0x5d42f4(0x1cf)](_0x43e78f=>_0x43e78f[_0x5d42f4(0x1df)]===_0x5d42f4(0x1d7));if(!_0x492976)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0x308751=resolveApiModelSource(_0x23b06b,_0x500505,_0x220557),_0x8205c7=loadAliasMap(_0x23b06b,undefined,_0x308751[_0x5d42f4(0x1d6)],_0x308751[_0x5d42f4(0x215)]);assertUnambiguousHookAliases(_0x8205c7);const _0x4e0740=[..._0x8205c7['map'](_0x5381d9=>[_0x5381d9[_0x5d42f4(0x20d)],_0x5381d9[_0x5d42f4(0x225)]]),...trackedHookDirectoryMappings(_0x5c4d90)[_0x5d42f4(0x22f)](_0x3bc108=>[_0x3bc108[_0x5d42f4(0x20d)],_0x3bc108[_0x5d42f4(0x225)]])],_0xd97c5f=await listDatasets(_0x500505);assertUnambiguousHookDirectoryMappings(_0x4e0740[_0x5d42f4(0x22f)](([_0x441e0b,_0x24ae12])=>({'alias':_0x441e0b,'datasetCode':_0x24ae12})));const _0x14c36c=buildHookDirectoryIndexes(_0xd97c5f,_0x4e0740),_0x57fc89=new Map(),_0x25d031=preflightPushHookDirectories(_0x47b277,_0x5c4d90,_0x14c36c,_0x57fc89),_0x31890c=new Set(),_0x51a682=_0x47b277[_0x5d42f4(0x21d)](_0x1fb42d=>_0x57fc89[_0x5d42f4(0x221)](_0x1fb42d[_0x5d42f4(0x20f)])?.[_0x5d42f4(0x219)](_0x5d42f4(0x1d3))&&_0x5c4d90[_0x5d42f4(0x1c4)][_0x1fb42d[_0x5d42f4(0x20f)]]?.[_0x5d42f4(0x1f6)]&&_0x5c4d90[_0x5d42f4(0x1c4)][_0x1fb42d[_0x5d42f4(0x20f)]]?.[_0x5d42f4(0x225)]);if(_0x51a682['length']>0x0){let _0x3244ad;try{_0x3244ad=await getBffScriptStatistics(_0x500505);}catch(_0xb3f802){for(const _0x492688 of _0x51a682)_0x57fc89['set'](_0x492688[_0x5d42f4(0x20f)],_0x5d42f4(0x20e)+(_0xb3f802 instanceof Error?_0xb3f802[_0x5d42f4(0x229)]:String(_0xb3f802)));return{'resolutions':_0x25d031,'failures':_0x57fc89,'existingHooks':_0x31890c};}for(const _0x3ac947 of _0x51a682){const _0xf276d5=_0x5c4d90[_0x5d42f4(0x1c4)][_0x3ac947[_0x5d42f4(0x20f)]];try{const _0xabb484=new Set(_0x47b277[_0x5d42f4(0x21d)](_0x4379b7=>_0x4379b7[_0x5d42f4(0x1df)]==='HOOK'&&_0x5c4d90[_0x5d42f4(0x1c4)][_0x4379b7[_0x5d42f4(0x20f)]]?.[_0x5d42f4(0x225)]===_0xf276d5[_0x5d42f4(0x225)])[_0x5d42f4(0x22f)](_0x3712cd=>_0x3712cd[_0x5d42f4(0x20d)]));if(_0xabb484[_0x5d42f4(0x1dd)]>0x1)throw CliErrors[_0x5d42f4(0x1cb)](_0x5d42f4(0x1eb));const _0x3ed9f4=_0x3244ad[_0x5d42f4(0x201)](_0x19ac0b=>[{'datasetCode':_0x19ac0b[_0x5d42f4(0x225)],'operationType':snakeToCamel(_0x19ac0b[_0x5d42f4(0x209)]),'functionNode':_0x5d42f4(0x207),'id':_0x19ac0b[_0x5d42f4(0x1ec)]},{'datasetCode':_0x19ac0b['datasetCode'],'operationType':snakeToCamel(_0x19ac0b['operationType']),'functionNode':_0x5d42f4(0x21e),'id':_0x19ac0b[_0x5d42f4(0x1fa)]}])[_0x5d42f4(0x21d)](_0x3930cb=>_0x3930cb['id']===_0xf276d5[_0x5d42f4(0x1f6)]),_0x54aa17=await getBffScriptInfo(_0xf276d5[_0x5d42f4(0x1f6)]);if(_0x54aa17['id']!==_0xf276d5[_0x5d42f4(0x1f6)]||_0x54aa17[_0x5d42f4(0x1f9)]!==_0x500505||_0x54aa17[_0x5d42f4(0x1ee)]!=='HOOK'||_0x54aa17[_0x5d42f4(0x1db)]!==_0x3ac947[_0x5d42f4(0x1fe)]||_0xf276d5[_0x5d42f4(0x1f3)]==null||_0x54aa17[_0x5d42f4(0x1f3)]!==_0xf276d5['version']||_0x3ed9f4[_0x5d42f4(0x1e4)]!==0x1||_0x3ed9f4[0x0][_0x5d42f4(0x225)]!==_0xf276d5[_0x5d42f4(0x225)]||_0x3ed9f4[0x0][_0x5d42f4(0x209)]!==_0x3ac947['operationType']||_0x3ed9f4[0x0][_0x5d42f4(0x1cd)]!==_0x3ac947['functionNode']||_0xf276d5['operationType']!==_0x3ac947[_0x5d42f4(0x209)]||_0xf276d5[_0x5d42f4(0x1cd)]!==_0x3ac947['functionNode'])throw CliErrors[_0x5d42f4(0x1cb)](_0x5d42f4(0x1f2));_0x31890c[_0x5d42f4(0x227)](_0x3ac947[_0x5d42f4(0x20f)]),_0x57fc89[_0x5d42f4(0x1f5)](_0x3ac947[_0x5d42f4(0x20f)]);}catch(_0x29a19e){_0x57fc89['set'](_0x3ac947[_0x5d42f4(0x20f)],_0x29a19e instanceof Error?_0x29a19e['message']:String(_0x29a19e));}}}return{'resolutions':_0x25d031,'failures':_0x57fc89,'existingHooks':_0x31890c};}function a44_0x2718(){const _0x4cd64b=['delete','remoteId','\x20skipped','currentApp','appCode','afterScriptId','4707498ilytym','976608qrymTh','ENDPOINT','name','Incomplete\x20HOOK\x20path:\x20','apps','flatMap','Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.','conflict','datasetId','1993690FPTYKa','every','before','description','operationType','status','hash','Push\x20complete:\x20','alias','Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20','lockKey','COMMON','BFF_REMOTE_VERSION_MISSING','bool','test','Lock\x20scope\x20for\x20app\x20\x22','profileName','scriptsRoot','/api/management/library/scripts/save','has','startsWith','would_push','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','values','filter','after','1036920LkjlUW','3301950ikdlKG','get','parse','\x20failed','Runtime\x20script\x20cache\x20cleared.','datasetCode','failures','add','Review\x20the\x20current\x20remote\x20source,\x20merge\x20it\x20into\x20the\x20local\x20script,\x20then\x20retry\x20push.\x20Do\x20not\x20use\x20--force\x20unless\x20you\x20intentionally\x20discard\x20local\x20changes.','message','existingHooks','bff','Local\x20function\x20not\x20found:\x20','utf8','str','map','runtime\x20cache\x20not\x20needed','\x20resolution','Would\x20inspect\x20','force','7RglDHa','Push\x20only\x20this\x20script\x20type','functions','1182616NztuOh','boolean','mergedCli','POST','create','write','validation','lastSync','functionNode','require','some','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','16kPAbGz','string','HOOK_DATASET_NOT_FOUND:','warnings','lockFilePath','filePath','HOOK','push','45svbYrw','\x22\x20not\x20found\x20after\x20ensureLockScope.','functionName','defaultApp','size','cleared','type','selectedAppName','No\x20local\x20Backend\x20Function\x20scripts\x20found.','Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.','34908580mOZtTP','length','review_remote_and_merge','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','BFF_REMOTE_VERSION_CHANGED','update','dataset','resolutions','Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.','beforeScriptId','unchanged','scriptType','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','failed','runtime\x20cache\x20cleared','Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.','version','script'];a44_0x2718=function(){return _0x4cd64b;};return a44_0x2718();}async function uploadSingleFunction(_0x51a3af,_0x3166f3,_0x1d3bbd,_0x2c9aac){const _0x33896d=a44_0x5e6ad6,_0x564a0b=await readFile(_0x3166f3['filePath'],_0x33896d(0x22d)),_0x4e26bc=await computeFileHash(_0x3166f3['filePath']),_0x4d5a1a=_0x1d3bbd[_0x33896d(0x1c4)][_0x3166f3[_0x33896d(0x20f)]];if(_0x4d5a1a?.[_0x33896d(0x1f6)]&&_0x4d5a1a[_0x33896d(0x1f3)]==null)throw CliErrors['validation'](_0x3166f3[_0x33896d(0x20f)]+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x29d801=extractScriptDescription(_0x564a0b);if(!_0x29d801&&_0x4d5a1a?.[_0x33896d(0x1f6)]){const _0x3856ee=await getBffScriptInfo(_0x4d5a1a[_0x33896d(0x1f6)]);_0x29d801=_0x3856ee[_0x33896d(0x208)]||undefined;}const _0x18ccc0={'appCode':_0x51a3af,'functionName':_0x3166f3[_0x33896d(0x1fe)],'scriptType':_0x3166f3['type'],'scriptContent':_0x564a0b};if(_0x4d5a1a?.[_0x33896d(0x1f6)])_0x18ccc0['id']=_0x4d5a1a[_0x33896d(0x1f6)];if(_0x4d5a1a?.[_0x33896d(0x1f3)]!=null)_0x18ccc0[_0x33896d(0x1f3)]=_0x4d5a1a['version'];if(_0x29d801)_0x18ccc0[_0x33896d(0x208)]=_0x29d801;if(_0x3166f3[_0x33896d(0x1df)]==='HOOK'){const _0x5b531a=_0x2c9aac['resolutions'][_0x33896d(0x221)](_0x3166f3['lockKey']);if(!_0x5b531a&&!_0x2c9aac[_0x33896d(0x22a)]['has'](_0x3166f3['lockKey'])||!_0x3166f3[_0x33896d(0x209)]||!_0x3166f3['functionNode'])throw CliErrors[_0x33896d(0x1cb)](_0x33896d(0x1ff)+_0x3166f3[_0x33896d(0x20f)]);_0x5b531a&&(_0x18ccc0[_0x33896d(0x204)]=_0x5b531a[_0x33896d(0x1e9)]['id'],_0x18ccc0[_0x33896d(0x209)]=_0x3166f3[_0x33896d(0x209)]),_0x18ccc0['functionNode']=_0x3166f3['functionNode'];}const _0x575c88=await saveBffScript(_0x18ccc0),_0x3b1e1a=_0x575c88['id'],_0x2acf2f=_0x575c88[_0x33896d(0x1f4)]??await getBffScriptInfo(_0x3b1e1a),_0x591e92={'hash':_0x4e26bc,'remoteId':_0x3b1e1a,'version':_0x2acf2f['version']};if(_0x3166f3['type']===_0x33896d(0x1d7)){const _0x4b2d85=_0x2c9aac[_0x33896d(0x1ea)][_0x33896d(0x221)](_0x3166f3['lockKey']);if(!_0x4b2d85){_0x1d3bbd[_0x33896d(0x1c4)][_0x3166f3[_0x33896d(0x20f)]]={..._0x4d5a1a,..._0x591e92};return;}_0x591e92[_0x33896d(0x20d)]=_0x4b2d85['alias']??_0x4d5a1a?.[_0x33896d(0x20d)],_0x591e92[_0x33896d(0x225)]=_0x4b2d85[_0x33896d(0x225)],_0x591e92[_0x33896d(0x209)]=_0x3166f3[_0x33896d(0x209)],_0x591e92['functionNode']=_0x3166f3[_0x33896d(0x1cd)];}_0x1d3bbd[_0x33896d(0x1c4)][_0x3166f3[_0x33896d(0x20f)]]=_0x591e92;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;function a44_0x5d1e(_0x345575,_0x2a1861){_0x345575=_0x345575-0x1c4;const _0x27180a=a44_0x2718();let _0x5d1e1c=_0x27180a[_0x345575];return _0x5d1e1c;}async function waitForUploadedLockEntries(_0x12c23b,_0x44e38f,_0x23be84){const _0x204716=a44_0x5e6ad6;if(_0x23be84[_0x204716(0x1e4)]===0x0)return;for(let _0xe6404c=0x0;_0xe6404c<LOCK_SETTLE_RETRY_COUNT;_0xe6404c+=0x1){const _0x47b1f0=await readBffLockFile(_0x12c23b),_0x1b3023=_0x47b1f0?.[_0x204716(0x200)]?.[_0x44e38f]?.[_0x204716(0x1c4)]??{},_0x3c268e=_0x23be84[_0x204716(0x206)](_0x3e2e1c=>!!_0x1b3023[_0x3e2e1c]?.[_0x204716(0x1f6)]);if(_0x3c268e)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0x23be84['join'](',\x20')+'.');}
|
|
1
|
+
const a44_0x51aaaa=a44_0xa41c;(function(_0x12a556,_0x2c6052){const _0x12b618=a44_0xa41c,_0x27237d=_0x12a556();while(!![]){try{const _0x4fe131=-parseInt(_0x12b618(0x203))/0x1+parseInt(_0x12b618(0x1fe))/0x2*(-parseInt(_0x12b618(0x22c))/0x3)+-parseInt(_0x12b618(0x1e2))/0x4+parseInt(_0x12b618(0x22e))/0x5+parseInt(_0x12b618(0x22f))/0x6*(-parseInt(_0x12b618(0x1fd))/0x7)+-parseInt(_0x12b618(0x1e8))/0x8*(parseInt(_0x12b618(0x246))/0x9)+parseInt(_0x12b618(0x23d))/0xa;if(_0x4fe131===_0x2c6052)break;else _0x27237d['push'](_0x27237d['shift']());}catch(_0x2a7684){_0x27237d['push'](_0x27237d['shift']());}}}(a44_0x19a6,0xd9a4e));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;function a44_0xa41c(_0x232ba5,_0x52af7c){_0x232ba5=_0x232ba5-0x1dd;const _0x19a623=a44_0x19a6();let _0xa41cbd=_0x19a623[_0x232ba5];return _0xa41cbd;}export const bffPush={'service':'bff','command':a44_0x51aaaa(0x243),'description':'Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','risk':a44_0x51aaaa(0x23e),'structuredErrors':!![],'flags':[{'name':'type','type':a44_0x51aaaa(0x231),'description':a44_0x51aaaa(0x1e9),'enum':['COMMON','ENDPOINT','HOOK']},{'name':'name','type':a44_0x51aaaa(0x231),'description':a44_0x51aaaa(0x21d)},{'name':a44_0x51aaaa(0x245),'type':a44_0x51aaaa(0x216),'description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0xefe837){const _0x229b32=a44_0x51aaaa,_0x224448=loadBffProjectConfig(_0xefe837['appCode']),_0x5ac05a=await readBffLockFile(_0x224448['lockFilePath']),{appLock:_0x466dae}=ensureLockScope(_0x5ac05a??createEmptyBffLock(),_0xefe837[_0x229b32(0x1e5)],_0x224448[_0x229b32(0x1eb)],_0x229b32(0x243)),_0x54200b=await getTargetFunctions(_0x224448,_0xefe837),_0x4e638b=_0x54200b[_0x229b32(0x1e7)](_0x5a46bc=>_0x5a46bc[_0x229b32(0x1ee)]==='HOOK')?await scanLocalBffFunctions(_0x224448,'HOOK'):_0x54200b,_0x468186=await buildHookMaps(_0xefe837[_0x229b32(0x1e5)],_0xefe837[_0x229b32(0x1fa)],_0x4e638b,_0x466dae,_0xefe837[_0x229b32(0x21f)]||_0xefe837[_0x229b32(0x1e1)]?.[_0x229b32(0x22b)]||_0xefe837[_0x229b32(0x1e1)]?.[_0x229b32(0x217)]),_0x4f6dd8=_0xefe837[_0x229b32(0x20a)](_0x229b32(0x245)),_0x1a54cf=[];for(const _0x63b931 of _0x54200b){const _0x1936fd=await computeFileHash(_0x63b931[_0x229b32(0x21c)]),_0x2c1d9e=_0x466dae[_0x229b32(0x218)][_0x63b931[_0x229b32(0x233)]],_0x3dc352=!!_0x2c1d9e&&_0x2c1d9e[_0x229b32(0x20f)]===_0x1936fd,_0x344f6b=_0x468186['resolutions']['get'](_0x63b931['lockKey']),_0x1e4dcf=!!_0x2c1d9e?.['remoteId']&&_0x2c1d9e[_0x229b32(0x1e3)]==null&&(_0x4f6dd8||!_0x3dc352),_0xd0b78f=_0x1e4dcf?missingRemoteVersionConflict(_0x63b931,_0x2c1d9e):undefined,_0x525648=_0x468186['failures'][_0x229b32(0x20c)](_0x63b931[_0x229b32(0x233)])?_0x229b32(0x22a):!_0x4f6dd8&&_0x3dc352?_0x229b32(0x1f5):_0xd0b78f?_0x229b32(0x1fb):'would_push';_0x1a54cf['push']({'lockKey':_0x63b931[_0x229b32(0x233)],'filePath':_0x63b931[_0x229b32(0x21c)],'remoteId':_0x2c1d9e?.[_0x229b32(0x1e0)]??null,'mode':_0x2c1d9e?.[_0x229b32(0x1e0)]?_0x229b32(0x200):_0x229b32(0x220),'status':_0x525648,..._0x468186[_0x229b32(0x240)][_0x229b32(0x20c)](_0x63b931['lockKey'])?{'error':_0x468186[_0x229b32(0x240)][_0x229b32(0x21a)](_0x63b931[_0x229b32(0x233)])}:{},..._0xd0b78f?{'conflict':_0xd0b78f}:{},..._0x468186['existingHooks'][_0x229b32(0x20c)](_0x63b931[_0x229b32(0x233)])?{'datasetCode':_0x2c1d9e?.[_0x229b32(0x1e4)],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x63b931[_0x229b32(0x233)])]}:{},..._0x344f6b?{'alias':_0x344f6b[_0x229b32(0x1f0)]??null,'datasetCode':_0x344f6b['datasetCode'],'operationType':_0x63b931['operationType'],'functionNode':_0x63b931[_0x229b32(0x230)],'warnings':_0x344f6b['warnings']}:{}});}return{'method':_0x229b32(0x242),'url':_0x229b32(0x221),'body':{'appCode':_0xefe837['appCode'],'force':_0x4f6dd8,'files':_0x1a54cf,'cacheClearAtRuntime':_0x1a54cf['some'](_0x28e152=>_0x28e152[_0x229b32(0x205)]===_0x229b32(0x20e)),'cacheClearAtRuntimeTimes':_0x1a54cf[_0x229b32(0x1e7)](_0x40f217=>_0x40f217[_0x229b32(0x205)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x229b32(0x208)+_0x1a54cf[_0x229b32(0x1f9)]+_0x229b32(0x223)};},async 'execute'(_0x584780){const _0x3b5654=a44_0x51aaaa,_0x3f330b=loadBffProjectConfig(_0x584780['appCode']),_0x213eb0=await readBffLockFile(_0x3f330b[_0x3b5654(0x1f1)]),{lockData:_0x196940,appLock:_0x244fdb}=ensureLockScope(_0x213eb0??createEmptyBffLock(),_0x584780[_0x3b5654(0x1e5)],_0x3f330b['scriptsRoot'],_0x3b5654(0x243)),_0x24aaf4=await getTargetFunctions(_0x3f330b,_0x584780);if(_0x24aaf4['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':_0x3b5654(0x23c)};const _0x5079d9=_0x584780[_0x3b5654(0x20a)](_0x3b5654(0x245)),_0x1d43a3=JSON[_0x3b5654(0x207)](JSON[_0x3b5654(0x248)](_0x196940)),_0x2c35ce=_0x1d43a3[_0x3b5654(0x21e)][_0x584780['appCode']];if(!_0x2c35ce)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x584780[_0x3b5654(0x1e5)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x21acff=_0x24aaf4[_0x3b5654(0x1e7)](_0x1679bf=>_0x1679bf[_0x3b5654(0x1ee)]===_0x3b5654(0x1ef))?await scanLocalBffFunctions(_0x3f330b,'HOOK'):_0x24aaf4,_0x13024b=await buildHookMaps(_0x584780[_0x3b5654(0x1e5)],_0x584780[_0x3b5654(0x1fa)],_0x21acff,_0x2c35ce,_0x584780[_0x3b5654(0x21f)]||_0x584780['mergedCli']?.['currentApp']||_0x584780['mergedCli']?.[_0x3b5654(0x217)]),_0x2ff426=[],_0x435c15=[],_0x18f182=[],_0xd62a48=[];for(const _0x390272 of _0x24aaf4){const _0x3c1b06=_0x13024b[_0x3b5654(0x240)][_0x3b5654(0x21a)](_0x390272[_0x3b5654(0x233)]);if(_0x3c1b06){_0xd62a48[_0x3b5654(0x243)]({'lockKey':_0x390272[_0x3b5654(0x233)],'error':_0x3c1b06});continue;}const _0x3b2392=await computeFileHash(_0x390272['filePath']),_0x1d8fe5=_0x2c35ce[_0x3b5654(0x218)][_0x390272[_0x3b5654(0x233)]];if(!_0x5079d9&&_0x1d8fe5&&_0x1d8fe5[_0x3b5654(0x20f)]===_0x3b2392){_0x435c15[_0x3b5654(0x243)]({'lockKey':_0x390272[_0x3b5654(0x233)],'reason':_0x3b5654(0x1f5)});continue;}if(_0x1d8fe5?.[_0x3b5654(0x1e0)]&&_0x1d8fe5[_0x3b5654(0x1e3)]==null){_0x18f182[_0x3b5654(0x243)](missingRemoteVersionConflict(_0x390272,_0x1d8fe5));continue;}try{await uploadSingleFunction(_0x584780[_0x3b5654(0x1e5)],_0x390272,_0x2c35ce,_0x13024b);const _0x447a74=_0x2c35ce[_0x3b5654(0x218)][_0x390272[_0x3b5654(0x233)]];_0x2ff426[_0x3b5654(0x243)]({'lockKey':_0x390272[_0x3b5654(0x233)],'remoteId':_0x447a74?.[_0x3b5654(0x1e0)]??0x0});}catch(_0x1e0ffa){const _0x584257=remoteVersionChangedConflict(_0x390272,_0x1d8fe5,_0x1e0ffa);if(_0x584257){_0x18f182[_0x3b5654(0x243)](_0x584257);continue;}_0xd62a48[_0x3b5654(0x243)]({'lockKey':_0x390272[_0x3b5654(0x233)],'error':_0x1e0ffa instanceof Error?_0x1e0ffa[_0x3b5654(0x1f8)]:String(_0x1e0ffa)});}}_0x2c35ce[_0x3b5654(0x241)]=new Date()[_0x3b5654(0x239)](),await writeBffLockFile(_0x3f330b['lockFilePath'],_0x1d43a3),await waitForUploadedLockEntries(_0x3f330b[_0x3b5654(0x1f1)],_0x584780[_0x3b5654(0x1e5)],_0x2ff426['map'](_0x5db4aa=>_0x5db4aa[_0x3b5654(0x233)]));let _0x51ff6f={'attempted':![],'cleared':![]};if(_0x2ff426[_0x3b5654(0x1f9)]>0x0)try{let _0x272abc='';for(let _0x39c822=0x0;_0x39c822<CACHE_CLEAR_ATTEMPTS;_0x39c822+=0x1){_0x272abc=await clearBffScriptCache(),_0x39c822<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x51ff6f={'attempted':!![],'cleared':!![],'message':_0x272abc||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0x209f26){_0x51ff6f={'attempted':!![],'cleared':![],'error':_0x209f26 instanceof Error?_0x209f26[_0x3b5654(0x1f8)]:String(_0x209f26)};}const _0x1baa8b=_0xd62a48[_0x3b5654(0x1f9)]===0x0&&(_0x51ff6f[_0x3b5654(0x1f3)]?_0x51ff6f['cleared']:!![]),_0x2b1bb7=_0x1baa8b,_0x40e411=_0x51ff6f[_0x3b5654(0x1f3)]?_0x51ff6f[_0x3b5654(0x215)]?_0x3b5654(0x23a):_0x3b5654(0x22d):_0x3b5654(0x20d);return{'ok':_0x2b1bb7,'data':{'uploaded':_0x2ff426,'skipped':_0x435c15,'conflicts':_0x18f182,'failed':_0xd62a48,'cacheClear':_0x51ff6f,'warnings':[...[..._0x13024b[_0x3b5654(0x1f4)][_0x3b5654(0x1f6)]()]['flatMap'](_0x13d55b=>_0x13d55b[_0x3b5654(0x209)]),...[..._0x13024b[_0x3b5654(0x23f)]][_0x3b5654(0x236)](existingHookWarning)]},'message':formatPushMessage(_0x2ff426['length'],_0x435c15[_0x3b5654(0x1f9)],_0x18f182[_0x3b5654(0x1f9)],_0xd62a48[_0x3b5654(0x1f9)],_0x40e411)};}};function missingRemoteVersionConflict(_0x5645c1,_0x2cfafb){const _0x5bb943=a44_0x51aaaa;return remoteVersionConflict(_0x5645c1,_0x2cfafb,'BFF_REMOTE_VERSION_MISSING',_0x5bb943(0x1f7));}function remoteVersionChangedConflict(_0x3c605e,_0x330f16,_0x2b886f){const _0x2fe2e7=a44_0x51aaaa;if(!_0x330f16?.['remoteId']||_0x330f16[_0x2fe2e7(0x1e3)]==null||!isRemoteVersionConflict(_0x2b886f))return undefined;return remoteVersionConflict(_0x3c605e,_0x330f16,_0x2fe2e7(0x1e6),_0x2fe2e7(0x228));}function remoteVersionConflict(_0xe47641,_0x1afd6c,_0x53b519,_0x4d423d){const _0x19156e=a44_0x51aaaa;return{'code':_0x53b519,'lockKey':_0xe47641['lockKey'],'filePath':_0xe47641[_0x19156e(0x21c)],'remoteId':_0x1afd6c['remoteId'],..._0x1afd6c[_0x19156e(0x1e3)]!=null?{'expectedVersion':_0x1afd6c[_0x19156e(0x1e3)]}:{},'message':_0x4d423d,'nextAction':{'action':_0x19156e(0x225),'command':CLI_BIN_NAME+_0x19156e(0x204)+_0x1afd6c[_0x19156e(0x1e0)]+_0x19156e(0x214),'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 a44_0x19a6(){const _0xe78c19=['hash','Local\x20function\x20not\x20found:\x20','name','test','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','\x20--format\x20compress','cleared','boolean','defaultApp','functions','datasetId','get','script','filePath','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','apps','selectedAppName','create','/api/management/library/scripts/save','afterScriptId','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','require','review_remote_and_merge','Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.','beforeScriptId','Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.','join','failed','currentApp','3jiUMdE','runtime\x20cache\x20clear\x20failed','311295tnAjlr','1182jGqjIc','functionNode','string','before','lockKey','Incomplete\x20HOOK\x20path:\x20','flatMap','map','profileName','\x20uploaded','toISOString','runtime\x20cache\x20cleared','dataset','No\x20local\x20Backend\x20Function\x20scripts\x20found.','61394190DrtgjJ','write','existingHooks','failures','lastSync','POST','push','\x20conflict','force','264618OzShHt','functionName','stringify','set','\x20skipped','after','operationType','remoteId','mergedCli','5943824FornkC','version','datasetCode','appCode','BFF_REMOTE_VERSION_CHANGED','some','8NpapRy','Push\x20only\x20this\x20script\x20type','HOOK_DATASET_NOT_FOUND:','scriptsRoot','EXISTING_HOOK_BINDING_PRESERVED','filter','type','HOOK','alias','lockFilePath','requires','attempted','resolutions','unchanged','values','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','message','length','apiDir','conflict','description','32109ELmnda','2534468UsXuOw','str','update','validation','Push\x20complete:\x20','1623977yTffBJ','\x20bff\x20detail\x20--id\x20','status','Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20','parse','Would\x20inspect\x20','warnings','bool','size','has','runtime\x20cache\x20not\x20needed','would_push'];a44_0x19a6=function(){return _0xe78c19;};return a44_0x19a6();}function isRemoteVersionConflict(_0x5e65f0){const _0x25c205=a44_0x51aaaa,_0x335a20=_0x5e65f0 instanceof Error?_0x5e65f0[_0x25c205(0x1f8)]:String(_0x5e65f0),_0x33d72f=getPlatformErrorCode(_0x5e65f0)??'';return[_0x335a20,_0x33d72f][_0x25c205(0x1e7)](_0xcb78f3=>/(?: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[_0x25c205(0x212)](_0xcb78f3));}function formatPushMessage(_0x10b9f5,_0x4d2356,_0x5b8fe4,_0x4083ac,_0x4d5786){const _0x4187ea=a44_0x51aaaa,_0x21783d=[_0x4187ea(0x202)+_0x10b9f5+_0x4187ea(0x238),_0x4d2356+_0x4187ea(0x1dd)];_0x5b8fe4>0x0&&_0x21783d['push'](_0x5b8fe4+_0x4187ea(0x244)+(_0x5b8fe4===0x1?'':'s')+'\x20'+(_0x5b8fe4===0x1?_0x4187ea(0x1f2):_0x4187ea(0x224))+'\x20resolution');if(_0x4083ac>0x0)_0x21783d[_0x4187ea(0x243)](_0x4083ac+'\x20failed');return _0x21783d['push'](_0x4d5786),_0x21783d[_0x4187ea(0x229)](',\x20');}async function getTargetFunctions(_0x591c7b,_0x373e06){const _0x4787c0=a44_0x51aaaa,_0xaaee8e=_0x373e06[_0x4787c0(0x1ff)](_0x4787c0(0x1ee)),_0x25ba50=_0x373e06['str'](_0x4787c0(0x211)),_0x31edc5=normalizeBffType(_0xaaee8e)??undefined;if(_0x25ba50&&!_0x31edc5)throw CliErrors[_0x4787c0(0x201)]('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x477881=await scanLocalBffFunctions(_0x591c7b,_0x31edc5);if(_0x25ba50){const _0x528aaf=_0x477881['filter'](_0x4670cb=>_0x4670cb[_0x4787c0(0x211)]===_0x25ba50);if(_0x528aaf['length']===0x0)throw CliErrors[_0x4787c0(0x201)](_0x4787c0(0x210)+_0x31edc5+'/'+_0x25ba50);return _0x528aaf;}return _0x477881;}function existingHookWarning(_0x15f9fe){const _0x4fe521=a44_0x51aaaa;return{'code':_0x4fe521(0x1ec),'lockKey':_0x15f9fe,'message':_0x4fe521(0x226)};}async function buildHookMaps(_0x4281a3,_0x238ed3,_0x3982c2,_0x2bbf0c,_0x12d3be){const _0x5b5836=a44_0x51aaaa,_0x50ca29=_0x3982c2[_0x5b5836(0x1e7)](_0x58bf1b=>_0x58bf1b[_0x5b5836(0x1ee)]===_0x5b5836(0x1ef));if(!_0x50ca29)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0x1b7e92=resolveApiModelSource(_0x238ed3,_0x4281a3,_0x12d3be),_0x424fa0=loadAliasMap(_0x238ed3,undefined,_0x1b7e92[_0x5b5836(0x21c)],_0x1b7e92[_0x5b5836(0x237)]);assertUnambiguousHookAliases(_0x424fa0);const _0x13f5fd=[..._0x424fa0[_0x5b5836(0x236)](_0x4c2b28=>[_0x4c2b28[_0x5b5836(0x1f0)],_0x4c2b28[_0x5b5836(0x1e4)]]),...trackedHookDirectoryMappings(_0x2bbf0c)[_0x5b5836(0x236)](_0x2870cc=>[_0x2870cc[_0x5b5836(0x1f0)],_0x2870cc[_0x5b5836(0x1e4)]])],_0xc7fb67=await listDatasets(_0x4281a3);assertUnambiguousHookDirectoryMappings(_0x13f5fd[_0x5b5836(0x236)](([_0x4ae3a2,_0xd76542])=>({'alias':_0x4ae3a2,'datasetCode':_0xd76542})));const _0x44661e=buildHookDirectoryIndexes(_0xc7fb67,_0x13f5fd),_0x3a4120=new Map(),_0x4a16a7=preflightPushHookDirectories(_0x3982c2,_0x2bbf0c,_0x44661e,_0x3a4120),_0x1435c7=new Set(),_0x41b521=_0x3982c2[_0x5b5836(0x1ed)](_0x32dd96=>_0x3a4120['get'](_0x32dd96['lockKey'])?.['startsWith'](_0x5b5836(0x1ea))&&_0x2bbf0c[_0x5b5836(0x218)][_0x32dd96[_0x5b5836(0x233)]]?.[_0x5b5836(0x1e0)]&&_0x2bbf0c[_0x5b5836(0x218)][_0x32dd96[_0x5b5836(0x233)]]?.[_0x5b5836(0x1e4)]);if(_0x41b521[_0x5b5836(0x1f9)]>0x0){let _0x5193c8;try{_0x5193c8=await getBffScriptStatistics(_0x4281a3);}catch(_0x1a4ab3){for(const _0x42f9a5 of _0x41b521)_0x3a4120[_0x5b5836(0x249)](_0x42f9a5['lockKey'],_0x5b5836(0x206)+(_0x1a4ab3 instanceof Error?_0x1a4ab3[_0x5b5836(0x1f8)]:String(_0x1a4ab3)));return{'resolutions':_0x4a16a7,'failures':_0x3a4120,'existingHooks':_0x1435c7};}for(const _0x583e0f of _0x41b521){const _0x2d01d0=_0x2bbf0c[_0x5b5836(0x218)][_0x583e0f[_0x5b5836(0x233)]];try{const _0x431158=new Set(_0x3982c2[_0x5b5836(0x1ed)](_0x4c37c2=>_0x4c37c2[_0x5b5836(0x1ee)]==='HOOK'&&_0x2bbf0c['functions'][_0x4c37c2[_0x5b5836(0x233)]]?.[_0x5b5836(0x1e4)]===_0x2d01d0[_0x5b5836(0x1e4)])[_0x5b5836(0x236)](_0x3d463b=>_0x3d463b[_0x5b5836(0x1f0)]));if(_0x431158[_0x5b5836(0x20b)]>0x1)throw CliErrors[_0x5b5836(0x201)]('Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.');const _0x320132=_0x5193c8[_0x5b5836(0x235)](_0x29d033=>[{'datasetCode':_0x29d033[_0x5b5836(0x1e4)],'operationType':snakeToCamel(_0x29d033[_0x5b5836(0x1df)]),'functionNode':_0x5b5836(0x232),'id':_0x29d033[_0x5b5836(0x227)]},{'datasetCode':_0x29d033[_0x5b5836(0x1e4)],'operationType':snakeToCamel(_0x29d033[_0x5b5836(0x1df)]),'functionNode':_0x5b5836(0x1de),'id':_0x29d033[_0x5b5836(0x222)]}])['filter'](_0x31e9d8=>_0x31e9d8['id']===_0x2d01d0[_0x5b5836(0x1e0)]),_0xaa49d7=await getBffScriptInfo(_0x2d01d0['remoteId']);if(_0xaa49d7['id']!==_0x2d01d0[_0x5b5836(0x1e0)]||_0xaa49d7['appCode']!==_0x4281a3||_0xaa49d7['scriptType']!==_0x5b5836(0x1ef)||_0xaa49d7[_0x5b5836(0x247)]!==_0x583e0f['name']||_0x2d01d0[_0x5b5836(0x1e3)]==null||_0xaa49d7[_0x5b5836(0x1e3)]!==_0x2d01d0[_0x5b5836(0x1e3)]||_0x320132[_0x5b5836(0x1f9)]!==0x1||_0x320132[0x0]['datasetCode']!==_0x2d01d0[_0x5b5836(0x1e4)]||_0x320132[0x0][_0x5b5836(0x1df)]!==_0x583e0f[_0x5b5836(0x1df)]||_0x320132[0x0][_0x5b5836(0x230)]!==_0x583e0f[_0x5b5836(0x230)]||_0x2d01d0['operationType']!==_0x583e0f[_0x5b5836(0x1df)]||_0x2d01d0[_0x5b5836(0x230)]!==_0x583e0f[_0x5b5836(0x230)])throw CliErrors['validation']('Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.');_0x1435c7['add'](_0x583e0f[_0x5b5836(0x233)]),_0x3a4120['delete'](_0x583e0f[_0x5b5836(0x233)]);}catch(_0x6d9532){_0x3a4120[_0x5b5836(0x249)](_0x583e0f[_0x5b5836(0x233)],_0x6d9532 instanceof Error?_0x6d9532['message']:String(_0x6d9532));}}}return{'resolutions':_0x4a16a7,'failures':_0x3a4120,'existingHooks':_0x1435c7};}async function uploadSingleFunction(_0x3269e9,_0x236ed1,_0x4d24d4,_0x2ed434){const _0x5b496b=a44_0x51aaaa,_0x4e382f=await readFile(_0x236ed1[_0x5b496b(0x21c)],'utf8'),_0x2d42ff=await computeFileHash(_0x236ed1['filePath']),_0x45c9d8=_0x4d24d4[_0x5b496b(0x218)][_0x236ed1[_0x5b496b(0x233)]];if(_0x45c9d8?.['remoteId']&&_0x45c9d8[_0x5b496b(0x1e3)]==null)throw CliErrors['validation'](_0x236ed1[_0x5b496b(0x233)]+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x3bd914=extractScriptDescription(_0x4e382f);if(!_0x3bd914&&_0x45c9d8?.[_0x5b496b(0x1e0)]){const _0x2ce279=await getBffScriptInfo(_0x45c9d8['remoteId']);_0x3bd914=_0x2ce279[_0x5b496b(0x1fc)]||undefined;}const _0x13bf5b={'appCode':_0x3269e9,'functionName':_0x236ed1[_0x5b496b(0x211)],'scriptType':_0x236ed1[_0x5b496b(0x1ee)],'scriptContent':_0x4e382f};if(_0x45c9d8?.['remoteId'])_0x13bf5b['id']=_0x45c9d8['remoteId'];if(_0x45c9d8?.['version']!=null)_0x13bf5b[_0x5b496b(0x1e3)]=_0x45c9d8[_0x5b496b(0x1e3)];if(_0x3bd914)_0x13bf5b[_0x5b496b(0x1fc)]=_0x3bd914;if(_0x236ed1[_0x5b496b(0x1ee)]===_0x5b496b(0x1ef)){const _0x117991=_0x2ed434[_0x5b496b(0x1f4)][_0x5b496b(0x21a)](_0x236ed1[_0x5b496b(0x233)]);if(!_0x117991&&!_0x2ed434[_0x5b496b(0x23f)][_0x5b496b(0x20c)](_0x236ed1[_0x5b496b(0x233)])||!_0x236ed1[_0x5b496b(0x1df)]||!_0x236ed1[_0x5b496b(0x230)])throw CliErrors[_0x5b496b(0x201)](_0x5b496b(0x234)+_0x236ed1[_0x5b496b(0x233)]);_0x117991&&(_0x13bf5b[_0x5b496b(0x219)]=_0x117991[_0x5b496b(0x23b)]['id'],_0x13bf5b['operationType']=_0x236ed1[_0x5b496b(0x1df)]),_0x13bf5b[_0x5b496b(0x230)]=_0x236ed1[_0x5b496b(0x230)];}const _0x336f30=await saveBffScript(_0x13bf5b),_0x4805ff=_0x336f30['id'],_0x35ca3a=_0x336f30[_0x5b496b(0x21b)]??await getBffScriptInfo(_0x4805ff),_0x31bfc4={'hash':_0x2d42ff,'remoteId':_0x4805ff,'version':_0x35ca3a['version']};if(_0x236ed1[_0x5b496b(0x1ee)]===_0x5b496b(0x1ef)){const _0x5f0319=_0x2ed434['resolutions'][_0x5b496b(0x21a)](_0x236ed1['lockKey']);if(!_0x5f0319){_0x4d24d4[_0x5b496b(0x218)][_0x236ed1[_0x5b496b(0x233)]]={..._0x45c9d8,..._0x31bfc4};return;}_0x31bfc4[_0x5b496b(0x1f0)]=_0x5f0319[_0x5b496b(0x1f0)]??_0x45c9d8?.['alias'],_0x31bfc4[_0x5b496b(0x1e4)]=_0x5f0319['datasetCode'],_0x31bfc4[_0x5b496b(0x1df)]=_0x236ed1['operationType'],_0x31bfc4[_0x5b496b(0x230)]=_0x236ed1[_0x5b496b(0x230)];}_0x4d24d4['functions'][_0x236ed1[_0x5b496b(0x233)]]=_0x31bfc4;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0xdfcc91,_0x5488c1,_0x3b44a9){const _0x349164=a44_0x51aaaa;if(_0x3b44a9[_0x349164(0x1f9)]===0x0)return;for(let _0x2dd859=0x0;_0x2dd859<LOCK_SETTLE_RETRY_COUNT;_0x2dd859+=0x1){const _0x141427=await readBffLockFile(_0xdfcc91),_0x3e3f56=_0x141427?.['apps']?.[_0x5488c1]?.[_0x349164(0x218)]??{},_0x7d081f=_0x3b44a9['every'](_0x3f510b=>!!_0x3e3f56[_0x3f510b]?.[_0x349164(0x1e0)]);if(_0x7d081f)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x349164(0x213)+_0x3b44a9[_0x349164(0x229)](',\x20')+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a45_0x997d69=a45_0x1a16;(function(_0x589a1e,_0x55508d){const _0x34b1a3=a45_0x1a16,_0x3d8bc5=_0x589a1e();while(!![]){try{const _0x2d5ea6=-parseInt(_0x34b1a3(0xcf))/0x1+-parseInt(_0x34b1a3(0xb8))/0x2*(parseInt(_0x34b1a3(0xc5))/0x3)+-parseInt(_0x34b1a3(0xbb))/0x4+-parseInt(_0x34b1a3(0xb2))/0x5*(-parseInt(_0x34b1a3(0xb6))/0x6)+-parseInt(_0x34b1a3(0xd3))/0x7*(parseInt(_0x34b1a3(0xd6))/0x8)+parseInt(_0x34b1a3(0xb9))/0x9*(-parseInt(_0x34b1a3(0xc1))/0xa)+parseInt(_0x34b1a3(0xc6))/0xb*(parseInt(_0x34b1a3(0xbe))/0xc);if(_0x2d5ea6===_0x55508d)break;else _0x3d8bc5['push'](_0x3d8bc5['shift']());}catch(_0x5d3e61){_0x3d8bc5['push'](_0x3d8bc5['shift']());}}}(a45_0x2dae,0x7639f));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiModelSource}from'../../api/model-source.js';function a45_0x1a16(_0xe8a45a,_0x111193){_0xe8a45a=_0xe8a45a-0xb2;const _0x2daed5=a45_0x2dae();let _0x1a16f6=_0x2daed5[_0xe8a45a];return _0x1a16f6;}import{loadBffProjectConfig}from'../../core/bff/config.js';function a45_0x2dae(){const _0x123645=['6Vljceq','2637kYWgHu','scriptsRoot','2110356gfhNaR','apiDir','All\x20Backend\x20Function\x20scripts\x20are\x20in\x20sync.','3516WAiOUV','status','all','7270knTxgR','\x20modified,\x20','functions','lockKey','942987DtwOkL','100089gmViLc','Check\x20local\x20Backend\x20Function\x20sync\x20status\x20against\x20lock\x20file','\x20remote-only','appCode','filePath','boolean','remote','\x20unchanged','lockFilePath','429681QzGdYF','push','bff','read','10913xFWWhz','\x20added,\x20','length','472FMSzFq','117485zZxWLL','map','mergedCli','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','6DbyQQh','hash'];a45_0x2dae=function(){return _0x123645;};return a45_0x2dae();}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_0x997d69(0xd1),'command':a45_0x997d69(0xbf),'description':a45_0x997d69(0xc7),'risk':a45_0x997d69(0xd2),'flags':[{'name':a45_0x997d69(0xcc),'type':a45_0x997d69(0xcb),'description':a45_0x997d69(0xb5)}],async 'execute'(_0x2eab35){const _0x35d5e1=a45_0x997d69,_0x4215bf=loadBffProjectConfig(_0x2eab35[_0x35d5e1(0xc9)]),_0x2a1308=await readBffLockFile(_0x4215bf[_0x35d5e1(0xce)]),{appLock:_0x1962ac}=ensureLockScope(_0x2a1308??createEmptyBffLock(),_0x2eab35[_0x35d5e1(0xc9)],_0x4215bf[_0x35d5e1(0xba)],_0x35d5e1(0xbf)),_0x463648=await scanLocalBffFunctions(_0x4215bf),_0x35b2e4=[],_0x1385f8=[],_0x44bbe1=[];for(const _0x151351 of _0x463648){const _0x51d2de=await computeFileHash(_0x151351[_0x35d5e1(0xca)]),_0x5ec9b7=_0x1962ac[_0x35d5e1(0xc3)][_0x151351[_0x35d5e1(0xc4)]];if(!_0x5ec9b7)_0x35b2e4['push'](_0x151351[_0x35d5e1(0xc4)]);else _0x5ec9b7[_0x35d5e1(0xb7)]!==_0x51d2de?_0x1385f8[_0x35d5e1(0xd0)](_0x151351[_0x35d5e1(0xc4)]):_0x44bbe1[_0x35d5e1(0xd0)](_0x151351[_0x35d5e1(0xc4)]);}const _0x327ef1=[];if(_0x2eab35['bool']('remote')){const _0x49eb11=resolveApiModelSource(_0x2eab35[_0x35d5e1(0xbc)],_0x2eab35['appCode'],_0x2eab35['selectedAppName']||_0x2eab35[_0x35d5e1(0xb4)]?.['currentApp']||_0x2eab35['mergedCli']?.['defaultApp']),_0x3e3b30=loadAliasMap(_0x2eab35[_0x35d5e1(0xbc)],undefined,_0x49eb11[_0x35d5e1(0xca)],_0x49eb11['profileName']),_0x1aa0a5=new Map(_0x3e3b30['map'](_0x44b707=>[_0x44b707['datasetCode'],_0x44b707['alias']])),[_0x1303f7,_0x260d4b]=await Promise[_0x35d5e1(0xc0)]([listBffScripts(_0x2eab35[_0x35d5e1(0xc9)]),getBffScriptStatistics(_0x2eab35[_0x35d5e1(0xc9)])]),_0x5b42d3=createHookLocationMap(_0x260d4b),_0x2ee0a2=new Set(_0x463648[_0x35d5e1(0xb3)](_0x17e70a=>_0x17e70a[_0x35d5e1(0xc4)]));for(const _0x4b4a1a of _0x1303f7){const _0x24f7af=resolveRemoteScriptTarget(_0x4215bf,_0x4b4a1a,_0x5b42d3,_0x1962ac[_0x35d5e1(0xc3)],_0x1aa0a5);_0x24f7af&&!_0x2ee0a2['has'](_0x24f7af[_0x35d5e1(0xc4)])&&_0x327ef1[_0x35d5e1(0xd0)](_0x24f7af['lockKey']);}}const _0x3bf84f=_0x35b2e4[_0x35d5e1(0xd5)]===0x0&&_0x1385f8[_0x35d5e1(0xd5)]===0x0&&_0x327ef1['length']===0x0;return{'ok':!![],'data':{'added':_0x35b2e4,'modified':_0x1385f8,'unchanged':_0x44bbe1,'remoteOnly':_0x327ef1},'message':_0x3bf84f?_0x35d5e1(0xbd):_0x35b2e4[_0x35d5e1(0xd5)]+_0x35d5e1(0xd4)+_0x1385f8[_0x35d5e1(0xd5)]+_0x35d5e1(0xc2)+_0x44bbe1['length']+_0x35d5e1(0xcd)+(_0x327ef1[_0x35d5e1(0xd5)]>0x0?',\x20'+_0x327ef1[_0x35d5e1(0xd5)]+_0x35d5e1(0xc8):'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a46_0x3bcd(){const _0x147360=['\x20via\x20skills@latest','install','repairCommand',']:\x20','inherit','13954404LCAfqU','skillVersion','56FXwDJA','20916UnCsxF','25mYVoRw','72023sdSUhj','info','2525620DbpaSb','apiError','110lvOnJW','setLogPath','cli-skill','685323rFvuvt','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','2zKBSEc','log','cli-skill-install','error','CLI\x20Built-in\x20Skill\x20','installedPath','3zxcndy','1191440KUtClj','11815265fukKSe','nonInteractive','Built-in\x20Skill\x20install\x20failed\x20[','26WgYLlu','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.','cwd','\x20at\x20'];a46_0x3bcd=function(){return _0x147360;};return a46_0x3bcd();}const a46_0x4672ca=a46_0xdc07;function a46_0xdc07(_0xdcac82,_0x117ccd){_0xdcac82=_0xdcac82-0x147;const _0x3bcd8=a46_0x3bcd();let _0xdc0708=_0x3bcd8[_0xdcac82];return _0xdc0708;}(function(_0x378a27,_0x14539e){const _0x79818c=a46_0xdc07,_0x49ff00=_0x378a27();while(!![]){try{const _0xa08ab3=-parseInt(_0x79818c(0x14d))/0x1*(parseInt(_0x79818c(0x154))/0x2)+-parseInt(_0x79818c(0x153))/0x3*(parseInt(_0x79818c(0x168))/0x4)+parseInt(_0x79818c(0x165))/0x5*(-parseInt(_0x79818c(0x164))/0x6)+-parseInt(_0x79818c(0x166))/0x7*(parseInt(_0x79818c(0x163))/0x8)+parseInt(_0x79818c(0x14b))/0x9*(-parseInt(_0x79818c(0x148))/0xa)+parseInt(_0x79818c(0x155))/0xb+parseInt(_0x79818c(0x161))/0xc*(parseInt(_0x79818c(0x158))/0xd);if(_0xa08ab3===_0x14539e)break;else _0x49ff00['push'](_0x49ff00['shift']());}catch(_0x3e6c28){_0x49ff00['push'](_0x49ff00['shift']());}}}(a46_0x3bcd,0x9eace));import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a46_0x4672ca(0x14a),'command':a46_0x4672ca(0x15d),'description':a46_0x4672ca(0x14c),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x5115b3){const _0x51d4a7=a46_0x4672ca;logger[_0x51d4a7(0x149)](process[_0x51d4a7(0x15a)]()),logger[_0x51d4a7(0x167)](_0x51d4a7(0x14f),_0x51d4a7(0x159));const _0x5204e8=installBuiltinSkill({'stdio':_0x5115b3[_0x51d4a7(0x156)]?'pipe':_0x51d4a7(0x160)});if(!_0x5204e8['ok'])throw CliErrors[_0x51d4a7(0x147)](_0x51d4a7(0x157)+_0x5204e8['code']+_0x51d4a7(0x15f)+(_0x5204e8[_0x51d4a7(0x150)]||'unknown'),'Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20'+_0x5204e8[_0x51d4a7(0x15e)]);return console[_0x51d4a7(0x14e)](_0x5204e8['changed']?_0x51d4a7(0x151)+_0x5204e8[_0x51d4a7(0x162)]+'\x20installed'+(_0x5204e8['installedPath']?_0x51d4a7(0x15b)+_0x5204e8[_0x51d4a7(0x152)]:_0x51d4a7(0x15c)):_0x51d4a7(0x151)+_0x5204e8[_0x51d4a7(0x162)]+'\x20is\x20already\x20current'+(_0x5204e8[_0x51d4a7(0x152)]?_0x51d4a7(0x15b)+_0x5204e8[_0x51d4a7(0x152)]:'')),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a47_0x3a3251=a47_0x38f1;function a47_0x43d9(){const _0x15da06=['timeout','394064cVRcbG','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','start','...','45hujvrv','npm',',\x20state\x20','state','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','Current\x20version:\x20','fail','succeed','valid','2578302tgQubo','beta','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','filter','str','Update\x20failed','pipe','error','info','yellow','\x20\x20Try\x20manually:\x20','Checking\x20for\x20updates...','red',',\x20found\x20','execPath','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','entries','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','163254BTiOnD','Install\x20a\x20specific\x20CLI\x20version','bun','run','8RRUepO','\x20\x20CLI\x20Built-in\x20Skill\x20','CLI\x20updated\x20to\x20v','install','latest','\x20doctor','apiError','expected\x20','json','Requested\x20version:\x20',']:\x20','gray','Update\x20available:\x20','unknown','\x20→\x20','validation','skillVersion','current','repairCommand','slice','258DzeKoS','trim','fromEntries','2079119VhlWtm','map','length',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','code','boolean','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','Updating\x20via\x20','source','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','Version\x20comparison\x20failed','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','19119kmIwUk','Already\x20on\x20requested\x20version\x20(v','12740240ePjJsV',',\x20then\x20verify\x20with:\x20','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','Run:\x20','version','log','@latest','bool','33gKinpR','toLowerCase','green'];a47_0x43d9=function(){return _0x15da06;};return a47_0x43d9();}(function(_0x94088b,_0x3c02eb){const _0x460d3f=a47_0x38f1,_0x224ff8=_0x94088b();while(!![]){try{const _0x588cc7=parseInt(_0x460d3f(0x181))/0x1*(-parseInt(_0x460d3f(0x168))/0x2)+-parseInt(_0x460d3f(0x177))/0x3*(-parseInt(_0x460d3f(0x154))/0x4)+parseInt(_0x460d3f(0x189))/0x5*(-parseInt(_0x460d3f(0x150))/0x6)+-parseInt(_0x460d3f(0x16b))/0x7+parseInt(_0x460d3f(0x185))/0x8+-parseInt(_0x460d3f(0x192))/0x9+parseInt(_0x460d3f(0x179))/0xa;if(_0x588cc7===_0x3c02eb)break;else _0x224ff8['push'](_0x224ff8['shift']());}catch(_0x39ac9a){_0x224ff8['push'](_0x224ff8['shift']());}}}(a47_0x43d9,0x7ae63));import a47_0x2acea7 from'chalk';import a47_0x40890d from'ora';import a47_0x4bee9d from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x4a651b=a47_0x38f1;return GIT_COMMIT!==_0x4a651b(0x161)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x4a651b(0x167)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0xc338b4=a47_0x38f1,_0x12b9f6=process[_0xc338b4(0x14c)][_0xc338b4(0x182)]();if(_0x12b9f6['includes']('bun'))return _0xc338b4(0x152);return _0xc338b4(0x18a);}const updateFlags=[{'name':a47_0x3a3251(0x193),'type':a47_0x3a3251(0x170),'description':a47_0x3a3251(0x171),'default':![]},{'name':a47_0x3a3251(0x17d),'type':'string','description':a47_0x3a3251(0x151)}];function getRequestedVersion(_0x28eb3a){const _0x27659f=a47_0x3a3251;return _0x28eb3a[_0x27659f(0x196)](_0x27659f(0x17d))[_0x27659f(0x169)]();}async function validateUpdateFlags(_0x2176b9){const _0x1af38c=a47_0x3a3251,_0x58337d=_0x2176b9[_0x1af38c(0x180)](_0x1af38c(0x193)),_0x184bfd=getRequestedVersion(_0x2176b9);if(_0x58337d&&_0x184bfd)throw CliErrors['validation'](_0x1af38c(0x14d),_0x1af38c(0x14f));if(_0x184bfd&&!a47_0x4bee9d[_0x1af38c(0x191)](_0x184bfd))throw CliErrors[_0x1af38c(0x163)]('Invalid\x20version:\x20'+_0x184bfd,_0x1af38c(0x174));}async function fetchNpmDistTags(){const _0x85a232=a47_0x3a3251;try{const _0x4fcbe2=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0x85a232(0x184)](0x2710)});if(!_0x4fcbe2['ok'])return null;const _0x138a34=await _0x4fcbe2[_0x85a232(0x15c)]();if(!_0x138a34||typeof _0x138a34!=='object')return null;return Object[_0x85a232(0x16a)](Object[_0x85a232(0x14e)](_0x138a34)[_0x85a232(0x195)](([,_0x174b3b])=>typeof _0x174b3b==='string'&&_0x174b3b[_0x85a232(0x169)]()[_0x85a232(0x16d)]>0x0)[_0x85a232(0x16c)](([_0x436e5b,_0x3c78e0])=>[_0x436e5b,String(_0x3c78e0)[_0x85a232(0x169)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0xee2abf){const _0x4cd433=await fetchNpmDistTags();return _0x4cd433?.[_0xee2abf]??null;}async function fetchLatestVersion(){const _0x81ac87=a47_0x3a3251;return fetchNpmDistTagVersion(_0x81ac87(0x158));}async function resolveTargetVersion(_0x39b093){const _0x5f25ba=a47_0x3a3251,_0x34acb7=getRequestedVersion(_0x39b093);if(_0x34acb7)return{'version':_0x34acb7,'source':_0x5f25ba(0x17d)};if(_0x39b093[_0x5f25ba(0x180)](_0x5f25ba(0x193))){const _0x71cb2c=await fetchNpmDistTagVersion(_0x5f25ba(0x193));if(!_0x71cb2c)return null;return{'version':_0x71cb2c,'source':_0x5f25ba(0x193)};}const _0x1ba810=await fetchLatestVersion();if(!_0x1ba810)return null;return{'version':_0x1ba810,'source':'latest'};}function shouldInstallTarget(_0x13d023,_0x5abcf1){const _0x41e1f0=a47_0x3a3251;if(_0x5abcf1[_0x41e1f0(0x173)]==='version'||_0x5abcf1[_0x41e1f0(0x173)]===_0x41e1f0(0x193))return!a47_0x4bee9d['eq'](_0x13d023,_0x5abcf1[_0x41e1f0(0x17d)]);return a47_0x4bee9d['lt'](_0x13d023,_0x5abcf1[_0x41e1f0(0x17d)]);}function a47_0x38f1(_0x37e3a2,_0x4f4279){_0x37e3a2=_0x37e3a2-0x148;const _0x43d93b=a47_0x43d9();let _0x38f1f6=_0x43d93b[_0x37e3a2];return _0x38f1f6;}function getInstallPlanLabel(_0x935b71,_0x242386){const _0x527f8d=a47_0x3a3251;switch(_0x242386[_0x527f8d(0x173)]){case _0x527f8d(0x193):return'Beta\x20version:\x20'+a47_0x2acea7[_0x527f8d(0x19b)](_0x935b71)+_0x527f8d(0x162)+a47_0x2acea7[_0x527f8d(0x183)](_0x242386['version']);case _0x527f8d(0x17d):return _0x527f8d(0x15d)+a47_0x2acea7['yellow'](_0x935b71)+_0x527f8d(0x162)+a47_0x2acea7[_0x527f8d(0x183)](_0x242386['version']);case _0x527f8d(0x158):default:return _0x527f8d(0x160)+a47_0x2acea7[_0x527f8d(0x19b)](_0x935b71)+_0x527f8d(0x162)+a47_0x2acea7[_0x527f8d(0x183)](_0x242386[_0x527f8d(0x17d)]);}}function repairCurrentBuiltinSkill(){const _0x22b7e6=a47_0x3a3251;console[_0x22b7e6(0x17e)](a47_0x2acea7[_0x22b7e6(0x15f)]('Checking\x20CLI\x20Built-in\x20Skill...'));const _0xc17d82=installBuiltinSkill();if(_0xc17d82['ok']){console[_0x22b7e6(0x17e)](a47_0x2acea7[_0x22b7e6(0x15f)]('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0xc17d82['skillVersion']+'\x20is\x20up\x20to\x20date.'));return;}throw CliErrors[_0x22b7e6(0x15a)](_0x22b7e6(0x176)+_0xc17d82[_0x22b7e6(0x16f)]+_0x22b7e6(0x15e)+(_0xc17d82[_0x22b7e6(0x199)]||'unknown'),'Run:\x20'+_0xc17d82[_0x22b7e6(0x166)]+_0x22b7e6(0x17a)+CLI_BIN_NAME+_0x22b7e6(0x159));}function verifyUpdatedBuiltinSkill(_0x4b49b4){const _0x1e5054=a47_0x3a3251,_0xa33f85=inspectInstalledBuiltinSkillVersion(_0x4b49b4);if(_0xa33f85[_0x1e5054(0x18c)]===_0x1e5054(0x165)){console[_0x1e5054(0x17e)](a47_0x2acea7['gray'](_0x1e5054(0x155)+_0x4b49b4+'\x20is\x20up\x20to\x20date.'));return;}const _0x391276=_0xa33f85['skillVersion']?'expected\x20'+_0x4b49b4+_0x1e5054(0x14b)+_0xa33f85[_0x1e5054(0x164)]:_0x1e5054(0x15b)+_0x4b49b4+_0x1e5054(0x18b)+_0xa33f85[_0x1e5054(0x18c)];throw CliErrors[_0x1e5054(0x15a)](_0x1e5054(0x156)+_0x4b49b4+_0x1e5054(0x16e)+_0x391276,_0x1e5054(0x17c)+_0xa33f85[_0x1e5054(0x166)]+_0x1e5054(0x17a)+CLI_BIN_NAME+_0x1e5054(0x159));}async function execute(_0x56fa64){const _0x408d55=a47_0x3a3251;await validateUpdateFlags(_0x56fa64);const _0x5397f1=getCurrentVersion();console[_0x408d55(0x17e)](_0x408d55(0x18e)+_0x5397f1);const _0x25a2ac=a47_0x40890d(_0x408d55(0x149))['start'](),_0x50c6ab=await resolveTargetVersion(_0x56fa64);if(!_0x50c6ab){const _0xad1dda=_0x56fa64[_0x408d55(0x180)]('beta')?_0x408d55(0x194):_0x408d55(0x17b);return _0x25a2ac[_0x408d55(0x18f)](_0xad1dda),console['log'](a47_0x2acea7['gray'](_0x408d55(0x186)+NPM_PACKAGE_NAME+_0x408d55(0x17f))),{'ok':![],'message':_0xad1dda};}const _0x5ac0ac=a47_0x4bee9d[_0x408d55(0x191)](VERSION),_0x54a0eb=a47_0x4bee9d[_0x408d55(0x191)](_0x50c6ab['version']);if(!_0x5ac0ac||!_0x54a0eb)return _0x25a2ac[_0x408d55(0x18f)]('Version\x20comparison\x20failed'),{'ok':![],'message':_0x408d55(0x175)};if(!shouldInstallTarget(_0x5ac0ac,_0x50c6ab)){const _0x15efd7=_0x50c6ab[_0x408d55(0x173)]===_0x408d55(0x17d)?_0x408d55(0x178)+_0x50c6ab['version']+')':a47_0x4bee9d['gt'](_0x5ac0ac,_0x54a0eb)?'Current\x20version\x20v'+_0x5397f1+'\x20is\x20newer\x20than\x20npm\x20latest\x20v'+_0x50c6ab[_0x408d55(0x17d)]:'Already\x20up\x20to\x20date\x20(v'+_0x50c6ab[_0x408d55(0x17d)]+')';return _0x25a2ac[_0x408d55(0x190)](_0x15efd7),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x25a2ac[_0x408d55(0x19a)](getInstallPlanLabel(_0x5397f1,_0x50c6ab));const _0x4cc215=detectPackageManager(),_0x4c251c=_0x4cc215===_0x408d55(0x18a)?resolveNpmBin(_0x408d55(0x18a)):_0x4cc215,_0xcfaf16=a47_0x40890d(_0x408d55(0x172)+_0x4cc215+_0x408d55(0x188))[_0x408d55(0x187)]();try{await execa(_0x4c251c,[_0x408d55(0x157),'-g',NPM_PACKAGE_NAME+'@'+_0x50c6ab[_0x408d55(0x17d)]],{'stdio':_0x408d55(0x198)}),_0xcfaf16[_0x408d55(0x190)]('Updated\x20to\x20v'+_0x50c6ab[_0x408d55(0x17d)]),console[_0x408d55(0x17e)](a47_0x2acea7['gray']('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.'));}catch(_0x141856){return _0xcfaf16[_0x408d55(0x18f)](_0x408d55(0x197)),console[_0x408d55(0x199)](a47_0x2acea7[_0x408d55(0x14a)]('\x20\x20'+_0x141856['message'])),console[_0x408d55(0x17e)](a47_0x2acea7['gray'](_0x408d55(0x148)+_0x4cc215+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x50c6ab['version'])),{'ok':![],'message':_0x141856['message']};}return verifyUpdatedBuiltinSkill(_0x50c6ab['version']),{'ok':!![]};}export const updateDefinition={'service':'update','command':a47_0x3a3251(0x153),'description':a47_0x3a3251(0x18d),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a47_0x49e033=a47_0x5470;(function(_0x597ca6,_0x2bf716){const _0x617167=a47_0x5470,_0x3c2948=_0x597ca6();while(!![]){try{const _0x3031f2=-parseInt(_0x617167(0x1b2))/0x1+-parseInt(_0x617167(0x167))/0x2+-parseInt(_0x617167(0x181))/0x3*(parseInt(_0x617167(0x18b))/0x4)+parseInt(_0x617167(0x199))/0x5+-parseInt(_0x617167(0x161))/0x6*(parseInt(_0x617167(0x177))/0x7)+-parseInt(_0x617167(0x191))/0x8*(parseInt(_0x617167(0x1a5))/0x9)+parseInt(_0x617167(0x19c))/0xa*(parseInt(_0x617167(0x1a7))/0xb);if(_0x3031f2===_0x2bf716)break;else _0x3c2948['push'](_0x3c2948['shift']());}catch(_0x14a333){_0x3c2948['push'](_0x3c2948['shift']());}}}(a47_0x10c2,0x75231));import a47_0x5f3680 from'chalk';import a47_0x152e94 from'ora';import a47_0xa2cea4 from'semver';function a47_0x10c2(){const _0x4d6989=['expected\x20','map','bool','trim','Updated\x20to\x20v','691604DgBLDl','info','Update\x20available:\x20','source','object','yellow','24ltfsQl','current','state','latest','Version\x20comparison\x20failed','read','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','pipe','2119535CiOmVc','\x20\x20CLI\x20Built-in\x20Skill\x20','slice','10dsVhuE','Install\x20a\x20specific\x20CLI\x20version','green','...','timeout','log','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','red','Beta\x20version:\x20','1935756nKQFBw','entries','35608199qaxfhL','succeed','valid','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','fromEntries','validation',',\x20then\x20verify\x20with:\x20','start','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','includes','str','687114MXLUJu','execPath','bun','Current\x20version\x20v',']:\x20','\x20install\x20-g\x20','run','894kQdTcm','Checking\x20for\x20updates...','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','boolean','beta','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','1617850mqcJGB','CLI\x20updated\x20to\x20v','\x20is\x20up\x20to\x20date.','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','message','Already\x20up\x20to\x20date\x20(v','toLowerCase','error','unknown','code','npm','version','repairCommand','@latest','Requested\x20version:\x20','Run:\x20','40733bCtqDL','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','skillVersion','\x20→\x20','Already\x20on\x20requested\x20version\x20(v','length','Update\x20failed','string','gray','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','3ebbyfV','Invalid\x20version:\x20','update',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','fail'];a47_0x10c2=function(){return _0x4d6989;};return a47_0x10c2();}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 _0x24cee1=a47_0x5470;return GIT_COMMIT!==_0x24cee1(0x16f)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x24cee1(0x19b)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x2bdaac=a47_0x5470,_0x40202c=process[_0x2bdaac(0x1b3)][_0x2bdaac(0x16d)]();if(_0x40202c[_0x2bdaac(0x1b0)](_0x2bdaac(0x1b4)))return _0x2bdaac(0x1b4);return _0x2bdaac(0x171);}const updateFlags=[{'name':a47_0x49e033(0x165),'type':a47_0x49e033(0x164),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a47_0x49e033(0x172),'type':a47_0x49e033(0x17e),'description':a47_0x49e033(0x19d)}];function a47_0x5470(_0x268605,_0x415f8a){_0x268605=_0x268605-0x15f;const _0x10c218=a47_0x10c2();let _0x547047=_0x10c218[_0x268605];return _0x547047;}function getRequestedVersion(_0x3de33c){const _0x274fc7=a47_0x49e033;return _0x3de33c[_0x274fc7(0x1b1)](_0x274fc7(0x172))[_0x274fc7(0x189)]();}async function validateUpdateFlags(_0x35f4b9){const _0x180a49=a47_0x49e033,_0x411b1b=_0x35f4b9[_0x180a49(0x188)]('beta'),_0x49ba50=getRequestedVersion(_0x35f4b9);if(_0x411b1b&&_0x49ba50)throw CliErrors[_0x180a49(0x1ac)](_0x180a49(0x163),_0x180a49(0x1af));if(_0x49ba50&&!a47_0xa2cea4[_0x180a49(0x1a9)](_0x49ba50))throw CliErrors[_0x180a49(0x1ac)](_0x180a49(0x182)+_0x49ba50,_0x180a49(0x180));}async function fetchNpmDistTags(){const _0x38ec95=a47_0x49e033;try{const _0x45c131=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0x38ec95(0x1a0)](0x2710)});if(!_0x45c131['ok'])return null;const _0x1d090d=await _0x45c131['json']();if(!_0x1d090d||typeof _0x1d090d!==_0x38ec95(0x18f))return null;return Object[_0x38ec95(0x1ab)](Object[_0x38ec95(0x1a6)](_0x1d090d)['filter'](([,_0x23bf7e])=>typeof _0x23bf7e===_0x38ec95(0x17e)&&_0x23bf7e[_0x38ec95(0x189)]()[_0x38ec95(0x17c)]>0x0)[_0x38ec95(0x187)](([_0x318423,_0x272037])=>[_0x318423,String(_0x272037)[_0x38ec95(0x189)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x4f0abb){const _0x1e38aa=await fetchNpmDistTags();return _0x1e38aa?.[_0x4f0abb]??null;}async function fetchLatestVersion(){const _0x47b602=a47_0x49e033;return fetchNpmDistTagVersion(_0x47b602(0x194));}async function resolveTargetVersion(_0x4d054b){const _0xf4a33d=a47_0x49e033,_0x4ad106=getRequestedVersion(_0x4d054b);if(_0x4ad106)return{'version':_0x4ad106,'source':_0xf4a33d(0x172)};if(_0x4d054b[_0xf4a33d(0x188)]('beta')){const _0x2bc44c=await fetchNpmDistTagVersion('beta');if(!_0x2bc44c)return null;return{'version':_0x2bc44c,'source':'beta'};}const _0x5ac4c2=await fetchLatestVersion();if(!_0x5ac4c2)return null;return{'version':_0x5ac4c2,'source':_0xf4a33d(0x194)};}function shouldInstallTarget(_0x5ad810,_0x285309){const _0x2957f4=a47_0x49e033;if(_0x285309[_0x2957f4(0x18e)]===_0x2957f4(0x172)||_0x285309['source']===_0x2957f4(0x165))return!a47_0xa2cea4['eq'](_0x5ad810,_0x285309[_0x2957f4(0x172)]);return a47_0xa2cea4['lt'](_0x5ad810,_0x285309[_0x2957f4(0x172)]);}function getInstallPlanLabel(_0x16b782,_0x3c53b6){const _0x3dba75=a47_0x49e033;switch(_0x3c53b6[_0x3dba75(0x18e)]){case'beta':return _0x3dba75(0x1a4)+a47_0x5f3680[_0x3dba75(0x190)](_0x16b782)+_0x3dba75(0x17a)+a47_0x5f3680[_0x3dba75(0x19e)](_0x3c53b6[_0x3dba75(0x172)]);case _0x3dba75(0x172):return _0x3dba75(0x175)+a47_0x5f3680['yellow'](_0x16b782)+_0x3dba75(0x17a)+a47_0x5f3680['green'](_0x3c53b6[_0x3dba75(0x172)]);case _0x3dba75(0x194):default:return _0x3dba75(0x18d)+a47_0x5f3680[_0x3dba75(0x190)](_0x16b782)+_0x3dba75(0x17a)+a47_0x5f3680[_0x3dba75(0x19e)](_0x3c53b6['version']);}}function repairCurrentBuiltinSkill(){const _0xb8fe7f=a47_0x49e033;console[_0xb8fe7f(0x1a1)](a47_0x5f3680[_0xb8fe7f(0x17f)]('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x18a6fe=installBuiltinSkill();if(_0x18a6fe['ok']){console[_0xb8fe7f(0x1a1)](a47_0x5f3680[_0xb8fe7f(0x17f)](_0xb8fe7f(0x19a)+_0x18a6fe[_0xb8fe7f(0x179)]+'\x20is\x20up\x20to\x20date.'));return;}throw CliErrors['apiError'](_0xb8fe7f(0x166)+_0x18a6fe[_0xb8fe7f(0x170)]+_0xb8fe7f(0x1b6)+(_0x18a6fe[_0xb8fe7f(0x16e)]||_0xb8fe7f(0x16f)),_0xb8fe7f(0x176)+_0x18a6fe[_0xb8fe7f(0x173)]+_0xb8fe7f(0x1ad)+CLI_BIN_NAME+'\x20doctor');}function verifyUpdatedBuiltinSkill(_0x16bcdf){const _0x396b02=a47_0x49e033,_0xc14e16=inspectInstalledBuiltinSkillVersion(_0x16bcdf);if(_0xc14e16[_0x396b02(0x193)]===_0x396b02(0x192)){console[_0x396b02(0x1a1)](a47_0x5f3680[_0x396b02(0x17f)](_0x396b02(0x19a)+_0x16bcdf+_0x396b02(0x169)));return;}const _0x425af4=_0xc14e16[_0x396b02(0x179)]?_0x396b02(0x186)+_0x16bcdf+',\x20found\x20'+_0xc14e16[_0x396b02(0x179)]:_0x396b02(0x186)+_0x16bcdf+',\x20state\x20'+_0xc14e16[_0x396b02(0x193)];throw CliErrors['apiError'](_0x396b02(0x168)+_0x16bcdf+_0x396b02(0x184)+_0x425af4,_0x396b02(0x176)+_0xc14e16[_0x396b02(0x173)]+_0x396b02(0x1ad)+CLI_BIN_NAME+'\x20doctor');}async function execute(_0x58c28d){const _0x5c14cc=a47_0x49e033;await validateUpdateFlags(_0x58c28d);const _0x178e11=getCurrentVersion();console['log']('Current\x20version:\x20'+_0x178e11);const _0x3db641=a47_0x152e94(_0x5c14cc(0x162))['start'](),_0x2ee962=await resolveTargetVersion(_0x58c28d);if(!_0x2ee962){const _0x8ba13e=_0x58c28d[_0x5c14cc(0x188)](_0x5c14cc(0x165))?_0x5c14cc(0x1aa):_0x5c14cc(0x1a2);return _0x3db641[_0x5c14cc(0x185)](_0x8ba13e),console[_0x5c14cc(0x1a1)](a47_0x5f3680['gray'](_0x5c14cc(0x16a)+NPM_PACKAGE_NAME+_0x5c14cc(0x174))),{'ok':![],'message':_0x8ba13e};}const _0x5aa0ba=a47_0xa2cea4[_0x5c14cc(0x1a9)](VERSION),_0x39f653=a47_0xa2cea4[_0x5c14cc(0x1a9)](_0x2ee962[_0x5c14cc(0x172)]);if(!_0x5aa0ba||!_0x39f653)return _0x3db641['fail'](_0x5c14cc(0x195)),{'ok':![],'message':_0x5c14cc(0x195)};if(!shouldInstallTarget(_0x5aa0ba,_0x2ee962)){const _0x31f991=_0x2ee962['source']==='version'?_0x5c14cc(0x17b)+_0x2ee962[_0x5c14cc(0x172)]+')':a47_0xa2cea4['gt'](_0x5aa0ba,_0x39f653)?_0x5c14cc(0x1b5)+_0x178e11+'\x20is\x20newer\x20than\x20npm\x20latest\x20v'+_0x2ee962[_0x5c14cc(0x172)]:_0x5c14cc(0x16c)+_0x2ee962[_0x5c14cc(0x172)]+')';return _0x3db641[_0x5c14cc(0x1a8)](_0x31f991),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x3db641[_0x5c14cc(0x18c)](getInstallPlanLabel(_0x178e11,_0x2ee962));const _0x35f5fc=detectPackageManager(),_0x2a5eb3=_0x35f5fc===_0x5c14cc(0x171)?resolveNpmBin(_0x5c14cc(0x171)):_0x35f5fc,_0x2e7160=a47_0x152e94('Updating\x20via\x20'+_0x35f5fc+_0x5c14cc(0x19f))[_0x5c14cc(0x1ae)]();try{await execa(_0x2a5eb3,['install','-g',NPM_PACKAGE_NAME+'@'+_0x2ee962[_0x5c14cc(0x172)]],{'stdio':_0x5c14cc(0x198)}),_0x2e7160['succeed'](_0x5c14cc(0x18a)+_0x2ee962['version']),console[_0x5c14cc(0x1a1)](a47_0x5f3680[_0x5c14cc(0x17f)](_0x5c14cc(0x197)));}catch(_0x3df497){return _0x2e7160[_0x5c14cc(0x185)](_0x5c14cc(0x17d)),console[_0x5c14cc(0x16e)](a47_0x5f3680[_0x5c14cc(0x1a3)]('\x20\x20'+_0x3df497[_0x5c14cc(0x16b)])),console[_0x5c14cc(0x1a1)](a47_0x5f3680[_0x5c14cc(0x17f)]('\x20\x20Try\x20manually:\x20'+_0x35f5fc+_0x5c14cc(0x15f)+NPM_PACKAGE_NAME+'@'+_0x2ee962[_0x5c14cc(0x172)])),{'ok':![],'message':_0x3df497[_0x5c14cc(0x16b)]};}return verifyUpdatedBuiltinSkill(_0x2ee962[_0x5c14cc(0x172)]),{'ok':!![]};}export const updateDefinition={'service':a47_0x49e033(0x183),'command':a47_0x49e033(0x160),'description':a47_0x49e033(0x178),'risk':a47_0x49e033(0x196),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3db533,_0x4d05bf){const _0x38f8a8=a48_0x4812,_0x28d4d0=_0x3db533();while(!![]){try{const _0x5e6ff7=-parseInt(_0x38f8a8(0x73))/0x1*(parseInt(_0x38f8a8(0x72))/0x2)+parseInt(_0x38f8a8(0x69))/0x3*(-parseInt(_0x38f8a8(0x6f))/0x4)+-parseInt(_0x38f8a8(0x6b))/0x5+parseInt(_0x38f8a8(0x6c))/0x6*(parseInt(_0x38f8a8(0x74))/0x7)+-parseInt(_0x38f8a8(0x70))/0x8*(-parseInt(_0x38f8a8(0x6a))/0x9)+parseInt(_0x38f8a8(0x71))/0xa*(-parseInt(_0x38f8a8(0x6d))/0xb)+parseInt(_0x38f8a8(0x6e))/0xc;if(_0x5e6ff7===_0x4d05bf)break;else _0x28d4d0['push'](_0x28d4d0['shift']());}catch(_0x40b006){_0x28d4d0['push'](_0x28d4d0['shift']());}}}(a48_0x3d94,0xe14a6));function a48_0x4812(_0x3c37d6,_0x3cf1f6){_0x3c37d6=_0x3c37d6-0x69;const _0x3d94f2=a48_0x3d94();let _0x48125f=_0x3d94f2[_0x3c37d6];return _0x48125f;}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];function a48_0x3d94(){const _0x5e4eb7=['18282PaKsHK','4531008uxhAvA','92108QvxrmI','12712088ZZezWV','7790FotzxF','1412DZsJct','8XqFCud','11339027lNiXNW','6EkAdWq','9beQNjm','6586330QZZEBM','6kfqPqY'];a48_0x3d94=function(){return _0x5e4eb7;};return a48_0x3d94();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a49_0x3fb914=a49_0x47ec;(function(_0x4ed49a,_0x2c25c6){const _0x2fd376=a49_0x47ec,_0x3f377a=_0x4ed49a();while(!![]){try{const _0x4fcd92=parseInt(_0x2fd376(0xa3))/0x1+-parseInt(_0x2fd376(0xb2))/0x2+parseInt(_0x2fd376(0xb6))/0x3*(-parseInt(_0x2fd376(0xa4))/0x4)+-parseInt(_0x2fd376(0xba))/0x5*(parseInt(_0x2fd376(0xac))/0x6)+parseInt(_0x2fd376(0xbb))/0x7+-parseInt(_0x2fd376(0xb5))/0x8*(-parseInt(_0x2fd376(0xa7))/0x9)+parseInt(_0x2fd376(0xa5))/0xa*(parseInt(_0x2fd376(0xa9))/0xb);if(_0x4fcd92===_0x2c25c6)break;else _0x3f377a['push'](_0x3f377a['shift']());}catch(_0x33a62f){_0x3f377a['push'](_0x3f377a['shift']());}}}(a49_0x14e5,0x647a0));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a49_0x47ec(_0x1b8493,_0x15fedc){_0x1b8493=_0x1b8493-0xa3;const _0x14e52f=a49_0x14e5();let _0x47eca5=_0x14e52f[_0x1b8493];return _0x47eca5;}function a49_0x14e5(){const _0x4ff760=['str','351957cShJbe','331060AiJdKo','5986810IxKiLf','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','144iJUmYI','name','11nYKWhN','operation','tableName','6rkhMlZ','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','skip-imports','codegen','appCode','read','1521664GaSBfa','Omit\x20import\x20statements\x20from\x20generated\x20code','alias','321656CwAXGe','21tuuJgz','bool','sdk','string','3034915iZbUeA','5353404VmRaNv'];a49_0x14e5=function(){return _0x4ff760;};return a49_0x14e5();}export const codegenSdk={'service':a49_0x3fb914(0xaf),'command':a49_0x3fb914(0xb8),'description':a49_0x3fb914(0xad),'risk':a49_0x3fb914(0xb1),'flags':[CODE_FLAG_OPTIONAL,{'name':a49_0x3fb914(0xb4),'type':a49_0x3fb914(0xb9),'description':a49_0x3fb914(0xa6)},{'name':a49_0x3fb914(0xaa),'type':a49_0x3fb914(0xb9),'required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':a49_0x3fb914(0xae),'type':'boolean','description':a49_0x3fb914(0xb3)}],async 'execute'(_0x29b380){const _0x15428b=a49_0x3fb914,{dataset:_0x47ae4f,operation:_0x5ae4c4}=await getOperationDetail(_0x29b380[_0x15428b(0xb0)],_0x29b380['str']('code'),_0x29b380[_0x15428b(0xbc)]('operation')),_0x4b4537=generateSdkCode(_0x47ae4f,_0x5ae4c4,{'includeImports':!_0x29b380[_0x15428b(0xb7)](_0x15428b(0xae))});return{'ok':!![],'data':{'dataset':{'name':_0x47ae4f[_0x15428b(0xa8)],'code':_0x47ae4f['code'],'tableName':_0x47ae4f[_0x15428b(0xab)]},'operation':_0x29b380[_0x15428b(0xbc)]('operation'),'code':_0x4b4537}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a50_0x49e2d5=a50_0x149d;function a50_0x1ec4(){const _0x9afe0d=['14672HeTkFW','Omit\x20import\x20statements\x20from\x20generated\x20code','sqlCode','codegen','string','bff','no-imports','10bisFKB','5920565brEvzh','sdk','str','42UHXjPv','appCode','boolean','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','31440046iQaoda','55540qkcRcw','16XixlMc','sqlName','sqlcode','target','1010538trcUsP','1352556yAFsCI','3437SadVYO','782373MmybvR'];a50_0x1ec4=function(){return _0x9afe0d;};return a50_0x1ec4();}(function(_0x2b25c4,_0x51ec5f){const _0x2d4547=a50_0x149d,_0x347511=_0x2b25c4();while(!![]){try{const _0x4fb1a7=parseInt(_0x2d4547(0x1bc))/0x1*(-parseInt(_0x2d4547(0x1b7))/0x2)+parseInt(_0x2d4547(0x1ab))/0x3*(-parseInt(_0x2d4547(0x1bd))/0x4)+parseInt(_0x2d4547(0x1b4))/0x5+parseInt(_0x2d4547(0x1c1))/0x6+-parseInt(_0x2d4547(0x1c3))/0x7*(parseInt(_0x2d4547(0x1ac))/0x8)+-parseInt(_0x2d4547(0x1c2))/0x9+-parseInt(_0x2d4547(0x1b3))/0xa*(-parseInt(_0x2d4547(0x1bb))/0xb);if(_0x4fb1a7===_0x51ec5f)break;else _0x347511['push'](_0x347511['shift']());}catch(_0x8707a5){_0x347511['push'](_0x347511['shift']());}}}(a50_0x1ec4,0xe80a8));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';function a50_0x149d(_0x55330a,_0x34157b){_0x55330a=_0x55330a-0x1ab;const _0x1ec40f=a50_0x1ec4();let _0x149d25=_0x1ec40f[_0x55330a];return _0x149d25;}import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a50_0x49e2d5(0x1af),'command':'sql','description':'Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','risk':'read','flags':[SQLCODE_FLAG,{'name':'target','type':a50_0x49e2d5(0x1b0),'description':a50_0x49e2d5(0x1ba),'default':a50_0x49e2d5(0x1b5),'enum':[a50_0x49e2d5(0x1b5),a50_0x49e2d5(0x1b1)]},{'name':a50_0x49e2d5(0x1b2),'type':a50_0x49e2d5(0x1b9),'description':a50_0x49e2d5(0x1ad)}],async 'execute'(_0x212b43){const _0x191c5c=a50_0x49e2d5,_0x4f8df9=await getSqlQueryInfo(_0x212b43[_0x191c5c(0x1b8)],_0x212b43['str'](_0x191c5c(0x1bf))),_0x365465=_0x212b43[_0x191c5c(0x1b6)](_0x191c5c(0x1c0))||_0x191c5c(0x1b5),_0x1f7952=generateSqlCodeTemplate(_0x4f8df9,{'target':_0x365465,'includeImports':!_0x212b43['bool']('no-imports')});return{'ok':!![],'data':{'sqlCode':_0x4f8df9[_0x191c5c(0x1ae)],'sqlName':_0x4f8df9[_0x191c5c(0x1be)],'target':_0x365465,'code':_0x1f7952}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5001ee,_0x42097e){const _0x5c4cb3=a51_0x26d1,_0x2d1ccf=_0x5001ee();while(!![]){try{const _0x3da2cc=parseInt(_0x5c4cb3(0x93))/0x1+parseInt(_0x5c4cb3(0x98))/0x2*(parseInt(_0x5c4cb3(0x89))/0x3)+parseInt(_0x5c4cb3(0x87))/0x4*(-parseInt(_0x5c4cb3(0x84))/0x5)+parseInt(_0x5c4cb3(0x92))/0x6+parseInt(_0x5c4cb3(0x94))/0x7+-parseInt(_0x5c4cb3(0x7f))/0x8*(-parseInt(_0x5c4cb3(0x91))/0x9)+-parseInt(_0x5c4cb3(0x99))/0xa;if(_0x3da2cc===_0x42097e)break;else _0x2d1ccf['push'](_0x2d1ccf['shift']());}catch(_0x4ad041){_0x2d1ccf['push'](_0x2d1ccf['shift']());}}}(a51_0x97bd,0xd6140));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs,normalizeStoredDefaultApp}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x522a75=a51_0x26d1;return[{'name':_0x522a75(0x82),'type':_0x522a75(0x8b),'description':_0x522a75(0x79),'required':!![]},{'name':_0x522a75(0x9b),'type':'boolean','description':_0x522a75(0x8f),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x5597cc=a51_0x26d1;return[{'name':'global','type':_0x5597cc(0x86),'description':_0x5597cc(0x8f),'default':![]}];}function a51_0x97bd(){const _0x15ac5d=['8689185OQpjgc','4872540AguCGk','1748708MMlBrF','8604470UZDFkF','globalConfig','flagMissing','Missing\x20app\x20name.','20614CVcMBb','38320380IlRAkK','Usage:\x20','global','projectConfig','str','trim','defaultApp','args','App\x20code','validation','keys','length','App\x20\x22','\x20<name>','8WgHruD','\x20<name>\x20--appcode\x20<code>','apps','appcode','Removed\x20app\x20\x22','30dgugSv','Added','boolean','1054876gvPLcO','\x20Remaining\x20app\x20\x22','447JGUZsS','both','string','project','Updated','\x20config.','Use\x20global\x20config\x20scope','object'];a51_0x97bd=function(){return _0x15ac5d;};return a51_0x97bd();}export async function validateAppName(_0x5d5ec9,_0x1ddc52){const _0x198a56=a51_0x26d1,_0x390f6e=_0x5d5ec9[_0x198a56(0xa0)][0x0]?.[_0x198a56(0x9e)]();if(!_0x390f6e)throw CliErrors['validation']('Missing\x20app\x20name.',_0x198a56(0x9a)+CLI_BIN_NAME+'\x20'+_0x1ddc52+_0x198a56(0x7e));}function a51_0x26d1(_0x2533f9,_0x2fb8e4){_0x2533f9=_0x2533f9-0x79;const _0x97bdc7=a51_0x97bd();let _0x26d119=_0x97bdc7[_0x2533f9];return _0x26d119;}export async function runAppAdd(_0x4d4243,_0x147676){const _0x3e1837=a51_0x26d1,_0x840e66=_0x4d4243[_0x3e1837(0xa0)][0x0]?.[_0x3e1837(0x9e)]();if(!_0x840e66)throw CliErrors[_0x3e1837(0x7a)](_0x3e1837(0x97),_0x3e1837(0x9a)+CLI_BIN_NAME+'\x20'+_0x147676+_0x3e1837(0x80));const _0x2b3b38=_0x4d4243['str']('appcode');if(!_0x2b3b38)throw CliErrors[_0x3e1837(0x96)](_0x3e1837(0x82),_0x3e1837(0x9a)+CLI_BIN_NAME+'\x20'+_0x147676+_0x3e1837(0x80));const _0x2e6162={'global':_0x4d4243['bool'](_0x3e1837(0x9b))},_0x2a2cf0=readConfig(_0x2e6162);if(!_0x2a2cf0[_0x3e1837(0x81)])_0x2a2cf0['apps']={};const _0x4d3ca4={'appcode':_0x2b3b38,...collectAppProfileOverrides(_0x2dccc8=>_0x4d4243[_0x3e1837(0x9d)](_0x2dccc8))},_0x1906a2=_0x2a2cf0['apps'],_0x5aebe7=Object[_0x3e1837(0x7b)](_0x1906a2),_0x106009=typeof _0x2a2cf0[_0x3e1837(0x9f)]===_0x3e1837(0x8b)&&_0x1906a2[_0x2a2cf0[_0x3e1837(0x9f)]]?_0x2a2cf0[_0x3e1837(0x9f)]:_0x5aebe7[_0x3e1837(0x7c)]===0x1?_0x5aebe7[0x0]:undefined,_0x2163ba=!!_0x1906a2[_0x840e66];_0x1906a2[_0x840e66]=_0x4d3ca4;const _0x44bbab=normalizeStoredDefaultApp(_0x2a2cf0,_0x106009);writeConfig(_0x2a2cf0,_0x2e6162);const _0x57cf87=!_0x2163ba&&_0x44bbab?'\x20Default\x20app\x20is\x20\x22'+_0x44bbab+'\x22.':'',_0x1e996e=(_0x2163ba?_0x3e1837(0x8d):_0x3e1837(0x85))+'\x20app\x20\x22'+_0x840e66+'\x22\x20(appcode:\x20'+_0x2b3b38+')'+scopeLabel(_0x2e6162)+'.'+_0x57cf87;return{'ok':!![],'message':_0x1e996e};}export async function runAppRemove(_0x3ed5fb,_0x413920){const _0x4446bf=a51_0x26d1,_0x1a7eb0=_0x3ed5fb[_0x4446bf(0xa0)][0x0]?.[_0x4446bf(0x9e)]();if(!_0x1a7eb0)throw CliErrors[_0x4446bf(0x7a)](_0x4446bf(0x97),_0x4446bf(0x9a)+CLI_BIN_NAME+'\x20'+_0x413920+'\x20<name>\x20[--global]');const _0x4af260=_0x3ed5fb['bool'](_0x4446bf(0x9b)),{config:_0x3bcfa7,layers:_0x281551}=readRawConfigWithLayers(),_0x4ce73d=_0x3bcfa7[_0x4446bf(0x81)]??{};if(!_0x4ce73d[_0x1a7eb0])throw CliErrors['validation'](_0x4446bf(0x7d)+_0x1a7eb0+'\x22\x20not\x20found.');const _0x277de7=_0x281551[_0x4446bf(0x95)][_0x4446bf(0x81)]&&typeof _0x281551[_0x4446bf(0x95)][_0x4446bf(0x81)]===_0x4446bf(0x90)?_0x281551[_0x4446bf(0x95)][_0x4446bf(0x81)]:{},_0x4fc590=_0x281551['projectConfig'][_0x4446bf(0x81)]&&typeof _0x281551[_0x4446bf(0x9c)][_0x4446bf(0x81)]===_0x4446bf(0x90)?_0x281551[_0x4446bf(0x9c)]['apps']:{},_0x141258=appDefinedIn(_0x1a7eb0,_0x277de7,_0x4fc590),_0x287ac3=resolveAppScopeForWrite(_0x1a7eb0,_0x4af260,_0x281551),_0x4eff3a={'global':_0x287ac3===_0x4446bf(0x9b)},_0x1392c0=readConfig(_0x4eff3a),_0xe280da=_0x1392c0[_0x4446bf(0x81)];if(!_0xe280da||!_0xe280da[_0x1a7eb0])throw CliErrors[_0x4446bf(0x7a)]('App\x20\x22'+_0x1a7eb0+'\x22\x20not\x20found.');delete _0xe280da[_0x1a7eb0];let _0x243dcb='';const _0x52bc84=typeof _0x1392c0[_0x4446bf(0x9f)]===_0x4446bf(0x8b)?_0x1392c0[_0x4446bf(0x9f)]:undefined,_0x468f26=Object[_0x4446bf(0x7b)](_0xe280da),_0x5dc0c4=_0x52bc84===_0x1a7eb0?_0x468f26[0x0]:_0x52bc84,_0x465f5d=normalizeStoredDefaultApp(_0x1392c0,_0x5dc0c4);if(_0x52bc84===_0x1a7eb0&&_0x468f26[_0x4446bf(0x7c)]===0x1)_0x243dcb=_0x4446bf(0x88)+_0x468f26[0x0]+'\x22\x20is\x20selected\x20automatically.';else _0x52bc84===_0x1a7eb0&&_0x465f5d&&(_0x243dcb='\x20Default\x20app\x20changed\x20to\x20\x22'+_0x465f5d+'\x22.');Object['keys'](_0xe280da)[_0x4446bf(0x7c)]===0x0&&(delete _0x1392c0[_0x4446bf(0x81)],delete _0x1392c0[_0x4446bf(0x9f)]);writeConfig(_0x1392c0,_0x4eff3a);const _0x582f55=_0x141258===_0x4446bf(0x8a)?'\x20Note:\x20app\x20\x22'+_0x1a7eb0+'\x22\x20still\x20defined\x20in\x20'+(_0x287ac3===_0x4446bf(0x8c)?_0x4446bf(0x9b):_0x4446bf(0x8c))+_0x4446bf(0x8e):'';return{'ok':!![],'message':_0x4446bf(0x83)+_0x1a7eb0+'\x22'+scopeLabel(_0x4eff3a)+'.'+_0x243dcb+_0x582f55};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1942e6,_0x5c3e20){const _0x9e5bdc=a52_0x1f17,_0x30c1ed=_0x1942e6();while(!![]){try{const _0x423af8=parseInt(_0x9e5bdc(0x1ca))/0x1+parseInt(_0x9e5bdc(0x1c6))/0x2+-parseInt(_0x9e5bdc(0x1d0))/0x3+-parseInt(_0x9e5bdc(0x1d4))/0x4*(-parseInt(_0x9e5bdc(0x1bf))/0x5)+-parseInt(_0x9e5bdc(0x1c4))/0x6*(parseInt(_0x9e5bdc(0x1c7))/0x7)+-parseInt(_0x9e5bdc(0x1bd))/0x8*(-parseInt(_0x9e5bdc(0x1d9))/0x9)+parseInt(_0x9e5bdc(0x1cd))/0xa*(-parseInt(_0x9e5bdc(0x1ce))/0xb);if(_0x423af8===_0x5c3e20)break;else _0x30c1ed['push'](_0x30c1ed['shift']());}catch(_0x17415f){_0x30c1ed['push'](_0x30c1ed['shift']());}}}(a52_0x1d8f,0x95899));import{input,checkbox,select}from'@inquirer/prompts';import a52_0x90bc32 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';function a52_0x1d8f(){const _0x38f926=['4429744ejXxcl','(Skip;\x20configure\x20later)','cyan','skip','manual','1746567OUAgSO','appCode','✎\x20Enter\x20manually','Invalid\x20App\x20Code','\x20\x20(','✎\x20Enter\x20appcode\x20manually','appName','(No\x20login\x20session.\x20Enter\x20an\x20App\x20Code\x20manually\x20or\x20skip.)','Fetching\x20available\x20apps...','\x0aNo\x20available\x20apps\x20found.','8BvFbzU','(Skip;\x20configure\x20later\x20with\x20config\x20set\x20appcode)','5zEFaYn','yellow','\x0aCould\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','message','Select\x20the\x20app\x20to\x20bind:','1223682vMsqZX','valid','511640pAAshq','7NcauSf','custom','\x20apps.\x20Select\x20with\x20space,\x20a=all,\x20i=invert:','484953IScWXo','trim','includes','100370FAZkEo','880JIdHBw','map','1268580BFqNSg','gray','Found\x20','length'];a52_0x1d8f=function(){return _0x38f926;};return a52_0x1d8f();}function a52_0x1f17(_0x3bdcde,_0x4f56e1){_0x3bdcde=_0x3bdcde-0x1b4;const _0x1d8fb6=a52_0x1d8f();let _0x1f1742=_0x1d8fb6[_0x3bdcde];return _0x1f1742;}import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x14aab5=a52_0x1f17,_0x3523af=await input({'message':'App\x20Code:','validate':_0x541984=>{const _0x30a217=a52_0x1f17,_0x572476=validateAppcode(_0x541984[_0x30a217(0x1cb)]());return _0x572476[_0x30a217(0x1c5)]||_0x572476[_0x30a217(0x1c2)]||_0x30a217(0x1b6);}});return _0x3523af[_0x14aab5(0x1cb)]();}export async function promptAppSelection(_0x5ef2ea){const _0x140871=a52_0x1f17,_0x5eabe4=[{'name':a52_0x90bc32[_0x140871(0x1c0)](_0x140871(0x1b8)),'value':-0x1},..._0x5ef2ea[_0x140871(0x1cf)]((_0x3e7972,_0x348e5a)=>({'name':_0x3e7972[_0x140871(0x1b9)]+'\x20\x20'+a52_0x90bc32[_0x140871(0x1d1)]('('+_0x3e7972[_0x140871(0x1b4)]+')'),'value':_0x348e5a}))],_0x3fd964=await checkbox({'message':_0x140871(0x1d2)+a52_0x90bc32[_0x140871(0x1d6)](_0x5ef2ea[_0x140871(0x1d3)])+_0x140871(0x1c9),'choices':_0x5eabe4,'loop':![]});if(_0x3fd964[_0x140871(0x1cc)](-0x1))return'custom';if(_0x3fd964[_0x140871(0x1d3)]===0x0)return _0x140871(0x1c8);return _0x3fd964[_0x140871(0x1cf)](_0x4d1db0=>_0x5ef2ea[_0x4d1db0]);}export async function promptSingleAppSelection(_0x11c126){const _0x34225a=a52_0x1f17,_0x2be9ca=[{'name':a52_0x90bc32['gray'](_0x34225a(0x1be)),'value':_0x34225a(0x1d7)},{'name':a52_0x90bc32['yellow'](_0x34225a(0x1b8)),'value':'custom'},..._0x11c126[_0x34225a(0x1cf)](_0x1ecf80=>({'name':_0x1ecf80['appName']+'\x20\x20'+a52_0x90bc32[_0x34225a(0x1d1)]('('+_0x1ecf80[_0x34225a(0x1b4)]+')'),'value':_0x1ecf80[_0x34225a(0x1b4)]}))],_0x25b422=await select({'message':_0x34225a(0x1c3),'choices':_0x2be9ca});if(_0x25b422===_0x34225a(0x1d7))return'skip';if(_0x25b422==='custom')return _0x34225a(0x1c8);return _0x11c126['find'](_0x1b4b0a=>_0x1b4b0a[_0x34225a(0x1b4)]===_0x25b422);}export async function selectSingleAppcode(_0x3874fa){const _0xc5374b=a52_0x1f17;if(!_0x3874fa)return writeCliSideChannelLine(a52_0x90bc32['gray'](_0xc5374b(0x1ba))),_fallbackOrSkip();writeCliSideChannelLine(_0xc5374b(0x1bb));let _0x47d1dc;try{_0x47d1dc=await withActiveCookie(_0x3874fa,()=>listRemoteApps());}catch(_0x3d1a30){writeCliSideChannelLine(a52_0x90bc32['yellow']('Could\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.'));if(_0x3d1a30 instanceof Error)writeCliSideChannelLine(a52_0x90bc32[_0xc5374b(0x1d1)](_0xc5374b(0x1b7)+_0x3d1a30[_0xc5374b(0x1c2)]+')'));return _fallbackOrSkip();}if(_0x47d1dc['length']===0x0)return writeCliSideChannelLine(a52_0x90bc32[_0xc5374b(0x1c0)]('No\x20available\x20apps\x20found.')),_fallbackOrSkip();const _0x36fbdb=await promptSingleAppSelection(_0x47d1dc);if(_0x36fbdb===_0xc5374b(0x1d7))return'';if(_0x36fbdb===_0xc5374b(0x1c8))return promptCustomAppcode();return _0x36fbdb[_0xc5374b(0x1b4)];}export async function selectMultipleApps(_0x56d607){const _0xfa0de9=a52_0x1f17;writeCliSideChannelLine(_0xfa0de9(0x1bb));let _0x27af15;try{_0x27af15=await withActiveCookie(_0x56d607,()=>listRemoteApps());}catch(_0xdcbab){writeCliSideChannelLine(_0xfa0de9(0x1c1));if(_0xdcbab instanceof Error)writeCliSideChannelLine('\x20\x20('+_0xdcbab[_0xfa0de9(0x1c2)]+')');return _0xfa0de9(0x1c8);}if(_0x27af15[_0xfa0de9(0x1d3)]===0x0)return writeCliSideChannelLine(_0xfa0de9(0x1bc)),'custom';return promptAppSelection(_0x27af15);}async function _fallbackOrSkip(){const _0x423418=a52_0x1f17,_0x294ac1=await select({'message':'App\x20Code:','choices':[{'name':a52_0x90bc32[_0x423418(0x1d1)](_0x423418(0x1d5)),'value':_0x423418(0x1d7)},{'name':a52_0x90bc32[_0x423418(0x1c0)](_0x423418(0x1b5)),'value':_0x423418(0x1d8)}]});if(_0x294ac1==='skip')return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a53_0x34a5(_0x1c0082,_0x373a0e){_0x1c0082=_0x1c0082-0x1a3;const _0x890bbd=a53_0x890b();let _0x34a54d=_0x890bbd[_0x1c0082];return _0x34a54d;}const a53_0x5ef271=a53_0x34a5;(function(_0x3971fa,_0x42906c){const _0x2de24c=a53_0x34a5,_0x3ce0d0=_0x3971fa();while(!![]){try{const _0x1df96f=-parseInt(_0x2de24c(0x1b3))/0x1*(parseInt(_0x2de24c(0x1af))/0x2)+parseInt(_0x2de24c(0x1c2))/0x3*(-parseInt(_0x2de24c(0x1b6))/0x4)+-parseInt(_0x2de24c(0x1bb))/0x5*(-parseInt(_0x2de24c(0x1b8))/0x6)+parseInt(_0x2de24c(0x1b5))/0x7*(-parseInt(_0x2de24c(0x1b4))/0x8)+-parseInt(_0x2de24c(0x1ad))/0x9+-parseInt(_0x2de24c(0x1ab))/0xa+-parseInt(_0x2de24c(0x1bc))/0xb*(-parseInt(_0x2de24c(0x1c3))/0xc);if(_0x1df96f===_0x42906c)break;else _0x3ce0d0['push'](_0x3ce0d0['shift']());}catch(_0x4fa297){_0x3ce0d0['push'](_0x3ce0d0['shift']());}}}(a53_0x890b,0xe820b));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a53_0x5ef271(0x1c1),a53_0x5ef271(0x1aa)]),NON_TERMINAL_STATUSES=new Set([a53_0x5ef271(0x1c0),a53_0x5ef271(0x1ae)]);export function normalizeAsyncTask(_0x1bc088){const _0x56e924=a53_0x5ef271,_0x2eadaa=typeof _0x1bc088?.['taskId']===_0x56e924(0x1a5)?_0x1bc088['taskId'][_0x56e924(0x1bd)]():'';if(!_0x2eadaa)throw CliErrors[_0x56e924(0x1bf)](_0x56e924(0x1ba));const _0x293193=typeof _0x1bc088[_0x56e924(0x1a8)]===_0x56e924(0x1a5)?_0x1bc088[_0x56e924(0x1a8)][_0x56e924(0x1bd)]()[_0x56e924(0x1b9)]():'';if(!_0x293193)throw CliErrors['apiError']('Async\x20task\x20'+_0x2eadaa+_0x56e924(0x1b2));return{'taskId':_0x2eadaa,'status':_0x293193,'errorMessage':typeof _0x1bc088[_0x56e924(0x1b0)]===_0x56e924(0x1a5)&&_0x1bc088[_0x56e924(0x1b0)][_0x56e924(0x1bd)]()?_0x1bc088[_0x56e924(0x1b0)][_0x56e924(0x1bd)]():null,'isTerminal':TERMINAL_STATUSES[_0x56e924(0x1b1)](_0x293193),'knownStatus':TERMINAL_STATUSES[_0x56e924(0x1b1)](_0x293193)||NON_TERMINAL_STATUSES[_0x56e924(0x1b1)](_0x293193)};}export function buildAsyncTaskStatusCommand(_0x3a1698,_0x2cd112){const _0x46aae5=a53_0x5ef271;return CLI_BIN_NAME+_0x46aae5(0x1a9)+quoteShellArg(_0x3a1698)+_0x46aae5(0x1a4)+quoteShellArg(_0x2cd112)+_0x46aae5(0x1c5);}export function asyncTaskMessage(_0x12a9ce){const _0x1fc879=a53_0x5ef271;switch(_0x12a9ce[_0x1fc879(0x1a8)]){case _0x1fc879(0x1c0):return'Task\x20'+_0x12a9ce['taskId']+_0x1fc879(0x1be);case _0x1fc879(0x1ae):return'Task\x20'+_0x12a9ce[_0x1fc879(0x1c4)]+_0x1fc879(0x1a3);case _0x1fc879(0x1c1):return _0x1fc879(0x1ac)+_0x12a9ce[_0x1fc879(0x1c4)]+'\x20completed\x20successfully.';case _0x1fc879(0x1aa):return _0x12a9ce[_0x1fc879(0x1b0)]?_0x1fc879(0x1ac)+_0x12a9ce[_0x1fc879(0x1c4)]+'\x20failed:\x20'+_0x12a9ce['errorMessage']:'Task\x20'+_0x12a9ce[_0x1fc879(0x1c4)]+_0x1fc879(0x1a6);default:return _0x1fc879(0x1ac)+_0x12a9ce['taskId']+_0x1fc879(0x1b7)+_0x12a9ce[_0x1fc879(0x1a8)]+'.';}}function a53_0x890b(){const _0x347a28=['has','\x20response\x20did\x20not\x20contain\x20a\x20status.','5RgLRbG','11631248UjpAhm','7SJpKoN','127844JAozkZ','\x20returned\x20unknown\x20status\x20','18qlAPAQ','toUpperCase','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','2344105YrEVQj','63822KKVGrq','trim','\x20is\x20pending.','apiError','PENDING','SUCCESS','6fiKrPb','7344EMPmEs','taskId','\x20--format\x20compress','replace','\x20is\x20processing.','\x20--appcode\x20','string','\x20failed.','\x27\x5c\x27\x27','status','\x20task\x20status\x20--task-id\x20','FAILED','6625050XUsddx','Task\x20','15653376PvSHhB','PROCESSING','34758meEXsj','errorMessage'];a53_0x890b=function(){return _0x347a28;};return a53_0x890b();}function quoteShellArg(_0x48e9a1){const _0x236c25=a53_0x5ef271;return'\x27'+_0x48e9a1[_0x236c25(0x1c6)](/'/g,_0x236c25(0x1a7))+'\x27';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3f4737,_0x3b079e){var _0x1d89ed=a54_0x2d9d,_0x1e1486=_0x3f4737();while(!![]){try{var _0x39189d=parseInt(_0x1d89ed(0x14f))/0x1*(parseInt(_0x1d89ed(0x14a))/0x2)+-parseInt(_0x1d89ed(0x14e))/0x3*(-parseInt(_0x1d89ed(0x150))/0x4)+parseInt(_0x1d89ed(0x14c))/0x5+-parseInt(_0x1d89ed(0x155))/0x6*(parseInt(_0x1d89ed(0x151))/0x7)+parseInt(_0x1d89ed(0x156))/0x8*(parseInt(_0x1d89ed(0x154))/0x9)+-parseInt(_0x1d89ed(0x14b))/0xa*(parseInt(_0x1d89ed(0x14d))/0xb)+-parseInt(_0x1d89ed(0x157))/0xc;if(_0x39189d===_0x3b079e)break;else _0x1e1486['push'](_0x1e1486['shift']());}catch(_0x10610){_0x1e1486['push'](_0x1e1486['shift']());}}}(a54_0x265e,0xe01ec));export function asDryRunResult(_0x618a9e,_0x2675ca){var _0x211867=a54_0x2d9d;return Object['defineProperties'](_0x618a9e,{'method':{'value':_0x2675ca[_0x211867(0x153)],'enumerable':![]},'url':{'value':_0x2675ca[_0x211867(0x152)],'enumerable':![]},..._0x2675ca['description']?{'description':{'value':_0x2675ca['description'],'enumerable':![]}}:{}});}function a54_0x2d9d(_0x49d854,_0x42cc35){_0x49d854=_0x49d854-0x14a;var _0x265e50=a54_0x265e();var _0x2d9dcd=_0x265e50[_0x49d854];return _0x2d9dcd;}function a54_0x265e(){var _0x317070=['3541035xFYDOW','3359807SwkBre','51NRcHBm','410954uCcFKz','114008cqcDLm','4096883fOJOvd','url','method','18oyayxo','18CQkThW','5100632SMczHe','3726804tFWUKO','4hbOqXi','10LFdnUe'];a54_0x265e=function(){return _0x317070;};return a54_0x265e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a55_0x36ffcc=a55_0x10c3;function a55_0x10c3(_0x79e57e,_0x34e0cc){_0x79e57e=_0x79e57e-0x85;const _0x2816a1=a55_0x2816();let _0x10c366=_0x2816a1[_0x79e57e];return _0x10c366;}(function(_0x202309,_0x314c91){const _0x2a9feb=a55_0x10c3,_0x1a3c67=_0x202309();while(!![]){try{const _0x5b8fde=parseInt(_0x2a9feb(0xa3))/0x1*(parseInt(_0x2a9feb(0xae))/0x2)+-parseInt(_0x2a9feb(0x97))/0x3*(parseInt(_0x2a9feb(0x8b))/0x4)+parseInt(_0x2a9feb(0x98))/0x5+-parseInt(_0x2a9feb(0x9f))/0x6+-parseInt(_0x2a9feb(0x86))/0x7*(parseInt(_0x2a9feb(0xaa))/0x8)+parseInt(_0x2a9feb(0x9a))/0x9*(parseInt(_0x2a9feb(0x96))/0xa)+parseInt(_0x2a9feb(0xa7))/0xb*(parseInt(_0x2a9feb(0x99))/0xc);if(_0x5b8fde===_0x314c91)break;else _0x1a3c67['push'](_0x1a3c67['shift']());}catch(_0x156a32){_0x1a3c67['push'](_0x1a3c67['shift']());}}}(a55_0x2816,0xe61d6));export const CROSS_RELATION_FROM_DATASET_FLAG={'name':'from-datasetcode','type':a55_0x36ffcc(0x8d),'required':!![],'description':a55_0x36ffcc(0x93)};export const CROSS_RELATION_FROM_COLUMN_FLAG={'name':a55_0x36ffcc(0x9c),'type':a55_0x36ffcc(0x8d),'required':!![],'description':a55_0x36ffcc(0x9d)};export const CROSS_RELATION_TO_DATASET_FLAG={'name':'to-datasetcode','type':'string','required':!![],'description':a55_0x36ffcc(0x89)};export const CROSS_RELATION_TO_COLUMN_FLAG={'name':a55_0x36ffcc(0xa0),'type':a55_0x36ffcc(0x8d),'required':!![],'description':a55_0x36ffcc(0xa2)};export const CROSS_RELATION_DBLINK_FLAG={'name':a55_0x36ffcc(0x8a),'type':a55_0x36ffcc(0x91),'description':'Source\x20database\x20connection\x20ID;\x20derived\x20from\x20the\x20source\x20dataset\x20when\x20omitted'};export const CROSS_RELATION_LABEL_FLAG={'name':a55_0x36ffcc(0xad),'type':a55_0x36ffcc(0x8d),'description':'Target\x20display\x20field;\x20create\x20defaults\x20to\x20the\x20target\x20field,\x20update\x20keeps\x20the\x20current\x20value'};export const CROSS_RELATION_CARDINALITY_FLAG={'name':'cardinality','type':a55_0x36ffcc(0x8d),'enum':[a55_0x36ffcc(0xa6),'ONE_TO_MANY',a55_0x36ffcc(0x8c),a55_0x36ffcc(0x9e)],'description':a55_0x36ffcc(0x94)};export const GLOBAL_SCOPE_FLAG={'name':a55_0x36ffcc(0x8f),'type':a55_0x36ffcc(0xa5),'default':![],'description':a55_0x36ffcc(0x87)};export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a55_0x36ffcc(0x85)};function a55_0x2816(){const _0x21344d=['SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','dbtype','to-label-column','4126xRpLaZ','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','45367GYVBqZ','Write\x20to\x20the\x20global\x20configuration','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','Target\x20DB_TABLE\x20dataset\x20code','from-dblink-id','142444gfqAxL','MANY_TO_ONE','string','skip-connection-test','global','code','number','MYSQL','Source\x20DB_TABLE\x20dataset\x20code','Relation\x20cardinality;\x20create\x20leaves\x20it\x20unset\x20when\x20omitted,\x20update\x20keeps\x20the\x20current\x20value','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','10wMsulX','150shFZiA','3677730KVAoMx','250836bgWFKn','10441836Ptnwqj','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','from-column','Source\x20field\x20name\x20used\x20to\x20locate\x20the\x20relation','MANY_TO_MANY','8122902bNmPIE','to-column','datasetcode','Target\x20field\x20name','514fCcjCt','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','boolean','ONE_TO_ONE','1364fQEmkB','Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update','POSTGRESQL','1816jOMecR'];a55_0x2816=function(){return _0x21344d;};return a55_0x2816();}export const CODE_FLAG={'name':a55_0x36ffcc(0x90),'type':a55_0x36ffcc(0x8d),'required':!![],'description':a55_0x36ffcc(0x88),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a55_0x36ffcc(0xa1),'description':a55_0x36ffcc(0x88)};export const SQLCODE_FLAG={'name':'sqlcode','type':'string','required':!![],'description':a55_0x36ffcc(0xa4),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a55_0x36ffcc(0xab)}};export const APPCODE_FLAG_OPTIONAL={'name':'appcode','type':'string','required':![],'description':a55_0x36ffcc(0x9b)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':'App\x20code\x20(e.g.\x20app-xxxxx)'};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a55_0x36ffcc(0x91),'required':!![],'description':a55_0x36ffcc(0x95)};export const DB_TYPE_FLAG={'name':a55_0x36ffcc(0xac),'type':a55_0x36ffcc(0x8d),'required':!![],'description':'Database\x20product\x20type','enum':[a55_0x36ffcc(0x92),a55_0x36ffcc(0xa9)]};export const SKIP_CONNECTION_TEST_FLAG={'name':a55_0x36ffcc(0x8e),'type':a55_0x36ffcc(0xa5),'description':a55_0x36ffcc(0xa8)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xa2a1c5,_0x1a340c){const _0x26c5f9=a56_0x2f6f,_0x3e9b12=_0xa2a1c5();while(!![]){try{const _0x612d33=-parseInt(_0x26c5f9(0x171))/0x1+parseInt(_0x26c5f9(0x172))/0x2+parseInt(_0x26c5f9(0x17b))/0x3*(parseInt(_0x26c5f9(0x179))/0x4)+parseInt(_0x26c5f9(0x16e))/0x5*(-parseInt(_0x26c5f9(0x177))/0x6)+parseInt(_0x26c5f9(0x17c))/0x7+parseInt(_0x26c5f9(0x170))/0x8+parseInt(_0x26c5f9(0x176))/0x9;if(_0x612d33===_0x1a340c)break;else _0x3e9b12['push'](_0x3e9b12['shift']());}catch(_0x5190a0){_0x3e9b12['push'](_0x3e9b12['shift']());}}}(a56_0x4aa2,0x4bd71));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;function a56_0x2f6f(_0x56a214,_0x35636c){_0x56a214=_0x56a214-0x16c;const _0x4aa27a=a56_0x4aa2();let _0x2f6fca=_0x4aa27a[_0x56a214];return _0x2f6fca;}export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x66f665){const _0xc727e9=a56_0x2f6f;if(_0x66f665>=BYTES_PER_MB){const _0xac542d=Math[_0xc727e9(0x16f)](_0x66f665/BYTES_PER_MB*0x64)/0x64;return _0xac542d[_0xc727e9(0x173)](0x2)+_0xc727e9(0x178);}return _0x66f665+'\x20B';}export function requireDevelopmentUploadFile(_0x54274c,_0x4b837){const _0x1e7063=a56_0x2f6f,_0x247cf6=_0x54274c['trim']();if(!_0x247cf6)throw CliErrors[_0x1e7063(0x16d)](_0x4b837+_0x1e7063(0x175));if(!existsSync(_0x247cf6))throw CliErrors[_0x1e7063(0x16d)](_0x1e7063(0x16c)+_0x247cf6);const _0x12974c=statSync(_0x247cf6);if(!_0x12974c[_0x1e7063(0x174)]())throw CliErrors['validation']('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x247cf6);if(_0x12974c[_0x1e7063(0x17a)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x1e7063(0x16d)]('File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20'+_0x247cf6+'\x20('+formatBytes(_0x12974c[_0x1e7063(0x17a)])+')');return{'path':_0x247cf6,'size':_0x12974c[_0x1e7063(0x17a)]};}function a56_0x4aa2(){const _0x360ded=['validation','55wnBybk','ceil','1259728mUGOWX','485820oWEhri','700188TbILEv','toFixed','isFile','\x20path\x20is\x20required.','863991lfCEVi','227532OIpwlm','\x20MB','12XWzblr','size','2970aFHAyn','4249518GOEhba','File\x20not\x20found:\x20'];a56_0x4aa2=function(){return _0x360ded;};return a56_0x4aa2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x11c014,_0x4b5ef1){const _0x23a5fc=a57_0x54d1,_0x551aa8=_0x11c014();while(!![]){try{const _0x3c6000=-parseInt(_0x23a5fc(0x1d0))/0x1+-parseInt(_0x23a5fc(0x1ce))/0x2+parseInt(_0x23a5fc(0x1d8))/0x3*(parseInt(_0x23a5fc(0x1d4))/0x4)+-parseInt(_0x23a5fc(0x1d5))/0x5+parseInt(_0x23a5fc(0x1d2))/0x6+parseInt(_0x23a5fc(0x1cf))/0x7*(-parseInt(_0x23a5fc(0x1d7))/0x8)+parseInt(_0x23a5fc(0x1cd))/0x9;if(_0x3c6000===_0x4b5ef1)break;else _0x551aa8['push'](_0x551aa8['shift']());}catch(_0x598fa5){_0x551aa8['push'](_0x551aa8['shift']());}}}(a57_0x42d2,0x25f6a));export function validateAppcode(_0x2a838a){const _0xe7afe6=a57_0x54d1,_0x3e4e0f=_0x2a838a[_0xe7afe6(0x1d6)]();if(!_0x3e4e0f)return{'valid':![],'message':_0xe7afe6(0x1d3)};if(_0x3e4e0f['length']>0x64)return{'valid':![],'message':_0xe7afe6(0x1cc)};if(!/^[A-Za-z0-9_-]+$/['test'](_0x3e4e0f))return{'valid':![],'message':_0xe7afe6(0x1d1)};return{'valid':!![]};}function a57_0x54d1(_0x3bd010,_0x277234){_0x3bd010=_0x3bd010-0x1cc;const _0x42d2ce=a57_0x42d2();let _0x54d18f=_0x42d2ce[_0x3bd010];return _0x54d18f;}function a57_0x42d2(){const _0x286f49=['3DrwzMs','App\x20Code\x20cannot\x20exceed\x20100\x20characters','3681423EvwNtc','157912QAhNcM','4599JdhNfx','127375hJlMLH','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','606930bxFKdL','App\x20Code\x20cannot\x20be\x20empty','729388dlboRo','300180xfOgfz','trim','3296uKXOmX'];a57_0x42d2=function(){return _0x286f49;};return a57_0x42d2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a58_0x5a5b(){const _0x53f3ba=['9lBOPof','call','4990mdjZRS','write','968632ujFSAh','delete','\x20deleted','prototype','18326VmUPAZ','3298905yonnjw','has','global','Project','validation','30VpMSYH','660909nsoWFt','Delete\x20a\x20config\x20value\x20from\x20one\x20scope','191136AKnMDj','trim','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','505267zcivqo','\x20already\x20absent','\x20config\x20delete\x20<key>\x20[--global]','boolean','Global','riskLevel','Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','36vnrFoS','1904840PBJawP','config','defaultApp','Top-level\x20key\x20\x22','Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.','hasOwnProperty','routing'];a58_0x5a5b=function(){return _0x53f3ba;};return a58_0x5a5b();}const a58_0x2364c8=a58_0x93cf;function a58_0x93cf(_0x2403e9,_0x5f0281){_0x2403e9=_0x2403e9-0x136;const _0x5a5b4c=a58_0x5a5b();let _0x93cfc2=_0x5a5b4c[_0x2403e9];return _0x93cfc2;}(function(_0x50a640,_0x14c7e5){const _0xb09b82=a58_0x93cf,_0x492f50=_0x50a640();while(!![]){try{const _0x47c468=parseInt(_0xb09b82(0x13d))/0x1+-parseInt(_0xb09b82(0x156))/0x2+-parseInt(_0xb09b82(0x14a))/0x3*(-parseInt(_0xb09b82(0x13f))/0x4)+parseInt(_0xb09b82(0x137))/0x5+parseInt(_0xb09b82(0x13c))/0x6*(-parseInt(_0xb09b82(0x142))/0x7)+parseInt(_0xb09b82(0x14b))/0x8*(parseInt(_0xb09b82(0x152))/0x9)+parseInt(_0xb09b82(0x154))/0xa*(-parseInt(_0xb09b82(0x136))/0xb);if(_0x47c468===_0x14c7e5)break;else _0x492f50['push'](_0x492f50['shift']());}catch(_0x4374f7){_0x492f50['push'](_0x492f50['shift']());}}}(a58_0x5a5b,0x6f3e0));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_0x2364c8(0x14d),a58_0x2364c8(0x151)]);async function execute(_0x494683){const _0x1132b3=a58_0x2364c8,_0x4e2937=_0x494683['args'][0x0]?.[_0x1132b3(0x140)]();if(!_0x4e2937)throw CliErrors['validation']('Missing\x20key\x20argument.','Usage:\x20'+CLI_BIN_NAME+_0x1132b3(0x144));if(_0x4e2937===_0x1132b3(0x147))throw CliErrors[_0x1132b3(0x13b)](_0x1132b3(0x141));if(!isTopLevelConfigKey(_0x4e2937)&&!EXTRA_DELETABLE_KEYS[_0x1132b3(0x138)](_0x4e2937)&&!LEGACY_DELETABLE_KEYS[_0x1132b3(0x138)](_0x4e2937))throw CliErrors[_0x1132b3(0x13b)](_0x1132b3(0x14e)+_0x4e2937+'\x22\x20is\x20not\x20deletable.',_0x1132b3(0x14f));const _0x138c71=resolveWriteScope({'global':_0x494683['bool'](_0x1132b3(0x139))}),_0x57de1e=readScopedConfig(_0x138c71),_0x17559b=Object[_0x1132b3(0x159)][_0x1132b3(0x150)][_0x1132b3(0x153)](_0x57de1e,_0x4e2937);_0x17559b&&(delete _0x57de1e[_0x4e2937],writeScopedConfig(_0x57de1e,_0x138c71));const _0x570c2c=_0x138c71==='global'?_0x1132b3(0x146):_0x1132b3(0x13a);return{'ok':!![],'message':_0x17559b?'✓\x20'+_0x570c2c+'\x20'+_0x4e2937+_0x1132b3(0x158):'✓\x20'+_0x570c2c+'\x20'+_0x4e2937+_0x1132b3(0x143),'data':{'key':_0x4e2937,'scope':_0x138c71,'changed':_0x17559b}};}export const configDeleteDefinition={'service':a58_0x2364c8(0x14c),'command':a58_0x2364c8(0x157),'description':a58_0x2364c8(0x13e),'risk':a58_0x2364c8(0x155),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':'key','description':a58_0x2364c8(0x149),'required':!![]}],'flags':[{'name':a58_0x2364c8(0x139),'type':a58_0x2364c8(0x145),'description':a58_0x2364c8(0x148),'default':![]}],'execute':execute};
|