@lovrabet/rabetbase-cli 2.3.14 → 2.3.15-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -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/restore.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
|
+
function a20_0x1e2a(_0x20308a,_0x25ecf1){_0x20308a=_0x20308a-0x1f3;const _0x4c485a=a20_0x4c48();let _0x1e2aeb=_0x4c485a[_0x20308a];return _0x1e2aeb;}const a20_0x3c8cdb=a20_0x1e2a;(function(_0x3d4e0e,_0x39e982){const _0x24b227=a20_0x1e2a,_0x23979e=_0x3d4e0e();while(!![]){try{const _0x32e347=parseInt(_0x24b227(0x207))/0x1*(parseInt(_0x24b227(0x1f4))/0x2)+parseInt(_0x24b227(0x200))/0x3*(-parseInt(_0x24b227(0x208))/0x4)+parseInt(_0x24b227(0x1fe))/0x5*(-parseInt(_0x24b227(0x1f9))/0x6)+parseInt(_0x24b227(0x204))/0x7+parseInt(_0x24b227(0x21b))/0x8+parseInt(_0x24b227(0x201))/0x9*(-parseInt(_0x24b227(0x20f))/0xa)+parseInt(_0x24b227(0x20a))/0xb;if(_0x32e347===_0x39e982)break;else _0x23979e['push'](_0x23979e['shift']());}catch(_0x5b4644){_0x23979e['push'](_0x23979e['shift']());}}}(a20_0x4c48,0x6f52b));import{readRawConfigWithLayers}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';import{buildAppProfileListFields}from'../../config/schema.js';import{appDefinedIn,enrichAppListItemsWithMergedSelection,resolveDefaultAppSource}from'../../commands/app/shared.js';import{listRemoteAppDirectory}from'../../commands/app/remote-directory.js';function buildItemsFromLayer(_0x548512,_0x301f74){const _0x277369=a20_0x1e2a,_0x42e9f8=[],_0x4e0bd6=_0x548512[_0x277369(0x203)]&&typeof _0x548512['apps']===_0x277369(0x213)?_0x548512[_0x277369(0x203)]:{},_0x3f9e60=_0x548512['defaultApp']||undefined;for(const [_0xd1ddb6,_0x701b79]of Object[_0x277369(0x20c)](_0x4e0bd6)){if(!_0x701b79||typeof _0x701b79!==_0x277369(0x213)||!_0x701b79[_0x277369(0x1f8)])continue;_0x42e9f8['push']({'name':_0xd1ddb6,'appcode':_0x701b79['appcode'],'named':!![],'definedIn':_0x301f74,'isDefault':_0xd1ddb6===_0x3f9e60,...buildAppProfileListFields(_0x701b79)});}return _0x42e9f8;}function a20_0x4c48(){const _0x407d01=['boolean','length','\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','app','remote','2001000RpcXZH','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.','2YdvSpl','globalConfig','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','validation','appcode','210420liNxWe','merged','find','optional','map','85UQPyWl','mergedCli','51XXKLsT','126CrCzqo','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','apps','3784214wymEjR','bool','project','867290JLaLBO','153200SQpmVS','global','7407136uNYgbA','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','entries','globalPath','\x20config','448660fYjmfs','projectConfig','list','projectPath','object','.\x20Use\x20`','read'];a20_0x4c48=function(){return _0x407d01;};return a20_0x4c48();}function buildMergedItems(_0x1f5b4b,_0x42b20a){const _0x3fe8da=a20_0x1e2a,{apps:apps={},defaultApp:_0xf42a49}=_0x1f5b4b,_0x479222=_0x42b20a['globalConfig'][_0x3fe8da(0x203)]&&typeof _0x42b20a[_0x3fe8da(0x1f5)]['apps']==='object'?_0x42b20a['globalConfig'][_0x3fe8da(0x203)]:{},_0xf2e50b=_0x42b20a[_0x3fe8da(0x210)][_0x3fe8da(0x203)]&&typeof _0x42b20a[_0x3fe8da(0x210)]['apps']===_0x3fe8da(0x213)?_0x42b20a[_0x3fe8da(0x210)][_0x3fe8da(0x203)]:{},_0x384f82=_0x42b20a[_0x3fe8da(0x210)]['inherit']===![],_0x1b6309=Object[_0x3fe8da(0x20c)](apps),_0x4860a3=_0x1b6309[_0x3fe8da(0x1fd)](([_0x475ca7,_0x271950])=>({'name':_0x475ca7,'appcode':_0x271950[_0x3fe8da(0x1f8)],'named':!![],'definedIn':appDefinedIn(_0x475ca7,_0x479222,_0xf2e50b,_0x384f82),'isDefault':_0x475ca7===_0xf42a49,...buildAppProfileListFields(_0x271950)}));return _0x4860a3;}function validateAppListFlags(_0x5ca43f){const _0x35ef91=a20_0x1e2a;if(!_0x5ca43f[_0x35ef91(0x205)](_0x35ef91(0x21a)))return;if(!_0x5ca43f['bool'](_0x35ef91(0x209))&&!_0x5ca43f['bool'](_0x35ef91(0x206)))return;throw CliErrors[_0x35ef91(0x1f7)](_0x35ef91(0x20b),_0x35ef91(0x1f3));}async function execute(_0x52b81f){const _0x5708bb=a20_0x1e2a;validateAppListFlags(_0x52b81f);if(_0x52b81f['bool']('remote'))return{'ok':!![],'data':await listRemoteAppDirectory(_0x52b81f)};const _0x27b9c1=_0x52b81f['bool'](_0x5708bb(0x209)),_0x2fe957=_0x52b81f[_0x5708bb(0x205)](_0x5708bb(0x206)),_0x2a74a5=_0x27b9c1?_0x5708bb(0x209):_0x2fe957?_0x5708bb(0x206):_0x5708bb(0x1fa),{config:_0x2d5c52,layers:_0x3d4c5a}=readRawConfigWithLayers(),_0xb5eeb0=resolveDefaultAppSource(_0x3d4c5a),{defaultApp:_0x21354a}=_0x2d5c52;let _0x555585,_0x396b91;switch(_0x2a74a5){case'global':_0x555585=buildItemsFromLayer(_0x3d4c5a[_0x5708bb(0x1f5)],_0x5708bb(0x209)),_0x396b91=_0x3d4c5a[_0x5708bb(0x20d)];break;case'project':_0x555585=buildItemsFromLayer(_0x3d4c5a[_0x5708bb(0x210)],_0x5708bb(0x206)),_0x396b91=_0x3d4c5a[_0x5708bb(0x212)];break;default:_0x555585=buildMergedItems(_0x2d5c52,_0x3d4c5a);break;}enrichAppListItemsWithMergedSelection(_0x555585,_0x52b81f[_0x5708bb(0x1ff)]);if(_0x555585[_0x5708bb(0x217)]===0x0){const _0x3d43e7=_0x2a74a5==='merged'?'':'\x20in\x20'+_0x2a74a5+_0x5708bb(0x20e);return{'ok':!![],'data':[],'message':'No\x20apps\x20configured'+_0x3d43e7+_0x5708bb(0x214)+CLI_BIN_NAME+_0x5708bb(0x218)};}const _0x7af008=_0x555585[_0x5708bb(0x1fb)](_0x1871de=>_0x1871de['isCurrent']===!![]),_0x49d8b1=_0x21354a??_0x7af008?.[_0x5708bb(0x1f8)]??null,_0x178ded=_0x2a74a5===_0x5708bb(0x1fa)?{'globalPath':_0x3d4c5a[_0x5708bb(0x20d)]??null,'projectPath':_0x3d4c5a[_0x5708bb(0x212)]??null,'defaultApp':_0x49d8b1,'defaultAppSource':_0x21354a!=null?_0xb5eeb0:null}:{'scope':_0x2a74a5,'configPath':_0x396b91??null};return{'ok':!![],'data':{'items':_0x555585,'meta':_0x178ded}};}export const appListDefinition={'service':a20_0x3c8cdb(0x219),'command':a20_0x3c8cdb(0x211),'description':'List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','risk':a20_0x3c8cdb(0x215),'auth':a20_0x3c8cdb(0x1fc),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a20_0x3c8cdb(0x21a),'type':a20_0x3c8cdb(0x216),'description':'List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','default':![]},{'name':a20_0x3c8cdb(0x209),'type':a20_0x3c8cdb(0x216),'description':a20_0x3c8cdb(0x202),'default':![]},{'name':'project','type':a20_0x3c8cdb(0x216),'description':a20_0x3c8cdb(0x1f6),'default':![]}],async 'validate'(_0x1393a7){validateAppListFlags(_0x1393a7);},'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x29cadc,_0x71ae88){const _0x121bd8=a21_0x1032,_0x2d0d90=_0x29cadc();while(!![]){try{const _0x3bc4ef=parseInt(_0x121bd8(0xee))/0x1+-parseInt(_0x121bd8(0xe2))/0x2+-parseInt(_0x121bd8(0xe7))/0x3*(-parseInt(_0x121bd8(0xe1))/0x4)+parseInt(_0x121bd8(0xdf))/0x5*(-parseInt(_0x121bd8(0xe8))/0x6)+parseInt(_0x121bd8(0xed))/0x7*(parseInt(_0x121bd8(0xea))/0x8)+parseInt(_0x121bd8(0xe5))/0x9+parseInt(_0x121bd8(0xe6))/0xa*(-parseInt(_0x121bd8(0xe0))/0xb);if(_0x3bc4ef===_0x71ae88)break;else _0x2d0d90['push'](_0x2d0d90['shift']());}catch(_0x46902e){_0x2d0d90['push'](_0x2d0d90['shift']());}}}(a21_0x1a25,0x1c552));function a21_0x1a25(){const _0x549b84=['212656JyoFyG','67420vkxRwh','map','cookie','499158erIihf','10JfQQfX','3wzoKUB','57438uKJEQb','platform','600gUtXMo','appDesc','appName','14679xDRRRA','8549ehBKjM','5BYIKar','1266287kZOopl'];a21_0x1a25=function(){return _0x549b84;};return a21_0x1a25();}import{listRemoteApps}from'../../core/api-client.js';import{getCookie}from'../../auth/get-cookie.js';import{CliErrors}from'../../errors.js';function a21_0x1032(_0x4763be,_0x509c25){_0x4763be=_0x4763be-0xdf;const _0x1a2506=a21_0x1a25();let _0x1032b5=_0x1a2506[_0x4763be];return _0x1032b5;}import{withActiveCookie}from'../../utils/with-active-cookie.js';function resolveCookie(_0x1a06d3){const _0x401bb9=a21_0x1032,_0xa8550f=_0x1a06d3[_0x401bb9(0xe4)]||getCookie();if(!_0xa8550f)throw CliErrors['authRequired']();return _0xa8550f;}export async function listRemoteAppDirectory(_0x4ac123){const _0x4634b3=a21_0x1032,_0x48ead0=await withActiveCookie(resolveCookie(_0x4ac123),()=>listRemoteApps());return{'items':_0x48ead0[_0x4634b3(0xe3)](_0x581fb6=>({..._0x581fb6['id']!=null?{'id':_0x581fb6['id']}:{},'appCode':_0x581fb6['appCode'],'appName':_0x581fb6[_0x4634b3(0xec)],..._0x581fb6[_0x4634b3(0xeb)]!=null?{'appDesc':_0x581fb6['appDesc']}:{}})),'meta':{'source':_0x4634b3(0xe9)}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a22_0x2c4175=a22_0x762f;(function(_0x3f2f2e,_0x2fe109){const _0x4fac86=a22_0x762f,_0x7a15d4=_0x3f2f2e();while(!![]){try{const _0x47669c=parseInt(_0x4fac86(0x19e))/0x1+parseInt(_0x4fac86(0x19d))/0x2*(-parseInt(_0x4fac86(0x19a))/0x3)+parseInt(_0x4fac86(0x1a1))/0x4+-parseInt(_0x4fac86(0x195))/0x5*(-parseInt(_0x4fac86(0x199))/0x6)+parseInt(_0x4fac86(0x19c))/0x7*(-parseInt(_0x4fac86(0x192))/0x8)+parseInt(_0x4fac86(0x194))/0x9*(parseInt(_0x4fac86(0x1a0))/0xa)+-parseInt(_0x4fac86(0x19b))/0xb;if(_0x47669c===_0x2fe109)break;else _0x7a15d4['push'](_0x7a15d4['shift']());}catch(_0x41ec59){_0x7a15d4['push'](_0x7a15d4['shift']());}}}(a22_0x24b6,0x370cd));import{CLI_BIN_NAME}from'../../constant/cli.js';import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';export const appRemoveDefinition={'service':a22_0x2c4175(0x191),'command':a22_0x2c4175(0x197),'description':a22_0x2c4175(0x198),'risk':'high-risk-write','requiresAuth':![],'requiresAppCode':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a22_0x2c4175(0x193),'since':'2026-07'},'args':[{'name':a22_0x2c4175(0x19f),'description':'App\x20profile\x20name\x20to\x20remove','required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x3470e9=>validateAppName(_0x3470e9,a22_0x2c4175(0x196)),'execute':_0x2488da=>runAppRemove(_0x2488da,a22_0x2c4175(0x196))};function a22_0x762f(_0xf4725c,_0x2c1eb2){_0xf4725c=_0xf4725c-0x191;const _0x24b68c=a22_0x24b6();let _0x762f1d=_0x24b68c[_0xf4725c];return _0x762f1d;}function a22_0x24b6(){const _0x4550bb=['name','2938470pZXBvA','1650584KXYKkf','app','19864jqHubM','\x20workspace\x20remove','9fFvulW','196375Ucwbih','app\x20remove','remove','Deprecated:\x20use\x20workspace\x20remove\x20to\x20remove\x20an\x20app\x20profile','24MLaBZu','96GGxRZm','8607687pYITJF','693HxhDCS','3716rVDGpe','449682XqEpNS'];a22_0x24b6=function(){return _0x4550bb;};return a22_0x24b6();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1c729b,_0x5aa943){const _0x3f3160=a23_0x401e,_0x4e7f40=_0x1c729b();while(!![]){try{const _0x594259=parseInt(_0x3f3160(0x206))/0x1*(-parseInt(_0x3f3160(0x20d))/0x2)+parseInt(_0x3f3160(0x20e))/0x3+-parseInt(_0x3f3160(0x1f8))/0x4*(-parseInt(_0x3f3160(0x1fc))/0x5)+parseInt(_0x3f3160(0x208))/0x6+-parseInt(_0x3f3160(0x20f))/0x7+-parseInt(_0x3f3160(0x20c))/0x8*(parseInt(_0x3f3160(0x1fa))/0x9)+parseInt(_0x3f3160(0x1fd))/0xa;if(_0x594259===_0x5aa943)break;else _0x4e7f40['push'](_0x4e7f40['shift']());}catch(_0x5d0367){_0x4e7f40['push'](_0x4e7f40['shift']());}}}(a23_0x1c04,0x222e8));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';export function enrichAppListItemsWithMergedSelection(_0x14d071,_0x58a6b5){const _0x5359ba=a23_0x401e;if(!_0x58a6b5)return;const _0x7f1b1f=_0x58a6b5['apps']&&typeof _0x58a6b5[_0x5359ba(0x203)]==='object'?_0x58a6b5[_0x5359ba(0x203)]:{},_0x34f9b5=Object['keys'](_0x7f1b1f)['length']>0x0;for(const _0x3c20a9 of _0x14d071){_0x3c20a9['isCurrent']=![];}const _0x26bfb4=_0x58a6b5['appCode']!=null?String(_0x58a6b5['appCode'])[_0x5359ba(0x20a)]():'';if(_0x34f9b5){const _0x56d372=_0x58a6b5[_0x5359ba(0x202)]??_0x58a6b5[_0x5359ba(0x1f9)];if(_0x56d372)for(const _0x56a525 of _0x14d071){_0x56a525[_0x5359ba(0x201)]===!![]&&_0x56a525[_0x5359ba(0x1f6)]===_0x56d372&&(_0x56a525[_0x5359ba(0x1f7)]=!![]);}for(const _0x265da5 of _0x14d071){if(_0x265da5[_0x5359ba(0x201)]!==![])continue;if(_0x58a6b5[_0x5359ba(0x1f9)])continue;_0x26bfb4&&String(_0x265da5[_0x5359ba(0x1fe)]??'')[_0x5359ba(0x20a)]()===_0x26bfb4&&(_0x265da5['isCurrent']=!![]);}return;}if(!_0x26bfb4)return;for(const _0xe85f5c of _0x14d071){String(_0xe85f5c[_0x5359ba(0x1fe)]??'')[_0x5359ba(0x20a)]()===_0x26bfb4&&(_0xe85f5c[_0x5359ba(0x1f7)]=!![]);}}export function resolveAppScopeForWrite(_0x172bb8,_0x55382e,_0x4002f5){const _0x3050e7=a23_0x401e;if(_0x55382e)return _0x3050e7(0x1fb);const _0x4a4a3a=_0x4002f5['projectConfig'][_0x3050e7(0x203)]&&typeof _0x4002f5[_0x3050e7(0x1ff)]['apps']===_0x3050e7(0x204)?_0x4002f5[_0x3050e7(0x1ff)][_0x3050e7(0x203)]:{},_0x5eec5e=_0x4002f5[_0x3050e7(0x207)][_0x3050e7(0x203)]&&typeof _0x4002f5[_0x3050e7(0x207)][_0x3050e7(0x203)]===_0x3050e7(0x204)?_0x4002f5[_0x3050e7(0x207)][_0x3050e7(0x203)]:{};if(Object[_0x3050e7(0x210)][_0x3050e7(0x205)][_0x3050e7(0x1f4)](_0x4a4a3a,_0x172bb8))return _0x3050e7(0x200);if(Object[_0x3050e7(0x210)]['hasOwnProperty'][_0x3050e7(0x1f4)](_0x5eec5e,_0x172bb8))return _0x3050e7(0x1fb);return'project';}export function appDefinedIn(_0x47c383,_0x358aba,_0x4562c6,_0x5a80b8){const _0x2bb61f=a23_0x401e;if(_0x5a80b8)return Object[_0x2bb61f(0x210)]['hasOwnProperty'][_0x2bb61f(0x1f4)](_0x4562c6,_0x47c383)?_0x2bb61f(0x200):'global';const _0x3ab983=Object[_0x2bb61f(0x210)]['hasOwnProperty']['call'](_0x358aba,_0x47c383),_0x575901=Object[_0x2bb61f(0x210)]['hasOwnProperty'][_0x2bb61f(0x1f4)](_0x4562c6,_0x47c383);if(_0x3ab983&&_0x575901)return'both';if(_0x575901)return _0x2bb61f(0x200);return _0x2bb61f(0x1fb);}function a23_0x1c04(){const _0x49f72e=['22bosrQv','137172STiOjh','541912TTrFPm','prototype','call','inherit','name','isCurrent','15476yPJPAl','defaultApp','218655wKklIg','global','315nKoZvZ','2256060omDBEf','appcode','projectConfig','project','named','currentApp','apps','object','hasOwnProperty','24942duRDJJ','globalConfig','6024aiohfF','length','trim','keys','8jUydNI'];a23_0x1c04=function(){return _0x49f72e;};return a23_0x1c04();}function a23_0x401e(_0x5e1d70,_0x20be9c){_0x5e1d70=_0x5e1d70-0x1f4;const _0x1c046e=a23_0x1c04();let _0x401e88=_0x1c046e[_0x5e1d70];return _0x401e88;}export function resolveDefaultAppSource(_0x375a2f){const _0x412080=a23_0x401e,_0x5c70a4=_0x375a2f[_0x412080(0x1ff)]['apps']&&typeof _0x375a2f[_0x412080(0x1ff)]['apps']===_0x412080(0x204)?_0x375a2f[_0x412080(0x1ff)][_0x412080(0x203)]:{};if(_0x412080(0x1f9)in _0x375a2f[_0x412080(0x1ff)])return _0x412080(0x200);if(Object[_0x412080(0x20b)](_0x5c70a4)[_0x412080(0x209)]>0x0)return _0x412080(0x200);if(_0x375a2f['projectConfig'][_0x412080(0x1f5)]===![])return null;if(_0x375a2f[_0x412080(0x207)][_0x412080(0x1f9)])return _0x412080(0x1fb);return null;}export function getConfigPath(_0x19d703={}){const _0x29c419=a23_0x401e,_0x5cd554=_0x19d703['global']?_0x29c419(0x1fb):'project';return resolveWriteConfigPath(_0x5cd554);}export function readConfig(_0x3af5a1={}){return readConfigFile(getConfigPath(_0x3af5a1));}export function writeConfig(_0x16dc95,_0x17add5={}){writeConfigFile(getConfigPath(_0x17add5),_0x16dc95);}export function scopeLabel(_0x54aca5){const _0x10ddb6=a23_0x401e;return _0x54aca5[_0x10ddb6(0x1fb)]?'\x20(global)':'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a24_0x50a2(){const _0xc39696=['App\x20config\x20key\x20not\x20found:\x20','576100Pjvyyc','12oZemlI','appCode:\x20','3366118RxmVOf','4230KgQPfm','high-risk-write',',\x20appCode=','1709812qDEwhU','isFinite','get','15224ijMyVo','app-config','1SVBcEh','50gXWlkV','179154ofOIcU','appCode','delete','31953064WLNpqK','Delete\x20one\x20runtime\x20app-config\x20key','number','/smartapi/app-config/delete','5725860UyhNWe','validation','apiError'];a24_0x50a2=function(){return _0xc39696;};return a24_0x50a2();}const a24_0x41ba98=a24_0x23dc;(function(_0x58debe,_0x53baeb){const _0x15cb9c=a24_0x23dc,_0x24342e=_0x58debe();while(!![]){try{const _0x24f786=parseInt(_0x15cb9c(0x76))/0x1*(parseInt(_0x15cb9c(0x71))/0x2)+parseInt(_0x15cb9c(0x78))/0x3+parseInt(_0x15cb9c(0x6a))/0x4*(parseInt(_0x15cb9c(0x77))/0x5)+parseInt(_0x15cb9c(0x6b))/0x6*(parseInt(_0x15cb9c(0x6d))/0x7)+-parseInt(_0x15cb9c(0x74))/0x8*(-parseInt(_0x15cb9c(0x6e))/0x9)+-parseInt(_0x15cb9c(0x7f))/0xa+-parseInt(_0x15cb9c(0x7b))/0xb;if(_0x24f786===_0x53baeb)break;else _0x24342e['push'](_0x24342e['shift']());}catch(_0x40bd8d){_0x24342e['push'](_0x24342e['shift']());}}}(a24_0x50a2,0xb31b6));import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asAppConfigDryRunResult,buildMutationData,KEY_ARG,projectAppConfig,readKeyArg,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';function a24_0x23dc(_0x18e979,_0x1854d2){_0x18e979=_0x18e979-0x69;const _0x50a243=a24_0x50a2();let _0x23dc81=_0x50a243[_0x18e979];return _0x23dc81;}const DELETE_PATH=a24_0x41ba98(0x7e);export const appConfigDelete={'service':a24_0x41ba98(0x75),'command':a24_0x41ba98(0x7a),'description':a24_0x41ba98(0x7c),'risk':a24_0x41ba98(0x6f),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x328dab){readKeyArg(_0x328dab);},async 'dryRun'(_0x10fef3){const _0x48725b=a24_0x41ba98,_0x301ae9=readKeyArg(_0x10fef3),_0x26b880=await mustGetByKey(_0x10fef3[_0x48725b(0x79)],_0x301ae9);return asAppConfigDryRunResult(buildMutationData({'operation':'delete','appCode':_0x10fef3['appCode'],'key':_0x301ae9,'before':projectAppConfig(_0x26b880),'after':null,'dryRun':!![]}),{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x10bd44){const _0x7afda9=a24_0x41ba98,_0x23e11f=readKeyArg(_0x10bd44),_0x20b5f5=await mustGetByKey(_0x10bd44['appCode'],_0x23e11f);return await withAppConfigApiBoundary(_0x7afda9(0x7a),{'appCode':_0x10bd44[_0x7afda9(0x79)],'key':_0x23e11f},()=>deleteAppConfig({'appCode':_0x10bd44['appCode'],'id':requireAppConfigId(_0x20b5f5,_0x23e11f,_0x10bd44['appCode'])})),{'ok':!![],'data':buildMutationData({'operation':_0x7afda9(0x7a),'appCode':_0x10bd44[_0x7afda9(0x79)],'key':_0x23e11f,'before':projectAppConfig(_0x20b5f5),'after':null,'dryRun':![]}),'message':'Deleted\x20app\x20config\x20'+_0x23e11f};}};async function mustGetByKey(_0x3463f8,_0x3b17fc){const _0x44d1e1=a24_0x41ba98,_0x26f5d4=await withAppConfigApiBoundary(_0x44d1e1(0x73),{'appCode':_0x3463f8,'key':_0x3b17fc},()=>getAppConfigByKey(_0x3463f8,_0x3b17fc));if(!_0x26f5d4)throw CliErrors[_0x44d1e1(0x80)](_0x44d1e1(0x69)+_0x3b17fc,_0x44d1e1(0x6c)+_0x3463f8);return _0x26f5d4;}function requireAppConfigId(_0x33fd6d,_0x1581c3,_0x2485e6){const _0x45edd5=a24_0x41ba98;if(typeof _0x33fd6d['id']===_0x45edd5(0x7d)&&Number[_0x45edd5(0x72)](_0x33fd6d['id'])&&_0x33fd6d['id']>0x0)return _0x33fd6d['id'];throw CliErrors[_0x45edd5(0x81)]('App\x20config\x20server\x20id\x20missing\x20for\x20key='+_0x1581c3+_0x45edd5(0x70)+_0x2485e6);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a25_0x5bf2e7=a25_0x55ce;(function(_0x50d36c,_0xf90aec){const _0x17437e=a25_0x55ce,_0xaadc5e=_0x50d36c();while(!![]){try{const _0x299a98=-parseInt(_0x17437e(0xee))/0x1*(parseInt(_0x17437e(0xe3))/0x2)+parseInt(_0x17437e(0xe9))/0x3+parseInt(_0x17437e(0xf1))/0x4+-parseInt(_0x17437e(0xe8))/0x5*(-parseInt(_0x17437e(0xf7))/0x6)+parseInt(_0x17437e(0xeb))/0x7*(parseInt(_0x17437e(0xe5))/0x8)+parseInt(_0x17437e(0xf5))/0x9*(-parseInt(_0x17437e(0xed))/0xa)+-parseInt(_0x17437e(0xea))/0xb;if(_0x299a98===_0xf90aec)break;else _0xaadc5e['push'](_0xaadc5e['shift']());}catch(_0x341c6a){_0xaadc5e['push'](_0xaadc5e['shift']());}}}(a25_0x5eab,0xb586b));function a25_0x5eab(){const _0x25f331=['get','30RwQhvH','78623pnVPJB','\x20with\x20value\x20redacted','read','5807616OYNtHy','App\x20config\x20key\x20not\x20found:\x20','\x20with\x20value\x20revealed','validation','206649BUlWie','Loaded\x20app\x20config\x20','30738maIjOO','reveal','bool','34rEVmtQ','Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','7491392TiENlf','appCode:\x20','appCode','1150dPKnHM','2323071ZAPMVt','24111670qodgyO','7Ktqyly'];a25_0x5eab=function(){return _0x25f331;};return a25_0x5eab();}import{getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{KEY_ARG,projectAppConfig,readKeyArg,REVEAL_FLAG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';function a25_0x55ce(_0x5c051d,_0x575fe2){_0x5c051d=_0x5c051d-0xe1;const _0x5eab17=a25_0x5eab();let _0x55ceaa=_0x5eab17[_0x5c051d];return _0x55ceaa;}export const appConfigGet={'service':'app-config','command':a25_0x5bf2e7(0xec),'description':a25_0x5bf2e7(0xe4),'risk':a25_0x5bf2e7(0xf0),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x45865d){readKeyArg(_0x45865d);},async 'execute'(_0x59f639){const _0x18c62e=a25_0x5bf2e7,_0x49077d=readKeyArg(_0x59f639),_0x54c5fc=await withAppConfigApiBoundary(_0x18c62e(0xec),{'appCode':_0x59f639[_0x18c62e(0xe7)],'key':_0x49077d},()=>getAppConfigByKey(_0x59f639[_0x18c62e(0xe7)],_0x49077d));if(!_0x54c5fc)throw CliErrors[_0x18c62e(0xf4)](_0x18c62e(0xf2)+_0x49077d,_0x18c62e(0xe6)+_0x59f639['appCode']);const _0x3326a2=projectAppConfig(_0x54c5fc,{'reveal':_0x59f639[_0x18c62e(0xe2)]('reveal')});return{'ok':!![],'data':{'config':_0x3326a2},'message':_0x59f639[_0x18c62e(0xe2)](_0x18c62e(0xe1))?_0x18c62e(0xf6)+_0x49077d+_0x18c62e(0xf3):_0x18c62e(0xf6)+_0x49077d+_0x18c62e(0xef)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4f7fc9,_0x37f15c){const _0x28ca5e=a26_0x3693,_0x271edf=_0x4f7fc9();while(!![]){try{const _0x4da0db=parseInt(_0x28ca5e(0x17c))/0x1+parseInt(_0x28ca5e(0x17d))/0x2*(-parseInt(_0x28ca5e(0x177))/0x3)+parseInt(_0x28ca5e(0x178))/0x4*(parseInt(_0x28ca5e(0x17b))/0x5)+-parseInt(_0x28ca5e(0x17f))/0x6+parseInt(_0x28ca5e(0x17a))/0x7*(-parseInt(_0x28ca5e(0x175))/0x8)+parseInt(_0x28ca5e(0x179))/0x9+parseInt(_0x28ca5e(0x176))/0xa*(parseInt(_0x28ca5e(0x17e))/0xb);if(_0x4da0db===_0x37f15c)break;else _0x271edf['push'](_0x271edf['shift']());}catch(_0x33a917){_0x271edf['push'](_0x271edf['shift']());}}}(a26_0x450c,0x7357a));function a26_0x3693(_0x1e16f5,_0x221c92){_0x1e16f5=_0x1e16f5-0x175;const _0x450c7a=a26_0x450c();let _0x3693a9=_0x450c7a[_0x1e16f5];return _0x3693a9;}import{appConfigList}from'../../commands/app-config/list.js';import{appConfigGet}from'../../commands/app-config/get.js';import{appConfigSet}from'../../commands/app-config/set.js';import{appConfigDelete}from'../../commands/app-config/delete.js';function a26_0x450c(){const _0x49ee1b=['519872dobwyR','4169124bzPKAy','8449QKFyvI','10yctiQA','184657KeoYlk','32aNjLPU','4246ZQLapA','1545036WeAsBo','488MyfTuA','11930MlUFCJ','105891JOvbel'];a26_0x450c=function(){return _0x49ee1b;};return a26_0x450c();}export const appConfigDefinitions=[appConfigList,appConfigGet,appConfigSet,appConfigDelete];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a27_0x3e9a71=a27_0x65f6;(function(_0x413c2c,_0x45baec){const _0x1ce3b3=a27_0x65f6,_0x2581ae=_0x413c2c();while(!![]){try{const _0x1e622e=-parseInt(_0x1ce3b3(0x14b))/0x1*(-parseInt(_0x1ce3b3(0x13e))/0x2)+-parseInt(_0x1ce3b3(0x13a))/0x3*(parseInt(_0x1ce3b3(0x14d))/0x4)+-parseInt(_0x1ce3b3(0x143))/0x5*(parseInt(_0x1ce3b3(0x14e))/0x6)+-parseInt(_0x1ce3b3(0x146))/0x7*(parseInt(_0x1ce3b3(0x13b))/0x8)+parseInt(_0x1ce3b3(0x138))/0x9*(-parseInt(_0x1ce3b3(0x13d))/0xa)+parseInt(_0x1ce3b3(0x14a))/0xb*(-parseInt(_0x1ce3b3(0x13c))/0xc)+parseInt(_0x1ce3b3(0x147))/0xd;if(_0x1e622e===_0x45baec)break;else _0x2581ae['push'](_0x2581ae['shift']());}catch(_0x3abde5){_0x2581ae['push'](_0x2581ae['shift']());}}}(a27_0x197b,0x3a66c));import{listAppConfigs}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a27_0x197b(){const _0x55e28f=['trim','app-config','map','\x20app\x20config(s)','5yIhWES','appCode','Found\x20','7YdOqhW','16923374lZpoeO','length','read','1785949xcNxBd','2183HgdQNz','string','200sjEURQ','1077156AeDNSI','list','key','str','9NThehN','List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','24375ciYHqk','3624368JRVSGk','12ZMHlGE','2827240jCdgbS','386BtJPdP'];a27_0x197b=function(){return _0x55e28f;};return a27_0x197b();}import{projectAppConfig,readOptionalTags,TAGS_FLAG,validateKey,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';function a27_0x65f6(_0x131782,_0x3e5211){_0x131782=_0x131782-0x135;const _0x197bdf=a27_0x197b();let _0x65f698=_0x197bdf[_0x131782];return _0x65f698;}export const appConfigList={'service':a27_0x3e9a71(0x140),'command':a27_0x3e9a71(0x135),'description':a27_0x3e9a71(0x139),'risk':a27_0x3e9a71(0x149),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a27_0x3e9a71(0x136),'type':a27_0x3e9a71(0x14c),'description':'Filter\x20by\x20exact\x20config\x20key'},TAGS_FLAG],async 'validate'(_0x10ec9a){const _0x344416=a27_0x3e9a71,_0x4f7cea=_0x10ec9a[_0x344416(0x137)](_0x344416(0x136))[_0x344416(0x13f)]();if(_0x4f7cea)validateKey(_0x4f7cea);readOptionalTags(_0x10ec9a);},async 'execute'(_0xa85ef){const _0x1bc832=a27_0x3e9a71,_0x1e7ef6=_0xa85ef[_0x1bc832(0x137)](_0x1bc832(0x136))['trim']()||undefined,_0x494aad=readOptionalTags(_0xa85ef),_0x24fac3=await withAppConfigApiBoundary(_0x1bc832(0x135),{'appCode':_0xa85ef[_0x1bc832(0x144)]},()=>listAppConfigs(_0xa85ef[_0x1bc832(0x144)],{'key':_0x1e7ef6,'tags':_0x494aad})),_0x3539f7=_0x24fac3[_0x1bc832(0x141)](_0x323c63=>projectAppConfig(_0x323c63));return{'ok':!![],'data':{'appCode':_0xa85ef[_0x1bc832(0x144)],'count':_0x3539f7[_0x1bc832(0x148)],'configs':_0x3539f7},'message':_0x1bc832(0x145)+_0x3539f7[_0x1bc832(0x148)]+_0x1bc832(0x142)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a28_0x3bdb4f=a28_0x44ea;(function(_0x430644,_0xae9666){const _0xf8919d=a28_0x44ea,_0x13a1d1=_0x430644();while(!![]){try{const _0x42f360=parseInt(_0xf8919d(0x185))/0x1+parseInt(_0xf8919d(0x190))/0x2+-parseInt(_0xf8919d(0x187))/0x3+parseInt(_0xf8919d(0x193))/0x4+parseInt(_0xf8919d(0x194))/0x5+parseInt(_0xf8919d(0x18e))/0x6+-parseInt(_0xf8919d(0x182))/0x7;if(_0x42f360===_0xae9666)break;else _0x13a1d1['push'](_0x13a1d1['shift']());}catch(_0x407bb6){_0x13a1d1['push'](_0x13a1d1['shift']());}}}(a28_0x282f,0x8683a));import{createAppConfig,getAppConfigByKey,updateAppConfig}from'../../core/api-client.js';function a28_0x282f(){const _0x3e54c6=['1531902kMrnxy','file','tags','string','set','appCode','isFinite','868614xnInqZ','Read\x20config\x20value\x20from\x20file','1777686jMIbhh','\x20app\x20config\x20','number','172356STaVFB','2741930GDnyht','get',',\x20appCode=','update','/smartapi/app-config/create','POST','9603468AgAVRL','App\x20config\x20server\x20id\x20missing\x20for\x20key=','Created','808441wjmsfr','create'];a28_0x282f=function(){return _0x3e54c6;};return a28_0x282f();}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a28_0x44ea(_0x1047fb,_0x3adcdb){_0x1047fb=_0x1047fb-0x17d;const _0x282f97=a28_0x282f();let _0x44ea86=_0x282f97[_0x1047fb];return _0x44ea86;}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_0x3bdb4f(0x180),UPDATE_PATH='/smartapi/app-config/update';export const appConfigSet={'service':'app-config','command':a28_0x3bdb4f(0x18b),'description':'Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','risk':'high-risk-write','args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':a28_0x3bdb4f(0x188),'type':a28_0x3bdb4f(0x18a),'description':a28_0x3bdb4f(0x18f)}],async 'validate'(_0x255549){readKeyArg(_0x255549),readOptionalTags(_0x255549),assertSingleValueSource(_0x255549);},async 'dryRun'(_0xaf2ccd){const _0x4d281f=a28_0x3bdb4f,_0x268fb3=readKeyArg(_0xaf2ccd),_0x3f15bb=readOptionalTags(_0xaf2ccd),_0x580bb7=assertSingleValueSource(_0xaf2ccd);await assertValueSourceReadable(_0x580bb7);const _0x3e7556=await withAppConfigApiBoundary(_0x4d281f(0x17d),{'appCode':_0xaf2ccd[_0x4d281f(0x18c)],'key':_0x268fb3},()=>getAppConfigByKey(_0xaf2ccd[_0x4d281f(0x18c)],_0x268fb3)),_0x19ce8e=_0x3e7556?_0x4d281f(0x17f):_0x4d281f(0x186),_0x5637e8=_0x3e7556?projectAppConfig(_0x3e7556):null,_0x49c4a5=plannedAppConfig({'appCode':_0xaf2ccd[_0x4d281f(0x18c)],'key':_0x268fb3,'tags':_0x3f15bb??_0x3e7556?.[_0x4d281f(0x189)],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x19ce8e,'appCode':_0xaf2ccd['appCode'],'key':_0x268fb3,'before':_0x5637e8,'after':_0x49c4a5,'dryRun':!![]}),{'method':_0x4d281f(0x181),'url':_0x19ce8e===_0x4d281f(0x17f)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x1cfd70){const _0x4df884=a28_0x3bdb4f,_0x26c0a4=readKeyArg(_0x1cfd70),_0x6eccb9=readOptionalTags(_0x1cfd70),_0x56898b=await withAppConfigApiBoundary('get',{'appCode':_0x1cfd70[_0x4df884(0x18c)],'key':_0x26c0a4},()=>getAppConfigByKey(_0x1cfd70['appCode'],_0x26c0a4)),_0x527510=_0x56898b?projectAppConfig(_0x56898b):null,_0x4f8ba5=_0x56898b?_0x4df884(0x17f):_0x4df884(0x186),{value:_0x2e9697,warnings:_0x59a378}=await readAppConfigValue(_0x1cfd70),_0x489cf8={'appCode':_0x1cfd70[_0x4df884(0x18c)],'key':_0x26c0a4,'value':_0x2e9697,'tags':_0x6eccb9??_0x56898b?.[_0x4df884(0x189)]??undefined};await withAppConfigApiBoundary(_0x4f8ba5,{'appCode':_0x1cfd70[_0x4df884(0x18c)],'key':_0x26c0a4},async()=>{const _0x1fd063=_0x4df884;_0x56898b?await updateAppConfig({..._0x489cf8,'id':requireAppConfigId(_0x56898b,_0x26c0a4,_0x1cfd70[_0x1fd063(0x18c)])}):await createAppConfig(_0x489cf8);});const _0x169681=await withAppConfigApiBoundary(_0x4df884(0x17d),{'appCode':_0x1cfd70[_0x4df884(0x18c)],'key':_0x26c0a4},()=>getAppConfigByKey(_0x1cfd70['appCode'],_0x26c0a4)),_0x547c39=_0x169681?projectAppConfig(_0x169681):plannedAppConfig({'appCode':_0x1cfd70[_0x4df884(0x18c)],'key':_0x26c0a4,'tags':_0x489cf8['tags'],'hasValue':_0x2e9697!==''});return{'ok':!![],'data':buildMutationData({'operation':_0x4f8ba5,'appCode':_0x1cfd70[_0x4df884(0x18c)],'key':_0x26c0a4,'before':_0x527510,'after':_0x547c39,'dryRun':![],'warnings':_0x59a378}),'message':(_0x4f8ba5===_0x4df884(0x17f)?'Updated':_0x4df884(0x184))+_0x4df884(0x191)+_0x26c0a4};}};function requireAppConfigId(_0x1d2900,_0x3bb25b,_0x48f1ef){const _0x3073f8=a28_0x3bdb4f;if(typeof _0x1d2900['id']===_0x3073f8(0x192)&&Number[_0x3073f8(0x18d)](_0x1d2900['id'])&&_0x1d2900['id']>0x0)return _0x1d2900['id'];throw CliErrors['apiError'](_0x3073f8(0x183)+_0x3bb25b+_0x3073f8(0x17e)+_0x48f1ef);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a29_0x5d8c87=a29_0x1635;(function(_0x2947cf,_0x5dd7ec){const _0x533111=a29_0x1635,_0x159177=_0x2947cf();while(!![]){try{const _0x2d9ee8=parseInt(_0x533111(0x111))/0x1*(-parseInt(_0x533111(0x138))/0x2)+-parseInt(_0x533111(0x132))/0x3*(-parseInt(_0x533111(0x124))/0x4)+parseInt(_0x533111(0x12c))/0x5*(parseInt(_0x533111(0x123))/0x6)+-parseInt(_0x533111(0x148))/0x7*(-parseInt(_0x533111(0x13b))/0x8)+-parseInt(_0x533111(0x14c))/0x9*(-parseInt(_0x533111(0x13a))/0xa)+parseInt(_0x533111(0x139))/0xb+-parseInt(_0x533111(0x11f))/0xc;if(_0x2d9ee8===_0x5dd7ec)break;else _0x159177['push'](_0x159177['shift']());}catch(_0x3bb702){_0x159177['push'](_0x159177['shift']());}}}(a29_0x2071,0x682e4));import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':a29_0x5d8c87(0x135),'description':a29_0x5d8c87(0x125),'required':!![]};export const VALUE_ARG={'name':a29_0x5d8c87(0x117),'description':a29_0x5d8c87(0x14f),'required':![]};function a29_0x2071(){const _0x2e1f80=['App\x20config\x20value\x20source\x20is\x20ambiguous.','2148561KVnyBA','Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable','gmtCreate','Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','Environment\x20variable\x20is\x20not\x20set:\x20','App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.','length','slice','flag','data','appCode','187tFdIzn','apiError','App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.','name','\x20app\x20config.','warnings','value','setEncoding','reveal','value\x20is\x20redacted','error','argument','after','env','13694340SyMkVT','valueRedacted','dryRun','tags','2862WQwqFx','137236dPWzaX','Runtime\x20app-config\x20key','Value\x20file\x20is\x20not\x20readable:\x20','boolean','validation','Read\x20config\x20value\x20from\x20stdin','string','Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','7135CJqjri','gmtModified','operation','kind','bool','file','3xdpOjq','from-env','url','key','end','push','82TIQsIl','6398876SdbYsc','10hpNxFc','321224IovnRJ','appCode:\x20','stdin','Missing\x20app-config\x20value\x20source.','Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','hasValue','args','utf8','str','Config\x20tags\x20for\x20filtering/display\x20metadata','path','once','7XrCClN','defineProperties','trim'];a29_0x2071=function(){return _0x2e1f80;};return a29_0x2071();}export const TAGS_FLAG={'name':'tags','type':'string','description':a29_0x5d8c87(0x145)};export const STDIN_FLAG={'name':a29_0x5d8c87(0x13d),'type':'boolean','description':a29_0x5d8c87(0x129),'default':![]};function a29_0x1635(_0x28d3bc,_0x2950c5){_0x28d3bc=_0x28d3bc-0x10a;const _0x20718c=a29_0x2071();let _0x163516=_0x20718c[_0x28d3bc];return _0x163516;}export const FROM_ENV_FLAG={'name':'from-env','type':a29_0x5d8c87(0x12a),'description':a29_0x5d8c87(0x14d)};export const REVEAL_FLAG={'name':'reveal','type':a29_0x5d8c87(0x127),'description':a29_0x5d8c87(0x13f),'default':![]};export function readKeyArg(_0x3abdea){const _0x302da2=a29_0x5d8c87,_0x272234=_0x3abdea['args'][0x0]?.[_0x302da2(0x14a)]()??'';return validateKey(_0x272234),_0x272234;}export function readOptionalTags(_0x31ed6c){const _0x5454da=a29_0x5d8c87,_0x100dc9=_0x31ed6c[_0x5454da(0x144)]('tags')['trim']();if(!_0x100dc9)return undefined;if(_0x100dc9[_0x5454da(0x10c)]>0x20)throw CliErrors[_0x5454da(0x128)](_0x5454da(0x10b));return _0x100dc9;}export function validateKey(_0x628a88){const _0x86ac1c=a29_0x5d8c87;if(!_0x628a88)throw CliErrors['validation']('Missing\x20app-config\x20key.');if(_0x628a88[_0x86ac1c(0x10c)]>0x100)throw CliErrors['validation'](_0x86ac1c(0x113));}export function projectAppConfig(_0x4cd40e,_0xf490d9){const _0x347b8f=a29_0x5d8c87,_0x47728c=_0x4cd40e[_0x347b8f(0x117)]!==undefined&&_0x4cd40e[_0x347b8f(0x117)]!==null&&_0x4cd40e[_0x347b8f(0x117)]!=='',_0x1c3d75={'appCode':_0x4cd40e[_0x347b8f(0x110)],'key':_0x4cd40e[_0x347b8f(0x135)],'tags':_0x4cd40e['tags']??undefined,'hasValue':_0x47728c,'valueRedacted':_0x47728c&&!_0xf490d9?.[_0x347b8f(0x119)],'gmtCreate':_0x4cd40e[_0x347b8f(0x14e)],'gmtModified':_0x4cd40e[_0x347b8f(0x12d)]};return _0xf490d9?.[_0x347b8f(0x119)]&&(_0x1c3d75['value']=_0x4cd40e[_0x347b8f(0x117)]??'',_0x1c3d75[_0x347b8f(0x120)]=![]),_0x1c3d75;}export function plannedAppConfig(_0x3902d6){const _0x5df88b=a29_0x5d8c87,_0x378e44=_0x3902d6[_0x5df88b(0x141)]??!![];return{'appCode':_0x3902d6['appCode'],'key':_0x3902d6['key'],'tags':_0x3902d6[_0x5df88b(0x122)]??undefined,'hasValue':_0x378e44,'valueRedacted':_0x378e44};}export function buildMutationData(_0x126935){const _0x1566d5=a29_0x5d8c87;return{'operation':_0x126935[_0x1566d5(0x12e)],'selector':{'appCode':_0x126935[_0x1566d5(0x110)],'key':_0x126935[_0x1566d5(0x135)]},'before':_0x126935['before'],'after':_0x126935[_0x1566d5(0x11d)],'dryRun':_0x126935[_0x1566d5(0x121)],'warnings':_0x126935[_0x1566d5(0x116)]??[]};}export async function withAppConfigApiBoundary(_0x2a3b17,_0x4493d0,_0x5f0e9a){const _0x2c8618=a29_0x5d8c87;try{return await _0x5f0e9a();}catch{const _0x11f06d=[_0x2c8618(0x13c)+_0x4493d0['appCode']];if(_0x4493d0['key'])_0x11f06d[_0x2c8618(0x137)]('key:\x20'+_0x4493d0[_0x2c8618(0x135)]);_0x11f06d[_0x2c8618(0x137)](_0x2c8618(0x11a));throw CliErrors[_0x2c8618(0x112)]('Failed\x20to\x20'+_0x2a3b17+_0x2c8618(0x115),_0x11f06d['join'](';\x20')+'.');}}export function asAppConfigDryRunResult(_0x3045c4,_0x283030){const _0x2f54b3=a29_0x5d8c87;return Object[_0x2f54b3(0x149)](_0x3045c4,{'method':{'value':_0x283030['method'],'enumerable':![]},'url':{'value':_0x283030[_0x2f54b3(0x134)],'enumerable':![]}});}export function assertSingleValueSource(_0x127347){const _0x17926f=a29_0x5d8c87,_0x1da9b0=[];_0x127347[_0x17926f(0x142)]['length']>0x1&&_0x1da9b0[_0x17926f(0x137)]({'kind':'argument','value':_0x127347[_0x17926f(0x142)][_0x17926f(0x10d)](0x1)['join']('\x20')});const _0xf50f92=_0x127347[_0x17926f(0x10e)]('value');_0xf50f92!==undefined&&_0xf50f92!==null&&_0x1da9b0[_0x17926f(0x137)]({'kind':_0x17926f(0x11c),'value':String(_0xf50f92)});_0x127347[_0x17926f(0x130)](_0x17926f(0x13d))&&_0x1da9b0['push']({'kind':_0x17926f(0x13d)});const _0x57d5b1=_0x127347[_0x17926f(0x144)](_0x17926f(0x133))[_0x17926f(0x14a)]();_0x57d5b1&&_0x1da9b0[_0x17926f(0x137)]({'kind':_0x17926f(0x11e),'name':_0x57d5b1});const _0x3dd94b=_0x127347[_0x17926f(0x144)](_0x17926f(0x131))['trim']();_0x3dd94b&&_0x1da9b0['push']({'kind':'file','path':_0x3dd94b});if(_0x1da9b0['length']===0x0)throw CliErrors[_0x17926f(0x128)](_0x17926f(0x13e),'Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.');if(_0x1da9b0[_0x17926f(0x10c)]>0x1)throw CliErrors[_0x17926f(0x128)](_0x17926f(0x14b),_0x17926f(0x12b));return _0x1da9b0[0x0];}export async function assertValueSourceReadable(_0x525df7){const _0x1bcd38=a29_0x5d8c87;if(_0x525df7[_0x1bcd38(0x12f)]===_0x1bcd38(0x11e)&&!(_0x525df7[_0x1bcd38(0x114)]in process.env))throw CliErrors[_0x1bcd38(0x128)](_0x1bcd38(0x10a)+_0x525df7['name']);if(_0x525df7[_0x1bcd38(0x12f)]===_0x1bcd38(0x131))try{await access(_0x525df7[_0x1bcd38(0x146)]);}catch{throw CliErrors[_0x1bcd38(0x128)](_0x1bcd38(0x126)+_0x525df7[_0x1bcd38(0x146)]);}}export async function readAppConfigValue(_0x232497){const _0x33c929=a29_0x5d8c87,_0x4ea424=assertSingleValueSource(_0x232497),_0x25cde3=[];if(_0x4ea424[_0x33c929(0x12f)]===_0x33c929(0x11c))return _0x25cde3[_0x33c929(0x137)](_0x33c929(0x140)),{'value':_0x4ea424[_0x33c929(0x117)]??'','source':_0x4ea424['kind'],'warnings':_0x25cde3};if(_0x4ea424[_0x33c929(0x12f)]===_0x33c929(0x13d))return{'value':await readStdin(),'source':_0x4ea424[_0x33c929(0x12f)],'warnings':_0x25cde3};if(_0x4ea424[_0x33c929(0x12f)]===_0x33c929(0x11e)){if(!(_0x4ea424[_0x33c929(0x114)]in process.env))throw CliErrors['validation'](_0x33c929(0x10a)+_0x4ea424[_0x33c929(0x114)]);return{'value':process.env[_0x4ea424.name]??'','source':_0x4ea424[_0x33c929(0x12f)],'warnings':_0x25cde3};}return{'value':await readFile(_0x4ea424[_0x33c929(0x146)],_0x33c929(0x143)),'source':_0x4ea424['kind'],'warnings':_0x25cde3};}function readStdin(){return new Promise((_0x3bc87c,_0x18ef87)=>{const _0x15faa2=a29_0x1635;let _0x4c7401='';process[_0x15faa2(0x13d)][_0x15faa2(0x118)](_0x15faa2(0x143)),process[_0x15faa2(0x13d)]['on'](_0x15faa2(0x10f),_0x1c84d2=>{_0x4c7401+=_0x1c84d2;}),process['stdin'][_0x15faa2(0x147)](_0x15faa2(0x136),()=>_0x3bc87c(_0x4c7401)),process['stdin'][_0x15faa2(0x147)](_0x15faa2(0x11b),_0x18ef87);});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a30_0x2b54(){const _0x5e83a1=['logout','✓\x20Logged\x20out','boolean','6GZxhYL','log','yes','8342wbPTYF','Login\x20via\x20browser','316629YiBmGe','bool','383HMUXhn','login','!\x20Not\x20logged\x20in','439340VafNak','330CsktMH','5365105wnzOfo','4137595rQPTAv','12681624jsCLTW','9904302OeZKCH','Clear\x20login\x20session'];a30_0x2b54=function(){return _0x5e83a1;};return a30_0x2b54();}const a30_0x2137db=a30_0x5b9f;function a30_0x5b9f(_0x38a4ed,_0x498545){_0x38a4ed=_0x38a4ed-0x134;const _0x2b5488=a30_0x2b54();let _0x5b9f13=_0x2b5488[_0x38a4ed];return _0x5b9f13;}(function(_0x51b8b0,_0x56fa14){const _0x3a85a4=a30_0x5b9f,_0x20fff7=_0x51b8b0();while(!![]){try{const _0x19e5e9=parseInt(_0x3a85a4(0x135))/0x1*(-parseInt(_0x3a85a4(0x145))/0x2)+parseInt(_0x3a85a4(0x142))/0x3*(-parseInt(_0x3a85a4(0x138))/0x4)+-parseInt(_0x3a85a4(0x13a))/0x5+parseInt(_0x3a85a4(0x13d))/0x6+-parseInt(_0x3a85a4(0x13b))/0x7+parseInt(_0x3a85a4(0x13c))/0x8+parseInt(_0x3a85a4(0x147))/0x9*(parseInt(_0x3a85a4(0x139))/0xa);if(_0x19e5e9===_0x56fa14)break;else _0x20fff7['push'](_0x20fff7['shift']());}catch(_0x104a09){_0x20fff7['push'](_0x20fff7['shift']());}}}(a30_0x2b54,0xdf8a8));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':'auth','command':a30_0x2137db(0x136),'description':a30_0x2137db(0x146),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a30_0x2137db(0x144),'type':a30_0x2137db(0x141),'description':'Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','default':![]}],async 'execute'(_0x2581e7){const _0x459432=a30_0x2137db,{runAuthServer:_0x5ef75c}=await import('../../auth/auth-server-ui.js');return await _0x5ef75c({'autoYes':_0x2581e7[_0x459432(0x134)](_0x459432(0x144)),'nonInteractive':_0x2581e7['nonInteractive']}),{'ok':!![]};}},{'service':'auth','command':a30_0x2137db(0x13f),'description':a30_0x2137db(0x13e),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2a1184){const _0x48b5d2=a30_0x2137db;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x48b5d2(0x143)](_0x48b5d2(0x140))):console[_0x48b5d2(0x143)](_0x48b5d2(0x137)),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a31_0x19dd75=a31_0x3161;(function(_0x3c19e3,_0x2595ae){const _0x4559dd=a31_0x3161,_0x3de137=_0x3c19e3();while(!![]){try{const _0x3d4e1f=-parseInt(_0x4559dd(0x1d7))/0x1*(parseInt(_0x4559dd(0x1d8))/0x2)+parseInt(_0x4559dd(0x19f))/0x3+-parseInt(_0x4559dd(0x1c5))/0x4+parseInt(_0x4559dd(0x1e8))/0x5+-parseInt(_0x4559dd(0x1e5))/0x6*(-parseInt(_0x4559dd(0x1ea))/0x7)+parseInt(_0x4559dd(0x1d3))/0x8*(parseInt(_0x4559dd(0x1a2))/0x9)+-parseInt(_0x4559dd(0x1b2))/0xa;if(_0x3d4e1f===_0x2595ae)break;else _0x3de137['push'](_0x3de137['shift']());}catch(_0x55b014){_0x3de137['push'](_0x3de137['shift']());}}}(a31_0x3be6,0x958d1));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_0x3161(_0x1d38d8,_0x96ed8b){_0x1d38d8=_0x1d38d8-0x195;const _0x3be609=a31_0x3be6();let _0x3161ed=_0x3be609[_0x1d38d8];return _0x3161ed;}import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';import{isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';function a31_0x3be6(){const _0x327be3=['134376RYrCAJ','stdin','close','length','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','Created\x20','trim','Operation\x20type\x20(HOOK\x20only)','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','HOOK',']\x20(','Trigger\x20node\x20(HOOK\x20only)','1500OoAwFM','operation-type','map','5973070JtXimV','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/','29918htjfjb','operationType','HOOK\x20requires\x20alias/operation/node\x20options.','string','datasetcode','write','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','datasetCode','find','Operation\x20type\x20\x22','\x0a\x20*\x20[脚本名称]\x20','Available\x20aliases:\x20','type','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','functionNode','File\x20already\x20exists:\x20','2822934vkFlik','name','source','63gIrdVU','.js','TODO:\x20add\x20script\x20description','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','alias','Select\x20dataset:','question','.js\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Input\x20parameters.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Processing\x20result.\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','\x22.\x20','includes','\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','nonInteractive','Script\x20description','\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','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','parseInt','34038600MHHkJm','ENDPOINT','Function\x20name\x20(valid\x20JS\x20identifier)','\x22\x20not\x20found\x20for\x20dataset\x20','\x20function:\x20','\x20api\x20pull`\x20to\x20refresh.','bff','Invalid\x20dataset\x20selection.','str','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','join','No\x20api.ts\x20found.\x20Run\x20`','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','appCode','after','apiDir','utf8','Alias\x20\x22','before','833256EXsusR','Invalid\x20function\x20name\x20\x22','COMMON','No\x20operation\x20types\x20found\x20for\x20dataset\x20','validation','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','stderr','description','function-node','tableName','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','\x0a\x20*\x20[触发节点]\x20','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','1396808CnVsTi','Available:\x20','code','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','3MNMxgf'];a31_0x3be6=function(){return _0x327be3;};return a31_0x3be6();}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const bffCreate={'service':a31_0x19dd75(0x1b8),'command':'create','description':'Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','risk':a31_0x19dd75(0x1ef),'flags':[{'name':a31_0x19dd75(0x19b),'type':a31_0x19dd75(0x1ed),'required':!![],'enum':[a31_0x19dd75(0x1c7),a31_0x19dd75(0x1b3),a31_0x19dd75(0x1e2)],'description':'Script\x20type'},{'name':a31_0x19dd75(0x1a0),'type':a31_0x19dd75(0x1ed),'required':!![],'description':a31_0x19dd75(0x1b4)},{'name':a31_0x19dd75(0x1cc),'type':'string','description':a31_0x19dd75(0x1ae)},{'name':a31_0x19dd75(0x1a6),'type':'string','description':a31_0x19dd75(0x1b0)},{'name':a31_0x19dd75(0x1ee),'type':a31_0x19dd75(0x1ed),'description':a31_0x19dd75(0x1be)},{'name':a31_0x19dd75(0x1e6),'type':'string','description':a31_0x19dd75(0x1e0)},{'name':a31_0x19dd75(0x1cd),'type':a31_0x19dd75(0x1ed),'description':a31_0x19dd75(0x1e4),'enum':[a31_0x19dd75(0x1c4),a31_0x19dd75(0x1c0)]}],async 'validate'(_0xd98256){const _0x1f6a11=a31_0x19dd75,_0x17af0a=_0xd98256[_0x1f6a11(0x1ba)]('name');if(!isValidBffFunctionName(_0x17af0a))throw CliErrors[_0x1f6a11(0x1c9)](_0x1f6a11(0x1c6)+_0x17af0a+'\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).');},async 'execute'(_0x1a0083){const _0x130d60=a31_0x19dd75,_0x193455=loadBffProjectConfig(_0x1a0083['appCode']),_0x44fc4b=_0x1a0083[_0x130d60(0x1ba)](_0x130d60(0x19b)),_0x564ddf=_0x1a0083[_0x130d60(0x1ba)](_0x130d60(0x1a0)),_0x39769e=_0x1a0083[_0x130d60(0x1ba)]('description')||undefined,_0x2eda95=_0x44fc4b===_0x130d60(0x1e2)?await resolveHookOptions(_0x193455,_0x1a0083):undefined,_0x28acce=buildFilePath(_0x193455,_0x44fc4b,_0x564ddf,_0x2eda95);if(await fileExists(_0x28acce))throw CliErrors[_0x130d60(0x1c9)](_0x130d60(0x19e)+_0x28acce);await mkdir(dirname(_0x28acce),{'recursive':!![]});const _0x18b0fd=generateTemplate(_0x44fc4b,_0x564ddf,_0x1a0083[_0x130d60(0x1bf)],_0x39769e,_0x2eda95);await writeFile(_0x28acce,_0x18b0fd,_0x130d60(0x1c2));const _0x2c7246={'type':_0x44fc4b,'name':_0x564ddf,'path':_0x28acce};if(_0x39769e)_0x2c7246[_0x130d60(0x1cc)]=_0x39769e;if(_0x2eda95){if(_0x2eda95[_0x130d60(0x1a6)])_0x2c7246[_0x130d60(0x1a6)]=_0x2eda95[_0x130d60(0x1a6)];_0x2c7246[_0x130d60(0x196)]=_0x2eda95[_0x130d60(0x196)],_0x2c7246[_0x130d60(0x1eb)]=_0x2eda95[_0x130d60(0x1eb)],_0x2c7246['functionNode']=_0x2eda95[_0x130d60(0x19d)];}return{'ok':!![],'data':_0x2c7246,'message':_0x130d60(0x1de)+_0x44fc4b+_0x130d60(0x1b6)+_0x564ddf};}};async function resolveHookOptions(_0x29289d,_0x447a5a){const _0x2f94e0=a31_0x19dd75,_0x3e66c5=loadAliasMap(_0x447a5a['apiDir'],undefined,resolveApiFilePath(_0x447a5a[_0x2f94e0(0x1c1)],_0x447a5a[_0x2f94e0(0x1bf)])),_0x2e1126=_0x3e66c5[_0x2f94e0(0x1db)]>0x0;let _0x3204f7,_0x435be3,_0x33083f;const _0x123935=_0x447a5a[_0x2f94e0(0x1ba)](_0x2f94e0(0x1a6)),_0x26556c=_0x447a5a[_0x2f94e0(0x1ba)](_0x2f94e0(0x1ee));if(_0x123935){const _0x2cdd7d=resolveAlias(_0x447a5a[_0x2f94e0(0x1c1)],_0x123935,undefined,resolveApiFilePath(_0x447a5a[_0x2f94e0(0x1c1)],_0x447a5a[_0x2f94e0(0x1bf)]));if(!_0x2cdd7d){const _0x3524bd=_0x2e1126?_0x2f94e0(0x19a)+_0x3e66c5[_0x2f94e0(0x1e7)](_0x3fadfa=>_0x3fadfa[_0x2f94e0(0x1a6)])[_0x2f94e0(0x1bc)](',\x20'):_0x2f94e0(0x1bd)+CLI_BIN_NAME+_0x2f94e0(0x1bb);throw CliErrors[_0x2f94e0(0x1c9)](_0x2f94e0(0x1c3)+_0x123935+'\x22\x20not\x20found.\x20'+_0x3524bd);}_0x3204f7=_0x123935,_0x435be3=_0x2cdd7d;}else{if(_0x26556c){_0x435be3=_0x26556c;const _0x30e0c0=_0x3e66c5[_0x2f94e0(0x197)](_0x4b5c95=>_0x4b5c95[_0x2f94e0(0x196)]===_0x26556c);_0x3204f7=_0x30e0c0?.[_0x2f94e0(0x1a6)];}else{if(_0x447a5a[_0x2f94e0(0x1ad)])throw CliErrors[_0x2f94e0(0x1c9)](_0x2f94e0(0x195));else{if(_0x2e1126){const _0x208250=_0x3e66c5[_0x2f94e0(0x1e7)](_0x346552=>_0x346552[_0x2f94e0(0x1a6)]+'\x20('+_0x346552[_0x2f94e0(0x1ce)]+')'),_0x3dbce3=await promptSelect(_0x2f94e0(0x1a7),_0x208250),_0x183632=_0x3e66c5[_0x3dbce3];if(!_0x183632)throw CliErrors['validation']('Invalid\x20dataset\x20selection.');_0x3204f7=_0x183632[_0x2f94e0(0x1a6)],_0x435be3=_0x183632[_0x2f94e0(0x196)];}else{const _0x5a5fa4=await listDatasets(_0x447a5a['appCode']);if(_0x5a5fa4[_0x2f94e0(0x1db)]===0x0)throw CliErrors[_0x2f94e0(0x1c9)]('No\x20datasets\x20found\x20for\x20this\x20app.');const _0x25b666=_0x5a5fa4[_0x2f94e0(0x1e7)](_0x5bce7b=>_0x5bce7b[_0x2f94e0(0x1a0)]+'\x20['+(_0x5bce7b[_0x2f94e0(0x1a1)]??'UNKNOWN')+_0x2f94e0(0x1e3)+_0x5bce7b[_0x2f94e0(0x1d5)]+')'),_0x419448=await promptSelect('Select\x20dataset:',_0x25b666),_0xa6b474=_0x5a5fa4[_0x419448];if(!_0xa6b474)throw CliErrors[_0x2f94e0(0x1c9)](_0x2f94e0(0x1b9));_0x435be3=_0xa6b474[_0x2f94e0(0x1d5)],_0x3204f7=undefined;}}}}const _0x356809=await listDatasets(_0x447a5a[_0x2f94e0(0x1bf)]),_0xe64b69=_0x356809[_0x2f94e0(0x197)](_0x16148f=>_0x16148f[_0x2f94e0(0x1d5)]===_0x435be3);if(!_0xe64b69)throw CliErrors[_0x2f94e0(0x1c9)]('Dataset\x20not\x20found\x20for\x20code\x20\x22'+_0x435be3+_0x2f94e0(0x1aa)+(_0x3204f7?_0x2f94e0(0x1ca)+CLI_BIN_NAME+_0x2f94e0(0x1b7):''));_0x33083f=_0xe64b69['id'];const _0x426baa=_0x3204f7??_0x435be3,_0x51dc02=await listBffDatasetOperations(_0x447a5a['appCode'],_0x33083f),_0x4b2061=_0x51dc02?Object['keys'](_0x51dc02):[];if(_0x4b2061['length']===0x0)throw CliErrors[_0x2f94e0(0x1c9)](_0x2f94e0(0x1c8)+_0x426baa+'.');let _0x31f85d;const _0x5e08b2=_0x447a5a[_0x2f94e0(0x1ba)](_0x2f94e0(0x1e6));if(_0x5e08b2){if(!_0x4b2061[_0x2f94e0(0x1ab)](_0x5e08b2))throw CliErrors['validation'](_0x2f94e0(0x198)+_0x5e08b2+_0x2f94e0(0x1b5)+_0x426baa+'.\x20'+(_0x2f94e0(0x1d4)+_0x4b2061[_0x2f94e0(0x1bc)](',\x20')));_0x31f85d=_0x5e08b2;}else{if(_0x447a5a[_0x2f94e0(0x1ad)])throw CliErrors[_0x2f94e0(0x1c9)](_0x2f94e0(0x1d6));const _0x4ba27e=await promptSelect('Select\x20operation\x20type:',_0x4b2061);_0x31f85d=_0x4b2061[_0x4ba27e]??_0x4b2061[0x0];}let _0x5e542c=normalizeHookFunctionNode(_0x447a5a['str']('function-node'));if(!_0x5e542c){if(_0x447a5a[_0x2f94e0(0x1ba)](_0x2f94e0(0x1cd)))throw CliErrors[_0x2f94e0(0x1c9)](_0x2f94e0(0x1a5));if(_0x447a5a[_0x2f94e0(0x1ad)])throw CliErrors['validation']('--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');const _0x401d49=await promptSelect('Select\x20trigger\x20node:',[_0x2f94e0(0x1c4),'after']);_0x5e542c=[_0x2f94e0(0x1c4),_0x2f94e0(0x1c0)][_0x401d49]??_0x2f94e0(0x1c4);}return{'alias':_0x3204f7,'datasetCode':_0x435be3,'datasetId':_0x33083f,'operationType':_0x31f85d,'functionNode':_0x5e542c};}async function promptSelect(_0x1670db,_0x11674d){const _0x49d9a5=a31_0x19dd75;if(_0x11674d[_0x49d9a5(0x1db)]===0x1)return 0x0;for(const [_0x1ff46c,_0x51d9cb]of _0x11674d['entries']()){process[_0x49d9a5(0x1cb)][_0x49d9a5(0x1ef)]('\x20\x20'+(_0x1ff46c+0x1)+'.\x20'+_0x51d9cb+'\x0a');}const _0x515071=createInterface({'input':process[_0x49d9a5(0x1d9)],'output':process[_0x49d9a5(0x1cb)]});while(!![]){const _0x3c168d=await new Promise(_0x50126=>{const _0x2d93b4=_0x49d9a5;_0x515071[_0x2d93b4(0x1a8)](_0x1670db+'\x20',_0x50126);}),_0x119726=Number[_0x49d9a5(0x1b1)](_0x3c168d['trim'](),0xa);if(Number['isInteger'](_0x119726)&&_0x119726>=0x1&&_0x119726<=_0x11674d[_0x49d9a5(0x1db)])return _0x515071[_0x49d9a5(0x1da)](),_0x119726-0x1;process[_0x49d9a5(0x1cb)][_0x49d9a5(0x1ef)](_0x49d9a5(0x1e1)+_0x11674d[_0x49d9a5(0x1db)]+'.\x0a');}}function buildFilePath(_0x2b8249,_0x25afa6,_0x4eb0c8,_0x2aaeb9){const _0x20d1f2=a31_0x19dd75;if(_0x25afa6===_0x20d1f2(0x1e2)){if(!_0x2aaeb9)throw CliErrors[_0x20d1f2(0x1c9)](_0x20d1f2(0x1ec));const _0x338f33=_0x2aaeb9[_0x20d1f2(0x1a6)]??_0x2aaeb9[_0x20d1f2(0x196)];return join(_0x2b8249['scriptsRootDir'],_0x20d1f2(0x1e2),_0x338f33,_0x2aaeb9[_0x20d1f2(0x1eb)],_0x2aaeb9['functionNode'],_0x4eb0c8+_0x20d1f2(0x1a3));}return join(_0x2b8249['scriptsRootDir'],_0x25afa6,_0x4eb0c8+_0x20d1f2(0x1a3));}export function generateTemplate(_0x289a61,_0x35c121,_0x234673,_0x442bb8,_0xa79dfb){const _0x36c459=a31_0x19dd75,_0xe45cc2=_0x442bb8?.[_0x36c459(0x1df)]()||_0x36c459(0x1a4);if(_0x289a61===_0x36c459(0x1c7))return _0x36c459(0x1d0)+_0xe45cc2+_0x36c459(0x199)+_0x35c121+_0x36c459(0x19c)+_0x35c121+_0x36c459(0x1a9)+_0x35c121+_0x36c459(0x1d2);if(_0x289a61===_0x36c459(0x1b3))return'/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20'+_0xe45cc2+_0x36c459(0x1e9)+_0x234673+'/'+_0x35c121+_0x36c459(0x1af)+_0x35c121+_0x36c459(0x1d2);if(!_0xa79dfb)throw CliErrors[_0x36c459(0x1c9)](_0x36c459(0x1dc));return _0x36c459(0x1dd)+_0xe45cc2+_0x36c459(0x1cf)+_0x234673+'/'+_0xa79dfb[_0x36c459(0x196)]+'/'+_0xa79dfb[_0x36c459(0x1eb)]+_0x36c459(0x1d1)+_0xa79dfb[_0x36c459(0x19d)]+_0x36c459(0x1ac)+_0x35c121+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';}
|
|
1
|
+
const a31_0x59421d=a31_0x584f;(function(_0x4d3b3d,_0x241023){const _0xb747c6=a31_0x584f,_0x2f665f=_0x4d3b3d();while(!![]){try{const _0x5194b3=-parseInt(_0xb747c6(0x157))/0x1+parseInt(_0xb747c6(0x142))/0x2*(parseInt(_0xb747c6(0x165))/0x3)+parseInt(_0xb747c6(0x175))/0x4*(parseInt(_0xb747c6(0x131))/0x5)+-parseInt(_0xb747c6(0x14c))/0x6*(parseInt(_0xb747c6(0x130))/0x7)+parseInt(_0xb747c6(0x13f))/0x8*(parseInt(_0xb747c6(0x138))/0x9)+-parseInt(_0xb747c6(0x166))/0xa+parseInt(_0xb747c6(0x183))/0xb*(parseInt(_0xb747c6(0x16b))/0xc);if(_0x5194b3===_0x241023)break;else _0x2f665f['push'](_0x2f665f['shift']());}catch(_0x42d1f8){_0x2f665f['push'](_0x2f665f['shift']());}}}(a31_0x5393,0xc3596));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';import{dirname,join}from'node:path';import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';import{isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const bffCreate={'service':'bff','command':a31_0x59421d(0x143),'description':'Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','risk':a31_0x59421d(0x162),'flags':[{'name':a31_0x59421d(0x134),'type':a31_0x59421d(0x15b),'required':!![],'enum':[a31_0x59421d(0x147),a31_0x59421d(0x150),a31_0x59421d(0x16a)],'description':a31_0x59421d(0x16d)},{'name':a31_0x59421d(0x17e),'type':a31_0x59421d(0x15b),'required':!![],'description':'Function\x20name\x20(valid\x20JS\x20identifier)'},{'name':a31_0x59421d(0x15e),'type':a31_0x59421d(0x15b),'description':a31_0x59421d(0x13a)},{'name':a31_0x59421d(0x137),'type':a31_0x59421d(0x15b),'description':a31_0x59421d(0x17b)},{'name':a31_0x59421d(0x13b),'type':a31_0x59421d(0x15b),'description':a31_0x59421d(0x14a)},{'name':a31_0x59421d(0x12f),'type':a31_0x59421d(0x15b),'description':a31_0x59421d(0x13c)},{'name':'function-node','type':a31_0x59421d(0x15b),'description':'Trigger\x20node\x20(HOOK\x20only)','enum':[a31_0x59421d(0x144),a31_0x59421d(0x181)]}],async 'validate'(_0x1128a6){const _0x1496f7=a31_0x59421d,_0xf511c2=_0x1128a6['str'](_0x1496f7(0x17e));if(!isValidBffFunctionName(_0xf511c2))throw CliErrors[_0x1496f7(0x139)](_0x1496f7(0x178)+_0xf511c2+'\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).');},async 'execute'(_0x8bf5b){const _0x3b4636=a31_0x59421d,_0x48a31c=loadBffProjectConfig(_0x8bf5b['appCode']),_0x21de18=_0x8bf5b[_0x3b4636(0x161)](_0x3b4636(0x134)),_0x7a463c=_0x8bf5b[_0x3b4636(0x161)]('name'),_0x5233db=_0x8bf5b['str'](_0x3b4636(0x15e))||undefined,_0x1848a3=_0x21de18===_0x3b4636(0x16a)?await resolveHookOptions(_0x48a31c,_0x8bf5b):undefined,_0x5478ba=buildFilePath(_0x48a31c,_0x21de18,_0x7a463c,_0x1848a3);if(await fileExists(_0x5478ba))throw CliErrors['validation'](_0x3b4636(0x172)+_0x5478ba);await mkdir(dirname(_0x5478ba),{'recursive':!![]});const _0x5ee439=generateTemplate(_0x21de18,_0x7a463c,_0x8bf5b[_0x3b4636(0x182)],_0x5233db,_0x1848a3);await writeFile(_0x5478ba,_0x5ee439,'utf8');const _0x3706e2={'type':_0x21de18,'name':_0x7a463c,'path':_0x5478ba};if(_0x5233db)_0x3706e2['description']=_0x5233db;if(_0x1848a3){if(_0x1848a3[_0x3b4636(0x137)])_0x3706e2[_0x3b4636(0x137)]=_0x1848a3[_0x3b4636(0x137)];_0x3706e2['datasetCode']=_0x1848a3[_0x3b4636(0x17c)],_0x3706e2['operationType']=_0x1848a3[_0x3b4636(0x160)],_0x3706e2['functionNode']=_0x1848a3['functionNode'];}return{'ok':!![],'data':_0x3706e2,'message':'Created\x20'+_0x21de18+'\x20function:\x20'+_0x7a463c};}};function a31_0x5393(){const _0x89440b=['2020588FddBAR','/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','Invalid\x20function\x20name\x20\x22','UNKNOWN','\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','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','datasetCode','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','name','TODO:\x20add\x20script\x20description','\x20api\x20pull`\x20to\x20refresh.','after','appCode','2641078NzUcSD','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','close','question','operation-type','7FhkAUX','5fXisFy','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','includes','type','tableName','source','alias','207621cxtjms','validation','Script\x20description','datasetcode','Operation\x20type\x20(HOOK\x20only)','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','Available\x20aliases:\x20','504rTCCVe','stdin','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','1115522yaevBg','create','before','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','COMMON','apiDir','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','scriptsRootDir','6453222SyUvTT','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/','\x0a\x20*\x20[触发节点]\x20','Operation\x20type\x20\x22','ENDPOINT','find','Select\x20operation\x20type:','Select\x20dataset:','code','nonInteractive','No\x20datasets\x20found\x20for\x20this\x20app.','1431868BMoCgw','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','\x22\x20not\x20found.\x20','No\x20operation\x20types\x20found\x20for\x20dataset\x20','string','map','stderr','description','Alias\x20\x22','operationType','str','write','functionNode','keys','6zhAKdj','7268530Zmiagi','\x22.\x20','join','function-node','HOOK','48xnWxEI','/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','Script\x20type','trim','/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','length','Dataset\x20not\x20found\x20for\x20code\x20\x22','File\x20already\x20exists:\x20','Invalid\x20dataset\x20selection.','No\x20api.ts\x20found.\x20Run\x20`'];a31_0x5393=function(){return _0x89440b;};return a31_0x5393();}async function resolveHookOptions(_0x56a2f1,_0x1f7b99){const _0x20815d=a31_0x59421d,_0x334c17=loadAliasMap(_0x1f7b99['apiDir'],undefined,resolveApiFilePath(_0x1f7b99['apiDir'],_0x1f7b99[_0x20815d(0x182)])),_0x4ac436=_0x334c17[_0x20815d(0x170)]>0x0;let _0x494957,_0x3fbbc7,_0x7ab65;const _0xb7201e=_0x1f7b99[_0x20815d(0x161)](_0x20815d(0x137)),_0x1ffa4a=_0x1f7b99[_0x20815d(0x161)](_0x20815d(0x13b));if(_0xb7201e){const _0x438b65=resolveAlias(_0x1f7b99['apiDir'],_0xb7201e,undefined,resolveApiFilePath(_0x1f7b99[_0x20815d(0x148)],_0x1f7b99['appCode']));if(!_0x438b65){const _0x540c26=_0x4ac436?_0x20815d(0x13e)+_0x334c17['map'](_0x5b8cf6=>_0x5b8cf6[_0x20815d(0x137)])[_0x20815d(0x168)](',\x20'):_0x20815d(0x174)+CLI_BIN_NAME+_0x20815d(0x158);throw CliErrors['validation'](_0x20815d(0x15f)+_0xb7201e+_0x20815d(0x159)+_0x540c26);}_0x494957=_0xb7201e,_0x3fbbc7=_0x438b65;}else{if(_0x1ffa4a){_0x3fbbc7=_0x1ffa4a;const _0x4d4542=_0x334c17[_0x20815d(0x151)](_0x4a4aba=>_0x4a4aba[_0x20815d(0x17c)]===_0x1ffa4a);_0x494957=_0x4d4542?.[_0x20815d(0x137)];}else{if(_0x1f7b99[_0x20815d(0x155)])throw CliErrors[_0x20815d(0x139)]('--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');else{if(_0x4ac436){const _0x49ac8c=_0x334c17[_0x20815d(0x15c)](_0x4a07ad=>_0x4a07ad['alias']+'\x20('+_0x4a07ad[_0x20815d(0x135)]+')'),_0x395ac0=await promptSelect(_0x20815d(0x153),_0x49ac8c),_0x51c7b2=_0x334c17[_0x395ac0];if(!_0x51c7b2)throw CliErrors[_0x20815d(0x139)](_0x20815d(0x173));_0x494957=_0x51c7b2[_0x20815d(0x137)],_0x3fbbc7=_0x51c7b2[_0x20815d(0x17c)];}else{const _0x730dd2=await listDatasets(_0x1f7b99['appCode']);if(_0x730dd2[_0x20815d(0x170)]===0x0)throw CliErrors[_0x20815d(0x139)](_0x20815d(0x156));const _0x5b0afb=_0x730dd2[_0x20815d(0x15c)](_0x571d4f=>_0x571d4f['name']+'\x20['+(_0x571d4f[_0x20815d(0x136)]??_0x20815d(0x179))+']\x20('+_0x571d4f[_0x20815d(0x154)]+')'),_0x362a56=await promptSelect(_0x20815d(0x153),_0x5b0afb),_0x47e6da=_0x730dd2[_0x362a56];if(!_0x47e6da)throw CliErrors[_0x20815d(0x139)]('Invalid\x20dataset\x20selection.');_0x3fbbc7=_0x47e6da['code'],_0x494957=undefined;}}}}const _0x4556ad=await listDatasets(_0x1f7b99['appCode']),_0x3e73bc=_0x4556ad[_0x20815d(0x151)](_0x3ef2db=>_0x3ef2db[_0x20815d(0x154)]===_0x3fbbc7);if(!_0x3e73bc)throw CliErrors[_0x20815d(0x139)](_0x20815d(0x171)+_0x3fbbc7+_0x20815d(0x167)+(_0x494957?_0x20815d(0x141)+CLI_BIN_NAME+_0x20815d(0x180):''));_0x7ab65=_0x3e73bc['id'];const _0x50aa6a=_0x494957??_0x3fbbc7,_0xdfd478=await listBffDatasetOperations(_0x1f7b99[_0x20815d(0x182)],_0x7ab65),_0xea2872=_0xdfd478?Object[_0x20815d(0x164)](_0xdfd478):[];if(_0xea2872[_0x20815d(0x170)]===0x0)throw CliErrors[_0x20815d(0x139)](_0x20815d(0x15a)+_0x50aa6a+'.');let _0x92cd4;const _0x89e134=_0x1f7b99[_0x20815d(0x161)]('operation-type');if(_0x89e134){if(!_0xea2872[_0x20815d(0x133)](_0x89e134))throw CliErrors[_0x20815d(0x139)](_0x20815d(0x14f)+_0x89e134+'\x22\x20not\x20found\x20for\x20dataset\x20'+_0x50aa6a+'.\x20'+('Available:\x20'+_0xea2872[_0x20815d(0x168)](',\x20')));_0x92cd4=_0x89e134;}else{if(_0x1f7b99['nonInteractive'])throw CliErrors[_0x20815d(0x139)](_0x20815d(0x177));const _0x423bd4=await promptSelect(_0x20815d(0x152),_0xea2872);_0x92cd4=_0xea2872[_0x423bd4]??_0xea2872[0x0];}let _0x38ec9d=normalizeHookFunctionNode(_0x1f7b99[_0x20815d(0x161)](_0x20815d(0x169)));if(!_0x38ec9d){if(_0x1f7b99[_0x20815d(0x161)](_0x20815d(0x169)))throw CliErrors[_0x20815d(0x139)](_0x20815d(0x145));if(_0x1f7b99[_0x20815d(0x155)])throw CliErrors[_0x20815d(0x139)](_0x20815d(0x132));const _0x5206bd=await promptSelect('Select\x20trigger\x20node:',[_0x20815d(0x144),_0x20815d(0x181)]);_0x38ec9d=['before',_0x20815d(0x181)][_0x5206bd]??_0x20815d(0x144);}return{'alias':_0x494957,'datasetCode':_0x3fbbc7,'datasetId':_0x7ab65,'operationType':_0x92cd4,'functionNode':_0x38ec9d};}function a31_0x584f(_0x845f8,_0x1ee76e){_0x845f8=_0x845f8-0x12d;const _0x5393d0=a31_0x5393();let _0x584ff7=_0x5393d0[_0x845f8];return _0x584ff7;}async function promptSelect(_0x493565,_0x511d14){const _0x539bed=a31_0x59421d;if(_0x511d14[_0x539bed(0x170)]===0x1)return 0x0;for(const [_0x173638,_0x57c3b3]of _0x511d14['entries']()){process['stderr'][_0x539bed(0x162)]('\x20\x20'+(_0x173638+0x1)+'.\x20'+_0x57c3b3+'\x0a');}const _0x2f9c7d=createInterface({'input':process[_0x539bed(0x140)],'output':process[_0x539bed(0x15d)]});while(!![]){const _0x21b7f4=await new Promise(_0xeed161=>{const _0x1e8305=_0x539bed;_0x2f9c7d[_0x1e8305(0x12e)](_0x493565+'\x20',_0xeed161);}),_0x23b583=Number['parseInt'](_0x21b7f4[_0x539bed(0x16e)](),0xa);if(Number['isInteger'](_0x23b583)&&_0x23b583>=0x1&&_0x23b583<=_0x511d14[_0x539bed(0x170)])return _0x2f9c7d[_0x539bed(0x12d)](),_0x23b583-0x1;process[_0x539bed(0x15d)][_0x539bed(0x162)](_0x539bed(0x17d)+_0x511d14[_0x539bed(0x170)]+'.\x0a');}}function buildFilePath(_0x1075d0,_0xb1f725,_0x3ac43f,_0x105960){const _0x413f19=a31_0x59421d;if(_0xb1f725===_0x413f19(0x16a)){if(!_0x105960)throw CliErrors[_0x413f19(0x139)]('HOOK\x20requires\x20alias/operation/node\x20options.');const _0x2d8f33=_0x105960[_0x413f19(0x137)]??_0x105960[_0x413f19(0x17c)];return join(_0x1075d0[_0x413f19(0x14b)],'HOOK',_0x2d8f33,_0x105960[_0x413f19(0x160)],_0x105960[_0x413f19(0x163)],_0x3ac43f+'.js');}return join(_0x1075d0[_0x413f19(0x14b)],_0xb1f725,_0x3ac43f+'.js');}export function generateTemplate(_0x462d04,_0x5de1a5,_0x4fb408,_0x89d28d,_0x127921){const _0x5e3b7c=a31_0x59421d,_0x5d1e30=_0x89d28d?.[_0x5e3b7c(0x16e)]()||_0x5e3b7c(0x17f);if(_0x462d04===_0x5e3b7c(0x147))return _0x5e3b7c(0x16c)+_0x5d1e30+'\x0a\x20*\x20[脚本名称]\x20'+_0x5de1a5+_0x5e3b7c(0x149)+_0x5de1a5+'.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'+_0x5de1a5+_0x5e3b7c(0x13d);if(_0x462d04===_0x5e3b7c(0x150))return _0x5e3b7c(0x16f)+_0x5d1e30+_0x5e3b7c(0x14d)+_0x4fb408+'/'+_0x5de1a5+_0x5e3b7c(0x17a)+_0x5de1a5+_0x5e3b7c(0x13d);if(!_0x127921)throw CliErrors['validation'](_0x5e3b7c(0x184));return _0x5e3b7c(0x176)+_0x5d1e30+_0x5e3b7c(0x146)+_0x4fb408+'/'+_0x127921[_0x5e3b7c(0x17c)]+'/'+_0x127921[_0x5e3b7c(0x160)]+_0x5e3b7c(0x14e)+_0x127921[_0x5e3b7c(0x163)]+'\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'+_0x5de1a5+_0x5e3b7c(0x13d);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a32_0x26f3e6=a32_0x5357;(function(_0x5848fe,_0x47e7c0){const _0x3043e6=a32_0x5357,_0x3f1bee=_0x5848fe();while(!![]){try{const _0x1e798f=parseInt(_0x3043e6(0x155))/0x1+-parseInt(_0x3043e6(0x149))/0x2*(-parseInt(_0x3043e6(0x17d))/0x3)+parseInt(_0x3043e6(0x15a))/0x4+-parseInt(_0x3043e6(0x16b))/0x5*(-parseInt(_0x3043e6(0x16a))/0x6)+-parseInt(_0x3043e6(0x162))/0x7+-parseInt(_0x3043e6(0x17b))/0x8*(-parseInt(_0x3043e6(0x175))/0x9)+parseInt(_0x3043e6(0x151))/0xa*(-parseInt(_0x3043e6(0x152))/0xb);if(_0x1e798f===_0x47e7c0)break;else _0x3f1bee['push'](_0x3f1bee['shift']());}catch(_0x515263){_0x3f1bee['push'](_0x3f1bee['shift']());}}}(a32_0x1d0d,0x29b61));function a32_0x1d0d(){const _0x4223d4=['string','startsWith','26914hyrrxL','Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','<timestamp>','Multiple\x20functions\x20match\x20\x22','Deleted\x20','Lock\x20scope\x20for\x20app\x20\x22','trashDir','appCode','660150rpCzut','77sDuUyx','\x20(local\x20file\x20moved\x20to\x20trash)','POST','236853LSnBxc','\x20\x20-\x20','length','scriptsRootDir','str','316444chszZD','high-risk-write','projectRoot','lockFilePath','trashedTo','includes','toISOString','split','284382ClifmC','keys','BFF\x20lock\x20file\x20not\x20found.','bff','find','BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','target','\x22\x20not\x20found\x20after\x20ensureLockScope.','235236lCOvmD','5wnganM','/api/management/library/scripts/delete','remoteId','replace','delete','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','Would\x20delete\x20','join','validation','No\x20lock\x20entry\x20found\x20for\x20\x22','806769BfETLL','functions','Function\x20not\x20found:\x20','scriptsRoot','apps','parse','8KYGaKP','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','51tBvuMb','filter'];a32_0x1d0d=function(){return _0x4223d4;};return a32_0x1d0d();}import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{deleteBffScript}from'../../core/api-client.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists,resolveLocalFilePathFromLockKey}from'../../core/bff/file-system.js';import{ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';function a32_0x5357(_0x566fba,_0x4d0a47){_0x566fba=_0x566fba-0x148;const _0x1d0d20=a32_0x1d0d();let _0x5357ba=_0x1d0d20[_0x566fba];return _0x5357ba;}import{CliErrors}from'../../errors.js';import{sleep}from'../../utils/sleep.js';export const bffDelete={'service':a32_0x26f3e6(0x165),'command':a32_0x26f3e6(0x16f),'description':a32_0x26f3e6(0x14a),'risk':a32_0x26f3e6(0x15b),'flags':[{'name':a32_0x26f3e6(0x168),'type':a32_0x26f3e6(0x17f),'required':!![],'description':a32_0x26f3e6(0x17c)}],async 'validate'(_0x5db872){const _0x3a521a=a32_0x26f3e6,_0x2ad907=loadBffProjectConfig(_0x5db872[_0x3a521a(0x150)]),_0x59c720=await readBffLockFile(_0x2ad907[_0x3a521a(0x15d)]);if(!_0x59c720)throw CliErrors[_0x3a521a(0x173)](_0x3a521a(0x167));},async 'dryRun'(_0x2a8b1d){const _0x3a330b=a32_0x26f3e6,_0x202a40=loadBffProjectConfig(_0x2a8b1d[_0x3a330b(0x150)]),_0x1f8cad=await readBffLockFile(_0x202a40['lockFilePath']);if(!_0x1f8cad)throw CliErrors['validation'](_0x3a330b(0x164));const {appLock:_0x2f2df2}=ensureLockScope(_0x1f8cad,_0x2a8b1d[_0x3a330b(0x150)],_0x202a40['scriptsRoot'],_0x3a330b(0x16f)),_0x9c2ef5=_0x2a8b1d[_0x3a330b(0x159)]('target'),_0x3664c4=Object['keys'](_0x2f2df2[_0x3a330b(0x176)]),_0x511d99=resolveDeleteTarget(_0x9c2ef5,_0x3664c4),_0x58f7d9=_0x2f2df2[_0x3a330b(0x176)][_0x511d99];if(!_0x58f7d9)throw CliErrors[_0x3a330b(0x173)](_0x3a330b(0x174)+_0x511d99+'\x22.');const _0x258064=resolveLocalFilePathFromLockKey(_0x202a40,_0x511d99),_0x562282=relative(_0x202a40['projectRoot'],_0x258064),_0x209c95=join(_0x202a40[_0x3a330b(0x14f)],_0x3a330b(0x14b),_0x562282);return{'method':_0x3a330b(0x154),'url':_0x3a330b(0x16c),'body':{'appCode':_0x2a8b1d[_0x3a330b(0x150)],'target':_0x511d99,'remoteId':_0x58f7d9[_0x3a330b(0x16d)],'localFilePath':_0x258064,'trashedPath':_0x209c95},'description':_0x3a330b(0x171)+_0x511d99+_0x3a330b(0x170)};},async 'execute'(_0x7ea206){const _0x4df57f=a32_0x26f3e6,_0x37d642=loadBffProjectConfig(_0x7ea206[_0x4df57f(0x150)]),_0x614268=await readBffLockFile(_0x37d642[_0x4df57f(0x15d)]);if(!_0x614268)throw CliErrors[_0x4df57f(0x173)](_0x4df57f(0x164));const {lockData:_0x12181d,appLock:_0x285a1f}=ensureLockScope(_0x614268,_0x7ea206[_0x4df57f(0x150)],_0x37d642[_0x4df57f(0x178)],_0x4df57f(0x16f)),_0x3e2ce6=JSON[_0x4df57f(0x17a)](JSON['stringify'](_0x12181d)),_0x3988bb=_0x3e2ce6[_0x4df57f(0x179)][_0x7ea206['appCode']];if(!_0x3988bb)throw new Error(_0x4df57f(0x14e)+_0x7ea206[_0x4df57f(0x150)]+_0x4df57f(0x169));const _0x845f18=_0x7ea206['str'](_0x4df57f(0x168)),_0x4df504=Object[_0x4df57f(0x163)](_0x3988bb['functions']),_0x5b81cc=resolveDeleteTarget(_0x845f18,_0x4df504),_0x4f8d26=_0x3988bb[_0x4df57f(0x176)][_0x5b81cc];if(!_0x4f8d26)throw CliErrors[_0x4df57f(0x173)](_0x4df57f(0x174)+_0x5b81cc+'\x22.');await deleteBffScript(_0x4f8d26['remoteId']),delete _0x3988bb['functions'][_0x5b81cc],_0x3988bb['lastSync']=new Date()['toISOString'](),await writeBffLockFile(_0x37d642[_0x4df57f(0x15d)],_0x3e2ce6);const _0x263c0e=resolveLocalFilePathFromLockKey(_0x37d642,_0x5b81cc);let _0x34af6c;await fileExists(_0x263c0e)&&(_0x34af6c=await moveToTrash(_0x37d642[_0x4df57f(0x15c)],_0x37d642[_0x4df57f(0x14f)],_0x263c0e),await cleanupEmptyDirectories(dirname(_0x263c0e),_0x37d642[_0x4df57f(0x158)]));await waitForDeleteSettlement(_0x37d642[_0x4df57f(0x15d)],_0x7ea206['appCode'],_0x5b81cc,_0x263c0e),await sleep(0x96);const _0x2d4f75={'deleted':_0x5b81cc,'remoteId':_0x4f8d26[_0x4df57f(0x16d)]};if(_0x34af6c)_0x2d4f75[_0x4df57f(0x15e)]=_0x34af6c;return{'ok':!![],'data':_0x2d4f75,'message':_0x4df57f(0x14d)+_0x5b81cc+(_0x34af6c?_0x4df57f(0x153):'')};}};function resolveDeleteTarget(_0x504295,_0x4394ed){const _0x385fa5=a32_0x26f3e6;if(_0x504295[_0x385fa5(0x15f)]('/')){const _0x5c6bf9=_0x4394ed[_0x385fa5(0x166)](_0x3a4f65=>_0x3a4f65===_0x504295);if(!_0x5c6bf9)throw CliErrors[_0x385fa5(0x173)](_0x385fa5(0x177)+_0x504295);return _0x5c6bf9;}const _0x497ca2=_0x4394ed[_0x385fa5(0x17e)](_0x251c7a=>_0x251c7a[_0x385fa5(0x161)]('/')['at'](-0x1)===_0x504295);if(_0x497ca2['length']===0x0)throw CliErrors[_0x385fa5(0x173)](_0x385fa5(0x177)+_0x504295);if(_0x497ca2['length']>0x1)throw CliErrors[_0x385fa5(0x173)](_0x385fa5(0x14c)+_0x504295+'\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a'+_0x497ca2['map'](_0x541174=>_0x385fa5(0x156)+_0x541174)[_0x385fa5(0x172)]('\x0a'));return _0x497ca2[0x0];}async function moveToTrash(_0x12e331,_0x18abbf,_0x405cbf){const _0x296787=a32_0x26f3e6,_0x250386=new Date()[_0x296787(0x160)]()[_0x296787(0x16e)](/[:.]/g,'-'),_0x2f1817=relative(_0x12e331,_0x405cbf),_0x5077be=join(_0x18abbf,_0x250386,_0x2f1817);return await mkdir(dirname(_0x5077be),{'recursive':!![]}),await rename(_0x405cbf,_0x5077be),_0x5077be;}async function cleanupEmptyDirectories(_0x3f05ab,_0xc5a69f){const _0x5ccd50=a32_0x26f3e6;let _0x2fc1a6=resolve(_0x3f05ab);const _0x4061a0=resolve(_0xc5a69f);while(_0x2fc1a6[_0x5ccd50(0x148)](''+_0x4061a0+sep)||_0x2fc1a6===_0x4061a0){if(_0x2fc1a6===_0x4061a0)return;try{const _0x21c3dc=await readdir(_0x2fc1a6);if(_0x21c3dc[_0x5ccd50(0x157)]>0x0)return;await rmdir(_0x2fc1a6);}catch{return;}_0x2fc1a6=dirname(_0x2fc1a6);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0x49ba24,_0x374048,_0xe3e83e,_0x38b780){const _0x2417f3=a32_0x26f3e6;for(let _0x1fb959=0x0;_0x1fb959<DELETE_SETTLE_RETRY_COUNT;_0x1fb959+=0x1){const _0xe6f450=await readBffLockFile(_0x49ba24),_0x3115b0=!!_0xe6f450?.[_0x2417f3(0x179)]?.[_0x374048]?.['functions']?.[_0xe3e83e],_0x631ba1=await fileExists(_0x38b780);if(!_0x3115b0&&!_0x631ba1)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error('Local\x20delete\x20not\x20settled\x20for\x20'+_0xe3e83e+'.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a33_0x3b590e=a33_0x3eec;(function(_0x685f82,_0x126ef0){const _0x25cd90=a33_0x3eec,_0x352197=_0x685f82();while(!![]){try{const _0x1ee3bd=parseInt(_0x25cd90(0x174))/0x1+-parseInt(_0x25cd90(0x17e))/0x2*(-parseInt(_0x25cd90(0x181))/0x3)+parseInt(_0x25cd90(0x173))/0x4*(-parseInt(_0x25cd90(0x179))/0x5)+parseInt(_0x25cd90(0x176))/0x6+parseInt(_0x25cd90(0x16f))/0x7*(parseInt(_0x25cd90(0x16e))/0x8)+-parseInt(_0x25cd90(0x184))/0x9*(-parseInt(_0x25cd90(0x183))/0xa)+-parseInt(_0x25cd90(0x17c))/0xb*(parseInt(_0x25cd90(0x172))/0xc);if(_0x1ee3bd===_0x126ef0)break;else _0x352197['push'](_0x352197['shift']());}catch(_0x53e5ad){_0x352197['push'](_0x352197['shift']());}}}(a33_0xdc5a,0xa129a));import{getBffScriptInfo}from'../../core/api-client.js';function a33_0x3eec(_0x2da853,_0x4fd14e){_0x2da853=_0x2da853-0x16d;const _0xdc5aa0=a33_0xdc5a();let _0x3eec47=_0xdc5aa0[_0x2da853];return _0x3eec47;}export const bffDetail={'service':'bff','command':a33_0x3b590e(0x178),'description':a33_0x3b590e(0x170),'risk':'read','flags':[{'name':'id','type':'number','required':!![],'description':a33_0x3b590e(0x17f)},{'name':a33_0x3b590e(0x17d),'type':a33_0x3b590e(0x175),'description':'Return\x20full\x20raw\x20script\x20object'}],async 'execute'(_0x4df89c){const _0x2eef59=a33_0x3b590e,_0x4e1875=await getBffScriptInfo(_0x4df89c[_0x2eef59(0x171)]('id')),_0xcf85c=_0x4df89c[_0x2eef59(0x17b)](_0x2eef59(0x17d));if(_0xcf85c)return{'ok':!![],'data':_0x4e1875};return{'ok':!![],'data':{'id':_0x4e1875['id'],'appCode':_0x4e1875['appCode'],'scriptType':_0x4e1875['scriptType'],'description':_0x4e1875[_0x2eef59(0x17a)]||_0x2eef59(0x16d),'createdTime':_0x4e1875[_0x2eef59(0x177)]??'','updatedTime':_0x4e1875[_0x2eef59(0x182)]??'','scriptContent':_0x4e1875[_0x2eef59(0x180)]??''}};}};function a33_0xdc5a(){const _0x3e010c=['(none)','4912vbEdmK','2443PPmLtI','Get\x20BFF\x20script\x20details\x20by\x20ID','num','1044enjsdz','52rMbLBg','956056vgfczZ','boolean','1305048XaGevC','createdTime','detail','180710AVlKnc','description','bool','169136xwAUDT','verbose','6nuJCPY','Script\x20ID','scriptContent','106245FzdaBL','updatedTime','50hLtcVX','1752453Reyitj'];a33_0xdc5a=function(){return _0x3e010c;};return a33_0xdc5a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x31f96f,_0x1debd9){const _0x1bd868=a34_0x5657,_0x5f643e=_0x31f96f();while(!![]){try{const _0x8d9c28=parseInt(_0x1bd868(0xf9))/0x1+-parseInt(_0x1bd868(0xf8))/0x2+-parseInt(_0x1bd868(0xf6))/0x3*(parseInt(_0x1bd868(0xf3))/0x4)+-parseInt(_0x1bd868(0xf4))/0x5*(-parseInt(_0x1bd868(0xf7))/0x6)+parseInt(_0x1bd868(0xfb))/0x7+parseInt(_0x1bd868(0xf5))/0x8+parseInt(_0x1bd868(0xfa))/0x9;if(_0x8d9c28===_0x1debd9)break;else _0x5f643e['push'](_0x5f643e['shift']());}catch(_0x37bb39){_0x5f643e['push'](_0x5f643e['shift']());}}}(a34_0x13ef,0x30691));import{bffList}from'../../commands/bff/list.js';function a34_0x5657(_0x14370a,_0x5d32ce){_0x14370a=_0x14370a-0xf3;const _0x13efe5=a34_0x13ef();let _0x5657a4=_0x13efe5[_0x14370a];return _0x5657a4;}import{bffDetail}from'../../commands/bff/detail.js';import{bffStatus}from'../../commands/bff/status.js';import{bffCreate}from'../../commands/bff/create.js';import{bffPush}from'../../commands/bff/push.js';import{bffPull}from'../../commands/bff/pull.js';import{bffDelete}from'../../commands/bff/delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];function a34_0x13ef(){const _0x25fecd=['78150BoVfLs','30uGyBGj','729998syTGUE','56656kBcLTQ','2092779ibgzcl','214578kMWvqE','28jJLhCv','184495AAAjDM','1930416poMrev'];a34_0x13ef=function(){return _0x25fecd;};return a34_0x13ef();}
|
package/lib/commands/bff/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a35_0x23ae70=a35_0x5378;function a35_0x5378(_0x3f1ca6,_0x50817c){_0x3f1ca6=_0x3f1ca6-0x8a;const _0x4f9f56=a35_0x4f9f();let _0x537808=_0x4f9f56[_0x3f1ca6];return _0x537808;}(function(_0x558cb3,_0x107fb8){const _0x410cbb=a35_0x5378,_0x2b7856=_0x558cb3();while(!![]){try{const _0x29e331=-parseInt(_0x410cbb(0x95))/0x1*(-parseInt(_0x410cbb(0x8e))/0x2)+parseInt(_0x410cbb(0xa1))/0x3*(-parseInt(_0x410cbb(0x9f))/0x4)+parseInt(_0x410cbb(0x8f))/0x5*(-parseInt(_0x410cbb(0x8c))/0x6)+parseInt(_0x410cbb(0x96))/0x7+parseInt(_0x410cbb(0x9c))/0x8*(parseInt(_0x410cbb(0xa4))/0x9)+parseInt(_0x410cbb(0xaa))/0xa+parseInt(_0x410cbb(0x93))/0xb*(parseInt(_0x410cbb(0x94))/0xc);if(_0x29e331===_0x107fb8)break;else _0x2b7856['push'](_0x2b7856['shift']());}catch(_0x380bad){_0x2b7856['push'](_0x2b7856['shift']());}}}(a35_0x4f9f,0x8ca47));import{listBffScripts}from'../../core/api-client.js';function a35_0x4f9f(){const _0x3cb8d9=['List\x20BFF\x20scripts','22PVCOqT','5612268ETiotF','81805XOEIXx','1420573ondjvM','verbose','Script\x20type\x20filter','COMMON','bff','str','768pXieed','(unnamed)','scriptType','2980372yJWRkS','length','3QUvPXm','ENDPOINT','Filter\x20by\x20script\x20name','41733eJnuxY','appCode','Return\x20full\x20script\x20objects','No\x20BFF\x20scripts\x20found.','read','boolean','5683680zlYHza','name','list','84KwRfQR','string','2oBqsoy','325885nyVcOg','map','type'];a35_0x4f9f=function(){return _0x3cb8d9;};return a35_0x4f9f();}export const bffList={'service':a35_0x23ae70(0x9a),'command':a35_0x23ae70(0x8b),'description':a35_0x23ae70(0x92),'risk':a35_0x23ae70(0xa8),'flags':[{'name':a35_0x23ae70(0x91),'type':'string','description':a35_0x23ae70(0x98),'default':a35_0x23ae70(0xa2),'enum':['ENDPOINT',a35_0x23ae70(0x99)]},{'name':a35_0x23ae70(0x8a),'type':a35_0x23ae70(0x8d),'description':a35_0x23ae70(0xa3)},{'name':a35_0x23ae70(0x97),'type':a35_0x23ae70(0xa9),'description':a35_0x23ae70(0xa6)}],async 'execute'(_0x350e48){const _0x3db18c=a35_0x23ae70,_0x5c183b=await listBffScripts(_0x350e48[_0x3db18c(0xa5)],_0x350e48[_0x3db18c(0x9b)](_0x3db18c(0x91)),{'scriptName':_0x350e48[_0x3db18c(0x9b)]('name')||undefined}),_0x2e0bb3=_0x350e48['bool']('verbose');return{'ok':!![],'data':_0x2e0bb3?_0x5c183b:_0x5c183b[_0x3db18c(0x90)](_0x187b5f=>({'id':_0x187b5f['id'],'functionName':_0x187b5f['functionName']??'','description':_0x187b5f['description']||_0x3db18c(0x9d),'scriptType':_0x187b5f[_0x3db18c(0x9e)]})),'message':_0x5c183b[_0x3db18c(0xa0)]===0x0?_0x3db18c(0xa7):undefined};}};
|