@interfere/types 10.1.1 → 10.1.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.
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let zod=require("zod");const releaseBuildResultSchema=zod.z.enum([`ok`,`api_key_wrong_prefix`,`api_key_unreadable`,`api_key_rejected`,`api_key_scope_mismatch`,`pipeline_failed`,`no_source_maps`,`client_maps_unmapped`]).meta({id:`ReleaseBuildResult`,title:`ReleaseBuildResult`}),releaseBuildFaultSchema=zod.z.enum([`interfere`,`customer`]).meta({id:`ReleaseBuildFault`,title:`ReleaseBuildFault`}),CUSTOMER_FAULT_RESULTS=new Set([`api_key_wrong_prefix`,`api_key_unreadable`,`api_key_rejected`,`api_key_scope_mismatch`,`no_source_maps`,`client_maps_unmapped`]);function faultForBuildResult(result){return CUSTOMER_FAULT_RESULTS.has(result)?`customer`:`interfere`}const releaseBuildStepSchema=zod.z.enum([`discover`,`create`,`upload`,`preflight`,`cleanup`,`total`]).meta({id:`ReleaseBuildStep`,title:`ReleaseBuildStep`});exports.faultForBuildResult=faultForBuildResult,exports.releaseBuildFaultSchema=releaseBuildFaultSchema,exports.releaseBuildResultSchema=releaseBuildResultSchema,exports.releaseBuildStepSchema=releaseBuildStepSchema;
@@ -0,0 +1,48 @@
1
+ import { z } from "zod";
2
+ //#region src/releases/build-telemetry.d.ts
3
+ /**
4
+ * Outcome of one release-pipeline run, as reported by an SDK build
5
+ * plugin. Mirrors `ReleaseDiagnosticCode` from `../sdk/build-diagnostics`
6
+ * (lowercased), plus the two outcomes that are not diagnostics: `ok`, and
7
+ * the early returns for a build that produced no maps.
8
+ */
9
+ declare const releaseBuildResultSchema: z.ZodEnum<{
10
+ api_key_rejected: "api_key_rejected";
11
+ api_key_scope_mismatch: "api_key_scope_mismatch";
12
+ api_key_unreadable: "api_key_unreadable";
13
+ api_key_wrong_prefix: "api_key_wrong_prefix";
14
+ client_maps_unmapped: "client_maps_unmapped";
15
+ no_source_maps: "no_source_maps";
16
+ ok: "ok";
17
+ pipeline_failed: "pipeline_failed";
18
+ }>;
19
+ type ReleaseBuildResult = z.infer<typeof releaseBuildResultSchema>;
20
+ /**
21
+ * Who has to fix it. Derived server-side from the reported result rather
22
+ * than sent by the SDK, so an SDK bug can never relabel our own error
23
+ * budget. `pipeline_failed` is the catch-all and counts as ours until
24
+ * proven otherwise.
25
+ */
26
+ declare const releaseBuildFaultSchema: z.ZodEnum<{
27
+ customer: "customer";
28
+ interfere: "interfere";
29
+ }>;
30
+ type ReleaseBuildFault = z.infer<typeof releaseBuildFaultSchema>;
31
+ declare function faultForBuildResult(result: ReleaseBuildResult): ReleaseBuildFault;
32
+ /**
33
+ * Steps of the build pipeline, in order. `upload` covers `/sign`, the
34
+ * direct-to-R2 PUTs and `/complete` as one span — the collector never
35
+ * sees those PUTs, so it cannot break them down further. `total` is the
36
+ * whole plugin, reported alongside the parts.
37
+ */
38
+ declare const releaseBuildStepSchema: z.ZodEnum<{
39
+ cleanup: "cleanup";
40
+ create: "create";
41
+ discover: "discover";
42
+ preflight: "preflight";
43
+ total: "total";
44
+ upload: "upload";
45
+ }>;
46
+ type ReleaseBuildStep = z.infer<typeof releaseBuildStepSchema>;
47
+ //#endregion
48
+ export { ReleaseBuildFault, ReleaseBuildResult, ReleaseBuildStep, faultForBuildResult, releaseBuildFaultSchema, releaseBuildResultSchema, releaseBuildStepSchema };
@@ -0,0 +1,48 @@
1
+ import { z } from "zod";
2
+ //#region src/releases/build-telemetry.d.ts
3
+ /**
4
+ * Outcome of one release-pipeline run, as reported by an SDK build
5
+ * plugin. Mirrors `ReleaseDiagnosticCode` from `../sdk/build-diagnostics`
6
+ * (lowercased), plus the two outcomes that are not diagnostics: `ok`, and
7
+ * the early returns for a build that produced no maps.
8
+ */
9
+ declare const releaseBuildResultSchema: z.ZodEnum<{
10
+ api_key_rejected: "api_key_rejected";
11
+ api_key_scope_mismatch: "api_key_scope_mismatch";
12
+ api_key_unreadable: "api_key_unreadable";
13
+ api_key_wrong_prefix: "api_key_wrong_prefix";
14
+ client_maps_unmapped: "client_maps_unmapped";
15
+ no_source_maps: "no_source_maps";
16
+ ok: "ok";
17
+ pipeline_failed: "pipeline_failed";
18
+ }>;
19
+ type ReleaseBuildResult = z.infer<typeof releaseBuildResultSchema>;
20
+ /**
21
+ * Who has to fix it. Derived server-side from the reported result rather
22
+ * than sent by the SDK, so an SDK bug can never relabel our own error
23
+ * budget. `pipeline_failed` is the catch-all and counts as ours until
24
+ * proven otherwise.
25
+ */
26
+ declare const releaseBuildFaultSchema: z.ZodEnum<{
27
+ customer: "customer";
28
+ interfere: "interfere";
29
+ }>;
30
+ type ReleaseBuildFault = z.infer<typeof releaseBuildFaultSchema>;
31
+ declare function faultForBuildResult(result: ReleaseBuildResult): ReleaseBuildFault;
32
+ /**
33
+ * Steps of the build pipeline, in order. `upload` covers `/sign`, the
34
+ * direct-to-R2 PUTs and `/complete` as one span — the collector never
35
+ * sees those PUTs, so it cannot break them down further. `total` is the
36
+ * whole plugin, reported alongside the parts.
37
+ */
38
+ declare const releaseBuildStepSchema: z.ZodEnum<{
39
+ cleanup: "cleanup";
40
+ create: "create";
41
+ discover: "discover";
42
+ preflight: "preflight";
43
+ total: "total";
44
+ upload: "upload";
45
+ }>;
46
+ type ReleaseBuildStep = z.infer<typeof releaseBuildStepSchema>;
47
+ //#endregion
48
+ export { ReleaseBuildFault, ReleaseBuildResult, ReleaseBuildStep, faultForBuildResult, releaseBuildFaultSchema, releaseBuildResultSchema, releaseBuildStepSchema };
@@ -0,0 +1 @@
1
+ import{z}from"zod";const releaseBuildResultSchema=z.enum([`ok`,`api_key_wrong_prefix`,`api_key_unreadable`,`api_key_rejected`,`api_key_scope_mismatch`,`pipeline_failed`,`no_source_maps`,`client_maps_unmapped`]).meta({id:`ReleaseBuildResult`,title:`ReleaseBuildResult`}),releaseBuildFaultSchema=z.enum([`interfere`,`customer`]).meta({id:`ReleaseBuildFault`,title:`ReleaseBuildFault`}),CUSTOMER_FAULT_RESULTS=new Set([`api_key_wrong_prefix`,`api_key_unreadable`,`api_key_rejected`,`api_key_scope_mismatch`,`no_source_maps`,`client_maps_unmapped`]);function faultForBuildResult(result){return CUSTOMER_FAULT_RESULTS.has(result)?`customer`:`interfere`}const releaseBuildStepSchema=z.enum([`discover`,`create`,`upload`,`preflight`,`cleanup`,`total`]).meta({id:`ReleaseBuildStep`,title:`ReleaseBuildStep`});export{faultForBuildResult,releaseBuildFaultSchema,releaseBuildResultSchema,releaseBuildStepSchema};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@interfere/types",
3
- "version": "10.1.1",
3
+ "version": "10.1.2",
4
4
  "license": "MIT",
5
5
  "description": "TypeScript & Zod types for Interfere",
6
6
  "keywords": [
@@ -152,8 +152,8 @@
152
152
  "zod": "^4.4.3"
153
153
  },
154
154
  "devDependencies": {
155
- "@interfere/sdk": "^11.1.1",
156
- "@interfere/test-utils": "^9.1.1",
155
+ "@interfere/sdk": "^11.2.1",
156
+ "@interfere/test-utils": "^9.1.2",
157
157
  "@interfere/typescript-config": "^9.0.2",
158
158
  "@types/node": "^26.2.0",
159
159
  "@vitest/coverage-v8": "4.1.10",