@ksm0709/context 0.0.10 → 0.0.11
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/cli/index.js +15 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -32,7 +32,7 @@ var LIMITS = {
|
|
|
32
32
|
// package.json
|
|
33
33
|
var package_default = {
|
|
34
34
|
name: "@ksm0709/context",
|
|
35
|
-
version: "0.0.
|
|
35
|
+
version: "0.0.11",
|
|
36
36
|
author: {
|
|
37
37
|
name: "TaehoKang",
|
|
38
38
|
email: "ksm07091@gmail.com"
|
|
@@ -556,9 +556,13 @@ function runUpdatePlugin(version) {
|
|
|
556
556
|
}
|
|
557
557
|
|
|
558
558
|
// src/cli/index.ts
|
|
559
|
+
var PLUGIN_VERSION2 = package_default.version;
|
|
559
560
|
function printHelp(out) {
|
|
560
561
|
const write = out ?? ((s) => process.stdout.write(s));
|
|
561
|
-
write(`
|
|
562
|
+
write(`Context Plugin CLI v${PLUGIN_VERSION2}
|
|
563
|
+
|
|
564
|
+
`);
|
|
565
|
+
write(`Usage: context <command> [options]
|
|
562
566
|
|
|
563
567
|
`);
|
|
564
568
|
write(`Commands:
|
|
@@ -574,10 +578,19 @@ function printHelp(out) {
|
|
|
574
578
|
}
|
|
575
579
|
function runCli(argv) {
|
|
576
580
|
const [command, ...rest] = argv;
|
|
581
|
+
if (argv.includes("--help") || argv.includes("-h")) {
|
|
582
|
+
printHelp();
|
|
583
|
+
return;
|
|
584
|
+
}
|
|
577
585
|
switch (command) {
|
|
578
586
|
case "update":
|
|
579
587
|
runUpdate(rest);
|
|
580
588
|
break;
|
|
589
|
+
case "--version":
|
|
590
|
+
case "-v":
|
|
591
|
+
process.stdout.write(`${PLUGIN_VERSION2}
|
|
592
|
+
`);
|
|
593
|
+
break;
|
|
581
594
|
case undefined:
|
|
582
595
|
case "--help":
|
|
583
596
|
case "-h":
|
package/dist/index.js
CHANGED