@hedystia/swagger 1.9.10 → 1.10.1

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 (3) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +15 -3
  3. package/readme.md +11 -4
package/dist/index.js CHANGED
@@ -542,4 +542,4 @@
542
542
  handleResize();
543
543
  </script>
544
544
  </body>
545
- </html>`}};function G(n={}){let e=new w(n),r=new B.Hedystia().get("/",()=>new Response(e.generateHTML(),{headers:{"Content-Type":"text/html"}})).get("/json",()=>Response.json(e.getSpec()));function t(i){for(let s of i.routes)e.addRoute(s.method,s.path,{params:s.schema.params,query:s.schema.query,body:s.schema.body,response:s.schema.response},s.schema.description||`${s.method} ${s.path}`,s.schema.description,s.schema.tags);for(let s of i.staticRoutes)e.addRoute("GET",s.path,{},`Static route ${s.path}`);for(let[s]of i.wsRoutes)e.addRoute("WS",s,{},`WebSocket route ${s}`);for(let[s,p]of i.subscriptionHandlers)e.addRoute("SUB",s,{params:p.schema.params,query:p.schema.query,headers:p.schema.headers},p.schema.description||`SUB ${s}`,p.schema.description,p.schema.tags);return r}return{plugin:t,swagger:e}}0&&(module.exports={swagger});
545
+ </html>`}};function G(n={}){let e=new w(n),r=new B.Hedystia().get("/",()=>new Response(e.generateHTML(),{headers:{"Content-Type":"text/html"}})).get("/json",()=>e.getSpec());function t(i){for(let s of i.routes)e.addRoute(s.method,s.path,{params:s.schema.params,query:s.schema.query,body:s.schema.body,response:s.schema.response},s.schema.description||`${s.method} ${s.path}`,s.schema.description,s.schema.tags);for(let s of i.staticRoutes)e.addRoute("GET",s.path,{},`Static route ${s.path}`);for(let[s]of i.wsRoutes)e.addRoute("WS",s,{},`WebSocket route ${s}`);for(let[s,p]of i.subscriptionHandlers)e.addRoute("SUB",s,{params:p.schema.params,query:p.schema.query,headers:p.schema.headers},p.schema.description||`SUB ${s}`,p.schema.description,p.schema.tags);return r}return{plugin:t,swagger:e}}0&&(module.exports={swagger});
package/package.json CHANGED
@@ -1,19 +1,20 @@
1
1
  {
2
2
  "name": "@hedystia/swagger",
3
- "version": "1.9.10",
3
+ "version": "1.10.1",
4
+ "description": "Next-gen TypeScript framework for building type-safe APIs at lightspeed",
4
5
  "devDependencies": {
5
6
  "@types/bun": "^1.3.3",
6
7
  "tsup": "^8.3.5"
7
8
  },
8
9
  "dependencies": {
9
10
  "@apidevtools/swagger-parser": "^10.1.1",
10
- "hedystia": "^1.9.10",
11
+ "hedystia": "^1.10.1",
11
12
  "openapi-types": "^12.1.3"
12
13
  },
13
14
  "peerDependencies": {
14
15
  "@apidevtools/swagger-parser": "^10.1.1",
15
16
  "typescript": ">= 5.0.0",
16
- "hedystia": ">= 1.9.0",
17
+ "hedystia": ">= 1.10.0",
17
18
  "openapi-types": ">= 12.0.0"
18
19
  },
19
20
  "peerDependenciesMeta": {
@@ -31,6 +32,17 @@
31
32
  }
32
33
  },
33
34
  "private": false,
35
+ "keywords": [
36
+ "hedystia",
37
+ "framework",
38
+ "typescript",
39
+ "api",
40
+ "type-safe",
41
+ "bun",
42
+ "server",
43
+ "backend",
44
+ "web"
45
+ ],
34
46
  "license": "MIT",
35
47
  "scripts": {
36
48
  "build": "tsup",
package/readme.md CHANGED
@@ -8,6 +8,7 @@
8
8
  </p>
9
9
 
10
10
  <p>
11
+ <a href="https://docs.hedystia.com"><img src="https://img.shields.io/badge/Docs-blue?style=flat-square" alt="Documentation"></a>
11
12
  <a href="https://www.npmjs.com/package/hedystia"><img src="https://img.shields.io/npm/v/hedystia.svg?style=flat-square" alt="npm version"></a>
12
13
  <a href="https://www.npmjs.com/package/hedystia"><img src="https://img.shields.io/npm/dm/hedystia.svg?style=flat-square" alt="npm downloads"></a>
13
14
  <a href="LICENSE"><img src="https://img.shields.io/github/license/Hedystia/Framework.svg?style=flat-square" alt="license"></a>
@@ -141,10 +142,11 @@ app.listen(3000);
141
142
  ## 💼 Production Ready
142
143
  ```typescript
143
144
  // Error handling
144
- .onError((err) => {
145
- return Response.json({
145
+ .onError((err, ctx) => {
146
+ ctx.set.status(500);
147
+ return {
146
148
  error: err.message
147
- }, { status: 500 })
149
+ };
148
150
  })
149
151
 
150
152
  // Rate limiting macro
@@ -158,7 +160,12 @@ app.listen(3000);
158
160
  ```
159
161
 
160
162
  ## 📜 License
161
- MIT License © 2025 Hedystia
163
+ MIT License © 2026 Hedystia
164
+
165
+ ## 📖 Documentation
166
+ - [Full Documentation](https://docs.hedystia.com)
167
+ - [Getting Started Guide](https://docs.hedystia.com/framework/getting-started)
168
+ - [API Reference](https://docs.hedystia.com/framework/overview)
162
169
 
163
170
  ## 🗣️ Community
164
171
  - [GitHub Issues](https://github.com/Hedystia/Framework/issues)