@lovrabet/rabetbase-cli 2.3.13-beta.2 → 2.3.13-beta.3
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/README.md +1 -1
- 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/add.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/remove.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/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -0
- 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 -0
- 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/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/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/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/init.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/save.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/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.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.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/lib/commands/menu/update.js +0 -1
package/lib/commands/app/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a20_0x4c64e4=a20_0xe09e;(function(_0x51cfcc,_0x13c6da){const _0x13a709=a20_0xe09e,_0x2ebf19=_0x51cfcc();while(!![]){try{const _0x4e145d=parseInt(_0x13a709(0x179))/0x1*(parseInt(_0x13a709(0x17c))/0x2)+parseInt(_0x13a709(0x180))/0x3*(-parseInt(_0x13a709(0x166))/0x4)+parseInt(_0x13a709(0x164))/0x5+-parseInt(_0x13a709(0x168))/0x6*(parseInt(_0x13a709(0x16b))/0x7)+parseInt(_0x13a709(0x190))/0x8*(-parseInt(_0x13a709(0x193))/0x9)+parseInt(_0x13a709(0x172))/0xa*(parseInt(_0x13a709(0x18f))/0xb)+parseInt(_0x13a709(0x181))/0xc*(parseInt(_0x13a709(0x192))/0xd);if(_0x4e145d===_0x13c6da)break;else _0x2ebf19['push'](_0x2ebf19['shift']());}catch(_0x400ced){_0x2ebf19['push'](_0x2ebf19['shift']());}}}(a20_0x14ae,0x90076));import{readRawConfigWithLayers}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';function a20_0x14ae(){const _0x5f11b2=['read','inherit','.\x20Use\x20`','297qhrJut','6968UgKuAI','entries','13ADCDAa','9423RIraJp','4679055xBUAfy','appcode','23292IXXtgq','\x20in\x20','60ksePXY','apps','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.','737849WdQRaa','push','projectConfig','object','isCurrent','merged','global','124410gJJexi','find','projectPath','map','List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','length','optional','1459NSAAGO','No\x20apps\x20configured','\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','1100VZsZEb','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','project','456gZJLtA','16402524IFgowx','boolean','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','\x20config','List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','list','validation','bool','globalConfig','app','mergedCli'];a20_0x14ae=function(){return _0x5f11b2;};return a20_0x14ae();}import{buildAppProfileListFields}from'../../config/schema.js';import{appDefinedIn,enrichAppListItemsWithMergedSelection,resolveDefaultAppSource}from'../../commands/app/shared.js';import{listRemoteAppDirectory}from'../../commands/app/remote-directory.js';function buildItemsFromLayer(_0x3dedc6,_0x38b394){const _0x3d6637=a20_0xe09e,_0x51f936=[],_0x4d1715=_0x3dedc6[_0x3d6637(0x169)]&&typeof _0x3dedc6[_0x3d6637(0x169)]==='object'?_0x3dedc6[_0x3d6637(0x169)]:{},_0x560f12=_0x3dedc6['defaultApp']||undefined;for(const [_0x23ad54,_0x50b947]of Object[_0x3d6637(0x191)](_0x4d1715)){if(!_0x50b947||typeof _0x50b947!==_0x3d6637(0x16e)||!_0x50b947[_0x3d6637(0x165)])continue;_0x51f936[_0x3d6637(0x16c)]({'name':_0x23ad54,'appcode':_0x50b947[_0x3d6637(0x165)],'named':!![],'definedIn':_0x38b394,'isDefault':_0x23ad54===_0x560f12,...buildAppProfileListFields(_0x50b947)});}return _0x51f936;}function buildMergedItems(_0x460244,_0x694b97){const _0x1ca740=a20_0xe09e,{apps:apps={},defaultApp:_0x4b3b2d}=_0x460244,_0x39aef0=_0x694b97[_0x1ca740(0x189)][_0x1ca740(0x169)]&&typeof _0x694b97[_0x1ca740(0x189)][_0x1ca740(0x169)]==='object'?_0x694b97[_0x1ca740(0x189)][_0x1ca740(0x169)]:{},_0x3a53d0=_0x694b97[_0x1ca740(0x16d)][_0x1ca740(0x169)]&&typeof _0x694b97['projectConfig']['apps']===_0x1ca740(0x16e)?_0x694b97[_0x1ca740(0x16d)][_0x1ca740(0x169)]:{},_0x20b24c=_0x694b97[_0x1ca740(0x16d)][_0x1ca740(0x18d)]===![],_0x1fa1d4=Object['entries'](apps),_0x2cc790=_0x1fa1d4[_0x1ca740(0x175)](([_0x5832ee,_0x2f0c84])=>({'name':_0x5832ee,'appcode':_0x2f0c84['appcode'],'named':!![],'definedIn':appDefinedIn(_0x5832ee,_0x39aef0,_0x3a53d0,_0x20b24c),'isDefault':_0x5832ee===_0x4b3b2d,...buildAppProfileListFields(_0x2f0c84)}));return _0x2cc790;}function a20_0xe09e(_0x4a65c8,_0x31d8da){_0x4a65c8=_0x4a65c8-0x164;const _0x14aea9=a20_0x14ae();let _0xe09e0b=_0x14aea9[_0x4a65c8];return _0xe09e0b;}function validateAppListFlags(_0x1d84a1){const _0x43c73a=a20_0xe09e;if(!_0x1d84a1[_0x43c73a(0x188)]('remote'))return;if(!_0x1d84a1[_0x43c73a(0x188)](_0x43c73a(0x171))&&!_0x1d84a1['bool'](_0x43c73a(0x17f)))return;throw CliErrors[_0x43c73a(0x187)](_0x43c73a(0x17e),_0x43c73a(0x16a));}async function execute(_0x53d9b5){const _0x3de3bf=a20_0xe09e;validateAppListFlags(_0x53d9b5);if(_0x53d9b5[_0x3de3bf(0x188)]('remote'))return{'ok':!![],'data':await listRemoteAppDirectory(_0x53d9b5)};const _0x4e0081=_0x53d9b5['bool'](_0x3de3bf(0x171)),_0x35fa12=_0x53d9b5[_0x3de3bf(0x188)]('project'),_0x3720c0=_0x4e0081?'global':_0x35fa12?_0x3de3bf(0x17f):_0x3de3bf(0x170),{config:_0x1440c3,layers:_0x527425}=readRawConfigWithLayers(),_0x55b1aa=resolveDefaultAppSource(_0x527425),{defaultApp:_0x34229e}=_0x1440c3;let _0x300419,_0x2b3e92;switch(_0x3720c0){case'global':_0x300419=buildItemsFromLayer(_0x527425[_0x3de3bf(0x189)],_0x3de3bf(0x171)),_0x2b3e92=_0x527425['globalPath'];break;case _0x3de3bf(0x17f):_0x300419=buildItemsFromLayer(_0x527425[_0x3de3bf(0x16d)],_0x3de3bf(0x17f)),_0x2b3e92=_0x527425[_0x3de3bf(0x174)];break;default:_0x300419=buildMergedItems(_0x1440c3,_0x527425);break;}enrichAppListItemsWithMergedSelection(_0x300419,_0x53d9b5[_0x3de3bf(0x18b)]);if(_0x300419[_0x3de3bf(0x177)]===0x0){const _0x302d5d=_0x3720c0==='merged'?'':_0x3de3bf(0x167)+_0x3720c0+_0x3de3bf(0x184);return{'ok':!![],'data':[],'message':_0x3de3bf(0x17a)+_0x302d5d+_0x3de3bf(0x18e)+CLI_BIN_NAME+_0x3de3bf(0x17b)};}const _0x180576=_0x300419[_0x3de3bf(0x173)](_0x3aa215=>_0x3aa215[_0x3de3bf(0x16f)]===!![]),_0xd9f6f3=_0x34229e??_0x180576?.[_0x3de3bf(0x165)]??null,_0x564d85=_0x3720c0===_0x3de3bf(0x170)?{'globalPath':_0x527425['globalPath']??null,'projectPath':_0x527425[_0x3de3bf(0x174)]??null,'defaultApp':_0xd9f6f3,'defaultAppSource':_0x34229e!=null?_0x55b1aa:null}:{'scope':_0x3720c0,'configPath':_0x2b3e92??null};return{'ok':!![],'data':{'items':_0x300419,'meta':_0x564d85}};}export const appListDefinition={'service':a20_0x4c64e4(0x18a),'command':a20_0x4c64e4(0x186),'description':a20_0x4c64e4(0x185),'risk':a20_0x4c64e4(0x18c),'auth':a20_0x4c64e4(0x178),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'remote','type':a20_0x4c64e4(0x182),'description':a20_0x4c64e4(0x176),'default':![]},{'name':a20_0x4c64e4(0x171),'type':a20_0x4c64e4(0x182),'description':a20_0x4c64e4(0x17d),'default':![]},{'name':a20_0x4c64e4(0x17f),'type':'boolean','description':a20_0x4c64e4(0x183),'default':![]}],async 'validate'(_0x376e17){validateAppListFlags(_0x376e17);},'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3bf6d8,_0x2875b9){const _0x1369fe=a21_0x50af,_0x58bdfe=_0x3bf6d8();while(!![]){try{const _0x46585f=-parseInt(_0x1369fe(0xc4))/0x1+-parseInt(_0x1369fe(0xbf))/0x2*(parseInt(_0x1369fe(0xbb))/0x3)+-parseInt(_0x1369fe(0xc7))/0x4*(-parseInt(_0x1369fe(0xb8))/0x5)+parseInt(_0x1369fe(0xc6))/0x6*(parseInt(_0x1369fe(0xb9))/0x7)+-parseInt(_0x1369fe(0xc5))/0x8+parseInt(_0x1369fe(0xbc))/0x9+parseInt(_0x1369fe(0xbd))/0xa;if(_0x46585f===_0x2875b9)break;else _0x58bdfe['push'](_0x58bdfe['shift']());}catch(_0x1b3878){_0x58bdfe['push'](_0x58bdfe['shift']());}}}(a21_0x2adc,0x9094f));import{listRemoteApps}from'../../core/api-client.js';import{getCookie}from'../../auth/get-cookie.js';import{CliErrors}from'../../errors.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';function resolveCookie(_0x5cb310){const _0x461a13=a21_0x50af,_0x33a6cf=_0x5cb310[_0x461a13(0xc0)]||getCookie();if(!_0x33a6cf)throw CliErrors[_0x461a13(0xc1)]();return _0x33a6cf;}export async function listRemoteAppDirectory(_0x2e60ec){const _0x265f3d=a21_0x50af,_0xec999f=await withActiveCookie(resolveCookie(_0x2e60ec),()=>listRemoteApps());return{'items':_0xec999f[_0x265f3d(0xc3)](_0xe97e80=>({..._0xe97e80['id']!=null?{'id':_0xe97e80['id']}:{},'appCode':_0xe97e80['appCode'],'appName':_0xe97e80[_0x265f3d(0xba)],..._0xe97e80[_0x265f3d(0xc2)]!=null?{'appDesc':_0xe97e80[_0x265f3d(0xc2)]}:{}})),'meta':{'source':_0x265f3d(0xbe)}};}function a21_0x50af(_0x2cf86f,_0x3f1576){_0x2cf86f=_0x2cf86f-0xb8;const _0x2adcae=a21_0x2adc();let _0x50af24=_0x2adcae[_0x2cf86f];return _0x50af24;}function a21_0x2adc(){const _0x1454e8=['4694256yuIKki','2476220JUxmuK','platform','442IzyJAI','cookie','authRequired','appDesc','map','275474bqtncu','8704408hWpkaR','24FZHuxr','3902812spBCLm','5QVPNxh','451318GqytYL','appName','639dAQMkP'];a21_0x2adc=function(){return _0x1454e8;};return a21_0x2adc();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a22_0x6dbe55=a22_0x1fd4;(function(_0xfcebe6,_0x3fd9f3){const _0x157fa0=a22_0x1fd4,_0xdcafcc=_0xfcebe6();while(!![]){try{const _0x3327cb=-parseInt(_0x157fa0(0x83))/0x1+parseInt(_0x157fa0(0x7d))/0x2*(-parseInt(_0x157fa0(0x89))/0x3)+parseInt(_0x157fa0(0x8a))/0x4+-parseInt(_0x157fa0(0x81))/0x5*(-parseInt(_0x157fa0(0x7c))/0x6)+parseInt(_0x157fa0(0x85))/0x7*(parseInt(_0x157fa0(0x82))/0x8)+-parseInt(_0x157fa0(0x80))/0x9*(parseInt(_0x157fa0(0x86))/0xa)+parseInt(_0x157fa0(0x7f))/0xb*(parseInt(_0x157fa0(0x88))/0xc);if(_0x3327cb===_0x3fd9f3)break;else _0xdcafcc['push'](_0xdcafcc['shift']());}catch(_0x216476){_0xdcafcc['push'](_0xdcafcc['shift']());}}}(a22_0x1a75,0xed274));import{CLI_BIN_NAME}from'../../constant/cli.js';function a22_0x1a75(){const _0x1f4087=['1188992xgRHvw','high-risk-write','469MHbrrP','1058410cLvaQV','Deprecated:\x20use\x20workspace\x20remove\x20to\x20remove\x20an\x20app\x20profile','18748596RrAIMD','3bjnfMc','6941516GbySTs','app\x20remove','2026-07','name','6yqGWrZ','2333126CEOjxp','\x20workspace\x20remove','11ceQiLa','153kYfAFG','7696155LkEwHV','34536JWabxl'];a22_0x1a75=function(){return _0x1f4087;};return a22_0x1a75();}import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';function a22_0x1fd4(_0x2c2819,_0x2e4933){_0x2c2819=_0x2c2819-0x79;const _0x1a7580=a22_0x1a75();let _0x1fd409=_0x1a7580[_0x2c2819];return _0x1fd409;}export const appRemoveDefinition={'service':'app','command':'remove','description':a22_0x6dbe55(0x87),'risk':a22_0x6dbe55(0x84),'requiresAuth':![],'requiresAppCode':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a22_0x6dbe55(0x7e),'since':a22_0x6dbe55(0x7a)},'args':[{'name':a22_0x6dbe55(0x7b),'description':'App\x20profile\x20name\x20to\x20remove','required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x32fb12=>validateAppName(_0x32fb12,a22_0x6dbe55(0x79)),'execute':_0x2ac3e7=>runAppRemove(_0x2ac3e7,a22_0x6dbe55(0x79))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x11240e,_0x2b1877){const _0x3d9f67=a23_0x31cb,_0x2ee220=_0x11240e();while(!![]){try{const _0x95180b=parseInt(_0x3d9f67(0x8b))/0x1+parseInt(_0x3d9f67(0x89))/0x2*(parseInt(_0x3d9f67(0x76))/0x3)+parseInt(_0x3d9f67(0x8c))/0x4+parseInt(_0x3d9f67(0x7f))/0x5*(-parseInt(_0x3d9f67(0x83))/0x6)+-parseInt(_0x3d9f67(0x93))/0x7+-parseInt(_0x3d9f67(0x82))/0x8+parseInt(_0x3d9f67(0x87))/0x9;if(_0x95180b===_0x2b1877)break;else _0x2ee220['push'](_0x2ee220['shift']());}catch(_0x28d417){_0x2ee220['push'](_0x2ee220['shift']());}}}(a23_0x665a,0x2d546));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';export function enrichAppListItemsWithMergedSelection(_0x39f81d,_0x2d86c9){const _0x40823c=a23_0x31cb;if(!_0x2d86c9)return;const _0x3e7b53=_0x2d86c9['apps']&&typeof _0x2d86c9[_0x40823c(0x91)]===_0x40823c(0x7a)?_0x2d86c9[_0x40823c(0x91)]:{},_0x22ba7b=Object[_0x40823c(0x80)](_0x3e7b53)[_0x40823c(0x8f)]>0x0;for(const _0x25f9f3 of _0x39f81d){_0x25f9f3[_0x40823c(0x85)]=![];}const _0x18d6a5=_0x2d86c9[_0x40823c(0x88)]!=null?String(_0x2d86c9[_0x40823c(0x88)])['trim']():'';if(_0x22ba7b){const _0x44af4d=_0x2d86c9[_0x40823c(0x92)]??_0x2d86c9[_0x40823c(0x7e)];if(_0x44af4d)for(const _0x5a70d0 of _0x39f81d){_0x5a70d0[_0x40823c(0x77)]===!![]&&_0x5a70d0[_0x40823c(0x8d)]===_0x44af4d&&(_0x5a70d0[_0x40823c(0x85)]=!![]);}for(const _0x33a08f of _0x39f81d){if(_0x33a08f['named']!==![])continue;if(_0x2d86c9[_0x40823c(0x7e)])continue;_0x18d6a5&&String(_0x33a08f['appcode']??'')['trim']()===_0x18d6a5&&(_0x33a08f[_0x40823c(0x85)]=!![]);}return;}if(!_0x18d6a5)return;for(const _0x5a9548 of _0x39f81d){String(_0x5a9548[_0x40823c(0x75)]??'')[_0x40823c(0x79)]()===_0x18d6a5&&(_0x5a9548[_0x40823c(0x85)]=!![]);}}function a23_0x665a(){const _0x4a0a04=['100JsrqOJ','call','91925QsYPBI','1093948gmHXvd','name','\x20(global)','length','prototype','apps','currentApp','1452003iKtKCV','appcode','4836kEWLEp','named','both','trim','object','hasOwnProperty','globalConfig','projectConfig','defaultApp','271230zgNPin','keys','global','1328232AsDjjn','6vbuSVz','project','isCurrent','inherit','1506258QSCKfJ','appCode'];a23_0x665a=function(){return _0x4a0a04;};return a23_0x665a();}export function resolveAppScopeForWrite(_0x57a5ac,_0x3fedc6,_0x2dcf8a){const _0x4ea47e=a23_0x31cb;if(_0x3fedc6)return _0x4ea47e(0x81);const _0x296a7a=_0x2dcf8a[_0x4ea47e(0x7d)]['apps']&&typeof _0x2dcf8a[_0x4ea47e(0x7d)]['apps']==='object'?_0x2dcf8a[_0x4ea47e(0x7d)][_0x4ea47e(0x91)]:{},_0x40936c=_0x2dcf8a[_0x4ea47e(0x7c)][_0x4ea47e(0x91)]&&typeof _0x2dcf8a[_0x4ea47e(0x7c)]['apps']===_0x4ea47e(0x7a)?_0x2dcf8a[_0x4ea47e(0x7c)]['apps']:{};if(Object['prototype'][_0x4ea47e(0x7b)][_0x4ea47e(0x8a)](_0x296a7a,_0x57a5ac))return _0x4ea47e(0x84);if(Object[_0x4ea47e(0x90)][_0x4ea47e(0x7b)]['call'](_0x40936c,_0x57a5ac))return _0x4ea47e(0x81);return'project';}export function appDefinedIn(_0x5e2886,_0x4b288b,_0x30cc43,_0x55feca){const _0x1c3f9d=a23_0x31cb;if(_0x55feca)return Object[_0x1c3f9d(0x90)][_0x1c3f9d(0x7b)][_0x1c3f9d(0x8a)](_0x30cc43,_0x5e2886)?'project':_0x1c3f9d(0x81);const _0x384a08=Object[_0x1c3f9d(0x90)][_0x1c3f9d(0x7b)][_0x1c3f9d(0x8a)](_0x4b288b,_0x5e2886),_0x58c115=Object[_0x1c3f9d(0x90)][_0x1c3f9d(0x7b)][_0x1c3f9d(0x8a)](_0x30cc43,_0x5e2886);if(_0x384a08&&_0x58c115)return _0x1c3f9d(0x78);if(_0x58c115)return'project';return _0x1c3f9d(0x81);}export function resolveDefaultAppSource(_0x24d0d0){const _0x36ad28=a23_0x31cb,_0x4c5ad2=_0x24d0d0['projectConfig'][_0x36ad28(0x91)]&&typeof _0x24d0d0[_0x36ad28(0x7d)][_0x36ad28(0x91)]==='object'?_0x24d0d0[_0x36ad28(0x7d)]['apps']:{};if(_0x36ad28(0x7e)in _0x24d0d0[_0x36ad28(0x7d)])return _0x36ad28(0x84);if(Object[_0x36ad28(0x80)](_0x4c5ad2)[_0x36ad28(0x8f)]>0x0)return _0x36ad28(0x84);if(_0x24d0d0['projectConfig'][_0x36ad28(0x86)]===![])return null;if(_0x24d0d0[_0x36ad28(0x7c)][_0x36ad28(0x7e)])return'global';return null;}export function getConfigPath(_0x38b952={}){const _0x30fa81=a23_0x31cb,_0x345718=_0x38b952[_0x30fa81(0x81)]?_0x30fa81(0x81):_0x30fa81(0x84);return resolveWriteConfigPath(_0x345718);}function a23_0x31cb(_0x26c4fa,_0x14d9e8){_0x26c4fa=_0x26c4fa-0x75;const _0x665a9a=a23_0x665a();let _0x31cb3c=_0x665a9a[_0x26c4fa];return _0x31cb3c;}export function readConfig(_0xf9d769={}){return readConfigFile(getConfigPath(_0xf9d769));}export function writeConfig(_0x31aa07,_0x20e929={}){writeConfigFile(getConfigPath(_0x20e929),_0x31aa07);}export function scopeLabel(_0x237cc9){const _0x58aabb=a23_0x31cb;return _0x237cc9[_0x58aabb(0x81)]?_0x58aabb(0x8e):'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a24_0x492ef8=a24_0x5244;(function(_0x3e1f58,_0x504475){const _0x456271=a24_0x5244,_0x15af14=_0x3e1f58();while(!![]){try{const _0x248927=-parseInt(_0x456271(0x118))/0x1+-parseInt(_0x456271(0x11e))/0x2*(parseInt(_0x456271(0x120))/0x3)+-parseInt(_0x456271(0x129))/0x4*(-parseInt(_0x456271(0x119))/0x5)+-parseInt(_0x456271(0x11c))/0x6*(-parseInt(_0x456271(0x124))/0x7)+parseInt(_0x456271(0x12d))/0x8*(parseInt(_0x456271(0x11f))/0x9)+-parseInt(_0x456271(0x12e))/0xa+-parseInt(_0x456271(0x126))/0xb*(-parseInt(_0x456271(0x121))/0xc);if(_0x248927===_0x504475)break;else _0x15af14['push'](_0x15af14['shift']());}catch(_0xdbbda3){_0x15af14['push'](_0x15af14['shift']());}}}(a24_0x1b00,0xc188c));function a24_0x1b00(){const _0x4931cf=['856206EoXmJx','2082bZjzlw','45996QdDLzd','Delete\x20one\x20runtime\x20app-config\x20key','appCode:\x20','1981AcEdsX','app-config','1199qmAshN','App\x20config\x20server\x20id\x20missing\x20for\x20key=','delete','1120BXEwVZ','validation','get','appCode','104SobsUi','13220600XEMxTQ','751589BGxEJF','9845wNzABm','isFinite',',\x20appCode=','29100ckuUOE','Deleted\x20app\x20config\x20','2052FVBRkd'];a24_0x1b00=function(){return _0x4931cf;};return a24_0x1b00();}function a24_0x5244(_0x4eadaf,_0x2fb88a){_0x4eadaf=_0x4eadaf-0x118;const _0x1b008f=a24_0x1b00();let _0x524461=_0x1b008f[_0x4eadaf];return _0x524461;}import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asAppConfigDryRunResult,buildMutationData,KEY_ARG,projectAppConfig,readKeyArg,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const DELETE_PATH='/smartapi/app-config/delete';export const appConfigDelete={'service':a24_0x492ef8(0x125),'command':a24_0x492ef8(0x128),'description':a24_0x492ef8(0x122),'risk':'high-risk-write','args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4f341f){readKeyArg(_0x4f341f);},async 'dryRun'(_0x5b6dc6){const _0x2e6f6d=a24_0x492ef8,_0x44e656=readKeyArg(_0x5b6dc6),_0x114bd0=await mustGetByKey(_0x5b6dc6[_0x2e6f6d(0x12c)],_0x44e656);return asAppConfigDryRunResult(buildMutationData({'operation':_0x2e6f6d(0x128),'appCode':_0x5b6dc6[_0x2e6f6d(0x12c)],'key':_0x44e656,'before':projectAppConfig(_0x114bd0),'after':null,'dryRun':!![]}),{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x5c1c0b){const _0x2209e8=a24_0x492ef8,_0xa21df2=readKeyArg(_0x5c1c0b),_0x52921b=await mustGetByKey(_0x5c1c0b[_0x2209e8(0x12c)],_0xa21df2);return await withAppConfigApiBoundary('delete',{'appCode':_0x5c1c0b['appCode'],'key':_0xa21df2},()=>deleteAppConfig({'appCode':_0x5c1c0b[_0x2209e8(0x12c)],'id':requireAppConfigId(_0x52921b,_0xa21df2,_0x5c1c0b['appCode'])})),{'ok':!![],'data':buildMutationData({'operation':_0x2209e8(0x128),'appCode':_0x5c1c0b[_0x2209e8(0x12c)],'key':_0xa21df2,'before':projectAppConfig(_0x52921b),'after':null,'dryRun':![]}),'message':_0x2209e8(0x11d)+_0xa21df2};}};async function mustGetByKey(_0xd1c8d0,_0x3f2ebe){const _0x5a8508=a24_0x492ef8,_0x27e165=await withAppConfigApiBoundary(_0x5a8508(0x12b),{'appCode':_0xd1c8d0,'key':_0x3f2ebe},()=>getAppConfigByKey(_0xd1c8d0,_0x3f2ebe));if(!_0x27e165)throw CliErrors[_0x5a8508(0x12a)]('App\x20config\x20key\x20not\x20found:\x20'+_0x3f2ebe,_0x5a8508(0x123)+_0xd1c8d0);return _0x27e165;}function requireAppConfigId(_0x2d2163,_0x2ec4c2,_0x42e2b5){const _0x44c5e3=a24_0x492ef8;if(typeof _0x2d2163['id']==='number'&&Number[_0x44c5e3(0x11a)](_0x2d2163['id'])&&_0x2d2163['id']>0x0)return _0x2d2163['id'];throw CliErrors['apiError'](_0x44c5e3(0x127)+_0x2ec4c2+_0x44c5e3(0x11b)+_0x42e2b5);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a25_0x581e98=a25_0x19e4;function a25_0x4ad3(){const _0x3fd532=['Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','Loaded\x20app\x20config\x20','bool','13706286DMXEhH','appCode','read','29910jFJuLS','4080616IvBnOq','2nuAtul','get','reveal','881737jTxlrB','\x20with\x20value\x20redacted','175LDfwWR','20ueRWzl','12jkkZAW','App\x20config\x20key\x20not\x20found:\x20','1386200SMYWBv','1588746EzFtyb','4007133uVPyPo','\x20with\x20value\x20revealed'];a25_0x4ad3=function(){return _0x3fd532;};return a25_0x4ad3();}(function(_0x41338b,_0x47f155){const _0x17bccb=a25_0x19e4,_0x16b2cc=_0x41338b();while(!![]){try{const _0x1bed50=-parseInt(_0x17bccb(0x165))/0x1+parseInt(_0x17bccb(0x177))/0x2*(parseInt(_0x17bccb(0x16c))/0x3)+-parseInt(_0x17bccb(0x169))/0x4*(-parseInt(_0x17bccb(0x16b))/0x5)+-parseInt(_0x17bccb(0x175))/0x6*(-parseInt(_0x17bccb(0x167))/0x7)+-parseInt(_0x17bccb(0x176))/0x8+-parseInt(_0x17bccb(0x16d))/0x9*(parseInt(_0x17bccb(0x168))/0xa)+parseInt(_0x17bccb(0x172))/0xb;if(_0x1bed50===_0x47f155)break;else _0x16b2cc['push'](_0x16b2cc['shift']());}catch(_0x2fbb2c){_0x16b2cc['push'](_0x16b2cc['shift']());}}}(a25_0x4ad3,0x6dc81));import{getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a25_0x19e4(_0x49d560,_0xfac1d5){_0x49d560=_0x49d560-0x163;const _0x4ad34a=a25_0x4ad3();let _0x19e4b7=_0x4ad34a[_0x49d560];return _0x19e4b7;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{KEY_ARG,projectAppConfig,readKeyArg,REVEAL_FLAG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigGet={'service':'app-config','command':a25_0x581e98(0x163),'description':a25_0x581e98(0x16f),'risk':a25_0x581e98(0x174),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x47d4ca){readKeyArg(_0x47d4ca);},async 'execute'(_0x3b80b9){const _0xd43fe2=a25_0x581e98,_0x46ef15=readKeyArg(_0x3b80b9),_0x58649c=await withAppConfigApiBoundary(_0xd43fe2(0x163),{'appCode':_0x3b80b9[_0xd43fe2(0x173)],'key':_0x46ef15},()=>getAppConfigByKey(_0x3b80b9[_0xd43fe2(0x173)],_0x46ef15));if(!_0x58649c)throw CliErrors['validation'](_0xd43fe2(0x16a)+_0x46ef15,'appCode:\x20'+_0x3b80b9[_0xd43fe2(0x173)]);const _0x68f99b=projectAppConfig(_0x58649c,{'reveal':_0x3b80b9[_0xd43fe2(0x171)](_0xd43fe2(0x164))});return{'ok':!![],'data':{'config':_0x68f99b},'message':_0x3b80b9[_0xd43fe2(0x171)]('reveal')?_0xd43fe2(0x170)+_0x46ef15+_0xd43fe2(0x16e):'Loaded\x20app\x20config\x20'+_0x46ef15+_0xd43fe2(0x166)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xdfee46,_0x54d3c4){const _0xd2072=a26_0x1bad,_0x38fbc7=_0xdfee46();while(!![]){try{const _0x401d55=parseInt(_0xd2072(0x78))/0x1*(-parseInt(_0xd2072(0x7f))/0x2)+-parseInt(_0xd2072(0x7c))/0x3*(-parseInt(_0xd2072(0x7a))/0x4)+-parseInt(_0xd2072(0x76))/0x5*(parseInt(_0xd2072(0x7b))/0x6)+parseInt(_0xd2072(0x75))/0x7+-parseInt(_0xd2072(0x79))/0x8+parseInt(_0xd2072(0x7d))/0x9+parseInt(_0xd2072(0x77))/0xa*(parseInt(_0xd2072(0x7e))/0xb);if(_0x401d55===_0x54d3c4)break;else _0x38fbc7['push'](_0x38fbc7['shift']());}catch(_0x4840c6){_0x38fbc7['push'](_0x38fbc7['shift']());}}}(a26_0x26c2,0x4e4d2));import{appConfigList}from'../../commands/app-config/list.js';function a26_0x1bad(_0x4c66c4,_0x1925d3){_0x4c66c4=_0x4c66c4-0x75;const _0x26c2c0=a26_0x26c2();let _0x1bad61=_0x26c2c0[_0x4c66c4];return _0x1bad61;}import{appConfigGet}from'../../commands/app-config/get.js';import{appConfigSet}from'../../commands/app-config/set.js';import{appConfigDelete}from'../../commands/app-config/delete.js';export const appConfigDefinitions=[appConfigList,appConfigGet,appConfigSet,appConfigDelete];function a26_0x26c2(){const _0x2e87eb=['143KvViQJ','1091234LPjMAV','1402856yHBExA','970YCPdiI','709730NevTQF','1BTehYo','3280192IukeGU','21636SNmSbo','15726qCELWw','243AUOLZy','2012859joJodI'];a26_0x26c2=function(){return _0x2e87eb;};return a26_0x26c2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a27_0x1ab59e=a27_0x2316;(function(_0x37bd8c,_0x5be360){const _0x33f298=a27_0x2316,_0x544b9d=_0x37bd8c();while(!![]){try{const _0x53397f=parseInt(_0x33f298(0xc8))/0x1*(-parseInt(_0x33f298(0xd2))/0x2)+parseInt(_0x33f298(0xcf))/0x3*(parseInt(_0x33f298(0xc3))/0x4)+-parseInt(_0x33f298(0xc9))/0x5+-parseInt(_0x33f298(0xc1))/0x6+-parseInt(_0x33f298(0xcb))/0x7+parseInt(_0x33f298(0xc0))/0x8*(-parseInt(_0x33f298(0xcd))/0x9)+-parseInt(_0x33f298(0xcc))/0xa*(-parseInt(_0x33f298(0xc5))/0xb);if(_0x53397f===_0x5be360)break;else _0x544b9d['push'](_0x544b9d['shift']());}catch(_0x15c2ee){_0x544b9d['push'](_0x544b9d['shift']());}}}(a27_0x203f,0x3c651));import{listAppConfigs}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectAppConfig,readOptionalTags,TAGS_FLAG,validateKey,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';function a27_0x203f(){const _0x4219a8=['trim','key','List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','3968GZFNFT','2945778DCtgqF','str','4VGpLyE','map','11FouAYu','list','Found\x20','1oYyhxY','980875YcbcSz','app-config','125104VPbwsS','13560730nrlvAD','4707xNJXJN','string','16221kVmRdG','length','Filter\x20by\x20exact\x20config\x20key','299370gLVMwi','read','appCode'];a27_0x203f=function(){return _0x4219a8;};return a27_0x203f();}function a27_0x2316(_0x31c057,_0x3a3629){_0x31c057=_0x31c057-0xbd;const _0x203f9a=a27_0x203f();let _0x2316cf=_0x203f9a[_0x31c057];return _0x2316cf;}export const appConfigList={'service':a27_0x1ab59e(0xca),'command':a27_0x1ab59e(0xc6),'description':a27_0x1ab59e(0xbf),'risk':a27_0x1ab59e(0xd3),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'key','type':a27_0x1ab59e(0xce),'description':a27_0x1ab59e(0xd1)},TAGS_FLAG],async 'validate'(_0x4a0d5b){const _0x10c614=a27_0x1ab59e,_0x5a74a2=_0x4a0d5b[_0x10c614(0xc2)](_0x10c614(0xbe))['trim']();if(_0x5a74a2)validateKey(_0x5a74a2);readOptionalTags(_0x4a0d5b);},async 'execute'(_0x568340){const _0x5eb886=a27_0x1ab59e,_0x105a0c=_0x568340[_0x5eb886(0xc2)](_0x5eb886(0xbe))[_0x5eb886(0xbd)]()||undefined,_0x198c16=readOptionalTags(_0x568340),_0x4546cc=await withAppConfigApiBoundary(_0x5eb886(0xc6),{'appCode':_0x568340[_0x5eb886(0xd4)]},()=>listAppConfigs(_0x568340[_0x5eb886(0xd4)],{'key':_0x105a0c,'tags':_0x198c16})),_0x444d8f=_0x4546cc[_0x5eb886(0xc4)](_0x3c3d39=>projectAppConfig(_0x3c3d39));return{'ok':!![],'data':{'appCode':_0x568340[_0x5eb886(0xd4)],'count':_0x444d8f[_0x5eb886(0xd0)],'configs':_0x444d8f},'message':_0x5eb886(0xc7)+_0x444d8f[_0x5eb886(0xd0)]+'\x20app\x20config(s)'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a28_0x5c9a1f=a28_0x4cc3;function a28_0x38a4(){const _0x1f5255=['high-risk-write','tags',',\x20appCode=','isFinite','\x20app\x20config\x20','create','appCode','string','Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','4389010kZJLdE','1462664sqnAfV','158564OaqTrK','Read\x20config\x20value\x20from\x20file','update','3412476NBgprS','3LXjbdF','30ezMzNx','619157FShLas','1695466hMGAdA','7dcOkRH','935245JMnOUJ','get','app-config'];a28_0x38a4=function(){return _0x1f5255;};return a28_0x38a4();}(function(_0x2966b6,_0x486cbc){const _0x459293=a28_0x4cc3,_0x2dda5c=_0x2966b6();while(!![]){try{const _0xdf25e5=parseInt(_0x459293(0xd8))/0x1+parseInt(_0x459293(0xd9))/0x2*(-parseInt(_0x459293(0xd6))/0x3)+parseInt(_0x459293(0xe9))/0x4+parseInt(_0x459293(0xdb))/0x5*(parseInt(_0x459293(0xd7))/0x6)+parseInt(_0x459293(0xda))/0x7*(-parseInt(_0x459293(0xe8))/0x8)+-parseInt(_0x459293(0xd5))/0x9+parseInt(_0x459293(0xe7))/0xa;if(_0xdf25e5===_0x486cbc)break;else _0x2dda5c['push'](_0x2dda5c['shift']());}catch(_0x2ab0df){_0x2dda5c['push'](_0x2dda5c['shift']());}}}(a28_0x38a4,0x9826e));import{createAppConfig,getAppConfigByKey,updateAppConfig}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assertSingleValueSource,assertValueSourceReadable,asAppConfigDryRunResult,buildMutationData,FROM_ENV_FLAG,KEY_ARG,plannedAppConfig,projectAppConfig,readAppConfigValue,readKeyArg,readOptionalTags,STDIN_FLAG,TAGS_FLAG,VALUE_ARG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const CREATE_PATH='/smartapi/app-config/create',UPDATE_PATH='/smartapi/app-config/update';function a28_0x4cc3(_0x49e4ed,_0x1d10e1){_0x49e4ed=_0x49e4ed-0xd4;const _0x38a46d=a28_0x38a4();let _0x4cc321=_0x38a46d[_0x49e4ed];return _0x4cc321;}export const appConfigSet={'service':a28_0x5c9a1f(0xdd),'command':'set','description':a28_0x5c9a1f(0xe6),'risk':a28_0x5c9a1f(0xde),'args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':'file','type':a28_0x5c9a1f(0xe5),'description':a28_0x5c9a1f(0xea)}],async 'validate'(_0x29de49){readKeyArg(_0x29de49),readOptionalTags(_0x29de49),assertSingleValueSource(_0x29de49);},async 'dryRun'(_0x16dd67){const _0x2d7f05=a28_0x5c9a1f,_0x496781=readKeyArg(_0x16dd67),_0x190d3b=readOptionalTags(_0x16dd67),_0x32b98d=assertSingleValueSource(_0x16dd67);await assertValueSourceReadable(_0x32b98d);const _0x22fac9=await withAppConfigApiBoundary(_0x2d7f05(0xdc),{'appCode':_0x16dd67[_0x2d7f05(0xe4)],'key':_0x496781},()=>getAppConfigByKey(_0x16dd67[_0x2d7f05(0xe4)],_0x496781)),_0x4d46da=_0x22fac9?_0x2d7f05(0xd4):_0x2d7f05(0xe3),_0x57cc03=_0x22fac9?projectAppConfig(_0x22fac9):null,_0x5e0be4=plannedAppConfig({'appCode':_0x16dd67[_0x2d7f05(0xe4)],'key':_0x496781,'tags':_0x190d3b??_0x22fac9?.[_0x2d7f05(0xdf)],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x4d46da,'appCode':_0x16dd67['appCode'],'key':_0x496781,'before':_0x57cc03,'after':_0x5e0be4,'dryRun':!![]}),{'method':'POST','url':_0x4d46da===_0x2d7f05(0xd4)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x2723d0){const _0x5808a9=a28_0x5c9a1f,_0x3fa2ee=readKeyArg(_0x2723d0),_0x2edbf2=readOptionalTags(_0x2723d0),_0x3b6d3d=await withAppConfigApiBoundary('get',{'appCode':_0x2723d0[_0x5808a9(0xe4)],'key':_0x3fa2ee},()=>getAppConfigByKey(_0x2723d0[_0x5808a9(0xe4)],_0x3fa2ee)),_0x502364=_0x3b6d3d?projectAppConfig(_0x3b6d3d):null,_0x23bdf4=_0x3b6d3d?'update':_0x5808a9(0xe3),{value:_0x291c25,warnings:_0x26d88a}=await readAppConfigValue(_0x2723d0),_0x5656e8={'appCode':_0x2723d0['appCode'],'key':_0x3fa2ee,'value':_0x291c25,'tags':_0x2edbf2??_0x3b6d3d?.[_0x5808a9(0xdf)]??undefined};await withAppConfigApiBoundary(_0x23bdf4,{'appCode':_0x2723d0[_0x5808a9(0xe4)],'key':_0x3fa2ee},async()=>{const _0x5c7293=_0x5808a9;_0x3b6d3d?await updateAppConfig({..._0x5656e8,'id':requireAppConfigId(_0x3b6d3d,_0x3fa2ee,_0x2723d0[_0x5c7293(0xe4)])}):await createAppConfig(_0x5656e8);});const _0x4a6cc6=await withAppConfigApiBoundary(_0x5808a9(0xdc),{'appCode':_0x2723d0[_0x5808a9(0xe4)],'key':_0x3fa2ee},()=>getAppConfigByKey(_0x2723d0['appCode'],_0x3fa2ee)),_0x4939a0=_0x4a6cc6?projectAppConfig(_0x4a6cc6):plannedAppConfig({'appCode':_0x2723d0['appCode'],'key':_0x3fa2ee,'tags':_0x5656e8[_0x5808a9(0xdf)],'hasValue':_0x291c25!==''});return{'ok':!![],'data':buildMutationData({'operation':_0x23bdf4,'appCode':_0x2723d0[_0x5808a9(0xe4)],'key':_0x3fa2ee,'before':_0x502364,'after':_0x4939a0,'dryRun':![],'warnings':_0x26d88a}),'message':(_0x23bdf4==='update'?'Updated':'Created')+_0x5808a9(0xe2)+_0x3fa2ee};}};function requireAppConfigId(_0x2bb3c1,_0x10b1ee,_0x52af51){const _0x5c1e82=a28_0x5c9a1f;if(typeof _0x2bb3c1['id']==='number'&&Number[_0x5c1e82(0xe1)](_0x2bb3c1['id'])&&_0x2bb3c1['id']>0x0)return _0x2bb3c1['id'];throw CliErrors['apiError']('App\x20config\x20server\x20id\x20missing\x20for\x20key='+_0x10b1ee+_0x5c1e82(0xe0)+_0x52af51);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a29_0x5bf7ad=a29_0x56cc;(function(_0x359a4b,_0x2c2e40){const _0x35b588=a29_0x56cc,_0x576136=_0x359a4b();while(!![]){try{const _0x1f6997=-parseInt(_0x35b588(0x17e))/0x1+parseInt(_0x35b588(0x15e))/0x2*(parseInt(_0x35b588(0x181))/0x3)+parseInt(_0x35b588(0x174))/0x4+parseInt(_0x35b588(0x190))/0x5+parseInt(_0x35b588(0x188))/0x6+parseInt(_0x35b588(0x196))/0x7*(-parseInt(_0x35b588(0x15d))/0x8)+-parseInt(_0x35b588(0x187))/0x9;if(_0x1f6997===_0x2c2e40)break;else _0x576136['push'](_0x576136['shift']());}catch(_0x520974){_0x576136['push'](_0x576136['shift']());}}}(a29_0x583c,0xa6304));import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':a29_0x5bf7ad(0x197),'description':a29_0x5bf7ad(0x17c),'required':!![]};export const VALUE_ARG={'name':a29_0x5bf7ad(0x177),'description':a29_0x5bf7ad(0x163),'required':![]};export const TAGS_FLAG={'name':'tags','type':a29_0x5bf7ad(0x18b),'description':a29_0x5bf7ad(0x195)};export const STDIN_FLAG={'name':a29_0x5bf7ad(0x16d),'type':a29_0x5bf7ad(0x17d),'description':a29_0x5bf7ad(0x162),'default':![]};export const FROM_ENV_FLAG={'name':a29_0x5bf7ad(0x169),'type':a29_0x5bf7ad(0x18b),'description':'Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable'};export const REVEAL_FLAG={'name':a29_0x5bf7ad(0x172),'type':a29_0x5bf7ad(0x17d),'description':'Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','default':![]};function a29_0x583c(){const _0x47cee4=['8tHtFqH','120ZJrsOE','before','Value\x20file\x20is\x20not\x20readable:\x20','after','Read\x20config\x20value\x20from\x20stdin','Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','bool','key:\x20','App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.','path','push','from-env','gmtCreate','file','validation','stdin','appCode:\x20','name','operation','argument','reveal','slice','2759024PMnCab','url','trim','value','tags','Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','end','Environment\x20variable\x20is\x20not\x20set:\x20','Runtime\x20app-config\x20key','boolean','772111GpRMdk','method','kind','39672wvWpkS','gmtModified','dryRun','env','App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.','appCode','4957659CKPUsG','5637192WmlPmB','str','utf8','string','Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','join','once','Missing\x20app-config\x20value\x20source.','619585ZaSZzP','defineProperties','apiError','flag','hasValue','Config\x20tags\x20for\x20filtering/display\x20metadata','3800825wkWZrY','key','Failed\x20to\x20','length','args','valueRedacted'];a29_0x583c=function(){return _0x47cee4;};return a29_0x583c();}export function readKeyArg(_0x143fe5){const _0x319e83=a29_0x5bf7ad,_0x489d31=_0x143fe5[_0x319e83(0x19a)][0x0]?.[_0x319e83(0x176)]()??'';return validateKey(_0x489d31),_0x489d31;}export function readOptionalTags(_0x477773){const _0x465b35=a29_0x5bf7ad,_0x48ede8=_0x477773['str'](_0x465b35(0x178))['trim']();if(!_0x48ede8)return undefined;if(_0x48ede8['length']>0x20)throw CliErrors[_0x465b35(0x16c)](_0x465b35(0x166));return _0x48ede8;}export function validateKey(_0x4b42a7){const _0x27cf88=a29_0x5bf7ad;if(!_0x4b42a7)throw CliErrors[_0x27cf88(0x16c)]('Missing\x20app-config\x20key.');if(_0x4b42a7[_0x27cf88(0x199)]>0x100)throw CliErrors[_0x27cf88(0x16c)](_0x27cf88(0x185));}export function projectAppConfig(_0x4ec447,_0x18a0e1){const _0xe969b3=a29_0x5bf7ad,_0x4fa175=_0x4ec447[_0xe969b3(0x177)]!==undefined&&_0x4ec447['value']!==null&&_0x4ec447[_0xe969b3(0x177)]!=='',_0x4a6c3b={'appCode':_0x4ec447[_0xe969b3(0x186)],'key':_0x4ec447['key'],'tags':_0x4ec447[_0xe969b3(0x178)]??undefined,'hasValue':_0x4fa175,'valueRedacted':_0x4fa175&&!_0x18a0e1?.[_0xe969b3(0x172)],'gmtCreate':_0x4ec447[_0xe969b3(0x16a)],'gmtModified':_0x4ec447[_0xe969b3(0x182)]};return _0x18a0e1?.[_0xe969b3(0x172)]&&(_0x4a6c3b[_0xe969b3(0x177)]=_0x4ec447[_0xe969b3(0x177)]??'',_0x4a6c3b[_0xe969b3(0x19b)]=![]),_0x4a6c3b;}export function plannedAppConfig(_0x371d41){const _0x1b6c29=a29_0x5bf7ad,_0x37e5f2=_0x371d41[_0x1b6c29(0x194)]??!![];return{'appCode':_0x371d41['appCode'],'key':_0x371d41[_0x1b6c29(0x197)],'tags':_0x371d41['tags']??undefined,'hasValue':_0x37e5f2,'valueRedacted':_0x37e5f2};}export function buildMutationData(_0x111887){const _0x1d34a1=a29_0x5bf7ad;return{'operation':_0x111887[_0x1d34a1(0x170)],'selector':{'appCode':_0x111887[_0x1d34a1(0x186)],'key':_0x111887[_0x1d34a1(0x197)]},'before':_0x111887[_0x1d34a1(0x15f)],'after':_0x111887[_0x1d34a1(0x161)],'dryRun':_0x111887[_0x1d34a1(0x183)],'warnings':_0x111887['warnings']??[]};}export async function withAppConfigApiBoundary(_0x4885e9,_0x48682f,_0x3d5a12){const _0xb7b4c0=a29_0x5bf7ad;try{return await _0x3d5a12();}catch{const _0x23a02b=[_0xb7b4c0(0x16e)+_0x48682f['appCode']];if(_0x48682f[_0xb7b4c0(0x197)])_0x23a02b['push'](_0xb7b4c0(0x165)+_0x48682f['key']);_0x23a02b['push']('value\x20is\x20redacted');throw CliErrors[_0xb7b4c0(0x192)](_0xb7b4c0(0x198)+_0x4885e9+'\x20app\x20config.',_0x23a02b[_0xb7b4c0(0x18d)](';\x20')+'.');}}export function asAppConfigDryRunResult(_0x3f8aa9,_0x218a8e){const _0x1d638e=a29_0x5bf7ad;return Object[_0x1d638e(0x191)](_0x3f8aa9,{'method':{'value':_0x218a8e[_0x1d638e(0x17f)],'enumerable':![]},'url':{'value':_0x218a8e[_0x1d638e(0x175)],'enumerable':![]}});}export function assertSingleValueSource(_0x5caef1){const _0x1978de=a29_0x5bf7ad,_0x109cba=[];_0x5caef1[_0x1978de(0x19a)]['length']>0x1&&_0x109cba['push']({'kind':'argument','value':_0x5caef1['args'][_0x1978de(0x173)](0x1)[_0x1978de(0x18d)]('\x20')});const _0x4bc67e=_0x5caef1[_0x1978de(0x193)](_0x1978de(0x177));_0x4bc67e!==undefined&&_0x4bc67e!==null&&_0x109cba[_0x1978de(0x168)]({'kind':'argument','value':String(_0x4bc67e)});_0x5caef1[_0x1978de(0x164)](_0x1978de(0x16d))&&_0x109cba['push']({'kind':_0x1978de(0x16d)});const _0x398109=_0x5caef1[_0x1978de(0x189)]('from-env')[_0x1978de(0x176)]();_0x398109&&_0x109cba[_0x1978de(0x168)]({'kind':_0x1978de(0x184),'name':_0x398109});const _0x304dd3=_0x5caef1['str'](_0x1978de(0x16b))[_0x1978de(0x176)]();_0x304dd3&&_0x109cba['push']({'kind':_0x1978de(0x16b),'path':_0x304dd3});if(_0x109cba['length']===0x0)throw CliErrors[_0x1978de(0x16c)](_0x1978de(0x18f),_0x1978de(0x179));if(_0x109cba[_0x1978de(0x199)]>0x1)throw CliErrors['validation']('App\x20config\x20value\x20source\x20is\x20ambiguous.',_0x1978de(0x18c));return _0x109cba[0x0];}export async function assertValueSourceReadable(_0x14e2a5){const _0x3326fc=a29_0x5bf7ad;if(_0x14e2a5['kind']===_0x3326fc(0x184)&&!(_0x14e2a5['name']in process.env))throw CliErrors['validation'](_0x3326fc(0x17b)+_0x14e2a5['name']);if(_0x14e2a5[_0x3326fc(0x180)]===_0x3326fc(0x16b))try{await access(_0x14e2a5[_0x3326fc(0x167)]);}catch{throw CliErrors[_0x3326fc(0x16c)](_0x3326fc(0x160)+_0x14e2a5[_0x3326fc(0x167)]);}}function a29_0x56cc(_0x65d998,_0xe3bf8b){_0x65d998=_0x65d998-0x15d;const _0x583c3c=a29_0x583c();let _0x56cc36=_0x583c3c[_0x65d998];return _0x56cc36;}export async function readAppConfigValue(_0x55087d){const _0x1b807c=a29_0x5bf7ad,_0x1d2001=assertSingleValueSource(_0x55087d),_0x55d4fb=[];if(_0x1d2001[_0x1b807c(0x180)]===_0x1b807c(0x171))return _0x55d4fb[_0x1b807c(0x168)]('Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.'),{'value':_0x1d2001[_0x1b807c(0x177)]??'','source':_0x1d2001['kind'],'warnings':_0x55d4fb};if(_0x1d2001[_0x1b807c(0x180)]===_0x1b807c(0x16d))return{'value':await readStdin(),'source':_0x1d2001['kind'],'warnings':_0x55d4fb};if(_0x1d2001[_0x1b807c(0x180)]===_0x1b807c(0x184)){if(!(_0x1d2001[_0x1b807c(0x16f)]in process.env))throw CliErrors['validation']('Environment\x20variable\x20is\x20not\x20set:\x20'+_0x1d2001[_0x1b807c(0x16f)]);return{'value':process.env[_0x1d2001.name]??'','source':_0x1d2001[_0x1b807c(0x180)],'warnings':_0x55d4fb};}return{'value':await readFile(_0x1d2001[_0x1b807c(0x167)],_0x1b807c(0x18a)),'source':_0x1d2001['kind'],'warnings':_0x55d4fb};}function readStdin(){return new Promise((_0x2b43c9,_0x392ea7)=>{const _0x5a0449=a29_0x56cc;let _0x187c1b='';process[_0x5a0449(0x16d)]['setEncoding'](_0x5a0449(0x18a)),process['stdin']['on']('data',_0x4d80d4=>{_0x187c1b+=_0x4d80d4;}),process['stdin']['once'](_0x5a0449(0x17a),()=>_0x2b43c9(_0x187c1b)),process[_0x5a0449(0x16d)][_0x5a0449(0x18e)]('error',_0x392ea7);});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a30_0x56ee6f=a30_0x2c1a;function a30_0xcb09(){const _0x1c27f0=['write','!\x20Not\x20logged\x20in','282CCgkit','289ozRWHk','10667160Hwfitu','6fcXrNf','2631060PZTMaH','../../auth/auth-server-ui.js','Login\x20via\x20browser','2054sGhaOT','auth','login','8263340TkTRFJ','yes','11vcZadw','nonInteractive','Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','1910496FNAkCs','469YgDEKn','bool','98000HsEupo','read','log','33245arvbvN'];a30_0xcb09=function(){return _0x1c27f0;};return a30_0xcb09();}(function(_0x1123e7,_0x266fba){const _0x2eb503=a30_0x2c1a,_0x192e09=_0x1123e7();while(!![]){try{const _0x4bec50=-parseInt(_0x2eb503(0x178))/0x1*(-parseInt(_0x2eb503(0x166))/0x2)+parseInt(_0x2eb503(0x17a))/0x3*(parseInt(_0x2eb503(0x16e))/0x4)+parseInt(_0x2eb503(0x174))/0x5*(parseInt(_0x2eb503(0x177))/0x6)+parseInt(_0x2eb503(0x16f))/0x7*(parseInt(_0x2eb503(0x171))/0x8)+-parseInt(_0x2eb503(0x179))/0x9+-parseInt(_0x2eb503(0x169))/0xa+parseInt(_0x2eb503(0x16b))/0xb*(parseInt(_0x2eb503(0x17b))/0xc);if(_0x4bec50===_0x266fba)break;else _0x192e09['push'](_0x192e09['shift']());}catch(_0x379970){_0x192e09['push'](_0x192e09['shift']());}}}(a30_0xcb09,0x90c59));function a30_0x2c1a(_0x3395e5,_0x245390){_0x3395e5=_0x3395e5-0x166;const _0xcb09b8=a30_0xcb09();let _0x2c1a08=_0xcb09b8[_0x3395e5];return _0x2c1a08;}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':a30_0x56ee6f(0x167),'command':a30_0x56ee6f(0x168),'description':a30_0x56ee6f(0x17d),'risk':a30_0x56ee6f(0x172),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a30_0x56ee6f(0x16a),'type':'boolean','description':a30_0x56ee6f(0x16d),'default':![]}],async 'execute'(_0x510380){const _0x333354=a30_0x56ee6f,{runAuthServer:_0x89dcc2}=await import(_0x333354(0x17c));return await _0x89dcc2({'autoYes':_0x510380[_0x333354(0x170)](_0x333354(0x16a)),'nonInteractive':_0x510380[_0x333354(0x16c)]}),{'ok':!![]};}},{'service':'auth','command':'logout','description':'Clear\x20login\x20session','risk':a30_0x56ee6f(0x175),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x200157){const _0x273b87=a30_0x56ee6f;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x273b87(0x173)]('✓\x20Logged\x20out')):console['log'](_0x273b87(0x176)),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a31_0x4678cf=a31_0x1cf0;(function(_0x29fc8e,_0x5464d1){const _0x340625=a31_0x1cf0,_0x169c8d=_0x29fc8e();while(!![]){try{const _0x50e0c8=parseInt(_0x340625(0x141))/0x1*(-parseInt(_0x340625(0x183))/0x2)+parseInt(_0x340625(0x180))/0x3+-parseInt(_0x340625(0x17e))/0x4*(-parseInt(_0x340625(0x145))/0x5)+parseInt(_0x340625(0x14c))/0x6*(-parseInt(_0x340625(0x16e))/0x7)+-parseInt(_0x340625(0x146))/0x8*(-parseInt(_0x340625(0x169))/0x9)+parseInt(_0x340625(0x178))/0xa+-parseInt(_0x340625(0x134))/0xb;if(_0x50e0c8===_0x5464d1)break;else _0x169c8d['push'](_0x169c8d['shift']());}catch(_0x6863b1){_0x169c8d['push'](_0x169c8d['shift']());}}}(a31_0x2333,0xedddb));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';import{dirname,join}from'node:path';import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';import{isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const bffCreate={'service':a31_0x4678cf(0x133),'command':a31_0x4678cf(0x161),'description':a31_0x4678cf(0x17f),'risk':a31_0x4678cf(0x15f),'flags':[{'name':'type','type':a31_0x4678cf(0x13f),'required':!![],'enum':[a31_0x4678cf(0x17c),a31_0x4678cf(0x143),a31_0x4678cf(0x16b)],'description':a31_0x4678cf(0x182)},{'name':'name','type':a31_0x4678cf(0x13f),'required':!![],'description':a31_0x4678cf(0x132)},{'name':'description','type':a31_0x4678cf(0x13f),'description':a31_0x4678cf(0x176)},{'name':a31_0x4678cf(0x15d),'type':a31_0x4678cf(0x13f),'description':'Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)'},{'name':a31_0x4678cf(0x158),'type':'string','description':a31_0x4678cf(0x160)},{'name':'operation-type','type':a31_0x4678cf(0x13f),'description':a31_0x4678cf(0x138)},{'name':a31_0x4678cf(0x13d),'type':a31_0x4678cf(0x13f),'description':a31_0x4678cf(0x142),'enum':[a31_0x4678cf(0x152),'after']}],async 'validate'(_0x519b3b){const _0x1ece97=a31_0x4678cf,_0x352807=_0x519b3b[_0x1ece97(0x16d)](_0x1ece97(0x14a));if(!isValidBffFunctionName(_0x352807))throw CliErrors['validation']('Invalid\x20function\x20name\x20\x22'+_0x352807+'\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).');},async 'execute'(_0x2e0292){const _0xdc5421=a31_0x4678cf,_0x9529e0=loadBffProjectConfig(_0x2e0292[_0xdc5421(0x167)]),_0x31ab18=_0x2e0292[_0xdc5421(0x16d)](_0xdc5421(0x173)),_0x42abae=_0x2e0292[_0xdc5421(0x16d)](_0xdc5421(0x14a)),_0x71f5c1=_0x2e0292[_0xdc5421(0x16d)](_0xdc5421(0x163))||undefined,_0x4c6b67=_0x31ab18===_0xdc5421(0x16b)?await resolveHookOptions(_0x9529e0,_0x2e0292):undefined,_0x2c5f91=buildFilePath(_0x9529e0,_0x31ab18,_0x42abae,_0x4c6b67);if(await fileExists(_0x2c5f91))throw CliErrors['validation']('File\x20already\x20exists:\x20'+_0x2c5f91);await mkdir(dirname(_0x2c5f91),{'recursive':!![]});const _0x5523a6=generateTemplate(_0x31ab18,_0x42abae,_0x2e0292[_0xdc5421(0x167)],_0x71f5c1,_0x4c6b67);await writeFile(_0x2c5f91,_0x5523a6,'utf8');const _0x2b2bcf={'type':_0x31ab18,'name':_0x42abae,'path':_0x2c5f91};if(_0x71f5c1)_0x2b2bcf['description']=_0x71f5c1;if(_0x4c6b67){if(_0x4c6b67['alias'])_0x2b2bcf[_0xdc5421(0x15d)]=_0x4c6b67[_0xdc5421(0x15d)];_0x2b2bcf['datasetCode']=_0x4c6b67[_0xdc5421(0x13a)],_0x2b2bcf[_0xdc5421(0x13e)]=_0x4c6b67[_0xdc5421(0x13e)],_0x2b2bcf[_0xdc5421(0x12d)]=_0x4c6b67[_0xdc5421(0x12d)];}return{'ok':!![],'data':_0x2b2bcf,'message':_0xdc5421(0x140)+_0x31ab18+_0xdc5421(0x171)+_0x42abae};}};async function resolveHookOptions(_0x3cb4eb,_0x538ced){const _0x32f362=a31_0x4678cf,_0x48cd8f=loadAliasMap(_0x538ced['apiDir'],undefined,resolveApiFilePath(_0x538ced[_0x32f362(0x15e)],_0x538ced['appCode'])),_0x1f8107=_0x48cd8f[_0x32f362(0x131)]>0x0;let _0x5edf7d,_0x168cf4,_0x5ee40d;const _0x4d562c=_0x538ced['str'](_0x32f362(0x15d)),_0x330b62=_0x538ced[_0x32f362(0x16d)](_0x32f362(0x158));if(_0x4d562c){const _0x1b88c0=resolveAlias(_0x538ced[_0x32f362(0x15e)],_0x4d562c,undefined,resolveApiFilePath(_0x538ced[_0x32f362(0x15e)],_0x538ced[_0x32f362(0x167)]));if(!_0x1b88c0){const _0xc5d841=_0x1f8107?'Available\x20aliases:\x20'+_0x48cd8f[_0x32f362(0x14f)](_0x30de5c=>_0x30de5c[_0x32f362(0x15d)])['join'](',\x20'):_0x32f362(0x17a)+CLI_BIN_NAME+_0x32f362(0x149);throw CliErrors[_0x32f362(0x175)]('Alias\x20\x22'+_0x4d562c+'\x22\x20not\x20found.\x20'+_0xc5d841);}_0x5edf7d=_0x4d562c,_0x168cf4=_0x1b88c0;}else{if(_0x330b62){_0x168cf4=_0x330b62;const _0x4c6d18=_0x48cd8f[_0x32f362(0x184)](_0x4c4a45=>_0x4c4a45[_0x32f362(0x13a)]===_0x330b62);_0x5edf7d=_0x4c6d18?.[_0x32f362(0x15d)];}else{if(_0x538ced[_0x32f362(0x172)])throw CliErrors['validation'](_0x32f362(0x16f));else{if(_0x1f8107){const _0x50d969=_0x48cd8f[_0x32f362(0x14f)](_0x353ffb=>_0x353ffb[_0x32f362(0x15d)]+'\x20('+_0x353ffb[_0x32f362(0x147)]+')'),_0x21d3cb=await promptSelect(_0x32f362(0x17b),_0x50d969),_0x21b58d=_0x48cd8f[_0x21d3cb];if(!_0x21b58d)throw CliErrors[_0x32f362(0x175)](_0x32f362(0x185));_0x5edf7d=_0x21b58d['alias'],_0x168cf4=_0x21b58d[_0x32f362(0x13a)];}else{const _0x20633a=await listDatasets(_0x538ced['appCode']);if(_0x20633a[_0x32f362(0x131)]===0x0)throw CliErrors['validation']('No\x20datasets\x20found\x20for\x20this\x20app.');const _0x59f499=_0x20633a['map'](_0xdc957a=>_0xdc957a['name']+'\x20['+(_0xdc957a[_0x32f362(0x153)]??_0x32f362(0x164))+_0x32f362(0x137)+_0xdc957a[_0x32f362(0x177)]+')'),_0x2aba43=await promptSelect(_0x32f362(0x17b),_0x59f499),_0x11e9ed=_0x20633a[_0x2aba43];if(!_0x11e9ed)throw CliErrors[_0x32f362(0x175)](_0x32f362(0x185));_0x168cf4=_0x11e9ed[_0x32f362(0x177)],_0x5edf7d=undefined;}}}}const _0x371503=await listDatasets(_0x538ced[_0x32f362(0x167)]),_0x3c84ae=_0x371503[_0x32f362(0x184)](_0x31a6c4=>_0x31a6c4[_0x32f362(0x177)]===_0x168cf4);if(!_0x3c84ae)throw CliErrors['validation'](_0x32f362(0x165)+_0x168cf4+'\x22.\x20'+(_0x5edf7d?_0x32f362(0x17d)+CLI_BIN_NAME+_0x32f362(0x170):''));_0x5ee40d=_0x3c84ae['id'];const _0x2a6610=_0x5edf7d??_0x168cf4,_0x519503=await listBffDatasetOperations(_0x538ced[_0x32f362(0x167)],_0x5ee40d),_0x577fdc=_0x519503?Object[_0x32f362(0x130)](_0x519503):[];if(_0x577fdc[_0x32f362(0x131)]===0x0)throw CliErrors[_0x32f362(0x175)](_0x32f362(0x16c)+_0x2a6610+'.');let _0x4f4d9a;const _0xd73514=_0x538ced['str'](_0x32f362(0x12f));if(_0xd73514){if(!_0x577fdc[_0x32f362(0x168)](_0xd73514))throw CliErrors[_0x32f362(0x175)]('Operation\x20type\x20\x22'+_0xd73514+'\x22\x20not\x20found\x20for\x20dataset\x20'+_0x2a6610+'.\x20'+(_0x32f362(0x135)+_0x577fdc[_0x32f362(0x136)](',\x20')));_0x4f4d9a=_0xd73514;}else{if(_0x538ced[_0x32f362(0x172)])throw CliErrors[_0x32f362(0x175)]('--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');const _0x1582fb=await promptSelect(_0x32f362(0x148),_0x577fdc);_0x4f4d9a=_0x577fdc[_0x1582fb]??_0x577fdc[0x0];}let _0x3b3734=normalizeHookFunctionNode(_0x538ced[_0x32f362(0x16d)](_0x32f362(0x13d)));if(!_0x3b3734){if(_0x538ced[_0x32f362(0x16d)](_0x32f362(0x13d)))throw CliErrors['validation'](_0x32f362(0x14b));if(_0x538ced[_0x32f362(0x172)])throw CliErrors[_0x32f362(0x175)]('--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');const _0x41d6d2=await promptSelect('Select\x20trigger\x20node:',[_0x32f362(0x152),_0x32f362(0x14e)]);_0x3b3734=[_0x32f362(0x152),_0x32f362(0x14e)][_0x41d6d2]??_0x32f362(0x152);}return{'alias':_0x5edf7d,'datasetCode':_0x168cf4,'datasetId':_0x5ee40d,'operationType':_0x4f4d9a,'functionNode':_0x3b3734};}function a31_0x2333(){const _0x25a507=['question','alias','apiDir','write','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','create','\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Current\x20request\x20params\x20or\x20response\x20result.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Modified\x20params\x20object.\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','description','UNKNOWN','Dataset\x20not\x20found\x20for\x20code\x20\x22','\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Request\x20parameters.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Business\x20result\x20(wrapped\x20in\x20response.data).\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','appCode','includes','3852837omaSeG','.js','HOOK','No\x20operation\x20types\x20found\x20for\x20dataset\x20','str','11095133oyUlOB','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','\x20api\x20pull`\x20to\x20refresh.','\x20function:\x20','nonInteractive','type','close','validation','Script\x20description','code','11594210cymOmK','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','No\x20api.ts\x20found.\x20Run\x20`','Select\x20dataset:','COMMON','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','12KugeMV','Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','4227840IYeqZm','stderr','Script\x20type','30nYPUbt','find','Invalid\x20dataset\x20selection.','functionNode','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','operation-type','keys','length','Function\x20name\x20(valid\x20JS\x20identifier)','bff','15840825SgESLX','Available:\x20','join',']\x20(','Operation\x20type\x20(HOOK\x20only)','/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','datasetCode','/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','function-node','operationType','string','Created\x20','5488yApExL','Trigger\x20node\x20(HOOK\x20only)','ENDPOINT','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','1094710Jwkzci','16hxXCCS','tableName','Select\x20operation\x20type:','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','name','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','6evrJcV','TODO:\x20add\x20script\x20description','after','map','\x0a\x20*\x20[脚本名称]\x20','\x0a\x20*\x20[触发节点]\x20','before','source','isInteger','scriptsRootDir','stdin','trim','datasetcode','parseInt','HOOK\x20requires\x20alias/operation/node\x20options.','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/'];a31_0x2333=function(){return _0x25a507;};return a31_0x2333();}async function promptSelect(_0x4c0af5,_0x58544c){const _0xf580c6=a31_0x4678cf;if(_0x58544c[_0xf580c6(0x131)]===0x1)return 0x0;for(const [_0x3ab335,_0x4e67b7]of _0x58544c['entries']()){process[_0xf580c6(0x181)][_0xf580c6(0x15f)]('\x20\x20'+(_0x3ab335+0x1)+'.\x20'+_0x4e67b7+'\x0a');}const _0x25cfaf=createInterface({'input':process[_0xf580c6(0x156)],'output':process['stderr']});while(!![]){const _0x3dfe6f=await new Promise(_0x301ba9=>{const _0x43e270=_0xf580c6;_0x25cfaf[_0x43e270(0x15c)](_0x4c0af5+'\x20',_0x301ba9);}),_0x304e96=Number[_0xf580c6(0x159)](_0x3dfe6f[_0xf580c6(0x157)](),0xa);if(Number[_0xf580c6(0x154)](_0x304e96)&&_0x304e96>=0x1&&_0x304e96<=_0x58544c['length'])return _0x25cfaf[_0xf580c6(0x174)](),_0x304e96-0x1;process[_0xf580c6(0x181)]['write']('\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20'+_0x58544c[_0xf580c6(0x131)]+'.\x0a');}}function buildFilePath(_0x395c9d,_0x1c5c63,_0x44da4d,_0xf4dfe3){const _0xe71151=a31_0x4678cf;if(_0x1c5c63===_0xe71151(0x16b)){if(!_0xf4dfe3)throw CliErrors[_0xe71151(0x175)](_0xe71151(0x15a));const _0x484590=_0xf4dfe3[_0xe71151(0x15d)]??_0xf4dfe3[_0xe71151(0x13a)];return join(_0x395c9d[_0xe71151(0x155)],_0xe71151(0x16b),_0x484590,_0xf4dfe3[_0xe71151(0x13e)],_0xf4dfe3[_0xe71151(0x12d)],_0x44da4d+'.js');}return join(_0x395c9d[_0xe71151(0x155)],_0x1c5c63,_0x44da4d+_0xe71151(0x16a));}function a31_0x1cf0(_0x25fa1b,_0x59e999){_0x25fa1b=_0x25fa1b-0x12d;const _0x2333a8=a31_0x2333();let _0x1cf01f=_0x2333a8[_0x25fa1b];return _0x1cf01f;}export function generateTemplate(_0x39506c,_0x578235,_0x40c857,_0x2a8683,_0x392d33){const _0x3c5872=a31_0x4678cf,_0x37a311=_0x2a8683?.[_0x3c5872(0x157)]()||_0x3c5872(0x14d);if(_0x39506c==='COMMON')return _0x3c5872(0x13c)+_0x37a311+_0x3c5872(0x150)+_0x578235+'\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/'+_0x578235+'.js\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Input\x20parameters.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Processing\x20result.\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20'+_0x578235+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';if(_0x39506c===_0x3c5872(0x143))return _0x3c5872(0x139)+_0x37a311+_0x3c5872(0x15b)+_0x40c857+'/'+_0x578235+_0x3c5872(0x166)+_0x578235+_0x3c5872(0x144);if(!_0x392d33)throw CliErrors[_0x3c5872(0x175)](_0x3c5872(0x179));return _0x3c5872(0x13b)+_0x37a311+_0x3c5872(0x12e)+_0x40c857+'/'+_0x392d33['datasetCode']+'/'+_0x392d33[_0x3c5872(0x13e)]+_0x3c5872(0x151)+_0x392d33[_0x3c5872(0x12d)]+_0x3c5872(0x162)+_0x578235+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';}
|
|
1
|
+
const a31_0x20bfb7=a31_0x33b6;(function(_0x5bf272,_0x45b8d4){const _0x5e9592=a31_0x33b6,_0x5df40f=_0x5bf272();while(!![]){try{const _0x353d23=parseInt(_0x5e9592(0x1f7))/0x1+-parseInt(_0x5e9592(0x1ea))/0x2*(-parseInt(_0x5e9592(0x1d5))/0x3)+parseInt(_0x5e9592(0x1fb))/0x4*(-parseInt(_0x5e9592(0x1d8))/0x5)+-parseInt(_0x5e9592(0x1d1))/0x6+parseInt(_0x5e9592(0x1e8))/0x7+-parseInt(_0x5e9592(0x1db))/0x8*(-parseInt(_0x5e9592(0x1fd))/0x9)+parseInt(_0x5e9592(0x1ff))/0xa*(-parseInt(_0x5e9592(0x1cc))/0xb);if(_0x353d23===_0x45b8d4)break;else _0x5df40f['push'](_0x5df40f['shift']());}catch(_0x45ee91){_0x5df40f['push'](_0x5df40f['shift']());}}}(a31_0x3662,0xe0507));import{createInterface}from'node:readline';function a31_0x3662(){const _0x3cba9c=['appCode',']\x20(','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','isInteger','ENDPOINT','\x20api\x20pull`\x20to\x20refresh.','\x0a\x20*\x20[触发节点]\x20','alias','1259972XYNQnY','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','Operation\x20type\x20(HOOK\x20only)','Available:\x20','842060QCLOvB','join','9nMWiaZ','UNKNOWN','128290qWHlLL','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','Select\x20trigger\x20node:','.js\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Input\x20parameters.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Processing\x20result.\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','functionNode','after','includes','/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','COMMON','\x0a\x20*\x20[脚本名称]\x20','bff','scriptsRootDir','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','TODO:\x20add\x20script\x20description','type','datasetcode','Invalid\x20dataset\x20selection.','tableName','No\x20datasets\x20found\x20for\x20this\x20app.','HOOK','Created\x20','No\x20operation\x20types\x20found\x20for\x20dataset\x20','map','validation','Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','operationType','find','apiDir','Available\x20aliases:\x20','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','source','nonInteractive','description','/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','\x22\x20not\x20found\x20for\x20dataset\x20','Select\x20dataset:','length','function-node','No\x20api.ts\x20found.\x20Run\x20`','datasetCode','1507jLfwOf','\x20function:\x20','stderr','File\x20already\x20exists:\x20','code','4785294iYzKHu','Script\x20type','name','str','2099283SIyYiG','write','Invalid\x20function\x20name\x20\x22','25GHFIBf','Function\x20name\x20(valid\x20JS\x20identifier)','Select\x20operation\x20type:','6172392DeGWqr','before','.js','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','string','operation-type','\x22.\x20','\x22\x20not\x20found.\x20','parseInt','\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Current\x20request\x20params\x20or\x20response\x20result.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Modified\x20params\x20object.\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','Trigger\x20node\x20(HOOK\x20only)','stdin','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','12566442VMTsJW','utf8','2uAPmSf','\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Request\x20parameters.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Business\x20result\x20(wrapped\x20in\x20response.data).\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','entries','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.'];a31_0x3662=function(){return _0x3cba9c;};return a31_0x3662();}import{mkdir,writeFile}from'node:fs/promises';import{dirname,join}from'node:path';import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';import{isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';function a31_0x33b6(_0x5c5e4a,_0x305114){_0x5c5e4a=_0x5c5e4a-0x1a7;const _0x36629f=a31_0x3662();let _0x33b6f8=_0x36629f[_0x5c5e4a];return _0x33b6f8;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const bffCreate={'service':a31_0x20bfb7(0x1ad),'command':'create','description':a31_0x20bfb7(0x1bb),'risk':a31_0x20bfb7(0x1d6),'flags':[{'name':a31_0x20bfb7(0x1b1),'type':a31_0x20bfb7(0x1df),'required':!![],'enum':['COMMON','ENDPOINT','HOOK'],'description':a31_0x20bfb7(0x1d2)},{'name':a31_0x20bfb7(0x1d3),'type':'string','required':!![],'description':a31_0x20bfb7(0x1d9)},{'name':'description','type':a31_0x20bfb7(0x1df),'description':'Script\x20description'},{'name':a31_0x20bfb7(0x1f6),'type':'string','description':a31_0x20bfb7(0x1ed)},{'name':a31_0x20bfb7(0x1b2),'type':a31_0x20bfb7(0x1df),'description':a31_0x20bfb7(0x1f1)},{'name':a31_0x20bfb7(0x1e0),'type':a31_0x20bfb7(0x1df),'description':a31_0x20bfb7(0x1f9)},{'name':a31_0x20bfb7(0x1c9),'type':'string','description':a31_0x20bfb7(0x1e5),'enum':[a31_0x20bfb7(0x1dc),a31_0x20bfb7(0x1a8)]}],async 'validate'(_0xd23b5b){const _0x21aa0d=a31_0x20bfb7,_0x414b0e=_0xd23b5b[_0x21aa0d(0x1d4)](_0x21aa0d(0x1d3));if(!isValidBffFunctionName(_0x414b0e))throw CliErrors[_0x21aa0d(0x1ba)](_0x21aa0d(0x1d7)+_0x414b0e+'\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).');},async 'execute'(_0x24a821){const _0x3193b6=a31_0x20bfb7,_0x58b407=loadBffProjectConfig(_0x24a821[_0x3193b6(0x1ef)]),_0x593086=_0x24a821[_0x3193b6(0x1d4)]('type'),_0x501da9=_0x24a821[_0x3193b6(0x1d4)](_0x3193b6(0x1d3)),_0x2bcb29=_0x24a821[_0x3193b6(0x1d4)](_0x3193b6(0x1c4))||undefined,_0x1c1a6d=_0x593086===_0x3193b6(0x1b6)?await resolveHookOptions(_0x58b407,_0x24a821):undefined,_0x24a993=buildFilePath(_0x58b407,_0x593086,_0x501da9,_0x1c1a6d);if(await fileExists(_0x24a993))throw CliErrors['validation'](_0x3193b6(0x1cf)+_0x24a993);await mkdir(dirname(_0x24a993),{'recursive':!![]});const _0x57c9c0=generateTemplate(_0x593086,_0x501da9,_0x24a821['appCode'],_0x2bcb29,_0x1c1a6d);await writeFile(_0x24a993,_0x57c9c0,_0x3193b6(0x1e9));const _0x415c6b={'type':_0x593086,'name':_0x501da9,'path':_0x24a993};if(_0x2bcb29)_0x415c6b['description']=_0x2bcb29;if(_0x1c1a6d){if(_0x1c1a6d['alias'])_0x415c6b[_0x3193b6(0x1f6)]=_0x1c1a6d[_0x3193b6(0x1f6)];_0x415c6b['datasetCode']=_0x1c1a6d[_0x3193b6(0x1cb)],_0x415c6b[_0x3193b6(0x1bd)]=_0x1c1a6d[_0x3193b6(0x1bd)],_0x415c6b[_0x3193b6(0x1a7)]=_0x1c1a6d['functionNode'];}return{'ok':!![],'data':_0x415c6b,'message':_0x3193b6(0x1b7)+_0x593086+_0x3193b6(0x1cd)+_0x501da9};}};async function resolveHookOptions(_0x4f10b6,_0xe8c985){const _0x5b51e4=a31_0x20bfb7,_0x497d1e=loadAliasMap(_0xe8c985[_0x5b51e4(0x1bf)],undefined,resolveApiFilePath(_0xe8c985[_0x5b51e4(0x1bf)],_0xe8c985['appCode'])),_0x4b6ef3=_0x497d1e[_0x5b51e4(0x1c8)]>0x0;let _0x5e344e,_0x4d096f,_0x1a15e1;const _0x591135=_0xe8c985['str'](_0x5b51e4(0x1f6)),_0x58df81=_0xe8c985[_0x5b51e4(0x1d4)](_0x5b51e4(0x1b2));if(_0x591135){const _0x17a37b=resolveAlias(_0xe8c985[_0x5b51e4(0x1bf)],_0x591135,undefined,resolveApiFilePath(_0xe8c985[_0x5b51e4(0x1bf)],_0xe8c985[_0x5b51e4(0x1ef)]));if(!_0x17a37b){const _0x57724c=_0x4b6ef3?_0x5b51e4(0x1c0)+_0x497d1e[_0x5b51e4(0x1b9)](_0x2cadbc=>_0x2cadbc[_0x5b51e4(0x1f6)])[_0x5b51e4(0x1fc)](',\x20'):_0x5b51e4(0x1ca)+CLI_BIN_NAME+'\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.';throw CliErrors[_0x5b51e4(0x1ba)]('Alias\x20\x22'+_0x591135+_0x5b51e4(0x1e2)+_0x57724c);}_0x5e344e=_0x591135,_0x4d096f=_0x17a37b;}else{if(_0x58df81){_0x4d096f=_0x58df81;const _0x478775=_0x497d1e['find'](_0x51b028=>_0x51b028['datasetCode']===_0x58df81);_0x5e344e=_0x478775?.[_0x5b51e4(0x1f6)];}else{if(_0xe8c985[_0x5b51e4(0x1c3)])throw CliErrors[_0x5b51e4(0x1ba)](_0x5b51e4(0x1bc));else{if(_0x4b6ef3){const _0x1da909=_0x497d1e[_0x5b51e4(0x1b9)](_0x5cf173=>_0x5cf173[_0x5b51e4(0x1f6)]+'\x20('+_0x5cf173[_0x5b51e4(0x1b4)]+')'),_0x17c6cf=await promptSelect(_0x5b51e4(0x1c7),_0x1da909),_0x431a79=_0x497d1e[_0x17c6cf];if(!_0x431a79)throw CliErrors[_0x5b51e4(0x1ba)](_0x5b51e4(0x1b3));_0x5e344e=_0x431a79[_0x5b51e4(0x1f6)],_0x4d096f=_0x431a79['datasetCode'];}else{const _0x2a20c3=await listDatasets(_0xe8c985[_0x5b51e4(0x1ef)]);if(_0x2a20c3['length']===0x0)throw CliErrors['validation'](_0x5b51e4(0x1b5));const _0x5f5227=_0x2a20c3[_0x5b51e4(0x1b9)](_0x1f9075=>_0x1f9075[_0x5b51e4(0x1d3)]+'\x20['+(_0x1f9075[_0x5b51e4(0x1c2)]??_0x5b51e4(0x1fe))+_0x5b51e4(0x1f0)+_0x1f9075[_0x5b51e4(0x1d0)]+')'),_0x41111c=await promptSelect('Select\x20dataset:',_0x5f5227),_0x131466=_0x2a20c3[_0x41111c];if(!_0x131466)throw CliErrors['validation']('Invalid\x20dataset\x20selection.');_0x4d096f=_0x131466[_0x5b51e4(0x1d0)],_0x5e344e=undefined;}}}}const _0x524bab=await listDatasets(_0xe8c985[_0x5b51e4(0x1ef)]),_0x6a34cf=_0x524bab[_0x5b51e4(0x1be)](_0xc5d9d8=>_0xc5d9d8[_0x5b51e4(0x1d0)]===_0x4d096f);if(!_0x6a34cf)throw CliErrors[_0x5b51e4(0x1ba)]('Dataset\x20not\x20found\x20for\x20code\x20\x22'+_0x4d096f+_0x5b51e4(0x1e1)+(_0x5e344e?'The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`'+CLI_BIN_NAME+_0x5b51e4(0x1f4):''));_0x1a15e1=_0x6a34cf['id'];const _0x43cf36=_0x5e344e??_0x4d096f,_0x562976=await listBffDatasetOperations(_0xe8c985[_0x5b51e4(0x1ef)],_0x1a15e1),_0x1c839d=_0x562976?Object['keys'](_0x562976):[];if(_0x1c839d[_0x5b51e4(0x1c8)]===0x0)throw CliErrors[_0x5b51e4(0x1ba)](_0x5b51e4(0x1b8)+_0x43cf36+'.');let _0x46d9b9;const _0x2a3123=_0xe8c985[_0x5b51e4(0x1d4)](_0x5b51e4(0x1e0));if(_0x2a3123){if(!_0x1c839d[_0x5b51e4(0x1a9)](_0x2a3123))throw CliErrors[_0x5b51e4(0x1ba)]('Operation\x20type\x20\x22'+_0x2a3123+_0x5b51e4(0x1c6)+_0x43cf36+'.\x20'+(_0x5b51e4(0x1fa)+_0x1c839d[_0x5b51e4(0x1fc)](',\x20')));_0x46d9b9=_0x2a3123;}else{if(_0xe8c985['nonInteractive'])throw CliErrors['validation'](_0x5b51e4(0x1af));const _0x4d37d6=await promptSelect(_0x5b51e4(0x1da),_0x1c839d);_0x46d9b9=_0x1c839d[_0x4d37d6]??_0x1c839d[0x0];}let _0x563c97=normalizeHookFunctionNode(_0xe8c985[_0x5b51e4(0x1d4)](_0x5b51e4(0x1c9)));if(!_0x563c97){if(_0xe8c985['str']('function-node'))throw CliErrors['validation'](_0x5b51e4(0x1ee));if(_0xe8c985[_0x5b51e4(0x1c3)])throw CliErrors['validation'](_0x5b51e4(0x1de));const _0x595b50=await promptSelect(_0x5b51e4(0x201),[_0x5b51e4(0x1dc),_0x5b51e4(0x1a8)]);_0x563c97=[_0x5b51e4(0x1dc),_0x5b51e4(0x1a8)][_0x595b50]??_0x5b51e4(0x1dc);}return{'alias':_0x5e344e,'datasetCode':_0x4d096f,'datasetId':_0x1a15e1,'operationType':_0x46d9b9,'functionNode':_0x563c97};}async function promptSelect(_0x2b371c,_0x2e357d){const _0x756a2d=a31_0x20bfb7;if(_0x2e357d[_0x756a2d(0x1c8)]===0x1)return 0x0;for(const [_0x4e2bc5,_0x4b3bfe]of _0x2e357d[_0x756a2d(0x1ec)]()){process[_0x756a2d(0x1ce)]['write']('\x20\x20'+(_0x4e2bc5+0x1)+'.\x20'+_0x4b3bfe+'\x0a');}const _0x4edf98=createInterface({'input':process[_0x756a2d(0x1e6)],'output':process['stderr']});while(!![]){const _0x2ccc22=await new Promise(_0x130ac4=>{_0x4edf98['question'](_0x2b371c+'\x20',_0x130ac4);}),_0x1e1e9a=Number[_0x756a2d(0x1e3)](_0x2ccc22['trim'](),0xa);if(Number[_0x756a2d(0x1f2)](_0x1e1e9a)&&_0x1e1e9a>=0x1&&_0x1e1e9a<=_0x2e357d[_0x756a2d(0x1c8)])return _0x4edf98['close'](),_0x1e1e9a-0x1;process[_0x756a2d(0x1ce)][_0x756a2d(0x1d6)](_0x756a2d(0x1e7)+_0x2e357d['length']+'.\x0a');}}function buildFilePath(_0x3ddc53,_0x50fea8,_0x55688f,_0x284686){const _0x49da5a=a31_0x20bfb7;if(_0x50fea8===_0x49da5a(0x1b6)){if(!_0x284686)throw CliErrors[_0x49da5a(0x1ba)]('HOOK\x20requires\x20alias/operation/node\x20options.');const _0x891b2=_0x284686[_0x49da5a(0x1f6)]??_0x284686[_0x49da5a(0x1cb)];return join(_0x3ddc53['scriptsRootDir'],_0x49da5a(0x1b6),_0x891b2,_0x284686[_0x49da5a(0x1bd)],_0x284686[_0x49da5a(0x1a7)],_0x55688f+_0x49da5a(0x1dd));}return join(_0x3ddc53[_0x49da5a(0x1ae)],_0x50fea8,_0x55688f+_0x49da5a(0x1dd));}export function generateTemplate(_0x2183a9,_0x37b82f,_0x14cbbc,_0x23e6ee,_0x49ec76){const _0x286695=a31_0x20bfb7,_0x4b944f=_0x23e6ee?.['trim']()||_0x286695(0x1b0);if(_0x2183a9===_0x286695(0x1ab))return _0x286695(0x1c5)+_0x4b944f+_0x286695(0x1ac)+_0x37b82f+_0x286695(0x1f8)+_0x37b82f+_0x286695(0x202)+_0x37b82f+_0x286695(0x200);if(_0x2183a9===_0x286695(0x1f3))return'/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20'+_0x4b944f+'\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/'+_0x14cbbc+'/'+_0x37b82f+_0x286695(0x1eb)+_0x37b82f+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';if(!_0x49ec76)throw CliErrors['validation']('HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.');return _0x286695(0x1aa)+_0x4b944f+_0x286695(0x1c1)+_0x14cbbc+'/'+_0x49ec76[_0x286695(0x1cb)]+'/'+_0x49ec76['operationType']+_0x286695(0x1f5)+_0x49ec76['functionNode']+_0x286695(0x1e4)+_0x37b82f+_0x286695(0x200);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a32_0x590ce7=a32_0x1c76;(function(_0x509461,_0x3fcc22){const _0x10f14e=a32_0x1c76,_0x4aff73=_0x509461();while(!![]){try{const _0x2cd998=parseInt(_0x10f14e(0xf9))/0x1*(-parseInt(_0x10f14e(0x116))/0x2)+parseInt(_0x10f14e(0xfb))/0x3*(parseInt(_0x10f14e(0xef))/0x4)+-parseInt(_0x10f14e(0xfe))/0x5*(-parseInt(_0x10f14e(0x112))/0x6)+parseInt(_0x10f14e(0xf4))/0x7+parseInt(_0x10f14e(0xee))/0x8+-parseInt(_0x10f14e(0x10c))/0x9+parseInt(_0x10f14e(0x104))/0xa*(-parseInt(_0x10f14e(0xf0))/0xb);if(_0x2cd998===_0x3fcc22)break;else _0x4aff73['push'](_0x4aff73['shift']());}catch(_0x42903b){_0x4aff73['push'](_0x4aff73['shift']());}}}(a32_0x9641,0xaaacb));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';function a32_0x1c76(_0x5e54ce,_0x24ab79){_0x5e54ce=_0x5e54ce-0xeb;const _0x96410a=a32_0x9641();let _0x1c76c6=_0x96410a[_0x5e54ce];return _0x1c76c6;}import{dirname,join,relative,resolve,sep}from'node:path';import{deleteBffScript}from'../../core/api-client.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists,resolveLocalFilePathFromLockKey}from'../../core/bff/file-system.js';import{ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';import{sleep}from'../../utils/sleep.js';export const bffDelete={'service':'bff','command':'delete','description':a32_0x590ce7(0x100),'risk':'high-risk-write','flags':[{'name':a32_0x590ce7(0xec),'type':'string','required':!![],'description':a32_0x590ce7(0xf1)}],async 'validate'(_0x31adb9){const _0x4d198f=a32_0x590ce7,_0x33e230=loadBffProjectConfig(_0x31adb9[_0x4d198f(0x103)]),_0x484605=await readBffLockFile(_0x33e230[_0x4d198f(0x10e)]);if(!_0x484605)throw CliErrors['validation'](_0x4d198f(0xf6));},async 'dryRun'(_0x358303){const _0x98ae6d=a32_0x590ce7,_0x11b240=loadBffProjectConfig(_0x358303[_0x98ae6d(0x103)]),_0x25f740=await readBffLockFile(_0x11b240[_0x98ae6d(0x10e)]);if(!_0x25f740)throw CliErrors['validation'](_0x98ae6d(0xfd));const {appLock:_0x2466b6}=ensureLockScope(_0x25f740,_0x358303['appCode'],_0x11b240['scriptsRoot'],_0x98ae6d(0x101)),_0x1bc5df=_0x358303[_0x98ae6d(0x11a)](_0x98ae6d(0xec)),_0x4045b3=Object['keys'](_0x2466b6[_0x98ae6d(0x107)]),_0x3e39ac=resolveDeleteTarget(_0x1bc5df,_0x4045b3),_0x148066=_0x2466b6['functions'][_0x3e39ac];if(!_0x148066)throw CliErrors['validation']('No\x20lock\x20entry\x20found\x20for\x20\x22'+_0x3e39ac+'\x22.');const _0x52de69=resolveLocalFilePathFromLockKey(_0x11b240,_0x3e39ac),_0x4b72b8=relative(_0x11b240[_0x98ae6d(0xeb)],_0x52de69),_0x3f085d=join(_0x11b240[_0x98ae6d(0xf5)],_0x98ae6d(0x115),_0x4b72b8);return{'method':_0x98ae6d(0x10b),'url':_0x98ae6d(0x106),'body':{'appCode':_0x358303[_0x98ae6d(0x103)],'target':_0x3e39ac,'remoteId':_0x148066['remoteId'],'localFilePath':_0x52de69,'trashedPath':_0x3f085d},'description':_0x98ae6d(0xf7)+_0x3e39ac+'\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash'};},async 'execute'(_0x5d8c13){const _0x4bf778=a32_0x590ce7,_0x5fc28e=loadBffProjectConfig(_0x5d8c13[_0x4bf778(0x103)]),_0xc3e54=await readBffLockFile(_0x5fc28e[_0x4bf778(0x10e)]);if(!_0xc3e54)throw CliErrors[_0x4bf778(0x10f)](_0x4bf778(0xfd));const {lockData:_0x439135,appLock:_0x4b9e44}=ensureLockScope(_0xc3e54,_0x5d8c13['appCode'],_0x5fc28e[_0x4bf778(0xff)],_0x4bf778(0x101)),_0x46ed32=JSON[_0x4bf778(0x102)](JSON[_0x4bf778(0x110)](_0x439135)),_0x27c0ad=_0x46ed32['apps'][_0x5d8c13['appCode']];if(!_0x27c0ad)throw new Error(_0x4bf778(0x108)+_0x5d8c13[_0x4bf778(0x103)]+_0x4bf778(0x10a));const _0xd0155c=_0x5d8c13[_0x4bf778(0x11a)](_0x4bf778(0xec)),_0x552261=Object[_0x4bf778(0x11b)](_0x27c0ad[_0x4bf778(0x107)]),_0xc6737=resolveDeleteTarget(_0xd0155c,_0x552261),_0x35ee4a=_0x27c0ad['functions'][_0xc6737];if(!_0x35ee4a)throw CliErrors[_0x4bf778(0x10f)](_0x4bf778(0xf8)+_0xc6737+'\x22.');await deleteBffScript(_0x35ee4a['remoteId']),delete _0x27c0ad[_0x4bf778(0x107)][_0xc6737],_0x27c0ad[_0x4bf778(0xfc)]=new Date()['toISOString'](),await writeBffLockFile(_0x5fc28e[_0x4bf778(0x10e)],_0x46ed32);const _0x58f4a2=resolveLocalFilePathFromLockKey(_0x5fc28e,_0xc6737);let _0x4d498b;await fileExists(_0x58f4a2)&&(_0x4d498b=await moveToTrash(_0x5fc28e[_0x4bf778(0xeb)],_0x5fc28e['trashDir'],_0x58f4a2),await cleanupEmptyDirectories(dirname(_0x58f4a2),_0x5fc28e[_0x4bf778(0x111)]));await waitForDeleteSettlement(_0x5fc28e[_0x4bf778(0x10e)],_0x5d8c13[_0x4bf778(0x103)],_0xc6737,_0x58f4a2),await sleep(0x96);const _0x4b9c22={'deleted':_0xc6737,'remoteId':_0x35ee4a['remoteId']};if(_0x4d498b)_0x4b9c22['trashedTo']=_0x4d498b;return{'ok':!![],'data':_0x4b9c22,'message':'Deleted\x20'+_0xc6737+(_0x4d498b?'\x20(local\x20file\x20moved\x20to\x20trash)':'')};}};function resolveDeleteTarget(_0x2412e9,_0x3c1732){const _0x4af553=a32_0x590ce7;if(_0x2412e9[_0x4af553(0xf2)]('/')){const _0x314183=_0x3c1732[_0x4af553(0x117)](_0x6b13b4=>_0x6b13b4===_0x2412e9);if(!_0x314183)throw CliErrors[_0x4af553(0x10f)](_0x4af553(0x114)+_0x2412e9);return _0x314183;}const _0x1442e9=_0x3c1732[_0x4af553(0x10d)](_0x19d64e=>_0x19d64e[_0x4af553(0x119)]('/')['at'](-0x1)===_0x2412e9);if(_0x1442e9[_0x4af553(0xf3)]===0x0)throw CliErrors[_0x4af553(0x10f)](_0x4af553(0x114)+_0x2412e9);if(_0x1442e9[_0x4af553(0xf3)]>0x1)throw CliErrors[_0x4af553(0x10f)](_0x4af553(0xfa)+_0x2412e9+_0x4af553(0xed)+_0x1442e9['map'](_0x8fe5b5=>_0x4af553(0x118)+_0x8fe5b5)['join']('\x0a'));return _0x1442e9[0x0];}function a32_0x9641(){const _0x2da9ed=['122238DvvMZo','filter','lockFilePath','validation','stringify','scriptsRootDir','66EkJLnf','apps','Function\x20not\x20found:\x20','<timestamp>','23176LloDpI','find','\x20\x20-\x20','split','str','keys','projectRoot','target','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','610280GLeuIF','5252aXTHWN','3138091uWyutK','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','includes','length','1841301jVtXjV','trashDir','BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','Would\x20delete\x20','No\x20lock\x20entry\x20found\x20for\x20\x22','37OKlVZo','Multiple\x20functions\x20match\x20\x22','2619QdeqcS','lastSync','BFF\x20lock\x20file\x20not\x20found.','232585wwtJCy','scriptsRoot','Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','delete','parse','appCode','30TVIEfH','replace','/api/management/library/scripts/delete','functions','Lock\x20scope\x20for\x20app\x20\x22','startsWith','\x22\x20not\x20found\x20after\x20ensureLockScope.','POST'];a32_0x9641=function(){return _0x2da9ed;};return a32_0x9641();}async function moveToTrash(_0x486a44,_0x19f7ff,_0x1f9f59){const _0x2bd5fc=a32_0x590ce7,_0xb497f6=new Date()['toISOString']()[_0x2bd5fc(0x105)](/[:.]/g,'-'),_0x51b0da=relative(_0x486a44,_0x1f9f59),_0x15af0f=join(_0x19f7ff,_0xb497f6,_0x51b0da);return await mkdir(dirname(_0x15af0f),{'recursive':!![]}),await rename(_0x1f9f59,_0x15af0f),_0x15af0f;}async function cleanupEmptyDirectories(_0x5dd5b8,_0x34a029){const _0x4588ba=a32_0x590ce7;let _0x26f13a=resolve(_0x5dd5b8);const _0x2f5cd1=resolve(_0x34a029);while(_0x26f13a[_0x4588ba(0x109)](''+_0x2f5cd1+sep)||_0x26f13a===_0x2f5cd1){if(_0x26f13a===_0x2f5cd1)return;try{const _0x488cd1=await readdir(_0x26f13a);if(_0x488cd1[_0x4588ba(0xf3)]>0x0)return;await rmdir(_0x26f13a);}catch{return;}_0x26f13a=dirname(_0x26f13a);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0x13df29,_0x299af6,_0x213239,_0x1d82d2){const _0x12177c=a32_0x590ce7;for(let _0x587ba7=0x0;_0x587ba7<DELETE_SETTLE_RETRY_COUNT;_0x587ba7+=0x1){const _0x28b1f1=await readBffLockFile(_0x13df29),_0x488203=!!_0x28b1f1?.[_0x12177c(0x113)]?.[_0x299af6]?.[_0x12177c(0x107)]?.[_0x213239],_0x33b3e4=await fileExists(_0x1d82d2);if(!_0x488203&&!_0x33b3e4)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error('Local\x20delete\x20not\x20settled\x20for\x20'+_0x213239+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a33_0x214e24=a33_0x2473;(function(_0x3bc1f5,_0x3ff459){const _0x4645ab=a33_0x2473,_0x41a05c=_0x3bc1f5();while(!![]){try{const _0x3a337f=parseInt(_0x4645ab(0x190))/0x1+-parseInt(_0x4645ab(0x182))/0x2*(-parseInt(_0x4645ab(0x17f))/0x3)+-parseInt(_0x4645ab(0x196))/0x4+parseInt(_0x4645ab(0x188))/0x5+-parseInt(_0x4645ab(0x18b))/0x6*(parseInt(_0x4645ab(0x181))/0x7)+parseInt(_0x4645ab(0x18a))/0x8+-parseInt(_0x4645ab(0x18d))/0x9*(parseInt(_0x4645ab(0x191))/0xa);if(_0x3a337f===_0x3ff459)break;else _0x41a05c['push'](_0x41a05c['shift']());}catch(_0x15f889){_0x41a05c['push'](_0x41a05c['shift']());}}}(a33_0x34d4,0xb0958));function a33_0x2473(_0x1151ee,_0x2699ec){_0x1151ee=_0x1151ee-0x17f;const _0x34d4f2=a33_0x34d4();let _0x24731a=_0x34d4f2[_0x1151ee];return _0x24731a;}import{getBffScriptInfo}from'../../core/api-client.js';function a33_0x34d4(){const _0xabebb1=['198774BnpIhx','30dOeVaH','scriptType','bool','bff','appCode','2731988tjqJKZ','scriptContent','(none)','Script\x20ID','description','2036616dnXDDl','verbose','112469vyxLRo','2qjEcCU','number','Get\x20BFF\x20script\x20details\x20by\x20ID','read','detail','updatedTime','6074425Filyyr','Return\x20full\x20raw\x20script\x20object','3603856fxBrFJ','138FTbSgP','boolean','2301561pVaaPd','createdTime','num'];a33_0x34d4=function(){return _0xabebb1;};return a33_0x34d4();}export const bffDetail={'service':a33_0x214e24(0x194),'command':a33_0x214e24(0x186),'description':a33_0x214e24(0x184),'risk':a33_0x214e24(0x185),'flags':[{'name':'id','type':a33_0x214e24(0x183),'required':!![],'description':a33_0x214e24(0x199)},{'name':a33_0x214e24(0x180),'type':a33_0x214e24(0x18c),'description':a33_0x214e24(0x189)}],async 'execute'(_0x4ceb0d){const _0x1bec9d=a33_0x214e24,_0x3167bf=await getBffScriptInfo(_0x4ceb0d[_0x1bec9d(0x18f)]('id')),_0x283815=_0x4ceb0d[_0x1bec9d(0x193)]('verbose');if(_0x283815)return{'ok':!![],'data':_0x3167bf};return{'ok':!![],'data':{'id':_0x3167bf['id'],'appCode':_0x3167bf[_0x1bec9d(0x195)],'scriptType':_0x3167bf[_0x1bec9d(0x192)],'description':_0x3167bf[_0x1bec9d(0x19a)]||_0x1bec9d(0x198),'createdTime':_0x3167bf[_0x1bec9d(0x18e)]??'','updatedTime':_0x3167bf[_0x1bec9d(0x187)]??'','scriptContent':_0x3167bf[_0x1bec9d(0x197)]??''}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x363eb2,_0x35edb6){const _0x5ed13f=a34_0x34be,_0x58eeb2=_0x363eb2();while(!![]){try{const _0x597e56=parseInt(_0x5ed13f(0x1f7))/0x1+parseInt(_0x5ed13f(0x1f3))/0x2+-parseInt(_0x5ed13f(0x1f1))/0x3*(parseInt(_0x5ed13f(0x1f4))/0x4)+-parseInt(_0x5ed13f(0x1f5))/0x5+-parseInt(_0x5ed13f(0x1f6))/0x6*(parseInt(_0x5ed13f(0x1f2))/0x7)+-parseInt(_0x5ed13f(0x1f0))/0x8+-parseInt(_0x5ed13f(0x1f8))/0x9*(-parseInt(_0x5ed13f(0x1f9))/0xa);if(_0x597e56===_0x35edb6)break;else _0x58eeb2['push'](_0x58eeb2['shift']());}catch(_0x5eab0b){_0x58eeb2['push'](_0x58eeb2['shift']());}}}(a34_0x4f6f,0xdf35f));function a34_0x34be(_0x4ec6c1,_0x190f29){_0x4ec6c1=_0x4ec6c1-0x1f0;const _0x4f6f8e=a34_0x4f6f();let _0x34be32=_0x4f6f8e[_0x4ec6c1];return _0x34be32;}function a34_0x4f6f(){const _0x2d8c79=['490070TVrixE','6244360WpZhQl','15okxEoJ','83629MjUplW','2368526jpgJcO','552756tBZfJH','8279150HfMzWe','282pBVVan','1409550tkrOoU','369YGwBmv'];a34_0x4f6f=function(){return _0x2d8c79;};return a34_0x4f6f();}import{bffList}from'../../commands/bff/list.js';import{bffDetail}from'../../commands/bff/detail.js';import{bffStatus}from'../../commands/bff/status.js';import{bffCreate}from'../../commands/bff/create.js';import{bffPush}from'../../commands/bff/push.js';import{bffPull}from'../../commands/bff/pull.js';import{bffDelete}from'../../commands/bff/delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];
|
package/lib/commands/bff/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a35_0x2759(_0x325061,_0x4db011){_0x325061=_0x325061-0x77;const _0x57fc98=a35_0x57fc();let _0x2759e1=_0x57fc98[_0x325061];return _0x2759e1;}const a35_0x795953=a35_0x2759;(function(_0x2f698f,_0x17055e){const _0x58b585=a35_0x2759,_0x3976a0=_0x2f698f();while(!![]){try{const _0x511799=-parseInt(_0x58b585(0x8c))/0x1+parseInt(_0x58b585(0x8b))/0x2+-parseInt(_0x58b585(0x80))/0x3+parseInt(_0x58b585(0x87))/0x4+-parseInt(_0x58b585(0x7f))/0x5*(parseInt(_0x58b585(0x7a))/0x6)+-parseInt(_0x58b585(0x81))/0x7*(parseInt(_0x58b585(0x93))/0x8)+parseInt(_0x58b585(0x77))/0x9*(parseInt(_0x58b585(0x79))/0xa);if(_0x511799===_0x17055e)break;else _0x3976a0['push'](_0x3976a0['shift']());}catch(_0x13c3da){_0x3976a0['push'](_0x3976a0['shift']());}}}(a35_0x57fc,0xa99f8));function a35_0x57fc(){const _0x14b181=['str','bff','name','boolean','169776ACsmpp','string','List\x20BFF\x20scripts','No\x20BFF\x20scripts\x20found.','1410742WNMDgO','751969ZzXcYQ','scriptType','functionName','map','bool','appCode','verbose','104zLTMwv','9ZVLKvx','ENDPOINT','32686290FIkNtv','12vugYQw','Return\x20full\x20script\x20objects','length','type','COMMON','2986965yhSNqT','1974162rbFyJO','386001NKoLqv','Filter\x20by\x20script\x20name'];a35_0x57fc=function(){return _0x14b181;};return a35_0x57fc();}import{listBffScripts}from'../../core/api-client.js';export const bffList={'service':a35_0x795953(0x84),'command':'list','description':a35_0x795953(0x89),'risk':'read','flags':[{'name':a35_0x795953(0x7d),'type':'string','description':'Script\x20type\x20filter','default':a35_0x795953(0x78),'enum':[a35_0x795953(0x78),a35_0x795953(0x7e)]},{'name':a35_0x795953(0x85),'type':a35_0x795953(0x88),'description':a35_0x795953(0x82)},{'name':a35_0x795953(0x92),'type':a35_0x795953(0x86),'description':a35_0x795953(0x7b)}],async 'execute'(_0x2cea82){const _0x4aca12=a35_0x795953,_0xb9537d=await listBffScripts(_0x2cea82[_0x4aca12(0x91)],_0x2cea82[_0x4aca12(0x83)](_0x4aca12(0x7d)),{'scriptName':_0x2cea82[_0x4aca12(0x83)](_0x4aca12(0x85))||undefined}),_0xd223b4=_0x2cea82[_0x4aca12(0x90)](_0x4aca12(0x92));return{'ok':!![],'data':_0xd223b4?_0xb9537d:_0xb9537d[_0x4aca12(0x8f)](_0x5e5eef=>({'id':_0x5e5eef['id'],'functionName':_0x5e5eef[_0x4aca12(0x8e)]??'','description':_0x5e5eef['description']||'(unnamed)','scriptType':_0x5e5eef[_0x4aca12(0x8d)]})),'message':_0xb9537d[_0x4aca12(0x7c)]===0x0?_0x4aca12(0x8a):undefined};}};
|