@contractspec/lib.contracts-library 1.56.1 → 1.58.0

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.
@@ -1,13 +1,32 @@
1
- $ bun build:types && bun build:bundle
2
- $ tsc --noEmit
3
- $ tsdown
4
- ℹ tsdown v0.19.0 powered by rolldown v1.0.0-beta.59
5
- ℹ entry: src/index.ts
6
- ℹ tsconfig: tsconfig.json
7
- ℹ Build start
8
- ℹ dist/index.mjs 4.64 kB │ gzip: 1.15 kB
9
- ℹ dist/index.mjs.map 6.96 kB │ gzip: 1.45 kB
10
- ℹ dist/index.d.mts.map 0.26 kB │ gzip: 0.18 kB
11
- ℹ dist/index.d.mts 0.57 kB │ gzip: 0.22 kB
12
- ℹ 4 files, total: 12.43 kB
13
- ✔ Build complete in 21644ms
1
+ $ contractspec-bun-build prebuild
2
+ $ bun run prebuild && bun run build:bundle && bun run build:types
3
+ $ contractspec-bun-build prebuild
4
+ $ contractspec-bun-build transpile
5
+ [contractspec-bun-build] transpile target=bun root=src entries=5
6
+ Bundled 5 modules in 5ms
7
+
8
+ ./index.js 5.0 KB (entry point)
9
+ templates/index.js 5.0 KB (entry point)
10
+ templates/messaging.js 1.88 KB (entry point)
11
+ templates/recipes.js 1.43 KB (entry point)
12
+ templates/todos.js 1.69 KB (entry point)
13
+
14
+ [contractspec-bun-build] transpile target=node root=src entries=5
15
+ Bundled 5 modules in 13ms
16
+
17
+ ./index.js 5.0 KB (entry point)
18
+ templates/index.js 5.0 KB (entry point)
19
+ templates/messaging.js 1.87 KB (entry point)
20
+ templates/recipes.js 1.43 KB (entry point)
21
+ templates/todos.js 1.68 KB (entry point)
22
+
23
+ [contractspec-bun-build] transpile target=browser root=src entries=5
24
+ Bundled 5 modules in 16ms
25
+
26
+ ./index.js 5.0 KB (entry point)
27
+ templates/index.js 5.0 KB (entry point)
28
+ templates/messaging.js 1.87 KB (entry point)
29
+ templates/recipes.js 1.43 KB (entry point)
30
+ templates/todos.js 1.68 KB (entry point)
31
+
32
+ $ contractspec-bun-build types
@@ -0,0 +1 @@
1
+ $ contractspec-bun-build prebuild
package/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # @contractspec/lib.contracts-library
2
2
 
3
+ ## 1.58.0
4
+
5
+ ### Minor Changes
6
+
7
+ - d1f0fd0: chore: Migrate non-app package builds from tsdown to shared Bun tooling, add `@contractspec/tool.bun`, and standardize `prebuild`/`build`/`typecheck` with platform-aware exports and `tsc` declaration emission into `dist`.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [d1f0fd0]
12
+ - Updated dependencies [4355a9e]
13
+ - @contractspec/lib.contracts@1.58.0
14
+ - @contractspec/lib.schema@1.58.0
15
+
16
+ ## 1.57.0
17
+
18
+ ### Minor Changes
19
+
20
+ - 11a5a05: feat: improve product intent
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies [8ecf3c1]
25
+ - Updated dependencies [47c48c2]
26
+ - Updated dependencies [a119963]
27
+ - Updated dependencies [4651e06]
28
+ - Updated dependencies [ad9d10a]
29
+ - Updated dependencies [11a5a05]
30
+ - @contractspec/lib.contracts@1.57.0
31
+ - @contractspec/lib.schema@1.57.0
32
+
3
33
  ## 1.56.1
4
34
 
5
35
  ### Patch Changes
