@lovrabet/rabetbase-cli 2.5.7-beta.1 → 2.5.8-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
package/lib/commands/bff/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a44_0x303715=a44_0x1ee2;(function(_0x1db958,_0xaa5b01){const _0x59d989=a44_0x1ee2,_0x179cb1=_0x1db958();while(!![]){try{const _0x2c35b1=-parseInt(_0x59d989(0x11c))/0x1+-parseInt(_0x59d989(0x123))/0x2*(-parseInt(_0x59d989(0x100))/0x3)+parseInt(_0x59d989(0x115))/0x4+parseInt(_0x59d989(0xea))/0x5*(parseInt(_0x59d989(0xdb))/0x6)+parseInt(_0x59d989(0x12e))/0x7*(parseInt(_0x59d989(0xe2))/0x8)+parseInt(_0x59d989(0x125))/0x9*(parseInt(_0x59d989(0x109))/0xa)+-parseInt(_0x59d989(0x101))/0xb;if(_0x2c35b1===_0xaa5b01)break;else _0x179cb1['push'](_0x179cb1['shift']());}catch(_0x2e7fd1){_0x179cb1['push'](_0x179cb1['shift']());}}}(a44_0x4b06,0x2b3e3));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,getBffScriptStatistics,getPlatformErrorCode,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiModelSource}from'../../api/model-source.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{buildHookDirectoryIndexes,assertUnambiguousHookAliases,assertUnambiguousHookDirectoryMappings,preflightPushHookDirectories,trackedHookDirectoryMappings}from'../../core/bff/hook-directory.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription,snakeToCamel}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a44_0x303715(0x12a),'command':a44_0x303715(0x126),'description':a44_0x303715(0x114),'risk':a44_0x303715(0xd1),'structuredErrors':!![],'flags':[{'name':'type','type':'string','description':'Push\x20only\x20this\x20script\x20type','enum':[a44_0x303715(0xe0),a44_0x303715(0xc5),a44_0x303715(0x10c)]},{'name':a44_0x303715(0xc7),'type':a44_0x303715(0x113),'description':'Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)'},{'name':a44_0x303715(0xf9),'type':a44_0x303715(0x130),'description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x39daa2){const _0x2c73ed=a44_0x303715,_0xdf2cf9=loadBffProjectConfig(_0x39daa2['appCode']),_0x933947=await readBffLockFile(_0xdf2cf9[_0x2c73ed(0x10f)]),{appLock:_0x220ebf}=ensureLockScope(_0x933947??createEmptyBffLock(),_0x39daa2[_0x2c73ed(0x104)],_0xdf2cf9[_0x2c73ed(0xbf)],_0x2c73ed(0x126)),_0x1969e0=await getTargetFunctions(_0xdf2cf9,_0x39daa2),_0x25fcaf=_0x1969e0[_0x2c73ed(0x103)](_0x588f11=>_0x588f11['type']===_0x2c73ed(0x10c))?await scanLocalBffFunctions(_0xdf2cf9,_0x2c73ed(0x10c)):_0x1969e0,_0x4504d4=await buildHookMaps(_0x39daa2[_0x2c73ed(0x104)],_0x39daa2['apiDir'],_0x25fcaf,_0x220ebf,_0x39daa2[_0x2c73ed(0xe7)]||_0x39daa2['mergedCli']?.[_0x2c73ed(0x112)]||_0x39daa2[_0x2c73ed(0x10a)]?.['defaultApp']),_0x14bcfd=_0x39daa2[_0x2c73ed(0xc1)]('force'),_0x48b00d=[];for(const _0x3564a0 of _0x1969e0){const _0x35e4af=await computeFileHash(_0x3564a0[_0x2c73ed(0xfe)]),_0x34a893=_0x220ebf[_0x2c73ed(0x11a)][_0x3564a0[_0x2c73ed(0xcd)]],_0x46977e=!!_0x34a893&&_0x34a893[_0x2c73ed(0xcb)]===_0x35e4af,_0x444065=_0x4504d4[_0x2c73ed(0xfa)][_0x2c73ed(0xe9)](_0x3564a0['lockKey']),_0x4dc3e0=!!_0x34a893?.['remoteId']&&_0x34a893['version']==null&&(_0x14bcfd||!_0x46977e),_0x1fda11=_0x4dc3e0?missingRemoteVersionConflict(_0x3564a0,_0x34a893):undefined,_0xde6f4a=_0x4504d4[_0x2c73ed(0x12b)][_0x2c73ed(0x11f)](_0x3564a0[_0x2c73ed(0xcd)])?'failed':!_0x14bcfd&&_0x46977e?_0x2c73ed(0xd2):_0x1fda11?'conflict':_0x2c73ed(0x12d);_0x48b00d[_0x2c73ed(0x126)]({'lockKey':_0x3564a0[_0x2c73ed(0xcd)],'filePath':_0x3564a0[_0x2c73ed(0xfe)],'remoteId':_0x34a893?.['remoteId']??null,'mode':_0x34a893?.[_0x2c73ed(0xe8)]?_0x2c73ed(0xeb):_0x2c73ed(0xd0),'status':_0xde6f4a,..._0x4504d4['failures'][_0x2c73ed(0x11f)](_0x3564a0[_0x2c73ed(0xcd)])?{'error':_0x4504d4['failures'][_0x2c73ed(0xe9)](_0x3564a0[_0x2c73ed(0xcd)])}:{},..._0x1fda11?{'conflict':_0x1fda11}:{},..._0x4504d4[_0x2c73ed(0x107)][_0x2c73ed(0x11f)](_0x3564a0[_0x2c73ed(0xcd)])?{'datasetCode':_0x34a893?.[_0x2c73ed(0xfd)],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x3564a0[_0x2c73ed(0xcd)])]}:{},..._0x444065?{'alias':_0x444065[_0x2c73ed(0xc9)]??null,'datasetCode':_0x444065[_0x2c73ed(0xfd)],'operationType':_0x3564a0['operationType'],'functionNode':_0x3564a0[_0x2c73ed(0xd3)],'warnings':_0x444065['warnings']}:{}});}return{'method':_0x2c73ed(0x10e),'url':_0x2c73ed(0xef),'body':{'appCode':_0x39daa2[_0x2c73ed(0x104)],'force':_0x14bcfd,'files':_0x48b00d,'cacheClearAtRuntime':_0x48b00d['some'](_0x21a257=>_0x21a257[_0x2c73ed(0xe3)]===_0x2c73ed(0x12d)),'cacheClearAtRuntimeTimes':_0x48b00d[_0x2c73ed(0x103)](_0x3d4918=>_0x3d4918[_0x2c73ed(0xe3)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x2c73ed(0x105)+_0x48b00d[_0x2c73ed(0x110)]+_0x2c73ed(0xf6)};},async 'execute'(_0x194743){const _0x1e3e0f=a44_0x303715,_0xb5d6b6=loadBffProjectConfig(_0x194743[_0x1e3e0f(0x104)]),_0x488854=await readBffLockFile(_0xb5d6b6[_0x1e3e0f(0x10f)]),{lockData:_0x53f504,appLock:_0x260e1e}=ensureLockScope(_0x488854??createEmptyBffLock(),_0x194743[_0x1e3e0f(0x104)],_0xb5d6b6['scriptsRoot'],_0x1e3e0f(0x126)),_0x167e75=await getTargetFunctions(_0xb5d6b6,_0x194743);if(_0x167e75[_0x1e3e0f(0x110)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':_0x1e3e0f(0xec)};const _0xf8288e=_0x194743[_0x1e3e0f(0xc1)](_0x1e3e0f(0xf9)),_0x3255ee=JSON[_0x1e3e0f(0x127)](JSON[_0x1e3e0f(0xd5)](_0x53f504)),_0x54ea79=_0x3255ee[_0x1e3e0f(0xc6)][_0x194743['appCode']];if(!_0x54ea79)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x194743[_0x1e3e0f(0x104)]+_0x1e3e0f(0xda));const _0x912585=_0x167e75['some'](_0x52dacb=>_0x52dacb['type']===_0x1e3e0f(0x10c))?await scanLocalBffFunctions(_0xb5d6b6,'HOOK'):_0x167e75,_0x22dcaa=await buildHookMaps(_0x194743[_0x1e3e0f(0x104)],_0x194743[_0x1e3e0f(0xf5)],_0x912585,_0x54ea79,_0x194743['selectedAppName']||_0x194743[_0x1e3e0f(0x10a)]?.[_0x1e3e0f(0x112)]||_0x194743['mergedCli']?.['defaultApp']),_0x186a4c=[],_0x2bbc26=[],_0x304ae8=[],_0x54de6a=[];for(const _0x112b4f of _0x167e75){const _0x2052de=_0x22dcaa[_0x1e3e0f(0x12b)][_0x1e3e0f(0xe9)](_0x112b4f[_0x1e3e0f(0xcd)]);if(_0x2052de){_0x54de6a[_0x1e3e0f(0x126)]({'lockKey':_0x112b4f[_0x1e3e0f(0xcd)],'error':_0x2052de});continue;}const _0x3d67a3=await computeFileHash(_0x112b4f['filePath']),_0x503252=_0x54ea79['functions'][_0x112b4f['lockKey']];if(!_0xf8288e&&_0x503252&&_0x503252[_0x1e3e0f(0xcb)]===_0x3d67a3){_0x2bbc26[_0x1e3e0f(0x126)]({'lockKey':_0x112b4f[_0x1e3e0f(0xcd)],'reason':_0x1e3e0f(0xd2)});continue;}if(_0x503252?.[_0x1e3e0f(0xe8)]&&_0x503252['version']==null){_0x304ae8[_0x1e3e0f(0x126)](missingRemoteVersionConflict(_0x112b4f,_0x503252));continue;}try{await uploadSingleFunction(_0x194743['appCode'],_0x112b4f,_0x54ea79,_0x22dcaa);const _0x320d4e=_0x54ea79['functions'][_0x112b4f['lockKey']];_0x186a4c[_0x1e3e0f(0x126)]({'lockKey':_0x112b4f[_0x1e3e0f(0xcd)],'remoteId':_0x320d4e?.[_0x1e3e0f(0xe8)]??0x0});}catch(_0x580198){const _0xaf8fa2=remoteVersionChangedConflict(_0x112b4f,_0x503252,_0x580198);if(_0xaf8fa2){_0x304ae8[_0x1e3e0f(0x126)](_0xaf8fa2);continue;}_0x54de6a[_0x1e3e0f(0x126)]({'lockKey':_0x112b4f['lockKey'],'error':_0x580198 instanceof Error?_0x580198[_0x1e3e0f(0x10d)]:String(_0x580198)});}}_0x54ea79[_0x1e3e0f(0xc2)]=new Date()[_0x1e3e0f(0xd7)](),await writeBffLockFile(_0xb5d6b6['lockFilePath'],_0x3255ee),await waitForUploadedLockEntries(_0xb5d6b6['lockFilePath'],_0x194743[_0x1e3e0f(0x104)],_0x186a4c[_0x1e3e0f(0x131)](_0x2b5bc4=>_0x2b5bc4['lockKey']));let _0x358e20={'attempted':![],'cleared':![]};if(_0x186a4c['length']>0x0)try{let _0x36348b='';for(let _0x6ebcdf=0x0;_0x6ebcdf<CACHE_CLEAR_ATTEMPTS;_0x6ebcdf+=0x1){_0x36348b=await clearBffScriptCache(),_0x6ebcdf<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x358e20={'attempted':!![],'cleared':!![],'message':_0x36348b||_0x1e3e0f(0xe6)};}catch(_0x3ecbb3){_0x358e20={'attempted':!![],'cleared':![],'error':_0x3ecbb3 instanceof Error?_0x3ecbb3[_0x1e3e0f(0x10d)]:String(_0x3ecbb3)};}const _0x151715=_0x54de6a[_0x1e3e0f(0x110)]===0x0&&(_0x358e20[_0x1e3e0f(0x119)]?_0x358e20[_0x1e3e0f(0xc4)]:!![]),_0x438e79=_0x151715,_0x358035=_0x358e20[_0x1e3e0f(0x119)]?_0x358e20[_0x1e3e0f(0xc4)]?_0x1e3e0f(0xc0):'runtime\x20cache\x20clear\x20failed':_0x1e3e0f(0x129);return{'ok':_0x438e79,'data':{'uploaded':_0x186a4c,'skipped':_0x2bbc26,'conflicts':_0x304ae8,'failed':_0x54de6a,'cacheClear':_0x358e20,'warnings':[...[..._0x22dcaa['resolutions']['values']()]['flatMap'](_0x2e5647=>_0x2e5647[_0x1e3e0f(0x12c)]),...[..._0x22dcaa[_0x1e3e0f(0x107)]][_0x1e3e0f(0x131)](existingHookWarning)]},'message':formatPushMessage(_0x186a4c[_0x1e3e0f(0x110)],_0x2bbc26[_0x1e3e0f(0x110)],_0x304ae8['length'],_0x54de6a[_0x1e3e0f(0x110)],_0x358035)};}};function missingRemoteVersionConflict(_0x29f8cc,_0x5be4bf){const _0x21a78b=a44_0x303715;return remoteVersionConflict(_0x29f8cc,_0x5be4bf,_0x21a78b(0x117),_0x21a78b(0xfb));}function remoteVersionChangedConflict(_0x284578,_0xd57acb,_0x1fbc0a){const _0x30a57e=a44_0x303715;if(!_0xd57acb?.[_0x30a57e(0xe8)]||_0xd57acb['version']==null||!isRemoteVersionConflict(_0x1fbc0a))return undefined;return remoteVersionConflict(_0x284578,_0xd57acb,'BFF_REMOTE_VERSION_CHANGED',_0x30a57e(0xcf));}function remoteVersionConflict(_0x1842d2,_0x13440e,_0x114e57,_0x108ced){const _0x51a36d=a44_0x303715;return{'code':_0x114e57,'lockKey':_0x1842d2[_0x51a36d(0xcd)],'filePath':_0x1842d2[_0x51a36d(0xfe)],'remoteId':_0x13440e[_0x51a36d(0xe8)],..._0x13440e[_0x51a36d(0xe4)]!=null?{'expectedVersion':_0x13440e[_0x51a36d(0xe4)]}:{},'message':_0x108ced,'nextAction':{'action':'review_remote_and_merge','command':CLI_BIN_NAME+_0x51a36d(0x12f)+_0x13440e[_0x51a36d(0xe8)]+'\x20--format\x20compress','requiresReview':!![],'message':_0x51a36d(0x111)}};}function a44_0x1ee2(_0x4cef8b,_0x4b85cf){_0x4cef8b=_0x4cef8b-0xbf;const _0x4b065e=a44_0x4b06();let _0x1ee250=_0x4b065e[_0x4cef8b];return _0x1ee250;}function isRemoteVersionConflict(_0x47b70b){const _0x99b0bf=a44_0x303715,_0x229a01=_0x47b70b instanceof Error?_0x47b70b[_0x99b0bf(0x10d)]:String(_0x47b70b),_0xf4af4e=getPlatformErrorCode(_0x47b70b)??'';return[_0x229a01,_0xf4af4e][_0x99b0bf(0x103)](_0x2d4b2e=>/(?: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[_0x99b0bf(0xf0)](_0x2d4b2e));}function a44_0x4b06(){const _0x3e70d5=['parse','operationType','runtime\x20cache\x20not\x20needed','bff','failures','warnings','would_push','1239FCjSsT','\x20bff\x20detail\x20--id\x20','boolean','map','scriptsRoot','runtime\x20cache\x20cleared','bool','lastSync','startsWith','cleared','ENDPOINT','apps','name','before','alias','type','hash','datasetId','lockKey','Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20','Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.','create','write','unchanged','functionNode','set','stringify','\x20conflict','toISOString','requires','\x20uploaded','\x22\x20not\x20found\x20after\x20ensureLockScope.','24nmZGyt',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','Incomplete\x20HOOK\x20path:\x20','profileName','EXISTING_HOOK_BINDING_PRESERVED','COMMON','beforeScriptId','13704JdhTOD','status','version','after','Runtime\x20script\x20cache\x20cleared.','selectedAppName','remoteId','get','294775otDuWG','update','No\x20local\x20Backend\x20Function\x20scripts\x20found.','filter','description','/api/management/library/scripts/save','test','Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.','functionName','Local\x20function\x20not\x20found:\x20','afterScriptId','apiDir','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','flatMap','validation','force','resolutions','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','Push\x20complete:\x20','datasetCode','filePath','scriptType','85824zLVlPg','5865673KQNmKP','\x20resolution','some','appCode','Would\x20inspect\x20','require','existingHooks','delete','10mXmwtx','mergedCli','every','HOOK','message','POST','lockFilePath','length','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.','currentApp','string','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','995720MagaSC','str','BFF_REMOTE_VERSION_MISSING','Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.','attempted','functions','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','254684TKtrZh','\x20skipped','script','has','Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','join','2skHztj','size','1336419EnKpea','push'];a44_0x4b06=function(){return _0x3e70d5;};return a44_0x4b06();}function formatPushMessage(_0x1e64ec,_0x4ee136,_0x516b04,_0x3e09f7,_0x1cb208){const _0x2c5e6d=a44_0x303715,_0x44c8e3=[_0x2c5e6d(0xfc)+_0x1e64ec+_0x2c5e6d(0xd9),_0x4ee136+_0x2c5e6d(0x11d)];_0x516b04>0x0&&_0x44c8e3[_0x2c5e6d(0x126)](_0x516b04+_0x2c5e6d(0xd6)+(_0x516b04===0x1?'':'s')+'\x20'+(_0x516b04===0x1?_0x2c5e6d(0xd8):_0x2c5e6d(0x106))+_0x2c5e6d(0x102));if(_0x3e09f7>0x0)_0x44c8e3[_0x2c5e6d(0x126)](_0x3e09f7+'\x20failed');return _0x44c8e3['push'](_0x1cb208),_0x44c8e3[_0x2c5e6d(0x122)](',\x20');}async function getTargetFunctions(_0x36a211,_0x40cbed){const _0x595da3=a44_0x303715,_0x2b4e57=_0x40cbed[_0x595da3(0x116)](_0x595da3(0xca)),_0x44ec81=_0x40cbed[_0x595da3(0x116)](_0x595da3(0xc7)),_0x4fbe56=normalizeBffType(_0x2b4e57)??undefined;if(_0x44ec81&&!_0x4fbe56)throw CliErrors[_0x595da3(0xf8)](_0x595da3(0x11b));const _0x10694d=await scanLocalBffFunctions(_0x36a211,_0x4fbe56);if(_0x44ec81){const _0x327c9e=_0x10694d[_0x595da3(0xed)](_0x2dc026=>_0x2dc026[_0x595da3(0xc7)]===_0x44ec81);if(_0x327c9e['length']===0x0)throw CliErrors['validation'](_0x595da3(0xf3)+_0x4fbe56+'/'+_0x44ec81);return _0x327c9e;}return _0x10694d;}function existingHookWarning(_0x1deb4d){const _0x1a0180=a44_0x303715;return{'code':_0x1a0180(0xdf),'lockKey':_0x1deb4d,'message':_0x1a0180(0x118)};}async function buildHookMaps(_0x6049ca,_0x1b5309,_0xb903ed,_0x588d13,_0x293492){const _0x1b6735=a44_0x303715,_0x35d102=_0xb903ed[_0x1b6735(0x103)](_0xb510a1=>_0xb510a1[_0x1b6735(0xca)]===_0x1b6735(0x10c));if(!_0x35d102)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0x197d08=resolveApiModelSource(_0x1b5309,_0x6049ca,_0x293492),_0x385735=loadAliasMap(_0x1b5309,undefined,_0x197d08['filePath'],_0x197d08[_0x1b6735(0xde)]);assertUnambiguousHookAliases(_0x385735);const _0x11a64d=[..._0x385735['map'](_0x5c5b41=>[_0x5c5b41[_0x1b6735(0xc9)],_0x5c5b41[_0x1b6735(0xfd)]]),...trackedHookDirectoryMappings(_0x588d13)[_0x1b6735(0x131)](_0x1281a4=>[_0x1281a4['alias'],_0x1281a4[_0x1b6735(0xfd)]])],_0x863056=await listDatasets(_0x6049ca);assertUnambiguousHookDirectoryMappings(_0x11a64d[_0x1b6735(0x131)](([_0x412272,_0x10ee53])=>({'alias':_0x412272,'datasetCode':_0x10ee53})));const _0xc26d70=buildHookDirectoryIndexes(_0x863056,_0x11a64d),_0x44b522=new Map(),_0x3f9fc8=preflightPushHookDirectories(_0xb903ed,_0x588d13,_0xc26d70,_0x44b522),_0x3dd3c4=new Set(),_0x3d44dd=_0xb903ed[_0x1b6735(0xed)](_0x109f1a=>_0x44b522[_0x1b6735(0xe9)](_0x109f1a[_0x1b6735(0xcd)])?.[_0x1b6735(0xc3)]('HOOK_DATASET_NOT_FOUND:')&&_0x588d13['functions'][_0x109f1a[_0x1b6735(0xcd)]]?.['remoteId']&&_0x588d13['functions'][_0x109f1a[_0x1b6735(0xcd)]]?.[_0x1b6735(0xfd)]);if(_0x3d44dd[_0x1b6735(0x110)]>0x0){let _0x202d6a;try{_0x202d6a=await getBffScriptStatistics(_0x6049ca);}catch(_0x606814){for(const _0x4a063f of _0x3d44dd)_0x44b522['set'](_0x4a063f['lockKey'],_0x1b6735(0xce)+(_0x606814 instanceof Error?_0x606814['message']:String(_0x606814)));return{'resolutions':_0x3f9fc8,'failures':_0x44b522,'existingHooks':_0x3dd3c4};}for(const _0x50c2b of _0x3d44dd){const _0x183159=_0x588d13[_0x1b6735(0x11a)][_0x50c2b[_0x1b6735(0xcd)]];try{const _0x26875d=new Set(_0xb903ed['filter'](_0x3ba8dc=>_0x3ba8dc[_0x1b6735(0xca)]===_0x1b6735(0x10c)&&_0x588d13[_0x1b6735(0x11a)][_0x3ba8dc[_0x1b6735(0xcd)]]?.[_0x1b6735(0xfd)]===_0x183159[_0x1b6735(0xfd)])['map'](_0x4c7094=>_0x4c7094[_0x1b6735(0xc9)]));if(_0x26875d[_0x1b6735(0x124)]>0x1)throw CliErrors['validation'](_0x1b6735(0x120));const _0x4ebce3=_0x202d6a[_0x1b6735(0xf7)](_0x47c267=>[{'datasetCode':_0x47c267['datasetCode'],'operationType':snakeToCamel(_0x47c267[_0x1b6735(0x128)]),'functionNode':_0x1b6735(0xc8),'id':_0x47c267[_0x1b6735(0xe1)]},{'datasetCode':_0x47c267['datasetCode'],'operationType':snakeToCamel(_0x47c267['operationType']),'functionNode':_0x1b6735(0xe5),'id':_0x47c267[_0x1b6735(0xf4)]}])[_0x1b6735(0xed)](_0x239ade=>_0x239ade['id']===_0x183159[_0x1b6735(0xe8)]),_0x433145=await getBffScriptInfo(_0x183159['remoteId']);if(_0x433145['id']!==_0x183159[_0x1b6735(0xe8)]||_0x433145['appCode']!==_0x6049ca||_0x433145[_0x1b6735(0xff)]!==_0x1b6735(0x10c)||_0x433145[_0x1b6735(0xf2)]!==_0x50c2b[_0x1b6735(0xc7)]||_0x183159[_0x1b6735(0xe4)]==null||_0x433145[_0x1b6735(0xe4)]!==_0x183159[_0x1b6735(0xe4)]||_0x4ebce3[_0x1b6735(0x110)]!==0x1||_0x4ebce3[0x0][_0x1b6735(0xfd)]!==_0x183159[_0x1b6735(0xfd)]||_0x4ebce3[0x0][_0x1b6735(0x128)]!==_0x50c2b[_0x1b6735(0x128)]||_0x4ebce3[0x0][_0x1b6735(0xd3)]!==_0x50c2b[_0x1b6735(0xd3)]||_0x183159[_0x1b6735(0x128)]!==_0x50c2b[_0x1b6735(0x128)]||_0x183159[_0x1b6735(0xd3)]!==_0x50c2b[_0x1b6735(0xd3)])throw CliErrors[_0x1b6735(0xf8)](_0x1b6735(0xf1));_0x3dd3c4['add'](_0x50c2b[_0x1b6735(0xcd)]),_0x44b522[_0x1b6735(0x108)](_0x50c2b[_0x1b6735(0xcd)]);}catch(_0x1e2699){_0x44b522[_0x1b6735(0xd4)](_0x50c2b[_0x1b6735(0xcd)],_0x1e2699 instanceof Error?_0x1e2699[_0x1b6735(0x10d)]:String(_0x1e2699));}}}return{'resolutions':_0x3f9fc8,'failures':_0x44b522,'existingHooks':_0x3dd3c4};}async function uploadSingleFunction(_0x50dfb0,_0x52bf23,_0x117f55,_0x3ceb4e){const _0x4599b1=a44_0x303715,_0x5ae0aa=await readFile(_0x52bf23[_0x4599b1(0xfe)],'utf8'),_0x5cb280=await computeFileHash(_0x52bf23[_0x4599b1(0xfe)]),_0x78fb48=_0x117f55['functions'][_0x52bf23[_0x4599b1(0xcd)]];if(_0x78fb48?.[_0x4599b1(0xe8)]&&_0x78fb48[_0x4599b1(0xe4)]==null)throw CliErrors[_0x4599b1(0xf8)](_0x52bf23[_0x4599b1(0xcd)]+_0x4599b1(0xdc));let _0xfeb61a=extractScriptDescription(_0x5ae0aa);if(!_0xfeb61a&&_0x78fb48?.['remoteId']){const _0x5d7e4c=await getBffScriptInfo(_0x78fb48[_0x4599b1(0xe8)]);_0xfeb61a=_0x5d7e4c[_0x4599b1(0xee)]||undefined;}const _0x1ba8ff={'appCode':_0x50dfb0,'functionName':_0x52bf23[_0x4599b1(0xc7)],'scriptType':_0x52bf23[_0x4599b1(0xca)],'scriptContent':_0x5ae0aa};if(_0x78fb48?.[_0x4599b1(0xe8)])_0x1ba8ff['id']=_0x78fb48[_0x4599b1(0xe8)];if(_0x78fb48?.['version']!=null)_0x1ba8ff['version']=_0x78fb48[_0x4599b1(0xe4)];if(_0xfeb61a)_0x1ba8ff[_0x4599b1(0xee)]=_0xfeb61a;if(_0x52bf23['type']===_0x4599b1(0x10c)){const _0x286986=_0x3ceb4e['resolutions'][_0x4599b1(0xe9)](_0x52bf23['lockKey']);if(!_0x286986&&!_0x3ceb4e[_0x4599b1(0x107)][_0x4599b1(0x11f)](_0x52bf23['lockKey'])||!_0x52bf23[_0x4599b1(0x128)]||!_0x52bf23[_0x4599b1(0xd3)])throw CliErrors[_0x4599b1(0xf8)](_0x4599b1(0xdd)+_0x52bf23[_0x4599b1(0xcd)]);_0x286986&&(_0x1ba8ff[_0x4599b1(0xcc)]=_0x286986['dataset']['id'],_0x1ba8ff['operationType']=_0x52bf23[_0x4599b1(0x128)]),_0x1ba8ff[_0x4599b1(0xd3)]=_0x52bf23[_0x4599b1(0xd3)];}const _0x39a349=await saveBffScript(_0x1ba8ff),_0x47834c=_0x39a349['id'],_0x4f0f36=_0x39a349[_0x4599b1(0x11e)]??await getBffScriptInfo(_0x47834c),_0x771237={'hash':_0x5cb280,'remoteId':_0x47834c,'version':_0x4f0f36[_0x4599b1(0xe4)]};if(_0x52bf23[_0x4599b1(0xca)]===_0x4599b1(0x10c)){const _0xfd09d1=_0x3ceb4e[_0x4599b1(0xfa)]['get'](_0x52bf23[_0x4599b1(0xcd)]);if(!_0xfd09d1){_0x117f55[_0x4599b1(0x11a)][_0x52bf23[_0x4599b1(0xcd)]]={..._0x78fb48,..._0x771237};return;}_0x771237[_0x4599b1(0xc9)]=_0xfd09d1['alias']??_0x78fb48?.[_0x4599b1(0xc9)],_0x771237[_0x4599b1(0xfd)]=_0xfd09d1[_0x4599b1(0xfd)],_0x771237[_0x4599b1(0x128)]=_0x52bf23[_0x4599b1(0x128)],_0x771237[_0x4599b1(0xd3)]=_0x52bf23[_0x4599b1(0xd3)];}_0x117f55[_0x4599b1(0x11a)][_0x52bf23[_0x4599b1(0xcd)]]=_0x771237;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x27b824,_0x37847d,_0x3545a5){const _0x34caa6=a44_0x303715;if(_0x3545a5[_0x34caa6(0x110)]===0x0)return;for(let _0x13ef4a=0x0;_0x13ef4a<LOCK_SETTLE_RETRY_COUNT;_0x13ef4a+=0x1){const _0x427ed7=await readBffLockFile(_0x27b824),_0x536665=_0x427ed7?.[_0x34caa6(0xc6)]?.[_0x37847d]?.[_0x34caa6(0x11a)]??{},_0x101ecc=_0x3545a5[_0x34caa6(0x10b)](_0x52dc5f=>!!_0x536665[_0x52dc5f]?.['remoteId']);if(_0x101ecc)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x34caa6(0x121)+_0x3545a5[_0x34caa6(0x122)](',\x20')+'.');}
|
|
1
|
+
const a44_0x338799=a44_0x8a24;(function(_0x25ec46,_0x450ebe){const _0x1e1291=a44_0x8a24,_0x30fcdf=_0x25ec46();while(!![]){try{const _0x47bb5e=parseInt(_0x1e1291(0x1d8))/0x1*(-parseInt(_0x1e1291(0x215))/0x2)+-parseInt(_0x1e1291(0x1fd))/0x3+parseInt(_0x1e1291(0x1c5))/0x4+parseInt(_0x1e1291(0x222))/0x5*(-parseInt(_0x1e1291(0x1d6))/0x6)+-parseInt(_0x1e1291(0x20b))/0x7+-parseInt(_0x1e1291(0x212))/0x8+-parseInt(_0x1e1291(0x1fb))/0x9*(-parseInt(_0x1e1291(0x211))/0xa);if(_0x47bb5e===_0x450ebe)break;else _0x30fcdf['push'](_0x30fcdf['shift']());}catch(_0x2f3824){_0x30fcdf['push'](_0x30fcdf['shift']());}}}(a44_0x2ab2,0xb5a79));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,getBffScriptStatistics,getPlatformErrorCode,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiModelSource}from'../../api/model-source.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{buildHookDirectoryIndexes,assertUnambiguousHookAliases,assertUnambiguousHookDirectoryMappings,preflightPushHookDirectories,trackedHookDirectoryMappings}from'../../core/bff/hook-directory.js';function a44_0x8a24(_0x474d99,_0x20df44){_0x474d99=_0x474d99-0x1ba;const _0x2ab2cb=a44_0x2ab2();let _0x8a2481=_0x2ab2cb[_0x474d99];return _0x8a2481;}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':'bff','command':a44_0x338799(0x228),'description':a44_0x338799(0x1bd),'risk':a44_0x338799(0x1ef),'structuredErrors':!![],'flags':[{'name':'type','type':'string','description':a44_0x338799(0x225),'enum':[a44_0x338799(0x231),a44_0x338799(0x1f1),a44_0x338799(0x1d0)]},{'name':'name','type':a44_0x338799(0x1f7),'description':a44_0x338799(0x218)},{'name':a44_0x338799(0x1dd),'type':a44_0x338799(0x21b),'description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x442562){const _0x8a47f9=a44_0x338799,_0x2d24dd=loadBffProjectConfig(_0x442562[_0x8a47f9(0x1ce)]),_0xa927bb=await readBffLockFile(_0x2d24dd['lockFilePath']),{appLock:_0x45278f}=ensureLockScope(_0xa927bb??createEmptyBffLock(),_0x442562[_0x8a47f9(0x1ce)],_0x2d24dd['scriptsRoot'],'push'),_0x40b073=await getTargetFunctions(_0x2d24dd,_0x442562),_0x52ac41=_0x40b073[_0x8a47f9(0x226)](_0x3e6bb0=>_0x3e6bb0[_0x8a47f9(0x204)]===_0x8a47f9(0x1d0))?await scanLocalBffFunctions(_0x2d24dd,_0x8a47f9(0x1d0)):_0x40b073,_0x11c193=await buildHookMaps(_0x442562[_0x8a47f9(0x1ce)],_0x442562[_0x8a47f9(0x1e0)],_0x52ac41,_0x45278f,_0x442562[_0x8a47f9(0x1d9)]||_0x442562[_0x8a47f9(0x1fa)]?.[_0x8a47f9(0x1c9)]||_0x442562[_0x8a47f9(0x1fa)]?.[_0x8a47f9(0x1be)]),_0x3464ab=_0x442562[_0x8a47f9(0x1f8)]('force'),_0x3f7f04=[];for(const _0x436b00 of _0x40b073){const _0x55df8e=await computeFileHash(_0x436b00[_0x8a47f9(0x22d)]),_0x2e3d2d=_0x45278f[_0x8a47f9(0x1d5)][_0x436b00[_0x8a47f9(0x1e3)]],_0x80a9c=!!_0x2e3d2d&&_0x2e3d2d[_0x8a47f9(0x1f0)]===_0x55df8e,_0x24f860=_0x11c193[_0x8a47f9(0x22f)][_0x8a47f9(0x1da)](_0x436b00[_0x8a47f9(0x1e3)]),_0x1f9b5a=!!_0x2e3d2d?.[_0x8a47f9(0x20e)]&&_0x2e3d2d[_0x8a47f9(0x230)]==null&&(_0x3464ab||!_0x80a9c),_0x2a4965=_0x1f9b5a?missingRemoteVersionConflict(_0x436b00,_0x2e3d2d):undefined,_0x3f4859=_0x11c193['failures'][_0x8a47f9(0x1cf)](_0x436b00['lockKey'])?_0x8a47f9(0x1f5):!_0x3464ab&&_0x80a9c?'unchanged':_0x2a4965?'conflict':_0x8a47f9(0x233);_0x3f7f04['push']({'lockKey':_0x436b00[_0x8a47f9(0x1e3)],'filePath':_0x436b00[_0x8a47f9(0x22d)],'remoteId':_0x2e3d2d?.[_0x8a47f9(0x20e)]??null,'mode':_0x2e3d2d?.[_0x8a47f9(0x20e)]?_0x8a47f9(0x229):_0x8a47f9(0x22c),'status':_0x3f4859,..._0x11c193[_0x8a47f9(0x22e)][_0x8a47f9(0x1cf)](_0x436b00[_0x8a47f9(0x1e3)])?{'error':_0x11c193[_0x8a47f9(0x22e)][_0x8a47f9(0x1da)](_0x436b00['lockKey'])}:{},..._0x2a4965?{'conflict':_0x2a4965}:{},..._0x11c193[_0x8a47f9(0x1c4)][_0x8a47f9(0x1cf)](_0x436b00[_0x8a47f9(0x1e3)])?{'datasetCode':_0x2e3d2d?.['datasetCode'],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x436b00[_0x8a47f9(0x1e3)])]}:{},..._0x24f860?{'alias':_0x24f860[_0x8a47f9(0x20c)]??null,'datasetCode':_0x24f860[_0x8a47f9(0x1e6)],'operationType':_0x436b00[_0x8a47f9(0x201)],'functionNode':_0x436b00[_0x8a47f9(0x1bb)],'warnings':_0x24f860[_0x8a47f9(0x1ea)]}:{}});}return{'method':_0x8a47f9(0x224),'url':_0x8a47f9(0x1ed),'body':{'appCode':_0x442562['appCode'],'force':_0x3464ab,'files':_0x3f7f04,'cacheClearAtRuntime':_0x3f7f04['some'](_0x96e6e3=>_0x96e6e3[_0x8a47f9(0x1f9)]==='would_push'),'cacheClearAtRuntimeTimes':_0x3f7f04[_0x8a47f9(0x226)](_0x245704=>_0x245704[_0x8a47f9(0x1f9)]===_0x8a47f9(0x233))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x8a47f9(0x1c0)+_0x3f7f04[_0x8a47f9(0x20f)]+'\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded'};},async 'execute'(_0x63dd04){const _0x33182b=a44_0x338799,_0x435b08=loadBffProjectConfig(_0x63dd04['appCode']),_0x2bc4d3=await readBffLockFile(_0x435b08['lockFilePath']),{lockData:_0x2fe316,appLock:_0x49841f}=ensureLockScope(_0x2bc4d3??createEmptyBffLock(),_0x63dd04[_0x33182b(0x1ce)],_0x435b08[_0x33182b(0x1c3)],_0x33182b(0x228)),_0x1f6fb3=await getTargetFunctions(_0x435b08,_0x63dd04);if(_0x1f6fb3[_0x33182b(0x20f)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':_0x33182b(0x1cb)};const _0x30b8bf=_0x63dd04['bool'](_0x33182b(0x1dd)),_0x2fb0ea=JSON[_0x33182b(0x210)](JSON[_0x33182b(0x1f4)](_0x2fe316)),_0x1133e7=_0x2fb0ea['apps'][_0x63dd04[_0x33182b(0x1ce)]];if(!_0x1133e7)throw new Error(_0x33182b(0x223)+_0x63dd04[_0x33182b(0x1ce)]+_0x33182b(0x1f6));const _0x542fc6=_0x1f6fb3[_0x33182b(0x226)](_0x35c0be=>_0x35c0be[_0x33182b(0x204)]===_0x33182b(0x1d0))?await scanLocalBffFunctions(_0x435b08,_0x33182b(0x1d0)):_0x1f6fb3,_0x15a3cb=await buildHookMaps(_0x63dd04[_0x33182b(0x1ce)],_0x63dd04['apiDir'],_0x542fc6,_0x1133e7,_0x63dd04[_0x33182b(0x1d9)]||_0x63dd04[_0x33182b(0x1fa)]?.[_0x33182b(0x1c9)]||_0x63dd04[_0x33182b(0x1fa)]?.[_0x33182b(0x1be)]),_0xb17e88=[],_0x3caccf=[],_0x1c9a81=[],_0x208dee=[];for(const _0x6d6fda of _0x1f6fb3){const _0x12c268=_0x15a3cb[_0x33182b(0x22e)][_0x33182b(0x1da)](_0x6d6fda[_0x33182b(0x1e3)]);if(_0x12c268){_0x208dee['push']({'lockKey':_0x6d6fda[_0x33182b(0x1e3)],'error':_0x12c268});continue;}const _0x4695c4=await computeFileHash(_0x6d6fda['filePath']),_0x3c2326=_0x1133e7['functions'][_0x6d6fda[_0x33182b(0x1e3)]];if(!_0x30b8bf&&_0x3c2326&&_0x3c2326[_0x33182b(0x1f0)]===_0x4695c4){_0x3caccf[_0x33182b(0x228)]({'lockKey':_0x6d6fda[_0x33182b(0x1e3)],'reason':_0x33182b(0x1f2)});continue;}if(_0x3c2326?.['remoteId']&&_0x3c2326[_0x33182b(0x230)]==null){_0x1c9a81[_0x33182b(0x228)](missingRemoteVersionConflict(_0x6d6fda,_0x3c2326));continue;}try{await uploadSingleFunction(_0x63dd04['appCode'],_0x6d6fda,_0x1133e7,_0x15a3cb);const _0x4cbb58=_0x1133e7[_0x33182b(0x1d5)][_0x6d6fda[_0x33182b(0x1e3)]];_0xb17e88[_0x33182b(0x228)]({'lockKey':_0x6d6fda['lockKey'],'remoteId':_0x4cbb58?.['remoteId']??0x0});}catch(_0x3ab95e){const _0x3e137c=remoteVersionChangedConflict(_0x6d6fda,_0x3c2326,_0x3ab95e);if(_0x3e137c){_0x1c9a81[_0x33182b(0x228)](_0x3e137c);continue;}_0x208dee[_0x33182b(0x228)]({'lockKey':_0x6d6fda['lockKey'],'error':_0x3ab95e instanceof Error?_0x3ab95e[_0x33182b(0x1fe)]:String(_0x3ab95e)});}}_0x1133e7['lastSync']=new Date()[_0x33182b(0x21c)](),await writeBffLockFile(_0x435b08[_0x33182b(0x1c2)],_0x2fb0ea),await waitForUploadedLockEntries(_0x435b08[_0x33182b(0x1c2)],_0x63dd04[_0x33182b(0x1ce)],_0xb17e88['map'](_0x4ed3a2=>_0x4ed3a2['lockKey']));let _0x108eae={'attempted':![],'cleared':![]};if(_0xb17e88[_0x33182b(0x20f)]>0x0)try{let _0x4c2534='';for(let _0x4ae6fd=0x0;_0x4ae6fd<CACHE_CLEAR_ATTEMPTS;_0x4ae6fd+=0x1){_0x4c2534=await clearBffScriptCache(),_0x4ae6fd<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x108eae={'attempted':!![],'cleared':!![],'message':_0x4c2534||_0x33182b(0x1de)};}catch(_0xe0753a){_0x108eae={'attempted':!![],'cleared':![],'error':_0xe0753a instanceof Error?_0xe0753a[_0x33182b(0x1fe)]:String(_0xe0753a)};}const _0xf01e=_0x208dee[_0x33182b(0x20f)]===0x0&&(_0x108eae[_0x33182b(0x202)]?_0x108eae[_0x33182b(0x20d)]:!![]),_0x18f24a=_0xf01e,_0x4ca86d=_0x108eae[_0x33182b(0x202)]?_0x108eae[_0x33182b(0x20d)]?'runtime\x20cache\x20cleared':_0x33182b(0x1e5):_0x33182b(0x1e1);return{'ok':_0x18f24a,'data':{'uploaded':_0xb17e88,'skipped':_0x3caccf,'conflicts':_0x1c9a81,'failed':_0x208dee,'cacheClear':_0x108eae,'warnings':[...[..._0x15a3cb[_0x33182b(0x22f)][_0x33182b(0x1e4)]()][_0x33182b(0x21f)](_0x1e9263=>_0x1e9263['warnings']),...[..._0x15a3cb[_0x33182b(0x1c4)]]['map'](existingHookWarning)]},'message':formatPushMessage(_0xb17e88[_0x33182b(0x20f)],_0x3caccf['length'],_0x1c9a81['length'],_0x208dee[_0x33182b(0x20f)],_0x4ca86d)};}};function missingRemoteVersionConflict(_0x3ae585,_0x458a27){const _0x4c9f1e=a44_0x338799;return remoteVersionConflict(_0x3ae585,_0x458a27,_0x4c9f1e(0x1d1),_0x4c9f1e(0x220));}function remoteVersionChangedConflict(_0x1d42e9,_0x936f05,_0x5e2750){const _0x48b7d1=a44_0x338799;if(!_0x936f05?.[_0x48b7d1(0x20e)]||_0x936f05[_0x48b7d1(0x230)]==null||!isRemoteVersionConflict(_0x5e2750))return undefined;return remoteVersionConflict(_0x1d42e9,_0x936f05,_0x48b7d1(0x1c7),_0x48b7d1(0x1ba));}function remoteVersionConflict(_0x31310d,_0x7ba324,_0x341462,_0x2960b3){const _0x24bce9=a44_0x338799;return{'code':_0x341462,'lockKey':_0x31310d[_0x24bce9(0x1e3)],'filePath':_0x31310d[_0x24bce9(0x22d)],'remoteId':_0x7ba324['remoteId'],..._0x7ba324['version']!=null?{'expectedVersion':_0x7ba324[_0x24bce9(0x230)]}:{},'message':_0x2960b3,'nextAction':{'action':_0x24bce9(0x216),'command':CLI_BIN_NAME+_0x24bce9(0x1d3)+_0x7ba324[_0x24bce9(0x20e)]+_0x24bce9(0x1e8),'requiresReview':!![],'message':_0x24bce9(0x214)}};}function isRemoteVersionConflict(_0x1ab494){const _0x5d4ca4=a44_0x338799,_0x239bc3=_0x1ab494 instanceof Error?_0x1ab494[_0x5d4ca4(0x1fe)]:String(_0x1ab494),_0x4d6ca6=getPlatformErrorCode(_0x1ab494)??'';return[_0x239bc3,_0x4d6ca6]['some'](_0x3a6630=>/(?: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[_0x5d4ca4(0x21e)](_0x3a6630));}function formatPushMessage(_0x2ef2b1,_0x2fc7eb,_0x4fbed9,_0x354df5,_0x46eeca){const _0x229255=a44_0x338799,_0x53b6c7=[_0x229255(0x1bc)+_0x2ef2b1+_0x229255(0x1f3),_0x2fc7eb+_0x229255(0x203)];_0x4fbed9>0x0&&_0x53b6c7[_0x229255(0x228)](_0x4fbed9+_0x229255(0x1ca)+(_0x4fbed9===0x1?'':'s')+'\x20'+(_0x4fbed9===0x1?_0x229255(0x200):_0x229255(0x1ee))+_0x229255(0x209));if(_0x354df5>0x0)_0x53b6c7['push'](_0x354df5+_0x229255(0x1c1));return _0x53b6c7['push'](_0x46eeca),_0x53b6c7[_0x229255(0x1cc)](',\x20');}async function getTargetFunctions(_0x57ce0b,_0x481aab){const _0x1c006a=a44_0x338799,_0x3d47c4=_0x481aab['str'](_0x1c006a(0x204)),_0x3b2cb5=_0x481aab[_0x1c006a(0x1ff)](_0x1c006a(0x21a)),_0x50cf24=normalizeBffType(_0x3d47c4)??undefined;if(_0x3b2cb5&&!_0x50cf24)throw CliErrors[_0x1c006a(0x217)](_0x1c006a(0x1e2));const _0xde79fb=await scanLocalBffFunctions(_0x57ce0b,_0x50cf24);if(_0x3b2cb5){const _0x34958f=_0xde79fb[_0x1c006a(0x232)](_0x498caf=>_0x498caf[_0x1c006a(0x21a)]===_0x3b2cb5);if(_0x34958f[_0x1c006a(0x20f)]===0x0)throw CliErrors[_0x1c006a(0x217)](_0x1c006a(0x1fc)+_0x50cf24+'/'+_0x3b2cb5);return _0x34958f;}return _0xde79fb;}function existingHookWarning(_0x2ec023){const _0x5b5b65=a44_0x338799;return{'code':_0x5b5b65(0x1d2),'lockKey':_0x2ec023,'message':_0x5b5b65(0x234)};}async function buildHookMaps(_0x59a9e2,_0x2ea1b2,_0xc62d2a,_0x43e27f,_0x23a7ae){const _0x535bce=a44_0x338799,_0xf2f208=_0xc62d2a[_0x535bce(0x226)](_0x15cf93=>_0x15cf93[_0x535bce(0x204)]===_0x535bce(0x1d0));if(!_0xf2f208)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0x1b5d47=resolveApiModelSource(_0x2ea1b2,_0x59a9e2,_0x23a7ae),_0x5b338e=loadAliasMap(_0x2ea1b2,undefined,_0x1b5d47[_0x535bce(0x22d)],_0x1b5d47['profileName']);assertUnambiguousHookAliases(_0x5b338e);const _0x68f11a=[..._0x5b338e[_0x535bce(0x207)](_0x5e2e59=>[_0x5e2e59[_0x535bce(0x20c)],_0x5e2e59[_0x535bce(0x1e6)]]),...trackedHookDirectoryMappings(_0x43e27f)['map'](_0x271f77=>[_0x271f77[_0x535bce(0x20c)],_0x271f77[_0x535bce(0x1e6)]])],_0x330c64=await listDatasets(_0x59a9e2);assertUnambiguousHookDirectoryMappings(_0x68f11a[_0x535bce(0x207)](([_0x4ca82f,_0x3ec259])=>({'alias':_0x4ca82f,'datasetCode':_0x3ec259})));const _0x39f86a=buildHookDirectoryIndexes(_0x330c64,_0x68f11a),_0x46db6a=new Map(),_0x211b17=preflightPushHookDirectories(_0xc62d2a,_0x43e27f,_0x39f86a,_0x46db6a),_0xf984fe=new Set(),_0x166186=_0xc62d2a[_0x535bce(0x232)](_0x3bb339=>_0x46db6a[_0x535bce(0x1da)](_0x3bb339[_0x535bce(0x1e3)])?.[_0x535bce(0x22b)](_0x535bce(0x1ec))&&_0x43e27f[_0x535bce(0x1d5)][_0x3bb339[_0x535bce(0x1e3)]]?.[_0x535bce(0x20e)]&&_0x43e27f[_0x535bce(0x1d5)][_0x3bb339[_0x535bce(0x1e3)]]?.[_0x535bce(0x1e6)]);if(_0x166186[_0x535bce(0x20f)]>0x0){let _0x40b6ca;try{_0x40b6ca=await getBffScriptStatistics(_0x59a9e2);}catch(_0x498669){for(const _0x3dd60a of _0x166186)_0x46db6a[_0x535bce(0x21d)](_0x3dd60a[_0x535bce(0x1e3)],_0x535bce(0x1bf)+(_0x498669 instanceof Error?_0x498669[_0x535bce(0x1fe)]:String(_0x498669)));return{'resolutions':_0x211b17,'failures':_0x46db6a,'existingHooks':_0xf984fe};}for(const _0x2f9bd6 of _0x166186){const _0x3601ef=_0x43e27f[_0x535bce(0x1d5)][_0x2f9bd6[_0x535bce(0x1e3)]];try{const _0xc20dfc=new Set(_0xc62d2a[_0x535bce(0x232)](_0x37c437=>_0x37c437[_0x535bce(0x204)]==='HOOK'&&_0x43e27f[_0x535bce(0x1d5)][_0x37c437[_0x535bce(0x1e3)]]?.['datasetCode']===_0x3601ef[_0x535bce(0x1e6)])['map'](_0x126136=>_0x126136[_0x535bce(0x20c)]));if(_0xc20dfc[_0x535bce(0x1e7)]>0x1)throw CliErrors[_0x535bce(0x217)](_0x535bce(0x1df));const _0x138449=_0x40b6ca['flatMap'](_0x4b1d58=>[{'datasetCode':_0x4b1d58[_0x535bce(0x1e6)],'operationType':snakeToCamel(_0x4b1d58[_0x535bce(0x201)]),'functionNode':_0x535bce(0x1db),'id':_0x4b1d58[_0x535bce(0x205)]},{'datasetCode':_0x4b1d58[_0x535bce(0x1e6)],'operationType':snakeToCamel(_0x4b1d58['operationType']),'functionNode':_0x535bce(0x20a),'id':_0x4b1d58[_0x535bce(0x213)]}])['filter'](_0x10ce24=>_0x10ce24['id']===_0x3601ef[_0x535bce(0x20e)]),_0x1f5941=await getBffScriptInfo(_0x3601ef[_0x535bce(0x20e)]);if(_0x1f5941['id']!==_0x3601ef['remoteId']||_0x1f5941[_0x535bce(0x1ce)]!==_0x59a9e2||_0x1f5941[_0x535bce(0x227)]!==_0x535bce(0x1d0)||_0x1f5941[_0x535bce(0x22a)]!==_0x2f9bd6[_0x535bce(0x21a)]||_0x3601ef[_0x535bce(0x230)]==null||_0x1f5941[_0x535bce(0x230)]!==_0x3601ef[_0x535bce(0x230)]||_0x138449[_0x535bce(0x20f)]!==0x1||_0x138449[0x0][_0x535bce(0x1e6)]!==_0x3601ef[_0x535bce(0x1e6)]||_0x138449[0x0][_0x535bce(0x201)]!==_0x2f9bd6['operationType']||_0x138449[0x0]['functionNode']!==_0x2f9bd6[_0x535bce(0x1bb)]||_0x3601ef[_0x535bce(0x201)]!==_0x2f9bd6[_0x535bce(0x201)]||_0x3601ef[_0x535bce(0x1bb)]!==_0x2f9bd6[_0x535bce(0x1bb)])throw CliErrors['validation'](_0x535bce(0x219));_0xf984fe[_0x535bce(0x1e9)](_0x2f9bd6['lockKey']),_0x46db6a[_0x535bce(0x221)](_0x2f9bd6[_0x535bce(0x1e3)]);}catch(_0x52d7fe){_0x46db6a[_0x535bce(0x21d)](_0x2f9bd6[_0x535bce(0x1e3)],_0x52d7fe instanceof Error?_0x52d7fe[_0x535bce(0x1fe)]:String(_0x52d7fe));}}}return{'resolutions':_0x211b17,'failures':_0x46db6a,'existingHooks':_0xf984fe};}async function uploadSingleFunction(_0x4e06ea,_0x3ff3b3,_0x3070a9,_0x1ca572){const _0x4cb4a1=a44_0x338799,_0x57daea=await readFile(_0x3ff3b3['filePath'],_0x4cb4a1(0x1dc)),_0x7f19c3=await computeFileHash(_0x3ff3b3[_0x4cb4a1(0x22d)]),_0x45de21=_0x3070a9[_0x4cb4a1(0x1d5)][_0x3ff3b3['lockKey']];if(_0x45de21?.[_0x4cb4a1(0x20e)]&&_0x45de21[_0x4cb4a1(0x230)]==null)throw CliErrors['validation'](_0x3ff3b3[_0x4cb4a1(0x1e3)]+_0x4cb4a1(0x1d7));let _0x23e05e=extractScriptDescription(_0x57daea);if(!_0x23e05e&&_0x45de21?.[_0x4cb4a1(0x20e)]){const _0x2d4a6d=await getBffScriptInfo(_0x45de21['remoteId']);_0x23e05e=_0x2d4a6d[_0x4cb4a1(0x206)]||undefined;}const _0x33aa90={'appCode':_0x4e06ea,'functionName':_0x3ff3b3[_0x4cb4a1(0x21a)],'scriptType':_0x3ff3b3[_0x4cb4a1(0x204)],'scriptContent':_0x57daea};if(_0x45de21?.[_0x4cb4a1(0x20e)])_0x33aa90['id']=_0x45de21[_0x4cb4a1(0x20e)];if(_0x45de21?.[_0x4cb4a1(0x230)]!=null)_0x33aa90[_0x4cb4a1(0x230)]=_0x45de21[_0x4cb4a1(0x230)];if(_0x23e05e)_0x33aa90[_0x4cb4a1(0x206)]=_0x23e05e;if(_0x3ff3b3[_0x4cb4a1(0x204)]===_0x4cb4a1(0x1d0)){const _0x2c902f=_0x1ca572[_0x4cb4a1(0x22f)][_0x4cb4a1(0x1da)](_0x3ff3b3[_0x4cb4a1(0x1e3)]);if(!_0x2c902f&&!_0x1ca572[_0x4cb4a1(0x1c4)][_0x4cb4a1(0x1cf)](_0x3ff3b3['lockKey'])||!_0x3ff3b3[_0x4cb4a1(0x201)]||!_0x3ff3b3['functionNode'])throw CliErrors[_0x4cb4a1(0x217)]('Incomplete\x20HOOK\x20path:\x20'+_0x3ff3b3[_0x4cb4a1(0x1e3)]);_0x2c902f&&(_0x33aa90[_0x4cb4a1(0x1eb)]=_0x2c902f[_0x4cb4a1(0x1c8)]['id'],_0x33aa90[_0x4cb4a1(0x201)]=_0x3ff3b3[_0x4cb4a1(0x201)]),_0x33aa90[_0x4cb4a1(0x1bb)]=_0x3ff3b3[_0x4cb4a1(0x1bb)];}const _0x39f325=await saveBffScript(_0x33aa90),_0x2946f0=_0x39f325['id'],_0x287567=_0x39f325[_0x4cb4a1(0x1c6)]??await getBffScriptInfo(_0x2946f0),_0x5b59cb={'hash':_0x7f19c3,'remoteId':_0x2946f0,'version':_0x287567['version']};if(_0x3ff3b3[_0x4cb4a1(0x204)]===_0x4cb4a1(0x1d0)){const _0x2666e8=_0x1ca572[_0x4cb4a1(0x22f)][_0x4cb4a1(0x1da)](_0x3ff3b3[_0x4cb4a1(0x1e3)]);if(!_0x2666e8){_0x3070a9[_0x4cb4a1(0x1d5)][_0x3ff3b3[_0x4cb4a1(0x1e3)]]={..._0x45de21,..._0x5b59cb};return;}_0x5b59cb['alias']=_0x2666e8[_0x4cb4a1(0x20c)]??_0x45de21?.[_0x4cb4a1(0x20c)],_0x5b59cb[_0x4cb4a1(0x1e6)]=_0x2666e8['datasetCode'],_0x5b59cb[_0x4cb4a1(0x201)]=_0x3ff3b3[_0x4cb4a1(0x201)],_0x5b59cb[_0x4cb4a1(0x1bb)]=_0x3ff3b3['functionNode'];}_0x3070a9[_0x4cb4a1(0x1d5)][_0x3ff3b3[_0x4cb4a1(0x1e3)]]=_0x5b59cb;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;function a44_0x2ab2(){const _0x2a5fe6=['Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.','apiDir','runtime\x20cache\x20not\x20needed','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','lockKey','values','runtime\x20cache\x20clear\x20failed','datasetCode','size','\x20--format\x20compress','add','warnings','datasetId','HOOK_DATASET_NOT_FOUND:','/api/management/library/scripts/save','require','write','hash','ENDPOINT','unchanged','\x20uploaded','stringify','failed','\x22\x20not\x20found\x20after\x20ensureLockScope.','string','bool','status','mergedCli','774ttBNNo','Local\x20function\x20not\x20found:\x20','3600399DQVxQS','message','str','requires','operationType','attempted','\x20skipped','type','beforeScriptId','description','map','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','\x20resolution','after','3513181HdxTXM','alias','cleared','remoteId','length','parse','377470ADGwnW','119848MzqdAz','afterScriptId','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.','3370jtjpxo','review_remote_and_merge','validation','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.','name','boolean','toISOString','set','test','flatMap','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','delete','10UeWXKl','Lock\x20scope\x20for\x20app\x20\x22','POST','Push\x20only\x20this\x20script\x20type','some','scriptType','push','update','functionName','startsWith','create','filePath','failures','resolutions','version','COMMON','filter','would_push','Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.','Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.','functionNode','Push\x20complete:\x20','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','defaultApp','Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20','Would\x20inspect\x20','\x20failed','lockFilePath','scriptsRoot','existingHooks','1196492fPBOcQ','script','BFF_REMOTE_VERSION_CHANGED','dataset','currentApp','\x20conflict','No\x20local\x20Backend\x20Function\x20scripts\x20found.','join','every','appCode','has','HOOK','BFF_REMOTE_VERSION_MISSING','EXISTING_HOOK_BINDING_PRESERVED','\x20bff\x20detail\x20--id\x20','apps','functions','2075118ToxCpX',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','233Udaxag','selectedAppName','get','before','utf8','force','Runtime\x20script\x20cache\x20cleared.'];a44_0x2ab2=function(){return _0x2a5fe6;};return a44_0x2ab2();}async function waitForUploadedLockEntries(_0x5acf97,_0x36e3ba,_0x4df6e7){const _0x1e0148=a44_0x338799;if(_0x4df6e7[_0x1e0148(0x20f)]===0x0)return;for(let _0x3d3089=0x0;_0x3d3089<LOCK_SETTLE_RETRY_COUNT;_0x3d3089+=0x1){const _0x1691d4=await readBffLockFile(_0x5acf97),_0x4468a5=_0x1691d4?.[_0x1e0148(0x1d4)]?.[_0x36e3ba]?.['functions']??{},_0x56ee78=_0x4df6e7[_0x1e0148(0x1cd)](_0x9f7328=>!!_0x4468a5[_0x9f7328]?.[_0x1e0148(0x20e)]);if(_0x56ee78)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x1e0148(0x208)+_0x4df6e7[_0x1e0148(0x1cc)](',\x20')+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a45_0x3df519=a45_0x2aee;function a45_0x5747(){const _0x5e7978=['1229930Lphwrd','defaultApp','lockKey','545157rwxpFz','852OyYLUI','\x20remote-only','alias','read','datasetCode','2wCQpBN','10990NLndFr','184JRghMJ','22kNsNpL','map','apiDir','7075548gPJdtl','62069BVjsTY','push','Check\x20local\x20Backend\x20Function\x20sync\x20status\x20against\x20lock\x20file','all','status','filePath','mergedCli','12DJDRCw','lockFilePath','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','remote','\x20unchanged','selectedAppName','appCode','functions','boolean','\x20added,\x20','scriptsRoot','has','9052584VifEBi','\x20modified,\x20','815261WrXcsn','length'];a45_0x5747=function(){return _0x5e7978;};return a45_0x5747();}function a45_0x2aee(_0x2942b2,_0x5dc8e7){_0x2942b2=_0x2942b2-0x182;const _0x574797=a45_0x5747();let _0x2aee43=_0x574797[_0x2942b2];return _0x2aee43;}(function(_0xcb56a8,_0x2eb164){const _0x490812=a45_0x2aee,_0x237ab3=_0xcb56a8();while(!![]){try{const _0x20d113=parseInt(_0x490812(0x185))/0x1*(parseInt(_0x490812(0x190))/0x2)+-parseInt(_0x490812(0x18a))/0x3*(-parseInt(_0x490812(0x19e))/0x4)+parseInt(_0x490812(0x191))/0x5*(-parseInt(_0x490812(0x18b))/0x6)+parseInt(_0x490812(0x197))/0x7*(-parseInt(_0x490812(0x192))/0x8)+-parseInt(_0x490812(0x196))/0x9+-parseInt(_0x490812(0x187))/0xa*(parseInt(_0x490812(0x193))/0xb)+parseInt(_0x490812(0x183))/0xc;if(_0x20d113===_0x2eb164)break;else _0x237ab3['push'](_0x237ab3['shift']());}catch(_0x465348){_0x237ab3['push'](_0x237ab3['shift']());}}}(a45_0x5747,0x8a539));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiModelSource}from'../../api/model-source.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':'bff','command':a45_0x3df519(0x19b),'description':a45_0x3df519(0x199),'risk':a45_0x3df519(0x18e),'flags':[{'name':a45_0x3df519(0x1a1),'type':a45_0x3df519(0x1a6),'description':a45_0x3df519(0x1a0)}],async 'execute'(_0xccfc31){const _0x3e6629=a45_0x3df519,_0x3aa155=loadBffProjectConfig(_0xccfc31['appCode']),_0x33d9eb=await readBffLockFile(_0x3aa155[_0x3e6629(0x19f)]),{appLock:_0x2188f7}=ensureLockScope(_0x33d9eb??createEmptyBffLock(),_0xccfc31[_0x3e6629(0x1a4)],_0x3aa155[_0x3e6629(0x1a8)],_0x3e6629(0x19b)),_0x4975fc=await scanLocalBffFunctions(_0x3aa155),_0x1ccae8=[],_0x262278=[],_0x51d3f2=[];for(const _0xd4ff30 of _0x4975fc){const _0x2c90aa=await computeFileHash(_0xd4ff30[_0x3e6629(0x19c)]),_0x4824a7=_0x2188f7[_0x3e6629(0x1a5)][_0xd4ff30['lockKey']];if(!_0x4824a7)_0x1ccae8[_0x3e6629(0x198)](_0xd4ff30[_0x3e6629(0x189)]);else _0x4824a7['hash']!==_0x2c90aa?_0x262278[_0x3e6629(0x198)](_0xd4ff30['lockKey']):_0x51d3f2[_0x3e6629(0x198)](_0xd4ff30[_0x3e6629(0x189)]);}const _0x1801bf=[];if(_0xccfc31['bool'](_0x3e6629(0x1a1))){const _0x81f5ae=resolveApiModelSource(_0xccfc31[_0x3e6629(0x195)],_0xccfc31[_0x3e6629(0x1a4)],_0xccfc31[_0x3e6629(0x1a3)]||_0xccfc31[_0x3e6629(0x19d)]?.['currentApp']||_0xccfc31['mergedCli']?.[_0x3e6629(0x188)]),_0xabff6=loadAliasMap(_0xccfc31['apiDir'],undefined,_0x81f5ae['filePath'],_0x81f5ae['profileName']),_0x2bd8d7=new Map(_0xabff6[_0x3e6629(0x194)](_0x5b5d1d=>[_0x5b5d1d[_0x3e6629(0x18f)],_0x5b5d1d[_0x3e6629(0x18d)]])),[_0x5969a3,_0x461317]=await Promise[_0x3e6629(0x19a)]([listBffScripts(_0xccfc31['appCode']),getBffScriptStatistics(_0xccfc31[_0x3e6629(0x1a4)])]),_0x36cfbd=createHookLocationMap(_0x461317),_0x51ace9=new Set(_0x4975fc[_0x3e6629(0x194)](_0x457033=>_0x457033[_0x3e6629(0x189)]));for(const _0x5f80cd of _0x5969a3){const _0x36a94e=resolveRemoteScriptTarget(_0x3aa155,_0x5f80cd,_0x36cfbd,_0x2188f7['functions'],_0x2bd8d7);_0x36a94e&&!_0x51ace9[_0x3e6629(0x182)](_0x36a94e[_0x3e6629(0x189)])&&_0x1801bf[_0x3e6629(0x198)](_0x36a94e[_0x3e6629(0x189)]);}}const _0x5d580c=_0x1ccae8[_0x3e6629(0x186)]===0x0&&_0x262278[_0x3e6629(0x186)]===0x0&&_0x1801bf[_0x3e6629(0x186)]===0x0;return{'ok':!![],'data':{'added':_0x1ccae8,'modified':_0x262278,'unchanged':_0x51d3f2,'remoteOnly':_0x1801bf},'message':_0x5d580c?'All\x20Backend\x20Function\x20scripts\x20are\x20in\x20sync.':_0x1ccae8[_0x3e6629(0x186)]+_0x3e6629(0x1a7)+_0x262278['length']+_0x3e6629(0x184)+_0x51d3f2['length']+_0x3e6629(0x1a2)+(_0x1801bf['length']>0x0?',\x20'+_0x1801bf[_0x3e6629(0x186)]+_0x3e6629(0x18c):'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a46_0x4f14(_0x3776ff,_0x1b952e){_0x3776ff=_0x3776ff-0x15d;const _0x5b01d9=a46_0x5b01();let _0x4f14b8=_0x5b01d9[_0x3776ff];return _0x4f14b8;}function a46_0x5b01(){const _0x258a64=['4IgZHfx','135SBIAmq','apiError','error','20075CbzwQa','192225QCJzEX','CLI\x20Built-in\x20Skill\x20','181519vcDNpM','\x20via\x20skills@latest','2HETBfm','changed','231UkNwHL','unknown','installedPath','install','40254npTicr','\x20installed','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','716695PorjkL','cli-skill','\x20at\x20','nonInteractive','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','read','inherit','115200ZWSZDk','cli-skill-install','cwd','1632632EDoSuY','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.','repairCommand','skillVersion','info'];a46_0x5b01=function(){return _0x258a64;};return a46_0x5b01();}const a46_0xe0e46=a46_0x4f14;(function(_0xa17ac,_0x579f64){const _0x31f15d=a46_0x4f14,_0x4817d1=_0xa17ac();while(!![]){try{const _0x33216e=parseInt(_0x31f15d(0x166))/0x1*(parseInt(_0x31f15d(0x168))/0x2)+-parseInt(_0x31f15d(0x164))/0x3*(-parseInt(_0x31f15d(0x15f))/0x4)+parseInt(_0x31f15d(0x171))/0x5+-parseInt(_0x31f15d(0x16e))/0x6*(parseInt(_0x31f15d(0x16a))/0x7)+-parseInt(_0x31f15d(0x17b))/0x8+parseInt(_0x31f15d(0x160))/0x9*(parseInt(_0x31f15d(0x178))/0xa)+parseInt(_0x31f15d(0x163))/0xb;if(_0x33216e===_0x579f64)break;else _0x4817d1['push'](_0x4817d1['shift']());}catch(_0x5210af){_0x4817d1['push'](_0x4817d1['shift']());}}}(a46_0x5b01,0x21b62));import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a46_0xe0e46(0x172),'command':a46_0xe0e46(0x16d),'description':a46_0xe0e46(0x170),'risk':a46_0xe0e46(0x176),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x48ab15){const _0x26c197=a46_0xe0e46;logger['setLogPath'](process[_0x26c197(0x17a)]()),logger[_0x26c197(0x15e)](_0x26c197(0x179),_0x26c197(0x17c));const _0xe5a36e=installBuiltinSkill({'stdio':_0x48ab15[_0x26c197(0x174)]?'pipe':_0x26c197(0x177)});if(!_0xe5a36e['ok'])throw CliErrors[_0x26c197(0x161)]('Built-in\x20Skill\x20install\x20failed\x20['+_0xe5a36e['code']+']:\x20'+(_0xe5a36e[_0x26c197(0x162)]||_0x26c197(0x16b)),_0x26c197(0x175)+_0xe5a36e[_0x26c197(0x17d)]);return console['log'](_0xe5a36e[_0x26c197(0x169)]?_0x26c197(0x165)+_0xe5a36e[_0x26c197(0x15d)]+_0x26c197(0x16f)+(_0xe5a36e[_0x26c197(0x16c)]?_0x26c197(0x173)+_0xe5a36e[_0x26c197(0x16c)]:_0x26c197(0x167)):_0x26c197(0x165)+_0xe5a36e['skillVersion']+'\x20is\x20already\x20current'+(_0xe5a36e[_0x26c197(0x16c)]?'\x20at\x20'+_0xe5a36e[_0x26c197(0x16c)]:'')),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a47_0x158c7a=a47_0x23e2;(function(_0x1f441f,_0x164a9f){const _0x5e7920=a47_0x23e2,_0x46ad92=_0x1f441f();while(!![]){try{const _0xf3c99f=-parseInt(_0x5e7920(0x18c))/0x1*(parseInt(_0x5e7920(0x180))/0x2)+-parseInt(_0x5e7920(0x185))/0x3+parseInt(_0x5e7920(0x176))/0x4+-parseInt(_0x5e7920(0x16a))/0x5+-parseInt(_0x5e7920(0x181))/0x6+-parseInt(_0x5e7920(0x188))/0x7*(-parseInt(_0x5e7920(0x193))/0x8)+parseInt(_0x5e7920(0x172))/0x9;if(_0xf3c99f===_0x164a9f)break;else _0x46ad92['push'](_0x46ad92['shift']());}catch(_0x19bf7f){_0x46ad92['push'](_0x46ad92['shift']());}}}(a47_0x2e41,0x3c5f6));import a47_0x39c435 from'chalk';import a47_0x3ccd2f from'ora';import a47_0xb2b919 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 _0x34e04e=a47_0x23e2;return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x34e04e(0x1aa)](0x0,0xa)+')':VERSION;}function a47_0x23e2(_0x16a004,_0x5126fa){_0x16a004=_0x16a004-0x158;const _0x2e417a=a47_0x2e41();let _0x23e2fd=_0x2e417a[_0x16a004];return _0x23e2fd;}function detectPackageManager(){const _0x351503=a47_0x23e2,_0x2101a0=process[_0x351503(0x1a1)]['toLowerCase']();if(_0x2101a0[_0x351503(0x195)](_0x351503(0x192)))return _0x351503(0x192);return _0x351503(0x18d);}const updateFlags=[{'name':a47_0x158c7a(0x1a4),'type':'boolean','description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a47_0x158c7a(0x18e),'type':a47_0x158c7a(0x17a),'description':a47_0x158c7a(0x166)}];function getRequestedVersion(_0x42d11c){const _0x149a3f=a47_0x158c7a;return _0x42d11c[_0x149a3f(0x177)]('version')[_0x149a3f(0x167)]();}async function validateUpdateFlags(_0x3469e1){const _0x4301ba=a47_0x158c7a,_0x168e8b=_0x3469e1[_0x4301ba(0x163)](_0x4301ba(0x1a4)),_0x363e1b=getRequestedVersion(_0x3469e1);if(_0x168e8b&&_0x363e1b)throw CliErrors['validation']('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.',_0x4301ba(0x16f));if(_0x363e1b&&!a47_0xb2b919[_0x4301ba(0x182)](_0x363e1b))throw CliErrors[_0x4301ba(0x1a7)](_0x4301ba(0x184)+_0x363e1b,_0x4301ba(0x1a3));}async function fetchNpmDistTags(){const _0x4eb395=a47_0x158c7a;try{const _0x5a5ae5=await fetch(_0x4eb395(0x15b)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x4eb395(0x17d),{'signal':AbortSignal['timeout'](0x2710)});if(!_0x5a5ae5['ok'])return null;const _0x8b91e3=await _0x5a5ae5[_0x4eb395(0x168)]();if(!_0x8b91e3||typeof _0x8b91e3!==_0x4eb395(0x1a8))return null;return Object[_0x4eb395(0x1ab)](Object[_0x4eb395(0x1ad)](_0x8b91e3)[_0x4eb395(0x160)](([,_0x5d0f1c])=>typeof _0x5d0f1c===_0x4eb395(0x17a)&&_0x5d0f1c[_0x4eb395(0x167)]()[_0x4eb395(0x158)]>0x0)[_0x4eb395(0x19c)](([_0x5a1658,_0x4450e8])=>[_0x5a1658,String(_0x4450e8)[_0x4eb395(0x167)]()]));}catch{return null;}}function a47_0x2e41(){const _0x4b28f8=['error','2RQddkj','2811474CRKnla','valid','Already\x20up\x20to\x20date\x20(v','Invalid\x20version:\x20','1456236fNqtvv','info','CLI\x20updated\x20to\x20v','2219rIrAGg','...','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','Current\x20version\x20v','57788vDzKhV','npm','version','source','\x20\x20CLI\x20Built-in\x20Skill\x20','log','bun','10432BzsVSC','\x20is\x20newer\x20than\x20npm\x20latest\x20v','includes','skillVersion','message','run','start','state','update','map','Updated\x20to\x20v',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','apiError','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','execPath','\x20doctor','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','beta','current','read','validation','object','fail','slice','fromEntries','succeed','entries','gray','length','expected\x20','yellow','https://registry.npmjs.org/-/package/','Updating\x20via\x20','Current\x20version:\x20','red','green','filter','Already\x20on\x20requested\x20version\x20(v','Checking\x20for\x20updates...','bool','\x20→\x20','Update\x20available:\x20','Install\x20a\x20specific\x20CLI\x20version','trim','json','@latest','2161655AAiskK','Run:\x20','\x20is\x20up\x20to\x20date.','\x20install\x20-g\x20',',\x20then\x20verify\x20with:\x20','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','Update\x20failed','\x20\x20Try\x20manually:\x20','10255833LEsXWb','install','Checking\x20CLI\x20Built-in\x20Skill...','Beta\x20version:\x20','553964ZeXaKj','str','Version\x20comparison\x20failed','repairCommand','string','latest',']:\x20','/dist-tags','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version'];a47_0x2e41=function(){return _0x4b28f8;};return a47_0x2e41();}async function fetchNpmDistTagVersion(_0x2ef000){const _0x296e58=await fetchNpmDistTags();return _0x296e58?.[_0x2ef000]??null;}async function fetchLatestVersion(){const _0x3b9d3d=a47_0x158c7a;return fetchNpmDistTagVersion(_0x3b9d3d(0x17b));}async function resolveTargetVersion(_0x22f315){const _0x44795e=a47_0x158c7a,_0x2e593c=getRequestedVersion(_0x22f315);if(_0x2e593c)return{'version':_0x2e593c,'source':'version'};if(_0x22f315[_0x44795e(0x163)](_0x44795e(0x1a4))){const _0x207cab=await fetchNpmDistTagVersion(_0x44795e(0x1a4));if(!_0x207cab)return null;return{'version':_0x207cab,'source':_0x44795e(0x1a4)};}const _0xc7eb16=await fetchLatestVersion();if(!_0xc7eb16)return null;return{'version':_0xc7eb16,'source':_0x44795e(0x17b)};}function shouldInstallTarget(_0x4a4d2a,_0x5a7099){const _0x2e122d=a47_0x158c7a;if(_0x5a7099[_0x2e122d(0x18f)]===_0x2e122d(0x18e)||_0x5a7099[_0x2e122d(0x18f)]==='beta')return!a47_0xb2b919['eq'](_0x4a4d2a,_0x5a7099[_0x2e122d(0x18e)]);return a47_0xb2b919['lt'](_0x4a4d2a,_0x5a7099['version']);}function getInstallPlanLabel(_0xcbb823,_0x2354de){const _0x31a5be=a47_0x158c7a;switch(_0x2354de[_0x31a5be(0x18f)]){case'beta':return _0x31a5be(0x175)+a47_0x39c435[_0x31a5be(0x15a)](_0xcbb823)+_0x31a5be(0x164)+a47_0x39c435['green'](_0x2354de['version']);case _0x31a5be(0x18e):return'Requested\x20version:\x20'+a47_0x39c435[_0x31a5be(0x15a)](_0xcbb823)+_0x31a5be(0x164)+a47_0x39c435[_0x31a5be(0x15f)](_0x2354de[_0x31a5be(0x18e)]);case _0x31a5be(0x17b):default:return _0x31a5be(0x165)+a47_0x39c435[_0x31a5be(0x15a)](_0xcbb823)+_0x31a5be(0x164)+a47_0x39c435['green'](_0x2354de[_0x31a5be(0x18e)]);}}function repairCurrentBuiltinSkill(){const _0x32d96a=a47_0x158c7a;console[_0x32d96a(0x191)](a47_0x39c435['gray'](_0x32d96a(0x174)));const _0xb47fb9=installBuiltinSkill();if(_0xb47fb9['ok']){console[_0x32d96a(0x191)](a47_0x39c435[_0x32d96a(0x1ae)](_0x32d96a(0x190)+_0xb47fb9['skillVersion']+'\x20is\x20up\x20to\x20date.'));return;}throw CliErrors[_0x32d96a(0x19f)]('CLI\x20Built-in\x20Skill\x20repair\x20failed\x20['+_0xb47fb9['code']+_0x32d96a(0x17c)+(_0xb47fb9[_0x32d96a(0x17f)]||'unknown'),'Run:\x20'+_0xb47fb9[_0x32d96a(0x179)]+_0x32d96a(0x16e)+CLI_BIN_NAME+_0x32d96a(0x1a2));}function verifyUpdatedBuiltinSkill(_0x48fa56){const _0x14a05c=a47_0x158c7a,_0x151276=inspectInstalledBuiltinSkillVersion(_0x48fa56);if(_0x151276[_0x14a05c(0x19a)]===_0x14a05c(0x1a5)){console[_0x14a05c(0x191)](a47_0x39c435[_0x14a05c(0x1ae)](_0x14a05c(0x190)+_0x48fa56+_0x14a05c(0x16c)));return;}const _0x11cde4=_0x151276[_0x14a05c(0x196)]?'expected\x20'+_0x48fa56+',\x20found\x20'+_0x151276[_0x14a05c(0x196)]:_0x14a05c(0x159)+_0x48fa56+',\x20state\x20'+_0x151276['state'];throw CliErrors[_0x14a05c(0x19f)](_0x14a05c(0x187)+_0x48fa56+_0x14a05c(0x19e)+_0x11cde4,_0x14a05c(0x16b)+_0x151276[_0x14a05c(0x179)]+_0x14a05c(0x16e)+CLI_BIN_NAME+_0x14a05c(0x1a2));}async function execute(_0xcbfbe6){const _0x3fae58=a47_0x158c7a;await validateUpdateFlags(_0xcbfbe6);const _0x27d0bf=getCurrentVersion();console[_0x3fae58(0x191)](_0x3fae58(0x15d)+_0x27d0bf);const _0x9274c8=a47_0x3ccd2f(_0x3fae58(0x162))[_0x3fae58(0x199)](),_0x17272c=await resolveTargetVersion(_0xcbfbe6);if(!_0x17272c){const _0x296f1c=_0xcbfbe6[_0x3fae58(0x163)](_0x3fae58(0x1a4))?'Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm':_0x3fae58(0x18a);return _0x9274c8['fail'](_0x296f1c),console['log'](a47_0x39c435[_0x3fae58(0x1ae)](_0x3fae58(0x1a0)+NPM_PACKAGE_NAME+_0x3fae58(0x169))),{'ok':![],'message':_0x296f1c};}const _0x50f70e=a47_0xb2b919[_0x3fae58(0x182)](VERSION),_0x50799c=a47_0xb2b919[_0x3fae58(0x182)](_0x17272c[_0x3fae58(0x18e)]);if(!_0x50f70e||!_0x50799c)return _0x9274c8[_0x3fae58(0x1a9)](_0x3fae58(0x178)),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x50f70e,_0x17272c)){const _0x353e8e=_0x17272c[_0x3fae58(0x18f)]===_0x3fae58(0x18e)?_0x3fae58(0x161)+_0x17272c[_0x3fae58(0x18e)]+')':a47_0xb2b919['gt'](_0x50f70e,_0x50799c)?_0x3fae58(0x18b)+_0x27d0bf+_0x3fae58(0x194)+_0x17272c[_0x3fae58(0x18e)]:_0x3fae58(0x183)+_0x17272c['version']+')';return _0x9274c8[_0x3fae58(0x1ac)](_0x353e8e),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x9274c8[_0x3fae58(0x186)](getInstallPlanLabel(_0x27d0bf,_0x17272c));const _0xc2a440=detectPackageManager(),_0x26d70d=_0xc2a440===_0x3fae58(0x18d)?resolveNpmBin(_0x3fae58(0x18d)):_0xc2a440,_0x51014c=a47_0x3ccd2f(_0x3fae58(0x15c)+_0xc2a440+_0x3fae58(0x189))['start']();try{await execa(_0x26d70d,[_0x3fae58(0x173),'-g',NPM_PACKAGE_NAME+'@'+_0x17272c[_0x3fae58(0x18e)]],{'stdio':'pipe'}),_0x51014c[_0x3fae58(0x1ac)](_0x3fae58(0x19d)+_0x17272c[_0x3fae58(0x18e)]),console['log'](a47_0x39c435['gray']('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.'));}catch(_0x275405){return _0x51014c[_0x3fae58(0x1a9)](_0x3fae58(0x170)),console[_0x3fae58(0x17f)](a47_0x39c435[_0x3fae58(0x15e)]('\x20\x20'+_0x275405[_0x3fae58(0x197)])),console[_0x3fae58(0x191)](a47_0x39c435['gray'](_0x3fae58(0x171)+_0xc2a440+_0x3fae58(0x16d)+NPM_PACKAGE_NAME+'@'+_0x17272c['version'])),{'ok':![],'message':_0x275405[_0x3fae58(0x197)]};}return verifyUpdatedBuiltinSkill(_0x17272c['version']),{'ok':!![]};}export const updateDefinition={'service':a47_0x158c7a(0x19b),'command':a47_0x158c7a(0x198),'description':a47_0x158c7a(0x17e),'risk':a47_0x158c7a(0x1a6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a47_0x45ed0e=a47_0x4977;(function(_0x3865ad,_0x2673bc){const _0x4aa20f=a47_0x4977,_0x8db104=_0x3865ad();while(!![]){try{const _0x4dc3a0=-parseInt(_0x4aa20f(0x13e))/0x1+parseInt(_0x4aa20f(0xf9))/0x2*(parseInt(_0x4aa20f(0xeb))/0x3)+-parseInt(_0x4aa20f(0xf5))/0x4*(-parseInt(_0x4aa20f(0x11a))/0x5)+parseInt(_0x4aa20f(0x134))/0x6*(-parseInt(_0x4aa20f(0x125))/0x7)+-parseInt(_0x4aa20f(0x118))/0x8*(-parseInt(_0x4aa20f(0xff))/0x9)+parseInt(_0x4aa20f(0x131))/0xa+-parseInt(_0x4aa20f(0x142))/0xb*(-parseInt(_0x4aa20f(0xf8))/0xc);if(_0x4dc3a0===_0x2673bc)break;else _0x8db104['push'](_0x8db104['shift']());}catch(_0x111fbf){_0x8db104['push'](_0x8db104['shift']());}}}(a47_0x5500,0x925ec));import a47_0x5a486c from'chalk';import a47_0x5a175f from'ora';import a47_0xefa3d5 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 _0x1a5f3e=a47_0x4977;return GIT_COMMIT!==_0x1a5f3e(0x10d)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x1a5f3e(0x100)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x41d66b=a47_0x4977,_0x1bae6c=process[_0x41d66b(0x12f)][_0x41d66b(0x114)]();if(_0x1bae6c['includes'](_0x41d66b(0xfe)))return'bun';return _0x41d66b(0x119);}const updateFlags=[{'name':a47_0x45ed0e(0xf1),'type':a47_0x45ed0e(0x105),'description':a47_0x45ed0e(0xfb),'default':![]},{'name':a47_0x45ed0e(0x10b),'type':'string','description':a47_0x45ed0e(0xf4)}];function getRequestedVersion(_0x51fd1e){const _0x2d562b=a47_0x45ed0e;return _0x51fd1e[_0x2d562b(0x13b)]('version')[_0x2d562b(0x11f)]();}async function validateUpdateFlags(_0x2f7457){const _0x1e6d1b=a47_0x45ed0e,_0x338861=_0x2f7457[_0x1e6d1b(0xef)]('beta'),_0x3d15ef=getRequestedVersion(_0x2f7457);if(_0x338861&&_0x3d15ef)throw CliErrors[_0x1e6d1b(0x115)](_0x1e6d1b(0x144),_0x1e6d1b(0x138));if(_0x3d15ef&&!a47_0xefa3d5[_0x1e6d1b(0x135)](_0x3d15ef))throw CliErrors['validation'](_0x1e6d1b(0x109)+_0x3d15ef,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x10d674=a47_0x45ed0e;try{const _0x1f39fd=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+_0x10d674(0xf6),{'signal':AbortSignal[_0x10d674(0xf0)](0x2710)});if(!_0x1f39fd['ok'])return null;const _0x3d4fde=await _0x1f39fd['json']();if(!_0x3d4fde||typeof _0x3d4fde!==_0x10d674(0x123))return null;return Object[_0x10d674(0x106)](Object[_0x10d674(0x104)](_0x3d4fde)[_0x10d674(0x12c)](([,_0x23916f])=>typeof _0x23916f===_0x10d674(0x12b)&&_0x23916f[_0x10d674(0x11f)]()[_0x10d674(0x10f)]>0x0)['map'](([_0x3a4f0c,_0x4d75ed])=>[_0x3a4f0c,String(_0x4d75ed)[_0x10d674(0x11f)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x4b4d6e){const _0x1bc6c=await fetchNpmDistTags();return _0x1bc6c?.[_0x4b4d6e]??null;}function a47_0x4977(_0xed5c5b,_0x50d9ce){_0xed5c5b=_0xed5c5b-0xeb;const _0x550039=a47_0x5500();let _0x497745=_0x550039[_0xed5c5b];return _0x497745;}async function fetchLatestVersion(){const _0x31fb3a=a47_0x45ed0e;return fetchNpmDistTagVersion(_0x31fb3a(0x137));}async function resolveTargetVersion(_0x38d38b){const _0x3315c4=a47_0x45ed0e,_0x2d9b1b=getRequestedVersion(_0x38d38b);if(_0x2d9b1b)return{'version':_0x2d9b1b,'source':_0x3315c4(0x10b)};if(_0x38d38b[_0x3315c4(0xef)]('beta')){const _0x1e508d=await fetchNpmDistTagVersion('beta');if(!_0x1e508d)return null;return{'version':_0x1e508d,'source':_0x3315c4(0xf1)};}const _0x17bff7=await fetchLatestVersion();if(!_0x17bff7)return null;return{'version':_0x17bff7,'source':_0x3315c4(0x137)};}function shouldInstallTarget(_0x147881,_0x48305c){const _0x592dde=a47_0x45ed0e;if(_0x48305c['source']===_0x592dde(0x10b)||_0x48305c[_0x592dde(0x113)]==='beta')return!a47_0xefa3d5['eq'](_0x147881,_0x48305c[_0x592dde(0x10b)]);return a47_0xefa3d5['lt'](_0x147881,_0x48305c[_0x592dde(0x10b)]);}function getInstallPlanLabel(_0x12cb78,_0x1498b4){const _0x11f92d=a47_0x45ed0e;switch(_0x1498b4[_0x11f92d(0x113)]){case'beta':return _0x11f92d(0xee)+a47_0x5a486c['yellow'](_0x12cb78)+_0x11f92d(0x132)+a47_0x5a486c[_0x11f92d(0x136)](_0x1498b4[_0x11f92d(0x10b)]);case _0x11f92d(0x10b):return _0x11f92d(0xfa)+a47_0x5a486c[_0x11f92d(0x107)](_0x12cb78)+'\x20→\x20'+a47_0x5a486c[_0x11f92d(0x136)](_0x1498b4[_0x11f92d(0x10b)]);case'latest':default:return _0x11f92d(0x13a)+a47_0x5a486c['yellow'](_0x12cb78)+'\x20→\x20'+a47_0x5a486c[_0x11f92d(0x136)](_0x1498b4[_0x11f92d(0x10b)]);}}function repairCurrentBuiltinSkill(){const _0x4a70fb=a47_0x45ed0e;console['log'](a47_0x5a486c['gray'](_0x4a70fb(0x102)));const _0x107ef2=installBuiltinSkill();if(_0x107ef2['ok']){console[_0x4a70fb(0x12a)](a47_0x5a486c[_0x4a70fb(0x133)](_0x4a70fb(0x139)+_0x107ef2[_0x4a70fb(0x11e)]+_0x4a70fb(0x122)));return;}throw CliErrors[_0x4a70fb(0x112)](_0x4a70fb(0x121)+_0x107ef2['code']+_0x4a70fb(0xec)+(_0x107ef2[_0x4a70fb(0x12e)]||_0x4a70fb(0x10d)),_0x4a70fb(0x10a)+_0x107ef2['repairCommand']+',\x20then\x20verify\x20with:\x20'+CLI_BIN_NAME+_0x4a70fb(0x11d));}function verifyUpdatedBuiltinSkill(_0x573303){const _0x5030c2=a47_0x45ed0e,_0x9ef39e=inspectInstalledBuiltinSkillVersion(_0x573303);if(_0x9ef39e[_0x5030c2(0xf3)]==='current'){console[_0x5030c2(0x12a)](a47_0x5a486c[_0x5030c2(0x133)](_0x5030c2(0x139)+_0x573303+_0x5030c2(0x122)));return;}const _0x1ef304=_0x9ef39e[_0x5030c2(0x11e)]?_0x5030c2(0xfc)+_0x573303+_0x5030c2(0x13c)+_0x9ef39e['skillVersion']:'expected\x20'+_0x573303+_0x5030c2(0x10c)+_0x9ef39e[_0x5030c2(0xf3)];throw CliErrors['apiError'](_0x5030c2(0x13d)+_0x573303+',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20'+_0x1ef304,_0x5030c2(0x10a)+_0x9ef39e['repairCommand']+_0x5030c2(0x13f)+CLI_BIN_NAME+_0x5030c2(0x11d));}async function execute(_0x55cbc8){const _0x3d8ef7=a47_0x45ed0e;await validateUpdateFlags(_0x55cbc8);const _0x551dee=getCurrentVersion();console[_0x3d8ef7(0x12a)]('Current\x20version:\x20'+_0x551dee);const _0x49bf58=a47_0x5a175f(_0x3d8ef7(0x141))[_0x3d8ef7(0x127)](),_0x259ae9=await resolveTargetVersion(_0x55cbc8);if(!_0x259ae9){const _0x2dfcb9=_0x55cbc8['bool'](_0x3d8ef7(0xf1))?_0x3d8ef7(0x108):_0x3d8ef7(0x103);return _0x49bf58['fail'](_0x2dfcb9),console['log'](a47_0x5a486c[_0x3d8ef7(0x133)](_0x3d8ef7(0x110)+NPM_PACKAGE_NAME+_0x3d8ef7(0x126))),{'ok':![],'message':_0x2dfcb9};}const _0x2297b8=a47_0xefa3d5['valid'](VERSION),_0x2b2c23=a47_0xefa3d5[_0x3d8ef7(0x135)](_0x259ae9[_0x3d8ef7(0x10b)]);if(!_0x2297b8||!_0x2b2c23)return _0x49bf58[_0x3d8ef7(0x11c)](_0x3d8ef7(0x116)),{'ok':![],'message':_0x3d8ef7(0x116)};if(!shouldInstallTarget(_0x2297b8,_0x259ae9)){const _0x4e6496=_0x259ae9[_0x3d8ef7(0x113)]===_0x3d8ef7(0x10b)?_0x3d8ef7(0x117)+_0x259ae9[_0x3d8ef7(0x10b)]+')':a47_0xefa3d5['gt'](_0x2297b8,_0x2b2c23)?_0x3d8ef7(0xfd)+_0x551dee+_0x3d8ef7(0x124)+_0x259ae9['version']:_0x3d8ef7(0x129)+_0x259ae9[_0x3d8ef7(0x10b)]+')';return _0x49bf58[_0x3d8ef7(0x143)](_0x4e6496),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x49bf58[_0x3d8ef7(0x12d)](getInstallPlanLabel(_0x551dee,_0x259ae9));const _0x8fcf69=detectPackageManager(),_0x5db181=_0x8fcf69==='npm'?resolveNpmBin(_0x3d8ef7(0x119)):_0x8fcf69,_0x52f3ad=a47_0x5a175f(_0x3d8ef7(0x111)+_0x8fcf69+_0x3d8ef7(0xf7))[_0x3d8ef7(0x127)]();try{await execa(_0x5db181,['install','-g',NPM_PACKAGE_NAME+'@'+_0x259ae9[_0x3d8ef7(0x10b)]],{'stdio':'pipe'}),_0x52f3ad[_0x3d8ef7(0x143)](_0x3d8ef7(0xed)+_0x259ae9[_0x3d8ef7(0x10b)]),console[_0x3d8ef7(0x12a)](a47_0x5a486c[_0x3d8ef7(0x133)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.'));}catch(_0x29b614){return _0x52f3ad['fail'](_0x3d8ef7(0xf2)),console['error'](a47_0x5a486c[_0x3d8ef7(0x10e)]('\x20\x20'+_0x29b614[_0x3d8ef7(0x140)])),console[_0x3d8ef7(0x12a)](a47_0x5a486c['gray']('\x20\x20Try\x20manually:\x20'+_0x8fcf69+_0x3d8ef7(0x11b)+NPM_PACKAGE_NAME+'@'+_0x259ae9[_0x3d8ef7(0x10b)])),{'ok':![],'message':_0x29b614[_0x3d8ef7(0x140)]};}return verifyUpdatedBuiltinSkill(_0x259ae9[_0x3d8ef7(0x10b)]),{'ok':!![]};}function a47_0x5500(){const _0x57eb84=['Checking\x20CLI\x20Built-in\x20Skill...','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','entries','boolean','fromEntries','yellow','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','Invalid\x20version:\x20','Run:\x20','version',',\x20state\x20','unknown','red','length','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','Updating\x20via\x20','apiError','source','toLowerCase','validation','Version\x20comparison\x20failed','Already\x20on\x20requested\x20version\x20(v','9208KhIOWw','npm','998135RcSGVn','\x20install\x20-g\x20','fail','\x20doctor','skillVersion','trim','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','\x20is\x20up\x20to\x20date.','object','\x20is\x20newer\x20than\x20npm\x20latest\x20v','329jIUazs','@latest','start','read','Already\x20up\x20to\x20date\x20(v','log','string','filter','info','error','execPath','update','3819770IrhLvt','\x20→\x20','gray','15606MBHKcJ','valid','green','latest','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','\x20\x20CLI\x20Built-in\x20Skill\x20','Update\x20available:\x20','str',',\x20found\x20','CLI\x20updated\x20to\x20v','742743ynEpuu',',\x20then\x20verify\x20with:\x20','message','Checking\x20for\x20updates...','121SClGjf','succeed','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','843rbeHeo',']:\x20','Updated\x20to\x20v','Beta\x20version:\x20','bool','timeout','beta','Update\x20failed','state','Install\x20a\x20specific\x20CLI\x20version','8cPWjSr','/dist-tags','...','580836WDpVFS','574OzLFxK','Requested\x20version:\x20','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','expected\x20','Current\x20version\x20v','bun','549ElmcCl','slice','run'];a47_0x5500=function(){return _0x57eb84;};return a47_0x5500();}export const updateDefinition={'service':a47_0x45ed0e(0x130),'command':a47_0x45ed0e(0x101),'description':a47_0x45ed0e(0x120),'risk':a47_0x45ed0e(0x128),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3e8ef5,_0x5aff47){const _0x22f6d8=a48_0x1fb2,_0x42c704=_0x3e8ef5();while(!![]){try{const _0xef0718=parseInt(_0x22f6d8(0xde))/0x1*(parseInt(_0x22f6d8(0xdd))/0x2)+parseInt(_0x22f6d8(0xe1))/0x3+-parseInt(_0x22f6d8(0xdc))/0x4+parseInt(_0x22f6d8(0xdb))/0x5+-parseInt(_0x22f6d8(0xda))/0x6*(-parseInt(_0x22f6d8(0xdf))/0x7)+-parseInt(_0x22f6d8(0xd9))/0x8*(parseInt(_0x22f6d8(0xe0))/0x9)+parseInt(_0x22f6d8(0xd8))/0xa;if(_0xef0718===_0x5aff47)break;else _0x42c704['push'](_0x42c704['shift']());}catch(_0x5863da){_0x42c704['push'](_0x42c704['shift']());}}}(a48_0x109f,0xa9296));function a48_0x1fb2(_0x13fba5,_0x4ef0dd){_0x13fba5=_0x13fba5-0xd8;const _0x109fa5=a48_0x109f();let _0x1fb29a=_0x109fa5[_0x13fba5];return _0x1fb29a;}function a48_0x109f(){const _0x2e7a88=['7035129ghpryX','488853QCNtlV','6127120vhAonc','8irJEUW','17730OTatBx','1989440DbGiCv','3504424cuzIVg','1887354ilLeIg','1ImPheR','553eeXome'];a48_0x109f=function(){return _0x2e7a88;};return a48_0x109f();}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a49_0x74739b=a49_0x1914;function a49_0x6f8e(){const _0x6c4bf7=['Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','44gSNxom','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','6sGOUkO','bool','skip-imports','2217620uZpLCy','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','11ZTWeLD','name','sdk','Omit\x20import\x20statements\x20from\x20generated\x20code','1286824ranUxA','52887JjtVRI','3788309fFqeVl','str','read','string','4387225MqEwhE','10800lFZCHi','tableName','1888iTpRFz','526167yQaErH','operation','code','appCode'];a49_0x6f8e=function(){return _0x6c4bf7;};return a49_0x6f8e();}(function(_0x477f51,_0x47ced5){const _0x1c4076=a49_0x1914,_0x233869=_0x477f51();while(!![]){try{const _0x2d9a7b=parseInt(_0x1c4076(0x19d))/0x1+parseInt(_0x1c4076(0x1ad))/0x2+parseInt(_0x1c4076(0x1ae))/0x3*(parseInt(_0x1c4076(0x1a2))/0x4)+-parseInt(_0x1c4076(0x1b3))/0x5*(parseInt(_0x1c4076(0x1a4))/0x6)+-parseInt(_0x1c4076(0x1af))/0x7+parseInt(_0x1c4076(0x1b6))/0x8*(parseInt(_0x1c4076(0x1b4))/0x9)+parseInt(_0x1c4076(0x1a7))/0xa*(parseInt(_0x1c4076(0x1a9))/0xb);if(_0x2d9a7b===_0x47ced5)break;else _0x233869['push'](_0x233869['shift']());}catch(_0x52acc7){_0x233869['push'](_0x233869['shift']());}}}(a49_0x6f8e,0x6dd24));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a49_0x1914(_0xd30f00,_0x33b382){_0xd30f00=_0xd30f00-0x19d;const _0x6f8e0e=a49_0x6f8e();let _0x1914c6=_0x6f8e0e[_0xd30f00];return _0x1914c6;}export const codegenSdk={'service':'codegen','command':a49_0x74739b(0x1ab),'description':a49_0x74739b(0x1a1),'risk':a49_0x74739b(0x1b1),'flags':[CODE_FLAG_OPTIONAL,{'name':'alias','type':a49_0x74739b(0x1b2),'description':a49_0x74739b(0x1a3)},{'name':a49_0x74739b(0x19e),'type':a49_0x74739b(0x1b2),'required':!![],'description':a49_0x74739b(0x1a8)},{'name':a49_0x74739b(0x1a6),'type':'boolean','description':a49_0x74739b(0x1ac)}],async 'execute'(_0x192416){const _0x3867c3=a49_0x74739b,{dataset:_0x162713,operation:_0x4a495c}=await getOperationDetail(_0x192416[_0x3867c3(0x1a0)],_0x192416[_0x3867c3(0x1b0)](_0x3867c3(0x19f)),_0x192416[_0x3867c3(0x1b0)](_0x3867c3(0x19e))),_0x60b7df=generateSdkCode(_0x162713,_0x4a495c,{'includeImports':!_0x192416[_0x3867c3(0x1a5)](_0x3867c3(0x1a6))});return{'ok':!![],'data':{'dataset':{'name':_0x162713[_0x3867c3(0x1aa)],'code':_0x162713[_0x3867c3(0x19f)],'tableName':_0x162713[_0x3867c3(0x1b5)]},'operation':_0x192416[_0x3867c3(0x1b0)]('operation'),'code':_0x60b7df}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a50_0x3f0a(_0x3f7ed9,_0x3d5b04){_0x3f7ed9=_0x3f7ed9-0x9e;const _0x336e6e=a50_0x336e();let _0x3f0ae9=_0x336e6e[_0x3f7ed9];return _0x3f0ae9;}const a50_0x1a9838=a50_0x3f0a;(function(_0x819ed0,_0x34bef3){const _0x33a81c=a50_0x3f0a,_0x37c1d6=_0x819ed0();while(!![]){try{const _0x57971b=parseInt(_0x33a81c(0xa9))/0x1*(parseInt(_0x33a81c(0xa5))/0x2)+parseInt(_0x33a81c(0xa0))/0x3*(parseInt(_0x33a81c(0xae))/0x4)+-parseInt(_0x33a81c(0xb0))/0x5+parseInt(_0x33a81c(0x9e))/0x6+-parseInt(_0x33a81c(0x9f))/0x7+parseInt(_0x33a81c(0xb3))/0x8+-parseInt(_0x33a81c(0xa8))/0x9;if(_0x57971b===_0x34bef3)break;else _0x37c1d6['push'](_0x37c1d6['shift']());}catch(_0xef088b){_0x37c1d6['push'](_0x37c1d6['shift']());}}}(a50_0x336e,0x73100));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a50_0x336e(){const _0xfaca24=['1984346AijQPJ','1647dtgumw','appCode','codegen','sqlCode','sdk','1594PjBiDP','string','read','2312631bcHnHM','543QFvaeC','sqlcode','Omit\x20import\x20statements\x20from\x20generated\x20code','target','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','3492vPHlai','str','1957010JSZjzb','sqlName','no-imports','3623824UtifTG','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','boolean','bool','228654XwlYON'];a50_0x336e=function(){return _0xfaca24;};return a50_0x336e();}export const codegenSql={'service':a50_0x1a9838(0xa2),'command':'sql','description':a50_0x1a9838(0xad),'risk':a50_0x1a9838(0xa7),'flags':[SQLCODE_FLAG,{'name':'target','type':a50_0x1a9838(0xa6),'description':a50_0x1a9838(0xb4),'default':a50_0x1a9838(0xa4),'enum':[a50_0x1a9838(0xa4),'bff']},{'name':a50_0x1a9838(0xb2),'type':a50_0x1a9838(0xb5),'description':a50_0x1a9838(0xab)}],async 'execute'(_0x3601d8){const _0x11cb91=a50_0x1a9838,_0x2d1307=await getSqlQueryInfo(_0x3601d8[_0x11cb91(0xa1)],_0x3601d8[_0x11cb91(0xaf)](_0x11cb91(0xaa))),_0x4a24fd=_0x3601d8[_0x11cb91(0xaf)](_0x11cb91(0xac))||_0x11cb91(0xa4),_0x3875b9=generateSqlCodeTemplate(_0x2d1307,{'target':_0x4a24fd,'includeImports':!_0x3601d8[_0x11cb91(0xb6)](_0x11cb91(0xb2))});return{'ok':!![],'data':{'sqlCode':_0x2d1307[_0x11cb91(0xa3)],'sqlName':_0x2d1307[_0x11cb91(0xb1)],'target':_0x4a24fd,'code':_0x3875b9}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x13545b,_0x352633){const _0x3ea251=a51_0x39c0,_0x4d4082=_0x13545b();while(!![]){try{const _0x55cd38=parseInt(_0x3ea251(0x142))/0x1*(parseInt(_0x3ea251(0x14e))/0x2)+-parseInt(_0x3ea251(0x150))/0x3*(-parseInt(_0x3ea251(0x151))/0x4)+parseInt(_0x3ea251(0x14f))/0x5+parseInt(_0x3ea251(0x158))/0x6*(parseInt(_0x3ea251(0x15f))/0x7)+-parseInt(_0x3ea251(0x14a))/0x8*(-parseInt(_0x3ea251(0x15b))/0x9)+parseInt(_0x3ea251(0x13f))/0xa*(-parseInt(_0x3ea251(0x135))/0xb)+parseInt(_0x3ea251(0x137))/0xc*(-parseInt(_0x3ea251(0x15e))/0xd);if(_0x55cd38===_0x352633)break;else _0x4d4082['push'](_0x4d4082['shift']());}catch(_0x4fe87d){_0x4d4082['push'](_0x4d4082['shift']());}}}(a51_0x568d,0xcf3ba));function a51_0x39c0(_0x3afd05,_0x3fc4ec){_0x3afd05=_0x3afd05-0x134;const _0x568d63=a51_0x568d();let _0x39c06b=_0x568d63[_0x3afd05];return _0x39c06b;}function a51_0x568d(){const _0x3daf2e=['263tvyvmT','\x20Remaining\x20app\x20\x22','apps','args','appcode','Added','keys','defaultApp','5827816gZaMol','boolean','both','\x20<name>','4166QcOAUp','3509205towAJC','1221438QAjOLC','4WtqVIe','length','\x20<name>\x20--appcode\x20<code>','globalConfig','Updated','Removed\x20app\x20\x22','App\x20code','847848uFjrio','Use\x20global\x20config\x20scope','string','18UvXext','project','\x22\x20is\x20selected\x20automatically.','1947465ChnCSN','7OgODOy','\x22\x20still\x20defined\x20in\x20','str','\x22\x20not\x20found.','\x20app\x20\x22','bool','Missing\x20app\x20name.','720951sgQeiC','projectConfig','156slVrme','trim','\x20Default\x20app\x20changed\x20to\x20\x22','global','Usage:\x20','flagMissing','validation','object','70xRLdPh','App\x20\x22','\x20Note:\x20app\x20\x22'];a51_0x568d=function(){return _0x3daf2e;};return a51_0x568d();}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 _0xe25493=a51_0x39c0;return[{'name':_0xe25493(0x146),'type':_0xe25493(0x15a),'description':_0xe25493(0x157),'required':!![]},{'name':'global','type':'boolean','description':'Use\x20global\x20config\x20scope','default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x34972d=a51_0x39c0;return[{'name':_0x34972d(0x13a),'type':_0x34972d(0x14b),'description':_0x34972d(0x159),'default':![]}];}export async function validateAppName(_0x5d340f,_0x20708d){const _0x3962ec=a51_0x39c0,_0x5b1581=_0x5d340f[_0x3962ec(0x145)][0x0]?.[_0x3962ec(0x138)]();if(!_0x5b1581)throw CliErrors[_0x3962ec(0x13d)]('Missing\x20app\x20name.',_0x3962ec(0x13b)+CLI_BIN_NAME+'\x20'+_0x20708d+_0x3962ec(0x14d));}export async function runAppAdd(_0x433c6f,_0x2e6e62){const _0x116b0f=a51_0x39c0,_0x58820a=_0x433c6f[_0x116b0f(0x145)][0x0]?.[_0x116b0f(0x138)]();if(!_0x58820a)throw CliErrors[_0x116b0f(0x13d)](_0x116b0f(0x134),_0x116b0f(0x13b)+CLI_BIN_NAME+'\x20'+_0x2e6e62+'\x20<name>\x20--appcode\x20<code>');const _0x57d5b4=_0x433c6f[_0x116b0f(0x161)](_0x116b0f(0x146));if(!_0x57d5b4)throw CliErrors[_0x116b0f(0x13c)](_0x116b0f(0x146),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x2e6e62+_0x116b0f(0x153));const _0x3af8ae={'global':_0x433c6f[_0x116b0f(0x164)](_0x116b0f(0x13a))},_0x193d9b=readConfig(_0x3af8ae);if(!_0x193d9b[_0x116b0f(0x144)])_0x193d9b['apps']={};const _0x5d3da4={'appcode':_0x57d5b4,...collectAppProfileOverrides(_0x52e3f9=>_0x433c6f[_0x116b0f(0x161)](_0x52e3f9))},_0x396016=_0x193d9b[_0x116b0f(0x144)],_0x3fcf57=Object['keys'](_0x396016),_0x50c504=typeof _0x193d9b['defaultApp']==='string'&&_0x396016[_0x193d9b[_0x116b0f(0x149)]]?_0x193d9b[_0x116b0f(0x149)]:_0x3fcf57[_0x116b0f(0x152)]===0x1?_0x3fcf57[0x0]:undefined,_0x3b2414=!!_0x396016[_0x58820a];_0x396016[_0x58820a]=_0x5d3da4;const _0x395ea3=normalizeStoredDefaultApp(_0x193d9b,_0x50c504);writeConfig(_0x193d9b,_0x3af8ae);const _0xb5e6cd=!_0x3b2414&&_0x395ea3?'\x20Default\x20app\x20is\x20\x22'+_0x395ea3+'\x22.':'',_0x3bae0d=(_0x3b2414?_0x116b0f(0x155):_0x116b0f(0x147))+_0x116b0f(0x163)+_0x58820a+'\x22\x20(appcode:\x20'+_0x57d5b4+')'+scopeLabel(_0x3af8ae)+'.'+_0xb5e6cd;return{'ok':!![],'message':_0x3bae0d};}export async function runAppRemove(_0x378118,_0x4958eb){const _0x2953a5=a51_0x39c0,_0x262304=_0x378118[_0x2953a5(0x145)][0x0]?.[_0x2953a5(0x138)]();if(!_0x262304)throw CliErrors[_0x2953a5(0x13d)]('Missing\x20app\x20name.',_0x2953a5(0x13b)+CLI_BIN_NAME+'\x20'+_0x4958eb+'\x20<name>\x20[--global]');const _0x234700=_0x378118[_0x2953a5(0x164)](_0x2953a5(0x13a)),{config:_0x29d746,layers:_0x2825dc}=readRawConfigWithLayers(),_0x1d0237=_0x29d746[_0x2953a5(0x144)]??{};if(!_0x1d0237[_0x262304])throw CliErrors[_0x2953a5(0x13d)](_0x2953a5(0x140)+_0x262304+_0x2953a5(0x162));const _0x1d5943=_0x2825dc[_0x2953a5(0x154)]['apps']&&typeof _0x2825dc[_0x2953a5(0x154)][_0x2953a5(0x144)]===_0x2953a5(0x13e)?_0x2825dc[_0x2953a5(0x154)]['apps']:{},_0x28042b=_0x2825dc['projectConfig'][_0x2953a5(0x144)]&&typeof _0x2825dc[_0x2953a5(0x136)][_0x2953a5(0x144)]===_0x2953a5(0x13e)?_0x2825dc[_0x2953a5(0x136)][_0x2953a5(0x144)]:{},_0x17b2af=appDefinedIn(_0x262304,_0x1d5943,_0x28042b),_0x48b8c3=resolveAppScopeForWrite(_0x262304,_0x234700,_0x2825dc),_0x2111fd={'global':_0x48b8c3==='global'},_0x3fe7c9=readConfig(_0x2111fd),_0x295b46=_0x3fe7c9[_0x2953a5(0x144)];if(!_0x295b46||!_0x295b46[_0x262304])throw CliErrors[_0x2953a5(0x13d)](_0x2953a5(0x140)+_0x262304+_0x2953a5(0x162));delete _0x295b46[_0x262304];let _0x5a4186='';const _0x59fc8e=typeof _0x3fe7c9[_0x2953a5(0x149)]===_0x2953a5(0x15a)?_0x3fe7c9[_0x2953a5(0x149)]:undefined,_0x2cae8d=Object[_0x2953a5(0x148)](_0x295b46),_0x4e488b=_0x59fc8e===_0x262304?_0x2cae8d[0x0]:_0x59fc8e,_0x5ee7d7=normalizeStoredDefaultApp(_0x3fe7c9,_0x4e488b);if(_0x59fc8e===_0x262304&&_0x2cae8d['length']===0x1)_0x5a4186=_0x2953a5(0x143)+_0x2cae8d[0x0]+_0x2953a5(0x15d);else _0x59fc8e===_0x262304&&_0x5ee7d7&&(_0x5a4186=_0x2953a5(0x139)+_0x5ee7d7+'\x22.');Object[_0x2953a5(0x148)](_0x295b46)['length']===0x0&&(delete _0x3fe7c9[_0x2953a5(0x144)],delete _0x3fe7c9[_0x2953a5(0x149)]);writeConfig(_0x3fe7c9,_0x2111fd);const _0x577cd8=_0x17b2af===_0x2953a5(0x14c)?_0x2953a5(0x141)+_0x262304+_0x2953a5(0x160)+(_0x48b8c3==='project'?_0x2953a5(0x13a):_0x2953a5(0x15c))+'\x20config.':'';return{'ok':!![],'message':_0x2953a5(0x156)+_0x262304+'\x22'+scopeLabel(_0x2111fd)+'.'+_0x5a4186+_0x577cd8};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x8336f1,_0x5c0b42){const _0x286158=a52_0x341b,_0x4708f6=_0x8336f1();while(!![]){try{const _0x37bd51=parseInt(_0x286158(0xa5))/0x1+parseInt(_0x286158(0xaf))/0x2+-parseInt(_0x286158(0x9b))/0x3*(-parseInt(_0x286158(0x9a))/0x4)+-parseInt(_0x286158(0xb5))/0x5*(parseInt(_0x286158(0x98))/0x6)+parseInt(_0x286158(0x93))/0x7+-parseInt(_0x286158(0x9d))/0x8+parseInt(_0x286158(0xb4))/0x9*(-parseInt(_0x286158(0xa9))/0xa);if(_0x37bd51===_0x5c0b42)break;else _0x4708f6['push'](_0x4708f6['shift']());}catch(_0x1c9851){_0x4708f6['push'](_0x4708f6['shift']());}}}(a52_0x3d6a,0x908df));import{input,checkbox,select}from'@inquirer/prompts';import a52_0x48734c 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 _0xe3beef=a52_0x341b,_0x1d7b14=await input({'message':_0xe3beef(0x99),'validate':_0x534959=>{const _0x3765e2=_0xe3beef,_0x5ee770=validateAppcode(_0x534959[_0x3765e2(0xa3)]());return _0x5ee770['valid']||_0x5ee770[_0x3765e2(0x95)]||_0x3765e2(0xa8);}});return _0x1d7b14[_0xe3beef(0xa3)]();}function a52_0x341b(_0x23fbd8,_0x482ebe){_0x23fbd8=_0x23fbd8-0x93;const _0x3d6a30=a52_0x3d6a();let _0x341bc0=_0x3d6a30[_0x23fbd8];return _0x341bc0;}export async function promptAppSelection(_0x3e0be9){const _0x2a68c7=a52_0x341b,_0x4138b5=[{'name':a52_0x48734c[_0x2a68c7(0x9f)](_0x2a68c7(0x94)),'value':-0x1},..._0x3e0be9[_0x2a68c7(0x9e)]((_0xffb5cb,_0x5bf559)=>({'name':_0xffb5cb[_0x2a68c7(0x96)]+'\x20\x20'+a52_0x48734c[_0x2a68c7(0xb8)]('('+_0xffb5cb[_0x2a68c7(0xab)]+')'),'value':_0x5bf559}))],_0x32ced=await checkbox({'message':_0x2a68c7(0xac)+a52_0x48734c[_0x2a68c7(0xa0)](_0x3e0be9[_0x2a68c7(0xae)])+_0x2a68c7(0xb2),'choices':_0x4138b5,'loop':![]});if(_0x32ced[_0x2a68c7(0xb1)](-0x1))return _0x2a68c7(0xa6);if(_0x32ced[_0x2a68c7(0xae)]===0x0)return'custom';return _0x32ced[_0x2a68c7(0x9e)](_0x34f78b=>_0x3e0be9[_0x34f78b]);}export async function promptSingleAppSelection(_0xabc65a){const _0x222619=a52_0x341b,_0x1c0774=[{'name':a52_0x48734c[_0x222619(0xb8)](_0x222619(0xa2)),'value':'skip'},{'name':a52_0x48734c[_0x222619(0x9f)](_0x222619(0x94)),'value':'custom'},..._0xabc65a['map'](_0x191b52=>({'name':_0x191b52[_0x222619(0x96)]+'\x20\x20'+a52_0x48734c[_0x222619(0xb8)]('('+_0x191b52[_0x222619(0xab)]+')'),'value':_0x191b52[_0x222619(0xab)]}))],_0x756742=await select({'message':_0x222619(0xb6),'choices':_0x1c0774});if(_0x756742===_0x222619(0xa4))return _0x222619(0xa4);if(_0x756742===_0x222619(0xa6))return'custom';return _0xabc65a[_0x222619(0xaa)](_0x31663d=>_0x31663d['appCode']===_0x756742);}export async function selectSingleAppcode(_0x4075fd){const _0x53fb9c=a52_0x341b;if(!_0x4075fd)return writeCliSideChannelLine(a52_0x48734c['gray'](_0x53fb9c(0xa1))),_fallbackOrSkip();writeCliSideChannelLine(_0x53fb9c(0xa7));let _0x30d8e1;try{_0x30d8e1=await withActiveCookie(_0x4075fd,()=>listRemoteApps());}catch(_0x143294){writeCliSideChannelLine(a52_0x48734c['yellow']('Could\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.'));if(_0x143294 instanceof Error)writeCliSideChannelLine(a52_0x48734c['gray'](_0x53fb9c(0x97)+_0x143294[_0x53fb9c(0x95)]+')'));return _fallbackOrSkip();}if(_0x30d8e1[_0x53fb9c(0xae)]===0x0)return writeCliSideChannelLine(a52_0x48734c[_0x53fb9c(0x9f)](_0x53fb9c(0xb0))),_fallbackOrSkip();const _0x33e470=await promptSingleAppSelection(_0x30d8e1);if(_0x33e470===_0x53fb9c(0xa4))return'';if(_0x33e470===_0x53fb9c(0xa6))return promptCustomAppcode();return _0x33e470[_0x53fb9c(0xab)];}export async function selectMultipleApps(_0x1ae15d){const _0x29e401=a52_0x341b;writeCliSideChannelLine(_0x29e401(0xa7));let _0x23c223;try{_0x23c223=await withActiveCookie(_0x1ae15d,()=>listRemoteApps());}catch(_0x3610cf){writeCliSideChannelLine(_0x29e401(0x9c));if(_0x3610cf instanceof Error)writeCliSideChannelLine(_0x29e401(0x97)+_0x3610cf[_0x29e401(0x95)]+')');return _0x29e401(0xa6);}if(_0x23c223[_0x29e401(0xae)]===0x0)return writeCliSideChannelLine(_0x29e401(0xb3)),_0x29e401(0xa6);return promptAppSelection(_0x23c223);}async function _fallbackOrSkip(){const _0x541ebb=a52_0x341b,_0xf74603=await select({'message':'App\x20Code:','choices':[{'name':a52_0x48734c[_0x541ebb(0xb8)](_0x541ebb(0xad)),'value':_0x541ebb(0xa4)},{'name':a52_0x48734c[_0x541ebb(0x9f)](_0x541ebb(0xb7)),'value':'manual'}]});if(_0xf74603===_0x541ebb(0xa4))return'';return promptCustomAppcode();}function a52_0x3d6a(){const _0x1400ac=['Fetching\x20available\x20apps...','Invalid\x20App\x20Code','35440ajjYQo','find','appCode','Found\x20','(Skip;\x20configure\x20later)','length','1090728ciltZs','No\x20available\x20apps\x20found.','includes','\x20apps.\x20Select\x20with\x20space,\x20a=all,\x20i=invert:','\x0aNo\x20available\x20apps\x20found.','81MyxLSl','10AhcfbC','Select\x20the\x20app\x20to\x20bind:','✎\x20Enter\x20manually','gray','717234qXunBX','✎\x20Enter\x20appcode\x20manually','message','appName','\x20\x20(','815550srlMix','App\x20Code:','3337384mFkhHg','3STvTFZ','\x0aCould\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','5327104aOCnbS','map','yellow','cyan','(No\x20login\x20session.\x20Enter\x20an\x20App\x20Code\x20manually\x20or\x20skip.)','(Skip;\x20configure\x20later\x20with\x20config\x20set\x20appcode)','trim','skip','79557hTvcqc','custom'];a52_0x3d6a=function(){return _0x1400ac;};return a52_0x3d6a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a53_0x1df7(_0x49bb12,_0xba939d){_0x49bb12=_0x49bb12-0x93;const _0x1d634a=a53_0x1d63();let _0x1df73a=_0x1d634a[_0x49bb12];return _0x1df73a;}const a53_0x1d4e45=a53_0x1df7;(function(_0x4c23dc,_0x34cd35){const _0x43a73b=a53_0x1df7,_0x4b85d1=_0x4c23dc();while(!![]){try{const _0x58a334=-parseInt(_0x43a73b(0xa1))/0x1+-parseInt(_0x43a73b(0x9c))/0x2*(parseInt(_0x43a73b(0xaa))/0x3)+-parseInt(_0x43a73b(0xa6))/0x4*(parseInt(_0x43a73b(0xa2))/0x5)+-parseInt(_0x43a73b(0xad))/0x6*(-parseInt(_0x43a73b(0xaf))/0x7)+-parseInt(_0x43a73b(0x98))/0x8+-parseInt(_0x43a73b(0x9d))/0x9+parseInt(_0x43a73b(0x9f))/0xa*(parseInt(_0x43a73b(0xa5))/0xb);if(_0x58a334===_0x34cd35)break;else _0x4b85d1['push'](_0x4b85d1['shift']());}catch(_0x43fc1b){_0x4b85d1['push'](_0x4b85d1['shift']());}}}(a53_0x1d63,0xa4667));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a53_0x1d4e45(0xb1),a53_0x1d4e45(0x94)]),NON_TERMINAL_STATUSES=new Set([a53_0x1d4e45(0xa8),a53_0x1d4e45(0x9a)]);export function normalizeAsyncTask(_0x5dd018){const _0x298ce9=a53_0x1d4e45,_0x401f6d=typeof _0x5dd018?.[_0x298ce9(0x99)]===_0x298ce9(0xa4)?_0x5dd018[_0x298ce9(0x99)][_0x298ce9(0x96)]():'';if(!_0x401f6d)throw CliErrors[_0x298ce9(0xb2)]('Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.');const _0x72c78f=typeof _0x5dd018[_0x298ce9(0x97)]===_0x298ce9(0xa4)?_0x5dd018['status']['trim']()[_0x298ce9(0x95)]():'';if(!_0x72c78f)throw CliErrors[_0x298ce9(0xb2)](_0x298ce9(0xae)+_0x401f6d+_0x298ce9(0xab));return{'taskId':_0x401f6d,'status':_0x72c78f,'errorMessage':typeof _0x5dd018[_0x298ce9(0xb0)]==='string'&&_0x5dd018[_0x298ce9(0xb0)][_0x298ce9(0x96)]()?_0x5dd018[_0x298ce9(0xb0)]['trim']():null,'isTerminal':TERMINAL_STATUSES[_0x298ce9(0xa9)](_0x72c78f),'knownStatus':TERMINAL_STATUSES[_0x298ce9(0xa9)](_0x72c78f)||NON_TERMINAL_STATUSES[_0x298ce9(0xa9)](_0x72c78f)};}export function buildAsyncTaskStatusCommand(_0x16cb91,_0x27fe58){const _0x4a0df2=a53_0x1d4e45;return CLI_BIN_NAME+'\x20task\x20status\x20--task-id\x20'+quoteShellArg(_0x16cb91)+_0x4a0df2(0x93)+quoteShellArg(_0x27fe58)+_0x4a0df2(0xa7);}function a53_0x1d63(){const _0x5831cb=['262719GSxKjH','1150UrmCbM','Task\x20','string','2769734WusJHD','22616Jzfcky','\x20--format\x20compress','PENDING','has','89445lLXRtR','\x20response\x20did\x20not\x20contain\x20a\x20status.','\x27\x5c\x27\x27','114XlEFWI','Async\x20task\x20','142877wwAcEX','errorMessage','SUCCESS','apiError','\x20--appcode\x20','FAILED','toUpperCase','trim','status','1922816oJqmHA','taskId','PROCESSING','\x20failed:\x20','90vMVenb','9913968RoAVOn','\x20is\x20pending.','180LEZlZs','\x20returned\x20unknown\x20status\x20'];a53_0x1d63=function(){return _0x5831cb;};return a53_0x1d63();}export function asyncTaskMessage(_0xd1ab67){const _0x2e5c4b=a53_0x1d4e45;switch(_0xd1ab67[_0x2e5c4b(0x97)]){case _0x2e5c4b(0xa8):return _0x2e5c4b(0xa3)+_0xd1ab67[_0x2e5c4b(0x99)]+_0x2e5c4b(0x9e);case'PROCESSING':return'Task\x20'+_0xd1ab67[_0x2e5c4b(0x99)]+'\x20is\x20processing.';case _0x2e5c4b(0xb1):return _0x2e5c4b(0xa3)+_0xd1ab67[_0x2e5c4b(0x99)]+'\x20completed\x20successfully.';case _0x2e5c4b(0x94):return _0xd1ab67[_0x2e5c4b(0xb0)]?_0x2e5c4b(0xa3)+_0xd1ab67['taskId']+_0x2e5c4b(0x9b)+_0xd1ab67[_0x2e5c4b(0xb0)]:_0x2e5c4b(0xa3)+_0xd1ab67[_0x2e5c4b(0x99)]+'\x20failed.';default:return _0x2e5c4b(0xa3)+_0xd1ab67[_0x2e5c4b(0x99)]+_0x2e5c4b(0xa0)+_0xd1ab67[_0x2e5c4b(0x97)]+'.';}}function quoteShellArg(_0x170b6a){const _0x15da39=a53_0x1d4e45;return'\x27'+_0x170b6a['replace'](/'/g,_0x15da39(0xac))+'\x27';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a54_0x33ea(){var _0xd85662=['defineProperties','939gxsmIu','35048NEZfBT','9736ONrPHw','method','120uhcdOo','8324316dGlpOY','description','1276URuKVH','1575MwbZgG','3891290jxumgC','4846AJViRn','642483BILpCT','627yLAXMh','245772IpOcom'];a54_0x33ea=function(){return _0xd85662;};return a54_0x33ea();}function a54_0x32e4(_0xd1d558,_0x2f1298){_0xd1d558=_0xd1d558-0xb0;var _0x33ea93=a54_0x33ea();var _0x32e455=_0x33ea93[_0xd1d558];return _0x32e455;}(function(_0x2b3c09,_0x1a57fd){var _0xa8a8fd=a54_0x32e4,_0x37dabc=_0x2b3c09();while(!![]){try{var _0x1b34ee=-parseInt(_0xa8a8fd(0xbe))/0x1*(-parseInt(_0xa8a8fd(0xbc))/0x2)+parseInt(_0xa8a8fd(0xb2))/0x3*(-parseInt(_0xa8a8fd(0xb4))/0x4)+-parseInt(_0xa8a8fd(0xbb))/0x5+parseInt(_0xa8a8fd(0xb7))/0x6+parseInt(_0xa8a8fd(0xba))/0x7*(parseInt(_0xa8a8fd(0xb3))/0x8)+parseInt(_0xa8a8fd(0xbd))/0x9*(parseInt(_0xa8a8fd(0xb6))/0xa)+parseInt(_0xa8a8fd(0xb9))/0xb*(-parseInt(_0xa8a8fd(0xb0))/0xc);if(_0x1b34ee===_0x1a57fd)break;else _0x37dabc['push'](_0x37dabc['shift']());}catch(_0x3dabea){_0x37dabc['push'](_0x37dabc['shift']());}}}(a54_0x33ea,0xcb638));export function asDryRunResult(_0x43cc8a,_0x34d968){var _0x30934f=a54_0x32e4;return Object[_0x30934f(0xb1)](_0x43cc8a,{'method':{'value':_0x34d968[_0x30934f(0xb5)],'enumerable':![]},'url':{'value':_0x34d968['url'],'enumerable':![]},..._0x34d968[_0x30934f(0xb8)]?{'description':{'value':_0x34d968[_0x30934f(0xb8)],'enumerable':![]}}:{}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a55_0x13c48b=a55_0x337e;(function(_0x524b76,_0x487047){const _0x4dd175=a55_0x337e,_0x4d7853=_0x524b76();while(!![]){try{const _0x4df0e0=-parseInt(_0x4dd175(0xb9))/0x1+parseInt(_0x4dd175(0xbb))/0x2*(-parseInt(_0x4dd175(0xcd))/0x3)+parseInt(_0x4dd175(0xb6))/0x4+-parseInt(_0x4dd175(0xad))/0x5+-parseInt(_0x4dd175(0xc2))/0x6+parseInt(_0x4dd175(0xc8))/0x7*(parseInt(_0x4dd175(0xc4))/0x8)+-parseInt(_0x4dd175(0xc3))/0x9*(-parseInt(_0x4dd175(0xbc))/0xa);if(_0x4df0e0===_0x487047)break;else _0x4d7853['push'](_0x4d7853['shift']());}catch(_0x56b67f){_0x4d7853['push'](_0x4d7853['shift']());}}}(a55_0x368f,0xb83c5));export const CROSS_RELATION_FROM_DATASET_FLAG={'name':'from-datasetcode','type':a55_0x13c48b(0xbe),'required':!![],'description':a55_0x13c48b(0xab)};export const CROSS_RELATION_FROM_COLUMN_FLAG={'name':a55_0x13c48b(0xaf),'type':'string','required':!![],'description':'Source\x20field\x20name\x20used\x20to\x20locate\x20the\x20relation'};function a55_0x368f(){const _0x2984f2=['46580pcnPzz','boolean','string','to-column','MYSQL','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','515412BDvYBL','1719xCjEgP','107192WJANRv','cardinality','code','Target\x20display\x20field;\x20create\x20defaults\x20to\x20the\x20target\x20field,\x20update\x20keeps\x20the\x20current\x20value','546qUpLXj','number','appcode','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','datasetcode','6rsSjvc','Relation\x20cardinality;\x20create\x20leaves\x20it\x20unset\x20when\x20omitted,\x20update\x20keeps\x20the\x20current\x20value','MANY_TO_MANY','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','Source\x20DB_TABLE\x20dataset\x20code','App\x20code\x20(e.g.\x20app-xxxxx)','2231060QzxqsI','Write\x20to\x20the\x20global\x20configuration','from-column','from-dblink-id','to-datasetcode','ONE_TO_ONE','ONE_TO_MANY','to-label-column','dbtype','290604aZXVoP','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','Target\x20DB_TABLE\x20dataset\x20code','674316LTzTyu','sqlcode','46392PGnAuT'];a55_0x368f=function(){return _0x2984f2;};return a55_0x368f();}export const CROSS_RELATION_TO_DATASET_FLAG={'name':a55_0x13c48b(0xb1),'type':'string','required':!![],'description':a55_0x13c48b(0xb8)};export const CROSS_RELATION_TO_COLUMN_FLAG={'name':a55_0x13c48b(0xbf),'type':a55_0x13c48b(0xbe),'required':!![],'description':'Target\x20field\x20name'};export const CROSS_RELATION_DBLINK_FLAG={'name':a55_0x13c48b(0xb0),'type':a55_0x13c48b(0xc9),'description':'Source\x20database\x20connection\x20ID;\x20derived\x20from\x20the\x20source\x20dataset\x20when\x20omitted'};export const CROSS_RELATION_LABEL_FLAG={'name':a55_0x13c48b(0xb4),'type':a55_0x13c48b(0xbe),'description':a55_0x13c48b(0xc7)};export const CROSS_RELATION_CARDINALITY_FLAG={'name':a55_0x13c48b(0xc5),'type':a55_0x13c48b(0xbe),'enum':[a55_0x13c48b(0xb2),a55_0x13c48b(0xb3),'MANY_TO_ONE',a55_0x13c48b(0xcf)],'description':a55_0x13c48b(0xce)};export const GLOBAL_SCOPE_FLAG={'name':'global','type':a55_0x13c48b(0xbd),'default':![],'description':a55_0x13c48b(0xae)};export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':'a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)'};export const CODE_FLAG={'name':a55_0x13c48b(0xc6),'type':'string','required':!![],'description':a55_0x13c48b(0xaa),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a55_0x13c48b(0xcc),'description':a55_0x13c48b(0xaa)};export const SQLCODE_FLAG={'name':a55_0x13c48b(0xba),'type':a55_0x13c48b(0xbe),'required':!![],'description':a55_0x13c48b(0xcb),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a55_0x13c48b(0xb7)}};export const APPCODE_FLAG_OPTIONAL={'name':a55_0x13c48b(0xca),'type':a55_0x13c48b(0xbe),'required':![],'description':a55_0x13c48b(0xc1)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a55_0x13c48b(0xac)};function a55_0x337e(_0x3e9cca,_0x4556a5){_0x3e9cca=_0x3e9cca-0xa9;const _0x368f21=a55_0x368f();let _0x337e8d=_0x368f21[_0x3e9cca];return _0x337e8d;}export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a55_0x13c48b(0xc9),'required':!![],'description':a55_0x13c48b(0xa9)};export const DB_TYPE_FLAG={'name':a55_0x13c48b(0xb5),'type':a55_0x13c48b(0xbe),'required':!![],'description':'Database\x20product\x20type','enum':[a55_0x13c48b(0xc0),'POSTGRESQL']};export const SKIP_CONNECTION_TEST_FLAG={'name':'skip-connection-test','type':a55_0x13c48b(0xbd),'description':'Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update'};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x595413,_0x371c51){const _0x3d6e74=a56_0x3582,_0x1c7c7f=_0x595413();while(!![]){try{const _0x180205=-parseInt(_0x3d6e74(0xe9))/0x1+-parseInt(_0x3d6e74(0xea))/0x2+-parseInt(_0x3d6e74(0xe8))/0x3*(parseInt(_0x3d6e74(0xee))/0x4)+-parseInt(_0x3d6e74(0xec))/0x5*(-parseInt(_0x3d6e74(0xe7))/0x6)+-parseInt(_0x3d6e74(0xed))/0x7*(parseInt(_0x3d6e74(0xf4))/0x8)+-parseInt(_0x3d6e74(0xeb))/0x9*(-parseInt(_0x3d6e74(0xef))/0xa)+parseInt(_0x3d6e74(0xe2))/0xb;if(_0x180205===_0x371c51)break;else _0x1c7c7f['push'](_0x1c7c7f['shift']());}catch(_0x4d2904){_0x1c7c7f['push'](_0x1c7c7f['shift']());}}}(a56_0x1ac5,0x1d9d8));import{existsSync,statSync}from'node:fs';function a56_0x1ac5(){const _0x1532ad=['trim','File\x20is\x20not\x20a\x20regular\x20file:\x20','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','\x20MB','66FIdMph','621tzfSHz','171037tmeuBA','89758uNDUOA','9fLfsBO','12995mOsuEI','74501hcXwdB','4424etIDdN','350570XJPzTp','\x20path\x20is\x20required.','toFixed','validation','size','104kLHPyq','isFile','7049625mEzzBc'];a56_0x1ac5=function(){return _0x1532ad;};return a56_0x1ac5();}import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x52822b){const _0x26a1eb=a56_0x3582;if(_0x52822b>=BYTES_PER_MB){const _0x2aba65=Math['ceil'](_0x52822b/BYTES_PER_MB*0x64)/0x64;return _0x2aba65[_0x26a1eb(0xf1)](0x2)+_0x26a1eb(0xe6);}return _0x52822b+'\x20B';}function a56_0x3582(_0x476b5f,_0x33fd11){_0x476b5f=_0x476b5f-0xe1;const _0x1ac559=a56_0x1ac5();let _0x3582fc=_0x1ac559[_0x476b5f];return _0x3582fc;}export function requireDevelopmentUploadFile(_0x582a03,_0x4598de){const _0x1f45de=a56_0x3582,_0x227151=_0x582a03[_0x1f45de(0xe3)]();if(!_0x227151)throw CliErrors[_0x1f45de(0xf2)](_0x4598de+_0x1f45de(0xf0));if(!existsSync(_0x227151))throw CliErrors[_0x1f45de(0xf2)]('File\x20not\x20found:\x20'+_0x227151);const _0x2e2b9e=statSync(_0x227151);if(!_0x2e2b9e[_0x1f45de(0xe1)]())throw CliErrors[_0x1f45de(0xf2)](_0x1f45de(0xe4)+_0x227151);if(_0x2e2b9e[_0x1f45de(0xf3)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x1f45de(0xf2)](_0x1f45de(0xe5)+_0x227151+'\x20('+formatBytes(_0x2e2b9e[_0x1f45de(0xf3)])+')');return{'path':_0x227151,'size':_0x2e2b9e[_0x1f45de(0xf3)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a57_0x4450(){const _0x2a86fd=['5FEfWDd','18pBlXxf','9986581nGObxT','test','10jbgskr','773274GkcnvB','5361796zyDzaX','trim','2GwJuiZ','11238456DAVIdG','574777lefjBx','836061nDOhaJ','26835198eXrUZv','9dNnsxB','App\x20Code\x20cannot\x20exceed\x20100\x20characters','24NUtedK'];a57_0x4450=function(){return _0x2a86fd;};return a57_0x4450();}function a57_0x1e61(_0x4e7b22,_0x51c98a){_0x4e7b22=_0x4e7b22-0xda;const _0x445094=a57_0x4450();let _0x1e6199=_0x445094[_0x4e7b22];return _0x1e6199;}(function(_0x1f606e,_0x40b094){const _0x373611=a57_0x1e61,_0x215ec0=_0x1f606e();while(!![]){try{const _0x4d10b9=parseInt(_0x373611(0xe0))/0x1+parseInt(_0x373611(0xdd))/0x2*(parseInt(_0x373611(0xda))/0x3)+-parseInt(_0x373611(0xdb))/0x4*(-parseInt(_0x373611(0xe5))/0x5)+-parseInt(_0x373611(0xe6))/0x6*(-parseInt(_0x373611(0xdf))/0x7)+parseInt(_0x373611(0xde))/0x8*(parseInt(_0x373611(0xe2))/0x9)+parseInt(_0x373611(0xe9))/0xa*(parseInt(_0x373611(0xe7))/0xb)+parseInt(_0x373611(0xe4))/0xc*(-parseInt(_0x373611(0xe1))/0xd);if(_0x4d10b9===_0x40b094)break;else _0x215ec0['push'](_0x215ec0['shift']());}catch(_0x40948b){_0x215ec0['push'](_0x215ec0['shift']());}}}(a57_0x4450,0xd3213));export function validateAppcode(_0x14b4da){const _0x1299d7=a57_0x1e61,_0x2aa3e2=_0x14b4da[_0x1299d7(0xdc)]();if(!_0x2aa3e2)return{'valid':![],'message':'App\x20Code\x20cannot\x20be\x20empty'};if(_0x2aa3e2['length']>0x64)return{'valid':![],'message':_0x1299d7(0xe3)};if(!/^[A-Za-z0-9_-]+$/[_0x1299d7(0xe8)](_0x2aa3e2))return{'valid':![],'message':'Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'};return{'valid':!![]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a58_0xbb2c68=a58_0x5707;(function(_0x4da01a,_0x49ec88){const _0x3b92fc=a58_0x5707,_0x2d36d5=_0x4da01a();while(!![]){try{const _0x559e0d=parseInt(_0x3b92fc(0x1ee))/0x1*(-parseInt(_0x3b92fc(0x1f5))/0x2)+parseInt(_0x3b92fc(0x1ef))/0x3*(-parseInt(_0x3b92fc(0x1e9))/0x4)+-parseInt(_0x3b92fc(0x1ed))/0x5+-parseInt(_0x3b92fc(0x1f9))/0x6*(parseInt(_0x3b92fc(0x1eb))/0x7)+parseInt(_0x3b92fc(0x1db))/0x8+-parseInt(_0x3b92fc(0x1e8))/0x9*(-parseInt(_0x3b92fc(0x1e1))/0xa)+parseInt(_0x3b92fc(0x1dd))/0xb*(parseInt(_0x3b92fc(0x1da))/0xc);if(_0x559e0d===_0x49ec88)break;else _0x2d36d5['push'](_0x2d36d5['shift']());}catch(_0x1f12cb){_0x2d36d5['push'](_0x2d36d5['shift']());}}}(a58_0x453f,0x4ebf9));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';function a58_0x453f(){const _0x5e910c=['Top-level\x20key\x20\x22','10KRqPyN','bool','Delete\x20a\x20config\x20value\x20from\x20one\x20scope','key','\x22\x20is\x20not\x20deletable.','riskLevel','write','4880106tioAjG','532oXWKYH','\x20deleted','7asPALC','Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','1732705SYbYTr','12219DDGOzu','12066nggvMN','hasOwnProperty','call','routing','has','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','82ASfJYX','inherit','\x20already\x20absent','config','3683412AzMkPy','Project','boolean','\x20config\x20delete\x20<key>\x20[--global]','prototype','validation','defaultApp','12MaPNRl','4783176IpKcVm','args','12966470DtoPBc','Global','global'];a58_0x453f=function(){return _0x5e910c;};return a58_0x453f();}const LEGACY_DELETABLE_KEYS=new Set([a58_0xbb2c68(0x1f6)]),EXTRA_DELETABLE_KEYS=new Set([a58_0xbb2c68(0x1ff),a58_0xbb2c68(0x1f2)]);async function execute(_0x1a31de){const _0x1353dc=a58_0xbb2c68,_0x5e4b26=_0x1a31de[_0x1353dc(0x1dc)][0x0]?.['trim']();if(!_0x5e4b26)throw CliErrors[_0x1353dc(0x1fe)]('Missing\x20key\x20argument.','Usage:\x20'+CLI_BIN_NAME+_0x1353dc(0x1fc));if(_0x5e4b26===_0x1353dc(0x1e6))throw CliErrors['validation'](_0x1353dc(0x1f4));if(!isTopLevelConfigKey(_0x5e4b26)&&!EXTRA_DELETABLE_KEYS[_0x1353dc(0x1f3)](_0x5e4b26)&&!LEGACY_DELETABLE_KEYS['has'](_0x5e4b26))throw CliErrors['validation'](_0x1353dc(0x1e0)+_0x5e4b26+_0x1353dc(0x1e5),'Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.');const _0x20f164=resolveWriteScope({'global':_0x1a31de[_0x1353dc(0x1e2)](_0x1353dc(0x1df))}),_0x232e2d=readScopedConfig(_0x20f164),_0x5d1f51=Object[_0x1353dc(0x1fd)][_0x1353dc(0x1f0)][_0x1353dc(0x1f1)](_0x232e2d,_0x5e4b26);_0x5d1f51&&(delete _0x232e2d[_0x5e4b26],writeScopedConfig(_0x232e2d,_0x20f164));const _0xe30e0d=_0x20f164===_0x1353dc(0x1df)?_0x1353dc(0x1de):_0x1353dc(0x1fa);return{'ok':!![],'message':_0x5d1f51?'✓\x20'+_0xe30e0d+'\x20'+_0x5e4b26+_0x1353dc(0x1ea):'✓\x20'+_0xe30e0d+'\x20'+_0x5e4b26+_0x1353dc(0x1f7),'data':{'key':_0x5e4b26,'scope':_0x20f164,'changed':_0x5d1f51}};}function a58_0x5707(_0x46c06f,_0x1d55ab){_0x46c06f=_0x46c06f-0x1da;const _0x453f5f=a58_0x453f();let _0x570794=_0x453f5f[_0x46c06f];return _0x570794;}export const configDeleteDefinition={'service':a58_0xbb2c68(0x1f8),'command':'delete','description':a58_0xbb2c68(0x1e3),'risk':a58_0xbb2c68(0x1e7),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a58_0xbb2c68(0x1e4),'description':'Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','required':!![]}],'flags':[{'name':a58_0xbb2c68(0x1df),'type':a58_0xbb2c68(0x1fb),'description':a58_0xbb2c68(0x1ec),'default':![]}],'execute':execute};
|