@anchrd/colab-sdk 0.1.28 → 0.1.29

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.
@@ -194,6 +194,7 @@ export declare const GadgetTestRun: z.ZodObject<{
194
194
  current: z.ZodBoolean;
195
195
  status: z.ZodEnum<{
196
196
  failed: "failed";
197
+ running: "running";
197
198
  passed: "passed";
198
199
  }>;
199
200
  passed: z.ZodNumber;
@@ -297,6 +298,7 @@ export declare const GadgetDetail: z.ZodObject<{
297
298
  current: z.ZodBoolean;
298
299
  status: z.ZodEnum<{
299
300
  failed: "failed";
301
+ running: "running";
300
302
  passed: "passed";
301
303
  }>;
302
304
  passed: z.ZodNumber;
@@ -111,7 +111,7 @@ export const GadgetPublishInput = z.strictObject({
111
111
  force: z
112
112
  .literal(true)
113
113
  .optional()
114
- .describe("Publish although tests fail. Never for a machine: an Operator publishes only with every test green."),
114
+ .describe("Publish although tests fail. Never for a machine: an Operator publishes only with every test green. A draft with tests needs a run of exactly its state first (intelligence_gadget_test); without one the publish starts the tests and refuses until they ended."),
115
115
  rev: Rev,
116
116
  });
117
117
  export const GadgetTestInput = z.strictObject({
@@ -119,7 +119,7 @@ export const GadgetTestInput = z.strictObject({
119
119
  version: z
120
120
  .enum(["live", "draft"])
121
121
  .optional()
122
- .describe("Which state to test: draft (the default when there is one) or live. Tests run with your own rights against a storage of their own, never live's."),
122
+ .describe("Which state to test: draft (the default when there is one) or live. Tests run with your own rights against a storage of their own, never live's. The answer is the run once it ended within 20 seconds, else the run as running: it goes on in the background, and intelligence_gadget_get shows it under test once it ended."),
123
123
  });
124
124
  // The log's filters (#643, Nodes › Gadget › Konsole › Log).
125
125
  export const GadgetCallStatus = z.enum(["succeeded", "failed"]);
@@ -204,13 +204,15 @@ export const GadgetTestResult = z.object({
204
204
  .object({ file: z.string(), line: z.number().int(), column: z.number().int() })
205
205
  .nullable(),
206
206
  });
207
- // A run of a gadget's tests (#643, Nodes › Gadget › Konsole › Tests).
207
+ // A run of a gadget's tests (#643, Nodes › Gadget › Konsole › Tests). `running` (#888, E150): the run
208
+ // goes on in the queue after `intelligence_gadget_test` answered; `at` is when it started, the
209
+ // counts are 0 and `tests` empty until `intelligence_gadget_get` shows it ended.
208
210
  export const GadgetTestRun = z.object({
209
211
  // The state that was tested: a version's number or `draft`.
210
212
  version: z.union([z.number().int(), z.literal("draft")]),
211
213
  // True while that state stands as it was tested: the draft unchanged, the version still there.
212
214
  current: z.boolean(),
213
- status: z.enum(["passed", "failed"]),
215
+ status: z.enum(["running", "passed", "failed"]),
214
216
  passed: z.number().int(),
215
217
  failed: z.number().int(),
216
218
  at: z.iso.datetime(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anchrd/colab-sdk",
3
- "version": "0.1.28",
3
+ "version": "0.1.29",
4
4
  "description": "Types, Zod schemas and the service client of Colab, the contract between its UI, backends and outside services.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",