@lovrabet/rabetbase-cli 2.5.10-beta.3 → 2.5.10-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/context.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/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/feishu-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/instant-api-policy/endpoints.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
package/lib/commands/bff/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a44_0x4e164d=a44_0x5be3;function a44_0x28e8(){const _0x50457e=['profileName','currentApp','/api/management/library/scripts/save','update','get','message','flatMap','2366uPBQaT','values','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','14648WefiGq','\x20uploaded','Runtime\x20script\x20cache\x20cleared.','10397583AWVyXO','190332KeCUuY','review_remote_and_merge','existingHooks','Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.','477645gnCtmz','datasetId','HOOK','utf8','mergedCli','apiDir','afterScriptId','map','runtime\x20cache\x20clear\x20failed','operationType','functionNode','No\x20local\x20Backend\x20Function\x20scripts\x20found.','requires','2315538DrPizj','Would\x20inspect\x20','name','filePath','cleared','would_push','selectedAppName','remoteId','dataset','2121620iichBX','HOOK_DATASET_NOT_FOUND:','appCode','Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20','set','BFF_REMOTE_VERSION_MISSING','scriptType','Push\x20complete:\x20','join','\x20skipped','\x20resolution','1908012TmFPWq','runtime\x20cache\x20not\x20needed','EXISTING_HOOK_BINDING_PRESERVED','failures','validation','length','\x20--format\x20compress','2wfqCgf','parse','version','runtime\x20cache\x20cleared','functionName','bool','Lock\x20scope\x20for\x20app\x20\x22','Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.','\x20bff\x20detail\x20--id\x20','write','type','resolutions','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','conflict','lastSync','push','lockFilePath','datasetCode','COMMON','functions','before','has','force','warnings','defaultApp','lockKey','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.','status','some','boolean','filter','Force\x20push\x20ignoring\x20hash\x20protection','size','unchanged','POST','str','scriptsRoot','BFF_REMOTE_VERSION_CHANGED','hash','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','attempted','string','stringify','description','test','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','alias','Push\x20only\x20this\x20script\x20type'];a44_0x28e8=function(){return _0x50457e;};return a44_0x28e8();}(function(_0x35aec1,_0x28c956){const _0x3e6155=a44_0x5be3,_0x117b89=_0x35aec1();while(!![]){try{const _0x1b2631=parseInt(_0x3e6155(0x19c))/0x1+parseInt(_0x3e6155(0x157))/0x2*(-parseInt(_0x3e6155(0x1a9))/0x3)+-parseInt(_0x3e6155(0x198))/0x4+-parseInt(_0x3e6155(0x145))/0x5+-parseInt(_0x3e6155(0x150))/0x6+-parseInt(_0x3e6155(0x191))/0x7*(-parseInt(_0x3e6155(0x194))/0x8)+parseInt(_0x3e6155(0x197))/0x9;if(_0x1b2631===_0x28c956)break;else _0x117b89['push'](_0x117b89['shift']());}catch(_0x2d891b){_0x117b89['push'](_0x117b89['shift']());}}}(a44_0x28e8,0xa8787));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':'bff','command':a44_0x4e164d(0x168),'description':a44_0x4e164d(0x173),'risk':a44_0x4e164d(0x160),'structuredErrors':!![],'flags':[{'name':'type','type':'string','description':a44_0x4e164d(0x189),'enum':[a44_0x4e164d(0x16b),'ENDPOINT','HOOK']},{'name':'name','type':a44_0x4e164d(0x183),'description':a44_0x4e164d(0x165)},{'name':'force','type':a44_0x4e164d(0x177),'description':a44_0x4e164d(0x179)}],async 'dryRun'(_0xc8d8f3){const _0x812735=a44_0x4e164d,_0x4847e8=loadBffProjectConfig(_0xc8d8f3['appCode']),_0x2accfa=await readBffLockFile(_0x4847e8[_0x812735(0x169)]),{appLock:_0x409638}=ensureLockScope(_0x2accfa??createEmptyBffLock(),_0xc8d8f3['appCode'],_0x4847e8[_0x812735(0x17e)],_0x812735(0x168)),_0x231fc5=await getTargetFunctions(_0x4847e8,_0xc8d8f3),_0x136f6e=_0x231fc5[_0x812735(0x176)](_0xbe1b42=>_0xbe1b42[_0x812735(0x161)]===_0x812735(0x19e))?await scanLocalBffFunctions(_0x4847e8,'HOOK'):_0x231fc5,_0x255834=await buildHookMaps(_0xc8d8f3[_0x812735(0x147)],_0xc8d8f3[_0x812735(0x1a1)],_0x136f6e,_0x409638,_0xc8d8f3[_0x812735(0x142)]||_0xc8d8f3[_0x812735(0x1a0)]?.[_0x812735(0x18b)]||_0xc8d8f3[_0x812735(0x1a0)]?.[_0x812735(0x171)]),_0x330537=_0xc8d8f3[_0x812735(0x15c)](_0x812735(0x16f)),_0x3aadd8=[];for(const _0x426611 of _0x231fc5){const _0x5ddaeb=await computeFileHash(_0x426611[_0x812735(0x1ac)]),_0x351706=_0x409638['functions'][_0x426611['lockKey']],_0x13bbeb=!!_0x351706&&_0x351706[_0x812735(0x180)]===_0x5ddaeb,_0xb78f3=_0x255834['resolutions'][_0x812735(0x18e)](_0x426611[_0x812735(0x172)]),_0xc7b1f0=!!_0x351706?.[_0x812735(0x143)]&&_0x351706['version']==null&&(_0x330537||!_0x13bbeb),_0xac734=_0xc7b1f0?missingRemoteVersionConflict(_0x426611,_0x351706):undefined,_0x586c61=_0x255834[_0x812735(0x153)]['has'](_0x426611[_0x812735(0x172)])?'failed':!_0x330537&&_0x13bbeb?'unchanged':_0xac734?_0x812735(0x166):_0x812735(0x141);_0x3aadd8[_0x812735(0x168)]({'lockKey':_0x426611['lockKey'],'filePath':_0x426611[_0x812735(0x1ac)],'remoteId':_0x351706?.[_0x812735(0x143)]??null,'mode':_0x351706?.[_0x812735(0x143)]?_0x812735(0x18d):'create','status':_0x586c61,..._0x255834[_0x812735(0x153)]['has'](_0x426611['lockKey'])?{'error':_0x255834['failures']['get'](_0x426611[_0x812735(0x172)])}:{},..._0xac734?{'conflict':_0xac734}:{},..._0x255834[_0x812735(0x19a)][_0x812735(0x16e)](_0x426611[_0x812735(0x172)])?{'datasetCode':_0x351706?.[_0x812735(0x16a)],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x426611[_0x812735(0x172)])]}:{},..._0xb78f3?{'alias':_0xb78f3[_0x812735(0x188)]??null,'datasetCode':_0xb78f3[_0x812735(0x16a)],'operationType':_0x426611['operationType'],'functionNode':_0x426611['functionNode'],'warnings':_0xb78f3[_0x812735(0x170)]}:{}});}return{'method':_0x812735(0x17c),'url':_0x812735(0x18c),'body':{'appCode':_0xc8d8f3[_0x812735(0x147)],'force':_0x330537,'files':_0x3aadd8,'cacheClearAtRuntime':_0x3aadd8[_0x812735(0x176)](_0x4c9beb=>_0x4c9beb[_0x812735(0x175)]===_0x812735(0x141)),'cacheClearAtRuntimeTimes':_0x3aadd8['some'](_0x2addfe=>_0x2addfe[_0x812735(0x175)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x812735(0x1aa)+_0x3aadd8['length']+_0x812735(0x181)};},async 'execute'(_0x7f9b70){const _0x127ad6=a44_0x4e164d,_0xf99d48=loadBffProjectConfig(_0x7f9b70[_0x127ad6(0x147)]),_0x3d33c9=await readBffLockFile(_0xf99d48['lockFilePath']),{lockData:_0x41278b,appLock:_0x3f513a}=ensureLockScope(_0x3d33c9??createEmptyBffLock(),_0x7f9b70[_0x127ad6(0x147)],_0xf99d48['scriptsRoot'],_0x127ad6(0x168)),_0x405f0b=await getTargetFunctions(_0xf99d48,_0x7f9b70);if(_0x405f0b[_0x127ad6(0x155)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':_0x127ad6(0x1a7)};const _0x3384a9=_0x7f9b70[_0x127ad6(0x15c)](_0x127ad6(0x16f)),_0x176feb=JSON[_0x127ad6(0x158)](JSON[_0x127ad6(0x184)](_0x41278b)),_0x4ed7fe=_0x176feb['apps'][_0x7f9b70[_0x127ad6(0x147)]];if(!_0x4ed7fe)throw new Error(_0x127ad6(0x15d)+_0x7f9b70[_0x127ad6(0x147)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x48282c=_0x405f0b['some'](_0x44cbf2=>_0x44cbf2[_0x127ad6(0x161)]===_0x127ad6(0x19e))?await scanLocalBffFunctions(_0xf99d48,_0x127ad6(0x19e)):_0x405f0b,_0x14de56=await buildHookMaps(_0x7f9b70['appCode'],_0x7f9b70[_0x127ad6(0x1a1)],_0x48282c,_0x4ed7fe,_0x7f9b70[_0x127ad6(0x142)]||_0x7f9b70[_0x127ad6(0x1a0)]?.[_0x127ad6(0x18b)]||_0x7f9b70[_0x127ad6(0x1a0)]?.[_0x127ad6(0x171)]),_0x563e77=[],_0x24432a=[],_0x5f3be7=[],_0x34f70f=[];for(const _0x2e6b00 of _0x405f0b){const _0x564452=_0x14de56[_0x127ad6(0x153)]['get'](_0x2e6b00[_0x127ad6(0x172)]);if(_0x564452){_0x34f70f[_0x127ad6(0x168)]({'lockKey':_0x2e6b00['lockKey'],'error':_0x564452});continue;}const _0x2abe95=await computeFileHash(_0x2e6b00[_0x127ad6(0x1ac)]),_0x282523=_0x4ed7fe['functions'][_0x2e6b00[_0x127ad6(0x172)]];if(!_0x3384a9&&_0x282523&&_0x282523['hash']===_0x2abe95){_0x24432a[_0x127ad6(0x168)]({'lockKey':_0x2e6b00['lockKey'],'reason':_0x127ad6(0x17b)});continue;}if(_0x282523?.['remoteId']&&_0x282523[_0x127ad6(0x159)]==null){_0x5f3be7[_0x127ad6(0x168)](missingRemoteVersionConflict(_0x2e6b00,_0x282523));continue;}try{await uploadSingleFunction(_0x7f9b70[_0x127ad6(0x147)],_0x2e6b00,_0x4ed7fe,_0x14de56);const _0x24dbe5=_0x4ed7fe['functions'][_0x2e6b00[_0x127ad6(0x172)]];_0x563e77[_0x127ad6(0x168)]({'lockKey':_0x2e6b00[_0x127ad6(0x172)],'remoteId':_0x24dbe5?.[_0x127ad6(0x143)]??0x0});}catch(_0x15c1a2){const _0x326550=remoteVersionChangedConflict(_0x2e6b00,_0x282523,_0x15c1a2);if(_0x326550){_0x5f3be7[_0x127ad6(0x168)](_0x326550);continue;}_0x34f70f[_0x127ad6(0x168)]({'lockKey':_0x2e6b00[_0x127ad6(0x172)],'error':_0x15c1a2 instanceof Error?_0x15c1a2['message']:String(_0x15c1a2)});}}_0x4ed7fe[_0x127ad6(0x167)]=new Date()['toISOString'](),await writeBffLockFile(_0xf99d48['lockFilePath'],_0x176feb),await waitForUploadedLockEntries(_0xf99d48['lockFilePath'],_0x7f9b70[_0x127ad6(0x147)],_0x563e77[_0x127ad6(0x1a3)](_0x44e195=>_0x44e195[_0x127ad6(0x172)]));let _0x48177a={'attempted':![],'cleared':![]};if(_0x563e77[_0x127ad6(0x155)]>0x0)try{let _0x184e4b='';for(let _0x56b2a5=0x0;_0x56b2a5<CACHE_CLEAR_ATTEMPTS;_0x56b2a5+=0x1){_0x184e4b=await clearBffScriptCache(),_0x56b2a5<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x48177a={'attempted':!![],'cleared':!![],'message':_0x184e4b||_0x127ad6(0x196)};}catch(_0x2ccb3f){_0x48177a={'attempted':!![],'cleared':![],'error':_0x2ccb3f instanceof Error?_0x2ccb3f['message']:String(_0x2ccb3f)};}const _0x56cdf4=_0x34f70f[_0x127ad6(0x155)]===0x0&&(_0x48177a['attempted']?_0x48177a[_0x127ad6(0x1ad)]:!![]),_0x4b0e21=_0x56cdf4,_0xa32004=_0x48177a[_0x127ad6(0x182)]?_0x48177a[_0x127ad6(0x1ad)]?_0x127ad6(0x15a):_0x127ad6(0x1a4):_0x127ad6(0x151);return{'ok':_0x4b0e21,'data':{'uploaded':_0x563e77,'skipped':_0x24432a,'conflicts':_0x5f3be7,'failed':_0x34f70f,'cacheClear':_0x48177a,'warnings':[...[..._0x14de56['resolutions'][_0x127ad6(0x192)]()][_0x127ad6(0x190)](_0x4b908a=>_0x4b908a[_0x127ad6(0x170)]),...[..._0x14de56[_0x127ad6(0x19a)]]['map'](existingHookWarning)]},'message':formatPushMessage(_0x563e77[_0x127ad6(0x155)],_0x24432a[_0x127ad6(0x155)],_0x5f3be7[_0x127ad6(0x155)],_0x34f70f[_0x127ad6(0x155)],_0xa32004)};}};function missingRemoteVersionConflict(_0x1dd2a4,_0x2df220){const _0x5bd475=a44_0x4e164d;return remoteVersionConflict(_0x1dd2a4,_0x2df220,_0x5bd475(0x14a),_0x5bd475(0x187));}function remoteVersionChangedConflict(_0x457df9,_0x5eaf7d,_0x49dd64){const _0x326287=a44_0x4e164d;if(!_0x5eaf7d?.['remoteId']||_0x5eaf7d[_0x326287(0x159)]==null||!isRemoteVersionConflict(_0x49dd64))return undefined;return remoteVersionConflict(_0x457df9,_0x5eaf7d,_0x326287(0x17f),_0x326287(0x19b));}function remoteVersionConflict(_0x4d59ef,_0x593a77,_0x60d46e,_0x168c97){const _0x2c7389=a44_0x4e164d;return{'code':_0x60d46e,'lockKey':_0x4d59ef[_0x2c7389(0x172)],'filePath':_0x4d59ef[_0x2c7389(0x1ac)],'remoteId':_0x593a77[_0x2c7389(0x143)],..._0x593a77['version']!=null?{'expectedVersion':_0x593a77[_0x2c7389(0x159)]}:{},'message':_0x168c97,'nextAction':{'action':_0x2c7389(0x199),'command':CLI_BIN_NAME+_0x2c7389(0x15f)+_0x593a77[_0x2c7389(0x143)]+_0x2c7389(0x156),'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_0x5be3(_0x1909bf,_0x424565){_0x1909bf=_0x1909bf-0x141;const _0x28e80c=a44_0x28e8();let _0x5be31b=_0x28e80c[_0x1909bf];return _0x5be31b;}function isRemoteVersionConflict(_0x3ee02c){const _0x140747=a44_0x4e164d,_0x514447=_0x3ee02c instanceof Error?_0x3ee02c[_0x140747(0x18f)]:String(_0x3ee02c),_0x3384ce=getPlatformErrorCode(_0x3ee02c)??'';return[_0x514447,_0x3384ce][_0x140747(0x176)](_0x5616c6=>/(?: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[_0x140747(0x186)](_0x5616c6));}function formatPushMessage(_0x3ef5f9,_0x400314,_0x202647,_0x58a653,_0x478736){const _0x104928=a44_0x4e164d,_0x2c92e8=[_0x104928(0x14c)+_0x3ef5f9+_0x104928(0x195),_0x400314+_0x104928(0x14e)];_0x202647>0x0&&_0x2c92e8[_0x104928(0x168)](_0x202647+'\x20conflict'+(_0x202647===0x1?'':'s')+'\x20'+(_0x202647===0x1?_0x104928(0x1a8):'require')+_0x104928(0x14f));if(_0x58a653>0x0)_0x2c92e8[_0x104928(0x168)](_0x58a653+'\x20failed');return _0x2c92e8[_0x104928(0x168)](_0x478736),_0x2c92e8['join'](',\x20');}async function getTargetFunctions(_0x45b58f,_0x47ee68){const _0x37dcc6=a44_0x4e164d,_0x27df61=_0x47ee68['str'](_0x37dcc6(0x161)),_0x55af9c=_0x47ee68[_0x37dcc6(0x17d)](_0x37dcc6(0x1ab)),_0x406d6c=normalizeBffType(_0x27df61)??undefined;if(_0x55af9c&&!_0x406d6c)throw CliErrors[_0x37dcc6(0x154)](_0x37dcc6(0x163));const _0x29000c=await scanLocalBffFunctions(_0x45b58f,_0x406d6c);if(_0x55af9c){const _0x545838=_0x29000c[_0x37dcc6(0x178)](_0x144698=>_0x144698[_0x37dcc6(0x1ab)]===_0x55af9c);if(_0x545838[_0x37dcc6(0x155)]===0x0)throw CliErrors['validation']('Local\x20function\x20not\x20found:\x20'+_0x406d6c+'/'+_0x55af9c);return _0x545838;}return _0x29000c;}function existingHookWarning(_0x178cb7){const _0x8eb1f7=a44_0x4e164d;return{'code':_0x8eb1f7(0x152),'lockKey':_0x178cb7,'message':_0x8eb1f7(0x15e)};}async function buildHookMaps(_0x568c9e,_0x4fcd01,_0x5d3d80,_0x1b08f6,_0x3b4b94){const _0x39c5f0=a44_0x4e164d,_0x99c4cd=_0x5d3d80['some'](_0x5d8f4a=>_0x5d8f4a[_0x39c5f0(0x161)]==='HOOK');if(!_0x99c4cd)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0x29807e=resolveApiModelSource(_0x4fcd01,_0x568c9e,_0x3b4b94),_0x11e353=loadAliasMap(_0x4fcd01,undefined,_0x29807e['filePath'],_0x29807e[_0x39c5f0(0x18a)]);assertUnambiguousHookAliases(_0x11e353);const _0xb407c9=[..._0x11e353[_0x39c5f0(0x1a3)](_0x5e28ad=>[_0x5e28ad['alias'],_0x5e28ad[_0x39c5f0(0x16a)]]),...trackedHookDirectoryMappings(_0x1b08f6)['map'](_0x1569c=>[_0x1569c[_0x39c5f0(0x188)],_0x1569c['datasetCode']])],_0x492623=await listDatasets(_0x568c9e);assertUnambiguousHookDirectoryMappings(_0xb407c9[_0x39c5f0(0x1a3)](([_0x3e3027,_0x553415])=>({'alias':_0x3e3027,'datasetCode':_0x553415})));const _0x145e2b=buildHookDirectoryIndexes(_0x492623,_0xb407c9),_0x5f3f97=new Map(),_0x1e199b=preflightPushHookDirectories(_0x5d3d80,_0x1b08f6,_0x145e2b,_0x5f3f97),_0x28915f=new Set(),_0x4a79eb=_0x5d3d80[_0x39c5f0(0x178)](_0x155f18=>_0x5f3f97[_0x39c5f0(0x18e)](_0x155f18[_0x39c5f0(0x172)])?.['startsWith'](_0x39c5f0(0x146))&&_0x1b08f6[_0x39c5f0(0x16c)][_0x155f18[_0x39c5f0(0x172)]]?.[_0x39c5f0(0x143)]&&_0x1b08f6['functions'][_0x155f18['lockKey']]?.[_0x39c5f0(0x16a)]);if(_0x4a79eb[_0x39c5f0(0x155)]>0x0){let _0x378e6d;try{_0x378e6d=await getBffScriptStatistics(_0x568c9e);}catch(_0x2cee9f){for(const _0x468b97 of _0x4a79eb)_0x5f3f97[_0x39c5f0(0x149)](_0x468b97[_0x39c5f0(0x172)],_0x39c5f0(0x148)+(_0x2cee9f instanceof Error?_0x2cee9f[_0x39c5f0(0x18f)]:String(_0x2cee9f)));return{'resolutions':_0x1e199b,'failures':_0x5f3f97,'existingHooks':_0x28915f};}for(const _0x1d1728 of _0x4a79eb){const _0x193d92=_0x1b08f6['functions'][_0x1d1728[_0x39c5f0(0x172)]];try{const _0x5e47f6=new Set(_0x5d3d80[_0x39c5f0(0x178)](_0x1fc933=>_0x1fc933[_0x39c5f0(0x161)]===_0x39c5f0(0x19e)&&_0x1b08f6[_0x39c5f0(0x16c)][_0x1fc933['lockKey']]?.[_0x39c5f0(0x16a)]===_0x193d92['datasetCode'])[_0x39c5f0(0x1a3)](_0x772841=>_0x772841['alias']));if(_0x5e47f6[_0x39c5f0(0x17a)]>0x1)throw CliErrors['validation'](_0x39c5f0(0x174));const _0x11c369=_0x378e6d[_0x39c5f0(0x190)](_0x418b46=>[{'datasetCode':_0x418b46[_0x39c5f0(0x16a)],'operationType':snakeToCamel(_0x418b46[_0x39c5f0(0x1a5)]),'functionNode':_0x39c5f0(0x16d),'id':_0x418b46['beforeScriptId']},{'datasetCode':_0x418b46['datasetCode'],'operationType':snakeToCamel(_0x418b46[_0x39c5f0(0x1a5)]),'functionNode':'after','id':_0x418b46[_0x39c5f0(0x1a2)]}])[_0x39c5f0(0x178)](_0x3cf613=>_0x3cf613['id']===_0x193d92[_0x39c5f0(0x143)]),_0x42d23c=await getBffScriptInfo(_0x193d92[_0x39c5f0(0x143)]);if(_0x42d23c['id']!==_0x193d92[_0x39c5f0(0x143)]||_0x42d23c[_0x39c5f0(0x147)]!==_0x568c9e||_0x42d23c[_0x39c5f0(0x14b)]!=='HOOK'||_0x42d23c[_0x39c5f0(0x15b)]!==_0x1d1728[_0x39c5f0(0x1ab)]||_0x193d92[_0x39c5f0(0x159)]==null||_0x42d23c['version']!==_0x193d92[_0x39c5f0(0x159)]||_0x11c369[_0x39c5f0(0x155)]!==0x1||_0x11c369[0x0]['datasetCode']!==_0x193d92['datasetCode']||_0x11c369[0x0][_0x39c5f0(0x1a5)]!==_0x1d1728[_0x39c5f0(0x1a5)]||_0x11c369[0x0][_0x39c5f0(0x1a6)]!==_0x1d1728[_0x39c5f0(0x1a6)]||_0x193d92[_0x39c5f0(0x1a5)]!==_0x1d1728[_0x39c5f0(0x1a5)]||_0x193d92['functionNode']!==_0x1d1728[_0x39c5f0(0x1a6)])throw CliErrors[_0x39c5f0(0x154)](_0x39c5f0(0x164));_0x28915f['add'](_0x1d1728[_0x39c5f0(0x172)]),_0x5f3f97['delete'](_0x1d1728['lockKey']);}catch(_0x36e23c){_0x5f3f97['set'](_0x1d1728[_0x39c5f0(0x172)],_0x36e23c instanceof Error?_0x36e23c['message']:String(_0x36e23c));}}}return{'resolutions':_0x1e199b,'failures':_0x5f3f97,'existingHooks':_0x28915f};}async function uploadSingleFunction(_0x4ed6e6,_0x57d033,_0x4a6f61,_0x4f1c6b){const _0x562357=a44_0x4e164d,_0x69c51f=await readFile(_0x57d033[_0x562357(0x1ac)],_0x562357(0x19f)),_0x287f3b=await computeFileHash(_0x57d033[_0x562357(0x1ac)]),_0x4c37f2=_0x4a6f61[_0x562357(0x16c)][_0x57d033[_0x562357(0x172)]];if(_0x4c37f2?.['remoteId']&&_0x4c37f2[_0x562357(0x159)]==null)throw CliErrors[_0x562357(0x154)](_0x57d033[_0x562357(0x172)]+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x52e400=extractScriptDescription(_0x69c51f);if(!_0x52e400&&_0x4c37f2?.[_0x562357(0x143)]){const _0x561020=await getBffScriptInfo(_0x4c37f2[_0x562357(0x143)]);_0x52e400=_0x561020['description']||undefined;}const _0x504bb4={'appCode':_0x4ed6e6,'functionName':_0x57d033[_0x562357(0x1ab)],'scriptType':_0x57d033[_0x562357(0x161)],'scriptContent':_0x69c51f};if(_0x4c37f2?.[_0x562357(0x143)])_0x504bb4['id']=_0x4c37f2[_0x562357(0x143)];if(_0x4c37f2?.['version']!=null)_0x504bb4[_0x562357(0x159)]=_0x4c37f2[_0x562357(0x159)];if(_0x52e400)_0x504bb4[_0x562357(0x185)]=_0x52e400;if(_0x57d033['type']===_0x562357(0x19e)){const _0x33dbb0=_0x4f1c6b[_0x562357(0x162)]['get'](_0x57d033[_0x562357(0x172)]);if(!_0x33dbb0&&!_0x4f1c6b[_0x562357(0x19a)]['has'](_0x57d033[_0x562357(0x172)])||!_0x57d033[_0x562357(0x1a5)]||!_0x57d033[_0x562357(0x1a6)])throw CliErrors[_0x562357(0x154)]('Incomplete\x20HOOK\x20path:\x20'+_0x57d033[_0x562357(0x172)]);_0x33dbb0&&(_0x504bb4[_0x562357(0x19d)]=_0x33dbb0[_0x562357(0x144)]['id'],_0x504bb4['operationType']=_0x57d033[_0x562357(0x1a5)]),_0x504bb4[_0x562357(0x1a6)]=_0x57d033[_0x562357(0x1a6)];}const _0x17ef45=await saveBffScript(_0x504bb4),_0x45f58f=_0x17ef45['id'],_0x17a269=_0x17ef45['script']??await getBffScriptInfo(_0x45f58f),_0x14fd89={'hash':_0x287f3b,'remoteId':_0x45f58f,'version':_0x17a269['version']};if(_0x57d033[_0x562357(0x161)]===_0x562357(0x19e)){const _0x2d8562=_0x4f1c6b[_0x562357(0x162)][_0x562357(0x18e)](_0x57d033['lockKey']);if(!_0x2d8562){_0x4a6f61['functions'][_0x57d033[_0x562357(0x172)]]={..._0x4c37f2,..._0x14fd89};return;}_0x14fd89['alias']=_0x2d8562[_0x562357(0x188)]??_0x4c37f2?.['alias'],_0x14fd89[_0x562357(0x16a)]=_0x2d8562[_0x562357(0x16a)],_0x14fd89[_0x562357(0x1a5)]=_0x57d033[_0x562357(0x1a5)],_0x14fd89['functionNode']=_0x57d033[_0x562357(0x1a6)];}_0x4a6f61[_0x562357(0x16c)][_0x57d033[_0x562357(0x172)]]=_0x14fd89;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0xf1acd,_0x42d44a,_0x13f4d7){const _0x1915b7=a44_0x4e164d;if(_0x13f4d7['length']===0x0)return;for(let _0xac45a6=0x0;_0xac45a6<LOCK_SETTLE_RETRY_COUNT;_0xac45a6+=0x1){const _0x2f6592=await readBffLockFile(_0xf1acd),_0x45fbe=_0x2f6592?.['apps']?.[_0x42d44a]?.[_0x1915b7(0x16c)]??{},_0x5e885c=_0x13f4d7['every'](_0x4bff89=>!!_0x45fbe[_0x4bff89]?.[_0x1915b7(0x143)]);if(_0x5e885c)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x1915b7(0x193)+_0x13f4d7[_0x1915b7(0x14d)](',\x20')+'.');}
|
|
1
|
+
const a44_0x9ef2f9=a44_0x168c;(function(_0x2f9e3b,_0x459e85){const _0x2320c6=a44_0x168c,_0xf9de7=_0x2f9e3b();while(!![]){try{const _0x2489f5=-parseInt(_0x2320c6(0xe0))/0x1*(parseInt(_0x2320c6(0x11c))/0x2)+parseInt(_0x2320c6(0xca))/0x3+parseInt(_0x2320c6(0xfd))/0x4+-parseInt(_0x2320c6(0xff))/0x5*(parseInt(_0x2320c6(0xd5))/0x6)+-parseInt(_0x2320c6(0x112))/0x7+-parseInt(_0x2320c6(0xcd))/0x8+parseInt(_0x2320c6(0xef))/0x9;if(_0x2489f5===_0x459e85)break;else _0xf9de7['push'](_0xf9de7['shift']());}catch(_0x2ad073){_0xf9de7['push'](_0xf9de7['shift']());}}}(a44_0x5c97,0xe44e7));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_0x9ef2f9(0xe2),'command':a44_0x9ef2f9(0xd4),'description':'Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','risk':a44_0x9ef2f9(0x104),'structuredErrors':!![],'flags':[{'name':a44_0x9ef2f9(0xc0),'type':'string','description':a44_0x9ef2f9(0xd0),'enum':[a44_0x9ef2f9(0xd8),'ENDPOINT',a44_0x9ef2f9(0x101)]},{'name':a44_0x9ef2f9(0xc2),'type':a44_0x9ef2f9(0x103),'description':a44_0x9ef2f9(0xdf)},{'name':a44_0x9ef2f9(0xb9),'type':'boolean','description':a44_0x9ef2f9(0xe9)}],async 'dryRun'(_0x1fc4be){const _0x3ef70a=a44_0x9ef2f9,_0x2008fd=loadBffProjectConfig(_0x1fc4be['appCode']),_0x557db6=await readBffLockFile(_0x2008fd['lockFilePath']),{appLock:_0x193ce1}=ensureLockScope(_0x557db6??createEmptyBffLock(),_0x1fc4be[_0x3ef70a(0xfc)],_0x2008fd[_0x3ef70a(0xc4)],_0x3ef70a(0xd4)),_0x23911d=await getTargetFunctions(_0x2008fd,_0x1fc4be),_0x21ef72=_0x23911d[_0x3ef70a(0xe7)](_0x498432=>_0x498432['type']===_0x3ef70a(0x101))?await scanLocalBffFunctions(_0x2008fd,_0x3ef70a(0x101)):_0x23911d,_0x4aac5e=await buildHookMaps(_0x1fc4be[_0x3ef70a(0xfc)],_0x1fc4be[_0x3ef70a(0xf5)],_0x21ef72,_0x193ce1,_0x1fc4be[_0x3ef70a(0x114)]||_0x1fc4be[_0x3ef70a(0x121)]?.['currentApp']||_0x1fc4be[_0x3ef70a(0x121)]?.[_0x3ef70a(0x106)]),_0x9d6316=_0x1fc4be[_0x3ef70a(0xf4)](_0x3ef70a(0xb9)),_0x2a1cb0=[];for(const _0x4f986a of _0x23911d){const _0x11a1e1=await computeFileHash(_0x4f986a[_0x3ef70a(0xf7)]),_0x5d8146=_0x193ce1[_0x3ef70a(0x124)][_0x4f986a['lockKey']],_0x1b60e5=!!_0x5d8146&&_0x5d8146[_0x3ef70a(0xcf)]===_0x11a1e1,_0x4db636=_0x4aac5e[_0x3ef70a(0x108)][_0x3ef70a(0xc5)](_0x4f986a[_0x3ef70a(0xfe)]),_0x3b30ac=!!_0x5d8146?.['remoteId']&&_0x5d8146[_0x3ef70a(0xf2)]==null&&(_0x9d6316||!_0x1b60e5),_0x2bf0b3=_0x3b30ac?missingRemoteVersionConflict(_0x4f986a,_0x5d8146):undefined,_0xa44df3=_0x4aac5e[_0x3ef70a(0x125)][_0x3ef70a(0x119)](_0x4f986a[_0x3ef70a(0xfe)])?_0x3ef70a(0x10d):!_0x9d6316&&_0x1b60e5?'unchanged':_0x2bf0b3?_0x3ef70a(0x120):_0x3ef70a(0x107);_0x2a1cb0[_0x3ef70a(0xd4)]({'lockKey':_0x4f986a[_0x3ef70a(0xfe)],'filePath':_0x4f986a[_0x3ef70a(0xf7)],'remoteId':_0x5d8146?.['remoteId']??null,'mode':_0x5d8146?.[_0x3ef70a(0x10c)]?'update':'create','status':_0xa44df3,..._0x4aac5e['failures']['has'](_0x4f986a[_0x3ef70a(0xfe)])?{'error':_0x4aac5e['failures'][_0x3ef70a(0xc5)](_0x4f986a['lockKey'])}:{},..._0x2bf0b3?{'conflict':_0x2bf0b3}:{},..._0x4aac5e[_0x3ef70a(0xbf)][_0x3ef70a(0x119)](_0x4f986a[_0x3ef70a(0xfe)])?{'datasetCode':_0x5d8146?.[_0x3ef70a(0xd1)],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x4f986a[_0x3ef70a(0xfe)])]}:{},..._0x4db636?{'alias':_0x4db636[_0x3ef70a(0xc3)]??null,'datasetCode':_0x4db636['datasetCode'],'operationType':_0x4f986a[_0x3ef70a(0x11e)],'functionNode':_0x4f986a[_0x3ef70a(0xe8)],'warnings':_0x4db636['warnings']}:{}});}return{'method':_0x3ef70a(0x111),'url':_0x3ef70a(0x10f),'body':{'appCode':_0x1fc4be[_0x3ef70a(0xfc)],'force':_0x9d6316,'files':_0x2a1cb0,'cacheClearAtRuntime':_0x2a1cb0['some'](_0x233fb1=>_0x233fb1[_0x3ef70a(0xed)]===_0x3ef70a(0x107)),'cacheClearAtRuntimeTimes':_0x2a1cb0[_0x3ef70a(0xe7)](_0x47ba98=>_0x47ba98[_0x3ef70a(0xed)]===_0x3ef70a(0x107))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x3ef70a(0xf3)+_0x2a1cb0[_0x3ef70a(0xba)]+'\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded'};},async 'execute'(_0x535fed){const _0x4716d9=a44_0x9ef2f9,_0xebee8a=loadBffProjectConfig(_0x535fed[_0x4716d9(0xfc)]),_0x1c9167=await readBffLockFile(_0xebee8a[_0x4716d9(0xf6)]),{lockData:_0x462525,appLock:_0x2e8ba0}=ensureLockScope(_0x1c9167??createEmptyBffLock(),_0x535fed[_0x4716d9(0xfc)],_0xebee8a[_0x4716d9(0xc4)],_0x4716d9(0xd4)),_0x2c9177=await getTargetFunctions(_0xebee8a,_0x535fed);if(_0x2c9177[_0x4716d9(0xba)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':_0x4716d9(0xea)};const _0x2b7d75=_0x535fed[_0x4716d9(0xf4)](_0x4716d9(0xb9)),_0xcee7e5=JSON[_0x4716d9(0x122)](JSON[_0x4716d9(0xec)](_0x462525)),_0x6e6959=_0xcee7e5['apps'][_0x535fed['appCode']];if(!_0x6e6959)throw new Error(_0x4716d9(0xbe)+_0x535fed[_0x4716d9(0xfc)]+_0x4716d9(0x113));const _0x3c22c0=_0x2c9177[_0x4716d9(0xe7)](_0x3fcac8=>_0x3fcac8[_0x4716d9(0xc0)]===_0x4716d9(0x101))?await scanLocalBffFunctions(_0xebee8a,'HOOK'):_0x2c9177,_0x242639=await buildHookMaps(_0x535fed[_0x4716d9(0xfc)],_0x535fed[_0x4716d9(0xf5)],_0x3c22c0,_0x6e6959,_0x535fed[_0x4716d9(0x114)]||_0x535fed[_0x4716d9(0x121)]?.[_0x4716d9(0xf1)]||_0x535fed[_0x4716d9(0x121)]?.[_0x4716d9(0x106)]),_0x28d07c=[],_0x23d3e2=[],_0x36e0e0=[],_0x200cc7=[];for(const _0x44cdc2 of _0x2c9177){const _0x38b64b=_0x242639[_0x4716d9(0x125)][_0x4716d9(0xc5)](_0x44cdc2[_0x4716d9(0xfe)]);if(_0x38b64b){_0x200cc7['push']({'lockKey':_0x44cdc2['lockKey'],'error':_0x38b64b});continue;}const _0x3ef8fa=await computeFileHash(_0x44cdc2[_0x4716d9(0xf7)]),_0x510ab6=_0x6e6959['functions'][_0x44cdc2[_0x4716d9(0xfe)]];if(!_0x2b7d75&&_0x510ab6&&_0x510ab6[_0x4716d9(0xcf)]===_0x3ef8fa){_0x23d3e2[_0x4716d9(0xd4)]({'lockKey':_0x44cdc2[_0x4716d9(0xfe)],'reason':_0x4716d9(0xb7)});continue;}if(_0x510ab6?.['remoteId']&&_0x510ab6[_0x4716d9(0xf2)]==null){_0x36e0e0[_0x4716d9(0xd4)](missingRemoteVersionConflict(_0x44cdc2,_0x510ab6));continue;}try{await uploadSingleFunction(_0x535fed[_0x4716d9(0xfc)],_0x44cdc2,_0x6e6959,_0x242639);const _0x10ffaf=_0x6e6959['functions'][_0x44cdc2[_0x4716d9(0xfe)]];_0x28d07c[_0x4716d9(0xd4)]({'lockKey':_0x44cdc2['lockKey'],'remoteId':_0x10ffaf?.[_0x4716d9(0x10c)]??0x0});}catch(_0x18764a){const _0x2f3e43=remoteVersionChangedConflict(_0x44cdc2,_0x510ab6,_0x18764a);if(_0x2f3e43){_0x36e0e0[_0x4716d9(0xd4)](_0x2f3e43);continue;}_0x200cc7[_0x4716d9(0xd4)]({'lockKey':_0x44cdc2[_0x4716d9(0xfe)],'error':_0x18764a instanceof Error?_0x18764a[_0x4716d9(0xfb)]:String(_0x18764a)});}}_0x6e6959['lastSync']=new Date()[_0x4716d9(0xcb)](),await writeBffLockFile(_0xebee8a[_0x4716d9(0xf6)],_0xcee7e5),await waitForUploadedLockEntries(_0xebee8a[_0x4716d9(0xf6)],_0x535fed[_0x4716d9(0xfc)],_0x28d07c[_0x4716d9(0x11f)](_0x564340=>_0x564340[_0x4716d9(0xfe)]));let _0x189305={'attempted':![],'cleared':![]};if(_0x28d07c[_0x4716d9(0xba)]>0x0)try{let _0x2b0fea='';for(let _0x11b3a3=0x0;_0x11b3a3<CACHE_CLEAR_ATTEMPTS;_0x11b3a3+=0x1){_0x2b0fea=await clearBffScriptCache(),_0x11b3a3<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x189305={'attempted':!![],'cleared':!![],'message':_0x2b0fea||_0x4716d9(0xf8)};}catch(_0x52802b){_0x189305={'attempted':!![],'cleared':![],'error':_0x52802b instanceof Error?_0x52802b[_0x4716d9(0xfb)]:String(_0x52802b)};}const _0x26a2ac=_0x200cc7[_0x4716d9(0xba)]===0x0&&(_0x189305['attempted']?_0x189305[_0x4716d9(0xd9)]:!![]),_0x1e8b7e=_0x26a2ac,_0x160e05=_0x189305['attempted']?_0x189305[_0x4716d9(0xd9)]?_0x4716d9(0x117):_0x4716d9(0xe5):_0x4716d9(0x11d);return{'ok':_0x1e8b7e,'data':{'uploaded':_0x28d07c,'skipped':_0x23d3e2,'conflicts':_0x36e0e0,'failed':_0x200cc7,'cacheClear':_0x189305,'warnings':[...[..._0x242639[_0x4716d9(0x108)][_0x4716d9(0x118)]()][_0x4716d9(0x102)](_0xacf0a4=>_0xacf0a4[_0x4716d9(0xf0)]),...[..._0x242639[_0x4716d9(0xbf)]][_0x4716d9(0x11f)](existingHookWarning)]},'message':formatPushMessage(_0x28d07c[_0x4716d9(0xba)],_0x23d3e2['length'],_0x36e0e0[_0x4716d9(0xba)],_0x200cc7[_0x4716d9(0xba)],_0x160e05)};}};function missingRemoteVersionConflict(_0x1beb7c,_0x3d29c2){const _0x35142c=a44_0x9ef2f9;return remoteVersionConflict(_0x1beb7c,_0x3d29c2,_0x35142c(0xc6),_0x35142c(0x110));}function remoteVersionChangedConflict(_0x567ad5,_0x5b3e90,_0x38ed28){const _0x6330c=a44_0x9ef2f9;if(!_0x5b3e90?.[_0x6330c(0x10c)]||_0x5b3e90['version']==null||!isRemoteVersionConflict(_0x38ed28))return undefined;return remoteVersionConflict(_0x567ad5,_0x5b3e90,_0x6330c(0xbc),_0x6330c(0xe4));}function remoteVersionConflict(_0x23daf3,_0xa88b6f,_0x288a66,_0x5cf315){const _0x584fa5=a44_0x9ef2f9;return{'code':_0x288a66,'lockKey':_0x23daf3[_0x584fa5(0xfe)],'filePath':_0x23daf3[_0x584fa5(0xf7)],'remoteId':_0xa88b6f[_0x584fa5(0x10c)],..._0xa88b6f[_0x584fa5(0xf2)]!=null?{'expectedVersion':_0xa88b6f[_0x584fa5(0xf2)]}:{},'message':_0x5cf315,'nextAction':{'action':_0x584fa5(0xd2),'command':CLI_BIN_NAME+'\x20bff\x20detail\x20--id\x20'+_0xa88b6f[_0x584fa5(0x10c)]+'\x20--format\x20compress','requiresReview':!![],'message':_0x584fa5(0xd7)}};}function isRemoteVersionConflict(_0x505130){const _0x3dba38=a44_0x9ef2f9,_0x18afd0=_0x505130 instanceof Error?_0x505130[_0x3dba38(0xfb)]:String(_0x505130),_0x5d9a5d=getPlatformErrorCode(_0x505130)??'';return[_0x18afd0,_0x5d9a5d][_0x3dba38(0xe7)](_0xef4140=>/(?: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[_0x3dba38(0xd3)](_0xef4140));}function a44_0x168c(_0x4f6079,_0x4f778d){_0x4f6079=_0x4f6079-0xb7;const _0x5c974e=a44_0x5c97();let _0x168c39=_0x5c974e[_0x4f6079];return _0x168c39;}function formatPushMessage(_0x1403e1,_0x383472,_0x90600d,_0x34d093,_0x5aaff1){const _0x1ee06b=a44_0x9ef2f9,_0x3302=[_0x1ee06b(0xdb)+_0x1403e1+_0x1ee06b(0xe3),_0x383472+_0x1ee06b(0xcc)];_0x90600d>0x0&&_0x3302[_0x1ee06b(0xd4)](_0x90600d+_0x1ee06b(0xc9)+(_0x90600d===0x1?'':'s')+'\x20'+(_0x90600d===0x1?_0x1ee06b(0xf9):_0x1ee06b(0xfa))+_0x1ee06b(0x11b));if(_0x34d093>0x0)_0x3302[_0x1ee06b(0xd4)](_0x34d093+_0x1ee06b(0xde));return _0x3302[_0x1ee06b(0xd4)](_0x5aaff1),_0x3302['join'](',\x20');}async function getTargetFunctions(_0x27262a,_0x3ef46a){const _0x25cd42=a44_0x9ef2f9,_0x2ca9e4=_0x3ef46a['str'](_0x25cd42(0xc0)),_0x5f0939=_0x3ef46a[_0x25cd42(0xc8)](_0x25cd42(0xc2)),_0x531485=normalizeBffType(_0x2ca9e4)??undefined;if(_0x5f0939&&!_0x531485)throw CliErrors[_0x25cd42(0x115)](_0x25cd42(0x116));const _0x418a6b=await scanLocalBffFunctions(_0x27262a,_0x531485);if(_0x5f0939){const _0x2f55fa=_0x418a6b[_0x25cd42(0xd6)](_0x571a5b=>_0x571a5b[_0x25cd42(0xc2)]===_0x5f0939);if(_0x2f55fa['length']===0x0)throw CliErrors['validation'](_0x25cd42(0xdd)+_0x531485+'/'+_0x5f0939);return _0x2f55fa;}return _0x418a6b;}function existingHookWarning(_0x1c709c){const _0x3d6670=a44_0x9ef2f9;return{'code':_0x3d6670(0xe6),'lockKey':_0x1c709c,'message':_0x3d6670(0x123)};}async function buildHookMaps(_0x303248,_0x2c7545,_0x2b8ffc,_0x269365,_0x2fb701){const _0x3ef7f6=a44_0x9ef2f9,_0x57ccb8=_0x2b8ffc['some'](_0x1d54b5=>_0x1d54b5[_0x3ef7f6(0xc0)]==='HOOK');if(!_0x57ccb8)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0x49a16b=resolveApiModelSource(_0x2c7545,_0x303248,_0x2fb701),_0x13a3b4=loadAliasMap(_0x2c7545,undefined,_0x49a16b[_0x3ef7f6(0xf7)],_0x49a16b['profileName']);assertUnambiguousHookAliases(_0x13a3b4);const _0x4e259b=[..._0x13a3b4[_0x3ef7f6(0x11f)](_0x27eb7f=>[_0x27eb7f[_0x3ef7f6(0xc3)],_0x27eb7f[_0x3ef7f6(0xd1)]]),...trackedHookDirectoryMappings(_0x269365)[_0x3ef7f6(0x11f)](_0x22b786=>[_0x22b786[_0x3ef7f6(0xc3)],_0x22b786[_0x3ef7f6(0xd1)]])],_0x55fea9=await listDatasets(_0x303248);assertUnambiguousHookDirectoryMappings(_0x4e259b[_0x3ef7f6(0x11f)](([_0x2712b2,_0x2e7948])=>({'alias':_0x2712b2,'datasetCode':_0x2e7948})));const _0x1dc7ad=buildHookDirectoryIndexes(_0x55fea9,_0x4e259b),_0x37e8a1=new Map(),_0x47f401=preflightPushHookDirectories(_0x2b8ffc,_0x269365,_0x1dc7ad,_0x37e8a1),_0x468647=new Set(),_0x392784=_0x2b8ffc[_0x3ef7f6(0xd6)](_0x3056f6=>_0x37e8a1[_0x3ef7f6(0xc5)](_0x3056f6['lockKey'])?.[_0x3ef7f6(0xeb)](_0x3ef7f6(0xbd))&&_0x269365[_0x3ef7f6(0x124)][_0x3056f6[_0x3ef7f6(0xfe)]]?.[_0x3ef7f6(0x10c)]&&_0x269365['functions'][_0x3056f6[_0x3ef7f6(0xfe)]]?.['datasetCode']);if(_0x392784['length']>0x0){let _0x1b4996;try{_0x1b4996=await getBffScriptStatistics(_0x303248);}catch(_0x3b1b89){for(const _0x55e865 of _0x392784)_0x37e8a1[_0x3ef7f6(0xe1)](_0x55e865[_0x3ef7f6(0xfe)],_0x3ef7f6(0x105)+(_0x3b1b89 instanceof Error?_0x3b1b89[_0x3ef7f6(0xfb)]:String(_0x3b1b89)));return{'resolutions':_0x47f401,'failures':_0x37e8a1,'existingHooks':_0x468647};}for(const _0x4175b4 of _0x392784){const _0x5249f9=_0x269365[_0x3ef7f6(0x124)][_0x4175b4[_0x3ef7f6(0xfe)]];try{const _0x3c464e=new Set(_0x2b8ffc[_0x3ef7f6(0xd6)](_0x4fc480=>_0x4fc480[_0x3ef7f6(0xc0)]===_0x3ef7f6(0x101)&&_0x269365[_0x3ef7f6(0x124)][_0x4fc480['lockKey']]?.[_0x3ef7f6(0xd1)]===_0x5249f9['datasetCode'])[_0x3ef7f6(0x11f)](_0x190109=>_0x190109[_0x3ef7f6(0xc3)]));if(_0x3c464e[_0x3ef7f6(0xc7)]>0x1)throw CliErrors['validation'](_0x3ef7f6(0xda));const _0x52f22f=_0x1b4996[_0x3ef7f6(0x102)](_0x7de1f6=>[{'datasetCode':_0x7de1f6['datasetCode'],'operationType':snakeToCamel(_0x7de1f6[_0x3ef7f6(0x11e)]),'functionNode':'before','id':_0x7de1f6['beforeScriptId']},{'datasetCode':_0x7de1f6[_0x3ef7f6(0xd1)],'operationType':snakeToCamel(_0x7de1f6[_0x3ef7f6(0x11e)]),'functionNode':_0x3ef7f6(0xbb),'id':_0x7de1f6[_0x3ef7f6(0xb8)]}])[_0x3ef7f6(0xd6)](_0x9d6a08=>_0x9d6a08['id']===_0x5249f9[_0x3ef7f6(0x10c)]),_0x4c2e91=await getBffScriptInfo(_0x5249f9[_0x3ef7f6(0x10c)]);if(_0x4c2e91['id']!==_0x5249f9['remoteId']||_0x4c2e91[_0x3ef7f6(0xfc)]!==_0x303248||_0x4c2e91['scriptType']!==_0x3ef7f6(0x101)||_0x4c2e91['functionName']!==_0x4175b4[_0x3ef7f6(0xc2)]||_0x5249f9[_0x3ef7f6(0xf2)]==null||_0x4c2e91[_0x3ef7f6(0xf2)]!==_0x5249f9[_0x3ef7f6(0xf2)]||_0x52f22f['length']!==0x1||_0x52f22f[0x0][_0x3ef7f6(0xd1)]!==_0x5249f9[_0x3ef7f6(0xd1)]||_0x52f22f[0x0][_0x3ef7f6(0x11e)]!==_0x4175b4[_0x3ef7f6(0x11e)]||_0x52f22f[0x0]['functionNode']!==_0x4175b4['functionNode']||_0x5249f9[_0x3ef7f6(0x11e)]!==_0x4175b4[_0x3ef7f6(0x11e)]||_0x5249f9[_0x3ef7f6(0xe8)]!==_0x4175b4[_0x3ef7f6(0xe8)])throw CliErrors[_0x3ef7f6(0x115)](_0x3ef7f6(0x10b));_0x468647[_0x3ef7f6(0x100)](_0x4175b4['lockKey']),_0x37e8a1[_0x3ef7f6(0xdc)](_0x4175b4['lockKey']);}catch(_0x320205){_0x37e8a1[_0x3ef7f6(0xe1)](_0x4175b4['lockKey'],_0x320205 instanceof Error?_0x320205[_0x3ef7f6(0xfb)]:String(_0x320205));}}}return{'resolutions':_0x47f401,'failures':_0x37e8a1,'existingHooks':_0x468647};}function a44_0x5c97(){const _0x44d9ee=['review_remote_and_merge','test','push','366jlQUOg','filter','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.','COMMON','cleared','Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.','Push\x20complete:\x20','delete','Local\x20function\x20not\x20found:\x20','\x20failed','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','9WsRZOV','set','bff','\x20uploaded','Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.','runtime\x20cache\x20clear\x20failed','EXISTING_HOOK_BINDING_PRESERVED','some','functionNode','Force\x20push\x20ignoring\x20hash\x20protection','No\x20local\x20Backend\x20Function\x20scripts\x20found.','startsWith','stringify','status','apps','41128254zhOpte','warnings','currentApp','version','Would\x20inspect\x20','bool','apiDir','lockFilePath','filePath','Runtime\x20script\x20cache\x20cleared.','requires','require','message','appCode','7151004WKJMba','lockKey','90580uNwczd','add','HOOK','flatMap','string','write','Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20','defaultApp','would_push','resolutions','utf8','every','Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.','remoteId','failed','Incomplete\x20HOOK\x20path:\x20','/api/management/library/scripts/save','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','POST','9919322IaLDRo','\x22\x20not\x20found\x20after\x20ensureLockScope.','selectedAppName','validation','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','runtime\x20cache\x20cleared','values','has','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','\x20resolution','378306ZrMglA','runtime\x20cache\x20not\x20needed','operationType','map','conflict','mergedCli','parse','Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.','functions','failures','join','unchanged','afterScriptId','force','length','after','BFF_REMOTE_VERSION_CHANGED','HOOK_DATASET_NOT_FOUND:','Lock\x20scope\x20for\x20app\x20\x22','existingHooks','type','description','name','alias','scriptsRoot','get','BFF_REMOTE_VERSION_MISSING','size','str','\x20conflict','3849bjxTWr','toISOString','\x20skipped','9593584iPbMWt','script','hash','Push\x20only\x20this\x20script\x20type','datasetCode'];a44_0x5c97=function(){return _0x44d9ee;};return a44_0x5c97();}async function uploadSingleFunction(_0x283620,_0x3f8604,_0x2bc515,_0x434adc){const _0x4d25b4=a44_0x9ef2f9,_0x54296c=await readFile(_0x3f8604[_0x4d25b4(0xf7)],_0x4d25b4(0x109)),_0x43075=await computeFileHash(_0x3f8604['filePath']),_0x15cb36=_0x2bc515[_0x4d25b4(0x124)][_0x3f8604[_0x4d25b4(0xfe)]];if(_0x15cb36?.[_0x4d25b4(0x10c)]&&_0x15cb36['version']==null)throw CliErrors[_0x4d25b4(0x115)](_0x3f8604['lockKey']+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x254de2=extractScriptDescription(_0x54296c);if(!_0x254de2&&_0x15cb36?.[_0x4d25b4(0x10c)]){const _0xc90635=await getBffScriptInfo(_0x15cb36['remoteId']);_0x254de2=_0xc90635[_0x4d25b4(0xc1)]||undefined;}const _0x99475e={'appCode':_0x283620,'functionName':_0x3f8604['name'],'scriptType':_0x3f8604['type'],'scriptContent':_0x54296c};if(_0x15cb36?.[_0x4d25b4(0x10c)])_0x99475e['id']=_0x15cb36[_0x4d25b4(0x10c)];if(_0x15cb36?.['version']!=null)_0x99475e['version']=_0x15cb36[_0x4d25b4(0xf2)];if(_0x254de2)_0x99475e[_0x4d25b4(0xc1)]=_0x254de2;if(_0x3f8604['type']===_0x4d25b4(0x101)){const _0x3a997c=_0x434adc[_0x4d25b4(0x108)][_0x4d25b4(0xc5)](_0x3f8604[_0x4d25b4(0xfe)]);if(!_0x3a997c&&!_0x434adc['existingHooks'][_0x4d25b4(0x119)](_0x3f8604[_0x4d25b4(0xfe)])||!_0x3f8604[_0x4d25b4(0x11e)]||!_0x3f8604[_0x4d25b4(0xe8)])throw CliErrors[_0x4d25b4(0x115)](_0x4d25b4(0x10e)+_0x3f8604['lockKey']);_0x3a997c&&(_0x99475e['datasetId']=_0x3a997c['dataset']['id'],_0x99475e[_0x4d25b4(0x11e)]=_0x3f8604[_0x4d25b4(0x11e)]),_0x99475e[_0x4d25b4(0xe8)]=_0x3f8604[_0x4d25b4(0xe8)];}const _0x1982e0=await saveBffScript(_0x99475e),_0x3f2775=_0x1982e0['id'],_0x1032e3=_0x1982e0[_0x4d25b4(0xce)]??await getBffScriptInfo(_0x3f2775),_0x56e440={'hash':_0x43075,'remoteId':_0x3f2775,'version':_0x1032e3[_0x4d25b4(0xf2)]};if(_0x3f8604[_0x4d25b4(0xc0)]===_0x4d25b4(0x101)){const _0x3ec12f=_0x434adc[_0x4d25b4(0x108)][_0x4d25b4(0xc5)](_0x3f8604[_0x4d25b4(0xfe)]);if(!_0x3ec12f){_0x2bc515[_0x4d25b4(0x124)][_0x3f8604['lockKey']]={..._0x15cb36,..._0x56e440};return;}_0x56e440[_0x4d25b4(0xc3)]=_0x3ec12f['alias']??_0x15cb36?.[_0x4d25b4(0xc3)],_0x56e440[_0x4d25b4(0xd1)]=_0x3ec12f[_0x4d25b4(0xd1)],_0x56e440[_0x4d25b4(0x11e)]=_0x3f8604['operationType'],_0x56e440['functionNode']=_0x3f8604[_0x4d25b4(0xe8)];}_0x2bc515[_0x4d25b4(0x124)][_0x3f8604[_0x4d25b4(0xfe)]]=_0x56e440;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x97c2dd,_0x7cabfd,_0xded262){const _0x1f4469=a44_0x9ef2f9;if(_0xded262[_0x1f4469(0xba)]===0x0)return;for(let _0x261ef2=0x0;_0x261ef2<LOCK_SETTLE_RETRY_COUNT;_0x261ef2+=0x1){const _0xbd17e9=await readBffLockFile(_0x97c2dd),_0xf64f40=_0xbd17e9?.[_0x1f4469(0xee)]?.[_0x7cabfd]?.[_0x1f4469(0x124)]??{},_0x2863c5=_0xded262[_0x1f4469(0x10a)](_0x2c1ea2=>!!_0xf64f40[_0x2c1ea2]?.[_0x1f4469(0x10c)]);if(_0x2863c5)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x1f4469(0x11a)+_0xded262[_0x1f4469(0x126)](',\x20')+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a45_0x15bd5a=a45_0xcbf8;(function(_0x128330,_0x4d8f36){const _0x6180eb=a45_0xcbf8,_0x339b97=_0x128330();while(!![]){try{const _0x4348a8=parseInt(_0x6180eb(0x14a))/0x1+-parseInt(_0x6180eb(0x142))/0x2+-parseInt(_0x6180eb(0x13c))/0x3+parseInt(_0x6180eb(0x133))/0x4*(parseInt(_0x6180eb(0x137))/0x5)+parseInt(_0x6180eb(0x13b))/0x6+-parseInt(_0x6180eb(0x152))/0x7*(-parseInt(_0x6180eb(0x14d))/0x8)+-parseInt(_0x6180eb(0x150))/0x9*(parseInt(_0x6180eb(0x140))/0xa);if(_0x4348a8===_0x4d8f36)break;else _0x339b97['push'](_0x339b97['shift']());}catch(_0x442e01){_0x339b97['push'](_0x339b97['shift']());}}}(a45_0x120e,0x2b4b8));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';function a45_0x120e(){const _0x2c7015=['233023Zuoikn','length','push','currentApp','72188ZWkurS','mergedCli','filePath','lockKey','65jbrinH','\x20unchanged','bool','appCode','465912OzAlrI','162111bvDPrU','hash','status','apiDir','3135490oRrzgs','scriptsRoot','637072rpyBHx','profileName','selectedAppName','\x20remote-only','defaultApp','All\x20Backend\x20Function\x20scripts\x20are\x20in\x20sync.','remote','\x20added,\x20','251594bVrMzW','functions','map','72lwyBQR','\x20modified,\x20','datasetCode','9yWeJHF','has'];a45_0x120e=function(){return _0x2c7015;};return a45_0x120e();}import{resolveApiModelSource}from'../../api/model-source.js';import{loadBffProjectConfig}from'../../core/bff/config.js';function a45_0xcbf8(_0x404d8a,_0x571fb8){_0x404d8a=_0x404d8a-0x133;const _0x120efe=a45_0x120e();let _0xcbf8f8=_0x120efe[_0x404d8a];return _0xcbf8f8;}import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':'bff','command':a45_0x15bd5a(0x13e),'description':'Check\x20local\x20Backend\x20Function\x20sync\x20status\x20against\x20lock\x20file','risk':'read','flags':[{'name':a45_0x15bd5a(0x148),'type':'boolean','description':'Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally'}],async 'execute'(_0x430454){const _0x45c4d7=a45_0x15bd5a,_0x3dec2a=loadBffProjectConfig(_0x430454[_0x45c4d7(0x13a)]),_0x1950f6=await readBffLockFile(_0x3dec2a['lockFilePath']),{appLock:_0x2c4f38}=ensureLockScope(_0x1950f6??createEmptyBffLock(),_0x430454[_0x45c4d7(0x13a)],_0x3dec2a[_0x45c4d7(0x141)],_0x45c4d7(0x13e)),_0x4ca16e=await scanLocalBffFunctions(_0x3dec2a),_0x160ea3=[],_0x5e7509=[],_0x9acac5=[];for(const _0x448cfe of _0x4ca16e){const _0xb1b5cc=await computeFileHash(_0x448cfe[_0x45c4d7(0x135)]),_0x23242b=_0x2c4f38[_0x45c4d7(0x14b)][_0x448cfe[_0x45c4d7(0x136)]];if(!_0x23242b)_0x160ea3['push'](_0x448cfe[_0x45c4d7(0x136)]);else _0x23242b[_0x45c4d7(0x13d)]!==_0xb1b5cc?_0x5e7509[_0x45c4d7(0x154)](_0x448cfe[_0x45c4d7(0x136)]):_0x9acac5['push'](_0x448cfe[_0x45c4d7(0x136)]);}const _0x207b79=[];if(_0x430454[_0x45c4d7(0x139)](_0x45c4d7(0x148))){const _0x5dad82=resolveApiModelSource(_0x430454['apiDir'],_0x430454[_0x45c4d7(0x13a)],_0x430454[_0x45c4d7(0x144)]||_0x430454[_0x45c4d7(0x134)]?.[_0x45c4d7(0x155)]||_0x430454[_0x45c4d7(0x134)]?.[_0x45c4d7(0x146)]),_0x5c6229=loadAliasMap(_0x430454[_0x45c4d7(0x13f)],undefined,_0x5dad82[_0x45c4d7(0x135)],_0x5dad82[_0x45c4d7(0x143)]),_0x56d19d=new Map(_0x5c6229[_0x45c4d7(0x14c)](_0x10958f=>[_0x10958f[_0x45c4d7(0x14f)],_0x10958f['alias']])),[_0x5c503b,_0x527422]=await Promise['all']([listBffScripts(_0x430454[_0x45c4d7(0x13a)]),getBffScriptStatistics(_0x430454[_0x45c4d7(0x13a)])]),_0x1351af=createHookLocationMap(_0x527422),_0xaa8d1d=new Set(_0x4ca16e['map'](_0x5e09e3=>_0x5e09e3[_0x45c4d7(0x136)]));for(const _0x53c3c4 of _0x5c503b){const _0x89bb6a=resolveRemoteScriptTarget(_0x3dec2a,_0x53c3c4,_0x1351af,_0x2c4f38[_0x45c4d7(0x14b)],_0x56d19d);_0x89bb6a&&!_0xaa8d1d[_0x45c4d7(0x151)](_0x89bb6a['lockKey'])&&_0x207b79['push'](_0x89bb6a[_0x45c4d7(0x136)]);}}const _0x4d2ab5=_0x160ea3[_0x45c4d7(0x153)]===0x0&&_0x5e7509[_0x45c4d7(0x153)]===0x0&&_0x207b79[_0x45c4d7(0x153)]===0x0;return{'ok':!![],'data':{'added':_0x160ea3,'modified':_0x5e7509,'unchanged':_0x9acac5,'remoteOnly':_0x207b79},'message':_0x4d2ab5?_0x45c4d7(0x147):_0x160ea3[_0x45c4d7(0x153)]+_0x45c4d7(0x149)+_0x5e7509[_0x45c4d7(0x153)]+_0x45c4d7(0x14e)+_0x9acac5[_0x45c4d7(0x153)]+_0x45c4d7(0x138)+(_0x207b79['length']>0x0?',\x20'+_0x207b79[_0x45c4d7(0x153)]+_0x45c4d7(0x145):'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a46_0xe775(){const _0x2d9114=['744atfqTl','installedPath','Built-in\x20Skill\x20install\x20failed\x20[','5758yTRTmy','cli-skill-install','CLI\x20Built-in\x20Skill\x20','apiError','946218ZnWqVW','304OIBuuc','skillVersion','\x20is\x20already\x20current','42CZXpvB','error','repairCommand','changed','1757oCpIdE','6220YihRpK','info','\x20at\x20','69600pjTFSC','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.',']:\x20','4311sLkLEU','47861NZzOuk','inherit','50QvfDkh','43100CIDQFe','unknown','read','log','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill'];a46_0xe775=function(){return _0x2d9114;};return a46_0xe775();}function a46_0x1063(_0x4ee769,_0x4f369e){_0x4ee769=_0x4ee769-0x193;const _0xe7756e=a46_0xe775();let _0x106315=_0xe7756e[_0x4ee769];return _0x106315;}const a46_0x1973d6=a46_0x1063;(function(_0x219375,_0x2353b0){const _0x3e6794=a46_0x1063,_0x3a2098=_0x219375();while(!![]){try{const _0x2b68ee=parseInt(_0x3e6794(0x1b2))/0x1*(parseInt(_0x3e6794(0x19a))/0x2)+parseInt(_0x3e6794(0x1a2))/0x3+-parseInt(_0x3e6794(0x1aa))/0x4*(parseInt(_0x3e6794(0x1a9))/0x5)+parseInt(_0x3e6794(0x196))/0x6+parseInt(_0x3e6794(0x19e))/0x7*(parseInt(_0x3e6794(0x197))/0x8)+parseInt(_0x3e6794(0x1a6))/0x9*(-parseInt(_0x3e6794(0x19f))/0xa)+parseInt(_0x3e6794(0x1a7))/0xb*(parseInt(_0x3e6794(0x1af))/0xc);if(_0x2b68ee===_0x2353b0)break;else _0x3a2098['push'](_0x3a2098['shift']());}catch(_0x16d6aa){_0x3a2098['push'](_0x3a2098['shift']());}}}(a46_0xe775,0x2ad49));import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':'cli-skill','command':'install','description':a46_0x1973d6(0x1ae),'risk':a46_0x1973d6(0x1ac),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x4427aa){const _0x3ae4e0=a46_0x1973d6;logger['setLogPath'](process['cwd']()),logger[_0x3ae4e0(0x1a0)](_0x3ae4e0(0x193),_0x3ae4e0(0x1a4));const _0x110ef2=installBuiltinSkill({'stdio':_0x4427aa['nonInteractive']?'pipe':_0x3ae4e0(0x1a8)});if(!_0x110ef2['ok'])throw CliErrors[_0x3ae4e0(0x195)](_0x3ae4e0(0x1b1)+_0x110ef2['code']+_0x3ae4e0(0x1a5)+(_0x110ef2[_0x3ae4e0(0x19b)]||_0x3ae4e0(0x1ab)),_0x3ae4e0(0x1a3)+_0x110ef2[_0x3ae4e0(0x19c)]);return console[_0x3ae4e0(0x1ad)](_0x110ef2[_0x3ae4e0(0x19d)]?_0x3ae4e0(0x194)+_0x110ef2[_0x3ae4e0(0x198)]+'\x20installed'+(_0x110ef2[_0x3ae4e0(0x1b0)]?_0x3ae4e0(0x1a1)+_0x110ef2[_0x3ae4e0(0x1b0)]:'\x20via\x20skills@latest'):'CLI\x20Built-in\x20Skill\x20'+_0x110ef2[_0x3ae4e0(0x198)]+_0x3ae4e0(0x199)+(_0x110ef2[_0x3ae4e0(0x1b0)]?_0x3ae4e0(0x1a1)+_0x110ef2[_0x3ae4e0(0x1b0)]:'')),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a47_0x48a90e=a47_0x25e4;(function(_0x4ad3de,_0x579391){const _0x4d3258=a47_0x25e4,_0x1f99f1=_0x4ad3de();while(!![]){try{const _0x5779ea=-parseInt(_0x4d3258(0x1e1))/0x1*(-parseInt(_0x4d3258(0x1d4))/0x2)+parseInt(_0x4d3258(0x215))/0x3*(parseInt(_0x4d3258(0x1ef))/0x4)+-parseInt(_0x4d3258(0x1f0))/0x5*(-parseInt(_0x4d3258(0x218))/0x6)+parseInt(_0x4d3258(0x1e9))/0x7*(parseInt(_0x4d3258(0x1fc))/0x8)+parseInt(_0x4d3258(0x1d7))/0x9*(parseInt(_0x4d3258(0x209))/0xa)+-parseInt(_0x4d3258(0x220))/0xb+-parseInt(_0x4d3258(0x20e))/0xc;if(_0x5779ea===_0x579391)break;else _0x1f99f1['push'](_0x1f99f1['shift']());}catch(_0xec4ccb){_0x1f99f1['push'](_0x1f99f1['shift']());}}}(a47_0x5de0,0xdbabd));function a47_0x25e4(_0x4dd803,_0x467a59){_0x4dd803=_0x4dd803-0x1d3;const _0x5de0c4=a47_0x5de0();let _0x25e4e5=_0x5de0c4[_0x4dd803];return _0x25e4e5;}import a47_0x38aa99 from'chalk';import a47_0x46579e from'ora';import a47_0x2161a9 from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x559de9=a47_0x25e4;return GIT_COMMIT!==_0x559de9(0x221)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x139d6c=a47_0x25e4,_0x496b63=process[_0x139d6c(0x1f7)][_0x139d6c(0x1ff)]();if(_0x496b63[_0x139d6c(0x1df)](_0x139d6c(0x1e4)))return'bun';return'npm';}const updateFlags=[{'name':a47_0x48a90e(0x213),'type':a47_0x48a90e(0x1ea),'description':a47_0x48a90e(0x225),'default':![]},{'name':'version','type':a47_0x48a90e(0x1fb),'description':a47_0x48a90e(0x204)}];function getRequestedVersion(_0x3cfec1){const _0x14f678=a47_0x48a90e;return _0x3cfec1['str'](_0x14f678(0x1d9))[_0x14f678(0x1f5)]();}async function validateUpdateFlags(_0x5a8960){const _0x17cf4b=a47_0x48a90e,_0x4c6089=_0x5a8960[_0x17cf4b(0x1eb)](_0x17cf4b(0x213)),_0x3d2c30=getRequestedVersion(_0x5a8960);if(_0x4c6089&&_0x3d2c30)throw CliErrors[_0x17cf4b(0x1fa)]('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.',_0x17cf4b(0x1d6));if(_0x3d2c30&&!a47_0x2161a9[_0x17cf4b(0x210)](_0x3d2c30))throw CliErrors[_0x17cf4b(0x1fa)](_0x17cf4b(0x1f3)+_0x3d2c30,_0x17cf4b(0x1f6));}async function fetchNpmDistTags(){const _0x12fcd5=a47_0x48a90e;try{const _0x27e4b2=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0x12fcd5(0x1dc)](0x2710)});if(!_0x27e4b2['ok'])return null;const _0x8e7c95=await _0x27e4b2['json']();if(!_0x8e7c95||typeof _0x8e7c95!=='object')return null;return Object[_0x12fcd5(0x1d5)](Object[_0x12fcd5(0x1d3)](_0x8e7c95)['filter'](([,_0x7aec58])=>typeof _0x7aec58===_0x12fcd5(0x1fb)&&_0x7aec58[_0x12fcd5(0x1f5)]()['length']>0x0)[_0x12fcd5(0x222)](([_0x274281,_0x3e7f2b])=>[_0x274281,String(_0x3e7f2b)[_0x12fcd5(0x1f5)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x5169a8){const _0x45dcec=await fetchNpmDistTags();return _0x45dcec?.[_0x5169a8]??null;}async function fetchLatestVersion(){const _0x2a48b0=a47_0x48a90e;return fetchNpmDistTagVersion(_0x2a48b0(0x219));}async function resolveTargetVersion(_0x1a9198){const _0x1dd8e9=a47_0x48a90e,_0xad70f4=getRequestedVersion(_0x1a9198);if(_0xad70f4)return{'version':_0xad70f4,'source':_0x1dd8e9(0x1d9)};if(_0x1a9198['bool']('beta')){const _0x5378bb=await fetchNpmDistTagVersion('beta');if(!_0x5378bb)return null;return{'version':_0x5378bb,'source':_0x1dd8e9(0x213)};}const _0x287bd0=await fetchLatestVersion();if(!_0x287bd0)return null;return{'version':_0x287bd0,'source':_0x1dd8e9(0x219)};}function a47_0x5de0(){const _0x2bb521=['fromEntries','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','316656jFmAfe','code','version','\x20→\x20','error','timeout','@latest','\x20install\x20-g\x20','includes','Checking\x20CLI\x20Built-in\x20Skill...','1723421QNFvgN','npm','Current\x20version:\x20','bun','\x20doctor','current','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','start','8213107TXNDdi','boolean','bool','fail','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','install','9368AfzILW','5VRbaIw',']:\x20',',\x20then\x20verify\x20with:\x20','Invalid\x20version:\x20','log','trim','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','execPath','\x20is\x20up\x20to\x20date.','repairCommand','validation','string','8MpXQKE','Updating\x20via\x20','red','toLowerCase','read','run','Checking\x20for\x20updates...',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','Install\x20a\x20specific\x20CLI\x20version','Update\x20available:\x20','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','\x20\x20Try\x20manually:\x20','Update\x20failed','100CoyhDA','Requested\x20version:\x20','message','info','state','36632916zyXsVo','skillVersion','valid','gray','green','beta','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','1122HtETLv',',\x20state\x20','Beta\x20version:\x20','163806cxNusT','latest','\x20\x20CLI\x20Built-in\x20Skill\x20','Already\x20on\x20requested\x20version\x20(v','Version\x20comparison\x20failed','Current\x20version\x20v','yellow','source','2191805VGiQuk','unknown','map','Updated\x20to\x20v','\x20is\x20newer\x20than\x20npm\x20latest\x20v','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','expected\x20','succeed','apiError','entries','2lDobSv'];a47_0x5de0=function(){return _0x2bb521;};return a47_0x5de0();}function shouldInstallTarget(_0x3d6fdf,_0x5906dd){const _0xc512de=a47_0x48a90e;if(_0x5906dd[_0xc512de(0x21f)]==='version'||_0x5906dd[_0xc512de(0x21f)]===_0xc512de(0x213))return!a47_0x2161a9['eq'](_0x3d6fdf,_0x5906dd[_0xc512de(0x1d9)]);return a47_0x2161a9['lt'](_0x3d6fdf,_0x5906dd[_0xc512de(0x1d9)]);}function getInstallPlanLabel(_0x1f059a,_0x1b1b7b){const _0x3bcf69=a47_0x48a90e;switch(_0x1b1b7b['source']){case _0x3bcf69(0x213):return _0x3bcf69(0x217)+a47_0x38aa99[_0x3bcf69(0x21e)](_0x1f059a)+_0x3bcf69(0x1da)+a47_0x38aa99[_0x3bcf69(0x212)](_0x1b1b7b[_0x3bcf69(0x1d9)]);case _0x3bcf69(0x1d9):return _0x3bcf69(0x20a)+a47_0x38aa99[_0x3bcf69(0x21e)](_0x1f059a)+_0x3bcf69(0x1da)+a47_0x38aa99[_0x3bcf69(0x212)](_0x1b1b7b[_0x3bcf69(0x1d9)]);case _0x3bcf69(0x219):default:return _0x3bcf69(0x205)+a47_0x38aa99[_0x3bcf69(0x21e)](_0x1f059a)+_0x3bcf69(0x1da)+a47_0x38aa99['green'](_0x1b1b7b['version']);}}function repairCurrentBuiltinSkill(){const _0x4073f4=a47_0x48a90e;console['log'](a47_0x38aa99[_0x4073f4(0x211)](_0x4073f4(0x1e0)));const _0x37bf46=installBuiltinSkill();if(_0x37bf46['ok']){console[_0x4073f4(0x1f4)](a47_0x38aa99['gray'](_0x4073f4(0x21a)+_0x37bf46[_0x4073f4(0x20f)]+'\x20is\x20up\x20to\x20date.'));return;}throw CliErrors[_0x4073f4(0x228)](_0x4073f4(0x206)+_0x37bf46[_0x4073f4(0x1d8)]+_0x4073f4(0x1f1)+(_0x37bf46['error']||_0x4073f4(0x221)),'Run:\x20'+_0x37bf46[_0x4073f4(0x1f9)]+',\x20then\x20verify\x20with:\x20'+CLI_BIN_NAME+_0x4073f4(0x1e5));}function verifyUpdatedBuiltinSkill(_0x4723c0){const _0x436189=a47_0x48a90e,_0x1bddb8=inspectInstalledBuiltinSkillVersion(_0x4723c0);if(_0x1bddb8[_0x436189(0x20d)]===_0x436189(0x1e6)){console[_0x436189(0x1f4)](a47_0x38aa99[_0x436189(0x211)](_0x436189(0x21a)+_0x4723c0+_0x436189(0x1f8)));return;}const _0x2f6093=_0x1bddb8[_0x436189(0x20f)]?_0x436189(0x226)+_0x4723c0+',\x20found\x20'+_0x1bddb8[_0x436189(0x20f)]:_0x436189(0x226)+_0x4723c0+_0x436189(0x216)+_0x1bddb8['state'];throw CliErrors[_0x436189(0x228)]('CLI\x20updated\x20to\x20v'+_0x4723c0+_0x436189(0x203)+_0x2f6093,'Run:\x20'+_0x1bddb8[_0x436189(0x1f9)]+_0x436189(0x1f2)+CLI_BIN_NAME+'\x20doctor');}async function execute(_0x15dbfb){const _0x40a63b=a47_0x48a90e;await validateUpdateFlags(_0x15dbfb);const _0x4e099c=getCurrentVersion();console[_0x40a63b(0x1f4)](_0x40a63b(0x1e3)+_0x4e099c);const _0x37b317=a47_0x46579e(_0x40a63b(0x202))[_0x40a63b(0x1e8)](),_0x2858ba=await resolveTargetVersion(_0x15dbfb);if(!_0x2858ba){const _0xbd3d40=_0x15dbfb[_0x40a63b(0x1eb)](_0x40a63b(0x213))?_0x40a63b(0x1ed):_0x40a63b(0x1e7);return _0x37b317[_0x40a63b(0x1ec)](_0xbd3d40),console[_0x40a63b(0x1f4)](a47_0x38aa99[_0x40a63b(0x211)](_0x40a63b(0x214)+NPM_PACKAGE_NAME+_0x40a63b(0x1dd))),{'ok':![],'message':_0xbd3d40};}const _0x3f05ca=a47_0x2161a9['valid'](VERSION),_0x399b59=a47_0x2161a9[_0x40a63b(0x210)](_0x2858ba[_0x40a63b(0x1d9)]);if(!_0x3f05ca||!_0x399b59)return _0x37b317[_0x40a63b(0x1ec)]('Version\x20comparison\x20failed'),{'ok':![],'message':_0x40a63b(0x21c)};if(!shouldInstallTarget(_0x3f05ca,_0x2858ba)){const _0x509a8c=_0x2858ba[_0x40a63b(0x21f)]===_0x40a63b(0x1d9)?_0x40a63b(0x21b)+_0x2858ba[_0x40a63b(0x1d9)]+')':a47_0x2161a9['gt'](_0x3f05ca,_0x399b59)?_0x40a63b(0x21d)+_0x4e099c+_0x40a63b(0x224)+_0x2858ba[_0x40a63b(0x1d9)]:'Already\x20up\x20to\x20date\x20(v'+_0x2858ba[_0x40a63b(0x1d9)]+')';return _0x37b317[_0x40a63b(0x227)](_0x509a8c),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x37b317[_0x40a63b(0x20c)](getInstallPlanLabel(_0x4e099c,_0x2858ba));const _0x27a975=detectPackageManager(),_0x13a721=_0x27a975===_0x40a63b(0x1e2)?resolveNpmBin('npm'):_0x27a975,_0x40e02e=a47_0x46579e(_0x40a63b(0x1fd)+_0x27a975+'...')['start']();try{await execa(_0x13a721,[_0x40a63b(0x1ee),'-g',NPM_PACKAGE_NAME+'@'+_0x2858ba[_0x40a63b(0x1d9)]],{'stdio':'pipe'}),_0x40e02e[_0x40a63b(0x227)](_0x40a63b(0x223)+_0x2858ba[_0x40a63b(0x1d9)]),console[_0x40a63b(0x1f4)](a47_0x38aa99[_0x40a63b(0x211)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.'));}catch(_0x15663c){return _0x40e02e[_0x40a63b(0x1ec)](_0x40a63b(0x208)),console[_0x40a63b(0x1db)](a47_0x38aa99[_0x40a63b(0x1fe)]('\x20\x20'+_0x15663c[_0x40a63b(0x20b)])),console[_0x40a63b(0x1f4)](a47_0x38aa99[_0x40a63b(0x211)](_0x40a63b(0x207)+_0x27a975+_0x40a63b(0x1de)+NPM_PACKAGE_NAME+'@'+_0x2858ba[_0x40a63b(0x1d9)])),{'ok':![],'message':_0x15663c[_0x40a63b(0x20b)]};}return verifyUpdatedBuiltinSkill(_0x2858ba[_0x40a63b(0x1d9)]),{'ok':!![]};}export const updateDefinition={'service':'update','command':a47_0x48a90e(0x201),'description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':a47_0x48a90e(0x200),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a47_0x307640=a47_0x3b96;(function(_0x45979a,_0x24e92e){const _0x4e6719=a47_0x3b96,_0x50ae51=_0x45979a();while(!![]){try{const _0x5e164f=-parseInt(_0x4e6719(0x11a))/0x1+parseInt(_0x4e6719(0x116))/0x2+parseInt(_0x4e6719(0x119))/0x3*(-parseInt(_0x4e6719(0x123))/0x4)+parseInt(_0x4e6719(0x117))/0x5*(-parseInt(_0x4e6719(0x108))/0x6)+parseInt(_0x4e6719(0x112))/0x7*(-parseInt(_0x4e6719(0xfd))/0x8)+parseInt(_0x4e6719(0x139))/0x9*(-parseInt(_0x4e6719(0x10a))/0xa)+-parseInt(_0x4e6719(0x12f))/0xb*(-parseInt(_0x4e6719(0x113))/0xc);if(_0x5e164f===_0x24e92e)break;else _0x50ae51['push'](_0x50ae51['shift']());}catch(_0x10b4bd){_0x50ae51['push'](_0x50ae51['shift']());}}}(a47_0x49a9,0x7b485));import a47_0x11c762 from'chalk';import a47_0x4fb3f1 from'ora';import a47_0x31f3f0 from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';function a47_0x3b96(_0x4e4bd9,_0x33d229){_0x4e4bd9=_0x4e4bd9-0xef;const _0x49a927=a47_0x49a9();let _0x3b9698=_0x49a927[_0x4e4bd9];return _0x3b9698;}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 _0x2a132c=a47_0x3b96;return GIT_COMMIT!==_0x2a132c(0x148)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x2a132c(0xfb)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x5bd2c0=a47_0x3b96,_0x139f1d=process['execPath'][_0x5bd2c0(0x104)]();if(_0x139f1d['includes'](_0x5bd2c0(0x127)))return _0x5bd2c0(0x127);return'npm';}const updateFlags=[{'name':'beta','type':a47_0x307640(0x122),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':'version','type':a47_0x307640(0x11c),'description':a47_0x307640(0x10f)}];function getRequestedVersion(_0x5e7fce){const _0x37d1cf=a47_0x307640;return _0x5e7fce[_0x37d1cf(0x130)]('version')[_0x37d1cf(0xfc)]();}function a47_0x49a9(){const _0x1a7f75=['Requested\x20version:\x20','Updating\x20via\x20','\x20doctor','timeout','\x20is\x20newer\x20than\x20npm\x20latest\x20v','CLI\x20updated\x20to\x20v','json',']:\x20','update','Try\x20manually:\x20npm\x20install\x20-g\x20',',\x20then\x20verify\x20with:\x20','unknown','code','green','expected\x20','succeed','object','...','Update\x20available:\x20','Try\x20manually:\x20','version','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','\x20\x20CLI\x20Built-in\x20Skill\x20','filter','\x20install\x20-g\x20','slice','trim','664mdvElr','Already\x20up\x20to\x20date\x20(v','Version\x20comparison\x20failed','Run:\x20','length','Check\x20the\x20CLI\x20and\x20npm\x20versions,\x20then\x20retry:\x20','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','toLowerCase','gray','Update\x20failed','npm','744pPxrHe','beta','10GSQlnV','read','Already\x20on\x20requested\x20version\x20(v','validation','\x20is\x20up\x20to\x20date.','Install\x20a\x20specific\x20CLI\x20version','pipe','fail','13111jtNXro','3943860evzxbQ','Checking\x20for\x20updates...','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','1347990FoBKcM','39845ELUesX','log','5091MKQOEE','953487UJMQZY',',\x20state\x20','string','Checking\x20CLI\x20Built-in\x20Skill...','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','repairCommand','run','current','boolean','1420qUvswl','apiError','map','Beta\x20version:\x20','bun','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','latest','entries','/dist-tags','Current\x20version\x20v','valid','message','88GadKlK','str',',\x20found\x20','install','yellow','skillVersion','source','\x20→\x20','bool','Update\x20failed:\x20','888597jfnsUU','state','https://registry.npmjs.org/-/package/','\x20update\x20--version\x20<version>'];a47_0x49a9=function(){return _0x1a7f75;};return a47_0x49a9();}async function validateUpdateFlags(_0x9746d7){const _0x4e769c=a47_0x307640,_0x1daa76=_0x9746d7[_0x4e769c(0x137)](_0x4e769c(0x109)),_0x225dbb=getRequestedVersion(_0x9746d7);if(_0x1daa76&&_0x225dbb)throw CliErrors[_0x4e769c(0x10d)](_0x4e769c(0xf7),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x225dbb&&!a47_0x31f3f0['valid'](_0x225dbb))throw CliErrors[_0x4e769c(0x10d)]('Invalid\x20version:\x20'+_0x225dbb,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x2532c0=a47_0x307640;try{const _0x502774=await fetch(_0x2532c0(0x13b)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x2532c0(0x12b),{'signal':AbortSignal[_0x2532c0(0x140)](0x2710)});if(!_0x502774['ok'])return null;const _0x38875b=await _0x502774[_0x2532c0(0x143)]();if(!_0x38875b||typeof _0x38875b!==_0x2532c0(0xf2))return null;return Object['fromEntries'](Object[_0x2532c0(0x12a)](_0x38875b)[_0x2532c0(0xf9)](([,_0x458840])=>typeof _0x458840===_0x2532c0(0x11c)&&_0x458840[_0x2532c0(0xfc)]()[_0x2532c0(0x101)]>0x0)[_0x2532c0(0x125)](([_0x2615a1,_0x49d268])=>[_0x2615a1,String(_0x49d268)[_0x2532c0(0xfc)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x2ba99b){const _0x387489=await fetchNpmDistTags();return _0x387489?.[_0x2ba99b]??null;}async function fetchLatestVersion(){const _0x843808=a47_0x307640;return fetchNpmDistTagVersion(_0x843808(0x129));}async function resolveTargetVersion(_0x4609cb){const _0x1fe0d1=a47_0x307640,_0x282a18=getRequestedVersion(_0x4609cb);if(_0x282a18)return{'version':_0x282a18,'source':_0x1fe0d1(0xf6)};if(_0x4609cb[_0x1fe0d1(0x137)](_0x1fe0d1(0x109))){const _0x4a7dd1=await fetchNpmDistTagVersion('beta');if(!_0x4a7dd1)return null;return{'version':_0x4a7dd1,'source':_0x1fe0d1(0x109)};}const _0x25d063=await fetchLatestVersion();if(!_0x25d063)return null;return{'version':_0x25d063,'source':_0x1fe0d1(0x129)};}function shouldInstallTarget(_0x4d1299,_0x529281){const _0x3935f6=a47_0x307640;if(_0x529281[_0x3935f6(0x135)]===_0x3935f6(0xf6)||_0x529281[_0x3935f6(0x135)]===_0x3935f6(0x109))return!a47_0x31f3f0['eq'](_0x4d1299,_0x529281['version']);return a47_0x31f3f0['lt'](_0x4d1299,_0x529281['version']);}function getInstallPlanLabel(_0x58133d,_0x9ea296){const _0x5a8df2=a47_0x307640;switch(_0x9ea296[_0x5a8df2(0x135)]){case'beta':return _0x5a8df2(0x126)+a47_0x11c762[_0x5a8df2(0x133)](_0x58133d)+_0x5a8df2(0x136)+a47_0x11c762[_0x5a8df2(0xef)](_0x9ea296[_0x5a8df2(0xf6)]);case'version':return _0x5a8df2(0x13d)+a47_0x11c762[_0x5a8df2(0x133)](_0x58133d)+_0x5a8df2(0x136)+a47_0x11c762['green'](_0x9ea296[_0x5a8df2(0xf6)]);case _0x5a8df2(0x129):default:return _0x5a8df2(0xf4)+a47_0x11c762[_0x5a8df2(0x133)](_0x58133d)+_0x5a8df2(0x136)+a47_0x11c762[_0x5a8df2(0xef)](_0x9ea296[_0x5a8df2(0xf6)]);}}function repairCurrentBuiltinSkill(){const _0x8ec048=a47_0x307640;console[_0x8ec048(0x118)](a47_0x11c762[_0x8ec048(0x105)](_0x8ec048(0x11d)));const _0x30611b=installBuiltinSkill();if(_0x30611b['ok']){console[_0x8ec048(0x118)](a47_0x11c762['gray'](_0x8ec048(0xf8)+_0x30611b['skillVersion']+_0x8ec048(0x10e)));return;}throw CliErrors[_0x8ec048(0x124)](_0x8ec048(0x115)+_0x30611b[_0x8ec048(0x149)]+_0x8ec048(0x144)+(_0x30611b['error']||_0x8ec048(0x148)),'Run:\x20'+_0x30611b[_0x8ec048(0x11f)]+_0x8ec048(0x147)+CLI_BIN_NAME+_0x8ec048(0x13f));}function verifyUpdatedBuiltinSkill(_0x344ab5){const _0x8e073f=a47_0x307640,_0x45e468=inspectInstalledBuiltinSkillVersion(_0x344ab5);if(_0x45e468['state']===_0x8e073f(0x121)){console[_0x8e073f(0x118)](a47_0x11c762['gray'](_0x8e073f(0xf8)+_0x344ab5+_0x8e073f(0x10e)));return;}const _0x1b8b81=_0x45e468[_0x8e073f(0x134)]?_0x8e073f(0xf0)+_0x344ab5+_0x8e073f(0x131)+_0x45e468[_0x8e073f(0x134)]:'expected\x20'+_0x344ab5+_0x8e073f(0x11b)+_0x45e468[_0x8e073f(0x13a)];throw CliErrors[_0x8e073f(0x124)](_0x8e073f(0x142)+_0x344ab5+',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20'+_0x1b8b81,_0x8e073f(0x100)+_0x45e468[_0x8e073f(0x11f)]+',\x20then\x20verify\x20with:\x20'+CLI_BIN_NAME+_0x8e073f(0x13f));}async function execute(_0x3abd58){const _0x54204c=a47_0x307640;await validateUpdateFlags(_0x3abd58);const _0x953d05=getCurrentVersion();console['log']('Current\x20version:\x20'+_0x953d05);const _0x407153=a47_0x4fb3f1(_0x54204c(0x114))['start'](),_0x222d02=await resolveTargetVersion(_0x3abd58);if(!_0x222d02){const _0x6aea8f=_0x3abd58[_0x54204c(0x137)](_0x54204c(0x109))?_0x54204c(0x11e):_0x54204c(0x103);_0x407153[_0x54204c(0x111)](_0x6aea8f);throw CliErrors['apiError'](_0x6aea8f,_0x54204c(0x146)+NPM_PACKAGE_NAME+'@'+(_0x3abd58[_0x54204c(0x137)](_0x54204c(0x109))?_0x54204c(0x109):_0x54204c(0x129)));}const _0x4d586a=a47_0x31f3f0[_0x54204c(0x12d)](VERSION),_0x3e5ded=a47_0x31f3f0[_0x54204c(0x12d)](_0x222d02['version']);if(!_0x4d586a||!_0x3e5ded){_0x407153[_0x54204c(0x111)]('Version\x20comparison\x20failed');throw CliErrors[_0x54204c(0x124)](_0x54204c(0xff),_0x54204c(0x102)+CLI_BIN_NAME+_0x54204c(0x13c));}if(!shouldInstallTarget(_0x4d586a,_0x222d02)){const _0x5c79b9=_0x222d02['source']===_0x54204c(0xf6)?_0x54204c(0x10c)+_0x222d02[_0x54204c(0xf6)]+')':a47_0x31f3f0['gt'](_0x4d586a,_0x3e5ded)?_0x54204c(0x12c)+_0x953d05+_0x54204c(0x141)+_0x222d02[_0x54204c(0xf6)]:_0x54204c(0xfe)+_0x222d02[_0x54204c(0xf6)]+')';return _0x407153[_0x54204c(0xf1)](_0x5c79b9),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x407153['info'](getInstallPlanLabel(_0x953d05,_0x222d02));const _0x271f7a=detectPackageManager(),_0x40cfa8=_0x271f7a===_0x54204c(0x107)?resolveNpmBin(_0x54204c(0x107)):_0x271f7a,_0x5c5891=a47_0x4fb3f1(_0x54204c(0x13e)+_0x271f7a+_0x54204c(0xf3))['start']();try{await execa(_0x40cfa8,[_0x54204c(0x132),'-g',NPM_PACKAGE_NAME+'@'+_0x222d02[_0x54204c(0xf6)]],{'stdio':_0x54204c(0x110)}),_0x5c5891['succeed']('Updated\x20to\x20v'+_0x222d02[_0x54204c(0xf6)]),console['log'](a47_0x11c762['gray']('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.'));}catch(_0x4a7d70){_0x5c5891['fail'](_0x54204c(0x106));throw CliErrors[_0x54204c(0x124)](_0x54204c(0x138)+(_0x4a7d70 instanceof Error?_0x4a7d70[_0x54204c(0x12e)]:String(_0x4a7d70)),_0x54204c(0xf5)+_0x271f7a+_0x54204c(0xfa)+NPM_PACKAGE_NAME+'@'+_0x222d02[_0x54204c(0xf6)]);}return verifyUpdatedBuiltinSkill(_0x222d02['version']),{'ok':!![]};}export const updateDefinition={'service':a47_0x307640(0x145),'command':a47_0x307640(0x120),'description':a47_0x307640(0x128),'risk':a47_0x307640(0x10b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x279e81,_0xd7890f){const _0x1d6312=a48_0x3dec,_0x4cf906=_0x279e81();while(!![]){try{const _0x22b10a=-parseInt(_0x1d6312(0x1a1))/0x1+parseInt(_0x1d6312(0x19f))/0x2*(-parseInt(_0x1d6312(0x1a3))/0x3)+-parseInt(_0x1d6312(0x19c))/0x4*(parseInt(_0x1d6312(0x1a0))/0x5)+-parseInt(_0x1d6312(0x1a2))/0x6+parseInt(_0x1d6312(0x19e))/0x7+-parseInt(_0x1d6312(0x1a5))/0x8+-parseInt(_0x1d6312(0x19d))/0x9*(-parseInt(_0x1d6312(0x1a4))/0xa);if(_0x22b10a===_0xd7890f)break;else _0x4cf906['push'](_0x4cf906['shift']());}catch(_0x542e9e){_0x4cf906['push'](_0x4cf906['shift']());}}}(a48_0x1207,0xc96c1));import{codegenSdk}from'../../commands/codegen/sdk.js';function a48_0x3dec(_0x505e3f,_0x1571eb){_0x505e3f=_0x505e3f-0x19c;const _0x120780=a48_0x1207();let _0x3decca=_0x120780[_0x505e3f];return _0x3decca;}import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];function a48_0x1207(){const _0x4d8cde=['3jFjVhk','20yNyFXf','12196440XpXUuA','9184jJQzzK','17356203sQOOXD','9421251clgZkf','2565962mfRbGA','1195GvRSOJ','879632LXbOvM','851340HhobJa'];a48_0x1207=function(){return _0x4d8cde;};return a48_0x1207();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a49_0x29029a=a49_0xeab1;(function(_0x27f4b0,_0x4409c0){const _0x5784c7=a49_0xeab1,_0x15b496=_0x27f4b0();while(!![]){try{const _0x4eba4c=-parseInt(_0x5784c7(0xad))/0x1*(-parseInt(_0x5784c7(0xae))/0x2)+parseInt(_0x5784c7(0xa0))/0x3+parseInt(_0x5784c7(0xa8))/0x4+parseInt(_0x5784c7(0xab))/0x5+-parseInt(_0x5784c7(0x9c))/0x6*(parseInt(_0x5784c7(0xa4))/0x7)+-parseInt(_0x5784c7(0xaa))/0x8+-parseInt(_0x5784c7(0xa7))/0x9*(-parseInt(_0x5784c7(0xaf))/0xa);if(_0x4eba4c===_0x4409c0)break;else _0x15b496['push'](_0x15b496['shift']());}catch(_0x21a00b){_0x15b496['push'](_0x15b496['shift']());}}}(a49_0x17fc,0x42f15));function a49_0xeab1(_0x59db41,_0x46de41){_0x59db41=_0x59db41-0x9b;const _0x17fccd=a49_0x17fc();let _0xeab195=_0x17fccd[_0x59db41];return _0xeab195;}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a49_0x29029a(0x9b),'command':a49_0x29029a(0xb0),'description':'Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','risk':a49_0x29029a(0x9e),'flags':[CODE_FLAG_OPTIONAL,{'name':a49_0x29029a(0x9f),'type':'string','description':a49_0x29029a(0xb1)},{'name':a49_0x29029a(0xb2),'type':a49_0x29029a(0xa2),'required':!![],'description':a49_0x29029a(0xa5)},{'name':a49_0x29029a(0xa9),'type':a49_0x29029a(0xac),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x447165){const _0x32c13d=a49_0x29029a,{dataset:_0x5437ac,operation:_0x1aef10}=await getOperationDetail(_0x447165[_0x32c13d(0xa1)],_0x447165['str']('code'),_0x447165[_0x32c13d(0xb3)](_0x32c13d(0xb2))),_0x5aa28c=generateSdkCode(_0x5437ac,_0x1aef10,{'includeImports':!_0x447165[_0x32c13d(0xa3)](_0x32c13d(0xa9))});return{'ok':!![],'data':{'dataset':{'name':_0x5437ac['name'],'code':_0x5437ac[_0x32c13d(0xa6)],'tableName':_0x5437ac[_0x32c13d(0x9d)]},'operation':_0x447165[_0x32c13d(0xb3)]('operation'),'code':_0x5aa28c}};}};function a49_0x17fc(){const _0x2dc7d5=['alias','95871jetavR','appCode','string','bool','2251053MShezZ','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','code','2116278HQaYiu','176772VvQPGo','skip-imports','1483552nFUMpo','2131495OlKyPm','boolean','1GtapIs','87258tipCBc','10VEDFoT','sdk','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','operation','str','codegen','6cwprej','tableName','read'];a49_0x17fc=function(){return _0x2dc7d5;};return a49_0x17fc();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a50_0x5a95e6=a50_0x102f;(function(_0x4a18d4,_0x9fad57){const _0xaf74bc=a50_0x102f,_0x4b30df=_0x4a18d4();while(!![]){try{const _0x594ec7=parseInt(_0xaf74bc(0x7e))/0x1*(-parseInt(_0xaf74bc(0x74))/0x2)+parseInt(_0xaf74bc(0x6f))/0x3*(parseInt(_0xaf74bc(0x78))/0x4)+parseInt(_0xaf74bc(0x7d))/0x5+-parseInt(_0xaf74bc(0x6b))/0x6*(-parseInt(_0xaf74bc(0x72))/0x7)+parseInt(_0xaf74bc(0x7b))/0x8+parseInt(_0xaf74bc(0x6a))/0x9+-parseInt(_0xaf74bc(0x6d))/0xa*(parseInt(_0xaf74bc(0x6e))/0xb);if(_0x594ec7===_0x9fad57)break;else _0x4b30df['push'](_0x4b30df['shift']());}catch(_0x1cbbba){_0x4b30df['push'](_0x4b30df['shift']());}}}(a50_0xb68d,0x356b8));function a50_0x102f(_0x130cd9,_0x5ac7c3){_0x130cd9=_0x130cd9-0x69;const _0xb68d5f=a50_0xb68d();let _0x102fda=_0xb68d5f[_0x130cd9];return _0x102fda;}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a50_0x5a95e6(0x7f),'command':a50_0x5a95e6(0x79),'description':'Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','risk':'read','flags':[SQLCODE_FLAG,{'name':'target','type':'string','description':a50_0x5a95e6(0x73),'default':a50_0x5a95e6(0x70),'enum':['sdk',a50_0x5a95e6(0x71)]},{'name':a50_0x5a95e6(0x7a),'type':a50_0x5a95e6(0x69),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x1e1bd0){const _0x2d9ccb=a50_0x5a95e6,_0x567b05=await getSqlQueryInfo(_0x1e1bd0[_0x2d9ccb(0x77)],_0x1e1bd0[_0x2d9ccb(0x7c)]('sqlcode')),_0xc9b7bd=_0x1e1bd0[_0x2d9ccb(0x7c)](_0x2d9ccb(0x6c))||_0x2d9ccb(0x70),_0x38f8a3=generateSqlCodeTemplate(_0x567b05,{'target':_0xc9b7bd,'includeImports':!_0x1e1bd0[_0x2d9ccb(0x75)](_0x2d9ccb(0x7a))});return{'ok':!![],'data':{'sqlCode':_0x567b05['sqlCode'],'sqlName':_0x567b05[_0x2d9ccb(0x76)],'target':_0xc9b7bd,'code':_0x38f8a3}};}};function a50_0xb68d(){const _0x6292ee=['bff','3563LTJqKX','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','10PWyMmP','bool','sqlName','appCode','3472pgJkcg','sql','no-imports','293176gUNrrc','str','2076550qEXayI','24133XAmwBa','codegen','boolean','2528586Lgnphg','3174KJJRCl','target','4570VBHpDK','16181FwHVYC','33ykQBHq','sdk'];a50_0xb68d=function(){return _0x6292ee;};return a50_0xb68d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x54c279,_0x106fef){const _0x21a8cf=a51_0x3dd2,_0xacffcb=_0x54c279();while(!![]){try{const _0x349ca9=-parseInt(_0x21a8cf(0x19f))/0x1*(parseInt(_0x21a8cf(0x1bd))/0x2)+-parseInt(_0x21a8cf(0x1ae))/0x3+-parseInt(_0x21a8cf(0x1af))/0x4+-parseInt(_0x21a8cf(0x1c2))/0x5*(-parseInt(_0x21a8cf(0x1aa))/0x6)+-parseInt(_0x21a8cf(0x19d))/0x7+parseInt(_0x21a8cf(0x1ab))/0x8*(parseInt(_0x21a8cf(0x1b0))/0x9)+parseInt(_0x21a8cf(0x1bb))/0xa*(parseInt(_0x21a8cf(0x1a3))/0xb);if(_0x349ca9===_0x106fef)break;else _0xacffcb['push'](_0xacffcb['shift']());}catch(_0x4af94f){_0xacffcb['push'](_0xacffcb['shift']());}}}(a51_0x125f,0xf36fe));function a51_0x3dd2(_0xe68930,_0x330253){_0xe68930=_0xe68930-0x196;const _0x125f4d=a51_0x125f();let _0x3dd216=_0x125f4d[_0xe68930];return _0x3dd216;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs,normalizeStoredDefaultApp}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x3a111d=a51_0x3dd2;return[{'name':'appcode','type':_0x3a111d(0x1b9),'description':_0x3a111d(0x1a0),'required':!![]},{'name':'global','type':_0x3a111d(0x199),'description':_0x3a111d(0x1a6),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x4faed7=a51_0x3dd2;return[{'name':_0x4faed7(0x1c1),'type':_0x4faed7(0x199),'description':_0x4faed7(0x1a6),'default':![]}];}export async function validateAppName(_0x337033,_0x41e0f0){const _0x4e1b4c=a51_0x3dd2,_0x1a103d=_0x337033[_0x4e1b4c(0x1c0)][0x0]?.[_0x4e1b4c(0x19c)]();if(!_0x1a103d)throw CliErrors[_0x4e1b4c(0x1b6)](_0x4e1b4c(0x1a2),_0x4e1b4c(0x1c3)+CLI_BIN_NAME+'\x20'+_0x41e0f0+_0x4e1b4c(0x198));}export async function runAppAdd(_0x3385d6,_0x3d8a6c){const _0x252a08=a51_0x3dd2,_0xb08abf=_0x3385d6['args'][0x0]?.[_0x252a08(0x19c)]();if(!_0xb08abf)throw CliErrors[_0x252a08(0x1b6)](_0x252a08(0x1a2),_0x252a08(0x1c3)+CLI_BIN_NAME+'\x20'+_0x3d8a6c+'\x20<name>\x20--appcode\x20<code>');const _0x2976d0=_0x3385d6[_0x252a08(0x19b)](_0x252a08(0x1ac));if(!_0x2976d0)throw CliErrors[_0x252a08(0x1b1)](_0x252a08(0x1ac),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x3d8a6c+_0x252a08(0x1a8));const _0x3715ec={'global':_0x3385d6[_0x252a08(0x19a)](_0x252a08(0x1c1))},_0x5d834e=readConfig(_0x3715ec);if(!_0x5d834e['apps'])_0x5d834e['apps']={};const _0x43380d={'appcode':_0x2976d0,...collectAppProfileOverrides(_0x1b7723=>_0x3385d6[_0x252a08(0x19b)](_0x1b7723))},_0x5f54e4=_0x5d834e[_0x252a08(0x1ad)],_0x599aed=Object[_0x252a08(0x197)](_0x5f54e4),_0x5c0833=typeof _0x5d834e[_0x252a08(0x1bc)]===_0x252a08(0x1b9)&&_0x5f54e4[_0x5d834e['defaultApp']]?_0x5d834e[_0x252a08(0x1bc)]:_0x599aed[_0x252a08(0x1a5)]===0x1?_0x599aed[0x0]:undefined,_0x4f9472=!!_0x5f54e4[_0xb08abf];_0x5f54e4[_0xb08abf]=_0x43380d;const _0x27b5fb=normalizeStoredDefaultApp(_0x5d834e,_0x5c0833);writeConfig(_0x5d834e,_0x3715ec);const _0x485e33=!_0x4f9472&&_0x27b5fb?_0x252a08(0x1b7)+_0x27b5fb+'\x22.':'',_0x391fb9=(_0x4f9472?'Updated':'Added')+_0x252a08(0x1b3)+_0xb08abf+_0x252a08(0x1a1)+_0x2976d0+')'+scopeLabel(_0x3715ec)+'.'+_0x485e33;return{'ok':!![],'message':_0x391fb9};}export async function runAppRemove(_0x1bf964,_0x4dbb26){const _0x2a0751=a51_0x3dd2,_0x1817f8=_0x1bf964[_0x2a0751(0x1c0)][0x0]?.[_0x2a0751(0x19c)]();if(!_0x1817f8)throw CliErrors['validation'](_0x2a0751(0x1a2),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x4dbb26+_0x2a0751(0x1b2));const _0x191ad0=_0x1bf964[_0x2a0751(0x19a)](_0x2a0751(0x1c1)),{config:_0x1d4b37,layers:_0x32076d}=readRawConfigWithLayers(),_0x2e8688=_0x1d4b37[_0x2a0751(0x1ad)]??{};if(!_0x2e8688[_0x1817f8])throw CliErrors['validation']('App\x20\x22'+_0x1817f8+_0x2a0751(0x1a9));const _0x23ae4f=_0x32076d[_0x2a0751(0x19e)][_0x2a0751(0x1ad)]&&typeof _0x32076d[_0x2a0751(0x19e)]['apps']===_0x2a0751(0x1a4)?_0x32076d['globalConfig'][_0x2a0751(0x1ad)]:{},_0x442a18=_0x32076d['projectConfig'][_0x2a0751(0x1ad)]&&typeof _0x32076d['projectConfig'][_0x2a0751(0x1ad)]===_0x2a0751(0x1a4)?_0x32076d[_0x2a0751(0x1b8)][_0x2a0751(0x1ad)]:{},_0x49b8e5=appDefinedIn(_0x1817f8,_0x23ae4f,_0x442a18),_0x921b5a=resolveAppScopeForWrite(_0x1817f8,_0x191ad0,_0x32076d),_0x352be7={'global':_0x921b5a===_0x2a0751(0x1c1)},_0x12ae1a=readConfig(_0x352be7),_0x5c96c9=_0x12ae1a[_0x2a0751(0x1ad)];if(!_0x5c96c9||!_0x5c96c9[_0x1817f8])throw CliErrors[_0x2a0751(0x1b6)]('App\x20\x22'+_0x1817f8+_0x2a0751(0x1a9));delete _0x5c96c9[_0x1817f8];let _0x1e7b10='';const _0x5714b3=typeof _0x12ae1a[_0x2a0751(0x1bc)]===_0x2a0751(0x1b9)?_0x12ae1a[_0x2a0751(0x1bc)]:undefined,_0x3e754c=Object[_0x2a0751(0x197)](_0x5c96c9),_0x49d988=_0x5714b3===_0x1817f8?_0x3e754c[0x0]:_0x5714b3,_0x12b2de=normalizeStoredDefaultApp(_0x12ae1a,_0x49d988);if(_0x5714b3===_0x1817f8&&_0x3e754c[_0x2a0751(0x1a5)]===0x1)_0x1e7b10=_0x2a0751(0x1bf)+_0x3e754c[0x0]+_0x2a0751(0x1be);else _0x5714b3===_0x1817f8&&_0x12b2de&&(_0x1e7b10=_0x2a0751(0x1a7)+_0x12b2de+'\x22.');Object['keys'](_0x5c96c9)['length']===0x0&&(delete _0x12ae1a[_0x2a0751(0x1ad)],delete _0x12ae1a[_0x2a0751(0x1bc)]);writeConfig(_0x12ae1a,_0x352be7);const _0x51eea7=_0x49b8e5===_0x2a0751(0x196)?_0x2a0751(0x1b5)+_0x1817f8+_0x2a0751(0x1b4)+(_0x921b5a==='project'?_0x2a0751(0x1c1):'project')+'\x20config.':'';return{'ok':!![],'message':_0x2a0751(0x1ba)+_0x1817f8+'\x22'+scopeLabel(_0x352be7)+'.'+_0x1e7b10+_0x51eea7};}function a51_0x125f(){const _0x2c9b9b=['3801238AtjeoS','globalConfig','154853ZjiQvy','App\x20code','\x22\x20(appcode:\x20','Missing\x20app\x20name.','1652750YtMaqi','object','length','Use\x20global\x20config\x20scope','\x20Default\x20app\x20changed\x20to\x20\x22','\x20<name>\x20--appcode\x20<code>','\x22\x20not\x20found.','17262RTtVJr','67448FKRXdS','appcode','apps','2573709oaKBGj','1074144nxwdXy','891hlPKRV','flagMissing','\x20<name>\x20[--global]','\x20app\x20\x22','\x22\x20still\x20defined\x20in\x20','\x20Note:\x20app\x20\x22','validation','\x20Default\x20app\x20is\x20\x22','projectConfig','string','Removed\x20app\x20\x22','70ZVVVBW','defaultApp','2mqeGry','\x22\x20is\x20selected\x20automatically.','\x20Remaining\x20app\x20\x22','args','global','1625RTspso','Usage:\x20','both','keys','\x20<name>','boolean','bool','str','trim'];a51_0x125f=function(){return _0x2c9b9b;};return a51_0x125f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5a61d7,_0x14adf4){const _0x3813e1=a52_0x1d1f,_0x5a3c67=_0x5a61d7();while(!![]){try{const _0x10cda8=-parseInt(_0x3813e1(0x97))/0x1*(parseInt(_0x3813e1(0x78))/0x2)+parseInt(_0x3813e1(0x85))/0x3*(-parseInt(_0x3813e1(0x8f))/0x4)+-parseInt(_0x3813e1(0x75))/0x5+parseInt(_0x3813e1(0x82))/0x6+-parseInt(_0x3813e1(0x74))/0x7+parseInt(_0x3813e1(0x76))/0x8+-parseInt(_0x3813e1(0x87))/0x9*(-parseInt(_0x3813e1(0x80))/0xa);if(_0x10cda8===_0x14adf4)break;else _0x5a3c67['push'](_0x5a3c67['shift']());}catch(_0x53db09){_0x5a3c67['push'](_0x5a3c67['shift']());}}}(a52_0x1118,0x290e7));import{input,checkbox,select}from'@inquirer/prompts';import a52_0x1d02d1 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';function a52_0x1d1f(_0x481bf8,_0x10233d){_0x481bf8=_0x481bf8-0x74;const _0x11180f=a52_0x1118();let _0x1d1f44=_0x11180f[_0x481bf8];return _0x1d1f44;}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 _0x37b933=a52_0x1d1f,_0x11e9bc=await input({'message':_0x37b933(0x92),'validate':_0x3b9b67=>{const _0x48a10c=_0x37b933,_0x38e59b=validateAppcode(_0x3b9b67[_0x48a10c(0x90)]());return _0x38e59b['valid']||_0x38e59b[_0x48a10c(0x96)]||'Invalid\x20App\x20Code';}});return _0x11e9bc['trim']();}export async function promptAppSelection(_0x28e5d2){const _0x528e5a=a52_0x1d1f,_0x19c217=[{'name':a52_0x1d02d1[_0x528e5a(0x86)]('✎\x20Enter\x20appcode\x20manually'),'value':-0x1},..._0x28e5d2[_0x528e5a(0x88)]((_0x24f8b0,_0xd6a76d)=>({'name':_0x24f8b0[_0x528e5a(0x8b)]+'\x20\x20'+a52_0x1d02d1['gray']('('+_0x24f8b0[_0x528e5a(0x8e)]+')'),'value':_0xd6a76d}))],_0x5da910=await checkbox({'message':_0x528e5a(0x7e)+a52_0x1d02d1[_0x528e5a(0x94)](_0x28e5d2[_0x528e5a(0x95)])+_0x528e5a(0x7f),'choices':_0x19c217,'loop':![]});if(_0x5da910['includes'](-0x1))return _0x528e5a(0x81);if(_0x5da910[_0x528e5a(0x95)]===0x0)return _0x528e5a(0x81);return _0x5da910[_0x528e5a(0x88)](_0x5ee375=>_0x28e5d2[_0x5ee375]);}export async function promptSingleAppSelection(_0x5d9de4){const _0x4a65bc=a52_0x1d1f,_0x906110=[{'name':a52_0x1d02d1['gray'](_0x4a65bc(0x83)),'value':_0x4a65bc(0x93)},{'name':a52_0x1d02d1[_0x4a65bc(0x86)](_0x4a65bc(0x79)),'value':_0x4a65bc(0x81)},..._0x5d9de4['map'](_0x37b45c=>({'name':_0x37b45c['appName']+'\x20\x20'+a52_0x1d02d1['gray']('('+_0x37b45c[_0x4a65bc(0x8e)]+')'),'value':_0x37b45c['appCode']}))],_0x3e1bb4=await select({'message':_0x4a65bc(0x99),'choices':_0x906110});if(_0x3e1bb4===_0x4a65bc(0x93))return _0x4a65bc(0x93);if(_0x3e1bb4===_0x4a65bc(0x81))return _0x4a65bc(0x81);return _0x5d9de4[_0x4a65bc(0x8c)](_0x3641a6=>_0x3641a6[_0x4a65bc(0x8e)]===_0x3e1bb4);}export async function selectSingleAppcode(_0x193724){const _0x2ce5aa=a52_0x1d1f;if(!_0x193724)return writeCliSideChannelLine(a52_0x1d02d1[_0x2ce5aa(0x7b)](_0x2ce5aa(0x91))),_fallbackOrSkip();writeCliSideChannelLine(_0x2ce5aa(0x77));let _0x12bc50;try{_0x12bc50=await withActiveCookie(_0x193724,()=>listRemoteApps());}catch(_0x1b87e8){writeCliSideChannelLine(a52_0x1d02d1[_0x2ce5aa(0x86)](_0x2ce5aa(0x8a)));if(_0x1b87e8 instanceof Error)writeCliSideChannelLine(a52_0x1d02d1[_0x2ce5aa(0x7b)](_0x2ce5aa(0x8d)+_0x1b87e8[_0x2ce5aa(0x96)]+')'));return _fallbackOrSkip();}if(_0x12bc50['length']===0x0)return writeCliSideChannelLine(a52_0x1d02d1['yellow'](_0x2ce5aa(0x7d))),_fallbackOrSkip();const _0x2a4c36=await promptSingleAppSelection(_0x12bc50);if(_0x2a4c36==='skip')return'';if(_0x2a4c36===_0x2ce5aa(0x81))return promptCustomAppcode();return _0x2a4c36[_0x2ce5aa(0x8e)];}function a52_0x1118(){const _0x227cab=['113GCXCPE','✎\x20Enter\x20manually','Select\x20the\x20app\x20to\x20bind:','367507GPDGyC','145540WKavvM','121864aUxxxi','Fetching\x20available\x20apps...','4196EIpPAo','✎\x20Enter\x20appcode\x20manually','\x0aCould\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','gray','(Skip;\x20configure\x20later)','No\x20available\x20apps\x20found.','Found\x20','\x20apps.\x20Select\x20with\x20space,\x20a=all,\x20i=invert:','1450HEBKLI','custom','1179894XqIWgr','(Skip;\x20configure\x20later\x20with\x20config\x20set\x20appcode)','manual','811131Yjonub','yellow','33849gvXxTm','map','\x0aNo\x20available\x20apps\x20found.','Could\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','appName','find','\x20\x20(','appCode','4YWRjZx','trim','(No\x20login\x20session.\x20Enter\x20an\x20App\x20Code\x20manually\x20or\x20skip.)','App\x20Code:','skip','cyan','length','message'];a52_0x1118=function(){return _0x227cab;};return a52_0x1118();}export async function selectMultipleApps(_0x50a46e){const _0x3d401e=a52_0x1d1f;writeCliSideChannelLine(_0x3d401e(0x77));let _0x4c9ef7;try{_0x4c9ef7=await withActiveCookie(_0x50a46e,()=>listRemoteApps());}catch(_0x265326){writeCliSideChannelLine(_0x3d401e(0x7a));if(_0x265326 instanceof Error)writeCliSideChannelLine(_0x3d401e(0x8d)+_0x265326['message']+')');return'custom';}if(_0x4c9ef7['length']===0x0)return writeCliSideChannelLine(_0x3d401e(0x89)),_0x3d401e(0x81);return promptAppSelection(_0x4c9ef7);}async function _fallbackOrSkip(){const _0x49d79b=a52_0x1d1f,_0x1a1852=await select({'message':_0x49d79b(0x92),'choices':[{'name':a52_0x1d02d1[_0x49d79b(0x7b)](_0x49d79b(0x7c)),'value':_0x49d79b(0x93)},{'name':a52_0x1d02d1[_0x49d79b(0x86)](_0x49d79b(0x98)),'value':_0x49d79b(0x84)}]});if(_0x1a1852===_0x49d79b(0x93))return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a53_0xf2440=a53_0x454e;(function(_0x192c2c,_0x3deb8b){const _0x4603d8=a53_0x454e,_0x263efc=_0x192c2c();while(!![]){try{const _0x1407d4=-parseInt(_0x4603d8(0x100))/0x1*(-parseInt(_0x4603d8(0x104))/0x2)+-parseInt(_0x4603d8(0xff))/0x3+parseInt(_0x4603d8(0xe9))/0x4*(parseInt(_0x4603d8(0x106))/0x5)+parseInt(_0x4603d8(0xf1))/0x6*(parseInt(_0x4603d8(0xec))/0x7)+-parseInt(_0x4603d8(0xfd))/0x8+parseInt(_0x4603d8(0xfc))/0x9+-parseInt(_0x4603d8(0xfe))/0xa;if(_0x1407d4===_0x3deb8b)break;else _0x263efc['push'](_0x263efc['shift']());}catch(_0x658b64){_0x263efc['push'](_0x263efc['shift']());}}}(a53_0xde7b,0x2a9db));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set(['SUCCESS',a53_0xf2440(0xf3)]),NON_TERMINAL_STATUSES=new Set([a53_0xf2440(0xf6),a53_0xf2440(0xf5)]);export function normalizeAsyncTask(_0x2a711f){const _0x215bb8=a53_0xf2440,_0x309957=typeof _0x2a711f?.[_0x215bb8(0xef)]==='string'?_0x2a711f[_0x215bb8(0xef)][_0x215bb8(0xeb)]():'';if(!_0x309957)throw CliErrors[_0x215bb8(0xf7)]('Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.');const _0x41c0fb=typeof _0x2a711f[_0x215bb8(0xee)]===_0x215bb8(0xfb)?_0x2a711f['status']['trim']()[_0x215bb8(0x102)]():'';if(!_0x41c0fb)throw CliErrors[_0x215bb8(0xf7)](_0x215bb8(0x107)+_0x309957+_0x215bb8(0xfa));return{'taskId':_0x309957,'status':_0x41c0fb,'errorMessage':typeof _0x2a711f[_0x215bb8(0xf4)]===_0x215bb8(0xfb)&&_0x2a711f[_0x215bb8(0xf4)][_0x215bb8(0xeb)]()?_0x2a711f[_0x215bb8(0xf4)][_0x215bb8(0xeb)]():null,'isTerminal':TERMINAL_STATUSES[_0x215bb8(0x105)](_0x41c0fb),'knownStatus':TERMINAL_STATUSES['has'](_0x41c0fb)||NON_TERMINAL_STATUSES[_0x215bb8(0x105)](_0x41c0fb)};}function a53_0xde7b(){const _0x4a3638=['PENDING','apiError','\x20is\x20processing.','\x20returned\x20unknown\x20status\x20','\x20response\x20did\x20not\x20contain\x20a\x20status.','string','2945376Nmbgah','408808WcoovN','6156740FDlZBn','527811FoAvmY','16925lQhVcY','\x20--appcode\x20','toUpperCase','\x20is\x20pending.','38wKtRKh','has','25Gdzymr','Async\x20task\x20','\x20--format\x20compress','Task\x20','205764wvBnOq','SUCCESS','trim','49YlSmsd','replace','status','taskId','\x20failed:\x20','95334hdzfhc','\x20task\x20status\x20--task-id\x20','FAILED','errorMessage','PROCESSING'];a53_0xde7b=function(){return _0x4a3638;};return a53_0xde7b();}function a53_0x454e(_0x4fad33,_0x57ad87){_0x4fad33=_0x4fad33-0xe9;const _0xde7bde=a53_0xde7b();let _0x454e5f=_0xde7bde[_0x4fad33];return _0x454e5f;}export function buildAsyncTaskStatusCommand(_0xb6a892,_0x2d916e){const _0x13ce04=a53_0xf2440;return CLI_BIN_NAME+_0x13ce04(0xf2)+quoteShellArg(_0xb6a892)+_0x13ce04(0x101)+quoteShellArg(_0x2d916e)+_0x13ce04(0x108);}export function asyncTaskMessage(_0x14cdae){const _0x36163a=a53_0xf2440;switch(_0x14cdae['status']){case _0x36163a(0xf6):return _0x36163a(0x109)+_0x14cdae[_0x36163a(0xef)]+_0x36163a(0x103);case _0x36163a(0xf5):return'Task\x20'+_0x14cdae[_0x36163a(0xef)]+_0x36163a(0xf8);case _0x36163a(0xea):return _0x36163a(0x109)+_0x14cdae[_0x36163a(0xef)]+'\x20completed\x20successfully.';case _0x36163a(0xf3):return _0x14cdae[_0x36163a(0xf4)]?'Task\x20'+_0x14cdae['taskId']+_0x36163a(0xf0)+_0x14cdae[_0x36163a(0xf4)]:_0x36163a(0x109)+_0x14cdae['taskId']+'\x20failed.';default:return _0x36163a(0x109)+_0x14cdae[_0x36163a(0xef)]+_0x36163a(0xf9)+_0x14cdae[_0x36163a(0xee)]+'.';}}function quoteShellArg(_0x3ed1a6){const _0x44088a=a53_0xf2440;return'\x27'+_0x3ed1a6[_0x44088a(0xed)](/'/g,'\x27\x5c\x27\x27')+'\x27';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a54_0x4bea(_0x4f91c5,_0x4ab8e4){_0x4f91c5=_0x4f91c5-0x182;var _0x18a5a2=a54_0x18a5();var _0x4beaee=_0x18a5a2[_0x4f91c5];return _0x4beaee;}function a54_0x18a5(){var _0x4d7dad=['method','27120522tiHESB','2mVEfeK','4806IQSCUt','11774qqGVra','3069016aPmiPm','1542XePlzR','6870uYASZx','description','56WRWDlu','12CdKJRS','237856EKcPua','150070FqnEeq','2884038aGzTYi'];a54_0x18a5=function(){return _0x4d7dad;};return a54_0x18a5();}(function(_0x56f80b,_0x1d9f57){var _0x22e6fa=a54_0x4bea,_0x26cebd=_0x56f80b();while(!![]){try{var _0x5ad01d=-parseInt(_0x22e6fa(0x184))/0x1+-parseInt(_0x22e6fa(0x189))/0x2*(parseInt(_0x22e6fa(0x186))/0x3)+parseInt(_0x22e6fa(0x182))/0x4*(-parseInt(_0x22e6fa(0x185))/0x5)+-parseInt(_0x22e6fa(0x18d))/0x6*(-parseInt(_0x22e6fa(0x18b))/0x7)+-parseInt(_0x22e6fa(0x18c))/0x8+parseInt(_0x22e6fa(0x18a))/0x9*(-parseInt(_0x22e6fa(0x18e))/0xa)+-parseInt(_0x22e6fa(0x188))/0xb*(-parseInt(_0x22e6fa(0x183))/0xc);if(_0x5ad01d===_0x1d9f57)break;else _0x26cebd['push'](_0x26cebd['shift']());}catch(_0x43db7){_0x26cebd['push'](_0x26cebd['shift']());}}}(a54_0x18a5,0x80e15));export function asDryRunResult(_0x391cd4,_0x269c3a){var _0x5b201e=a54_0x4bea;return Object['defineProperties'](_0x391cd4,{'method':{'value':_0x269c3a[_0x5b201e(0x187)],'enumerable':![]},'url':{'value':_0x269c3a['url'],'enumerable':![]},..._0x269c3a[_0x5b201e(0x18f)]?{'description':{'value':_0x269c3a[_0x5b201e(0x18f)],'enumerable':![]}}:{}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a55_0x52bf3e=a55_0x4bec;(function(_0x152f84,_0x567625){const _0x89e4ff=a55_0x4bec,_0x22f040=_0x152f84();while(!![]){try{const _0x25eb8b=-parseInt(_0x89e4ff(0x69))/0x1+parseInt(_0x89e4ff(0x7c))/0x2*(parseInt(_0x89e4ff(0x78))/0x3)+parseInt(_0x89e4ff(0x8d))/0x4*(-parseInt(_0x89e4ff(0x7d))/0x5)+-parseInt(_0x89e4ff(0x90))/0x6*(-parseInt(_0x89e4ff(0x93))/0x7)+-parseInt(_0x89e4ff(0x91))/0x8*(parseInt(_0x89e4ff(0x89))/0x9)+-parseInt(_0x89e4ff(0x6e))/0xa*(parseInt(_0x89e4ff(0x83))/0xb)+-parseInt(_0x89e4ff(0x68))/0xc*(-parseInt(_0x89e4ff(0x7e))/0xd);if(_0x25eb8b===_0x567625)break;else _0x22f040['push'](_0x22f040['shift']());}catch(_0x443d4e){_0x22f040['push'](_0x22f040['shift']());}}}(a55_0x1a09,0x8f932));export const CROSS_RELATION_FROM_DATASET_FLAG={'name':a55_0x52bf3e(0x79),'type':a55_0x52bf3e(0x81),'required':!![],'description':a55_0x52bf3e(0x8b)};export const CROSS_RELATION_FROM_COLUMN_FLAG={'name':a55_0x52bf3e(0x70),'type':a55_0x52bf3e(0x81),'required':!![],'description':'Source\x20field\x20name\x20used\x20to\x20locate\x20the\x20relation'};export const CROSS_RELATION_TO_DATASET_FLAG={'name':a55_0x52bf3e(0x95),'type':'string','required':!![],'description':a55_0x52bf3e(0x92)};export const CROSS_RELATION_TO_COLUMN_FLAG={'name':a55_0x52bf3e(0x75),'type':'string','required':!![],'description':a55_0x52bf3e(0x71)};export const CROSS_RELATION_DBLINK_FLAG={'name':'from-dblink-id','type':a55_0x52bf3e(0x87),'description':a55_0x52bf3e(0x7f)};export const CROSS_RELATION_LABEL_FLAG={'name':a55_0x52bf3e(0x80),'type':'string','description':a55_0x52bf3e(0x8c)};function a55_0x1a09(){const _0x176d6e=['number','MANY_TO_ONE','9DEvaYr','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','Source\x20DB_TABLE\x20dataset\x20code','Target\x20display\x20field;\x20create\x20defaults\x20to\x20the\x20target\x20field,\x20update\x20keeps\x20the\x20current\x20value','124JSFgKG','ONE_TO_ONE','ONE_TO_MANY','2676jOqQXm','5734280NOyVLA','Target\x20DB_TABLE\x20dataset\x20code','8876eDMiUs','appcode','to-datasetcode','cardinality','24nTAyhN','419853ifHslS','sqlcode','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','Write\x20to\x20the\x20global\x20configuration','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','270XUbYik','POSTGRESQL','from-column','Target\x20field\x20name','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','Database\x20product\x20type','global','to-column','boolean','MYSQL','3QBJkCZ','from-datasetcode','datasetcode','App\x20code\x20(e.g.\x20app-xxxxx)','823054uOWIWX','123510hkNgGI','15461524CBdPOh','Source\x20database\x20connection\x20ID;\x20derived\x20from\x20the\x20source\x20dataset\x20when\x20omitted','to-label-column','string','Relation\x20cardinality;\x20create\x20leaves\x20it\x20unset\x20when\x20omitted,\x20update\x20keeps\x20the\x20current\x20value','352517mnLXRn','code','skip-connection-test','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)'];a55_0x1a09=function(){return _0x176d6e;};return a55_0x1a09();}export const CROSS_RELATION_CARDINALITY_FLAG={'name':a55_0x52bf3e(0x96),'type':a55_0x52bf3e(0x81),'enum':[a55_0x52bf3e(0x8e),a55_0x52bf3e(0x8f),a55_0x52bf3e(0x88),'MANY_TO_MANY'],'description':a55_0x52bf3e(0x82)};export const GLOBAL_SCOPE_FLAG={'name':a55_0x52bf3e(0x74),'type':a55_0x52bf3e(0x76),'default':![],'description':a55_0x52bf3e(0x6c)};export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a55_0x52bf3e(0x8a)};export const CODE_FLAG={'name':a55_0x52bf3e(0x84),'type':a55_0x52bf3e(0x81),'required':!![],'description':a55_0x52bf3e(0x72),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a55_0x52bf3e(0x7a),'description':a55_0x52bf3e(0x72)};export const SQLCODE_FLAG={'name':a55_0x52bf3e(0x6a),'type':'string','required':!![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a55_0x52bf3e(0x6b)}};export const APPCODE_FLAG_OPTIONAL={'name':a55_0x52bf3e(0x94),'type':'string','required':![],'description':a55_0x52bf3e(0x86)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a55_0x52bf3e(0x7b)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};function a55_0x4bec(_0x327288,_0xe03fb0){_0x327288=_0x327288-0x68;const _0x1a09b6=a55_0x1a09();let _0x4bec46=_0x1a09b6[_0x327288];return _0x4bec46;}export const DBLINK_ID_FLAG={'name':'id','type':'number','required':!![],'description':a55_0x52bf3e(0x6d)};export const DB_TYPE_FLAG={'name':'dbtype','type':a55_0x52bf3e(0x81),'required':!![],'description':a55_0x52bf3e(0x73),'enum':[a55_0x52bf3e(0x77),a55_0x52bf3e(0x6f)]};export const SKIP_CONNECTION_TEST_FLAG={'name':a55_0x52bf3e(0x85),'type':'boolean','description':'Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update'};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x12283b,_0x446f19){const _0x1c7e46=a56_0xf17e,_0x403ac7=_0x12283b();while(!![]){try{const _0x43b552=parseInt(_0x1c7e46(0x1d3))/0x1+parseInt(_0x1c7e46(0x1d8))/0x2*(-parseInt(_0x1c7e46(0x1d9))/0x3)+-parseInt(_0x1c7e46(0x1cd))/0x4*(-parseInt(_0x1c7e46(0x1d0))/0x5)+parseInt(_0x1c7e46(0x1d7))/0x6+parseInt(_0x1c7e46(0x1dc))/0x7+parseInt(_0x1c7e46(0x1dd))/0x8+-parseInt(_0x1c7e46(0x1db))/0x9;if(_0x43b552===_0x446f19)break;else _0x403ac7['push'](_0x403ac7['shift']());}catch(_0x872fb3){_0x403ac7['push'](_0x403ac7['shift']());}}}(a56_0x1226,0xdcb34));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;function a56_0x1226(){const _0x46c990=['File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','2793822jTTvcq','836PWhIeJ','4920PMyAaI','isFile','9535122MvhUzb','8226197eKNpXM','457600VSXSWd','76ZydJzR','size','\x20path\x20is\x20required.','6100sBCbEP','File\x20not\x20found:\x20','validation','927778ngiVes','trim','toFixed'];a56_0x1226=function(){return _0x46c990;};return a56_0x1226();}function a56_0xf17e(_0x89843,_0x167bec){_0x89843=_0x89843-0x1cd;const _0x1226a0=a56_0x1226();let _0xf17e83=_0x1226a0[_0x89843];return _0xf17e83;}export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x57ec0d){const _0x1aaaa4=a56_0xf17e;if(_0x57ec0d>=BYTES_PER_MB){const _0x1d66b1=Math['ceil'](_0x57ec0d/BYTES_PER_MB*0x64)/0x64;return _0x1d66b1[_0x1aaaa4(0x1d5)](0x2)+'\x20MB';}return _0x57ec0d+'\x20B';}export function requireDevelopmentUploadFile(_0xe9ef2c,_0x4f10a5){const _0x3821fd=a56_0xf17e,_0x29f0c5=_0xe9ef2c[_0x3821fd(0x1d4)]();if(!_0x29f0c5)throw CliErrors[_0x3821fd(0x1d2)](_0x4f10a5+_0x3821fd(0x1cf));if(!existsSync(_0x29f0c5))throw CliErrors[_0x3821fd(0x1d2)](_0x3821fd(0x1d1)+_0x29f0c5);const _0xb0a23f=statSync(_0x29f0c5);if(!_0xb0a23f[_0x3821fd(0x1da)]())throw CliErrors['validation']('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x29f0c5);if(_0xb0a23f[_0x3821fd(0x1ce)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x3821fd(0x1d2)](_0x3821fd(0x1d6)+_0x29f0c5+'\x20('+formatBytes(_0xb0a23f[_0x3821fd(0x1ce)])+')');return{'path':_0x29f0c5,'size':_0xb0a23f[_0x3821fd(0x1ce)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a57_0x45c5(_0x260d4f,_0xe08304){_0x260d4f=_0x260d4f-0x1c3;const _0x39cd08=a57_0x39cd();let _0x45c5af=_0x39cd08[_0x260d4f];return _0x45c5af;}(function(_0x4ab3b7,_0x552565){const _0x40923d=a57_0x45c5,_0x40af18=_0x4ab3b7();while(!![]){try{const _0x2dcfa4=parseInt(_0x40923d(0x1c4))/0x1*(-parseInt(_0x40923d(0x1d1))/0x2)+parseInt(_0x40923d(0x1cb))/0x3*(parseInt(_0x40923d(0x1c3))/0x4)+parseInt(_0x40923d(0x1cf))/0x5*(-parseInt(_0x40923d(0x1cc))/0x6)+-parseInt(_0x40923d(0x1c8))/0x7*(parseInt(_0x40923d(0x1c6))/0x8)+-parseInt(_0x40923d(0x1c7))/0x9+parseInt(_0x40923d(0x1d2))/0xa*(parseInt(_0x40923d(0x1ce))/0xb)+parseInt(_0x40923d(0x1c9))/0xc*(parseInt(_0x40923d(0x1d3))/0xd);if(_0x2dcfa4===_0x552565)break;else _0x40af18['push'](_0x40af18['shift']());}catch(_0x18617e){_0x40af18['push'](_0x40af18['shift']());}}}(a57_0x39cd,0x1b8a5));export function validateAppcode(_0x54738e){const _0x3da560=a57_0x45c5,_0x14f4cb=_0x54738e[_0x3da560(0x1d0)]();if(!_0x14f4cb)return{'valid':![],'message':_0x3da560(0x1c5)};if(_0x14f4cb['length']>0x64)return{'valid':![],'message':_0x3da560(0x1cd)};if(!/^[A-Za-z0-9_-]+$/['test'](_0x14f4cb))return{'valid':![],'message':_0x3da560(0x1ca)};return{'valid':!![]};}function a57_0x39cd(){const _0x13e3d0=['Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','50541xOifax','60036pyofat','App\x20Code\x20cannot\x20exceed\x20100\x20characters','17149dbiWmD','80OyVpdL','trim','2166HzGMLn','790ltrfKe','442IqzoeT','8jdIPys','97TsfrlH','App\x20Code\x20cannot\x20be\x20empty','4808hjTlWF','1504278fhjtdv','623perUua','155904fBCNho'];a57_0x39cd=function(){return _0x13e3d0;};return a57_0x39cd();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a58_0x51ef(_0x4bc803,_0x599f09){_0x4bc803=_0x4bc803-0x14d;const _0x4409e8=a58_0x4409();let _0x51ef31=_0x4409e8[_0x4bc803];return _0x51ef31;}const a58_0x2c4573=a58_0x51ef;(function(_0x243527,_0x26122e){const _0x2da49c=a58_0x51ef,_0x5bf415=_0x243527();while(!![]){try{const _0x2edcaa=parseInt(_0x2da49c(0x15e))/0x1+-parseInt(_0x2da49c(0x14f))/0x2+-parseInt(_0x2da49c(0x14d))/0x3*(-parseInt(_0x2da49c(0x153))/0x4)+parseInt(_0x2da49c(0x163))/0x5*(-parseInt(_0x2da49c(0x154))/0x6)+-parseInt(_0x2da49c(0x162))/0x7*(parseInt(_0x2da49c(0x156))/0x8)+-parseInt(_0x2da49c(0x16f))/0x9+-parseInt(_0x2da49c(0x159))/0xa*(-parseInt(_0x2da49c(0x16d))/0xb);if(_0x2edcaa===_0x26122e)break;else _0x5bf415['push'](_0x5bf415['shift']());}catch(_0x42ed93){_0x5bf415['push'](_0x5bf415['shift']());}}}(a58_0x4409,0x860e9));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';const LEGACY_DELETABLE_KEYS=new Set([a58_0x2c4573(0x16c)]),EXTRA_DELETABLE_KEYS=new Set([a58_0x2c4573(0x15a),'routing']);async function execute(_0x383ff4){const _0x27fa34=a58_0x2c4573,_0x5e13fd=_0x383ff4[_0x27fa34(0x15b)][0x0]?.[_0x27fa34(0x157)]();if(!_0x5e13fd)throw CliErrors['validation']('Missing\x20key\x20argument.',_0x27fa34(0x14e)+CLI_BIN_NAME+_0x27fa34(0x170));if(_0x5e13fd===_0x27fa34(0x166))throw CliErrors[_0x27fa34(0x15d)](_0x27fa34(0x151));if(!isTopLevelConfigKey(_0x5e13fd)&&!EXTRA_DELETABLE_KEYS[_0x27fa34(0x16b)](_0x5e13fd)&&!LEGACY_DELETABLE_KEYS['has'](_0x5e13fd))throw CliErrors[_0x27fa34(0x15d)]('Top-level\x20key\x20\x22'+_0x5e13fd+_0x27fa34(0x15c),_0x27fa34(0x150));const _0x5ce052=resolveWriteScope({'global':_0x383ff4[_0x27fa34(0x16a)](_0x27fa34(0x165))}),_0x5c312b=readScopedConfig(_0x5ce052),_0x35a138=Object[_0x27fa34(0x164)][_0x27fa34(0x161)][_0x27fa34(0x155)](_0x5c312b,_0x5e13fd);_0x35a138&&(delete _0x5c312b[_0x5e13fd],writeScopedConfig(_0x5c312b,_0x5ce052));const _0x3801e6=_0x5ce052===_0x27fa34(0x165)?_0x27fa34(0x160):_0x27fa34(0x158);return{'ok':!![],'message':_0x35a138?'✓\x20'+_0x3801e6+'\x20'+_0x5e13fd+'\x20deleted':'✓\x20'+_0x3801e6+'\x20'+_0x5e13fd+_0x27fa34(0x168),'data':{'key':_0x5e13fd,'scope':_0x5ce052,'changed':_0x35a138}};}function a58_0x4409(){const _0x31be20=['9003240olEfxW','\x20config\x20delete\x20<key>\x20[--global]','108789kXipYv','Usage:\x20','1640644NmkqYq','Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','4MehpNS','1498476NWOoQP','call','7839144XLaurJ','trim','Project','35026510sQfHYi','defaultApp','args','\x22\x20is\x20not\x20deletable.','validation','60504ZtOhvy','Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','Global','hasOwnProperty','7qxtyqj','5gVFZlB','prototype','global','riskLevel','config','\x20already\x20absent','key','bool','has','inherit','11McLnko','delete'];a58_0x4409=function(){return _0x31be20;};return a58_0x4409();}export const configDeleteDefinition={'service':a58_0x2c4573(0x167),'command':a58_0x2c4573(0x16e),'description':'Delete\x20a\x20config\x20value\x20from\x20one\x20scope','risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[{'name':a58_0x2c4573(0x169),'description':a58_0x2c4573(0x15f),'required':!![]}],'flags':[{'name':a58_0x2c4573(0x165),'type':'boolean','description':a58_0x2c4573(0x152),'default':![]}],'execute':execute};
|