@axium/server 0.12.1 → 0.12.4
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/build/client/_app/immutable/assets/3.KnidqurY.css +1 -0
- package/build/client/_app/immutable/assets/3.KnidqurY.css.br +0 -0
- package/build/client/_app/immutable/assets/3.KnidqurY.css.gz +0 -0
- package/build/client/_app/immutable/assets/FormDialog.Cbakz6hh.css +1 -0
- package/build/client/_app/immutable/assets/FormDialog.Cbakz6hh.css.br +0 -0
- package/build/client/_app/immutable/assets/FormDialog.Cbakz6hh.css.gz +0 -0
- package/build/client/_app/immutable/assets/_page.FMqx8A_G.css +1 -0
- package/build/client/_app/immutable/assets/_page.FMqx8A_G.css.br +0 -0
- package/build/client/_app/immutable/assets/_page.FMqx8A_G.css.gz +0 -0
- package/build/client/_app/immutable/assets/user.Cbakz6hh.css +1 -0
- package/build/client/_app/immutable/assets/user.Cbakz6hh.css.br +0 -0
- package/build/client/_app/immutable/assets/user.Cbakz6hh.css.gz +0 -0
- package/build/client/_app/immutable/chunks/BuQsdvxH.js +1 -0
- package/build/client/_app/immutable/chunks/BuQsdvxH.js.br +0 -0
- package/build/client/_app/immutable/chunks/BuQsdvxH.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CWj6FrbW.js +1 -0
- package/build/client/_app/immutable/chunks/CWj6FrbW.js.br +0 -0
- package/build/client/_app/immutable/chunks/CWj6FrbW.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D5yCkbIu.js +1 -0
- package/build/client/_app/immutable/chunks/D5yCkbIu.js.br +0 -0
- package/build/client/_app/immutable/chunks/D5yCkbIu.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DOVJ9LQt.js +1 -0
- package/build/client/_app/immutable/chunks/DOVJ9LQt.js.br +0 -0
- package/build/client/_app/immutable/chunks/DOVJ9LQt.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DdlABs80.js +3 -0
- package/build/client/_app/immutable/chunks/DdlABs80.js.br +0 -0
- package/build/client/_app/immutable/chunks/DdlABs80.js.gz +0 -0
- package/build/client/_app/immutable/chunks/UmPEH60o.js +1 -0
- package/build/client/_app/immutable/chunks/UmPEH60o.js.br +1 -0
- package/build/client/_app/immutable/chunks/UmPEH60o.js.gz +0 -0
- package/build/client/_app/immutable/chunks/XS99-ehg.js +32 -0
- package/build/client/_app/immutable/chunks/XS99-ehg.js.br +0 -0
- package/build/client/_app/immutable/chunks/XS99-ehg.js.gz +0 -0
- package/build/client/_app/immutable/chunks/nXp3Dhop.js +1 -0
- package/build/client/_app/immutable/chunks/nXp3Dhop.js.br +0 -0
- package/build/client/_app/immutable/chunks/nXp3Dhop.js.gz +0 -0
- package/build/client/_app/immutable/chunks/sBvhjZvA.js +2 -0
- package/build/client/_app/immutable/chunks/sBvhjZvA.js.br +0 -0
- package/build/client/_app/immutable/chunks/sBvhjZvA.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.B8Fn8nhy.js +2 -0
- package/build/client/_app/immutable/entry/app.B8Fn8nhy.js.br +0 -0
- package/build/client/_app/immutable/entry/app.B8Fn8nhy.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.D25rwj7x.js +1 -0
- package/build/client/_app/immutable/entry/start.D25rwj7x.js.br +2 -0
- package/build/client/_app/immutable/entry/start.D25rwj7x.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.qBSjDH9J.js +1 -0
- package/build/client/_app/immutable/nodes/0.qBSjDH9J.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.qBSjDH9J.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.xGMYh02A.js +1 -0
- package/build/client/_app/immutable/nodes/1.xGMYh02A.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.xGMYh02A.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.UKc0Z14i.js +1 -0
- package/build/client/_app/immutable/nodes/2.UKc0Z14i.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.UKc0Z14i.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.B-dYETEY.js +1 -0
- package/build/client/_app/immutable/nodes/3.B-dYETEY.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.B-dYETEY.js.gz +0 -0
- package/build/client/_app/immutable/nodes/4.DiJNTRdN.js +1 -0
- package/build/client/_app/immutable/nodes/4.DiJNTRdN.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.DiJNTRdN.js.gz +0 -0
- package/build/client/_app/immutable/nodes/5.CikYDQCG.js +1 -0
- package/build/client/_app/immutable/nodes/5.CikYDQCG.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.CikYDQCG.js.gz +0 -0
- package/build/client/_app/immutable/nodes/6.B-xpcmEc.js +1 -0
- package/build/client/_app/immutable/nodes/6.B-xpcmEc.js.br +4 -0
- package/build/client/_app/immutable/nodes/6.B-xpcmEc.js.gz +0 -0
- package/build/client/_app/version.json +1 -0
- package/build/client/_app/version.json.br +0 -0
- package/build/client/_app/version.json.gz +0 -0
- package/build/client/icons/brands.svg +1493 -0
- package/build/client/icons/brands.svg.br +0 -0
- package/build/client/icons/brands.svg.gz +0 -0
- package/build/client/icons/light.svg +9977 -0
- package/build/client/icons/light.svg.br +0 -0
- package/build/client/icons/light.svg.gz +0 -0
- package/build/client/icons/regular.svg +9977 -0
- package/build/client/icons/regular.svg.br +0 -0
- package/build/client/icons/regular.svg.gz +0 -0
- package/build/client/icons/solid.svg +9977 -0
- package/build/client/icons/solid.svg.br +0 -0
- package/build/client/icons/solid.svg.gz +0 -0
- package/build/client/styles.css +102 -0
- package/build/client/styles.css.br +0 -0
- package/build/client/styles.css.gz +0 -0
- package/build/env.js +45 -0
- package/build/handler.js +1375 -0
- package/build/index.js +334 -0
- package/build/server/chunks/0-50xswu-B.js +9 -0
- package/build/server/chunks/0-50xswu-B.js.map +1 -0
- package/build/server/chunks/1-DT2Iedu7.js +9 -0
- package/build/server/chunks/1-DT2Iedu7.js.map +1 -0
- package/build/server/chunks/2-BV8AWU0U.js +9 -0
- package/build/server/chunks/2-BV8AWU0U.js.map +1 -0
- package/build/server/chunks/3-CMbPqkIH.js +9 -0
- package/build/server/chunks/3-CMbPqkIH.js.map +1 -0
- package/build/server/chunks/4-CXAEWvNq.js +9 -0
- package/build/server/chunks/4-CXAEWvNq.js.map +1 -0
- package/build/server/chunks/5-BVP7AYfH.js +9 -0
- package/build/server/chunks/5-BVP7AYfH.js.map +1 -0
- package/build/server/chunks/6-D30Y8eMO.js +9 -0
- package/build/server/chunks/6-D30Y8eMO.js.map +1 -0
- package/build/server/chunks/_page.svelte-B3384cfj.js +44 -0
- package/build/server/chunks/_page.svelte-B3384cfj.js.map +1 -0
- package/build/server/chunks/_page.svelte-BgEfD3kA.js +50 -0
- package/build/server/chunks/_page.svelte-BgEfD3kA.js.map +1 -0
- package/build/server/chunks/_page.svelte-CR8Oo7e9.js +641 -0
- package/build/server/chunks/_page.svelte-CR8Oo7e9.js.map +1 -0
- package/build/server/chunks/_page.svelte-CTxNa7SS.js +6 -0
- package/build/server/chunks/_page.svelte-CTxNa7SS.js.map +1 -0
- package/build/server/chunks/_page.svelte-DRiG-AM0.js +15 -0
- package/build/server/chunks/_page.svelte-DRiG-AM0.js.map +1 -0
- package/build/server/chunks/client-Bm0tawqd.js +6 -0
- package/build/server/chunks/client-Bm0tawqd.js.map +1 -0
- package/build/server/chunks/client2-CDtZFfLJ.js +39 -0
- package/build/server/chunks/client2-CDtZFfLJ.js.map +1 -0
- package/build/server/chunks/error.svelte-xp9OLkmb.js +24 -0
- package/build/server/chunks/error.svelte-xp9OLkmb.js.map +1 -0
- package/build/server/chunks/exports-Bdi6Ec6W.js +635 -0
- package/build/server/chunks/exports-Bdi6Ec6W.js.map +1 -0
- package/build/server/chunks/hooks.server-C9d9yKyi.js +16 -0
- package/build/server/chunks/hooks.server-C9d9yKyi.js.map +1 -0
- package/build/server/chunks/layout.svelte-4V-_rMCU.js +8 -0
- package/build/server/chunks/layout.svelte-4V-_rMCU.js.map +1 -0
- package/build/server/chunks/user-DYj9NpWz.js +811 -0
- package/build/server/chunks/user-DYj9NpWz.js.map +1 -0
- package/build/server/chunks/user2-D249re2A.js +11560 -0
- package/build/server/chunks/user2-D249re2A.js.map +1 -0
- package/build/server/index.js +6009 -0
- package/build/server/index.js.map +1 -0
- package/build/server/manifest.js +75 -0
- package/build/server/manifest.js.map +1 -0
- package/build/shims.js +32 -0
- package/dist/config.d.ts +2 -0
- package/dist/config.js +4 -1
- package/dist/database.d.ts +1 -1
- package/dist/state.d.ts +1 -0
- package/dist/state.js +5 -1
- package/package.json +1 -1
package/build/index.js
ADDED
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
import process from 'node:process';
|
|
2
|
+
import { handler } from './handler.js';
|
|
3
|
+
import { env } from './env.js';
|
|
4
|
+
import http from 'node:http';
|
|
5
|
+
import { setImmediate } from 'node:timers';
|
|
6
|
+
import * as qs from 'node:querystring';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @param {string|RegExp} input The route pattern
|
|
10
|
+
* @param {boolean} [loose] Allow open-ended matching. Ignored with `RegExp` input.
|
|
11
|
+
*/
|
|
12
|
+
function parse$1(input, loose) {
|
|
13
|
+
if (input instanceof RegExp) return { keys:false, pattern:input };
|
|
14
|
+
var c, o, tmp, ext, keys=[], pattern='', arr = input.split('/');
|
|
15
|
+
arr[0] || arr.shift();
|
|
16
|
+
|
|
17
|
+
while (tmp = arr.shift()) {
|
|
18
|
+
c = tmp[0];
|
|
19
|
+
if (c === '*') {
|
|
20
|
+
keys.push(c);
|
|
21
|
+
pattern += tmp[1] === '?' ? '(?:/(.*))?' : '/(.*)';
|
|
22
|
+
} else if (c === ':') {
|
|
23
|
+
o = tmp.indexOf('?', 1);
|
|
24
|
+
ext = tmp.indexOf('.', 1);
|
|
25
|
+
keys.push( tmp.substring(1, !!~o ? o : !!~ext ? ext : tmp.length) );
|
|
26
|
+
pattern += !!~o && !~ext ? '(?:/([^/]+?))?' : '/([^/]+?)';
|
|
27
|
+
if (!!~ext) pattern += (!!~o ? '?' : '') + '\\' + tmp.substring(ext);
|
|
28
|
+
} else {
|
|
29
|
+
pattern += '/' + tmp;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return {
|
|
34
|
+
keys: keys,
|
|
35
|
+
pattern: new RegExp('^' + pattern + (loose ? '(?=$|\/)' : '\/?$'), 'i')
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const MAP = {
|
|
40
|
+
"": 0,
|
|
41
|
+
GET: 1,
|
|
42
|
+
HEAD: 2,
|
|
43
|
+
PATCH: 3,
|
|
44
|
+
OPTIONS: 4,
|
|
45
|
+
CONNECT: 5,
|
|
46
|
+
DELETE: 6,
|
|
47
|
+
TRACE: 7,
|
|
48
|
+
POST: 8,
|
|
49
|
+
PUT: 9,
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
class Trouter {
|
|
53
|
+
constructor() {
|
|
54
|
+
this.routes = [];
|
|
55
|
+
|
|
56
|
+
this.all = this.add.bind(this, '');
|
|
57
|
+
this.get = this.add.bind(this, 'GET');
|
|
58
|
+
this.head = this.add.bind(this, 'HEAD');
|
|
59
|
+
this.patch = this.add.bind(this, 'PATCH');
|
|
60
|
+
this.options = this.add.bind(this, 'OPTIONS');
|
|
61
|
+
this.connect = this.add.bind(this, 'CONNECT');
|
|
62
|
+
this.delete = this.add.bind(this, 'DELETE');
|
|
63
|
+
this.trace = this.add.bind(this, 'TRACE');
|
|
64
|
+
this.post = this.add.bind(this, 'POST');
|
|
65
|
+
this.put = this.add.bind(this, 'PUT');
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
use(route, ...fns) {
|
|
69
|
+
let handlers = [].concat.apply([], fns);
|
|
70
|
+
let { keys, pattern } = parse$1(route, true);
|
|
71
|
+
this.routes.push({ keys, pattern, method: '', handlers, midx: MAP[''] });
|
|
72
|
+
return this;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
add(method, route, ...fns) {
|
|
76
|
+
let { keys, pattern } = parse$1(route);
|
|
77
|
+
let handlers = [].concat.apply([], fns);
|
|
78
|
+
this.routes.push({ keys, pattern, method, handlers, midx: MAP[method] });
|
|
79
|
+
return this;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
find(method, url) {
|
|
83
|
+
let midx = MAP[method];
|
|
84
|
+
let isHEAD = (midx === 2);
|
|
85
|
+
let i=0, j=0, k, tmp, arr=this.routes;
|
|
86
|
+
let matches=[], params={}, handlers=[];
|
|
87
|
+
for (; i < arr.length; i++) {
|
|
88
|
+
tmp = arr[i];
|
|
89
|
+
if (tmp.midx === midx || tmp.midx === 0 || (isHEAD && tmp.midx===1) ) {
|
|
90
|
+
if (tmp.keys === false) {
|
|
91
|
+
matches = tmp.pattern.exec(url);
|
|
92
|
+
if (matches === null) continue;
|
|
93
|
+
if (matches.groups !== void 0) for (k in matches.groups) params[k]=matches.groups[k];
|
|
94
|
+
tmp.handlers.length > 1 ? (handlers=handlers.concat(tmp.handlers)) : handlers.push(tmp.handlers[0]);
|
|
95
|
+
} else if (tmp.keys.length > 0) {
|
|
96
|
+
matches = tmp.pattern.exec(url);
|
|
97
|
+
if (matches === null) continue;
|
|
98
|
+
for (j=0; j < tmp.keys.length;) params[tmp.keys[j]]=matches[++j];
|
|
99
|
+
tmp.handlers.length > 1 ? (handlers=handlers.concat(tmp.handlers)) : handlers.push(tmp.handlers[0]);
|
|
100
|
+
} else if (tmp.pattern.test(url)) {
|
|
101
|
+
tmp.handlers.length > 1 ? (handlers=handlers.concat(tmp.handlers)) : handlers.push(tmp.handlers[0]);
|
|
102
|
+
}
|
|
103
|
+
} // else not a match
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return { params, handlers };
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* @typedef ParsedURL
|
|
112
|
+
* @type {import('.').ParsedURL}
|
|
113
|
+
*/
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* @typedef Request
|
|
117
|
+
* @property {string} url
|
|
118
|
+
* @property {ParsedURL} _parsedUrl
|
|
119
|
+
*/
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* @param {Request} req
|
|
123
|
+
* @returns {ParsedURL|void}
|
|
124
|
+
*/
|
|
125
|
+
function parse(req) {
|
|
126
|
+
let raw = req.url;
|
|
127
|
+
if (raw == null) return;
|
|
128
|
+
|
|
129
|
+
let prev = req._parsedUrl;
|
|
130
|
+
if (prev && prev.raw === raw) return prev;
|
|
131
|
+
|
|
132
|
+
let pathname=raw, search='', query;
|
|
133
|
+
|
|
134
|
+
if (raw.length > 1) {
|
|
135
|
+
let idx = raw.indexOf('?', 1);
|
|
136
|
+
|
|
137
|
+
if (idx !== -1) {
|
|
138
|
+
search = raw.substring(idx);
|
|
139
|
+
pathname = raw.substring(0, idx);
|
|
140
|
+
if (search.length > 1) {
|
|
141
|
+
query = qs.parse(search.substring(1));
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
return req._parsedUrl = { pathname, search, query, raw };
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function onError(err, req, res) {
|
|
150
|
+
let code = typeof err.status === 'number' && err.status;
|
|
151
|
+
code = res.statusCode = (code && code >= 100 ? code : 500);
|
|
152
|
+
if (typeof err === 'string' || Buffer.isBuffer(err)) res.end(err);
|
|
153
|
+
else res.end(err.message || http.STATUS_CODES[code]);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const mount = fn => fn instanceof Polka ? fn.attach : fn;
|
|
157
|
+
|
|
158
|
+
class Polka extends Trouter {
|
|
159
|
+
constructor(opts={}) {
|
|
160
|
+
super();
|
|
161
|
+
this.parse = parse;
|
|
162
|
+
this.server = opts.server;
|
|
163
|
+
this.handler = this.handler.bind(this);
|
|
164
|
+
this.onError = opts.onError || onError; // catch-all handler
|
|
165
|
+
this.onNoMatch = opts.onNoMatch || this.onError.bind(null, { status: 404 });
|
|
166
|
+
this.attach = (req, res) => setImmediate(this.handler, req, res);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
use(base, ...fns) {
|
|
170
|
+
if (base === '/') {
|
|
171
|
+
super.use(base, fns.map(mount));
|
|
172
|
+
} else if (typeof base === 'function' || base instanceof Polka) {
|
|
173
|
+
super.use('/', [base, ...fns].map(mount));
|
|
174
|
+
} else {
|
|
175
|
+
super.use(base,
|
|
176
|
+
(req, _, next) => {
|
|
177
|
+
if (typeof base === 'string') {
|
|
178
|
+
let len = base.length;
|
|
179
|
+
base.startsWith('/') || len++;
|
|
180
|
+
req.url = req.url.substring(len) || '/';
|
|
181
|
+
req.path = req.path.substring(len) || '/';
|
|
182
|
+
} else {
|
|
183
|
+
req.url = req.url.replace(base, '') || '/';
|
|
184
|
+
req.path = req.path.replace(base, '') || '/';
|
|
185
|
+
}
|
|
186
|
+
if (req.url.charAt(0) !== '/') {
|
|
187
|
+
req.url = '/' + req.url;
|
|
188
|
+
}
|
|
189
|
+
next();
|
|
190
|
+
},
|
|
191
|
+
fns.map(mount),
|
|
192
|
+
(req, _, next) => {
|
|
193
|
+
req.path = req._parsedUrl.pathname;
|
|
194
|
+
req.url = req.path + req._parsedUrl.search;
|
|
195
|
+
next();
|
|
196
|
+
}
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
return this; // chainable
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
listen() {
|
|
203
|
+
(this.server = this.server || http.createServer()).on('request', this.attach);
|
|
204
|
+
this.server.listen.apply(this.server, arguments);
|
|
205
|
+
return this;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
handler(req, res, next) {
|
|
209
|
+
let info = this.parse(req), path = info.pathname;
|
|
210
|
+
let obj = this.find(req.method, req.path=path);
|
|
211
|
+
|
|
212
|
+
req.url = path + info.search;
|
|
213
|
+
req.originalUrl = req.originalUrl || req.url;
|
|
214
|
+
req.query = info.query || {};
|
|
215
|
+
req.search = info.search;
|
|
216
|
+
req.params = obj.params;
|
|
217
|
+
|
|
218
|
+
if (path.length > 1 && path.indexOf('%', 1) !== -1) {
|
|
219
|
+
for (let k in req.params) {
|
|
220
|
+
try { req.params[k] = decodeURIComponent(req.params[k]); }
|
|
221
|
+
catch (e) { /* malform uri segment */ }
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
let i=0, arr=obj.handlers.concat(this.onNoMatch), len=arr.length;
|
|
226
|
+
let loop = async () => res.finished || (i < len) && arr[i++](req, res, next);
|
|
227
|
+
(next = next || (err => err ? this.onError(err, req, res, next) : loop().catch(next)))(); // init
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
function polka (opts) {
|
|
232
|
+
return new Polka(opts);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
const path = env('SOCKET_PATH', false);
|
|
236
|
+
const host = env('HOST', '0.0.0.0');
|
|
237
|
+
const port = env('PORT', !path && '3000');
|
|
238
|
+
|
|
239
|
+
const shutdown_timeout = parseInt(env('SHUTDOWN_TIMEOUT', '30'));
|
|
240
|
+
const idle_timeout = parseInt(env('IDLE_TIMEOUT', '0'));
|
|
241
|
+
const listen_pid = parseInt(env('LISTEN_PID', '0'));
|
|
242
|
+
const listen_fds = parseInt(env('LISTEN_FDS', '0'));
|
|
243
|
+
// https://www.freedesktop.org/software/systemd/man/latest/sd_listen_fds.html
|
|
244
|
+
const SD_LISTEN_FDS_START = 3;
|
|
245
|
+
|
|
246
|
+
if (listen_pid !== 0 && listen_pid !== process.pid) {
|
|
247
|
+
throw new Error(`received LISTEN_PID ${listen_pid} but current process id is ${process.pid}`);
|
|
248
|
+
}
|
|
249
|
+
if (listen_fds > 1) {
|
|
250
|
+
throw new Error(
|
|
251
|
+
`only one socket is allowed for socket activation, but LISTEN_FDS was set to ${listen_fds}`
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
const socket_activation = listen_pid === process.pid && listen_fds === 1;
|
|
256
|
+
|
|
257
|
+
let requests = 0;
|
|
258
|
+
/** @type {NodeJS.Timeout | void} */
|
|
259
|
+
let shutdown_timeout_id;
|
|
260
|
+
/** @type {NodeJS.Timeout | void} */
|
|
261
|
+
let idle_timeout_id;
|
|
262
|
+
|
|
263
|
+
const server = polka().use(handler);
|
|
264
|
+
|
|
265
|
+
if (socket_activation) {
|
|
266
|
+
server.listen({ fd: SD_LISTEN_FDS_START }, () => {
|
|
267
|
+
console.log(`Listening on file descriptor ${SD_LISTEN_FDS_START}`);
|
|
268
|
+
});
|
|
269
|
+
} else {
|
|
270
|
+
server.listen({ path, host, port }, () => {
|
|
271
|
+
console.log(`Listening on ${path || `http://${host}:${port}`}`);
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/** @param {'SIGINT' | 'SIGTERM' | 'IDLE'} reason */
|
|
276
|
+
function graceful_shutdown(reason) {
|
|
277
|
+
if (shutdown_timeout_id) return;
|
|
278
|
+
|
|
279
|
+
// If a connection was opened with a keep-alive header close() will wait for the connection to
|
|
280
|
+
// time out rather than close it even if it is not handling any requests, so call this first
|
|
281
|
+
// @ts-expect-error this was added in 18.2.0 but is not reflected in the types
|
|
282
|
+
server.server.closeIdleConnections();
|
|
283
|
+
|
|
284
|
+
server.server.close((error) => {
|
|
285
|
+
// occurs if the server is already closed
|
|
286
|
+
if (error) return;
|
|
287
|
+
|
|
288
|
+
if (shutdown_timeout_id) {
|
|
289
|
+
clearTimeout(shutdown_timeout_id);
|
|
290
|
+
}
|
|
291
|
+
if (idle_timeout_id) {
|
|
292
|
+
clearTimeout(idle_timeout_id);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
// @ts-expect-error custom events cannot be typed
|
|
296
|
+
process.emit('sveltekit:shutdown', reason);
|
|
297
|
+
});
|
|
298
|
+
|
|
299
|
+
shutdown_timeout_id = setTimeout(
|
|
300
|
+
// @ts-expect-error this was added in 18.2.0 but is not reflected in the types
|
|
301
|
+
() => server.server.closeAllConnections(),
|
|
302
|
+
shutdown_timeout * 1000
|
|
303
|
+
);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
server.server.on(
|
|
307
|
+
'request',
|
|
308
|
+
/** @param {import('node:http').IncomingMessage} req */
|
|
309
|
+
(req) => {
|
|
310
|
+
requests++;
|
|
311
|
+
|
|
312
|
+
if (socket_activation && idle_timeout_id) {
|
|
313
|
+
idle_timeout_id = clearTimeout(idle_timeout_id);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
req.on('close', () => {
|
|
317
|
+
requests--;
|
|
318
|
+
|
|
319
|
+
if (shutdown_timeout_id) {
|
|
320
|
+
// close connections as soon as they become idle, so they don't accept new requests
|
|
321
|
+
// @ts-expect-error this was added in 18.2.0 but is not reflected in the types
|
|
322
|
+
server.server.closeIdleConnections();
|
|
323
|
+
}
|
|
324
|
+
if (requests === 0 && socket_activation && idle_timeout) {
|
|
325
|
+
idle_timeout_id = setTimeout(() => graceful_shutdown('IDLE'), idle_timeout * 1000);
|
|
326
|
+
}
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
);
|
|
330
|
+
|
|
331
|
+
process.on('SIGTERM', graceful_shutdown);
|
|
332
|
+
process.on('SIGINT', graceful_shutdown);
|
|
333
|
+
|
|
334
|
+
export { host, path, port, server };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const index = 0;
|
|
2
|
+
let component_cache;
|
|
3
|
+
const component = async () => component_cache ??= (await import('./layout.svelte-4V-_rMCU.js')).default;
|
|
4
|
+
const imports = ["_app/immutable/nodes/0.qBSjDH9J.js","_app/immutable/chunks/CWj6FrbW.js","_app/immutable/chunks/BuQsdvxH.js","_app/immutable/chunks/UmPEH60o.js"];
|
|
5
|
+
const stylesheets = [];
|
|
6
|
+
const fonts = [];
|
|
7
|
+
|
|
8
|
+
export { component, fonts, imports, index, stylesheets };
|
|
9
|
+
//# sourceMappingURL=0-50xswu-B.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"0-50xswu-B.js","sources":["../../../.svelte-kit/adapter-node/nodes/0.js"],"sourcesContent":["\n\nexport const index = 0;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/fallbacks/layout.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/0.qBSjDH9J.js\",\"_app/immutable/chunks/CWj6FrbW.js\",\"_app/immutable/chunks/BuQsdvxH.js\",\"_app/immutable/chunks/UmPEH60o.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,6BAAuC,CAAC,EAAE;AACrG,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AAC5J,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const index = 1;
|
|
2
|
+
let component_cache;
|
|
3
|
+
const component = async () => component_cache ??= (await import('./error.svelte-xp9OLkmb.js')).default;
|
|
4
|
+
const imports = ["_app/immutable/nodes/1.xGMYh02A.js","_app/immutable/chunks/CWj6FrbW.js","_app/immutable/chunks/BuQsdvxH.js","_app/immutable/chunks/nXp3Dhop.js","_app/immutable/chunks/UmPEH60o.js","_app/immutable/chunks/DOVJ9LQt.js","_app/immutable/chunks/DdlABs80.js"];
|
|
5
|
+
const stylesheets = [];
|
|
6
|
+
const fonts = [];
|
|
7
|
+
|
|
8
|
+
export { component, fonts, imports, index, stylesheets };
|
|
9
|
+
//# sourceMappingURL=1-DT2Iedu7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1-DT2Iedu7.js","sources":["../../../.svelte-kit/adapter-node/nodes/1.js"],"sourcesContent":["\n\nexport const index = 1;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/fallbacks/error.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/1.xGMYh02A.js\",\"_app/immutable/chunks/CWj6FrbW.js\",\"_app/immutable/chunks/BuQsdvxH.js\",\"_app/immutable/chunks/nXp3Dhop.js\",\"_app/immutable/chunks/UmPEH60o.js\",\"_app/immutable/chunks/DOVJ9LQt.js\",\"_app/immutable/chunks/DdlABs80.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAAsC,CAAC,EAAE;AACpG,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AACxQ,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const index = 2;
|
|
2
|
+
let component_cache;
|
|
3
|
+
const component = async () => component_cache ??= (await import('./_page.svelte-CTxNa7SS.js')).default;
|
|
4
|
+
const imports = ["_app/immutable/nodes/2.UKc0Z14i.js","_app/immutable/chunks/CWj6FrbW.js","_app/immutable/chunks/BuQsdvxH.js"];
|
|
5
|
+
const stylesheets = [];
|
|
6
|
+
const fonts = [];
|
|
7
|
+
|
|
8
|
+
export { component, fonts, imports, index, stylesheets };
|
|
9
|
+
//# sourceMappingURL=2-BV8AWU0U.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"2-BV8AWU0U.js","sources":["../../../.svelte-kit/adapter-node/nodes/2.js"],"sourcesContent":["\n\nexport const index = 2;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/_axium/default/_page.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/2.UKc0Z14i.js\",\"_app/immutable/chunks/CWj6FrbW.js\",\"_app/immutable/chunks/BuQsdvxH.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAAiD,CAAC,EAAE;AAC/G,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC;AACxH,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const index = 3;
|
|
2
|
+
let component_cache;
|
|
3
|
+
const component = async () => component_cache ??= (await import('./_page.svelte-CR8Oo7e9.js')).default;
|
|
4
|
+
const imports = ["_app/immutable/nodes/3.B-dYETEY.js","_app/immutable/chunks/CWj6FrbW.js","_app/immutable/chunks/BuQsdvxH.js","_app/immutable/chunks/nXp3Dhop.js","_app/immutable/chunks/UmPEH60o.js","_app/immutable/chunks/D5yCkbIu.js","_app/immutable/chunks/sBvhjZvA.js","_app/immutable/chunks/DdlABs80.js","_app/immutable/chunks/DOVJ9LQt.js","_app/immutable/chunks/XS99-ehg.js"];
|
|
5
|
+
const stylesheets = ["_app/immutable/assets/FormDialog.Cbakz6hh.css","_app/immutable/assets/3.KnidqurY.css"];
|
|
6
|
+
const fonts = [];
|
|
7
|
+
|
|
8
|
+
export { component, fonts, imports, index, stylesheets };
|
|
9
|
+
//# sourceMappingURL=3-CMbPqkIH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"3-CMbPqkIH.js","sources":["../../../.svelte-kit/adapter-node/nodes/3.js"],"sourcesContent":["\n\nexport const index = 3;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/account/_page.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/3.B-dYETEY.js\",\"_app/immutable/chunks/CWj6FrbW.js\",\"_app/immutable/chunks/BuQsdvxH.js\",\"_app/immutable/chunks/nXp3Dhop.js\",\"_app/immutable/chunks/UmPEH60o.js\",\"_app/immutable/chunks/D5yCkbIu.js\",\"_app/immutable/chunks/sBvhjZvA.js\",\"_app/immutable/chunks/DdlABs80.js\",\"_app/immutable/chunks/DOVJ9LQt.js\",\"_app/immutable/chunks/XS99-ehg.js\"];\nexport const stylesheets = [\"_app/immutable/assets/FormDialog.Cbakz6hh.css\",\"_app/immutable/assets/3.KnidqurY.css\"];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAA0C,CAAC,EAAE;AACxG,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AACpX,MAAC,WAAW,GAAG,CAAC,+CAA+C,CAAC,sCAAsC;AACtG,MAAC,KAAK,GAAG;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const index = 4;
|
|
2
|
+
let component_cache;
|
|
3
|
+
const component = async () => component_cache ??= (await import('./_page.svelte-BgEfD3kA.js')).default;
|
|
4
|
+
const imports = ["_app/immutable/nodes/4.DiJNTRdN.js","_app/immutable/chunks/CWj6FrbW.js","_app/immutable/chunks/BuQsdvxH.js","_app/immutable/chunks/nXp3Dhop.js","_app/immutable/chunks/UmPEH60o.js","_app/immutable/chunks/D5yCkbIu.js","_app/immutable/chunks/sBvhjZvA.js","_app/immutable/chunks/DdlABs80.js","_app/immutable/chunks/DOVJ9LQt.js","_app/immutable/chunks/XS99-ehg.js"];
|
|
5
|
+
const stylesheets = ["_app/immutable/assets/FormDialog.Cbakz6hh.css"];
|
|
6
|
+
const fonts = [];
|
|
7
|
+
|
|
8
|
+
export { component, fonts, imports, index, stylesheets };
|
|
9
|
+
//# sourceMappingURL=4-CXAEWvNq.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"4-CXAEWvNq.js","sources":["../../../.svelte-kit/adapter-node/nodes/4.js"],"sourcesContent":["\n\nexport const index = 4;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/login/_page.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/4.DiJNTRdN.js\",\"_app/immutable/chunks/CWj6FrbW.js\",\"_app/immutable/chunks/BuQsdvxH.js\",\"_app/immutable/chunks/nXp3Dhop.js\",\"_app/immutable/chunks/UmPEH60o.js\",\"_app/immutable/chunks/D5yCkbIu.js\",\"_app/immutable/chunks/sBvhjZvA.js\",\"_app/immutable/chunks/DdlABs80.js\",\"_app/immutable/chunks/DOVJ9LQt.js\",\"_app/immutable/chunks/XS99-ehg.js\"];\nexport const stylesheets = [\"_app/immutable/assets/FormDialog.Cbakz6hh.css\"];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAAwC,CAAC,EAAE;AACtG,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AACpX,MAAC,WAAW,GAAG,CAAC,+CAA+C;AAC/D,MAAC,KAAK,GAAG;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const index = 5;
|
|
2
|
+
let component_cache;
|
|
3
|
+
const component = async () => component_cache ??= (await import('./_page.svelte-DRiG-AM0.js')).default;
|
|
4
|
+
const imports = ["_app/immutable/nodes/5.CikYDQCG.js","_app/immutable/chunks/CWj6FrbW.js","_app/immutable/chunks/BuQsdvxH.js","_app/immutable/chunks/nXp3Dhop.js","_app/immutable/chunks/UmPEH60o.js","_app/immutable/chunks/DdlABs80.js","_app/immutable/chunks/XS99-ehg.js"];
|
|
5
|
+
const stylesheets = [];
|
|
6
|
+
const fonts = [];
|
|
7
|
+
|
|
8
|
+
export { component, fonts, imports, index, stylesheets };
|
|
9
|
+
//# sourceMappingURL=5-BVP7AYfH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"5-BVP7AYfH.js","sources":["../../../.svelte-kit/adapter-node/nodes/5.js"],"sourcesContent":["\n\nexport const index = 5;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/logout/_page.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/5.CikYDQCG.js\",\"_app/immutable/chunks/CWj6FrbW.js\",\"_app/immutable/chunks/BuQsdvxH.js\",\"_app/immutable/chunks/nXp3Dhop.js\",\"_app/immutable/chunks/UmPEH60o.js\",\"_app/immutable/chunks/DdlABs80.js\",\"_app/immutable/chunks/XS99-ehg.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAAyC,CAAC,EAAE;AACvG,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AACxQ,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const index = 6;
|
|
2
|
+
let component_cache;
|
|
3
|
+
const component = async () => component_cache ??= (await import('./_page.svelte-B3384cfj.js')).default;
|
|
4
|
+
const imports = ["_app/immutable/nodes/6.B-xpcmEc.js","_app/immutable/chunks/CWj6FrbW.js","_app/immutable/chunks/BuQsdvxH.js","_app/immutable/chunks/nXp3Dhop.js","_app/immutable/chunks/UmPEH60o.js","_app/immutable/chunks/D5yCkbIu.js","_app/immutable/chunks/sBvhjZvA.js","_app/immutable/chunks/DdlABs80.js","_app/immutable/chunks/DOVJ9LQt.js","_app/immutable/chunks/XS99-ehg.js"];
|
|
5
|
+
const stylesheets = ["_app/immutable/assets/FormDialog.Cbakz6hh.css"];
|
|
6
|
+
const fonts = [];
|
|
7
|
+
|
|
8
|
+
export { component, fonts, imports, index, stylesheets };
|
|
9
|
+
//# sourceMappingURL=6-D30Y8eMO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"6-D30Y8eMO.js","sources":["../../../.svelte-kit/adapter-node/nodes/6.js"],"sourcesContent":["\n\nexport const index = 6;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/register/_page.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/6.B-xpcmEc.js\",\"_app/immutable/chunks/CWj6FrbW.js\",\"_app/immutable/chunks/BuQsdvxH.js\",\"_app/immutable/chunks/nXp3Dhop.js\",\"_app/immutable/chunks/UmPEH60o.js\",\"_app/immutable/chunks/D5yCkbIu.js\",\"_app/immutable/chunks/sBvhjZvA.js\",\"_app/immutable/chunks/DdlABs80.js\",\"_app/immutable/chunks/DOVJ9LQt.js\",\"_app/immutable/chunks/XS99-ehg.js\"];\nexport const stylesheets = [\"_app/immutable/assets/FormDialog.Cbakz6hh.css\"];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAA2C,CAAC,EAAE;AACzG,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AACpX,MAAC,WAAW,GAAG,CAAC,+CAA+C;AAC/D,MAAC,KAAK,GAAG;;;;"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { P as push, a7 as copy_payload, a8 as assign_payload, ag as bind_props, T as pop, a9 as head } from './exports-Bdi6Ec6W.js';
|
|
2
|
+
import { F as FormDialog, r as register } from './user-DYj9NpWz.js';
|
|
3
|
+
import './client2-CDtZFfLJ.js';
|
|
4
|
+
import './client-Bm0tawqd.js';
|
|
5
|
+
import './user2-D249re2A.js';
|
|
6
|
+
|
|
7
|
+
function _page($$payload, $$props) {
|
|
8
|
+
push();
|
|
9
|
+
let { dialog = void 0, pageMode = true } = $$props;
|
|
10
|
+
let $$settled = true;
|
|
11
|
+
let $$inner_payload;
|
|
12
|
+
function $$render_inner($$payload2) {
|
|
13
|
+
head($$payload2, ($$payload3) => {
|
|
14
|
+
$$payload3.title = `<title>Sign Up</title>`;
|
|
15
|
+
});
|
|
16
|
+
FormDialog($$payload2, {
|
|
17
|
+
submitText: "Register",
|
|
18
|
+
submit: register,
|
|
19
|
+
pageMode,
|
|
20
|
+
get dialog() {
|
|
21
|
+
return dialog;
|
|
22
|
+
},
|
|
23
|
+
set dialog($$value) {
|
|
24
|
+
dialog = $$value;
|
|
25
|
+
$$settled = false;
|
|
26
|
+
},
|
|
27
|
+
children: ($$payload3) => {
|
|
28
|
+
$$payload3.out += `<div><label for="name">Display Name</label> <input name="name" type="text" required/></div> <div><label for="email">Email</label> <input name="email" type="email" required/></div>`;
|
|
29
|
+
},
|
|
30
|
+
$$slots: { default: true }
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
do {
|
|
34
|
+
$$settled = true;
|
|
35
|
+
$$inner_payload = copy_payload($$payload);
|
|
36
|
+
$$render_inner($$inner_payload);
|
|
37
|
+
} while (!$$settled);
|
|
38
|
+
assign_payload($$payload, $$inner_payload);
|
|
39
|
+
bind_props($$props, { dialog });
|
|
40
|
+
pop();
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export { _page as default };
|
|
44
|
+
//# sourceMappingURL=_page.svelte-B3384cfj.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_page.svelte-B3384cfj.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/register/_page.svelte.js"],"sourcesContent":["import { Y as copy_payload, Z as assign_payload, a4 as bind_props, T as pop, P as push, _ as head } from \"../../../chunks/index.js\";\nimport { F as FormDialog, r as register } from \"../../../chunks/user.js\";\nfunction _page($$payload, $$props) {\n push();\n let { dialog = void 0, pageMode = true } = $$props;\n let $$settled = true;\n let $$inner_payload;\n function $$render_inner($$payload2) {\n head($$payload2, ($$payload3) => {\n $$payload3.title = `<title>Sign Up</title>`;\n });\n FormDialog($$payload2, {\n submitText: \"Register\",\n submit: register,\n pageMode,\n get dialog() {\n return dialog;\n },\n set dialog($$value) {\n dialog = $$value;\n $$settled = false;\n },\n children: ($$payload3) => {\n $$payload3.out += `<div><label for=\"name\">Display Name</label> <input name=\"name\" type=\"text\" required/></div> <div><label for=\"email\">Email</label> <input name=\"email\" type=\"email\" required/></div>`;\n },\n $$slots: { default: true }\n });\n }\n do {\n $$settled = true;\n $$inner_payload = copy_payload($$payload);\n $$render_inner($$inner_payload);\n } while (!$$settled);\n assign_payload($$payload, $$inner_payload);\n bind_props($$props, { dialog });\n pop();\n}\nexport {\n _page as default\n};\n"],"names":[],"mappings":";;;;;;AAEA,SAAS,KAAK,CAAC,SAAS,EAAE,OAAO,EAAE;AACnC,EAAE,IAAI,EAAE;AACR,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,QAAQ,GAAG,IAAI,EAAE,GAAG,OAAO;AACpD,EAAE,IAAI,SAAS,GAAG,IAAI;AACtB,EAAE,IAAI,eAAe;AACrB,EAAE,SAAS,cAAc,CAAC,UAAU,EAAE;AACtC,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC,UAAU,KAAK;AACrC,MAAM,UAAU,CAAC,KAAK,GAAG,CAAC,sBAAsB,CAAC;AACjD,KAAK,CAAC;AACN,IAAI,UAAU,CAAC,UAAU,EAAE;AAC3B,MAAM,UAAU,EAAE,UAAU;AAC5B,MAAM,MAAM,EAAE,QAAQ;AACtB,MAAM,QAAQ;AACd,MAAM,IAAI,MAAM,GAAG;AACnB,QAAQ,OAAO,MAAM;AACrB,OAAO;AACP,MAAM,IAAI,MAAM,CAAC,OAAO,EAAE;AAC1B,QAAQ,MAAM,GAAG,OAAO;AACxB,QAAQ,SAAS,GAAG,KAAK;AACzB,OAAO;AACP,MAAM,QAAQ,EAAE,CAAC,UAAU,KAAK;AAChC,QAAQ,UAAU,CAAC,GAAG,IAAI,CAAC,mLAAmL,CAAC;AAC/M,OAAO;AACP,MAAM,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI;AAC9B,KAAK,CAAC;AACN;AACA,EAAE,GAAG;AACL,IAAI,SAAS,GAAG,IAAI;AACpB,IAAI,eAAe,GAAG,YAAY,CAAC,SAAS,CAAC;AAC7C,IAAI,cAAc,CAAC,eAAe,CAAC;AACnC,GAAG,QAAQ,CAAC,SAAS;AACrB,EAAE,cAAc,CAAC,SAAS,EAAE,eAAe,CAAC;AAC5C,EAAE,UAAU,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC;AACjC,EAAE,GAAG,EAAE;AACP;;;;"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { P as push, a7 as copy_payload, a8 as assign_payload, ag as bind_props, T as pop, a9 as head } from './exports-Bdi6Ec6W.js';
|
|
2
|
+
import { F as FormDialog, i as loginByEmail } from './user-DYj9NpWz.js';
|
|
3
|
+
import './client2-CDtZFfLJ.js';
|
|
4
|
+
import './client-Bm0tawqd.js';
|
|
5
|
+
import './user2-D249re2A.js';
|
|
6
|
+
|
|
7
|
+
function _page($$payload, $$props) {
|
|
8
|
+
push();
|
|
9
|
+
let { dialog = void 0, pageMode = true } = $$props;
|
|
10
|
+
function submit(data) {
|
|
11
|
+
if (typeof data.email != "string") {
|
|
12
|
+
throw "Tried to upload a file for an email. Huh?!";
|
|
13
|
+
}
|
|
14
|
+
return loginByEmail(data.email);
|
|
15
|
+
}
|
|
16
|
+
let $$settled = true;
|
|
17
|
+
let $$inner_payload;
|
|
18
|
+
function $$render_inner($$payload2) {
|
|
19
|
+
head($$payload2, ($$payload3) => {
|
|
20
|
+
$$payload3.title = `<title>Login</title>`;
|
|
21
|
+
});
|
|
22
|
+
FormDialog($$payload2, {
|
|
23
|
+
submitText: "Login",
|
|
24
|
+
submit,
|
|
25
|
+
pageMode,
|
|
26
|
+
get dialog() {
|
|
27
|
+
return dialog;
|
|
28
|
+
},
|
|
29
|
+
set dialog($$value) {
|
|
30
|
+
dialog = $$value;
|
|
31
|
+
$$settled = false;
|
|
32
|
+
},
|
|
33
|
+
children: ($$payload3) => {
|
|
34
|
+
$$payload3.out += `<div><label for="email">Email</label> <input name="email" type="email" required/></div>`;
|
|
35
|
+
},
|
|
36
|
+
$$slots: { default: true }
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
do {
|
|
40
|
+
$$settled = true;
|
|
41
|
+
$$inner_payload = copy_payload($$payload);
|
|
42
|
+
$$render_inner($$inner_payload);
|
|
43
|
+
} while (!$$settled);
|
|
44
|
+
assign_payload($$payload, $$inner_payload);
|
|
45
|
+
bind_props($$props, { dialog });
|
|
46
|
+
pop();
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export { _page as default };
|
|
50
|
+
//# sourceMappingURL=_page.svelte-BgEfD3kA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_page.svelte-BgEfD3kA.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/login/_page.svelte.js"],"sourcesContent":["import { Y as copy_payload, Z as assign_payload, a4 as bind_props, T as pop, P as push, _ as head } from \"../../../chunks/index.js\";\nimport { F as FormDialog, i as loginByEmail } from \"../../../chunks/user.js\";\nfunction _page($$payload, $$props) {\n push();\n let { dialog = void 0, pageMode = true } = $$props;\n function submit(data) {\n if (typeof data.email != \"string\") {\n throw \"Tried to upload a file for an email. Huh?!\";\n }\n return loginByEmail(data.email);\n }\n let $$settled = true;\n let $$inner_payload;\n function $$render_inner($$payload2) {\n head($$payload2, ($$payload3) => {\n $$payload3.title = `<title>Login</title>`;\n });\n FormDialog($$payload2, {\n submitText: \"Login\",\n submit,\n pageMode,\n get dialog() {\n return dialog;\n },\n set dialog($$value) {\n dialog = $$value;\n $$settled = false;\n },\n children: ($$payload3) => {\n $$payload3.out += `<div><label for=\"email\">Email</label> <input name=\"email\" type=\"email\" required/></div>`;\n },\n $$slots: { default: true }\n });\n }\n do {\n $$settled = true;\n $$inner_payload = copy_payload($$payload);\n $$render_inner($$inner_payload);\n } while (!$$settled);\n assign_payload($$payload, $$inner_payload);\n bind_props($$props, { dialog });\n pop();\n}\nexport {\n _page as default\n};\n"],"names":[],"mappings":";;;;;;AAEA,SAAS,KAAK,CAAC,SAAS,EAAE,OAAO,EAAE;AACnC,EAAE,IAAI,EAAE;AACR,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,QAAQ,GAAG,IAAI,EAAE,GAAG,OAAO;AACpD,EAAE,SAAS,MAAM,CAAC,IAAI,EAAE;AACxB,IAAI,IAAI,OAAO,IAAI,CAAC,KAAK,IAAI,QAAQ,EAAE;AACvC,MAAM,MAAM,4CAA4C;AACxD;AACA,IAAI,OAAO,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC;AACnC;AACA,EAAE,IAAI,SAAS,GAAG,IAAI;AACtB,EAAE,IAAI,eAAe;AACrB,EAAE,SAAS,cAAc,CAAC,UAAU,EAAE;AACtC,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC,UAAU,KAAK;AACrC,MAAM,UAAU,CAAC,KAAK,GAAG,CAAC,oBAAoB,CAAC;AAC/C,KAAK,CAAC;AACN,IAAI,UAAU,CAAC,UAAU,EAAE;AAC3B,MAAM,UAAU,EAAE,OAAO;AACzB,MAAM,MAAM;AACZ,MAAM,QAAQ;AACd,MAAM,IAAI,MAAM,GAAG;AACnB,QAAQ,OAAO,MAAM;AACrB,OAAO;AACP,MAAM,IAAI,MAAM,CAAC,OAAO,EAAE;AAC1B,QAAQ,MAAM,GAAG,OAAO;AACxB,QAAQ,SAAS,GAAG,KAAK;AACzB,OAAO;AACP,MAAM,QAAQ,EAAE,CAAC,UAAU,KAAK;AAChC,QAAQ,UAAU,CAAC,GAAG,IAAI,CAAC,uFAAuF,CAAC;AACnH,OAAO;AACP,MAAM,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI;AAC9B,KAAK,CAAC;AACN;AACA,EAAE,GAAG;AACL,IAAI,SAAS,GAAG,IAAI;AACpB,IAAI,eAAe,GAAG,YAAY,CAAC,SAAS,CAAC;AAC7C,IAAI,cAAc,CAAC,eAAe,CAAC;AACnC,GAAG,QAAQ,CAAC,SAAS;AACrB,EAAE,cAAc,CAAC,SAAS,EAAE,eAAe,CAAC;AAC5C,EAAE,UAAU,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC;AACjC,EAAE,GAAG,EAAE;AACP;;;;"}
|