create-zuplo-api 6.53.1 → 6.54.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.
Files changed (31) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/templates/default/config/policies.json +11 -1
  3. package/dist/templates/default/config/routes.oas.json +266 -12
  4. package/dist/templates/default/vscode/settings.json +0 -7
  5. package/package.json +1 -1
  6. package/dist/templates/default/config/dev-portal.json +0 -5
  7. package/dist/templates/default/docs/index.md +0 -43
  8. package/dist/templates/default/docs/sidebar.json +0 -13
  9. package/dist/templates/default/docs/theme.css +0 -29
  10. package/dist/templates/default-zudoku/README-template.md +0 -29
  11. package/dist/templates/default-zudoku/config/policies.json +0 -13
  12. package/dist/templates/default-zudoku/config/routes.oas.json +0 -284
  13. package/dist/templates/default-zudoku/env.example +0 -2
  14. package/dist/templates/default-zudoku/eslintrc.json +0 -7
  15. package/dist/templates/default-zudoku/gitignore +0 -10
  16. package/dist/templates/default-zudoku/modules/hello-world.ts +0 -21
  17. package/dist/templates/default-zudoku/prettierrc.json +0 -1
  18. package/dist/templates/default-zudoku/tsconfig.json +0 -19
  19. package/dist/templates/default-zudoku/vscode/launch.json +0 -37
  20. package/dist/templates/default-zudoku/vscode/settings.json +0 -20
  21. package/dist/templates/default-zudoku/zuplo.jsonc +0 -4
  22. /package/dist/templates/{default-zudoku → default}/docs/README-template.md +0 -0
  23. /package/dist/templates/{default-zudoku → default}/docs/gitignore +0 -0
  24. /package/dist/templates/{default-zudoku → default}/docs/pages/banner-dark.svg +0 -0
  25. /package/dist/templates/{default-zudoku → default}/docs/pages/banner.svg +0 -0
  26. /package/dist/templates/{default-zudoku → default}/docs/pages/introduction.mdx +0 -0
  27. /package/dist/templates/{default-zudoku → default}/docs/pages/markdown.mdx +0 -0
  28. /package/dist/templates/{default-zudoku → default}/docs/public/logodark.svg +0 -0
  29. /package/dist/templates/{default-zudoku → default}/docs/public/logolight.svg +0 -0
  30. /package/dist/templates/{default-zudoku → default}/docs/tsconfig.json +0 -0
  31. /package/dist/templates/{default-zudoku → default}/docs/zudoku.config.tsx +0 -0
