@rip-lang/api 1.0.3 → 1.1.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.
- package/README.md +1 -1
- package/api.rip +3 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ and is designed for APIs that are clear, concise, and correct.
|
|
|
25
25
|
| `api.rip` | ~590 | Core framework: routing, validation, `read()`, `session`, server |
|
|
26
26
|
| `middleware.rip` | ~465 | Built-in middleware: cors, logger, sessions, compression, security |
|
|
27
27
|
|
|
28
|
-
> **See Also**: For Rip language documentation, see the [main rip-lang repository](https://github.com/shreeve/rip-lang) and [docs/
|
|
28
|
+
> **See Also**: For Rip language documentation, see the [main rip-lang repository](https://github.com/shreeve/rip-lang) and [docs/RIP-LANG.md](https://github.com/shreeve/rip-lang/blob/main/docs/RIP-LANG.md).
|
|
29
29
|
|
|
30
30
|
## Try it Now
|
|
31
31
|
|
package/api.rip
CHANGED
|
@@ -236,7 +236,7 @@ export prefix = (base, fn) ->
|
|
|
236
236
|
old = _prefix
|
|
237
237
|
_prefix = "#{_prefix}#{base}"
|
|
238
238
|
try
|
|
239
|
-
fn
|
|
239
|
+
fn?.()
|
|
240
240
|
finally
|
|
241
241
|
_prefix = old
|
|
242
242
|
|
|
@@ -283,7 +283,7 @@ export fetch = (req) ->
|
|
|
283
283
|
c = createContext(req, match.params)
|
|
284
284
|
|
|
285
285
|
# Run raw filter before body parsing (e.g., fix content-type)
|
|
286
|
-
_rawFilter
|
|
286
|
+
_rawFilter?.(req) if method in ['POST', 'PUT', 'PATCH']
|
|
287
287
|
|
|
288
288
|
# Pre-parse body and query for sync read() — baked in, zero ceremony
|
|
289
289
|
data = {}
|
|
@@ -342,7 +342,7 @@ export start = (opts = {}) ->
|
|
|
342
342
|
|
|
343
343
|
export App = (fn) ->
|
|
344
344
|
resetGlobals()
|
|
345
|
-
fn
|
|
345
|
+
fn?.()
|
|
346
346
|
startHandler()
|
|
347
347
|
|
|
348
348
|
# ==============================================================================
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rip-lang/api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Pure Rip API framework — elegant, fast, zero dependencies",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "api.rip",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"author": "Steve Shreeve <steve.shreeve@gmail.com>",
|
|
34
34
|
"license": "MIT",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"rip-lang": "^
|
|
36
|
+
"rip-lang": "^3.0.0"
|
|
37
37
|
},
|
|
38
38
|
"files": [
|
|
39
39
|
"api.rip",
|