@frozencrow/create-api 0.6.2 → 0.7.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.
@@ -130,6 +130,10 @@ import type { Application } from '@frozencrow/api-core'
130
130
 
131
131
  import { ${n.Pascal}Service, getOptions } from './${n.file}.class'
132
132
  import {
133
+ ${n.camel}Schema,
134
+ ${n.camel}QuerySchema,
135
+ ${n.camel}DataSchema,
136
+ ${n.camel}PatchSchema,
133
137
  ${n.camel}DataValidator,
134
138
  ${n.camel}PatchValidator,
135
139
  ${n.camel}QueryValidator,
@@ -164,6 +168,12 @@ const schema = {
164
168
  export const ${n.camel} = (app: Application) => {
165
169
  app.use(${n.camel}Path, new ${n.Pascal}Service(getOptions(app)), {
166
170
  methods: [...${n.camel}Methods],
171
+ mcpSchemas: {
172
+ id: ${n.camel}Schema.properties._id,
173
+ query: ${n.camel}QuerySchema,
174
+ data: ${n.camel}DataSchema,
175
+ patch: ${n.camel}PatchSchema
176
+ },
167
177
  events: []
168
178
  })
169
179
  app.service(${n.camel}Path).hooks(generateDefaultHooks({ schema }))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frozencrow/create-api",
3
- "version": "0.6.2",
3
+ "version": "0.7.0",
4
4
  "description": "Scaffold a new API project powered by @frozencrow/api-core",
5
5
  "license": "MIT",
6
6
  "author": "Eric Uldall",
@@ -12,6 +12,12 @@
12
12
  "authentication": {
13
13
  "secret": "AUTH_SECRET"
14
14
  },
15
+ "authRateLimit": {
16
+ "trustProxy": {
17
+ "__name": "TRUST_PROXY",
18
+ "__format": "boolean"
19
+ }
20
+ },
15
21
  "socketio": {
16
22
  "maxHttpBufferSize": {
17
23
  "__name": "SOCKETIO_MAX_HTTP_BUFFER_SIZE",
@@ -19,7 +19,7 @@
19
19
  "config": "3.3.12"
20
20
  },
21
21
  "dependencies": {
22
- "@frozencrow/api-core": "^0.6.2",
22
+ "@frozencrow/api-core": "^0.7.0",
23
23
  "@feathersjs/configuration": "^5.0.37",
24
24
  "@feathersjs/feathers": "^5.0.37",
25
25
  "@feathersjs/mongodb": "^5.0.37",
@@ -3,6 +3,10 @@ import type { Application } from '@frozencrow/api-core'
3
3
 
4
4
  import { WidgetService, getOptions } from './widgets.class'
5
5
  import {
6
+ widgetSchema,
7
+ widgetQuerySchema,
8
+ widgetDataSchema,
9
+ widgetPatchSchema,
6
10
  widgetDataValidator,
7
11
  widgetPatchValidator,
8
12
  widgetQueryValidator,
@@ -34,6 +38,12 @@ declare module '@frozencrow/api-core/lib/declarations' {
34
38
  export const widgets = (app: Application) => {
35
39
  app.use(widgetPath, new WidgetService(getOptions(app)), {
36
40
  methods: [...widgetMethods],
41
+ mcpSchemas: {
42
+ id: widgetSchema.properties._id,
43
+ query: widgetQuerySchema,
44
+ data: widgetDataSchema,
45
+ patch: widgetPatchSchema
46
+ },
37
47
  events: []
38
48
  })
39
49