@kitsy/cnos-cli 1.0.0 → 1.0.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.
Files changed (2) hide show
  1. package/dist/index.js +77 -0
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -65,6 +65,16 @@ function parseArgs(argv) {
65
65
  passthrough: []
66
66
  };
67
67
  }
68
+ if (argv[0] === "--version" || argv[0] === "-v") {
69
+ return {
70
+ command: "version",
71
+ args: [],
72
+ options: {
73
+ cliArgs: []
74
+ },
75
+ passthrough: []
76
+ };
77
+ }
68
78
  const normalizedArgv = normalizeCommand(argv);
69
79
  const [command = "doctor", ...rest] = normalizedArgv;
70
80
  const options = {};
@@ -1028,6 +1038,13 @@ var COMMANDS = [
1028
1038
  }
1029
1039
  ],
1030
1040
  examples: ["cnos help-ai --format json", "cnos help-ai export env --format json"]
1041
+ },
1042
+ {
1043
+ id: "version",
1044
+ summary: "Print the installed CNOS CLI version.",
1045
+ usage: "cnos version",
1046
+ description: "Prints the installed @kitsy/cnos-cli version string.",
1047
+ examples: ["cnos version", "cnos --version"]
1031
1048
  }
1032
1049
  ];
1033
1050
  var INTEGRATIONS = [
@@ -1787,6 +1804,62 @@ async function runValidate(options = {}) {
1787
1804
  return summary.valid ? "validation passed" : summary.issues.map((issue) => `${issue.code}: ${issue.message}`).join("\n");
1788
1805
  }
1789
1806
 
1807
+ // package.json
1808
+ var package_default = {
1809
+ name: "@kitsy/cnos-cli",
1810
+ version: "1.0.1",
1811
+ description: "CLI entry point and developer tooling for CNOS.",
1812
+ type: "module",
1813
+ main: "./dist/index.js",
1814
+ types: "./dist/index.d.ts",
1815
+ bin: {
1816
+ cnos: "./dist/index.js"
1817
+ },
1818
+ exports: {
1819
+ ".": {
1820
+ types: "./dist/index.d.ts",
1821
+ import: "./dist/index.js"
1822
+ }
1823
+ },
1824
+ files: [
1825
+ "dist"
1826
+ ],
1827
+ license: "MIT",
1828
+ repository: {
1829
+ type: "git",
1830
+ url: "https://github.com/kitsyai/cnos.git",
1831
+ directory: "packages/cli"
1832
+ },
1833
+ homepage: "https://github.com/kitsyai/cnos/tree/main/packages/cli",
1834
+ bugs: {
1835
+ url: "https://github.com/kitsyai/cnos/issues"
1836
+ },
1837
+ keywords: [
1838
+ "cnos",
1839
+ "cli",
1840
+ "config"
1841
+ ],
1842
+ publishConfig: {
1843
+ access: "public"
1844
+ },
1845
+ dependencies: {
1846
+ "@kitsy/cnos": "workspace:*"
1847
+ },
1848
+ scripts: {
1849
+ build: "tsup src/index.ts --format esm --dts",
1850
+ clean: "rimraf dist",
1851
+ dev: "tsup src/index.ts --watch --format esm --dts",
1852
+ lint: "eslint src test",
1853
+ test: "vitest run",
1854
+ typecheck: "tsc -p tsconfig.json --noEmit"
1855
+ }
1856
+ };
1857
+
1858
+ // src/commands/version.ts
1859
+ function runVersion() {
1860
+ return package_default.version;
1861
+ }
1862
+
1790
1863
  // src/commands/value.ts
1791
1864
  function normalizeValueCommand(args) {
1792
1865
  const [actionOrPath, ...tail] = args;
@@ -1929,6 +2002,10 @@ async function main(argv) {
1929
2002
  return;
1930
2003
  case "help-ai":
1931
2004
  process.stdout.write(`${runHelpAi(resolveHelpTopic(command, args), options.cliArgs)}
2005
+ `);
2006
+ return;
2007
+ case "version":
2008
+ process.stdout.write(`${runVersion()}
1932
2009
  `);
1933
2010
  return;
1934
2011
  case "init":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitsy/cnos-cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "CLI entry point and developer tooling for CNOS.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -36,7 +36,7 @@
36
36
  "access": "public"
37
37
  },
38
38
  "dependencies": {
39
- "@kitsy/cnos": "1.0.0"
39
+ "@kitsy/cnos": "1.0.1"
40
40
  },
41
41
  "scripts": {
42
42
  "build": "tsup src/index.ts --format esm --dts",