@robinpath/http 0.1.0 → 0.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 +97 -97
- package/package.json +16 -4
- package/dist/http.d.ts +0 -191
- package/dist/http.d.ts.map +0 -1
- package/dist/http.js +0 -474
- package/dist/http.js.map +0 -1
- package/dist/index.d.ts +0 -6
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -12
- package/dist/index.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
# @robinpath/http
|
|
2
|
-
|
|
3
|
-
> HTTP server for RobinPath scripts. Register routes with static responses (JSON, HTML, files), enable CORS, serve static directories. No callbacks needed.
|
|
4
|
-
|
|
5
|
-
   
|
|
6
|
-
|
|
7
|
-
## Why use this module?
|
|
8
|
-
|
|
9
|
-
The `http` module lets you:
|
|
10
|
-
|
|
11
|
-
- Create a new HTTP server instance (does not start listening yet)
|
|
12
|
-
- Register a GET route that returns static JSON data
|
|
13
|
-
- Register a POST route that returns static JSON data
|
|
14
|
-
- Register a PUT route that returns static JSON data
|
|
15
|
-
- Register a DELETE route that returns static JSON data
|
|
16
|
-
|
|
17
|
-
All functions are callable directly from RobinPath scripts with a simple, consistent API.
|
|
18
|
-
|
|
19
|
-
## Installation
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
npm install @robinpath/http
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Quick Start
|
|
26
|
-
|
|
27
|
-
No credentials needed — start using it right away:
|
|
28
|
-
|
|
29
|
-
```robinpath
|
|
30
|
-
any "myapi" "/api/products" [{"id": 1}]
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## Available Functions
|
|
34
|
-
|
|
35
|
-
| Function | Description |
|
|
36
|
-
|----------|-------------|
|
|
37
|
-
| `http.createServer` | Create a new HTTP server instance (does not start listening yet) |
|
|
38
|
-
| `http.get` | Register a GET route that returns static JSON data |
|
|
39
|
-
| `http.post` | Register a POST route that returns static JSON data |
|
|
40
|
-
| `http.put` | Register a PUT route that returns static JSON data |
|
|
41
|
-
| `http.delete` | Register a DELETE route that returns static JSON data |
|
|
42
|
-
| `http.html` | Register a GET route that serves an HTML string |
|
|
43
|
-
| `http.file` | Register a GET route that serves a file from disk |
|
|
44
|
-
| `http.redirect` | Register a route that redirects to another URL |
|
|
45
|
-
| `http.static` | Register a directory to serve static files from |
|
|
46
|
-
| `http.cors` | Enable CORS on the server |
|
|
47
|
-
| `http.listen` | Start the HTTP server listening for requests |
|
|
48
|
-
| `http.stop` | Stop the HTTP server gracefully |
|
|
49
|
-
| `http.status` | Get server status: port, routes, listening state, request count |
|
|
50
|
-
| `http.logs` | Get the request log for a server |
|
|
51
|
-
|
|
52
|
-
## Examples
|
|
53
|
-
|
|
54
|
-
### Register a GET route that returns static JSON data
|
|
55
|
-
|
|
56
|
-
```robinpath
|
|
57
|
-
any "myapi" "/api/products" [{"id": 1}]
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
### Register a POST route that returns static JSON data
|
|
61
|
-
|
|
62
|
-
```robinpath
|
|
63
|
-
any "myapi" "/api/products" {"created": true}
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### Register a PUT route that returns static JSON data
|
|
67
|
-
|
|
68
|
-
```robinpath
|
|
69
|
-
any "myapi" "/api/products/:id" {"updated": true}
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
## Integration with RobinPath
|
|
73
|
-
|
|
74
|
-
```typescript
|
|
75
|
-
import { RobinPath } from "@wiredwp/robinpath";
|
|
76
|
-
import Module from "@robinpath/http";
|
|
77
|
-
|
|
78
|
-
const rp = new RobinPath();
|
|
79
|
-
rp.registerModule(Module.name, Module.functions);
|
|
80
|
-
rp.registerModuleMeta(Module.name, Module.functionMetadata);
|
|
81
|
-
|
|
82
|
-
const result = await rp.executeScript(`
|
|
83
|
-
any "myapi" "/api/products" [{"id": 1}]
|
|
84
|
-
`);
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
## Full API Reference
|
|
88
|
-
|
|
89
|
-
See [MODULE.md](./MODULE.md) for complete documentation including all parameters, return types, error handling, and advanced examples.
|
|
90
|
-
|
|
91
|
-
## Related Modules
|
|
92
|
-
|
|
93
|
-
- [`@robinpath/json`](../json) — JSON module for complementary functionality
|
|
94
|
-
|
|
95
|
-
## License
|
|
96
|
-
|
|
97
|
-
MIT
|
|
1
|
+
# @robinpath/http
|
|
2
|
+
|
|
3
|
+
> HTTP server for RobinPath scripts. Register routes with static responses (JSON, HTML, files), enable CORS, serve static directories. No callbacks needed.
|
|
4
|
+
|
|
5
|
+
   
|
|
6
|
+
|
|
7
|
+
## Why use this module?
|
|
8
|
+
|
|
9
|
+
The `http` module lets you:
|
|
10
|
+
|
|
11
|
+
- Create a new HTTP server instance (does not start listening yet)
|
|
12
|
+
- Register a GET route that returns static JSON data
|
|
13
|
+
- Register a POST route that returns static JSON data
|
|
14
|
+
- Register a PUT route that returns static JSON data
|
|
15
|
+
- Register a DELETE route that returns static JSON data
|
|
16
|
+
|
|
17
|
+
All functions are callable directly from RobinPath scripts with a simple, consistent API.
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install @robinpath/http
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Quick Start
|
|
26
|
+
|
|
27
|
+
No credentials needed — start using it right away:
|
|
28
|
+
|
|
29
|
+
```robinpath
|
|
30
|
+
any "myapi" "/api/products" [{"id": 1}]
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Available Functions
|
|
34
|
+
|
|
35
|
+
| Function | Description |
|
|
36
|
+
|----------|-------------|
|
|
37
|
+
| `http.createServer` | Create a new HTTP server instance (does not start listening yet) |
|
|
38
|
+
| `http.get` | Register a GET route that returns static JSON data |
|
|
39
|
+
| `http.post` | Register a POST route that returns static JSON data |
|
|
40
|
+
| `http.put` | Register a PUT route that returns static JSON data |
|
|
41
|
+
| `http.delete` | Register a DELETE route that returns static JSON data |
|
|
42
|
+
| `http.html` | Register a GET route that serves an HTML string |
|
|
43
|
+
| `http.file` | Register a GET route that serves a file from disk |
|
|
44
|
+
| `http.redirect` | Register a route that redirects to another URL |
|
|
45
|
+
| `http.static` | Register a directory to serve static files from |
|
|
46
|
+
| `http.cors` | Enable CORS on the server |
|
|
47
|
+
| `http.listen` | Start the HTTP server listening for requests |
|
|
48
|
+
| `http.stop` | Stop the HTTP server gracefully |
|
|
49
|
+
| `http.status` | Get server status: port, routes, listening state, request count |
|
|
50
|
+
| `http.logs` | Get the request log for a server |
|
|
51
|
+
|
|
52
|
+
## Examples
|
|
53
|
+
|
|
54
|
+
### Register a GET route that returns static JSON data
|
|
55
|
+
|
|
56
|
+
```robinpath
|
|
57
|
+
any "myapi" "/api/products" [{"id": 1}]
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Register a POST route that returns static JSON data
|
|
61
|
+
|
|
62
|
+
```robinpath
|
|
63
|
+
any "myapi" "/api/products" {"created": true}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Register a PUT route that returns static JSON data
|
|
67
|
+
|
|
68
|
+
```robinpath
|
|
69
|
+
any "myapi" "/api/products/:id" {"updated": true}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Integration with RobinPath
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
import { RobinPath } from "@wiredwp/robinpath";
|
|
76
|
+
import Module from "@robinpath/http";
|
|
77
|
+
|
|
78
|
+
const rp = new RobinPath();
|
|
79
|
+
rp.registerModule(Module.name, Module.functions);
|
|
80
|
+
rp.registerModuleMeta(Module.name, Module.functionMetadata);
|
|
81
|
+
|
|
82
|
+
const result = await rp.executeScript(`
|
|
83
|
+
any "myapi" "/api/products" [{"id": 1}]
|
|
84
|
+
`);
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Full API Reference
|
|
88
|
+
|
|
89
|
+
See [MODULE.md](./MODULE.md) for complete documentation including all parameters, return types, error handling, and advanced examples.
|
|
90
|
+
|
|
91
|
+
## Related Modules
|
|
92
|
+
|
|
93
|
+
- [`@robinpath/json`](../json) — JSON module for complementary functionality
|
|
94
|
+
|
|
95
|
+
## License
|
|
96
|
+
|
|
97
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robinpath/http",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -20,10 +20,22 @@
|
|
|
20
20
|
"build": "tsc"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@
|
|
23
|
+
"@robinpath/core": ">=0.20.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@
|
|
26
|
+
"@robinpath/core": "^0.30.1",
|
|
27
27
|
"typescript": "^5.6.0"
|
|
28
|
+
},
|
|
29
|
+
"description": "HTTP server for RobinPath scripts. Register routes with static responses (JSON, HTML, files), enable CORS, serve static directories. No callbacks needed.",
|
|
30
|
+
"keywords": [
|
|
31
|
+
"http",
|
|
32
|
+
"web"
|
|
33
|
+
],
|
|
34
|
+
"license": "MIT",
|
|
35
|
+
"robinpath": {
|
|
36
|
+
"category": "web",
|
|
37
|
+
"type": "utility",
|
|
38
|
+
"auth": "none",
|
|
39
|
+
"functionCount": 14
|
|
28
40
|
}
|
|
29
|
-
}
|
|
41
|
+
}
|
package/dist/http.d.ts
DELETED
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
import type { BuiltinHandler } from "@wiredwp/robinpath";
|
|
2
|
-
export declare const HttpFunctions: Record<string, BuiltinHandler>;
|
|
3
|
-
export declare const HttpFunctionMetadata: {
|
|
4
|
-
createServer: {
|
|
5
|
-
description: string;
|
|
6
|
-
parameters: {
|
|
7
|
-
name: string;
|
|
8
|
-
dataType: string;
|
|
9
|
-
description: string;
|
|
10
|
-
formInputType: string;
|
|
11
|
-
required: boolean;
|
|
12
|
-
}[];
|
|
13
|
-
returnType: string;
|
|
14
|
-
returnDescription: string;
|
|
15
|
-
example: string;
|
|
16
|
-
};
|
|
17
|
-
get: {
|
|
18
|
-
description: string;
|
|
19
|
-
parameters: {
|
|
20
|
-
name: string;
|
|
21
|
-
dataType: string;
|
|
22
|
-
description: string;
|
|
23
|
-
formInputType: string;
|
|
24
|
-
required: boolean;
|
|
25
|
-
}[];
|
|
26
|
-
returnType: string;
|
|
27
|
-
returnDescription: string;
|
|
28
|
-
example: string;
|
|
29
|
-
};
|
|
30
|
-
post: {
|
|
31
|
-
description: string;
|
|
32
|
-
parameters: {
|
|
33
|
-
name: string;
|
|
34
|
-
dataType: string;
|
|
35
|
-
description: string;
|
|
36
|
-
formInputType: string;
|
|
37
|
-
required: boolean;
|
|
38
|
-
}[];
|
|
39
|
-
returnType: string;
|
|
40
|
-
returnDescription: string;
|
|
41
|
-
example: string;
|
|
42
|
-
};
|
|
43
|
-
put: {
|
|
44
|
-
description: string;
|
|
45
|
-
parameters: {
|
|
46
|
-
name: string;
|
|
47
|
-
dataType: string;
|
|
48
|
-
description: string;
|
|
49
|
-
formInputType: string;
|
|
50
|
-
required: boolean;
|
|
51
|
-
}[];
|
|
52
|
-
returnType: string;
|
|
53
|
-
returnDescription: string;
|
|
54
|
-
example: string;
|
|
55
|
-
};
|
|
56
|
-
delete: {
|
|
57
|
-
description: string;
|
|
58
|
-
parameters: {
|
|
59
|
-
name: string;
|
|
60
|
-
dataType: string;
|
|
61
|
-
description: string;
|
|
62
|
-
formInputType: string;
|
|
63
|
-
required: boolean;
|
|
64
|
-
}[];
|
|
65
|
-
returnType: string;
|
|
66
|
-
returnDescription: string;
|
|
67
|
-
example: string;
|
|
68
|
-
};
|
|
69
|
-
html: {
|
|
70
|
-
description: string;
|
|
71
|
-
parameters: {
|
|
72
|
-
name: string;
|
|
73
|
-
dataType: string;
|
|
74
|
-
description: string;
|
|
75
|
-
formInputType: string;
|
|
76
|
-
required: boolean;
|
|
77
|
-
}[];
|
|
78
|
-
returnType: string;
|
|
79
|
-
returnDescription: string;
|
|
80
|
-
example: string;
|
|
81
|
-
};
|
|
82
|
-
file: {
|
|
83
|
-
description: string;
|
|
84
|
-
parameters: {
|
|
85
|
-
name: string;
|
|
86
|
-
dataType: string;
|
|
87
|
-
description: string;
|
|
88
|
-
formInputType: string;
|
|
89
|
-
required: boolean;
|
|
90
|
-
}[];
|
|
91
|
-
returnType: string;
|
|
92
|
-
returnDescription: string;
|
|
93
|
-
example: string;
|
|
94
|
-
};
|
|
95
|
-
redirect: {
|
|
96
|
-
description: string;
|
|
97
|
-
parameters: {
|
|
98
|
-
name: string;
|
|
99
|
-
dataType: string;
|
|
100
|
-
description: string;
|
|
101
|
-
formInputType: string;
|
|
102
|
-
required: boolean;
|
|
103
|
-
}[];
|
|
104
|
-
returnType: string;
|
|
105
|
-
returnDescription: string;
|
|
106
|
-
example: string;
|
|
107
|
-
};
|
|
108
|
-
static: {
|
|
109
|
-
description: string;
|
|
110
|
-
parameters: {
|
|
111
|
-
name: string;
|
|
112
|
-
dataType: string;
|
|
113
|
-
description: string;
|
|
114
|
-
formInputType: string;
|
|
115
|
-
required: boolean;
|
|
116
|
-
}[];
|
|
117
|
-
returnType: string;
|
|
118
|
-
returnDescription: string;
|
|
119
|
-
example: string;
|
|
120
|
-
};
|
|
121
|
-
cors: {
|
|
122
|
-
description: string;
|
|
123
|
-
parameters: {
|
|
124
|
-
name: string;
|
|
125
|
-
dataType: string;
|
|
126
|
-
description: string;
|
|
127
|
-
formInputType: string;
|
|
128
|
-
required: boolean;
|
|
129
|
-
}[];
|
|
130
|
-
returnType: string;
|
|
131
|
-
returnDescription: string;
|
|
132
|
-
example: string;
|
|
133
|
-
};
|
|
134
|
-
listen: {
|
|
135
|
-
description: string;
|
|
136
|
-
parameters: {
|
|
137
|
-
name: string;
|
|
138
|
-
dataType: string;
|
|
139
|
-
description: string;
|
|
140
|
-
formInputType: string;
|
|
141
|
-
required: boolean;
|
|
142
|
-
}[];
|
|
143
|
-
returnType: string;
|
|
144
|
-
returnDescription: string;
|
|
145
|
-
example: string;
|
|
146
|
-
};
|
|
147
|
-
stop: {
|
|
148
|
-
description: string;
|
|
149
|
-
parameters: {
|
|
150
|
-
name: string;
|
|
151
|
-
dataType: string;
|
|
152
|
-
description: string;
|
|
153
|
-
formInputType: string;
|
|
154
|
-
required: boolean;
|
|
155
|
-
}[];
|
|
156
|
-
returnType: string;
|
|
157
|
-
returnDescription: string;
|
|
158
|
-
example: string;
|
|
159
|
-
};
|
|
160
|
-
status: {
|
|
161
|
-
description: string;
|
|
162
|
-
parameters: {
|
|
163
|
-
name: string;
|
|
164
|
-
dataType: string;
|
|
165
|
-
description: string;
|
|
166
|
-
formInputType: string;
|
|
167
|
-
required: boolean;
|
|
168
|
-
}[];
|
|
169
|
-
returnType: string;
|
|
170
|
-
returnDescription: string;
|
|
171
|
-
example: string;
|
|
172
|
-
};
|
|
173
|
-
logs: {
|
|
174
|
-
description: string;
|
|
175
|
-
parameters: {
|
|
176
|
-
name: string;
|
|
177
|
-
dataType: string;
|
|
178
|
-
description: string;
|
|
179
|
-
formInputType: string;
|
|
180
|
-
required: boolean;
|
|
181
|
-
}[];
|
|
182
|
-
returnType: string;
|
|
183
|
-
returnDescription: string;
|
|
184
|
-
example: string;
|
|
185
|
-
};
|
|
186
|
-
};
|
|
187
|
-
export declare const HttpModuleMetadata: {
|
|
188
|
-
description: string;
|
|
189
|
-
methods: string[];
|
|
190
|
-
};
|
|
191
|
-
//# sourceMappingURL=http.d.ts.map
|
package/dist/http.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAoC,MAAM,oBAAoB,CAAC;AA8W3F,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAExD,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6IhC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;CAG9B,CAAC"}
|
package/dist/http.js
DELETED
|
@@ -1,474 +0,0 @@
|
|
|
1
|
-
const servers = new Map();
|
|
2
|
-
const MIME_TYPES = {
|
|
3
|
-
".html": "text/html",
|
|
4
|
-
".htm": "text/html",
|
|
5
|
-
".css": "text/css",
|
|
6
|
-
".js": "application/javascript",
|
|
7
|
-
".mjs": "application/javascript",
|
|
8
|
-
".json": "application/json",
|
|
9
|
-
".xml": "application/xml",
|
|
10
|
-
".txt": "text/plain",
|
|
11
|
-
".csv": "text/csv",
|
|
12
|
-
".png": "image/png",
|
|
13
|
-
".jpg": "image/jpeg",
|
|
14
|
-
".jpeg": "image/jpeg",
|
|
15
|
-
".gif": "image/gif",
|
|
16
|
-
".svg": "image/svg+xml",
|
|
17
|
-
".ico": "image/x-icon",
|
|
18
|
-
".webp": "image/webp",
|
|
19
|
-
".pdf": "application/pdf",
|
|
20
|
-
".zip": "application/zip",
|
|
21
|
-
".gz": "application/gzip",
|
|
22
|
-
".tar": "application/x-tar",
|
|
23
|
-
".mp3": "audio/mpeg",
|
|
24
|
-
".mp4": "video/mp4",
|
|
25
|
-
".webm": "video/webm",
|
|
26
|
-
".woff": "font/woff",
|
|
27
|
-
".woff2": "font/woff2",
|
|
28
|
-
".ttf": "font/ttf",
|
|
29
|
-
".otf": "font/otf",
|
|
30
|
-
".eot": "application/vnd.ms-fontobject",
|
|
31
|
-
".xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
32
|
-
".xls": "application/vnd.ms-excel",
|
|
33
|
-
".docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
34
|
-
".doc": "application/msword",
|
|
35
|
-
".pptx": "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
36
|
-
".ppt": "application/vnd.ms-powerpoint",
|
|
37
|
-
".wasm": "application/wasm",
|
|
38
|
-
".map": "application/json",
|
|
39
|
-
};
|
|
40
|
-
function getMimeType(filePath) {
|
|
41
|
-
const ext = any(filePath).toLowerCase();
|
|
42
|
-
return MIME_TYPES[ext] || "application/octet-stream";
|
|
43
|
-
}
|
|
44
|
-
function matchRoute(pattern, urlPath) {
|
|
45
|
-
const params = {};
|
|
46
|
-
if (pattern === urlPath)
|
|
47
|
-
return { matched: true, params };
|
|
48
|
-
if (pattern.endsWith("/*")) {
|
|
49
|
-
const prefix = pattern.slice(0, -2);
|
|
50
|
-
if (urlPath === prefix || urlPath.startsWith(prefix + "/")) {
|
|
51
|
-
params["*"] = urlPath.slice(prefix.length + 1);
|
|
52
|
-
return { matched: true, params };
|
|
53
|
-
}
|
|
54
|
-
return { matched: false, params };
|
|
55
|
-
}
|
|
56
|
-
const patternParts = pattern.split("/");
|
|
57
|
-
const urlParts = urlPath.split("/");
|
|
58
|
-
if (patternParts.length !== urlParts.length)
|
|
59
|
-
return { matched: false, params };
|
|
60
|
-
for (let i = 0; i < patternParts.length; i++) {
|
|
61
|
-
const pp = patternParts[i];
|
|
62
|
-
const up = urlParts[i];
|
|
63
|
-
if (pp.startsWith(":")) {
|
|
64
|
-
params[pp.slice(1)] = decodeURIComponent(up);
|
|
65
|
-
}
|
|
66
|
-
else if (pp !== up) {
|
|
67
|
-
return { matched: false, params };
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
return { matched: true, params };
|
|
71
|
-
}
|
|
72
|
-
function getState(id) {
|
|
73
|
-
const state = servers.get(id);
|
|
74
|
-
if (!state)
|
|
75
|
-
throw new Error("HTTP server not found");
|
|
76
|
-
return state;
|
|
77
|
-
}
|
|
78
|
-
function addRoute(id, method, routePath, data, responseType, opts) {
|
|
79
|
-
const state = getState(id);
|
|
80
|
-
const options = (opts && typeof opts === "object" ? opts : {});
|
|
81
|
-
const status = typeof options.status === "number" ? options.status : (responseType === "redirect" ? 302 : 200);
|
|
82
|
-
const headers = (options.headers && typeof options.headers === "object" ? options.headers : {});
|
|
83
|
-
state.routes.push({ method: method.toUpperCase(), pattern: routePath, responseType, data, status, headers });
|
|
84
|
-
return { registered: true, method: method.toUpperCase(), path: routePath, responseType };
|
|
85
|
-
}
|
|
86
|
-
function createRequestHandler(state) {
|
|
87
|
-
return (req, res) => {
|
|
88
|
-
const method = (req.method || "GET").toUpperCase();
|
|
89
|
-
const parsedUrl = new URL(req.url || "/", "http://" + (req.headers.host || "localhost"));
|
|
90
|
-
const urlPath = parsedUrl.pathname;
|
|
91
|
-
let statusCode = 404;
|
|
92
|
-
if (state.corsEnabled) {
|
|
93
|
-
res.setHeader("Access-Control-Allow-Origin", state.corsOrigin);
|
|
94
|
-
res.setHeader("Access-Control-Allow-Methods", state.corsMethods);
|
|
95
|
-
res.setHeader("Access-Control-Allow-Headers", state.corsHeaders);
|
|
96
|
-
res.setHeader("Access-Control-Max-Age", "86400");
|
|
97
|
-
}
|
|
98
|
-
if (state.corsEnabled && method === "OPTIONS") {
|
|
99
|
-
statusCode = 204;
|
|
100
|
-
if (state.logRequests)
|
|
101
|
-
state.requestLog.push({ method, url: urlPath, timestamp: Date.now(), status: statusCode });
|
|
102
|
-
res.writeHead(204);
|
|
103
|
-
res.end();
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
for (const route of state.routes) {
|
|
107
|
-
if (route.method !== "*" && route.method !== method)
|
|
108
|
-
continue;
|
|
109
|
-
const match = matchRoute(route.pattern, urlPath);
|
|
110
|
-
if (!match.matched)
|
|
111
|
-
continue;
|
|
112
|
-
statusCode = route.status;
|
|
113
|
-
for (const [key, val] of Object.entries(route.headers))
|
|
114
|
-
res.setHeader(key, val);
|
|
115
|
-
switch (route.responseType) {
|
|
116
|
-
case "json": {
|
|
117
|
-
res.setHeader("Content-Type", "application/json");
|
|
118
|
-
res.writeHead(statusCode);
|
|
119
|
-
res.end(JSON.stringify(route.data));
|
|
120
|
-
break;
|
|
121
|
-
}
|
|
122
|
-
case "html": {
|
|
123
|
-
res.setHeader("Content-Type", "text/html; charset=utf-8");
|
|
124
|
-
res.writeHead(statusCode);
|
|
125
|
-
res.end(String(route.data));
|
|
126
|
-
break;
|
|
127
|
-
}
|
|
128
|
-
case "text": {
|
|
129
|
-
res.setHeader("Content-Type", "text/plain; charset=utf-8");
|
|
130
|
-
res.writeHead(statusCode);
|
|
131
|
-
res.end(String(route.data));
|
|
132
|
-
break;
|
|
133
|
-
}
|
|
134
|
-
case "file": {
|
|
135
|
-
const filePath = String(route.data);
|
|
136
|
-
try {
|
|
137
|
-
if (!any(filePath)) {
|
|
138
|
-
statusCode = 404;
|
|
139
|
-
res.setHeader("Content-Type", "application/json");
|
|
140
|
-
res.writeHead(404);
|
|
141
|
-
res.end(JSON.stringify({ error: "File not found", path: filePath }));
|
|
142
|
-
}
|
|
143
|
-
else {
|
|
144
|
-
const mime = getMimeType(filePath);
|
|
145
|
-
res.setHeader("Content-Type", mime);
|
|
146
|
-
res.writeHead(statusCode);
|
|
147
|
-
const stream = any(filePath);
|
|
148
|
-
stream.pipe(res);
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
catch {
|
|
152
|
-
statusCode = 500;
|
|
153
|
-
res.setHeader("Content-Type", "application/json");
|
|
154
|
-
res.writeHead(500);
|
|
155
|
-
res.end(JSON.stringify({ error: "Failed to read file" }));
|
|
156
|
-
}
|
|
157
|
-
break;
|
|
158
|
-
}
|
|
159
|
-
case "redirect": {
|
|
160
|
-
res.setHeader("Location", String(route.data));
|
|
161
|
-
res.writeHead(statusCode);
|
|
162
|
-
res.end();
|
|
163
|
-
break;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
if (state.logRequests)
|
|
167
|
-
state.requestLog.push({ method, url: urlPath, timestamp: Date.now(), status: statusCode });
|
|
168
|
-
return;
|
|
169
|
-
}
|
|
170
|
-
for (const dir of state.staticDirs) {
|
|
171
|
-
const filePath = any(dir, urlPath);
|
|
172
|
-
try {
|
|
173
|
-
if (any(filePath) && any(filePath).isFile()) {
|
|
174
|
-
statusCode = 200;
|
|
175
|
-
res.setHeader("Content-Type", getMimeType(filePath));
|
|
176
|
-
res.writeHead(200);
|
|
177
|
-
any(filePath).pipe(res);
|
|
178
|
-
if (state.logRequests)
|
|
179
|
-
state.requestLog.push({ method, url: urlPath, timestamp: Date.now(), status: statusCode });
|
|
180
|
-
return;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
catch { /* continue */ }
|
|
184
|
-
}
|
|
185
|
-
statusCode = 404;
|
|
186
|
-
res.setHeader("Content-Type", "application/json");
|
|
187
|
-
res.writeHead(404);
|
|
188
|
-
res.end(JSON.stringify({ error: "Not Found", path: urlPath, method }));
|
|
189
|
-
if (state.logRequests)
|
|
190
|
-
state.requestLog.push({ method, url: urlPath, timestamp: Date.now(), status: statusCode });
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
const createServer = (args) => {
|
|
194
|
-
const id = String(args[0] ?? "default");
|
|
195
|
-
const opts = (args[1] && typeof args[1] === "object" ? args[1] : {});
|
|
196
|
-
if (servers.has(id))
|
|
197
|
-
return { id, existing: true, message: "Server already exists" };
|
|
198
|
-
const state = {
|
|
199
|
-
server: null,
|
|
200
|
-
port: typeof opts.port === "number" ? opts.port : 3000,
|
|
201
|
-
host: typeof opts.host === "string" ? opts.host : "127.0.0.1",
|
|
202
|
-
routes: [],
|
|
203
|
-
staticDirs: [],
|
|
204
|
-
corsEnabled: false,
|
|
205
|
-
corsOrigin: "*",
|
|
206
|
-
corsMethods: "GET,POST,PUT,DELETE,PATCH,OPTIONS",
|
|
207
|
-
corsHeaders: "Content-Type,Authorization,X-Requested-With",
|
|
208
|
-
requestLog: [],
|
|
209
|
-
logRequests: opts.logRequests === true,
|
|
210
|
-
};
|
|
211
|
-
servers.set(id, state);
|
|
212
|
-
return { id, port: state.port, host: state.host, created: true };
|
|
213
|
-
};
|
|
214
|
-
const get = (args) => {
|
|
215
|
-
return addRoute(String(args[0] ?? "default"), "GET", String(args[1] ?? "/"), args[2] ?? null, "json", args[3] ?? null);
|
|
216
|
-
};
|
|
217
|
-
const post = (args) => {
|
|
218
|
-
return addRoute(String(args[0] ?? "default"), "POST", String(args[1] ?? "/"), args[2] ?? null, "json", args[3] ?? null);
|
|
219
|
-
};
|
|
220
|
-
const put = (args) => {
|
|
221
|
-
return addRoute(String(args[0] ?? "default"), "PUT", String(args[1] ?? "/"), args[2] ?? null, "json", args[3] ?? null);
|
|
222
|
-
};
|
|
223
|
-
const del = (args) => {
|
|
224
|
-
return addRoute(String(args[0] ?? "default"), "DELETE", String(args[1] ?? "/"), args[2] ?? null, "json", args[3] ?? null);
|
|
225
|
-
};
|
|
226
|
-
const html = (args) => {
|
|
227
|
-
return addRoute(String(args[0] ?? "default"), "GET", String(args[1] ?? "/"), String(args[2] ?? ""), "html", args[3] ?? null);
|
|
228
|
-
};
|
|
229
|
-
const file = (args) => {
|
|
230
|
-
return addRoute(String(args[0] ?? "default"), "GET", String(args[1] ?? "/"), String(args[2] ?? ""), "file", args[3] ?? null);
|
|
231
|
-
};
|
|
232
|
-
const redirect = (args) => {
|
|
233
|
-
const opts = (args[3] && typeof args[3] === "object" ? args[3] : {});
|
|
234
|
-
const status = typeof opts.status === "number" ? opts.status : 302;
|
|
235
|
-
return addRoute(String(args[0] ?? "default"), "*", String(args[1] ?? "/"), String(args[2] ?? "/"), "redirect", { status, ...(opts.headers ? { headers: opts.headers } : {}) });
|
|
236
|
-
};
|
|
237
|
-
const staticDir = (args) => {
|
|
238
|
-
const id = String(args[0] ?? "default");
|
|
239
|
-
const dirPath = String(args[1] ?? "");
|
|
240
|
-
const state = getState(id);
|
|
241
|
-
const resolved = any(dirPath);
|
|
242
|
-
if (!any(resolved))
|
|
243
|
-
return { error: "Directory not found: " + resolved };
|
|
244
|
-
state.staticDirs.push(resolved);
|
|
245
|
-
return { registered: true, directory: resolved, totalStaticDirs: state.staticDirs.length };
|
|
246
|
-
};
|
|
247
|
-
const cors = (args) => {
|
|
248
|
-
const id = String(args[0] ?? "default");
|
|
249
|
-
const opts = (args[1] && typeof args[1] === "object" ? args[1] : {});
|
|
250
|
-
const state = getState(id);
|
|
251
|
-
state.corsEnabled = true;
|
|
252
|
-
if (typeof opts.origin === "string")
|
|
253
|
-
state.corsOrigin = opts.origin;
|
|
254
|
-
if (typeof opts.methods === "string")
|
|
255
|
-
state.corsMethods = opts.methods;
|
|
256
|
-
if (typeof opts.headers === "string")
|
|
257
|
-
state.corsHeaders = opts.headers;
|
|
258
|
-
return { enabled: true, origin: state.corsOrigin, methods: state.corsMethods, headers: state.corsHeaders };
|
|
259
|
-
};
|
|
260
|
-
const listen = (args) => {
|
|
261
|
-
const id = String(args[0] ?? "default");
|
|
262
|
-
const portArg = args[1];
|
|
263
|
-
const opts = (args[2] && typeof args[2] === "object" ? args[2] : {});
|
|
264
|
-
const state = getState(id);
|
|
265
|
-
if (state.server && state.server.listening)
|
|
266
|
-
return { id, listening: true, port: state.port, host: state.host, message: "Already listening" };
|
|
267
|
-
if (typeof portArg === "number")
|
|
268
|
-
state.port = portArg;
|
|
269
|
-
else if (typeof opts.port === "number")
|
|
270
|
-
state.port = opts.port;
|
|
271
|
-
if (typeof opts.host === "string")
|
|
272
|
-
state.host = opts.host;
|
|
273
|
-
const server = any(createRequestHandler(state));
|
|
274
|
-
state.server = server;
|
|
275
|
-
return new Promise((resolve, reject) => {
|
|
276
|
-
server.on("error", (err) => reject(new Error("Failed to start server: " + err.message)));
|
|
277
|
-
server.listen(state.port, state.host, () => {
|
|
278
|
-
resolve({ id, listening: true, port: state.port, host: state.host, url: "http://" + state.host + ":" + state.port });
|
|
279
|
-
});
|
|
280
|
-
});
|
|
281
|
-
};
|
|
282
|
-
const stop = (args) => {
|
|
283
|
-
const id = String(args[0] ?? "default");
|
|
284
|
-
const state = getState(id);
|
|
285
|
-
if (!state.server)
|
|
286
|
-
return { id, stopped: true, message: "No server to stop" };
|
|
287
|
-
return new Promise((resolve) => {
|
|
288
|
-
state.server.close(() => { state.server = null; resolve({ id, stopped: true }); });
|
|
289
|
-
setTimeout(() => { if (state.server) {
|
|
290
|
-
state.server = null;
|
|
291
|
-
resolve({ id, stopped: true, forced: true });
|
|
292
|
-
} }, 3000);
|
|
293
|
-
});
|
|
294
|
-
};
|
|
295
|
-
const status = (args) => {
|
|
296
|
-
const id = String(args[0] ?? "default");
|
|
297
|
-
const state = getState(id);
|
|
298
|
-
return {
|
|
299
|
-
id, port: state.port, host: state.host,
|
|
300
|
-
listening: state.server?.listening ?? false,
|
|
301
|
-
routeCount: state.routes.length,
|
|
302
|
-
staticDirCount: state.staticDirs.length,
|
|
303
|
-
corsEnabled: state.corsEnabled,
|
|
304
|
-
requestCount: state.requestLog.length,
|
|
305
|
-
logRequests: state.logRequests,
|
|
306
|
-
};
|
|
307
|
-
};
|
|
308
|
-
const logs = (args) => {
|
|
309
|
-
const id = String(args[0] ?? "default");
|
|
310
|
-
const opts = (args[1] && typeof args[1] === "object" ? args[1] : {});
|
|
311
|
-
const state = getState(id);
|
|
312
|
-
let entries = [...state.requestLog];
|
|
313
|
-
if (typeof opts.method === "string") {
|
|
314
|
-
const m = opts.method.toUpperCase();
|
|
315
|
-
entries = entries.filter((e) => e.method === m);
|
|
316
|
-
}
|
|
317
|
-
if (typeof opts.path === "string") {
|
|
318
|
-
const p = opts.path;
|
|
319
|
-
entries = entries.filter((e) => e.url.startsWith(p));
|
|
320
|
-
}
|
|
321
|
-
if (typeof opts.limit === "number" && opts.limit > 0)
|
|
322
|
-
entries = entries.slice(-opts.limit);
|
|
323
|
-
return entries;
|
|
324
|
-
};
|
|
325
|
-
export const HttpFunctions = {
|
|
326
|
-
createServer, get, post, put, delete: del, html, file, redirect, static: staticDir, cors, listen, stop, status, logs,
|
|
327
|
-
};
|
|
328
|
-
export const HttpFunctionMetadata = {
|
|
329
|
-
createServer: {
|
|
330
|
-
description: "Create a new HTTP server instance (does not start listening yet)",
|
|
331
|
-
parameters: [
|
|
332
|
-
{ name: "id", dataType: "string", description: "Unique server identifier", formInputType: "text", required: true },
|
|
333
|
-
{ name: "opts", dataType: "object", description: "Options: {port?, host?, logRequests?}", formInputType: "json", required: false },
|
|
334
|
-
],
|
|
335
|
-
returnType: "object", returnDescription: "Server creation info",
|
|
336
|
-
example: 'any "myapi" {"port": 8080}',
|
|
337
|
-
},
|
|
338
|
-
get: {
|
|
339
|
-
description: "Register a GET route that returns static JSON data",
|
|
340
|
-
parameters: [
|
|
341
|
-
{ name: "id", dataType: "string", description: "Server ID", formInputType: "text", required: true },
|
|
342
|
-
{ name: "path", dataType: "string", description: "URL path pattern", formInputType: "text", required: true },
|
|
343
|
-
{ name: "data", dataType: "any", description: "JSON data to return", formInputType: "json", required: true },
|
|
344
|
-
{ name: "opts", dataType: "object", description: "Options: {status?, headers?}", formInputType: "json", required: false },
|
|
345
|
-
],
|
|
346
|
-
returnType: "object", returnDescription: "Route registration info",
|
|
347
|
-
example: 'any "myapi" "/api/products" [{"id": 1}]',
|
|
348
|
-
},
|
|
349
|
-
post: {
|
|
350
|
-
description: "Register a POST route that returns static JSON data",
|
|
351
|
-
parameters: [
|
|
352
|
-
{ name: "id", dataType: "string", description: "Server ID", formInputType: "text", required: true },
|
|
353
|
-
{ name: "path", dataType: "string", description: "URL path pattern", formInputType: "text", required: true },
|
|
354
|
-
{ name: "data", dataType: "any", description: "JSON data to return", formInputType: "json", required: true },
|
|
355
|
-
{ name: "opts", dataType: "object", description: "Options: {status?, headers?}", formInputType: "json", required: false },
|
|
356
|
-
],
|
|
357
|
-
returnType: "object", returnDescription: "Route registration info",
|
|
358
|
-
example: 'any "myapi" "/api/products" {"created": true}',
|
|
359
|
-
},
|
|
360
|
-
put: {
|
|
361
|
-
description: "Register a PUT route that returns static JSON data",
|
|
362
|
-
parameters: [
|
|
363
|
-
{ name: "id", dataType: "string", description: "Server ID", formInputType: "text", required: true },
|
|
364
|
-
{ name: "path", dataType: "string", description: "URL path pattern", formInputType: "text", required: true },
|
|
365
|
-
{ name: "data", dataType: "any", description: "JSON data to return", formInputType: "json", required: true },
|
|
366
|
-
{ name: "opts", dataType: "object", description: "Options: {status?, headers?}", formInputType: "json", required: false },
|
|
367
|
-
],
|
|
368
|
-
returnType: "object", returnDescription: "Route registration info",
|
|
369
|
-
example: 'any "myapi" "/api/products/:id" {"updated": true}',
|
|
370
|
-
},
|
|
371
|
-
delete: {
|
|
372
|
-
description: "Register a DELETE route that returns static JSON data",
|
|
373
|
-
parameters: [
|
|
374
|
-
{ name: "id", dataType: "string", description: "Server ID", formInputType: "text", required: true },
|
|
375
|
-
{ name: "path", dataType: "string", description: "URL path pattern", formInputType: "text", required: true },
|
|
376
|
-
{ name: "data", dataType: "any", description: "JSON data to return", formInputType: "json", required: true },
|
|
377
|
-
{ name: "opts", dataType: "object", description: "Options: {status?, headers?}", formInputType: "json", required: false },
|
|
378
|
-
],
|
|
379
|
-
returnType: "object", returnDescription: "Route registration info",
|
|
380
|
-
example: 'any "myapi" "/api/products/:id" {"deleted": true}',
|
|
381
|
-
},
|
|
382
|
-
html: {
|
|
383
|
-
description: "Register a GET route that serves an HTML string",
|
|
384
|
-
parameters: [
|
|
385
|
-
{ name: "id", dataType: "string", description: "Server ID", formInputType: "text", required: true },
|
|
386
|
-
{ name: "path", dataType: "string", description: "URL path", formInputType: "text", required: true },
|
|
387
|
-
{ name: "content", dataType: "string", description: "HTML string to serve", formInputType: "textarea", required: true },
|
|
388
|
-
{ name: "opts", dataType: "object", description: "Options: {status?, headers?}", formInputType: "json", required: false },
|
|
389
|
-
],
|
|
390
|
-
returnType: "object", returnDescription: "Route registration info",
|
|
391
|
-
example: 'any "myapi" "/" "Hello World"',
|
|
392
|
-
},
|
|
393
|
-
file: {
|
|
394
|
-
description: "Register a GET route that serves a file from disk",
|
|
395
|
-
parameters: [
|
|
396
|
-
{ name: "id", dataType: "string", description: "Server ID", formInputType: "text", required: true },
|
|
397
|
-
{ name: "path", dataType: "string", description: "URL path", formInputType: "text", required: true },
|
|
398
|
-
{ name: "filePath", dataType: "string", description: "Absolute file path on disk", formInputType: "text", required: true },
|
|
399
|
-
{ name: "opts", dataType: "object", description: "Options: {status?, headers?}", formInputType: "json", required: false },
|
|
400
|
-
],
|
|
401
|
-
returnType: "object", returnDescription: "Route registration info",
|
|
402
|
-
example: 'any "myapi" "/report" "C:/reports/report.pdf"',
|
|
403
|
-
},
|
|
404
|
-
redirect: {
|
|
405
|
-
description: "Register a route that redirects to another URL",
|
|
406
|
-
parameters: [
|
|
407
|
-
{ name: "id", dataType: "string", description: "Server ID", formInputType: "text", required: true },
|
|
408
|
-
{ name: "fromPath", dataType: "string", description: "URL path to redirect from", formInputType: "text", required: true },
|
|
409
|
-
{ name: "toUrl", dataType: "string", description: "Target URL to redirect to", formInputType: "text", required: true },
|
|
410
|
-
{ name: "opts", dataType: "object", description: "Options: {status? (301 or 302)}", formInputType: "json", required: false },
|
|
411
|
-
],
|
|
412
|
-
returnType: "object", returnDescription: "Route registration info",
|
|
413
|
-
example: 'any "myapi" "/old" "/new" {"status": 301}',
|
|
414
|
-
},
|
|
415
|
-
static: {
|
|
416
|
-
description: "Register a directory to serve static files from",
|
|
417
|
-
parameters: [
|
|
418
|
-
{ name: "id", dataType: "string", description: "Server ID", formInputType: "text", required: true },
|
|
419
|
-
{ name: "dirPath", dataType: "string", description: "Absolute directory path", formInputType: "text", required: true },
|
|
420
|
-
{ name: "opts", dataType: "object", description: "Options (reserved)", formInputType: "json", required: false },
|
|
421
|
-
],
|
|
422
|
-
returnType: "object", returnDescription: "Static directory registration info",
|
|
423
|
-
example: 'any "myapi" "C:/mysite/public"',
|
|
424
|
-
},
|
|
425
|
-
cors: {
|
|
426
|
-
description: "Enable CORS on the server",
|
|
427
|
-
parameters: [
|
|
428
|
-
{ name: "id", dataType: "string", description: "Server ID", formInputType: "text", required: true },
|
|
429
|
-
{ name: "opts", dataType: "object", description: "Options: {origin?, methods?, headers?}", formInputType: "json", required: false },
|
|
430
|
-
],
|
|
431
|
-
returnType: "object", returnDescription: "CORS configuration info",
|
|
432
|
-
example: 'any "myapi" {"origin": "http://localhost:5173"}',
|
|
433
|
-
},
|
|
434
|
-
listen: {
|
|
435
|
-
description: "Start the HTTP server listening for requests",
|
|
436
|
-
parameters: [
|
|
437
|
-
{ name: "id", dataType: "string", description: "Server ID", formInputType: "text", required: true },
|
|
438
|
-
{ name: "port", dataType: "number", description: "Port number (default 3000)", formInputType: "text", required: false },
|
|
439
|
-
{ name: "opts", dataType: "object", description: "Options: {host?}", formInputType: "json", required: false },
|
|
440
|
-
],
|
|
441
|
-
returnType: "object", returnDescription: "Server listening info with URL",
|
|
442
|
-
example: 'any "myapi" 8080',
|
|
443
|
-
},
|
|
444
|
-
stop: {
|
|
445
|
-
description: "Stop the HTTP server gracefully",
|
|
446
|
-
parameters: [
|
|
447
|
-
{ name: "id", dataType: "string", description: "Server ID", formInputType: "text", required: true },
|
|
448
|
-
],
|
|
449
|
-
returnType: "object", returnDescription: "Server stop confirmation",
|
|
450
|
-
example: 'any "myapi"',
|
|
451
|
-
},
|
|
452
|
-
status: {
|
|
453
|
-
description: "Get server status: port, routes, listening state, request count",
|
|
454
|
-
parameters: [
|
|
455
|
-
{ name: "id", dataType: "string", description: "Server ID", formInputType: "text", required: true },
|
|
456
|
-
],
|
|
457
|
-
returnType: "object", returnDescription: "Server status info",
|
|
458
|
-
example: 'any "myapi"',
|
|
459
|
-
},
|
|
460
|
-
logs: {
|
|
461
|
-
description: "Get the request log for a server",
|
|
462
|
-
parameters: [
|
|
463
|
-
{ name: "id", dataType: "string", description: "Server ID", formInputType: "text", required: true },
|
|
464
|
-
{ name: "opts", dataType: "object", description: "Filter options: {limit?, method?, path?}", formInputType: "json", required: false },
|
|
465
|
-
],
|
|
466
|
-
returnType: "array", returnDescription: "Array of request log entries",
|
|
467
|
-
example: 'any "myapi" {"limit": 10, "method": "GET"}',
|
|
468
|
-
},
|
|
469
|
-
};
|
|
470
|
-
export const HttpModuleMetadata = {
|
|
471
|
-
description: "HTTP server for RobinPath scripts. Register routes with static responses (JSON, HTML, files), enable CORS, serve static directories. No callbacks needed.",
|
|
472
|
-
methods: ["createServer", "get", "post", "put", "delete", "html", "file", "redirect", "static", "cors", "listen", "stop", "status", "logs"],
|
|
473
|
-
};
|
|
474
|
-
//# sourceMappingURL=http.js.map
|
package/dist/http.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"http.js","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"AAsCA,MAAM,OAAO,GAAG,IAAI,GAAG,EAAuB,CAAC;AAE/C,MAAM,UAAU,GAA2B;IACzC,OAAO,EAAE,WAAW;IACpB,MAAM,EAAE,WAAW;IACnB,MAAM,EAAE,UAAU;IAClB,KAAK,EAAE,wBAAwB;IAC/B,MAAM,EAAE,wBAAwB;IAChC,OAAO,EAAE,kBAAkB;IAC3B,MAAM,EAAE,iBAAiB;IACzB,MAAM,EAAE,YAAY;IACpB,MAAM,EAAE,UAAU;IAClB,MAAM,EAAE,WAAW;IACnB,MAAM,EAAE,YAAY;IACpB,OAAO,EAAE,YAAY;IACrB,MAAM,EAAE,WAAW;IACnB,MAAM,EAAE,eAAe;IACvB,MAAM,EAAE,cAAc;IACtB,OAAO,EAAE,YAAY;IACrB,MAAM,EAAE,iBAAiB;IACzB,MAAM,EAAE,iBAAiB;IACzB,KAAK,EAAE,kBAAkB;IACzB,MAAM,EAAE,mBAAmB;IAC3B,MAAM,EAAE,YAAY;IACpB,MAAM,EAAE,WAAW;IACnB,OAAO,EAAE,YAAY;IACrB,OAAO,EAAE,WAAW;IACpB,QAAQ,EAAE,YAAY;IACtB,MAAM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D,UAAU,EAAE,QAAQ,EAAE,iBAAiB,EAAE,oBAAoB;QAC7D,OAAO,EAAE,aAAa;KACvB;IACD,IAAI,EAAE;QACJ,WAAW,EAAE,kCAAkC;QAC/C,UAAU,EAAE;YACV,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;YACnG,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,0CAA0C,EAAE,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE;SACtI;QACD,UAAU,EAAE,OAAO,EAAE,iBAAiB,EAAE,8BAA8B;QACtE,OAAO,EAAE,4CAA4C;KACtD;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,WAAW,EAAE,2JAA2J;IACxK,OAAO,EAAE,CAAC,cAAc,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC;CAC5I,CAAC"}
|
package/dist/index.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { ModuleAdapter } from "@wiredwp/robinpath";
|
|
2
|
-
declare const HttpModule: ModuleAdapter;
|
|
3
|
-
export default HttpModule;
|
|
4
|
-
export { HttpModule };
|
|
5
|
-
export { HttpFunctions, HttpFunctionMetadata, HttpModuleMetadata } from "./http.js";
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGxD,QAAA,MAAM,UAAU,EAAE,aAMjB,CAAC;AAEF,eAAe,UAAU,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC"}
|
package/dist/index.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { HttpFunctions, HttpFunctionMetadata, HttpModuleMetadata } from "./http.js";
|
|
2
|
-
const HttpModule = {
|
|
3
|
-
name: "http",
|
|
4
|
-
functions: HttpFunctions,
|
|
5
|
-
functionMetadata: HttpFunctionMetadata,
|
|
6
|
-
moduleMetadata: HttpModuleMetadata,
|
|
7
|
-
global: false,
|
|
8
|
-
}; // as ModuleAdapter
|
|
9
|
-
export default HttpModule;
|
|
10
|
-
export { HttpModule };
|
|
11
|
-
export { HttpFunctions, HttpFunctionMetadata, HttpModuleMetadata } from "./http.js";
|
|
12
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEpF,MAAM,UAAU,GAAkB;IAChC,IAAI,EAAE,MAAM;IACZ,SAAS,EAAE,aAAa;IACxB,gBAAgB,EAAE,oBAA2B;IAC7C,cAAc,EAAE,kBAAyB;IACzC,MAAM,EAAE,KAAK;CACd,CAAC,CAAC,mBAAmB;AAEtB,eAAe,UAAU,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC"}
|