@@ -0,0 +1,160 @@
1
+ // src/templates/recipes.ts
2
+ import { defineCapability, StabilityEnum } from "@contractspec/lib.contracts";
3
+ var OWNERS = ["platform.contractspec-studio"];
4
+ var RecipeCapability = defineCapability({
5
+ meta: {
6
+ key: "template.recipes.browse",
7
+ version: "1.0.0",
8
+ kind: "api",
9
+ title: "Template Recipe Browser",
10
+ description: "Internationalized recipe browsing, search, and detail operations for template applications.",
11
+ domain: "templates",
12
+ owners: [...OWNERS],
13
+ tags: ["templates", "recipes", "i18n", "content"],
14
+ stability: StabilityEnum.Stable
15
+ },
16
+ provides: [
17
+ {
18
+ surface: "operation",
19
+ key: "template.recipe.list",
20
+ version: "1.0.0",
21
+ description: "List recipes with category, difficulty, and locale filters."
22
+ },
23
+ {
24
+ surface: "operation",
25
+ key: "template.recipe.get",
26
+ version: "1.0.0",
27
+ description: "Fetch a recipe detail view including localized content."
28
+ },
29
+ {
30
+ surface: "operation",
31
+ key: "template.recipe.search",
32
+ version: "1.0.0",
33
+ description: "Search recipes by ingredient, tag, or free text with i18n support."
34
+ },
35
+ {
36
+ surface: "operation",
37
+ key: "template.recipe.favorite",
38
+ version: "1.0.0",
39
+ description: "Toggle recipe favorites for showcasing personalization patterns."
40
+ }
41
+ ],
42
+ requires: [{ key: "studio.project", version: "1.0.0" }]
43
+ });
44
+
45
+ // src/templates/todos.ts
46
+ import { defineCapability as defineCapability2, StabilityEnum as StabilityEnum2 } from "@contractspec/lib.contracts";
47
+ var OWNERS2 = ["platform.contractspec-studio"];
48
+ var TaskCrudCapability = defineCapability2({
49
+ meta: {
50
+ key: "template.todos.crud",
51
+ version: "1.0.0",
52
+ kind: "api",
53
+ title: "Template Tasks CRUD",
54
+ description: "Create, read, update, delete, and toggle template tasks with categories and priorities.",
55
+ domain: "templates",
56
+ owners: [...OWNERS2],
57
+ tags: ["templates", "todos", "productivity"],
58
+ stability: StabilityEnum2.Stable
59
+ },
60
+ provides: [
61
+ {
62
+ surface: "operation",
63
+ key: "template.task.create",
64
+ version: "1.0.0",
65
+ description: "Create a new task for a Studio project template."
66
+ },
67
+ {
68
+ surface: "operation",
69
+ key: "template.task.update",
70
+ version: "1.0.0",
71
+ description: "Update task metadata such as title, due date, or category."
72
+ },
73
+ {
74
+ surface: "operation",
75
+ key: "template.task.delete",
76
+ version: "1.0.0",
77
+ description: "Delete or archive a task from a template project."
78
+ },
79
+ {
80
+ surface: "operation",
81
+ key: "template.task.toggle",
82
+ version: "1.0.0",
83
+ description: "Mark a task as completed or active."
84
+ },
85
+ {
86
+ surface: "operation",
87
+ key: "template.task.list",
88
+ version: "1.0.0",
89
+ description: "List tasks with filtering, search, and sorting."
90
+ },
91
+ {
92
+ surface: "operation",
93
+ key: "template.task.category",
94
+ version: "1.0.0",
95
+ description: "Manage categories and tags for tasks."
96
+ }
97
+ ],
98
+ requires: [{ key: "studio.project", version: "1.0.0" }]
99
+ });
100
+
101
+ // src/templates/messaging.ts
102
+ import { defineCapability as defineCapability3, StabilityEnum as StabilityEnum3 } from "@contractspec/lib.contracts";
103
+ var OWNERS3 = ["platform.contractspec-studio"];
104
+ var MessagingCapability = defineCapability3({
105
+ meta: {
106
+ key: "template.messaging.core",
107
+ version: "1.0.0",
108
+ kind: "api",
109
+ title: "Template Messaging Core",
110
+ description: "Real-time messaging primitives for template applications, including conversations, participants, and delivery events.",
111
+ domain: "templates",
112
+ owners: [...OWNERS3],
113
+ tags: ["templates", "messaging", "realtime"],
114
+ stability: StabilityEnum3.Experimental
115
+ },
116
+ provides: [
117
+ {
118
+ surface: "operation",
119
+ key: "template.messaging.conversation.create",
120
+ version: "1.0.0",
121
+ description: "Create a direct or group conversation scoped to a Studio project."
122
+ },
123
+ {
124
+ surface: "operation",
125
+ key: "template.messaging.conversation.list",
126
+ version: "1.0.0",
127
+ description: "List conversations with pagination, unread counts, and filters."
128
+ },
129
+ {
130
+ surface: "operation",
131
+ key: "template.messaging.message.send",
132
+ version: "1.0.0",
133
+ description: "Send a message with attachments and optimistic delivery state."
134
+ },
135
+ {
136
+ surface: "operation",
137
+ key: "template.messaging.message.read",
138
+ version: "1.0.0",
139
+ description: "Mark messages as read and update participant cursors."
140
+ },
141
+ {
142
+ surface: "event",
143
+ key: "template.messaging.message.received",
144
+ version: "1.0.0",
145
+ description: "Emitted when a participant receives a new message."
146
+ },
147
+ {
148
+ surface: "event",
149
+ key: "template.messaging.typing",
150
+ version: "1.0.0",
151
+ description: "Emitted when a participant is typing in a conversation."
152
+ }
153
+ ],
154
+ requires: [{ key: "studio.project", version: "1.0.0" }]
155
+ });
156
+ export {
157
+ TaskCrudCapability,
158
+ RecipeCapability,
159
+ MessagingCapability
160
+ };
@@ -0,0 +1,160 @@
1
+ // src/templates/recipes.ts
2
+ import { defineCapability, StabilityEnum } from "@contractspec/lib.contracts";
3
+ var OWNERS = ["platform.contractspec-studio"];
4
+ var RecipeCapability = defineCapability({
5
+ meta: {
6
+ key: "template.recipes.browse",
7
+ version: "1.0.0",
8
+ kind: "api",
9
+ title: "Template Recipe Browser",
10
+ description: "Internationalized recipe browsing, search, and detail operations for template applications.",
11
+ domain: "templates",
12
+ owners: [...OWNERS],
13
+ tags: ["templates", "recipes", "i18n", "content"],
14
+ stability: StabilityEnum.Stable
15
+ },
16
+ provides: [
17
+ {
18
+ surface: "operation",
19
+ key: "template.recipe.list",
20
+ version: "1.0.0",
21
+ description: "List recipes with category, difficulty, and locale filters."
22
+ },
23
+ {
24
+ surface: "operation",
25
+ key: "template.recipe.get",
26
+ version: "1.0.0",
27
+ description: "Fetch a recipe detail view including localized content."
28
+ },
29
+ {
30
+ surface: "operation",
31
+ key: "template.recipe.search",
32
+ version: "1.0.0",
33
+ description: "Search recipes by ingredient, tag, or free text with i18n support."
34
+ },
35
+ {
36
+ surface: "operation",
37
+ key: "template.recipe.favorite",
38
+ version: "1.0.0",
39
+ description: "Toggle recipe favorites for showcasing personalization patterns."
40
+ }
41
+ ],
42
+ requires: [{ key: "studio.project", version: "1.0.0" }]
43
+ });
44
+
45
+ // src/templates/todos.ts
46
+ import { defineCapability as defineCapability2, StabilityEnum as StabilityEnum2 } from "@contractspec/lib.contracts";
47
+ var OWNERS2 = ["platform.contractspec-studio"];
48
+ var TaskCrudCapability = defineCapability2({
49
+ meta: {
50
+ key: "template.todos.crud",
51
+ version: "1.0.0",
52
+ kind: "api",
53
+ title: "Template Tasks CRUD",
54
+ description: "Create, read, update, delete, and toggle template tasks with categories and priorities.",
55
+ domain: "templates",
56
+ owners: [...OWNERS2],
57
+ tags: ["templates", "todos", "productivity"],
58
+ stability: StabilityEnum2.Stable
59
+ },
60
+ provides: [
61
+ {
62
+ surface: "operation",
63
+ key: "template.task.create",
64
+ version: "1.0.0",
65
+ description: "Create a new task for a Studio project template."
66
+ },
67
+ {
68
+ surface: "operation",
69
+ key: "template.task.update",
70
+ version: "1.0.0",
71
+ description: "Update task metadata such as title, due date, or category."
72
+ },
73
+ {
74
+ surface: "operation",
75
+ key: "template.task.delete",
76
+ version: "1.0.0",
77
+ description: "Delete or archive a task from a template project."
78
+ },
79
+ {
80
+ surface: "operation",
81
+ key: "template.task.toggle",
82
+ version: "1.0.0",
83
+ description: "Mark a task as completed or active."
84
+ },
85
+ {
86
+ surface: "operation",
87
+ key: "template.task.list",
88
+ version: "1.0.0",
89
+ description: "List tasks with filtering, search, and sorting."
90
+ },
91
+ {
92
+ surface: "operation",
93
+ key: "template.task.category",
94
+ version: "1.0.0",
95
+ description: "Manage categories and tags for tasks."
96
+ }
97
+ ],
98
+ requires: [{ key: "studio.project", version: "1.0.0" }]
99
+ });
100
+
101
+ // src/templates/messaging.ts
102
+ import { defineCapability as defineCapability3, StabilityEnum as StabilityEnum3 } from "@contractspec/lib.contracts";
103
+ var OWNERS3 = ["platform.contractspec-studio"];
104
+ var MessagingCapability = defineCapability3({
105
+ meta: {
106
+ key: "template.messaging.core",
107
+ version: "1.0.0",
108
+ kind: "api",
109
+ title: "Template Messaging Core",
110
+ description: "Real-time messaging primitives for template applications, including conversations, participants, and delivery events.",
111
+ domain: "templates",
112
+ owners: [...OWNERS3],
113
+ tags: ["templates", "messaging", "realtime"],
114
+ stability: StabilityEnum3.Experimental
115
+ },
116
+ provides: [
117
+ {
118
+ surface: "operation",
119
+ key: "template.messaging.conversation.create",
120
+ version: "1.0.0",
121
+ description: "Create a direct or group conversation scoped to a Studio project."
122
+ },
123
+ {
124
+ surface: "operation",
125
+ key: "template.messaging.conversation.list",
126
+ version: "1.0.0",
127
+ description: "List conversations with pagination, unread counts, and filters."
128
+ },
129
+ {
130
+ surface: "operation",
131
+ key: "template.messaging.message.send",
132
+ version: "1.0.0",
133
+ description: "Send a message with attachments and optimistic delivery state."
134
+ },
135
+ {
136
+ surface: "operation",
137
+ key: "template.messaging.message.read",
138
+ version: "1.0.0",
139
+ description: "Mark messages as read and update participant cursors."
140
+ },
141
+ {
142
+ surface: "event",
143
+ key: "template.messaging.message.received",
144
+ version: "1.0.0",
145
+ description: "Emitted when a participant receives a new message."
146
+ },
147
+ {
148
+ surface: "event",
149
+ key: "template.messaging.typing",
150
+ version: "1.0.0",
151
+ description: "Emitted when a participant is typing in a conversation."
152
+ }
153
+ ],
154
+ requires: [{ key: "studio.project", version: "1.0.0" }]
155
+ });
156
+ export {
157
+ TaskCrudCapability,
158
+ RecipeCapability,
159
+ MessagingCapability
160
+ };
@@ -0,0 +1,58 @@
1
+ // src/templates/messaging.ts
2
+ import { defineCapability, StabilityEnum } from "@contractspec/lib.contracts";
3
+ var OWNERS = ["platform.contractspec-studio"];
4
+ var MessagingCapability = defineCapability({
5
+ meta: {
6
+ key: "template.messaging.core",
7
+ version: "1.0.0",
8
+ kind: "api",
9
+ title: "Template Messaging Core",
10
+ description: "Real-time messaging primitives for template applications, including conversations, participants, and delivery events.",
11
+ domain: "templates",
12
+ owners: [...OWNERS],
13
+ tags: ["templates", "messaging", "realtime"],
14
+ stability: StabilityEnum.Experimental
15
+ },
16
+ provides: [
17
+ {
18
+ surface: "operation",
19
+ key: "template.messaging.conversation.create",
20
+ version: "1.0.0",
21
+ description: "Create a direct or group conversation scoped to a Studio project."
22
+ },
23
+ {
24
+ surface: "operation",
25
+ key: "template.messaging.conversation.list",
26
+ version: "1.0.0",
27
+ description: "List conversations with pagination, unread counts, and filters."
28
+ },
29
+ {
30
+ surface: "operation",
31
+ key: "template.messaging.message.send",
32
+ version: "1.0.0",
33
+ description: "Send a message with attachments and optimistic delivery state."
34
+ },
35
+ {
36
+ surface: "operation",
37
+ key: "template.messaging.message.read",
38
+ version: "1.0.0",
39
+ description: "Mark messages as read and update participant cursors."
40
+ },
41
+ {
42
+ surface: "event",
43
+ key: "template.messaging.message.received",
44
+ version: "1.0.0",
45
+ description: "Emitted when a participant receives a new message."
46
+ },
47
+ {
48
+ surface: "event",
49
+ key: "template.messaging.typing",
50
+ version: "1.0.0",
51
+ description: "Emitted when a participant is typing in a conversation."
52
+ }
53
+ ],
54
+ requires: [{ key: "studio.project", version: "1.0.0" }]
55
+ });
56
+ export {
57
+ MessagingCapability
58
+ };
@@ -0,0 +1,46 @@
1
+ // src/templates/recipes.ts
2
+ import { defineCapability, StabilityEnum } from "@contractspec/lib.contracts";
3
+ var OWNERS = ["platform.contractspec-studio"];
4
+ var RecipeCapability = defineCapability({
5
+ meta: {
6
+ key: "template.recipes.browse",
7
+ version: "1.0.0",
8
+ kind: "api",
9
+ title: "Template Recipe Browser",
10
+ description: "Internationalized recipe browsing, search, and detail operations for template applications.",
11
+ domain: "templates",
12
+ owners: [...OWNERS],
13
+ tags: ["templates", "recipes", "i18n", "content"],
14
+ stability: StabilityEnum.Stable
15
+ },
16
+ provides: [
17
+ {
18
+ surface: "operation",
19
+ key: "template.recipe.list",
20
+ version: "1.0.0",
21
+ description: "List recipes with category, difficulty, and locale filters."
22
+ },
23
+ {
24
+ surface: "operation",
25
+ key: "template.recipe.get",
26
+ version: "1.0.0",
27
+ description: "Fetch a recipe detail view including localized content."
28
+ },
29
+ {
30
+ surface: "operation",
31
+ key: "template.recipe.search",
32
+ version: "1.0.0",
33
+ description: "Search recipes by ingredient, tag, or free text with i18n support."
34
+ },
35
+ {
36
+ surface: "operation",
37
+ key: "template.recipe.favorite",
38
+ version: "1.0.0",
39
+ description: "Toggle recipe favorites for showcasing personalization patterns."
40
+ }
41
+ ],
42
+ requires: [{ key: "studio.project", version: "1.0.0" }]
43
+ });
44
+ export {
45
+ RecipeCapability
46
+ };
@@ -0,0 +1,58 @@
1
+ // src/templates/todos.ts
2
+ import { defineCapability, StabilityEnum } from "@contractspec/lib.contracts";
3
+ var OWNERS = ["platform.contractspec-studio"];
4
+ var TaskCrudCapability = defineCapability({
5
+ meta: {
6
+ key: "template.todos.crud",
7
+ version: "1.0.0",
8
+ kind: "api",
9
+ title: "Template Tasks CRUD",
10
+ description: "Create, read, update, delete, and toggle template tasks with categories and priorities.",
11
+ domain: "templates",
12
+ owners: [...OWNERS],
13
+ tags: ["templates", "todos", "productivity"],
14
+ stability: StabilityEnum.Stable
15
+ },
16
+ provides: [
17
+ {
18
+ surface: "operation",
19
+ key: "template.task.create",
20
+ version: "1.0.0",
21
+ description: "Create a new task for a Studio project template."
22
+ },
23
+ {
24
+ surface: "operation",
25
+ key: "template.task.update",
26
+ version: "1.0.0",
27
+ description: "Update task metadata such as title, due date, or category."
28
+ },
29
+ {
30
+ surface: "operation",
31
+ key: "template.task.delete",
32
+ version: "1.0.0",
33
+ description: "Delete or archive a task from a template project."
34
+ },
35
+ {
36
+ surface: "operation",
37
+ key: "template.task.toggle",
38
+ version: "1.0.0",
39
+ description: "Mark a task as completed or active."
40
+ },
41
+ {
42
+ surface: "operation",
43
+ key: "template.task.list",
44
+ version: "1.0.0",
45
+ description: "List tasks with filtering, search, and sorting."
46
+ },
47
+ {
48
+ surface: "operation",
49
+ key: "template.task.category",
50
+ version: "1.0.0",
51
+ description: "Manage categories and tags for tasks."
52
+ }
53
+ ],
54
+ requires: [{ key: "studio.project", version: "1.0.0" }]
55
+ });
56
+ export {
57
+ TaskCrudCapability
58
+ };
@@ -0,0 +1,2 @@
1
+ export * from './templates';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}