@lovrabet/rabetbase-cli 2.3.12 → 2.3.13-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 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/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_0x4ba4a9=a20_0x117a;(function(_0x49667d,_0x17b6cf){const _0x2683af=a20_0x117a,_0x4c1adc=_0x49667d();while(!![]){try{const _0x43bbe7=-parseInt(_0x2683af(0xc8))/0x1+-parseInt(_0x2683af(0xd2))/0x2+-parseInt(_0x2683af(0xc9))/0x3*(-parseInt(_0x2683af(0xd7))/0x4)+-parseInt(_0x2683af(0xce))/0x5+-parseInt(_0x2683af(0xc5))/0x6*(-parseInt(_0x2683af(0xd5))/0x7)+parseInt(_0x2683af(0xcc))/0x8+parseInt(_0x2683af(0xbc))/0x9*(-parseInt(_0x2683af(0xd1))/0xa);if(_0x43bbe7===_0x17b6cf)break;else _0x4c1adc['push'](_0x4c1adc['shift']());}catch(_0xfe49e1){_0x4c1adc['push'](_0x4c1adc['shift']());}}}(a20_0x44f6,0x5090e));function a20_0x44f6(){const _0x315cea=['projectPath','104290tRTbec','1088800RRCorx','object','appcode','20251mdqYBc','optional','20208BVYMRK','\x20config','List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','defaultApp','isCurrent','merged','.\x20Use\x20`','\x20in\x20','No\x20apps\x20configured','List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','boolean','inherit','globalPath','globalConfig','list','162vxqTiJ','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','remote','mergedCli','app','apps','map','project','1302aRrTUZ','projectConfig','read','115679BxREnP','309jgyqyO','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','bool','4125896hblFGj','entries','2430375QLYJlF','global'];a20_0x44f6=function(){return _0x315cea;};return a20_0x44f6();}import{readRawConfigWithLayers}from'../../context.js';function a20_0x117a(_0x494a55,_0x4a158e){_0x494a55=_0x494a55-0xb6;const _0x44f6d7=a20_0x44f6();let _0x117ab2=_0x44f6d7[_0x494a55];return _0x117ab2;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';import{buildAppProfileListFields}from'../../config/schema.js';import{appDefinedIn,enrichAppListItemsWithMergedSelection,resolveDefaultAppSource}from'../../commands/app/shared.js';import{listRemoteAppDirectory}from'../../commands/app/remote-directory.js';function buildItemsFromLayer(_0x1dbbbe,_0x3fad2b){const _0x5da42f=a20_0x117a,_0x4105cf=[],_0x37c7f4=_0x1dbbbe[_0x5da42f(0xc2)]&&typeof _0x1dbbbe[_0x5da42f(0xc2)]===_0x5da42f(0xd3)?_0x1dbbbe['apps']:{},_0x282a48=_0x1dbbbe[_0x5da42f(0xda)]||undefined;for(const [_0x4eeaa4,_0x57bacd]of Object[_0x5da42f(0xcd)](_0x37c7f4)){if(!_0x57bacd||typeof _0x57bacd!==_0x5da42f(0xd3)||!_0x57bacd['appcode'])continue;_0x4105cf['push']({'name':_0x4eeaa4,'appcode':_0x57bacd[_0x5da42f(0xd4)],'named':!![],'definedIn':_0x3fad2b,'isDefault':_0x4eeaa4===_0x282a48,...buildAppProfileListFields(_0x57bacd)});}return _0x4105cf;}function buildMergedItems(_0x56dd07,_0x370b32){const _0x45c3b2=a20_0x117a,{apps:apps={},defaultApp:_0x170817}=_0x56dd07,_0x2d7dc5=_0x370b32[_0x45c3b2(0xba)]['apps']&&typeof _0x370b32[_0x45c3b2(0xba)][_0x45c3b2(0xc2)]===_0x45c3b2(0xd3)?_0x370b32[_0x45c3b2(0xba)][_0x45c3b2(0xc2)]:{},_0x4dfaf8=_0x370b32['projectConfig'][_0x45c3b2(0xc2)]&&typeof _0x370b32[_0x45c3b2(0xc6)][_0x45c3b2(0xc2)]===_0x45c3b2(0xd3)?_0x370b32[_0x45c3b2(0xc6)][_0x45c3b2(0xc2)]:{},_0x1e7e33=_0x370b32[_0x45c3b2(0xc6)][_0x45c3b2(0xb8)]===![],_0x223f79=Object[_0x45c3b2(0xcd)](apps),_0x1d2229=_0x223f79[_0x45c3b2(0xc3)](([_0x452a4f,_0x120ace])=>({'name':_0x452a4f,'appcode':_0x120ace[_0x45c3b2(0xd4)],'named':!![],'definedIn':appDefinedIn(_0x452a4f,_0x2d7dc5,_0x4dfaf8,_0x1e7e33),'isDefault':_0x452a4f===_0x170817,...buildAppProfileListFields(_0x120ace)}));return _0x1d2229;}function validateAppListFlags(_0x290716){const _0x245caf=a20_0x117a;if(!_0x290716['bool']('remote'))return;if(!_0x290716[_0x245caf(0xcb)](_0x245caf(0xcf))&&!_0x290716[_0x245caf(0xcb)]('project'))return;throw CliErrors['validation'](_0x245caf(0xbd),'Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.');}async function execute(_0x5d8282){const _0x497611=a20_0x117a;validateAppListFlags(_0x5d8282);if(_0x5d8282[_0x497611(0xcb)]('remote'))return{'ok':!![],'data':await listRemoteAppDirectory(_0x5d8282)};const _0x3843cb=_0x5d8282[_0x497611(0xcb)]('global'),_0x3dd9a5=_0x5d8282[_0x497611(0xcb)]('project'),_0x11eeff=_0x3843cb?_0x497611(0xcf):_0x3dd9a5?_0x497611(0xc4):_0x497611(0xdc),{config:_0x1a5d3b,layers:_0x437218}=readRawConfigWithLayers(),_0x58416f=resolveDefaultAppSource(_0x437218),{defaultApp:_0x3cef92}=_0x1a5d3b;let _0xe014c2,_0x97fe2f;switch(_0x11eeff){case _0x497611(0xcf):_0xe014c2=buildItemsFromLayer(_0x437218[_0x497611(0xba)],'global'),_0x97fe2f=_0x437218[_0x497611(0xb9)];break;case _0x497611(0xc4):_0xe014c2=buildItemsFromLayer(_0x437218[_0x497611(0xc6)],'project'),_0x97fe2f=_0x437218[_0x497611(0xd0)];break;default:_0xe014c2=buildMergedItems(_0x1a5d3b,_0x437218);break;}enrichAppListItemsWithMergedSelection(_0xe014c2,_0x5d8282[_0x497611(0xc0)]);if(_0xe014c2['length']===0x0){const _0x4a4715=_0x11eeff==='merged'?'':_0x497611(0xde)+_0x11eeff+_0x497611(0xd8);return{'ok':!![],'data':[],'message':_0x497611(0xdf)+_0x4a4715+_0x497611(0xdd)+CLI_BIN_NAME+'\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.'};}const _0x273bd0=_0xe014c2['find'](_0x409b5a=>_0x409b5a[_0x497611(0xdb)]===!![]),_0x58baa6=_0x3cef92??_0x273bd0?.[_0x497611(0xd4)]??null,_0x2de1b5=_0x11eeff===_0x497611(0xdc)?{'globalPath':_0x437218[_0x497611(0xb9)]??null,'projectPath':_0x437218[_0x497611(0xd0)]??null,'defaultApp':_0x58baa6,'defaultAppSource':_0x3cef92!=null?_0x58416f:null}:{'scope':_0x11eeff,'configPath':_0x97fe2f??null};return{'ok':!![],'data':{'items':_0xe014c2,'meta':_0x2de1b5}};}export const appListDefinition={'service':a20_0x4ba4a9(0xc1),'command':a20_0x4ba4a9(0xbb),'description':a20_0x4ba4a9(0xd9),'risk':a20_0x4ba4a9(0xc7),'auth':a20_0x4ba4a9(0xd6),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a20_0x4ba4a9(0xbf),'type':'boolean','description':a20_0x4ba4a9(0xb6),'default':![]},{'name':a20_0x4ba4a9(0xcf),'type':a20_0x4ba4a9(0xb7),'description':a20_0x4ba4a9(0xbe),'default':![]},{'name':'project','type':a20_0x4ba4a9(0xb7),'description':a20_0x4ba4a9(0xca),'default':![]}],async 'validate'(_0x342ee0){validateAppListFlags(_0x342ee0);},'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a21_0x16cd(){const _0x5ceadd=['43284qgsLcO','65796OOstLF','546602tsYkEj','appName','cookie','platform','2055330XetUpq','2381720bCOZqz','3091655tABlrh','4429200zOpvjw','4wRqwOT','authRequired'];a21_0x16cd=function(){return _0x5ceadd;};return a21_0x16cd();}(function(_0x1d5edb,_0x1c7ec3){const _0x4e7f0a=a21_0x131f,_0x1d0fc9=_0x1d5edb();while(!![]){try{const _0x33f238=-parseInt(_0x4e7f0a(0x99))/0x1+parseInt(_0x4e7f0a(0x98))/0x2+parseInt(_0x4e7f0a(0x97))/0x3*(-parseInt(_0x4e7f0a(0x95))/0x4)+parseInt(_0x4e7f0a(0x92))/0x5+parseInt(_0x4e7f0a(0x91))/0x6+-parseInt(_0x4e7f0a(0x93))/0x7+parseInt(_0x4e7f0a(0x94))/0x8;if(_0x33f238===_0x1c7ec3)break;else _0x1d0fc9['push'](_0x1d0fc9['shift']());}catch(_0x494f2c){_0x1d0fc9['push'](_0x1d0fc9['shift']());}}}(a21_0x16cd,0x62540));import{listRemoteApps}from'../../core/api-client.js';import{getCookie}from'../../auth/get-cookie.js';import{CliErrors}from'../../errors.js';function a21_0x131f(_0x28d6a6,_0x5aaa1f){_0x28d6a6=_0x28d6a6-0x90;const _0x16cd57=a21_0x16cd();let _0x131ff9=_0x16cd57[_0x28d6a6];return _0x131ff9;}import{withActiveCookie}from'../../utils/with-active-cookie.js';function resolveCookie(_0x458632){const _0x501df2=a21_0x131f,_0x3ee248=_0x458632[_0x501df2(0x9b)]||getCookie();if(!_0x3ee248)throw CliErrors[_0x501df2(0x96)]();return _0x3ee248;}export async function listRemoteAppDirectory(_0x25c9f4){const _0x967203=a21_0x131f,_0x3b11f7=await withActiveCookie(resolveCookie(_0x25c9f4),()=>listRemoteApps());return{'items':_0x3b11f7['map'](_0x2bd020=>({..._0x2bd020['id']!=null?{'id':_0x2bd020['id']}:{},'appCode':_0x2bd020['appCode'],'appName':_0x2bd020[_0x967203(0x9a)],..._0x2bd020['appDesc']!=null?{'appDesc':_0x2bd020['appDesc']}:{}})),'meta':{'source':_0x967203(0x90)}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a22_0x2981(_0x191a6f,_0x238678){_0x191a6f=_0x191a6f-0xd3;const _0x3bd625=a22_0x3bd6();let _0x2981e4=_0x3bd625[_0x191a6f];return _0x2981e4;}function a22_0x3bd6(){const _0x16a53d=['13418sDKkwM','app','remove','30BCWTTZ','9674313iSsFRH','1391308alxczy','4570960QiegVe','high-risk-write','4907QnLNRR','5FMFrUF','2274hiIvJH','123cnNXuK','App\x20profile\x20name\x20to\x20remove','app\x20remove','7005508jIPpvq','7831260orTJOs','2026-07'];a22_0x3bd6=function(){return _0x16a53d;};return a22_0x3bd6();}const a22_0x41b6bb=a22_0x2981;(function(_0x4906ee,_0x59c3b7){const _0x2ce82c=a22_0x2981,_0x1a0120=_0x4906ee();while(!![]){try{const _0x2d02ff=-parseInt(_0x2ce82c(0xd3))/0x1+-parseInt(_0x2ce82c(0xdf))/0x2*(parseInt(_0x2ce82c(0xd9))/0x3)+-parseInt(_0x2ce82c(0xdc))/0x4*(parseInt(_0x2ce82c(0xd7))/0x5)+-parseInt(_0x2ce82c(0xd8))/0x6*(-parseInt(_0x2ce82c(0xd6))/0x7)+parseInt(_0x2ce82c(0xd4))/0x8+parseInt(_0x2ce82c(0xdd))/0x9+-parseInt(_0x2ce82c(0xe2))/0xa*(-parseInt(_0x2ce82c(0xe3))/0xb);if(_0x2d02ff===_0x59c3b7)break;else _0x1a0120['push'](_0x1a0120['shift']());}catch(_0x393689){_0x1a0120['push'](_0x1a0120['shift']());}}}(a22_0x3bd6,0xe288c));import{CLI_BIN_NAME}from'../../constant/cli.js';import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';export const appRemoveDefinition={'service':a22_0x41b6bb(0xe0),'command':a22_0x41b6bb(0xe1),'description':'Deprecated:\x20use\x20workspace\x20remove\x20to\x20remove\x20an\x20app\x20profile','risk':a22_0x41b6bb(0xd5),'requiresAuth':![],'requiresAppCode':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+'\x20workspace\x20remove','since':a22_0x41b6bb(0xde)},'args':[{'name':'name','description':a22_0x41b6bb(0xda),'required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x237142=>validateAppName(_0x237142,'app\x20remove'),'execute':_0x55f322=>runAppRemove(_0x55f322,a22_0x41b6bb(0xdb))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5d9d29,_0x32aa42){const _0x541e23=a23_0x13f5,_0x5e2afc=_0x5d9d29();while(!![]){try{const _0x3483bc=-parseInt(_0x541e23(0x17a))/0x1*(-parseInt(_0x541e23(0x175))/0x2)+-parseInt(_0x541e23(0x179))/0x3*(parseInt(_0x541e23(0x176))/0x4)+parseInt(_0x541e23(0x177))/0x5+-parseInt(_0x541e23(0x17c))/0x6*(-parseInt(_0x541e23(0x16f))/0x7)+-parseInt(_0x541e23(0x18c))/0x8+parseInt(_0x541e23(0x188))/0x9*(-parseInt(_0x541e23(0x18b))/0xa)+parseInt(_0x541e23(0x172))/0xb;if(_0x3483bc===_0x32aa42)break;else _0x5e2afc['push'](_0x5e2afc['shift']());}catch(_0x1cc95a){_0x5e2afc['push'](_0x5e2afc['shift']());}}}(a23_0x15ec,0xeb0a2));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';export function enrichAppListItemsWithMergedSelection(_0x25421a,_0x9159f1){const _0x10954b=a23_0x13f5;if(!_0x9159f1)return;const _0x26d223=_0x9159f1[_0x10954b(0x17e)]&&typeof _0x9159f1['apps']===_0x10954b(0x184)?_0x9159f1[_0x10954b(0x17e)]:{},_0x5c9865=Object[_0x10954b(0x18a)](_0x26d223)[_0x10954b(0x17f)]>0x0;for(const _0x5b54bf of _0x25421a){_0x5b54bf['isCurrent']=![];}const _0x403cb7=_0x9159f1['appCode']!=null?String(_0x9159f1['appCode'])[_0x10954b(0x180)]():'';if(_0x5c9865){const _0x4118f7=_0x9159f1['currentApp']??_0x9159f1[_0x10954b(0x189)];if(_0x4118f7)for(const _0x537530 of _0x25421a){_0x537530[_0x10954b(0x173)]===!![]&&_0x537530[_0x10954b(0x186)]===_0x4118f7&&(_0x537530[_0x10954b(0x16e)]=!![]);}for(const _0x5717f6 of _0x25421a){if(_0x5717f6[_0x10954b(0x173)]!==![])continue;if(_0x9159f1['defaultApp'])continue;_0x403cb7&&String(_0x5717f6[_0x10954b(0x174)]??'')[_0x10954b(0x180)]()===_0x403cb7&&(_0x5717f6[_0x10954b(0x16e)]=!![]);}return;}if(!_0x403cb7)return;for(const _0x1bd9cc of _0x25421a){String(_0x1bd9cc['appcode']??'')['trim']()===_0x403cb7&&(_0x1bd9cc[_0x10954b(0x16e)]=!![]);}}export function resolveAppScopeForWrite(_0x1c8f4f,_0x278fa8,_0x207880){const _0x50414f=a23_0x13f5;if(_0x278fa8)return _0x50414f(0x17d);const _0x56f065=_0x207880[_0x50414f(0x187)]['apps']&&typeof _0x207880[_0x50414f(0x187)][_0x50414f(0x17e)]===_0x50414f(0x184)?_0x207880['projectConfig'][_0x50414f(0x17e)]:{},_0x176533=_0x207880[_0x50414f(0x182)][_0x50414f(0x17e)]&&typeof _0x207880[_0x50414f(0x182)][_0x50414f(0x17e)]===_0x50414f(0x184)?_0x207880[_0x50414f(0x182)][_0x50414f(0x17e)]:{};if(Object[_0x50414f(0x183)][_0x50414f(0x171)][_0x50414f(0x181)](_0x56f065,_0x1c8f4f))return _0x50414f(0x17b);if(Object['prototype'][_0x50414f(0x171)][_0x50414f(0x181)](_0x176533,_0x1c8f4f))return _0x50414f(0x17d);return _0x50414f(0x17b);}export function appDefinedIn(_0x398c0d,_0x45c1a1,_0x1fdc21,_0x32797b){const _0x424c5d=a23_0x13f5;if(_0x32797b)return Object[_0x424c5d(0x183)][_0x424c5d(0x171)][_0x424c5d(0x181)](_0x1fdc21,_0x398c0d)?_0x424c5d(0x17b):_0x424c5d(0x17d);const _0x441d5c=Object['prototype'][_0x424c5d(0x171)][_0x424c5d(0x181)](_0x45c1a1,_0x398c0d),_0x1f9bf5=Object[_0x424c5d(0x183)][_0x424c5d(0x171)][_0x424c5d(0x181)](_0x1fdc21,_0x398c0d);if(_0x441d5c&&_0x1f9bf5)return _0x424c5d(0x185);if(_0x1f9bf5)return _0x424c5d(0x17b);return _0x424c5d(0x17d);}export function resolveDefaultAppSource(_0x4ce0ab){const _0x317211=a23_0x13f5,_0x5d86d8=_0x4ce0ab['projectConfig'][_0x317211(0x17e)]&&typeof _0x4ce0ab[_0x317211(0x187)][_0x317211(0x17e)]==='object'?_0x4ce0ab['projectConfig']['apps']:{};if(_0x317211(0x189)in _0x4ce0ab['projectConfig'])return'project';if(Object[_0x317211(0x18a)](_0x5d86d8)['length']>0x0)return'project';if(_0x4ce0ab[_0x317211(0x187)][_0x317211(0x178)]===![])return null;if(_0x4ce0ab[_0x317211(0x182)][_0x317211(0x189)])return'global';return null;}export function getConfigPath(_0x1ab9c9={}){const _0x4a601a=a23_0x13f5,_0x262d6a=_0x1ab9c9[_0x4a601a(0x17d)]?'global':_0x4a601a(0x17b);return resolveWriteConfigPath(_0x262d6a);}export function readConfig(_0x410e90={}){return readConfigFile(getConfigPath(_0x410e90));}function a23_0x15ec(){const _0x5e6c6d=['isCurrent','35TPUJum','\x20(global)','hasOwnProperty','1466157ChKrzD','named','appcode','2btZkgV','10472WbNFgm','6442770ZYPNNM','inherit','831DygahD','133901cthfeY','project','2152830OyDyaN','global','apps','length','trim','call','globalConfig','prototype','object','both','name','projectConfig','375021YvyJoy','defaultApp','keys','90qAArzo','10294704ahHuES'];a23_0x15ec=function(){return _0x5e6c6d;};return a23_0x15ec();}export function writeConfig(_0x16ea5d,_0x510936={}){writeConfigFile(getConfigPath(_0x510936),_0x16ea5d);}function a23_0x13f5(_0x24596c,_0x2b87cd){_0x24596c=_0x24596c-0x16e;const _0x15ecf5=a23_0x15ec();let _0x13f528=_0x15ecf5[_0x24596c];return _0x13f528;}export function scopeLabel(_0x43bfd7){const _0x381e24=a23_0x13f5;return _0x43bfd7[_0x381e24(0x17d)]?_0x381e24(0x170):'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a24_0x414e73=a24_0x5409;(function(_0x4397fa,_0x3a1f1f){const _0x39e313=a24_0x5409,_0x1afc1c=_0x4397fa();while(!![]){try{const _0x4106ca=-parseInt(_0x39e313(0xfe))/0x1+-parseInt(_0x39e313(0xf9))/0x2+parseInt(_0x39e313(0xfa))/0x3*(parseInt(_0x39e313(0xf1))/0x4)+-parseInt(_0x39e313(0xe7))/0x5+parseInt(_0x39e313(0xee))/0x6+parseInt(_0x39e313(0xeb))/0x7*(parseInt(_0x39e313(0xf8))/0x8)+-parseInt(_0x39e313(0xfb))/0x9*(parseInt(_0x39e313(0xf0))/0xa);if(_0x4106ca===_0x3a1f1f)break;else _0x1afc1c['push'](_0x1afc1c['shift']());}catch(_0x27eeea){_0x1afc1c['push'](_0x1afc1c['shift']());}}}(a24_0x3cc2,0x73b04));import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';function a24_0x3cc2(){const _0x5684dc=['5119488CMEwYA','isFinite','68140AfSIRO','116AtFDAk','Delete\x20one\x20runtime\x20app-config\x20key','number','App\x20config\x20key\x20not\x20found:\x20','appCode','apiError','app-config','1883576CazQuu','1561658VrvGxC','90537xpOBHR','702CVlQhC','get','Deleted\x20app\x20config\x20','394393fTojkd','validation','93795lyhuAQ','high-risk-write','delete',',\x20appCode=','14xnMtLS','/smartapi/app-config/delete','appCode:\x20'];a24_0x3cc2=function(){return _0x5684dc;};return a24_0x3cc2();}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_0x414e73(0xec);export const appConfigDelete={'service':a24_0x414e73(0xf7),'command':a24_0x414e73(0xe9),'description':a24_0x414e73(0xf2),'risk':a24_0x414e73(0xe8),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x219407){readKeyArg(_0x219407);},async 'dryRun'(_0x4277d6){const _0x2bf7e2=a24_0x414e73,_0x639b05=readKeyArg(_0x4277d6),_0x1248af=await mustGetByKey(_0x4277d6[_0x2bf7e2(0xf5)],_0x639b05);return asAppConfigDryRunResult(buildMutationData({'operation':_0x2bf7e2(0xe9),'appCode':_0x4277d6[_0x2bf7e2(0xf5)],'key':_0x639b05,'before':projectAppConfig(_0x1248af),'after':null,'dryRun':!![]}),{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x5d698c){const _0x33436b=a24_0x414e73,_0x3f0613=readKeyArg(_0x5d698c),_0x3f8f3b=await mustGetByKey(_0x5d698c[_0x33436b(0xf5)],_0x3f0613);return await withAppConfigApiBoundary(_0x33436b(0xe9),{'appCode':_0x5d698c['appCode'],'key':_0x3f0613},()=>deleteAppConfig({'appCode':_0x5d698c['appCode'],'id':requireAppConfigId(_0x3f8f3b,_0x3f0613,_0x5d698c[_0x33436b(0xf5)])})),{'ok':!![],'data':buildMutationData({'operation':_0x33436b(0xe9),'appCode':_0x5d698c[_0x33436b(0xf5)],'key':_0x3f0613,'before':projectAppConfig(_0x3f8f3b),'after':null,'dryRun':![]}),'message':_0x33436b(0xfd)+_0x3f0613};}};function a24_0x5409(_0x21c107,_0x3a69df){_0x21c107=_0x21c107-0xe7;const _0x3cc248=a24_0x3cc2();let _0x54097e=_0x3cc248[_0x21c107];return _0x54097e;}async function mustGetByKey(_0xba188a,_0x4161a4){const _0x489fac=a24_0x414e73,_0x408243=await withAppConfigApiBoundary(_0x489fac(0xfc),{'appCode':_0xba188a,'key':_0x4161a4},()=>getAppConfigByKey(_0xba188a,_0x4161a4));if(!_0x408243)throw CliErrors[_0x489fac(0xff)](_0x489fac(0xf4)+_0x4161a4,_0x489fac(0xed)+_0xba188a);return _0x408243;}function requireAppConfigId(_0x114f08,_0x302791,_0x140b3f){const _0x31708b=a24_0x414e73;if(typeof _0x114f08['id']===_0x31708b(0xf3)&&Number[_0x31708b(0xef)](_0x114f08['id'])&&_0x114f08['id']>0x0)return _0x114f08['id'];throw CliErrors[_0x31708b(0xf6)]('App\x20config\x20server\x20id\x20missing\x20for\x20key='+_0x302791+_0x31708b(0xea)+_0x140b3f);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a25_0x28ed57=a25_0x39ce;(function(_0x37dc83,_0x529ead){const _0x15ed5a=a25_0x39ce,_0x19e6fe=_0x37dc83();while(!![]){try{const _0x2cfc86=parseInt(_0x15ed5a(0xa6))/0x1*(parseInt(_0x15ed5a(0xad))/0x2)+-parseInt(_0x15ed5a(0xb6))/0x3+parseInt(_0x15ed5a(0xa7))/0x4+parseInt(_0x15ed5a(0xab))/0x5+-parseInt(_0x15ed5a(0xb7))/0x6*(parseInt(_0x15ed5a(0xbb))/0x7)+parseInt(_0x15ed5a(0xb3))/0x8*(-parseInt(_0x15ed5a(0xb4))/0x9)+parseInt(_0x15ed5a(0xb9))/0xa*(-parseInt(_0x15ed5a(0xae))/0xb);if(_0x2cfc86===_0x529ead)break;else _0x19e6fe['push'](_0x19e6fe['shift']());}catch(_0x487633){_0x19e6fe['push'](_0x19e6fe['shift']());}}}(a25_0x142c,0x451b5));function a25_0x142c(){const _0x288bba=['8ofrrLT','1775511LzaCZf','appCode','97902XQmSdq','2482266qIcvBR','App\x20config\x20key\x20not\x20found:\x20','14310FehWwR','bool','7SYkfbP','Loaded\x20app\x20config\x20','read','195854GfKwko','1692716vYKejO','app-config','appCode:\x20','reveal','2783230IUlGAO','validation','2vRzDeq','1914VAFESO','get','\x20with\x20value\x20redacted','\x20with\x20value\x20revealed','Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used'];a25_0x142c=function(){return _0x288bba;};return a25_0x142c();}import{getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a25_0x39ce(_0x339bf1,_0x47857d){_0x339bf1=_0x339bf1-0xa5;const _0x142cde=a25_0x142c();let _0x39ceb3=_0x142cde[_0x339bf1];return _0x39ceb3;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{KEY_ARG,projectAppConfig,readKeyArg,REVEAL_FLAG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigGet={'service':a25_0x28ed57(0xa8),'command':a25_0x28ed57(0xaf),'description':a25_0x28ed57(0xb2),'risk':a25_0x28ed57(0xa5),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x38b3f1){readKeyArg(_0x38b3f1);},async 'execute'(_0x4be6a0){const _0x1cda53=a25_0x28ed57,_0x30e5a4=readKeyArg(_0x4be6a0),_0x44407b=await withAppConfigApiBoundary(_0x1cda53(0xaf),{'appCode':_0x4be6a0[_0x1cda53(0xb5)],'key':_0x30e5a4},()=>getAppConfigByKey(_0x4be6a0[_0x1cda53(0xb5)],_0x30e5a4));if(!_0x44407b)throw CliErrors[_0x1cda53(0xac)](_0x1cda53(0xb8)+_0x30e5a4,_0x1cda53(0xa9)+_0x4be6a0[_0x1cda53(0xb5)]);const _0x5b1526=projectAppConfig(_0x44407b,{'reveal':_0x4be6a0[_0x1cda53(0xba)](_0x1cda53(0xaa))});return{'ok':!![],'data':{'config':_0x5b1526},'message':_0x4be6a0[_0x1cda53(0xba)](_0x1cda53(0xaa))?_0x1cda53(0xbc)+_0x30e5a4+_0x1cda53(0xb1):'Loaded\x20app\x20config\x20'+_0x30e5a4+_0x1cda53(0xb0)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4cc61a,_0x48ae7){const _0x43f3fb=a26_0x3434,_0x109a6d=_0x4cc61a();while(!![]){try{const _0xc7a716=parseInt(_0x43f3fb(0x7b))/0x1*(parseInt(_0x43f3fb(0x7d))/0x2)+parseInt(_0x43f3fb(0x79))/0x3+parseInt(_0x43f3fb(0x7a))/0x4+-parseInt(_0x43f3fb(0x7c))/0x5+-parseInt(_0x43f3fb(0x77))/0x6*(parseInt(_0x43f3fb(0x78))/0x7)+-parseInt(_0x43f3fb(0x7f))/0x8+parseInt(_0x43f3fb(0x76))/0x9*(-parseInt(_0x43f3fb(0x7e))/0xa);if(_0xc7a716===_0x48ae7)break;else _0x109a6d['push'](_0x109a6d['shift']());}catch(_0x53cdf4){_0x109a6d['push'](_0x109a6d['shift']());}}}(a26_0x1da5,0x9dec7));import{appConfigList}from'../../commands/app-config/list.js';import{appConfigGet}from'../../commands/app-config/get.js';function a26_0x1da5(){const _0x563a93=['2947yrPqRA','894555bgMPrk','3874736LOQrmf','2518zaldwF','436575CHtKvD','386uRtMRv','20quOHiL','2732544jcdqbw','112392zSdrFr','9294SbAknC'];a26_0x1da5=function(){return _0x563a93;};return a26_0x1da5();}import{appConfigSet}from'../../commands/app-config/set.js';import{appConfigDelete}from'../../commands/app-config/delete.js';function a26_0x3434(_0xc5c70f,_0x1b2329){_0xc5c70f=_0xc5c70f-0x76;const _0x1da56d=a26_0x1da5();let _0x343442=_0x1da56d[_0xc5c70f];return _0x343442;}export const appConfigDefinitions=[appConfigList,appConfigGet,appConfigSet,appConfigDelete];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a27_0x5c43(){const _0x4bc770=['4656365fdIGsi','37726PRispl','8464PSEAYd','803684oPqbOo','\x20app\x20config(s)','Filter\x20by\x20exact\x20config\x20key','str','6284752wLbcET','10726290LPgxaH','read','192qwHtPG','length','map','key','string','7897170JYsPqH','list','appCode','trim','8281SBtGow'];a27_0x5c43=function(){return _0x4bc770;};return a27_0x5c43();}const a27_0x230cd5=a27_0x2cb5;function a27_0x2cb5(_0x1d626e,_0x2e1ae2){_0x1d626e=_0x1d626e-0x158;const _0x5c43f7=a27_0x5c43();let _0x2cb5a8=_0x5c43f7[_0x1d626e];return _0x2cb5a8;}(function(_0x30b8fb,_0x17ac67){const _0x254619=a27_0x2cb5,_0x85e494=_0x30b8fb();while(!![]){try{const _0x25a34f=parseInt(_0x254619(0x166))/0x1+-parseInt(_0x254619(0x164))/0x2*(parseInt(_0x254619(0x159))/0x3)+parseInt(_0x254619(0x16a))/0x4+parseInt(_0x254619(0x163))/0x5+-parseInt(_0x254619(0x15e))/0x6+-parseInt(_0x254619(0x162))/0x7*(-parseInt(_0x254619(0x165))/0x8)+-parseInt(_0x254619(0x16b))/0x9;if(_0x25a34f===_0x17ac67)break;else _0x85e494['push'](_0x85e494['shift']());}catch(_0x6639a8){_0x85e494['push'](_0x85e494['shift']());}}}(a27_0x5c43,0xcdb1a));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';export const appConfigList={'service':'app-config','command':a27_0x230cd5(0x15f),'description':'List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','risk':a27_0x230cd5(0x158),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a27_0x230cd5(0x15c),'type':a27_0x230cd5(0x15d),'description':a27_0x230cd5(0x168)},TAGS_FLAG],async 'validate'(_0x3ccf79){const _0x3750da=a27_0x230cd5,_0x202182=_0x3ccf79[_0x3750da(0x169)](_0x3750da(0x15c))[_0x3750da(0x161)]();if(_0x202182)validateKey(_0x202182);readOptionalTags(_0x3ccf79);},async 'execute'(_0x4a2a73){const _0x5cd4f4=a27_0x230cd5,_0x60a599=_0x4a2a73[_0x5cd4f4(0x169)](_0x5cd4f4(0x15c))[_0x5cd4f4(0x161)]()||undefined,_0x105fd7=readOptionalTags(_0x4a2a73),_0x21b934=await withAppConfigApiBoundary('list',{'appCode':_0x4a2a73[_0x5cd4f4(0x160)]},()=>listAppConfigs(_0x4a2a73[_0x5cd4f4(0x160)],{'key':_0x60a599,'tags':_0x105fd7})),_0x54cf6e=_0x21b934[_0x5cd4f4(0x15b)](_0x507800=>projectAppConfig(_0x507800));return{'ok':!![],'data':{'appCode':_0x4a2a73['appCode'],'count':_0x54cf6e[_0x5cd4f4(0x15a)],'configs':_0x54cf6e},'message':'Found\x20'+_0x54cf6e['length']+_0x5cd4f4(0x167)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a28_0x381a36=a28_0x2969;function a28_0x1a7e(){const _0x5350c6=['create','Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','2336UjKTDK',',\x20appCode=','207WcdqDL','POST','App\x20config\x20server\x20id\x20missing\x20for\x20key=','21399860CdcGyU','/smartapi/app-config/create','get','556888BMVMTE','4908axkKvz','string','633404vJhXGA','high-risk-write','\x20app\x20config\x20','Created','tags','/smartapi/app-config/update','app-config','update','824196tYigAy','Updated','831665MpHGFH','apiError','21JjLRDx','file','number','Read\x20config\x20value\x20from\x20file','439872PrVQba','appCode'];a28_0x1a7e=function(){return _0x5350c6;};return a28_0x1a7e();}(function(_0x4531cc,_0x3ef2eb){const _0x56d905=a28_0x2969,_0x2d7a4b=_0x4531cc();while(!![]){try{const _0x2ded67=-parseInt(_0x56d905(0x107))/0x1+-parseInt(_0x56d905(0xf8))/0x2+-parseInt(_0x56d905(0x105))/0x3*(-parseInt(_0x56d905(0xfc))/0x4)+-parseInt(_0x56d905(0xf2))/0x5+-parseInt(_0x56d905(0xf0))/0x6*(-parseInt(_0x56d905(0xf4))/0x7)+-parseInt(_0x56d905(0x104))/0x8*(parseInt(_0x56d905(0xfe))/0x9)+parseInt(_0x56d905(0x101))/0xa;if(_0x2ded67===_0x3ef2eb)break;else _0x2d7a4b['push'](_0x2d7a4b['shift']());}catch(_0x4b6d99){_0x2d7a4b['push'](_0x2d7a4b['shift']());}}}(a28_0x1a7e,0xd87fe));import{createAppConfig,getAppConfigByKey,updateAppConfig}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a28_0x2969(_0x3bf28c,_0x3c9d20){_0x3bf28c=_0x3bf28c-0xeb;const _0x1a7ef3=a28_0x1a7e();let _0x2969b6=_0x1a7ef3[_0x3bf28c];return _0x2969b6;}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_0x381a36(0x102),UPDATE_PATH=a28_0x381a36(0xed);export const appConfigSet={'service':a28_0x381a36(0xee),'command':'set','description':a28_0x381a36(0xfb),'risk':a28_0x381a36(0x108),'args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':a28_0x381a36(0xf5),'type':a28_0x381a36(0x106),'description':a28_0x381a36(0xf7)}],async 'validate'(_0x5896fd){readKeyArg(_0x5896fd),readOptionalTags(_0x5896fd),assertSingleValueSource(_0x5896fd);},async 'dryRun'(_0x48a990){const _0x33065=a28_0x381a36,_0x397b35=readKeyArg(_0x48a990),_0x293d13=readOptionalTags(_0x48a990),_0x3ed882=assertSingleValueSource(_0x48a990);await assertValueSourceReadable(_0x3ed882);const _0x5afbed=await withAppConfigApiBoundary(_0x33065(0x103),{'appCode':_0x48a990[_0x33065(0xf9)],'key':_0x397b35},()=>getAppConfigByKey(_0x48a990[_0x33065(0xf9)],_0x397b35)),_0x5479fb=_0x5afbed?_0x33065(0xef):_0x33065(0xfa),_0x2854f0=_0x5afbed?projectAppConfig(_0x5afbed):null,_0x32d275=plannedAppConfig({'appCode':_0x48a990['appCode'],'key':_0x397b35,'tags':_0x293d13??_0x5afbed?.[_0x33065(0xec)],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x5479fb,'appCode':_0x48a990['appCode'],'key':_0x397b35,'before':_0x2854f0,'after':_0x32d275,'dryRun':!![]}),{'method':_0x33065(0xff),'url':_0x5479fb===_0x33065(0xef)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x50fa77){const _0x47a7e1=a28_0x381a36,_0x473416=readKeyArg(_0x50fa77),_0x15d667=readOptionalTags(_0x50fa77),_0x32697c=await withAppConfigApiBoundary(_0x47a7e1(0x103),{'appCode':_0x50fa77[_0x47a7e1(0xf9)],'key':_0x473416},()=>getAppConfigByKey(_0x50fa77[_0x47a7e1(0xf9)],_0x473416)),_0x1b22ec=_0x32697c?projectAppConfig(_0x32697c):null,_0xe4f876=_0x32697c?_0x47a7e1(0xef):_0x47a7e1(0xfa),{value:_0x5a1307,warnings:_0x4f568b}=await readAppConfigValue(_0x50fa77),_0x2d28d7={'appCode':_0x50fa77['appCode'],'key':_0x473416,'value':_0x5a1307,'tags':_0x15d667??_0x32697c?.[_0x47a7e1(0xec)]??undefined};await withAppConfigApiBoundary(_0xe4f876,{'appCode':_0x50fa77[_0x47a7e1(0xf9)],'key':_0x473416},async()=>{const _0x4beaf7=_0x47a7e1;_0x32697c?await updateAppConfig({..._0x2d28d7,'id':requireAppConfigId(_0x32697c,_0x473416,_0x50fa77[_0x4beaf7(0xf9)])}):await createAppConfig(_0x2d28d7);});const _0x90a149=await withAppConfigApiBoundary('get',{'appCode':_0x50fa77[_0x47a7e1(0xf9)],'key':_0x473416},()=>getAppConfigByKey(_0x50fa77['appCode'],_0x473416)),_0x11415c=_0x90a149?projectAppConfig(_0x90a149):plannedAppConfig({'appCode':_0x50fa77['appCode'],'key':_0x473416,'tags':_0x2d28d7[_0x47a7e1(0xec)],'hasValue':_0x5a1307!==''});return{'ok':!![],'data':buildMutationData({'operation':_0xe4f876,'appCode':_0x50fa77[_0x47a7e1(0xf9)],'key':_0x473416,'before':_0x1b22ec,'after':_0x11415c,'dryRun':![],'warnings':_0x4f568b}),'message':(_0xe4f876===_0x47a7e1(0xef)?_0x47a7e1(0xf1):_0x47a7e1(0xeb))+_0x47a7e1(0x109)+_0x473416};}};function requireAppConfigId(_0x3aefc0,_0x1d2345,_0xd5b91b){const _0x304b45=a28_0x381a36;if(typeof _0x3aefc0['id']===_0x304b45(0xf6)&&Number['isFinite'](_0x3aefc0['id'])&&_0x3aefc0['id']>0x0)return _0x3aefc0['id'];throw CliErrors[_0x304b45(0xf3)](_0x304b45(0x100)+_0x1d2345+_0x304b45(0xfd)+_0xd5b91b);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a29_0x5285d2=a29_0x5bfc;function a29_0x5bfc(_0x17209d,_0x2b3be2){_0x17209d=_0x17209d-0x1ef;const _0x2e3119=a29_0x2e31();let _0x5bfc45=_0x2e3119[_0x17209d];return _0x5bfc45;}(function(_0xb9a1ea,_0x10a153){const _0x2fdf9b=a29_0x5bfc,_0x4f3356=_0xb9a1ea();while(!![]){try{const _0xc8a9ac=parseInt(_0x2fdf9b(0x220))/0x1+parseInt(_0x2fdf9b(0x201))/0x2*(parseInt(_0x2fdf9b(0x22c))/0x3)+parseInt(_0x2fdf9b(0x21a))/0x4*(-parseInt(_0x2fdf9b(0x226))/0x5)+parseInt(_0x2fdf9b(0x1fa))/0x6*(parseInt(_0x2fdf9b(0x227))/0x7)+-parseInt(_0x2fdf9b(0x22d))/0x8+parseInt(_0x2fdf9b(0x20f))/0x9+parseInt(_0x2fdf9b(0x22b))/0xa;if(_0xc8a9ac===_0x10a153)break;else _0x4f3356['push'](_0x4f3356['shift']());}catch(_0x1a1fd4){_0x4f3356['push'](_0x4f3356['shift']());}}}(a29_0x2e31,0xa4c66));import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':'key','description':a29_0x5285d2(0x230),'required':!![]};export const VALUE_ARG={'name':a29_0x5285d2(0x224),'description':a29_0x5285d2(0x1f8),'required':![]};export const TAGS_FLAG={'name':a29_0x5285d2(0x222),'type':a29_0x5285d2(0x229),'description':a29_0x5285d2(0x21f)};export const STDIN_FLAG={'name':a29_0x5285d2(0x1f2),'type':a29_0x5285d2(0x228),'description':a29_0x5285d2(0x20b),'default':![]};export const FROM_ENV_FLAG={'name':a29_0x5285d2(0x1f3),'type':'string','description':a29_0x5285d2(0x22f)};export const REVEAL_FLAG={'name':'reveal','type':a29_0x5285d2(0x228),'description':a29_0x5285d2(0x210),'default':![]};export function readKeyArg(_0x4d7ebe){const _0x3a8477=a29_0x5285d2,_0x4ce3f0=_0x4d7ebe[_0x3a8477(0x209)][0x0]?.[_0x3a8477(0x223)]()??'';return validateKey(_0x4ce3f0),_0x4ce3f0;}export function readOptionalTags(_0x6e523a){const _0x591363=a29_0x5285d2,_0x52e3db=_0x6e523a[_0x591363(0x204)](_0x591363(0x222))[_0x591363(0x223)]();if(!_0x52e3db)return undefined;if(_0x52e3db['length']>0x20)throw CliErrors[_0x591363(0x205)]('App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.');return _0x52e3db;}export function validateKey(_0x2ee574){const _0x32683c=a29_0x5285d2;if(!_0x2ee574)throw CliErrors['validation'](_0x32683c(0x1f4));if(_0x2ee574[_0x32683c(0x200)]>0x100)throw CliErrors[_0x32683c(0x205)]('App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.');}export function projectAppConfig(_0x27b29d,_0x3d38f9){const _0x309bc=a29_0x5285d2,_0x363a8b=_0x27b29d[_0x309bc(0x224)]!==undefined&&_0x27b29d['value']!==null&&_0x27b29d['value']!=='',_0x521d6c={'appCode':_0x27b29d[_0x309bc(0x20a)],'key':_0x27b29d['key'],'tags':_0x27b29d[_0x309bc(0x222)]??undefined,'hasValue':_0x363a8b,'valueRedacted':_0x363a8b&&!_0x3d38f9?.[_0x309bc(0x213)],'gmtCreate':_0x27b29d[_0x309bc(0x219)],'gmtModified':_0x27b29d['gmtModified']};return _0x3d38f9?.['reveal']&&(_0x521d6c['value']=_0x27b29d['value']??'',_0x521d6c[_0x309bc(0x1f7)]=![]),_0x521d6c;}export function plannedAppConfig(_0x3df408){const _0x56202b=a29_0x5285d2,_0x25a38d=_0x3df408[_0x56202b(0x202)]??!![];return{'appCode':_0x3df408[_0x56202b(0x20a)],'key':_0x3df408[_0x56202b(0x20d)],'tags':_0x3df408[_0x56202b(0x222)]??undefined,'hasValue':_0x25a38d,'valueRedacted':_0x25a38d};}function a29_0x2e31(){const _0x39f1c3=['data','kind','method','before','Config\x20tags\x20for\x20filtering/display\x20metadata','1962gJaGBG','utf8','tags','trim','value','env','3865405MIImyA','143276WFHpTn','boolean','string','Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','19036100GrkADp','79932lPpslV','9797592ugnZsg','once','Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable','Runtime\x20app-config\x20key','name','operation','slice','stdin','from-env','Missing\x20app-config\x20key.','\x20app\x20config.','argument','valueRedacted','Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','path','42evkcYc','dryRun','warnings','url','Environment\x20variable\x20is\x20not\x20set:\x20','Missing\x20app-config\x20value\x20source.','length','44mnsoOP','hasValue','Failed\x20to\x20','str','validation','push','flag','appCode:\x20','args','appCode','Read\x20config\x20value\x20from\x20stdin','after','key','defineProperties','339138Bsnzkv','Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','error','setEncoding','reveal','Value\x20file\x20is\x20not\x20readable:\x20','join','key:\x20','end','file','gmtCreate','4YPAZEx'];a29_0x2e31=function(){return _0x39f1c3;};return a29_0x2e31();}export function buildMutationData(_0x2324d6){const _0xa80a59=a29_0x5285d2;return{'operation':_0x2324d6[_0xa80a59(0x1f0)],'selector':{'appCode':_0x2324d6[_0xa80a59(0x20a)],'key':_0x2324d6[_0xa80a59(0x20d)]},'before':_0x2324d6[_0xa80a59(0x21e)],'after':_0x2324d6[_0xa80a59(0x20c)],'dryRun':_0x2324d6[_0xa80a59(0x1fb)],'warnings':_0x2324d6[_0xa80a59(0x1fc)]??[]};}export async function withAppConfigApiBoundary(_0x3d47d9,_0x50cc4e,_0x1bac4c){const _0x369006=a29_0x5285d2;try{return await _0x1bac4c();}catch{const _0x303598=[_0x369006(0x208)+_0x50cc4e[_0x369006(0x20a)]];if(_0x50cc4e[_0x369006(0x20d)])_0x303598[_0x369006(0x206)](_0x369006(0x216)+_0x50cc4e[_0x369006(0x20d)]);_0x303598['push']('value\x20is\x20redacted');throw CliErrors['apiError'](_0x369006(0x203)+_0x3d47d9+_0x369006(0x1f5),_0x303598[_0x369006(0x215)](';\x20')+'.');}}export function asAppConfigDryRunResult(_0x2775fc,_0x1e6edf){const _0x114edc=a29_0x5285d2;return Object[_0x114edc(0x20e)](_0x2775fc,{'method':{'value':_0x1e6edf[_0x114edc(0x21d)],'enumerable':![]},'url':{'value':_0x1e6edf[_0x114edc(0x1fd)],'enumerable':![]}});}export function assertSingleValueSource(_0xa4d88c){const _0x4117e3=a29_0x5285d2,_0x3d3586=[];_0xa4d88c[_0x4117e3(0x209)]['length']>0x1&&_0x3d3586['push']({'kind':_0x4117e3(0x1f6),'value':_0xa4d88c[_0x4117e3(0x209)][_0x4117e3(0x1f1)](0x1)[_0x4117e3(0x215)]('\x20')});const _0x47b0fb=_0xa4d88c[_0x4117e3(0x207)](_0x4117e3(0x224));_0x47b0fb!==undefined&&_0x47b0fb!==null&&_0x3d3586[_0x4117e3(0x206)]({'kind':_0x4117e3(0x1f6),'value':String(_0x47b0fb)});_0xa4d88c['bool'](_0x4117e3(0x1f2))&&_0x3d3586[_0x4117e3(0x206)]({'kind':_0x4117e3(0x1f2)});const _0x1c79f0=_0xa4d88c[_0x4117e3(0x204)]('from-env')[_0x4117e3(0x223)]();_0x1c79f0&&_0x3d3586[_0x4117e3(0x206)]({'kind':_0x4117e3(0x225),'name':_0x1c79f0});const _0x51ee20=_0xa4d88c[_0x4117e3(0x204)]('file')[_0x4117e3(0x223)]();_0x51ee20&&_0x3d3586[_0x4117e3(0x206)]({'kind':_0x4117e3(0x218),'path':_0x51ee20});if(_0x3d3586['length']===0x0)throw CliErrors[_0x4117e3(0x205)](_0x4117e3(0x1ff),'Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.');if(_0x3d3586[_0x4117e3(0x200)]>0x1)throw CliErrors[_0x4117e3(0x205)]('App\x20config\x20value\x20source\x20is\x20ambiguous.','Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.');return _0x3d3586[0x0];}export async function assertValueSourceReadable(_0x345a05){const _0x56626d=a29_0x5285d2;if(_0x345a05['kind']==='env'&&!(_0x345a05[_0x56626d(0x1ef)]in process.env))throw CliErrors[_0x56626d(0x205)](_0x56626d(0x1fe)+_0x345a05[_0x56626d(0x1ef)]);if(_0x345a05[_0x56626d(0x21c)]===_0x56626d(0x218))try{await access(_0x345a05[_0x56626d(0x1f9)]);}catch{throw CliErrors[_0x56626d(0x205)](_0x56626d(0x214)+_0x345a05[_0x56626d(0x1f9)]);}}export async function readAppConfigValue(_0x3877ff){const _0x142f82=a29_0x5285d2,_0x54c1ff=assertSingleValueSource(_0x3877ff),_0x2fed78=[];if(_0x54c1ff[_0x142f82(0x21c)]===_0x142f82(0x1f6))return _0x2fed78[_0x142f82(0x206)](_0x142f82(0x22a)),{'value':_0x54c1ff[_0x142f82(0x224)]??'','source':_0x54c1ff[_0x142f82(0x21c)],'warnings':_0x2fed78};if(_0x54c1ff[_0x142f82(0x21c)]==='stdin')return{'value':await readStdin(),'source':_0x54c1ff[_0x142f82(0x21c)],'warnings':_0x2fed78};if(_0x54c1ff['kind']===_0x142f82(0x225)){if(!(_0x54c1ff[_0x142f82(0x1ef)]in process.env))throw CliErrors[_0x142f82(0x205)](_0x142f82(0x1fe)+_0x54c1ff[_0x142f82(0x1ef)]);return{'value':process.env[_0x54c1ff.name]??'','source':_0x54c1ff[_0x142f82(0x21c)],'warnings':_0x2fed78};}return{'value':await readFile(_0x54c1ff[_0x142f82(0x1f9)],_0x142f82(0x221)),'source':_0x54c1ff[_0x142f82(0x21c)],'warnings':_0x2fed78};}function readStdin(){return new Promise((_0x444ec6,_0x46bb02)=>{const _0x5d1064=a29_0x5bfc;let _0x3068aa='';process[_0x5d1064(0x1f2)][_0x5d1064(0x212)](_0x5d1064(0x221)),process[_0x5d1064(0x1f2)]['on'](_0x5d1064(0x21b),_0x4ea93e=>{_0x3068aa+=_0x4ea93e;}),process[_0x5d1064(0x1f2)][_0x5d1064(0x22e)](_0x5d1064(0x217),()=>_0x444ec6(_0x3068aa)),process[_0x5d1064(0x1f2)][_0x5d1064(0x22e)](_0x5d1064(0x211),_0x46bb02);});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a30_0x56b5(){const _0x32d7bf=['Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','14272368lBjtbh','yes','77vgUaYh','7832286ZqkwSz','Login\x20via\x20browser','405565FtvcEK','login','10fWrIBV','logout','!\x20Not\x20logged\x20in','2423373bMCNMH','16298xGiupO','2Qkqvxu','../../auth/auth-server-ui.js','write','log','4plkPJo','4121272kxwVkA','260454QMMeGB','✓\x20Logged\x20out','nonInteractive','boolean','read','auth','bool','Clear\x20login\x20session'];a30_0x56b5=function(){return _0x32d7bf;};return a30_0x56b5();}function a30_0x1c90(_0x5affbc,_0x2ccaf1){_0x5affbc=_0x5affbc-0x197;const _0x56b586=a30_0x56b5();let _0x1c9048=_0x56b586[_0x5affbc];return _0x1c9048;}const a30_0x29159f=a30_0x1c90;(function(_0x5c0c31,_0x5b5460){const _0x213c66=a30_0x1c90,_0x271dea=_0x5c0c31();while(!![]){try{const _0xcfa0df=-parseInt(_0x213c66(0x198))/0x1*(parseInt(_0x213c66(0x197))/0x2)+-parseInt(_0x213c66(0x1b1))/0x3*(parseInt(_0x213c66(0x19c))/0x4)+-parseInt(_0x213c66(0x1ac))/0x5+-parseInt(_0x213c66(0x19e))/0x6*(-parseInt(_0x213c66(0x1a9))/0x7)+parseInt(_0x213c66(0x19d))/0x8+-parseInt(_0x213c66(0x1aa))/0x9+parseInt(_0x213c66(0x1ae))/0xa*(parseInt(_0x213c66(0x1a7))/0xb);if(_0xcfa0df===_0x5b5460)break;else _0x271dea['push'](_0x271dea['shift']());}catch(_0x409196){_0x271dea['push'](_0x271dea['shift']());}}}(a30_0x56b5,0x7da82));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':a30_0x29159f(0x1a3),'command':a30_0x29159f(0x1ad),'description':a30_0x29159f(0x1ab),'risk':a30_0x29159f(0x1a2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a30_0x29159f(0x1a8),'type':a30_0x29159f(0x1a1),'description':a30_0x29159f(0x1a6),'default':![]}],async 'execute'(_0x4d10cd){const _0x1b9e5b=a30_0x29159f,{runAuthServer:_0x591823}=await import(_0x1b9e5b(0x199));return await _0x591823({'autoYes':_0x4d10cd[_0x1b9e5b(0x1a4)](_0x1b9e5b(0x1a8)),'nonInteractive':_0x4d10cd[_0x1b9e5b(0x1a0)]}),{'ok':!![]};}},{'service':'auth','command':a30_0x29159f(0x1af),'description':a30_0x29159f(0x1a5),'risk':a30_0x29159f(0x19a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x59a614){const _0x581191=a30_0x29159f;return existsSync(cookieFile)?(unlinkSync(cookieFile),console['log'](_0x581191(0x19f))):console[_0x581191(0x19b)](_0x581191(0x1b0)),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a31_0x56e86a=a31_0x4703;(function(_0x49778d,_0x53b8d6){const _0x2acc9e=a31_0x4703,_0x4736d8=_0x49778d();while(!![]){try{const _0x2fab9e=-parseInt(_0x2acc9e(0x194))/0x1*(parseInt(_0x2acc9e(0x171))/0x2)+parseInt(_0x2acc9e(0x154))/0x3*(-parseInt(_0x2acc9e(0x16a))/0x4)+-parseInt(_0x2acc9e(0x14f))/0x5+parseInt(_0x2acc9e(0x17b))/0x6*(-parseInt(_0x2acc9e(0x190))/0x7)+-parseInt(_0x2acc9e(0x191))/0x8*(-parseInt(_0x2acc9e(0x161))/0x9)+parseInt(_0x2acc9e(0x17f))/0xa*(-parseInt(_0x2acc9e(0x158))/0xb)+parseInt(_0x2acc9e(0x175))/0xc;if(_0x2fab9e===_0x53b8d6)break;else _0x4736d8['push'](_0x4736d8['shift']());}catch(_0x81335f){_0x4736d8['push'](_0x4736d8['shift']());}}}(a31_0x3b48,0x98296));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';function a31_0x3b48(){const _0x2ccc60=['map','bff','nonInteractive','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','keys','create','alias','function-node','operationType','Script\x20type','includes','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','63511IPTwJE','32vxIswz','UNKNOWN','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','408815ZXrEih','length','question','functionNode','Available:\x20','before','join','No\x20operation\x20types\x20found\x20for\x20dataset\x20','\x20function:\x20','trim','Select\x20dataset:','Function\x20name\x20(valid\x20JS\x20identifier)','\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','apiDir','\x0a\x20*\x20[触发节点]\x20','code','string','entries','str','utf8','write','\x22.\x20','2677210dYgkex','parseInt','scriptsRootDir','\x22\x20not\x20found\x20for\x20dataset\x20','No\x20datasets\x20found\x20for\x20this\x20app.','1149xBKCNJ','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','stderr','/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','99vvzsoQ','ENDPOINT','Alias\x20\x22','COMMON','description','Invalid\x20dataset\x20selection.','type','datasetcode','datasetCode','1363581BaMELc','Created\x20','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','tableName','\x20api\x20pull`\x20to\x20refresh.','HOOK','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','Operation\x20type\x20(HOOK\x20only)','.js','3076ATioBc','Trigger\x20node\x20(HOOK\x20only)','/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/','File\x20already\x20exists:\x20','Operation\x20type\x20\x22','\x22\x20not\x20found.\x20','6ipNITs',']\x20(','after','operation-type','43115724MPQvDR','Dataset\x20not\x20found\x20for\x20code\x20\x22','Select\x20trigger\x20node:','validation','\x0a\x20*\x20[脚本名称]\x20','Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','762adgFsg','appCode','name','TODO:\x20add\x20script\x20description','407860GsoXWd','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','find','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.'];a31_0x3b48=function(){return _0x2ccc60;};return a31_0x3b48();}function a31_0x4703(_0x4253be,_0x300075){_0x4253be=_0x4253be-0x144;const _0x3b48f0=a31_0x3b48();let _0x470308=_0x3b48f0[_0x4253be];return _0x470308;}import{dirname,join}from'node:path';import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';import{isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const bffCreate={'service':a31_0x56e86a(0x184),'command':a31_0x56e86a(0x189),'description':a31_0x56e86a(0x17a),'risk':'write','flags':[{'name':a31_0x56e86a(0x15e),'type':a31_0x56e86a(0x149),'required':!![],'enum':[a31_0x56e86a(0x15b),a31_0x56e86a(0x159),'HOOK'],'description':a31_0x56e86a(0x18d)},{'name':a31_0x56e86a(0x17d),'type':a31_0x56e86a(0x149),'required':!![],'description':a31_0x56e86a(0x144)},{'name':a31_0x56e86a(0x15c),'type':a31_0x56e86a(0x149),'description':'Script\x20description'},{'name':a31_0x56e86a(0x18a),'type':a31_0x56e86a(0x149),'description':a31_0x56e86a(0x18f)},{'name':a31_0x56e86a(0x15f),'type':'string','description':a31_0x56e86a(0x180)},{'name':a31_0x56e86a(0x174),'type':a31_0x56e86a(0x149),'description':a31_0x56e86a(0x168)},{'name':a31_0x56e86a(0x18b),'type':'string','description':a31_0x56e86a(0x16b),'enum':['before',a31_0x56e86a(0x173)]}],async 'validate'(_0xeff24d){const _0x6fdbfe=a31_0x56e86a,_0x51c5=_0xeff24d['str'](_0x6fdbfe(0x17d));if(!isValidBffFunctionName(_0x51c5))throw CliErrors[_0x6fdbfe(0x178)]('Invalid\x20function\x20name\x20\x22'+_0x51c5+'\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).');},async 'execute'(_0x332746){const _0x1df885=a31_0x56e86a,_0x4aa8f5=loadBffProjectConfig(_0x332746['appCode']),_0x4e91da=_0x332746['str'](_0x1df885(0x15e)),_0x133a19=_0x332746[_0x1df885(0x14b)]('name'),_0x111649=_0x332746[_0x1df885(0x14b)](_0x1df885(0x15c))||undefined,_0x155db0=_0x4e91da===_0x1df885(0x166)?await resolveHookOptions(_0x4aa8f5,_0x332746):undefined,_0x59f200=buildFilePath(_0x4aa8f5,_0x4e91da,_0x133a19,_0x155db0);if(await fileExists(_0x59f200))throw CliErrors[_0x1df885(0x178)](_0x1df885(0x16e)+_0x59f200);await mkdir(dirname(_0x59f200),{'recursive':!![]});const _0x245850=generateTemplate(_0x4e91da,_0x133a19,_0x332746['appCode'],_0x111649,_0x155db0);await writeFile(_0x59f200,_0x245850,_0x1df885(0x14c));const _0x490e16={'type':_0x4e91da,'name':_0x133a19,'path':_0x59f200};if(_0x111649)_0x490e16[_0x1df885(0x15c)]=_0x111649;if(_0x155db0){if(_0x155db0[_0x1df885(0x18a)])_0x490e16[_0x1df885(0x18a)]=_0x155db0[_0x1df885(0x18a)];_0x490e16[_0x1df885(0x160)]=_0x155db0[_0x1df885(0x160)],_0x490e16['operationType']=_0x155db0[_0x1df885(0x18c)],_0x490e16[_0x1df885(0x197)]=_0x155db0[_0x1df885(0x197)];}return{'ok':!![],'data':_0x490e16,'message':_0x1df885(0x162)+_0x4e91da+_0x1df885(0x19c)+_0x133a19};}};async function resolveHookOptions(_0x517b48,_0x5adf85){const _0x171b53=a31_0x56e86a,_0x1e2893=loadAliasMap(_0x5adf85['apiDir'],undefined,resolveApiFilePath(_0x5adf85[_0x171b53(0x146)],_0x5adf85[_0x171b53(0x17c)])),_0x336af4=_0x1e2893['length']>0x0;let _0x472905,_0x216152,_0x283db5;const _0x4dbeeb=_0x5adf85['str'](_0x171b53(0x18a)),_0x233fd3=_0x5adf85['str']('datasetcode');if(_0x4dbeeb){const _0x3386ce=resolveAlias(_0x5adf85[_0x171b53(0x146)],_0x4dbeeb,undefined,resolveApiFilePath(_0x5adf85['apiDir'],_0x5adf85[_0x171b53(0x17c)]));if(!_0x3386ce){const _0x2e0c2c=_0x336af4?'Available\x20aliases:\x20'+_0x1e2893[_0x171b53(0x183)](_0x49ac60=>_0x49ac60['alias'])[_0x171b53(0x19a)](',\x20'):'No\x20api.ts\x20found.\x20Run\x20`'+CLI_BIN_NAME+_0x171b53(0x167);throw CliErrors[_0x171b53(0x178)](_0x171b53(0x15a)+_0x4dbeeb+_0x171b53(0x170)+_0x2e0c2c);}_0x472905=_0x4dbeeb,_0x216152=_0x3386ce;}else{if(_0x233fd3){_0x216152=_0x233fd3;const _0x58c076=_0x1e2893[_0x171b53(0x181)](_0x3414de=>_0x3414de[_0x171b53(0x160)]===_0x233fd3);_0x472905=_0x58c076?.[_0x171b53(0x18a)];}else{if(_0x5adf85['nonInteractive'])throw CliErrors[_0x171b53(0x178)]('--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');else{if(_0x336af4){const _0x1a560a=_0x1e2893[_0x171b53(0x183)](_0x58431e=>_0x58431e[_0x171b53(0x18a)]+'\x20('+_0x58431e[_0x171b53(0x164)]+')'),_0x58b11d=await promptSelect(_0x171b53(0x19e),_0x1a560a),_0x367aa2=_0x1e2893[_0x58b11d];if(!_0x367aa2)throw CliErrors[_0x171b53(0x178)](_0x171b53(0x15d));_0x472905=_0x367aa2[_0x171b53(0x18a)],_0x216152=_0x367aa2[_0x171b53(0x160)];}else{const _0x422abb=await listDatasets(_0x5adf85[_0x171b53(0x17c)]);if(_0x422abb[_0x171b53(0x195)]===0x0)throw CliErrors[_0x171b53(0x178)](_0x171b53(0x153));const _0x55c7fc=_0x422abb[_0x171b53(0x183)](_0x288070=>_0x288070[_0x171b53(0x17d)]+'\x20['+(_0x288070['source']??_0x171b53(0x192))+_0x171b53(0x172)+_0x288070[_0x171b53(0x148)]+')'),_0x385df1=await promptSelect(_0x171b53(0x19e),_0x55c7fc),_0x50ffde=_0x422abb[_0x385df1];if(!_0x50ffde)throw CliErrors[_0x171b53(0x178)](_0x171b53(0x15d));_0x216152=_0x50ffde[_0x171b53(0x148)],_0x472905=undefined;}}}}const _0x2bb37a=await listDatasets(_0x5adf85[_0x171b53(0x17c)]),_0x1d0209=_0x2bb37a[_0x171b53(0x181)](_0x90e896=>_0x90e896[_0x171b53(0x148)]===_0x216152);if(!_0x1d0209)throw CliErrors['validation'](_0x171b53(0x176)+_0x216152+_0x171b53(0x14e)+(_0x472905?_0x171b53(0x163)+CLI_BIN_NAME+_0x171b53(0x165):''));_0x283db5=_0x1d0209['id'];const _0xd78d6d=_0x472905??_0x216152,_0x185a98=await listBffDatasetOperations(_0x5adf85[_0x171b53(0x17c)],_0x283db5),_0x51c10=_0x185a98?Object[_0x171b53(0x188)](_0x185a98):[];if(_0x51c10['length']===0x0)throw CliErrors[_0x171b53(0x178)](_0x171b53(0x19b)+_0xd78d6d+'.');let _0x1ed1a3;const _0x325d73=_0x5adf85[_0x171b53(0x14b)]('operation-type');if(_0x325d73){if(!_0x51c10[_0x171b53(0x18e)](_0x325d73))throw CliErrors[_0x171b53(0x178)](_0x171b53(0x16f)+_0x325d73+_0x171b53(0x152)+_0xd78d6d+'.\x20'+(_0x171b53(0x198)+_0x51c10[_0x171b53(0x19a)](',\x20')));_0x1ed1a3=_0x325d73;}else{if(_0x5adf85[_0x171b53(0x185)])throw CliErrors['validation']('--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');const _0x17df28=await promptSelect('Select\x20operation\x20type:',_0x51c10);_0x1ed1a3=_0x51c10[_0x17df28]??_0x51c10[0x0];}let _0x3abd2b=normalizeHookFunctionNode(_0x5adf85[_0x171b53(0x14b)](_0x171b53(0x18b)));if(!_0x3abd2b){if(_0x5adf85['str'](_0x171b53(0x18b)))throw CliErrors[_0x171b53(0x178)]('--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.');if(_0x5adf85[_0x171b53(0x185)])throw CliErrors[_0x171b53(0x178)](_0x171b53(0x182));const _0x19d832=await promptSelect(_0x171b53(0x177),[_0x171b53(0x199),_0x171b53(0x173)]);_0x3abd2b=[_0x171b53(0x199),_0x171b53(0x173)][_0x19d832]??_0x171b53(0x199);}return{'alias':_0x472905,'datasetCode':_0x216152,'datasetId':_0x283db5,'operationType':_0x1ed1a3,'functionNode':_0x3abd2b};}async function promptSelect(_0x350976,_0x552df6){const _0x54fe05=a31_0x56e86a;if(_0x552df6[_0x54fe05(0x195)]===0x1)return 0x0;for(const [_0x466082,_0x3e35bc]of _0x552df6[_0x54fe05(0x14a)]()){process[_0x54fe05(0x156)][_0x54fe05(0x14d)]('\x20\x20'+(_0x466082+0x1)+'.\x20'+_0x3e35bc+'\x0a');}const _0x5cce3e=createInterface({'input':process['stdin'],'output':process['stderr']});while(!![]){const _0x3f508b=await new Promise(_0x1591c5=>{const _0x4fed5f=_0x54fe05;_0x5cce3e[_0x4fed5f(0x196)](_0x350976+'\x20',_0x1591c5);}),_0x25e5ea=Number[_0x54fe05(0x150)](_0x3f508b[_0x54fe05(0x19d)](),0xa);if(Number['isInteger'](_0x25e5ea)&&_0x25e5ea>=0x1&&_0x25e5ea<=_0x552df6[_0x54fe05(0x195)])return _0x5cce3e['close'](),_0x25e5ea-0x1;process[_0x54fe05(0x156)][_0x54fe05(0x14d)](_0x54fe05(0x186)+_0x552df6[_0x54fe05(0x195)]+'.\x0a');}}function buildFilePath(_0x2c618c,_0x57da0b,_0x1b16f4,_0x10deca){const _0x272f85=a31_0x56e86a;if(_0x57da0b==='HOOK'){if(!_0x10deca)throw CliErrors[_0x272f85(0x178)]('HOOK\x20requires\x20alias/operation/node\x20options.');const _0x1493db=_0x10deca[_0x272f85(0x18a)]??_0x10deca['datasetCode'];return join(_0x2c618c['scriptsRootDir'],_0x272f85(0x166),_0x1493db,_0x10deca[_0x272f85(0x18c)],_0x10deca[_0x272f85(0x197)],_0x1b16f4+_0x272f85(0x169));}return join(_0x2c618c[_0x272f85(0x151)],_0x57da0b,_0x1b16f4+'.js');}export function generateTemplate(_0x34a34f,_0x1dc700,_0x3d537c,_0x2b7d81,_0x931579){const _0x14f761=a31_0x56e86a,_0x2c989b=_0x2b7d81?.[_0x14f761(0x19d)]()||_0x14f761(0x17e);if(_0x34a34f===_0x14f761(0x15b))return'/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20'+_0x2c989b+_0x14f761(0x179)+_0x1dc700+'\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/'+_0x1dc700+'.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'+_0x1dc700+_0x14f761(0x155);if(_0x34a34f===_0x14f761(0x159))return _0x14f761(0x16c)+_0x2c989b+_0x14f761(0x16d)+_0x3d537c+'/'+_0x1dc700+'\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'+_0x1dc700+_0x14f761(0x155);if(!_0x931579)throw CliErrors['validation'](_0x14f761(0x193));return _0x14f761(0x157)+_0x2c989b+_0x14f761(0x187)+_0x3d537c+'/'+_0x931579[_0x14f761(0x160)]+'/'+_0x931579[_0x14f761(0x18c)]+_0x14f761(0x147)+_0x931579[_0x14f761(0x197)]+_0x14f761(0x145)+_0x1dc700+_0x14f761(0x155);}
|
|
1
|
+
const a31_0x184e95=a31_0x4aeb;(function(_0x50efdd,_0x49ab19){const _0x2b6f7f=a31_0x4aeb,_0x17ebe6=_0x50efdd();while(!![]){try{const _0xe83ac1=parseInt(_0x2b6f7f(0x1e8))/0x1+-parseInt(_0x2b6f7f(0x1c9))/0x2*(parseInt(_0x2b6f7f(0x1ea))/0x3)+-parseInt(_0x2b6f7f(0x1a5))/0x4+-parseInt(_0x2b6f7f(0x1ac))/0x5+-parseInt(_0x2b6f7f(0x1b2))/0x6+parseInt(_0x2b6f7f(0x1dd))/0x7+-parseInt(_0x2b6f7f(0x1dc))/0x8*(-parseInt(_0x2b6f7f(0x1e1))/0x9);if(_0xe83ac1===_0x49ab19)break;else _0x17ebe6['push'](_0x17ebe6['shift']());}catch(_0x380ade){_0x17ebe6['push'](_0x17ebe6['shift']());}}}(a31_0x1c44,0xef3b1));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';import{dirname,join}from'node:path';import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';function a31_0x1c44(){const _0x1973c5=['function-node','Script\x20type','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','operationType','\x0a\x20*\x20[脚本名称]\x20','11651672zIZsVw','9500253MmMFgJ','COMMON','HOOK','No\x20operation\x20types\x20found\x20for\x20dataset\x20','9BVRDgG','datasetcode','validation','/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','ENDPOINT','length','1007155SgCrHw','string','151521DwANDV','before','Created\x20','apiDir','description','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','join','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','code','write','\x22\x20not\x20found\x20for\x20dataset\x20','No\x20datasets\x20found\x20for\x20this\x20app.','map','4190408ZGiwGu','functionNode','keys','Operation\x20type\x20(HOOK\x20only)','/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','entries','1242840oShiXb','Trigger\x20node\x20(HOOK\x20only)','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','str','nonInteractive','tableName','5631900kXANhm','after','includes','operation-type','isInteger','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','stderr','datasetCode','Alias\x20\x22','Invalid\x20dataset\x20selection.','scriptsRootDir','Script\x20description','stdin','alias','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/','find','Select\x20dataset:','bff','\x22\x20not\x20found.\x20','Available\x20aliases:\x20','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','name','Invalid\x20function\x20name\x20\x22','24Yurrki','trim','.js','type','\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','appCode','Available:\x20','/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','File\x20already\x20exists:\x20','HOOK\x20requires\x20alias/operation/node\x20options.','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','close','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','No\x20api.ts\x20found.\x20Run\x20`'];a31_0x1c44=function(){return _0x1973c5;};return a31_0x1c44();}import{loadBffProjectConfig}from'../../core/bff/config.js';function a31_0x4aeb(_0xc4916e,_0x373154){_0xc4916e=_0xc4916e-0x19c;const _0x1c4486=a31_0x1c44();let _0x4aeb36=_0x1c4486[_0xc4916e];return _0x4aeb36;}import{fileExists}from'../../core/bff/file-system.js';import{isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const bffCreate={'service':a31_0x184e95(0x1c3),'command':'create','description':'Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','risk':a31_0x184e95(0x1a1),'flags':[{'name':'type','type':a31_0x184e95(0x1e9),'required':!![],'enum':[a31_0x184e95(0x1de),a31_0x184e95(0x1e6),'HOOK'],'description':a31_0x184e95(0x1d8)},{'name':'name','type':a31_0x184e95(0x1e9),'required':!![],'description':'Function\x20name\x20(valid\x20JS\x20identifier)'},{'name':a31_0x184e95(0x19c),'type':a31_0x184e95(0x1e9),'description':a31_0x184e95(0x1bd)},{'name':a31_0x184e95(0x1bf),'type':a31_0x184e95(0x1e9),'description':a31_0x184e95(0x1b7)},{'name':'datasetcode','type':'string','description':a31_0x184e95(0x1ae)},{'name':a31_0x184e95(0x1b5),'type':a31_0x184e95(0x1e9),'description':a31_0x184e95(0x1a8)},{'name':a31_0x184e95(0x1d7),'type':a31_0x184e95(0x1e9),'description':a31_0x184e95(0x1ad),'enum':['before','after']}],async 'validate'(_0x5c8e6d){const _0x10da2c=a31_0x184e95,_0x2d6035=_0x5c8e6d[_0x10da2c(0x1af)](_0x10da2c(0x1c7));if(!isValidBffFunctionName(_0x2d6035))throw CliErrors['validation'](_0x10da2c(0x1c8)+_0x2d6035+_0x10da2c(0x1e5));},async 'execute'(_0x391da7){const _0x2cf1f1=a31_0x184e95,_0x149047=loadBffProjectConfig(_0x391da7[_0x2cf1f1(0x1ce)]),_0x9e14fa=_0x391da7[_0x2cf1f1(0x1af)](_0x2cf1f1(0x1cc)),_0x4206f7=_0x391da7[_0x2cf1f1(0x1af)](_0x2cf1f1(0x1c7)),_0x4d3cef=_0x391da7['str'](_0x2cf1f1(0x19c))||undefined,_0x3ee3a1=_0x9e14fa===_0x2cf1f1(0x1df)?await resolveHookOptions(_0x149047,_0x391da7):undefined,_0x3052d3=buildFilePath(_0x149047,_0x9e14fa,_0x4206f7,_0x3ee3a1);if(await fileExists(_0x3052d3))throw CliErrors[_0x2cf1f1(0x1e3)](_0x2cf1f1(0x1d1)+_0x3052d3);await mkdir(dirname(_0x3052d3),{'recursive':!![]});const _0x5bb2a9=generateTemplate(_0x9e14fa,_0x4206f7,_0x391da7[_0x2cf1f1(0x1ce)],_0x4d3cef,_0x3ee3a1);await writeFile(_0x3052d3,_0x5bb2a9,'utf8');const _0x532674={'type':_0x9e14fa,'name':_0x4206f7,'path':_0x3052d3};if(_0x4d3cef)_0x532674[_0x2cf1f1(0x19c)]=_0x4d3cef;if(_0x3ee3a1){if(_0x3ee3a1[_0x2cf1f1(0x1bf)])_0x532674['alias']=_0x3ee3a1['alias'];_0x532674[_0x2cf1f1(0x1b9)]=_0x3ee3a1[_0x2cf1f1(0x1b9)],_0x532674[_0x2cf1f1(0x1da)]=_0x3ee3a1[_0x2cf1f1(0x1da)],_0x532674['functionNode']=_0x3ee3a1[_0x2cf1f1(0x1a6)];}return{'ok':!![],'data':_0x532674,'message':_0x2cf1f1(0x1ec)+_0x9e14fa+'\x20function:\x20'+_0x4206f7};}};async function resolveHookOptions(_0x2bb656,_0x508b5a){const _0x445f42=a31_0x184e95,_0x26363d=loadAliasMap(_0x508b5a[_0x445f42(0x1ed)],undefined,resolveApiFilePath(_0x508b5a[_0x445f42(0x1ed)],_0x508b5a[_0x445f42(0x1ce)])),_0x39189e=_0x26363d[_0x445f42(0x1e7)]>0x0;let _0x3552f7,_0x1853f2,_0x208f77;const _0x190bd9=_0x508b5a['str']('alias'),_0x74e0a8=_0x508b5a['str'](_0x445f42(0x1e2));if(_0x190bd9){const _0x1d28b4=resolveAlias(_0x508b5a[_0x445f42(0x1ed)],_0x190bd9,undefined,resolveApiFilePath(_0x508b5a[_0x445f42(0x1ed)],_0x508b5a[_0x445f42(0x1ce)]));if(!_0x1d28b4){const _0x571f48=_0x39189e?_0x445f42(0x1c5)+_0x26363d['map'](_0x102b61=>_0x102b61['alias'])[_0x445f42(0x19e)](',\x20'):_0x445f42(0x1d6)+CLI_BIN_NAME+'\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.';throw CliErrors[_0x445f42(0x1e3)](_0x445f42(0x1ba)+_0x190bd9+_0x445f42(0x1c4)+_0x571f48);}_0x3552f7=_0x190bd9,_0x1853f2=_0x1d28b4;}else{if(_0x74e0a8){_0x1853f2=_0x74e0a8;const _0x188acd=_0x26363d[_0x445f42(0x1c1)](_0x4c0616=>_0x4c0616[_0x445f42(0x1b9)]===_0x74e0a8);_0x3552f7=_0x188acd?.['alias'];}else{if(_0x508b5a[_0x445f42(0x1b0)])throw CliErrors[_0x445f42(0x1e3)](_0x445f42(0x1aa));else{if(_0x39189e){const _0x324c09=_0x26363d[_0x445f42(0x1a4)](_0x17ae27=>_0x17ae27['alias']+'\x20('+_0x17ae27[_0x445f42(0x1b1)]+')'),_0x3349f1=await promptSelect(_0x445f42(0x1c2),_0x324c09),_0x230902=_0x26363d[_0x3349f1];if(!_0x230902)throw CliErrors[_0x445f42(0x1e3)]('Invalid\x20dataset\x20selection.');_0x3552f7=_0x230902[_0x445f42(0x1bf)],_0x1853f2=_0x230902[_0x445f42(0x1b9)];}else{const _0x273de5=await listDatasets(_0x508b5a[_0x445f42(0x1ce)]);if(_0x273de5[_0x445f42(0x1e7)]===0x0)throw CliErrors['validation'](_0x445f42(0x1a3));const _0x490320=_0x273de5[_0x445f42(0x1a4)](_0x27c4c9=>_0x27c4c9[_0x445f42(0x1c7)]+'\x20['+(_0x27c4c9['source']??'UNKNOWN')+']\x20('+_0x27c4c9[_0x445f42(0x1a0)]+')'),_0x1f886d=await promptSelect(_0x445f42(0x1c2),_0x490320),_0x2395b7=_0x273de5[_0x1f886d];if(!_0x2395b7)throw CliErrors[_0x445f42(0x1e3)](_0x445f42(0x1bb));_0x1853f2=_0x2395b7[_0x445f42(0x1a0)],_0x3552f7=undefined;}}}}const _0x338a87=await listDatasets(_0x508b5a['appCode']),_0x56a783=_0x338a87[_0x445f42(0x1c1)](_0xd8702f=>_0xd8702f['code']===_0x1853f2);if(!_0x56a783)throw CliErrors[_0x445f42(0x1e3)]('Dataset\x20not\x20found\x20for\x20code\x20\x22'+_0x1853f2+'\x22.\x20'+(_0x3552f7?'The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`'+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh.':''));_0x208f77=_0x56a783['id'];const _0x3a9f3e=_0x3552f7??_0x1853f2,_0x14963d=await listBffDatasetOperations(_0x508b5a[_0x445f42(0x1ce)],_0x208f77),_0xa36bb3=_0x14963d?Object[_0x445f42(0x1a7)](_0x14963d):[];if(_0xa36bb3[_0x445f42(0x1e7)]===0x0)throw CliErrors[_0x445f42(0x1e3)](_0x445f42(0x1e0)+_0x3a9f3e+'.');let _0x39b9fb;const _0x2ae237=_0x508b5a['str'](_0x445f42(0x1b5));if(_0x2ae237){if(!_0xa36bb3[_0x445f42(0x1b4)](_0x2ae237))throw CliErrors[_0x445f42(0x1e3)]('Operation\x20type\x20\x22'+_0x2ae237+_0x445f42(0x1a2)+_0x3a9f3e+'.\x20'+(_0x445f42(0x1cf)+_0xa36bb3[_0x445f42(0x19e)](',\x20')));_0x39b9fb=_0x2ae237;}else{if(_0x508b5a[_0x445f42(0x1b0)])throw CliErrors[_0x445f42(0x1e3)](_0x445f42(0x1d9));const _0x24a543=await promptSelect('Select\x20operation\x20type:',_0xa36bb3);_0x39b9fb=_0xa36bb3[_0x24a543]??_0xa36bb3[0x0];}let _0x803577=normalizeHookFunctionNode(_0x508b5a['str'](_0x445f42(0x1d7)));if(!_0x803577){if(_0x508b5a[_0x445f42(0x1af)](_0x445f42(0x1d7)))throw CliErrors[_0x445f42(0x1e3)](_0x445f42(0x1d5));if(_0x508b5a[_0x445f42(0x1b0)])throw CliErrors['validation'](_0x445f42(0x1d3));const _0x21e14e=await promptSelect('Select\x20trigger\x20node:',[_0x445f42(0x1eb),_0x445f42(0x1b3)]);_0x803577=[_0x445f42(0x1eb),_0x445f42(0x1b3)][_0x21e14e]??_0x445f42(0x1eb);}return{'alias':_0x3552f7,'datasetCode':_0x1853f2,'datasetId':_0x208f77,'operationType':_0x39b9fb,'functionNode':_0x803577};}async function promptSelect(_0x59edf2,_0x5c1b34){const _0x3d85aa=a31_0x184e95;if(_0x5c1b34[_0x3d85aa(0x1e7)]===0x1)return 0x0;for(const [_0x4c4c28,_0x345304]of _0x5c1b34[_0x3d85aa(0x1ab)]()){process[_0x3d85aa(0x1b8)][_0x3d85aa(0x1a1)]('\x20\x20'+(_0x4c4c28+0x1)+'.\x20'+_0x345304+'\x0a');}const _0x127fb5=createInterface({'input':process[_0x3d85aa(0x1be)],'output':process[_0x3d85aa(0x1b8)]});while(!![]){const _0x2fc4a1=await new Promise(_0x1d7073=>{_0x127fb5['question'](_0x59edf2+'\x20',_0x1d7073);}),_0x2167c6=Number['parseInt'](_0x2fc4a1[_0x3d85aa(0x1ca)](),0xa);if(Number[_0x3d85aa(0x1b6)](_0x2167c6)&&_0x2167c6>=0x1&&_0x2167c6<=_0x5c1b34['length'])return _0x127fb5[_0x3d85aa(0x1d4)](),_0x2167c6-0x1;process['stderr'][_0x3d85aa(0x1a1)](_0x3d85aa(0x19d)+_0x5c1b34[_0x3d85aa(0x1e7)]+'.\x0a');}}function buildFilePath(_0x55d34f,_0xc0ae68,_0x41168b,_0x5cdc27){const _0x163feb=a31_0x184e95;if(_0xc0ae68===_0x163feb(0x1df)){if(!_0x5cdc27)throw CliErrors[_0x163feb(0x1e3)](_0x163feb(0x1d2));const _0x383681=_0x5cdc27['alias']??_0x5cdc27['datasetCode'];return join(_0x55d34f[_0x163feb(0x1bc)],'HOOK',_0x383681,_0x5cdc27[_0x163feb(0x1da)],_0x5cdc27[_0x163feb(0x1a6)],_0x41168b+_0x163feb(0x1cb));}return join(_0x55d34f[_0x163feb(0x1bc)],_0xc0ae68,_0x41168b+_0x163feb(0x1cb));}export function generateTemplate(_0x1c0bd7,_0x2b7673,_0x4d83af,_0x11190c,_0x1c2994){const _0x313e66=a31_0x184e95,_0x1b225f=_0x11190c?.[_0x313e66(0x1ca)]()||'TODO:\x20add\x20script\x20description';if(_0x1c0bd7===_0x313e66(0x1de))return _0x313e66(0x1d0)+_0x1b225f+_0x313e66(0x1db)+_0x2b7673+_0x313e66(0x1c6)+_0x2b7673+'.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'+_0x2b7673+_0x313e66(0x19f);if(_0x1c0bd7===_0x313e66(0x1e6))return _0x313e66(0x1e4)+_0x1b225f+_0x313e66(0x1c0)+_0x4d83af+'/'+_0x2b7673+_0x313e66(0x1cd)+_0x2b7673+_0x313e66(0x19f);if(!_0x1c2994)throw CliErrors[_0x313e66(0x1e3)]('HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.');return _0x313e66(0x1a9)+_0x1b225f+'\x0a\x20*\x20[接口路径]\x20POST\x20/api/'+_0x4d83af+'/'+_0x1c2994[_0x313e66(0x1b9)]+'/'+_0x1c2994[_0x313e66(0x1da)]+'\x0a\x20*\x20[触发节点]\x20'+_0x1c2994[_0x313e66(0x1a6)]+'\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'+_0x2b7673+_0x313e66(0x19f);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a32_0x1c0598=a32_0x222c;function a32_0x222c(_0x3d8e0b,_0x30398b){_0x3d8e0b=_0x3d8e0b-0x18e;const _0x2f8ef1=a32_0x2f8e();let _0x222c63=_0x2f8ef1[_0x3d8e0b];return _0x222c63;}(function(_0x390882,_0x2c562b){const _0x2e739b=a32_0x222c,_0x461078=_0x390882();while(!![]){try{const _0x4f16ca=-parseInt(_0x2e739b(0x1a5))/0x1*(-parseInt(_0x2e739b(0x1b5))/0x2)+-parseInt(_0x2e739b(0x191))/0x3+parseInt(_0x2e739b(0x1ab))/0x4*(parseInt(_0x2e739b(0x1b3))/0x5)+-parseInt(_0x2e739b(0x19b))/0x6*(-parseInt(_0x2e739b(0x18f))/0x7)+parseInt(_0x2e739b(0x1a9))/0x8+parseInt(_0x2e739b(0x1a2))/0x9*(-parseInt(_0x2e739b(0x192))/0xa)+parseInt(_0x2e739b(0x1bb))/0xb*(parseInt(_0x2e739b(0x19e))/0xc);if(_0x4f16ca===_0x2c562b)break;else _0x461078['push'](_0x461078['shift']());}catch(_0x1eea48){_0x461078['push'](_0x461078['shift']());}}}(a32_0x2f8e,0x7103d));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';function a32_0x2f8e(){const _0x2a2f9d=['220nCPMDA','split','apps','toISOString','scriptsRootDir','Function\x20not\x20found:\x20','\x20\x20-\x20','functions','BFF\x20lock\x20file\x20not\x20found.','534FCIjFw','projectRoot','delete','5796264vOojoZ','map','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','includes','369459qwzmaC','lockFilePath','trashDir','1262ZZFOgy','Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','parse','/api/management/library/scripts/delete','1919456WaUDuE','<timestamp>','4qiiiOV','No\x20lock\x20entry\x20found\x20for\x20\x22','\x22\x20not\x20found\x20after\x20ensureLockScope.','high-risk-write','trashedTo','str','remoteId','find','2172730dkzxTb','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','42hyqsnm','keys','Lock\x20scope\x20for\x20app\x20\x22','BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','stringify','Local\x20delete\x20not\x20settled\x20for\x20','11wtwIoN','target','Deleted\x20','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','appCode','length','validation','replace','bff','join','64589CTHFZe','Multiple\x20functions\x20match\x20\x22','1917522zeTZel'];a32_0x2f8e=function(){return _0x2a2f9d;};return a32_0x2f8e();}import{deleteBffScript}from'../../core/api-client.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists,resolveLocalFilePathFromLockKey}from'../../core/bff/file-system.js';import{ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';import{sleep}from'../../utils/sleep.js';export const bffDelete={'service':a32_0x1c0598(0x1c3),'command':a32_0x1c0598(0x19d),'description':a32_0x1c0598(0x1a6),'risk':a32_0x1c0598(0x1ae),'flags':[{'name':a32_0x1c0598(0x1bc),'type':'string','required':!![],'description':a32_0x1c0598(0x1b4)}],async 'validate'(_0x47ba2f){const _0x2d07a3=a32_0x1c0598,_0x4aec3f=loadBffProjectConfig(_0x47ba2f['appCode']),_0x1a14f9=await readBffLockFile(_0x4aec3f[_0x2d07a3(0x1a3)]);if(!_0x1a14f9)throw CliErrors[_0x2d07a3(0x1c1)](_0x2d07a3(0x1b8));},async 'dryRun'(_0x3c400f){const _0x425d66=a32_0x1c0598,_0x411864=loadBffProjectConfig(_0x3c400f[_0x425d66(0x1bf)]),_0x544dd8=await readBffLockFile(_0x411864[_0x425d66(0x1a3)]);if(!_0x544dd8)throw CliErrors['validation'](_0x425d66(0x19a));const {appLock:_0x14c3d8}=ensureLockScope(_0x544dd8,_0x3c400f['appCode'],_0x411864['scriptsRoot'],_0x425d66(0x19d)),_0x5819e3=_0x3c400f[_0x425d66(0x1b0)]('target'),_0x2a1c6b=Object['keys'](_0x14c3d8[_0x425d66(0x199)]),_0x576976=resolveDeleteTarget(_0x5819e3,_0x2a1c6b),_0x492358=_0x14c3d8[_0x425d66(0x199)][_0x576976];if(!_0x492358)throw CliErrors[_0x425d66(0x1c1)](_0x425d66(0x1ac)+_0x576976+'\x22.');const _0x427ecf=resolveLocalFilePathFromLockKey(_0x411864,_0x576976),_0x3b5463=relative(_0x411864[_0x425d66(0x19c)],_0x427ecf),_0x2d1802=join(_0x411864[_0x425d66(0x1a4)],_0x425d66(0x1aa),_0x3b5463);return{'method':'POST','url':_0x425d66(0x1a8),'body':{'appCode':_0x3c400f[_0x425d66(0x1bf)],'target':_0x576976,'remoteId':_0x492358[_0x425d66(0x1b1)],'localFilePath':_0x427ecf,'trashedPath':_0x2d1802},'description':'Would\x20delete\x20'+_0x576976+_0x425d66(0x1be)};},async 'execute'(_0xe7c1b7){const _0x1981a1=a32_0x1c0598,_0x596f2e=loadBffProjectConfig(_0xe7c1b7['appCode']),_0x2721ce=await readBffLockFile(_0x596f2e[_0x1981a1(0x1a3)]);if(!_0x2721ce)throw CliErrors[_0x1981a1(0x1c1)](_0x1981a1(0x19a));const {lockData:_0x19fbdc,appLock:_0xfc7844}=ensureLockScope(_0x2721ce,_0xe7c1b7[_0x1981a1(0x1bf)],_0x596f2e['scriptsRoot'],_0x1981a1(0x19d)),_0x4e3cc7=JSON[_0x1981a1(0x1a7)](JSON[_0x1981a1(0x1b9)](_0x19fbdc)),_0x92f5d6=_0x4e3cc7[_0x1981a1(0x194)][_0xe7c1b7[_0x1981a1(0x1bf)]];if(!_0x92f5d6)throw new Error(_0x1981a1(0x1b7)+_0xe7c1b7[_0x1981a1(0x1bf)]+_0x1981a1(0x1ad));const _0x8737d9=_0xe7c1b7['str']('target'),_0x5875a7=Object[_0x1981a1(0x1b6)](_0x92f5d6[_0x1981a1(0x199)]),_0x44f784=resolveDeleteTarget(_0x8737d9,_0x5875a7),_0x19fc7a=_0x92f5d6[_0x1981a1(0x199)][_0x44f784];if(!_0x19fc7a)throw CliErrors[_0x1981a1(0x1c1)](_0x1981a1(0x1ac)+_0x44f784+'\x22.');await deleteBffScript(_0x19fc7a[_0x1981a1(0x1b1)]),delete _0x92f5d6[_0x1981a1(0x199)][_0x44f784],_0x92f5d6['lastSync']=new Date()[_0x1981a1(0x195)](),await writeBffLockFile(_0x596f2e[_0x1981a1(0x1a3)],_0x4e3cc7);const _0x286b99=resolveLocalFilePathFromLockKey(_0x596f2e,_0x44f784);let _0x39d1af;await fileExists(_0x286b99)&&(_0x39d1af=await moveToTrash(_0x596f2e['projectRoot'],_0x596f2e[_0x1981a1(0x1a4)],_0x286b99),await cleanupEmptyDirectories(dirname(_0x286b99),_0x596f2e[_0x1981a1(0x196)]));await waitForDeleteSettlement(_0x596f2e[_0x1981a1(0x1a3)],_0xe7c1b7['appCode'],_0x44f784,_0x286b99),await sleep(0x96);const _0x3558ea={'deleted':_0x44f784,'remoteId':_0x19fc7a[_0x1981a1(0x1b1)]};if(_0x39d1af)_0x3558ea[_0x1981a1(0x1af)]=_0x39d1af;return{'ok':!![],'data':_0x3558ea,'message':_0x1981a1(0x1bd)+_0x44f784+(_0x39d1af?'\x20(local\x20file\x20moved\x20to\x20trash)':'')};}};function resolveDeleteTarget(_0x5ae68c,_0xd688dc){const _0xfa6735=a32_0x1c0598;if(_0x5ae68c[_0xfa6735(0x1a1)]('/')){const _0xd763d2=_0xd688dc[_0xfa6735(0x1b2)](_0x52be44=>_0x52be44===_0x5ae68c);if(!_0xd763d2)throw CliErrors[_0xfa6735(0x1c1)](_0xfa6735(0x197)+_0x5ae68c);return _0xd763d2;}const _0x215d78=_0xd688dc['filter'](_0x308add=>_0x308add[_0xfa6735(0x193)]('/')['at'](-0x1)===_0x5ae68c);if(_0x215d78[_0xfa6735(0x1c0)]===0x0)throw CliErrors[_0xfa6735(0x1c1)](_0xfa6735(0x197)+_0x5ae68c);if(_0x215d78[_0xfa6735(0x1c0)]>0x1)throw CliErrors[_0xfa6735(0x1c1)](_0xfa6735(0x190)+_0x5ae68c+_0xfa6735(0x1a0)+_0x215d78[_0xfa6735(0x19f)](_0x413866=>_0xfa6735(0x198)+_0x413866)[_0xfa6735(0x18e)]('\x0a'));return _0x215d78[0x0];}async function moveToTrash(_0x28997f,_0x30d36b,_0x19915c){const _0x387621=a32_0x1c0598,_0x486de0=new Date()[_0x387621(0x195)]()[_0x387621(0x1c2)](/[:.]/g,'-'),_0x27f90a=relative(_0x28997f,_0x19915c),_0x4ddd9d=join(_0x30d36b,_0x486de0,_0x27f90a);return await mkdir(dirname(_0x4ddd9d),{'recursive':!![]}),await rename(_0x19915c,_0x4ddd9d),_0x4ddd9d;}async function cleanupEmptyDirectories(_0x2ed867,_0x5b102c){const _0x21036b=a32_0x1c0598;let _0x461c01=resolve(_0x2ed867);const _0xfbea86=resolve(_0x5b102c);while(_0x461c01['startsWith'](''+_0xfbea86+sep)||_0x461c01===_0xfbea86){if(_0x461c01===_0xfbea86)return;try{const _0x1537d0=await readdir(_0x461c01);if(_0x1537d0[_0x21036b(0x1c0)]>0x0)return;await rmdir(_0x461c01);}catch{return;}_0x461c01=dirname(_0x461c01);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0x21de8b,_0x1553f3,_0x11b856,_0x4aafcc){const _0x5822d6=a32_0x1c0598;for(let _0x276b73=0x0;_0x276b73<DELETE_SETTLE_RETRY_COUNT;_0x276b73+=0x1){const _0x3a9fc0=await readBffLockFile(_0x21de8b),_0x5201e8=!!_0x3a9fc0?.['apps']?.[_0x1553f3]?.[_0x5822d6(0x199)]?.[_0x11b856],_0x55a3ea=await fileExists(_0x4aafcc);if(!_0x5201e8&&!_0x55a3ea)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error(_0x5822d6(0x1ba)+_0x11b856+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a33_0x19b948=a33_0x533f;function a33_0x1f91(){const _0x234b7c=['244162GHctph','1161426OlYwnA','number','Script\x20ID','1016635yeKnHX','848gKFLKr','read','bool','appCode','4AoBXij','(none)','90SRyiOz','verbose','546441yPtacX','boolean','781172JGEXUF','1ZhXOGP','num','751102MNTlsA','13734UwjsZs'];a33_0x1f91=function(){return _0x234b7c;};return a33_0x1f91();}(function(_0x71c79,_0x2d8402){const _0x5206f6=a33_0x533f,_0x481478=_0x71c79();while(!![]){try{const _0x42d9ff=-parseInt(_0x5206f6(0x14f))/0x1*(-parseInt(_0x5206f6(0x153))/0x2)+parseInt(_0x5206f6(0x160))/0x3*(-parseInt(_0x5206f6(0x15c))/0x4)+-parseInt(_0x5206f6(0x157))/0x5+-parseInt(_0x5206f6(0x154))/0x6+parseInt(_0x5206f6(0x14e))/0x7+-parseInt(_0x5206f6(0x158))/0x8*(parseInt(_0x5206f6(0x152))/0x9)+-parseInt(_0x5206f6(0x15e))/0xa*(-parseInt(_0x5206f6(0x151))/0xb);if(_0x42d9ff===_0x2d8402)break;else _0x481478['push'](_0x481478['shift']());}catch(_0x179c8d){_0x481478['push'](_0x481478['shift']());}}}(a33_0x1f91,0x1a396));function a33_0x533f(_0x5476fd,_0x1e2c3d){_0x5476fd=_0x5476fd-0x14d;const _0x1f91b2=a33_0x1f91();let _0x533f65=_0x1f91b2[_0x5476fd];return _0x533f65;}import{getBffScriptInfo}from'../../core/api-client.js';export const bffDetail={'service':'bff','command':'detail','description':'Get\x20BFF\x20script\x20details\x20by\x20ID','risk':a33_0x19b948(0x159),'flags':[{'name':'id','type':a33_0x19b948(0x155),'required':!![],'description':a33_0x19b948(0x156)},{'name':'verbose','type':a33_0x19b948(0x14d),'description':'Return\x20full\x20raw\x20script\x20object'}],async 'execute'(_0x144892){const _0x38e54c=a33_0x19b948,_0x5c2a94=await getBffScriptInfo(_0x144892[_0x38e54c(0x150)]('id')),_0xa2c0eb=_0x144892[_0x38e54c(0x15a)](_0x38e54c(0x15f));if(_0xa2c0eb)return{'ok':!![],'data':_0x5c2a94};return{'ok':!![],'data':{'id':_0x5c2a94['id'],'appCode':_0x5c2a94[_0x38e54c(0x15b)],'scriptType':_0x5c2a94['scriptType'],'description':_0x5c2a94['description']||_0x38e54c(0x15d),'createdTime':_0x5c2a94['createdTime']??'','updatedTime':_0x5c2a94['updatedTime']??'','scriptContent':_0x5c2a94['scriptContent']??''}};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x96b065,_0x265932){const _0x306286=a34_0x459c,_0x3bb6d3=_0x96b065();while(!![]){try{const _0x27f756=parseInt(_0x306286(0x187))/0x1+parseInt(_0x306286(0x183))/0x2*(parseInt(_0x306286(0x186))/0x3)+-parseInt(_0x306286(0x18d))/0x4+-parseInt(_0x306286(0x18b))/0x5*(parseInt(_0x306286(0x18a))/0x6)+-parseInt(_0x306286(0x189))/0x7*(-parseInt(_0x306286(0x188))/0x8)+-parseInt(_0x306286(0x184))/0x9*(-parseInt(_0x306286(0x18c))/0xa)+-parseInt(_0x306286(0x185))/0xb*(parseInt(_0x306286(0x18e))/0xc);if(_0x27f756===_0x265932)break;else _0x3bb6d3['push'](_0x3bb6d3['shift']());}catch(_0x493ac9){_0x3bb6d3['push'](_0x3bb6d3['shift']());}}}(a34_0x3b66,0xb3e47));import{bffList}from'../../commands/bff/list.js';import{bffDetail}from'../../commands/bff/detail.js';import{bffStatus}from'../../commands/bff/status.js';import{bffCreate}from'../../commands/bff/create.js';import{bffPush}from'../../commands/bff/push.js';function a34_0x459c(_0x9648b4,_0x506ad2){_0x9648b4=_0x9648b4-0x183;const _0x3b66d4=a34_0x3b66();let _0x459ccf=_0x3b66d4[_0x9648b4];return _0x459ccf;}function a34_0x3b66(){const _0x4ecbde=['2589560Iditls','72192gfrlen','2PTJbRr','18JovLrK','1276AOpMcc','3014868pwzGNU','708039zJrbQF','20408QjWgUg','959mcLnQT','642hNxAET','8215DppNMi','977020xgYIht'];a34_0x3b66=function(){return _0x4ecbde;};return a34_0x3b66();}import{bffPull}from'../../commands/bff/pull.js';import{bffDelete}from'../../commands/bff/delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];
|
package/lib/commands/bff/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a35_0x521183=a35_0xb59a;(function(_0x53c48b,_0x38e62a){const _0x2d4487=a35_0xb59a,_0x21c140=_0x53c48b();while(!![]){try{const _0x113c42=parseInt(_0x2d4487(0xca))/0x1+parseInt(_0x2d4487(0xd0))/0x2+-parseInt(_0x2d4487(0xcc))/0x3+-parseInt(_0x2d4487(0xd4))/0x4+-parseInt(_0x2d4487(0xd1))/0x5+parseInt(_0x2d4487(0xc7))/0x6+parseInt(_0x2d4487(0xc0))/0x7*(parseInt(_0x2d4487(0xb9))/0x8);if(_0x113c42===_0x38e62a)break;else _0x21c140['push'](_0x21c140['shift']());}catch(_0x110a9d){_0x21c140['push'](_0x21c140['shift']());}}}(a35_0x29b1,0xdb974));function a35_0xb59a(_0xaf8250,_0x5d1256){_0xaf8250=_0xaf8250-0xb9;const _0x29b183=a35_0x29b1();let _0xb59af9=_0x29b183[_0xaf8250];return _0xb59af9;}function a35_0x29b1(){const _0x53cf53=['Return\x20full\x20script\x20objects','string','description','3556746NaFPwZ','3160240XKuGgp','boolean','COMMON','4072688OvSFSQ','360ejqfJx','Script\x20type\x20filter','name','type','list','scriptType','(unnamed)','84679TUtfEE','Filter\x20by\x20script\x20name','No\x20BFF\x20scripts\x20found.','read','appCode','bool','verbose','5057562WcRMRD','str','ENDPOINT','262534AFCERG','List\x20BFF\x20scripts','2635605hCsfYg'];a35_0x29b1=function(){return _0x53cf53;};return a35_0x29b1();}import{listBffScripts}from'../../core/api-client.js';export const bffList={'service':'bff','command':a35_0x521183(0xbd),'description':a35_0x521183(0xcb),'risk':a35_0x521183(0xc3),'flags':[{'name':a35_0x521183(0xbc),'type':a35_0x521183(0xce),'description':a35_0x521183(0xba),'default':a35_0x521183(0xc9),'enum':['ENDPOINT',a35_0x521183(0xd3)]},{'name':a35_0x521183(0xbb),'type':a35_0x521183(0xce),'description':a35_0x521183(0xc1)},{'name':a35_0x521183(0xc6),'type':a35_0x521183(0xd2),'description':a35_0x521183(0xcd)}],async 'execute'(_0x4fe350){const _0x552d93=a35_0x521183,_0x7d4143=await listBffScripts(_0x4fe350[_0x552d93(0xc4)],_0x4fe350[_0x552d93(0xc8)](_0x552d93(0xbc)),{'scriptName':_0x4fe350['str'](_0x552d93(0xbb))||undefined}),_0x56b310=_0x4fe350[_0x552d93(0xc5)](_0x552d93(0xc6));return{'ok':!![],'data':_0x56b310?_0x7d4143:_0x7d4143['map'](_0x240022=>({'id':_0x240022['id'],'functionName':_0x240022['functionName']??'','description':_0x240022[_0x552d93(0xcf)]||_0x552d93(0xbf),'scriptType':_0x240022[_0x552d93(0xbe)]})),'message':_0x7d4143['length']===0x0?_0x552d93(0xc2):undefined};}};
|