@omnidev-ai/cli 0.6.0 → 0.6.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 +12 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -23,6 +23,7 @@ import { run } from "@stricli/core";
23
23
 
24
24
  // src/lib/dynamic-app.ts
25
25
  import { existsSync as existsSync7 } from "node:fs";
26
+ import { createRequire as createRequire2 } from "node:module";
26
27
  import { join as join5 } from "node:path";
27
28
  import { buildApplication, buildRouteMap as buildRouteMap4 } from "@stricli/core";
28
29
 
@@ -969,6 +970,16 @@ async function runSync() {
969
970
 
970
971
  // src/lib/dynamic-app.ts
971
972
  import { debug } from "@omnidev-ai/core";
973
+ var require2 = createRequire2(import.meta.url);
974
+ function readCliVersion() {
975
+ try {
976
+ const pkg = require2("../../package.json");
977
+ if (typeof pkg?.version === "string") {
978
+ return pkg.version;
979
+ }
980
+ } catch {}
981
+ return "0.0.0";
982
+ }
972
983
  async function buildDynamicApp() {
973
984
  const routes = {
974
985
  init: initCommand,
@@ -1008,7 +1019,7 @@ async function buildDynamicApp() {
1008
1019
  }), {
1009
1020
  name: "omnidev",
1010
1021
  versionInfo: {
1011
- currentVersion: "0.1.0"
1022
+ currentVersion: readCliVersion()
1012
1023
  }
1013
1024
  });
1014
1025
  debug("App built successfully");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omnidev-ai/cli",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {