kubernetes-fluent-client 2.6.0 → 2.6.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 CHANGED
@@ -7,6 +7,12 @@
7
7
 
8
8
  The Kubernetes Fluent Client for Node is a fluent API for the [Kubernetes JavaScript Client](https://github.com/kubernetes-client/javascript) with some additional logic for [Server Side Apply](https://kubernetes.io/docs/reference/using-api/server-side-apply/), [Watch](https://kubernetes.io/docs/reference/using-api/api-concepts/#efficient-detection-of-changes) with retry/signal control, and [Field Selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors/). In addition to providing a human-friendly API, it also provides a simple way to create and manage resources in the cluster and integrate with K8s in a type-safe way.
9
9
 
10
+ To install the Kubernetes Fluent Client, run the following command:
11
+
12
+ ```bash
13
+ npm install kubernetes-fluent-client
14
+ ```
15
+
10
16
  See below for some example uses of the library.
11
17
 
12
18
  ```typescript
@@ -117,7 +117,7 @@ function K8s(model, filters = {}) {
117
117
  }
118
118
  }
119
119
  catch (e) {
120
- throw new Error(e);
120
+ throw new Error(`Failed to get logs in KFC Logs function`);
121
121
  }
122
122
  const podModel = { ...model, name: "V1Pod" };
123
123
  const logPromises = podList.map(po => (0, utils_1.k8sExec)(podModel, { ...filters, name: po.metadata.name }, "LOG"));
package/dist/generate.js CHANGED
@@ -153,7 +153,7 @@ async function readOrFetchCrd(opts) {
153
153
  catch (e) {
154
154
  // If invalid, ignore the error
155
155
  if (e.code !== "ERR_INVALID_URL") {
156
- throw new Error(e);
156
+ throw new Error(`Error parsing URL ${source}`);
157
157
  }
158
158
  }
159
159
  // Finally, if the source is not a file or URL, try to read it as a CustomResourceDefinition from the cluster
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kubernetes-fluent-client",
3
- "version": "2.6.0",
3
+ "version": "2.6.2",
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",
@@ -35,13 +35,13 @@
35
35
  },
36
36
  "homepage": "https://github.com/defenseunicorns/kubernetes-fluent-client#readme",
37
37
  "dependencies": {
38
- "@kubernetes/client-node": "1.0.0-rc4",
38
+ "@kubernetes/client-node": "1.0.0-rc6",
39
39
  "byline": "5.0.0",
40
40
  "fast-json-patch": "3.1.1",
41
41
  "http-status-codes": "2.3.0",
42
42
  "node-fetch": "2.7.0",
43
- "quicktype-core": "23.0.158",
44
- "type-fest": "4.18.2",
43
+ "quicktype-core": "23.0.170",
44
+ "type-fest": "4.20.1",
45
45
  "yargs": "17.7.2"
46
46
  },
47
47
  "devDependencies": {
@@ -50,15 +50,16 @@
50
50
  "@jest/globals": "29.7.0",
51
51
  "@types/byline": "4.2.36",
52
52
  "@types/readable-stream": "4.0.14",
53
+ "@types/urijs": "^1.19.25",
53
54
  "@types/yargs": "17.0.32",
54
- "@typescript-eslint/eslint-plugin": "7.10.0",
55
- "@typescript-eslint/parser": "7.10.0",
56
- "eslint-plugin-jsdoc": "48.2.5",
55
+ "@typescript-eslint/eslint-plugin": "7.13.1",
56
+ "@typescript-eslint/parser": "7.13.1",
57
+ "eslint-plugin-jsdoc": "48.2.12",
57
58
  "jest": "29.7.0",
58
59
  "nock": "13.5.4",
59
- "prettier": "3.2.5",
60
- "semantic-release": "23.1.1",
61
- "ts-jest": "29.1.3",
60
+ "prettier": "3.3.2",
61
+ "semantic-release": "24.0.0",
62
+ "ts-jest": "29.1.5",
62
63
  "typescript": "5.4.5"
63
64
  },
64
65
  "release": {
@@ -139,7 +139,7 @@ export function K8s<T extends GenericClass, K extends KubernetesObject = Instanc
139
139
  podList.push(object);
140
140
  }
141
141
  } catch (e) {
142
- throw new Error(e);
142
+ throw new Error(`Failed to get logs in KFC Logs function`);
143
143
  }
144
144
 
145
145
  const podModel = { ...model, name: "V1Pod" };
package/src/generate.ts CHANGED
@@ -183,7 +183,7 @@ async function readOrFetchCrd(opts: GenerateOptions): Promise<CustomResourceDefi
183
183
  } catch (e) {
184
184
  // If invalid, ignore the error
185
185
  if (e.code !== "ERR_INVALID_URL") {
186
- throw new Error(e);
186
+ throw new Error(`Error parsing URL ${source}`);
187
187
  }
188
188
  }
189
189