@lovrabet/rabetbase-cli 2.3.13-beta.1 → 2.3.13-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/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/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.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/app/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a20_0x245c74=a20_0x418c;(function(_0x4bf4b8,_0x348f81){const _0x54cc12=a20_0x418c,_0x94aa14=_0x4bf4b8();while(!![]){try{const _0x3699eb=-parseInt(_0x54cc12(0x143))/0x1*(-parseInt(_0x54cc12(0x12d))/0x2)+parseInt(_0x54cc12(0x12b))/0x3+parseInt(_0x54cc12(0x12c))/0x4*(-parseInt(_0x54cc12(0x12e))/0x5)+parseInt(_0x54cc12(0x140))/0x6+-parseInt(_0x54cc12(0x154))/0x7*(-parseInt(_0x54cc12(0x13d))/0x8)+-parseInt(_0x54cc12(0x139))/0x9+parseInt(_0x54cc12(0x138))/0xa*(parseInt(_0x54cc12(0x147))/0xb);if(_0x3699eb===_0x348f81)break;else _0x94aa14['push'](_0x94aa14['shift']());}catch(_0x2d705c){_0x94aa14['push'](_0x94aa14['shift']());}}}(a20_0xb0cc,0x7421d));import{readRawConfigWithLayers}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';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(_0x443ef2,_0x48b1ee){const _0x191705=a20_0x418c,_0x24cd80=[],_0x1c0865=_0x443ef2[_0x191705(0x144)]&&typeof _0x443ef2[_0x191705(0x144)]===_0x191705(0x151)?_0x443ef2['apps']:{},_0x4e900c=_0x443ef2[_0x191705(0x14a)]||undefined;for(const [_0x6f9605,_0x249933]of Object[_0x191705(0x137)](_0x1c0865)){if(!_0x249933||typeof _0x249933!==_0x191705(0x151)||!_0x249933[_0x191705(0x13f)])continue;_0x24cd80[_0x191705(0x149)]({'name':_0x6f9605,'appcode':_0x249933['appcode'],'named':!![],'definedIn':_0x48b1ee,'isDefault':_0x6f9605===_0x4e900c,...buildAppProfileListFields(_0x249933)});}return _0x24cd80;}function buildMergedItems(_0x42ffb0,_0x4a95c4){const _0x379f9f=a20_0x418c,{apps:apps={},defaultApp:_0x512ac6}=_0x42ffb0,_0x5714c8=_0x4a95c4[_0x379f9f(0x13a)][_0x379f9f(0x144)]&&typeof _0x4a95c4[_0x379f9f(0x13a)][_0x379f9f(0x144)]==='object'?_0x4a95c4[_0x379f9f(0x13a)][_0x379f9f(0x144)]:{},_0x473044=_0x4a95c4['projectConfig'][_0x379f9f(0x144)]&&typeof _0x4a95c4[_0x379f9f(0x146)][_0x379f9f(0x144)]==='object'?_0x4a95c4['projectConfig'][_0x379f9f(0x144)]:{},_0x3f5240=_0x4a95c4[_0x379f9f(0x146)][_0x379f9f(0x12f)]===![],_0x535f0f=Object[_0x379f9f(0x137)](apps),_0x58af11=_0x535f0f[_0x379f9f(0x131)](([_0x11df62,_0x26c7a6])=>({'name':_0x11df62,'appcode':_0x26c7a6[_0x379f9f(0x13f)],'named':!![],'definedIn':appDefinedIn(_0x11df62,_0x5714c8,_0x473044,_0x3f5240),'isDefault':_0x11df62===_0x512ac6,...buildAppProfileListFields(_0x26c7a6)}));return _0x58af11;}function validateAppListFlags(_0x4ed9f2){const _0x29f1c3=a20_0x418c;if(!_0x4ed9f2[_0x29f1c3(0x153)](_0x29f1c3(0x14e)))return;if(!_0x4ed9f2[_0x29f1c3(0x153)](_0x29f1c3(0x14f))&&!_0x4ed9f2[_0x29f1c3(0x153)](_0x29f1c3(0x14c)))return;throw CliErrors['validation'](_0x29f1c3(0x141),_0x29f1c3(0x156));}async function execute(_0x3d0ef4){const _0xc01944=a20_0x418c;validateAppListFlags(_0x3d0ef4);if(_0x3d0ef4[_0xc01944(0x153)](_0xc01944(0x14e)))return{'ok':!![],'data':await listRemoteAppDirectory(_0x3d0ef4)};const _0x3a898e=_0x3d0ef4[_0xc01944(0x153)](_0xc01944(0x14f)),_0x15740f=_0x3d0ef4[_0xc01944(0x153)](_0xc01944(0x14c)),_0x12b7e9=_0x3a898e?_0xc01944(0x14f):_0x15740f?'project':_0xc01944(0x136),{config:_0x3c5c3f,layers:_0x5de6e6}=readRawConfigWithLayers(),_0x5b82ec=resolveDefaultAppSource(_0x5de6e6),{defaultApp:_0x63ab2a}=_0x3c5c3f;let _0x468e36,_0x22b9c9;switch(_0x12b7e9){case _0xc01944(0x14f):_0x468e36=buildItemsFromLayer(_0x5de6e6[_0xc01944(0x13a)],_0xc01944(0x14f)),_0x22b9c9=_0x5de6e6['globalPath'];break;case _0xc01944(0x14c):_0x468e36=buildItemsFromLayer(_0x5de6e6['projectConfig'],_0xc01944(0x14c)),_0x22b9c9=_0x5de6e6[_0xc01944(0x145)];break;default:_0x468e36=buildMergedItems(_0x3c5c3f,_0x5de6e6);break;}enrichAppListItemsWithMergedSelection(_0x468e36,_0x3d0ef4[_0xc01944(0x12a)]);if(_0x468e36[_0xc01944(0x155)]===0x0){const _0x15e267=_0x12b7e9===_0xc01944(0x136)?'':_0xc01944(0x13b)+_0x12b7e9+_0xc01944(0x132);return{'ok':!![],'data':[],'message':_0xc01944(0x133)+_0x15e267+'.\x20Use\x20`'+CLI_BIN_NAME+_0xc01944(0x134)};}const _0x26c47a=_0x468e36[_0xc01944(0x13c)](_0x1f556e=>_0x1f556e['isCurrent']===!![]),_0x445f79=_0x63ab2a??_0x26c47a?.[_0xc01944(0x13f)]??null,_0x2a2fc9=_0x12b7e9==='merged'?{'globalPath':_0x5de6e6['globalPath']??null,'projectPath':_0x5de6e6['projectPath']??null,'defaultApp':_0x445f79,'defaultAppSource':_0x63ab2a!=null?_0x5b82ec:null}:{'scope':_0x12b7e9,'configPath':_0x22b9c9??null};return{'ok':!![],'data':{'items':_0x468e36,'meta':_0x2a2fc9}};}function a20_0xb0cc(){const _0x13d223=['apps','projectPath','projectConfig','11aYaAub','boolean','push','defaultApp','list','project','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','remote','global','read','object','app','bool','2471dzxeXg','length','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.','mergedCli','1785951YPLbSn','12912GjYLJS','185606yqmIuC','1045WcpjwZ','inherit','optional','map','\x20config','No\x20apps\x20configured','\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','merged','entries','6128120YMHsai','5615739NYQIaw','globalConfig','\x20in\x20','find','3448dqIsaB','List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','appcode','1370532SnvXMS','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','2SIMGyH'];a20_0xb0cc=function(){return _0x13d223;};return a20_0xb0cc();}function a20_0x418c(_0x5cd63d,_0x222a95){_0x5cd63d=_0x5cd63d-0x12a;const _0xb0cc8f=a20_0xb0cc();let _0x418c49=_0xb0cc8f[_0x5cd63d];return _0x418c49;}export const appListDefinition={'service':a20_0x245c74(0x152),'command':a20_0x245c74(0x14b),'description':a20_0x245c74(0x13e),'risk':a20_0x245c74(0x150),'auth':a20_0x245c74(0x130),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a20_0x245c74(0x14e),'type':'boolean','description':a20_0x245c74(0x135),'default':![]},{'name':a20_0x245c74(0x14f),'type':'boolean','description':a20_0x245c74(0x142),'default':![]},{'name':a20_0x245c74(0x14c),'type':a20_0x245c74(0x148),'description':a20_0x245c74(0x14d),'default':![]}],async 'validate'(_0x7571af){validateAppListFlags(_0x7571af);},'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1cc6af,_0x1eca11){const _0x2f9e22=a21_0x3510,_0x298289=_0x1cc6af();while(!![]){try{const _0x1fc488=-parseInt(_0x2f9e22(0x106))/0x1+parseInt(_0x2f9e22(0x10a))/0x2+-parseInt(_0x2f9e22(0x108))/0x3*(parseInt(_0x2f9e22(0x116))/0x4)+-parseInt(_0x2f9e22(0x107))/0x5*(-parseInt(_0x2f9e22(0x113))/0x6)+-parseInt(_0x2f9e22(0x109))/0x7*(-parseInt(_0x2f9e22(0x10e))/0x8)+-parseInt(_0x2f9e22(0x115))/0x9*(parseInt(_0x2f9e22(0x110))/0xa)+-parseInt(_0x2f9e22(0x10d))/0xb*(-parseInt(_0x2f9e22(0x114))/0xc);if(_0x1fc488===_0x1eca11)break;else _0x298289['push'](_0x298289['shift']());}catch(_0x4cde8f){_0x298289['push'](_0x298289['shift']());}}}(a21_0x1f6b,0xf19f1));function a21_0x1f6b(){const _0x5d8b05=['platform','946502kdYNZt','125XQEEZe','3JSyHWO','4021857nfxKSK','3184566ENKofo','appDesc','map','11ELWzRe','16aksmJE','authRequired','45030xMxOec','cookie','appCode','26958ljHnBz','13449684QXYoHM','1935rpCaEf','4280756RyzwWR'];a21_0x1f6b=function(){return _0x5d8b05;};return a21_0x1f6b();}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 a21_0x3510(_0x21234a,_0x22a4e7){_0x21234a=_0x21234a-0x105;const _0x1f6b69=a21_0x1f6b();let _0x3510b8=_0x1f6b69[_0x21234a];return _0x3510b8;}function resolveCookie(_0x1965a3){const _0x42bab6=a21_0x3510,_0x14d628=_0x1965a3[_0x42bab6(0x111)]||getCookie();if(!_0x14d628)throw CliErrors[_0x42bab6(0x10f)]();return _0x14d628;}export async function listRemoteAppDirectory(_0x500295){const _0x49f47b=a21_0x3510,_0x247663=await withActiveCookie(resolveCookie(_0x500295),()=>listRemoteApps());return{'items':_0x247663[_0x49f47b(0x10c)](_0x3b3fca=>({..._0x3b3fca['id']!=null?{'id':_0x3b3fca['id']}:{},'appCode':_0x3b3fca[_0x49f47b(0x112)],'appName':_0x3b3fca['appName'],..._0x3b3fca['appDesc']!=null?{'appDesc':_0x3b3fca[_0x49f47b(0x10b)]}:{}})),'meta':{'source':_0x49f47b(0x105)}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a22_0x36d482=a22_0x5c90;(function(_0x34606f,_0x26b92c){const _0x48874a=a22_0x5c90,_0x4b047d=_0x34606f();while(!![]){try{const _0x5e5593=parseInt(_0x48874a(0x116))/0x1*(-parseInt(_0x48874a(0x117))/0x2)+parseInt(_0x48874a(0x10c))/0x3*(-parseInt(_0x48874a(0x118))/0x4)+parseInt(_0x48874a(0x10d))/0x5+-parseInt(_0x48874a(0x11a))/0x6*(parseInt(_0x48874a(0x113))/0x7)+parseInt(_0x48874a(0x10b))/0x8+parseInt(_0x48874a(0x112))/0x9*(-parseInt(_0x48874a(0x110))/0xa)+parseInt(_0x48874a(0x10e))/0xb;if(_0x5e5593===_0x26b92c)break;else _0x4b047d['push'](_0x4b047d['shift']());}catch(_0xfe2db8){_0x4b047d['push'](_0x4b047d['shift']());}}}(a22_0x47c9,0xb0821));import{CLI_BIN_NAME}from'../../constant/cli.js';import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';function a22_0x5c90(_0x29fb29,_0x2b6704){_0x29fb29=_0x29fb29-0x10b;const _0x47c96b=a22_0x47c9();let _0x5c901b=_0x47c96b[_0x29fb29];return _0x5c901b;}function a22_0x47c9(){const _0x2d2b03=['36irjbmE','9091733OPwXdA','\x20workspace\x20remove','remove','5NcGfDe','294386Rltupt','68UvEGTb','app\x20remove','6TjRTrY','App\x20profile\x20name\x20to\x20remove','7990896NHPxPt','139011HcQndV','5001435WMrype','29933827hRGtLy','name','2937290pnwgTN','Deprecated:\x20use\x20workspace\x20remove\x20to\x20remove\x20an\x20app\x20profile'];a22_0x47c9=function(){return _0x2d2b03;};return a22_0x47c9();}export const appRemoveDefinition={'service':'app','command':a22_0x36d482(0x115),'description':a22_0x36d482(0x111),'risk':'high-risk-write','requiresAuth':![],'requiresAppCode':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a22_0x36d482(0x114),'since':'2026-07'},'args':[{'name':a22_0x36d482(0x10f),'description':a22_0x36d482(0x11b),'required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x460d6d=>validateAppName(_0x460d6d,'app\x20remove'),'execute':_0x451e4c=>runAppRemove(_0x451e4c,a22_0x36d482(0x119))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5289c4,_0x133e80){const _0x3f9a56=a23_0x4148,_0x36b761=_0x5289c4();while(!![]){try{const _0x8a5887=-parseInt(_0x3f9a56(0x106))/0x1+-parseInt(_0x3f9a56(0xfa))/0x2+parseInt(_0x3f9a56(0xfb))/0x3+-parseInt(_0x3f9a56(0xf1))/0x4*(-parseInt(_0x3f9a56(0xf4))/0x5)+parseInt(_0x3f9a56(0x102))/0x6*(-parseInt(_0x3f9a56(0xfc))/0x7)+parseInt(_0x3f9a56(0x104))/0x8+parseInt(_0x3f9a56(0xf9))/0x9*(parseInt(_0x3f9a56(0xf6))/0xa);if(_0x8a5887===_0x133e80)break;else _0x36b761['push'](_0x36b761['shift']());}catch(_0x3c0200){_0x36b761['push'](_0x36b761['shift']());}}}(a23_0x32bc,0xeabd3));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';export function enrichAppListItemsWithMergedSelection(_0x16b234,_0x51fb75){const _0x4c23ad=a23_0x4148;if(!_0x51fb75)return;const _0x5365df=_0x51fb75[_0x4c23ad(0x109)]&&typeof _0x51fb75[_0x4c23ad(0x109)]===_0x4c23ad(0x10c)?_0x51fb75[_0x4c23ad(0x109)]:{},_0x38209c=Object[_0x4c23ad(0x10b)](_0x5365df)['length']>0x0;for(const _0x3d5d28 of _0x16b234){_0x3d5d28[_0x4c23ad(0x107)]=![];}const _0x21e80f=_0x51fb75[_0x4c23ad(0x105)]!=null?String(_0x51fb75['appCode'])['trim']():'';if(_0x38209c){const _0x275faa=_0x51fb75[_0x4c23ad(0x101)]??_0x51fb75[_0x4c23ad(0xfe)];if(_0x275faa)for(const _0x3921e9 of _0x16b234){_0x3921e9[_0x4c23ad(0xef)]===!![]&&_0x3921e9['name']===_0x275faa&&(_0x3921e9[_0x4c23ad(0x107)]=!![]);}for(const _0x3dbc85 of _0x16b234){if(_0x3dbc85['named']!==![])continue;if(_0x51fb75['defaultApp'])continue;_0x21e80f&&String(_0x3dbc85[_0x4c23ad(0xf3)]??'')['trim']()===_0x21e80f&&(_0x3dbc85[_0x4c23ad(0x107)]=!![]);}return;}if(!_0x21e80f)return;for(const _0x563f36 of _0x16b234){String(_0x563f36['appcode']??'')[_0x4c23ad(0xf2)]()===_0x21e80f&&(_0x563f36['isCurrent']=!![]);}}export function resolveAppScopeForWrite(_0x165292,_0x3b6a01,_0x3727c0){const _0x2eee02=a23_0x4148;if(_0x3b6a01)return _0x2eee02(0xf5);const _0x3e512f=_0x3727c0[_0x2eee02(0xf8)][_0x2eee02(0x109)]&&typeof _0x3727c0[_0x2eee02(0xf8)][_0x2eee02(0x109)]===_0x2eee02(0x10c)?_0x3727c0[_0x2eee02(0xf8)][_0x2eee02(0x109)]:{},_0x3e5c42=_0x3727c0[_0x2eee02(0xf0)][_0x2eee02(0x109)]&&typeof _0x3727c0[_0x2eee02(0xf0)][_0x2eee02(0x109)]===_0x2eee02(0x10c)?_0x3727c0[_0x2eee02(0xf0)][_0x2eee02(0x109)]:{};if(Object[_0x2eee02(0xff)][_0x2eee02(0xf7)][_0x2eee02(0x100)](_0x3e512f,_0x165292))return _0x2eee02(0xfd);if(Object[_0x2eee02(0xff)][_0x2eee02(0xf7)][_0x2eee02(0x100)](_0x3e5c42,_0x165292))return _0x2eee02(0xf5);return _0x2eee02(0xfd);}export function appDefinedIn(_0x4dfad3,_0xe70de9,_0x599ac8,_0xcce17c){const _0x5cf7cd=a23_0x4148;if(_0xcce17c)return Object[_0x5cf7cd(0xff)][_0x5cf7cd(0xf7)][_0x5cf7cd(0x100)](_0x599ac8,_0x4dfad3)?_0x5cf7cd(0xfd):_0x5cf7cd(0xf5);const _0x5d52d0=Object[_0x5cf7cd(0xff)][_0x5cf7cd(0xf7)][_0x5cf7cd(0x100)](_0xe70de9,_0x4dfad3),_0x2811d1=Object['prototype'][_0x5cf7cd(0xf7)][_0x5cf7cd(0x100)](_0x599ac8,_0x4dfad3);if(_0x5d52d0&&_0x2811d1)return _0x5cf7cd(0x108);if(_0x2811d1)return _0x5cf7cd(0xfd);return _0x5cf7cd(0xf5);}export function resolveDefaultAppSource(_0x537eac){const _0x2e1b2f=a23_0x4148,_0x3b2792=_0x537eac[_0x2e1b2f(0xf8)][_0x2e1b2f(0x109)]&&typeof _0x537eac[_0x2e1b2f(0xf8)][_0x2e1b2f(0x109)]===_0x2e1b2f(0x10c)?_0x537eac[_0x2e1b2f(0xf8)][_0x2e1b2f(0x109)]:{};if(_0x2e1b2f(0xfe)in _0x537eac[_0x2e1b2f(0xf8)])return _0x2e1b2f(0xfd);if(Object[_0x2e1b2f(0x10b)](_0x3b2792)['length']>0x0)return _0x2e1b2f(0xfd);if(_0x537eac[_0x2e1b2f(0xf8)][_0x2e1b2f(0x10a)]===![])return null;if(_0x537eac['globalConfig'][_0x2e1b2f(0xfe)])return _0x2e1b2f(0xf5);return null;}function a23_0x4148(_0x68d456,_0x4df01a){_0x68d456=_0x68d456-0xef;const _0x32bc0d=a23_0x32bc();let _0x4148cc=_0x32bc0d[_0x68d456];return _0x4148cc;}export function getConfigPath(_0x48b6f2={}){const _0x3cca64=a23_0x4148,_0x65a1f2=_0x48b6f2['global']?_0x3cca64(0xf5):_0x3cca64(0xfd);return resolveWriteConfigPath(_0x65a1f2);}export function readConfig(_0x36b2af={}){return readConfigFile(getConfigPath(_0x36b2af));}function a23_0x32bc(){const _0x1b15f5=['keys','object','named','globalConfig','76oNAlrX','trim','appcode','301030ysgTSH','global','10KfusXM','hasOwnProperty','projectConfig','4337514iCFSsX','1213414TwNyhP','1960203zCLjQG','826959yvPaiq','project','defaultApp','prototype','call','currentApp','18jbIvLs','\x20(global)','1097664ErdNCz','appCode','493860qkNoIh','isCurrent','both','apps','inherit'];a23_0x32bc=function(){return _0x1b15f5;};return a23_0x32bc();}export function writeConfig(_0x31eddd,_0x11b0c5={}){writeConfigFile(getConfigPath(_0x11b0c5),_0x31eddd);}export function scopeLabel(_0x21a780){const _0x25983f=a23_0x4148;return _0x21a780[_0x25983f(0xf5)]?_0x25983f(0x103):'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a24_0x435d4e=a24_0xe750;(function(_0x3fe09c,_0x4e39b1){const _0x15a190=a24_0xe750,_0x33232=_0x3fe09c();while(!![]){try{const _0x44ef65=parseInt(_0x15a190(0xeb))/0x1*(parseInt(_0x15a190(0xef))/0x2)+parseInt(_0x15a190(0xf1))/0x3*(-parseInt(_0x15a190(0xf6))/0x4)+parseInt(_0x15a190(0xf0))/0x5*(-parseInt(_0x15a190(0xfb))/0x6)+-parseInt(_0x15a190(0xec))/0x7+parseInt(_0x15a190(0xf9))/0x8*(parseInt(_0x15a190(0xf7))/0x9)+-parseInt(_0x15a190(0xfc))/0xa+-parseInt(_0x15a190(0xfa))/0xb*(-parseInt(_0x15a190(0xf3))/0xc);if(_0x44ef65===_0x4e39b1)break;else _0x33232['push'](_0x33232['shift']());}catch(_0xeb0cfd){_0x33232['push'](_0x33232['shift']());}}}(a24_0x319b,0x967bf));import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';function a24_0xe750(_0x309e05,_0x18e952){_0x309e05=_0x309e05-0xea;const _0x319b9f=a24_0x319b();let _0xe750fb=_0x319b9f[_0x309e05];return _0xe750fb;}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':'app-config','command':'delete','description':'Delete\x20one\x20runtime\x20app-config\x20key','risk':a24_0x435d4e(0xee),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5e06d5){readKeyArg(_0x5e06d5);},async 'dryRun'(_0x5ee8fe){const _0x52a55f=a24_0x435d4e,_0x56dd20=readKeyArg(_0x5ee8fe),_0x55a617=await mustGetByKey(_0x5ee8fe[_0x52a55f(0xea)],_0x56dd20);return asAppConfigDryRunResult(buildMutationData({'operation':_0x52a55f(0xf8),'appCode':_0x5ee8fe[_0x52a55f(0xea)],'key':_0x56dd20,'before':projectAppConfig(_0x55a617),'after':null,'dryRun':!![]}),{'method':_0x52a55f(0xf4),'url':DELETE_PATH});},async 'execute'(_0x250362){const _0x5d01b9=a24_0x435d4e,_0x14c4ac=readKeyArg(_0x250362),_0x1bf66e=await mustGetByKey(_0x250362['appCode'],_0x14c4ac);return await withAppConfigApiBoundary('delete',{'appCode':_0x250362['appCode'],'key':_0x14c4ac},()=>deleteAppConfig({'appCode':_0x250362[_0x5d01b9(0xea)],'id':requireAppConfigId(_0x1bf66e,_0x14c4ac,_0x250362[_0x5d01b9(0xea)])})),{'ok':!![],'data':buildMutationData({'operation':_0x5d01b9(0xf8),'appCode':_0x250362[_0x5d01b9(0xea)],'key':_0x14c4ac,'before':projectAppConfig(_0x1bf66e),'after':null,'dryRun':![]}),'message':_0x5d01b9(0xfd)+_0x14c4ac};}};async function mustGetByKey(_0x2fc80a,_0x9cf465){const _0x3f6bf4=a24_0x435d4e,_0x2ed8e3=await withAppConfigApiBoundary('get',{'appCode':_0x2fc80a,'key':_0x9cf465},()=>getAppConfigByKey(_0x2fc80a,_0x9cf465));if(!_0x2ed8e3)throw CliErrors[_0x3f6bf4(0xf2)]('App\x20config\x20key\x20not\x20found:\x20'+_0x9cf465,'appCode:\x20'+_0x2fc80a);return _0x2ed8e3;}function a24_0x319b(){const _0x562e22=['high-risk-write','2361622FEUJPa','74025NMAsQu','81924SdxchD','validation','8407128yHQqfQ','POST',',\x20appCode=','76DVWVMW','9ghFuel','delete','6813992CXyAEd','11fwDNAP','90NENARL','5313090UocQuN','Deleted\x20app\x20config\x20','apiError','appCode','1ZTHedT','5911745AidNli','App\x20config\x20server\x20id\x20missing\x20for\x20key='];a24_0x319b=function(){return _0x562e22;};return a24_0x319b();}function requireAppConfigId(_0x1948e3,_0x12d30d,_0x569053){const _0x3ebc70=a24_0x435d4e;if(typeof _0x1948e3['id']==='number'&&Number['isFinite'](_0x1948e3['id'])&&_0x1948e3['id']>0x0)return _0x1948e3['id'];throw CliErrors[_0x3ebc70(0xfe)](_0x3ebc70(0xed)+_0x12d30d+_0x3ebc70(0xf5)+_0x569053);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a25_0x20871c=a25_0x108c;(function(_0x919ff2,_0x28ff5e){const _0x16be5e=a25_0x108c,_0x36b46d=_0x919ff2();while(!![]){try{const _0x117611=-parseInt(_0x16be5e(0xb1))/0x1*(-parseInt(_0x16be5e(0xb9))/0x2)+parseInt(_0x16be5e(0xb6))/0x3+parseInt(_0x16be5e(0xab))/0x4+parseInt(_0x16be5e(0xb4))/0x5*(parseInt(_0x16be5e(0xa8))/0x6)+parseInt(_0x16be5e(0xac))/0x7*(-parseInt(_0x16be5e(0xb0))/0x8)+parseInt(_0x16be5e(0xad))/0x9*(parseInt(_0x16be5e(0xae))/0xa)+-parseInt(_0x16be5e(0xb8))/0xb;if(_0x117611===_0x28ff5e)break;else _0x36b46d['push'](_0x36b46d['shift']());}catch(_0x1238ae){_0x36b46d['push'](_0x36b46d['shift']());}}}(a25_0x536d,0x39a90));function a25_0x108c(_0x217008,_0x469ca3){_0x217008=_0x217008-0xa7;const _0x536d03=a25_0x536d();let _0x108cbc=_0x536d03[_0x217008];return _0x108cbc;}import{getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a25_0x536d(){const _0x4e6cb7=['9KSsHqH','3646070PyEgBL','bool','1016592gzEYfY','380059MgspmY','reveal','\x20with\x20value\x20redacted','3635IzUzxK','appCode','112677mTIqdg','appCode:\x20','10116733zzODeW','2tXBCNH','Loaded\x20app\x20config\x20','get','282HvVVtN','read','Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','1866236PdEgmq','7prudCg'];a25_0x536d=function(){return _0x4e6cb7;};return a25_0x536d();}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_0x20871c(0xa7),'description':a25_0x20871c(0xaa),'risk':a25_0x20871c(0xa9),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x2a0a17){readKeyArg(_0x2a0a17);},async 'execute'(_0x484057){const _0x7789f0=a25_0x20871c,_0x55fc1f=readKeyArg(_0x484057),_0x509539=await withAppConfigApiBoundary(_0x7789f0(0xa7),{'appCode':_0x484057[_0x7789f0(0xb5)],'key':_0x55fc1f},()=>getAppConfigByKey(_0x484057['appCode'],_0x55fc1f));if(!_0x509539)throw CliErrors['validation']('App\x20config\x20key\x20not\x20found:\x20'+_0x55fc1f,_0x7789f0(0xb7)+_0x484057['appCode']);const _0x52b1cc=projectAppConfig(_0x509539,{'reveal':_0x484057[_0x7789f0(0xaf)](_0x7789f0(0xb2))});return{'ok':!![],'data':{'config':_0x52b1cc},'message':_0x484057['bool'](_0x7789f0(0xb2))?'Loaded\x20app\x20config\x20'+_0x55fc1f+'\x20with\x20value\x20revealed':_0x7789f0(0xba)+_0x55fc1f+_0x7789f0(0xb3)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a26_0x51e5(){const _0xb1deed=['1380776saxCDt','4324734wAQPAf','1927263yBfaHf','764020KTGaMJ','3902507AhQJua','4giAPzf','301348rXRCBE','1136204kuWGBo','6zwfPVG'];a26_0x51e5=function(){return _0xb1deed;};return a26_0x51e5();}(function(_0x457f1a,_0x4ea084){const _0x3f5cec=a26_0x2a58,_0xf12e3e=_0x457f1a();while(!![]){try{const _0x1a3421=parseInt(_0x3f5cec(0x1c7))/0x1+parseInt(_0x3f5cec(0x1c8))/0x2+parseInt(_0x3f5cec(0x1cc))/0x3+-parseInt(_0x3f5cec(0x1c6))/0x4*(-parseInt(_0x3f5cec(0x1cd))/0x5)+parseInt(_0x3f5cec(0x1c9))/0x6*(-parseInt(_0x3f5cec(0x1ce))/0x7)+-parseInt(_0x3f5cec(0x1ca))/0x8+-parseInt(_0x3f5cec(0x1cb))/0x9;if(_0x1a3421===_0x4ea084)break;else _0xf12e3e['push'](_0xf12e3e['shift']());}catch(_0x314508){_0xf12e3e['push'](_0xf12e3e['shift']());}}}(a26_0x51e5,0x6eda3));import{appConfigList}from'../../commands/app-config/list.js';import{appConfigGet}from'../../commands/app-config/get.js';import{appConfigSet}from'../../commands/app-config/set.js';function a26_0x2a58(_0x4f4bd8,_0x33badd){_0x4f4bd8=_0x4f4bd8-0x1c6;const _0x51e5e1=a26_0x51e5();let _0x2a5806=_0x51e5e1[_0x4f4bd8];return _0x2a5806;}import{appConfigDelete}from'../../commands/app-config/delete.js';export const appConfigDefinitions=[appConfigList,appConfigGet,appConfigSet,appConfigDelete];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a27_0x14d413=a27_0x2c35;(function(_0x5e8d75,_0x258ec7){const _0x14793e=a27_0x2c35,_0x18dfb8=_0x5e8d75();while(!![]){try{const _0x166782=-parseInt(_0x14793e(0x13e))/0x1+parseInt(_0x14793e(0x13c))/0x2*(parseInt(_0x14793e(0x138))/0x3)+-parseInt(_0x14793e(0x141))/0x4*(parseInt(_0x14793e(0x140))/0x5)+-parseInt(_0x14793e(0x149))/0x6+-parseInt(_0x14793e(0x144))/0x7*(parseInt(_0x14793e(0x137))/0x8)+-parseInt(_0x14793e(0x142))/0x9+-parseInt(_0x14793e(0x14b))/0xa*(-parseInt(_0x14793e(0x13b))/0xb);if(_0x166782===_0x258ec7)break;else _0x18dfb8['push'](_0x18dfb8['shift']());}catch(_0x134bef){_0x18dfb8['push'](_0x18dfb8['shift']());}}}(a27_0x6703,0xe1dec));function a27_0x2c35(_0x47d6d6,_0xdffbda){_0x47d6d6=_0x47d6d6-0x137;const _0x6703f0=a27_0x6703();let _0x2c35a6=_0x6703f0[_0x47d6d6];return _0x2c35a6;}import{listAppConfigs}from'../../core/api-client.js';function a27_0x6703(){const _0x125c5e=['read','10ffggke','3408184BINMdA','12721680BkwRqJ','list','4011gPUdMn','key','length','str','appCode','4939392YFvhRb','Found\x20','410wnESoC','Filter\x20by\x20exact\x20config\x20key','3208GahihS','54pjbAOA','app-config','trim','1587993zRDFzM','84498oeknZk','List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','1583584AqpdPv'];a27_0x6703=function(){return _0x125c5e;};return a27_0x6703();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectAppConfig,readOptionalTags,TAGS_FLAG,validateKey,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigList={'service':a27_0x14d413(0x139),'command':a27_0x14d413(0x143),'description':a27_0x14d413(0x13d),'risk':a27_0x14d413(0x13f),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a27_0x14d413(0x145),'type':'string','description':a27_0x14d413(0x14c)},TAGS_FLAG],async 'validate'(_0xab6ac){const _0x5692d8=a27_0x14d413,_0x432302=_0xab6ac[_0x5692d8(0x147)](_0x5692d8(0x145))['trim']();if(_0x432302)validateKey(_0x432302);readOptionalTags(_0xab6ac);},async 'execute'(_0x106dc9){const _0x579c12=a27_0x14d413,_0x193d1c=_0x106dc9[_0x579c12(0x147)](_0x579c12(0x145))[_0x579c12(0x13a)]()||undefined,_0x25e41a=readOptionalTags(_0x106dc9),_0x643b8=await withAppConfigApiBoundary(_0x579c12(0x143),{'appCode':_0x106dc9[_0x579c12(0x148)]},()=>listAppConfigs(_0x106dc9[_0x579c12(0x148)],{'key':_0x193d1c,'tags':_0x25e41a})),_0x3aa30a=_0x643b8['map'](_0x4bb949=>projectAppConfig(_0x4bb949));return{'ok':!![],'data':{'appCode':_0x106dc9[_0x579c12(0x148)],'count':_0x3aa30a[_0x579c12(0x146)],'configs':_0x3aa30a},'message':_0x579c12(0x14a)+_0x3aa30a['length']+'\x20app\x20config(s)'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a28_0xaddc06=a28_0x5625;(function(_0x2bc501,_0x506513){const _0x5933af=a28_0x5625,_0x63687f=_0x2bc501();while(!![]){try{const _0x42c187=parseInt(_0x5933af(0x128))/0x1*(parseInt(_0x5933af(0x125))/0x2)+parseInt(_0x5933af(0x133))/0x3+parseInt(_0x5933af(0x12f))/0x4*(parseInt(_0x5933af(0x131))/0x5)+parseInt(_0x5933af(0x136))/0x6*(-parseInt(_0x5933af(0x121))/0x7)+-parseInt(_0x5933af(0x12d))/0x8*(parseInt(_0x5933af(0x123))/0x9)+-parseInt(_0x5933af(0x139))/0xa+parseInt(_0x5933af(0x13a))/0xb*(parseInt(_0x5933af(0x138))/0xc);if(_0x42c187===_0x506513)break;else _0x63687f['push'](_0x63687f['shift']());}catch(_0x19e467){_0x63687f['push'](_0x63687f['shift']());}}}(a28_0x2311,0x78404));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';function a28_0x5625(_0x41a3c2,_0x44c76d){_0x41a3c2=_0x41a3c2-0x121;const _0x2311cf=a28_0x2311();let _0x5625d2=_0x2311cf[_0x41a3c2];return _0x5625d2;}const CREATE_PATH=a28_0xaddc06(0x12b),UPDATE_PATH='/smartapi/app-config/update';export const appConfigSet={'service':a28_0xaddc06(0x126),'command':'set','description':a28_0xaddc06(0x13b),'risk':a28_0xaddc06(0x12c),'args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':a28_0xaddc06(0x132),'type':a28_0xaddc06(0x124),'description':a28_0xaddc06(0x135)}],async 'validate'(_0x46dd8f){readKeyArg(_0x46dd8f),readOptionalTags(_0x46dd8f),assertSingleValueSource(_0x46dd8f);},async 'dryRun'(_0x4789ef){const _0x4f2eee=a28_0xaddc06,_0x320b3f=readKeyArg(_0x4789ef),_0x529c7f=readOptionalTags(_0x4789ef),_0x15fd88=assertSingleValueSource(_0x4789ef);await assertValueSourceReadable(_0x15fd88);const _0x35bc82=await withAppConfigApiBoundary(_0x4f2eee(0x127),{'appCode':_0x4789ef[_0x4f2eee(0x130)],'key':_0x320b3f},()=>getAppConfigByKey(_0x4789ef[_0x4f2eee(0x130)],_0x320b3f)),_0x586160=_0x35bc82?_0x4f2eee(0x134):_0x4f2eee(0x129),_0xb6ff1b=_0x35bc82?projectAppConfig(_0x35bc82):null,_0x576aa9=plannedAppConfig({'appCode':_0x4789ef[_0x4f2eee(0x130)],'key':_0x320b3f,'tags':_0x529c7f??_0x35bc82?.[_0x4f2eee(0x122)],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x586160,'appCode':_0x4789ef[_0x4f2eee(0x130)],'key':_0x320b3f,'before':_0xb6ff1b,'after':_0x576aa9,'dryRun':!![]}),{'method':_0x4f2eee(0x13c),'url':_0x586160===_0x4f2eee(0x134)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x2fd459){const _0x5e2a19=a28_0xaddc06,_0x5d6a36=readKeyArg(_0x2fd459),_0x49f904=readOptionalTags(_0x2fd459),_0x431721=await withAppConfigApiBoundary('get',{'appCode':_0x2fd459[_0x5e2a19(0x130)],'key':_0x5d6a36},()=>getAppConfigByKey(_0x2fd459[_0x5e2a19(0x130)],_0x5d6a36)),_0x58133f=_0x431721?projectAppConfig(_0x431721):null,_0x500126=_0x431721?_0x5e2a19(0x134):'create',{value:_0xa70657,warnings:_0x39f824}=await readAppConfigValue(_0x2fd459),_0x397228={'appCode':_0x2fd459[_0x5e2a19(0x130)],'key':_0x5d6a36,'value':_0xa70657,'tags':_0x49f904??_0x431721?.['tags']??undefined};await withAppConfigApiBoundary(_0x500126,{'appCode':_0x2fd459[_0x5e2a19(0x130)],'key':_0x5d6a36},async()=>{_0x431721?await updateAppConfig({..._0x397228,'id':requireAppConfigId(_0x431721,_0x5d6a36,_0x2fd459['appCode'])}):await createAppConfig(_0x397228);});const _0xa03f31=await withAppConfigApiBoundary(_0x5e2a19(0x127),{'appCode':_0x2fd459[_0x5e2a19(0x130)],'key':_0x5d6a36},()=>getAppConfigByKey(_0x2fd459[_0x5e2a19(0x130)],_0x5d6a36)),_0x339d8e=_0xa03f31?projectAppConfig(_0xa03f31):plannedAppConfig({'appCode':_0x2fd459['appCode'],'key':_0x5d6a36,'tags':_0x397228[_0x5e2a19(0x122)],'hasValue':_0xa70657!==''});return{'ok':!![],'data':buildMutationData({'operation':_0x500126,'appCode':_0x2fd459[_0x5e2a19(0x130)],'key':_0x5d6a36,'before':_0x58133f,'after':_0x339d8e,'dryRun':![],'warnings':_0x39f824}),'message':(_0x500126==='update'?'Updated':_0x5e2a19(0x12a))+'\x20app\x20config\x20'+_0x5d6a36};}};function a28_0x2311(){const _0x4cd177=['Read\x20config\x20value\x20from\x20file','6ziHCAy','App\x20config\x20server\x20id\x20missing\x20for\x20key=','60VdhUYu','3315800nPoDaE','1010009tqQnsc','Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','POST','6182071PXzhCc','tags','172647lkJzTe','string','367316qWrPST','app-config','get','2OpIdGK','create','Created','/smartapi/app-config/create','high-risk-write','264ckHNNP',',\x20appCode=','92228wXQUAP','appCode','135nGSzAW','file','2674110LpMnWG','update'];a28_0x2311=function(){return _0x4cd177;};return a28_0x2311();}function requireAppConfigId(_0x20de56,_0x2e1ab8,_0x5dda78){const _0x5c6465=a28_0xaddc06;if(typeof _0x20de56['id']==='number'&&Number['isFinite'](_0x20de56['id'])&&_0x20de56['id']>0x0)return _0x20de56['id'];throw CliErrors['apiError'](_0x5c6465(0x137)+_0x2e1ab8+_0x5c6465(0x12e)+_0x5dda78);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a29_0x2d9113=a29_0x31d7;(function(_0x597e33,_0x14a156){const _0x7da9aa=a29_0x31d7,_0x30c14b=_0x597e33();while(!![]){try{const _0x276e57=parseInt(_0x7da9aa(0x1a6))/0x1+-parseInt(_0x7da9aa(0x190))/0x2+parseInt(_0x7da9aa(0x1ac))/0x3*(-parseInt(_0x7da9aa(0x1b0))/0x4)+-parseInt(_0x7da9aa(0x1b4))/0x5*(-parseInt(_0x7da9aa(0x1cc))/0x6)+parseInt(_0x7da9aa(0x1c9))/0x7*(-parseInt(_0x7da9aa(0x19d))/0x8)+parseInt(_0x7da9aa(0x1a7))/0x9+parseInt(_0x7da9aa(0x1a9))/0xa*(-parseInt(_0x7da9aa(0x1cd))/0xb);if(_0x276e57===_0x14a156)break;else _0x30c14b['push'](_0x30c14b['shift']());}catch(_0xa5a1ce){_0x30c14b['push'](_0x30c14b['shift']());}}}(a29_0x9362,0xceb3f));function a29_0x9362(){const _0x5b48b6=['value\x20is\x20redacted','flag','appCode:\x20','string','App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.','name','252ZmYxBP','key','apiError','14232VwIewX','99bgNcoQ','args','Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','781962cAzqGv','Environment\x20variable\x20is\x20not\x20set:\x20','valueRedacted','str','file','join','tags','Read\x20config\x20value\x20from\x20stdin','\x20app\x20config.','operation','from-env','method','value','17912XsYRuW','Failed\x20to\x20','Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','before','env','App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.','kind','trim','gmtModified','1085428xlJWPQ','14338224sijiql','hasValue','851030KbcSry','push','Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','9nwLjWv','appCode','stdin','path','1772956jEmrCC','gmtCreate','Runtime\x20app-config\x20key','validation','1550IWjtal','Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable','length','data','once','utf8','Config\x20tags\x20for\x20filtering/display\x20metadata','Missing\x20app-config\x20key.','App\x20config\x20value\x20source\x20is\x20ambiguous.','argument','slice','key:\x20','boolean','reveal','warnings'];a29_0x9362=function(){return _0x5b48b6;};return a29_0x9362();}import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':a29_0x2d9113(0x1ca),'description':a29_0x2d9113(0x1b2),'required':!![]};export const VALUE_ARG={'name':'value','description':a29_0x2d9113(0x18f),'required':![]};export const TAGS_FLAG={'name':a29_0x2d9113(0x196),'type':a29_0x2d9113(0x1c6),'description':a29_0x2d9113(0x1ba)};export const STDIN_FLAG={'name':a29_0x2d9113(0x1ae),'type':a29_0x2d9113(0x1c0),'description':a29_0x2d9113(0x197),'default':![]};export const FROM_ENV_FLAG={'name':a29_0x2d9113(0x19a),'type':a29_0x2d9113(0x1c6),'description':a29_0x2d9113(0x1b5)};function a29_0x31d7(_0xaef3c3,_0x59511f){_0xaef3c3=_0xaef3c3-0x18f;const _0x936229=a29_0x9362();let _0x31d7a7=_0x936229[_0xaef3c3];return _0x31d7a7;}export const REVEAL_FLAG={'name':'reveal','type':'boolean','description':'Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','default':![]};export function readKeyArg(_0x499bc5){const _0x27156c=_0x499bc5['args'][0x0]?.['trim']()??'';return validateKey(_0x27156c),_0x27156c;}export function readOptionalTags(_0x37979c){const _0x345cc5=a29_0x2d9113,_0xb5ece5=_0x37979c[_0x345cc5(0x193)]('tags')[_0x345cc5(0x1a4)]();if(!_0xb5ece5)return undefined;if(_0xb5ece5['length']>0x20)throw CliErrors[_0x345cc5(0x1b3)](_0x345cc5(0x1c7));return _0xb5ece5;}export function validateKey(_0x39acf9){const _0x49431c=a29_0x2d9113;if(!_0x39acf9)throw CliErrors['validation'](_0x49431c(0x1bb));if(_0x39acf9[_0x49431c(0x1b6)]>0x100)throw CliErrors[_0x49431c(0x1b3)](_0x49431c(0x1a2));}export function projectAppConfig(_0xbbd2e2,_0xef2e7a){const _0x5bda2d=a29_0x2d9113,_0x5cd0b6=_0xbbd2e2['value']!==undefined&&_0xbbd2e2[_0x5bda2d(0x19c)]!==null&&_0xbbd2e2['value']!=='',_0x1d2dd0={'appCode':_0xbbd2e2['appCode'],'key':_0xbbd2e2['key'],'tags':_0xbbd2e2[_0x5bda2d(0x196)]??undefined,'hasValue':_0x5cd0b6,'valueRedacted':_0x5cd0b6&&!_0xef2e7a?.[_0x5bda2d(0x1c1)],'gmtCreate':_0xbbd2e2[_0x5bda2d(0x1b1)],'gmtModified':_0xbbd2e2[_0x5bda2d(0x1a5)]};return _0xef2e7a?.['reveal']&&(_0x1d2dd0[_0x5bda2d(0x19c)]=_0xbbd2e2[_0x5bda2d(0x19c)]??'',_0x1d2dd0[_0x5bda2d(0x192)]=![]),_0x1d2dd0;}export function plannedAppConfig(_0x397f17){const _0x15a504=a29_0x2d9113,_0x21c0e6=_0x397f17[_0x15a504(0x1a8)]??!![];return{'appCode':_0x397f17['appCode'],'key':_0x397f17['key'],'tags':_0x397f17[_0x15a504(0x196)]??undefined,'hasValue':_0x21c0e6,'valueRedacted':_0x21c0e6};}export function buildMutationData(_0x173d8f){const _0x4c4242=a29_0x2d9113;return{'operation':_0x173d8f[_0x4c4242(0x199)],'selector':{'appCode':_0x173d8f['appCode'],'key':_0x173d8f['key']},'before':_0x173d8f[_0x4c4242(0x1a0)],'after':_0x173d8f['after'],'dryRun':_0x173d8f['dryRun'],'warnings':_0x173d8f[_0x4c4242(0x1c2)]??[]};}export async function withAppConfigApiBoundary(_0x242598,_0x209708,_0x5697b1){const _0x37e7f6=a29_0x2d9113;try{return await _0x5697b1();}catch{const _0x557892=[_0x37e7f6(0x1c5)+_0x209708[_0x37e7f6(0x1ad)]];if(_0x209708[_0x37e7f6(0x1ca)])_0x557892[_0x37e7f6(0x1aa)](_0x37e7f6(0x1bf)+_0x209708[_0x37e7f6(0x1ca)]);_0x557892['push'](_0x37e7f6(0x1c3));throw CliErrors[_0x37e7f6(0x1cb)](_0x37e7f6(0x19e)+_0x242598+_0x37e7f6(0x198),_0x557892[_0x37e7f6(0x195)](';\x20')+'.');}}export function asAppConfigDryRunResult(_0xeccf05,_0x356fec){const _0x4db6e1=a29_0x2d9113;return Object['defineProperties'](_0xeccf05,{'method':{'value':_0x356fec[_0x4db6e1(0x19b)],'enumerable':![]},'url':{'value':_0x356fec['url'],'enumerable':![]}});}export function assertSingleValueSource(_0x56dd7e){const _0x8c41e0=a29_0x2d9113,_0x2404e1=[];_0x56dd7e['args']['length']>0x1&&_0x2404e1[_0x8c41e0(0x1aa)]({'kind':'argument','value':_0x56dd7e[_0x8c41e0(0x1ce)][_0x8c41e0(0x1be)](0x1)[_0x8c41e0(0x195)]('\x20')});const _0x1a1eb9=_0x56dd7e[_0x8c41e0(0x1c4)](_0x8c41e0(0x19c));_0x1a1eb9!==undefined&&_0x1a1eb9!==null&&_0x2404e1[_0x8c41e0(0x1aa)]({'kind':'argument','value':String(_0x1a1eb9)});_0x56dd7e['bool'](_0x8c41e0(0x1ae))&&_0x2404e1[_0x8c41e0(0x1aa)]({'kind':'stdin'});const _0x2e6508=_0x56dd7e['str']('from-env')[_0x8c41e0(0x1a4)]();_0x2e6508&&_0x2404e1[_0x8c41e0(0x1aa)]({'kind':'env','name':_0x2e6508});const _0xe2cc3e=_0x56dd7e[_0x8c41e0(0x193)](_0x8c41e0(0x194))[_0x8c41e0(0x1a4)]();_0xe2cc3e&&_0x2404e1[_0x8c41e0(0x1aa)]({'kind':_0x8c41e0(0x194),'path':_0xe2cc3e});if(_0x2404e1['length']===0x0)throw CliErrors[_0x8c41e0(0x1b3)]('Missing\x20app-config\x20value\x20source.',_0x8c41e0(0x19f));if(_0x2404e1[_0x8c41e0(0x1b6)]>0x1)throw CliErrors['validation'](_0x8c41e0(0x1bc),_0x8c41e0(0x1ab));return _0x2404e1[0x0];}export async function assertValueSourceReadable(_0xe0fdbd){const _0xb0c70f=a29_0x2d9113;if(_0xe0fdbd[_0xb0c70f(0x1a3)]===_0xb0c70f(0x1a1)&&!(_0xe0fdbd[_0xb0c70f(0x1c8)]in process.env))throw CliErrors['validation'](_0xb0c70f(0x191)+_0xe0fdbd['name']);if(_0xe0fdbd[_0xb0c70f(0x1a3)]==='file')try{await access(_0xe0fdbd[_0xb0c70f(0x1af)]);}catch{throw CliErrors[_0xb0c70f(0x1b3)]('Value\x20file\x20is\x20not\x20readable:\x20'+_0xe0fdbd[_0xb0c70f(0x1af)]);}}export async function readAppConfigValue(_0x9eed37){const _0x1454fb=a29_0x2d9113,_0x170372=assertSingleValueSource(_0x9eed37),_0x3b3954=[];if(_0x170372[_0x1454fb(0x1a3)]===_0x1454fb(0x1bd))return _0x3b3954[_0x1454fb(0x1aa)]('Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.'),{'value':_0x170372[_0x1454fb(0x19c)]??'','source':_0x170372['kind'],'warnings':_0x3b3954};if(_0x170372[_0x1454fb(0x1a3)]===_0x1454fb(0x1ae))return{'value':await readStdin(),'source':_0x170372[_0x1454fb(0x1a3)],'warnings':_0x3b3954};if(_0x170372[_0x1454fb(0x1a3)]==='env'){if(!(_0x170372['name']in process.env))throw CliErrors[_0x1454fb(0x1b3)]('Environment\x20variable\x20is\x20not\x20set:\x20'+_0x170372[_0x1454fb(0x1c8)]);return{'value':process.env[_0x170372.name]??'','source':_0x170372['kind'],'warnings':_0x3b3954};}return{'value':await readFile(_0x170372[_0x1454fb(0x1af)],_0x1454fb(0x1b9)),'source':_0x170372['kind'],'warnings':_0x3b3954};}function readStdin(){return new Promise((_0x44437f,_0x54a35c)=>{const _0x3b81a9=a29_0x31d7;let _0x1d6316='';process[_0x3b81a9(0x1ae)]['setEncoding'](_0x3b81a9(0x1b9)),process[_0x3b81a9(0x1ae)]['on'](_0x3b81a9(0x1b7),_0xc0938a=>{_0x1d6316+=_0xc0938a;}),process[_0x3b81a9(0x1ae)]['once']('end',()=>_0x44437f(_0x1d6316)),process['stdin'][_0x3b81a9(0x1b8)]('error',_0x54a35c);});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a30_0x38521f=a30_0x83d8;function a30_0x83d8(_0x48b361,_0xe01200){_0x48b361=_0x48b361-0x11d;const _0x47e702=a30_0x47e7();let _0x83d8d1=_0x47e702[_0x48b361];return _0x83d8d1;}function a30_0x47e7(){const _0x21b856=['54933ZkeALY','Clear\x20login\x20session','../../auth/auth-server-ui.js','login','48272wSadTa','207xxYTVV','9314CCwnVI','!\x20Not\x20logged\x20in','5485248uMiDkv','44jeUOkB','auth','4202455DFQIVx','10422330fSIxNT','Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','112280mXJLcL','logout','log','read','52VkGMVU','yes','bool','boolean'];a30_0x47e7=function(){return _0x21b856;};return a30_0x47e7();}(function(_0x51d16c,_0x2ba88e){const _0xbd93c8=a30_0x83d8,_0x2237bf=_0x51d16c();while(!![]){try{const _0x30d359=parseInt(_0xbd93c8(0x11d))/0x1*(-parseInt(_0xbd93c8(0x127))/0x2)+-parseInt(_0xbd93c8(0x121))/0x3*(-parseInt(_0xbd93c8(0x12a))/0x4)+parseInt(_0xbd93c8(0x12c))/0x5+parseInt(_0xbd93c8(0x129))/0x6+-parseInt(_0xbd93c8(0x12f))/0x7+parseInt(_0xbd93c8(0x125))/0x8*(-parseInt(_0xbd93c8(0x126))/0x9)+-parseInt(_0xbd93c8(0x12d))/0xa;if(_0x30d359===_0x2ba88e)break;else _0x2237bf['push'](_0x2237bf['shift']());}catch(_0x5821a3){_0x2237bf['push'](_0x2237bf['shift']());}}}(a30_0x47e7,0x7e325));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':a30_0x38521f(0x12b),'command':a30_0x38521f(0x124),'description':'Login\x20via\x20browser','risk':a30_0x38521f(0x132),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a30_0x38521f(0x11e),'type':a30_0x38521f(0x120),'description':a30_0x38521f(0x12e),'default':![]}],async 'execute'(_0x58f83a){const _0x16919d=a30_0x38521f,{runAuthServer:_0x1d8858}=await import(_0x16919d(0x123));return await _0x1d8858({'autoYes':_0x58f83a[_0x16919d(0x11f)](_0x16919d(0x11e)),'nonInteractive':_0x58f83a['nonInteractive']}),{'ok':!![]};}},{'service':'auth','command':a30_0x38521f(0x130),'description':a30_0x38521f(0x122),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x8b3e4){const _0x389bab=a30_0x38521f;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x389bab(0x131)]('✓\x20Logged\x20out')):console[_0x389bab(0x131)](_0x389bab(0x128)),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a31_0x184e95=a31_0x4aeb;(function(_0x50efdd,_0x49ab19){const _0x2b6f7f=a31_0x4aeb,_0x17ebe6=_0x50efdd();while(!![]){try{const _0xe83ac1=parseInt(_0x2b6f7f(0x1e8))/0x1+-parseInt(_0x2b6f7f(0x1c9))/0x2*(parseInt(_0x2b6f7f(0x1ea))/0x3)+-parseInt(_0x2b6f7f(0x1a5))/0x4+-parseInt(_0x2b6f7f(0x1ac))/0x5+-parseInt(_0x2b6f7f(0x1b2))/0x6+parseInt(_0x2b6f7f(0x1dd))/0x7+-parseInt(_0x2b6f7f(0x1dc))/0x8*(-parseInt(_0x2b6f7f(0x1e1))/0x9);if(_0xe83ac1===_0x49ab19)break;else _0x17ebe6['push'](_0x17ebe6['shift']());}catch(_0x380ade){_0x17ebe6['push'](_0x17ebe6['shift']());}}}(a31_0x1c44,0xef3b1));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';function a31_0x1c44(){const _0x1973c5=['function-node','Script\x20type','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','operationType','\x0a\x20*\x20[脚本名称]\x20','11651672zIZsVw','9500253MmMFgJ','COMMON','HOOK','No\x20operation\x20types\x20found\x20for\x20dataset\x20','9BVRDgG','datasetcode','validation','/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','ENDPOINT','length','1007155SgCrHw','string','151521DwANDV','before','Created\x20','apiDir','description','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','join','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','code','write','\x22\x20not\x20found\x20for\x20dataset\x20','No\x20datasets\x20found\x20for\x20this\x20app.','map','4190408ZGiwGu','functionNode','keys','Operation\x20type\x20(HOOK\x20only)','/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','entries','1242840oShiXb','Trigger\x20node\x20(HOOK\x20only)','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','str','nonInteractive','tableName','5631900kXANhm','after','includes','operation-type','isInteger','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','stderr','datasetCode','Alias\x20\x22','Invalid\x20dataset\x20selection.','scriptsRootDir','Script\x20description','stdin','alias','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/','find','Select\x20dataset:','bff','\x22\x20not\x20found.\x20','Available\x20aliases:\x20','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','name','Invalid\x20function\x20name\x20\x22','24Yurrki','trim','.js','type','\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','Available:\x20','/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','File\x20already\x20exists:\x20','HOOK\x20requires\x20alias/operation/node\x20options.','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','close','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','No\x20api.ts\x20found.\x20Run\x20`'];a31_0x1c44=function(){return _0x1973c5;};return a31_0x1c44();}import{loadBffProjectConfig}from'../../core/bff/config.js';function a31_0x4aeb(_0xc4916e,_0x373154){_0xc4916e=_0xc4916e-0x19c;const _0x1c4486=a31_0x1c44();let _0x4aeb36=_0x1c4486[_0xc4916e];return _0x4aeb36;}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_0x184e95(0x1c3),'command':'create','description':'Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','risk':a31_0x184e95(0x1a1),'flags':[{'name':'type','type':a31_0x184e95(0x1e9),'required':!![],'enum':[a31_0x184e95(0x1de),a31_0x184e95(0x1e6),'HOOK'],'description':a31_0x184e95(0x1d8)},{'name':'name','type':a31_0x184e95(0x1e9),'required':!![],'description':'Function\x20name\x20(valid\x20JS\x20identifier)'},{'name':a31_0x184e95(0x19c),'type':a31_0x184e95(0x1e9),'description':a31_0x184e95(0x1bd)},{'name':a31_0x184e95(0x1bf),'type':a31_0x184e95(0x1e9),'description':a31_0x184e95(0x1b7)},{'name':'datasetcode','type':'string','description':a31_0x184e95(0x1ae)},{'name':a31_0x184e95(0x1b5),'type':a31_0x184e95(0x1e9),'description':a31_0x184e95(0x1a8)},{'name':a31_0x184e95(0x1d7),'type':a31_0x184e95(0x1e9),'description':a31_0x184e95(0x1ad),'enum':['before','after']}],async 'validate'(_0x5c8e6d){const _0x10da2c=a31_0x184e95,_0x2d6035=_0x5c8e6d[_0x10da2c(0x1af)](_0x10da2c(0x1c7));if(!isValidBffFunctionName(_0x2d6035))throw CliErrors['validation'](_0x10da2c(0x1c8)+_0x2d6035+_0x10da2c(0x1e5));},async 'execute'(_0x391da7){const _0x2cf1f1=a31_0x184e95,_0x149047=loadBffProjectConfig(_0x391da7[_0x2cf1f1(0x1ce)]),_0x9e14fa=_0x391da7[_0x2cf1f1(0x1af)](_0x2cf1f1(0x1cc)),_0x4206f7=_0x391da7[_0x2cf1f1(0x1af)](_0x2cf1f1(0x1c7)),_0x4d3cef=_0x391da7['str'](_0x2cf1f1(0x19c))||undefined,_0x3ee3a1=_0x9e14fa===_0x2cf1f1(0x1df)?await resolveHookOptions(_0x149047,_0x391da7):undefined,_0x3052d3=buildFilePath(_0x149047,_0x9e14fa,_0x4206f7,_0x3ee3a1);if(await fileExists(_0x3052d3))throw CliErrors[_0x2cf1f1(0x1e3)](_0x2cf1f1(0x1d1)+_0x3052d3);await mkdir(dirname(_0x3052d3),{'recursive':!![]});const _0x5bb2a9=generateTemplate(_0x9e14fa,_0x4206f7,_0x391da7[_0x2cf1f1(0x1ce)],_0x4d3cef,_0x3ee3a1);await writeFile(_0x3052d3,_0x5bb2a9,'utf8');const _0x532674={'type':_0x9e14fa,'name':_0x4206f7,'path':_0x3052d3};if(_0x4d3cef)_0x532674[_0x2cf1f1(0x19c)]=_0x4d3cef;if(_0x3ee3a1){if(_0x3ee3a1[_0x2cf1f1(0x1bf)])_0x532674['alias']=_0x3ee3a1['alias'];_0x532674[_0x2cf1f1(0x1b9)]=_0x3ee3a1[_0x2cf1f1(0x1b9)],_0x532674[_0x2cf1f1(0x1da)]=_0x3ee3a1[_0x2cf1f1(0x1da)],_0x532674['functionNode']=_0x3ee3a1[_0x2cf1f1(0x1a6)];}return{'ok':!![],'data':_0x532674,'message':_0x2cf1f1(0x1ec)+_0x9e14fa+'\x20function:\x20'+_0x4206f7};}};async function resolveHookOptions(_0x2bb656,_0x508b5a){const _0x445f42=a31_0x184e95,_0x26363d=loadAliasMap(_0x508b5a[_0x445f42(0x1ed)],undefined,resolveApiFilePath(_0x508b5a[_0x445f42(0x1ed)],_0x508b5a[_0x445f42(0x1ce)])),_0x39189e=_0x26363d[_0x445f42(0x1e7)]>0x0;let _0x3552f7,_0x1853f2,_0x208f77;const _0x190bd9=_0x508b5a['str']('alias'),_0x74e0a8=_0x508b5a['str'](_0x445f42(0x1e2));if(_0x190bd9){const _0x1d28b4=resolveAlias(_0x508b5a[_0x445f42(0x1ed)],_0x190bd9,undefined,resolveApiFilePath(_0x508b5a[_0x445f42(0x1ed)],_0x508b5a[_0x445f42(0x1ce)]));if(!_0x1d28b4){const _0x571f48=_0x39189e?_0x445f42(0x1c5)+_0x26363d['map'](_0x102b61=>_0x102b61['alias'])[_0x445f42(0x19e)](',\x20'):_0x445f42(0x1d6)+CLI_BIN_NAME+'\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.';throw CliErrors[_0x445f42(0x1e3)](_0x445f42(0x1ba)+_0x190bd9+_0x445f42(0x1c4)+_0x571f48);}_0x3552f7=_0x190bd9,_0x1853f2=_0x1d28b4;}else{if(_0x74e0a8){_0x1853f2=_0x74e0a8;const _0x188acd=_0x26363d[_0x445f42(0x1c1)](_0x4c0616=>_0x4c0616[_0x445f42(0x1b9)]===_0x74e0a8);_0x3552f7=_0x188acd?.['alias'];}else{if(_0x508b5a[_0x445f42(0x1b0)])throw CliErrors[_0x445f42(0x1e3)](_0x445f42(0x1aa));else{if(_0x39189e){const _0x324c09=_0x26363d[_0x445f42(0x1a4)](_0x17ae27=>_0x17ae27['alias']+'\x20('+_0x17ae27[_0x445f42(0x1b1)]+')'),_0x3349f1=await promptSelect(_0x445f42(0x1c2),_0x324c09),_0x230902=_0x26363d[_0x3349f1];if(!_0x230902)throw CliErrors[_0x445f42(0x1e3)]('Invalid\x20dataset\x20selection.');_0x3552f7=_0x230902[_0x445f42(0x1bf)],_0x1853f2=_0x230902[_0x445f42(0x1b9)];}else{const _0x273de5=await listDatasets(_0x508b5a[_0x445f42(0x1ce)]);if(_0x273de5[_0x445f42(0x1e7)]===0x0)throw CliErrors['validation'](_0x445f42(0x1a3));const _0x490320=_0x273de5[_0x445f42(0x1a4)](_0x27c4c9=>_0x27c4c9[_0x445f42(0x1c7)]+'\x20['+(_0x27c4c9['source']??'UNKNOWN')+']\x20('+_0x27c4c9[_0x445f42(0x1a0)]+')'),_0x1f886d=await promptSelect(_0x445f42(0x1c2),_0x490320),_0x2395b7=_0x273de5[_0x1f886d];if(!_0x2395b7)throw CliErrors[_0x445f42(0x1e3)](_0x445f42(0x1bb));_0x1853f2=_0x2395b7[_0x445f42(0x1a0)],_0x3552f7=undefined;}}}}const _0x338a87=await listDatasets(_0x508b5a['appCode']),_0x56a783=_0x338a87[_0x445f42(0x1c1)](_0xd8702f=>_0xd8702f['code']===_0x1853f2);if(!_0x56a783)throw CliErrors[_0x445f42(0x1e3)]('Dataset\x20not\x20found\x20for\x20code\x20\x22'+_0x1853f2+'\x22.\x20'+(_0x3552f7?'The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`'+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh.':''));_0x208f77=_0x56a783['id'];const _0x3a9f3e=_0x3552f7??_0x1853f2,_0x14963d=await listBffDatasetOperations(_0x508b5a[_0x445f42(0x1ce)],_0x208f77),_0xa36bb3=_0x14963d?Object[_0x445f42(0x1a7)](_0x14963d):[];if(_0xa36bb3[_0x445f42(0x1e7)]===0x0)throw CliErrors[_0x445f42(0x1e3)](_0x445f42(0x1e0)+_0x3a9f3e+'.');let _0x39b9fb;const _0x2ae237=_0x508b5a['str'](_0x445f42(0x1b5));if(_0x2ae237){if(!_0xa36bb3[_0x445f42(0x1b4)](_0x2ae237))throw CliErrors[_0x445f42(0x1e3)]('Operation\x20type\x20\x22'+_0x2ae237+_0x445f42(0x1a2)+_0x3a9f3e+'.\x20'+(_0x445f42(0x1cf)+_0xa36bb3[_0x445f42(0x19e)](',\x20')));_0x39b9fb=_0x2ae237;}else{if(_0x508b5a[_0x445f42(0x1b0)])throw CliErrors[_0x445f42(0x1e3)](_0x445f42(0x1d9));const _0x24a543=await promptSelect('Select\x20operation\x20type:',_0xa36bb3);_0x39b9fb=_0xa36bb3[_0x24a543]??_0xa36bb3[0x0];}let _0x803577=normalizeHookFunctionNode(_0x508b5a['str'](_0x445f42(0x1d7)));if(!_0x803577){if(_0x508b5a[_0x445f42(0x1af)](_0x445f42(0x1d7)))throw CliErrors[_0x445f42(0x1e3)](_0x445f42(0x1d5));if(_0x508b5a[_0x445f42(0x1b0)])throw CliErrors['validation'](_0x445f42(0x1d3));const _0x21e14e=await promptSelect('Select\x20trigger\x20node:',[_0x445f42(0x1eb),_0x445f42(0x1b3)]);_0x803577=[_0x445f42(0x1eb),_0x445f42(0x1b3)][_0x21e14e]??_0x445f42(0x1eb);}return{'alias':_0x3552f7,'datasetCode':_0x1853f2,'datasetId':_0x208f77,'operationType':_0x39b9fb,'functionNode':_0x803577};}async function promptSelect(_0x59edf2,_0x5c1b34){const _0x3d85aa=a31_0x184e95;if(_0x5c1b34[_0x3d85aa(0x1e7)]===0x1)return 0x0;for(const [_0x4c4c28,_0x345304]of _0x5c1b34[_0x3d85aa(0x1ab)]()){process[_0x3d85aa(0x1b8)][_0x3d85aa(0x1a1)]('\x20\x20'+(_0x4c4c28+0x1)+'.\x20'+_0x345304+'\x0a');}const _0x127fb5=createInterface({'input':process[_0x3d85aa(0x1be)],'output':process[_0x3d85aa(0x1b8)]});while(!![]){const _0x2fc4a1=await new Promise(_0x1d7073=>{_0x127fb5['question'](_0x59edf2+'\x20',_0x1d7073);}),_0x2167c6=Number['parseInt'](_0x2fc4a1[_0x3d85aa(0x1ca)](),0xa);if(Number[_0x3d85aa(0x1b6)](_0x2167c6)&&_0x2167c6>=0x1&&_0x2167c6<=_0x5c1b34['length'])return _0x127fb5[_0x3d85aa(0x1d4)](),_0x2167c6-0x1;process['stderr'][_0x3d85aa(0x1a1)](_0x3d85aa(0x19d)+_0x5c1b34[_0x3d85aa(0x1e7)]+'.\x0a');}}function buildFilePath(_0x55d34f,_0xc0ae68,_0x41168b,_0x5cdc27){const _0x163feb=a31_0x184e95;if(_0xc0ae68===_0x163feb(0x1df)){if(!_0x5cdc27)throw CliErrors[_0x163feb(0x1e3)](_0x163feb(0x1d2));const _0x383681=_0x5cdc27['alias']??_0x5cdc27['datasetCode'];return join(_0x55d34f[_0x163feb(0x1bc)],'HOOK',_0x383681,_0x5cdc27[_0x163feb(0x1da)],_0x5cdc27[_0x163feb(0x1a6)],_0x41168b+_0x163feb(0x1cb));}return join(_0x55d34f[_0x163feb(0x1bc)],_0xc0ae68,_0x41168b+_0x163feb(0x1cb));}export function generateTemplate(_0x1c0bd7,_0x2b7673,_0x4d83af,_0x11190c,_0x1c2994){const _0x313e66=a31_0x184e95,_0x1b225f=_0x11190c?.[_0x313e66(0x1ca)]()||'TODO:\x20add\x20script\x20description';if(_0x1c0bd7===_0x313e66(0x1de))return _0x313e66(0x1d0)+_0x1b225f+_0x313e66(0x1db)+_0x2b7673+_0x313e66(0x1c6)+_0x2b7673+'.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'+_0x2b7673+_0x313e66(0x19f);if(_0x1c0bd7===_0x313e66(0x1e6))return _0x313e66(0x1e4)+_0x1b225f+_0x313e66(0x1c0)+_0x4d83af+'/'+_0x2b7673+_0x313e66(0x1cd)+_0x2b7673+_0x313e66(0x19f);if(!_0x1c2994)throw CliErrors[_0x313e66(0x1e3)]('HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.');return _0x313e66(0x1a9)+_0x1b225f+'\x0a\x20*\x20[接口路径]\x20POST\x20/api/'+_0x4d83af+'/'+_0x1c2994[_0x313e66(0x1b9)]+'/'+_0x1c2994[_0x313e66(0x1da)]+'\x0a\x20*\x20[触发节点]\x20'+_0x1c2994[_0x313e66(0x1a6)]+'\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'+_0x2b7673+_0x313e66(0x19f);}
|
|
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 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a32_0x456fd5=a32_0x2ece;(function(_0x1d4255,_0x19fa32){const _0x40d766=a32_0x2ece,_0x44c060=_0x1d4255();while(!![]){try{const _0x1a08a9=parseInt(_0x40d766(0x1d8))/0x1*(parseInt(_0x40d766(0x1f2))/0x2)+-parseInt(_0x40d766(0x1dc))/0x3*(-parseInt(_0x40d766(0x200))/0x4)+parseInt(_0x40d766(0x1df))/0x5+parseInt(_0x40d766(0x1ed))/0x6+parseInt(_0x40d766(0x1fe))/0x7+parseInt(_0x40d766(0x1ec))/0x8+parseInt(_0x40d766(0x1eb))/0x9*(-parseInt(_0x40d766(0x1f1))/0xa);if(_0x1a08a9===_0x19fa32)break;else _0x44c060['push'](_0x44c060['shift']());}catch(_0x5d1caf){_0x44c060['push'](_0x44c060['shift']());}}}(a32_0x470b,0xca462));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';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':a32_0x456fd5(0x1ea),'command':a32_0x456fd5(0x1dd),'description':'Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','risk':a32_0x456fd5(0x206),'flags':[{'name':a32_0x456fd5(0x1e0),'type':a32_0x456fd5(0x1e6),'required':!![],'description':a32_0x456fd5(0x1de)}],async 'validate'(_0x2acda1){const _0x48e291=a32_0x456fd5,_0xd749b4=loadBffProjectConfig(_0x2acda1['appCode']),_0x42bc7a=await readBffLockFile(_0xd749b4['lockFilePath']);if(!_0x42bc7a)throw CliErrors[_0x48e291(0x1fd)](_0x48e291(0x207));},async 'dryRun'(_0x55b959){const _0x155822=a32_0x456fd5,_0x3496fc=loadBffProjectConfig(_0x55b959['appCode']),_0x2f31b3=await readBffLockFile(_0x3496fc[_0x155822(0x204)]);if(!_0x2f31b3)throw CliErrors['validation'](_0x155822(0x1e9));const {appLock:_0x5a78a8}=ensureLockScope(_0x2f31b3,_0x55b959[_0x155822(0x1f4)],_0x3496fc[_0x155822(0x1ef)],'delete'),_0x561f9f=_0x55b959[_0x155822(0x1f6)](_0x155822(0x1e0)),_0x34e680=Object[_0x155822(0x1db)](_0x5a78a8['functions']),_0x155fed=resolveDeleteTarget(_0x561f9f,_0x34e680),_0x4fa42c=_0x5a78a8[_0x155822(0x1fb)][_0x155fed];if(!_0x4fa42c)throw CliErrors[_0x155822(0x1fd)](_0x155822(0x202)+_0x155fed+'\x22.');const _0x1cdd99=resolveLocalFilePathFromLockKey(_0x3496fc,_0x155fed),_0x55f100=relative(_0x3496fc[_0x155822(0x1f8)],_0x1cdd99),_0x7a59d2=join(_0x3496fc[_0x155822(0x1f9)],'<timestamp>',_0x55f100);return{'method':_0x155822(0x1d9),'url':_0x155822(0x1f7),'body':{'appCode':_0x55b959[_0x155822(0x1f4)],'target':_0x155fed,'remoteId':_0x4fa42c[_0x155822(0x1e2)],'localFilePath':_0x1cdd99,'trashedPath':_0x7a59d2},'description':_0x155822(0x1f5)+_0x155fed+'\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash'};},async 'execute'(_0x5b6a1c){const _0x441ef1=a32_0x456fd5,_0x585386=loadBffProjectConfig(_0x5b6a1c['appCode']),_0x253082=await readBffLockFile(_0x585386[_0x441ef1(0x204)]);if(!_0x253082)throw CliErrors[_0x441ef1(0x1fd)](_0x441ef1(0x1e9));const {lockData:_0x51e338,appLock:_0x489027}=ensureLockScope(_0x253082,_0x5b6a1c[_0x441ef1(0x1f4)],_0x585386[_0x441ef1(0x1ef)],_0x441ef1(0x1dd)),_0x3a58b8=JSON['parse'](JSON['stringify'](_0x51e338)),_0x1b02bf=_0x3a58b8[_0x441ef1(0x1fa)][_0x5b6a1c[_0x441ef1(0x1f4)]];if(!_0x1b02bf)throw new Error(_0x441ef1(0x1d7)+_0x5b6a1c[_0x441ef1(0x1f4)]+_0x441ef1(0x201));const _0x4cabdb=_0x5b6a1c[_0x441ef1(0x1f6)](_0x441ef1(0x1e0)),_0x3f4adb=Object[_0x441ef1(0x1db)](_0x1b02bf[_0x441ef1(0x1fb)]),_0x268751=resolveDeleteTarget(_0x4cabdb,_0x3f4adb),_0x755ca7=_0x1b02bf[_0x441ef1(0x1fb)][_0x268751];if(!_0x755ca7)throw CliErrors[_0x441ef1(0x1fd)](_0x441ef1(0x202)+_0x268751+'\x22.');await deleteBffScript(_0x755ca7['remoteId']),delete _0x1b02bf[_0x441ef1(0x1fb)][_0x268751],_0x1b02bf[_0x441ef1(0x1ee)]=new Date()[_0x441ef1(0x1e3)](),await writeBffLockFile(_0x585386[_0x441ef1(0x204)],_0x3a58b8);const _0x3f4210=resolveLocalFilePathFromLockKey(_0x585386,_0x268751);let _0x415a0c;await fileExists(_0x3f4210)&&(_0x415a0c=await moveToTrash(_0x585386[_0x441ef1(0x1f8)],_0x585386[_0x441ef1(0x1f9)],_0x3f4210),await cleanupEmptyDirectories(dirname(_0x3f4210),_0x585386[_0x441ef1(0x1d5)]));await waitForDeleteSettlement(_0x585386[_0x441ef1(0x204)],_0x5b6a1c[_0x441ef1(0x1f4)],_0x268751,_0x3f4210),await sleep(0x96);const _0x199365={'deleted':_0x268751,'remoteId':_0x755ca7[_0x441ef1(0x1e2)]};if(_0x415a0c)_0x199365['trashedTo']=_0x415a0c;return{'ok':!![],'data':_0x199365,'message':_0x441ef1(0x203)+_0x268751+(_0x415a0c?_0x441ef1(0x1e1):'')};}};function resolveDeleteTarget(_0x1854cc,_0xd127d1){const _0xb6f1b=a32_0x456fd5;if(_0x1854cc[_0xb6f1b(0x1fc)]('/')){const _0x504c28=_0xd127d1['find'](_0x23af86=>_0x23af86===_0x1854cc);if(!_0x504c28)throw CliErrors[_0xb6f1b(0x1fd)](_0xb6f1b(0x1e4)+_0x1854cc);return _0x504c28;}const _0x5e6c8a=_0xd127d1[_0xb6f1b(0x1e8)](_0x1a0487=>_0x1a0487[_0xb6f1b(0x1e5)]('/')['at'](-0x1)===_0x1854cc);if(_0x5e6c8a[_0xb6f1b(0x1f0)]===0x0)throw CliErrors[_0xb6f1b(0x1fd)](_0xb6f1b(0x1e4)+_0x1854cc);if(_0x5e6c8a[_0xb6f1b(0x1f0)]>0x1)throw CliErrors['validation']('Multiple\x20functions\x20match\x20\x22'+_0x1854cc+'\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a'+_0x5e6c8a[_0xb6f1b(0x1ff)](_0x644532=>_0xb6f1b(0x1e7)+_0x644532)[_0xb6f1b(0x205)]('\x0a'));return _0x5e6c8a[0x0];}function a32_0x470b(){const _0x36b92d=['replace','keys','39645eskHcf','delete','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','3168635PPOJKY','target','\x20(local\x20file\x20moved\x20to\x20trash)','remoteId','toISOString','Function\x20not\x20found:\x20','split','string','\x20\x20-\x20','filter','BFF\x20lock\x20file\x20not\x20found.','bff','5427NyMEuO','5474664aCuPTv','4810170RSyidD','lastSync','scriptsRoot','length','68850qMQqbR','1633894gTFnWF','Local\x20delete\x20not\x20settled\x20for\x20','appCode','Would\x20delete\x20','str','/api/management/library/scripts/delete','projectRoot','trashDir','apps','functions','includes','validation','8493135TMSlMa','map','4ZXPabS','\x22\x20not\x20found\x20after\x20ensureLockScope.','No\x20lock\x20entry\x20found\x20for\x20\x22','Deleted\x20','lockFilePath','join','high-risk-write','BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','scriptsRootDir','startsWith','Lock\x20scope\x20for\x20app\x20\x22','2IQqfor','POST'];a32_0x470b=function(){return _0x36b92d;};return a32_0x470b();}function a32_0x2ece(_0x2c8dc5,_0x5ad08b){_0x2c8dc5=_0x2c8dc5-0x1d5;const _0x470b7c=a32_0x470b();let _0x2ece62=_0x470b7c[_0x2c8dc5];return _0x2ece62;}async function moveToTrash(_0x39fb4f,_0x413cdc,_0x480972){const _0x49ec8c=a32_0x456fd5,_0x5361e0=new Date()['toISOString']()[_0x49ec8c(0x1da)](/[:.]/g,'-'),_0x1f65fd=relative(_0x39fb4f,_0x480972),_0xb8304a=join(_0x413cdc,_0x5361e0,_0x1f65fd);return await mkdir(dirname(_0xb8304a),{'recursive':!![]}),await rename(_0x480972,_0xb8304a),_0xb8304a;}async function cleanupEmptyDirectories(_0x4e911c,_0x177f49){const _0x3dab5e=a32_0x456fd5;let _0x16bda5=resolve(_0x4e911c);const _0x2ac2aa=resolve(_0x177f49);while(_0x16bda5[_0x3dab5e(0x1d6)](''+_0x2ac2aa+sep)||_0x16bda5===_0x2ac2aa){if(_0x16bda5===_0x2ac2aa)return;try{const _0x12c1e7=await readdir(_0x16bda5);if(_0x12c1e7['length']>0x0)return;await rmdir(_0x16bda5);}catch{return;}_0x16bda5=dirname(_0x16bda5);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0xfffab5,_0xc879da,_0x52c806,_0x4f7abc){const _0x1f81cb=a32_0x456fd5;for(let _0x37081b=0x0;_0x37081b<DELETE_SETTLE_RETRY_COUNT;_0x37081b+=0x1){const _0x515bbb=await readBffLockFile(_0xfffab5),_0xe06d6=!!_0x515bbb?.[_0x1f81cb(0x1fa)]?.[_0xc879da]?.[_0x1f81cb(0x1fb)]?.[_0x52c806],_0x2f13fe=await fileExists(_0x4f7abc);if(!_0xe06d6&&!_0x2f13fe)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error(_0x1f81cb(0x1f3)+_0x52c806+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a33_0xb4ca50=a33_0x4ba4;(function(_0x396bc4,_0x1cfadf){const _0xb502c4=a33_0x4ba4,_0x45fb86=_0x396bc4();while(!![]){try{const _0x3f8ceb=-parseInt(_0xb502c4(0xcd))/0x1*(parseInt(_0xb502c4(0xc6))/0x2)+parseInt(_0xb502c4(0xc0))/0x3*(parseInt(_0xb502c4(0xc9))/0x4)+parseInt(_0xb502c4(0xcc))/0x5*(-parseInt(_0xb502c4(0xbf))/0x6)+-parseInt(_0xb502c4(0xce))/0x7+-parseInt(_0xb502c4(0xbd))/0x8+parseInt(_0xb502c4(0xca))/0x9*(parseInt(_0xb502c4(0xc1))/0xa)+-parseInt(_0xb502c4(0xbe))/0xb*(-parseInt(_0xb502c4(0xd3))/0xc);if(_0x3f8ceb===_0x1cfadf)break;else _0x45fb86['push'](_0x45fb86['shift']());}catch(_0x4e4b20){_0x45fb86['push'](_0x45fb86['shift']());}}}(a33_0x2637,0x82cf1));function a33_0x4ba4(_0x302253,_0x52f2cf){_0x302253=_0x302253-0xbb;const _0x263707=a33_0x2637();let _0x4ba42d=_0x263707[_0x302253];return _0x4ba42d;}import{getBffScriptInfo}from'../../core/api-client.js';export const bffDetail={'service':a33_0xb4ca50(0xc7),'command':'detail','description':a33_0xb4ca50(0xd2),'risk':a33_0xb4ca50(0xc5),'flags':[{'name':'id','type':a33_0xb4ca50(0xbc),'required':!![],'description':a33_0xb4ca50(0xc3)},{'name':a33_0xb4ca50(0xd0),'type':'boolean','description':a33_0xb4ca50(0xc8)}],async 'execute'(_0x354453){const _0x29c48c=a33_0xb4ca50,_0x388f61=await getBffScriptInfo(_0x354453['num']('id')),_0x508f2f=_0x354453[_0x29c48c(0xd1)](_0x29c48c(0xd0));if(_0x508f2f)return{'ok':!![],'data':_0x388f61};return{'ok':!![],'data':{'id':_0x388f61['id'],'appCode':_0x388f61[_0x29c48c(0xcb)],'scriptType':_0x388f61[_0x29c48c(0xbb)],'description':_0x388f61[_0x29c48c(0xcf)]||'(none)','createdTime':_0x388f61['createdTime']??'','updatedTime':_0x388f61[_0x29c48c(0xc2)]??'','scriptContent':_0x388f61[_0x29c48c(0xc4)]??''}};}};function a33_0x2637(){const _0x56044a=['2OBiyQU','bff','Return\x20full\x20raw\x20script\x20object','270892eaaYtt','9FctPcf','appCode','4981715ZIQAEd','725565LPUZEE','7050610cJWhHz','description','verbose','bool','Get\x20BFF\x20script\x20details\x20by\x20ID','4077036fCGuPG','scriptType','number','6783400hKtLzy','99yILDGY','6KVWtGJ','3MNvyId','9873560oMOAAx','updatedTime','Script\x20ID','scriptContent','read'];a33_0x2637=function(){return _0x56044a;};return a33_0x2637();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3b58ad,_0x136d8e){const _0x3a1ce6=a34_0x5d4c,_0x29e31e=_0x3b58ad();while(!![]){try{const _0x3a3b4b=-parseInt(_0x3a1ce6(0x9c))/0x1*(-parseInt(_0x3a1ce6(0x9b))/0x2)+-parseInt(_0x3a1ce6(0x9a))/0x3*(parseInt(_0x3a1ce6(0x96))/0x4)+parseInt(_0x3a1ce6(0x9e))/0x5*(-parseInt(_0x3a1ce6(0x99))/0x6)+-parseInt(_0x3a1ce6(0xa0))/0x7+parseInt(_0x3a1ce6(0x9f))/0x8*(parseInt(_0x3a1ce6(0x9d))/0x9)+-parseInt(_0x3a1ce6(0x97))/0xa*(-parseInt(_0x3a1ce6(0x95))/0xb)+parseInt(_0x3a1ce6(0x98))/0xc;if(_0x3a3b4b===_0x136d8e)break;else _0x29e31e['push'](_0x29e31e['shift']());}catch(_0x5610b8){_0x29e31e['push'](_0x29e31e['shift']());}}}(a34_0x1d2f,0x96fb6));function a34_0x1d2f(){const _0x5aedca=['11501964PofydW','1040880HSTANu','3LOxuTr','18916WBLlbO','115htzuVg','27AvsDDS','35ULxDXM','1873576fXfwsy','885367oyExfb','522742Tshzzv','3348068vYnzlf','10XZVxgq'];a34_0x1d2f=function(){return _0x5aedca;};return a34_0x1d2f();}import{bffList}from'../../commands/bff/list.js';import{bffDetail}from'../../commands/bff/detail.js';function a34_0x5d4c(_0x25afb0,_0x4d566d){_0x25afb0=_0x25afb0-0x95;const _0x1d2fb9=a34_0x1d2f();let _0x5d4c09=_0x1d2fb9[_0x25afb0];return _0x5d4c09;}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
|
+
const a35_0x2a97d1=a35_0x52a1;(function(_0x50ffe6,_0x5a2e86){const _0x586489=a35_0x52a1,_0x2063e2=_0x50ffe6();while(!![]){try{const _0x2d7d12=parseInt(_0x586489(0x85))/0x1+-parseInt(_0x586489(0x8d))/0x2+-parseInt(_0x586489(0x7f))/0x3+parseInt(_0x586489(0x91))/0x4*(parseInt(_0x586489(0x95))/0x5)+parseInt(_0x586489(0x82))/0x6*(-parseInt(_0x586489(0x90))/0x7)+-parseInt(_0x586489(0x8c))/0x8*(parseInt(_0x586489(0x83))/0x9)+parseInt(_0x586489(0x96))/0xa;if(_0x2d7d12===_0x5a2e86)break;else _0x2063e2['push'](_0x2063e2['shift']());}catch(_0x23a91b){_0x2063e2['push'](_0x2063e2['shift']());}}}(a35_0x8cf5,0x8f7e8));function a35_0x8cf5(){const _0xf0ddb8=['Filter\x20by\x20script\x20name','40nMntbv','1086834yNVsgf','verbose','str','448czfUww','4324AIEHUB','name','type','COMMON','885YShpsw','14453130SoQgql','List\x20BFF\x20scripts','ENDPOINT','list','1292844bmWeQR','bff','boolean','69870EracyL','526293ZJZEZj','(unnamed)','963132lYTYzt','Script\x20type\x20filter','appCode','No\x20BFF\x20scripts\x20found.','description','string'];a35_0x8cf5=function(){return _0xf0ddb8;};return a35_0x8cf5();}import{listBffScripts}from'../../core/api-client.js';function a35_0x52a1(_0x177d59,_0x1f4e98){_0x177d59=_0x177d59-0x7e;const _0x8cf5ee=a35_0x8cf5();let _0x52a1fd=_0x8cf5ee[_0x177d59];return _0x52a1fd;}export const bffList={'service':a35_0x2a97d1(0x80),'command':a35_0x2a97d1(0x7e),'description':a35_0x2a97d1(0x97),'risk':'read','flags':[{'name':'type','type':a35_0x2a97d1(0x8a),'description':a35_0x2a97d1(0x86),'default':a35_0x2a97d1(0x98),'enum':[a35_0x2a97d1(0x98),a35_0x2a97d1(0x94)]},{'name':a35_0x2a97d1(0x92),'type':a35_0x2a97d1(0x8a),'description':a35_0x2a97d1(0x8b)},{'name':a35_0x2a97d1(0x8e),'type':a35_0x2a97d1(0x81),'description':'Return\x20full\x20script\x20objects'}],async 'execute'(_0x188075){const _0x419795=a35_0x2a97d1,_0x4ad4c9=await listBffScripts(_0x188075[_0x419795(0x87)],_0x188075[_0x419795(0x8f)](_0x419795(0x93)),{'scriptName':_0x188075[_0x419795(0x8f)](_0x419795(0x92))||undefined}),_0x2e7e3a=_0x188075['bool'](_0x419795(0x8e));return{'ok':!![],'data':_0x2e7e3a?_0x4ad4c9:_0x4ad4c9['map'](_0x5cae48=>({'id':_0x5cae48['id'],'functionName':_0x5cae48['functionName']??'','description':_0x5cae48[_0x419795(0x89)]||_0x419795(0x84),'scriptType':_0x5cae48['scriptType']})),'message':_0x4ad4c9['length']===0x0?_0x419795(0x88):undefined};}};
|