ripencli 0.1.1 → 0.1.2
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.js +2 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
3
3
|
import { Box, Text, render, useApp, useInput, useStdout } from "ink";
|
|
4
|
+
import { createRequire } from "module";
|
|
4
5
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
5
6
|
import { join } from "path";
|
|
6
7
|
import { execa } from "execa";
|
|
@@ -2045,7 +2046,7 @@ function App({ project, global, version }) {
|
|
|
2045
2046
|
}
|
|
2046
2047
|
//#endregion
|
|
2047
2048
|
//#region src/cli.tsx
|
|
2048
|
-
const VERSION =
|
|
2049
|
+
const { version: VERSION } = createRequire(import.meta.url)("../package.json");
|
|
2049
2050
|
const args = process.argv.slice(2);
|
|
2050
2051
|
const isGlobal = args.includes("--global") || args.includes("-g");
|
|
2051
2052
|
const showHelp = args.includes("--help") || args.includes("-h");
|