@mmapp/react-compiler 0.1.0-alpha.5 → 0.1.0-alpha.6

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 CHANGED
@@ -17552,6 +17552,7 @@ async function whoami(apiUrl) {
17552
17552
  }
17553
17553
 
17554
17554
  // src/cli/index.ts
17555
+ var import_meta = {};
17555
17556
  var args = process.argv.slice(2);
17556
17557
  var command = args[0];
17557
17558
  function getFlag(flag) {
@@ -17826,9 +17827,34 @@ async function main() {
17826
17827
  console.error(" Usage: mmrc config [get <key> | set <key> <value> | list]");
17827
17828
  process.exit(1);
17828
17829
  }
17830
+ } else if (command === "version" || command === "-v" || command === "--version" || hasFlag("--version") || hasFlag("-v")) {
17831
+ const { readFileSync: readFileSync8 } = await import("fs");
17832
+ const { resolve: resolve5, dirname: dirname4 } = await import("path");
17833
+ try {
17834
+ const pkgPath = resolve5(dirname4(new URL(import_meta.url).pathname), "../../package.json");
17835
+ const pkg = JSON.parse(readFileSync8(pkgPath, "utf-8"));
17836
+ console.log(`mmrc ${pkg.version}`);
17837
+ } catch {
17838
+ try {
17839
+ const pkgPath = resolve5(__dirname, "../../package.json");
17840
+ const pkg = JSON.parse(readFileSync8(pkgPath, "utf-8"));
17841
+ console.log(`mmrc ${pkg.version}`);
17842
+ } catch {
17843
+ console.log("mmrc (version unknown)");
17844
+ }
17845
+ }
17829
17846
  } else {
17847
+ let version = "";
17848
+ try {
17849
+ const { readFileSync: readFileSync8 } = await import("fs");
17850
+ const { resolve: resolve5 } = await import("path");
17851
+ const pkgPath = resolve5(__dirname, "../../package.json");
17852
+ const pkg = JSON.parse(readFileSync8(pkgPath, "utf-8"));
17853
+ version = ` v${pkg.version}`;
17854
+ } catch {
17855
+ }
17830
17856
  console.log(`
17831
- MindMatrix React Compiler (mmrc)
17857
+ MindMatrix React Compiler (mmrc${version})
17832
17858
 
17833
17859
  Commands:
17834
17860
  init Scaffold a new blueprint package
@@ -709,9 +709,34 @@ async function main() {
709
709
  console.error(" Usage: mmrc config [get <key> | set <key> <value> | list]");
710
710
  process.exit(1);
711
711
  }
712
+ } else if (command === "version" || command === "-v" || command === "--version" || hasFlag("--version") || hasFlag("-v")) {
713
+ const { readFileSync: readFileSync3 } = await import("fs");
714
+ const { resolve: resolve2, dirname } = await import("path");
715
+ try {
716
+ const pkgPath = resolve2(dirname(new URL(import.meta.url).pathname), "../../package.json");
717
+ const pkg = JSON.parse(readFileSync3(pkgPath, "utf-8"));
718
+ console.log(`mmrc ${pkg.version}`);
719
+ } catch {
720
+ try {
721
+ const pkgPath = resolve2(__dirname, "../../package.json");
722
+ const pkg = JSON.parse(readFileSync3(pkgPath, "utf-8"));
723
+ console.log(`mmrc ${pkg.version}`);
724
+ } catch {
725
+ console.log("mmrc (version unknown)");
726
+ }
727
+ }
712
728
  } else {
729
+ let version = "";
730
+ try {
731
+ const { readFileSync: readFileSync3 } = await import("fs");
732
+ const { resolve: resolve2 } = await import("path");
733
+ const pkgPath = resolve2(__dirname, "../../package.json");
734
+ const pkg = JSON.parse(readFileSync3(pkgPath, "utf-8"));
735
+ version = ` v${pkg.version}`;
736
+ } catch {
737
+ }
713
738
  console.log(`
714
- MindMatrix React Compiler (mmrc)
739
+ MindMatrix React Compiler (mmrc${version})
715
740
 
716
741
  Commands:
717
742
  init Scaffold a new blueprint package
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mmapp/react-compiler",
3
- "version": "0.1.0-alpha.5",
3
+ "version": "0.1.0-alpha.6",
4
4
  "description": "Babel plugin + Vite integration for compiling React workflows to Pure Form IR",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",