@vm0/runner 2.0.3 → 2.0.4

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.
Files changed (2) hide show
  1. package/index.js +15 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -4766,6 +4766,13 @@ var apiErrorSchema = z3.object({
4766
4766
  // ../../packages/core/src/contracts/composes.ts
4767
4767
  import { z as z4 } from "zod";
4768
4768
  var c = initContract();
4769
+ var composeVersionQuerySchema = z4.preprocess(
4770
+ (val) => val === void 0 || val === null ? void 0 : String(val),
4771
+ z4.string().min(1, "Missing version query parameter").regex(
4772
+ /^[a-f0-9]{8,64}$|^latest$/i,
4773
+ "Version must be 8-64 hex characters or 'latest'"
4774
+ )
4775
+ );
4769
4776
  var agentNameSchema = z4.string().min(3, "Agent name must be at least 3 characters").max(64, "Agent name must be 64 characters or less").regex(
4770
4777
  /^[a-zA-Z0-9][a-zA-Z0-9-]{1,62}[a-zA-Z0-9]$/,
4771
4778
  "Agent name must start and end with letter or number, and contain only letters, numbers, and hyphens"
@@ -4902,7 +4909,7 @@ var composesVersionsContract = c.router({
4902
4909
  path: "/api/agent/composes/versions",
4903
4910
  query: z4.object({
4904
4911
  composeId: z4.string().min(1, "Missing composeId query parameter"),
4905
- version: z4.string().min(1, "Missing version query parameter")
4912
+ version: composeVersionQuerySchema
4906
4913
  }),
4907
4914
  responses: {
4908
4915
  200: z4.object({
@@ -5213,6 +5220,10 @@ var runNetworkLogsContract = c2.router({
5213
5220
  import { z as z6 } from "zod";
5214
5221
  var c3 = initContract();
5215
5222
  var storageTypeSchema = z6.enum(["volume", "artifact"]);
5223
+ var versionQuerySchema = z6.preprocess(
5224
+ (val) => val === void 0 || val === null ? void 0 : String(val),
5225
+ z6.string().regex(/^[a-f0-9]{8,64}$/i, "Version must be 8-64 hex characters").optional()
5226
+ );
5216
5227
  var uploadStorageResponseSchema = z6.object({
5217
5228
  name: z6.string(),
5218
5229
  versionId: z6.string(),
@@ -5261,7 +5272,7 @@ var storagesContract = c3.router({
5261
5272
  path: "/api/storages",
5262
5273
  query: z6.object({
5263
5274
  name: z6.string().min(1, "Storage name is required"),
5264
- version: z6.string().optional()
5275
+ version: versionQuerySchema
5265
5276
  }),
5266
5277
  responses: {
5267
5278
  // Binary response - actual handling done at route level
@@ -5361,7 +5372,7 @@ var storagesDownloadContract = c3.router({
5361
5372
  query: z6.object({
5362
5373
  name: z6.string().min(1, "Storage name is required"),
5363
5374
  type: storageTypeSchema,
5364
- version: z6.string().optional()
5375
+ version: versionQuerySchema
5365
5376
  }),
5366
5377
  responses: {
5367
5378
  // Normal response with presigned URL
@@ -9355,7 +9366,7 @@ var statusCommand = new Command2("status").description("Show runner status").act
9355
9366
  });
9356
9367
 
9357
9368
  // src/index.ts
9358
- var version = true ? "2.0.3" : "0.1.0";
9369
+ var version = true ? "2.0.4" : "0.1.0";
9359
9370
  program.name("vm0-runner").version(version).description("Self-hosted runner for VM0 agents");
9360
9371
  program.addCommand(startCommand);
9361
9372
  program.addCommand(statusCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/runner",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "description": "Self-hosted runner for VM0 agents",
5
5
  "repository": {
6
6
  "type": "git",