@primate/core 0.5.0 → 0.6.0
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/lib/private/App.d.ts +263 -26
- package/lib/private/App.js +42 -14
- package/lib/private/Flags.d.ts +8 -4
- package/lib/private/Module.d.ts +4 -16
- package/lib/private/Module.js +1 -17
- package/lib/private/app/EnvSchema.d.ts +5 -0
- package/lib/private/app/EnvSchema.js +2 -0
- package/lib/private/app/Facade.browser.d.ts +11 -0
- package/lib/private/app/Facade.browser.js +19 -0
- package/lib/private/app/Facade.d.ts +272 -27
- package/lib/private/app/Facade.js +23 -0
- package/lib/private/build/client/index.js +8 -3
- package/lib/private/build/client/plugin/app-request.d.ts +4 -0
- package/lib/private/build/client/plugin/app-request.js +19 -0
- package/lib/private/build/client/plugin/view.d.ts +4 -0
- package/lib/private/build/client/plugin/view.js +13 -0
- package/lib/private/build/hook.d.ts +1 -2
- package/lib/private/build/hook.js +21 -16
- package/lib/private/build/index.d.ts +2 -1
- package/lib/private/build/index.js +20 -21
- package/lib/private/build/server/index.js +7 -9
- package/lib/private/build/server/plugin/app-request.d.ts +4 -0
- package/lib/private/build/server/plugin/app-request.js +19 -0
- package/lib/private/build/server/plugin/assets.js +1 -1
- package/lib/private/build/server/plugin/live-reload.js +9 -9
- package/lib/private/build/server/plugin/native-addons.js +4 -7
- package/lib/private/build/server/plugin/route.js +2 -2
- package/lib/private/build/server/plugin/store.js +9 -31
- package/lib/private/build/server/plugin/stores.js +11 -7
- package/lib/private/build/server/plugin/view.js +1 -1
- package/lib/private/build/shared/plugin/app-request.d.ts +4 -0
- package/lib/private/build/shared/plugin/app-request.js +19 -0
- package/lib/private/client/Data.d.ts +3 -2
- package/lib/private/{frontend → client}/Render.d.ts +1 -1
- package/lib/private/{frontend → client}/ViewResponse.d.ts +1 -1
- package/lib/private/client/app.js +1 -2
- package/lib/private/client/boot.d.ts +5 -0
- package/lib/private/client/boot.js +64 -0
- package/lib/private/client/create-form.d.ts +1 -0
- package/lib/private/client/create-form.js +19 -20
- package/lib/private/client/extract-issues.js +2 -1
- package/lib/private/client/http.d.ts +13 -0
- package/lib/private/client/http.js +57 -0
- package/lib/private/client/index.d.ts +23 -0
- package/lib/private/client/index.js +16 -0
- package/lib/private/client/navigate.d.ts +13 -0
- package/lib/private/client/navigate.js +67 -0
- package/lib/private/client/root.d.ts +9 -0
- package/lib/private/client/root.js +11 -0
- package/lib/private/client/submit.d.ts +2 -0
- package/lib/private/client/submit.js +41 -0
- package/lib/private/config/index.d.ts +7 -2
- package/lib/private/config/index.js +3 -2
- package/lib/private/config/schema.d.ts +82 -26
- package/lib/private/config/schema.js +17 -4
- package/lib/private/cookie.d.ts +12 -6
- package/lib/private/db/DB.d.ts +21 -5
- package/lib/private/db/DB.js +1 -0
- package/lib/private/db/MemoryDB.d.ts +2 -4
- package/lib/private/db/MemoryDB.js +40 -22
- package/lib/private/db/common.d.ts +7 -0
- package/lib/private/db/common.js +31 -0
- package/lib/private/db/errors.d.ts +104 -0
- package/lib/private/db/errors.js +237 -0
- package/lib/private/db/migrate/apply.d.ts +2 -0
- package/lib/private/db/migrate/apply.js +32 -0
- package/lib/private/db/migrate/bundle.d.ts +3 -0
- package/lib/private/db/migrate/bundle.js +22 -0
- package/lib/private/db/migrate/create.d.ts +2 -0
- package/lib/private/db/migrate/create.js +154 -0
- package/lib/private/db/migrate/index.d.ts +10 -0
- package/lib/private/db/migrate/index.js +6 -0
- package/lib/private/db/migrate/status.d.ts +2 -0
- package/lib/private/db/migrate/status.js +38 -0
- package/lib/private/db/migrate/store.d.ts +5 -0
- package/lib/private/db/migrate/store.js +33 -0
- package/lib/private/db/sql.js +3 -3
- package/lib/private/db/test.js +461 -95
- package/lib/private/errors.d.ts +88 -0
- package/lib/private/errors.js +211 -0
- package/lib/private/frontend.d.ts +72 -0
- package/lib/private/frontend.js +245 -0
- package/lib/private/i18n/Formatter.js +2 -2
- package/lib/private/i18n/errors.d.ts +16 -0
- package/lib/private/i18n/errors.js +27 -0
- package/lib/private/i18n/module.d.ts +3 -0
- package/lib/private/i18n/module.js +115 -0
- package/lib/private/i18n/schema.d.ts +10 -5
- package/lib/private/i18n/validate.js +5 -7
- package/lib/private/index.d.ts +14 -0
- package/lib/private/index.js +2 -0
- package/lib/private/log.js +6 -5
- package/lib/private/module/Setup.d.ts +21 -0
- package/lib/private/module/Setup.js +2 -0
- package/lib/private/module/create.d.ts +16 -0
- package/lib/private/module/create.js +28 -0
- package/lib/private/orm/ExtractSchema.d.ts +9 -0
- package/lib/private/orm/ExtractSchema.js +2 -0
- package/lib/private/orm/ForeignKey.d.ts +5 -2
- package/lib/private/orm/ForeignKey.js +3 -0
- package/lib/private/orm/PrimaryKey.d.ts +5 -3
- package/lib/private/orm/PrimaryKey.js +9 -6
- package/lib/private/orm/StoreInput.d.ts +10 -0
- package/lib/private/orm/StoreInput.js +2 -0
- package/lib/private/orm/key.d.ts +6 -6
- package/lib/private/orm/key.js +7 -3
- package/lib/private/orm/parse.d.ts +5 -4
- package/lib/private/orm/parse.js +2 -2
- package/lib/private/orm/relation.d.ts +2 -2
- package/lib/private/orm/{Store.d.ts → store.d.ts} +33 -17
- package/lib/private/orm/{Store.js → store.js} +91 -67
- package/lib/private/paths.js +3 -3
- package/lib/private/request/RequestBag.d.ts +4 -0
- package/lib/private/request/RequestBag.js +5 -2
- package/lib/private/request/RequestBody.d.ts +6 -9
- package/lib/private/request/RequestBody.js +49 -54
- package/lib/private/request/RequestFacade.d.ts +3 -8
- package/lib/private/request/RequestPublic.d.ts +9 -0
- package/lib/private/request/RequestPublic.js +2 -0
- package/lib/private/request/RequestView.d.ts +11 -0
- package/lib/private/request/RequestView.js +3 -0
- package/lib/private/request/handle.d.ts +4 -0
- package/lib/private/request/handle.js +18 -0
- package/lib/private/request/parse.js +1 -0
- package/lib/private/request/route.js +8 -9
- package/lib/private/request/router.js +21 -49
- package/lib/private/request/storage.d.ts +4 -0
- package/lib/private/request/storage.js +5 -0
- package/lib/private/response/ResponseFunction.d.ts +1 -1
- package/lib/private/response/binary.js +1 -1
- package/lib/private/response/error.d.ts +1 -1
- package/lib/private/response/error.js +1 -1
- package/lib/private/response/json.d.ts +1 -1
- package/lib/private/response/json.js +1 -1
- package/lib/private/response/redirect.d.ts +5 -5
- package/lib/private/response/redirect.js +8 -9
- package/lib/private/response/respond.js +9 -7
- package/lib/private/response/sse.d.ts +1 -1
- package/lib/private/response/sse.js +1 -1
- package/lib/private/response/text.d.ts +1 -1
- package/lib/private/response/text.js +1 -1
- package/lib/private/response/view.d.ts +1 -1
- package/lib/private/response/view.js +6 -13
- package/lib/private/response/ws.d.ts +1 -1
- package/lib/private/route/router.d.ts +3 -3
- package/lib/private/route/router.js +7 -10
- package/lib/private/serve/App.d.ts +6 -7
- package/lib/private/serve/App.js +52 -43
- package/lib/private/serve/Init.d.ts +2 -2
- package/lib/private/serve/dev-module.d.ts +2 -0
- package/lib/private/serve/dev-module.js +34 -0
- package/lib/private/serve/hook.d.ts +1 -2
- package/lib/private/serve/hook.js +2 -3
- package/lib/private/serve/index.d.ts +1 -1
- package/lib/private/serve/index.js +32 -2
- package/lib/private/server/TAG.d.ts +3 -0
- package/lib/private/server/TAG.js +2 -0
- package/lib/private/server/index.d.ts +5 -0
- package/lib/private/server/index.js +6 -0
- package/lib/private/session/SessionHandle.js +2 -1
- package/lib/private/session/index.d.ts +1 -1
- package/lib/private/session/module.d.ts +3 -0
- package/lib/private/session/module.js +114 -0
- package/lib/private/session/schema.d.ts +17 -9
- package/lib/private/session/schema.js +9 -5
- package/lib/private/target/Manager.js +6 -12
- package/lib/public/client.d.ts +2 -13
- package/lib/public/client.js +1 -9
- package/lib/public/db/errors.d.ts +2 -0
- package/lib/public/db/errors.js +2 -0
- package/lib/public/db/migrate.d.ts +2 -0
- package/lib/public/db/migrate.js +2 -0
- package/lib/public/db.d.ts +3 -3
- package/lib/public/frontend.d.ts +3 -0
- package/lib/public/frontend.js +2 -0
- package/lib/public/index.d.ts +2 -0
- package/lib/public/index.js +2 -0
- package/lib/public/orm/store.d.ts +2 -0
- package/lib/public/orm/store.js +2 -0
- package/lib/public/request/server.d.ts +5 -0
- package/lib/public/request/server.js +7 -0
- package/lib/public/response.d.ts +4 -4
- package/lib/public/server.d.ts +3 -0
- package/lib/public/server.js +2 -0
- package/package.json +30 -25
- package/lib/private/AppError.d.ts +0 -4
- package/lib/private/AppError.js +0 -8
- package/lib/private/backend/Module.d.ts +0 -18
- package/lib/private/backend/Module.js +0 -19
- package/lib/private/backend/TAG.d.ts +0 -3
- package/lib/private/backend/TAG.js +0 -2
- package/lib/private/build/server/plugin/db-default.d.ts +0 -4
- package/lib/private/build/server/plugin/db-default.js +0 -45
- package/lib/private/build/server/plugin/store-wrap.d.ts +0 -4
- package/lib/private/build/server/plugin/store-wrap.js +0 -33
- package/lib/private/client/spa/index.d.ts +0 -6
- package/lib/private/client/spa/index.js +0 -200
- package/lib/private/db/error.d.ts +0 -81
- package/lib/private/db/error.js +0 -199
- package/lib/private/db/symbol/wrap.d.ts +0 -3
- package/lib/private/db/symbol/wrap.js +0 -2
- package/lib/private/fail.d.ts +0 -3
- package/lib/private/fail.js +0 -5
- package/lib/private/frontend/Module.d.ts +0 -62
- package/lib/private/frontend/Module.js +0 -255
- package/lib/private/i18n/Module.d.ts +0 -16
- package/lib/private/i18n/Module.js +0 -133
- package/lib/private/module/BuildHook.d.ts +0 -5
- package/lib/private/module/BuildHook.js +0 -2
- package/lib/private/module/NextBuild.d.ts +0 -5
- package/lib/private/module/NextBuild.js +0 -2
- package/lib/private/module/NextServe.d.ts +0 -5
- package/lib/private/module/NextServe.js +0 -2
- package/lib/private/orm/Set.d.ts +0 -11
- package/lib/private/orm/Set.js +0 -2
- package/lib/private/orm/foreign.d.ts +0 -4
- package/lib/private/orm/foreign.js +0 -5
- package/lib/private/orm/primary.d.ts +0 -5
- package/lib/private/orm/primary.js +0 -5
- package/lib/private/orm/types.d.ts +0 -18
- package/lib/private/orm/types.js +0 -2
- package/lib/private/orm/wrap.d.ts +0 -5
- package/lib/private/orm/wrap.js +0 -5
- package/lib/private/reducer.d.ts +0 -24
- package/lib/private/reducer.js +0 -10
- package/lib/private/serve/module/Dev.d.ts +0 -11
- package/lib/private/serve/module/Dev.js +0 -32
- package/lib/private/serve/module/Handle.d.ts +0 -10
- package/lib/private/serve/module/Handle.js +0 -15
- package/lib/private/session/SessionModule.d.ts +0 -14
- package/lib/private/session/SessionModule.js +0 -122
- package/lib/public/App.d.ts +0 -2
- package/lib/public/App.js +0 -2
- package/lib/public/AppError.d.ts +0 -2
- package/lib/public/AppError.js +0 -2
- package/lib/public/BuildApp.d.ts +0 -2
- package/lib/public/BuildApp.js +0 -2
- package/lib/public/BuildHook.d.ts +0 -2
- package/lib/public/BuildHook.js +0 -2
- package/lib/public/Mode.d.ts +0 -2
- package/lib/public/Mode.js +0 -2
- package/lib/public/Module.d.ts +0 -2
- package/lib/public/Module.js +0 -2
- package/lib/public/Next.d.ts +0 -2
- package/lib/public/Next.js +0 -2
- package/lib/public/NextBuild.d.ts +0 -2
- package/lib/public/NextBuild.js +0 -2
- package/lib/public/NextHandle.d.ts +0 -2
- package/lib/public/NextHandle.js +0 -2
- package/lib/public/NextRoute.d.ts +0 -3
- package/lib/public/NextRoute.js +0 -2
- package/lib/public/NextServe.d.ts +0 -2
- package/lib/public/NextServe.js +0 -2
- package/lib/public/ServeApp.d.ts +0 -2
- package/lib/public/ServeApp.js +0 -2
- package/lib/public/Target.d.ts +0 -2
- package/lib/public/Target.js +0 -2
- package/lib/public/backend/Module.d.ts +0 -2
- package/lib/public/backend/Module.js +0 -2
- package/lib/public/backend/TAG.d.ts +0 -2
- package/lib/public/backend/TAG.js +0 -2
- package/lib/public/client/Data.d.ts +0 -2
- package/lib/public/client/Data.js +0 -2
- package/lib/public/client/spa.d.ts +0 -2
- package/lib/public/client/spa.js +0 -2
- package/lib/public/db/error.d.ts +0 -2
- package/lib/public/db/error.js +0 -2
- package/lib/public/fail.d.ts +0 -2
- package/lib/public/fail.js +0 -2
- package/lib/public/frontend/Module.d.ts +0 -2
- package/lib/public/frontend/Module.js +0 -2
- package/lib/public/frontend/Publish.d.ts +0 -2
- package/lib/public/frontend/Publish.js +0 -2
- package/lib/public/frontend/Render.d.ts +0 -2
- package/lib/public/frontend/Render.js +0 -2
- package/lib/public/frontend/ViewResponse.d.ts +0 -2
- package/lib/public/frontend/ViewResponse.js +0 -2
- package/lib/public/orm/Store.d.ts +0 -2
- package/lib/public/orm/Store.js +0 -2
- package/lib/public/orm/wrap.d.ts +0 -2
- package/lib/public/orm/wrap.js +0 -2
- package/lib/public/request.d.ts +0 -4
- package/lib/public/request.js +0 -2
- /package/lib/private/{frontend → client}/Publish.d.ts +0 -0
- /package/lib/private/{frontend → client}/Publish.js +0 -0
- /package/lib/private/{frontend → client}/Render.js +0 -0
- /package/lib/private/{frontend → client}/ServerData.d.ts +0 -0
- /package/lib/private/{frontend → client}/ServerData.js +0 -0
- /package/lib/private/{frontend → client}/ServerView.d.ts +0 -0
- /package/lib/private/{frontend → client}/ServerView.js +0 -0
- /package/lib/private/{frontend → client}/View.d.ts +0 -0
- /package/lib/private/{frontend → client}/View.js +0 -0
- /package/lib/private/{frontend → client}/ViewOptions.d.ts +0 -0
- /package/lib/private/{frontend → client}/ViewOptions.js +0 -0
- /package/lib/private/{frontend → client}/ViewResponse.js +0 -0
- /package/lib/private/client/{spa/storage.d.ts → storage.d.ts} +0 -0
- /package/lib/private/client/{spa/storage.js → storage.js} +0 -0
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import Module from "#Module";
|
|
2
|
-
import type RequestFacade from "#request/RequestFacade";
|
|
3
|
-
import type ServeApp from "#serve/App";
|
|
4
|
-
export default class HandleModule extends Module {
|
|
5
|
-
#private;
|
|
6
|
-
name: string;
|
|
7
|
-
constructor(app: ServeApp);
|
|
8
|
-
handle(request: RequestFacade): Promise<Response>;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=Handle.d.ts.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import Module from "#Module";
|
|
2
|
-
import route from "#request/route";
|
|
3
|
-
export default class HandleModule extends Module {
|
|
4
|
-
name = "builtin/handle";
|
|
5
|
-
#app;
|
|
6
|
-
constructor(app) {
|
|
7
|
-
super();
|
|
8
|
-
this.#app = app;
|
|
9
|
-
}
|
|
10
|
-
async handle(request) {
|
|
11
|
-
return await this.#app.serve_assets(request.url.pathname)
|
|
12
|
-
?? route(this.#app, request);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=Handle.js.map
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import Module from "#Module";
|
|
2
|
-
import type NextHandle from "#module/NextHandle";
|
|
3
|
-
import type NextServe from "#module/NextServe";
|
|
4
|
-
import type RequestFacade from "#request/RequestFacade";
|
|
5
|
-
import type ServeApp from "#serve/App";
|
|
6
|
-
import type Config from "#session/Config";
|
|
7
|
-
export default class SessionModule extends Module {
|
|
8
|
-
#private;
|
|
9
|
-
name: string;
|
|
10
|
-
constructor(secure: boolean, config: Config);
|
|
11
|
-
serve(app: ServeApp, next: NextServe): Promise<ServeApp>;
|
|
12
|
-
handle(request: RequestFacade, next: NextHandle): Promise<Response>;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=SessionModule.d.ts.map
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import fail from "#fail";
|
|
2
|
-
import Module from "#Module";
|
|
3
|
-
import kSerialize from "#session/k-serialize";
|
|
4
|
-
import SessionHandle from "#session/SessionHandle";
|
|
5
|
-
import storage from "#session/storage";
|
|
6
|
-
import p from "pema";
|
|
7
|
-
const cookie = (name, value, options) => {
|
|
8
|
-
const parts = [`${name}=${value}`];
|
|
9
|
-
parts.push(`Path=${options.path}`);
|
|
10
|
-
parts.push(`SameSite=${options.sameSite}`);
|
|
11
|
-
if (options.maxAge !== undefined)
|
|
12
|
-
parts.push(`Max-Age=${options.maxAge}`);
|
|
13
|
-
if (options.httpOnly)
|
|
14
|
-
parts.push("HttpOnly");
|
|
15
|
-
if (options.secure)
|
|
16
|
-
parts.push("Secure");
|
|
17
|
-
return parts.join("; ");
|
|
18
|
-
};
|
|
19
|
-
export default class SessionModule extends Module {
|
|
20
|
-
name = "builtin/session";
|
|
21
|
-
#store;
|
|
22
|
-
#secure;
|
|
23
|
-
#config;
|
|
24
|
-
constructor(secure, config) {
|
|
25
|
-
super();
|
|
26
|
-
this.#secure = secure;
|
|
27
|
-
this.#config = config;
|
|
28
|
-
this.#store = config.store;
|
|
29
|
-
const props = this.#store.type.properties;
|
|
30
|
-
if (!("session_id" in props)) {
|
|
31
|
-
throw fail("Session store must have a session_id field");
|
|
32
|
-
}
|
|
33
|
-
try {
|
|
34
|
-
props.session_id.parse(crypto.randomUUID());
|
|
35
|
-
}
|
|
36
|
-
catch {
|
|
37
|
-
throw fail("Session store session_id must be a string type");
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
async serve(app, next) {
|
|
41
|
-
await this.#store.collection.create();
|
|
42
|
-
return next(app);
|
|
43
|
-
}
|
|
44
|
-
async handle(request, next) {
|
|
45
|
-
const { name, ...config } = this.#config.cookie;
|
|
46
|
-
const sid = request.cookies.try(name);
|
|
47
|
-
// Look up session by session_id
|
|
48
|
-
const existing = sid !== undefined
|
|
49
|
-
? await this.#store.find({ where: { session_id: sid }, limit: 1 })
|
|
50
|
-
: [];
|
|
51
|
-
const exists = existing.length > 0;
|
|
52
|
-
let data = undefined;
|
|
53
|
-
let db_id = undefined;
|
|
54
|
-
if (exists) {
|
|
55
|
-
const record = existing[0];
|
|
56
|
-
const { id: _id, session_id: _sid, ...rest } = record;
|
|
57
|
-
data = rest;
|
|
58
|
-
db_id = _id;
|
|
59
|
-
}
|
|
60
|
-
const session_type = p.omit(this.#store.type, "id", "session_id");
|
|
61
|
-
const session = new SessionHandle(sid, data, session_type);
|
|
62
|
-
const response = await new Promise((resolve, reject) => {
|
|
63
|
-
storage().run(session, async () => {
|
|
64
|
-
try {
|
|
65
|
-
resolve(await next(request));
|
|
66
|
-
}
|
|
67
|
-
catch (e) {
|
|
68
|
-
reject(e);
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
const snap = session[kSerialize]();
|
|
73
|
-
// no cookie coming in, no session created
|
|
74
|
-
if (sid === undefined && !snap.exists)
|
|
75
|
-
return response;
|
|
76
|
-
const options = {
|
|
77
|
-
httpOnly: !!config.httpOnly,
|
|
78
|
-
path: config.path,
|
|
79
|
-
sameSite: config.sameSite,
|
|
80
|
-
secure: this.#secure,
|
|
81
|
-
};
|
|
82
|
-
// no session existed -> either create or noop
|
|
83
|
-
if (!exists) {
|
|
84
|
-
if (!snap.exists) {
|
|
85
|
-
// stale cookie -> clear
|
|
86
|
-
if (sid !== undefined) {
|
|
87
|
-
response.headers.append("set-cookie", cookie(name, "", {
|
|
88
|
-
...options, maxAge: 0,
|
|
89
|
-
}));
|
|
90
|
-
}
|
|
91
|
-
return response;
|
|
92
|
-
}
|
|
93
|
-
// create new session
|
|
94
|
-
await this.#store.insert({ session_id: snap.id, ...snap.data });
|
|
95
|
-
response.headers.append("set-cookie", cookie(name, snap.id, options));
|
|
96
|
-
return response;
|
|
97
|
-
}
|
|
98
|
-
// from here: session existed (db_id is defined)
|
|
99
|
-
// fast-path: session exists, same id and not dirty -> noop
|
|
100
|
-
if (snap.exists && snap.id === sid && !snap.dirty)
|
|
101
|
-
return response;
|
|
102
|
-
// current absent -> destroy + clear cookie
|
|
103
|
-
if (!snap.exists) {
|
|
104
|
-
await this.#store.delete(db_id);
|
|
105
|
-
response.headers.append("set-cookie", cookie(name, "", {
|
|
106
|
-
...options, maxAge: 0,
|
|
107
|
-
}));
|
|
108
|
-
return response;
|
|
109
|
-
}
|
|
110
|
-
// session recreated in route -> destroy old, create new, set cookie
|
|
111
|
-
if (snap.id !== sid) {
|
|
112
|
-
await this.#store.delete(db_id);
|
|
113
|
-
await this.#store.insert({ session_id: snap.id, ...snap.data });
|
|
114
|
-
response.headers.append("set-cookie", cookie(name, snap.id, options));
|
|
115
|
-
return response;
|
|
116
|
-
}
|
|
117
|
-
// dirty -> replace session contents
|
|
118
|
-
await this.#store.update(db_id, { set: snap.data });
|
|
119
|
-
return response;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
//# sourceMappingURL=SessionModule.js.map
|
package/lib/public/App.d.ts
DELETED
package/lib/public/App.js
DELETED
package/lib/public/AppError.d.ts
DELETED
package/lib/public/AppError.js
DELETED
package/lib/public/BuildApp.d.ts
DELETED
package/lib/public/BuildApp.js
DELETED
package/lib/public/BuildHook.js
DELETED
package/lib/public/Mode.d.ts
DELETED
package/lib/public/Mode.js
DELETED
package/lib/public/Module.d.ts
DELETED
package/lib/public/Module.js
DELETED
package/lib/public/Next.d.ts
DELETED
package/lib/public/Next.js
DELETED
package/lib/public/NextBuild.js
DELETED
package/lib/public/NextHandle.js
DELETED
package/lib/public/NextRoute.js
DELETED
package/lib/public/NextServe.js
DELETED
package/lib/public/ServeApp.d.ts
DELETED
package/lib/public/ServeApp.js
DELETED
package/lib/public/Target.d.ts
DELETED
package/lib/public/Target.js
DELETED
package/lib/public/client/spa.js
DELETED
package/lib/public/db/error.d.ts
DELETED
package/lib/public/db/error.js
DELETED
package/lib/public/fail.d.ts
DELETED
package/lib/public/fail.js
DELETED
package/lib/public/orm/Store.js
DELETED
package/lib/public/orm/wrap.d.ts
DELETED
package/lib/public/orm/wrap.js
DELETED
package/lib/public/request.d.ts
DELETED
package/lib/public/request.js
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|