@webiny/mcp 6.1.0-beta.2 → 6.1.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.
- package/package.json +3 -3
- package/skills/admin/ui-extensions/SKILL.md +2 -0
- package/skills/api/event-handler-pattern/SKILL.md +4 -0
- package/skills/api/graphql-api/SKILL.md +4 -0
- package/skills/api/use-case-pattern/SKILL.md +4 -0
- package/skills/cli-extensions/SKILL.md +1 -1
- package/skills/content-models/SKILL.md +9 -5
- package/skills/full-stack-architect/SKILL.md +4 -0
- package/skills/infrastructure-extensions/SKILL.md +1 -1
- package/skills/project-structure/SKILL.md +4 -0
- package/skills/webiny-sdk/SKILL.md +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/mcp",
|
|
3
|
-
"version": "6.1.0
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"bin": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/lodash": "4.17.24",
|
|
27
27
|
"@types/ncp": "2.0.8",
|
|
28
|
-
"@webiny/build-tools": "6.1.0
|
|
28
|
+
"@webiny/build-tools": "6.1.0",
|
|
29
29
|
"execa": "5.1.1",
|
|
30
30
|
"tsx": "4.21.0",
|
|
31
31
|
"typescript": "5.9.3"
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"scripts": {
|
|
34
34
|
"prepublishOnly": "bash ./prepublishOnly.sh"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "65e0ac1889b3392c99b8cac6cde508e1e831c715"
|
|
37
37
|
}
|
|
@@ -15,6 +15,8 @@ description: >
|
|
|
15
15
|
|
|
16
16
|
Admin extensions customize the Webiny Admin application. There are three main categories: **white-labeling** (logos, titles, theme colors), **custom data list columns** (adding columns to content entry tables), and **custom page-type forms** (custom form fields for Website Builder page types). All are React components registered via `<Admin.Extension>` in `webiny.config.tsx`.
|
|
17
17
|
|
|
18
|
+
**YOU MUST include the full file path with the `.tsx` extension in every `src` prop.** For example, use `src={"/extensions/MyAdminExtension.tsx"}`, NOT `src={"/extensions/MyAdminExtension"}`. Omitting the file extension will cause a build failure.
|
|
19
|
+
|
|
18
20
|
## White-Labeling
|
|
19
21
|
|
|
20
22
|
### Theme Colors
|
|
@@ -265,6 +265,10 @@ export default EntryAfterDeleteEventHandler.createImplementation({
|
|
|
265
265
|
|
|
266
266
|
## Registration
|
|
267
267
|
|
|
268
|
+
**YOU MUST include the full file path with the `.ts` extension in the `src` prop.** For example, use `src={"@/extensions/my-handler.ts"}`, NOT `src={"@/extensions/my-handler"}`. Omitting the file extension will cause a build failure.
|
|
269
|
+
|
|
270
|
+
**YOU MUST use `export default` for the `createImplementation()` call** when the file is targeted directly by an Extension `src` prop. Using a named export (`export const Foo = SomeFactory.createImplementation(...)`) will cause a build failure. Named exports are only valid inside files registered via `createFeature`.
|
|
271
|
+
|
|
268
272
|
```tsx
|
|
269
273
|
<Api.Extension src={"@/extensions/my-handler.ts"} />
|
|
270
274
|
```
|
|
@@ -16,6 +16,10 @@ description: >
|
|
|
16
16
|
|
|
17
17
|
Add custom GraphQL queries and mutations using `GraphQLSchemaFactory`. Implement `GraphQLSchemaFactory.Interface`, use the schema builder to add type definitions and resolvers (with per-resolver DI), and export with `GraphQLSchemaFactory.createImplementation()`. Register as `<Api.Extension>`.
|
|
18
18
|
|
|
19
|
+
**YOU MUST include the full file path with the `.ts` extension in every `src` prop.** For example, use `src={"/extensions/MySchema.ts"}`, NOT `src={"/extensions/MySchema"}`. Omitting the file extension will cause a build failure.
|
|
20
|
+
|
|
21
|
+
**YOU MUST use `export default` for the `createImplementation()` call** when the file is targeted directly by an Extension `src` prop. Using a named export (`export const Foo = SomeFactory.createImplementation(...)`) will cause a build failure. Named exports are only valid inside files registered via `createFeature`.
|
|
22
|
+
|
|
19
23
|
## The GraphQLSchemaFactory Pattern
|
|
20
24
|
|
|
21
25
|
The `execute` method receives a schema builder and returns it after adding type defs and resolvers.
|
|
@@ -77,6 +77,10 @@ export default SomeUseCase.createImplementation({
|
|
|
77
77
|
|
|
78
78
|
## Registration
|
|
79
79
|
|
|
80
|
+
**YOU MUST include the full file path with the `.ts` extension in the `src` prop.** For example, use `src={"@/extensions/my-extension.ts"}`, NOT `src={"@/extensions/my-extension"}`. Omitting the file extension will cause a build failure.
|
|
81
|
+
|
|
82
|
+
**YOU MUST use `export default` for the `createImplementation()` call** when the file is targeted directly by an Extension `src` prop. Using a named export (`export const Foo = SomeFactory.createImplementation(...)`) will cause a build failure. Named exports are only valid inside files registered via `createFeature`.
|
|
83
|
+
|
|
80
84
|
```tsx
|
|
81
85
|
// In your app's configuration
|
|
82
86
|
<Api.Extension src={"@/extensions/my-extension.ts"} />
|
|
@@ -56,7 +56,7 @@ export default CliCommandFactory.createImplementation({
|
|
|
56
56
|
});
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
-
Register in `webiny.config.tsx
|
|
59
|
+
Register in `webiny.config.tsx` (**YOU MUST include the `.ts` file extension in the `src` prop** — omitting it will cause a build failure):
|
|
60
60
|
|
|
61
61
|
```tsx
|
|
62
62
|
<Cli.Command src={"/extensions/MyCustomCommand.ts"} />
|
|
@@ -43,7 +43,7 @@ class MyModelImpl implements ModelFactory.Interface {
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
export
|
|
46
|
+
export default ModelFactory.createImplementation({
|
|
47
47
|
implementation: MyModelImpl,
|
|
48
48
|
dependencies: []
|
|
49
49
|
});
|
|
@@ -55,6 +55,10 @@ Register in `webiny.config.tsx`:
|
|
|
55
55
|
<Api.Extension src={"/extensions/MyModel.ts"} />
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
+
**YOU MUST include the full file path with the `.ts` extension in the `src` prop.** For example, use `src={"/extensions/MyModel.ts"}`, NOT `src={"/extensions/MyModel"}`. Omitting the file extension will cause a build failure.
|
|
59
|
+
|
|
60
|
+
**YOU MUST use `export default` for the `createImplementation()` call** when the file is targeted directly by an Extension `src` prop. Using a named export (`export const MyModel = ...`) will cause a build failure. Named exports are only valid inside files registered via `createFeature`.
|
|
61
|
+
|
|
58
62
|
## Model Configuration Methods
|
|
59
63
|
|
|
60
64
|
| Method | Purpose |
|
|
@@ -154,7 +158,7 @@ class ProductCategoryModelImpl implements ModelFactory.Interface {
|
|
|
154
158
|
}
|
|
155
159
|
}
|
|
156
160
|
|
|
157
|
-
export
|
|
161
|
+
export default ModelFactory.createImplementation({
|
|
158
162
|
implementation: ProductCategoryModelImpl,
|
|
159
163
|
dependencies: []
|
|
160
164
|
});
|
|
@@ -217,7 +221,7 @@ class ProductModelImpl implements ModelFactory.Interface {
|
|
|
217
221
|
}
|
|
218
222
|
}
|
|
219
223
|
|
|
220
|
-
export
|
|
224
|
+
export default ModelFactory.createImplementation({
|
|
221
225
|
implementation: ProductModelImpl,
|
|
222
226
|
dependencies: []
|
|
223
227
|
});
|
|
@@ -284,7 +288,7 @@ class ContactSubmissionModelImpl implements ModelFactory.Interface {
|
|
|
284
288
|
}
|
|
285
289
|
}
|
|
286
290
|
|
|
287
|
-
export
|
|
291
|
+
export default ModelFactory.createImplementation({
|
|
288
292
|
implementation: ContactSubmissionModelImpl,
|
|
289
293
|
dependencies: []
|
|
290
294
|
});
|
|
@@ -296,7 +300,7 @@ export const ContactSubmissionModel = ModelFactory.createImplementation({
|
|
|
296
300
|
Import: import { ModelFactory } from "webiny/api/cms/model";
|
|
297
301
|
Interface: ModelFactory.Interface
|
|
298
302
|
Builder: ModelFactory.Builder
|
|
299
|
-
Export:
|
|
303
|
+
Export: export default ModelFactory.createImplementation({ implementation, dependencies })
|
|
300
304
|
Register: <Api.Extension src={"/extensions/MyModel.ts"} />
|
|
301
305
|
Deploy: yarn webiny deploy api (or use watch mode)
|
|
302
306
|
```
|
|
@@ -22,6 +22,10 @@ The same rule applies to API extensions — they must go through `<Api.Extension
|
|
|
22
22
|
|
|
23
23
|
These entry-point components are the **only** way to register code that runs inside the Admin app or the API runtime. They use the `src` prop to point to a file that will be loaded in the correct execution environment (browser for Admin, Lambda for API). Bypassing these entry points will fail at runtime because the Admin and API contexts (DI containers, routers, GraphQL registries, etc.) are not available outside their respective runtimes.
|
|
24
24
|
|
|
25
|
+
**YOU MUST include the full file path with the `.ts` or `.tsx` extension in every `src` prop.** For example, use `src={"/extensions/lead/src/index.ts"}`, NOT `src={"/extensions/lead"}`. Omitting the file extension will cause a build failure.
|
|
26
|
+
|
|
27
|
+
**YOU MUST use `export default` for the `createImplementation()` call** when the file is targeted directly by an Extension `src` prop. Using a named export (`export const Foo = SomeFactory.createImplementation(...)`) will cause a build failure. Named exports are only valid inside files registered via `createFeature`.
|
|
28
|
+
|
|
25
29
|
```tsx
|
|
26
30
|
// CORRECT — always use entry-point components
|
|
27
31
|
<Api.Extension src={import.meta.dirname + "/api/Extension.js"} />
|
|
@@ -41,7 +41,7 @@ export default CorePulumi.createImplementation({
|
|
|
41
41
|
});
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
Register:
|
|
44
|
+
Register (**YOU MUST include the `.ts` file extension in the `src` prop** — omitting it will cause a build failure):
|
|
45
45
|
|
|
46
46
|
```tsx
|
|
47
47
|
<Infra.Core.Pulumi src={"/extensions/MyCorePulumiHandler.ts"} />
|
|
@@ -99,6 +99,10 @@ export const Extensions = () => {
|
|
|
99
99
|
| `<Cli.Command src="..." />` | Registers a custom CLI command | `.ts` |
|
|
100
100
|
| `<Security.ApiKey.AfterUpdate src="..." />` | Registers a security lifecycle hook | `.ts` |
|
|
101
101
|
|
|
102
|
+
**YOU MUST include the full file path with the `.ts` or `.tsx` extension in every `src` prop.** For example, use `src={"/extensions/MyModel.ts"}`, NOT `src={"/extensions/MyModel"}`. Omitting the file extension will cause a build failure.
|
|
103
|
+
|
|
104
|
+
**YOU MUST use `export default` for the `createImplementation()` call** when the file is targeted directly by an Extension `src` prop. Using a named export (`export const Foo = SomeFactory.createImplementation(...)`) will cause a build failure. Named exports are only valid inside files registered via `createFeature`.
|
|
105
|
+
|
|
102
106
|
## Infrastructure Components
|
|
103
107
|
|
|
104
108
|
Declarative components for configuring AWS infrastructure:
|
|
@@ -241,7 +241,7 @@ export default ApiKeyFactory.createImplementation({
|
|
|
241
241
|
});
|
|
242
242
|
```
|
|
243
243
|
|
|
244
|
-
Register:
|
|
244
|
+
Register (**YOU MUST include the `.ts` file extension in the `src` prop** — omitting it will cause a build failure):
|
|
245
245
|
|
|
246
246
|
```tsx
|
|
247
247
|
<Api.Extension src={"/extensions/MyApiKey.ts"} />
|