@lovrabet/lovrabet-cli 2.1.23 → 2.2.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -10
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.d.ts +2 -2
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.d.ts +2 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.d.ts +2 -0
- package/lib/postinstall.js +1 -0
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.d.ts +37 -0
- package/lib/skills/builtin-skill.js +1 -0
- package/lib/skills/npx-skills-add.d.ts +3 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +14 -3
- package/scripts/postinstall.mjs +24 -0
- package/skills/lovrabet/SKILL.md +704 -0
- package/skills/lovrabet/guides/app-resolution.md +165 -0
- package/skills/lovrabet/guides/dataset-and-data-workflow.md +170 -0
- package/skills/lovrabet/guides/sql-and-bff-workflow.md +132 -0
- package/skills/lovrabet/guides/troubleshooting.md +91 -0
- package/skills/lovrabet/references/dataset-discovery-workflow.md +160 -0
- package/skills/lovrabet/references/instant-api-workflow.md +259 -0
- package/skills/lovrabet/references/lovrabet-app-config.md +51 -0
- package/skills/lovrabet/references/lovrabet-app.md +113 -0
- package/skills/lovrabet/references/lovrabet-auth.md +136 -0
- package/skills/lovrabet/references/lovrabet-bff-workflow.md +139 -0
- package/skills/lovrabet/references/lovrabet-config-commands.md +104 -0
- package/skills/lovrabet/references/lovrabet-config.md +124 -0
- package/skills/lovrabet/references/lovrabet-doctor.md +26 -0
- package/skills/lovrabet/references/lovrabet-file-workflow.md +62 -0
- package/skills/lovrabet/references/lovrabet-kb-workflow.md +78 -0
- package/skills/lovrabet/references/lovrabet-logs.md +19 -0
- package/skills/lovrabet/references/lovrabet-ocr-workflow.md +83 -0
- package/skills/lovrabet/references/lovrabet-output-format-jq.md +40 -0
- package/skills/lovrabet/references/lovrabet-personal-bff-workflow.md +108 -0
- package/skills/lovrabet/references/lovrabet-schedule-workflow.md +181 -0
- package/skills/lovrabet/references/lovrabet-service-tree.md +279 -0
- package/skills/lovrabet/references/lovrabet-skill-authoring.md +128 -0
- package/skills/lovrabet/references/lovrabet-skill-install.md +34 -0
- package/skills/lovrabet/references/lovrabet-skill-sync.md +146 -0
- package/skills/lovrabet/references/lovrabet-sql-workflow.md +111 -0
- package/skills/lovrabet/references/lovrabet-update.md +34 -0
- package/skills/lovrabet/references/lovrabet-workspace.md +82 -0
- package/skills/lovrabet.manifest.json +38 -0
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5cfe6b,_0x32d033){const _0x7f61d7=a129_0x15cb,_0x46481c=_0x5cfe6b();while(!![]){try{const _0x21ae85=parseInt(_0x7f61d7(0x115))/0x1+-parseInt(_0x7f61d7(0x117))/0x2+parseInt(_0x7f61d7(0x11d))/0x3+-parseInt(_0x7f61d7(0x119))/0x4*(parseInt(_0x7f61d7(0x116))/0x5)+parseInt(_0x7f61d7(0x10e))/0x6+parseInt(_0x7f61d7(0x10f))/0x7*(-parseInt(_0x7f61d7(0x112))/0x8)+parseInt(_0x7f61d7(0x110))/0x9;if(_0x21ae85===_0x32d033)break;else _0x46481c['push'](_0x46481c['shift']());}catch(_0x154b16){_0x46481c['push'](_0x46481c['shift']());}}}(a129_0x2c84,0x8bdaa));import{CliErrors}from'../errors.js';function a129_0x2c84(){const _0xcd56=['673582CkjVVo','6776253rMSJff','data\x20update\x20id\x20array\x20cannot\x20be\x20empty.','32GnkQSN','object','validation','153797ZPOjoj','530fREYZq','692654SOlZfo','\x20records\x20per\x20call;\x20received\x20','30248HrJPzv','map','isArray','data\x20update\x20--params.','499980MhsjpL','batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}','Invalid\x20JSON\x20for\x20--params:\x20','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27','length','items','string','data\x20update\x20--params\x20must\x20be\x20a\x20JSON\x20object\x20with\x20id.','\x20must\x20be\x20a\x20positive\x20integer\x20or\x20numeric\x20string.','6193626lKTHCO'];a129_0x2c84=function(){return _0xcd56;};return a129_0x2c84();}function a129_0x15cb(_0x4bcc62,_0x5f53fb){_0x4bcc62=_0x4bcc62-0x109;const _0x2c8476=a129_0x2c84();let _0x15cb5b=_0x2c8476[_0x4bcc62];return _0x15cb5b;}import{parseLosslessJson}from'../utils/lossless-json.js';export const MAX_DATA_UPDATE_IDS=0x3e8;export function parseJsonParams(_0x380903){const _0x33ffbc=a129_0x15cb;if(!_0x380903)return undefined;try{return parseLosslessJson(_0x380903);}catch{throw CliErrors['validation'](_0x33ffbc(0x11f)+_0x380903);}}export function parseJsonParamsValue(_0x46db78){const _0x4a8436=a129_0x15cb;if(!_0x46db78)return undefined;try{return parseLosslessJson(_0x46db78);}catch{throw CliErrors[_0x4a8436(0x114)](_0x4a8436(0x11f)+_0x46db78);}}export function parseBatchCreateItemsFromParams(_0x452849){const _0x22b805=a129_0x15cb;if(Array[_0x22b805(0x11b)](_0x452849))return _0x452849;if(_0x452849!==null&&_0x452849!==undefined&&typeof _0x452849===_0x22b805(0x113)&&Array[_0x22b805(0x11b)](_0x452849[_0x22b805(0x10a)]))return _0x452849['items'];throw CliErrors[_0x22b805(0x114)](_0x22b805(0x11e),'Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27');}function parseDataUpdateId(_0x51484f,_0x2a3391){const _0x56d983=a129_0x15cb;if(typeof _0x51484f==='number'&&Number['isSafeInteger'](_0x51484f)&&_0x51484f>0x0)return _0x51484f;if(typeof _0x51484f===_0x56d983(0x10b)){if(/^[1-9]\d*$/['test'](_0x51484f))return _0x51484f;}throw CliErrors[_0x56d983(0x114)](_0x56d983(0x11c)+_0x2a3391+_0x56d983(0x10d));}export function parseUpdateIdsFromParams(_0x485466){const _0x466d8e=a129_0x15cb;if(_0x485466===null||_0x485466===undefined||typeof _0x485466!==_0x466d8e(0x113)||Array[_0x466d8e(0x11b)](_0x485466))throw CliErrors[_0x466d8e(0x114)](_0x466d8e(0x10c),_0x466d8e(0x120));const _0x2c6280=_0x485466['id'];if(_0x2c6280===undefined||_0x2c6280===null)throw CliErrors[_0x466d8e(0x114)]('data\x20update\x20requires\x20\x22id\x22\x20in\x20--params.',_0x466d8e(0x120));const _0x5d2a1d=Array[_0x466d8e(0x11b)](_0x2c6280)?_0x2c6280:[_0x2c6280];if(_0x5d2a1d['length']===0x0)throw CliErrors[_0x466d8e(0x114)](_0x466d8e(0x111));if(_0x5d2a1d[_0x466d8e(0x109)]>MAX_DATA_UPDATE_IDS)throw CliErrors[_0x466d8e(0x114)]('data\x20update\x20can\x20update\x20at\x20most\x20'+MAX_DATA_UPDATE_IDS+_0x466d8e(0x118)+_0x5d2a1d[_0x466d8e(0x109)]+'.');return _0x5d2a1d[_0x466d8e(0x11a)]((_0x4369fa,_0x1c63fe)=>parseDataUpdateId(_0x4369fa,Array[_0x466d8e(0x11b)](_0x2c6280)?'id['+_0x1c63fe+']':'id'));}export function normalizeUpdateParamsForRuntime(_0x22fce9,_0x3090a9){const _0x53affb=a129_0x15cb;if(Array[_0x53affb(0x11b)](_0x22fce9['id'])&&_0x3090a9[_0x53affb(0x109)]>0x1)return{..._0x22fce9,'id':_0x3090a9['join'](',')};return _0x22fce9;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a130_0x71c48e=a130_0x13f2;function a130_0x13f2(_0x10aecd,_0x5ed49f){_0x10aecd=_0x10aecd-0x1ec;const _0x1cefa1=a130_0x1cef();let _0x13f209=_0x1cefa1[_0x10aecd];return _0x13f209;}(function(_0x1668b3,_0x4ba487){const _0x416dc6=a130_0x13f2,_0x74a774=_0x1668b3();while(!![]){try{const _0x2b78a4=parseInt(_0x416dc6(0x1ec))/0x1+parseInt(_0x416dc6(0x1ef))/0x2*(parseInt(_0x416dc6(0x1f0))/0x3)+parseInt(_0x416dc6(0x1ee))/0x4+parseInt(_0x416dc6(0x1f6))/0x5*(-parseInt(_0x416dc6(0x1f7))/0x6)+-parseInt(_0x416dc6(0x1f4))/0x7+-parseInt(_0x416dc6(0x1f3))/0x8+parseInt(_0x416dc6(0x1f5))/0x9*(parseInt(_0x416dc6(0x1ed))/0xa);if(_0x2b78a4===_0x4ba487)break;else _0x74a774['push'](_0x74a774['shift']());}catch(_0x3e789b){_0x74a774['push'](_0x74a774['shift']());}}}(a130_0x1cef,0x6051b));export const isWindows=process[a130_0x71c48e(0x1f2)]==='win32';export function resolveNpmBin(_0x51a7bf){const _0x40edb8=a130_0x71c48e;return isWindows?_0x51a7bf+_0x40edb8(0x1f1):_0x51a7bf;}function a130_0x1cef(){const _0x5e9447=['153892LVfaTT','30DUbiOH','2317948IrpoMZ','31866cnAvKq','33apYcvo','.cmd','platform','4161864tyzqXi','3814678TGvqZu','2270214oiRtsh','1028350FihHGC','6fuTGhv'];a130_0x1cef=function(){return _0x5e9447;};return a130_0x1cef();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1ef0b6,_0x2e69ac){const _0x4a06a9=a131_0xa388,_0x3395e1=_0x1ef0b6();while(!![]){try{const _0x4facd8=-parseInt(_0x4a06a9(0xe2))/0x1+-parseInt(_0x4a06a9(0xc8))/0x2+parseInt(_0x4a06a9(0xca))/0x3*(parseInt(_0x4a06a9(0xd9))/0x4)+-parseInt(_0x4a06a9(0xc7))/0x5*(-parseInt(_0x4a06a9(0xc4))/0x6)+parseInt(_0x4a06a9(0xcd))/0x7*(-parseInt(_0x4a06a9(0xe9))/0x8)+-parseInt(_0x4a06a9(0xc1))/0x9*(-parseInt(_0x4a06a9(0xcc))/0xa)+parseInt(_0x4a06a9(0xe6))/0xb*(parseInt(_0x4a06a9(0xe5))/0xc);if(_0x4facd8===_0x2e69ac)break;else _0x3395e1['push'](_0x3395e1['shift']());}catch(_0x5b405b){_0x3395e1['push'](_0x3395e1['shift']());}}}(a131_0x46c3,0x36c21));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import{LOVRABET_NPM_PACKAGE_NAME,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{getCliVersion}from'../utils/version.js';const UPDATE_CHECK_TTL_MS=0xc*0x3c*0x3c*0x3e8,UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function parseSemver(_0xdeda18){const _0x2a2353=a131_0xa388,_0x44d89d=_0xdeda18[_0x2a2353(0xc6)]()[_0x2a2353(0xe1)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x44d89d)return null;return{'major':Number(_0x44d89d[0x1]),'minor':Number(_0x44d89d[0x2]),'patch':Number(_0x44d89d[0x3]),'prerelease':_0x44d89d[0x4]};}function compareSemver(_0x1d4cca,_0x3f7ff9){const _0x1db645=a131_0xa388,_0x162991=parseSemver(_0x1d4cca),_0x14e578=parseSemver(_0x3f7ff9);if(!_0x162991||!_0x14e578)throw new Error(_0x1db645(0xcf));for(const _0x25f43c of[_0x1db645(0xd2),_0x1db645(0xd7),'patch']){if(_0x162991[_0x25f43c]<_0x14e578[_0x25f43c])return-0x1;if(_0x162991[_0x25f43c]>_0x14e578[_0x25f43c])return 0x1;}if(!_0x162991[_0x1db645(0xd6)]&&!_0x14e578[_0x1db645(0xd6)])return 0x0;if(!_0x162991['prerelease'])return 0x1;if(!_0x14e578['prerelease'])return-0x1;if(_0x162991[_0x1db645(0xd6)]===_0x14e578[_0x1db645(0xd6)])return 0x0;return _0x162991[_0x1db645(0xd6)]<_0x14e578['prerelease']?-0x1:0x1;}function isUpdateNoticeDisabled(){const _0x54284d=a131_0xa388,_0x2a3f38=process.env.LOVRABET_NO_UPDATE_NOTICE?.[_0x54284d(0xc6)]()[_0x54284d(0xde)]();return _0x2a3f38==='1'||_0x2a3f38===_0x54284d(0xd5)||_0x2a3f38===_0x54284d(0xd4);}function cacheRoot(){return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),'.cache');}function a131_0x46c3(){const _0xdbdc2f=['stringify','json','24WwGJIc','\x20update','9wQHipE','parse','update-check.json','209904EnhxMM','string','trim','10ykhlyl','115418LMJrTW','/v/','39QFzDUr','object','248110YxZmUR','627662bBqvrt','lovrabet-cli','Invalid\x20semver','number','latest','major','now','yes','true','prerelease','minor','https://www.npmjs.com/package/','127048WnHAvs','timeout','checkedAt','lastNotifiedAt','entries','toLowerCase','fromEntries','\x20available,\x20current\x20','match','48818FDcAgd','lastNotifiedVersion','/-/package/','12lVUocL','1013419qQUpVt'];a131_0x46c3=function(){return _0xdbdc2f;};return a131_0x46c3();}export function getUpdateNoticeCachePath(){const _0x504102=a131_0xa388;return join(cacheRoot(),_0x504102(0xce),_0x504102(0xc3));}async function readUpdateNoticeCache(){const _0x3c5f0d=a131_0xa388;try{const _0x547e9d=await readFile(getUpdateNoticeCachePath(),'utf8'),_0x2ba789=JSON[_0x3c5f0d(0xc2)](_0x547e9d);if(!_0x2ba789||typeof _0x2ba789!==_0x3c5f0d(0xcb))return{};return _0x2ba789;}catch{return{};}}async function writeUpdateNoticeCache(_0x3092fa){const _0x5b0471=a131_0xa388;try{const _0x4334f5=getUpdateNoticeCachePath();await mkdir(dirname(_0x4334f5),{'recursive':!![]}),await writeFile(_0x4334f5,JSON[_0x5b0471(0xe7)](_0x3092fa,null,0x2)+'\x0a','utf8');}catch{}}function isFreshCheck(_0x57373a,_0x26617a){const _0x383064=a131_0xa388;return typeof _0x57373a[_0x383064(0xdb)]===_0x383064(0xd0)&&_0x26617a-_0x57373a['checkedAt']<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x373e5d,_0x5e21ba,_0x1b50ba){const _0x272624=a131_0xa388;return _0x373e5d[_0x272624(0xe3)]===_0x5e21ba&&typeof _0x373e5d['lastNotifiedAt']===_0x272624(0xd0)&&_0x1b50ba-_0x373e5d[_0x272624(0xdc)]<UPDATE_NOTICE_TTL_MS;}async function fetchNpmDistTags(_0x54059c=0x5dc){const _0x48eada=a131_0xa388;try{const _0x26afc0=NPM_REGISTRY_BASE_URL+_0x48eada(0xe4)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+'/dist-tags',_0x1aec0e=await fetch(_0x26afc0,{'signal':AbortSignal[_0x48eada(0xda)](_0x54059c)});if(!_0x1aec0e['ok'])return null;const _0x26f451=await _0x1aec0e[_0x48eada(0xe8)]();if(!_0x26f451||typeof _0x26f451!==_0x48eada(0xcb))return null;return Object[_0x48eada(0xdf)](Object[_0x48eada(0xdd)](_0x26f451)['filter'](([,_0x327a63])=>typeof _0x327a63===_0x48eada(0xc5)&&_0x327a63[_0x48eada(0xc6)]())['map'](([_0x17581e,_0x4a046a])=>[_0x17581e,String(_0x4a046a)[_0x48eada(0xc6)]()]));}catch{return null;}}function a131_0xa388(_0x218999,_0x4fb2b3){_0x218999=_0x218999-0xc1;const _0x46c3d9=a131_0x46c3();let _0xa388e0=_0x46c3d9[_0x218999];return _0xa388e0;}export function buildNpmVersionUrl(_0x1b1a8e){const _0x1abafb=a131_0xa388;return _0x1abafb(0xd8)+LOVRABET_NPM_PACKAGE_NAME+_0x1abafb(0xc9)+_0x1b1a8e;}export async function resolveLatestUpdateNotice(){const _0x183721=a131_0xa388;if(isUpdateNoticeDisabled())return null;try{const _0x305b7b=Date[_0x183721(0xd3)](),_0x109103=getCliVersion(),_0x332858=await readUpdateNoticeCache();let _0x538503=isFreshCheck(_0x332858,_0x305b7b)?_0x332858[_0x183721(0xd1)]?.[_0x183721(0xc6)]():undefined;if(!_0x538503&&!isFreshCheck(_0x332858,_0x305b7b)){const _0x1f9692=await fetchNpmDistTags();_0x538503=_0x1f9692?.[_0x183721(0xd1)]?.[_0x183721(0xc6)](),await writeUpdateNoticeCache({..._0x332858,'checkedAt':_0x305b7b,'latest':_0x538503,'failed':!_0x538503});}if(!_0x538503||compareSemver(_0x109103,_0x538503)>=0x0)return null;if(isRecentlyNotified(_0x332858,_0x538503,_0x305b7b))return null;const _0x100f76=CLI_BIN_NAME+_0x183721(0xea);return await writeUpdateNoticeCache({..._0x332858,'checkedAt':isFreshCheck(_0x332858,_0x305b7b)?_0x332858['checkedAt']:_0x305b7b,'latest':_0x538503,'failed':![],'lastNotifiedVersion':_0x538503,'lastNotifiedAt':_0x305b7b}),{'command':_0x100f76,'current':_0x109103,'latest':_0x538503,'url':buildNpmVersionUrl(_0x538503),'message':CLI_BIN_NAME+'\x20'+_0x538503+_0x183721(0xe0)+_0x109103+',\x20run:\x20'+_0x100f76};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a132_0x3129(_0x516cef,_0x3a9e07){_0x516cef=_0x516cef-0x1ba;const _0x38f7eb=a132_0x38f7();let _0x31297f=_0x38f7eb[_0x516cef];return _0x31297f;}function a132_0x38f7(){const _0x5599b4=['608331zQJSgV','unknown','slice','8457620awnLAq','3078990SjbIss','9unEZIu','41315DTeOWs','36ydMTjx','239065hKAYgu','4148968QBQcPJ','2FzmzcL','2850841ldonbX'];a132_0x38f7=function(){return _0x5599b4;};return a132_0x38f7();}(function(_0xffee70,_0x407ca9){const _0x28e32c=a132_0x3129,_0x6665ee=_0xffee70();while(!![]){try{const _0x706f0d=-parseInt(_0x28e32c(0x1c3))/0x1+-parseInt(_0x28e32c(0x1bb))/0x2*(-parseInt(_0x28e32c(0x1bd))/0x3)+parseInt(_0x28e32c(0x1c4))/0x4*(-parseInt(_0x28e32c(0x1c5))/0x5)+parseInt(_0x28e32c(0x1c1))/0x6+parseInt(_0x28e32c(0x1bc))/0x7+-parseInt(_0x28e32c(0x1ba))/0x8*(-parseInt(_0x28e32c(0x1c2))/0x9)+-parseInt(_0x28e32c(0x1c0))/0xa;if(_0x706f0d===_0x407ca9)break;else _0x6665ee['push'](_0x6665ee['shift']());}catch(_0xddb7af){_0x6665ee['push'](_0x6665ee['shift']());}}}(a132_0x38f7,0x4f350));import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}export function getCliGitCommit(){const _0x330c15=a132_0x3129,_0x5050be=String(GIT_COMMIT);return _0x5050be&&_0x5050be!==_0x330c15(0x1be)?_0x5050be:'';}export function getCliVersionDisplay(){const _0xa96f66=a132_0x3129,_0x38ff9e=getCliGitCommit(),_0x93bb6d=BUILD_TIME[_0xa96f66(0x1bf)](0x0,0xa);if(!_0x38ff9e||!_0x93bb6d)return VERSION;return VERSION+'\x20('+_0x38ff9e+',\x20'+_0x93bb6d+')';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a133_0xbce5(){var _0x26e96e=['356SsfHBH','374958prxzGb','stderr','write','9845770zSVCox','18364mnQaWt','56604DqkIYF','380331YzVKls','6374vmIgHW','200EcSgiL','9727030jQWCGk','495UMgLXi','216nUWqUw'];a133_0xbce5=function(){return _0x26e96e;};return a133_0xbce5();}function a133_0x5164(_0x507e50,_0x46df13){_0x507e50=_0x507e50-0xe0;var _0xbce51d=a133_0xbce5();var _0x51649f=_0xbce51d[_0x507e50];return _0x51649f;}(function(_0x262349,_0x37783f){var _0x249f36=a133_0x5164,_0x4ea588=_0x262349();while(!![]){try{var _0x5c07eb=parseInt(_0x249f36(0xe5))/0x1*(parseInt(_0x249f36(0xea))/0x2)+-parseInt(_0x249f36(0xe8))/0x3*(-parseInt(_0x249f36(0xe2))/0x4)+parseInt(_0x249f36(0xe6))/0x5*(parseInt(_0x249f36(0xe3))/0x6)+-parseInt(_0x249f36(0xe4))/0x7*(parseInt(_0x249f36(0xe9))/0x8)+parseInt(_0x249f36(0xeb))/0x9+-parseInt(_0x249f36(0xe7))/0xa+parseInt(_0x249f36(0xe1))/0xb;if(_0x5c07eb===_0x37783f)break;else _0x4ea588['push'](_0x4ea588['shift']());}catch(_0x1289dc){_0x4ea588['push'](_0x4ea588['shift']());}}}(a133_0xbce5,0xbb215));export function writeCliSideChannelLine(_0x1e2a6a){var _0x3b5199=a133_0x5164;process[_0x3b5199(0xec)][_0x3b5199(0xe0)](_0x1e2a6a+'\x0a');}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovrabet/lovrabet-cli",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.2.1-beta.1",
|
|
4
4
|
"description": "Runtime CLI for Lovrabet apps, datasets, SQL, BFF, skills, and AI agent workflows.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"keywords": [
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
"engines": {
|
|
37
|
-
"node": ">=20"
|
|
37
|
+
"node": ">=22.20.0"
|
|
38
38
|
},
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
|
-
"prebuild": "node scripts/generate-build-info.js",
|
|
43
|
+
"prebuild": "node scripts/generate-build-info.js && node scripts/generate-builtin-skill-manifest.mjs --check",
|
|
44
44
|
"build": "rimraf lib && tsc && tsc-alias && javascript-obfuscator lib --output lib && node scripts/ensure-bin-executable.mjs",
|
|
45
45
|
"prebuild:dev": "node scripts/generate-build-info.js",
|
|
46
46
|
"build:dev": "rimraf lib && tsc && tsc-alias && node scripts/ensure-bin-executable.mjs",
|
|
@@ -49,12 +49,18 @@
|
|
|
49
49
|
"pretypecheck": "node scripts/generate-build-info.js",
|
|
50
50
|
"typecheck": "tsc --noEmit",
|
|
51
51
|
"verify:bundled-jq": "node scripts/verify-bundled-jq.mjs",
|
|
52
|
+
"regression:release-smoke": "node scripts/regression-release-smoke.mjs",
|
|
53
|
+
"pack:dry-run-summary": "node scripts/package-dry-run-summary.mjs",
|
|
54
|
+
"verify:release-package": "node scripts/verify-release-package.mjs",
|
|
52
55
|
"publish:github": "node scripts/publish-github.mjs",
|
|
53
56
|
"lint": "echo 'No linter configured yet'",
|
|
54
57
|
"beta-release": "node scripts/beta-release.mjs",
|
|
55
58
|
"release": "node scripts/latest-release.mjs",
|
|
56
59
|
"check:lockfile": "node scripts/check-lockfile-integrity.mjs",
|
|
57
60
|
"check:skill-version": "node scripts/check-skill-version.mjs",
|
|
61
|
+
"generate:builtin-skill-manifest": "node scripts/generate-builtin-skill-manifest.mjs",
|
|
62
|
+
"check:builtin-skill-manifest": "node scripts/generate-builtin-skill-manifest.mjs --check",
|
|
63
|
+
"postinstall": "node scripts/postinstall.mjs",
|
|
58
64
|
"ci": "npm run typecheck && npm run check:skill-version && npm run check:lockfile && npm run build",
|
|
59
65
|
"pretest": "node scripts/generate-build-info.js",
|
|
60
66
|
"test": "vitest run",
|
|
@@ -67,6 +73,9 @@
|
|
|
67
73
|
},
|
|
68
74
|
"files": [
|
|
69
75
|
"lib",
|
|
76
|
+
"skills/lovrabet",
|
|
77
|
+
"skills/lovrabet.manifest.json",
|
|
78
|
+
"scripts/postinstall.mjs",
|
|
70
79
|
"README.md",
|
|
71
80
|
"LICENSE",
|
|
72
81
|
"NOTICE"
|
|
@@ -83,6 +92,7 @@
|
|
|
83
92
|
"meow": "^13.2.0",
|
|
84
93
|
"mermaid": "11.16.0",
|
|
85
94
|
"react": "^19.2.0",
|
|
95
|
+
"semver": "^7.7.3",
|
|
86
96
|
"winston": "^3.17.0",
|
|
87
97
|
"ws": "8.20.1",
|
|
88
98
|
"yaml": "^2.9.0"
|
|
@@ -91,6 +101,7 @@
|
|
|
91
101
|
"@types/fs-extra": "^11.0.4",
|
|
92
102
|
"@types/node": "^24.5.2",
|
|
93
103
|
"@types/react": "^19.2.0",
|
|
104
|
+
"@types/semver": "^7.7.1",
|
|
94
105
|
"@vitest/coverage-v8": "^4.1.2",
|
|
95
106
|
"javascript-obfuscator": "^5.4.1",
|
|
96
107
|
"rimraf": "^6.1.3",
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { existsSync } from "node:fs";
|
|
3
|
+
import { dirname, join, resolve } from "node:path";
|
|
4
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
5
|
+
|
|
6
|
+
const root = resolve(dirname(fileURLToPath(import.meta.url)), "..");
|
|
7
|
+
const entry = join(root, "lib", "postinstall.js");
|
|
8
|
+
|
|
9
|
+
if (!existsSync(entry)) {
|
|
10
|
+
if (existsSync(join(root, "src", "postinstall.ts"))) {
|
|
11
|
+
console.log("Skipping Lovrabet Built-in Skill postinstall in an unbuilt source checkout.");
|
|
12
|
+
} else {
|
|
13
|
+
console.error("[BUILTIN_SKILL_INSTALL_SOURCE_MISSING] Missing lib/postinstall.js");
|
|
14
|
+
process.exitCode = 1;
|
|
15
|
+
}
|
|
16
|
+
} else {
|
|
17
|
+
try {
|
|
18
|
+
const { runPostinstall } = await import(pathToFileURL(entry).href);
|
|
19
|
+
await runPostinstall();
|
|
20
|
+
} catch (error) {
|
|
21
|
+
console.error(error instanceof Error ? error.message : String(error));
|
|
22
|
+
process.exitCode = 1;
|
|
23
|
+
}
|
|
24
|
+
}
|