fly-secrets-diff 0.1.0 → 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/README.md +4 -1
- package/index.mjs +4 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,6 +20,10 @@ pnpm add fly-secrets-diff
|
|
|
20
20
|
|
|
21
21
|
Or just copy it over to you project, it's a single JavaScript file with no deps.
|
|
22
22
|
|
|
23
|
+
```sh
|
|
24
|
+
wget -O fsd.js https://raw.githubusercontent.com/hilja/fly-secrets-diff/refs/heads/main/index.mjs
|
|
25
|
+
```
|
|
26
|
+
|
|
23
27
|
## Usage
|
|
24
28
|
|
|
25
29
|
```
|
|
@@ -61,6 +65,5 @@ pnpm i
|
|
|
61
65
|
pnpm format
|
|
62
66
|
pnpm lint
|
|
63
67
|
pnpm test
|
|
64
|
-
pnpm build
|
|
65
68
|
pnpm ncu # Update packages
|
|
66
69
|
```
|
package/index.mjs
CHANGED
|
@@ -86,7 +86,7 @@ function args() {
|
|
|
86
86
|
* @param {boolean} interactive - log stdout during execution
|
|
87
87
|
* @returns {Promise<string>}
|
|
88
88
|
*/
|
|
89
|
-
export function $(cmd, args, interactive =
|
|
89
|
+
export function $(cmd, args, interactive = false) {
|
|
90
90
|
const { promise, resolve, reject } =
|
|
91
91
|
/** @type {PromiseWithResolvers<string>} */ (Promise.withResolvers())
|
|
92
92
|
const spawn = child_process.spawn(cmd, args, { env: process.env })
|
|
@@ -352,7 +352,9 @@ async function run(args) {
|
|
|
352
352
|
await printDiff(args)
|
|
353
353
|
}
|
|
354
354
|
|
|
355
|
-
const
|
|
355
|
+
const entry = process.argv[1]
|
|
356
|
+
const runAsScript =
|
|
357
|
+
entry && import.meta.filename.endsWith(entry.replace(process.cwd(), ''))
|
|
356
358
|
|
|
357
359
|
/**
|
|
358
360
|
* Execute the cli
|