@lovrabet/rabetbase-cli 2.3.13-beta.3 → 2.3.13
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/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/commands/app/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a20_0x56135c=a20_0x4ef6;(function(_0x294a1a,_0x49da96){const _0x5e6d75=a20_0x4ef6,_0x56457b=_0x294a1a();while(!![]){try{const _0x1bc529=-parseInt(_0x5e6d75(0x10d))/0x1*(parseInt(_0x5e6d75(0x109))/0x2)+parseInt(_0x5e6d75(0xff))/0x3*(-parseInt(_0x5e6d75(0x115))/0x4)+-parseInt(_0x5e6d75(0xf3))/0x5*(parseInt(_0x5e6d75(0x10e))/0x6)+-parseInt(_0x5e6d75(0x10a))/0x7+-parseInt(_0x5e6d75(0xf5))/0x8*(-parseInt(_0x5e6d75(0x11a))/0x9)+-parseInt(_0x5e6d75(0xfc))/0xa*(parseInt(_0x5e6d75(0x11d))/0xb)+parseInt(_0x5e6d75(0xfb))/0xc*(parseInt(_0x5e6d75(0x101))/0xd);if(_0x1bc529===_0x49da96)break;else _0x56457b['push'](_0x56457b['shift']());}catch(_0xeb9386){_0x56457b['push'](_0x56457b['shift']());}}}(a20_0x5161,0x77913));import{readRawConfigWithLayers}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';import{buildAppProfileListFields}from'../../config/schema.js';import{appDefinedIn,enrichAppListItemsWithMergedSelection,resolveDefaultAppSource}from'../../commands/app/shared.js';import{listRemoteAppDirectory}from'../../commands/app/remote-directory.js';function a20_0x4ef6(_0xe46860,_0x44d7c6){_0xe46860=_0xe46860-0xf3;const _0x5161c9=a20_0x5161();let _0x4ef651=_0x5161c9[_0xe46860];return _0x4ef651;}function buildItemsFromLayer(_0x4e3a7d,_0x28668e){const _0x1a166e=a20_0x4ef6,_0x114e12=[],_0x3578a8=_0x4e3a7d[_0x1a166e(0x11b)]&&typeof _0x4e3a7d['apps']===_0x1a166e(0x102)?_0x4e3a7d[_0x1a166e(0x11b)]:{},_0x183e6a=_0x4e3a7d[_0x1a166e(0xf9)]||undefined;for(const [_0xc5a315,_0x35c1d0]of Object['entries'](_0x3578a8)){if(!_0x35c1d0||typeof _0x35c1d0!==_0x1a166e(0x102)||!_0x35c1d0[_0x1a166e(0x105)])continue;_0x114e12['push']({'name':_0xc5a315,'appcode':_0x35c1d0[_0x1a166e(0x105)],'named':!![],'definedIn':_0x28668e,'isDefault':_0xc5a315===_0x183e6a,...buildAppProfileListFields(_0x35c1d0)});}return _0x114e12;}function buildMergedItems(_0x24a92b,_0x2fc6c8){const _0x490111=a20_0x4ef6,{apps:apps={},defaultApp:_0x56aaa4}=_0x24a92b,_0xc56039=_0x2fc6c8[_0x490111(0x114)][_0x490111(0x11b)]&&typeof _0x2fc6c8[_0x490111(0x114)][_0x490111(0x11b)]===_0x490111(0x102)?_0x2fc6c8[_0x490111(0x114)][_0x490111(0x11b)]:{},_0x2c8cdf=_0x2fc6c8[_0x490111(0x106)][_0x490111(0x11b)]&&typeof _0x2fc6c8[_0x490111(0x106)][_0x490111(0x11b)]==='object'?_0x2fc6c8[_0x490111(0x106)]['apps']:{},_0x23ad2f=_0x2fc6c8[_0x490111(0x106)]['inherit']===![],_0x17c431=Object[_0x490111(0x117)](apps),_0x36d8ec=_0x17c431['map'](([_0x283497,_0x59f4fa])=>({'name':_0x283497,'appcode':_0x59f4fa[_0x490111(0x105)],'named':!![],'definedIn':appDefinedIn(_0x283497,_0xc56039,_0x2c8cdf,_0x23ad2f),'isDefault':_0x283497===_0x56aaa4,...buildAppProfileListFields(_0x59f4fa)}));return _0x36d8ec;}function a20_0x5161(){const _0x5e1d18=['entries','boolean','mergedCli','31518TUtFtq','apps','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.','803ilAEjW','1520BFQfme','global','1000elsPDp','find','.\x20Use\x20`','List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','defaultApp','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','36xtvttS','9910AqddrY','isCurrent','\x20config','57BzDIuZ','\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','8360651YBavms','object','bool','app','appcode','projectConfig','globalPath','remote','1209138mzSrGK','2263625EUJGGj','project','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','1FMzMVI','1092FgEJLh','list','optional','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','\x20in\x20','length','globalConfig','173004AKHTXI','projectPath'];a20_0x5161=function(){return _0x5e1d18;};return a20_0x5161();}function validateAppListFlags(_0x3aaf55){const _0x51d05a=a20_0x4ef6;if(!_0x3aaf55[_0x51d05a(0x103)](_0x51d05a(0x108)))return;if(!_0x3aaf55['bool'](_0x51d05a(0xf4))&&!_0x3aaf55[_0x51d05a(0x103)](_0x51d05a(0x10b)))return;throw CliErrors['validation'](_0x51d05a(0x111),_0x51d05a(0x11c));}async function execute(_0x24f41d){const _0x496175=a20_0x4ef6;validateAppListFlags(_0x24f41d);if(_0x24f41d[_0x496175(0x103)](_0x496175(0x108)))return{'ok':!![],'data':await listRemoteAppDirectory(_0x24f41d)};const _0x5a9181=_0x24f41d[_0x496175(0x103)](_0x496175(0xf4)),_0x479513=_0x24f41d[_0x496175(0x103)](_0x496175(0x10b)),_0x446c52=_0x5a9181?_0x496175(0xf4):_0x479513?_0x496175(0x10b):'merged',{config:_0x9da3a6,layers:_0xbb50bc}=readRawConfigWithLayers(),_0x24cdec=resolveDefaultAppSource(_0xbb50bc),{defaultApp:_0x52ef42}=_0x9da3a6;let _0x2fac7c,_0xfb373a;switch(_0x446c52){case _0x496175(0xf4):_0x2fac7c=buildItemsFromLayer(_0xbb50bc['globalConfig'],_0x496175(0xf4)),_0xfb373a=_0xbb50bc[_0x496175(0x107)];break;case _0x496175(0x10b):_0x2fac7c=buildItemsFromLayer(_0xbb50bc[_0x496175(0x106)],_0x496175(0x10b)),_0xfb373a=_0xbb50bc['projectPath'];break;default:_0x2fac7c=buildMergedItems(_0x9da3a6,_0xbb50bc);break;}enrichAppListItemsWithMergedSelection(_0x2fac7c,_0x24f41d[_0x496175(0x119)]);if(_0x2fac7c[_0x496175(0x113)]===0x0){const _0x2ef025=_0x446c52==='merged'?'':_0x496175(0x112)+_0x446c52+_0x496175(0xfe);return{'ok':!![],'data':[],'message':'No\x20apps\x20configured'+_0x2ef025+_0x496175(0xf7)+CLI_BIN_NAME+_0x496175(0x100)};}const _0x87d81b=_0x2fac7c[_0x496175(0xf6)](_0x45c7e8=>_0x45c7e8[_0x496175(0xfd)]===!![]),_0x3924d2=_0x52ef42??_0x87d81b?.[_0x496175(0x105)]??null,_0x405134=_0x446c52==='merged'?{'globalPath':_0xbb50bc['globalPath']??null,'projectPath':_0xbb50bc[_0x496175(0x116)]??null,'defaultApp':_0x3924d2,'defaultAppSource':_0x52ef42!=null?_0x24cdec:null}:{'scope':_0x446c52,'configPath':_0xfb373a??null};return{'ok':!![],'data':{'items':_0x2fac7c,'meta':_0x405134}};}export const appListDefinition={'service':a20_0x56135c(0x104),'command':a20_0x56135c(0x10f),'description':a20_0x56135c(0xf8),'risk':'read','auth':a20_0x56135c(0x110),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a20_0x56135c(0x108),'type':a20_0x56135c(0x118),'description':'List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','default':![]},{'name':'global','type':'boolean','description':a20_0x56135c(0x10c),'default':![]},{'name':a20_0x56135c(0x10b),'type':a20_0x56135c(0x118),'description':a20_0x56135c(0xfa),'default':![]}],async 'validate'(_0x24f690){validateAppListFlags(_0x24f690);},'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x79ac0a,_0xfd6e38){const _0x79982a=a21_0x344f,_0x3149b2=_0x79ac0a();while(!![]){try{const _0x876648=-parseInt(_0x79982a(0x1b5))/0x1+-parseInt(_0x79982a(0x1b7))/0x2+parseInt(_0x79982a(0x1ba))/0x3*(-parseInt(_0x79982a(0x1b2))/0x4)+-parseInt(_0x79982a(0x1bd))/0x5+-parseInt(_0x79982a(0x1ad))/0x6*(parseInt(_0x79982a(0x1bc))/0x7)+-parseInt(_0x79982a(0x1ae))/0x8*(-parseInt(_0x79982a(0x1b8))/0x9)+parseInt(_0x79982a(0x1b0))/0xa;if(_0x876648===_0xfd6e38)break;else _0x3149b2['push'](_0x3149b2['shift']());}catch(_0xe17ef9){_0x3149b2['push'](_0x3149b2['shift']());}}}(a21_0x1e12,0x1b62e));import{listRemoteApps}from'../../core/api-client.js';import{getCookie}from'../../auth/get-cookie.js';import{CliErrors}from'../../errors.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';function a21_0x1e12(){const _0x31a341=['3fbAsHP','cookie','4522JrkncF','242240FVnIrM','1896PQPlIz','792424lSnqxY','platform','8457420RofjtK','appName','709396nnjmYO','map','authRequired','194687xSEiXl','appDesc','416002kXvmzU','9icSqNS','appCode'];a21_0x1e12=function(){return _0x31a341;};return a21_0x1e12();}function a21_0x344f(_0x800654,_0x2a3f62){_0x800654=_0x800654-0x1ad;const _0x1e12c5=a21_0x1e12();let _0x344f08=_0x1e12c5[_0x800654];return _0x344f08;}function resolveCookie(_0x47818a){const _0x54ea69=a21_0x344f,_0x572372=_0x47818a[_0x54ea69(0x1bb)]||getCookie();if(!_0x572372)throw CliErrors[_0x54ea69(0x1b4)]();return _0x572372;}export async function listRemoteAppDirectory(_0x3ff251){const _0x83c711=a21_0x344f,_0xcc6223=await withActiveCookie(resolveCookie(_0x3ff251),()=>listRemoteApps());return{'items':_0xcc6223[_0x83c711(0x1b3)](_0x312a96=>({..._0x312a96['id']!=null?{'id':_0x312a96['id']}:{},'appCode':_0x312a96[_0x83c711(0x1b9)],'appName':_0x312a96[_0x83c711(0x1b1)],..._0x312a96[_0x83c711(0x1b6)]!=null?{'appDesc':_0x312a96[_0x83c711(0x1b6)]}:{}})),'meta':{'source':_0x83c711(0x1af)}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a22_0xca3519=a22_0x15b7;(function(_0x5f1a4e,_0x420523){const _0x1f4829=a22_0x15b7,_0x27b5df=_0x5f1a4e();while(!![]){try{const _0x496760=-parseInt(_0x1f4829(0x166))/0x1*(parseInt(_0x1f4829(0x168))/0x2)+-parseInt(_0x1f4829(0x16c))/0x3+-parseInt(_0x1f4829(0x174))/0x4+parseInt(_0x1f4829(0x175))/0x5*(parseInt(_0x1f4829(0x176))/0x6)+parseInt(_0x1f4829(0x170))/0x7*(parseInt(_0x1f4829(0x16e))/0x8)+-parseInt(_0x1f4829(0x167))/0x9+parseInt(_0x1f4829(0x173))/0xa*(parseInt(_0x1f4829(0x169))/0xb);if(_0x496760===_0x420523)break;else _0x27b5df['push'](_0x27b5df['shift']());}catch(_0x1c2ecb){_0x27b5df['push'](_0x27b5df['shift']());}}}(a22_0x4ffc,0xa54a8));import{CLI_BIN_NAME}from'../../constant/cli.js';function a22_0x4ffc(){const _0x414792=['4020273HtiuAP','215762cEsWyJ','34166pneIdu','app\x20remove','high-risk-write','989055ZrhYmK','app','1037944SnTaYr','\x20workspace\x20remove','35LgxTaz','Deprecated:\x20use\x20workspace\x20remove\x20to\x20remove\x20an\x20app\x20profile','remove','1730mfMtVj','1401568fIWEZg','5pUrWEg','5648376IOJVvR','2026-07','3tjbPIl'];a22_0x4ffc=function(){return _0x414792;};return a22_0x4ffc();}function a22_0x15b7(_0x2f5baa,_0x214666){_0x2f5baa=_0x2f5baa-0x166;const _0x4ffcc0=a22_0x4ffc();let _0x15b76f=_0x4ffcc0[_0x2f5baa];return _0x15b76f;}import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';export const appRemoveDefinition={'service':a22_0xca3519(0x16d),'command':a22_0xca3519(0x172),'description':a22_0xca3519(0x171),'risk':a22_0xca3519(0x16b),'requiresAuth':![],'requiresAppCode':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a22_0xca3519(0x16f),'since':a22_0xca3519(0x177)},'args':[{'name':'name','description':'App\x20profile\x20name\x20to\x20remove','required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x51ff12=>validateAppName(_0x51ff12,'app\x20remove'),'execute':_0x41077d=>runAppRemove(_0x41077d,a22_0xca3519(0x16a))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4fea3d,_0xc1f36e){const _0x395f7c=a23_0x244c,_0x345549=_0x4fea3d();while(!![]){try{const _0x4e2dd9=parseInt(_0x395f7c(0xa9))/0x1*(-parseInt(_0x395f7c(0xac))/0x2)+-parseInt(_0x395f7c(0xae))/0x3+-parseInt(_0x395f7c(0xa0))/0x4*(parseInt(_0x395f7c(0xa8))/0x5)+parseInt(_0x395f7c(0xa7))/0x6+parseInt(_0x395f7c(0xa2))/0x7*(-parseInt(_0x395f7c(0xbb))/0x8)+parseInt(_0x395f7c(0xaf))/0x9+parseInt(_0x395f7c(0xab))/0xa;if(_0x4e2dd9===_0xc1f36e)break;else _0x345549['push'](_0x345549['shift']());}catch(_0x3e8de1){_0x345549['push'](_0x345549['shift']());}}}(a23_0x455a,0x47384));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function a23_0x244c(_0x3e4fae,_0x34d5b3){_0x3e4fae=_0x3e4fae-0xa0;const _0x455a55=a23_0x455a();let _0x244c86=_0x455a55[_0x3e4fae];return _0x244c86;}function a23_0x455a(){const _0x445949=['call','isCurrent','defaultApp','length','globalConfig','6904drbOzS','name','prototype','\x20(global)','40NnWnDn','trim','2954GwgbOd','named','hasOwnProperty','object','inherit','227772lbJdHb','59250LCILhR','26rLCXga','apps','11253410IYpqYL','22456yhSGfH','project','1084944OicsLX','2382075wnMboN','appCode','currentApp','keys','appcode','global','projectConfig'];a23_0x455a=function(){return _0x445949;};return a23_0x455a();}export function enrichAppListItemsWithMergedSelection(_0x2e57d1,_0x4c3112){const _0x2d48e2=a23_0x244c;if(!_0x4c3112)return;const _0x135c43=_0x4c3112['apps']&&typeof _0x4c3112[_0x2d48e2(0xaa)]===_0x2d48e2(0xa5)?_0x4c3112[_0x2d48e2(0xaa)]:{},_0xcfbd58=Object[_0x2d48e2(0xb2)](_0x135c43)[_0x2d48e2(0xb9)]>0x0;for(const _0x47d036 of _0x2e57d1){_0x47d036[_0x2d48e2(0xb7)]=![];}const _0x4af45c=_0x4c3112['appCode']!=null?String(_0x4c3112[_0x2d48e2(0xb0)])[_0x2d48e2(0xa1)]():'';if(_0xcfbd58){const _0x58d3a8=_0x4c3112[_0x2d48e2(0xb1)]??_0x4c3112[_0x2d48e2(0xb8)];if(_0x58d3a8)for(const _0x57acfe of _0x2e57d1){_0x57acfe['named']===!![]&&_0x57acfe[_0x2d48e2(0xbc)]===_0x58d3a8&&(_0x57acfe[_0x2d48e2(0xb7)]=!![]);}for(const _0x2a92a4 of _0x2e57d1){if(_0x2a92a4[_0x2d48e2(0xa3)]!==![])continue;if(_0x4c3112[_0x2d48e2(0xb8)])continue;_0x4af45c&&String(_0x2a92a4[_0x2d48e2(0xb3)]??'')[_0x2d48e2(0xa1)]()===_0x4af45c&&(_0x2a92a4[_0x2d48e2(0xb7)]=!![]);}return;}if(!_0x4af45c)return;for(const _0x4cf5cc of _0x2e57d1){String(_0x4cf5cc['appcode']??'')[_0x2d48e2(0xa1)]()===_0x4af45c&&(_0x4cf5cc['isCurrent']=!![]);}}export function resolveAppScopeForWrite(_0x5dba9d,_0x4013ff,_0x86756){const _0x2ef4ba=a23_0x244c;if(_0x4013ff)return _0x2ef4ba(0xb4);const _0x162162=_0x86756[_0x2ef4ba(0xb5)][_0x2ef4ba(0xaa)]&&typeof _0x86756['projectConfig']['apps']===_0x2ef4ba(0xa5)?_0x86756[_0x2ef4ba(0xb5)][_0x2ef4ba(0xaa)]:{},_0x47a70d=_0x86756[_0x2ef4ba(0xba)][_0x2ef4ba(0xaa)]&&typeof _0x86756['globalConfig'][_0x2ef4ba(0xaa)]===_0x2ef4ba(0xa5)?_0x86756['globalConfig'][_0x2ef4ba(0xaa)]:{};if(Object[_0x2ef4ba(0xbd)][_0x2ef4ba(0xa4)]['call'](_0x162162,_0x5dba9d))return'project';if(Object[_0x2ef4ba(0xbd)]['hasOwnProperty'][_0x2ef4ba(0xb6)](_0x47a70d,_0x5dba9d))return _0x2ef4ba(0xb4);return _0x2ef4ba(0xad);}export function appDefinedIn(_0xc26693,_0x3454f1,_0x25cde9,_0x148d00){const _0x54c170=a23_0x244c;if(_0x148d00)return Object[_0x54c170(0xbd)][_0x54c170(0xa4)][_0x54c170(0xb6)](_0x25cde9,_0xc26693)?_0x54c170(0xad):'global';const _0x1c6ae4=Object[_0x54c170(0xbd)][_0x54c170(0xa4)][_0x54c170(0xb6)](_0x3454f1,_0xc26693),_0x4131e5=Object[_0x54c170(0xbd)][_0x54c170(0xa4)][_0x54c170(0xb6)](_0x25cde9,_0xc26693);if(_0x1c6ae4&&_0x4131e5)return'both';if(_0x4131e5)return _0x54c170(0xad);return'global';}export function resolveDefaultAppSource(_0x217998){const _0x403db9=a23_0x244c,_0x31416d=_0x217998[_0x403db9(0xb5)][_0x403db9(0xaa)]&&typeof _0x217998[_0x403db9(0xb5)][_0x403db9(0xaa)]===_0x403db9(0xa5)?_0x217998[_0x403db9(0xb5)][_0x403db9(0xaa)]:{};if(_0x403db9(0xb8)in _0x217998[_0x403db9(0xb5)])return _0x403db9(0xad);if(Object['keys'](_0x31416d)[_0x403db9(0xb9)]>0x0)return _0x403db9(0xad);if(_0x217998[_0x403db9(0xb5)][_0x403db9(0xa6)]===![])return null;if(_0x217998[_0x403db9(0xba)]['defaultApp'])return'global';return null;}export function getConfigPath(_0xc55791={}){const _0x53d8cd=a23_0x244c,_0x351c3e=_0xc55791[_0x53d8cd(0xb4)]?_0x53d8cd(0xb4):_0x53d8cd(0xad);return resolveWriteConfigPath(_0x351c3e);}export function readConfig(_0x518b16={}){return readConfigFile(getConfigPath(_0x518b16));}export function writeConfig(_0x31f88b,_0x5305cc={}){writeConfigFile(getConfigPath(_0x5305cc),_0x31f88b);}export function scopeLabel(_0x1450ac){const _0xc1aa06=a23_0x244c;return _0x1450ac[_0xc1aa06(0xb4)]?_0xc1aa06(0xbe):'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a24_0x397bd0=a24_0x1ded;(function(_0x45e1e9,_0x45df85){const _0x1c87d9=a24_0x1ded,_0x1ca6de=_0x45e1e9();while(!![]){try{const _0x529249=-parseInt(_0x1c87d9(0x179))/0x1+parseInt(_0x1c87d9(0x186))/0x2*(-parseInt(_0x1c87d9(0x176))/0x3)+parseInt(_0x1c87d9(0x17f))/0x4*(parseInt(_0x1c87d9(0x188))/0x5)+parseInt(_0x1c87d9(0x18a))/0x6+-parseInt(_0x1c87d9(0x177))/0x7+parseInt(_0x1c87d9(0x182))/0x8+parseInt(_0x1c87d9(0x17a))/0x9*(parseInt(_0x1c87d9(0x180))/0xa);if(_0x529249===_0x45df85)break;else _0x1ca6de['push'](_0x1ca6de['shift']());}catch(_0x4ffc50){_0x1ca6de['push'](_0x1ca6de['shift']());}}}(a24_0x3ba4,0x9c755));function a24_0x3ba4(){const _0x33a42e=['26751JDRjqw','6758899BkbolS','App\x20config\x20server\x20id\x20missing\x20for\x20key=','77455OfAaqm','3609ewpBZM',',\x20appCode=','/smartapi/app-config/delete','Deleted\x20app\x20config\x20','get','16zCNPvQ','11560MxpvQy','delete','6040416pApbSq','number','Delete\x20one\x20runtime\x20app-config\x20key','POST','88XzrLpC','isFinite','771445FlKFyT','app-config','1442694ITygyX','appCode'];a24_0x3ba4=function(){return _0x33a42e;};return a24_0x3ba4();}import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a24_0x1ded(_0x34848f,_0x3ad0f4){_0x34848f=_0x34848f-0x175;const _0x3ba4d6=a24_0x3ba4();let _0x1ded5e=_0x3ba4d6[_0x34848f];return _0x1ded5e;}import{asAppConfigDryRunResult,buildMutationData,KEY_ARG,projectAppConfig,readKeyArg,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const DELETE_PATH=a24_0x397bd0(0x17c);export const appConfigDelete={'service':a24_0x397bd0(0x189),'command':'delete','description':a24_0x397bd0(0x184),'risk':'high-risk-write','args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x150769){readKeyArg(_0x150769);},async 'dryRun'(_0x2d4c34){const _0x47ce4a=a24_0x397bd0,_0x3256d9=readKeyArg(_0x2d4c34),_0x1faebe=await mustGetByKey(_0x2d4c34[_0x47ce4a(0x175)],_0x3256d9);return asAppConfigDryRunResult(buildMutationData({'operation':_0x47ce4a(0x181),'appCode':_0x2d4c34[_0x47ce4a(0x175)],'key':_0x3256d9,'before':projectAppConfig(_0x1faebe),'after':null,'dryRun':!![]}),{'method':_0x47ce4a(0x185),'url':DELETE_PATH});},async 'execute'(_0x2b95f6){const _0x95919c=a24_0x397bd0,_0x57e657=readKeyArg(_0x2b95f6),_0x11a834=await mustGetByKey(_0x2b95f6[_0x95919c(0x175)],_0x57e657);return await withAppConfigApiBoundary(_0x95919c(0x181),{'appCode':_0x2b95f6[_0x95919c(0x175)],'key':_0x57e657},()=>deleteAppConfig({'appCode':_0x2b95f6[_0x95919c(0x175)],'id':requireAppConfigId(_0x11a834,_0x57e657,_0x2b95f6['appCode'])})),{'ok':!![],'data':buildMutationData({'operation':_0x95919c(0x181),'appCode':_0x2b95f6[_0x95919c(0x175)],'key':_0x57e657,'before':projectAppConfig(_0x11a834),'after':null,'dryRun':![]}),'message':_0x95919c(0x17d)+_0x57e657};}};async function mustGetByKey(_0x5ef71d,_0x4bfd01){const _0x5b8ac8=a24_0x397bd0,_0x473936=await withAppConfigApiBoundary(_0x5b8ac8(0x17e),{'appCode':_0x5ef71d,'key':_0x4bfd01},()=>getAppConfigByKey(_0x5ef71d,_0x4bfd01));if(!_0x473936)throw CliErrors['validation']('App\x20config\x20key\x20not\x20found:\x20'+_0x4bfd01,'appCode:\x20'+_0x5ef71d);return _0x473936;}function requireAppConfigId(_0x267aeb,_0x37175b,_0x37c938){const _0x5e5778=a24_0x397bd0;if(typeof _0x267aeb['id']===_0x5e5778(0x183)&&Number[_0x5e5778(0x187)](_0x267aeb['id'])&&_0x267aeb['id']>0x0)return _0x267aeb['id'];throw CliErrors['apiError'](_0x5e5778(0x178)+_0x37175b+_0x5e5778(0x17b)+_0x37c938);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a25_0x56a38b=a25_0x5010;function a25_0x5010(_0x5c371e,_0x30fba4){_0x5c371e=_0x5c371e-0x137;const _0xcb5c4b=a25_0xcb5c();let _0x50108b=_0xcb5c4b[_0x5c371e];return _0x50108b;}(function(_0x1b6a48,_0x27f7c5){const _0x6881b4=a25_0x5010,_0x586f4f=_0x1b6a48();while(!![]){try{const _0x4fdde9=-parseInt(_0x6881b4(0x13c))/0x1+parseInt(_0x6881b4(0x146))/0x2+parseInt(_0x6881b4(0x142))/0x3+parseInt(_0x6881b4(0x149))/0x4+parseInt(_0x6881b4(0x139))/0x5*(-parseInt(_0x6881b4(0x143))/0x6)+-parseInt(_0x6881b4(0x141))/0x7*(parseInt(_0x6881b4(0x140))/0x8)+parseInt(_0x6881b4(0x145))/0x9;if(_0x4fdde9===_0x27f7c5)break;else _0x586f4f['push'](_0x586f4f['shift']());}catch(_0x5385b1){_0x586f4f['push'](_0x586f4f['shift']());}}}(a25_0xcb5c,0xa494a));import{getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{KEY_ARG,projectAppConfig,readKeyArg,REVEAL_FLAG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';function a25_0xcb5c(){const _0x26d066=['Loaded\x20app\x20config\x20','appCode','712BtBeOd','82649KMvILj','145107mubikc','868674USlEFg','appCode:\x20','3659247sQxzKe','2450676nGkqKI','\x20with\x20value\x20redacted','app-config','4300932ecQIjX','App\x20config\x20key\x20not\x20found:\x20','get','Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','10OdiTie','bool','read','741020mMqxTL','reveal'];a25_0xcb5c=function(){return _0x26d066;};return a25_0xcb5c();}export const appConfigGet={'service':a25_0x56a38b(0x148),'command':a25_0x56a38b(0x137),'description':a25_0x56a38b(0x138),'risk':a25_0x56a38b(0x13b),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x2cf7e9){readKeyArg(_0x2cf7e9);},async 'execute'(_0x28833b){const _0x5b0b22=a25_0x56a38b,_0x473300=readKeyArg(_0x28833b),_0x19d94f=await withAppConfigApiBoundary(_0x5b0b22(0x137),{'appCode':_0x28833b[_0x5b0b22(0x13f)],'key':_0x473300},()=>getAppConfigByKey(_0x28833b['appCode'],_0x473300));if(!_0x19d94f)throw CliErrors['validation'](_0x5b0b22(0x14a)+_0x473300,_0x5b0b22(0x144)+_0x28833b[_0x5b0b22(0x13f)]);const _0x656b02=projectAppConfig(_0x19d94f,{'reveal':_0x28833b[_0x5b0b22(0x13a)]('reveal')});return{'ok':!![],'data':{'config':_0x656b02},'message':_0x28833b[_0x5b0b22(0x13a)](_0x5b0b22(0x13d))?'Loaded\x20app\x20config\x20'+_0x473300+'\x20with\x20value\x20revealed':_0x5b0b22(0x13e)+_0x473300+_0x5b0b22(0x147)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a26_0x189b(){const _0x43c675=['8672230UNyYnL','3018411DsfHuO','493956LRfQOh','3143kGBsfz','171704RUeQBB','898vuQhbV','3176aHyVqm','1620ZPfazu','13780WTgzPy','488FSynvf'];a26_0x189b=function(){return _0x43c675;};return a26_0x189b();}(function(_0x13e123,_0x25065f){const _0x2bfc3d=a26_0x1862,_0xb32be2=_0x13e123();while(!![]){try{const _0x16d838=-parseInt(_0x2bfc3d(0x173))/0x1*(-parseInt(_0x2bfc3d(0x177))/0x2)+parseInt(_0x2bfc3d(0x17a))/0x3+parseInt(_0x2bfc3d(0x172))/0x4+-parseInt(_0x2bfc3d(0x176))/0x5*(parseInt(_0x2bfc3d(0x175))/0x6)+parseInt(_0x2bfc3d(0x17b))/0x7*(parseInt(_0x2bfc3d(0x174))/0x8)+-parseInt(_0x2bfc3d(0x179))/0x9+parseInt(_0x2bfc3d(0x178))/0xa;if(_0x16d838===_0x25065f)break;else _0xb32be2['push'](_0xb32be2['shift']());}catch(_0x154ae0){_0xb32be2['push'](_0xb32be2['shift']());}}}(a26_0x189b,0x5fddb));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_0x1862(_0x39e525,_0x6d7433){_0x39e525=_0x39e525-0x172;const _0x189b5c=a26_0x189b();let _0x186240=_0x189b5c[_0x39e525];return _0x186240;}import{appConfigDelete}from'../../commands/app-config/delete.js';export const appConfigDefinitions=[appConfigList,appConfigGet,appConfigSet,appConfigDelete];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a27_0x29f829=a27_0x5514;(function(_0x31704d,_0x1ddd1e){const _0x4a8dfc=a27_0x5514,_0x4508fa=_0x31704d();while(!![]){try{const _0x51f124=-parseInt(_0x4a8dfc(0x1f2))/0x1+-parseInt(_0x4a8dfc(0x1f8))/0x2+parseInt(_0x4a8dfc(0x1f0))/0x3+parseInt(_0x4a8dfc(0x202))/0x4+-parseInt(_0x4a8dfc(0x1fd))/0x5*(-parseInt(_0x4a8dfc(0x1fa))/0x6)+parseInt(_0x4a8dfc(0x1f3))/0x7*(-parseInt(_0x4a8dfc(0x1f1))/0x8)+parseInt(_0x4a8dfc(0x1f5))/0x9;if(_0x51f124===_0x1ddd1e)break;else _0x4508fa['push'](_0x4508fa['shift']());}catch(_0x35083e){_0x4508fa['push'](_0x4508fa['shift']());}}}(a27_0x1979,0x49390));import{listAppConfigs}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a27_0x5514(_0x16c514,_0xc3e412){_0x16c514=_0x16c514-0x1ef;const _0x1979c2=a27_0x1979();let _0x5514f9=_0x1979c2[_0x16c514];return _0x5514f9;}import{projectAppConfig,readOptionalTags,TAGS_FLAG,validateKey,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigList={'service':a27_0x29f829(0x1f7),'command':a27_0x29f829(0x1ef),'description':a27_0x29f829(0x1fc),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a27_0x29f829(0x1f4),'type':a27_0x29f829(0x200),'description':a27_0x29f829(0x1f6)},TAGS_FLAG],async 'validate'(_0x3b16d8){const _0x12f7b5=a27_0x29f829,_0xceb0f2=_0x3b16d8['str'](_0x12f7b5(0x1f4))['trim']();if(_0xceb0f2)validateKey(_0xceb0f2);readOptionalTags(_0x3b16d8);},async 'execute'(_0x7beef6){const _0x346ca2=a27_0x29f829,_0x2cf6d0=_0x7beef6[_0x346ca2(0x1fe)]('key')['trim']()||undefined,_0x4d45d4=readOptionalTags(_0x7beef6),_0x1a7824=await withAppConfigApiBoundary(_0x346ca2(0x1ef),{'appCode':_0x7beef6[_0x346ca2(0x1f9)]},()=>listAppConfigs(_0x7beef6[_0x346ca2(0x1f9)],{'key':_0x2cf6d0,'tags':_0x4d45d4})),_0x3e635b=_0x1a7824[_0x346ca2(0x1fb)](_0x128bd0=>projectAppConfig(_0x128bd0));return{'ok':!![],'data':{'appCode':_0x7beef6[_0x346ca2(0x1f9)],'count':_0x3e635b['length'],'configs':_0x3e635b},'message':_0x346ca2(0x1ff)+_0x3e635b['length']+_0x346ca2(0x201)};}};function a27_0x1979(){const _0x5e31bd=['904428CqXOmg','833784SOgLio','547591xvWMGn','28zIZwZS','key','7290297xqBBbd','Filter\x20by\x20exact\x20config\x20key','app-config','610590WlIaDK','appCode','1278JDuXEH','map','List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','6805AUEpee','str','Found\x20','string','\x20app\x20config(s)','673184XyDliG','list'];a27_0x1979=function(){return _0x5e31bd;};return a27_0x1979();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a28_0x1f5813=a28_0x16d2;function a28_0x32f7(){const _0x3fccbb=['Created','621ZCKpup','Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','create','Updated','543nMbiCN','string','apiError','866296hMbbaP','high-risk-write','tags','appCode','11194lfkmNO','get','/smartapi/app-config/create','258BGQbSh','POST','12EJuPkM','29308763GMFpHX','number','app-config','496175tyndgV','App\x20config\x20server\x20id\x20missing\x20for\x20key=',',\x20appCode=','3510940ykxVrw','update','14wcpKYt','185735wDYOJQ','201830yMJpQT'];a28_0x32f7=function(){return _0x3fccbb;};return a28_0x32f7();}(function(_0x293f73,_0x265b34){const _0x1084b1=a28_0x16d2,_0x146307=_0x293f73();while(!![]){try{const _0x2fe6da=parseInt(_0x1084b1(0x183))/0x1+parseInt(_0x1084b1(0x17a))/0x2*(-parseInt(_0x1084b1(0x173))/0x3)+-parseInt(_0x1084b1(0x186))/0x4+parseInt(_0x1084b1(0x189))/0x5*(-parseInt(_0x1084b1(0x17d))/0x6)+-parseInt(_0x1084b1(0x188))/0x7*(parseInt(_0x1084b1(0x176))/0x8)+parseInt(_0x1084b1(0x18c))/0x9*(parseInt(_0x1084b1(0x18a))/0xa)+parseInt(_0x1084b1(0x180))/0xb*(parseInt(_0x1084b1(0x17f))/0xc);if(_0x2fe6da===_0x265b34)break;else _0x146307['push'](_0x146307['shift']());}catch(_0x3d439c){_0x146307['push'](_0x146307['shift']());}}}(a28_0x32f7,0xcf2a4));import{createAppConfig,getAppConfigByKey,updateAppConfig}from'../../core/api-client.js';function a28_0x16d2(_0x352488,_0x1624e5){_0x352488=_0x352488-0x170;const _0x32f7d2=a28_0x32f7();let _0x16d244=_0x32f7d2[_0x352488];return _0x16d244;}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_0x1f5813(0x17c),UPDATE_PATH='/smartapi/app-config/update';export const appConfigSet={'service':a28_0x1f5813(0x182),'command':'set','description':a28_0x1f5813(0x170),'risk':a28_0x1f5813(0x177),'args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':'file','type':a28_0x1f5813(0x174),'description':'Read\x20config\x20value\x20from\x20file'}],async 'validate'(_0x483883){readKeyArg(_0x483883),readOptionalTags(_0x483883),assertSingleValueSource(_0x483883);},async 'dryRun'(_0x15f3a9){const _0x15e0c9=a28_0x1f5813,_0x4e1d89=readKeyArg(_0x15f3a9),_0x487d7b=readOptionalTags(_0x15f3a9),_0x10e59a=assertSingleValueSource(_0x15f3a9);await assertValueSourceReadable(_0x10e59a);const _0x2602a0=await withAppConfigApiBoundary('get',{'appCode':_0x15f3a9[_0x15e0c9(0x179)],'key':_0x4e1d89},()=>getAppConfigByKey(_0x15f3a9[_0x15e0c9(0x179)],_0x4e1d89)),_0x593e29=_0x2602a0?_0x15e0c9(0x187):_0x15e0c9(0x171),_0x46df82=_0x2602a0?projectAppConfig(_0x2602a0):null,_0x351278=plannedAppConfig({'appCode':_0x15f3a9['appCode'],'key':_0x4e1d89,'tags':_0x487d7b??_0x2602a0?.[_0x15e0c9(0x178)],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x593e29,'appCode':_0x15f3a9['appCode'],'key':_0x4e1d89,'before':_0x46df82,'after':_0x351278,'dryRun':!![]}),{'method':_0x15e0c9(0x17e),'url':_0x593e29===_0x15e0c9(0x187)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x11d16a){const _0x1b8877=a28_0x1f5813,_0x17c879=readKeyArg(_0x11d16a),_0x42fb40=readOptionalTags(_0x11d16a),_0x2a5da6=await withAppConfigApiBoundary(_0x1b8877(0x17b),{'appCode':_0x11d16a[_0x1b8877(0x179)],'key':_0x17c879},()=>getAppConfigByKey(_0x11d16a[_0x1b8877(0x179)],_0x17c879)),_0xc8ba5c=_0x2a5da6?projectAppConfig(_0x2a5da6):null,_0x24c34e=_0x2a5da6?_0x1b8877(0x187):_0x1b8877(0x171),{value:_0x551d2a,warnings:_0x4f83e0}=await readAppConfigValue(_0x11d16a),_0x9fab1d={'appCode':_0x11d16a[_0x1b8877(0x179)],'key':_0x17c879,'value':_0x551d2a,'tags':_0x42fb40??_0x2a5da6?.[_0x1b8877(0x178)]??undefined};await withAppConfigApiBoundary(_0x24c34e,{'appCode':_0x11d16a[_0x1b8877(0x179)],'key':_0x17c879},async()=>{const _0x52e540=_0x1b8877;_0x2a5da6?await updateAppConfig({..._0x9fab1d,'id':requireAppConfigId(_0x2a5da6,_0x17c879,_0x11d16a[_0x52e540(0x179)])}):await createAppConfig(_0x9fab1d);});const _0x589a44=await withAppConfigApiBoundary('get',{'appCode':_0x11d16a['appCode'],'key':_0x17c879},()=>getAppConfigByKey(_0x11d16a[_0x1b8877(0x179)],_0x17c879)),_0x138df3=_0x589a44?projectAppConfig(_0x589a44):plannedAppConfig({'appCode':_0x11d16a['appCode'],'key':_0x17c879,'tags':_0x9fab1d[_0x1b8877(0x178)],'hasValue':_0x551d2a!==''});return{'ok':!![],'data':buildMutationData({'operation':_0x24c34e,'appCode':_0x11d16a[_0x1b8877(0x179)],'key':_0x17c879,'before':_0xc8ba5c,'after':_0x138df3,'dryRun':![],'warnings':_0x4f83e0}),'message':(_0x24c34e===_0x1b8877(0x187)?_0x1b8877(0x172):_0x1b8877(0x18b))+'\x20app\x20config\x20'+_0x17c879};}};function requireAppConfigId(_0x2dfb10,_0x4d3886,_0x542d0b){const _0x19a120=a28_0x1f5813;if(typeof _0x2dfb10['id']===_0x19a120(0x181)&&Number['isFinite'](_0x2dfb10['id'])&&_0x2dfb10['id']>0x0)return _0x2dfb10['id'];throw CliErrors[_0x19a120(0x175)](_0x19a120(0x184)+_0x4d3886+_0x19a120(0x185)+_0x542d0b);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a29_0x355727=a29_0x5a14;(function(_0x502203,_0x199117){const _0x216a5b=a29_0x5a14,_0x233136=_0x502203();while(!![]){try{const _0x2aabe8=parseInt(_0x216a5b(0x16d))/0x1+-parseInt(_0x216a5b(0x19f))/0x2+parseInt(_0x216a5b(0x177))/0x3*(-parseInt(_0x216a5b(0x17a))/0x4)+parseInt(_0x216a5b(0x184))/0x5*(-parseInt(_0x216a5b(0x173))/0x6)+parseInt(_0x216a5b(0x17f))/0x7*(parseInt(_0x216a5b(0x176))/0x8)+-parseInt(_0x216a5b(0x18f))/0x9*(parseInt(_0x216a5b(0x19a))/0xa)+-parseInt(_0x216a5b(0x160))/0xb*(-parseInt(_0x216a5b(0x174))/0xc);if(_0x2aabe8===_0x199117)break;else _0x233136['push'](_0x233136['shift']());}catch(_0x2311da){_0x233136['push'](_0x233136['shift']());}}}(a29_0x3ad9,0xb5501));import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':a29_0x355727(0x162),'description':'Runtime\x20app-config\x20key','required':!![]};export const VALUE_ARG={'name':a29_0x355727(0x18c),'description':a29_0x355727(0x161),'required':![]};export const TAGS_FLAG={'name':a29_0x355727(0x18d),'type':a29_0x355727(0x1a1),'description':a29_0x355727(0x17b)};export const STDIN_FLAG={'name':a29_0x355727(0x17e),'type':a29_0x355727(0x167),'description':a29_0x355727(0x168),'default':![]};export const FROM_ENV_FLAG={'name':a29_0x355727(0x195),'type':a29_0x355727(0x1a1),'description':'Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable'};export const REVEAL_FLAG={'name':a29_0x355727(0x175),'type':a29_0x355727(0x167),'description':a29_0x355727(0x19b),'default':![]};export function readKeyArg(_0x29d713){const _0x4e9b2a=a29_0x355727,_0x3efe21=_0x29d713['args'][0x0]?.[_0x4e9b2a(0x16a)]()??'';return validateKey(_0x3efe21),_0x3efe21;}export function readOptionalTags(_0x421a3c){const _0x160293=a29_0x355727,_0x315571=_0x421a3c[_0x160293(0x191)](_0x160293(0x18d))[_0x160293(0x16a)]();if(!_0x315571)return undefined;if(_0x315571[_0x160293(0x18e)]>0x20)throw CliErrors[_0x160293(0x179)](_0x160293(0x16e));return _0x315571;}export function validateKey(_0x24dc49){const _0x36f1fc=a29_0x355727;if(!_0x24dc49)throw CliErrors[_0x36f1fc(0x179)]('Missing\x20app-config\x20key.');if(_0x24dc49[_0x36f1fc(0x18e)]>0x100)throw CliErrors[_0x36f1fc(0x179)](_0x36f1fc(0x188));}export function projectAppConfig(_0x254104,_0x4ef233){const _0xcfc3ef=a29_0x355727,_0x24d52b=_0x254104[_0xcfc3ef(0x18c)]!==undefined&&_0x254104['value']!==null&&_0x254104[_0xcfc3ef(0x18c)]!=='',_0x219c7e={'appCode':_0x254104[_0xcfc3ef(0x194)],'key':_0x254104[_0xcfc3ef(0x162)],'tags':_0x254104[_0xcfc3ef(0x18d)]??undefined,'hasValue':_0x24d52b,'valueRedacted':_0x24d52b&&!_0x4ef233?.[_0xcfc3ef(0x175)],'gmtCreate':_0x254104['gmtCreate'],'gmtModified':_0x254104[_0xcfc3ef(0x187)]};return _0x4ef233?.[_0xcfc3ef(0x175)]&&(_0x219c7e['value']=_0x254104[_0xcfc3ef(0x18c)]??'',_0x219c7e[_0xcfc3ef(0x18a)]=![]),_0x219c7e;}export function plannedAppConfig(_0x1dbc75){const _0x461ec5=a29_0x355727,_0x2630ea=_0x1dbc75[_0x461ec5(0x169)]??!![];return{'appCode':_0x1dbc75[_0x461ec5(0x194)],'key':_0x1dbc75['key'],'tags':_0x1dbc75[_0x461ec5(0x18d)]??undefined,'hasValue':_0x2630ea,'valueRedacted':_0x2630ea};}export function buildMutationData(_0x56275f){const _0x3fe3ec=a29_0x355727;return{'operation':_0x56275f[_0x3fe3ec(0x19d)],'selector':{'appCode':_0x56275f[_0x3fe3ec(0x194)],'key':_0x56275f[_0x3fe3ec(0x162)]},'before':_0x56275f[_0x3fe3ec(0x180)],'after':_0x56275f[_0x3fe3ec(0x192)],'dryRun':_0x56275f['dryRun'],'warnings':_0x56275f['warnings']??[]};}export async function withAppConfigApiBoundary(_0x148457,_0x4f6108,_0x4fcc1b){const _0xffd6dc=a29_0x355727;try{return await _0x4fcc1b();}catch{const _0x327faf=['appCode:\x20'+_0x4f6108[_0xffd6dc(0x194)]];if(_0x4f6108['key'])_0x327faf[_0xffd6dc(0x178)](_0xffd6dc(0x199)+_0x4f6108['key']);_0x327faf['push'](_0xffd6dc(0x182));throw CliErrors[_0xffd6dc(0x170)](_0xffd6dc(0x189)+_0x148457+'\x20app\x20config.',_0x327faf['join'](';\x20')+'.');}}export function asAppConfigDryRunResult(_0x2a682d,_0x13c1d9){const _0x2c0059=a29_0x355727;return Object['defineProperties'](_0x2a682d,{'method':{'value':_0x13c1d9[_0x2c0059(0x19c)],'enumerable':![]},'url':{'value':_0x13c1d9[_0x2c0059(0x16f)],'enumerable':![]}});}export function assertSingleValueSource(_0xff6f0a){const _0x3a3167=a29_0x355727,_0x47fbf7=[];_0xff6f0a[_0x3a3167(0x16b)]['length']>0x1&&_0x47fbf7[_0x3a3167(0x178)]({'kind':'argument','value':_0xff6f0a[_0x3a3167(0x16b)][_0x3a3167(0x166)](0x1)[_0x3a3167(0x196)]('\x20')});const _0x2012d0=_0xff6f0a['flag'](_0x3a3167(0x18c));_0x2012d0!==undefined&&_0x2012d0!==null&&_0x47fbf7[_0x3a3167(0x178)]({'kind':_0x3a3167(0x1a0),'value':String(_0x2012d0)});_0xff6f0a[_0x3a3167(0x172)](_0x3a3167(0x17e))&&_0x47fbf7['push']({'kind':_0x3a3167(0x17e)});const _0x55eba8=_0xff6f0a[_0x3a3167(0x191)]('from-env')[_0x3a3167(0x16a)]();_0x55eba8&&_0x47fbf7['push']({'kind':_0x3a3167(0x183),'name':_0x55eba8});const _0x5de8a9=_0xff6f0a[_0x3a3167(0x191)](_0x3a3167(0x197))[_0x3a3167(0x16a)]();_0x5de8a9&&_0x47fbf7[_0x3a3167(0x178)]({'kind':_0x3a3167(0x197),'path':_0x5de8a9});if(_0x47fbf7[_0x3a3167(0x18e)]===0x0)throw CliErrors['validation'](_0x3a3167(0x16c),_0x3a3167(0x164));if(_0x47fbf7[_0x3a3167(0x18e)]>0x1)throw CliErrors[_0x3a3167(0x179)]('App\x20config\x20value\x20source\x20is\x20ambiguous.',_0x3a3167(0x190));return _0x47fbf7[0x0];}function a29_0x5a14(_0x18e03f,_0x5c415d){_0x18e03f=_0x18e03f-0x160;const _0x3ad972=a29_0x3ad9();let _0x5a14b9=_0x3ad972[_0x18e03f];return _0x5a14b9;}export async function assertValueSourceReadable(_0x2e1fe0){const _0x132ab5=a29_0x355727;if(_0x2e1fe0[_0x132ab5(0x186)]===_0x132ab5(0x183)&&!(_0x2e1fe0[_0x132ab5(0x171)]in process.env))throw CliErrors[_0x132ab5(0x179)](_0x132ab5(0x165)+_0x2e1fe0[_0x132ab5(0x171)]);if(_0x2e1fe0[_0x132ab5(0x186)]==='file')try{await access(_0x2e1fe0[_0x132ab5(0x198)]);}catch{throw CliErrors['validation'](_0x132ab5(0x18b)+_0x2e1fe0['path']);}}export async function readAppConfigValue(_0x4b8a75){const _0x1cdd5d=a29_0x355727,_0x3406ab=assertSingleValueSource(_0x4b8a75),_0xdde668=[];if(_0x3406ab['kind']===_0x1cdd5d(0x1a0))return _0xdde668['push'](_0x1cdd5d(0x163)),{'value':_0x3406ab['value']??'','source':_0x3406ab[_0x1cdd5d(0x186)],'warnings':_0xdde668};if(_0x3406ab[_0x1cdd5d(0x186)]===_0x1cdd5d(0x17e))return{'value':await readStdin(),'source':_0x3406ab[_0x1cdd5d(0x186)],'warnings':_0xdde668};if(_0x3406ab[_0x1cdd5d(0x186)]===_0x1cdd5d(0x183)){if(!(_0x3406ab[_0x1cdd5d(0x171)]in process.env))throw CliErrors[_0x1cdd5d(0x179)](_0x1cdd5d(0x165)+_0x3406ab[_0x1cdd5d(0x171)]);return{'value':process.env[_0x3406ab.name]??'','source':_0x3406ab['kind'],'warnings':_0xdde668};}return{'value':await readFile(_0x3406ab[_0x1cdd5d(0x198)],_0x1cdd5d(0x17c)),'source':_0x3406ab[_0x1cdd5d(0x186)],'warnings':_0xdde668};}function readStdin(){return new Promise((_0x17a6ee,_0x2fcba6)=>{const _0x192d07=a29_0x5a14;let _0x15ade1='';process['stdin'][_0x192d07(0x19e)](_0x192d07(0x17c)),process[_0x192d07(0x17e)]['on'](_0x192d07(0x17d),_0x16598b=>{_0x15ade1+=_0x16598b;}),process[_0x192d07(0x17e)][_0x192d07(0x185)](_0x192d07(0x193),()=>_0x17a6ee(_0x15ade1)),process[_0x192d07(0x17e)]['once'](_0x192d07(0x181),_0x2fcba6);});}function a29_0x3ad9(){const _0x416869=['utf8','data','stdin','7zLgOUk','before','error','value\x20is\x20redacted','env','223810viSoKk','once','kind','gmtModified','App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.','Failed\x20to\x20','valueRedacted','Value\x20file\x20is\x20not\x20readable:\x20','value','tags','length','413541OVQVCa','Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','str','after','end','appCode','from-env','join','file','path','key:\x20','80HdnDDX','Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','method','operation','setEncoding','923172ZSvPDP','argument','string','7557RCdeZe','Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','key','Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','Environment\x20variable\x20is\x20not\x20set:\x20','slice','boolean','Read\x20config\x20value\x20from\x20stdin','hasValue','trim','args','Missing\x20app-config\x20value\x20source.','240054bHvoVb','App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.','url','apiError','name','bool','18ZpBCKL','21636RxHvar','reveal','4708688wxpDFY','12Mvaezi','push','validation','361180vKrNgk','Config\x20tags\x20for\x20filtering/display\x20metadata'];a29_0x3ad9=function(){return _0x416869;};return a29_0x3ad9();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a30_0x32e102=a30_0x19b9;function a30_0x19b9(_0x586016,_0x27bcf6){_0x586016=_0x586016-0x16e;const _0x266450=a30_0x2664();let _0x19b986=_0x266450[_0x586016];return _0x19b986;}(function(_0x126798,_0x11eb34){const _0x55ba15=a30_0x19b9,_0x4249a2=_0x126798();while(!![]){try{const _0xfb3c85=-parseInt(_0x55ba15(0x16f))/0x1*(parseInt(_0x55ba15(0x181))/0x2)+parseInt(_0x55ba15(0x182))/0x3+-parseInt(_0x55ba15(0x176))/0x4+parseInt(_0x55ba15(0x17b))/0x5*(parseInt(_0x55ba15(0x16e))/0x6)+-parseInt(_0x55ba15(0x172))/0x7+parseInt(_0x55ba15(0x170))/0x8*(parseInt(_0x55ba15(0x17f))/0x9)+parseInt(_0x55ba15(0x178))/0xa*(parseInt(_0x55ba15(0x180))/0xb);if(_0xfb3c85===_0x11eb34)break;else _0x4249a2['push'](_0x4249a2['shift']());}catch(_0x16c381){_0x4249a2['push'](_0x4249a2['shift']());}}}(a30_0x2664,0x38c2c));function a30_0x2664(){const _0x322c88=['log','24luiigO','137524JcHQgo','2288pHLmmX','boolean','1505462RiEvAW','auth','bool','yes','1833648RXZriQ','logout','10nFaBSv','✓\x20Logged\x20out','write','184705LjnzKs','!\x20Not\x20logged\x20in','Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','../../auth/auth-server-ui.js','2079DFpIer','10446040Bfzblu','4wPIcNx','52644lyzYLR'];a30_0x2664=function(){return _0x322c88;};return a30_0x2664();}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':'auth','command':'login','description':'Login\x20via\x20browser','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a30_0x32e102(0x175),'type':a30_0x32e102(0x171),'description':a30_0x32e102(0x17d),'default':![]}],async 'execute'(_0x42eda6){const _0x2a13eb=a30_0x32e102,{runAuthServer:_0x582ac6}=await import(_0x2a13eb(0x17e));return await _0x582ac6({'autoYes':_0x42eda6[_0x2a13eb(0x174)](_0x2a13eb(0x175)),'nonInteractive':_0x42eda6['nonInteractive']}),{'ok':!![]};}},{'service':a30_0x32e102(0x173),'command':a30_0x32e102(0x177),'description':'Clear\x20login\x20session','risk':a30_0x32e102(0x17a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x3e8b46){const _0x5ab494=a30_0x32e102;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x5ab494(0x183)](_0x5ab494(0x179))):console[_0x5ab494(0x183)](_0x5ab494(0x17c)),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a31_0x20bfb7=a31_0x33b6;(function(_0x5bf272,_0x45b8d4){const _0x5e9592=a31_0x33b6,_0x5df40f=_0x5bf272();while(!![]){try{const _0x353d23=parseInt(_0x5e9592(0x1f7))/0x1+-parseInt(_0x5e9592(0x1ea))/0x2*(-parseInt(_0x5e9592(0x1d5))/0x3)+parseInt(_0x5e9592(0x1fb))/0x4*(-parseInt(_0x5e9592(0x1d8))/0x5)+-parseInt(_0x5e9592(0x1d1))/0x6+parseInt(_0x5e9592(0x1e8))/0x7+-parseInt(_0x5e9592(0x1db))/0x8*(-parseInt(_0x5e9592(0x1fd))/0x9)+parseInt(_0x5e9592(0x1ff))/0xa*(-parseInt(_0x5e9592(0x1cc))/0xb);if(_0x353d23===_0x45b8d4)break;else _0x5df40f['push'](_0x5df40f['shift']());}catch(_0x45ee91){_0x5df40f['push'](_0x5df40f['shift']());}}}(a31_0x3662,0xe0507));import{createInterface}from'node:readline';function a31_0x3662(){const _0x3cba9c=['appCode',']\x20(','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','isInteger','ENDPOINT','\x20api\x20pull`\x20to\x20refresh.','\x0a\x20*\x20[触发节点]\x20','alias','1259972XYNQnY','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','Operation\x20type\x20(HOOK\x20only)','Available:\x20','842060QCLOvB','join','9nMWiaZ','UNKNOWN','128290qWHlLL','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','Select\x20trigger\x20node:','.js\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Input\x20parameters.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Processing\x20result.\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','functionNode','after','includes','/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','COMMON','\x0a\x20*\x20[脚本名称]\x20','bff','scriptsRootDir','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','TODO:\x20add\x20script\x20description','type','datasetcode','Invalid\x20dataset\x20selection.','tableName','No\x20datasets\x20found\x20for\x20this\x20app.','HOOK','Created\x20','No\x20operation\x20types\x20found\x20for\x20dataset\x20','map','validation','Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','operationType','find','apiDir','Available\x20aliases:\x20','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','source','nonInteractive','description','/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','\x22\x20not\x20found\x20for\x20dataset\x20','Select\x20dataset:','length','function-node','No\x20api.ts\x20found.\x20Run\x20`','datasetCode','1507jLfwOf','\x20function:\x20','stderr','File\x20already\x20exists:\x20','code','4785294iYzKHu','Script\x20type','name','str','2099283SIyYiG','write','Invalid\x20function\x20name\x20\x22','25GHFIBf','Function\x20name\x20(valid\x20JS\x20identifier)','Select\x20operation\x20type:','6172392DeGWqr','before','.js','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','string','operation-type','\x22.\x20','\x22\x20not\x20found.\x20','parseInt','\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Current\x20request\x20params\x20or\x20response\x20result.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Modified\x20params\x20object.\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','Trigger\x20node\x20(HOOK\x20only)','stdin','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','12566442VMTsJW','utf8','2uAPmSf','\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Request\x20parameters.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Business\x20result\x20(wrapped\x20in\x20response.data).\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','entries','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.'];a31_0x3662=function(){return _0x3cba9c;};return a31_0x3662();}import{mkdir,writeFile}from'node:fs/promises';import{dirname,join}from'node:path';import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';import{isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';function a31_0x33b6(_0x5c5e4a,_0x305114){_0x5c5e4a=_0x5c5e4a-0x1a7;const _0x36629f=a31_0x3662();let _0x33b6f8=_0x36629f[_0x5c5e4a];return _0x33b6f8;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const bffCreate={'service':a31_0x20bfb7(0x1ad),'command':'create','description':a31_0x20bfb7(0x1bb),'risk':a31_0x20bfb7(0x1d6),'flags':[{'name':a31_0x20bfb7(0x1b1),'type':a31_0x20bfb7(0x1df),'required':!![],'enum':['COMMON','ENDPOINT','HOOK'],'description':a31_0x20bfb7(0x1d2)},{'name':a31_0x20bfb7(0x1d3),'type':'string','required':!![],'description':a31_0x20bfb7(0x1d9)},{'name':'description','type':a31_0x20bfb7(0x1df),'description':'Script\x20description'},{'name':a31_0x20bfb7(0x1f6),'type':'string','description':a31_0x20bfb7(0x1ed)},{'name':a31_0x20bfb7(0x1b2),'type':a31_0x20bfb7(0x1df),'description':a31_0x20bfb7(0x1f1)},{'name':a31_0x20bfb7(0x1e0),'type':a31_0x20bfb7(0x1df),'description':a31_0x20bfb7(0x1f9)},{'name':a31_0x20bfb7(0x1c9),'type':'string','description':a31_0x20bfb7(0x1e5),'enum':[a31_0x20bfb7(0x1dc),a31_0x20bfb7(0x1a8)]}],async 'validate'(_0xd23b5b){const _0x21aa0d=a31_0x20bfb7,_0x414b0e=_0xd23b5b[_0x21aa0d(0x1d4)](_0x21aa0d(0x1d3));if(!isValidBffFunctionName(_0x414b0e))throw CliErrors[_0x21aa0d(0x1ba)](_0x21aa0d(0x1d7)+_0x414b0e+'\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).');},async 'execute'(_0x24a821){const _0x3193b6=a31_0x20bfb7,_0x58b407=loadBffProjectConfig(_0x24a821[_0x3193b6(0x1ef)]),_0x593086=_0x24a821[_0x3193b6(0x1d4)]('type'),_0x501da9=_0x24a821[_0x3193b6(0x1d4)](_0x3193b6(0x1d3)),_0x2bcb29=_0x24a821[_0x3193b6(0x1d4)](_0x3193b6(0x1c4))||undefined,_0x1c1a6d=_0x593086===_0x3193b6(0x1b6)?await resolveHookOptions(_0x58b407,_0x24a821):undefined,_0x24a993=buildFilePath(_0x58b407,_0x593086,_0x501da9,_0x1c1a6d);if(await fileExists(_0x24a993))throw CliErrors['validation'](_0x3193b6(0x1cf)+_0x24a993);await mkdir(dirname(_0x24a993),{'recursive':!![]});const _0x57c9c0=generateTemplate(_0x593086,_0x501da9,_0x24a821['appCode'],_0x2bcb29,_0x1c1a6d);await writeFile(_0x24a993,_0x57c9c0,_0x3193b6(0x1e9));const _0x415c6b={'type':_0x593086,'name':_0x501da9,'path':_0x24a993};if(_0x2bcb29)_0x415c6b['description']=_0x2bcb29;if(_0x1c1a6d){if(_0x1c1a6d['alias'])_0x415c6b[_0x3193b6(0x1f6)]=_0x1c1a6d[_0x3193b6(0x1f6)];_0x415c6b['datasetCode']=_0x1c1a6d[_0x3193b6(0x1cb)],_0x415c6b[_0x3193b6(0x1bd)]=_0x1c1a6d[_0x3193b6(0x1bd)],_0x415c6b[_0x3193b6(0x1a7)]=_0x1c1a6d['functionNode'];}return{'ok':!![],'data':_0x415c6b,'message':_0x3193b6(0x1b7)+_0x593086+_0x3193b6(0x1cd)+_0x501da9};}};async function resolveHookOptions(_0x4f10b6,_0xe8c985){const _0x5b51e4=a31_0x20bfb7,_0x497d1e=loadAliasMap(_0xe8c985[_0x5b51e4(0x1bf)],undefined,resolveApiFilePath(_0xe8c985[_0x5b51e4(0x1bf)],_0xe8c985['appCode'])),_0x4b6ef3=_0x497d1e[_0x5b51e4(0x1c8)]>0x0;let _0x5e344e,_0x4d096f,_0x1a15e1;const _0x591135=_0xe8c985['str'](_0x5b51e4(0x1f6)),_0x58df81=_0xe8c985[_0x5b51e4(0x1d4)](_0x5b51e4(0x1b2));if(_0x591135){const _0x17a37b=resolveAlias(_0xe8c985[_0x5b51e4(0x1bf)],_0x591135,undefined,resolveApiFilePath(_0xe8c985[_0x5b51e4(0x1bf)],_0xe8c985[_0x5b51e4(0x1ef)]));if(!_0x17a37b){const _0x57724c=_0x4b6ef3?_0x5b51e4(0x1c0)+_0x497d1e[_0x5b51e4(0x1b9)](_0x2cadbc=>_0x2cadbc[_0x5b51e4(0x1f6)])[_0x5b51e4(0x1fc)](',\x20'):_0x5b51e4(0x1ca)+CLI_BIN_NAME+'\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.';throw CliErrors[_0x5b51e4(0x1ba)]('Alias\x20\x22'+_0x591135+_0x5b51e4(0x1e2)+_0x57724c);}_0x5e344e=_0x591135,_0x4d096f=_0x17a37b;}else{if(_0x58df81){_0x4d096f=_0x58df81;const _0x478775=_0x497d1e['find'](_0x51b028=>_0x51b028['datasetCode']===_0x58df81);_0x5e344e=_0x478775?.[_0x5b51e4(0x1f6)];}else{if(_0xe8c985[_0x5b51e4(0x1c3)])throw CliErrors[_0x5b51e4(0x1ba)](_0x5b51e4(0x1bc));else{if(_0x4b6ef3){const _0x1da909=_0x497d1e[_0x5b51e4(0x1b9)](_0x5cf173=>_0x5cf173[_0x5b51e4(0x1f6)]+'\x20('+_0x5cf173[_0x5b51e4(0x1b4)]+')'),_0x17c6cf=await promptSelect(_0x5b51e4(0x1c7),_0x1da909),_0x431a79=_0x497d1e[_0x17c6cf];if(!_0x431a79)throw CliErrors[_0x5b51e4(0x1ba)](_0x5b51e4(0x1b3));_0x5e344e=_0x431a79[_0x5b51e4(0x1f6)],_0x4d096f=_0x431a79['datasetCode'];}else{const _0x2a20c3=await listDatasets(_0xe8c985[_0x5b51e4(0x1ef)]);if(_0x2a20c3['length']===0x0)throw CliErrors['validation'](_0x5b51e4(0x1b5));const _0x5f5227=_0x2a20c3[_0x5b51e4(0x1b9)](_0x1f9075=>_0x1f9075[_0x5b51e4(0x1d3)]+'\x20['+(_0x1f9075[_0x5b51e4(0x1c2)]??_0x5b51e4(0x1fe))+_0x5b51e4(0x1f0)+_0x1f9075[_0x5b51e4(0x1d0)]+')'),_0x41111c=await promptSelect('Select\x20dataset:',_0x5f5227),_0x131466=_0x2a20c3[_0x41111c];if(!_0x131466)throw CliErrors['validation']('Invalid\x20dataset\x20selection.');_0x4d096f=_0x131466[_0x5b51e4(0x1d0)],_0x5e344e=undefined;}}}}const _0x524bab=await listDatasets(_0xe8c985[_0x5b51e4(0x1ef)]),_0x6a34cf=_0x524bab[_0x5b51e4(0x1be)](_0xc5d9d8=>_0xc5d9d8[_0x5b51e4(0x1d0)]===_0x4d096f);if(!_0x6a34cf)throw CliErrors[_0x5b51e4(0x1ba)]('Dataset\x20not\x20found\x20for\x20code\x20\x22'+_0x4d096f+_0x5b51e4(0x1e1)+(_0x5e344e?'The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`'+CLI_BIN_NAME+_0x5b51e4(0x1f4):''));_0x1a15e1=_0x6a34cf['id'];const _0x43cf36=_0x5e344e??_0x4d096f,_0x562976=await listBffDatasetOperations(_0xe8c985[_0x5b51e4(0x1ef)],_0x1a15e1),_0x1c839d=_0x562976?Object['keys'](_0x562976):[];if(_0x1c839d[_0x5b51e4(0x1c8)]===0x0)throw CliErrors[_0x5b51e4(0x1ba)](_0x5b51e4(0x1b8)+_0x43cf36+'.');let _0x46d9b9;const _0x2a3123=_0xe8c985[_0x5b51e4(0x1d4)](_0x5b51e4(0x1e0));if(_0x2a3123){if(!_0x1c839d[_0x5b51e4(0x1a9)](_0x2a3123))throw CliErrors[_0x5b51e4(0x1ba)]('Operation\x20type\x20\x22'+_0x2a3123+_0x5b51e4(0x1c6)+_0x43cf36+'.\x20'+(_0x5b51e4(0x1fa)+_0x1c839d[_0x5b51e4(0x1fc)](',\x20')));_0x46d9b9=_0x2a3123;}else{if(_0xe8c985['nonInteractive'])throw CliErrors['validation'](_0x5b51e4(0x1af));const _0x4d37d6=await promptSelect(_0x5b51e4(0x1da),_0x1c839d);_0x46d9b9=_0x1c839d[_0x4d37d6]??_0x1c839d[0x0];}let _0x563c97=normalizeHookFunctionNode(_0xe8c985[_0x5b51e4(0x1d4)](_0x5b51e4(0x1c9)));if(!_0x563c97){if(_0xe8c985['str']('function-node'))throw CliErrors['validation'](_0x5b51e4(0x1ee));if(_0xe8c985[_0x5b51e4(0x1c3)])throw CliErrors['validation'](_0x5b51e4(0x1de));const _0x595b50=await promptSelect(_0x5b51e4(0x201),[_0x5b51e4(0x1dc),_0x5b51e4(0x1a8)]);_0x563c97=[_0x5b51e4(0x1dc),_0x5b51e4(0x1a8)][_0x595b50]??_0x5b51e4(0x1dc);}return{'alias':_0x5e344e,'datasetCode':_0x4d096f,'datasetId':_0x1a15e1,'operationType':_0x46d9b9,'functionNode':_0x563c97};}async function promptSelect(_0x2b371c,_0x2e357d){const _0x756a2d=a31_0x20bfb7;if(_0x2e357d[_0x756a2d(0x1c8)]===0x1)return 0x0;for(const [_0x4e2bc5,_0x4b3bfe]of _0x2e357d[_0x756a2d(0x1ec)]()){process[_0x756a2d(0x1ce)]['write']('\x20\x20'+(_0x4e2bc5+0x1)+'.\x20'+_0x4b3bfe+'\x0a');}const _0x4edf98=createInterface({'input':process[_0x756a2d(0x1e6)],'output':process['stderr']});while(!![]){const _0x2ccc22=await new Promise(_0x130ac4=>{_0x4edf98['question'](_0x2b371c+'\x20',_0x130ac4);}),_0x1e1e9a=Number[_0x756a2d(0x1e3)](_0x2ccc22['trim'](),0xa);if(Number[_0x756a2d(0x1f2)](_0x1e1e9a)&&_0x1e1e9a>=0x1&&_0x1e1e9a<=_0x2e357d[_0x756a2d(0x1c8)])return _0x4edf98['close'](),_0x1e1e9a-0x1;process[_0x756a2d(0x1ce)][_0x756a2d(0x1d6)](_0x756a2d(0x1e7)+_0x2e357d['length']+'.\x0a');}}function buildFilePath(_0x3ddc53,_0x50fea8,_0x55688f,_0x284686){const _0x49da5a=a31_0x20bfb7;if(_0x50fea8===_0x49da5a(0x1b6)){if(!_0x284686)throw CliErrors[_0x49da5a(0x1ba)]('HOOK\x20requires\x20alias/operation/node\x20options.');const _0x891b2=_0x284686[_0x49da5a(0x1f6)]??_0x284686[_0x49da5a(0x1cb)];return join(_0x3ddc53['scriptsRootDir'],_0x49da5a(0x1b6),_0x891b2,_0x284686[_0x49da5a(0x1bd)],_0x284686[_0x49da5a(0x1a7)],_0x55688f+_0x49da5a(0x1dd));}return join(_0x3ddc53[_0x49da5a(0x1ae)],_0x50fea8,_0x55688f+_0x49da5a(0x1dd));}export function generateTemplate(_0x2183a9,_0x37b82f,_0x14cbbc,_0x23e6ee,_0x49ec76){const _0x286695=a31_0x20bfb7,_0x4b944f=_0x23e6ee?.['trim']()||_0x286695(0x1b0);if(_0x2183a9===_0x286695(0x1ab))return _0x286695(0x1c5)+_0x4b944f+_0x286695(0x1ac)+_0x37b82f+_0x286695(0x1f8)+_0x37b82f+_0x286695(0x202)+_0x37b82f+_0x286695(0x200);if(_0x2183a9===_0x286695(0x1f3))return'/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20'+_0x4b944f+'\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/'+_0x14cbbc+'/'+_0x37b82f+_0x286695(0x1eb)+_0x37b82f+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';if(!_0x49ec76)throw CliErrors['validation']('HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.');return _0x286695(0x1aa)+_0x4b944f+_0x286695(0x1c1)+_0x14cbbc+'/'+_0x49ec76[_0x286695(0x1cb)]+'/'+_0x49ec76['operationType']+_0x286695(0x1f5)+_0x49ec76['functionNode']+_0x286695(0x1e4)+_0x37b82f+_0x286695(0x200);}
|
|
1
|
+
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 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a32_0x19088f=a32_0x2495;(function(_0x5cb6a0,_0x1e40ba){const _0x1a9450=a32_0x2495,_0x4ac786=_0x5cb6a0();while(!![]){try{const _0x43da2d=-parseInt(_0x1a9450(0x7f))/0x1*(-parseInt(_0x1a9450(0x8a))/0x2)+parseInt(_0x1a9450(0xa0))/0x3+-parseInt(_0x1a9450(0xa3))/0x4+-parseInt(_0x1a9450(0x8d))/0x5+parseInt(_0x1a9450(0x8f))/0x6+-parseInt(_0x1a9450(0x95))/0x7*(-parseInt(_0x1a9450(0x83))/0x8)+-parseInt(_0x1a9450(0xa8))/0x9;if(_0x43da2d===_0x1e40ba)break;else _0x4ac786['push'](_0x4ac786['shift']());}catch(_0x5201e2){_0x4ac786['push'](_0x4ac786['shift']());}}}(a32_0x4e82,0x61c8a));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';function a32_0x4e82(){const _0x5aa8f2=['split','Lock\x20scope\x20for\x20app\x20\x22','Deleted\x20','/api/management/library/scripts/delete','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','4513642yecCEK','delete','target','map','functions','trashDir','trashedTo','validation','join','bff','replace','1791117OGzcru','apps','lockFilePath','528908ppwWWs','lastSync','length','stringify','appCode','7639731aZsmWN','Local\x20delete\x20not\x20settled\x20for\x20','high-risk-write','Would\x20delete\x20','\x20(local\x20file\x20moved\x20to\x20trash)','toISOString','includes','332785tfyjNN','Function\x20not\x20found:\x20','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','projectRoot','8wwixwE','BFF\x20lock\x20file\x20not\x20found.','str','No\x20lock\x20entry\x20found\x20for\x20\x22','<timestamp>','scriptsRoot','remoteId','4RFYtYg','Multiple\x20functions\x20match\x20\x22','startsWith','2706300GKXoaO','string','92718dpJJMt'];a32_0x4e82=function(){return _0x5aa8f2;};return a32_0x4e82();}import{deleteBffScript}from'../../core/api-client.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists,resolveLocalFilePathFromLockKey}from'../../core/bff/file-system.js';function a32_0x2495(_0x27526f,_0xa58428){_0x27526f=_0x27526f-0x7d;const _0x4e82cc=a32_0x4e82();let _0x249553=_0x4e82cc[_0x27526f];return _0x249553;}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_0x19088f(0x9e),'command':a32_0x19088f(0x96),'description':'Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','risk':a32_0x19088f(0xaa),'flags':[{'name':a32_0x19088f(0x97),'type':a32_0x19088f(0x8e),'required':!![],'description':'Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name'}],async 'validate'(_0xbd19d9){const _0x4cdf83=a32_0x19088f,_0xb1d964=loadBffProjectConfig(_0xbd19d9[_0x4cdf83(0xa7)]),_0x4d4ebb=await readBffLockFile(_0xb1d964['lockFilePath']);if(!_0x4d4ebb)throw CliErrors[_0x4cdf83(0x9c)]('BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.');},async 'dryRun'(_0x1cf07b){const _0x18f0fa=a32_0x19088f,_0xb54c7e=loadBffProjectConfig(_0x1cf07b['appCode']),_0x50a978=await readBffLockFile(_0xb54c7e[_0x18f0fa(0xa2)]);if(!_0x50a978)throw CliErrors[_0x18f0fa(0x9c)](_0x18f0fa(0x84));const {appLock:_0x3c365e}=ensureLockScope(_0x50a978,_0x1cf07b[_0x18f0fa(0xa7)],_0xb54c7e[_0x18f0fa(0x88)],_0x18f0fa(0x96)),_0x1c7fe2=_0x1cf07b[_0x18f0fa(0x85)](_0x18f0fa(0x97)),_0x20a9da=Object['keys'](_0x3c365e[_0x18f0fa(0x99)]),_0x5e82d7=resolveDeleteTarget(_0x1c7fe2,_0x20a9da),_0xbc6d44=_0x3c365e[_0x18f0fa(0x99)][_0x5e82d7];if(!_0xbc6d44)throw CliErrors[_0x18f0fa(0x9c)](_0x18f0fa(0x86)+_0x5e82d7+'\x22.');const _0x5733a3=resolveLocalFilePathFromLockKey(_0xb54c7e,_0x5e82d7),_0x15f5c1=relative(_0xb54c7e['projectRoot'],_0x5733a3),_0x278168=join(_0xb54c7e[_0x18f0fa(0x9a)],_0x18f0fa(0x87),_0x15f5c1);return{'method':'POST','url':_0x18f0fa(0x93),'body':{'appCode':_0x1cf07b['appCode'],'target':_0x5e82d7,'remoteId':_0xbc6d44[_0x18f0fa(0x89)],'localFilePath':_0x5733a3,'trashedPath':_0x278168},'description':_0x18f0fa(0xab)+_0x5e82d7+_0x18f0fa(0x94)};},async 'execute'(_0x1c3db2){const _0x26a0a5=a32_0x19088f,_0x24170e=loadBffProjectConfig(_0x1c3db2[_0x26a0a5(0xa7)]),_0xc2afb1=await readBffLockFile(_0x24170e[_0x26a0a5(0xa2)]);if(!_0xc2afb1)throw CliErrors[_0x26a0a5(0x9c)](_0x26a0a5(0x84));const {lockData:_0x278df6,appLock:_0x4befa2}=ensureLockScope(_0xc2afb1,_0x1c3db2[_0x26a0a5(0xa7)],_0x24170e[_0x26a0a5(0x88)],'delete'),_0x2aad6a=JSON['parse'](JSON[_0x26a0a5(0xa6)](_0x278df6)),_0x924899=_0x2aad6a['apps'][_0x1c3db2[_0x26a0a5(0xa7)]];if(!_0x924899)throw new Error(_0x26a0a5(0x91)+_0x1c3db2[_0x26a0a5(0xa7)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x500dcc=_0x1c3db2['str']('target'),_0x389d43=Object['keys'](_0x924899[_0x26a0a5(0x99)]),_0x21a720=resolveDeleteTarget(_0x500dcc,_0x389d43),_0x5069dc=_0x924899[_0x26a0a5(0x99)][_0x21a720];if(!_0x5069dc)throw CliErrors['validation']('No\x20lock\x20entry\x20found\x20for\x20\x22'+_0x21a720+'\x22.');await deleteBffScript(_0x5069dc[_0x26a0a5(0x89)]),delete _0x924899[_0x26a0a5(0x99)][_0x21a720],_0x924899[_0x26a0a5(0xa4)]=new Date()['toISOString'](),await writeBffLockFile(_0x24170e[_0x26a0a5(0xa2)],_0x2aad6a);const _0x2a2fef=resolveLocalFilePathFromLockKey(_0x24170e,_0x21a720);let _0x251f85;await fileExists(_0x2a2fef)&&(_0x251f85=await moveToTrash(_0x24170e[_0x26a0a5(0x82)],_0x24170e['trashDir'],_0x2a2fef),await cleanupEmptyDirectories(dirname(_0x2a2fef),_0x24170e['scriptsRootDir']));await waitForDeleteSettlement(_0x24170e['lockFilePath'],_0x1c3db2[_0x26a0a5(0xa7)],_0x21a720,_0x2a2fef),await sleep(0x96);const _0x54a187={'deleted':_0x21a720,'remoteId':_0x5069dc[_0x26a0a5(0x89)]};if(_0x251f85)_0x54a187[_0x26a0a5(0x9b)]=_0x251f85;return{'ok':!![],'data':_0x54a187,'message':_0x26a0a5(0x92)+_0x21a720+(_0x251f85?_0x26a0a5(0xac):'')};}};function resolveDeleteTarget(_0x8c812e,_0x5b4fcb){const _0x2f485a=a32_0x19088f;if(_0x8c812e[_0x2f485a(0x7e)]('/')){const _0x4fc288=_0x5b4fcb['find'](_0x1d71eb=>_0x1d71eb===_0x8c812e);if(!_0x4fc288)throw CliErrors['validation'](_0x2f485a(0x80)+_0x8c812e);return _0x4fc288;}const _0x1fc31b=_0x5b4fcb['filter'](_0xbd2dc4=>_0xbd2dc4[_0x2f485a(0x90)]('/')['at'](-0x1)===_0x8c812e);if(_0x1fc31b[_0x2f485a(0xa5)]===0x0)throw CliErrors[_0x2f485a(0x9c)](_0x2f485a(0x80)+_0x8c812e);if(_0x1fc31b[_0x2f485a(0xa5)]>0x1)throw CliErrors[_0x2f485a(0x9c)](_0x2f485a(0x8b)+_0x8c812e+_0x2f485a(0x81)+_0x1fc31b[_0x2f485a(0x98)](_0xfa7f67=>'\x20\x20-\x20'+_0xfa7f67)[_0x2f485a(0x9d)]('\x0a'));return _0x1fc31b[0x0];}async function moveToTrash(_0x2efeee,_0x24fa9d,_0xdf1254){const _0xed9c35=a32_0x19088f,_0x2dfa62=new Date()[_0xed9c35(0x7d)]()[_0xed9c35(0x9f)](/[:.]/g,'-'),_0x3f2083=relative(_0x2efeee,_0xdf1254),_0x189b1f=join(_0x24fa9d,_0x2dfa62,_0x3f2083);return await mkdir(dirname(_0x189b1f),{'recursive':!![]}),await rename(_0xdf1254,_0x189b1f),_0x189b1f;}async function cleanupEmptyDirectories(_0x2a8f1f,_0x1027c8){const _0xff6889=a32_0x19088f;let _0x3aebb7=resolve(_0x2a8f1f);const _0x18850f=resolve(_0x1027c8);while(_0x3aebb7[_0xff6889(0x8c)](''+_0x18850f+sep)||_0x3aebb7===_0x18850f){if(_0x3aebb7===_0x18850f)return;try{const _0x52f499=await readdir(_0x3aebb7);if(_0x52f499[_0xff6889(0xa5)]>0x0)return;await rmdir(_0x3aebb7);}catch{return;}_0x3aebb7=dirname(_0x3aebb7);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0x396068,_0x43a4c2,_0x37de4c,_0x5f0d1d){const _0x16cf2=a32_0x19088f;for(let _0x43d22b=0x0;_0x43d22b<DELETE_SETTLE_RETRY_COUNT;_0x43d22b+=0x1){const _0x308543=await readBffLockFile(_0x396068),_0x3f80a7=!!_0x308543?.[_0x16cf2(0xa1)]?.[_0x43a4c2]?.['functions']?.[_0x37de4c],_0x139ad7=await fileExists(_0x5f0d1d);if(!_0x3f80a7&&!_0x139ad7)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error(_0x16cf2(0xa9)+_0x37de4c+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a33_0x3ed843=a33_0x1025;(function(_0x1f66c9,_0x4dc61f){const _0x43b582=a33_0x1025,_0x2d5ed3=_0x1f66c9();while(!![]){try{const _0x1ed0ac=parseInt(_0x43b582(0x18d))/0x1+parseInt(_0x43b582(0x198))/0x2+parseInt(_0x43b582(0x197))/0x3+-parseInt(_0x43b582(0x193))/0x4*(-parseInt(_0x43b582(0x190))/0x5)+parseInt(_0x43b582(0x18f))/0x6*(parseInt(_0x43b582(0x19f))/0x7)+-parseInt(_0x43b582(0x196))/0x8+parseInt(_0x43b582(0x19e))/0x9*(-parseInt(_0x43b582(0x19c))/0xa);if(_0x1ed0ac===_0x4dc61f)break;else _0x2d5ed3['push'](_0x2d5ed3['shift']());}catch(_0x1c580b){_0x2d5ed3['push'](_0x2d5ed3['shift']());}}}(a33_0x4996,0x88654));import{getBffScriptInfo}from'../../core/api-client.js';function a33_0x4996(){const _0x14dce1=['Get\x20BFF\x20script\x20details\x20by\x20ID','description','291551tfBKaj','num','2847828MHhRyN','48665xGSuJn','(none)','Script\x20ID','376dGQEFn','detail','number','312648vkSdjc','1719852kRzSAn','1250362DynDfR','scriptType','verbose','bool','22817990IYtkhN','bff','9uGpHgJ','7cHSKyY'];a33_0x4996=function(){return _0x14dce1;};return a33_0x4996();}function a33_0x1025(_0x1263b9,_0x4a30ce){_0x1263b9=_0x1263b9-0x18c;const _0x4996e1=a33_0x4996();let _0x102575=_0x4996e1[_0x1263b9];return _0x102575;}export const bffDetail={'service':a33_0x3ed843(0x19d),'command':a33_0x3ed843(0x194),'description':a33_0x3ed843(0x1a0),'risk':'read','flags':[{'name':'id','type':a33_0x3ed843(0x195),'required':!![],'description':a33_0x3ed843(0x192)},{'name':'verbose','type':'boolean','description':'Return\x20full\x20raw\x20script\x20object'}],async 'execute'(_0x1bf383){const _0x5b7d58=a33_0x3ed843,_0x1e049e=await getBffScriptInfo(_0x1bf383[_0x5b7d58(0x18e)]('id')),_0x3c48d2=_0x1bf383[_0x5b7d58(0x19b)](_0x5b7d58(0x19a));if(_0x3c48d2)return{'ok':!![],'data':_0x1e049e};return{'ok':!![],'data':{'id':_0x1e049e['id'],'appCode':_0x1e049e['appCode'],'scriptType':_0x1e049e[_0x5b7d58(0x199)],'description':_0x1e049e[_0x5b7d58(0x18c)]||_0x5b7d58(0x191),'createdTime':_0x1e049e['createdTime']??'','updatedTime':_0x1e049e['updatedTime']??'','scriptContent':_0x1e049e['scriptContent']??''}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x400e3c,_0x20bc60){const _0x1f668f=a34_0x3351,_0x49cbee=_0x400e3c();while(!![]){try{const _0x2e35b4=parseInt(_0x1f668f(0x6c))/0x1*(parseInt(_0x1f668f(0x6f))/0x2)+parseInt(_0x1f668f(0x70))/0x3+-parseInt(_0x1f668f(0x74))/0x4+parseInt(_0x1f668f(0x6d))/0x5+-parseInt(_0x1f668f(0x72))/0x6*(-parseInt(_0x1f668f(0x73))/0x7)+parseInt(_0x1f668f(0x6e))/0x8+-parseInt(_0x1f668f(0x71))/0x9;if(_0x2e35b4===_0x20bc60)break;else _0x49cbee['push'](_0x49cbee['shift']());}catch(_0x2fcea5){_0x49cbee['push'](_0x49cbee['shift']());}}}(a34_0x5578,0xce4cd));function a34_0x3351(_0x3ca515,_0x319dd9){_0x3ca515=_0x3ca515-0x6c;const _0x5578aa=a34_0x5578();let _0x335110=_0x5578aa[_0x3ca515];return _0x335110;}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';function a34_0x5578(){const _0x189ffb=['7954850Zzoadg','7606544LVkVVd','4bqFdBa','2204052raFdgN','44601327yJfOXW','6ARFcEb','10034871hGKXNj','859292RkEnJe','652753gIYWIt'];a34_0x5578=function(){return _0x189ffb;};return a34_0x5578();}import{bffDelete}from'../../commands/bff/delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];
|
package/lib/commands/bff/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a35_0x570c47=a35_0xca76;(function(_0x214594,_0x2fd5bf){const _0x5f323e=a35_0xca76,_0x3591f4=_0x214594();while(!![]){try{const _0x46fd09=-parseInt(_0x5f323e(0xad))/0x1*(parseInt(_0x5f323e(0xae))/0x2)+parseInt(_0x5f323e(0xa1))/0x3+parseInt(_0x5f323e(0xbd))/0x4+-parseInt(_0x5f323e(0xa3))/0x5+parseInt(_0x5f323e(0xb3))/0x6*(parseInt(_0x5f323e(0xb9))/0x7)+-parseInt(_0x5f323e(0xb0))/0x8*(-parseInt(_0x5f323e(0xa6))/0x9)+parseInt(_0x5f323e(0xbc))/0xa;if(_0x46fd09===_0x2fd5bf)break;else _0x3591f4['push'](_0x3591f4['shift']());}catch(_0x260fc5){_0x3591f4['push'](_0x3591f4['shift']());}}}(a35_0x5536,0xb5d1c));import{listBffScripts}from'../../core/api-client.js';function a35_0xca76(_0x222786,_0x308497){_0x222786=_0x222786-0xa0;const _0x5536e7=a35_0x5536();let _0xca76f5=_0x5536e7[_0x222786];return _0xca76f5;}function a35_0x5536(){const _0x5530b4=['1302442sPyXts','list','301992BRHRqs','functionName','boolean','60gihMkd','map','verbose','scriptType','bool','No\x20BFF\x20scripts\x20found.','742084OxDpdm','Return\x20full\x20script\x20objects','string','416790YbnOVP','563280gtirOd','str','type','2720616gJxLyF','Script\x20type\x20filter','5985190kJdMmX','length','COMMON','261vGaUDB','(unnamed)','name','ENDPOINT','bff','description','appCode','2QcCeCq'];a35_0x5536=function(){return _0x5530b4;};return a35_0x5536();}export const bffList={'service':a35_0x570c47(0xaa),'command':a35_0x570c47(0xaf),'description':'List\x20BFF\x20scripts','risk':'read','flags':[{'name':a35_0x570c47(0xa0),'type':a35_0x570c47(0xbb),'description':a35_0x570c47(0xa2),'default':a35_0x570c47(0xa9),'enum':[a35_0x570c47(0xa9),a35_0x570c47(0xa5)]},{'name':a35_0x570c47(0xa8),'type':a35_0x570c47(0xbb),'description':'Filter\x20by\x20script\x20name'},{'name':a35_0x570c47(0xb5),'type':a35_0x570c47(0xb2),'description':a35_0x570c47(0xba)}],async 'execute'(_0x4cb4fc){const _0x3241cb=a35_0x570c47,_0x4b0462=await listBffScripts(_0x4cb4fc[_0x3241cb(0xac)],_0x4cb4fc[_0x3241cb(0xbe)](_0x3241cb(0xa0)),{'scriptName':_0x4cb4fc[_0x3241cb(0xbe)](_0x3241cb(0xa8))||undefined}),_0x27bad8=_0x4cb4fc[_0x3241cb(0xb7)](_0x3241cb(0xb5));return{'ok':!![],'data':_0x27bad8?_0x4b0462:_0x4b0462[_0x3241cb(0xb4)](_0x2ddc27=>({'id':_0x2ddc27['id'],'functionName':_0x2ddc27[_0x3241cb(0xb1)]??'','description':_0x2ddc27[_0x3241cb(0xab)]||_0x3241cb(0xa7),'scriptType':_0x2ddc27[_0x3241cb(0xb6)]})),'message':_0x4b0462[_0x3241cb(0xa4)]===0x0?_0x3241cb(0xb8):undefined};}};
|