@lovrabet/rabetbase-cli 2.5.1 → 2.5.2-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/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/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/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/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/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/auto-sync.d.ts +3 -11
- package/lib/commands/deployment/auto-sync.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/template.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/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/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/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.d.ts +0 -2
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +0 -2
- 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/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.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/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.d.ts +2 -0
- package/lib/framework/supported-flags.js +1 -0
- package/lib/framework/types.d.ts +2 -4
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +3 -3
- package/skills/rabetbase/references/rabetbase-deployment-sync.md +16 -44
- package/skills/rabetbase.manifest.json +3 -3
- package/lib/config/deployment-sync.d.ts +0 -10
- package/lib/config/deployment-sync.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x48071f,_0x5878bd){const _0x5f3f0a=a34_0x387f,_0x2f3457=_0x48071f();while(!![]){try{const _0xaa7ce4=parseInt(_0x5f3f0a(0x196))/0x1+-parseInt(_0x5f3f0a(0x198))/0x2+parseInt(_0x5f3f0a(0x194))/0x3*(-parseInt(_0x5f3f0a(0x193))/0x4)+parseInt(_0x5f3f0a(0x191))/0x5+parseInt(_0x5f3f0a(0x190))/0x6*(-parseInt(_0x5f3f0a(0x199))/0x7)+-parseInt(_0x5f3f0a(0x195))/0x8+parseInt(_0x5f3f0a(0x197))/0x9*(parseInt(_0x5f3f0a(0x192))/0xa);if(_0xaa7ce4===_0x5878bd)break;else _0x2f3457['push'](_0x2f3457['shift']());}catch(_0x1474a6){_0x2f3457['push'](_0x2f3457['shift']());}}}(a34_0x4a69,0x7f496));import{bffList}from'../../commands/bff/list.js';function a34_0x387f(_0xfaea49,_0x35dab6){_0xfaea49=_0xfaea49-0x190;const _0x4a692e=a34_0x4a69();let _0x387f89=_0x4a692e[_0xfaea49];return _0x387f89;}import{bffDetail}from'../../commands/bff/detail.js';import{bffStatus}from'../../commands/bff/status.js';import{bffCreate}from'../../commands/bff/create.js';function a34_0x4a69(){const _0x59f66b=['5252814ECqrFL','305275zymScN','4139010jdWWyk','1663952whrMKo','3EhWmmO','454280HXaOlX','431686tkgRPa','36jQvDTb','557474NspHnG','7XaLkij'];a34_0x4a69=function(){return _0x59f66b;};return a34_0x4a69();}import{bffPush}from'../../commands/bff/push.js';import{bffPull}from'../../commands/bff/pull.js';import{bffDelete}from'../../commands/bff/delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];
|
package/lib/commands/bff/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a35_0x1841(_0x5cf123,_0x4f5b26){_0x5cf123=_0x5cf123-0xb8;const _0x52da16=a35_0x52da();let _0x18416d=_0x52da16[_0x5cf123];return _0x18416d;}const a35_0x440eae=a35_0x1841;function a35_0x52da(){const _0x1d1ae3=['24YjbeKC','functionName','Script\x20type\x20filter','str','192twjUow','(unnamed)','map','13097876aLupDf','576uLKlYq','read','boolean','43xxmSCm','ENDPOINT','scriptType','appCode','verbose','bool','7858LiRxjg','55620MfflPa','Return\x20full\x20script\x20objects','bff','674898ovYGpg','type','399469WOXLJB','string','1543962wanWEG','name','39130BtUfpp','Filter\x20by\x20script\x20name'];a35_0x52da=function(){return _0x1d1ae3;};return a35_0x52da();}(function(_0x4527d0,_0x26a4ff){const _0x4fa0d2=a35_0x1841,_0x34ca28=_0x4527d0();while(!![]){try{const _0x5c6c4d=parseInt(_0x4fa0d2(0xce))/0x1*(parseInt(_0x4fa0d2(0xd4))/0x2)+-parseInt(_0x4fa0d2(0xbf))/0x3+parseInt(_0x4fa0d2(0xc7))/0x4*(-parseInt(_0x4fa0d2(0xb8))/0x5)+-parseInt(_0x4fa0d2(0xbb))/0x6+-parseInt(_0x4fa0d2(0xbd))/0x7*(parseInt(_0x4fa0d2(0xc3))/0x8)+parseInt(_0x4fa0d2(0xcb))/0x9*(parseInt(_0x4fa0d2(0xc1))/0xa)+parseInt(_0x4fa0d2(0xca))/0xb;if(_0x5c6c4d===_0x26a4ff)break;else _0x34ca28['push'](_0x34ca28['shift']());}catch(_0x489dda){_0x34ca28['push'](_0x34ca28['shift']());}}}(a35_0x52da,0x43d2d));import{listBffScripts}from'../../core/api-client.js';export const bffList={'service':a35_0x440eae(0xba),'command':'list','description':'List\x20Backend\x20Function\x20scripts','risk':a35_0x440eae(0xcc),'flags':[{'name':a35_0x440eae(0xbc),'type':a35_0x440eae(0xbe),'description':a35_0x440eae(0xc5),'default':'ENDPOINT','enum':[a35_0x440eae(0xcf),'COMMON']},{'name':a35_0x440eae(0xc0),'type':a35_0x440eae(0xbe),'description':a35_0x440eae(0xc2)},{'name':a35_0x440eae(0xd2),'type':a35_0x440eae(0xcd),'description':a35_0x440eae(0xb9)}],async 'execute'(_0xd4fd38){const _0x15334c=a35_0x440eae,_0x36b9d3=await listBffScripts(_0xd4fd38[_0x15334c(0xd1)],_0xd4fd38['str'](_0x15334c(0xbc)),{'scriptName':_0xd4fd38[_0x15334c(0xc6)](_0x15334c(0xc0))||undefined}),_0x47159e=_0xd4fd38[_0x15334c(0xd3)]('verbose');return{'ok':!![],'data':_0x47159e?_0x36b9d3:_0x36b9d3[_0x15334c(0xc9)](_0x4731d6=>({'id':_0x4731d6['id'],'functionName':_0x4731d6[_0x15334c(0xc4)]??'','description':_0x4731d6['description']||_0x15334c(0xc8),'scriptType':_0x4731d6[_0x15334c(0xd0)]})),'message':_0x36b9d3['length']===0x0?'No\x20Backend\x20Function\x20scripts\x20found.':undefined};}};
|
package/lib/commands/bff/pull.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a36_0x2081a1=a36_0x3e5b;(function(_0x22d4b7,_0x159831){const _0x3f9f29=a36_0x3e5b,_0x3b4a1e=_0x22d4b7();while(!![]){try{const _0x47cad2=-parseInt(_0x3f9f29(0x1d0))/0x1*(-parseInt(_0x3f9f29(0x1f5))/0x2)+parseInt(_0x3f9f29(0x1e4))/0x3+parseInt(_0x3f9f29(0x1b7))/0x4+parseInt(_0x3f9f29(0x1e9))/0x5*(parseInt(_0x3f9f29(0x1f4))/0x6)+-parseInt(_0x3f9f29(0x1e8))/0x7*(parseInt(_0x3f9f29(0x1d5))/0x8)+-parseInt(_0x3f9f29(0x1ea))/0x9+-parseInt(_0x3f9f29(0x1f2))/0xa*(-parseInt(_0x3f9f29(0x1bf))/0xb);if(_0x47cad2===_0x159831)break;else _0x3b4a1e['push'](_0x3b4a1e['shift']());}catch(_0x24139a){_0x3b4a1e['push'](_0x3b4a1e['shift']());}}}(a36_0x4d18,0xc3786));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';function a36_0x4d18(){const _0x3b8ff9=['Pull\x20complete:\x20','209lvuaYz','trim','str','lockFilePath','unresolvable\x20target\x20path','yes','ENDPOINT','appCode','stderr','functions','filePath','push','Force\x20overwrite\x20local\x20unsynced\x20changes','string','includes','functionNode','COMMON','4SplqjZ','message','version','all','nonInteractive','3592zvbsLT','force','Remote\x20script\x20missing\x20content.','utf8','boolean','&type=','\x20remote\x20Backend\x20Function\x20script(s)\x20for\x20pull','hash','alias','map','type','toLowerCase','scriptsRoot','apps','pull','869505TqFOAE','bool','lastSync','Pull\x20only\x20this\x20script\x20type','21175TftVKl','837245vQqVvP','6485733wyjXPx','cancelled','close','Would\x20inspect\x20','datasetCode','Lock\x20scope\x20for\x20app\x20\x22','/api/management/library/scripts/list?appCode=','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','514930XwGvYG','length','6xqwBbn','680404WSUTae','HOOK','No\x20remote\x20Backend\x20Function\x20scripts\x20found.','would_pull','GET','functionName','Remote\x20script\x20missing\x20id.','conflict','apiDir','\x20failed','local\x20unsynced\x20changes','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','\x20skipped,\x20','operationType','Force\x20pull\x20cancelled.','332196xifWed','hookLocation','lockKey','scriptType','skipped','stringify','scriptContent'];a36_0x4d18=function(){return _0x3b8ff9;};return a36_0x4d18();}import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':'bff','command':a36_0x2081a1(0x1e3),'description':'Pull\x20remote\x20Backend\x20Function\x20scripts\x20to\x20local','risk':'read','flags':[{'name':a36_0x2081a1(0x1df),'type':a36_0x2081a1(0x1cc),'description':a36_0x2081a1(0x1e7),'enum':[a36_0x2081a1(0x1cf),a36_0x2081a1(0x1c5),'HOOK']},{'name':a36_0x2081a1(0x1d6),'type':a36_0x2081a1(0x1d9),'description':a36_0x2081a1(0x1cb)}],async 'dryRun'(_0x23040b){const _0x20dd61=a36_0x2081a1,_0x17e2dc=loadBffProjectConfig(_0x23040b[_0x20dd61(0x1c6)]),_0x45cca6=await readBffLockFile(_0x17e2dc[_0x20dd61(0x1c2)]),{appLock:_0x56e744}=ensureLockScope(_0x45cca6??createEmptyBffLock(),_0x23040b[_0x20dd61(0x1c6)],_0x17e2dc[_0x20dd61(0x1e1)],'pull'),_0x23b300=normalizeBffType(_0x23040b[_0x20dd61(0x1c1)](_0x20dd61(0x1df)))??undefined,_0x271776=buildDatasetCodeToAliasMap(_0x23040b[_0x20dd61(0x1fd)],_0x23040b[_0x20dd61(0x1c6)]),[_0x2352e0,_0x247999]=await Promise[_0x20dd61(0x1d3)]([listBffScripts(_0x23040b['appCode'],_0x23b300),getBffScriptStatistics(_0x23040b[_0x20dd61(0x1c6)])]),_0x22f24e=createHookLocationMap(_0x247999),_0xef9c21=[];for(const _0x53527d of _0x2352e0){const _0x2fe365=resolveRemoteScriptTarget(_0x17e2dc,_0x53527d,_0x22f24e,_0x56e744[_0x20dd61(0x1c8)],_0x271776);if(!_0x2fe365){_0xef9c21['push']({'scriptType':_0x53527d[_0x20dd61(0x1ba)],'functionName':_0x53527d[_0x20dd61(0x1fa)]??'','status':_0x20dd61(0x1bb),'reason':'unresolvable\x20target\x20path'});continue;}const _0xc1a2bf=_0x56e744['functions'][_0x2fe365[_0x20dd61(0x1b9)]],_0x427b91=_0x53527d['scriptContent']!=null?computeContentHash(_0x53527d[_0x20dd61(0x1bd)]):undefined,_0x2b5d7e=await hasUnsyncedLocalChanges(_0x2fe365['filePath'],_0xc1a2bf,_0x427b91);_0xef9c21[_0x20dd61(0x1ca)]({'lockKey':_0x2fe365['lockKey'],'filePath':_0x2fe365['filePath'],'remoteId':_0x53527d['id']??null,'status':_0x2b5d7e?_0x20dd61(0x1fc):_0x20dd61(0x1f8)});}return{'method':_0x20dd61(0x1f9),'url':_0x20dd61(0x1f0)+_0x23040b[_0x20dd61(0x1c6)]+(_0x23b300?_0x20dd61(0x1da)+_0x23b300:''),'body':{'appCode':_0x23040b[_0x20dd61(0x1c6)],'filterType':_0x23b300??null,'files':_0xef9c21},'description':_0x20dd61(0x1ed)+_0xef9c21[_0x20dd61(0x1f3)]+_0x20dd61(0x1db)};},async 'execute'(_0x3602c0){const _0x5c6932=a36_0x2081a1,_0x4056de=loadBffProjectConfig(_0x3602c0[_0x5c6932(0x1c6)]),_0x5b0881=await readBffLockFile(_0x4056de[_0x5c6932(0x1c2)]),{lockData:_0x13aa5b,appLock:_0xdad711}=ensureLockScope(_0x5b0881??createEmptyBffLock(),_0x3602c0[_0x5c6932(0x1c6)],_0x4056de[_0x5c6932(0x1e1)],_0x5c6932(0x1e3)),_0x3dd114=normalizeBffType(_0x3602c0[_0x5c6932(0x1c1)]('type'))??undefined;if(_0x3602c0[_0x5c6932(0x1c1)](_0x5c6932(0x1df))&&!_0x3dd114)throw CliErrors['validation'](_0x5c6932(0x1f1));const [_0x383d80,_0x5305d3]=await Promise[_0x5c6932(0x1d3)]([listBffScripts(_0x3602c0[_0x5c6932(0x1c6)],_0x3dd114),getBffScriptStatistics(_0x3602c0[_0x5c6932(0x1c6)])]);if(_0x383d80[_0x5c6932(0x1f3)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x5c6932(0x1f7)};const _0x4feb90=_0x3602c0[_0x5c6932(0x1e5)]('force');if(_0x4feb90&&!_0x3602c0['nonInteractive']){const _0x403140=await confirmForce();if(!_0x403140)throw CliErrors[_0x5c6932(0x1eb)](_0x5c6932(0x1b6));}if(_0x4feb90&&_0x3602c0[_0x5c6932(0x1d4)]){}const _0x5b1c01=buildDatasetCodeToAliasMap(_0x3602c0['apiDir'],_0x3602c0[_0x5c6932(0x1c6)]),_0x175121=createHookLocationMap(_0x5305d3),_0x20f7c4=JSON['parse'](JSON[_0x5c6932(0x1bc)](_0x13aa5b)),_0x2e613f=_0x3602c0['appCode'],_0x555ff5=_0x20f7c4[_0x5c6932(0x1e2)][_0x2e613f];if(!_0x555ff5)throw new Error(_0x5c6932(0x1ef)+_0x2e613f+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0xfe6e96=[],_0x189d61=[],_0x498067=[];for(const _0x58e40b of _0x383d80){const _0x3680ae=resolveRemoteScriptTarget(_0x4056de,_0x58e40b,_0x175121,_0xdad711[_0x5c6932(0x1c8)],_0x5b1c01);if(!_0x3680ae){_0x189d61[_0x5c6932(0x1ca)]({'lockKey':_0x58e40b['scriptType']+'/'+_0x58e40b['functionName'],'reason':_0x5c6932(0x1c3)});continue;}const _0x308a15=_0xdad711['functions'][_0x3680ae[_0x5c6932(0x1b9)]];try{if(!_0x58e40b['id'])throw new Error(_0x5c6932(0x1fb));if(_0x58e40b['scriptContent']==null)throw new Error(_0x5c6932(0x1d7));const _0x21cae8=_0x58e40b[_0x5c6932(0x1bd)],_0x24ba79=computeContentHash(_0x21cae8);if(!_0x4feb90){const _0x1c18ad=await hasUnsyncedLocalChanges(_0x3680ae[_0x5c6932(0x1c9)],_0x308a15,_0x24ba79);if(_0x1c18ad){_0x189d61[_0x5c6932(0x1ca)]({'lockKey':_0x3680ae[_0x5c6932(0x1b9)],'reason':_0x5c6932(0x1ff)});continue;}}await ensureParentDirectory(_0x3680ae[_0x5c6932(0x1c9)]),await writeFile(_0x3680ae['filePath'],_0x21cae8,_0x5c6932(0x1d8));const _0x4798ae={'hash':_0x24ba79,'remoteId':_0x58e40b['id'],'version':_0x58e40b[_0x5c6932(0x1d2)]};_0x3680ae[_0x5c6932(0x1df)]===_0x5c6932(0x1f6)&&_0x3680ae['hookLocation']&&(_0x4798ae[_0x5c6932(0x1dd)]=_0x3680ae[_0x5c6932(0x1b8)][_0x5c6932(0x1dd)],_0x4798ae[_0x5c6932(0x1ee)]=_0x3680ae[_0x5c6932(0x1b8)][_0x5c6932(0x1ee)],_0x4798ae[_0x5c6932(0x1b5)]=_0x3680ae[_0x5c6932(0x1b8)]['operationType'],_0x4798ae[_0x5c6932(0x1ce)]=_0x3680ae[_0x5c6932(0x1b8)][_0x5c6932(0x1ce)]),_0x555ff5[_0x5c6932(0x1c8)][_0x3680ae[_0x5c6932(0x1b9)]]=_0x4798ae,_0xfe6e96[_0x5c6932(0x1ca)]({'lockKey':_0x3680ae['lockKey'],'remoteId':_0x58e40b['id']});}catch(_0x3afe51){_0x498067[_0x5c6932(0x1ca)]({'lockKey':_0x3680ae[_0x5c6932(0x1b9)],'error':_0x3afe51 instanceof Error?_0x3afe51[_0x5c6932(0x1d1)]:String(_0x3afe51)});}}return _0x555ff5[_0x5c6932(0x1e6)]=new Date()['toISOString'](),await writeBffLockFile(_0x4056de[_0x5c6932(0x1c2)],_0x20f7c4),{'ok':_0x498067[_0x5c6932(0x1f3)]===0x0,'data':{'pulled':_0xfe6e96,'skipped':_0x189d61,'failed':_0x498067},'message':_0x5c6932(0x1be)+_0xfe6e96[_0x5c6932(0x1f3)]+'\x20pulled,\x20'+_0x189d61['length']+_0x5c6932(0x1b4)+_0x498067['length']+_0x5c6932(0x1fe)};}};async function hasUnsyncedLocalChanges(_0x414fee,_0x33377a,_0x18145d){const _0x3125f0=a36_0x2081a1;if(!await fileExists(_0x414fee))return![];const _0x4552f3=await computeFileHash(_0x414fee);if(!_0x33377a)return _0x18145d?_0x4552f3!==_0x18145d:!![];return _0x4552f3!==_0x33377a[_0x3125f0(0x1dc)];}function buildDatasetCodeToAliasMap(_0x41ee76,_0x237e5c){const _0x7c22f4=a36_0x2081a1,_0x19f534=loadAliasMap(_0x41ee76,undefined,resolveApiFilePath(_0x41ee76,_0x237e5c));return new Map(_0x19f534[_0x7c22f4(0x1de)](_0x324e5c=>[_0x324e5c[_0x7c22f4(0x1ee)],_0x324e5c[_0x7c22f4(0x1dd)]]));}function a36_0x3e5b(_0x1e643c,_0xb8280a){_0x1e643c=_0x1e643c-0x1b4;const _0x4d1898=a36_0x4d18();let _0x3e5b37=_0x4d1898[_0x1e643c];return _0x3e5b37;}async function confirmForce(){const _0x13f8ad=a36_0x2081a1,_0x26227a=createInterface({'input':process['stdin'],'output':process[_0x13f8ad(0x1c7)]}),_0x4b6315=await new Promise(_0x3670b2=>{const _0x5cbb0b=_0x13f8ad;_0x26227a['question'](_0x5cbb0b(0x200),_0x3670b2);});return _0x26227a[_0x13f8ad(0x1ec)](),['y',_0x13f8ad(0x1c4)][_0x13f8ad(0x1cd)](_0x4b6315[_0x13f8ad(0x1c0)]()[_0x13f8ad(0x1e0)]());}
|
package/lib/commands/bff/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a37_0x7cb864=a37_0x4919;(function(_0x42ac1d,_0x5a0e40){const _0x45e97e=a37_0x4919,_0x18721a=_0x42ac1d();while(!![]){try{const _0x374204=parseInt(_0x45e97e(0x1c1))/0x1*(parseInt(_0x45e97e(0x19d))/0x2)+parseInt(_0x45e97e(0x1a6))/0x3*(-parseInt(_0x45e97e(0x1ac))/0x4)+-parseInt(_0x45e97e(0x198))/0x5+-parseInt(_0x45e97e(0x1a1))/0x6+-parseInt(_0x45e97e(0x193))/0x7+-parseInt(_0x45e97e(0x19e))/0x8*(-parseInt(_0x45e97e(0x187))/0x9)+-parseInt(_0x45e97e(0x1a9))/0xa*(-parseInt(_0x45e97e(0x1b0))/0xb);if(_0x374204===_0x5a0e40)break;else _0x18721a['push'](_0x18721a['shift']());}catch(_0x5f1e36){_0x18721a['push'](_0x18721a['shift']());}}}(a37_0x4c09,0x5e8c8));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';function a37_0x4c09(){const _0x25d64a=['Local\x20function\x20not\x20found:\x20','every','Runtime\x20script\x20cache\x20cleared.','Push\x20only\x20this\x20script\x20type','alias','2yezxHi','name','Incomplete\x20HOOK\x20path:\x20','force','Would\x20inspect\x20','Run\x20`','runtime\x20cache\x20not\x20needed','has','Cannot\x20resolve\x20dataset\x20for\x20\x22','would_push','operationType','str','POST','\x20uploaded,\x20','type','runtime\x20cache\x20cleared','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','lastSync','ENDPOINT','lockFilePath','status','apps','string','code','bool',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','remoteId','create','1882107cbtDaV','version','some','hash','No\x20local\x20Backend\x20Function\x20scripts\x20found.','HOOK','push','description','\x20skipped,\x20','script','attempted','validation','4300583KzquZg','aliasToDatasetCode','update','apiDir','set','3712715xvLGTp','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','bff','functionNode','toISOString','458360rHCBIU','16hFrRLV','/api/management/library/scripts/save','filter','1617576XhePKY','filePath','stringify','cleared','write','12hrvRYz','\x22\x20not\x20found\x20after\x20ensureLockScope.','lockKey','20IHYETY','functions','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','688120KSqkgz','appCode','message','\x22.\x20','10039117gzNhAZ','scriptsRoot','unchanged','get','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','length','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','Push\x20complete:\x20','runtime\x20cache\x20clear\x20failed','map','datasetCode','join'];a37_0x4c09=function(){return _0x25d64a;};return a37_0x4c09();}import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{automaticDeploymentSyncSucceeded,buildAutomaticDeploymentSyncPreview,runAutomaticDeploymentSync,validateAutomaticDeploymentSync}from'../../commands/deployment/auto-sync.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':'bff','command':a37_0x7cb864(0x18d),'description':'Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','risk':a37_0x7cb864(0x1a5),'flags':[{'name':a37_0x7cb864(0x179),'type':a37_0x7cb864(0x181),'description':a37_0x7cb864(0x1bf),'enum':['COMMON',a37_0x7cb864(0x17d),a37_0x7cb864(0x18c)]},{'name':a37_0x7cb864(0x1c2),'type':a37_0x7cb864(0x181),'description':a37_0x7cb864(0x17b)},{'name':a37_0x7cb864(0x1c4),'type':'boolean','description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'validate'(_0x1ff4d6){validateAutomaticDeploymentSync(_0x1ff4d6);},async 'dryRun'(_0x3c4243){const _0x5cd264=a37_0x7cb864,_0x1f5e03=loadBffProjectConfig(_0x3c4243[_0x5cd264(0x1ad)]),_0x210dae=await readBffLockFile(_0x1f5e03[_0x5cd264(0x17e)]),{appLock:_0x1054f6}=ensureLockScope(_0x210dae??createEmptyBffLock(),_0x3c4243['appCode'],_0x1f5e03[_0x5cd264(0x1b1)],_0x5cd264(0x18d)),_0x73a18f=await getTargetFunctions(_0x1f5e03,_0x3c4243),_0x120084=_0x3c4243[_0x5cd264(0x183)]('force'),_0x1a2a65=[],_0xee1df0=[];for(const _0x593b77 of _0x73a18f){const _0x31ac71=await computeFileHash(_0x593b77[_0x5cd264(0x1a2)]),_0x454144=_0x1054f6[_0x5cd264(0x1aa)][_0x593b77[_0x5cd264(0x1a8)]],_0x2554e0=!!_0x454144&&_0x454144['hash']===_0x31ac71,_0x48cc92=!_0x120084&&_0x2554e0?'unchanged':_0x5cd264(0x174);_0x1a2a65[_0x5cd264(0x18d)]({'lockKey':_0x593b77[_0x5cd264(0x1a8)],'filePath':_0x593b77[_0x5cd264(0x1a2)],'remoteId':_0x454144?.[_0x5cd264(0x185)]??null,'mode':_0x454144?.['remoteId']?_0x5cd264(0x195):_0x5cd264(0x186),'status':_0x48cc92});if(_0x48cc92===_0x5cd264(0x174))_0xee1df0[_0x5cd264(0x18d)](_0x593b77[_0x5cd264(0x1c2)]);}return{'method':_0x5cd264(0x177),'url':_0x5cd264(0x19f),'deploymentSync':buildAutomaticDeploymentSyncPreview(_0x3c4243,_0x5cd264(0x19a),_0xee1df0),'body':{'appCode':_0x3c4243[_0x5cd264(0x1ad)],'force':_0x120084,'files':_0x1a2a65,'cacheClearAtRuntime':_0x1a2a65[_0x5cd264(0x189)](_0x23b811=>_0x23b811[_0x5cd264(0x17f)]===_0x5cd264(0x174)),'cacheClearAtRuntimeTimes':_0x1a2a65[_0x5cd264(0x189)](_0x3f6062=>_0x3f6062[_0x5cd264(0x17f)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x5cd264(0x1c5)+_0x1a2a65['length']+_0x5cd264(0x1b6)};},async 'execute'(_0x366cec){const _0x237d90=a37_0x7cb864,_0x4972b2=loadBffProjectConfig(_0x366cec[_0x237d90(0x1ad)]),_0x5a8899=await readBffLockFile(_0x4972b2[_0x237d90(0x17e)]),{lockData:_0x45eb9c,appLock:_0x30e36f}=ensureLockScope(_0x5a8899??createEmptyBffLock(),_0x366cec[_0x237d90(0x1ad)],_0x4972b2['scriptsRoot'],_0x237d90(0x18d)),_0x329554=await getTargetFunctions(_0x4972b2,_0x366cec);if(_0x329554[_0x237d90(0x1b5)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x237d90(0x18b)};const _0x47586e=_0x366cec[_0x237d90(0x183)](_0x237d90(0x1c4)),_0x3245e8=JSON['parse'](JSON[_0x237d90(0x1a3)](_0x45eb9c)),_0x159abc=_0x3245e8[_0x237d90(0x180)][_0x366cec[_0x237d90(0x1ad)]];if(!_0x159abc)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x366cec[_0x237d90(0x1ad)]+_0x237d90(0x1a7));const _0x1853f3=await buildHookMaps(_0x366cec[_0x237d90(0x1ad)],_0x366cec[_0x237d90(0x196)],_0x329554,_0x159abc),_0x18e755=[],_0x4b3f77=[],_0x202c63=[],_0x4abe18=[];for(const _0x57bc10 of _0x329554){const _0x4dc89e=await computeFileHash(_0x57bc10[_0x237d90(0x1a2)]),_0x369fa7=_0x159abc['functions'][_0x57bc10['lockKey']];if(!_0x47586e&&_0x369fa7&&_0x369fa7[_0x237d90(0x18a)]===_0x4dc89e){_0x202c63[_0x237d90(0x18d)]({'lockKey':_0x57bc10['lockKey'],'reason':_0x237d90(0x1b2)});continue;}try{await uploadSingleFunction(_0x366cec[_0x237d90(0x1ad)],_0x57bc10,_0x159abc,_0x1853f3);const _0xe99886=_0x159abc['functions'][_0x57bc10[_0x237d90(0x1a8)]];_0x18e755[_0x237d90(0x18d)]({'lockKey':_0x57bc10[_0x237d90(0x1a8)],'remoteId':_0xe99886?.['remoteId']??0x0}),_0x4b3f77[_0x237d90(0x18d)](_0x57bc10['name']);}catch(_0x5ddbca){_0x4abe18['push']({'lockKey':_0x57bc10[_0x237d90(0x1a8)],'error':_0x5ddbca instanceof Error?_0x5ddbca['message']:String(_0x5ddbca)});}}_0x159abc[_0x237d90(0x17c)]=new Date()[_0x237d90(0x19c)](),await writeBffLockFile(_0x4972b2[_0x237d90(0x17e)],_0x3245e8),await waitForUploadedLockEntries(_0x4972b2[_0x237d90(0x17e)],_0x366cec['appCode'],_0x18e755['map'](_0x3f7eea=>_0x3f7eea[_0x237d90(0x1a8)]));let _0x320921={'attempted':![],'cleared':![]};if(_0x18e755[_0x237d90(0x1b5)]>0x0)try{let _0x2eef76='';for(let _0x3ca278=0x0;_0x3ca278<CACHE_CLEAR_ATTEMPTS;_0x3ca278+=0x1){_0x2eef76=await clearBffScriptCache(),_0x3ca278<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x320921={'attempted':!![],'cleared':!![],'message':_0x2eef76||_0x237d90(0x1be)};}catch(_0x29f167){_0x320921={'attempted':!![],'cleared':![],'error':_0x29f167 instanceof Error?_0x29f167[_0x237d90(0x1ae)]:String(_0x29f167)};}const _0x40ec05=_0x4abe18[_0x237d90(0x1b5)]===0x0&&(_0x320921[_0x237d90(0x191)]?_0x320921['cleared']:!![]),_0x1a7643=await runAutomaticDeploymentSync(_0x366cec,_0x237d90(0x19a),_0x4b3f77,_0x40ec05),_0x227ccb=_0x40ec05&&automaticDeploymentSyncSucceeded(_0x1a7643),_0x57c8dc=_0x320921[_0x237d90(0x191)]?_0x320921[_0x237d90(0x1a4)]?_0x237d90(0x17a):_0x237d90(0x1b8):_0x237d90(0x1c7),_0x4a370d=_0x1a7643['configured']?',\x20deployment\x20sync\x20'+_0x1a7643['status']:'';return{'ok':_0x227ccb,'data':{'uploaded':_0x18e755,'skipped':_0x202c63,'failed':_0x4abe18,'cacheClear':_0x320921,'deploymentSync':_0x1a7643},'message':_0x237d90(0x1b7)+_0x18e755[_0x237d90(0x1b5)]+_0x237d90(0x178)+_0x202c63[_0x237d90(0x1b5)]+_0x237d90(0x18f)+_0x4abe18['length']+'\x20failed,\x20'+_0x57c8dc+_0x4a370d};}};async function getTargetFunctions(_0x31a53e,_0x30a764){const _0x1d8aa7=a37_0x7cb864,_0x360101=_0x30a764['str']('type'),_0x3d7dd9=_0x30a764[_0x1d8aa7(0x176)](_0x1d8aa7(0x1c2)),_0x4eba5b=normalizeBffType(_0x360101)??undefined;if(_0x3d7dd9&&!_0x4eba5b)throw CliErrors['validation'](_0x1d8aa7(0x1ab));const _0x5b6b90=await scanLocalBffFunctions(_0x31a53e,_0x4eba5b);if(_0x3d7dd9){const _0x35f64f=_0x5b6b90[_0x1d8aa7(0x1a0)](_0x2722b3=>_0x2722b3[_0x1d8aa7(0x1c2)]===_0x3d7dd9);if(_0x35f64f[_0x1d8aa7(0x1b5)]===0x0)throw CliErrors[_0x1d8aa7(0x192)](_0x1d8aa7(0x1bc)+_0x4eba5b+'/'+_0x3d7dd9);return _0x35f64f;}return _0x5b6b90;}async function buildHookMaps(_0x1eba3b,_0x5f2d2f,_0x5cf788,_0xba94fb){const _0x3d0f38=a37_0x7cb864,_0x36400e=_0x5cf788[_0x3d0f38(0x189)](_0x3d0d26=>_0x3d0d26['type']===_0x3d0f38(0x18c));if(!_0x36400e)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x5ce253=loadAliasMap(_0x5f2d2f,undefined,resolveApiFilePath(_0x5f2d2f,_0x1eba3b)),_0x4d87f3=new Map(_0x5ce253[_0x3d0f38(0x1b9)](_0x32b2dd=>[_0x32b2dd[_0x3d0f38(0x1c0)],_0x32b2dd[_0x3d0f38(0x1ba)]]));for(const _0x365073 of Object['values'](_0xba94fb[_0x3d0f38(0x1aa)])){_0x365073[_0x3d0f38(0x1c0)]&&_0x365073[_0x3d0f38(0x1ba)]&&!_0x4d87f3[_0x3d0f38(0x1c8)](_0x365073[_0x3d0f38(0x1c0)])&&_0x4d87f3[_0x3d0f38(0x197)](_0x365073[_0x3d0f38(0x1c0)],_0x365073['datasetCode']);}const _0x4fd6cb=await listDatasets(_0x1eba3b),_0x2c6d32=new Map(_0x4fd6cb[_0x3d0f38(0x1b9)](_0x438497=>[_0x438497[_0x3d0f38(0x182)],_0x438497]));return{'aliasToDatasetCode':_0x4d87f3,'datasetCodeToDataset':_0x2c6d32};}async function uploadSingleFunction(_0x5adfbc,_0x419ea4,_0x16c30e,_0x44329d){const _0x28cdef=a37_0x7cb864,_0x2dea32=await readFile(_0x419ea4['filePath'],'utf8'),_0x3afc90=await computeFileHash(_0x419ea4[_0x28cdef(0x1a2)]),_0x3995ed=_0x16c30e[_0x28cdef(0x1aa)][_0x419ea4[_0x28cdef(0x1a8)]];if(_0x3995ed?.[_0x28cdef(0x185)]&&_0x3995ed['version']==null)throw CliErrors[_0x28cdef(0x192)](_0x419ea4['lockKey']+_0x28cdef(0x184));let _0x930346=extractScriptDescription(_0x2dea32);if(!_0x930346&&_0x3995ed?.[_0x28cdef(0x185)]){const _0x3a1920=await getBffScriptInfo(_0x3995ed[_0x28cdef(0x185)]);_0x930346=_0x3a1920[_0x28cdef(0x18e)]||undefined;}const _0x39df36={'appCode':_0x5adfbc,'functionName':_0x419ea4[_0x28cdef(0x1c2)],'scriptType':_0x419ea4[_0x28cdef(0x179)],'scriptContent':_0x2dea32};if(_0x3995ed?.['remoteId'])_0x39df36['id']=_0x3995ed[_0x28cdef(0x185)];if(_0x3995ed?.['version']!=null)_0x39df36['version']=_0x3995ed[_0x28cdef(0x188)];if(_0x930346)_0x39df36[_0x28cdef(0x18e)]=_0x930346;if(_0x419ea4[_0x28cdef(0x179)]===_0x28cdef(0x18c)){const _0x43b095=_0x419ea4[_0x28cdef(0x1c0)];if(!_0x43b095||!_0x419ea4[_0x28cdef(0x175)]||!_0x419ea4['functionNode'])throw CliErrors[_0x28cdef(0x192)](_0x28cdef(0x1c3)+_0x419ea4['lockKey']);const _0x4353d4=_0x44329d[_0x28cdef(0x194)][_0x28cdef(0x1b3)](_0x43b095)??_0x3995ed?.[_0x28cdef(0x1ba)]??_0x43b095,_0x39b821=_0x44329d['datasetCodeToDataset'][_0x28cdef(0x1b3)](_0x4353d4);if(!_0x39b821)throw CliErrors[_0x28cdef(0x192)](_0x28cdef(0x1c9)+_0x43b095+_0x28cdef(0x1af)+(_0x28cdef(0x1c6)+CLI_BIN_NAME+_0x28cdef(0x199)));_0x39df36['datasetId']=_0x39b821['id'],_0x39df36[_0x28cdef(0x175)]=_0x419ea4[_0x28cdef(0x175)],_0x39df36[_0x28cdef(0x19b)]=_0x419ea4['functionNode'];}const _0x2b6701=await saveBffScript(_0x39df36),_0x4f6a6b=_0x2b6701['id'],_0x17b5e6=_0x2b6701[_0x28cdef(0x190)]??await getBffScriptInfo(_0x4f6a6b),_0x1c381a={'hash':_0x3afc90,'remoteId':_0x4f6a6b,'version':_0x17b5e6[_0x28cdef(0x188)]};if(_0x419ea4[_0x28cdef(0x179)]==='HOOK'){const _0x21dd91=_0x419ea4[_0x28cdef(0x1c0)],_0x5b81c9=_0x44329d[_0x28cdef(0x194)][_0x28cdef(0x1b3)](_0x21dd91)??_0x3995ed?.[_0x28cdef(0x1ba)]??_0x21dd91;_0x44329d[_0x28cdef(0x194)]['has'](_0x21dd91)?_0x1c381a['alias']=_0x21dd91:_0x1c381a[_0x28cdef(0x1c0)]=_0x3995ed?.[_0x28cdef(0x1c0)],_0x1c381a[_0x28cdef(0x1ba)]=_0x5b81c9,_0x1c381a[_0x28cdef(0x175)]=_0x419ea4['operationType'],_0x1c381a[_0x28cdef(0x19b)]=_0x419ea4[_0x28cdef(0x19b)];}_0x16c30e[_0x28cdef(0x1aa)][_0x419ea4[_0x28cdef(0x1a8)]]=_0x1c381a;}function a37_0x4919(_0x473ac7,_0xe50a57){_0x473ac7=_0x473ac7-0x174;const _0x4c09b5=a37_0x4c09();let _0x491971=_0x4c09b5[_0x473ac7];return _0x491971;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x2f2d93,_0x48eafe,_0x1e2a69){const _0x1feb13=a37_0x7cb864;if(_0x1e2a69[_0x1feb13(0x1b5)]===0x0)return;for(let _0x500e17=0x0;_0x500e17<LOCK_SETTLE_RETRY_COUNT;_0x500e17+=0x1){const _0x686382=await readBffLockFile(_0x2f2d93),_0x5126b2=_0x686382?.[_0x1feb13(0x180)]?.[_0x48eafe]?.['functions']??{},_0x5eafa8=_0x1e2a69[_0x1feb13(0x1bd)](_0x274dfe=>!!_0x5126b2[_0x274dfe]?.['remoteId']);if(_0x5eafa8)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x1feb13(0x1b4)+_0x1e2a69[_0x1feb13(0x1bb)](',\x20')+'.');}
|
|
1
|
+
const a37_0x13702=a37_0x247b;function a37_0x247b(_0x58a767,_0x45a558){_0x58a767=_0x58a767-0x11c;const _0x33dbd0=a37_0x33db();let _0x247b17=_0x33dbd0[_0x58a767];return _0x247b17;}(function(_0x4018e9,_0x5a70a1){const _0x2aea27=a37_0x247b,_0x6626c4=_0x4018e9();while(!![]){try{const _0x467f48=-parseInt(_0x2aea27(0x135))/0x1+parseInt(_0x2aea27(0x168))/0x2+-parseInt(_0x2aea27(0x144))/0x3*(-parseInt(_0x2aea27(0x160))/0x4)+parseInt(_0x2aea27(0x13c))/0x5*(parseInt(_0x2aea27(0x167))/0x6)+-parseInt(_0x2aea27(0x15f))/0x7*(parseInt(_0x2aea27(0x159))/0x8)+parseInt(_0x2aea27(0x123))/0x9+-parseInt(_0x2aea27(0x14b))/0xa*(-parseInt(_0x2aea27(0x128))/0xb);if(_0x467f48===_0x5a70a1)break;else _0x6626c4['push'](_0x6626c4['shift']());}catch(_0x229aee){_0x6626c4['push'](_0x6626c4['shift']());}}}(a37_0x33db,0x61ed3));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';function a37_0x33db(){const _0x157165=['Runtime\x20script\x20cache\x20cleared.','type','force','758673VcnDOH','validation','attempted','runtime\x20cache\x20clear\x20failed','script','2233jWaWnE','\x20uploaded,\x20','Force\x20push\x20ignoring\x20hash\x20protection','filter','get','datasetCodeToDataset','alias','code','HOOK','unchanged','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','stringify','POST','294914SBLMQw','runtime\x20cache\x20cleared','remoteId','filePath','str','write','status','3240705CeWVTD','aliasToDatasetCode','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','bool','values','would_push','toISOString','create','490437JJMZvs','lockKey','name','string','\x20skipped,\x20','parse','hash','3360LniInW','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','Incomplete\x20HOOK\x20path:\x20','operationType','Would\x20inspect\x20','bff','lastSync','cleared','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','functionNode','datasetId','map','Run\x20`','push','80NcUkRu','Push\x20only\x20this\x20script\x20type','lockFilePath','Cannot\x20resolve\x20dataset\x20for\x20\x22','COMMON','datasetCode','541569YoubYd','12oFHhco','has','\x20failed,\x20','some','apps','appCode','description','6wGBFIU','357216mWnEqS',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','ENDPOINT','No\x20local\x20Backend\x20Function\x20scripts\x20found.','Local\x20function\x20not\x20found:\x20','functions','Lock\x20scope\x20for\x20app\x20\x22','message','version','Push\x20complete:\x20','length'];a37_0x33db=function(){return _0x157165;};return a37_0x33db();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{automaticDeploymentSyncSucceeded,buildAutomaticDeploymentSyncPreview,runAutomaticDeploymentSync}from'../../commands/deployment/auto-sync.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a37_0x13702(0x150),'command':a37_0x13702(0x158),'description':a37_0x13702(0x13e),'risk':a37_0x13702(0x13a),'flags':[{'name':a37_0x13702(0x121),'type':a37_0x13702(0x147),'description':a37_0x13702(0x15a),'enum':[a37_0x13702(0x15d),a37_0x13702(0x16a),a37_0x13702(0x130)]},{'name':'name','type':a37_0x13702(0x147),'description':a37_0x13702(0x14c)},{'name':a37_0x13702(0x122),'type':'boolean','description':a37_0x13702(0x12a)}],async 'dryRun'(_0x4cbe98){const _0x329f81=a37_0x13702,_0x3b9ee8=loadBffProjectConfig(_0x4cbe98['appCode']),_0x5b0528=await readBffLockFile(_0x3b9ee8[_0x329f81(0x15b)]),{appLock:_0x427738}=ensureLockScope(_0x5b0528??createEmptyBffLock(),_0x4cbe98[_0x329f81(0x165)],_0x3b9ee8['scriptsRoot'],_0x329f81(0x158)),_0x41ef4d=await getTargetFunctions(_0x3b9ee8,_0x4cbe98),_0x43c9ce=_0x4cbe98['bool'](_0x329f81(0x122)),_0x48b86d=[],_0x22c99e=[];for(const _0x588450 of _0x41ef4d){const _0x1da1c1=await computeFileHash(_0x588450['filePath']),_0x1f16d3=_0x427738['functions'][_0x588450[_0x329f81(0x145)]],_0x571ef8=!!_0x1f16d3&&_0x1f16d3[_0x329f81(0x14a)]===_0x1da1c1,_0x7d13f1=!_0x43c9ce&&_0x571ef8?_0x329f81(0x131):'would_push';_0x48b86d[_0x329f81(0x158)]({'lockKey':_0x588450['lockKey'],'filePath':_0x588450[_0x329f81(0x138)],'remoteId':_0x1f16d3?.[_0x329f81(0x137)]??null,'mode':_0x1f16d3?.[_0x329f81(0x137)]?'update':_0x329f81(0x143),'status':_0x7d13f1});if(_0x7d13f1===_0x329f81(0x141))_0x22c99e['push'](_0x588450[_0x329f81(0x146)]);}return{'method':_0x329f81(0x134),'url':'/api/management/library/scripts/save','deploymentSync':buildAutomaticDeploymentSyncPreview('bff',_0x22c99e),'body':{'appCode':_0x4cbe98[_0x329f81(0x165)],'force':_0x43c9ce,'files':_0x48b86d,'cacheClearAtRuntime':_0x48b86d[_0x329f81(0x163)](_0x1da72c=>_0x1da72c[_0x329f81(0x13b)]===_0x329f81(0x141)),'cacheClearAtRuntimeTimes':_0x48b86d[_0x329f81(0x163)](_0x383358=>_0x383358[_0x329f81(0x13b)]===_0x329f81(0x141))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x329f81(0x14f)+_0x48b86d[_0x329f81(0x11f)]+'\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded'};},async 'execute'(_0x54a4f2){const _0x30e520=a37_0x13702,_0x32fe4f=loadBffProjectConfig(_0x54a4f2[_0x30e520(0x165)]),_0x46db63=await readBffLockFile(_0x32fe4f['lockFilePath']),{lockData:_0x5aa97e,appLock:_0x290ef0}=ensureLockScope(_0x46db63??createEmptyBffLock(),_0x54a4f2[_0x30e520(0x165)],_0x32fe4f['scriptsRoot'],'push'),_0x240a9f=await getTargetFunctions(_0x32fe4f,_0x54a4f2);if(_0x240a9f[_0x30e520(0x11f)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x30e520(0x16b)};const _0x20d019=_0x54a4f2[_0x30e520(0x13f)](_0x30e520(0x122)),_0x4e2c95=JSON[_0x30e520(0x149)](JSON[_0x30e520(0x133)](_0x5aa97e)),_0x5274e4=_0x4e2c95[_0x30e520(0x164)][_0x54a4f2[_0x30e520(0x165)]];if(!_0x5274e4)throw new Error(_0x30e520(0x16e)+_0x54a4f2[_0x30e520(0x165)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x438510=await buildHookMaps(_0x54a4f2[_0x30e520(0x165)],_0x54a4f2['apiDir'],_0x240a9f,_0x5274e4),_0x33da3b=[],_0x4ef865=[],_0x5d8af8=[],_0x4f77a5=[];for(const _0x235c7e of _0x240a9f){const _0x21b9fe=await computeFileHash(_0x235c7e[_0x30e520(0x138)]),_0x27e26e=_0x5274e4[_0x30e520(0x16d)][_0x235c7e[_0x30e520(0x145)]];if(!_0x20d019&&_0x27e26e&&_0x27e26e[_0x30e520(0x14a)]===_0x21b9fe){_0x5d8af8[_0x30e520(0x158)]({'lockKey':_0x235c7e[_0x30e520(0x145)],'reason':_0x30e520(0x131)});continue;}try{await uploadSingleFunction(_0x54a4f2[_0x30e520(0x165)],_0x235c7e,_0x5274e4,_0x438510);const _0x2ef55d=_0x5274e4[_0x30e520(0x16d)][_0x235c7e[_0x30e520(0x145)]];_0x33da3b[_0x30e520(0x158)]({'lockKey':_0x235c7e['lockKey'],'remoteId':_0x2ef55d?.[_0x30e520(0x137)]??0x0}),_0x4ef865['push'](_0x235c7e[_0x30e520(0x146)]);}catch(_0x2df9f4){_0x4f77a5[_0x30e520(0x158)]({'lockKey':_0x235c7e['lockKey'],'error':_0x2df9f4 instanceof Error?_0x2df9f4['message']:String(_0x2df9f4)});}}_0x5274e4[_0x30e520(0x151)]=new Date()[_0x30e520(0x142)](),await writeBffLockFile(_0x32fe4f[_0x30e520(0x15b)],_0x4e2c95),await waitForUploadedLockEntries(_0x32fe4f[_0x30e520(0x15b)],_0x54a4f2[_0x30e520(0x165)],_0x33da3b[_0x30e520(0x156)](_0x20fbd7=>_0x20fbd7['lockKey']));let _0x3ccba1={'attempted':![],'cleared':![]};if(_0x33da3b['length']>0x0)try{let _0x406e1a='';for(let _0x2bac44=0x0;_0x2bac44<CACHE_CLEAR_ATTEMPTS;_0x2bac44+=0x1){_0x406e1a=await clearBffScriptCache(),_0x2bac44<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x3ccba1={'attempted':!![],'cleared':!![],'message':_0x406e1a||_0x30e520(0x120)};}catch(_0x54d5c5){_0x3ccba1={'attempted':!![],'cleared':![],'error':_0x54d5c5 instanceof Error?_0x54d5c5[_0x30e520(0x11c)]:String(_0x54d5c5)};}const _0x1cf24b=_0x4f77a5[_0x30e520(0x11f)]===0x0&&(_0x3ccba1['attempted']?_0x3ccba1[_0x30e520(0x152)]:!![]),_0x301f3a=await runAutomaticDeploymentSync(_0x54a4f2,_0x30e520(0x150),_0x4ef865,_0x1cf24b),_0x2f7fe5=_0x1cf24b&&automaticDeploymentSyncSucceeded(_0x301f3a),_0x729361=_0x3ccba1[_0x30e520(0x125)]?_0x3ccba1[_0x30e520(0x152)]?_0x30e520(0x136):_0x30e520(0x126):'runtime\x20cache\x20not\x20needed',_0x550163=',\x20deployment\x20sync\x20'+_0x301f3a[_0x30e520(0x13b)];return{'ok':_0x2f7fe5,'data':{'uploaded':_0x33da3b,'skipped':_0x5d8af8,'failed':_0x4f77a5,'cacheClear':_0x3ccba1,'deploymentSync':_0x301f3a},'message':_0x30e520(0x11e)+_0x33da3b[_0x30e520(0x11f)]+_0x30e520(0x129)+_0x5d8af8[_0x30e520(0x11f)]+_0x30e520(0x148)+_0x4f77a5[_0x30e520(0x11f)]+_0x30e520(0x162)+_0x729361+_0x550163};}};async function getTargetFunctions(_0x9f8d59,_0x5d4893){const _0x469666=a37_0x13702,_0x3a64bf=_0x5d4893[_0x469666(0x139)](_0x469666(0x121)),_0x12ca06=_0x5d4893['str']('name'),_0x3dafeb=normalizeBffType(_0x3a64bf)??undefined;if(_0x12ca06&&!_0x3dafeb)throw CliErrors[_0x469666(0x124)](_0x469666(0x153));const _0x337a8c=await scanLocalBffFunctions(_0x9f8d59,_0x3dafeb);if(_0x12ca06){const _0x207791=_0x337a8c[_0x469666(0x12b)](_0x1715ef=>_0x1715ef[_0x469666(0x146)]===_0x12ca06);if(_0x207791[_0x469666(0x11f)]===0x0)throw CliErrors[_0x469666(0x124)](_0x469666(0x16c)+_0x3dafeb+'/'+_0x12ca06);return _0x207791;}return _0x337a8c;}async function buildHookMaps(_0x4e58dd,_0x12bee6,_0x3259d1,_0xf10b02){const _0x25f138=a37_0x13702,_0x2b0217=_0x3259d1[_0x25f138(0x163)](_0x461f6b=>_0x461f6b[_0x25f138(0x121)]==='HOOK');if(!_0x2b0217)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x5547be=loadAliasMap(_0x12bee6,undefined,resolveApiFilePath(_0x12bee6,_0x4e58dd)),_0x59a7c4=new Map(_0x5547be['map'](_0x20f748=>[_0x20f748[_0x25f138(0x12e)],_0x20f748[_0x25f138(0x15e)]]));for(const _0x85d366 of Object[_0x25f138(0x140)](_0xf10b02[_0x25f138(0x16d)])){_0x85d366['alias']&&_0x85d366['datasetCode']&&!_0x59a7c4[_0x25f138(0x161)](_0x85d366[_0x25f138(0x12e)])&&_0x59a7c4['set'](_0x85d366[_0x25f138(0x12e)],_0x85d366[_0x25f138(0x15e)]);}const _0x4c1f51=await listDatasets(_0x4e58dd),_0x2bd902=new Map(_0x4c1f51[_0x25f138(0x156)](_0xa2aec5=>[_0xa2aec5[_0x25f138(0x12f)],_0xa2aec5]));return{'aliasToDatasetCode':_0x59a7c4,'datasetCodeToDataset':_0x2bd902};}async function uploadSingleFunction(_0x89fe8,_0x354875,_0x1db980,_0x1d9529){const _0x4e5433=a37_0x13702,_0x25900c=await readFile(_0x354875[_0x4e5433(0x138)],'utf8'),_0x2856e3=await computeFileHash(_0x354875[_0x4e5433(0x138)]),_0x5798b9=_0x1db980[_0x4e5433(0x16d)][_0x354875['lockKey']];if(_0x5798b9?.[_0x4e5433(0x137)]&&_0x5798b9[_0x4e5433(0x11d)]==null)throw CliErrors[_0x4e5433(0x124)](_0x354875[_0x4e5433(0x145)]+_0x4e5433(0x169));let _0xd0b86c=extractScriptDescription(_0x25900c);if(!_0xd0b86c&&_0x5798b9?.[_0x4e5433(0x137)]){const _0xd1569c=await getBffScriptInfo(_0x5798b9['remoteId']);_0xd0b86c=_0xd1569c[_0x4e5433(0x166)]||undefined;}const _0x250244={'appCode':_0x89fe8,'functionName':_0x354875[_0x4e5433(0x146)],'scriptType':_0x354875['type'],'scriptContent':_0x25900c};if(_0x5798b9?.[_0x4e5433(0x137)])_0x250244['id']=_0x5798b9['remoteId'];if(_0x5798b9?.[_0x4e5433(0x11d)]!=null)_0x250244[_0x4e5433(0x11d)]=_0x5798b9[_0x4e5433(0x11d)];if(_0xd0b86c)_0x250244[_0x4e5433(0x166)]=_0xd0b86c;if(_0x354875[_0x4e5433(0x121)]===_0x4e5433(0x130)){const _0x19e51a=_0x354875[_0x4e5433(0x12e)];if(!_0x19e51a||!_0x354875[_0x4e5433(0x14e)]||!_0x354875[_0x4e5433(0x154)])throw CliErrors['validation'](_0x4e5433(0x14d)+_0x354875[_0x4e5433(0x145)]);const _0x3ff378=_0x1d9529[_0x4e5433(0x13d)]['get'](_0x19e51a)??_0x5798b9?.['datasetCode']??_0x19e51a,_0x549fa5=_0x1d9529[_0x4e5433(0x12d)]['get'](_0x3ff378);if(!_0x549fa5)throw CliErrors['validation'](_0x4e5433(0x15c)+_0x19e51a+'\x22.\x20'+(_0x4e5433(0x157)+CLI_BIN_NAME+_0x4e5433(0x132)));_0x250244[_0x4e5433(0x155)]=_0x549fa5['id'],_0x250244['operationType']=_0x354875[_0x4e5433(0x14e)],_0x250244[_0x4e5433(0x154)]=_0x354875[_0x4e5433(0x154)];}const _0x11c65f=await saveBffScript(_0x250244),_0x1ee8c1=_0x11c65f['id'],_0x23dbb1=_0x11c65f[_0x4e5433(0x127)]??await getBffScriptInfo(_0x1ee8c1),_0x939777={'hash':_0x2856e3,'remoteId':_0x1ee8c1,'version':_0x23dbb1[_0x4e5433(0x11d)]};if(_0x354875[_0x4e5433(0x121)]===_0x4e5433(0x130)){const _0x5f2061=_0x354875[_0x4e5433(0x12e)],_0x5eb8f6=_0x1d9529['aliasToDatasetCode'][_0x4e5433(0x12c)](_0x5f2061)??_0x5798b9?.[_0x4e5433(0x15e)]??_0x5f2061;_0x1d9529[_0x4e5433(0x13d)][_0x4e5433(0x161)](_0x5f2061)?_0x939777['alias']=_0x5f2061:_0x939777[_0x4e5433(0x12e)]=_0x5798b9?.[_0x4e5433(0x12e)],_0x939777[_0x4e5433(0x15e)]=_0x5eb8f6,_0x939777[_0x4e5433(0x14e)]=_0x354875[_0x4e5433(0x14e)],_0x939777[_0x4e5433(0x154)]=_0x354875[_0x4e5433(0x154)];}_0x1db980['functions'][_0x354875['lockKey']]=_0x939777;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x218248,_0x2a0f2a,_0xc6f71d){const _0x59adb4=a37_0x13702;if(_0xc6f71d[_0x59adb4(0x11f)]===0x0)return;for(let _0x6e0497=0x0;_0x6e0497<LOCK_SETTLE_RETRY_COUNT;_0x6e0497+=0x1){const _0x44ae2e=await readBffLockFile(_0x218248),_0x2e6394=_0x44ae2e?.[_0x59adb4(0x164)]?.[_0x2a0f2a]?.['functions']??{},_0x562294=_0xc6f71d['every'](_0x7a86a9=>!!_0x2e6394[_0x7a86a9]?.['remoteId']);if(_0x562294)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0xc6f71d['join'](',\x20')+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a38_0x373cbd=a38_0x482b;(function(_0x344bfe,_0x557b5c){const _0x12306e=a38_0x482b,_0x87b3c8=_0x344bfe();while(!![]){try{const _0x4f8c1b=-parseInt(_0x12306e(0xfe))/0x1*(-parseInt(_0x12306e(0x113))/0x2)+parseInt(_0x12306e(0x106))/0x3+parseInt(_0x12306e(0x103))/0x4+parseInt(_0x12306e(0xf3))/0x5+parseInt(_0x12306e(0x10b))/0x6*(parseInt(_0x12306e(0xf5))/0x7)+parseInt(_0x12306e(0x10c))/0x8+-parseInt(_0x12306e(0xfc))/0x9;if(_0x4f8c1b===_0x557b5c)break;else _0x87b3c8['push'](_0x87b3c8['shift']());}catch(_0x409279){_0x87b3c8['push'](_0x87b3c8['shift']());}}}(a38_0x47c9,0x8c6c3));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';function a38_0x47c9(){const _0x2ce4ba=['lockKey','7ZgrszF','alias','bff','scriptsRoot','map','datasetCode','all','30148551oGfpse','bool','185DoTlEt','filePath','length','functions','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','2508948IVYfwb','Check\x20local\x20Backend\x20Function\x20sync\x20status\x20against\x20lock\x20file','remote','752787QJHguu','\x20modified,\x20','has','lockFilePath','\x20added,\x20','6715812Yeqsxv','3564400XxQeGS','status','push','\x20remote-only','apiDir','boolean','\x20unchanged','6922wdagxZ','read','All\x20Backend\x20Function\x20scripts\x20are\x20in\x20sync.','appCode','4208535mmPKVs'];a38_0x47c9=function(){return _0x2ce4ba;};return a38_0x47c9();}import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';function a38_0x482b(_0x58a54e,_0x3b9a7f){_0x58a54e=_0x58a54e-0xf3;const _0x47c90f=a38_0x47c9();let _0x482bd4=_0x47c90f[_0x58a54e];return _0x482bd4;}import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a38_0x373cbd(0xf7),'command':a38_0x373cbd(0x10d),'description':a38_0x373cbd(0x104),'risk':a38_0x373cbd(0x114),'flags':[{'name':a38_0x373cbd(0x105),'type':a38_0x373cbd(0x111),'description':a38_0x373cbd(0x102)}],async 'execute'(_0xb746f0){const _0x578063=a38_0x373cbd,_0x4d264f=loadBffProjectConfig(_0xb746f0[_0x578063(0x116)]),_0x2597c7=await readBffLockFile(_0x4d264f[_0x578063(0x109)]),{appLock:_0x4c902d}=ensureLockScope(_0x2597c7??createEmptyBffLock(),_0xb746f0['appCode'],_0x4d264f[_0x578063(0xf8)],'status'),_0x33f14e=await scanLocalBffFunctions(_0x4d264f),_0x481ebd=[],_0x1c01f2=[],_0x414b01=[];for(const _0x2856b8 of _0x33f14e){const _0x5353e6=await computeFileHash(_0x2856b8[_0x578063(0xff)]),_0x2a8781=_0x4c902d[_0x578063(0x101)][_0x2856b8[_0x578063(0xf4)]];if(!_0x2a8781)_0x481ebd['push'](_0x2856b8[_0x578063(0xf4)]);else _0x2a8781['hash']!==_0x5353e6?_0x1c01f2[_0x578063(0x10e)](_0x2856b8['lockKey']):_0x414b01[_0x578063(0x10e)](_0x2856b8['lockKey']);}const _0x5f43e3=[];if(_0xb746f0[_0x578063(0xfd)](_0x578063(0x105))){const _0x1459e6=loadAliasMap(_0xb746f0[_0x578063(0x110)],undefined,resolveApiFilePath(_0xb746f0[_0x578063(0x110)],_0xb746f0[_0x578063(0x116)])),_0x3b3e61=new Map(_0x1459e6[_0x578063(0xf9)](_0x326343=>[_0x326343[_0x578063(0xfa)],_0x326343[_0x578063(0xf6)]])),[_0x48e86f,_0x367910]=await Promise[_0x578063(0xfb)]([listBffScripts(_0xb746f0[_0x578063(0x116)]),getBffScriptStatistics(_0xb746f0[_0x578063(0x116)])]),_0x41660d=createHookLocationMap(_0x367910),_0x1f0325=new Set(_0x33f14e[_0x578063(0xf9)](_0x53fd07=>_0x53fd07['lockKey']));for(const _0x163746 of _0x48e86f){const _0x5c4701=resolveRemoteScriptTarget(_0x4d264f,_0x163746,_0x41660d,_0x4c902d['functions'],_0x3b3e61);_0x5c4701&&!_0x1f0325[_0x578063(0x108)](_0x5c4701[_0x578063(0xf4)])&&_0x5f43e3[_0x578063(0x10e)](_0x5c4701[_0x578063(0xf4)]);}}const _0x13ce08=_0x481ebd[_0x578063(0x100)]===0x0&&_0x1c01f2[_0x578063(0x100)]===0x0&&_0x5f43e3['length']===0x0;return{'ok':!![],'data':{'added':_0x481ebd,'modified':_0x1c01f2,'unchanged':_0x414b01,'remoteOnly':_0x5f43e3},'message':_0x13ce08?_0x578063(0x115):_0x481ebd[_0x578063(0x100)]+_0x578063(0x10a)+_0x1c01f2['length']+_0x578063(0x107)+_0x414b01['length']+_0x578063(0x112)+(_0x5f43e3[_0x578063(0x100)]>0x0?',\x20'+_0x5f43e3[_0x578063(0x100)]+_0x578063(0x10f):'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a39_0x367605=a39_0x341b;function a39_0xc6e2(){const _0x24cc0e=['installedPath','3724677iBvGCJ','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','cwd','5022515uWNhnV','cli-skill','1428795SFKhFv','3228lENjxn','info','inherit','11epwrYr','\x20at\x20','skillVersion','setLogPath','error',']:\x20','10XQtCOX','CLI\x20Built-in\x20Skill\x20','6097zTVEFm','4273500DLcssX','\x20via\x20skills@latest','\x20is\x20already\x20current','log','install','3237304VTRTAC','read','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','4bJQcyq','626RGQpwg','\x20installed','Built-in\x20Skill\x20install\x20failed\x20[','nonInteractive','code','changed','3056SZLGUK','cli-skill-install'];a39_0xc6e2=function(){return _0x24cc0e;};return a39_0xc6e2();}function a39_0x341b(_0x23332f,_0x760c86){_0x23332f=_0x23332f-0xad;const _0xc6e219=a39_0xc6e2();let _0x341b99=_0xc6e219[_0x23332f];return _0x341b99;}(function(_0x543e25,_0x4ad1ba){const _0x13f294=a39_0x341b,_0x3a8386=_0x543e25();while(!![]){try{const _0xff288a=-parseInt(_0x13f294(0xb4))/0x1*(parseInt(_0x13f294(0xba))/0x2)+-parseInt(_0x13f294(0xc2))/0x3+-parseInt(_0x13f294(0xb3))/0x4*(-parseInt(_0x13f294(0xc0))/0x5)+-parseInt(_0x13f294(0xc3))/0x6*(-parseInt(_0x13f294(0xce))/0x7)+parseInt(_0x13f294(0xb0))/0x8+-parseInt(_0x13f294(0xbd))/0x9*(-parseInt(_0x13f294(0xcc))/0xa)+-parseInt(_0x13f294(0xc6))/0xb*(parseInt(_0x13f294(0xcf))/0xc);if(_0xff288a===_0x4ad1ba)break;else _0x3a8386['push'](_0x3a8386['shift']());}catch(_0x579866){_0x3a8386['push'](_0x3a8386['shift']());}}}(a39_0xc6e2,0x7abab));import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a39_0x367605(0xc1),'command':a39_0x367605(0xaf),'description':a39_0x367605(0xbe),'risk':a39_0x367605(0xb1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x38e441){const _0x12b897=a39_0x367605;logger[_0x12b897(0xc9)](process[_0x12b897(0xbf)]()),logger[_0x12b897(0xc4)](_0x12b897(0xbb),'Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.');const _0x3ccd37=installBuiltinSkill({'stdio':_0x38e441[_0x12b897(0xb7)]?'pipe':_0x12b897(0xc5)});if(!_0x3ccd37['ok'])throw CliErrors['apiError'](_0x12b897(0xb6)+_0x3ccd37[_0x12b897(0xb8)]+_0x12b897(0xcb)+(_0x3ccd37[_0x12b897(0xca)]||'unknown'),_0x12b897(0xb2)+_0x3ccd37['repairCommand']);return console[_0x12b897(0xae)](_0x3ccd37[_0x12b897(0xb9)]?_0x12b897(0xcd)+_0x3ccd37['skillVersion']+_0x12b897(0xb5)+(_0x3ccd37[_0x12b897(0xbc)]?_0x12b897(0xc7)+_0x3ccd37[_0x12b897(0xbc)]:_0x12b897(0xd0)):'CLI\x20Built-in\x20Skill\x20'+_0x3ccd37[_0x12b897(0xc8)]+_0x12b897(0xad)+(_0x3ccd37[_0x12b897(0xbc)]?'\x20at\x20'+_0x3ccd37[_0x12b897(0xbc)]:'')),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a40_0x7e82=a40_0x39a6;(function(_0x2e8e83,_0x137daf){const _0x486872=a40_0x39a6,_0x26942b=_0x2e8e83();while(!![]){try{const _0x590ba1=-parseInt(_0x486872(0x180))/0x1+-parseInt(_0x486872(0x14b))/0x2*(parseInt(_0x486872(0x170))/0x3)+parseInt(_0x486872(0x15e))/0x4+-parseInt(_0x486872(0x16c))/0x5+-parseInt(_0x486872(0x195))/0x6+parseInt(_0x486872(0x158))/0x7+parseInt(_0x486872(0x187))/0x8*(parseInt(_0x486872(0x150))/0x9);if(_0x590ba1===_0x137daf)break;else _0x26942b['push'](_0x26942b['shift']());}catch(_0x3c9c26){_0x26942b['push'](_0x26942b['shift']());}}}(a40_0x1e09,0xbd7f3));import a40_0x5ca547 from'chalk';import a40_0x125fda from'ora';import a40_0x33b70b 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 a40_0x1e09(){const _0x28c51f=['repairCommand','Current\x20version:\x20','current','str','log','\x20install\x20-g\x20','\x20\x20Try\x20manually:\x20','filter','2142588KpWfNP','error','entries','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','https://registry.npmjs.org/-/package/','Already\x20on\x20requested\x20version\x20(v','install','72SQPVvE','warn','message','\x20\x20Run\x20manually:\x20','\x20cli-skill\x20install','18NyIius','bool','Updated\x20to\x20v','green',',\x20state\x20','Already\x20up\x20to\x20date\x20(v','gray','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','9435153DFrMlo','valid','Updating\x20via\x20','Version\x20comparison\x20failed','version','red','3799068mtkTRt','start','slice','bun','boolean','includes','code','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','latest','expected\x20','json','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','\x20→\x20','execPath','6931620eqPReB','yellow','\x20is\x20up\x20to\x20date.','fail','110163aEfMuM','toLowerCase','\x20is\x20newer\x20than\x20npm\x20latest\x20v','source','read','unknown','Current\x20version\x20v','object','Beta\x20version:\x20','timeout','state','Install\x20a\x20specific\x20CLI\x20version','succeed','beta','fromEntries','Invalid\x20version:\x20','388657fwufPr','skillVersion','trim','validation',',\x20found\x20','Checking\x20CLI\x20Built-in\x20Skill...','update','7730272EIcYgk','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','string','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','Update\x20available:\x20','run'];a40_0x1e09=function(){return _0x28c51f;};return a40_0x1e09();}function a40_0x39a6(_0x462b6b,_0x2e5a45){_0x462b6b=_0x462b6b-0x148;const _0x1e09ad=a40_0x1e09();let _0x39a6c7=_0x1e09ad[_0x462b6b];return _0x39a6c7;}function getCurrentVersion(){const _0x5d4b74=a40_0x39a6;return GIT_COMMIT!==_0x5d4b74(0x175)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x5d4b74(0x160)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x1f006d=a40_0x39a6,_0x5646b5=process[_0x1f006d(0x16b)][_0x1f006d(0x171)]();if(_0x5646b5[_0x1f006d(0x163)](_0x1f006d(0x161)))return _0x1f006d(0x161);return'npm';}const updateFlags=[{'name':'beta','type':a40_0x7e82(0x162),'description':a40_0x7e82(0x18a),'default':![]},{'name':a40_0x7e82(0x15c),'type':a40_0x7e82(0x189),'description':a40_0x7e82(0x17b)}];function getRequestedVersion(_0x424fc6){const _0x2741a4=a40_0x7e82;return _0x424fc6[_0x2741a4(0x190)]('version')[_0x2741a4(0x182)]();}async function validateUpdateFlags(_0xf778f1){const _0x1e5117=a40_0x7e82,_0x4087fe=_0xf778f1[_0x1e5117(0x151)](_0x1e5117(0x17d)),_0x36f78d=getRequestedVersion(_0xf778f1);if(_0x4087fe&&_0x36f78d)throw CliErrors[_0x1e5117(0x183)](_0x1e5117(0x165),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x36f78d&&!a40_0x33b70b[_0x1e5117(0x159)](_0x36f78d))throw CliErrors[_0x1e5117(0x183)](_0x1e5117(0x17f)+_0x36f78d,_0x1e5117(0x157));}async function fetchNpmDistTags(){const _0x53269d=a40_0x7e82;try{const _0x2bbc07=await fetch(_0x53269d(0x148)+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0x53269d(0x179)](0x2710)});if(!_0x2bbc07['ok'])return null;const _0x10f97b=await _0x2bbc07[_0x53269d(0x168)]();if(!_0x10f97b||typeof _0x10f97b!==_0x53269d(0x177))return null;return Object[_0x53269d(0x17e)](Object[_0x53269d(0x197)](_0x10f97b)[_0x53269d(0x194)](([,_0x4f7517])=>typeof _0x4f7517===_0x53269d(0x189)&&_0x4f7517['trim']()['length']>0x0)['map'](([_0x177286,_0x440ee3])=>[_0x177286,String(_0x440ee3)['trim']()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0xb7f87f){const _0x3000cd=await fetchNpmDistTags();return _0x3000cd?.[_0xb7f87f]??null;}async function fetchLatestVersion(){const _0x13bb7d=a40_0x7e82;return fetchNpmDistTagVersion(_0x13bb7d(0x166));}async function resolveTargetVersion(_0x132dc8){const _0x5c0564=a40_0x7e82,_0x517f13=getRequestedVersion(_0x132dc8);if(_0x517f13)return{'version':_0x517f13,'source':_0x5c0564(0x15c)};if(_0x132dc8[_0x5c0564(0x151)](_0x5c0564(0x17d))){const _0xffd2c6=await fetchNpmDistTagVersion(_0x5c0564(0x17d));if(!_0xffd2c6)return null;return{'version':_0xffd2c6,'source':'beta'};}const _0x30a79d=await fetchLatestVersion();if(!_0x30a79d)return null;return{'version':_0x30a79d,'source':_0x5c0564(0x166)};}function shouldInstallTarget(_0x25da4c,_0x1d233c){const _0x2cc5a3=a40_0x7e82;if(_0x1d233c['source']==='version'||_0x1d233c[_0x2cc5a3(0x173)]==='beta')return!a40_0x33b70b['eq'](_0x25da4c,_0x1d233c[_0x2cc5a3(0x15c)]);return a40_0x33b70b['lt'](_0x25da4c,_0x1d233c[_0x2cc5a3(0x15c)]);}function getInstallPlanLabel(_0x55303c,_0x30bee0){const _0x3bb741=a40_0x7e82;switch(_0x30bee0[_0x3bb741(0x173)]){case _0x3bb741(0x17d):return _0x3bb741(0x178)+a40_0x5ca547[_0x3bb741(0x16d)](_0x55303c)+_0x3bb741(0x16a)+a40_0x5ca547['green'](_0x30bee0['version']);case _0x3bb741(0x15c):return'Requested\x20version:\x20'+a40_0x5ca547[_0x3bb741(0x16d)](_0x55303c)+_0x3bb741(0x16a)+a40_0x5ca547[_0x3bb741(0x153)](_0x30bee0['version']);case _0x3bb741(0x166):default:return _0x3bb741(0x18b)+a40_0x5ca547[_0x3bb741(0x16d)](_0x55303c)+_0x3bb741(0x16a)+a40_0x5ca547[_0x3bb741(0x153)](_0x30bee0[_0x3bb741(0x15c)]);}}function repairCurrentBuiltinSkill(){const _0x447f61=a40_0x7e82;console['log'](a40_0x5ca547[_0x447f61(0x156)](_0x447f61(0x185)));const _0x4078fc=installBuiltinSkill();if(_0x4078fc['ok'])return console[_0x447f61(0x191)](a40_0x5ca547[_0x447f61(0x156)]('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x4078fc['skillVersion']+_0x447f61(0x16e))),!![];return console[_0x447f61(0x14c)](a40_0x5ca547[_0x447f61(0x16d)]('\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20['+_0x4078fc[_0x447f61(0x164)]+']:\x20'+(_0x4078fc[_0x447f61(0x196)]||_0x447f61(0x175)))),console[_0x447f61(0x191)](a40_0x5ca547[_0x447f61(0x156)]('\x20\x20Run\x20manually:\x20'+CLI_BIN_NAME+_0x447f61(0x14f))),![];}function verifyUpdatedBuiltinSkill(_0x1cb986){const _0x58a45e=a40_0x7e82,_0x528ff=inspectInstalledBuiltinSkillVersion(_0x1cb986);if(_0x528ff['state']===_0x58a45e(0x18f))return console['log'](a40_0x5ca547[_0x58a45e(0x156)]('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x1cb986+_0x58a45e(0x16e))),!![];const _0x9c81b4=_0x528ff[_0x58a45e(0x181)]?'expected\x20'+_0x1cb986+_0x58a45e(0x184)+_0x528ff[_0x58a45e(0x181)]:_0x58a45e(0x167)+_0x1cb986+_0x58a45e(0x154)+_0x528ff[_0x58a45e(0x17a)];return console[_0x58a45e(0x14c)](a40_0x5ca547[_0x58a45e(0x16d)]('\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20'+_0x9c81b4)),console[_0x58a45e(0x191)](a40_0x5ca547[_0x58a45e(0x156)](_0x58a45e(0x14e)+_0x528ff[_0x58a45e(0x18d)])),![];}async function execute(_0x4f3e39){const _0x287291=a40_0x7e82;await validateUpdateFlags(_0x4f3e39);const _0x2b2249=getCurrentVersion();console[_0x287291(0x191)](_0x287291(0x18e)+_0x2b2249);const _0x45b3a3=a40_0x125fda('Checking\x20for\x20updates...')[_0x287291(0x15f)](),_0x5cfd1f=await resolveTargetVersion(_0x4f3e39);if(!_0x5cfd1f){const _0x295c35=_0x4f3e39[_0x287291(0x151)](_0x287291(0x17d))?'Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm':_0x287291(0x199);return _0x45b3a3[_0x287291(0x16f)](_0x295c35),console[_0x287291(0x191)](a40_0x5ca547[_0x287291(0x156)](_0x287291(0x188)+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x295c35};}const _0x30a1df=a40_0x33b70b[_0x287291(0x159)](VERSION),_0x421782=a40_0x33b70b[_0x287291(0x159)](_0x5cfd1f[_0x287291(0x15c)]);if(!_0x30a1df||!_0x421782)return _0x45b3a3['fail'](_0x287291(0x15b)),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x30a1df,_0x5cfd1f)){const _0x34c7d2=_0x5cfd1f[_0x287291(0x173)]===_0x287291(0x15c)?_0x287291(0x149)+_0x5cfd1f[_0x287291(0x15c)]+')':a40_0x33b70b['gt'](_0x30a1df,_0x421782)?_0x287291(0x176)+_0x2b2249+_0x287291(0x172)+_0x5cfd1f['version']:_0x287291(0x155)+_0x5cfd1f[_0x287291(0x15c)]+')';return _0x45b3a3['succeed'](_0x34c7d2),{'ok':repairCurrentBuiltinSkill()};}_0x45b3a3['info'](getInstallPlanLabel(_0x2b2249,_0x5cfd1f));const _0x3a2c8c=detectPackageManager(),_0x30d50f=_0x3a2c8c==='npm'?resolveNpmBin('npm'):_0x3a2c8c,_0x6ed613=a40_0x125fda(_0x287291(0x15a)+_0x3a2c8c+'...')[_0x287291(0x15f)]();try{return await execa(_0x30d50f,[_0x287291(0x14a),'-g',NPM_PACKAGE_NAME+'@'+_0x5cfd1f['version']],{'stdio':'pipe'}),_0x6ed613[_0x287291(0x17c)](_0x287291(0x152)+_0x5cfd1f[_0x287291(0x15c)]),console[_0x287291(0x191)](a40_0x5ca547[_0x287291(0x156)](_0x287291(0x169))),{'ok':verifyUpdatedBuiltinSkill(_0x5cfd1f[_0x287291(0x15c)])};}catch(_0x25a833){return _0x6ed613[_0x287291(0x16f)]('Update\x20failed'),console['error'](a40_0x5ca547[_0x287291(0x15d)]('\x20\x20'+_0x25a833['message'])),console['log'](a40_0x5ca547[_0x287291(0x156)](_0x287291(0x193)+_0x3a2c8c+_0x287291(0x192)+NPM_PACKAGE_NAME+'@'+_0x5cfd1f[_0x287291(0x15c)])),{'ok':![],'message':_0x25a833[_0x287291(0x14d)]};}}export const updateDefinition={'service':a40_0x7e82(0x186),'command':a40_0x7e82(0x18c),'description':a40_0x7e82(0x198),'risk':a40_0x7e82(0x174),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a40_0x52dd84=a40_0x4f5c;(function(_0x2778cc,_0x24c31a){const _0x2f9e84=a40_0x4f5c,_0x208df9=_0x2778cc();while(!![]){try{const _0x24f01c=parseInt(_0x2f9e84(0x173))/0x1+parseInt(_0x2f9e84(0x150))/0x2+parseInt(_0x2f9e84(0x16c))/0x3*(parseInt(_0x2f9e84(0x16d))/0x4)+parseInt(_0x2f9e84(0x175))/0x5*(parseInt(_0x2f9e84(0x13b))/0x6)+-parseInt(_0x2f9e84(0x165))/0x7*(-parseInt(_0x2f9e84(0x185))/0x8)+-parseInt(_0x2f9e84(0x176))/0x9*(parseInt(_0x2f9e84(0x17d))/0xa)+-parseInt(_0x2f9e84(0x182))/0xb*(-parseInt(_0x2f9e84(0x162))/0xc);if(_0x24f01c===_0x24c31a)break;else _0x208df9['push'](_0x208df9['shift']());}catch(_0x255aa3){_0x208df9['push'](_0x208df9['shift']());}}}(a40_0x13d7,0xa976e));function a40_0x13d7(){const _0x13c4b8=['expected\x20','unknown','132owJECp','\x20install\x20-g\x20','yellow','4624515CykEXE','\x20\x20Run\x20manually:\x20','filter','map','Invalid\x20version:\x20','Updated\x20to\x20v',',\x20state\x20','3VmInzz','61316yPvVUn','length','\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','latest','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','includes','146663ppmnMv','message','584170aIsFgF','3109635kVsfIY','Requested\x20version:\x20','repairCommand','Updating\x20via\x20','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','execPath','code','40vwNPlU','toLowerCase','\x20→\x20','string','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','537031nWOuOT','object','gray','8xmPljp','Install\x20a\x20specific\x20CLI\x20version','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','info','succeed','\x20is\x20up\x20to\x20date.','Already\x20on\x20requested\x20version\x20(v','24TWvhIb','Already\x20up\x20to\x20date\x20(v','fail','green','start','/dist-tags','slice',',\x20found\x20','error','trim','read','@latest','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.',']:\x20','bun','source','bool','https://registry.npmjs.org/-/package/','validation','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','log','498364wFDvDr','\x20cli-skill\x20install','version','Beta\x20version:\x20','Checking\x20for\x20updates...','valid','npm','warn','Update\x20failed','run','skillVersion','Version\x20comparison\x20failed','pipe','Checking\x20CLI\x20Built-in\x20Skill...','red','beta'];a40_0x13d7=function(){return _0x13c4b8;};return a40_0x13d7();}import a40_0x134970 from'chalk';import a40_0x43fd36 from'ora';import a40_0x458b6e 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 _0x375d5d=a40_0x4f5c;return GIT_COMMIT!==_0x375d5d(0x161)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x375d5d(0x141)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x4a1ef3=a40_0x4f5c,_0x1661d2=process[_0x4a1ef3(0x17b)][_0x4a1ef3(0x17e)]();if(_0x1661d2[_0x4a1ef3(0x172)](_0x4a1ef3(0x149)))return _0x4a1ef3(0x149);return'npm';}function a40_0x4f5c(_0x17630c,_0x4ccaef){_0x17630c=_0x17630c-0x13b;const _0x13d7be=a40_0x13d7();let _0x4f5cdc=_0x13d7be[_0x17630c];return _0x4f5cdc;}const updateFlags=[{'name':a40_0x52dd84(0x15f),'type':'boolean','description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a40_0x52dd84(0x152),'type':a40_0x52dd84(0x180),'description':a40_0x52dd84(0x186)}];function getRequestedVersion(_0x169109){const _0x507ae5=a40_0x52dd84;return _0x169109['str'](_0x507ae5(0x152))['trim']();}async function validateUpdateFlags(_0x371e2c){const _0x4f2641=a40_0x52dd84,_0x1488ee=_0x371e2c[_0x4f2641(0x14b)](_0x4f2641(0x15f)),_0xc79ae6=getRequestedVersion(_0x371e2c);if(_0x1488ee&&_0xc79ae6)throw CliErrors[_0x4f2641(0x14d)](_0x4f2641(0x181),_0x4f2641(0x147));if(_0xc79ae6&&!a40_0x458b6e['valid'](_0xc79ae6))throw CliErrors[_0x4f2641(0x14d)](_0x4f2641(0x169)+_0xc79ae6,_0x4f2641(0x14e));}async function fetchNpmDistTags(){const _0x231d70=a40_0x52dd84;try{const _0x4caa84=await fetch(_0x231d70(0x14c)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x231d70(0x140),{'signal':AbortSignal['timeout'](0x2710)});if(!_0x4caa84['ok'])return null;const _0x44222f=await _0x4caa84['json']();if(!_0x44222f||typeof _0x44222f!==_0x231d70(0x183))return null;return Object['fromEntries'](Object['entries'](_0x44222f)[_0x231d70(0x167)](([,_0x465572])=>typeof _0x465572===_0x231d70(0x180)&&_0x465572['trim']()[_0x231d70(0x16e)]>0x0)[_0x231d70(0x168)](([_0x9c42ba,_0x304bac])=>[_0x9c42ba,String(_0x304bac)[_0x231d70(0x144)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x58ec82){const _0x23aeed=await fetchNpmDistTags();return _0x23aeed?.[_0x58ec82]??null;}async function fetchLatestVersion(){return fetchNpmDistTagVersion('latest');}async function resolveTargetVersion(_0x39390e){const _0x4ff300=a40_0x52dd84,_0x43ded7=getRequestedVersion(_0x39390e);if(_0x43ded7)return{'version':_0x43ded7,'source':_0x4ff300(0x152)};if(_0x39390e['bool'](_0x4ff300(0x15f))){const _0x2d0533=await fetchNpmDistTagVersion(_0x4ff300(0x15f));if(!_0x2d0533)return null;return{'version':_0x2d0533,'source':_0x4ff300(0x15f)};}const _0x4729c2=await fetchLatestVersion();if(!_0x4729c2)return null;return{'version':_0x4729c2,'source':_0x4ff300(0x170)};}function shouldInstallTarget(_0x19b924,_0x43ed7a){const _0x21550a=a40_0x52dd84;if(_0x43ed7a[_0x21550a(0x14a)]==='version'||_0x43ed7a[_0x21550a(0x14a)]===_0x21550a(0x15f))return!a40_0x458b6e['eq'](_0x19b924,_0x43ed7a[_0x21550a(0x152)]);return a40_0x458b6e['lt'](_0x19b924,_0x43ed7a[_0x21550a(0x152)]);}function getInstallPlanLabel(_0x3563e6,_0xb5d6ad){const _0x23f067=a40_0x52dd84;switch(_0xb5d6ad[_0x23f067(0x14a)]){case'beta':return _0x23f067(0x153)+a40_0x134970[_0x23f067(0x164)](_0x3563e6)+_0x23f067(0x17f)+a40_0x134970[_0x23f067(0x13e)](_0xb5d6ad[_0x23f067(0x152)]);case _0x23f067(0x152):return _0x23f067(0x177)+a40_0x134970['yellow'](_0x3563e6)+_0x23f067(0x17f)+a40_0x134970['green'](_0xb5d6ad[_0x23f067(0x152)]);case _0x23f067(0x170):default:return'Update\x20available:\x20'+a40_0x134970[_0x23f067(0x164)](_0x3563e6)+_0x23f067(0x17f)+a40_0x134970[_0x23f067(0x13e)](_0xb5d6ad[_0x23f067(0x152)]);}}function repairCurrentBuiltinSkill(){const _0x57b297=a40_0x52dd84;console[_0x57b297(0x14f)](a40_0x134970[_0x57b297(0x184)](_0x57b297(0x15d)));const _0x1e0ce0=installBuiltinSkill();if(_0x1e0ce0['ok'])return console[_0x57b297(0x14f)](a40_0x134970['gray']('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x1e0ce0[_0x57b297(0x15a)]+_0x57b297(0x18a))),!![];return console['warn'](a40_0x134970[_0x57b297(0x164)](_0x57b297(0x16f)+_0x1e0ce0[_0x57b297(0x17c)]+_0x57b297(0x148)+(_0x1e0ce0[_0x57b297(0x143)]||'unknown'))),console['log'](a40_0x134970[_0x57b297(0x184)](_0x57b297(0x166)+CLI_BIN_NAME+_0x57b297(0x151))),![];}function verifyUpdatedBuiltinSkill(_0x131a76){const _0x27d123=a40_0x52dd84,_0x548ab2=inspectInstalledBuiltinSkillVersion(_0x131a76);if(_0x548ab2['state']==='current')return console[_0x27d123(0x14f)](a40_0x134970[_0x27d123(0x184)]('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x131a76+_0x27d123(0x18a))),!![];const _0xbc5167=_0x548ab2['skillVersion']?_0x27d123(0x160)+_0x131a76+_0x27d123(0x142)+_0x548ab2[_0x27d123(0x15a)]:'expected\x20'+_0x131a76+_0x27d123(0x16b)+_0x548ab2['state'];return console[_0x27d123(0x157)](a40_0x134970[_0x27d123(0x164)]('\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20'+_0xbc5167)),console['log'](a40_0x134970['gray'](_0x27d123(0x166)+_0x548ab2[_0x27d123(0x178)])),![];}async function execute(_0x54c289){const _0x1840ff=a40_0x52dd84;await validateUpdateFlags(_0x54c289);const _0x2db339=getCurrentVersion();console['log']('Current\x20version:\x20'+_0x2db339);const _0x178cd6=a40_0x43fd36(_0x1840ff(0x154))[_0x1840ff(0x13f)](),_0x528f1a=await resolveTargetVersion(_0x54c289);if(!_0x528f1a){const _0xae3a1a=_0x54c289[_0x1840ff(0x14b)](_0x1840ff(0x15f))?_0x1840ff(0x171):_0x1840ff(0x187);return _0x178cd6['fail'](_0xae3a1a),console[_0x1840ff(0x14f)](a40_0x134970[_0x1840ff(0x184)](_0x1840ff(0x17a)+NPM_PACKAGE_NAME+_0x1840ff(0x146))),{'ok':![],'message':_0xae3a1a};}const _0x2172cb=a40_0x458b6e[_0x1840ff(0x155)](VERSION),_0xc4f417=a40_0x458b6e['valid'](_0x528f1a[_0x1840ff(0x152)]);if(!_0x2172cb||!_0xc4f417)return _0x178cd6[_0x1840ff(0x13d)](_0x1840ff(0x15b)),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x2172cb,_0x528f1a)){const _0x3e1a9a=_0x528f1a[_0x1840ff(0x14a)]===_0x1840ff(0x152)?_0x1840ff(0x18b)+_0x528f1a['version']+')':a40_0x458b6e['gt'](_0x2172cb,_0xc4f417)?'Current\x20version\x20v'+_0x2db339+'\x20is\x20newer\x20than\x20npm\x20latest\x20v'+_0x528f1a[_0x1840ff(0x152)]:_0x1840ff(0x13c)+_0x528f1a[_0x1840ff(0x152)]+')';return _0x178cd6[_0x1840ff(0x189)](_0x3e1a9a),{'ok':repairCurrentBuiltinSkill()};}_0x178cd6[_0x1840ff(0x188)](getInstallPlanLabel(_0x2db339,_0x528f1a));const _0x535820=detectPackageManager(),_0x1fc565=_0x535820===_0x1840ff(0x156)?resolveNpmBin(_0x1840ff(0x156)):_0x535820,_0x4fc5fd=a40_0x43fd36(_0x1840ff(0x179)+_0x535820+'...')[_0x1840ff(0x13f)]();try{return await execa(_0x1fc565,['install','-g',NPM_PACKAGE_NAME+'@'+_0x528f1a['version']],{'stdio':_0x1840ff(0x15c)}),_0x4fc5fd['succeed'](_0x1840ff(0x16a)+_0x528f1a[_0x1840ff(0x152)]),console[_0x1840ff(0x14f)](a40_0x134970[_0x1840ff(0x184)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.')),{'ok':verifyUpdatedBuiltinSkill(_0x528f1a[_0x1840ff(0x152)])};}catch(_0x4e0e32){return _0x4fc5fd[_0x1840ff(0x13d)](_0x1840ff(0x158)),console[_0x1840ff(0x143)](a40_0x134970[_0x1840ff(0x15e)]('\x20\x20'+_0x4e0e32['message'])),console[_0x1840ff(0x14f)](a40_0x134970[_0x1840ff(0x184)]('\x20\x20Try\x20manually:\x20'+_0x535820+_0x1840ff(0x163)+NPM_PACKAGE_NAME+'@'+_0x528f1a[_0x1840ff(0x152)])),{'ok':![],'message':_0x4e0e32[_0x1840ff(0x174)]};}}export const updateDefinition={'service':'update','command':a40_0x52dd84(0x159),'description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':a40_0x52dd84(0x145),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a41_0x4f61(_0x4a2e4d,_0xd616e6){_0x4a2e4d=_0x4a2e4d-0xe4;const _0x54f7a7=a41_0x54f7();let _0x4f613b=_0x54f7a7[_0x4a2e4d];return _0x4f613b;}function a41_0x54f7(){const _0x680b7c=['138hGHmgi','389424gOBMdW','3942390RYzfHA','4298874XIBsXU','51442tYJCdB','5490395CNGbLd','8vbUJdQ','5099052uWOClE','53YQUSYe','1916667QCaLDl'];a41_0x54f7=function(){return _0x680b7c;};return a41_0x54f7();}(function(_0x3b15f8,_0x5a1832){const _0x3f0a1e=a41_0x4f61,_0x166621=_0x3b15f8();while(!![]){try{const _0x505004=-parseInt(_0x3f0a1e(0xe9))/0x1*(-parseInt(_0x3f0a1e(0xe5))/0x2)+-parseInt(_0x3f0a1e(0xe4))/0x3+-parseInt(_0x3f0a1e(0xe8))/0x4+parseInt(_0x3f0a1e(0xe6))/0x5+-parseInt(_0x3f0a1e(0xeb))/0x6*(-parseInt(_0x3f0a1e(0xec))/0x7)+parseInt(_0x3f0a1e(0xe7))/0x8*(parseInt(_0x3f0a1e(0xea))/0x9)+-parseInt(_0x3f0a1e(0xed))/0xa;if(_0x505004===_0x5a1832)break;else _0x166621['push'](_0x166621['shift']());}catch(_0x67b651){_0x166621['push'](_0x166621['shift']());}}}(a41_0x54f7,0xcff77));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a42_0x62e970=a42_0x6f72;(function(_0x72e363,_0x3cc60c){const _0x56b577=a42_0x6f72,_0x51269f=_0x72e363();while(!![]){try{const _0x5260cb=-parseInt(_0x56b577(0x179))/0x1*(parseInt(_0x56b577(0x16c))/0x2)+parseInt(_0x56b577(0x171))/0x3*(-parseInt(_0x56b577(0x169))/0x4)+parseInt(_0x56b577(0x168))/0x5+-parseInt(_0x56b577(0x16e))/0x6+-parseInt(_0x56b577(0x167))/0x7+-parseInt(_0x56b577(0x16a))/0x8+-parseInt(_0x56b577(0x170))/0x9*(-parseInt(_0x56b577(0x178))/0xa);if(_0x5260cb===_0x3cc60c)break;else _0x51269f['push'](_0x51269f['shift']());}catch(_0x3e34f2){_0x51269f['push'](_0x51269f['shift']());}}}(a42_0x2bc4,0x6b6de));function a42_0x2bc4(){const _0x20e47d=['2230wHhaRM','727oHSMjn','boolean','read','sdk','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','4118492MXxxyb','196075ztkvvn','3148UCxoYV','5372312GbyTTZ','codegen','2386zuqJXf','str','1038300LGgsRx','operation','139059IqdYOi','2838gDJmoE','string','skip-imports','code','alias','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','name'];a42_0x2bc4=function(){return _0x20e47d;};return a42_0x2bc4();}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';function a42_0x6f72(_0x5e5f7b,_0x478ca3){_0x5e5f7b=_0x5e5f7b-0x163;const _0x2bc41c=a42_0x2bc4();let _0x6f726e=_0x2bc41c[_0x5e5f7b];return _0x6f726e;}import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a42_0x62e970(0x16b),'command':a42_0x62e970(0x165),'description':a42_0x62e970(0x166),'risk':a42_0x62e970(0x164),'flags':[CODE_FLAG_OPTIONAL,{'name':a42_0x62e970(0x175),'type':a42_0x62e970(0x172),'description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)'},{'name':a42_0x62e970(0x16f),'type':'string','required':!![],'description':a42_0x62e970(0x176)},{'name':a42_0x62e970(0x173),'type':a42_0x62e970(0x163),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x230026){const _0x338990=a42_0x62e970,{dataset:_0x189ece,operation:_0x30b949}=await getOperationDetail(_0x230026['appCode'],_0x230026[_0x338990(0x16d)]('code'),_0x230026[_0x338990(0x16d)]('operation')),_0x4646ee=generateSdkCode(_0x189ece,_0x30b949,{'includeImports':!_0x230026['bool'](_0x338990(0x173))});return{'ok':!![],'data':{'dataset':{'name':_0x189ece[_0x338990(0x177)],'code':_0x189ece[_0x338990(0x174)],'tableName':_0x189ece['tableName']},'operation':_0x230026[_0x338990(0x16d)](_0x338990(0x16f)),'code':_0x4646ee}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a43_0x4776fe=a43_0x18c6;function a43_0x18c6(_0x59cc2b,_0x1d3b71){_0x59cc2b=_0x59cc2b-0x194;const _0x32f038=a43_0x32f0();let _0x18c628=_0x32f038[_0x59cc2b];return _0x18c628;}function a43_0x32f0(){const _0x4b9a07=['bff','298971oXBvRT','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','sdk','1432840raqLEw','3243823oXCPJD','string','70bnVlsg','sqlcode','sql','197141FKkCQp','str','target','read','210QKUHSv','sqlName','bool','appCode','boolean','160CnOBaj','171vklXdq','9748AzARXG','codegen','1257275FYGDFZ','Omit\x20import\x20statements\x20from\x20generated\x20code','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','no-imports','73496NKBBhW'];a43_0x32f0=function(){return _0x4b9a07;};return a43_0x32f0();}(function(_0x1dc317,_0xeedffe){const _0x2b0b92=a43_0x18c6,_0x386378=_0x1dc317();while(!![]){try{const _0x5d0a2b=parseInt(_0x2b0b92(0x19a))/0x1*(parseInt(_0x2b0b92(0x198))/0x2)+parseInt(_0x2b0b92(0x1a2))/0x3+parseInt(_0x2b0b92(0x1a5))/0x4+parseInt(_0x2b0b92(0x19c))/0x5+-parseInt(_0x2b0b92(0x1af))/0x6*(-parseInt(_0x2b0b92(0x1ab))/0x7)+parseInt(_0x2b0b92(0x1a0))/0x8*(parseInt(_0x2b0b92(0x199))/0x9)+parseInt(_0x2b0b92(0x1a8))/0xa*(-parseInt(_0x2b0b92(0x1a6))/0xb);if(_0x5d0a2b===_0xeedffe)break;else _0x386378['push'](_0x386378['shift']());}catch(_0x531285){_0x386378['push'](_0x386378['shift']());}}}(a43_0x32f0,0x8edd1));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a43_0x4776fe(0x19b),'command':a43_0x4776fe(0x1aa),'description':a43_0x4776fe(0x1a3),'risk':a43_0x4776fe(0x1ae),'flags':[SQLCODE_FLAG,{'name':'target','type':a43_0x4776fe(0x1a7),'description':a43_0x4776fe(0x19e),'default':a43_0x4776fe(0x1a4),'enum':[a43_0x4776fe(0x1a4),a43_0x4776fe(0x1a1)]},{'name':'no-imports','type':a43_0x4776fe(0x197),'description':a43_0x4776fe(0x19d)}],async 'execute'(_0x324ab3){const _0x23ff2f=a43_0x4776fe,_0x2e2572=await getSqlQueryInfo(_0x324ab3[_0x23ff2f(0x196)],_0x324ab3[_0x23ff2f(0x1ac)](_0x23ff2f(0x1a9))),_0x1e6f70=_0x324ab3[_0x23ff2f(0x1ac)](_0x23ff2f(0x1ad))||_0x23ff2f(0x1a4),_0x194e95=generateSqlCodeTemplate(_0x2e2572,{'target':_0x1e6f70,'includeImports':!_0x324ab3[_0x23ff2f(0x195)](_0x23ff2f(0x19f))});return{'ok':!![],'data':{'sqlCode':_0x2e2572['sqlCode'],'sqlName':_0x2e2572[_0x23ff2f(0x194)],'target':_0x1e6f70,'code':_0x194e95}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x13e2d8,_0x3813c9){const _0x4621ab=a44_0x2afb,_0x57b765=_0x13e2d8();while(!![]){try{const _0x540446=parseInt(_0x4621ab(0xa2))/0x1+-parseInt(_0x4621ab(0x8f))/0x2*(-parseInt(_0x4621ab(0x9d))/0x3)+parseInt(_0x4621ab(0x92))/0x4+parseInt(_0x4621ab(0x90))/0x5*(-parseInt(_0x4621ab(0x9c))/0x6)+parseInt(_0x4621ab(0xa5))/0x7+parseInt(_0x4621ab(0xa0))/0x8*(parseInt(_0x4621ab(0x98))/0x9)+-parseInt(_0x4621ab(0x93))/0xa;if(_0x540446===_0x3813c9)break;else _0x57b765['push'](_0x57b765['shift']());}catch(_0x1a4c3e){_0x57b765['push'](_0x57b765['shift']());}}}(a44_0x10ab,0x73661));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a44_0x2afb(_0x4a06c2,_0x1b81fe){_0x4a06c2=_0x4a06c2-0x8f;const _0x10ab1f=a44_0x10ab();let _0x2afb76=_0x10ab1f[_0x4a06c2];return _0x2afb76;}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 _0x3d2afb=a44_0x2afb;return[{'name':_0x3d2afb(0xb4),'type':_0x3d2afb(0x96),'description':_0x3d2afb(0xac),'required':!![]},{'name':_0x3d2afb(0xb7),'type':'boolean','description':'Use\x20global\x20config\x20scope','default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x20d6be=a44_0x2afb;return[{'name':'global','type':_0x20d6be(0xb5),'description':_0x20d6be(0xaf),'default':![]}];}function a44_0x10ab(){const _0x5d25cf=['1027044vnglvl','3FVEOqO','\x20<name>','object','2427576xKAVfq','bool','493749qNUWyB','Usage:\x20','\x20Default\x20app\x20changed\x20to\x20\x22','3742403mJBZap','Updated','str','\x20<name>\x20[--global]','\x22\x20is\x20selected\x20automatically.','\x20Remaining\x20app\x20\x22','length','App\x20code','args','keys','Use\x20global\x20config\x20scope','\x22\x20(appcode:\x20','apps','flagMissing','App\x20\x22','appcode','boolean','defaultApp','global','projectConfig','\x22\x20not\x20found.','globalConfig','validation','1681340XuSPJL','25swjljj','\x20<name>\x20--appcode\x20<code>','2585096qVgoRc','17936730DUkoGz','both','Removed\x20app\x20\x22','string','\x20Default\x20app\x20is\x20\x22','18ilmsRU','trim','Missing\x20app\x20name.','project'];a44_0x10ab=function(){return _0x5d25cf;};return a44_0x10ab();}export async function validateAppName(_0x2ddfa4,_0x34eecb){const _0x263895=a44_0x2afb,_0x1aa76a=_0x2ddfa4[_0x263895(0xad)][0x0]?.[_0x263895(0x99)]();if(!_0x1aa76a)throw CliErrors[_0x263895(0xbb)](_0x263895(0x9a),_0x263895(0xa3)+CLI_BIN_NAME+'\x20'+_0x34eecb+_0x263895(0x9e));}export async function runAppAdd(_0xa12092,_0x2ecd7e){const _0x442ddd=a44_0x2afb,_0x45620a=_0xa12092[_0x442ddd(0xad)][0x0]?.[_0x442ddd(0x99)]();if(!_0x45620a)throw CliErrors[_0x442ddd(0xbb)]('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x2ecd7e+'\x20<name>\x20--appcode\x20<code>');const _0x2e822a=_0xa12092[_0x442ddd(0xa7)]('appcode');if(!_0x2e822a)throw CliErrors[_0x442ddd(0xb2)](_0x442ddd(0xb4),_0x442ddd(0xa3)+CLI_BIN_NAME+'\x20'+_0x2ecd7e+_0x442ddd(0x91));const _0x1d85e4={'global':_0xa12092['bool'](_0x442ddd(0xb7))},_0x4c50a8=readConfig(_0x1d85e4);if(!_0x4c50a8[_0x442ddd(0xb1)])_0x4c50a8[_0x442ddd(0xb1)]={};const _0x222d57={'appcode':_0x2e822a,...collectAppProfileOverrides(_0x1664f9=>_0xa12092[_0x442ddd(0xa7)](_0x1664f9))},_0x105330=_0x4c50a8['apps'],_0x22502d=Object[_0x442ddd(0xae)](_0x105330),_0x9ff82b=typeof _0x4c50a8['defaultApp']==='string'&&_0x105330[_0x4c50a8[_0x442ddd(0xb6)]]?_0x4c50a8[_0x442ddd(0xb6)]:_0x22502d['length']===0x1?_0x22502d[0x0]:undefined,_0x44b02f=!!_0x105330[_0x45620a];_0x105330[_0x45620a]=_0x222d57;const _0x34bb05=normalizeStoredDefaultApp(_0x4c50a8,_0x9ff82b);writeConfig(_0x4c50a8,_0x1d85e4);const _0x1e1c89=!_0x44b02f&&_0x34bb05?_0x442ddd(0x97)+_0x34bb05+'\x22.':'',_0x3b4b0=(_0x44b02f?_0x442ddd(0xa6):'Added')+'\x20app\x20\x22'+_0x45620a+_0x442ddd(0xb0)+_0x2e822a+')'+scopeLabel(_0x1d85e4)+'.'+_0x1e1c89;return{'ok':!![],'message':_0x3b4b0};}export async function runAppRemove(_0x57f86f,_0x1c1121){const _0x3ca0e3=a44_0x2afb,_0x100fe5=_0x57f86f[_0x3ca0e3(0xad)][0x0]?.['trim']();if(!_0x100fe5)throw CliErrors[_0x3ca0e3(0xbb)](_0x3ca0e3(0x9a),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x1c1121+_0x3ca0e3(0xa8));const _0x33bcd9=_0x57f86f[_0x3ca0e3(0xa1)](_0x3ca0e3(0xb7)),{config:_0x193400,layers:_0x408e88}=readRawConfigWithLayers(),_0x151a17=_0x193400[_0x3ca0e3(0xb1)]??{};if(!_0x151a17[_0x100fe5])throw CliErrors[_0x3ca0e3(0xbb)](_0x3ca0e3(0xb3)+_0x100fe5+'\x22\x20not\x20found.');const _0x38befd=_0x408e88[_0x3ca0e3(0xba)][_0x3ca0e3(0xb1)]&&typeof _0x408e88[_0x3ca0e3(0xba)][_0x3ca0e3(0xb1)]===_0x3ca0e3(0x9f)?_0x408e88[_0x3ca0e3(0xba)][_0x3ca0e3(0xb1)]:{},_0x363e3e=_0x408e88[_0x3ca0e3(0xb8)]['apps']&&typeof _0x408e88['projectConfig'][_0x3ca0e3(0xb1)]==='object'?_0x408e88[_0x3ca0e3(0xb8)][_0x3ca0e3(0xb1)]:{},_0x28e78a=appDefinedIn(_0x100fe5,_0x38befd,_0x363e3e),_0x4c47d9=resolveAppScopeForWrite(_0x100fe5,_0x33bcd9,_0x408e88),_0x2fd033={'global':_0x4c47d9===_0x3ca0e3(0xb7)},_0x23eee3=readConfig(_0x2fd033),_0x48c8a9=_0x23eee3[_0x3ca0e3(0xb1)];if(!_0x48c8a9||!_0x48c8a9[_0x100fe5])throw CliErrors[_0x3ca0e3(0xbb)](_0x3ca0e3(0xb3)+_0x100fe5+_0x3ca0e3(0xb9));delete _0x48c8a9[_0x100fe5];let _0x2da127='';const _0x365232=typeof _0x23eee3[_0x3ca0e3(0xb6)]===_0x3ca0e3(0x96)?_0x23eee3['defaultApp']:undefined,_0x5a5cc0=Object[_0x3ca0e3(0xae)](_0x48c8a9),_0x3e86aa=_0x365232===_0x100fe5?_0x5a5cc0[0x0]:_0x365232,_0x2bb5f3=normalizeStoredDefaultApp(_0x23eee3,_0x3e86aa);if(_0x365232===_0x100fe5&&_0x5a5cc0[_0x3ca0e3(0xab)]===0x1)_0x2da127=_0x3ca0e3(0xaa)+_0x5a5cc0[0x0]+_0x3ca0e3(0xa9);else _0x365232===_0x100fe5&&_0x2bb5f3&&(_0x2da127=_0x3ca0e3(0xa4)+_0x2bb5f3+'\x22.');Object[_0x3ca0e3(0xae)](_0x48c8a9)['length']===0x0&&(delete _0x23eee3['apps'],delete _0x23eee3['defaultApp']);writeConfig(_0x23eee3,_0x2fd033);const _0x4a55d8=_0x28e78a===_0x3ca0e3(0x94)?'\x20Note:\x20app\x20\x22'+_0x100fe5+'\x22\x20still\x20defined\x20in\x20'+(_0x4c47d9===_0x3ca0e3(0x9b)?_0x3ca0e3(0xb7):_0x3ca0e3(0x9b))+'\x20config.':'';return{'ok':!![],'message':_0x3ca0e3(0x95)+_0x100fe5+'\x22'+scopeLabel(_0x2fd033)+'.'+_0x2da127+_0x4a55d8};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x54890f,_0x1091c1){const _0x423419=a45_0x69e8,_0x2ada98=_0x54890f();while(!![]){try{const _0x39a378=-parseInt(_0x423419(0x1aa))/0x1+parseInt(_0x423419(0x19d))/0x2*(parseInt(_0x423419(0x1a0))/0x3)+-parseInt(_0x423419(0x198))/0x4+parseInt(_0x423419(0x19f))/0x5+-parseInt(_0x423419(0x1a3))/0x6*(parseInt(_0x423419(0x1ae))/0x7)+-parseInt(_0x423419(0x19b))/0x8*(-parseInt(_0x423419(0x1ad))/0x9)+parseInt(_0x423419(0x1a2))/0xa;if(_0x39a378===_0x1091c1)break;else _0x2ada98['push'](_0x2ada98['shift']());}catch(_0x54a468){_0x2ada98['push'](_0x2ada98['shift']());}}}(a45_0x35fb,0x7a958));import{input,checkbox,select}from'@inquirer/prompts';import a45_0x3832e1 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';function a45_0x35fb(){const _0x5e75cd=['1001970opWgpA','1438572UlpIof','\x0aNo\x20available\x20apps\x20found.','\x20\x20(','✎\x20Enter\x20appcode\x20manually','message','trim','skip','695624AJENmO','length','✎\x20Enter\x20manually','201735MZhDWZ','14NQjUuZ','App\x20Code:','Select\x20the\x20app\x20to\x20bind:','(Skip;\x20configure\x20later)','\x20apps.\x20Select\x20with\x20space,\x20a=all,\x20i=invert:','includes','yellow','Found\x20','appCode','Invalid\x20App\x20Code','find','1236588foRzQk','map','custom','104fxVtmz','Fetching\x20available\x20apps...','677572WEAsop','gray','4586175OQwKyX','6IZLwmk','appName'];a45_0x35fb=function(){return _0x5e75cd;};return a45_0x35fb();}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 _0x31d513=a45_0x69e8,_0xf541de=await input({'message':_0x31d513(0x1af),'validate':_0x520445=>{const _0x22fff2=_0x31d513,_0x4ac5d9=validateAppcode(_0x520445['trim']());return _0x4ac5d9['valid']||_0x4ac5d9['message']||_0x22fff2(0x196);}});return _0xf541de[_0x31d513(0x1a8)]();}export async function promptAppSelection(_0x4426e0){const _0x579562=a45_0x69e8,_0x3af509=[{'name':a45_0x3832e1[_0x579562(0x1b4)](_0x579562(0x1a6)),'value':-0x1},..._0x4426e0[_0x579562(0x199)]((_0x2fe091,_0x1f8a3f)=>({'name':_0x2fe091['appName']+'\x20\x20'+a45_0x3832e1[_0x579562(0x19e)]('('+_0x2fe091[_0x579562(0x195)]+')'),'value':_0x1f8a3f}))],_0x5a4917=await checkbox({'message':_0x579562(0x1b5)+a45_0x3832e1['cyan'](_0x4426e0[_0x579562(0x1ab)])+_0x579562(0x1b2),'choices':_0x3af509,'loop':![]});if(_0x5a4917[_0x579562(0x1b3)](-0x1))return'custom';if(_0x5a4917[_0x579562(0x1ab)]===0x0)return'custom';return _0x5a4917[_0x579562(0x199)](_0x2b7ea2=>_0x4426e0[_0x2b7ea2]);}export async function promptSingleAppSelection(_0x4d6033){const _0x572e45=a45_0x69e8,_0x3eac94=[{'name':a45_0x3832e1['gray']('(Skip;\x20configure\x20later\x20with\x20config\x20set\x20appcode)'),'value':_0x572e45(0x1a9)},{'name':a45_0x3832e1[_0x572e45(0x1b4)](_0x572e45(0x1a6)),'value':'custom'},..._0x4d6033[_0x572e45(0x199)](_0x32ceea=>({'name':_0x32ceea[_0x572e45(0x1a1)]+'\x20\x20'+a45_0x3832e1[_0x572e45(0x19e)]('('+_0x32ceea[_0x572e45(0x195)]+')'),'value':_0x32ceea['appCode']}))],_0x212ce3=await select({'message':_0x572e45(0x1b0),'choices':_0x3eac94});if(_0x212ce3==='skip')return _0x572e45(0x1a9);if(_0x212ce3===_0x572e45(0x19a))return _0x572e45(0x19a);return _0x4d6033[_0x572e45(0x197)](_0x5f0f8f=>_0x5f0f8f['appCode']===_0x212ce3);}export async function selectSingleAppcode(_0x1956c0){const _0x36117d=a45_0x69e8;if(!_0x1956c0)return writeCliSideChannelLine(a45_0x3832e1[_0x36117d(0x19e)]('(No\x20login\x20session.\x20Enter\x20an\x20App\x20Code\x20manually\x20or\x20skip.)')),_fallbackOrSkip();writeCliSideChannelLine(_0x36117d(0x19c));let _0x4dc241;try{_0x4dc241=await withActiveCookie(_0x1956c0,()=>listRemoteApps());}catch(_0x108b9d){writeCliSideChannelLine(a45_0x3832e1[_0x36117d(0x1b4)]('Could\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.'));if(_0x108b9d instanceof Error)writeCliSideChannelLine(a45_0x3832e1[_0x36117d(0x19e)]('\x20\x20('+_0x108b9d['message']+')'));return _fallbackOrSkip();}if(_0x4dc241[_0x36117d(0x1ab)]===0x0)return writeCliSideChannelLine(a45_0x3832e1[_0x36117d(0x1b4)]('No\x20available\x20apps\x20found.')),_fallbackOrSkip();const _0x1eedd9=await promptSingleAppSelection(_0x4dc241);if(_0x1eedd9===_0x36117d(0x1a9))return'';if(_0x1eedd9===_0x36117d(0x19a))return promptCustomAppcode();return _0x1eedd9[_0x36117d(0x195)];}export async function selectMultipleApps(_0x191183){const _0x5e87b8=a45_0x69e8;writeCliSideChannelLine(_0x5e87b8(0x19c));let _0x580778;try{_0x580778=await withActiveCookie(_0x191183,()=>listRemoteApps());}catch(_0x308619){writeCliSideChannelLine('\x0aCould\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.');if(_0x308619 instanceof Error)writeCliSideChannelLine(_0x5e87b8(0x1a5)+_0x308619[_0x5e87b8(0x1a7)]+')');return'custom';}if(_0x580778[_0x5e87b8(0x1ab)]===0x0)return writeCliSideChannelLine(_0x5e87b8(0x1a4)),_0x5e87b8(0x19a);return promptAppSelection(_0x580778);}function a45_0x69e8(_0x40a007,_0x41253f){_0x40a007=_0x40a007-0x195;const _0x35fba0=a45_0x35fb();let _0x69e838=_0x35fba0[_0x40a007];return _0x69e838;}async function _fallbackOrSkip(){const _0x2e95e3=a45_0x69e8,_0x421a0f=await select({'message':_0x2e95e3(0x1af),'choices':[{'name':a45_0x3832e1['gray'](_0x2e95e3(0x1b1)),'value':_0x2e95e3(0x1a9)},{'name':a45_0x3832e1['yellow'](_0x2e95e3(0x1ac)),'value':'manual'}]});if(_0x421a0f===_0x2e95e3(0x1a9))return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a46_0xe41d8d=a46_0x4005;(function(_0x283c28,_0x50457d){const _0x113450=a46_0x4005,_0xcb743f=_0x283c28();while(!![]){try{const _0x4059ec=parseInt(_0x113450(0xcf))/0x1*(-parseInt(_0x113450(0xbc))/0x2)+parseInt(_0x113450(0xc5))/0x3+parseInt(_0x113450(0xcb))/0x4*(parseInt(_0x113450(0xd2))/0x5)+-parseInt(_0x113450(0xbe))/0x6*(-parseInt(_0x113450(0xb7))/0x7)+parseInt(_0x113450(0xb8))/0x8+-parseInt(_0x113450(0xc3))/0x9+-parseInt(_0x113450(0xc4))/0xa;if(_0x4059ec===_0x50457d)break;else _0xcb743f['push'](_0xcb743f['shift']());}catch(_0x5e4171){_0xcb743f['push'](_0xcb743f['shift']());}}}(a46_0x3ef0,0x45ded));import{CLI_BIN_NAME}from'../../constant/cli.js';function a46_0x3ef0(){const _0x4729fe=['\x20is\x20processing.','6HHiYrP','\x20completed\x20successfully.','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','toUpperCase','has','546057UaISgb','2783680uJGIYo','641517IcHvVu','\x20returned\x20unknown\x20status\x20','\x20response\x20did\x20not\x20contain\x20a\x20status.','Task\x20','taskId','SUCCESS','4uJJBbS','\x27\x5c\x27\x27','errorMessage','apiError','328157IkEAFq','\x20failed.','FAILED','454000RZraMO','PROCESSING','\x20--appcode\x20','string','2676863oKaMmA','2130712mtYhEi','trim','PENDING','status','2ghmSrS'];a46_0x3ef0=function(){return _0x4729fe;};return a46_0x3ef0();}import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a46_0xe41d8d(0xca),'FAILED']),NON_TERMINAL_STATUSES=new Set([a46_0xe41d8d(0xba),a46_0xe41d8d(0xb4)]);export function normalizeAsyncTask(_0x577536){const _0x270492=a46_0xe41d8d,_0x4af427=typeof _0x577536?.[_0x270492(0xc9)]==='string'?_0x577536['taskId']['trim']():'';if(!_0x4af427)throw CliErrors[_0x270492(0xce)](_0x270492(0xc0));const _0x53f5ec=typeof _0x577536[_0x270492(0xbb)]===_0x270492(0xb6)?_0x577536[_0x270492(0xbb)][_0x270492(0xb9)]()[_0x270492(0xc1)]():'';if(!_0x53f5ec)throw CliErrors[_0x270492(0xce)]('Async\x20task\x20'+_0x4af427+_0x270492(0xc7));return{'taskId':_0x4af427,'status':_0x53f5ec,'errorMessage':typeof _0x577536[_0x270492(0xcd)]===_0x270492(0xb6)&&_0x577536[_0x270492(0xcd)]['trim']()?_0x577536[_0x270492(0xcd)][_0x270492(0xb9)]():null,'isTerminal':TERMINAL_STATUSES[_0x270492(0xc2)](_0x53f5ec),'knownStatus':TERMINAL_STATUSES['has'](_0x53f5ec)||NON_TERMINAL_STATUSES[_0x270492(0xc2)](_0x53f5ec)};}function a46_0x4005(_0x1e2b41,_0x58d1fc){_0x1e2b41=_0x1e2b41-0xb4;const _0x3ef03e=a46_0x3ef0();let _0x4005fb=_0x3ef03e[_0x1e2b41];return _0x4005fb;}export function buildAsyncTaskStatusCommand(_0x4c092e,_0xd4453){const _0x48a274=a46_0xe41d8d;return CLI_BIN_NAME+'\x20task\x20status\x20--task-id\x20'+quoteShellArg(_0x4c092e)+_0x48a274(0xb5)+quoteShellArg(_0xd4453)+'\x20--format\x20compress';}export function asyncTaskMessage(_0x5327df){const _0x5b7184=a46_0xe41d8d;switch(_0x5327df[_0x5b7184(0xbb)]){case _0x5b7184(0xba):return _0x5b7184(0xc8)+_0x5327df[_0x5b7184(0xc9)]+'\x20is\x20pending.';case _0x5b7184(0xb4):return _0x5b7184(0xc8)+_0x5327df[_0x5b7184(0xc9)]+_0x5b7184(0xbd);case _0x5b7184(0xca):return _0x5b7184(0xc8)+_0x5327df[_0x5b7184(0xc9)]+_0x5b7184(0xbf);case _0x5b7184(0xd1):return _0x5327df[_0x5b7184(0xcd)]?'Task\x20'+_0x5327df['taskId']+'\x20failed:\x20'+_0x5327df[_0x5b7184(0xcd)]:'Task\x20'+_0x5327df[_0x5b7184(0xc9)]+_0x5b7184(0xd0);default:return _0x5b7184(0xc8)+_0x5327df[_0x5b7184(0xc9)]+_0x5b7184(0xc6)+_0x5327df[_0x5b7184(0xbb)]+'.';}}function quoteShellArg(_0x484f12){const _0x567301=a46_0xe41d8d;return'\x27'+_0x484f12['replace'](/'/g,_0x567301(0xcc))+'\x27';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a47_0x1ea0(_0x40e73c,_0x55a055){_0x40e73c=_0x40e73c-0x71;var _0x1240e3=a47_0x1240();var _0x1ea08d=_0x1240e3[_0x40e73c];return _0x1ea08d;}function a47_0x1240(){var _0x57f232=['method','url','defineProperties','336585znkIvv','1UQZdmX','665OVyzTq','2947rKpuFn','26254kbbAuV','370WNrGBy','15078YCBdYa','description','5358089iDDkGT','770748WcAiJL','97101QctRLC','368oHBYXZ'];a47_0x1240=function(){return _0x57f232;};return a47_0x1240();}(function(_0x18a4ba,_0x383e03){var _0x5a9996=a47_0x1ea0,_0x4c2007=_0x18a4ba();while(!![]){try{var _0x2d2113=parseInt(_0x5a9996(0x7c))/0x1*(parseInt(_0x5a9996(0x7f))/0x2)+-parseInt(_0x5a9996(0x7b))/0x3+-parseInt(_0x5a9996(0x75))/0x4+parseInt(_0x5a9996(0x7d))/0x5*(-parseInt(_0x5a9996(0x72))/0x6)+-parseInt(_0x5a9996(0x7e))/0x7*(parseInt(_0x5a9996(0x77))/0x8)+parseInt(_0x5a9996(0x76))/0x9*(parseInt(_0x5a9996(0x71))/0xa)+parseInt(_0x5a9996(0x74))/0xb;if(_0x2d2113===_0x383e03)break;else _0x4c2007['push'](_0x4c2007['shift']());}catch(_0x56b4a2){_0x4c2007['push'](_0x4c2007['shift']());}}}(a47_0x1240,0x3ad2e));export function asDryRunResult(_0x30b8cf,_0x59e90d){var _0x18646d=a47_0x1ea0;return Object[_0x18646d(0x7a)](_0x30b8cf,{'method':{'value':_0x59e90d[_0x18646d(0x78)],'enumerable':![]},'url':{'value':_0x59e90d[_0x18646d(0x79)],'enumerable':![]},..._0x59e90d['description']?{'description':{'value':_0x59e90d[_0x18646d(0x73)],'enumerable':![]}}:{}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a48_0x33024f=a48_0x49ed;(function(_0x34c327,_0x2c4651){const _0x2bdbfc=a48_0x49ed,_0x5ccc6a=_0x34c327();while(!![]){try{const _0x30fb4d=-parseInt(_0x2bdbfc(0x199))/0x1*(parseInt(_0x2bdbfc(0x189))/0x2)+-parseInt(_0x2bdbfc(0x18d))/0x3+-parseInt(_0x2bdbfc(0x18c))/0x4+-parseInt(_0x2bdbfc(0x196))/0x5*(-parseInt(_0x2bdbfc(0x186))/0x6)+parseInt(_0x2bdbfc(0x197))/0x7+parseInt(_0x2bdbfc(0x185))/0x8+parseInt(_0x2bdbfc(0x188))/0x9;if(_0x30fb4d===_0x2c4651)break;else _0x5ccc6a['push'](_0x5ccc6a['shift']());}catch(_0x3fd09c){_0x5ccc6a['push'](_0x5ccc6a['shift']());}}}(a48_0x575a,0x884c0));export const GLOBAL_SCOPE_FLAG={'name':a48_0x33024f(0x18e),'type':a48_0x33024f(0x192),'default':![],'description':'Write\x20to\x20the\x20global\x20configuration'};function a48_0x575a(){const _0x19336e=['POSTGRESQL','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','boolean','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','MYSQL','1617095TlIMRj','529501cFqXhO','dbtype','31lEqoRQ','string','Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update','3148488SwIQJS','12KkkKzo','Database\x20product\x20type','7828191WMjxJP','23772xPSXwn','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','number','3676388GyYbiq','420018sbDwQl','global','datasetcode'];a48_0x575a=function(){return _0x19336e;};return a48_0x575a();}export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a48_0x33024f(0x194)};export const CODE_FLAG={'name':'code','type':a48_0x33024f(0x19a),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a48_0x33024f(0x18f),'description':'Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)'};export const SQLCODE_FLAG={'name':'sqlcode','type':a48_0x33024f(0x19a),'required':!![],'description':a48_0x33024f(0x191),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a48_0x33024f(0x18a)}};export const APPCODE_FLAG_OPTIONAL={'name':'appcode','type':a48_0x33024f(0x19a),'required':![],'description':a48_0x33024f(0x193)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':'App\x20code\x20(e.g.\x20app-xxxxx)'};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a48_0x33024f(0x18b),'required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'};function a48_0x49ed(_0x3dd277,_0x22c596){_0x3dd277=_0x3dd277-0x185;const _0x575ad6=a48_0x575a();let _0x49ed50=_0x575ad6[_0x3dd277];return _0x49ed50;}export const DB_TYPE_FLAG={'name':a48_0x33024f(0x198),'type':a48_0x33024f(0x19a),'required':!![],'description':a48_0x33024f(0x187),'enum':[a48_0x33024f(0x195),a48_0x33024f(0x190)]};export const SKIP_CONNECTION_TEST_FLAG={'name':'skip-connection-test','type':a48_0x33024f(0x192),'description':a48_0x33024f(0x19b)};
|