@webstir-io/module-contract 0.1.13 → 0.1.15

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
@@ -9,18 +9,10 @@ TypeScript interfaces, helper utilities, and JSON schema describing Webstir modu
9
9
 
10
10
  ## Install
11
11
 
12
- ```ini
13
- # .npmrc
14
- @webstir-io:registry=https://npm.pkg.github.com
15
- //npm.pkg.github.com/:_authToken=${GH_PACKAGES_TOKEN}
16
- ```
17
-
18
12
  ```bash
19
13
  npm install @webstir-io/module-contract
20
14
  ```
21
15
 
22
- Consumers only need `read:packages`; publishers also require `write:packages`.
23
-
24
16
  ## Provided Types
25
17
 
26
18
  ```ts
@@ -204,16 +196,16 @@ When authoring a provider:
204
196
  ## Maintainer Workflow
205
197
 
206
198
  ```bash
207
- npm install
208
- npm run clean # remove dist/schema artifacts
209
- npm run build # compiles TypeScript, regenerates schema/*.schema.json
210
- npm run test # type-checks the Accounts example module
211
- # Release helper (bumps version, pushes tags to trigger release workflow)
212
- npm run release -- patch
199
+ bun install
200
+ bun run clean # remove dist/schema artifacts
201
+ bun run build # compiles TypeScript, regenerates schema/*.schema.json
202
+ bun run test # type-checks the Accounts example module
203
+ # Release helper (bumps version and pushes a package-scoped release tag)
204
+ bun run release -- patch
213
205
  ```
214
206
 
215
207
  - The `schema/` folder contains `*-definition.schema.json` files derived from the exported Zod schemas. Commit them with contract changes.
216
- - Ensure CI runs `npm ci`, `npm run clean`, `npm run build`, `npm run test`, and `npm run smoke` before publish.
208
+ - Ensure CI runs `bun install --frozen-lockfile`, `bun run clean`, `bun run build`, and `bun run test` before publish.
217
209
 
218
210
  ## License
219
211
 
package/dist/index.d.ts CHANGED
@@ -772,13 +772,16 @@ export interface ViewSpec<TContext extends SSRContext = SSRContext, TParams exte
772
772
  export declare const jobDefinitionSchema: z.ZodObject<{
773
773
  name: z.ZodString;
774
774
  schedule: z.ZodOptional<z.ZodString>;
775
+ description: z.ZodOptional<z.ZodString>;
775
776
  priority: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
776
777
  }, "strip", z.ZodTypeAny, {
777
778
  name: string;
779
+ description?: string | undefined;
778
780
  schedule?: string | undefined;
779
781
  priority?: string | number | undefined;
780
782
  }, {
781
783
  name: string;
784
+ description?: string | undefined;
782
785
  schedule?: string | undefined;
783
786
  priority?: string | number | undefined;
784
787
  }>;
@@ -1216,13 +1219,16 @@ export declare const moduleManifestSchema: z.ZodObject<{
1216
1219
  jobs: z.ZodOptional<z.ZodArray<z.ZodObject<{
1217
1220
  name: z.ZodString;
1218
1221
  schedule: z.ZodOptional<z.ZodString>;
1222
+ description: z.ZodOptional<z.ZodString>;
1219
1223
  priority: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
1220
1224
  }, "strip", z.ZodTypeAny, {
1221
1225
  name: string;
1226
+ description?: string | undefined;
1222
1227
  schedule?: string | undefined;
1223
1228
  priority?: string | number | undefined;
1224
1229
  }, {
1225
1230
  name: string;
1231
+ description?: string | undefined;
1226
1232
  schedule?: string | undefined;
1227
1233
  priority?: string | number | undefined;
1228
1234
  }>, "many">>;
@@ -1358,6 +1364,7 @@ export declare const moduleManifestSchema: z.ZodObject<{
1358
1364
  }[] | undefined;
1359
1365
  jobs?: {
1360
1366
  name: string;
1367
+ description?: string | undefined;
1361
1368
  schedule?: string | undefined;
1362
1369
  priority?: string | number | undefined;
1363
1370
  }[] | undefined;
@@ -1463,6 +1470,7 @@ export declare const moduleManifestSchema: z.ZodObject<{
1463
1470
  }[] | undefined;
1464
1471
  jobs?: {
1465
1472
  name: string;
1473
+ description?: string | undefined;
1466
1474
  schedule?: string | undefined;
1467
1475
  priority?: string | number | undefined;
1468
1476
  }[] | undefined;
package/dist/index.js CHANGED
@@ -69,6 +69,7 @@ export const viewDefinitionSchema = z.object({
69
69
  export const jobDefinitionSchema = z.object({
70
70
  name: z.string().min(1),
71
71
  schedule: z.string().optional(),
72
+ description: z.string().optional(),
72
73
  priority: z.union([z.number().int(), z.string()]).optional()
73
74
  });
74
75
  export const eventDefinitionSchema = z.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webstir-io/module-contract",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "description": "Public contract definitions for Webstir frontend and backend module providers.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -24,14 +24,13 @@
24
24
  ],
25
25
  "scripts": {
26
26
  "clean": "rm -rf dist schema",
27
- "build": "npm run build:types && npm run build:schema",
27
+ "build": "tsc -p tsconfig.json && node scripts/build-schema.mjs",
28
28
  "build:types": "tsc -p tsconfig.json",
29
29
  "build:schema": "node scripts/build-schema.mjs",
30
- "test": "npm run test:examples",
30
+ "test": "tsc -p tsconfig.json && node scripts/build-schema.mjs && tsc -p tsconfig.examples.json",
31
31
  "test:examples": "tsc -p tsconfig.examples.json",
32
32
  "smoke": "node -e \"console.log('[smoke] no smoke tests configured');\"",
33
- "release": "bash scripts/publish.sh",
34
- "prepare": "npm run build"
33
+ "release": "bash scripts/publish.sh"
35
34
  },
36
35
  "keywords": [
37
36
  "webstir",
@@ -41,24 +40,21 @@
41
40
  "license": "MIT",
42
41
  "repository": {
43
42
  "type": "git",
44
- "url": "https://github.com/webstir-io/module-contract"
43
+ "url": "git+https://github.com/webstir-io/webstir.git",
44
+ "directory": "packages/contracts/module-contract"
45
+ },
46
+ "homepage": "https://github.com/webstir-io/webstir/tree/main/packages/contracts/module-contract#readme",
47
+ "bugs": {
48
+ "url": "https://github.com/webstir-io/webstir/issues"
45
49
  },
46
50
  "author": "Webstir",
47
51
  "dependencies": {
52
+ "@ts-rest/core": "^3.40.0",
48
53
  "zod": "^3.23.8"
49
54
  },
50
55
  "devDependencies": {
51
56
  "@types/node": "^20.19.21",
52
- "@ts-rest/core": "^3.40.0",
53
57
  "typescript": "^5.7.2",
54
58
  "zod-to-json-schema": "^3.23.3"
55
- },
56
- "peerDependencies": {
57
- "@ts-rest/core": "^3.40.0"
58
- },
59
- "peerDependenciesMeta": {
60
- "@ts-rest/core": {
61
- "optional": true
62
- }
63
59
  }
64
60
  }
@@ -279,6 +279,9 @@
279
279
  "schedule": {
280
280
  "type": "string"
281
281
  },
282
+ "description": {
283
+ "type": "string"
284
+ },
282
285
  "priority": {
283
286
  "anyOf": [
284
287
  {