@lovrabet/rabetbase-cli 2.3.14-beta.1 → 2.3.14
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/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/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_0x236b25=a20_0x1beb;(function(_0x3040b0,_0x5c7a77){const _0x442482=a20_0x1beb,_0x1e0fc0=_0x3040b0();while(!![]){try{const _0x20ffe9=-parseInt(_0x442482(0x187))/0x1+-parseInt(_0x442482(0x185))/0x2+-parseInt(_0x442482(0x161))/0x3+parseInt(_0x442482(0x17d))/0x4*(-parseInt(_0x442482(0x16d))/0x5)+-parseInt(_0x442482(0x160))/0x6+-parseInt(_0x442482(0x181))/0x7*(parseInt(_0x442482(0x164))/0x8)+-parseInt(_0x442482(0x17c))/0x9*(-parseInt(_0x442482(0x163))/0xa);if(_0x20ffe9===_0x5c7a77)break;else _0x1e0fc0['push'](_0x1e0fc0['shift']());}catch(_0x24f9f9){_0x1e0fc0['push'](_0x1e0fc0['shift']());}}}(a20_0x471b,0xd902a));import{readRawConfigWithLayers}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a20_0x1beb(_0x392d41,_0x2763f7){_0x392d41=_0x392d41-0x15f;const _0x471b28=a20_0x471b();let _0x1beb93=_0x471b28[_0x392d41];return _0x1beb93;}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 a20_0x471b(){const _0x1fccf9=['.\x20Use\x20`','1197820mzMcit','List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','globalPath','3871734EEmUQy','5262210VRiqPC','List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','144610cJMMaT','3039144CrpgUc','apps','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.','project','find','boolean','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','defaultApp','5dtrLVr','globalConfig','global','projectPath','projectConfig','\x20config','No\x20apps\x20configured','list','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','map','optional','remote','appcode','entries','read','3933tVzIvv','928296zYcLlG','length','object','merged','21bIvjWY','push','\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','bool','923302bCrhcM'];a20_0x471b=function(){return _0x1fccf9;};return a20_0x471b();}function buildItemsFromLayer(_0x2077fc,_0x18a13d){const _0x179aea=a20_0x1beb,_0x2792e2=[],_0x12b11b=_0x2077fc[_0x179aea(0x165)]&&typeof _0x2077fc[_0x179aea(0x165)]===_0x179aea(0x17f)?_0x2077fc[_0x179aea(0x165)]:{},_0x1da961=_0x2077fc[_0x179aea(0x16c)]||undefined;for(const [_0x1f2d52,_0x7507b2]of Object[_0x179aea(0x17a)](_0x12b11b)){if(!_0x7507b2||typeof _0x7507b2!==_0x179aea(0x17f)||!_0x7507b2['appcode'])continue;_0x2792e2[_0x179aea(0x182)]({'name':_0x1f2d52,'appcode':_0x7507b2['appcode'],'named':!![],'definedIn':_0x18a13d,'isDefault':_0x1f2d52===_0x1da961,...buildAppProfileListFields(_0x7507b2)});}return _0x2792e2;}function buildMergedItems(_0x34edf6,_0x44d9d1){const _0x37b712=a20_0x1beb,{apps:apps={},defaultApp:_0x36b1f6}=_0x34edf6,_0x30040e=_0x44d9d1['globalConfig'][_0x37b712(0x165)]&&typeof _0x44d9d1[_0x37b712(0x16e)][_0x37b712(0x165)]===_0x37b712(0x17f)?_0x44d9d1[_0x37b712(0x16e)][_0x37b712(0x165)]:{},_0x476745=_0x44d9d1['projectConfig']['apps']&&typeof _0x44d9d1[_0x37b712(0x171)]['apps']===_0x37b712(0x17f)?_0x44d9d1[_0x37b712(0x171)]['apps']:{},_0x528c9f=_0x44d9d1[_0x37b712(0x171)]['inherit']===![],_0xaef356=Object[_0x37b712(0x17a)](apps),_0x12586b=_0xaef356[_0x37b712(0x176)](([_0x3a165e,_0x3205c3])=>({'name':_0x3a165e,'appcode':_0x3205c3[_0x37b712(0x179)],'named':!![],'definedIn':appDefinedIn(_0x3a165e,_0x30040e,_0x476745,_0x528c9f),'isDefault':_0x3a165e===_0x36b1f6,...buildAppProfileListFields(_0x3205c3)}));return _0x12586b;}function validateAppListFlags(_0x28bec8){const _0x46747a=a20_0x1beb;if(!_0x28bec8[_0x46747a(0x184)](_0x46747a(0x178)))return;if(!_0x28bec8['bool']('global')&&!_0x28bec8[_0x46747a(0x184)](_0x46747a(0x168)))return;throw CliErrors['validation'](_0x46747a(0x166),_0x46747a(0x167));}async function execute(_0x240198){const _0x20cfad=a20_0x1beb;validateAppListFlags(_0x240198);if(_0x240198['bool']('remote'))return{'ok':!![],'data':await listRemoteAppDirectory(_0x240198)};const _0x47c9c2=_0x240198[_0x20cfad(0x184)](_0x20cfad(0x16f)),_0x516e62=_0x240198[_0x20cfad(0x184)](_0x20cfad(0x168)),_0x265115=_0x47c9c2?_0x20cfad(0x16f):_0x516e62?_0x20cfad(0x168):_0x20cfad(0x180),{config:_0x4cfa30,layers:_0x2d4ec3}=readRawConfigWithLayers(),_0x13c1f5=resolveDefaultAppSource(_0x2d4ec3),{defaultApp:_0x3f1dac}=_0x4cfa30;let _0x40457c,_0x3063b5;switch(_0x265115){case _0x20cfad(0x16f):_0x40457c=buildItemsFromLayer(_0x2d4ec3[_0x20cfad(0x16e)],_0x20cfad(0x16f)),_0x3063b5=_0x2d4ec3[_0x20cfad(0x15f)];break;case _0x20cfad(0x168):_0x40457c=buildItemsFromLayer(_0x2d4ec3[_0x20cfad(0x171)],_0x20cfad(0x168)),_0x3063b5=_0x2d4ec3[_0x20cfad(0x170)];break;default:_0x40457c=buildMergedItems(_0x4cfa30,_0x2d4ec3);break;}enrichAppListItemsWithMergedSelection(_0x40457c,_0x240198['mergedCli']);if(_0x40457c[_0x20cfad(0x17e)]===0x0){const _0x5a0a42=_0x265115===_0x20cfad(0x180)?'':'\x20in\x20'+_0x265115+_0x20cfad(0x172);return{'ok':!![],'data':[],'message':_0x20cfad(0x173)+_0x5a0a42+_0x20cfad(0x186)+CLI_BIN_NAME+_0x20cfad(0x183)};}const _0x2f6697=_0x40457c[_0x20cfad(0x169)](_0x3e848c=>_0x3e848c['isCurrent']===!![]),_0x574086=_0x3f1dac??_0x2f6697?.['appcode']??null,_0x28385b=_0x265115===_0x20cfad(0x180)?{'globalPath':_0x2d4ec3[_0x20cfad(0x15f)]??null,'projectPath':_0x2d4ec3['projectPath']??null,'defaultApp':_0x574086,'defaultAppSource':_0x3f1dac!=null?_0x13c1f5:null}:{'scope':_0x265115,'configPath':_0x3063b5??null};return{'ok':!![],'data':{'items':_0x40457c,'meta':_0x28385b}};}export const appListDefinition={'service':'app','command':a20_0x236b25(0x174),'description':a20_0x236b25(0x162),'risk':a20_0x236b25(0x17b),'auth':a20_0x236b25(0x177),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a20_0x236b25(0x178),'type':'boolean','description':a20_0x236b25(0x188),'default':![]},{'name':a20_0x236b25(0x16f),'type':'boolean','description':a20_0x236b25(0x175),'default':![]},{'name':a20_0x236b25(0x168),'type':a20_0x236b25(0x16a),'description':a20_0x236b25(0x16b),'default':![]}],async 'validate'(_0x2640f2){validateAppListFlags(_0x2640f2);},'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2455b3,_0x130573){const _0x4b3f81=a21_0x1eb7,_0x85515d=_0x2455b3();while(!![]){try{const _0x384ea6=parseInt(_0x4b3f81(0x184))/0x1+parseInt(_0x4b3f81(0x187))/0x2+parseInt(_0x4b3f81(0x18d))/0x3+parseInt(_0x4b3f81(0x182))/0x4*(parseInt(_0x4b3f81(0x18c))/0x5)+-parseInt(_0x4b3f81(0x188))/0x6+parseInt(_0x4b3f81(0x18b))/0x7*(parseInt(_0x4b3f81(0x18f))/0x8)+parseInt(_0x4b3f81(0x18a))/0x9*(-parseInt(_0x4b3f81(0x191))/0xa);if(_0x384ea6===_0x130573)break;else _0x85515d['push'](_0x85515d['shift']());}catch(_0xf30231){_0x85515d['push'](_0x85515d['shift']());}}}(a21_0xa829,0xec2c8));function a21_0x1eb7(_0x262a96,_0x2c75c4){_0x262a96=_0x262a96-0x182;const _0xa829a1=a21_0xa829();let _0x1eb739=_0xa829a1[_0x262a96];return _0x1eb739;}function a21_0xa829(){const _0x377a45=['4438495phDyKx','182691HAzVGJ','authRequired','3075224kMhpBD','platform','6706030HKAJqy','4BarNGZ','appName','963639aXbRMc','appCode','appDesc','857956YuZYCL','2502252WQlnMC','cookie','18CKAcui','7YMLoVW'];a21_0xa829=function(){return _0x377a45;};return a21_0xa829();}import{listRemoteApps}from'../../core/api-client.js';import{getCookie}from'../../auth/get-cookie.js';import{CliErrors}from'../../errors.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';function resolveCookie(_0x2d9989){const _0x4746bc=a21_0x1eb7,_0x4b7002=_0x2d9989[_0x4746bc(0x189)]||getCookie();if(!_0x4b7002)throw CliErrors[_0x4746bc(0x18e)]();return _0x4b7002;}export async function listRemoteAppDirectory(_0x166bd4){const _0x3cccf0=a21_0x1eb7,_0x24246c=await withActiveCookie(resolveCookie(_0x166bd4),()=>listRemoteApps());return{'items':_0x24246c['map'](_0x3f96f6=>({..._0x3f96f6['id']!=null?{'id':_0x3f96f6['id']}:{},'appCode':_0x3f96f6[_0x3cccf0(0x185)],'appName':_0x3f96f6[_0x3cccf0(0x183)],..._0x3f96f6['appDesc']!=null?{'appDesc':_0x3f96f6[_0x3cccf0(0x186)]}:{}})),'meta':{'source':_0x3cccf0(0x190)}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a22_0x43b1f7=a22_0x5c0a;(function(_0x24e74e,_0x2ed655){const _0xd63d0b=a22_0x5c0a,_0x1c0b2a=_0x24e74e();while(!![]){try{const _0xfbd541=parseInt(_0xd63d0b(0x74))/0x1+-parseInt(_0xd63d0b(0x78))/0x2*(parseInt(_0xd63d0b(0x76))/0x3)+parseInt(_0xd63d0b(0x71))/0x4*(-parseInt(_0xd63d0b(0x72))/0x5)+parseInt(_0xd63d0b(0x79))/0x6+parseInt(_0xd63d0b(0x75))/0x7+parseInt(_0xd63d0b(0x6d))/0x8+-parseInt(_0xd63d0b(0x70))/0x9*(parseInt(_0xd63d0b(0x73))/0xa);if(_0xfbd541===_0x2ed655)break;else _0x1c0b2a['push'](_0x1c0b2a['shift']());}catch(_0x57c161){_0x1c0b2a['push'](_0x1c0b2a['shift']());}}}(a22_0x270c,0x3eb34));import{CLI_BIN_NAME}from'../../constant/cli.js';function a22_0x5c0a(_0xe24000,_0x264a20){_0xe24000=_0xe24000-0x6d;const _0x270cec=a22_0x270c();let _0x5c0af2=_0x270cec[_0xe24000];return _0x5c0af2;}import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';export const appRemoveDefinition={'service':'app','command':a22_0x43b1f7(0x7b),'description':'Deprecated:\x20use\x20workspace\x20remove\x20to\x20remove\x20an\x20app\x20profile','risk':a22_0x43b1f7(0x7a),'requiresAuth':![],'requiresAppCode':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a22_0x43b1f7(0x6f),'since':'2026-07'},'args':[{'name':a22_0x43b1f7(0x77),'description':a22_0x43b1f7(0x7c),'required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x14ff56=>validateAppName(_0x14ff56,a22_0x43b1f7(0x6e)),'execute':_0x3287fd=>runAppRemove(_0x3287fd,'app\x20remove')};function a22_0x270c(){const _0x4a871=['621880crTfFx','app\x20remove','\x20workspace\x20remove','9bfgeiF','20otLzIL','37395gHhPug','5203570YnRuKH','74870NNITum','2727739HWXAtv','69528tNmlke','name','2FyfwyR','1772796SidVvn','high-risk-write','remove','App\x20profile\x20name\x20to\x20remove'];a22_0x270c=function(){return _0x4a871;};return a22_0x270c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x51637a,_0x4f9b39){const _0x18269f=a23_0xc205,_0x210d0c=_0x51637a();while(!![]){try{const _0x30f7de=parseInt(_0x18269f(0xfc))/0x1*(-parseInt(_0x18269f(0x107))/0x2)+parseInt(_0x18269f(0x106))/0x3*(parseInt(_0x18269f(0x10f))/0x4)+-parseInt(_0x18269f(0x10c))/0x5+parseInt(_0x18269f(0x114))/0x6+parseInt(_0x18269f(0x108))/0x7+parseInt(_0x18269f(0x115))/0x8*(-parseInt(_0x18269f(0xff))/0x9)+parseInt(_0x18269f(0x111))/0xa*(parseInt(_0x18269f(0x102))/0xb);if(_0x30f7de===_0x4f9b39)break;else _0x210d0c['push'](_0x210d0c['shift']());}catch(_0xc641fa){_0x210d0c['push'](_0x210d0c['shift']());}}}(a23_0x377e,0xa2864));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';export function enrichAppListItemsWithMergedSelection(_0x536b94,_0x3ad969){const _0x253377=a23_0xc205;if(!_0x3ad969)return;const _0x44ce48=_0x3ad969['apps']&&typeof _0x3ad969[_0x253377(0x119)]===_0x253377(0x10d)?_0x3ad969[_0x253377(0x119)]:{},_0x1b815f=Object[_0x253377(0x103)](_0x44ce48)[_0x253377(0x10e)]>0x0;for(const _0x40a528 of _0x536b94){_0x40a528[_0x253377(0x100)]=![];}const _0x2fc497=_0x3ad969[_0x253377(0x11a)]!=null?String(_0x3ad969[_0x253377(0x11a)])['trim']():'';if(_0x1b815f){const _0x1cabb3=_0x3ad969[_0x253377(0x10a)]??_0x3ad969['defaultApp'];if(_0x1cabb3)for(const _0x230e27 of _0x536b94){_0x230e27[_0x253377(0xfd)]===!![]&&_0x230e27['name']===_0x1cabb3&&(_0x230e27['isCurrent']=!![]);}for(const _0x1f02bf of _0x536b94){if(_0x1f02bf[_0x253377(0xfd)]!==![])continue;if(_0x3ad969[_0x253377(0x116)])continue;_0x2fc497&&String(_0x1f02bf['appcode']??'')[_0x253377(0xfe)]()===_0x2fc497&&(_0x1f02bf[_0x253377(0x100)]=!![]);}return;}if(!_0x2fc497)return;for(const _0x3545ec of _0x536b94){String(_0x3545ec[_0x253377(0x118)]??'')['trim']()===_0x2fc497&&(_0x3545ec[_0x253377(0x100)]=!![]);}}export function resolveAppScopeForWrite(_0x13819e,_0x221fa9,_0x5e88c8){const _0x3c3f51=a23_0xc205;if(_0x221fa9)return _0x3c3f51(0x104);const _0x63f9fd=_0x5e88c8['projectConfig']['apps']&&typeof _0x5e88c8[_0x3c3f51(0x112)][_0x3c3f51(0x119)]===_0x3c3f51(0x10d)?_0x5e88c8[_0x3c3f51(0x112)][_0x3c3f51(0x119)]:{},_0x2c5467=_0x5e88c8[_0x3c3f51(0x113)][_0x3c3f51(0x119)]&&typeof _0x5e88c8[_0x3c3f51(0x113)][_0x3c3f51(0x119)]===_0x3c3f51(0x10d)?_0x5e88c8[_0x3c3f51(0x113)]['apps']:{};if(Object[_0x3c3f51(0x110)][_0x3c3f51(0x10b)][_0x3c3f51(0x109)](_0x63f9fd,_0x13819e))return'project';if(Object['prototype'][_0x3c3f51(0x10b)][_0x3c3f51(0x109)](_0x2c5467,_0x13819e))return _0x3c3f51(0x104);return _0x3c3f51(0x101);}export function appDefinedIn(_0x15bf8d,_0x109d92,_0x417b98,_0x7bfa8c){const _0x5ae34f=a23_0xc205;if(_0x7bfa8c)return Object['prototype']['hasOwnProperty'][_0x5ae34f(0x109)](_0x417b98,_0x15bf8d)?_0x5ae34f(0x101):_0x5ae34f(0x104);const _0x16b6b4=Object[_0x5ae34f(0x110)][_0x5ae34f(0x10b)][_0x5ae34f(0x109)](_0x109d92,_0x15bf8d),_0x1b14af=Object[_0x5ae34f(0x110)][_0x5ae34f(0x10b)][_0x5ae34f(0x109)](_0x417b98,_0x15bf8d);if(_0x16b6b4&&_0x1b14af)return _0x5ae34f(0x105);if(_0x1b14af)return _0x5ae34f(0x101);return _0x5ae34f(0x104);}export function resolveDefaultAppSource(_0x24c6ee){const _0x3069cd=a23_0xc205,_0x11124a=_0x24c6ee[_0x3069cd(0x112)][_0x3069cd(0x119)]&&typeof _0x24c6ee['projectConfig'][_0x3069cd(0x119)]===_0x3069cd(0x10d)?_0x24c6ee[_0x3069cd(0x112)][_0x3069cd(0x119)]:{};if('defaultApp'in _0x24c6ee[_0x3069cd(0x112)])return _0x3069cd(0x101);if(Object[_0x3069cd(0x103)](_0x11124a)['length']>0x0)return'project';if(_0x24c6ee[_0x3069cd(0x112)][_0x3069cd(0x117)]===![])return null;if(_0x24c6ee[_0x3069cd(0x113)][_0x3069cd(0x116)])return _0x3069cd(0x104);return null;}export function getConfigPath(_0x188125={}){const _0x21cce9=a23_0xc205,_0x278532=_0x188125[_0x21cce9(0x104)]?_0x21cce9(0x104):_0x21cce9(0x101);return resolveWriteConfigPath(_0x278532);}function a23_0xc205(_0x129cf5,_0x50646f){_0x129cf5=_0x129cf5-0xfb;const _0x377ea8=a23_0x377e();let _0xc20557=_0x377ea8[_0x129cf5];return _0xc20557;}export function readConfig(_0x28e873={}){return readConfigFile(getConfigPath(_0x28e873));}export function writeConfig(_0x2dba55,_0x3049bf={}){writeConfigFile(getConfigPath(_0x3049bf),_0x2dba55);}export function scopeLabel(_0xc52234){const _0x16582d=a23_0xc205;return _0xc52234[_0x16582d(0x104)]?_0x16582d(0xfb):'';}function a23_0x377e(){const _0x3ce701=['isCurrent','project','6869907JMOQpo','keys','global','both','96Vytymc','80honEBr','6474223qhSWnj','call','currentApp','hasOwnProperty','5453385KSRtUv','object','length','33724OvnhjY','prototype','20YvQAvr','projectConfig','globalConfig','6646746ldDKVc','32744krxFTC','defaultApp','inherit','appcode','apps','appCode','\x20(global)','27177UnndMq','named','trim','1557vEmkNy'];a23_0x377e=function(){return _0x3ce701;};return a23_0x377e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a24_0x3f4b70=a24_0x1ee0;(function(_0x2ca252,_0x381f8a){const _0x48bb2a=a24_0x1ee0,_0x271119=_0x2ca252();while(!![]){try{const _0x2e03f3=parseInt(_0x48bb2a(0xf2))/0x1*(parseInt(_0x48bb2a(0xe7))/0x2)+parseInt(_0x48bb2a(0xe1))/0x3+parseInt(_0x48bb2a(0xe2))/0x4*(parseInt(_0x48bb2a(0xf1))/0x5)+parseInt(_0x48bb2a(0xe8))/0x6+parseInt(_0x48bb2a(0xe3))/0x7+parseInt(_0x48bb2a(0xf0))/0x8*(-parseInt(_0x48bb2a(0xe5))/0x9)+-parseInt(_0x48bb2a(0xee))/0xa;if(_0x2e03f3===_0x381f8a)break;else _0x271119['push'](_0x271119['shift']());}catch(_0x1ef1e1){_0x271119['push'](_0x271119['shift']());}}}(a24_0x5892,0x6798d));import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a24_0x5892(){const _0x327e65=['isFinite','12OCrpGc','2833002lshaOr',',\x20appCode=','Delete\x20one\x20runtime\x20app-config\x20key','get','number','appCode','6126820EsAvMD','high-risk-write','16HKiCMg','5UOAhve','68366OwixFo','validation','179664Ybmkhc','1285252QcaYYB','3546753QgOavf','delete','3299526gwmlxY'];a24_0x5892=function(){return _0x327e65;};return a24_0x5892();}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';function a24_0x1ee0(_0x59d91b,_0x4555c4){_0x59d91b=_0x59d91b-0xe0;const _0x589233=a24_0x5892();let _0x1ee052=_0x589233[_0x59d91b];return _0x1ee052;}export const appConfigDelete={'service':'app-config','command':a24_0x3f4b70(0xe4),'description':a24_0x3f4b70(0xea),'risk':a24_0x3f4b70(0xef),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x440b58){readKeyArg(_0x440b58);},async 'dryRun'(_0x4a1df1){const _0x42820d=a24_0x3f4b70,_0x12f496=readKeyArg(_0x4a1df1),_0x4e55ff=await mustGetByKey(_0x4a1df1[_0x42820d(0xed)],_0x12f496);return asAppConfigDryRunResult(buildMutationData({'operation':_0x42820d(0xe4),'appCode':_0x4a1df1[_0x42820d(0xed)],'key':_0x12f496,'before':projectAppConfig(_0x4e55ff),'after':null,'dryRun':!![]}),{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x26db2e){const _0x4432f7=a24_0x3f4b70,_0x30251f=readKeyArg(_0x26db2e),_0x3fe2fa=await mustGetByKey(_0x26db2e[_0x4432f7(0xed)],_0x30251f);return await withAppConfigApiBoundary(_0x4432f7(0xe4),{'appCode':_0x26db2e[_0x4432f7(0xed)],'key':_0x30251f},()=>deleteAppConfig({'appCode':_0x26db2e[_0x4432f7(0xed)],'id':requireAppConfigId(_0x3fe2fa,_0x30251f,_0x26db2e[_0x4432f7(0xed)])})),{'ok':!![],'data':buildMutationData({'operation':'delete','appCode':_0x26db2e[_0x4432f7(0xed)],'key':_0x30251f,'before':projectAppConfig(_0x3fe2fa),'after':null,'dryRun':![]}),'message':'Deleted\x20app\x20config\x20'+_0x30251f};}};async function mustGetByKey(_0x3eb2d4,_0x9ff685){const _0x45eb5b=a24_0x3f4b70,_0xfe2a18=await withAppConfigApiBoundary(_0x45eb5b(0xeb),{'appCode':_0x3eb2d4,'key':_0x9ff685},()=>getAppConfigByKey(_0x3eb2d4,_0x9ff685));if(!_0xfe2a18)throw CliErrors[_0x45eb5b(0xe0)]('App\x20config\x20key\x20not\x20found:\x20'+_0x9ff685,'appCode:\x20'+_0x3eb2d4);return _0xfe2a18;}function requireAppConfigId(_0x2b33fa,_0x299291,_0x2fe7c3){const _0x471e67=a24_0x3f4b70;if(typeof _0x2b33fa['id']===_0x471e67(0xec)&&Number[_0x471e67(0xe6)](_0x2b33fa['id'])&&_0x2b33fa['id']>0x0)return _0x2b33fa['id'];throw CliErrors['apiError']('App\x20config\x20server\x20id\x20missing\x20for\x20key='+_0x299291+_0x471e67(0xe9)+_0x2fe7c3);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a25_0x2f42d3=a25_0x2693;(function(_0x366d8d,_0x554495){const _0x4b69c3=a25_0x2693,_0x350309=_0x366d8d();while(!![]){try{const _0x67ee34=-parseInt(_0x4b69c3(0x1b3))/0x1+parseInt(_0x4b69c3(0x1ad))/0x2*(-parseInt(_0x4b69c3(0x1ae))/0x3)+-parseInt(_0x4b69c3(0x1ab))/0x4+parseInt(_0x4b69c3(0x1ac))/0x5+parseInt(_0x4b69c3(0x1a5))/0x6*(-parseInt(_0x4b69c3(0x1b4))/0x7)+parseInt(_0x4b69c3(0x1b1))/0x8*(parseInt(_0x4b69c3(0x1b0))/0x9)+parseInt(_0x4b69c3(0x1a7))/0xa;if(_0x67ee34===_0x554495)break;else _0x350309['push'](_0x350309['shift']());}catch(_0x5e166c){_0x350309['push'](_0x350309['shift']());}}}(a25_0x4f4d,0x79e3d));import{getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{KEY_ARG,projectAppConfig,readKeyArg,REVEAL_FLAG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';function a25_0x2693(_0x5aeb98,_0x1e9ed0){_0x5aeb98=_0x5aeb98-0x1a5;const _0x4f4dfa=a25_0x4f4d();let _0x269334=_0x4f4dfa[_0x5aeb98];return _0x269334;}function a25_0x4f4d(){const _0x931abf=['bool','app-config','1078098prIZAp','get','18820810dOhEPd','appCode','Loaded\x20app\x20config\x20','appCode:\x20','2857476oMNXYj','3304510UFntRC','6VAUFbk','989022OGdtIG','\x20with\x20value\x20redacted','5510493TBDZmC','8HtWjtv','\x20with\x20value\x20revealed','233876rzTRJa','28NMdhPy','reveal'];a25_0x4f4d=function(){return _0x931abf;};return a25_0x4f4d();}export const appConfigGet={'service':a25_0x2f42d3(0x1b7),'command':'get','description':'Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','risk':'read','args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x4f0988){readKeyArg(_0x4f0988);},async 'execute'(_0x784688){const _0x1db833=a25_0x2f42d3,_0x279a56=readKeyArg(_0x784688),_0xc23e64=await withAppConfigApiBoundary(_0x1db833(0x1a6),{'appCode':_0x784688['appCode'],'key':_0x279a56},()=>getAppConfigByKey(_0x784688['appCode'],_0x279a56));if(!_0xc23e64)throw CliErrors['validation']('App\x20config\x20key\x20not\x20found:\x20'+_0x279a56,_0x1db833(0x1aa)+_0x784688[_0x1db833(0x1a8)]);const _0x4d09eb=projectAppConfig(_0xc23e64,{'reveal':_0x784688[_0x1db833(0x1b6)]('reveal')});return{'ok':!![],'data':{'config':_0x4d09eb},'message':_0x784688[_0x1db833(0x1b6)](_0x1db833(0x1b5))?_0x1db833(0x1a9)+_0x279a56+_0x1db833(0x1b2):_0x1db833(0x1a9)+_0x279a56+_0x1db833(0x1af)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4558fa,_0x1a0455){const _0x55af0e=a26_0x15a3,_0x510e42=_0x4558fa();while(!![]){try{const _0x5cf550=parseInt(_0x55af0e(0x1a1))/0x1*(parseInt(_0x55af0e(0x1a8))/0x2)+parseInt(_0x55af0e(0x19f))/0x3*(-parseInt(_0x55af0e(0x19e))/0x4)+-parseInt(_0x55af0e(0x1a2))/0x5+parseInt(_0x55af0e(0x1a6))/0x6*(parseInt(_0x55af0e(0x1a5))/0x7)+parseInt(_0x55af0e(0x1a0))/0x8+parseInt(_0x55af0e(0x1a3))/0x9*(parseInt(_0x55af0e(0x1a7))/0xa)+-parseInt(_0x55af0e(0x1a4))/0xb;if(_0x5cf550===_0x1a0455)break;else _0x510e42['push'](_0x510e42['shift']());}catch(_0xdc2a84){_0x510e42['push'](_0x510e42['shift']());}}}(a26_0x1f5b,0xdc0e1));function a26_0x15a3(_0x3928dd,_0x325626){_0x3928dd=_0x3928dd-0x19e;const _0x1f5beb=a26_0x1f5b();let _0x15a3d3=_0x1f5beb[_0x3928dd];return _0x15a3d3;}import{appConfigList}from'../../commands/app-config/list.js';import{appConfigGet}from'../../commands/app-config/get.js';function a26_0x1f5b(){const _0x5bb965=['6752IpMlKK','8057325QKsbJh','72qGWXjD','3493875OZkNIW','21jvXpRq','2736366PxlSfW','1295290WNsPHe','118irKIVC','134296hGOHNH','24AaevPe','2369952bFqcVo'];a26_0x1f5b=function(){return _0x5bb965;};return a26_0x1f5b();}import{appConfigSet}from'../../commands/app-config/set.js';import{appConfigDelete}from'../../commands/app-config/delete.js';export const appConfigDefinitions=[appConfigList,appConfigGet,appConfigSet,appConfigDelete];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a27_0x288b0c=a27_0x2941;(function(_0x439791,_0x28901f){const _0x2f7417=a27_0x2941,_0x16d4f=_0x439791();while(!![]){try{const _0x5ba893=parseInt(_0x2f7417(0xaa))/0x1*(parseInt(_0x2f7417(0x9d))/0x2)+-parseInt(_0x2f7417(0xa8))/0x3*(parseInt(_0x2f7417(0xac))/0x4)+parseInt(_0x2f7417(0xab))/0x5*(-parseInt(_0x2f7417(0x9e))/0x6)+parseInt(_0x2f7417(0xa7))/0x7*(-parseInt(_0x2f7417(0x98))/0x8)+parseInt(_0x2f7417(0x9c))/0x9*(-parseInt(_0x2f7417(0xa1))/0xa)+-parseInt(_0x2f7417(0xae))/0xb+parseInt(_0x2f7417(0x9f))/0xc;if(_0x5ba893===_0x28901f)break;else _0x16d4f['push'](_0x16d4f['shift']());}catch(_0x2cde5a){_0x16d4f['push'](_0x16d4f['shift']());}}}(a27_0x34ce,0x314b1));import{listAppConfigs}from'../../core/api-client.js';function a27_0x2941(_0x33e13f,_0x3573d2){_0x33e13f=_0x33e13f-0x97;const _0x34ce6b=a27_0x34ce();let _0x2941b6=_0x34ce6b[_0x33e13f];return _0x2941b6;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a27_0x34ce(){const _0x3f76be=['9ChpMke','122268TofukJ','318vEPZyK','10710564kQKRYY','app-config','1600870aMjFKG','list','appCode','key','Found\x20','trim','107751exYxkF','24525NFGXXj','length','1uISdxm','30865WTVMKS','4YhLjwc','map','1634534GAucgE','string','List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','56wBUdHG','\x20app\x20config(s)','Filter\x20by\x20exact\x20config\x20key','str'];a27_0x34ce=function(){return _0x3f76be;};return a27_0x34ce();}import{projectAppConfig,readOptionalTags,TAGS_FLAG,validateKey,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigList={'service':a27_0x288b0c(0xa0),'command':a27_0x288b0c(0xa2),'description':a27_0x288b0c(0x97),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a27_0x288b0c(0xa4),'type':a27_0x288b0c(0xaf),'description':a27_0x288b0c(0x9a)},TAGS_FLAG],async 'validate'(_0x11f12d){const _0x327227=a27_0x288b0c,_0x42e4f0=_0x11f12d[_0x327227(0x9b)](_0x327227(0xa4))[_0x327227(0xa6)]();if(_0x42e4f0)validateKey(_0x42e4f0);readOptionalTags(_0x11f12d);},async 'execute'(_0x4527c2){const _0x2f0548=a27_0x288b0c,_0x143b6f=_0x4527c2[_0x2f0548(0x9b)](_0x2f0548(0xa4))[_0x2f0548(0xa6)]()||undefined,_0x2c8792=readOptionalTags(_0x4527c2),_0x28a472=await withAppConfigApiBoundary(_0x2f0548(0xa2),{'appCode':_0x4527c2[_0x2f0548(0xa3)]},()=>listAppConfigs(_0x4527c2[_0x2f0548(0xa3)],{'key':_0x143b6f,'tags':_0x2c8792})),_0x39fb43=_0x28a472[_0x2f0548(0xad)](_0x3d3607=>projectAppConfig(_0x3d3607));return{'ok':!![],'data':{'appCode':_0x4527c2['appCode'],'count':_0x39fb43[_0x2f0548(0xa9)],'configs':_0x39fb43},'message':_0x2f0548(0xa5)+_0x39fb43['length']+_0x2f0548(0x99)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a28_0xba42(){const _0x3e6393=['App\x20config\x20server\x20id\x20missing\x20for\x20key=','/smartapi/app-config/update','524lPcimh','tags',',\x20appCode=','\x20app\x20config\x20','4014VWtibA','1715648MTUclL','389218HlRUSk','Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','3503502VTPAyQ','/smartapi/app-config/create','set','create','get','20465JkMfsb','50BeLkFH','number','update','isFinite','3374ooZrBD','1031760NVVTQa','appCode','high-risk-write','file','apiError','1174374yAuPIY'];a28_0xba42=function(){return _0x3e6393;};return a28_0xba42();}const a28_0xa80893=a28_0x474f;function a28_0x474f(_0x40f9d6,_0x4f48e8){_0x40f9d6=_0x40f9d6-0xa5;const _0xba42a1=a28_0xba42();let _0x474f85=_0xba42a1[_0x40f9d6];return _0x474f85;}(function(_0x1677d4,_0x95f8be){const _0xa54180=a28_0x474f,_0x59d122=_0x1677d4();while(!![]){try{const _0x49ed1d=parseInt(_0xa54180(0xb4))/0x1+-parseInt(_0xa54180(0xa6))/0x2+-parseInt(_0xa54180(0xab))/0x3+parseInt(_0xa54180(0xae))/0x4*(-parseInt(_0xa54180(0xbb))/0x5)+parseInt(_0xa54180(0xb2))/0x6*(-parseInt(_0xa54180(0xa5))/0x7)+-parseInt(_0xa54180(0xb3))/0x8+-parseInt(_0xa54180(0xb6))/0x9*(-parseInt(_0xa54180(0xbc))/0xa);if(_0x49ed1d===_0x95f8be)break;else _0x59d122['push'](_0x59d122['shift']());}catch(_0x2c9f24){_0x59d122['push'](_0x59d122['shift']());}}}(a28_0xba42,0x56b65));import{createAppConfig,getAppConfigByKey,updateAppConfig}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assertSingleValueSource,assertValueSourceReadable,asAppConfigDryRunResult,buildMutationData,FROM_ENV_FLAG,KEY_ARG,plannedAppConfig,projectAppConfig,readAppConfigValue,readKeyArg,readOptionalTags,STDIN_FLAG,TAGS_FLAG,VALUE_ARG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const CREATE_PATH=a28_0xa80893(0xb7),UPDATE_PATH=a28_0xa80893(0xad);export const appConfigSet={'service':'app-config','command':a28_0xa80893(0xb8),'description':a28_0xa80893(0xb5),'risk':a28_0xa80893(0xa8),'args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':a28_0xa80893(0xa9),'type':'string','description':'Read\x20config\x20value\x20from\x20file'}],async 'validate'(_0x2e23f5){readKeyArg(_0x2e23f5),readOptionalTags(_0x2e23f5),assertSingleValueSource(_0x2e23f5);},async 'dryRun'(_0x34ec97){const _0x592a98=a28_0xa80893,_0x196843=readKeyArg(_0x34ec97),_0x152e04=readOptionalTags(_0x34ec97),_0x25cf7f=assertSingleValueSource(_0x34ec97);await assertValueSourceReadable(_0x25cf7f);const _0x331c77=await withAppConfigApiBoundary(_0x592a98(0xba),{'appCode':_0x34ec97[_0x592a98(0xa7)],'key':_0x196843},()=>getAppConfigByKey(_0x34ec97[_0x592a98(0xa7)],_0x196843)),_0x6c88da=_0x331c77?_0x592a98(0xbe):_0x592a98(0xb9),_0x2f372f=_0x331c77?projectAppConfig(_0x331c77):null,_0x5da56b=plannedAppConfig({'appCode':_0x34ec97[_0x592a98(0xa7)],'key':_0x196843,'tags':_0x152e04??_0x331c77?.[_0x592a98(0xaf)],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x6c88da,'appCode':_0x34ec97['appCode'],'key':_0x196843,'before':_0x2f372f,'after':_0x5da56b,'dryRun':!![]}),{'method':'POST','url':_0x6c88da===_0x592a98(0xbe)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x2aca90){const _0xd0be7c=a28_0xa80893,_0x2d9bf2=readKeyArg(_0x2aca90),_0x3d42c5=readOptionalTags(_0x2aca90),_0x5904b4=await withAppConfigApiBoundary('get',{'appCode':_0x2aca90['appCode'],'key':_0x2d9bf2},()=>getAppConfigByKey(_0x2aca90[_0xd0be7c(0xa7)],_0x2d9bf2)),_0x579cc8=_0x5904b4?projectAppConfig(_0x5904b4):null,_0x5b5f5f=_0x5904b4?'update':_0xd0be7c(0xb9),{value:_0x3f5e02,warnings:_0xc7a87b}=await readAppConfigValue(_0x2aca90),_0x2d1f5b={'appCode':_0x2aca90[_0xd0be7c(0xa7)],'key':_0x2d9bf2,'value':_0x3f5e02,'tags':_0x3d42c5??_0x5904b4?.[_0xd0be7c(0xaf)]??undefined};await withAppConfigApiBoundary(_0x5b5f5f,{'appCode':_0x2aca90[_0xd0be7c(0xa7)],'key':_0x2d9bf2},async()=>{_0x5904b4?await updateAppConfig({..._0x2d1f5b,'id':requireAppConfigId(_0x5904b4,_0x2d9bf2,_0x2aca90['appCode'])}):await createAppConfig(_0x2d1f5b);});const _0x4e076a=await withAppConfigApiBoundary(_0xd0be7c(0xba),{'appCode':_0x2aca90[_0xd0be7c(0xa7)],'key':_0x2d9bf2},()=>getAppConfigByKey(_0x2aca90['appCode'],_0x2d9bf2)),_0x249930=_0x4e076a?projectAppConfig(_0x4e076a):plannedAppConfig({'appCode':_0x2aca90[_0xd0be7c(0xa7)],'key':_0x2d9bf2,'tags':_0x2d1f5b[_0xd0be7c(0xaf)],'hasValue':_0x3f5e02!==''});return{'ok':!![],'data':buildMutationData({'operation':_0x5b5f5f,'appCode':_0x2aca90[_0xd0be7c(0xa7)],'key':_0x2d9bf2,'before':_0x579cc8,'after':_0x249930,'dryRun':![],'warnings':_0xc7a87b}),'message':(_0x5b5f5f==='update'?'Updated':'Created')+_0xd0be7c(0xb1)+_0x2d9bf2};}};function requireAppConfigId(_0xd9643,_0x54326a,_0x15c06f){const _0x3822b7=a28_0xa80893;if(typeof _0xd9643['id']===_0x3822b7(0xbd)&&Number[_0x3822b7(0xbf)](_0xd9643['id'])&&_0xd9643['id']>0x0)return _0xd9643['id'];throw CliErrors[_0x3822b7(0xaa)](_0x3822b7(0xac)+_0x54326a+_0x3822b7(0xb0)+_0x15c06f);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a29_0x470c8c=a29_0x119c;(function(_0x47ed9b,_0x34510b){const _0x351a1e=a29_0x119c,_0x8075a3=_0x47ed9b();while(!![]){try{const _0x38a96=parseInt(_0x351a1e(0x1a0))/0x1*(parseInt(_0x351a1e(0x192))/0x2)+-parseInt(_0x351a1e(0x180))/0x3+-parseInt(_0x351a1e(0x18d))/0x4+parseInt(_0x351a1e(0x182))/0x5+parseInt(_0x351a1e(0x1ae))/0x6+parseInt(_0x351a1e(0x1ad))/0x7*(-parseInt(_0x351a1e(0x195))/0x8)+parseInt(_0x351a1e(0x199))/0x9;if(_0x38a96===_0x34510b)break;else _0x8075a3['push'](_0x8075a3['shift']());}catch(_0x16c7ec){_0x8075a3['push'](_0x8075a3['shift']());}}}(a29_0x24b8,0x3a0dd));import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':'key','description':a29_0x470c8c(0x18b),'required':!![]};export const VALUE_ARG={'name':'value','description':a29_0x470c8c(0x187),'required':![]};export const TAGS_FLAG={'name':'tags','type':a29_0x470c8c(0x176),'description':a29_0x470c8c(0x17b)};export const STDIN_FLAG={'name':a29_0x470c8c(0x19a),'type':a29_0x470c8c(0x19f),'description':a29_0x470c8c(0x18c),'default':![]};export const FROM_ENV_FLAG={'name':a29_0x470c8c(0x17d),'type':a29_0x470c8c(0x176),'description':a29_0x470c8c(0x19b)};export const REVEAL_FLAG={'name':'reveal','type':a29_0x470c8c(0x19f),'description':a29_0x470c8c(0x191),'default':![]};export function readKeyArg(_0x13b919){const _0x3c8cd9=a29_0x470c8c,_0xfbc9=_0x13b919[_0x3c8cd9(0x1a5)][0x0]?.[_0x3c8cd9(0x1b1)]()??'';return validateKey(_0xfbc9),_0xfbc9;}export function readOptionalTags(_0x1cdde7){const _0x3ffcec=a29_0x470c8c,_0x1dbe74=_0x1cdde7[_0x3ffcec(0x181)](_0x3ffcec(0x17a))[_0x3ffcec(0x1b1)]();if(!_0x1dbe74)return undefined;if(_0x1dbe74[_0x3ffcec(0x1a6)]>0x20)throw CliErrors[_0x3ffcec(0x1a8)](_0x3ffcec(0x194));return _0x1dbe74;}export function validateKey(_0x356454){const _0x2b713f=a29_0x470c8c;if(!_0x356454)throw CliErrors[_0x2b713f(0x1a8)](_0x2b713f(0x1a2));if(_0x356454[_0x2b713f(0x1a6)]>0x100)throw CliErrors[_0x2b713f(0x1a8)]('App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.');}function a29_0x24b8(){const _0x3e2a8c=['Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','after','Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','274CPiidM','\x20app\x20config.','App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.','8GLtLEf','utf8','key:\x20','url','1023894vmUEEA','stdin','Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable','kind','before','method','boolean','1521HJYRWd','appCode:\x20','Missing\x20app-config\x20key.','file','hasValue','args','length','gmtModified','validation','error','flag','once','dryRun','1956661gGKyVr','829494hUxhzj','push','appCode','trim','end','key','gmtCreate','string','join','env','valueRedacted','tags','Config\x20tags\x20for\x20filtering/display\x20metadata','data','from-env','reveal','argument','417252wfWrif','str','2240010pAJzYn','defineProperties','setEncoding','slice','name','Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','value','path','operation','Runtime\x20app-config\x20key','Read\x20config\x20value\x20from\x20stdin','1007992FAlMit','apiError'];a29_0x24b8=function(){return _0x3e2a8c;};return a29_0x24b8();}export function projectAppConfig(_0x273be2,_0x260a05){const _0x25eae1=a29_0x470c8c,_0x5ea9c7=_0x273be2['value']!==undefined&&_0x273be2['value']!==null&&_0x273be2[_0x25eae1(0x188)]!=='',_0x3946c0={'appCode':_0x273be2['appCode'],'key':_0x273be2['key'],'tags':_0x273be2[_0x25eae1(0x17a)]??undefined,'hasValue':_0x5ea9c7,'valueRedacted':_0x5ea9c7&&!_0x260a05?.[_0x25eae1(0x17e)],'gmtCreate':_0x273be2[_0x25eae1(0x1b4)],'gmtModified':_0x273be2[_0x25eae1(0x1a7)]};return _0x260a05?.[_0x25eae1(0x17e)]&&(_0x3946c0['value']=_0x273be2['value']??'',_0x3946c0[_0x25eae1(0x179)]=![]),_0x3946c0;}export function plannedAppConfig(_0x2cb03a){const _0xaed870=a29_0x470c8c,_0x23e1fc=_0x2cb03a[_0xaed870(0x1a4)]??!![];return{'appCode':_0x2cb03a['appCode'],'key':_0x2cb03a[_0xaed870(0x1b3)],'tags':_0x2cb03a[_0xaed870(0x17a)]??undefined,'hasValue':_0x23e1fc,'valueRedacted':_0x23e1fc};}export function buildMutationData(_0x468013){const _0x2a2b88=a29_0x470c8c;return{'operation':_0x468013[_0x2a2b88(0x18a)],'selector':{'appCode':_0x468013[_0x2a2b88(0x1b0)],'key':_0x468013[_0x2a2b88(0x1b3)]},'before':_0x468013[_0x2a2b88(0x19d)],'after':_0x468013[_0x2a2b88(0x190)],'dryRun':_0x468013[_0x2a2b88(0x1ac)],'warnings':_0x468013['warnings']??[]};}export async function withAppConfigApiBoundary(_0x349a5a,_0x178b02,_0x3309eb){const _0x39c089=a29_0x470c8c;try{return await _0x3309eb();}catch{const _0x349217=[_0x39c089(0x1a1)+_0x178b02[_0x39c089(0x1b0)]];if(_0x178b02[_0x39c089(0x1b3)])_0x349217[_0x39c089(0x1af)](_0x39c089(0x197)+_0x178b02[_0x39c089(0x1b3)]);_0x349217[_0x39c089(0x1af)]('value\x20is\x20redacted');throw CliErrors[_0x39c089(0x18e)]('Failed\x20to\x20'+_0x349a5a+_0x39c089(0x193),_0x349217[_0x39c089(0x177)](';\x20')+'.');}}export function asAppConfigDryRunResult(_0x36a0c1,_0x71f0f3){const _0x3817fa=a29_0x470c8c;return Object[_0x3817fa(0x183)](_0x36a0c1,{'method':{'value':_0x71f0f3[_0x3817fa(0x19e)],'enumerable':![]},'url':{'value':_0x71f0f3[_0x3817fa(0x198)],'enumerable':![]}});}export function assertSingleValueSource(_0xd25269){const _0x171b88=a29_0x470c8c,_0x5b8cb5=[];_0xd25269[_0x171b88(0x1a5)]['length']>0x1&&_0x5b8cb5[_0x171b88(0x1af)]({'kind':_0x171b88(0x17f),'value':_0xd25269[_0x171b88(0x1a5)][_0x171b88(0x185)](0x1)['join']('\x20')});const _0x268fdf=_0xd25269[_0x171b88(0x1aa)](_0x171b88(0x188));_0x268fdf!==undefined&&_0x268fdf!==null&&_0x5b8cb5[_0x171b88(0x1af)]({'kind':_0x171b88(0x17f),'value':String(_0x268fdf)});_0xd25269['bool'](_0x171b88(0x19a))&&_0x5b8cb5[_0x171b88(0x1af)]({'kind':_0x171b88(0x19a)});const _0xfa87ce=_0xd25269[_0x171b88(0x181)](_0x171b88(0x17d))[_0x171b88(0x1b1)]();_0xfa87ce&&_0x5b8cb5['push']({'kind':_0x171b88(0x178),'name':_0xfa87ce});const _0x40c11c=_0xd25269[_0x171b88(0x181)](_0x171b88(0x1a3))[_0x171b88(0x1b1)]();_0x40c11c&&_0x5b8cb5[_0x171b88(0x1af)]({'kind':_0x171b88(0x1a3),'path':_0x40c11c});if(_0x5b8cb5[_0x171b88(0x1a6)]===0x0)throw CliErrors[_0x171b88(0x1a8)]('Missing\x20app-config\x20value\x20source.',_0x171b88(0x18f));if(_0x5b8cb5[_0x171b88(0x1a6)]>0x1)throw CliErrors[_0x171b88(0x1a8)]('App\x20config\x20value\x20source\x20is\x20ambiguous.','Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.');return _0x5b8cb5[0x0];}export async function assertValueSourceReadable(_0x2f5df0){const _0x31d554=a29_0x470c8c;if(_0x2f5df0[_0x31d554(0x19c)]===_0x31d554(0x178)&&!(_0x2f5df0[_0x31d554(0x186)]in process.env))throw CliErrors[_0x31d554(0x1a8)]('Environment\x20variable\x20is\x20not\x20set:\x20'+_0x2f5df0[_0x31d554(0x186)]);if(_0x2f5df0['kind']==='file')try{await access(_0x2f5df0[_0x31d554(0x189)]);}catch{throw CliErrors[_0x31d554(0x1a8)]('Value\x20file\x20is\x20not\x20readable:\x20'+_0x2f5df0[_0x31d554(0x189)]);}}function a29_0x119c(_0x2ab5c1,_0x48d201){_0x2ab5c1=_0x2ab5c1-0x176;const _0x24b887=a29_0x24b8();let _0x119cb4=_0x24b887[_0x2ab5c1];return _0x119cb4;}export async function readAppConfigValue(_0x80ec1a){const _0x5a71f1=a29_0x470c8c,_0x4366cb=assertSingleValueSource(_0x80ec1a),_0x42378d=[];if(_0x4366cb[_0x5a71f1(0x19c)]===_0x5a71f1(0x17f))return _0x42378d[_0x5a71f1(0x1af)]('Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.'),{'value':_0x4366cb[_0x5a71f1(0x188)]??'','source':_0x4366cb[_0x5a71f1(0x19c)],'warnings':_0x42378d};if(_0x4366cb[_0x5a71f1(0x19c)]===_0x5a71f1(0x19a))return{'value':await readStdin(),'source':_0x4366cb[_0x5a71f1(0x19c)],'warnings':_0x42378d};if(_0x4366cb[_0x5a71f1(0x19c)]===_0x5a71f1(0x178)){if(!(_0x4366cb['name']in process.env))throw CliErrors[_0x5a71f1(0x1a8)]('Environment\x20variable\x20is\x20not\x20set:\x20'+_0x4366cb['name']);return{'value':process.env[_0x4366cb.name]??'','source':_0x4366cb[_0x5a71f1(0x19c)],'warnings':_0x42378d};}return{'value':await readFile(_0x4366cb[_0x5a71f1(0x189)],_0x5a71f1(0x196)),'source':_0x4366cb['kind'],'warnings':_0x42378d};}function readStdin(){return new Promise((_0x7f6965,_0x1d35e1)=>{const _0x473df4=a29_0x119c;let _0x5da401='';process[_0x473df4(0x19a)][_0x473df4(0x184)](_0x473df4(0x196)),process[_0x473df4(0x19a)]['on'](_0x473df4(0x17c),_0x27b6dd=>{_0x5da401+=_0x27b6dd;}),process['stdin'][_0x473df4(0x1ab)](_0x473df4(0x1b2),()=>_0x7f6965(_0x5da401)),process[_0x473df4(0x19a)][_0x473df4(0x1ab)](_0x473df4(0x1a9),_0x1d35e1);});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a30_0xc1f1(_0x482e15,_0x191582){_0x482e15=_0x482e15-0x15d;const _0x37a13e=a30_0x37a1();let _0xc1f115=_0x37a13e[_0x482e15];return _0xc1f115;}const a30_0x1e87be=a30_0xc1f1;(function(_0x401199,_0x252701){const _0x3379e0=a30_0xc1f1,_0xebcfc4=_0x401199();while(!![]){try{const _0x4b6052=parseInt(_0x3379e0(0x164))/0x1+parseInt(_0x3379e0(0x170))/0x2*(-parseInt(_0x3379e0(0x16c))/0x3)+-parseInt(_0x3379e0(0x15e))/0x4+parseInt(_0x3379e0(0x167))/0x5+parseInt(_0x3379e0(0x15f))/0x6+-parseInt(_0x3379e0(0x16e))/0x7*(parseInt(_0x3379e0(0x162))/0x8)+parseInt(_0x3379e0(0x16a))/0x9*(parseInt(_0x3379e0(0x16b))/0xa);if(_0x4b6052===_0x252701)break;else _0xebcfc4['push'](_0xebcfc4['shift']());}catch(_0xacd077){_0xebcfc4['push'](_0xebcfc4['shift']());}}}(a30_0x37a1,0x6c830));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':a30_0x1e87be(0x163),'command':a30_0x1e87be(0x160),'description':a30_0x1e87be(0x168),'risk':a30_0x1e87be(0x16f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a30_0x1e87be(0x172),'type':'boolean','description':a30_0x1e87be(0x171),'default':![]}],async 'execute'(_0x31fe62){const _0x18fa9e=a30_0x1e87be,{runAuthServer:_0x1fdcde}=await import(_0x18fa9e(0x161));return await _0x1fdcde({'autoYes':_0x31fe62[_0x18fa9e(0x169)](_0x18fa9e(0x172)),'nonInteractive':_0x31fe62[_0x18fa9e(0x173)]}),{'ok':!![]};}},{'service':'auth','command':'logout','description':a30_0x1e87be(0x165),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x5a1b35){const _0x3be563=a30_0x1e87be;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x3be563(0x16d)](_0x3be563(0x166))):console['log'](_0x3be563(0x15d)),{'ok':!![]};}}];function a30_0x37a1(){const _0x21f06a=['auth','755904YirlRS','Clear\x20login\x20session','✓\x20Logged\x20out','1545985DYCCQI','Login\x20via\x20browser','bool','27HTFZTr','693490FLYMwk','4716wvtPKq','log','24143pMDOQV','read','700ViUbXH','Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','yes','nonInteractive','!\x20Not\x20logged\x20in','1443264VGRtnv','2542698SqbkbV','login','../../auth/auth-server-ui.js','792tKIaty'];a30_0x37a1=function(){return _0x21f06a;};return a30_0x37a1();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a31_0x2d4c83=a31_0x276f;function a31_0x276f(_0x3c5d7f,_0x177061){_0x3c5d7f=_0x3c5d7f-0xcc;const _0x455fa8=a31_0x455f();let _0x276f59=_0x455fa8[_0x3c5d7f];return _0x276f59;}function a31_0x455f(){const _0xed7e72=['parseInt',']\x20(','function-node','nonInteractive','bff','.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','string','before','apiDir','Operation\x20type\x20(HOOK\x20only)','create','UNKNOWN','after','2530740QzUoBk','isInteger','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','Invalid\x20function\x20name\x20\x22','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','join','find','validation','datasetcode','type','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','write','Select\x20trigger\x20node:','231pYwAuw','Available\x20aliases:\x20','stderr','functionNode','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','appCode','/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','HOOK\x20requires\x20alias/operation/node\x20options.','ENDPOINT','6835815AUbQRG','\x22\x20not\x20found\x20for\x20dataset\x20','Alias\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','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','TODO:\x20add\x20script\x20description','Trigger\x20node\x20(HOOK\x20only)','No\x20operation\x20types\x20found\x20for\x20dataset\x20','Available:\x20','source','HOOK','2133036uJBmQq','str','325480kTUbmM','.js','length','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','\x20function:\x20','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','datasetCode','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','scriptsRootDir','Select\x20operation\x20type:','description','question','\x0a\x20*\x20[触发节点]\x20','COMMON','Function\x20name\x20(valid\x20JS\x20identifier)','23zFGzfV','195256CYMUkX','name','551576aVDpwU','includes','utf8','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','map','Script\x20type','24902TduMRT','File\x20already\x20exists:\x20','133ZReAuc','code','operationType','Invalid\x20dataset\x20selection.','alias','Script\x20description','operation-type','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','Select\x20dataset:','\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','trim','5tQRBoS'];a31_0x455f=function(){return _0xed7e72;};return a31_0x455f();}(function(_0x3b859b,_0x56f6bd){const _0x28d710=a31_0x276f,_0x12d82c=_0x3b859b();while(!![]){try{const _0x538a67=-parseInt(_0x28d710(0xf0))/0x1*(-parseInt(_0x28d710(0xf9))/0x2)+parseInt(_0x28d710(0x114))/0x3+-parseInt(_0x28d710(0xf3))/0x4*(-parseInt(_0x28d710(0x106))/0x5)+-parseInt(_0x28d710(0xdb))/0x6+-parseInt(_0x28d710(0xfb))/0x7*(parseInt(_0x28d710(0xf1))/0x8)+parseInt(_0x28d710(0xd0))/0x9+parseInt(_0x28d710(0xdd))/0xa*(-parseInt(_0x28d710(0x121))/0xb);if(_0x538a67===_0x56f6bd)break;else _0x12d82c['push'](_0x12d82c['shift']());}catch(_0x5b27fe){_0x12d82c['push'](_0x12d82c['shift']());}}}(a31_0x455f,0x8015b));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_0x2d4c83(0x10b),'command':a31_0x2d4c83(0x111),'description':a31_0x2d4c83(0xe5),'risk':a31_0x2d4c83(0x11f),'flags':[{'name':a31_0x2d4c83(0x11d),'type':a31_0x2d4c83(0x10d),'required':!![],'enum':['COMMON',a31_0x2d4c83(0xcf),a31_0x2d4c83(0xda)],'description':a31_0x2d4c83(0xf8)},{'name':'name','type':'string','required':!![],'description':a31_0x2d4c83(0xef)},{'name':a31_0x2d4c83(0xeb),'type':a31_0x2d4c83(0x10d),'description':a31_0x2d4c83(0x100)},{'name':a31_0x2d4c83(0xff),'type':a31_0x2d4c83(0x10d),'description':a31_0x2d4c83(0x125)},{'name':a31_0x2d4c83(0x11c),'type':'string','description':a31_0x2d4c83(0xe1)},{'name':'operation-type','type':'string','description':a31_0x2d4c83(0x110)},{'name':'function-node','type':a31_0x2d4c83(0x10d),'description':a31_0x2d4c83(0xd6),'enum':['before',a31_0x2d4c83(0x113)]}],async 'validate'(_0xd685e9){const _0x3a5817=a31_0x2d4c83,_0x26a0bb=_0xd685e9[_0x3a5817(0xdc)]('name');if(!isValidBffFunctionName(_0x26a0bb))throw CliErrors[_0x3a5817(0x11b)](_0x3a5817(0x117)+_0x26a0bb+'\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).');},async 'execute'(_0x2b0e07){const _0x5083b5=a31_0x2d4c83,_0x5c315d=loadBffProjectConfig(_0x2b0e07[_0x5083b5(0xcc)]),_0x34d043=_0x2b0e07[_0x5083b5(0xdc)]('type'),_0x250d82=_0x2b0e07[_0x5083b5(0xdc)]('name'),_0x298afc=_0x2b0e07[_0x5083b5(0xdc)](_0x5083b5(0xeb))||undefined,_0x12cf54=_0x34d043===_0x5083b5(0xda)?await resolveHookOptions(_0x5c315d,_0x2b0e07):undefined,_0x557e6a=buildFilePath(_0x5c315d,_0x34d043,_0x250d82,_0x12cf54);if(await fileExists(_0x557e6a))throw CliErrors['validation'](_0x5083b5(0xfa)+_0x557e6a);await mkdir(dirname(_0x557e6a),{'recursive':!![]});const _0xb0ddfa=generateTemplate(_0x34d043,_0x250d82,_0x2b0e07[_0x5083b5(0xcc)],_0x298afc,_0x12cf54);await writeFile(_0x557e6a,_0xb0ddfa,_0x5083b5(0xf5));const _0xcbf432={'type':_0x34d043,'name':_0x250d82,'path':_0x557e6a};if(_0x298afc)_0xcbf432[_0x5083b5(0xeb)]=_0x298afc;if(_0x12cf54){if(_0x12cf54[_0x5083b5(0xff)])_0xcbf432[_0x5083b5(0xff)]=_0x12cf54[_0x5083b5(0xff)];_0xcbf432['datasetCode']=_0x12cf54[_0x5083b5(0xe7)],_0xcbf432[_0x5083b5(0xfd)]=_0x12cf54[_0x5083b5(0xfd)],_0xcbf432[_0x5083b5(0x124)]=_0x12cf54['functionNode'];}return{'ok':!![],'data':_0xcbf432,'message':'Created\x20'+_0x34d043+_0x5083b5(0xe2)+_0x250d82};}};async function resolveHookOptions(_0x8e521b,_0x1f7a81){const _0x226be4=a31_0x2d4c83,_0x3fef25=loadAliasMap(_0x1f7a81[_0x226be4(0x10f)],undefined,resolveApiFilePath(_0x1f7a81[_0x226be4(0x10f)],_0x1f7a81[_0x226be4(0xcc)])),_0x4022ec=_0x3fef25[_0x226be4(0xdf)]>0x0;let _0x1f5158,_0x2bc3fe,_0x4047ca;const _0x389562=_0x1f7a81[_0x226be4(0xdc)](_0x226be4(0xff)),_0x2ef575=_0x1f7a81[_0x226be4(0xdc)]('datasetcode');if(_0x389562){const _0x4fd763=resolveAlias(_0x1f7a81['apiDir'],_0x389562,undefined,resolveApiFilePath(_0x1f7a81[_0x226be4(0x10f)],_0x1f7a81[_0x226be4(0xcc)]));if(!_0x4fd763){const _0xbe8c4a=_0x4022ec?_0x226be4(0x122)+_0x3fef25[_0x226be4(0xf7)](_0x13abe7=>_0x13abe7['alias'])['join'](',\x20'):'No\x20api.ts\x20found.\x20Run\x20`'+CLI_BIN_NAME+_0x226be4(0x116);throw CliErrors[_0x226be4(0x11b)](_0x226be4(0xd2)+_0x389562+'\x22\x20not\x20found.\x20'+_0xbe8c4a);}_0x1f5158=_0x389562,_0x2bc3fe=_0x4fd763;}else{if(_0x2ef575){_0x2bc3fe=_0x2ef575;const _0x18b91a=_0x3fef25[_0x226be4(0x11a)](_0x1f29d7=>_0x1f29d7[_0x226be4(0xe7)]===_0x2ef575);_0x1f5158=_0x18b91a?.[_0x226be4(0xff)];}else{if(_0x1f7a81['nonInteractive'])throw CliErrors[_0x226be4(0x11b)](_0x226be4(0xe4));else{if(_0x4022ec){const _0x414893=_0x3fef25['map'](_0x1fb2dc=>_0x1fb2dc[_0x226be4(0xff)]+'\x20('+_0x1fb2dc['tableName']+')'),_0x50892d=await promptSelect('Select\x20dataset:',_0x414893),_0x386932=_0x3fef25[_0x50892d];if(!_0x386932)throw CliErrors[_0x226be4(0x11b)](_0x226be4(0xfe));_0x1f5158=_0x386932[_0x226be4(0xff)],_0x2bc3fe=_0x386932[_0x226be4(0xe7)];}else{const _0x3ec855=await listDatasets(_0x1f7a81[_0x226be4(0xcc)]);if(_0x3ec855['length']===0x0)throw CliErrors[_0x226be4(0x11b)]('No\x20datasets\x20found\x20for\x20this\x20app.');const _0xeae843=_0x3ec855[_0x226be4(0xf7)](_0x12f112=>_0x12f112[_0x226be4(0xf2)]+'\x20['+(_0x12f112[_0x226be4(0xd9)]??_0x226be4(0x112))+_0x226be4(0x108)+_0x12f112[_0x226be4(0xfc)]+')'),_0x3813e2=await promptSelect(_0x226be4(0x103),_0xeae843),_0x245ab2=_0x3ec855[_0x3813e2];if(!_0x245ab2)throw CliErrors[_0x226be4(0x11b)](_0x226be4(0xfe));_0x2bc3fe=_0x245ab2['code'],_0x1f5158=undefined;}}}}const _0x1c472b=await listDatasets(_0x1f7a81[_0x226be4(0xcc)]),_0x235611=_0x1c472b['find'](_0x4d61fa=>_0x4d61fa[_0x226be4(0xfc)]===_0x2bc3fe);if(!_0x235611)throw CliErrors['validation']('Dataset\x20not\x20found\x20for\x20code\x20\x22'+_0x2bc3fe+'\x22.\x20'+(_0x1f5158?_0x226be4(0xe0)+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh.':''));_0x4047ca=_0x235611['id'];const _0x5c5ec1=_0x1f5158??_0x2bc3fe,_0x5e0c56=await listBffDatasetOperations(_0x1f7a81[_0x226be4(0xcc)],_0x4047ca),_0xe5b479=_0x5e0c56?Object['keys'](_0x5e0c56):[];if(_0xe5b479['length']===0x0)throw CliErrors['validation'](_0x226be4(0xd7)+_0x5c5ec1+'.');let _0x3fa277;const _0x495177=_0x1f7a81[_0x226be4(0xdc)](_0x226be4(0x101));if(_0x495177){if(!_0xe5b479[_0x226be4(0xf4)](_0x495177))throw CliErrors['validation']('Operation\x20type\x20\x22'+_0x495177+_0x226be4(0xd1)+_0x5c5ec1+'.\x20'+(_0x226be4(0xd8)+_0xe5b479[_0x226be4(0x119)](',\x20')));_0x3fa277=_0x495177;}else{if(_0x1f7a81['nonInteractive'])throw CliErrors[_0x226be4(0x11b)](_0x226be4(0xe6));const _0x57f46f=await promptSelect(_0x226be4(0xea),_0xe5b479);_0x3fa277=_0xe5b479[_0x57f46f]??_0xe5b479[0x0];}let _0x2f775d=normalizeHookFunctionNode(_0x1f7a81['str'](_0x226be4(0x109)));if(!_0x2f775d){if(_0x1f7a81['str'](_0x226be4(0x109)))throw CliErrors[_0x226be4(0x11b)](_0x226be4(0x11e));if(_0x1f7a81[_0x226be4(0x10a)])throw CliErrors[_0x226be4(0x11b)](_0x226be4(0x102));const _0x4196b9=await promptSelect(_0x226be4(0x120),[_0x226be4(0x10e),_0x226be4(0x113)]);_0x2f775d=[_0x226be4(0x10e),_0x226be4(0x113)][_0x4196b9]??'before';}return{'alias':_0x1f5158,'datasetCode':_0x2bc3fe,'datasetId':_0x4047ca,'operationType':_0x3fa277,'functionNode':_0x2f775d};}async function promptSelect(_0x4a816c,_0x2a4e3a){const _0x1806e7=a31_0x2d4c83;if(_0x2a4e3a[_0x1806e7(0xdf)]===0x1)return 0x0;for(const [_0x13694c,_0x156df8]of _0x2a4e3a['entries']()){process[_0x1806e7(0x123)][_0x1806e7(0x11f)]('\x20\x20'+(_0x13694c+0x1)+'.\x20'+_0x156df8+'\x0a');}const _0x253ad0=createInterface({'input':process['stdin'],'output':process[_0x1806e7(0x123)]});while(!![]){const _0x5768a5=await new Promise(_0x47695c=>{const _0x2a7717=_0x1806e7;_0x253ad0[_0x2a7717(0xec)](_0x4a816c+'\x20',_0x47695c);}),_0x81de6a=Number[_0x1806e7(0x107)](_0x5768a5[_0x1806e7(0x105)](),0xa);if(Number[_0x1806e7(0x115)](_0x81de6a)&&_0x81de6a>=0x1&&_0x81de6a<=_0x2a4e3a['length'])return _0x253ad0['close'](),_0x81de6a-0x1;process[_0x1806e7(0x123)]['write'](_0x1806e7(0xe3)+_0x2a4e3a[_0x1806e7(0xdf)]+'.\x0a');}}function buildFilePath(_0xa7afb2,_0x33b87e,_0x33a68f,_0xd747c1){const _0x5a8093=a31_0x2d4c83;if(_0x33b87e===_0x5a8093(0xda)){if(!_0xd747c1)throw CliErrors[_0x5a8093(0x11b)](_0x5a8093(0xce));const _0x4cfaf6=_0xd747c1[_0x5a8093(0xff)]??_0xd747c1[_0x5a8093(0xe7)];return join(_0xa7afb2[_0x5a8093(0xe9)],_0x5a8093(0xda),_0x4cfaf6,_0xd747c1['operationType'],_0xd747c1[_0x5a8093(0x124)],_0x33a68f+_0x5a8093(0xde));}return join(_0xa7afb2[_0x5a8093(0xe9)],_0x33b87e,_0x33a68f+_0x5a8093(0xde));}export function generateTemplate(_0x1e4559,_0x21b8d3,_0x302a40,_0xdafa86,_0x2cdfb4){const _0x5d2f78=a31_0x2d4c83,_0x2925b1=_0xdafa86?.[_0x5d2f78(0x105)]()||_0x5d2f78(0xd5);if(_0x1e4559===_0x5d2f78(0xee))return'/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20'+_0x2925b1+'\x0a\x20*\x20[脚本名称]\x20'+_0x21b8d3+_0x5d2f78(0xf6)+_0x21b8d3+_0x5d2f78(0x10c)+_0x21b8d3+_0x5d2f78(0xe8);if(_0x1e4559===_0x5d2f78(0xcf))return'/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20'+_0x2925b1+'\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/'+_0x302a40+'/'+_0x21b8d3+_0x5d2f78(0xd3)+_0x21b8d3+_0x5d2f78(0xe8);if(!_0x2cdfb4)throw CliErrors['validation'](_0x5d2f78(0xd4));return _0x5d2f78(0xcd)+_0x2925b1+_0x5d2f78(0x118)+_0x302a40+'/'+_0x2cdfb4['datasetCode']+'/'+_0x2cdfb4['operationType']+_0x5d2f78(0xed)+_0x2cdfb4[_0x5d2f78(0x124)]+_0x5d2f78(0x104)+_0x21b8d3+_0x5d2f78(0xe8);}
|
|
1
|
+
const a31_0x19dd75=a31_0x3161;(function(_0x3c19e3,_0x2595ae){const _0x4559dd=a31_0x3161,_0x3de137=_0x3c19e3();while(!![]){try{const _0x3d4e1f=-parseInt(_0x4559dd(0x1d7))/0x1*(parseInt(_0x4559dd(0x1d8))/0x2)+parseInt(_0x4559dd(0x19f))/0x3+-parseInt(_0x4559dd(0x1c5))/0x4+parseInt(_0x4559dd(0x1e8))/0x5+-parseInt(_0x4559dd(0x1e5))/0x6*(-parseInt(_0x4559dd(0x1ea))/0x7)+parseInt(_0x4559dd(0x1d3))/0x8*(parseInt(_0x4559dd(0x1a2))/0x9)+-parseInt(_0x4559dd(0x1b2))/0xa;if(_0x3d4e1f===_0x2595ae)break;else _0x3de137['push'](_0x3de137['shift']());}catch(_0x55b014){_0x3de137['push'](_0x3de137['shift']());}}}(a31_0x3be6,0x958d1));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_0x3161(_0x1d38d8,_0x96ed8b){_0x1d38d8=_0x1d38d8-0x195;const _0x3be609=a31_0x3be6();let _0x3161ed=_0x3be609[_0x1d38d8];return _0x3161ed;}import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';import{isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';function a31_0x3be6(){const _0x327be3=['134376RYrCAJ','stdin','close','length','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','Created\x20','trim','Operation\x20type\x20(HOOK\x20only)','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','HOOK',']\x20(','Trigger\x20node\x20(HOOK\x20only)','1500OoAwFM','operation-type','map','5973070JtXimV','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/','29918htjfjb','operationType','HOOK\x20requires\x20alias/operation/node\x20options.','string','datasetcode','write','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','datasetCode','find','Operation\x20type\x20\x22','\x0a\x20*\x20[脚本名称]\x20','Available\x20aliases:\x20','type','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','functionNode','File\x20already\x20exists:\x20','2822934vkFlik','name','source','63gIrdVU','.js','TODO:\x20add\x20script\x20description','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','alias','Select\x20dataset:','question','.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','\x22.\x20','includes','\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','nonInteractive','Script\x20description','\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','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','parseInt','34038600MHHkJm','ENDPOINT','Function\x20name\x20(valid\x20JS\x20identifier)','\x22\x20not\x20found\x20for\x20dataset\x20','\x20function:\x20','\x20api\x20pull`\x20to\x20refresh.','bff','Invalid\x20dataset\x20selection.','str','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','join','No\x20api.ts\x20found.\x20Run\x20`','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','appCode','after','apiDir','utf8','Alias\x20\x22','before','833256EXsusR','Invalid\x20function\x20name\x20\x22','COMMON','No\x20operation\x20types\x20found\x20for\x20dataset\x20','validation','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','stderr','description','function-node','tableName','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','\x0a\x20*\x20[触发节点]\x20','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','1396808CnVsTi','Available:\x20','code','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','3MNMxgf'];a31_0x3be6=function(){return _0x327be3;};return a31_0x3be6();}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const bffCreate={'service':a31_0x19dd75(0x1b8),'command':'create','description':'Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','risk':a31_0x19dd75(0x1ef),'flags':[{'name':a31_0x19dd75(0x19b),'type':a31_0x19dd75(0x1ed),'required':!![],'enum':[a31_0x19dd75(0x1c7),a31_0x19dd75(0x1b3),a31_0x19dd75(0x1e2)],'description':'Script\x20type'},{'name':a31_0x19dd75(0x1a0),'type':a31_0x19dd75(0x1ed),'required':!![],'description':a31_0x19dd75(0x1b4)},{'name':a31_0x19dd75(0x1cc),'type':'string','description':a31_0x19dd75(0x1ae)},{'name':a31_0x19dd75(0x1a6),'type':'string','description':a31_0x19dd75(0x1b0)},{'name':a31_0x19dd75(0x1ee),'type':a31_0x19dd75(0x1ed),'description':a31_0x19dd75(0x1be)},{'name':a31_0x19dd75(0x1e6),'type':'string','description':a31_0x19dd75(0x1e0)},{'name':a31_0x19dd75(0x1cd),'type':a31_0x19dd75(0x1ed),'description':a31_0x19dd75(0x1e4),'enum':[a31_0x19dd75(0x1c4),a31_0x19dd75(0x1c0)]}],async 'validate'(_0xd98256){const _0x1f6a11=a31_0x19dd75,_0x17af0a=_0xd98256[_0x1f6a11(0x1ba)]('name');if(!isValidBffFunctionName(_0x17af0a))throw CliErrors[_0x1f6a11(0x1c9)](_0x1f6a11(0x1c6)+_0x17af0a+'\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).');},async 'execute'(_0x1a0083){const _0x130d60=a31_0x19dd75,_0x193455=loadBffProjectConfig(_0x1a0083['appCode']),_0x44fc4b=_0x1a0083[_0x130d60(0x1ba)](_0x130d60(0x19b)),_0x564ddf=_0x1a0083[_0x130d60(0x1ba)](_0x130d60(0x1a0)),_0x39769e=_0x1a0083[_0x130d60(0x1ba)]('description')||undefined,_0x2eda95=_0x44fc4b===_0x130d60(0x1e2)?await resolveHookOptions(_0x193455,_0x1a0083):undefined,_0x28acce=buildFilePath(_0x193455,_0x44fc4b,_0x564ddf,_0x2eda95);if(await fileExists(_0x28acce))throw CliErrors[_0x130d60(0x1c9)](_0x130d60(0x19e)+_0x28acce);await mkdir(dirname(_0x28acce),{'recursive':!![]});const _0x18b0fd=generateTemplate(_0x44fc4b,_0x564ddf,_0x1a0083[_0x130d60(0x1bf)],_0x39769e,_0x2eda95);await writeFile(_0x28acce,_0x18b0fd,_0x130d60(0x1c2));const _0x2c7246={'type':_0x44fc4b,'name':_0x564ddf,'path':_0x28acce};if(_0x39769e)_0x2c7246[_0x130d60(0x1cc)]=_0x39769e;if(_0x2eda95){if(_0x2eda95[_0x130d60(0x1a6)])_0x2c7246[_0x130d60(0x1a6)]=_0x2eda95[_0x130d60(0x1a6)];_0x2c7246[_0x130d60(0x196)]=_0x2eda95[_0x130d60(0x196)],_0x2c7246[_0x130d60(0x1eb)]=_0x2eda95[_0x130d60(0x1eb)],_0x2c7246['functionNode']=_0x2eda95[_0x130d60(0x19d)];}return{'ok':!![],'data':_0x2c7246,'message':_0x130d60(0x1de)+_0x44fc4b+_0x130d60(0x1b6)+_0x564ddf};}};async function resolveHookOptions(_0x29289d,_0x447a5a){const _0x2f94e0=a31_0x19dd75,_0x3e66c5=loadAliasMap(_0x447a5a['apiDir'],undefined,resolveApiFilePath(_0x447a5a[_0x2f94e0(0x1c1)],_0x447a5a[_0x2f94e0(0x1bf)])),_0x2e1126=_0x3e66c5[_0x2f94e0(0x1db)]>0x0;let _0x3204f7,_0x435be3,_0x33083f;const _0x123935=_0x447a5a[_0x2f94e0(0x1ba)](_0x2f94e0(0x1a6)),_0x26556c=_0x447a5a[_0x2f94e0(0x1ba)](_0x2f94e0(0x1ee));if(_0x123935){const _0x2cdd7d=resolveAlias(_0x447a5a[_0x2f94e0(0x1c1)],_0x123935,undefined,resolveApiFilePath(_0x447a5a[_0x2f94e0(0x1c1)],_0x447a5a[_0x2f94e0(0x1bf)]));if(!_0x2cdd7d){const _0x3524bd=_0x2e1126?_0x2f94e0(0x19a)+_0x3e66c5[_0x2f94e0(0x1e7)](_0x3fadfa=>_0x3fadfa[_0x2f94e0(0x1a6)])[_0x2f94e0(0x1bc)](',\x20'):_0x2f94e0(0x1bd)+CLI_BIN_NAME+_0x2f94e0(0x1bb);throw CliErrors[_0x2f94e0(0x1c9)](_0x2f94e0(0x1c3)+_0x123935+'\x22\x20not\x20found.\x20'+_0x3524bd);}_0x3204f7=_0x123935,_0x435be3=_0x2cdd7d;}else{if(_0x26556c){_0x435be3=_0x26556c;const _0x30e0c0=_0x3e66c5[_0x2f94e0(0x197)](_0x4b5c95=>_0x4b5c95[_0x2f94e0(0x196)]===_0x26556c);_0x3204f7=_0x30e0c0?.[_0x2f94e0(0x1a6)];}else{if(_0x447a5a[_0x2f94e0(0x1ad)])throw CliErrors[_0x2f94e0(0x1c9)](_0x2f94e0(0x195));else{if(_0x2e1126){const _0x208250=_0x3e66c5[_0x2f94e0(0x1e7)](_0x346552=>_0x346552[_0x2f94e0(0x1a6)]+'\x20('+_0x346552[_0x2f94e0(0x1ce)]+')'),_0x3dbce3=await promptSelect(_0x2f94e0(0x1a7),_0x208250),_0x183632=_0x3e66c5[_0x3dbce3];if(!_0x183632)throw CliErrors['validation']('Invalid\x20dataset\x20selection.');_0x3204f7=_0x183632[_0x2f94e0(0x1a6)],_0x435be3=_0x183632[_0x2f94e0(0x196)];}else{const _0x5a5fa4=await listDatasets(_0x447a5a['appCode']);if(_0x5a5fa4[_0x2f94e0(0x1db)]===0x0)throw CliErrors[_0x2f94e0(0x1c9)]('No\x20datasets\x20found\x20for\x20this\x20app.');const _0x25b666=_0x5a5fa4[_0x2f94e0(0x1e7)](_0x5bce7b=>_0x5bce7b[_0x2f94e0(0x1a0)]+'\x20['+(_0x5bce7b[_0x2f94e0(0x1a1)]??'UNKNOWN')+_0x2f94e0(0x1e3)+_0x5bce7b[_0x2f94e0(0x1d5)]+')'),_0x419448=await promptSelect('Select\x20dataset:',_0x25b666),_0xa6b474=_0x5a5fa4[_0x419448];if(!_0xa6b474)throw CliErrors[_0x2f94e0(0x1c9)](_0x2f94e0(0x1b9));_0x435be3=_0xa6b474[_0x2f94e0(0x1d5)],_0x3204f7=undefined;}}}}const _0x356809=await listDatasets(_0x447a5a[_0x2f94e0(0x1bf)]),_0xe64b69=_0x356809[_0x2f94e0(0x197)](_0x16148f=>_0x16148f[_0x2f94e0(0x1d5)]===_0x435be3);if(!_0xe64b69)throw CliErrors[_0x2f94e0(0x1c9)]('Dataset\x20not\x20found\x20for\x20code\x20\x22'+_0x435be3+_0x2f94e0(0x1aa)+(_0x3204f7?_0x2f94e0(0x1ca)+CLI_BIN_NAME+_0x2f94e0(0x1b7):''));_0x33083f=_0xe64b69['id'];const _0x426baa=_0x3204f7??_0x435be3,_0x51dc02=await listBffDatasetOperations(_0x447a5a['appCode'],_0x33083f),_0x4b2061=_0x51dc02?Object['keys'](_0x51dc02):[];if(_0x4b2061['length']===0x0)throw CliErrors[_0x2f94e0(0x1c9)](_0x2f94e0(0x1c8)+_0x426baa+'.');let _0x31f85d;const _0x5e08b2=_0x447a5a[_0x2f94e0(0x1ba)](_0x2f94e0(0x1e6));if(_0x5e08b2){if(!_0x4b2061[_0x2f94e0(0x1ab)](_0x5e08b2))throw CliErrors['validation'](_0x2f94e0(0x198)+_0x5e08b2+_0x2f94e0(0x1b5)+_0x426baa+'.\x20'+(_0x2f94e0(0x1d4)+_0x4b2061[_0x2f94e0(0x1bc)](',\x20')));_0x31f85d=_0x5e08b2;}else{if(_0x447a5a[_0x2f94e0(0x1ad)])throw CliErrors[_0x2f94e0(0x1c9)](_0x2f94e0(0x1d6));const _0x4ba27e=await promptSelect('Select\x20operation\x20type:',_0x4b2061);_0x31f85d=_0x4b2061[_0x4ba27e]??_0x4b2061[0x0];}let _0x5e542c=normalizeHookFunctionNode(_0x447a5a['str']('function-node'));if(!_0x5e542c){if(_0x447a5a[_0x2f94e0(0x1ba)](_0x2f94e0(0x1cd)))throw CliErrors[_0x2f94e0(0x1c9)](_0x2f94e0(0x1a5));if(_0x447a5a[_0x2f94e0(0x1ad)])throw CliErrors['validation']('--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');const _0x401d49=await promptSelect('Select\x20trigger\x20node:',[_0x2f94e0(0x1c4),'after']);_0x5e542c=[_0x2f94e0(0x1c4),_0x2f94e0(0x1c0)][_0x401d49]??_0x2f94e0(0x1c4);}return{'alias':_0x3204f7,'datasetCode':_0x435be3,'datasetId':_0x33083f,'operationType':_0x31f85d,'functionNode':_0x5e542c};}async function promptSelect(_0x1670db,_0x11674d){const _0x49d9a5=a31_0x19dd75;if(_0x11674d[_0x49d9a5(0x1db)]===0x1)return 0x0;for(const [_0x1ff46c,_0x51d9cb]of _0x11674d['entries']()){process[_0x49d9a5(0x1cb)][_0x49d9a5(0x1ef)]('\x20\x20'+(_0x1ff46c+0x1)+'.\x20'+_0x51d9cb+'\x0a');}const _0x515071=createInterface({'input':process[_0x49d9a5(0x1d9)],'output':process[_0x49d9a5(0x1cb)]});while(!![]){const _0x3c168d=await new Promise(_0x50126=>{const _0x2d93b4=_0x49d9a5;_0x515071[_0x2d93b4(0x1a8)](_0x1670db+'\x20',_0x50126);}),_0x119726=Number[_0x49d9a5(0x1b1)](_0x3c168d['trim'](),0xa);if(Number['isInteger'](_0x119726)&&_0x119726>=0x1&&_0x119726<=_0x11674d[_0x49d9a5(0x1db)])return _0x515071[_0x49d9a5(0x1da)](),_0x119726-0x1;process[_0x49d9a5(0x1cb)][_0x49d9a5(0x1ef)](_0x49d9a5(0x1e1)+_0x11674d[_0x49d9a5(0x1db)]+'.\x0a');}}function buildFilePath(_0x2b8249,_0x25afa6,_0x4eb0c8,_0x2aaeb9){const _0x20d1f2=a31_0x19dd75;if(_0x25afa6===_0x20d1f2(0x1e2)){if(!_0x2aaeb9)throw CliErrors[_0x20d1f2(0x1c9)](_0x20d1f2(0x1ec));const _0x338f33=_0x2aaeb9[_0x20d1f2(0x1a6)]??_0x2aaeb9[_0x20d1f2(0x196)];return join(_0x2b8249['scriptsRootDir'],_0x20d1f2(0x1e2),_0x338f33,_0x2aaeb9[_0x20d1f2(0x1eb)],_0x2aaeb9['functionNode'],_0x4eb0c8+_0x20d1f2(0x1a3));}return join(_0x2b8249['scriptsRootDir'],_0x25afa6,_0x4eb0c8+_0x20d1f2(0x1a3));}export function generateTemplate(_0x289a61,_0x35c121,_0x234673,_0x442bb8,_0xa79dfb){const _0x36c459=a31_0x19dd75,_0xe45cc2=_0x442bb8?.[_0x36c459(0x1df)]()||_0x36c459(0x1a4);if(_0x289a61===_0x36c459(0x1c7))return _0x36c459(0x1d0)+_0xe45cc2+_0x36c459(0x199)+_0x35c121+_0x36c459(0x19c)+_0x35c121+_0x36c459(0x1a9)+_0x35c121+_0x36c459(0x1d2);if(_0x289a61===_0x36c459(0x1b3))return'/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20'+_0xe45cc2+_0x36c459(0x1e9)+_0x234673+'/'+_0x35c121+_0x36c459(0x1af)+_0x35c121+_0x36c459(0x1d2);if(!_0xa79dfb)throw CliErrors[_0x36c459(0x1c9)](_0x36c459(0x1dc));return _0x36c459(0x1dd)+_0xe45cc2+_0x36c459(0x1cf)+_0x234673+'/'+_0xa79dfb[_0x36c459(0x196)]+'/'+_0xa79dfb[_0x36c459(0x1eb)]+_0x36c459(0x1d1)+_0xa79dfb[_0x36c459(0x19d)]+_0x36c459(0x1ac)+_0x35c121+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a32_0x570ed3=a32_0x4407;(function(_0x420f9b,_0x449f98){const _0x2d5db0=a32_0x4407,_0x1062ab=_0x420f9b();while(!![]){try{const _0x13b042=-parseInt(_0x2d5db0(0x124))/0x1+-parseInt(_0x2d5db0(0x114))/0x2*(-parseInt(_0x2d5db0(0x113))/0x3)+parseInt(_0x2d5db0(0x11e))/0x4+parseInt(_0x2d5db0(0xfa))/0x5+-parseInt(_0x2d5db0(0xf8))/0x6+-parseInt(_0x2d5db0(0xfd))/0x7*(parseInt(_0x2d5db0(0x11a))/0x8)+-parseInt(_0x2d5db0(0x120))/0x9*(-parseInt(_0x2d5db0(0x118))/0xa);if(_0x13b042===_0x449f98)break;else _0x1062ab['push'](_0x1062ab['shift']());}catch(_0x1ca374){_0x1062ab['push'](_0x1062ab['shift']());}}}(a32_0x5eb4,0xd062b));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';function a32_0x5eb4(){const _0x2cad34=['appCode','25392ZXakte','Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','Multiple\x20functions\x20match\x20\x22','bff','2743756UMKztR','length','19897371qxHdFP','trashedTo','scriptsRootDir','high-risk-write','902260gIyyDC','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','validation','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','join','keys','10183356gZwrCx','BFF\x20lock\x20file\x20not\x20found.','4448245brCcpg','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','remoteId','1386XfRwyE','projectRoot','map','Deleted\x20','delete','POST','lockFilePath','\x20(local\x20file\x20moved\x20to\x20trash)','startsWith','string','target','replace','stringify','find','Function\x20not\x20found:\x20','functions','scriptsRoot','str','apps','parse','BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','trashDir','3JTXpEZ','590156sPXiLF','\x20\x20-\x20','split','includes','10vULBXq'];a32_0x5eb4=function(){return _0x2cad34;};return a32_0x5eb4();}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_0x570ed3(0x11d),'command':a32_0x570ed3(0x101),'description':a32_0x570ed3(0x11b),'risk':a32_0x570ed3(0x123),'flags':[{'name':'target','type':a32_0x570ed3(0x106),'required':!![],'description':a32_0x570ed3(0xfb)}],async 'validate'(_0x520b51){const _0x2d7fab=a32_0x570ed3,_0xc2b9b4=loadBffProjectConfig(_0x520b51['appCode']),_0x573c0d=await readBffLockFile(_0xc2b9b4['lockFilePath']);if(!_0x573c0d)throw CliErrors['validation'](_0x2d7fab(0x111));},async 'dryRun'(_0x50b8ed){const _0x13a2bf=a32_0x570ed3,_0x516562=loadBffProjectConfig(_0x50b8ed[_0x13a2bf(0x119)]),_0x9c0b5d=await readBffLockFile(_0x516562[_0x13a2bf(0x103)]);if(!_0x9c0b5d)throw CliErrors[_0x13a2bf(0x126)](_0x13a2bf(0xf9));const {appLock:_0x2ee616}=ensureLockScope(_0x9c0b5d,_0x50b8ed['appCode'],_0x516562[_0x13a2bf(0x10d)],_0x13a2bf(0x101)),_0x278289=_0x50b8ed[_0x13a2bf(0x10e)](_0x13a2bf(0x107)),_0x6f0ce1=Object[_0x13a2bf(0xf7)](_0x2ee616[_0x13a2bf(0x10c)]),_0x1e5858=resolveDeleteTarget(_0x278289,_0x6f0ce1),_0x2b281a=_0x2ee616[_0x13a2bf(0x10c)][_0x1e5858];if(!_0x2b281a)throw CliErrors[_0x13a2bf(0x126)]('No\x20lock\x20entry\x20found\x20for\x20\x22'+_0x1e5858+'\x22.');const _0x18db67=resolveLocalFilePathFromLockKey(_0x516562,_0x1e5858),_0x1f4ae6=relative(_0x516562['projectRoot'],_0x18db67),_0x1da341=join(_0x516562[_0x13a2bf(0x112)],'<timestamp>',_0x1f4ae6);return{'method':_0x13a2bf(0x102),'url':'/api/management/library/scripts/delete','body':{'appCode':_0x50b8ed[_0x13a2bf(0x119)],'target':_0x1e5858,'remoteId':_0x2b281a[_0x13a2bf(0xfc)],'localFilePath':_0x18db67,'trashedPath':_0x1da341},'description':'Would\x20delete\x20'+_0x1e5858+_0x13a2bf(0x127)};},async 'execute'(_0x235862){const _0x52d1bb=a32_0x570ed3,_0x5dc530=loadBffProjectConfig(_0x235862['appCode']),_0x47ce68=await readBffLockFile(_0x5dc530[_0x52d1bb(0x103)]);if(!_0x47ce68)throw CliErrors[_0x52d1bb(0x126)](_0x52d1bb(0xf9));const {lockData:_0x1d46c8,appLock:_0x4081b1}=ensureLockScope(_0x47ce68,_0x235862[_0x52d1bb(0x119)],_0x5dc530['scriptsRoot'],_0x52d1bb(0x101)),_0x2936da=JSON[_0x52d1bb(0x110)](JSON[_0x52d1bb(0x109)](_0x1d46c8)),_0x1c791f=_0x2936da[_0x52d1bb(0x10f)][_0x235862[_0x52d1bb(0x119)]];if(!_0x1c791f)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x235862['appCode']+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x36da0e=_0x235862[_0x52d1bb(0x10e)](_0x52d1bb(0x107)),_0x5b73c2=Object['keys'](_0x1c791f[_0x52d1bb(0x10c)]),_0x18101b=resolveDeleteTarget(_0x36da0e,_0x5b73c2),_0x5dbee4=_0x1c791f[_0x52d1bb(0x10c)][_0x18101b];if(!_0x5dbee4)throw CliErrors[_0x52d1bb(0x126)]('No\x20lock\x20entry\x20found\x20for\x20\x22'+_0x18101b+'\x22.');await deleteBffScript(_0x5dbee4['remoteId']),delete _0x1c791f[_0x52d1bb(0x10c)][_0x18101b],_0x1c791f['lastSync']=new Date()['toISOString'](),await writeBffLockFile(_0x5dc530[_0x52d1bb(0x103)],_0x2936da);const _0x3833ed=resolveLocalFilePathFromLockKey(_0x5dc530,_0x18101b);let _0x2d626a;await fileExists(_0x3833ed)&&(_0x2d626a=await moveToTrash(_0x5dc530[_0x52d1bb(0xfe)],_0x5dc530[_0x52d1bb(0x112)],_0x3833ed),await cleanupEmptyDirectories(dirname(_0x3833ed),_0x5dc530[_0x52d1bb(0x122)]));await waitForDeleteSettlement(_0x5dc530[_0x52d1bb(0x103)],_0x235862[_0x52d1bb(0x119)],_0x18101b,_0x3833ed),await sleep(0x96);const _0x7cdf78={'deleted':_0x18101b,'remoteId':_0x5dbee4[_0x52d1bb(0xfc)]};if(_0x2d626a)_0x7cdf78[_0x52d1bb(0x121)]=_0x2d626a;return{'ok':!![],'data':_0x7cdf78,'message':_0x52d1bb(0x100)+_0x18101b+(_0x2d626a?_0x52d1bb(0x104):'')};}};function resolveDeleteTarget(_0x3b56a0,_0x464657){const _0x48f06c=a32_0x570ed3;if(_0x3b56a0[_0x48f06c(0x117)]('/')){const _0x5bb551=_0x464657[_0x48f06c(0x10a)](_0x33988b=>_0x33988b===_0x3b56a0);if(!_0x5bb551)throw CliErrors[_0x48f06c(0x126)](_0x48f06c(0x10b)+_0x3b56a0);return _0x5bb551;}const _0x45f591=_0x464657['filter'](_0x109346=>_0x109346[_0x48f06c(0x116)]('/')['at'](-0x1)===_0x3b56a0);if(_0x45f591[_0x48f06c(0x11f)]===0x0)throw CliErrors[_0x48f06c(0x126)]('Function\x20not\x20found:\x20'+_0x3b56a0);if(_0x45f591['length']>0x1)throw CliErrors[_0x48f06c(0x126)](_0x48f06c(0x11c)+_0x3b56a0+_0x48f06c(0x125)+_0x45f591[_0x48f06c(0xff)](_0x9703c0=>_0x48f06c(0x115)+_0x9703c0)[_0x48f06c(0x128)]('\x0a'));return _0x45f591[0x0];}async function moveToTrash(_0x47b0b0,_0x573575,_0x3e1e52){const _0x12d464=a32_0x570ed3,_0x37c966=new Date()['toISOString']()[_0x12d464(0x108)](/[:.]/g,'-'),_0x287627=relative(_0x47b0b0,_0x3e1e52),_0x4ce46b=join(_0x573575,_0x37c966,_0x287627);return await mkdir(dirname(_0x4ce46b),{'recursive':!![]}),await rename(_0x3e1e52,_0x4ce46b),_0x4ce46b;}async function cleanupEmptyDirectories(_0x278e90,_0x5daac6){const _0x67d924=a32_0x570ed3;let _0x3e996e=resolve(_0x278e90);const _0x5c37dc=resolve(_0x5daac6);while(_0x3e996e[_0x67d924(0x105)](''+_0x5c37dc+sep)||_0x3e996e===_0x5c37dc){if(_0x3e996e===_0x5c37dc)return;try{const _0x348408=await readdir(_0x3e996e);if(_0x348408[_0x67d924(0x11f)]>0x0)return;await rmdir(_0x3e996e);}catch{return;}_0x3e996e=dirname(_0x3e996e);}}function a32_0x4407(_0x23a686,_0x53ccc4){_0x23a686=_0x23a686-0xf7;const _0x5eb43e=a32_0x5eb4();let _0x4407bc=_0x5eb43e[_0x23a686];return _0x4407bc;}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0x306d2a,_0xd58df9,_0x15e9aa,_0x1014d8){const _0x565ecc=a32_0x570ed3;for(let _0x291cbf=0x0;_0x291cbf<DELETE_SETTLE_RETRY_COUNT;_0x291cbf+=0x1){const _0x4b3634=await readBffLockFile(_0x306d2a),_0xbc9e43=!!_0x4b3634?.['apps']?.[_0xd58df9]?.[_0x565ecc(0x10c)]?.[_0x15e9aa],_0x15c23b=await fileExists(_0x1014d8);if(!_0xbc9e43&&!_0x15c23b)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error('Local\x20delete\x20not\x20settled\x20for\x20'+_0x15e9aa+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a33_0x197f(_0x1c6305,_0x5b1008){_0x1c6305=_0x1c6305-0x116;const _0x29849a=a33_0x2984();let _0x197f13=_0x29849a[_0x1c6305];return _0x197f13;}const a33_0x54a467=a33_0x197f;(function(_0x375220,_0x1290d3){const _0x1a2dc7=a33_0x197f,_0x3ea135=_0x375220();while(!![]){try{const _0x35c397=parseInt(_0x1a2dc7(0x125))/0x1+parseInt(_0x1a2dc7(0x119))/0x2*(-parseInt(_0x1a2dc7(0x124))/0x3)+-parseInt(_0x1a2dc7(0x116))/0x4+parseInt(_0x1a2dc7(0x128))/0x5*(parseInt(_0x1a2dc7(0x117))/0x6)+-parseInt(_0x1a2dc7(0x121))/0x7*(-parseInt(_0x1a2dc7(0x129))/0x8)+parseInt(_0x1a2dc7(0x11a))/0x9*(-parseInt(_0x1a2dc7(0x123))/0xa)+parseInt(_0x1a2dc7(0x120))/0xb;if(_0x35c397===_0x1290d3)break;else _0x3ea135['push'](_0x3ea135['shift']());}catch(_0x252638){_0x3ea135['push'](_0x3ea135['shift']());}}}(a33_0x2984,0xb50f0));import{getBffScriptInfo}from'../../core/api-client.js';function a33_0x2984(){const _0x2574ff=['6797qPBYoI','createdTime','20xVTcRO','129LUMTSA','1040182ApXNQm','scriptContent','scriptType','20gOrSJT','1704NtqCen','(none)','num','description','verbose','4820128mpUZEa','143118nsafxe','appCode','30014ThnqPh','6221520PEZAnq','read','Script\x20ID','boolean','Get\x20BFF\x20script\x20details\x20by\x20ID','Return\x20full\x20raw\x20script\x20object','28953012NsVkNS'];a33_0x2984=function(){return _0x2574ff;};return a33_0x2984();}export const bffDetail={'service':'bff','command':'detail','description':a33_0x54a467(0x11e),'risk':a33_0x54a467(0x11b),'flags':[{'name':'id','type':'number','required':!![],'description':a33_0x54a467(0x11c)},{'name':a33_0x54a467(0x12d),'type':a33_0x54a467(0x11d),'description':a33_0x54a467(0x11f)}],async 'execute'(_0xf91c6b){const _0x1bab42=a33_0x54a467,_0x1ad261=await getBffScriptInfo(_0xf91c6b[_0x1bab42(0x12b)]('id')),_0x20a2cd=_0xf91c6b['bool'](_0x1bab42(0x12d));if(_0x20a2cd)return{'ok':!![],'data':_0x1ad261};return{'ok':!![],'data':{'id':_0x1ad261['id'],'appCode':_0x1ad261[_0x1bab42(0x118)],'scriptType':_0x1ad261[_0x1bab42(0x127)],'description':_0x1ad261[_0x1bab42(0x12c)]||_0x1bab42(0x12a),'createdTime':_0x1ad261[_0x1bab42(0x122)]??'','updatedTime':_0x1ad261['updatedTime']??'','scriptContent':_0x1ad261[_0x1bab42(0x126)]??''}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x51072d,_0x19cddb){const _0xbd3173=a34_0x2e95,_0x1c1709=_0x51072d();while(!![]){try{const _0x509754=parseInt(_0xbd3173(0x1f5))/0x1+parseInt(_0xbd3173(0x1f3))/0x2*(parseInt(_0xbd3173(0x1f9))/0x3)+-parseInt(_0xbd3173(0x1fa))/0x4+-parseInt(_0xbd3173(0x1f8))/0x5+parseInt(_0xbd3173(0x1fb))/0x6*(parseInt(_0xbd3173(0x1f7))/0x7)+-parseInt(_0xbd3173(0x1f6))/0x8+parseInt(_0xbd3173(0x1f4))/0x9;if(_0x509754===_0x19cddb)break;else _0x1c1709['push'](_0x1c1709['shift']());}catch(_0x4ea97f){_0x1c1709['push'](_0x1c1709['shift']());}}}(a34_0x2093,0x58425));import{bffList}from'../../commands/bff/list.js';import{bffDetail}from'../../commands/bff/detail.js';import{bffStatus}from'../../commands/bff/status.js';function a34_0x2e95(_0x39c4a2,_0x17ba82){_0x39c4a2=_0x39c4a2-0x1f3;const _0x209327=a34_0x2093();let _0x2e9549=_0x209327[_0x39c4a2];return _0x2e9549;}import{bffCreate}from'../../commands/bff/create.js';import{bffPush}from'../../commands/bff/push.js';import{bffPull}from'../../commands/bff/pull.js';function a34_0x2093(){const _0x32906e=['154cVephT','7768701oLCvXb','62182KmrChZ','5025888Dskvjz','100807fJxfnM','1984350LCpoSH','18129UPIBcm','2378032PLTUKG','246iNqWJX'];a34_0x2093=function(){return _0x32906e;};return a34_0x2093();}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
|
-
function
|
|
1
|
+
const a35_0x438246=a35_0x265a;function a35_0x1e03(){const _0x372e15=['appCode','functionName','boolean','(unnamed)','Script\x20type\x20filter','3751125qsYgdd','map','17130KJpBXJ','str','Filter\x20by\x20script\x20name','195vDOYrS','bff','List\x20BFF\x20scripts','Return\x20full\x20script\x20objects','name','141594ORhvxk','type','bool','list','string','description','3620324FSAKoH','14165037TMlrcH','ENDPOINT','5601832fGHxut','verbose','length','scriptType','read','172569tLdEdh','No\x20BFF\x20scripts\x20found.','99rymyhi'];a35_0x1e03=function(){return _0x372e15;};return a35_0x1e03();}(function(_0x4a4969,_0x564448){const _0x2da89c=a35_0x265a,_0x195c67=_0x4a4969();while(!![]){try{const _0xfc9ea9=-parseInt(_0x2da89c(0xd4))/0x1+-parseInt(_0x2da89c(0xbe))/0x2*(-parseInt(_0x2da89c(0xd6))/0x3)+-parseInt(_0x2da89c(0xcc))/0x4+parseInt(_0x2da89c(0xc1))/0x5*(parseInt(_0x2da89c(0xc6))/0x6)+-parseInt(_0x2da89c(0xbc))/0x7+-parseInt(_0x2da89c(0xcf))/0x8+parseInt(_0x2da89c(0xcd))/0x9;if(_0xfc9ea9===_0x564448)break;else _0x195c67['push'](_0x195c67['shift']());}catch(_0x5adb8e){_0x195c67['push'](_0x195c67['shift']());}}}(a35_0x1e03,0x71129));function a35_0x265a(_0x366586,_0x542a92){_0x366586=_0x366586-0xb8;const _0x1e0309=a35_0x1e03();let _0x265a6d=_0x1e0309[_0x366586];return _0x265a6d;}import{listBffScripts}from'../../core/api-client.js';export const bffList={'service':a35_0x438246(0xc2),'command':a35_0x438246(0xc9),'description':a35_0x438246(0xc3),'risk':a35_0x438246(0xd3),'flags':[{'name':a35_0x438246(0xc7),'type':a35_0x438246(0xca),'description':a35_0x438246(0xbb),'default':a35_0x438246(0xce),'enum':[a35_0x438246(0xce),'COMMON']},{'name':a35_0x438246(0xc5),'type':'string','description':a35_0x438246(0xc0)},{'name':a35_0x438246(0xd0),'type':a35_0x438246(0xb9),'description':a35_0x438246(0xc4)}],async 'execute'(_0x15c624){const _0x31b605=a35_0x438246,_0x29cf59=await listBffScripts(_0x15c624[_0x31b605(0xd7)],_0x15c624[_0x31b605(0xbf)](_0x31b605(0xc7)),{'scriptName':_0x15c624['str'](_0x31b605(0xc5))||undefined}),_0x22d21c=_0x15c624[_0x31b605(0xc8)](_0x31b605(0xd0));return{'ok':!![],'data':_0x22d21c?_0x29cf59:_0x29cf59[_0x31b605(0xbd)](_0x5bc727=>({'id':_0x5bc727['id'],'functionName':_0x5bc727[_0x31b605(0xb8)]??'','description':_0x5bc727[_0x31b605(0xcb)]||_0x31b605(0xba),'scriptType':_0x5bc727[_0x31b605(0xd2)]})),'message':_0x29cf59[_0x31b605(0xd1)]===0x0?_0x31b605(0xd5):undefined};}};
|