@lovrabet/rabetbase-cli 2.5.2-beta.6 → 2.5.2
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/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/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/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2027ec,_0x695d4){const _0x120d8c=a34_0x4063,_0x366852=_0x2027ec();while(!![]){try{const _0x4a6e16=-parseInt(_0x120d8c(0x1a7))/0x1*(-parseInt(_0x120d8c(0x1a1))/0x2)+parseInt(_0x120d8c(0x1a0))/0x3+parseInt(_0x120d8c(0x1a8))/0x4*(-parseInt(_0x120d8c(0x1a3))/0x5)+parseInt(_0x120d8c(0x1a2))/0x6+parseInt(_0x120d8c(0x1a5))/0x7*(-parseInt(_0x120d8c(0x19e))/0x8)+-parseInt(_0x120d8c(0x1a4))/0x9*(-parseInt(_0x120d8c(0x1a6))/0xa)+parseInt(_0x120d8c(0x19f))/0xb;if(_0x4a6e16===_0x695d4)break;else _0x366852['push'](_0x366852['shift']());}catch(_0x29b4e8){_0x366852['push'](_0x366852['shift']());}}}(a34_0x2b0c,0x6f922));import{bffList}from'../../commands/bff/list.js';import{bffDetail}from'../../commands/bff/detail.js';import{bffStatus}from'../../commands/bff/status.js';function a34_0x2b0c(){const _0x18f64c=['4903470OKuBgM','189636pUSiNy','42334jxCDkD','3216180KcOlpt','79380igdMSU','251973xBQYfp','14cRacRz','30sGqDUI','1RmBXah','40DGHxYd','2137664iuqBHH'];a34_0x2b0c=function(){return _0x18f64c;};return a34_0x2b0c();}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';function a34_0x4063(_0x32edab,_0x3e7166){_0x32edab=_0x32edab-0x19e;const _0x2b0cfc=a34_0x2b0c();let _0x40633d=_0x2b0cfc[_0x32edab];return _0x40633d;}export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];
|
package/lib/commands/bff/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a35_0x34c9(){const _0xc1c0f3=['list','verbose','35924MopeHv','name','type','str','300584zErSbo','appCode','24cAfCif','functionName','bff','List\x20Backend\x20Function\x20scripts','2133860eHBVPa','string','read','(unnamed)','boolean','993634fNWxTh','216ZPgGAT','ENDPOINT','99MnWkcU','5BsVyQZ','map','2863359fLIpui','COMMON','Script\x20type\x20filter','Filter\x20by\x20script\x20name','bool','description','Return\x20full\x20script\x20objects','420590jLMUWZ','No\x20Backend\x20Function\x20scripts\x20found.','247260oImmtu'];a35_0x34c9=function(){return _0xc1c0f3;};return a35_0x34c9();}const a35_0x3fedb2=a35_0x5216;function a35_0x5216(_0x2455ea,_0x512e4a){_0x2455ea=_0x2455ea-0x10a;const _0x34c9d2=a35_0x34c9();let _0x5216e9=_0x34c9d2[_0x2455ea];return _0x5216e9;}(function(_0x5b80f1,_0x134015){const _0x1fa9c3=a35_0x5216,_0x4f2567=_0x5b80f1();while(!![]){try{const _0xfcefec=parseInt(_0x1fa9c3(0x124))/0x1+-parseInt(_0x1fa9c3(0x115))/0x2+parseInt(_0x1fa9c3(0x11b))/0x3+-parseInt(_0x1fa9c3(0x110))/0x4*(-parseInt(_0x1fa9c3(0x119))/0x5)+-parseInt(_0x1fa9c3(0x10c))/0x6*(parseInt(_0x1fa9c3(0x127))/0x7)+parseInt(_0x1fa9c3(0x10a))/0x8*(-parseInt(_0x1fa9c3(0x116))/0x9)+parseInt(_0x1fa9c3(0x122))/0xa*(parseInt(_0x1fa9c3(0x118))/0xb);if(_0xfcefec===_0x134015)break;else _0x4f2567['push'](_0x4f2567['shift']());}catch(_0x1904b8){_0x4f2567['push'](_0x4f2567['shift']());}}}(a35_0x34c9,0xa9954));import{listBffScripts}from'../../core/api-client.js';export const bffList={'service':a35_0x3fedb2(0x10e),'command':a35_0x3fedb2(0x125),'description':a35_0x3fedb2(0x10f),'risk':a35_0x3fedb2(0x112),'flags':[{'name':a35_0x3fedb2(0x129),'type':a35_0x3fedb2(0x111),'description':a35_0x3fedb2(0x11d),'default':a35_0x3fedb2(0x117),'enum':[a35_0x3fedb2(0x117),a35_0x3fedb2(0x11c)]},{'name':a35_0x3fedb2(0x128),'type':a35_0x3fedb2(0x111),'description':a35_0x3fedb2(0x11e)},{'name':a35_0x3fedb2(0x126),'type':a35_0x3fedb2(0x114),'description':a35_0x3fedb2(0x121)}],async 'execute'(_0x30a66e){const _0x488507=a35_0x3fedb2,_0xfad952=await listBffScripts(_0x30a66e[_0x488507(0x10b)],_0x30a66e[_0x488507(0x12a)](_0x488507(0x129)),{'scriptName':_0x30a66e['str'](_0x488507(0x128))||undefined}),_0x127876=_0x30a66e[_0x488507(0x11f)](_0x488507(0x126));return{'ok':!![],'data':_0x127876?_0xfad952:_0xfad952[_0x488507(0x11a)](_0x21500e=>({'id':_0x21500e['id'],'functionName':_0x21500e[_0x488507(0x10d)]??'','description':_0x21500e[_0x488507(0x120)]||_0x488507(0x113),'scriptType':_0x21500e['scriptType']})),'message':_0xfad952['length']===0x0?_0x488507(0x123):undefined};}};
|
package/lib/commands/bff/pull.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a36_0x333617=a36_0xc9f9;(function(_0x494dcc,_0x27ab24){const _0x2e447d=a36_0xc9f9,_0x465063=_0x494dcc();while(!![]){try{const _0x2b969d=parseInt(_0x2e447d(0x234))/0x1+-parseInt(_0x2e447d(0x227))/0x2*(-parseInt(_0x2e447d(0x212))/0x3)+-parseInt(_0x2e447d(0x1f5))/0x4+parseInt(_0x2e447d(0x221))/0x5*(-parseInt(_0x2e447d(0x225))/0x6)+-parseInt(_0x2e447d(0x223))/0x7*(parseInt(_0x2e447d(0x22a))/0x8)+parseInt(_0x2e447d(0x1fb))/0x9+-parseInt(_0x2e447d(0x20b))/0xa*(-parseInt(_0x2e447d(0x235))/0xb);if(_0x2b969d===_0x27ab24)break;else _0x465063['push'](_0x465063['shift']());}catch(_0x16d829){_0x465063['push'](_0x465063['shift']());}}}(a36_0x4d15,0x47074));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';function a36_0xc9f9(_0x366476,_0x44bc2b){_0x366476=_0x366476-0x1f2;const _0x4d1554=a36_0x4d15();let _0xc9f90a=_0x4d1554[_0x366476];return _0xc9f90a;}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';function a36_0x4d15(){const _0x3da48d=['functions','\x20failed','local\x20unsynced\x20changes','type','lockKey','Pull\x20remote\x20Backend\x20Function\x20scripts\x20to\x20local','validation','Pull\x20complete:\x20','would_pull','HOOK','functionName','Force\x20pull\x20cancelled.','question','\x20remote\x20Backend\x20Function\x20script(s)\x20for\x20pull','bff','410VQKHLv','functionNode','force','Force\x20overwrite\x20local\x20unsynced\x20changes','operationType','read','includes','3INQzpM','No\x20remote\x20Backend\x20Function\x20scripts\x20found.','toLowerCase','length','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','close','scriptContent','Would\x20inspect\x20','stringify','stdin','appCode','bool','\x22\x20not\x20found\x20after\x20ensureLockScope.','parse','string','32415zlulRs','cancelled','146741SPsTKB','datasetCode','318NLwMFB','push','791950lBbFDp','hash','lastSync','40jqLMUZ','filePath','alias','lockFilePath','boolean','version','/api/management/library/scripts/list?appCode=','conflict','hookLocation','Remote\x20script\x20missing\x20id.','353724BqhGeK','6028AIOUVf','\x20pulled,\x20','unresolvable\x20target\x20path','\x20skipped,\x20','scriptsRoot','trim','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','utf8','GET','yes','COMMON','message','622044ViNUim','map','nonInteractive','str','pull','all','1104210Zgysth'];a36_0x4d15=function(){return _0x3da48d;};return a36_0x4d15();}import{CliErrors}from'../../errors.js';export const bffPull={'service':a36_0x333617(0x20a),'command':a36_0x333617(0x1f9),'description':a36_0x333617(0x201),'risk':a36_0x333617(0x210),'flags':[{'name':a36_0x333617(0x1ff),'type':a36_0x333617(0x220),'description':'Pull\x20only\x20this\x20script\x20type','enum':[a36_0x333617(0x1f3),'ENDPOINT',a36_0x333617(0x205)]},{'name':a36_0x333617(0x20d),'type':a36_0x333617(0x22e),'description':a36_0x333617(0x20e)}],async 'dryRun'(_0x23274){const _0x41c984=a36_0x333617,_0x1b982c=loadBffProjectConfig(_0x23274['appCode']),_0xe8dd3c=await readBffLockFile(_0x1b982c[_0x41c984(0x22d)]),{appLock:_0x144441}=ensureLockScope(_0xe8dd3c??createEmptyBffLock(),_0x23274[_0x41c984(0x21c)],_0x1b982c[_0x41c984(0x239)],'pull'),_0x3975fe=normalizeBffType(_0x23274[_0x41c984(0x1f8)](_0x41c984(0x1ff)))??undefined,_0x42d08d=buildDatasetCodeToAliasMap(_0x23274['apiDir'],_0x23274[_0x41c984(0x21c)]),[_0x6485f0,_0x26467b]=await Promise['all']([listBffScripts(_0x23274['appCode'],_0x3975fe),getBffScriptStatistics(_0x23274['appCode'])]),_0x264611=createHookLocationMap(_0x26467b),_0x151a29=[];for(const _0x3bd6d of _0x6485f0){const _0x4aa698=resolveRemoteScriptTarget(_0x1b982c,_0x3bd6d,_0x264611,_0x144441[_0x41c984(0x1fc)],_0x42d08d);if(!_0x4aa698){_0x151a29[_0x41c984(0x226)]({'scriptType':_0x3bd6d['scriptType'],'functionName':_0x3bd6d[_0x41c984(0x206)]??'','status':'skipped','reason':'unresolvable\x20target\x20path'});continue;}const _0x5432d3=_0x144441[_0x41c984(0x1fc)][_0x4aa698[_0x41c984(0x200)]],_0x39f4cc=_0x3bd6d['scriptContent']!=null?computeContentHash(_0x3bd6d['scriptContent']):undefined,_0x189677=await hasUnsyncedLocalChanges(_0x4aa698['filePath'],_0x5432d3,_0x39f4cc);_0x151a29[_0x41c984(0x226)]({'lockKey':_0x4aa698[_0x41c984(0x200)],'filePath':_0x4aa698[_0x41c984(0x22b)],'remoteId':_0x3bd6d['id']??null,'status':_0x189677?_0x41c984(0x231):_0x41c984(0x204)});}return{'method':_0x41c984(0x23d),'url':_0x41c984(0x230)+_0x23274['appCode']+(_0x3975fe?'&type='+_0x3975fe:''),'body':{'appCode':_0x23274[_0x41c984(0x21c)],'filterType':_0x3975fe??null,'files':_0x151a29},'description':_0x41c984(0x219)+_0x151a29['length']+_0x41c984(0x209)};},async 'execute'(_0x29646f){const _0xa23258=a36_0x333617,_0x16b9b4=loadBffProjectConfig(_0x29646f[_0xa23258(0x21c)]),_0x3e66d2=await readBffLockFile(_0x16b9b4[_0xa23258(0x22d)]),{lockData:_0x42a8fd,appLock:_0x4ad180}=ensureLockScope(_0x3e66d2??createEmptyBffLock(),_0x29646f[_0xa23258(0x21c)],_0x16b9b4[_0xa23258(0x239)],'pull'),_0x43f65a=normalizeBffType(_0x29646f[_0xa23258(0x1f8)](_0xa23258(0x1ff)))??undefined;if(_0x29646f[_0xa23258(0x1f8)](_0xa23258(0x1ff))&&!_0x43f65a)throw CliErrors[_0xa23258(0x202)](_0xa23258(0x216));const [_0x5645f6,_0x3d90ee]=await Promise[_0xa23258(0x1fa)]([listBffScripts(_0x29646f['appCode'],_0x43f65a),getBffScriptStatistics(_0x29646f['appCode'])]);if(_0x5645f6['length']===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0xa23258(0x213)};const _0x39f8e9=_0x29646f[_0xa23258(0x21d)](_0xa23258(0x20d));if(_0x39f8e9&&!_0x29646f[_0xa23258(0x1f7)]){const _0x42ffbe=await confirmForce();if(!_0x42ffbe)throw CliErrors[_0xa23258(0x222)](_0xa23258(0x207));}if(_0x39f8e9&&_0x29646f['nonInteractive']){}const _0x2109bf=buildDatasetCodeToAliasMap(_0x29646f['apiDir'],_0x29646f['appCode']),_0x984245=createHookLocationMap(_0x3d90ee),_0x2e8b7c=JSON[_0xa23258(0x21f)](JSON[_0xa23258(0x21a)](_0x42a8fd)),_0xc20faa=_0x29646f[_0xa23258(0x21c)],_0x185697=_0x2e8b7c['apps'][_0xc20faa];if(!_0x185697)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0xc20faa+_0xa23258(0x21e));const _0x50eeb3=[],_0x24ea3=[],_0x127456=[];for(const _0x199f7a of _0x5645f6){const _0xfad93=resolveRemoteScriptTarget(_0x16b9b4,_0x199f7a,_0x984245,_0x4ad180[_0xa23258(0x1fc)],_0x2109bf);if(!_0xfad93){_0x24ea3[_0xa23258(0x226)]({'lockKey':_0x199f7a['scriptType']+'/'+_0x199f7a[_0xa23258(0x206)],'reason':_0xa23258(0x237)});continue;}const _0x5ea2fe=_0x4ad180[_0xa23258(0x1fc)][_0xfad93['lockKey']];try{if(!_0x199f7a['id'])throw new Error(_0xa23258(0x233));if(_0x199f7a[_0xa23258(0x218)]==null)throw new Error('Remote\x20script\x20missing\x20content.');const _0x2250e2=_0x199f7a[_0xa23258(0x218)],_0x18b28=computeContentHash(_0x2250e2);if(!_0x39f8e9){const _0x395e50=await hasUnsyncedLocalChanges(_0xfad93[_0xa23258(0x22b)],_0x5ea2fe,_0x18b28);if(_0x395e50){_0x24ea3[_0xa23258(0x226)]({'lockKey':_0xfad93[_0xa23258(0x200)],'reason':_0xa23258(0x1fe)});continue;}}await ensureParentDirectory(_0xfad93['filePath']),await writeFile(_0xfad93['filePath'],_0x2250e2,_0xa23258(0x23c));const _0x330e48={'hash':_0x18b28,'remoteId':_0x199f7a['id'],'version':_0x199f7a[_0xa23258(0x22f)]};_0xfad93[_0xa23258(0x1ff)]==='HOOK'&&_0xfad93[_0xa23258(0x232)]&&(_0x330e48[_0xa23258(0x22c)]=_0xfad93['hookLocation'][_0xa23258(0x22c)],_0x330e48[_0xa23258(0x224)]=_0xfad93[_0xa23258(0x232)][_0xa23258(0x224)],_0x330e48[_0xa23258(0x20f)]=_0xfad93[_0xa23258(0x232)][_0xa23258(0x20f)],_0x330e48[_0xa23258(0x20c)]=_0xfad93['hookLocation'][_0xa23258(0x20c)]),_0x185697['functions'][_0xfad93[_0xa23258(0x200)]]=_0x330e48,_0x50eeb3[_0xa23258(0x226)]({'lockKey':_0xfad93[_0xa23258(0x200)],'remoteId':_0x199f7a['id']});}catch(_0x410bb2){_0x127456[_0xa23258(0x226)]({'lockKey':_0xfad93[_0xa23258(0x200)],'error':_0x410bb2 instanceof Error?_0x410bb2[_0xa23258(0x1f4)]:String(_0x410bb2)});}}return _0x185697[_0xa23258(0x229)]=new Date()['toISOString'](),await writeBffLockFile(_0x16b9b4[_0xa23258(0x22d)],_0x2e8b7c),{'ok':_0x127456[_0xa23258(0x215)]===0x0,'data':{'pulled':_0x50eeb3,'skipped':_0x24ea3,'failed':_0x127456},'message':_0xa23258(0x203)+_0x50eeb3['length']+_0xa23258(0x236)+_0x24ea3[_0xa23258(0x215)]+_0xa23258(0x238)+_0x127456['length']+_0xa23258(0x1fd)};}};async function hasUnsyncedLocalChanges(_0x3b3ed1,_0xf5a8ee,_0xf9f636){const _0x9811ee=a36_0x333617;if(!await fileExists(_0x3b3ed1))return![];const _0x4eda41=await computeFileHash(_0x3b3ed1);if(!_0xf5a8ee)return _0xf9f636?_0x4eda41!==_0xf9f636:!![];return _0x4eda41!==_0xf5a8ee[_0x9811ee(0x228)];}function buildDatasetCodeToAliasMap(_0x2ade7e,_0x513a2c){const _0x63846e=a36_0x333617,_0x47ef7e=loadAliasMap(_0x2ade7e,undefined,resolveApiFilePath(_0x2ade7e,_0x513a2c));return new Map(_0x47ef7e[_0x63846e(0x1f6)](_0x5aec11=>[_0x5aec11[_0x63846e(0x224)],_0x5aec11[_0x63846e(0x22c)]]));}async function confirmForce(){const _0x5296d1=a36_0x333617,_0x492061=createInterface({'input':process[_0x5296d1(0x21b)],'output':process['stderr']}),_0x2e187e=await new Promise(_0x5c3747=>{const _0x1edada=_0x5296d1;_0x492061[_0x1edada(0x208)](_0x1edada(0x23b),_0x5c3747);});return _0x492061[_0x5296d1(0x217)](),['y',_0x5296d1(0x1f2)][_0x5296d1(0x211)](_0x2e187e[_0x5296d1(0x23a)]()[_0x5296d1(0x214)]());}
|
package/lib/commands/bff/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a37_0x325ae5=a37_0x48c6;(function(_0x586916,_0x21ca4b){const _0x36656=a37_0x48c6,_0x3ed4af=_0x586916();while(!![]){try{const _0x308dd4=-parseInt(_0x36656(0x93))/0x1+-parseInt(_0x36656(0x9a))/0x2*(-parseInt(_0x36656(0xca))/0x3)+parseInt(_0x36656(0xaf))/0x4+parseInt(_0x36656(0xac))/0x5+-parseInt(_0x36656(0x97))/0x6+parseInt(_0x36656(0xd7))/0x7*(-parseInt(_0x36656(0xa3))/0x8)+-parseInt(_0x36656(0xc5))/0x9;if(_0x308dd4===_0x21ca4b)break;else _0x3ed4af['push'](_0x3ed4af['shift']());}catch(_0x340da5){_0x3ed4af['push'](_0x3ed4af['shift']());}}}(a37_0x53a2,0x7037d));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';function a37_0x53a2(){const _0x2207f0=['\x20uploaded,\x20','every','POST','stringify','length','set','str','runtime\x20cache\x20not\x20needed','1071VxrzWr','Push\x20complete:\x20','map','status','name','functionNode','COMMON','lastSync','write','force','runtime\x20cache\x20cleared','alias','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','filePath','Would\x20inspect\x20','validation','has','attempted','254901Fyilym','lockFilePath','get','cleared','1363302AArmcW','parse','\x20failed,\x20','6866zwCgOL','remoteId','Cannot\x20resolve\x20dataset\x20for\x20\x22','\x22.\x20','apiDir','Local\x20function\x20not\x20found:\x20','hash','values','update','16272sTImVK','join','Run\x20`','would_push','scriptsRoot','push','Force\x20push\x20ignoring\x20hash\x20protection','runtime\x20cache\x20clear\x20failed','aliasToDatasetCode','3561515FfcrfM','utf8','lockKey','3065744rOisCo','Incomplete\x20HOOK\x20path:\x20','functions','bff','unchanged','bool','type','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','datasetCodeToDataset','string','datasetId','description','\x20skipped,\x20','apps','HOOK',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','message','Push\x20only\x20this\x20script\x20type','create','version','toISOString','9910701grnosx','operationType','some','/api/management/library/scripts/save','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','765wEFMuo','boolean','datasetCode','filter','appCode'];a37_0x53a2=function(){return _0x2207f0;};return a37_0x53a2();}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a37_0x325ae5(0xb2),'command':a37_0x325ae5(0xa8),'description':a37_0x325ae5(0xbf),'risk':a37_0x325ae5(0xdf),'flags':[{'name':a37_0x325ae5(0xb5),'type':a37_0x325ae5(0xb8),'description':a37_0x325ae5(0xc1),'enum':[a37_0x325ae5(0xdd),'ENDPOINT',a37_0x325ae5(0xbd)]},{'name':a37_0x325ae5(0xdb),'type':'string','description':'Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)'},{'name':a37_0x325ae5(0xe0),'type':a37_0x325ae5(0xcb),'description':a37_0x325ae5(0xa9)}],async 'dryRun'(_0x7c52a1){const _0x5ada37=a37_0x325ae5,_0x559321=loadBffProjectConfig(_0x7c52a1['appCode']),_0xb86ea0=await readBffLockFile(_0x559321[_0x5ada37(0x94)]),{appLock:_0x2d833a}=ensureLockScope(_0xb86ea0??createEmptyBffLock(),_0x7c52a1[_0x5ada37(0xce)],_0x559321['scriptsRoot'],_0x5ada37(0xa8)),_0x514136=await getTargetFunctions(_0x559321,_0x7c52a1),_0x2e0709=_0x7c52a1[_0x5ada37(0xb4)](_0x5ada37(0xe0)),_0x10e306=[];for(const _0x19693c of _0x514136){const _0x39236d=await computeFileHash(_0x19693c[_0x5ada37(0xe4)]),_0xa43975=_0x2d833a[_0x5ada37(0xb1)][_0x19693c['lockKey']],_0xb371b=!!_0xa43975&&_0xa43975[_0x5ada37(0xa0)]===_0x39236d,_0x1d6bf8=!_0x2e0709&&_0xb371b?_0x5ada37(0xb3):_0x5ada37(0xa6);_0x10e306[_0x5ada37(0xa8)]({'lockKey':_0x19693c[_0x5ada37(0xae)],'filePath':_0x19693c[_0x5ada37(0xe4)],'remoteId':_0xa43975?.[_0x5ada37(0x9b)]??null,'mode':_0xa43975?.[_0x5ada37(0x9b)]?_0x5ada37(0xa2):_0x5ada37(0xc2),'status':_0x1d6bf8});}return{'method':_0x5ada37(0xd1),'url':_0x5ada37(0xc8),'body':{'appCode':_0x7c52a1[_0x5ada37(0xce)],'force':_0x2e0709,'files':_0x10e306,'cacheClearAtRuntime':_0x10e306[_0x5ada37(0xc7)](_0x575929=>_0x575929[_0x5ada37(0xda)]===_0x5ada37(0xa6)),'cacheClearAtRuntimeTimes':_0x10e306[_0x5ada37(0xc7)](_0x4b195e=>_0x4b195e[_0x5ada37(0xda)]===_0x5ada37(0xa6))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x5ada37(0xe5)+_0x10e306[_0x5ada37(0xd3)]+_0x5ada37(0xc9)};},async 'execute'(_0xa0f3f5){const _0x3c498b=a37_0x325ae5,_0x3d42bb=loadBffProjectConfig(_0xa0f3f5[_0x3c498b(0xce)]),_0x67216c=await readBffLockFile(_0x3d42bb['lockFilePath']),{lockData:_0x5402cf,appLock:_0x6fe72c}=ensureLockScope(_0x67216c??createEmptyBffLock(),_0xa0f3f5[_0x3c498b(0xce)],_0x3d42bb[_0x3c498b(0xa7)],_0x3c498b(0xa8)),_0x24e2d0=await getTargetFunctions(_0x3d42bb,_0xa0f3f5);if(_0x24e2d0['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':'No\x20local\x20Backend\x20Function\x20scripts\x20found.'};const _0x1bea4e=_0xa0f3f5[_0x3c498b(0xb4)]('force'),_0x1d73e2=JSON[_0x3c498b(0x98)](JSON[_0x3c498b(0xd2)](_0x5402cf)),_0x1f51b3=_0x1d73e2[_0x3c498b(0xbc)][_0xa0f3f5[_0x3c498b(0xce)]];if(!_0x1f51b3)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0xa0f3f5[_0x3c498b(0xce)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x2e28f9=await buildHookMaps(_0xa0f3f5[_0x3c498b(0xce)],_0xa0f3f5[_0x3c498b(0x9e)],_0x24e2d0,_0x1f51b3),_0x5ea18c=[],_0x2239e5=[],_0x360f62=[];for(const _0x495f2d of _0x24e2d0){const _0x40f43f=await computeFileHash(_0x495f2d[_0x3c498b(0xe4)]),_0xba6600=_0x1f51b3['functions'][_0x495f2d[_0x3c498b(0xae)]];if(!_0x1bea4e&&_0xba6600&&_0xba6600[_0x3c498b(0xa0)]===_0x40f43f){_0x2239e5[_0x3c498b(0xa8)]({'lockKey':_0x495f2d[_0x3c498b(0xae)],'reason':_0x3c498b(0xb3)});continue;}try{await uploadSingleFunction(_0xa0f3f5[_0x3c498b(0xce)],_0x495f2d,_0x1f51b3,_0x2e28f9);const _0x159be1=_0x1f51b3[_0x3c498b(0xb1)][_0x495f2d['lockKey']];_0x5ea18c[_0x3c498b(0xa8)]({'lockKey':_0x495f2d[_0x3c498b(0xae)],'remoteId':_0x159be1?.[_0x3c498b(0x9b)]??0x0});}catch(_0x3df3e2){_0x360f62['push']({'lockKey':_0x495f2d[_0x3c498b(0xae)],'error':_0x3df3e2 instanceof Error?_0x3df3e2[_0x3c498b(0xc0)]:String(_0x3df3e2)});}}_0x1f51b3[_0x3c498b(0xde)]=new Date()[_0x3c498b(0xc4)](),await writeBffLockFile(_0x3d42bb['lockFilePath'],_0x1d73e2),await waitForUploadedLockEntries(_0x3d42bb[_0x3c498b(0x94)],_0xa0f3f5[_0x3c498b(0xce)],_0x5ea18c[_0x3c498b(0xd9)](_0x30e110=>_0x30e110[_0x3c498b(0xae)]));let _0x478255={'attempted':![],'cleared':![]};if(_0x5ea18c['length']>0x0)try{let _0x2ec3b7='';for(let _0x337d3d=0x0;_0x337d3d<CACHE_CLEAR_ATTEMPTS;_0x337d3d+=0x1){_0x2ec3b7=await clearBffScriptCache(),_0x337d3d<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x478255={'attempted':!![],'cleared':!![],'message':_0x2ec3b7||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0x4d2425){_0x478255={'attempted':!![],'cleared':![],'error':_0x4d2425 instanceof Error?_0x4d2425[_0x3c498b(0xc0)]:String(_0x4d2425)};}const _0x718984=_0x360f62[_0x3c498b(0xd3)]===0x0&&(_0x478255[_0x3c498b(0x92)]?_0x478255[_0x3c498b(0x96)]:!![]),_0x40580a=_0x718984,_0x43cc6c=_0x478255['attempted']?_0x478255[_0x3c498b(0x96)]?_0x3c498b(0xe1):_0x3c498b(0xaa):_0x3c498b(0xd6);return{'ok':_0x40580a,'data':{'uploaded':_0x5ea18c,'skipped':_0x2239e5,'failed':_0x360f62,'cacheClear':_0x478255},'message':_0x3c498b(0xd8)+_0x5ea18c[_0x3c498b(0xd3)]+_0x3c498b(0xcf)+_0x2239e5[_0x3c498b(0xd3)]+_0x3c498b(0xbb)+_0x360f62[_0x3c498b(0xd3)]+_0x3c498b(0x99)+_0x43cc6c};}};async function getTargetFunctions(_0x43c47a,_0x53b96c){const _0x266feb=a37_0x325ae5,_0x4e960e=_0x53b96c['str'](_0x266feb(0xb5)),_0x59c335=_0x53b96c[_0x266feb(0xd5)](_0x266feb(0xdb)),_0x35dc7d=normalizeBffType(_0x4e960e)??undefined;if(_0x59c335&&!_0x35dc7d)throw CliErrors[_0x266feb(0xe6)]('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x10aafd=await scanLocalBffFunctions(_0x43c47a,_0x35dc7d);if(_0x59c335){const _0x597d86=_0x10aafd[_0x266feb(0xcd)](_0x2d6a83=>_0x2d6a83[_0x266feb(0xdb)]===_0x59c335);if(_0x597d86[_0x266feb(0xd3)]===0x0)throw CliErrors[_0x266feb(0xe6)](_0x266feb(0x9f)+_0x35dc7d+'/'+_0x59c335);return _0x597d86;}return _0x10aafd;}async function buildHookMaps(_0x206e57,_0x45a18d,_0x3f67f5,_0x345262){const _0x2e5d53=a37_0x325ae5,_0x5933b4=_0x3f67f5[_0x2e5d53(0xc7)](_0x4c5159=>_0x4c5159[_0x2e5d53(0xb5)]==='HOOK');if(!_0x5933b4)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x4b924d=loadAliasMap(_0x45a18d,undefined,resolveApiFilePath(_0x45a18d,_0x206e57)),_0x3674cb=new Map(_0x4b924d['map'](_0x5cfe03=>[_0x5cfe03['alias'],_0x5cfe03[_0x2e5d53(0xcc)]]));for(const _0x3df8f8 of Object[_0x2e5d53(0xa1)](_0x345262[_0x2e5d53(0xb1)])){_0x3df8f8[_0x2e5d53(0xe2)]&&_0x3df8f8['datasetCode']&&!_0x3674cb[_0x2e5d53(0x91)](_0x3df8f8[_0x2e5d53(0xe2)])&&_0x3674cb[_0x2e5d53(0xd4)](_0x3df8f8['alias'],_0x3df8f8[_0x2e5d53(0xcc)]);}const _0x532f82=await listDatasets(_0x206e57),_0x4c6fa4=new Map(_0x532f82[_0x2e5d53(0xd9)](_0x34d20b=>[_0x34d20b['code'],_0x34d20b]));return{'aliasToDatasetCode':_0x3674cb,'datasetCodeToDataset':_0x4c6fa4};}async function uploadSingleFunction(_0x150970,_0x428c8d,_0x157d73,_0x51e113){const _0x30b6a2=a37_0x325ae5,_0x44367e=await readFile(_0x428c8d[_0x30b6a2(0xe4)],_0x30b6a2(0xad)),_0x26036f=await computeFileHash(_0x428c8d['filePath']),_0x2b7940=_0x157d73[_0x30b6a2(0xb1)][_0x428c8d[_0x30b6a2(0xae)]];if(_0x2b7940?.[_0x30b6a2(0x9b)]&&_0x2b7940[_0x30b6a2(0xc3)]==null)throw CliErrors['validation'](_0x428c8d['lockKey']+_0x30b6a2(0xbe));let _0x4779b1=extractScriptDescription(_0x44367e);if(!_0x4779b1&&_0x2b7940?.['remoteId']){const _0x2e59b0=await getBffScriptInfo(_0x2b7940['remoteId']);_0x4779b1=_0x2e59b0[_0x30b6a2(0xba)]||undefined;}const _0x5735d0={'appCode':_0x150970,'functionName':_0x428c8d['name'],'scriptType':_0x428c8d[_0x30b6a2(0xb5)],'scriptContent':_0x44367e};if(_0x2b7940?.[_0x30b6a2(0x9b)])_0x5735d0['id']=_0x2b7940['remoteId'];if(_0x2b7940?.[_0x30b6a2(0xc3)]!=null)_0x5735d0[_0x30b6a2(0xc3)]=_0x2b7940[_0x30b6a2(0xc3)];if(_0x4779b1)_0x5735d0[_0x30b6a2(0xba)]=_0x4779b1;if(_0x428c8d[_0x30b6a2(0xb5)]==='HOOK'){const _0x4c6ec0=_0x428c8d[_0x30b6a2(0xe2)];if(!_0x4c6ec0||!_0x428c8d[_0x30b6a2(0xc6)]||!_0x428c8d[_0x30b6a2(0xdc)])throw CliErrors[_0x30b6a2(0xe6)](_0x30b6a2(0xb0)+_0x428c8d[_0x30b6a2(0xae)]);const _0x447e43=_0x51e113[_0x30b6a2(0xab)][_0x30b6a2(0x95)](_0x4c6ec0)??_0x2b7940?.[_0x30b6a2(0xcc)]??_0x4c6ec0,_0x220465=_0x51e113[_0x30b6a2(0xb7)][_0x30b6a2(0x95)](_0x447e43);if(!_0x220465)throw CliErrors[_0x30b6a2(0xe6)](_0x30b6a2(0x9c)+_0x4c6ec0+_0x30b6a2(0x9d)+(_0x30b6a2(0xa5)+CLI_BIN_NAME+_0x30b6a2(0xe3)));_0x5735d0[_0x30b6a2(0xb9)]=_0x220465['id'],_0x5735d0[_0x30b6a2(0xc6)]=_0x428c8d[_0x30b6a2(0xc6)],_0x5735d0[_0x30b6a2(0xdc)]=_0x428c8d[_0x30b6a2(0xdc)];}const _0x45ccc6=await saveBffScript(_0x5735d0),_0x4321f8=_0x45ccc6['id'],_0x35c1dc=_0x45ccc6['script']??await getBffScriptInfo(_0x4321f8),_0x37bdb1={'hash':_0x26036f,'remoteId':_0x4321f8,'version':_0x35c1dc[_0x30b6a2(0xc3)]};if(_0x428c8d[_0x30b6a2(0xb5)]===_0x30b6a2(0xbd)){const _0x25efc6=_0x428c8d['alias'],_0x5f5862=_0x51e113[_0x30b6a2(0xab)][_0x30b6a2(0x95)](_0x25efc6)??_0x2b7940?.['datasetCode']??_0x25efc6;_0x51e113[_0x30b6a2(0xab)]['has'](_0x25efc6)?_0x37bdb1[_0x30b6a2(0xe2)]=_0x25efc6:_0x37bdb1['alias']=_0x2b7940?.[_0x30b6a2(0xe2)],_0x37bdb1[_0x30b6a2(0xcc)]=_0x5f5862,_0x37bdb1['operationType']=_0x428c8d['operationType'],_0x37bdb1[_0x30b6a2(0xdc)]=_0x428c8d[_0x30b6a2(0xdc)];}_0x157d73['functions'][_0x428c8d['lockKey']]=_0x37bdb1;}function a37_0x48c6(_0x58cb13,_0x56dc51){_0x58cb13=_0x58cb13-0x91;const _0x53a2e2=a37_0x53a2();let _0x48c679=_0x53a2e2[_0x58cb13];return _0x48c679;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x1ce45a,_0x3a99a9,_0x5948de){const _0xa7ecae=a37_0x325ae5;if(_0x5948de[_0xa7ecae(0xd3)]===0x0)return;for(let _0x52cca7=0x0;_0x52cca7<LOCK_SETTLE_RETRY_COUNT;_0x52cca7+=0x1){const _0xae938d=await readBffLockFile(_0x1ce45a),_0x20c95a=_0xae938d?.[_0xa7ecae(0xbc)]?.[_0x3a99a9]?.[_0xa7ecae(0xb1)]??{},_0x135d21=_0x5948de[_0xa7ecae(0xd0)](_0x2f69b1=>!!_0x20c95a[_0x2f69b1]?.[_0xa7ecae(0x9b)]);if(_0x135d21)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0xa7ecae(0xb6)+_0x5948de[_0xa7ecae(0xa4)](',\x20')+'.');}
|
|
1
|
+
const a37_0x3c8ed0=a37_0x3770;(function(_0x112c01,_0x180608){const _0x4a3be3=a37_0x3770,_0x4bb83e=_0x112c01();while(!![]){try{const _0x4641f8=-parseInt(_0x4a3be3(0x156))/0x1*(-parseInt(_0x4a3be3(0x152))/0x2)+parseInt(_0x4a3be3(0x12b))/0x3*(parseInt(_0x4a3be3(0x169))/0x4)+parseInt(_0x4a3be3(0x161))/0x5+parseInt(_0x4a3be3(0x13d))/0x6+-parseInt(_0x4a3be3(0x157))/0x7*(parseInt(_0x4a3be3(0x122))/0x8)+-parseInt(_0x4a3be3(0x11b))/0x9+-parseInt(_0x4a3be3(0x15f))/0xa*(-parseInt(_0x4a3be3(0x12d))/0xb);if(_0x4641f8===_0x180608)break;else _0x4bb83e['push'](_0x4bb83e['shift']());}catch(_0x5ee488){_0x4bb83e['push'](_0x4bb83e['shift']());}}}(a37_0x4876,0x5eac9));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':'bff','command':'push','description':a37_0x3c8ed0(0x11e),'risk':'write','flags':[{'name':a37_0x3c8ed0(0x11f),'type':a37_0x3c8ed0(0x144),'description':a37_0x3c8ed0(0x11d),'enum':['COMMON',a37_0x3c8ed0(0x159),a37_0x3c8ed0(0x160)]},{'name':a37_0x3c8ed0(0x14b),'type':a37_0x3c8ed0(0x144),'description':a37_0x3c8ed0(0x149)},{'name':a37_0x3c8ed0(0x134),'type':a37_0x3c8ed0(0x137),'description':a37_0x3c8ed0(0x16f)}],async 'dryRun'(_0xe9672e){const _0x11ba41=a37_0x3c8ed0,_0x40137a=loadBffProjectConfig(_0xe9672e[_0x11ba41(0x15a)]),_0x53e867=await readBffLockFile(_0x40137a['lockFilePath']),{appLock:_0x2d5f8b}=ensureLockScope(_0x53e867??createEmptyBffLock(),_0xe9672e[_0x11ba41(0x15a)],_0x40137a[_0x11ba41(0x121)],_0x11ba41(0x141)),_0xa37bcc=await getTargetFunctions(_0x40137a,_0xe9672e),_0x88d7fa=_0xe9672e[_0x11ba41(0x145)](_0x11ba41(0x134)),_0x436eb6=[];for(const _0x1af01e of _0xa37bcc){const _0x759588=await computeFileHash(_0x1af01e[_0x11ba41(0x166)]),_0x1c471f=_0x2d5f8b[_0x11ba41(0x139)][_0x1af01e[_0x11ba41(0x119)]],_0x2b74d6=!!_0x1c471f&&_0x1c471f['hash']===_0x759588,_0x62430=!_0x88d7fa&&_0x2b74d6?_0x11ba41(0x14a):_0x11ba41(0x12c);_0x436eb6[_0x11ba41(0x141)]({'lockKey':_0x1af01e[_0x11ba41(0x119)],'filePath':_0x1af01e['filePath'],'remoteId':_0x1c471f?.[_0x11ba41(0x14f)]??null,'mode':_0x1c471f?.[_0x11ba41(0x14f)]?_0x11ba41(0x128):_0x11ba41(0x153),'status':_0x62430});}return{'method':_0x11ba41(0x13a),'url':_0x11ba41(0x143),'body':{'appCode':_0xe9672e[_0x11ba41(0x15a)],'force':_0x88d7fa,'files':_0x436eb6,'cacheClearAtRuntime':_0x436eb6[_0x11ba41(0x170)](_0x4347ae=>_0x4347ae[_0x11ba41(0x151)]===_0x11ba41(0x12c)),'cacheClearAtRuntimeTimes':_0x436eb6[_0x11ba41(0x170)](_0x2b914c=>_0x2b914c['status']===_0x11ba41(0x12c))?CACHE_CLEAR_ATTEMPTS:0x0},'description':'Would\x20inspect\x20'+_0x436eb6['length']+'\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded'};},async 'execute'(_0x1db940){const _0x1277c8=a37_0x3c8ed0,_0x356bde=loadBffProjectConfig(_0x1db940[_0x1277c8(0x15a)]),_0xb732bf=await readBffLockFile(_0x356bde[_0x1277c8(0x162)]),{lockData:_0xa18f0f,appLock:_0x106bb9}=ensureLockScope(_0xb732bf??createEmptyBffLock(),_0x1db940['appCode'],_0x356bde['scriptsRoot'],'push'),_0x3b2d4e=await getTargetFunctions(_0x356bde,_0x1db940);if(_0x3b2d4e[_0x1277c8(0x148)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x1277c8(0x12a)};const _0x592f60=_0x1db940[_0x1277c8(0x145)](_0x1277c8(0x134)),_0x27aaf5=JSON[_0x1277c8(0x158)](JSON[_0x1277c8(0x135)](_0xa18f0f)),_0x5696ca=_0x27aaf5[_0x1277c8(0x163)][_0x1db940[_0x1277c8(0x15a)]];if(!_0x5696ca)throw new Error(_0x1277c8(0x16a)+_0x1db940['appCode']+_0x1277c8(0x13b));const _0x26f355=await buildHookMaps(_0x1db940[_0x1277c8(0x15a)],_0x1db940[_0x1277c8(0x15c)],_0x3b2d4e,_0x5696ca),_0xcdb64c=[],_0x5ad127=[],_0x54983e=[];for(const _0x2030cc of _0x3b2d4e){const _0x36ec51=await computeFileHash(_0x2030cc[_0x1277c8(0x166)]),_0x94c5e4=_0x5696ca[_0x1277c8(0x139)][_0x2030cc[_0x1277c8(0x119)]];if(!_0x592f60&&_0x94c5e4&&_0x94c5e4[_0x1277c8(0x14c)]===_0x36ec51){_0x5ad127[_0x1277c8(0x141)]({'lockKey':_0x2030cc['lockKey'],'reason':_0x1277c8(0x14a)});continue;}try{await uploadSingleFunction(_0x1db940['appCode'],_0x2030cc,_0x5696ca,_0x26f355);const _0x1cd50a=_0x5696ca[_0x1277c8(0x139)][_0x2030cc['lockKey']];_0xcdb64c['push']({'lockKey':_0x2030cc[_0x1277c8(0x119)],'remoteId':_0x1cd50a?.[_0x1277c8(0x14f)]??0x0});}catch(_0x32dcd4){_0x54983e[_0x1277c8(0x141)]({'lockKey':_0x2030cc['lockKey'],'error':_0x32dcd4 instanceof Error?_0x32dcd4[_0x1277c8(0x150)]:String(_0x32dcd4)});}}_0x5696ca[_0x1277c8(0x155)]=new Date()[_0x1277c8(0x129)](),await writeBffLockFile(_0x356bde['lockFilePath'],_0x27aaf5),await waitForUploadedLockEntries(_0x356bde[_0x1277c8(0x162)],_0x1db940[_0x1277c8(0x15a)],_0xcdb64c[_0x1277c8(0x11a)](_0x5b4f52=>_0x5b4f52[_0x1277c8(0x119)]));let _0x5bd4fb={'attempted':![],'cleared':![]};if(_0xcdb64c[_0x1277c8(0x148)]>0x0)try{let _0x55f5a3='';for(let _0x24a02c=0x0;_0x24a02c<CACHE_CLEAR_ATTEMPTS;_0x24a02c+=0x1){_0x55f5a3=await clearBffScriptCache(),_0x24a02c<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x5bd4fb={'attempted':!![],'cleared':!![],'message':_0x55f5a3||_0x1277c8(0x125)};}catch(_0x1a6eea){_0x5bd4fb={'attempted':!![],'cleared':![],'error':_0x1a6eea instanceof Error?_0x1a6eea[_0x1277c8(0x150)]:String(_0x1a6eea)};}const _0x40a083=_0x54983e[_0x1277c8(0x148)]===0x0&&(_0x5bd4fb[_0x1277c8(0x13f)]?_0x5bd4fb[_0x1277c8(0x126)]:!![]),_0x13f81e=_0x40a083,_0x4662ae=_0x5bd4fb[_0x1277c8(0x13f)]?_0x5bd4fb[_0x1277c8(0x126)]?_0x1277c8(0x14e):_0x1277c8(0x16c):_0x1277c8(0x13e);return{'ok':_0x13f81e,'data':{'uploaded':_0xcdb64c,'skipped':_0x5ad127,'failed':_0x54983e,'cacheClear':_0x5bd4fb},'message':_0x1277c8(0x167)+_0xcdb64c['length']+_0x1277c8(0x123)+_0x5ad127[_0x1277c8(0x148)]+_0x1277c8(0x13c)+_0x54983e[_0x1277c8(0x148)]+'\x20failed,\x20'+_0x4662ae};}};function a37_0x3770(_0x16c030,_0x2fd285){_0x16c030=_0x16c030-0x119;const _0x487628=a37_0x4876();let _0x3770d3=_0x487628[_0x16c030];return _0x3770d3;}async function getTargetFunctions(_0x49980f,_0x2259fd){const _0xb208b0=a37_0x3c8ed0,_0x1258f6=_0x2259fd[_0xb208b0(0x130)](_0xb208b0(0x11f)),_0x2b918f=_0x2259fd[_0xb208b0(0x130)](_0xb208b0(0x14b)),_0x1f9552=normalizeBffType(_0x1258f6)??undefined;if(_0x2b918f&&!_0x1f9552)throw CliErrors[_0xb208b0(0x16e)](_0xb208b0(0x120));const _0x4b5854=await scanLocalBffFunctions(_0x49980f,_0x1f9552);if(_0x2b918f){const _0x7c8c70=_0x4b5854[_0xb208b0(0x127)](_0x15adc3=>_0x15adc3[_0xb208b0(0x14b)]===_0x2b918f);if(_0x7c8c70[_0xb208b0(0x148)]===0x0)throw CliErrors[_0xb208b0(0x16e)](_0xb208b0(0x12e)+_0x1f9552+'/'+_0x2b918f);return _0x7c8c70;}return _0x4b5854;}async function buildHookMaps(_0x51a666,_0x3b7f23,_0x27657b,_0x788c05){const _0x417fef=a37_0x3c8ed0,_0x3b15f1=_0x27657b[_0x417fef(0x170)](_0x46490c=>_0x46490c[_0x417fef(0x11f)]===_0x417fef(0x160));if(!_0x3b15f1)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0xa4e581=loadAliasMap(_0x3b7f23,undefined,resolveApiFilePath(_0x3b7f23,_0x51a666)),_0x64ed0c=new Map(_0xa4e581[_0x417fef(0x11a)](_0x264c9e=>[_0x264c9e['alias'],_0x264c9e[_0x417fef(0x136)]]));for(const _0x3a4f81 of Object['values'](_0x788c05[_0x417fef(0x139)])){_0x3a4f81[_0x417fef(0x14d)]&&_0x3a4f81[_0x417fef(0x136)]&&!_0x64ed0c['has'](_0x3a4f81[_0x417fef(0x14d)])&&_0x64ed0c[_0x417fef(0x146)](_0x3a4f81[_0x417fef(0x14d)],_0x3a4f81[_0x417fef(0x136)]);}const _0x48e064=await listDatasets(_0x51a666),_0x371d56=new Map(_0x48e064['map'](_0x4c4fd7=>[_0x4c4fd7[_0x417fef(0x15d)],_0x4c4fd7]));return{'aliasToDatasetCode':_0x64ed0c,'datasetCodeToDataset':_0x371d56};}function a37_0x4876(){const _0x5ecf49=['datasetId','apiDir','code','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','121530JTYXYx','HOOK','3167520mlrkdD','lockFilePath','apps','Cannot\x20resolve\x20dataset\x20for\x20\x22','aliasToDatasetCode','filePath','Push\x20complete:\x20',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','4dgttYL','Lock\x20scope\x20for\x20app\x20\x22','utf8','runtime\x20cache\x20clear\x20failed','script','validation','Force\x20push\x20ignoring\x20hash\x20protection','some','lockKey','map','4101318qzEMGi','functionNode','Push\x20only\x20this\x20script\x20type','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','type','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','scriptsRoot','2859784VgdXuw','\x20uploaded,\x20','operationType','Runtime\x20script\x20cache\x20cleared.','cleared','filter','update','toISOString','No\x20local\x20Backend\x20Function\x20scripts\x20found.','275691OgMVsP','would_push','33YugwBE','Local\x20function\x20not\x20found:\x20','datasetCodeToDataset','str','every','description','Incomplete\x20HOOK\x20path:\x20','force','stringify','datasetCode','boolean','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','functions','POST','\x22\x20not\x20found\x20after\x20ensureLockScope.','\x20skipped,\x20','345528mEYNiw','runtime\x20cache\x20not\x20needed','attempted','get','push','version','/api/management/library/scripts/save','string','bool','set','join','length','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','unchanged','name','hash','alias','runtime\x20cache\x20cleared','remoteId','message','status','381512MgUisN','create','Run\x20`','lastSync','2SFIRjp','7bMGcPO','parse','ENDPOINT','appCode'];a37_0x4876=function(){return _0x5ecf49;};return a37_0x4876();}async function uploadSingleFunction(_0x610284,_0x5a7628,_0x1dc151,_0x152f86){const _0x9c7ef6=a37_0x3c8ed0,_0x56d5b4=await readFile(_0x5a7628[_0x9c7ef6(0x166)],_0x9c7ef6(0x16b)),_0xf4347=await computeFileHash(_0x5a7628['filePath']),_0x1936ae=_0x1dc151[_0x9c7ef6(0x139)][_0x5a7628[_0x9c7ef6(0x119)]];if(_0x1936ae?.['remoteId']&&_0x1936ae['version']==null)throw CliErrors['validation'](_0x5a7628[_0x9c7ef6(0x119)]+_0x9c7ef6(0x168));let _0x50019d=extractScriptDescription(_0x56d5b4);if(!_0x50019d&&_0x1936ae?.[_0x9c7ef6(0x14f)]){const _0x55e911=await getBffScriptInfo(_0x1936ae[_0x9c7ef6(0x14f)]);_0x50019d=_0x55e911[_0x9c7ef6(0x132)]||undefined;}const _0x49447b={'appCode':_0x610284,'functionName':_0x5a7628[_0x9c7ef6(0x14b)],'scriptType':_0x5a7628[_0x9c7ef6(0x11f)],'scriptContent':_0x56d5b4};if(_0x1936ae?.['remoteId'])_0x49447b['id']=_0x1936ae[_0x9c7ef6(0x14f)];if(_0x1936ae?.[_0x9c7ef6(0x142)]!=null)_0x49447b[_0x9c7ef6(0x142)]=_0x1936ae[_0x9c7ef6(0x142)];if(_0x50019d)_0x49447b['description']=_0x50019d;if(_0x5a7628[_0x9c7ef6(0x11f)]===_0x9c7ef6(0x160)){const _0x3ef9b8=_0x5a7628[_0x9c7ef6(0x14d)];if(!_0x3ef9b8||!_0x5a7628[_0x9c7ef6(0x124)]||!_0x5a7628['functionNode'])throw CliErrors[_0x9c7ef6(0x16e)](_0x9c7ef6(0x133)+_0x5a7628['lockKey']);const _0x4b92c9=_0x152f86['aliasToDatasetCode'][_0x9c7ef6(0x140)](_0x3ef9b8)??_0x1936ae?.[_0x9c7ef6(0x136)]??_0x3ef9b8,_0x15a940=_0x152f86[_0x9c7ef6(0x12f)][_0x9c7ef6(0x140)](_0x4b92c9);if(!_0x15a940)throw CliErrors[_0x9c7ef6(0x16e)](_0x9c7ef6(0x164)+_0x3ef9b8+'\x22.\x20'+(_0x9c7ef6(0x154)+CLI_BIN_NAME+_0x9c7ef6(0x138)));_0x49447b[_0x9c7ef6(0x15b)]=_0x15a940['id'],_0x49447b[_0x9c7ef6(0x124)]=_0x5a7628[_0x9c7ef6(0x124)],_0x49447b['functionNode']=_0x5a7628[_0x9c7ef6(0x11c)];}const _0x5a84ef=await saveBffScript(_0x49447b),_0x554643=_0x5a84ef['id'],_0xcffe15=_0x5a84ef[_0x9c7ef6(0x16d)]??await getBffScriptInfo(_0x554643),_0x397f2d={'hash':_0xf4347,'remoteId':_0x554643,'version':_0xcffe15[_0x9c7ef6(0x142)]};if(_0x5a7628[_0x9c7ef6(0x11f)]===_0x9c7ef6(0x160)){const _0x1f0618=_0x5a7628[_0x9c7ef6(0x14d)],_0xa9a02c=_0x152f86[_0x9c7ef6(0x165)]['get'](_0x1f0618)??_0x1936ae?.[_0x9c7ef6(0x136)]??_0x1f0618;_0x152f86[_0x9c7ef6(0x165)]['has'](_0x1f0618)?_0x397f2d[_0x9c7ef6(0x14d)]=_0x1f0618:_0x397f2d[_0x9c7ef6(0x14d)]=_0x1936ae?.[_0x9c7ef6(0x14d)],_0x397f2d[_0x9c7ef6(0x136)]=_0xa9a02c,_0x397f2d[_0x9c7ef6(0x124)]=_0x5a7628['operationType'],_0x397f2d['functionNode']=_0x5a7628[_0x9c7ef6(0x11c)];}_0x1dc151[_0x9c7ef6(0x139)][_0x5a7628[_0x9c7ef6(0x119)]]=_0x397f2d;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x21ab93,_0x2000f3,_0x227363){const _0x4eca22=a37_0x3c8ed0;if(_0x227363[_0x4eca22(0x148)]===0x0)return;for(let _0x3396f7=0x0;_0x3396f7<LOCK_SETTLE_RETRY_COUNT;_0x3396f7+=0x1){const _0xa7b8ef=await readBffLockFile(_0x21ab93),_0x272910=_0xa7b8ef?.[_0x4eca22(0x163)]?.[_0x2000f3]?.[_0x4eca22(0x139)]??{},_0x27794c=_0x227363[_0x4eca22(0x131)](_0x5a984f=>!!_0x272910[_0x5a984f]?.['remoteId']);if(_0x27794c)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x4eca22(0x15e)+_0x227363[_0x4eca22(0x147)](',\x20')+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a38_0x44c453=a38_0x4080;function a38_0x4080(_0xef425a,_0x1c7c68){_0xef425a=_0xef425a-0x1ab;const _0x390832=a38_0x3908();let _0x408081=_0x390832[_0xef425a];return _0x408081;}(function(_0x1902e4,_0x4ea5cc){const _0x1c0d3f=a38_0x4080,_0x420b70=_0x1902e4();while(!![]){try{const _0x40f96a=-parseInt(_0x1c0d3f(0x1bf))/0x1*(parseInt(_0x1c0d3f(0x1ba))/0x2)+-parseInt(_0x1c0d3f(0x1cc))/0x3*(-parseInt(_0x1c0d3f(0x1c8))/0x4)+-parseInt(_0x1c0d3f(0x1ce))/0x5+parseInt(_0x1c0d3f(0x1b8))/0x6*(-parseInt(_0x1c0d3f(0x1c9))/0x7)+parseInt(_0x1c0d3f(0x1c0))/0x8+-parseInt(_0x1c0d3f(0x1cd))/0x9*(-parseInt(_0x1c0d3f(0x1c3))/0xa)+parseInt(_0x1c0d3f(0x1c1))/0xb*(parseInt(_0x1c0d3f(0x1c4))/0xc);if(_0x40f96a===_0x4ea5cc)break;else _0x420b70['push'](_0x420b70['shift']());}catch(_0x38d549){_0x420b70['push'](_0x420b70['shift']());}}}(a38_0x3908,0x532b2));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';function a38_0x3908(){const _0x562bc1=['bool','558196uOUFUz','120134zRDajL','apiDir','all','3WGUJRX','4730841wjPvad','2675615tSrYvl','\x20unchanged','map','appCode','has','All\x20Backend\x20Function\x20scripts\x20are\x20in\x20sync.','functions','scriptsRoot','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','\x20remote-only','filePath','remote','lockFilePath','\x20added,\x20','168SHNAzl','Check\x20local\x20Backend\x20Function\x20sync\x20status\x20against\x20lock\x20file','26xBcAQV','length','lockKey','push','status','49199YFdFfY','1683936gjBdES','6161177zvucyh','read','10ftbYzB','24TMryUW','datasetCode','bff'];a38_0x3908=function(){return _0x562bc1;};return a38_0x3908();}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_0x44c453(0x1c6),'command':a38_0x44c453(0x1be),'description':a38_0x44c453(0x1b9),'risk':a38_0x44c453(0x1c2),'flags':[{'name':a38_0x44c453(0x1b5),'type':'boolean','description':a38_0x44c453(0x1b2)}],async 'execute'(_0x478267){const _0x2ba90b=a38_0x44c453,_0x56191e=loadBffProjectConfig(_0x478267[_0x2ba90b(0x1ad)]),_0xf027a9=await readBffLockFile(_0x56191e[_0x2ba90b(0x1b6)]),{appLock:_0x2413b5}=ensureLockScope(_0xf027a9??createEmptyBffLock(),_0x478267[_0x2ba90b(0x1ad)],_0x56191e[_0x2ba90b(0x1b1)],'status'),_0x128bd9=await scanLocalBffFunctions(_0x56191e),_0x29c4ad=[],_0x2fb76d=[],_0x310bb2=[];for(const _0x1dafb6 of _0x128bd9){const _0x1ab923=await computeFileHash(_0x1dafb6[_0x2ba90b(0x1b4)]),_0x30c448=_0x2413b5[_0x2ba90b(0x1b0)][_0x1dafb6[_0x2ba90b(0x1bc)]];if(!_0x30c448)_0x29c4ad[_0x2ba90b(0x1bd)](_0x1dafb6[_0x2ba90b(0x1bc)]);else _0x30c448['hash']!==_0x1ab923?_0x2fb76d['push'](_0x1dafb6['lockKey']):_0x310bb2[_0x2ba90b(0x1bd)](_0x1dafb6['lockKey']);}const _0x367817=[];if(_0x478267[_0x2ba90b(0x1c7)](_0x2ba90b(0x1b5))){const _0x236651=loadAliasMap(_0x478267['apiDir'],undefined,resolveApiFilePath(_0x478267[_0x2ba90b(0x1ca)],_0x478267[_0x2ba90b(0x1ad)])),_0x23e1cd=new Map(_0x236651[_0x2ba90b(0x1ac)](_0x1a0358=>[_0x1a0358[_0x2ba90b(0x1c5)],_0x1a0358['alias']])),[_0x20a265,_0xb16c3d]=await Promise[_0x2ba90b(0x1cb)]([listBffScripts(_0x478267[_0x2ba90b(0x1ad)]),getBffScriptStatistics(_0x478267[_0x2ba90b(0x1ad)])]),_0x4d4230=createHookLocationMap(_0xb16c3d),_0x7a329b=new Set(_0x128bd9['map'](_0x292af8=>_0x292af8[_0x2ba90b(0x1bc)]));for(const _0x1e2946 of _0x20a265){const _0x243b35=resolveRemoteScriptTarget(_0x56191e,_0x1e2946,_0x4d4230,_0x2413b5[_0x2ba90b(0x1b0)],_0x23e1cd);_0x243b35&&!_0x7a329b[_0x2ba90b(0x1ae)](_0x243b35[_0x2ba90b(0x1bc)])&&_0x367817[_0x2ba90b(0x1bd)](_0x243b35[_0x2ba90b(0x1bc)]);}}const _0x5c8510=_0x29c4ad['length']===0x0&&_0x2fb76d[_0x2ba90b(0x1bb)]===0x0&&_0x367817[_0x2ba90b(0x1bb)]===0x0;return{'ok':!![],'data':{'added':_0x29c4ad,'modified':_0x2fb76d,'unchanged':_0x310bb2,'remoteOnly':_0x367817},'message':_0x5c8510?_0x2ba90b(0x1af):_0x29c4ad['length']+_0x2ba90b(0x1b7)+_0x2fb76d['length']+'\x20modified,\x20'+_0x310bb2[_0x2ba90b(0x1bb)]+_0x2ba90b(0x1ab)+(_0x367817[_0x2ba90b(0x1bb)]>0x0?',\x20'+_0x367817[_0x2ba90b(0x1bb)]+_0x2ba90b(0x1b3):'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a39_0x2ae5af=a39_0x13dd;function a39_0x13dd(_0x51da67,_0x5b5826){_0x51da67=_0x51da67-0x19d;const _0x39c7bf=a39_0x39c7();let _0x13ddb6=_0x39c7bf[_0x51da67];return _0x13ddb6;}(function(_0x4086fe,_0x3ca241){const _0x48487f=a39_0x13dd,_0x5996c8=_0x4086fe();while(!![]){try{const _0xf4bf4e=-parseInt(_0x48487f(0x1af))/0x1*(-parseInt(_0x48487f(0x1b0))/0x2)+parseInt(_0x48487f(0x1ad))/0x3*(parseInt(_0x48487f(0x1b5))/0x4)+-parseInt(_0x48487f(0x1ba))/0x5+-parseInt(_0x48487f(0x1b4))/0x6*(-parseInt(_0x48487f(0x1bc))/0x7)+parseInt(_0x48487f(0x1bb))/0x8+-parseInt(_0x48487f(0x1a3))/0x9+parseInt(_0x48487f(0x1a2))/0xa;if(_0xf4bf4e===_0x3ca241)break;else _0x5996c8['push'](_0x5996c8['shift']());}catch(_0x273d7e){_0x5996c8['push'](_0x5996c8['shift']());}}}(a39_0x39c7,0x2b50a));import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';function a39_0x39c7(){const _0x4e7f70=['pipe','installedPath','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.','246702ZsYysW','4lbkBYs','apiError','install','CLI\x20Built-in\x20Skill\x20','read','847500vmoAWV','199952ilxgbv','7AGBzwe','skillVersion','info','repairCommand','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20',']:\x20','\x20via\x20skills@latest','\x20installed','Built-in\x20Skill\x20install\x20failed\x20[','unknown','3501550dPiXaT','2168316mxjAGb','changed','log','nonInteractive','inherit','\x20at\x20','error','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','cli-skill','code','393090hUwhgY','cwd','2gEZQcm','40546tynPHE'];a39_0x39c7=function(){return _0x4e7f70;};return a39_0x39c7();}export const cliSkillDefinitions=[{'service':a39_0x2ae5af(0x1ab),'command':a39_0x2ae5af(0x1b7),'description':a39_0x2ae5af(0x1aa),'risk':a39_0x2ae5af(0x1b9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x51b06f){const _0x2e9c79=a39_0x2ae5af;logger['setLogPath'](process[_0x2e9c79(0x1ae)]()),logger[_0x2e9c79(0x1be)]('cli-skill-install',_0x2e9c79(0x1b3));const _0x3239f2=installBuiltinSkill({'stdio':_0x51b06f[_0x2e9c79(0x1a6)]?_0x2e9c79(0x1b1):_0x2e9c79(0x1a7)});if(!_0x3239f2['ok'])throw CliErrors[_0x2e9c79(0x1b6)](_0x2e9c79(0x1a0)+_0x3239f2[_0x2e9c79(0x1ac)]+_0x2e9c79(0x19d)+(_0x3239f2[_0x2e9c79(0x1a9)]||_0x2e9c79(0x1a1)),_0x2e9c79(0x1c0)+_0x3239f2[_0x2e9c79(0x1bf)]);return console[_0x2e9c79(0x1a5)](_0x3239f2[_0x2e9c79(0x1a4)]?_0x2e9c79(0x1b8)+_0x3239f2[_0x2e9c79(0x1bd)]+_0x2e9c79(0x19f)+(_0x3239f2[_0x2e9c79(0x1b2)]?_0x2e9c79(0x1a8)+_0x3239f2[_0x2e9c79(0x1b2)]:_0x2e9c79(0x19e)):_0x2e9c79(0x1b8)+_0x3239f2['skillVersion']+'\x20is\x20already\x20current'+(_0x3239f2[_0x2e9c79(0x1b2)]?_0x2e9c79(0x1a8)+_0x3239f2['installedPath']:'')),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a40_0x4ab26b=a40_0x562e;(function(_0x2cd2df,_0x303267){const _0x12f44d=a40_0x562e,_0x514738=_0x2cd2df();while(!![]){try{const _0x3e6cf5=-parseInt(_0x12f44d(0x105))/0x1*(-parseInt(_0x12f44d(0x11e))/0x2)+-parseInt(_0x12f44d(0x109))/0x3+-parseInt(_0x12f44d(0x124))/0x4*(-parseInt(_0x12f44d(0x113))/0x5)+-parseInt(_0x12f44d(0x138))/0x6*(parseInt(_0x12f44d(0x10e))/0x7)+-parseInt(_0x12f44d(0xf8))/0x8*(-parseInt(_0x12f44d(0xf3))/0x9)+parseInt(_0x12f44d(0x114))/0xa*(-parseInt(_0x12f44d(0x10b))/0xb)+parseInt(_0x12f44d(0x13e))/0xc;if(_0x3e6cf5===_0x303267)break;else _0x514738['push'](_0x514738['shift']());}catch(_0x4bb10a){_0x514738['push'](_0x514738['shift']());}}}(a40_0x1384,0xdb3ff));import a40_0x100002 from'chalk';import a40_0x5a3c0b from'ora';import a40_0x5010a4 from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x15a5fa=a40_0x562e;return GIT_COMMIT!==_0x15a5fa(0x13f)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x15a5fa(0x12c)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x458ef7=a40_0x562e,_0x4d1763=process[_0x458ef7(0x103)][_0x458ef7(0x143)]();if(_0x4d1763[_0x458ef7(0x141)](_0x458ef7(0x11c)))return'bun';return _0x458ef7(0x145);}const updateFlags=[{'name':a40_0x4ab26b(0x139),'type':a40_0x4ab26b(0x10c),'description':a40_0x4ab26b(0x104),'default':![]},{'name':a40_0x4ab26b(0xf4),'type':a40_0x4ab26b(0x130),'description':a40_0x4ab26b(0x100)}];function getRequestedVersion(_0x293569){const _0x1cd364=a40_0x4ab26b;return _0x293569[_0x1cd364(0x110)](_0x1cd364(0xf4))[_0x1cd364(0x12b)]();}async function validateUpdateFlags(_0xe8e0ec){const _0xb8b579=a40_0x4ab26b,_0x89072c=_0xe8e0ec[_0xb8b579(0x10d)]('beta'),_0x1df82e=getRequestedVersion(_0xe8e0ec);if(_0x89072c&&_0x1df82e)throw CliErrors[_0xb8b579(0x134)](_0xb8b579(0x125),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x1df82e&&!a40_0x5010a4[_0xb8b579(0x11f)](_0x1df82e))throw CliErrors[_0xb8b579(0x134)](_0xb8b579(0x136)+_0x1df82e,_0xb8b579(0x119));}async function fetchNpmDistTags(){const _0x21b555=a40_0x4ab26b;try{const _0x5de176=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+_0x21b555(0x121),{'signal':AbortSignal[_0x21b555(0x111)](0x2710)});if(!_0x5de176['ok'])return null;const _0x15152a=await _0x5de176[_0x21b555(0x11a)]();if(!_0x15152a||typeof _0x15152a!==_0x21b555(0x108))return null;return Object[_0x21b555(0x12d)](Object['entries'](_0x15152a)[_0x21b555(0xf7)](([,_0x189ced])=>typeof _0x189ced==='string'&&_0x189ced['trim']()['length']>0x0)[_0x21b555(0x12a)](([_0x41376b,_0x90e51d])=>[_0x41376b,String(_0x90e51d)[_0x21b555(0x12b)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x2758af){const _0x5e7916=await fetchNpmDistTags();return _0x5e7916?.[_0x2758af]??null;}async function fetchLatestVersion(){const _0x1c5325=a40_0x4ab26b;return fetchNpmDistTagVersion(_0x1c5325(0x128));}async function resolveTargetVersion(_0x18351c){const _0x5c2e53=a40_0x4ab26b,_0x243035=getRequestedVersion(_0x18351c);if(_0x243035)return{'version':_0x243035,'source':_0x5c2e53(0xf4)};if(_0x18351c[_0x5c2e53(0x10d)]('beta')){const _0x2fce01=await fetchNpmDistTagVersion('beta');if(!_0x2fce01)return null;return{'version':_0x2fce01,'source':_0x5c2e53(0x139)};}const _0x2bdd38=await fetchLatestVersion();if(!_0x2bdd38)return null;return{'version':_0x2bdd38,'source':'latest'};}function shouldInstallTarget(_0x1267b1,_0x4f7fb9){const _0x4aa62a=a40_0x4ab26b;if(_0x4f7fb9[_0x4aa62a(0xfe)]===_0x4aa62a(0xf4)||_0x4f7fb9[_0x4aa62a(0xfe)]==='beta')return!a40_0x5010a4['eq'](_0x1267b1,_0x4f7fb9[_0x4aa62a(0xf4)]);return a40_0x5010a4['lt'](_0x1267b1,_0x4f7fb9[_0x4aa62a(0xf4)]);}function getInstallPlanLabel(_0x439312,_0x2024e2){const _0x2a28fb=a40_0x4ab26b;switch(_0x2024e2[_0x2a28fb(0xfe)]){case _0x2a28fb(0x139):return _0x2a28fb(0x13b)+a40_0x100002[_0x2a28fb(0x137)](_0x439312)+'\x20→\x20'+a40_0x100002[_0x2a28fb(0xf6)](_0x2024e2[_0x2a28fb(0xf4)]);case _0x2a28fb(0xf4):return _0x2a28fb(0x10a)+a40_0x100002['yellow'](_0x439312)+'\x20→\x20'+a40_0x100002[_0x2a28fb(0xf6)](_0x2024e2[_0x2a28fb(0xf4)]);case'latest':default:return _0x2a28fb(0x129)+a40_0x100002[_0x2a28fb(0x137)](_0x439312)+'\x20→\x20'+a40_0x100002['green'](_0x2024e2['version']);}}function repairCurrentBuiltinSkill(){const _0x380c75=a40_0x4ab26b;console[_0x380c75(0x133)](a40_0x100002['gray']('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x3ced68=installBuiltinSkill();if(_0x3ced68['ok']){console[_0x380c75(0x133)](a40_0x100002[_0x380c75(0x101)](_0x380c75(0xfb)+_0x3ced68[_0x380c75(0x118)]+_0x380c75(0x106)));return;}throw CliErrors['apiError'](_0x380c75(0x117)+_0x3ced68[_0x380c75(0x148)]+_0x380c75(0x10f)+(_0x3ced68[_0x380c75(0x140)]||'unknown'),'Run:\x20'+_0x3ced68[_0x380c75(0x11d)]+_0x380c75(0x126)+CLI_BIN_NAME+_0x380c75(0x116));}function verifyUpdatedBuiltinSkill(_0x4bd268){const _0x343e0e=a40_0x4ab26b,_0x46e698=inspectInstalledBuiltinSkillVersion(_0x4bd268);if(_0x46e698['state']==='current'){console[_0x343e0e(0x133)](a40_0x100002[_0x343e0e(0x101)](_0x343e0e(0xfb)+_0x4bd268+_0x343e0e(0x106)));return;}const _0x5af3f6=_0x46e698[_0x343e0e(0x118)]?_0x343e0e(0x135)+_0x4bd268+_0x343e0e(0x107)+_0x46e698[_0x343e0e(0x118)]:'expected\x20'+_0x4bd268+_0x343e0e(0x131)+_0x46e698[_0x343e0e(0x12e)];throw CliErrors[_0x343e0e(0x123)]('CLI\x20updated\x20to\x20v'+_0x4bd268+_0x343e0e(0x147)+_0x5af3f6,_0x343e0e(0x13d)+_0x46e698['repairCommand']+_0x343e0e(0x126)+CLI_BIN_NAME+_0x343e0e(0x116));}function a40_0x562e(_0x132dfd,_0x43bec5){_0x132dfd=_0x132dfd-0xf1;const _0x1384e7=a40_0x1384();let _0x562e7d=_0x1384e7[_0x132dfd];return _0x562e7d;}function a40_0x1384(){const _0x303101=['map','trim','slice','fromEntries','state','Current\x20version\x20v','string',',\x20state\x20','message','log','validation','expected\x20','Invalid\x20version:\x20','yellow','228chGgKX','beta','Version\x20comparison\x20failed','Beta\x20version:\x20','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','Run:\x20','20857476rssknK','unknown','error','includes','\x20install\x20-g\x20','toLowerCase','update','npm','pipe',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','code','run','Checking\x20for\x20updates...','387uNIwlN','version','fail','green','filter','121544Asyfie','Already\x20up\x20to\x20date\x20(v','Current\x20version:\x20','\x20\x20CLI\x20Built-in\x20Skill\x20','\x20is\x20newer\x20than\x20npm\x20latest\x20v','Updated\x20to\x20v','source','read','Install\x20a\x20specific\x20CLI\x20version','gray','Update\x20failed','execPath','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','123995oDWuZy','\x20is\x20up\x20to\x20date.',',\x20found\x20','object','1969746JstUPw','Requested\x20version:\x20','22VUXWMd','boolean','bool','199906CPVtWk',']:\x20','str','timeout','...','230ulducg','8265700hpWbDE','red','\x20doctor','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','skillVersion','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','json','succeed','bun','repairCommand','26spYsRJ','valid','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','/dist-tags','info','apiError','25184wdEVbY','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.',',\x20then\x20verify\x20with:\x20','Already\x20on\x20requested\x20version\x20(v','latest','Update\x20available:\x20'];a40_0x1384=function(){return _0x303101;};return a40_0x1384();}async function execute(_0x2ea54b){const _0x226991=a40_0x4ab26b;await validateUpdateFlags(_0x2ea54b);const _0x2aa708=getCurrentVersion();console[_0x226991(0x133)](_0x226991(0xfa)+_0x2aa708);const _0x460cee=a40_0x5a3c0b(_0x226991(0xf2))['start'](),_0x4bbb33=await resolveTargetVersion(_0x2ea54b);if(!_0x4bbb33){const _0x4a17ce=_0x2ea54b[_0x226991(0x10d)](_0x226991(0x139))?_0x226991(0x13c):'Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)';return _0x460cee[_0x226991(0xf5)](_0x4a17ce),console[_0x226991(0x133)](a40_0x100002[_0x226991(0x101)](_0x226991(0x120)+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x4a17ce};}const _0x52954f=a40_0x5010a4[_0x226991(0x11f)](VERSION),_0x133652=a40_0x5010a4['valid'](_0x4bbb33['version']);if(!_0x52954f||!_0x133652)return _0x460cee[_0x226991(0xf5)](_0x226991(0x13a)),{'ok':![],'message':_0x226991(0x13a)};if(!shouldInstallTarget(_0x52954f,_0x4bbb33)){const _0xc24af6=_0x4bbb33[_0x226991(0xfe)]===_0x226991(0xf4)?_0x226991(0x127)+_0x4bbb33['version']+')':a40_0x5010a4['gt'](_0x52954f,_0x133652)?_0x226991(0x12f)+_0x2aa708+_0x226991(0xfc)+_0x4bbb33[_0x226991(0xf4)]:_0x226991(0xf9)+_0x4bbb33[_0x226991(0xf4)]+')';return _0x460cee[_0x226991(0x11b)](_0xc24af6),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x460cee[_0x226991(0x122)](getInstallPlanLabel(_0x2aa708,_0x4bbb33));const _0x39d017=detectPackageManager(),_0x156ffb=_0x39d017===_0x226991(0x145)?resolveNpmBin(_0x226991(0x145)):_0x39d017,_0x1c5171=a40_0x5a3c0b('Updating\x20via\x20'+_0x39d017+_0x226991(0x112))['start']();try{await execa(_0x156ffb,['install','-g',NPM_PACKAGE_NAME+'@'+_0x4bbb33[_0x226991(0xf4)]],{'stdio':_0x226991(0x146)}),_0x1c5171['succeed'](_0x226991(0xfd)+_0x4bbb33[_0x226991(0xf4)]),console[_0x226991(0x133)](a40_0x100002[_0x226991(0x101)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.'));}catch(_0x430b96){return _0x1c5171[_0x226991(0xf5)](_0x226991(0x102)),console['error'](a40_0x100002[_0x226991(0x115)]('\x20\x20'+_0x430b96[_0x226991(0x132)])),console[_0x226991(0x133)](a40_0x100002[_0x226991(0x101)]('\x20\x20Try\x20manually:\x20'+_0x39d017+_0x226991(0x142)+NPM_PACKAGE_NAME+'@'+_0x4bbb33['version'])),{'ok':![],'message':_0x430b96[_0x226991(0x132)]};}return verifyUpdatedBuiltinSkill(_0x4bbb33[_0x226991(0xf4)]),{'ok':!![]};}export const updateDefinition={'service':a40_0x4ab26b(0x144),'command':a40_0x4ab26b(0xf1),'description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':a40_0x4ab26b(0xff),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a40_0x327f92=a40_0x35b5;(function(_0x7f6513,_0x515a06){const _0x4e3a19=a40_0x35b5,_0x54ddc2=_0x7f6513();while(!![]){try{const _0x1b3ccb=-parseInt(_0x4e3a19(0x148))/0x1*(-parseInt(_0x4e3a19(0x10e))/0x2)+parseInt(_0x4e3a19(0x143))/0x3*(-parseInt(_0x4e3a19(0x10f))/0x4)+-parseInt(_0x4e3a19(0x14e))/0x5+-parseInt(_0x4e3a19(0x140))/0x6+parseInt(_0x4e3a19(0x136))/0x7+parseInt(_0x4e3a19(0x113))/0x8+-parseInt(_0x4e3a19(0x15d))/0x9;if(_0x1b3ccb===_0x515a06)break;else _0x54ddc2['push'](_0x54ddc2['shift']());}catch(_0x338f85){_0x54ddc2['push'](_0x54ddc2['shift']());}}}(a40_0x2724,0x86926));import a40_0xbd8660 from'chalk';import a40_0x12f130 from'ora';import a40_0x3a0dab from'semver';function a40_0x2724(){const _0x4faed6=['apiError','Install\x20a\x20specific\x20CLI\x20version','bun','Beta\x20version:\x20','beta','Already\x20on\x20requested\x20version\x20(v','@latest','update','message','npm','Run:\x20',']:\x20','gray','state','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','map','version','validation','boolean','Current\x20version:\x20','yellow','...',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','red','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','Version\x20comparison\x20failed','\x20install\x20-g\x20',',\x20state\x20','\x20is\x20up\x20to\x20date.','run','trim','string','5415039zRveuH','install','Updated\x20to\x20v','Invalid\x20version:\x20','/dist-tags','current','Updating\x20via\x20','Current\x20version\x20v','https://registry.npmjs.org/-/package/','code','4661058FFYTkb','Already\x20up\x20to\x20date\x20(v','succeed','21UwtuRf','latest','fromEntries','expected\x20','length','16MZcpwt','\x20→\x20','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','\x20\x20CLI\x20Built-in\x20Skill\x20','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','timeout','4422210sgYpDs','entries','log','str',',\x20found\x20','json','green','CLI\x20updated\x20to\x20v',',\x20then\x20verify\x20with:\x20','\x20is\x20newer\x20than\x20npm\x20latest\x20v','valid','info','\x20doctor','skillVersion','unknown','1666116oVgDki','start','toLowerCase','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','source','object','error','bool','fail','124144OFKblF','169408xxWhCl','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','filter','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','7418800lQfOvX','pipe'];a40_0x2724=function(){return _0x4faed6;};return a40_0x2724();}import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x75cf93=a40_0x35b5;return GIT_COMMIT!==_0x75cf93(0x15c)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x368281=a40_0x35b5,_0x18ff8e=process['execPath'][_0x368281(0x15f)]();if(_0x18ff8e['includes']('bun'))return _0x368281(0x117);return _0x368281(0x11e);}const updateFlags=[{'name':a40_0x327f92(0x119),'type':a40_0x327f92(0x127),'description':a40_0x327f92(0x14a),'default':![]},{'name':'version','type':a40_0x327f92(0x135),'description':a40_0x327f92(0x116)}];function getRequestedVersion(_0x4a6e4a){const _0x402a6d=a40_0x327f92;return _0x4a6e4a[_0x402a6d(0x151)]('version')[_0x402a6d(0x134)]();}async function validateUpdateFlags(_0x112d76){const _0x542e87=a40_0x327f92,_0x1c1bb9=_0x112d76[_0x542e87(0x10c)]('beta'),_0x2a947f=getRequestedVersion(_0x112d76);if(_0x1c1bb9&&_0x2a947f)throw CliErrors[_0x542e87(0x126)](_0x542e87(0x107),_0x542e87(0x112));if(_0x2a947f&&!a40_0x3a0dab[_0x542e87(0x158)](_0x2a947f))throw CliErrors[_0x542e87(0x126)](_0x542e87(0x139)+_0x2a947f,_0x542e87(0x14c));}async function fetchNpmDistTags(){const _0x4ac8cd=a40_0x327f92;try{const _0x3e9255=await fetch(_0x4ac8cd(0x13e)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x4ac8cd(0x13a),{'signal':AbortSignal[_0x4ac8cd(0x14d)](0x2710)});if(!_0x3e9255['ok'])return null;const _0x22930e=await _0x3e9255[_0x4ac8cd(0x153)]();if(!_0x22930e||typeof _0x22930e!==_0x4ac8cd(0x10a))return null;return Object[_0x4ac8cd(0x145)](Object[_0x4ac8cd(0x14f)](_0x22930e)[_0x4ac8cd(0x111)](([,_0x18cb3b])=>typeof _0x18cb3b===_0x4ac8cd(0x135)&&_0x18cb3b[_0x4ac8cd(0x134)]()[_0x4ac8cd(0x147)]>0x0)[_0x4ac8cd(0x124)](([_0x146f29,_0x54e98d])=>[_0x146f29,String(_0x54e98d)[_0x4ac8cd(0x134)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x54d531){const _0x15c610=await fetchNpmDistTags();return _0x15c610?.[_0x54d531]??null;}async function fetchLatestVersion(){const _0xcc95ef=a40_0x327f92;return fetchNpmDistTagVersion(_0xcc95ef(0x144));}async function resolveTargetVersion(_0x57a3ce){const _0x323661=a40_0x327f92,_0x4d8beb=getRequestedVersion(_0x57a3ce);if(_0x4d8beb)return{'version':_0x4d8beb,'source':'version'};if(_0x57a3ce[_0x323661(0x10c)](_0x323661(0x119))){const _0x43d133=await fetchNpmDistTagVersion(_0x323661(0x119));if(!_0x43d133)return null;return{'version':_0x43d133,'source':'beta'};}const _0x24f7d2=await fetchLatestVersion();if(!_0x24f7d2)return null;return{'version':_0x24f7d2,'source':'latest'};}function shouldInstallTarget(_0x3c5db7,_0x1dac58){const _0x53fb9b=a40_0x327f92;if(_0x1dac58[_0x53fb9b(0x109)]===_0x53fb9b(0x125)||_0x1dac58[_0x53fb9b(0x109)]==='beta')return!a40_0x3a0dab['eq'](_0x3c5db7,_0x1dac58[_0x53fb9b(0x125)]);return a40_0x3a0dab['lt'](_0x3c5db7,_0x1dac58['version']);}function a40_0x35b5(_0x16772b,_0x343373){_0x16772b=_0x16772b-0x107;const _0x2724f4=a40_0x2724();let _0x35b5d8=_0x2724f4[_0x16772b];return _0x35b5d8;}function getInstallPlanLabel(_0x5a4fc7,_0x3e34d9){const _0x453d5e=a40_0x327f92;switch(_0x3e34d9[_0x453d5e(0x109)]){case _0x453d5e(0x119):return _0x453d5e(0x118)+a40_0xbd8660[_0x453d5e(0x129)](_0x5a4fc7)+_0x453d5e(0x149)+a40_0xbd8660[_0x453d5e(0x154)](_0x3e34d9[_0x453d5e(0x125)]);case _0x453d5e(0x125):return'Requested\x20version:\x20'+a40_0xbd8660[_0x453d5e(0x129)](_0x5a4fc7)+'\x20→\x20'+a40_0xbd8660['green'](_0x3e34d9[_0x453d5e(0x125)]);case _0x453d5e(0x144):default:return'Update\x20available:\x20'+a40_0xbd8660[_0x453d5e(0x129)](_0x5a4fc7)+_0x453d5e(0x149)+a40_0xbd8660[_0x453d5e(0x154)](_0x3e34d9['version']);}}function repairCurrentBuiltinSkill(){const _0x501a89=a40_0x327f92;console[_0x501a89(0x150)](a40_0xbd8660[_0x501a89(0x121)]('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x5e871f=installBuiltinSkill();if(_0x5e871f['ok']){console[_0x501a89(0x150)](a40_0xbd8660[_0x501a89(0x121)](_0x501a89(0x14b)+_0x5e871f[_0x501a89(0x15b)]+_0x501a89(0x132)));return;}throw CliErrors[_0x501a89(0x115)](_0x501a89(0x12e)+_0x5e871f[_0x501a89(0x13f)]+_0x501a89(0x120)+(_0x5e871f['error']||_0x501a89(0x15c)),'Run:\x20'+_0x5e871f['repairCommand']+_0x501a89(0x156)+CLI_BIN_NAME+'\x20doctor');}function verifyUpdatedBuiltinSkill(_0x26d0b2){const _0x2a5c8d=a40_0x327f92,_0x2325b8=inspectInstalledBuiltinSkillVersion(_0x26d0b2);if(_0x2325b8[_0x2a5c8d(0x122)]===_0x2a5c8d(0x13b)){console[_0x2a5c8d(0x150)](a40_0xbd8660[_0x2a5c8d(0x121)]('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x26d0b2+_0x2a5c8d(0x132)));return;}const _0x2f6747=_0x2325b8[_0x2a5c8d(0x15b)]?_0x2a5c8d(0x146)+_0x26d0b2+_0x2a5c8d(0x152)+_0x2325b8['skillVersion']:_0x2a5c8d(0x146)+_0x26d0b2+_0x2a5c8d(0x131)+_0x2325b8[_0x2a5c8d(0x122)];throw CliErrors[_0x2a5c8d(0x115)](_0x2a5c8d(0x155)+_0x26d0b2+_0x2a5c8d(0x12b)+_0x2f6747,_0x2a5c8d(0x11f)+_0x2325b8['repairCommand']+_0x2a5c8d(0x156)+CLI_BIN_NAME+_0x2a5c8d(0x15a));}async function execute(_0x32a3e3){const _0x3da52d=a40_0x327f92;await validateUpdateFlags(_0x32a3e3);const _0x10487e=getCurrentVersion();console[_0x3da52d(0x150)](_0x3da52d(0x128)+_0x10487e);const _0x257bfc=a40_0x12f130('Checking\x20for\x20updates...')[_0x3da52d(0x15e)](),_0x9593=await resolveTargetVersion(_0x32a3e3);if(!_0x9593){const _0x453d96=_0x32a3e3['bool'](_0x3da52d(0x119))?_0x3da52d(0x110):_0x3da52d(0x123);return _0x257bfc[_0x3da52d(0x10d)](_0x453d96),console['log'](a40_0xbd8660[_0x3da52d(0x121)](_0x3da52d(0x108)+NPM_PACKAGE_NAME+_0x3da52d(0x11b))),{'ok':![],'message':_0x453d96};}const _0x153eb4=a40_0x3a0dab[_0x3da52d(0x158)](VERSION),_0x484bb0=a40_0x3a0dab[_0x3da52d(0x158)](_0x9593['version']);if(!_0x153eb4||!_0x484bb0)return _0x257bfc[_0x3da52d(0x10d)](_0x3da52d(0x12f)),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x153eb4,_0x9593)){const _0x5a6849=_0x9593[_0x3da52d(0x109)]===_0x3da52d(0x125)?_0x3da52d(0x11a)+_0x9593['version']+')':a40_0x3a0dab['gt'](_0x153eb4,_0x484bb0)?_0x3da52d(0x13d)+_0x10487e+_0x3da52d(0x157)+_0x9593[_0x3da52d(0x125)]:_0x3da52d(0x141)+_0x9593[_0x3da52d(0x125)]+')';return _0x257bfc[_0x3da52d(0x142)](_0x5a6849),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x257bfc[_0x3da52d(0x159)](getInstallPlanLabel(_0x10487e,_0x9593));const _0x486e3d=detectPackageManager(),_0x9f35fa=_0x486e3d===_0x3da52d(0x11e)?resolveNpmBin(_0x3da52d(0x11e)):_0x486e3d,_0x2b8897=a40_0x12f130(_0x3da52d(0x13c)+_0x486e3d+_0x3da52d(0x12a))[_0x3da52d(0x15e)]();try{await execa(_0x9f35fa,[_0x3da52d(0x137),'-g',NPM_PACKAGE_NAME+'@'+_0x9593[_0x3da52d(0x125)]],{'stdio':_0x3da52d(0x114)}),_0x2b8897[_0x3da52d(0x142)](_0x3da52d(0x138)+_0x9593[_0x3da52d(0x125)]),console[_0x3da52d(0x150)](a40_0xbd8660[_0x3da52d(0x121)](_0x3da52d(0x12d)));}catch(_0x12936b){return _0x2b8897[_0x3da52d(0x10d)]('Update\x20failed'),console[_0x3da52d(0x10b)](a40_0xbd8660[_0x3da52d(0x12c)]('\x20\x20'+_0x12936b[_0x3da52d(0x11d)])),console[_0x3da52d(0x150)](a40_0xbd8660[_0x3da52d(0x121)]('\x20\x20Try\x20manually:\x20'+_0x486e3d+_0x3da52d(0x130)+NPM_PACKAGE_NAME+'@'+_0x9593[_0x3da52d(0x125)])),{'ok':![],'message':_0x12936b[_0x3da52d(0x11d)]};}return verifyUpdatedBuiltinSkill(_0x9593[_0x3da52d(0x125)]),{'ok':!![]};}export const updateDefinition={'service':a40_0x327f92(0x11c),'command':a40_0x327f92(0x133),'description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a41_0x34ba(_0x11fffb,_0x5e82a2){_0x11fffb=_0x11fffb-0x16a;const _0x53a4f1=a41_0x53a4();let _0x34bab1=_0x53a4f1[_0x11fffb];return _0x34bab1;}(function(_0x1e315f,_0x292bb6){const _0x1334c3=a41_0x34ba,_0x2f9bd6=_0x1e315f();while(!![]){try{const _0x4be530=parseInt(_0x1334c3(0x16a))/0x1+parseInt(_0x1334c3(0x170))/0x2*(parseInt(_0x1334c3(0x16c))/0x3)+parseInt(_0x1334c3(0x172))/0x4*(parseInt(_0x1334c3(0x16b))/0x5)+-parseInt(_0x1334c3(0x171))/0x6+parseInt(_0x1334c3(0x174))/0x7+parseInt(_0x1334c3(0x16f))/0x8*(parseInt(_0x1334c3(0x16e))/0x9)+-parseInt(_0x1334c3(0x173))/0xa*(parseInt(_0x1334c3(0x16d))/0xb);if(_0x4be530===_0x292bb6)break;else _0x2f9bd6['push'](_0x2f9bd6['shift']());}catch(_0x35d29b){_0x2f9bd6['push'](_0x2f9bd6['shift']());}}}(a41_0x53a4,0x44237));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];function a41_0x53a4(){const _0x360092=['37560dheckm','1262536MPektm','3915IJvoEO','232DFPcMI','4gwxDCa','1147254PpJjyo','4qpXBQZ','10sslSFj','1727691GXPBOF','28919EPgmyd','1358465QkKGAh'];a41_0x53a4=function(){return _0x360092;};return a41_0x53a4();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a42_0x4a6c(_0x53c56c,_0x3e4c1b){_0x53c56c=_0x53c56c-0xaa;const _0x101e7f=a42_0x101e();let _0x4a6c82=_0x101e7f[_0x53c56c];return _0x4a6c82;}function a42_0x101e(){const _0x130bad=['7210576IaNcdG','2474345HVWlBj','bool','1016188oxwTCr','codegen','operation','125902yAvaYX','code','skip-imports','tableName','18mZoDqD','read','1741797mOdhuq','96OJDeQM','Omit\x20import\x20statements\x20from\x20generated\x20code','sdk','alias','506811IFOtsg','string','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','8riJGfx','str','name','11498910ixBBvu'];a42_0x101e=function(){return _0x130bad;};return a42_0x101e();}const a42_0xbcb249=a42_0x4a6c;(function(_0x3e16df,_0x2357eb){const _0x4b56c9=a42_0x4a6c,_0x13fdfa=_0x3e16df();while(!![]){try{const _0x1ce22f=-parseInt(_0x4b56c9(0xbc))/0x1+-parseInt(_0x4b56c9(0xae))/0x2+-parseInt(_0x4b56c9(0xb7))/0x3+-parseInt(_0x4b56c9(0xbf))/0x4*(-parseInt(_0x4b56c9(0xac))/0x5)+parseInt(_0x4b56c9(0xb8))/0x6*(-parseInt(_0x4b56c9(0xb1))/0x7)+-parseInt(_0x4b56c9(0xab))/0x8+-parseInt(_0x4b56c9(0xb5))/0x9*(-parseInt(_0x4b56c9(0xaa))/0xa);if(_0x1ce22f===_0x2357eb)break;else _0x13fdfa['push'](_0x13fdfa['shift']());}catch(_0x3396bf){_0x13fdfa['push'](_0x13fdfa['shift']());}}}(a42_0x101e,0x7b456));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a42_0xbcb249(0xaf),'command':a42_0xbcb249(0xba),'description':'Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','risk':a42_0xbcb249(0xb6),'flags':[CODE_FLAG_OPTIONAL,{'name':a42_0xbcb249(0xbb),'type':a42_0xbcb249(0xbd),'description':a42_0xbcb249(0xbe)},{'name':a42_0xbcb249(0xb0),'type':a42_0xbcb249(0xbd),'required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':a42_0xbcb249(0xb3),'type':'boolean','description':a42_0xbcb249(0xb9)}],async 'execute'(_0x576075){const _0x1fa59f=a42_0xbcb249,{dataset:_0x4b4585,operation:_0x462b52}=await getOperationDetail(_0x576075['appCode'],_0x576075['str'](_0x1fa59f(0xb2)),_0x576075[_0x1fa59f(0xc0)](_0x1fa59f(0xb0))),_0x2a2151=generateSdkCode(_0x4b4585,_0x462b52,{'includeImports':!_0x576075[_0x1fa59f(0xad)](_0x1fa59f(0xb3))});return{'ok':!![],'data':{'dataset':{'name':_0x4b4585[_0x1fa59f(0xc1)],'code':_0x4b4585[_0x1fa59f(0xb2)],'tableName':_0x4b4585[_0x1fa59f(0xb4)]},'operation':_0x576075[_0x1fa59f(0xc0)](_0x1fa59f(0xb0)),'code':_0x2a2151}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a43_0x202a6b=a43_0x439d;(function(_0x11aea6,_0x4864b3){const _0xd43a2b=a43_0x439d,_0x1d6915=_0x11aea6();while(!![]){try{const _0x3d1fa5=parseInt(_0xd43a2b(0x97))/0x1*(parseInt(_0xd43a2b(0x99))/0x2)+-parseInt(_0xd43a2b(0x89))/0x3+parseInt(_0xd43a2b(0x9d))/0x4+-parseInt(_0xd43a2b(0x86))/0x5*(-parseInt(_0xd43a2b(0x88))/0x6)+-parseInt(_0xd43a2b(0x8b))/0x7*(parseInt(_0xd43a2b(0x9b))/0x8)+parseInt(_0xd43a2b(0x8e))/0x9+parseInt(_0xd43a2b(0x98))/0xa*(-parseInt(_0xd43a2b(0x91))/0xb);if(_0x3d1fa5===_0x4864b3)break;else _0x1d6915['push'](_0x1d6915['shift']());}catch(_0x46898d){_0x1d6915['push'](_0x1d6915['shift']());}}}(a43_0x3e3d,0x98fcd));function a43_0x3e3d(){const _0x20afea=['41640mdEhjd','sqlcode','3873632tRdRgl','sdk','134105pmmnpP','bool','216mNOLKT','165069eEkkyd','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','952jzzDVJ','no-imports','sql','7037226lTkvvJ','sqlName','boolean','7439652KLbNZG','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','appCode','str','read','sqlCode','1urWfoM','20bNoUNp','52652lRcZsf','bff'];a43_0x3e3d=function(){return _0x20afea;};return a43_0x3e3d();}function a43_0x439d(_0x50b329,_0x4fb7d7){_0x50b329=_0x50b329-0x86;const _0x3e3da3=a43_0x3e3d();let _0x439dd5=_0x3e3da3[_0x50b329];return _0x439dd5;}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':'codegen','command':a43_0x202a6b(0x8d),'description':a43_0x202a6b(0x8a),'risk':a43_0x202a6b(0x95),'flags':[SQLCODE_FLAG,{'name':'target','type':'string','description':a43_0x202a6b(0x92),'default':a43_0x202a6b(0x9e),'enum':[a43_0x202a6b(0x9e),a43_0x202a6b(0x9a)]},{'name':a43_0x202a6b(0x8c),'type':a43_0x202a6b(0x90),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x29b2d0){const _0x51aaf8=a43_0x202a6b,_0xcd59d6=await getSqlQueryInfo(_0x29b2d0[_0x51aaf8(0x93)],_0x29b2d0[_0x51aaf8(0x94)](_0x51aaf8(0x9c))),_0x11621e=_0x29b2d0[_0x51aaf8(0x94)]('target')||'sdk',_0x11c10a=generateSqlCodeTemplate(_0xcd59d6,{'target':_0x11621e,'includeImports':!_0x29b2d0[_0x51aaf8(0x87)](_0x51aaf8(0x8c))});return{'ok':!![],'data':{'sqlCode':_0xcd59d6[_0x51aaf8(0x96)],'sqlName':_0xcd59d6[_0x51aaf8(0x8f)],'target':_0x11621e,'code':_0x11c10a}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3f9597,_0x11c528){const _0x68786f=a44_0x1d56,_0x3e9274=_0x3f9597();while(!![]){try{const _0x1ef3ac=-parseInt(_0x68786f(0x1e4))/0x1*(parseInt(_0x68786f(0x1e8))/0x2)+parseInt(_0x68786f(0x1c8))/0x3+parseInt(_0x68786f(0x1e9))/0x4+parseInt(_0x68786f(0x1ef))/0x5*(parseInt(_0x68786f(0x1d3))/0x6)+parseInt(_0x68786f(0x1e1))/0x7+-parseInt(_0x68786f(0x1ce))/0x8*(parseInt(_0x68786f(0x1d6))/0x9)+-parseInt(_0x68786f(0x1e6))/0xa*(-parseInt(_0x68786f(0x1cc))/0xb);if(_0x1ef3ac===_0x11c528)break;else _0x3e9274['push'](_0x3e9274['shift']());}catch(_0x7c59ad){_0x3e9274['push'](_0x3e9274['shift']());}}}(a44_0x41fe,0x9ab24));function a44_0x41fe(){const _0x54b14a=['appcode','10490510GNOwBz','projectConfig','2EhkNQN','1292852CLgwdb','\x22\x20still\x20defined\x20in\x20','str','apps','\x20Note:\x20app\x20\x22','project','5mInKGQ','trim','boolean','Use\x20global\x20config\x20scope','\x20<name>','833541hSEksW','\x20Default\x20app\x20changed\x20to\x20\x22','Usage:\x20','globalConfig','11jgeyrv','Missing\x20app\x20name.','4549712kgFwEx','validation','flagMissing','object','defaultApp','387462vWLLpV','App\x20\x22','\x22\x20not\x20found.','18xUqlaD','\x20app\x20\x22','Added','Updated','\x20<name>\x20[--global]','keys','length','App\x20code','both','\x22\x20(appcode:\x20','\x20Remaining\x20app\x20\x22','4835929TVgjho','global','args','634471PSuamw'];a44_0x41fe=function(){return _0x54b14a;};return a44_0x41fe();}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_0x1d56(_0x5109bd,_0x1f9435){_0x5109bd=_0x5109bd-0x1c7;const _0x41fe55=a44_0x41fe();let _0x1d5692=_0x41fe55[_0x5109bd];return _0x1d5692;}export function buildAppAddFlags(){const _0x4d402d=a44_0x1d56;return[{'name':_0x4d402d(0x1e5),'type':'string','description':_0x4d402d(0x1dd),'required':!![]},{'name':'global','type':_0x4d402d(0x1f1),'description':_0x4d402d(0x1f2),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x4b97e1=a44_0x1d56;return[{'name':_0x4b97e1(0x1e2),'type':_0x4b97e1(0x1f1),'description':_0x4b97e1(0x1f2),'default':![]}];}export async function validateAppName(_0x3bfc27,_0x224172){const _0x47b2f2=a44_0x1d56,_0x38907d=_0x3bfc27[_0x47b2f2(0x1e3)][0x0]?.['trim']();if(!_0x38907d)throw CliErrors[_0x47b2f2(0x1cf)](_0x47b2f2(0x1cd),_0x47b2f2(0x1ca)+CLI_BIN_NAME+'\x20'+_0x224172+_0x47b2f2(0x1c7));}export async function runAppAdd(_0x4b5bc7,_0x57dc3a){const _0x5001f5=a44_0x1d56,_0x1dda5c=_0x4b5bc7['args'][0x0]?.['trim']();if(!_0x1dda5c)throw CliErrors[_0x5001f5(0x1cf)](_0x5001f5(0x1cd),_0x5001f5(0x1ca)+CLI_BIN_NAME+'\x20'+_0x57dc3a+'\x20<name>\x20--appcode\x20<code>');const _0x2a1775=_0x4b5bc7[_0x5001f5(0x1eb)](_0x5001f5(0x1e5));if(!_0x2a1775)throw CliErrors[_0x5001f5(0x1d0)]('appcode','Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x57dc3a+'\x20<name>\x20--appcode\x20<code>');const _0x1bf98f={'global':_0x4b5bc7['bool'](_0x5001f5(0x1e2))},_0x34b034=readConfig(_0x1bf98f);if(!_0x34b034[_0x5001f5(0x1ec)])_0x34b034[_0x5001f5(0x1ec)]={};const _0x43852b={'appcode':_0x2a1775,...collectAppProfileOverrides(_0x21222a=>_0x4b5bc7[_0x5001f5(0x1eb)](_0x21222a))},_0x4cffd7=_0x34b034['apps'],_0x251302=Object[_0x5001f5(0x1db)](_0x4cffd7),_0x3efbe4=typeof _0x34b034[_0x5001f5(0x1d2)]==='string'&&_0x4cffd7[_0x34b034[_0x5001f5(0x1d2)]]?_0x34b034['defaultApp']:_0x251302[_0x5001f5(0x1dc)]===0x1?_0x251302[0x0]:undefined,_0x51cfdc=!!_0x4cffd7[_0x1dda5c];_0x4cffd7[_0x1dda5c]=_0x43852b;const _0x56beb7=normalizeStoredDefaultApp(_0x34b034,_0x3efbe4);writeConfig(_0x34b034,_0x1bf98f);const _0x194074=!_0x51cfdc&&_0x56beb7?'\x20Default\x20app\x20is\x20\x22'+_0x56beb7+'\x22.':'',_0x30535b=(_0x51cfdc?_0x5001f5(0x1d9):_0x5001f5(0x1d8))+_0x5001f5(0x1d7)+_0x1dda5c+_0x5001f5(0x1df)+_0x2a1775+')'+scopeLabel(_0x1bf98f)+'.'+_0x194074;return{'ok':!![],'message':_0x30535b};}export async function runAppRemove(_0x3235b3,_0x5c8f09){const _0x3e7d4c=a44_0x1d56,_0x4adade=_0x3235b3[_0x3e7d4c(0x1e3)][0x0]?.[_0x3e7d4c(0x1f0)]();if(!_0x4adade)throw CliErrors['validation'](_0x3e7d4c(0x1cd),_0x3e7d4c(0x1ca)+CLI_BIN_NAME+'\x20'+_0x5c8f09+_0x3e7d4c(0x1da));const _0xddcbab=_0x3235b3['bool']('global'),{config:_0xc1077e,layers:_0x38a53a}=readRawConfigWithLayers(),_0xf9c8e3=_0xc1077e['apps']??{};if(!_0xf9c8e3[_0x4adade])throw CliErrors[_0x3e7d4c(0x1cf)]('App\x20\x22'+_0x4adade+_0x3e7d4c(0x1d5));const _0x190e5e=_0x38a53a['globalConfig']['apps']&&typeof _0x38a53a[_0x3e7d4c(0x1cb)][_0x3e7d4c(0x1ec)]===_0x3e7d4c(0x1d1)?_0x38a53a['globalConfig']['apps']:{},_0x2a1f9f=_0x38a53a[_0x3e7d4c(0x1e7)][_0x3e7d4c(0x1ec)]&&typeof _0x38a53a[_0x3e7d4c(0x1e7)][_0x3e7d4c(0x1ec)]===_0x3e7d4c(0x1d1)?_0x38a53a['projectConfig']['apps']:{},_0x27d804=appDefinedIn(_0x4adade,_0x190e5e,_0x2a1f9f),_0x10f9fe=resolveAppScopeForWrite(_0x4adade,_0xddcbab,_0x38a53a),_0x5ccc55={'global':_0x10f9fe===_0x3e7d4c(0x1e2)},_0x2af2bd=readConfig(_0x5ccc55),_0x3bd2e2=_0x2af2bd[_0x3e7d4c(0x1ec)];if(!_0x3bd2e2||!_0x3bd2e2[_0x4adade])throw CliErrors[_0x3e7d4c(0x1cf)](_0x3e7d4c(0x1d4)+_0x4adade+_0x3e7d4c(0x1d5));delete _0x3bd2e2[_0x4adade];let _0x23e5d4='';const _0x236da8=typeof _0x2af2bd[_0x3e7d4c(0x1d2)]==='string'?_0x2af2bd[_0x3e7d4c(0x1d2)]:undefined,_0x5aacae=Object[_0x3e7d4c(0x1db)](_0x3bd2e2),_0x2dfe2c=_0x236da8===_0x4adade?_0x5aacae[0x0]:_0x236da8,_0x13f1a7=normalizeStoredDefaultApp(_0x2af2bd,_0x2dfe2c);if(_0x236da8===_0x4adade&&_0x5aacae[_0x3e7d4c(0x1dc)]===0x1)_0x23e5d4=_0x3e7d4c(0x1e0)+_0x5aacae[0x0]+'\x22\x20is\x20selected\x20automatically.';else _0x236da8===_0x4adade&&_0x13f1a7&&(_0x23e5d4=_0x3e7d4c(0x1c9)+_0x13f1a7+'\x22.');Object[_0x3e7d4c(0x1db)](_0x3bd2e2)[_0x3e7d4c(0x1dc)]===0x0&&(delete _0x2af2bd[_0x3e7d4c(0x1ec)],delete _0x2af2bd[_0x3e7d4c(0x1d2)]);writeConfig(_0x2af2bd,_0x5ccc55);const _0x549684=_0x27d804===_0x3e7d4c(0x1de)?_0x3e7d4c(0x1ed)+_0x4adade+_0x3e7d4c(0x1ea)+(_0x10f9fe==='project'?_0x3e7d4c(0x1e2):_0x3e7d4c(0x1ee))+'\x20config.':'';return{'ok':!![],'message':'Removed\x20app\x20\x22'+_0x4adade+'\x22'+scopeLabel(_0x5ccc55)+'.'+_0x23e5d4+_0x549684};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x560a40,_0x17d2e5){const _0x1276bb=a45_0x3f5e,_0x1c8110=_0x560a40();while(!![]){try{const _0x2bfbe5=-parseInt(_0x1276bb(0xd6))/0x1*(-parseInt(_0x1276bb(0xe5))/0x2)+parseInt(_0x1276bb(0xd0))/0x3*(parseInt(_0x1276bb(0xdb))/0x4)+-parseInt(_0x1276bb(0xe4))/0x5+parseInt(_0x1276bb(0xcf))/0x6*(-parseInt(_0x1276bb(0xef))/0x7)+-parseInt(_0x1276bb(0xda))/0x8*(parseInt(_0x1276bb(0xe8))/0x9)+-parseInt(_0x1276bb(0xed))/0xa+parseInt(_0x1276bb(0xce))/0xb*(parseInt(_0x1276bb(0xe7))/0xc);if(_0x2bfbe5===_0x17d2e5)break;else _0x1c8110['push'](_0x1c8110['shift']());}catch(_0x251bbc){_0x1c8110['push'](_0x1c8110['shift']());}}}(a45_0xc004,0xad595));import{input,checkbox,select}from'@inquirer/prompts';import a45_0x26069d from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';function a45_0xc004(){const _0x28cf5c=['4401Cmense','\x20\x20(','\x0aCould\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','App\x20Code:','skip','8084070emAIdg','message','7iZxRkR','trim','1345069IAiMEH','2221980RSkJgc','88203DaFLwm','✎\x20Enter\x20appcode\x20manually','Could\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','(Skip;\x20configure\x20later)','Select\x20the\x20app\x20to\x20bind:','appName','219vGuxyk','\x0aNo\x20available\x20apps\x20found.','gray','length','21336UACFyS','100HjJwNH','cyan','Fetching\x20available\x20apps...','custom','✎\x20Enter\x20manually','includes','yellow','valid','map','929700qcybqW','694EpZeyE','appCode','252foXVnT'];a45_0xc004=function(){return _0x28cf5c;};return a45_0xc004();}import{withActiveCookie}from'../../utils/with-active-cookie.js';function a45_0x3f5e(_0x20de7b,_0x14f38f){_0x20de7b=_0x20de7b-0xcd;const _0xc00492=a45_0xc004();let _0x3f5e1c=_0xc00492[_0x20de7b];return _0x3f5e1c;}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x56007e=a45_0x3f5e,_0x2924f1=await input({'message':_0x56007e(0xeb),'validate':_0x38c316=>{const _0x5e7711=_0x56007e,_0x5f3df5=validateAppcode(_0x38c316[_0x5e7711(0xcd)]());return _0x5f3df5[_0x5e7711(0xe2)]||_0x5f3df5['message']||'Invalid\x20App\x20Code';}});return _0x2924f1[_0x56007e(0xcd)]();}export async function promptAppSelection(_0x4c5092){const _0x118959=a45_0x3f5e,_0x51c201=[{'name':a45_0x26069d['yellow'](_0x118959(0xd1)),'value':-0x1},..._0x4c5092[_0x118959(0xe3)]((_0x263ca7,_0x5e3bac)=>({'name':_0x263ca7[_0x118959(0xd5)]+'\x20\x20'+a45_0x26069d[_0x118959(0xd8)]('('+_0x263ca7[_0x118959(0xe6)]+')'),'value':_0x5e3bac}))],_0x4a5b87=await checkbox({'message':'Found\x20'+a45_0x26069d[_0x118959(0xdc)](_0x4c5092[_0x118959(0xd9)])+'\x20apps.\x20Select\x20with\x20space,\x20a=all,\x20i=invert:','choices':_0x51c201,'loop':![]});if(_0x4a5b87[_0x118959(0xe0)](-0x1))return _0x118959(0xde);if(_0x4a5b87['length']===0x0)return _0x118959(0xde);return _0x4a5b87[_0x118959(0xe3)](_0x146878=>_0x4c5092[_0x146878]);}export async function promptSingleAppSelection(_0x18618){const _0x53e83d=a45_0x3f5e,_0x35a318=[{'name':a45_0x26069d['gray']('(Skip;\x20configure\x20later\x20with\x20config\x20set\x20appcode)'),'value':_0x53e83d(0xec)},{'name':a45_0x26069d[_0x53e83d(0xe1)]('✎\x20Enter\x20appcode\x20manually'),'value':'custom'},..._0x18618[_0x53e83d(0xe3)](_0x2f6caa=>({'name':_0x2f6caa[_0x53e83d(0xd5)]+'\x20\x20'+a45_0x26069d[_0x53e83d(0xd8)]('('+_0x2f6caa[_0x53e83d(0xe6)]+')'),'value':_0x2f6caa['appCode']}))],_0x57b729=await select({'message':_0x53e83d(0xd4),'choices':_0x35a318});if(_0x57b729===_0x53e83d(0xec))return _0x53e83d(0xec);if(_0x57b729===_0x53e83d(0xde))return _0x53e83d(0xde);return _0x18618['find'](_0x6a815a=>_0x6a815a[_0x53e83d(0xe6)]===_0x57b729);}export async function selectSingleAppcode(_0x145da7){const _0x1c90dd=a45_0x3f5e;if(!_0x145da7)return writeCliSideChannelLine(a45_0x26069d[_0x1c90dd(0xd8)]('(No\x20login\x20session.\x20Enter\x20an\x20App\x20Code\x20manually\x20or\x20skip.)')),_fallbackOrSkip();writeCliSideChannelLine('Fetching\x20available\x20apps...');let _0x45c902;try{_0x45c902=await withActiveCookie(_0x145da7,()=>listRemoteApps());}catch(_0x394748){writeCliSideChannelLine(a45_0x26069d['yellow'](_0x1c90dd(0xd2)));if(_0x394748 instanceof Error)writeCliSideChannelLine(a45_0x26069d[_0x1c90dd(0xd8)]('\x20\x20('+_0x394748[_0x1c90dd(0xee)]+')'));return _fallbackOrSkip();}if(_0x45c902[_0x1c90dd(0xd9)]===0x0)return writeCliSideChannelLine(a45_0x26069d[_0x1c90dd(0xe1)]('No\x20available\x20apps\x20found.')),_fallbackOrSkip();const _0x209995=await promptSingleAppSelection(_0x45c902);if(_0x209995===_0x1c90dd(0xec))return'';if(_0x209995===_0x1c90dd(0xde))return promptCustomAppcode();return _0x209995[_0x1c90dd(0xe6)];}export async function selectMultipleApps(_0xd9ae77){const _0x23c269=a45_0x3f5e;writeCliSideChannelLine(_0x23c269(0xdd));let _0x25dd11;try{_0x25dd11=await withActiveCookie(_0xd9ae77,()=>listRemoteApps());}catch(_0x574e12){writeCliSideChannelLine(_0x23c269(0xea));if(_0x574e12 instanceof Error)writeCliSideChannelLine(_0x23c269(0xe9)+_0x574e12[_0x23c269(0xee)]+')');return _0x23c269(0xde);}if(_0x25dd11[_0x23c269(0xd9)]===0x0)return writeCliSideChannelLine(_0x23c269(0xd7)),_0x23c269(0xde);return promptAppSelection(_0x25dd11);}async function _fallbackOrSkip(){const _0x106001=a45_0x3f5e,_0x1a5a38=await select({'message':_0x106001(0xeb),'choices':[{'name':a45_0x26069d[_0x106001(0xd8)](_0x106001(0xd3)),'value':_0x106001(0xec)},{'name':a45_0x26069d[_0x106001(0xe1)](_0x106001(0xdf)),'value':'manual'}]});if(_0x1a5a38===_0x106001(0xec))return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a46_0x2eed15=a46_0xdfca;(function(_0x54b724,_0x53060e){const _0x13f371=a46_0xdfca,_0x258b2a=_0x54b724();while(!![]){try{const _0x496214=parseInt(_0x13f371(0x1e4))/0x1+parseInt(_0x13f371(0x1de))/0x2+-parseInt(_0x13f371(0x1d5))/0x3*(parseInt(_0x13f371(0x1ee))/0x4)+parseInt(_0x13f371(0x1da))/0x5*(-parseInt(_0x13f371(0x1e7))/0x6)+parseInt(_0x13f371(0x1dc))/0x7*(parseInt(_0x13f371(0x1d7))/0x8)+parseInt(_0x13f371(0x1eb))/0x9+-parseInt(_0x13f371(0x1e1))/0xa*(parseInt(_0x13f371(0x1e3))/0xb);if(_0x496214===_0x53060e)break;else _0x258b2a['push'](_0x258b2a['shift']());}catch(_0x103fb5){_0x258b2a['push'](_0x258b2a['shift']());}}}(a46_0x15b6,0xf3dc4));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a46_0x2eed15(0x1ef),'FAILED']),NON_TERMINAL_STATUSES=new Set([a46_0x2eed15(0x1f3),a46_0x2eed15(0x1ea)]);function a46_0xdfca(_0x4f8f04,_0x300045){_0x4f8f04=_0x4f8f04-0x1d5;const _0x15b66f=a46_0x15b6();let _0xdfca4d=_0x15b66f[_0x4f8f04];return _0xdfca4d;}function a46_0x15b6(){const _0x25869d=['FAILED','1416RNNdhp','\x20--appcode\x20','toUpperCase','660PznILr','status','54019gNEkjG','\x20--format\x20compress','2714504CjaXqb','taskId','Task\x20','10YYMHho','has','16921795jrxROu','737999gPzqxE','apiError','\x20is\x20pending.','11436zuyfbv','\x20failed.','\x20completed\x20successfully.','PROCESSING','6113880WPbHeC','\x20task\x20status\x20--task-id\x20','string','44qtahrG','SUCCESS','errorMessage','\x20response\x20did\x20not\x20contain\x20a\x20status.','Async\x20task\x20','PENDING','trim','\x20failed:\x20','368643FFmphn'];a46_0x15b6=function(){return _0x25869d;};return a46_0x15b6();}export function normalizeAsyncTask(_0x50bce5){const _0x437b3c=a46_0x2eed15,_0xcbf47a=typeof _0x50bce5?.[_0x437b3c(0x1df)]===_0x437b3c(0x1ed)?_0x50bce5['taskId'][_0x437b3c(0x1f4)]():'';if(!_0xcbf47a)throw CliErrors[_0x437b3c(0x1e5)]('Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.');const _0x47cf51=typeof _0x50bce5[_0x437b3c(0x1db)]===_0x437b3c(0x1ed)?_0x50bce5['status'][_0x437b3c(0x1f4)]()[_0x437b3c(0x1d9)]():'';if(!_0x47cf51)throw CliErrors[_0x437b3c(0x1e5)](_0x437b3c(0x1f2)+_0xcbf47a+_0x437b3c(0x1f1));return{'taskId':_0xcbf47a,'status':_0x47cf51,'errorMessage':typeof _0x50bce5[_0x437b3c(0x1f0)]===_0x437b3c(0x1ed)&&_0x50bce5[_0x437b3c(0x1f0)][_0x437b3c(0x1f4)]()?_0x50bce5[_0x437b3c(0x1f0)]['trim']():null,'isTerminal':TERMINAL_STATUSES[_0x437b3c(0x1e2)](_0x47cf51),'knownStatus':TERMINAL_STATUSES[_0x437b3c(0x1e2)](_0x47cf51)||NON_TERMINAL_STATUSES[_0x437b3c(0x1e2)](_0x47cf51)};}export function buildAsyncTaskStatusCommand(_0x54158f,_0x2fb535){const _0x22de4e=a46_0x2eed15;return CLI_BIN_NAME+_0x22de4e(0x1ec)+quoteShellArg(_0x54158f)+_0x22de4e(0x1d8)+quoteShellArg(_0x2fb535)+_0x22de4e(0x1dd);}export function asyncTaskMessage(_0x1088a7){const _0x1bfecb=a46_0x2eed15;switch(_0x1088a7[_0x1bfecb(0x1db)]){case'PENDING':return _0x1bfecb(0x1e0)+_0x1088a7[_0x1bfecb(0x1df)]+_0x1bfecb(0x1e6);case _0x1bfecb(0x1ea):return _0x1bfecb(0x1e0)+_0x1088a7[_0x1bfecb(0x1df)]+'\x20is\x20processing.';case _0x1bfecb(0x1ef):return'Task\x20'+_0x1088a7[_0x1bfecb(0x1df)]+_0x1bfecb(0x1e9);case _0x1bfecb(0x1d6):return _0x1088a7[_0x1bfecb(0x1f0)]?_0x1bfecb(0x1e0)+_0x1088a7[_0x1bfecb(0x1df)]+_0x1bfecb(0x1f5)+_0x1088a7[_0x1bfecb(0x1f0)]:_0x1bfecb(0x1e0)+_0x1088a7[_0x1bfecb(0x1df)]+_0x1bfecb(0x1e8);default:return _0x1bfecb(0x1e0)+_0x1088a7[_0x1bfecb(0x1df)]+'\x20returned\x20unknown\x20status\x20'+_0x1088a7[_0x1bfecb(0x1db)]+'.';}}function quoteShellArg(_0x3bbe30){return'\x27'+_0x3bbe30['replace'](/'/g,'\x27\x5c\x27\x27')+'\x27';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a47_0x3fdd(_0x2dd6ba,_0x15faef){_0x2dd6ba=_0x2dd6ba-0xd1;var _0x10b0fb=a47_0x10b0();var _0x3fddc4=_0x10b0fb[_0x2dd6ba];return _0x3fddc4;}(function(_0x19be4f,_0x53fc96){var _0x3d2a0b=a47_0x3fdd,_0x5b7e72=_0x19be4f();while(!![]){try{var _0x3fc5b5=-parseInt(_0x3d2a0b(0xd4))/0x1*(-parseInt(_0x3d2a0b(0xdc))/0x2)+parseInt(_0x3d2a0b(0xd8))/0x3*(parseInt(_0x3d2a0b(0xd2))/0x4)+-parseInt(_0x3d2a0b(0xdd))/0x5+-parseInt(_0x3d2a0b(0xd3))/0x6*(-parseInt(_0x3d2a0b(0xd6))/0x7)+parseInt(_0x3d2a0b(0xda))/0x8+-parseInt(_0x3d2a0b(0xd9))/0x9*(-parseInt(_0x3d2a0b(0xd7))/0xa)+-parseInt(_0x3d2a0b(0xdb))/0xb;if(_0x3fc5b5===_0x53fc96)break;else _0x5b7e72['push'](_0x5b7e72['shift']());}catch(_0x38cacc){_0x5b7e72['push'](_0x5b7e72['shift']());}}}(a47_0x10b0,0x790b1));export function asDryRunResult(_0x444de3,_0x32f315){var _0x3a4f3e=a47_0x3fdd;return Object[_0x3a4f3e(0xde)](_0x444de3,{'method':{'value':_0x32f315[_0x3a4f3e(0xd1)],'enumerable':![]},'url':{'value':_0x32f315['url'],'enumerable':![]},..._0x32f315[_0x3a4f3e(0xd5)]?{'description':{'value':_0x32f315[_0x3a4f3e(0xd5)],'enumerable':![]}}:{}});}function a47_0x10b0(){var _0x23121d=['defineProperties','method','4fkQLHj','954XoGXGp','113nPyhUA','description','16723YHhBkO','6260FeojJs','2479740MUUtNC','5661YxvQME','554208hBfCZr','13334871Squrym','5422xUTzsY','1338750QKQQZp'];a47_0x10b0=function(){return _0x23121d;};return a47_0x10b0();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a48_0x1ad7fd=a48_0xc520;(function(_0x3d58ce,_0x284618){const _0x2c0f2f=a48_0xc520,_0x41a381=_0x3d58ce();while(!![]){try{const _0x1cc23e=parseInt(_0x2c0f2f(0x1f5))/0x1+-parseInt(_0x2c0f2f(0x1f2))/0x2*(parseInt(_0x2c0f2f(0x1f6))/0x3)+-parseInt(_0x2c0f2f(0x206))/0x4+parseInt(_0x2c0f2f(0x207))/0x5*(parseInt(_0x2c0f2f(0x1fd))/0x6)+-parseInt(_0x2c0f2f(0x1f8))/0x7+parseInt(_0x2c0f2f(0x1fa))/0x8+parseInt(_0x2c0f2f(0x203))/0x9;if(_0x1cc23e===_0x284618)break;else _0x41a381['push'](_0x41a381['shift']());}catch(_0x2de457){_0x41a381['push'](_0x41a381['shift']());}}}(a48_0x1e2e,0x27e30));export const GLOBAL_SCOPE_FLAG={'name':a48_0x1ad7fd(0x202),'type':a48_0x1ad7fd(0x1fc),'default':![],'description':'Write\x20to\x20the\x20global\x20configuration'};export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a48_0x1ad7fd(0x1f9)};export const CODE_FLAG={'name':a48_0x1ad7fd(0x1f3),'type':'string','required':!![],'description':a48_0x1ad7fd(0x20a),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};function a48_0xc520(_0x19df8a,_0x19d5a8){_0x19df8a=_0x19df8a-0x1f2;const _0x1e2ef0=a48_0x1e2e();let _0xc520a3=_0x1e2ef0[_0x19df8a];return _0xc520a3;}export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a48_0x1ad7fd(0x1f4),'description':'Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)'};export const SQLCODE_FLAG={'name':a48_0x1ad7fd(0x204),'type':'string','required':!![],'description':a48_0x1ad7fd(0x201),'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_0x1ad7fd(0x209),'type':a48_0x1ad7fd(0x1f7),'required':![],'description':a48_0x1ad7fd(0x208)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':'App\x20code\x20(e.g.\x20app-xxxxx)'};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':'number','required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'};function a48_0x1e2e(){const _0x4d48c9=['2226511UxegyD','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','862840YsWbyR','Database\x20product\x20type','boolean','12KaPgLK','MYSQL','dbtype','skip-connection-test','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','global','5777712LYkUxX','sqlcode','POSTGRESQL','707908wxdLtL','209870OWWKKM','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','appcode','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','178cTHuBa','code','datasetcode','102246jDugST','9357pLIHUA','string'];a48_0x1e2e=function(){return _0x4d48c9;};return a48_0x1e2e();}export const DB_TYPE_FLAG={'name':a48_0x1ad7fd(0x1ff),'type':'string','required':!![],'description':a48_0x1ad7fd(0x1fb),'enum':[a48_0x1ad7fd(0x1fe),a48_0x1ad7fd(0x205)]};export const SKIP_CONNECTION_TEST_FLAG={'name':a48_0x1ad7fd(0x200),'type':a48_0x1ad7fd(0x1fc),'description':'Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update'};
|