@lovrabet/rabetbase-cli 2.4.1-beta.1 → 2.4.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/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/get.js +1 -1
- package/lib/commands/config/index.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/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.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-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/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.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/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/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/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/ocr/index.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/react/create.js +1 -1
- package/lib/commands/page/react/detail.js +1 -1
- package/lib/commands/page/react/list.js +1 -1
- package/lib/commands/page/react/publish.js +1 -1
- package/lib/commands/page/react/shared.js +1 -1
- package/lib/commands/page/react/syntax.js +1 -1
- package/lib/commands/page/react/template.js +1 -1
- package/lib/commands/page/react/update.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/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.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/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/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/risk.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/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.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/rules-cdn.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/references/rabetbase-page-react-detail.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
package/lib/commands/bff/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a34_0xca579=a34_0x15d7;(function(_0x16829e,_0xb5cdcb){const _0x15e286=a34_0x15d7,_0x26ea7b=_0x16829e();while(!![]){try{const _0x221ffd=parseInt(_0x15e286(0x16b))/0x1+-parseInt(_0x15e286(0x167))/0x2*(parseInt(_0x15e286(0x174))/0x3)+parseInt(_0x15e286(0x168))/0x4+-parseInt(_0x15e286(0x175))/0x5+parseInt(_0x15e286(0x16f))/0x6+-parseInt(_0x15e286(0x17a))/0x7*(parseInt(_0x15e286(0x178))/0x8)+parseInt(_0x15e286(0x16e))/0x9;if(_0x221ffd===_0xb5cdcb)break;else _0x26ea7b['push'](_0x26ea7b['shift']());}catch(_0xeeae25){_0x26ea7b['push'](_0x26ea7b['shift']());}}}(a34_0x1aad,0x75d44));function a34_0x15d7(_0x3594b4,_0xe0cc46){_0x3594b4=_0x3594b4-0x161;const _0x1aad40=a34_0x1aad();let _0x15d7d7=_0x1aad40[_0x3594b4];return _0x15d7d7;}import{listBffScripts}from'../../core/api-client.js';function a34_0x1aad(){const _0x4ab25b=['391824nlgrBF','List\x20BFF\x20scripts','Return\x20full\x20script\x20objects','bool','(unnamed)','684183NGAyMt','2140235VzXWoV','map','appCode','6123288TWoTJQ','bff','7LqMtaq','string','scriptType','str','type','Script\x20type\x20filter','Filter\x20by\x20script\x20name','functionName','8TssBlF','1345728KLPACk','verbose','ENDPOINT','403920AwTrZj','boolean','name','16044066bVEvvV'];a34_0x1aad=function(){return _0x4ab25b;};return a34_0x1aad();}export const bffList={'service':a34_0xca579(0x179),'command':'list','description':a34_0xca579(0x170),'risk':'read','flags':[{'name':a34_0xca579(0x163),'type':a34_0xca579(0x17b),'description':a34_0xca579(0x164),'default':'ENDPOINT','enum':[a34_0xca579(0x16a),'COMMON']},{'name':a34_0xca579(0x16d),'type':'string','description':a34_0xca579(0x165)},{'name':a34_0xca579(0x169),'type':a34_0xca579(0x16c),'description':a34_0xca579(0x171)}],async 'execute'(_0xc295e7){const _0x3890ae=a34_0xca579,_0x595529=await listBffScripts(_0xc295e7[_0x3890ae(0x177)],_0xc295e7[_0x3890ae(0x162)](_0x3890ae(0x163)),{'scriptName':_0xc295e7[_0x3890ae(0x162)]('name')||undefined}),_0x357a70=_0xc295e7[_0x3890ae(0x172)](_0x3890ae(0x169));return{'ok':!![],'data':_0x357a70?_0x595529:_0x595529[_0x3890ae(0x176)](_0x31a008=>({'id':_0x31a008['id'],'functionName':_0x31a008[_0x3890ae(0x166)]??'','description':_0x31a008['description']||_0x3890ae(0x173),'scriptType':_0x31a008[_0x3890ae(0x161)]})),'message':_0x595529['length']===0x0?'No\x20BFF\x20scripts\x20found.':undefined};}};
|
package/lib/commands/bff/pull.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a35_0x7b9299=a35_0x2fb8;(function(_0x171390,_0x40e73c){const _0x33a241=a35_0x2fb8,_0x2ac321=_0x171390();while(!![]){try{const _0x2ec1e9=-parseInt(_0x33a241(0xb9))/0x1+parseInt(_0x33a241(0xb0))/0x2+-parseInt(_0x33a241(0xac))/0x3+parseInt(_0x33a241(0x88))/0x4*(parseInt(_0x33a241(0x8b))/0x5)+parseInt(_0x33a241(0x8d))/0x6*(-parseInt(_0x33a241(0x90))/0x7)+-parseInt(_0x33a241(0x89))/0x8*(parseInt(_0x33a241(0xbf))/0x9)+parseInt(_0x33a241(0x9f))/0xa*(parseInt(_0x33a241(0xbc))/0xb);if(_0x2ec1e9===_0x40e73c)break;else _0x2ac321['push'](_0x2ac321['shift']());}catch(_0x20d4ed){_0x2ac321['push'](_0x2ac321['shift']());}}}(a35_0x24f4,0x891e5));import{createInterface}from'node:readline';function a35_0x2fb8(_0x203743,_0x1a7a33){_0x203743=_0x203743-0x78;const _0x24f426=a35_0x24f4();let _0x2fb818=_0x24f426[_0x203743];return _0x2fb818;}import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':a35_0x7b9299(0x9a),'command':'pull','description':a35_0x7b9299(0x99),'risk':a35_0x7b9299(0x93),'flags':[{'name':a35_0x7b9299(0x86),'type':a35_0x7b9299(0x78),'description':'Pull\x20only\x20this\x20script\x20type','enum':[a35_0x7b9299(0x94),a35_0x7b9299(0x79),a35_0x7b9299(0x7b)]},{'name':a35_0x7b9299(0x7c),'type':a35_0x7b9299(0xa7),'description':'Force\x20overwrite\x20local\x20unsynced\x20changes'}],async 'dryRun'(_0xeb9cc0){const _0x8d9139=a35_0x7b9299,_0x1716bf=loadBffProjectConfig(_0xeb9cc0[_0x8d9139(0xa9)]),_0x3ed046=await readBffLockFile(_0x1716bf[_0x8d9139(0xb4)]),{appLock:_0x37aac6}=ensureLockScope(_0x3ed046??createEmptyBffLock(),_0xeb9cc0[_0x8d9139(0xa9)],_0x1716bf[_0x8d9139(0xbb)],_0x8d9139(0xa1)),_0x1e5f36=normalizeBffType(_0xeb9cc0[_0x8d9139(0xad)](_0x8d9139(0x86)))??undefined,_0x50da3f=buildDatasetCodeToAliasMap(_0xeb9cc0[_0x8d9139(0xb8)],_0xeb9cc0[_0x8d9139(0xa9)]),[_0x14d141,_0x40e75c]=await Promise['all']([listBffScripts(_0xeb9cc0[_0x8d9139(0xa9)],_0x1e5f36),getBffScriptStatistics(_0xeb9cc0[_0x8d9139(0xa9)])]),_0x5e22ff=createHookLocationMap(_0x40e75c),_0x17e56d=[];for(const _0x323924 of _0x14d141){const _0x10cc6b=resolveRemoteScriptTarget(_0x1716bf,_0x323924,_0x5e22ff,_0x37aac6[_0x8d9139(0xb5)],_0x50da3f);if(!_0x10cc6b){_0x17e56d[_0x8d9139(0xaf)]({'scriptType':_0x323924[_0x8d9139(0xa6)],'functionName':_0x323924[_0x8d9139(0x96)]??'','status':_0x8d9139(0x7f),'reason':_0x8d9139(0x7d)});continue;}const _0x24d661=_0x37aac6['functions'][_0x10cc6b[_0x8d9139(0x7e)]],_0x3c16e6=_0x323924['scriptContent']!=null?computeContentHash(_0x323924[_0x8d9139(0xaa)]):undefined,_0x263882=await hasUnsyncedLocalChanges(_0x10cc6b[_0x8d9139(0xa5)],_0x24d661,_0x3c16e6);_0x17e56d[_0x8d9139(0xaf)]({'lockKey':_0x10cc6b[_0x8d9139(0x7e)],'filePath':_0x10cc6b[_0x8d9139(0xa5)],'remoteId':_0x323924['id']??null,'status':_0x263882?_0x8d9139(0xbe):'would_pull'});}return{'method':_0x8d9139(0x8c),'url':'/api/management/library/scripts/list?appCode='+_0xeb9cc0[_0x8d9139(0xa9)]+(_0x1e5f36?'&type='+_0x1e5f36:''),'body':{'appCode':_0xeb9cc0[_0x8d9139(0xa9)],'filterType':_0x1e5f36??null,'files':_0x17e56d},'description':_0x8d9139(0x8f)+_0x17e56d['length']+_0x8d9139(0xb2)};},async 'execute'(_0x51d8d1){const _0x3a1f61=a35_0x7b9299,_0x2f1824=loadBffProjectConfig(_0x51d8d1[_0x3a1f61(0xa9)]),_0x8aa2eb=await readBffLockFile(_0x2f1824['lockFilePath']),{lockData:_0x25c9df,appLock:_0x3098bc}=ensureLockScope(_0x8aa2eb??createEmptyBffLock(),_0x51d8d1[_0x3a1f61(0xa9)],_0x2f1824[_0x3a1f61(0xbb)],'pull'),_0x2412b2=normalizeBffType(_0x51d8d1['str'](_0x3a1f61(0x86)))??undefined;if(_0x51d8d1[_0x3a1f61(0xad)]('type')&&!_0x2412b2)throw CliErrors[_0x3a1f61(0x91)]('--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.');const [_0x33b8ce,_0x3dcf45]=await Promise[_0x3a1f61(0xb6)]([listBffScripts(_0x51d8d1[_0x3a1f61(0xa9)],_0x2412b2),getBffScriptStatistics(_0x51d8d1['appCode'])]);if(_0x33b8ce[_0x3a1f61(0xbd)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x3a1f61(0x9c)};const _0x40a2c7=_0x51d8d1['bool'](_0x3a1f61(0x7c));if(_0x40a2c7&&!_0x51d8d1[_0x3a1f61(0x95)]){const _0x365b02=await confirmForce();if(!_0x365b02)throw CliErrors[_0x3a1f61(0xa2)](_0x3a1f61(0x97));}if(_0x40a2c7&&_0x51d8d1['nonInteractive']){}const _0x4befc4=buildDatasetCodeToAliasMap(_0x51d8d1[_0x3a1f61(0xb8)],_0x51d8d1[_0x3a1f61(0xa9)]),_0x4543fd=createHookLocationMap(_0x3dcf45),_0x3ff24a=JSON[_0x3a1f61(0x83)](JSON[_0x3a1f61(0x7a)](_0x25c9df)),_0xe691e3=_0x51d8d1['appCode'],_0x18e30e=_0x3ff24a[_0x3a1f61(0xa0)][_0xe691e3];if(!_0x18e30e)throw new Error(_0x3a1f61(0xb3)+_0xe691e3+_0x3a1f61(0xb1));const _0x29eff6=[],_0x33b876=[],_0xcaea22=[];for(const _0x370ec5 of _0x33b8ce){const _0x10f933=resolveRemoteScriptTarget(_0x2f1824,_0x370ec5,_0x4543fd,_0x3098bc[_0x3a1f61(0xb5)],_0x4befc4);if(!_0x10f933){_0x33b876['push']({'lockKey':_0x370ec5[_0x3a1f61(0xa6)]+'/'+_0x370ec5[_0x3a1f61(0x96)],'reason':'unresolvable\x20target\x20path'});continue;}const _0x4d5d62=_0x3098bc['functions'][_0x10f933['lockKey']];try{if(!_0x370ec5['id'])throw new Error(_0x3a1f61(0xa8));if(_0x370ec5[_0x3a1f61(0xaa)]==null)throw new Error(_0x3a1f61(0x8e));const _0x46fb14=_0x370ec5[_0x3a1f61(0xaa)],_0x3f7e8b=computeContentHash(_0x46fb14);if(!_0x40a2c7){const _0x5321bf=await hasUnsyncedLocalChanges(_0x10f933['filePath'],_0x4d5d62,_0x3f7e8b);if(_0x5321bf){_0x33b876[_0x3a1f61(0xaf)]({'lockKey':_0x10f933[_0x3a1f61(0x7e)],'reason':_0x3a1f61(0xba)});continue;}}await ensureParentDirectory(_0x10f933['filePath']),await writeFile(_0x10f933[_0x3a1f61(0xa5)],_0x46fb14,'utf8');const _0xd259cf={'hash':_0x3f7e8b,'remoteId':_0x370ec5['id'],'version':_0x370ec5[_0x3a1f61(0x92)]};_0x10f933[_0x3a1f61(0x86)]==='HOOK'&&_0x10f933[_0x3a1f61(0xab)]&&(_0xd259cf['alias']=_0x10f933['hookLocation']['alias'],_0xd259cf[_0x3a1f61(0x80)]=_0x10f933[_0x3a1f61(0xab)]['datasetCode'],_0xd259cf['operationType']=_0x10f933[_0x3a1f61(0xab)]['operationType'],_0xd259cf[_0x3a1f61(0xae)]=_0x10f933[_0x3a1f61(0xab)][_0x3a1f61(0xae)]),_0x18e30e['functions'][_0x10f933[_0x3a1f61(0x7e)]]=_0xd259cf,_0x29eff6[_0x3a1f61(0xaf)]({'lockKey':_0x10f933[_0x3a1f61(0x7e)],'remoteId':_0x370ec5['id']});}catch(_0x48a88e){_0xcaea22[_0x3a1f61(0xaf)]({'lockKey':_0x10f933[_0x3a1f61(0x7e)],'error':_0x48a88e instanceof Error?_0x48a88e['message']:String(_0x48a88e)});}}return _0x18e30e[_0x3a1f61(0xb7)]=new Date()[_0x3a1f61(0x82)](),await writeBffLockFile(_0x2f1824['lockFilePath'],_0x3ff24a),{'ok':_0xcaea22[_0x3a1f61(0xbd)]===0x0,'data':{'pulled':_0x29eff6,'skipped':_0x33b876,'failed':_0xcaea22},'message':_0x3a1f61(0x8a)+_0x29eff6[_0x3a1f61(0xbd)]+'\x20pulled,\x20'+_0x33b876[_0x3a1f61(0xbd)]+'\x20skipped,\x20'+_0xcaea22['length']+_0x3a1f61(0x9b)};}};function a35_0x24f4(){const _0x5e6773=['string','ENDPOINT','stringify','HOOK','force','unresolvable\x20target\x20path','lockKey','skipped','datasetCode','map','toISOString','parse','toLowerCase','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','type','stderr','1249676qvkHMG','80EjiSry','Pull\x20complete:\x20','10uoMcmr','GET','3345306fhjMWB','Remote\x20script\x20missing\x20content.','Would\x20inspect\x20','14IdiUWa','validation','version','read','COMMON','nonInteractive','functionName','Force\x20pull\x20cancelled.','close','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','bff','\x20failed','No\x20remote\x20BFF\x20scripts\x20found.','stdin','yes','52870qFDofE','apps','pull','cancelled','alias','trim','filePath','scriptType','boolean','Remote\x20script\x20missing\x20id.','appCode','scriptContent','hookLocation','223191VoANDD','str','functionNode','push','1206298xlpxhB','\x22\x20not\x20found\x20after\x20ensureLockScope.','\x20remote\x20BFF\x20script(s)\x20for\x20pull','Lock\x20scope\x20for\x20app\x20\x22','lockFilePath','functions','all','lastSync','apiDir','546087GAtzLV','local\x20unsynced\x20changes','scriptsRoot','3718sjOAmP','length','conflict','645993QHkeWS'];a35_0x24f4=function(){return _0x5e6773;};return a35_0x24f4();}async function hasUnsyncedLocalChanges(_0x406784,_0x3f2caa,_0x1406de){if(!await fileExists(_0x406784))return![];const _0x559838=await computeFileHash(_0x406784);if(!_0x3f2caa)return _0x1406de?_0x559838!==_0x1406de:!![];return _0x559838!==_0x3f2caa['hash'];}function buildDatasetCodeToAliasMap(_0x49c6fd,_0x383916){const _0x45f2b0=a35_0x7b9299,_0x1e5dba=loadAliasMap(_0x49c6fd,undefined,resolveApiFilePath(_0x49c6fd,_0x383916));return new Map(_0x1e5dba[_0x45f2b0(0x81)](_0x8b1813=>[_0x8b1813[_0x45f2b0(0x80)],_0x8b1813[_0x45f2b0(0xa3)]]));}async function confirmForce(){const _0x9b1ac9=a35_0x7b9299,_0x40e9dd=createInterface({'input':process[_0x9b1ac9(0x9d)],'output':process[_0x9b1ac9(0x87)]}),_0x3846fc=await new Promise(_0x373cdb=>{const _0x4d91bf=_0x9b1ac9;_0x40e9dd['question'](_0x4d91bf(0x85),_0x373cdb);});return _0x40e9dd[_0x9b1ac9(0x98)](),['y',_0x9b1ac9(0x9e)]['includes'](_0x3846fc[_0x9b1ac9(0xa4)]()[_0x9b1ac9(0x84)]());}
|
package/lib/commands/bff/push.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a36_0x55ae30=a36_0x204e;(function(_0xdbc290,_0x2b36dc){const _0x143e0f=a36_0x204e,_0x3a1b9e=_0xdbc290();while(!![]){try{const _0x12ca4a=-parseInt(_0x143e0f(0x19f))/0x1*(-parseInt(_0x143e0f(0x1c9))/0x2)+-parseInt(_0x143e0f(0x1b1))/0x3+parseInt(_0x143e0f(0x188))/0x4+-parseInt(_0x143e0f(0x1be))/0x5+parseInt(_0x143e0f(0x18d))/0x6+parseInt(_0x143e0f(0x1ae))/0x7*(-parseInt(_0x143e0f(0x1a7))/0x8)+-parseInt(_0x143e0f(0x1ad))/0x9*(parseInt(_0x143e0f(0x1c7))/0xa);if(_0x12ca4a===_0x2b36dc)break;else _0x3a1b9e['push'](_0x3a1b9e['shift']());}catch(_0x1442b2){_0x3a1b9e['push'](_0x3a1b9e['shift']());}}}(a36_0x72f2,0x240dc));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':a36_0x55ae30(0x1b5),'description':'Push\x20local\x20BFF\x20scripts\x20to\x20remote','risk':a36_0x55ae30(0x1ca),'flags':[{'name':'type','type':a36_0x55ae30(0x18a),'description':'Push\x20only\x20this\x20script\x20type','enum':[a36_0x55ae30(0x180),a36_0x55ae30(0x1a4),a36_0x55ae30(0x19e)]},{'name':a36_0x55ae30(0x1bf),'type':'string','description':a36_0x55ae30(0x1aa)},{'name':a36_0x55ae30(0x17f),'type':a36_0x55ae30(0x1b3),'description':a36_0x55ae30(0x198)}],async 'dryRun'(_0x449cff){const _0x3f36e2=a36_0x55ae30,_0x277e99=loadBffProjectConfig(_0x449cff[_0x3f36e2(0x1c2)]),_0x540757=await readBffLockFile(_0x277e99[_0x3f36e2(0x17e)]),{appLock:_0x1d9b27}=ensureLockScope(_0x540757??createEmptyBffLock(),_0x449cff[_0x3f36e2(0x1c2)],_0x277e99[_0x3f36e2(0x1bd)],_0x3f36e2(0x1b5)),_0x143288=await getTargetFunctions(_0x277e99,_0x449cff),_0x5b138d=_0x449cff[_0x3f36e2(0x194)](_0x3f36e2(0x17f)),_0x347fa4=[];for(const _0x1ef7f1 of _0x143288){const _0x1bfbaa=await computeFileHash(_0x1ef7f1[_0x3f36e2(0x1a6)]),_0x295c8f=_0x1d9b27[_0x3f36e2(0x18e)][_0x1ef7f1[_0x3f36e2(0x1a0)]],_0x6fcc7d=!!_0x295c8f&&_0x295c8f[_0x3f36e2(0x1b6)]===_0x1bfbaa;_0x347fa4[_0x3f36e2(0x1b5)]({'lockKey':_0x1ef7f1[_0x3f36e2(0x1a0)],'filePath':_0x1ef7f1['filePath'],'remoteId':_0x295c8f?.['remoteId']??null,'mode':_0x295c8f?.[_0x3f36e2(0x17a)]?_0x3f36e2(0x182):_0x3f36e2(0x1a5),'status':!_0x5b138d&&_0x6fcc7d?_0x3f36e2(0x1b2):_0x3f36e2(0x19a)});}return{'method':_0x3f36e2(0x1bb),'url':_0x3f36e2(0x199),'body':{'appCode':_0x449cff[_0x3f36e2(0x1c2)],'force':_0x5b138d,'files':_0x347fa4,'cacheClearAtRuntime':_0x347fa4[_0x3f36e2(0x1a2)](_0x2cbbd4=>_0x2cbbd4['status']===_0x3f36e2(0x19a)),'cacheClearAtRuntimeTimes':_0x347fa4[_0x3f36e2(0x1a2)](_0x56b75e=>_0x56b75e['status']==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x3f36e2(0x1c1)+_0x347fa4['length']+_0x3f36e2(0x1a1)};},async 'execute'(_0x49df16){const _0x10f32e=a36_0x55ae30,_0x5b2e11=loadBffProjectConfig(_0x49df16[_0x10f32e(0x1c2)]),_0x1a2c78=await readBffLockFile(_0x5b2e11['lockFilePath']),{lockData:_0xb0c5eb,appLock:_0x4b96a5}=ensureLockScope(_0x1a2c78??createEmptyBffLock(),_0x49df16[_0x10f32e(0x1c2)],_0x5b2e11[_0x10f32e(0x1bd)],_0x10f32e(0x1b5)),_0x9c80c=await getTargetFunctions(_0x5b2e11,_0x49df16);if(_0x9c80c[_0x10f32e(0x1c8)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x10f32e(0x193)};const _0x519fae=_0x49df16[_0x10f32e(0x194)]('force'),_0x10915c=JSON[_0x10f32e(0x1b9)](JSON[_0x10f32e(0x1a3)](_0xb0c5eb)),_0x156019=_0x10915c['apps'][_0x49df16[_0x10f32e(0x1c2)]];if(!_0x156019)throw new Error(_0x10f32e(0x17b)+_0x49df16[_0x10f32e(0x1c2)]+_0x10f32e(0x190));const _0x30a96b=await buildHookMaps(_0x49df16[_0x10f32e(0x1c2)],_0x49df16['apiDir'],_0x9c80c,_0x156019),_0x30bf10=[],_0x57e1d7=[],_0x2b3b9c=[];for(const _0x1698da of _0x9c80c){const _0x18f6ba=await computeFileHash(_0x1698da['filePath']),_0xa61433=_0x156019[_0x10f32e(0x18e)][_0x1698da[_0x10f32e(0x1a0)]];if(!_0x519fae&&_0xa61433&&_0xa61433[_0x10f32e(0x1b6)]===_0x18f6ba){_0x57e1d7[_0x10f32e(0x1b5)]({'lockKey':_0x1698da[_0x10f32e(0x1a0)],'reason':_0x10f32e(0x1b2)});continue;}try{await uploadSingleFunction(_0x49df16['appCode'],_0x1698da,_0x156019,_0x30a96b);const _0xc0f951=_0x156019['functions'][_0x1698da[_0x10f32e(0x1a0)]];_0x30bf10[_0x10f32e(0x1b5)]({'lockKey':_0x1698da[_0x10f32e(0x1a0)],'remoteId':_0xc0f951?.['remoteId']??0x0});}catch(_0x11b4c2){_0x2b3b9c[_0x10f32e(0x1b5)]({'lockKey':_0x1698da['lockKey'],'error':_0x11b4c2 instanceof Error?_0x11b4c2[_0x10f32e(0x191)]:String(_0x11b4c2)});}}_0x156019[_0x10f32e(0x1cb)]=new Date()[_0x10f32e(0x1a8)](),await writeBffLockFile(_0x5b2e11['lockFilePath'],_0x10915c),await waitForUploadedLockEntries(_0x5b2e11[_0x10f32e(0x17e)],_0x49df16[_0x10f32e(0x1c2)],_0x30bf10[_0x10f32e(0x1af)](_0x5aa369=>_0x5aa369[_0x10f32e(0x1a0)]));let _0xdfe3ff={'attempted':![],'cleared':![]};if(_0x30bf10[_0x10f32e(0x1c8)]>0x0)try{let _0x3f6525='';for(let _0x345a56=0x0;_0x345a56<CACHE_CLEAR_ATTEMPTS;_0x345a56+=0x1){_0x3f6525=await clearBffScriptCache(),_0x345a56<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0xdfe3ff={'attempted':!![],'cleared':!![],'message':_0x3f6525||_0x10f32e(0x192)};}catch(_0x1a12ca){_0xdfe3ff={'attempted':!![],'cleared':![],'error':_0x1a12ca instanceof Error?_0x1a12ca[_0x10f32e(0x191)]:String(_0x1a12ca)};}const _0x55702a=_0x2b3b9c[_0x10f32e(0x1c8)]===0x0&&(_0xdfe3ff['attempted']?_0xdfe3ff['cleared']:!![]),_0x12b586=_0xdfe3ff['attempted']?_0xdfe3ff[_0x10f32e(0x17c)]?_0x10f32e(0x1c3):'runtime\x20cache\x20clear\x20failed':_0x10f32e(0x18b);return{'ok':_0x55702a,'data':{'uploaded':_0x30bf10,'skipped':_0x57e1d7,'failed':_0x2b3b9c,'cacheClear':_0xdfe3ff},'message':_0x10f32e(0x186)+_0x30bf10[_0x10f32e(0x1c8)]+_0x10f32e(0x183)+_0x57e1d7['length']+_0x10f32e(0x196)+_0x2b3b9c[_0x10f32e(0x1c8)]+_0x10f32e(0x197)+_0x12b586};}};async function getTargetFunctions(_0x25200e,_0xcbc451){const _0x262376=a36_0x55ae30,_0xb0869b=_0xcbc451['str'](_0x262376(0x1c6)),_0x53d61e=_0xcbc451['str'](_0x262376(0x1bf)),_0x2154d3=normalizeBffType(_0xb0869b)??undefined;if(_0x53d61e&&!_0x2154d3)throw CliErrors['validation']('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x4d6b7e=await scanLocalBffFunctions(_0x25200e,_0x2154d3);if(_0x53d61e){const _0x4edce5=_0x4d6b7e[_0x262376(0x1b8)](_0x3adbd7=>_0x3adbd7[_0x262376(0x1bf)]===_0x53d61e);if(_0x4edce5[_0x262376(0x1c8)]===0x0)throw CliErrors[_0x262376(0x18c)](_0x262376(0x189)+_0x2154d3+'/'+_0x53d61e);return _0x4edce5;}return _0x4d6b7e;}async function buildHookMaps(_0x2b40bb,_0x430a14,_0x3699dc,_0x4415cd){const _0x2b4d03=a36_0x55ae30,_0x591d14=_0x3699dc[_0x2b4d03(0x1a2)](_0x5a7148=>_0x5a7148['type']===_0x2b4d03(0x19e));if(!_0x591d14)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x5a3a8d=loadAliasMap(_0x430a14,undefined,resolveApiFilePath(_0x430a14,_0x2b40bb)),_0x46acf6=new Map(_0x5a3a8d[_0x2b4d03(0x1af)](_0x2c6f85=>[_0x2c6f85['alias'],_0x2c6f85[_0x2b4d03(0x1c4)]]));for(const _0x1bd21f of Object[_0x2b4d03(0x18f)](_0x4415cd[_0x2b4d03(0x18e)])){_0x1bd21f[_0x2b4d03(0x1c5)]&&_0x1bd21f[_0x2b4d03(0x1c4)]&&!_0x46acf6[_0x2b4d03(0x17d)](_0x1bd21f[_0x2b4d03(0x1c5)])&&_0x46acf6['set'](_0x1bd21f['alias'],_0x1bd21f[_0x2b4d03(0x1c4)]);}const _0x4dafdf=await listDatasets(_0x2b40bb),_0x3fdc3f=new Map(_0x4dafdf[_0x2b4d03(0x1af)](_0x1098f1=>[_0x1098f1[_0x2b4d03(0x195)],_0x1098f1]));return{'aliasToDatasetCode':_0x46acf6,'datasetCodeToDataset':_0x3fdc3f};}async function uploadSingleFunction(_0x84c760,_0x5530ba,_0xa31b4,_0x200d00){const _0x2f6a12=a36_0x55ae30,_0xa25c8f=await readFile(_0x5530ba['filePath'],_0x2f6a12(0x19c)),_0x39dbe0=await computeFileHash(_0x5530ba[_0x2f6a12(0x1a6)]),_0xec5115=_0xa31b4[_0x2f6a12(0x18e)][_0x5530ba[_0x2f6a12(0x1a0)]];if(_0xec5115?.[_0x2f6a12(0x17a)]&&_0xec5115[_0x2f6a12(0x1ba)]==null)throw CliErrors[_0x2f6a12(0x18c)](_0x5530ba[_0x2f6a12(0x1a0)]+_0x2f6a12(0x1b0));let _0x49b046=extractScriptDescription(_0xa25c8f);if(!_0x49b046&&_0xec5115?.[_0x2f6a12(0x17a)]){const _0x23ef45=await getBffScriptInfo(_0xec5115[_0x2f6a12(0x17a)]);_0x49b046=_0x23ef45[_0x2f6a12(0x184)]||undefined;}const _0x7dc96b={'appCode':_0x84c760,'functionName':_0x5530ba[_0x2f6a12(0x1bf)],'scriptType':_0x5530ba[_0x2f6a12(0x1c6)],'scriptContent':_0xa25c8f};if(_0xec5115?.[_0x2f6a12(0x17a)])_0x7dc96b['id']=_0xec5115[_0x2f6a12(0x17a)];if(_0xec5115?.[_0x2f6a12(0x1ba)]!=null)_0x7dc96b[_0x2f6a12(0x1ba)]=_0xec5115[_0x2f6a12(0x1ba)];if(_0x49b046)_0x7dc96b[_0x2f6a12(0x184)]=_0x49b046;if(_0x5530ba['type']===_0x2f6a12(0x19e)){const _0x1f2083=_0x5530ba[_0x2f6a12(0x1c5)];if(!_0x1f2083||!_0x5530ba[_0x2f6a12(0x19b)]||!_0x5530ba[_0x2f6a12(0x185)])throw CliErrors[_0x2f6a12(0x18c)](_0x2f6a12(0x1c0)+_0x5530ba[_0x2f6a12(0x1a0)]);const _0x132229=_0x200d00[_0x2f6a12(0x1ac)][_0x2f6a12(0x1ab)](_0x1f2083)??_0xec5115?.[_0x2f6a12(0x1c4)]??_0x1f2083,_0x2a6458=_0x200d00[_0x2f6a12(0x1b4)]['get'](_0x132229);if(!_0x2a6458)throw CliErrors['validation'](_0x2f6a12(0x1b7)+_0x1f2083+_0x2f6a12(0x1a9)+(_0x2f6a12(0x181)+CLI_BIN_NAME+_0x2f6a12(0x187)));_0x7dc96b['datasetId']=_0x2a6458['id'],_0x7dc96b[_0x2f6a12(0x19b)]=_0x5530ba[_0x2f6a12(0x19b)],_0x7dc96b[_0x2f6a12(0x185)]=_0x5530ba[_0x2f6a12(0x185)];}const _0x4389b8=await saveBffScript(_0x7dc96b),_0x2f5cb7=_0x4389b8['id'],_0x378342=_0x4389b8['script']??await getBffScriptInfo(_0x2f5cb7),_0x2a2673={'hash':_0x39dbe0,'remoteId':_0x2f5cb7,'version':_0x378342[_0x2f6a12(0x1ba)]};if(_0x5530ba['type']===_0x2f6a12(0x19e)){const _0x2b444f=_0x5530ba[_0x2f6a12(0x1c5)],_0x16021a=_0x200d00['aliasToDatasetCode'][_0x2f6a12(0x1ab)](_0x2b444f)??_0xec5115?.[_0x2f6a12(0x1c4)]??_0x2b444f;_0x200d00[_0x2f6a12(0x1ac)][_0x2f6a12(0x17d)](_0x2b444f)?_0x2a2673[_0x2f6a12(0x1c5)]=_0x2b444f:_0x2a2673[_0x2f6a12(0x1c5)]=_0xec5115?.[_0x2f6a12(0x1c5)],_0x2a2673['datasetCode']=_0x16021a,_0x2a2673['operationType']=_0x5530ba['operationType'],_0x2a2673[_0x2f6a12(0x185)]=_0x5530ba[_0x2f6a12(0x185)];}_0xa31b4[_0x2f6a12(0x18e)][_0x5530ba[_0x2f6a12(0x1a0)]]=_0x2a2673;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0xfd6763,_0x5ccc53,_0x58bf32){const _0x38a9c3=a36_0x55ae30;if(_0x58bf32[_0x38a9c3(0x1c8)]===0x0)return;for(let _0x35e2c0=0x0;_0x35e2c0<LOCK_SETTLE_RETRY_COUNT;_0x35e2c0+=0x1){const _0xe5f61e=await readBffLockFile(_0xfd6763),_0x4f8fca=_0xe5f61e?.[_0x38a9c3(0x19d)]?.[_0x5ccc53]?.[_0x38a9c3(0x18e)]??{},_0x49f42b=_0x58bf32['every'](_0x30d276=>!!_0x4f8fca[_0x30d276]?.[_0x38a9c3(0x17a)]);if(_0x49f42b)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0x58bf32[_0x38a9c3(0x1bc)](',\x20')+'.');}function a36_0x204e(_0x5b8bcb,_0x302ebf){_0x5b8bcb=_0x5b8bcb-0x17a;const _0x72f2c2=a36_0x72f2();let _0x204eaf=_0x72f2c2[_0x5b8bcb];return _0x204eaf;}function a36_0x72f2(){const _0x1e1161=['350540tOUbBv','name','Incomplete\x20HOOK\x20path:\x20','Would\x20inspect\x20','appCode','runtime\x20cache\x20cleared','datasetCode','alias','type','490msITIH','length','8xhDHHq','high-risk-write','lastSync','remoteId','Lock\x20scope\x20for\x20app\x20\x22','cleared','has','lockFilePath','force','COMMON','Run\x20`','update','\x20uploaded,\x20','description','functionNode','Push\x20complete:\x20','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','920748TCVzRy','Local\x20function\x20not\x20found:\x20','string','runtime\x20cache\x20not\x20needed','validation','767352GnLdTt','functions','values','\x22\x20not\x20found\x20after\x20ensureLockScope.','message','Runtime\x20script\x20cache\x20cleared.','No\x20local\x20BFF\x20functions\x20found.','bool','code','\x20skipped,\x20','\x20failed,\x20','Force\x20push\x20ignoring\x20hash\x20protection','/api/management/library/scripts/save','would_push','operationType','utf8','apps','HOOK','20211HAIFnB','lockKey','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','some','stringify','ENDPOINT','create','filePath','8GVcoTP','toISOString','\x22.\x20','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','get','aliasToDatasetCode','13401fyoQLm','732389IoaTht','map',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','130653bTLyZW','unchanged','boolean','datasetCodeToDataset','push','hash','Cannot\x20resolve\x20dataset\x20for\x20\x22','filter','parse','version','POST','join','scriptsRoot'];a36_0x72f2=function(){return _0x1e1161;};return a36_0x72f2();}
|
|
1
|
+
const a36_0x59b8d7=a36_0x3d2e;(function(_0x372fc8,_0x2118ff){const _0x2652fb=a36_0x3d2e,_0x161ad5=_0x372fc8();while(!![]){try{const _0x221700=parseInt(_0x2652fb(0x186))/0x1*(parseInt(_0x2652fb(0x168))/0x2)+-parseInt(_0x2652fb(0x17b))/0x3*(-parseInt(_0x2652fb(0x192))/0x4)+-parseInt(_0x2652fb(0x190))/0x5*(-parseInt(_0x2652fb(0x191))/0x6)+-parseInt(_0x2652fb(0x164))/0x7*(parseInt(_0x2652fb(0x1a2))/0x8)+-parseInt(_0x2652fb(0x1ac))/0x9+parseInt(_0x2652fb(0x193))/0xa+-parseInt(_0x2652fb(0x19c))/0xb*(-parseInt(_0x2652fb(0x1b1))/0xc);if(_0x221700===_0x2118ff)break;else _0x161ad5['push'](_0x161ad5['shift']());}catch(_0x133bc1){_0x161ad5['push'](_0x161ad5['shift']());}}}(a36_0x4c5b,0xb8c0e));import{readFile}from'node:fs/promises';function a36_0x3d2e(_0x1bad54,_0x1e6f9e){_0x1bad54=_0x1bad54-0x15d;const _0x4c5b6e=a36_0x4c5b();let _0x3d2e22=_0x4c5b6e[_0x1bad54];return _0x3d2e22;}import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';function a36_0x4c5b(){const _0x181f9a=['datasetCodeToDataset','Push\x20local\x20BFF\x20scripts\x20to\x20remote','length','hash','219985WVVGiI','78jWWOye','85628VFtmPj','9457620GrbuEN','Force\x20push\x20ignoring\x20hash\x20protection','remoteId','set','unchanged','push','ENDPOINT','join','aliasToDatasetCode','688336vRYxNM','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','every','Push\x20complete:\x20','lastSync','lockKey','16vcsnmV','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','map','name','code','stringify','type','apps','Lock\x20scope\x20for\x20app\x20\x22','operationType','13423932IcSzvP','create','update','string','high-risk-write','156jYHNDF','apiDir','version','\x20failed,\x20','\x22.\x20','Would\x20inspect\x20','datasetId','would_push','/api/management/library/scripts/save','force','1459871HmqGjP','utf8','lockFilePath','functions','4BzLTeN','bool','No\x20local\x20BFF\x20functions\x20found.','bff','message','get','values','validation','\x20skipped,\x20','Incomplete\x20HOOK\x20path:\x20','script',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','toISOString','cleared','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','attempted','HOOK','Runtime\x20script\x20cache\x20cleared.','\x20uploaded,\x20','15ldtyjT','some','alias','filePath','has','status','runtime\x20cache\x20not\x20needed','COMMON','Cannot\x20resolve\x20dataset\x20for\x20\x22','\x22\x20not\x20found\x20after\x20ensureLockScope.','scriptsRoot','113579rRwSRp','description','runtime\x20cache\x20clear\x20failed','appCode','functionNode','datasetCode'];a36_0x4c5b=function(){return _0x181f9a;};return a36_0x4c5b();}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':a36_0x59b8d7(0x16b),'command':'push','description':a36_0x59b8d7(0x18d),'risk':a36_0x59b8d7(0x1b0),'flags':[{'name':a36_0x59b8d7(0x1a8),'type':a36_0x59b8d7(0x1af),'description':'Push\x20only\x20this\x20script\x20type','enum':[a36_0x59b8d7(0x182),a36_0x59b8d7(0x199),a36_0x59b8d7(0x178)]},{'name':a36_0x59b8d7(0x1a5),'type':'string','description':a36_0x59b8d7(0x176)},{'name':a36_0x59b8d7(0x163),'type':'boolean','description':a36_0x59b8d7(0x194)}],async 'dryRun'(_0x4913a0){const _0x1e0f49=a36_0x59b8d7,_0x4d2acc=loadBffProjectConfig(_0x4913a0[_0x1e0f49(0x189)]),_0x312587=await readBffLockFile(_0x4d2acc[_0x1e0f49(0x166)]),{appLock:_0xb541e8}=ensureLockScope(_0x312587??createEmptyBffLock(),_0x4913a0['appCode'],_0x4d2acc[_0x1e0f49(0x185)],'push'),_0x54cbc9=await getTargetFunctions(_0x4d2acc,_0x4913a0),_0x4f591f=_0x4913a0[_0x1e0f49(0x169)](_0x1e0f49(0x163)),_0x22c7bc=[];for(const _0x507199 of _0x54cbc9){const _0x4af8b8=await computeFileHash(_0x507199[_0x1e0f49(0x17e)]),_0x3c8d4b=_0xb541e8[_0x1e0f49(0x167)][_0x507199[_0x1e0f49(0x1a1)]],_0x351a53=!!_0x3c8d4b&&_0x3c8d4b[_0x1e0f49(0x18f)]===_0x4af8b8;_0x22c7bc['push']({'lockKey':_0x507199[_0x1e0f49(0x1a1)],'filePath':_0x507199[_0x1e0f49(0x17e)],'remoteId':_0x3c8d4b?.['remoteId']??null,'mode':_0x3c8d4b?.[_0x1e0f49(0x195)]?_0x1e0f49(0x1ae):_0x1e0f49(0x1ad),'status':!_0x4f591f&&_0x351a53?_0x1e0f49(0x197):_0x1e0f49(0x161)});}return{'method':'POST','url':_0x1e0f49(0x162),'body':{'appCode':_0x4913a0[_0x1e0f49(0x189)],'force':_0x4f591f,'files':_0x22c7bc,'cacheClearAtRuntime':_0x22c7bc[_0x1e0f49(0x17c)](_0x4e6e29=>_0x4e6e29[_0x1e0f49(0x180)]===_0x1e0f49(0x161)),'cacheClearAtRuntimeTimes':_0x22c7bc[_0x1e0f49(0x17c)](_0x48b1c8=>_0x48b1c8[_0x1e0f49(0x180)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x1e0f49(0x15f)+_0x22c7bc[_0x1e0f49(0x18e)]+_0x1e0f49(0x19d)};},async 'execute'(_0x50bdd8){const _0x541589=a36_0x59b8d7,_0x22015d=loadBffProjectConfig(_0x50bdd8[_0x541589(0x189)]),_0x22d32b=await readBffLockFile(_0x22015d[_0x541589(0x166)]),{lockData:_0x4a2453,appLock:_0x594d75}=ensureLockScope(_0x22d32b??createEmptyBffLock(),_0x50bdd8[_0x541589(0x189)],_0x22015d[_0x541589(0x185)],'push'),_0x435464=await getTargetFunctions(_0x22015d,_0x50bdd8);if(_0x435464['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x541589(0x16a)};const _0x5b803e=_0x50bdd8['bool'](_0x541589(0x163)),_0x3dfda4=JSON['parse'](JSON[_0x541589(0x1a7)](_0x4a2453)),_0x49712b=_0x3dfda4[_0x541589(0x1a9)][_0x50bdd8[_0x541589(0x189)]];if(!_0x49712b)throw new Error(_0x541589(0x1aa)+_0x50bdd8[_0x541589(0x189)]+_0x541589(0x184));const _0xd91c9f=await buildHookMaps(_0x50bdd8[_0x541589(0x189)],_0x50bdd8[_0x541589(0x1b2)],_0x435464,_0x49712b),_0x2aece9=[],_0x32cf63=[],_0x17daa2=[];for(const _0x34d84d of _0x435464){const _0x3e8c57=await computeFileHash(_0x34d84d['filePath']),_0x3092ff=_0x49712b[_0x541589(0x167)][_0x34d84d[_0x541589(0x1a1)]];if(!_0x5b803e&&_0x3092ff&&_0x3092ff[_0x541589(0x18f)]===_0x3e8c57){_0x32cf63[_0x541589(0x198)]({'lockKey':_0x34d84d['lockKey'],'reason':_0x541589(0x197)});continue;}try{await uploadSingleFunction(_0x50bdd8[_0x541589(0x189)],_0x34d84d,_0x49712b,_0xd91c9f);const _0x3d7197=_0x49712b[_0x541589(0x167)][_0x34d84d['lockKey']];_0x2aece9[_0x541589(0x198)]({'lockKey':_0x34d84d[_0x541589(0x1a1)],'remoteId':_0x3d7197?.[_0x541589(0x195)]??0x0});}catch(_0x4c09b1){_0x17daa2[_0x541589(0x198)]({'lockKey':_0x34d84d[_0x541589(0x1a1)],'error':_0x4c09b1 instanceof Error?_0x4c09b1['message']:String(_0x4c09b1)});}}_0x49712b[_0x541589(0x1a0)]=new Date()[_0x541589(0x174)](),await writeBffLockFile(_0x22015d[_0x541589(0x166)],_0x3dfda4),await waitForUploadedLockEntries(_0x22015d[_0x541589(0x166)],_0x50bdd8[_0x541589(0x189)],_0x2aece9['map'](_0x504c2a=>_0x504c2a[_0x541589(0x1a1)]));let _0x55863f={'attempted':![],'cleared':![]};if(_0x2aece9[_0x541589(0x18e)]>0x0)try{let _0x56d7a9='';for(let _0x31a13e=0x0;_0x31a13e<CACHE_CLEAR_ATTEMPTS;_0x31a13e+=0x1){_0x56d7a9=await clearBffScriptCache(),_0x31a13e<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x55863f={'attempted':!![],'cleared':!![],'message':_0x56d7a9||_0x541589(0x179)};}catch(_0x2c3b44){_0x55863f={'attempted':!![],'cleared':![],'error':_0x2c3b44 instanceof Error?_0x2c3b44[_0x541589(0x16c)]:String(_0x2c3b44)};}const _0x5240f3=_0x17daa2[_0x541589(0x18e)]===0x0&&(_0x55863f[_0x541589(0x177)]?_0x55863f[_0x541589(0x175)]:!![]),_0x175257=_0x55863f[_0x541589(0x177)]?_0x55863f['cleared']?'runtime\x20cache\x20cleared':_0x541589(0x188):_0x541589(0x181);return{'ok':_0x5240f3,'data':{'uploaded':_0x2aece9,'skipped':_0x32cf63,'failed':_0x17daa2,'cacheClear':_0x55863f},'message':_0x541589(0x19f)+_0x2aece9[_0x541589(0x18e)]+_0x541589(0x17a)+_0x32cf63[_0x541589(0x18e)]+_0x541589(0x170)+_0x17daa2[_0x541589(0x18e)]+_0x541589(0x15d)+_0x175257};}};async function getTargetFunctions(_0x3208f1,_0x50737e){const _0x187123=a36_0x59b8d7,_0x33e6e4=_0x50737e['str'](_0x187123(0x1a8)),_0x2a0cf4=_0x50737e['str'](_0x187123(0x1a5)),_0x224a03=normalizeBffType(_0x33e6e4)??undefined;if(_0x2a0cf4&&!_0x224a03)throw CliErrors[_0x187123(0x16f)](_0x187123(0x1a3));const _0x41a173=await scanLocalBffFunctions(_0x3208f1,_0x224a03);if(_0x2a0cf4){const _0xc4f154=_0x41a173['filter'](_0x49b038=>_0x49b038[_0x187123(0x1a5)]===_0x2a0cf4);if(_0xc4f154['length']===0x0)throw CliErrors['validation']('Local\x20function\x20not\x20found:\x20'+_0x224a03+'/'+_0x2a0cf4);return _0xc4f154;}return _0x41a173;}async function buildHookMaps(_0x430f3c,_0x29320d,_0x2ef996,_0x3ce47c){const _0x18aa48=a36_0x59b8d7,_0xa98aee=_0x2ef996[_0x18aa48(0x17c)](_0x596be4=>_0x596be4['type']==='HOOK');if(!_0xa98aee)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x587a6a=loadAliasMap(_0x29320d,undefined,resolveApiFilePath(_0x29320d,_0x430f3c)),_0x5d9c18=new Map(_0x587a6a[_0x18aa48(0x1a4)](_0x326373=>[_0x326373[_0x18aa48(0x17d)],_0x326373[_0x18aa48(0x18b)]]));for(const _0x108521 of Object[_0x18aa48(0x16e)](_0x3ce47c[_0x18aa48(0x167)])){_0x108521['alias']&&_0x108521[_0x18aa48(0x18b)]&&!_0x5d9c18[_0x18aa48(0x17f)](_0x108521[_0x18aa48(0x17d)])&&_0x5d9c18[_0x18aa48(0x196)](_0x108521[_0x18aa48(0x17d)],_0x108521[_0x18aa48(0x18b)]);}const _0x381daa=await listDatasets(_0x430f3c),_0xb1b252=new Map(_0x381daa[_0x18aa48(0x1a4)](_0x59d311=>[_0x59d311[_0x18aa48(0x1a6)],_0x59d311]));return{'aliasToDatasetCode':_0x5d9c18,'datasetCodeToDataset':_0xb1b252};}async function uploadSingleFunction(_0x5c093c,_0x24121f,_0x472c3e,_0x35fe83){const _0x2cf3af=a36_0x59b8d7,_0xbac5cb=await readFile(_0x24121f[_0x2cf3af(0x17e)],_0x2cf3af(0x165)),_0x5d51c0=await computeFileHash(_0x24121f[_0x2cf3af(0x17e)]),_0x2f59bc=_0x472c3e[_0x2cf3af(0x167)][_0x24121f[_0x2cf3af(0x1a1)]];if(_0x2f59bc?.[_0x2cf3af(0x195)]&&_0x2f59bc[_0x2cf3af(0x1b3)]==null)throw CliErrors['validation'](_0x24121f[_0x2cf3af(0x1a1)]+_0x2cf3af(0x173));let _0x3c2d11=extractScriptDescription(_0xbac5cb);if(!_0x3c2d11&&_0x2f59bc?.[_0x2cf3af(0x195)]){const _0x48cfe2=await getBffScriptInfo(_0x2f59bc[_0x2cf3af(0x195)]);_0x3c2d11=_0x48cfe2[_0x2cf3af(0x187)]||undefined;}const _0x5a519e={'appCode':_0x5c093c,'functionName':_0x24121f[_0x2cf3af(0x1a5)],'scriptType':_0x24121f[_0x2cf3af(0x1a8)],'scriptContent':_0xbac5cb};if(_0x2f59bc?.[_0x2cf3af(0x195)])_0x5a519e['id']=_0x2f59bc[_0x2cf3af(0x195)];if(_0x2f59bc?.[_0x2cf3af(0x1b3)]!=null)_0x5a519e['version']=_0x2f59bc[_0x2cf3af(0x1b3)];if(_0x3c2d11)_0x5a519e[_0x2cf3af(0x187)]=_0x3c2d11;if(_0x24121f[_0x2cf3af(0x1a8)]===_0x2cf3af(0x178)){const _0xed1c3c=_0x24121f['alias'];if(!_0xed1c3c||!_0x24121f[_0x2cf3af(0x1ab)]||!_0x24121f[_0x2cf3af(0x18a)])throw CliErrors[_0x2cf3af(0x16f)](_0x2cf3af(0x171)+_0x24121f['lockKey']);const _0x39b734=_0x35fe83[_0x2cf3af(0x19b)][_0x2cf3af(0x16d)](_0xed1c3c)??_0x2f59bc?.[_0x2cf3af(0x18b)]??_0xed1c3c,_0x3ec10c=_0x35fe83[_0x2cf3af(0x18c)]['get'](_0x39b734);if(!_0x3ec10c)throw CliErrors[_0x2cf3af(0x16f)](_0x2cf3af(0x183)+_0xed1c3c+_0x2cf3af(0x15e)+('Run\x20`'+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.'));_0x5a519e[_0x2cf3af(0x160)]=_0x3ec10c['id'],_0x5a519e[_0x2cf3af(0x1ab)]=_0x24121f['operationType'],_0x5a519e['functionNode']=_0x24121f[_0x2cf3af(0x18a)];}const _0x482d9c=await saveBffScript(_0x5a519e),_0x32e18e=_0x482d9c['id'],_0x4263c7=_0x482d9c[_0x2cf3af(0x172)]??await getBffScriptInfo(_0x32e18e),_0x38f0d5={'hash':_0x5d51c0,'remoteId':_0x32e18e,'version':_0x4263c7['version']};if(_0x24121f['type']===_0x2cf3af(0x178)){const _0x39fba2=_0x24121f[_0x2cf3af(0x17d)],_0x1c52c4=_0x35fe83[_0x2cf3af(0x19b)]['get'](_0x39fba2)??_0x2f59bc?.[_0x2cf3af(0x18b)]??_0x39fba2;_0x35fe83[_0x2cf3af(0x19b)][_0x2cf3af(0x17f)](_0x39fba2)?_0x38f0d5[_0x2cf3af(0x17d)]=_0x39fba2:_0x38f0d5[_0x2cf3af(0x17d)]=_0x2f59bc?.[_0x2cf3af(0x17d)],_0x38f0d5[_0x2cf3af(0x18b)]=_0x1c52c4,_0x38f0d5[_0x2cf3af(0x1ab)]=_0x24121f[_0x2cf3af(0x1ab)],_0x38f0d5[_0x2cf3af(0x18a)]=_0x24121f['functionNode'];}_0x472c3e[_0x2cf3af(0x167)][_0x24121f[_0x2cf3af(0x1a1)]]=_0x38f0d5;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x30fc21,_0x21e401,_0x907b28){const _0x3ca012=a36_0x59b8d7;if(_0x907b28[_0x3ca012(0x18e)]===0x0)return;for(let _0x20c970=0x0;_0x20c970<LOCK_SETTLE_RETRY_COUNT;_0x20c970+=0x1){const _0xf514ae=await readBffLockFile(_0x30fc21),_0x59f68b=_0xf514ae?.['apps']?.[_0x21e401]?.[_0x3ca012(0x167)]??{},_0x1015ff=_0x907b28[_0x3ca012(0x19e)](_0x47f55c=>!!_0x59f68b[_0x47f55c]?.[_0x3ca012(0x195)]);if(_0x1015ff)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0x907b28[_0x3ca012(0x19a)](',\x20')+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a37_0x2fb3df=a37_0x1ec7;(function(_0x3e5b71,_0x7abe4a){const _0x909475=a37_0x1ec7,_0x5d0557=_0x3e5b71();while(!![]){try{const _0x4b135e=parseInt(_0x909475(0xce))/0x1*(parseInt(_0x909475(0xcb))/0x2)+-parseInt(_0x909475(0xd2))/0x3*(parseInt(_0x909475(0xcc))/0x4)+-parseInt(_0x909475(0xbe))/0x5*(parseInt(_0x909475(0xda))/0x6)+-parseInt(_0x909475(0xdd))/0x7*(parseInt(_0x909475(0xd1))/0x8)+-parseInt(_0x909475(0xdc))/0x9*(-parseInt(_0x909475(0xc4))/0xa)+parseInt(_0x909475(0xd8))/0xb+parseInt(_0x909475(0xc2))/0xc;if(_0x4b135e===_0x7abe4a)break;else _0x5d0557['push'](_0x5d0557['shift']());}catch(_0x8ecd93){_0x5d0557['push'](_0x5d0557['shift']());}}}(a37_0x1e41,0x7d77e));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';function a37_0x1e41(){const _0x450b21=['all','1759572twWjVy','map','90QXCSDJ','\x20remote-only','bff','boolean','bool','lockFilePath','functions','2efKTBn','544oPXeqf','All\x20BFF\x20scripts\x20are\x20in\x20sync.','654745eOzQhC','status','lockKey','2641208XATKLK','20073cnqhre','read','appCode','push','length','\x20modified,\x20','9019703IXbFiP','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','605976vjHTQc','filePath','664839iAspbi','14PjhNMU','apiDir','hash','10fFYmzp','remote','scriptsRoot'];a37_0x1e41=function(){return _0x450b21;};return a37_0x1e41();}import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';function a37_0x1ec7(_0x313010,_0x4279ef){_0x313010=_0x313010-0xbe;const _0x1e419a=a37_0x1e41();let _0x1ec767=_0x1e419a[_0x313010];return _0x1ec767;}import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a37_0x2fb3df(0xc6),'command':a37_0x2fb3df(0xcf),'description':'Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','risk':a37_0x2fb3df(0xd3),'flags':[{'name':a37_0x2fb3df(0xbf),'type':a37_0x2fb3df(0xc7),'description':a37_0x2fb3df(0xd9)}],async 'execute'(_0x163753){const _0x2bbd07=a37_0x2fb3df,_0x5b4d63=loadBffProjectConfig(_0x163753[_0x2bbd07(0xd4)]),_0x112e5d=await readBffLockFile(_0x5b4d63[_0x2bbd07(0xc9)]),{appLock:_0x2dc796}=ensureLockScope(_0x112e5d??createEmptyBffLock(),_0x163753['appCode'],_0x5b4d63[_0x2bbd07(0xc0)],'status'),_0x1200aa=await scanLocalBffFunctions(_0x5b4d63),_0x30e918=[],_0x24cd45=[],_0xaa8693=[];for(const _0x236798 of _0x1200aa){const _0x310802=await computeFileHash(_0x236798[_0x2bbd07(0xdb)]),_0x6f5ff6=_0x2dc796[_0x2bbd07(0xca)][_0x236798[_0x2bbd07(0xd0)]];if(!_0x6f5ff6)_0x30e918['push'](_0x236798[_0x2bbd07(0xd0)]);else _0x6f5ff6[_0x2bbd07(0xdf)]!==_0x310802?_0x24cd45[_0x2bbd07(0xd5)](_0x236798[_0x2bbd07(0xd0)]):_0xaa8693[_0x2bbd07(0xd5)](_0x236798['lockKey']);}const _0x11f14d=[];if(_0x163753[_0x2bbd07(0xc8)](_0x2bbd07(0xbf))){const _0x1c4904=loadAliasMap(_0x163753['apiDir'],undefined,resolveApiFilePath(_0x163753[_0x2bbd07(0xde)],_0x163753[_0x2bbd07(0xd4)])),_0x59917c=new Map(_0x1c4904[_0x2bbd07(0xc3)](_0x2ccd2a=>[_0x2ccd2a['datasetCode'],_0x2ccd2a['alias']])),[_0x54622d,_0x5572ec]=await Promise[_0x2bbd07(0xc1)]([listBffScripts(_0x163753[_0x2bbd07(0xd4)]),getBffScriptStatistics(_0x163753[_0x2bbd07(0xd4)])]),_0x37588e=createHookLocationMap(_0x5572ec),_0x4d7d41=new Set(_0x1200aa['map'](_0x183c7f=>_0x183c7f['lockKey']));for(const _0x4472a3 of _0x54622d){const _0x25e94c=resolveRemoteScriptTarget(_0x5b4d63,_0x4472a3,_0x37588e,_0x2dc796[_0x2bbd07(0xca)],_0x59917c);_0x25e94c&&!_0x4d7d41['has'](_0x25e94c[_0x2bbd07(0xd0)])&&_0x11f14d[_0x2bbd07(0xd5)](_0x25e94c[_0x2bbd07(0xd0)]);}}const _0x33f1de=_0x30e918[_0x2bbd07(0xd6)]===0x0&&_0x24cd45[_0x2bbd07(0xd6)]===0x0&&_0x11f14d[_0x2bbd07(0xd6)]===0x0;return{'ok':!![],'data':{'added':_0x30e918,'modified':_0x24cd45,'unchanged':_0xaa8693,'remoteOnly':_0x11f14d},'message':_0x33f1de?_0x2bbd07(0xcd):_0x30e918[_0x2bbd07(0xd6)]+'\x20added,\x20'+_0x24cd45[_0x2bbd07(0xd6)]+_0x2bbd07(0xd7)+_0xaa8693[_0x2bbd07(0xd6)]+'\x20unchanged'+(_0x11f14d[_0x2bbd07(0xd6)]>0x0?',\x20'+_0x11f14d['length']+_0x2bbd07(0xc5):'')};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a38_0x1bb7(){const _0x1284cd=['installedPath','4620732luSZoL','cli-skill-install','80AVRrCH','cli-skill','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','\x20at\x20','116787sEjFWP','changed','setLogPath','repairCommand','196956WpPmPh','inherit','\x20is\x20already\x20current','log','CLI\x20Built-in\x20Skill\x20','cwd',']:\x20','skillVersion','3065398CPYGIM','apiError','read','code','3074436rfzLYo','install','32043344jTXdMM','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','611430XmYzGM','error','\x20installed','Built-in\x20Skill\x20install\x20failed\x20[','info'];a38_0x1bb7=function(){return _0x1284cd;};return a38_0x1bb7();}const a38_0x20f492=a38_0x169b;(function(_0x2202bb,_0x37ebc3){const _0x309c32=a38_0x169b,_0x12f469=_0x2202bb();while(!![]){try{const _0x1c286f=parseInt(_0x309c32(0x8b))/0x1+-parseInt(_0x309c32(0x7b))/0x2+parseInt(_0x309c32(0x7f))/0x3+parseInt(_0x309c32(0x6f))/0x4*(-parseInt(_0x309c32(0x87))/0x5)+-parseInt(_0x309c32(0x85))/0x6+-parseInt(_0x309c32(0x77))/0x7+parseInt(_0x309c32(0x7d))/0x8;if(_0x1c286f===_0x37ebc3)break;else _0x12f469['push'](_0x12f469['shift']());}catch(_0x1cd1fb){_0x12f469['push'](_0x12f469['shift']());}}}(a38_0x1bb7,0xc1969));import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';function a38_0x169b(_0x2bb2d8,_0x4be607){_0x2bb2d8=_0x2bb2d8-0x6e;const _0x1bb73d=a38_0x1bb7();let _0x169b1b=_0x1bb73d[_0x2bb2d8];return _0x169b1b;}import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a38_0x20f492(0x88),'command':a38_0x20f492(0x7c),'description':a38_0x20f492(0x7e),'risk':a38_0x20f492(0x79),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x56c14b){const _0x522cae=a38_0x20f492;logger[_0x522cae(0x8d)](process[_0x522cae(0x74)]()),logger[_0x522cae(0x83)](_0x522cae(0x86),'Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.');const _0x33166f=installBuiltinSkill({'stdio':_0x56c14b['nonInteractive']?'pipe':_0x522cae(0x70)});if(!_0x33166f['ok'])throw CliErrors[_0x522cae(0x78)](_0x522cae(0x82)+_0x33166f[_0x522cae(0x7a)]+_0x522cae(0x75)+(_0x33166f[_0x522cae(0x80)]||'unknown'),_0x522cae(0x89)+_0x33166f[_0x522cae(0x6e)]);return console[_0x522cae(0x72)](_0x33166f[_0x522cae(0x8c)]?'CLI\x20Built-in\x20Skill\x20'+_0x33166f[_0x522cae(0x76)]+_0x522cae(0x81)+(_0x33166f[_0x522cae(0x84)]?'\x20at\x20'+_0x33166f[_0x522cae(0x84)]:'\x20via\x20skills@latest'):_0x522cae(0x73)+_0x33166f[_0x522cae(0x76)]+_0x522cae(0x71)+(_0x33166f['installedPath']?_0x522cae(0x8a)+_0x33166f[_0x522cae(0x84)]:'')),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a39_0x2ad843=a39_0x1a85;(function(_0x21d668,_0xc67619){const _0x49105c=a39_0x1a85,_0x7cb0e3=_0x21d668();while(!![]){try{const _0x2ce657=parseInt(_0x49105c(0x224))/0x1*(-parseInt(_0x49105c(0x22a))/0x2)+-parseInt(_0x49105c(0x203))/0x3+-parseInt(_0x49105c(0x1f5))/0x4*(-parseInt(_0x49105c(0x1fe))/0x5)+-parseInt(_0x49105c(0x1f4))/0x6+parseInt(_0x49105c(0x217))/0x7+-parseInt(_0x49105c(0x22b))/0x8+parseInt(_0x49105c(0x223))/0x9*(parseInt(_0x49105c(0x1f8))/0xa);if(_0x2ce657===_0xc67619)break;else _0x7cb0e3['push'](_0x7cb0e3['shift']());}catch(_0x348f00){_0x7cb0e3['push'](_0x7cb0e3['shift']());}}}(a39_0x9d13,0x7a814));import a39_0x476aa0 from'chalk';import a39_0x392902 from'ora';function a39_0x1a85(_0x126a81,_0x2db9b8){_0x126a81=_0x126a81-0x1e1;const _0x9d1372=a39_0x9d13();let _0x1a8563=_0x9d1372[_0x126a81];return _0x1a8563;}import a39_0x54f4ee 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 _0x18eeaa=a39_0x1a85;return GIT_COMMIT!==_0x18eeaa(0x1eb)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x18eeaa(0x1f9)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x24eff8=a39_0x1a85,_0x4c15c8=process['execPath']['toLowerCase']();if(_0x4c15c8['includes'](_0x24eff8(0x1ed)))return'bun';return _0x24eff8(0x1f0);}const updateFlags=[{'name':a39_0x2ad843(0x207),'type':'boolean','description':a39_0x2ad843(0x202),'default':![]},{'name':'version','type':a39_0x2ad843(0x225),'description':a39_0x2ad843(0x20e)}];function getRequestedVersion(_0x3df882){const _0x74a468=a39_0x2ad843;return _0x3df882[_0x74a468(0x21a)]('version')[_0x74a468(0x1e1)]();}async function validateUpdateFlags(_0x30bb7d){const _0xb9c4cf=a39_0x2ad843,_0x335987=_0x30bb7d[_0xb9c4cf(0x1fa)]('beta'),_0x2c8fb2=getRequestedVersion(_0x30bb7d);if(_0x335987&&_0x2c8fb2)throw CliErrors[_0xb9c4cf(0x228)](_0xb9c4cf(0x1fb),_0xb9c4cf(0x205));if(_0x2c8fb2&&!a39_0x54f4ee[_0xb9c4cf(0x209)](_0x2c8fb2))throw CliErrors['validation'](_0xb9c4cf(0x1f6)+_0x2c8fb2,_0xb9c4cf(0x21f));}async function fetchNpmDistTags(){const _0x581718=a39_0x2ad843;try{const _0x401f15=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+_0x581718(0x1e3),{'signal':AbortSignal[_0x581718(0x20f)](0x2710)});if(!_0x401f15['ok'])return null;const _0x54aeb3=await _0x401f15['json']();if(!_0x54aeb3||typeof _0x54aeb3!==_0x581718(0x213))return null;return Object[_0x581718(0x21e)](Object[_0x581718(0x210)](_0x54aeb3)[_0x581718(0x1f7)](([,_0x5292b8])=>typeof _0x5292b8===_0x581718(0x225)&&_0x5292b8[_0x581718(0x1e1)]()[_0x581718(0x1ea)]>0x0)[_0x581718(0x222)](([_0xa29aa5,_0x52bc5f])=>[_0xa29aa5,String(_0x52bc5f)['trim']()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x4d4f7f){const _0x4b0f8c=await fetchNpmDistTags();return _0x4b0f8c?.[_0x4d4f7f]??null;}async function fetchLatestVersion(){const _0x427dc3=a39_0x2ad843;return fetchNpmDistTagVersion(_0x427dc3(0x1ef));}function a39_0x9d13(){const _0x190467=['error','Current\x20version:\x20','trim','\x20\x20Run\x20manually:\x20','/dist-tags','Updating\x20via\x20',',\x20found\x20','red','gray','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','succeed','length','unknown','\x20\x20CLI\x20Built-in\x20Skill\x20','bun','warn','latest','npm','start','\x20install\x20-g\x20','state','551976vWzIlq','16VXmrbV','Invalid\x20version:\x20','filter','7740690IYzvxl','slice','bool','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','version','Beta\x20version:\x20','70EFntuO','Updated\x20to\x20v','skillVersion','\x20→\x20','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','2185128JsVISd','Update\x20failed','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','pipe','beta','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','valid','\x20\x20Try\x20manually:\x20','run','Version\x20comparison\x20failed','install','Install\x20a\x20specific\x20CLI\x20version','timeout','entries','\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20','log','object','green','current','yellow','3080273wytGcw','...','source','str','fail','expected\x20','\x20is\x20up\x20to\x20date.','fromEntries','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.',']:\x20','read','map','27ptukYe','677FlPuIB','string','Update\x20available:\x20','code','validation','info','1998lkQEzD','6110616vXnodF','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm'];a39_0x9d13=function(){return _0x190467;};return a39_0x9d13();}async function resolveTargetVersion(_0x2e4709){const _0x38e69d=a39_0x2ad843,_0x4b8274=getRequestedVersion(_0x2e4709);if(_0x4b8274)return{'version':_0x4b8274,'source':_0x38e69d(0x1fc)};if(_0x2e4709[_0x38e69d(0x1fa)](_0x38e69d(0x207))){const _0x47fadf=await fetchNpmDistTagVersion(_0x38e69d(0x207));if(!_0x47fadf)return null;return{'version':_0x47fadf,'source':_0x38e69d(0x207)};}const _0xbeb460=await fetchLatestVersion();if(!_0xbeb460)return null;return{'version':_0xbeb460,'source':_0x38e69d(0x1ef)};}function shouldInstallTarget(_0x50cb59,_0x105f16){const _0x37a509=a39_0x2ad843;if(_0x105f16[_0x37a509(0x219)]===_0x37a509(0x1fc)||_0x105f16[_0x37a509(0x219)]===_0x37a509(0x207))return!a39_0x54f4ee['eq'](_0x50cb59,_0x105f16[_0x37a509(0x1fc)]);return a39_0x54f4ee['lt'](_0x50cb59,_0x105f16[_0x37a509(0x1fc)]);}function getInstallPlanLabel(_0x42c424,_0x24bcb6){const _0x512572=a39_0x2ad843;switch(_0x24bcb6[_0x512572(0x219)]){case _0x512572(0x207):return _0x512572(0x1fd)+a39_0x476aa0[_0x512572(0x216)](_0x42c424)+_0x512572(0x201)+a39_0x476aa0[_0x512572(0x214)](_0x24bcb6[_0x512572(0x1fc)]);case _0x512572(0x1fc):return'Requested\x20version:\x20'+a39_0x476aa0[_0x512572(0x216)](_0x42c424)+'\x20→\x20'+a39_0x476aa0[_0x512572(0x214)](_0x24bcb6[_0x512572(0x1fc)]);case _0x512572(0x1ef):default:return _0x512572(0x226)+a39_0x476aa0[_0x512572(0x216)](_0x42c424)+'\x20→\x20'+a39_0x476aa0[_0x512572(0x214)](_0x24bcb6[_0x512572(0x1fc)]);}}function repairCurrentBuiltinSkill(){const _0x2b0ac8=a39_0x2ad843;console[_0x2b0ac8(0x212)](a39_0x476aa0[_0x2b0ac8(0x1e7)]('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x4a8f55=installBuiltinSkill();if(_0x4a8f55['ok'])return console[_0x2b0ac8(0x212)](a39_0x476aa0[_0x2b0ac8(0x1e7)]('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x4a8f55[_0x2b0ac8(0x200)]+_0x2b0ac8(0x21d))),!![];return console['warn'](a39_0x476aa0[_0x2b0ac8(0x216)]('\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20['+_0x4a8f55[_0x2b0ac8(0x227)]+_0x2b0ac8(0x220)+(_0x4a8f55[_0x2b0ac8(0x22d)]||'unknown'))),console['log'](a39_0x476aa0['gray'](_0x2b0ac8(0x1e2)+CLI_BIN_NAME+'\x20cli-skill\x20install')),![];}function verifyUpdatedBuiltinSkill(_0x3e3503){const _0x43b271=a39_0x2ad843,_0xb850d=inspectInstalledBuiltinSkillVersion(_0x3e3503);if(_0xb850d[_0x43b271(0x1f3)]===_0x43b271(0x215))return console[_0x43b271(0x212)](a39_0x476aa0['gray'](_0x43b271(0x1ec)+_0x3e3503+_0x43b271(0x21d))),!![];const _0x4bcec4=_0xb850d[_0x43b271(0x200)]?'expected\x20'+_0x3e3503+_0x43b271(0x1e5)+_0xb850d['skillVersion']:_0x43b271(0x21c)+_0x3e3503+',\x20state\x20'+_0xb850d[_0x43b271(0x1f3)];return console[_0x43b271(0x1ee)](a39_0x476aa0[_0x43b271(0x216)](_0x43b271(0x211)+_0x4bcec4)),console[_0x43b271(0x212)](a39_0x476aa0[_0x43b271(0x1e7)](_0x43b271(0x1e2)+_0xb850d['repairCommand'])),![];}async function execute(_0x28b220){const _0xdae04f=a39_0x2ad843;await validateUpdateFlags(_0x28b220);const _0x4b4a33=getCurrentVersion();console[_0xdae04f(0x212)](_0xdae04f(0x22e)+_0x4b4a33);const _0x25ac76=a39_0x392902('Checking\x20for\x20updates...')[_0xdae04f(0x1f1)](),_0x3be4d6=await resolveTargetVersion(_0x28b220);if(!_0x3be4d6){const _0x395240=_0x28b220[_0xdae04f(0x1fa)](_0xdae04f(0x207))?_0xdae04f(0x22c):_0xdae04f(0x208);return _0x25ac76[_0xdae04f(0x21b)](_0x395240),console['log'](a39_0x476aa0[_0xdae04f(0x1e7)]('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x395240};}const _0x20a16c=a39_0x54f4ee[_0xdae04f(0x209)](VERSION),_0x436122=a39_0x54f4ee[_0xdae04f(0x209)](_0x3be4d6[_0xdae04f(0x1fc)]);if(!_0x20a16c||!_0x436122)return _0x25ac76['fail'](_0xdae04f(0x20c)),{'ok':![],'message':_0xdae04f(0x20c)};if(!shouldInstallTarget(_0x20a16c,_0x3be4d6)){const _0x320462=_0x3be4d6[_0xdae04f(0x219)]===_0xdae04f(0x1fc)?'Already\x20on\x20requested\x20version\x20(v'+_0x3be4d6[_0xdae04f(0x1fc)]+')':'Already\x20up\x20to\x20date\x20(v'+_0x3be4d6['version']+')';return _0x25ac76['succeed'](_0x320462),{'ok':repairCurrentBuiltinSkill()};}_0x25ac76[_0xdae04f(0x229)](getInstallPlanLabel(_0x4b4a33,_0x3be4d6));const _0x2d1e15=detectPackageManager(),_0xbd18be=_0x2d1e15===_0xdae04f(0x1f0)?resolveNpmBin(_0xdae04f(0x1f0)):_0x2d1e15,_0x1e0c61=a39_0x392902(_0xdae04f(0x1e4)+_0x2d1e15+_0xdae04f(0x218))['start']();try{return await execa(_0xbd18be,[_0xdae04f(0x20d),'-g',NPM_PACKAGE_NAME+'@'+_0x3be4d6[_0xdae04f(0x1fc)]],{'stdio':_0xdae04f(0x206)}),_0x1e0c61[_0xdae04f(0x1e9)](_0xdae04f(0x1ff)+_0x3be4d6['version']),console[_0xdae04f(0x212)](a39_0x476aa0[_0xdae04f(0x1e7)](_0xdae04f(0x1e8))),{'ok':verifyUpdatedBuiltinSkill(_0x3be4d6[_0xdae04f(0x1fc)])};}catch(_0x5f09f2){return _0x1e0c61['fail'](_0xdae04f(0x204)),console[_0xdae04f(0x22d)](a39_0x476aa0[_0xdae04f(0x1e6)]('\x20\x20'+_0x5f09f2['message'])),console[_0xdae04f(0x212)](a39_0x476aa0[_0xdae04f(0x1e7)](_0xdae04f(0x20a)+_0x2d1e15+_0xdae04f(0x1f2)+NPM_PACKAGE_NAME+'@'+_0x3be4d6[_0xdae04f(0x1fc)])),{'ok':![],'message':_0x5f09f2['message']};}}export const updateDefinition={'service':'update','command':a39_0x2ad843(0x20b),'description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':a39_0x2ad843(0x221),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a39_0x5bdd11=a39_0x4600;(function(_0x2854a2,_0xb237fb){const _0x20e6f2=a39_0x4600,_0x540a92=_0x2854a2();while(!![]){try{const _0x344e3c=-parseInt(_0x20e6f2(0xf7))/0x1*(-parseInt(_0x20e6f2(0xf0))/0x2)+parseInt(_0x20e6f2(0xf5))/0x3+parseInt(_0x20e6f2(0xf8))/0x4+-parseInt(_0x20e6f2(0xf3))/0x5+parseInt(_0x20e6f2(0x131))/0x6*(-parseInt(_0x20e6f2(0x115))/0x7)+parseInt(_0x20e6f2(0x135))/0x8+-parseInt(_0x20e6f2(0xe9))/0x9;if(_0x344e3c===_0xb237fb)break;else _0x540a92['push'](_0x540a92['shift']());}catch(_0x2d9c57){_0x540a92['push'](_0x540a92['shift']());}}}(a39_0x38d9,0x2ae89));import a39_0x3020ab from'chalk';import a39_0x1f7c8a from'ora';import a39_0x1c8dac 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';function a39_0x4600(_0x18441f,_0xa0e72){_0x18441f=_0x18441f-0xe9;const _0x38d93d=a39_0x38d9();let _0x460027=_0x38d93d[_0x18441f];return _0x460027;}import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x373b1a=a39_0x4600;return GIT_COMMIT!==_0x373b1a(0x12f)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x46ba36=a39_0x4600,_0x24293b=process[_0x46ba36(0x107)]['toLowerCase']();if(_0x24293b['includes'](_0x46ba36(0xfa)))return'bun';return _0x46ba36(0x12a);}const updateFlags=[{'name':a39_0x5bdd11(0xf1),'type':a39_0x5bdd11(0x104),'description':a39_0x5bdd11(0xec),'default':![]},{'name':a39_0x5bdd11(0x10b),'type':a39_0x5bdd11(0x132),'description':a39_0x5bdd11(0x10e)}];function getRequestedVersion(_0x513389){const _0x2cf718=a39_0x5bdd11;return _0x513389['str'](_0x2cf718(0x10b))['trim']();}function a39_0x38d9(){const _0x3603c0=['Updated\x20to\x20v','fromEntries','version','trim','source','Install\x20a\x20specific\x20CLI\x20version','code','valid','\x20\x20Run\x20manually:\x20','error','\x20\x20Try\x20manually:\x20','object','267477EqxXNU','length','current','log','yellow','gray','Update\x20failed','Checking\x20for\x20updates...','\x20cli-skill\x20install','pipe','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','Updating\x20via\x20','\x20\x20CLI\x20Built-in\x20Skill\x20','latest','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','bool','\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','fail',',\x20state\x20','message','npm','Beta\x20version:\x20','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','warn','start','unknown','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','6YyPGnx','string','info','Already\x20up\x20to\x20date\x20(v','1631152VSSgcm','/dist-tags','\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20','timeout','\x20→\x20','4516920BUfupH','skillVersion','state','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','Requested\x20version:\x20','@latest','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','8342EGxTtL','beta',',\x20found\x20','1468255ZuuoUs','Version\x20comparison\x20failed','726726jPUjFr','Invalid\x20version:\x20','53ULvJGQ','1369184chKPIx','succeed','bun','read','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','filter','Checking\x20CLI\x20Built-in\x20Skill...','validation','...',']:\x20','green','entries','boolean','run','expected\x20','execPath','Already\x20on\x20requested\x20version\x20(v'];a39_0x38d9=function(){return _0x3603c0;};return a39_0x38d9();}async function validateUpdateFlags(_0x59d3aa){const _0x5b7302=a39_0x5bdd11,_0x194137=_0x59d3aa['bool'](_0x5b7302(0xf1)),_0x2af021=getRequestedVersion(_0x59d3aa);if(_0x194137&&_0x2af021)throw CliErrors[_0x5b7302(0xff)](_0x5b7302(0x124),_0x5b7302(0x11f));if(_0x2af021&&!a39_0x1c8dac[_0x5b7302(0x110)](_0x2af021))throw CliErrors[_0x5b7302(0xff)](_0x5b7302(0xf6)+_0x2af021,_0x5b7302(0xef));}async function fetchNpmDistTags(){const _0x3e34ba=a39_0x5bdd11;try{const _0x1bcb69=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+_0x3e34ba(0x136),{'signal':AbortSignal[_0x3e34ba(0x138)](0x2710)});if(!_0x1bcb69['ok'])return null;const _0xc8e46d=await _0x1bcb69['json']();if(!_0xc8e46d||typeof _0xc8e46d!==_0x3e34ba(0x114))return null;return Object[_0x3e34ba(0x10a)](Object[_0x3e34ba(0x103)](_0xc8e46d)[_0x3e34ba(0xfd)](([,_0x3d281f])=>typeof _0x3d281f==='string'&&_0x3d281f[_0x3e34ba(0x10c)]()[_0x3e34ba(0x116)]>0x0)['map'](([_0x4fb9f1,_0x21a742])=>[_0x4fb9f1,String(_0x21a742)[_0x3e34ba(0x10c)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x4f89cf){const _0x24764d=await fetchNpmDistTags();return _0x24764d?.[_0x4f89cf]??null;}async function fetchLatestVersion(){const _0x207d56=a39_0x5bdd11;return fetchNpmDistTagVersion(_0x207d56(0x122));}async function resolveTargetVersion(_0x145299){const _0x54967a=a39_0x5bdd11,_0x3c8983=getRequestedVersion(_0x145299);if(_0x3c8983)return{'version':_0x3c8983,'source':_0x54967a(0x10b)};if(_0x145299[_0x54967a(0x125)](_0x54967a(0xf1))){const _0x393a31=await fetchNpmDistTagVersion(_0x54967a(0xf1));if(!_0x393a31)return null;return{'version':_0x393a31,'source':'beta'};}const _0x2c728d=await fetchLatestVersion();if(!_0x2c728d)return null;return{'version':_0x2c728d,'source':_0x54967a(0x122)};}function shouldInstallTarget(_0x38f057,_0x409c8c){const _0x52d2b2=a39_0x5bdd11;if(_0x409c8c[_0x52d2b2(0x10d)]===_0x52d2b2(0x10b)||_0x409c8c[_0x52d2b2(0x10d)]==='beta')return!a39_0x1c8dac['eq'](_0x38f057,_0x409c8c[_0x52d2b2(0x10b)]);return a39_0x1c8dac['lt'](_0x38f057,_0x409c8c['version']);}function getInstallPlanLabel(_0x4fcdbf,_0x3fec94){const _0x338888=a39_0x5bdd11;switch(_0x3fec94[_0x338888(0x10d)]){case _0x338888(0xf1):return _0x338888(0x12b)+a39_0x3020ab[_0x338888(0x119)](_0x4fcdbf)+_0x338888(0x139)+a39_0x3020ab[_0x338888(0x102)](_0x3fec94[_0x338888(0x10b)]);case _0x338888(0x10b):return _0x338888(0xed)+a39_0x3020ab[_0x338888(0x119)](_0x4fcdbf)+'\x20→\x20'+a39_0x3020ab[_0x338888(0x102)](_0x3fec94[_0x338888(0x10b)]);case _0x338888(0x122):default:return'Update\x20available:\x20'+a39_0x3020ab['yellow'](_0x4fcdbf)+'\x20→\x20'+a39_0x3020ab[_0x338888(0x102)](_0x3fec94[_0x338888(0x10b)]);}}function repairCurrentBuiltinSkill(){const _0x38f338=a39_0x5bdd11;console[_0x38f338(0x118)](a39_0x3020ab[_0x38f338(0x11a)](_0x38f338(0xfe)));const _0x47220c=installBuiltinSkill();if(_0x47220c['ok'])return console[_0x38f338(0x118)](a39_0x3020ab['gray'](_0x38f338(0x121)+_0x47220c[_0x38f338(0xea)]+'\x20is\x20up\x20to\x20date.')),!![];return console[_0x38f338(0x12d)](a39_0x3020ab[_0x38f338(0x119)](_0x38f338(0x126)+_0x47220c[_0x38f338(0x10f)]+_0x38f338(0x101)+(_0x47220c[_0x38f338(0x112)]||_0x38f338(0x12f)))),console['log'](a39_0x3020ab[_0x38f338(0x11a)](_0x38f338(0x111)+CLI_BIN_NAME+_0x38f338(0x11d))),![];}function verifyUpdatedBuiltinSkill(_0x5d9dbc){const _0x4eec31=a39_0x5bdd11,_0x1c755d=inspectInstalledBuiltinSkillVersion(_0x5d9dbc);if(_0x1c755d[_0x4eec31(0xeb)]===_0x4eec31(0x117))return console[_0x4eec31(0x118)](a39_0x3020ab['gray'](_0x4eec31(0x121)+_0x5d9dbc+'\x20is\x20up\x20to\x20date.')),!![];const _0xe4b39d=_0x1c755d['skillVersion']?'expected\x20'+_0x5d9dbc+_0x4eec31(0xf2)+_0x1c755d[_0x4eec31(0xea)]:_0x4eec31(0x106)+_0x5d9dbc+_0x4eec31(0x128)+_0x1c755d[_0x4eec31(0xeb)];return console['warn'](a39_0x3020ab[_0x4eec31(0x119)](_0x4eec31(0x137)+_0xe4b39d)),console[_0x4eec31(0x118)](a39_0x3020ab['gray'](_0x4eec31(0x111)+_0x1c755d['repairCommand'])),![];}async function execute(_0x5c8283){const _0x31e770=a39_0x5bdd11;await validateUpdateFlags(_0x5c8283);const _0x299a9c=getCurrentVersion();console['log']('Current\x20version:\x20'+_0x299a9c);const _0x3a53cb=a39_0x1f7c8a(_0x31e770(0x11c))[_0x31e770(0x12e)](),_0x55f082=await resolveTargetVersion(_0x5c8283);if(!_0x55f082){const _0x21afe6=_0x5c8283[_0x31e770(0x125)](_0x31e770(0xf1))?_0x31e770(0x123):_0x31e770(0xfc);return _0x3a53cb[_0x31e770(0x127)](_0x21afe6),console[_0x31e770(0x118)](a39_0x3020ab[_0x31e770(0x11a)](_0x31e770(0x12c)+NPM_PACKAGE_NAME+_0x31e770(0xee))),{'ok':![],'message':_0x21afe6};}const _0x4e86f8=a39_0x1c8dac[_0x31e770(0x110)](VERSION),_0x4a56f6=a39_0x1c8dac[_0x31e770(0x110)](_0x55f082['version']);if(!_0x4e86f8||!_0x4a56f6)return _0x3a53cb[_0x31e770(0x127)](_0x31e770(0xf4)),{'ok':![],'message':_0x31e770(0xf4)};if(!shouldInstallTarget(_0x4e86f8,_0x55f082)){const _0x35c750=_0x55f082[_0x31e770(0x10d)]===_0x31e770(0x10b)?_0x31e770(0x108)+_0x55f082['version']+')':_0x31e770(0x134)+_0x55f082[_0x31e770(0x10b)]+')';return _0x3a53cb[_0x31e770(0xf9)](_0x35c750),{'ok':repairCurrentBuiltinSkill()};}_0x3a53cb[_0x31e770(0x133)](getInstallPlanLabel(_0x299a9c,_0x55f082));const _0x2bf08d=detectPackageManager(),_0x2117ed=_0x2bf08d===_0x31e770(0x12a)?resolveNpmBin('npm'):_0x2bf08d,_0x37b7a4=a39_0x1f7c8a(_0x31e770(0x120)+_0x2bf08d+_0x31e770(0x100))[_0x31e770(0x12e)]();try{return await execa(_0x2117ed,['install','-g',NPM_PACKAGE_NAME+'@'+_0x55f082[_0x31e770(0x10b)]],{'stdio':_0x31e770(0x11e)}),_0x37b7a4[_0x31e770(0xf9)](_0x31e770(0x109)+_0x55f082[_0x31e770(0x10b)]),console[_0x31e770(0x118)](a39_0x3020ab['gray'](_0x31e770(0x130))),{'ok':verifyUpdatedBuiltinSkill(_0x55f082[_0x31e770(0x10b)])};}catch(_0x1fb55a){return _0x37b7a4[_0x31e770(0x127)](_0x31e770(0x11b)),console[_0x31e770(0x112)](a39_0x3020ab['red']('\x20\x20'+_0x1fb55a[_0x31e770(0x129)])),console[_0x31e770(0x118)](a39_0x3020ab['gray'](_0x31e770(0x113)+_0x2bf08d+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x55f082[_0x31e770(0x10b)])),{'ok':![],'message':_0x1fb55a[_0x31e770(0x129)]};}}export const updateDefinition={'service':'update','command':a39_0x5bdd11(0x105),'description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':a39_0x5bdd11(0xfb),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a40_0xda2f(){const _0x464c1a=['10SpzplW','623uazjRv','46243WPtdwn','12708058xUxCoJ','111384SahkvH','51193128TOeTal','5tZaimP','7945374fEFlfq','4197807gKWxvb','4HqZQjU','18KCmNGC','13689486XshMTz'];a40_0xda2f=function(){return _0x464c1a;};return a40_0xda2f();}function a40_0x51b9(_0x39901f,_0x12f3f4){_0x39901f=_0x39901f-0xa3;const _0xda2fa0=a40_0xda2f();let _0x51b9ec=_0xda2fa0[_0x39901f];return _0x51b9ec;}(function(_0x1d9cea,_0x569ded){const _0x426326=a40_0x51b9,_0x30e427=_0x1d9cea();while(!![]){try{const _0x1b0a1a=parseInt(_0x426326(0xa5))/0x1*(parseInt(_0x426326(0xad))/0x2)+-parseInt(_0x426326(0xab))/0x3*(-parseInt(_0x426326(0xac))/0x4)+-parseInt(_0x426326(0xa9))/0x5*(parseInt(_0x426326(0xaa))/0x6)+-parseInt(_0x426326(0xa4))/0x7*(parseInt(_0x426326(0xa7))/0x8)+parseInt(_0x426326(0xae))/0x9*(-parseInt(_0x426326(0xa3))/0xa)+-parseInt(_0x426326(0xa6))/0xb+parseInt(_0x426326(0xa8))/0xc;if(_0x1b0a1a===_0x569ded)break;else _0x30e427['push'](_0x30e427['shift']());}catch(_0x3e8f03){_0x30e427['push'](_0x30e427['shift']());}}}(a40_0xda2f,0xcd872));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a41_0x45ec00=a41_0x1458;(function(_0x343b99,_0x1f4a34){const _0x18b9f1=a41_0x1458,_0x45d97d=_0x343b99();while(!![]){try{const _0x20d7da=-parseInt(_0x18b9f1(0x95))/0x1*(parseInt(_0x18b9f1(0x87))/0x2)+-parseInt(_0x18b9f1(0x96))/0x3*(-parseInt(_0x18b9f1(0x93))/0x4)+-parseInt(_0x18b9f1(0x89))/0x5*(-parseInt(_0x18b9f1(0x8f))/0x6)+-parseInt(_0x18b9f1(0x88))/0x7*(-parseInt(_0x18b9f1(0x9d))/0x8)+-parseInt(_0x18b9f1(0x94))/0x9+-parseInt(_0x18b9f1(0xa2))/0xa+parseInt(_0x18b9f1(0x91))/0xb;if(_0x20d7da===_0x1f4a34)break;else _0x45d97d['push'](_0x45d97d['shift']());}catch(_0x31ca84){_0x45d97d['push'](_0x45d97d['shift']());}}}(a41_0x5a22,0x3fc72));function a41_0x1458(_0xebb447,_0x57674d){_0xebb447=_0xebb447-0x86;const _0x5a22bb=a41_0x5a22();let _0x145813=_0x5a22bb[_0xebb447];return _0x145813;}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a41_0x45ec00(0x9b),'command':a41_0x45ec00(0x9c),'description':a41_0x45ec00(0x8e),'risk':a41_0x45ec00(0xa0),'flags':[CODE_FLAG_OPTIONAL,{'name':a41_0x45ec00(0x8c),'type':a41_0x45ec00(0xa1),'description':a41_0x45ec00(0x99)},{'name':a41_0x45ec00(0x98),'type':'string','required':!![],'description':a41_0x45ec00(0x9a)},{'name':a41_0x45ec00(0x8b),'type':a41_0x45ec00(0x9e),'description':a41_0x45ec00(0x92)}],async 'execute'(_0x5baac0){const _0x1ece79=a41_0x45ec00,{dataset:_0x101970,operation:_0x1db050}=await getOperationDetail(_0x5baac0[_0x1ece79(0x8d)],_0x5baac0[_0x1ece79(0x97)](_0x1ece79(0x9f)),_0x5baac0[_0x1ece79(0x97)](_0x1ece79(0x98))),_0x4e0dc1=generateSdkCode(_0x101970,_0x1db050,{'includeImports':!_0x5baac0[_0x1ece79(0x86)](_0x1ece79(0x8b))});return{'ok':!![],'data':{'dataset':{'name':_0x101970[_0x1ece79(0x90)],'code':_0x101970[_0x1ece79(0x9f)],'tableName':_0x101970[_0x1ece79(0x8a)]},'operation':_0x5baac0['str']('operation'),'code':_0x4e0dc1}};}};function a41_0x5a22(){const _0x2fb621=['tableName','skip-imports','alias','appCode','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','768828HAhynx','name','5535508OcyAjF','Omit\x20import\x20statements\x20from\x20generated\x20code','27856nQhYqy','1443447NeVYsF','516277MteGGU','42KKUvyM','str','operation','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','codegen','sdk','64ZKpelb','boolean','code','read','string','973220iPhqTe','bool','2YynKzY','155939VRNTuG','10odllHw'];a41_0x5a22=function(){return _0x2fb621;};return a41_0x5a22();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a42_0x3f4f5a=a42_0x5d28;function a42_0x5d28(_0x1f56fe,_0x4bbd6c){_0x1f56fe=_0x1f56fe-0xad;const _0x52d4fc=a42_0x52d4();let _0x5d2892=_0x52d4fc[_0x1f56fe];return _0x5d2892;}(function(_0x2f5e68,_0x322f29){const _0x4b0de5=a42_0x5d28,_0xab10b7=_0x2f5e68();while(!![]){try{const _0x45d826=parseInt(_0x4b0de5(0xbb))/0x1+parseInt(_0x4b0de5(0xb0))/0x2*(-parseInt(_0x4b0de5(0xad))/0x3)+parseInt(_0x4b0de5(0xb2))/0x4+parseInt(_0x4b0de5(0xaf))/0x5*(-parseInt(_0x4b0de5(0xb3))/0x6)+-parseInt(_0x4b0de5(0xba))/0x7*(parseInt(_0x4b0de5(0xae))/0x8)+-parseInt(_0x4b0de5(0xb4))/0x9+parseInt(_0x4b0de5(0xc0))/0xa;if(_0x45d826===_0x322f29)break;else _0xab10b7['push'](_0xab10b7['shift']());}catch(_0x399e2b){_0xab10b7['push'](_0xab10b7['shift']());}}}(a42_0x52d4,0x9b320));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a42_0x3f4f5a(0xbc),'command':a42_0x3f4f5a(0xbf),'description':a42_0x3f4f5a(0xb9),'risk':'read','flags':[SQLCODE_FLAG,{'name':'target','type':a42_0x3f4f5a(0xb6),'description':'Code\x20target:\x20sdk\x20(default)\x20or\x20bff','default':'sdk','enum':[a42_0x3f4f5a(0xb1),a42_0x3f4f5a(0xc3)]},{'name':a42_0x3f4f5a(0xc1),'type':a42_0x3f4f5a(0xb5),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x2d5e8b){const _0x31fcf7=a42_0x3f4f5a,_0x53337e=await getSqlQueryInfo(_0x2d5e8b[_0x31fcf7(0xc2)],_0x2d5e8b[_0x31fcf7(0xb8)](_0x31fcf7(0xbd))),_0x2053bd=_0x2d5e8b[_0x31fcf7(0xb8)](_0x31fcf7(0xb7))||_0x31fcf7(0xb1),_0x29028d=generateSqlCodeTemplate(_0x53337e,{'target':_0x2053bd,'includeImports':!_0x2d5e8b['bool'](_0x31fcf7(0xc1))});return{'ok':!![],'data':{'sqlCode':_0x53337e[_0x31fcf7(0xbe)],'sqlName':_0x53337e['sqlName'],'target':_0x2053bd,'code':_0x29028d}};}};function a42_0x52d4(){const _0xd19802=['string','target','str','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','7HWpRpE','769139hHgDLM','codegen','sqlcode','sqlCode','sql','15880870qSiGLZ','no-imports','appCode','bff','310371WyiREf','9996768DFciFc','4090JhsmAl','2FswAlU','sdk','1524268YjGFeQ','4470eTSfJW','1261350erhdCx','boolean'];a42_0x52d4=function(){return _0xd19802;};return a42_0x52d4();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4190c8,_0x1f766d){const _0xc8ae8e=a43_0x4c56,_0x347330=_0x4190c8();while(!![]){try{const _0x55029c=-parseInt(_0xc8ae8e(0x1dd))/0x1*(parseInt(_0xc8ae8e(0x1c1))/0x2)+-parseInt(_0xc8ae8e(0x1ca))/0x3*(parseInt(_0xc8ae8e(0x1c3))/0x4)+-parseInt(_0xc8ae8e(0x1ce))/0x5*(-parseInt(_0xc8ae8e(0x1d1))/0x6)+parseInt(_0xc8ae8e(0x1cb))/0x7+-parseInt(_0xc8ae8e(0x1c0))/0x8+-parseInt(_0xc8ae8e(0x1be))/0x9*(parseInt(_0xc8ae8e(0x1b9))/0xa)+-parseInt(_0xc8ae8e(0x1df))/0xb*(-parseInt(_0xc8ae8e(0x1cf))/0xc);if(_0x55029c===_0x1f766d)break;else _0x347330['push'](_0x347330['shift']());}catch(_0x8a9a8f){_0x347330['push'](_0x347330['shift']());}}}(a43_0x3c72,0x85d68));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';function a43_0x3c72(){const _0x19dfda=['\x22\x20not\x20found.','globalConfig','\x20<name>','defaultApp','\x22\x20(appcode:\x20','global','447717bzuXNF','7144963lSaDxT','Removed\x20app\x20\x22','boolean','65695UrFapQ','14355132iRHGEO','apps','384AKnGqw','object','project','args','\x22\x20still\x20defined\x20in\x20','\x20Set\x20as\x20default\x20app.','Usage:\x20','string','trim','appcode','inherit','Updated','2GAafAa','Use\x20global\x20config\x20scope','11ZEmPYo','validation','\x20app\x20\x22','58880JfeTrm','keys','length','projectConfig','bool','1602uNmISr','both','6898920MNfjTD','449998UVykTQ','str','4dTBYxq'];a43_0x3c72=function(){return _0x19dfda;};return a43_0x3c72();}export function buildAppAddFlags(){const _0x278ecd=a43_0x4c56;return[{'name':_0x278ecd(0x1da),'type':_0x278ecd(0x1d8),'description':'App\x20code','required':!![]},{'name':_0x278ecd(0x1c9),'type':_0x278ecd(0x1cd),'description':_0x278ecd(0x1de),'default':![]},...getAppProfileFlagDefs()];}function a43_0x4c56(_0x2bd1c8,_0x5c1858){_0x2bd1c8=_0x2bd1c8-0x1b8;const _0x3c7251=a43_0x3c72();let _0x4c569e=_0x3c7251[_0x2bd1c8];return _0x4c569e;}export function buildAppRemoveFlags(){const _0x2675db=a43_0x4c56;return[{'name':_0x2675db(0x1c9),'type':'boolean','description':_0x2675db(0x1de),'default':![]}];}export async function validateAppName(_0x5734d0,_0x597539){const _0x2f673c=a43_0x4c56,_0x551514=_0x5734d0[_0x2f673c(0x1d4)][0x0]?.[_0x2f673c(0x1d9)]();if(!_0x551514)throw CliErrors[_0x2f673c(0x1e0)]('Missing\x20app\x20name.',_0x2f673c(0x1d7)+CLI_BIN_NAME+'\x20'+_0x597539+_0x2f673c(0x1c6));}export async function runAppAdd(_0x3c17e9,_0x4fa64f){const _0x5ca5d1=a43_0x4c56,_0xb68dc=_0x3c17e9[_0x5ca5d1(0x1d4)][0x0]?.[_0x5ca5d1(0x1d9)]();if(!_0xb68dc)throw CliErrors['validation']('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x4fa64f+'\x20<name>\x20--appcode\x20<code>');const _0x352df2=_0x3c17e9['str'](_0x5ca5d1(0x1da));if(!_0x352df2)throw CliErrors['flagMissing'](_0x5ca5d1(0x1da),_0x5ca5d1(0x1d7)+CLI_BIN_NAME+'\x20'+_0x4fa64f+'\x20<name>\x20--appcode\x20<code>');const _0x4c7efe={'global':_0x3c17e9[_0x5ca5d1(0x1bd)](_0x5ca5d1(0x1c9))},_0x2aa7b2=readConfig(_0x4c7efe);if(!_0x2aa7b2[_0x5ca5d1(0x1d0)])_0x2aa7b2[_0x5ca5d1(0x1d0)]={};const _0x1471b7={'appcode':_0x352df2,...collectAppProfileOverrides(_0x550d4c=>_0x3c17e9[_0x5ca5d1(0x1c2)](_0x550d4c))},_0x5034e8=_0x2aa7b2['apps'],_0x5d2e0a=!!_0x5034e8[_0xb68dc];_0x5034e8[_0xb68dc]=_0x1471b7;if(!_0x2aa7b2[_0x5ca5d1(0x1c7)])_0x2aa7b2[_0x5ca5d1(0x1c7)]=_0xb68dc;writeConfig(_0x2aa7b2,_0x4c7efe);const _0x37d48c=!_0x5d2e0a&&_0x2aa7b2[_0x5ca5d1(0x1c7)]===_0xb68dc?_0x5ca5d1(0x1d6):'',_0x372712=(_0x5d2e0a?_0x5ca5d1(0x1dc):'Added')+_0x5ca5d1(0x1b8)+_0xb68dc+_0x5ca5d1(0x1c8)+_0x352df2+')'+scopeLabel(_0x4c7efe)+'.'+_0x37d48c;return{'ok':!![],'message':_0x372712};}export async function runAppRemove(_0x3fe611,_0x1cce2d){const _0x11f81a=a43_0x4c56,_0x133953=_0x3fe611[_0x11f81a(0x1d4)][0x0]?.['trim']();if(!_0x133953)throw CliErrors[_0x11f81a(0x1e0)]('Missing\x20app\x20name.',_0x11f81a(0x1d7)+CLI_BIN_NAME+'\x20'+_0x1cce2d+'\x20<name>\x20[--global]');const _0x3501c=_0x3fe611['bool'](_0x11f81a(0x1c9)),{config:_0x59ce97,layers:_0x3b4f2a}=readRawConfigWithLayers(),_0x108007=_0x59ce97[_0x11f81a(0x1d0)]??{};if(!_0x108007[_0x133953])throw CliErrors[_0x11f81a(0x1e0)]('App\x20\x22'+_0x133953+_0x11f81a(0x1c4));const _0x135007=_0x3b4f2a[_0x11f81a(0x1c5)]['apps']&&typeof _0x3b4f2a[_0x11f81a(0x1c5)]['apps']===_0x11f81a(0x1d2)?_0x3b4f2a[_0x11f81a(0x1c5)]['apps']:{},_0x29c64a=_0x3b4f2a['projectConfig'][_0x11f81a(0x1d0)]&&typeof _0x3b4f2a[_0x11f81a(0x1bc)][_0x11f81a(0x1d0)]===_0x11f81a(0x1d2)?_0x3b4f2a[_0x11f81a(0x1bc)][_0x11f81a(0x1d0)]:{},_0x56b623=appDefinedIn(_0x133953,_0x135007,_0x29c64a,_0x3b4f2a[_0x11f81a(0x1bc)][_0x11f81a(0x1db)]===![]),_0x544c60=resolveAppScopeForWrite(_0x133953,_0x3501c,_0x3b4f2a),_0xf0ba15={'global':_0x544c60===_0x11f81a(0x1c9)},_0x4b5c38=readConfig(_0xf0ba15),_0x29c4ad=_0x4b5c38[_0x11f81a(0x1d0)];if(!_0x29c4ad||!_0x29c4ad[_0x133953])throw CliErrors['validation']('App\x20\x22'+_0x133953+_0x11f81a(0x1c4));delete _0x29c4ad[_0x133953];let _0x4569b5='';if(_0x4b5c38[_0x11f81a(0x1c7)]===_0x133953){const _0x714b36=Object[_0x11f81a(0x1ba)](_0x29c4ad);_0x4b5c38[_0x11f81a(0x1c7)]=_0x714b36[_0x11f81a(0x1bb)]>0x0?_0x714b36[0x0]:undefined,_0x4b5c38[_0x11f81a(0x1c7)]?_0x4569b5='\x20Default\x20app\x20changed\x20to\x20\x22'+_0x4b5c38[_0x11f81a(0x1c7)]+'\x22.':delete _0x4b5c38[_0x11f81a(0x1c7)];}Object[_0x11f81a(0x1ba)](_0x29c4ad)['length']===0x0&&(delete _0x4b5c38[_0x11f81a(0x1d0)],delete _0x4b5c38[_0x11f81a(0x1c7)]);writeConfig(_0x4b5c38,_0xf0ba15);const _0x522255=_0x56b623===_0x11f81a(0x1bf)?'\x20Note:\x20app\x20\x22'+_0x133953+_0x11f81a(0x1d5)+(_0x544c60===_0x11f81a(0x1d3)?_0x11f81a(0x1c9):'project')+'\x20config.':'';return{'ok':!![],'message':_0x11f81a(0x1cc)+_0x133953+'\x22'+scopeLabel(_0xf0ba15)+'.'+_0x4569b5+_0x522255};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2c91c0,_0xf79852){const _0x13cec8=a44_0x53f7,_0x5ce479=_0x2c91c0();while(!![]){try{const _0x2da133=-parseInt(_0x13cec8(0x1eb))/0x1*(parseInt(_0x13cec8(0x1f2))/0x2)+parseInt(_0x13cec8(0x1e8))/0x3*(parseInt(_0x13cec8(0x203))/0x4)+-parseInt(_0x13cec8(0x1f8))/0x5+-parseInt(_0x13cec8(0x1fc))/0x6*(parseInt(_0x13cec8(0x1f3))/0x7)+parseInt(_0x13cec8(0x1f0))/0x8+parseInt(_0x13cec8(0x1f7))/0x9+parseInt(_0x13cec8(0x1e5))/0xa;if(_0x2da133===_0xf79852)break;else _0x5ce479['push'](_0x5ce479['shift']());}catch(_0x591e63){_0x5ce479['push'](_0x5ce479['shift']());}}}(a44_0x20fe,0x63fc9));import{input,checkbox,select}from'@inquirer/prompts';import a44_0x400a09 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x437992=a44_0x53f7,_0xdd81a4=await input({'message':_0x437992(0x1f1),'validate':_0x5d72bf=>{const _0x47cb25=_0x437992,_0x47950a=validateAppcode(_0x5d72bf[_0x47cb25(0x1f6)]());return _0x47950a[_0x47cb25(0x1ee)]||_0x47950a[_0x47cb25(0x202)]||_0x47cb25(0x1ea);}});return _0xdd81a4[_0x437992(0x1f6)]();}function a44_0x20fe(){const _0x523b60=['610362EEujiS','cyan','未找到可用应用。','skip','appCode','无法获取远程应用列表,请手动输入。','message','44wBNcIG','\x0a未找到可用应用。','请选择要绑定的应用:','✎\x20自定义输入\x20appcode','yellow','custom','map','1044090oyInbY','\x0a无法获取远程应用列表,请手动输入。','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','50889Vtilok','appName','Invalid\x20App\x20Code','4506RKhnEY','正在获取可用应用列表...','获取到\x20','valid','App\x20Code:','5273312bDDVzU','请输入\x20App\x20Code:','50Waqcbv','7kLyiEf','manual','gray','trim','2652804QHOldX','3105000uJRxOE','includes','length','(跳过,稍后配置)'];a44_0x20fe=function(){return _0x523b60;};return a44_0x20fe();}export async function promptAppSelection(_0x6c8b47){const _0x41dfa0=a44_0x53f7,_0x39dbfb=[{'name':a44_0x400a09[_0x41dfa0(0x1e2)]('✎\x20自定义输入\x20appcode'),'value':-0x1},..._0x6c8b47['map']((_0x3d7656,_0xeb1313)=>({'name':_0x3d7656[_0x41dfa0(0x1e9)]+'\x20\x20'+a44_0x400a09[_0x41dfa0(0x1f5)]('('+_0x3d7656[_0x41dfa0(0x200)]+')'),'value':_0xeb1313}))],_0x35f80b=await checkbox({'message':_0x41dfa0(0x1ed)+a44_0x400a09[_0x41dfa0(0x1fd)](_0x6c8b47['length'])+'\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','choices':_0x39dbfb,'loop':![]});if(_0x35f80b[_0x41dfa0(0x1f9)](-0x1))return _0x41dfa0(0x1e3);if(_0x35f80b[_0x41dfa0(0x1fa)]===0x0)return _0x41dfa0(0x1e3);return _0x35f80b['map'](_0x598c13=>_0x6c8b47[_0x598c13]);}function a44_0x53f7(_0x306af7,_0x24a593){_0x306af7=_0x306af7-0x1df;const _0x20fefc=a44_0x20fe();let _0x53f773=_0x20fefc[_0x306af7];return _0x53f773;}export async function promptSingleAppSelection(_0xe936d9){const _0x1f2445=a44_0x53f7,_0x238fed=[{'name':a44_0x400a09[_0x1f2445(0x1f5)]('(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)'),'value':_0x1f2445(0x1ff)},{'name':a44_0x400a09[_0x1f2445(0x1e2)](_0x1f2445(0x1e1)),'value':_0x1f2445(0x1e3)},..._0xe936d9[_0x1f2445(0x1e4)](_0x3451b4=>({'name':_0x3451b4['appName']+'\x20\x20'+a44_0x400a09['gray']('('+_0x3451b4[_0x1f2445(0x200)]+')'),'value':_0x3451b4[_0x1f2445(0x200)]}))],_0xccb692=await select({'message':_0x1f2445(0x1e0),'choices':_0x238fed});if(_0xccb692===_0x1f2445(0x1ff))return _0x1f2445(0x1ff);if(_0xccb692===_0x1f2445(0x1e3))return _0x1f2445(0x1e3);return _0xe936d9['find'](_0x1bdd16=>_0x1bdd16[_0x1f2445(0x200)]===_0xccb692);}export async function selectSingleAppcode(_0x4100ee){const _0x5f3324=a44_0x53f7;if(!_0x4100ee)return writeCliSideChannelLine(a44_0x400a09[_0x5f3324(0x1f5)](_0x5f3324(0x1e7))),_fallbackOrSkip();writeCliSideChannelLine(_0x5f3324(0x1ec));let _0x21442f;try{_0x21442f=await withActiveCookie(_0x4100ee,()=>listRemoteApps());}catch(_0x4bd360){writeCliSideChannelLine(a44_0x400a09['yellow'](_0x5f3324(0x201)));if(_0x4bd360 instanceof Error)writeCliSideChannelLine(a44_0x400a09[_0x5f3324(0x1f5)]('\x20\x20('+_0x4bd360[_0x5f3324(0x202)]+')'));return _fallbackOrSkip();}if(_0x21442f[_0x5f3324(0x1fa)]===0x0)return writeCliSideChannelLine(a44_0x400a09['yellow'](_0x5f3324(0x1fe))),_fallbackOrSkip();const _0x55cca5=await promptSingleAppSelection(_0x21442f);if(_0x55cca5===_0x5f3324(0x1ff))return'';if(_0x55cca5===_0x5f3324(0x1e3))return promptCustomAppcode();return _0x55cca5[_0x5f3324(0x200)];}export async function selectMultipleApps(_0x396f90){const _0x56400f=a44_0x53f7;writeCliSideChannelLine('正在获取可用应用列表...');let _0xe8f960;try{_0xe8f960=await withActiveCookie(_0x396f90,()=>listRemoteApps());}catch(_0x3ef920){writeCliSideChannelLine(_0x56400f(0x1e6));if(_0x3ef920 instanceof Error)writeCliSideChannelLine('\x20\x20('+_0x3ef920[_0x56400f(0x202)]+')');return'custom';}if(_0xe8f960['length']===0x0)return writeCliSideChannelLine(_0x56400f(0x1df)),_0x56400f(0x1e3);return promptAppSelection(_0xe8f960);}async function _fallbackOrSkip(){const _0x30b951=a44_0x53f7,_0xedcb0c=await select({'message':_0x30b951(0x1ef),'choices':[{'name':a44_0x400a09[_0x30b951(0x1f5)](_0x30b951(0x1fb)),'value':_0x30b951(0x1ff)},{'name':a44_0x400a09[_0x30b951(0x1e2)]('✎\x20手动输入'),'value':_0x30b951(0x1f4)}]});if(_0xedcb0c===_0x30b951(0x1ff))return'';return promptCustomAppcode();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a45_0x380e(){const _0x27599d=['replace','Task\x20','PROCESSING','2465934gEgmFl','\x20failed:\x20','\x20completed\x20successfully.','status','7201612AxiVks','taskId','46165077PclTIq','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','errorMessage','string','has','1043313HlfdPi','\x27\x5c\x27\x27','\x20--format\x20compress','5ZEAdjk','\x20is\x20processing.','2818109mloYtC','toUpperCase','8aSyuuC','\x20failed.','\x20returned\x20unknown\x20status\x20','trim','Async\x20task\x20','890604kAkdoM','apiError','\x20is\x20pending.','\x20response\x20did\x20not\x20contain\x20a\x20status.','FAILED','5071488sOpegV','SUCCESS'];a45_0x380e=function(){return _0x27599d;};return a45_0x380e();}function a45_0x6e64(_0x44caa9,_0x5cf7cc){_0x44caa9=_0x44caa9-0xfe;const _0x380eca=a45_0x380e();let _0x6e648f=_0x380eca[_0x44caa9];return _0x6e648f;}const a45_0x56e811=a45_0x6e64;(function(_0x1af28b,_0x2906dd){const _0x122f0f=a45_0x6e64,_0x1ec621=_0x1af28b();while(!![]){try{const _0x1c0639=-parseInt(_0x122f0f(0x107))/0x1+-parseInt(_0x122f0f(0x11d))/0x2+parseInt(_0x122f0f(0x113))/0x3+-parseInt(_0x122f0f(0x100))/0x4+parseInt(_0x122f0f(0x10a))/0x5*(-parseInt(_0x122f0f(0x118))/0x6)+-parseInt(_0x122f0f(0x10c))/0x7*(-parseInt(_0x122f0f(0x10e))/0x8)+parseInt(_0x122f0f(0x102))/0x9;if(_0x1c0639===_0x2906dd)break;else _0x1ec621['push'](_0x1ec621['shift']());}catch(_0x4a9bde){_0x1ec621['push'](_0x1ec621['shift']());}}}(a45_0x380e,0xdd6e1));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a45_0x56e811(0x119),a45_0x56e811(0x117)]),NON_TERMINAL_STATUSES=new Set(['PENDING','PROCESSING']);export function normalizeAsyncTask(_0x10fd94){const _0x149352=a45_0x56e811,_0x81c9b5=typeof _0x10fd94?.[_0x149352(0x101)]===_0x149352(0x105)?_0x10fd94[_0x149352(0x101)][_0x149352(0x111)]():'';if(!_0x81c9b5)throw CliErrors[_0x149352(0x114)](_0x149352(0x103));const _0xe3ea7b=typeof _0x10fd94['status']===_0x149352(0x105)?_0x10fd94[_0x149352(0xff)][_0x149352(0x111)]()[_0x149352(0x10d)]():'';if(!_0xe3ea7b)throw CliErrors[_0x149352(0x114)](_0x149352(0x112)+_0x81c9b5+_0x149352(0x116));return{'taskId':_0x81c9b5,'status':_0xe3ea7b,'errorMessage':typeof _0x10fd94[_0x149352(0x104)]===_0x149352(0x105)&&_0x10fd94[_0x149352(0x104)][_0x149352(0x111)]()?_0x10fd94[_0x149352(0x104)][_0x149352(0x111)]():null,'isTerminal':TERMINAL_STATUSES[_0x149352(0x106)](_0xe3ea7b),'knownStatus':TERMINAL_STATUSES['has'](_0xe3ea7b)||NON_TERMINAL_STATUSES[_0x149352(0x106)](_0xe3ea7b)};}export function buildAsyncTaskStatusCommand(_0x50a796,_0x406aad){const _0x2f00a1=a45_0x56e811;return CLI_BIN_NAME+'\x20task\x20status\x20--task-id\x20'+quoteShellArg(_0x50a796)+'\x20--appcode\x20'+quoteShellArg(_0x406aad)+_0x2f00a1(0x109);}export function asyncTaskMessage(_0x351dc){const _0x27eda5=a45_0x56e811;switch(_0x351dc[_0x27eda5(0xff)]){case'PENDING':return _0x27eda5(0x11b)+_0x351dc[_0x27eda5(0x101)]+_0x27eda5(0x115);case _0x27eda5(0x11c):return _0x27eda5(0x11b)+_0x351dc[_0x27eda5(0x101)]+_0x27eda5(0x10b);case _0x27eda5(0x119):return _0x27eda5(0x11b)+_0x351dc['taskId']+_0x27eda5(0xfe);case _0x27eda5(0x117):return _0x351dc[_0x27eda5(0x104)]?_0x27eda5(0x11b)+_0x351dc[_0x27eda5(0x101)]+_0x27eda5(0x11e)+_0x351dc['errorMessage']:_0x27eda5(0x11b)+_0x351dc[_0x27eda5(0x101)]+_0x27eda5(0x10f);default:return _0x27eda5(0x11b)+_0x351dc[_0x27eda5(0x101)]+_0x27eda5(0x110)+_0x351dc[_0x27eda5(0xff)]+'.';}}function quoteShellArg(_0x140c2f){const _0x5cdb80=a45_0x56e811;return'\x27'+_0x140c2f[_0x5cdb80(0x11a)](/'/g,_0x5cdb80(0x108))+'\x27';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a46_0x1529(){var _0x4c0a25=['5246232lstMxF','15103LIUYIz','method','description','656OOZKox','765308nKTPkT','url','8450vgJLKY','48nIzwCd','3396043ccjuuK','1329057WEOufv','53690lvMjtd','24165ivyTok','18hyUknv'];a46_0x1529=function(){return _0x4c0a25;};return a46_0x1529();}(function(_0x50a2a2,_0x21e7c5){var _0x283f85=a46_0x5e92,_0x1c8f2e=_0x50a2a2();while(!![]){try{var _0x44fca8=parseInt(_0x283f85(0x169))/0x1+-parseInt(_0x283f85(0x161))/0x2*(-parseInt(_0x283f85(0x163))/0x3)+-parseInt(_0x283f85(0x168))/0x4*(-parseInt(_0x283f85(0x162))/0x5)+-parseInt(_0x283f85(0x164))/0x6+-parseInt(_0x283f85(0x16d))/0x7+parseInt(_0x283f85(0x16c))/0x8*(-parseInt(_0x283f85(0x160))/0x9)+-parseInt(_0x283f85(0x16b))/0xa*(-parseInt(_0x283f85(0x165))/0xb);if(_0x44fca8===_0x21e7c5)break;else _0x1c8f2e['push'](_0x1c8f2e['shift']());}catch(_0x2a97f4){_0x1c8f2e['push'](_0x1c8f2e['shift']());}}}(a46_0x1529,0x9ab10));function a46_0x5e92(_0x4d9e39,_0x1f1c14){_0x4d9e39=_0x4d9e39-0x160;var _0x1529be=a46_0x1529();var _0x5e9217=_0x1529be[_0x4d9e39];return _0x5e9217;}export function asDryRunResult(_0xf22ee7,_0x3c400f){var _0x495ff5=a46_0x5e92;return Object['defineProperties'](_0xf22ee7,{'method':{'value':_0x3c400f[_0x495ff5(0x166)],'enumerable':![]},'url':{'value':_0x3c400f[_0x495ff5(0x16a)],'enumerable':![]},..._0x3c400f['description']?{'description':{'value':_0x3c400f[_0x495ff5(0x167)],'enumerable':![]}}:{}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a47_0x39100c=a47_0x5170;(function(_0x312b15,_0x398e08){const _0x2d8b54=a47_0x5170,_0x3983d4=_0x312b15();while(!![]){try{const _0x2c078c=parseInt(_0x2d8b54(0x10c))/0x1*(parseInt(_0x2d8b54(0x10d))/0x2)+-parseInt(_0x2d8b54(0x105))/0x3*(-parseInt(_0x2d8b54(0x103))/0x4)+-parseInt(_0x2d8b54(0x104))/0x5*(parseInt(_0x2d8b54(0x10e))/0x6)+-parseInt(_0x2d8b54(0x101))/0x7*(-parseInt(_0x2d8b54(0xf6))/0x8)+parseInt(_0x2d8b54(0xfc))/0x9*(parseInt(_0x2d8b54(0xf8))/0xa)+parseInt(_0x2d8b54(0xff))/0xb*(parseInt(_0x2d8b54(0xf9))/0xc)+-parseInt(_0x2d8b54(0xfd))/0xd;if(_0x2c078c===_0x398e08)break;else _0x3983d4['push'](_0x3983d4['shift']());}catch(_0x43baf7){_0x3983d4['push'](_0x3983d4['shift']());}}}(a47_0x50d7,0x1b4fe));function a47_0x5170(_0x11a5b1,_0x234afc){_0x11a5b1=_0x11a5b1-0xf5;const _0x50d778=a47_0x50d7();let _0x5170cd=_0x50d778[_0x11a5b1];return _0x5170cd;}export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':'a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)'};export const CODE_FLAG={'name':a47_0x39100c(0xfe),'type':a47_0x39100c(0xfb),'required':!![],'description':a47_0x39100c(0xf7),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a47_0x39100c(0x102),'description':'Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)'};export const SQLCODE_FLAG={'name':'sqlcode','type':a47_0x39100c(0xfb),'required':!![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const APPCODE_FLAG_OPTIONAL={'name':a47_0x39100c(0xfa),'type':'string','required':![],'description':a47_0x39100c(0x10b)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a47_0x39100c(0x109)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a47_0x39100c(0x107),'required':!![],'description':a47_0x39100c(0x106)};function a47_0x50d7(){const _0x5a4daf=['dbtype','611471xevRXx','datasetcode','76wzKnYk','22625GdRojY','10338xZUhLB','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','number','Database\x20product\x20type','App\x20code\x20(e.g.\x20app-xxxxx)','POSTGRESQL','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','29xWpgqG','1796MbDrMb','126LNjscm','MYSQL','8doOJGW','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','30fCwCuA','168veIqZX','appcode','string','375849zjXFUU','2909621uIptfT','code','99440lmbylQ'];a47_0x50d7=function(){return _0x5a4daf;};return a47_0x50d7();}export const DB_TYPE_FLAG={'name':a47_0x39100c(0x100),'type':a47_0x39100c(0xfb),'required':!![],'description':a47_0x39100c(0x108),'enum':[a47_0x39100c(0xf5),a47_0x39100c(0x10a)]};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3a1cae,_0x5d3884){const _0x5ad3c1=a48_0x4021,_0x726ff5=_0x3a1cae();while(!![]){try{const _0x2d0fdc=-parseInt(_0x5ad3c1(0x16b))/0x1+parseInt(_0x5ad3c1(0x17b))/0x2+-parseInt(_0x5ad3c1(0x169))/0x3*(-parseInt(_0x5ad3c1(0x16c))/0x4)+-parseInt(_0x5ad3c1(0x170))/0x5+parseInt(_0x5ad3c1(0x179))/0x6*(-parseInt(_0x5ad3c1(0x172))/0x7)+-parseInt(_0x5ad3c1(0x178))/0x8+-parseInt(_0x5ad3c1(0x176))/0x9*(-parseInt(_0x5ad3c1(0x17a))/0xa);if(_0x2d0fdc===_0x5d3884)break;else _0x726ff5['push'](_0x726ff5['shift']());}catch(_0xee9e87){_0x726ff5['push'](_0x726ff5['shift']());}}}(a48_0x3e8d,0x71492));function a48_0x4021(_0x163960,_0x4219d8){_0x163960=_0x163960-0x169;const _0x3e8da9=a48_0x3e8d();let _0x402100=_0x3e8da9[_0x163960];return _0x402100;}import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function a48_0x3e8d(){const _0x1d7052=['\x20MB','29297QlcykM','4948USnDjw','validation','trim','toFixed','1261205wXMsyS','size','436114FobwjV','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','ceil','File\x20is\x20not\x20a\x20regular\x20file:\x20','18243QQXWgU','File\x20not\x20found:\x20','6883144ZJmFBC','30RtKjYd','5140vjqqTE','877840gbuQSl','isFile','1059uDOxSv'];a48_0x3e8d=function(){return _0x1d7052;};return a48_0x3e8d();}function formatBytes(_0x3cc79c){const _0x2e8aae=a48_0x4021;if(_0x3cc79c>=BYTES_PER_MB){const _0x5aa269=Math[_0x2e8aae(0x174)](_0x3cc79c/BYTES_PER_MB*0x64)/0x64;return _0x5aa269[_0x2e8aae(0x16f)](0x2)+_0x2e8aae(0x16a);}return _0x3cc79c+'\x20B';}export function requireDevelopmentUploadFile(_0xe9f4f0,_0x8c0d46){const _0x523f7e=a48_0x4021,_0x3ea70e=_0xe9f4f0[_0x523f7e(0x16e)]();if(!_0x3ea70e)throw CliErrors[_0x523f7e(0x16d)](_0x8c0d46+'\x20path\x20is\x20required.');if(!existsSync(_0x3ea70e))throw CliErrors[_0x523f7e(0x16d)](_0x523f7e(0x177)+_0x3ea70e);const _0x481bc3=statSync(_0x3ea70e);if(!_0x481bc3[_0x523f7e(0x17c)]())throw CliErrors[_0x523f7e(0x16d)](_0x523f7e(0x175)+_0x3ea70e);if(_0x481bc3[_0x523f7e(0x171)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x523f7e(0x16d)](_0x523f7e(0x173)+_0x3ea70e+'\x20('+formatBytes(_0x481bc3['size'])+')');return{'path':_0x3ea70e,'size':_0x481bc3[_0x523f7e(0x171)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5c7c3f,_0x33aaf4){const _0x2f3cbb=a49_0x2e3a,_0x404515=_0x5c7c3f();while(!![]){try{const _0x5971df=-parseInt(_0x2f3cbb(0x1e8))/0x1*(-parseInt(_0x2f3cbb(0x1df))/0x2)+parseInt(_0x2f3cbb(0x1e2))/0x3*(-parseInt(_0x2f3cbb(0x1ed))/0x4)+parseInt(_0x2f3cbb(0x1e4))/0x5*(parseInt(_0x2f3cbb(0x1e9))/0x6)+-parseInt(_0x2f3cbb(0x1e0))/0x7+parseInt(_0x2f3cbb(0x1eb))/0x8+-parseInt(_0x2f3cbb(0x1e1))/0x9*(parseInt(_0x2f3cbb(0x1e6))/0xa)+-parseInt(_0x2f3cbb(0x1ee))/0xb*(parseInt(_0x2f3cbb(0x1e3))/0xc);if(_0x5971df===_0x33aaf4)break;else _0x404515['push'](_0x404515['shift']());}catch(_0x3544d0){_0x404515['push'](_0x404515['shift']());}}}(a49_0x2918,0x276ea));export function validateAppcode(_0xe1c744){const _0x3b367=a49_0x2e3a,_0x3b6b80=_0xe1c744[_0x3b367(0x1e5)]();if(!_0x3b6b80)return{'valid':![],'message':_0x3b367(0x1ec)};if(_0x3b6b80[_0x3b367(0x1e7)]>0x64)return{'valid':![],'message':'App\x20Code\x20cannot\x20exceed\x20100\x20characters'};if(!/^[A-Za-z0-9_-]+$/[_0x3b367(0x1ea)](_0x3b6b80))return{'valid':![],'message':'Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'};return{'valid':!![]};}function a49_0x2e3a(_0x34c6b7,_0x3603a4){_0x34c6b7=_0x34c6b7-0x1df;const _0x29184c=a49_0x2918();let _0x2e3abc=_0x29184c[_0x34c6b7];return _0x2e3abc;}function a49_0x2918(){const _0xf7dc3a=['814236dsXQoL','4885WpDGee','trim','38630wrwztQ','length','132241cosWos','1218XRSLIH','test','1046928YVRqtF','App\x20Code\x20cannot\x20be\x20empty','5268mqKBKV','11OxyKaz','2xOBMPM','126ELBjiH','108SDmXUC','423PPFXBc'];a49_0x2918=function(){return _0xf7dc3a;};return a49_0x2918();}
|