@lovrabet/lovrabet-cli 2.1.17 → 2.1.18-beta.2
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/cli.d.ts +21 -0
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.d.ts +38 -0
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.d.ts +61 -0
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.d.ts +26 -0
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.d.ts +16 -0
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.d.ts +41 -0
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.d.ts +66 -0
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.d.ts +38 -0
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.d.ts +2 -0
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.d.ts +2 -0
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/artifact/index.d.ts +9 -0
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.d.ts +31 -0
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.d.ts +23 -0
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.d.ts +33 -0
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.d.ts +8 -0
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.d.ts +19 -0
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.d.ts +15 -0
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.d.ts +9 -0
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.d.ts +80 -0
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.d.ts +67 -0
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.d.ts +41 -0
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.d.ts +6 -0
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.d.ts +21 -0
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.d.ts +17 -0
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.d.ts +27 -0
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.d.ts +26 -0
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.d.ts +10 -0
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.d.ts +18 -0
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.d.ts +6 -0
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.d.ts +23 -0
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.d.ts +2 -0
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.d.ts +32 -0
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.d.ts +8 -0
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.d.ts +20 -0
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/ocr/index.d.ts +2 -0
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/personal-bff/index.d.ts +5 -0
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.d.ts +56 -0
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schedule/index.d.ts +2 -0
- package/lib/commands/schedule/index.js +1 -0
- package/lib/commands/schema.d.ts +18 -0
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.d.ts +18 -0
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.d.ts +13 -0
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.d.ts +2 -0
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.d.ts +102 -0
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.d.ts +2 -0
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/install.d.ts +2 -0
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.d.ts +2 -0
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.d.ts +2 -0
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.d.ts +2 -0
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/flags.d.ts +13 -0
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.d.ts +9 -0
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.d.ts +5 -0
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.d.ts +49 -0
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.d.ts +80 -0
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.d.ts +9 -0
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.d.ts +13 -0
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.d.ts +6 -0
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.d.ts +23 -0
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.d.ts +20 -0
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.d.ts +13 -0
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.d.ts +21 -0
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.d.ts +9 -0
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.d.ts +10 -0
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.d.ts +10 -0
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.d.ts +108 -0
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.d.ts +13 -0
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.d.ts +28 -0
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.d.ts +86 -0
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.d.ts +45 -0
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.d.ts +12 -0
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.d.ts +57 -0
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.d.ts +56 -0
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.d.ts +13 -0
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.d.ts +79 -0
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.d.ts +14 -0
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.d.ts +14 -0
- package/lib/constant/url.js +1 -1
- package/lib/context.d.ts +287 -0
- package/lib/context.js +1 -1
- package/lib/core/api-client.d.ts +451 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.d.ts +39 -0
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.d.ts +62 -0
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.d.ts +25 -0
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.d.ts +24 -0
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.d.ts +64 -0
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.d.ts +19 -0
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.d.ts +21 -0
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.d.ts +10 -0
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.d.ts +10 -0
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.d.ts +64 -0
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.d.ts +10 -0
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/response.d.ts +10 -0
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.d.ts +46 -0
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.d.ts +28 -0
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.d.ts +102 -0
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.d.ts +29 -0
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.d.ts +4 -0
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.d.ts +108 -0
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -0
- package/lib/generated/build-info.js +1 -1
- package/lib/help.d.ts +25 -0
- package/lib/help.js +1 -1
- package/lib/runtime/event.d.ts +16 -0
- package/lib/runtime/event.js +1 -0
- package/lib/runtime/index.d.ts +13 -0
- package/lib/runtime/index.js +1 -0
- package/lib/runtime/queue.d.ts +6 -0
- package/lib/runtime/queue.js +1 -0
- package/lib/runtime/resolve.d.ts +14 -0
- package/lib/runtime/resolve.js +1 -0
- package/lib/runtime/types.d.ts +59 -0
- package/lib/runtime/types.js +1 -0
- package/lib/skills/npx-skills-add.d.ts +42 -0
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.d.ts +4 -0
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.d.ts +21 -0
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.d.ts +9 -0
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/links.d.ts +18 -0
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.d.ts +3 -0
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.d.ts +25 -0
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.d.ts +11 -0
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.d.ts +7 -0
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.d.ts +11 -0
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.d.ts +33 -0
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.d.ts +5 -0
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/types.d.ts +105 -0
- package/lib/skills/runtime-skill-sync/zip-codec.d.ts +9 -0
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.d.ts +15 -0
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.d.ts +15 -0
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.d.ts +25 -0
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.d.ts +73 -0
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.d.ts +21 -0
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.d.ts +65 -0
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.d.ts +17 -0
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.d.ts +10 -0
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.d.ts +18 -0
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.d.ts +6 -0
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +9 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Workspace commands — bind the current working directory to a
|
|
3
|
+
* Lovrabet app context.
|
|
4
|
+
*
|
|
5
|
+
* WorkBuddy-style tools have an explicit working directory. These commands make
|
|
6
|
+
* that directory's `.lovrabet.json` the place where app intent lives, without
|
|
7
|
+
* storing credentials.
|
|
8
|
+
*/
|
|
9
|
+
import type { CommandDefinition } from "../../framework/types.js";
|
|
10
|
+
export declare const workspaceDefinitions: CommandDefinition[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a62_0xb7cc4d=a62_0xf548;(function(_0x38e5bc,_0x346916){const _0x56d5b4=a62_0xf548,_0x214df7=_0x38e5bc();while(!![]){try{const _0x11277a=parseInt(_0x56d5b4(0x15a))/0x1+-parseInt(_0x56d5b4(0x17a))/0x2*(parseInt(_0x56d5b4(0x15c))/0x3)+-parseInt(_0x56d5b4(0x151))/0x4+-parseInt(_0x56d5b4(0x16b))/0x5*(-parseInt(_0x56d5b4(0x188))/0x6)+parseInt(_0x56d5b4(0x171))/0x7*(-parseInt(_0x56d5b4(0x162))/0x8)+-parseInt(_0x56d5b4(0x164))/0x9*(parseInt(_0x56d5b4(0x160))/0xa)+-parseInt(_0x56d5b4(0x17b))/0xb*(-parseInt(_0x56d5b4(0x172))/0xc);if(_0x11277a===_0x346916)break;else _0x214df7['push'](_0x214df7['shift']());}catch(_0x1c3f8b){_0x214df7['push'](_0x214df7['shift']());}}}(a62_0x4ea5,0x519df));import{CLI_BIN_NAME}from'../../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../../constant/env.js';function a62_0xf548(_0x5cfd8b,_0x1f8380){_0x5cfd8b=_0x5cfd8b-0x151;const _0x4ea516=a62_0x4ea5();let _0xf54844=_0x4ea516[_0x5cfd8b];return _0xf54844;}import{CliErrors}from'../../errors.js';import{readConfigFile,resolveWriteConfigPath,writeConfigFile}from'../../context.js';import{findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../../commands/app/eligibility.js';const WORKSPACE_USE_FLAGS=[{'name':a62_0xb7cc4d(0x176),'type':a62_0xb7cc4d(0x16a),'description':'App\x20name\x20to\x20bind\x20as\x20the\x20current\x20workspace\x20default'},{'name':'appcode','type':a62_0xb7cc4d(0x16a),'description':'App\x20code\x20to\x20bind\x20directly'},{'name':a62_0xb7cc4d(0x17e),'type':a62_0xb7cc4d(0x16a),'description':a62_0xb7cc4d(0x163),'enum':[...RUNTIME_ENV_VALUES]},{'name':a62_0xb7cc4d(0x17d),'type':a62_0xb7cc4d(0x180),'description':'Compatibility\x20flag;\x20workspace\x20config\x20updates\x20are\x20non-interactive','default':![]}];function a62_0x4ea5(){const _0x11e7e1=['2361QzBiID','\x22.\x20Allowed:\x20','Run\x20`','authRequired','2069790PdGLrN','apps','51752DhHcdb','Target\x20environment','27fgmGIk','from','appcode','length','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20pass\x20--appcode\x20directly.','workspace\x20','string','25QPhWpa','../../core/api-client.js','join','defaultApp','isArray','appName','77IEfAuh','60vYSquI','str','Resolving\x20--app\x20requires\x20accessKey.\x20Pass\x20--appcode\x20directly,\x20or\x20set\x20accessKey\x20before\x20running\x20','validation','app','Available\x20apps:\x20','write','\x20--app\x20<name>\x20[--env\x20daily]\x20or\x20','622xIcJlA','1328459krlMIq','../../commands/app/remote-source.js','yes','env','Missing\x20workspace\x20app\x20selector.','boolean','appCode','object','Workspace\x20configured.\x0aConfig\x20file:\x20','envName','Initialize\x20app\x20context\x20for\x20the\x20current\x20workspace','\x20workspace\x20','includes','493782uWmZPt','204488cEwNph','\x0aEnv:\x20','use','workspace','accessKey','command','shouldWriteEnv','trim','Invalid\x20env\x20\x22','306948HrrUJz','Set\x20app\x20context\x20for\x20the\x20current\x20workspace'];a62_0x4ea5=function(){return _0x11e7e1;};return a62_0x4ea5();}async function executeWorkspaceUse(_0x57f9a0,_0x243d3d){const _0x4ff949=a62_0xb7cc4d,_0x537d4e=_0x57f9a0[_0x4ff949(0x173)]('app')['trim'](),_0x245a2d=_0x57f9a0[_0x4ff949(0x173)]('appcode')[_0x4ff949(0x158)](),_0x43743c=_0x57f9a0[_0x4ff949(0x173)]('env')['trim'](),_0x430533=resolveWorkspaceEnv(_0x43743c||_0x57f9a0[_0x4ff949(0x184)]||DEFAULT_CONFIG_VALUES[_0x4ff949(0x17e)]);if(!_0x537d4e&&!_0x245a2d)throw CliErrors[_0x4ff949(0x175)](_0x4ff949(0x17f),'Usage:\x20'+CLI_BIN_NAME+_0x4ff949(0x186)+_0x243d3d+_0x4ff949(0x179)+CLI_BIN_NAME+_0x4ff949(0x186)+_0x243d3d+'\x20--appcode\x20<code>\x20[--env\x20daily]');const _0x8226e0=_0x245a2d||await resolveRemoteAppCode({'command':_0x243d3d,'appName':_0x537d4e,'env':_0x430533,'accessKey':_0x57f9a0[_0x4ff949(0x155)]}),_0x55a387=writeWorkspaceConfig({'command':_0x243d3d,'appName':_0x537d4e,'appcode':_0x8226e0,'env':_0x430533,'shouldWriteEnv':!!_0x43743c,'accessKey':_0x57f9a0['accessKey']});return{'ok':!![],'data':{'configPath':_0x55a387,'app':_0x537d4e||null,'appcode':_0x8226e0,'env':_0x43743c?_0x430533:null,'accessKeyWritten':![],'command':_0x4ff949(0x169)+_0x243d3d},'message':buildWorkspaceMessage(_0x55a387,_0x537d4e,_0x8226e0,_0x43743c?_0x430533:undefined)};}async function resolveRemoteAppCode(_0x35691b){const _0x924100=a62_0xb7cc4d;if(!_0x35691b[_0x924100(0x155)])throw CliErrors[_0x924100(0x15f)](_0x924100(0x174)+CLI_BIN_NAME+_0x924100(0x186)+_0x35691b[_0x924100(0x156)]+'.');const {setActiveAK:_0x4df783}=await import(_0x924100(0x16c)),{getRemoteAppList:_0x535c0c}=await import(_0x924100(0x17c));_0x4df783(_0x35691b[_0x924100(0x155)]);const _0x58140d=await _0x535c0c({'env':_0x35691b[_0x924100(0x17e)],'accessKey':_0x35691b[_0x924100(0x155)],'noCache':![]}),_0x2d7edb=findAppByName(_0x58140d['items'],_0x35691b['appName']);if(_0x2d7edb&&!isRuntimeAccessibleApp(_0x2d7edb))throw runtimeInaccessibleAppError(_0x2d7edb,'\x22'+_0x35691b['appName']+'\x22');const _0x48103f=_0x2d7edb?.[_0x924100(0x181)]?.[_0x924100(0x158)]();if(_0x48103f)return _0x48103f;const _0x35dc00=_0x58140d['items']['map'](_0x35eafe=>_0x35eafe['appName'])['filter'](Boolean),_0x1831fc=_0x35dc00[_0x924100(0x167)]?_0x924100(0x177)+Array[_0x924100(0x165)](new Set(_0x35dc00))[_0x924100(0x16d)](',\x20')+'.':_0x924100(0x15e)+CLI_BIN_NAME+_0x924100(0x168);throw CliErrors['validation']('App\x20\x22'+_0x35691b['appName']+'\x22\x20not\x20found.',_0x1831fc);}function writeWorkspaceConfig(_0x15b835){const _0x3bb03b=a62_0xb7cc4d,_0x406d4b=resolveWriteConfigPath('project'),_0x82d80d=readConfigFile(_0x406d4b);_0x15b835[_0x3bb03b(0x157)]&&(_0x82d80d[_0x3bb03b(0x17e)]=_0x15b835['env']);if(_0x15b835[_0x3bb03b(0x170)]){const _0x546fbe=isRecord(_0x82d80d[_0x3bb03b(0x161)])?{..._0x82d80d[_0x3bb03b(0x161)]}:{},_0x4e3e49=isRecord(_0x546fbe[_0x15b835[_0x3bb03b(0x170)]])?_0x546fbe[_0x15b835[_0x3bb03b(0x170)]]:{};_0x546fbe[_0x15b835[_0x3bb03b(0x170)]]={..._0x4e3e49,'appcode':_0x15b835[_0x3bb03b(0x166)]},_0x82d80d[_0x3bb03b(0x161)]=_0x546fbe,_0x82d80d[_0x3bb03b(0x16e)]=_0x15b835[_0x3bb03b(0x170)];if(_0x82d80d[_0x3bb03b(0x176)])delete _0x82d80d[_0x3bb03b(0x176)];return writeAndReturn(_0x406d4b,_0x82d80d);}_0x82d80d['appcode']=_0x15b835['appcode'];if(_0x82d80d[_0x3bb03b(0x176)])delete _0x82d80d[_0x3bb03b(0x176)];return writeAndReturn(_0x406d4b,_0x82d80d);}function writeAndReturn(_0x2d7a56,_0x20422b){return writeConfigFile(_0x2d7a56,_0x20422b),_0x2d7a56;}function resolveWorkspaceEnv(_0x3d7bc5){const _0x2db40a=a62_0xb7cc4d;if(RUNTIME_ENV_VALUES[_0x2db40a(0x187)](_0x3d7bc5))return _0x3d7bc5;throw CliErrors['validation'](_0x2db40a(0x159)+_0x3d7bc5+_0x2db40a(0x15d)+RUNTIME_ENV_VALUES[_0x2db40a(0x16d)](',\x20'));}function buildWorkspaceMessage(_0x56f1e6,_0x481ca1,_0x121b15,_0x1df9c9){const _0xbb676f=a62_0xb7cc4d,_0x13d875=_0x481ca1?_0x481ca1+'\x20('+_0x121b15+')':_0x121b15,_0x1e39c7=_0x1df9c9?_0xbb676f(0x152)+_0x1df9c9:'';return _0xbb676f(0x183)+_0x56f1e6+'\x0aDefault\x20app:\x20'+_0x13d875+_0x1e39c7+'\x0aAccessKey:\x20not\x20written';}function isRecord(_0x14d2d4){const _0x2352ff=a62_0xb7cc4d;return typeof _0x14d2d4===_0x2352ff(0x182)&&_0x14d2d4!==null&&!Array[_0x2352ff(0x16f)](_0x14d2d4);}function makeWorkspaceCommand(_0x26b758){const _0x1c05ae=a62_0xb7cc4d;return{'service':_0x1c05ae(0x154),'command':_0x26b758,'description':_0x26b758==='init'?_0x1c05ae(0x185):_0x1c05ae(0x15b),'risk':_0x1c05ae(0x178),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':WORKSPACE_USE_FLAGS,async 'execute'(_0x93a5f2){return executeWorkspaceUse(_0x93a5f2,_0x26b758);}};}export const workspaceDefinitions=[makeWorkspaceCommand('init'),makeWorkspaceCommand(a62_0xb7cc4d(0x153))];
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Configuration field schema — the single source of truth for all
|
|
3
|
+
* configurable keys in `.lovrabet.json`.
|
|
4
|
+
*
|
|
5
|
+
* Why a schema module: previously, config key validation, enum lists, defaults, and
|
|
6
|
+
* flag definitions were scattered across `config/definitions.ts`, `init.ts`, and
|
|
7
|
+
* `buildConfig()`. Adding a new config key required editing three files. Centralizing
|
|
8
|
+
* everything here means:
|
|
9
|
+
* - A new key needs one entry in `CONFIG_FIELD_SCHEMAS`
|
|
10
|
+
* - `getConfigEnumValues()`, `getConfigDefaultValue()`, `getTopLevelConfigKeyList()` etc.
|
|
11
|
+
* all derive from the same data — no drift
|
|
12
|
+
* - Help text for `config get/set` commands can iterate over this schema directly
|
|
13
|
+
*
|
|
14
|
+
* Design decision: runtime CLI keeps platform app discovery remote/cache-based,
|
|
15
|
+
* but local configs may define `apps.<alias>.appcode` as stable operator aliases.
|
|
16
|
+
* `config set` targets scalar top-level fields plus the explicit
|
|
17
|
+
* `apps.<alias>.appcode` local-alias path.
|
|
18
|
+
*/
|
|
19
|
+
import { RUNTIME_ENV_VALUES } from "../constant/env.js";
|
|
20
|
+
export type RuntimeEnv = (typeof RUNTIME_ENV_VALUES)[number];
|
|
21
|
+
/** All configuration field names recognized by the runtime CLI. */
|
|
22
|
+
type ConfigFieldName = "env" | "format" | "pageSize" | "apiDomain" | "userDomain" | "runtimeDomain" | "skillHubDomain" | "accessKey" | "riskLevel" | "locale";
|
|
23
|
+
/**
|
|
24
|
+
* Schema for a single configuration field.
|
|
25
|
+
*
|
|
26
|
+
* Why `cliSettableTopLevel` and `cliSettableAppProfile` are separate from
|
|
27
|
+
* `topLevel` and `appProfile`: the first pair indicates whether the CLI
|
|
28
|
+
* commands (`config set`) can modify the field. Some fields exist in the config
|
|
29
|
+
* file for other reasons (e.g. imported from `.rabetbase.json`) but the runtime
|
|
30
|
+
* CLI should not expose them as settable.
|
|
31
|
+
*/
|
|
32
|
+
interface ConfigFieldSchema {
|
|
33
|
+
description?: string;
|
|
34
|
+
/** Can appear at the root of the config file. */
|
|
35
|
+
topLevel?: boolean;
|
|
36
|
+
/** CLI `config set` can write this at the top level. */
|
|
37
|
+
cliSettableTopLevel?: boolean;
|
|
38
|
+
/** Permitted values (used for enum validation and --help hints). */
|
|
39
|
+
enumValues?: readonly string[];
|
|
40
|
+
/** Default value when absent from the config. */
|
|
41
|
+
defaultValue?: string | number | boolean;
|
|
42
|
+
/** Can be imported from `.rabetbase.json`. */
|
|
43
|
+
importable?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* When true, the field is present only for compatibility with older configs.
|
|
46
|
+
* It is shown in `config list` but the runtime CLI does not act on it.
|
|
47
|
+
*/
|
|
48
|
+
legacyCompatOnly?: boolean;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Schema definitions for every recognized configuration field.
|
|
52
|
+
*
|
|
53
|
+
* All CLI-settable fields are top-level. This keeps the runtime config aligned
|
|
54
|
+
* with the current architecture: platform app list is remote/cache-based, and
|
|
55
|
+
* local config stores user intent such as `defaultApp`, local app aliases,
|
|
56
|
+
* `appcode`, auth, environment, output, and safety preferences.
|
|
57
|
+
*/
|
|
58
|
+
export declare const CONFIG_FIELD_SCHEMAS: Record<ConfigFieldName, ConfigFieldSchema>;
|
|
59
|
+
/** Set of top-level CLI-settable keys. */
|
|
60
|
+
export declare const TOP_LEVEL_CONFIG_KEYS: Set<string>;
|
|
61
|
+
/** Map of field name → permitted enum values (only for fields with `enumValues`). */
|
|
62
|
+
export declare const CONFIG_ENUM_VALUES: Record<string, string[]>;
|
|
63
|
+
/** All fields that can be imported from `.rabetbase.json`. */
|
|
64
|
+
export declare const IMPORTABLE_RUNTIME_CONFIG_KEYS: ConfigFieldName[];
|
|
65
|
+
/** @returns The schema for a given field name, or undefined if unrecognized. */
|
|
66
|
+
export declare function getConfigFieldSchema(key: string): ConfigFieldSchema | undefined;
|
|
67
|
+
/** @returns The enum values for a field (only present for fields with `enumValues`). */
|
|
68
|
+
export declare function getConfigEnumValues(key: string): readonly string[] | undefined;
|
|
69
|
+
/** @returns The default value for a field, or undefined if none is declared. */
|
|
70
|
+
export declare function getConfigDefaultValue(key: string): string | number | boolean | undefined;
|
|
71
|
+
/** @returns true if the key is a recognized top-level config field. */
|
|
72
|
+
export declare function isTopLevelConfigKey(key: string): boolean;
|
|
73
|
+
/**
|
|
74
|
+
* @returns true if the field exists only for backward compatibility.
|
|
75
|
+
* Legacy fields are readable but not acted upon by the runtime CLI.
|
|
76
|
+
*/
|
|
77
|
+
export declare function isLegacyCompatConfigKey(key: string): boolean;
|
|
78
|
+
/** @returns All recognized top-level config keys as an array. */
|
|
79
|
+
export declare function getTopLevelConfigKeyList(): string[];
|
|
80
|
+
/** Formats a list of config keys as a comma-separated string for use in help text. */
|
|
81
|
+
export declare function formatConfigKeyList(keys: Iterable<string>): string;
|
|
82
|
+
/** Human-readable summary of all top-level keys for use in `config set --help`. */
|
|
83
|
+
export declare function getTopLevelConfigKeySummary(): string;
|
|
84
|
+
/**
|
|
85
|
+
* Description text shown in `config set` and `config delete` help.
|
|
86
|
+
* Tells users which keys are valid at top level and for local app aliases.
|
|
87
|
+
*/
|
|
88
|
+
export declare function getConfigCommandKeyDescription(): string;
|
|
89
|
+
/**
|
|
90
|
+
* Maps flag names (as written in CLI flags) to the internal config key name.
|
|
91
|
+
*
|
|
92
|
+
* Why this exists: users naturally write `--accesskey` (camelCase) or `--pagesize`
|
|
93
|
+
* rather than `--accessKey` and `--pageSize`. This map normalizes both forms to
|
|
94
|
+
* the canonical config key name before writing to the JSON.
|
|
95
|
+
*
|
|
96
|
+
* Design decision: snake_case forms (`accesskey`, `pagesize`) are also included
|
|
97
|
+
* as aliases because AI-generated commands frequently use snake_case flag names.
|
|
98
|
+
*/
|
|
99
|
+
/**
|
|
100
|
+
* Builds the field map for `app list`'s pretty output.
|
|
101
|
+
* Shows each app's effective configuration alongside its name and appcode.
|
|
102
|
+
*
|
|
103
|
+
* Why null rather than undefined: the pretty formatter distinguishes "not set"
|
|
104
|
+
* (shown as `null`) from "inherits from top level" (shown differently in doctor).
|
|
105
|
+
* Using `null` explicitly communicates the intentional absence of a value.
|
|
106
|
+
*/
|
|
107
|
+
export declare function buildAppProfileListFields(fallbackEnv: string): Record<string, unknown>;
|
|
108
|
+
export {};
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a63_0x326165=a63_0x1f5e;(function(_0x5b8113,_0x5f1c50){const _0x363d55=a63_0x1f5e,_0x531d4f=_0x5b8113();while(!![]){try{const _0x624373=-parseInt(_0x363d55(0xd5))/0x1+-parseInt(_0x363d55(0xef))/0x2*(-parseInt(_0x363d55(0xce))/0x3)+-parseInt(_0x363d55(0xde))/0x4*(parseInt(_0x363d55(0xd7))/0x5)+-parseInt(_0x363d55(0xd9))/0x6*(parseInt(_0x363d55(0xed))/0x7)+-parseInt(_0x363d55(0xe7))/0x8*(parseInt(_0x363d55(0xe9))/0x9)+-parseInt(_0x363d55(0xe2))/0xa+parseInt(_0x363d55(0xea))/0xb*(parseInt(_0x363d55(0xe8))/0xc);if(_0x624373===_0x5f1c50)break;else _0x531d4f['push'](_0x531d4f['shift']());}catch(_0x5c7fe7){_0x531d4f['push'](_0x531d4f['shift']());}}}(a63_0x3c83,0x35ce1));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{OUTPUT_FORMAT_VALUES}from'../constant/output.js';export const CONFIG_FIELD_SCHEMAS={'env':{'description':'Target\x20environment','topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a63_0x326165(0xeb)],'importable':!![]},'format':{'description':a63_0x326165(0xd1),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a63_0x326165(0xee)],'importable':!![]},'pageSize':{'description':a63_0x326165(0xe3),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':a63_0x326165(0xcf),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':a63_0x326165(0xd6),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':a63_0x326165(0xe5),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'skillHubDomain':{'description':a63_0x326165(0xd0),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':a63_0x326165(0xdb),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':'Risk\x20level','topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a63_0x326165(0xe4)],'importable':!![]},'locale':{'description':'Locale','topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a63_0x326165(0xe0)],'importable':!![],'legacyCompatOnly':!![]}};export const TOP_LEVEL_CONFIG_KEYS=new Set(Object[a63_0x326165(0xdf)](CONFIG_FIELD_SCHEMAS)[a63_0x326165(0xd4)](([,_0x169370])=>_0x169370[a63_0x326165(0xdd)])['map'](([_0x1c6d78])=>_0x1c6d78));export const CONFIG_ENUM_VALUES=Object[a63_0x326165(0xf0)](Object['entries'](CONFIG_FIELD_SCHEMAS)[a63_0x326165(0xd4)](([,_0x365798])=>_0x365798[a63_0x326165(0xda)])[a63_0x326165(0xd8)](([_0x3c3ba5,_0x57912d])=>[_0x3c3ba5,[..._0x57912d['enumValues']||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object[a63_0x326165(0xdf)](CONFIG_FIELD_SCHEMAS)[a63_0x326165(0xd4)](([,_0x315d40])=>_0x315d40[a63_0x326165(0xdc)])[a63_0x326165(0xd8)](([_0x417f58])=>_0x417f58);export function getConfigFieldSchema(_0x50b9e7){return CONFIG_FIELD_SCHEMAS[_0x50b9e7];}export function getConfigEnumValues(_0x301378){return getConfigFieldSchema(_0x301378)?.['enumValues'];}export function getConfigDefaultValue(_0x4440bf){const _0x4ed142=a63_0x326165;return getConfigFieldSchema(_0x4440bf)?.[_0x4ed142(0xe1)];}export function isTopLevelConfigKey(_0x50c738){const _0x3aee49=a63_0x326165;return TOP_LEVEL_CONFIG_KEYS[_0x3aee49(0xec)](_0x50c738);}export function isLegacyCompatConfigKey(_0x2046bc){const _0x1e294b=a63_0x326165;return getConfigFieldSchema(_0x2046bc)?.[_0x1e294b(0xd3)]===!![];}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function formatConfigKeyList(_0x3b97a8){const _0x5dd818=a63_0x326165;return[..._0x3b97a8][_0x5dd818(0xd2)](',\x20');}function a63_0x1f5e(_0x2cbcaf,_0x54efa0){_0x2cbcaf=_0x2cbcaf-0xce;const _0x3c83a5=a63_0x3c83();let _0x1f5e79=_0x3c83a5[_0x2cbcaf];return _0x1f5e79;}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x561724=a63_0x326165;return _0x561724(0xe6)+getTopLevelConfigKeySummary()+';\x20local\x20alias:\x20apps.<alias>.appcode';}function a63_0x3c83(){const _0x14c3fb=['Default\x20output\x20format','join','legacyCompatOnly','filter','85184rXkvXg','Override\x20user\x20domain','25480OfPcSX','map','1668522lQvRUl','enumValues','Access\x20key\x20(client-ak\x20auth)','importable','cliSettableTopLevel','292WqzxAj','entries','locale','defaultValue','3086610gOVwYc','Default\x20page\x20size','riskLevel','Override\x20runtime\x20domain','Config\x20key.\x20Top-level:\x20','16anbywi','12MqamAX','1312191wjLKyu','16423385DBiDJl','env','has','7joSxjo','format','4SZsyzr','fromEntries','94332QQbbqg','Override\x20API\x20domain','Override\x20SkillHub\x20domain'];a63_0x3c83=function(){return _0x14c3fb;};return a63_0x3c83();}export function buildAppProfileListFields(_0x2d6509){return{'env':_0x2d6509,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Application domain constants.
|
|
3
|
+
*
|
|
4
|
+
* These values mirror platform app publish statuses used by the runtime app
|
|
5
|
+
* directory. Keep business rules in command helpers, and keep raw status values
|
|
6
|
+
* here as the shared source of truth.
|
|
7
|
+
*/
|
|
8
|
+
export declare const APP_PUBLISH_STATUS: {
|
|
9
|
+
readonly Published: "PUBLISHED";
|
|
10
|
+
readonly Unpublished: "UNPUBLISH";
|
|
11
|
+
};
|
|
12
|
+
export type AppPublishStatus = (typeof APP_PUBLISH_STATUS)[keyof typeof APP_PUBLISH_STATUS];
|
|
13
|
+
export declare const RUNTIME_ACCESSIBLE_APP_STATUS: "PUBLISHED";
|
package/lib/constant/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a64_0x2de63f=a64_0x2775;(function(_0x37e622,_0x4577c4){const _0x420a0f=a64_0x2775,_0x534916=_0x37e622();while(!![]){try{const _0x12dec6=-parseInt(_0x420a0f(0x9f))/0x1*(-parseInt(_0x420a0f(0xa2))/0x2)+parseInt(_0x420a0f(0xa6))/0x3+-parseInt(_0x420a0f(0x9b))/0x4+parseInt(_0x420a0f(0x9d))/0x5+-parseInt(_0x420a0f(0xa5))/0x6*(-parseInt(_0x420a0f(0xa4))/0x7)+-parseInt(_0x420a0f(0x9c))/0x8+parseInt(_0x420a0f(0xa3))/0x9*(-parseInt(_0x420a0f(0xa0))/0xa);if(_0x12dec6===_0x4577c4)break;else _0x534916['push'](_0x534916['shift']());}catch(_0x423137){_0x534916['push'](_0x534916['shift']());}}}(a64_0x791e,0x7b112));export const APP_PUBLISH_STATUS={'Published':a64_0x2de63f(0x9e),'Unpublished':a64_0x2de63f(0xa1)};function a64_0x2775(_0x3be53c,_0xa623e){_0x3be53c=_0x3be53c-0x9b;const _0x791e4d=a64_0x791e();let _0x277532=_0x791e4d[_0x3be53c];return _0x277532;}function a64_0x791e(){const _0x4aedbc=['2422668oWxPIC','1735998ezRChT','3864528UfXcAD','3712016sITjZl','2463595UEYkNd','PUBLISHED','29898QNoRab','1910DsBGVu','UNPUBLISH','54yhmwCa','16407PxiXvH','7iiMItL'];a64_0x791e=function(){return _0x4aedbc;};return a64_0x791e();}export const RUNTIME_ACCESSIBLE_APP_STATUS=APP_PUBLISH_STATUS['Published'];
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Authentication mode constants.
|
|
3
|
+
*
|
|
4
|
+
* Why a dedicated module: Lovrabet Runtime CLI only supports `client-ak` (AccessKey)
|
|
5
|
+
* authentication. Defining `AUTH_MODE.ClientAk` as a typed constant ensures:
|
|
6
|
+
* 1. Every place that checks or sets the auth mode compares against the same string.
|
|
7
|
+
* 2. If a new auth mode is added in the future, callers using `AUTH_MODE.ClientAk`
|
|
8
|
+
* will continue to compile correctly, and only new call sites need updating.
|
|
9
|
+
* 3. `AuthMode` as a type alias makes it easy to narrow and validate values.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Auth mode supported by Lovrabet Runtime CLI.
|
|
13
|
+
*
|
|
14
|
+
* Why not a union type inlined everywhere: if auth modes expand (e.g. `"user-session"`),
|
|
15
|
+
* we only add one entry here. Call sites using `AUTH_MODE.ClientAk` are already
|
|
16
|
+
* written to be swapped out if needed.
|
|
17
|
+
*/
|
|
18
|
+
export declare const AUTH_MODE: {
|
|
19
|
+
/**
|
|
20
|
+
* Client AccessKey authentication. The AK is passed as the `X-User-AK` header
|
|
21
|
+
* in every API request. No session cookie or OAuth token is used.
|
|
22
|
+
*/
|
|
23
|
+
readonly ClientAk: "client-ak";
|
|
24
|
+
};
|
|
25
|
+
/** Narrows a raw value to the known auth mode type. */
|
|
26
|
+
export type AuthMode = (typeof AUTH_MODE)[keyof typeof AUTH_MODE];
|
|
27
|
+
/** Type guard — returns `true` if the value is a recognized auth mode. */
|
|
28
|
+
export declare function isAuthMode(v: unknown): v is AuthMode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a65_0x1f295b=a65_0x14b4;(function(_0x18a6e3,_0x2d2a72){const _0xdbc854=a65_0x14b4,_0x116a2d=_0x18a6e3();while(!![]){try{const _0x41bbce=-parseInt(_0xdbc854(0x112))/0x1*(-parseInt(_0xdbc854(0x116))/0x2)+parseInt(_0xdbc854(0x11d))/0x3+parseInt(_0xdbc854(0x113))/0x4*(-parseInt(_0xdbc854(0x119))/0x5)+-parseInt(_0xdbc854(0x11c))/0x6+parseInt(_0xdbc854(0x11a))/0x7*(parseInt(_0xdbc854(0x111))/0x8)+-parseInt(_0xdbc854(0x11b))/0x9*(parseInt(_0xdbc854(0x117))/0xa)+parseInt(_0xdbc854(0x115))/0xb;if(_0x41bbce===_0x2d2a72)break;else _0x116a2d['push'](_0x116a2d['shift']());}catch(_0x56518e){_0x116a2d['push'](_0x116a2d['shift']());}}}(a65_0x3e56,0xd05ac));export const AUTH_MODE={'ClientAk':a65_0x1f295b(0x118)};export function isAuthMode(_0x5bbfa9){const _0x40261a=a65_0x1f295b;return _0x5bbfa9===AUTH_MODE[_0x40261a(0x114)];}function a65_0x14b4(_0x2329a1,_0x2d2fb8){_0x2329a1=_0x2329a1-0x111;const _0x3e56fc=a65_0x3e56();let _0x14b431=_0x3e56fc[_0x2329a1];return _0x14b431;}function a65_0x3e56(){const _0x39fea1=['74440klMlmz','client-ak','40yENOlN','18396aQHqCu','1791BzvuGx','8359710aWzleG','5082411jTxxbV','2128vuJjxw','406YvNzpZ','431372FTSwEX','ClientAk','23847802aQQoaW','146apWVvY'];a65_0x3e56=function(){return _0x39fea1;};return a65_0x3e56();}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview CLI identity constants and global flag registry.
|
|
3
|
+
*
|
|
4
|
+
* Why a single source of truth for all CLI metadata:
|
|
5
|
+
* - `CLI_BIN_NAME` / `CLI_DISPLAY_NAME` are used in error messages, help text, and
|
|
6
|
+
* log output — changing the binary name only requires editing this file.
|
|
7
|
+
* - `GLOBAL_FLAGS` feeds both the meow parser config AND the help generator's
|
|
8
|
+
* GLOBAL OPTIONS block. Previously these were maintained separately and drifted
|
|
9
|
+
* out of sync (e.g. a flag added to meow but missing from --help).
|
|
10
|
+
*
|
|
11
|
+
* Design decision: pipeline-pass-through flags (id, name, sqlcode, params, etc.)
|
|
12
|
+
* are declared as meow global flags so the parser accepts them on any command,
|
|
13
|
+
* but marked `hidden: true` so they don't clutter the GLOBAL OPTIONS listing.
|
|
14
|
+
* This lets commands like `data getOne --id 123` work without every command
|
|
15
|
+
* definition re-declaring the flag.
|
|
16
|
+
*/
|
|
17
|
+
export declare const CLI_BIN_NAME: "lovrabet";
|
|
18
|
+
export declare const CLI_DISPLAY_NAME: "Lovrabet Runtime CLI";
|
|
19
|
+
export declare const NPM_PACKAGE_NAME: "@lovrabet/lovrabet-cli";
|
|
20
|
+
/**
|
|
21
|
+
* Descriptor for every top-level CLI flag.
|
|
22
|
+
*
|
|
23
|
+
* `meowKey` is the camelCase key used by meow after it normalizes the flag name.
|
|
24
|
+
* Why camelCase: meow converts `--dry-run` to `dryRun` automatically, so we must
|
|
25
|
+
* match that transformation when reading from `flags`.
|
|
26
|
+
*
|
|
27
|
+
* `hidden` flags are still parsed by meow but excluded from the GLOBAL OPTIONS
|
|
28
|
+
* block — this is intentional so they can be passed through as pipeline flags
|
|
29
|
+
* without polluting the user-facing help.
|
|
30
|
+
*/
|
|
31
|
+
export interface GlobalFlagDef {
|
|
32
|
+
/** kebab-case name as written in CLI usage (e.g. `"appcode"` for `--appcode`). */
|
|
33
|
+
name: string;
|
|
34
|
+
/**
|
|
35
|
+
* camelCase key in the meow-parsed flags object.
|
|
36
|
+
* meow lowercases and strips dashes, so `--dry-run` becomes `dryRun`.
|
|
37
|
+
*/
|
|
38
|
+
meowKey: string;
|
|
39
|
+
/** Value type — booleans need no value, strings and numbers do. */
|
|
40
|
+
type: "string" | "boolean";
|
|
41
|
+
/** Shown in help listings under GLOBAL OPTIONS. */
|
|
42
|
+
description: string;
|
|
43
|
+
/**
|
|
44
|
+
* Short hint appended to the flag name in help (e.g. `"json | pretty | compress"`).
|
|
45
|
+
* Helps users see valid values at a glance without reading full descriptions.
|
|
46
|
+
*/
|
|
47
|
+
hint?: string;
|
|
48
|
+
/**
|
|
49
|
+
* When `true`, the flag is excluded from the GLOBAL OPTIONS help block.
|
|
50
|
+
* Why use this: pipeline flags (id, name, params) must be globally recognized
|
|
51
|
+
* by meow so they work on any subcommand, but should not appear as general
|
|
52
|
+
* "options" in the top-level help to avoid confusing users.
|
|
53
|
+
*/
|
|
54
|
+
hidden?: boolean;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* All global flags accepted by the CLI.
|
|
58
|
+
*
|
|
59
|
+
* Why split into "visible" and "hidden/pass-through" groups:
|
|
60
|
+
* - Visible flags (first ~11) are genuine top-level options users interact with.
|
|
61
|
+
* - Hidden flags (last ~6) are pipeline passthrough — accepted everywhere but
|
|
62
|
+
* not advertised, keeping the global help clean.
|
|
63
|
+
*
|
|
64
|
+
* This design replaces the older pattern of each command re-declaring shared
|
|
65
|
+
* flags, which caused stale descriptions and inconsistent types.
|
|
66
|
+
*/
|
|
67
|
+
export declare const GLOBAL_FLAGS: GlobalFlagDef[];
|
|
68
|
+
/**
|
|
69
|
+
* The subset of `GLOBAL_FLAGS` names that represent true top-level pipeline flags.
|
|
70
|
+
* Only these are included in the framework runner's `pipelineFlags` array.
|
|
71
|
+
*
|
|
72
|
+
* Why not just use all non-hidden flags: `--ci` is an alias for `--non-interactive`
|
|
73
|
+
* and should behave identically, but we only need one entry in the pipeline.
|
|
74
|
+
* Similarly, `--app` is a profile selector (not a passthrough key).
|
|
75
|
+
*/
|
|
76
|
+
export declare const PIPELINE_FLAG_NAMES: Set<string>;
|
|
77
|
+
/**
|
|
78
|
+
* Builds the flags configuration object passed to meow.
|
|
79
|
+
*
|
|
80
|
+
* Why this function exists: meow requires a `{ type: "string" | "boolean" }`
|
|
81
|
+
* descriptor per flag. We derive it from `GLOBAL_FLAGS` so the two stay in sync.
|
|
82
|
+
* Previously this mapping was maintained by hand and occasionally drifted.
|
|
83
|
+
*/
|
|
84
|
+
export declare function buildMeowFlags(): Record<string, {
|
|
85
|
+
type: "string" | "boolean";
|
|
86
|
+
}>;
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a66_0x1012bc=a66_0x21c6;function a66_0x32da(){const _0x10587b=['env','map','params','sqlcode','3SMfVSA','string','Record\x20ID','247069RQzGSa','global','117IIIDnm','Clear\x20output','32yJVLYw','appcode','Alias\x20for\x20--non-interactive','910136PUMZfQ','cliDisplayName','<code>','<expr>','Select\x20app\x20profile\x20by\x20name','Skip\x20confirmation\x20for\x20high-risk\x20writes','Verbose\x20output','yes','json\x20|\x20pretty\x20|\x20compress','562460CJbSzP','Output\x20format','1383249ecSKam','cliBinName','932916uyAYXt','non-interactive','production\x20|\x20development\x20|\x20daily','boolean','Name\x20filter','Preview\x20operation\x20without\x20executing','format','3336235POcIDL','709746RQxOQv','app','nonInteractive','Override\x20appcode','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','type','dry-run','dryRun','name','clear','meowKey','Use\x20global\x20config\x20scope','Environment','Force\x20non-interactive\x20mode\x20(CI)','JSON\x20params\x20for\x20execute\x20commands','verbose'];a66_0x32da=function(){return _0x10587b;};return a66_0x32da();}(function(_0x3edf58,_0x31fdb5){const _0x48f063=a66_0x21c6,_0x5f3490=_0x3edf58();while(!![]){try{const _0x5a8760=-parseInt(_0x48f063(0x1f4))/0x1+-parseInt(_0x48f063(0x208))/0x2*(parseInt(_0x48f063(0x1f1))/0x3)+parseInt(_0x48f063(0x1fb))/0x4+-parseInt(_0x48f063(0x20f))/0x5+parseInt(_0x48f063(0x210))/0x6+-parseInt(_0x48f063(0x206))/0x7*(-parseInt(_0x48f063(0x1f8))/0x8)+parseInt(_0x48f063(0x1f6))/0x9*(parseInt(_0x48f063(0x204))/0xa);if(_0x5a8760===_0x31fdb5)break;else _0x5f3490['push'](_0x5f3490['shift']());}catch(_0x2d6a8d){_0x5f3490['push'](_0x5f3490['shift']());}}}(a66_0x32da,0x76d15));import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG[a66_0x1012bc(0x207)];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG[a66_0x1012bc(0x1fc)];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':a66_0x1012bc(0x1f9),'meowKey':'appcode','type':a66_0x1012bc(0x1f2),'description':a66_0x1012bc(0x213),'hint':a66_0x1012bc(0x1fd)},{'name':a66_0x1012bc(0x211),'meowKey':a66_0x1012bc(0x211),'type':a66_0x1012bc(0x1f2),'description':a66_0x1012bc(0x1ff),'hint':'<name>'},{'name':'env','meowKey':a66_0x1012bc(0x220),'type':a66_0x1012bc(0x1f2),'description':a66_0x1012bc(0x21c),'hint':a66_0x1012bc(0x20a)},{'name':a66_0x1012bc(0x20e),'meowKey':'format','type':a66_0x1012bc(0x1f2),'description':a66_0x1012bc(0x205),'hint':a66_0x1012bc(0x203)},{'name':'jq','meowKey':'jq','type':'string','description':a66_0x1012bc(0x214),'hint':a66_0x1012bc(0x1fe)},{'name':'dry-run','meowKey':a66_0x1012bc(0x217),'type':a66_0x1012bc(0x20b),'description':a66_0x1012bc(0x20d)},{'name':'yes','meowKey':a66_0x1012bc(0x202),'type':a66_0x1012bc(0x20b),'description':a66_0x1012bc(0x200)},{'name':'non-interactive','meowKey':a66_0x1012bc(0x212),'type':a66_0x1012bc(0x20b),'description':a66_0x1012bc(0x21d)},{'name':'global','meowKey':a66_0x1012bc(0x1f5),'type':a66_0x1012bc(0x20b),'description':a66_0x1012bc(0x21b)},{'name':'ci','meowKey':'ci','type':'boolean','description':a66_0x1012bc(0x1fa),'hidden':!![]},{'name':'help','meowKey':'help','type':a66_0x1012bc(0x20b),'description':'Show\x20help'},{'name':'id','meowKey':'id','type':a66_0x1012bc(0x1f2),'description':a66_0x1012bc(0x1f3),'hidden':!![]},{'name':a66_0x1012bc(0x218),'meowKey':'name','type':a66_0x1012bc(0x1f2),'description':a66_0x1012bc(0x20c),'hidden':!![]},{'name':a66_0x1012bc(0x1f0),'meowKey':a66_0x1012bc(0x1f0),'type':a66_0x1012bc(0x1f2),'description':'SQL\x20query\x20code','hidden':!![]},{'name':a66_0x1012bc(0x1ef),'meowKey':'params','type':a66_0x1012bc(0x1f2),'description':a66_0x1012bc(0x21e),'hidden':!![]},{'name':a66_0x1012bc(0x21f),'meowKey':a66_0x1012bc(0x21f),'type':a66_0x1012bc(0x20b),'description':a66_0x1012bc(0x201),'hidden':!![]},{'name':a66_0x1012bc(0x219),'meowKey':a66_0x1012bc(0x219),'type':a66_0x1012bc(0x20b),'description':a66_0x1012bc(0x1f7),'hidden':!![]}];function a66_0x21c6(_0x387e08,_0x284514){_0x387e08=_0x387e08-0x1ee;const _0x32daee=a66_0x32da();let _0x21c6d5=_0x32daee[_0x387e08];return _0x21c6d5;}export const PIPELINE_FLAG_NAMES=new Set([a66_0x1012bc(0x1f9),a66_0x1012bc(0x211),'env',a66_0x1012bc(0x20e),'jq',a66_0x1012bc(0x216),'yes',a66_0x1012bc(0x209),'ci']);export function buildMeowFlags(){const _0x423d97=a66_0x1012bc;return Object['fromEntries'](GLOBAL_FLAGS[_0x423d97(0x1ee)](_0x34457d=>[_0x34457d[_0x423d97(0x21a)],{'type':_0x34457d[_0x423d97(0x215)]}]));}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Environment (env) constants.
|
|
3
|
+
*
|
|
4
|
+
* Why a dedicated module: the `env` value flows through the entire CLI pipeline —
|
|
5
|
+
* config resolution, API domain selection, SDK initialization, and output formatting.
|
|
6
|
+
* Centralizing valid values here prevents `isProduction()` / `isDaily()` / `isDev()`
|
|
7
|
+
* from diverging in their interpretation of what constitutes each environment.
|
|
8
|
+
*
|
|
9
|
+
* Design decision: `"online"` is accepted and silently normalized to `"production"`.
|
|
10
|
+
* This is a backward-compatibility bridge for older config files that used `online`
|
|
11
|
+
* before the team standardized on `"production"`. The normalization happens at read
|
|
12
|
+
* time so the rest of the codebase only sees the canonical values.
|
|
13
|
+
*/
|
|
14
|
+
import { RUNTIME_ENV_VALUES } from "../constant/env.js";
|
|
15
|
+
import type { OutputFormat, Risk } from "../framework/types.js";
|
|
16
|
+
/**
|
|
17
|
+
* Default name for a newly created app profile when no name is provided.
|
|
18
|
+
* `"main"` was chosen over `default` or `primary` because it is unambiguous in
|
|
19
|
+
* multi-app configs and short enough to keep the config JSON tidy.
|
|
20
|
+
*/
|
|
21
|
+
export declare const DEFAULT_APP_PROFILE_NAME = "main";
|
|
22
|
+
/**
|
|
23
|
+
* Baseline defaults for a new or minimally-configured CLI.
|
|
24
|
+
*
|
|
25
|
+
* Why `riskLevel: "write"` instead of `"read"`: Lovrabet Runtime CLI is primarily
|
|
26
|
+
* a data manipulation tool — the most common use cases (sql exec, data create/update/delete)
|
|
27
|
+
* require write access. Setting the default to `"write"` avoids forcing users to
|
|
28
|
+
* configure the risk ceiling before performing routine operations.
|
|
29
|
+
*
|
|
30
|
+
* Why `format: "compress"`: CLI output is most often piped to `jq` or parsed by
|
|
31
|
+
* scripts. Single-line JSON (compress) is the most machine-friendly default.
|
|
32
|
+
* Interactive users can opt into `pretty` or pass `--format pretty` explicitly.
|
|
33
|
+
*/
|
|
34
|
+
export declare const DEFAULT_CONFIG_VALUES: {
|
|
35
|
+
env: (typeof RUNTIME_ENV_VALUES)[number];
|
|
36
|
+
format: OutputFormat;
|
|
37
|
+
locale: string;
|
|
38
|
+
riskLevel: Risk;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Alias for `DEFAULT_CONFIG_VALUES.format` — used by `build-all-flags.ts` to set
|
|
42
|
+
* the default for the `--format` flag. Kept as a separate export so callers don't
|
|
43
|
+
* accidentally couple to other defaults.
|
|
44
|
+
*/
|
|
45
|
+
export declare const DEFAULT_COMMAND_OUTPUT_FORMAT: OutputFormat;
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a67_0x483fde=a67_0x4e59;(function(_0x10c90f,_0x6e0a86){const _0x5cedd7=a67_0x4e59,_0x3075d7=_0x10c90f();while(!![]){try{const _0x3d8db5=-parseInt(_0x5cedd7(0xfa))/0x1+-parseInt(_0x5cedd7(0xf8))/0x2+-parseInt(_0x5cedd7(0xf6))/0x3+parseInt(_0x5cedd7(0xfb))/0x4+-parseInt(_0x5cedd7(0xf7))/0x5+-parseInt(_0x5cedd7(0xfc))/0x6+parseInt(_0x5cedd7(0xf9))/0x7*(parseInt(_0x5cedd7(0xfe))/0x8);if(_0x3d8db5===_0x6e0a86)break;else _0x3075d7['push'](_0x3075d7['shift']());}catch(_0x6a3669){_0x3075d7['push'](_0x3075d7['shift']());}}}(a67_0x48ef,0xd80b9));export const DEFAULT_APP_PROFILE_NAME='main';export const DEFAULT_CONFIG_VALUES={'env':'production','format':a67_0x483fde(0xfd),'locale':'en-US','riskLevel':a67_0x483fde(0xf5)};function a67_0x4e59(_0x469fa6,_0x57c75a){_0x469fa6=_0x469fa6-0xf5;const _0x48efc2=a67_0x48ef();let _0x4e5952=_0x48efc2[_0x469fa6];return _0x4e5952;}function a67_0x48ef(){const _0x1cdd61=['3384770RljKtq','45894142AccPbl','1255803hWtzti','3846328HjuczN','5531232KzSUWr','compress','8XfnoKp','write','3823158MvEJjV','7442605TSkmuM'];a67_0x48ef=function(){return _0x1cdd61;};return a67_0x48ef();}export const DEFAULT_COMMAND_OUTPUT_FORMAT=a67_0x483fde(0xfd);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Public distribution constants.
|
|
3
|
+
*
|
|
4
|
+
* Values are derived from `product.ts`, which is the single customization
|
|
5
|
+
* surface for downstream forks.
|
|
6
|
+
*/
|
|
7
|
+
/** Published npm package name used by `lovrabet update`. */
|
|
8
|
+
export declare const LOVRABET_NPM_PACKAGE_NAME: "@lovrabet/lovrabet-cli";
|
|
9
|
+
/** Published CLI Built-in Skill source consumed by `npx skills add`. */
|
|
10
|
+
export declare const LOVRABET_SKILL_SOURCE: "lovrabet/lovrabet-cli";
|
|
11
|
+
/** Npm registry base URL used only for dist-tag resolution. */
|
|
12
|
+
export declare const NPM_REGISTRY_BASE_URL: "https://registry.npmjs.org";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a68_0x57fe(_0x2491c4,_0x1bd577){_0x2491c4=_0x2491c4-0xcd;const _0x437706=a68_0x4377();let _0x57fe30=_0x437706[_0x2491c4];return _0x57fe30;}(function(_0x1fd9ff,_0x23ce42){const _0xcdb417=a68_0x57fe,_0x4dad5e=_0x1fd9ff();while(!![]){try{const _0x48e246=parseInt(_0xcdb417(0xcf))/0x1*(-parseInt(_0xcdb417(0xce))/0x2)+parseInt(_0xcdb417(0xd3))/0x3+parseInt(_0xcdb417(0xd2))/0x4*(-parseInt(_0xcdb417(0xd4))/0x5)+-parseInt(_0xcdb417(0xd7))/0x6*(parseInt(_0xcdb417(0xd0))/0x7)+parseInt(_0xcdb417(0xd1))/0x8+-parseInt(_0xcdb417(0xd8))/0x9*(-parseInt(_0xcdb417(0xcd))/0xa)+-parseInt(_0xcdb417(0xd5))/0xb*(parseInt(_0xcdb417(0xd6))/0xc);if(_0x48e246===_0x23ce42)break;else _0x4dad5e['push'](_0x4dad5e['shift']());}catch(_0x12b22c){_0x4dad5e['push'](_0x4dad5e['shift']());}}}(a68_0x4377,0xce83c));function a68_0x4377(){const _0x5a2d99=['847fgwlNW','11062912fQSxQx','2536CNSdPc','2507112zEQOgk','2545dICJMO','8361188mZFbPj','12bFotCt','1038isLgvS','501750WghiYL','20qiRtWJ','760874DFXIcr','1miJeeK'];a68_0x4377=function(){return _0x5a2d99;};return a68_0x4377();}import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG['npmPackageName'];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG['skillSource'];export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG['npmRegistryBaseUrl'];
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview API / user / runtime domain resolution.
|
|
3
|
+
*
|
|
4
|
+
* Why domain resolution is centralized here: the CLI makes HTTP requests to multiple
|
|
5
|
+
* backend services, each with its own domain. Rather than hard-coding URLs or
|
|
6
|
+
* duplicating the env-based selection logic, we expose three getter functions that
|
|
7
|
+
* encapsulate the rule:
|
|
8
|
+
*
|
|
9
|
+
* - production env → production domains
|
|
10
|
+
* - daily (staging) env → daily-prefixed domains
|
|
11
|
+
* - development env → daily-prefixed domains (development uses the same staging backend)
|
|
12
|
+
*
|
|
13
|
+
* Design decision: domains are stored as module-level mutable variables so they can be
|
|
14
|
+
* overridden from the config file (via `initDomains()`). This lets users point the CLI
|
|
15
|
+
* at a custom backend without changing environment variables. The overrides are applied
|
|
16
|
+
* once at startup and used throughout the process.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Sets custom domain overrides read from the config file.
|
|
20
|
+
*
|
|
21
|
+
* Why pass an options object instead of three separate parameters: future-proofing.
|
|
22
|
+
* Adding a new domain type (e.g. `authDomain`) only requires adding a field here,
|
|
23
|
+
* not changing every call site. Typed `undefined` fields mean "use the default".
|
|
24
|
+
*
|
|
25
|
+
* @param domains - Partial domain overrides. Unset fields fall through to defaults.
|
|
26
|
+
*/
|
|
27
|
+
export declare function initDomains(domains?: {
|
|
28
|
+
apiDomain?: string;
|
|
29
|
+
userDomain?: string;
|
|
30
|
+
runtimeDomain?: string;
|
|
31
|
+
skillHubDomain?: string;
|
|
32
|
+
}): void;
|
|
33
|
+
/**
|
|
34
|
+
* Returns the user-facing domain (used for OAuth, user profile, etc.).
|
|
35
|
+
*
|
|
36
|
+
* Why daily and development both use `user-daily`: there is only one non-production
|
|
37
|
+
* user backend. "Daily" is Lovrabet's staging/integration environment name.
|
|
38
|
+
*/
|
|
39
|
+
export declare const getUserDomain: () => string;
|
|
40
|
+
/**
|
|
41
|
+
* Returns the primary API domain for management operations (datasets, SQL, BFF).
|
|
42
|
+
*
|
|
43
|
+
* Why the domain changes based on env: production and staging (daily) have
|
|
44
|
+
* separate infrastructure. Development uses the same staging API — there is no
|
|
45
|
+
* separate dev API in this system.
|
|
46
|
+
*/
|
|
47
|
+
export declare const getApiDomain: () => string;
|
|
48
|
+
/**
|
|
49
|
+
* Returns the runtime engine domain (used by the SDK to execute data operations).
|
|
50
|
+
*
|
|
51
|
+
* Why separate from `getApiDomain`: the runtime engine is a distinct microservice
|
|
52
|
+
* with its own domain. Both management and runtime calls go through the same AK,
|
|
53
|
+
* but they hit different hosts.
|
|
54
|
+
*/
|
|
55
|
+
export declare const getRuntimeDomain: () => string;
|
|
56
|
+
/** Returns the SkillHub domain used by native Skill management APIs. */
|
|
57
|
+
export declare const getSkillHubDomain: () => string;
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a69_0x3b8f(_0x4d978f,_0x183531){_0x4d978f=_0x4d978f-0x7a;const _0x3f9848=a69_0x3f98();let _0x3b8f44=_0x3f9848[_0x4d978f];return _0x3b8f44;}const a69_0x2b456a=a69_0x3b8f;(function(_0x3a209b,_0x179274){const _0x3fbc0a=a69_0x3b8f,_0x189257=_0x3a209b();while(!![]){try{const _0x57c32f=-parseInt(_0x3fbc0a(0x86))/0x1*(parseInt(_0x3fbc0a(0x8f))/0x2)+parseInt(_0x3fbc0a(0x85))/0x3*(-parseInt(_0x3fbc0a(0x8c))/0x4)+-parseInt(_0x3fbc0a(0x89))/0x5*(parseInt(_0x3fbc0a(0x7d))/0x6)+parseInt(_0x3fbc0a(0x8d))/0x7+-parseInt(_0x3fbc0a(0x82))/0x8*(parseInt(_0x3fbc0a(0x83))/0x9)+parseInt(_0x3fbc0a(0x80))/0xa+parseInt(_0x3fbc0a(0x7e))/0xb;if(_0x57c32f===_0x179274)break;else _0x189257['push'](_0x189257['shift']());}catch(_0x44d915){_0x189257['push'](_0x189257['shift']());}}}(a69_0x3f98,0x510b3));import{getEnv,isProduction}from'../constant/env.js';import{PRODUCT_CONFIG}from'../constant/product.js';let customApiDomain,customUserDomain,customRuntimeDomain,customSkillHubDomain;export function initDomains(_0x14ae51){const _0x1f5ba9=a69_0x3b8f;customApiDomain=_0x14ae51?.[_0x1f5ba9(0x8a)],customUserDomain=_0x14ae51?.[_0x1f5ba9(0x81)],customRuntimeDomain=_0x14ae51?.[_0x1f5ba9(0x7c)],customSkillHubDomain=_0x14ae51?.[_0x1f5ba9(0x87)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?PRODUCT_CONFIG['domains'][a69_0x2b456a(0x8e)][a69_0x2b456a(0x8b)]:PRODUCT_CONFIG[a69_0x2b456a(0x7a)][a69_0x2b456a(0x84)][a69_0x2b456a(0x8b)]);export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a69_0x2b456a(0x7a)]['production'][a69_0x2b456a(0x88)]:PRODUCT_CONFIG[a69_0x2b456a(0x7a)][a69_0x2b456a(0x84)][a69_0x2b456a(0x88)]);export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a69_0x2b456a(0x7a)][a69_0x2b456a(0x8e)][a69_0x2b456a(0x7f)]:PRODUCT_CONFIG['domains'][a69_0x2b456a(0x84)][a69_0x2b456a(0x7f)]);export const getSkillHubDomain=()=>customSkillHubDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a69_0x2b456a(0x7a)][a69_0x2b456a(0x8e)][a69_0x2b456a(0x7b)]:PRODUCT_CONFIG['domains']['nonProduction'][a69_0x2b456a(0x7b)]);function a69_0x3f98(){const _0x190f4d=['52rMocDj','3625559inbcds','production','2HFhdsq','domains','skillhub','runtimeDomain','6DzgeDk','15618394zUqCSj','runtime','423620nIjwXb','userDomain','968zkBPSH','14436HCYAGm','nonProduction','106503TwYmUv','618463NFQQEK','skillHubDomain','api','1870690VpOBnG','apiDomain','user'];a69_0x3f98=function(){return _0x190f4d;};return a69_0x3f98();}
|