@lovrabet/rabetbase-cli 2.5.5-beta.3 → 2.5.6-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/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.d.ts +40 -0
- package/lib/commands/db/cross-db-analysis-shared.js +1 -0
- package/lib/commands/db/cross-db-analyze-latest.d.ts +2 -0
- package/lib/commands/db/cross-db-analyze-latest.js +1 -0
- package/lib/commands/db/cross-db-analyze-start.d.ts +2 -0
- package/lib/commands/db/cross-db-analyze-start.js +1 -0
- package/lib/commands/db/cross-db-analyze-status.d.ts +2 -0
- package/lib/commands/db/cross-db-analyze-status.js +1 -0
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +7 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.d.ts +17 -0
- package/lib/core/cross-db-analysis.js +1 -0
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +6 -4
- package/skills/rabetbase/guides/database-connection-workflow.md +12 -3
- package/skills/rabetbase/guides/independent-deployment.md +10 -2
- package/skills/rabetbase/references/rabetbase-dataset-cross-relations.md +2 -0
- package/skills/rabetbase/references/rabetbase-db-analyze.md +2 -0
- package/skills/rabetbase/references/rabetbase-db-cross-analyze.md +78 -0
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +4 -3
package/lib/commands/bff/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a44_0x25d61a=a44_0x5465;(function(_0x34c1de,_0x52b9e4){const _0x51ec08=a44_0x5465,_0x34e1df=_0x34c1de();while(!![]){try{const _0x4d1b6e=parseInt(_0x51ec08(0x228))/0x1*(-parseInt(_0x51ec08(0x248))/0x2)+-parseInt(_0x51ec08(0x20a))/0x3+-parseInt(_0x51ec08(0x204))/0x4*(-parseInt(_0x51ec08(0x1f0))/0x5)+parseInt(_0x51ec08(0x1e3))/0x6+parseInt(_0x51ec08(0x24c))/0x7+parseInt(_0x51ec08(0x216))/0x8*(-parseInt(_0x51ec08(0x1ec))/0x9)+parseInt(_0x51ec08(0x205))/0xa*(-parseInt(_0x51ec08(0x215))/0xb);if(_0x4d1b6e===_0x52b9e4)break;else _0x34e1df['push'](_0x34e1df['shift']());}catch(_0x10cf0e){_0x34e1df['push'](_0x34e1df['shift']());}}}(a44_0x5858,0x76860));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';function a44_0x5465(_0x55547a,_0x347fc1){_0x55547a=_0x55547a-0x1de;const _0x58586b=a44_0x5858();let _0x54655a=_0x58586b[_0x55547a];return _0x54655a;}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_0x25d61a(0x226),'command':a44_0x25d61a(0x201),'description':a44_0x25d61a(0x1f2),'risk':a44_0x25d61a(0x1e2),'structuredErrors':!![],'flags':[{'name':a44_0x25d61a(0x235),'type':a44_0x25d61a(0x1ee),'description':'Push\x20only\x20this\x20script\x20type','enum':[a44_0x25d61a(0x1fa),a44_0x25d61a(0x249),a44_0x25d61a(0x1e1)]},{'name':'name','type':a44_0x25d61a(0x1ee),'description':'Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)'},{'name':a44_0x25d61a(0x234),'type':a44_0x25d61a(0x1f6),'description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x5a91b1){const _0x1854bf=a44_0x25d61a,_0x38d427=loadBffProjectConfig(_0x5a91b1[_0x1854bf(0x221)]),_0x436638=await readBffLockFile(_0x38d427[_0x1854bf(0x207)]),{appLock:_0x1c7810}=ensureLockScope(_0x436638??createEmptyBffLock(),_0x5a91b1['appCode'],_0x38d427[_0x1854bf(0x1e8)],'push'),_0x162997=await getTargetFunctions(_0x38d427,_0x5a91b1),_0x11d70f=_0x162997[_0x1854bf(0x24d)](_0x3b7066=>_0x3b7066[_0x1854bf(0x235)]===_0x1854bf(0x1e1))?await scanLocalBffFunctions(_0x38d427,_0x1854bf(0x1e1)):_0x162997,_0x355751=await buildHookMaps(_0x5a91b1['appCode'],_0x5a91b1['apiDir'],_0x11d70f,_0x1c7810,_0x5a91b1[_0x1854bf(0x200)]||_0x5a91b1[_0x1854bf(0x1ea)]?.[_0x1854bf(0x20c)]||_0x5a91b1['mergedCli']?.[_0x1854bf(0x217)]),_0x5e7c1b=_0x5a91b1[_0x1854bf(0x1ed)]('force'),_0x29f7bf=[];for(const _0x1f3c5b of _0x162997){const _0x37064b=await computeFileHash(_0x1f3c5b['filePath']),_0x4248c8=_0x1c7810['functions'][_0x1f3c5b[_0x1854bf(0x21c)]],_0x41419e=!!_0x4248c8&&_0x4248c8[_0x1854bf(0x206)]===_0x37064b,_0x441d1c=_0x355751[_0x1854bf(0x230)][_0x1854bf(0x20f)](_0x1f3c5b[_0x1854bf(0x21c)]),_0x3b3f18=!!_0x4248c8?.[_0x1854bf(0x1ff)]&&_0x4248c8[_0x1854bf(0x21f)]==null&&(_0x5e7c1b||!_0x41419e),_0x2ff632=_0x3b3f18?missingRemoteVersionConflict(_0x1f3c5b,_0x4248c8):undefined,_0xaa6059=_0x355751[_0x1854bf(0x209)][_0x1854bf(0x1e6)](_0x1f3c5b[_0x1854bf(0x21c)])?_0x1854bf(0x203):!_0x5e7c1b&&_0x41419e?_0x1854bf(0x225):_0x2ff632?'conflict':_0x1854bf(0x208);_0x29f7bf[_0x1854bf(0x201)]({'lockKey':_0x1f3c5b['lockKey'],'filePath':_0x1f3c5b['filePath'],'remoteId':_0x4248c8?.[_0x1854bf(0x1ff)]??null,'mode':_0x4248c8?.[_0x1854bf(0x1ff)]?_0x1854bf(0x247):_0x1854bf(0x241),'status':_0xaa6059,..._0x355751[_0x1854bf(0x209)][_0x1854bf(0x1e6)](_0x1f3c5b[_0x1854bf(0x21c)])?{'error':_0x355751[_0x1854bf(0x209)][_0x1854bf(0x20f)](_0x1f3c5b[_0x1854bf(0x21c)])}:{},..._0x2ff632?{'conflict':_0x2ff632}:{},..._0x355751[_0x1854bf(0x23a)][_0x1854bf(0x1e6)](_0x1f3c5b['lockKey'])?{'datasetCode':_0x4248c8?.['datasetCode'],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x1f3c5b[_0x1854bf(0x21c)])]}:{},..._0x441d1c?{'alias':_0x441d1c['alias']??null,'datasetCode':_0x441d1c[_0x1854bf(0x24b)],'operationType':_0x1f3c5b[_0x1854bf(0x242)],'functionNode':_0x1f3c5b['functionNode'],'warnings':_0x441d1c[_0x1854bf(0x214)]}:{}});}return{'method':'POST','url':_0x1854bf(0x238),'body':{'appCode':_0x5a91b1['appCode'],'force':_0x5e7c1b,'files':_0x29f7bf,'cacheClearAtRuntime':_0x29f7bf['some'](_0x3d5f83=>_0x3d5f83[_0x1854bf(0x227)]===_0x1854bf(0x208)),'cacheClearAtRuntimeTimes':_0x29f7bf[_0x1854bf(0x24d)](_0x2fff1a=>_0x2fff1a[_0x1854bf(0x227)]===_0x1854bf(0x208))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x1854bf(0x22a)+_0x29f7bf[_0x1854bf(0x24e)]+_0x1854bf(0x1e4)};},async 'execute'(_0x3e42a9){const _0x31c120=a44_0x25d61a,_0x1dbfa9=loadBffProjectConfig(_0x3e42a9[_0x31c120(0x221)]),_0x844f1b=await readBffLockFile(_0x1dbfa9[_0x31c120(0x207)]),{lockData:_0x1cf820,appLock:_0x290281}=ensureLockScope(_0x844f1b??createEmptyBffLock(),_0x3e42a9['appCode'],_0x1dbfa9[_0x31c120(0x1e8)],_0x31c120(0x201)),_0x356c54=await getTargetFunctions(_0x1dbfa9,_0x3e42a9);if(_0x356c54[_0x31c120(0x24e)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':_0x31c120(0x222)};const _0x4e07f0=_0x3e42a9[_0x31c120(0x1ed)](_0x31c120(0x234)),_0x5a12c6=JSON[_0x31c120(0x1f1)](JSON[_0x31c120(0x21e)](_0x1cf820)),_0x4cdf10=_0x5a12c6[_0x31c120(0x1fc)][_0x3e42a9[_0x31c120(0x221)]];if(!_0x4cdf10)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x3e42a9['appCode']+_0x31c120(0x23e));const _0x7b253b=_0x356c54[_0x31c120(0x24d)](_0x297c94=>_0x297c94[_0x31c120(0x235)]===_0x31c120(0x1e1))?await scanLocalBffFunctions(_0x1dbfa9,_0x31c120(0x1e1)):_0x356c54,_0x20fe3d=await buildHookMaps(_0x3e42a9[_0x31c120(0x221)],_0x3e42a9[_0x31c120(0x231)],_0x7b253b,_0x4cdf10,_0x3e42a9[_0x31c120(0x200)]||_0x3e42a9[_0x31c120(0x1ea)]?.[_0x31c120(0x20c)]||_0x3e42a9[_0x31c120(0x1ea)]?.[_0x31c120(0x217)]),_0x17bac9=[],_0x51f48e=[],_0x2433f4=[],_0x49e40c=[];for(const _0x2d66a1 of _0x356c54){const _0x438f4a=_0x20fe3d[_0x31c120(0x209)][_0x31c120(0x20f)](_0x2d66a1[_0x31c120(0x21c)]);if(_0x438f4a){_0x49e40c[_0x31c120(0x201)]({'lockKey':_0x2d66a1[_0x31c120(0x21c)],'error':_0x438f4a});continue;}const _0x14c9ce=await computeFileHash(_0x2d66a1[_0x31c120(0x1f3)]),_0x1525a3=_0x4cdf10[_0x31c120(0x233)][_0x2d66a1[_0x31c120(0x21c)]];if(!_0x4e07f0&&_0x1525a3&&_0x1525a3['hash']===_0x14c9ce){_0x51f48e['push']({'lockKey':_0x2d66a1[_0x31c120(0x21c)],'reason':_0x31c120(0x225)});continue;}if(_0x1525a3?.[_0x31c120(0x1ff)]&&_0x1525a3[_0x31c120(0x21f)]==null){_0x2433f4[_0x31c120(0x201)](missingRemoteVersionConflict(_0x2d66a1,_0x1525a3));continue;}try{await uploadSingleFunction(_0x3e42a9[_0x31c120(0x221)],_0x2d66a1,_0x4cdf10,_0x20fe3d);const _0x4f2f55=_0x4cdf10[_0x31c120(0x233)][_0x2d66a1[_0x31c120(0x21c)]];_0x17bac9[_0x31c120(0x201)]({'lockKey':_0x2d66a1['lockKey'],'remoteId':_0x4f2f55?.[_0x31c120(0x1ff)]??0x0});}catch(_0x41e7b9){const _0xdeccd=remoteVersionChangedConflict(_0x2d66a1,_0x1525a3,_0x41e7b9);if(_0xdeccd){_0x2433f4[_0x31c120(0x201)](_0xdeccd);continue;}_0x49e40c[_0x31c120(0x201)]({'lockKey':_0x2d66a1[_0x31c120(0x21c)],'error':_0x41e7b9 instanceof Error?_0x41e7b9[_0x31c120(0x21a)]:String(_0x41e7b9)});}}_0x4cdf10[_0x31c120(0x23b)]=new Date()[_0x31c120(0x22c)](),await writeBffLockFile(_0x1dbfa9['lockFilePath'],_0x5a12c6),await waitForUploadedLockEntries(_0x1dbfa9[_0x31c120(0x207)],_0x3e42a9[_0x31c120(0x221)],_0x17bac9[_0x31c120(0x245)](_0x4ea7b0=>_0x4ea7b0[_0x31c120(0x21c)]));let _0x4e6d32={'attempted':![],'cleared':![]};if(_0x17bac9['length']>0x0)try{let _0x5d423e='';for(let _0x497573=0x0;_0x497573<CACHE_CLEAR_ATTEMPTS;_0x497573+=0x1){_0x5d423e=await clearBffScriptCache(),_0x497573<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x4e6d32={'attempted':!![],'cleared':!![],'message':_0x5d423e||_0x31c120(0x1e7)};}catch(_0x5e1e84){_0x4e6d32={'attempted':!![],'cleared':![],'error':_0x5e1e84 instanceof Error?_0x5e1e84[_0x31c120(0x21a)]:String(_0x5e1e84)};}const _0x5e87c5=_0x49e40c['length']===0x0&&(_0x4e6d32['attempted']?_0x4e6d32[_0x31c120(0x219)]:!![]),_0x3d9a15=_0x5e87c5,_0x28893b=_0x4e6d32[_0x31c120(0x1de)]?_0x4e6d32[_0x31c120(0x219)]?_0x31c120(0x24a):'runtime\x20cache\x20clear\x20failed':'runtime\x20cache\x20not\x20needed';return{'ok':_0x3d9a15,'data':{'uploaded':_0x17bac9,'skipped':_0x51f48e,'conflicts':_0x2433f4,'failed':_0x49e40c,'cacheClear':_0x4e6d32,'warnings':[...[..._0x20fe3d['resolutions'][_0x31c120(0x1fd)]()][_0x31c120(0x1fb)](_0x5a4c58=>_0x5a4c58[_0x31c120(0x214)]),...[..._0x20fe3d[_0x31c120(0x23a)]]['map'](existingHookWarning)]},'message':formatPushMessage(_0x17bac9['length'],_0x51f48e[_0x31c120(0x24e)],_0x2433f4['length'],_0x49e40c[_0x31c120(0x24e)],_0x28893b)};}};function missingRemoteVersionConflict(_0x15cfc5,_0x4191e1){const _0x3cfc12=a44_0x25d61a;return remoteVersionConflict(_0x15cfc5,_0x4191e1,_0x3cfc12(0x1fe),_0x3cfc12(0x224));}function remoteVersionChangedConflict(_0x1f8e0c,_0x241513,_0x27467a){const _0x4da84e=a44_0x25d61a;if(!_0x241513?.[_0x4da84e(0x1ff)]||_0x241513[_0x4da84e(0x21f)]==null||!isRemoteVersionConflict(_0x27467a))return undefined;return remoteVersionConflict(_0x1f8e0c,_0x241513,_0x4da84e(0x218),_0x4da84e(0x212));}function remoteVersionConflict(_0x23e7ae,_0x460ae4,_0x191302,_0x2d2197){const _0x48692e=a44_0x25d61a;return{'code':_0x191302,'lockKey':_0x23e7ae[_0x48692e(0x21c)],'filePath':_0x23e7ae[_0x48692e(0x1f3)],'remoteId':_0x460ae4[_0x48692e(0x1ff)],..._0x460ae4[_0x48692e(0x21f)]!=null?{'expectedVersion':_0x460ae4[_0x48692e(0x21f)]}:{},'message':_0x2d2197,'nextAction':{'action':_0x48692e(0x1e5),'command':CLI_BIN_NAME+_0x48692e(0x23f)+_0x460ae4['remoteId']+_0x48692e(0x239),'requiresReview':!![],'message':'Review\x20the\x20current\x20remote\x20source,\x20merge\x20it\x20into\x20the\x20local\x20script,\x20then\x20retry\x20push.\x20Do\x20not\x20use\x20--force\x20unless\x20you\x20intentionally\x20discard\x20local\x20changes.'}};}function isRemoteVersionConflict(_0x316c1e){const _0x1fd387=a44_0x25d61a,_0x4dadc7=_0x316c1e instanceof Error?_0x316c1e['message']:String(_0x316c1e),_0x111578=getPlatformErrorCode(_0x316c1e)??'';return[_0x4dadc7,_0x111578][_0x1fd387(0x24d)](_0x207a18=>/(?:version|optimistic)[\s_-]*(?:conflict|mismatch|changed|stale|out[\s_-]*of[\s_-]*date)|(?:conflict|mismatch|changed|stale|out[\s_-]*of[\s_-]*date)[\s_-]*(?:version|optimistic)/i['test'](_0x207a18));}function formatPushMessage(_0x1b74d9,_0x2ed6f4,_0x415e76,_0x14a044,_0x4cee23){const _0xd1d928=a44_0x25d61a,_0x53333f=[_0xd1d928(0x1e9)+_0x1b74d9+_0xd1d928(0x232),_0x2ed6f4+_0xd1d928(0x20b)];_0x415e76>0x0&&_0x53333f[_0xd1d928(0x201)](_0x415e76+_0xd1d928(0x23d)+(_0x415e76===0x1?'':'s')+'\x20'+(_0x415e76===0x1?_0xd1d928(0x22e):_0xd1d928(0x220))+_0xd1d928(0x20d));if(_0x14a044>0x0)_0x53333f[_0xd1d928(0x201)](_0x14a044+'\x20failed');return _0x53333f[_0xd1d928(0x201)](_0x4cee23),_0x53333f[_0xd1d928(0x202)](',\x20');}async function getTargetFunctions(_0x56b4ef,_0x9a6e31){const _0x45b4f5=a44_0x25d61a,_0x27e1be=_0x9a6e31[_0x45b4f5(0x22b)](_0x45b4f5(0x235)),_0x3a68dc=_0x9a6e31['str'](_0x45b4f5(0x246)),_0x530d67=normalizeBffType(_0x27e1be)??undefined;if(_0x3a68dc&&!_0x530d67)throw CliErrors[_0x45b4f5(0x23c)](_0x45b4f5(0x1df));const _0x55d27e=await scanLocalBffFunctions(_0x56b4ef,_0x530d67);if(_0x3a68dc){const _0x4fb350=_0x55d27e[_0x45b4f5(0x1f4)](_0x536741=>_0x536741[_0x45b4f5(0x246)]===_0x3a68dc);if(_0x4fb350[_0x45b4f5(0x24e)]===0x0)throw CliErrors[_0x45b4f5(0x23c)](_0x45b4f5(0x22f)+_0x530d67+'/'+_0x3a68dc);return _0x4fb350;}return _0x55d27e;}function existingHookWarning(_0x58c51a){const _0x6522b3=a44_0x25d61a;return{'code':_0x6522b3(0x237),'lockKey':_0x58c51a,'message':'Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.'};}async function buildHookMaps(_0x3b6a12,_0x419361,_0x438576,_0x4bb41c,_0xa5d0f9){const _0x1071ea=a44_0x25d61a,_0xdd64f5=_0x438576[_0x1071ea(0x24d)](_0x277485=>_0x277485[_0x1071ea(0x235)]===_0x1071ea(0x1e1));if(!_0xdd64f5)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0x3d7700=resolveApiModelSource(_0x419361,_0x3b6a12,_0xa5d0f9),_0xd5eb35=loadAliasMap(_0x419361,undefined,_0x3d7700[_0x1071ea(0x1f3)],_0x3d7700[_0x1071ea(0x236)]);assertUnambiguousHookAliases(_0xd5eb35);const _0x34fdbd=[..._0xd5eb35[_0x1071ea(0x245)](_0x21cc59=>[_0x21cc59[_0x1071ea(0x1f8)],_0x21cc59['datasetCode']]),...trackedHookDirectoryMappings(_0x4bb41c)[_0x1071ea(0x245)](_0x15b661=>[_0x15b661[_0x1071ea(0x1f8)],_0x15b661[_0x1071ea(0x24b)]])],_0x2ed8aa=await listDatasets(_0x3b6a12);assertUnambiguousHookDirectoryMappings(_0x34fdbd[_0x1071ea(0x245)](([_0x36536c,_0x1e69ba])=>({'alias':_0x36536c,'datasetCode':_0x1e69ba})));const _0x36eb87=buildHookDirectoryIndexes(_0x2ed8aa,_0x34fdbd),_0x5e4950=new Map(),_0x1dbbc8=preflightPushHookDirectories(_0x438576,_0x4bb41c,_0x36eb87,_0x5e4950),_0x51a39e=new Set(),_0x428510=_0x438576['filter'](_0x6d4699=>_0x5e4950[_0x1071ea(0x20f)](_0x6d4699[_0x1071ea(0x21c)])?.[_0x1071ea(0x22d)](_0x1071ea(0x210))&&_0x4bb41c[_0x1071ea(0x233)][_0x6d4699[_0x1071ea(0x21c)]]?.['remoteId']&&_0x4bb41c[_0x1071ea(0x233)][_0x6d4699[_0x1071ea(0x21c)]]?.[_0x1071ea(0x24b)]);if(_0x428510[_0x1071ea(0x24e)]>0x0){let _0x4d7458;try{_0x4d7458=await getBffScriptStatistics(_0x3b6a12);}catch(_0x29a7d9){for(const _0x464a8b of _0x428510)_0x5e4950[_0x1071ea(0x20e)](_0x464a8b[_0x1071ea(0x21c)],_0x1071ea(0x1ef)+(_0x29a7d9 instanceof Error?_0x29a7d9[_0x1071ea(0x21a)]:String(_0x29a7d9)));return{'resolutions':_0x1dbbc8,'failures':_0x5e4950,'existingHooks':_0x51a39e};}for(const _0x19d525 of _0x428510){const _0x42feb7=_0x4bb41c['functions'][_0x19d525[_0x1071ea(0x21c)]];try{const _0x179b90=new Set(_0x438576[_0x1071ea(0x1f4)](_0x515dc0=>_0x515dc0[_0x1071ea(0x235)]===_0x1071ea(0x1e1)&&_0x4bb41c[_0x1071ea(0x233)][_0x515dc0[_0x1071ea(0x21c)]]?.[_0x1071ea(0x24b)]===_0x42feb7[_0x1071ea(0x24b)])[_0x1071ea(0x245)](_0x4c534a=>_0x4c534a[_0x1071ea(0x1f8)]));if(_0x179b90[_0x1071ea(0x1f5)]>0x1)throw CliErrors[_0x1071ea(0x23c)](_0x1071ea(0x24f));const _0x25120f=_0x4d7458[_0x1071ea(0x1fb)](_0xfe421b=>[{'datasetCode':_0xfe421b[_0x1071ea(0x24b)],'operationType':snakeToCamel(_0xfe421b[_0x1071ea(0x242)]),'functionNode':_0x1071ea(0x211),'id':_0xfe421b[_0x1071ea(0x223)]},{'datasetCode':_0xfe421b[_0x1071ea(0x24b)],'operationType':snakeToCamel(_0xfe421b[_0x1071ea(0x242)]),'functionNode':'after','id':_0xfe421b['afterScriptId']}])[_0x1071ea(0x1f4)](_0x30f7c5=>_0x30f7c5['id']===_0x42feb7[_0x1071ea(0x1ff)]),_0x8d2483=await getBffScriptInfo(_0x42feb7[_0x1071ea(0x1ff)]);if(_0x8d2483['id']!==_0x42feb7['remoteId']||_0x8d2483['appCode']!==_0x3b6a12||_0x8d2483[_0x1071ea(0x243)]!==_0x1071ea(0x1e1)||_0x8d2483[_0x1071ea(0x229)]!==_0x19d525[_0x1071ea(0x246)]||_0x42feb7[_0x1071ea(0x21f)]==null||_0x8d2483[_0x1071ea(0x21f)]!==_0x42feb7['version']||_0x25120f['length']!==0x1||_0x25120f[0x0]['datasetCode']!==_0x42feb7[_0x1071ea(0x24b)]||_0x25120f[0x0][_0x1071ea(0x242)]!==_0x19d525[_0x1071ea(0x242)]||_0x25120f[0x0]['functionNode']!==_0x19d525[_0x1071ea(0x21d)]||_0x42feb7[_0x1071ea(0x242)]!==_0x19d525['operationType']||_0x42feb7[_0x1071ea(0x21d)]!==_0x19d525['functionNode'])throw CliErrors[_0x1071ea(0x23c)](_0x1071ea(0x244));_0x51a39e[_0x1071ea(0x213)](_0x19d525[_0x1071ea(0x21c)]),_0x5e4950[_0x1071ea(0x1eb)](_0x19d525['lockKey']);}catch(_0xac8995){_0x5e4950[_0x1071ea(0x20e)](_0x19d525['lockKey'],_0xac8995 instanceof Error?_0xac8995[_0x1071ea(0x21a)]:String(_0xac8995));}}}return{'resolutions':_0x1dbbc8,'failures':_0x5e4950,'existingHooks':_0x51a39e};}async function uploadSingleFunction(_0x2940cd,_0x431b7e,_0x2ab26a,_0x2800bb){const _0x22aa93=a44_0x25d61a,_0x1b5dda=await readFile(_0x431b7e[_0x22aa93(0x1f3)],'utf8'),_0x300233=await computeFileHash(_0x431b7e[_0x22aa93(0x1f3)]),_0x383846=_0x2ab26a[_0x22aa93(0x233)][_0x431b7e['lockKey']];if(_0x383846?.['remoteId']&&_0x383846[_0x22aa93(0x21f)]==null)throw CliErrors[_0x22aa93(0x23c)](_0x431b7e['lockKey']+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x5195ef=extractScriptDescription(_0x1b5dda);if(!_0x5195ef&&_0x383846?.[_0x22aa93(0x1ff)]){const _0x209ebc=await getBffScriptInfo(_0x383846[_0x22aa93(0x1ff)]);_0x5195ef=_0x209ebc[_0x22aa93(0x21b)]||undefined;}const _0x148ccf={'appCode':_0x2940cd,'functionName':_0x431b7e[_0x22aa93(0x246)],'scriptType':_0x431b7e['type'],'scriptContent':_0x1b5dda};if(_0x383846?.['remoteId'])_0x148ccf['id']=_0x383846[_0x22aa93(0x1ff)];if(_0x383846?.[_0x22aa93(0x21f)]!=null)_0x148ccf[_0x22aa93(0x21f)]=_0x383846[_0x22aa93(0x21f)];if(_0x5195ef)_0x148ccf[_0x22aa93(0x21b)]=_0x5195ef;if(_0x431b7e['type']===_0x22aa93(0x1e1)){const _0x51b7b1=_0x2800bb[_0x22aa93(0x230)]['get'](_0x431b7e['lockKey']);if(!_0x51b7b1&&!_0x2800bb['existingHooks'][_0x22aa93(0x1e6)](_0x431b7e['lockKey'])||!_0x431b7e[_0x22aa93(0x242)]||!_0x431b7e[_0x22aa93(0x21d)])throw CliErrors[_0x22aa93(0x23c)](_0x22aa93(0x1f9)+_0x431b7e[_0x22aa93(0x21c)]);_0x51b7b1&&(_0x148ccf[_0x22aa93(0x240)]=_0x51b7b1['dataset']['id'],_0x148ccf[_0x22aa93(0x242)]=_0x431b7e[_0x22aa93(0x242)]),_0x148ccf[_0x22aa93(0x21d)]=_0x431b7e[_0x22aa93(0x21d)];}const _0x118b8d=await saveBffScript(_0x148ccf),_0x511fb8=_0x118b8d['id'],_0x4643f4=_0x118b8d[_0x22aa93(0x1f7)]??await getBffScriptInfo(_0x511fb8),_0x330508={'hash':_0x300233,'remoteId':_0x511fb8,'version':_0x4643f4['version']};if(_0x431b7e[_0x22aa93(0x235)]===_0x22aa93(0x1e1)){const _0x39e1a7=_0x2800bb['resolutions'][_0x22aa93(0x20f)](_0x431b7e[_0x22aa93(0x21c)]);if(!_0x39e1a7){_0x2ab26a[_0x22aa93(0x233)][_0x431b7e['lockKey']]={..._0x383846,..._0x330508};return;}_0x330508[_0x22aa93(0x1f8)]=_0x39e1a7[_0x22aa93(0x1f8)]??_0x383846?.[_0x22aa93(0x1f8)],_0x330508['datasetCode']=_0x39e1a7['datasetCode'],_0x330508[_0x22aa93(0x242)]=_0x431b7e['operationType'],_0x330508[_0x22aa93(0x21d)]=_0x431b7e[_0x22aa93(0x21d)];}_0x2ab26a[_0x22aa93(0x233)][_0x431b7e[_0x22aa93(0x21c)]]=_0x330508;}function a44_0x5858(){const _0x1c88a5=['--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','every','HOOK','write','1376526ByXrtH','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','review_remote_and_merge','has','Runtime\x20script\x20cache\x20cleared.','scriptsRoot','Push\x20complete:\x20','mergedCli','delete','1114983orHACe','bool','string','Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20','75015ZhXKlz','parse','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','filePath','filter','size','boolean','script','alias','Incomplete\x20HOOK\x20path:\x20','COMMON','flatMap','apps','values','BFF_REMOTE_VERSION_MISSING','remoteId','selectedAppName','push','join','failed','224aimvqF','1511910Ckzvnn','hash','lockFilePath','would_push','failures','763536KNvTBg','\x20skipped','currentApp','\x20resolution','set','get','HOOK_DATASET_NOT_FOUND:','before','Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.','add','warnings','33arypXl','8hfGosU','defaultApp','BFF_REMOTE_VERSION_CHANGED','cleared','message','description','lockKey','functionNode','stringify','version','require','appCode','No\x20local\x20Backend\x20Function\x20scripts\x20found.','beforeScriptId','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','unchanged','bff','status','333517BRBWuy','functionName','Would\x20inspect\x20','str','toISOString','startsWith','requires','Local\x20function\x20not\x20found:\x20','resolutions','apiDir','\x20uploaded','functions','force','type','profileName','EXISTING_HOOK_BINDING_PRESERVED','/api/management/library/scripts/save','\x20--format\x20compress','existingHooks','lastSync','validation','\x20conflict','\x22\x20not\x20found\x20after\x20ensureLockScope.','\x20bff\x20detail\x20--id\x20','datasetId','create','operationType','scriptType','Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.','map','name','update','2dOLWKV','ENDPOINT','runtime\x20cache\x20cleared','datasetCode','4069604ApyxVC','some','length','Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.','attempted'];a44_0x5858=function(){return _0x1c88a5;};return a44_0x5858();}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x790598,_0x3ad7b5,_0x4d0c77){const _0xc42198=a44_0x25d61a;if(_0x4d0c77[_0xc42198(0x24e)]===0x0)return;for(let _0x5acb02=0x0;_0x5acb02<LOCK_SETTLE_RETRY_COUNT;_0x5acb02+=0x1){const _0x5bdc7e=await readBffLockFile(_0x790598),_0x2608b1=_0x5bdc7e?.[_0xc42198(0x1fc)]?.[_0x3ad7b5]?.[_0xc42198(0x233)]??{},_0x5281d5=_0x4d0c77[_0xc42198(0x1e0)](_0x2bb42e=>!!_0x2608b1[_0x2bb42e]?.[_0xc42198(0x1ff)]);if(_0x5281d5)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0x4d0c77[_0xc42198(0x202)](',\x20')+'.');}
|
|
1
|
+
const a44_0x164f90=a44_0x3b1e;(function(_0x4b9bde,_0x1e76b5){const _0x570293=a44_0x3b1e,_0x5638b6=_0x4b9bde();while(!![]){try{const _0x5e0c02=-parseInt(_0x570293(0x1fa))/0x1*(parseInt(_0x570293(0x1ad))/0x2)+parseInt(_0x570293(0x202))/0x3+parseInt(_0x570293(0x1c4))/0x4+parseInt(_0x570293(0x1d4))/0x5+parseInt(_0x570293(0x1ed))/0x6+-parseInt(_0x570293(0x1d1))/0x7*(-parseInt(_0x570293(0x209))/0x8)+-parseInt(_0x570293(0x1b5))/0x9*(parseInt(_0x570293(0x1c0))/0xa);if(_0x5e0c02===_0x1e76b5)break;else _0x5638b6['push'](_0x5638b6['shift']());}catch(_0x3733e5){_0x5638b6['push'](_0x5638b6['shift']());}}}(a44_0x5c78,0xc8dec));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_0x164f90(0x1c6),'command':a44_0x164f90(0x1af),'description':a44_0x164f90(0x1b4),'risk':a44_0x164f90(0x1b7),'structuredErrors':!![],'flags':[{'name':a44_0x164f90(0x1c8),'type':a44_0x164f90(0x1d8),'description':a44_0x164f90(0x1ac),'enum':['COMMON','ENDPOINT',a44_0x164f90(0x1b9)]},{'name':a44_0x164f90(0x1e2),'type':a44_0x164f90(0x1d8),'description':a44_0x164f90(0x20e)},{'name':'force','type':'boolean','description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x334f48){const _0xf65383=a44_0x164f90,_0x4574c0=loadBffProjectConfig(_0x334f48[_0xf65383(0x1a6)]),_0x2d8266=await readBffLockFile(_0x4574c0[_0xf65383(0x1c1)]),{appLock:_0x34bd18}=ensureLockScope(_0x2d8266??createEmptyBffLock(),_0x334f48[_0xf65383(0x1a6)],_0x4574c0['scriptsRoot'],'push'),_0x1cb615=await getTargetFunctions(_0x4574c0,_0x334f48),_0x208203=_0x1cb615['some'](_0x3ff763=>_0x3ff763[_0xf65383(0x1c8)]===_0xf65383(0x1b9))?await scanLocalBffFunctions(_0x4574c0,_0xf65383(0x1b9)):_0x1cb615,_0x4ddb52=await buildHookMaps(_0x334f48['appCode'],_0x334f48[_0xf65383(0x208)],_0x208203,_0x34bd18,_0x334f48[_0xf65383(0x200)]||_0x334f48[_0xf65383(0x1d3)]?.[_0xf65383(0x1e8)]||_0x334f48[_0xf65383(0x1d3)]?.[_0xf65383(0x1ab)]),_0x230565=_0x334f48['bool']('force'),_0x3f64e3=[];for(const _0x2377a8 of _0x1cb615){const _0x951046=await computeFileHash(_0x2377a8[_0xf65383(0x1c9)]),_0x30c475=_0x34bd18['functions'][_0x2377a8[_0xf65383(0x1de)]],_0x46261f=!!_0x30c475&&_0x30c475[_0xf65383(0x20c)]===_0x951046,_0x1fc4ba=_0x4ddb52[_0xf65383(0x1fc)][_0xf65383(0x1d0)](_0x2377a8['lockKey']),_0x362b08=!!_0x30c475?.[_0xf65383(0x1a9)]&&_0x30c475[_0xf65383(0x20a)]==null&&(_0x230565||!_0x46261f),_0x392822=_0x362b08?missingRemoteVersionConflict(_0x2377a8,_0x30c475):undefined,_0x1bfff3=_0x4ddb52['failures'][_0xf65383(0x1b2)](_0x2377a8[_0xf65383(0x1de)])?_0xf65383(0x205):!_0x230565&&_0x46261f?_0xf65383(0x1ec):_0x392822?'conflict':_0xf65383(0x1e9);_0x3f64e3[_0xf65383(0x1af)]({'lockKey':_0x2377a8['lockKey'],'filePath':_0x2377a8[_0xf65383(0x1c9)],'remoteId':_0x30c475?.[_0xf65383(0x1a9)]??null,'mode':_0x30c475?.[_0xf65383(0x1a9)]?'update':_0xf65383(0x204),'status':_0x1bfff3,..._0x4ddb52['failures'][_0xf65383(0x1b2)](_0x2377a8[_0xf65383(0x1de)])?{'error':_0x4ddb52[_0xf65383(0x1e0)][_0xf65383(0x1d0)](_0x2377a8['lockKey'])}:{},..._0x392822?{'conflict':_0x392822}:{},..._0x4ddb52[_0xf65383(0x1c3)][_0xf65383(0x1b2)](_0x2377a8[_0xf65383(0x1de)])?{'datasetCode':_0x30c475?.[_0xf65383(0x1e5)],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x2377a8[_0xf65383(0x1de)])]}:{},..._0x1fc4ba?{'alias':_0x1fc4ba[_0xf65383(0x1a7)]??null,'datasetCode':_0x1fc4ba[_0xf65383(0x1e5)],'operationType':_0x2377a8['operationType'],'functionNode':_0x2377a8[_0xf65383(0x1e6)],'warnings':_0x1fc4ba[_0xf65383(0x1ff)]}:{}});}return{'method':_0xf65383(0x1bc),'url':_0xf65383(0x1cb),'body':{'appCode':_0x334f48['appCode'],'force':_0x230565,'files':_0x3f64e3,'cacheClearAtRuntime':_0x3f64e3[_0xf65383(0x1a8)](_0x25227e=>_0x25227e['status']===_0xf65383(0x1e9)),'cacheClearAtRuntimeTimes':_0x3f64e3[_0xf65383(0x1a8)](_0x4c0aeb=>_0x4c0aeb[_0xf65383(0x1f7)]===_0xf65383(0x1e9))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0xf65383(0x203)+_0x3f64e3[_0xf65383(0x1da)]+'\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded'};},async 'execute'(_0x201f51){const _0x2eff7f=a44_0x164f90,_0x4cc668=loadBffProjectConfig(_0x201f51[_0x2eff7f(0x1a6)]),_0x2f85fb=await readBffLockFile(_0x4cc668[_0x2eff7f(0x1c1)]),{lockData:_0x4c02e8,appLock:_0x1cf9b1}=ensureLockScope(_0x2f85fb??createEmptyBffLock(),_0x201f51[_0x2eff7f(0x1a6)],_0x4cc668[_0x2eff7f(0x1b0)],_0x2eff7f(0x1af)),_0x405509=await getTargetFunctions(_0x4cc668,_0x201f51);if(_0x405509[_0x2eff7f(0x1da)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':_0x2eff7f(0x1dc)};const _0x5e585d=_0x201f51['bool'](_0x2eff7f(0x1d6)),_0x4a484c=JSON[_0x2eff7f(0x1df)](JSON[_0x2eff7f(0x1d7)](_0x4c02e8)),_0x94acb6=_0x4a484c[_0x2eff7f(0x201)][_0x201f51[_0x2eff7f(0x1a6)]];if(!_0x94acb6)throw new Error(_0x2eff7f(0x1e7)+_0x201f51[_0x2eff7f(0x1a6)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x1d41e7=_0x405509[_0x2eff7f(0x1a8)](_0x5a0a9a=>_0x5a0a9a['type']===_0x2eff7f(0x1b9))?await scanLocalBffFunctions(_0x4cc668,_0x2eff7f(0x1b9)):_0x405509,_0x261686=await buildHookMaps(_0x201f51['appCode'],_0x201f51[_0x2eff7f(0x208)],_0x1d41e7,_0x94acb6,_0x201f51[_0x2eff7f(0x200)]||_0x201f51[_0x2eff7f(0x1d3)]?.[_0x2eff7f(0x1e8)]||_0x201f51[_0x2eff7f(0x1d3)]?.[_0x2eff7f(0x1ab)]),_0x280cdb=[],_0xdf338a=[],_0x16d8c2=[],_0x20444c=[];for(const _0x4fc1f6 of _0x405509){const _0x55013e=_0x261686[_0x2eff7f(0x1e0)][_0x2eff7f(0x1d0)](_0x4fc1f6['lockKey']);if(_0x55013e){_0x20444c[_0x2eff7f(0x1af)]({'lockKey':_0x4fc1f6[_0x2eff7f(0x1de)],'error':_0x55013e});continue;}const _0x31bb6f=await computeFileHash(_0x4fc1f6[_0x2eff7f(0x1c9)]),_0x2875b7=_0x94acb6[_0x2eff7f(0x1ce)][_0x4fc1f6[_0x2eff7f(0x1de)]];if(!_0x5e585d&&_0x2875b7&&_0x2875b7[_0x2eff7f(0x20c)]===_0x31bb6f){_0xdf338a[_0x2eff7f(0x1af)]({'lockKey':_0x4fc1f6[_0x2eff7f(0x1de)],'reason':'unchanged'});continue;}if(_0x2875b7?.[_0x2eff7f(0x1a9)]&&_0x2875b7[_0x2eff7f(0x20a)]==null){_0x16d8c2[_0x2eff7f(0x1af)](missingRemoteVersionConflict(_0x4fc1f6,_0x2875b7));continue;}try{await uploadSingleFunction(_0x201f51[_0x2eff7f(0x1a6)],_0x4fc1f6,_0x94acb6,_0x261686);const _0x1a4395=_0x94acb6[_0x2eff7f(0x1ce)][_0x4fc1f6['lockKey']];_0x280cdb['push']({'lockKey':_0x4fc1f6[_0x2eff7f(0x1de)],'remoteId':_0x1a4395?.[_0x2eff7f(0x1a9)]??0x0});}catch(_0x595fa4){const _0x1f9788=remoteVersionChangedConflict(_0x4fc1f6,_0x2875b7,_0x595fa4);if(_0x1f9788){_0x16d8c2[_0x2eff7f(0x1af)](_0x1f9788);continue;}_0x20444c[_0x2eff7f(0x1af)]({'lockKey':_0x4fc1f6['lockKey'],'error':_0x595fa4 instanceof Error?_0x595fa4[_0x2eff7f(0x1bf)]:String(_0x595fa4)});}}_0x94acb6[_0x2eff7f(0x1e3)]=new Date()['toISOString'](),await writeBffLockFile(_0x4cc668[_0x2eff7f(0x1c1)],_0x4a484c),await waitForUploadedLockEntries(_0x4cc668[_0x2eff7f(0x1c1)],_0x201f51['appCode'],_0x280cdb[_0x2eff7f(0x1c2)](_0x5ee4ed=>_0x5ee4ed[_0x2eff7f(0x1de)]));let _0x341e39={'attempted':![],'cleared':![]};if(_0x280cdb[_0x2eff7f(0x1da)]>0x0)try{let _0x335050='';for(let _0x5051c2=0x0;_0x5051c2<CACHE_CLEAR_ATTEMPTS;_0x5051c2+=0x1){_0x335050=await clearBffScriptCache(),_0x5051c2<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x341e39={'attempted':!![],'cleared':!![],'message':_0x335050||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0x92ba0){_0x341e39={'attempted':!![],'cleared':![],'error':_0x92ba0 instanceof Error?_0x92ba0[_0x2eff7f(0x1bf)]:String(_0x92ba0)};}const _0x3b3cf5=_0x20444c[_0x2eff7f(0x1da)]===0x0&&(_0x341e39['attempted']?_0x341e39[_0x2eff7f(0x1f5)]:!![]),_0x5ab827=_0x3b3cf5,_0x5437ab=_0x341e39[_0x2eff7f(0x20b)]?_0x341e39[_0x2eff7f(0x1f5)]?_0x2eff7f(0x1c7):_0x2eff7f(0x1cf):'runtime\x20cache\x20not\x20needed';return{'ok':_0x5ab827,'data':{'uploaded':_0x280cdb,'skipped':_0xdf338a,'conflicts':_0x16d8c2,'failed':_0x20444c,'cacheClear':_0x341e39,'warnings':[...[..._0x261686[_0x2eff7f(0x1fc)][_0x2eff7f(0x1f6)]()][_0x2eff7f(0x1f2)](_0x9f755=>_0x9f755['warnings']),...[..._0x261686[_0x2eff7f(0x1c3)]][_0x2eff7f(0x1c2)](existingHookWarning)]},'message':formatPushMessage(_0x280cdb['length'],_0xdf338a[_0x2eff7f(0x1da)],_0x16d8c2[_0x2eff7f(0x1da)],_0x20444c[_0x2eff7f(0x1da)],_0x5437ab)};}};function missingRemoteVersionConflict(_0x15818e,_0x348488){const _0x277abe=a44_0x164f90;return remoteVersionConflict(_0x15818e,_0x348488,_0x277abe(0x1ba),_0x277abe(0x1f1));}function a44_0x5c78(){const _0x1e2b79=['write','every','HOOK','BFF_REMOTE_VERSION_MISSING','description','POST','str','EXISTING_HOOK_BINDING_PRESERVED','message','4820OEaaFX','lockFilePath','map','existingHooks','1375984RvXVXf','\x20bff\x20detail\x20--id\x20','bff','runtime\x20cache\x20cleared','type','filePath','require','/api/management/library/scripts/save','startsWith','size','functions','runtime\x20cache\x20clear\x20failed','get','2044VWwIOQ','set','mergedCli','7964465mYyLBN','utf8','force','stringify','string','scriptType','length','Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.','No\x20local\x20Backend\x20Function\x20scripts\x20found.','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.','lockKey','parse','failures','filter','name','lastSync','beforeScriptId','datasetCode','functionNode','Lock\x20scope\x20for\x20app\x20\x22','currentApp','would_push','review_remote_and_merge','Local\x20function\x20not\x20found:\x20','unchanged','4044354MnIsgW','dataset','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','flatMap','operationType','datasetId','cleared','values','status','Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.','HOOK_DATASET_NOT_FOUND:','694770HihVrQ','\x20failed','resolutions','Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.','test','warnings','selectedAppName','apps','3307506kfiHXx','Would\x20inspect\x20','create','failed','join','delete','apiDir','23904RpUTGr','version','attempted','hash','Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','script','appCode','alias','some','remoteId','profileName','defaultApp','Push\x20only\x20this\x20script\x20type','2QdpDdQ','validation','push','scriptsRoot','requires','has','Push\x20complete:\x20','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','57294IKKXNj','\x20conflict'];a44_0x5c78=function(){return _0x1e2b79;};return a44_0x5c78();}function remoteVersionChangedConflict(_0x201e39,_0x400460,_0x58cff0){const _0x3b3e5b=a44_0x164f90;if(!_0x400460?.['remoteId']||_0x400460[_0x3b3e5b(0x20a)]==null||!isRemoteVersionConflict(_0x58cff0))return undefined;return remoteVersionConflict(_0x201e39,_0x400460,'BFF_REMOTE_VERSION_CHANGED',_0x3b3e5b(0x20d));}function remoteVersionConflict(_0x57f92f,_0x2f7a3f,_0x253f57,_0x445709){const _0x321dfc=a44_0x164f90;return{'code':_0x253f57,'lockKey':_0x57f92f[_0x321dfc(0x1de)],'filePath':_0x57f92f[_0x321dfc(0x1c9)],'remoteId':_0x2f7a3f[_0x321dfc(0x1a9)],..._0x2f7a3f['version']!=null?{'expectedVersion':_0x2f7a3f[_0x321dfc(0x20a)]}:{},'message':_0x445709,'nextAction':{'action':_0x321dfc(0x1ea),'command':CLI_BIN_NAME+_0x321dfc(0x1c5)+_0x2f7a3f[_0x321dfc(0x1a9)]+'\x20--format\x20compress','requiresReview':!![],'message':_0x321dfc(0x1dd)}};}function isRemoteVersionConflict(_0x52ec64){const _0x23b43a=a44_0x164f90,_0xc64312=_0x52ec64 instanceof Error?_0x52ec64['message']:String(_0x52ec64),_0x1ece3c=getPlatformErrorCode(_0x52ec64)??'';return[_0xc64312,_0x1ece3c][_0x23b43a(0x1a8)](_0x599ac1=>/(?: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[_0x23b43a(0x1fe)](_0x599ac1));}function formatPushMessage(_0x1d05e2,_0xcdbdc9,_0x56a618,_0x8553c9,_0x2ef957){const _0x40d41d=a44_0x164f90,_0xed0b3e=[_0x40d41d(0x1b3)+_0x1d05e2+'\x20uploaded',_0xcdbdc9+'\x20skipped'];_0x56a618>0x0&&_0xed0b3e[_0x40d41d(0x1af)](_0x56a618+_0x40d41d(0x1b6)+(_0x56a618===0x1?'':'s')+'\x20'+(_0x56a618===0x1?_0x40d41d(0x1b1):_0x40d41d(0x1ca))+'\x20resolution');if(_0x8553c9>0x0)_0xed0b3e['push'](_0x8553c9+_0x40d41d(0x1fb));return _0xed0b3e[_0x40d41d(0x1af)](_0x2ef957),_0xed0b3e[_0x40d41d(0x206)](',\x20');}async function getTargetFunctions(_0x43d45e,_0x54f2bb){const _0x515b89=a44_0x164f90,_0x118eab=_0x54f2bb[_0x515b89(0x1bd)]('type'),_0x4f0398=_0x54f2bb['str']('name'),_0x1891fa=normalizeBffType(_0x118eab)??undefined;if(_0x4f0398&&!_0x1891fa)throw CliErrors[_0x515b89(0x1ae)]('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x306fed=await scanLocalBffFunctions(_0x43d45e,_0x1891fa);if(_0x4f0398){const _0x314637=_0x306fed[_0x515b89(0x1e1)](_0x6c499d=>_0x6c499d[_0x515b89(0x1e2)]===_0x4f0398);if(_0x314637['length']===0x0)throw CliErrors['validation'](_0x515b89(0x1eb)+_0x1891fa+'/'+_0x4f0398);return _0x314637;}return _0x306fed;}function a44_0x3b1e(_0x4057ba,_0x42ca4f){_0x4057ba=_0x4057ba-0x1a5;const _0x5c78fc=a44_0x5c78();let _0x3b1e97=_0x5c78fc[_0x4057ba];return _0x3b1e97;}function existingHookWarning(_0x5051e8){const _0x3a57f8=a44_0x164f90;return{'code':_0x3a57f8(0x1be),'lockKey':_0x5051e8,'message':_0x3a57f8(0x1db)};}async function buildHookMaps(_0x5f4f46,_0x419b46,_0x3cf354,_0xc763cb,_0x65c42){const _0x5f463e=a44_0x164f90,_0x215bf1=_0x3cf354[_0x5f463e(0x1a8)](_0x2747c5=>_0x2747c5[_0x5f463e(0x1c8)]===_0x5f463e(0x1b9));if(!_0x215bf1)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0xd82059=resolveApiModelSource(_0x419b46,_0x5f4f46,_0x65c42),_0x222eac=loadAliasMap(_0x419b46,undefined,_0xd82059[_0x5f463e(0x1c9)],_0xd82059[_0x5f463e(0x1aa)]);assertUnambiguousHookAliases(_0x222eac);const _0x26bff0=[..._0x222eac[_0x5f463e(0x1c2)](_0x4700e=>[_0x4700e['alias'],_0x4700e[_0x5f463e(0x1e5)]]),...trackedHookDirectoryMappings(_0xc763cb)[_0x5f463e(0x1c2)](_0x470aa8=>[_0x470aa8[_0x5f463e(0x1a7)],_0x470aa8['datasetCode']])],_0x3e1408=await listDatasets(_0x5f4f46);assertUnambiguousHookDirectoryMappings(_0x26bff0['map'](([_0x432227,_0x1b99fe])=>({'alias':_0x432227,'datasetCode':_0x1b99fe})));const _0x19561e=buildHookDirectoryIndexes(_0x3e1408,_0x26bff0),_0x2bbd03=new Map(),_0x104eed=preflightPushHookDirectories(_0x3cf354,_0xc763cb,_0x19561e,_0x2bbd03),_0x7c8fb=new Set(),_0x3fcdcc=_0x3cf354[_0x5f463e(0x1e1)](_0x470232=>_0x2bbd03[_0x5f463e(0x1d0)](_0x470232[_0x5f463e(0x1de)])?.[_0x5f463e(0x1cc)](_0x5f463e(0x1f9))&&_0xc763cb[_0x5f463e(0x1ce)][_0x470232['lockKey']]?.[_0x5f463e(0x1a9)]&&_0xc763cb[_0x5f463e(0x1ce)][_0x470232[_0x5f463e(0x1de)]]?.[_0x5f463e(0x1e5)]);if(_0x3fcdcc[_0x5f463e(0x1da)]>0x0){let _0x2d3ec0;try{_0x2d3ec0=await getBffScriptStatistics(_0x5f4f46);}catch(_0x22846a){for(const _0x5eeb3e of _0x3fcdcc)_0x2bbd03[_0x5f463e(0x1d2)](_0x5eeb3e[_0x5f463e(0x1de)],_0x5f463e(0x1f0)+(_0x22846a instanceof Error?_0x22846a[_0x5f463e(0x1bf)]:String(_0x22846a)));return{'resolutions':_0x104eed,'failures':_0x2bbd03,'existingHooks':_0x7c8fb};}for(const _0xd9a53f of _0x3fcdcc){const _0x37364e=_0xc763cb['functions'][_0xd9a53f['lockKey']];try{const _0x26874d=new Set(_0x3cf354['filter'](_0x2d8c9a=>_0x2d8c9a[_0x5f463e(0x1c8)]===_0x5f463e(0x1b9)&&_0xc763cb['functions'][_0x2d8c9a['lockKey']]?.[_0x5f463e(0x1e5)]===_0x37364e['datasetCode'])[_0x5f463e(0x1c2)](_0x2abed0=>_0x2abed0[_0x5f463e(0x1a7)]));if(_0x26874d[_0x5f463e(0x1cd)]>0x1)throw CliErrors[_0x5f463e(0x1ae)](_0x5f463e(0x1f8));const _0x3c1938=_0x2d3ec0[_0x5f463e(0x1f2)](_0x55e79f=>[{'datasetCode':_0x55e79f[_0x5f463e(0x1e5)],'operationType':snakeToCamel(_0x55e79f[_0x5f463e(0x1f3)]),'functionNode':'before','id':_0x55e79f[_0x5f463e(0x1e4)]},{'datasetCode':_0x55e79f[_0x5f463e(0x1e5)],'operationType':snakeToCamel(_0x55e79f['operationType']),'functionNode':'after','id':_0x55e79f['afterScriptId']}])[_0x5f463e(0x1e1)](_0x2916e9=>_0x2916e9['id']===_0x37364e['remoteId']),_0x3e0e9b=await getBffScriptInfo(_0x37364e['remoteId']);if(_0x3e0e9b['id']!==_0x37364e['remoteId']||_0x3e0e9b[_0x5f463e(0x1a6)]!==_0x5f4f46||_0x3e0e9b[_0x5f463e(0x1d9)]!=='HOOK'||_0x3e0e9b['functionName']!==_0xd9a53f[_0x5f463e(0x1e2)]||_0x37364e[_0x5f463e(0x20a)]==null||_0x3e0e9b[_0x5f463e(0x20a)]!==_0x37364e[_0x5f463e(0x20a)]||_0x3c1938['length']!==0x1||_0x3c1938[0x0][_0x5f463e(0x1e5)]!==_0x37364e[_0x5f463e(0x1e5)]||_0x3c1938[0x0]['operationType']!==_0xd9a53f[_0x5f463e(0x1f3)]||_0x3c1938[0x0][_0x5f463e(0x1e6)]!==_0xd9a53f[_0x5f463e(0x1e6)]||_0x37364e[_0x5f463e(0x1f3)]!==_0xd9a53f[_0x5f463e(0x1f3)]||_0x37364e[_0x5f463e(0x1e6)]!==_0xd9a53f[_0x5f463e(0x1e6)])throw CliErrors[_0x5f463e(0x1ae)](_0x5f463e(0x1fd));_0x7c8fb['add'](_0xd9a53f[_0x5f463e(0x1de)]),_0x2bbd03[_0x5f463e(0x207)](_0xd9a53f[_0x5f463e(0x1de)]);}catch(_0x290f24){_0x2bbd03[_0x5f463e(0x1d2)](_0xd9a53f[_0x5f463e(0x1de)],_0x290f24 instanceof Error?_0x290f24[_0x5f463e(0x1bf)]:String(_0x290f24));}}}return{'resolutions':_0x104eed,'failures':_0x2bbd03,'existingHooks':_0x7c8fb};}async function uploadSingleFunction(_0x2e26b6,_0x1fb1dc,_0x4be32e,_0xc4fdd8){const _0x3d25fd=a44_0x164f90,_0x16ba81=await readFile(_0x1fb1dc[_0x3d25fd(0x1c9)],_0x3d25fd(0x1d5)),_0x29bd2c=await computeFileHash(_0x1fb1dc[_0x3d25fd(0x1c9)]),_0x5bd93d=_0x4be32e[_0x3d25fd(0x1ce)][_0x1fb1dc[_0x3d25fd(0x1de)]];if(_0x5bd93d?.[_0x3d25fd(0x1a9)]&&_0x5bd93d[_0x3d25fd(0x20a)]==null)throw CliErrors[_0x3d25fd(0x1ae)](_0x1fb1dc[_0x3d25fd(0x1de)]+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x543f80=extractScriptDescription(_0x16ba81);if(!_0x543f80&&_0x5bd93d?.[_0x3d25fd(0x1a9)]){const _0xf81fa1=await getBffScriptInfo(_0x5bd93d['remoteId']);_0x543f80=_0xf81fa1[_0x3d25fd(0x1bb)]||undefined;}const _0x37bb80={'appCode':_0x2e26b6,'functionName':_0x1fb1dc[_0x3d25fd(0x1e2)],'scriptType':_0x1fb1dc[_0x3d25fd(0x1c8)],'scriptContent':_0x16ba81};if(_0x5bd93d?.[_0x3d25fd(0x1a9)])_0x37bb80['id']=_0x5bd93d[_0x3d25fd(0x1a9)];if(_0x5bd93d?.[_0x3d25fd(0x20a)]!=null)_0x37bb80['version']=_0x5bd93d[_0x3d25fd(0x20a)];if(_0x543f80)_0x37bb80[_0x3d25fd(0x1bb)]=_0x543f80;if(_0x1fb1dc[_0x3d25fd(0x1c8)]===_0x3d25fd(0x1b9)){const _0x5ce89e=_0xc4fdd8['resolutions'][_0x3d25fd(0x1d0)](_0x1fb1dc[_0x3d25fd(0x1de)]);if(!_0x5ce89e&&!_0xc4fdd8[_0x3d25fd(0x1c3)][_0x3d25fd(0x1b2)](_0x1fb1dc[_0x3d25fd(0x1de)])||!_0x1fb1dc[_0x3d25fd(0x1f3)]||!_0x1fb1dc['functionNode'])throw CliErrors['validation']('Incomplete\x20HOOK\x20path:\x20'+_0x1fb1dc[_0x3d25fd(0x1de)]);_0x5ce89e&&(_0x37bb80[_0x3d25fd(0x1f4)]=_0x5ce89e[_0x3d25fd(0x1ee)]['id'],_0x37bb80[_0x3d25fd(0x1f3)]=_0x1fb1dc[_0x3d25fd(0x1f3)]),_0x37bb80['functionNode']=_0x1fb1dc[_0x3d25fd(0x1e6)];}const _0x1d4d9d=await saveBffScript(_0x37bb80),_0x4cc242=_0x1d4d9d['id'],_0x30da2b=_0x1d4d9d[_0x3d25fd(0x1a5)]??await getBffScriptInfo(_0x4cc242),_0x4876d5={'hash':_0x29bd2c,'remoteId':_0x4cc242,'version':_0x30da2b[_0x3d25fd(0x20a)]};if(_0x1fb1dc[_0x3d25fd(0x1c8)]==='HOOK'){const _0x2d4953=_0xc4fdd8[_0x3d25fd(0x1fc)][_0x3d25fd(0x1d0)](_0x1fb1dc[_0x3d25fd(0x1de)]);if(!_0x2d4953){_0x4be32e['functions'][_0x1fb1dc[_0x3d25fd(0x1de)]]={..._0x5bd93d,..._0x4876d5};return;}_0x4876d5[_0x3d25fd(0x1a7)]=_0x2d4953[_0x3d25fd(0x1a7)]??_0x5bd93d?.[_0x3d25fd(0x1a7)],_0x4876d5[_0x3d25fd(0x1e5)]=_0x2d4953[_0x3d25fd(0x1e5)],_0x4876d5[_0x3d25fd(0x1f3)]=_0x1fb1dc[_0x3d25fd(0x1f3)],_0x4876d5[_0x3d25fd(0x1e6)]=_0x1fb1dc[_0x3d25fd(0x1e6)];}_0x4be32e[_0x3d25fd(0x1ce)][_0x1fb1dc[_0x3d25fd(0x1de)]]=_0x4876d5;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x40ddae,_0x1d1856,_0x454bdf){const _0x4024bb=a44_0x164f90;if(_0x454bdf['length']===0x0)return;for(let _0x46b719=0x0;_0x46b719<LOCK_SETTLE_RETRY_COUNT;_0x46b719+=0x1){const _0x240edb=await readBffLockFile(_0x40ddae),_0x10b29a=_0x240edb?.['apps']?.[_0x1d1856]?.[_0x4024bb(0x1ce)]??{},_0x117433=_0x454bdf[_0x4024bb(0x1b8)](_0x36a7c0=>!!_0x10b29a[_0x36a7c0]?.[_0x4024bb(0x1a9)]);if(_0x117433)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x4024bb(0x1ef)+_0x454bdf[_0x4024bb(0x206)](',\x20')+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a45_0x380807=a45_0x2ca1;(function(_0xb27169,_0x460528){const _0x3330c7=a45_0x2ca1,_0x2c647c=_0xb27169();while(!![]){try{const _0x4b4030=parseInt(_0x3330c7(0xc4))/0x1*(-parseInt(_0x3330c7(0xbe))/0x2)+parseInt(_0x3330c7(0xb6))/0x3*(parseInt(_0x3330c7(0xcc))/0x4)+parseInt(_0x3330c7(0xb7))/0x5+parseInt(_0x3330c7(0xc7))/0x6*(-parseInt(_0x3330c7(0xc9))/0x7)+-parseInt(_0x3330c7(0xcf))/0x8*(parseInt(_0x3330c7(0xb2))/0x9)+parseInt(_0x3330c7(0xbd))/0xa*(parseInt(_0x3330c7(0xc5))/0xb)+-parseInt(_0x3330c7(0xad))/0xc*(-parseInt(_0x3330c7(0xca))/0xd);if(_0x4b4030===_0x460528)break;else _0x2c647c['push'](_0x2c647c['shift']());}catch(_0x5b63a2){_0x2c647c['push'](_0x2c647c['shift']());}}}(a45_0x35e5,0xe560f));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';function a45_0x2ca1(_0x2a0112,_0x1e3992){_0x2a0112=_0x2a0112-0xac;const _0x35e597=a45_0x35e5();let _0x2ca1fb=_0x35e597[_0x2a0112];return _0x2ca1fb;}function a45_0x35e5(){const _0x351533=['All\x20Backend\x20Function\x20scripts\x20are\x20in\x20sync.','lockKey','2260THFrIZ','2828552TwOvRW','apiDir','map','status','has','currentApp','1XxGLbZ','51271huVaMY','mergedCli','5268408QMHSaJ','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','7OcEztg','9972157cxgIRi','Check\x20local\x20Backend\x20Function\x20sync\x20status\x20against\x20lock\x20file','18524EPJFET','appCode','filePath','216ToaxCa','boolean','hash','push','selectedAppName','lockFilePath','12IVNszJ','length','scriptsRoot','\x20modified,\x20','all','520731efcrXN','remote','profileName','functions','798mWTyJz','8708755UEwoSJ','\x20remote-only','defaultApp','bool'];a45_0x35e5=function(){return _0x351533;};return a45_0x35e5();}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_0x380807(0xc1),'description':a45_0x380807(0xcb),'risk':'read','flags':[{'name':'remote','type':a45_0x380807(0xd0),'description':a45_0x380807(0xc8)}],async 'execute'(_0xdf98a1){const _0x1fb107=a45_0x380807,_0x26844b=loadBffProjectConfig(_0xdf98a1['appCode']),_0xed66fa=await readBffLockFile(_0x26844b[_0x1fb107(0xac)]),{appLock:_0x2b6373}=ensureLockScope(_0xed66fa??createEmptyBffLock(),_0xdf98a1[_0x1fb107(0xcd)],_0x26844b[_0x1fb107(0xaf)],_0x1fb107(0xc1)),_0x4aafa7=await scanLocalBffFunctions(_0x26844b),_0x550c52=[],_0x5d372e=[],_0x43ee12=[];for(const _0x19a98a of _0x4aafa7){const _0x50cef6=await computeFileHash(_0x19a98a[_0x1fb107(0xce)]),_0xb54b30=_0x2b6373[_0x1fb107(0xb5)][_0x19a98a['lockKey']];if(!_0xb54b30)_0x550c52[_0x1fb107(0xd2)](_0x19a98a['lockKey']);else _0xb54b30[_0x1fb107(0xd1)]!==_0x50cef6?_0x5d372e[_0x1fb107(0xd2)](_0x19a98a[_0x1fb107(0xbc)]):_0x43ee12[_0x1fb107(0xd2)](_0x19a98a[_0x1fb107(0xbc)]);}const _0x11dc9f=[];if(_0xdf98a1[_0x1fb107(0xba)](_0x1fb107(0xb3))){const _0x46367a=resolveApiModelSource(_0xdf98a1['apiDir'],_0xdf98a1[_0x1fb107(0xcd)],_0xdf98a1[_0x1fb107(0xd3)]||_0xdf98a1[_0x1fb107(0xc6)]?.[_0x1fb107(0xc3)]||_0xdf98a1[_0x1fb107(0xc6)]?.[_0x1fb107(0xb9)]),_0x403e83=loadAliasMap(_0xdf98a1[_0x1fb107(0xbf)],undefined,_0x46367a[_0x1fb107(0xce)],_0x46367a[_0x1fb107(0xb4)]),_0x32581d=new Map(_0x403e83['map'](_0xda1838=>[_0xda1838['datasetCode'],_0xda1838['alias']])),[_0x22892a,_0x5f5d9f]=await Promise[_0x1fb107(0xb1)]([listBffScripts(_0xdf98a1[_0x1fb107(0xcd)]),getBffScriptStatistics(_0xdf98a1[_0x1fb107(0xcd)])]),_0x5b1e38=createHookLocationMap(_0x5f5d9f),_0x4954e4=new Set(_0x4aafa7[_0x1fb107(0xc0)](_0x57c2be=>_0x57c2be['lockKey']));for(const _0x11c85e of _0x22892a){const _0x442edf=resolveRemoteScriptTarget(_0x26844b,_0x11c85e,_0x5b1e38,_0x2b6373['functions'],_0x32581d);_0x442edf&&!_0x4954e4[_0x1fb107(0xc2)](_0x442edf[_0x1fb107(0xbc)])&&_0x11dc9f[_0x1fb107(0xd2)](_0x442edf[_0x1fb107(0xbc)]);}}const _0x5c209b=_0x550c52[_0x1fb107(0xae)]===0x0&&_0x5d372e[_0x1fb107(0xae)]===0x0&&_0x11dc9f[_0x1fb107(0xae)]===0x0;return{'ok':!![],'data':{'added':_0x550c52,'modified':_0x5d372e,'unchanged':_0x43ee12,'remoteOnly':_0x11dc9f},'message':_0x5c209b?_0x1fb107(0xbb):_0x550c52[_0x1fb107(0xae)]+'\x20added,\x20'+_0x5d372e[_0x1fb107(0xae)]+_0x1fb107(0xb0)+_0x43ee12[_0x1fb107(0xae)]+'\x20unchanged'+(_0x11dc9f[_0x1fb107(0xae)]>0x0?',\x20'+_0x11dc9f[_0x1fb107(0xae)]+_0x1fb107(0xb8):'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a46_0x2e17e4=a46_0x50b1;(function(_0x3785c2,_0x34f6d6){const _0x1d5e96=a46_0x50b1,_0x123102=_0x3785c2();while(!![]){try{const _0x23e7ac=parseInt(_0x1d5e96(0x112))/0x1*(parseInt(_0x1d5e96(0x113))/0x2)+-parseInt(_0x1d5e96(0x106))/0x3+parseInt(_0x1d5e96(0x120))/0x4+-parseInt(_0x1d5e96(0x10f))/0x5+parseInt(_0x1d5e96(0x11c))/0x6+parseInt(_0x1d5e96(0x11d))/0x7*(parseInt(_0x1d5e96(0x11f))/0x8)+-parseInt(_0x1d5e96(0x114))/0x9*(parseInt(_0x1d5e96(0x10e))/0xa);if(_0x23e7ac===_0x34f6d6)break;else _0x123102['push'](_0x123102['shift']());}catch(_0x45d59f){_0x123102['push'](_0x123102['shift']());}}}(a46_0x29d0,0xe6eee));function a46_0x29d0(){const _0x25de2d=['4873545dJpbvp','\x20installed','installedPath','unknown','pipe','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.','\x20at\x20','repairCommand','2453016QPgTAt','1828008oFdYVF','cli-skill-install','40DYivvs','6781168nGBowd','setLogPath','skillVersion','1369467HcHNIV','Built-in\x20Skill\x20install\x20failed\x20[','info','changed','code','install','inherit','error','30vXvFVO','2459045MtdfvM','CLI\x20Built-in\x20Skill\x20',']:\x20','1DCOSrF','217734znbrFE'];a46_0x29d0=function(){return _0x25de2d;};return a46_0x29d0();}import{CliErrors}from'../../errors.js';function a46_0x50b1(_0x18d407,_0x374d92){_0x18d407=_0x18d407-0x106;const _0x29d063=a46_0x29d0();let _0x50b1f2=_0x29d063[_0x18d407];return _0x50b1f2;}import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':'cli-skill','command':a46_0x2e17e4(0x10b),'description':'Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x33940c){const _0x1925f5=a46_0x2e17e4;logger[_0x1925f5(0x121)](process['cwd']()),logger[_0x1925f5(0x108)](_0x1925f5(0x11e),_0x1925f5(0x119));const _0x24c3fa=installBuiltinSkill({'stdio':_0x33940c['nonInteractive']?_0x1925f5(0x118):_0x1925f5(0x10c)});if(!_0x24c3fa['ok'])throw CliErrors['apiError'](_0x1925f5(0x107)+_0x24c3fa[_0x1925f5(0x10a)]+_0x1925f5(0x111)+(_0x24c3fa[_0x1925f5(0x10d)]||_0x1925f5(0x117)),'Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20'+_0x24c3fa[_0x1925f5(0x11b)]);return console['log'](_0x24c3fa[_0x1925f5(0x109)]?_0x1925f5(0x110)+_0x24c3fa[_0x1925f5(0x122)]+_0x1925f5(0x115)+(_0x24c3fa[_0x1925f5(0x116)]?_0x1925f5(0x11a)+_0x24c3fa[_0x1925f5(0x116)]:'\x20via\x20skills@latest'):_0x1925f5(0x110)+_0x24c3fa[_0x1925f5(0x122)]+'\x20is\x20already\x20current'+(_0x24c3fa[_0x1925f5(0x116)]?_0x1925f5(0x11a)+_0x24c3fa[_0x1925f5(0x116)]:'')),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a47_0x475063=a47_0x3f3b;(function(_0x64c62,_0x130b97){const _0x2ab167=a47_0x3f3b,_0x4cc25b=_0x64c62();while(!![]){try{const _0x441bd4=parseInt(_0x2ab167(0x102))/0x1*(parseInt(_0x2ab167(0x153))/0x2)+-parseInt(_0x2ab167(0x136))/0x3*(parseInt(_0x2ab167(0x105))/0x4)+parseInt(_0x2ab167(0x11c))/0x5*(parseInt(_0x2ab167(0x10b))/0x6)+parseInt(_0x2ab167(0x125))/0x7+parseInt(_0x2ab167(0x143))/0x8*(-parseInt(_0x2ab167(0x11a))/0x9)+parseInt(_0x2ab167(0x13a))/0xa*(-parseInt(_0x2ab167(0x13b))/0xb)+parseInt(_0x2ab167(0xfd))/0xc*(-parseInt(_0x2ab167(0x123))/0xd);if(_0x441bd4===_0x130b97)break;else _0x4cc25b['push'](_0x4cc25b['shift']());}catch(_0x59bcf8){_0x4cc25b['push'](_0x4cc25b['shift']());}}}(a47_0x39e7,0x74768));import a47_0x15b6ed from'chalk';import a47_0x620eca from'ora';import a47_0x2d3743 from'semver';function a47_0x3f3b(_0x453277,_0x2fb6ab){_0x453277=_0x453277-0xfb;const _0x39e715=a47_0x39e7();let _0x3f3bc0=_0x39e715[_0x453277];return _0x3f3bc0;}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 _0x157c3c=a47_0x3f3b;return GIT_COMMIT!==_0x157c3c(0x112)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x157c3c(0x118)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x3a1cb9=a47_0x3f3b,_0x2dc873=process[_0x3a1cb9(0x101)][_0x3a1cb9(0x12c)]();if(_0x2dc873[_0x3a1cb9(0x121)](_0x3a1cb9(0x133)))return _0x3a1cb9(0x133);return _0x3a1cb9(0x10c);}const updateFlags=[{'name':'beta','type':'boolean','description':a47_0x475063(0x12d),'default':![]},{'name':a47_0x475063(0x12a),'type':a47_0x475063(0x120),'description':a47_0x475063(0x13f)}];function getRequestedVersion(_0x2cbfb2){return _0x2cbfb2['str']('version')['trim']();}async function validateUpdateFlags(_0x14b3b8){const _0x45093a=a47_0x475063,_0x150826=_0x14b3b8[_0x45093a(0x10a)](_0x45093a(0x134)),_0x595bd4=getRequestedVersion(_0x14b3b8);if(_0x150826&&_0x595bd4)throw CliErrors['validation']('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.',_0x45093a(0x14a));if(_0x595bd4&&!a47_0x2d3743[_0x45093a(0x132)](_0x595bd4))throw CliErrors[_0x45093a(0x140)](_0x45093a(0x146)+_0x595bd4,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x2237c6=a47_0x475063;try{const _0x229d4e=await fetch(_0x2237c6(0x109)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x2237c6(0x127),{'signal':AbortSignal[_0x2237c6(0x11e)](0x2710)});if(!_0x229d4e['ok'])return null;const _0x4d37c8=await _0x229d4e['json']();if(!_0x4d37c8||typeof _0x4d37c8!==_0x2237c6(0x130))return null;return Object[_0x2237c6(0x111)](Object['entries'](_0x4d37c8)[_0x2237c6(0x141)](([,_0x534d4f])=>typeof _0x534d4f==='string'&&_0x534d4f[_0x2237c6(0x14d)]()[_0x2237c6(0x149)]>0x0)['map'](([_0x154115,_0x4a2ad4])=>[_0x154115,String(_0x4a2ad4)[_0x2237c6(0x14d)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x3787ca){const _0x2ca1cf=await fetchNpmDistTags();return _0x2ca1cf?.[_0x3787ca]??null;}async function fetchLatestVersion(){const _0x5b26fa=a47_0x475063;return fetchNpmDistTagVersion(_0x5b26fa(0x14e));}async function resolveTargetVersion(_0x1f5503){const _0x5b0db7=a47_0x475063,_0x18ed8c=getRequestedVersion(_0x1f5503);if(_0x18ed8c)return{'version':_0x18ed8c,'source':_0x5b0db7(0x12a)};if(_0x1f5503[_0x5b0db7(0x10a)](_0x5b0db7(0x134))){const _0x2fd2f7=await fetchNpmDistTagVersion(_0x5b0db7(0x134));if(!_0x2fd2f7)return null;return{'version':_0x2fd2f7,'source':_0x5b0db7(0x134)};}const _0x19a33a=await fetchLatestVersion();if(!_0x19a33a)return null;return{'version':_0x19a33a,'source':_0x5b0db7(0x14e)};}function shouldInstallTarget(_0x5be5d8,_0x1a6117){const _0xbb79b=a47_0x475063;if(_0x1a6117[_0xbb79b(0x117)]===_0xbb79b(0x12a)||_0x1a6117[_0xbb79b(0x117)]===_0xbb79b(0x134))return!a47_0x2d3743['eq'](_0x5be5d8,_0x1a6117['version']);return a47_0x2d3743['lt'](_0x5be5d8,_0x1a6117[_0xbb79b(0x12a)]);}function getInstallPlanLabel(_0x5857e3,_0x13783f){const _0x7e093=a47_0x475063;switch(_0x13783f[_0x7e093(0x117)]){case _0x7e093(0x134):return _0x7e093(0xfe)+a47_0x15b6ed['yellow'](_0x5857e3)+_0x7e093(0x128)+a47_0x15b6ed[_0x7e093(0x124)](_0x13783f[_0x7e093(0x12a)]);case _0x7e093(0x12a):return _0x7e093(0x126)+a47_0x15b6ed['yellow'](_0x5857e3)+_0x7e093(0x128)+a47_0x15b6ed['green'](_0x13783f['version']);case _0x7e093(0x14e):default:return _0x7e093(0x108)+a47_0x15b6ed['yellow'](_0x5857e3)+'\x20→\x20'+a47_0x15b6ed[_0x7e093(0x124)](_0x13783f[_0x7e093(0x12a)]);}}function repairCurrentBuiltinSkill(){const _0x345ed9=a47_0x475063;console[_0x345ed9(0x155)](a47_0x15b6ed[_0x345ed9(0x145)](_0x345ed9(0xff)));const _0x2aeeab=installBuiltinSkill();if(_0x2aeeab['ok']){console['log'](a47_0x15b6ed['gray'](_0x345ed9(0x11b)+_0x2aeeab[_0x345ed9(0x13c)]+'\x20is\x20up\x20to\x20date.'));return;}throw CliErrors[_0x345ed9(0x113)](_0x345ed9(0x110)+_0x2aeeab[_0x345ed9(0x106)]+']:\x20'+(_0x2aeeab['error']||_0x345ed9(0x112)),_0x345ed9(0xfb)+_0x2aeeab[_0x345ed9(0x104)]+',\x20then\x20verify\x20with:\x20'+CLI_BIN_NAME+_0x345ed9(0x151));}function verifyUpdatedBuiltinSkill(_0x15b4c2){const _0xd6e759=a47_0x475063,_0x295f5e=inspectInstalledBuiltinSkillVersion(_0x15b4c2);if(_0x295f5e[_0xd6e759(0x10d)]==='current'){console[_0xd6e759(0x155)](a47_0x15b6ed[_0xd6e759(0x145)](_0xd6e759(0x11b)+_0x15b4c2+_0xd6e759(0x144)));return;}const _0x253ea1=_0x295f5e[_0xd6e759(0x13c)]?_0xd6e759(0x131)+_0x15b4c2+_0xd6e759(0x137)+_0x295f5e['skillVersion']:_0xd6e759(0x131)+_0x15b4c2+_0xd6e759(0x11f)+_0x295f5e['state'];throw CliErrors[_0xd6e759(0x113)](_0xd6e759(0xfc)+_0x15b4c2+_0xd6e759(0x135)+_0x253ea1,_0xd6e759(0xfb)+_0x295f5e[_0xd6e759(0x104)]+',\x20then\x20verify\x20with:\x20'+CLI_BIN_NAME+'\x20doctor');}async function execute(_0x17cea4){const _0x1224ec=a47_0x475063;await validateUpdateFlags(_0x17cea4);const _0x5cf634=getCurrentVersion();console['log'](_0x1224ec(0x12f)+_0x5cf634);const _0x375294=a47_0x620eca(_0x1224ec(0x10e))[_0x1224ec(0x148)](),_0x2d9fea=await resolveTargetVersion(_0x17cea4);if(!_0x2d9fea){const _0x50bb86=_0x17cea4['bool']('beta')?_0x1224ec(0x12e):_0x1224ec(0x12b);return _0x375294[_0x1224ec(0x14b)](_0x50bb86),console['log'](a47_0x15b6ed[_0x1224ec(0x145)](_0x1224ec(0x114)+NPM_PACKAGE_NAME+_0x1224ec(0x14f))),{'ok':![],'message':_0x50bb86};}const _0x2d06ee=a47_0x2d3743[_0x1224ec(0x132)](VERSION),_0x169e91=a47_0x2d3743[_0x1224ec(0x132)](_0x2d9fea['version']);if(!_0x2d06ee||!_0x169e91)return _0x375294[_0x1224ec(0x14b)](_0x1224ec(0x139)),{'ok':![],'message':_0x1224ec(0x139)};if(!shouldInstallTarget(_0x2d06ee,_0x2d9fea)){const _0x38ff0c=_0x2d9fea[_0x1224ec(0x117)]===_0x1224ec(0x12a)?_0x1224ec(0x11d)+_0x2d9fea[_0x1224ec(0x12a)]+')':a47_0x2d3743['gt'](_0x2d06ee,_0x169e91)?_0x1224ec(0x100)+_0x5cf634+_0x1224ec(0x129)+_0x2d9fea['version']:'Already\x20up\x20to\x20date\x20(v'+_0x2d9fea['version']+')';return _0x375294[_0x1224ec(0x103)](_0x38ff0c),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x375294[_0x1224ec(0x13d)](getInstallPlanLabel(_0x5cf634,_0x2d9fea));const _0x1b7804=detectPackageManager(),_0x52a288=_0x1b7804===_0x1224ec(0x10c)?resolveNpmBin(_0x1224ec(0x10c)):_0x1b7804,_0x49ff75=a47_0x620eca('Updating\x20via\x20'+_0x1b7804+_0x1224ec(0x10f))[_0x1224ec(0x148)]();try{await execa(_0x52a288,[_0x1224ec(0x150),'-g',NPM_PACKAGE_NAME+'@'+_0x2d9fea[_0x1224ec(0x12a)]],{'stdio':_0x1224ec(0x138)}),_0x49ff75['succeed'](_0x1224ec(0x119)+_0x2d9fea['version']),console['log'](a47_0x15b6ed[_0x1224ec(0x145)](_0x1224ec(0x13e)));}catch(_0x181636){return _0x49ff75['fail'](_0x1224ec(0x107)),console[_0x1224ec(0x142)](a47_0x15b6ed[_0x1224ec(0x115)]('\x20\x20'+_0x181636[_0x1224ec(0x116)])),console[_0x1224ec(0x155)](a47_0x15b6ed[_0x1224ec(0x145)](_0x1224ec(0x14c)+_0x1b7804+_0x1224ec(0x122)+NPM_PACKAGE_NAME+'@'+_0x2d9fea[_0x1224ec(0x12a)])),{'ok':![],'message':_0x181636[_0x1224ec(0x116)]};}return verifyUpdatedBuiltinSkill(_0x2d9fea['version']),{'ok':!![]};}function a47_0x39e7(){const _0x48e35a=['start','length','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','fail','\x20\x20Try\x20manually:\x20','trim','latest','@latest','install','\x20doctor','read','2adkCsx','run','log','Run:\x20','CLI\x20updated\x20to\x20v','1062216DTpKMW','Beta\x20version:\x20','Checking\x20CLI\x20Built-in\x20Skill...','Current\x20version\x20v','execPath','593804mQNqlx','succeed','repairCommand','7596FWHDcm','code','Update\x20failed','Update\x20available:\x20','https://registry.npmjs.org/-/package/','bool','885426jtEFMe','npm','state','Checking\x20for\x20updates...','...','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','fromEntries','unknown','apiError','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','red','message','source','slice','Updated\x20to\x20v','3879qRSGzE','\x20\x20CLI\x20Built-in\x20Skill\x20','10phjCqT','Already\x20on\x20requested\x20version\x20(v','timeout',',\x20state\x20','string','includes','\x20install\x20-g\x20','104UmlqHt','green','3420732DoGovn','Requested\x20version:\x20','/dist-tags','\x20→\x20','\x20is\x20newer\x20than\x20npm\x20latest\x20v','version','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','toLowerCase','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','Current\x20version:\x20','object','expected\x20','valid','bun','beta',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','111nZTMFR',',\x20found\x20','pipe','Version\x20comparison\x20failed','520ffvLLx','3509tDBNNR','skillVersion','info','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','Install\x20a\x20specific\x20CLI\x20version','validation','filter','error','1960PEIJJg','\x20is\x20up\x20to\x20date.','gray','Invalid\x20version:\x20','update'];a47_0x39e7=function(){return _0x48e35a;};return a47_0x39e7();}export const updateDefinition={'service':a47_0x475063(0x147),'command':a47_0x475063(0x154),'description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':a47_0x475063(0x152),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a47_0x5976c5=a47_0x4462;(function(_0x5d0dff,_0x576590){const _0x3b6370=a47_0x4462,_0x5eba84=_0x5d0dff();while(!![]){try{const _0x32bebf=-parseInt(_0x3b6370(0x9a))/0x1+-parseInt(_0x3b6370(0xba))/0x2+parseInt(_0x3b6370(0xb8))/0x3*(-parseInt(_0x3b6370(0x98))/0x4)+-parseInt(_0x3b6370(0x9e))/0x5+-parseInt(_0x3b6370(0x90))/0x6+parseInt(_0x3b6370(0xa3))/0x7+parseInt(_0x3b6370(0xa1))/0x8*(parseInt(_0x3b6370(0xa4))/0x9);if(_0x32bebf===_0x576590)break;else _0x5eba84['push'](_0x5eba84['shift']());}catch(_0x204e18){_0x5eba84['push'](_0x5eba84['shift']());}}}(a47_0x3631,0x6614f));import a47_0x275d65 from'chalk';import a47_0x9799c8 from'ora';import a47_0x149c2e 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 _0x47f219=a47_0x4462;return GIT_COMMIT!==_0x47f219(0xdb)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x3e755e=a47_0x4462,_0x41e043=process[_0x3e755e(0xe1)][_0x3e755e(0xa8)]();if(_0x41e043[_0x3e755e(0xc7)]('bun'))return _0x3e755e(0xd5);return'npm';}function a47_0x4462(_0xc84293,_0x1d25b3){_0xc84293=_0xc84293-0x8d;const _0x363100=a47_0x3631();let _0x446233=_0x363100[_0xc84293];return _0x446233;}const updateFlags=[{'name':'beta','type':'boolean','description':a47_0x5976c5(0xcf),'default':![]},{'name':a47_0x5976c5(0x92),'type':a47_0x5976c5(0xd6),'description':a47_0x5976c5(0xa0)}];function getRequestedVersion(_0x259bc7){const _0x2dcfde=a47_0x5976c5;return _0x259bc7[_0x2dcfde(0xcb)]('version')[_0x2dcfde(0xd7)]();}async function validateUpdateFlags(_0x1ac3b6){const _0x13f677=a47_0x5976c5,_0x4ad55a=_0x1ac3b6['bool'](_0x13f677(0xc1)),_0x43a36d=getRequestedVersion(_0x1ac3b6);if(_0x4ad55a&&_0x43a36d)throw CliErrors[_0x13f677(0xe0)](_0x13f677(0xcd),_0x13f677(0xcc));if(_0x43a36d&&!a47_0x149c2e[_0x13f677(0xab)](_0x43a36d))throw CliErrors[_0x13f677(0xe0)]('Invalid\x20version:\x20'+_0x43a36d,_0x13f677(0x9f));}async function fetchNpmDistTags(){const _0xd326c7=a47_0x5976c5;try{const _0x21e785=await fetch(_0xd326c7(0xc2)+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal['timeout'](0x2710)});if(!_0x21e785['ok'])return null;const _0x1a6828=await _0x21e785[_0xd326c7(0xbd)]();if(!_0x1a6828||typeof _0x1a6828!==_0xd326c7(0x9b))return null;return Object['fromEntries'](Object[_0xd326c7(0xb5)](_0x1a6828)['filter'](([,_0x27522e])=>typeof _0x27522e===_0xd326c7(0xd6)&&_0x27522e['trim']()[_0xd326c7(0xd9)]>0x0)[_0xd326c7(0xde)](([_0x2ac21f,_0x201f89])=>[_0x2ac21f,String(_0x201f89)['trim']()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x523421){const _0x1282ee=await fetchNpmDistTags();return _0x1282ee?.[_0x523421]??null;}function a47_0x3631(){const _0xb36880=['execPath','Beta\x20version:\x20','\x20→\x20','succeed','551544DkCdwP','gray','version','Current\x20version\x20v','Update\x20available:\x20','...','error','\x20is\x20up\x20to\x20date.','564596lPVdFR','install','336101VRLigc','object','Checking\x20for\x20updates...','Update\x20failed','3988075bjEAOY','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','Install\x20a\x20specific\x20CLI\x20version','448IFYYNz','repairCommand','458976UTGEKO','442521oWbKXE','pipe','\x20\x20Try\x20manually:\x20','red','toLowerCase','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','valid',']:\x20','Updating\x20via\x20','skillVersion','\x20install\x20-g\x20',',\x20then\x20verify\x20with:\x20','bool','Already\x20up\x20to\x20date\x20(v',',\x20found\x20','log','entries','npm','message','12tDewAd','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','1221338WXEuPH','expected\x20','Current\x20version:\x20','json','fail','Checking\x20CLI\x20Built-in\x20Skill...','Requested\x20version:\x20','beta','https://registry.npmjs.org/-/package/','Run:\x20','Version\x20comparison\x20failed','source','\x20is\x20newer\x20than\x20npm\x20latest\x20v','includes','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','Already\x20on\x20requested\x20version\x20(v','green','str','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','apiError','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','latest',',\x20state\x20','yellow','start','\x20\x20CLI\x20Built-in\x20Skill\x20','bun','string','trim','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','length','code','unknown','\x20doctor','state','map','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','validation'];a47_0x3631=function(){return _0xb36880;};return a47_0x3631();}async function fetchLatestVersion(){return fetchNpmDistTagVersion('latest');}async function resolveTargetVersion(_0x226353){const _0x5668c1=a47_0x5976c5,_0x2723e2=getRequestedVersion(_0x226353);if(_0x2723e2)return{'version':_0x2723e2,'source':_0x5668c1(0x92)};if(_0x226353[_0x5668c1(0xb1)](_0x5668c1(0xc1))){const _0x49efb1=await fetchNpmDistTagVersion(_0x5668c1(0xc1));if(!_0x49efb1)return null;return{'version':_0x49efb1,'source':_0x5668c1(0xc1)};}const _0x27009d=await fetchLatestVersion();if(!_0x27009d)return null;return{'version':_0x27009d,'source':'latest'};}function shouldInstallTarget(_0x9bc99c,_0x54e1c6){const _0x3fbf86=a47_0x5976c5;if(_0x54e1c6['source']===_0x3fbf86(0x92)||_0x54e1c6[_0x3fbf86(0xc5)]==='beta')return!a47_0x149c2e['eq'](_0x9bc99c,_0x54e1c6[_0x3fbf86(0x92)]);return a47_0x149c2e['lt'](_0x9bc99c,_0x54e1c6['version']);}function getInstallPlanLabel(_0x50a812,_0x3a5f15){const _0x387d86=a47_0x5976c5;switch(_0x3a5f15['source']){case _0x387d86(0xc1):return _0x387d86(0x8d)+a47_0x275d65[_0x387d86(0xd2)](_0x50a812)+_0x387d86(0x8e)+a47_0x275d65[_0x387d86(0xca)](_0x3a5f15[_0x387d86(0x92)]);case'version':return _0x387d86(0xc0)+a47_0x275d65['yellow'](_0x50a812)+_0x387d86(0x8e)+a47_0x275d65[_0x387d86(0xca)](_0x3a5f15['version']);case _0x387d86(0xd0):default:return _0x387d86(0x94)+a47_0x275d65[_0x387d86(0xd2)](_0x50a812)+'\x20→\x20'+a47_0x275d65[_0x387d86(0xca)](_0x3a5f15[_0x387d86(0x92)]);}}function repairCurrentBuiltinSkill(){const _0x247786=a47_0x5976c5;console[_0x247786(0xb4)](a47_0x275d65[_0x247786(0x91)](_0x247786(0xbf)));const _0xe479ca=installBuiltinSkill();if(_0xe479ca['ok']){console['log'](a47_0x275d65[_0x247786(0x91)](_0x247786(0xd4)+_0xe479ca[_0x247786(0xae)]+_0x247786(0x97)));return;}throw CliErrors[_0x247786(0xce)](_0x247786(0xc8)+_0xe479ca[_0x247786(0xda)]+_0x247786(0xac)+(_0xe479ca['error']||_0x247786(0xdb)),_0x247786(0xc3)+_0xe479ca['repairCommand']+_0x247786(0xb0)+CLI_BIN_NAME+_0x247786(0xdc));}function verifyUpdatedBuiltinSkill(_0x192e26){const _0x704596=a47_0x5976c5,_0x5e4d6d=inspectInstalledBuiltinSkillVersion(_0x192e26);if(_0x5e4d6d[_0x704596(0xdd)]==='current'){console[_0x704596(0xb4)](a47_0x275d65[_0x704596(0x91)](_0x704596(0xd4)+_0x192e26+_0x704596(0x97)));return;}const _0x401d00=_0x5e4d6d[_0x704596(0xae)]?'expected\x20'+_0x192e26+_0x704596(0xb3)+_0x5e4d6d[_0x704596(0xae)]:_0x704596(0xbb)+_0x192e26+_0x704596(0xd1)+_0x5e4d6d[_0x704596(0xdd)];throw CliErrors[_0x704596(0xce)]('CLI\x20updated\x20to\x20v'+_0x192e26+_0x704596(0xaa)+_0x401d00,_0x704596(0xc3)+_0x5e4d6d[_0x704596(0xa2)]+',\x20then\x20verify\x20with:\x20'+CLI_BIN_NAME+_0x704596(0xdc));}async function execute(_0x34b355){const _0x1ee158=a47_0x5976c5;await validateUpdateFlags(_0x34b355);const _0x299e79=getCurrentVersion();console[_0x1ee158(0xb4)](_0x1ee158(0xbc)+_0x299e79);const _0x2e4031=a47_0x9799c8(_0x1ee158(0x9c))[_0x1ee158(0xd3)](),_0x3ffc8c=await resolveTargetVersion(_0x34b355);if(!_0x3ffc8c){const _0x4ddca8=_0x34b355[_0x1ee158(0xb1)](_0x1ee158(0xc1))?_0x1ee158(0xb9):_0x1ee158(0xa9);return _0x2e4031['fail'](_0x4ddca8),console[_0x1ee158(0xb4)](a47_0x275d65[_0x1ee158(0x91)]('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x4ddca8};}const _0xe04134=a47_0x149c2e[_0x1ee158(0xab)](VERSION),_0x1866df=a47_0x149c2e[_0x1ee158(0xab)](_0x3ffc8c['version']);if(!_0xe04134||!_0x1866df)return _0x2e4031[_0x1ee158(0xbe)]('Version\x20comparison\x20failed'),{'ok':![],'message':_0x1ee158(0xc4)};if(!shouldInstallTarget(_0xe04134,_0x3ffc8c)){const _0x3a2f58=_0x3ffc8c['source']===_0x1ee158(0x92)?_0x1ee158(0xc9)+_0x3ffc8c[_0x1ee158(0x92)]+')':a47_0x149c2e['gt'](_0xe04134,_0x1866df)?_0x1ee158(0x93)+_0x299e79+_0x1ee158(0xc6)+_0x3ffc8c[_0x1ee158(0x92)]:_0x1ee158(0xb2)+_0x3ffc8c[_0x1ee158(0x92)]+')';return _0x2e4031[_0x1ee158(0x8f)](_0x3a2f58),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x2e4031['info'](getInstallPlanLabel(_0x299e79,_0x3ffc8c));const _0x2fb91b=detectPackageManager(),_0x1088fb=_0x2fb91b===_0x1ee158(0xb6)?resolveNpmBin(_0x1ee158(0xb6)):_0x2fb91b,_0x432d59=a47_0x9799c8(_0x1ee158(0xad)+_0x2fb91b+_0x1ee158(0x95))[_0x1ee158(0xd3)]();try{await execa(_0x1088fb,[_0x1ee158(0x99),'-g',NPM_PACKAGE_NAME+'@'+_0x3ffc8c[_0x1ee158(0x92)]],{'stdio':_0x1ee158(0xa5)}),_0x432d59[_0x1ee158(0x8f)]('Updated\x20to\x20v'+_0x3ffc8c[_0x1ee158(0x92)]),console[_0x1ee158(0xb4)](a47_0x275d65[_0x1ee158(0x91)](_0x1ee158(0xdf)));}catch(_0x385f12){return _0x432d59['fail'](_0x1ee158(0x9d)),console[_0x1ee158(0x96)](a47_0x275d65[_0x1ee158(0xa7)]('\x20\x20'+_0x385f12[_0x1ee158(0xb7)])),console[_0x1ee158(0xb4)](a47_0x275d65[_0x1ee158(0x91)](_0x1ee158(0xa6)+_0x2fb91b+_0x1ee158(0xaf)+NPM_PACKAGE_NAME+'@'+_0x3ffc8c[_0x1ee158(0x92)])),{'ok':![],'message':_0x385f12[_0x1ee158(0xb7)]};}return verifyUpdatedBuiltinSkill(_0x3ffc8c[_0x1ee158(0x92)]),{'ok':!![]};}export const updateDefinition={'service':'update','command':'run','description':a47_0x5976c5(0xd8),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x303b91,_0x384e85){const _0x567b6f=a48_0x1767,_0x163172=_0x303b91();while(!![]){try{const _0x445c72=-parseInt(_0x567b6f(0x11c))/0x1*(-parseInt(_0x567b6f(0x117))/0x2)+-parseInt(_0x567b6f(0x112))/0x3*(parseInt(_0x567b6f(0x11a))/0x4)+parseInt(_0x567b6f(0x118))/0x5*(-parseInt(_0x567b6f(0x115))/0x6)+-parseInt(_0x567b6f(0x116))/0x7*(parseInt(_0x567b6f(0x119))/0x8)+-parseInt(_0x567b6f(0x11b))/0x9+parseInt(_0x567b6f(0x113))/0xa+-parseInt(_0x567b6f(0x11d))/0xb*(-parseInt(_0x567b6f(0x114))/0xc);if(_0x445c72===_0x384e85)break;else _0x163172['push'](_0x163172['shift']());}catch(_0x5b3d55){_0x163172['push'](_0x163172['shift']());}}}(a48_0x333e,0xeca77));import{codegenSdk}from'../../commands/codegen/sdk.js';function a48_0x1767(_0x2db58b,_0x217c9c){_0x2db58b=_0x2db58b-0x112;const _0x333e02=a48_0x333e();let _0x176791=_0x333e02[_0x2db58b];return _0x176791;}function a48_0x333e(){const _0xcdf578=['6mjmEjc','427nWYwwY','1466548awOQfY','8035675ysEMxg','32824xYTWpV','17788bylEKL','14075370QQpegw','2yJpmtP','1276yeVSHz','39IvHNSy','3623180vynbel','270996BuQiIA'];a48_0x333e=function(){return _0xcdf578;};return a48_0x333e();}import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a49_0x33f910=a49_0x594f;function a49_0x2560(){const _0x21438a=['91cknPpN','alias','375597GZIFPf','sdk','codegen','25491ZGPoOr','2937254xmtrkF','name','6541310oodopr','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','str','14902368pUwPmW','boolean','string','Omit\x20import\x20statements\x20from\x20generated\x20code','operation','tableName','636342nMRPif','read','code','1535688VfqPoB','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','appCode'];a49_0x2560=function(){return _0x21438a;};return a49_0x2560();}(function(_0x4a6010,_0x234ba5){const _0x575fcf=a49_0x594f,_0xcb2347=_0x4a6010();while(!![]){try{const _0x2c3aa9=-parseInt(_0x575fcf(0xba))/0x1+parseInt(_0x575fcf(0xbb))/0x2+-parseInt(_0x575fcf(0xb7))/0x3+parseInt(_0x575fcf(0xb2))/0x4+-parseInt(_0x575fcf(0xbd))/0x5+parseInt(_0x575fcf(0xaf))/0x6*(-parseInt(_0x575fcf(0xb5))/0x7)+parseInt(_0x575fcf(0xc1))/0x8;if(_0x2c3aa9===_0x234ba5)break;else _0xcb2347['push'](_0xcb2347['shift']());}catch(_0x3832e6){_0xcb2347['push'](_0xcb2347['shift']());}}}(a49_0x2560,0xd6454));function a49_0x594f(_0x3fd790,_0x21c70e){_0x3fd790=_0x3fd790-0xaa;const _0x2560c5=a49_0x2560();let _0x594f55=_0x2560c5[_0x3fd790];return _0x594f55;}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a49_0x33f910(0xb9),'command':a49_0x33f910(0xb8),'description':a49_0x33f910(0xb3),'risk':a49_0x33f910(0xb0),'flags':[CODE_FLAG_OPTIONAL,{'name':a49_0x33f910(0xb6),'type':a49_0x33f910(0xab),'description':a49_0x33f910(0xbf)},{'name':a49_0x33f910(0xad),'type':a49_0x33f910(0xab),'required':!![],'description':a49_0x33f910(0xbe)},{'name':'skip-imports','type':a49_0x33f910(0xaa),'description':a49_0x33f910(0xac)}],async 'execute'(_0x3457e0){const _0x48212f=a49_0x33f910,{dataset:_0x3e8116,operation:_0x1357f3}=await getOperationDetail(_0x3457e0[_0x48212f(0xb4)],_0x3457e0[_0x48212f(0xc0)](_0x48212f(0xb1)),_0x3457e0[_0x48212f(0xc0)]('operation')),_0x231d92=generateSdkCode(_0x3e8116,_0x1357f3,{'includeImports':!_0x3457e0['bool']('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x3e8116[_0x48212f(0xbc)],'code':_0x3e8116[_0x48212f(0xb1)],'tableName':_0x3e8116[_0x48212f(0xae)]},'operation':_0x3457e0['str'](_0x48212f(0xad)),'code':_0x231d92}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a50_0x4ecf46=a50_0x5dae;(function(_0x37188e,_0xdca54d){const _0x766094=a50_0x5dae,_0x2ed570=_0x37188e();while(!![]){try{const _0x25c212=-parseInt(_0x766094(0x9e))/0x1+parseInt(_0x766094(0x92))/0x2+parseInt(_0x766094(0xa3))/0x3+-parseInt(_0x766094(0x97))/0x4+-parseInt(_0x766094(0x9a))/0x5+-parseInt(_0x766094(0x98))/0x6*(-parseInt(_0x766094(0xa4))/0x7)+parseInt(_0x766094(0x9f))/0x8;if(_0x25c212===_0xdca54d)break;else _0x2ed570['push'](_0x2ed570['shift']());}catch(_0x2e9cf4){_0x2ed570['push'](_0x2ed570['shift']());}}}(a50_0x849e,0xdfe16));function a50_0x5dae(_0x29759b,_0xaa865b){_0x29759b=_0x29759b-0x8e;const _0x849e14=a50_0x849e();let _0x5dae68=_0x849e14[_0x29759b];return _0x5dae68;}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a50_0x849e(){const _0x54f2cd=['13262296rZPnRm','sqlCode','appCode','boolean','2007486GkMDoy','7EQgHuL','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','codegen','sdk','bff','642560cbRHcc','bool','sql','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','no-imports','1031476NpqaWJ','1353966BTDiUN','target','2136040iYGAAx','sqlcode','read','str','1271799vPXYnE'];a50_0x849e=function(){return _0x54f2cd;};return a50_0x849e();}export const codegenSql={'service':a50_0x4ecf46(0x8f),'command':a50_0x4ecf46(0x94),'description':a50_0x4ecf46(0x95),'risk':a50_0x4ecf46(0x9c),'flags':[SQLCODE_FLAG,{'name':'target','type':'string','description':a50_0x4ecf46(0x8e),'default':a50_0x4ecf46(0x90),'enum':['sdk',a50_0x4ecf46(0x91)]},{'name':a50_0x4ecf46(0x96),'type':a50_0x4ecf46(0xa2),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x4f1f52){const _0x40fe4c=a50_0x4ecf46,_0x4fabe0=await getSqlQueryInfo(_0x4f1f52[_0x40fe4c(0xa1)],_0x4f1f52[_0x40fe4c(0x9d)](_0x40fe4c(0x9b))),_0x54c0eb=_0x4f1f52[_0x40fe4c(0x9d)](_0x40fe4c(0x99))||_0x40fe4c(0x90),_0x24b7fa=generateSqlCodeTemplate(_0x4fabe0,{'target':_0x54c0eb,'includeImports':!_0x4f1f52[_0x40fe4c(0x93)](_0x40fe4c(0x96))});return{'ok':!![],'data':{'sqlCode':_0x4fabe0[_0x40fe4c(0xa0)],'sqlName':_0x4fabe0['sqlName'],'target':_0x54c0eb,'code':_0x24b7fa}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3dd27f,_0x3feafb){const _0x5a31ec=a51_0x5a52,_0x1404da=_0x3dd27f();while(!![]){try{const _0x57a8ad=-parseInt(_0x5a31ec(0x183))/0x1*(-parseInt(_0x5a31ec(0x181))/0x2)+-parseInt(_0x5a31ec(0x189))/0x3*(-parseInt(_0x5a31ec(0x199))/0x4)+-parseInt(_0x5a31ec(0x18a))/0x5*(parseInt(_0x5a31ec(0x19e))/0x6)+-parseInt(_0x5a31ec(0x18e))/0x7*(parseInt(_0x5a31ec(0x18c))/0x8)+-parseInt(_0x5a31ec(0x17f))/0x9+-parseInt(_0x5a31ec(0x197))/0xa*(parseInt(_0x5a31ec(0x17e))/0xb)+parseInt(_0x5a31ec(0x178))/0xc*(parseInt(_0x5a31ec(0x17c))/0xd);if(_0x57a8ad===_0x3feafb)break;else _0x1404da['push'](_0x1404da['shift']());}catch(_0x17a6a4){_0x1404da['push'](_0x1404da['shift']());}}}(a51_0x36c3,0x7fbbd));function a51_0x36c3(){const _0x3a4f67=['Usage:\x20','string','global','\x20<name>','309864QHcOtq','both','App\x20\x22','Updated','App\x20code','object','apps','\x20Remaining\x20app\x20\x22','length','globalConfig','Missing\x20app\x20name.','719076rUEuuH','\x20<name>\x20--appcode\x20<code>','boolean','\x20app\x20\x22','390WmYKZj','project','451ADQRVj','1196640hnetdO','Added','902wxHxnx','str','319yDztqO','projectConfig','validation','flagMissing','appcode','Use\x20global\x20config\x20scope','3kSJNSA','35MKOZUg','defaultApp','8neAGIb','args','7117852yHxlmm','\x20<name>\x20[--global]','trim','\x20Default\x20app\x20changed\x20to\x20\x22','bool','\x22\x20(appcode:\x20','keys','\x22\x20still\x20defined\x20in\x20','\x20config.','210230ZikoRu','\x22\x20not\x20found.','3819540yJkjBk'];a51_0x36c3=function(){return _0x3a4f67;};return a51_0x36c3();}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';function a51_0x5a52(_0x4d5b39,_0x5b7203){_0x4d5b39=_0x4d5b39-0x172;const _0x36c318=a51_0x36c3();let _0x5a52cd=_0x36c318[_0x4d5b39];return _0x5a52cd;}export function buildAppAddFlags(){const _0x2a0407=a51_0x5a52;return[{'name':_0x2a0407(0x187),'type':_0x2a0407(0x19b),'description':_0x2a0407(0x1a2),'required':!![]},{'name':'global','type':_0x2a0407(0x17a),'description':_0x2a0407(0x188),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x440cd7=a51_0x5a52;return[{'name':_0x440cd7(0x19c),'type':_0x440cd7(0x17a),'description':_0x440cd7(0x188),'default':![]}];}export async function validateAppName(_0x55fe53,_0xc35c17){const _0x22dbf9=a51_0x5a52,_0x36d16f=_0x55fe53['args'][0x0]?.[_0x22dbf9(0x190)]();if(!_0x36d16f)throw CliErrors['validation'](_0x22dbf9(0x177),_0x22dbf9(0x19a)+CLI_BIN_NAME+'\x20'+_0xc35c17+_0x22dbf9(0x19d));}export async function runAppAdd(_0x303a32,_0x474921){const _0x22e084=a51_0x5a52,_0x3faf24=_0x303a32['args'][0x0]?.[_0x22e084(0x190)]();if(!_0x3faf24)throw CliErrors[_0x22e084(0x185)](_0x22e084(0x177),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x474921+_0x22e084(0x179));const _0x1b5e8a=_0x303a32['str'](_0x22e084(0x187));if(!_0x1b5e8a)throw CliErrors[_0x22e084(0x186)](_0x22e084(0x187),_0x22e084(0x19a)+CLI_BIN_NAME+'\x20'+_0x474921+'\x20<name>\x20--appcode\x20<code>');const _0x26485b={'global':_0x303a32[_0x22e084(0x192)](_0x22e084(0x19c))},_0xc3288b=readConfig(_0x26485b);if(!_0xc3288b[_0x22e084(0x173)])_0xc3288b[_0x22e084(0x173)]={};const _0x1e6776={'appcode':_0x1b5e8a,...collectAppProfileOverrides(_0x397a48=>_0x303a32[_0x22e084(0x182)](_0x397a48))},_0x163bdc=_0xc3288b[_0x22e084(0x173)],_0x1016b8=Object[_0x22e084(0x194)](_0x163bdc),_0x304fa7=typeof _0xc3288b[_0x22e084(0x18b)]===_0x22e084(0x19b)&&_0x163bdc[_0xc3288b['defaultApp']]?_0xc3288b[_0x22e084(0x18b)]:_0x1016b8[_0x22e084(0x175)]===0x1?_0x1016b8[0x0]:undefined,_0x5f1d85=!!_0x163bdc[_0x3faf24];_0x163bdc[_0x3faf24]=_0x1e6776;const _0x3a5a7f=normalizeStoredDefaultApp(_0xc3288b,_0x304fa7);writeConfig(_0xc3288b,_0x26485b);const _0x45f764=!_0x5f1d85&&_0x3a5a7f?'\x20Default\x20app\x20is\x20\x22'+_0x3a5a7f+'\x22.':'',_0x1ad3e5=(_0x5f1d85?_0x22e084(0x1a1):_0x22e084(0x180))+_0x22e084(0x17b)+_0x3faf24+_0x22e084(0x193)+_0x1b5e8a+')'+scopeLabel(_0x26485b)+'.'+_0x45f764;return{'ok':!![],'message':_0x1ad3e5};}export async function runAppRemove(_0xb125cc,_0x57fa18){const _0x3564eb=a51_0x5a52,_0x9027a6=_0xb125cc[_0x3564eb(0x18d)][0x0]?.[_0x3564eb(0x190)]();if(!_0x9027a6)throw CliErrors[_0x3564eb(0x185)](_0x3564eb(0x177),_0x3564eb(0x19a)+CLI_BIN_NAME+'\x20'+_0x57fa18+_0x3564eb(0x18f));const _0x1bed8b=_0xb125cc['bool'](_0x3564eb(0x19c)),{config:_0xabef92,layers:_0x37ed7c}=readRawConfigWithLayers(),_0x220243=_0xabef92[_0x3564eb(0x173)]??{};if(!_0x220243[_0x9027a6])throw CliErrors[_0x3564eb(0x185)](_0x3564eb(0x1a0)+_0x9027a6+_0x3564eb(0x198));const _0x126b03=_0x37ed7c['globalConfig'][_0x3564eb(0x173)]&&typeof _0x37ed7c[_0x3564eb(0x176)][_0x3564eb(0x173)]===_0x3564eb(0x172)?_0x37ed7c['globalConfig']['apps']:{},_0x48161f=_0x37ed7c['projectConfig'][_0x3564eb(0x173)]&&typeof _0x37ed7c['projectConfig']['apps']===_0x3564eb(0x172)?_0x37ed7c[_0x3564eb(0x184)][_0x3564eb(0x173)]:{},_0xfd634=appDefinedIn(_0x9027a6,_0x126b03,_0x48161f),_0x3513d3=resolveAppScopeForWrite(_0x9027a6,_0x1bed8b,_0x37ed7c),_0x1c738e={'global':_0x3513d3===_0x3564eb(0x19c)},_0x56d439=readConfig(_0x1c738e),_0x111382=_0x56d439['apps'];if(!_0x111382||!_0x111382[_0x9027a6])throw CliErrors[_0x3564eb(0x185)](_0x3564eb(0x1a0)+_0x9027a6+'\x22\x20not\x20found.');delete _0x111382[_0x9027a6];let _0x24e04d='';const _0x41a022=typeof _0x56d439[_0x3564eb(0x18b)]===_0x3564eb(0x19b)?_0x56d439[_0x3564eb(0x18b)]:undefined,_0x16da75=Object[_0x3564eb(0x194)](_0x111382),_0x1df584=_0x41a022===_0x9027a6?_0x16da75[0x0]:_0x41a022,_0x402c1c=normalizeStoredDefaultApp(_0x56d439,_0x1df584);if(_0x41a022===_0x9027a6&&_0x16da75['length']===0x1)_0x24e04d=_0x3564eb(0x174)+_0x16da75[0x0]+'\x22\x20is\x20selected\x20automatically.';else _0x41a022===_0x9027a6&&_0x402c1c&&(_0x24e04d=_0x3564eb(0x191)+_0x402c1c+'\x22.');Object[_0x3564eb(0x194)](_0x111382)['length']===0x0&&(delete _0x56d439[_0x3564eb(0x173)],delete _0x56d439['defaultApp']);writeConfig(_0x56d439,_0x1c738e);const _0x70a9c9=_0xfd634===_0x3564eb(0x19f)?'\x20Note:\x20app\x20\x22'+_0x9027a6+_0x3564eb(0x195)+(_0x3513d3===_0x3564eb(0x17d)?_0x3564eb(0x19c):_0x3564eb(0x17d))+_0x3564eb(0x196):'';return{'ok':!![],'message':'Removed\x20app\x20\x22'+_0x9027a6+'\x22'+scopeLabel(_0x1c738e)+'.'+_0x24e04d+_0x70a9c9};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5e80ad,_0x3fcfbe){const _0x848e2c=a52_0x116e,_0x2ce241=_0x5e80ad();while(!![]){try{const _0x3afabe=-parseInt(_0x848e2c(0x198))/0x1+-parseInt(_0x848e2c(0x188))/0x2+parseInt(_0x848e2c(0x18c))/0x3*(parseInt(_0x848e2c(0x189))/0x4)+parseInt(_0x848e2c(0x191))/0x5*(parseInt(_0x848e2c(0x195))/0x6)+parseInt(_0x848e2c(0x1a0))/0x7*(-parseInt(_0x848e2c(0x193))/0x8)+-parseInt(_0x848e2c(0x182))/0x9+-parseInt(_0x848e2c(0x187))/0xa*(-parseInt(_0x848e2c(0x186))/0xb);if(_0x3afabe===_0x3fcfbe)break;else _0x2ce241['push'](_0x2ce241['shift']());}catch(_0x36ccda){_0x2ce241['push'](_0x2ce241['shift']());}}}(a52_0x2742,0x39ff5));import{input,checkbox,select}from'@inquirer/prompts';function a52_0x116e(_0x3d0b8e,_0x21cc6c){_0x3d0b8e=_0x3d0b8e-0x17c;const _0x2742b9=a52_0x2742();let _0x116e72=_0x2742b9[_0x3d0b8e];return _0x116e72;}import a52_0x2fb6ce 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 _0x29a040=a52_0x116e,_0x3d1afe=await input({'message':_0x29a040(0x180),'validate':_0x4c7260=>{const _0x3b464d=_0x29a040,_0x2aca6c=validateAppcode(_0x4c7260[_0x3b464d(0x19a)]());return _0x2aca6c[_0x3b464d(0x19d)]||_0x2aca6c[_0x3b464d(0x199)]||_0x3b464d(0x17c);}});return _0x3d1afe[_0x29a040(0x19a)]();}function a52_0x2742(){const _0x1de5fd=['No\x20available\x20apps\x20found.','find','7VLJJNz','Invalid\x20App\x20Code','(Skip;\x20configure\x20later\x20with\x20config\x20set\x20appcode)','custom','cyan','App\x20Code:','✎\x20Enter\x20manually','3079575jMFcVU','yellow','skip','\x0aCould\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','3852365QIcSkD','10LBkgeM','807450UAMIha','776964GScObn','(No\x20login\x20session.\x20Enter\x20an\x20App\x20Code\x20manually\x20or\x20skip.)','Fetching\x20available\x20apps...','3zgwhFM','appName','gray','appCode','Could\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','24165JFAfLa','\x20\x20(','126928suuKZm','\x20apps.\x20Select\x20with\x20space,\x20a=all,\x20i=invert:','576SjbJSc','✎\x20Enter\x20appcode\x20manually','(Skip;\x20configure\x20later)','9101tXCjNp','message','trim','map','length','valid'];a52_0x2742=function(){return _0x1de5fd;};return a52_0x2742();}export async function promptAppSelection(_0x57f9f5){const _0x803705=a52_0x116e,_0x248c26=[{'name':a52_0x2fb6ce[_0x803705(0x183)]('✎\x20Enter\x20appcode\x20manually'),'value':-0x1},..._0x57f9f5['map']((_0x3e278a,_0x1d5d9a)=>({'name':_0x3e278a[_0x803705(0x18d)]+'\x20\x20'+a52_0x2fb6ce[_0x803705(0x18e)]('('+_0x3e278a['appCode']+')'),'value':_0x1d5d9a}))],_0x2ad06f=await checkbox({'message':'Found\x20'+a52_0x2fb6ce[_0x803705(0x17f)](_0x57f9f5[_0x803705(0x19c)])+_0x803705(0x194),'choices':_0x248c26,'loop':![]});if(_0x2ad06f['includes'](-0x1))return _0x803705(0x17e);if(_0x2ad06f['length']===0x0)return _0x803705(0x17e);return _0x2ad06f[_0x803705(0x19b)](_0x2bdd92=>_0x57f9f5[_0x2bdd92]);}export async function promptSingleAppSelection(_0x5411c8){const _0x396a30=a52_0x116e,_0x1e5788=[{'name':a52_0x2fb6ce['gray'](_0x396a30(0x17d)),'value':'skip'},{'name':a52_0x2fb6ce[_0x396a30(0x183)](_0x396a30(0x196)),'value':_0x396a30(0x17e)},..._0x5411c8[_0x396a30(0x19b)](_0x29d03e=>({'name':_0x29d03e[_0x396a30(0x18d)]+'\x20\x20'+a52_0x2fb6ce[_0x396a30(0x18e)]('('+_0x29d03e['appCode']+')'),'value':_0x29d03e[_0x396a30(0x18f)]}))],_0x3bb9e7=await select({'message':'Select\x20the\x20app\x20to\x20bind:','choices':_0x1e5788});if(_0x3bb9e7===_0x396a30(0x184))return _0x396a30(0x184);if(_0x3bb9e7===_0x396a30(0x17e))return'custom';return _0x5411c8[_0x396a30(0x19f)](_0x16ce58=>_0x16ce58['appCode']===_0x3bb9e7);}export async function selectSingleAppcode(_0x1287b0){const _0x24fe79=a52_0x116e;if(!_0x1287b0)return writeCliSideChannelLine(a52_0x2fb6ce[_0x24fe79(0x18e)](_0x24fe79(0x18a))),_fallbackOrSkip();writeCliSideChannelLine(_0x24fe79(0x18b));let _0x57c643;try{_0x57c643=await withActiveCookie(_0x1287b0,()=>listRemoteApps());}catch(_0x4392bf){writeCliSideChannelLine(a52_0x2fb6ce[_0x24fe79(0x183)](_0x24fe79(0x190)));if(_0x4392bf instanceof Error)writeCliSideChannelLine(a52_0x2fb6ce['gray'](_0x24fe79(0x192)+_0x4392bf[_0x24fe79(0x199)]+')'));return _fallbackOrSkip();}if(_0x57c643[_0x24fe79(0x19c)]===0x0)return writeCliSideChannelLine(a52_0x2fb6ce[_0x24fe79(0x183)](_0x24fe79(0x19e))),_fallbackOrSkip();const _0xf05fcd=await promptSingleAppSelection(_0x57c643);if(_0xf05fcd===_0x24fe79(0x184))return'';if(_0xf05fcd===_0x24fe79(0x17e))return promptCustomAppcode();return _0xf05fcd['appCode'];}export async function selectMultipleApps(_0x3eceb6){const _0x274333=a52_0x116e;writeCliSideChannelLine(_0x274333(0x18b));let _0xa7fc1e;try{_0xa7fc1e=await withActiveCookie(_0x3eceb6,()=>listRemoteApps());}catch(_0x4af035){writeCliSideChannelLine(_0x274333(0x185));if(_0x4af035 instanceof Error)writeCliSideChannelLine(_0x274333(0x192)+_0x4af035[_0x274333(0x199)]+')');return _0x274333(0x17e);}if(_0xa7fc1e[_0x274333(0x19c)]===0x0)return writeCliSideChannelLine('\x0aNo\x20available\x20apps\x20found.'),_0x274333(0x17e);return promptAppSelection(_0xa7fc1e);}async function _fallbackOrSkip(){const _0x5de015=a52_0x116e,_0x43b1fa=await select({'message':'App\x20Code:','choices':[{'name':a52_0x2fb6ce[_0x5de015(0x18e)](_0x5de015(0x197)),'value':'skip'},{'name':a52_0x2fb6ce[_0x5de015(0x183)](_0x5de015(0x181)),'value':'manual'}]});if(_0x43b1fa==='skip')return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a53_0x32bc(){const _0x2d203b=['12766280bIZSBr','PROCESSING','status','\x20is\x20processing.','trim','toUpperCase','21382sricBJ','FAILED','\x20--appcode\x20','taskId','errorMessage','11638800wmrUzP','\x20is\x20pending.','5120199NWlDeG','8oFNXuU','Task\x20','PENDING','\x20failed.','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','22MpPhLm','\x20response\x20did\x20not\x20contain\x20a\x20status.','79oxgZTM','3bqoyKa','18bfVLyq','\x20task\x20status\x20--task-id\x20','2387708bYmrWD','\x20failed:\x20','apiError','has','2025425CAQJZW','\x20returned\x20unknown\x20status\x20','17188548rTCfEh','Async\x20task\x20'];a53_0x32bc=function(){return _0x2d203b;};return a53_0x32bc();}const a53_0x5c586a=a53_0x3d69;(function(_0x449627,_0x22ea00){const _0x5ef31f=a53_0x3d69,_0x5cb028=_0x449627();while(!![]){try{const _0x1622bf=-parseInt(_0x5ef31f(0xce))/0x1*(parseInt(_0x5ef31f(0xe0))/0x2)+-parseInt(_0x5ef31f(0xcf))/0x3*(-parseInt(_0x5ef31f(0xd2))/0x4)+-parseInt(_0x5ef31f(0xd6))/0x5*(parseInt(_0x5ef31f(0xd0))/0x6)+parseInt(_0x5ef31f(0xe7))/0x7*(-parseInt(_0x5ef31f(0xe8))/0x8)+-parseInt(_0x5ef31f(0xe5))/0x9+parseInt(_0x5ef31f(0xda))/0xa+-parseInt(_0x5ef31f(0xed))/0xb*(-parseInt(_0x5ef31f(0xd8))/0xc);if(_0x1622bf===_0x22ea00)break;else _0x5cb028['push'](_0x5cb028['shift']());}catch(_0x2616c4){_0x5cb028['push'](_0x5cb028['shift']());}}}(a53_0x32bc,0x9f9f4));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set(['SUCCESS',a53_0x5c586a(0xe1)]),NON_TERMINAL_STATUSES=new Set([a53_0x5c586a(0xea),a53_0x5c586a(0xdb)]);function a53_0x3d69(_0x20272f,_0x5dbb20){_0x20272f=_0x20272f-0xce;const _0x32bc86=a53_0x32bc();let _0x3d694f=_0x32bc86[_0x20272f];return _0x3d694f;}export function normalizeAsyncTask(_0x32c927){const _0x410799=a53_0x5c586a,_0x21033c=typeof _0x32c927?.[_0x410799(0xe3)]==='string'?_0x32c927[_0x410799(0xe3)][_0x410799(0xde)]():'';if(!_0x21033c)throw CliErrors[_0x410799(0xd4)](_0x410799(0xec));const _0x5085f0=typeof _0x32c927[_0x410799(0xdc)]==='string'?_0x32c927[_0x410799(0xdc)][_0x410799(0xde)]()[_0x410799(0xdf)]():'';if(!_0x5085f0)throw CliErrors[_0x410799(0xd4)](_0x410799(0xd9)+_0x21033c+_0x410799(0xee));return{'taskId':_0x21033c,'status':_0x5085f0,'errorMessage':typeof _0x32c927[_0x410799(0xe4)]==='string'&&_0x32c927['errorMessage'][_0x410799(0xde)]()?_0x32c927[_0x410799(0xe4)][_0x410799(0xde)]():null,'isTerminal':TERMINAL_STATUSES[_0x410799(0xd5)](_0x5085f0),'knownStatus':TERMINAL_STATUSES[_0x410799(0xd5)](_0x5085f0)||NON_TERMINAL_STATUSES[_0x410799(0xd5)](_0x5085f0)};}export function buildAsyncTaskStatusCommand(_0x72884a,_0x28c72b){const _0x14aba8=a53_0x5c586a;return CLI_BIN_NAME+_0x14aba8(0xd1)+quoteShellArg(_0x72884a)+_0x14aba8(0xe2)+quoteShellArg(_0x28c72b)+'\x20--format\x20compress';}export function asyncTaskMessage(_0x404a2a){const _0x177336=a53_0x5c586a;switch(_0x404a2a['status']){case _0x177336(0xea):return _0x177336(0xe9)+_0x404a2a['taskId']+_0x177336(0xe6);case'PROCESSING':return _0x177336(0xe9)+_0x404a2a[_0x177336(0xe3)]+_0x177336(0xdd);case'SUCCESS':return'Task\x20'+_0x404a2a[_0x177336(0xe3)]+'\x20completed\x20successfully.';case'FAILED':return _0x404a2a[_0x177336(0xe4)]?_0x177336(0xe9)+_0x404a2a['taskId']+_0x177336(0xd3)+_0x404a2a[_0x177336(0xe4)]:'Task\x20'+_0x404a2a['taskId']+_0x177336(0xeb);default:return _0x177336(0xe9)+_0x404a2a[_0x177336(0xe3)]+_0x177336(0xd7)+_0x404a2a[_0x177336(0xdc)]+'.';}}function quoteShellArg(_0x103dfb){return'\x27'+_0x103dfb['replace'](/'/g,'\x27\x5c\x27\x27')+'\x27';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a54_0x20d6(){var _0xd9851b=['defineProperties','4283936ycGLLu','444349nVFamI','6ZQvJMa','20AvGEqz','2138870yIbbeE','3915940FopHTg','1459132VOsTzm','10548612aAmThc','method','description','8637wwAEtb'];a54_0x20d6=function(){return _0xd9851b;};return a54_0x20d6();}(function(_0xf14b16,_0x59a4ca){var _0x1994a9=a54_0x84ff,_0x3c0627=_0xf14b16();while(!![]){try{var _0xd4b399=-parseInt(_0x1994a9(0x159))/0x1+parseInt(_0x1994a9(0x15b))/0x2*(-parseInt(_0x1994a9(0x156))/0x3)+parseInt(_0x1994a9(0x152))/0x4+parseInt(_0x1994a9(0x150))/0x5*(parseInt(_0x1994a9(0x15a))/0x6)+-parseInt(_0x1994a9(0x151))/0x7+-parseInt(_0x1994a9(0x158))/0x8+parseInt(_0x1994a9(0x153))/0x9;if(_0xd4b399===_0x59a4ca)break;else _0x3c0627['push'](_0x3c0627['shift']());}catch(_0x4eedc5){_0x3c0627['push'](_0x3c0627['shift']());}}}(a54_0x20d6,0x60d1e));function a54_0x84ff(_0x143a07,_0x5b0e35){_0x143a07=_0x143a07-0x150;var _0x20d64b=a54_0x20d6();var _0x84ff79=_0x20d64b[_0x143a07];return _0x84ff79;}export function asDryRunResult(_0x59608e,_0x5343d1){var _0x30c47f=a54_0x84ff;return Object[_0x30c47f(0x157)](_0x59608e,{'method':{'value':_0x5343d1[_0x30c47f(0x154)],'enumerable':![]},'url':{'value':_0x5343d1['url'],'enumerable':![]},..._0x5343d1[_0x30c47f(0x155)]?{'description':{'value':_0x5343d1[_0x30c47f(0x155)],'enumerable':![]}}:{}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a55_0x541cd4=a55_0x5f12;(function(_0x1ff5de,_0x38e95e){const _0x169888=a55_0x5f12,_0x15f1dc=_0x1ff5de();while(!![]){try{const _0x2d2ded=parseInt(_0x169888(0x173))/0x1*(-parseInt(_0x169888(0x157))/0x2)+parseInt(_0x169888(0x164))/0x3+-parseInt(_0x169888(0x14a))/0x4+parseInt(_0x169888(0x14f))/0x5*(-parseInt(_0x169888(0x149))/0x6)+parseInt(_0x169888(0x15d))/0x7*(parseInt(_0x169888(0x15e))/0x8)+parseInt(_0x169888(0x16e))/0x9*(-parseInt(_0x169888(0x169))/0xa)+parseInt(_0x169888(0x14b))/0xb;if(_0x2d2ded===_0x38e95e)break;else _0x15f1dc['push'](_0x15f1dc['shift']());}catch(_0x7eff80){_0x15f1dc['push'](_0x15f1dc['shift']());}}}(a55_0x2bd4,0xf15c3));function a55_0x2bd4(){const _0x23e3c3=['Source\x20database\x20connection\x20ID;\x20derived\x20from\x20the\x20source\x20dataset\x20when\x20omitted','Database\x20product\x20type','2363841aMXhkF','ONE_TO_MANY','MANY_TO_MANY','POSTGRESQL','ONE_TO_ONE','20kLpuIE','from-datasetcode','skip-connection-test','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','from-column','4701924uOMcum','to-column','global','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','MANY_TO_ONE','903541ZsYunB','from-dblink-id','8845572ThZbfT','6173184EpxNJa','63914774RRRkaG','MYSQL','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','sqlcode','5ihxyzy','string','cardinality','to-datasetcode','App\x20code\x20(e.g.\x20app-xxxxx)','Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update','appcode','dbtype','4DriDix','Write\x20to\x20the\x20global\x20configuration','code','number','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','14oPltVL','1038968cIemTk','Relation\x20cardinality;\x20create\x20leaves\x20it\x20unset\x20when\x20omitted,\x20update\x20keeps\x20the\x20current\x20value','Source\x20DB_TABLE\x20dataset\x20code','Source\x20field\x20name\x20used\x20to\x20locate\x20the\x20relation'];a55_0x2bd4=function(){return _0x23e3c3;};return a55_0x2bd4();}export const CROSS_RELATION_FROM_DATASET_FLAG={'name':a55_0x541cd4(0x16a),'type':a55_0x541cd4(0x150),'required':!![],'description':a55_0x541cd4(0x160)};export const CROSS_RELATION_FROM_COLUMN_FLAG={'name':a55_0x541cd4(0x16d),'type':'string','required':!![],'description':a55_0x541cd4(0x161)};export const CROSS_RELATION_TO_DATASET_FLAG={'name':a55_0x541cd4(0x152),'type':a55_0x541cd4(0x150),'required':!![],'description':'Target\x20DB_TABLE\x20dataset\x20code'};function a55_0x5f12(_0x1bda36,_0x480280){_0x1bda36=_0x1bda36-0x149;const _0x2bd428=a55_0x2bd4();let _0x5f1272=_0x2bd428[_0x1bda36];return _0x5f1272;}export const CROSS_RELATION_TO_COLUMN_FLAG={'name':a55_0x541cd4(0x16f),'type':a55_0x541cd4(0x150),'required':!![],'description':'Target\x20field\x20name'};export const CROSS_RELATION_DBLINK_FLAG={'name':a55_0x541cd4(0x174),'type':a55_0x541cd4(0x15a),'description':a55_0x541cd4(0x162)};export const CROSS_RELATION_LABEL_FLAG={'name':'to-label-column','type':a55_0x541cd4(0x150),'description':'Target\x20display\x20field;\x20create\x20defaults\x20to\x20the\x20target\x20field,\x20update\x20keeps\x20the\x20current\x20value'};export const CROSS_RELATION_CARDINALITY_FLAG={'name':a55_0x541cd4(0x151),'type':a55_0x541cd4(0x150),'enum':[a55_0x541cd4(0x168),a55_0x541cd4(0x165),a55_0x541cd4(0x172),a55_0x541cd4(0x166)],'description':a55_0x541cd4(0x15f)};export const GLOBAL_SCOPE_FLAG={'name':a55_0x541cd4(0x170),'type':'boolean','default':![],'description':a55_0x541cd4(0x158)};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_0x541cd4(0x159),'type':'string','required':!![],'description':a55_0x541cd4(0x15b),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':'datasetcode','description':a55_0x541cd4(0x15b)};export const SQLCODE_FLAG={'name':a55_0x541cd4(0x14e),'type':a55_0x541cd4(0x150),'required':!![],'description':a55_0x541cd4(0x171),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a55_0x541cd4(0x16c)}};export const APPCODE_FLAG_OPTIONAL={'name':a55_0x541cd4(0x155),'type':a55_0x541cd4(0x150),'required':![],'description':a55_0x541cd4(0x15c)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a55_0x541cd4(0x153)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a55_0x541cd4(0x15a),'required':!![],'description':a55_0x541cd4(0x14d)};export const DB_TYPE_FLAG={'name':a55_0x541cd4(0x156),'type':'string','required':!![],'description':a55_0x541cd4(0x163),'enum':[a55_0x541cd4(0x14c),a55_0x541cd4(0x167)]};export const SKIP_CONNECTION_TEST_FLAG={'name':a55_0x541cd4(0x16b),'type':'boolean','description':a55_0x541cd4(0x154)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a56_0x37ae(_0x3f7782,_0x1f7dab){_0x3f7782=_0x3f7782-0x93;const _0x1987ba=a56_0x1987();let _0x37aee6=_0x1987ba[_0x3f7782];return _0x37aee6;}(function(_0x2b502d,_0xfde7fe){const _0x4e1256=a56_0x37ae,_0x32702e=_0x2b502d();while(!![]){try{const _0x322155=-parseInt(_0x4e1256(0x9c))/0x1*(-parseInt(_0x4e1256(0x98))/0x2)+parseInt(_0x4e1256(0x93))/0x3*(-parseInt(_0x4e1256(0x99))/0x4)+parseInt(_0x4e1256(0x97))/0x5+-parseInt(_0x4e1256(0x9d))/0x6+-parseInt(_0x4e1256(0xa4))/0x7+parseInt(_0x4e1256(0x94))/0x8*(parseInt(_0x4e1256(0xa3))/0x9)+-parseInt(_0x4e1256(0xa1))/0xa*(-parseInt(_0x4e1256(0x9f))/0xb);if(_0x322155===_0xfde7fe)break;else _0x32702e['push'](_0x32702e['shift']());}catch(_0x37ea0e){_0x32702e['push'](_0x32702e['shift']());}}}(a56_0x1987,0x33639));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;function a56_0x1987(){const _0xd6f714=['9986141jnVbkQ','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','10sKhTmy','\x20MB','55521ncvCKk','2148923ndcURg','136665lCmMis','184ojPUYY','\x20path\x20is\x20required.','validation','320810dIbIAe','694hsqtcx','24CseZXO','File\x20is\x20not\x20a\x20regular\x20file:\x20','size','234zCRXyK','2425620frMUIe','toFixed'];a56_0x1987=function(){return _0xd6f714;};return a56_0x1987();}export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x46b10a){const _0x318b8d=a56_0x37ae;if(_0x46b10a>=BYTES_PER_MB){const _0x4725a6=Math['ceil'](_0x46b10a/BYTES_PER_MB*0x64)/0x64;return _0x4725a6[_0x318b8d(0x9e)](0x2)+_0x318b8d(0xa2);}return _0x46b10a+'\x20B';}export function requireDevelopmentUploadFile(_0x244fae,_0x501e32){const _0x4237c0=a56_0x37ae,_0x47e99c=_0x244fae['trim']();if(!_0x47e99c)throw CliErrors[_0x4237c0(0x96)](_0x501e32+_0x4237c0(0x95));if(!existsSync(_0x47e99c))throw CliErrors[_0x4237c0(0x96)]('File\x20not\x20found:\x20'+_0x47e99c);const _0x2487cd=statSync(_0x47e99c);if(!_0x2487cd['isFile']())throw CliErrors[_0x4237c0(0x96)](_0x4237c0(0x9a)+_0x47e99c);if(_0x2487cd[_0x4237c0(0x9b)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors['validation'](_0x4237c0(0xa0)+_0x47e99c+'\x20('+formatBytes(_0x2487cd[_0x4237c0(0x9b)])+')');return{'path':_0x47e99c,'size':_0x2487cd[_0x4237c0(0x9b)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4b5a5d,_0x223db1){const _0x681763=a57_0x19be,_0x7d12ac=_0x4b5a5d();while(!![]){try{const _0x3f87d6=parseInt(_0x681763(0x1f3))/0x1+-parseInt(_0x681763(0x1f5))/0x2*(-parseInt(_0x681763(0x1eb))/0x3)+-parseInt(_0x681763(0x1f0))/0x4*(parseInt(_0x681763(0x1ed))/0x5)+-parseInt(_0x681763(0x1f1))/0x6*(-parseInt(_0x681763(0x1f2))/0x7)+parseInt(_0x681763(0x1e9))/0x8*(-parseInt(_0x681763(0x1f4))/0x9)+-parseInt(_0x681763(0x1ee))/0xa+parseInt(_0x681763(0x1f7))/0xb;if(_0x3f87d6===_0x223db1)break;else _0x7d12ac['push'](_0x7d12ac['shift']());}catch(_0x81837){_0x7d12ac['push'](_0x7d12ac['shift']());}}}(a57_0x5099,0xa623b));function a57_0x19be(_0x55203a,_0x4a1982){_0x55203a=_0x55203a-0x1e9;const _0x50994b=a57_0x5099();let _0x19be1d=_0x50994b[_0x55203a];return _0x19be1d;}export function validateAppcode(_0x3e5359){const _0x3c261a=a57_0x19be,_0x1ef246=_0x3e5359[_0x3c261a(0x1ea)]();if(!_0x1ef246)return{'valid':![],'message':'App\x20Code\x20cannot\x20be\x20empty'};if(_0x1ef246[_0x3c261a(0x1ef)]>0x64)return{'valid':![],'message':'App\x20Code\x20cannot\x20exceed\x20100\x20characters'};if(!/^[A-Za-z0-9_-]+$/[_0x3c261a(0x1ec)](_0x1ef246))return{'valid':![],'message':_0x3c261a(0x1f6)};return{'valid':!![]};}function a57_0x5099(){const _0xb372db=['1864142eUekPk','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','19001598yuksVI','10784784cRbzSu','trim','3LnWWiw','test','30755usDnau','5775620APfEud','length','724jRTvtS','6TiFoFz','2600731NUJvrD','688476IEEwkN','9YnwFAw'];a57_0x5099=function(){return _0xb372db;};return a57_0x5099();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a58_0x27e127=a58_0x2b09;(function(_0x11f647,_0x4c5619){const _0x203f43=a58_0x2b09,_0x56468c=_0x11f647();while(!![]){try{const _0x166d60=-parseInt(_0x203f43(0xb7))/0x1+-parseInt(_0x203f43(0xa7))/0x2+-parseInt(_0x203f43(0xba))/0x3*(parseInt(_0x203f43(0xb8))/0x4)+parseInt(_0x203f43(0xb9))/0x5+parseInt(_0x203f43(0xb0))/0x6+parseInt(_0x203f43(0xb5))/0x7*(-parseInt(_0x203f43(0xa4))/0x8)+-parseInt(_0x203f43(0xbc))/0x9*(-parseInt(_0x203f43(0xb4))/0xa);if(_0x166d60===_0x4c5619)break;else _0x56468c['push'](_0x56468c['shift']());}catch(_0x54b2e4){_0x56468c['push'](_0x56468c['shift']());}}}(a58_0x4f63,0x4d649));import{CliErrors}from'../../errors.js';function a58_0x2b09(_0x544fe3,_0x5c4108){_0x544fe3=_0x544fe3-0xa0;const _0x4f6337=a58_0x4f63();let _0x2b095d=_0x4f6337[_0x544fe3];return _0x2b095d;}import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';const LEGACY_DELETABLE_KEYS=new Set([a58_0x27e127(0xbe)]),EXTRA_DELETABLE_KEYS=new Set([a58_0x27e127(0xaf),'routing']);async function execute(_0x7c4cf5){const _0x295f1c=a58_0x27e127,_0x294aa2=_0x7c4cf5[_0x295f1c(0xb3)][0x0]?.[_0x295f1c(0xa0)]();if(!_0x294aa2)throw CliErrors[_0x295f1c(0xbb)](_0x295f1c(0xa6),'Usage:\x20'+CLI_BIN_NAME+'\x20config\x20delete\x20<key>\x20[--global]');if(_0x294aa2==='riskLevel')throw CliErrors[_0x295f1c(0xbb)](_0x295f1c(0xa2));if(!isTopLevelConfigKey(_0x294aa2)&&!EXTRA_DELETABLE_KEYS[_0x295f1c(0xad)](_0x294aa2)&&!LEGACY_DELETABLE_KEYS[_0x295f1c(0xad)](_0x294aa2))throw CliErrors['validation'](_0x295f1c(0xae)+_0x294aa2+'\x22\x20is\x20not\x20deletable.','Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.');const _0x5403d5=resolveWriteScope({'global':_0x7c4cf5['bool']('global')}),_0x82daec=readScopedConfig(_0x5403d5),_0x393625=Object['prototype'][_0x295f1c(0xa3)][_0x295f1c(0xa1)](_0x82daec,_0x294aa2);_0x393625&&(delete _0x82daec[_0x294aa2],writeScopedConfig(_0x82daec,_0x5403d5));const _0x5f4452=_0x5403d5==='global'?_0x295f1c(0xbd):_0x295f1c(0xaa);return{'ok':!![],'message':_0x393625?'✓\x20'+_0x5f4452+'\x20'+_0x294aa2+_0x295f1c(0xb2):'✓\x20'+_0x5f4452+'\x20'+_0x294aa2+'\x20already\x20absent','data':{'key':_0x294aa2,'scope':_0x5403d5,'changed':_0x393625}};}function a58_0x4f63(){const _0x2fcc2d=['8egoIMx','key','Missing\x20key\x20argument.','52230mGTcRK','delete','global','Project','Delete\x20a\x20config\x20value\x20from\x20one\x20scope','boolean','has','Top-level\x20key\x20\x22','defaultApp','2217378qcvuEs','Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','\x20deleted','args','11390rKsHoB','2533265ErGuch','config','203507dQgUFp','1126280NyHocR','1518280lzhOCA','6TXOxEQ','validation','6309XxRyPj','Global','inherit','trim','call','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','hasOwnProperty'];a58_0x4f63=function(){return _0x2fcc2d;};return a58_0x4f63();}export const configDeleteDefinition={'service':a58_0x27e127(0xb6),'command':a58_0x27e127(0xa8),'description':a58_0x27e127(0xab),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[{'name':a58_0x27e127(0xa5),'description':a58_0x27e127(0xb1),'required':!![]}],'flags':[{'name':a58_0x27e127(0xa9),'type':a58_0x27e127(0xac),'description':'Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
|