@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
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a87_0x4a23f0=a87_0x908c;(function(_0x166a46,_0x1e8da5){const _0x12de73=a87_0x908c,_0x20fa58=_0x166a46();while(!![]){try{const _0x292816=-parseInt(_0x12de73(0x1a7))/0x1*(-parseInt(_0x12de73(0x19f))/0x2)+-parseInt(_0x12de73(0x18a))/0x3*(-parseInt(_0x12de73(0x18b))/0x4)+parseInt(_0x12de73(0x1aa))/0x5+-parseInt(_0x12de73(0x1a8))/0x6*(-parseInt(_0x12de73(0x194))/0x7)+parseInt(_0x12de73(0x1a4))/0x8*(parseInt(_0x12de73(0x18f))/0x9)+parseInt(_0x12de73(0x19b))/0xa+-parseInt(_0x12de73(0x19e))/0xb;if(_0x292816===_0x1e8da5)break;else _0x20fa58['push'](_0x20fa58['shift']());}catch(_0x49eb8c){_0x20fa58['push'](_0x20fa58['shift']());}}}(a87_0x5ba8,0xa1801));import{CliErrors}from'../errors.js';function a87_0x908c(_0x30de63,_0x3128e1){_0x30de63=_0x30de63-0x18a;const _0x5ba8fe=a87_0x5ba8();let _0x908c63=_0x5ba8fe[_0x30de63];return _0x908c63;}const RATE_LIMIT_ERROR_CODES=new Set([a87_0x4a23f0(0x199),a87_0x4a23f0(0x190),a87_0x4a23f0(0x1ac)]);function nonEmptyString(_0x3810f8){const _0x139f2=a87_0x4a23f0;if(typeof _0x3810f8!==_0x139f2(0x1a2))return undefined;const _0x40790d=_0x3810f8[_0x139f2(0x1ab)]();return _0x40790d||undefined;}function buildRetryHint(_0x494840){const _0x1de4f6=a87_0x4a23f0,_0x2d596a=nonEmptyString(_0x494840),_0x4b75f1=_0x2d596a?/^\d+$/[_0x1de4f6(0x18d)](_0x2d596a)?_0x1de4f6(0x19c)+_0x2d596a+_0x1de4f6(0x18e):_0x1de4f6(0x198)+_0x2d596a+'.':'Retry\x20after\x20a\x20short\x20delay.';return _0x4b75f1+'\x20Retry\x20only\x20the\x20failed\x20item;\x20keep\x20requests\x20serial\x20and\x20preserve\x20completed\x20checkpoints.';}export function createRateLimitError(_0x2aec98){const _0x3507ca=a87_0x4a23f0,_0xb54729=nonEmptyString(_0x2aec98['errorCode'])?.[_0x3507ca(0x191)](),_0x454619=Number(_0x2aec98['status'])===0x1ad||_0xb54729!==undefined&&RATE_LIMIT_ERROR_CODES[_0x3507ca(0x196)](_0xb54729);if(!_0x454619)return undefined;return CliErrors['rateLimited'](nonEmptyString(_0x2aec98[_0x3507ca(0x195)])??_0x3507ca(0x197),buildRetryHint(_0x2aec98[_0x3507ca(0x1a1)]));}export function readRetryAfter(_0x478038){const _0x474ea5=a87_0x4a23f0;if(!_0x478038||typeof _0x478038!==_0x474ea5(0x192))return undefined;const _0x42abe6=_0x478038[_0x474ea5(0x1a3)];if(typeof _0x42abe6==='function'){const _0x1e5b3b=_0x42abe6[_0x474ea5(0x1a5)](_0x478038,_0x474ea5(0x1a9))??_0x42abe6[_0x474ea5(0x1a5)](_0x478038,'retry-after');return nonEmptyString(_0x1e5b3b);}for(const [_0x1a2ed1,_0x53ab41]of Object[_0x474ea5(0x1a0)](_0x478038)){if(_0x1a2ed1['toLowerCase']()===_0x474ea5(0x19d))return nonEmptyString(_0x53ab41)??(typeof _0x53ab41===_0x474ea5(0x193)?String(_0x53ab41):undefined);}return undefined;}export function readRetryAfterSeconds(_0x293773){const _0x4a7084=a87_0x4a23f0;if(!_0x293773||typeof _0x293773!==_0x4a7084(0x192)||Array[_0x4a7084(0x1a6)](_0x293773))return undefined;const _0x31ba65=_0x293773[_0x4a7084(0x18c)];if(typeof _0x31ba65===_0x4a7084(0x193))return Number[_0x4a7084(0x19a)](_0x31ba65)&&_0x31ba65>=0x0?String(_0x31ba65):undefined;const _0x31b85f=nonEmptyString(_0x31ba65);return _0x31b85f&&/^\d+$/[_0x4a7084(0x18d)](_0x31b85f)?_0x31b85f:undefined;}function a87_0x5ba8(){const _0x2a956c=['MAX_QPS_LIMIT','toUpperCase','object','number','7807331gqplVv','message','has','Request\x20rate\x20limit\x20exceeded.','Retry\x20after\x20','EXCEED_MAX_QPS_LIMIT','isInteger','12671830eQteaO','Wait\x20','retry-after','63896096RbOOyC','2335108LyeynR','entries','retryAfter','string','get','16dcIcpx','call','isArray','1iaHlqP','6NAjaKr','Retry-After','6432645RoyXbK','trim','IP_RATE_LIMIT_EXCEEDED','1011dORbzF','6392seRZVS','retryAfterSeconds','test','\x20seconds\x20before\x20retrying.','4928022rZdCCG'];a87_0x5ba8=function(){return _0x2a956c;};return a87_0x5ba8();}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Re-exports of the framework's response extraction utilities.
|
|
3
|
+
*
|
|
4
|
+
* Why: `extractList` and `extractPaging` are used by API commands (dataset, sql, bff)
|
|
5
|
+
* to normalize heterogeneous API response shapes into a uniform list + paging model.
|
|
6
|
+
* Re-exporting from here keeps the import path short and documents that these
|
|
7
|
+
* utilities are the canonical way to extract data from API responses.
|
|
8
|
+
*/
|
|
9
|
+
export { extractList, extractPaging } from "@lovrabet/cli-framework";
|
|
10
|
+
export type { Paging, ListResponse } from "@lovrabet/cli-framework";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a88_0x4cb5(_0x5eeeb2,_0x2e1969){_0x5eeeb2=_0x5eeeb2-0x182;var _0x5139ce=a88_0x5139();var _0x4cb508=_0x5139ce[_0x5eeeb2];return _0x4cb508;}(function(_0x322aa6,_0x30d1ff){var _0x220a3d=a88_0x4cb5,_0x504d88=_0x322aa6();while(!![]){try{var _0x7b1a28=-parseInt(_0x220a3d(0x18a))/0x1*(-parseInt(_0x220a3d(0x18b))/0x2)+-parseInt(_0x220a3d(0x186))/0x3*(-parseInt(_0x220a3d(0x188))/0x4)+-parseInt(_0x220a3d(0x183))/0x5+-parseInt(_0x220a3d(0x184))/0x6+parseInt(_0x220a3d(0x182))/0x7+parseInt(_0x220a3d(0x185))/0x8*(parseInt(_0x220a3d(0x18c))/0x9)+parseInt(_0x220a3d(0x189))/0xa*(-parseInt(_0x220a3d(0x187))/0xb);if(_0x7b1a28===_0x30d1ff)break;else _0x504d88['push'](_0x504d88['shift']());}catch(_0x2c4eb4){_0x504d88['push'](_0x504d88['shift']());}}}(a88_0x5139,0xc0726));export{extractList,extractPaging}from'@lovrabet/cli-framework';function a88_0x5139(){var _0x5217bc=['222oChLPp','14895397KpJsIc','50524QVOkai','20iRNxUh','350OQcCRp','8818QggBXD','657oiZfMp','6594581DlGsEM','1426560GGYQXi','3090288IJLVIk','96104mnkrai'];a88_0x5139=function(){return _0x5217bc;};return a88_0x5139();}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview High-risk operation confirmation prompts.
|
|
3
|
+
*
|
|
4
|
+
* Why this module exists: the framework runner's `confirmHighRisk` hook calls
|
|
5
|
+
* `requireConfirmationPrompt` with lines provided by the adapter. This module
|
|
6
|
+
* generates the confirmation text from the command definition and flags, so the
|
|
7
|
+
* text is consistent across all high-risk commands without each command implementing
|
|
8
|
+
* its own prompt.
|
|
9
|
+
*
|
|
10
|
+
* Design decision: `reconstructCommandArgv` generates a complete command invocation
|
|
11
|
+
* string ending with `--yes`. This is shown to users in non-interactive mode as
|
|
12
|
+
* the exact command they need to run to bypass the confirmation. Without this,
|
|
13
|
+
* users would have to figure out the correct flags themselves.
|
|
14
|
+
*/
|
|
15
|
+
import type { CommandDefinition } from "../framework/types.js";
|
|
16
|
+
import type { ParsedFlags } from "@lovrabet/cli-framework";
|
|
17
|
+
/**
|
|
18
|
+
* Builds the lines displayed to the user before a high-risk operation.
|
|
19
|
+
*
|
|
20
|
+
* The first line is always a warning with the command label. Subsequent lines
|
|
21
|
+
* (description, affected records) are included only when available.
|
|
22
|
+
*
|
|
23
|
+
* Why include affected records: for delete/update operations, knowing the specific
|
|
24
|
+
* record(s) being targeted reduces the chance of a catastrophic mistake.
|
|
25
|
+
*
|
|
26
|
+
* @param def - Command definition (provides description).
|
|
27
|
+
* @param commandLabel - Full command label, e.g. `"dataset delete"`.
|
|
28
|
+
* @param flags - Parsed flags (used to extract affected record IDs).
|
|
29
|
+
* @returns Lines to display via `requireConfirmationPrompt`.
|
|
30
|
+
*/
|
|
31
|
+
export declare function buildConfirmationLines(def: CommandDefinition, commandLabel: string, flags: ParsedFlags): string[];
|
|
32
|
+
/**
|
|
33
|
+
* Reconstructs a CLI invocation string from a command definition and parsed flags.
|
|
34
|
+
*
|
|
35
|
+
* Why this is useful: when a high-risk command is blocked in non-interactive mode,
|
|
36
|
+
* the error message includes the exact command to re-run with `--yes`. Generating
|
|
37
|
+
* this automatically is less error-prone than asking users to construct it by hand.
|
|
38
|
+
*
|
|
39
|
+
* The reconstructed command always ends with `--yes` so users can copy-paste it
|
|
40
|
+
* directly to proceed.
|
|
41
|
+
*
|
|
42
|
+
* @param def - Command definition.
|
|
43
|
+
* @param flags - Parsed flags to include.
|
|
44
|
+
* @returns Reconstructed CLI invocation, e.g. `lovrabet dataset delete --code abc123 --yes`.
|
|
45
|
+
*/
|
|
46
|
+
export declare function reconstructCommandArgv(def: CommandDefinition, flags: ParsedFlags): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x36397a,_0x33ad83){const _0x5c5ba9=a89_0x5b41,_0x3a53c4=_0x36397a();while(!![]){try{const _0x598a94=-parseInt(_0x5c5ba9(0xa2))/0x1+-parseInt(_0x5c5ba9(0xa5))/0x2+-parseInt(_0x5c5ba9(0xa4))/0x3+-parseInt(_0x5c5ba9(0x99))/0x4*(parseInt(_0x5c5ba9(0xaa))/0x5)+parseInt(_0x5c5ba9(0x96))/0x6+parseInt(_0x5c5ba9(0xa3))/0x7+parseInt(_0x5c5ba9(0xa8))/0x8;if(_0x598a94===_0x33ad83)break;else _0x3a53c4['push'](_0x3a53c4['shift']());}catch(_0x5c5d96){_0x3a53c4['push'](_0x3a53c4['shift']());}}}(a89_0x3649,0x9a111));import{CLI_BIN_NAME}from'../constant/cli.js';function a89_0x5b41(_0x146cb3,_0x5bcb76){_0x146cb3=_0x146cb3-0x8d;const _0x36496e=a89_0x3649();let _0x5b41c3=_0x36496e[_0x146cb3];return _0x5b41c3;}export function buildConfirmationLines(_0x52b55b,_0x3688ec,_0x587625){const _0x47c6d2=a89_0x5b41,_0x512ec9=buildConfirmationContext(_0x52b55b,_0x3688ec,_0x587625),_0x20419d=[_0x47c6d2(0xa1)+_0x512ec9['commandLabel']];return _0x512ec9[_0x47c6d2(0x8e)]&&_0x20419d[_0x47c6d2(0xab)](_0x47c6d2(0x9d)+_0x512ec9['description']),_0x512ec9[_0x47c6d2(0x9e)]&&_0x20419d[_0x47c6d2(0xab)]('\x20\x20\x20Affected:\x20'+_0x512ec9[_0x47c6d2(0x9e)]),_0x20419d[_0x47c6d2(0xab)](_0x47c6d2(0x90)),_0x20419d;}function a89_0x3649(){const _0xb5b16a=['name','join','⚠\x20\x20High-risk\x20operation:\x20','503452JDIYMG','5137923mnrCse','3309987wgkmFA','2231086UpAIrW','params=','length','24817048imzqML','title=','21210zoPRhy','push','kind','schedule-id=','cron','service','code','title','description','schedule-id','\x20\x20\x20Continue?\x20[y/N]\x20','name=','cron=','code=','channel','params','1252242BHGNOB','id=','entries','652dcaMbd','kind=','--yes','channel=','\x20\x20\x20','affectedRecords'];a89_0x3649=function(){return _0xb5b16a;};return a89_0x3649();}export function reconstructCommandArgv(_0x4b042d,_0x552bd2){const _0x4f9d73=a89_0x5b41,_0x379119=[CLI_BIN_NAME,_0x4b042d[_0x4f9d73(0xaf)],_0x4b042d['command']];for(const [_0x1ee986,_0x5826ef]of Object[_0x4f9d73(0x98)](_0x552bd2)){if(_0x5826ef===!![])_0x379119[_0x4f9d73(0xab)]('--'+_0x1ee986);else _0x5826ef!==![]&&_0x5826ef!==undefined&&_0x5826ef!==''&&_0x379119[_0x4f9d73(0xab)]('--'+_0x1ee986+'\x20'+JSON['stringify'](_0x5826ef));}return _0x379119[_0x4f9d73(0xab)](_0x4f9d73(0x9b)),_0x379119[_0x4f9d73(0xa0)]('\x20');}function buildConfirmationContext(_0x3793f8,_0x52fe5c,_0x2bcc5b){const _0x5d14f8=extractAffectedRecords(_0x2bcc5b);return{'commandLabel':_0x52fe5c,'description':_0x3793f8['description'],'affectedRecords':_0x5d14f8};}function extractAffectedRecords(_0x560984){const _0x4b4259=a89_0x5b41,_0x53fcfb=[];if(_0x560984[_0x4b4259(0xb0)])_0x53fcfb[_0x4b4259(0xab)](_0x4b4259(0x93)+_0x560984['code']);if(_0x560984['id'])_0x53fcfb[_0x4b4259(0xab)](_0x4b4259(0x97)+_0x560984['id']);if(_0x560984[_0x4b4259(0x8f)])_0x53fcfb['push'](_0x4b4259(0xad)+_0x560984[_0x4b4259(0x8f)]);if(_0x560984[_0x4b4259(0x9f)])_0x53fcfb[_0x4b4259(0xab)](_0x4b4259(0x91)+_0x560984[_0x4b4259(0x9f)]);if(_0x560984[_0x4b4259(0x8d)])_0x53fcfb[_0x4b4259(0xab)](_0x4b4259(0xa9)+_0x560984[_0x4b4259(0x8d)]);if(_0x560984[_0x4b4259(0xac)])_0x53fcfb['push'](_0x4b4259(0x9a)+_0x560984[_0x4b4259(0xac)]);if(_0x560984['cron'])_0x53fcfb['push'](_0x4b4259(0x92)+_0x560984[_0x4b4259(0xae)]);if(_0x560984['scheduled-at'])_0x53fcfb[_0x4b4259(0xab)]('scheduled-at='+_0x560984['scheduled-at']);if(_0x560984[_0x4b4259(0x94)])_0x53fcfb[_0x4b4259(0xab)](_0x4b4259(0x9c)+_0x560984['channel']);if(_0x560984[_0x4b4259(0x95)])_0x53fcfb[_0x4b4259(0xab)](_0x4b4259(0xa6)+_0x560984[_0x4b4259(0x95)]);return _0x53fcfb[_0x4b4259(0xa7)]>0x0?_0x53fcfb[_0x4b4259(0xa0)](',\x20'):undefined;}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Maps SDK errors to user-facing CLI errors.
|
|
3
|
+
*
|
|
4
|
+
* Why this mapping layer exists: the `@lovrabet/sdk` throws `LovrabetError` instances
|
|
5
|
+
* whose `message` field contains internal technical details (stack traces, internal
|
|
6
|
+
* codes) unsuitable for end users. The SDK also surfaces a `description` field that
|
|
7
|
+
* contains the human-readable message set by the API team.
|
|
8
|
+
*
|
|
9
|
+
* This function extracts `description` (when available and non-empty) and uses it
|
|
10
|
+
* as the user-facing message, falling back to `message` only when `description`
|
|
11
|
+
* is absent. Rate-limit failures are mapped to the retryable `rate_limited` contract;
|
|
12
|
+
* other SDK failures retain the existing validation mapping.
|
|
13
|
+
*
|
|
14
|
+
* Design decision: non-LovrabetError errors pass through unchanged. This preserves
|
|
15
|
+
* stack traces and error types for unexpected errors, which is better for debugging
|
|
16
|
+
* than wrapping everything in a generic CLI error.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Maps any error thrown during command execution to a user-facing CLI error.
|
|
20
|
+
*
|
|
21
|
+
* - Rate-limited `LovrabetError` → retryable `rate_limited` `CliError`
|
|
22
|
+
* - Other `LovrabetError` → validation `CliError` with `description` as the message
|
|
23
|
+
* - Everything else → passed through unchanged (preserves stack trace)
|
|
24
|
+
*
|
|
25
|
+
* @param error - Any error from the execute hook.
|
|
26
|
+
* @returns A `CliError` (for Lovrabet errors) or the original error.
|
|
27
|
+
*/
|
|
28
|
+
export declare function mapUserFacingExecuteError(error: unknown): unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a90_0x1a5b(){const _0x2f06df=['1750476VTOFPu','32rPwLcX','5788332qxRcsj','description','status','trim','3777440zbwXTv','1478YjIgqt','code','message','3125580GqHkGc','headers','response','stringify','string','710978uJAMQc','2829rCYrLc','1154993IksElN','validation'];a90_0x1a5b=function(){return _0x2f06df;};return a90_0x1a5b();}(function(_0x1c1edc,_0x4307d0){const _0x13275d=a90_0x1f8a,_0x7ae828=_0x1c1edc();while(!![]){try{const _0x481427=-parseInt(_0x13275d(0x76))/0x1+parseInt(_0x13275d(0x6e))/0x2*(-parseInt(_0x13275d(0x77))/0x3)+parseInt(_0x13275d(0x6d))/0x4+-parseInt(_0x13275d(0x71))/0x5+parseInt(_0x13275d(0x7a))/0x6+-parseInt(_0x13275d(0x78))/0x7*(-parseInt(_0x13275d(0x68))/0x8)+parseInt(_0x13275d(0x69))/0x9;if(_0x481427===_0x4307d0)break;else _0x7ae828['push'](_0x7ae828['shift']());}catch(_0x1c1280){_0x7ae828['push'](_0x7ae828['shift']());}}}(a90_0x1a5b,0x7b9a7));import{LovrabetError}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';export function mapUserFacingExecuteError(_0x281ba2){const _0x35f24c=a90_0x1f8a;if(_0x281ba2 instanceof LovrabetError){const _0x5414c5=userFacingLovrabetMessage(_0x281ba2),_0x5af3df=_0x281ba2,_0x5f32e7=createRateLimitError({'status':_0x5af3df[_0x35f24c(0x6b)],'errorCode':_0x5af3df[_0x35f24c(0x6f)],'message':_0x5414c5,'retryAfter':readRetryAfter(_0x5af3df[_0x35f24c(0x73)]?.[_0x35f24c(0x72)])??readRetryAfterSeconds(_0x5af3df[_0x35f24c(0x73)])});return _0x5f32e7??CliErrors[_0x35f24c(0x79)](_0x5414c5);}return _0x281ba2;}function a90_0x1f8a(_0x3684b0,_0x5dd27f){_0x3684b0=_0x3684b0-0x68;const _0x1a5bb2=a90_0x1a5b();let _0x1f8abd=_0x1a5bb2[_0x3684b0];return _0x1f8abd;}function userFacingLovrabetMessage(_0x11717c){const _0x5943db=a90_0x1f8a,_0x58442b=_0x11717c[_0x5943db(0x6a)];if(_0x58442b!==undefined&&_0x58442b!==null){if(typeof _0x58442b===_0x5943db(0x75)&&_0x58442b['trim']())return _0x58442b[_0x5943db(0x6c)]();try{return JSON[_0x5943db(0x74)](_0x58442b);}catch{}}return _0x11717c[_0x5943db(0x70)];}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 本文件实现 Lovrabet Runtime CLI 对通用命令执行框架的适配。
|
|
3
|
+
* 它负责认证与应用解析、SDK 初始化、风险确认、错误映射、结果输出和全局状态清理,
|
|
4
|
+
* 同时为终端 CLI 与嵌入式 OpenCode 调用提供同一条执行内核。
|
|
5
|
+
*
|
|
6
|
+
* Architecture overview:
|
|
7
|
+
* The framework (`@lovrabet/cli-framework`) owns the generic orchestration loop:
|
|
8
|
+
* parseFlags → validateFlags → validateArgs → riskPolicy → prepare →
|
|
9
|
+
* buildRuntimeContext → validate → dryRun → confirmHighRisk → execute → formatOutput
|
|
10
|
+
*
|
|
11
|
+
* This file implements the `RunnerAdapter` interface with Lovrabet Runtime-specific logic:
|
|
12
|
+
* - `prepare`: resolves AccessKey auth, initializes the SDK client
|
|
13
|
+
* - `confirmHighRisk`: interactive or non-interactive confirmation
|
|
14
|
+
* - `riskPolicy`: logs violations and throws a cancelled error (not validation,
|
|
15
|
+
* because cancelling is not a user error — it is the expected response to "no")
|
|
16
|
+
* - `finalize`: clears the SDK client and active AccessKey from module state
|
|
17
|
+
*
|
|
18
|
+
* Why `riskPolicy.createError` returns `CliErrors.cancelled()`: in Lovrabet CLI's
|
|
19
|
+
* error taxonomy, a blocked high-risk operation in non-interactive mode is a
|
|
20
|
+
* "cancelled" outcome (user can proceed by adding --yes). We use exit code 0
|
|
21
|
+
* (`cancelled`) rather than exit code 1 (`validation_error`) so automated scripts
|
|
22
|
+
* can distinguish "blocked by policy" from "input is wrong".
|
|
23
|
+
*
|
|
24
|
+
* Design decision: `accessKey` is stored in a module-level variable in `api-client.ts`
|
|
25
|
+
* rather than threaded through the context. This simplifies the adapter's `prepare`
|
|
26
|
+
* function and avoids prop-drilling AK through every function. The `finalize`
|
|
27
|
+
* hook clears it after each command to prevent AK leakage across commands in
|
|
28
|
+
* long-running processes.
|
|
29
|
+
*/
|
|
30
|
+
import type { CommandDefinition, OutputFormat, MergedCliSnapshot, RuntimeContextExtras } from "../framework/types.js";
|
|
31
|
+
import type { Risk, RunnerAdapter } from "@lovrabet/cli-framework";
|
|
32
|
+
import type { CLIConfig } from "../context.js";
|
|
33
|
+
import { type AuthMode } from "../constant/auth-mode.js";
|
|
34
|
+
/**
|
|
35
|
+
* Environment values passed into the runner by the CLI entry point.
|
|
36
|
+
*
|
|
37
|
+
* These are the raw values before any dependency resolution — the adapter's
|
|
38
|
+
* `prepare` hook will resolve `accessKey`, initialize the SDK, and populate
|
|
39
|
+
* the extras object.
|
|
40
|
+
*/
|
|
41
|
+
export interface PipelineEnv {
|
|
42
|
+
/** Raw parsed flags from meow (may include PreParse corrections). */
|
|
43
|
+
rawFlags: Record<string, any>;
|
|
44
|
+
/**
|
|
45
|
+
* App code resolved so far — may be undefined if not yet available.
|
|
46
|
+
* `prepare` will validate this is set for commands that need it.
|
|
47
|
+
*/
|
|
48
|
+
appCode: string | undefined;
|
|
49
|
+
/** Source used to resolve `appCode`, used to revalidate explicit `--app`. */
|
|
50
|
+
appCodeSource?: CLIConfig["appCodeSource"];
|
|
51
|
+
/** Runtime API domain (production or daily). */
|
|
52
|
+
apiDomain: string;
|
|
53
|
+
/** `true` when running in CI or when `--non-interactive` was supplied. */
|
|
54
|
+
isNonInteractive: boolean;
|
|
55
|
+
/** Default format from the config file (falls through to --format). */
|
|
56
|
+
defaultFormat?: OutputFormat;
|
|
57
|
+
/** Default page size from the config file. */
|
|
58
|
+
defaultPageSize?: number;
|
|
59
|
+
/** Verbose mode flag from the config file. */
|
|
60
|
+
defaultVerbose?: boolean;
|
|
61
|
+
/** User-configured risk ceiling from the config file. */
|
|
62
|
+
riskLevel?: Risk;
|
|
63
|
+
/** AccessKey resolved from config (may be undefined for public commands). */
|
|
64
|
+
accessKey?: string;
|
|
65
|
+
/** Normalized environment name. */
|
|
66
|
+
env?: "production" | "development" | "daily";
|
|
67
|
+
/** Positional arguments after the subcommand name. */
|
|
68
|
+
args?: string[];
|
|
69
|
+
/** Snapshot of the merged multi-app config. */
|
|
70
|
+
mergedCli?: MergedCliSnapshot;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* 根据当前调用环境选择认证模式。
|
|
74
|
+
* 当前只支持 client-ak;保留函数边界便于未来集中扩展其他认证路由。
|
|
75
|
+
*/
|
|
76
|
+
export declare function resolveAuthMode(env: PipelineEnv): AuthMode;
|
|
77
|
+
/**
|
|
78
|
+
* 根据已加载配置和原始 flags 构造完整 PipelineEnv。
|
|
79
|
+
* appCode 按显式配置、产品环境变量、配置文件的顺序解析,确保调用方获得统一运行环境。
|
|
80
|
+
*/
|
|
81
|
+
export declare function createPipelineEnv(config: CLIConfig, flags: Record<string, any>): PipelineEnv;
|
|
82
|
+
/**
|
|
83
|
+
* 嵌入式调用方可覆盖输出和高风险确认;终端 CLI 使用默认行为。
|
|
84
|
+
*/
|
|
85
|
+
export interface LovrabetRunnerAdapterOptions {
|
|
86
|
+
formatOutput?: RunnerAdapter<PipelineEnv, RuntimeContextExtras>["formatOutput"];
|
|
87
|
+
confirmHighRisk?: RunnerAdapter<PipelineEnv, RuntimeContextExtras>["confirmHighRisk"];
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* 为终端 CLI 或嵌入式调用方创建 runner adapter。
|
|
91
|
+
* 工厂通过进程内扩展点允许嵌入式调用捕获输出并接管确认,同时不修改通用框架。
|
|
92
|
+
*/
|
|
93
|
+
export declare function createLovrabetRunnerAdapter(options?: LovrabetRunnerAdapterOptions): RunnerAdapter<PipelineEnv, RuntimeContextExtras>;
|
|
94
|
+
/**
|
|
95
|
+
* 清理进程级 SDK 和认证状态。
|
|
96
|
+
* 嵌入式调用还会在外层 finally 调用它,以覆盖 dry-run 提前返回及校验或确认失败的路径。
|
|
97
|
+
*/
|
|
98
|
+
export declare function finalizeLovrabetRuntimeState(): Promise<void>;
|
|
99
|
+
/**
|
|
100
|
+
* 执行一个已声明命令;终端默认使用标准 adapter,嵌入式调用可传入自定义 adapter。
|
|
101
|
+
*/
|
|
102
|
+
export declare function runCommand(def: CommandDefinition, env: PipelineEnv, adapter?: RunnerAdapter<PipelineEnv, RuntimeContextExtras>): Promise<void>;
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a90_0x3e0f78=a90_0xf023;(function(_0x31554d,_0x5a8b55){const _0x396237=a90_0xf023,_0x15fe23=_0x31554d();while(!![]){try{const _0x5eb778=parseInt(_0x396237(0x117))/0x1*(parseInt(_0x396237(0xf6))/0x2)+parseInt(_0x396237(0xf8))/0x3+parseInt(_0x396237(0x102))/0x4*(parseInt(_0x396237(0x10a))/0x5)+-parseInt(_0x396237(0x104))/0x6+-parseInt(_0x396237(0x107))/0x7+-parseInt(_0x396237(0x122))/0x8+-parseInt(_0x396237(0x12d))/0x9;if(_0x5eb778===_0x5a8b55)break;else _0x15fe23['push'](_0x15fe23['shift']());}catch(_0x499f19){_0x15fe23['push'](_0x15fe23['shift']());}}}(a90_0x3aee,0x4208f));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../constant/product.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{getApiDomain}from'../constant/domain.js';import{buildConfirmationLines,reconstructCommandArgv}from'../framework/runner-confirmation.js';import{mapUserFacingExecuteError}from'../framework/runner-error.js';function a90_0x3aee(){const _0x2781a2=['authRequired','APPCODE','string','catch','ACCESS_KEY','642eMlHBO','format','887856dDDAuE','accessKey','configMissing','appCode','newConfigFileName','_notice','env','object','service','has','32516cyyMrI','riskLevel','766266UjuyEQ','defaultApp','ClientAk','2464644KkaScZ','requiresAppCode','production','225lGvXQm','\x20or\x20pass\x20','command','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','.appcode\x20to\x20','execute','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','../core/sdk-client.js','items','apiDomain','nonInteractive','error','defaultVerbose','577oZSmIq','name','defaultPageSize','app','validation','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','currentApp','filter','appcode\x20\x22','appcode','verbose','456144uvJEeU','cancelled','Run\x20`','../commands/app/remote-source.js','pageSize','appCodeSource','trim','resolve','schema','\x20\x20To\x20proceed:\x20','isNonInteractive','357066MtHUXC','Unknown\x20app:\x20','mergedCli','../core/api-client.js','rawFlags','requiresAuth','local-alias','pretty'];a90_0x3aee=function(){return _0x2781a2;};return a90_0x3aee();}import{resolveLatestUpdateNotice}from'../utils/update-notice.js';import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';export function resolveAuthMode(_0x52e3df){const _0x2e14b6=a90_0xf023;return void _0x52e3df,AUTH_MODE[_0x2e14b6(0x106)];}let sdkClientInitialized=![];export function createPipelineEnv(_0x5d8ddd,_0x5d3563){const _0x3fa880=a90_0xf023,_0x5a92bf=typeof _0x5d3563[_0x3fa880(0x11a)]==='string'&&_0x5d3563[_0x3fa880(0x11a)][_0x3fa880(0x128)]();return{'rawFlags':_0x5d3563,'appCode':_0x5d8ddd[_0x3fa880(0xfb)]||productEnv(_0x3fa880(0xf2))||(_0x5a92bf?undefined:readAppCodeFromConfig()),'appCodeSource':_0x5d8ddd[_0x3fa880(0x127)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x5d3563),'defaultFormat':_0x5d8ddd['format'],'defaultPageSize':_0x5d8ddd[_0x3fa880(0x126)],'defaultVerbose':_0x5d8ddd[_0x3fa880(0x121)],'riskLevel':_0x5d8ddd[_0x3fa880(0x103)],'accessKey':_0x5d8ddd[_0x3fa880(0xf9)],'env':_0x5d8ddd[_0x3fa880(0xfe)],'mergedCli':{'defaultApp':_0x5d8ddd['defaultApp'],'currentApp':_0x5d8ddd[_0x3fa880(0x11d)],'appCode':_0x5d8ddd[_0x3fa880(0xfb)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a90_0x3e0f78(0x11e)](_0x4c0e7a=>PIPELINE_FLAG_NAMES[a90_0x3e0f78(0x101)](_0x4c0e7a[a90_0x3e0f78(0x118)]))['map'](({name:_0x15206f,type:_0x1a3923,description:_0x165fd1})=>({'name':_0x15206f,'type':_0x1a3923,'description':_0x165fd1})),'formatOutput':formatOutput,'getCommandLabel'(_0x3fba3f){const _0xbceb04=a90_0x3e0f78;return CLI_BIN_NAME+'\x20'+_0x3fba3f[_0xbceb04(0x100)]+'\x20'+_0x3fba3f[_0xbceb04(0x10c)];},'riskPolicy':{'onViolation'(_0xf54dbc){const _0x35bc7b=a90_0x3e0f78;console[_0x35bc7b(0x115)](_0xf54dbc);},'createError'(_0x1deaea){const _0x54835d=a90_0x3e0f78;return CliErrors[_0x54835d(0x123)](_0x1deaea);}},async 'prepare'(_0x3ed928,_0x51aafd){const _0x28b6a9=a90_0x3e0f78,_0x553ce4=resolveAuthMode(_0x51aafd);if(_0x3ed928[_0x28b6a9(0xee)]!==![]){if(!_0x51aafd[_0x28b6a9(0xf9)])throw CliErrors[_0x28b6a9(0xf1)]('Set\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x28b6a9(0xfc)]+_0x28b6a9(0x10b)+productEnvName(_0x28b6a9(0xf5))+'.');const {setActiveAK:_0x9f89b8}=await import(_0x28b6a9(0x130));_0x9f89b8(_0x51aafd['accessKey']);}let _0x2ae7ee='';if(_0x3ed928['requiresAppCode']!==![]){_0x2ae7ee=_0x51aafd[_0x28b6a9(0xfb)]??'',_0x2ae7ee=await resolveExplicitAppName(_0x3ed928,_0x51aafd,_0x2ae7ee);if(!_0x2ae7ee){await assertSelectedAppNameIsRuntimeAccessible(_0x3ed928,_0x51aafd);throw CliErrors[_0x28b6a9(0xfa)](_0x28b6a9(0x10d)+PRODUCT_CONFIG['newConfigFileName']+'.');}await assertAppCodeIsRuntimeAccessible(_0x3ed928,_0x51aafd,_0x2ae7ee);}if(_0x2ae7ee){const {initSdkClient:_0x384ffa}=await import(_0x28b6a9(0x111));_0x384ffa({'appCode':_0x2ae7ee,'env':_0x51aafd['env']??_0x28b6a9(0x109),'accessKey':_0x51aafd[_0x28b6a9(0xf9)],'authMode':_0x553ce4}),sdkClientInitialized=!![];}return{'defaults':{'booleans':{'verbose':_0x51aafd[_0x28b6a9(0x116)]},'numbers':{'pagesize':_0x51aafd[_0x28b6a9(0x119)]}},'extras':{'appCode':_0x2ae7ee,'cookie':'','apiDomain':_0x51aafd[_0x28b6a9(0x113)],'apiDir':'','accessKey':_0x51aafd[_0x28b6a9(0xf9)],'envName':_0x51aafd[_0x28b6a9(0xfe)],'mergedCli':_0x51aafd[_0x28b6a9(0x12f)]}};},async 'confirmHighRisk'({def:_0x502e08,env:_0x4db959,flags:_0x4d7034,commandLabel:_0x16dd33}){const _0x2230f5=a90_0x3e0f78;if(_0x4db959[_0x2230f5(0x12c)]){const _0x535846=reconstructCommandArgv(_0x502e08,_0x4d7034);throw CliErrors[_0x2230f5(0x11b)]('High-risk\x20operation\x20`'+_0x16dd33+_0x2230f5(0x11c)+(_0x2230f5(0x12b)+_0x535846));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x502e08,_0x16dd33,_0x4d7034),'createCancelledError':_0x53d190=>CliErrors[_0x2230f5(0x123)](_0x53d190)});},'mapDryRunError'(_0x55ed22){return mapUserFacingExecuteError(_0x55ed22);},'mapExecuteError'(_0x2e05d4){return mapUserFacingExecuteError(_0x2e05d4);},async 'finalize'(){const _0x11e9e0=a90_0x3e0f78;try{if(sdkClientInitialized){const {clearSdkClient:_0x3a6fa7}=await import(_0x11e9e0(0x111));_0x3a6fa7();}}finally{sdkClientInitialized=![];const {clearActiveAK:_0x1ba8ea}=await import(_0x11e9e0(0x130));_0x1ba8ea();}}};async function resolveExplicitAppName(_0x50ae5e,_0x2e7a56,_0xd28069){const _0x385970=a90_0x3e0f78;if(_0x50ae5e[_0x385970(0x108)]===![])return _0xd28069;const _0x3eb3d9=typeof _0x2e7a56['rawFlags'][_0x385970(0x11a)]===_0x385970(0xf3)?_0x2e7a56['rawFlags'][_0x385970(0x11a)][_0x385970(0x128)]():'';if(!_0x3eb3d9)return _0xd28069;const _0x9081b2=typeof _0x2e7a56[_0x385970(0xed)]['appcode']==='string'&&_0x2e7a56[_0x385970(0xed)][_0x385970(0x120)][_0x385970(0x128)]()||productEnv('APPCODE');if(_0x9081b2||_0x2e7a56[_0x385970(0x127)]===_0x385970(0xef))return _0xd28069;const {getRemoteAppList:_0x49a3ff}=await import(_0x385970(0x125)),_0x152850=await _0x49a3ff({'env':_0x2e7a56[_0x385970(0xfe)]??_0x385970(0x109),'accessKey':_0x2e7a56['accessKey']}),_0x3457e8=findAppByName(_0x152850[_0x385970(0x112)],_0x3eb3d9);if(_0x3457e8&&!isRuntimeAccessibleApp(_0x3457e8))throw runtimeInaccessibleAppError(_0x3457e8,'\x22'+_0x3eb3d9+'\x22');const _0x3aa614=_0x3457e8?.[_0x385970(0xfb)]?.[_0x385970(0x128)]();if(_0x3aa614)return _0x3aa614;throw CliErrors['validation'](_0x385970(0x12e)+_0x3eb3d9,_0x385970(0x124)+CLI_BIN_NAME+_0x385970(0x110)+_0x3eb3d9+_0x385970(0x10e)+PRODUCT_CONFIG['newConfigFileName']+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x3c9da9,_0x3efd6d){const _0x3c8f42=a90_0x3e0f78;if(_0x3c9da9[_0x3c8f42(0x108)]===![]||!_0x3efd6d[_0x3c8f42(0xf9)])return;const _0x1b6534=(typeof _0x3efd6d[_0x3c8f42(0xed)][_0x3c8f42(0x11a)]===_0x3c8f42(0xf3)&&_0x3efd6d['rawFlags'][_0x3c8f42(0x11a)][_0x3c8f42(0x128)]()?_0x3efd6d[_0x3c8f42(0xed)][_0x3c8f42(0x11a)]:_0x3efd6d[_0x3c8f42(0x12f)]?.[_0x3c8f42(0x11d)]??_0x3efd6d[_0x3c8f42(0x12f)]?.[_0x3c8f42(0x105)])?.[_0x3c8f42(0x128)]();if(!_0x1b6534)return;const {getRemoteAppList:_0x3dad84}=await import(_0x3c8f42(0x125)),_0x1c33c3=await _0x3dad84({'env':_0x3efd6d[_0x3c8f42(0xfe)]??_0x3c8f42(0x109),'accessKey':_0x3efd6d['accessKey']}),_0x31007d=findAppByName(_0x1c33c3[_0x3c8f42(0x112)],_0x1b6534);if(_0x31007d&&!isRuntimeAccessibleApp(_0x31007d))throw runtimeInaccessibleAppError(_0x31007d,'\x22'+_0x1b6534+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0xa6b102,_0x2add3a,_0x5ec1f2){const _0x37772d=a90_0x3e0f78;if(_0xa6b102[_0x37772d(0x108)]===![]||!_0x2add3a['accessKey'])return;const {getRemoteAppList:_0x444496}=await import('../commands/app/remote-source.js'),_0x3e95b5=await _0x444496({'env':_0x2add3a[_0x37772d(0xfe)]??_0x37772d(0x109),'accessKey':_0x2add3a[_0x37772d(0xf9)]}),_0x1ac01b=findAppByCode(_0x3e95b5[_0x37772d(0x112)],_0x5ec1f2);if(_0x1ac01b&&!isRuntimeAccessibleApp(_0x1ac01b))throw runtimeInaccessibleAppError(_0x1ac01b,_0x37772d(0x11f)+_0x5ec1f2+'\x22');}export async function runCommand(_0x15a070,_0x1f4386){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x15a070)?withUpdateNotice(_0x15a070):_0x15a070,_0x1f4386,runnerAdapter);}function shouldAttachUpdateNotice(_0x4486e2){const _0x209507=a90_0x3e0f78;return!['update',_0x209507(0x12a),'doctor']['includes'](_0x4486e2[_0x209507(0x100)]);}function a90_0xf023(_0x5ee44c,_0x17177b){_0x5ee44c=_0x5ee44c-0xed;const _0x3aeea1=a90_0x3aee();let _0xf02399=_0x3aeea1[_0x5ee44c];return _0xf02399;}function withUpdateNotice(_0x5570d5){return{..._0x5570d5,async 'execute'(_0xca3160){const _0x16291b=a90_0xf023,_0x39ecb2=shouldResolveUpdateNotice(_0xca3160)?resolveLatestUpdateNotice()[_0x16291b(0xf4)](()=>null):Promise[_0x16291b(0x129)](null),_0x48d118=await _0x5570d5[_0x16291b(0x10f)](_0xca3160);return attachUpdateNotice(_0x48d118,await _0x39ecb2);}};}function shouldResolveUpdateNotice(_0x470122){const _0x26ab0b=a90_0x3e0f78;return _0x470122[_0x26ab0b(0xf7)]===_0x26ab0b(0xf0)&&!_0x470122[_0x26ab0b(0x114)];}function attachUpdateNotice(_0x228ac7,_0x2840ad){const _0x3c5e41=a90_0x3e0f78;if(!_0x2840ad||!_0x228ac7||typeof _0x228ac7!==_0x3c5e41(0xff))return _0x228ac7;const _0x2883d0=_0x228ac7,_0x213b20=typeof _0x2883d0[_0x3c5e41(0xfd)]===_0x3c5e41(0xff)&&_0x2883d0['_notice']!==null?_0x2883d0[_0x3c5e41(0xfd)]:{};return{..._0x2883d0,'_notice':{..._0x213b20,'update':_0x2840ad}};}
|
|
1
|
+
(function(_0xa4da33,_0x57d131){const _0x132398=a91_0x1576,_0x1d226e=_0xa4da33();while(!![]){try{const _0x5e153f=-parseInt(_0x132398(0x12d))/0x1+-parseInt(_0x132398(0x113))/0x2+parseInt(_0x132398(0x10f))/0x3*(parseInt(_0x132398(0x109))/0x4)+parseInt(_0x132398(0x128))/0x5+parseInt(_0x132398(0x102))/0x6*(parseInt(_0x132398(0x10a))/0x7)+parseInt(_0x132398(0x117))/0x8+-parseInt(_0x132398(0x11b))/0x9*(-parseInt(_0x132398(0x100))/0xa);if(_0x5e153f===_0x57d131)break;else _0x1d226e['push'](_0x1d226e['shift']());}catch(_0x355f7d){_0x1d226e['push'](_0x1d226e['shift']());}}}(a91_0x4786,0x2d8ef));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../constant/product.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{getApiDomain}from'../constant/domain.js';function a91_0x1576(_0x5c5ee1,_0x5e0c3a){_0x5c5ee1=_0x5c5ee1-0xed;const _0x478619=a91_0x4786();let _0x1576e3=_0x478619[_0x5c5ee1];return _0x1576e3;}import{buildConfirmationLines,reconstructCommandArgv}from'../framework/runner-confirmation.js';import{mapUserFacingExecuteError}from'../framework/runner-error.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';export function resolveAuthMode(_0x14755f){const _0x1e3fb7=a91_0x1576;return void _0x14755f,AUTH_MODE[_0x1e3fb7(0x11c)];}let sdkClientInitialized=![];export function createPipelineEnv(_0x560720,_0x4c70cb){const _0xe16907=a91_0x1576,_0x2ff13d=typeof _0x4c70cb[_0xe16907(0x12c)]==='string'&&_0x4c70cb[_0xe16907(0x12c)][_0xe16907(0x126)]();return{'rawFlags':_0x4c70cb,'appCode':_0x560720[_0xe16907(0x12b)]||productEnv('APPCODE')||(_0x2ff13d?undefined:readAppCodeFromConfig()),'appCodeSource':_0x560720[_0xe16907(0x10b)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x4c70cb),'defaultFormat':_0x560720[_0xe16907(0x108)],'defaultPageSize':_0x560720['pageSize'],'defaultVerbose':_0x560720[_0xe16907(0xfc)],'riskLevel':_0x560720[_0xe16907(0x104)],'accessKey':_0x560720[_0xe16907(0x115)],'env':_0x560720[_0xe16907(0x10c)],'mergedCli':{'defaultApp':_0x560720[_0xe16907(0xf7)],'currentApp':_0x560720[_0xe16907(0x121)],'appCode':_0x560720[_0xe16907(0x12b)]}};}export function createLovrabetRunnerAdapter(_0x3b421f={}){const _0x60189=a91_0x1576,_0x48241f={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[_0x60189(0x10d)](_0x2b0933=>PIPELINE_FLAG_NAMES[_0x60189(0x116)](_0x2b0933[_0x60189(0xf0)]))['map'](({name:_0x3d78be,type:_0x4b0344,description:_0x24a67c})=>({'name':_0x3d78be,'type':_0x4b0344,'description':_0x24a67c})),'formatOutput':_0x3b421f['formatOutput']??formatOutput,'getCommandLabel'(_0x3c45fd){const _0x850860=_0x60189;return CLI_BIN_NAME+'\x20'+_0x3c45fd[_0x850860(0xf5)]+'\x20'+_0x3c45fd['command'];},'riskPolicy':{'onViolation'(_0x3760da){const _0x363df6=_0x60189;console[_0x363df6(0x127)](_0x3760da);},'createError'(_0x91fcda){return CliErrors['cancelled'](_0x91fcda);}},async 'prepare'(_0x1e304e,_0x499ee0){const _0x359788=_0x60189,_0x562800=resolveAuthMode(_0x499ee0);if(_0x1e304e[_0x359788(0x123)]!==![]){if(!_0x499ee0['accessKey'])throw CliErrors['authRequired'](_0x359788(0xfa)+PRODUCT_CONFIG['newConfigFileName']+_0x359788(0xf1)+productEnvName(_0x359788(0x106))+'.');const {setActiveAK:_0x29a805}=await import('../core/api-client.js');_0x29a805(_0x499ee0[_0x359788(0x115)]);}let _0x2c5158='';if(_0x1e304e[_0x359788(0x101)]!==![]){_0x2c5158=_0x499ee0['appCode']??'',_0x2c5158=await resolveExplicitAppName(_0x1e304e,_0x499ee0,_0x2c5158);if(!_0x2c5158){await assertSelectedAppNameIsRuntimeAccessible(_0x1e304e,_0x499ee0);throw CliErrors[_0x359788(0xef)](_0x359788(0x12a)+PRODUCT_CONFIG['newConfigFileName']+'.');}await assertAppCodeIsRuntimeAccessible(_0x1e304e,_0x499ee0,_0x2c5158);}if(_0x2c5158){const {initSdkClient:_0x8637c9}=await import(_0x359788(0x10e));_0x8637c9({'appCode':_0x2c5158,'env':_0x499ee0[_0x359788(0x10c)]??_0x359788(0x122),'accessKey':_0x499ee0['accessKey'],'authMode':_0x562800}),sdkClientInitialized=!![];}return{'defaults':{'booleans':{'verbose':_0x499ee0[_0x359788(0x11d)]},'numbers':{'pagesize':_0x499ee0[_0x359788(0xf6)]}},'extras':{'appCode':_0x2c5158,'cookie':'','apiDomain':_0x499ee0[_0x359788(0x125)],'apiDir':'','accessKey':_0x499ee0[_0x359788(0x115)],'envName':_0x499ee0[_0x359788(0x10c)],'mergedCli':_0x499ee0[_0x359788(0x118)]}};},'confirmHighRisk':_0x3b421f[_0x60189(0x119)]??(async({def:_0x50af29,env:_0x13e9eb,flags:_0x3df348,commandLabel:_0x4a3a9d})=>{const _0x48a5a4=_0x60189;if(_0x13e9eb[_0x48a5a4(0x114)]){const _0x3dd895=reconstructCommandArgv(_0x50af29,_0x3df348);throw CliErrors[_0x48a5a4(0x112)](_0x48a5a4(0x111)+_0x4a3a9d+_0x48a5a4(0x120)+(_0x48a5a4(0x11e)+_0x3dd895));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x50af29,_0x4a3a9d,_0x3df348),'createCancelledError':_0x53bdad=>CliErrors[_0x48a5a4(0xff)](_0x53bdad)});}),'mapDryRunError'(_0x2fad6d){return mapUserFacingExecuteError(_0x2fad6d);},'mapExecuteError'(_0x549862){return mapUserFacingExecuteError(_0x549862);},async 'finalize'(){await finalizeLovrabetRuntimeState();}};return _0x48241f;}const terminalRunnerAdapter=createLovrabetRunnerAdapter();export async function finalizeLovrabetRuntimeState(){const _0x368f3f=a91_0x1576;try{if(sdkClientInitialized){const {clearSdkClient:_0x512752}=await import(_0x368f3f(0x10e));_0x512752();}}finally{sdkClientInitialized=![];const {clearActiveAK:_0xcd568b}=await import('../core/api-client.js');_0xcd568b();}}async function resolveExplicitAppName(_0x581622,_0x2c355d,_0x135dda){const _0x587f25=a91_0x1576;if(_0x581622[_0x587f25(0x101)]===![])return _0x135dda;const _0x6a4bfb=typeof _0x2c355d[_0x587f25(0xf4)][_0x587f25(0x12c)]===_0x587f25(0x110)?_0x2c355d['rawFlags']['app'][_0x587f25(0x126)]():'';if(!_0x6a4bfb)return _0x135dda;const _0xbc2192=typeof _0x2c355d[_0x587f25(0xf4)][_0x587f25(0x103)]==='string'&&_0x2c355d[_0x587f25(0xf4)][_0x587f25(0x103)]['trim']()||productEnv(_0x587f25(0x129));if(_0xbc2192||_0x2c355d['appCodeSource']===_0x587f25(0x12e))return _0x135dda;const {getRemoteAppList:_0x20400d}=await import(_0x587f25(0xed)),_0x6137aa=await _0x20400d({'env':_0x2c355d[_0x587f25(0x10c)]??_0x587f25(0x122),'accessKey':_0x2c355d['accessKey']}),_0x2334a2=findAppByName(_0x6137aa[_0x587f25(0x107)],_0x6a4bfb);if(_0x2334a2&&!isRuntimeAccessibleApp(_0x2334a2))throw runtimeInaccessibleAppError(_0x2334a2,'\x22'+_0x6a4bfb+'\x22');const _0x2436b5=_0x2334a2?.['appCode']?.[_0x587f25(0x126)]();if(_0x2436b5)return _0x2436b5;throw CliErrors[_0x587f25(0x112)]('Unknown\x20app:\x20'+_0x6a4bfb,'Run\x20`'+CLI_BIN_NAME+'\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.'+_0x6a4bfb+_0x587f25(0x124)+PRODUCT_CONFIG[_0x587f25(0xfd)]+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x18aad7,_0xeaff96){const _0x4e2a25=a91_0x1576;if(_0x18aad7[_0x4e2a25(0x101)]===![]||!_0xeaff96[_0x4e2a25(0x115)])return;const _0x36df0c=(typeof _0xeaff96['rawFlags']['app']===_0x4e2a25(0x110)&&_0xeaff96[_0x4e2a25(0xf4)]['app'][_0x4e2a25(0x126)]()?_0xeaff96[_0x4e2a25(0xf4)]['app']:_0xeaff96['mergedCli']?.[_0x4e2a25(0x121)]??_0xeaff96['mergedCli']?.[_0x4e2a25(0xf7)])?.[_0x4e2a25(0x126)]();if(!_0x36df0c)return;const {getRemoteAppList:_0x43c855}=await import(_0x4e2a25(0xed)),_0x6031fd=await _0x43c855({'env':_0xeaff96['env']??_0x4e2a25(0x122),'accessKey':_0xeaff96['accessKey']}),_0x3e18b3=findAppByName(_0x6031fd[_0x4e2a25(0x107)],_0x36df0c);if(_0x3e18b3&&!isRuntimeAccessibleApp(_0x3e18b3))throw runtimeInaccessibleAppError(_0x3e18b3,'\x22'+_0x36df0c+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x6a6bee,_0x336bf3,_0x285d64){const _0x5327df=a91_0x1576;if(_0x6a6bee[_0x5327df(0x101)]===![]||!_0x336bf3[_0x5327df(0x115)])return;const {getRemoteAppList:_0x1b806f}=await import(_0x5327df(0xed)),_0x3aa495=await _0x1b806f({'env':_0x336bf3['env']??_0x5327df(0x122),'accessKey':_0x336bf3['accessKey']}),_0x2549d1=findAppByCode(_0x3aa495['items'],_0x285d64);if(_0x2549d1&&!isRuntimeAccessibleApp(_0x2549d1))throw runtimeInaccessibleAppError(_0x2549d1,_0x5327df(0xee)+_0x285d64+'\x22');}function a91_0x4786(){const _0xfa0377=['has','789336pbWfKI','mergedCli','confirmHighRisk','nonInteractive','72423QzUlrx','ClientAk','defaultVerbose','\x20\x20To\x20proceed:\x20','execute','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','currentApp','production','requiresAuth','.appcode\x20to\x20','apiDomain','trim','error','1079980UbbyOh','APPCODE','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','appCode','app','359631hTzvML','local-alias','../commands/app/remote-source.js','appcode\x20\x22','configMissing','name','\x20or\x20pass\x20','_notice','update','rawFlags','service','defaultPageSize','defaultApp','doctor','resolve','Set\x20accessKey\x20in\x20','schema','verbose','newConfigFileName','pretty','cancelled','110QjBFkb','requiresAppCode','66KggMgL','appcode','riskLevel','object','ACCESS_KEY','items','format','4PBmfVD','131985wLzgpJ','appCodeSource','env','filter','../core/sdk-client.js','861453SgoYLT','string','High-risk\x20operation\x20`','validation','702996ujkrwm','isNonInteractive','accessKey'];a91_0x4786=function(){return _0xfa0377;};return a91_0x4786();}export async function runCommand(_0x216c4a,_0x2ee5c4,_0x54b0e4=terminalRunnerAdapter){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x216c4a)?withUpdateNotice(_0x216c4a):_0x216c4a,_0x2ee5c4,_0x54b0e4);}function shouldAttachUpdateNotice(_0x1b0598){const _0x38026d=a91_0x1576;return![_0x38026d(0xf3),_0x38026d(0xfb),_0x38026d(0xf8)]['includes'](_0x1b0598[_0x38026d(0xf5)]);}function withUpdateNotice(_0x59c1bb){return{..._0x59c1bb,async 'execute'(_0x49a22d){const _0x3826fc=a91_0x1576,_0x46eba6=shouldResolveUpdateNotice(_0x49a22d)?resolveLatestUpdateNotice()['catch'](()=>null):Promise[_0x3826fc(0xf9)](null),_0xdbedc=await _0x59c1bb[_0x3826fc(0x11f)](_0x49a22d);return attachUpdateNotice(_0xdbedc,await _0x46eba6);}};}function shouldResolveUpdateNotice(_0x34bc80){const _0xaee6d7=a91_0x1576;return _0x34bc80[_0xaee6d7(0x108)]===_0xaee6d7(0xfe)&&!_0x34bc80[_0xaee6d7(0x11a)];}function attachUpdateNotice(_0x499258,_0x2f752d){const _0x2b9f54=a91_0x1576;if(!_0x2f752d||!_0x499258||typeof _0x499258!==_0x2b9f54(0x105))return _0x499258;const _0x3a98b8=_0x499258,_0x2453de=typeof _0x3a98b8['_notice']===_0x2b9f54(0x105)&&_0x3a98b8[_0x2b9f54(0xf2)]!==null?_0x3a98b8[_0x2b9f54(0xf2)]:{};return{..._0x3a98b8,'_notice':{..._0x2453de,'update':_0x2f752d}};}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Schema payload builder for the `--schema` introspection flag.
|
|
3
|
+
*
|
|
4
|
+
* Why a separate async function: `buildSchemaPayloadBase` from the framework
|
|
5
|
+
* is synchronous, but the Lovrabet CLI registry uses dynamic imports for
|
|
6
|
+
* command modules to keep startup time fast. We wrap the base function here
|
|
7
|
+
* and handle the dynamic import inside `buildSchemaPayload()`, so callers
|
|
8
|
+
* don't need to know about the import strategy.
|
|
9
|
+
*
|
|
10
|
+
* Schema output is used by:
|
|
11
|
+
* - Language servers / IDE integrations that enumerate available commands.
|
|
12
|
+
* - Documentation generators that auto-generate command reference pages.
|
|
13
|
+
* - Scaffolding tools that generate command stubs.
|
|
14
|
+
*
|
|
15
|
+
* Design decision: `gitCommit` is read from generated build metadata so local
|
|
16
|
+
* and published builds expose the same commit source as `lovrabet --version`.
|
|
17
|
+
*/
|
|
18
|
+
import { type SerializedFlagPattern, type SerializedFlag, type SchemaCommandEntry, type SchemaServiceEntry, type SchemaPayload } from "@lovrabet/cli-framework";
|
|
19
|
+
export type { SerializedFlagPattern, SerializedFlag, SchemaCommandEntry, SchemaServiceEntry, SchemaPayload, };
|
|
20
|
+
/**
|
|
21
|
+
* Builds the complete schema payload describing all registered commands.
|
|
22
|
+
*
|
|
23
|
+
* Why async: the registry uses `await import()` for command modules to enable
|
|
24
|
+
* code splitting. The synchronous caller (`schema.ts` command) handles this
|
|
25
|
+
* by awaiting here rather than at every call site.
|
|
26
|
+
*
|
|
27
|
+
* @returns A schema payload suitable for JSON serialization and introspection.
|
|
28
|
+
*/
|
|
29
|
+
export declare function buildSchemaPayload(): Promise<SchemaPayload>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x21c107,_0x266fb2){const _0xc0b7c3=a92_0x3890,_0x1b102c=_0x21c107();while(!![]){try{const _0x1ecd7b=parseInt(_0xc0b7c3(0x1c4))/0x1+parseInt(_0xc0b7c3(0x1be))/0x2+-parseInt(_0xc0b7c3(0x1cc))/0x3+parseInt(_0xc0b7c3(0x1c0))/0x4*(parseInt(_0xc0b7c3(0x1c7))/0x5)+parseInt(_0xc0b7c3(0x1c9))/0x6+parseInt(_0xc0b7c3(0x1ca))/0x7+-parseInt(_0xc0b7c3(0x1c8))/0x8;if(_0x1ecd7b===_0x266fb2)break;else _0x1b102c['push'](_0x1b102c['shift']());}catch(_0x3b2538){_0x1b102c['push'](_0x1b102c['shift']());}}}(a92_0x5398,0x66c2e));import{buildSchemaPayload as a92_0x2acc4d}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';import{insertDynamicServicesAfterServiceTree}from'../framework/service-order.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';function a92_0x5398(){const _0x4d2e57=['filter','456753XBAzcx','service','required','412220LpepoR','services','34112NzycjT','map','requiresAuth','commands','96864khtYZu','none','../commands/registry.js','205vgIxDj','6102024yBsiLI','2310780jrYMed','2087134HtAwUx'];a92_0x5398=function(){return _0x4d2e57;};return a92_0x5398();}import{getCliGitCommit,getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x48feb6=a92_0x3890,{serviceRegistry:_0x27e3e3,findDefinition:_0x322912}=await import(_0x48feb6(0x1c6)),_0x14f860=new Set(_0x27e3e3[_0x48feb6(0x1c1)](_0x5473a4=>_0x5473a4['service'])),_0x3292a3=listDynamicServiceEntries()[_0x48feb6(0x1cb)](_0x11fbfb=>!_0x14f860['has'](_0x11fbfb[_0x48feb6(0x1bc)])),_0x5f398f=a92_0x2acc4d({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x27e3e3,_0x3292a3),'buildAllFlags':buildAllFlags,'findDefinition':(_0x96e91c,_0x2c685e)=>_0x322912(_0x96e91c,_0x2c685e)??findDynamicServiceDefinition(_0x96e91c,_0x2c685e)});return normalizeSchemaPayload(_0x5f398f);}function normalizeSchemaPayload(_0x470c37){const _0x3885f1=a92_0x3890;return{..._0x470c37,'schemaVersion':0x2,'services':_0x470c37[_0x3885f1(0x1bf)]['map'](_0x38b2e6=>({..._0x38b2e6,'commands':_0x38b2e6[_0x3885f1(0x1c3)][_0x3885f1(0x1c1)](normalizeSchemaCommand)}))};}function a92_0x3890(_0xadb46c,_0x272820){_0xadb46c=_0xadb46c-0x1bc;const _0x5398a2=a92_0x5398();let _0x3890c7=_0x5398a2[_0xadb46c];return _0x3890c7;}function normalizeSchemaCommand(_0x38c96c){const _0x41f3fb=a92_0x3890,_0x4c102f=_0x38c96c;return{..._0x38c96c,'auth':_0x4c102f['auth']??(_0x38c96c[_0x41f3fb(0x1c2)]?_0x41f3fb(0x1bd):_0x41f3fb(0x1c5))};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a93_0x4e8f(_0xc36cea,_0x32995d){_0xc36cea=_0xc36cea-0x13c;const _0x53929d=a93_0x5392();let _0x4e8f3d=_0x53929d[_0xc36cea];return _0x4e8f3d;}(function(_0xeefbb7,_0x1cbeae){const _0x327be7=a93_0x4e8f,_0x14b0f9=_0xeefbb7();while(!![]){try{const _0x5f9952=parseInt(_0x327be7(0x13c))/0x1*(-parseInt(_0x327be7(0x148))/0x2)+-parseInt(_0x327be7(0x13d))/0x3+parseInt(_0x327be7(0x146))/0x4*(-parseInt(_0x327be7(0x144))/0x5)+-parseInt(_0x327be7(0x13f))/0x6+-parseInt(_0x327be7(0x147))/0x7*(-parseInt(_0x327be7(0x13e))/0x8)+-parseInt(_0x327be7(0x141))/0x9*(parseInt(_0x327be7(0x143))/0xa)+parseInt(_0x327be7(0x142))/0xb*(parseInt(_0x327be7(0x145))/0xc);if(_0x5f9952===_0x1cbeae)break;else _0x14b0f9['push'](_0x14b0f9['shift']());}catch(_0xe380df){_0x14b0f9['push'](_0x14b0f9['shift']());}}}(a93_0x5392,0x7bf75));function a93_0x5392(){const _0x56843d=['2649114QDrLHr','service','459uAuXsz','17256129cPhszT','64080FendyT','3924115suFrdw','24tlhYwU','4XBRguu','154651xzOeLA','83134FFmVvo','findIndex','slice','24PsPlnm','1363608QaSjqT','136hUtlra'];a93_0x5392=function(){return _0x56843d;};return a93_0x5392();}export function insertDynamicServicesAfterServiceTree(_0x251029,_0x26e7fb){const _0x168264=a93_0x4e8f;if(_0x26e7fb['length']===0x0)return[..._0x251029];const _0x235ef5=_0x251029[_0x168264(0x149)](_0x43838e=>_0x43838e[_0x168264(0x140)]===_0x168264(0x140));if(_0x235ef5<0x0)return[..._0x251029,..._0x26e7fb];return[..._0x251029[_0x168264(0x14a)](0x0,_0x235ef5+0x1),..._0x26e7fb,..._0x251029['slice'](_0x235ef5+0x1)];}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 本文件集中复用 CLI framework 类型,并补充 Lovrabet Runtime 所需的上下文和写入事件扩展。
|
|
3
|
+
*
|
|
4
|
+
* Why re-export from `@lovrabet/cli-framework` here: the framework types are
|
|
5
|
+
* the canonical definitions. This file brings them into the `lovrabet-runtime-cli`
|
|
6
|
+
* namespace and augments them with the extra properties (`accessKey`, `envName`,
|
|
7
|
+
* `selectedAppName`) that the runtime-specific adapter injects into `RuntimeContext`.
|
|
8
|
+
*
|
|
9
|
+
* Design decision: `RuntimeContextExtras` intentionally does NOT include `cookie`.
|
|
10
|
+
* The runtime CLI uses AccessKey auth only (no session cookies), so `cookie` is
|
|
11
|
+
* always an empty string. Excluding it from extras forces callers to be explicit
|
|
12
|
+
* rather than accidentally relying on a value that will never be set.
|
|
13
|
+
*/
|
|
14
|
+
export type { ArgDef, FlagDef, CommandResult, DryRunResult, OutputFormat, OutputEnvelope, Risk, } from "@lovrabet/cli-framework";
|
|
15
|
+
import type { CommandDefinition as CoreCommandDefinition, CommandResult, CommandResult as CoreCommandResult, RuntimeContext as CoreRuntimeContext } from "@lovrabet/cli-framework";
|
|
16
|
+
export {
|
|
17
|
+
/** @see @lovrabet/cli-framework */
|
|
18
|
+
riskLevelOrder,
|
|
19
|
+
/** @see @lovrabet/cli-framework */
|
|
20
|
+
normalizeLegacyOutputFormat,
|
|
21
|
+
/** @see @lovrabet/cli-framework */
|
|
22
|
+
isValidFormat, } from "@lovrabet/cli-framework";
|
|
23
|
+
/**
|
|
24
|
+
* A snapshot of the resolved multi-app config at the point the runner's
|
|
25
|
+
* `prepare` hook runs. Stored in the context so commands can inspect which
|
|
26
|
+
* app is active and which apps are defined without re-reading the config.
|
|
27
|
+
*
|
|
28
|
+
* Why this exists: `ctx.config.apps` in `CLIConfig` is the fully typed
|
|
29
|
+
* `Record<string, AppProfile>`, but callers sometimes need to check the raw
|
|
30
|
+
* shape (`Record<string, { appcode?: string }>`) before the profile has been
|
|
31
|
+
* fully validated. `MergedCliSnapshot` serves this "lightly typed config view".
|
|
32
|
+
*/
|
|
33
|
+
export interface MergedCliSnapshot {
|
|
34
|
+
defaultApp?: string;
|
|
35
|
+
currentApp?: string;
|
|
36
|
+
appCode?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Extra properties injected into `RuntimeContext` by the runtime runner adapter.
|
|
40
|
+
* These are resolved in `prepare()` and made available to every command without
|
|
41
|
+
* requiring each command to look them up independently.
|
|
42
|
+
*
|
|
43
|
+
* Why `apiDir` is always `""`: apiDir is a研发态 (rabetbase-cli) concept for
|
|
44
|
+
* the BFF API directory path. The runtime CLI talks directly to the runtime engine
|
|
45
|
+
* and does not route through a BFF, so this field is always empty.
|
|
46
|
+
*
|
|
47
|
+
* Why `accessKey` is optional: some commands may not require auth and can run
|
|
48
|
+
* without it. Making it optional avoids null-checks everywhere.
|
|
49
|
+
*/
|
|
50
|
+
export interface RuntimeContextExtras {
|
|
51
|
+
/** Resolved app code (from --appcode, env var, or active app profile). */
|
|
52
|
+
appCode: string;
|
|
53
|
+
/**
|
|
54
|
+
* Always empty string in runtime CLI. Present for interface compatibility
|
|
55
|
+
* with rabetbase-cli, which uses session cookies.
|
|
56
|
+
*/
|
|
57
|
+
cookie: string;
|
|
58
|
+
/** Resolved runtime API domain (production or daily). */
|
|
59
|
+
apiDomain: string;
|
|
60
|
+
/**
|
|
61
|
+
* Always empty string in runtime CLI. Present for interface compatibility
|
|
62
|
+
* with rabetbase-cli, which uses BFF API directories.
|
|
63
|
+
*/
|
|
64
|
+
apiDir: string;
|
|
65
|
+
/**
|
|
66
|
+
* AccessKey used for authentication. Optional because not all commands
|
|
67
|
+
* require it (e.g. `init` and `help`).
|
|
68
|
+
*/
|
|
69
|
+
accessKey?: string;
|
|
70
|
+
/** The normalized environment name. */
|
|
71
|
+
envName?: "production" | "development" | "daily";
|
|
72
|
+
/** Name of the currently selected app profile (if any). */
|
|
73
|
+
selectedAppName?: string;
|
|
74
|
+
/** Lightly-typed snapshot of the merged config for quick inspection. */
|
|
75
|
+
mergedCli?: MergedCliSnapshot;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* The concrete runtime context type for all Lovrabet Runtime CLI commands.
|
|
79
|
+
* Every command's `validate`, `dryRun`, and `execute` functions receive this type.
|
|
80
|
+
*/
|
|
81
|
+
export type RuntimeContext = CoreRuntimeContext<RuntimeContextExtras>;
|
|
82
|
+
export interface RuntimeUpdateNotice {
|
|
83
|
+
command: string;
|
|
84
|
+
current: string;
|
|
85
|
+
latest: string;
|
|
86
|
+
url: string;
|
|
87
|
+
message: string;
|
|
88
|
+
}
|
|
89
|
+
export interface RuntimeNotice {
|
|
90
|
+
update?: RuntimeUpdateNotice;
|
|
91
|
+
}
|
|
92
|
+
export type CommandResultWithNotice<T = any> = CoreCommandResult<T> & {
|
|
93
|
+
_notice?: RuntimeNotice;
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* 描述专属写入成功展示允许携带的最小业务主体。
|
|
97
|
+
*/
|
|
98
|
+
export interface LovrabetWriteSubject {
|
|
99
|
+
kind: string;
|
|
100
|
+
id: string;
|
|
101
|
+
action: string;
|
|
102
|
+
}
|
|
103
|
+
export type CommandDefinition = CoreCommandDefinition<RuntimeContext> & {
|
|
104
|
+
/**
|
|
105
|
+
* 从命令结果中提取专属写入成功展示所需的最小安全身份;通用事件无需 subject。
|
|
106
|
+
*/
|
|
107
|
+
writeEventSubject?: (result: CommandResult) => LovrabetWriteSubject | undefined;
|
|
108
|
+
};
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xc695fa,_0x506f70){var _0x3bb33a=a94_0x295d,_0x143f98=_0xc695fa();while(!![]){try{var _0x2bb79d=-parseInt(_0x3bb33a(0x1af))/0x1*(parseInt(_0x3bb33a(0x1b1))/0x2)+-parseInt(_0x3bb33a(0x1ae))/0x3*(parseInt(_0x3bb33a(0x1b2))/0x4)+parseInt(_0x3bb33a(0x1ab))/0x5+parseInt(_0x3bb33a(0x1a9))/0x6+-parseInt(_0x3bb33a(0x1ac))/0x7+-parseInt(_0x3bb33a(0x1aa))/0x8*(parseInt(_0x3bb33a(0x1b0))/0x9)+parseInt(_0x3bb33a(0x1ad))/0xa;if(_0x2bb79d===_0x506f70)break;else _0x143f98['push'](_0x143f98['shift']());}catch(_0x1c3c73){_0x143f98['push'](_0x143f98['shift']());}}}(a94_0x33c4,0x853d7));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';function a94_0x295d(_0x5bddb3,_0x471f5a){_0x5bddb3=_0x5bddb3-0x1a9;var _0x33c420=a94_0x33c4();var _0x295d6f=_0x33c420[_0x5bddb3];return _0x295d6f;}function a94_0x33c4(){var _0x1edf51=['31310400UDiWNp','57KeXDWW','264515FiSqYf','1611fWnOip','6TwomVp','151764Idgqck','4379514ZItkvw','44504tikVwW','1193845MErOmq','7306432hIBsFa'];a94_0x33c4=function(){return _0x1edf51;};return a94_0x33c4();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a95_0x42df(){const _0x9f4a2e=['1264248McZhKj','99LZCOxQ','36557EAQBSC','1187290xbsUUc','2.1.18-beta.2','1055UcBLjB','22337uLwTfA','2026-07-28T11:14:45.373Z','3880xoWZlv','6048732JQNFhq','19985504ggRQny','56xMKzdV','v2.1.18-beta.2','cce990d','47010fzrOub'];a95_0x42df=function(){return _0x9f4a2e;};return a95_0x42df();}const a95_0x4f389e=a95_0x35b9;(function(_0x2db3e5,_0x3ef598){const _0x2f5b90=a95_0x35b9,_0x23a147=_0x2db3e5();while(!![]){try{const _0x5e5544=-parseInt(_0x2f5b90(0x118))/0x1*(parseInt(_0x2f5b90(0x121))/0x2)+parseInt(_0x2f5b90(0x116))/0x3+-parseInt(_0x2f5b90(0x11f))/0x4+parseInt(_0x2f5b90(0x11b))/0x5*(-parseInt(_0x2f5b90(0x115))/0x6)+-parseInt(_0x2f5b90(0x11c))/0x7*(-parseInt(_0x2f5b90(0x11e))/0x8)+-parseInt(_0x2f5b90(0x117))/0x9*(-parseInt(_0x2f5b90(0x119))/0xa)+parseInt(_0x2f5b90(0x120))/0xb;if(_0x5e5544===_0x3ef598)break;else _0x23a147['push'](_0x23a147['shift']());}catch(_0xa8fa92){_0x23a147['push'](_0x23a147['shift']());}}}(a95_0x42df,0xdc73a));export const VERSION=a95_0x4f389e(0x11a);function a95_0x35b9(_0x39ef86,_0x42739a){_0x39ef86=_0x39ef86-0x114;const _0x42dfb9=a95_0x42df();let _0x35b9a8=_0x42dfb9[_0x39ef86];return _0x35b9a8;}export const GIT_TAG=a95_0x4f389e(0x122);export const GIT_COMMIT=a95_0x4f389e(0x114);export const BUILD_TIME=a95_0x4f389e(0x11d);
|
package/lib/help.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Static welcome page rendered via Ink.
|
|
3
|
+
*
|
|
4
|
+
* Why an Ink component: the CLI uses Ink (React for CLIs) for the entry point.
|
|
5
|
+
* Even though the help text is generated statically, rendering it through Ink
|
|
6
|
+
* keeps the rendering pipeline uniform and allows the same component model
|
|
7
|
+
* to be used for interactive prompts elsewhere.
|
|
8
|
+
*
|
|
9
|
+
* Why `useEffect` with immediate `exit()`: Ink components must render something
|
|
10
|
+
* and call `exit()` to terminate the React tree. Without the effect, the
|
|
11
|
+
* component would hang waiting for state updates. The exit is immediate
|
|
12
|
+
* (first render) so this is effectively a static component.
|
|
13
|
+
*
|
|
14
|
+
* Why `--help` text is NOT rendered here: `generateFullHelp()` is expensive
|
|
15
|
+
* (reads all registry definitions, builds formatted strings). We generate it
|
|
16
|
+
* once as a string and pass it to meow as the help text. Only the bare
|
|
17
|
+
* welcome page is rendered via Ink.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Static welcome page — shows the CLI name and a hint to use `--help`.
|
|
21
|
+
*
|
|
22
|
+
* Renders immediately and exits on the first frame, allowing `cli.tsx`
|
|
23
|
+
* to await `waitUntilExit()` and proceed normally.
|
|
24
|
+
*/
|
|
25
|
+
export declare function Help(): import("react/jsx-runtime").JSX.Element;
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x18e677,_0x27ae4){const _0x3605d1=a96_0x216c,_0x539c09=_0x18e677();while(!![]){try{const _0x499af5=parseInt(_0x3605d1(0x1e0))/0x1+parseInt(_0x3605d1(0x1dd))/0x2+-parseInt(_0x3605d1(0x1d6))/0x3*(parseInt(_0x3605d1(0x1d7))/0x4)+-parseInt(_0x3605d1(0x1da))/0x5*(-parseInt(_0x3605d1(0x1d8))/0x6)+parseInt(_0x3605d1(0x1db))/0x7*(-parseInt(_0x3605d1(0x1d9))/0x8)+-parseInt(_0x3605d1(0x1d5))/0x9+-parseInt(_0x3605d1(0x1d4))/0xa;if(_0x499af5===_0x27ae4)break;else _0x539c09['push'](_0x539c09['shift']());}catch(_0x54e966){_0x539c09['push'](_0x539c09['shift']());}}}(a96_0x531c,0xe4318));import{jsx as a96_0x514c4c,jsxs as a96_0x6e62f4}from'react/jsx-runtime';function a96_0x216c(_0x1366d6,_0x404112){_0x1366d6=_0x1366d6-0x1d3;const _0x531ccb=a96_0x531c();let _0x216ce1=_0x531ccb[_0x1366d6];return _0x216ce1;}import{useEffect}from'react';import{Box,Text,useApp}from'ink';function a96_0x531c(){const _0x3c92c3=['13935474tJjhvK','124317pzLbjH','36DVmhMr','5557890aJNKBJ','656QwEgQW','10rawyfE','49238snmnNf','\x20to\x20view\x20available\x20commands.','3269062teDLnb','green','\x20\x20Use\x20','15671CkvtcS','column','700270cNwpsc'];a96_0x531c=function(){return _0x3c92c3;};return a96_0x531c();}import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x37835a=a96_0x216c,{exit:_0x49a82e}=useApp();return useEffect(()=>{_0x49a82e();},[_0x49a82e]),a96_0x6e62f4(Box,{'flexDirection':_0x37835a(0x1d3),'marginTop':0x1,'marginBottom':0x1,'children':[a96_0x514c4c(Box,{'children':a96_0x514c4c(Text,{'bold':!![],'color':_0x37835a(0x1de),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a96_0x6e62f4(Box,{'marginTop':0x1,'children':[a96_0x514c4c(Text,{'dimColor':!![],'children':_0x37835a(0x1df)}),a96_0x514c4c(Text,{'bold':!![],'color':_0x37835a(0x1de),'children':CLI_BIN_NAME+'\x20--help'}),a96_0x514c4c(Text,{'dimColor':!![],'children':_0x37835a(0x1dc)})]})]});}
|