kubernetes-fluent-client 2.2.0 → 2.2.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.
@@ -1 +1 @@
1
- {"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../src/generate.ts"],"names":[],"mappings":"AAMA,OAAO,EAIL,cAAc,EAEf,MAAM,gBAAgB,CAAC;AAKxB,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,MAAM,WAAW,eAAe;IAC9B,qDAAqD;IACrD,MAAM,EAAE,MAAM,CAAC;IACf,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gDAAgD;IAChD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,wCAAwC;IACxC,QAAQ,CAAC,EAAE,MAAM,GAAG,cAAc,CAAC;IACnC,8EAA8E;IAC9E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4BAA4B;IAC5B,KAAK,EAAE,KAAK,CAAC;CACd;AAiKD;;;;;GAKG;AACH,wBAAsB,QAAQ,CAAC,IAAI,EAAE,eAAe,qCA4BnD"}
1
+ {"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../src/generate.ts"],"names":[],"mappings":"AAMA,OAAO,EAIL,cAAc,EAEf,MAAM,gBAAgB,CAAC;AAKxB,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,MAAM,WAAW,eAAe;IAC9B,qDAAqD;IACrD,MAAM,EAAE,MAAM,CAAC;IACf,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gDAAgD;IAChD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,wCAAwC;IACxC,QAAQ,CAAC,EAAE,MAAM,GAAG,cAAc,CAAC;IACnC,8EAA8E;IAC9E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4BAA4B;IAC5B,KAAK,EAAE,KAAK,CAAC;CACd;AAyKD;;;;;GAKG;AACH,wBAAsB,QAAQ,CAAC,IAAI,EAAE,eAAe,qCA4BnD"}
package/dist/generate.js CHANGED
@@ -115,7 +115,15 @@ async function convertCRDtoTS(crd, opts) {
115
115
  */
116
116
  async function readOrFetchCrd(opts) {
117
117
  const { source, logFn } = opts;
118
- const filePath = path.join(process.cwd(), source);
118
+ let filePath;
119
+ if (source[0] === "/") {
120
+ // If source is an absolute path
121
+ filePath = source;
122
+ }
123
+ else {
124
+ // If source is a relative path
125
+ filePath = path.join(process.cwd(), source);
126
+ }
119
127
  // First try to read the source as a file
120
128
  try {
121
129
  if (fs.existsSync(filePath)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kubernetes-fluent-client",
3
- "version": "2.2.0",
3
+ "version": "2.2.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",
@@ -40,22 +40,22 @@
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.104",
44
- "type-fest": "4.10.2",
43
+ "quicktype-core": "23.0.105",
44
+ "type-fest": "4.11.1",
45
45
  "yargs": "17.7.2"
46
46
  },
47
47
  "devDependencies": {
48
- "@commitlint/cli": "18.6.1",
49
- "@commitlint/config-conventional": "18.6.2",
48
+ "@commitlint/cli": "19.0.3",
49
+ "@commitlint/config-conventional": "19.0.3",
50
50
  "@jest/globals": "29.7.0",
51
51
  "@types/byline": "4.2.36",
52
52
  "@types/readable-stream": "4.0.10",
53
53
  "@types/yargs": "17.0.32",
54
- "@typescript-eslint/eslint-plugin": "7.0.2",
55
- "@typescript-eslint/parser": "7.0.2",
56
- "eslint-plugin-jsdoc": "48.1.0",
54
+ "@typescript-eslint/eslint-plugin": "7.1.1",
55
+ "@typescript-eslint/parser": "7.1.1",
56
+ "eslint-plugin-jsdoc": "48.2.0",
57
57
  "jest": "29.7.0",
58
- "nock": "13.5.3",
58
+ "nock": "13.5.4",
59
59
  "prettier": "3.2.5",
60
60
  "semantic-release": "23.0.2",
61
61
  "ts-jest": "29.1.2",
package/src/generate.ts CHANGED
@@ -142,7 +142,15 @@ async function convertCRDtoTS(
142
142
  */
143
143
  async function readOrFetchCrd(opts: GenerateOptions): Promise<CustomResourceDefinition[]> {
144
144
  const { source, logFn } = opts;
145
- const filePath = path.join(process.cwd(), source);
145
+ let filePath: string;
146
+
147
+ if (source[0] === "/") {
148
+ // If source is an absolute path
149
+ filePath = source;
150
+ } else {
151
+ // If source is a relative path
152
+ filePath = path.join(process.cwd(), source);
153
+ }
146
154
 
147
155
  // First try to read the source as a file
148
156
  try {