@lovrabet/rabetbase-cli 2.3.10-beta.2 → 2.3.11-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -0
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/commands/app/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a20_0x546884=a20_0x3e39;(function(_0x2692db,_0x1209af){const _0x3483b7=a20_0x3e39,_0x4c4bc6=_0x2692db();while(!![]){try{const _0x5dfd14=-parseInt(_0x3483b7(0xf0))/0x1+-parseInt(_0x3483b7(0xfd))/0x2+-parseInt(_0x3483b7(0xfb))/0x3+-parseInt(_0x3483b7(0xe0))/0x4+-parseInt(_0x3483b7(0xe1))/0x5+parseInt(_0x3483b7(0xe2))/0x6*(parseInt(_0x3483b7(0xf5))/0x7)+-parseInt(_0x3483b7(0xfe))/0x8*(-parseInt(_0x3483b7(0xef))/0x9);if(_0x5dfd14===_0x1209af)break;else _0x4c4bc6['push'](_0x4c4bc6['shift']());}catch(_0x40605e){_0x4c4bc6['push'](_0x4c4bc6['shift']());}}}(a20_0x55a0,0x79ea0));import{readRawConfigWithLayers}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';function a20_0x3e39(_0x166d27,_0x2381cb){_0x166d27=_0x166d27-0xd7;const _0x55a060=a20_0x55a0();let _0x3e390d=_0x55a060[_0x166d27];return _0x3e390d;}import{buildAppProfileListFields}from'../../config/schema.js';import{appDefinedIn,enrichAppListItemsWithMergedSelection,resolveDefaultAppSource}from'../../commands/app/shared.js';function a20_0x55a0(){const _0x206b58=['map','length','appcode','2992257uDOyzU','globalConfig','441520zBWAPh','1163528MgTBWD','No\x20apps\x20configured','project','list','mergedCli','apps','entries','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','read','boolean','1649876qgrFim','4396910YIlULe','24djkVVr','remote','isCurrent','projectConfig','.\x20Use\x20`','defaultApp','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.','global','List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','find','projectPath','bool','globalPath','144yDLyRl','179094FiVsfq','merged','object','\x20config','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','1507499NnaKuR','\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','validation'];a20_0x55a0=function(){return _0x206b58;};return a20_0x55a0();}import{listRemoteAppDirectory}from'../../commands/app/remote-directory.js';function buildItemsFromLayer(_0x1b5d37,_0x458e4b){const _0xf34831=a20_0x3e39,_0x6756aa=[],_0x22f39b=_0x1b5d37[_0xf34831(0xdb)]&&typeof _0x1b5d37[_0xf34831(0xdb)]==='object'?_0x1b5d37[_0xf34831(0xdb)]:{},_0x17daf9=_0x1b5d37[_0xf34831(0xe7)]||undefined;for(const [_0x1a6a80,_0x41e02a]of Object[_0xf34831(0xdc)](_0x22f39b)){if(!_0x41e02a||typeof _0x41e02a!==_0xf34831(0xf2)||!_0x41e02a['appcode'])continue;_0x6756aa['push']({'name':_0x1a6a80,'appcode':_0x41e02a[_0xf34831(0xfa)],'named':!![],'definedIn':_0x458e4b,'isDefault':_0x1a6a80===_0x17daf9,...buildAppProfileListFields(_0x41e02a)});}return _0x6756aa;}function buildMergedItems(_0x528ffe,_0x2112b5){const _0x4d4d88=a20_0x3e39,{apps:apps={},defaultApp:_0x175c67}=_0x528ffe,_0x2c46d7=_0x2112b5[_0x4d4d88(0xfc)]['apps']&&typeof _0x2112b5[_0x4d4d88(0xfc)]['apps']===_0x4d4d88(0xf2)?_0x2112b5['globalConfig'][_0x4d4d88(0xdb)]:{},_0x56b671=_0x2112b5['projectConfig']['apps']&&typeof _0x2112b5[_0x4d4d88(0xe5)]['apps']==='object'?_0x2112b5['projectConfig'][_0x4d4d88(0xdb)]:{},_0x56553f=_0x2112b5['projectConfig']['inherit']===![],_0xdb73c2=Object['entries'](apps),_0x35e379=_0xdb73c2[_0x4d4d88(0xf8)](([_0x5f2e1b,_0x2248ad])=>({'name':_0x5f2e1b,'appcode':_0x2248ad['appcode'],'named':!![],'definedIn':appDefinedIn(_0x5f2e1b,_0x2c46d7,_0x56b671,_0x56553f),'isDefault':_0x5f2e1b===_0x175c67,...buildAppProfileListFields(_0x2248ad)}));return _0x35e379;}function validateAppListFlags(_0x3c076a){const _0x3bf0aa=a20_0x3e39;if(!_0x3c076a[_0x3bf0aa(0xed)]('remote'))return;if(!_0x3c076a['bool'](_0x3bf0aa(0xe9))&&!_0x3c076a[_0x3bf0aa(0xed)](_0x3bf0aa(0xd8)))return;throw CliErrors[_0x3bf0aa(0xf7)](_0x3bf0aa(0xdd),_0x3bf0aa(0xe8));}async function execute(_0x3938b0){const _0x18a39c=a20_0x3e39;validateAppListFlags(_0x3938b0);if(_0x3938b0[_0x18a39c(0xed)]('remote'))return{'ok':!![],'data':await listRemoteAppDirectory(_0x3938b0)};const _0x1c42bc=_0x3938b0[_0x18a39c(0xed)]('global'),_0x4a306e=_0x3938b0[_0x18a39c(0xed)](_0x18a39c(0xd8)),_0x363609=_0x1c42bc?_0x18a39c(0xe9):_0x4a306e?_0x18a39c(0xd8):_0x18a39c(0xf1),{config:_0x5545b5,layers:_0x1f3b7d}=readRawConfigWithLayers(),_0x5afde2=resolveDefaultAppSource(_0x1f3b7d),{defaultApp:_0xcd27f7}=_0x5545b5;let _0xbe5c56,_0x18c3d6;switch(_0x363609){case _0x18a39c(0xe9):_0xbe5c56=buildItemsFromLayer(_0x1f3b7d[_0x18a39c(0xfc)],_0x18a39c(0xe9)),_0x18c3d6=_0x1f3b7d[_0x18a39c(0xee)];break;case _0x18a39c(0xd8):_0xbe5c56=buildItemsFromLayer(_0x1f3b7d[_0x18a39c(0xe5)],_0x18a39c(0xd8)),_0x18c3d6=_0x1f3b7d[_0x18a39c(0xec)];break;default:_0xbe5c56=buildMergedItems(_0x5545b5,_0x1f3b7d);break;}enrichAppListItemsWithMergedSelection(_0xbe5c56,_0x3938b0[_0x18a39c(0xda)]);if(_0xbe5c56[_0x18a39c(0xf9)]===0x0){const _0x266353=_0x363609==='merged'?'':'\x20in\x20'+_0x363609+_0x18a39c(0xf3);return{'ok':!![],'data':[],'message':_0x18a39c(0xd7)+_0x266353+_0x18a39c(0xe6)+CLI_BIN_NAME+_0x18a39c(0xf6)};}const _0x2daa7f=_0xbe5c56[_0x18a39c(0xeb)](_0x260e74=>_0x260e74[_0x18a39c(0xe4)]===!![]),_0x5696a6=_0xcd27f7??_0x2daa7f?.[_0x18a39c(0xfa)]??null,_0x2649ff=_0x363609===_0x18a39c(0xf1)?{'globalPath':_0x1f3b7d[_0x18a39c(0xee)]??null,'projectPath':_0x1f3b7d['projectPath']??null,'defaultApp':_0x5696a6,'defaultAppSource':_0xcd27f7!=null?_0x5afde2:null}:{'scope':_0x363609,'configPath':_0x18c3d6??null};return{'ok':!![],'data':{'items':_0xbe5c56,'meta':_0x2649ff}};}export const appListDefinition={'service':'app','command':a20_0x546884(0xd9),'description':'List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','risk':a20_0x546884(0xde),'auth':'optional','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a20_0x546884(0xe3),'type':a20_0x546884(0xdf),'description':a20_0x546884(0xea),'default':![]},{'name':a20_0x546884(0xe9),'type':a20_0x546884(0xdf),'description':'Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','default':![]},{'name':a20_0x546884(0xd8),'type':'boolean','description':a20_0x546884(0xf4),'default':![]}],async 'validate'(_0x16d61e){validateAppListFlags(_0x16d61e);},'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2cb50f,_0x34c638){const _0x397a93=a21_0x2704,_0x4db24e=_0x2cb50f();while(!![]){try{const _0x2c2d16=-parseInt(_0x397a93(0x173))/0x1*(-parseInt(_0x397a93(0x170))/0x2)+-parseInt(_0x397a93(0x17a))/0x3*(parseInt(_0x397a93(0x16b))/0x4)+-parseInt(_0x397a93(0x174))/0x5+-parseInt(_0x397a93(0x179))/0x6+parseInt(_0x397a93(0x16f))/0x7+parseInt(_0x397a93(0x16d))/0x8*(-parseInt(_0x397a93(0x175))/0x9)+parseInt(_0x397a93(0x177))/0xa;if(_0x2c2d16===_0x34c638)break;else _0x4db24e['push'](_0x4db24e['shift']());}catch(_0x95989a){_0x4db24e['push'](_0x4db24e['shift']());}}}(a21_0x208f,0xb1eec));function a21_0x2704(_0x4e6a84,_0x379e7f){_0x4e6a84=_0x4e6a84-0x16b;const _0x208f64=a21_0x208f();let _0x2704eb=_0x208f64[_0x4e6a84];return _0x2704eb;}import{listRemoteApps}from'../../core/api-client.js';import{getCookie}from'../../auth/get-cookie.js';import{CliErrors}from'../../errors.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';function resolveCookie(_0x5d4b31){const _0x6f1cc5=a21_0x2704,_0x18db82=_0x5d4b31[_0x6f1cc5(0x178)]||getCookie();if(!_0x18db82)throw CliErrors[_0x6f1cc5(0x16e)]();return _0x18db82;}export async function listRemoteAppDirectory(_0x3c53d3){const _0x387186=a21_0x2704,_0xb3116f=await withActiveCookie(resolveCookie(_0x3c53d3),()=>listRemoteApps());return{'items':_0xb3116f[_0x387186(0x172)](_0x285f32=>({..._0x285f32['id']!=null?{'id':_0x285f32['id']}:{},'appCode':_0x285f32[_0x387186(0x16c)],'appName':_0x285f32[_0x387186(0x171)],..._0x285f32['appDesc']!=null?{'appDesc':_0x285f32[_0x387186(0x176)]}:{}})),'meta':{'source':'platform'}};}function a21_0x208f(){const _0x40261b=['10329NgIDwl','276uJkeus','appCode','1192eQdvnu','authRequired','8600039bueyrE','850218UUMKGc','appName','map','1NBLFHw','194155uiareB','86949pnNpba','appDesc','12832360jXmHHB','cookie','2953338sXaPmp'];a21_0x208f=function(){return _0x40261b;};return a21_0x208f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a22_0x507e(_0x38ef98,_0x31fc90){_0x38ef98=_0x38ef98-0x1d0;const _0x272fd6=a22_0x272f();let _0x507ef9=_0x272fd6[_0x38ef98];return _0x507ef9;}const a22_0x56b459=a22_0x507e;(function(_0x2e202c,_0x25c408){const _0x5bd4c9=a22_0x507e,_0x2423be=_0x2e202c();while(!![]){try{const _0x33fd79=parseInt(_0x5bd4c9(0x1d3))/0x1+parseInt(_0x5bd4c9(0x1e2))/0x2*(parseInt(_0x5bd4c9(0x1d8))/0x3)+-parseInt(_0x5bd4c9(0x1d6))/0x4*(-parseInt(_0x5bd4c9(0x1d9))/0x5)+-parseInt(_0x5bd4c9(0x1e1))/0x6+-parseInt(_0x5bd4c9(0x1e0))/0x7*(-parseInt(_0x5bd4c9(0x1dd))/0x8)+parseInt(_0x5bd4c9(0x1db))/0x9+-parseInt(_0x5bd4c9(0x1d1))/0xa*(parseInt(_0x5bd4c9(0x1df))/0xb);if(_0x33fd79===_0x25c408)break;else _0x2423be['push'](_0x2423be['shift']());}catch(_0x47c74a){_0x2423be['push'](_0x2423be['shift']());}}}(a22_0x272f,0x9510a));import{CLI_BIN_NAME}from'../../constant/cli.js';import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';function a22_0x272f(){const _0x350aef=['App\x20profile\x20name\x20to\x20remove','37748jsdBuG','app','171LvHeKD','255ylOrNy','remove','3989439YunHkj','app\x20remove','92712vFfTQp','2026-07','11dKdCxV','581xNDfGR','39228UsNjip','8124ucLnTN','high-risk-write','16957010LMffME','\x20workspace\x20remove','194830kvGjEc','Deprecated:\x20use\x20workspace\x20remove\x20to\x20remove\x20an\x20app\x20profile'];a22_0x272f=function(){return _0x350aef;};return a22_0x272f();}export const appRemoveDefinition={'service':a22_0x56b459(0x1d7),'command':a22_0x56b459(0x1da),'description':a22_0x56b459(0x1d4),'risk':a22_0x56b459(0x1d0),'requiresAuth':![],'requiresAppCode':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a22_0x56b459(0x1d2),'since':a22_0x56b459(0x1de)},'args':[{'name':'name','description':a22_0x56b459(0x1d5),'required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x354a69=>validateAppName(_0x354a69,'app\x20remove'),'execute':_0x378600=>runAppRemove(_0x378600,a22_0x56b459(0x1dc))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x8d12f4,_0x1ea67e){const _0x195e90=a23_0x3b0b,_0x1fb20f=_0x8d12f4();while(!![]){try{const _0x39153f=parseInt(_0x195e90(0x109))/0x1*(-parseInt(_0x195e90(0x118))/0x2)+-parseInt(_0x195e90(0x116))/0x3+parseInt(_0x195e90(0x105))/0x4+parseInt(_0x195e90(0x10b))/0x5*(parseInt(_0x195e90(0x10f))/0x6)+-parseInt(_0x195e90(0x100))/0x7+-parseInt(_0x195e90(0x11a))/0x8+-parseInt(_0x195e90(0x117))/0x9*(-parseInt(_0x195e90(0x110))/0xa);if(_0x39153f===_0x1ea67e)break;else _0x1fb20f['push'](_0x1fb20f['shift']());}catch(_0x3db270){_0x1fb20f['push'](_0x1fb20f['shift']());}}}(a23_0x1cbb,0xcf753));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';export function enrichAppListItemsWithMergedSelection(_0x4d330b,_0x211d9e){const _0x292344=a23_0x3b0b;if(!_0x211d9e)return;const _0x38f317=_0x211d9e[_0x292344(0x10a)]&&typeof _0x211d9e[_0x292344(0x10a)]===_0x292344(0x10d)?_0x211d9e[_0x292344(0x10a)]:{},_0x3a377e=Object['keys'](_0x38f317)[_0x292344(0x10e)]>0x0;for(const _0x174d7f of _0x4d330b){_0x174d7f[_0x292344(0x113)]=![];}const _0x1be60e=_0x211d9e[_0x292344(0x103)]!=null?String(_0x211d9e[_0x292344(0x103)])['trim']():'';if(_0x3a377e){const _0x4ca5ed=_0x211d9e[_0x292344(0xff)]??_0x211d9e[_0x292344(0x101)];if(_0x4ca5ed)for(const _0x401d1a of _0x4d330b){_0x401d1a[_0x292344(0x106)]===!![]&&_0x401d1a['name']===_0x4ca5ed&&(_0x401d1a[_0x292344(0x113)]=!![]);}for(const _0x2b2930 of _0x4d330b){if(_0x2b2930[_0x292344(0x106)]!==![])continue;if(_0x211d9e[_0x292344(0x101)])continue;_0x1be60e&&String(_0x2b2930['appcode']??'')[_0x292344(0x10c)]()===_0x1be60e&&(_0x2b2930['isCurrent']=!![]);}return;}if(!_0x1be60e)return;for(const _0x41714e of _0x4d330b){String(_0x41714e['appcode']??'')[_0x292344(0x10c)]()===_0x1be60e&&(_0x41714e[_0x292344(0x113)]=!![]);}}export function resolveAppScopeForWrite(_0x1dbe97,_0x235ff7,_0x3eea6a){const _0x1688f2=a23_0x3b0b;if(_0x235ff7)return _0x1688f2(0x104);const _0x20f01a=_0x3eea6a[_0x1688f2(0x107)][_0x1688f2(0x10a)]&&typeof _0x3eea6a['projectConfig']['apps']===_0x1688f2(0x10d)?_0x3eea6a[_0x1688f2(0x107)][_0x1688f2(0x10a)]:{},_0x38bdbe=_0x3eea6a[_0x1688f2(0x111)][_0x1688f2(0x10a)]&&typeof _0x3eea6a[_0x1688f2(0x111)][_0x1688f2(0x10a)]===_0x1688f2(0x10d)?_0x3eea6a['globalConfig']['apps']:{};if(Object[_0x1688f2(0x11b)][_0x1688f2(0x102)][_0x1688f2(0x119)](_0x20f01a,_0x1dbe97))return _0x1688f2(0x114);if(Object[_0x1688f2(0x11b)]['hasOwnProperty'][_0x1688f2(0x119)](_0x38bdbe,_0x1dbe97))return'global';return _0x1688f2(0x114);}export function appDefinedIn(_0x108058,_0x29f395,_0x5d89f3,_0x527ae9){const _0x53dae7=a23_0x3b0b;if(_0x527ae9)return Object[_0x53dae7(0x11b)][_0x53dae7(0x102)][_0x53dae7(0x119)](_0x5d89f3,_0x108058)?'project':'global';const _0x151899=Object[_0x53dae7(0x11b)][_0x53dae7(0x102)]['call'](_0x29f395,_0x108058),_0x187ad2=Object[_0x53dae7(0x11b)][_0x53dae7(0x102)]['call'](_0x5d89f3,_0x108058);if(_0x151899&&_0x187ad2)return _0x53dae7(0x115);if(_0x187ad2)return _0x53dae7(0x114);return _0x53dae7(0x104);}function a23_0x1cbb(){const _0x57a178=['1517830Eilvbn','globalConfig','inherit','isCurrent','project','both','4095321JBRKDm','216VLNnSq','72XQVvjd','call','10807528zXfFwL','prototype','currentApp','4449207TBOIPL','defaultApp','hasOwnProperty','appCode','global','870480euMass','named','projectConfig','\x20(global)','12422vxCnnW','apps','80xlZtnm','trim','object','length','295566SJKbNK'];a23_0x1cbb=function(){return _0x57a178;};return a23_0x1cbb();}export function resolveDefaultAppSource(_0x51db86){const _0x3bf4f3=a23_0x3b0b,_0xa2c0f2=_0x51db86[_0x3bf4f3(0x107)][_0x3bf4f3(0x10a)]&&typeof _0x51db86['projectConfig'][_0x3bf4f3(0x10a)]===_0x3bf4f3(0x10d)?_0x51db86[_0x3bf4f3(0x107)]['apps']:{};if('defaultApp'in _0x51db86['projectConfig'])return _0x3bf4f3(0x114);if(Object['keys'](_0xa2c0f2)[_0x3bf4f3(0x10e)]>0x0)return'project';if(_0x51db86[_0x3bf4f3(0x107)][_0x3bf4f3(0x112)]===![])return null;if(_0x51db86[_0x3bf4f3(0x111)][_0x3bf4f3(0x101)])return _0x3bf4f3(0x104);return null;}function a23_0x3b0b(_0x3aead9,_0x3c2cab){_0x3aead9=_0x3aead9-0xff;const _0x1cbb0b=a23_0x1cbb();let _0x3b0b68=_0x1cbb0b[_0x3aead9];return _0x3b0b68;}export function getConfigPath(_0x16be5b={}){const _0x5ad658=a23_0x3b0b,_0x3de490=_0x16be5b['global']?_0x5ad658(0x104):_0x5ad658(0x114);return resolveWriteConfigPath(_0x3de490);}export function readConfig(_0x2cd167={}){return readConfigFile(getConfigPath(_0x2cd167));}export function writeConfig(_0x2f768f,_0x4c652b={}){writeConfigFile(getConfigPath(_0x4c652b),_0x2f768f);}export function scopeLabel(_0x58dd0f){const _0xbe6701=a23_0x3b0b;return _0x58dd0f[_0xbe6701(0x104)]?_0xbe6701(0x108):'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a24_0x53599b=a24_0x1769;(function(_0x5a25de,_0xd094fb){const _0x4501b8=a24_0x1769,_0x2554d0=_0x5a25de();while(!![]){try{const _0x15aada=parseInt(_0x4501b8(0x1e7))/0x1*(-parseInt(_0x4501b8(0x1e5))/0x2)+-parseInt(_0x4501b8(0x1f4))/0x3*(-parseInt(_0x4501b8(0x1f6))/0x4)+parseInt(_0x4501b8(0x1f3))/0x5*(parseInt(_0x4501b8(0x1e4))/0x6)+-parseInt(_0x4501b8(0x1ef))/0x7*(-parseInt(_0x4501b8(0x1eb))/0x8)+parseInt(_0x4501b8(0x1f0))/0x9+-parseInt(_0x4501b8(0x1e6))/0xa*(-parseInt(_0x4501b8(0x1ec))/0xb)+-parseInt(_0x4501b8(0x1e2))/0xc;if(_0x15aada===_0xd094fb)break;else _0x2554d0['push'](_0x2554d0['shift']());}catch(_0x539da1){_0x2554d0['push'](_0x2554d0['shift']());}}}(a24_0x3481,0xbb168));import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asAppConfigDryRunResult,buildMutationData,KEY_ARG,projectAppConfig,readKeyArg,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const DELETE_PATH=a24_0x53599b(0x1ee);export const appConfigDelete={'service':a24_0x53599b(0x1f1),'command':a24_0x53599b(0x1f9),'description':a24_0x53599b(0x1e9),'risk':'high-risk-write','args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5cebb1){readKeyArg(_0x5cebb1);},async 'dryRun'(_0x5eabbc){const _0x25da42=a24_0x53599b,_0x798839=readKeyArg(_0x5eabbc),_0x5f0f95=await mustGetByKey(_0x5eabbc[_0x25da42(0x1f5)],_0x798839);return asAppConfigDryRunResult(buildMutationData({'operation':_0x25da42(0x1f9),'appCode':_0x5eabbc['appCode'],'key':_0x798839,'before':projectAppConfig(_0x5f0f95),'after':null,'dryRun':!![]}),{'method':_0x25da42(0x1fa),'url':DELETE_PATH});},async 'execute'(_0x5b0270){const _0x3bd836=a24_0x53599b,_0x214d94=readKeyArg(_0x5b0270),_0x556dd7=await mustGetByKey(_0x5b0270[_0x3bd836(0x1f5)],_0x214d94);return await withAppConfigApiBoundary(_0x3bd836(0x1f9),{'appCode':_0x5b0270[_0x3bd836(0x1f5)],'key':_0x214d94},()=>deleteAppConfig({'appCode':_0x5b0270[_0x3bd836(0x1f5)],'id':requireAppConfigId(_0x556dd7,_0x214d94,_0x5b0270[_0x3bd836(0x1f5)])})),{'ok':!![],'data':buildMutationData({'operation':'delete','appCode':_0x5b0270[_0x3bd836(0x1f5)],'key':_0x214d94,'before':projectAppConfig(_0x556dd7),'after':null,'dryRun':![]}),'message':_0x3bd836(0x1ed)+_0x214d94};}};function a24_0x1769(_0x52e484,_0x3825e6){_0x52e484=_0x52e484-0x1e1;const _0x34819b=a24_0x3481();let _0x17692c=_0x34819b[_0x52e484];return _0x17692c;}function a24_0x3481(){const _0x7c2308=['1380EAxEro','15egALrc','appCode','1003368tsvdXz','number','get','delete','POST','validation','isFinite','37579740ccEyMm','apiError','2022VFQjyi','2tqfLNk','1666430WrgJij','237232PcCZRo','App\x20config\x20server\x20id\x20missing\x20for\x20key=','Delete\x20one\x20runtime\x20app-config\x20key','App\x20config\x20key\x20not\x20found:\x20','33016WchfYh','55mDQcbc','Deleted\x20app\x20config\x20','/smartapi/app-config/delete','1722UdgODF','8455590vxzkkT','app-config',',\x20appCode='];a24_0x3481=function(){return _0x7c2308;};return a24_0x3481();}async function mustGetByKey(_0xab18,_0x53dad0){const _0x27665d=a24_0x53599b,_0xea8e5c=await withAppConfigApiBoundary(_0x27665d(0x1f8),{'appCode':_0xab18,'key':_0x53dad0},()=>getAppConfigByKey(_0xab18,_0x53dad0));if(!_0xea8e5c)throw CliErrors[_0x27665d(0x1fb)](_0x27665d(0x1ea)+_0x53dad0,'appCode:\x20'+_0xab18);return _0xea8e5c;}function requireAppConfigId(_0x21c794,_0x26f20f,_0x2e6185){const _0x55a280=a24_0x53599b;if(typeof _0x21c794['id']===_0x55a280(0x1f7)&&Number[_0x55a280(0x1e1)](_0x21c794['id'])&&_0x21c794['id']>0x0)return _0x21c794['id'];throw CliErrors[_0x55a280(0x1e3)](_0x55a280(0x1e8)+_0x26f20f+_0x55a280(0x1f2)+_0x2e6185);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a25_0xd7d20e=a25_0x4c1e;(function(_0x24f150,_0x4b05f1){const _0x297440=a25_0x4c1e,_0x55e017=_0x24f150();while(!![]){try{const _0x40a017=parseInt(_0x297440(0x7a))/0x1+-parseInt(_0x297440(0x87))/0x2+parseInt(_0x297440(0x83))/0x3*(-parseInt(_0x297440(0x85))/0x4)+-parseInt(_0x297440(0x7b))/0x5*(-parseInt(_0x297440(0x81))/0x6)+-parseInt(_0x297440(0x80))/0x7+-parseInt(_0x297440(0x82))/0x8+-parseInt(_0x297440(0x7d))/0x9*(-parseInt(_0x297440(0x7c))/0xa);if(_0x40a017===_0x4b05f1)break;else _0x55e017['push'](_0x55e017['shift']());}catch(_0x4509c0){_0x55e017['push'](_0x55e017['shift']());}}}(a25_0x219a,0xccd6e));function a25_0x219a(){const _0x31c4b6=['\x20with\x20value\x20redacted','632XqdDwD','appCode','2582888OfRTXn','Loaded\x20app\x20config\x20','read','app-config','reveal','Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','134442VTcWgT','5LuuiXC','30HOzvJr','9884016jeuQle','App\x20config\x20key\x20not\x20found:\x20','bool','2456258wobTxi','2001426ERFuhY','2377144QDVrzI','18687hnWvnQ'];a25_0x219a=function(){return _0x31c4b6;};return a25_0x219a();}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_0x4c1e(_0xccd0cc,_0x2b8a5e){_0xccd0cc=_0xccd0cc-0x7a;const _0x219a69=a25_0x219a();let _0x4c1eaf=_0x219a69[_0xccd0cc];return _0x4c1eaf;}export const appConfigGet={'service':a25_0xd7d20e(0x8a),'command':'get','description':a25_0xd7d20e(0x8c),'risk':a25_0xd7d20e(0x89),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x5e1cb4){readKeyArg(_0x5e1cb4);},async 'execute'(_0x59a359){const _0x1d9432=a25_0xd7d20e,_0x251124=readKeyArg(_0x59a359),_0x186cc4=await withAppConfigApiBoundary('get',{'appCode':_0x59a359['appCode'],'key':_0x251124},()=>getAppConfigByKey(_0x59a359[_0x1d9432(0x86)],_0x251124));if(!_0x186cc4)throw CliErrors['validation'](_0x1d9432(0x7e)+_0x251124,'appCode:\x20'+_0x59a359[_0x1d9432(0x86)]);const _0x4de7db=projectAppConfig(_0x186cc4,{'reveal':_0x59a359['bool'](_0x1d9432(0x8b))});return{'ok':!![],'data':{'config':_0x4de7db},'message':_0x59a359[_0x1d9432(0x7f)](_0x1d9432(0x8b))?_0x1d9432(0x88)+_0x251124+'\x20with\x20value\x20revealed':_0x1d9432(0x88)+_0x251124+_0x1d9432(0x84)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xb4c5ed,_0x3b187d){const _0xa698c8=a26_0x8af6,_0x566b97=_0xb4c5ed();while(!![]){try{const _0x3f69df=-parseInt(_0xa698c8(0x102))/0x1*(-parseInt(_0xa698c8(0xfc))/0x2)+-parseInt(_0xa698c8(0xfa))/0x3+parseInt(_0xa698c8(0xfd))/0x4+parseInt(_0xa698c8(0x100))/0x5*(-parseInt(_0xa698c8(0x103))/0x6)+-parseInt(_0xa698c8(0xfe))/0x7+parseInt(_0xa698c8(0x101))/0x8*(parseInt(_0xa698c8(0xf9))/0x9)+-parseInt(_0xa698c8(0xff))/0xa*(-parseInt(_0xa698c8(0xfb))/0xb);if(_0x3f69df===_0x3b187d)break;else _0x566b97['push'](_0x566b97['shift']());}catch(_0x297338){_0x566b97['push'](_0x566b97['shift']());}}}(a26_0x5e58,0x66dad));import{appConfigList}from'../../commands/app-config/list.js';function a26_0x5e58(){const _0x5a91e6=['42235VwIAoL','8wPjnSk','7361gdQema','174UNwUbb','3750345kcwPet','1082013uoDkIh','66yZjhZd','166DXWPAe','392496btsjRr','3051363Gsubnj','561740tojoaX'];a26_0x5e58=function(){return _0x5a91e6;};return a26_0x5e58();}import{appConfigGet}from'../../commands/app-config/get.js';import{appConfigSet}from'../../commands/app-config/set.js';function a26_0x8af6(_0xb782a5,_0x7b6bad){_0xb782a5=_0xb782a5-0xf9;const _0x5e581d=a26_0x5e58();let _0x8af64a=_0x5e581d[_0xb782a5];return _0x8af64a;}import{appConfigDelete}from'../../commands/app-config/delete.js';export const appConfigDefinitions=[appConfigList,appConfigGet,appConfigSet,appConfigDelete];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a27_0xfcec22=a27_0x28b4;function a27_0x5ab6(){const _0x2ef875=['key','1Pseshp','4UcWEex','Found\x20','app-config','appCode','3231796yekoXw','trim','3087032yjteBc','length','10632zxeEXB','read','string','Filter\x20by\x20exact\x20config\x20key','13666510wMZTeV','28501Fgifsq','str','9mcWoPw','2083527qKaREK','\x20app\x20config(s)','902205OMJMun','1049769mudfWS','48WDebmQ'];a27_0x5ab6=function(){return _0x2ef875;};return a27_0x5ab6();}(function(_0x1cef23,_0x2ef96a){const _0x47143e=a27_0x28b4,_0x48e0dd=_0x1cef23();while(!![]){try{const _0xc940dc=parseInt(_0x47143e(0x1ac))/0x1*(parseInt(_0x47143e(0x19a))/0x2)+-parseInt(_0x47143e(0x1a6))/0x3*(parseInt(_0x47143e(0x1ad))/0x4)+parseInt(_0x47143e(0x1a8))/0x5+parseInt(_0x47143e(0x1aa))/0x6*(parseInt(_0x47143e(0x1a9))/0x7)+-parseInt(_0x47143e(0x19c))/0x8*(parseInt(_0x47143e(0x1a5))/0x9)+parseInt(_0x47143e(0x1a2))/0xa+parseInt(_0x47143e(0x1a3))/0xb*(-parseInt(_0x47143e(0x19e))/0xc);if(_0xc940dc===_0x2ef96a)break;else _0x48e0dd['push'](_0x48e0dd['shift']());}catch(_0x471653){_0x48e0dd['push'](_0x48e0dd['shift']());}}}(a27_0x5ab6,0xf0e58));import{listAppConfigs}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectAppConfig,readOptionalTags,TAGS_FLAG,validateKey,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';function a27_0x28b4(_0x569993,_0x6b1e41){_0x569993=_0x569993-0x199;const _0x5ab6d1=a27_0x5ab6();let _0x28b44b=_0x5ab6d1[_0x569993];return _0x28b44b;}export const appConfigList={'service':a27_0xfcec22(0x1af),'command':'list','description':'List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','risk':a27_0xfcec22(0x19f),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'key','type':a27_0xfcec22(0x1a0),'description':a27_0xfcec22(0x1a1)},TAGS_FLAG],async 'validate'(_0x1124c1){const _0x5aaafe=a27_0xfcec22,_0x643248=_0x1124c1[_0x5aaafe(0x1a4)](_0x5aaafe(0x1ab))[_0x5aaafe(0x19b)]();if(_0x643248)validateKey(_0x643248);readOptionalTags(_0x1124c1);},async 'execute'(_0x34f629){const _0x289155=a27_0xfcec22,_0x410de7=_0x34f629['str'](_0x289155(0x1ab))[_0x289155(0x19b)]()||undefined,_0x3c5c9d=readOptionalTags(_0x34f629),_0x5a545a=await withAppConfigApiBoundary('list',{'appCode':_0x34f629[_0x289155(0x199)]},()=>listAppConfigs(_0x34f629[_0x289155(0x199)],{'key':_0x410de7,'tags':_0x3c5c9d})),_0x13bdb2=_0x5a545a['map'](_0x1068ac=>projectAppConfig(_0x1068ac));return{'ok':!![],'data':{'appCode':_0x34f629[_0x289155(0x199)],'count':_0x13bdb2[_0x289155(0x19d)],'configs':_0x13bdb2},'message':_0x289155(0x1ae)+_0x13bdb2[_0x289155(0x19d)]+_0x289155(0x1a7)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a28_0x1137b6=a28_0x3dfc;function a28_0x3dfc(_0x3bbf93,_0x3c7d6f){_0x3bbf93=_0x3bbf93-0xdc;const _0x59a92f=a28_0x59a9();let _0x3dfcc2=_0x59a92f[_0x3bbf93];return _0x3dfcc2;}(function(_0x451b97,_0x4e956b){const _0x18834a=a28_0x3dfc,_0xc9a50c=_0x451b97();while(!![]){try{const _0x128437=-parseInt(_0x18834a(0xf0))/0x1+parseInt(_0x18834a(0xed))/0x2*(parseInt(_0x18834a(0xf7))/0x3)+-parseInt(_0x18834a(0xdc))/0x4+-parseInt(_0x18834a(0xea))/0x5+parseInt(_0x18834a(0xf8))/0x6*(parseInt(_0x18834a(0xf6))/0x7)+parseInt(_0x18834a(0xee))/0x8+parseInt(_0x18834a(0xe7))/0x9*(-parseInt(_0x18834a(0xdf))/0xa);if(_0x128437===_0x4e956b)break;else _0xc9a50c['push'](_0xc9a50c['shift']());}catch(_0x485982){_0xc9a50c['push'](_0xc9a50c['shift']());}}}(a28_0x59a9,0xbc8e3));import{createAppConfig,getAppConfigByKey,updateAppConfig}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assertSingleValueSource,assertValueSourceReadable,asAppConfigDryRunResult,buildMutationData,FROM_ENV_FLAG,KEY_ARG,plannedAppConfig,projectAppConfig,readAppConfigValue,readKeyArg,readOptionalTags,STDIN_FLAG,TAGS_FLAG,VALUE_ARG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const CREATE_PATH=a28_0x1137b6(0xf5),UPDATE_PATH=a28_0x1137b6(0xe2);export const appConfigSet={'service':a28_0x1137b6(0xe3),'command':'set','description':'Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','risk':a28_0x1137b6(0xeb),'args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':'file','type':a28_0x1137b6(0xef),'description':a28_0x1137b6(0xe1)}],async 'validate'(_0x3d25d0){readKeyArg(_0x3d25d0),readOptionalTags(_0x3d25d0),assertSingleValueSource(_0x3d25d0);},async 'dryRun'(_0x9816a4){const _0x3d9bf9=a28_0x1137b6,_0x14ad1b=readKeyArg(_0x9816a4),_0x5aded9=readOptionalTags(_0x9816a4),_0x49a4d0=assertSingleValueSource(_0x9816a4);await assertValueSourceReadable(_0x49a4d0);const _0xbbe367=await withAppConfigApiBoundary(_0x3d9bf9(0xe5),{'appCode':_0x9816a4[_0x3d9bf9(0xe6)],'key':_0x14ad1b},()=>getAppConfigByKey(_0x9816a4[_0x3d9bf9(0xe6)],_0x14ad1b)),_0x39aaf0=_0xbbe367?_0x3d9bf9(0xf3):_0x3d9bf9(0xe9),_0x34e3b2=_0xbbe367?projectAppConfig(_0xbbe367):null,_0x3cc3c9=plannedAppConfig({'appCode':_0x9816a4['appCode'],'key':_0x14ad1b,'tags':_0x5aded9??_0xbbe367?.[_0x3d9bf9(0xf4)],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x39aaf0,'appCode':_0x9816a4[_0x3d9bf9(0xe6)],'key':_0x14ad1b,'before':_0x34e3b2,'after':_0x3cc3c9,'dryRun':!![]}),{'method':'POST','url':_0x39aaf0===_0x3d9bf9(0xf3)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x1cf593){const _0x360d0d=a28_0x1137b6,_0x3a8ef7=readKeyArg(_0x1cf593),_0x17b4d2=readOptionalTags(_0x1cf593),_0x3bcedb=await withAppConfigApiBoundary(_0x360d0d(0xe5),{'appCode':_0x1cf593[_0x360d0d(0xe6)],'key':_0x3a8ef7},()=>getAppConfigByKey(_0x1cf593[_0x360d0d(0xe6)],_0x3a8ef7)),_0x33262c=_0x3bcedb?projectAppConfig(_0x3bcedb):null,_0x45d0be=_0x3bcedb?_0x360d0d(0xf3):'create',{value:_0x487145,warnings:_0x385680}=await readAppConfigValue(_0x1cf593),_0x158683={'appCode':_0x1cf593['appCode'],'key':_0x3a8ef7,'value':_0x487145,'tags':_0x17b4d2??_0x3bcedb?.[_0x360d0d(0xf4)]??undefined};await withAppConfigApiBoundary(_0x45d0be,{'appCode':_0x1cf593[_0x360d0d(0xe6)],'key':_0x3a8ef7},async()=>{const _0x3f3683=_0x360d0d;_0x3bcedb?await updateAppConfig({..._0x158683,'id':requireAppConfigId(_0x3bcedb,_0x3a8ef7,_0x1cf593[_0x3f3683(0xe6)])}):await createAppConfig(_0x158683);});const _0x39f015=await withAppConfigApiBoundary('get',{'appCode':_0x1cf593['appCode'],'key':_0x3a8ef7},()=>getAppConfigByKey(_0x1cf593[_0x360d0d(0xe6)],_0x3a8ef7)),_0x1ca5eb=_0x39f015?projectAppConfig(_0x39f015):plannedAppConfig({'appCode':_0x1cf593[_0x360d0d(0xe6)],'key':_0x3a8ef7,'tags':_0x158683['tags'],'hasValue':_0x487145!==''});return{'ok':!![],'data':buildMutationData({'operation':_0x45d0be,'appCode':_0x1cf593[_0x360d0d(0xe6)],'key':_0x3a8ef7,'before':_0x33262c,'after':_0x1ca5eb,'dryRun':![],'warnings':_0x385680}),'message':(_0x45d0be===_0x360d0d(0xf3)?_0x360d0d(0xe0):_0x360d0d(0xf1))+_0x360d0d(0xde)+_0x3a8ef7};}};function a28_0x59a9(){const _0x194114=['App\x20config\x20server\x20id\x20missing\x20for\x20key=','2nxMxSv','6782880OtoFLI','string','588052RLSPyR','Created',',\x20appCode=','update','tags','/smartapi/app-config/create','7HFqKOH','4449777SwIUem','3729678iUTQYD','682476icIkrT','number','\x20app\x20config\x20','90wTPtxl','Updated','Read\x20config\x20value\x20from\x20file','/smartapi/app-config/update','app-config','apiError','get','appCode','694701oraLHY','isFinite','create','3635185ecTUWo','high-risk-write'];a28_0x59a9=function(){return _0x194114;};return a28_0x59a9();}function requireAppConfigId(_0x385436,_0x37052e,_0x5cc359){const _0x2572c0=a28_0x1137b6;if(typeof _0x385436['id']===_0x2572c0(0xdd)&&Number[_0x2572c0(0xe8)](_0x385436['id'])&&_0x385436['id']>0x0)return _0x385436['id'];throw CliErrors[_0x2572c0(0xe4)](_0x2572c0(0xec)+_0x37052e+_0x2572c0(0xf2)+_0x5cc359);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a29_0x630e(_0x17708d,_0x2f2a57){_0x17708d=_0x17708d-0x180;const _0x416082=a29_0x4160();let _0x630eca=_0x416082[_0x17708d];return _0x630eca;}const a29_0xc9103=a29_0x630e;(function(_0x25f74f,_0x44a331){const _0x96f5b0=a29_0x630e,_0x51b7fc=_0x25f74f();while(!![]){try{const _0x3be53c=-parseInt(_0x96f5b0(0x191))/0x1*(-parseInt(_0x96f5b0(0x1b3))/0x2)+parseInt(_0x96f5b0(0x19c))/0x3*(-parseInt(_0x96f5b0(0x197))/0x4)+parseInt(_0x96f5b0(0x1a3))/0x5*(-parseInt(_0x96f5b0(0x196))/0x6)+-parseInt(_0x96f5b0(0x19b))/0x7*(-parseInt(_0x96f5b0(0x1ad))/0x8)+parseInt(_0x96f5b0(0x1b8))/0x9*(parseInt(_0x96f5b0(0x1ab))/0xa)+parseInt(_0x96f5b0(0x1a2))/0xb*(parseInt(_0x96f5b0(0x1b4))/0xc)+-parseInt(_0x96f5b0(0x19d))/0xd*(parseInt(_0x96f5b0(0x1ae))/0xe);if(_0x3be53c===_0x44a331)break;else _0x51b7fc['push'](_0x51b7fc['shift']());}catch(_0x29fc61){_0x51b7fc['push'](_0x51b7fc['shift']());}}}(a29_0x4160,0x82623));import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':'key','description':'Runtime\x20app-config\x20key','required':!![]};export const VALUE_ARG={'name':'value','description':a29_0xc9103(0x1b7),'required':![]};export const TAGS_FLAG={'name':a29_0xc9103(0x1af),'type':a29_0xc9103(0x186),'description':a29_0xc9103(0x19a)};export const STDIN_FLAG={'name':a29_0xc9103(0x188),'type':'boolean','description':a29_0xc9103(0x1a8),'default':![]};export const FROM_ENV_FLAG={'name':'from-env','type':a29_0xc9103(0x186),'description':'Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable'};export const REVEAL_FLAG={'name':a29_0xc9103(0x1b2),'type':'boolean','description':a29_0xc9103(0x1b5),'default':![]};export function readKeyArg(_0x3a44c6){const _0x2d25ac=a29_0xc9103,_0x2404eb=_0x3a44c6[_0x2d25ac(0x18a)][0x0]?.['trim']()??'';return validateKey(_0x2404eb),_0x2404eb;}export function readOptionalTags(_0x3b4aea){const _0x5cee3a=a29_0xc9103,_0x71c669=_0x3b4aea['str'](_0x5cee3a(0x1af))[_0x5cee3a(0x182)]();if(!_0x71c669)return undefined;if(_0x71c669[_0x5cee3a(0x1a1)]>0x20)throw CliErrors[_0x5cee3a(0x18b)](_0x5cee3a(0x1bc));return _0x71c669;}export function validateKey(_0x52a512){const _0x16a3e3=a29_0xc9103;if(!_0x52a512)throw CliErrors[_0x16a3e3(0x18b)](_0x16a3e3(0x184));if(_0x52a512[_0x16a3e3(0x1a1)]>0x100)throw CliErrors[_0x16a3e3(0x18b)](_0x16a3e3(0x18e));}export function projectAppConfig(_0x2355e9,_0x48d671){const _0x1bd602=a29_0xc9103,_0xee7e07=_0x2355e9[_0x1bd602(0x185)]!==undefined&&_0x2355e9['value']!==null&&_0x2355e9[_0x1bd602(0x185)]!=='',_0x5adf74={'appCode':_0x2355e9[_0x1bd602(0x193)],'key':_0x2355e9[_0x1bd602(0x1aa)],'tags':_0x2355e9[_0x1bd602(0x1af)]??undefined,'hasValue':_0xee7e07,'valueRedacted':_0xee7e07&&!_0x48d671?.[_0x1bd602(0x1b2)],'gmtCreate':_0x2355e9['gmtCreate'],'gmtModified':_0x2355e9[_0x1bd602(0x19e)]};return _0x48d671?.['reveal']&&(_0x5adf74[_0x1bd602(0x185)]=_0x2355e9[_0x1bd602(0x185)]??'',_0x5adf74[_0x1bd602(0x180)]=![]),_0x5adf74;}export function plannedAppConfig(_0x254589){const _0x75d76e=a29_0xc9103,_0x41aed4=_0x254589[_0x75d76e(0x1ba)]??!![];return{'appCode':_0x254589[_0x75d76e(0x193)],'key':_0x254589['key'],'tags':_0x254589[_0x75d76e(0x1af)]??undefined,'hasValue':_0x41aed4,'valueRedacted':_0x41aed4};}export function buildMutationData(_0x1446ab){const _0x2ee390=a29_0xc9103;return{'operation':_0x1446ab['operation'],'selector':{'appCode':_0x1446ab[_0x2ee390(0x193)],'key':_0x1446ab[_0x2ee390(0x1aa)]},'before':_0x1446ab['before'],'after':_0x1446ab['after'],'dryRun':_0x1446ab[_0x2ee390(0x190)],'warnings':_0x1446ab['warnings']??[]};}export async function withAppConfigApiBoundary(_0x5072a0,_0x453ce6,_0x371b23){const _0x36b719=a29_0xc9103;try{return await _0x371b23();}catch{const _0x2937c2=[_0x36b719(0x18c)+_0x453ce6[_0x36b719(0x193)]];if(_0x453ce6['key'])_0x2937c2[_0x36b719(0x192)]('key:\x20'+_0x453ce6[_0x36b719(0x1aa)]);_0x2937c2[_0x36b719(0x192)](_0x36b719(0x1a4));throw CliErrors[_0x36b719(0x1b9)]('Failed\x20to\x20'+_0x5072a0+_0x36b719(0x1b6),_0x2937c2['join'](';\x20')+'.');}}export function asAppConfigDryRunResult(_0x525341,_0x3dc06a){const _0x39f22b=a29_0xc9103;return Object['defineProperties'](_0x525341,{'method':{'value':_0x3dc06a[_0x39f22b(0x1bd)],'enumerable':![]},'url':{'value':_0x3dc06a[_0x39f22b(0x1a6)],'enumerable':![]}});}export function assertSingleValueSource(_0x2a2e51){const _0x50097d=a29_0xc9103,_0x8a62e0=[];_0x2a2e51['args'][_0x50097d(0x1a1)]>0x1&&_0x8a62e0[_0x50097d(0x192)]({'kind':_0x50097d(0x18f),'value':_0x2a2e51['args'][_0x50097d(0x189)](0x1)['join']('\x20')});const _0x53eec4=_0x2a2e51['flag'](_0x50097d(0x185));_0x53eec4!==undefined&&_0x53eec4!==null&&_0x8a62e0[_0x50097d(0x192)]({'kind':_0x50097d(0x18f),'value':String(_0x53eec4)});_0x2a2e51[_0x50097d(0x181)](_0x50097d(0x188))&&_0x8a62e0[_0x50097d(0x192)]({'kind':_0x50097d(0x188)});const _0x4fdae8=_0x2a2e51['str'](_0x50097d(0x194))[_0x50097d(0x182)]();_0x4fdae8&&_0x8a62e0[_0x50097d(0x192)]({'kind':'env','name':_0x4fdae8});const _0x174715=_0x2a2e51[_0x50097d(0x195)](_0x50097d(0x183))[_0x50097d(0x182)]();_0x174715&&_0x8a62e0[_0x50097d(0x192)]({'kind':_0x50097d(0x183),'path':_0x174715});if(_0x8a62e0[_0x50097d(0x1a1)]===0x0)throw CliErrors[_0x50097d(0x18b)](_0x50097d(0x198),_0x50097d(0x187));if(_0x8a62e0[_0x50097d(0x1a1)]>0x1)throw CliErrors['validation'](_0x50097d(0x1a0),_0x50097d(0x18d));return _0x8a62e0[0x0];}export async function assertValueSourceReadable(_0x5ddd35){const _0x3eb441=a29_0xc9103;if(_0x5ddd35[_0x3eb441(0x1be)]===_0x3eb441(0x19f)&&!(_0x5ddd35[_0x3eb441(0x199)]in process.env))throw CliErrors[_0x3eb441(0x18b)](_0x3eb441(0x1a5)+_0x5ddd35[_0x3eb441(0x199)]);if(_0x5ddd35[_0x3eb441(0x1be)]===_0x3eb441(0x183))try{await access(_0x5ddd35[_0x3eb441(0x1b1)]);}catch{throw CliErrors[_0x3eb441(0x18b)](_0x3eb441(0x1ac)+_0x5ddd35['path']);}}export async function readAppConfigValue(_0x4f2c0b){const _0x562c42=a29_0xc9103,_0xc281c9=assertSingleValueSource(_0x4f2c0b),_0x265946=[];if(_0xc281c9['kind']===_0x562c42(0x18f))return _0x265946[_0x562c42(0x192)](_0x562c42(0x1a7)),{'value':_0xc281c9[_0x562c42(0x185)]??'','source':_0xc281c9[_0x562c42(0x1be)],'warnings':_0x265946};if(_0xc281c9[_0x562c42(0x1be)]==='stdin')return{'value':await readStdin(),'source':_0xc281c9[_0x562c42(0x1be)],'warnings':_0x265946};if(_0xc281c9[_0x562c42(0x1be)]===_0x562c42(0x19f)){if(!(_0xc281c9[_0x562c42(0x199)]in process.env))throw CliErrors[_0x562c42(0x18b)]('Environment\x20variable\x20is\x20not\x20set:\x20'+_0xc281c9['name']);return{'value':process.env[_0xc281c9.name]??'','source':_0xc281c9['kind'],'warnings':_0x265946};}return{'value':await readFile(_0xc281c9['path'],_0x562c42(0x1b0)),'source':_0xc281c9[_0x562c42(0x1be)],'warnings':_0x265946};}function a29_0x4160(){const _0x1c08da=['hasValue','data','App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.','method','kind','valueRedacted','bool','trim','file','Missing\x20app-config\x20key.','value','string','Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','stdin','slice','args','validation','appCode:\x20','Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.','argument','dryRun','364601NFrwiZ','push','appCode','from-env','str','30iKTPxU','1289376IywOlN','Missing\x20app-config\x20value\x20source.','name','Config\x20tags\x20for\x20filtering/display\x20metadata','7vTuxLw','9hKEugC','13RtvBwR','gmtModified','env','App\x20config\x20value\x20source\x20is\x20ambiguous.','length','502359gWtUeJ','56080AmWxHT','value\x20is\x20redacted','Environment\x20variable\x20is\x20not\x20set:\x20','url','Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','Read\x20config\x20value\x20from\x20stdin','once','key','2754650hrKSRk','Value\x20file\x20is\x20not\x20readable:\x20','7467176BJlkKT','1506932ofPdlT','tags','utf8','path','reveal','2xCjKCP','24dHbvAy','Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','\x20app\x20config.','Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','9XJUonn','apiError'];a29_0x4160=function(){return _0x1c08da;};return a29_0x4160();}function readStdin(){return new Promise((_0x3cf854,_0x377903)=>{const _0x1e764e=a29_0x630e;let _0x2280bb='';process[_0x1e764e(0x188)]['setEncoding']('utf8'),process[_0x1e764e(0x188)]['on'](_0x1e764e(0x1bb),_0x47f055=>{_0x2280bb+=_0x47f055;}),process['stdin']['once']('end',()=>_0x3cf854(_0x2280bb)),process['stdin'][_0x1e764e(0x1a9)]('error',_0x377903);});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a30_0x343c8b=a30_0x58d1;function a30_0x4233(){const _0x529699=['write','log','boolean','4033956iHbxum','660232iTeoOo','✓\x20Logged\x20out','bool','yes','Login\x20via\x20browser','440JPAiFq','login','../../auth/auth-server-ui.js','6047168KwrRph','335112FKEZIz','logout','1lEnaYz','22hzCqjb','Clear\x20login\x20session','11149628oPAviD','26qcsqru','Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','14WXsaHF','5ItXTFR','24633OdMWtZ','auth','3YzJlrp','564338ohtYpP'];a30_0x4233=function(){return _0x529699;};return a30_0x4233();}(function(_0x8b55d6,_0x497e26){const _0x5b2ddd=a30_0x58d1,_0x359a70=_0x8b55d6();while(!![]){try{const _0x51d6c8=-parseInt(_0x5b2ddd(0x1ff))/0x1*(-parseInt(_0x5b2ddd(0x1ef))/0x2)+-parseInt(_0x5b2ddd(0x1ee))/0x3*(-parseInt(_0x5b2ddd(0x1fc))/0x4)+-parseInt(_0x5b2ddd(0x1eb))/0x5*(parseInt(_0x5b2ddd(0x1fd))/0x6)+parseInt(_0x5b2ddd(0x1ea))/0x7*(parseInt(_0x5b2ddd(0x1f4))/0x8)+parseInt(_0x5b2ddd(0x1ec))/0x9*(-parseInt(_0x5b2ddd(0x1f9))/0xa)+-parseInt(_0x5b2ddd(0x200))/0xb*(-parseInt(_0x5b2ddd(0x1f3))/0xc)+parseInt(_0x5b2ddd(0x1e8))/0xd*(-parseInt(_0x5b2ddd(0x1e7))/0xe);if(_0x51d6c8===_0x497e26)break;else _0x359a70['push'](_0x359a70['shift']());}catch(_0x1fb424){_0x359a70['push'](_0x359a70['shift']());}}}(a30_0x4233,0xd2835));import{unlinkSync,existsSync}from'node:fs';function a30_0x58d1(_0xabf9b,_0xa563f8){_0xabf9b=_0xabf9b-0x1e6;const _0x423378=a30_0x4233();let _0x58d145=_0x423378[_0xabf9b];return _0x58d145;}import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':a30_0x343c8b(0x1ed),'command':a30_0x343c8b(0x1fa),'description':a30_0x343c8b(0x1f8),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a30_0x343c8b(0x1f7),'type':a30_0x343c8b(0x1f2),'description':a30_0x343c8b(0x1e9),'default':![]}],async 'execute'(_0x2e74a8){const _0x261497=a30_0x343c8b,{runAuthServer:_0x2cb9e6}=await import(_0x261497(0x1fb));return await _0x2cb9e6({'autoYes':_0x2e74a8[_0x261497(0x1f6)]('yes'),'nonInteractive':_0x2e74a8['nonInteractive']}),{'ok':!![]};}},{'service':a30_0x343c8b(0x1ed),'command':a30_0x343c8b(0x1fe),'description':a30_0x343c8b(0x1e6),'risk':a30_0x343c8b(0x1f0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x4c1cec){const _0x518a92=a30_0x343c8b;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x518a92(0x1f1)](_0x518a92(0x1f5))):console['log']('!\x20Not\x20logged\x20in'),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a31_0x108f35=a31_0x382d;(function(_0x2b609d,_0x33074a){const _0x2d529b=a31_0x382d,_0xb21e59=_0x2b609d();while(!![]){try{const _0x2182b3=parseInt(_0x2d529b(0x15b))/0x1+parseInt(_0x2d529b(0x15e))/0x2+-parseInt(_0x2d529b(0x154))/0x3*(-parseInt(_0x2d529b(0x18f))/0x4)+parseInt(_0x2d529b(0x164))/0x5*(parseInt(_0x2d529b(0x188))/0x6)+-parseInt(_0x2d529b(0x14f))/0x7*(-parseInt(_0x2d529b(0x141))/0x8)+-parseInt(_0x2d529b(0x153))/0x9*(-parseInt(_0x2d529b(0x174))/0xa)+-parseInt(_0x2d529b(0x18d))/0xb;if(_0x2182b3===_0x33074a)break;else _0xb21e59['push'](_0xb21e59['shift']());}catch(_0x4716f1){_0xb21e59['push'](_0xb21e59['shift']());}}}(a31_0x3072,0x24b25));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';import{dirname,join}from'node:path';import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';import{isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';function a31_0x382d(_0x21d97d,_0x38febf){_0x21d97d=_0x21d97d-0x136;const _0x3072bf=a31_0x3072();let _0x382d61=_0x3072bf[_0x21d97d];return _0x382d61;}import{CLI_BIN_NAME}from'../../constant/cli.js';export const bffCreate={'service':'bff','command':'create','description':'Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','risk':'write','flags':[{'name':'type','type':a31_0x108f35(0x139),'required':!![],'enum':[a31_0x108f35(0x18e),'ENDPOINT',a31_0x108f35(0x160)],'description':a31_0x108f35(0x137)},{'name':a31_0x108f35(0x177),'type':a31_0x108f35(0x139),'required':!![],'description':a31_0x108f35(0x14a)},{'name':a31_0x108f35(0x144),'type':a31_0x108f35(0x139),'description':'Script\x20description'},{'name':a31_0x108f35(0x140),'type':a31_0x108f35(0x139),'description':a31_0x108f35(0x176)},{'name':'datasetcode','type':a31_0x108f35(0x139),'description':'Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)'},{'name':'operation-type','type':a31_0x108f35(0x139),'description':a31_0x108f35(0x150)},{'name':'function-node','type':a31_0x108f35(0x139),'description':a31_0x108f35(0x14b),'enum':[a31_0x108f35(0x161),a31_0x108f35(0x18a)]}],async 'validate'(_0x55b1c0){const _0x1c17d2=a31_0x108f35,_0x449c01=_0x55b1c0[_0x1c17d2(0x16a)]('name');if(!isValidBffFunctionName(_0x449c01))throw CliErrors[_0x1c17d2(0x147)](_0x1c17d2(0x183)+_0x449c01+_0x1c17d2(0x165));},async 'execute'(_0x31522c){const _0x595fd4=a31_0x108f35,_0x571a17=loadBffProjectConfig(_0x31522c[_0x595fd4(0x17a)]),_0x31bb60=_0x31522c['str'](_0x595fd4(0x173)),_0x389eea=_0x31522c[_0x595fd4(0x16a)]('name'),_0x225cc0=_0x31522c[_0x595fd4(0x16a)](_0x595fd4(0x144))||undefined,_0x35f1cd=_0x31bb60===_0x595fd4(0x160)?await resolveHookOptions(_0x571a17,_0x31522c):undefined,_0x276008=buildFilePath(_0x571a17,_0x31bb60,_0x389eea,_0x35f1cd);if(await fileExists(_0x276008))throw CliErrors['validation'](_0x595fd4(0x149)+_0x276008);await mkdir(dirname(_0x276008),{'recursive':!![]});const _0x5d9b8a=generateTemplate(_0x31bb60,_0x389eea,_0x31522c[_0x595fd4(0x17a)],_0x225cc0,_0x35f1cd);await writeFile(_0x276008,_0x5d9b8a,_0x595fd4(0x186));const _0x45a683={'type':_0x31bb60,'name':_0x389eea,'path':_0x276008};if(_0x225cc0)_0x45a683[_0x595fd4(0x144)]=_0x225cc0;if(_0x35f1cd){if(_0x35f1cd[_0x595fd4(0x140)])_0x45a683[_0x595fd4(0x140)]=_0x35f1cd['alias'];_0x45a683[_0x595fd4(0x142)]=_0x35f1cd[_0x595fd4(0x142)],_0x45a683['operationType']=_0x35f1cd[_0x595fd4(0x172)],_0x45a683[_0x595fd4(0x189)]=_0x35f1cd[_0x595fd4(0x189)];}return{'ok':!![],'data':_0x45a683,'message':'Created\x20'+_0x31bb60+_0x595fd4(0x167)+_0x389eea};}};async function resolveHookOptions(_0x54298a,_0x2e9058){const _0x53534e=a31_0x108f35,_0x4eebb2=loadAliasMap(_0x2e9058[_0x53534e(0x15f)],undefined,resolveApiFilePath(_0x2e9058[_0x53534e(0x15f)],_0x2e9058['appCode'])),_0x5be756=_0x4eebb2[_0x53534e(0x13f)]>0x0;let _0x905819,_0x448502,_0x325930;const _0x10e580=_0x2e9058[_0x53534e(0x16a)](_0x53534e(0x140)),_0x50b666=_0x2e9058[_0x53534e(0x16a)](_0x53534e(0x15c));if(_0x10e580){const _0x1bd325=resolveAlias(_0x2e9058['apiDir'],_0x10e580,undefined,resolveApiFilePath(_0x2e9058[_0x53534e(0x15f)],_0x2e9058[_0x53534e(0x17a)]));if(!_0x1bd325){const _0xd7401e=_0x5be756?_0x53534e(0x158)+_0x4eebb2[_0x53534e(0x155)](_0x1c74f1=>_0x1c74f1[_0x53534e(0x140)])[_0x53534e(0x163)](',\x20'):'No\x20api.ts\x20found.\x20Run\x20`'+CLI_BIN_NAME+_0x53534e(0x16e);throw CliErrors['validation'](_0x53534e(0x143)+_0x10e580+'\x22\x20not\x20found.\x20'+_0xd7401e);}_0x905819=_0x10e580,_0x448502=_0x1bd325;}else{if(_0x50b666){_0x448502=_0x50b666;const _0x430aa8=_0x4eebb2[_0x53534e(0x182)](_0x424d70=>_0x424d70[_0x53534e(0x142)]===_0x50b666);_0x905819=_0x430aa8?.[_0x53534e(0x140)];}else{if(_0x2e9058['nonInteractive'])throw CliErrors['validation'](_0x53534e(0x14c));else{if(_0x5be756){const _0xb151c1=_0x4eebb2['map'](_0x40ff0b=>_0x40ff0b['alias']+'\x20('+_0x40ff0b[_0x53534e(0x184)]+')'),_0x418d71=await promptSelect(_0x53534e(0x178),_0xb151c1),_0x1006b6=_0x4eebb2[_0x418d71];if(!_0x1006b6)throw CliErrors[_0x53534e(0x147)](_0x53534e(0x15a));_0x905819=_0x1006b6[_0x53534e(0x140)],_0x448502=_0x1006b6[_0x53534e(0x142)];}else{const _0x128268=await listDatasets(_0x2e9058[_0x53534e(0x17a)]);if(_0x128268[_0x53534e(0x13f)]===0x0)throw CliErrors[_0x53534e(0x147)](_0x53534e(0x138));const _0x35a009=_0x128268[_0x53534e(0x155)](_0x5476be=>_0x5476be['name']+'\x20['+(_0x5476be['source']??_0x53534e(0x171))+_0x53534e(0x17c)+_0x5476be[_0x53534e(0x13d)]+')'),_0x6f89fb=await promptSelect(_0x53534e(0x178),_0x35a009),_0x2b7189=_0x128268[_0x6f89fb];if(!_0x2b7189)throw CliErrors[_0x53534e(0x147)](_0x53534e(0x15a));_0x448502=_0x2b7189[_0x53534e(0x13d)],_0x905819=undefined;}}}}const _0x8ec0bc=await listDatasets(_0x2e9058[_0x53534e(0x17a)]),_0x50316f=_0x8ec0bc[_0x53534e(0x182)](_0x5c0dc9=>_0x5c0dc9[_0x53534e(0x13d)]===_0x448502);if(!_0x50316f)throw CliErrors[_0x53534e(0x147)](_0x53534e(0x17e)+_0x448502+'\x22.\x20'+(_0x905819?_0x53534e(0x151)+CLI_BIN_NAME+_0x53534e(0x17d):''));_0x325930=_0x50316f['id'];const _0x4d635a=_0x905819??_0x448502,_0x31abba=await listBffDatasetOperations(_0x2e9058[_0x53534e(0x17a)],_0x325930),_0x4e081a=_0x31abba?Object[_0x53534e(0x17f)](_0x31abba):[];if(_0x4e081a[_0x53534e(0x13f)]===0x0)throw CliErrors[_0x53534e(0x147)]('No\x20operation\x20types\x20found\x20for\x20dataset\x20'+_0x4d635a+'.');let _0x45cc5d;const _0x4956d4=_0x2e9058[_0x53534e(0x16a)](_0x53534e(0x16f));if(_0x4956d4){if(!_0x4e081a['includes'](_0x4956d4))throw CliErrors[_0x53534e(0x147)](_0x53534e(0x17b)+_0x4956d4+_0x53534e(0x14d)+_0x4d635a+'.\x20'+(_0x53534e(0x168)+_0x4e081a['join'](',\x20')));_0x45cc5d=_0x4956d4;}else{if(_0x2e9058['nonInteractive'])throw CliErrors[_0x53534e(0x147)](_0x53534e(0x18c));const _0x2c3ef5=await promptSelect('Select\x20operation\x20type:',_0x4e081a);_0x45cc5d=_0x4e081a[_0x2c3ef5]??_0x4e081a[0x0];}let _0x13017c=normalizeHookFunctionNode(_0x2e9058[_0x53534e(0x16a)](_0x53534e(0x16b)));if(!_0x13017c){if(_0x2e9058[_0x53534e(0x16a)](_0x53534e(0x16b)))throw CliErrors[_0x53534e(0x147)]('--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.');if(_0x2e9058[_0x53534e(0x13c)])throw CliErrors[_0x53534e(0x147)]('--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');const _0x3409fc=await promptSelect('Select\x20trigger\x20node:',[_0x53534e(0x161),_0x53534e(0x18a)]);_0x13017c=[_0x53534e(0x161),_0x53534e(0x18a)][_0x3409fc]??'before';}return{'alias':_0x905819,'datasetCode':_0x448502,'datasetId':_0x325930,'operationType':_0x45cc5d,'functionNode':_0x13017c};}function a31_0x3072(){const _0x57a387=['write','HOOK\x20requires\x20alias/operation/node\x20options.','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','operation-type','parseInt','UNKNOWN','operationType','type','80EHuCPT','/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','name','Select\x20dataset:','TODO:\x20add\x20script\x20description','appCode','Operation\x20type\x20\x22',']\x20(','\x20api\x20pull`\x20to\x20refresh.','Dataset\x20not\x20found\x20for\x20code\x20\x22','keys','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','find','Invalid\x20function\x20name\x20\x22','tableName','.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','utf8','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','30eFaRMQ','functionNode','after','scriptsRootDir','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','7461344ZdLWca','COMMON','4rJHSWp','\x0a\x20*\x20[脚本名称]\x20','Script\x20type','No\x20datasets\x20found\x20for\x20this\x20app.','string','question','\x0a\x20*\x20[触发节点]\x20','nonInteractive','code','/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','length','alias','24hxhhzG','datasetCode','Alias\x20\x22','description','trim','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','validation','ENDPOINT','File\x20already\x20exists:\x20','Function\x20name\x20(valid\x20JS\x20identifier)','Trigger\x20node\x20(HOOK\x20only)','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','\x22\x20not\x20found\x20for\x20dataset\x20','.js','194362XYtjlb','Operation\x20type\x20(HOOK\x20only)','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','stderr','301527iPNscx','26796hJmgrX','map','isInteger','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','Available\x20aliases:\x20','\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Request\x20parameters.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Business\x20result\x20(wrapped\x20in\x20response.data).\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','Invalid\x20dataset\x20selection.','263103bgXPuN','datasetcode','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/','244022GeUOWd','apiDir','HOOK','before','entries','join','83245sSDniy','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','\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','\x20function:\x20','Available:\x20','stdin','str','function-node'];a31_0x3072=function(){return _0x57a387;};return a31_0x3072();}async function promptSelect(_0x3c7bda,_0x46b92e){const _0x1a6a8d=a31_0x108f35;if(_0x46b92e['length']===0x1)return 0x0;for(const [_0x88241,_0x18daca]of _0x46b92e[_0x1a6a8d(0x162)]()){process[_0x1a6a8d(0x152)]['write']('\x20\x20'+(_0x88241+0x1)+'.\x20'+_0x18daca+'\x0a');}const _0x51d544=createInterface({'input':process[_0x1a6a8d(0x169)],'output':process['stderr']});while(!![]){const _0x5bec26=await new Promise(_0x2ae69e=>{const _0x44eca3=_0x1a6a8d;_0x51d544[_0x44eca3(0x13a)](_0x3c7bda+'\x20',_0x2ae69e);}),_0x39c381=Number[_0x1a6a8d(0x170)](_0x5bec26[_0x1a6a8d(0x145)](),0xa);if(Number[_0x1a6a8d(0x156)](_0x39c381)&&_0x39c381>=0x1&&_0x39c381<=_0x46b92e[_0x1a6a8d(0x13f)])return _0x51d544['close'](),_0x39c381-0x1;process[_0x1a6a8d(0x152)][_0x1a6a8d(0x16c)](_0x1a6a8d(0x180)+_0x46b92e[_0x1a6a8d(0x13f)]+'.\x0a');}}function buildFilePath(_0x5adef8,_0x230389,_0x1ff2a4,_0x310c43){const _0x11e068=a31_0x108f35;if(_0x230389==='HOOK'){if(!_0x310c43)throw CliErrors[_0x11e068(0x147)](_0x11e068(0x16d));const _0x460ac9=_0x310c43['alias']??_0x310c43[_0x11e068(0x142)];return join(_0x5adef8[_0x11e068(0x18b)],'HOOK',_0x460ac9,_0x310c43[_0x11e068(0x172)],_0x310c43[_0x11e068(0x189)],_0x1ff2a4+_0x11e068(0x14e));}return join(_0x5adef8[_0x11e068(0x18b)],_0x230389,_0x1ff2a4+'.js');}export function generateTemplate(_0x1f5e2e,_0x46e4dc,_0x23a727,_0x52bd0f,_0x3edbbe){const _0x352289=a31_0x108f35,_0x506e23=_0x52bd0f?.[_0x352289(0x145)]()||_0x352289(0x179);if(_0x1f5e2e===_0x352289(0x18e))return _0x352289(0x175)+_0x506e23+_0x352289(0x136)+_0x46e4dc+_0x352289(0x157)+_0x46e4dc+_0x352289(0x185)+_0x46e4dc+_0x352289(0x187);if(_0x1f5e2e===_0x352289(0x148))return _0x352289(0x13e)+_0x506e23+_0x352289(0x15d)+_0x23a727+'/'+_0x46e4dc+_0x352289(0x159)+_0x46e4dc+_0x352289(0x187);if(!_0x3edbbe)throw CliErrors['validation'](_0x352289(0x146));return _0x352289(0x181)+_0x506e23+'\x0a\x20*\x20[接口路径]\x20POST\x20/api/'+_0x23a727+'/'+_0x3edbbe[_0x352289(0x142)]+'/'+_0x3edbbe[_0x352289(0x172)]+_0x352289(0x13b)+_0x3edbbe[_0x352289(0x189)]+_0x352289(0x166)+_0x46e4dc+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';}
|
|
1
|
+
const a31_0x316594=a31_0x4fc1;function a31_0x4fc1(_0x485046,_0x445743){_0x485046=_0x485046-0x139;const _0x49219b=a31_0x4921();let _0x4fc17a=_0x49219b[_0x485046];return _0x4fc17a;}(function(_0x58c63a,_0x1cc6e1){const _0x59a77e=a31_0x4fc1,_0x3eed65=_0x58c63a();while(!![]){try{const _0x21d7f6=-parseInt(_0x59a77e(0x148))/0x1+parseInt(_0x59a77e(0x179))/0x2*(parseInt(_0x59a77e(0x161))/0x3)+-parseInt(_0x59a77e(0x15a))/0x4+-parseInt(_0x59a77e(0x18d))/0x5*(-parseInt(_0x59a77e(0x170))/0x6)+parseInt(_0x59a77e(0x14d))/0x7*(-parseInt(_0x59a77e(0x16a))/0x8)+-parseInt(_0x59a77e(0x14f))/0x9*(-parseInt(_0x59a77e(0x165))/0xa)+-parseInt(_0x59a77e(0x188))/0xb*(-parseInt(_0x59a77e(0x16f))/0xc);if(_0x21d7f6===_0x1cc6e1)break;else _0x3eed65['push'](_0x3eed65['shift']());}catch(_0x2cbf8d){_0x3eed65['push'](_0x3eed65['shift']());}}}(a31_0x4921,0x43453));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';import{dirname,join}from'node:path';import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';import{isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const bffCreate={'service':'bff','command':'create','description':a31_0x316594(0x168),'risk':a31_0x316594(0x15d),'flags':[{'name':'type','type':a31_0x316594(0x186),'required':!![],'enum':[a31_0x316594(0x173),a31_0x316594(0x139),'HOOK'],'description':'Script\x20type'},{'name':a31_0x316594(0x140),'type':a31_0x316594(0x186),'required':!![],'description':a31_0x316594(0x183)},{'name':'description','type':a31_0x316594(0x186),'description':'Script\x20description'},{'name':a31_0x316594(0x180),'type':a31_0x316594(0x186),'description':'Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)'},{'name':a31_0x316594(0x17f),'type':a31_0x316594(0x186),'description':a31_0x316594(0x171)},{'name':a31_0x316594(0x15b),'type':a31_0x316594(0x186),'description':a31_0x316594(0x149)},{'name':a31_0x316594(0x185),'type':'string','description':'Trigger\x20node\x20(HOOK\x20only)','enum':[a31_0x316594(0x155),a31_0x316594(0x17d)]}],async 'validate'(_0x1a40dc){const _0x3cdf02=a31_0x316594,_0xbffa1d=_0x1a40dc['str'](_0x3cdf02(0x140));if(!isValidBffFunctionName(_0xbffa1d))throw CliErrors['validation'](_0x3cdf02(0x178)+_0xbffa1d+'\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).');},async 'execute'(_0x433c5e){const _0x542f7b=a31_0x316594,_0x30b2ca=loadBffProjectConfig(_0x433c5e['appCode']),_0x798899=_0x433c5e[_0x542f7b(0x147)](_0x542f7b(0x18c)),_0x29d431=_0x433c5e[_0x542f7b(0x147)]('name'),_0x301ed9=_0x433c5e[_0x542f7b(0x147)](_0x542f7b(0x144))||undefined,_0x4d673b=_0x798899==='HOOK'?await resolveHookOptions(_0x30b2ca,_0x433c5e):undefined,_0x566da5=buildFilePath(_0x30b2ca,_0x798899,_0x29d431,_0x4d673b);if(await fileExists(_0x566da5))throw CliErrors['validation']('File\x20already\x20exists:\x20'+_0x566da5);await mkdir(dirname(_0x566da5),{'recursive':!![]});const _0x249573=generateTemplate(_0x798899,_0x29d431,_0x433c5e[_0x542f7b(0x150)],_0x301ed9,_0x4d673b);await writeFile(_0x566da5,_0x249573,_0x542f7b(0x16e));const _0x41be17={'type':_0x798899,'name':_0x29d431,'path':_0x566da5};if(_0x301ed9)_0x41be17[_0x542f7b(0x144)]=_0x301ed9;if(_0x4d673b){if(_0x4d673b['alias'])_0x41be17['alias']=_0x4d673b[_0x542f7b(0x180)];_0x41be17[_0x542f7b(0x13d)]=_0x4d673b[_0x542f7b(0x13d)],_0x41be17[_0x542f7b(0x17e)]=_0x4d673b[_0x542f7b(0x17e)],_0x41be17[_0x542f7b(0x164)]=_0x4d673b['functionNode'];}return{'ok':!![],'data':_0x41be17,'message':_0x542f7b(0x181)+_0x798899+'\x20function:\x20'+_0x29d431};}};async function resolveHookOptions(_0x281784,_0x2a7e89){const _0x20a60b=a31_0x316594,_0x139805=loadAliasMap(_0x2a7e89[_0x20a60b(0x15c)],undefined,resolveApiFilePath(_0x2a7e89['apiDir'],_0x2a7e89['appCode'])),_0x424172=_0x139805[_0x20a60b(0x160)]>0x0;let _0x345702,_0x312357,_0x51adcd;const _0x4b6d40=_0x2a7e89['str'](_0x20a60b(0x180)),_0x41ebf1=_0x2a7e89['str']('datasetcode');if(_0x4b6d40){const _0x30af05=resolveAlias(_0x2a7e89[_0x20a60b(0x15c)],_0x4b6d40,undefined,resolveApiFilePath(_0x2a7e89[_0x20a60b(0x15c)],_0x2a7e89[_0x20a60b(0x150)]));if(!_0x30af05){const _0x3c8ff8=_0x424172?_0x20a60b(0x158)+_0x139805[_0x20a60b(0x176)](_0xfce0d1=>_0xfce0d1['alias'])[_0x20a60b(0x189)](',\x20'):_0x20a60b(0x15e)+CLI_BIN_NAME+_0x20a60b(0x141);throw CliErrors[_0x20a60b(0x142)](_0x20a60b(0x17a)+_0x4b6d40+_0x20a60b(0x153)+_0x3c8ff8);}_0x345702=_0x4b6d40,_0x312357=_0x30af05;}else{if(_0x41ebf1){_0x312357=_0x41ebf1;const _0xacce7e=_0x139805[_0x20a60b(0x14b)](_0x15646d=>_0x15646d[_0x20a60b(0x13d)]===_0x41ebf1);_0x345702=_0xacce7e?.['alias'];}else{if(_0x2a7e89[_0x20a60b(0x156)])throw CliErrors['validation'](_0x20a60b(0x143));else{if(_0x424172){const _0x2baa9d=_0x139805[_0x20a60b(0x176)](_0x3b6bb7=>_0x3b6bb7[_0x20a60b(0x180)]+'\x20('+_0x3b6bb7[_0x20a60b(0x16b)]+')'),_0x3ae638=await promptSelect('Select\x20dataset:',_0x2baa9d),_0x4b6f83=_0x139805[_0x3ae638];if(!_0x4b6f83)throw CliErrors[_0x20a60b(0x142)](_0x20a60b(0x163));_0x345702=_0x4b6f83['alias'],_0x312357=_0x4b6f83['datasetCode'];}else{const _0x27e68d=await listDatasets(_0x2a7e89[_0x20a60b(0x150)]);if(_0x27e68d[_0x20a60b(0x160)]===0x0)throw CliErrors['validation'](_0x20a60b(0x175));const _0x32abd7=_0x27e68d[_0x20a60b(0x176)](_0x5738ca=>_0x5738ca[_0x20a60b(0x140)]+'\x20['+(_0x5738ca['source']??_0x20a60b(0x154))+']\x20('+_0x5738ca[_0x20a60b(0x169)]+')'),_0x3517a4=await promptSelect(_0x20a60b(0x146),_0x32abd7),_0x320c78=_0x27e68d[_0x3517a4];if(!_0x320c78)throw CliErrors[_0x20a60b(0x142)](_0x20a60b(0x163));_0x312357=_0x320c78['code'],_0x345702=undefined;}}}}const _0x500ec3=await listDatasets(_0x2a7e89[_0x20a60b(0x150)]),_0x225806=_0x500ec3[_0x20a60b(0x14b)](_0x205784=>_0x205784[_0x20a60b(0x169)]===_0x312357);if(!_0x225806)throw CliErrors[_0x20a60b(0x142)](_0x20a60b(0x18a)+_0x312357+_0x20a60b(0x13a)+(_0x345702?_0x20a60b(0x14c)+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh.':''));_0x51adcd=_0x225806['id'];const _0x1ea03f=_0x345702??_0x312357,_0x43835a=await listBffDatasetOperations(_0x2a7e89['appCode'],_0x51adcd),_0xe03455=_0x43835a?Object[_0x20a60b(0x17c)](_0x43835a):[];if(_0xe03455['length']===0x0)throw CliErrors[_0x20a60b(0x142)](_0x20a60b(0x187)+_0x1ea03f+'.');let _0x1ce497;const _0x3ade73=_0x2a7e89['str'](_0x20a60b(0x15b));if(_0x3ade73){if(!_0xe03455['includes'](_0x3ade73))throw CliErrors[_0x20a60b(0x142)](_0x20a60b(0x14e)+_0x3ade73+'\x22\x20not\x20found\x20for\x20dataset\x20'+_0x1ea03f+'.\x20'+(_0x20a60b(0x184)+_0xe03455[_0x20a60b(0x189)](',\x20')));_0x1ce497=_0x3ade73;}else{if(_0x2a7e89[_0x20a60b(0x156)])throw CliErrors[_0x20a60b(0x142)]('--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');const _0x196816=await promptSelect(_0x20a60b(0x13e),_0xe03455);_0x1ce497=_0xe03455[_0x196816]??_0xe03455[0x0];}let _0x56c30c=normalizeHookFunctionNode(_0x2a7e89[_0x20a60b(0x147)](_0x20a60b(0x185)));if(!_0x56c30c){if(_0x2a7e89[_0x20a60b(0x147)](_0x20a60b(0x185)))throw CliErrors[_0x20a60b(0x142)](_0x20a60b(0x182));if(_0x2a7e89['nonInteractive'])throw CliErrors['validation']('--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');const _0x1d3660=await promptSelect(_0x20a60b(0x13b),[_0x20a60b(0x155),_0x20a60b(0x17d)]);_0x56c30c=[_0x20a60b(0x155),_0x20a60b(0x17d)][_0x1d3660]??'before';}return{'alias':_0x345702,'datasetCode':_0x312357,'datasetId':_0x51adcd,'operationType':_0x1ce497,'functionNode':_0x56c30c};}async function promptSelect(_0x249608,_0x3648e4){const _0x4f702b=a31_0x316594;if(_0x3648e4[_0x4f702b(0x160)]===0x1)return 0x0;for(const [_0x159cec,_0x38bf6a]of _0x3648e4[_0x4f702b(0x14a)]()){process[_0x4f702b(0x13f)][_0x4f702b(0x15d)]('\x20\x20'+(_0x159cec+0x1)+'.\x20'+_0x38bf6a+'\x0a');}const _0x188cd9=createInterface({'input':process['stdin'],'output':process[_0x4f702b(0x13f)]});while(!![]){const _0x314e48=await new Promise(_0x3377ca=>{const _0x1919f4=_0x4f702b;_0x188cd9[_0x1919f4(0x16c)](_0x249608+'\x20',_0x3377ca);}),_0x236c55=Number[_0x4f702b(0x15f)](_0x314e48[_0x4f702b(0x18f)](),0xa);if(Number['isInteger'](_0x236c55)&&_0x236c55>=0x1&&_0x236c55<=_0x3648e4[_0x4f702b(0x160)])return _0x188cd9[_0x4f702b(0x174)](),_0x236c55-0x1;process['stderr'][_0x4f702b(0x15d)](_0x4f702b(0x162)+_0x3648e4[_0x4f702b(0x160)]+'.\x0a');}}function buildFilePath(_0x4155ac,_0x44e57d,_0x4857b1,_0x3b4a20){const _0xee3b81=a31_0x316594;if(_0x44e57d==='HOOK'){if(!_0x3b4a20)throw CliErrors[_0xee3b81(0x142)]('HOOK\x20requires\x20alias/operation/node\x20options.');const _0x4a9200=_0x3b4a20[_0xee3b81(0x180)]??_0x3b4a20[_0xee3b81(0x13d)];return join(_0x4155ac[_0xee3b81(0x172)],_0xee3b81(0x18b),_0x4a9200,_0x3b4a20['operationType'],_0x3b4a20[_0xee3b81(0x164)],_0x4857b1+'.js');}return join(_0x4155ac['scriptsRootDir'],_0x44e57d,_0x4857b1+'.js');}function a31_0x4921(){const _0x2a2b91=['Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','scriptsRootDir','COMMON','close','No\x20datasets\x20found\x20for\x20this\x20app.','map','\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\x20function\x20name\x20\x22','10OgufEX','Alias\x20\x22','\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','keys','after','operationType','datasetcode','alias','Created\x20','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','Function\x20name\x20(valid\x20JS\x20identifier)','Available:\x20','function-node','string','No\x20operation\x20types\x20found\x20for\x20dataset\x20','957ofGqzd','join','Dataset\x20not\x20found\x20for\x20code\x20\x22','HOOK','type','259345pCepMQ','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/','trim','ENDPOINT','\x22.\x20','Select\x20trigger\x20node:','/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','datasetCode','Select\x20operation\x20type:','stderr','name','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','validation','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','description','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','Select\x20dataset:','str','185154bEDKYL','Operation\x20type\x20(HOOK\x20only)','entries','find','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','91HoghUp','Operation\x20type\x20\x22','9SbwErv','appCode','/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','.js\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Input\x20parameters.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Processing\x20result.\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','\x22\x20not\x20found.\x20','UNKNOWN','before','nonInteractive','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','Available\x20aliases:\x20','TODO:\x20add\x20script\x20description','880944mrnhVC','operation-type','apiDir','write','No\x20api.ts\x20found.\x20Run\x20`','parseInt','length','22023vdjDgh','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','Invalid\x20dataset\x20selection.','functionNode','1520410AQmgoO','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','code','160504yjBDiE','tableName','question','/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','utf8','96708peaCoy','6Vwhxjz'];a31_0x4921=function(){return _0x2a2b91;};return a31_0x4921();}export function generateTemplate(_0x1559aa,_0x182577,_0x314e62,_0x1037a9,_0x5b5104){const _0x5667bf=a31_0x316594,_0x1a80ef=_0x1037a9?.[_0x5667bf(0x18f)]()||_0x5667bf(0x159);if(_0x1559aa===_0x5667bf(0x173))return _0x5667bf(0x151)+_0x1a80ef+'\x0a\x20*\x20[脚本名称]\x20'+_0x182577+_0x5667bf(0x166)+_0x182577+_0x5667bf(0x152)+_0x182577+_0x5667bf(0x145);if(_0x1559aa===_0x5667bf(0x139))return _0x5667bf(0x13c)+_0x1a80ef+_0x5667bf(0x18e)+_0x314e62+'/'+_0x182577+_0x5667bf(0x177)+_0x182577+_0x5667bf(0x145);if(!_0x5b5104)throw CliErrors[_0x5667bf(0x142)](_0x5667bf(0x157));return _0x5667bf(0x16d)+_0x1a80ef+_0x5667bf(0x167)+_0x314e62+'/'+_0x5b5104[_0x5667bf(0x13d)]+'/'+_0x5b5104['operationType']+'\x0a\x20*\x20[触发节点]\x20'+_0x5b5104[_0x5667bf(0x164)]+_0x5667bf(0x17b)+_0x182577+_0x5667bf(0x145);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a32_0x23ec78=a32_0x23ff;(function(_0x1a9c15,_0x5ac4c9){const _0x57161b=a32_0x23ff,_0x53cfff=_0x1a9c15();while(!![]){try{const _0x320df6=parseInt(_0x57161b(0xfe))/0x1+-parseInt(_0x57161b(0xda))/0x2*(-parseInt(_0x57161b(0xe5))/0x3)+parseInt(_0x57161b(0xe6))/0x4*(-parseInt(_0x57161b(0x101))/0x5)+-parseInt(_0x57161b(0xe7))/0x6*(-parseInt(_0x57161b(0xee))/0x7)+-parseInt(_0x57161b(0xf2))/0x8+parseInt(_0x57161b(0xe3))/0x9+parseInt(_0x57161b(0xdc))/0xa*(-parseInt(_0x57161b(0xd8))/0xb);if(_0x320df6===_0x5ac4c9)break;else _0x53cfff['push'](_0x53cfff['shift']());}catch(_0x47d0dc){_0x53cfff['push'](_0x53cfff['shift']());}}}(a32_0x5c9f,0xee2a2));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';function a32_0x23ff(_0x24f75c,_0x4d3a79){_0x24f75c=_0x24f75c-0xcd;const _0x5c9fc0=a32_0x5c9f();let _0x23ff5e=_0x5c9fc0[_0x24f75c];return _0x23ff5e;}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_0x5c9f(){const _0xf45f6f=['filter','40yimazR','lockFilePath','trashedTo','target','delete','validation','remoteId','scriptsRootDir','appCode','stringify','string','map','14284985CIZvIJ','length','26ZVCJnJ','join','30tcZZzm','POST','find','scriptsRoot','trashDir','replace','\x20\x20-\x20','11503908KekNvI','\x22\x20not\x20found\x20after\x20ensureLockScope.','445293wgyduc','52256qUOcmU','775056oKxLYN','split','Function\x20not\x20found:\x20','Lock\x20scope\x20for\x20app\x20\x22','\x20(local\x20file\x20moved\x20to\x20trash)','projectRoot','Would\x20delete\x20','105cOkMHw','includes','keys','BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','9054200ZxGCJi','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','functions','Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','No\x20lock\x20entry\x20found\x20for\x20\x22','toISOString','bff','startsWith','apps','BFF\x20lock\x20file\x20not\x20found.','962259PuxoYK','high-risk-write'];a32_0x5c9f=function(){return _0xf45f6f;};return a32_0x5c9f();}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_0x23ec78(0xfa),'command':'delete','description':a32_0x23ec78(0xf6),'risk':a32_0x23ec78(0xff),'flags':[{'name':a32_0x23ec78(0xcf),'type':a32_0x23ec78(0xd6),'required':!![],'description':a32_0x23ec78(0xf7)}],async 'validate'(_0x16ff07){const _0x1c8f4c=a32_0x23ec78,_0x24b905=loadBffProjectConfig(_0x16ff07[_0x1c8f4c(0xd4)]),_0x213bc5=await readBffLockFile(_0x24b905['lockFilePath']);if(!_0x213bc5)throw CliErrors[_0x1c8f4c(0xd1)](_0x1c8f4c(0xf1));},async 'dryRun'(_0x4c1382){const _0x2274da=a32_0x23ec78,_0x438575=loadBffProjectConfig(_0x4c1382[_0x2274da(0xd4)]),_0x1bc5bc=await readBffLockFile(_0x438575[_0x2274da(0xcd)]);if(!_0x1bc5bc)throw CliErrors[_0x2274da(0xd1)](_0x2274da(0xfd));const {appLock:_0x2413eb}=ensureLockScope(_0x1bc5bc,_0x4c1382['appCode'],_0x438575[_0x2274da(0xdf)],_0x2274da(0xd0)),_0x581222=_0x4c1382['str'](_0x2274da(0xcf)),_0x1c886c=Object[_0x2274da(0xf0)](_0x2413eb[_0x2274da(0xf5)]),_0x188a9b=resolveDeleteTarget(_0x581222,_0x1c886c),_0x54c16e=_0x2413eb[_0x2274da(0xf5)][_0x188a9b];if(!_0x54c16e)throw CliErrors[_0x2274da(0xd1)]('No\x20lock\x20entry\x20found\x20for\x20\x22'+_0x188a9b+'\x22.');const _0x5a3e70=resolveLocalFilePathFromLockKey(_0x438575,_0x188a9b),_0x1a5066=relative(_0x438575[_0x2274da(0xec)],_0x5a3e70),_0x55f646=join(_0x438575[_0x2274da(0xe0)],'<timestamp>',_0x1a5066);return{'method':_0x2274da(0xdd),'url':'/api/management/library/scripts/delete','body':{'appCode':_0x4c1382[_0x2274da(0xd4)],'target':_0x188a9b,'remoteId':_0x54c16e[_0x2274da(0xd2)],'localFilePath':_0x5a3e70,'trashedPath':_0x55f646},'description':_0x2274da(0xed)+_0x188a9b+_0x2274da(0xf3)};},async 'execute'(_0x5ddfad){const _0x550e97=a32_0x23ec78,_0xaa0ade=loadBffProjectConfig(_0x5ddfad[_0x550e97(0xd4)]),_0x2f4e77=await readBffLockFile(_0xaa0ade[_0x550e97(0xcd)]);if(!_0x2f4e77)throw CliErrors[_0x550e97(0xd1)](_0x550e97(0xfd));const {lockData:_0x37e841,appLock:_0x14b428}=ensureLockScope(_0x2f4e77,_0x5ddfad[_0x550e97(0xd4)],_0xaa0ade[_0x550e97(0xdf)],'delete'),_0x4fb4e6=JSON['parse'](JSON[_0x550e97(0xd5)](_0x37e841)),_0x3ab2b9=_0x4fb4e6[_0x550e97(0xfc)][_0x5ddfad[_0x550e97(0xd4)]];if(!_0x3ab2b9)throw new Error(_0x550e97(0xea)+_0x5ddfad[_0x550e97(0xd4)]+_0x550e97(0xe4));const _0x16f596=_0x5ddfad['str'](_0x550e97(0xcf)),_0x4f84c9=Object[_0x550e97(0xf0)](_0x3ab2b9[_0x550e97(0xf5)]),_0x194bdf=resolveDeleteTarget(_0x16f596,_0x4f84c9),_0x4a52e9=_0x3ab2b9[_0x550e97(0xf5)][_0x194bdf];if(!_0x4a52e9)throw CliErrors[_0x550e97(0xd1)](_0x550e97(0xf8)+_0x194bdf+'\x22.');await deleteBffScript(_0x4a52e9[_0x550e97(0xd2)]),delete _0x3ab2b9[_0x550e97(0xf5)][_0x194bdf],_0x3ab2b9['lastSync']=new Date()[_0x550e97(0xf9)](),await writeBffLockFile(_0xaa0ade[_0x550e97(0xcd)],_0x4fb4e6);const _0x439e4f=resolveLocalFilePathFromLockKey(_0xaa0ade,_0x194bdf);let _0x25652d;await fileExists(_0x439e4f)&&(_0x25652d=await moveToTrash(_0xaa0ade[_0x550e97(0xec)],_0xaa0ade[_0x550e97(0xe0)],_0x439e4f),await cleanupEmptyDirectories(dirname(_0x439e4f),_0xaa0ade[_0x550e97(0xd3)]));await waitForDeleteSettlement(_0xaa0ade[_0x550e97(0xcd)],_0x5ddfad[_0x550e97(0xd4)],_0x194bdf,_0x439e4f),await sleep(0x96);const _0x4d436f={'deleted':_0x194bdf,'remoteId':_0x4a52e9['remoteId']};if(_0x25652d)_0x4d436f[_0x550e97(0xce)]=_0x25652d;return{'ok':!![],'data':_0x4d436f,'message':'Deleted\x20'+_0x194bdf+(_0x25652d?_0x550e97(0xeb):'')};}};function resolveDeleteTarget(_0x40803a,_0x1edced){const _0x34d475=a32_0x23ec78;if(_0x40803a[_0x34d475(0xef)]('/')){const _0x44e518=_0x1edced[_0x34d475(0xde)](_0xa8633a=>_0xa8633a===_0x40803a);if(!_0x44e518)throw CliErrors['validation'](_0x34d475(0xe9)+_0x40803a);return _0x44e518;}const _0x1b1e8a=_0x1edced[_0x34d475(0x100)](_0x5df5d2=>_0x5df5d2[_0x34d475(0xe8)]('/')['at'](-0x1)===_0x40803a);if(_0x1b1e8a[_0x34d475(0xd9)]===0x0)throw CliErrors[_0x34d475(0xd1)](_0x34d475(0xe9)+_0x40803a);if(_0x1b1e8a[_0x34d475(0xd9)]>0x1)throw CliErrors['validation']('Multiple\x20functions\x20match\x20\x22'+_0x40803a+_0x34d475(0xf4)+_0x1b1e8a[_0x34d475(0xd7)](_0x3a8818=>_0x34d475(0xe2)+_0x3a8818)[_0x34d475(0xdb)]('\x0a'));return _0x1b1e8a[0x0];}async function moveToTrash(_0x4838e4,_0x3e7fda,_0x39cb3f){const _0x55744d=a32_0x23ec78,_0x3ab3f8=new Date()[_0x55744d(0xf9)]()[_0x55744d(0xe1)](/[:.]/g,'-'),_0x3dfe81=relative(_0x4838e4,_0x39cb3f),_0x3c9a0c=join(_0x3e7fda,_0x3ab3f8,_0x3dfe81);return await mkdir(dirname(_0x3c9a0c),{'recursive':!![]}),await rename(_0x39cb3f,_0x3c9a0c),_0x3c9a0c;}async function cleanupEmptyDirectories(_0x2f7158,_0x525b8c){const _0x23862e=a32_0x23ec78;let _0x1cab96=resolve(_0x2f7158);const _0x126f60=resolve(_0x525b8c);while(_0x1cab96[_0x23862e(0xfb)](''+_0x126f60+sep)||_0x1cab96===_0x126f60){if(_0x1cab96===_0x126f60)return;try{const _0x20a810=await readdir(_0x1cab96);if(_0x20a810[_0x23862e(0xd9)]>0x0)return;await rmdir(_0x1cab96);}catch{return;}_0x1cab96=dirname(_0x1cab96);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0x151114,_0x31cc7c,_0x1e2de9,_0x2d6e22){const _0x281e53=a32_0x23ec78;for(let _0x41c121=0x0;_0x41c121<DELETE_SETTLE_RETRY_COUNT;_0x41c121+=0x1){const _0x25d90f=await readBffLockFile(_0x151114),_0x37b6b3=!!_0x25d90f?.[_0x281e53(0xfc)]?.[_0x31cc7c]?.['functions']?.[_0x1e2de9],_0x51feda=await fileExists(_0x2d6e22);if(!_0x37b6b3&&!_0x51feda)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error('Local\x20delete\x20not\x20settled\x20for\x20'+_0x1e2de9+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a33_0x91ee9e=a33_0x2fad;(function(_0x5aa07e,_0x27880f){const _0x2327e4=a33_0x2fad,_0x460b3f=_0x5aa07e();while(!![]){try{const _0x53ec13=parseInt(_0x2327e4(0xd1))/0x1*(parseInt(_0x2327e4(0xe2))/0x2)+parseInt(_0x2327e4(0xdc))/0x3+parseInt(_0x2327e4(0xd4))/0x4+-parseInt(_0x2327e4(0xe0))/0x5*(-parseInt(_0x2327e4(0xce))/0x6)+-parseInt(_0x2327e4(0xdd))/0x7+-parseInt(_0x2327e4(0xe5))/0x8*(-parseInt(_0x2327e4(0xd7))/0x9)+-parseInt(_0x2327e4(0xcb))/0xa*(parseInt(_0x2327e4(0xd0))/0xb);if(_0x53ec13===_0x27880f)break;else _0x460b3f['push'](_0x460b3f['shift']());}catch(_0x2a38a7){_0x460b3f['push'](_0x460b3f['shift']());}}}(a33_0x4d22,0x5b0f1));import{getBffScriptInfo}from'../../core/api-client.js';function a33_0x2fad(_0x288d59,_0x56d447){_0x288d59=_0x288d59-0xcb;const _0x4d2254=a33_0x4d22();let _0x2fad97=_0x4d2254[_0x288d59];return _0x2fad97;}function a33_0x4d22(){const _0x1d3df3=['verbose','8KAEOpB','11627310tEVBNr','scriptContent','detail','9144dZaaGK','bff','11ObvEZt','1hFuMaH','num','bool','2324792VWftcb','appCode','description','1139625aQkLCr','read','createdTime','Return\x20full\x20raw\x20script\x20object','updatedTime','2019078uCMjPb','4865616oCiarU','(none)','Script\x20ID','780eVbmkY','boolean','1224406clGQoZ','Get\x20BFF\x20script\x20details\x20by\x20ID'];a33_0x4d22=function(){return _0x1d3df3;};return a33_0x4d22();}export const bffDetail={'service':a33_0x91ee9e(0xcf),'command':a33_0x91ee9e(0xcd),'description':a33_0x91ee9e(0xe3),'risk':a33_0x91ee9e(0xd8),'flags':[{'name':'id','type':'number','required':!![],'description':a33_0x91ee9e(0xdf)},{'name':'verbose','type':a33_0x91ee9e(0xe1),'description':a33_0x91ee9e(0xda)}],async 'execute'(_0x3a36a9){const _0x5f0c36=a33_0x91ee9e,_0x1530ef=await getBffScriptInfo(_0x3a36a9[_0x5f0c36(0xd2)]('id')),_0x19299a=_0x3a36a9[_0x5f0c36(0xd3)](_0x5f0c36(0xe4));if(_0x19299a)return{'ok':!![],'data':_0x1530ef};return{'ok':!![],'data':{'id':_0x1530ef['id'],'appCode':_0x1530ef[_0x5f0c36(0xd5)],'scriptType':_0x1530ef['scriptType'],'description':_0x1530ef[_0x5f0c36(0xd6)]||_0x5f0c36(0xde),'createdTime':_0x1530ef[_0x5f0c36(0xd9)]??'','updatedTime':_0x1530ef[_0x5f0c36(0xdb)]??'','scriptContent':_0x1530ef[_0x5f0c36(0xcc)]??''}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x53b9ae,_0xb9ff90){const _0x9cc342=a34_0x17da,_0x48e812=_0x53b9ae();while(!![]){try{const _0x761cd5=parseInt(_0x9cc342(0x1cd))/0x1+parseInt(_0x9cc342(0x1d0))/0x2*(parseInt(_0x9cc342(0x1cc))/0x3)+-parseInt(_0x9cc342(0x1c9))/0x4+parseInt(_0x9cc342(0x1ce))/0x5+parseInt(_0x9cc342(0x1ca))/0x6+-parseInt(_0x9cc342(0x1cb))/0x7+-parseInt(_0x9cc342(0x1cf))/0x8;if(_0x761cd5===_0xb9ff90)break;else _0x48e812['push'](_0x48e812['shift']());}catch(_0x3b4ba0){_0x48e812['push'](_0x48e812['shift']());}}}(a34_0x56bf,0x7071f));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_0x17da(_0x241ff0,_0x1223af){_0x241ff0=_0x241ff0-0x1c9;const _0x56bfa1=a34_0x56bf();let _0x17dad8=_0x56bfa1[_0x241ff0];return _0x17dad8;}import{bffDelete}from'../../commands/bff/delete.js';function a34_0x56bf(){const _0x2c8d7d=['773244bEiypj','833005TcELew','2178168TthBzv','90888ycPoYo','512704jyskOi','1110966bblvzy','3120320PHuKPU','12mVOmLe'];a34_0x56bf=function(){return _0x2c8d7d;};return a34_0x56bf();}export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];
|
package/lib/commands/bff/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a35_0x3420(_0x248cce,_0xc936d2){_0x248cce=_0x248cce-0x1ee;const _0x2d23f2=a35_0x2d23();let _0x3420f3=_0x2d23f2[_0x248cce];return _0x3420f3;}const a35_0x30db7f=a35_0x3420;(function(_0x5a6485,_0x60357f){const _0x143b53=a35_0x3420,_0xe8c9d=_0x5a6485();while(!![]){try{const _0x5e8b8f=parseInt(_0x143b53(0x208))/0x1+-parseInt(_0x143b53(0x1ee))/0x2*(-parseInt(_0x143b53(0x1f4))/0x3)+parseInt(_0x143b53(0x1f3))/0x4+parseInt(_0x143b53(0x1fa))/0x5*(-parseInt(_0x143b53(0x20c))/0x6)+-parseInt(_0x143b53(0x20a))/0x7*(parseInt(_0x143b53(0x207))/0x8)+parseInt(_0x143b53(0x206))/0x9*(parseInt(_0x143b53(0x1ff))/0xa)+-parseInt(_0x143b53(0x1fb))/0xb;if(_0x5e8b8f===_0x60357f)break;else _0xe8c9d['push'](_0xe8c9d['shift']());}catch(_0x584598){_0xe8c9d['push'](_0xe8c9d['shift']());}}}(a35_0x2d23,0xc809c));function a35_0x2d23(){const _0x305ca5=['No\x20BFF\x20scripts\x20found.','1413mGxTBc','296XCSViG','1141152pThhZB','str','218519DiTEef','string','924velAyT','bool','20PNNhUK','name','scriptType','verbose','Return\x20full\x20script\x20objects','4988324MqUNSN','441087XMuwbF','functionName','list','bff','COMMON','List\x20BFF\x20scripts','23015spYMVN','18090039nyVafI','length','appCode','Script\x20type\x20filter','29890UgOiAL','type','Filter\x20by\x20script\x20name','read','ENDPOINT','map'];a35_0x2d23=function(){return _0x305ca5;};return a35_0x2d23();}import{listBffScripts}from'../../core/api-client.js';export const bffList={'service':a35_0x30db7f(0x1f7),'command':a35_0x30db7f(0x1f6),'description':a35_0x30db7f(0x1f9),'risk':a35_0x30db7f(0x202),'flags':[{'name':a35_0x30db7f(0x200),'type':a35_0x30db7f(0x20b),'description':a35_0x30db7f(0x1fe),'default':'ENDPOINT','enum':[a35_0x30db7f(0x203),a35_0x30db7f(0x1f8)]},{'name':'name','type':a35_0x30db7f(0x20b),'description':a35_0x30db7f(0x201)},{'name':a35_0x30db7f(0x1f1),'type':'boolean','description':a35_0x30db7f(0x1f2)}],async 'execute'(_0x47e9be){const _0x5cb386=a35_0x30db7f,_0x4953bb=await listBffScripts(_0x47e9be[_0x5cb386(0x1fd)],_0x47e9be[_0x5cb386(0x209)](_0x5cb386(0x200)),{'scriptName':_0x47e9be['str'](_0x5cb386(0x1ef))||undefined}),_0x55d868=_0x47e9be[_0x5cb386(0x20d)](_0x5cb386(0x1f1));return{'ok':!![],'data':_0x55d868?_0x4953bb:_0x4953bb[_0x5cb386(0x204)](_0x40abef=>({'id':_0x40abef['id'],'functionName':_0x40abef[_0x5cb386(0x1f5)]??'','description':_0x40abef['description']||'(unnamed)','scriptType':_0x40abef[_0x5cb386(0x1f0)]})),'message':_0x4953bb[_0x5cb386(0x1fc)]===0x0?_0x5cb386(0x205):undefined};}};
|