@keywaysh/cli 0.0.2 → 0.0.3
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 +6 -16
- package/dist/cli.js +15 -9
- package/package.json +2 -3
package/README.md
CHANGED
|
@@ -8,31 +8,21 @@
|
|
|
8
8
|
## Installation
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
Or use without installing:
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
npx @keywaysh/cli init
|
|
11
|
+
npm install @keywaysh/cli -g
|
|
18
12
|
```
|
|
19
13
|
|
|
20
14
|
## Quick Start
|
|
21
15
|
|
|
22
16
|
```bash
|
|
23
|
-
#
|
|
17
|
+
# Authenticate and create your vault
|
|
24
18
|
keyway login
|
|
25
|
-
|
|
26
|
-
# 1. Initialize a vault for your repository
|
|
27
19
|
keyway init
|
|
28
20
|
|
|
29
|
-
#
|
|
30
|
-
|
|
31
|
-
# 3. Push secrets to the vault
|
|
32
|
-
keyway push --file .env
|
|
21
|
+
# Push your secrets (defaults to .env; pick a file with --file)
|
|
22
|
+
keyway push
|
|
33
23
|
|
|
34
|
-
#
|
|
35
|
-
keyway pull
|
|
24
|
+
# On another machine, pull them back
|
|
25
|
+
keyway pull
|
|
36
26
|
```
|
|
37
27
|
|
|
38
28
|
## Commands
|
package/dist/cli.js
CHANGED
|
@@ -183,7 +183,7 @@ import fs from "fs";
|
|
|
183
183
|
// package.json
|
|
184
184
|
var package_default = {
|
|
185
185
|
name: "@keywaysh/cli",
|
|
186
|
-
version: "0.0.
|
|
186
|
+
version: "0.0.3",
|
|
187
187
|
description: "One link to all your secrets",
|
|
188
188
|
type: "module",
|
|
189
189
|
bin: {
|
|
@@ -228,8 +228,7 @@ var package_default = {
|
|
|
228
228
|
conf: "^15.0.2",
|
|
229
229
|
open: "^11.0.0",
|
|
230
230
|
"posthog-node": "^3.5.0",
|
|
231
|
-
prompts: "^2.4.2"
|
|
232
|
-
undici: "^7.13.0"
|
|
231
|
+
prompts: "^2.4.2"
|
|
233
232
|
},
|
|
234
233
|
devDependencies: {
|
|
235
234
|
"@types/node": "^24.2.0",
|
|
@@ -926,7 +925,6 @@ import { execSync as execSync2 } from "child_process";
|
|
|
926
925
|
import { writeFileSync, unlinkSync, readFileSync, existsSync } from "fs";
|
|
927
926
|
import { tmpdir } from "os";
|
|
928
927
|
import { join } from "path";
|
|
929
|
-
import { fetch as fetch2 } from "undici";
|
|
930
928
|
var API_HEALTH_URL = `${process.env.KEYWAY_API_URL || INTERNAL_API_URL}/`;
|
|
931
929
|
async function checkNode() {
|
|
932
930
|
const nodeVersion = process.versions.node;
|
|
@@ -978,10 +976,19 @@ async function checkGit() {
|
|
|
978
976
|
}
|
|
979
977
|
}
|
|
980
978
|
async function checkNetwork() {
|
|
979
|
+
const fetchFn = globalThis.fetch;
|
|
980
|
+
if (!fetchFn) {
|
|
981
|
+
return {
|
|
982
|
+
id: "network",
|
|
983
|
+
name: "API connectivity",
|
|
984
|
+
status: "warn",
|
|
985
|
+
detail: "Fetch API not available in this Node.js runtime"
|
|
986
|
+
};
|
|
987
|
+
}
|
|
981
988
|
try {
|
|
982
989
|
const controller = new AbortController();
|
|
983
990
|
const timeout = setTimeout(() => controller.abort(), 2e3);
|
|
984
|
-
const response = await
|
|
991
|
+
const response = await fetchFn(API_HEALTH_URL, {
|
|
985
992
|
method: "HEAD",
|
|
986
993
|
signal: controller.signal
|
|
987
994
|
});
|
|
@@ -1093,7 +1100,7 @@ async function checkSystemClock() {
|
|
|
1093
1100
|
try {
|
|
1094
1101
|
const controller = new AbortController();
|
|
1095
1102
|
const timeout = setTimeout(() => controller.abort(), 2e3);
|
|
1096
|
-
const response = await
|
|
1103
|
+
const response = await fetch("https://api.keyway.sh/", {
|
|
1097
1104
|
method: "HEAD",
|
|
1098
1105
|
signal: controller.signal
|
|
1099
1106
|
});
|
|
@@ -1227,7 +1234,7 @@ Summary: ${formatSummary(results)}`);
|
|
|
1227
1234
|
// package.json with { type: 'json' }
|
|
1228
1235
|
var package_default2 = {
|
|
1229
1236
|
name: "@keywaysh/cli",
|
|
1230
|
-
version: "0.0.
|
|
1237
|
+
version: "0.0.3",
|
|
1231
1238
|
description: "One link to all your secrets",
|
|
1232
1239
|
type: "module",
|
|
1233
1240
|
bin: {
|
|
@@ -1272,8 +1279,7 @@ var package_default2 = {
|
|
|
1272
1279
|
conf: "^15.0.2",
|
|
1273
1280
|
open: "^11.0.0",
|
|
1274
1281
|
"posthog-node": "^3.5.0",
|
|
1275
|
-
prompts: "^2.4.2"
|
|
1276
|
-
undici: "^7.13.0"
|
|
1282
|
+
prompts: "^2.4.2"
|
|
1277
1283
|
},
|
|
1278
1284
|
devDependencies: {
|
|
1279
1285
|
"@types/node": "^24.2.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keywaysh/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "One link to all your secrets",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -36,8 +36,7 @@
|
|
|
36
36
|
"conf": "^15.0.2",
|
|
37
37
|
"open": "^11.0.0",
|
|
38
38
|
"posthog-node": "^3.5.0",
|
|
39
|
-
"prompts": "^2.4.2"
|
|
40
|
-
"undici": "^7.13.0"
|
|
39
|
+
"prompts": "^2.4.2"
|
|
41
40
|
},
|
|
42
41
|
"devDependencies": {
|
|
43
42
|
"@types/node": "^24.2.0",
|