@vandenberghinc/volt 1.1.5 → 1.1.7
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/backend/dist/cjs/database.d.ts +41 -68
- package/backend/dist/cjs/database.js +127 -76
- package/backend/dist/cjs/endpoint.d.ts +23 -9
- package/backend/dist/cjs/endpoint.js +98 -21
- package/backend/dist/cjs/frontend.d.ts +0 -2
- package/backend/dist/cjs/frontend.js +9 -9
- package/backend/dist/cjs/image_endpoint.d.ts +3 -1
- package/backend/dist/cjs/image_endpoint.js +2 -1
- package/backend/dist/cjs/payments/paddle.js +10 -2
- package/backend/dist/cjs/plugins/css.d.ts +6 -5
- package/backend/dist/cjs/plugins/css.js +32 -7
- package/backend/dist/cjs/plugins/ts/compiler.d.ts +6 -1
- package/backend/dist/cjs/plugins/ts/compiler.js +26 -2
- package/backend/dist/cjs/plugins/ts/preprocessing.js +5 -3
- package/backend/dist/cjs/server.d.ts +7 -13
- package/backend/dist/cjs/server.js +184 -303
- package/backend/dist/cjs/status.d.ts +1 -0
- package/backend/dist/cjs/status.js +2 -1
- package/backend/dist/cjs/stream.d.ts +5 -3
- package/backend/dist/cjs/stream.js +13 -4
- package/backend/dist/cjs/users.d.ts +1 -1
- package/backend/dist/cjs/users.js +87 -72
- package/backend/dist/cjs/utils.d.ts +17 -9
- package/backend/dist/cjs/utils.js +22 -64
- package/backend/dist/cjs/view.d.ts +2 -2
- package/backend/dist/cjs/view.js +38 -40
- package/backend/dist/cjs/volt.d.ts +3 -2
- package/backend/dist/cjs/volt.js +2 -2
- package/backend/dist/css/volt.css +5 -0
- package/backend/dist/esm/database.d.ts +41 -68
- package/backend/dist/esm/database.js +127 -76
- package/backend/dist/esm/endpoint.d.ts +23 -9
- package/backend/dist/esm/endpoint.js +99 -22
- package/backend/dist/esm/frontend.d.ts +0 -2
- package/backend/dist/esm/frontend.js +9 -9
- package/backend/dist/esm/image_endpoint.d.ts +3 -1
- package/backend/dist/esm/image_endpoint.js +2 -1
- package/backend/dist/esm/payments/paddle.js +11 -3
- package/backend/dist/esm/plugins/css.d.ts +6 -5
- package/backend/dist/esm/plugins/css.js +32 -6
- package/backend/dist/esm/plugins/ts/compiler.d.ts +6 -1
- package/backend/dist/esm/plugins/ts/compiler.js +26 -2
- package/backend/dist/esm/plugins/ts/preprocessing.js +5 -3
- package/backend/dist/esm/server.d.ts +7 -13
- package/backend/dist/esm/server.js +182 -301
- package/backend/dist/esm/status.d.ts +1 -0
- package/backend/dist/esm/status.js +1 -0
- package/backend/dist/esm/stream.d.ts +5 -3
- package/backend/dist/esm/stream.js +13 -4
- package/backend/dist/esm/users.d.ts +1 -1
- package/backend/dist/esm/users.js +87 -72
- package/backend/dist/esm/utils.d.ts +17 -9
- package/backend/dist/esm/utils.js +21 -62
- package/backend/dist/esm/view.d.ts +2 -2
- package/backend/dist/esm/view.js +38 -40
- package/backend/dist/esm/volt.d.ts +3 -2
- package/backend/dist/esm/volt.js +2 -1
- package/backend/dist/esm-dev/blacklist.js +1 -1
- package/backend/dist/esm-dev/cli.js +2 -2
- package/backend/dist/esm-dev/database.d.ts +41 -68
- package/backend/dist/esm-dev/database.js +128 -77
- package/backend/dist/esm-dev/endpoint.d.ts +23 -9
- package/backend/dist/esm-dev/endpoint.js +100 -23
- package/backend/dist/esm-dev/file_watcher.js +1 -1
- package/backend/dist/esm-dev/frontend.d.ts +0 -2
- package/backend/dist/esm-dev/frontend.js +9 -9
- package/backend/dist/esm-dev/image_endpoint.d.ts +3 -1
- package/backend/dist/esm-dev/image_endpoint.js +2 -1
- package/backend/dist/esm-dev/logger.js +1 -1
- package/backend/dist/esm-dev/payments/paddle.js +12 -4
- package/backend/dist/esm-dev/plugins/css.d.ts +6 -5
- package/backend/dist/esm-dev/plugins/css.js +33 -7
- package/backend/dist/esm-dev/plugins/ts/compiler.d.ts +6 -1
- package/backend/dist/esm-dev/plugins/ts/compiler.js +27 -3
- package/backend/dist/esm-dev/plugins/ts/preprocessing.js +7 -5
- package/backend/dist/esm-dev/rate_limit.js +1 -1
- package/backend/dist/esm-dev/server.d.ts +7 -13
- package/backend/dist/esm-dev/server.js +184 -303
- package/backend/dist/esm-dev/status.d.ts +1 -0
- package/backend/dist/esm-dev/status.js +1 -0
- package/backend/dist/esm-dev/stream.d.ts +5 -3
- package/backend/dist/esm-dev/stream.js +13 -4
- package/backend/dist/esm-dev/users.d.ts +1 -1
- package/backend/dist/esm-dev/users.js +88 -73
- package/backend/dist/esm-dev/utils.d.ts +17 -9
- package/backend/dist/esm-dev/utils.js +22 -63
- package/backend/dist/esm-dev/view.d.ts +2 -2
- package/backend/dist/esm-dev/view.js +39 -41
- package/backend/dist/esm-dev/volt.d.ts +3 -2
- package/backend/dist/esm-dev/volt.js +2 -1
- package/backend/src/database.ts +163 -152
- package/backend/src/endpoint.ts +123 -31
- package/backend/src/frontend.ts +9 -8
- package/backend/src/image_endpoint.ts +4 -0
- package/backend/src/payments/paddle.ts +11 -3
- package/backend/src/plugins/css.ts +36 -8
- package/backend/src/plugins/ts/compiler.ts +37 -1
- package/backend/src/plugins/ts/preprocessing.ts +5 -3
- package/backend/src/server.ts +167 -306
- package/backend/src/status.ts +1 -0
- package/backend/src/stream.ts +28 -8
- package/backend/src/users.ts +87 -72
- package/backend/src/utils.ts +58 -25
- package/backend/src/view.ts +30 -28
- package/backend/src/{volt.js → volt.ts} +2 -1
- package/backend/tsconfig.cjs.json +3 -3
- package/backend/tsconfig.esm.json +3 -3
- package/frontend/dist/elements/base.d.ts +397 -415
- package/frontend/dist/elements/base.js +565 -328
- package/frontend/dist/elements/module.d.ts +26 -12
- package/frontend/dist/elements/module.js +69 -32
- package/frontend/dist/elements/register_element.d.ts +3 -0
- package/frontend/dist/elements/register_element.js +22 -0
- package/frontend/dist/modules/auth.d.ts +1 -0
- package/frontend/dist/modules/auth.js +6 -5
- package/frontend/dist/modules/color.d.ts +159 -0
- package/frontend/dist/modules/color.js +315 -0
- package/frontend/dist/modules/colors.d.ts +1 -26
- package/frontend/dist/modules/colors.js +417 -338
- package/frontend/dist/modules/cookies.d.ts +1 -0
- package/frontend/dist/modules/cookies.js +1 -0
- package/frontend/dist/modules/events.d.ts +1 -0
- package/frontend/dist/modules/events.js +1 -0
- package/frontend/dist/modules/google.d.ts +1 -0
- package/frontend/dist/modules/google.js +1 -0
- package/frontend/dist/modules/meta.d.ts +1 -0
- package/frontend/dist/modules/meta.js +1 -0
- package/frontend/dist/modules/mutex.d.ts +1 -2
- package/frontend/dist/modules/mutex.js +3 -4
- package/frontend/dist/modules/paddle.d.ts +1 -0
- package/frontend/dist/modules/paddle.js +14 -13
- package/frontend/dist/modules/scheme.d.ts +1 -0
- package/frontend/dist/modules/scheme.js +4 -2
- package/frontend/dist/modules/statics.d.ts +1 -0
- package/frontend/dist/modules/statics.js +1 -0
- package/frontend/dist/modules/support.d.ts +1 -0
- package/frontend/dist/modules/support.js +3 -2
- package/frontend/dist/modules/theme.d.ts +56 -0
- package/frontend/dist/{ui → modules}/theme.js +186 -75
- package/frontend/dist/modules/themes.d.ts +1 -1
- package/frontend/dist/modules/themes.js +1 -0
- package/frontend/dist/modules/user.d.ts +1 -0
- package/frontend/dist/modules/user.js +11 -10
- package/frontend/dist/modules/utils.d.ts +23 -2
- package/frontend/dist/modules/utils.js +93 -1
- package/frontend/dist/types/gradient.js +4 -0
- package/frontend/dist/ui/border_button.d.ts +0 -25
- package/frontend/dist/ui/border_button.js +50 -51
- package/frontend/dist/ui/button.d.ts +0 -21
- package/frontend/dist/ui/button.js +41 -46
- package/frontend/dist/ui/canvas.js +15 -15
- package/frontend/dist/ui/checkbox.d.ts +3 -17
- package/frontend/dist/ui/checkbox.js +36 -30
- package/frontend/dist/ui/code.d.ts +15 -82
- package/frontend/dist/ui/code.js +150 -125
- package/frontend/dist/ui/color.d.ts +0 -1
- package/frontend/dist/ui/color.js +1 -1
- package/frontend/dist/ui/context_menu.d.ts +4 -2
- package/frontend/dist/ui/context_menu.js +16 -17
- package/frontend/dist/ui/css.js +2 -0
- package/frontend/dist/ui/divider.d.ts +0 -7
- package/frontend/dist/ui/divider.js +21 -25
- package/frontend/dist/ui/dropdown.d.ts +13 -7
- package/frontend/dist/ui/dropdown.js +65 -30
- package/frontend/dist/ui/for_each.d.ts +0 -5
- package/frontend/dist/ui/for_each.js +17 -22
- package/frontend/dist/ui/form.d.ts +17 -12
- package/frontend/dist/ui/form.js +21 -18
- package/frontend/dist/ui/frame_modes.d.ts +9 -12
- package/frontend/dist/ui/frame_modes.js +8 -10
- package/frontend/dist/ui/google_map.d.ts +0 -11
- package/frontend/dist/ui/google_map.js +23 -28
- package/frontend/dist/ui/gradient.d.ts +0 -5
- package/frontend/dist/ui/gradient.js +17 -22
- package/frontend/dist/ui/image.d.ts +27 -58
- package/frontend/dist/ui/image.js +99 -93
- package/frontend/dist/ui/input.d.ts +20 -97
- package/frontend/dist/ui/input.js +192 -170
- package/frontend/dist/ui/link.d.ts +0 -18
- package/frontend/dist/ui/link.js +42 -48
- package/frontend/dist/ui/list.js +36 -37
- package/frontend/dist/ui/loader_button.d.ts +4 -19
- package/frontend/dist/ui/loader_button.js +35 -37
- package/frontend/dist/ui/loaders.d.ts +0 -8
- package/frontend/dist/ui/loaders.js +20 -25
- package/frontend/dist/ui/popup.d.ts +11 -8
- package/frontend/dist/ui/popup.js +183 -24
- package/frontend/dist/ui/pseudo.d.ts +3 -3
- package/frontend/dist/ui/pseudo.js +14 -17
- package/frontend/dist/ui/scroller.d.ts +10 -48
- package/frontend/dist/ui/scroller.js +306 -300
- package/frontend/dist/ui/slider.d.ts +9 -3
- package/frontend/dist/ui/slider.js +31 -17
- package/frontend/dist/ui/spacer.d.ts +0 -9
- package/frontend/dist/ui/spacer.js +21 -26
- package/frontend/dist/ui/span.js +13 -15
- package/frontend/dist/ui/stack.d.ts +14 -75
- package/frontend/dist/ui/stack.js +166 -169
- package/frontend/dist/ui/steps.d.ts +10 -23
- package/frontend/dist/ui/steps.js +47 -34
- package/frontend/dist/ui/style.d.ts +4 -3
- package/frontend/dist/ui/style.js +13 -18
- package/frontend/dist/ui/switch.d.ts +10 -4
- package/frontend/dist/ui/switch.js +24 -16
- package/frontend/dist/ui/table.d.ts +0 -23
- package/frontend/dist/ui/table.js +113 -119
- package/frontend/dist/ui/tabs.d.ts +3 -19
- package/frontend/dist/ui/tabs.js +35 -29
- package/frontend/dist/ui/text.d.ts +0 -8
- package/frontend/dist/ui/text.js +20 -25
- package/frontend/dist/ui/title.d.ts +0 -15
- package/frontend/dist/ui/title.js +39 -45
- package/frontend/dist/ui/ui.d.ts +0 -2
- package/frontend/dist/ui/ui.js +0 -2
- package/frontend/dist/ui/view.d.ts +3 -17
- package/frontend/dist/ui/view.js +27 -32
- package/frontend/dist/volt.d.ts +2 -1
- package/frontend/dist/volt.js +3 -1
- package/frontend/examples/dashboard/dashboard.ts +774 -0
- package/frontend/examples/theme/theme.ts +58 -0
- package/frontend/src/css/volt.css +5 -0
- package/frontend/src/elements/base.ts +767 -545
- package/frontend/src/elements/module.ts +90 -29
- package/frontend/src/elements/register_element.ts +24 -0
- package/frontend/src/modules/auth.ts +7 -6
- package/frontend/src/modules/color.ts +348 -0
- package/frontend/src/modules/colors.ts +468 -449
- package/frontend/src/modules/cookies.ts +1 -0
- package/frontend/src/modules/events.ts +1 -0
- package/frontend/src/modules/google.ts +1 -0
- package/frontend/src/modules/meta.ts +2 -1
- package/frontend/src/modules/mutex.ts +2 -4
- package/frontend/src/modules/paddle.ts +21 -20
- package/frontend/src/modules/scheme.ts +4 -3
- package/frontend/src/modules/statics.ts +2 -1
- package/frontend/src/modules/support.ts +3 -2
- package/frontend/src/modules/theme.ts +413 -0
- package/frontend/src/modules/themes.ts +2 -1
- package/frontend/src/modules/user.ts +12 -11
- package/frontend/src/modules/utils.ts +125 -2
- package/frontend/src/ui/border_button.ts +41 -37
- package/frontend/src/ui/button.ts +33 -32
- package/frontend/src/ui/canvas.ts +5 -2
- package/frontend/src/ui/checkbox.ts +21 -22
- package/frontend/src/ui/code.ts +92 -86
- package/frontend/src/ui/context_menu.ts +7 -5
- package/frontend/src/ui/css.ts +1 -1
- package/frontend/src/ui/divider.ts +15 -10
- package/frontend/src/ui/dropdown.ts +38 -21
- package/frontend/src/ui/for_each.ts +9 -8
- package/frontend/src/ui/form.ts +26 -21
- package/frontend/src/ui/frame_modes.ts +13 -17
- package/frontend/src/ui/google_map.ts +15 -13
- package/frontend/src/ui/gradient.ts +9 -8
- package/frontend/src/ui/image.ts +108 -86
- package/frontend/src/ui/input.ts +145 -144
- package/frontend/src/ui/link.ts +25 -23
- package/frontend/src/ui/list.ts +12 -6
- package/frontend/src/ui/loader_button.ts +26 -25
- package/frontend/src/ui/loaders.ts +12 -11
- package/frontend/src/ui/popup.ts +168 -14
- package/frontend/src/ui/pseudo.ts +5 -3
- package/frontend/src/ui/scroller.ts +303 -294
- package/frontend/src/ui/slider.ts +15 -10
- package/frontend/src/ui/spacer.ts +14 -11
- package/frontend/src/ui/span.ts +6 -2
- package/frontend/src/ui/stack.ts +196 -183
- package/frontend/src/ui/steps.ts +38 -22
- package/frontend/src/ui/style.ts +7 -4
- package/frontend/src/ui/switch.ts +16 -11
- package/frontend/src/ui/table.ts +42 -34
- package/frontend/src/ui/tabs.ts +20 -19
- package/frontend/src/ui/text.ts +12 -11
- package/frontend/src/ui/title.ts +22 -20
- package/frontend/src/ui/ui.ts +0 -2
- package/frontend/src/ui/view.ts +20 -19
- package/frontend/src/volt.ts +3 -1
- package/frontend/{compile.js → tools/compile.old.js} +2 -2
- package/frontend/tools/embed_scripts.js +69 -0
- package/frontend/tsconfig.json +26 -0
- package/package.json +8 -8
- package/frontend/dist/ui/theme.d.ts +0 -25
- package/frontend/exports.json +0 -1340
- package/frontend/src/modules/date.js +0 -535
- package/frontend/src/ui/color.ts +0 -117
- package/frontend/src/ui/theme.ts +0 -279
- /package/backend/src/{vinc.dev.js → vinc.dev.ts} +0 -0
|
@@ -123,6 +123,57 @@ const log_source = new logger_js_1.LogSource("Endpoint");
|
|
|
123
123
|
class Endpoint {
|
|
124
124
|
// Static attributes.
|
|
125
125
|
static rate_limits = new Map();
|
|
126
|
+
static compressed_content_types = [
|
|
127
|
+
// Image formats (often already compressed)
|
|
128
|
+
"image/jpeg",
|
|
129
|
+
"image/png",
|
|
130
|
+
"image/gif",
|
|
131
|
+
"image/webp",
|
|
132
|
+
"image/bmp",
|
|
133
|
+
"image/tiff",
|
|
134
|
+
"image/vnd.microsoft.icon", // ICO
|
|
135
|
+
// Audio formats (usually compressed)
|
|
136
|
+
"audio/mpeg", // MP3
|
|
137
|
+
"audio/mp3",
|
|
138
|
+
"audio/ogg",
|
|
139
|
+
"audio/wav",
|
|
140
|
+
"audio/x-wav",
|
|
141
|
+
"audio/flac",
|
|
142
|
+
"audio/aac",
|
|
143
|
+
"audio/midi",
|
|
144
|
+
// Video formats (typically compressed)
|
|
145
|
+
"video/mp4",
|
|
146
|
+
"video/mpeg",
|
|
147
|
+
"video/ogg",
|
|
148
|
+
"video/webm",
|
|
149
|
+
"video/x-msvideo", // AVI
|
|
150
|
+
"video/quicktime", // MOV
|
|
151
|
+
// Archive / Compressed file formats
|
|
152
|
+
"application/zip",
|
|
153
|
+
"application/x-7z-compressed",
|
|
154
|
+
"application/x-rar-compressed",
|
|
155
|
+
"application/x-tar",
|
|
156
|
+
"application/gzip",
|
|
157
|
+
"application/x-gzip",
|
|
158
|
+
"application/x-bzip",
|
|
159
|
+
"application/x-bzip2",
|
|
160
|
+
"application/x-xz",
|
|
161
|
+
// Documents that are usually compressed internally
|
|
162
|
+
"application/pdf",
|
|
163
|
+
"application/vnd.ms-powerpoint",
|
|
164
|
+
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
165
|
+
"application/vnd.ms-excel",
|
|
166
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
167
|
+
"application/msword",
|
|
168
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
169
|
+
// Font files
|
|
170
|
+
"font/woff",
|
|
171
|
+
"font/woff2",
|
|
172
|
+
"application/font-sfnt",
|
|
173
|
+
"application/vnd.ms-fontobject",
|
|
174
|
+
// Other binary data
|
|
175
|
+
"application/octet-stream",
|
|
176
|
+
];
|
|
126
177
|
// Instance attributes
|
|
127
178
|
method;
|
|
128
179
|
endpoint;
|
|
@@ -147,8 +198,11 @@ class Endpoint {
|
|
|
147
198
|
raw_data;
|
|
148
199
|
content_length;
|
|
149
200
|
is_image_endpoint;
|
|
150
|
-
|
|
151
|
-
|
|
201
|
+
_initialized = false;
|
|
202
|
+
_server;
|
|
203
|
+
constructor({ method = "GET", endpoint = "/", authenticated = false, rate_limit = null, params = null, callback = undefined, view = null, data = null, content_type, // = "text/plain",
|
|
204
|
+
compress = "auto", cache = true, ip_whitelist = null, sitemap = null, robots = null, _templates = {}, // only used in loading static files.
|
|
205
|
+
_path = null, _is_static = false, _server, }) {
|
|
152
206
|
// Attributes.
|
|
153
207
|
this.method = method;
|
|
154
208
|
this.endpoint = endpoint;
|
|
@@ -159,7 +213,6 @@ class Endpoint {
|
|
|
159
213
|
}
|
|
160
214
|
this.data = data;
|
|
161
215
|
this.content_type = content_type;
|
|
162
|
-
this.compress = compress !== false;
|
|
163
216
|
this.cache = cache;
|
|
164
217
|
this.sitemap = sitemap;
|
|
165
218
|
this.robots = robots;
|
|
@@ -180,6 +233,19 @@ class Endpoint {
|
|
|
180
233
|
if (typeof this.endpoint === "string") {
|
|
181
234
|
this.endpoint = utils_js_1.Utils.clean_endpoint(this.endpoint);
|
|
182
235
|
}
|
|
236
|
+
// Set compress.
|
|
237
|
+
if (compress === "auto" || typeof compress !== "boolean") {
|
|
238
|
+
compress = Endpoint.compressed_content_types.includes(this.content_type ?? "");
|
|
239
|
+
}
|
|
240
|
+
else if (compress === true && this.content_type != null && Endpoint.compressed_content_types.includes(this.content_type)) {
|
|
241
|
+
logger_js_1.logger.warn(1, log_source, `Overriding parameter "compress", disabling compression of endpoint ${this.endpoint}.`);
|
|
242
|
+
compress = false;
|
|
243
|
+
}
|
|
244
|
+
this.compress = compress;
|
|
245
|
+
this.compress = false;
|
|
246
|
+
if (this.compress) {
|
|
247
|
+
console.log(">>> compress", { endpoint: this.endpoint, content_type: this.content_type });
|
|
248
|
+
}
|
|
183
249
|
// Argument `view` may also be passed as an object instead of class View.
|
|
184
250
|
if (view == null) {
|
|
185
251
|
this.view = null;
|
|
@@ -221,6 +287,12 @@ class Endpoint {
|
|
|
221
287
|
}
|
|
222
288
|
// The endpoint parent for params verification.
|
|
223
289
|
this._verify_params_parent = this.method + ":" + this.endpoint + ":";
|
|
290
|
+
// Initialize.
|
|
291
|
+
this._server = _server;
|
|
292
|
+
// Initialize html.
|
|
293
|
+
if (this.view != null) {
|
|
294
|
+
this.view._initialize(_server, this);
|
|
295
|
+
}
|
|
224
296
|
}
|
|
225
297
|
// Load data by path.
|
|
226
298
|
_load_data_by_path(server) {
|
|
@@ -285,28 +357,33 @@ class Endpoint {
|
|
|
285
357
|
}
|
|
286
358
|
}
|
|
287
359
|
// Initialize.
|
|
288
|
-
async
|
|
360
|
+
async _dynamic_initialize() {
|
|
361
|
+
if (!this._server) {
|
|
362
|
+
throw new Error(`Endpoint "${this.method}:${this.endpoint}" is not initialized by the server yet.`);
|
|
363
|
+
}
|
|
289
364
|
// Build html code of view.
|
|
290
365
|
if (this.view != null) {
|
|
291
|
-
this.view._initialize(server, this);
|
|
292
366
|
await this.view._build_html();
|
|
293
367
|
}
|
|
294
368
|
// Compression enabled.
|
|
295
|
-
if (
|
|
369
|
+
if (this._server.production && this.callback == null && this.compress) {
|
|
296
370
|
this._is_compressed = true;
|
|
297
371
|
if (this.data != null) {
|
|
298
372
|
this.raw_data = this.data;
|
|
299
373
|
this.data = zlib_1.default.gzipSync(this.data, { level: zlib_1.default.constants.Z_BEST_COMPRESSION });
|
|
374
|
+
this.content_length = this.data.length;
|
|
300
375
|
}
|
|
301
376
|
else if (this.view != null) {
|
|
302
377
|
this.view.raw_html = this.view.html;
|
|
303
378
|
this.view.html = zlib_1.default.gzipSync(this.view.html, { level: zlib_1.default.constants.Z_BEST_COMPRESSION });
|
|
379
|
+
this.content_length = this.view.html.length;
|
|
304
380
|
}
|
|
381
|
+
console.log(">>> Compressed - content_length:", this.content_length);
|
|
305
382
|
}
|
|
306
383
|
// Set cache headers.
|
|
307
|
-
if (!
|
|
308
|
-
|
|
309
|
-
}
|
|
384
|
+
// if (!this._server.production) {
|
|
385
|
+
this.cache = false; // @todo @tmp
|
|
386
|
+
// }
|
|
310
387
|
if ((this.callback == null || this.is_image_endpoint) && (typeof this.cache === "number" || this.cache === true)) {
|
|
311
388
|
if (this.cache === 1 || this.cache === true) {
|
|
312
389
|
this.headers.push(["Cache-Control", "max-age=86400"]);
|
|
@@ -328,9 +405,16 @@ class Endpoint {
|
|
|
328
405
|
if (this.content_type != null) {
|
|
329
406
|
this.headers.push(["Content-Type", this.content_type]);
|
|
330
407
|
}
|
|
408
|
+
if (this._is_compressed) {
|
|
409
|
+
console.log("Compressed headers:", this.headers);
|
|
410
|
+
}
|
|
411
|
+
this._initialized = true;
|
|
331
412
|
}
|
|
332
413
|
// Serve a client.
|
|
333
414
|
async _serve(stream, status_code = 200) {
|
|
415
|
+
if (!this._initialized) {
|
|
416
|
+
await this._dynamic_initialize();
|
|
417
|
+
}
|
|
334
418
|
try {
|
|
335
419
|
// Check IP whitelist.
|
|
336
420
|
if (this.ip_whitelist && !this.ip_whitelist.includes(stream.ip)) {
|
|
@@ -377,22 +461,15 @@ class Endpoint {
|
|
|
377
461
|
}
|
|
378
462
|
}
|
|
379
463
|
catch (err) {
|
|
380
|
-
if (err instanceof utils_js_1.
|
|
381
|
-
|
|
382
|
-
if (err.data != null && typeof err.data === "object") {
|
|
383
|
-
Object.assign(data, err.data);
|
|
384
|
-
}
|
|
385
|
-
stream.send({
|
|
386
|
-
status: err.status != null ? err.status : status_js_1.Status.internal_server_error,
|
|
387
|
-
headers: { "Content-Type": "application/json" },
|
|
388
|
-
data,
|
|
389
|
-
});
|
|
464
|
+
if (err instanceof utils_js_1.APIError) {
|
|
465
|
+
err.serve(stream);
|
|
390
466
|
}
|
|
391
467
|
else {
|
|
392
|
-
stream.
|
|
468
|
+
stream.error({
|
|
393
469
|
status: status_js_1.Status.internal_server_error,
|
|
394
470
|
headers: { "Content-Type": "application/json" },
|
|
395
|
-
|
|
471
|
+
message: "Internal Server Error",
|
|
472
|
+
type: "InternalServerError",
|
|
396
473
|
});
|
|
397
474
|
}
|
|
398
475
|
logger_js_1.logger.error(log_source, `${this.method}:${this.endpoint}: `, err); // after sending the response since this edits the error.
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Frontend = exports.web_exports = void 0;
|
|
4
|
-
const _vinc_1 = require("./vinc.js");
|
|
5
4
|
// Get the directory name of the current module
|
|
6
5
|
const url_1 = require("url");
|
|
7
6
|
const path_1 = require("path");
|
|
@@ -13,14 +12,15 @@ exports.web_exports = {
|
|
|
13
12
|
};
|
|
14
13
|
exports.Frontend = {
|
|
15
14
|
// Load frontend globals.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
// @deprecated
|
|
16
|
+
// async load_globals(): Promise<string[]> {
|
|
17
|
+
// const data: { [key: string]: string[] } = await (new vlib.Path(`${__dirname}/../../../frontend/exports.json`).load());
|
|
18
|
+
// return Object.values(data).flat();
|
|
19
|
+
// },
|
|
20
|
+
// load_globals_sync(): string[] {
|
|
21
|
+
// const data: { [key: string]: string[] } = new vlib.Path(`${__dirname}/../../../frontend/exports.json`).load_sync();
|
|
22
|
+
// return Object.values(data).flat();
|
|
23
|
+
// },
|
|
24
24
|
// Path to css files.
|
|
25
25
|
css: {
|
|
26
26
|
adyen: __dirname + "../../../../frontend/src/css/adyen.css",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { vlib } from "./vinc.js";
|
|
2
2
|
import { Endpoint } from "./endpoint.js";
|
|
3
3
|
import { RateLimitGroup } from "./rate_limit.js";
|
|
4
|
+
import type { Server } from "./server.js";
|
|
4
5
|
declare class ImageEndpoint extends Endpoint implements Endpoint {
|
|
5
6
|
static cache_in_memory: boolean;
|
|
6
7
|
static supported_images: string[];
|
|
@@ -9,13 +10,14 @@ declare class ImageEndpoint extends Endpoint implements Endpoint {
|
|
|
9
10
|
private i_data?;
|
|
10
11
|
private i_cache;
|
|
11
12
|
is_image_endpoint: boolean;
|
|
12
|
-
constructor({ endpoint, path, content_type, cache, _is_static, rate_limit, }: {
|
|
13
|
+
constructor({ endpoint, path, content_type, cache, _is_static, rate_limit, _server, }: {
|
|
13
14
|
endpoint: string;
|
|
14
15
|
path: vlib.Path;
|
|
15
16
|
content_type: string;
|
|
16
17
|
cache?: boolean | number;
|
|
17
18
|
_is_static?: boolean;
|
|
18
19
|
rate_limit?: string | RateLimitGroup;
|
|
20
|
+
_server: Server;
|
|
19
21
|
});
|
|
20
22
|
transform(type?: string | null, width?: number | string | null, height?: number | string | null, aspect_ratio?: string | boolean | null): Promise<Buffer>;
|
|
21
23
|
get_aspect_ratio(): Promise<string | null>;
|
|
@@ -51,7 +51,7 @@ class ImageEndpoint extends endpoint_js_1.Endpoint {
|
|
|
51
51
|
i_data;
|
|
52
52
|
i_cache;
|
|
53
53
|
is_image_endpoint;
|
|
54
|
-
constructor({ endpoint, path, content_type, cache = true, _is_static = true, rate_limit = undefined, }) {
|
|
54
|
+
constructor({ endpoint, path, content_type, cache = true, _is_static = true, rate_limit = undefined, _server, }) {
|
|
55
55
|
// Initialize base.
|
|
56
56
|
super({
|
|
57
57
|
method: "GET",
|
|
@@ -68,6 +68,7 @@ class ImageEndpoint extends endpoint_js_1.Endpoint {
|
|
|
68
68
|
rate_limit,
|
|
69
69
|
_path: path.str(),
|
|
70
70
|
_is_static,
|
|
71
|
+
_server,
|
|
71
72
|
});
|
|
72
73
|
// Attributes.
|
|
73
74
|
this.i_path = path.abs();
|
|
@@ -624,7 +624,11 @@ class Paddle {
|
|
|
624
624
|
}
|
|
625
625
|
// Cancel.
|
|
626
626
|
if (subscription.status !== "active") {
|
|
627
|
-
throw new utils_js_1.
|
|
627
|
+
throw new utils_js_1.APIError({
|
|
628
|
+
type: "NoActiveSubscriptionError",
|
|
629
|
+
message: `This subscription is already cancelled and will become inactive at the end of the billing period.`,
|
|
630
|
+
status: status_js_1.Status.bad_request,
|
|
631
|
+
});
|
|
628
632
|
}
|
|
629
633
|
await this._req("POST", `/subscriptions/${subscription.id}/cancel`, {
|
|
630
634
|
effective_from: immediate ? "immediately" : null,
|
|
@@ -1986,7 +1990,11 @@ class Paddle {
|
|
|
1986
1990
|
}
|
|
1987
1991
|
});
|
|
1988
1992
|
if (_throw_no_cancelled_err && cancelled.length === 0) {
|
|
1989
|
-
throw new utils_js_1.
|
|
1993
|
+
throw new utils_js_1.APIError({
|
|
1994
|
+
type: "NoCancellableSubscriptions",
|
|
1995
|
+
message: "No cancellable subscriptions found.",
|
|
1996
|
+
status: status_js_1.Status.bad_request,
|
|
1997
|
+
});
|
|
1990
1998
|
}
|
|
1991
1999
|
}
|
|
1992
2000
|
// Cancel subscription by subscription id.
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
export declare namespace CSS {
|
|
2
|
+
function minify(data: string): string;
|
|
3
|
+
function bundle({ data, paths, minify, output, postprocess, log_level, }: {
|
|
4
4
|
data: string;
|
|
5
5
|
paths?: string[];
|
|
6
6
|
minify?: boolean;
|
|
7
|
-
output?: string;
|
|
7
|
+
output?: string | string[];
|
|
8
|
+
postprocess?: undefined | ((data: string) => string | Promise<string>);
|
|
9
|
+
log_level?: number;
|
|
8
10
|
}): Promise<string>;
|
|
9
11
|
}
|
|
10
|
-
export default CSS;
|
|
@@ -15,7 +15,8 @@ const _vinc_1 = require("../vinc.js");
|
|
|
15
15
|
// ---------------------------------------------------------
|
|
16
16
|
// CSS utils.
|
|
17
17
|
// Implementation
|
|
18
|
-
|
|
18
|
+
var CSS;
|
|
19
|
+
(function (CSS) {
|
|
19
20
|
/* @docs:
|
|
20
21
|
@nav: Backend
|
|
21
22
|
@title: Minify
|
|
@@ -29,9 +30,10 @@ class CSS {
|
|
|
29
30
|
@descr: The css data.
|
|
30
31
|
@type: string
|
|
31
32
|
*/
|
|
32
|
-
|
|
33
|
+
function minify(data) {
|
|
33
34
|
return new clean_css_1.default().minify(data).styles;
|
|
34
35
|
}
|
|
36
|
+
CSS.minify = minify;
|
|
35
37
|
/* @docs:
|
|
36
38
|
@nav: Backend
|
|
37
39
|
@title: Bundle
|
|
@@ -48,9 +50,10 @@ class CSS {
|
|
|
48
50
|
@descr: The css data.
|
|
49
51
|
@type: string
|
|
50
52
|
*/
|
|
51
|
-
|
|
53
|
+
async function bundle({ data, paths = undefined, minify = false, output = undefined, postprocess = undefined, log_level = 0, }) {
|
|
52
54
|
// Load via paths.
|
|
53
55
|
if (paths !== undefined) {
|
|
56
|
+
data = "";
|
|
54
57
|
for (const path of paths) {
|
|
55
58
|
data += await new _vinc_1.vlib.Path(path).load();
|
|
56
59
|
}
|
|
@@ -59,13 +62,35 @@ class CSS {
|
|
|
59
62
|
if (minify) {
|
|
60
63
|
data = CSS.minify(data);
|
|
61
64
|
}
|
|
65
|
+
// Postprocess.
|
|
66
|
+
if (typeof postprocess === "function") {
|
|
67
|
+
const res = postprocess(data);
|
|
68
|
+
if (res instanceof Promise) {
|
|
69
|
+
data = await res;
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
data = res;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
62
75
|
// Save.
|
|
63
|
-
if (output) {
|
|
76
|
+
if (typeof output === "string") {
|
|
64
77
|
await new _vinc_1.vlib.Path(output).save(data);
|
|
65
78
|
}
|
|
79
|
+
else if (Array.isArray(output)) {
|
|
80
|
+
for (let i = 0; i < output.length; i++) {
|
|
81
|
+
await new _vinc_1.vlib.Path(output[i]).save(data);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
// Logs.
|
|
85
|
+
if (log_level >= 1) {
|
|
86
|
+
const first_path = typeof output === "string" ? output : (Array.isArray(output) ? output[0] : undefined);
|
|
87
|
+
if (first_path != null) {
|
|
88
|
+
const p = new _vinc_1.vlib.Path(first_path);
|
|
89
|
+
_vinc_1.vlib.Utils.print_marker(`Bundled ${p.name()} (${p.str()}) [${_vinc_1.vlib.Utils.format_bytes(p.size)}].`);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
66
92
|
// Return.
|
|
67
93
|
return data;
|
|
68
94
|
}
|
|
69
|
-
|
|
70
|
-
exports.CSS = CSS;
|
|
71
|
-
exports.default = CSS;
|
|
95
|
+
CSS.bundle = bundle;
|
|
96
|
+
})(CSS || (exports.CSS = CSS = {}));
|
|
@@ -60,7 +60,7 @@ export declare function compile(options: CompileOptions): Promise<CompileResult>
|
|
|
60
60
|
*/
|
|
61
61
|
export interface BundleOptions {
|
|
62
62
|
include?: string[];
|
|
63
|
-
output?: string;
|
|
63
|
+
output?: string | string[];
|
|
64
64
|
entry_paths?: string[];
|
|
65
65
|
error_limit?: number;
|
|
66
66
|
/**
|
|
@@ -85,6 +85,8 @@ export interface BundleOptions {
|
|
|
85
85
|
* Enable or disable tree shaking.
|
|
86
86
|
*/
|
|
87
87
|
tree_shaking?: boolean;
|
|
88
|
+
/** External library names not to be included in the bundle */
|
|
89
|
+
externals?: string[];
|
|
88
90
|
/**
|
|
89
91
|
* Enable or disable debug console statements.
|
|
90
92
|
*/
|
|
@@ -100,6 +102,9 @@ export interface BundleOptions {
|
|
|
100
102
|
*/
|
|
101
103
|
bundler?: 'esbuild' | 'rollup';
|
|
102
104
|
opts?: any;
|
|
105
|
+
postprocess?: undefined | ((data: string) => string | Promise<string>);
|
|
106
|
+
/** Log level (default is 0) */
|
|
107
|
+
log_level?: number;
|
|
103
108
|
}
|
|
104
109
|
/**
|
|
105
110
|
* Result of the bundling process.
|
|
@@ -654,8 +654,8 @@ const format_esbuild_warning_error = (warning) => {
|
|
|
654
654
|
*/
|
|
655
655
|
async function bundle(options) {
|
|
656
656
|
// console.log(">>> BUNDLE", options)
|
|
657
|
-
let { entry_paths = [], include = [], output = undefined, platform = 'browser', format = 'iife', target = 'es2021', minify = false, sourcemap = false, // 'inline'
|
|
658
|
-
error_limit = 25, extract_inputs = false, tree_shaking = undefined, debug = false, bundler = "esbuild", opts = {},
|
|
657
|
+
let { entry_paths = [], include = [], externals = [], output = undefined, platform = 'browser', format = 'iife', target = 'es2021', minify = false, sourcemap = false, // 'inline'
|
|
658
|
+
error_limit = 25, extract_inputs = false, tree_shaking = undefined, debug = false, bundler = "esbuild", opts = {}, postprocess = undefined, log_level = 0,
|
|
659
659
|
// bundler = "rollup",
|
|
660
660
|
} = options;
|
|
661
661
|
if (entry_paths.length > 0) {
|
|
@@ -685,6 +685,7 @@ async function bundle(options) {
|
|
|
685
685
|
// minifyWhitespace: false,
|
|
686
686
|
// minifySyntax: false,
|
|
687
687
|
// minifyIdentifiers: false,
|
|
688
|
+
external: externals,
|
|
688
689
|
...opts,
|
|
689
690
|
});
|
|
690
691
|
if (result.errors.length > 0) {
|
|
@@ -820,10 +821,33 @@ async function bundle(options) {
|
|
|
820
821
|
// throw new Error(`Rollup bundling failed: ${err.message || err}`);
|
|
821
822
|
}
|
|
822
823
|
}
|
|
824
|
+
// Postprocess.
|
|
825
|
+
if (bundled_code && typeof postprocess === "function") {
|
|
826
|
+
const res = postprocess(bundled_code);
|
|
827
|
+
if (res instanceof Promise) {
|
|
828
|
+
bundled_code = await res;
|
|
829
|
+
}
|
|
830
|
+
else {
|
|
831
|
+
bundled_code = res;
|
|
832
|
+
}
|
|
833
|
+
}
|
|
823
834
|
// Write to file.
|
|
824
835
|
if (typeof output === "string") {
|
|
825
836
|
await new _vinc_1.vlib.Path(output).save(bundled_code ?? "");
|
|
826
837
|
}
|
|
838
|
+
else if (Array.isArray(output)) {
|
|
839
|
+
for (let i = 0; i < output.length; i++) {
|
|
840
|
+
await new _vinc_1.vlib.Path(output[i]).save(bundled_code ?? "");
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
// Logs.
|
|
844
|
+
if (log_level >= 1) {
|
|
845
|
+
const first_path = typeof output === "string" ? output : (Array.isArray(output) ? output[0] : undefined);
|
|
846
|
+
if (first_path != null) {
|
|
847
|
+
const p = new _vinc_1.vlib.Path(first_path);
|
|
848
|
+
_vinc_1.vlib.Utils.print_marker(`Bundled ${p.name()} (${p.str()}) [${_vinc_1.vlib.Utils.format_bytes(p.size)}].`);
|
|
849
|
+
}
|
|
850
|
+
}
|
|
827
851
|
return {
|
|
828
852
|
code: bundled_code,
|
|
829
853
|
source_map: bundled_source_map,
|
|
@@ -536,9 +536,11 @@ let volt_exports = undefined;
|
|
|
536
536
|
function detect_unused_imports(source_file) {
|
|
537
537
|
// Load volt exports.
|
|
538
538
|
if (volt_exports === undefined) {
|
|
539
|
-
volt_exports =
|
|
540
|
-
|
|
541
|
-
volt_exports
|
|
539
|
+
volt_exports = {};
|
|
540
|
+
// @deprecated.
|
|
541
|
+
// volt_exports = new vlib.Path(`${__dirname}/../../../../../frontend/exports.json`).load_sync({type: "object"}) as Record<string, string[]>;
|
|
542
|
+
// volt_exports["ui/ui.ts"] = ["VoltUI"];
|
|
543
|
+
// volt_exports["volt.ts"] = ["Volt"];
|
|
542
544
|
}
|
|
543
545
|
// Vars.
|
|
544
546
|
// const source_file = ts.createSourceFile(file_path, file_content, ts.ScriptTarget.Latest, true);
|
|
@@ -7,13 +7,12 @@ import * as Mail from './plugins/mail.js';
|
|
|
7
7
|
import { Status } from "./status.js";
|
|
8
8
|
import { Endpoint, EndpointOptions } from "./endpoint.js";
|
|
9
9
|
import { Database, Collection } from "./database.js";
|
|
10
|
-
import { StaticFileWatcher
|
|
10
|
+
import { /*StaticFileWatcher,*/ FileWatcher } from "./file_watcher.js";
|
|
11
11
|
import { Users } from "./users.js";
|
|
12
12
|
import { Paddle } from "./payments/paddle.js";
|
|
13
13
|
import { RateLimits, RateLimitServer, RateLimitClient } from "./rate_limit.js";
|
|
14
14
|
import { Blacklist } from "./blacklist.js";
|
|
15
15
|
import logger, { LogSource } from "./logger.js";
|
|
16
|
-
import { BrowserPreview } from "./plugins/browser.js";
|
|
17
16
|
declare global {
|
|
18
17
|
type none = null | undefined;
|
|
19
18
|
}
|
|
@@ -110,6 +109,7 @@ export declare class Server {
|
|
|
110
109
|
token_expiration: number;
|
|
111
110
|
google_tag?: string;
|
|
112
111
|
production: boolean;
|
|
112
|
+
localhost: boolean;
|
|
113
113
|
multiprocessing: boolean;
|
|
114
114
|
processes: number;
|
|
115
115
|
company: CompanyInfo;
|
|
@@ -122,8 +122,7 @@ export declare class Server {
|
|
|
122
122
|
log_level: number;
|
|
123
123
|
tls?: TLSConfig;
|
|
124
124
|
file_watcher?: FileWatcher;
|
|
125
|
-
|
|
126
|
-
ts: TypeScriptConfig;
|
|
125
|
+
lightweight: boolean;
|
|
127
126
|
performance: vlib.Performance;
|
|
128
127
|
csp: Record<string, string>;
|
|
129
128
|
default_headers: Record<string, string>;
|
|
@@ -142,8 +141,6 @@ export declare class Server {
|
|
|
142
141
|
keys: Record<string, string>;
|
|
143
142
|
private _on_start;
|
|
144
143
|
private _on_stop;
|
|
145
|
-
browser_preview?: BrowserPreview;
|
|
146
|
-
static_file_watcher: StaticFileWatcher;
|
|
147
144
|
is_file_watcher: boolean;
|
|
148
145
|
daemon?: vlib.Daemon;
|
|
149
146
|
private _stop_tscompiler_watcher?;
|
|
@@ -152,7 +149,7 @@ export declare class Server {
|
|
|
152
149
|
status: typeof Status;
|
|
153
150
|
rate_limits: typeof RateLimits;
|
|
154
151
|
logger: typeof logger;
|
|
155
|
-
constructor({ ip, port, domain, is_primary, source, database, statics, favicon, company, meta, tls, smtp, mail_style, rate_limit, keys, payments, default_headers, google_tag, token_expiration, enable_2fa, enable_account_activation, production, multiprocessing, processes, file_watcher, offline, additional_sitemap_endpoints, log_level, daemon,
|
|
152
|
+
constructor({ ip, port, domain, is_primary, source, database, statics, favicon, company, meta, tls, smtp, mail_style, rate_limit, keys, payments, default_headers, google_tag, token_expiration, enable_2fa, enable_account_activation, production, localhost, multiprocessing, processes, file_watcher, offline, additional_sitemap_endpoints, log_level, daemon, lightweight, }: {
|
|
156
153
|
ip?: string;
|
|
157
154
|
port?: number;
|
|
158
155
|
domain: string;
|
|
@@ -166,7 +163,7 @@ export declare class Server {
|
|
|
166
163
|
tls?: TLSConfig;
|
|
167
164
|
smtp?: nodemailer.TransportOptions;
|
|
168
165
|
mail_style?: Partial<MailStyle>;
|
|
169
|
-
rate_limit?: RateLimitConfig;
|
|
166
|
+
rate_limit?: false | RateLimitConfig;
|
|
170
167
|
keys?: Array<string | {
|
|
171
168
|
name: string;
|
|
172
169
|
length: number;
|
|
@@ -178,6 +175,7 @@ export declare class Server {
|
|
|
178
175
|
enable_2fa?: boolean;
|
|
179
176
|
enable_account_activation?: boolean;
|
|
180
177
|
production?: boolean;
|
|
178
|
+
localhost?: boolean;
|
|
181
179
|
multiprocessing?: boolean;
|
|
182
180
|
processes?: number | null;
|
|
183
181
|
file_watcher?: FileWatcher | Record<string, any> | boolean;
|
|
@@ -185,9 +183,7 @@ export declare class Server {
|
|
|
185
183
|
additional_sitemap_endpoints?: string[];
|
|
186
184
|
log_level?: number;
|
|
187
185
|
daemon?: Record<string, any> | boolean;
|
|
188
|
-
|
|
189
|
-
ts?: Partial<TypeScriptConfig>;
|
|
190
|
-
browser_preview?: string;
|
|
186
|
+
lightweight?: boolean;
|
|
191
187
|
});
|
|
192
188
|
get_content_type(extension: string): string;
|
|
193
189
|
set_log_level(level: number): void;
|
|
@@ -201,9 +197,7 @@ export declare class Server {
|
|
|
201
197
|
private _create_default_endpoints;
|
|
202
198
|
private _create_sitemap;
|
|
203
199
|
private _create_robots_txt;
|
|
204
|
-
private _create_admin_endpoint;
|
|
205
200
|
private _initialize_statics;
|
|
206
|
-
_init_ts(): Promise<void>;
|
|
207
201
|
initialize(): Promise<void>;
|
|
208
202
|
_serve(http2_stream?: http2.ServerHttp2Stream, headers?: Record<string, string>, req?: http.IncomingMessage | http2.Http2ServerRequest, res?: http.ServerResponse | http2.Http2ServerResponse): Promise<void>;
|
|
209
203
|
start(): Promise<void>;
|