@redaktyn/cli 1.1.0 → 1.1.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.
- package/package.json +1 -1
- package/redaktyn-fingerprint.mjs +9 -2
- package/redaktyn-import.mjs +9 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redaktyn/cli",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Redaktyn CLI: bulk-enrol secrets from a .env or any vault (--project aware), local fingerprints, git/directory digest scans. Digests are computed on your machine; secret values never leave it.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/redaktyn-fingerprint.mjs
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
import { createHmac, pbkdf2 as _pbkdf2, createHash, hkdfSync } from "node:crypto";
|
|
33
33
|
import { promisify } from "node:util";
|
|
34
34
|
import * as readline from "node:readline";
|
|
35
|
-
import { readFileSync, existsSync } from "node:fs";
|
|
35
|
+
import { readFileSync, existsSync, realpathSync } from "node:fs";
|
|
36
36
|
import { pathToFileURL } from "node:url";
|
|
37
37
|
|
|
38
38
|
const pbkdf2 = promisify(_pbkdf2);
|
|
@@ -803,8 +803,15 @@ async function main() {
|
|
|
803
803
|
Without this check, importing anything from here would run the whole CLI —
|
|
804
804
|
argv policy, wizard and all — as a side effect of asking for a function.
|
|
805
805
|
*/
|
|
806
|
+
// argv[1] is the path the shell used. Under npx, `npm i -g` or any package-manager
|
|
807
|
+
// bin it is a SYMLINK, so comparing it to import.meta.url unresolved is false and the
|
|
808
|
+
// command exits silently without running (found 2026-10-09, first published 1.1.0).
|
|
809
|
+
// Resolve it first.
|
|
810
|
+
function realArgv1() {
|
|
811
|
+
try { return realpathSync(process.argv[1]); } catch { return process.argv[1]; }
|
|
812
|
+
}
|
|
806
813
|
const invokedDirectly =
|
|
807
|
-
!!process.argv[1] && import.meta.url === pathToFileURL(
|
|
814
|
+
!!process.argv[1] && import.meta.url === pathToFileURL(realArgv1()).href;
|
|
808
815
|
|
|
809
816
|
if (invokedDirectly) {
|
|
810
817
|
main().catch((err) => {
|
package/redaktyn-import.mjs
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
* Requires Node.js >= 18.
|
|
37
37
|
*/
|
|
38
38
|
|
|
39
|
-
import { readFileSync } from "node:fs";
|
|
39
|
+
import { readFileSync, realpathSync } from "node:fs";
|
|
40
40
|
import { basename } from "node:path";
|
|
41
41
|
import * as readline from "node:readline";
|
|
42
42
|
import { pathToFileURL } from "node:url";
|
|
@@ -1635,8 +1635,15 @@ function projectAfterImport({ existing, plan, byKey }) {
|
|
|
1635
1635
|
return out;
|
|
1636
1636
|
}
|
|
1637
1637
|
|
|
1638
|
+
// argv[1] is the path the shell used. Under npx, `npm i -g` or any package-manager
|
|
1639
|
+
// bin it is a SYMLINK, so comparing it to import.meta.url unresolved is false and the
|
|
1640
|
+
// command exits silently without running (found 2026-10-09, first published 1.1.0).
|
|
1641
|
+
// Resolve it first.
|
|
1642
|
+
function realArgv1() {
|
|
1643
|
+
try { return realpathSync(process.argv[1]); } catch { return process.argv[1]; }
|
|
1644
|
+
}
|
|
1638
1645
|
const invokedDirectly =
|
|
1639
|
-
!!process.argv[1] && import.meta.url === pathToFileURL(
|
|
1646
|
+
!!process.argv[1] && import.meta.url === pathToFileURL(realArgv1()).href;
|
|
1640
1647
|
|
|
1641
1648
|
if (invokedDirectly) {
|
|
1642
1649
|
main()
|