@lovrabet/rabetbase-cli 2.3.10 → 2.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -0
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/commands/app/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a20_0x1a0f7b=a20_0x3157;(function(_0x6dffac,_0x32e342){const _0x2d699d=a20_0x3157,_0x1f51dd=_0x6dffac();while(!![]){try{const _0x478c00=parseInt(_0x2d699d(0x144))/0x1+-parseInt(_0x2d699d(0x122))/0x2+parseInt(_0x2d699d(0x120))/0x3+-parseInt(_0x2d699d(0x129))/0x4*(-parseInt(_0x2d699d(0x142))/0x5)+parseInt(_0x2d699d(0x12d))/0x6*(-parseInt(_0x2d699d(0x134))/0x7)+parseInt(_0x2d699d(0x141))/0x8*(-parseInt(_0x2d699d(0x146))/0x9)+parseInt(_0x2d699d(0x140))/0xa*(parseInt(_0x2d699d(0x11d))/0xb);if(_0x478c00===_0x32e342)break;else _0x1f51dd['push'](_0x1f51dd['shift']());}catch(_0x2e7e62){_0x1f51dd['push'](_0x1f51dd['shift']());}}}(a20_0x1a57,0x4098e));import{readRawConfigWithLayers}from'../../context.js';function a20_0x1a57(){const _0x3a6aee=['Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','295099BALyzR','projectPath','15948pNhCmJ','list','No\x20apps\x20configured','1529sXlcfa','List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','appcode','286230WQAvqm','isCurrent','900598TjYerq','app','validation','length','remote','mergedCli','.\x20Use\x20`','4NmLHqa','defaultApp','\x20in\x20','object','28470vkLyCE','merged','optional','bool','boolean','globalConfig','project','469AeKcWw','find','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','inherit','entries','apps','projectConfig','global','List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','map','\x20config','42840AEIYlM','216AVPJZG','473315OYwFcA'];a20_0x1a57=function(){return _0x3a6aee;};return a20_0x1a57();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';import{buildAppProfileListFields}from'../../config/schema.js';import{appDefinedIn,enrichAppListItemsWithMergedSelection,resolveDefaultAppSource}from'../../commands/app/shared.js';import{listRemoteAppDirectory}from'../../commands/app/remote-directory.js';function buildItemsFromLayer(_0x53c1e0,_0x2e7eef){const _0x348974=a20_0x3157,_0x56181e=[],_0x3bde5a=_0x53c1e0[_0x348974(0x139)]&&typeof _0x53c1e0[_0x348974(0x139)]==='object'?_0x53c1e0[_0x348974(0x139)]:{},_0x24c433=_0x53c1e0[_0x348974(0x12a)]||undefined;for(const [_0xfec80a,_0x9164e]of Object[_0x348974(0x138)](_0x3bde5a)){if(!_0x9164e||typeof _0x9164e!==_0x348974(0x12c)||!_0x9164e[_0x348974(0x11f)])continue;_0x56181e['push']({'name':_0xfec80a,'appcode':_0x9164e[_0x348974(0x11f)],'named':!![],'definedIn':_0x2e7eef,'isDefault':_0xfec80a===_0x24c433,...buildAppProfileListFields(_0x9164e)});}return _0x56181e;}function buildMergedItems(_0x145b30,_0x2ef51d){const _0x41cc9b=a20_0x3157,{apps:apps={},defaultApp:_0x2ff4d0}=_0x145b30,_0x1c2d1d=_0x2ef51d[_0x41cc9b(0x132)]['apps']&&typeof _0x2ef51d[_0x41cc9b(0x132)][_0x41cc9b(0x139)]==='object'?_0x2ef51d['globalConfig'][_0x41cc9b(0x139)]:{},_0x5ee0e3=_0x2ef51d['projectConfig'][_0x41cc9b(0x139)]&&typeof _0x2ef51d[_0x41cc9b(0x13a)]['apps']===_0x41cc9b(0x12c)?_0x2ef51d[_0x41cc9b(0x13a)][_0x41cc9b(0x139)]:{},_0x5afad0=_0x2ef51d[_0x41cc9b(0x13a)][_0x41cc9b(0x137)]===![],_0x5327d2=Object['entries'](apps),_0x79a178=_0x5327d2[_0x41cc9b(0x13e)](([_0x527ee1,_0x355a45])=>({'name':_0x527ee1,'appcode':_0x355a45['appcode'],'named':!![],'definedIn':appDefinedIn(_0x527ee1,_0x1c2d1d,_0x5ee0e3,_0x5afad0),'isDefault':_0x527ee1===_0x2ff4d0,...buildAppProfileListFields(_0x355a45)}));return _0x79a178;}function a20_0x3157(_0x8034ab,_0x4b3059){_0x8034ab=_0x8034ab-0x11c;const _0x1a5742=a20_0x1a57();let _0x3157a6=_0x1a5742[_0x8034ab];return _0x3157a6;}function validateAppListFlags(_0x2618b1){const _0x1619d4=a20_0x3157;if(!_0x2618b1[_0x1619d4(0x130)](_0x1619d4(0x126)))return;if(!_0x2618b1['bool'](_0x1619d4(0x13b))&&!_0x2618b1[_0x1619d4(0x130)](_0x1619d4(0x133)))return;throw CliErrors[_0x1619d4(0x124)](_0x1619d4(0x13d),'Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.');}async function execute(_0x54cee2){const _0x5024c7=a20_0x3157;validateAppListFlags(_0x54cee2);if(_0x54cee2[_0x5024c7(0x130)]('remote'))return{'ok':!![],'data':await listRemoteAppDirectory(_0x54cee2)};const _0x1946c8=_0x54cee2['bool'](_0x5024c7(0x13b)),_0x54c5a3=_0x54cee2['bool'](_0x5024c7(0x133)),_0x13e20e=_0x1946c8?_0x5024c7(0x13b):_0x54c5a3?_0x5024c7(0x133):_0x5024c7(0x12e),{config:_0x599f8c,layers:_0x1df1ee}=readRawConfigWithLayers(),_0x2a8efb=resolveDefaultAppSource(_0x1df1ee),{defaultApp:_0x1a8b1c}=_0x599f8c;let _0x10b35d,_0x12cc95;switch(_0x13e20e){case'global':_0x10b35d=buildItemsFromLayer(_0x1df1ee[_0x5024c7(0x132)],_0x5024c7(0x13b)),_0x12cc95=_0x1df1ee['globalPath'];break;case _0x5024c7(0x133):_0x10b35d=buildItemsFromLayer(_0x1df1ee[_0x5024c7(0x13a)],_0x5024c7(0x133)),_0x12cc95=_0x1df1ee[_0x5024c7(0x145)];break;default:_0x10b35d=buildMergedItems(_0x599f8c,_0x1df1ee);break;}enrichAppListItemsWithMergedSelection(_0x10b35d,_0x54cee2[_0x5024c7(0x127)]);if(_0x10b35d[_0x5024c7(0x125)]===0x0){const _0x43a1b3=_0x13e20e===_0x5024c7(0x12e)?'':_0x5024c7(0x12b)+_0x13e20e+_0x5024c7(0x13f);return{'ok':!![],'data':[],'message':_0x5024c7(0x11c)+_0x43a1b3+_0x5024c7(0x128)+CLI_BIN_NAME+'\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.'};}const _0x260ff1=_0x10b35d[_0x5024c7(0x135)](_0x382178=>_0x382178[_0x5024c7(0x121)]===!![]),_0x285ca9=_0x1a8b1c??_0x260ff1?.[_0x5024c7(0x11f)]??null,_0x4c554a=_0x13e20e===_0x5024c7(0x12e)?{'globalPath':_0x1df1ee['globalPath']??null,'projectPath':_0x1df1ee[_0x5024c7(0x145)]??null,'defaultApp':_0x285ca9,'defaultAppSource':_0x1a8b1c!=null?_0x2a8efb:null}:{'scope':_0x13e20e,'configPath':_0x12cc95??null};return{'ok':!![],'data':{'items':_0x10b35d,'meta':_0x4c554a}};}export const appListDefinition={'service':a20_0x1a0f7b(0x123),'command':a20_0x1a0f7b(0x147),'description':a20_0x1a0f7b(0x13c),'risk':'read','auth':a20_0x1a0f7b(0x12f),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a20_0x1a0f7b(0x126),'type':a20_0x1a0f7b(0x131),'description':a20_0x1a0f7b(0x11e),'default':![]},{'name':a20_0x1a0f7b(0x13b),'type':a20_0x1a0f7b(0x131),'description':a20_0x1a0f7b(0x143),'default':![]},{'name':'project','type':a20_0x1a0f7b(0x131),'description':a20_0x1a0f7b(0x136),'default':![]}],async 'validate'(_0x1394a3){validateAppListFlags(_0x1394a3);},'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x222364,_0x3cac57){const _0x4dabc2=a21_0xdaec,_0x31122c=_0x222364();while(!![]){try{const _0x525a60=-parseInt(_0x4dabc2(0x1af))/0x1*(-parseInt(_0x4dabc2(0x1b7))/0x2)+parseInt(_0x4dabc2(0x1aa))/0x3*(-parseInt(_0x4dabc2(0x1ac))/0x4)+parseInt(_0x4dabc2(0x1b9))/0x5*(parseInt(_0x4dabc2(0x1ab))/0x6)+-parseInt(_0x4dabc2(0x1b0))/0x7*(parseInt(_0x4dabc2(0x1b2))/0x8)+-parseInt(_0x4dabc2(0x1b5))/0x9*(-parseInt(_0x4dabc2(0x1a9))/0xa)+-parseInt(_0x4dabc2(0x1b3))/0xb*(-parseInt(_0x4dabc2(0x1ad))/0xc)+-parseInt(_0x4dabc2(0x1b6))/0xd*(parseInt(_0x4dabc2(0x1ba))/0xe);if(_0x525a60===_0x3cac57)break;else _0x31122c['push'](_0x31122c['shift']());}catch(_0x1b063c){_0x31122c['push'](_0x31122c['shift']());}}}(a21_0x556c,0xcfbfd));import{listRemoteApps}from'../../core/api-client.js';function a21_0xdaec(_0x36e005,_0x578b8b){_0x36e005=_0x36e005-0x1a9;const _0x556c7d=a21_0x556c();let _0xdaec33=_0x556c7d[_0x36e005];return _0xdaec33;}import{getCookie}from'../../auth/get-cookie.js';function a21_0x556c(){const _0x56c5f1=['map','410255CmekaJ','182XytVOG','authRequired','appDesc','90oKHhID','93XlBaie','54LLwZwR','12000aLUYcx','24iiqPEW','appName','78hkLEbC','14TZmGwC','cookie','954416KcoCla','65197LyoihT','platform','1400589MvyzXQ','1737905ZagcaQ','19732SXQpap'];a21_0x556c=function(){return _0x56c5f1;};return a21_0x556c();}import{CliErrors}from'../../errors.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';function resolveCookie(_0x3d733c){const _0x51634d=a21_0xdaec,_0x217f15=_0x3d733c[_0x51634d(0x1b1)]||getCookie();if(!_0x217f15)throw CliErrors[_0x51634d(0x1bb)]();return _0x217f15;}export async function listRemoteAppDirectory(_0x80be49){const _0x4f2aac=a21_0xdaec,_0x1691f3=await withActiveCookie(resolveCookie(_0x80be49),()=>listRemoteApps());return{'items':_0x1691f3[_0x4f2aac(0x1b8)](_0x184756=>({..._0x184756['id']!=null?{'id':_0x184756['id']}:{},'appCode':_0x184756['appCode'],'appName':_0x184756[_0x4f2aac(0x1ae)],..._0x184756[_0x4f2aac(0x1bc)]!=null?{'appDesc':_0x184756[_0x4f2aac(0x1bc)]}:{}})),'meta':{'source':_0x4f2aac(0x1b4)}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a22_0x5f51fc=a22_0x4c38;(function(_0x3326f1,_0xf20ad3){const _0x15e330=a22_0x4c38,_0x2d71cd=_0x3326f1();while(!![]){try{const _0x39fe76=-parseInt(_0x15e330(0x69))/0x1*(parseInt(_0x15e330(0x71))/0x2)+-parseInt(_0x15e330(0x78))/0x3*(parseInt(_0x15e330(0x6a))/0x4)+parseInt(_0x15e330(0x68))/0x5*(-parseInt(_0x15e330(0x75))/0x6)+-parseInt(_0x15e330(0x74))/0x7*(parseInt(_0x15e330(0x76))/0x8)+parseInt(_0x15e330(0x6e))/0x9+-parseInt(_0x15e330(0x79))/0xa+parseInt(_0x15e330(0x73))/0xb;if(_0x39fe76===_0xf20ad3)break;else _0x2d71cd['push'](_0x2d71cd['shift']());}catch(_0x5323f0){_0x2d71cd['push'](_0x2d71cd['shift']());}}}(a22_0x5395,0x78503));import{CLI_BIN_NAME}from'../../constant/cli.js';function a22_0x4c38(_0x3b2820,_0x3aef45){_0x3b2820=_0x3b2820-0x68;const _0x539521=a22_0x5395();let _0x4c38f5=_0x539521[_0x3b2820];return _0x4c38f5;}import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';export const appRemoveDefinition={'service':a22_0x5f51fc(0x70),'command':a22_0x5f51fc(0x6b),'description':a22_0x5f51fc(0x7a),'risk':a22_0x5f51fc(0x6f),'requiresAuth':![],'requiresAppCode':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+'\x20workspace\x20remove','since':a22_0x5f51fc(0x6c)},'args':[{'name':a22_0x5f51fc(0x6d),'description':a22_0x5f51fc(0x77),'required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x54b07e=>validateAppName(_0x54b07e,a22_0x5f51fc(0x72)),'execute':_0x480020=>runAppRemove(_0x480020,a22_0x5f51fc(0x72))};function a22_0x5395(){const _0xf6df4a=['783045WCMiDv','4asMrLK','remove','2026-07','name','3217437HvHOHG','high-risk-write','app','2UzIvmW','app\x20remove','24801909MdpMkb','1848xrZedK','21810BEyJhr','8016IIbRFD','App\x20profile\x20name\x20to\x20remove','1170789gTqUjV','5434430MgZdCh','Deprecated:\x20use\x20workspace\x20remove\x20to\x20remove\x20an\x20app\x20profile','190JcalvO'];a22_0x5395=function(){return _0xf6df4a;};return a22_0x5395();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x244c6e,_0x1efc0b){const _0x203fcc=a23_0x2859,_0x20105b=_0x244c6e();while(!![]){try{const _0x381877=-parseInt(_0x203fcc(0x1bb))/0x1+parseInt(_0x203fcc(0x1bf))/0x2+-parseInt(_0x203fcc(0x1c5))/0x3+-parseInt(_0x203fcc(0x1b8))/0x4*(-parseInt(_0x203fcc(0x1b0))/0x5)+parseInt(_0x203fcc(0x1c6))/0x6+-parseInt(_0x203fcc(0x1b1))/0x7+parseInt(_0x203fcc(0x1b6))/0x8;if(_0x381877===_0x1efc0b)break;else _0x20105b['push'](_0x20105b['shift']());}catch(_0x487a5d){_0x20105b['push'](_0x20105b['shift']());}}}(a23_0x4061,0xa936b));function a23_0x2859(_0xf99aaa,_0x3ddbe4){_0xf99aaa=_0xf99aaa-0x1ad;const _0x4061ac=a23_0x4061();let _0x28595a=_0x4061ac[_0xf99aaa];return _0x28595a;}import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';export function enrichAppListItemsWithMergedSelection(_0x4ad51d,_0x1f7db7){const _0x4c2118=a23_0x2859;if(!_0x1f7db7)return;const _0x224bf3=_0x1f7db7[_0x4c2118(0x1ae)]&&typeof _0x1f7db7[_0x4c2118(0x1ae)]==='object'?_0x1f7db7[_0x4c2118(0x1ae)]:{},_0x5c0461=Object['keys'](_0x224bf3)[_0x4c2118(0x1c3)]>0x0;for(const _0x11e12d of _0x4ad51d){_0x11e12d[_0x4c2118(0x1c1)]=![];}const _0x3cb11e=_0x1f7db7[_0x4c2118(0x1be)]!=null?String(_0x1f7db7[_0x4c2118(0x1be)])['trim']():'';if(_0x5c0461){const _0x1b9d3f=_0x1f7db7[_0x4c2118(0x1b3)]??_0x1f7db7['defaultApp'];if(_0x1b9d3f)for(const _0xc42ec7 of _0x4ad51d){_0xc42ec7[_0x4c2118(0x1c7)]===!![]&&_0xc42ec7[_0x4c2118(0x1c2)]===_0x1b9d3f&&(_0xc42ec7[_0x4c2118(0x1c1)]=!![]);}for(const _0x240fc2 of _0x4ad51d){if(_0x240fc2[_0x4c2118(0x1c7)]!==![])continue;if(_0x1f7db7[_0x4c2118(0x1b7)])continue;_0x3cb11e&&String(_0x240fc2[_0x4c2118(0x1bc)]??'')['trim']()===_0x3cb11e&&(_0x240fc2[_0x4c2118(0x1c1)]=!![]);}return;}if(!_0x3cb11e)return;for(const _0x2c4c4b of _0x4ad51d){String(_0x2c4c4b['appcode']??'')['trim']()===_0x3cb11e&&(_0x2c4c4b[_0x4c2118(0x1c1)]=!![]);}}export function resolveAppScopeForWrite(_0x121bbb,_0x2160fc,_0x131243){const _0x34cb23=a23_0x2859;if(_0x2160fc)return'global';const _0x3b44a0=_0x131243['projectConfig'][_0x34cb23(0x1ae)]&&typeof _0x131243[_0x34cb23(0x1b4)][_0x34cb23(0x1ae)]===_0x34cb23(0x1ba)?_0x131243['projectConfig'][_0x34cb23(0x1ae)]:{},_0x2fbd60=_0x131243[_0x34cb23(0x1af)][_0x34cb23(0x1ae)]&&typeof _0x131243[_0x34cb23(0x1af)]['apps']===_0x34cb23(0x1ba)?_0x131243[_0x34cb23(0x1af)][_0x34cb23(0x1ae)]:{};if(Object[_0x34cb23(0x1b9)][_0x34cb23(0x1c4)]['call'](_0x3b44a0,_0x121bbb))return _0x34cb23(0x1b2);if(Object[_0x34cb23(0x1b9)][_0x34cb23(0x1c4)][_0x34cb23(0x1c8)](_0x2fbd60,_0x121bbb))return _0x34cb23(0x1ad);return _0x34cb23(0x1b2);}function a23_0x4061(){const _0x6dd6a0=['named','call','global','apps','globalConfig','3140310Ahyhkf','4114775FLPULG','project','currentApp','projectConfig','keys','19844024JubCEt','defaultApp','4NyiqBk','prototype','object','1153492BVjwYP','appcode','inherit','appCode','656732WBMpiL','both','isCurrent','name','length','hasOwnProperty','3264120HsmNjS','513150zxGHzl'];a23_0x4061=function(){return _0x6dd6a0;};return a23_0x4061();}export function appDefinedIn(_0xdab51,_0x1161db,_0xfe4037,_0x1c7df5){const _0x12ad6d=a23_0x2859;if(_0x1c7df5)return Object['prototype'][_0x12ad6d(0x1c4)][_0x12ad6d(0x1c8)](_0xfe4037,_0xdab51)?_0x12ad6d(0x1b2):_0x12ad6d(0x1ad);const _0x530f4f=Object['prototype'][_0x12ad6d(0x1c4)]['call'](_0x1161db,_0xdab51),_0x4766cf=Object[_0x12ad6d(0x1b9)]['hasOwnProperty']['call'](_0xfe4037,_0xdab51);if(_0x530f4f&&_0x4766cf)return _0x12ad6d(0x1c0);if(_0x4766cf)return _0x12ad6d(0x1b2);return _0x12ad6d(0x1ad);}export function resolveDefaultAppSource(_0x3d2a1b){const _0x11bceb=a23_0x2859,_0x1db62b=_0x3d2a1b[_0x11bceb(0x1b4)][_0x11bceb(0x1ae)]&&typeof _0x3d2a1b['projectConfig'][_0x11bceb(0x1ae)]===_0x11bceb(0x1ba)?_0x3d2a1b[_0x11bceb(0x1b4)][_0x11bceb(0x1ae)]:{};if(_0x11bceb(0x1b7)in _0x3d2a1b[_0x11bceb(0x1b4)])return'project';if(Object[_0x11bceb(0x1b5)](_0x1db62b)[_0x11bceb(0x1c3)]>0x0)return _0x11bceb(0x1b2);if(_0x3d2a1b[_0x11bceb(0x1b4)][_0x11bceb(0x1bd)]===![])return null;if(_0x3d2a1b['globalConfig'][_0x11bceb(0x1b7)])return _0x11bceb(0x1ad);return null;}export function getConfigPath(_0x3afb71={}){const _0x3a3516=a23_0x2859,_0x36e179=_0x3afb71['global']?'global':_0x3a3516(0x1b2);return resolveWriteConfigPath(_0x36e179);}export function readConfig(_0x1eb9ec={}){return readConfigFile(getConfigPath(_0x1eb9ec));}export function writeConfig(_0x7dc0d6,_0x4b9203={}){writeConfigFile(getConfigPath(_0x4b9203),_0x7dc0d6);}export function scopeLabel(_0x45fb41){const _0x3c830f=a23_0x2859;return _0x45fb41[_0x3c830f(0x1ad)]?'\x20(global)':'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a24_0x476de9=a24_0x46e7;(function(_0xfc825c,_0x302526){const _0x227463=a24_0x46e7,_0x3b008c=_0xfc825c();while(!![]){try{const _0x534be7=parseInt(_0x227463(0x99))/0x1*(-parseInt(_0x227463(0x96))/0x2)+parseInt(_0x227463(0x92))/0x3+-parseInt(_0x227463(0x86))/0x4+parseInt(_0x227463(0x93))/0x5+parseInt(_0x227463(0x98))/0x6*(parseInt(_0x227463(0x97))/0x7)+-parseInt(_0x227463(0x87))/0x8*(-parseInt(_0x227463(0x8f))/0x9)+-parseInt(_0x227463(0x89))/0xa*(parseInt(_0x227463(0x8e))/0xb);if(_0x534be7===_0x302526)break;else _0x3b008c['push'](_0x3b008c['shift']());}catch(_0x44aa5a){_0x3b008c['push'](_0x3b008c['shift']());}}}(a24_0x73b0,0xa84d7));import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a24_0x46e7(_0x4ee1ba,_0x3069cb){_0x4ee1ba=_0x4ee1ba-0x84;const _0x73b0ef=a24_0x73b0();let _0x46e775=_0x73b0ef[_0x4ee1ba];return _0x46e775;}import{asAppConfigDryRunResult,buildMutationData,KEY_ARG,projectAppConfig,readKeyArg,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const DELETE_PATH='/smartapi/app-config/delete';function a24_0x73b0(){const _0x5450e3=['validation','number','get','14333IKLEbc','1233KFoGkd','apiError','delete','3857460cmiLzi','6545325QPsxbU',',\x20appCode=','Deleted\x20app\x20config\x20','2pGehxa','917uWbWqF','44742FJRZnc','1146291YkFrAn','Delete\x20one\x20runtime\x20app-config\x20key','app-config','379136pSQZNp','14408OlHDIu','appCode:\x20','14490IkeZji','appCode'];a24_0x73b0=function(){return _0x5450e3;};return a24_0x73b0();}export const appConfigDelete={'service':a24_0x476de9(0x85),'command':a24_0x476de9(0x91),'description':a24_0x476de9(0x84),'risk':'high-risk-write','args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x23f014){readKeyArg(_0x23f014);},async 'dryRun'(_0x1ea9ac){const _0x331c55=a24_0x476de9,_0x12c32b=readKeyArg(_0x1ea9ac),_0x1b1c27=await mustGetByKey(_0x1ea9ac['appCode'],_0x12c32b);return asAppConfigDryRunResult(buildMutationData({'operation':_0x331c55(0x91),'appCode':_0x1ea9ac['appCode'],'key':_0x12c32b,'before':projectAppConfig(_0x1b1c27),'after':null,'dryRun':!![]}),{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x2b49ae){const _0xca4138=a24_0x476de9,_0x1f6086=readKeyArg(_0x2b49ae),_0x979a64=await mustGetByKey(_0x2b49ae[_0xca4138(0x8a)],_0x1f6086);return await withAppConfigApiBoundary(_0xca4138(0x91),{'appCode':_0x2b49ae[_0xca4138(0x8a)],'key':_0x1f6086},()=>deleteAppConfig({'appCode':_0x2b49ae[_0xca4138(0x8a)],'id':requireAppConfigId(_0x979a64,_0x1f6086,_0x2b49ae['appCode'])})),{'ok':!![],'data':buildMutationData({'operation':_0xca4138(0x91),'appCode':_0x2b49ae[_0xca4138(0x8a)],'key':_0x1f6086,'before':projectAppConfig(_0x979a64),'after':null,'dryRun':![]}),'message':_0xca4138(0x95)+_0x1f6086};}};async function mustGetByKey(_0x370308,_0x29f112){const _0xe675a2=a24_0x476de9,_0x153984=await withAppConfigApiBoundary(_0xe675a2(0x8d),{'appCode':_0x370308,'key':_0x29f112},()=>getAppConfigByKey(_0x370308,_0x29f112));if(!_0x153984)throw CliErrors[_0xe675a2(0x8b)]('App\x20config\x20key\x20not\x20found:\x20'+_0x29f112,_0xe675a2(0x88)+_0x370308);return _0x153984;}function requireAppConfigId(_0x6d1b91,_0x617847,_0x10602c){const _0x200ea0=a24_0x476de9;if(typeof _0x6d1b91['id']===_0x200ea0(0x8c)&&Number['isFinite'](_0x6d1b91['id'])&&_0x6d1b91['id']>0x0)return _0x6d1b91['id'];throw CliErrors[_0x200ea0(0x90)]('App\x20config\x20server\x20id\x20missing\x20for\x20key='+_0x617847+_0x200ea0(0x94)+_0x10602c);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a25_0x290f83=a25_0x56fe;function a25_0x32d2(){const _0x2992b5=['\x20with\x20value\x20redacted','5794272uMVDvR','Loaded\x20app\x20config\x20','4ZjyLuG','393352NaCbDy','read','3646112ZAQrGW','App\x20config\x20key\x20not\x20found:\x20','Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','get','30spMVLj','200298kNuUmV','appCode','1763209QIAWhW','appCode:\x20','app-config','1623903eAaZwp','bool','validation','493861NrftsR'];a25_0x32d2=function(){return _0x2992b5;};return a25_0x32d2();}(function(_0x24e5f5,_0x3c1849){const _0x23e3b5=a25_0x56fe,_0xa21782=_0x24e5f5();while(!![]){try{const _0x8409ce=parseInt(_0x23e3b5(0x16a))/0x1+parseInt(_0x23e3b5(0x16f))/0x2+parseInt(_0x23e3b5(0x167))/0x3*(-parseInt(_0x23e3b5(0x16e))/0x4)+-parseInt(_0x23e3b5(0x161))/0x5*(-parseInt(_0x23e3b5(0x162))/0x6)+-parseInt(_0x23e3b5(0x164))/0x7+-parseInt(_0x23e3b5(0x15d))/0x8+parseInt(_0x23e3b5(0x16c))/0x9;if(_0x8409ce===_0x3c1849)break;else _0xa21782['push'](_0xa21782['shift']());}catch(_0x3922ea){_0xa21782['push'](_0xa21782['shift']());}}}(a25_0x32d2,0x45bfb));import{getAppConfigByKey}from'../../core/api-client.js';function a25_0x56fe(_0x493b24,_0x27acd5){_0x493b24=_0x493b24-0x15c;const _0x32d2eb=a25_0x32d2();let _0x56fed9=_0x32d2eb[_0x493b24];return _0x56fed9;}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';export const appConfigGet={'service':a25_0x290f83(0x166),'command':a25_0x290f83(0x160),'description':a25_0x290f83(0x15f),'risk':a25_0x290f83(0x15c),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x48e753){readKeyArg(_0x48e753);},async 'execute'(_0x136cc4){const _0x20a6c6=a25_0x290f83,_0x73e5e3=readKeyArg(_0x136cc4),_0x2270c0=await withAppConfigApiBoundary('get',{'appCode':_0x136cc4['appCode'],'key':_0x73e5e3},()=>getAppConfigByKey(_0x136cc4[_0x20a6c6(0x163)],_0x73e5e3));if(!_0x2270c0)throw CliErrors[_0x20a6c6(0x169)](_0x20a6c6(0x15e)+_0x73e5e3,_0x20a6c6(0x165)+_0x136cc4[_0x20a6c6(0x163)]);const _0x5a72d8=projectAppConfig(_0x2270c0,{'reveal':_0x136cc4[_0x20a6c6(0x168)]('reveal')});return{'ok':!![],'data':{'config':_0x5a72d8},'message':_0x136cc4[_0x20a6c6(0x168)]('reveal')?_0x20a6c6(0x16d)+_0x73e5e3+'\x20with\x20value\x20revealed':_0x20a6c6(0x16d)+_0x73e5e3+_0x20a6c6(0x16b)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x64459f,_0x4394e8){const _0x41df34=a26_0x4538,_0x4c28f1=_0x64459f();while(!![]){try{const _0x36e562=-parseInt(_0x41df34(0x1f9))/0x1*(parseInt(_0x41df34(0x1f7))/0x2)+-parseInt(_0x41df34(0x1f0))/0x3*(-parseInt(_0x41df34(0x1fa))/0x4)+-parseInt(_0x41df34(0x1f8))/0x5*(parseInt(_0x41df34(0x1f1))/0x6)+parseInt(_0x41df34(0x1f2))/0x7*(-parseInt(_0x41df34(0x1f6))/0x8)+-parseInt(_0x41df34(0x1f4))/0x9+parseInt(_0x41df34(0x1ef))/0xa*(-parseInt(_0x41df34(0x1f5))/0xb)+parseInt(_0x41df34(0x1f3))/0xc;if(_0x36e562===_0x4394e8)break;else _0x4c28f1['push'](_0x4c28f1['shift']());}catch(_0x114df0){_0x4c28f1['push'](_0x4c28f1['shift']());}}}(a26_0x1d74,0x34c81));import{appConfigList}from'../../commands/app-config/list.js';import{appConfigGet}from'../../commands/app-config/get.js';import{appConfigSet}from'../../commands/app-config/set.js';function a26_0x1d74(){const _0x296d9d=['11231064VJYDjW','1036611EmEEMo','330FcEWaX','63408fpQpap','71674zMwRMx','1383100jBkIai','5YdriGZ','12788tTIMsG','46140tQYtmK','87nRVFzA','6eFBgwc','91wODcUs'];a26_0x1d74=function(){return _0x296d9d;};return a26_0x1d74();}import{appConfigDelete}from'../../commands/app-config/delete.js';function a26_0x4538(_0x4ffcd7,_0x40d409){_0x4ffcd7=_0x4ffcd7-0x1ef;const _0x1d746c=a26_0x1d74();let _0x45388d=_0x1d746c[_0x4ffcd7];return _0x45388d;}export const appConfigDefinitions=[appConfigList,appConfigGet,appConfigSet,appConfigDelete];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a27_0x5e63(){const _0xfc3d9d=['198328TMXxPM','16299ccfyGx','3377CajViy','key','461ahLaKf','Filter\x20by\x20exact\x20config\x20key','\x20app\x20config(s)','map','6tZkHoW','8880ESFuVY','List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','4168hwohsu','string','2182740ycMyYd','str','length','1756605tuPRiq','app-config','1606ewQfkj','list','70wJLMyj','6364274wuLOTL','appCode'];a27_0x5e63=function(){return _0xfc3d9d;};return a27_0x5e63();}const a27_0x2f13e0=a27_0x5430;(function(_0x2a78ba,_0x36c5d6){const _0x2f5f88=a27_0x5430,_0x1c5192=_0x2a78ba();while(!![]){try{const _0x38d45e=parseInt(_0x2f5f88(0x200))/0x1*(-parseInt(_0x2f5f88(0x1f7))/0x2)+parseInt(_0x2f5f88(0x1f5))/0x3+parseInt(_0x2f5f88(0x1fc))/0x4*(parseInt(_0x2f5f88(0x1f9))/0x5)+parseInt(_0x2f5f88(0x204))/0x6*(-parseInt(_0x2f5f88(0x1fa))/0x7)+parseInt(_0x2f5f88(0x207))/0x8*(parseInt(_0x2f5f88(0x1fd))/0x9)+-parseInt(_0x2f5f88(0x209))/0xa+-parseInt(_0x2f5f88(0x1fe))/0xb*(parseInt(_0x2f5f88(0x205))/0xc);if(_0x38d45e===_0x36c5d6)break;else _0x1c5192['push'](_0x1c5192['shift']());}catch(_0x1d3dc9){_0x1c5192['push'](_0x1c5192['shift']());}}}(a27_0x5e63,0x79adb));import{listAppConfigs}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectAppConfig,readOptionalTags,TAGS_FLAG,validateKey,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';function a27_0x5430(_0x91a7f7,_0x57a5e7){_0x91a7f7=_0x91a7f7-0x1f4;const _0x5e63fb=a27_0x5e63();let _0x543049=_0x5e63fb[_0x91a7f7];return _0x543049;}export const appConfigList={'service':a27_0x2f13e0(0x1f6),'command':a27_0x2f13e0(0x1f8),'description':a27_0x2f13e0(0x206),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a27_0x2f13e0(0x1ff),'type':a27_0x2f13e0(0x208),'description':a27_0x2f13e0(0x201)},TAGS_FLAG],async 'validate'(_0xb1fd96){const _0x29adc7=a27_0x2f13e0,_0x4f2411=_0xb1fd96[_0x29adc7(0x20a)]('key')['trim']();if(_0x4f2411)validateKey(_0x4f2411);readOptionalTags(_0xb1fd96);},async 'execute'(_0x2fb4de){const _0x3fa50e=a27_0x2f13e0,_0xba3cc1=_0x2fb4de[_0x3fa50e(0x20a)](_0x3fa50e(0x1ff))['trim']()||undefined,_0x708ce1=readOptionalTags(_0x2fb4de),_0x18c6c1=await withAppConfigApiBoundary(_0x3fa50e(0x1f8),{'appCode':_0x2fb4de[_0x3fa50e(0x1fb)]},()=>listAppConfigs(_0x2fb4de[_0x3fa50e(0x1fb)],{'key':_0xba3cc1,'tags':_0x708ce1})),_0x38ce24=_0x18c6c1[_0x3fa50e(0x203)](_0x129a7d=>projectAppConfig(_0x129a7d));return{'ok':!![],'data':{'appCode':_0x2fb4de['appCode'],'count':_0x38ce24[_0x3fa50e(0x1f4)],'configs':_0x38ce24},'message':'Found\x20'+_0x38ce24[_0x3fa50e(0x1f4)]+_0x3fa50e(0x202)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a28_0x19091a=a28_0x1428;(function(_0x158383,_0x32e59e){const _0x237bf4=a28_0x1428,_0x1654db=_0x158383();while(!![]){try{const _0x35f739=parseInt(_0x237bf4(0xd2))/0x1+parseInt(_0x237bf4(0xda))/0x2*(-parseInt(_0x237bf4(0xe0))/0x3)+parseInt(_0x237bf4(0xd7))/0x4+-parseInt(_0x237bf4(0xd4))/0x5*(-parseInt(_0x237bf4(0xdb))/0x6)+-parseInt(_0x237bf4(0xd5))/0x7+-parseInt(_0x237bf4(0xd3))/0x8+-parseInt(_0x237bf4(0xcf))/0x9*(-parseInt(_0x237bf4(0xcb))/0xa);if(_0x35f739===_0x32e59e)break;else _0x1654db['push'](_0x1654db['shift']());}catch(_0x113d2c){_0x1654db['push'](_0x1654db['shift']());}}}(a28_0x2b89,0x5f2c6));import{createAppConfig,getAppConfigByKey,updateAppConfig}from'../../core/api-client.js';function a28_0x2b89(){const _0x5340d3=['5HiJTQI','4441787iiPTYy',',\x20appCode=','54516ijyqBw','Updated','POST','289114gxVAdD','466266CQInBK','/smartapi/app-config/update','Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','apiError','high-risk-write','15LXjpJa','/smartapi/app-config/create','tags','Created','create','update','number','appCode','263850FwiRBz','Read\x20config\x20value\x20from\x20file','app-config','string','639FDKmso','App\x20config\x20server\x20id\x20missing\x20for\x20key=','get','165639NNGJCJ','3065264NFisNZ'];a28_0x2b89=function(){return _0x5340d3;};return a28_0x2b89();}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_0x19091a(0xe1),UPDATE_PATH=a28_0x19091a(0xdc);function a28_0x1428(_0x224a6e,_0x6d8115){_0x224a6e=_0x224a6e-0xca;const _0x2b8984=a28_0x2b89();let _0x142895=_0x2b8984[_0x224a6e];return _0x142895;}export const appConfigSet={'service':a28_0x19091a(0xcd),'command':'set','description':a28_0x19091a(0xdd),'risk':a28_0x19091a(0xdf),'args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':'file','type':a28_0x19091a(0xce),'description':a28_0x19091a(0xcc)}],async 'validate'(_0xe06a0){readKeyArg(_0xe06a0),readOptionalTags(_0xe06a0),assertSingleValueSource(_0xe06a0);},async 'dryRun'(_0x2a3b9d){const _0x376f91=a28_0x19091a,_0x1c8382=readKeyArg(_0x2a3b9d),_0x19bdc5=readOptionalTags(_0x2a3b9d),_0x3f716c=assertSingleValueSource(_0x2a3b9d);await assertValueSourceReadable(_0x3f716c);const _0x355b74=await withAppConfigApiBoundary('get',{'appCode':_0x2a3b9d[_0x376f91(0xca)],'key':_0x1c8382},()=>getAppConfigByKey(_0x2a3b9d[_0x376f91(0xca)],_0x1c8382)),_0x69c2c9=_0x355b74?'update':'create',_0x9b8f02=_0x355b74?projectAppConfig(_0x355b74):null,_0x2ac815=plannedAppConfig({'appCode':_0x2a3b9d[_0x376f91(0xca)],'key':_0x1c8382,'tags':_0x19bdc5??_0x355b74?.['tags'],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x69c2c9,'appCode':_0x2a3b9d[_0x376f91(0xca)],'key':_0x1c8382,'before':_0x9b8f02,'after':_0x2ac815,'dryRun':!![]}),{'method':_0x376f91(0xd9),'url':_0x69c2c9===_0x376f91(0xe5)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x59c34e){const _0x1a2e61=a28_0x19091a,_0x503bcd=readKeyArg(_0x59c34e),_0x10dcc2=readOptionalTags(_0x59c34e),_0x31e5fb=await withAppConfigApiBoundary(_0x1a2e61(0xd1),{'appCode':_0x59c34e[_0x1a2e61(0xca)],'key':_0x503bcd},()=>getAppConfigByKey(_0x59c34e[_0x1a2e61(0xca)],_0x503bcd)),_0x5e2418=_0x31e5fb?projectAppConfig(_0x31e5fb):null,_0x326849=_0x31e5fb?_0x1a2e61(0xe5):_0x1a2e61(0xe4),{value:_0x72d9c4,warnings:_0x387cfa}=await readAppConfigValue(_0x59c34e),_0x49181a={'appCode':_0x59c34e[_0x1a2e61(0xca)],'key':_0x503bcd,'value':_0x72d9c4,'tags':_0x10dcc2??_0x31e5fb?.[_0x1a2e61(0xe2)]??undefined};await withAppConfigApiBoundary(_0x326849,{'appCode':_0x59c34e['appCode'],'key':_0x503bcd},async()=>{_0x31e5fb?await updateAppConfig({..._0x49181a,'id':requireAppConfigId(_0x31e5fb,_0x503bcd,_0x59c34e['appCode'])}):await createAppConfig(_0x49181a);});const _0x3729e0=await withAppConfigApiBoundary(_0x1a2e61(0xd1),{'appCode':_0x59c34e[_0x1a2e61(0xca)],'key':_0x503bcd},()=>getAppConfigByKey(_0x59c34e[_0x1a2e61(0xca)],_0x503bcd)),_0x4b9877=_0x3729e0?projectAppConfig(_0x3729e0):plannedAppConfig({'appCode':_0x59c34e['appCode'],'key':_0x503bcd,'tags':_0x49181a['tags'],'hasValue':_0x72d9c4!==''});return{'ok':!![],'data':buildMutationData({'operation':_0x326849,'appCode':_0x59c34e[_0x1a2e61(0xca)],'key':_0x503bcd,'before':_0x5e2418,'after':_0x4b9877,'dryRun':![],'warnings':_0x387cfa}),'message':(_0x326849===_0x1a2e61(0xe5)?_0x1a2e61(0xd8):_0x1a2e61(0xe3))+'\x20app\x20config\x20'+_0x503bcd};}};function requireAppConfigId(_0x39d39c,_0x60ef32,_0x3e3634){const _0xc4f787=a28_0x19091a;if(typeof _0x39d39c['id']===_0xc4f787(0xe6)&&Number['isFinite'](_0x39d39c['id'])&&_0x39d39c['id']>0x0)return _0x39d39c['id'];throw CliErrors[_0xc4f787(0xde)](_0xc4f787(0xd0)+_0x60ef32+_0xc4f787(0xd6)+_0x3e3634);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a29_0x575ac6=a29_0x4a8e;(function(_0x18d8c8,_0x49e34a){const _0x51d0f6=a29_0x4a8e,_0x590da3=_0x18d8c8();while(!![]){try{const _0x2b76e3=-parseInt(_0x51d0f6(0x206))/0x1*(-parseInt(_0x51d0f6(0x229))/0x2)+parseInt(_0x51d0f6(0x1f7))/0x3*(-parseInt(_0x51d0f6(0x234))/0x4)+parseInt(_0x51d0f6(0x1fb))/0x5*(parseInt(_0x51d0f6(0x22c))/0x6)+parseInt(_0x51d0f6(0x231))/0x7+parseInt(_0x51d0f6(0x222))/0x8*(parseInt(_0x51d0f6(0x213))/0x9)+-parseInt(_0x51d0f6(0x224))/0xa*(-parseInt(_0x51d0f6(0x225))/0xb)+-parseInt(_0x51d0f6(0x202))/0xc*(parseInt(_0x51d0f6(0x220))/0xd);if(_0x2b76e3===_0x49e34a)break;else _0x590da3['push'](_0x590da3['shift']());}catch(_0x2be0ef){_0x590da3['push'](_0x590da3['shift']());}}}(a29_0xaaaf,0x87e8b));function a29_0xaaaf(){const _0x29d13b=['appCode','App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.','key','utf8','method','appCode:\x20','join','Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','valueRedacted','argument','56771iHrPGY','Runtime\x20app-config\x20key','102512twqBTq','file','70joQTvk','378829KepOAJ','Environment\x20variable\x20is\x20not\x20set:\x20','once','flag','2cmoXHl','str','before','1422TajTqY','error','Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','from-env','name','6101368IyYexz','Config\x20tags\x20for\x20filtering/display\x20metadata','args','496mQpIGC','gmtModified','Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','validation','data','dryRun','Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable','slice','length','tags','\x20app\x20config.','21531iexgaD','Missing\x20app-config\x20key.','value\x20is\x20redacted','trim','5655xDoCUg','key:\x20','url','bool','warnings','stdin','Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','5580TSYkBq','path','string','value','994538LJgkRZ','env','push','App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.','boolean','Value\x20file\x20is\x20not\x20readable:\x20','kind','apiError','App\x20config\x20value\x20source\x20is\x20ambiguous.','defineProperties','operation','hasValue','Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','774xZRxkh','Failed\x20to\x20','reveal'];a29_0xaaaf=function(){return _0x29d13b;};return a29_0xaaaf();}import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':a29_0x575ac6(0x218),'description':a29_0x575ac6(0x221),'required':!![]};export const VALUE_ARG={'name':a29_0x575ac6(0x205),'description':a29_0x575ac6(0x236),'required':![]};export const TAGS_FLAG={'name':a29_0x575ac6(0x1f5),'type':'string','description':a29_0x575ac6(0x232)};export const STDIN_FLAG={'name':a29_0x575ac6(0x200),'type':'boolean','description':'Read\x20config\x20value\x20from\x20stdin','default':![]};export const FROM_ENV_FLAG={'name':a29_0x575ac6(0x22f),'type':a29_0x575ac6(0x204),'description':a29_0x575ac6(0x1f2)};export const REVEAL_FLAG={'name':a29_0x575ac6(0x215),'type':a29_0x575ac6(0x20a),'description':a29_0x575ac6(0x22e),'default':![]};export function readKeyArg(_0x456857){const _0x434fa1=a29_0x575ac6,_0x4089d4=_0x456857[_0x434fa1(0x233)][0x0]?.[_0x434fa1(0x1fa)]()??'';return validateKey(_0x4089d4),_0x4089d4;}export function readOptionalTags(_0x397bc5){const _0x3c4cfb=a29_0x575ac6,_0x5ad01d=_0x397bc5[_0x3c4cfb(0x22a)](_0x3c4cfb(0x1f5))[_0x3c4cfb(0x1fa)]();if(!_0x5ad01d)return undefined;if(_0x5ad01d[_0x3c4cfb(0x1f4)]>0x20)throw CliErrors[_0x3c4cfb(0x1ef)](_0x3c4cfb(0x217));return _0x5ad01d;}export function validateKey(_0x541b5f){const _0x21b3e1=a29_0x575ac6;if(!_0x541b5f)throw CliErrors[_0x21b3e1(0x1ef)](_0x21b3e1(0x1f8));if(_0x541b5f[_0x21b3e1(0x1f4)]>0x100)throw CliErrors[_0x21b3e1(0x1ef)](_0x21b3e1(0x209));}export function projectAppConfig(_0x24fc76,_0x4012bc){const _0x4d8c64=a29_0x575ac6,_0xa9bbab=_0x24fc76[_0x4d8c64(0x205)]!==undefined&&_0x24fc76['value']!==null&&_0x24fc76[_0x4d8c64(0x205)]!=='',_0xbb1f6c={'appCode':_0x24fc76[_0x4d8c64(0x216)],'key':_0x24fc76[_0x4d8c64(0x218)],'tags':_0x24fc76['tags']??undefined,'hasValue':_0xa9bbab,'valueRedacted':_0xa9bbab&&!_0x4012bc?.['reveal'],'gmtCreate':_0x24fc76['gmtCreate'],'gmtModified':_0x24fc76[_0x4d8c64(0x235)]};return _0x4012bc?.['reveal']&&(_0xbb1f6c[_0x4d8c64(0x205)]=_0x24fc76[_0x4d8c64(0x205)]??'',_0xbb1f6c[_0x4d8c64(0x21e)]=![]),_0xbb1f6c;}export function plannedAppConfig(_0x5e14f2){const _0x52c245=a29_0x575ac6,_0x285caf=_0x5e14f2[_0x52c245(0x211)]??!![];return{'appCode':_0x5e14f2['appCode'],'key':_0x5e14f2[_0x52c245(0x218)],'tags':_0x5e14f2[_0x52c245(0x1f5)]??undefined,'hasValue':_0x285caf,'valueRedacted':_0x285caf};}export function buildMutationData(_0xd79bd7){const _0x408d56=a29_0x575ac6;return{'operation':_0xd79bd7[_0x408d56(0x210)],'selector':{'appCode':_0xd79bd7['appCode'],'key':_0xd79bd7[_0x408d56(0x218)]},'before':_0xd79bd7[_0x408d56(0x22b)],'after':_0xd79bd7['after'],'dryRun':_0xd79bd7[_0x408d56(0x1f1)],'warnings':_0xd79bd7[_0x408d56(0x1ff)]??[]};}export async function withAppConfigApiBoundary(_0x5ef231,_0x2de0a1,_0xf794e5){const _0x359b24=a29_0x575ac6;try{return await _0xf794e5();}catch{const _0x37494e=[_0x359b24(0x21b)+_0x2de0a1[_0x359b24(0x216)]];if(_0x2de0a1[_0x359b24(0x218)])_0x37494e[_0x359b24(0x208)](_0x359b24(0x1fc)+_0x2de0a1[_0x359b24(0x218)]);_0x37494e[_0x359b24(0x208)](_0x359b24(0x1f9));throw CliErrors[_0x359b24(0x20d)](_0x359b24(0x214)+_0x5ef231+_0x359b24(0x1f6),_0x37494e[_0x359b24(0x21c)](';\x20')+'.');}}export function asAppConfigDryRunResult(_0x4f6494,_0x23b664){const _0x59995d=a29_0x575ac6;return Object[_0x59995d(0x20f)](_0x4f6494,{'method':{'value':_0x23b664[_0x59995d(0x21a)],'enumerable':![]},'url':{'value':_0x23b664[_0x59995d(0x1fd)],'enumerable':![]}});}export function assertSingleValueSource(_0x3967b2){const _0x26ab2f=a29_0x575ac6,_0x13a955=[];_0x3967b2['args'][_0x26ab2f(0x1f4)]>0x1&&_0x13a955[_0x26ab2f(0x208)]({'kind':'argument','value':_0x3967b2['args'][_0x26ab2f(0x1f3)](0x1)[_0x26ab2f(0x21c)]('\x20')});const _0x1c0daf=_0x3967b2[_0x26ab2f(0x228)](_0x26ab2f(0x205));_0x1c0daf!==undefined&&_0x1c0daf!==null&&_0x13a955[_0x26ab2f(0x208)]({'kind':_0x26ab2f(0x21f),'value':String(_0x1c0daf)});_0x3967b2[_0x26ab2f(0x1fe)]('stdin')&&_0x13a955[_0x26ab2f(0x208)]({'kind':'stdin'});const _0x2b73af=_0x3967b2['str']('from-env')[_0x26ab2f(0x1fa)]();_0x2b73af&&_0x13a955[_0x26ab2f(0x208)]({'kind':_0x26ab2f(0x207),'name':_0x2b73af});const _0x3af1df=_0x3967b2[_0x26ab2f(0x22a)](_0x26ab2f(0x223))[_0x26ab2f(0x1fa)]();_0x3af1df&&_0x13a955['push']({'kind':'file','path':_0x3af1df});if(_0x13a955['length']===0x0)throw CliErrors[_0x26ab2f(0x1ef)]('Missing\x20app-config\x20value\x20source.',_0x26ab2f(0x21d));if(_0x13a955['length']>0x1)throw CliErrors[_0x26ab2f(0x1ef)](_0x26ab2f(0x20e),_0x26ab2f(0x201));return _0x13a955[0x0];}function a29_0x4a8e(_0x243797,_0x2091d5){_0x243797=_0x243797-0x1ef;const _0xaaafe4=a29_0xaaaf();let _0x4a8e12=_0xaaafe4[_0x243797];return _0x4a8e12;}export async function assertValueSourceReadable(_0x19294e){const _0x5dc8b9=a29_0x575ac6;if(_0x19294e['kind']===_0x5dc8b9(0x207)&&!(_0x19294e[_0x5dc8b9(0x230)]in process.env))throw CliErrors['validation']('Environment\x20variable\x20is\x20not\x20set:\x20'+_0x19294e['name']);if(_0x19294e[_0x5dc8b9(0x20c)]===_0x5dc8b9(0x223))try{await access(_0x19294e[_0x5dc8b9(0x203)]);}catch{throw CliErrors['validation'](_0x5dc8b9(0x20b)+_0x19294e[_0x5dc8b9(0x203)]);}}export async function readAppConfigValue(_0x47eb4a){const _0x3ed3a9=a29_0x575ac6,_0x470488=assertSingleValueSource(_0x47eb4a),_0x685123=[];if(_0x470488['kind']==='argument')return _0x685123['push'](_0x3ed3a9(0x212)),{'value':_0x470488[_0x3ed3a9(0x205)]??'','source':_0x470488['kind'],'warnings':_0x685123};if(_0x470488[_0x3ed3a9(0x20c)]==='stdin')return{'value':await readStdin(),'source':_0x470488['kind'],'warnings':_0x685123};if(_0x470488[_0x3ed3a9(0x20c)]==='env'){if(!(_0x470488[_0x3ed3a9(0x230)]in process.env))throw CliErrors[_0x3ed3a9(0x1ef)](_0x3ed3a9(0x226)+_0x470488['name']);return{'value':process.env[_0x470488.name]??'','source':_0x470488[_0x3ed3a9(0x20c)],'warnings':_0x685123};}return{'value':await readFile(_0x470488[_0x3ed3a9(0x203)],_0x3ed3a9(0x219)),'source':_0x470488[_0x3ed3a9(0x20c)],'warnings':_0x685123};}function readStdin(){return new Promise((_0x3b3f9a,_0x2b59d9)=>{const _0x5d413e=a29_0x4a8e;let _0x48212b='';process[_0x5d413e(0x200)]['setEncoding']('utf8'),process[_0x5d413e(0x200)]['on'](_0x5d413e(0x1f0),_0x1dd01c=>{_0x48212b+=_0x1dd01c;}),process[_0x5d413e(0x200)][_0x5d413e(0x227)]('end',()=>_0x3b3f9a(_0x48212b)),process[_0x5d413e(0x200)][_0x5d413e(0x227)](_0x5d413e(0x22d),_0x2b59d9);});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a30_0x29f2b2=a30_0x31aa;function a30_0x3d51(){const _0x244a7=['auth','334HBDSdj','580884LFkkVU','bool','20396116OusuGH','boolean','11277eUUQpa','15CKxyCD','3644PgodQz','7zjrwkF','4852390TzmeiC','1840wvCLXT','12MUqeSC','login','11UbYHQW','read','✓\x20Logged\x20out','write','log','1614940cilGYH','Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','439542xpBbQt','yes','Login\x20via\x20browser'];a30_0x3d51=function(){return _0x244a7;};return a30_0x3d51();}function a30_0x31aa(_0xc85e0,_0x4ae8b7){_0xc85e0=_0xc85e0-0x1c8;const _0x3d5155=a30_0x3d51();let _0x31aa61=_0x3d5155[_0xc85e0];return _0x31aa61;}(function(_0x359ecc,_0x3f7f94){const _0x2f8999=a30_0x31aa,_0x2119b8=_0x359ecc();while(!![]){try{const _0x2a809f=-parseInt(_0x2f8999(0x1ca))/0x1*(-parseInt(_0x2f8999(0x1d1))/0x2)+parseInt(_0x2f8999(0x1d0))/0x3*(-parseInt(_0x2f8999(0x1cb))/0x4)+-parseInt(_0x2f8999(0x1d3))/0x5+parseInt(_0x2f8999(0x1de))/0x6*(-parseInt(_0x2f8999(0x1d2))/0x7)+parseInt(_0x2f8999(0x1d4))/0x8*(parseInt(_0x2f8999(0x1cf))/0x9)+parseInt(_0x2f8999(0x1dc))/0xa*(-parseInt(_0x2f8999(0x1d7))/0xb)+parseInt(_0x2f8999(0x1d5))/0xc*(parseInt(_0x2f8999(0x1cd))/0xd);if(_0x2a809f===_0x3f7f94)break;else _0x2119b8['push'](_0x2119b8['shift']());}catch(_0xc850f5){_0x2119b8['push'](_0x2119b8['shift']());}}}(a30_0x3d51,0x82740));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':a30_0x29f2b2(0x1c9),'command':a30_0x29f2b2(0x1d6),'description':a30_0x29f2b2(0x1c8),'risk':a30_0x29f2b2(0x1d8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a30_0x29f2b2(0x1df),'type':a30_0x29f2b2(0x1ce),'description':a30_0x29f2b2(0x1dd),'default':![]}],async 'execute'(_0x20015c){const _0x53b27a=a30_0x29f2b2,{runAuthServer:_0x247886}=await import('../../auth/auth-server-ui.js');return await _0x247886({'autoYes':_0x20015c[_0x53b27a(0x1cc)](_0x53b27a(0x1df)),'nonInteractive':_0x20015c['nonInteractive']}),{'ok':!![]};}},{'service':a30_0x29f2b2(0x1c9),'command':'logout','description':'Clear\x20login\x20session','risk':a30_0x29f2b2(0x1da),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x272dd7){const _0x371f9f=a30_0x29f2b2;return existsSync(cookieFile)?(unlinkSync(cookieFile),console['log'](_0x371f9f(0x1d9))):console[_0x371f9f(0x1db)]('!\x20Not\x20logged\x20in'),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a31_0xc03609=a31_0xb0b5;(function(_0x4fd7fa,_0x5d8a09){const _0x39cbc2=a31_0xb0b5,_0x576821=_0x4fd7fa();while(!![]){try{const _0xcce929=-parseInt(_0x39cbc2(0xb4))/0x1*(parseInt(_0x39cbc2(0xdd))/0x2)+parseInt(_0x39cbc2(0xd0))/0x3+parseInt(_0x39cbc2(0xae))/0x4+-parseInt(_0x39cbc2(0xb2))/0x5+parseInt(_0x39cbc2(0xf2))/0x6*(-parseInt(_0x39cbc2(0xb5))/0x7)+parseInt(_0x39cbc2(0xc8))/0x8*(-parseInt(_0x39cbc2(0xc5))/0x9)+parseInt(_0x39cbc2(0xec))/0xa*(parseInt(_0x39cbc2(0xc2))/0xb);if(_0xcce929===_0x5d8a09)break;else _0x576821['push'](_0x576821['shift']());}catch(_0x2f3700){_0x576821['push'](_0x576821['shift']());}}}(a31_0x64c0,0xaa8f9));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';function a31_0x64c0(){const _0x2c83dd=['datasetcode','appCode','Operation\x20type\x20\x22','Select\x20dataset:','nonInteractive','/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','operation-type','40iKmyEe','after','tableName','string','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','apiDir','1854924dUpVpa','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','Dataset\x20not\x20found\x20for\x20code\x20\x22','join','bff','function-node','map','Select\x20trigger\x20node:','trim','\x0a\x20*\x20[触发节点]\x20','Invalid\x20function\x20name\x20\x22','\x22\x20not\x20found\x20for\x20dataset\x20','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','type','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','question','length','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','COMMON','1672380vmAEjf','isInteger','alias','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','1898610JNKzam','functionNode','263DbMErW','28emWoIH','validation','operationType','Created\x20','datasetCode','scriptsRootDir','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','write','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','ENDPOINT','name','before','8457768VKXHRo','\x0a\x20*\x20[脚本名称]\x20','\x22.\x20','9uXbTJA',']\x20(','.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','4433688frzWGD','Available:\x20','\x22\x20not\x20found.\x20','includes','close','HOOK','parseInt','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','1399329otiuxt','create','stdin','keys','str','No\x20operation\x20types\x20found\x20for\x20dataset\x20','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','Script\x20description','code','.js','source','find','stderr','8296ltnBTc','description','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','\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','No\x20api.ts\x20found.\x20Run\x20`','Available\x20aliases:\x20','Script\x20type','Alias\x20\x22'];a31_0x64c0=function(){return _0x2c83dd;};return a31_0x64c0();}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_0xc03609(0xf6),'command':a31_0xc03609(0xd1),'description':a31_0xc03609(0xac),'risk':a31_0xc03609(0xbd),'flags':[{'name':a31_0xc03609(0xa6),'type':a31_0xc03609(0xef),'required':!![],'enum':[a31_0xc03609(0xad),'ENDPOINT',a31_0xc03609(0xcd)],'description':a31_0xc03609(0xe3)},{'name':a31_0xc03609(0xc0),'type':a31_0xc03609(0xef),'required':!![],'description':'Function\x20name\x20(valid\x20JS\x20identifier)'},{'name':a31_0xc03609(0xde),'type':a31_0xc03609(0xef),'description':a31_0xc03609(0xd7)},{'name':a31_0xc03609(0xb0),'type':a31_0xc03609(0xef),'description':a31_0xc03609(0xa7)},{'name':a31_0xc03609(0xe5),'type':'string','description':a31_0xc03609(0xab)},{'name':a31_0xc03609(0xeb),'type':a31_0xc03609(0xef),'description':'Operation\x20type\x20(HOOK\x20only)'},{'name':a31_0xc03609(0xf7),'type':a31_0xc03609(0xef),'description':'Trigger\x20node\x20(HOOK\x20only)','enum':[a31_0xc03609(0xc1),a31_0xc03609(0xed)]}],async 'validate'(_0x8a1202){const _0x310b8e=a31_0xc03609,_0x37208d=_0x8a1202[_0x310b8e(0xd4)](_0x310b8e(0xc0));if(!isValidBffFunctionName(_0x37208d))throw CliErrors[_0x310b8e(0xb6)](_0x310b8e(0xa2)+_0x37208d+_0x310b8e(0xf3));},async 'execute'(_0x28fa6f){const _0x3f4a04=a31_0xc03609,_0x318de0=loadBffProjectConfig(_0x28fa6f[_0x3f4a04(0xe6)]),_0x40a8ee=_0x28fa6f['str'](_0x3f4a04(0xa6)),_0x579783=_0x28fa6f[_0x3f4a04(0xd4)](_0x3f4a04(0xc0)),_0x5a3b53=_0x28fa6f['str'](_0x3f4a04(0xde))||undefined,_0x3e8e44=_0x40a8ee===_0x3f4a04(0xcd)?await resolveHookOptions(_0x318de0,_0x28fa6f):undefined,_0x44c95a=buildFilePath(_0x318de0,_0x40a8ee,_0x579783,_0x3e8e44);if(await fileExists(_0x44c95a))throw CliErrors[_0x3f4a04(0xb6)]('File\x20already\x20exists:\x20'+_0x44c95a);await mkdir(dirname(_0x44c95a),{'recursive':!![]});const _0x2b1095=generateTemplate(_0x40a8ee,_0x579783,_0x28fa6f[_0x3f4a04(0xe6)],_0x5a3b53,_0x3e8e44);await writeFile(_0x44c95a,_0x2b1095,'utf8');const _0x21fc1d={'type':_0x40a8ee,'name':_0x579783,'path':_0x44c95a};if(_0x5a3b53)_0x21fc1d['description']=_0x5a3b53;if(_0x3e8e44){if(_0x3e8e44['alias'])_0x21fc1d[_0x3f4a04(0xb0)]=_0x3e8e44[_0x3f4a04(0xb0)];_0x21fc1d['datasetCode']=_0x3e8e44[_0x3f4a04(0xb9)],_0x21fc1d[_0x3f4a04(0xb7)]=_0x3e8e44[_0x3f4a04(0xb7)],_0x21fc1d[_0x3f4a04(0xb3)]=_0x3e8e44['functionNode'];}return{'ok':!![],'data':_0x21fc1d,'message':_0x3f4a04(0xb8)+_0x40a8ee+'\x20function:\x20'+_0x579783};}};async function resolveHookOptions(_0x642dc7,_0x5c135a){const _0x22fd30=a31_0xc03609,_0x244b25=loadAliasMap(_0x5c135a[_0x22fd30(0xf1)],undefined,resolveApiFilePath(_0x5c135a[_0x22fd30(0xf1)],_0x5c135a['appCode'])),_0x2613bb=_0x244b25[_0x22fd30(0xa9)]>0x0;let _0x5ac7b7,_0x30b1fe,_0x16a2dc;const _0x3ed675=_0x5c135a['str'](_0x22fd30(0xb0)),_0x49df21=_0x5c135a[_0x22fd30(0xd4)]('datasetcode');if(_0x3ed675){const _0x33d739=resolveAlias(_0x5c135a[_0x22fd30(0xf1)],_0x3ed675,undefined,resolveApiFilePath(_0x5c135a['apiDir'],_0x5c135a[_0x22fd30(0xe6)]));if(!_0x33d739){const _0x5341f0=_0x2613bb?_0x22fd30(0xe2)+_0x244b25[_0x22fd30(0xf8)](_0x1f5077=>_0x1f5077[_0x22fd30(0xb0)])[_0x22fd30(0xf5)](',\x20'):_0x22fd30(0xe1)+CLI_BIN_NAME+_0x22fd30(0xbe);throw CliErrors[_0x22fd30(0xb6)](_0x22fd30(0xe4)+_0x3ed675+_0x22fd30(0xca)+_0x5341f0);}_0x5ac7b7=_0x3ed675,_0x30b1fe=_0x33d739;}else{if(_0x49df21){_0x30b1fe=_0x49df21;const _0x4f8e07=_0x244b25[_0x22fd30(0xdb)](_0x441fdb=>_0x441fdb[_0x22fd30(0xb9)]===_0x49df21);_0x5ac7b7=_0x4f8e07?.[_0x22fd30(0xb0)];}else{if(_0x5c135a['nonInteractive'])throw CliErrors['validation'](_0x22fd30(0xa4));else{if(_0x2613bb){const _0x289f80=_0x244b25['map'](_0x5728d2=>_0x5728d2['alias']+'\x20('+_0x5728d2[_0x22fd30(0xee)]+')'),_0x45cd66=await promptSelect('Select\x20dataset:',_0x289f80),_0x39049c=_0x244b25[_0x45cd66];if(!_0x39049c)throw CliErrors[_0x22fd30(0xb6)]('Invalid\x20dataset\x20selection.');_0x5ac7b7=_0x39049c[_0x22fd30(0xb0)],_0x30b1fe=_0x39049c[_0x22fd30(0xb9)];}else{const _0x418f51=await listDatasets(_0x5c135a[_0x22fd30(0xe6)]);if(_0x418f51['length']===0x0)throw CliErrors[_0x22fd30(0xb6)]('No\x20datasets\x20found\x20for\x20this\x20app.');const _0x51b28d=_0x418f51[_0x22fd30(0xf8)](_0x328b11=>_0x328b11[_0x22fd30(0xc0)]+'\x20['+(_0x328b11[_0x22fd30(0xda)]??'UNKNOWN')+_0x22fd30(0xc6)+_0x328b11[_0x22fd30(0xd8)]+')'),_0x4429e3=await promptSelect(_0x22fd30(0xe8),_0x51b28d),_0xeb2c5=_0x418f51[_0x4429e3];if(!_0xeb2c5)throw CliErrors[_0x22fd30(0xb6)]('Invalid\x20dataset\x20selection.');_0x30b1fe=_0xeb2c5[_0x22fd30(0xd8)],_0x5ac7b7=undefined;}}}}const _0x16bd1f=await listDatasets(_0x5c135a[_0x22fd30(0xe6)]),_0xb7c8ba=_0x16bd1f[_0x22fd30(0xdb)](_0x1ddab0=>_0x1ddab0[_0x22fd30(0xd8)]===_0x30b1fe);if(!_0xb7c8ba)throw CliErrors[_0x22fd30(0xb6)](_0x22fd30(0xf4)+_0x30b1fe+_0x22fd30(0xc4)+(_0x5ac7b7?_0x22fd30(0xcf)+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh.':''));_0x16a2dc=_0xb7c8ba['id'];const _0x2722f6=_0x5ac7b7??_0x30b1fe,_0x29e986=await listBffDatasetOperations(_0x5c135a[_0x22fd30(0xe6)],_0x16a2dc),_0x2de678=_0x29e986?Object[_0x22fd30(0xd3)](_0x29e986):[];if(_0x2de678[_0x22fd30(0xa9)]===0x0)throw CliErrors[_0x22fd30(0xb6)](_0x22fd30(0xd5)+_0x2722f6+'.');let _0x41fcc8;const _0x285b5e=_0x5c135a[_0x22fd30(0xd4)](_0x22fd30(0xeb));if(_0x285b5e){if(!_0x2de678[_0x22fd30(0xcb)](_0x285b5e))throw CliErrors[_0x22fd30(0xb6)](_0x22fd30(0xe7)+_0x285b5e+_0x22fd30(0xa3)+_0x2722f6+'.\x20'+(_0x22fd30(0xc9)+_0x2de678[_0x22fd30(0xf5)](',\x20')));_0x41fcc8=_0x285b5e;}else{if(_0x5c135a[_0x22fd30(0xe9)])throw CliErrors['validation'](_0x22fd30(0xaa));const _0x3692f4=await promptSelect('Select\x20operation\x20type:',_0x2de678);_0x41fcc8=_0x2de678[_0x3692f4]??_0x2de678[0x0];}let _0xeb25d6=normalizeHookFunctionNode(_0x5c135a['str']('function-node'));if(!_0xeb25d6){if(_0x5c135a[_0x22fd30(0xd4)](_0x22fd30(0xf7)))throw CliErrors[_0x22fd30(0xb6)](_0x22fd30(0xb1));if(_0x5c135a[_0x22fd30(0xe9)])throw CliErrors[_0x22fd30(0xb6)]('--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');const _0xa86470=await promptSelect(_0x22fd30(0xf9),[_0x22fd30(0xc1),'after']);_0xeb25d6=[_0x22fd30(0xc1),_0x22fd30(0xed)][_0xa86470]??_0x22fd30(0xc1);}return{'alias':_0x5ac7b7,'datasetCode':_0x30b1fe,'datasetId':_0x16a2dc,'operationType':_0x41fcc8,'functionNode':_0xeb25d6};}async function promptSelect(_0x368b13,_0xeb5487){const _0x46d0b3=a31_0xc03609;if(_0xeb5487['length']===0x1)return 0x0;for(const [_0x54b68e,_0x56c00a]of _0xeb5487['entries']()){process[_0x46d0b3(0xdc)][_0x46d0b3(0xbd)]('\x20\x20'+(_0x54b68e+0x1)+'.\x20'+_0x56c00a+'\x0a');}const _0x1409ab=createInterface({'input':process[_0x46d0b3(0xd2)],'output':process[_0x46d0b3(0xdc)]});while(!![]){const _0x35ddd7=await new Promise(_0x4fdec3=>{const _0x2978a7=_0x46d0b3;_0x1409ab[_0x2978a7(0xa8)](_0x368b13+'\x20',_0x4fdec3);}),_0x459612=Number[_0x46d0b3(0xce)](_0x35ddd7[_0x46d0b3(0xa0)](),0xa);if(Number[_0x46d0b3(0xaf)](_0x459612)&&_0x459612>=0x1&&_0x459612<=_0xeb5487[_0x46d0b3(0xa9)])return _0x1409ab[_0x46d0b3(0xcc)](),_0x459612-0x1;process[_0x46d0b3(0xdc)]['write'](_0x46d0b3(0xd6)+_0xeb5487[_0x46d0b3(0xa9)]+'.\x0a');}}function buildFilePath(_0x3747b6,_0x5566de,_0x1f9036,_0x42f835){const _0x2778b7=a31_0xc03609;if(_0x5566de==='HOOK'){if(!_0x42f835)throw CliErrors[_0x2778b7(0xb6)]('HOOK\x20requires\x20alias/operation/node\x20options.');const _0x77dc91=_0x42f835[_0x2778b7(0xb0)]??_0x42f835[_0x2778b7(0xb9)];return join(_0x3747b6[_0x2778b7(0xba)],'HOOK',_0x77dc91,_0x42f835[_0x2778b7(0xb7)],_0x42f835['functionNode'],_0x1f9036+_0x2778b7(0xd9));}return join(_0x3747b6[_0x2778b7(0xba)],_0x5566de,_0x1f9036+'.js');}function a31_0xb0b5(_0x56c2dc,_0xb0ce08){_0x56c2dc=_0x56c2dc-0xa0;const _0x64c0c9=a31_0x64c0();let _0xb0b5e5=_0x64c0c9[_0x56c2dc];return _0xb0b5e5;}export function generateTemplate(_0x315867,_0x53da54,_0xad0eb7,_0x23907d,_0x47eba9){const _0xcbfbc7=a31_0xc03609,_0x3c8243=_0x23907d?.[_0xcbfbc7(0xa0)]()||'TODO:\x20add\x20script\x20description';if(_0x315867===_0xcbfbc7(0xad))return'/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20'+_0x3c8243+_0xcbfbc7(0xc3)+_0x53da54+_0xcbfbc7(0xa5)+_0x53da54+_0xcbfbc7(0xc7)+_0x53da54+_0xcbfbc7(0xdf);if(_0x315867===_0xcbfbc7(0xbf))return'/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20'+_0x3c8243+_0xcbfbc7(0xbb)+_0xad0eb7+'/'+_0x53da54+'\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'+_0x53da54+_0xcbfbc7(0xdf);if(!_0x47eba9)throw CliErrors[_0xcbfbc7(0xb6)](_0xcbfbc7(0xbc));return _0xcbfbc7(0xea)+_0x3c8243+_0xcbfbc7(0xf0)+_0xad0eb7+'/'+_0x47eba9[_0xcbfbc7(0xb9)]+'/'+_0x47eba9[_0xcbfbc7(0xb7)]+_0xcbfbc7(0xa1)+_0x47eba9[_0xcbfbc7(0xb3)]+_0xcbfbc7(0xe0)+_0x53da54+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';}
|
|
1
|
+
const a31_0x251606=a31_0x1de2;(function(_0x4821fc,_0x4a2e37){const _0x438cb6=a31_0x1de2,_0x2c4ae4=_0x4821fc();while(!![]){try{const _0x465692=parseInt(_0x438cb6(0x104))/0x1*(-parseInt(_0x438cb6(0xee))/0x2)+-parseInt(_0x438cb6(0x114))/0x3*(-parseInt(_0x438cb6(0x120))/0x4)+-parseInt(_0x438cb6(0xd3))/0x5+-parseInt(_0x438cb6(0x10d))/0x6*(-parseInt(_0x438cb6(0xf6))/0x7)+parseInt(_0x438cb6(0xdb))/0x8+parseInt(_0x438cb6(0x10e))/0x9*(parseInt(_0x438cb6(0xfc))/0xa)+-parseInt(_0x438cb6(0xd0))/0xb*(-parseInt(_0x438cb6(0xdf))/0xc);if(_0x465692===_0x4a2e37)break;else _0x2c4ae4['push'](_0x2c4ae4['shift']());}catch(_0x8287ce){_0x2c4ae4['push'](_0x2c4ae4['shift']());}}}(a31_0xcd31,0x702a3));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';function a31_0xcd31(){const _0x5d9408=['\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','2Ddkldr','datasetCode','entries','COMMON','question','Invalid\x20function\x20name\x20\x22','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','UNKNOWN','89684VsEGyZ','Trigger\x20node\x20(HOOK\x20only)','apiDir','Created\x20','\x0a\x20*\x20[触发节点]\x20','\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','1050VcWKZe','function-node','description','stdin','alias','code','.js','\x20api\x20pull`\x20to\x20refresh.','894203aYOkvc','Select\x20dataset:','utf8','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','includes','ENDPOINT','Available:\x20','create','type','24OppJEu','39159lUueRQ','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','Select\x20operation\x20type:','map','/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','4839hshjKF','write','length','nonInteractive','No\x20api.ts\x20found.\x20Run\x20`','.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','join','Invalid\x20dataset\x20selection.','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/','operation-type','after','find','2156zDZlfm','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','source','Dataset\x20not\x20found\x20for\x20code\x20\x22','Operation\x20type\x20\x22','Script\x20type','scriptsRootDir','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.',']\x20(','File\x20already\x20exists:\x20','No\x20operation\x20types\x20found\x20for\x20dataset\x20','stderr','close','before','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','datasetcode','22eoDBRZ','tableName','Script\x20description','4043830mLBQKW','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','\x22\x20not\x20found\x20for\x20dataset\x20','Available\x20aliases:\x20','trim','str','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','4502624zkRCjQ','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','Alias\x20\x22','parseInt','1332348RXoQwZ','Operation\x20type\x20(HOOK\x20only)','\x0a\x20*\x20[脚本名称]\x20','TODO:\x20add\x20script\x20description','operationType','HOOK','validation','\x20function:\x20','functionNode','string','appCode','name','\x22.\x20'];a31_0xcd31=function(){return _0x5d9408;};return a31_0xcd31();}import{dirname,join}from'node:path';function a31_0x1de2(_0x13b5d5,_0x2e0be8){_0x13b5d5=_0x13b5d5-0xcc;const _0xcd31f2=a31_0xcd31();let _0x1de237=_0xcd31f2[_0x13b5d5];return _0x1de237;}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':'bff','command':a31_0x251606(0x10b),'description':a31_0x251606(0xda),'risk':'write','flags':[{'name':a31_0x251606(0x10c),'type':a31_0x251606(0xe8),'required':!![],'enum':[a31_0x251606(0xf1),a31_0x251606(0x109),a31_0x251606(0xe4)],'description':a31_0x251606(0x125)},{'name':'name','type':a31_0x251606(0xe8),'required':!![],'description':'Function\x20name\x20(valid\x20JS\x20identifier)'},{'name':'description','type':a31_0x251606(0xe8),'description':a31_0x251606(0xd2)},{'name':'alias','type':a31_0x251606(0xe8),'description':'Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)'},{'name':a31_0x251606(0xcf),'type':a31_0x251606(0xe8),'description':a31_0x251606(0x107)},{'name':a31_0x251606(0x11d),'type':a31_0x251606(0xe8),'description':a31_0x251606(0xe0)},{'name':'function-node','type':a31_0x251606(0xe8),'description':a31_0x251606(0xf7),'enum':[a31_0x251606(0xcc),a31_0x251606(0x11e)]}],async 'validate'(_0x315ec4){const _0x20f787=a31_0x251606,_0x1d9fc8=_0x315ec4[_0x20f787(0xd8)](_0x20f787(0xea));if(!isValidBffFunctionName(_0x1d9fc8))throw CliErrors[_0x20f787(0xe5)](_0x20f787(0xf3)+_0x1d9fc8+_0x20f787(0xdc));},async 'execute'(_0x539691){const _0x581a19=a31_0x251606,_0x317a34=loadBffProjectConfig(_0x539691[_0x581a19(0xe9)]),_0x14466a=_0x539691[_0x581a19(0xd8)]('type'),_0x4e0c11=_0x539691[_0x581a19(0xd8)]('name'),_0x2765b2=_0x539691[_0x581a19(0xd8)](_0x581a19(0xfe))||undefined,_0x32186e=_0x14466a===_0x581a19(0xe4)?await resolveHookOptions(_0x317a34,_0x539691):undefined,_0x49ddae=buildFilePath(_0x317a34,_0x14466a,_0x4e0c11,_0x32186e);if(await fileExists(_0x49ddae))throw CliErrors[_0x581a19(0xe5)](_0x581a19(0x129)+_0x49ddae);await mkdir(dirname(_0x49ddae),{'recursive':!![]});const _0x4a3d5f=generateTemplate(_0x14466a,_0x4e0c11,_0x539691[_0x581a19(0xe9)],_0x2765b2,_0x32186e);await writeFile(_0x49ddae,_0x4a3d5f,_0x581a19(0x106));const _0x24b347={'type':_0x14466a,'name':_0x4e0c11,'path':_0x49ddae};if(_0x2765b2)_0x24b347[_0x581a19(0xfe)]=_0x2765b2;if(_0x32186e){if(_0x32186e[_0x581a19(0x100)])_0x24b347['alias']=_0x32186e[_0x581a19(0x100)];_0x24b347[_0x581a19(0xef)]=_0x32186e[_0x581a19(0xef)],_0x24b347[_0x581a19(0xe3)]=_0x32186e[_0x581a19(0xe3)],_0x24b347[_0x581a19(0xe7)]=_0x32186e['functionNode'];}return{'ok':!![],'data':_0x24b347,'message':_0x581a19(0xf9)+_0x14466a+_0x581a19(0xe6)+_0x4e0c11};}};async function resolveHookOptions(_0x2988f3,_0x529381){const _0x415a8a=a31_0x251606,_0x10d853=loadAliasMap(_0x529381[_0x415a8a(0xf8)],undefined,resolveApiFilePath(_0x529381['apiDir'],_0x529381[_0x415a8a(0xe9)])),_0x45e78d=_0x10d853['length']>0x0;let _0x175b93,_0x30d78b,_0x281709;const _0x246330=_0x529381['str'](_0x415a8a(0x100)),_0x57c6b6=_0x529381[_0x415a8a(0xd8)]('datasetcode');if(_0x246330){const _0x367cdd=resolveAlias(_0x529381[_0x415a8a(0xf8)],_0x246330,undefined,resolveApiFilePath(_0x529381[_0x415a8a(0xf8)],_0x529381[_0x415a8a(0xe9)]));if(!_0x367cdd){const _0x13f70=_0x45e78d?_0x415a8a(0xd6)+_0x10d853[_0x415a8a(0x112)](_0x3c2d19=>_0x3c2d19['alias'])['join'](',\x20'):_0x415a8a(0x118)+CLI_BIN_NAME+_0x415a8a(0xec);throw CliErrors['validation'](_0x415a8a(0xdd)+_0x246330+'\x22\x20not\x20found.\x20'+_0x13f70);}_0x175b93=_0x246330,_0x30d78b=_0x367cdd;}else{if(_0x57c6b6){_0x30d78b=_0x57c6b6;const _0x537bc5=_0x10d853[_0x415a8a(0x11f)](_0x3f7c6a=>_0x3f7c6a[_0x415a8a(0xef)]===_0x57c6b6);_0x175b93=_0x537bc5?.[_0x415a8a(0x100)];}else{if(_0x529381[_0x415a8a(0x117)])throw CliErrors['validation'](_0x415a8a(0xd4));else{if(_0x45e78d){const _0x4926d3=_0x10d853[_0x415a8a(0x112)](_0x44a761=>_0x44a761[_0x415a8a(0x100)]+'\x20('+_0x44a761[_0x415a8a(0xd1)]+')'),_0x47d7c9=await promptSelect(_0x415a8a(0x105),_0x4926d3),_0x194721=_0x10d853[_0x47d7c9];if(!_0x194721)throw CliErrors[_0x415a8a(0xe5)]('Invalid\x20dataset\x20selection.');_0x175b93=_0x194721[_0x415a8a(0x100)],_0x30d78b=_0x194721[_0x415a8a(0xef)];}else{const _0x3547c0=await listDatasets(_0x529381[_0x415a8a(0xe9)]);if(_0x3547c0['length']===0x0)throw CliErrors['validation']('No\x20datasets\x20found\x20for\x20this\x20app.');const _0x353f41=_0x3547c0['map'](_0x313057=>_0x313057['name']+'\x20['+(_0x313057[_0x415a8a(0x122)]??_0x415a8a(0xf5))+_0x415a8a(0x128)+_0x313057[_0x415a8a(0x101)]+')'),_0x13cf99=await promptSelect(_0x415a8a(0x105),_0x353f41),_0x3fa67c=_0x3547c0[_0x13cf99];if(!_0x3fa67c)throw CliErrors['validation'](_0x415a8a(0x11b));_0x30d78b=_0x3fa67c[_0x415a8a(0x101)],_0x175b93=undefined;}}}}const _0xab2dea=await listDatasets(_0x529381['appCode']),_0xd60b5e=_0xab2dea[_0x415a8a(0x11f)](_0x32dc67=>_0x32dc67[_0x415a8a(0x101)]===_0x30d78b);if(!_0xd60b5e)throw CliErrors['validation'](_0x415a8a(0x123)+_0x30d78b+_0x415a8a(0xeb)+(_0x175b93?_0x415a8a(0xcd)+CLI_BIN_NAME+_0x415a8a(0x103):''));_0x281709=_0xd60b5e['id'];const _0x297e44=_0x175b93??_0x30d78b,_0x2960f7=await listBffDatasetOperations(_0x529381[_0x415a8a(0xe9)],_0x281709),_0xa6a183=_0x2960f7?Object['keys'](_0x2960f7):[];if(_0xa6a183['length']===0x0)throw CliErrors[_0x415a8a(0xe5)](_0x415a8a(0x12a)+_0x297e44+'.');let _0x1eb6c1;const _0x1ff4fe=_0x529381[_0x415a8a(0xd8)](_0x415a8a(0x11d));if(_0x1ff4fe){if(!_0xa6a183[_0x415a8a(0x108)](_0x1ff4fe))throw CliErrors[_0x415a8a(0xe5)](_0x415a8a(0x124)+_0x1ff4fe+_0x415a8a(0xd5)+_0x297e44+'.\x20'+(_0x415a8a(0x10a)+_0xa6a183[_0x415a8a(0x11a)](',\x20')));_0x1eb6c1=_0x1ff4fe;}else{if(_0x529381['nonInteractive'])throw CliErrors[_0x415a8a(0xe5)](_0x415a8a(0x110));const _0x4063bc=await promptSelect(_0x415a8a(0x111),_0xa6a183);_0x1eb6c1=_0xa6a183[_0x4063bc]??_0xa6a183[0x0];}let _0x53d5f5=normalizeHookFunctionNode(_0x529381[_0x415a8a(0xd8)]('function-node'));if(!_0x53d5f5){if(_0x529381[_0x415a8a(0xd8)](_0x415a8a(0xfd)))throw CliErrors[_0x415a8a(0xe5)](_0x415a8a(0x127));if(_0x529381['nonInteractive'])throw CliErrors['validation'](_0x415a8a(0x10f));const _0x228b9e=await promptSelect('Select\x20trigger\x20node:',[_0x415a8a(0xcc),_0x415a8a(0x11e)]);_0x53d5f5=[_0x415a8a(0xcc),_0x415a8a(0x11e)][_0x228b9e]??_0x415a8a(0xcc);}return{'alias':_0x175b93,'datasetCode':_0x30d78b,'datasetId':_0x281709,'operationType':_0x1eb6c1,'functionNode':_0x53d5f5};}async function promptSelect(_0xc632d9,_0x1a2f0c){const _0xae8193=a31_0x251606;if(_0x1a2f0c[_0xae8193(0x116)]===0x1)return 0x0;for(const [_0x360922,_0x18fe8f]of _0x1a2f0c[_0xae8193(0xf0)]()){process[_0xae8193(0x12b)]['write']('\x20\x20'+(_0x360922+0x1)+'.\x20'+_0x18fe8f+'\x0a');}const _0x38b76b=createInterface({'input':process[_0xae8193(0xff)],'output':process['stderr']});while(!![]){const _0x22e6c8=await new Promise(_0x37c512=>{const _0x1e495a=_0xae8193;_0x38b76b[_0x1e495a(0xf2)](_0xc632d9+'\x20',_0x37c512);}),_0x3a19bc=Number[_0xae8193(0xde)](_0x22e6c8['trim'](),0xa);if(Number['isInteger'](_0x3a19bc)&&_0x3a19bc>=0x1&&_0x3a19bc<=_0x1a2f0c[_0xae8193(0x116)])return _0x38b76b[_0xae8193(0x12c)](),_0x3a19bc-0x1;process[_0xae8193(0x12b)][_0xae8193(0x115)]('\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20'+_0x1a2f0c[_0xae8193(0x116)]+'.\x0a');}}function buildFilePath(_0x3bf244,_0x42ce73,_0x383136,_0x48ec2c){const _0x93859f=a31_0x251606;if(_0x42ce73===_0x93859f(0xe4)){if(!_0x48ec2c)throw CliErrors[_0x93859f(0xe5)]('HOOK\x20requires\x20alias/operation/node\x20options.');const _0x1ae7b3=_0x48ec2c[_0x93859f(0x100)]??_0x48ec2c[_0x93859f(0xef)];return join(_0x3bf244[_0x93859f(0x126)],'HOOK',_0x1ae7b3,_0x48ec2c[_0x93859f(0xe3)],_0x48ec2c[_0x93859f(0xe7)],_0x383136+_0x93859f(0x102));}return join(_0x3bf244[_0x93859f(0x126)],_0x42ce73,_0x383136+'.js');}export function generateTemplate(_0x45e9e8,_0x5978df,_0x2dc94e,_0x4ff00b,_0x4c5c43){const _0x303785=a31_0x251606,_0x17ae7a=_0x4ff00b?.[_0x303785(0xd7)]()||_0x303785(0xe2);if(_0x45e9e8===_0x303785(0xf1))return _0x303785(0xed)+_0x17ae7a+_0x303785(0xe1)+_0x5978df+_0x303785(0x121)+_0x5978df+_0x303785(0x119)+_0x5978df+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';if(_0x45e9e8==='ENDPOINT')return _0x303785(0xce)+_0x17ae7a+_0x303785(0x11c)+_0x2dc94e+'/'+_0x5978df+_0x303785(0xfb)+_0x5978df+_0x303785(0xf4);if(!_0x4c5c43)throw CliErrors[_0x303785(0xe5)](_0x303785(0xd9));return _0x303785(0x113)+_0x17ae7a+'\x0a\x20*\x20[接口路径]\x20POST\x20/api/'+_0x2dc94e+'/'+_0x4c5c43['datasetCode']+'/'+_0x4c5c43[_0x303785(0xe3)]+_0x303785(0xfa)+_0x4c5c43[_0x303785(0xe7)]+'\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'+_0x5978df+_0x303785(0xf4);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a32_0x329898=a32_0x1fac;function a32_0x1fac(_0x1f74d6,_0x2e0c97){_0x1f74d6=_0x1f74d6-0x1b2;const _0x46c0e7=a32_0x46c0();let _0x1facf2=_0x46c0e7[_0x1f74d6];return _0x1facf2;}(function(_0x4ff2da,_0x55e413){const _0x3e0e06=a32_0x1fac,_0x14b25c=_0x4ff2da();while(!![]){try{const _0x2821eb=parseInt(_0x3e0e06(0x1de))/0x1+-parseInt(_0x3e0e06(0x1d1))/0x2*(-parseInt(_0x3e0e06(0x1b6))/0x3)+parseInt(_0x3e0e06(0x1d6))/0x4*(-parseInt(_0x3e0e06(0x1bf))/0x5)+-parseInt(_0x3e0e06(0x1d0))/0x6*(-parseInt(_0x3e0e06(0x1d5))/0x7)+parseInt(_0x3e0e06(0x1e1))/0x8+-parseInt(_0x3e0e06(0x1df))/0x9+-parseInt(_0x3e0e06(0x1e0))/0xa;if(_0x2821eb===_0x55e413)break;else _0x14b25c['push'](_0x14b25c['shift']());}catch(_0xc40292){_0x14b25c['push'](_0x14b25c['shift']());}}}(a32_0x46c0,0x57536));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{deleteBffScript}from'../../core/api-client.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists,resolveLocalFilePathFromLockKey}from'../../core/bff/file-system.js';function a32_0x46c0(){const _0x5155ee=['string','find','POST','str','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','replace','48054iWfUpm','2bpgndl','Function\x20not\x20found:\x20','parse','trashedTo','217vFSRDZ','1356eKvbGu','lockFilePath','Multiple\x20functions\x20match\x20\x22','appCode','Would\x20delete\x20','lastSync','Local\x20delete\x20not\x20settled\x20for\x20','split','273514cyJrzG','3331881zcsQTB','11188050jMxSte','5432128zXMnDh','join','\x22\x20not\x20found\x20after\x20ensureLockScope.','No\x20lock\x20entry\x20found\x20for\x20\x22','\x20(local\x20file\x20moved\x20to\x20trash)','\x20\x20-\x20','BFF\x20lock\x20file\x20not\x20found.','length','1986489wpqpgp','includes','target','trashDir','validation','filter','toISOString','functions','startsWith','240aMJzOB','scriptsRoot','projectRoot','high-risk-write','apps','remoteId','delete','stringify','keys','Deleted\x20'];a32_0x46c0=function(){return _0x5155ee;};return a32_0x46c0();}import{ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';import{sleep}from'../../utils/sleep.js';export const bffDelete={'service':'bff','command':a32_0x329898(0x1c5),'description':'Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','risk':a32_0x329898(0x1c2),'flags':[{'name':a32_0x329898(0x1b8),'type':a32_0x329898(0x1c9),'required':!![],'description':a32_0x329898(0x1cd)}],async 'validate'(_0x502d7b){const _0x4ff142=a32_0x329898,_0x116d2f=loadBffProjectConfig(_0x502d7b[_0x4ff142(0x1d9)]),_0x312c6f=await readBffLockFile(_0x116d2f[_0x4ff142(0x1d7)]);if(!_0x312c6f)throw CliErrors[_0x4ff142(0x1ba)]('BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.');},async 'dryRun'(_0x3f0ce2){const _0x3b592e=a32_0x329898,_0x209753=loadBffProjectConfig(_0x3f0ce2['appCode']),_0x5d29dd=await readBffLockFile(_0x209753[_0x3b592e(0x1d7)]);if(!_0x5d29dd)throw CliErrors['validation'](_0x3b592e(0x1b4));const {appLock:_0xbaac26}=ensureLockScope(_0x5d29dd,_0x3f0ce2['appCode'],_0x209753[_0x3b592e(0x1c0)],'delete'),_0x2be274=_0x3f0ce2[_0x3b592e(0x1cc)](_0x3b592e(0x1b8)),_0x5924e4=Object['keys'](_0xbaac26['functions']),_0x18d975=resolveDeleteTarget(_0x2be274,_0x5924e4),_0x48c26d=_0xbaac26[_0x3b592e(0x1bd)][_0x18d975];if(!_0x48c26d)throw CliErrors[_0x3b592e(0x1ba)](_0x3b592e(0x1e4)+_0x18d975+'\x22.');const _0x7cceed=resolveLocalFilePathFromLockKey(_0x209753,_0x18d975),_0x63bd1d=relative(_0x209753[_0x3b592e(0x1c1)],_0x7cceed),_0x2acbaa=join(_0x209753[_0x3b592e(0x1b9)],'<timestamp>',_0x63bd1d);return{'method':_0x3b592e(0x1cb),'url':'/api/management/library/scripts/delete','body':{'appCode':_0x3f0ce2['appCode'],'target':_0x18d975,'remoteId':_0x48c26d['remoteId'],'localFilePath':_0x7cceed,'trashedPath':_0x2acbaa},'description':_0x3b592e(0x1da)+_0x18d975+_0x3b592e(0x1ce)};},async 'execute'(_0x31b36a){const _0x533295=a32_0x329898,_0x5024d8=loadBffProjectConfig(_0x31b36a[_0x533295(0x1d9)]),_0x39c87e=await readBffLockFile(_0x5024d8[_0x533295(0x1d7)]);if(!_0x39c87e)throw CliErrors['validation'](_0x533295(0x1b4));const {lockData:_0x5d36f5,appLock:_0x4faa61}=ensureLockScope(_0x39c87e,_0x31b36a['appCode'],_0x5024d8[_0x533295(0x1c0)],_0x533295(0x1c5)),_0x40fc11=JSON[_0x533295(0x1d3)](JSON[_0x533295(0x1c6)](_0x5d36f5)),_0x99242=_0x40fc11[_0x533295(0x1c3)][_0x31b36a[_0x533295(0x1d9)]];if(!_0x99242)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x31b36a[_0x533295(0x1d9)]+_0x533295(0x1e3));const _0x560f92=_0x31b36a[_0x533295(0x1cc)](_0x533295(0x1b8)),_0x119f4f=Object[_0x533295(0x1c7)](_0x99242[_0x533295(0x1bd)]),_0x4e4b8f=resolveDeleteTarget(_0x560f92,_0x119f4f),_0x1c5e35=_0x99242[_0x533295(0x1bd)][_0x4e4b8f];if(!_0x1c5e35)throw CliErrors[_0x533295(0x1ba)](_0x533295(0x1e4)+_0x4e4b8f+'\x22.');await deleteBffScript(_0x1c5e35[_0x533295(0x1c4)]),delete _0x99242[_0x533295(0x1bd)][_0x4e4b8f],_0x99242[_0x533295(0x1db)]=new Date()['toISOString'](),await writeBffLockFile(_0x5024d8[_0x533295(0x1d7)],_0x40fc11);const _0x4dd451=resolveLocalFilePathFromLockKey(_0x5024d8,_0x4e4b8f);let _0x5a54d1;await fileExists(_0x4dd451)&&(_0x5a54d1=await moveToTrash(_0x5024d8[_0x533295(0x1c1)],_0x5024d8[_0x533295(0x1b9)],_0x4dd451),await cleanupEmptyDirectories(dirname(_0x4dd451),_0x5024d8['scriptsRootDir']));await waitForDeleteSettlement(_0x5024d8['lockFilePath'],_0x31b36a[_0x533295(0x1d9)],_0x4e4b8f,_0x4dd451),await sleep(0x96);const _0x5c6fb8={'deleted':_0x4e4b8f,'remoteId':_0x1c5e35['remoteId']};if(_0x5a54d1)_0x5c6fb8[_0x533295(0x1d4)]=_0x5a54d1;return{'ok':!![],'data':_0x5c6fb8,'message':_0x533295(0x1c8)+_0x4e4b8f+(_0x5a54d1?_0x533295(0x1b2):'')};}};function resolveDeleteTarget(_0x5e9204,_0x509c24){const _0xa911be=a32_0x329898;if(_0x5e9204[_0xa911be(0x1b7)]('/')){const _0x2b375d=_0x509c24[_0xa911be(0x1ca)](_0x5d187b=>_0x5d187b===_0x5e9204);if(!_0x2b375d)throw CliErrors[_0xa911be(0x1ba)](_0xa911be(0x1d2)+_0x5e9204);return _0x2b375d;}const _0x429adb=_0x509c24[_0xa911be(0x1bb)](_0x548477=>_0x548477[_0xa911be(0x1dd)]('/')['at'](-0x1)===_0x5e9204);if(_0x429adb[_0xa911be(0x1b5)]===0x0)throw CliErrors[_0xa911be(0x1ba)](_0xa911be(0x1d2)+_0x5e9204);if(_0x429adb[_0xa911be(0x1b5)]>0x1)throw CliErrors[_0xa911be(0x1ba)](_0xa911be(0x1d8)+_0x5e9204+'\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a'+_0x429adb['map'](_0x1efaa0=>_0xa911be(0x1b3)+_0x1efaa0)[_0xa911be(0x1e2)]('\x0a'));return _0x429adb[0x0];}async function moveToTrash(_0x4cd333,_0x4137e7,_0x243ccb){const _0xf49057=a32_0x329898,_0x1b148e=new Date()[_0xf49057(0x1bc)]()[_0xf49057(0x1cf)](/[:.]/g,'-'),_0x31d4b7=relative(_0x4cd333,_0x243ccb),_0xb482f3=join(_0x4137e7,_0x1b148e,_0x31d4b7);return await mkdir(dirname(_0xb482f3),{'recursive':!![]}),await rename(_0x243ccb,_0xb482f3),_0xb482f3;}async function cleanupEmptyDirectories(_0x56970e,_0x19475d){const _0x104cf5=a32_0x329898;let _0x500495=resolve(_0x56970e);const _0x34c026=resolve(_0x19475d);while(_0x500495[_0x104cf5(0x1be)](''+_0x34c026+sep)||_0x500495===_0x34c026){if(_0x500495===_0x34c026)return;try{const _0xe7ed84=await readdir(_0x500495);if(_0xe7ed84[_0x104cf5(0x1b5)]>0x0)return;await rmdir(_0x500495);}catch{return;}_0x500495=dirname(_0x500495);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0x39724b,_0x1639f8,_0x11b4b0,_0x5d8250){const _0xbc75ff=a32_0x329898;for(let _0x10c2da=0x0;_0x10c2da<DELETE_SETTLE_RETRY_COUNT;_0x10c2da+=0x1){const _0x25e28f=await readBffLockFile(_0x39724b),_0x162cc0=!!_0x25e28f?.['apps']?.[_0x1639f8]?.[_0xbc75ff(0x1bd)]?.[_0x11b4b0],_0x35eb0a=await fileExists(_0x5d8250);if(!_0x162cc0&&!_0x35eb0a)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error(_0xbc75ff(0x1dc)+_0x11b4b0+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a33_0xebc31c=a33_0x51d6;function a33_0x51d6(_0x7ef5dd,_0x4a0516){_0x7ef5dd=_0x7ef5dd-0x1e2;const _0x4084ac=a33_0x4084();let _0x51d6f3=_0x4084ac[_0x7ef5dd];return _0x51d6f3;}function a33_0x4084(){const _0x2affa0=['bff','bool','description','(none)','12TBqmcX','1443454JVDgxd','2YNdcGP','read','158808tuXNZJ','360rHlHOA','Return\x20full\x20raw\x20script\x20object','scriptType','verbose','boolean','2082355OeputD','1111CelAiT','appCode','16718940IBofYt','84684cAycri','number','105qDdxpP','num','createdTime','updatedTime','32170IvYXsR','525957qVxUeD','Get\x20BFF\x20script\x20details\x20by\x20ID'];a33_0x4084=function(){return _0x2affa0;};return a33_0x4084();}(function(_0x31ab33,_0x29e02f){const _0x536e5f=a33_0x51d6,_0x5a9d91=_0x31ab33();while(!![]){try{const _0x2213f2=parseInt(_0x536e5f(0x1f6))/0x1+-parseInt(_0x536e5f(0x1f7))/0x2*(-parseInt(_0x536e5f(0x1ef))/0x3)+-parseInt(_0x536e5f(0x1f5))/0x4*(-parseInt(_0x536e5f(0x1e4))/0x5)+-parseInt(_0x536e5f(0x1e8))/0x6*(parseInt(_0x536e5f(0x1ea))/0x7)+-parseInt(_0x536e5f(0x1f9))/0x8*(parseInt(_0x536e5f(0x1fa))/0x9)+-parseInt(_0x536e5f(0x1ee))/0xa*(-parseInt(_0x536e5f(0x1e5))/0xb)+-parseInt(_0x536e5f(0x1e7))/0xc;if(_0x2213f2===_0x29e02f)break;else _0x5a9d91['push'](_0x5a9d91['shift']());}catch(_0x56303c){_0x5a9d91['push'](_0x5a9d91['shift']());}}}(a33_0x4084,0xc1dfc));import{getBffScriptInfo}from'../../core/api-client.js';export const bffDetail={'service':a33_0xebc31c(0x1f1),'command':'detail','description':a33_0xebc31c(0x1f0),'risk':a33_0xebc31c(0x1f8),'flags':[{'name':'id','type':a33_0xebc31c(0x1e9),'required':!![],'description':'Script\x20ID'},{'name':a33_0xebc31c(0x1e2),'type':a33_0xebc31c(0x1e3),'description':a33_0xebc31c(0x1fb)}],async 'execute'(_0x13a39f){const _0x434496=a33_0xebc31c,_0x501f54=await getBffScriptInfo(_0x13a39f[_0x434496(0x1eb)]('id')),_0x41fcbb=_0x13a39f[_0x434496(0x1f2)]('verbose');if(_0x41fcbb)return{'ok':!![],'data':_0x501f54};return{'ok':!![],'data':{'id':_0x501f54['id'],'appCode':_0x501f54[_0x434496(0x1e6)],'scriptType':_0x501f54[_0x434496(0x1fc)],'description':_0x501f54[_0x434496(0x1f3)]||_0x434496(0x1f4),'createdTime':_0x501f54[_0x434496(0x1ec)]??'','updatedTime':_0x501f54[_0x434496(0x1ed)]??'','scriptContent':_0x501f54['scriptContent']??''}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a34_0x4b70(_0x52c896,_0x2cd4dc){_0x52c896=_0x52c896-0x192;const _0x55119b=a34_0x5511();let _0x4b7093=_0x55119b[_0x52c896];return _0x4b7093;}(function(_0x32dbf1,_0x4656a6){const _0x40e732=a34_0x4b70,_0x4b7acd=_0x32dbf1();while(!![]){try{const _0xa76b13=parseInt(_0x40e732(0x199))/0x1+parseInt(_0x40e732(0x197))/0x2*(parseInt(_0x40e732(0x194))/0x3)+parseInt(_0x40e732(0x193))/0x4+parseInt(_0x40e732(0x19a))/0x5+parseInt(_0x40e732(0x196))/0x6+-parseInt(_0x40e732(0x192))/0x7*(-parseInt(_0x40e732(0x198))/0x8)+-parseInt(_0x40e732(0x195))/0x9;if(_0xa76b13===_0x4656a6)break;else _0x4b7acd['push'](_0x4b7acd['shift']());}catch(_0x2990e8){_0x4b7acd['push'](_0x4b7acd['shift']());}}}(a34_0x5511,0x4d7d4));import{bffList}from'../../commands/bff/list.js';import{bffDetail}from'../../commands/bff/detail.js';import{bffStatus}from'../../commands/bff/status.js';import{bffCreate}from'../../commands/bff/create.js';import{bffPush}from'../../commands/bff/push.js';function a34_0x5511(){const _0x49a83c=['130506dwxveK','2715830FnXmOe','7xWHruE','1537716QzDEDn','1035AWRvZc','10464138lKLhIW','1716540BYMBzi','126mSOeET','913216kcDSYy'];a34_0x5511=function(){return _0x49a83c;};return a34_0x5511();}import{bffPull}from'../../commands/bff/pull.js';import{bffDelete}from'../../commands/bff/delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];
|
package/lib/commands/bff/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a35_0x2378e=a35_0x5aee;(function(_0x206cdb,_0x3412c3){const _0x4568b1=a35_0x5aee,_0x2c13e0=_0x206cdb();while(!![]){try{const _0x3fea39=-parseInt(_0x4568b1(0x204))/0x1*(-parseInt(_0x4568b1(0x1f3))/0x2)+parseInt(_0x4568b1(0x1f9))/0x3*(-parseInt(_0x4568b1(0x1fe))/0x4)+-parseInt(_0x4568b1(0x1ef))/0x5+parseInt(_0x4568b1(0x1f8))/0x6*(-parseInt(_0x4568b1(0x1f2))/0x7)+-parseInt(_0x4568b1(0x1ff))/0x8+parseInt(_0x4568b1(0x206))/0x9*(parseInt(_0x4568b1(0x203))/0xa)+parseInt(_0x4568b1(0x1f6))/0xb;if(_0x3fea39===_0x3412c3)break;else _0x2c13e0['push'](_0x2c13e0['shift']());}catch(_0x28e7d9){_0x2c13e0['push'](_0x2c13e0['shift']());}}}(a35_0x1f0b,0x843f9));import{listBffScripts}from'../../core/api-client.js';function a35_0x5aee(_0x4b14f3,_0x8e6b7c){_0x4b14f3=_0x4b14f3-0x1ef;const _0x1f0bc1=a35_0x1f0b();let _0x5aeeb7=_0x1f0bc1[_0x4b14f3];return _0x5aeeb7;}function a35_0x1f0b(){const _0x1de8ae=['ENDPOINT','549YzPnzG','No\x20BFF\x20scripts\x20found.','scriptType','string','appCode','1379135xvnldp','verbose','name','1582xzuBKs','1860pQZjjD','bff','functionName','19464819VwlqsP','bool','12492fXNkIc','3UWZBWp','List\x20BFF\x20scripts','map','Script\x20type\x20filter','type','2610516FwGMXk','3187736Vpcfpu','str','description','read','91550hVAOnZ','12gMHmko'];a35_0x1f0b=function(){return _0x1de8ae;};return a35_0x1f0b();}export const bffList={'service':a35_0x2378e(0x1f4),'command':'list','description':a35_0x2378e(0x1fa),'risk':a35_0x2378e(0x202),'flags':[{'name':a35_0x2378e(0x1fd),'type':a35_0x2378e(0x209),'description':a35_0x2378e(0x1fc),'default':a35_0x2378e(0x205),'enum':['ENDPOINT','COMMON']},{'name':a35_0x2378e(0x1f1),'type':'string','description':'Filter\x20by\x20script\x20name'},{'name':a35_0x2378e(0x1f0),'type':'boolean','description':'Return\x20full\x20script\x20objects'}],async 'execute'(_0x3dd2b1){const _0x51f57d=a35_0x2378e,_0x340f51=await listBffScripts(_0x3dd2b1[_0x51f57d(0x20a)],_0x3dd2b1[_0x51f57d(0x200)](_0x51f57d(0x1fd)),{'scriptName':_0x3dd2b1[_0x51f57d(0x200)](_0x51f57d(0x1f1))||undefined}),_0x2de1a7=_0x3dd2b1[_0x51f57d(0x1f7)](_0x51f57d(0x1f0));return{'ok':!![],'data':_0x2de1a7?_0x340f51:_0x340f51[_0x51f57d(0x1fb)](_0x427c6c=>({'id':_0x427c6c['id'],'functionName':_0x427c6c[_0x51f57d(0x1f5)]??'','description':_0x427c6c[_0x51f57d(0x201)]||'(unnamed)','scriptType':_0x427c6c[_0x51f57d(0x208)]})),'message':_0x340f51['length']===0x0?_0x51f57d(0x207):undefined};}};
|