@lovrabet/rabetbase-cli 2.3.13 → 2.3.14-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -0
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -0
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/commands/app/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a20_0x46ec27=a20_0x28b8;(function(_0x367aea,_0x18bc2d){const _0x357715=a20_0x28b8,_0x4971ba=_0x367aea();while(!![]){try{const _0x168a18=parseInt(_0x357715(0x1b6))/0x1+parseInt(_0x357715(0x18f))/0x2*(parseInt(_0x357715(0x194))/0x3)+-parseInt(_0x357715(0x192))/0x4*(parseInt(_0x357715(0x1ba))/0x5)+-parseInt(_0x357715(0x197))/0x6+-parseInt(_0x357715(0x1b7))/0x7*(parseInt(_0x357715(0x1b0))/0x8)+-parseInt(_0x357715(0x1b5))/0x9*(-parseInt(_0x357715(0x1ae))/0xa)+parseInt(_0x357715(0x195))/0xb*(-parseInt(_0x357715(0x1a6))/0xc);if(_0x168a18===_0x18bc2d)break;else _0x4971ba['push'](_0x4971ba['shift']());}catch(_0x349e77){_0x4971ba['push'](_0x4971ba['shift']());}}}(a20_0x2626,0xc4aa2));import{readRawConfigWithLayers}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';function a20_0x2626(){const _0x6a4c5=['Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.','\x20in\x20','mergedCli','projectPath','boolean','merged','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','defaultApp','24fcPEdg','inherit','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','.\x20Use\x20`','global','map','project','List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','8077630xXvBmn','appcode','69712WluQGz','globalConfig','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','app','remote','9PwRVCy','1405251GCJelz','315WwsttO','projectConfig','validation','5YKhIIs','optional','\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','2FUGAVo','globalPath','object','3660476JGstym','\x20config','572133DuRmZs','907841xheqQm','read','755256WaRavC','isCurrent','push','apps','length','entries','bool'];a20_0x2626=function(){return _0x6a4c5;};return a20_0x2626();}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(_0x598c67,_0x415d04){const _0x2720fe=a20_0x28b8,_0x3559f6=[],_0x22337a=_0x598c67[_0x2720fe(0x19a)]&&typeof _0x598c67[_0x2720fe(0x19a)]==='object'?_0x598c67['apps']:{},_0x2cb817=_0x598c67[_0x2720fe(0x1a5)]||undefined;for(const [_0x3b0ce9,_0x1ab5a3]of Object[_0x2720fe(0x19c)](_0x22337a)){if(!_0x1ab5a3||typeof _0x1ab5a3!==_0x2720fe(0x191)||!_0x1ab5a3[_0x2720fe(0x1af)])continue;_0x3559f6[_0x2720fe(0x199)]({'name':_0x3b0ce9,'appcode':_0x1ab5a3[_0x2720fe(0x1af)],'named':!![],'definedIn':_0x415d04,'isDefault':_0x3b0ce9===_0x2cb817,...buildAppProfileListFields(_0x1ab5a3)});}return _0x3559f6;}function buildMergedItems(_0x19ad34,_0x24f3d1){const _0x43044c=a20_0x28b8,{apps:apps={},defaultApp:_0x4baf94}=_0x19ad34,_0x511dc3=_0x24f3d1[_0x43044c(0x1b1)][_0x43044c(0x19a)]&&typeof _0x24f3d1['globalConfig'][_0x43044c(0x19a)]===_0x43044c(0x191)?_0x24f3d1[_0x43044c(0x1b1)]['apps']:{},_0x18faf6=_0x24f3d1[_0x43044c(0x1b8)][_0x43044c(0x19a)]&&typeof _0x24f3d1[_0x43044c(0x1b8)][_0x43044c(0x19a)]===_0x43044c(0x191)?_0x24f3d1[_0x43044c(0x1b8)]['apps']:{},_0x5eba97=_0x24f3d1['projectConfig'][_0x43044c(0x1a7)]===![],_0x347385=Object[_0x43044c(0x19c)](apps),_0x50eac2=_0x347385[_0x43044c(0x1ab)](([_0x25a0fd,_0x18de29])=>({'name':_0x25a0fd,'appcode':_0x18de29[_0x43044c(0x1af)],'named':!![],'definedIn':appDefinedIn(_0x25a0fd,_0x511dc3,_0x18faf6,_0x5eba97),'isDefault':_0x25a0fd===_0x4baf94,...buildAppProfileListFields(_0x18de29)}));return _0x50eac2;}function validateAppListFlags(_0x38612a){const _0x598fd7=a20_0x28b8;if(!_0x38612a['bool']('remote'))return;if(!_0x38612a[_0x598fd7(0x19d)]('global')&&!_0x38612a[_0x598fd7(0x19d)](_0x598fd7(0x1ac)))return;throw CliErrors[_0x598fd7(0x1b9)](_0x598fd7(0x1a8),_0x598fd7(0x19e));}async function execute(_0xfd43d9){const _0x20815a=a20_0x28b8;validateAppListFlags(_0xfd43d9);if(_0xfd43d9[_0x20815a(0x19d)](_0x20815a(0x1b4)))return{'ok':!![],'data':await listRemoteAppDirectory(_0xfd43d9)};const _0x180158=_0xfd43d9['bool'](_0x20815a(0x1aa)),_0x28c163=_0xfd43d9[_0x20815a(0x19d)](_0x20815a(0x1ac)),_0x3a8cd0=_0x180158?_0x20815a(0x1aa):_0x28c163?_0x20815a(0x1ac):_0x20815a(0x1a3),{config:_0x1dac36,layers:_0x1656d5}=readRawConfigWithLayers(),_0x129258=resolveDefaultAppSource(_0x1656d5),{defaultApp:_0x40e10b}=_0x1dac36;let _0x41e925,_0x3dee31;switch(_0x3a8cd0){case _0x20815a(0x1aa):_0x41e925=buildItemsFromLayer(_0x1656d5[_0x20815a(0x1b1)],_0x20815a(0x1aa)),_0x3dee31=_0x1656d5[_0x20815a(0x190)];break;case'project':_0x41e925=buildItemsFromLayer(_0x1656d5[_0x20815a(0x1b8)],_0x20815a(0x1ac)),_0x3dee31=_0x1656d5[_0x20815a(0x1a1)];break;default:_0x41e925=buildMergedItems(_0x1dac36,_0x1656d5);break;}enrichAppListItemsWithMergedSelection(_0x41e925,_0xfd43d9[_0x20815a(0x1a0)]);if(_0x41e925[_0x20815a(0x19b)]===0x0){const _0x35067d=_0x3a8cd0===_0x20815a(0x1a3)?'':_0x20815a(0x19f)+_0x3a8cd0+_0x20815a(0x193);return{'ok':!![],'data':[],'message':'No\x20apps\x20configured'+_0x35067d+_0x20815a(0x1a9)+CLI_BIN_NAME+_0x20815a(0x18e)};}const _0x4efa68=_0x41e925['find'](_0x37333e=>_0x37333e[_0x20815a(0x198)]===!![]),_0x70c972=_0x40e10b??_0x4efa68?.[_0x20815a(0x1af)]??null,_0x4d6597=_0x3a8cd0==='merged'?{'globalPath':_0x1656d5['globalPath']??null,'projectPath':_0x1656d5[_0x20815a(0x1a1)]??null,'defaultApp':_0x70c972,'defaultAppSource':_0x40e10b!=null?_0x129258:null}:{'scope':_0x3a8cd0,'configPath':_0x3dee31??null};return{'ok':!![],'data':{'items':_0x41e925,'meta':_0x4d6597}};}function a20_0x28b8(_0x4ddbd5,_0xa1c293){_0x4ddbd5=_0x4ddbd5-0x18d;const _0x262680=a20_0x2626();let _0x28b838=_0x262680[_0x4ddbd5];return _0x28b838;}export const appListDefinition={'service':a20_0x46ec27(0x1b3),'command':'list','description':a20_0x46ec27(0x1ad),'risk':a20_0x46ec27(0x196),'auth':a20_0x46ec27(0x18d),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a20_0x46ec27(0x1b4),'type':a20_0x46ec27(0x1a2),'description':'List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','default':![]},{'name':a20_0x46ec27(0x1aa),'type':a20_0x46ec27(0x1a2),'description':a20_0x46ec27(0x1a4),'default':![]},{'name':a20_0x46ec27(0x1ac),'type':a20_0x46ec27(0x1a2),'description':a20_0x46ec27(0x1b2),'default':![]}],async 'validate'(_0x1b1953){validateAppListFlags(_0x1b1953);},'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1900e5,_0x36ba36){const _0x18b9b5=a21_0x253f,_0x276251=_0x1900e5();while(!![]){try{const _0x3a41c3=parseInt(_0x18b9b5(0xbe))/0x1+parseInt(_0x18b9b5(0xc0))/0x2*(parseInt(_0x18b9b5(0xb6))/0x3)+parseInt(_0x18b9b5(0xb5))/0x4*(-parseInt(_0x18b9b5(0xbf))/0x5)+parseInt(_0x18b9b5(0xbc))/0x6*(parseInt(_0x18b9b5(0xb4))/0x7)+-parseInt(_0x18b9b5(0xc1))/0x8*(-parseInt(_0x18b9b5(0xb8))/0x9)+-parseInt(_0x18b9b5(0xb1))/0xa+parseInt(_0x18b9b5(0xb9))/0xb*(-parseInt(_0x18b9b5(0xb3))/0xc);if(_0x3a41c3===_0x36ba36)break;else _0x276251['push'](_0x276251['shift']());}catch(_0xdb84b0){_0x276251['push'](_0x276251['shift']());}}}(a21_0x4aaa,0xa1fc0));import{listRemoteApps}from'../../core/api-client.js';import{getCookie}from'../../auth/get-cookie.js';import{CliErrors}from'../../errors.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';function resolveCookie(_0x39d7fd){const _0x42b045=a21_0x253f,_0x4f7fb9=_0x39d7fd[_0x42b045(0xb7)]||getCookie();if(!_0x4f7fb9)throw CliErrors[_0x42b045(0xb2)]();return _0x4f7fb9;}function a21_0x253f(_0x2c8af6,_0x4b95a6){_0x2c8af6=_0x2c8af6-0xb0;const _0x4aaae1=a21_0x4aaa();let _0x253f4f=_0x4aaae1[_0x2c8af6];return _0x253f4f;}function a21_0x4aaa(){const _0x3ec8c7=['38292rEARts','3AoCfUm','cookie','7224039KftyMo','3156065TIDqaC','appCode','map','12OSdmIO','appDesc','631596XjIxZh','270isztak','2458244wiNatE','8opBxGn','platform','appName','3913560FYHMqX','authRequired','84AgnDgj','3208807MIxJeJ'];a21_0x4aaa=function(){return _0x3ec8c7;};return a21_0x4aaa();}export async function listRemoteAppDirectory(_0x1f413b){const _0x1a786e=a21_0x253f,_0x3b82d7=await withActiveCookie(resolveCookie(_0x1f413b),()=>listRemoteApps());return{'items':_0x3b82d7[_0x1a786e(0xbb)](_0x3cde26=>({..._0x3cde26['id']!=null?{'id':_0x3cde26['id']}:{},'appCode':_0x3cde26[_0x1a786e(0xba)],'appName':_0x3cde26[_0x1a786e(0xb0)],..._0x3cde26['appDesc']!=null?{'appDesc':_0x3cde26[_0x1a786e(0xbd)]}:{}})),'meta':{'source':_0x1a786e(0xc2)}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a22_0x2d04fd=a22_0x3af8;(function(_0x6db189,_0xda50cd){const _0x118a51=a22_0x3af8,_0x3acd5c=_0x6db189();while(!![]){try{const _0x5de8fb=parseInt(_0x118a51(0x1c8))/0x1+-parseInt(_0x118a51(0x1c2))/0x2*(parseInt(_0x118a51(0x1ca))/0x3)+-parseInt(_0x118a51(0x1c9))/0x4*(-parseInt(_0x118a51(0x1c6))/0x5)+parseInt(_0x118a51(0x1d1))/0x6*(-parseInt(_0x118a51(0x1c5))/0x7)+parseInt(_0x118a51(0x1cf))/0x8+-parseInt(_0x118a51(0x1c3))/0x9*(parseInt(_0x118a51(0x1cd))/0xa)+parseInt(_0x118a51(0x1ce))/0xb;if(_0x5de8fb===_0xda50cd)break;else _0x3acd5c['push'](_0x3acd5c['shift']());}catch(_0x4d4f3c){_0x3acd5c['push'](_0x3acd5c['shift']());}}}(a22_0x1b00,0x23266));import{CLI_BIN_NAME}from'../../constant/cli.js';function a22_0x3af8(_0x1235b5,_0x3413b5){_0x1235b5=_0x1235b5-0x1c2;const _0x1b00ca=a22_0x1b00();let _0x3af80d=_0x1b00ca[_0x1235b5];return _0x3af80d;}import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';export const appRemoveDefinition={'service':a22_0x2d04fd(0x1d3),'command':a22_0x2d04fd(0x1cb),'description':a22_0x2d04fd(0x1c7),'risk':a22_0x2d04fd(0x1d0),'requiresAuth':![],'requiresAppCode':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a22_0x2d04fd(0x1d2),'since':a22_0x2d04fd(0x1d5)},'args':[{'name':a22_0x2d04fd(0x1c4),'description':a22_0x2d04fd(0x1d4),'required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x59c8af=>validateAppName(_0x59c8af,a22_0x2d04fd(0x1cc)),'execute':_0x2eda55=>runAppRemove(_0x2eda55,a22_0x2d04fd(0x1cc))};function a22_0x1b00(){const _0x36c7c6=['remove','app\x20remove','2290nshraU','2862596iRutvb','329976BUdCQp','high-risk-write','6kWCzUb','\x20workspace\x20remove','app','App\x20profile\x20name\x20to\x20remove','2026-07','45302yfioBw','6309dIFvRp','name','1569505ncCJNv','1510mPiuaG','Deprecated:\x20use\x20workspace\x20remove\x20to\x20remove\x20an\x20app\x20profile','35467OFAFct','3140iPmDZK','6JrANCt'];a22_0x1b00=function(){return _0x36c7c6;};return a22_0x1b00();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x40e1db,_0x36e765){const _0x5855f4=a23_0x27f7,_0x45f1e2=_0x40e1db();while(!![]){try{const _0x48882a=parseInt(_0x5855f4(0xe5))/0x1+parseInt(_0x5855f4(0xe7))/0x2+parseInt(_0x5855f4(0xdb))/0x3+-parseInt(_0x5855f4(0xf8))/0x4+-parseInt(_0x5855f4(0xe4))/0x5+parseInt(_0x5855f4(0xe0))/0x6*(parseInt(_0x5855f4(0xe6))/0x7)+-parseInt(_0x5855f4(0xf1))/0x8*(parseInt(_0x5855f4(0xf5))/0x9);if(_0x48882a===_0x36e765)break;else _0x45f1e2['push'](_0x45f1e2['shift']());}catch(_0x1fe892){_0x45f1e2['push'](_0x45f1e2['shift']());}}}(a23_0x4e52,0x82962));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';export function enrichAppListItemsWithMergedSelection(_0xf36f6b,_0x3926c1){const _0x5c98b1=a23_0x27f7;if(!_0x3926c1)return;const _0x4e5245=_0x3926c1[_0x5c98b1(0xe3)]&&typeof _0x3926c1[_0x5c98b1(0xe3)]===_0x5c98b1(0xde)?_0x3926c1[_0x5c98b1(0xe3)]:{},_0x23c1de=Object['keys'](_0x4e5245)[_0x5c98b1(0xec)]>0x0;for(const _0xc8d7c8 of _0xf36f6b){_0xc8d7c8['isCurrent']=![];}const _0x30b9a7=_0x3926c1['appCode']!=null?String(_0x3926c1[_0x5c98b1(0xee)])[_0x5c98b1(0xf0)]():'';if(_0x23c1de){const _0x17dc3e=_0x3926c1[_0x5c98b1(0xe2)]??_0x3926c1[_0x5c98b1(0xdc)];if(_0x17dc3e)for(const _0x3728cb of _0xf36f6b){_0x3728cb[_0x5c98b1(0xea)]===!![]&&_0x3728cb['name']===_0x17dc3e&&(_0x3728cb[_0x5c98b1(0xf2)]=!![]);}for(const _0x1803e2 of _0xf36f6b){if(_0x1803e2[_0x5c98b1(0xea)]!==![])continue;if(_0x3926c1['defaultApp'])continue;_0x30b9a7&&String(_0x1803e2['appcode']??'')[_0x5c98b1(0xf0)]()===_0x30b9a7&&(_0x1803e2[_0x5c98b1(0xf2)]=!![]);}return;}if(!_0x30b9a7)return;for(const _0x1667ce of _0xf36f6b){String(_0x1667ce[_0x5c98b1(0xf3)]??'')[_0x5c98b1(0xf0)]()===_0x30b9a7&&(_0x1667ce[_0x5c98b1(0xf2)]=!![]);}}function a23_0x4e52(){const _0x2deb7f=['projectConfig','length','project','appCode','\x20(global)','trim','8zGYFcs','isCurrent','appcode','global','10840707vuFSoS','prototype','inherit','926212nmGXNj','2592027wxVGbs','defaultApp','call','object','both','8952IwHdGG','hasOwnProperty','currentApp','apps','2127565NXalYm','387656YpqgUA','1204nIaaVD','1776364YgzHbF','keys','globalConfig','named'];a23_0x4e52=function(){return _0x2deb7f;};return a23_0x4e52();}function a23_0x27f7(_0x3e5b2a,_0x10d55a){_0x3e5b2a=_0x3e5b2a-0xdb;const _0x4e5295=a23_0x4e52();let _0x27f7a1=_0x4e5295[_0x3e5b2a];return _0x27f7a1;}export function resolveAppScopeForWrite(_0x886c36,_0x125b14,_0x358135){const _0x2f2fb9=a23_0x27f7;if(_0x125b14)return _0x2f2fb9(0xf4);const _0x149d26=_0x358135[_0x2f2fb9(0xeb)]['apps']&&typeof _0x358135[_0x2f2fb9(0xeb)][_0x2f2fb9(0xe3)]==='object'?_0x358135[_0x2f2fb9(0xeb)][_0x2f2fb9(0xe3)]:{},_0x1b1e78=_0x358135[_0x2f2fb9(0xe9)]['apps']&&typeof _0x358135[_0x2f2fb9(0xe9)]['apps']===_0x2f2fb9(0xde)?_0x358135[_0x2f2fb9(0xe9)]['apps']:{};if(Object[_0x2f2fb9(0xf6)]['hasOwnProperty'][_0x2f2fb9(0xdd)](_0x149d26,_0x886c36))return _0x2f2fb9(0xed);if(Object[_0x2f2fb9(0xf6)][_0x2f2fb9(0xe1)]['call'](_0x1b1e78,_0x886c36))return'global';return'project';}export function appDefinedIn(_0x147b8b,_0x27d057,_0x1db9d5,_0x9526d9){const _0x24b399=a23_0x27f7;if(_0x9526d9)return Object[_0x24b399(0xf6)][_0x24b399(0xe1)][_0x24b399(0xdd)](_0x1db9d5,_0x147b8b)?'project':_0x24b399(0xf4);const _0x9e4b86=Object[_0x24b399(0xf6)]['hasOwnProperty'][_0x24b399(0xdd)](_0x27d057,_0x147b8b),_0x2f00f8=Object['prototype'][_0x24b399(0xe1)][_0x24b399(0xdd)](_0x1db9d5,_0x147b8b);if(_0x9e4b86&&_0x2f00f8)return _0x24b399(0xdf);if(_0x2f00f8)return _0x24b399(0xed);return'global';}export function resolveDefaultAppSource(_0xb7b980){const _0x319617=a23_0x27f7,_0x1e05fe=_0xb7b980[_0x319617(0xeb)][_0x319617(0xe3)]&&typeof _0xb7b980[_0x319617(0xeb)]['apps']===_0x319617(0xde)?_0xb7b980[_0x319617(0xeb)]['apps']:{};if(_0x319617(0xdc)in _0xb7b980[_0x319617(0xeb)])return _0x319617(0xed);if(Object[_0x319617(0xe8)](_0x1e05fe)[_0x319617(0xec)]>0x0)return _0x319617(0xed);if(_0xb7b980[_0x319617(0xeb)][_0x319617(0xf7)]===![])return null;if(_0xb7b980[_0x319617(0xe9)][_0x319617(0xdc)])return'global';return null;}export function getConfigPath(_0x591701={}){const _0x49d41e=a23_0x27f7,_0x153204=_0x591701[_0x49d41e(0xf4)]?_0x49d41e(0xf4):'project';return resolveWriteConfigPath(_0x153204);}export function readConfig(_0x2b1559={}){return readConfigFile(getConfigPath(_0x2b1559));}export function writeConfig(_0x41b178,_0x13a01b={}){writeConfigFile(getConfigPath(_0x13a01b),_0x41b178);}export function scopeLabel(_0xb12d58){const _0x3b670e=a23_0x27f7;return _0xb12d58[_0x3b670e(0xf4)]?_0x3b670e(0xef):'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a24_0x2e69(_0x48e260,_0x1f680f){_0x48e260=_0x48e260-0x171;const _0x1eb39a=a24_0x1eb3();let _0x2e694d=_0x1eb39a[_0x48e260];return _0x2e694d;}const a24_0x5906fd=a24_0x2e69;(function(_0x13fc80,_0x15a505){const _0x255c4c=a24_0x2e69,_0x3204ad=_0x13fc80();while(!![]){try{const _0x49170b=parseInt(_0x255c4c(0x187))/0x1*(-parseInt(_0x255c4c(0x174))/0x2)+-parseInt(_0x255c4c(0x17b))/0x3+parseInt(_0x255c4c(0x182))/0x4+-parseInt(_0x255c4c(0x177))/0x5+parseInt(_0x255c4c(0x179))/0x6+-parseInt(_0x255c4c(0x173))/0x7+parseInt(_0x255c4c(0x188))/0x8*(parseInt(_0x255c4c(0x171))/0x9);if(_0x49170b===_0x15a505)break;else _0x3204ad['push'](_0x3204ad['shift']());}catch(_0x48b4a7){_0x3204ad['push'](_0x3204ad['shift']());}}}(a24_0x1eb3,0xd2322));import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a24_0x1eb3(){const _0x4625b9=['4917087BoAsuj','Deleted\x20app\x20config\x20','appCode:\x20','App\x20config\x20key\x20not\x20found:\x20','appCode','App\x20config\x20server\x20id\x20missing\x20for\x20key=','isFinite','1797192jSQMwv','Delete\x20one\x20runtime\x20app-config\x20key','app-config','high-risk-write','/smartapi/app-config/delete','9924zJhXGi','16648wAZfrs','validation','16452YjZwXk','POST','9456951uqLbLm','104rFFqqX','delete','get','2464855HBRCfu','apiError','3639822UnYHXU','number'];a24_0x1eb3=function(){return _0x4625b9;};return a24_0x1eb3();}import{asAppConfigDryRunResult,buildMutationData,KEY_ARG,projectAppConfig,readKeyArg,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const DELETE_PATH=a24_0x5906fd(0x186);export const appConfigDelete={'service':a24_0x5906fd(0x184),'command':a24_0x5906fd(0x175),'description':a24_0x5906fd(0x183),'risk':a24_0x5906fd(0x185),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3a0b1c){readKeyArg(_0x3a0b1c);},async 'dryRun'(_0x1f82f0){const _0x2614fb=a24_0x5906fd,_0x2e80f0=readKeyArg(_0x1f82f0),_0x4c0747=await mustGetByKey(_0x1f82f0['appCode'],_0x2e80f0);return asAppConfigDryRunResult(buildMutationData({'operation':_0x2614fb(0x175),'appCode':_0x1f82f0[_0x2614fb(0x17f)],'key':_0x2e80f0,'before':projectAppConfig(_0x4c0747),'after':null,'dryRun':!![]}),{'method':_0x2614fb(0x172),'url':DELETE_PATH});},async 'execute'(_0x1f4343){const _0x37ff02=a24_0x5906fd,_0x3cf404=readKeyArg(_0x1f4343),_0x4ec6c7=await mustGetByKey(_0x1f4343[_0x37ff02(0x17f)],_0x3cf404);return await withAppConfigApiBoundary('delete',{'appCode':_0x1f4343[_0x37ff02(0x17f)],'key':_0x3cf404},()=>deleteAppConfig({'appCode':_0x1f4343['appCode'],'id':requireAppConfigId(_0x4ec6c7,_0x3cf404,_0x1f4343[_0x37ff02(0x17f)])})),{'ok':!![],'data':buildMutationData({'operation':_0x37ff02(0x175),'appCode':_0x1f4343[_0x37ff02(0x17f)],'key':_0x3cf404,'before':projectAppConfig(_0x4ec6c7),'after':null,'dryRun':![]}),'message':_0x37ff02(0x17c)+_0x3cf404};}};async function mustGetByKey(_0x14b09d,_0x351893){const _0x4a3dfa=a24_0x5906fd,_0x4c505f=await withAppConfigApiBoundary(_0x4a3dfa(0x176),{'appCode':_0x14b09d,'key':_0x351893},()=>getAppConfigByKey(_0x14b09d,_0x351893));if(!_0x4c505f)throw CliErrors[_0x4a3dfa(0x189)](_0x4a3dfa(0x17e)+_0x351893,_0x4a3dfa(0x17d)+_0x14b09d);return _0x4c505f;}function requireAppConfigId(_0x250155,_0x1a4105,_0x454e55){const _0x5e5904=a24_0x5906fd;if(typeof _0x250155['id']===_0x5e5904(0x17a)&&Number[_0x5e5904(0x181)](_0x250155['id'])&&_0x250155['id']>0x0)return _0x250155['id'];throw CliErrors[_0x5e5904(0x178)](_0x5e5904(0x180)+_0x1a4105+',\x20appCode='+_0x454e55);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a25_0x5be71b=a25_0x4930;(function(_0x2502f3,_0x2119c8){const _0x10c1d9=a25_0x4930,_0x77eff6=_0x2502f3();while(!![]){try{const _0x4b137f=parseInt(_0x10c1d9(0x104))/0x1+parseInt(_0x10c1d9(0xf4))/0x2*(-parseInt(_0x10c1d9(0xf8))/0x3)+parseInt(_0x10c1d9(0xf7))/0x4+-parseInt(_0x10c1d9(0x107))/0x5*(parseInt(_0x10c1d9(0xf9))/0x6)+-parseInt(_0x10c1d9(0x100))/0x7*(parseInt(_0x10c1d9(0x103))/0x8)+-parseInt(_0x10c1d9(0xfd))/0x9*(parseInt(_0x10c1d9(0x105))/0xa)+-parseInt(_0x10c1d9(0xef))/0xb*(-parseInt(_0x10c1d9(0xfb))/0xc);if(_0x4b137f===_0x2119c8)break;else _0x77eff6['push'](_0x77eff6['shift']());}catch(_0x1adce1){_0x77eff6['push'](_0x77eff6['shift']());}}}(a25_0x63d4,0x9ce54));function a25_0x4930(_0x257631,_0x298abe){_0x257631=_0x257631-0xef;const _0x63d4d6=a25_0x63d4();let _0x4930ca=_0x63d4d6[_0x257631];return _0x4930ca;}function a25_0x63d4(){const _0x11e750=['30ArVczk','get','2062965aJuaVu','33ySHNFP','appCode:\x20','App\x20config\x20key\x20not\x20found:\x20','validation','appCode','586934AeDhjH','\x20with\x20value\x20revealed','reveal','2961828KHnYrr','12oFZOoK','6DcOyEo','bool','9307524ZgEuve','Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','2495475OGipqW','read','app-config','14lcevOD','Loaded\x20app\x20config\x20','\x20with\x20value\x20redacted','1593912JdktZP','392070CqmUaj'];a25_0x63d4=function(){return _0x11e750;};return a25_0x63d4();}import{getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{KEY_ARG,projectAppConfig,readKeyArg,REVEAL_FLAG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigGet={'service':a25_0x5be71b(0xff),'command':a25_0x5be71b(0x106),'description':a25_0x5be71b(0xfc),'risk':a25_0x5be71b(0xfe),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x4b0e02){readKeyArg(_0x4b0e02);},async 'execute'(_0x5d97c1){const _0x32d01e=a25_0x5be71b,_0xf9c03b=readKeyArg(_0x5d97c1),_0x2310f6=await withAppConfigApiBoundary(_0x32d01e(0x106),{'appCode':_0x5d97c1[_0x32d01e(0xf3)],'key':_0xf9c03b},()=>getAppConfigByKey(_0x5d97c1[_0x32d01e(0xf3)],_0xf9c03b));if(!_0x2310f6)throw CliErrors[_0x32d01e(0xf2)](_0x32d01e(0xf1)+_0xf9c03b,_0x32d01e(0xf0)+_0x5d97c1['appCode']);const _0x1fc4e4=projectAppConfig(_0x2310f6,{'reveal':_0x5d97c1['bool'](_0x32d01e(0xf6))});return{'ok':!![],'data':{'config':_0x1fc4e4},'message':_0x5d97c1[_0x32d01e(0xfa)](_0x32d01e(0xf6))?_0x32d01e(0x101)+_0xf9c03b+_0x32d01e(0xf5):_0x32d01e(0x101)+_0xf9c03b+_0x32d01e(0x102)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a26_0x5428(_0x2f3813,_0x305bcf){_0x2f3813=_0x2f3813-0xb7;const _0x940a3d=a26_0x940a();let _0x542815=_0x940a3d[_0x2f3813];return _0x542815;}(function(_0x584ad1,_0x3f98b8){const _0x140747=a26_0x5428,_0x31452d=_0x584ad1();while(!![]){try{const _0x50cbdd=-parseInt(_0x140747(0xbc))/0x1*(parseInt(_0x140747(0xbd))/0x2)+-parseInt(_0x140747(0xc0))/0x3+-parseInt(_0x140747(0xba))/0x4+-parseInt(_0x140747(0xb8))/0x5+-parseInt(_0x140747(0xbb))/0x6+parseInt(_0x140747(0xb9))/0x7*(parseInt(_0x140747(0xbe))/0x8)+-parseInt(_0x140747(0xbf))/0x9*(-parseInt(_0x140747(0xb7))/0xa);if(_0x50cbdd===_0x3f98b8)break;else _0x31452d['push'](_0x31452d['shift']());}catch(_0x1cf2c4){_0x31452d['push'](_0x31452d['shift']());}}}(a26_0x940a,0xbe011));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_0x940a(){const _0x549742=['1313388mAnkAf','87043IUBmhX','6eYpQcs','3768geMREK','18CzZcRQ','1862949DCktrm','18792640MYxOvx','7484710RskgGa','3556aMitAy','2486348kPuHFL'];a26_0x940a=function(){return _0x549742;};return a26_0x940a();}import{appConfigDelete}from'../../commands/app-config/delete.js';export const appConfigDefinitions=[appConfigList,appConfigGet,appConfigSet,appConfigDelete];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a27_0x41c7(_0x80ce89,_0x4a72c9){_0x80ce89=_0x80ce89-0x1ce;const _0x42c7cf=a27_0x42c7();let _0x41c732=_0x42c7cf[_0x80ce89];return _0x41c732;}const a27_0x3de349=a27_0x41c7;(function(_0x33471a,_0x5dae51){const _0xaa3afe=a27_0x41c7,_0x4d5ab8=_0x33471a();while(!![]){try{const _0x453a91=-parseInt(_0xaa3afe(0x1d9))/0x1*(parseInt(_0xaa3afe(0x1e4))/0x2)+-parseInt(_0xaa3afe(0x1e2))/0x3*(-parseInt(_0xaa3afe(0x1de))/0x4)+parseInt(_0xaa3afe(0x1d6))/0x5*(parseInt(_0xaa3afe(0x1e3))/0x6)+-parseInt(_0xaa3afe(0x1d4))/0x7+parseInt(_0xaa3afe(0x1d2))/0x8+parseInt(_0xaa3afe(0x1d3))/0x9*(parseInt(_0xaa3afe(0x1d7))/0xa)+-parseInt(_0xaa3afe(0x1d8))/0xb*(parseInt(_0xaa3afe(0x1d1))/0xc);if(_0x453a91===_0x5dae51)break;else _0x4d5ab8['push'](_0x4d5ab8['shift']());}catch(_0x32076e){_0x4d5ab8['push'](_0x4d5ab8['shift']());}}}(a27_0x42c7,0x80132));import{listAppConfigs}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a27_0x42c7(){const _0x3f9921=['2598UkZIFc','6kGVAbu','2057558jAzpWy','list','app-config','Filter\x20by\x20exact\x20config\x20key','108960VYvkQx','3690816gITTaz','36AYiIsM','442631bdeUGs','\x20app\x20config(s)','3431950DlCOwx','1235440RnpfMx','1298hLKgDX','1SKQFQa','List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','str','appCode','Found\x20','4832QISwyi','trim','key','string'];a27_0x42c7=function(){return _0x3f9921;};return a27_0x42c7();}import{projectAppConfig,readOptionalTags,TAGS_FLAG,validateKey,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigList={'service':a27_0x3de349(0x1cf),'command':a27_0x3de349(0x1ce),'description':a27_0x3de349(0x1da),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a27_0x3de349(0x1e0),'type':a27_0x3de349(0x1e1),'description':a27_0x3de349(0x1d0)},TAGS_FLAG],async 'validate'(_0x3f395c){const _0x3c7a2a=a27_0x3de349,_0x33d61c=_0x3f395c[_0x3c7a2a(0x1db)](_0x3c7a2a(0x1e0))[_0x3c7a2a(0x1df)]();if(_0x33d61c)validateKey(_0x33d61c);readOptionalTags(_0x3f395c);},async 'execute'(_0x356e01){const _0xde8a3c=a27_0x3de349,_0x452088=_0x356e01['str'](_0xde8a3c(0x1e0))['trim']()||undefined,_0x2a63b3=readOptionalTags(_0x356e01),_0x4f7bcb=await withAppConfigApiBoundary(_0xde8a3c(0x1ce),{'appCode':_0x356e01[_0xde8a3c(0x1dc)]},()=>listAppConfigs(_0x356e01[_0xde8a3c(0x1dc)],{'key':_0x452088,'tags':_0x2a63b3})),_0x1b1b65=_0x4f7bcb['map'](_0x25b1d0=>projectAppConfig(_0x25b1d0));return{'ok':!![],'data':{'appCode':_0x356e01['appCode'],'count':_0x1b1b65['length'],'configs':_0x1b1b65},'message':_0xde8a3c(0x1dd)+_0x1b1b65['length']+_0xde8a3c(0x1d5)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a28_0x6edc(_0x5602e3,_0x79a086){_0x5602e3=_0x5602e3-0x1d6;const _0x365ce6=a28_0x365c();let _0x6edccb=_0x365ce6[_0x5602e3];return _0x6edccb;}const a28_0x39a710=a28_0x6edc;(function(_0x1a5eba,_0x38c115){const _0x527efd=a28_0x6edc,_0x4af47a=_0x1a5eba();while(!![]){try{const _0x414204=-parseInt(_0x527efd(0x1f3))/0x1+-parseInt(_0x527efd(0x1f0))/0x2+-parseInt(_0x527efd(0x1f2))/0x3*(-parseInt(_0x527efd(0x1e9))/0x4)+parseInt(_0x527efd(0x1e0))/0x5+-parseInt(_0x527efd(0x1eb))/0x6+parseInt(_0x527efd(0x1f5))/0x7*(parseInt(_0x527efd(0x1f4))/0x8)+-parseInt(_0x527efd(0x1d8))/0x9*(-parseInt(_0x527efd(0x1dd))/0xa);if(_0x414204===_0x38c115)break;else _0x4af47a['push'](_0x4af47a['shift']());}catch(_0x1812bb){_0x4af47a['push'](_0x4af47a['shift']());}}}(a28_0x365c,0x91fbf));import{createAppConfig,getAppConfigByKey,updateAppConfig}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assertSingleValueSource,assertValueSourceReadable,asAppConfigDryRunResult,buildMutationData,FROM_ENV_FLAG,KEY_ARG,plannedAppConfig,projectAppConfig,readAppConfigValue,readKeyArg,readOptionalTags,STDIN_FLAG,TAGS_FLAG,VALUE_ARG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const CREATE_PATH=a28_0x39a710(0x1ef),UPDATE_PATH='/smartapi/app-config/update';export const appConfigSet={'service':a28_0x39a710(0x1ec),'command':a28_0x39a710(0x1e1),'description':a28_0x39a710(0x1ea),'risk':a28_0x39a710(0x1e8),'args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':a28_0x39a710(0x1d6),'type':a28_0x39a710(0x1da),'description':a28_0x39a710(0x1ee)}],async 'validate'(_0x41f8ac){readKeyArg(_0x41f8ac),readOptionalTags(_0x41f8ac),assertSingleValueSource(_0x41f8ac);},async 'dryRun'(_0x1859dc){const _0x2278f4=a28_0x39a710,_0x26b183=readKeyArg(_0x1859dc),_0x31af38=readOptionalTags(_0x1859dc),_0x5b7404=assertSingleValueSource(_0x1859dc);await assertValueSourceReadable(_0x5b7404);const _0x10d827=await withAppConfigApiBoundary('get',{'appCode':_0x1859dc[_0x2278f4(0x1e6)],'key':_0x26b183},()=>getAppConfigByKey(_0x1859dc['appCode'],_0x26b183)),_0x3b081a=_0x10d827?_0x2278f4(0x1ed):_0x2278f4(0x1db),_0x1be2c5=_0x10d827?projectAppConfig(_0x10d827):null,_0x38319d=plannedAppConfig({'appCode':_0x1859dc[_0x2278f4(0x1e6)],'key':_0x26b183,'tags':_0x31af38??_0x10d827?.[_0x2278f4(0x1e2)],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x3b081a,'appCode':_0x1859dc['appCode'],'key':_0x26b183,'before':_0x1be2c5,'after':_0x38319d,'dryRun':!![]}),{'method':_0x2278f4(0x1d7),'url':_0x3b081a===_0x2278f4(0x1ed)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x22615d){const _0x1c4eba=a28_0x39a710,_0xfc2475=readKeyArg(_0x22615d),_0x47e1db=readOptionalTags(_0x22615d),_0x349a4b=await withAppConfigApiBoundary(_0x1c4eba(0x1de),{'appCode':_0x22615d[_0x1c4eba(0x1e6)],'key':_0xfc2475},()=>getAppConfigByKey(_0x22615d[_0x1c4eba(0x1e6)],_0xfc2475)),_0x1c1f8b=_0x349a4b?projectAppConfig(_0x349a4b):null,_0xf898dd=_0x349a4b?_0x1c4eba(0x1ed):_0x1c4eba(0x1db),{value:_0x3e2116,warnings:_0x503389}=await readAppConfigValue(_0x22615d),_0x21aa62={'appCode':_0x22615d[_0x1c4eba(0x1e6)],'key':_0xfc2475,'value':_0x3e2116,'tags':_0x47e1db??_0x349a4b?.[_0x1c4eba(0x1e2)]??undefined};await withAppConfigApiBoundary(_0xf898dd,{'appCode':_0x22615d[_0x1c4eba(0x1e6)],'key':_0xfc2475},async()=>{const _0x38c058=_0x1c4eba;_0x349a4b?await updateAppConfig({..._0x21aa62,'id':requireAppConfigId(_0x349a4b,_0xfc2475,_0x22615d[_0x38c058(0x1e6)])}):await createAppConfig(_0x21aa62);});const _0x179d14=await withAppConfigApiBoundary('get',{'appCode':_0x22615d[_0x1c4eba(0x1e6)],'key':_0xfc2475},()=>getAppConfigByKey(_0x22615d[_0x1c4eba(0x1e6)],_0xfc2475)),_0x47e16c=_0x179d14?projectAppConfig(_0x179d14):plannedAppConfig({'appCode':_0x22615d[_0x1c4eba(0x1e6)],'key':_0xfc2475,'tags':_0x21aa62['tags'],'hasValue':_0x3e2116!==''});return{'ok':!![],'data':buildMutationData({'operation':_0xf898dd,'appCode':_0x22615d[_0x1c4eba(0x1e6)],'key':_0xfc2475,'before':_0x1c1f8b,'after':_0x47e16c,'dryRun':![],'warnings':_0x503389}),'message':(_0xf898dd===_0x1c4eba(0x1ed)?_0x1c4eba(0x1e7):_0x1c4eba(0x1df))+_0x1c4eba(0x1e4)+_0xfc2475};}};function a28_0x365c(){const _0x1b52fd=[',\x20appCode=','appCode','Updated','high-risk-write','7272hhCLLt','Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','2026968DopqiY','app-config','update','Read\x20config\x20value\x20from\x20file','/smartapi/app-config/create','1093440NrZgFN','App\x20config\x20server\x20id\x20missing\x20for\x20key=','1014VsPlwg','849102rtaiEG','5296bDVNZJ','2989tXbbHz','file','POST','90iEuMzx','number','string','create','apiError','617330zcwSaM','get','Created','4085565gArCOx','set','tags','isFinite','\x20app\x20config\x20'];a28_0x365c=function(){return _0x1b52fd;};return a28_0x365c();}function requireAppConfigId(_0x537284,_0x3f145e,_0x4b4a8e){const _0x6673ad=a28_0x39a710;if(typeof _0x537284['id']===_0x6673ad(0x1d9)&&Number[_0x6673ad(0x1e3)](_0x537284['id'])&&_0x537284['id']>0x0)return _0x537284['id'];throw CliErrors[_0x6673ad(0x1dc)](_0x6673ad(0x1f1)+_0x3f145e+_0x6673ad(0x1e5)+_0x4b4a8e);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a29_0x2f3bb4=a29_0x565a;(function(_0x2b1bcb,_0x24880f){const _0x4463a8=a29_0x565a,_0x5de5aa=_0x2b1bcb();while(!![]){try{const _0x15ce26=parseInt(_0x4463a8(0xf1))/0x1*(-parseInt(_0x4463a8(0x102))/0x2)+-parseInt(_0x4463a8(0x113))/0x3*(parseInt(_0x4463a8(0xf5))/0x4)+-parseInt(_0x4463a8(0x125))/0x5*(-parseInt(_0x4463a8(0x128))/0x6)+-parseInt(_0x4463a8(0x10e))/0x7*(parseInt(_0x4463a8(0xf2))/0x8)+parseInt(_0x4463a8(0x107))/0x9*(-parseInt(_0x4463a8(0x123))/0xa)+-parseInt(_0x4463a8(0xf4))/0xb+parseInt(_0x4463a8(0x110))/0xc*(parseInt(_0x4463a8(0x106))/0xd);if(_0x15ce26===_0x24880f)break;else _0x5de5aa['push'](_0x5de5aa['shift']());}catch(_0x54eb26){_0x5de5aa['push'](_0x5de5aa['shift']());}}}(a29_0x893f,0x2dbe1));import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':a29_0x2f3bb4(0x101),'description':a29_0x2f3bb4(0x11d),'required':!![]};export const VALUE_ARG={'name':a29_0x2f3bb4(0x11b),'description':a29_0x2f3bb4(0x12a),'required':![]};export const TAGS_FLAG={'name':'tags','type':'string','description':a29_0x2f3bb4(0x100)};function a29_0x893f(){const _0xcff5a7=['valueRedacted','\x20app\x20config.','path','Missing\x20app-config\x20value\x20source.','value\x20is\x20redacted','value','Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable','Runtime\x20app-config\x20key','hasValue','tags','Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','args','reveal','56460yMGJZo','stdin','20EblicW','utf8','dryRun','500748tmDIJl','App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.','Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','operation','after','boolean','Value\x20file\x20is\x20not\x20readable:\x20','method','name','trim','once','env','warnings','push','1bYDbIV','4992xqRsvC','appCode','3317281xuoLDv','179616yJQhCP','Environment\x20variable\x20is\x20not\x20set:\x20','Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','file','url','appCode:\x20','string','Failed\x20to\x20','flag','gmtCreate','Missing\x20app-config\x20key.','Config\x20tags\x20for\x20filtering/display\x20metadata','key','413022WJvFoj','kind','from-env','gmtModified','15353LCIieY','126kTbxSP','before','str','validation','argument','key:\x20','end','952lzWtsp','length','5796EvgpoV','apiError','defineProperties','3tdnqar','App\x20config\x20value\x20source\x20is\x20ambiguous.','App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.'];a29_0x893f=function(){return _0xcff5a7;};return a29_0x893f();}export const STDIN_FLAG={'name':a29_0x2f3bb4(0x124),'type':a29_0x2f3bb4(0x12d),'description':'Read\x20config\x20value\x20from\x20stdin','default':![]};export const FROM_ENV_FLAG={'name':a29_0x2f3bb4(0x104),'type':a29_0x2f3bb4(0xfb),'description':a29_0x2f3bb4(0x11c)};export const REVEAL_FLAG={'name':a29_0x2f3bb4(0x122),'type':a29_0x2f3bb4(0x12d),'description':'Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','default':![]};export function readKeyArg(_0x319bb7){const _0x212055=a29_0x2f3bb4,_0x3a1f86=_0x319bb7[_0x212055(0x121)][0x0]?.[_0x212055(0x131)]()??'';return validateKey(_0x3a1f86),_0x3a1f86;}export function readOptionalTags(_0x3056f4){const _0xd44155=a29_0x2f3bb4,_0x3e79b5=_0x3056f4[_0xd44155(0x109)](_0xd44155(0x11f))[_0xd44155(0x131)]();if(!_0x3e79b5)return undefined;if(_0x3e79b5['length']>0x20)throw CliErrors['validation'](_0xd44155(0x129));return _0x3e79b5;}export function validateKey(_0x41a5c1){const _0x59004f=a29_0x2f3bb4;if(!_0x41a5c1)throw CliErrors[_0x59004f(0x10a)](_0x59004f(0xff));if(_0x41a5c1[_0x59004f(0x10f)]>0x100)throw CliErrors[_0x59004f(0x10a)](_0x59004f(0x115));}export function projectAppConfig(_0x5c6b94,_0x596df0){const _0x171bff=a29_0x2f3bb4,_0x169af4=_0x5c6b94[_0x171bff(0x11b)]!==undefined&&_0x5c6b94[_0x171bff(0x11b)]!==null&&_0x5c6b94[_0x171bff(0x11b)]!=='',_0x1b0764={'appCode':_0x5c6b94[_0x171bff(0xf3)],'key':_0x5c6b94[_0x171bff(0x101)],'tags':_0x5c6b94[_0x171bff(0x11f)]??undefined,'hasValue':_0x169af4,'valueRedacted':_0x169af4&&!_0x596df0?.[_0x171bff(0x122)],'gmtCreate':_0x5c6b94[_0x171bff(0xfe)],'gmtModified':_0x5c6b94[_0x171bff(0x105)]};return _0x596df0?.[_0x171bff(0x122)]&&(_0x1b0764[_0x171bff(0x11b)]=_0x5c6b94['value']??'',_0x1b0764[_0x171bff(0x116)]=![]),_0x1b0764;}export function plannedAppConfig(_0x1eec1f){const _0xac6b99=a29_0x2f3bb4,_0x46d731=_0x1eec1f[_0xac6b99(0x11e)]??!![];return{'appCode':_0x1eec1f['appCode'],'key':_0x1eec1f[_0xac6b99(0x101)],'tags':_0x1eec1f[_0xac6b99(0x11f)]??undefined,'hasValue':_0x46d731,'valueRedacted':_0x46d731};}export function buildMutationData(_0x443ff6){const _0x50278c=a29_0x2f3bb4;return{'operation':_0x443ff6[_0x50278c(0x12b)],'selector':{'appCode':_0x443ff6[_0x50278c(0xf3)],'key':_0x443ff6[_0x50278c(0x101)]},'before':_0x443ff6[_0x50278c(0x108)],'after':_0x443ff6[_0x50278c(0x12c)],'dryRun':_0x443ff6[_0x50278c(0x127)],'warnings':_0x443ff6[_0x50278c(0xef)]??[]};}export async function withAppConfigApiBoundary(_0x5a7ae1,_0x4fec33,_0x1c6efc){const _0x278fdc=a29_0x2f3bb4;try{return await _0x1c6efc();}catch{const _0x4a9ca9=[_0x278fdc(0xfa)+_0x4fec33[_0x278fdc(0xf3)]];if(_0x4fec33[_0x278fdc(0x101)])_0x4a9ca9['push'](_0x278fdc(0x10c)+_0x4fec33['key']);_0x4a9ca9['push'](_0x278fdc(0x11a));throw CliErrors[_0x278fdc(0x111)](_0x278fdc(0xfc)+_0x5a7ae1+_0x278fdc(0x117),_0x4a9ca9['join'](';\x20')+'.');}}export function asAppConfigDryRunResult(_0x4a6292,_0x5c308e){const _0x40e93c=a29_0x2f3bb4;return Object[_0x40e93c(0x112)](_0x4a6292,{'method':{'value':_0x5c308e[_0x40e93c(0x12f)],'enumerable':![]},'url':{'value':_0x5c308e[_0x40e93c(0xf9)],'enumerable':![]}});}export function assertSingleValueSource(_0x5307b3){const _0x4c83ef=a29_0x2f3bb4,_0x229590=[];_0x5307b3[_0x4c83ef(0x121)][_0x4c83ef(0x10f)]>0x1&&_0x229590[_0x4c83ef(0xf0)]({'kind':_0x4c83ef(0x10b),'value':_0x5307b3[_0x4c83ef(0x121)]['slice'](0x1)['join']('\x20')});const _0xe437a1=_0x5307b3[_0x4c83ef(0xfd)](_0x4c83ef(0x11b));_0xe437a1!==undefined&&_0xe437a1!==null&&_0x229590[_0x4c83ef(0xf0)]({'kind':'argument','value':String(_0xe437a1)});_0x5307b3['bool']('stdin')&&_0x229590['push']({'kind':_0x4c83ef(0x124)});const _0x383cce=_0x5307b3['str'](_0x4c83ef(0x104))[_0x4c83ef(0x131)]();_0x383cce&&_0x229590[_0x4c83ef(0xf0)]({'kind':'env','name':_0x383cce});const _0x1fdb7d=_0x5307b3[_0x4c83ef(0x109)](_0x4c83ef(0xf8))[_0x4c83ef(0x131)]();_0x1fdb7d&&_0x229590[_0x4c83ef(0xf0)]({'kind':_0x4c83ef(0xf8),'path':_0x1fdb7d});if(_0x229590[_0x4c83ef(0x10f)]===0x0)throw CliErrors[_0x4c83ef(0x10a)](_0x4c83ef(0x119),'Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.');if(_0x229590['length']>0x1)throw CliErrors[_0x4c83ef(0x10a)](_0x4c83ef(0x114),_0x4c83ef(0x120));return _0x229590[0x0];}export async function assertValueSourceReadable(_0x20c45e){const _0x49ca7b=a29_0x2f3bb4;if(_0x20c45e[_0x49ca7b(0x103)]===_0x49ca7b(0xee)&&!(_0x20c45e[_0x49ca7b(0x130)]in process.env))throw CliErrors['validation'](_0x49ca7b(0xf6)+_0x20c45e[_0x49ca7b(0x130)]);if(_0x20c45e[_0x49ca7b(0x103)]===_0x49ca7b(0xf8))try{await access(_0x20c45e[_0x49ca7b(0x118)]);}catch{throw CliErrors[_0x49ca7b(0x10a)](_0x49ca7b(0x12e)+_0x20c45e[_0x49ca7b(0x118)]);}}function a29_0x565a(_0x16a83a,_0x4c0002){_0x16a83a=_0x16a83a-0xed;const _0x893fa5=a29_0x893f();let _0x565a95=_0x893fa5[_0x16a83a];return _0x565a95;}export async function readAppConfigValue(_0x228ce8){const _0x540ee1=a29_0x2f3bb4,_0x59c1f7=assertSingleValueSource(_0x228ce8),_0x4aa1ee=[];if(_0x59c1f7[_0x540ee1(0x103)]===_0x540ee1(0x10b))return _0x4aa1ee[_0x540ee1(0xf0)](_0x540ee1(0xf7)),{'value':_0x59c1f7[_0x540ee1(0x11b)]??'','source':_0x59c1f7[_0x540ee1(0x103)],'warnings':_0x4aa1ee};if(_0x59c1f7[_0x540ee1(0x103)]===_0x540ee1(0x124))return{'value':await readStdin(),'source':_0x59c1f7['kind'],'warnings':_0x4aa1ee};if(_0x59c1f7[_0x540ee1(0x103)]===_0x540ee1(0xee)){if(!(_0x59c1f7[_0x540ee1(0x130)]in process.env))throw CliErrors[_0x540ee1(0x10a)](_0x540ee1(0xf6)+_0x59c1f7['name']);return{'value':process.env[_0x59c1f7.name]??'','source':_0x59c1f7[_0x540ee1(0x103)],'warnings':_0x4aa1ee};}return{'value':await readFile(_0x59c1f7[_0x540ee1(0x118)],_0x540ee1(0x126)),'source':_0x59c1f7['kind'],'warnings':_0x4aa1ee};}function readStdin(){return new Promise((_0xa3bfb6,_0xf67e58)=>{const _0x21ff0f=a29_0x565a;let _0xd1a4ad='';process[_0x21ff0f(0x124)]['setEncoding'](_0x21ff0f(0x126)),process[_0x21ff0f(0x124)]['on']('data',_0x2a3448=>{_0xd1a4ad+=_0x2a3448;}),process[_0x21ff0f(0x124)]['once'](_0x21ff0f(0x10d),()=>_0xa3bfb6(_0xd1a4ad)),process['stdin'][_0x21ff0f(0xed)]('error',_0xf67e58);});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a30_0x1d47(_0x36bad7,_0x3cd2ae){_0x36bad7=_0x36bad7-0xaa;const _0x2931ba=a30_0x2931();let _0x1d47c4=_0x2931ba[_0x36bad7];return _0x1d47c4;}const a30_0x53ce95=a30_0x1d47;(function(_0x478942,_0x105318){const _0x2aea23=a30_0x1d47,_0x1693f4=_0x478942();while(!![]){try{const _0x5add74=-parseInt(_0x2aea23(0xb3))/0x1*(parseInt(_0x2aea23(0xb5))/0x2)+-parseInt(_0x2aea23(0xae))/0x3*(-parseInt(_0x2aea23(0xab))/0x4)+-parseInt(_0x2aea23(0xbf))/0x5*(-parseInt(_0x2aea23(0xad))/0x6)+-parseInt(_0x2aea23(0xac))/0x7+-parseInt(_0x2aea23(0xc4))/0x8+parseInt(_0x2aea23(0xb6))/0x9*(-parseInt(_0x2aea23(0xbe))/0xa)+parseInt(_0x2aea23(0xc2))/0xb*(parseInt(_0x2aea23(0xaf))/0xc);if(_0x5add74===_0x105318)break;else _0x1693f4['push'](_0x1693f4['shift']());}catch(_0x2e5cc9){_0x1693f4['push'](_0x1693f4['shift']());}}}(a30_0x2931,0xae184));function a30_0x2931(){const _0xb7ccea=['3666404pdYcwq','1434ftSKoU','4220112ZrLBSl','8324796wUHyMr','nonInteractive','write','logout','1jtYEFE','../../auth/auth-server-ui.js','1873454PHFuzd','10377VgJMVp','bool','Login\x20via\x20browser','auth','Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','login','!\x20Not\x20logged\x20in','Clear\x20login\x20session','1990SEVrqW','19385WvhHlR','yes','log','11eFKlJy','read','4992016jTEYnW','boolean','4WladCP'];a30_0x2931=function(){return _0xb7ccea;};return a30_0x2931();}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':'auth','command':a30_0x53ce95(0xbb),'description':a30_0x53ce95(0xb8),'risk':a30_0x53ce95(0xc3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'yes','type':a30_0x53ce95(0xaa),'description':a30_0x53ce95(0xba),'default':![]}],async 'execute'(_0x31972f){const _0x46f8d1=a30_0x53ce95,{runAuthServer:_0x17ac9d}=await import(_0x46f8d1(0xb4));return await _0x17ac9d({'autoYes':_0x31972f[_0x46f8d1(0xb7)](_0x46f8d1(0xc0)),'nonInteractive':_0x31972f[_0x46f8d1(0xb0)]}),{'ok':!![]};}},{'service':a30_0x53ce95(0xb9),'command':a30_0x53ce95(0xb2),'description':a30_0x53ce95(0xbd),'risk':a30_0x53ce95(0xb1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x329a26){const _0x1e4ffb=a30_0x53ce95;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x1e4ffb(0xc1)]('✓\x20Logged\x20out')):console[_0x1e4ffb(0xc1)](_0x1e4ffb(0xbc)),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a31_0x20bde5=a31_0x2490;(function(_0xdd2e83,_0x1cdaa9){const _0x34406c=a31_0x2490,_0xf39dca=_0xdd2e83();while(!![]){try{const _0x437942=parseInt(_0x34406c(0xc4))/0x1+-parseInt(_0x34406c(0xe8))/0x2+-parseInt(_0x34406c(0xe0))/0x3*(-parseInt(_0x34406c(0xdb))/0x4)+parseInt(_0x34406c(0xb9))/0x5*(parseInt(_0x34406c(0xe1))/0x6)+parseInt(_0x34406c(0xac))/0x7*(-parseInt(_0x34406c(0xdc))/0x8)+parseInt(_0x34406c(0xa0))/0x9+parseInt(_0x34406c(0xcb))/0xa;if(_0x437942===_0x1cdaa9)break;else _0xf39dca['push'](_0xf39dca['shift']());}catch(_0x58bf4d){_0xf39dca['push'](_0xf39dca['shift']());}}}(a31_0x283e,0xc446e));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_0x2490(_0x5d08e8,_0x30d25c){_0x5d08e8=_0x5d08e8-0x9b;const _0x283ede=a31_0x283e();let _0x249099=_0x283ede[_0x5d08e8];return _0x249099;}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';function a31_0x283e(){const _0x38cbe7=['20181xHjVVi','Operation\x20type\x20\x22','includes','ENDPOINT','close','UNKNOWN','question','Alias\x20\x22','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','\x0a\x20*\x20[脚本名称]\x20','/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/','1643335WoKhJr','map','tableName','\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','Invalid\x20dataset\x20selection.','\x0a\x20*\x20[触发节点]\x20','parseInt','create','No\x20operation\x20types\x20found\x20for\x20dataset\x20','datasetcode','source','283334IvgwIL','string','nonInteractive','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','keys','after','6533120wLPzcZ','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','.js','stdin','HOOK','\x20function:\x20','alias','\x20api\x20pull`\x20to\x20refresh.','before','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','\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','scriptsRootDir','join','operation-type','Invalid\x20function\x20name\x20\x22','8uBsvOJ','2776DcluRv','functionNode',']\x20(','No\x20api.ts\x20found.\x20Run\x20`','264711JxlftI','6VOWeoH','isInteger','entries','COMMON','\x22\x20not\x20found.\x20','find','code','2137068aBoxFx','apiDir','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','length','Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','Dataset\x20not\x20found\x20for\x20code\x20\x22','stderr','Script\x20type','No\x20datasets\x20found\x20for\x20this\x20app.','Select\x20dataset:','appCode','\x22\x20not\x20found\x20for\x20dataset\x20','str','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','operationType','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','function-node','name','description','TODO:\x20add\x20script\x20description','12879882iJwWGn','trim','write','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','Created\x20','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','datasetCode','utf8','bff','HOOK\x20requires\x20alias/operation/node\x20options.','type','validation'];a31_0x283e=function(){return _0x38cbe7;};return a31_0x283e();}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_0x20bde5(0xa8),'command':a31_0x20bde5(0xc0),'description':a31_0x20bde5(0xed),'risk':a31_0x20bde5(0xa2),'flags':[{'name':a31_0x20bde5(0xaa),'type':a31_0x20bde5(0xc5),'required':!![],'enum':[a31_0x20bde5(0xe4),a31_0x20bde5(0xaf),a31_0x20bde5(0xd0)],'description':a31_0x20bde5(0xf0)},{'name':a31_0x20bde5(0x9d),'type':a31_0x20bde5(0xc5),'required':!![],'description':'Function\x20name\x20(valid\x20JS\x20identifier)'},{'name':'description','type':a31_0x20bde5(0xc5),'description':'Script\x20description'},{'name':a31_0x20bde5(0xd2),'type':a31_0x20bde5(0xc5),'description':a31_0x20bde5(0xc7)},{'name':a31_0x20bde5(0xc2),'type':'string','description':a31_0x20bde5(0xb4)},{'name':a31_0x20bde5(0xd9),'type':a31_0x20bde5(0xc5),'description':'Operation\x20type\x20(HOOK\x20only)'},{'name':a31_0x20bde5(0x9c),'type':a31_0x20bde5(0xc5),'description':'Trigger\x20node\x20(HOOK\x20only)','enum':[a31_0x20bde5(0xd4),a31_0x20bde5(0xca)]}],async 'validate'(_0x409370){const _0x5a0006=a31_0x20bde5,_0x522c36=_0x409370[_0x5a0006(0xf5)](_0x5a0006(0x9d));if(!isValidBffFunctionName(_0x522c36))throw CliErrors[_0x5a0006(0xab)](_0x5a0006(0xda)+_0x522c36+'\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).');},async 'execute'(_0x2aee22){const _0x408def=a31_0x20bde5,_0x3a1d64=loadBffProjectConfig(_0x2aee22['appCode']),_0x5285af=_0x2aee22[_0x408def(0xf5)](_0x408def(0xaa)),_0x44036d=_0x2aee22[_0x408def(0xf5)](_0x408def(0x9d)),_0x4666b3=_0x2aee22[_0x408def(0xf5)](_0x408def(0x9e))||undefined,_0x382060=_0x5285af===_0x408def(0xd0)?await resolveHookOptions(_0x3a1d64,_0x2aee22):undefined,_0x22e314=buildFilePath(_0x3a1d64,_0x5285af,_0x44036d,_0x382060);if(await fileExists(_0x22e314))throw CliErrors['validation']('File\x20already\x20exists:\x20'+_0x22e314);await mkdir(dirname(_0x22e314),{'recursive':!![]});const _0x2437aa=generateTemplate(_0x5285af,_0x44036d,_0x2aee22[_0x408def(0xf3)],_0x4666b3,_0x382060);await writeFile(_0x22e314,_0x2437aa,_0x408def(0xa7));const _0x2b7511={'type':_0x5285af,'name':_0x44036d,'path':_0x22e314};if(_0x4666b3)_0x2b7511[_0x408def(0x9e)]=_0x4666b3;if(_0x382060){if(_0x382060[_0x408def(0xd2)])_0x2b7511['alias']=_0x382060[_0x408def(0xd2)];_0x2b7511['datasetCode']=_0x382060['datasetCode'],_0x2b7511[_0x408def(0xf7)]=_0x382060[_0x408def(0xf7)],_0x2b7511[_0x408def(0xdd)]=_0x382060[_0x408def(0xdd)];}return{'ok':!![],'data':_0x2b7511,'message':_0x408def(0xa4)+_0x5285af+_0x408def(0xd1)+_0x44036d};}};async function resolveHookOptions(_0x28d12a,_0x88d43c){const _0x1790fc=a31_0x20bde5,_0x18d8e8=loadAliasMap(_0x88d43c[_0x1790fc(0xe9)],undefined,resolveApiFilePath(_0x88d43c[_0x1790fc(0xe9)],_0x88d43c[_0x1790fc(0xf3)])),_0x4afadf=_0x18d8e8[_0x1790fc(0xec)]>0x0;let _0x5ea71d,_0x564c82,_0x3ddebe;const _0x11e1f6=_0x88d43c[_0x1790fc(0xf5)](_0x1790fc(0xd2)),_0x34134e=_0x88d43c[_0x1790fc(0xf5)](_0x1790fc(0xc2));if(_0x11e1f6){const _0xe8d919=resolveAlias(_0x88d43c[_0x1790fc(0xe9)],_0x11e1f6,undefined,resolveApiFilePath(_0x88d43c[_0x1790fc(0xe9)],_0x88d43c[_0x1790fc(0xf3)]));if(!_0xe8d919){const _0x8cfdbd=_0x4afadf?'Available\x20aliases:\x20'+_0x18d8e8[_0x1790fc(0xba)](_0x4f6132=>_0x4f6132[_0x1790fc(0xd2)])['join'](',\x20'):_0x1790fc(0xdf)+CLI_BIN_NAME+_0x1790fc(0xcc);throw CliErrors[_0x1790fc(0xab)](_0x1790fc(0xb3)+_0x11e1f6+_0x1790fc(0xe5)+_0x8cfdbd);}_0x5ea71d=_0x11e1f6,_0x564c82=_0xe8d919;}else{if(_0x34134e){_0x564c82=_0x34134e;const _0x27a71d=_0x18d8e8[_0x1790fc(0xe6)](_0x495a3c=>_0x495a3c[_0x1790fc(0xa6)]===_0x34134e);_0x5ea71d=_0x27a71d?.[_0x1790fc(0xd2)];}else{if(_0x88d43c[_0x1790fc(0xc6)])throw CliErrors['validation'](_0x1790fc(0xea));else{if(_0x4afadf){const _0x428a21=_0x18d8e8[_0x1790fc(0xba)](_0x327798=>_0x327798[_0x1790fc(0xd2)]+'\x20('+_0x327798[_0x1790fc(0xbb)]+')'),_0x21f56b=await promptSelect(_0x1790fc(0xf2),_0x428a21),_0x11a427=_0x18d8e8[_0x21f56b];if(!_0x11a427)throw CliErrors[_0x1790fc(0xab)](_0x1790fc(0xbd));_0x5ea71d=_0x11a427[_0x1790fc(0xd2)],_0x564c82=_0x11a427[_0x1790fc(0xa6)];}else{const _0x7d653c=await listDatasets(_0x88d43c['appCode']);if(_0x7d653c[_0x1790fc(0xec)]===0x0)throw CliErrors[_0x1790fc(0xab)](_0x1790fc(0xf1));const _0x2abf0d=_0x7d653c['map'](_0xf7c4c0=>_0xf7c4c0[_0x1790fc(0x9d)]+'\x20['+(_0xf7c4c0[_0x1790fc(0xc3)]??_0x1790fc(0xb1))+_0x1790fc(0xde)+_0xf7c4c0[_0x1790fc(0xe7)]+')'),_0x4f1fe6=await promptSelect(_0x1790fc(0xf2),_0x2abf0d),_0x5d2ad5=_0x7d653c[_0x4f1fe6];if(!_0x5d2ad5)throw CliErrors[_0x1790fc(0xab)](_0x1790fc(0xbd));_0x564c82=_0x5d2ad5[_0x1790fc(0xe7)],_0x5ea71d=undefined;}}}}const _0x2cbc2f=await listDatasets(_0x88d43c['appCode']),_0x48d445=_0x2cbc2f[_0x1790fc(0xe6)](_0x412497=>_0x412497[_0x1790fc(0xe7)]===_0x564c82);if(!_0x48d445)throw CliErrors[_0x1790fc(0xab)](_0x1790fc(0xee)+_0x564c82+'\x22.\x20'+(_0x5ea71d?_0x1790fc(0xd5)+CLI_BIN_NAME+_0x1790fc(0xd3):''));_0x3ddebe=_0x48d445['id'];const _0x4abf35=_0x5ea71d??_0x564c82,_0x2ba921=await listBffDatasetOperations(_0x88d43c[_0x1790fc(0xf3)],_0x3ddebe),_0x5045ad=_0x2ba921?Object[_0x1790fc(0xc9)](_0x2ba921):[];if(_0x5045ad[_0x1790fc(0xec)]===0x0)throw CliErrors[_0x1790fc(0xab)](_0x1790fc(0xc1)+_0x4abf35+'.');let _0x335c14;const _0x464366=_0x88d43c['str'](_0x1790fc(0xd9));if(_0x464366){if(!_0x5045ad[_0x1790fc(0xae)](_0x464366))throw CliErrors[_0x1790fc(0xab)](_0x1790fc(0xad)+_0x464366+_0x1790fc(0xf4)+_0x4abf35+'.\x20'+('Available:\x20'+_0x5045ad[_0x1790fc(0xd8)](',\x20')));_0x335c14=_0x464366;}else{if(_0x88d43c['nonInteractive'])throw CliErrors[_0x1790fc(0xab)](_0x1790fc(0xf6));const _0x45f529=await promptSelect('Select\x20operation\x20type:',_0x5045ad);_0x335c14=_0x5045ad[_0x45f529]??_0x5045ad[0x0];}let _0xc394bb=normalizeHookFunctionNode(_0x88d43c['str'](_0x1790fc(0x9c)));if(!_0xc394bb){if(_0x88d43c[_0x1790fc(0xf5)](_0x1790fc(0x9c)))throw CliErrors[_0x1790fc(0xab)]('--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.');if(_0x88d43c[_0x1790fc(0xc6)])throw CliErrors[_0x1790fc(0xab)](_0x1790fc(0xc8));const _0x2bdcf7=await promptSelect('Select\x20trigger\x20node:',[_0x1790fc(0xd4),'after']);_0xc394bb=[_0x1790fc(0xd4),_0x1790fc(0xca)][_0x2bdcf7]??'before';}return{'alias':_0x5ea71d,'datasetCode':_0x564c82,'datasetId':_0x3ddebe,'operationType':_0x335c14,'functionNode':_0xc394bb};}async function promptSelect(_0x12c5e6,_0x36b156){const _0x4a32f5=a31_0x20bde5;if(_0x36b156['length']===0x1)return 0x0;for(const [_0x32a7de,_0x340bca]of _0x36b156[_0x4a32f5(0xe3)]()){process[_0x4a32f5(0xef)][_0x4a32f5(0xa2)]('\x20\x20'+(_0x32a7de+0x1)+'.\x20'+_0x340bca+'\x0a');}const _0x150393=createInterface({'input':process[_0x4a32f5(0xcf)],'output':process['stderr']});while(!![]){const _0x44c7a4=await new Promise(_0x450f3d=>{const _0x47f778=_0x4a32f5;_0x150393[_0x47f778(0xb2)](_0x12c5e6+'\x20',_0x450f3d);}),_0x4a4789=Number[_0x4a32f5(0xbf)](_0x44c7a4[_0x4a32f5(0xa1)](),0xa);if(Number[_0x4a32f5(0xe2)](_0x4a4789)&&_0x4a4789>=0x1&&_0x4a4789<=_0x36b156[_0x4a32f5(0xec)])return _0x150393[_0x4a32f5(0xb0)](),_0x4a4789-0x1;process[_0x4a32f5(0xef)][_0x4a32f5(0xa2)](_0x4a32f5(0xa3)+_0x36b156[_0x4a32f5(0xec)]+'.\x0a');}}function buildFilePath(_0x1dd61a,_0x4c6ed0,_0x1b7c95,_0x3b186c){const _0x3c7eba=a31_0x20bde5;if(_0x4c6ed0===_0x3c7eba(0xd0)){if(!_0x3b186c)throw CliErrors[_0x3c7eba(0xab)](_0x3c7eba(0xa9));const _0x263085=_0x3b186c[_0x3c7eba(0xd2)]??_0x3b186c[_0x3c7eba(0xa6)];return join(_0x1dd61a[_0x3c7eba(0xd7)],_0x3c7eba(0xd0),_0x263085,_0x3b186c[_0x3c7eba(0xf7)],_0x3b186c[_0x3c7eba(0xdd)],_0x1b7c95+_0x3c7eba(0xce));}return join(_0x1dd61a[_0x3c7eba(0xd7)],_0x4c6ed0,_0x1b7c95+_0x3c7eba(0xce));}export function generateTemplate(_0x5d5310,_0x26d1fa,_0x4b81e0,_0x180642,_0x15e766){const _0x6fd133=a31_0x20bde5,_0x1f9058=_0x180642?.[_0x6fd133(0xa1)]()||_0x6fd133(0x9f);if(_0x5d5310==='COMMON')return _0x6fd133(0xb7)+_0x1f9058+_0x6fd133(0xb5)+_0x26d1fa+_0x6fd133(0xeb)+_0x26d1fa+'.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'+_0x26d1fa+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';if(_0x5d5310===_0x6fd133(0xaf))return _0x6fd133(0xb6)+_0x1f9058+_0x6fd133(0xb8)+_0x4b81e0+'/'+_0x26d1fa+_0x6fd133(0xbc)+_0x26d1fa+_0x6fd133(0x9b);if(!_0x15e766)throw CliErrors[_0x6fd133(0xab)]('HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.');return _0x6fd133(0xcd)+_0x1f9058+_0x6fd133(0xa5)+_0x4b81e0+'/'+_0x15e766[_0x6fd133(0xa6)]+'/'+_0x15e766['operationType']+_0x6fd133(0xbe)+_0x15e766['functionNode']+_0x6fd133(0xd6)+_0x26d1fa+_0x6fd133(0x9b);}
|
|
1
|
+
const a31_0x2d4c83=a31_0x276f;function a31_0x276f(_0x3c5d7f,_0x177061){_0x3c5d7f=_0x3c5d7f-0xcc;const _0x455fa8=a31_0x455f();let _0x276f59=_0x455fa8[_0x3c5d7f];return _0x276f59;}function a31_0x455f(){const _0xed7e72=['parseInt',']\x20(','function-node','nonInteractive','bff','.js\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Input\x20parameters.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Processing\x20result.\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','string','before','apiDir','Operation\x20type\x20(HOOK\x20only)','create','UNKNOWN','after','2530740QzUoBk','isInteger','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','Invalid\x20function\x20name\x20\x22','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','join','find','validation','datasetcode','type','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','write','Select\x20trigger\x20node:','231pYwAuw','Available\x20aliases:\x20','stderr','functionNode','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','appCode','/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','HOOK\x20requires\x20alias/operation/node\x20options.','ENDPOINT','6835815AUbQRG','\x22\x20not\x20found\x20for\x20dataset\x20','Alias\x20\x22','\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Request\x20parameters.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Business\x20result\x20(wrapped\x20in\x20response.data).\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','TODO:\x20add\x20script\x20description','Trigger\x20node\x20(HOOK\x20only)','No\x20operation\x20types\x20found\x20for\x20dataset\x20','Available:\x20','source','HOOK','2133036uJBmQq','str','325480kTUbmM','.js','length','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','\x20function:\x20','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','datasetCode','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','scriptsRootDir','Select\x20operation\x20type:','description','question','\x0a\x20*\x20[触发节点]\x20','COMMON','Function\x20name\x20(valid\x20JS\x20identifier)','23zFGzfV','195256CYMUkX','name','551576aVDpwU','includes','utf8','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','map','Script\x20type','24902TduMRT','File\x20already\x20exists:\x20','133ZReAuc','code','operationType','Invalid\x20dataset\x20selection.','alias','Script\x20description','operation-type','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','Select\x20dataset:','\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Current\x20request\x20params\x20or\x20response\x20result.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Modified\x20params\x20object.\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','trim','5tQRBoS'];a31_0x455f=function(){return _0xed7e72;};return a31_0x455f();}(function(_0x3b859b,_0x56f6bd){const _0x28d710=a31_0x276f,_0x12d82c=_0x3b859b();while(!![]){try{const _0x538a67=-parseInt(_0x28d710(0xf0))/0x1*(-parseInt(_0x28d710(0xf9))/0x2)+parseInt(_0x28d710(0x114))/0x3+-parseInt(_0x28d710(0xf3))/0x4*(-parseInt(_0x28d710(0x106))/0x5)+-parseInt(_0x28d710(0xdb))/0x6+-parseInt(_0x28d710(0xfb))/0x7*(parseInt(_0x28d710(0xf1))/0x8)+parseInt(_0x28d710(0xd0))/0x9+parseInt(_0x28d710(0xdd))/0xa*(-parseInt(_0x28d710(0x121))/0xb);if(_0x538a67===_0x56f6bd)break;else _0x12d82c['push'](_0x12d82c['shift']());}catch(_0x5b27fe){_0x12d82c['push'](_0x12d82c['shift']());}}}(a31_0x455f,0x8015b));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';import{dirname,join}from'node:path';import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';import{isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const bffCreate={'service':a31_0x2d4c83(0x10b),'command':a31_0x2d4c83(0x111),'description':a31_0x2d4c83(0xe5),'risk':a31_0x2d4c83(0x11f),'flags':[{'name':a31_0x2d4c83(0x11d),'type':a31_0x2d4c83(0x10d),'required':!![],'enum':['COMMON',a31_0x2d4c83(0xcf),a31_0x2d4c83(0xda)],'description':a31_0x2d4c83(0xf8)},{'name':'name','type':'string','required':!![],'description':a31_0x2d4c83(0xef)},{'name':a31_0x2d4c83(0xeb),'type':a31_0x2d4c83(0x10d),'description':a31_0x2d4c83(0x100)},{'name':a31_0x2d4c83(0xff),'type':a31_0x2d4c83(0x10d),'description':a31_0x2d4c83(0x125)},{'name':a31_0x2d4c83(0x11c),'type':'string','description':a31_0x2d4c83(0xe1)},{'name':'operation-type','type':'string','description':a31_0x2d4c83(0x110)},{'name':'function-node','type':a31_0x2d4c83(0x10d),'description':a31_0x2d4c83(0xd6),'enum':['before',a31_0x2d4c83(0x113)]}],async 'validate'(_0xd685e9){const _0x3a5817=a31_0x2d4c83,_0x26a0bb=_0xd685e9[_0x3a5817(0xdc)]('name');if(!isValidBffFunctionName(_0x26a0bb))throw CliErrors[_0x3a5817(0x11b)](_0x3a5817(0x117)+_0x26a0bb+'\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).');},async 'execute'(_0x2b0e07){const _0x5083b5=a31_0x2d4c83,_0x5c315d=loadBffProjectConfig(_0x2b0e07[_0x5083b5(0xcc)]),_0x34d043=_0x2b0e07[_0x5083b5(0xdc)]('type'),_0x250d82=_0x2b0e07[_0x5083b5(0xdc)]('name'),_0x298afc=_0x2b0e07[_0x5083b5(0xdc)](_0x5083b5(0xeb))||undefined,_0x12cf54=_0x34d043===_0x5083b5(0xda)?await resolveHookOptions(_0x5c315d,_0x2b0e07):undefined,_0x557e6a=buildFilePath(_0x5c315d,_0x34d043,_0x250d82,_0x12cf54);if(await fileExists(_0x557e6a))throw CliErrors['validation'](_0x5083b5(0xfa)+_0x557e6a);await mkdir(dirname(_0x557e6a),{'recursive':!![]});const _0xb0ddfa=generateTemplate(_0x34d043,_0x250d82,_0x2b0e07[_0x5083b5(0xcc)],_0x298afc,_0x12cf54);await writeFile(_0x557e6a,_0xb0ddfa,_0x5083b5(0xf5));const _0xcbf432={'type':_0x34d043,'name':_0x250d82,'path':_0x557e6a};if(_0x298afc)_0xcbf432[_0x5083b5(0xeb)]=_0x298afc;if(_0x12cf54){if(_0x12cf54[_0x5083b5(0xff)])_0xcbf432[_0x5083b5(0xff)]=_0x12cf54[_0x5083b5(0xff)];_0xcbf432['datasetCode']=_0x12cf54[_0x5083b5(0xe7)],_0xcbf432[_0x5083b5(0xfd)]=_0x12cf54[_0x5083b5(0xfd)],_0xcbf432[_0x5083b5(0x124)]=_0x12cf54['functionNode'];}return{'ok':!![],'data':_0xcbf432,'message':'Created\x20'+_0x34d043+_0x5083b5(0xe2)+_0x250d82};}};async function resolveHookOptions(_0x8e521b,_0x1f7a81){const _0x226be4=a31_0x2d4c83,_0x3fef25=loadAliasMap(_0x1f7a81[_0x226be4(0x10f)],undefined,resolveApiFilePath(_0x1f7a81[_0x226be4(0x10f)],_0x1f7a81[_0x226be4(0xcc)])),_0x4022ec=_0x3fef25[_0x226be4(0xdf)]>0x0;let _0x1f5158,_0x2bc3fe,_0x4047ca;const _0x389562=_0x1f7a81[_0x226be4(0xdc)](_0x226be4(0xff)),_0x2ef575=_0x1f7a81[_0x226be4(0xdc)]('datasetcode');if(_0x389562){const _0x4fd763=resolveAlias(_0x1f7a81['apiDir'],_0x389562,undefined,resolveApiFilePath(_0x1f7a81[_0x226be4(0x10f)],_0x1f7a81[_0x226be4(0xcc)]));if(!_0x4fd763){const _0xbe8c4a=_0x4022ec?_0x226be4(0x122)+_0x3fef25[_0x226be4(0xf7)](_0x13abe7=>_0x13abe7['alias'])['join'](',\x20'):'No\x20api.ts\x20found.\x20Run\x20`'+CLI_BIN_NAME+_0x226be4(0x116);throw CliErrors[_0x226be4(0x11b)](_0x226be4(0xd2)+_0x389562+'\x22\x20not\x20found.\x20'+_0xbe8c4a);}_0x1f5158=_0x389562,_0x2bc3fe=_0x4fd763;}else{if(_0x2ef575){_0x2bc3fe=_0x2ef575;const _0x18b91a=_0x3fef25[_0x226be4(0x11a)](_0x1f29d7=>_0x1f29d7[_0x226be4(0xe7)]===_0x2ef575);_0x1f5158=_0x18b91a?.[_0x226be4(0xff)];}else{if(_0x1f7a81['nonInteractive'])throw CliErrors[_0x226be4(0x11b)](_0x226be4(0xe4));else{if(_0x4022ec){const _0x414893=_0x3fef25['map'](_0x1fb2dc=>_0x1fb2dc[_0x226be4(0xff)]+'\x20('+_0x1fb2dc['tableName']+')'),_0x50892d=await promptSelect('Select\x20dataset:',_0x414893),_0x386932=_0x3fef25[_0x50892d];if(!_0x386932)throw CliErrors[_0x226be4(0x11b)](_0x226be4(0xfe));_0x1f5158=_0x386932[_0x226be4(0xff)],_0x2bc3fe=_0x386932[_0x226be4(0xe7)];}else{const _0x3ec855=await listDatasets(_0x1f7a81[_0x226be4(0xcc)]);if(_0x3ec855['length']===0x0)throw CliErrors[_0x226be4(0x11b)]('No\x20datasets\x20found\x20for\x20this\x20app.');const _0xeae843=_0x3ec855[_0x226be4(0xf7)](_0x12f112=>_0x12f112[_0x226be4(0xf2)]+'\x20['+(_0x12f112[_0x226be4(0xd9)]??_0x226be4(0x112))+_0x226be4(0x108)+_0x12f112[_0x226be4(0xfc)]+')'),_0x3813e2=await promptSelect(_0x226be4(0x103),_0xeae843),_0x245ab2=_0x3ec855[_0x3813e2];if(!_0x245ab2)throw CliErrors[_0x226be4(0x11b)](_0x226be4(0xfe));_0x2bc3fe=_0x245ab2['code'],_0x1f5158=undefined;}}}}const _0x1c472b=await listDatasets(_0x1f7a81[_0x226be4(0xcc)]),_0x235611=_0x1c472b['find'](_0x4d61fa=>_0x4d61fa[_0x226be4(0xfc)]===_0x2bc3fe);if(!_0x235611)throw CliErrors['validation']('Dataset\x20not\x20found\x20for\x20code\x20\x22'+_0x2bc3fe+'\x22.\x20'+(_0x1f5158?_0x226be4(0xe0)+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh.':''));_0x4047ca=_0x235611['id'];const _0x5c5ec1=_0x1f5158??_0x2bc3fe,_0x5e0c56=await listBffDatasetOperations(_0x1f7a81[_0x226be4(0xcc)],_0x4047ca),_0xe5b479=_0x5e0c56?Object['keys'](_0x5e0c56):[];if(_0xe5b479['length']===0x0)throw CliErrors['validation'](_0x226be4(0xd7)+_0x5c5ec1+'.');let _0x3fa277;const _0x495177=_0x1f7a81[_0x226be4(0xdc)](_0x226be4(0x101));if(_0x495177){if(!_0xe5b479[_0x226be4(0xf4)](_0x495177))throw CliErrors['validation']('Operation\x20type\x20\x22'+_0x495177+_0x226be4(0xd1)+_0x5c5ec1+'.\x20'+(_0x226be4(0xd8)+_0xe5b479[_0x226be4(0x119)](',\x20')));_0x3fa277=_0x495177;}else{if(_0x1f7a81['nonInteractive'])throw CliErrors[_0x226be4(0x11b)](_0x226be4(0xe6));const _0x57f46f=await promptSelect(_0x226be4(0xea),_0xe5b479);_0x3fa277=_0xe5b479[_0x57f46f]??_0xe5b479[0x0];}let _0x2f775d=normalizeHookFunctionNode(_0x1f7a81['str'](_0x226be4(0x109)));if(!_0x2f775d){if(_0x1f7a81['str'](_0x226be4(0x109)))throw CliErrors[_0x226be4(0x11b)](_0x226be4(0x11e));if(_0x1f7a81[_0x226be4(0x10a)])throw CliErrors[_0x226be4(0x11b)](_0x226be4(0x102));const _0x4196b9=await promptSelect(_0x226be4(0x120),[_0x226be4(0x10e),_0x226be4(0x113)]);_0x2f775d=[_0x226be4(0x10e),_0x226be4(0x113)][_0x4196b9]??'before';}return{'alias':_0x1f5158,'datasetCode':_0x2bc3fe,'datasetId':_0x4047ca,'operationType':_0x3fa277,'functionNode':_0x2f775d};}async function promptSelect(_0x4a816c,_0x2a4e3a){const _0x1806e7=a31_0x2d4c83;if(_0x2a4e3a[_0x1806e7(0xdf)]===0x1)return 0x0;for(const [_0x13694c,_0x156df8]of _0x2a4e3a['entries']()){process[_0x1806e7(0x123)][_0x1806e7(0x11f)]('\x20\x20'+(_0x13694c+0x1)+'.\x20'+_0x156df8+'\x0a');}const _0x253ad0=createInterface({'input':process['stdin'],'output':process[_0x1806e7(0x123)]});while(!![]){const _0x5768a5=await new Promise(_0x47695c=>{const _0x2a7717=_0x1806e7;_0x253ad0[_0x2a7717(0xec)](_0x4a816c+'\x20',_0x47695c);}),_0x81de6a=Number[_0x1806e7(0x107)](_0x5768a5[_0x1806e7(0x105)](),0xa);if(Number[_0x1806e7(0x115)](_0x81de6a)&&_0x81de6a>=0x1&&_0x81de6a<=_0x2a4e3a['length'])return _0x253ad0['close'](),_0x81de6a-0x1;process[_0x1806e7(0x123)]['write'](_0x1806e7(0xe3)+_0x2a4e3a[_0x1806e7(0xdf)]+'.\x0a');}}function buildFilePath(_0xa7afb2,_0x33b87e,_0x33a68f,_0xd747c1){const _0x5a8093=a31_0x2d4c83;if(_0x33b87e===_0x5a8093(0xda)){if(!_0xd747c1)throw CliErrors[_0x5a8093(0x11b)](_0x5a8093(0xce));const _0x4cfaf6=_0xd747c1[_0x5a8093(0xff)]??_0xd747c1[_0x5a8093(0xe7)];return join(_0xa7afb2[_0x5a8093(0xe9)],_0x5a8093(0xda),_0x4cfaf6,_0xd747c1['operationType'],_0xd747c1[_0x5a8093(0x124)],_0x33a68f+_0x5a8093(0xde));}return join(_0xa7afb2[_0x5a8093(0xe9)],_0x33b87e,_0x33a68f+_0x5a8093(0xde));}export function generateTemplate(_0x1e4559,_0x21b8d3,_0x302a40,_0xdafa86,_0x2cdfb4){const _0x5d2f78=a31_0x2d4c83,_0x2925b1=_0xdafa86?.[_0x5d2f78(0x105)]()||_0x5d2f78(0xd5);if(_0x1e4559===_0x5d2f78(0xee))return'/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20'+_0x2925b1+'\x0a\x20*\x20[脚本名称]\x20'+_0x21b8d3+_0x5d2f78(0xf6)+_0x21b8d3+_0x5d2f78(0x10c)+_0x21b8d3+_0x5d2f78(0xe8);if(_0x1e4559===_0x5d2f78(0xcf))return'/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20'+_0x2925b1+'\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/'+_0x302a40+'/'+_0x21b8d3+_0x5d2f78(0xd3)+_0x21b8d3+_0x5d2f78(0xe8);if(!_0x2cdfb4)throw CliErrors['validation'](_0x5d2f78(0xd4));return _0x5d2f78(0xcd)+_0x2925b1+_0x5d2f78(0x118)+_0x302a40+'/'+_0x2cdfb4['datasetCode']+'/'+_0x2cdfb4['operationType']+_0x5d2f78(0xed)+_0x2cdfb4[_0x5d2f78(0x124)]+_0x5d2f78(0x104)+_0x21b8d3+_0x5d2f78(0xe8);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a32_0x36b255=a32_0x2b0a;function a32_0x49e6(){const _0x303a48=['10882rNKGqq','functions','str','filter','projectRoot','Function\x20not\x20found:\x20','replace','15000IFPLbu','2547888CNoEot','21uqiIAA','\x20\x20-\x20','join','lockFilePath','Lock\x20scope\x20for\x20app\x20\x22','No\x20lock\x20entry\x20found\x20for\x20\x22','toISOString','apps','270225WoSmRL','\x22\x20not\x20found\x20after\x20ensureLockScope.','12WkKdRs','scriptsRoot','appCode','311668NVijJT','keys','12048355LCPbRY','high-risk-write','Would\x20delete\x20','/api/management/library/scripts/delete','1989JzgiSe','validation','64TDQSGt','1848DhhTmV','target','bff','remoteId','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','POST','stringify','896lgzWnk','<timestamp>','map','delete','trashDir','BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','\x20(local\x20file\x20moved\x20to\x20trash)','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','startsWith','length','scriptsRootDir','trashedTo'];a32_0x49e6=function(){return _0x303a48;};return a32_0x49e6();}(function(_0x532052,_0x46af53){const _0x474703=a32_0x2b0a,_0x46ab70=_0x532052();while(!![]){try{const _0x132f4c=parseInt(_0x474703(0xf1))/0x1*(-parseInt(_0x474703(0xd3))/0x2)+-parseInt(_0x474703(0xdc))/0x3*(parseInt(_0x474703(0xe9))/0x4)+parseInt(_0x474703(0xe4))/0x5+-parseInt(_0x474703(0xc0))/0x6*(-parseInt(_0x474703(0xc7))/0x7)+parseInt(_0x474703(0xdb))/0x8+parseInt(_0x474703(0xef))/0x9*(-parseInt(_0x474703(0xda))/0xa)+parseInt(_0x474703(0xeb))/0xb*(parseInt(_0x474703(0xe6))/0xc);if(_0x132f4c===_0x46af53)break;else _0x46ab70['push'](_0x46ab70['shift']());}catch(_0xdd9499){_0x46ab70['push'](_0x46ab70['shift']());}}}(a32_0x49e6,0x44e05));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';function a32_0x2b0a(_0xc319ff,_0x83e63c){_0xc319ff=_0xc319ff-0xc0;const _0x49e6cf=a32_0x49e6();let _0x2b0ae=_0x49e6cf[_0xc319ff];return _0x2b0ae;}import{deleteBffScript}from'../../core/api-client.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists,resolveLocalFilePathFromLockKey}from'../../core/bff/file-system.js';import{ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';import{sleep}from'../../utils/sleep.js';export const bffDelete={'service':a32_0x36b255(0xc2),'command':a32_0x36b255(0xca),'description':'Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','risk':a32_0x36b255(0xec),'flags':[{'name':a32_0x36b255(0xc1),'type':'string','required':!![],'description':a32_0x36b255(0xc4)}],async 'validate'(_0x338397){const _0x377a78=a32_0x36b255,_0x1d53c1=loadBffProjectConfig(_0x338397['appCode']),_0x31ff3c=await readBffLockFile(_0x1d53c1[_0x377a78(0xdf)]);if(!_0x31ff3c)throw CliErrors['validation'](_0x377a78(0xcc));},async 'dryRun'(_0x504ee8){const _0x501981=a32_0x36b255,_0x13593b=loadBffProjectConfig(_0x504ee8[_0x501981(0xe8)]),_0x46b939=await readBffLockFile(_0x13593b['lockFilePath']);if(!_0x46b939)throw CliErrors['validation']('BFF\x20lock\x20file\x20not\x20found.');const {appLock:_0x44acf1}=ensureLockScope(_0x46b939,_0x504ee8[_0x501981(0xe8)],_0x13593b[_0x501981(0xe7)],_0x501981(0xca)),_0x3d4e3e=_0x504ee8[_0x501981(0xd5)](_0x501981(0xc1)),_0x386c04=Object[_0x501981(0xea)](_0x44acf1[_0x501981(0xd4)]),_0x46603d=resolveDeleteTarget(_0x3d4e3e,_0x386c04),_0x34df3e=_0x44acf1['functions'][_0x46603d];if(!_0x34df3e)throw CliErrors[_0x501981(0xf0)](_0x501981(0xe1)+_0x46603d+'\x22.');const _0x436c32=resolveLocalFilePathFromLockKey(_0x13593b,_0x46603d),_0x1e7700=relative(_0x13593b['projectRoot'],_0x436c32),_0x43b6fa=join(_0x13593b[_0x501981(0xcb)],_0x501981(0xc8),_0x1e7700);return{'method':_0x501981(0xc5),'url':_0x501981(0xee),'body':{'appCode':_0x504ee8[_0x501981(0xe8)],'target':_0x46603d,'remoteId':_0x34df3e[_0x501981(0xc3)],'localFilePath':_0x436c32,'trashedPath':_0x43b6fa},'description':_0x501981(0xed)+_0x46603d+_0x501981(0xce)};},async 'execute'(_0x283256){const _0x3bd3d8=a32_0x36b255,_0xf78841=loadBffProjectConfig(_0x283256['appCode']),_0x301888=await readBffLockFile(_0xf78841[_0x3bd3d8(0xdf)]);if(!_0x301888)throw CliErrors[_0x3bd3d8(0xf0)]('BFF\x20lock\x20file\x20not\x20found.');const {lockData:_0x4be7dd,appLock:_0x7d029c}=ensureLockScope(_0x301888,_0x283256[_0x3bd3d8(0xe8)],_0xf78841[_0x3bd3d8(0xe7)],_0x3bd3d8(0xca)),_0x52db03=JSON['parse'](JSON[_0x3bd3d8(0xc6)](_0x4be7dd)),_0x29d8df=_0x52db03[_0x3bd3d8(0xe3)][_0x283256[_0x3bd3d8(0xe8)]];if(!_0x29d8df)throw new Error(_0x3bd3d8(0xe0)+_0x283256[_0x3bd3d8(0xe8)]+_0x3bd3d8(0xe5));const _0x48314f=_0x283256[_0x3bd3d8(0xd5)](_0x3bd3d8(0xc1)),_0x98ecf8=Object[_0x3bd3d8(0xea)](_0x29d8df['functions']),_0x182768=resolveDeleteTarget(_0x48314f,_0x98ecf8),_0x18c532=_0x29d8df[_0x3bd3d8(0xd4)][_0x182768];if(!_0x18c532)throw CliErrors[_0x3bd3d8(0xf0)](_0x3bd3d8(0xe1)+_0x182768+'\x22.');await deleteBffScript(_0x18c532[_0x3bd3d8(0xc3)]),delete _0x29d8df[_0x3bd3d8(0xd4)][_0x182768],_0x29d8df['lastSync']=new Date()[_0x3bd3d8(0xe2)](),await writeBffLockFile(_0xf78841[_0x3bd3d8(0xdf)],_0x52db03);const _0x112721=resolveLocalFilePathFromLockKey(_0xf78841,_0x182768);let _0x546c91;await fileExists(_0x112721)&&(_0x546c91=await moveToTrash(_0xf78841[_0x3bd3d8(0xd7)],_0xf78841[_0x3bd3d8(0xcb)],_0x112721),await cleanupEmptyDirectories(dirname(_0x112721),_0xf78841[_0x3bd3d8(0xd1)]));await waitForDeleteSettlement(_0xf78841['lockFilePath'],_0x283256['appCode'],_0x182768,_0x112721),await sleep(0x96);const _0x27cdfd={'deleted':_0x182768,'remoteId':_0x18c532[_0x3bd3d8(0xc3)]};if(_0x546c91)_0x27cdfd[_0x3bd3d8(0xd2)]=_0x546c91;return{'ok':!![],'data':_0x27cdfd,'message':'Deleted\x20'+_0x182768+(_0x546c91?_0x3bd3d8(0xcd):'')};}};function resolveDeleteTarget(_0x22a4bd,_0x3def46){const _0x2870c2=a32_0x36b255;if(_0x22a4bd['includes']('/')){const _0x46ea60=_0x3def46['find'](_0xbb0a61=>_0xbb0a61===_0x22a4bd);if(!_0x46ea60)throw CliErrors['validation'](_0x2870c2(0xd8)+_0x22a4bd);return _0x46ea60;}const _0x3e1623=_0x3def46[_0x2870c2(0xd6)](_0x230c0d=>_0x230c0d['split']('/')['at'](-0x1)===_0x22a4bd);if(_0x3e1623[_0x2870c2(0xd0)]===0x0)throw CliErrors[_0x2870c2(0xf0)]('Function\x20not\x20found:\x20'+_0x22a4bd);if(_0x3e1623[_0x2870c2(0xd0)]>0x1)throw CliErrors[_0x2870c2(0xf0)]('Multiple\x20functions\x20match\x20\x22'+_0x22a4bd+'\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a'+_0x3e1623[_0x2870c2(0xc9)](_0x3bfd08=>_0x2870c2(0xdd)+_0x3bfd08)[_0x2870c2(0xde)]('\x0a'));return _0x3e1623[0x0];}async function moveToTrash(_0x397a4b,_0xf62ab5,_0x55de77){const _0x39e213=a32_0x36b255,_0x14aeaa=new Date()[_0x39e213(0xe2)]()[_0x39e213(0xd9)](/[:.]/g,'-'),_0x3fba2a=relative(_0x397a4b,_0x55de77),_0x427e34=join(_0xf62ab5,_0x14aeaa,_0x3fba2a);return await mkdir(dirname(_0x427e34),{'recursive':!![]}),await rename(_0x55de77,_0x427e34),_0x427e34;}async function cleanupEmptyDirectories(_0x35cf86,_0x154e3b){const _0x2bb46d=a32_0x36b255;let _0x3a17e4=resolve(_0x35cf86);const _0xe30dcd=resolve(_0x154e3b);while(_0x3a17e4[_0x2bb46d(0xcf)](''+_0xe30dcd+sep)||_0x3a17e4===_0xe30dcd){if(_0x3a17e4===_0xe30dcd)return;try{const _0x592d2b=await readdir(_0x3a17e4);if(_0x592d2b['length']>0x0)return;await rmdir(_0x3a17e4);}catch{return;}_0x3a17e4=dirname(_0x3a17e4);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0x46e02b,_0x23e698,_0x193f3a,_0x4027db){const _0x270edd=a32_0x36b255;for(let _0x526ca1=0x0;_0x526ca1<DELETE_SETTLE_RETRY_COUNT;_0x526ca1+=0x1){const _0x2e94be=await readBffLockFile(_0x46e02b),_0x27bfda=!!_0x2e94be?.[_0x270edd(0xe3)]?.[_0x23e698]?.[_0x270edd(0xd4)]?.[_0x193f3a],_0x4df09d=await fileExists(_0x4027db);if(!_0x27bfda&&!_0x4df09d)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error('Local\x20delete\x20not\x20settled\x20for\x20'+_0x193f3a+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a33_0x37cbd9=a33_0x4eb9;(function(_0x835f82,_0x1a94c1){const _0xae0e46=a33_0x4eb9,_0x37d5e6=_0x835f82();while(!![]){try{const _0x1ac17e=-parseInt(_0xae0e46(0x168))/0x1+-parseInt(_0xae0e46(0x15e))/0x2+parseInt(_0xae0e46(0x156))/0x3*(parseInt(_0xae0e46(0x165))/0x4)+parseInt(_0xae0e46(0x155))/0x5+-parseInt(_0xae0e46(0x157))/0x6+parseInt(_0xae0e46(0x159))/0x7*(-parseInt(_0xae0e46(0x161))/0x8)+parseInt(_0xae0e46(0x167))/0x9;if(_0x1ac17e===_0x1a94c1)break;else _0x37d5e6['push'](_0x37d5e6['shift']());}catch(_0x1a596b){_0x37d5e6['push'](_0x37d5e6['shift']());}}}(a33_0x2c82,0xe9ef4));function a33_0x4eb9(_0x116a62,_0x49f795){_0x116a62=_0x116a62-0x154;const _0x2c825e=a33_0x2c82();let _0x4eb980=_0x2c825e[_0x116a62];return _0x4eb980;}import{getBffScriptInfo}from'../../core/api-client.js';function a33_0x2c82(){const _0x186331=['description','detail','139732taXdqw','scriptContent','30229128xKlyIp','1231715LCGIZW','verbose','number','5055390lZItjP','42eCClek','1819872TAKuvO','(none)','157157CphhWe','appCode','num','read','bff','2486318zAvghC','Return\x20full\x20raw\x20script\x20object','bool','400UIpLjS','updatedTime'];a33_0x2c82=function(){return _0x186331;};return a33_0x2c82();}export const bffDetail={'service':a33_0x37cbd9(0x15d),'command':a33_0x37cbd9(0x164),'description':'Get\x20BFF\x20script\x20details\x20by\x20ID','risk':a33_0x37cbd9(0x15c),'flags':[{'name':'id','type':a33_0x37cbd9(0x154),'required':!![],'description':'Script\x20ID'},{'name':a33_0x37cbd9(0x169),'type':'boolean','description':a33_0x37cbd9(0x15f)}],async 'execute'(_0x53032c){const _0x108ffc=a33_0x37cbd9,_0x1a8568=await getBffScriptInfo(_0x53032c[_0x108ffc(0x15b)]('id')),_0x3657e1=_0x53032c[_0x108ffc(0x160)](_0x108ffc(0x169));if(_0x3657e1)return{'ok':!![],'data':_0x1a8568};return{'ok':!![],'data':{'id':_0x1a8568['id'],'appCode':_0x1a8568[_0x108ffc(0x15a)],'scriptType':_0x1a8568['scriptType'],'description':_0x1a8568[_0x108ffc(0x163)]||_0x108ffc(0x158),'createdTime':_0x1a8568['createdTime']??'','updatedTime':_0x1a8568[_0x108ffc(0x162)]??'','scriptContent':_0x1a8568[_0x108ffc(0x166)]??''}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a34_0x100e(){const _0x37f2ae=['888372vVDzWf','24728tGGuzu','66265iqcHrC','4780377xqjNXI','30KYPdcm','12223090oZRmHA','17612617TLAZVt','6DqBAmT','10137480loJpfu','9kiKJVV','745WzXFGb'];a34_0x100e=function(){return _0x37f2ae;};return a34_0x100e();}(function(_0x5614e4,_0x1c42d4){const _0xb352f0=a34_0x2215,_0x5e4203=_0x5614e4();while(!![]){try{const _0x26fd5c=parseInt(_0xb352f0(0x147))/0x1*(parseInt(_0xb352f0(0x149))/0x2)+-parseInt(_0xb352f0(0x145))/0x3+parseInt(_0xb352f0(0x146))/0x4*(-parseInt(_0xb352f0(0x144))/0x5)+-parseInt(_0xb352f0(0x141))/0x6*(parseInt(_0xb352f0(0x148))/0x7)+parseInt(_0xb352f0(0x142))/0x8+-parseInt(_0xb352f0(0x143))/0x9*(parseInt(_0xb352f0(0x13f))/0xa)+parseInt(_0xb352f0(0x140))/0xb;if(_0x26fd5c===_0x1c42d4)break;else _0x5e4203['push'](_0x5e4203['shift']());}catch(_0x43cb88){_0x5e4203['push'](_0x5e4203['shift']());}}}(a34_0x100e,0xb4a05));import{bffList}from'../../commands/bff/list.js';import{bffDetail}from'../../commands/bff/detail.js';import{bffStatus}from'../../commands/bff/status.js';import{bffCreate}from'../../commands/bff/create.js';import{bffPush}from'../../commands/bff/push.js';import{bffPull}from'../../commands/bff/pull.js';import{bffDelete}from'../../commands/bff/delete.js';function a34_0x2215(_0x54081b,_0xf67289){_0x54081b=_0x54081b-0x13f;const _0x100e66=a34_0x100e();let _0x22156b=_0x100e66[_0x54081b];return _0x22156b;}export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];
|
package/lib/commands/bff/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a35_0x3e40(_0x1ce1bd,_0x2c5db8){_0x1ce1bd=_0x1ce1bd-0x1b9;const _0x39cc90=a35_0x39cc();let _0x3e40b3=_0x39cc90[_0x1ce1bd];return _0x3e40b3;}const a35_0x3fd8da=a35_0x3e40;(function(_0x168935,_0x55e0c0){const _0x38df81=a35_0x3e40,_0x13ab64=_0x168935();while(!![]){try{const _0x151c8a=-parseInt(_0x38df81(0x1c5))/0x1*(-parseInt(_0x38df81(0x1d2))/0x2)+parseInt(_0x38df81(0x1c1))/0x3*(parseInt(_0x38df81(0x1d8))/0x4)+parseInt(_0x38df81(0x1bb))/0x5*(parseInt(_0x38df81(0x1d1))/0x6)+-parseInt(_0x38df81(0x1c3))/0x7+-parseInt(_0x38df81(0x1d4))/0x8+-parseInt(_0x38df81(0x1c4))/0x9*(-parseInt(_0x38df81(0x1bc))/0xa)+-parseInt(_0x38df81(0x1c0))/0xb;if(_0x151c8a===_0x55e0c0)break;else _0x13ab64['push'](_0x13ab64['shift']());}catch(_0x5693df){_0x13ab64['push'](_0x13ab64['shift']());}}}(a35_0x39cc,0xb10f9));import{listBffScripts}from'../../core/api-client.js';function a35_0x39cc(){const _0x52dd4b=['name','4709706lsrHNF','2NFbuaO','length','4304704bRDGPU','boolean','No\x20BFF\x20scripts\x20found.','appCode','956XuvMBp','string','List\x20BFF\x20scripts','5YtSNQc','290pBREal','description','Filter\x20by\x20script\x20name','Script\x20type\x20filter','23502336QfezBC','18111TDknFv','COMMON','2039499fqsbIF','42426uPnHgV','1326762nkNegz','list','functionName','read','type','map','ENDPOINT','bool','bff','verbose','Return\x20full\x20script\x20objects'];a35_0x39cc=function(){return _0x52dd4b;};return a35_0x39cc();}export const bffList={'service':a35_0x3fd8da(0x1cd),'command':a35_0x3fd8da(0x1c6),'description':a35_0x3fd8da(0x1ba),'risk':a35_0x3fd8da(0x1c8),'flags':[{'name':a35_0x3fd8da(0x1c9),'type':a35_0x3fd8da(0x1b9),'description':a35_0x3fd8da(0x1bf),'default':a35_0x3fd8da(0x1cb),'enum':[a35_0x3fd8da(0x1cb),a35_0x3fd8da(0x1c2)]},{'name':a35_0x3fd8da(0x1d0),'type':'string','description':a35_0x3fd8da(0x1be)},{'name':a35_0x3fd8da(0x1ce),'type':a35_0x3fd8da(0x1d5),'description':a35_0x3fd8da(0x1cf)}],async 'execute'(_0x27f080){const _0xc684c7=a35_0x3fd8da,_0x49a0ed=await listBffScripts(_0x27f080[_0xc684c7(0x1d7)],_0x27f080['str'](_0xc684c7(0x1c9)),{'scriptName':_0x27f080['str'](_0xc684c7(0x1d0))||undefined}),_0x2b7f18=_0x27f080[_0xc684c7(0x1cc)](_0xc684c7(0x1ce));return{'ok':!![],'data':_0x2b7f18?_0x49a0ed:_0x49a0ed[_0xc684c7(0x1ca)](_0xe1ff6d=>({'id':_0xe1ff6d['id'],'functionName':_0xe1ff6d[_0xc684c7(0x1c7)]??'','description':_0xe1ff6d[_0xc684c7(0x1bd)]||'(unnamed)','scriptType':_0xe1ff6d['scriptType']})),'message':_0x49a0ed[_0xc684c7(0x1d3)]===0x0?_0xc684c7(0x1d6):undefined};}};
|