pepr 0.2.3 → 0.2.5
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/package.json +30 -30
- package/dist/src/lib/fetch.js +4 -0
- package/package.json +30 -30
package/dist/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"engines": {
|
|
10
10
|
"node": ">=18.0.0"
|
|
11
11
|
},
|
|
12
|
-
"version": "0.2.
|
|
12
|
+
"version": "0.2.5",
|
|
13
13
|
"main": "dist/index.js",
|
|
14
14
|
"types": "dist/index.d.ts",
|
|
15
15
|
"pepr": {
|
|
@@ -36,37 +36,37 @@
|
|
|
36
36
|
"format:fix": "eslint src --fix && prettier src --write"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@kubernetes/client-node": "
|
|
40
|
-
"@rollup/plugin-json": "
|
|
41
|
-
"@rollup/plugin-node-resolve": "
|
|
42
|
-
"@rollup/plugin-typescript": "
|
|
43
|
-
"@types/ramda": "
|
|
44
|
-
"chokidar": "
|
|
45
|
-
"commander": "
|
|
46
|
-
"express": "
|
|
47
|
-
"fast-json-patch": "
|
|
48
|
-
"node-fetch": "
|
|
49
|
-
"node-forge": "
|
|
50
|
-
"prettier": "
|
|
51
|
-
"prompts": "
|
|
52
|
-
"ramda": "
|
|
53
|
-
"rollup": "
|
|
54
|
-
"ts-node": "
|
|
55
|
-
"tslib": "
|
|
56
|
-
"typescript": "
|
|
57
|
-
"uuid": "
|
|
39
|
+
"@kubernetes/client-node": "0.18.1",
|
|
40
|
+
"@rollup/plugin-json": "6.0.0",
|
|
41
|
+
"@rollup/plugin-node-resolve": "15.0.2",
|
|
42
|
+
"@rollup/plugin-typescript": "11.1.0",
|
|
43
|
+
"@types/ramda": "0.29.0",
|
|
44
|
+
"chokidar": "3.5.3",
|
|
45
|
+
"commander": "10.0.1",
|
|
46
|
+
"express": "4.18.2",
|
|
47
|
+
"fast-json-patch": "3.1.1",
|
|
48
|
+
"node-fetch": "2.6.9",
|
|
49
|
+
"node-forge": "1.3.1",
|
|
50
|
+
"prettier": "2.8.8",
|
|
51
|
+
"prompts": "2.4.2",
|
|
52
|
+
"ramda": "0.29.0",
|
|
53
|
+
"rollup": "3.21.0",
|
|
54
|
+
"ts-node": "10.9.1",
|
|
55
|
+
"tslib": "2.5.0",
|
|
56
|
+
"typescript": "5.0.4",
|
|
57
|
+
"uuid": "9.0.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@types/express": "
|
|
61
|
-
"@types/node-fetch": "
|
|
62
|
-
"@types/node-forge": "
|
|
63
|
-
"@types/prompts": "
|
|
64
|
-
"@types/uuid": "
|
|
65
|
-
"@typescript-eslint/eslint-plugin": "
|
|
66
|
-
"@typescript-eslint/parser": "
|
|
67
|
-
"ava": "
|
|
68
|
-
"eslint": "
|
|
69
|
-
"nock": "
|
|
60
|
+
"@types/express": "4.17.17",
|
|
61
|
+
"@types/node-fetch": "2.6.3",
|
|
62
|
+
"@types/node-forge": "1.3.2",
|
|
63
|
+
"@types/prompts": "2.4.4",
|
|
64
|
+
"@types/uuid": "9.0.1",
|
|
65
|
+
"@typescript-eslint/eslint-plugin": "5.59.0",
|
|
66
|
+
"@typescript-eslint/parser": "5.59.0",
|
|
67
|
+
"ava": "5.2.0",
|
|
68
|
+
"eslint": "8.39.0",
|
|
69
|
+
"nock": "13.3.0"
|
|
70
70
|
},
|
|
71
71
|
"ava": {
|
|
72
72
|
"extensions": [
|
package/dist/src/lib/fetch.js
CHANGED
|
@@ -23,6 +23,10 @@ exports.fetchRaw = node_fetch_1.default;
|
|
|
23
23
|
*/
|
|
24
24
|
async function fetch(url, init) {
|
|
25
25
|
const resp = await (0, node_fetch_1.default)(url, init);
|
|
26
|
+
// Throw an error if the response is not OK
|
|
27
|
+
if (!resp.ok) {
|
|
28
|
+
throw new Error(`HTTP ${resp.status} ${resp.statusText}`);
|
|
29
|
+
}
|
|
26
30
|
const data = await resp.json();
|
|
27
31
|
return data;
|
|
28
32
|
}
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"engines": {
|
|
10
10
|
"node": ">=18.0.0"
|
|
11
11
|
},
|
|
12
|
-
"version": "0.2.
|
|
12
|
+
"version": "0.2.5",
|
|
13
13
|
"main": "dist/index.js",
|
|
14
14
|
"types": "dist/index.d.ts",
|
|
15
15
|
"pepr": {
|
|
@@ -36,37 +36,37 @@
|
|
|
36
36
|
"format:fix": "eslint src --fix && prettier src --write"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@kubernetes/client-node": "
|
|
40
|
-
"@rollup/plugin-json": "
|
|
41
|
-
"@rollup/plugin-node-resolve": "
|
|
42
|
-
"@rollup/plugin-typescript": "
|
|
43
|
-
"@types/ramda": "
|
|
44
|
-
"chokidar": "
|
|
45
|
-
"commander": "
|
|
46
|
-
"express": "
|
|
47
|
-
"fast-json-patch": "
|
|
48
|
-
"node-fetch": "
|
|
49
|
-
"node-forge": "
|
|
50
|
-
"prettier": "
|
|
51
|
-
"prompts": "
|
|
52
|
-
"ramda": "
|
|
53
|
-
"rollup": "
|
|
54
|
-
"ts-node": "
|
|
55
|
-
"tslib": "
|
|
56
|
-
"typescript": "
|
|
57
|
-
"uuid": "
|
|
39
|
+
"@kubernetes/client-node": "0.18.1",
|
|
40
|
+
"@rollup/plugin-json": "6.0.0",
|
|
41
|
+
"@rollup/plugin-node-resolve": "15.0.2",
|
|
42
|
+
"@rollup/plugin-typescript": "11.1.0",
|
|
43
|
+
"@types/ramda": "0.29.0",
|
|
44
|
+
"chokidar": "3.5.3",
|
|
45
|
+
"commander": "10.0.1",
|
|
46
|
+
"express": "4.18.2",
|
|
47
|
+
"fast-json-patch": "3.1.1",
|
|
48
|
+
"node-fetch": "2.6.9",
|
|
49
|
+
"node-forge": "1.3.1",
|
|
50
|
+
"prettier": "2.8.8",
|
|
51
|
+
"prompts": "2.4.2",
|
|
52
|
+
"ramda": "0.29.0",
|
|
53
|
+
"rollup": "3.21.0",
|
|
54
|
+
"ts-node": "10.9.1",
|
|
55
|
+
"tslib": "2.5.0",
|
|
56
|
+
"typescript": "5.0.4",
|
|
57
|
+
"uuid": "9.0.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@types/express": "
|
|
61
|
-
"@types/node-fetch": "
|
|
62
|
-
"@types/node-forge": "
|
|
63
|
-
"@types/prompts": "
|
|
64
|
-
"@types/uuid": "
|
|
65
|
-
"@typescript-eslint/eslint-plugin": "
|
|
66
|
-
"@typescript-eslint/parser": "
|
|
67
|
-
"ava": "
|
|
68
|
-
"eslint": "
|
|
69
|
-
"nock": "
|
|
60
|
+
"@types/express": "4.17.17",
|
|
61
|
+
"@types/node-fetch": "2.6.3",
|
|
62
|
+
"@types/node-forge": "1.3.2",
|
|
63
|
+
"@types/prompts": "2.4.4",
|
|
64
|
+
"@types/uuid": "9.0.1",
|
|
65
|
+
"@typescript-eslint/eslint-plugin": "5.59.0",
|
|
66
|
+
"@typescript-eslint/parser": "5.59.0",
|
|
67
|
+
"ava": "5.2.0",
|
|
68
|
+
"eslint": "8.39.0",
|
|
69
|
+
"nock": "13.3.0"
|
|
70
70
|
},
|
|
71
71
|
"ava": {
|
|
72
72
|
"extensions": [
|