@furystack/rest-service 6.0.7 → 6.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/dist/helpers.js +15 -1
- package/dist/helpers.js.map +1 -1
- package/dist/helpers.spec.js +18 -2
- package/dist/helpers.spec.js.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/mime-types.js +339 -0
- package/dist/mime-types.js.map +1 -0
- package/dist/mime-types.spec.js +15 -0
- package/dist/mime-types.spec.js.map +1 -0
- package/dist/server-manager.js.map +1 -1
- package/dist/static-server-manager.js +66 -0
- package/dist/static-server-manager.js.map +1 -0
- package/dist/static-server-manager.spec.js +186 -0
- package/dist/static-server-manager.spec.js.map +1 -0
- package/package.json +11 -11
- package/src/helpers.spec.ts +20 -9
- package/src/helpers.ts +14 -0
- package/src/index.ts +2 -0
- package/src/mime-types.spec.ts +14 -0
- package/src/mime-types.ts +336 -0
- package/src/server-manager.ts +6 -1
- package/src/static-server-manager.spec.ts +226 -0
- package/src/static-server-manager.ts +89 -0
- package/types/helpers.d.ts +12 -0
- package/types/helpers.d.ts.map +1 -1
- package/types/index.d.ts +2 -0
- package/types/index.d.ts.map +1 -1
- package/types/mime-types.d.ts +305 -0
- package/types/mime-types.d.ts.map +1 -0
- package/types/mime-types.spec.d.ts +2 -0
- package/types/mime-types.spec.d.ts.map +1 -0
- package/types/server-manager.d.ts +5 -4
- package/types/server-manager.d.ts.map +1 -1
- package/types/static-server-manager.d.ts +20 -0
- package/types/static-server-manager.d.ts.map +1 -0
- package/types/static-server-manager.spec.d.ts +2 -0
- package/types/static-server-manager.spec.d.ts.map +1 -0
package/types/helpers.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { HttpAuthenticationSettings } from './http-authentication-settings';
|
|
|
4
4
|
import { RestApi } from '@furystack/rest';
|
|
5
5
|
import { ImplementApiOptions } from './api-manager';
|
|
6
6
|
import { DefaultSession } from './models/default-session';
|
|
7
|
+
import { StaticServerOptions } from './static-server-manager';
|
|
7
8
|
/**
|
|
8
9
|
* Sets up the @furystack/rest-service with the provided settings
|
|
9
10
|
*
|
|
@@ -18,4 +19,15 @@ export declare const useRestService: <T extends RestApi>(api: ImplementApiOption
|
|
|
18
19
|
* @returns void
|
|
19
20
|
*/
|
|
20
21
|
export declare const useHttpAuthentication: <TUser extends User, TSession extends DefaultSession>(injector: Injector, settings?: Partial<HttpAuthenticationSettings<TUser, TSession>> | undefined) => void;
|
|
22
|
+
/**
|
|
23
|
+
* Sets up a static file server
|
|
24
|
+
*
|
|
25
|
+
* @param options The settings for the static file server
|
|
26
|
+
* @param options.injector The Injector instance
|
|
27
|
+
* @param options.settings Settings for the static file server
|
|
28
|
+
* @returns a promise that resolves when the server is ready
|
|
29
|
+
*/
|
|
30
|
+
export declare const useStaticFiles: (options: {
|
|
31
|
+
injector: Injector;
|
|
32
|
+
} & StaticServerOptions) => Promise<void>;
|
|
21
33
|
//# sourceMappingURL=helpers.d.ts.map
|
package/types/helpers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAA;AAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AACzC,OAAO,EAAc,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAA;AAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AACzC,OAAO,EAAc,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,EAAuB,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAElF;;;;GAIG;AACH,eAAO,MAAM,cAAc,wEAG1B,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,kEACtB,QAAQ,sFAE+F,CAAA;AAEnH;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,YAAa;IAAE,QAAQ,EAAE,QAAQ,CAAA;CAAE,GAAG,mBAAmB,kBAGnF,CAAA"}
|
package/types/index.d.ts
CHANGED
|
@@ -14,4 +14,6 @@ export * from './endpoint-generators';
|
|
|
14
14
|
export * from './schema-validator';
|
|
15
15
|
export * from './request-action-implementation';
|
|
16
16
|
export * from './validate';
|
|
17
|
+
export * from './mime-types';
|
|
18
|
+
export * from './static-server-manager';
|
|
17
19
|
//# sourceMappingURL=index.d.ts.map
|
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,cAAc,gCAAgC,CAAA;AAC9C,cAAc,qBAAqB,CAAA;AACnC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,kBAAkB,CAAA;AAChC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,YAAY,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,cAAc,gCAAgC,CAAA;AAC9C,cAAc,qBAAqB,CAAA;AACnC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,kBAAkB,CAAA;AAChC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,yBAAyB,CAAA"}
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
export declare const mimeTypes: {
|
|
2
|
+
'application/andrew-inset': string[];
|
|
3
|
+
'application/applixware': string[];
|
|
4
|
+
'application/atom+xml': string[];
|
|
5
|
+
'application/atomcat+xml': string[];
|
|
6
|
+
'application/atomdeleted+xml': string[];
|
|
7
|
+
'application/atomsvc+xml': string[];
|
|
8
|
+
'application/atsc-dwd+xml': string[];
|
|
9
|
+
'application/atsc-held+xml': string[];
|
|
10
|
+
'application/atsc-rsat+xml': string[];
|
|
11
|
+
'application/bdoc': string[];
|
|
12
|
+
'application/calendar+xml': string[];
|
|
13
|
+
'application/ccxml+xml': string[];
|
|
14
|
+
'application/cdfx+xml': string[];
|
|
15
|
+
'application/cdmi-capability': string[];
|
|
16
|
+
'application/cdmi-container': string[];
|
|
17
|
+
'application/cdmi-domain': string[];
|
|
18
|
+
'application/cdmi-object': string[];
|
|
19
|
+
'application/cdmi-queue': string[];
|
|
20
|
+
'application/cu-seeme': string[];
|
|
21
|
+
'application/dash+xml': string[];
|
|
22
|
+
'application/davmount+xml': string[];
|
|
23
|
+
'application/docbook+xml': string[];
|
|
24
|
+
'application/dssc+der': string[];
|
|
25
|
+
'application/dssc+xml': string[];
|
|
26
|
+
'application/ecmascript': string[];
|
|
27
|
+
'application/emma+xml': string[];
|
|
28
|
+
'application/emotionml+xml': string[];
|
|
29
|
+
'application/epub+zip': string[];
|
|
30
|
+
'application/exi': string[];
|
|
31
|
+
'application/express': string[];
|
|
32
|
+
'application/fdt+xml': string[];
|
|
33
|
+
'application/font-tdpfr': string[];
|
|
34
|
+
'application/geo+json': string[];
|
|
35
|
+
'application/gml+xml': string[];
|
|
36
|
+
'application/gpx+xml': string[];
|
|
37
|
+
'application/gxf': string[];
|
|
38
|
+
'application/gzip': string[];
|
|
39
|
+
'application/hjson': string[];
|
|
40
|
+
'application/hyperstudio': string[];
|
|
41
|
+
'application/inkml+xml': string[];
|
|
42
|
+
'application/ipfix': string[];
|
|
43
|
+
'application/its+xml': string[];
|
|
44
|
+
'application/java-archive': string[];
|
|
45
|
+
'application/java-serialized-object': string[];
|
|
46
|
+
'application/java-vm': string[];
|
|
47
|
+
'application/javascript': string[];
|
|
48
|
+
'application/json': string[];
|
|
49
|
+
'application/json5': string[];
|
|
50
|
+
'application/jsonml+json': string[];
|
|
51
|
+
'application/ld+json': string[];
|
|
52
|
+
'application/lgr+xml': string[];
|
|
53
|
+
'application/lost+xml': string[];
|
|
54
|
+
'application/mac-binhex40': string[];
|
|
55
|
+
'application/mac-compactpro': string[];
|
|
56
|
+
'application/mads+xml': string[];
|
|
57
|
+
'application/manifest+json': string[];
|
|
58
|
+
'application/marc': string[];
|
|
59
|
+
'application/marcxml+xml': string[];
|
|
60
|
+
'application/mathematica': string[];
|
|
61
|
+
'application/mathml+xml': string[];
|
|
62
|
+
'application/mbox': string[];
|
|
63
|
+
'application/mediaservercontrol+xml': string[];
|
|
64
|
+
'application/metalink+xml': string[];
|
|
65
|
+
'application/metalink4+xml': string[];
|
|
66
|
+
'application/mets+xml': string[];
|
|
67
|
+
'application/mmt-aei+xml': string[];
|
|
68
|
+
'application/mmt-usd+xml': string[];
|
|
69
|
+
'application/mods+xml': string[];
|
|
70
|
+
'application/mp21': string[];
|
|
71
|
+
'application/mp4': string[];
|
|
72
|
+
'application/msword': string[];
|
|
73
|
+
'application/mxf': string[];
|
|
74
|
+
'application/n-quads': string[];
|
|
75
|
+
'application/n-triples': string[];
|
|
76
|
+
'application/node': string[];
|
|
77
|
+
'application/octet-stream': string[];
|
|
78
|
+
'application/oda': string[];
|
|
79
|
+
'application/oebps-package+xml': string[];
|
|
80
|
+
'application/ogg': string[];
|
|
81
|
+
'application/omdoc+xml': string[];
|
|
82
|
+
'application/onenote': string[];
|
|
83
|
+
'application/oxps': string[];
|
|
84
|
+
'application/p2p-overlay+xml': string[];
|
|
85
|
+
'application/patch-ops-error+xml': string[];
|
|
86
|
+
'application/pdf': string[];
|
|
87
|
+
'application/pgp-encrypted': string[];
|
|
88
|
+
'application/pgp-signature': string[];
|
|
89
|
+
'application/pics-rules': string[];
|
|
90
|
+
'application/pkcs10': string[];
|
|
91
|
+
'application/pkcs7-mime': string[];
|
|
92
|
+
'application/pkcs7-signature': string[];
|
|
93
|
+
'application/pkcs8': string[];
|
|
94
|
+
'application/pkix-attr-cert': string[];
|
|
95
|
+
'application/pkix-cert': string[];
|
|
96
|
+
'application/pkix-crl': string[];
|
|
97
|
+
'application/pkix-pkipath': string[];
|
|
98
|
+
'application/pkixcmp': string[];
|
|
99
|
+
'application/pls+xml': string[];
|
|
100
|
+
'application/postscript': string[];
|
|
101
|
+
'application/provenance+xml': string[];
|
|
102
|
+
'application/pskc+xml': string[];
|
|
103
|
+
'application/raml+yaml': string[];
|
|
104
|
+
'application/rdf+xml': string[];
|
|
105
|
+
'application/reginfo+xml': string[];
|
|
106
|
+
'application/relax-ng-compact-syntax': string[];
|
|
107
|
+
'application/resource-lists+xml': string[];
|
|
108
|
+
'application/resource-lists-diff+xml': string[];
|
|
109
|
+
'application/rls-services+xml': string[];
|
|
110
|
+
'application/route-apd+xml': string[];
|
|
111
|
+
'application/route-s-tsid+xml': string[];
|
|
112
|
+
'application/route-usd+xml': string[];
|
|
113
|
+
'application/rpki-ghostbusters': string[];
|
|
114
|
+
'application/rpki-manifest': string[];
|
|
115
|
+
'application/rpki-roa': string[];
|
|
116
|
+
'application/rsd+xml': string[];
|
|
117
|
+
'application/rss+xml': string[];
|
|
118
|
+
'application/rtf': string[];
|
|
119
|
+
'application/sbml+xml': string[];
|
|
120
|
+
'application/scvp-cv-request': string[];
|
|
121
|
+
'application/scvp-cv-response': string[];
|
|
122
|
+
'application/scvp-vp-request': string[];
|
|
123
|
+
'application/scvp-vp-response': string[];
|
|
124
|
+
'application/sdp': string[];
|
|
125
|
+
'application/senml+xml': string[];
|
|
126
|
+
'application/sensml+xml': string[];
|
|
127
|
+
'application/set-payment-initiation': string[];
|
|
128
|
+
'application/set-registration-initiation': string[];
|
|
129
|
+
'application/shf+xml': string[];
|
|
130
|
+
'application/sieve': string[];
|
|
131
|
+
'application/smil+xml': string[];
|
|
132
|
+
'application/sparql-query': string[];
|
|
133
|
+
'application/sparql-results+xml': string[];
|
|
134
|
+
'application/srgs': string[];
|
|
135
|
+
'application/srgs+xml': string[];
|
|
136
|
+
'application/sru+xml': string[];
|
|
137
|
+
'application/ssdl+xml': string[];
|
|
138
|
+
'application/ssml+xml': string[];
|
|
139
|
+
'application/swid+xml': string[];
|
|
140
|
+
'application/tei+xml': string[];
|
|
141
|
+
'application/thraud+xml': string[];
|
|
142
|
+
'application/timestamped-data': string[];
|
|
143
|
+
'application/toml': string[];
|
|
144
|
+
'application/trig': string[];
|
|
145
|
+
'application/ttml+xml': string[];
|
|
146
|
+
'application/ubjson': string[];
|
|
147
|
+
'application/urc-ressheet+xml': string[];
|
|
148
|
+
'application/urc-targetdesc+xml': string[];
|
|
149
|
+
'application/voicexml+xml': string[];
|
|
150
|
+
'application/wasm': string[];
|
|
151
|
+
'application/widget': string[];
|
|
152
|
+
'application/winhlp': string[];
|
|
153
|
+
'application/wsdl+xml': string[];
|
|
154
|
+
'application/wspolicy+xml': string[];
|
|
155
|
+
'application/xaml+xml': string[];
|
|
156
|
+
'application/xcap-att+xml': string[];
|
|
157
|
+
'application/xcap-caps+xml': string[];
|
|
158
|
+
'application/xcap-diff+xml': string[];
|
|
159
|
+
'application/xcap-el+xml': string[];
|
|
160
|
+
'application/xcap-ns+xml': string[];
|
|
161
|
+
'application/xenc+xml': string[];
|
|
162
|
+
'application/xhtml+xml': string[];
|
|
163
|
+
'application/xliff+xml': string[];
|
|
164
|
+
'application/xml': string[];
|
|
165
|
+
'application/xml-dtd': string[];
|
|
166
|
+
'application/xop+xml': string[];
|
|
167
|
+
'application/xproc+xml': string[];
|
|
168
|
+
'application/xslt+xml': string[];
|
|
169
|
+
'application/xspf+xml': string[];
|
|
170
|
+
'application/xv+xml': string[];
|
|
171
|
+
'application/yang': string[];
|
|
172
|
+
'application/yin+xml': string[];
|
|
173
|
+
'application/zip': string[];
|
|
174
|
+
'audio/3gpp': string[];
|
|
175
|
+
'audio/adpcm': string[];
|
|
176
|
+
'audio/amr': string[];
|
|
177
|
+
'audio/basic': string[];
|
|
178
|
+
'audio/midi': string[];
|
|
179
|
+
'audio/mobile-xmf': string[];
|
|
180
|
+
'audio/mp3': string[];
|
|
181
|
+
'audio/mp4': string[];
|
|
182
|
+
'audio/mpeg': string[];
|
|
183
|
+
'audio/ogg': string[];
|
|
184
|
+
'audio/s3m': string[];
|
|
185
|
+
'audio/silk': string[];
|
|
186
|
+
'audio/wav': string[];
|
|
187
|
+
'audio/wave': string[];
|
|
188
|
+
'audio/webm': string[];
|
|
189
|
+
'audio/xm': string[];
|
|
190
|
+
'font/collection': string[];
|
|
191
|
+
'font/otf': string[];
|
|
192
|
+
'font/ttf': string[];
|
|
193
|
+
'font/woff': string[];
|
|
194
|
+
'font/woff2': string[];
|
|
195
|
+
'image/aces': string[];
|
|
196
|
+
'image/apng': string[];
|
|
197
|
+
'image/avif': string[];
|
|
198
|
+
'image/bmp': string[];
|
|
199
|
+
'image/cgm': string[];
|
|
200
|
+
'image/dicom-rle': string[];
|
|
201
|
+
'image/emf': string[];
|
|
202
|
+
'image/fits': string[];
|
|
203
|
+
'image/g3fax': string[];
|
|
204
|
+
'image/gif': string[];
|
|
205
|
+
'image/heic': string[];
|
|
206
|
+
'image/heic-sequence': string[];
|
|
207
|
+
'image/heif': string[];
|
|
208
|
+
'image/heif-sequence': string[];
|
|
209
|
+
'image/hej2k': string[];
|
|
210
|
+
'image/hsj2': string[];
|
|
211
|
+
'image/ief': string[];
|
|
212
|
+
'image/jls': string[];
|
|
213
|
+
'image/jp2': string[];
|
|
214
|
+
'image/jpeg': string[];
|
|
215
|
+
'image/jph': string[];
|
|
216
|
+
'image/jphc': string[];
|
|
217
|
+
'image/jpm': string[];
|
|
218
|
+
'image/jpx': string[];
|
|
219
|
+
'image/jxr': string[];
|
|
220
|
+
'image/jxra': string[];
|
|
221
|
+
'image/jxrs': string[];
|
|
222
|
+
'image/jxs': string[];
|
|
223
|
+
'image/jxsc': string[];
|
|
224
|
+
'image/jxsi': string[];
|
|
225
|
+
'image/jxss': string[];
|
|
226
|
+
'image/ktx': string[];
|
|
227
|
+
'image/ktx2': string[];
|
|
228
|
+
'image/png': string[];
|
|
229
|
+
'image/sgi': string[];
|
|
230
|
+
'image/svg+xml': string[];
|
|
231
|
+
'image/t38': string[];
|
|
232
|
+
'image/tiff': string[];
|
|
233
|
+
'image/tiff-fx': string[];
|
|
234
|
+
'image/webp': string[];
|
|
235
|
+
'image/wmf': string[];
|
|
236
|
+
'message/disposition-notification': string[];
|
|
237
|
+
'message/global': string[];
|
|
238
|
+
'message/global-delivery-status': string[];
|
|
239
|
+
'message/global-disposition-notification': string[];
|
|
240
|
+
'message/global-headers': string[];
|
|
241
|
+
'message/rfc822': string[];
|
|
242
|
+
'model/3mf': string[];
|
|
243
|
+
'model/gltf+json': string[];
|
|
244
|
+
'model/gltf-binary': string[];
|
|
245
|
+
'model/iges': string[];
|
|
246
|
+
'model/mesh': string[];
|
|
247
|
+
'model/mtl': string[];
|
|
248
|
+
'model/obj': string[];
|
|
249
|
+
'model/step+xml': string[];
|
|
250
|
+
'model/step+zip': string[];
|
|
251
|
+
'model/step-xml+zip': string[];
|
|
252
|
+
'model/stl': string[];
|
|
253
|
+
'model/vrml': string[];
|
|
254
|
+
'model/x3d+binary': string[];
|
|
255
|
+
'model/x3d+fastinfoset': string[];
|
|
256
|
+
'model/x3d+vrml': string[];
|
|
257
|
+
'model/x3d+xml': string[];
|
|
258
|
+
'model/x3d-vrml': string[];
|
|
259
|
+
'text/cache-manifest': string[];
|
|
260
|
+
'text/calendar': string[];
|
|
261
|
+
'text/coffeescript': string[];
|
|
262
|
+
'text/css': string[];
|
|
263
|
+
'text/csv': string[];
|
|
264
|
+
'text/html': string[];
|
|
265
|
+
'text/jade': string[];
|
|
266
|
+
'text/jsx': string[];
|
|
267
|
+
'text/less': string[];
|
|
268
|
+
'text/markdown': string[];
|
|
269
|
+
'text/mathml': string[];
|
|
270
|
+
'text/mdx': string[];
|
|
271
|
+
'text/n3': string[];
|
|
272
|
+
'text/plain': string[];
|
|
273
|
+
'text/richtext': string[];
|
|
274
|
+
'text/rtf': string[];
|
|
275
|
+
'text/sgml': string[];
|
|
276
|
+
'text/shex': string[];
|
|
277
|
+
'text/slim': string[];
|
|
278
|
+
'text/spdx': string[];
|
|
279
|
+
'text/stylus': string[];
|
|
280
|
+
'text/tab-separated-values': string[];
|
|
281
|
+
'text/troff': string[];
|
|
282
|
+
'text/turtle': string[];
|
|
283
|
+
'text/uri-list': string[];
|
|
284
|
+
'text/vcard': string[];
|
|
285
|
+
'text/vtt': string[];
|
|
286
|
+
'text/xml': string[];
|
|
287
|
+
'text/yaml': string[];
|
|
288
|
+
'video/3gpp': string[];
|
|
289
|
+
'video/3gpp2': string[];
|
|
290
|
+
'video/h261': string[];
|
|
291
|
+
'video/h263': string[];
|
|
292
|
+
'video/h264': string[];
|
|
293
|
+
'video/iso.segment': string[];
|
|
294
|
+
'video/jpeg': string[];
|
|
295
|
+
'video/jpm': string[];
|
|
296
|
+
'video/mj2': string[];
|
|
297
|
+
'video/mp2t': string[];
|
|
298
|
+
'video/mp4': string[];
|
|
299
|
+
'video/mpeg': string[];
|
|
300
|
+
'video/ogg': string[];
|
|
301
|
+
'video/quicktime': string[];
|
|
302
|
+
'video/webm': string[];
|
|
303
|
+
};
|
|
304
|
+
export declare const getMimeForFile: (file: string) => string;
|
|
305
|
+
//# sourceMappingURL=mime-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mime-types.d.ts","sourceRoot":"","sources":["../src/mime-types.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqUrB,CAAA;AAED,eAAO,MAAM,cAAc,SAAU,MAAM,WAM1C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mime-types.spec.d.ts","sourceRoot":"","sources":["../src/mime-types.spec.ts"],"names":[],"mappings":""}
|
|
@@ -10,12 +10,13 @@ export interface OnRequest {
|
|
|
10
10
|
req: IncomingMessage;
|
|
11
11
|
res: ServerResponse;
|
|
12
12
|
}
|
|
13
|
+
export interface ServerApi {
|
|
14
|
+
shouldExec: (options: OnRequest) => boolean;
|
|
15
|
+
onRequest: (options: OnRequest) => void;
|
|
16
|
+
}
|
|
13
17
|
export interface ServerRecord {
|
|
14
18
|
server: Server;
|
|
15
|
-
apis:
|
|
16
|
-
shouldExec: (options: OnRequest) => boolean;
|
|
17
|
-
onRequest: (options: OnRequest) => void;
|
|
18
|
-
}>;
|
|
19
|
+
apis: ServerApi[];
|
|
19
20
|
}
|
|
20
21
|
export declare class ServerManager implements Disposable {
|
|
21
22
|
static DEFAULT_HOST: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-manager.d.ts","sourceRoot":"","sources":["../src/server-manager.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,MAAM,EAAgB,MAAM,MAAM,CAAA;AAE3C,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,MAAM,CAAA;AAGtD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,eAAe,CAAA;IACpB,GAAG,EAAE,cAAc,CAAA;CACpB;AAED,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"server-manager.d.ts","sourceRoot":"","sources":["../src/server-manager.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,MAAM,EAAgB,MAAM,MAAM,CAAA;AAE3C,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,MAAM,CAAA;AAGtD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,eAAe,CAAA;IACpB,GAAG,EAAE,cAAc,CAAA;CACpB;AAED,MAAM,WAAW,SAAS;IACxB,UAAU,EAAE,CAAC,OAAO,EAAE,SAAS,KAAK,OAAO,CAAA;IAC3C,SAAS,EAAE,CAAC,OAAO,EAAE,SAAS,KAAK,IAAI,CAAA;CACxC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,SAAS,EAAE,CAAA;CAClB;AAED,qBACa,aAAc,YAAW,UAAU;IAC9C,OAAc,YAAY,SAAc;IAEjC,OAAO,4BAAkC;IAChD,OAAO,CAAC,aAAa,CAAoB;IAEzC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmB;IAE9C,OAAO,CAAC,UAAU,CAC0D;IAE5E,OAAO,CAAC,YAAY,CAGnB;IAEY,OAAO;IAmBP,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC;CA6BxE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { IncomingMessage, OutgoingHttpHeaders } from 'http';
|
|
3
|
+
export interface StaticServerOptions {
|
|
4
|
+
baseUrl: string;
|
|
5
|
+
path: string;
|
|
6
|
+
hostName?: string;
|
|
7
|
+
port: number;
|
|
8
|
+
fallback?: string;
|
|
9
|
+
headers?: OutgoingHttpHeaders;
|
|
10
|
+
}
|
|
11
|
+
export declare class StaticServerManager {
|
|
12
|
+
private readonly serverManager;
|
|
13
|
+
private sendFile;
|
|
14
|
+
shouldExec: (baseUrl: string) => ({ req }: {
|
|
15
|
+
req: Pick<IncomingMessage, 'url' | 'method'>;
|
|
16
|
+
}) => boolean;
|
|
17
|
+
private onRequest;
|
|
18
|
+
addStaticSite(options: StaticServerOptions): Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=static-server-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static-server-manager.d.ts","sourceRoot":"","sources":["../src/static-server-manager.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAkB,MAAM,MAAM,CAAA;AAK3E,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,mBAAmB,CAAA;CAC9B;AAED,qBACa,mBAAmB;IAE9B,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAgB;YAEhC,QAAQ;IAqBf,UAAU,YACL,MAAM;aACC,KAAK,eAAe,EAAE,KAAK,GAAG,QAAQ,CAAC;kBAK7C;IAEb,OAAO,CAAC,SAAS,CA0BhB;IAEY,aAAa,CAAC,OAAO,EAAE,mBAAmB;CAQxD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static-server-manager.spec.d.ts","sourceRoot":"","sources":["../src/static-server-manager.spec.ts"],"names":[],"mappings":""}
|