@larkup/cli 0.2.29 → 0.2.31
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/dist/index.js +34 -11
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ import { Command } from "commander";
|
|
|
36
36
|
// package.json
|
|
37
37
|
var package_default = {
|
|
38
38
|
name: "@larkup/cli",
|
|
39
|
-
version: "0.2.
|
|
39
|
+
version: "0.2.31",
|
|
40
40
|
engines: {
|
|
41
41
|
node: ">=22"
|
|
42
42
|
},
|
|
@@ -6448,6 +6448,7 @@ async function testCommand(options) {
|
|
|
6448
6448
|
|
|
6449
6449
|
// src/commands/update.ts
|
|
6450
6450
|
import { spawn as spawn3 } from "child_process";
|
|
6451
|
+
import chalk2 from "chalk";
|
|
6451
6452
|
|
|
6452
6453
|
// src/commands/enterprise-update.ts
|
|
6453
6454
|
function enterpriseEndpoint(baseUrl, pathname) {
|
|
@@ -6545,20 +6546,42 @@ async function updateCommand(options) {
|
|
|
6545
6546
|
return;
|
|
6546
6547
|
}
|
|
6547
6548
|
if (!isVersionNewer(latest, package_default.version)) {
|
|
6548
|
-
log
|
|
6549
|
+
console.log("");
|
|
6550
|
+
log.info(chalk2.bold("\u256D\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E"));
|
|
6551
|
+
log.info(chalk2.bold(`\u2502 \u2713 Already up to date! \u2502`));
|
|
6552
|
+
log.info(
|
|
6553
|
+
chalk2.bold(
|
|
6554
|
+
`\u2502 Larkup CLI ${package_default.version}${" ".repeat(Math.max(1, 30 - package_default.version.length))}\u2502`
|
|
6555
|
+
)
|
|
6556
|
+
);
|
|
6557
|
+
log.info(chalk2.bold("\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F"));
|
|
6558
|
+
console.log("");
|
|
6549
6559
|
return;
|
|
6550
6560
|
}
|
|
6551
6561
|
log.info(`Update available: ${package_default.version} \u2192 ${latest}`);
|
|
6552
6562
|
if (options.check) return;
|
|
6553
|
-
|
|
6554
|
-
|
|
6555
|
-
|
|
6556
|
-
|
|
6557
|
-
"
|
|
6558
|
-
(
|
|
6559
|
-
|
|
6560
|
-
|
|
6561
|
-
|
|
6563
|
+
const s = prompts.spinner();
|
|
6564
|
+
s.start(chalk2.black(`Updating Larkup CLI ${package_default.version} \u2192 ${latest} \u2026`));
|
|
6565
|
+
try {
|
|
6566
|
+
await new Promise((resolve, reject) => {
|
|
6567
|
+
const child = spawn3("npm", ["install", "-g", `@larkup/cli@${latest}`], { stdio: "pipe" });
|
|
6568
|
+
child.on("error", reject);
|
|
6569
|
+
child.on(
|
|
6570
|
+
"exit",
|
|
6571
|
+
(code) => code === 0 ? resolve() : reject(new Error(`npm exited with code ${code}`))
|
|
6572
|
+
);
|
|
6573
|
+
});
|
|
6574
|
+
} catch (err) {
|
|
6575
|
+
s.stop(chalk2.red(`\u2717 Update failed`));
|
|
6576
|
+
throw err;
|
|
6577
|
+
}
|
|
6578
|
+
s.stop(chalk2.black(`Done!`));
|
|
6579
|
+
console.log("");
|
|
6580
|
+
log.info(chalk2.bold("\u256D\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E"));
|
|
6581
|
+
log.info(chalk2.bold(`\u2502 \u2713 Updated to ${latest}!${" ".repeat(Math.max(1, 31 - latest.length))}\u2502`));
|
|
6582
|
+
log.info(chalk2.bold("\u2502 Restart your terminal to apply the update. \u2502"));
|
|
6583
|
+
log.info(chalk2.bold("\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F"));
|
|
6584
|
+
console.log("");
|
|
6562
6585
|
}
|
|
6563
6586
|
|
|
6564
6587
|
// src/commands/open.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@larkup/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.31",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=22"
|
|
6
6
|
},
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"cli-table3": "^0.6.5",
|
|
33
33
|
"commander": "^15.0.0",
|
|
34
34
|
"zod": "^4.4.3",
|
|
35
|
-
"@larkup/core": "0.5.
|
|
36
|
-
"@larkup/marketplace": "0.2.
|
|
35
|
+
"@larkup/core": "0.5.3",
|
|
36
|
+
"@larkup/marketplace": "0.2.3",
|
|
37
37
|
"@larkup/vector-stores": "0.1.27"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|