@nosana/api 2.2.2 → 2.2.13

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
@@ -71,3 +71,5 @@ npm install
71
71
  npm test
72
72
  npm run build
73
73
  ```
74
+
75
+ For more info go to [learn.nosana.com](https://learn.nosana.com)
@@ -2,7 +2,7 @@ import type { QueryClient } from '../../../../client/index.js';
2
2
  import { type DeploymentState } from '../../types.js';
3
3
  /**
4
4
  * @param replicas Number of replicas to set for the deployment
5
- * @throws Error if replicas is less than 1
5
+ * @throws Error if replicas is less than 0
6
6
  * @throws Error if there is an error updating the replica count
7
7
  * @returns Promise<void>
8
8
  * @description Updates the number of replicas for the deployment.
@@ -1,15 +1,15 @@
1
1
  import { errorFormatter } from '../../../../utils/errorFormatter.js';
2
2
  /**
3
3
  * @param replicas Number of replicas to set for the deployment
4
- * @throws Error if replicas is less than 1
4
+ * @throws Error if replicas is less than 0
5
5
  * @throws Error if there is an error updating the replica count
6
6
  * @returns Promise<void>
7
7
  * @description Updates the number of replicas for the deployment.
8
8
  * This will change the number of instances running for the deployment.
9
9
  */
10
10
  export async function deploymentUpdateReplicaCount(replicas, client, state) {
11
- if (replicas < 1) {
12
- throw new Error('Replica count must be at least 1');
11
+ if (replicas < 0) {
12
+ throw new Error('Replica count must be at least 0');
13
13
  }
14
14
  const { data, error } = await client.PATCH('/api/deployments/{deployment}/update-replica-count', {
15
15
  params: { path: { deployment: state.id } },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nosana/api",
3
- "version": "2.2.2",
3
+ "version": "2.2.13",
4
4
  "description": "Nosana API module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -11,10 +11,10 @@
11
11
  "dist"
12
12
  ],
13
13
  "scripts": {
14
- "build": "tsc",
14
+ "build": "tsc --build",
15
15
  "build:with-deps": "pnpm --filter $npm_package_name... run build",
16
16
  "dev": "tsc --watch",
17
- "dev:with-deps": "pnpm --filter $npm_package_name... run dev --parallel",
17
+ "dev:with-deps": "pnpm --filter $npm_package_name... --parallel run dev",
18
18
  "clean": "rm -rf dist",
19
19
  "generate:types:dev": "openapi-typescript https://dashboard.k8s.dev.nos.ci/api/swagger/json -o src/client/schema.ts",
20
20
  "generate:types:prd": "openapi-typescript https://dashboard.k8s.prd.nos.ci/api/swagger/json -o src/client/schema.ts",
@@ -40,12 +40,12 @@
40
40
  "vitest": "^4.0.3"
41
41
  },
42
42
  "dependencies": {
43
- "@nosana/types": "2.2.2",
43
+ "@nosana/types": "2.2.13",
44
44
  "openapi-fetch": "^0.14.0"
45
45
  },
46
46
  "packageManager": "pnpm@10.28.1",
47
47
  "engines": {
48
48
  "node": ">=20.18.0"
49
49
  },
50
- "gitHead": "91cae2f27f9be714010bdccd4067b03e40adc0e7"
50
+ "gitHead": "7f7f4c5d62d41a42cfdf7673728a9255f2a125ba"
51
51
  }