kubernetes-fluent-client 3.0.0 → 3.0.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.
@@ -116,7 +116,7 @@ function K8s(model, filters = {}) {
116
116
  podList.push(object);
117
117
  }
118
118
  }
119
- catch (e) {
119
+ catch {
120
120
  throw new Error(`Failed to get logs in KFC Logs function`);
121
121
  }
122
122
  const podModel = { ...model, name: "V1Pod" };
@@ -90,8 +90,8 @@ class Watcher {
90
90
  constructor(model, filters, callback, watchCfg = {}) {
91
91
  // Set the retry delay to 5 seconds if not specified
92
92
  watchCfg.resyncDelaySec ??= 5;
93
- // Set the relist interval to 30 minutes if not specified
94
- watchCfg.relistIntervalSec ??= 1800;
93
+ // Set the relist interval to 10 minutes if not specified
94
+ watchCfg.relistIntervalSec ??= 600;
95
95
  // Set the resync interval to 10 minutes if not specified
96
96
  watchCfg.lastSeenLimitSeconds ??= 600;
97
97
  // Set the last seen limit to the resync interval
@@ -104,7 +104,7 @@ class Watcher {
104
104
  this.$relistTimer = setInterval(() => {
105
105
  this.#latestRelistWindow = new Date().toISOString();
106
106
  this.#events.emit(WatchEvent.INIT_CACHE_MISS, this.#latestRelistWindow);
107
- this.#list;
107
+ void this.#list();
108
108
  }, watchCfg.relistIntervalSec * 1000 + jitter);
109
109
  // Rebuild the watch every resync delay interval
110
110
  this.#resyncTimer = setInterval(this.#checkResync, watchCfg.resyncDelaySec * 1000 + jitter);
package/dist/generate.js CHANGED
@@ -133,7 +133,7 @@ async function readOrFetchCrd(opts) {
133
133
  return (0, client_node_1.loadAllYaml)(payload);
134
134
  }
135
135
  }
136
- catch (e) {
136
+ catch {
137
137
  // Ignore errors
138
138
  }
139
139
  // Next try to parse the source as a URL
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kubernetes-fluent-client",
3
- "version": "3.0.0",
3
+ "version": "3.0.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",
@@ -41,25 +41,25 @@
41
41
  "http-status-codes": "2.3.0",
42
42
  "node-fetch": "2.7.0",
43
43
  "quicktype-core": "23.0.170",
44
- "type-fest": "4.23.0",
44
+ "type-fest": "4.25.0",
45
45
  "yargs": "17.7.2"
46
46
  },
47
47
  "devDependencies": {
48
- "@commitlint/cli": "19.3.0",
49
- "@commitlint/config-conventional": "19.2.2",
48
+ "@commitlint/cli": "19.4.0",
49
+ "@commitlint/config-conventional": "19.4.1",
50
50
  "@jest/globals": "29.7.0",
51
51
  "@types/byline": "4.2.36",
52
52
  "@types/readable-stream": "4.0.15",
53
53
  "@types/urijs": "^1.19.25",
54
- "@types/yargs": "17.0.32",
55
- "@typescript-eslint/eslint-plugin": "7.17.0",
56
- "@typescript-eslint/parser": "7.17.0",
57
- "eslint-plugin-jsdoc": "48.8.3",
54
+ "@types/yargs": "17.0.33",
55
+ "@typescript-eslint/eslint-plugin": "8.3.0",
56
+ "@typescript-eslint/parser": "8.3.0",
57
+ "eslint-plugin-jsdoc": "50.2.2",
58
58
  "jest": "29.7.0",
59
- "nock": "13.5.4",
59
+ "nock": "13.5.5",
60
60
  "prettier": "3.3.3",
61
- "semantic-release": "24.0.0",
62
- "ts-jest": "29.2.3",
61
+ "semantic-release": "24.1.0",
62
+ "ts-jest": "29.2.5",
63
63
  "typescript": "5.5.4"
64
64
  },
65
65
  "release": {
@@ -13,7 +13,7 @@ import { ApplyCfg, FetchMethods, Filters, K8sInit, Paths, WatchAction } from "./
13
13
  import { k8sCfg, k8sExec } from "./utils";
14
14
  import { WatchCfg, Watcher } from "./watch";
15
15
  import { hasLogs } from "../helpers";
16
- import { Pod, Service, ReplicaSet } from "../upstream";
16
+ import { Pod, type Service, type ReplicaSet } from "../upstream";
17
17
  /**
18
18
  * Kubernetes fluent API inspired by Kubectl. Pass in a model, then call filters and actions on it.
19
19
  *
@@ -138,7 +138,7 @@ export function K8s<T extends GenericClass, K extends KubernetesObject = Instanc
138
138
  } else {
139
139
  podList.push(object);
140
140
  }
141
- } catch (e) {
141
+ } catch {
142
142
  throw new Error(`Failed to get logs in KFC Logs function`);
143
143
  }
144
144
 
@@ -113,8 +113,8 @@ export class Watcher<T extends GenericClass> {
113
113
  // Set the retry delay to 5 seconds if not specified
114
114
  watchCfg.resyncDelaySec ??= 5;
115
115
 
116
- // Set the relist interval to 30 minutes if not specified
117
- watchCfg.relistIntervalSec ??= 1800;
116
+ // Set the relist interval to 10 minutes if not specified
117
+ watchCfg.relistIntervalSec ??= 600;
118
118
 
119
119
  // Set the resync interval to 10 minutes if not specified
120
120
  watchCfg.lastSeenLimitSeconds ??= 600;
@@ -133,7 +133,7 @@ export class Watcher<T extends GenericClass> {
133
133
  () => {
134
134
  this.#latestRelistWindow = new Date().toISOString();
135
135
  this.#events.emit(WatchEvent.INIT_CACHE_MISS, this.#latestRelistWindow);
136
- this.#list;
136
+ void this.#list();
137
137
  },
138
138
  watchCfg.relistIntervalSec * 1000 + jitter,
139
139
  );
package/src/generate.ts CHANGED
@@ -160,7 +160,7 @@ async function readOrFetchCrd(opts: GenerateOptions): Promise<CustomResourceDefi
160
160
  const payload = fs.readFileSync(filePath, "utf8");
161
161
  return loadAllYaml(payload) as CustomResourceDefinition[];
162
162
  }
163
- } catch (e) {
163
+ } catch {
164
164
  // Ignore errors
165
165
  }
166
166