@@ -1,284 +0,0 @@
1
- {
2
- "openapi": "3.1.0",
3
- "info": {
4
- "version": "1.0.0",
5
- "title": "My Zuplo API"
6
- },
7
- "paths": {
8
- "/todos": {
9
- "get": {
10
- "summary": "Get all todos",
11
- "description": "**Retrieves a complete list of all todo items** from the system. This endpoint returns all todos regardless of their completion status or owner, making it useful for displaying comprehensive todo lists or performing bulk operations.",
12
- "responses": {
13
- "200": {
14
- "description": "A list of todos",
15
- "content": {
16
- "application/json": {
17
- "schema": {
18
- "type": "array",
19
- "items": {
20
- "$ref": "#/components/schemas/Todo"
21
- }
22
- },
23
- "examples": {
24
- "mixed_todos": {
25
- "summary": "A list of todos with different completion states",
26
- "value": [
27
- {
28
- "id": 1,
29
- "title": "Buy groceries",
30
- "completed": false,
31
- "userId": 123
32
- },
33
- {
34
- "id": 2,
35
- "title": "Write documentation",
36
- "completed": true,
37
- "userId": 456
38
- },
39
- {
40
- "id": 3,
41
- "title": "Review pull requests",
42
- "completed": false,
43
- "userId": 123
44
- }
45
- ]
46
- }
47
- }
48
- }
49
- }
50
- }
51
- },
52
- "operationId": "1e0edd2a-8d53-4355-805f-54b7e5555725",
53
- "x-zuplo-route": {
54
- "corsPolicy": "none",
55
- "handler": {
56
- "export": "urlForwardHandler",
57
- "module": "$import(@zuplo/runtime)",
58
- "options": {
59
- "baseUrl": "https://todo-mock-main-b63f096.zuplo.app"
60
- }
61
- }
62
- },
63
- "tags": ["Todo"]
64
- },
65
- "post": {
66
- "summary": "Create a new todo",
67
- "description": "**Creates a new todo item** with the provided details. The todo will be assigned a unique ID automatically and can include a title, completion status, and user association. This is the primary endpoint for adding new tasks to the system.",
68
- "requestBody": {
69
- "required": true,
70
- "content": {
71
- "application/json": {
72
- "schema": {
73
- "$ref": "#/components/schemas/CreateTodo"
74
- }
75
- }
76
- }
77
- },
78
- "responses": {
79
- "201": {
80
- "description": "Todo created successfully",
81
- "content": {
82
- "application/json": {
83
- "schema": {
84
- "$ref": "#/components/schemas/Todo"
85
- },
86
- "examples": {
87
- "new_todo": {
88
- "summary": "A newly created todo",
89
- "value": {
90
- "id": 4,
91
- "title": "Deploy application",
92
- "completed": false,
93
- "userId": 789
94
- }
95
- }
96
- }
97
- }
98
- }
99
- },
100
- "400": {
101
- "description": "Invalid request body"
102
- }
103
- },
104
- "operationId": "55ee860b-fe7e-4d66-a228-bb5320c3305d",
105
- "x-zuplo-route": {
106
- "corsPolicy": "none",
107
- "handler": {
108
- "export": "urlForwardHandler",
109
- "module": "$import(@zuplo/runtime)",
110
- "options": {
111
- "baseUrl": "https://todo-mock-main-b63f096.zuplo.app"
112
- }
113
- }
114
- },
115
- "tags": ["Todo"]
116
- }
117
- },
118
- "/todos/{id}": {
119
- "put": {
120
- "summary": "Update a todo",
121
- "description": "**Updates an existing todo item** by its unique identifier. You can modify any combination of the todo's properties including title, completion status, and user assignment. All changes are applied atomically to ensure data consistency.",
122
- "parameters": [
123
- {
124
- "name": "id",
125
- "in": "path",
126
- "required": true,
127
- "schema": {
128
- "type": "integer"
129
- },
130
- "description": "The todo ID"
131
- }
132
- ],
133
- "requestBody": {
134
- "required": true,
135
- "content": {
136
- "application/json": {
137
- "schema": {
138
- "$ref": "#/components/schemas/UpdateTodo"
139
- }
140
- }
141
- }
142
- },
143
- "responses": {
144
- "200": {
145
- "description": "Todo updated successfully",
146
- "content": {
147
- "application/json": {
148
- "schema": {
149
- "$ref": "#/components/schemas/Todo"
150
- },
151
- "examples": {
152
- "updated_todo": {
153
- "summary": "A todo that has been updated",
154
- "value": {
155
- "id": 1,
156
- "title": "Buy groceries and cook dinner",
157
- "completed": true,
158
- "userId": 123
159
- }
160
- }
161
- }
162
- }
163
- }
164
- },
165
- "400": {
166
- "description": "Invalid request body"
167
- },
168
- "404": {
169
- "description": "Todo not found"
170
- }
171
- },
172
- "operationId": "4569a607-338e-4d66-80f7-17f911778b1d",
173
- "x-zuplo-route": {
174
- "corsPolicy": "none",
175
- "handler": {
176
- "export": "urlForwardHandler",
177
- "module": "$import(@zuplo/runtime)",
178
- "options": {
179
- "baseUrl": "https://todo-mock-main-b63f096.zuplo.app"
180
- }
181
- }
182
- },
183
- "tags": ["Todo"]
184
- },
185
- "delete": {
186
- "summary": "Delete a todo",
187
- "description": "**Permanently removes a todo item** from the system using its unique identifier. This operation cannot be undone, so use with caution. The endpoint will return a 404 error if the specified todo does not exist.",
188
- "parameters": [
189
- {
190
- "name": "id",
191
- "in": "path",
192
- "required": true,
193
- "schema": {
194
- "type": "integer"
195
- },
196
- "description": "The todo ID"
197
- }
198
- ],
199
- "responses": {
200
- "204": {
201
- "description": "Todo deleted successfully"
202
- },
203
- "404": {
204
- "description": "Todo not found"
205
- }
206
- },
207
- "operationId": "888a8d15-aa30-45fe-8957-b07a8bcdd7ca",
208
- "x-zuplo-route": {
209
- "corsPolicy": "none",
210
- "handler": {
211
- "export": "urlForwardHandler",
212
- "module": "$import(@zuplo/runtime)",
213
- "options": {
214
- "baseUrl": "https://todo-mock-main-b63f096.zuplo.app"
215
- }
216
- }
217
- },
218
- "tags": ["Todo"]
219
- }
220
- }
221
- },
222
- "components": {
223
- "schemas": {
224
- "Todo": {
225
- "type": "object",
226
- "properties": {
227
- "id": {
228
- "type": "integer",
229
- "description": "The todo ID"
230
- },
231
- "title": {
232
- "type": "string",
233
- "description": "The todo title"
234
- },
235
- "completed": {
236
- "type": "boolean",
237
- "description": "Whether the todo is completed"
238
- },
239
- "userId": {
240
- "type": "integer",
241
- "description": "The user ID who owns the todo"
242
- }
243
- },
244
- "required": ["id", "title", "completed", "userId"]
245
- },
246
- "CreateTodo": {
247
- "type": "object",
248
- "properties": {
249
- "title": {
250
- "type": "string",
251
- "description": "The todo title"
252
- },
253
- "completed": {
254
- "type": "boolean",
255
- "description": "Whether the todo is completed",
256
- "default": false
257
- },
258
- "userId": {
259
- "type": "integer",
260
- "description": "The user ID who owns the todo"
261
- }
262
- },
263
- "required": ["title", "userId"]
264
- },
265
- "UpdateTodo": {
266
- "type": "object",
267
- "properties": {
268
- "title": {
269
- "type": "string",
270
- "description": "The todo title"
271
- },
272
- "completed": {
273
- "type": "boolean",
274
- "description": "Whether the todo is completed"
275
- },
276
- "userId": {
277
- "type": "integer",
278
- "description": "The user ID who owns the todo"
279
- }
280
- }
281
- }
282
- }
283
- }
284
- }
@@ -1,2 +0,0 @@
1
- EXAMPLE_SECRET=👀 What you looking at?
2
- EXAMPLE_CONFIG=https://twitter.com/zuplo
@@ -1,7 +0,0 @@
1
- {
2
- "root": true,
3
- "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
4
- "parser": "@typescript-eslint/parser",
5
- "parserOptions": { "project": ["./tsconfig.json"] },
6
- "plugins": ["@typescript-eslint"]
7
- }
@@ -1,10 +0,0 @@
1
- .zuplo/
2
- .cache/
3
- dist/
4
- node_modules/
5
- .env
6
- .env.zuplo
7
-
8
- # OS Stuff
9
-
10
- .DS_Store
@@ -1,21 +0,0 @@
1
- import { ZuploContext, ZuploRequest } from "@zuplo/runtime";
2
-
3
- export default async function (request: ZuploRequest, context: ZuploContext) {
4
- /**
5
- * Use the log property on context to enjoy
6
- * logging magic when testing your API.
7
- */
8
- context.log.info(`Hi, from inside your zup!`);
9
-
10
- /**
11
- * If you want to proxy an API, you can simply
12
- * return the content of a fetch. Try it by
13
- * uncommenting the line below.
14
- */
15
- // return fetch('http://www.example.com/');
16
-
17
- /**
18
- * In this example, we're just going to return some content.
19
- */
20
- return "What zup?";
21
- }
@@ -1,19 +0,0 @@
1
- {
2
- "include": ["modules/**/*", ".zuplo/**/*", "tests/**/*"],
3
- "exclude": ["./node_modules", "./dist"],
4
- "compilerOptions": {
5
- "module": "ESNext",
6
- "target": "ES2022",
7
- "lib": ["ESNext", "WebWorker", "Webworker.Iterable"],
8
- "preserveConstEnums": true,
9
- "moduleResolution": "Bundler",
10
- "useUnknownInCatchVariables": false,
11
- "forceConsistentCasingInFileNames": true,
12
- "importHelpers": true,
13
- "removeComments": true,
14
- "esModuleInterop": true,
15
- "noEmit": true,
16
- "strictNullChecks": true,
17
- "experimentalDecorators": true
18
- }
19
- }
@@ -1,37 +0,0 @@
1
- {
2
- // Use IntelliSense to learn about possible attributes.
3
- // Hover to view descriptions of existing attributes.
4
- // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
- "version": "0.2.0",
6
- "configurations": [
7
- {
8
- "type": "node",
9
- "request": "launch",
10
- "name": "Launch Zuplo",
11
- "runtimeExecutable": "npx",
12
- "runtimeArgs": [
13
- "@zuplo/cli",
14
- "dev",
15
- "--debug-port",
16
- "9229",
17
- "--port",
18
- "9000"
19
- ],
20
- "console": "integratedTerminal",
21
- "internalConsoleOptions": "neverOpen"
22
- },
23
- {
24
- "name": "Zuplo Gateway",
25
- "type": "node",
26
- "request": "attach",
27
- "restart": true,
28
- "port": 9229
29
- }
30
- ],
31
- "compounds": [
32
- {
33
- "name": "Launch & Attach Zuplo",
34
- "configurations": ["Launch Zuplo", "Zuplo Gateway"]
35
- }
36
- ]
37
- }
@@ -1,20 +0,0 @@
1
- {
2
- "json.schemas": [
3
- {
4
- "fileMatch": ["config/*.oas.json"],
5
- "url": "https://cdn.zuplo.com/schemas/openapi-v3.1-zuplo.json"
6
- },
7
- {
8
- "fileMatch": ["config/policies.json"],
9
- "url": "https://cdn.zuplo.com/schemas/policies.json"
10
- },
11
- {
12
- "fileMatch": ["config/dev-portal.json"],
13
- "url": "https://cdn.zuplo.com/schemas/dev-portal.json"
14
- },
15
- {
16
- "fileMatch": ["docs/sidebar.json"],
17
- "url": "https://cdn.zuplo.com/schemas/sidebar.json"
18
- }
19
- ]
20
- }
@@ -1,4 +0,0 @@
1
- {
2
- "version": 1,
3
- "compatibilityDate": "2025-02-06"
4
- }