kubernetes-fluent-client 3.3.5 → 3.3.7
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 +39 -21
- package/.husky/pre-commit +0 -1
- package/.lintstagedrc.json +0 -6
- package/.prettierignore +0 -5
- package/CODEOWNERS +0 -6
- package/codeql-config.yaml +0 -3
- package/eslint.config.mjs +0 -66
- package/test/datastore.crd.yaml +0 -59
- package/test/webapp.crd.yaml +0 -62
package/package.json
CHANGED
|
@@ -1,25 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kubernetes-fluent-client",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.7",
|
|
4
4
|
"description": "A @kubernetes/client-node fluent API wrapper that leverages K8s Server Side Apply.",
|
|
5
5
|
"bin": "./dist/cli.js",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
|
-
"scripts": {
|
|
9
|
-
"prebuild": "rm -rf dist",
|
|
10
|
-
"build": "tsc",
|
|
11
|
-
"semantic-release": "semantic-release",
|
|
12
|
-
"test": "jest src --coverage",
|
|
13
|
-
"test:e2e": "jest e2e --runInBand",
|
|
14
|
-
"test:e2e:prep-crds": "kubectl apply -f test/ && npx ts-node src/cli.ts crd ./test/datastore.crd.yaml e2e && npx ts-node src/cli.ts crd https://raw.githubusercontent.com/defenseunicorns/kubernetes-fluent-client/refs/heads/main/test/webapp.crd.yaml e2e",
|
|
15
|
-
"test:e2e:prep-cluster": "k3d cluster create kfc-dev --k3s-arg '--debug@server:0' --wait && kubectl rollout status deployment -n kube-system",
|
|
16
|
-
"test:e2e:prep-image": "npm run build && npm pack && npm i kubernetes-fluent-client-0.0.0-development.tgz --no-save",
|
|
17
|
-
"test:e2e:run": "npm run test:e2e:prep-cluster && npm run test:e2e:prep-crds && npm run test:e2e:prep-image && jest e2e --runInBand && npm run test:e2e:cleanup",
|
|
18
|
-
"test:e2e:cleanup": "k3d cluster delete kfc-dev",
|
|
19
|
-
"format:check": "eslint src && prettier . --check",
|
|
20
|
-
"format:fix": "eslint --fix src && prettier . --write",
|
|
21
|
-
"prepare": "if [ \"$NODE_ENV\" != 'production' ]; then husky; fi"
|
|
22
|
-
},
|
|
23
8
|
"engines": {
|
|
24
9
|
"node": ">=18.0.0"
|
|
25
10
|
},
|
|
@@ -41,14 +26,36 @@
|
|
|
41
26
|
"url": "https://github.com/defenseunicorns/kubernetes-fluent-client/issues"
|
|
42
27
|
},
|
|
43
28
|
"homepage": "https://github.com/defenseunicorns/kubernetes-fluent-client#readme",
|
|
29
|
+
"files": [
|
|
30
|
+
"/src",
|
|
31
|
+
"/dist",
|
|
32
|
+
"!src/**/*.test.ts",
|
|
33
|
+
"!dist/**/*.test.js*",
|
|
34
|
+
"!dist/**/*.test.d.ts*"
|
|
35
|
+
],
|
|
36
|
+
"scripts": {
|
|
37
|
+
"prebuild": "rm -rf dist",
|
|
38
|
+
"build": "tsc",
|
|
39
|
+
"semantic-release": "semantic-release",
|
|
40
|
+
"test": "jest src --coverage",
|
|
41
|
+
"test:e2e": "jest e2e --runInBand",
|
|
42
|
+
"test:e2e:prep-crds": "kubectl apply -f test/ && npx ts-node src/cli.ts crd ./test/datastore.crd.yaml e2e && npx ts-node src/cli.ts crd https://raw.githubusercontent.com/defenseunicorns/kubernetes-fluent-client/refs/heads/main/test/webapp.crd.yaml e2e",
|
|
43
|
+
"test:e2e:prep-cluster": "k3d cluster create kfc-dev --k3s-arg '--debug@server:0' --wait && kubectl rollout status deployment -n kube-system",
|
|
44
|
+
"test:e2e:prep-image": "npm run build && npm pack && npm i kubernetes-fluent-client-0.0.0-development.tgz --no-save",
|
|
45
|
+
"test:e2e:run": "npm run test:e2e:prep-cluster && npm run test:e2e:prep-crds && npm run test:e2e:prep-image && jest e2e --runInBand && npm run test:e2e:cleanup",
|
|
46
|
+
"test:e2e:cleanup": "k3d cluster delete kfc-dev",
|
|
47
|
+
"format:check": "eslint src && prettier . --check",
|
|
48
|
+
"format:fix": "eslint --fix src && prettier . --write",
|
|
49
|
+
"prepare": "if [ \"$NODE_ENV\" != 'production' ]; then husky; fi"
|
|
50
|
+
},
|
|
44
51
|
"dependencies": {
|
|
45
52
|
"@kubernetes/client-node": "1.0.0-rc7",
|
|
46
53
|
"fast-json-patch": "3.1.1",
|
|
47
54
|
"http-status-codes": "2.3.0",
|
|
48
55
|
"node-fetch": "2.7.0",
|
|
49
56
|
"quicktype-core": "23.0.170",
|
|
50
|
-
"type-fest": "4.
|
|
51
|
-
"undici": "7.
|
|
57
|
+
"type-fest": "4.30.0",
|
|
58
|
+
"undici": "7.1.0",
|
|
52
59
|
"yargs": "17.7.2"
|
|
53
60
|
},
|
|
54
61
|
"devDependencies": {
|
|
@@ -61,19 +68,30 @@
|
|
|
61
68
|
"@types/readable-stream": "4.0.18",
|
|
62
69
|
"@types/urijs": "^1.19.25",
|
|
63
70
|
"@types/yargs": "17.0.33",
|
|
64
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
65
|
-
"@typescript-eslint/parser": "8.
|
|
71
|
+
"@typescript-eslint/eslint-plugin": "8.17.0",
|
|
72
|
+
"@typescript-eslint/parser": "8.17.0",
|
|
66
73
|
"eslint-plugin-jsdoc": "50.6.0",
|
|
67
74
|
"globals": "^15.12.0",
|
|
68
75
|
"husky": "^9.1.6",
|
|
69
76
|
"jest": "29.7.0",
|
|
70
77
|
"lint-staged": "^15.2.10",
|
|
71
78
|
"nock": "13.5.6",
|
|
72
|
-
"prettier": "3.4.
|
|
79
|
+
"prettier": "3.4.2",
|
|
73
80
|
"semantic-release": "24.2.0",
|
|
74
81
|
"ts-jest": "29.2.5",
|
|
75
82
|
"typescript": "5.7.2"
|
|
76
83
|
},
|
|
84
|
+
"overrides": {
|
|
85
|
+
"semantic-release@24.2.0": {
|
|
86
|
+
"npm": {
|
|
87
|
+
"glob": {
|
|
88
|
+
"foreground-child": {
|
|
89
|
+
"cross-spawn": "^7.0.6"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
77
95
|
"release": {
|
|
78
96
|
"branches": [
|
|
79
97
|
"main",
|
package/.husky/pre-commit
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
npx lint-staged --verbose
|
package/.lintstagedrc.json
DELETED
package/.prettierignore
DELETED
package/CODEOWNERS
DELETED
package/codeql-config.yaml
DELETED
package/eslint.config.mjs
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import typescriptEslint from "@typescript-eslint/eslint-plugin";
|
|
2
|
-
import globals from "globals";
|
|
3
|
-
import tsParser from "@typescript-eslint/parser";
|
|
4
|
-
import path from "node:path";
|
|
5
|
-
import { fileURLToPath } from "node:url";
|
|
6
|
-
import js from "@eslint/js";
|
|
7
|
-
import { FlatCompat } from "@eslint/eslintrc";
|
|
8
|
-
|
|
9
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
10
|
-
const __dirname = path.dirname(__filename);
|
|
11
|
-
const compat = new FlatCompat({
|
|
12
|
-
baseDirectory: __dirname,
|
|
13
|
-
recommendedConfig: js.configs.recommended,
|
|
14
|
-
allConfig: js.configs.all,
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
export default [
|
|
18
|
-
{
|
|
19
|
-
ignores: ["**/node_modules", "**/dist", "**/__mocks__", "e2e/**"],
|
|
20
|
-
},
|
|
21
|
-
...compat.extends(
|
|
22
|
-
"eslint:recommended",
|
|
23
|
-
"plugin:@typescript-eslint/recommended",
|
|
24
|
-
"plugin:jsdoc/recommended-typescript-error",
|
|
25
|
-
),
|
|
26
|
-
{
|
|
27
|
-
plugins: {
|
|
28
|
-
"@typescript-eslint": typescriptEslint,
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
languageOptions: {
|
|
32
|
-
globals: {
|
|
33
|
-
...Object.fromEntries(Object.entries(globals.browser).map(([key]) => [key, "off"])),
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
parser: tsParser,
|
|
37
|
-
ecmaVersion: 2022,
|
|
38
|
-
sourceType: "script",
|
|
39
|
-
|
|
40
|
-
parserOptions: {
|
|
41
|
-
project: ["tsconfig.json"],
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
rules: {
|
|
46
|
-
"class-methods-use-this": "warn",
|
|
47
|
-
"consistent-this": "warn",
|
|
48
|
-
"no-invalid-this": "warn",
|
|
49
|
-
|
|
50
|
-
"@typescript-eslint/no-floating-promises": [
|
|
51
|
-
"warn",
|
|
52
|
-
{
|
|
53
|
-
ignoreVoid: true,
|
|
54
|
-
},
|
|
55
|
-
],
|
|
56
|
-
|
|
57
|
-
"jsdoc/tag-lines": [
|
|
58
|
-
"error",
|
|
59
|
-
"any",
|
|
60
|
-
{
|
|
61
|
-
startLines: 1,
|
|
62
|
-
},
|
|
63
|
-
],
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
];
|
package/test/datastore.crd.yaml
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
apiVersion: apiextensions.k8s.io/v1
|
|
2
|
-
kind: CustomResourceDefinition
|
|
3
|
-
metadata:
|
|
4
|
-
name: datastores.pepr.io
|
|
5
|
-
spec:
|
|
6
|
-
group: pepr.io
|
|
7
|
-
names:
|
|
8
|
-
plural: datastores
|
|
9
|
-
singular: datastore
|
|
10
|
-
kind: Datastore
|
|
11
|
-
shortNames:
|
|
12
|
-
- ds
|
|
13
|
-
scope: Namespaced
|
|
14
|
-
versions:
|
|
15
|
-
- name: v1alpha1
|
|
16
|
-
served: true
|
|
17
|
-
storage: true
|
|
18
|
-
schema:
|
|
19
|
-
openAPIV3Schema:
|
|
20
|
-
type: object
|
|
21
|
-
properties:
|
|
22
|
-
spec:
|
|
23
|
-
type: object
|
|
24
|
-
properties:
|
|
25
|
-
kind:
|
|
26
|
-
type: string
|
|
27
|
-
enum:
|
|
28
|
-
- sqlite
|
|
29
|
-
- valkey
|
|
30
|
-
description: "The type of datastore. Allowed values: sqlite, valkey."
|
|
31
|
-
accessModes:
|
|
32
|
-
type: array
|
|
33
|
-
items:
|
|
34
|
-
type: string
|
|
35
|
-
description: "The access modes for the datastore (e.g., ReadWriteOnce, ReadOnlyMany)."
|
|
36
|
-
capacity:
|
|
37
|
-
type: string
|
|
38
|
-
description: "The capacity of the datastore (e.g., 10Gi)."
|
|
39
|
-
hostPath:
|
|
40
|
-
type: string
|
|
41
|
-
description: "The host path for the datastore storage."
|
|
42
|
-
required:
|
|
43
|
-
- kind
|
|
44
|
-
- accessModes
|
|
45
|
-
- capacity
|
|
46
|
-
- hostPath
|
|
47
|
-
status:
|
|
48
|
-
type: object
|
|
49
|
-
properties:
|
|
50
|
-
observedGeneration:
|
|
51
|
-
type: integer
|
|
52
|
-
phase:
|
|
53
|
-
type: string
|
|
54
|
-
enum:
|
|
55
|
-
- "Failed"
|
|
56
|
-
- "Pending"
|
|
57
|
-
- "Ready"
|
|
58
|
-
subresources:
|
|
59
|
-
status: {}
|
package/test/webapp.crd.yaml
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
apiVersion: apiextensions.k8s.io/v1
|
|
2
|
-
kind: CustomResourceDefinition
|
|
3
|
-
metadata:
|
|
4
|
-
name: webapps.pepr.io
|
|
5
|
-
spec:
|
|
6
|
-
group: pepr.io
|
|
7
|
-
versions:
|
|
8
|
-
- name: v1alpha1
|
|
9
|
-
served: true
|
|
10
|
-
storage: true
|
|
11
|
-
subresources:
|
|
12
|
-
status: {}
|
|
13
|
-
schema:
|
|
14
|
-
openAPIV3Schema:
|
|
15
|
-
type: object
|
|
16
|
-
properties:
|
|
17
|
-
apiVersion:
|
|
18
|
-
type: string
|
|
19
|
-
kind:
|
|
20
|
-
type: string
|
|
21
|
-
metadata:
|
|
22
|
-
type: object
|
|
23
|
-
spec:
|
|
24
|
-
required:
|
|
25
|
-
- theme
|
|
26
|
-
- language
|
|
27
|
-
- replicas
|
|
28
|
-
type: object
|
|
29
|
-
properties:
|
|
30
|
-
theme:
|
|
31
|
-
type: string
|
|
32
|
-
description: "Theme defines the theme of the web application, either dark or light."
|
|
33
|
-
enum:
|
|
34
|
-
- "dark"
|
|
35
|
-
- "light"
|
|
36
|
-
language:
|
|
37
|
-
type: string
|
|
38
|
-
description: "Language defines the language of the web application, either English (en) or Spanish (es)."
|
|
39
|
-
enum:
|
|
40
|
-
- "en"
|
|
41
|
-
- "es"
|
|
42
|
-
replicas:
|
|
43
|
-
type: integer
|
|
44
|
-
description: "Replicas is the number of desired replicas."
|
|
45
|
-
status:
|
|
46
|
-
type: object
|
|
47
|
-
properties:
|
|
48
|
-
observedGeneration:
|
|
49
|
-
type: integer
|
|
50
|
-
phase:
|
|
51
|
-
type: string
|
|
52
|
-
enum:
|
|
53
|
-
- "Failed"
|
|
54
|
-
- "Pending"
|
|
55
|
-
- "Ready"
|
|
56
|
-
scope: Namespaced
|
|
57
|
-
names:
|
|
58
|
-
plural: webapps
|
|
59
|
-
singular: webapp
|
|
60
|
-
kind: WebApp
|
|
61
|
-
shortNames:
|
|
62
|
-
- wa
|