@lovrabet/rabetbase-cli 2.5.1-beta.2 → 2.5.1-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/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.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/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/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/deployment-sync.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-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.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 -16
- 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.d.ts +30 -0
- package/lib/core/kb-search-client.js +1 -0
- 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/types.d.ts +1 -0
- 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/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 +2 -2
- package/skills/rabetbase/references/rabetbase-config.md +1 -1
- package/skills/rabetbase/references/rabetbase-doctor.md +1 -1
- package/skills/rabetbase/references/rabetbase-kb.md +8 -7
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x50c3d8,_0x8d2afa){const _0x219d54=a34_0x14e4,_0x540d09=_0x50c3d8();while(!![]){try{const _0xe658bc=parseInt(_0x219d54(0xb0))/0x1*(parseInt(_0x219d54(0xb5))/0x2)+-parseInt(_0x219d54(0xb6))/0x3+parseInt(_0x219d54(0xb1))/0x4*(-parseInt(_0x219d54(0xb4))/0x5)+-parseInt(_0x219d54(0xaf))/0x6+-parseInt(_0x219d54(0xb2))/0x7*(parseInt(_0x219d54(0xb8))/0x8)+-parseInt(_0x219d54(0xb3))/0x9+parseInt(_0x219d54(0xb7))/0xa;if(_0xe658bc===_0x8d2afa)break;else _0x540d09['push'](_0x540d09['shift']());}catch(_0x37bf06){_0x540d09['push'](_0x540d09['shift']());}}}(a34_0x2881,0x5570d));import{bffList}from'../../commands/bff/list.js';function a34_0x2881(){const _0x50f5ea=['1437988VKyirH','7AwNLjQ','1959732erHbJv','5WqnTUt','694HLqwOF','1620240QvCxHe','16749600XfplMz','2096552UScsdF','2367714xpdhBU','1294PUuLxV'];a34_0x2881=function(){return _0x50f5ea;};return a34_0x2881();}import{bffDetail}from'../../commands/bff/detail.js';import{bffStatus}from'../../commands/bff/status.js';function a34_0x14e4(_0x360bda,_0x15e9e4){_0x360bda=_0x360bda-0xaf;const _0x2881d3=a34_0x2881();let _0x14e467=_0x2881d3[_0x360bda];return _0x14e467;}import{bffCreate}from'../../commands/bff/create.js';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
|
-
const
|
|
1
|
+
function a35_0x1e7d(_0x128d7b,_0x27b5a3){_0x128d7b=_0x128d7b-0x1e4;const _0x5cb47b=a35_0x5cb4();let _0x1e7d32=_0x5cb47b[_0x128d7b];return _0x1e7d32;}const a35_0x460a1a=a35_0x1e7d;(function(_0x384d34,_0x530dda){const _0x3a7d40=a35_0x1e7d,_0x2fc4f6=_0x384d34();while(!![]){try{const _0x2c7e03=parseInt(_0x3a7d40(0x1e5))/0x1*(-parseInt(_0x3a7d40(0x1f7))/0x2)+-parseInt(_0x3a7d40(0x1f1))/0x3+parseInt(_0x3a7d40(0x1e8))/0x4*(parseInt(_0x3a7d40(0x1e7))/0x5)+-parseInt(_0x3a7d40(0x1f2))/0x6+-parseInt(_0x3a7d40(0x200))/0x7+parseInt(_0x3a7d40(0x1e4))/0x8*(parseInt(_0x3a7d40(0x1e9))/0x9)+parseInt(_0x3a7d40(0x202))/0xa*(parseInt(_0x3a7d40(0x1f5))/0xb);if(_0x2c7e03===_0x530dda)break;else _0x2fc4f6['push'](_0x2fc4f6['shift']());}catch(_0x265457){_0x2fc4f6['push'](_0x2fc4f6['shift']());}}}(a35_0x5cb4,0x68a3c));function a35_0x5cb4(){const _0x19d71f=['List\x20Backend\x20Function\x20scripts','map','Script\x20type\x20filter','list','boolean','string','331533hWPeCI','6342CjGyXl','type','Return\x20full\x20script\x20objects','5742nsunvw','description','6UnFqxw','COMMON','name','read','str','Filter\x20by\x20script\x20name','functionName','No\x20Backend\x20Function\x20scripts\x20found.','scriptType','4023894uNFPFI','length','9780zCOIBw','bff','2970888GXCgMF','193622xirwFs','verbose','51470MCQdRT','172VwAXEG','18kxgxZa','ENDPOINT'];a35_0x5cb4=function(){return _0x19d71f;};return a35_0x5cb4();}import{listBffScripts}from'../../core/api-client.js';export const bffList={'service':a35_0x460a1a(0x203),'command':a35_0x460a1a(0x1ee),'description':a35_0x460a1a(0x1eb),'risk':a35_0x460a1a(0x1fa),'flags':[{'name':a35_0x460a1a(0x1f3),'type':a35_0x460a1a(0x1f0),'description':a35_0x460a1a(0x1ed),'default':a35_0x460a1a(0x1ea),'enum':[a35_0x460a1a(0x1ea),a35_0x460a1a(0x1f8)]},{'name':a35_0x460a1a(0x1f9),'type':a35_0x460a1a(0x1f0),'description':a35_0x460a1a(0x1fc)},{'name':a35_0x460a1a(0x1e6),'type':a35_0x460a1a(0x1ef),'description':a35_0x460a1a(0x1f4)}],async 'execute'(_0x1ff4d7){const _0x5bd21f=a35_0x460a1a,_0x1e8362=await listBffScripts(_0x1ff4d7['appCode'],_0x1ff4d7['str']('type'),{'scriptName':_0x1ff4d7[_0x5bd21f(0x1fb)](_0x5bd21f(0x1f9))||undefined}),_0x564daa=_0x1ff4d7['bool']('verbose');return{'ok':!![],'data':_0x564daa?_0x1e8362:_0x1e8362[_0x5bd21f(0x1ec)](_0x17807d=>({'id':_0x17807d['id'],'functionName':_0x17807d[_0x5bd21f(0x1fd)]??'','description':_0x17807d[_0x5bd21f(0x1f6)]||'(unnamed)','scriptType':_0x17807d[_0x5bd21f(0x1ff)]})),'message':_0x1e8362[_0x5bd21f(0x201)]===0x0?_0x5bd21f(0x1fe):undefined};}};
|
package/lib/commands/bff/pull.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a36_0x1d46(_0x55291b,_0x1d643a){_0x55291b=_0x55291b-0x84;const _0x1e8ab3=a36_0x1e8a();let _0x1d469c=_0x1e8ab3[_0x55291b];return _0x1d469c;}const a36_0x53e0c2=a36_0x1d46;(function(_0x2fc76e,_0x5d4bd7){const _0x40d97d=a36_0x1d46,_0x56737d=_0x2fc76e();while(!![]){try{const _0x41da54=-parseInt(_0x40d97d(0xb7))/0x1+-parseInt(_0x40d97d(0x8f))/0x2+-parseInt(_0x40d97d(0xba))/0x3*(parseInt(_0x40d97d(0xa6))/0x4)+parseInt(_0x40d97d(0xa1))/0x5*(-parseInt(_0x40d97d(0x9b))/0x6)+-parseInt(_0x40d97d(0x9f))/0x7+parseInt(_0x40d97d(0x95))/0x8+parseInt(_0x40d97d(0xb0))/0x9;if(_0x41da54===_0x5d4bd7)break;else _0x56737d['push'](_0x56737d['shift']());}catch(_0x1aecf7){_0x56737d['push'](_0x56737d['shift']());}}}(a36_0x1e8a,0xb81f8));import{createInterface}from'node:readline';function a36_0x1e8a(){const _0xdadfa9=['COMMON','force','conflict','nonInteractive','stderr','functionName','scriptContent','skipped','28305657wjhBtZ','length','stringify','datasetCode','unresolvable\x20target\x20path','str','message','196816JNtmeJ','Would\x20inspect\x20','question','2020623QOzXIR','\x20remote\x20Backend\x20Function\x20script(s)\x20for\x20pull','alias','hash','version','apiDir','validation','trim','scriptType','functions','Pull\x20complete:\x20','lockFilePath','parse','ENDPOINT','bff','&type=','/api/management/library/scripts/list?appCode=','Pull\x20remote\x20Backend\x20Function\x20scripts\x20to\x20local','local\x20unsynced\x20changes','toISOString','push','Remote\x20script\x20missing\x20id.','includes','\x22\x20not\x20found\x20after\x20ensureLockScope.','apps','173198EpUHIA','HOOK','map','type','hookLocation','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','11045856QybRFp','lockKey','would_pull','appCode','all','\x20skipped,\x20','186012OjsqON','Force\x20pull\x20cancelled.','filePath','GET','5439364wwByKh','operationType','220tqlPBY','boolean','No\x20remote\x20Backend\x20Function\x20scripts\x20found.','lastSync','string','8sNMEjq','bool'];a36_0x1e8a=function(){return _0xdadfa9;};return a36_0x1e8a();}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';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':a36_0x53e0c2(0x84),'command':'pull','description':a36_0x53e0c2(0x87),'risk':'read','flags':[{'name':a36_0x53e0c2(0x92),'type':a36_0x53e0c2(0xa5),'description':'Pull\x20only\x20this\x20script\x20type','enum':[a36_0x53e0c2(0xa8),a36_0x53e0c2(0xc7),a36_0x53e0c2(0x90)]},{'name':a36_0x53e0c2(0xa9),'type':a36_0x53e0c2(0xa2),'description':'Force\x20overwrite\x20local\x20unsynced\x20changes'}],async 'dryRun'(_0x48a1e8){const _0x308584=a36_0x53e0c2,_0x5b43ce=loadBffProjectConfig(_0x48a1e8[_0x308584(0x98)]),_0x237749=await readBffLockFile(_0x5b43ce[_0x308584(0xc5)]),{appLock:_0x4210ad}=ensureLockScope(_0x237749??createEmptyBffLock(),_0x48a1e8[_0x308584(0x98)],_0x5b43ce['scriptsRoot'],'pull'),_0x1054f7=normalizeBffType(_0x48a1e8[_0x308584(0xb5)]('type'))??undefined,_0x2bf402=buildDatasetCodeToAliasMap(_0x48a1e8[_0x308584(0xbf)],_0x48a1e8[_0x308584(0x98)]),[_0x1481fd,_0xdeca80]=await Promise[_0x308584(0x99)]([listBffScripts(_0x48a1e8[_0x308584(0x98)],_0x1054f7),getBffScriptStatistics(_0x48a1e8[_0x308584(0x98)])]),_0x32479a=createHookLocationMap(_0xdeca80),_0xfec3dd=[];for(const _0x371f1d of _0x1481fd){const _0x30c7a4=resolveRemoteScriptTarget(_0x5b43ce,_0x371f1d,_0x32479a,_0x4210ad['functions'],_0x2bf402);if(!_0x30c7a4){_0xfec3dd[_0x308584(0x8a)]({'scriptType':_0x371f1d['scriptType'],'functionName':_0x371f1d['functionName']??'','status':_0x308584(0xaf),'reason':_0x308584(0xb4)});continue;}const _0xc5fb0b=_0x4210ad[_0x308584(0xc3)][_0x30c7a4[_0x308584(0x96)]],_0x5663ae=_0x371f1d[_0x308584(0xae)]!=null?computeContentHash(_0x371f1d[_0x308584(0xae)]):undefined,_0x4959c8=await hasUnsyncedLocalChanges(_0x30c7a4[_0x308584(0x9d)],_0xc5fb0b,_0x5663ae);_0xfec3dd[_0x308584(0x8a)]({'lockKey':_0x30c7a4[_0x308584(0x96)],'filePath':_0x30c7a4[_0x308584(0x9d)],'remoteId':_0x371f1d['id']??null,'status':_0x4959c8?_0x308584(0xaa):_0x308584(0x97)});}return{'method':_0x308584(0x9e),'url':_0x308584(0x86)+_0x48a1e8[_0x308584(0x98)]+(_0x1054f7?_0x308584(0x85)+_0x1054f7:''),'body':{'appCode':_0x48a1e8[_0x308584(0x98)],'filterType':_0x1054f7??null,'files':_0xfec3dd},'description':_0x308584(0xb8)+_0xfec3dd[_0x308584(0xb1)]+_0x308584(0xbb)};},async 'execute'(_0x3b1782){const _0x4923e6=a36_0x53e0c2,_0x27a46a=loadBffProjectConfig(_0x3b1782[_0x4923e6(0x98)]),_0x432324=await readBffLockFile(_0x27a46a['lockFilePath']),{lockData:_0x5b41da,appLock:_0x4a64c5}=ensureLockScope(_0x432324??createEmptyBffLock(),_0x3b1782[_0x4923e6(0x98)],_0x27a46a['scriptsRoot'],'pull'),_0x2adcee=normalizeBffType(_0x3b1782['str']('type'))??undefined;if(_0x3b1782['str']('type')&&!_0x2adcee)throw CliErrors[_0x4923e6(0xc0)](_0x4923e6(0x94));const [_0x485100,_0x2dddcc]=await Promise['all']([listBffScripts(_0x3b1782['appCode'],_0x2adcee),getBffScriptStatistics(_0x3b1782[_0x4923e6(0x98)])]);if(_0x485100[_0x4923e6(0xb1)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x4923e6(0xa3)};const _0x179346=_0x3b1782[_0x4923e6(0xa7)](_0x4923e6(0xa9));if(_0x179346&&!_0x3b1782[_0x4923e6(0xab)]){const _0x453ba7=await confirmForce();if(!_0x453ba7)throw CliErrors['cancelled'](_0x4923e6(0x9c));}if(_0x179346&&_0x3b1782['nonInteractive']){}const _0x175b18=buildDatasetCodeToAliasMap(_0x3b1782['apiDir'],_0x3b1782['appCode']),_0x23630a=createHookLocationMap(_0x2dddcc),_0x53301d=JSON[_0x4923e6(0xc6)](JSON[_0x4923e6(0xb2)](_0x5b41da)),_0x2bfeb3=_0x3b1782[_0x4923e6(0x98)],_0x12a330=_0x53301d[_0x4923e6(0x8e)][_0x2bfeb3];if(!_0x12a330)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x2bfeb3+_0x4923e6(0x8d));const _0xbb6d71=[],_0x36dcf2=[],_0x1c1db3=[];for(const _0x448e7a of _0x485100){const _0x24563a=resolveRemoteScriptTarget(_0x27a46a,_0x448e7a,_0x23630a,_0x4a64c5[_0x4923e6(0xc3)],_0x175b18);if(!_0x24563a){_0x36dcf2[_0x4923e6(0x8a)]({'lockKey':_0x448e7a[_0x4923e6(0xc2)]+'/'+_0x448e7a[_0x4923e6(0xad)],'reason':_0x4923e6(0xb4)});continue;}const _0x1473e8=_0x4a64c5['functions'][_0x24563a[_0x4923e6(0x96)]];try{if(!_0x448e7a['id'])throw new Error(_0x4923e6(0x8b));if(_0x448e7a['scriptContent']==null)throw new Error('Remote\x20script\x20missing\x20content.');const _0x34a025=_0x448e7a[_0x4923e6(0xae)],_0x41fe5c=computeContentHash(_0x34a025);if(!_0x179346){const _0x1c4ab1=await hasUnsyncedLocalChanges(_0x24563a[_0x4923e6(0x9d)],_0x1473e8,_0x41fe5c);if(_0x1c4ab1){_0x36dcf2[_0x4923e6(0x8a)]({'lockKey':_0x24563a[_0x4923e6(0x96)],'reason':_0x4923e6(0x88)});continue;}}await ensureParentDirectory(_0x24563a[_0x4923e6(0x9d)]),await writeFile(_0x24563a['filePath'],_0x34a025,'utf8');const _0xcbdc8={'hash':_0x41fe5c,'remoteId':_0x448e7a['id'],'version':_0x448e7a[_0x4923e6(0xbe)]};_0x24563a[_0x4923e6(0x92)]===_0x4923e6(0x90)&&_0x24563a[_0x4923e6(0x93)]&&(_0xcbdc8[_0x4923e6(0xbc)]=_0x24563a['hookLocation'][_0x4923e6(0xbc)],_0xcbdc8['datasetCode']=_0x24563a[_0x4923e6(0x93)][_0x4923e6(0xb3)],_0xcbdc8[_0x4923e6(0xa0)]=_0x24563a['hookLocation'][_0x4923e6(0xa0)],_0xcbdc8['functionNode']=_0x24563a[_0x4923e6(0x93)]['functionNode']),_0x12a330[_0x4923e6(0xc3)][_0x24563a[_0x4923e6(0x96)]]=_0xcbdc8,_0xbb6d71[_0x4923e6(0x8a)]({'lockKey':_0x24563a[_0x4923e6(0x96)],'remoteId':_0x448e7a['id']});}catch(_0x482fac){_0x1c1db3[_0x4923e6(0x8a)]({'lockKey':_0x24563a[_0x4923e6(0x96)],'error':_0x482fac instanceof Error?_0x482fac[_0x4923e6(0xb6)]:String(_0x482fac)});}}return _0x12a330[_0x4923e6(0xa4)]=new Date()[_0x4923e6(0x89)](),await writeBffLockFile(_0x27a46a[_0x4923e6(0xc5)],_0x53301d),{'ok':_0x1c1db3[_0x4923e6(0xb1)]===0x0,'data':{'pulled':_0xbb6d71,'skipped':_0x36dcf2,'failed':_0x1c1db3},'message':_0x4923e6(0xc4)+_0xbb6d71[_0x4923e6(0xb1)]+'\x20pulled,\x20'+_0x36dcf2[_0x4923e6(0xb1)]+_0x4923e6(0x9a)+_0x1c1db3[_0x4923e6(0xb1)]+'\x20failed'};}};async function hasUnsyncedLocalChanges(_0x91f709,_0xf9b940,_0x1a0e32){const _0x319a0e=a36_0x53e0c2;if(!await fileExists(_0x91f709))return![];const _0x5677e4=await computeFileHash(_0x91f709);if(!_0xf9b940)return _0x1a0e32?_0x5677e4!==_0x1a0e32:!![];return _0x5677e4!==_0xf9b940[_0x319a0e(0xbd)];}function buildDatasetCodeToAliasMap(_0x5df946,_0x437833){const _0x28284a=a36_0x53e0c2,_0x254d14=loadAliasMap(_0x5df946,undefined,resolveApiFilePath(_0x5df946,_0x437833));return new Map(_0x254d14[_0x28284a(0x91)](_0x59e2cc=>[_0x59e2cc[_0x28284a(0xb3)],_0x59e2cc['alias']]));}async function confirmForce(){const _0x1c9eaf=a36_0x53e0c2,_0x39434c=createInterface({'input':process['stdin'],'output':process[_0x1c9eaf(0xac)]}),_0x56d3d8=await new Promise(_0x1a182f=>{const _0x2c7cd3=_0x1c9eaf;_0x39434c[_0x2c7cd3(0xb9)]('Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20',_0x1a182f);});return _0x39434c['close'](),['y','yes'][_0x1c9eaf(0x8c)](_0x56d3d8[_0x1c9eaf(0xc1)]()['toLowerCase']());}
|
package/lib/commands/bff/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a37_0x49114d=a37_0x1db6;(function(_0x2f6a5f,_0x41cc20){const _0x3cf39d=a37_0x1db6,_0x401395=_0x2f6a5f();while(!![]){try{const _0x4e991c=-parseInt(_0x3cf39d(0x22a))/0x1*(parseInt(_0x3cf39d(0x227))/0x2)+parseInt(_0x3cf39d(0x1d7))/0x3*(-parseInt(_0x3cf39d(0x1f6))/0x4)+-parseInt(_0x3cf39d(0x1ed))/0x5+parseInt(_0x3cf39d(0x1fe))/0x6*(-parseInt(_0x3cf39d(0x1e5))/0x7)+parseInt(_0x3cf39d(0x1d2))/0x8*(parseInt(_0x3cf39d(0x1e9))/0x9)+-parseInt(_0x3cf39d(0x200))/0xa+parseInt(_0x3cf39d(0x224))/0xb*(parseInt(_0x3cf39d(0x215))/0xc);if(_0x4e991c===_0x41cc20)break;else _0x401395['push'](_0x401395['shift']());}catch(_0x490055){_0x401395['push'](_0x401395['shift']());}}}(a37_0x38c1,0xe0e82));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';function a37_0x1db6(_0x298835,_0x38db3a){_0x298835=_0x298835-0x1d1;const _0x38c125=a37_0x38c1();let _0x1db632=_0x38c125[_0x298835];return _0x1db632;}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_0x49114d(0x221),'description':a37_0x49114d(0x1fd),'risk':a37_0x49114d(0x1dc),'flags':[{'name':a37_0x49114d(0x225),'type':a37_0x49114d(0x1ff),'description':a37_0x49114d(0x20f),'enum':[a37_0x49114d(0x20c),a37_0x49114d(0x21b),a37_0x49114d(0x1e2)]},{'name':a37_0x49114d(0x1ee),'type':a37_0x49114d(0x1ff),'description':a37_0x49114d(0x202)},{'name':a37_0x49114d(0x1fb),'type':a37_0x49114d(0x1dd),'description':a37_0x49114d(0x211)}],async 'validate'(_0x5392d5){validateAutomaticDeploymentSync(_0x5392d5);},async 'dryRun'(_0xe3d9a4){const _0x253296=a37_0x49114d,_0x541158=loadBffProjectConfig(_0xe3d9a4['appCode']),_0x410cd4=await readBffLockFile(_0x541158['lockFilePath']),{appLock:_0x590dfe}=ensureLockScope(_0x410cd4??createEmptyBffLock(),_0xe3d9a4[_0x253296(0x222)],_0x541158[_0x253296(0x223)],_0x253296(0x221)),_0x5ea39c=await getTargetFunctions(_0x541158,_0xe3d9a4),_0x26058a=_0xe3d9a4[_0x253296(0x1d5)](_0x253296(0x1fb)),_0xa0f379=[],_0x624887=[];for(const _0x4cea82 of _0x5ea39c){const _0x339676=await computeFileHash(_0x4cea82[_0x253296(0x1e1)]),_0x16ea86=_0x590dfe[_0x253296(0x210)][_0x4cea82[_0x253296(0x1df)]],_0x194689=!!_0x16ea86&&_0x16ea86['hash']===_0x339676,_0x243201=!_0x26058a&&_0x194689?'unchanged':_0x253296(0x1d4);_0xa0f379[_0x253296(0x221)]({'lockKey':_0x4cea82[_0x253296(0x1df)],'filePath':_0x4cea82[_0x253296(0x1e1)],'remoteId':_0x16ea86?.[_0x253296(0x1f4)]??null,'mode':_0x16ea86?.[_0x253296(0x1f4)]?'update':_0x253296(0x206),'status':_0x243201});if(_0x243201===_0x253296(0x1d4))_0x624887[_0x253296(0x221)](_0x4cea82[_0x253296(0x1ee)]);}return{'method':_0x253296(0x214),'url':'/api/management/library/scripts/save','deploymentSync':buildAutomaticDeploymentSyncPreview(_0xe3d9a4,'bff',_0x624887),'body':{'appCode':_0xe3d9a4[_0x253296(0x222)],'force':_0x26058a,'files':_0xa0f379,'cacheClearAtRuntime':_0xa0f379[_0x253296(0x1d8)](_0x57d925=>_0x57d925[_0x253296(0x1fa)]===_0x253296(0x1d4)),'cacheClearAtRuntimeTimes':_0xa0f379[_0x253296(0x1d8)](_0x1e53b1=>_0x1e53b1[_0x253296(0x1fa)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x253296(0x1e0)+_0xa0f379[_0x253296(0x220)]+_0x253296(0x207)};},async 'execute'(_0x3b4c84){const _0x528a15=a37_0x49114d,_0xe87ebd=loadBffProjectConfig(_0x3b4c84[_0x528a15(0x222)]),_0x4f28dc=await readBffLockFile(_0xe87ebd[_0x528a15(0x20e)]),{lockData:_0x16c24f,appLock:_0x3d4d6b}=ensureLockScope(_0x4f28dc??createEmptyBffLock(),_0x3b4c84[_0x528a15(0x222)],_0xe87ebd['scriptsRoot'],_0x528a15(0x221)),_0x301490=await getTargetFunctions(_0xe87ebd,_0x3b4c84);if(_0x301490[_0x528a15(0x220)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x528a15(0x1ef)};const _0x48dbe6=_0x3b4c84[_0x528a15(0x1d5)](_0x528a15(0x1fb)),_0x55b8cc=JSON[_0x528a15(0x204)](JSON[_0x528a15(0x1ec)](_0x16c24f)),_0x4ef388=_0x55b8cc[_0x528a15(0x20d)][_0x3b4c84[_0x528a15(0x222)]];if(!_0x4ef388)throw new Error(_0x528a15(0x21a)+_0x3b4c84[_0x528a15(0x222)]+_0x528a15(0x1db));const _0x36640d=await buildHookMaps(_0x3b4c84[_0x528a15(0x222)],_0x3b4c84['apiDir'],_0x301490,_0x4ef388),_0x1c68f1=[],_0x30ead7=[],_0x59f0ff=[],_0x10502f=[];for(const _0x58cc32 of _0x301490){const _0x47281e=await computeFileHash(_0x58cc32[_0x528a15(0x1e1)]),_0x311a62=_0x4ef388[_0x528a15(0x210)][_0x58cc32['lockKey']];if(!_0x48dbe6&&_0x311a62&&_0x311a62['hash']===_0x47281e){_0x59f0ff['push']({'lockKey':_0x58cc32[_0x528a15(0x1df)],'reason':_0x528a15(0x1f1)});continue;}try{await uploadSingleFunction(_0x3b4c84[_0x528a15(0x222)],_0x58cc32,_0x4ef388,_0x36640d);const _0x12ea45=_0x4ef388['functions'][_0x58cc32[_0x528a15(0x1df)]];_0x1c68f1[_0x528a15(0x221)]({'lockKey':_0x58cc32[_0x528a15(0x1df)],'remoteId':_0x12ea45?.[_0x528a15(0x1f4)]??0x0}),_0x30ead7[_0x528a15(0x221)](_0x58cc32[_0x528a15(0x1ee)]);}catch(_0x4423dc){_0x10502f['push']({'lockKey':_0x58cc32[_0x528a15(0x1df)],'error':_0x4423dc instanceof Error?_0x4423dc['message']:String(_0x4423dc)});}}_0x4ef388[_0x528a15(0x218)]=new Date()[_0x528a15(0x1f8)](),await writeBffLockFile(_0xe87ebd[_0x528a15(0x20e)],_0x55b8cc),await waitForUploadedLockEntries(_0xe87ebd[_0x528a15(0x20e)],_0x3b4c84[_0x528a15(0x222)],_0x1c68f1[_0x528a15(0x1eb)](_0x21b360=>_0x21b360[_0x528a15(0x1df)]));let _0xe57007={'attempted':![],'cleared':![]};if(_0x1c68f1['length']>0x0)try{let _0x5f017d='';for(let _0x2879ed=0x0;_0x2879ed<CACHE_CLEAR_ATTEMPTS;_0x2879ed+=0x1){_0x5f017d=await clearBffScriptCache(),_0x2879ed<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0xe57007={'attempted':!![],'cleared':!![],'message':_0x5f017d||_0x528a15(0x201)};}catch(_0xfe8df4){_0xe57007={'attempted':!![],'cleared':![],'error':_0xfe8df4 instanceof Error?_0xfe8df4[_0x528a15(0x20b)]:String(_0xfe8df4)};}const _0x30a36f=_0x10502f['length']===0x0&&(_0xe57007['attempted']?_0xe57007[_0x528a15(0x217)]:!![]),_0x3f4e8f=await runAutomaticDeploymentSync(_0x3b4c84,_0x528a15(0x1fc),_0x30ead7,_0x30a36f),_0xf2fac0=_0x30a36f&&automaticDeploymentSyncSucceeded(_0x3f4e8f),_0x2d255d=_0xe57007[_0x528a15(0x212)]?_0xe57007[_0x528a15(0x217)]?_0x528a15(0x208):_0x528a15(0x1f0):'runtime\x20cache\x20not\x20needed',_0x3b8eca=_0x3f4e8f[_0x528a15(0x1d3)]?_0x528a15(0x20a)+_0x3f4e8f[_0x528a15(0x1fa)]:'';return{'ok':_0xf2fac0,'data':{'uploaded':_0x1c68f1,'skipped':_0x59f0ff,'failed':_0x10502f,'cacheClear':_0xe57007,'deploymentSync':_0x3f4e8f},'message':'Push\x20complete:\x20'+_0x1c68f1[_0x528a15(0x220)]+'\x20uploaded,\x20'+_0x59f0ff['length']+_0x528a15(0x1de)+_0x10502f[_0x528a15(0x220)]+_0x528a15(0x1d6)+_0x2d255d+_0x3b8eca};}};function a37_0x38c1(){const _0x474f61=['\x22.\x20','cleared','lastSync','has','Lock\x20scope\x20for\x20app\x20\x22','ENDPOINT','datasetCodeToDataset','get','str','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','length','push','appCode','scriptsRoot','8640478nvUgFS','type','join','212QtTOhr','operationType','utf8','6771tcHYRT','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','version','7955128DFjlfn','configured','would_push','bool','\x20failed,\x20','9CeUIkV','some','Incomplete\x20HOOK\x20path:\x20','datasetId','\x22\x20not\x20found\x20after\x20ensureLockScope.','write','boolean','\x20skipped,\x20','lockKey','Would\x20inspect\x20','filePath','HOOK','aliasToDatasetCode','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','163121WRIEDZ','functionNode','datasetCode','Run\x20`','9AFgbHH','Local\x20function\x20not\x20found:\x20','map','stringify','5392715LuyyTm','name','No\x20local\x20Backend\x20Function\x20scripts\x20found.','runtime\x20cache\x20clear\x20failed','unchanged','code',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','remoteId','filter','211876HIhlWV','validation','toISOString','description','status','force','bff','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','444PteuSj','string','3210650rgTdlR','Runtime\x20script\x20cache\x20cleared.','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','every','parse','alias','create','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','runtime\x20cache\x20cleared','Cannot\x20resolve\x20dataset\x20for\x20\x22',',\x20deployment\x20sync\x20','message','COMMON','apps','lockFilePath','Push\x20only\x20this\x20script\x20type','functions','Force\x20push\x20ignoring\x20hash\x20protection','attempted','script','POST','60bhXqyn'];a37_0x38c1=function(){return _0x474f61;};return a37_0x38c1();}async function getTargetFunctions(_0x11b74b,_0x14e768){const _0x2eeaca=a37_0x49114d,_0x3d33dd=_0x14e768['str'](_0x2eeaca(0x225)),_0x5e7b75=_0x14e768[_0x2eeaca(0x21e)](_0x2eeaca(0x1ee)),_0x50f1a8=normalizeBffType(_0x3d33dd)??undefined;if(_0x5e7b75&&!_0x50f1a8)throw CliErrors[_0x2eeaca(0x1f7)](_0x2eeaca(0x21f));const _0x36b55f=await scanLocalBffFunctions(_0x11b74b,_0x50f1a8);if(_0x5e7b75){const _0x23f055=_0x36b55f[_0x2eeaca(0x1f5)](_0x1544fb=>_0x1544fb[_0x2eeaca(0x1ee)]===_0x5e7b75);if(_0x23f055[_0x2eeaca(0x220)]===0x0)throw CliErrors[_0x2eeaca(0x1f7)](_0x2eeaca(0x1ea)+_0x50f1a8+'/'+_0x5e7b75);return _0x23f055;}return _0x36b55f;}async function buildHookMaps(_0x4b6155,_0x28387f,_0x53722a,_0x5ba25e){const _0x48d191=a37_0x49114d,_0x35c28e=_0x53722a[_0x48d191(0x1d8)](_0x3b90a8=>_0x3b90a8[_0x48d191(0x225)]===_0x48d191(0x1e2));if(!_0x35c28e)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x4e4277=loadAliasMap(_0x28387f,undefined,resolveApiFilePath(_0x28387f,_0x4b6155)),_0x2196b2=new Map(_0x4e4277[_0x48d191(0x1eb)](_0x316b3d=>[_0x316b3d[_0x48d191(0x205)],_0x316b3d[_0x48d191(0x1e7)]]));for(const _0x4d6de5 of Object['values'](_0x5ba25e[_0x48d191(0x210)])){_0x4d6de5[_0x48d191(0x205)]&&_0x4d6de5[_0x48d191(0x1e7)]&&!_0x2196b2[_0x48d191(0x219)](_0x4d6de5['alias'])&&_0x2196b2['set'](_0x4d6de5['alias'],_0x4d6de5['datasetCode']);}const _0x281097=await listDatasets(_0x4b6155),_0x287e84=new Map(_0x281097[_0x48d191(0x1eb)](_0x55a120=>[_0x55a120[_0x48d191(0x1f2)],_0x55a120]));return{'aliasToDatasetCode':_0x2196b2,'datasetCodeToDataset':_0x287e84};}async function uploadSingleFunction(_0x52065b,_0x314750,_0x3a695e,_0x15910c){const _0x1564cc=a37_0x49114d,_0x343628=await readFile(_0x314750['filePath'],_0x1564cc(0x229)),_0x355ce1=await computeFileHash(_0x314750[_0x1564cc(0x1e1)]),_0x496b2f=_0x3a695e[_0x1564cc(0x210)][_0x314750[_0x1564cc(0x1df)]];if(_0x496b2f?.[_0x1564cc(0x1f4)]&&_0x496b2f[_0x1564cc(0x1d1)]==null)throw CliErrors[_0x1564cc(0x1f7)](_0x314750[_0x1564cc(0x1df)]+_0x1564cc(0x1f3));let _0xff1e9b=extractScriptDescription(_0x343628);if(!_0xff1e9b&&_0x496b2f?.[_0x1564cc(0x1f4)]){const _0x57d757=await getBffScriptInfo(_0x496b2f[_0x1564cc(0x1f4)]);_0xff1e9b=_0x57d757[_0x1564cc(0x1f9)]||undefined;}const _0x433611={'appCode':_0x52065b,'functionName':_0x314750[_0x1564cc(0x1ee)],'scriptType':_0x314750[_0x1564cc(0x225)],'scriptContent':_0x343628};if(_0x496b2f?.[_0x1564cc(0x1f4)])_0x433611['id']=_0x496b2f[_0x1564cc(0x1f4)];if(_0x496b2f?.[_0x1564cc(0x1d1)]!=null)_0x433611['version']=_0x496b2f[_0x1564cc(0x1d1)];if(_0xff1e9b)_0x433611[_0x1564cc(0x1f9)]=_0xff1e9b;if(_0x314750[_0x1564cc(0x225)]===_0x1564cc(0x1e2)){const _0x5ea9b7=_0x314750[_0x1564cc(0x205)];if(!_0x5ea9b7||!_0x314750[_0x1564cc(0x228)]||!_0x314750[_0x1564cc(0x1e6)])throw CliErrors[_0x1564cc(0x1f7)](_0x1564cc(0x1d9)+_0x314750[_0x1564cc(0x1df)]);const _0xe16df2=_0x15910c[_0x1564cc(0x1e3)][_0x1564cc(0x21d)](_0x5ea9b7)??_0x496b2f?.['datasetCode']??_0x5ea9b7,_0x4220a0=_0x15910c[_0x1564cc(0x21c)][_0x1564cc(0x21d)](_0xe16df2);if(!_0x4220a0)throw CliErrors[_0x1564cc(0x1f7)](_0x1564cc(0x209)+_0x5ea9b7+_0x1564cc(0x216)+(_0x1564cc(0x1e8)+CLI_BIN_NAME+_0x1564cc(0x22b)));_0x433611[_0x1564cc(0x1da)]=_0x4220a0['id'],_0x433611[_0x1564cc(0x228)]=_0x314750[_0x1564cc(0x228)],_0x433611[_0x1564cc(0x1e6)]=_0x314750[_0x1564cc(0x1e6)];}const _0x1b06ed=await saveBffScript(_0x433611),_0x33783e=_0x1b06ed['id'],_0x5248f8=_0x1b06ed[_0x1564cc(0x213)]??await getBffScriptInfo(_0x33783e),_0x1acb3f={'hash':_0x355ce1,'remoteId':_0x33783e,'version':_0x5248f8['version']};if(_0x314750['type']==='HOOK'){const _0xb06e2b=_0x314750['alias'],_0x35594c=_0x15910c[_0x1564cc(0x1e3)][_0x1564cc(0x21d)](_0xb06e2b)??_0x496b2f?.[_0x1564cc(0x1e7)]??_0xb06e2b;_0x15910c['aliasToDatasetCode'][_0x1564cc(0x219)](_0xb06e2b)?_0x1acb3f['alias']=_0xb06e2b:_0x1acb3f[_0x1564cc(0x205)]=_0x496b2f?.[_0x1564cc(0x205)],_0x1acb3f[_0x1564cc(0x1e7)]=_0x35594c,_0x1acb3f['operationType']=_0x314750[_0x1564cc(0x228)],_0x1acb3f[_0x1564cc(0x1e6)]=_0x314750[_0x1564cc(0x1e6)];}_0x3a695e[_0x1564cc(0x210)][_0x314750[_0x1564cc(0x1df)]]=_0x1acb3f;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x12f4ee,_0x573f39,_0x232fb2){const _0x255cad=a37_0x49114d;if(_0x232fb2[_0x255cad(0x220)]===0x0)return;for(let _0x2098eb=0x0;_0x2098eb<LOCK_SETTLE_RETRY_COUNT;_0x2098eb+=0x1){const _0xa37f8=await readBffLockFile(_0x12f4ee),_0x50faef=_0xa37f8?.[_0x255cad(0x20d)]?.[_0x573f39]?.[_0x255cad(0x210)]??{},_0x31dfa9=_0x232fb2[_0x255cad(0x203)](_0x4246a3=>!!_0x50faef[_0x4246a3]?.[_0x255cad(0x1f4)]);if(_0x31dfa9)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x255cad(0x1e4)+_0x232fb2[_0x255cad(0x226)](',\x20')+'.');}
|
|
1
|
+
const a37_0x33896e=a37_0x2aad;(function(_0x28b26e,_0x2b8f83){const _0x5102f4=a37_0x2aad,_0x87efb2=_0x28b26e();while(!![]){try{const _0x5e8047=parseInt(_0x5102f4(0x11e))/0x1*(parseInt(_0x5102f4(0x127))/0x2)+-parseInt(_0x5102f4(0xed))/0x3*(-parseInt(_0x5102f4(0x131))/0x4)+-parseInt(_0x5102f4(0x119))/0x5*(-parseInt(_0x5102f4(0x129))/0x6)+parseInt(_0x5102f4(0x10a))/0x7+-parseInt(_0x5102f4(0xf6))/0x8+-parseInt(_0x5102f4(0x126))/0x9+-parseInt(_0x5102f4(0xf0))/0xa*(parseInt(_0x5102f4(0x125))/0xb);if(_0x5e8047===_0x2b8f83)break;else _0x87efb2['push'](_0x87efb2['shift']());}catch(_0x50d2ab){_0x87efb2['push'](_0x87efb2['shift']());}}}(a37_0x4569,0xc9b84));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';function a37_0x4569(){const _0x5b493f=['remoteId','6URzKMD','type','runtime\x20cache\x20not\x20needed','datasetCode','filePath','every','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','unchanged','3098696rBymIy','\x22\x20not\x20found\x20after\x20ensureLockScope.','get','cleared','lockKey','Would\x20inspect\x20','validation','utf8','string','stringify','version','lockFilePath','functions','datasetId','alias','No\x20local\x20Backend\x20Function\x20scripts\x20found.','COMMON','6fswPsW','appCode','values','21260JCQbom','runtime\x20cache\x20clear\x20failed','would_push','boolean','apiDir','set','931304pOGONE','configured','runtime\x20cache\x20cleared','bool','some','Push\x20only\x20this\x20script\x20type','aliasToDatasetCode','force','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','ENDPOINT','operationType','bff','Lock\x20scope\x20for\x20app\x20\x22','create','str','functionNode','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','push','HOOK','Local\x20function\x20not\x20found:\x20','1107316echVHi','/api/management/library/scripts/save','filter','Cannot\x20resolve\x20dataset\x20for\x20\x22','name',',\x20deployment\x20sync\x20','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','script','\x20failed,\x20','message','apps','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','code','length','parse','7896605CgYDWe','description','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','status','scriptsRoot','1RtBrsX','POST','toISOString','attempted','lastSync','hash','map','12397koJCba','13130811UtPdYV','3021562NvYKko'];a37_0x4569=function(){return _0x5b493f;};return a37_0x4569();}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';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_0x33896e(0x107),'description':a37_0x33896e(0x110),'risk':'write','flags':[{'name':a37_0x33896e(0x12a),'type':a37_0x33896e(0x139),'description':a37_0x33896e(0xfb),'enum':[a37_0x33896e(0xec),a37_0x33896e(0xff),'HOOK']},{'name':a37_0x33896e(0x10e),'type':a37_0x33896e(0x139),'description':a37_0x33896e(0xfe)},{'name':a37_0x33896e(0xfd),'type':a37_0x33896e(0xf3),'description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'validate'(_0xc263be){validateAutomaticDeploymentSync(_0xc263be);},async 'dryRun'(_0x5b2725){const _0x21d85c=a37_0x33896e,_0x47495c=loadBffProjectConfig(_0x5b2725['appCode']),_0x2c2c73=await readBffLockFile(_0x47495c['lockFilePath']),{appLock:_0x54ed32}=ensureLockScope(_0x2c2c73??createEmptyBffLock(),_0x5b2725[_0x21d85c(0xee)],_0x47495c[_0x21d85c(0x11d)],_0x21d85c(0x107)),_0x153c84=await getTargetFunctions(_0x47495c,_0x5b2725),_0x4b0f00=_0x5b2725[_0x21d85c(0xf9)](_0x21d85c(0xfd)),_0x216f81=[],_0x308086=[];for(const _0x1eda21 of _0x153c84){const _0x402816=await computeFileHash(_0x1eda21[_0x21d85c(0x12d)]),_0x2c500d=_0x54ed32[_0x21d85c(0xe8)][_0x1eda21['lockKey']],_0x36296e=!!_0x2c500d&&_0x2c500d[_0x21d85c(0x123)]===_0x402816,_0x44845c=!_0x4b0f00&&_0x36296e?_0x21d85c(0x130):'would_push';_0x216f81['push']({'lockKey':_0x1eda21[_0x21d85c(0x135)],'filePath':_0x1eda21[_0x21d85c(0x12d)],'remoteId':_0x2c500d?.[_0x21d85c(0x128)]??null,'mode':_0x2c500d?.[_0x21d85c(0x128)]?'update':_0x21d85c(0x103),'status':_0x44845c});if(_0x44845c==='would_push')_0x308086[_0x21d85c(0x107)](_0x1eda21[_0x21d85c(0x10e)]);}return{'method':_0x21d85c(0x11f),'url':_0x21d85c(0x10b),'deploymentSync':buildAutomaticDeploymentSyncPreview(_0x5b2725,_0x21d85c(0x101),_0x308086),'body':{'appCode':_0x5b2725['appCode'],'force':_0x4b0f00,'files':_0x216f81,'cacheClearAtRuntime':_0x216f81[_0x21d85c(0xfa)](_0x1ec91e=>_0x1ec91e['status']==='would_push'),'cacheClearAtRuntimeTimes':_0x216f81[_0x21d85c(0xfa)](_0x30ac1d=>_0x30ac1d[_0x21d85c(0x11c)]===_0x21d85c(0xf2))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x21d85c(0x136)+_0x216f81['length']+_0x21d85c(0x11b)};},async 'execute'(_0x230791){const _0x1a33b7=a37_0x33896e,_0x2de4c4=loadBffProjectConfig(_0x230791[_0x1a33b7(0xee)]),_0x193427=await readBffLockFile(_0x2de4c4[_0x1a33b7(0xe7)]),{lockData:_0x5b34f7,appLock:_0x32cfe5}=ensureLockScope(_0x193427??createEmptyBffLock(),_0x230791[_0x1a33b7(0xee)],_0x2de4c4[_0x1a33b7(0x11d)],_0x1a33b7(0x107)),_0x498ab7=await getTargetFunctions(_0x2de4c4,_0x230791);if(_0x498ab7[_0x1a33b7(0x117)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x1a33b7(0xeb)};const _0x4702d7=_0x230791[_0x1a33b7(0xf9)](_0x1a33b7(0xfd)),_0x1f40f4=JSON[_0x1a33b7(0x118)](JSON[_0x1a33b7(0x13a)](_0x5b34f7)),_0x4e772e=_0x1f40f4[_0x1a33b7(0x114)][_0x230791[_0x1a33b7(0xee)]];if(!_0x4e772e)throw new Error(_0x1a33b7(0x102)+_0x230791[_0x1a33b7(0xee)]+_0x1a33b7(0x132));const _0x3fab85=await buildHookMaps(_0x230791[_0x1a33b7(0xee)],_0x230791[_0x1a33b7(0xf4)],_0x498ab7,_0x4e772e),_0x4a961e=[],_0x4728dc=[],_0xbb2292=[],_0x279133=[];for(const _0x5a72d0 of _0x498ab7){const _0x12f8f7=await computeFileHash(_0x5a72d0['filePath']),_0x264065=_0x4e772e[_0x1a33b7(0xe8)][_0x5a72d0[_0x1a33b7(0x135)]];if(!_0x4702d7&&_0x264065&&_0x264065[_0x1a33b7(0x123)]===_0x12f8f7){_0xbb2292[_0x1a33b7(0x107)]({'lockKey':_0x5a72d0[_0x1a33b7(0x135)],'reason':_0x1a33b7(0x130)});continue;}try{await uploadSingleFunction(_0x230791[_0x1a33b7(0xee)],_0x5a72d0,_0x4e772e,_0x3fab85);const _0x3dc594=_0x4e772e[_0x1a33b7(0xe8)][_0x5a72d0['lockKey']];_0x4a961e['push']({'lockKey':_0x5a72d0[_0x1a33b7(0x135)],'remoteId':_0x3dc594?.['remoteId']??0x0}),_0x4728dc[_0x1a33b7(0x107)](_0x5a72d0['name']);}catch(_0x3f096c){_0x279133['push']({'lockKey':_0x5a72d0['lockKey'],'error':_0x3f096c instanceof Error?_0x3f096c[_0x1a33b7(0x113)]:String(_0x3f096c)});}}_0x4e772e[_0x1a33b7(0x122)]=new Date()[_0x1a33b7(0x120)](),await writeBffLockFile(_0x2de4c4[_0x1a33b7(0xe7)],_0x1f40f4),await waitForUploadedLockEntries(_0x2de4c4[_0x1a33b7(0xe7)],_0x230791['appCode'],_0x4a961e[_0x1a33b7(0x124)](_0x220404=>_0x220404[_0x1a33b7(0x135)]));let _0x13271f={'attempted':![],'cleared':![]};if(_0x4a961e[_0x1a33b7(0x117)]>0x0)try{let _0x49c3b9='';for(let _0x249684=0x0;_0x249684<CACHE_CLEAR_ATTEMPTS;_0x249684+=0x1){_0x49c3b9=await clearBffScriptCache(),_0x249684<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x13271f={'attempted':!![],'cleared':!![],'message':_0x49c3b9||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0x2fbd6a){_0x13271f={'attempted':!![],'cleared':![],'error':_0x2fbd6a instanceof Error?_0x2fbd6a['message']:String(_0x2fbd6a)};}const _0x5a14ed=_0x279133['length']===0x0&&(_0x13271f[_0x1a33b7(0x121)]?_0x13271f[_0x1a33b7(0x134)]:!![]),_0x489996=await runAutomaticDeploymentSync(_0x230791,'bff',_0x4728dc,_0x5a14ed),_0x361737=_0x5a14ed&&automaticDeploymentSyncSucceeded(_0x489996),_0x540d2c=_0x13271f[_0x1a33b7(0x121)]?_0x13271f[_0x1a33b7(0x134)]?_0x1a33b7(0xf8):_0x1a33b7(0xf1):_0x1a33b7(0x12b),_0x5f3dfc=_0x489996[_0x1a33b7(0xf7)]?_0x1a33b7(0x10f)+_0x489996[_0x1a33b7(0x11c)]:'';return{'ok':_0x361737,'data':{'uploaded':_0x4a961e,'skipped':_0xbb2292,'failed':_0x279133,'cacheClear':_0x13271f,'deploymentSync':_0x489996},'message':'Push\x20complete:\x20'+_0x4a961e[_0x1a33b7(0x117)]+'\x20uploaded,\x20'+_0xbb2292[_0x1a33b7(0x117)]+'\x20skipped,\x20'+_0x279133['length']+_0x1a33b7(0x112)+_0x540d2c+_0x5f3dfc};}};async function getTargetFunctions(_0x3fdb6c,_0x18f478){const _0x35e844=a37_0x33896e,_0x470353=_0x18f478[_0x35e844(0x104)]('type'),_0x462425=_0x18f478[_0x35e844(0x104)](_0x35e844(0x10e)),_0x3f0cf6=normalizeBffType(_0x470353)??undefined;if(_0x462425&&!_0x3f0cf6)throw CliErrors['validation'](_0x35e844(0x12f));const _0x408868=await scanLocalBffFunctions(_0x3fdb6c,_0x3f0cf6);if(_0x462425){const _0x5aa90a=_0x408868[_0x35e844(0x10c)](_0x102941=>_0x102941[_0x35e844(0x10e)]===_0x462425);if(_0x5aa90a[_0x35e844(0x117)]===0x0)throw CliErrors['validation'](_0x35e844(0x109)+_0x3f0cf6+'/'+_0x462425);return _0x5aa90a;}return _0x408868;}function a37_0x2aad(_0x304bcf,_0x3971d2){_0x304bcf=_0x304bcf-0xe7;const _0x45693f=a37_0x4569();let _0x2aad7a=_0x45693f[_0x304bcf];return _0x2aad7a;}async function buildHookMaps(_0x5f0537,_0x413502,_0x313879,_0x3a8ced){const _0xe63610=a37_0x33896e,_0x80f0b7=_0x313879[_0xe63610(0xfa)](_0x58b17b=>_0x58b17b['type']===_0xe63610(0x108));if(!_0x80f0b7)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x1b72b3=loadAliasMap(_0x413502,undefined,resolveApiFilePath(_0x413502,_0x5f0537)),_0x3682ae=new Map(_0x1b72b3[_0xe63610(0x124)](_0x566028=>[_0x566028[_0xe63610(0xea)],_0x566028['datasetCode']]));for(const _0x2389d3 of Object[_0xe63610(0xef)](_0x3a8ced[_0xe63610(0xe8)])){_0x2389d3[_0xe63610(0xea)]&&_0x2389d3[_0xe63610(0x12c)]&&!_0x3682ae['has'](_0x2389d3['alias'])&&_0x3682ae[_0xe63610(0xf5)](_0x2389d3[_0xe63610(0xea)],_0x2389d3['datasetCode']);}const _0x112475=await listDatasets(_0x5f0537),_0x1dacc0=new Map(_0x112475['map'](_0x4dbd47=>[_0x4dbd47[_0xe63610(0x116)],_0x4dbd47]));return{'aliasToDatasetCode':_0x3682ae,'datasetCodeToDataset':_0x1dacc0};}async function uploadSingleFunction(_0x1e2c13,_0x336707,_0x22d653,_0x233100){const _0x52dc9e=a37_0x33896e,_0x5a1ed4=await readFile(_0x336707['filePath'],_0x52dc9e(0x138)),_0x4b5c7a=await computeFileHash(_0x336707[_0x52dc9e(0x12d)]),_0x4a36b0=_0x22d653['functions'][_0x336707[_0x52dc9e(0x135)]];if(_0x4a36b0?.[_0x52dc9e(0x128)]&&_0x4a36b0[_0x52dc9e(0x13b)]==null)throw CliErrors[_0x52dc9e(0x137)](_0x336707[_0x52dc9e(0x135)]+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x2472ac=extractScriptDescription(_0x5a1ed4);if(!_0x2472ac&&_0x4a36b0?.[_0x52dc9e(0x128)]){const _0x5c4f2c=await getBffScriptInfo(_0x4a36b0['remoteId']);_0x2472ac=_0x5c4f2c[_0x52dc9e(0x11a)]||undefined;}const _0x317152={'appCode':_0x1e2c13,'functionName':_0x336707[_0x52dc9e(0x10e)],'scriptType':_0x336707[_0x52dc9e(0x12a)],'scriptContent':_0x5a1ed4};if(_0x4a36b0?.['remoteId'])_0x317152['id']=_0x4a36b0[_0x52dc9e(0x128)];if(_0x4a36b0?.[_0x52dc9e(0x13b)]!=null)_0x317152[_0x52dc9e(0x13b)]=_0x4a36b0[_0x52dc9e(0x13b)];if(_0x2472ac)_0x317152['description']=_0x2472ac;if(_0x336707[_0x52dc9e(0x12a)]===_0x52dc9e(0x108)){const _0xb4d8a2=_0x336707[_0x52dc9e(0xea)];if(!_0xb4d8a2||!_0x336707[_0x52dc9e(0x100)]||!_0x336707[_0x52dc9e(0x105)])throw CliErrors[_0x52dc9e(0x137)]('Incomplete\x20HOOK\x20path:\x20'+_0x336707[_0x52dc9e(0x135)]);const _0x2fc6a1=_0x233100['aliasToDatasetCode'][_0x52dc9e(0x133)](_0xb4d8a2)??_0x4a36b0?.['datasetCode']??_0xb4d8a2,_0x4c9c18=_0x233100['datasetCodeToDataset']['get'](_0x2fc6a1);if(!_0x4c9c18)throw CliErrors[_0x52dc9e(0x137)](_0x52dc9e(0x10d)+_0xb4d8a2+'\x22.\x20'+('Run\x20`'+CLI_BIN_NAME+_0x52dc9e(0x115)));_0x317152[_0x52dc9e(0xe9)]=_0x4c9c18['id'],_0x317152[_0x52dc9e(0x100)]=_0x336707['operationType'],_0x317152[_0x52dc9e(0x105)]=_0x336707[_0x52dc9e(0x105)];}const _0x3124b6=await saveBffScript(_0x317152),_0x5180cb=_0x3124b6['id'],_0x1d723a=_0x3124b6[_0x52dc9e(0x111)]??await getBffScriptInfo(_0x5180cb),_0x28ca97={'hash':_0x4b5c7a,'remoteId':_0x5180cb,'version':_0x1d723a['version']};if(_0x336707['type']===_0x52dc9e(0x108)){const _0x313b9c=_0x336707[_0x52dc9e(0xea)],_0x42b8c0=_0x233100[_0x52dc9e(0xfc)][_0x52dc9e(0x133)](_0x313b9c)??_0x4a36b0?.[_0x52dc9e(0x12c)]??_0x313b9c;_0x233100[_0x52dc9e(0xfc)]['has'](_0x313b9c)?_0x28ca97[_0x52dc9e(0xea)]=_0x313b9c:_0x28ca97[_0x52dc9e(0xea)]=_0x4a36b0?.['alias'],_0x28ca97['datasetCode']=_0x42b8c0,_0x28ca97['operationType']=_0x336707[_0x52dc9e(0x100)],_0x28ca97['functionNode']=_0x336707['functionNode'];}_0x22d653[_0x52dc9e(0xe8)][_0x336707['lockKey']]=_0x28ca97;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x490ae9,_0x1b44b3,_0x1fbbe9){const _0x5b30ac=a37_0x33896e;if(_0x1fbbe9[_0x5b30ac(0x117)]===0x0)return;for(let _0x41f6ec=0x0;_0x41f6ec<LOCK_SETTLE_RETRY_COUNT;_0x41f6ec+=0x1){const _0x4a57fa=await readBffLockFile(_0x490ae9),_0x503216=_0x4a57fa?.[_0x5b30ac(0x114)]?.[_0x1b44b3]?.[_0x5b30ac(0xe8)]??{},_0x2a9fd6=_0x1fbbe9[_0x5b30ac(0x12e)](_0x4b2314=>!!_0x503216[_0x4b2314]?.[_0x5b30ac(0x128)]);if(_0x2a9fd6)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x5b30ac(0x106)+_0x1fbbe9['join'](',\x20')+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a38_0x4689f1=a38_0xc654;function a38_0x598a(){const _0x5286dd=['length','remote','20073130SCGMOP','filePath','444lVHnsW','datasetCode','lockKey','push','bff','all','10180TSDtqh','hash','functions','boolean','9461YHYxON','Check\x20local\x20Backend\x20Function\x20sync\x20status\x20against\x20lock\x20file','4348MshrAP','\x20remote-only','alias','\x20unchanged','3100257iqMufe','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','appCode','scriptsRoot','\x20added,\x20','5728016oSCPyk','has','1569ejPbBB','180StSOtv','3588571TVVxyA','map','apiDir'];a38_0x598a=function(){return _0x5286dd;};return a38_0x598a();}function a38_0xc654(_0x2c509c,_0x18f4e5){_0x2c509c=_0x2c509c-0x1a9;const _0x598a42=a38_0x598a();let _0xc6549c=_0x598a42[_0x2c509c];return _0xc6549c;}(function(_0x48ab8f,_0x143580){const _0x3d072c=a38_0xc654,_0x25c45e=_0x48ab8f();while(!![]){try{const _0x29a3d1=-parseInt(_0x3d072c(0x1c2))/0x1*(parseInt(_0x3d072c(0x1b0))/0x2)+-parseInt(_0x3d072c(0x1af))/0x3*(parseInt(_0x3d072c(0x1c4))/0x4)+-parseInt(_0x3d072c(0x1be))/0x5*(-parseInt(_0x3d072c(0x1b8))/0x6)+parseInt(_0x3d072c(0x1b1))/0x7+-parseInt(_0x3d072c(0x1ad))/0x8+parseInt(_0x3d072c(0x1c8))/0x9+parseInt(_0x3d072c(0x1b6))/0xa;if(_0x29a3d1===_0x143580)break;else _0x25c45e['push'](_0x25c45e['shift']());}catch(_0x2eeb9d){_0x25c45e['push'](_0x25c45e['shift']());}}}(a38_0x598a,0xd6a06));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,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_0x4689f1(0x1bc),'command':'status','description':a38_0x4689f1(0x1c3),'risk':'read','flags':[{'name':'remote','type':a38_0x4689f1(0x1c1),'description':a38_0x4689f1(0x1a9)}],async 'execute'(_0x56d085){const _0x5b4d38=a38_0x4689f1,_0x409ea2=loadBffProjectConfig(_0x56d085['appCode']),_0x361018=await readBffLockFile(_0x409ea2['lockFilePath']),{appLock:_0x193110}=ensureLockScope(_0x361018??createEmptyBffLock(),_0x56d085['appCode'],_0x409ea2[_0x5b4d38(0x1ab)],'status'),_0x57a490=await scanLocalBffFunctions(_0x409ea2),_0x154e6e=[],_0x5afa76=[],_0x236ed7=[];for(const _0x1eb77b of _0x57a490){const _0x3dbbc7=await computeFileHash(_0x1eb77b[_0x5b4d38(0x1b7)]),_0x241030=_0x193110[_0x5b4d38(0x1c0)][_0x1eb77b[_0x5b4d38(0x1ba)]];if(!_0x241030)_0x154e6e[_0x5b4d38(0x1bb)](_0x1eb77b[_0x5b4d38(0x1ba)]);else _0x241030[_0x5b4d38(0x1bf)]!==_0x3dbbc7?_0x5afa76['push'](_0x1eb77b[_0x5b4d38(0x1ba)]):_0x236ed7[_0x5b4d38(0x1bb)](_0x1eb77b[_0x5b4d38(0x1ba)]);}const _0x348924=[];if(_0x56d085['bool'](_0x5b4d38(0x1b5))){const _0x23749a=loadAliasMap(_0x56d085[_0x5b4d38(0x1b3)],undefined,resolveApiFilePath(_0x56d085[_0x5b4d38(0x1b3)],_0x56d085[_0x5b4d38(0x1aa)])),_0x4a5132=new Map(_0x23749a[_0x5b4d38(0x1b2)](_0x12f926=>[_0x12f926[_0x5b4d38(0x1b9)],_0x12f926[_0x5b4d38(0x1c6)]])),[_0x50ecf6,_0x3491ac]=await Promise[_0x5b4d38(0x1bd)]([listBffScripts(_0x56d085[_0x5b4d38(0x1aa)]),getBffScriptStatistics(_0x56d085[_0x5b4d38(0x1aa)])]),_0x30227d=createHookLocationMap(_0x3491ac),_0x379e4a=new Set(_0x57a490['map'](_0x299758=>_0x299758[_0x5b4d38(0x1ba)]));for(const _0x2262a4 of _0x50ecf6){const _0x380e15=resolveRemoteScriptTarget(_0x409ea2,_0x2262a4,_0x30227d,_0x193110[_0x5b4d38(0x1c0)],_0x4a5132);_0x380e15&&!_0x379e4a[_0x5b4d38(0x1ae)](_0x380e15[_0x5b4d38(0x1ba)])&&_0x348924[_0x5b4d38(0x1bb)](_0x380e15[_0x5b4d38(0x1ba)]);}}const _0x49b3d0=_0x154e6e['length']===0x0&&_0x5afa76[_0x5b4d38(0x1b4)]===0x0&&_0x348924[_0x5b4d38(0x1b4)]===0x0;return{'ok':!![],'data':{'added':_0x154e6e,'modified':_0x5afa76,'unchanged':_0x236ed7,'remoteOnly':_0x348924},'message':_0x49b3d0?'All\x20Backend\x20Function\x20scripts\x20are\x20in\x20sync.':_0x154e6e[_0x5b4d38(0x1b4)]+_0x5b4d38(0x1ac)+_0x5afa76[_0x5b4d38(0x1b4)]+'\x20modified,\x20'+_0x236ed7[_0x5b4d38(0x1b4)]+_0x5b4d38(0x1c7)+(_0x348924['length']>0x0?',\x20'+_0x348924['length']+_0x5b4d38(0x1c5):'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a39_0x20f451=a39_0x31b0;function a39_0x3a8b(){const _0x2bcee=['cli-skill','pipe','1633866PpTnie','cli-skill-install','410EAeAId','apiError','CLI\x20Built-in\x20Skill\x20',']:\x20','14rVncCE','6909zNnslk','712000Mmnjkc','113047KHOMHQ','error','1380hRiWVy','read','info','skillVersion','repairCommand','cwd','Built-in\x20Skill\x20install\x20failed\x20[','\x20via\x20skills@latest','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','3497607nKqfKT','14790kXSQjF','code','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','2752VoPTYb','67078fzbWiA','installedPath','\x20at\x20'];a39_0x3a8b=function(){return _0x2bcee;};return a39_0x3a8b();}(function(_0x111ee2,_0x4cde62){const _0x4caa14=a39_0x31b0,_0x1bb259=_0x111ee2();while(!![]){try{const _0x1ccf65=-parseInt(_0x4caa14(0xdd))/0x1*(-parseInt(_0x4caa14(0xca))/0x2)+parseInt(_0x4caa14(0xe2))/0x3+-parseInt(_0x4caa14(0xcc))/0x4+-parseInt(_0x4caa14(0xd9))/0x5*(-parseInt(_0x4caa14(0xcf))/0x6)+-parseInt(_0x4caa14(0xcb))/0x7*(parseInt(_0x4caa14(0xdc))/0x8)+-parseInt(_0x4caa14(0xd8))/0x9+-parseInt(_0x4caa14(0xe4))/0xa*(parseInt(_0x4caa14(0xcd))/0xb);if(_0x1ccf65===_0x4cde62)break;else _0x1bb259['push'](_0x1bb259['shift']());}catch(_0x21d698){_0x1bb259['push'](_0x1bb259['shift']());}}}(a39_0x3a8b,0x59998));import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';function a39_0x31b0(_0x2ab862,_0x17101b){_0x2ab862=_0x2ab862-0xc8;const _0x3a8b64=a39_0x3a8b();let _0x31b036=_0x3a8b64[_0x2ab862];return _0x31b036;}import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a39_0x20f451(0xe0),'command':'install','description':a39_0x20f451(0xdb),'risk':a39_0x20f451(0xd0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x4b923b){const _0x55e2cf=a39_0x20f451;logger['setLogPath'](process[_0x55e2cf(0xd4)]()),logger[_0x55e2cf(0xd1)](_0x55e2cf(0xe3),'Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.');const _0x4c84d6=installBuiltinSkill({'stdio':_0x4b923b['nonInteractive']?_0x55e2cf(0xe1):'inherit'});if(!_0x4c84d6['ok'])throw CliErrors[_0x55e2cf(0xe5)](_0x55e2cf(0xd5)+_0x4c84d6[_0x55e2cf(0xda)]+_0x55e2cf(0xc9)+(_0x4c84d6[_0x55e2cf(0xce)]||'unknown'),_0x55e2cf(0xd7)+_0x4c84d6[_0x55e2cf(0xd3)]);return console['log'](_0x4c84d6['changed']?_0x55e2cf(0xc8)+_0x4c84d6[_0x55e2cf(0xd2)]+'\x20installed'+(_0x4c84d6[_0x55e2cf(0xde)]?_0x55e2cf(0xdf)+_0x4c84d6['installedPath']:_0x55e2cf(0xd6)):'CLI\x20Built-in\x20Skill\x20'+_0x4c84d6[_0x55e2cf(0xd2)]+'\x20is\x20already\x20current'+(_0x4c84d6[_0x55e2cf(0xde)]?'\x20at\x20'+_0x4c84d6['installedPath']:'')),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a40_0x17eafc=a40_0x2d47;function a40_0x2e43(){const _0x262e09=['pipe','Checking\x20for\x20updates...','warn','947033HSJtRZ','Beta\x20version:\x20','30MAVcFb','includes','\x20install\x20-g\x20','Already\x20on\x20requested\x20version\x20(v','fail','green','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','bun','990ztOjSy','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','\x20is\x20newer\x20than\x20npm\x20latest\x20v','https://registry.npmjs.org/-/package/','7aSHurl','str','\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20','map','validation','\x20cli-skill\x20install','\x20is\x20up\x20to\x20date.','info','Already\x20up\x20to\x20date\x20(v','/dist-tags','8075112dOclgw','Current\x20version:\x20','Version\x20comparison\x20failed','Invalid\x20version:\x20','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','unknown','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','repairCommand','Update\x20failed','gray','succeed','start','latest','\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','137964WmHubS','json','update','beta','6276780kinywn','Update\x20available:\x20','log','slice','npm','string','error','message','expected\x20','\x20\x20CLI\x20Built-in\x20Skill\x20','code','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','\x20\x20Run\x20manually:\x20','\x20\x20Try\x20manually:\x20',',\x20state\x20','bool','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm',']:\x20','5726814mKZHtf','toLowerCase','Updated\x20to\x20v','skillVersion','red','6002696tCZzKW','\x20→\x20','current','version',',\x20found\x20','state','77850VmQFWR','valid','timeout','yellow','source','filter'];a40_0x2e43=function(){return _0x262e09;};return a40_0x2e43();}(function(_0x501c77,_0x133a63){const _0xf619e7=a40_0x2d47,_0x282053=_0x501c77();while(!![]){try{const _0x165f87=-parseInt(_0xf619e7(0x16d))/0x1+-parseInt(_0xf619e7(0x16f))/0x2*(parseInt(_0xf619e7(0x142))/0x3)+-parseInt(_0xf619e7(0x15e))/0x4+parseInt(_0xf619e7(0x146))/0x5+parseInt(_0xf619e7(0x159))/0x6*(parseInt(_0xf619e7(0x12a))/0x7)+parseInt(_0xf619e7(0x134))/0x8+-parseInt(_0xf619e7(0x126))/0x9*(-parseInt(_0xf619e7(0x164))/0xa);if(_0x165f87===_0x133a63)break;else _0x282053['push'](_0x282053['shift']());}catch(_0x54ea4a){_0x282053['push'](_0x282053['shift']());}}}(a40_0x2e43,0xe5035));import a40_0x405622 from'chalk';import a40_0x1301d1 from'ora';import a40_0x228ad9 from'semver';import{execa}from'execa';function a40_0x2d47(_0x4c5c18,_0x45ff6a){_0x4c5c18=_0x4c5c18-0x121;const _0x2e4363=a40_0x2e43();let _0x2d470e=_0x2e4363[_0x4c5c18];return _0x2d470e;}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 _0x13ec80=a40_0x2d47;return GIT_COMMIT!==_0x13ec80(0x139)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x13ec80(0x149)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x93700a=a40_0x2d47,_0x1ee2db=process['execPath'][_0x93700a(0x15a)]();if(_0x1ee2db[_0x93700a(0x170)](_0x93700a(0x125)))return _0x93700a(0x125);return'npm';}const updateFlags=[{'name':a40_0x17eafc(0x145),'type':'boolean','description':a40_0x17eafc(0x138),'default':![]},{'name':'version','type':a40_0x17eafc(0x14b),'description':'Install\x20a\x20specific\x20CLI\x20version'}];function getRequestedVersion(_0x38c617){const _0xd29dd3=a40_0x17eafc;return _0x38c617[_0xd29dd3(0x12b)](_0xd29dd3(0x161))['trim']();}async function validateUpdateFlags(_0x433744){const _0x7f7f5e=a40_0x17eafc,_0x440bc4=_0x433744[_0x7f7f5e(0x155)]('beta'),_0x4d9018=getRequestedVersion(_0x433744);if(_0x440bc4&&_0x4d9018)throw CliErrors['validation'](_0x7f7f5e(0x127),_0x7f7f5e(0x151));if(_0x4d9018&&!a40_0x228ad9[_0x7f7f5e(0x165)](_0x4d9018))throw CliErrors[_0x7f7f5e(0x12e)](_0x7f7f5e(0x137)+_0x4d9018,_0x7f7f5e(0x124));}async function fetchNpmDistTags(){const _0x4330ea=a40_0x17eafc;try{const _0x193df8=await fetch(_0x4330ea(0x129)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x4330ea(0x133),{'signal':AbortSignal[_0x4330ea(0x166)](0x2710)});if(!_0x193df8['ok'])return null;const _0x26ef5e=await _0x193df8[_0x4330ea(0x143)]();if(!_0x26ef5e||typeof _0x26ef5e!=='object')return null;return Object['fromEntries'](Object['entries'](_0x26ef5e)[_0x4330ea(0x169)](([,_0x28407d])=>typeof _0x28407d===_0x4330ea(0x14b)&&_0x28407d['trim']()['length']>0x0)[_0x4330ea(0x12d)](([_0x2d4dda,_0xe0b4b0])=>[_0x2d4dda,String(_0xe0b4b0)['trim']()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x1bb281){const _0xb1bcd8=await fetchNpmDistTags();return _0xb1bcd8?.[_0x1bb281]??null;}async function fetchLatestVersion(){const _0x7299e=a40_0x17eafc;return fetchNpmDistTagVersion(_0x7299e(0x140));}async function resolveTargetVersion(_0x484558){const _0x35ca93=a40_0x17eafc,_0x12edb6=getRequestedVersion(_0x484558);if(_0x12edb6)return{'version':_0x12edb6,'source':_0x35ca93(0x161)};if(_0x484558[_0x35ca93(0x155)](_0x35ca93(0x145))){const _0x3c460a=await fetchNpmDistTagVersion(_0x35ca93(0x145));if(!_0x3c460a)return null;return{'version':_0x3c460a,'source':_0x35ca93(0x145)};}const _0x43c9e2=await fetchLatestVersion();if(!_0x43c9e2)return null;return{'version':_0x43c9e2,'source':_0x35ca93(0x140)};}function shouldInstallTarget(_0x19a531,_0x6a238a){const _0x2850fc=a40_0x17eafc;if(_0x6a238a['source']==='version'||_0x6a238a[_0x2850fc(0x168)]==='beta')return!a40_0x228ad9['eq'](_0x19a531,_0x6a238a[_0x2850fc(0x161)]);return a40_0x228ad9['lt'](_0x19a531,_0x6a238a['version']);}function getInstallPlanLabel(_0x19654e,_0x55101b){const _0x38c23b=a40_0x17eafc;switch(_0x55101b[_0x38c23b(0x168)]){case _0x38c23b(0x145):return _0x38c23b(0x16e)+a40_0x405622[_0x38c23b(0x167)](_0x19654e)+'\x20→\x20'+a40_0x405622[_0x38c23b(0x123)](_0x55101b['version']);case _0x38c23b(0x161):return'Requested\x20version:\x20'+a40_0x405622['yellow'](_0x19654e)+_0x38c23b(0x15f)+a40_0x405622[_0x38c23b(0x123)](_0x55101b[_0x38c23b(0x161)]);case _0x38c23b(0x140):default:return _0x38c23b(0x147)+a40_0x405622[_0x38c23b(0x167)](_0x19654e)+'\x20→\x20'+a40_0x405622[_0x38c23b(0x123)](_0x55101b[_0x38c23b(0x161)]);}}function repairCurrentBuiltinSkill(){const _0x473d75=a40_0x17eafc;console['log'](a40_0x405622[_0x473d75(0x13d)]('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x395e70=installBuiltinSkill();if(_0x395e70['ok'])return console['log'](a40_0x405622[_0x473d75(0x13d)](_0x473d75(0x14f)+_0x395e70[_0x473d75(0x15c)]+'\x20is\x20up\x20to\x20date.')),!![];return console[_0x473d75(0x16c)](a40_0x405622[_0x473d75(0x167)](_0x473d75(0x141)+_0x395e70[_0x473d75(0x150)]+_0x473d75(0x158)+(_0x395e70['error']||_0x473d75(0x139)))),console[_0x473d75(0x148)](a40_0x405622['gray'](_0x473d75(0x152)+CLI_BIN_NAME+_0x473d75(0x12f))),![];}function verifyUpdatedBuiltinSkill(_0x3f7189){const _0x3eb913=a40_0x17eafc,_0x55a159=inspectInstalledBuiltinSkillVersion(_0x3f7189);if(_0x55a159[_0x3eb913(0x163)]===_0x3eb913(0x160))return console[_0x3eb913(0x148)](a40_0x405622['gray']('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x3f7189+_0x3eb913(0x130))),!![];const _0xd303da=_0x55a159[_0x3eb913(0x15c)]?'expected\x20'+_0x3f7189+_0x3eb913(0x162)+_0x55a159[_0x3eb913(0x15c)]:_0x3eb913(0x14e)+_0x3f7189+_0x3eb913(0x154)+_0x55a159[_0x3eb913(0x163)];return console[_0x3eb913(0x16c)](a40_0x405622[_0x3eb913(0x167)](_0x3eb913(0x12c)+_0xd303da)),console[_0x3eb913(0x148)](a40_0x405622[_0x3eb913(0x13d)](_0x3eb913(0x152)+_0x55a159[_0x3eb913(0x13b)])),![];}async function execute(_0x48a422){const _0x41dce1=a40_0x17eafc;await validateUpdateFlags(_0x48a422);const _0x2e938c=getCurrentVersion();console[_0x41dce1(0x148)](_0x41dce1(0x135)+_0x2e938c);const _0x42f375=a40_0x1301d1(_0x41dce1(0x16b))[_0x41dce1(0x13f)](),_0x5dbb62=await resolveTargetVersion(_0x48a422);if(!_0x5dbb62){const _0x1b2857=_0x48a422[_0x41dce1(0x155)](_0x41dce1(0x145))?_0x41dce1(0x157):_0x41dce1(0x156);return _0x42f375['fail'](_0x1b2857),console[_0x41dce1(0x148)](a40_0x405622['gray']('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x1b2857};}const _0x4a8fd5=a40_0x228ad9[_0x41dce1(0x165)](VERSION),_0x362102=a40_0x228ad9[_0x41dce1(0x165)](_0x5dbb62[_0x41dce1(0x161)]);if(!_0x4a8fd5||!_0x362102)return _0x42f375[_0x41dce1(0x122)]('Version\x20comparison\x20failed'),{'ok':![],'message':_0x41dce1(0x136)};if(!shouldInstallTarget(_0x4a8fd5,_0x5dbb62)){const _0x583e84=_0x5dbb62[_0x41dce1(0x168)]===_0x41dce1(0x161)?_0x41dce1(0x121)+_0x5dbb62['version']+')':a40_0x228ad9['gt'](_0x4a8fd5,_0x362102)?'Current\x20version\x20v'+_0x2e938c+_0x41dce1(0x128)+_0x5dbb62[_0x41dce1(0x161)]:_0x41dce1(0x132)+_0x5dbb62[_0x41dce1(0x161)]+')';return _0x42f375['succeed'](_0x583e84),{'ok':repairCurrentBuiltinSkill()};}_0x42f375[_0x41dce1(0x131)](getInstallPlanLabel(_0x2e938c,_0x5dbb62));const _0x47ad5f=detectPackageManager(),_0x58c1fc=_0x47ad5f===_0x41dce1(0x14a)?resolveNpmBin(_0x41dce1(0x14a)):_0x47ad5f,_0x33972d=a40_0x1301d1('Updating\x20via\x20'+_0x47ad5f+'...')[_0x41dce1(0x13f)]();try{return await execa(_0x58c1fc,['install','-g',NPM_PACKAGE_NAME+'@'+_0x5dbb62[_0x41dce1(0x161)]],{'stdio':_0x41dce1(0x16a)}),_0x33972d[_0x41dce1(0x13e)](_0x41dce1(0x15b)+_0x5dbb62['version']),console[_0x41dce1(0x148)](a40_0x405622[_0x41dce1(0x13d)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.')),{'ok':verifyUpdatedBuiltinSkill(_0x5dbb62[_0x41dce1(0x161)])};}catch(_0x550440){return _0x33972d[_0x41dce1(0x122)](_0x41dce1(0x13c)),console[_0x41dce1(0x14c)](a40_0x405622[_0x41dce1(0x15d)]('\x20\x20'+_0x550440[_0x41dce1(0x14d)])),console[_0x41dce1(0x148)](a40_0x405622[_0x41dce1(0x13d)](_0x41dce1(0x153)+_0x47ad5f+_0x41dce1(0x171)+NPM_PACKAGE_NAME+'@'+_0x5dbb62['version'])),{'ok':![],'message':_0x550440['message']};}}export const updateDefinition={'service':a40_0x17eafc(0x144),'command':'run','description':a40_0x17eafc(0x13a),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a40_0x57bdef=a40_0x16c2;(function(_0x148414,_0x788bb2){const _0x2b835f=a40_0x16c2,_0x444f43=_0x148414();while(!![]){try{const _0x59624a=parseInt(_0x2b835f(0xd9))/0x1*(parseInt(_0x2b835f(0xf0))/0x2)+-parseInt(_0x2b835f(0x104))/0x3*(-parseInt(_0x2b835f(0xf3))/0x4)+-parseInt(_0x2b835f(0xdc))/0x5+-parseInt(_0x2b835f(0x10d))/0x6+parseInt(_0x2b835f(0xed))/0x7+parseInt(_0x2b835f(0x101))/0x8*(parseInt(_0x2b835f(0xf2))/0x9)+parseInt(_0x2b835f(0xf7))/0xa*(-parseInt(_0x2b835f(0xc4))/0xb);if(_0x59624a===_0x788bb2)break;else _0x444f43['push'](_0x444f43['shift']());}catch(_0x3ea20e){_0x444f43['push'](_0x444f43['shift']());}}}(a40_0x16b9,0x933c5));import a40_0x33c3c0 from'chalk';import a40_0x590ce7 from'ora';import a40_0x3cf44b from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';function a40_0x16c2(_0x4ec93a,_0x9f9c6a){_0x4ec93a=_0x4ec93a-0xc4;const _0x16b99b=a40_0x16b9();let _0x16c21c=_0x16b99b[_0x4ec93a];return _0x16c21c;}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 _0x4b9694=a40_0x16c2;return GIT_COMMIT!==_0x4b9694(0xc7)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x4b9694(0x10c)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x38a98e=a40_0x16c2,_0x3ddbaf=process[_0x38a98e(0xdb)][_0x38a98e(0xd4)]();if(_0x3ddbaf['includes'](_0x38a98e(0xc9)))return'bun';return'npm';}const updateFlags=[{'name':a40_0x57bdef(0xe6),'type':a40_0x57bdef(0x111),'description':a40_0x57bdef(0x106),'default':![]},{'name':a40_0x57bdef(0xfd),'type':a40_0x57bdef(0xe3),'description':a40_0x57bdef(0xca)}];function getRequestedVersion(_0x579d7a){const _0x278d40=a40_0x57bdef;return _0x579d7a[_0x278d40(0x116)](_0x278d40(0xfd))[_0x278d40(0xcc)]();}async function validateUpdateFlags(_0x2de400){const _0xc8fa0b=a40_0x57bdef,_0x2ee26c=_0x2de400[_0xc8fa0b(0xef)]('beta'),_0x2cf11b=getRequestedVersion(_0x2de400);if(_0x2ee26c&&_0x2cf11b)throw CliErrors[_0xc8fa0b(0x10f)](_0xc8fa0b(0x10b),_0xc8fa0b(0x110));if(_0x2cf11b&&!a40_0x3cf44b[_0xc8fa0b(0xcf)](_0x2cf11b))throw CliErrors[_0xc8fa0b(0x10f)](_0xc8fa0b(0xe1)+_0x2cf11b,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x5469e7=a40_0x57bdef;try{const _0x1b74af=await fetch(_0x5469e7(0xf8)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x5469e7(0xd7),{'signal':AbortSignal[_0x5469e7(0xdd)](0x2710)});if(!_0x1b74af['ok'])return null;const _0x5d034f=await _0x1b74af[_0x5469e7(0xe4)]();if(!_0x5d034f||typeof _0x5d034f!==_0x5469e7(0xea))return null;return Object['fromEntries'](Object[_0x5469e7(0xd5)](_0x5d034f)[_0x5469e7(0xda)](([,_0x237cae])=>typeof _0x237cae===_0x5469e7(0xe3)&&_0x237cae[_0x5469e7(0xcc)]()[_0x5469e7(0xd6)]>0x0)[_0x5469e7(0x10a)](([_0x5c3e3e,_0x3d80fa])=>[_0x5c3e3e,String(_0x3d80fa)['trim']()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x26eae0){const _0x226bb1=await fetchNpmDistTags();return _0x226bb1?.[_0x26eae0]??null;}async function fetchLatestVersion(){const _0x5f44e4=a40_0x57bdef;return fetchNpmDistTagVersion(_0x5f44e4(0x105));}async function resolveTargetVersion(_0x234247){const _0x4683ad=a40_0x57bdef,_0x5077aa=getRequestedVersion(_0x234247);if(_0x5077aa)return{'version':_0x5077aa,'source':_0x4683ad(0xfd)};if(_0x234247[_0x4683ad(0xef)](_0x4683ad(0xe6))){const _0x2ad5ef=await fetchNpmDistTagVersion(_0x4683ad(0xe6));if(!_0x2ad5ef)return null;return{'version':_0x2ad5ef,'source':_0x4683ad(0xe6)};}const _0x248066=await fetchLatestVersion();if(!_0x248066)return null;return{'version':_0x248066,'source':_0x4683ad(0x105)};}function shouldInstallTarget(_0x20f37f,_0x59f7ef){const _0x18edc9=a40_0x57bdef;if(_0x59f7ef[_0x18edc9(0xfa)]===_0x18edc9(0xfd)||_0x59f7ef[_0x18edc9(0xfa)]==='beta')return!a40_0x3cf44b['eq'](_0x20f37f,_0x59f7ef[_0x18edc9(0xfd)]);return a40_0x3cf44b['lt'](_0x20f37f,_0x59f7ef[_0x18edc9(0xfd)]);}function getInstallPlanLabel(_0x32cc00,_0x54abc5){const _0x1edfab=a40_0x57bdef;switch(_0x54abc5[_0x1edfab(0xfa)]){case'beta':return'Beta\x20version:\x20'+a40_0x33c3c0[_0x1edfab(0xfc)](_0x32cc00)+_0x1edfab(0xdf)+a40_0x33c3c0['green'](_0x54abc5[_0x1edfab(0xfd)]);case _0x1edfab(0xfd):return _0x1edfab(0xce)+a40_0x33c3c0['yellow'](_0x32cc00)+'\x20→\x20'+a40_0x33c3c0[_0x1edfab(0xff)](_0x54abc5[_0x1edfab(0xfd)]);case _0x1edfab(0x105):default:return _0x1edfab(0xe5)+a40_0x33c3c0['yellow'](_0x32cc00)+_0x1edfab(0xdf)+a40_0x33c3c0[_0x1edfab(0xff)](_0x54abc5[_0x1edfab(0xfd)]);}}function repairCurrentBuiltinSkill(){const _0x68716b=a40_0x57bdef;console[_0x68716b(0x114)](a40_0x33c3c0[_0x68716b(0xe0)](_0x68716b(0xf5)));const _0x4a9dcf=installBuiltinSkill();if(_0x4a9dcf['ok'])return console[_0x68716b(0x114)](a40_0x33c3c0[_0x68716b(0xe0)](_0x68716b(0xe7)+_0x4a9dcf['skillVersion']+_0x68716b(0xee))),!![];return console[_0x68716b(0xd1)](a40_0x33c3c0[_0x68716b(0xfc)](_0x68716b(0xf1)+_0x4a9dcf['code']+']:\x20'+(_0x4a9dcf[_0x68716b(0xec)]||_0x68716b(0xc7)))),console[_0x68716b(0x114)](a40_0x33c3c0[_0x68716b(0xe0)](_0x68716b(0x108)+CLI_BIN_NAME+_0x68716b(0x10e))),![];}function verifyUpdatedBuiltinSkill(_0x306d82){const _0x196a7a=a40_0x57bdef,_0x2f4327=inspectInstalledBuiltinSkillVersion(_0x306d82);if(_0x2f4327[_0x196a7a(0x103)]===_0x196a7a(0xde))return console[_0x196a7a(0x114)](a40_0x33c3c0['gray']('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x306d82+_0x196a7a(0xee))),!![];const _0x43395b=_0x2f4327[_0x196a7a(0x100)]?_0x196a7a(0xcd)+_0x306d82+',\x20found\x20'+_0x2f4327['skillVersion']:_0x196a7a(0xcd)+_0x306d82+',\x20state\x20'+_0x2f4327[_0x196a7a(0x103)];return console[_0x196a7a(0xd1)](a40_0x33c3c0[_0x196a7a(0xfc)](_0x196a7a(0x113)+_0x43395b)),console[_0x196a7a(0x114)](a40_0x33c3c0[_0x196a7a(0xe0)]('\x20\x20Run\x20manually:\x20'+_0x2f4327[_0x196a7a(0xe9)])),![];}async function execute(_0x54e529){const _0x52ca44=a40_0x57bdef;await validateUpdateFlags(_0x54e529);const _0x1d6b66=getCurrentVersion();console[_0x52ca44(0x114)](_0x52ca44(0xf6)+_0x1d6b66);const _0x5bfd7b=a40_0x590ce7('Checking\x20for\x20updates...')[_0x52ca44(0xfe)](),_0x87d660=await resolveTargetVersion(_0x54e529);if(!_0x87d660){const _0x3ff5b2=_0x54e529[_0x52ca44(0xef)](_0x52ca44(0xe6))?_0x52ca44(0xc6):_0x52ca44(0xf4);return _0x5bfd7b[_0x52ca44(0xeb)](_0x3ff5b2),console[_0x52ca44(0x114)](a40_0x33c3c0[_0x52ca44(0xe0)](_0x52ca44(0xd3)+NPM_PACKAGE_NAME+_0x52ca44(0xe8))),{'ok':![],'message':_0x3ff5b2};}const _0x26299f=a40_0x3cf44b[_0x52ca44(0xcf)](VERSION),_0x50ca44=a40_0x3cf44b[_0x52ca44(0xcf)](_0x87d660[_0x52ca44(0xfd)]);if(!_0x26299f||!_0x50ca44)return _0x5bfd7b[_0x52ca44(0xeb)](_0x52ca44(0x102)),{'ok':![],'message':_0x52ca44(0x102)};if(!shouldInstallTarget(_0x26299f,_0x87d660)){const _0x367af4=_0x87d660['source']==='version'?'Already\x20on\x20requested\x20version\x20(v'+_0x87d660[_0x52ca44(0xfd)]+')':a40_0x3cf44b['gt'](_0x26299f,_0x50ca44)?'Current\x20version\x20v'+_0x1d6b66+_0x52ca44(0xd2)+_0x87d660[_0x52ca44(0xfd)]:'Already\x20up\x20to\x20date\x20(v'+_0x87d660[_0x52ca44(0xfd)]+')';return _0x5bfd7b['succeed'](_0x367af4),{'ok':repairCurrentBuiltinSkill()};}_0x5bfd7b[_0x52ca44(0x115)](getInstallPlanLabel(_0x1d6b66,_0x87d660));const _0x1fd0a6=detectPackageManager(),_0x529336=_0x1fd0a6===_0x52ca44(0xfb)?resolveNpmBin(_0x52ca44(0xfb)):_0x1fd0a6,_0x4cb973=a40_0x590ce7('Updating\x20via\x20'+_0x1fd0a6+_0x52ca44(0x107))['start']();try{return await execa(_0x529336,['install','-g',NPM_PACKAGE_NAME+'@'+_0x87d660['version']],{'stdio':_0x52ca44(0x112)}),_0x4cb973['succeed'](_0x52ca44(0xd8)+_0x87d660[_0x52ca44(0xfd)]),console[_0x52ca44(0x114)](a40_0x33c3c0[_0x52ca44(0xe0)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.')),{'ok':verifyUpdatedBuiltinSkill(_0x87d660[_0x52ca44(0xfd)])};}catch(_0x4f6fab){return _0x4cb973[_0x52ca44(0xeb)]('Update\x20failed'),console[_0x52ca44(0xec)](a40_0x33c3c0[_0x52ca44(0xc5)]('\x20\x20'+_0x4f6fab[_0x52ca44(0xcb)])),console[_0x52ca44(0x114)](a40_0x33c3c0[_0x52ca44(0xe0)](_0x52ca44(0x109)+_0x1fd0a6+_0x52ca44(0xc8)+NPM_PACKAGE_NAME+'@'+_0x87d660[_0x52ca44(0xfd)])),{'ok':![],'message':_0x4f6fab[_0x52ca44(0xcb)]};}}function a40_0x16b9(){const _0x506329=['Current\x20version:\x20','10310vAuorf','https://registry.npmjs.org/-/package/','read','source','npm','yellow','version','start','green','skillVersion','4366536qnayMg','Version\x20comparison\x20failed','state','12ICjBzr','latest','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','...','\x20\x20Run\x20manually:\x20','\x20\x20Try\x20manually:\x20','map','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','slice','1023402xOqyor','\x20cli-skill\x20install','validation','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','boolean','pipe','\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20','log','info','str','21263TgUipb','red','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','unknown','\x20install\x20-g\x20','bun','Install\x20a\x20specific\x20CLI\x20version','message','trim','expected\x20','Requested\x20version:\x20','valid','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','warn','\x20is\x20newer\x20than\x20npm\x20latest\x20v','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','toLowerCase','entries','length','/dist-tags','Updated\x20to\x20v','19064edcZLK','filter','execPath','376890gHrVtA','timeout','current','\x20→\x20','gray','Invalid\x20version:\x20','run','string','json','Update\x20available:\x20','beta','\x20\x20CLI\x20Built-in\x20Skill\x20','@latest','repairCommand','object','fail','error','2747892fvCuXc','\x20is\x20up\x20to\x20date.','bool','82GppZmj','\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','9GxpImf','1121948NTTpAf','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','Checking\x20CLI\x20Built-in\x20Skill...'];a40_0x16b9=function(){return _0x506329;};return a40_0x16b9();}export const updateDefinition={'service':'update','command':a40_0x57bdef(0xe2),'description':a40_0x57bdef(0xd0),'risk':a40_0x57bdef(0xf9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x57b63d,_0x3ff1e2){const _0x5437d9=a41_0x58ce,_0x5aea4a=_0x57b63d();while(!![]){try{const _0x2bc822=parseInt(_0x5437d9(0xd1))/0x1+-parseInt(_0x5437d9(0xd0))/0x2*(-parseInt(_0x5437d9(0xcf))/0x3)+parseInt(_0x5437d9(0xd5))/0x4*(-parseInt(_0x5437d9(0xd2))/0x5)+parseInt(_0x5437d9(0xd3))/0x6+parseInt(_0x5437d9(0xd4))/0x7+parseInt(_0x5437d9(0xcd))/0x8*(-parseInt(_0x5437d9(0xce))/0x9)+-parseInt(_0x5437d9(0xcc))/0xa;if(_0x2bc822===_0x3ff1e2)break;else _0x5aea4a['push'](_0x5aea4a['shift']());}catch(_0x1ce838){_0x5aea4a['push'](_0x5aea4a['shift']());}}}(a41_0x2f7b,0x6f784));function a41_0x2f7b(){const _0x33039d=['269259VYuCgL','124715epByAx','1185528NdvMzH','3197131ggszml','80jFAdeP','1476490WLXfIL','8YZqxNO','2267577lkjYBC','258xUzqNh','10034dHdJOF'];a41_0x2f7b=function(){return _0x33039d;};return a41_0x2f7b();}import{codegenSdk}from'../../commands/codegen/sdk.js';function a41_0x58ce(_0x43b76d,_0x231a89){_0x43b76d=_0x43b76d-0xcc;const _0x2f7bd0=a41_0x2f7b();let _0x58ce23=_0x2f7bd0[_0x43b76d];return _0x58ce23;}import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a42_0x51dc17=a42_0x100c;function a42_0x100c(_0x6ed654,_0x50d380){_0x6ed654=_0x6ed654-0xd6;const _0x4c529b=a42_0x4c52();let _0x100c39=_0x4c529b[_0x6ed654];return _0x100c39;}(function(_0x49e32e,_0x37fbcd){const _0x3ee678=a42_0x100c,_0x4fc6d1=_0x49e32e();while(!![]){try{const _0x5cbbe8=parseInt(_0x3ee678(0xed))/0x1*(-parseInt(_0x3ee678(0xdc))/0x2)+parseInt(_0x3ee678(0xeb))/0x3+-parseInt(_0x3ee678(0xec))/0x4*(parseInt(_0x3ee678(0xee))/0x5)+parseInt(_0x3ee678(0xe3))/0x6+parseInt(_0x3ee678(0xda))/0x7+parseInt(_0x3ee678(0xe4))/0x8+parseInt(_0x3ee678(0xdf))/0x9;if(_0x5cbbe8===_0x37fbcd)break;else _0x4fc6d1['push'](_0x4fc6d1['shift']());}catch(_0x638c6){_0x4fc6d1['push'](_0x4fc6d1['shift']());}}}(a42_0x4c52,0xcb6de));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a42_0x51dc17(0xdd),'command':a42_0x51dc17(0xde),'description':a42_0x51dc17(0xd7),'risk':'read','flags':[CODE_FLAG_OPTIONAL,{'name':a42_0x51dc17(0xd6),'type':a42_0x51dc17(0xe7),'description':a42_0x51dc17(0xea)},{'name':a42_0x51dc17(0xe5),'type':a42_0x51dc17(0xe7),'required':!![],'description':a42_0x51dc17(0xe2)},{'name':a42_0x51dc17(0xe8),'type':a42_0x51dc17(0xdb),'description':a42_0x51dc17(0xd8)}],async 'execute'(_0x5a48a4){const _0x242adf=a42_0x51dc17,{dataset:_0x27413b,operation:_0x1b4c66}=await getOperationDetail(_0x5a48a4[_0x242adf(0xe6)],_0x5a48a4['str']('code'),_0x5a48a4[_0x242adf(0xe1)](_0x242adf(0xe5))),_0x471c53=generateSdkCode(_0x27413b,_0x1b4c66,{'includeImports':!_0x5a48a4[_0x242adf(0xe0)](_0x242adf(0xe8))});return{'ok':!![],'data':{'dataset':{'name':_0x27413b[_0x242adf(0xef)],'code':_0x27413b[_0x242adf(0xd9)],'tableName':_0x27413b[_0x242adf(0xe9)]},'operation':_0x5a48a4[_0x242adf(0xe1)](_0x242adf(0xe5)),'code':_0x471c53}};}};function a42_0x4c52(){const _0x5ba87a=['Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','6915114uMxsGq','6989264aEjyoU','operation','appCode','string','skip-imports','tableName','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','1786200IYxdEy','52hEaukR','2969HBrxKM','580395hevosj','name','alias','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','Omit\x20import\x20statements\x20from\x20generated\x20code','code','1715420uOFSGG','boolean','900bhUusv','codegen','sdk','7305174doOqgE','bool','str'];a42_0x4c52=function(){return _0x5ba87a;};return a42_0x4c52();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a43_0x2445d6=a43_0x5c90;(function(_0x238d07,_0x520ff0){const _0x3c64a6=a43_0x5c90,_0xc3f973=_0x238d07();while(!![]){try{const _0x17e33e=-parseInt(_0x3c64a6(0x163))/0x1+-parseInt(_0x3c64a6(0x165))/0x2+-parseInt(_0x3c64a6(0x164))/0x3+parseInt(_0x3c64a6(0x159))/0x4+-parseInt(_0x3c64a6(0x15c))/0x5+parseInt(_0x3c64a6(0x16a))/0x6*(-parseInt(_0x3c64a6(0x160))/0x7)+parseInt(_0x3c64a6(0x169))/0x8;if(_0x17e33e===_0x520ff0)break;else _0xc3f973['push'](_0xc3f973['shift']());}catch(_0xedb55b){_0xc3f973['push'](_0xc3f973['shift']());}}}(a43_0x4d8c,0xe1050));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';function a43_0x5c90(_0x585f77,_0x2ba702){_0x585f77=_0x585f77-0x159;const _0x4d8cc7=a43_0x4d8c();let _0x5c90b4=_0x4d8cc7[_0x585f77];return _0x5c90b4;}function a43_0x4d8c(){const _0x32a396=['codegen','sqlcode','no-imports','52690152PHWIGm','2684238MlogmV','boolean','str','sdk','bool','sql','Omit\x20import\x20statements\x20from\x20generated\x20code','1242832ArzWCl','sqlCode','string','4550305wkfkuE','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','appCode','21nJHOyR','target','sqlName','361685ZMrKnI','4806570Gucshk','3518484GqURiE'];a43_0x4d8c=function(){return _0x32a396;};return a43_0x4d8c();}import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a43_0x2445d6(0x166),'command':a43_0x2445d6(0x16f),'description':a43_0x2445d6(0x15e),'risk':'read','flags':[SQLCODE_FLAG,{'name':a43_0x2445d6(0x161),'type':a43_0x2445d6(0x15b),'description':a43_0x2445d6(0x15d),'default':'sdk','enum':[a43_0x2445d6(0x16d),'bff']},{'name':a43_0x2445d6(0x168),'type':a43_0x2445d6(0x16b),'description':a43_0x2445d6(0x170)}],async 'execute'(_0x5e34a5){const _0x9aeb17=a43_0x2445d6,_0x120275=await getSqlQueryInfo(_0x5e34a5[_0x9aeb17(0x15f)],_0x5e34a5[_0x9aeb17(0x16c)](_0x9aeb17(0x167))),_0x359c09=_0x5e34a5[_0x9aeb17(0x16c)](_0x9aeb17(0x161))||_0x9aeb17(0x16d),_0x3cb0d0=generateSqlCodeTemplate(_0x120275,{'target':_0x359c09,'includeImports':!_0x5e34a5[_0x9aeb17(0x16e)](_0x9aeb17(0x168))});return{'ok':!![],'data':{'sqlCode':_0x120275[_0x9aeb17(0x15a)],'sqlName':_0x120275[_0x9aeb17(0x162)],'target':_0x359c09,'code':_0x3cb0d0}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4964df,_0x258f31){const _0x2b41cb=a44_0x313c,_0x17b7d9=_0x4964df();while(!![]){try{const _0x3ad97b=parseInt(_0x2b41cb(0x164))/0x1*(parseInt(_0x2b41cb(0x158))/0x2)+-parseInt(_0x2b41cb(0x15f))/0x3+parseInt(_0x2b41cb(0x147))/0x4*(-parseInt(_0x2b41cb(0x162))/0x5)+parseInt(_0x2b41cb(0x154))/0x6*(parseInt(_0x2b41cb(0x15b))/0x7)+parseInt(_0x2b41cb(0x143))/0x8*(parseInt(_0x2b41cb(0x142))/0x9)+parseInt(_0x2b41cb(0x151))/0xa*(parseInt(_0x2b41cb(0x152))/0xb)+-parseInt(_0x2b41cb(0x141))/0xc*(parseInt(_0x2b41cb(0x15d))/0xd);if(_0x3ad97b===_0x258f31)break;else _0x17b7d9['push'](_0x17b7d9['shift']());}catch(_0x1be369){_0x17b7d9['push'](_0x17b7d9['shift']());}}}(a44_0x581d,0xb1c10));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs,normalizeStoredDefaultApp}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';function a44_0x581d(){const _0x124432=['Usage:\x20','str','\x22\x20(appcode:\x20','7340jXqPCH','\x20<name>\x20--appcode\x20<code>','App\x20code','object','project','validation','Updated','global','Use\x20global\x20config\x20scope','\x22\x20not\x20found.','10mtKWMJ','8479834AcQaeY','Removed\x20app\x20\x22','264bzFNLT','\x20<name>\x20[--global]','appcode','Missing\x20app\x20name.','4tPNVBJ','bool','\x20Note:\x20app\x20\x22','88207DmTyfE','App\x20\x22','108121jjzggS','projectConfig','2096226NcxCtG','trim','globalConfig','2965ndThjU','defaultApp','410537fyQilG','string','length','both','\x22\x20still\x20defined\x20in\x20','args','flagMissing','\x20Default\x20app\x20changed\x20to\x20\x22','apps','\x20Remaining\x20app\x20\x22','Added','boolean','keys','804BJpcZv','18sTJZpX','3703216dmKidX'];a44_0x581d=function(){return _0x124432;};return a44_0x581d();}export function buildAppAddFlags(){const _0x1b53e5=a44_0x313c;return[{'name':_0x1b53e5(0x156),'type':_0x1b53e5(0x165),'description':_0x1b53e5(0x149),'required':!![]},{'name':_0x1b53e5(0x14e),'type':_0x1b53e5(0x13f),'description':'Use\x20global\x20config\x20scope','default':![]},...getAppProfileFlagDefs()];}function a44_0x313c(_0x2f50fa,_0x1d461b){_0x2f50fa=_0x2f50fa-0x13e;const _0x581dfc=a44_0x581d();let _0x313c39=_0x581dfc[_0x2f50fa];return _0x313c39;}export function buildAppRemoveFlags(){const _0x4e7dda=a44_0x313c;return[{'name':_0x4e7dda(0x14e),'type':_0x4e7dda(0x13f),'description':_0x4e7dda(0x14f),'default':![]}];}export async function validateAppName(_0x168394,_0x4fc648){const _0x353e45=a44_0x313c,_0x34a529=_0x168394[_0x353e45(0x169)][0x0]?.[_0x353e45(0x160)]();if(!_0x34a529)throw CliErrors[_0x353e45(0x14c)](_0x353e45(0x157),_0x353e45(0x144)+CLI_BIN_NAME+'\x20'+_0x4fc648+'\x20<name>');}export async function runAppAdd(_0x5be6d8,_0x41b24f){const _0x38267c=a44_0x313c,_0x286b2c=_0x5be6d8['args'][0x0]?.[_0x38267c(0x160)]();if(!_0x286b2c)throw CliErrors['validation'](_0x38267c(0x157),_0x38267c(0x144)+CLI_BIN_NAME+'\x20'+_0x41b24f+'\x20<name>\x20--appcode\x20<code>');const _0xdbed10=_0x5be6d8[_0x38267c(0x145)](_0x38267c(0x156));if(!_0xdbed10)throw CliErrors[_0x38267c(0x16a)](_0x38267c(0x156),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x41b24f+_0x38267c(0x148));const _0xd9acaf={'global':_0x5be6d8[_0x38267c(0x159)](_0x38267c(0x14e))},_0xc2d7=readConfig(_0xd9acaf);if(!_0xc2d7[_0x38267c(0x16c)])_0xc2d7[_0x38267c(0x16c)]={};const _0x3a9e49={'appcode':_0xdbed10,...collectAppProfileOverrides(_0x214c70=>_0x5be6d8['str'](_0x214c70))},_0x201abe=_0xc2d7[_0x38267c(0x16c)],_0xb4814c=Object[_0x38267c(0x140)](_0x201abe),_0x140467=typeof _0xc2d7['defaultApp']===_0x38267c(0x165)&&_0x201abe[_0xc2d7[_0x38267c(0x163)]]?_0xc2d7[_0x38267c(0x163)]:_0xb4814c[_0x38267c(0x166)]===0x1?_0xb4814c[0x0]:undefined,_0x314402=!!_0x201abe[_0x286b2c];_0x201abe[_0x286b2c]=_0x3a9e49;const _0x5716f6=normalizeStoredDefaultApp(_0xc2d7,_0x140467);writeConfig(_0xc2d7,_0xd9acaf);const _0x22df05=!_0x314402&&_0x5716f6?'\x20Default\x20app\x20is\x20\x22'+_0x5716f6+'\x22.':'',_0x1af7b5=(_0x314402?_0x38267c(0x14d):_0x38267c(0x13e))+'\x20app\x20\x22'+_0x286b2c+_0x38267c(0x146)+_0xdbed10+')'+scopeLabel(_0xd9acaf)+'.'+_0x22df05;return{'ok':!![],'message':_0x1af7b5};}export async function runAppRemove(_0x54c1ee,_0x469eab){const _0x3611c5=a44_0x313c,_0x54a70a=_0x54c1ee['args'][0x0]?.[_0x3611c5(0x160)]();if(!_0x54a70a)throw CliErrors[_0x3611c5(0x14c)](_0x3611c5(0x157),_0x3611c5(0x144)+CLI_BIN_NAME+'\x20'+_0x469eab+_0x3611c5(0x155));const _0x11eaad=_0x54c1ee[_0x3611c5(0x159)](_0x3611c5(0x14e)),{config:_0x1f8ac2,layers:_0x2f570f}=readRawConfigWithLayers(),_0x157faf=_0x1f8ac2[_0x3611c5(0x16c)]??{};if(!_0x157faf[_0x54a70a])throw CliErrors[_0x3611c5(0x14c)](_0x3611c5(0x15c)+_0x54a70a+_0x3611c5(0x150));const _0x42edb3=_0x2f570f[_0x3611c5(0x161)]['apps']&&typeof _0x2f570f['globalConfig'][_0x3611c5(0x16c)]===_0x3611c5(0x14a)?_0x2f570f['globalConfig'][_0x3611c5(0x16c)]:{},_0x1753df=_0x2f570f[_0x3611c5(0x15e)][_0x3611c5(0x16c)]&&typeof _0x2f570f[_0x3611c5(0x15e)][_0x3611c5(0x16c)]===_0x3611c5(0x14a)?_0x2f570f[_0x3611c5(0x15e)][_0x3611c5(0x16c)]:{},_0xe78426=appDefinedIn(_0x54a70a,_0x42edb3,_0x1753df),_0x5dc346=resolveAppScopeForWrite(_0x54a70a,_0x11eaad,_0x2f570f),_0x442b67={'global':_0x5dc346===_0x3611c5(0x14e)},_0x3a1462=readConfig(_0x442b67),_0x1db733=_0x3a1462[_0x3611c5(0x16c)];if(!_0x1db733||!_0x1db733[_0x54a70a])throw CliErrors[_0x3611c5(0x14c)](_0x3611c5(0x15c)+_0x54a70a+'\x22\x20not\x20found.');delete _0x1db733[_0x54a70a];let _0x59e27c='';const _0x4118ee=typeof _0x3a1462[_0x3611c5(0x163)]===_0x3611c5(0x165)?_0x3a1462['defaultApp']:undefined,_0x33b3a7=Object[_0x3611c5(0x140)](_0x1db733),_0x2f11bf=_0x4118ee===_0x54a70a?_0x33b3a7[0x0]:_0x4118ee,_0x23a660=normalizeStoredDefaultApp(_0x3a1462,_0x2f11bf);if(_0x4118ee===_0x54a70a&&_0x33b3a7[_0x3611c5(0x166)]===0x1)_0x59e27c=_0x3611c5(0x16d)+_0x33b3a7[0x0]+'\x22\x20is\x20selected\x20automatically.';else _0x4118ee===_0x54a70a&&_0x23a660&&(_0x59e27c=_0x3611c5(0x16b)+_0x23a660+'\x22.');Object[_0x3611c5(0x140)](_0x1db733)[_0x3611c5(0x166)]===0x0&&(delete _0x3a1462[_0x3611c5(0x16c)],delete _0x3a1462[_0x3611c5(0x163)]);writeConfig(_0x3a1462,_0x442b67);const _0x1989c6=_0xe78426===_0x3611c5(0x167)?_0x3611c5(0x15a)+_0x54a70a+_0x3611c5(0x168)+(_0x5dc346===_0x3611c5(0x14b)?_0x3611c5(0x14e):'project')+'\x20config.':'';return{'ok':!![],'message':_0x3611c5(0x153)+_0x54a70a+'\x22'+scopeLabel(_0x442b67)+'.'+_0x59e27c+_0x1989c6};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x7f8025,_0x4da4df){const _0x8b9fdb=a45_0x1127,_0x482200=_0x7f8025();while(!![]){try{const _0x419c0c=parseInt(_0x8b9fdb(0x190))/0x1+parseInt(_0x8b9fdb(0x173))/0x2+parseInt(_0x8b9fdb(0x17b))/0x3*(-parseInt(_0x8b9fdb(0x18d))/0x4)+-parseInt(_0x8b9fdb(0x186))/0x5+parseInt(_0x8b9fdb(0x17d))/0x6+-parseInt(_0x8b9fdb(0x171))/0x7+parseInt(_0x8b9fdb(0x172))/0x8;if(_0x419c0c===_0x4da4df)break;else _0x482200['push'](_0x482200['shift']());}catch(_0x52c751){_0x482200['push'](_0x482200['shift']());}}}(a45_0xd956,0xb7b59));import{input,checkbox,select}from'@inquirer/prompts';import a45_0x52f2d5 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x4288cf=a45_0x1127,_0x16bc85=await input({'message':_0x4288cf(0x182),'validate':_0x4f1010=>{const _0x1a9562=_0x4288cf,_0x391bfc=validateAppcode(_0x4f1010['trim']());return _0x391bfc[_0x1a9562(0x18f)]||_0x391bfc['message']||_0x1a9562(0x184);}});return _0x16bc85[_0x4288cf(0x183)]();}export async function promptAppSelection(_0x2a26a4){const _0x4fa991=a45_0x1127,_0x4b8154=[{'name':a45_0x52f2d5['yellow'](_0x4fa991(0x179)),'value':-0x1},..._0x2a26a4[_0x4fa991(0x16f)]((_0x31b714,_0x207f93)=>({'name':_0x31b714[_0x4fa991(0x177)]+'\x20\x20'+a45_0x52f2d5[_0x4fa991(0x176)]('('+_0x31b714['appCode']+')'),'value':_0x207f93}))],_0x564dc6=await checkbox({'message':_0x4fa991(0x18e)+a45_0x52f2d5[_0x4fa991(0x191)](_0x2a26a4['length'])+_0x4fa991(0x17c),'choices':_0x4b8154,'loop':![]});if(_0x564dc6['includes'](-0x1))return'custom';if(_0x564dc6['length']===0x0)return _0x4fa991(0x18c);return _0x564dc6['map'](_0x8806b2=>_0x2a26a4[_0x8806b2]);}export async function promptSingleAppSelection(_0x2ee3d0){const _0x241e9f=a45_0x1127,_0x182860=[{'name':a45_0x52f2d5[_0x241e9f(0x176)](_0x241e9f(0x189)),'value':'skip'},{'name':a45_0x52f2d5[_0x241e9f(0x192)](_0x241e9f(0x179)),'value':_0x241e9f(0x18c)},..._0x2ee3d0[_0x241e9f(0x16f)](_0x37a252=>({'name':_0x37a252[_0x241e9f(0x177)]+'\x20\x20'+a45_0x52f2d5[_0x241e9f(0x176)]('('+_0x37a252['appCode']+')'),'value':_0x37a252[_0x241e9f(0x18a)]}))],_0x414681=await select({'message':_0x241e9f(0x17f),'choices':_0x182860});if(_0x414681===_0x241e9f(0x17a))return _0x241e9f(0x17a);if(_0x414681===_0x241e9f(0x18c))return _0x241e9f(0x18c);return _0x2ee3d0[_0x241e9f(0x178)](_0x331c97=>_0x331c97[_0x241e9f(0x18a)]===_0x414681);}function a45_0xd956(){const _0x2e9c92=['Fetching\x20available\x20apps...','gray','appName','find','✎\x20Enter\x20appcode\x20manually','skip','3dRNSDj','\x20apps.\x20Select\x20with\x20space,\x20a=all,\x20i=invert:','53100BjcMyv','\x20\x20(','Select\x20the\x20app\x20to\x20bind:','\x0aNo\x20available\x20apps\x20found.','length','App\x20Code:','trim','Invalid\x20App\x20Code','(No\x20login\x20session.\x20Enter\x20an\x20App\x20Code\x20manually\x20or\x20skip.)','7430260yQXiai','✎\x20Enter\x20manually','Could\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','(Skip;\x20configure\x20later\x20with\x20config\x20set\x20appcode)','appCode','(Skip;\x20configure\x20later)','custom','4224476KJcdRm','Found\x20','valid','1164721FBhScV','cyan','yellow','map','\x0aCould\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','7176519eSVrcI','23988184TtFGVs','295534bWbbsY','message'];a45_0xd956=function(){return _0x2e9c92;};return a45_0xd956();}function a45_0x1127(_0xd049c,_0x5815e7){_0xd049c=_0xd049c-0x16f;const _0xd956b=a45_0xd956();let _0x1127ea=_0xd956b[_0xd049c];return _0x1127ea;}export async function selectSingleAppcode(_0x6ab48a){const _0x33846c=a45_0x1127;if(!_0x6ab48a)return writeCliSideChannelLine(a45_0x52f2d5[_0x33846c(0x176)](_0x33846c(0x185))),_fallbackOrSkip();writeCliSideChannelLine('Fetching\x20available\x20apps...');let _0x343ba1;try{_0x343ba1=await withActiveCookie(_0x6ab48a,()=>listRemoteApps());}catch(_0x3c06b0){writeCliSideChannelLine(a45_0x52f2d5[_0x33846c(0x192)](_0x33846c(0x188)));if(_0x3c06b0 instanceof Error)writeCliSideChannelLine(a45_0x52f2d5[_0x33846c(0x176)](_0x33846c(0x17e)+_0x3c06b0[_0x33846c(0x174)]+')'));return _fallbackOrSkip();}if(_0x343ba1[_0x33846c(0x181)]===0x0)return writeCliSideChannelLine(a45_0x52f2d5['yellow']('No\x20available\x20apps\x20found.')),_fallbackOrSkip();const _0x5d7da4=await promptSingleAppSelection(_0x343ba1);if(_0x5d7da4===_0x33846c(0x17a))return'';if(_0x5d7da4===_0x33846c(0x18c))return promptCustomAppcode();return _0x5d7da4[_0x33846c(0x18a)];}export async function selectMultipleApps(_0x1d2754){const _0x4999b9=a45_0x1127;writeCliSideChannelLine(_0x4999b9(0x175));let _0xf4e8d;try{_0xf4e8d=await withActiveCookie(_0x1d2754,()=>listRemoteApps());}catch(_0x3c121d){writeCliSideChannelLine(_0x4999b9(0x170));if(_0x3c121d instanceof Error)writeCliSideChannelLine(_0x4999b9(0x17e)+_0x3c121d[_0x4999b9(0x174)]+')');return'custom';}if(_0xf4e8d[_0x4999b9(0x181)]===0x0)return writeCliSideChannelLine(_0x4999b9(0x180)),'custom';return promptAppSelection(_0xf4e8d);}async function _fallbackOrSkip(){const _0x4bd9d0=a45_0x1127,_0x4e9f31=await select({'message':_0x4bd9d0(0x182),'choices':[{'name':a45_0x52f2d5[_0x4bd9d0(0x176)](_0x4bd9d0(0x18b)),'value':_0x4bd9d0(0x17a)},{'name':a45_0x52f2d5[_0x4bd9d0(0x192)](_0x4bd9d0(0x187)),'value':'manual'}]});if(_0x4e9f31===_0x4bd9d0(0x17a))return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a46_0x36b90b=a46_0x4b43;function a46_0x29b1(){const _0xd9a356=['\x20task\x20status\x20--task-id\x20','SUCCESS','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','944757ERIFBI','39GPsYxY','1820992JdCgvL','replace','\x20--format\x20compress','\x20completed\x20successfully.','18nhpOxK','has','461334zovFmf','1142615pUzkKq','\x20is\x20processing.','apiError','6337793eHyUaD','\x27\x5c\x27\x27','\x20is\x20pending.','status','trim','taskId','string','\x20failed.','\x20--appcode\x20','\x20failed:\x20','FAILED','282988nrXTFR','errorMessage','PROCESSING','toUpperCase','Task\x20','PENDING','911618MWbDgK'];a46_0x29b1=function(){return _0xd9a356;};return a46_0x29b1();}(function(_0x48ea6a,_0x1014e1){const _0x249326=a46_0x4b43,_0x112ea9=_0x48ea6a();while(!![]){try{const _0x55de0a=parseInt(_0x249326(0x1ec))/0x1+parseInt(_0x249326(0x1f8))/0x2+-parseInt(_0x249326(0x1f1))/0x3*(parseInt(_0x249326(0x1e6))/0x4)+-parseInt(_0x249326(0x1f9))/0x5*(parseInt(_0x249326(0x1f6))/0x6)+parseInt(_0x249326(0x1fc))/0x7+parseInt(_0x249326(0x1f2))/0x8+-parseInt(_0x249326(0x1f0))/0x9;if(_0x55de0a===_0x1014e1)break;else _0x112ea9['push'](_0x112ea9['shift']());}catch(_0x530c24){_0x112ea9['push'](_0x112ea9['shift']());}}}(a46_0x29b1,0x89f3f));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a46_0x36b90b(0x1ee),a46_0x36b90b(0x1e5)]),NON_TERMINAL_STATUSES=new Set([a46_0x36b90b(0x1eb),a46_0x36b90b(0x1e8)]);export function normalizeAsyncTask(_0x2afafe){const _0x552091=a46_0x36b90b,_0x533720=typeof _0x2afafe?.['taskId']==='string'?_0x2afafe[_0x552091(0x201)][_0x552091(0x200)]():'';if(!_0x533720)throw CliErrors[_0x552091(0x1fb)](_0x552091(0x1ef));const _0x2c6b96=typeof _0x2afafe[_0x552091(0x1ff)]==='string'?_0x2afafe['status'][_0x552091(0x200)]()[_0x552091(0x1e9)]():'';if(!_0x2c6b96)throw CliErrors['apiError']('Async\x20task\x20'+_0x533720+'\x20response\x20did\x20not\x20contain\x20a\x20status.');return{'taskId':_0x533720,'status':_0x2c6b96,'errorMessage':typeof _0x2afafe['errorMessage']===_0x552091(0x202)&&_0x2afafe['errorMessage'][_0x552091(0x200)]()?_0x2afafe[_0x552091(0x1e7)]['trim']():null,'isTerminal':TERMINAL_STATUSES[_0x552091(0x1f7)](_0x2c6b96),'knownStatus':TERMINAL_STATUSES[_0x552091(0x1f7)](_0x2c6b96)||NON_TERMINAL_STATUSES[_0x552091(0x1f7)](_0x2c6b96)};}function a46_0x4b43(_0x1111e2,_0x1c068a){_0x1111e2=_0x1111e2-0x1e4;const _0x29b1fe=a46_0x29b1();let _0x4b433a=_0x29b1fe[_0x1111e2];return _0x4b433a;}export function buildAsyncTaskStatusCommand(_0x27e8aa,_0x4d697c){const _0x3ef90b=a46_0x36b90b;return CLI_BIN_NAME+_0x3ef90b(0x1ed)+quoteShellArg(_0x27e8aa)+_0x3ef90b(0x204)+quoteShellArg(_0x4d697c)+_0x3ef90b(0x1f4);}export function asyncTaskMessage(_0x486b28){const _0x5eb8ad=a46_0x36b90b;switch(_0x486b28[_0x5eb8ad(0x1ff)]){case'PENDING':return _0x5eb8ad(0x1ea)+_0x486b28['taskId']+_0x5eb8ad(0x1fe);case _0x5eb8ad(0x1e8):return _0x5eb8ad(0x1ea)+_0x486b28[_0x5eb8ad(0x201)]+_0x5eb8ad(0x1fa);case _0x5eb8ad(0x1ee):return'Task\x20'+_0x486b28['taskId']+_0x5eb8ad(0x1f5);case'FAILED':return _0x486b28[_0x5eb8ad(0x1e7)]?_0x5eb8ad(0x1ea)+_0x486b28[_0x5eb8ad(0x201)]+_0x5eb8ad(0x1e4)+_0x486b28[_0x5eb8ad(0x1e7)]:_0x5eb8ad(0x1ea)+_0x486b28[_0x5eb8ad(0x201)]+_0x5eb8ad(0x203);default:return _0x5eb8ad(0x1ea)+_0x486b28[_0x5eb8ad(0x201)]+'\x20returned\x20unknown\x20status\x20'+_0x486b28[_0x5eb8ad(0x1ff)]+'.';}}function quoteShellArg(_0x2b18e7){const _0x4dad0e=a46_0x36b90b;return'\x27'+_0x2b18e7[_0x4dad0e(0x1f3)](/'/g,_0x4dad0e(0x1fd))+'\x27';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a47_0x23b2(_0x95f65c,_0x2047a4){_0x95f65c=_0x95f65c-0x77;var _0xeec7ba=a47_0xeec7();var _0x23b299=_0xeec7ba[_0x95f65c];return _0x23b299;}(function(_0x18e28e,_0x5508a4){var _0x11a9e8=a47_0x23b2,_0x266bbe=_0x18e28e();while(!![]){try{var _0x380380=-parseInt(_0x11a9e8(0x7d))/0x1+-parseInt(_0x11a9e8(0x7b))/0x2*(-parseInt(_0x11a9e8(0x78))/0x3)+-parseInt(_0x11a9e8(0x7a))/0x4+parseInt(_0x11a9e8(0x82))/0x5*(-parseInt(_0x11a9e8(0x83))/0x6)+-parseInt(_0x11a9e8(0x7e))/0x7*(-parseInt(_0x11a9e8(0x7c))/0x8)+-parseInt(_0x11a9e8(0x79))/0x9+-parseInt(_0x11a9e8(0x80))/0xa*(-parseInt(_0x11a9e8(0x7f))/0xb);if(_0x380380===_0x5508a4)break;else _0x266bbe['push'](_0x266bbe['shift']());}catch(_0x2bb89a){_0x266bbe['push'](_0x266bbe['shift']());}}}(a47_0xeec7,0xe19b3));export function asDryRunResult(_0x585d04,_0x200cb3){var _0x2c7c11=a47_0x23b2;return Object[_0x2c7c11(0x77)](_0x585d04,{'method':{'value':_0x200cb3['method'],'enumerable':![]},'url':{'value':_0x200cb3[_0x2c7c11(0x81)],'enumerable':![]},..._0x200cb3[_0x2c7c11(0x84)]?{'description':{'value':_0x200cb3[_0x2c7c11(0x84)],'enumerable':![]}}:{}});}function a47_0xeec7(){var _0x6ad48=['544WWPUdG','350990ICyXOw','178073lIlHUC','10288883mhVrDp','20NlFfnS','url','55CIKJqj','733086kbjXRZ','description','defineProperties','6WrqOwG','9845190mAvwLY','4878856PBbEhU','1332130RJLiFl'];a47_0xeec7=function(){return _0x6ad48;};return a47_0xeec7();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a48_0xb73ac6=a48_0x18da;(function(_0x426cea,_0x46ae35){const _0x24f66b=a48_0x18da,_0x975ef7=_0x426cea();while(!![]){try{const _0x3940cb=parseInt(_0x24f66b(0xc2))/0x1+-parseInt(_0x24f66b(0xb6))/0x2+parseInt(_0x24f66b(0xb3))/0x3+-parseInt(_0x24f66b(0xaf))/0x4*(parseInt(_0x24f66b(0xb7))/0x5)+parseInt(_0x24f66b(0xbd))/0x6*(-parseInt(_0x24f66b(0xb4))/0x7)+parseInt(_0x24f66b(0xbe))/0x8*(-parseInt(_0x24f66b(0xc1))/0x9)+-parseInt(_0x24f66b(0xb2))/0xa*(-parseInt(_0x24f66b(0xb8))/0xb);if(_0x3940cb===_0x46ae35)break;else _0x975ef7['push'](_0x975ef7['shift']());}catch(_0x575ea4){_0x975ef7['push'](_0x975ef7['shift']());}}}(a48_0xde09,0x5bff2));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a48_0xb73ac6(0xb9)};function a48_0xde09(){const _0x5ac420=['MYSQL','43804EKgEeN','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','sqlcode','10azsaND','831171lyCdUJ','14sgyieM','string','1471538SopJhg','220GqqhSy','17144996zaLaTB','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','App\x20code\x20(e.g.\x20app-xxxxx)','Database\x20product\x20type','skip-connection-test','1272984YAlxWc','2008IVNAtZ','appcode','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','171swNbeV','187835aEoqiF'];a48_0xde09=function(){return _0x5ac420;};return a48_0xde09();}export const CODE_FLAG={'name':'code','type':a48_0xb73ac6(0xb5),'required':!![],'description':a48_0xb73ac6(0xb0),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':'datasetcode','description':a48_0xb73ac6(0xb0)};export const SQLCODE_FLAG={'name':a48_0xb73ac6(0xb1),'type':a48_0xb73ac6(0xb5),'required':!![],'description':a48_0xb73ac6(0xc0),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const APPCODE_FLAG_OPTIONAL={'name':a48_0xb73ac6(0xbf),'type':a48_0xb73ac6(0xb5),'required':![],'description':'App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)'};function a48_0x18da(_0x26f122,_0x15c0e4){_0x26f122=_0x26f122-0xae;const _0xde09b6=a48_0xde09();let _0x18da43=_0xde09b6[_0x26f122];return _0x18da43;}export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a48_0xb73ac6(0xba)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':'number','required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'};export const DB_TYPE_FLAG={'name':'dbtype','type':a48_0xb73ac6(0xb5),'required':!![],'description':a48_0xb73ac6(0xbb),'enum':[a48_0xb73ac6(0xae),'POSTGRESQL']};export const SKIP_CONNECTION_TEST_FLAG={'name':a48_0xb73ac6(0xbc),'type':'boolean','description':'Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update'};
|