@lovrabet/rabetbase-cli 2.5.4-beta.2 → 2.5.4-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.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/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/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.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.d.ts +2 -0
- package/lib/commands/user-account/feishu-bind.js +1 -0
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +2 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-relation.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 +3 -2
- package/skills/rabetbase/references/rabetbase-user-account.md +20 -2
- package/skills/rabetbase.manifest.json +3 -3
package/lib/commands/bff/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a43_0x950a(_0x46094f,_0x5c0f0a){_0x46094f=_0x46094f-0x161;const _0x2cf83c=a43_0x2cf8();let _0x950a9d=_0x2cf83c[_0x46094f];return _0x950a9d;}const a43_0x4f2448=a43_0x950a;(function(_0x2d0c5c,_0x22dcb6){const _0x1f6b3b=a43_0x950a,_0x21f4f9=_0x2d0c5c();while(!![]){try{const _0x3bcf28=-parseInt(_0x1f6b3b(0x182))/0x1+parseInt(_0x1f6b3b(0x1a7))/0x2+parseInt(_0x1f6b3b(0x171))/0x3+-parseInt(_0x1f6b3b(0x1c5))/0x4*(-parseInt(_0x1f6b3b(0x195))/0x5)+-parseInt(_0x1f6b3b(0x19c))/0x6*(-parseInt(_0x1f6b3b(0x1a9))/0x7)+parseInt(_0x1f6b3b(0x162))/0x8+-parseInt(_0x1f6b3b(0x19f))/0x9*(parseInt(_0x1f6b3b(0x1b3))/0xa);if(_0x3bcf28===_0x22dcb6)break;else _0x21f4f9['push'](_0x21f4f9['shift']());}catch(_0x1532fc){_0x21f4f9['push'](_0x21f4f9['shift']());}}}(a43_0x2cf8,0x6e206));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':a43_0x4f2448(0x16a),'command':a43_0x4f2448(0x1bf),'description':'Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','risk':'write','structuredErrors':!![],'flags':[{'name':a43_0x4f2448(0x1c1),'type':'string','description':a43_0x4f2448(0x1bb),'enum':['COMMON','ENDPOINT','HOOK']},{'name':a43_0x4f2448(0x17c),'type':a43_0x4f2448(0x1b6),'description':a43_0x4f2448(0x17e)},{'name':'force','type':a43_0x4f2448(0x1b7),'description':a43_0x4f2448(0x164)}],async 'dryRun'(_0x2b36ad){const _0x23f155=a43_0x4f2448,_0x422fa4=loadBffProjectConfig(_0x2b36ad[_0x23f155(0x18f)]),_0x5a7d5b=await readBffLockFile(_0x422fa4['lockFilePath']),{appLock:_0x21e258}=ensureLockScope(_0x5a7d5b??createEmptyBffLock(),_0x2b36ad['appCode'],_0x422fa4[_0x23f155(0x188)],'push'),_0x542718=await getTargetFunctions(_0x422fa4,_0x2b36ad),_0x1291b2=_0x542718[_0x23f155(0x16e)](_0x45d124=>_0x45d124[_0x23f155(0x1c1)]===_0x23f155(0x1aa))?await scanLocalBffFunctions(_0x422fa4,_0x23f155(0x1aa)):_0x542718,_0x4d57cb=await buildHookMaps(_0x2b36ad[_0x23f155(0x18f)],_0x2b36ad[_0x23f155(0x194)],_0x1291b2,_0x21e258,_0x2b36ad[_0x23f155(0x18a)]||_0x2b36ad['mergedCli']?.[_0x23f155(0x19d)]||_0x2b36ad['mergedCli']?.[_0x23f155(0x176)]),_0x2aea38=_0x2b36ad[_0x23f155(0x167)](_0x23f155(0x1ca)),_0x8407be=[];for(const _0x481ba9 of _0x542718){const _0x44aab7=await computeFileHash(_0x481ba9[_0x23f155(0x1a0)]),_0x47380a=_0x21e258['functions'][_0x481ba9[_0x23f155(0x1bd)]],_0x3d0487=!!_0x47380a&&_0x47380a[_0x23f155(0x1c6)]===_0x44aab7,_0xd5393f=_0x4d57cb[_0x23f155(0x1a4)][_0x23f155(0x186)](_0x481ba9[_0x23f155(0x1bd)]),_0x3949cb=!!_0x47380a?.[_0x23f155(0x16d)]&&_0x47380a[_0x23f155(0x1ae)]==null&&(_0x2aea38||!_0x3d0487),_0x4fe5ca=_0x3949cb?missingRemoteVersionConflict(_0x481ba9,_0x47380a):undefined,_0x17c84c=_0x4d57cb[_0x23f155(0x165)]['has'](_0x481ba9[_0x23f155(0x1bd)])?_0x23f155(0x1c7):!_0x2aea38&&_0x3d0487?_0x23f155(0x172):_0x4fe5ca?_0x23f155(0x1a2):_0x23f155(0x17f);_0x8407be[_0x23f155(0x1bf)]({'lockKey':_0x481ba9[_0x23f155(0x1bd)],'filePath':_0x481ba9[_0x23f155(0x1a0)],'remoteId':_0x47380a?.[_0x23f155(0x16d)]??null,'mode':_0x47380a?.['remoteId']?_0x23f155(0x1bc):'create','status':_0x17c84c,..._0x4d57cb[_0x23f155(0x165)][_0x23f155(0x187)](_0x481ba9[_0x23f155(0x1bd)])?{'error':_0x4d57cb['failures'][_0x23f155(0x186)](_0x481ba9[_0x23f155(0x1bd)])}:{},..._0x4fe5ca?{'conflict':_0x4fe5ca}:{},..._0x4d57cb[_0x23f155(0x17a)][_0x23f155(0x187)](_0x481ba9[_0x23f155(0x1bd)])?{'datasetCode':_0x47380a?.[_0x23f155(0x1b0)],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x481ba9[_0x23f155(0x1bd)])]}:{},..._0xd5393f?{'alias':_0xd5393f[_0x23f155(0x1ad)]??null,'datasetCode':_0xd5393f[_0x23f155(0x1b0)],'operationType':_0x481ba9[_0x23f155(0x18e)],'functionNode':_0x481ba9[_0x23f155(0x191)],'warnings':_0xd5393f[_0x23f155(0x1a1)]}:{}});}return{'method':_0x23f155(0x19b),'url':_0x23f155(0x1ab),'body':{'appCode':_0x2b36ad['appCode'],'force':_0x2aea38,'files':_0x8407be,'cacheClearAtRuntime':_0x8407be['some'](_0xeffaaa=>_0xeffaaa[_0x23f155(0x1b1)]===_0x23f155(0x17f)),'cacheClearAtRuntimeTimes':_0x8407be[_0x23f155(0x16e)](_0x4f2065=>_0x4f2065[_0x23f155(0x1b1)]===_0x23f155(0x17f))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x23f155(0x180)+_0x8407be['length']+_0x23f155(0x178)};},async 'execute'(_0xa2adb4){const _0x42bbe9=a43_0x4f2448,_0xb86725=loadBffProjectConfig(_0xa2adb4[_0x42bbe9(0x18f)]),_0x227b6b=await readBffLockFile(_0xb86725['lockFilePath']),{lockData:_0x19b868,appLock:_0x493890}=ensureLockScope(_0x227b6b??createEmptyBffLock(),_0xa2adb4[_0x42bbe9(0x18f)],_0xb86725[_0x42bbe9(0x188)],_0x42bbe9(0x1bf)),_0x46932f=await getTargetFunctions(_0xb86725,_0xa2adb4);if(_0x46932f['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':_0x42bbe9(0x193)};const _0xcb4b0e=_0xa2adb4['bool'](_0x42bbe9(0x1ca)),_0x43eda9=JSON['parse'](JSON[_0x42bbe9(0x189)](_0x19b868)),_0x14b763=_0x43eda9[_0x42bbe9(0x185)][_0xa2adb4[_0x42bbe9(0x18f)]];if(!_0x14b763)throw new Error(_0x42bbe9(0x1be)+_0xa2adb4[_0x42bbe9(0x18f)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x198614=_0x46932f[_0x42bbe9(0x16e)](_0x142a28=>_0x142a28[_0x42bbe9(0x1c1)]===_0x42bbe9(0x1aa))?await scanLocalBffFunctions(_0xb86725,_0x42bbe9(0x1aa)):_0x46932f,_0x14153f=await buildHookMaps(_0xa2adb4['appCode'],_0xa2adb4[_0x42bbe9(0x194)],_0x198614,_0x14b763,_0xa2adb4['selectedAppName']||_0xa2adb4[_0x42bbe9(0x175)]?.[_0x42bbe9(0x19d)]||_0xa2adb4[_0x42bbe9(0x175)]?.[_0x42bbe9(0x176)]),_0x27d517=[],_0x304e7f=[],_0x5af3fc=[],_0x2f9b4f=[];for(const _0x3b9580 of _0x46932f){const _0x2692cb=_0x14153f[_0x42bbe9(0x165)]['get'](_0x3b9580[_0x42bbe9(0x1bd)]);if(_0x2692cb){_0x2f9b4f[_0x42bbe9(0x1bf)]({'lockKey':_0x3b9580['lockKey'],'error':_0x2692cb});continue;}const _0x3ed7ef=await computeFileHash(_0x3b9580['filePath']),_0x1a540a=_0x14b763[_0x42bbe9(0x1a5)][_0x3b9580['lockKey']];if(!_0xcb4b0e&&_0x1a540a&&_0x1a540a[_0x42bbe9(0x1c6)]===_0x3ed7ef){_0x304e7f['push']({'lockKey':_0x3b9580[_0x42bbe9(0x1bd)],'reason':_0x42bbe9(0x172)});continue;}if(_0x1a540a?.['remoteId']&&_0x1a540a['version']==null){_0x5af3fc[_0x42bbe9(0x1bf)](missingRemoteVersionConflict(_0x3b9580,_0x1a540a));continue;}try{await uploadSingleFunction(_0xa2adb4[_0x42bbe9(0x18f)],_0x3b9580,_0x14b763,_0x14153f);const _0x58feb0=_0x14b763[_0x42bbe9(0x1a5)][_0x3b9580['lockKey']];_0x27d517[_0x42bbe9(0x1bf)]({'lockKey':_0x3b9580[_0x42bbe9(0x1bd)],'remoteId':_0x58feb0?.[_0x42bbe9(0x16d)]??0x0});}catch(_0x315484){const _0x34da75=remoteVersionChangedConflict(_0x3b9580,_0x1a540a,_0x315484);if(_0x34da75){_0x5af3fc[_0x42bbe9(0x1bf)](_0x34da75);continue;}_0x2f9b4f[_0x42bbe9(0x1bf)]({'lockKey':_0x3b9580[_0x42bbe9(0x1bd)],'error':_0x315484 instanceof Error?_0x315484[_0x42bbe9(0x183)]:String(_0x315484)});}}_0x14b763[_0x42bbe9(0x174)]=new Date()['toISOString'](),await writeBffLockFile(_0xb86725[_0x42bbe9(0x1a6)],_0x43eda9),await waitForUploadedLockEntries(_0xb86725[_0x42bbe9(0x1a6)],_0xa2adb4['appCode'],_0x27d517['map'](_0x59ebd5=>_0x59ebd5[_0x42bbe9(0x1bd)]));let _0x5131bd={'attempted':![],'cleared':![]};if(_0x27d517[_0x42bbe9(0x16c)]>0x0)try{let _0x28c192='';for(let _0x39969f=0x0;_0x39969f<CACHE_CLEAR_ATTEMPTS;_0x39969f+=0x1){_0x28c192=await clearBffScriptCache(),_0x39969f<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x5131bd={'attempted':!![],'cleared':!![],'message':_0x28c192||_0x42bbe9(0x16f)};}catch(_0x43763a){_0x5131bd={'attempted':!![],'cleared':![],'error':_0x43763a instanceof Error?_0x43763a['message']:String(_0x43763a)};}const _0x3c74ba=_0x2f9b4f[_0x42bbe9(0x16c)]===0x0&&(_0x5131bd[_0x42bbe9(0x1b8)]?_0x5131bd['cleared']:!![]),_0x46154a=_0x3c74ba,_0x5ac130=_0x5131bd[_0x42bbe9(0x1b8)]?_0x5131bd['cleared']?'runtime\x20cache\x20cleared':_0x42bbe9(0x1a3):'runtime\x20cache\x20not\x20needed';return{'ok':_0x46154a,'data':{'uploaded':_0x27d517,'skipped':_0x304e7f,'conflicts':_0x5af3fc,'failed':_0x2f9b4f,'cacheClear':_0x5131bd,'warnings':[...[..._0x14153f[_0x42bbe9(0x1a4)]['values']()][_0x42bbe9(0x19a)](_0x52071c=>_0x52071c[_0x42bbe9(0x1a1)]),...[..._0x14153f[_0x42bbe9(0x17a)]]['map'](existingHookWarning)]},'message':formatPushMessage(_0x27d517[_0x42bbe9(0x16c)],_0x304e7f[_0x42bbe9(0x16c)],_0x5af3fc[_0x42bbe9(0x16c)],_0x2f9b4f[_0x42bbe9(0x16c)],_0x5ac130)};}};function missingRemoteVersionConflict(_0xa80c67,_0x4f50e1){const _0x3a2a8d=a43_0x4f2448;return remoteVersionConflict(_0xa80c67,_0x4f50e1,'BFF_REMOTE_VERSION_MISSING',_0x3a2a8d(0x1af));}function remoteVersionChangedConflict(_0x248eae,_0x3c73f8,_0x323108){const _0x559e3c=a43_0x4f2448;if(!_0x3c73f8?.[_0x559e3c(0x16d)]||_0x3c73f8[_0x559e3c(0x1ae)]==null||!isRemoteVersionConflict(_0x323108))return undefined;return remoteVersionConflict(_0x248eae,_0x3c73f8,_0x559e3c(0x1b4),_0x559e3c(0x166));}function a43_0x2cf8(){const _0x135702=['\x20conflict','alias','version','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','datasetCode','status','\x20uploaded','2390mCUeso','BFF_REMOTE_VERSION_CHANGED','validation','string','boolean','attempted','every','startsWith','Push\x20only\x20this\x20script\x20type','update','lockKey','Lock\x20scope\x20for\x20app\x20\x22','push','description','type','afterScriptId','str','Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20','196204CgCTyq','hash','failed','filter','requires','force','\x20bff\x20detail\x20--id\x20','script','Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.','2988248xWgcWh','join','Force\x20push\x20ignoring\x20hash\x20protection','failures','Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.','bool','review_remote_and_merge','map','bff','HOOK_DATASET_NOT_FOUND:','length','remoteId','some','Runtime\x20script\x20cache\x20cleared.','set','1165863GewnJX','unchanged','Incomplete\x20HOOK\x20path:\x20','lastSync','mergedCli','defaultApp','beforeScriptId','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','add','existingHooks','Local\x20function\x20not\x20found:\x20','name','after','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','would_push','Would\x20inspect\x20','Push\x20complete:\x20','276550grSkdt','message','profileName','apps','get','has','scriptsRoot','stringify','selectedAppName','delete','\x20--format\x20compress','require','operationType','appCode','\x20skipped','functionNode','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','No\x20local\x20Backend\x20Function\x20scripts\x20found.','apiDir','35iUYoca','Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.','test','Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.','\x20failed','flatMap','POST','18HnwROJ','currentApp','utf8','38853BvTtri','filePath','warnings','conflict','runtime\x20cache\x20clear\x20failed','resolutions','functions','lockFilePath','936034hsLhwa','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','433685GRHiUN','HOOK','/api/management/library/scripts/save'];a43_0x2cf8=function(){return _0x135702;};return a43_0x2cf8();}function remoteVersionConflict(_0x2733b3,_0x574545,_0x179f3f,_0x2becf4){const _0x2a1420=a43_0x4f2448;return{'code':_0x179f3f,'lockKey':_0x2733b3[_0x2a1420(0x1bd)],'filePath':_0x2733b3[_0x2a1420(0x1a0)],'remoteId':_0x574545[_0x2a1420(0x16d)],..._0x574545[_0x2a1420(0x1ae)]!=null?{'expectedVersion':_0x574545[_0x2a1420(0x1ae)]}:{},'message':_0x2becf4,'nextAction':{'action':_0x2a1420(0x168),'command':CLI_BIN_NAME+_0x2a1420(0x1cb)+_0x574545['remoteId']+_0x2a1420(0x18c),'requiresReview':!![],'message':'Review\x20the\x20current\x20remote\x20source,\x20merge\x20it\x20into\x20the\x20local\x20script,\x20then\x20retry\x20push.\x20Do\x20not\x20use\x20--force\x20unless\x20you\x20intentionally\x20discard\x20local\x20changes.'}};}function isRemoteVersionConflict(_0x1c617e){const _0x3b991a=a43_0x4f2448,_0x23edf8=_0x1c617e instanceof Error?_0x1c617e['message']:String(_0x1c617e),_0x91acd5=getPlatformErrorCode(_0x1c617e)??'';return[_0x23edf8,_0x91acd5][_0x3b991a(0x16e)](_0xc1b544=>/(?: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[_0x3b991a(0x197)](_0xc1b544));}function formatPushMessage(_0x15a766,_0x58d5df,_0x48333a,_0x54c0ad,_0x1e8c94){const _0x33d1c9=a43_0x4f2448,_0x252d13=[_0x33d1c9(0x181)+_0x15a766+_0x33d1c9(0x1b2),_0x58d5df+_0x33d1c9(0x190)];_0x48333a>0x0&&_0x252d13[_0x33d1c9(0x1bf)](_0x48333a+_0x33d1c9(0x1ac)+(_0x48333a===0x1?'':'s')+'\x20'+(_0x48333a===0x1?_0x33d1c9(0x1c9):_0x33d1c9(0x18d))+'\x20resolution');if(_0x54c0ad>0x0)_0x252d13['push'](_0x54c0ad+_0x33d1c9(0x199));return _0x252d13[_0x33d1c9(0x1bf)](_0x1e8c94),_0x252d13[_0x33d1c9(0x163)](',\x20');}async function getTargetFunctions(_0x5db66a,_0x39e716){const _0x139076=a43_0x4f2448,_0x3d8443=_0x39e716[_0x139076(0x1c3)](_0x139076(0x1c1)),_0x429b67=_0x39e716['str'](_0x139076(0x17c)),_0x51e4bd=normalizeBffType(_0x3d8443)??undefined;if(_0x429b67&&!_0x51e4bd)throw CliErrors[_0x139076(0x1b5)](_0x139076(0x1a8));const _0xdab12d=await scanLocalBffFunctions(_0x5db66a,_0x51e4bd);if(_0x429b67){const _0x5f3531=_0xdab12d[_0x139076(0x1c8)](_0x23baa5=>_0x23baa5['name']===_0x429b67);if(_0x5f3531[_0x139076(0x16c)]===0x0)throw CliErrors[_0x139076(0x1b5)](_0x139076(0x17b)+_0x51e4bd+'/'+_0x429b67);return _0x5f3531;}return _0xdab12d;}function existingHookWarning(_0x16c182){const _0x570359=a43_0x4f2448;return{'code':'EXISTING_HOOK_BINDING_PRESERVED','lockKey':_0x16c182,'message':_0x570359(0x198)};}async function buildHookMaps(_0x29ab11,_0x154c86,_0x348264,_0x36db32,_0x1892b9){const _0x8073c5=a43_0x4f2448,_0x5c15ae=_0x348264[_0x8073c5(0x16e)](_0x37ddff=>_0x37ddff['type']===_0x8073c5(0x1aa));if(!_0x5c15ae)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0x3d2fbb=resolveApiModelSource(_0x154c86,_0x29ab11,_0x1892b9),_0x4ffb24=loadAliasMap(_0x154c86,undefined,_0x3d2fbb['filePath'],_0x3d2fbb[_0x8073c5(0x184)]);assertUnambiguousHookAliases(_0x4ffb24);const _0x17a007=[..._0x4ffb24[_0x8073c5(0x169)](_0x4c185b=>[_0x4c185b[_0x8073c5(0x1ad)],_0x4c185b['datasetCode']]),...trackedHookDirectoryMappings(_0x36db32)['map'](_0x2fac4f=>[_0x2fac4f[_0x8073c5(0x1ad)],_0x2fac4f['datasetCode']])],_0x490e16=await listDatasets(_0x29ab11);assertUnambiguousHookDirectoryMappings(_0x17a007['map'](([_0x35fe97,_0x24bbde])=>({'alias':_0x35fe97,'datasetCode':_0x24bbde})));const _0x513554=buildHookDirectoryIndexes(_0x490e16,_0x17a007),_0x1b6033=new Map(),_0xfad8ad=preflightPushHookDirectories(_0x348264,_0x36db32,_0x513554,_0x1b6033),_0x14bd67=new Set(),_0x27592d=_0x348264[_0x8073c5(0x1c8)](_0x179448=>_0x1b6033[_0x8073c5(0x186)](_0x179448[_0x8073c5(0x1bd)])?.[_0x8073c5(0x1ba)](_0x8073c5(0x16b))&&_0x36db32['functions'][_0x179448[_0x8073c5(0x1bd)]]?.[_0x8073c5(0x16d)]&&_0x36db32[_0x8073c5(0x1a5)][_0x179448[_0x8073c5(0x1bd)]]?.[_0x8073c5(0x1b0)]);if(_0x27592d['length']>0x0){let _0x312fae;try{_0x312fae=await getBffScriptStatistics(_0x29ab11);}catch(_0x2cbc15){for(const _0x208459 of _0x27592d)_0x1b6033[_0x8073c5(0x170)](_0x208459[_0x8073c5(0x1bd)],_0x8073c5(0x1c4)+(_0x2cbc15 instanceof Error?_0x2cbc15['message']:String(_0x2cbc15)));return{'resolutions':_0xfad8ad,'failures':_0x1b6033,'existingHooks':_0x14bd67};}for(const _0x2b8a83 of _0x27592d){const _0x3ff00e=_0x36db32['functions'][_0x2b8a83[_0x8073c5(0x1bd)]];try{const _0x39ab95=new Set(_0x348264[_0x8073c5(0x1c8)](_0x4c2c9d=>_0x4c2c9d[_0x8073c5(0x1c1)]===_0x8073c5(0x1aa)&&_0x36db32[_0x8073c5(0x1a5)][_0x4c2c9d[_0x8073c5(0x1bd)]]?.['datasetCode']===_0x3ff00e['datasetCode'])[_0x8073c5(0x169)](_0x3cd37a=>_0x3cd37a[_0x8073c5(0x1ad)]));if(_0x39ab95['size']>0x1)throw CliErrors['validation'](_0x8073c5(0x161));const _0x2604fb=_0x312fae['flatMap'](_0x19d8ac=>[{'datasetCode':_0x19d8ac['datasetCode'],'operationType':snakeToCamel(_0x19d8ac['operationType']),'functionNode':'before','id':_0x19d8ac[_0x8073c5(0x177)]},{'datasetCode':_0x19d8ac[_0x8073c5(0x1b0)],'operationType':snakeToCamel(_0x19d8ac[_0x8073c5(0x18e)]),'functionNode':_0x8073c5(0x17d),'id':_0x19d8ac[_0x8073c5(0x1c2)]}])[_0x8073c5(0x1c8)](_0x5d6bd5=>_0x5d6bd5['id']===_0x3ff00e[_0x8073c5(0x16d)]),_0x55de8f=await getBffScriptInfo(_0x3ff00e[_0x8073c5(0x16d)]);if(_0x55de8f['id']!==_0x3ff00e[_0x8073c5(0x16d)]||_0x55de8f[_0x8073c5(0x18f)]!==_0x29ab11||_0x55de8f['scriptType']!==_0x8073c5(0x1aa)||_0x55de8f['functionName']!==_0x2b8a83[_0x8073c5(0x17c)]||_0x3ff00e[_0x8073c5(0x1ae)]==null||_0x55de8f[_0x8073c5(0x1ae)]!==_0x3ff00e[_0x8073c5(0x1ae)]||_0x2604fb[_0x8073c5(0x16c)]!==0x1||_0x2604fb[0x0][_0x8073c5(0x1b0)]!==_0x3ff00e[_0x8073c5(0x1b0)]||_0x2604fb[0x0][_0x8073c5(0x18e)]!==_0x2b8a83[_0x8073c5(0x18e)]||_0x2604fb[0x0]['functionNode']!==_0x2b8a83[_0x8073c5(0x191)]||_0x3ff00e[_0x8073c5(0x18e)]!==_0x2b8a83[_0x8073c5(0x18e)]||_0x3ff00e[_0x8073c5(0x191)]!==_0x2b8a83[_0x8073c5(0x191)])throw CliErrors[_0x8073c5(0x1b5)](_0x8073c5(0x196));_0x14bd67[_0x8073c5(0x179)](_0x2b8a83[_0x8073c5(0x1bd)]),_0x1b6033[_0x8073c5(0x18b)](_0x2b8a83[_0x8073c5(0x1bd)]);}catch(_0x28a51e){_0x1b6033[_0x8073c5(0x170)](_0x2b8a83['lockKey'],_0x28a51e instanceof Error?_0x28a51e['message']:String(_0x28a51e));}}}return{'resolutions':_0xfad8ad,'failures':_0x1b6033,'existingHooks':_0x14bd67};}async function uploadSingleFunction(_0x48a79e,_0x29b908,_0x4c7caa,_0x194b00){const _0x334703=a43_0x4f2448,_0x224da8=await readFile(_0x29b908[_0x334703(0x1a0)],_0x334703(0x19e)),_0x1172ca=await computeFileHash(_0x29b908[_0x334703(0x1a0)]),_0x2b316e=_0x4c7caa[_0x334703(0x1a5)][_0x29b908[_0x334703(0x1bd)]];if(_0x2b316e?.['remoteId']&&_0x2b316e[_0x334703(0x1ae)]==null)throw CliErrors[_0x334703(0x1b5)](_0x29b908['lockKey']+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x26ffb2=extractScriptDescription(_0x224da8);if(!_0x26ffb2&&_0x2b316e?.['remoteId']){const _0x4112e1=await getBffScriptInfo(_0x2b316e['remoteId']);_0x26ffb2=_0x4112e1[_0x334703(0x1c0)]||undefined;}const _0x1af32c={'appCode':_0x48a79e,'functionName':_0x29b908[_0x334703(0x17c)],'scriptType':_0x29b908[_0x334703(0x1c1)],'scriptContent':_0x224da8};if(_0x2b316e?.[_0x334703(0x16d)])_0x1af32c['id']=_0x2b316e['remoteId'];if(_0x2b316e?.[_0x334703(0x1ae)]!=null)_0x1af32c['version']=_0x2b316e['version'];if(_0x26ffb2)_0x1af32c['description']=_0x26ffb2;if(_0x29b908[_0x334703(0x1c1)]===_0x334703(0x1aa)){const _0x42b9d8=_0x194b00[_0x334703(0x1a4)]['get'](_0x29b908['lockKey']);if(!_0x42b9d8&&!_0x194b00[_0x334703(0x17a)]['has'](_0x29b908[_0x334703(0x1bd)])||!_0x29b908[_0x334703(0x18e)]||!_0x29b908[_0x334703(0x191)])throw CliErrors[_0x334703(0x1b5)](_0x334703(0x173)+_0x29b908[_0x334703(0x1bd)]);_0x42b9d8&&(_0x1af32c['datasetId']=_0x42b9d8['dataset']['id'],_0x1af32c[_0x334703(0x18e)]=_0x29b908[_0x334703(0x18e)]),_0x1af32c[_0x334703(0x191)]=_0x29b908[_0x334703(0x191)];}const _0x6aa4b9=await saveBffScript(_0x1af32c),_0xf3c576=_0x6aa4b9['id'],_0x4f656d=_0x6aa4b9[_0x334703(0x1cc)]??await getBffScriptInfo(_0xf3c576),_0x5a788c={'hash':_0x1172ca,'remoteId':_0xf3c576,'version':_0x4f656d['version']};if(_0x29b908[_0x334703(0x1c1)]===_0x334703(0x1aa)){const _0x4f54a2=_0x194b00[_0x334703(0x1a4)]['get'](_0x29b908[_0x334703(0x1bd)]);if(!_0x4f54a2){_0x4c7caa[_0x334703(0x1a5)][_0x29b908[_0x334703(0x1bd)]]={..._0x2b316e,..._0x5a788c};return;}_0x5a788c[_0x334703(0x1ad)]=_0x4f54a2[_0x334703(0x1ad)]??_0x2b316e?.[_0x334703(0x1ad)],_0x5a788c[_0x334703(0x1b0)]=_0x4f54a2[_0x334703(0x1b0)],_0x5a788c['operationType']=_0x29b908[_0x334703(0x18e)],_0x5a788c[_0x334703(0x191)]=_0x29b908[_0x334703(0x191)];}_0x4c7caa[_0x334703(0x1a5)][_0x29b908[_0x334703(0x1bd)]]=_0x5a788c;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x5bcc3b,_0xcc6c3d,_0x237ef8){const _0x51389f=a43_0x4f2448;if(_0x237ef8[_0x51389f(0x16c)]===0x0)return;for(let _0x44c83d=0x0;_0x44c83d<LOCK_SETTLE_RETRY_COUNT;_0x44c83d+=0x1){const _0x25a808=await readBffLockFile(_0x5bcc3b),_0x21c886=_0x25a808?.[_0x51389f(0x185)]?.[_0xcc6c3d]?.['functions']??{},_0x4af4ac=_0x237ef8[_0x51389f(0x1b9)](_0x49c00d=>!!_0x21c886[_0x49c00d]?.[_0x51389f(0x16d)]);if(_0x4af4ac)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x51389f(0x192)+_0x237ef8['join'](',\x20')+'.');}
|
|
1
|
+
const a43_0x254bcd=a43_0x4ea9;(function(_0x13cdc4,_0x5b0eb3){const _0x243309=a43_0x4ea9,_0x49bf6f=_0x13cdc4();while(!![]){try{const _0x297e6b=parseInt(_0x243309(0x1af))/0x1+-parseInt(_0x243309(0x1de))/0x2*(-parseInt(_0x243309(0x1c3))/0x3)+-parseInt(_0x243309(0x1da))/0x4+parseInt(_0x243309(0x197))/0x5*(parseInt(_0x243309(0x19f))/0x6)+parseInt(_0x243309(0x1e7))/0x7+parseInt(_0x243309(0x1c5))/0x8*(parseInt(_0x243309(0x1ec))/0x9)+-parseInt(_0x243309(0x1b7))/0xa;if(_0x297e6b===_0x5b0eb3)break;else _0x49bf6f['push'](_0x49bf6f['shift']());}catch(_0x2ecd5f){_0x49bf6f['push'](_0x49bf6f['shift']());}}}(a43_0x1857,0x7d949));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,getBffScriptStatistics,getPlatformErrorCode,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiModelSource}from'../../api/model-source.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{buildHookDirectoryIndexes,assertUnambiguousHookAliases,assertUnambiguousHookDirectoryMappings,preflightPushHookDirectories,trackedHookDirectoryMappings}from'../../core/bff/hook-directory.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';function a43_0x4ea9(_0x52f7ff,_0x3ba263){_0x52f7ff=_0x52f7ff-0x197;const _0x1857cd=a43_0x1857();let _0x4ea9bf=_0x1857cd[_0x52f7ff];return _0x4ea9bf;}import{extractScriptDescription,snakeToCamel}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':'bff','command':a43_0x254bcd(0x1d2),'description':a43_0x254bcd(0x1f6),'risk':a43_0x254bcd(0x1d1),'structuredErrors':!![],'flags':[{'name':a43_0x254bcd(0x19c),'type':a43_0x254bcd(0x1e8),'description':'Push\x20only\x20this\x20script\x20type','enum':['COMMON','ENDPOINT',a43_0x254bcd(0x1c4)]},{'name':a43_0x254bcd(0x1c7),'type':a43_0x254bcd(0x1e8),'description':a43_0x254bcd(0x1c0)},{'name':a43_0x254bcd(0x200),'type':'boolean','description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x2d8649){const _0xb2a441=a43_0x254bcd,_0x13018d=loadBffProjectConfig(_0x2d8649[_0xb2a441(0x1b1)]),_0x3fc8e9=await readBffLockFile(_0x13018d['lockFilePath']),{appLock:_0x5af0bb}=ensureLockScope(_0x3fc8e9??createEmptyBffLock(),_0x2d8649[_0xb2a441(0x1b1)],_0x13018d[_0xb2a441(0x1b2)],_0xb2a441(0x1d2)),_0x12d8a1=await getTargetFunctions(_0x13018d,_0x2d8649),_0x1e804a=_0x12d8a1[_0xb2a441(0x1d5)](_0x3c7693=>_0x3c7693[_0xb2a441(0x19c)]===_0xb2a441(0x1c4))?await scanLocalBffFunctions(_0x13018d,_0xb2a441(0x1c4)):_0x12d8a1,_0x508752=await buildHookMaps(_0x2d8649[_0xb2a441(0x1b1)],_0x2d8649['apiDir'],_0x1e804a,_0x5af0bb,_0x2d8649[_0xb2a441(0x1e2)]||_0x2d8649[_0xb2a441(0x1cf)]?.[_0xb2a441(0x198)]||_0x2d8649[_0xb2a441(0x1cf)]?.[_0xb2a441(0x1fd)]),_0x778d07=_0x2d8649['bool']('force'),_0x16e457=[];for(const _0x5bcf1c of _0x12d8a1){const _0x5e6134=await computeFileHash(_0x5bcf1c['filePath']),_0x49281a=_0x5af0bb['functions'][_0x5bcf1c['lockKey']],_0x875525=!!_0x49281a&&_0x49281a['hash']===_0x5e6134,_0x288890=_0x508752[_0xb2a441(0x1a4)]['get'](_0x5bcf1c['lockKey']),_0x15f470=!!_0x49281a?.['remoteId']&&_0x49281a[_0xb2a441(0x1c1)]==null&&(_0x778d07||!_0x875525),_0x4b589e=_0x15f470?missingRemoteVersionConflict(_0x5bcf1c,_0x49281a):undefined,_0x33b21e=_0x508752[_0xb2a441(0x1ce)][_0xb2a441(0x1a9)](_0x5bcf1c[_0xb2a441(0x1ff)])?_0xb2a441(0x1a5):!_0x778d07&&_0x875525?_0xb2a441(0x1d3):_0x4b589e?_0xb2a441(0x1f4):'would_push';_0x16e457[_0xb2a441(0x1d2)]({'lockKey':_0x5bcf1c['lockKey'],'filePath':_0x5bcf1c[_0xb2a441(0x1ba)],'remoteId':_0x49281a?.[_0xb2a441(0x1b4)]??null,'mode':_0x49281a?.[_0xb2a441(0x1b4)]?'update':'create','status':_0x33b21e,..._0x508752[_0xb2a441(0x1ce)][_0xb2a441(0x1a9)](_0x5bcf1c[_0xb2a441(0x1ff)])?{'error':_0x508752['failures'][_0xb2a441(0x1c9)](_0x5bcf1c[_0xb2a441(0x1ff)])}:{},..._0x4b589e?{'conflict':_0x4b589e}:{},..._0x508752['existingHooks'][_0xb2a441(0x1a9)](_0x5bcf1c[_0xb2a441(0x1ff)])?{'datasetCode':_0x49281a?.[_0xb2a441(0x19a)],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x5bcf1c[_0xb2a441(0x1ff)])]}:{},..._0x288890?{'alias':_0x288890[_0xb2a441(0x1a7)]??null,'datasetCode':_0x288890[_0xb2a441(0x19a)],'operationType':_0x5bcf1c[_0xb2a441(0x1db)],'functionNode':_0x5bcf1c[_0xb2a441(0x1ac)],'warnings':_0x288890[_0xb2a441(0x199)]}:{}});}return{'method':_0xb2a441(0x1b0),'url':_0xb2a441(0x1ae),'body':{'appCode':_0x2d8649[_0xb2a441(0x1b1)],'force':_0x778d07,'files':_0x16e457,'cacheClearAtRuntime':_0x16e457[_0xb2a441(0x1d5)](_0x289185=>_0x289185[_0xb2a441(0x202)]===_0xb2a441(0x1f9)),'cacheClearAtRuntimeTimes':_0x16e457['some'](_0x1bc0c9=>_0x1bc0c9[_0xb2a441(0x202)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0xb2a441(0x1bb)+_0x16e457[_0xb2a441(0x1b6)]+_0xb2a441(0x1b8)};},async 'execute'(_0x223dba){const _0x21a8cb=a43_0x254bcd,_0x59122d=loadBffProjectConfig(_0x223dba[_0x21a8cb(0x1b1)]),_0x20a553=await readBffLockFile(_0x59122d['lockFilePath']),{lockData:_0xfd7f53,appLock:_0x1406ae}=ensureLockScope(_0x20a553??createEmptyBffLock(),_0x223dba[_0x21a8cb(0x1b1)],_0x59122d[_0x21a8cb(0x1b2)],_0x21a8cb(0x1d2)),_0x412f0a=await getTargetFunctions(_0x59122d,_0x223dba);if(_0x412f0a[_0x21a8cb(0x1b6)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':_0x21a8cb(0x1ea)};const _0xf9d7d2=_0x223dba['bool']('force'),_0x42a1a0=JSON['parse'](JSON[_0x21a8cb(0x1ca)](_0xfd7f53)),_0x255f3b=_0x42a1a0[_0x21a8cb(0x1bf)][_0x223dba[_0x21a8cb(0x1b1)]];if(!_0x255f3b)throw new Error(_0x21a8cb(0x1aa)+_0x223dba[_0x21a8cb(0x1b1)]+_0x21a8cb(0x1be));const _0x4ad1f1=_0x412f0a[_0x21a8cb(0x1d5)](_0x25d34d=>_0x25d34d[_0x21a8cb(0x19c)]===_0x21a8cb(0x1c4))?await scanLocalBffFunctions(_0x59122d,_0x21a8cb(0x1c4)):_0x412f0a,_0x1c6212=await buildHookMaps(_0x223dba[_0x21a8cb(0x1b1)],_0x223dba['apiDir'],_0x4ad1f1,_0x255f3b,_0x223dba[_0x21a8cb(0x1e2)]||_0x223dba[_0x21a8cb(0x1cf)]?.[_0x21a8cb(0x198)]||_0x223dba[_0x21a8cb(0x1cf)]?.['defaultApp']),_0x5e31e6=[],_0xa1c29c=[],_0x449434=[],_0x34369c=[];for(const _0xaebfba of _0x412f0a){const _0x3dfc45=_0x1c6212[_0x21a8cb(0x1ce)][_0x21a8cb(0x1c9)](_0xaebfba[_0x21a8cb(0x1ff)]);if(_0x3dfc45){_0x34369c[_0x21a8cb(0x1d2)]({'lockKey':_0xaebfba[_0x21a8cb(0x1ff)],'error':_0x3dfc45});continue;}const _0x54f4e2=await computeFileHash(_0xaebfba['filePath']),_0x28d370=_0x255f3b[_0x21a8cb(0x1df)][_0xaebfba[_0x21a8cb(0x1ff)]];if(!_0xf9d7d2&&_0x28d370&&_0x28d370[_0x21a8cb(0x1bc)]===_0x54f4e2){_0xa1c29c[_0x21a8cb(0x1d2)]({'lockKey':_0xaebfba['lockKey'],'reason':'unchanged'});continue;}if(_0x28d370?.[_0x21a8cb(0x1b4)]&&_0x28d370[_0x21a8cb(0x1c1)]==null){_0x449434['push'](missingRemoteVersionConflict(_0xaebfba,_0x28d370));continue;}try{await uploadSingleFunction(_0x223dba[_0x21a8cb(0x1b1)],_0xaebfba,_0x255f3b,_0x1c6212);const _0x2cd6f2=_0x255f3b['functions'][_0xaebfba['lockKey']];_0x5e31e6[_0x21a8cb(0x1d2)]({'lockKey':_0xaebfba[_0x21a8cb(0x1ff)],'remoteId':_0x2cd6f2?.[_0x21a8cb(0x1b4)]??0x0});}catch(_0x35505c){const _0x2298a0=remoteVersionChangedConflict(_0xaebfba,_0x28d370,_0x35505c);if(_0x2298a0){_0x449434[_0x21a8cb(0x1d2)](_0x2298a0);continue;}_0x34369c[_0x21a8cb(0x1d2)]({'lockKey':_0xaebfba['lockKey'],'error':_0x35505c instanceof Error?_0x35505c[_0x21a8cb(0x1f8)]:String(_0x35505c)});}}_0x255f3b[_0x21a8cb(0x1e3)]=new Date()[_0x21a8cb(0x1e0)](),await writeBffLockFile(_0x59122d[_0x21a8cb(0x1fe)],_0x42a1a0),await waitForUploadedLockEntries(_0x59122d['lockFilePath'],_0x223dba['appCode'],_0x5e31e6[_0x21a8cb(0x1f7)](_0x542958=>_0x542958[_0x21a8cb(0x1ff)]));let _0x201d72={'attempted':![],'cleared':![]};if(_0x5e31e6['length']>0x0)try{let _0x407a31='';for(let _0x2306f0=0x0;_0x2306f0<CACHE_CLEAR_ATTEMPTS;_0x2306f0+=0x1){_0x407a31=await clearBffScriptCache(),_0x2306f0<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x201d72={'attempted':!![],'cleared':!![],'message':_0x407a31||_0x21a8cb(0x19d)};}catch(_0x3378b8){_0x201d72={'attempted':!![],'cleared':![],'error':_0x3378b8 instanceof Error?_0x3378b8[_0x21a8cb(0x1f8)]:String(_0x3378b8)};}const _0xe2ace1=_0x34369c[_0x21a8cb(0x1b6)]===0x0&&(_0x201d72['attempted']?_0x201d72[_0x21a8cb(0x1bd)]:!![]),_0x1bd856=_0xe2ace1,_0x266ea4=_0x201d72['attempted']?_0x201d72[_0x21a8cb(0x1bd)]?_0x21a8cb(0x1f2):_0x21a8cb(0x1d7):_0x21a8cb(0x1f3);return{'ok':_0x1bd856,'data':{'uploaded':_0x5e31e6,'skipped':_0xa1c29c,'conflicts':_0x449434,'failed':_0x34369c,'cacheClear':_0x201d72,'warnings':[...[..._0x1c6212[_0x21a8cb(0x1a4)]['values']()][_0x21a8cb(0x1d9)](_0x379aff=>_0x379aff[_0x21a8cb(0x199)]),...[..._0x1c6212['existingHooks']][_0x21a8cb(0x1f7)](existingHookWarning)]},'message':formatPushMessage(_0x5e31e6[_0x21a8cb(0x1b6)],_0xa1c29c[_0x21a8cb(0x1b6)],_0x449434[_0x21a8cb(0x1b6)],_0x34369c[_0x21a8cb(0x1b6)],_0x266ea4)};}};function missingRemoteVersionConflict(_0x4c060c,_0x27b47e){const _0x3b1724=a43_0x254bcd;return remoteVersionConflict(_0x4c060c,_0x27b47e,_0x3b1724(0x1ed),_0x3b1724(0x1a6));}function remoteVersionChangedConflict(_0x454c22,_0x16a8fb,_0x3091f3){const _0x356092=a43_0x254bcd;if(!_0x16a8fb?.[_0x356092(0x1b4)]||_0x16a8fb['version']==null||!isRemoteVersionConflict(_0x3091f3))return undefined;return remoteVersionConflict(_0x454c22,_0x16a8fb,_0x356092(0x1d0),'Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.');}function remoteVersionConflict(_0x468980,_0x2ac06f,_0x3907fe,_0x1a431d){const _0x3a6f76=a43_0x254bcd;return{'code':_0x3907fe,'lockKey':_0x468980[_0x3a6f76(0x1ff)],'filePath':_0x468980[_0x3a6f76(0x1ba)],'remoteId':_0x2ac06f['remoteId'],..._0x2ac06f['version']!=null?{'expectedVersion':_0x2ac06f['version']}:{},'message':_0x1a431d,'nextAction':{'action':_0x3a6f76(0x1e9),'command':CLI_BIN_NAME+_0x3a6f76(0x1c2)+_0x2ac06f[_0x3a6f76(0x1b4)]+_0x3a6f76(0x1a0),'requiresReview':!![],'message':_0x3a6f76(0x1f1)}};}function isRemoteVersionConflict(_0x3e6566){const _0x92af24=a43_0x254bcd,_0x24ef9a=_0x3e6566 instanceof Error?_0x3e6566[_0x92af24(0x1f8)]:String(_0x3e6566),_0x2a5a8f=getPlatformErrorCode(_0x3e6566)??'';return[_0x24ef9a,_0x2a5a8f][_0x92af24(0x1d5)](_0x878431=>/(?:version|optimistic)[\s_-]*(?:conflict|mismatch|changed|stale|out[\s_-]*of[\s_-]*date)|(?:conflict|mismatch|changed|stale|out[\s_-]*of[\s_-]*date)[\s_-]*(?:version|optimistic)/i[_0x92af24(0x1e5)](_0x878431));}function formatPushMessage(_0x5a2c84,_0x3f7635,_0x1ac85c,_0x55f6ca,_0x20ece6){const _0x2a318f=a43_0x254bcd,_0x4b7641=[_0x2a318f(0x1a1)+_0x5a2c84+_0x2a318f(0x1c6),_0x3f7635+'\x20skipped'];_0x1ac85c>0x0&&_0x4b7641[_0x2a318f(0x1d2)](_0x1ac85c+_0x2a318f(0x1dd)+(_0x1ac85c===0x1?'':'s')+'\x20'+(_0x1ac85c===0x1?_0x2a318f(0x1cb):_0x2a318f(0x1b9))+_0x2a318f(0x201));if(_0x55f6ca>0x0)_0x4b7641[_0x2a318f(0x1d2)](_0x55f6ca+_0x2a318f(0x1d8));return _0x4b7641[_0x2a318f(0x1d2)](_0x20ece6),_0x4b7641[_0x2a318f(0x1e1)](',\x20');}async function getTargetFunctions(_0x4c30ff,_0xa8fe30){const _0x6e4250=a43_0x254bcd,_0x4db6fe=_0xa8fe30[_0x6e4250(0x1a3)](_0x6e4250(0x19c)),_0x1e9325=_0xa8fe30[_0x6e4250(0x1a3)](_0x6e4250(0x1c7)),_0x1d00ed=normalizeBffType(_0x4db6fe)??undefined;if(_0x1e9325&&!_0x1d00ed)throw CliErrors[_0x6e4250(0x1fb)](_0x6e4250(0x19b));const _0x59b48b=await scanLocalBffFunctions(_0x4c30ff,_0x1d00ed);if(_0x1e9325){const _0x109fd5=_0x59b48b[_0x6e4250(0x1cd)](_0x38a57f=>_0x38a57f['name']===_0x1e9325);if(_0x109fd5[_0x6e4250(0x1b6)]===0x0)throw CliErrors[_0x6e4250(0x1fb)](_0x6e4250(0x1ab)+_0x1d00ed+'/'+_0x1e9325);return _0x109fd5;}return _0x59b48b;}function existingHookWarning(_0x389363){const _0x1f3411=a43_0x254bcd;return{'code':_0x1f3411(0x1f5),'lockKey':_0x389363,'message':_0x1f3411(0x1cc)};}function a43_0x1857(){const _0x3a6c70=['appCode','scriptsRoot','script','remoteId','Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.','length','19629190clKZaD','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','require','filePath','Would\x20inspect\x20','hash','cleared','\x22\x20not\x20found\x20after\x20ensureLockScope.','apps','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','version','\x20bff\x20detail\x20--id\x20','543GbmqCO','HOOK','35656ApsRPa','\x20uploaded','name','utf8','get','stringify','requires','Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.','filter','failures','mergedCli','BFF_REMOTE_VERSION_CHANGED','write','push','unchanged','every','some','existingHooks','runtime\x20cache\x20clear\x20failed','\x20failed','flatMap','1522536AFHXzj','operationType','set','\x20conflict','9578RUcOFQ','functions','toISOString','join','selectedAppName','lastSync','HOOK_DATASET_NOT_FOUND:','test','beforeScriptId','5469499tHdBPN','string','review_remote_and_merge','No\x20local\x20Backend\x20Function\x20scripts\x20found.','datasetId','1917CizQEG','BFF_REMOTE_VERSION_MISSING','Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.','dataset','description','Review\x20the\x20current\x20remote\x20source,\x20merge\x20it\x20into\x20the\x20local\x20script,\x20then\x20retry\x20push.\x20Do\x20not\x20use\x20--force\x20unless\x20you\x20intentionally\x20discard\x20local\x20changes.','runtime\x20cache\x20cleared','runtime\x20cache\x20not\x20needed','conflict','EXISTING_HOOK_BINDING_PRESERVED','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','map','message','would_push',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','validation','add','defaultApp','lockFilePath','lockKey','force','\x20resolution','status','20WNuBav','currentApp','warnings','datasetCode','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','type','Runtime\x20script\x20cache\x20cleared.','delete','203754RojoLa','\x20--format\x20compress','Push\x20complete:\x20','startsWith','str','resolutions','failed','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','alias','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','has','Lock\x20scope\x20for\x20app\x20\x22','Local\x20function\x20not\x20found:\x20','functionNode','Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20','/api/management/library/scripts/save','124587jdmpEj','POST'];a43_0x1857=function(){return _0x3a6c70;};return a43_0x1857();}async function buildHookMaps(_0xab5fc6,_0x1bb6b1,_0x48e64c,_0x5e0362,_0x47aa8e){const _0x1ae22d=a43_0x254bcd,_0x5d239b=_0x48e64c[_0x1ae22d(0x1d5)](_0x1d38c6=>_0x1d38c6['type']===_0x1ae22d(0x1c4));if(!_0x5d239b)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0x5a1462=resolveApiModelSource(_0x1bb6b1,_0xab5fc6,_0x47aa8e),_0x2fa2d9=loadAliasMap(_0x1bb6b1,undefined,_0x5a1462[_0x1ae22d(0x1ba)],_0x5a1462['profileName']);assertUnambiguousHookAliases(_0x2fa2d9);const _0x289087=[..._0x2fa2d9[_0x1ae22d(0x1f7)](_0x429b55=>[_0x429b55[_0x1ae22d(0x1a7)],_0x429b55[_0x1ae22d(0x19a)]]),...trackedHookDirectoryMappings(_0x5e0362)[_0x1ae22d(0x1f7)](_0x5f5bc0=>[_0x5f5bc0[_0x1ae22d(0x1a7)],_0x5f5bc0[_0x1ae22d(0x19a)]])],_0x2aa81a=await listDatasets(_0xab5fc6);assertUnambiguousHookDirectoryMappings(_0x289087[_0x1ae22d(0x1f7)](([_0x359e28,_0x1950a3])=>({'alias':_0x359e28,'datasetCode':_0x1950a3})));const _0x58da4e=buildHookDirectoryIndexes(_0x2aa81a,_0x289087),_0x14bccc=new Map(),_0x18ade9=preflightPushHookDirectories(_0x48e64c,_0x5e0362,_0x58da4e,_0x14bccc),_0x5b6b84=new Set(),_0x51fe59=_0x48e64c[_0x1ae22d(0x1cd)](_0x3a46d6=>_0x14bccc[_0x1ae22d(0x1c9)](_0x3a46d6[_0x1ae22d(0x1ff)])?.[_0x1ae22d(0x1a2)](_0x1ae22d(0x1e4))&&_0x5e0362['functions'][_0x3a46d6[_0x1ae22d(0x1ff)]]?.['remoteId']&&_0x5e0362['functions'][_0x3a46d6['lockKey']]?.[_0x1ae22d(0x19a)]);if(_0x51fe59[_0x1ae22d(0x1b6)]>0x0){let _0x3368b4;try{_0x3368b4=await getBffScriptStatistics(_0xab5fc6);}catch(_0x21fb27){for(const _0x4e090e of _0x51fe59)_0x14bccc[_0x1ae22d(0x1dc)](_0x4e090e['lockKey'],_0x1ae22d(0x1ad)+(_0x21fb27 instanceof Error?_0x21fb27[_0x1ae22d(0x1f8)]:String(_0x21fb27)));return{'resolutions':_0x18ade9,'failures':_0x14bccc,'existingHooks':_0x5b6b84};}for(const _0x286b2c of _0x51fe59){const _0x2d5906=_0x5e0362['functions'][_0x286b2c[_0x1ae22d(0x1ff)]];try{const _0x20e1e8=new Set(_0x48e64c[_0x1ae22d(0x1cd)](_0x29a750=>_0x29a750[_0x1ae22d(0x19c)]===_0x1ae22d(0x1c4)&&_0x5e0362[_0x1ae22d(0x1df)][_0x29a750[_0x1ae22d(0x1ff)]]?.[_0x1ae22d(0x19a)]===_0x2d5906[_0x1ae22d(0x19a)])['map'](_0x446d37=>_0x446d37[_0x1ae22d(0x1a7)]));if(_0x20e1e8['size']>0x1)throw CliErrors['validation'](_0x1ae22d(0x1b5));const _0x109a89=_0x3368b4[_0x1ae22d(0x1d9)](_0x1767dc=>[{'datasetCode':_0x1767dc['datasetCode'],'operationType':snakeToCamel(_0x1767dc['operationType']),'functionNode':'before','id':_0x1767dc[_0x1ae22d(0x1e6)]},{'datasetCode':_0x1767dc['datasetCode'],'operationType':snakeToCamel(_0x1767dc[_0x1ae22d(0x1db)]),'functionNode':'after','id':_0x1767dc['afterScriptId']}])[_0x1ae22d(0x1cd)](_0x505e0b=>_0x505e0b['id']===_0x2d5906['remoteId']),_0x3f2c80=await getBffScriptInfo(_0x2d5906[_0x1ae22d(0x1b4)]);if(_0x3f2c80['id']!==_0x2d5906[_0x1ae22d(0x1b4)]||_0x3f2c80['appCode']!==_0xab5fc6||_0x3f2c80['scriptType']!==_0x1ae22d(0x1c4)||_0x3f2c80['functionName']!==_0x286b2c[_0x1ae22d(0x1c7)]||_0x2d5906[_0x1ae22d(0x1c1)]==null||_0x3f2c80[_0x1ae22d(0x1c1)]!==_0x2d5906[_0x1ae22d(0x1c1)]||_0x109a89[_0x1ae22d(0x1b6)]!==0x1||_0x109a89[0x0][_0x1ae22d(0x19a)]!==_0x2d5906['datasetCode']||_0x109a89[0x0][_0x1ae22d(0x1db)]!==_0x286b2c[_0x1ae22d(0x1db)]||_0x109a89[0x0][_0x1ae22d(0x1ac)]!==_0x286b2c['functionNode']||_0x2d5906['operationType']!==_0x286b2c['operationType']||_0x2d5906[_0x1ae22d(0x1ac)]!==_0x286b2c['functionNode'])throw CliErrors[_0x1ae22d(0x1fb)](_0x1ae22d(0x1ee));_0x5b6b84[_0x1ae22d(0x1fc)](_0x286b2c['lockKey']),_0x14bccc[_0x1ae22d(0x19e)](_0x286b2c['lockKey']);}catch(_0x121f0c){_0x14bccc[_0x1ae22d(0x1dc)](_0x286b2c[_0x1ae22d(0x1ff)],_0x121f0c instanceof Error?_0x121f0c['message']:String(_0x121f0c));}}}return{'resolutions':_0x18ade9,'failures':_0x14bccc,'existingHooks':_0x5b6b84};}async function uploadSingleFunction(_0x1811c6,_0x17489a,_0x306538,_0x21375b){const _0x3b728b=a43_0x254bcd,_0xb41902=await readFile(_0x17489a[_0x3b728b(0x1ba)],_0x3b728b(0x1c8)),_0x35100e=await computeFileHash(_0x17489a[_0x3b728b(0x1ba)]),_0x59cf52=_0x306538['functions'][_0x17489a[_0x3b728b(0x1ff)]];if(_0x59cf52?.['remoteId']&&_0x59cf52[_0x3b728b(0x1c1)]==null)throw CliErrors['validation'](_0x17489a[_0x3b728b(0x1ff)]+_0x3b728b(0x1fa));let _0x5ac50b=extractScriptDescription(_0xb41902);if(!_0x5ac50b&&_0x59cf52?.[_0x3b728b(0x1b4)]){const _0xddf6da=await getBffScriptInfo(_0x59cf52[_0x3b728b(0x1b4)]);_0x5ac50b=_0xddf6da[_0x3b728b(0x1f0)]||undefined;}const _0x54eae3={'appCode':_0x1811c6,'functionName':_0x17489a[_0x3b728b(0x1c7)],'scriptType':_0x17489a[_0x3b728b(0x19c)],'scriptContent':_0xb41902};if(_0x59cf52?.[_0x3b728b(0x1b4)])_0x54eae3['id']=_0x59cf52[_0x3b728b(0x1b4)];if(_0x59cf52?.[_0x3b728b(0x1c1)]!=null)_0x54eae3[_0x3b728b(0x1c1)]=_0x59cf52[_0x3b728b(0x1c1)];if(_0x5ac50b)_0x54eae3[_0x3b728b(0x1f0)]=_0x5ac50b;if(_0x17489a[_0x3b728b(0x19c)]===_0x3b728b(0x1c4)){const _0x188cc5=_0x21375b['resolutions'][_0x3b728b(0x1c9)](_0x17489a[_0x3b728b(0x1ff)]);if(!_0x188cc5&&!_0x21375b[_0x3b728b(0x1d6)]['has'](_0x17489a[_0x3b728b(0x1ff)])||!_0x17489a[_0x3b728b(0x1db)]||!_0x17489a[_0x3b728b(0x1ac)])throw CliErrors[_0x3b728b(0x1fb)]('Incomplete\x20HOOK\x20path:\x20'+_0x17489a[_0x3b728b(0x1ff)]);_0x188cc5&&(_0x54eae3[_0x3b728b(0x1eb)]=_0x188cc5[_0x3b728b(0x1ef)]['id'],_0x54eae3[_0x3b728b(0x1db)]=_0x17489a[_0x3b728b(0x1db)]),_0x54eae3[_0x3b728b(0x1ac)]=_0x17489a[_0x3b728b(0x1ac)];}const _0x4576a8=await saveBffScript(_0x54eae3),_0x283539=_0x4576a8['id'],_0x3dfc38=_0x4576a8[_0x3b728b(0x1b3)]??await getBffScriptInfo(_0x283539),_0x4bd4b8={'hash':_0x35100e,'remoteId':_0x283539,'version':_0x3dfc38[_0x3b728b(0x1c1)]};if(_0x17489a[_0x3b728b(0x19c)]===_0x3b728b(0x1c4)){const _0x18b6e0=_0x21375b[_0x3b728b(0x1a4)][_0x3b728b(0x1c9)](_0x17489a[_0x3b728b(0x1ff)]);if(!_0x18b6e0){_0x306538['functions'][_0x17489a[_0x3b728b(0x1ff)]]={..._0x59cf52,..._0x4bd4b8};return;}_0x4bd4b8[_0x3b728b(0x1a7)]=_0x18b6e0['alias']??_0x59cf52?.['alias'],_0x4bd4b8[_0x3b728b(0x19a)]=_0x18b6e0[_0x3b728b(0x19a)],_0x4bd4b8[_0x3b728b(0x1db)]=_0x17489a[_0x3b728b(0x1db)],_0x4bd4b8[_0x3b728b(0x1ac)]=_0x17489a[_0x3b728b(0x1ac)];}_0x306538[_0x3b728b(0x1df)][_0x17489a[_0x3b728b(0x1ff)]]=_0x4bd4b8;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x192d13,_0x21fbdf,_0x1d48e3){const _0x2f74fb=a43_0x254bcd;if(_0x1d48e3[_0x2f74fb(0x1b6)]===0x0)return;for(let _0x17b430=0x0;_0x17b430<LOCK_SETTLE_RETRY_COUNT;_0x17b430+=0x1){const _0x18296b=await readBffLockFile(_0x192d13),_0x5195c0=_0x18296b?.[_0x2f74fb(0x1bf)]?.[_0x21fbdf]?.['functions']??{},_0x15685c=_0x1d48e3[_0x2f74fb(0x1d4)](_0x50b184=>!!_0x5195c0[_0x50b184]?.[_0x2f74fb(0x1b4)]);if(_0x15685c)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x2f74fb(0x1a8)+_0x1d48e3[_0x2f74fb(0x1e1)](',\x20')+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a44_0x12be(_0x1987b6,_0x1789bb){_0x1987b6=_0x1987b6-0x138;const _0x14250e=a44_0x1425();let _0x12be73=_0x14250e[_0x1987b6];return _0x12be73;}const a44_0x2d99c9=a44_0x12be;(function(_0x1e8b44,_0x451445){const _0x132732=a44_0x12be,_0x4ec8b0=_0x1e8b44();while(!![]){try{const _0x5516c0=parseInt(_0x132732(0x138))/0x1*(-parseInt(_0x132732(0x13f))/0x2)+-parseInt(_0x132732(0x146))/0x3*(parseInt(_0x132732(0x13e))/0x4)+parseInt(_0x132732(0x150))/0x5+parseInt(_0x132732(0x14f))/0x6*(-parseInt(_0x132732(0x148))/0x7)+parseInt(_0x132732(0x158))/0x8+parseInt(_0x132732(0x15a))/0x9*(parseInt(_0x132732(0x145))/0xa)+parseInt(_0x132732(0x156))/0xb*(-parseInt(_0x132732(0x141))/0xc);if(_0x5516c0===_0x451445)break;else _0x4ec8b0['push'](_0x4ec8b0['shift']());}catch(_0x53816e){_0x4ec8b0['push'](_0x4ec8b0['shift']());}}}(a44_0x1425,0xbc11e));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiModelSource}from'../../api/model-source.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a44_0x2d99c9(0x14c),'command':a44_0x2d99c9(0x149),'description':a44_0x2d99c9(0x142),'risk':a44_0x2d99c9(0x153),'flags':[{'name':'remote','type':a44_0x2d99c9(0x143),'description':'Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally'}],async 'execute'(_0x24a5c5){const _0x12ea71=a44_0x2d99c9,_0x550106=loadBffProjectConfig(_0x24a5c5[_0x12ea71(0x13a)]),_0x322b29=await readBffLockFile(_0x550106[_0x12ea71(0x154)]),{appLock:_0x149da7}=ensureLockScope(_0x322b29??createEmptyBffLock(),_0x24a5c5[_0x12ea71(0x13a)],_0x550106['scriptsRoot'],_0x12ea71(0x149)),_0x1e50f6=await scanLocalBffFunctions(_0x550106),_0x4d83eb=[],_0x1980c1=[],_0x27bcda=[];for(const _0x5cc3f0 of _0x1e50f6){const _0x3135ca=await computeFileHash(_0x5cc3f0['filePath']),_0xa7ead5=_0x149da7['functions'][_0x5cc3f0['lockKey']];if(!_0xa7ead5)_0x4d83eb[_0x12ea71(0x157)](_0x5cc3f0[_0x12ea71(0x144)]);else _0xa7ead5['hash']!==_0x3135ca?_0x1980c1['push'](_0x5cc3f0['lockKey']):_0x27bcda[_0x12ea71(0x157)](_0x5cc3f0['lockKey']);}const _0x16e3cc=[];if(_0x24a5c5['bool']('remote')){const _0x38a500=resolveApiModelSource(_0x24a5c5[_0x12ea71(0x155)],_0x24a5c5['appCode'],_0x24a5c5[_0x12ea71(0x139)]||_0x24a5c5[_0x12ea71(0x159)]?.[_0x12ea71(0x147)]||_0x24a5c5[_0x12ea71(0x159)]?.[_0x12ea71(0x13b)]),_0x4600ff=loadAliasMap(_0x24a5c5[_0x12ea71(0x155)],undefined,_0x38a500['filePath'],_0x38a500[_0x12ea71(0x151)]),_0x25f558=new Map(_0x4600ff[_0x12ea71(0x14b)](_0x58cac8=>[_0x58cac8['datasetCode'],_0x58cac8['alias']])),[_0x5a54d4,_0xd072c5]=await Promise[_0x12ea71(0x152)]([listBffScripts(_0x24a5c5[_0x12ea71(0x13a)]),getBffScriptStatistics(_0x24a5c5[_0x12ea71(0x13a)])]),_0x477af5=createHookLocationMap(_0xd072c5),_0x44b1a7=new Set(_0x1e50f6[_0x12ea71(0x14b)](_0x559f1d=>_0x559f1d['lockKey']));for(const _0x5cc923 of _0x5a54d4){const _0xf43398=resolveRemoteScriptTarget(_0x550106,_0x5cc923,_0x477af5,_0x149da7[_0x12ea71(0x13d)],_0x25f558);_0xf43398&&!_0x44b1a7[_0x12ea71(0x14d)](_0xf43398[_0x12ea71(0x144)])&&_0x16e3cc[_0x12ea71(0x157)](_0xf43398[_0x12ea71(0x144)]);}}const _0x584e71=_0x4d83eb['length']===0x0&&_0x1980c1['length']===0x0&&_0x16e3cc[_0x12ea71(0x140)]===0x0;return{'ok':!![],'data':{'added':_0x4d83eb,'modified':_0x1980c1,'unchanged':_0x27bcda,'remoteOnly':_0x16e3cc},'message':_0x584e71?_0x12ea71(0x14a):_0x4d83eb[_0x12ea71(0x140)]+'\x20added,\x20'+_0x1980c1['length']+'\x20modified,\x20'+_0x27bcda[_0x12ea71(0x140)]+_0x12ea71(0x13c)+(_0x16e3cc['length']>0x0?',\x20'+_0x16e3cc['length']+_0x12ea71(0x14e):'')};}};function a44_0x1425(){const _0x2c72b9=['currentApp','287dRaoIW','status','All\x20Backend\x20Function\x20scripts\x20are\x20in\x20sync.','map','bff','has','\x20remote-only','104712SmhHuv','5621215BkuQRZ','profileName','all','read','lockFilePath','apiDir','4037GvEtzf','push','7618320InpOub','mergedCli','915507EofJeT','69731YAGIdJ','selectedAppName','appCode','defaultApp','\x20unchanged','functions','513556RPtMZB','34vHPxtn','length','15396sfiWoN','Check\x20local\x20Backend\x20Function\x20sync\x20status\x20against\x20lock\x20file','boolean','lockKey','130WVruhz','6vJiiGT'];a44_0x1425=function(){return _0x2c72b9;};return a44_0x1425();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a45_0x4c83fc=a45_0x5a2d;function a45_0xf833(){const _0x5ee199=['read','CLI\x20Built-in\x20Skill\x20','Built-in\x20Skill\x20install\x20failed\x20[','1346780OJHjAY','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.','8rNyyNz','skillVersion','code','installedPath','920crVMhN','622111ZaJrst','\x20at\x20','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','changed','cwd','\x20via\x20skills@latest','\x20installed','2KmOxPS','install','repairCommand','cli-skill','nonInteractive','3978DXtyOS','1149665wGawqE','error',']:\x20','setLogPath','509163QMqNeI','cli-skill-install','5070232HGkiFf','3003549fZSmxE','12XqMLoD'];a45_0xf833=function(){return _0x5ee199;};return a45_0xf833();}(function(_0x37bf9c,_0x11bbce){const _0x43dcf0=a45_0x5a2d,_0x39eec7=_0x37bf9c();while(!![]){try{const _0x20bf76=-parseInt(_0x43dcf0(0xe7))/0x1+parseInt(_0x43dcf0(0xdd))/0x2*(parseInt(_0x43dcf0(0xea))/0x3)+parseInt(_0x43dcf0(0xf1))/0x4*(-parseInt(_0x43dcf0(0xef))/0x5)+parseInt(_0x43dcf0(0xeb))/0x6*(parseInt(_0x43dcf0(0xf6))/0x7)+parseInt(_0x43dcf0(0xe9))/0x8+parseInt(_0x43dcf0(0xe2))/0x9*(-parseInt(_0x43dcf0(0xf5))/0xa)+-parseInt(_0x43dcf0(0xe3))/0xb;if(_0x20bf76===_0x11bbce)break;else _0x39eec7['push'](_0x39eec7['shift']());}catch(_0x5071d9){_0x39eec7['push'](_0x39eec7['shift']());}}}(a45_0xf833,0x97486));import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';function a45_0x5a2d(_0x1ae849,_0x38c8e5){_0x1ae849=_0x1ae849-0xd8;const _0xf83382=a45_0xf833();let _0x5a2d77=_0xf83382[_0x1ae849];return _0x5a2d77;}import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a45_0x4c83fc(0xe0),'command':a45_0x4c83fc(0xde),'description':'Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','risk':a45_0x4c83fc(0xec),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2cb238){const _0x379147=a45_0x4c83fc;logger[_0x379147(0xe6)](process[_0x379147(0xda)]()),logger['info'](_0x379147(0xe8),_0x379147(0xf0));const _0x34d5c3=installBuiltinSkill({'stdio':_0x2cb238[_0x379147(0xe1)]?'pipe':'inherit'});if(!_0x34d5c3['ok'])throw CliErrors['apiError'](_0x379147(0xee)+_0x34d5c3[_0x379147(0xf3)]+_0x379147(0xe5)+(_0x34d5c3[_0x379147(0xe4)]||'unknown'),_0x379147(0xd8)+_0x34d5c3[_0x379147(0xdf)]);return console['log'](_0x34d5c3[_0x379147(0xd9)]?_0x379147(0xed)+_0x34d5c3[_0x379147(0xf2)]+_0x379147(0xdc)+(_0x34d5c3[_0x379147(0xf4)]?'\x20at\x20'+_0x34d5c3['installedPath']:_0x379147(0xdb)):_0x379147(0xed)+_0x34d5c3[_0x379147(0xf2)]+'\x20is\x20already\x20current'+(_0x34d5c3[_0x379147(0xf4)]?_0x379147(0xf7)+_0x34d5c3[_0x379147(0xf4)]:'')),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a46_0x1a70f5=a46_0x6314;(function(_0x216582,_0x1840dc){const _0x32e947=a46_0x6314,_0x113fac=_0x216582();while(!![]){try{const _0x3c741a=parseInt(_0x32e947(0x1ae))/0x1*(-parseInt(_0x32e947(0x191))/0x2)+-parseInt(_0x32e947(0x16c))/0x3*(parseInt(_0x32e947(0x178))/0x4)+-parseInt(_0x32e947(0x15e))/0x5+-parseInt(_0x32e947(0x173))/0x6+parseInt(_0x32e947(0x1a3))/0x7*(-parseInt(_0x32e947(0x182))/0x8)+parseInt(_0x32e947(0x172))/0x9+parseInt(_0x32e947(0x1b2))/0xa;if(_0x3c741a===_0x1840dc)break;else _0x113fac['push'](_0x113fac['shift']());}catch(_0xc09105){_0x113fac['push'](_0x113fac['shift']());}}}(a46_0x412b,0xbf9a4));function a46_0x412b(){const _0x181dc0=['Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','7067410cByfFJ',',\x20found\x20','\x20\x20Try\x20manually:\x20','toLowerCase','/dist-tags','skillVersion','beta','Checking\x20CLI\x20Built-in\x20Skill...','fromEntries','boolean','https://registry.npmjs.org/-/package/','validation','filter','Already\x20up\x20to\x20date\x20(v','2853JwpCIv','gray','install','length','json','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','6229926gBBMVC','1796796upEPrb','Checking\x20for\x20updates...',',\x20then\x20verify\x20with:\x20','bun','\x20doctor','5708lsuFlc','repairCommand','run','start','version','object','Run:\x20','code','green','Current\x20version:\x20','8ukeLPU','Update\x20failed','state',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','error','source','log','npm','Already\x20on\x20requested\x20version\x20(v','Version\x20comparison\x20failed','apiError','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','timeout','includes','Beta\x20version:\x20','62qcGCri','\x20install\x20-g\x20','Current\x20version\x20v','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','bool','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','execPath','slice','@latest','Invalid\x20version:\x20',']:\x20','\x20\x20CLI\x20Built-in\x20Skill\x20','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag',',\x20state\x20','latest','valid','\x20is\x20up\x20to\x20date.','4668055jhCSJs','\x20→\x20','string','Install\x20a\x20specific\x20CLI\x20version','Updating\x20via\x20','succeed','Updated\x20to\x20v','Update\x20available:\x20','unknown','fail','pipe','47765cgMaFC','trim','expected\x20','yellow','53101950BrFcTR'];a46_0x412b=function(){return _0x181dc0;};return a46_0x412b();}import a46_0x1ddbda from'chalk';function a46_0x6314(_0x280b33,_0x33a26f){_0x280b33=_0x280b33-0x15d;const _0x412b72=a46_0x412b();let _0x63143b=_0x412b72[_0x280b33];return _0x63143b;}import a46_0x2c1ccd from'ora';import a46_0x1bb9a3 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 _0x21b6e9=a46_0x6314;return GIT_COMMIT!==_0x21b6e9(0x1ab)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x21b6e9(0x198)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x5a1a9f=a46_0x6314,_0x37dd91=process[_0x5a1a9f(0x197)][_0x5a1a9f(0x161)]();if(_0x37dd91[_0x5a1a9f(0x18f)](_0x5a1a9f(0x176)))return _0x5a1a9f(0x176);return _0x5a1a9f(0x189);}const updateFlags=[{'name':'beta','type':a46_0x1a70f5(0x167),'description':a46_0x1a70f5(0x19e),'default':![]},{'name':a46_0x1a70f5(0x17c),'type':a46_0x1a70f5(0x1a5),'description':a46_0x1a70f5(0x1a6)}];function getRequestedVersion(_0x3dccca){const _0x164c18=a46_0x1a70f5;return _0x3dccca['str'](_0x164c18(0x17c))[_0x164c18(0x1af)]();}async function validateUpdateFlags(_0x5b6a1d){const _0x151419=a46_0x1a70f5,_0x12331b=_0x5b6a1d[_0x151419(0x195)](_0x151419(0x164)),_0x1a4bd7=getRequestedVersion(_0x5b6a1d);if(_0x12331b&&_0x1a4bd7)throw CliErrors['validation']('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.',_0x151419(0x15d));if(_0x1a4bd7&&!a46_0x1bb9a3[_0x151419(0x1a1)](_0x1a4bd7))throw CliErrors[_0x151419(0x169)](_0x151419(0x19a)+_0x1a4bd7,_0x151419(0x18d));}async function fetchNpmDistTags(){const _0x36aa9c=a46_0x1a70f5;try{const _0x48fb80=await fetch(_0x36aa9c(0x168)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x36aa9c(0x162),{'signal':AbortSignal[_0x36aa9c(0x18e)](0x2710)});if(!_0x48fb80['ok'])return null;const _0x388042=await _0x48fb80[_0x36aa9c(0x170)]();if(!_0x388042||typeof _0x388042!==_0x36aa9c(0x17d))return null;return Object[_0x36aa9c(0x166)](Object['entries'](_0x388042)[_0x36aa9c(0x16a)](([,_0x155574])=>typeof _0x155574==='string'&&_0x155574['trim']()[_0x36aa9c(0x16f)]>0x0)['map'](([_0x31a13,_0x573703])=>[_0x31a13,String(_0x573703)[_0x36aa9c(0x1af)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x3493b7){const _0x4f2278=await fetchNpmDistTags();return _0x4f2278?.[_0x3493b7]??null;}async function fetchLatestVersion(){const _0x514cd5=a46_0x1a70f5;return fetchNpmDistTagVersion(_0x514cd5(0x1a0));}async function resolveTargetVersion(_0x5aa066){const _0x1612a7=a46_0x1a70f5,_0xed84a9=getRequestedVersion(_0x5aa066);if(_0xed84a9)return{'version':_0xed84a9,'source':_0x1612a7(0x17c)};if(_0x5aa066[_0x1612a7(0x195)](_0x1612a7(0x164))){const _0x21c32a=await fetchNpmDistTagVersion(_0x1612a7(0x164));if(!_0x21c32a)return null;return{'version':_0x21c32a,'source':_0x1612a7(0x164)};}const _0x4007cc=await fetchLatestVersion();if(!_0x4007cc)return null;return{'version':_0x4007cc,'source':_0x1612a7(0x1a0)};}function shouldInstallTarget(_0x2ff95c,_0x25a927){const _0x3731f2=a46_0x1a70f5;if(_0x25a927[_0x3731f2(0x187)]===_0x3731f2(0x17c)||_0x25a927['source']===_0x3731f2(0x164))return!a46_0x1bb9a3['eq'](_0x2ff95c,_0x25a927[_0x3731f2(0x17c)]);return a46_0x1bb9a3['lt'](_0x2ff95c,_0x25a927['version']);}function getInstallPlanLabel(_0x3383b4,_0xd0804f){const _0x4ca43a=a46_0x1a70f5;switch(_0xd0804f[_0x4ca43a(0x187)]){case'beta':return _0x4ca43a(0x190)+a46_0x1ddbda[_0x4ca43a(0x1b1)](_0x3383b4)+_0x4ca43a(0x1a4)+a46_0x1ddbda[_0x4ca43a(0x180)](_0xd0804f['version']);case _0x4ca43a(0x17c):return'Requested\x20version:\x20'+a46_0x1ddbda[_0x4ca43a(0x1b1)](_0x3383b4)+_0x4ca43a(0x1a4)+a46_0x1ddbda[_0x4ca43a(0x180)](_0xd0804f[_0x4ca43a(0x17c)]);case _0x4ca43a(0x1a0):default:return _0x4ca43a(0x1aa)+a46_0x1ddbda[_0x4ca43a(0x1b1)](_0x3383b4)+'\x20→\x20'+a46_0x1ddbda[_0x4ca43a(0x180)](_0xd0804f[_0x4ca43a(0x17c)]);}}function repairCurrentBuiltinSkill(){const _0x35d424=a46_0x1a70f5;console['log'](a46_0x1ddbda[_0x35d424(0x16d)](_0x35d424(0x165)));const _0x1f4ea1=installBuiltinSkill();if(_0x1f4ea1['ok']){console[_0x35d424(0x188)](a46_0x1ddbda[_0x35d424(0x16d)](_0x35d424(0x19c)+_0x1f4ea1['skillVersion']+_0x35d424(0x1a2)));return;}throw CliErrors[_0x35d424(0x18c)](_0x35d424(0x196)+_0x1f4ea1[_0x35d424(0x17f)]+_0x35d424(0x19b)+(_0x1f4ea1[_0x35d424(0x186)]||_0x35d424(0x1ab)),_0x35d424(0x17e)+_0x1f4ea1[_0x35d424(0x179)]+',\x20then\x20verify\x20with:\x20'+CLI_BIN_NAME+_0x35d424(0x177));}function verifyUpdatedBuiltinSkill(_0x14dc4a){const _0x5c0cb8=a46_0x1a70f5,_0x439720=inspectInstalledBuiltinSkillVersion(_0x14dc4a);if(_0x439720[_0x5c0cb8(0x184)]==='current'){console[_0x5c0cb8(0x188)](a46_0x1ddbda['gray'](_0x5c0cb8(0x19c)+_0x14dc4a+_0x5c0cb8(0x1a2)));return;}const _0x4177f6=_0x439720[_0x5c0cb8(0x163)]?_0x5c0cb8(0x1b0)+_0x14dc4a+_0x5c0cb8(0x15f)+_0x439720[_0x5c0cb8(0x163)]:_0x5c0cb8(0x1b0)+_0x14dc4a+_0x5c0cb8(0x19f)+_0x439720[_0x5c0cb8(0x184)];throw CliErrors[_0x5c0cb8(0x18c)]('CLI\x20updated\x20to\x20v'+_0x14dc4a+_0x5c0cb8(0x185)+_0x4177f6,_0x5c0cb8(0x17e)+_0x439720[_0x5c0cb8(0x179)]+_0x5c0cb8(0x175)+CLI_BIN_NAME+_0x5c0cb8(0x177));}async function execute(_0x33b8ab){const _0x2043ee=a46_0x1a70f5;await validateUpdateFlags(_0x33b8ab);const _0x46f1e0=getCurrentVersion();console[_0x2043ee(0x188)](_0x2043ee(0x181)+_0x46f1e0);const _0x5cef0d=a46_0x2c1ccd(_0x2043ee(0x174))[_0x2043ee(0x17b)](),_0x2a401a=await resolveTargetVersion(_0x33b8ab);if(!_0x2a401a){const _0x21a769=_0x33b8ab[_0x2043ee(0x195)](_0x2043ee(0x164))?_0x2043ee(0x19d):'Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)';return _0x5cef0d[_0x2043ee(0x1ac)](_0x21a769),console[_0x2043ee(0x188)](a46_0x1ddbda[_0x2043ee(0x16d)](_0x2043ee(0x171)+NPM_PACKAGE_NAME+_0x2043ee(0x199))),{'ok':![],'message':_0x21a769};}const _0xe042b9=a46_0x1bb9a3['valid'](VERSION),_0x50dbdb=a46_0x1bb9a3[_0x2043ee(0x1a1)](_0x2a401a[_0x2043ee(0x17c)]);if(!_0xe042b9||!_0x50dbdb)return _0x5cef0d[_0x2043ee(0x1ac)](_0x2043ee(0x18b)),{'ok':![],'message':_0x2043ee(0x18b)};if(!shouldInstallTarget(_0xe042b9,_0x2a401a)){const _0x9dc79c=_0x2a401a[_0x2043ee(0x187)]===_0x2043ee(0x17c)?_0x2043ee(0x18a)+_0x2a401a['version']+')':a46_0x1bb9a3['gt'](_0xe042b9,_0x50dbdb)?_0x2043ee(0x193)+_0x46f1e0+'\x20is\x20newer\x20than\x20npm\x20latest\x20v'+_0x2a401a[_0x2043ee(0x17c)]:_0x2043ee(0x16b)+_0x2a401a[_0x2043ee(0x17c)]+')';return _0x5cef0d[_0x2043ee(0x1a8)](_0x9dc79c),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x5cef0d['info'](getInstallPlanLabel(_0x46f1e0,_0x2a401a));const _0x16407d=detectPackageManager(),_0x4c0e25=_0x16407d===_0x2043ee(0x189)?resolveNpmBin(_0x2043ee(0x189)):_0x16407d,_0x1d24fb=a46_0x2c1ccd(_0x2043ee(0x1a7)+_0x16407d+'...')['start']();try{await execa(_0x4c0e25,[_0x2043ee(0x16e),'-g',NPM_PACKAGE_NAME+'@'+_0x2a401a[_0x2043ee(0x17c)]],{'stdio':_0x2043ee(0x1ad)}),_0x1d24fb[_0x2043ee(0x1a8)](_0x2043ee(0x1a9)+_0x2a401a[_0x2043ee(0x17c)]),console[_0x2043ee(0x188)](a46_0x1ddbda[_0x2043ee(0x16d)](_0x2043ee(0x194)));}catch(_0x248c90){return _0x1d24fb[_0x2043ee(0x1ac)](_0x2043ee(0x183)),console[_0x2043ee(0x186)](a46_0x1ddbda['red']('\x20\x20'+_0x248c90['message'])),console[_0x2043ee(0x188)](a46_0x1ddbda[_0x2043ee(0x16d)](_0x2043ee(0x160)+_0x16407d+_0x2043ee(0x192)+NPM_PACKAGE_NAME+'@'+_0x2a401a[_0x2043ee(0x17c)])),{'ok':![],'message':_0x248c90['message']};}return verifyUpdatedBuiltinSkill(_0x2a401a[_0x2043ee(0x17c)]),{'ok':!![]};}export const updateDefinition={'service':'update','command':a46_0x1a70f5(0x17a),'description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a46_0x532fea=a46_0x1887;(function(_0x588f3e,_0xc529d){const _0x2d05d2=a46_0x1887,_0x4678e4=_0x588f3e();while(!![]){try{const _0x239180=-parseInt(_0x2d05d2(0x102))/0x1+parseInt(_0x2d05d2(0xef))/0x2*(-parseInt(_0x2d05d2(0xea))/0x3)+parseInt(_0x2d05d2(0x10a))/0x4*(-parseInt(_0x2d05d2(0x106))/0x5)+-parseInt(_0x2d05d2(0x12b))/0x6*(parseInt(_0x2d05d2(0x12d))/0x7)+parseInt(_0x2d05d2(0xe9))/0x8+-parseInt(_0x2d05d2(0x117))/0x9*(-parseInt(_0x2d05d2(0xed))/0xa)+parseInt(_0x2d05d2(0x124))/0xb;if(_0x239180===_0xc529d)break;else _0x4678e4['push'](_0x4678e4['shift']());}catch(_0x23f4f1){_0x4678e4['push'](_0x4678e4['shift']());}}}(a46_0x3891,0x99995));import a46_0x29a64a from'chalk';import a46_0x49fe43 from'ora';import a46_0x1493d8 from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';import{resolveNpmBin}from'../utils/platform.js';function a46_0x1887(_0xffa483,_0x6024f9){_0xffa483=_0xffa483-0xe5;const _0x389113=a46_0x3891();let _0x18871c=_0x389113[_0xffa483];return _0x18871c;}function getCurrentVersion(){const _0x4ba7ef=a46_0x1887;return GIT_COMMIT!==_0x4ba7ef(0x131)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x4ba7ef(0xf2)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0xcd085a=a46_0x1887,_0x517927=process[_0xcd085a(0x103)][_0xcd085a(0xe5)]();if(_0x517927['includes'](_0xcd085a(0x120)))return _0xcd085a(0x120);return _0xcd085a(0x123);}const updateFlags=[{'name':'beta','type':a46_0x532fea(0x12e),'description':a46_0x532fea(0x11d),'default':![]},{'name':'version','type':a46_0x532fea(0xf7),'description':a46_0x532fea(0x113)}];function a46_0x3891(){const _0x38ed26=['succeed','bool','latest','str','fail','filter','read','Install\x20a\x20specific\x20CLI\x20version','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','code','run','2667618ONxHgg','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','Already\x20on\x20requested\x20version\x20(v','\x20→\x20','Beta\x20version:\x20',',\x20state\x20','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','Current\x20version\x20v','Updated\x20to\x20v','bun','Version\x20comparison\x20failed','skillVersion','npm','27753781hNKEQh','\x20\x20CLI\x20Built-in\x20Skill\x20','pipe','Checking\x20for\x20updates...','validation','Updating\x20via\x20','...','6sGpvKL','state','4210066XFRVKx','boolean','error','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','unknown','Update\x20failed','map','message','source','\x20doctor','fromEntries','toLowerCase','green','gray','Run:\x20','3071752kHikGF','21SoIhIl',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','20LmwjcH','version','157198pZOjiT','install','@latest','slice',',\x20then\x20verify\x20with:\x20','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','beta','log','string','Invalid\x20version:\x20','repairCommand','\x20is\x20up\x20to\x20date.','expected\x20','apiError','update','yellow','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','entries','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','700452jDXDdW','execPath','valid','length','60mfGTIG','object','red','\x20\x20Try\x20manually:\x20','339540gQbVrz','start'];a46_0x3891=function(){return _0x38ed26;};return a46_0x3891();}function getRequestedVersion(_0x5be0fe){const _0x3bcd63=a46_0x532fea;return _0x5be0fe[_0x3bcd63(0x10f)](_0x3bcd63(0xee))['trim']();}async function validateUpdateFlags(_0x251ce4){const _0xf9217f=a46_0x532fea,_0x45eb76=_0x251ce4['bool'](_0xf9217f(0xf5)),_0x4f685e=getRequestedVersion(_0x251ce4);if(_0x45eb76&&_0x4f685e)throw CliErrors[_0xf9217f(0x128)](_0xf9217f(0x118),_0xf9217f(0x101));if(_0x4f685e&&!a46_0x1493d8['valid'](_0x4f685e))throw CliErrors[_0xf9217f(0x128)](_0xf9217f(0xf8)+_0x4f685e,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x3951e5=a46_0x532fea;try{const _0x4bfcbe=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal['timeout'](0x2710)});if(!_0x4bfcbe['ok'])return null;const _0x3fc81c=await _0x4bfcbe['json']();if(!_0x3fc81c||typeof _0x3fc81c!==_0x3951e5(0x107))return null;return Object[_0x3951e5(0x137)](Object[_0x3951e5(0x100)](_0x3fc81c)[_0x3951e5(0x111)](([,_0x2dbc26])=>typeof _0x2dbc26==='string'&&_0x2dbc26['trim']()[_0x3951e5(0x105)]>0x0)[_0x3951e5(0x133)](([_0x1315fc,_0x1eb2b8])=>[_0x1315fc,String(_0x1eb2b8)['trim']()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x432b2e){const _0x2a68e6=await fetchNpmDistTags();return _0x2a68e6?.[_0x432b2e]??null;}async function fetchLatestVersion(){const _0x4fceba=a46_0x532fea;return fetchNpmDistTagVersion(_0x4fceba(0x10e));}async function resolveTargetVersion(_0x247c6d){const _0x254547=a46_0x532fea,_0x30f1d0=getRequestedVersion(_0x247c6d);if(_0x30f1d0)return{'version':_0x30f1d0,'source':_0x254547(0xee)};if(_0x247c6d[_0x254547(0x10d)]('beta')){const _0x45249=await fetchNpmDistTagVersion(_0x254547(0xf5));if(!_0x45249)return null;return{'version':_0x45249,'source':_0x254547(0xf5)};}const _0x37d0c9=await fetchLatestVersion();if(!_0x37d0c9)return null;return{'version':_0x37d0c9,'source':_0x254547(0x10e)};}function shouldInstallTarget(_0x13c26c,_0xe6f1cb){const _0x53cc62=a46_0x532fea;if(_0xe6f1cb[_0x53cc62(0x135)]===_0x53cc62(0xee)||_0xe6f1cb[_0x53cc62(0x135)]===_0x53cc62(0xf5))return!a46_0x1493d8['eq'](_0x13c26c,_0xe6f1cb[_0x53cc62(0xee)]);return a46_0x1493d8['lt'](_0x13c26c,_0xe6f1cb[_0x53cc62(0xee)]);}function getInstallPlanLabel(_0x1ee935,_0x3bacd2){const _0x14a5ea=a46_0x532fea;switch(_0x3bacd2[_0x14a5ea(0x135)]){case _0x14a5ea(0xf5):return _0x14a5ea(0x11b)+a46_0x29a64a[_0x14a5ea(0xfe)](_0x1ee935)+'\x20→\x20'+a46_0x29a64a[_0x14a5ea(0xe6)](_0x3bacd2[_0x14a5ea(0xee)]);case _0x14a5ea(0xee):return'Requested\x20version:\x20'+a46_0x29a64a[_0x14a5ea(0xfe)](_0x1ee935)+_0x14a5ea(0x11a)+a46_0x29a64a[_0x14a5ea(0xe6)](_0x3bacd2[_0x14a5ea(0xee)]);case _0x14a5ea(0x10e):default:return'Update\x20available:\x20'+a46_0x29a64a[_0x14a5ea(0xfe)](_0x1ee935)+_0x14a5ea(0x11a)+a46_0x29a64a[_0x14a5ea(0xe6)](_0x3bacd2['version']);}}function repairCurrentBuiltinSkill(){const _0x2b6885=a46_0x532fea;console['log'](a46_0x29a64a[_0x2b6885(0xe7)]('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x9dd1b3=installBuiltinSkill();if(_0x9dd1b3['ok']){console[_0x2b6885(0xf6)](a46_0x29a64a['gray'](_0x2b6885(0x125)+_0x9dd1b3[_0x2b6885(0x122)]+'\x20is\x20up\x20to\x20date.'));return;}throw CliErrors[_0x2b6885(0xfc)](_0x2b6885(0xf4)+_0x9dd1b3[_0x2b6885(0x115)]+']:\x20'+(_0x9dd1b3[_0x2b6885(0x12f)]||_0x2b6885(0x131)),_0x2b6885(0xe8)+_0x9dd1b3[_0x2b6885(0xf9)]+_0x2b6885(0xf3)+CLI_BIN_NAME+'\x20doctor');}function verifyUpdatedBuiltinSkill(_0x2d32ab){const _0xcbd8e7=a46_0x532fea,_0x3a5890=inspectInstalledBuiltinSkillVersion(_0x2d32ab);if(_0x3a5890[_0xcbd8e7(0x12c)]==='current'){console['log'](a46_0x29a64a[_0xcbd8e7(0xe7)](_0xcbd8e7(0x125)+_0x2d32ab+_0xcbd8e7(0xfa)));return;}const _0x1d54b0=_0x3a5890[_0xcbd8e7(0x122)]?'expected\x20'+_0x2d32ab+',\x20found\x20'+_0x3a5890['skillVersion']:_0xcbd8e7(0xfb)+_0x2d32ab+_0xcbd8e7(0x11c)+_0x3a5890['state'];throw CliErrors[_0xcbd8e7(0xfc)]('CLI\x20updated\x20to\x20v'+_0x2d32ab+_0xcbd8e7(0xeb)+_0x1d54b0,_0xcbd8e7(0xe8)+_0x3a5890[_0xcbd8e7(0xf9)]+_0xcbd8e7(0xf3)+CLI_BIN_NAME+_0xcbd8e7(0x136));}async function execute(_0x4602cd){const _0x12da9e=a46_0x532fea;await validateUpdateFlags(_0x4602cd);const _0x539d70=getCurrentVersion();console[_0x12da9e(0xf6)]('Current\x20version:\x20'+_0x539d70);const _0x46f1a2=a46_0x49fe43(_0x12da9e(0x127))[_0x12da9e(0x10b)](),_0x4db213=await resolveTargetVersion(_0x4602cd);if(!_0x4db213){const _0x411ed6=_0x4602cd[_0x12da9e(0x10d)]('beta')?_0x12da9e(0xff):'Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)';return _0x46f1a2['fail'](_0x411ed6),console[_0x12da9e(0xf6)](a46_0x29a64a[_0x12da9e(0xe7)](_0x12da9e(0x130)+NPM_PACKAGE_NAME+_0x12da9e(0xf1))),{'ok':![],'message':_0x411ed6};}const _0x114112=a46_0x1493d8[_0x12da9e(0x104)](VERSION),_0x48262b=a46_0x1493d8[_0x12da9e(0x104)](_0x4db213[_0x12da9e(0xee)]);if(!_0x114112||!_0x48262b)return _0x46f1a2[_0x12da9e(0x110)](_0x12da9e(0x121)),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x114112,_0x4db213)){const _0x3e74a7=_0x4db213[_0x12da9e(0x135)]==='version'?_0x12da9e(0x119)+_0x4db213['version']+')':a46_0x1493d8['gt'](_0x114112,_0x48262b)?_0x12da9e(0x11e)+_0x539d70+'\x20is\x20newer\x20than\x20npm\x20latest\x20v'+_0x4db213[_0x12da9e(0xee)]:'Already\x20up\x20to\x20date\x20(v'+_0x4db213[_0x12da9e(0xee)]+')';return _0x46f1a2[_0x12da9e(0x10c)](_0x3e74a7),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x46f1a2['info'](getInstallPlanLabel(_0x539d70,_0x4db213));const _0x348d48=detectPackageManager(),_0x58c5ec=_0x348d48==='npm'?resolveNpmBin(_0x12da9e(0x123)):_0x348d48,_0x3ace5e=a46_0x49fe43(_0x12da9e(0x129)+_0x348d48+_0x12da9e(0x12a))['start']();try{await execa(_0x58c5ec,[_0x12da9e(0xf0),'-g',NPM_PACKAGE_NAME+'@'+_0x4db213[_0x12da9e(0xee)]],{'stdio':_0x12da9e(0x126)}),_0x3ace5e['succeed'](_0x12da9e(0x11f)+_0x4db213[_0x12da9e(0xee)]),console[_0x12da9e(0xf6)](a46_0x29a64a[_0x12da9e(0xe7)](_0x12da9e(0x114)));}catch(_0x3e068d){return _0x3ace5e[_0x12da9e(0x110)](_0x12da9e(0x132)),console[_0x12da9e(0x12f)](a46_0x29a64a[_0x12da9e(0x108)]('\x20\x20'+_0x3e068d[_0x12da9e(0x134)])),console[_0x12da9e(0xf6)](a46_0x29a64a[_0x12da9e(0xe7)](_0x12da9e(0x109)+_0x348d48+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x4db213['version'])),{'ok':![],'message':_0x3e068d[_0x12da9e(0x134)]};}return verifyUpdatedBuiltinSkill(_0x4db213[_0x12da9e(0xee)]),{'ok':!![]};}export const updateDefinition={'service':a46_0x532fea(0xfd),'command':a46_0x532fea(0x116),'description':a46_0x532fea(0xec),'risk':a46_0x532fea(0x112),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5d5002,_0x208f12){const _0x2aae7a=a47_0x5955,_0x3aa4e9=_0x5d5002();while(!![]){try{const _0x2bc66e=-parseInt(_0x2aae7a(0x145))/0x1*(-parseInt(_0x2aae7a(0x13d))/0x2)+parseInt(_0x2aae7a(0x140))/0x3*(parseInt(_0x2aae7a(0x141))/0x4)+-parseInt(_0x2aae7a(0x142))/0x5+-parseInt(_0x2aae7a(0x143))/0x6*(parseInt(_0x2aae7a(0x144))/0x7)+parseInt(_0x2aae7a(0x13f))/0x8+-parseInt(_0x2aae7a(0x147))/0x9*(-parseInt(_0x2aae7a(0x13e))/0xa)+-parseInt(_0x2aae7a(0x146))/0xb;if(_0x2bc66e===_0x208f12)break;else _0x3aa4e9['push'](_0x3aa4e9['shift']());}catch(_0xd01d71){_0x3aa4e9['push'](_0x3aa4e9['shift']());}}}(a47_0x1d7f,0x6d1d3));import{codegenSdk}from'../../commands/codegen/sdk.js';function a47_0x5955(_0x1b5300,_0x59f806){_0x1b5300=_0x1b5300-0x13d;const _0x1d7f2e=a47_0x1d7f();let _0x59550f=_0x1d7f2e[_0x1b5300];return _0x59550f;}function a47_0x1d7f(){const _0x191479=['6010642zlWvOV','81czJwIH','10hflZIl','970870vlabFX','4330368XgRdsq','39687YdvgUx','56RokGmg','3068965ygkkRE','45138NFfUAi','406tYQsYV','88639YsDwPX'];a47_0x1d7f=function(){return _0x191479;};return a47_0x1d7f();}import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a48_0x3d9707=a48_0x2d0b;(function(_0x588182,_0x2fa23e){const _0x1b39d0=a48_0x2d0b,_0x2be660=_0x588182();while(!![]){try{const _0x599fcc=-parseInt(_0x1b39d0(0x92))/0x1+-parseInt(_0x1b39d0(0x9a))/0x2*(parseInt(_0x1b39d0(0x8f))/0x3)+-parseInt(_0x1b39d0(0x8d))/0x4+-parseInt(_0x1b39d0(0x99))/0x5+parseInt(_0x1b39d0(0x93))/0x6*(parseInt(_0x1b39d0(0xa4))/0x7)+-parseInt(_0x1b39d0(0xa3))/0x8*(parseInt(_0x1b39d0(0x9b))/0x9)+-parseInt(_0x1b39d0(0x91))/0xa*(-parseInt(_0x1b39d0(0x8e))/0xb);if(_0x599fcc===_0x2fa23e)break;else _0x2be660['push'](_0x2be660['shift']());}catch(_0x58cec0){_0x2be660['push'](_0x2be660['shift']());}}}(a48_0x5ca4,0x6d54d));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a48_0x2d0b(_0x4f365f,_0x17472b){_0x4f365f=_0x4f365f-0x8d;const _0x5ca40d=a48_0x5ca4();let _0x2d0ba1=_0x5ca40d[_0x4f365f];return _0x2d0ba1;}function a48_0x5ca4(){const _0x23550b=['str','sdk','operation','skip-imports','code','456NUcRXu','7ABKFBD','codegen','2150924jWJFRa','5478dVFQYx','3327xmgPfe','name','26210ketapK','369259KTDedH','4151778SYfqGs','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','read','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','string','743295aZHXLO','32tarWVe','75159HrXwUd','tableName','alias'];a48_0x5ca4=function(){return _0x23550b;};return a48_0x5ca4();}export const codegenSdk={'service':a48_0x3d9707(0xa5),'command':a48_0x3d9707(0x9f),'description':a48_0x3d9707(0x97),'risk':a48_0x3d9707(0x95),'flags':[CODE_FLAG_OPTIONAL,{'name':a48_0x3d9707(0x9d),'type':a48_0x3d9707(0x98),'description':a48_0x3d9707(0x96)},{'name':a48_0x3d9707(0xa0),'type':a48_0x3d9707(0x98),'required':!![],'description':a48_0x3d9707(0x94)},{'name':'skip-imports','type':'boolean','description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0xa2eb5b){const _0x2f164d=a48_0x3d9707,{dataset:_0x5566ff,operation:_0x56d8d0}=await getOperationDetail(_0xa2eb5b['appCode'],_0xa2eb5b[_0x2f164d(0x9e)](_0x2f164d(0xa2)),_0xa2eb5b[_0x2f164d(0x9e)](_0x2f164d(0xa0))),_0x5618f0=generateSdkCode(_0x5566ff,_0x56d8d0,{'includeImports':!_0xa2eb5b['bool'](_0x2f164d(0xa1))});return{'ok':!![],'data':{'dataset':{'name':_0x5566ff[_0x2f164d(0x90)],'code':_0x5566ff[_0x2f164d(0xa2)],'tableName':_0x5566ff[_0x2f164d(0x9c)]},'operation':_0xa2eb5b[_0x2f164d(0x9e)](_0x2f164d(0xa0)),'code':_0x5618f0}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a49_0x4f5fa3=a49_0x2e78;function a49_0x2e78(_0x3fc346,_0x5e08a7){_0x3fc346=_0x3fc346-0x196;const _0x39d0bd=a49_0x39d0();let _0x2e78b6=_0x39d0bd[_0x3fc346];return _0x2e78b6;}(function(_0x5f1ea0,_0x4d380f){const _0x32f915=a49_0x2e78,_0x3253cb=_0x5f1ea0();while(!![]){try{const _0x562491=-parseInt(_0x32f915(0x1ab))/0x1+parseInt(_0x32f915(0x197))/0x2+-parseInt(_0x32f915(0x1a1))/0x3+-parseInt(_0x32f915(0x1a2))/0x4*(parseInt(_0x32f915(0x19b))/0x5)+parseInt(_0x32f915(0x1a6))/0x6+-parseInt(_0x32f915(0x19e))/0x7+parseInt(_0x32f915(0x198))/0x8*(parseInt(_0x32f915(0x1a9))/0x9);if(_0x562491===_0x4d380f)break;else _0x3253cb['push'](_0x3253cb['shift']());}catch(_0x4ad9ae){_0x3253cb['push'](_0x3253cb['shift']());}}}(a49_0x39d0,0xf39af));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';function a49_0x39d0(){const _0x544674=['8120812KamKxQ','sqlName','Omit\x20import\x20statements\x20from\x20generated\x20code','2196507KjVlVw','283292mMcHIJ','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','appCode','no-imports','8158068bgJhbN','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','sdk','1676178prGjhT','str','1236520bhUTlq','boolean','codegen','1431238HcOZJn','152TsZwxP','target','sql','105nzoqhG','sqlCode','bff'];a49_0x39d0=function(){return _0x544674;};return a49_0x39d0();}import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a49_0x4f5fa3(0x196),'command':a49_0x4f5fa3(0x19a),'description':a49_0x4f5fa3(0x1a7),'risk':'read','flags':[SQLCODE_FLAG,{'name':a49_0x4f5fa3(0x199),'type':'string','description':a49_0x4f5fa3(0x1a3),'default':a49_0x4f5fa3(0x1a8),'enum':[a49_0x4f5fa3(0x1a8),a49_0x4f5fa3(0x19d)]},{'name':a49_0x4f5fa3(0x1a5),'type':a49_0x4f5fa3(0x1ac),'description':a49_0x4f5fa3(0x1a0)}],async 'execute'(_0xe2117c){const _0x22ab5d=a49_0x4f5fa3,_0x4e2262=await getSqlQueryInfo(_0xe2117c[_0x22ab5d(0x1a4)],_0xe2117c[_0x22ab5d(0x1aa)]('sqlcode')),_0x1601f9=_0xe2117c[_0x22ab5d(0x1aa)]('target')||'sdk',_0x57e231=generateSqlCodeTemplate(_0x4e2262,{'target':_0x1601f9,'includeImports':!_0xe2117c['bool']('no-imports')});return{'ok':!![],'data':{'sqlCode':_0x4e2262[_0x22ab5d(0x19c)],'sqlName':_0x4e2262[_0x22ab5d(0x19f)],'target':_0x1601f9,'code':_0x57e231}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x48d862,_0x4e3275){const _0x13b67e=a50_0x1a7d,_0xdaf102=_0x48d862();while(!![]){try{const _0x2dd516=parseInt(_0x13b67e(0x16f))/0x1+parseInt(_0x13b67e(0x17a))/0x2*(parseInt(_0x13b67e(0x175))/0x3)+parseInt(_0x13b67e(0x174))/0x4+parseInt(_0x13b67e(0x155))/0x5*(parseInt(_0x13b67e(0x158))/0x6)+parseInt(_0x13b67e(0x15f))/0x7+-parseInt(_0x13b67e(0x17c))/0x8*(parseInt(_0x13b67e(0x177))/0x9)+-parseInt(_0x13b67e(0x16e))/0xa;if(_0x2dd516===_0x4e3275)break;else _0xdaf102['push'](_0xdaf102['shift']());}catch(_0x4c552b){_0xdaf102['push'](_0xdaf102['shift']());}}}(a50_0xbc73,0x60d49));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 _0x22655c=a50_0x1a7d;return[{'name':_0x22655c(0x164),'type':_0x22655c(0x16b),'description':_0x22655c(0x16a),'required':!![]},{'name':_0x22655c(0x15a),'type':_0x22655c(0x161),'description':_0x22655c(0x178),'default':![]},...getAppProfileFlagDefs()];}function a50_0x1a7d(_0xca0cd0,_0x5a5fbb){_0xca0cd0=_0xca0cd0-0x152;const _0xbc732e=a50_0xbc73();let _0x1a7d54=_0xbc732e[_0xca0cd0];return _0x1a7d54;}export function buildAppRemoveFlags(){const _0x5c9aff=a50_0x1a7d;return[{'name':_0x5c9aff(0x15a),'type':'boolean','description':_0x5c9aff(0x178),'default':![]}];}export async function validateAppName(_0x4d0dc0,_0x305e5e){const _0x878849=a50_0x1a7d,_0xb533f8=_0x4d0dc0[_0x878849(0x176)][0x0]?.['trim']();if(!_0xb533f8)throw CliErrors[_0x878849(0x156)](_0x878849(0x163),_0x878849(0x152)+CLI_BIN_NAME+'\x20'+_0x305e5e+'\x20<name>');}export async function runAppAdd(_0x3f9889,_0x119ea1){const _0x4ed831=a50_0x1a7d,_0x567477=_0x3f9889['args'][0x0]?.[_0x4ed831(0x17b)]();if(!_0x567477)throw CliErrors[_0x4ed831(0x156)](_0x4ed831(0x163),_0x4ed831(0x152)+CLI_BIN_NAME+'\x20'+_0x119ea1+'\x20<name>\x20--appcode\x20<code>');const _0x1a3669=_0x3f9889[_0x4ed831(0x179)]('appcode');if(!_0x1a3669)throw CliErrors['flagMissing']('appcode','Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x119ea1+_0x4ed831(0x159));const _0x3eb0cd={'global':_0x3f9889[_0x4ed831(0x157)](_0x4ed831(0x15a))},_0x3fe476=readConfig(_0x3eb0cd);if(!_0x3fe476['apps'])_0x3fe476[_0x4ed831(0x162)]={};const _0x3065aa={'appcode':_0x1a3669,...collectAppProfileOverrides(_0x1f7a7f=>_0x3f9889[_0x4ed831(0x179)](_0x1f7a7f))},_0x4b1c6a=_0x3fe476[_0x4ed831(0x162)],_0x2a7cc9=Object[_0x4ed831(0x169)](_0x4b1c6a),_0xfbc9dd=typeof _0x3fe476['defaultApp']===_0x4ed831(0x16b)&&_0x4b1c6a[_0x3fe476[_0x4ed831(0x15e)]]?_0x3fe476[_0x4ed831(0x15e)]:_0x2a7cc9[_0x4ed831(0x168)]===0x1?_0x2a7cc9[0x0]:undefined,_0xfb872b=!!_0x4b1c6a[_0x567477];_0x4b1c6a[_0x567477]=_0x3065aa;const _0x27d33e=normalizeStoredDefaultApp(_0x3fe476,_0xfbc9dd);writeConfig(_0x3fe476,_0x3eb0cd);const _0x13f867=!_0xfb872b&&_0x27d33e?'\x20Default\x20app\x20is\x20\x22'+_0x27d33e+'\x22.':'',_0x24a881=(_0xfb872b?_0x4ed831(0x15c):_0x4ed831(0x170))+_0x4ed831(0x172)+_0x567477+'\x22\x20(appcode:\x20'+_0x1a3669+')'+scopeLabel(_0x3eb0cd)+'.'+_0x13f867;return{'ok':!![],'message':_0x24a881};}export async function runAppRemove(_0x45e458,_0x350e08){const _0x1056f1=a50_0x1a7d,_0xccf7ad=_0x45e458[_0x1056f1(0x176)][0x0]?.[_0x1056f1(0x17b)]();if(!_0xccf7ad)throw CliErrors[_0x1056f1(0x156)]('Missing\x20app\x20name.',_0x1056f1(0x152)+CLI_BIN_NAME+'\x20'+_0x350e08+_0x1056f1(0x167));const _0x316bc5=_0x45e458[_0x1056f1(0x157)](_0x1056f1(0x15a)),{config:_0x14eeac,layers:_0x4b8d95}=readRawConfigWithLayers(),_0x55829d=_0x14eeac[_0x1056f1(0x162)]??{};if(!_0x55829d[_0xccf7ad])throw CliErrors[_0x1056f1(0x156)](_0x1056f1(0x173)+_0xccf7ad+_0x1056f1(0x15d));const _0x5921a3=_0x4b8d95[_0x1056f1(0x160)][_0x1056f1(0x162)]&&typeof _0x4b8d95['globalConfig'][_0x1056f1(0x162)]==='object'?_0x4b8d95[_0x1056f1(0x160)][_0x1056f1(0x162)]:{},_0x55f9e5=_0x4b8d95[_0x1056f1(0x165)][_0x1056f1(0x162)]&&typeof _0x4b8d95[_0x1056f1(0x165)][_0x1056f1(0x162)]===_0x1056f1(0x17d)?_0x4b8d95[_0x1056f1(0x165)][_0x1056f1(0x162)]:{},_0x53e008=appDefinedIn(_0xccf7ad,_0x5921a3,_0x55f9e5),_0x1aa28d=resolveAppScopeForWrite(_0xccf7ad,_0x316bc5,_0x4b8d95),_0x106991={'global':_0x1aa28d===_0x1056f1(0x15a)},_0x24215a=readConfig(_0x106991),_0x5913b0=_0x24215a[_0x1056f1(0x162)];if(!_0x5913b0||!_0x5913b0[_0xccf7ad])throw CliErrors[_0x1056f1(0x156)]('App\x20\x22'+_0xccf7ad+_0x1056f1(0x15d));delete _0x5913b0[_0xccf7ad];let _0x121e92='';const _0x57b40e=typeof _0x24215a[_0x1056f1(0x15e)]===_0x1056f1(0x16b)?_0x24215a[_0x1056f1(0x15e)]:undefined,_0x54626d=Object[_0x1056f1(0x169)](_0x5913b0),_0x583a61=_0x57b40e===_0xccf7ad?_0x54626d[0x0]:_0x57b40e,_0x260037=normalizeStoredDefaultApp(_0x24215a,_0x583a61);if(_0x57b40e===_0xccf7ad&&_0x54626d[_0x1056f1(0x168)]===0x1)_0x121e92=_0x1056f1(0x15b)+_0x54626d[0x0]+'\x22\x20is\x20selected\x20automatically.';else _0x57b40e===_0xccf7ad&&_0x260037&&(_0x121e92='\x20Default\x20app\x20changed\x20to\x20\x22'+_0x260037+'\x22.');Object[_0x1056f1(0x169)](_0x5913b0)[_0x1056f1(0x168)]===0x0&&(delete _0x24215a[_0x1056f1(0x162)],delete _0x24215a[_0x1056f1(0x15e)]);writeConfig(_0x24215a,_0x106991);const _0x2a52f6=_0x53e008===_0x1056f1(0x16d)?_0x1056f1(0x166)+_0xccf7ad+_0x1056f1(0x16c)+(_0x1aa28d===_0x1056f1(0x154)?_0x1056f1(0x15a):_0x1056f1(0x154))+_0x1056f1(0x171):'';return{'ok':!![],'message':_0x1056f1(0x153)+_0xccf7ad+'\x22'+scopeLabel(_0x106991)+'.'+_0x121e92+_0x2a52f6};}function a50_0xbc73(){const _0x3b51d6=['14460EbySrt','\x20<name>\x20--appcode\x20<code>','global','\x20Remaining\x20app\x20\x22','Updated','\x22\x20not\x20found.','defaultApp','3062339sdProb','globalConfig','boolean','apps','Missing\x20app\x20name.','appcode','projectConfig','\x20Note:\x20app\x20\x22','\x20<name>\x20[--global]','length','keys','App\x20code','string','\x22\x20still\x20defined\x20in\x20','both','14545700OVBeWm','724897ShCfqa','Added','\x20config.','\x20app\x20\x22','App\x20\x22','2608488VkqddG','129cVyxzF','args','215739fkrWMr','Use\x20global\x20config\x20scope','str','20206FdAAsy','trim','144vPEFkb','object','Usage:\x20','Removed\x20app\x20\x22','project','70mKAWDR','validation','bool'];a50_0xbc73=function(){return _0x3b51d6;};return a50_0xbc73();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a51_0x441e(_0x4adc0b,_0x4a33b4){_0x4adc0b=_0x4adc0b-0x1d1;const _0x518898=a51_0x5188();let _0x441edf=_0x518898[_0x4adc0b];return _0x441edf;}(function(_0x34defd,_0x3a3410){const _0x232f52=a51_0x441e,_0x410b52=_0x34defd();while(!![]){try{const _0x48f49a=parseInt(_0x232f52(0x1f8))/0x1*(parseInt(_0x232f52(0x1f5))/0x2)+parseInt(_0x232f52(0x1db))/0x3+-parseInt(_0x232f52(0x1e4))/0x4+parseInt(_0x232f52(0x1f0))/0x5+-parseInt(_0x232f52(0x1de))/0x6+-parseInt(_0x232f52(0x1e7))/0x7*(parseInt(_0x232f52(0x1f2))/0x8)+parseInt(_0x232f52(0x1e1))/0x9*(parseInt(_0x232f52(0x1ea))/0xa);if(_0x48f49a===_0x3a3410)break;else _0x410b52['push'](_0x410b52['shift']());}catch(_0x2a6a43){_0x410b52['push'](_0x410b52['shift']());}}}(a51_0x5188,0xdb68d));import{input,checkbox,select}from'@inquirer/prompts';import a51_0x319e2f from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x56c7e6=a51_0x441e,_0x38c14e=await input({'message':_0x56c7e6(0x1e8),'validate':_0x1674c1=>{const _0x482679=_0x56c7e6,_0x2efddd=validateAppcode(_0x1674c1[_0x482679(0x1f4)]());return _0x2efddd[_0x482679(0x1dc)]||_0x2efddd['message']||_0x482679(0x1e9);}});return _0x38c14e['trim']();}export async function promptAppSelection(_0x452918){const _0xc05c8a=a51_0x441e,_0x5488d8=[{'name':a51_0x319e2f['yellow'](_0xc05c8a(0x1d8)),'value':-0x1},..._0x452918['map']((_0x528750,_0x4fb07f)=>({'name':_0x528750[_0xc05c8a(0x1e2)]+'\x20\x20'+a51_0x319e2f[_0xc05c8a(0x1e3)]('('+_0x528750[_0xc05c8a(0x1d3)]+')'),'value':_0x4fb07f}))],_0x5ad034=await checkbox({'message':_0xc05c8a(0x1eb)+a51_0x319e2f['cyan'](_0x452918[_0xc05c8a(0x1ec)])+_0xc05c8a(0x1f1),'choices':_0x5488d8,'loop':![]});if(_0x5ad034[_0xc05c8a(0x1f3)](-0x1))return'custom';if(_0x5ad034[_0xc05c8a(0x1ec)]===0x0)return _0xc05c8a(0x1e6);return _0x5ad034['map'](_0x3e0a6e=>_0x452918[_0x3e0a6e]);}export async function promptSingleAppSelection(_0x4a1cc8){const _0x10da75=a51_0x441e,_0x2ac8eb=[{'name':a51_0x319e2f[_0x10da75(0x1e3)](_0x10da75(0x1f7)),'value':_0x10da75(0x1d1)},{'name':a51_0x319e2f[_0x10da75(0x1ee)](_0x10da75(0x1d8)),'value':'custom'},..._0x4a1cc8[_0x10da75(0x1ed)](_0x5a87d2=>({'name':_0x5a87d2[_0x10da75(0x1e2)]+'\x20\x20'+a51_0x319e2f[_0x10da75(0x1e3)]('('+_0x5a87d2[_0x10da75(0x1d3)]+')'),'value':_0x5a87d2[_0x10da75(0x1d3)]}))],_0x2a75ed=await select({'message':_0x10da75(0x1d4),'choices':_0x2ac8eb});if(_0x2a75ed==='skip')return _0x10da75(0x1d1);if(_0x2a75ed===_0x10da75(0x1e6))return'custom';return _0x4a1cc8[_0x10da75(0x1ef)](_0x55ad46=>_0x55ad46[_0x10da75(0x1d3)]===_0x2a75ed);}export async function selectSingleAppcode(_0x37dc39){const _0x5874f6=a51_0x441e;if(!_0x37dc39)return writeCliSideChannelLine(a51_0x319e2f[_0x5874f6(0x1e3)](_0x5874f6(0x1d7))),_fallbackOrSkip();writeCliSideChannelLine(_0x5874f6(0x1e0));let _0x1a08f7;try{_0x1a08f7=await withActiveCookie(_0x37dc39,()=>listRemoteApps());}catch(_0x156f94){writeCliSideChannelLine(a51_0x319e2f[_0x5874f6(0x1ee)](_0x5874f6(0x1da)));if(_0x156f94 instanceof Error)writeCliSideChannelLine(a51_0x319e2f[_0x5874f6(0x1e3)](_0x5874f6(0x1df)+_0x156f94[_0x5874f6(0x1f6)]+')'));return _fallbackOrSkip();}if(_0x1a08f7[_0x5874f6(0x1ec)]===0x0)return writeCliSideChannelLine(a51_0x319e2f['yellow'](_0x5874f6(0x1d2))),_fallbackOrSkip();const _0x2ac468=await promptSingleAppSelection(_0x1a08f7);if(_0x2ac468==='skip')return'';if(_0x2ac468==='custom')return promptCustomAppcode();return _0x2ac468['appCode'];}function a51_0x5188(){const _0x187f92=['\x20apps.\x20Select\x20with\x20space,\x20a=all,\x20i=invert:','1642312nNUxTK','includes','trim','90094SsUDct','message','(Skip;\x20configure\x20later\x20with\x20config\x20set\x20appcode)','11LCrplo','skip','No\x20available\x20apps\x20found.','appCode','Select\x20the\x20app\x20to\x20bind:','(Skip;\x20configure\x20later)','\x0aCould\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','(No\x20login\x20session.\x20Enter\x20an\x20App\x20Code\x20manually\x20or\x20skip.)','✎\x20Enter\x20appcode\x20manually','✎\x20Enter\x20manually','Could\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','163374SqPmnT','valid','manual','1956720MNNVYd','\x20\x20(','Fetching\x20available\x20apps...','27lmtHeq','appName','gray','1822728koBRIp','\x0aNo\x20available\x20apps\x20found.','custom','14fTftgw','App\x20Code:','Invalid\x20App\x20Code','2752970UPXMsJ','Found\x20','length','map','yellow','find','3576075HHorfh'];a51_0x5188=function(){return _0x187f92;};return a51_0x5188();}export async function selectMultipleApps(_0x38ab16){const _0x37ce57=a51_0x441e;writeCliSideChannelLine(_0x37ce57(0x1e0));let _0x14479a;try{_0x14479a=await withActiveCookie(_0x38ab16,()=>listRemoteApps());}catch(_0x114bda){writeCliSideChannelLine(_0x37ce57(0x1d6));if(_0x114bda instanceof Error)writeCliSideChannelLine(_0x37ce57(0x1df)+_0x114bda['message']+')');return _0x37ce57(0x1e6);}if(_0x14479a['length']===0x0)return writeCliSideChannelLine(_0x37ce57(0x1e5)),'custom';return promptAppSelection(_0x14479a);}async function _fallbackOrSkip(){const _0x564cc5=a51_0x441e,_0x3dce23=await select({'message':_0x564cc5(0x1e8),'choices':[{'name':a51_0x319e2f[_0x564cc5(0x1e3)](_0x564cc5(0x1d5)),'value':'skip'},{'name':a51_0x319e2f[_0x564cc5(0x1ee)](_0x564cc5(0x1d9)),'value':_0x564cc5(0x1dd)}]});if(_0x3dce23===_0x564cc5(0x1d1))return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a52_0x1be8(_0x271ba5,_0x43caf7){_0x271ba5=_0x271ba5-0xe0;const _0x3bc2a3=a52_0x3bc2();let _0x1be85d=_0x3bc2a3[_0x271ba5];return _0x1be85d;}const a52_0x392fe5=a52_0x1be8;(function(_0x3f9dea,_0x253696){const _0x4a1972=a52_0x1be8,_0x3a472a=_0x3f9dea();while(!![]){try{const _0x4da29d=-parseInt(_0x4a1972(0xef))/0x1*(parseInt(_0x4a1972(0xe8))/0x2)+-parseInt(_0x4a1972(0xe2))/0x3*(parseInt(_0x4a1972(0xfe))/0x4)+-parseInt(_0x4a1972(0xff))/0x5*(-parseInt(_0x4a1972(0xed))/0x6)+-parseInt(_0x4a1972(0xea))/0x7+parseInt(_0x4a1972(0xfc))/0x8+parseInt(_0x4a1972(0xf2))/0x9+-parseInt(_0x4a1972(0xe4))/0xa*(parseInt(_0x4a1972(0xf8))/0xb);if(_0x4da29d===_0x253696)break;else _0x3a472a['push'](_0x3a472a['shift']());}catch(_0x574700){_0x3a472a['push'](_0x3a472a['shift']());}}}(a52_0x3bc2,0x8e7c4));function a52_0x3bc2(){const _0x16f415=['\x20completed\x20successfully.','has','30wCvvOn','trim','2507AmXDcf','\x20is\x20processing.','\x20--appcode\x20','2501073RBJYfH','PENDING','\x20returned\x20unknown\x20status\x20','\x20response\x20did\x20not\x20contain\x20a\x20status.','taskId','\x20failed.','2750sIEZRw','Task\x20','toUpperCase','\x20is\x20pending.','5585680HYVWJX','errorMessage','8gCxSIu','75355WFQsPr','\x20task\x20status\x20--task-id\x20','\x20--format\x20compress','SUCCESS','FAILED','apiError','331026fzCzcR','string','8870EPWiCC','status','\x20failed:\x20','PROCESSING','12NOEjqn','\x27\x5c\x27\x27','72562uzyUCq'];a52_0x3bc2=function(){return _0x16f415;};return a52_0x3bc2();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a52_0x392fe5(0x102),a52_0x392fe5(0xe0)]),NON_TERMINAL_STATUSES=new Set([a52_0x392fe5(0xf3),'PROCESSING']);export function normalizeAsyncTask(_0x3dd9a2){const _0x4fd00b=a52_0x392fe5,_0x173575=typeof _0x3dd9a2?.[_0x4fd00b(0xf6)]===_0x4fd00b(0xe3)?_0x3dd9a2[_0x4fd00b(0xf6)]['trim']():'';if(!_0x173575)throw CliErrors[_0x4fd00b(0xe1)]('Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.');const _0x144d89=typeof _0x3dd9a2[_0x4fd00b(0xe5)]===_0x4fd00b(0xe3)?_0x3dd9a2[_0x4fd00b(0xe5)][_0x4fd00b(0xee)]()[_0x4fd00b(0xfa)]():'';if(!_0x144d89)throw CliErrors['apiError']('Async\x20task\x20'+_0x173575+_0x4fd00b(0xf5));return{'taskId':_0x173575,'status':_0x144d89,'errorMessage':typeof _0x3dd9a2[_0x4fd00b(0xfd)]===_0x4fd00b(0xe3)&&_0x3dd9a2[_0x4fd00b(0xfd)]['trim']()?_0x3dd9a2['errorMessage'][_0x4fd00b(0xee)]():null,'isTerminal':TERMINAL_STATUSES[_0x4fd00b(0xec)](_0x144d89),'knownStatus':TERMINAL_STATUSES[_0x4fd00b(0xec)](_0x144d89)||NON_TERMINAL_STATUSES[_0x4fd00b(0xec)](_0x144d89)};}export function buildAsyncTaskStatusCommand(_0x255169,_0x4b9775){const _0x123beb=a52_0x392fe5;return CLI_BIN_NAME+_0x123beb(0x100)+quoteShellArg(_0x255169)+_0x123beb(0xf1)+quoteShellArg(_0x4b9775)+_0x123beb(0x101);}export function asyncTaskMessage(_0x56c75b){const _0x2ee97b=a52_0x392fe5;switch(_0x56c75b[_0x2ee97b(0xe5)]){case _0x2ee97b(0xf3):return _0x2ee97b(0xf9)+_0x56c75b[_0x2ee97b(0xf6)]+_0x2ee97b(0xfb);case _0x2ee97b(0xe7):return _0x2ee97b(0xf9)+_0x56c75b[_0x2ee97b(0xf6)]+_0x2ee97b(0xf0);case _0x2ee97b(0x102):return _0x2ee97b(0xf9)+_0x56c75b[_0x2ee97b(0xf6)]+_0x2ee97b(0xeb);case'FAILED':return _0x56c75b[_0x2ee97b(0xfd)]?_0x2ee97b(0xf9)+_0x56c75b[_0x2ee97b(0xf6)]+_0x2ee97b(0xe6)+_0x56c75b['errorMessage']:_0x2ee97b(0xf9)+_0x56c75b[_0x2ee97b(0xf6)]+_0x2ee97b(0xf7);default:return _0x2ee97b(0xf9)+_0x56c75b['taskId']+_0x2ee97b(0xf4)+_0x56c75b[_0x2ee97b(0xe5)]+'.';}}function quoteShellArg(_0x1396b5){const _0x396f36=a52_0x392fe5;return'\x27'+_0x1396b5['replace'](/'/g,_0x396f36(0xe9))+'\x27';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x23ed71,_0x4cba5f){var _0x61a63c=a53_0x4e8d,_0x983269=_0x23ed71();while(!![]){try{var _0x4bdc42=parseInt(_0x61a63c(0xe5))/0x1*(-parseInt(_0x61a63c(0xe7))/0x2)+-parseInt(_0x61a63c(0xf2))/0x3*(-parseInt(_0x61a63c(0xe6))/0x4)+-parseInt(_0x61a63c(0xee))/0x5+parseInt(_0x61a63c(0xf3))/0x6*(parseInt(_0x61a63c(0xed))/0x7)+-parseInt(_0x61a63c(0xeb))/0x8*(parseInt(_0x61a63c(0xea))/0x9)+-parseInt(_0x61a63c(0xe9))/0xa+parseInt(_0x61a63c(0xf0))/0xb;if(_0x4bdc42===_0x4cba5f)break;else _0x983269['push'](_0x983269['shift']());}catch(_0x1e9f41){_0x983269['push'](_0x983269['shift']());}}}(a53_0x5a29,0x1bdb8));export function asDryRunResult(_0x1b63b0,_0x1ed89a){var _0x435600=a53_0x4e8d;return Object[_0x435600(0xef)](_0x1b63b0,{'method':{'value':_0x1ed89a[_0x435600(0xec)],'enumerable':![]},'url':{'value':_0x1ed89a[_0x435600(0xe8)],'enumerable':![]},..._0x1ed89a['description']?{'description':{'value':_0x1ed89a[_0x435600(0xf1)],'enumerable':![]}}:{}});}function a53_0x4e8d(_0x6bbb3a,_0x1810c8){_0x6bbb3a=_0x6bbb3a-0xe5;var _0x5a29d7=a53_0x5a29();var _0x4e8dc8=_0x5a29d7[_0x6bbb3a];return _0x4e8dc8;}function a53_0x5a29(){var _0xeaf4f8=['15HNOCKX','112668Qljquu','13tzUeop','46272bleBiG','31232cgEkBi','url','1343810qMjjNL','9jQJATP','884872SELeKy','method','49OGUtRW','32055RJheEP','defineProperties','4171497szHGhi','description'];a53_0x5a29=function(){return _0xeaf4f8;};return a53_0x5a29();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a54_0x4cc138=a54_0x2043;(function(_0x2ddd51,_0x36587b){const _0xbe49b6=a54_0x2043,_0x1f9345=_0x2ddd51();while(!![]){try{const _0x5d7339=-parseInt(_0xbe49b6(0x158))/0x1+-parseInt(_0xbe49b6(0x15a))/0x2+-parseInt(_0xbe49b6(0x177))/0x3*(parseInt(_0xbe49b6(0x170))/0x4)+-parseInt(_0xbe49b6(0x155))/0x5*(-parseInt(_0xbe49b6(0x16a))/0x6)+parseInt(_0xbe49b6(0x161))/0x7+parseInt(_0xbe49b6(0x160))/0x8*(parseInt(_0xbe49b6(0x164))/0x9)+-parseInt(_0xbe49b6(0x159))/0xa*(-parseInt(_0xbe49b6(0x163))/0xb);if(_0x5d7339===_0x36587b)break;else _0x1f9345['push'](_0x1f9345['shift']());}catch(_0x441b27){_0x1f9345['push'](_0x1f9345['shift']());}}}(a54_0x1e78,0xd15be));export const CROSS_RELATION_FROM_DATASET_FLAG={'name':a54_0x4cc138(0x179),'type':a54_0x4cc138(0x16f),'required':!![],'description':a54_0x4cc138(0x17b)};export const CROSS_RELATION_FROM_COLUMN_FLAG={'name':a54_0x4cc138(0x172),'type':a54_0x4cc138(0x16f),'required':!![],'description':a54_0x4cc138(0x15c)};export const CROSS_RELATION_TO_DATASET_FLAG={'name':a54_0x4cc138(0x167),'type':a54_0x4cc138(0x16f),'required':!![],'description':'Target\x20DB_TABLE\x20dataset\x20code'};export const CROSS_RELATION_TO_COLUMN_FLAG={'name':a54_0x4cc138(0x174),'type':'string','required':!![],'description':'Target\x20field\x20name'};function a54_0x2043(_0x46d97f,_0x4ad157){_0x46d97f=_0x46d97f-0x153;const _0x1e7822=a54_0x1e78();let _0x2043ba=_0x1e7822[_0x46d97f];return _0x2043ba;}export const CROSS_RELATION_DBLINK_FLAG={'name':a54_0x4cc138(0x156),'type':a54_0x4cc138(0x15d),'description':a54_0x4cc138(0x17c)};export const CROSS_RELATION_LABEL_FLAG={'name':a54_0x4cc138(0x15e),'type':a54_0x4cc138(0x16f),'description':'Target\x20display\x20field;\x20create\x20defaults\x20to\x20the\x20target\x20field,\x20update\x20keeps\x20the\x20current\x20value'};export const CROSS_RELATION_CARDINALITY_FLAG={'name':a54_0x4cc138(0x15b),'type':a54_0x4cc138(0x16f),'enum':[a54_0x4cc138(0x17a),a54_0x4cc138(0x16c),'MANY_TO_ONE',a54_0x4cc138(0x173)],'description':a54_0x4cc138(0x154)};function a54_0x1e78(){const _0x2b4f6d=['1422289BggyXU','1216215FZgYGD','Database\x20product\x20type','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','to-datasetcode','dbtype','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','6CKeNWZ','POSTGRESQL','ONE_TO_MANY','skip-connection-test','MYSQL','string','4188384nHBcQc','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','from-column','MANY_TO_MANY','to-column','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','appcode','3mdWCis','global','from-datasetcode','ONE_TO_ONE','Source\x20DB_TABLE\x20dataset\x20code','Source\x20database\x20connection\x20ID;\x20derived\x20from\x20the\x20source\x20dataset\x20when\x20omitted','sqlcode','boolean','Relation\x20cardinality;\x20create\x20leaves\x20it\x20unset\x20when\x20omitted,\x20update\x20keeps\x20the\x20current\x20value','1757455eSmchE','from-dblink-id','code','1258745ViBYSz','10diDCxh','190204KYWBDz','cardinality','Source\x20field\x20name\x20used\x20to\x20locate\x20the\x20relation','number','to-label-column','Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update','72FwwYmY','10930304GtZIaD','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)'];a54_0x1e78=function(){return _0x2b4f6d;};return a54_0x1e78();}export const GLOBAL_SCOPE_FLAG={'name':a54_0x4cc138(0x178),'type':'boolean','default':![],'description':'Write\x20to\x20the\x20global\x20configuration'};export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a54_0x4cc138(0x175)};export const CODE_FLAG={'name':a54_0x4cc138(0x157),'type':'string','required':!![],'description':'Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':'datasetcode','description':a54_0x4cc138(0x162)};export const SQLCODE_FLAG={'name':a54_0x4cc138(0x17d),'type':a54_0x4cc138(0x16f),'required':!![],'description':a54_0x4cc138(0x169),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const APPCODE_FLAG_OPTIONAL={'name':a54_0x4cc138(0x176),'type':a54_0x4cc138(0x16f),'required':![],'description':a54_0x4cc138(0x171)};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':a54_0x4cc138(0x15d),'required':!![],'description':a54_0x4cc138(0x166)};export const DB_TYPE_FLAG={'name':a54_0x4cc138(0x168),'type':a54_0x4cc138(0x16f),'required':!![],'description':a54_0x4cc138(0x165),'enum':[a54_0x4cc138(0x16e),a54_0x4cc138(0x16b)]};export const SKIP_CONNECTION_TEST_FLAG={'name':a54_0x4cc138(0x16d),'type':a54_0x4cc138(0x153),'description':a54_0x4cc138(0x15f)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4430b9,_0x4825b4){const _0x2aad20=a55_0x31fd,_0x3f8dbc=_0x4430b9();while(!![]){try{const _0x239fad=parseInt(_0x2aad20(0x1d1))/0x1+parseInt(_0x2aad20(0x1d0))/0x2*(parseInt(_0x2aad20(0x1cc))/0x3)+parseInt(_0x2aad20(0x1d4))/0x4*(-parseInt(_0x2aad20(0x1d6))/0x5)+-parseInt(_0x2aad20(0x1cf))/0x6*(parseInt(_0x2aad20(0x1c5))/0x7)+-parseInt(_0x2aad20(0x1cd))/0x8*(-parseInt(_0x2aad20(0x1c7))/0x9)+parseInt(_0x2aad20(0x1c6))/0xa+parseInt(_0x2aad20(0x1d7))/0xb*(-parseInt(_0x2aad20(0x1d2))/0xc);if(_0x239fad===_0x4825b4)break;else _0x3f8dbc['push'](_0x3f8dbc['shift']());}catch(_0x3e2d58){_0x3f8dbc['push'](_0x3f8dbc['shift']());}}}(a55_0x3b9d,0xb59be));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';function a55_0x31fd(_0x43b99d,_0xd21187){_0x43b99d=_0x43b99d-0x1c4;const _0x3b9d63=a55_0x3b9d();let _0x31fd01=_0x3b9d63[_0x43b99d];return _0x31fd01;}const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x839d56){const _0x20c0a9=a55_0x31fd;if(_0x839d56>=BYTES_PER_MB){const _0x199eaf=Math[_0x20c0a9(0x1ca)](_0x839d56/BYTES_PER_MB*0x64)/0x64;return _0x199eaf['toFixed'](0x2)+_0x20c0a9(0x1cb);}return _0x839d56+'\x20B';}function a55_0x3b9d(){const _0x508d7a=['40IXevxH','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','261670zYlJBo','16529579KyMumL','trim','isFile','98lAYQwk','13646960fExCUR','99Vgaltt','validation','\x20path\x20is\x20required.','ceil','\x20MB','231288OKadMt','270120LvpowF','File\x20not\x20found:\x20','629868GGpiLu','34PnVEAA','1192848UiOkrk','12TsmdPI','size'];a55_0x3b9d=function(){return _0x508d7a;};return a55_0x3b9d();}export function requireDevelopmentUploadFile(_0x18784d,_0x3af839){const _0x5cfac4=a55_0x31fd,_0x1d5bf6=_0x18784d[_0x5cfac4(0x1d8)]();if(!_0x1d5bf6)throw CliErrors[_0x5cfac4(0x1c8)](_0x3af839+_0x5cfac4(0x1c9));if(!existsSync(_0x1d5bf6))throw CliErrors['validation'](_0x5cfac4(0x1ce)+_0x1d5bf6);const _0x504e39=statSync(_0x1d5bf6);if(!_0x504e39[_0x5cfac4(0x1c4)]())throw CliErrors[_0x5cfac4(0x1c8)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x1d5bf6);if(_0x504e39[_0x5cfac4(0x1d3)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x5cfac4(0x1c8)](_0x5cfac4(0x1d5)+_0x1d5bf6+'\x20('+formatBytes(_0x504e39[_0x5cfac4(0x1d3)])+')');return{'path':_0x1d5bf6,'size':_0x504e39[_0x5cfac4(0x1d3)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a56_0x6de1(){const _0x495cc8=['73vVCSXX','4665414GZmcAR','603507holLNB','App\x20Code\x20cannot\x20be\x20empty','trim','10943624ZVdFFV','8Vesybi','490023fgXLJm','38162jQcBki','230PiPlEN','4264915fAcyxU','1480248ASpJyG','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','length'];a56_0x6de1=function(){return _0x495cc8;};return a56_0x6de1();}function a56_0x328f(_0x4f2324,_0x5a35a6){_0x4f2324=_0x4f2324-0xb1;const _0x6de1d2=a56_0x6de1();let _0x328f04=_0x6de1d2[_0x4f2324];return _0x328f04;}(function(_0x11b25e,_0x406ff5){const _0x5e3047=a56_0x328f,_0x331fd7=_0x11b25e();while(!![]){try{const _0x2fbca4=-parseInt(_0x5e3047(0xbb))/0x1*(parseInt(_0x5e3047(0xb5))/0x2)+parseInt(_0x5e3047(0xbd))/0x3*(parseInt(_0x5e3047(0xb3))/0x4)+parseInt(_0x5e3047(0xb7))/0x5+parseInt(_0x5e3047(0xbc))/0x6+parseInt(_0x5e3047(0xb8))/0x7+-parseInt(_0x5e3047(0xb2))/0x8+-parseInt(_0x5e3047(0xb4))/0x9*(-parseInt(_0x5e3047(0xb6))/0xa);if(_0x2fbca4===_0x406ff5)break;else _0x331fd7['push'](_0x331fd7['shift']());}catch(_0x4eb753){_0x331fd7['push'](_0x331fd7['shift']());}}}(a56_0x6de1,0xb3a19));export function validateAppcode(_0x50433c){const _0xf11c5c=a56_0x328f,_0x1ac24f=_0x50433c[_0xf11c5c(0xb1)]();if(!_0x1ac24f)return{'valid':![],'message':_0xf11c5c(0xbe)};if(_0x1ac24f[_0xf11c5c(0xba)]>0x64)return{'valid':![],'message':'App\x20Code\x20cannot\x20exceed\x20100\x20characters'};if(!/^[A-Za-z0-9_-]+$/['test'](_0x1ac24f))return{'valid':![],'message':_0xf11c5c(0xb9)};return{'valid':!![]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a57_0x40229a=a57_0x45e9;function a57_0x2a14(){const _0xe6069e=['global','9ahhLnd','Usage:\x20','634504QYSuze','669uXgfPs','Missing\x20key\x20argument.','1132wypjLD','Delete\x20a\x20config\x20value\x20from\x20one\x20scope','\x20already\x20absent','Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','key','\x20config\x20delete\x20<key>\x20[--global]','36hrnOfT','5220714jsxOpl','delete','routing','\x20deleted','call','defaultApp','\x22\x20is\x20not\x20deletable.','Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.','riskLevel','validation','776XJEmDv','215091fXCvcN','inherit','7HfYVNp','Project','858skTgGd','288gtIMvu','args','390JKoZoV','1227935FoeLKG','Top-level\x20key\x20\x22','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.'];a57_0x2a14=function(){return _0xe6069e;};return a57_0x2a14();}function a57_0x45e9(_0x3d4d10,_0x536c4c){_0x3d4d10=_0x3d4d10-0x143;const _0x2a14e3=a57_0x2a14();let _0x45e97b=_0x2a14e3[_0x3d4d10];return _0x45e97b;}(function(_0x3b2993,_0x5d1b04){const _0x922383=a57_0x45e9,_0x7bdf85=_0x3b2993();while(!![]){try{const _0x33726e=parseInt(_0x922383(0x159))/0x1*(parseInt(_0x922383(0x15b))/0x2)+parseInt(_0x922383(0x14a))/0x3*(parseInt(_0x922383(0x161))/0x4)+parseInt(_0x922383(0x152))/0x5+parseInt(_0x922383(0x162))/0x6*(parseInt(_0x922383(0x14c))/0x7)+parseInt(_0x922383(0x149))/0x8*(parseInt(_0x922383(0x156))/0x9)+-parseInt(_0x922383(0x151))/0xa*(-parseInt(_0x922383(0x14e))/0xb)+parseInt(_0x922383(0x14f))/0xc*(-parseInt(_0x922383(0x158))/0xd);if(_0x33726e===_0x5d1b04)break;else _0x7bdf85['push'](_0x7bdf85['shift']());}catch(_0x2ac56b){_0x7bdf85['push'](_0x7bdf85['shift']());}}}(a57_0x2a14,0xed274));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';const LEGACY_DELETABLE_KEYS=new Set([a57_0x40229a(0x14b)]),EXTRA_DELETABLE_KEYS=new Set([a57_0x40229a(0x144),a57_0x40229a(0x164)]);async function execute(_0x19e3c1){const _0x2ed675=a57_0x40229a,_0x1aa6c9=_0x19e3c1[_0x2ed675(0x150)][0x0]?.['trim']();if(!_0x1aa6c9)throw CliErrors[_0x2ed675(0x148)](_0x2ed675(0x15a),_0x2ed675(0x157)+CLI_BIN_NAME+_0x2ed675(0x160));if(_0x1aa6c9===_0x2ed675(0x147))throw CliErrors[_0x2ed675(0x148)](_0x2ed675(0x154));if(!isTopLevelConfigKey(_0x1aa6c9)&&!EXTRA_DELETABLE_KEYS['has'](_0x1aa6c9)&&!LEGACY_DELETABLE_KEYS['has'](_0x1aa6c9))throw CliErrors['validation'](_0x2ed675(0x153)+_0x1aa6c9+_0x2ed675(0x145),_0x2ed675(0x146));const _0x15e33c=resolveWriteScope({'global':_0x19e3c1['bool'](_0x2ed675(0x155))}),_0x45e8a4=readScopedConfig(_0x15e33c),_0x23a95a=Object['prototype']['hasOwnProperty'][_0x2ed675(0x143)](_0x45e8a4,_0x1aa6c9);_0x23a95a&&(delete _0x45e8a4[_0x1aa6c9],writeScopedConfig(_0x45e8a4,_0x15e33c));const _0xd812c5=_0x15e33c==='global'?'Global':_0x2ed675(0x14d);return{'ok':!![],'message':_0x23a95a?'✓\x20'+_0xd812c5+'\x20'+_0x1aa6c9+_0x2ed675(0x165):'✓\x20'+_0xd812c5+'\x20'+_0x1aa6c9+_0x2ed675(0x15d),'data':{'key':_0x1aa6c9,'scope':_0x15e33c,'changed':_0x23a95a}};}export const configDeleteDefinition={'service':'config','command':a57_0x40229a(0x163),'description':a57_0x40229a(0x15c),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[{'name':a57_0x40229a(0x15f),'description':a57_0x40229a(0x15e),'required':!![]}],'flags':[{'name':a57_0x40229a(0x155),'type':'boolean','description':'Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
|