@lovrabet/rabetbase-cli 2.5.4 → 2.5.5-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/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +2 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +35 -0
- package/skills/rabetbase-page-generation/references/component-baseline.md +18 -0
- package/skills/rabetbase-page-generation/references/generation.md +77 -0
- package/skills/rabetbase-page-generation/templates/onepage/build.mjs +63 -0
- package/skills/rabetbase-page-generation/templates/onepage/create/README.md +20 -0
- package/skills/rabetbase-page-generation/templates/onepage/create/index.jsx +4 -0
- package/skills/rabetbase-page-generation/templates/onepage/create/preview.png +0 -0
- package/skills/rabetbase-page-generation/templates/onepage/detail/README.md +20 -0
- package/skills/rabetbase-page-generation/templates/onepage/detail/index.jsx +194 -0
- package/skills/rabetbase-page-generation/templates/onepage/detail/preview.png +0 -0
- package/skills/rabetbase-page-generation/templates/onepage/list/README.md +20 -0
- package/skills/rabetbase-page-generation/templates/onepage/list/index.jsx +717 -0
- package/skills/rabetbase-page-generation/templates/onepage/list/preview.png +0 -0
- package/skills/rabetbase-page-generation/templates/onepage/shared/editor.jsx +395 -0
- package/skills/rabetbase-page-generation/templates/onepage/shared/model.js +141 -0
- package/skills/rabetbase-page-generation/templates/onepage/shared/page.css +377 -0
- package/skills/rabetbase-page-generation/templates/onepage/shared/record-layout.jsx +90 -0
- package/skills/rabetbase-page-generation/templates/onepage/shared/responsive.jsx +70 -0
- package/skills/rabetbase-page-generation/templates/onepage/update/README.md +21 -0
- package/skills/rabetbase-page-generation/templates/onepage/update/index.jsx +4 -0
- package/skills/rabetbase-page-generation/templates/onepage/update/preview.png +0 -0
- package/skills/rabetbase.manifest.json +3 -3
package/lib/commands/bff/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a44_0x51aaaa=a44_0xa41c;(function(_0x12a556,_0x2c6052){const _0x12b618=a44_0xa41c,_0x27237d=_0x12a556();while(!![]){try{const _0x4fe131=-parseInt(_0x12b618(0x203))/0x1+parseInt(_0x12b618(0x1fe))/0x2*(-parseInt(_0x12b618(0x22c))/0x3)+-parseInt(_0x12b618(0x1e2))/0x4+parseInt(_0x12b618(0x22e))/0x5+parseInt(_0x12b618(0x22f))/0x6*(-parseInt(_0x12b618(0x1fd))/0x7)+-parseInt(_0x12b618(0x1e8))/0x8*(parseInt(_0x12b618(0x246))/0x9)+parseInt(_0x12b618(0x23d))/0xa;if(_0x4fe131===_0x2c6052)break;else _0x27237d['push'](_0x27237d['shift']());}catch(_0x2a7684){_0x27237d['push'](_0x27237d['shift']());}}}(a44_0x19a6,0xd9a4e));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,getBffScriptStatistics,getPlatformErrorCode,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiModelSource}from'../../api/model-source.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{buildHookDirectoryIndexes,assertUnambiguousHookAliases,assertUnambiguousHookDirectoryMappings,preflightPushHookDirectories,trackedHookDirectoryMappings}from'../../core/bff/hook-directory.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription,snakeToCamel}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;function a44_0xa41c(_0x232ba5,_0x52af7c){_0x232ba5=_0x232ba5-0x1dd;const _0x19a623=a44_0x19a6();let _0xa41cbd=_0x19a623[_0x232ba5];return _0xa41cbd;}export const bffPush={'service':'bff','command':a44_0x51aaaa(0x243),'description':'Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','risk':a44_0x51aaaa(0x23e),'structuredErrors':!![],'flags':[{'name':'type','type':a44_0x51aaaa(0x231),'description':a44_0x51aaaa(0x1e9),'enum':['COMMON','ENDPOINT','HOOK']},{'name':'name','type':a44_0x51aaaa(0x231),'description':a44_0x51aaaa(0x21d)},{'name':a44_0x51aaaa(0x245),'type':a44_0x51aaaa(0x216),'description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0xefe837){const _0x229b32=a44_0x51aaaa,_0x224448=loadBffProjectConfig(_0xefe837['appCode']),_0x5ac05a=await readBffLockFile(_0x224448['lockFilePath']),{appLock:_0x466dae}=ensureLockScope(_0x5ac05a??createEmptyBffLock(),_0xefe837[_0x229b32(0x1e5)],_0x224448[_0x229b32(0x1eb)],_0x229b32(0x243)),_0x54200b=await getTargetFunctions(_0x224448,_0xefe837),_0x4e638b=_0x54200b[_0x229b32(0x1e7)](_0x5a46bc=>_0x5a46bc[_0x229b32(0x1ee)]==='HOOK')?await scanLocalBffFunctions(_0x224448,'HOOK'):_0x54200b,_0x468186=await buildHookMaps(_0xefe837[_0x229b32(0x1e5)],_0xefe837[_0x229b32(0x1fa)],_0x4e638b,_0x466dae,_0xefe837[_0x229b32(0x21f)]||_0xefe837[_0x229b32(0x1e1)]?.[_0x229b32(0x22b)]||_0xefe837[_0x229b32(0x1e1)]?.[_0x229b32(0x217)]),_0x4f6dd8=_0xefe837[_0x229b32(0x20a)](_0x229b32(0x245)),_0x1a54cf=[];for(const _0x63b931 of _0x54200b){const _0x1936fd=await computeFileHash(_0x63b931[_0x229b32(0x21c)]),_0x2c1d9e=_0x466dae[_0x229b32(0x218)][_0x63b931[_0x229b32(0x233)]],_0x3dc352=!!_0x2c1d9e&&_0x2c1d9e[_0x229b32(0x20f)]===_0x1936fd,_0x344f6b=_0x468186['resolutions']['get'](_0x63b931['lockKey']),_0x1e4dcf=!!_0x2c1d9e?.['remoteId']&&_0x2c1d9e[_0x229b32(0x1e3)]==null&&(_0x4f6dd8||!_0x3dc352),_0xd0b78f=_0x1e4dcf?missingRemoteVersionConflict(_0x63b931,_0x2c1d9e):undefined,_0x525648=_0x468186['failures'][_0x229b32(0x20c)](_0x63b931[_0x229b32(0x233)])?_0x229b32(0x22a):!_0x4f6dd8&&_0x3dc352?_0x229b32(0x1f5):_0xd0b78f?_0x229b32(0x1fb):'would_push';_0x1a54cf['push']({'lockKey':_0x63b931[_0x229b32(0x233)],'filePath':_0x63b931[_0x229b32(0x21c)],'remoteId':_0x2c1d9e?.[_0x229b32(0x1e0)]??null,'mode':_0x2c1d9e?.[_0x229b32(0x1e0)]?_0x229b32(0x200):_0x229b32(0x220),'status':_0x525648,..._0x468186[_0x229b32(0x240)][_0x229b32(0x20c)](_0x63b931['lockKey'])?{'error':_0x468186[_0x229b32(0x240)][_0x229b32(0x21a)](_0x63b931[_0x229b32(0x233)])}:{},..._0xd0b78f?{'conflict':_0xd0b78f}:{},..._0x468186['existingHooks'][_0x229b32(0x20c)](_0x63b931[_0x229b32(0x233)])?{'datasetCode':_0x2c1d9e?.[_0x229b32(0x1e4)],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x63b931[_0x229b32(0x233)])]}:{},..._0x344f6b?{'alias':_0x344f6b[_0x229b32(0x1f0)]??null,'datasetCode':_0x344f6b['datasetCode'],'operationType':_0x63b931['operationType'],'functionNode':_0x63b931[_0x229b32(0x230)],'warnings':_0x344f6b['warnings']}:{}});}return{'method':_0x229b32(0x242),'url':_0x229b32(0x221),'body':{'appCode':_0xefe837['appCode'],'force':_0x4f6dd8,'files':_0x1a54cf,'cacheClearAtRuntime':_0x1a54cf['some'](_0x28e152=>_0x28e152[_0x229b32(0x205)]===_0x229b32(0x20e)),'cacheClearAtRuntimeTimes':_0x1a54cf[_0x229b32(0x1e7)](_0x40f217=>_0x40f217[_0x229b32(0x205)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x229b32(0x208)+_0x1a54cf[_0x229b32(0x1f9)]+_0x229b32(0x223)};},async 'execute'(_0x584780){const _0x3b5654=a44_0x51aaaa,_0x3f330b=loadBffProjectConfig(_0x584780['appCode']),_0x213eb0=await readBffLockFile(_0x3f330b[_0x3b5654(0x1f1)]),{lockData:_0x196940,appLock:_0x244fdb}=ensureLockScope(_0x213eb0??createEmptyBffLock(),_0x584780[_0x3b5654(0x1e5)],_0x3f330b['scriptsRoot'],_0x3b5654(0x243)),_0x24aaf4=await getTargetFunctions(_0x3f330b,_0x584780);if(_0x24aaf4['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':_0x3b5654(0x23c)};const _0x5079d9=_0x584780[_0x3b5654(0x20a)](_0x3b5654(0x245)),_0x1d43a3=JSON[_0x3b5654(0x207)](JSON[_0x3b5654(0x248)](_0x196940)),_0x2c35ce=_0x1d43a3[_0x3b5654(0x21e)][_0x584780['appCode']];if(!_0x2c35ce)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x584780[_0x3b5654(0x1e5)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x21acff=_0x24aaf4[_0x3b5654(0x1e7)](_0x1679bf=>_0x1679bf[_0x3b5654(0x1ee)]===_0x3b5654(0x1ef))?await scanLocalBffFunctions(_0x3f330b,'HOOK'):_0x24aaf4,_0x13024b=await buildHookMaps(_0x584780[_0x3b5654(0x1e5)],_0x584780[_0x3b5654(0x1fa)],_0x21acff,_0x2c35ce,_0x584780[_0x3b5654(0x21f)]||_0x584780['mergedCli']?.['currentApp']||_0x584780['mergedCli']?.[_0x3b5654(0x217)]),_0x2ff426=[],_0x435c15=[],_0x18f182=[],_0xd62a48=[];for(const _0x390272 of _0x24aaf4){const _0x3c1b06=_0x13024b[_0x3b5654(0x240)][_0x3b5654(0x21a)](_0x390272[_0x3b5654(0x233)]);if(_0x3c1b06){_0xd62a48[_0x3b5654(0x243)]({'lockKey':_0x390272[_0x3b5654(0x233)],'error':_0x3c1b06});continue;}const _0x3b2392=await computeFileHash(_0x390272['filePath']),_0x1d8fe5=_0x2c35ce[_0x3b5654(0x218)][_0x390272[_0x3b5654(0x233)]];if(!_0x5079d9&&_0x1d8fe5&&_0x1d8fe5[_0x3b5654(0x20f)]===_0x3b2392){_0x435c15[_0x3b5654(0x243)]({'lockKey':_0x390272[_0x3b5654(0x233)],'reason':_0x3b5654(0x1f5)});continue;}if(_0x1d8fe5?.[_0x3b5654(0x1e0)]&&_0x1d8fe5[_0x3b5654(0x1e3)]==null){_0x18f182[_0x3b5654(0x243)](missingRemoteVersionConflict(_0x390272,_0x1d8fe5));continue;}try{await uploadSingleFunction(_0x584780[_0x3b5654(0x1e5)],_0x390272,_0x2c35ce,_0x13024b);const _0x447a74=_0x2c35ce[_0x3b5654(0x218)][_0x390272[_0x3b5654(0x233)]];_0x2ff426[_0x3b5654(0x243)]({'lockKey':_0x390272[_0x3b5654(0x233)],'remoteId':_0x447a74?.[_0x3b5654(0x1e0)]??0x0});}catch(_0x1e0ffa){const _0x584257=remoteVersionChangedConflict(_0x390272,_0x1d8fe5,_0x1e0ffa);if(_0x584257){_0x18f182[_0x3b5654(0x243)](_0x584257);continue;}_0xd62a48[_0x3b5654(0x243)]({'lockKey':_0x390272[_0x3b5654(0x233)],'error':_0x1e0ffa instanceof Error?_0x1e0ffa[_0x3b5654(0x1f8)]:String(_0x1e0ffa)});}}_0x2c35ce[_0x3b5654(0x241)]=new Date()[_0x3b5654(0x239)](),await writeBffLockFile(_0x3f330b['lockFilePath'],_0x1d43a3),await waitForUploadedLockEntries(_0x3f330b[_0x3b5654(0x1f1)],_0x584780[_0x3b5654(0x1e5)],_0x2ff426['map'](_0x5db4aa=>_0x5db4aa[_0x3b5654(0x233)]));let _0x51ff6f={'attempted':![],'cleared':![]};if(_0x2ff426[_0x3b5654(0x1f9)]>0x0)try{let _0x272abc='';for(let _0x39c822=0x0;_0x39c822<CACHE_CLEAR_ATTEMPTS;_0x39c822+=0x1){_0x272abc=await clearBffScriptCache(),_0x39c822<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x51ff6f={'attempted':!![],'cleared':!![],'message':_0x272abc||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0x209f26){_0x51ff6f={'attempted':!![],'cleared':![],'error':_0x209f26 instanceof Error?_0x209f26[_0x3b5654(0x1f8)]:String(_0x209f26)};}const _0x1baa8b=_0xd62a48[_0x3b5654(0x1f9)]===0x0&&(_0x51ff6f[_0x3b5654(0x1f3)]?_0x51ff6f['cleared']:!![]),_0x2b1bb7=_0x1baa8b,_0x40e411=_0x51ff6f[_0x3b5654(0x1f3)]?_0x51ff6f[_0x3b5654(0x215)]?_0x3b5654(0x23a):_0x3b5654(0x22d):_0x3b5654(0x20d);return{'ok':_0x2b1bb7,'data':{'uploaded':_0x2ff426,'skipped':_0x435c15,'conflicts':_0x18f182,'failed':_0xd62a48,'cacheClear':_0x51ff6f,'warnings':[...[..._0x13024b[_0x3b5654(0x1f4)][_0x3b5654(0x1f6)]()]['flatMap'](_0x13d55b=>_0x13d55b[_0x3b5654(0x209)]),...[..._0x13024b[_0x3b5654(0x23f)]][_0x3b5654(0x236)](existingHookWarning)]},'message':formatPushMessage(_0x2ff426['length'],_0x435c15[_0x3b5654(0x1f9)],_0x18f182[_0x3b5654(0x1f9)],_0xd62a48[_0x3b5654(0x1f9)],_0x40e411)};}};function missingRemoteVersionConflict(_0x5645c1,_0x2cfafb){const _0x5bb943=a44_0x51aaaa;return remoteVersionConflict(_0x5645c1,_0x2cfafb,'BFF_REMOTE_VERSION_MISSING',_0x5bb943(0x1f7));}function remoteVersionChangedConflict(_0x3c605e,_0x330f16,_0x2b886f){const _0x2fe2e7=a44_0x51aaaa;if(!_0x330f16?.['remoteId']||_0x330f16[_0x2fe2e7(0x1e3)]==null||!isRemoteVersionConflict(_0x2b886f))return undefined;return remoteVersionConflict(_0x3c605e,_0x330f16,_0x2fe2e7(0x1e6),_0x2fe2e7(0x228));}function remoteVersionConflict(_0xe47641,_0x1afd6c,_0x53b519,_0x4d423d){const _0x19156e=a44_0x51aaaa;return{'code':_0x53b519,'lockKey':_0xe47641['lockKey'],'filePath':_0xe47641[_0x19156e(0x21c)],'remoteId':_0x1afd6c['remoteId'],..._0x1afd6c[_0x19156e(0x1e3)]!=null?{'expectedVersion':_0x1afd6c[_0x19156e(0x1e3)]}:{},'message':_0x4d423d,'nextAction':{'action':_0x19156e(0x225),'command':CLI_BIN_NAME+_0x19156e(0x204)+_0x1afd6c[_0x19156e(0x1e0)]+_0x19156e(0x214),'requiresReview':!![],'message':'Review\x20the\x20current\x20remote\x20source,\x20merge\x20it\x20into\x20the\x20local\x20script,\x20then\x20retry\x20push.\x20Do\x20not\x20use\x20--force\x20unless\x20you\x20intentionally\x20discard\x20local\x20changes.'}};}function a44_0x19a6(){const _0xe78c19=['hash','Local\x20function\x20not\x20found:\x20','name','test','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','\x20--format\x20compress','cleared','boolean','defaultApp','functions','datasetId','get','script','filePath','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','apps','selectedAppName','create','/api/management/library/scripts/save','afterScriptId','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','require','review_remote_and_merge','Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.','beforeScriptId','Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.','join','failed','currentApp','3jiUMdE','runtime\x20cache\x20clear\x20failed','311295tnAjlr','1182jGqjIc','functionNode','string','before','lockKey','Incomplete\x20HOOK\x20path:\x20','flatMap','map','profileName','\x20uploaded','toISOString','runtime\x20cache\x20cleared','dataset','No\x20local\x20Backend\x20Function\x20scripts\x20found.','61394190DrtgjJ','write','existingHooks','failures','lastSync','POST','push','\x20conflict','force','264618OzShHt','functionName','stringify','set','\x20skipped','after','operationType','remoteId','mergedCli','5943824FornkC','version','datasetCode','appCode','BFF_REMOTE_VERSION_CHANGED','some','8NpapRy','Push\x20only\x20this\x20script\x20type','HOOK_DATASET_NOT_FOUND:','scriptsRoot','EXISTING_HOOK_BINDING_PRESERVED','filter','type','HOOK','alias','lockFilePath','requires','attempted','resolutions','unchanged','values','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','message','length','apiDir','conflict','description','32109ELmnda','2534468UsXuOw','str','update','validation','Push\x20complete:\x20','1623977yTffBJ','\x20bff\x20detail\x20--id\x20','status','Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20','parse','Would\x20inspect\x20','warnings','bool','size','has','runtime\x20cache\x20not\x20needed','would_push'];a44_0x19a6=function(){return _0xe78c19;};return a44_0x19a6();}function isRemoteVersionConflict(_0x5e65f0){const _0x25c205=a44_0x51aaaa,_0x335a20=_0x5e65f0 instanceof Error?_0x5e65f0[_0x25c205(0x1f8)]:String(_0x5e65f0),_0x33d72f=getPlatformErrorCode(_0x5e65f0)??'';return[_0x335a20,_0x33d72f][_0x25c205(0x1e7)](_0xcb78f3=>/(?:version|optimistic)[\s_-]*(?:conflict|mismatch|changed|stale|out[\s_-]*of[\s_-]*date)|(?:conflict|mismatch|changed|stale|out[\s_-]*of[\s_-]*date)[\s_-]*(?:version|optimistic)/i[_0x25c205(0x212)](_0xcb78f3));}function formatPushMessage(_0x10b9f5,_0x4d2356,_0x5b8fe4,_0x4083ac,_0x4d5786){const _0x4187ea=a44_0x51aaaa,_0x21783d=[_0x4187ea(0x202)+_0x10b9f5+_0x4187ea(0x238),_0x4d2356+_0x4187ea(0x1dd)];_0x5b8fe4>0x0&&_0x21783d['push'](_0x5b8fe4+_0x4187ea(0x244)+(_0x5b8fe4===0x1?'':'s')+'\x20'+(_0x5b8fe4===0x1?_0x4187ea(0x1f2):_0x4187ea(0x224))+'\x20resolution');if(_0x4083ac>0x0)_0x21783d[_0x4187ea(0x243)](_0x4083ac+'\x20failed');return _0x21783d['push'](_0x4d5786),_0x21783d[_0x4187ea(0x229)](',\x20');}async function getTargetFunctions(_0x591c7b,_0x373e06){const _0x4787c0=a44_0x51aaaa,_0xaaee8e=_0x373e06[_0x4787c0(0x1ff)](_0x4787c0(0x1ee)),_0x25ba50=_0x373e06['str'](_0x4787c0(0x211)),_0x31edc5=normalizeBffType(_0xaaee8e)??undefined;if(_0x25ba50&&!_0x31edc5)throw CliErrors[_0x4787c0(0x201)]('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x477881=await scanLocalBffFunctions(_0x591c7b,_0x31edc5);if(_0x25ba50){const _0x528aaf=_0x477881['filter'](_0x4670cb=>_0x4670cb[_0x4787c0(0x211)]===_0x25ba50);if(_0x528aaf['length']===0x0)throw CliErrors[_0x4787c0(0x201)](_0x4787c0(0x210)+_0x31edc5+'/'+_0x25ba50);return _0x528aaf;}return _0x477881;}function existingHookWarning(_0x15f9fe){const _0x4fe521=a44_0x51aaaa;return{'code':_0x4fe521(0x1ec),'lockKey':_0x15f9fe,'message':_0x4fe521(0x226)};}async function buildHookMaps(_0x4281a3,_0x238ed3,_0x3982c2,_0x2bbf0c,_0x12d3be){const _0x5b5836=a44_0x51aaaa,_0x50ca29=_0x3982c2[_0x5b5836(0x1e7)](_0x58bf1b=>_0x58bf1b[_0x5b5836(0x1ee)]===_0x5b5836(0x1ef));if(!_0x50ca29)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0x1b7e92=resolveApiModelSource(_0x238ed3,_0x4281a3,_0x12d3be),_0x424fa0=loadAliasMap(_0x238ed3,undefined,_0x1b7e92[_0x5b5836(0x21c)],_0x1b7e92[_0x5b5836(0x237)]);assertUnambiguousHookAliases(_0x424fa0);const _0x13f5fd=[..._0x424fa0[_0x5b5836(0x236)](_0x4c2b28=>[_0x4c2b28[_0x5b5836(0x1f0)],_0x4c2b28[_0x5b5836(0x1e4)]]),...trackedHookDirectoryMappings(_0x2bbf0c)[_0x5b5836(0x236)](_0x2870cc=>[_0x2870cc[_0x5b5836(0x1f0)],_0x2870cc[_0x5b5836(0x1e4)]])],_0xc7fb67=await listDatasets(_0x4281a3);assertUnambiguousHookDirectoryMappings(_0x13f5fd[_0x5b5836(0x236)](([_0x4ae3a2,_0xd76542])=>({'alias':_0x4ae3a2,'datasetCode':_0xd76542})));const _0x44661e=buildHookDirectoryIndexes(_0xc7fb67,_0x13f5fd),_0x3a4120=new Map(),_0x4a16a7=preflightPushHookDirectories(_0x3982c2,_0x2bbf0c,_0x44661e,_0x3a4120),_0x1435c7=new Set(),_0x41b521=_0x3982c2[_0x5b5836(0x1ed)](_0x32dd96=>_0x3a4120['get'](_0x32dd96['lockKey'])?.['startsWith'](_0x5b5836(0x1ea))&&_0x2bbf0c[_0x5b5836(0x218)][_0x32dd96[_0x5b5836(0x233)]]?.[_0x5b5836(0x1e0)]&&_0x2bbf0c[_0x5b5836(0x218)][_0x32dd96[_0x5b5836(0x233)]]?.[_0x5b5836(0x1e4)]);if(_0x41b521[_0x5b5836(0x1f9)]>0x0){let _0x5193c8;try{_0x5193c8=await getBffScriptStatistics(_0x4281a3);}catch(_0x1a4ab3){for(const _0x42f9a5 of _0x41b521)_0x3a4120[_0x5b5836(0x249)](_0x42f9a5['lockKey'],_0x5b5836(0x206)+(_0x1a4ab3 instanceof Error?_0x1a4ab3[_0x5b5836(0x1f8)]:String(_0x1a4ab3)));return{'resolutions':_0x4a16a7,'failures':_0x3a4120,'existingHooks':_0x1435c7};}for(const _0x583e0f of _0x41b521){const _0x2d01d0=_0x2bbf0c[_0x5b5836(0x218)][_0x583e0f[_0x5b5836(0x233)]];try{const _0x431158=new Set(_0x3982c2[_0x5b5836(0x1ed)](_0x4c37c2=>_0x4c37c2[_0x5b5836(0x1ee)]==='HOOK'&&_0x2bbf0c['functions'][_0x4c37c2[_0x5b5836(0x233)]]?.[_0x5b5836(0x1e4)]===_0x2d01d0[_0x5b5836(0x1e4)])[_0x5b5836(0x236)](_0x3d463b=>_0x3d463b[_0x5b5836(0x1f0)]));if(_0x431158[_0x5b5836(0x20b)]>0x1)throw CliErrors[_0x5b5836(0x201)]('Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.');const _0x320132=_0x5193c8[_0x5b5836(0x235)](_0x29d033=>[{'datasetCode':_0x29d033[_0x5b5836(0x1e4)],'operationType':snakeToCamel(_0x29d033[_0x5b5836(0x1df)]),'functionNode':_0x5b5836(0x232),'id':_0x29d033[_0x5b5836(0x227)]},{'datasetCode':_0x29d033[_0x5b5836(0x1e4)],'operationType':snakeToCamel(_0x29d033[_0x5b5836(0x1df)]),'functionNode':_0x5b5836(0x1de),'id':_0x29d033[_0x5b5836(0x222)]}])['filter'](_0x31e9d8=>_0x31e9d8['id']===_0x2d01d0[_0x5b5836(0x1e0)]),_0xaa49d7=await getBffScriptInfo(_0x2d01d0['remoteId']);if(_0xaa49d7['id']!==_0x2d01d0[_0x5b5836(0x1e0)]||_0xaa49d7['appCode']!==_0x4281a3||_0xaa49d7['scriptType']!==_0x5b5836(0x1ef)||_0xaa49d7[_0x5b5836(0x247)]!==_0x583e0f['name']||_0x2d01d0[_0x5b5836(0x1e3)]==null||_0xaa49d7[_0x5b5836(0x1e3)]!==_0x2d01d0[_0x5b5836(0x1e3)]||_0x320132[_0x5b5836(0x1f9)]!==0x1||_0x320132[0x0]['datasetCode']!==_0x2d01d0[_0x5b5836(0x1e4)]||_0x320132[0x0][_0x5b5836(0x1df)]!==_0x583e0f[_0x5b5836(0x1df)]||_0x320132[0x0][_0x5b5836(0x230)]!==_0x583e0f[_0x5b5836(0x230)]||_0x2d01d0['operationType']!==_0x583e0f[_0x5b5836(0x1df)]||_0x2d01d0[_0x5b5836(0x230)]!==_0x583e0f[_0x5b5836(0x230)])throw CliErrors['validation']('Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.');_0x1435c7['add'](_0x583e0f[_0x5b5836(0x233)]),_0x3a4120['delete'](_0x583e0f[_0x5b5836(0x233)]);}catch(_0x6d9532){_0x3a4120[_0x5b5836(0x249)](_0x583e0f[_0x5b5836(0x233)],_0x6d9532 instanceof Error?_0x6d9532['message']:String(_0x6d9532));}}}return{'resolutions':_0x4a16a7,'failures':_0x3a4120,'existingHooks':_0x1435c7};}async function uploadSingleFunction(_0x3269e9,_0x236ed1,_0x4d24d4,_0x2ed434){const _0x5b496b=a44_0x51aaaa,_0x4e382f=await readFile(_0x236ed1[_0x5b496b(0x21c)],'utf8'),_0x2d42ff=await computeFileHash(_0x236ed1['filePath']),_0x45c9d8=_0x4d24d4[_0x5b496b(0x218)][_0x236ed1[_0x5b496b(0x233)]];if(_0x45c9d8?.['remoteId']&&_0x45c9d8[_0x5b496b(0x1e3)]==null)throw CliErrors['validation'](_0x236ed1[_0x5b496b(0x233)]+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x3bd914=extractScriptDescription(_0x4e382f);if(!_0x3bd914&&_0x45c9d8?.[_0x5b496b(0x1e0)]){const _0x2ce279=await getBffScriptInfo(_0x45c9d8['remoteId']);_0x3bd914=_0x2ce279[_0x5b496b(0x1fc)]||undefined;}const _0x13bf5b={'appCode':_0x3269e9,'functionName':_0x236ed1[_0x5b496b(0x211)],'scriptType':_0x236ed1[_0x5b496b(0x1ee)],'scriptContent':_0x4e382f};if(_0x45c9d8?.['remoteId'])_0x13bf5b['id']=_0x45c9d8['remoteId'];if(_0x45c9d8?.['version']!=null)_0x13bf5b[_0x5b496b(0x1e3)]=_0x45c9d8[_0x5b496b(0x1e3)];if(_0x3bd914)_0x13bf5b[_0x5b496b(0x1fc)]=_0x3bd914;if(_0x236ed1[_0x5b496b(0x1ee)]===_0x5b496b(0x1ef)){const _0x117991=_0x2ed434[_0x5b496b(0x1f4)][_0x5b496b(0x21a)](_0x236ed1[_0x5b496b(0x233)]);if(!_0x117991&&!_0x2ed434[_0x5b496b(0x23f)][_0x5b496b(0x20c)](_0x236ed1[_0x5b496b(0x233)])||!_0x236ed1[_0x5b496b(0x1df)]||!_0x236ed1[_0x5b496b(0x230)])throw CliErrors[_0x5b496b(0x201)](_0x5b496b(0x234)+_0x236ed1[_0x5b496b(0x233)]);_0x117991&&(_0x13bf5b[_0x5b496b(0x219)]=_0x117991[_0x5b496b(0x23b)]['id'],_0x13bf5b['operationType']=_0x236ed1[_0x5b496b(0x1df)]),_0x13bf5b[_0x5b496b(0x230)]=_0x236ed1[_0x5b496b(0x230)];}const _0x336f30=await saveBffScript(_0x13bf5b),_0x4805ff=_0x336f30['id'],_0x35ca3a=_0x336f30[_0x5b496b(0x21b)]??await getBffScriptInfo(_0x4805ff),_0x31bfc4={'hash':_0x2d42ff,'remoteId':_0x4805ff,'version':_0x35ca3a['version']};if(_0x236ed1[_0x5b496b(0x1ee)]===_0x5b496b(0x1ef)){const _0x5f0319=_0x2ed434['resolutions'][_0x5b496b(0x21a)](_0x236ed1['lockKey']);if(!_0x5f0319){_0x4d24d4[_0x5b496b(0x218)][_0x236ed1[_0x5b496b(0x233)]]={..._0x45c9d8,..._0x31bfc4};return;}_0x31bfc4[_0x5b496b(0x1f0)]=_0x5f0319[_0x5b496b(0x1f0)]??_0x45c9d8?.['alias'],_0x31bfc4[_0x5b496b(0x1e4)]=_0x5f0319['datasetCode'],_0x31bfc4[_0x5b496b(0x1df)]=_0x236ed1['operationType'],_0x31bfc4[_0x5b496b(0x230)]=_0x236ed1[_0x5b496b(0x230)];}_0x4d24d4['functions'][_0x236ed1[_0x5b496b(0x233)]]=_0x31bfc4;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0xdfcc91,_0x5488c1,_0x3b44a9){const _0x349164=a44_0x51aaaa;if(_0x3b44a9[_0x349164(0x1f9)]===0x0)return;for(let _0x2dd859=0x0;_0x2dd859<LOCK_SETTLE_RETRY_COUNT;_0x2dd859+=0x1){const _0x141427=await readBffLockFile(_0xdfcc91),_0x3e3f56=_0x141427?.['apps']?.[_0x5488c1]?.[_0x349164(0x218)]??{},_0x7d081f=_0x3b44a9['every'](_0x3f510b=>!!_0x3e3f56[_0x3f510b]?.[_0x349164(0x1e0)]);if(_0x7d081f)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x349164(0x213)+_0x3b44a9[_0x349164(0x229)](',\x20')+'.');}
|
|
1
|
+
function a44_0x34d8(){const _0x446c3a=['539553tbTzmC','test','length','HOOK_DATASET_NOT_FOUND:','bool','message','selectedAppName','str','operationType','get','validation','598968aKiqfF','runtime\x20cache\x20not\x20needed','functionNode','runtime\x20cache\x20cleared','unchanged','594346bSzuyi','status','240161ztrkYc','Runtime\x20script\x20cache\x20cleared.','filePath','3cxiHdP','918870nCuBNL','Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20','filter','would_push','Force\x20push\x20ignoring\x20hash\x20protection','scriptsRoot','stringify','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','version','/api/management/library/scripts/save','Lock\x20scope\x20for\x20app\x20\x22','functions','utf8','functionName','hash','HOOK','failed','beforeScriptId','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','startsWith','ENDPOINT','Push\x20complete:\x20','afterScriptId','write','\x20failed','defaultApp','flatMap','mergedCli','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.','\x20uploaded','remoteId','scriptType','has','every','parse','536048iLwFkp','lockKey','map','\x20bff\x20detail\x20--id\x20','name','\x20skipped','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.','Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.','alias','after','apps','Local\x20function\x20not\x20found:\x20','appCode','currentApp','193650wryIjp','description','some','bff','before','BFF_REMOTE_VERSION_MISSING','push','POST',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.','lockFilePath','lastSync','existingHooks','type','\x20resolution','force','failures','create','No\x20local\x20Backend\x20Function\x20scripts\x20found.','string','attempted','\x20conflict','dataset','apiDir','runtime\x20cache\x20clear\x20failed','EXISTING_HOOK_BINDING_PRESERVED','warnings','COMMON','join','require','set','Incomplete\x20HOOK\x20path:\x20','size','datasetCode','boolean','script','Would\x20inspect\x20','cleared','resolutions','datasetId'];a44_0x34d8=function(){return _0x446c3a;};return a44_0x34d8();}const a44_0x496162=a44_0x1e62;(function(_0x43afca,_0x4d1a24){const _0x42c0c6=a44_0x1e62,_0x5e0edd=_0x43afca();while(!![]){try{const _0x5d817a=-parseInt(_0x42c0c6(0xa4))/0x1+parseInt(_0x42c0c6(0xa2))/0x2+parseInt(_0x42c0c6(0xa7))/0x3*(parseInt(_0x42c0c6(0xcc))/0x4)+-parseInt(_0x42c0c6(0xdb))/0x5+parseInt(_0x42c0c6(0xa8))/0x6+-parseInt(_0x42c0c6(0x103))/0x7+-parseInt(_0x42c0c6(0x9d))/0x8;if(_0x5d817a===_0x4d1a24)break;else _0x5e0edd['push'](_0x5e0edd['shift']());}catch(_0x18044d){_0x5e0edd['push'](_0x5e0edd['shift']());}}}(a44_0x34d8,0x25791));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_0x496162(0xde),'command':'push','description':'Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','risk':a44_0x496162(0xbf),'structuredErrors':!![],'flags':[{'name':'type','type':a44_0x496162(0xee),'description':'Push\x20only\x20this\x20script\x20type','enum':[a44_0x496162(0xf6),a44_0x496162(0xbc),'HOOK']},{'name':'name','type':a44_0x496162(0xee),'description':a44_0x496162(0xd2)},{'name':a44_0x496162(0xea),'type':a44_0x496162(0xfd),'description':a44_0x496162(0xac)}],async 'dryRun'(_0x1b7f6a){const _0x3786b2=a44_0x496162,_0x3ae9ad=loadBffProjectConfig(_0x1b7f6a[_0x3786b2(0xd9)]),_0x3fe335=await readBffLockFile(_0x3ae9ad[_0x3786b2(0xe5)]),{appLock:_0x2d26a9}=ensureLockScope(_0x3fe335??createEmptyBffLock(),_0x1b7f6a['appCode'],_0x3ae9ad[_0x3786b2(0xad)],'push'),_0x2dffe1=await getTargetFunctions(_0x3ae9ad,_0x1b7f6a),_0xce6a6d=_0x2dffe1['some'](_0x4b8b3d=>_0x4b8b3d['type']===_0x3786b2(0xb7))?await scanLocalBffFunctions(_0x3ae9ad,_0x3786b2(0xb7)):_0x2dffe1,_0x37b075=await buildHookMaps(_0x1b7f6a[_0x3786b2(0xd9)],_0x1b7f6a[_0x3786b2(0xf2)],_0xce6a6d,_0x2d26a9,_0x1b7f6a[_0x3786b2(0x98)]||_0x1b7f6a[_0x3786b2(0xc3)]?.[_0x3786b2(0xda)]||_0x1b7f6a[_0x3786b2(0xc3)]?.[_0x3786b2(0xc1)]),_0x9d9d64=_0x1b7f6a[_0x3786b2(0x96)]('force'),_0x4abec2=[];for(const _0x597730 of _0x2dffe1){const _0x396e4b=await computeFileHash(_0x597730[_0x3786b2(0xa6)]),_0x3e1597=_0x2d26a9[_0x3786b2(0xb3)][_0x597730[_0x3786b2(0xcd)]],_0xf8def3=!!_0x3e1597&&_0x3e1597[_0x3786b2(0xb6)]===_0x396e4b,_0x4bb7ba=_0x37b075[_0x3786b2(0x101)][_0x3786b2(0x9b)](_0x597730['lockKey']),_0x10527d=!!_0x3e1597?.[_0x3786b2(0xc7)]&&_0x3e1597[_0x3786b2(0xb0)]==null&&(_0x9d9d64||!_0xf8def3),_0x4c341c=_0x10527d?missingRemoteVersionConflict(_0x597730,_0x3e1597):undefined,_0x4df5ed=_0x37b075[_0x3786b2(0xeb)][_0x3786b2(0xc9)](_0x597730[_0x3786b2(0xcd)])?_0x3786b2(0xb8):!_0x9d9d64&&_0xf8def3?_0x3786b2(0xa1):_0x4c341c?'conflict':_0x3786b2(0xab);_0x4abec2[_0x3786b2(0xe1)]({'lockKey':_0x597730[_0x3786b2(0xcd)],'filePath':_0x597730[_0x3786b2(0xa6)],'remoteId':_0x3e1597?.[_0x3786b2(0xc7)]??null,'mode':_0x3e1597?.['remoteId']?'update':_0x3786b2(0xec),'status':_0x4df5ed,..._0x37b075[_0x3786b2(0xeb)][_0x3786b2(0xc9)](_0x597730['lockKey'])?{'error':_0x37b075[_0x3786b2(0xeb)][_0x3786b2(0x9b)](_0x597730[_0x3786b2(0xcd)])}:{},..._0x4c341c?{'conflict':_0x4c341c}:{},..._0x37b075[_0x3786b2(0xe7)][_0x3786b2(0xc9)](_0x597730[_0x3786b2(0xcd)])?{'datasetCode':_0x3e1597?.['datasetCode'],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x597730[_0x3786b2(0xcd)])]}:{},..._0x4bb7ba?{'alias':_0x4bb7ba['alias']??null,'datasetCode':_0x4bb7ba[_0x3786b2(0xfc)],'operationType':_0x597730[_0x3786b2(0x9a)],'functionNode':_0x597730[_0x3786b2(0x9f)],'warnings':_0x4bb7ba[_0x3786b2(0xf5)]}:{}});}return{'method':_0x3786b2(0xe2),'url':_0x3786b2(0xb1),'body':{'appCode':_0x1b7f6a[_0x3786b2(0xd9)],'force':_0x9d9d64,'files':_0x4abec2,'cacheClearAtRuntime':_0x4abec2[_0x3786b2(0xdd)](_0x225c86=>_0x225c86[_0x3786b2(0xa3)]==='would_push'),'cacheClearAtRuntimeTimes':_0x4abec2[_0x3786b2(0xdd)](_0x249fd7=>_0x249fd7[_0x3786b2(0xa3)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x3786b2(0xff)+_0x4abec2['length']+_0x3786b2(0xaf)};},async 'execute'(_0x46f9d4){const _0x518f35=a44_0x496162,_0x368994=loadBffProjectConfig(_0x46f9d4[_0x518f35(0xd9)]),_0x228c96=await readBffLockFile(_0x368994[_0x518f35(0xe5)]),{lockData:_0x494780,appLock:_0xc856ff}=ensureLockScope(_0x228c96??createEmptyBffLock(),_0x46f9d4[_0x518f35(0xd9)],_0x368994[_0x518f35(0xad)],_0x518f35(0xe1)),_0x3d1d85=await getTargetFunctions(_0x368994,_0x46f9d4);if(_0x3d1d85[_0x518f35(0x94)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':_0x518f35(0xed)};const _0xdff0fe=_0x46f9d4[_0x518f35(0x96)]('force'),_0x1ea26b=JSON[_0x518f35(0xcb)](JSON[_0x518f35(0xae)](_0x494780)),_0x2c1753=_0x1ea26b['apps'][_0x46f9d4[_0x518f35(0xd9)]];if(!_0x2c1753)throw new Error(_0x518f35(0xb2)+_0x46f9d4[_0x518f35(0xd9)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x213899=_0x3d1d85[_0x518f35(0xdd)](_0x4def68=>_0x4def68[_0x518f35(0xe8)]===_0x518f35(0xb7))?await scanLocalBffFunctions(_0x368994,_0x518f35(0xb7)):_0x3d1d85,_0x291c4f=await buildHookMaps(_0x46f9d4[_0x518f35(0xd9)],_0x46f9d4[_0x518f35(0xf2)],_0x213899,_0x2c1753,_0x46f9d4[_0x518f35(0x98)]||_0x46f9d4['mergedCli']?.['currentApp']||_0x46f9d4['mergedCli']?.['defaultApp']),_0x42a1ed=[],_0x6f205f=[],_0x511d99=[],_0x213cac=[];for(const _0x5600ad of _0x3d1d85){const _0x3f8002=_0x291c4f['failures']['get'](_0x5600ad[_0x518f35(0xcd)]);if(_0x3f8002){_0x213cac[_0x518f35(0xe1)]({'lockKey':_0x5600ad[_0x518f35(0xcd)],'error':_0x3f8002});continue;}const _0x4763b0=await computeFileHash(_0x5600ad['filePath']),_0xd1bbfb=_0x2c1753['functions'][_0x5600ad[_0x518f35(0xcd)]];if(!_0xdff0fe&&_0xd1bbfb&&_0xd1bbfb[_0x518f35(0xb6)]===_0x4763b0){_0x6f205f['push']({'lockKey':_0x5600ad[_0x518f35(0xcd)],'reason':_0x518f35(0xa1)});continue;}if(_0xd1bbfb?.['remoteId']&&_0xd1bbfb['version']==null){_0x511d99[_0x518f35(0xe1)](missingRemoteVersionConflict(_0x5600ad,_0xd1bbfb));continue;}try{await uploadSingleFunction(_0x46f9d4['appCode'],_0x5600ad,_0x2c1753,_0x291c4f);const _0xacca45=_0x2c1753[_0x518f35(0xb3)][_0x5600ad[_0x518f35(0xcd)]];_0x42a1ed[_0x518f35(0xe1)]({'lockKey':_0x5600ad['lockKey'],'remoteId':_0xacca45?.[_0x518f35(0xc7)]??0x0});}catch(_0x3fed4d){const _0x5e353e=remoteVersionChangedConflict(_0x5600ad,_0xd1bbfb,_0x3fed4d);if(_0x5e353e){_0x511d99[_0x518f35(0xe1)](_0x5e353e);continue;}_0x213cac[_0x518f35(0xe1)]({'lockKey':_0x5600ad['lockKey'],'error':_0x3fed4d instanceof Error?_0x3fed4d[_0x518f35(0x97)]:String(_0x3fed4d)});}}_0x2c1753[_0x518f35(0xe6)]=new Date()['toISOString'](),await writeBffLockFile(_0x368994['lockFilePath'],_0x1ea26b),await waitForUploadedLockEntries(_0x368994['lockFilePath'],_0x46f9d4[_0x518f35(0xd9)],_0x42a1ed[_0x518f35(0xce)](_0x42ac14=>_0x42ac14['lockKey']));let _0x194d9c={'attempted':![],'cleared':![]};if(_0x42a1ed['length']>0x0)try{let _0x124165='';for(let _0x4477c2=0x0;_0x4477c2<CACHE_CLEAR_ATTEMPTS;_0x4477c2+=0x1){_0x124165=await clearBffScriptCache(),_0x4477c2<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x194d9c={'attempted':!![],'cleared':!![],'message':_0x124165||_0x518f35(0xa5)};}catch(_0x1ae535){_0x194d9c={'attempted':!![],'cleared':![],'error':_0x1ae535 instanceof Error?_0x1ae535[_0x518f35(0x97)]:String(_0x1ae535)};}const _0x9cc1fc=_0x213cac['length']===0x0&&(_0x194d9c[_0x518f35(0xef)]?_0x194d9c[_0x518f35(0x100)]:!![]),_0x1a1210=_0x9cc1fc,_0x5270cc=_0x194d9c['attempted']?_0x194d9c[_0x518f35(0x100)]?_0x518f35(0xa0):_0x518f35(0xf3):_0x518f35(0x9e);return{'ok':_0x1a1210,'data':{'uploaded':_0x42a1ed,'skipped':_0x6f205f,'conflicts':_0x511d99,'failed':_0x213cac,'cacheClear':_0x194d9c,'warnings':[...[..._0x291c4f[_0x518f35(0x101)]['values']()][_0x518f35(0xc2)](_0x12ed79=>_0x12ed79['warnings']),...[..._0x291c4f['existingHooks']][_0x518f35(0xce)](existingHookWarning)]},'message':formatPushMessage(_0x42a1ed[_0x518f35(0x94)],_0x6f205f[_0x518f35(0x94)],_0x511d99[_0x518f35(0x94)],_0x213cac[_0x518f35(0x94)],_0x5270cc)};}};function missingRemoteVersionConflict(_0x67475a,_0x5ecbc6){const _0x13909a=a44_0x496162;return remoteVersionConflict(_0x67475a,_0x5ecbc6,_0x13909a(0xe0),'The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.');}function remoteVersionChangedConflict(_0xb367e3,_0x1fcacd,_0x439260){const _0x5be734=a44_0x496162;if(!_0x1fcacd?.['remoteId']||_0x1fcacd[_0x5be734(0xb0)]==null||!isRemoteVersionConflict(_0x439260))return undefined;return remoteVersionConflict(_0xb367e3,_0x1fcacd,'BFF_REMOTE_VERSION_CHANGED',_0x5be734(0xe4));}function remoteVersionConflict(_0x1d6c0f,_0xf02024,_0x5877e9,_0x2e02c7){const _0x23d778=a44_0x496162;return{'code':_0x5877e9,'lockKey':_0x1d6c0f[_0x23d778(0xcd)],'filePath':_0x1d6c0f[_0x23d778(0xa6)],'remoteId':_0xf02024[_0x23d778(0xc7)],..._0xf02024[_0x23d778(0xb0)]!=null?{'expectedVersion':_0xf02024[_0x23d778(0xb0)]}:{},'message':_0x2e02c7,'nextAction':{'action':'review_remote_and_merge','command':CLI_BIN_NAME+_0x23d778(0xcf)+_0xf02024[_0x23d778(0xc7)]+'\x20--format\x20compress','requiresReview':!![],'message':'Review\x20the\x20current\x20remote\x20source,\x20merge\x20it\x20into\x20the\x20local\x20script,\x20then\x20retry\x20push.\x20Do\x20not\x20use\x20--force\x20unless\x20you\x20intentionally\x20discard\x20local\x20changes.'}};}function a44_0x1e62(_0x7f6b1,_0x5c0c78){_0x7f6b1=_0x7f6b1-0x93;const _0x34d859=a44_0x34d8();let _0x1e62da=_0x34d859[_0x7f6b1];return _0x1e62da;}function isRemoteVersionConflict(_0xd9abfb){const _0x439655=a44_0x496162,_0xc4755e=_0xd9abfb instanceof Error?_0xd9abfb[_0x439655(0x97)]:String(_0xd9abfb),_0x8338ad=getPlatformErrorCode(_0xd9abfb)??'';return[_0xc4755e,_0x8338ad][_0x439655(0xdd)](_0x3f2cc5=>/(?: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[_0x439655(0x93)](_0x3f2cc5));}function formatPushMessage(_0x3b63a2,_0x15ba6e,_0x50a0cc,_0x24f679,_0x218e6c){const _0x434fc5=a44_0x496162,_0x35afb0=[_0x434fc5(0xbd)+_0x3b63a2+_0x434fc5(0xc6),_0x15ba6e+_0x434fc5(0xd1)];_0x50a0cc>0x0&&_0x35afb0[_0x434fc5(0xe1)](_0x50a0cc+_0x434fc5(0xf0)+(_0x50a0cc===0x1?'':'s')+'\x20'+(_0x50a0cc===0x1?'requires':_0x434fc5(0xf8))+_0x434fc5(0xe9));if(_0x24f679>0x0)_0x35afb0[_0x434fc5(0xe1)](_0x24f679+_0x434fc5(0xc0));return _0x35afb0[_0x434fc5(0xe1)](_0x218e6c),_0x35afb0[_0x434fc5(0xf7)](',\x20');}async function getTargetFunctions(_0x5748fe,_0x57fdf2){const _0x474523=a44_0x496162,_0x3be59b=_0x57fdf2[_0x474523(0x99)]('type'),_0xd16126=_0x57fdf2[_0x474523(0x99)](_0x474523(0xd0)),_0x49d803=normalizeBffType(_0x3be59b)??undefined;if(_0xd16126&&!_0x49d803)throw CliErrors['validation'](_0x474523(0xba));const _0x36a0cd=await scanLocalBffFunctions(_0x5748fe,_0x49d803);if(_0xd16126){const _0x57bd45=_0x36a0cd[_0x474523(0xaa)](_0x1f045d=>_0x1f045d[_0x474523(0xd0)]===_0xd16126);if(_0x57bd45[_0x474523(0x94)]===0x0)throw CliErrors['validation'](_0x474523(0xd8)+_0x49d803+'/'+_0xd16126);return _0x57bd45;}return _0x36a0cd;}function existingHookWarning(_0x560f1c){const _0x4f1b58=a44_0x496162;return{'code':_0x4f1b58(0xf4),'lockKey':_0x560f1c,'message':_0x4f1b58(0xc5)};}async function buildHookMaps(_0xef22bf,_0xdf3cdf,_0x4ff607,_0x3ab7db,_0x5ba14f){const _0x4bfddd=a44_0x496162,_0x5131a2=_0x4ff607[_0x4bfddd(0xdd)](_0x4a2349=>_0x4a2349[_0x4bfddd(0xe8)]===_0x4bfddd(0xb7));if(!_0x5131a2)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0x398daf=resolveApiModelSource(_0xdf3cdf,_0xef22bf,_0x5ba14f),_0xd61ecb=loadAliasMap(_0xdf3cdf,undefined,_0x398daf[_0x4bfddd(0xa6)],_0x398daf['profileName']);assertUnambiguousHookAliases(_0xd61ecb);const _0x1de189=[..._0xd61ecb[_0x4bfddd(0xce)](_0x3487c7=>[_0x3487c7[_0x4bfddd(0xd5)],_0x3487c7['datasetCode']]),...trackedHookDirectoryMappings(_0x3ab7db)['map'](_0xf5631d=>[_0xf5631d[_0x4bfddd(0xd5)],_0xf5631d[_0x4bfddd(0xfc)]])],_0x1b98b7=await listDatasets(_0xef22bf);assertUnambiguousHookDirectoryMappings(_0x1de189[_0x4bfddd(0xce)](([_0x4bf6da,_0x52a27c])=>({'alias':_0x4bf6da,'datasetCode':_0x52a27c})));const _0x8350b0=buildHookDirectoryIndexes(_0x1b98b7,_0x1de189),_0x211af0=new Map(),_0x3c798f=preflightPushHookDirectories(_0x4ff607,_0x3ab7db,_0x8350b0,_0x211af0),_0x37884d=new Set(),_0x3dbdd4=_0x4ff607['filter'](_0x47067c=>_0x211af0['get'](_0x47067c[_0x4bfddd(0xcd)])?.[_0x4bfddd(0xbb)](_0x4bfddd(0x95))&&_0x3ab7db[_0x4bfddd(0xb3)][_0x47067c[_0x4bfddd(0xcd)]]?.[_0x4bfddd(0xc7)]&&_0x3ab7db['functions'][_0x47067c[_0x4bfddd(0xcd)]]?.[_0x4bfddd(0xfc)]);if(_0x3dbdd4[_0x4bfddd(0x94)]>0x0){let _0xe4ee95;try{_0xe4ee95=await getBffScriptStatistics(_0xef22bf);}catch(_0x2cbce9){for(const _0x37e9ca of _0x3dbdd4)_0x211af0[_0x4bfddd(0xf9)](_0x37e9ca[_0x4bfddd(0xcd)],_0x4bfddd(0xa9)+(_0x2cbce9 instanceof Error?_0x2cbce9['message']:String(_0x2cbce9)));return{'resolutions':_0x3c798f,'failures':_0x211af0,'existingHooks':_0x37884d};}for(const _0x467d5a of _0x3dbdd4){const _0x12c33e=_0x3ab7db[_0x4bfddd(0xb3)][_0x467d5a[_0x4bfddd(0xcd)]];try{const _0x55436e=new Set(_0x4ff607['filter'](_0x2ae93d=>_0x2ae93d[_0x4bfddd(0xe8)]===_0x4bfddd(0xb7)&&_0x3ab7db[_0x4bfddd(0xb3)][_0x2ae93d[_0x4bfddd(0xcd)]]?.[_0x4bfddd(0xfc)]===_0x12c33e[_0x4bfddd(0xfc)])[_0x4bfddd(0xce)](_0x53469e=>_0x53469e[_0x4bfddd(0xd5)]));if(_0x55436e[_0x4bfddd(0xfb)]>0x1)throw CliErrors['validation'](_0x4bfddd(0xd3));const _0x1448b7=_0xe4ee95[_0x4bfddd(0xc2)](_0x3748a3=>[{'datasetCode':_0x3748a3[_0x4bfddd(0xfc)],'operationType':snakeToCamel(_0x3748a3[_0x4bfddd(0x9a)]),'functionNode':_0x4bfddd(0xdf),'id':_0x3748a3[_0x4bfddd(0xb9)]},{'datasetCode':_0x3748a3['datasetCode'],'operationType':snakeToCamel(_0x3748a3[_0x4bfddd(0x9a)]),'functionNode':_0x4bfddd(0xd6),'id':_0x3748a3[_0x4bfddd(0xbe)]}])[_0x4bfddd(0xaa)](_0x585a7f=>_0x585a7f['id']===_0x12c33e['remoteId']),_0x3acef4=await getBffScriptInfo(_0x12c33e[_0x4bfddd(0xc7)]);if(_0x3acef4['id']!==_0x12c33e['remoteId']||_0x3acef4[_0x4bfddd(0xd9)]!==_0xef22bf||_0x3acef4[_0x4bfddd(0xc8)]!=='HOOK'||_0x3acef4[_0x4bfddd(0xb5)]!==_0x467d5a['name']||_0x12c33e[_0x4bfddd(0xb0)]==null||_0x3acef4['version']!==_0x12c33e[_0x4bfddd(0xb0)]||_0x1448b7[_0x4bfddd(0x94)]!==0x1||_0x1448b7[0x0]['datasetCode']!==_0x12c33e[_0x4bfddd(0xfc)]||_0x1448b7[0x0][_0x4bfddd(0x9a)]!==_0x467d5a[_0x4bfddd(0x9a)]||_0x1448b7[0x0]['functionNode']!==_0x467d5a[_0x4bfddd(0x9f)]||_0x12c33e['operationType']!==_0x467d5a[_0x4bfddd(0x9a)]||_0x12c33e['functionNode']!==_0x467d5a['functionNode'])throw CliErrors[_0x4bfddd(0x9c)](_0x4bfddd(0xd4));_0x37884d['add'](_0x467d5a[_0x4bfddd(0xcd)]),_0x211af0['delete'](_0x467d5a[_0x4bfddd(0xcd)]);}catch(_0x38170f){_0x211af0[_0x4bfddd(0xf9)](_0x467d5a[_0x4bfddd(0xcd)],_0x38170f instanceof Error?_0x38170f['message']:String(_0x38170f));}}}return{'resolutions':_0x3c798f,'failures':_0x211af0,'existingHooks':_0x37884d};}async function uploadSingleFunction(_0x405108,_0x3484af,_0x1f9317,_0x285565){const _0x525134=a44_0x496162,_0x5cd4bd=await readFile(_0x3484af[_0x525134(0xa6)],_0x525134(0xb4)),_0x28f9b0=await computeFileHash(_0x3484af[_0x525134(0xa6)]),_0x1975ac=_0x1f9317['functions'][_0x3484af[_0x525134(0xcd)]];if(_0x1975ac?.[_0x525134(0xc7)]&&_0x1975ac[_0x525134(0xb0)]==null)throw CliErrors['validation'](_0x3484af[_0x525134(0xcd)]+_0x525134(0xe3));let _0x5a016e=extractScriptDescription(_0x5cd4bd);if(!_0x5a016e&&_0x1975ac?.[_0x525134(0xc7)]){const _0x5edf8d=await getBffScriptInfo(_0x1975ac[_0x525134(0xc7)]);_0x5a016e=_0x5edf8d['description']||undefined;}const _0x48468d={'appCode':_0x405108,'functionName':_0x3484af[_0x525134(0xd0)],'scriptType':_0x3484af[_0x525134(0xe8)],'scriptContent':_0x5cd4bd};if(_0x1975ac?.[_0x525134(0xc7)])_0x48468d['id']=_0x1975ac['remoteId'];if(_0x1975ac?.[_0x525134(0xb0)]!=null)_0x48468d[_0x525134(0xb0)]=_0x1975ac['version'];if(_0x5a016e)_0x48468d[_0x525134(0xdc)]=_0x5a016e;if(_0x3484af[_0x525134(0xe8)]===_0x525134(0xb7)){const _0x6b7596=_0x285565[_0x525134(0x101)][_0x525134(0x9b)](_0x3484af['lockKey']);if(!_0x6b7596&&!_0x285565['existingHooks'][_0x525134(0xc9)](_0x3484af[_0x525134(0xcd)])||!_0x3484af[_0x525134(0x9a)]||!_0x3484af[_0x525134(0x9f)])throw CliErrors['validation'](_0x525134(0xfa)+_0x3484af[_0x525134(0xcd)]);_0x6b7596&&(_0x48468d[_0x525134(0x102)]=_0x6b7596[_0x525134(0xf1)]['id'],_0x48468d[_0x525134(0x9a)]=_0x3484af[_0x525134(0x9a)]),_0x48468d[_0x525134(0x9f)]=_0x3484af[_0x525134(0x9f)];}const _0x198d5d=await saveBffScript(_0x48468d),_0x390f88=_0x198d5d['id'],_0x286317=_0x198d5d[_0x525134(0xfe)]??await getBffScriptInfo(_0x390f88),_0x57f19e={'hash':_0x28f9b0,'remoteId':_0x390f88,'version':_0x286317[_0x525134(0xb0)]};if(_0x3484af['type']===_0x525134(0xb7)){const _0x1d217c=_0x285565['resolutions'][_0x525134(0x9b)](_0x3484af['lockKey']);if(!_0x1d217c){_0x1f9317[_0x525134(0xb3)][_0x3484af['lockKey']]={..._0x1975ac,..._0x57f19e};return;}_0x57f19e[_0x525134(0xd5)]=_0x1d217c[_0x525134(0xd5)]??_0x1975ac?.[_0x525134(0xd5)],_0x57f19e[_0x525134(0xfc)]=_0x1d217c[_0x525134(0xfc)],_0x57f19e[_0x525134(0x9a)]=_0x3484af[_0x525134(0x9a)],_0x57f19e['functionNode']=_0x3484af[_0x525134(0x9f)];}_0x1f9317[_0x525134(0xb3)][_0x3484af[_0x525134(0xcd)]]=_0x57f19e;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x52884e,_0x550739,_0x1b4559){const _0x5bbd6a=a44_0x496162;if(_0x1b4559[_0x5bbd6a(0x94)]===0x0)return;for(let _0x46e94c=0x0;_0x46e94c<LOCK_SETTLE_RETRY_COUNT;_0x46e94c+=0x1){const _0x51daab=await readBffLockFile(_0x52884e),_0x5649a2=_0x51daab?.[_0x5bbd6a(0xd7)]?.[_0x550739]?.[_0x5bbd6a(0xb3)]??{},_0x5a49dc=_0x1b4559[_0x5bbd6a(0xca)](_0xf30bff=>!!_0x5649a2[_0xf30bff]?.[_0x5bbd6a(0xc7)]);if(_0x5a49dc)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x5bbd6a(0xc4)+_0x1b4559[_0x5bbd6a(0xf7)](',\x20')+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a45_0x2c05b5=a45_0x2bf8;(function(_0x1bdbf7,_0x5ae15f){const _0x24a04c=a45_0x2bf8,_0x11f31c=_0x1bdbf7();while(!![]){try{const _0xfa6c31=parseInt(_0x24a04c(0x1cf))/0x1*(parseInt(_0x24a04c(0x1d0))/0x2)+-parseInt(_0x24a04c(0x1d6))/0x3+parseInt(_0x24a04c(0x1c3))/0x4*(parseInt(_0x24a04c(0x1d5))/0x5)+-parseInt(_0x24a04c(0x1e0))/0x6+-parseInt(_0x24a04c(0x1d7))/0x7+parseInt(_0x24a04c(0x1c4))/0x8*(-parseInt(_0x24a04c(0x1c1))/0x9)+-parseInt(_0x24a04c(0x1c6))/0xa*(-parseInt(_0x24a04c(0x1c7))/0xb);if(_0xfa6c31===_0x5ae15f)break;else _0x11f31c['push'](_0x11f31c['shift']());}catch(_0x330546){_0x11f31c['push'](_0x11f31c['shift']());}}}(a45_0x2071,0x23a46));function a45_0x2bf8(_0x3d49fc,_0x145332){_0x3d49fc=_0x3d49fc-0x1c0;const _0x20715a=a45_0x2071();let _0x2bf85e=_0x20715a[_0x3d49fc];return _0x2bf85e;}import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiModelSource}from'../../api/model-source.js';function a45_0x2071(){const _0x435f94=['495462kGjIgs','1275232KSIpIt','length','lockKey','has','push','datasetCode','\x20modified,\x20','\x20unchanged','bool','1390716etWPXZ','status','all','apiDir','Check\x20local\x20Backend\x20Function\x20sync\x20status\x20against\x20lock\x20file','\x20remote-only','boolean','read','18pLBtjk','hash','8WZOHBw','878056FDURwd','bff','90pxkTPg','1052887AsjrnW','functions','map','filePath','appCode','defaultApp','profileName','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','71859xaZrEw','2VeWCae','All\x20Backend\x20Function\x20scripts\x20are\x20in\x20sync.','remote','alias','currentApp','28270wBeqCt'];a45_0x2071=function(){return _0x435f94;};return a45_0x2071();}import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a45_0x2c05b5(0x1c5),'command':a45_0x2c05b5(0x1e1),'description':a45_0x2c05b5(0x1e4),'risk':a45_0x2c05b5(0x1c0),'flags':[{'name':a45_0x2c05b5(0x1d2),'type':a45_0x2c05b5(0x1e6),'description':a45_0x2c05b5(0x1ce)}],async 'execute'(_0x346ebf){const _0x56f3d4=a45_0x2c05b5,_0x23dfb0=loadBffProjectConfig(_0x346ebf[_0x56f3d4(0x1cb)]),_0xe4e86=await readBffLockFile(_0x23dfb0['lockFilePath']),{appLock:_0x1907c4}=ensureLockScope(_0xe4e86??createEmptyBffLock(),_0x346ebf[_0x56f3d4(0x1cb)],_0x23dfb0['scriptsRoot'],'status'),_0x4d2ba1=await scanLocalBffFunctions(_0x23dfb0),_0x21bf75=[],_0x20cfb0=[],_0x30cbca=[];for(const _0x243a51 of _0x4d2ba1){const _0x3c9666=await computeFileHash(_0x243a51[_0x56f3d4(0x1ca)]),_0x1bdddb=_0x1907c4[_0x56f3d4(0x1c8)][_0x243a51[_0x56f3d4(0x1d9)]];if(!_0x1bdddb)_0x21bf75[_0x56f3d4(0x1db)](_0x243a51[_0x56f3d4(0x1d9)]);else _0x1bdddb[_0x56f3d4(0x1c2)]!==_0x3c9666?_0x20cfb0[_0x56f3d4(0x1db)](_0x243a51[_0x56f3d4(0x1d9)]):_0x30cbca[_0x56f3d4(0x1db)](_0x243a51[_0x56f3d4(0x1d9)]);}const _0x4b18b5=[];if(_0x346ebf[_0x56f3d4(0x1df)]('remote')){const _0x269143=resolveApiModelSource(_0x346ebf[_0x56f3d4(0x1e3)],_0x346ebf[_0x56f3d4(0x1cb)],_0x346ebf['selectedAppName']||_0x346ebf['mergedCli']?.[_0x56f3d4(0x1d4)]||_0x346ebf['mergedCli']?.[_0x56f3d4(0x1cc)]),_0x21a36b=loadAliasMap(_0x346ebf['apiDir'],undefined,_0x269143[_0x56f3d4(0x1ca)],_0x269143[_0x56f3d4(0x1cd)]),_0x4d068c=new Map(_0x21a36b[_0x56f3d4(0x1c9)](_0x45596f=>[_0x45596f[_0x56f3d4(0x1dc)],_0x45596f[_0x56f3d4(0x1d3)]])),[_0x3dfbf9,_0x5567b5]=await Promise[_0x56f3d4(0x1e2)]([listBffScripts(_0x346ebf[_0x56f3d4(0x1cb)]),getBffScriptStatistics(_0x346ebf[_0x56f3d4(0x1cb)])]),_0x53a480=createHookLocationMap(_0x5567b5),_0x158a77=new Set(_0x4d2ba1[_0x56f3d4(0x1c9)](_0x34c207=>_0x34c207[_0x56f3d4(0x1d9)]));for(const _0x189f0c of _0x3dfbf9){const _0x149280=resolveRemoteScriptTarget(_0x23dfb0,_0x189f0c,_0x53a480,_0x1907c4[_0x56f3d4(0x1c8)],_0x4d068c);_0x149280&&!_0x158a77[_0x56f3d4(0x1da)](_0x149280[_0x56f3d4(0x1d9)])&&_0x4b18b5[_0x56f3d4(0x1db)](_0x149280[_0x56f3d4(0x1d9)]);}}const _0x121be3=_0x21bf75[_0x56f3d4(0x1d8)]===0x0&&_0x20cfb0[_0x56f3d4(0x1d8)]===0x0&&_0x4b18b5[_0x56f3d4(0x1d8)]===0x0;return{'ok':!![],'data':{'added':_0x21bf75,'modified':_0x20cfb0,'unchanged':_0x30cbca,'remoteOnly':_0x4b18b5},'message':_0x121be3?_0x56f3d4(0x1d1):_0x21bf75['length']+'\x20added,\x20'+_0x20cfb0[_0x56f3d4(0x1d8)]+_0x56f3d4(0x1dd)+_0x30cbca[_0x56f3d4(0x1d8)]+_0x56f3d4(0x1de)+(_0x4b18b5['length']>0x0?',\x20'+_0x4b18b5['length']+_0x56f3d4(0x1e5):'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a46_0x5c4343=a46_0x6a89;function a46_0x24bd(){const _0xa0b44e=['info','57ApSsoY','code','18lNiVUO','nonInteractive','inherit','setLogPath','skillVersion','install','\x20installed','5353215ujMNHd','cli-skill','3722590rfvYbr','548390vioxqO','CLI\x20Built-in\x20Skill\x20','error','cli-skill-install','31974VYWcOL','pipe','cwd','138ckKbLo','Built-in\x20Skill\x20install\x20failed\x20[','unknown',']:\x20','\x20at\x20','\x20is\x20already\x20current','1006470VGUSge','repairCommand','read','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','51868ZHvUmx','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','installedPath','\x20via\x20skills@latest','changed','3582024WWfdyE'];a46_0x24bd=function(){return _0xa0b44e;};return a46_0x24bd();}(function(_0x45c0a4,_0x3fb25c){const _0x3d4a09=a46_0x6a89,_0x248ef5=_0x45c0a4();while(!![]){try{const _0x29a641=-parseInt(_0x3d4a09(0x6d))/0x1*(parseInt(_0x3d4a09(0x7d))/0x2)+-parseInt(_0x3d4a09(0x80))/0x3*(parseInt(_0x3d4a09(0x8a))/0x4)+parseInt(_0x3d4a09(0x79))/0x5+-parseInt(_0x3d4a09(0x86))/0x6+parseInt(_0x3d4a09(0x76))/0x7+parseInt(_0x3d4a09(0x6b))/0x8*(parseInt(_0x3d4a09(0x6f))/0x9)+parseInt(_0x3d4a09(0x78))/0xa;if(_0x29a641===_0x3fb25c)break;else _0x248ef5['push'](_0x248ef5['shift']());}catch(_0x3b9f1b){_0x248ef5['push'](_0x248ef5['shift']());}}}(a46_0x24bd,0x71f0e));import{CliErrors}from'../../errors.js';function a46_0x6a89(_0x4d3d03,_0x22e4a0){_0x4d3d03=_0x4d3d03-0x67;const _0x24bd16=a46_0x24bd();let _0x6a8999=_0x24bd16[_0x4d3d03];return _0x6a8999;}import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a46_0x5c4343(0x77),'command':a46_0x5c4343(0x74),'description':a46_0x5c4343(0x67),'risk':a46_0x5c4343(0x88),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x295c35){const _0x3a743c=a46_0x5c4343;logger[_0x3a743c(0x72)](process[_0x3a743c(0x7f)]()),logger[_0x3a743c(0x6c)](_0x3a743c(0x7c),_0x3a743c(0x8b));const _0x1a643a=installBuiltinSkill({'stdio':_0x295c35[_0x3a743c(0x70)]?_0x3a743c(0x7e):_0x3a743c(0x71)});if(!_0x1a643a['ok'])throw CliErrors['apiError'](_0x3a743c(0x81)+_0x1a643a[_0x3a743c(0x6e)]+_0x3a743c(0x83)+(_0x1a643a[_0x3a743c(0x7b)]||_0x3a743c(0x82)),_0x3a743c(0x89)+_0x1a643a[_0x3a743c(0x87)]);return console['log'](_0x1a643a[_0x3a743c(0x6a)]?_0x3a743c(0x7a)+_0x1a643a['skillVersion']+_0x3a743c(0x75)+(_0x1a643a[_0x3a743c(0x68)]?_0x3a743c(0x84)+_0x1a643a[_0x3a743c(0x68)]:_0x3a743c(0x69)):_0x3a743c(0x7a)+_0x1a643a[_0x3a743c(0x73)]+_0x3a743c(0x85)+(_0x1a643a[_0x3a743c(0x68)]?'\x20at\x20'+_0x1a643a[_0x3a743c(0x68)]:'')),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a47_0x49e033=a47_0x5470;(function(_0x597ca6,_0x2bf716){const _0x617167=a47_0x5470,_0x3c2948=_0x597ca6();while(!![]){try{const _0x3031f2=-parseInt(_0x617167(0x1b2))/0x1+-parseInt(_0x617167(0x167))/0x2+-parseInt(_0x617167(0x181))/0x3*(parseInt(_0x617167(0x18b))/0x4)+parseInt(_0x617167(0x199))/0x5+-parseInt(_0x617167(0x161))/0x6*(parseInt(_0x617167(0x177))/0x7)+-parseInt(_0x617167(0x191))/0x8*(parseInt(_0x617167(0x1a5))/0x9)+parseInt(_0x617167(0x19c))/0xa*(parseInt(_0x617167(0x1a7))/0xb);if(_0x3031f2===_0x2bf716)break;else _0x3c2948['push'](_0x3c2948['shift']());}catch(_0x14a333){_0x3c2948['push'](_0x3c2948['shift']());}}}(a47_0x10c2,0x75231));import a47_0x5f3680 from'chalk';import a47_0x152e94 from'ora';import a47_0xa2cea4 from'semver';function a47_0x10c2(){const _0x4d6989=['expected\x20','map','bool','trim','Updated\x20to\x20v','691604DgBLDl','info','Update\x20available:\x20','source','object','yellow','24ltfsQl','current','state','latest','Version\x20comparison\x20failed','read','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','pipe','2119535CiOmVc','\x20\x20CLI\x20Built-in\x20Skill\x20','slice','10dsVhuE','Install\x20a\x20specific\x20CLI\x20version','green','...','timeout','log','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','red','Beta\x20version:\x20','1935756nKQFBw','entries','35608199qaxfhL','succeed','valid','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','fromEntries','validation',',\x20then\x20verify\x20with:\x20','start','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','includes','str','687114MXLUJu','execPath','bun','Current\x20version\x20v',']:\x20','\x20install\x20-g\x20','run','894kQdTcm','Checking\x20for\x20updates...','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','boolean','beta','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','1617850mqcJGB','CLI\x20updated\x20to\x20v','\x20is\x20up\x20to\x20date.','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','message','Already\x20up\x20to\x20date\x20(v','toLowerCase','error','unknown','code','npm','version','repairCommand','@latest','Requested\x20version:\x20','Run:\x20','40733bCtqDL','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','skillVersion','\x20→\x20','Already\x20on\x20requested\x20version\x20(v','length','Update\x20failed','string','gray','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','3ebbyfV','Invalid\x20version:\x20','update',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','fail'];a47_0x10c2=function(){return _0x4d6989;};return a47_0x10c2();}import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x24cee1=a47_0x5470;return GIT_COMMIT!==_0x24cee1(0x16f)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x24cee1(0x19b)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x2bdaac=a47_0x5470,_0x40202c=process[_0x2bdaac(0x1b3)][_0x2bdaac(0x16d)]();if(_0x40202c[_0x2bdaac(0x1b0)](_0x2bdaac(0x1b4)))return _0x2bdaac(0x1b4);return _0x2bdaac(0x171);}const updateFlags=[{'name':a47_0x49e033(0x165),'type':a47_0x49e033(0x164),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a47_0x49e033(0x172),'type':a47_0x49e033(0x17e),'description':a47_0x49e033(0x19d)}];function a47_0x5470(_0x268605,_0x415f8a){_0x268605=_0x268605-0x15f;const _0x10c218=a47_0x10c2();let _0x547047=_0x10c218[_0x268605];return _0x547047;}function getRequestedVersion(_0x3de33c){const _0x274fc7=a47_0x49e033;return _0x3de33c[_0x274fc7(0x1b1)](_0x274fc7(0x172))[_0x274fc7(0x189)]();}async function validateUpdateFlags(_0x35f4b9){const _0x180a49=a47_0x49e033,_0x411b1b=_0x35f4b9[_0x180a49(0x188)]('beta'),_0x49ba50=getRequestedVersion(_0x35f4b9);if(_0x411b1b&&_0x49ba50)throw CliErrors[_0x180a49(0x1ac)](_0x180a49(0x163),_0x180a49(0x1af));if(_0x49ba50&&!a47_0xa2cea4[_0x180a49(0x1a9)](_0x49ba50))throw CliErrors[_0x180a49(0x1ac)](_0x180a49(0x182)+_0x49ba50,_0x180a49(0x180));}async function fetchNpmDistTags(){const _0x38ec95=a47_0x49e033;try{const _0x45c131=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0x38ec95(0x1a0)](0x2710)});if(!_0x45c131['ok'])return null;const _0x1d090d=await _0x45c131['json']();if(!_0x1d090d||typeof _0x1d090d!==_0x38ec95(0x18f))return null;return Object[_0x38ec95(0x1ab)](Object[_0x38ec95(0x1a6)](_0x1d090d)['filter'](([,_0x23bf7e])=>typeof _0x23bf7e===_0x38ec95(0x17e)&&_0x23bf7e[_0x38ec95(0x189)]()[_0x38ec95(0x17c)]>0x0)[_0x38ec95(0x187)](([_0x318423,_0x272037])=>[_0x318423,String(_0x272037)[_0x38ec95(0x189)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x4f0abb){const _0x1e38aa=await fetchNpmDistTags();return _0x1e38aa?.[_0x4f0abb]??null;}async function fetchLatestVersion(){const _0x47b602=a47_0x49e033;return fetchNpmDistTagVersion(_0x47b602(0x194));}async function resolveTargetVersion(_0x4d054b){const _0xf4a33d=a47_0x49e033,_0x4ad106=getRequestedVersion(_0x4d054b);if(_0x4ad106)return{'version':_0x4ad106,'source':_0xf4a33d(0x172)};if(_0x4d054b[_0xf4a33d(0x188)]('beta')){const _0x2bc44c=await fetchNpmDistTagVersion('beta');if(!_0x2bc44c)return null;return{'version':_0x2bc44c,'source':'beta'};}const _0x5ac4c2=await fetchLatestVersion();if(!_0x5ac4c2)return null;return{'version':_0x5ac4c2,'source':_0xf4a33d(0x194)};}function shouldInstallTarget(_0x5ad810,_0x285309){const _0x2957f4=a47_0x49e033;if(_0x285309[_0x2957f4(0x18e)]===_0x2957f4(0x172)||_0x285309['source']===_0x2957f4(0x165))return!a47_0xa2cea4['eq'](_0x5ad810,_0x285309[_0x2957f4(0x172)]);return a47_0xa2cea4['lt'](_0x5ad810,_0x285309[_0x2957f4(0x172)]);}function getInstallPlanLabel(_0x16b782,_0x3c53b6){const _0x3dba75=a47_0x49e033;switch(_0x3c53b6[_0x3dba75(0x18e)]){case'beta':return _0x3dba75(0x1a4)+a47_0x5f3680[_0x3dba75(0x190)](_0x16b782)+_0x3dba75(0x17a)+a47_0x5f3680[_0x3dba75(0x19e)](_0x3c53b6[_0x3dba75(0x172)]);case _0x3dba75(0x172):return _0x3dba75(0x175)+a47_0x5f3680['yellow'](_0x16b782)+_0x3dba75(0x17a)+a47_0x5f3680['green'](_0x3c53b6[_0x3dba75(0x172)]);case _0x3dba75(0x194):default:return _0x3dba75(0x18d)+a47_0x5f3680[_0x3dba75(0x190)](_0x16b782)+_0x3dba75(0x17a)+a47_0x5f3680[_0x3dba75(0x19e)](_0x3c53b6['version']);}}function repairCurrentBuiltinSkill(){const _0xb8fe7f=a47_0x49e033;console[_0xb8fe7f(0x1a1)](a47_0x5f3680[_0xb8fe7f(0x17f)]('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x18a6fe=installBuiltinSkill();if(_0x18a6fe['ok']){console[_0xb8fe7f(0x1a1)](a47_0x5f3680[_0xb8fe7f(0x17f)](_0xb8fe7f(0x19a)+_0x18a6fe[_0xb8fe7f(0x179)]+'\x20is\x20up\x20to\x20date.'));return;}throw CliErrors['apiError'](_0xb8fe7f(0x166)+_0x18a6fe[_0xb8fe7f(0x170)]+_0xb8fe7f(0x1b6)+(_0x18a6fe[_0xb8fe7f(0x16e)]||_0xb8fe7f(0x16f)),_0xb8fe7f(0x176)+_0x18a6fe[_0xb8fe7f(0x173)]+_0xb8fe7f(0x1ad)+CLI_BIN_NAME+'\x20doctor');}function verifyUpdatedBuiltinSkill(_0x16bcdf){const _0x396b02=a47_0x49e033,_0xc14e16=inspectInstalledBuiltinSkillVersion(_0x16bcdf);if(_0xc14e16[_0x396b02(0x193)]===_0x396b02(0x192)){console[_0x396b02(0x1a1)](a47_0x5f3680[_0x396b02(0x17f)](_0x396b02(0x19a)+_0x16bcdf+_0x396b02(0x169)));return;}const _0x425af4=_0xc14e16[_0x396b02(0x179)]?_0x396b02(0x186)+_0x16bcdf+',\x20found\x20'+_0xc14e16[_0x396b02(0x179)]:_0x396b02(0x186)+_0x16bcdf+',\x20state\x20'+_0xc14e16[_0x396b02(0x193)];throw CliErrors['apiError'](_0x396b02(0x168)+_0x16bcdf+_0x396b02(0x184)+_0x425af4,_0x396b02(0x176)+_0xc14e16[_0x396b02(0x173)]+_0x396b02(0x1ad)+CLI_BIN_NAME+'\x20doctor');}async function execute(_0x58c28d){const _0x5c14cc=a47_0x49e033;await validateUpdateFlags(_0x58c28d);const _0x178e11=getCurrentVersion();console['log']('Current\x20version:\x20'+_0x178e11);const _0x3db641=a47_0x152e94(_0x5c14cc(0x162))['start'](),_0x2ee962=await resolveTargetVersion(_0x58c28d);if(!_0x2ee962){const _0x8ba13e=_0x58c28d[_0x5c14cc(0x188)](_0x5c14cc(0x165))?_0x5c14cc(0x1aa):_0x5c14cc(0x1a2);return _0x3db641[_0x5c14cc(0x185)](_0x8ba13e),console[_0x5c14cc(0x1a1)](a47_0x5f3680['gray'](_0x5c14cc(0x16a)+NPM_PACKAGE_NAME+_0x5c14cc(0x174))),{'ok':![],'message':_0x8ba13e};}const _0x5aa0ba=a47_0xa2cea4[_0x5c14cc(0x1a9)](VERSION),_0x39f653=a47_0xa2cea4[_0x5c14cc(0x1a9)](_0x2ee962[_0x5c14cc(0x172)]);if(!_0x5aa0ba||!_0x39f653)return _0x3db641['fail'](_0x5c14cc(0x195)),{'ok':![],'message':_0x5c14cc(0x195)};if(!shouldInstallTarget(_0x5aa0ba,_0x2ee962)){const _0x31f991=_0x2ee962['source']==='version'?_0x5c14cc(0x17b)+_0x2ee962[_0x5c14cc(0x172)]+')':a47_0xa2cea4['gt'](_0x5aa0ba,_0x39f653)?_0x5c14cc(0x1b5)+_0x178e11+'\x20is\x20newer\x20than\x20npm\x20latest\x20v'+_0x2ee962[_0x5c14cc(0x172)]:_0x5c14cc(0x16c)+_0x2ee962[_0x5c14cc(0x172)]+')';return _0x3db641[_0x5c14cc(0x1a8)](_0x31f991),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x3db641[_0x5c14cc(0x18c)](getInstallPlanLabel(_0x178e11,_0x2ee962));const _0x35f5fc=detectPackageManager(),_0x2a5eb3=_0x35f5fc===_0x5c14cc(0x171)?resolveNpmBin(_0x5c14cc(0x171)):_0x35f5fc,_0x2e7160=a47_0x152e94('Updating\x20via\x20'+_0x35f5fc+_0x5c14cc(0x19f))[_0x5c14cc(0x1ae)]();try{await execa(_0x2a5eb3,['install','-g',NPM_PACKAGE_NAME+'@'+_0x2ee962[_0x5c14cc(0x172)]],{'stdio':_0x5c14cc(0x198)}),_0x2e7160['succeed'](_0x5c14cc(0x18a)+_0x2ee962['version']),console[_0x5c14cc(0x1a1)](a47_0x5f3680[_0x5c14cc(0x17f)](_0x5c14cc(0x197)));}catch(_0x3df497){return _0x2e7160[_0x5c14cc(0x185)](_0x5c14cc(0x17d)),console[_0x5c14cc(0x16e)](a47_0x5f3680[_0x5c14cc(0x1a3)]('\x20\x20'+_0x3df497[_0x5c14cc(0x16b)])),console[_0x5c14cc(0x1a1)](a47_0x5f3680[_0x5c14cc(0x17f)]('\x20\x20Try\x20manually:\x20'+_0x35f5fc+_0x5c14cc(0x15f)+NPM_PACKAGE_NAME+'@'+_0x2ee962[_0x5c14cc(0x172)])),{'ok':![],'message':_0x3df497[_0x5c14cc(0x16b)]};}return verifyUpdatedBuiltinSkill(_0x2ee962[_0x5c14cc(0x172)]),{'ok':!![]};}export const updateDefinition={'service':a47_0x49e033(0x183),'command':a47_0x49e033(0x160),'description':a47_0x49e033(0x178),'risk':a47_0x49e033(0x196),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
function a47_0x7678(){const _0x128628=['\x20install\x20-g\x20',',\x20state\x20','message','yellow','validation','pipe','log','\x20\x20Try\x20manually:\x20','bun','info','24vTqOsj','object','\x20\x20CLI\x20Built-in\x20Skill\x20','source','254024sGutFg','Current\x20version\x20v','state','Checking\x20CLI\x20Built-in\x20Skill...','str','\x20→\x20','map','Requested\x20version:\x20','6BLwoat','length','bool','npm','3917473bBpXsz','update','read','Invalid\x20version:\x20','1883822KudFiv','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','install','\x20is\x20up\x20to\x20date.','run','code','current','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','\x20doctor','Checking\x20for\x20updates...',']:\x20','toLowerCase','apiError','Updated\x20to\x20v','unknown','boolean','red','20383770uUzmay',',\x20then\x20verify\x20with:\x20','trim','Version\x20comparison\x20failed','7048cjocTa',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','Update\x20failed','beta','filter','json','string','448807eYsKay','version','fail','repairCommand','666HMjDAr',',\x20found\x20','614300yEHxHG','Updating\x20via\x20','CLI\x20updated\x20to\x20v','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','valid','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','expected\x20','start','Run:\x20','skillVersion','execPath','latest','green','succeed','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','Already\x20on\x20requested\x20version\x20(v','gray'];a47_0x7678=function(){return _0x128628;};return a47_0x7678();}const a47_0x2e823b=a47_0x5c56;(function(_0x5f0c9f,_0x822f07){const _0x4acedf=a47_0x5c56,_0x53d418=_0x5f0c9f();while(!![]){try{const _0x740ae4=parseInt(_0x4acedf(0x1a0))/0x1+parseInt(_0x4acedf(0x1d5))/0x2+-parseInt(_0x4acedf(0x1c1))/0x3*(-parseInt(_0x4acedf(0x1c5))/0x4)+parseInt(_0x4acedf(0x1a6))/0x5+parseInt(_0x4acedf(0x1cd))/0x6*(parseInt(_0x4acedf(0x1d1))/0x7)+-parseInt(_0x4acedf(0x1ea))/0x8*(-parseInt(_0x4acedf(0x1a4))/0x9)+-parseInt(_0x4acedf(0x1e6))/0xa;if(_0x740ae4===_0x822f07)break;else _0x53d418['push'](_0x53d418['shift']());}catch(_0x1da2d4){_0x53d418['push'](_0x53d418['shift']());}}}(a47_0x7678,0x94752));import a47_0x505ec2 from'chalk';import a47_0x1a6103 from'ora';import a47_0x1b65c3 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 a47_0x5c56(_0x205f27,_0x1a88fb){_0x205f27=_0x205f27-0x19f;const _0x7678a8=a47_0x7678();let _0x5c5616=_0x7678a8[_0x205f27];return _0x5c5616;}function getCurrentVersion(){const _0x45a5bb=a47_0x5c56;return GIT_COMMIT!==_0x45a5bb(0x1e3)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x356a18=a47_0x5c56,_0xfd17b3=process[_0x356a18(0x1b0)][_0x356a18(0x1e0)]();if(_0xfd17b3['includes']('bun'))return _0x356a18(0x1bf);return'npm';}const updateFlags=[{'name':a47_0x2e823b(0x1ed),'type':a47_0x2e823b(0x1e4),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a47_0x2e823b(0x1a1),'type':a47_0x2e823b(0x19f),'description':'Install\x20a\x20specific\x20CLI\x20version'}];function getRequestedVersion(_0x51f7ba){const _0x47e779=a47_0x2e823b;return _0x51f7ba[_0x47e779(0x1c9)](_0x47e779(0x1a1))[_0x47e779(0x1e8)]();}async function validateUpdateFlags(_0xb5c63a){const _0x481d69=a47_0x2e823b,_0x28611d=_0xb5c63a[_0x481d69(0x1cf)]('beta'),_0xa05ff7=getRequestedVersion(_0xb5c63a);if(_0x28611d&&_0xa05ff7)throw CliErrors[_0x481d69(0x1bb)]('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.',_0x481d69(0x1a9));if(_0xa05ff7&&!a47_0x1b65c3[_0x481d69(0x1aa)](_0xa05ff7))throw CliErrors[_0x481d69(0x1bb)](_0x481d69(0x1d4)+_0xa05ff7,_0x481d69(0x1dc));}async function fetchNpmDistTags(){const _0x5bec18=a47_0x2e823b;try{const _0x25af19=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal['timeout'](0x2710)});if(!_0x25af19['ok'])return null;const _0x54736e=await _0x25af19[_0x5bec18(0x1ef)]();if(!_0x54736e||typeof _0x54736e!==_0x5bec18(0x1c2))return null;return Object['fromEntries'](Object['entries'](_0x54736e)[_0x5bec18(0x1ee)](([,_0x547e7f])=>typeof _0x547e7f==='string'&&_0x547e7f[_0x5bec18(0x1e8)]()[_0x5bec18(0x1ce)]>0x0)[_0x5bec18(0x1cb)](([_0x403c96,_0x59407e])=>[_0x403c96,String(_0x59407e)[_0x5bec18(0x1e8)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x29eee2){const _0x40e22f=await fetchNpmDistTags();return _0x40e22f?.[_0x29eee2]??null;}async function fetchLatestVersion(){const _0x2321af=a47_0x2e823b;return fetchNpmDistTagVersion(_0x2321af(0x1b1));}async function resolveTargetVersion(_0xf0ae5f){const _0x4083d0=a47_0x2e823b,_0x3f6e91=getRequestedVersion(_0xf0ae5f);if(_0x3f6e91)return{'version':_0x3f6e91,'source':_0x4083d0(0x1a1)};if(_0xf0ae5f[_0x4083d0(0x1cf)](_0x4083d0(0x1ed))){const _0xbda9dc=await fetchNpmDistTagVersion(_0x4083d0(0x1ed));if(!_0xbda9dc)return null;return{'version':_0xbda9dc,'source':'beta'};}const _0x4bef40=await fetchLatestVersion();if(!_0x4bef40)return null;return{'version':_0x4bef40,'source':_0x4083d0(0x1b1)};}function shouldInstallTarget(_0x235dd8,_0x20ae4b){const _0x22559e=a47_0x2e823b;if(_0x20ae4b['source']==='version'||_0x20ae4b[_0x22559e(0x1c4)]===_0x22559e(0x1ed))return!a47_0x1b65c3['eq'](_0x235dd8,_0x20ae4b['version']);return a47_0x1b65c3['lt'](_0x235dd8,_0x20ae4b[_0x22559e(0x1a1)]);}function getInstallPlanLabel(_0x1ddea2,_0x384d18){const _0x3c8dd5=a47_0x2e823b;switch(_0x384d18[_0x3c8dd5(0x1c4)]){case'beta':return'Beta\x20version:\x20'+a47_0x505ec2[_0x3c8dd5(0x1ba)](_0x1ddea2)+_0x3c8dd5(0x1ca)+a47_0x505ec2[_0x3c8dd5(0x1b2)](_0x384d18[_0x3c8dd5(0x1a1)]);case _0x3c8dd5(0x1a1):return _0x3c8dd5(0x1cc)+a47_0x505ec2[_0x3c8dd5(0x1ba)](_0x1ddea2)+_0x3c8dd5(0x1ca)+a47_0x505ec2['green'](_0x384d18[_0x3c8dd5(0x1a1)]);case _0x3c8dd5(0x1b1):default:return'Update\x20available:\x20'+a47_0x505ec2[_0x3c8dd5(0x1ba)](_0x1ddea2)+_0x3c8dd5(0x1ca)+a47_0x505ec2[_0x3c8dd5(0x1b2)](_0x384d18['version']);}}function repairCurrentBuiltinSkill(){const _0x27f606=a47_0x2e823b;console[_0x27f606(0x1bd)](a47_0x505ec2[_0x27f606(0x1b6)](_0x27f606(0x1c8)));const _0xc29367=installBuiltinSkill();if(_0xc29367['ok']){console[_0x27f606(0x1bd)](a47_0x505ec2['gray'](_0x27f606(0x1c3)+_0xc29367[_0x27f606(0x1af)]+_0x27f606(0x1d8)));return;}throw CliErrors[_0x27f606(0x1e1)](_0x27f606(0x1ab)+_0xc29367[_0x27f606(0x1da)]+_0x27f606(0x1df)+(_0xc29367['error']||_0x27f606(0x1e3)),_0x27f606(0x1ae)+_0xc29367[_0x27f606(0x1a3)]+_0x27f606(0x1e7)+CLI_BIN_NAME+_0x27f606(0x1dd));}function verifyUpdatedBuiltinSkill(_0x50a8cd){const _0x350303=a47_0x2e823b,_0x91b448=inspectInstalledBuiltinSkillVersion(_0x50a8cd);if(_0x91b448[_0x350303(0x1c7)]===_0x350303(0x1db)){console[_0x350303(0x1bd)](a47_0x505ec2['gray'](_0x350303(0x1c3)+_0x50a8cd+'\x20is\x20up\x20to\x20date.'));return;}const _0xa3d6ba=_0x91b448[_0x350303(0x1af)]?_0x350303(0x1ac)+_0x50a8cd+_0x350303(0x1a5)+_0x91b448[_0x350303(0x1af)]:_0x350303(0x1ac)+_0x50a8cd+_0x350303(0x1b8)+_0x91b448['state'];throw CliErrors[_0x350303(0x1e1)](_0x350303(0x1a8)+_0x50a8cd+_0x350303(0x1eb)+_0xa3d6ba,_0x350303(0x1ae)+_0x91b448['repairCommand']+_0x350303(0x1e7)+CLI_BIN_NAME+_0x350303(0x1dd));}async function execute(_0x58f93e){const _0xfb580=a47_0x2e823b;await validateUpdateFlags(_0x58f93e);const _0x807657=getCurrentVersion();console[_0xfb580(0x1bd)]('Current\x20version:\x20'+_0x807657);const _0x3efdf2=a47_0x1a6103(_0xfb580(0x1de))[_0xfb580(0x1ad)](),_0x18a340=await resolveTargetVersion(_0x58f93e);if(!_0x18a340){const _0x48480b=_0x58f93e[_0xfb580(0x1cf)]('beta')?_0xfb580(0x1d6):'Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)';return _0x3efdf2[_0xfb580(0x1a2)](_0x48480b),console['log'](a47_0x505ec2[_0xfb580(0x1b6)]('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x48480b};}const _0x58a015=a47_0x1b65c3['valid'](VERSION),_0x2371f7=a47_0x1b65c3[_0xfb580(0x1aa)](_0x18a340[_0xfb580(0x1a1)]);if(!_0x58a015||!_0x2371f7)return _0x3efdf2[_0xfb580(0x1a2)]('Version\x20comparison\x20failed'),{'ok':![],'message':_0xfb580(0x1e9)};if(!shouldInstallTarget(_0x58a015,_0x18a340)){const _0xf5370c=_0x18a340[_0xfb580(0x1c4)]===_0xfb580(0x1a1)?_0xfb580(0x1b5)+_0x18a340['version']+')':a47_0x1b65c3['gt'](_0x58a015,_0x2371f7)?_0xfb580(0x1c6)+_0x807657+'\x20is\x20newer\x20than\x20npm\x20latest\x20v'+_0x18a340[_0xfb580(0x1a1)]:'Already\x20up\x20to\x20date\x20(v'+_0x18a340[_0xfb580(0x1a1)]+')';return _0x3efdf2['succeed'](_0xf5370c),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x3efdf2[_0xfb580(0x1c0)](getInstallPlanLabel(_0x807657,_0x18a340));const _0x3889ba=detectPackageManager(),_0x2c931a=_0x3889ba==='npm'?resolveNpmBin(_0xfb580(0x1d0)):_0x3889ba,_0x5a7d41=a47_0x1a6103(_0xfb580(0x1a7)+_0x3889ba+'...')[_0xfb580(0x1ad)]();try{await execa(_0x2c931a,[_0xfb580(0x1d7),'-g',NPM_PACKAGE_NAME+'@'+_0x18a340['version']],{'stdio':_0xfb580(0x1bc)}),_0x5a7d41[_0xfb580(0x1b3)](_0xfb580(0x1e2)+_0x18a340['version']),console['log'](a47_0x505ec2[_0xfb580(0x1b6)](_0xfb580(0x1b4)));}catch(_0x4250ec){return _0x5a7d41[_0xfb580(0x1a2)](_0xfb580(0x1ec)),console['error'](a47_0x505ec2[_0xfb580(0x1e5)]('\x20\x20'+_0x4250ec['message'])),console[_0xfb580(0x1bd)](a47_0x505ec2[_0xfb580(0x1b6)](_0xfb580(0x1be)+_0x3889ba+_0xfb580(0x1b7)+NPM_PACKAGE_NAME+'@'+_0x18a340['version'])),{'ok':![],'message':_0x4250ec[_0xfb580(0x1b9)]};}return verifyUpdatedBuiltinSkill(_0x18a340[_0xfb580(0x1a1)]),{'ok':!![]};}export const updateDefinition={'service':a47_0x2e823b(0x1d2),'command':a47_0x2e823b(0x1d9),'description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':a47_0x2e823b(0x1d3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x128892,_0x551a00){const _0x1ce239=a48_0x2a50,_0x455708=_0x128892();while(!![]){try{const _0x432a2f=-parseInt(_0x1ce239(0x15b))/0x1+parseInt(_0x1ce239(0x15d))/0x2+-parseInt(_0x1ce239(0x159))/0x3*(parseInt(_0x1ce239(0x15a))/0x4)+parseInt(_0x1ce239(0x15f))/0x5*(-parseInt(_0x1ce239(0x15e))/0x6)+-parseInt(_0x1ce239(0x156))/0x7+-parseInt(_0x1ce239(0x157))/0x8*(-parseInt(_0x1ce239(0x158))/0x9)+parseInt(_0x1ce239(0x15c))/0xa;if(_0x432a2f===_0x551a00)break;else _0x455708['push'](_0x455708['shift']());}catch(_0x524ef5){_0x455708['push'](_0x455708['shift']());}}}(a48_0x10b2,0x7efdb));function a48_0x10b2(){const _0x1d6d76=['1909488eosWoi','2241928zdJWFk','18xnRgZz','2359902HleASz','4mUBmQn','164502NQJJkX','17432670gUYXdY','818364PfrBrw','484428nWWxUe','60puWbWY'];a48_0x10b2=function(){return _0x1d6d76;};return a48_0x10b2();}function a48_0x2a50(_0xc561f5,_0x4227ac){_0xc561f5=_0xc561f5-0x156;const _0x10b2af=a48_0x10b2();let _0x2a50c3=_0x10b2af[_0xc561f5];return _0x2a50c3;}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a49_0x1f96f4=a49_0x2f62;(function(_0x3e5f58,_0x301b52){const _0x136240=a49_0x2f62,_0x565911=_0x3e5f58();while(!![]){try{const _0x5efd46=parseInt(_0x136240(0x1a5))/0x1*(parseInt(_0x136240(0x1b3))/0x2)+parseInt(_0x136240(0x1b8))/0x3*(parseInt(_0x136240(0x1b5))/0x4)+-parseInt(_0x136240(0x1b4))/0x5+-parseInt(_0x136240(0x1a9))/0x6*(parseInt(_0x136240(0x1ae))/0x7)+parseInt(_0x136240(0x1b6))/0x8*(parseInt(_0x136240(0x1b2))/0x9)+-parseInt(_0x136240(0x1b1))/0xa+parseInt(_0x136240(0x1a6))/0xb;if(_0x5efd46===_0x301b52)break;else _0x565911['push'](_0x565911['shift']());}catch(_0x214b29){_0x565911['push'](_0x565911['shift']());}}}(a49_0x3e4e,0x8addb));function a49_0x3e4e(){const _0x211a1f=['boolean','alias','6GzNCIF','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','bool','str','codegen','4631669LngYjZ','appCode','Omit\x20import\x20statements\x20from\x20generated\x20code','8334960fnZkqP','1529181MqztOt','54MLxiHX','1387720egYCbz','52fwXwmK','8DaAJxe','skip-imports','247647Obcotu','operation','read','code','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','string','name','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','29537JUCNwk','3310527ctYhsS'];a49_0x3e4e=function(){return _0x211a1f;};return a49_0x3e4e();}function a49_0x2f62(_0x28297f,_0x2d4c3f){_0x28297f=_0x28297f-0x1a4;const _0x3e4ede=a49_0x3e4e();let _0x2f62a2=_0x3e4ede[_0x28297f];return _0x2f62a2;}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a49_0x1f96f4(0x1ad),'command':'sdk','description':a49_0x1f96f4(0x1aa),'risk':a49_0x1f96f4(0x1ba),'flags':[CODE_FLAG_OPTIONAL,{'name':a49_0x1f96f4(0x1a8),'type':a49_0x1f96f4(0x1bd),'description':a49_0x1f96f4(0x1bc)},{'name':'operation','type':a49_0x1f96f4(0x1bd),'required':!![],'description':a49_0x1f96f4(0x1a4)},{'name':a49_0x1f96f4(0x1b7),'type':a49_0x1f96f4(0x1a7),'description':a49_0x1f96f4(0x1b0)}],async 'execute'(_0x4254ba){const _0x19f152=a49_0x1f96f4,{dataset:_0x206f19,operation:_0x4352e3}=await getOperationDetail(_0x4254ba[_0x19f152(0x1af)],_0x4254ba[_0x19f152(0x1ac)]('code'),_0x4254ba[_0x19f152(0x1ac)](_0x19f152(0x1b9))),_0x54a93e=generateSdkCode(_0x206f19,_0x4352e3,{'includeImports':!_0x4254ba[_0x19f152(0x1ab)](_0x19f152(0x1b7))});return{'ok':!![],'data':{'dataset':{'name':_0x206f19[_0x19f152(0x1be)],'code':_0x206f19[_0x19f152(0x1bb)],'tableName':_0x206f19['tableName']},'operation':_0x4254ba[_0x19f152(0x1ac)](_0x19f152(0x1b9)),'code':_0x54a93e}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a50_0x3c65bc=a50_0x43d4;(function(_0x580b9c,_0x2a1099){const _0x17c373=a50_0x43d4,_0x295dcf=_0x580b9c();while(!![]){try{const _0x1c88f5=parseInt(_0x17c373(0xd7))/0x1+parseInt(_0x17c373(0xc8))/0x2*(-parseInt(_0x17c373(0xc5))/0x3)+parseInt(_0x17c373(0xc6))/0x4*(-parseInt(_0x17c373(0xda))/0x5)+-parseInt(_0x17c373(0xcd))/0x6+-parseInt(_0x17c373(0xd1))/0x7+parseInt(_0x17c373(0xd4))/0x8+-parseInt(_0x17c373(0xcb))/0x9*(-parseInt(_0x17c373(0xce))/0xa);if(_0x1c88f5===_0x2a1099)break;else _0x295dcf['push'](_0x295dcf['shift']());}catch(_0x4b248b){_0x295dcf['push'](_0x295dcf['shift']());}}}(a50_0x8213,0x3c6b1));function a50_0x43d4(_0x2e39ba,_0x5077cf){_0x2e39ba=_0x2e39ba-0xc4;const _0x82138a=a50_0x8213();let _0x43d41f=_0x82138a[_0x2e39ba];return _0x43d41f;}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a50_0x8213(){const _0x69ba57=['bool','5oFDNvz','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','sqlcode','no-imports','sqlCode','36ALzGJi','193484TrrmDm','appCode','35936sMxLCB','boolean','sdk','9zsrdoZ','sql','665754AENCBB','6407980DvSxYK','target','sqlName','1869672uNaxuO','Omit\x20import\x20statements\x20from\x20generated\x20code','codegen','1749624JwvSCo','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','string','30014BUuGOy','str'];a50_0x8213=function(){return _0x69ba57;};return a50_0x8213();}export const codegenSql={'service':a50_0x3c65bc(0xd3),'command':a50_0x3c65bc(0xcc),'description':a50_0x3c65bc(0xd5),'risk':'read','flags':[SQLCODE_FLAG,{'name':a50_0x3c65bc(0xcf),'type':a50_0x3c65bc(0xd6),'description':a50_0x3c65bc(0xdb),'default':a50_0x3c65bc(0xca),'enum':[a50_0x3c65bc(0xca),'bff']},{'name':a50_0x3c65bc(0xdd),'type':a50_0x3c65bc(0xc9),'description':a50_0x3c65bc(0xd2)}],async 'execute'(_0x53a938){const _0x5825cf=a50_0x3c65bc,_0x3dd656=await getSqlQueryInfo(_0x53a938[_0x5825cf(0xc7)],_0x53a938[_0x5825cf(0xd8)](_0x5825cf(0xdc))),_0x3d09d9=_0x53a938[_0x5825cf(0xd8)](_0x5825cf(0xcf))||_0x5825cf(0xca),_0x91da85=generateSqlCodeTemplate(_0x3dd656,{'target':_0x3d09d9,'includeImports':!_0x53a938[_0x5825cf(0xd9)](_0x5825cf(0xdd))});return{'ok':!![],'data':{'sqlCode':_0x3dd656[_0x5825cf(0xc4)],'sqlName':_0x3dd656[_0x5825cf(0xd0)],'target':_0x3d09d9,'code':_0x91da85}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x389c5a,_0x51f62c){const _0xb5c47b=a51_0x411a,_0x1f6260=_0x389c5a();while(!![]){try{const _0x471eda=-parseInt(_0xb5c47b(0x88))/0x1*(parseInt(_0xb5c47b(0x90))/0x2)+-parseInt(_0xb5c47b(0x7c))/0x3*(parseInt(_0xb5c47b(0x80))/0x4)+parseInt(_0xb5c47b(0x7a))/0x5+-parseInt(_0xb5c47b(0x86))/0x6*(parseInt(_0xb5c47b(0x8a))/0x7)+parseInt(_0xb5c47b(0x8f))/0x8*(parseInt(_0xb5c47b(0x97))/0x9)+-parseInt(_0xb5c47b(0x8c))/0xa+-parseInt(_0xb5c47b(0x89))/0xb*(-parseInt(_0xb5c47b(0x77))/0xc);if(_0x471eda===_0x51f62c)break;else _0x1f6260['push'](_0x1f6260['shift']());}catch(_0x486e9e){_0x1f6260['push'](_0x1f6260['shift']());}}}(a51_0x36e4,0xe4cdf));import{CliErrors}from'../../errors.js';function a51_0x36e4(){const _0x5bd6da=['args','\x20config.','3596eMBSxA','Updated','object','globalConfig','\x22\x20(appcode:\x20','\x20Default\x20app\x20changed\x20to\x20\x22','3673398oEoMKw','validation','7vTxTvN','66IidcLp','21smuZIx','\x20app\x20\x22','15631390xdgRbD','appcode','\x20Remaining\x20app\x20\x22','128pAJHKg','463738IiMBjw','\x22\x20not\x20found.','boolean','keys','Use\x20global\x20config\x20scope','defaultApp','bool','874881QmNsgV','\x20Note:\x20app\x20\x22','str','trim','Usage:\x20','flagMissing','Missing\x20app\x20name.','length','apps','\x22\x20still\x20defined\x20in\x20','Removed\x20app\x20\x22','\x20<name>','global','9394104cohcvU','App\x20\x22','projectConfig','1635595mgzWEw','string','2067rfswyD','\x20<name>\x20--appcode\x20<code>'];a51_0x36e4=function(){return _0x5bd6da;};return a51_0x36e4();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs,normalizeStoredDefaultApp}from'../../config/schema.js';function a51_0x411a(_0x485b9c,_0x1b265f){_0x485b9c=_0x485b9c-0x71;const _0x36e4f0=a51_0x36e4();let _0x411a46=_0x36e4f0[_0x485b9c];return _0x411a46;}import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x36a52b=a51_0x411a;return[{'name':_0x36a52b(0x8d),'type':_0x36a52b(0x7b),'description':'App\x20code','required':!![]},{'name':_0x36a52b(0x76),'type':'boolean','description':_0x36a52b(0x94),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x43b087=a51_0x411a;return[{'name':_0x43b087(0x76),'type':_0x43b087(0x92),'description':_0x43b087(0x94),'default':![]}];}export async function validateAppName(_0x1dd59d,_0x5ebaef){const _0x53fdde=a51_0x411a,_0x4423ab=_0x1dd59d['args'][0x0]?.['trim']();if(!_0x4423ab)throw CliErrors[_0x53fdde(0x87)](_0x53fdde(0x9d),_0x53fdde(0x9b)+CLI_BIN_NAME+'\x20'+_0x5ebaef+_0x53fdde(0x75));}export async function runAppAdd(_0xcb2b29,_0x1c5057){const _0x56241d=a51_0x411a,_0x411e28=_0xcb2b29[_0x56241d(0x7e)][0x0]?.[_0x56241d(0x9a)]();if(!_0x411e28)throw CliErrors[_0x56241d(0x87)]('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x1c5057+_0x56241d(0x7d));const _0x4a99b9=_0xcb2b29[_0x56241d(0x99)](_0x56241d(0x8d));if(!_0x4a99b9)throw CliErrors[_0x56241d(0x9c)](_0x56241d(0x8d),_0x56241d(0x9b)+CLI_BIN_NAME+'\x20'+_0x1c5057+_0x56241d(0x7d));const _0x5bbf6a={'global':_0xcb2b29[_0x56241d(0x96)](_0x56241d(0x76))},_0x5c274c=readConfig(_0x5bbf6a);if(!_0x5c274c[_0x56241d(0x72)])_0x5c274c['apps']={};const _0x205a9d={'appcode':_0x4a99b9,...collectAppProfileOverrides(_0x115c02=>_0xcb2b29[_0x56241d(0x99)](_0x115c02))},_0x24ef45=_0x5c274c[_0x56241d(0x72)],_0x2d78f0=Object[_0x56241d(0x93)](_0x24ef45),_0x4b135c=typeof _0x5c274c[_0x56241d(0x95)]===_0x56241d(0x7b)&&_0x24ef45[_0x5c274c[_0x56241d(0x95)]]?_0x5c274c[_0x56241d(0x95)]:_0x2d78f0[_0x56241d(0x71)]===0x1?_0x2d78f0[0x0]:undefined,_0x12485b=!!_0x24ef45[_0x411e28];_0x24ef45[_0x411e28]=_0x205a9d;const _0x589001=normalizeStoredDefaultApp(_0x5c274c,_0x4b135c);writeConfig(_0x5c274c,_0x5bbf6a);const _0x20b3fe=!_0x12485b&&_0x589001?'\x20Default\x20app\x20is\x20\x22'+_0x589001+'\x22.':'',_0x307dc7=(_0x12485b?_0x56241d(0x81):'Added')+_0x56241d(0x8b)+_0x411e28+_0x56241d(0x84)+_0x4a99b9+')'+scopeLabel(_0x5bbf6a)+'.'+_0x20b3fe;return{'ok':!![],'message':_0x307dc7};}export async function runAppRemove(_0x452aec,_0x358fe2){const _0x58d8f9=a51_0x411a,_0x7dc8da=_0x452aec[_0x58d8f9(0x7e)][0x0]?.[_0x58d8f9(0x9a)]();if(!_0x7dc8da)throw CliErrors[_0x58d8f9(0x87)]('Missing\x20app\x20name.',_0x58d8f9(0x9b)+CLI_BIN_NAME+'\x20'+_0x358fe2+'\x20<name>\x20[--global]');const _0x8a2868=_0x452aec['bool'](_0x58d8f9(0x76)),{config:_0x3b6e40,layers:_0x1382b2}=readRawConfigWithLayers(),_0x3796fc=_0x3b6e40['apps']??{};if(!_0x3796fc[_0x7dc8da])throw CliErrors[_0x58d8f9(0x87)](_0x58d8f9(0x78)+_0x7dc8da+_0x58d8f9(0x91));const _0x489663=_0x1382b2['globalConfig'][_0x58d8f9(0x72)]&&typeof _0x1382b2[_0x58d8f9(0x83)][_0x58d8f9(0x72)]===_0x58d8f9(0x82)?_0x1382b2[_0x58d8f9(0x83)][_0x58d8f9(0x72)]:{},_0x367cd0=_0x1382b2['projectConfig'][_0x58d8f9(0x72)]&&typeof _0x1382b2[_0x58d8f9(0x79)][_0x58d8f9(0x72)]===_0x58d8f9(0x82)?_0x1382b2[_0x58d8f9(0x79)][_0x58d8f9(0x72)]:{},_0x5544c9=appDefinedIn(_0x7dc8da,_0x489663,_0x367cd0),_0xb255c8=resolveAppScopeForWrite(_0x7dc8da,_0x8a2868,_0x1382b2),_0x2c9688={'global':_0xb255c8===_0x58d8f9(0x76)},_0x3bacdf=readConfig(_0x2c9688),_0x3412e8=_0x3bacdf[_0x58d8f9(0x72)];if(!_0x3412e8||!_0x3412e8[_0x7dc8da])throw CliErrors[_0x58d8f9(0x87)](_0x58d8f9(0x78)+_0x7dc8da+_0x58d8f9(0x91));delete _0x3412e8[_0x7dc8da];let _0x1bf78a='';const _0x44df16=typeof _0x3bacdf[_0x58d8f9(0x95)]==='string'?_0x3bacdf[_0x58d8f9(0x95)]:undefined,_0xdb7c71=Object[_0x58d8f9(0x93)](_0x3412e8),_0x54eac7=_0x44df16===_0x7dc8da?_0xdb7c71[0x0]:_0x44df16,_0x41f009=normalizeStoredDefaultApp(_0x3bacdf,_0x54eac7);if(_0x44df16===_0x7dc8da&&_0xdb7c71['length']===0x1)_0x1bf78a=_0x58d8f9(0x8e)+_0xdb7c71[0x0]+'\x22\x20is\x20selected\x20automatically.';else _0x44df16===_0x7dc8da&&_0x41f009&&(_0x1bf78a=_0x58d8f9(0x85)+_0x41f009+'\x22.');Object[_0x58d8f9(0x93)](_0x3412e8)[_0x58d8f9(0x71)]===0x0&&(delete _0x3bacdf[_0x58d8f9(0x72)],delete _0x3bacdf[_0x58d8f9(0x95)]);writeConfig(_0x3bacdf,_0x2c9688);const _0xe25131=_0x5544c9==='both'?_0x58d8f9(0x98)+_0x7dc8da+_0x58d8f9(0x73)+(_0xb255c8==='project'?_0x58d8f9(0x76):'project')+_0x58d8f9(0x7f):'';return{'ok':!![],'message':_0x58d8f9(0x74)+_0x7dc8da+'\x22'+scopeLabel(_0x2c9688)+'.'+_0x1bf78a+_0xe25131};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3743d9,_0x113219){const _0x5aa38f=a52_0x5384,_0x8e71a4=_0x3743d9();while(!![]){try{const _0x15b13e=-parseInt(_0x5aa38f(0xd7))/0x1*(parseInt(_0x5aa38f(0xcc))/0x2)+-parseInt(_0x5aa38f(0xc4))/0x3*(parseInt(_0x5aa38f(0xbe))/0x4)+parseInt(_0x5aa38f(0xd8))/0x5+-parseInt(_0x5aa38f(0xd4))/0x6+parseInt(_0x5aa38f(0xc5))/0x7+-parseInt(_0x5aa38f(0xdc))/0x8+parseInt(_0x5aa38f(0xcf))/0x9*(parseInt(_0x5aa38f(0xc1))/0xa);if(_0x15b13e===_0x113219)break;else _0x8e71a4['push'](_0x8e71a4['shift']());}catch(_0x1b5bbb){_0x8e71a4['push'](_0x8e71a4['shift']());}}}(a52_0x35a3,0xeb323));import{input,checkbox,select}from'@inquirer/prompts';import a52_0x37d938 from'chalk';function a52_0x5384(_0x5b3117,_0x57e7f2){_0x5b3117=_0x5b3117-0xba;const _0x35a359=a52_0x35a3();let _0x538490=_0x35a359[_0x5b3117];return _0x538490;}import{validateAppcode}from'../../commands/common/validate.js';function a52_0x35a3(){const _0x100d8b=['(No\x20login\x20session.\x20Enter\x20an\x20App\x20Code\x20manually\x20or\x20skip.)','26027090rmKaHb','✎\x20Enter\x20appcode\x20manually','message','3442197ZPiNbk','10792845xDvGYE','Fetching\x20available\x20apps...','\x0aCould\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','includes','(Skip;\x20configure\x20later\x20with\x20config\x20set\x20appcode)','\x20\x20(','gray','10198pRFHKh','find','No\x20available\x20apps\x20found.','9cqKvdb','custom','map','appName','valid','8856444jXsaSw','appCode','length','71pOTGMX','4313835urmnZW','Select\x20the\x20app\x20to\x20bind:','Found\x20','Could\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','8467568Qvcnbf','(Skip;\x20configure\x20later)','yellow','skip','\x20apps.\x20Select\x20with\x20space,\x20a=all,\x20i=invert:','App\x20Code:','trim','4WIZMBY','cyan'];a52_0x35a3=function(){return _0x100d8b;};return a52_0x35a3();}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 _0x4b1c74=a52_0x5384,_0x548077=await input({'message':_0x4b1c74(0xbc),'validate':_0x55b15f=>{const _0x25fadc=_0x4b1c74,_0x18c522=validateAppcode(_0x55b15f[_0x25fadc(0xbd)]());return _0x18c522[_0x25fadc(0xd3)]||_0x18c522[_0x25fadc(0xc3)]||'Invalid\x20App\x20Code';}});return _0x548077[_0x4b1c74(0xbd)]();}export async function promptAppSelection(_0x184cc7){const _0x7159e=a52_0x5384,_0x538df1=[{'name':a52_0x37d938[_0x7159e(0xde)]('✎\x20Enter\x20appcode\x20manually'),'value':-0x1},..._0x184cc7[_0x7159e(0xd1)]((_0x50730d,_0x432472)=>({'name':_0x50730d[_0x7159e(0xd2)]+'\x20\x20'+a52_0x37d938[_0x7159e(0xcb)]('('+_0x50730d[_0x7159e(0xd5)]+')'),'value':_0x432472}))],_0x52c488=await checkbox({'message':_0x7159e(0xda)+a52_0x37d938[_0x7159e(0xbf)](_0x184cc7['length'])+_0x7159e(0xbb),'choices':_0x538df1,'loop':![]});if(_0x52c488[_0x7159e(0xc8)](-0x1))return _0x7159e(0xd0);if(_0x52c488[_0x7159e(0xd6)]===0x0)return _0x7159e(0xd0);return _0x52c488[_0x7159e(0xd1)](_0x3d23fb=>_0x184cc7[_0x3d23fb]);}export async function promptSingleAppSelection(_0x3667a5){const _0x4b9c39=a52_0x5384,_0x198522=[{'name':a52_0x37d938[_0x4b9c39(0xcb)](_0x4b9c39(0xc9)),'value':_0x4b9c39(0xba)},{'name':a52_0x37d938['yellow'](_0x4b9c39(0xc2)),'value':_0x4b9c39(0xd0)},..._0x3667a5[_0x4b9c39(0xd1)](_0x25a229=>({'name':_0x25a229['appName']+'\x20\x20'+a52_0x37d938[_0x4b9c39(0xcb)]('('+_0x25a229['appCode']+')'),'value':_0x25a229[_0x4b9c39(0xd5)]}))],_0x52abfe=await select({'message':_0x4b9c39(0xd9),'choices':_0x198522});if(_0x52abfe===_0x4b9c39(0xba))return _0x4b9c39(0xba);if(_0x52abfe==='custom')return'custom';return _0x3667a5[_0x4b9c39(0xcd)](_0x3521bd=>_0x3521bd[_0x4b9c39(0xd5)]===_0x52abfe);}export async function selectSingleAppcode(_0xaa2600){const _0x15147b=a52_0x5384;if(!_0xaa2600)return writeCliSideChannelLine(a52_0x37d938[_0x15147b(0xcb)](_0x15147b(0xc0))),_fallbackOrSkip();writeCliSideChannelLine(_0x15147b(0xc6));let _0x3a50d5;try{_0x3a50d5=await withActiveCookie(_0xaa2600,()=>listRemoteApps());}catch(_0x45033e){writeCliSideChannelLine(a52_0x37d938[_0x15147b(0xde)](_0x15147b(0xdb)));if(_0x45033e instanceof Error)writeCliSideChannelLine(a52_0x37d938[_0x15147b(0xcb)]('\x20\x20('+_0x45033e['message']+')'));return _fallbackOrSkip();}if(_0x3a50d5[_0x15147b(0xd6)]===0x0)return writeCliSideChannelLine(a52_0x37d938[_0x15147b(0xde)](_0x15147b(0xce))),_fallbackOrSkip();const _0xe7da30=await promptSingleAppSelection(_0x3a50d5);if(_0xe7da30===_0x15147b(0xba))return'';if(_0xe7da30===_0x15147b(0xd0))return promptCustomAppcode();return _0xe7da30[_0x15147b(0xd5)];}export async function selectMultipleApps(_0x5bea78){const _0x3d75e3=a52_0x5384;writeCliSideChannelLine(_0x3d75e3(0xc6));let _0x3c1db8;try{_0x3c1db8=await withActiveCookie(_0x5bea78,()=>listRemoteApps());}catch(_0x19d437){writeCliSideChannelLine(_0x3d75e3(0xc7));if(_0x19d437 instanceof Error)writeCliSideChannelLine(_0x3d75e3(0xca)+_0x19d437[_0x3d75e3(0xc3)]+')');return _0x3d75e3(0xd0);}if(_0x3c1db8['length']===0x0)return writeCliSideChannelLine('\x0aNo\x20available\x20apps\x20found.'),_0x3d75e3(0xd0);return promptAppSelection(_0x3c1db8);}async function _fallbackOrSkip(){const _0x553397=a52_0x5384,_0x318705=await select({'message':_0x553397(0xbc),'choices':[{'name':a52_0x37d938[_0x553397(0xcb)](_0x553397(0xdd)),'value':_0x553397(0xba)},{'name':a52_0x37d938[_0x553397(0xde)]('✎\x20Enter\x20manually'),'value':'manual'}]});if(_0x318705==='skip')return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a53_0x1e09cf=a53_0x35e7;(function(_0x2d8f0d,_0x57e692){const _0x1d231a=a53_0x35e7,_0x3eee51=_0x2d8f0d();while(!![]){try{const _0x38898e=parseInt(_0x1d231a(0x6f))/0x1*(-parseInt(_0x1d231a(0x71))/0x2)+-parseInt(_0x1d231a(0x84))/0x3+-parseInt(_0x1d231a(0x87))/0x4*(parseInt(_0x1d231a(0x83))/0x5)+-parseInt(_0x1d231a(0x79))/0x6+parseInt(_0x1d231a(0x72))/0x7*(-parseInt(_0x1d231a(0x81))/0x8)+-parseInt(_0x1d231a(0x7b))/0x9*(parseInt(_0x1d231a(0x73))/0xa)+-parseInt(_0x1d231a(0x6d))/0xb*(-parseInt(_0x1d231a(0x70))/0xc);if(_0x38898e===_0x57e692)break;else _0x3eee51['push'](_0x3eee51['shift']());}catch(_0x2325f3){_0x3eee51['push'](_0x3eee51['shift']());}}}(a53_0x52f4,0x6e2c2));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';function a53_0x52f4(){const _0x3cfade=['errorMessage','20mqzWjD','\x20response\x20did\x20not\x20contain\x20a\x20status.','\x20task\x20status\x20--task-id\x20','replace','\x20returned\x20unknown\x20status\x20','has','FAILED','11lSlFjX','Task\x20','1jmLMBe','32071044bxncZz','279704HCLXyk','371hmRBfd','14370oxIncl','trim','Async\x20task\x20','apiError','SUCCESS','\x20is\x20processing.','382080RslNQP','\x20--appcode\x20','3483QwPPif','\x20--format\x20compress','PENDING','\x20failed.','taskId','status','95608hbiqSC','\x20completed\x20successfully.','644015HpaUWo','552756NdQSpt','\x20failed:\x20'];a53_0x52f4=function(){return _0x3cfade;};return a53_0x52f4();}function a53_0x35e7(_0x1f1955,_0x4fa5f2){_0x1f1955=_0x1f1955-0x6b;const _0x52f447=a53_0x52f4();let _0x35e79e=_0x52f447[_0x1f1955];return _0x35e79e;}const TERMINAL_STATUSES=new Set(['SUCCESS',a53_0x1e09cf(0x6c)]),NON_TERMINAL_STATUSES=new Set([a53_0x1e09cf(0x7d),'PROCESSING']);export function normalizeAsyncTask(_0x697c61){const _0x23bf2d=a53_0x1e09cf,_0x3dde32=typeof _0x697c61?.[_0x23bf2d(0x7f)]==='string'?_0x697c61[_0x23bf2d(0x7f)][_0x23bf2d(0x74)]():'';if(!_0x3dde32)throw CliErrors[_0x23bf2d(0x76)]('Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.');const _0x2f8f8c=typeof _0x697c61[_0x23bf2d(0x80)]==='string'?_0x697c61[_0x23bf2d(0x80)][_0x23bf2d(0x74)]()['toUpperCase']():'';if(!_0x2f8f8c)throw CliErrors[_0x23bf2d(0x76)](_0x23bf2d(0x75)+_0x3dde32+_0x23bf2d(0x88));return{'taskId':_0x3dde32,'status':_0x2f8f8c,'errorMessage':typeof _0x697c61[_0x23bf2d(0x86)]==='string'&&_0x697c61['errorMessage']['trim']()?_0x697c61['errorMessage']['trim']():null,'isTerminal':TERMINAL_STATUSES['has'](_0x2f8f8c),'knownStatus':TERMINAL_STATUSES[_0x23bf2d(0x6b)](_0x2f8f8c)||NON_TERMINAL_STATUSES[_0x23bf2d(0x6b)](_0x2f8f8c)};}export function buildAsyncTaskStatusCommand(_0x55a255,_0x3ca23d){const _0x5a4f09=a53_0x1e09cf;return CLI_BIN_NAME+_0x5a4f09(0x89)+quoteShellArg(_0x55a255)+_0x5a4f09(0x7a)+quoteShellArg(_0x3ca23d)+_0x5a4f09(0x7c);}export function asyncTaskMessage(_0x433fe1){const _0x28ac0f=a53_0x1e09cf;switch(_0x433fe1[_0x28ac0f(0x80)]){case'PENDING':return'Task\x20'+_0x433fe1['taskId']+'\x20is\x20pending.';case'PROCESSING':return _0x28ac0f(0x6e)+_0x433fe1[_0x28ac0f(0x7f)]+_0x28ac0f(0x78);case _0x28ac0f(0x77):return _0x28ac0f(0x6e)+_0x433fe1[_0x28ac0f(0x7f)]+_0x28ac0f(0x82);case _0x28ac0f(0x6c):return _0x433fe1[_0x28ac0f(0x86)]?_0x28ac0f(0x6e)+_0x433fe1[_0x28ac0f(0x7f)]+_0x28ac0f(0x85)+_0x433fe1[_0x28ac0f(0x86)]:_0x28ac0f(0x6e)+_0x433fe1[_0x28ac0f(0x7f)]+_0x28ac0f(0x7e);default:return _0x28ac0f(0x6e)+_0x433fe1[_0x28ac0f(0x7f)]+_0x28ac0f(0x8b)+_0x433fe1[_0x28ac0f(0x80)]+'.';}}function quoteShellArg(_0x5359c9){const _0x516224=a53_0x1e09cf;return'\x27'+_0x5359c9[_0x516224(0x8a)](/'/g,'\x27\x5c\x27\x27')+'\x27';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a54_0x48d7(){var _0x4d4f9c=['description','3035448EVAjFT','defineProperties','37226JcipDt','15086376QOqDOc','3oeEYUG','2740188OpsDen','2607940QzwNiJ','38RdIJmZ','6923376PADhCW','url','7468328YCdqea'];a54_0x48d7=function(){return _0x4d4f9c;};return a54_0x48d7();}(function(_0x141622,_0x2fc80b){var _0x5d9f9f=a54_0x3cfd,_0x2f31c7=_0x141622();while(!![]){try{var _0x526b74=parseInt(_0x5d9f9f(0x186))/0x1*(parseInt(_0x5d9f9f(0x18b))/0x2)+-parseInt(_0x5d9f9f(0x188))/0x3*(parseInt(_0x5d9f9f(0x189))/0x4)+-parseInt(_0x5d9f9f(0x18a))/0x5+-parseInt(_0x5d9f9f(0x184))/0x6+parseInt(_0x5d9f9f(0x182))/0x7+-parseInt(_0x5d9f9f(0x18c))/0x8+parseInt(_0x5d9f9f(0x187))/0x9;if(_0x526b74===_0x2fc80b)break;else _0x2f31c7['push'](_0x2f31c7['shift']());}catch(_0x4307ae){_0x2f31c7['push'](_0x2f31c7['shift']());}}}(a54_0x48d7,0xd5031));function a54_0x3cfd(_0x1eb462,_0x483cae){_0x1eb462=_0x1eb462-0x182;var _0x48d70c=a54_0x48d7();var _0x3cfd2d=_0x48d70c[_0x1eb462];return _0x3cfd2d;}export function asDryRunResult(_0x2d4200,_0x2168a8){var _0xc89e90=a54_0x3cfd;return Object[_0xc89e90(0x185)](_0x2d4200,{'method':{'value':_0x2168a8['method'],'enumerable':![]},'url':{'value':_0x2168a8[_0xc89e90(0x18d)],'enumerable':![]},..._0x2168a8[_0xc89e90(0x183)]?{'description':{'value':_0x2168a8[_0xc89e90(0x183)],'enumerable':![]}}:{}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a55_0x9ed479=a55_0x56ba;(function(_0x13d0cd,_0xff20b8){const _0x1acde3=a55_0x56ba,_0x4af7fe=_0x13d0cd();while(!![]){try{const _0x3b0934=-parseInt(_0x1acde3(0x19a))/0x1+-parseInt(_0x1acde3(0x1b8))/0x2+-parseInt(_0x1acde3(0x1a3))/0x3*(-parseInt(_0x1acde3(0x1a0))/0x4)+-parseInt(_0x1acde3(0x1a7))/0x5+-parseInt(_0x1acde3(0x1b2))/0x6*(-parseInt(_0x1acde3(0x1aa))/0x7)+-parseInt(_0x1acde3(0x1af))/0x8*(parseInt(_0x1acde3(0x1a5))/0x9)+parseInt(_0x1acde3(0x1a4))/0xa;if(_0x3b0934===_0xff20b8)break;else _0x4af7fe['push'](_0x4af7fe['shift']());}catch(_0x286017){_0x4af7fe['push'](_0x4af7fe['shift']());}}}(a55_0x3edc,0x63f9c));export const CROSS_RELATION_FROM_DATASET_FLAG={'name':'from-datasetcode','type':a55_0x9ed479(0x1ac),'required':!![],'description':'Source\x20DB_TABLE\x20dataset\x20code'};function a55_0x3edc(){const _0x3e8e5d=['SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','1086076MEhpuI','skip-connection-test','ONE_TO_ONE','appcode','MYSQL','from-dblink-id','cardinality','87137QJATaU','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','ONE_TO_MANY','boolean','code','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','4duUMEm','Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update','dbtype','1581972fbBbIn','8739870FzHsxQ','33273sEONeV','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','1985320JNkJpF','to-column','from-column','35eZaFOy','MANY_TO_MANY','string','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','Source\x20database\x20connection\x20ID;\x20derived\x20from\x20the\x20source\x20dataset\x20when\x20omitted','1368MzHUhf','to-label-column','App\x20code\x20(e.g.\x20app-xxxxx)','801138smpmKv','Write\x20to\x20the\x20global\x20configuration','POSTGRESQL','MANY_TO_ONE'];a55_0x3edc=function(){return _0x3e8e5d;};return a55_0x3edc();}export const CROSS_RELATION_FROM_COLUMN_FLAG={'name':a55_0x9ed479(0x1a9),'type':a55_0x9ed479(0x1ac),'required':!![],'description':'Source\x20field\x20name\x20used\x20to\x20locate\x20the\x20relation'};export const CROSS_RELATION_TO_DATASET_FLAG={'name':'to-datasetcode','type':a55_0x9ed479(0x1ac),'required':!![],'description':'Target\x20DB_TABLE\x20dataset\x20code'};function a55_0x56ba(_0x528fd8,_0x4529f3){_0x528fd8=_0x528fd8-0x196;const _0x3edc99=a55_0x3edc();let _0x56ba18=_0x3edc99[_0x528fd8];return _0x56ba18;}export const CROSS_RELATION_TO_COLUMN_FLAG={'name':a55_0x9ed479(0x1a8),'type':a55_0x9ed479(0x1ac),'required':!![],'description':'Target\x20field\x20name'};export const CROSS_RELATION_DBLINK_FLAG={'name':a55_0x9ed479(0x198),'type':'number','description':a55_0x9ed479(0x1ae)};export const CROSS_RELATION_LABEL_FLAG={'name':a55_0x9ed479(0x1b0),'type':a55_0x9ed479(0x1ac),'description':'Target\x20display\x20field;\x20create\x20defaults\x20to\x20the\x20target\x20field,\x20update\x20keeps\x20the\x20current\x20value'};export const CROSS_RELATION_CARDINALITY_FLAG={'name':a55_0x9ed479(0x199),'type':a55_0x9ed479(0x1ac),'enum':[a55_0x9ed479(0x1ba),a55_0x9ed479(0x19c),a55_0x9ed479(0x1b5),a55_0x9ed479(0x1ab)],'description':'Relation\x20cardinality;\x20create\x20leaves\x20it\x20unset\x20when\x20omitted,\x20update\x20keeps\x20the\x20current\x20value'};export const GLOBAL_SCOPE_FLAG={'name':'global','type':a55_0x9ed479(0x19d),'default':![],'description':a55_0x9ed479(0x1b3)};export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a55_0x9ed479(0x1b7)};export const CODE_FLAG={'name':a55_0x9ed479(0x19e),'type':a55_0x9ed479(0x1ac),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':'datasetcode','description':a55_0x9ed479(0x19b)};export const SQLCODE_FLAG={'name':'sqlcode','type':'string','required':!![],'description':a55_0x9ed479(0x1a6),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a55_0x9ed479(0x1b6)}};export const APPCODE_FLAG_OPTIONAL={'name':a55_0x9ed479(0x196),'type':a55_0x9ed479(0x1ac),'required':![],'description':a55_0x9ed479(0x19f)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a55_0x9ed479(0x1b1)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':'number','required':!![],'description':a55_0x9ed479(0x1ad)};export const DB_TYPE_FLAG={'name':a55_0x9ed479(0x1a2),'type':a55_0x9ed479(0x1ac),'required':!![],'description':'Database\x20product\x20type','enum':[a55_0x9ed479(0x197),a55_0x9ed479(0x1b4)]};export const SKIP_CONNECTION_TEST_FLAG={'name':a55_0x9ed479(0x1b9),'type':a55_0x9ed479(0x19d),'description':a55_0x9ed479(0x1a1)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a56_0x2067(_0x3717ca,_0x2ed6a8){_0x3717ca=_0x3717ca-0x95;const _0x3d2ce6=a56_0x3d2c();let _0x2067c4=_0x3d2ce6[_0x3717ca];return _0x2067c4;}(function(_0x1b6e67,_0x25dbad){const _0x2931b1=a56_0x2067,_0x537e14=_0x1b6e67();while(!![]){try{const _0x3ac920=parseInt(_0x2931b1(0x99))/0x1*(-parseInt(_0x2931b1(0x95))/0x2)+parseInt(_0x2931b1(0x96))/0x3+parseInt(_0x2931b1(0x9c))/0x4+parseInt(_0x2931b1(0x9a))/0x5+-parseInt(_0x2931b1(0xa2))/0x6*(parseInt(_0x2931b1(0x98))/0x7)+parseInt(_0x2931b1(0x9e))/0x8*(parseInt(_0x2931b1(0x9f))/0x9)+parseInt(_0x2931b1(0xa4))/0xa;if(_0x3ac920===_0x25dbad)break;else _0x537e14['push'](_0x537e14['shift']());}catch(_0x2c1608){_0x537e14['push'](_0x537e14['shift']());}}}(a56_0x3d2c,0xe3a6f));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;function a56_0x3d2c(){const _0x54f0e5=['65187GZqZHH','\x20MB','\x20path\x20is\x20required.','1740oVIVUF','toFixed','11168910VljiDg','3218032dUMaZH','3837927OOauYq','size','44863dRisxv','1FLEeJw','5085465gDxzFh','isFile','2991108goMOWn','validation','264neNrea'];a56_0x3d2c=function(){return _0x54f0e5;};return a56_0x3d2c();}export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x1ab36f){const _0x4b0dc6=a56_0x2067;if(_0x1ab36f>=BYTES_PER_MB){const _0x4b3498=Math['ceil'](_0x1ab36f/BYTES_PER_MB*0x64)/0x64;return _0x4b3498[_0x4b0dc6(0xa3)](0x2)+_0x4b0dc6(0xa0);}return _0x1ab36f+'\x20B';}export function requireDevelopmentUploadFile(_0x5181ab,_0x4d796b){const _0x567ca8=a56_0x2067,_0x5bf76d=_0x5181ab['trim']();if(!_0x5bf76d)throw CliErrors[_0x567ca8(0x9d)](_0x4d796b+_0x567ca8(0xa1));if(!existsSync(_0x5bf76d))throw CliErrors[_0x567ca8(0x9d)]('File\x20not\x20found:\x20'+_0x5bf76d);const _0x13b1c2=statSync(_0x5bf76d);if(!_0x13b1c2[_0x567ca8(0x9b)]())throw CliErrors[_0x567ca8(0x9d)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x5bf76d);if(_0x13b1c2[_0x567ca8(0x97)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x567ca8(0x9d)]('File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20'+_0x5bf76d+'\x20('+formatBytes(_0x13b1c2[_0x567ca8(0x97)])+')');return{'path':_0x5bf76d,'size':_0x13b1c2[_0x567ca8(0x97)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x531a20,_0x51b764){const _0x41cb05=a57_0x1d97,_0x3dd62d=_0x531a20();while(!![]){try{const _0x37da99=-parseInt(_0x41cb05(0x1c3))/0x1+parseInt(_0x41cb05(0x1bd))/0x2*(-parseInt(_0x41cb05(0x1c4))/0x3)+parseInt(_0x41cb05(0x1c5))/0x4*(parseInt(_0x41cb05(0x1bb))/0x5)+parseInt(_0x41cb05(0x1be))/0x6+-parseInt(_0x41cb05(0x1c0))/0x7+-parseInt(_0x41cb05(0x1c2))/0x8+parseInt(_0x41cb05(0x1bc))/0x9;if(_0x37da99===_0x51b764)break;else _0x3dd62d['push'](_0x3dd62d['shift']());}catch(_0x1c07c3){_0x3dd62d['push'](_0x3dd62d['shift']());}}}(a57_0x28d3,0xd84b0));function a57_0x1d97(_0x45c9a8,_0x5b2f37){_0x45c9a8=_0x45c9a8-0x1ba;const _0x28d334=a57_0x28d3();let _0x1d9733=_0x28d334[_0x45c9a8];return _0x1d9733;}export function validateAppcode(_0x52f5e9){const _0x3291bc=a57_0x1d97,_0x243398=_0x52f5e9[_0x3291bc(0x1c6)]();if(!_0x243398)return{'valid':![],'message':_0x3291bc(0x1bf)};if(_0x243398['length']>0x64)return{'valid':![],'message':_0x3291bc(0x1c1)};if(!/^[A-Za-z0-9_-]+$/[_0x3291bc(0x1ba)](_0x243398))return{'valid':![],'message':_0x3291bc(0x1c7)};return{'valid':!![]};}function a57_0x28d3(){const _0x55843a=['41154930CZzOPv','658228mOgsCo','29598KvTjKE','App\x20Code\x20cannot\x20be\x20empty','12013904FiFcCp','App\x20Code\x20cannot\x20exceed\x20100\x20characters','8815520uVzJzI','527506kkaEVf','12SFUzkQ','1132KTDufB','trim','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','test','17145hxIbPE'];a57_0x28d3=function(){return _0x55843a;};return a57_0x28d3();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a58_0x32e238=a58_0x40b4;function a58_0x59ba(){const _0x4a8e4e=['12514730Wraajj','\x20config\x20delete\x20<key>\x20[--global]','969367sOyFgB','78757OxhJPl','defaultApp','943425rMHbjV','2cREhGg','validation','global','12BQvYnJ','Usage:\x20','Top-level\x20key\x20\x22','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','hasOwnProperty','\x20deleted','72WaWroK','6165350gfkttl','trim','call','Project','has','Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.','inherit','Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','boolean','288yBsXhe','Missing\x20key\x20argument.','Global','\x20already\x20absent','1909820yiKOgr','1517860NpqMRu','\x22\x20is\x20not\x20deletable.','prototype'];a58_0x59ba=function(){return _0x4a8e4e;};return a58_0x59ba();}(function(_0x7d3955,_0x266cc5){const _0x131144=a58_0x40b4,_0x2aeb56=_0x7d3955();while(!![]){try{const _0x42a301=-parseInt(_0x131144(0x1f0))/0x1*(-parseInt(_0x131144(0x1f4))/0x2)+-parseInt(_0x131144(0x1f7))/0x3*(-parseInt(_0x131144(0x1eb))/0x4)+-parseInt(_0x131144(0x1fe))/0x5+parseInt(_0x131144(0x1e6))/0x6*(-parseInt(_0x131144(0x1f1))/0x7)+parseInt(_0x131144(0x1fd))/0x8*(-parseInt(_0x131144(0x1f3))/0x9)+parseInt(_0x131144(0x1ee))/0xa+-parseInt(_0x131144(0x1ea))/0xb;if(_0x42a301===_0x266cc5)break;else _0x2aeb56['push'](_0x2aeb56['shift']());}catch(_0x5ee930){_0x2aeb56['push'](_0x2aeb56['shift']());}}}(a58_0x59ba,0xcf299));import{CliErrors}from'../../errors.js';function a58_0x40b4(_0x3588ad,_0x2b9e62){_0x3588ad=_0x3588ad-0x1dd;const _0x59ba22=a58_0x59ba();let _0x40b477=_0x59ba22[_0x3588ad];return _0x40b477;}import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';const LEGACY_DELETABLE_KEYS=new Set([a58_0x32e238(0x1e2)]),EXTRA_DELETABLE_KEYS=new Set([a58_0x32e238(0x1f2),'routing']);async function execute(_0xdaa59a){const _0x526768=a58_0x32e238,_0x5be661=_0xdaa59a['args'][0x0]?.[_0x526768(0x1dd)]();if(!_0x5be661)throw CliErrors[_0x526768(0x1f5)](_0x526768(0x1e7),_0x526768(0x1f8)+CLI_BIN_NAME+_0x526768(0x1ef));if(_0x5be661==='riskLevel')throw CliErrors[_0x526768(0x1f5)](_0x526768(0x1fa));if(!isTopLevelConfigKey(_0x5be661)&&!EXTRA_DELETABLE_KEYS['has'](_0x5be661)&&!LEGACY_DELETABLE_KEYS[_0x526768(0x1e0)](_0x5be661))throw CliErrors['validation'](_0x526768(0x1f9)+_0x5be661+_0x526768(0x1ec),_0x526768(0x1e1));const _0x9aa177=resolveWriteScope({'global':_0xdaa59a['bool'](_0x526768(0x1f6))}),_0x320738=readScopedConfig(_0x9aa177),_0x59b27b=Object[_0x526768(0x1ed)][_0x526768(0x1fb)][_0x526768(0x1de)](_0x320738,_0x5be661);_0x59b27b&&(delete _0x320738[_0x5be661],writeScopedConfig(_0x320738,_0x9aa177));const _0x56c7c0=_0x9aa177==='global'?_0x526768(0x1e8):_0x526768(0x1df);return{'ok':!![],'message':_0x59b27b?'✓\x20'+_0x56c7c0+'\x20'+_0x5be661+_0x526768(0x1fc):'✓\x20'+_0x56c7c0+'\x20'+_0x5be661+_0x526768(0x1e9),'data':{'key':_0x5be661,'scope':_0x9aa177,'changed':_0x59b27b}};}export const configDeleteDefinition={'service':'config','command':'delete','description':'Delete\x20a\x20config\x20value\x20from\x20one\x20scope','risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[{'name':'key','description':a58_0x32e238(0x1e3),'required':!![]}],'flags':[{'name':a58_0x32e238(0x1f6),'type':a58_0x32e238(0x1e5),'description':a58_0x32e238(0x1e4),'default':![]}],'execute':execute};
|