@afora/core 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +127 -23
- package/dist/adapters.d.ts +25 -0
- package/dist/adapters.js +56 -0
- package/dist/core/application/exceptions.d.ts +17 -0
- package/dist/core/application/migrate.d.ts +19 -0
- package/dist/core/application/schema.d.ts +30 -0
- package/dist/core/application/types/application.interface.d.ts +37 -0
- package/dist/core/auth/jwt.d.ts +30 -0
- package/dist/core/auth/types/jwt.interface.d.ts +66 -0
- package/dist/core/blueprint/exceptions.d.ts +5 -0
- package/dist/core/blueprint/optional.d.ts +3 -1
- package/dist/core/blueprint/types/blueprint.interface.d.ts +79 -5
- package/dist/core/blueprint/variant.d.ts +32 -0
- package/dist/core/entity/abstract-entity.d.ts +5 -0
- package/dist/core/entity/entity.d.ts +1 -1
- package/dist/core/entity/exceptions.d.ts +9 -0
- package/dist/core/entity/trust.d.ts +24 -0
- package/dist/core/entity/types/entity.interface.d.ts +30 -0
- package/dist/core/output/access.d.ts +16 -0
- package/dist/core/output/exceptions.d.ts +16 -0
- package/dist/core/output/http.d.ts +36 -0
- package/dist/core/output/openapi-sink.d.ts +23 -2
- package/dist/core/output/stage.d.ts +7 -2
- package/dist/core/output/status.d.ts +1 -1
- package/dist/core/output/types/http.interface.d.ts +130 -0
- package/dist/core/output/types/output.interface.d.ts +25 -5
- package/dist/core/parse/issue.d.ts +28 -3
- package/dist/core/parse/parse.d.ts +9 -0
- package/dist/core/property/abstract-property.d.ts +9 -0
- package/dist/core/property/define-property.d.ts +34 -6
- package/dist/core/property/types/property-options.interface.d.ts +10 -0
- package/dist/core/property/types/property-type.interface.d.ts +4 -0
- package/dist/core/record/abstract-record.d.ts +7 -0
- package/dist/core/record/types/record.interface.d.ts +12 -1
- package/dist/core/repository/exceptions.d.ts +13 -0
- package/dist/core/repository/in-memory.d.ts +2 -2
- package/dist/core/repository/migrate.d.ts +20 -0
- package/dist/core/repository/state.d.ts +2 -0
- package/dist/core/repository/types/repository.interface.d.ts +33 -0
- package/dist/core/repository/types/schema.interface.d.ts +126 -0
- package/dist/core/repository/upcast.d.ts +64 -0
- package/dist/core/schema/schema.d.ts +28 -0
- package/dist/core/symbols/kind.d.ts +1 -1
- package/dist/core/use-case/access.d.ts +12 -0
- package/dist/core/use-case/decorators.d.ts +40 -0
- package/dist/core/use-case/route.d.ts +18 -0
- package/dist/core/use-case/steps/types/check.interface.d.ts +214 -0
- package/dist/core/use-case/types/access.interface.d.ts +39 -0
- package/dist/core/use-case/types/route.interface.d.ts +66 -0
- package/dist/core/use-case/use-case.d.ts +52 -2
- package/dist/experimental.d.ts +13 -1
- package/dist/experimental.js +63 -25
- package/dist/index-3aae5jfq.js +2997 -0
- package/dist/index-hg1z2s2v.js +1055 -0
- package/dist/index-ny3as79r.js +4567 -0
- package/dist/index-xegv6a1p.js +4291 -0
- package/dist/index-y280ew0k.js +396 -0
- package/dist/index.d.ts +45 -49
- package/dist/index.js +110 -186
- package/dist/std/properties/password.d.ts +0 -2
- package/dist/std/record-plugins.d.ts +2 -2
- package/dist/std/resource.d.ts +31 -0
- package/dist/std/runtime.d.ts +6 -0
- package/dist/std/use-cases/auth.d.ts +5 -1
- package/dist/std/use-cases/index.d.ts +1 -1
- package/dist/std/use-cases/shared.d.ts +2 -2
- package/dist/std/use-cases/types.d.ts +97 -1
- package/dist/testing/http-provider-contract.d.ts +32 -0
- package/dist/testing/index.d.ts +2 -0
- package/dist/testing/index.js +495 -4
- package/dist/testing/provider-contract.d.ts +17 -1
- package/package.json +16 -3
- package/dist/index-qxfkyd6k.js +0 -1721
- package/dist/index-t5qwtyj5.js +0 -8194
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
import {
|
|
2
|
+
statusOf2,
|
|
3
|
+
PROBLEM_MEDIA_TYPE2,
|
|
4
|
+
problemOf2,
|
|
5
|
+
outputValueOf2,
|
|
6
|
+
ROUTE_OPTION_KEYS2,
|
|
7
|
+
routeOptionsIssue2,
|
|
8
|
+
requestIdHeaderOf2,
|
|
9
|
+
operationRoutes2,
|
|
10
|
+
openapi2
|
|
11
|
+
} from "./index-hg1z2s2v.js";
|
|
12
|
+
import {
|
|
13
|
+
Exception2,
|
|
14
|
+
toOpenAPI2,
|
|
15
|
+
HEADER_NAME,
|
|
16
|
+
InvalidOutputStage2,
|
|
17
|
+
jwtOptionsIssue,
|
|
18
|
+
jwtOf2
|
|
19
|
+
} from "./index-xegv6a1p.js";
|
|
20
|
+
// src/core/output/coerce.ts
|
|
21
|
+
var scalarTypes = new WeakMap;
|
|
22
|
+
function scalarTypesOf(blueprint) {
|
|
23
|
+
let types = scalarTypes.get(blueprint);
|
|
24
|
+
if (!types) {
|
|
25
|
+
const schema = toOpenAPI2(blueprint);
|
|
26
|
+
const found = {};
|
|
27
|
+
for (const [key, property] of Object.entries(schema.properties ?? {})) {
|
|
28
|
+
found[key] = [property.type ?? []].flat();
|
|
29
|
+
}
|
|
30
|
+
types = Object.freeze(found);
|
|
31
|
+
scalarTypes.set(blueprint, types);
|
|
32
|
+
}
|
|
33
|
+
return types;
|
|
34
|
+
}
|
|
35
|
+
function coerce(text, types) {
|
|
36
|
+
if (!types || types.includes("string"))
|
|
37
|
+
return text;
|
|
38
|
+
const trimmed = text.trim();
|
|
39
|
+
if (types.includes("boolean") && (trimmed === "true" || trimmed === "false")) {
|
|
40
|
+
return trimmed === "true";
|
|
41
|
+
}
|
|
42
|
+
if (types.includes("integer") || types.includes("number")) {
|
|
43
|
+
const number = trimmed === "" ? Number.NaN : Number(trimmed);
|
|
44
|
+
if (Number.isFinite(number))
|
|
45
|
+
return number;
|
|
46
|
+
}
|
|
47
|
+
return text;
|
|
48
|
+
}
|
|
49
|
+
function coerceTextValues2(blueprint, texts) {
|
|
50
|
+
const types = scalarTypesOf(blueprint);
|
|
51
|
+
const out = {};
|
|
52
|
+
for (const [key, value] of Object.entries(texts)) {
|
|
53
|
+
if (value !== undefined)
|
|
54
|
+
out[key] = coerce(value, types[key]);
|
|
55
|
+
}
|
|
56
|
+
return out;
|
|
57
|
+
}
|
|
58
|
+
// src/core/output/http.ts
|
|
59
|
+
function isObject(value) {
|
|
60
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
61
|
+
}
|
|
62
|
+
function onlyKeys(value, allowed, where) {
|
|
63
|
+
for (const key of Object.keys(value)) {
|
|
64
|
+
if (!allowed.includes(key))
|
|
65
|
+
return `${where} has no option "${key}".`;
|
|
66
|
+
}
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
var HTTP_OPTION_KEYS2 = [
|
|
70
|
+
...ROUTE_OPTION_KEYS2,
|
|
71
|
+
"docs",
|
|
72
|
+
"debug",
|
|
73
|
+
"context",
|
|
74
|
+
"auth"
|
|
75
|
+
];
|
|
76
|
+
function httpOptionsIssue2(options, where) {
|
|
77
|
+
const given = options;
|
|
78
|
+
const routing = routeOptionsIssue2(options, where);
|
|
79
|
+
if (routing)
|
|
80
|
+
return routing;
|
|
81
|
+
if (given.debug !== undefined && typeof given.debug !== "boolean") {
|
|
82
|
+
return `Expected ${where}.debug to be a boolean.`;
|
|
83
|
+
}
|
|
84
|
+
const { docs, context, auth } = given;
|
|
85
|
+
if (auth !== undefined) {
|
|
86
|
+
if (!isObject(auth) || Object.keys(auth).join() !== "jwt") {
|
|
87
|
+
return `Expected ${where}.auth to be { jwt: { secret, ... } }.`;
|
|
88
|
+
}
|
|
89
|
+
const bad = jwtOptionsIssue(auth.jwt, `${where}.auth.jwt`, ["header", "cookie"], true);
|
|
90
|
+
if (bad)
|
|
91
|
+
return bad;
|
|
92
|
+
const { header, cookie } = auth.jwt;
|
|
93
|
+
for (const [key, value] of [
|
|
94
|
+
["header", header],
|
|
95
|
+
["cookie", cookie]
|
|
96
|
+
]) {
|
|
97
|
+
if (value !== undefined && (typeof value !== "string" || !HEADER_NAME.test(value))) {
|
|
98
|
+
return `Expected ${where}.auth.jwt.${key} to be the name of a ${key}.`;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
if (docs !== undefined) {
|
|
103
|
+
if (!isObject(docs))
|
|
104
|
+
return `Expected ${where}.docs to be an object.`;
|
|
105
|
+
const docsBad = onlyKeys(docs, ["path", "info", "servers"], `${where}.docs`);
|
|
106
|
+
if (docsBad)
|
|
107
|
+
return docsBad;
|
|
108
|
+
if (typeof docs.path !== "string" || !docs.path.startsWith("/") || /[{}?#\s:*]/.test(docs.path)) {
|
|
109
|
+
return `Expected ${where}.docs.path to be a path such as "/openapi.json".`;
|
|
110
|
+
}
|
|
111
|
+
try {
|
|
112
|
+
openapi2({
|
|
113
|
+
info: docs.info,
|
|
114
|
+
...docs.servers ? { servers: docs.servers } : {}
|
|
115
|
+
});
|
|
116
|
+
} catch (error) {
|
|
117
|
+
const reason = error.details?.reason;
|
|
118
|
+
return (reason ?? `Expected ${where}.docs to be valid.`).replaceAll("openapi.", `${where}.docs.`);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
if (context !== undefined) {
|
|
122
|
+
if (!isObject(context))
|
|
123
|
+
return `Expected ${where}.context to be an object.`;
|
|
124
|
+
const contextBad = onlyKeys(context, ["headers", "variables"], `${where}.context`);
|
|
125
|
+
if (contextBad)
|
|
126
|
+
return contextBad;
|
|
127
|
+
const { headers, variables } = context;
|
|
128
|
+
if (headers !== undefined) {
|
|
129
|
+
if (!isObject(headers)) {
|
|
130
|
+
return `Expected ${where}.context.headers to be an object.`;
|
|
131
|
+
}
|
|
132
|
+
for (const [key, name] of Object.entries(headers)) {
|
|
133
|
+
if (typeof name !== "string" || !HEADER_NAME.test(name)) {
|
|
134
|
+
return `Expected ${where}.context.headers["${key}"] to be a header name.`;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
if (variables !== undefined) {
|
|
139
|
+
if (!isObject(variables)) {
|
|
140
|
+
return `Expected ${where}.context.variables to be an object.`;
|
|
141
|
+
}
|
|
142
|
+
for (const [key, name] of Object.entries(variables)) {
|
|
143
|
+
if (typeof name !== "string" || name === "") {
|
|
144
|
+
return `Expected ${where}.context.variables["${key}"] to be the name of a variable.`;
|
|
145
|
+
}
|
|
146
|
+
if (isObject(headers) && Object.hasOwn(headers, key)) {
|
|
147
|
+
return `${where}.context maps "${key}" both from a header and from a variable; keep one.`;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
var REQUEST_ID = /^[\x21-\x7e]{1,200}$/;
|
|
155
|
+
var JSON_TYPE = "application/json";
|
|
156
|
+
var NO_COOKIES = Object.freeze([]);
|
|
157
|
+
function cookiesOf(header) {
|
|
158
|
+
const cookies = new Map;
|
|
159
|
+
if (!header)
|
|
160
|
+
return cookies;
|
|
161
|
+
for (const pair of header.split(";")) {
|
|
162
|
+
const at = pair.indexOf("=");
|
|
163
|
+
if (at < 0)
|
|
164
|
+
continue;
|
|
165
|
+
const name = pair.slice(0, at).trim();
|
|
166
|
+
if (name === "" || cookies.has(name))
|
|
167
|
+
continue;
|
|
168
|
+
let value = pair.slice(at + 1).trim();
|
|
169
|
+
if (value.length > 1 && value.startsWith('"') && value.endsWith('"')) {
|
|
170
|
+
value = value.slice(1, -1);
|
|
171
|
+
}
|
|
172
|
+
if (value.includes("%")) {
|
|
173
|
+
try {
|
|
174
|
+
value = decodeURIComponent(value);
|
|
175
|
+
} catch {}
|
|
176
|
+
}
|
|
177
|
+
cookies.set(name, value);
|
|
178
|
+
}
|
|
179
|
+
return cookies;
|
|
180
|
+
}
|
|
181
|
+
function cookieWriterOf(cookie) {
|
|
182
|
+
const sameSite = cookie.sameSite ?? "lax";
|
|
183
|
+
const attributes = [
|
|
184
|
+
`Path=${cookie.path ?? "/"}`,
|
|
185
|
+
...cookie.domain === undefined ? [] : [`Domain=${cookie.domain}`],
|
|
186
|
+
...cookie.httpOnly === false ? [] : ["HttpOnly"],
|
|
187
|
+
...cookie.secure === false ? [] : ["Secure"],
|
|
188
|
+
`SameSite=${sameSite.charAt(0).toUpperCase()}${sameSite.slice(1)}`
|
|
189
|
+
].join("; ");
|
|
190
|
+
const lasting = cookie.maxAge === undefined ? "" : `; Max-Age=${cookie.maxAge}`;
|
|
191
|
+
return (value) => value === "" ? `${cookie.name}=; ${attributes}; Max-Age=0` : `${cookie.name}=${encodeURIComponent(value)}; ${attributes}${lasting}`;
|
|
192
|
+
}
|
|
193
|
+
function compileRoutes2(operations, options, context, settings) {
|
|
194
|
+
const { source } = settings;
|
|
195
|
+
const { output } = context;
|
|
196
|
+
let authenticator = settings.authenticator;
|
|
197
|
+
if (!authenticator && options.auth) {
|
|
198
|
+
const { header, cookie, ...jwt } = options.auth.jwt;
|
|
199
|
+
authenticator = jwtOf2(jwt).authenticator({
|
|
200
|
+
...header === undefined ? {} : { header },
|
|
201
|
+
...cookie === undefined ? {} : { cookie }
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
const routes = operationRoutes2(operations, options, source);
|
|
205
|
+
const debug = options.debug === true;
|
|
206
|
+
const contextHeaders = options.context?.headers ?? {};
|
|
207
|
+
const contextVariables = options.context?.variables ?? {};
|
|
208
|
+
const requestIdHeader = requestIdHeaderOf2(options);
|
|
209
|
+
const idOf = (request) => {
|
|
210
|
+
const sent = request?.header(requestIdHeader);
|
|
211
|
+
return sent !== undefined && REQUEST_ID.test(sent) ? sent : crypto.randomUUID();
|
|
212
|
+
};
|
|
213
|
+
const headersOf = (headers, request) => requestIdHeader === undefined ? headers : { ...headers, [requestIdHeader]: idOf(request) };
|
|
214
|
+
const problemHeaders = Object.freeze({ "content-type": PROBLEM_MEDIA_TYPE2 });
|
|
215
|
+
const problem = (body, status, request) => ({
|
|
216
|
+
status,
|
|
217
|
+
headers: headersOf(problemHeaders, request),
|
|
218
|
+
cookies: NO_COOKIES,
|
|
219
|
+
body: JSON.stringify(body)
|
|
220
|
+
});
|
|
221
|
+
const fail = (error, operation, request, fallback) => {
|
|
222
|
+
const status = fallback !== undefined && !(error instanceof Exception2 && Object.hasOwn(output.statuses, error.name)) ? fallback : statusOf2(error, operation, output.statuses);
|
|
223
|
+
return problem(problemOf2(error, { status, debug }), status, request);
|
|
224
|
+
};
|
|
225
|
+
const failure = (error, given) => fail(error, given?.operation, given?.request, given?.status);
|
|
226
|
+
const compiled = operations.map((operation) => {
|
|
227
|
+
const route = routes.get(operation.id);
|
|
228
|
+
const { method, path, parameters, status, body } = route;
|
|
229
|
+
const queryKeys = body ? route.query : [];
|
|
230
|
+
const headerKeys = Object.entries(route.requestHeaders);
|
|
231
|
+
const cookieKeys = Object.entries(route.cookies);
|
|
232
|
+
const placed = parameters.length + queryKeys.length + headerKeys.length + cookieKeys.length > 0;
|
|
233
|
+
const declared = operation.context ? Object.keys(operation.context.properties) : [];
|
|
234
|
+
const contextHeaderKeys = declared.filter((key) => Object.hasOwn(contextHeaders, key)).map((key) => [key, contextHeaders[key].toLowerCase()]);
|
|
235
|
+
const contextVariableKeys = declared.filter((key) => Object.hasOwn(contextVariables, key)).map((key) => [key, contextVariables[key]]);
|
|
236
|
+
const guarded = operation.access !== undefined && operation.access.public !== true;
|
|
237
|
+
const setCookies = Object.entries(route.setCookies).map(([key, cookie]) => [key, cookieWriterOf(cookie)]);
|
|
238
|
+
const successHeaders = Object.freeze(status === 204 ? { ...route.headers } : { "content-type": JSON_TYPE, ...route.headers });
|
|
239
|
+
const readsCookies = cookieKeys.length > 0;
|
|
240
|
+
const authenticates = guarded && authenticator !== undefined;
|
|
241
|
+
const hasContext = operation.context !== undefined;
|
|
242
|
+
const handle = async (request) => {
|
|
243
|
+
try {
|
|
244
|
+
let cookies;
|
|
245
|
+
let principal;
|
|
246
|
+
if (authenticates) {
|
|
247
|
+
principal = await authenticator({
|
|
248
|
+
header: (name) => request.header(name),
|
|
249
|
+
cookie: (name) => {
|
|
250
|
+
cookies ??= cookiesOf(request.header("cookie"));
|
|
251
|
+
return cookies.get(name);
|
|
252
|
+
},
|
|
253
|
+
operation,
|
|
254
|
+
native: request.native
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
let input;
|
|
258
|
+
if (body) {
|
|
259
|
+
const text = await request.text();
|
|
260
|
+
try {
|
|
261
|
+
input = text.trim() === "" ? {} : JSON.parse(text);
|
|
262
|
+
} catch {
|
|
263
|
+
return problem({
|
|
264
|
+
type: "urn:afora:exception:InvalidRequestBody",
|
|
265
|
+
title: "InvalidRequestBody",
|
|
266
|
+
status: 400,
|
|
267
|
+
detail: "The request body is not valid JSON."
|
|
268
|
+
}, 400, request);
|
|
269
|
+
}
|
|
270
|
+
} else {
|
|
271
|
+
input = coerceTextValues2(operation.input, request.query());
|
|
272
|
+
}
|
|
273
|
+
if (placed && isObject(input)) {
|
|
274
|
+
const texts = {};
|
|
275
|
+
if (queryKeys.length > 0) {
|
|
276
|
+
const query = request.query();
|
|
277
|
+
for (const key of queryKeys)
|
|
278
|
+
texts[key] = query[key];
|
|
279
|
+
}
|
|
280
|
+
for (const [key, name] of headerKeys) {
|
|
281
|
+
texts[key] = request.header(name);
|
|
282
|
+
}
|
|
283
|
+
if (readsCookies) {
|
|
284
|
+
cookies ??= cookiesOf(request.header("cookie"));
|
|
285
|
+
for (const [key, name] of cookieKeys)
|
|
286
|
+
texts[key] = cookies.get(name);
|
|
287
|
+
}
|
|
288
|
+
for (const name of parameters)
|
|
289
|
+
texts[name] = request.param(name);
|
|
290
|
+
input = { ...input, ...coerceTextValues2(operation.input, texts) };
|
|
291
|
+
}
|
|
292
|
+
let call;
|
|
293
|
+
if (hasContext) {
|
|
294
|
+
const raw = {};
|
|
295
|
+
for (const [key, name] of contextHeaderKeys) {
|
|
296
|
+
raw[key] = request.header(name);
|
|
297
|
+
}
|
|
298
|
+
const values = coerceTextValues2(operation.context, raw);
|
|
299
|
+
for (const [key, name] of contextVariableKeys) {
|
|
300
|
+
const value = request.variable?.(name);
|
|
301
|
+
if (value !== undefined)
|
|
302
|
+
values[key] = value;
|
|
303
|
+
}
|
|
304
|
+
call = guarded ? { context: values, principal: principal ?? null } : { context: values };
|
|
305
|
+
} else if (guarded)
|
|
306
|
+
call = { principal: principal ?? null };
|
|
307
|
+
const response = await operation.invoke(input, call);
|
|
308
|
+
if (setCookies.length === 0) {
|
|
309
|
+
return {
|
|
310
|
+
status,
|
|
311
|
+
headers: headersOf(successHeaders, request),
|
|
312
|
+
cookies: NO_COOKIES,
|
|
313
|
+
body: status === 204 ? null : JSON.stringify(response) ?? "null"
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
const value = outputValueOf2(response);
|
|
317
|
+
const sent = [];
|
|
318
|
+
if (isObject(value)) {
|
|
319
|
+
for (const [key, write] of setCookies) {
|
|
320
|
+
const cookie = value[key];
|
|
321
|
+
delete value[key];
|
|
322
|
+
if (cookie !== undefined && cookie !== null) {
|
|
323
|
+
sent.push(write(String(cookie)));
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
return {
|
|
328
|
+
status,
|
|
329
|
+
headers: headersOf(successHeaders, request),
|
|
330
|
+
cookies: sent,
|
|
331
|
+
body: status === 204 ? null : JSON.stringify(value) ?? "null"
|
|
332
|
+
};
|
|
333
|
+
} catch (error) {
|
|
334
|
+
return fail(error, operation, request);
|
|
335
|
+
}
|
|
336
|
+
};
|
|
337
|
+
return Object.freeze({ operation, method, path, parameters, handle });
|
|
338
|
+
});
|
|
339
|
+
let docs;
|
|
340
|
+
if (options.docs) {
|
|
341
|
+
const { path, info, servers } = options.docs;
|
|
342
|
+
if (compiled.some((route) => route.method === "get" && route.path === path)) {
|
|
343
|
+
throw new InvalidOutputStage2({
|
|
344
|
+
source,
|
|
345
|
+
details: {
|
|
346
|
+
reason: `${source}.docs.path "${path}" collides with a GET operation route.`
|
|
347
|
+
}
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
const routing = {};
|
|
351
|
+
for (const key of ROUTE_OPTION_KEYS2) {
|
|
352
|
+
if (options[key] !== undefined)
|
|
353
|
+
routing[key] = options[key];
|
|
354
|
+
}
|
|
355
|
+
if (options.auth && routing.security === undefined) {
|
|
356
|
+
const { header, cookie } = options.auth.jwt;
|
|
357
|
+
routing.security = {
|
|
358
|
+
schemes: cookie !== undefined && header === undefined ? { session: { type: "apiKey", in: "cookie", name: cookie } } : header !== undefined && header.toLowerCase() !== "authorization" ? { token: { type: "apiKey", in: "header", name: header } } : {
|
|
359
|
+
bearer: {
|
|
360
|
+
type: "http",
|
|
361
|
+
scheme: "bearer",
|
|
362
|
+
bearerFormat: "JWT"
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
const document = openapi2({
|
|
368
|
+
info,
|
|
369
|
+
...servers ? { servers } : {},
|
|
370
|
+
...routing
|
|
371
|
+
}).build(operations, context);
|
|
372
|
+
const text = JSON.stringify(settings.document ? settings.document(document) : document);
|
|
373
|
+
const headers = Object.freeze({ "content-type": JSON_TYPE });
|
|
374
|
+
docs = Object.freeze({
|
|
375
|
+
path,
|
|
376
|
+
handle: (request) => ({
|
|
377
|
+
status: 200,
|
|
378
|
+
headers: headersOf(headers, request),
|
|
379
|
+
cookies: NO_COOKIES,
|
|
380
|
+
body: text
|
|
381
|
+
})
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
return Object.freeze({
|
|
385
|
+
routes: Object.freeze(compiled),
|
|
386
|
+
...docs ? { docs } : {},
|
|
387
|
+
notFound: (request) => problem({
|
|
388
|
+
type: "urn:afora:exception:NotFound",
|
|
389
|
+
title: "NotFound",
|
|
390
|
+
status: 404,
|
|
391
|
+
detail: "No operation is served at this method and path."
|
|
392
|
+
}, 404, request),
|
|
393
|
+
failure
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
export { coerceTextValues2, HTTP_OPTION_KEYS2, httpOptionsIssue2, compileRoutes2 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,37 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* `@afora/core`: the stable API, what application code imports. Plumbing for
|
|
3
|
+
* sinks, providers and code generators is in `@afora/core/adapters`, features
|
|
4
|
+
* that may still change in `@afora/core/experimental`. A new export goes in
|
|
5
|
+
* the tier `docs/api-tiers.md` describes, and in that table.
|
|
6
|
+
*/
|
|
7
|
+
export { applicationOf } from "./core/application/application.js";
|
|
8
|
+
export { ApplicationAlreadyStarted, ApplicationConflict, ApplicationNotStarted, DuplicateApplicationDeclaration, InvalidApplicationDeclaration, InvalidApplicationEnvironment, InvalidSchemaMigration, ProviderNotBound, SchemaLockMismatch, UnregisteredApplicationReference, UnregisteredRepositoryDependency, UnregisteredUseCaseDependency, } from "./core/application/exceptions.js";
|
|
9
|
+
export { type ProviderSlot, type ProviderStorage, providersOf, } from "./core/application/providers.js";
|
|
4
10
|
export { type Register, type RegisteredApplication, resetApplication, useApplication, } from "./core/application/registry.js";
|
|
5
|
-
export {
|
|
6
|
-
export type { AnyApplication, ApplicationCollections, ApplicationContext,
|
|
11
|
+
export { isProviderFactory, type LogFactory, logFrom, type ProviderFactory, providerFrom, } from "./core/application/start.js";
|
|
12
|
+
export type { AnyApplication, ApplicationCollections, ApplicationContext, ApplicationRunArgs, ApplicationRunOptions, ApplicationSettings, ApplicationStartOptions, IApplication, } from "./core/application/types/application.interface.js";
|
|
7
13
|
export { blueprintBuilderOf } from "./core/blueprint/blueprint.js";
|
|
8
14
|
export { blueprintPluginOf } from "./core/blueprint/blueprint-plugin.js";
|
|
9
|
-
export { ReservedBlueprintKey, UndeclaredBlueprintProperty, } from "./core/blueprint/exceptions.js";
|
|
10
|
-
export {
|
|
11
|
-
export { isBlueprintList, listOf } from "./core/blueprint/list.js";
|
|
15
|
+
export { InvalidBlueprintVariant, ReservedBlueprintKey, UndeclaredBlueprintProperty, } from "./core/blueprint/exceptions.js";
|
|
16
|
+
export { listOf } from "./core/blueprint/list.js";
|
|
12
17
|
export { optionalOf } from "./core/blueprint/optional.js";
|
|
13
|
-
export {
|
|
14
|
-
export type { AnyBlueprint, AnyBlueprintList, AnyOptionalRecord, AnyRecordClass, BlueprintBuilder, BlueprintContext, BlueprintData, BlueprintDefinition, BlueprintField, BlueprintHelpers, BlueprintInput, BlueprintListOptions, BlueprintPluginContext, BlueprintSchema, BlueprintSource, BlueprintValue, IBlueprint, IBlueprintCollection, IBlueprintList, OptionalBlueprint, OptionalBlueprintList, OptionalRecord, } from "./core/blueprint/types/blueprint.interface.js";
|
|
18
|
+
export type { AnyBlueprint, AnyBlueprintList, AnyBlueprintVariant, AnyOptionalRecord, AnyRecordClass, BlueprintBuilder, BlueprintContext, BlueprintData, BlueprintDefinition, BlueprintField, BlueprintHelpers, BlueprintInput, BlueprintListOptions, BlueprintPluginContext, BlueprintSchema, BlueprintSource, BlueprintValue, BlueprintVariants, IBlueprint, IBlueprintCollection, IBlueprintList, IBlueprintVariant, OptionalBlueprint, OptionalBlueprintList, OptionalBlueprintVariant, OptionalRecord, } from "./core/blueprint/types/blueprint.interface.js";
|
|
15
19
|
export type { BlueprintFactory, IBlueprintFactories, IBlueprintPlugin, } from "./core/blueprint/types/blueprint-plugin.interface.js";
|
|
20
|
+
export { variantOf } from "./core/blueprint/variant.js";
|
|
16
21
|
export { commandBuilderOf, isCommand } from "./core/command/command.js";
|
|
17
22
|
export { CommandEventFailed, InvalidCommandContext, InvalidCommandDeclaration, InvalidCommandEnvironment, UnknownCommandOperation, } from "./core/command/exceptions.js";
|
|
18
23
|
export type { AnyCommand, CommandBuilder, CommandBuilderSettings, CommandEnvOption, CommandEventErrorHandler, CommandEventHandler, CommandEventInfo, CommandEvents, CommandExecution, CommandInput, CommandOf, CommandOperation, CommandOptions, CommandResponse, CommandSettings, CommandUseCases, CommandUseCasesOption, } from "./core/command/types/command.interface.js";
|
|
19
|
-
export {
|
|
24
|
+
export { EntitySettings, EntityUniqueKeys, } from "./core/entity/abstract-entity.js";
|
|
20
25
|
export { entityBuilderOf, isEntity, isEntityClass } from "./core/entity/entity.js";
|
|
21
26
|
export type { AnyEntityClass, EntityEvent, EntityEventReference, EntityEvents, EventDefinition, EventHandlerContext, } from "./core/entity/event.js";
|
|
22
27
|
export { eventOf } from "./core/entity/event.js";
|
|
23
|
-
export { DeletedEntity, ImmutableEntityKey, InvalidEntityExpiry, ReservedEntityKey, } from "./core/entity/exceptions.js";
|
|
24
|
-
export type { DeclaredEntityInstance, EntityBuilder, EntityBuilderSettings, EntityConstructor, EntityDuration, EntityExpires, EntityIdentityKey, EntityInput, EntityOptions, EntityProperties, EntityStorageOptions, EntityStorageSettings, EntityUniqueKey, ExpiresAtField, ExpiringIdentity, IEntityIdentity, IEntityVersion, VersionedIdentity, } from "./core/entity/types/entity.interface.js";
|
|
28
|
+
export { DeletedEntity, ImmutableEntityKey, InvalidEntityExpiry, InvalidEntitySchemaVersion, ReservedEntityKey, } from "./core/entity/exceptions.js";
|
|
29
|
+
export type { DeclaredEntityInstance, EntityBuilder, EntityBuilderSettings, EntityConstructor, EntityDuration, EntityExpires, EntityIdentityKey, EntityInput, EntityOptions, EntityProperties, EntityStorageOptions, EntityStorageSettings, EntityUniqueKey, EntityUpgrade, EntityUpgrades, ExpiresAtField, ExpiringIdentity, IEntityIdentity, IEntityVersion, VersionedIdentity, } from "./core/entity/types/entity.interface.js";
|
|
25
30
|
export { EntityVersion } from "./core/entity/version.js";
|
|
26
31
|
export type { AnyEnvironment, EnvironmentDependencies, EnvironmentOptions, EnvironmentSource, EnvironmentValue, IEnvironment, } from "./core/environment/environment.js";
|
|
27
|
-
export { environmentOf, InvalidEnvironment,
|
|
28
|
-
export {
|
|
32
|
+
export { environmentOf, InvalidEnvironment, } from "./core/environment/environment.js";
|
|
33
|
+
export { eventPolicyOf } from "./core/event-policy/event-policy.js";
|
|
29
34
|
export { InvalidEventPolicy, PublisherNotBound, } from "./core/event-policy/exceptions.js";
|
|
30
35
|
export { publishEvents } from "./core/event-policy/publish.js";
|
|
31
|
-
export type {
|
|
36
|
+
export type { EventPolicyFactory, EventPolicyOptions, EventPolicySettings, IEventPolicyCatalog, IEventPublisher, PublishEventsOptions, PublishedEvent, } from "./core/event-policy/types/event-policy.interface.js";
|
|
32
37
|
export { ExceptionLayers } from "./core/exception/enums/exception-layers.js";
|
|
33
38
|
export type { DeclaredExceptionClass } from "./core/exception/exception.js";
|
|
34
|
-
export { Exception, exceptionOf
|
|
39
|
+
export { Exception, exceptionOf } from "./core/exception/exception.js";
|
|
35
40
|
export { guard } from "./core/exception/guard.js";
|
|
36
41
|
export type { ExceptionArgs, ExceptionClass, ExceptionDeclaration, ExceptionFrame, ExceptionInit, ExceptionMessage, ExceptionPropagation, ExceptionScope, } from "./core/exception/types/exception.interface.js";
|
|
37
42
|
export { InvalidLogDeclaration } from "./core/logger/exceptions.js";
|
|
@@ -40,28 +45,19 @@ export { consoleLogProvider, jsonLogProvider, Logger, LogLevels, logProviderOf,
|
|
|
40
45
|
export { InvalidOpenAPIModel } from "./core/openapi/exceptions.js";
|
|
41
46
|
export { toOpenAPI } from "./core/openapi/openapi.js";
|
|
42
47
|
export type { OpenAPIComponents, OpenAPIOptions, OpenAPISchema, } from "./core/openapi/types/openapi.interface.js";
|
|
43
|
-
export {
|
|
44
|
-
export {
|
|
45
|
-
export
|
|
46
|
-
export { openapi, operationRoutes, ROUTE_OPTION_KEYS, requestIdHeaderOf, routeOptionsIssue, } from "./core/output/openapi-sink.js";
|
|
48
|
+
export { DuplicateOperation, Forbidden, InvalidOutputStage, Unauthenticated, } from "./core/output/exceptions.js";
|
|
49
|
+
export type { OpenAPIDocument, OpenAPIMethod, OpenAPISecurityScheme, OpenAPISinkOptions, RouteOptions, RouteStatus, SecurityRequirement, } from "./core/output/openapi-sink.js";
|
|
50
|
+
export { openapi } from "./core/output/openapi-sink.js";
|
|
47
51
|
export { isOutput, operationOf, outputOf } from "./core/output/output.js";
|
|
48
|
-
export { outputValueOf, PROBLEM_MEDIA_TYPE, problemOf, } from "./core/output/problem.js";
|
|
49
52
|
export type { SelectOptions } from "./core/output/select.js";
|
|
50
53
|
export { select } from "./core/output/select.js";
|
|
51
|
-
export {
|
|
52
|
-
export {
|
|
53
|
-
export type { AnyOutput, IStageCatalog, OperationCallOptions, OperationDescriptor, OperationPatch, OutputApplication, OutputOf, OutputSettings, OutputSource, OutputStatuses, PipeResult, Problem, ProblemOptions, SinkFactory, SinkSettings, SinkStage, Stage, StageContext, StageDescription, StageFactory, StageOptions, TransformFactory, TransformSettings, TransformStage, } from "./core/output/types/output.interface.js";
|
|
54
|
+
export { transformOf } from "./core/output/stage.js";
|
|
55
|
+
export type { AnyOutput, IStageCatalog, OperationCallOptions, OperationPatch, OutputApplication, OutputOf, OutputSettings, OutputSource, OutputStatuses, PipeResult, Stage, StageContext, StageFactory, StageOptions, TransformFactory, TransformSettings, TransformStage, } from "./core/output/types/output.interface.js";
|
|
54
56
|
export { stripUndeclared } from "./core/parse/strip.js";
|
|
55
57
|
export type { Issue, IssueCode, ParseResult, } from "./core/parse/types/parse.interface.js";
|
|
56
|
-
export { AbstractProperty } from "./core/property/abstract-property.js";
|
|
57
|
-
export { AbstractDefineProperty } from "./core/property/define-property.js";
|
|
58
|
-
export { PropertyStates } from "./core/property/enums/property-states.js";
|
|
59
58
|
export { InvalidPropertyValue, PropertyRequired, } from "./core/property/exceptions.js";
|
|
60
59
|
export type { IPropertyInput } from "./core/property/input.js";
|
|
61
60
|
export { PropertyInput, propertyInputOf } from "./core/property/input.js";
|
|
62
|
-
export { isProperty } from "./core/property/is-property.js";
|
|
63
|
-
export type { PropertyLineage } from "./core/property/lineage.js";
|
|
64
|
-
export { propertyLineageOf } from "./core/property/lineage.js";
|
|
65
61
|
export type { DeclaredProperty, PropertyClass } from "./core/property/property.js";
|
|
66
62
|
export { propertyOf } from "./core/property/property.js";
|
|
67
63
|
export type { AbstractPropertyConstructor } from "./core/property/types/abstract-property-constructor.type.js";
|
|
@@ -72,39 +68,38 @@ export type { AnyPropertyConstructor, IPropertyCollection, } from "./core/proper
|
|
|
72
68
|
export type { PropertyValue } from "./core/property/types/property-constructor.type.js";
|
|
73
69
|
export type { CallableProperty, NumberConstraints, PropertyMetadata, PropertyOptions, StringConstraints, } from "./core/property/types/property-options.interface.js";
|
|
74
70
|
export type { IPropertyType, SensitiveMark, UniqueMark, } from "./core/property/types/property-type.interface.js";
|
|
75
|
-
export { AbstractRecord, RESERVED_RECORD_KEYS, } from "./core/record/abstract-record.js";
|
|
76
71
|
export { IncompatibleRecordPlugin, InvalidRecordDeclaration, InvalidRecordPlugin, InvalidRecordValue, RecordPluginConflict, ReservedRecordKey, UndeclaredRecordProperty, UnknownRecordPlugin, } from "./core/record/exceptions.js";
|
|
77
72
|
export { MASK } from "./core/record/mask.js";
|
|
78
73
|
export { recordNameOf } from "./core/record/name.js";
|
|
79
|
-
export { hasPlugin,
|
|
74
|
+
export { hasPlugin, pluginsOf, recordPluginOf } from "./core/record/plugin.js";
|
|
80
75
|
export { recordPluginCatalogOf } from "./core/record/plugin-catalog.js";
|
|
81
76
|
export type { RecordBuilder } from "./core/record/record.js";
|
|
82
77
|
export { recordBuilderOf } from "./core/record/record.js";
|
|
83
78
|
export type { AnyRecordPlugin, IRecordPlugin, IRecordPluginCatalog, PluginUniqueKey, RecordPluginDescriptor, RecordPluginOptions, RecordPluginReference, RecordPluginRequirement, RecordPluginsOption, } from "./core/record/types/plugin.interface.js";
|
|
84
79
|
export type { DeclaredRecordInstance, IRecord, MarkedUniqueKey, Masked, RecordChange, RecordChanges, RecordConstructor, RecordEffect, RecordEffects, RecordJson, RecordKey, RecordOptions, RecordSettings, RecordValue, } from "./core/record/types/record.interface.js";
|
|
85
|
-
export { InvalidRepositoryCursor, InvalidRepositoryData, InvalidRepositoryDeclaration, InvalidRepositoryEntity, InvalidRepositoryIncrement, InvalidRepositoryQuery, RepositoryConcurrencyConflict, RepositoryEntityNotFound, RepositoryUniqueViolation, RepositoryUsedOutsideApplication, } from "./core/repository/exceptions.js";
|
|
80
|
+
export { InvalidRepositoryCursor, InvalidRepositoryData, InvalidRepositoryDeclaration, InvalidRepositoryEntity, InvalidRepositoryIncrement, InvalidRepositoryQuery, InvalidStoredSchemaVersion, RepositoryConcurrencyConflict, RepositoryEntityNotFound, RepositoryUniqueViolation, RepositoryUsedOutsideApplication, } from "./core/repository/exceptions.js";
|
|
86
81
|
export { type InMemoryProvider, inMemoryProvider, } from "./core/repository/in-memory.js";
|
|
87
|
-
export {
|
|
82
|
+
export { providerOf } from "./core/repository/provider.js";
|
|
88
83
|
export type { RepositorySettings } from "./core/repository/repository.js";
|
|
89
|
-
export {
|
|
90
|
-
export type {
|
|
91
|
-
export type { AnyRepository, AnyRepositoryEntity, EntityIncrementKeyOf, EntityInstanceOf, EntityKeyOf, EntityNonUniqueKeyOf, EntityUniqueKeyOf, EntityValueOf,
|
|
92
|
-
export type {
|
|
93
|
-
export { schemaOf } from "./core/schema/schema.js";
|
|
84
|
+
export { RepositoryOf, repositoryOf } from "./core/repository/repository.js";
|
|
85
|
+
export type { ProviderOption, ProviderOptions, ProviderSettings, RepositoryCursorPage, RepositoryCursorQuery, RepositoryExists, RepositoryExplain, RepositoryFindCursor, RepositoryFindMany, RepositoryFindPage, RepositoryForEachPage, RepositoryIndex, RepositoryOrder, RepositoryPage, RepositoryPlan, RepositoryQuery, RepositoryScans, RepositoryWalkOptions, RepositoryWalkPage, RepositoryWalkResult, RepositoryWhere, } from "./core/repository/types/query.interface.js";
|
|
86
|
+
export type { AnyRepository, AnyRepositoryEntity, EntityIncrementKeyOf, EntityInstanceOf, EntityKeyOf, EntityNonUniqueKeyOf, EntityUniqueKeyOf, EntityValueOf, QueryValueOf, RepositoryAction, RepositoryCount, RepositoryCreate, RepositoryCreateInput, RepositoryDelete, RepositoryFindBy, RepositoryFindManyBy, RepositoryIncrement, RepositoryIncrementDeltas, RepositoryIncrementOptions, RepositoryRestore, RepositoryUpdate, } from "./core/repository/types/repository.interface.js";
|
|
87
|
+
export type { EntityMigrationReport, SchemaMigrationInvalidRow, SchemaMigrationOptions, SchemaMigrationReport, } from "./core/repository/types/schema.interface.js";
|
|
94
88
|
export type { ISchema, ISchemaType, } from "./core/schema/types/schema.interface.js";
|
|
95
89
|
export type { StandardSchemaV1 } from "./core/standard/standard-schema.js";
|
|
96
|
-
export { Demo } from "./core/symbols/demo.js";
|
|
97
|
-
export { Kind } from "./core/symbols/kind.js";
|
|
98
90
|
export { Meta } from "./core/symbols/meta.js";
|
|
99
91
|
export { State } from "./core/symbols/state.js";
|
|
92
|
+
export { Access, Route } from "./core/use-case/decorators.js";
|
|
100
93
|
export { IncompatibleUseCasePlugin, InvalidUseCasePlugin, InvalidUseCaseStep, UnknownUseCasePlugin, UseCaseEntityConflict, UseCaseEntityNotFound, UseCaseInvalidCredentials, UseCaseUnavailable, } from "./core/use-case/exceptions.js";
|
|
101
|
-
export { isUseCasePlugin,
|
|
94
|
+
export { isUseCasePlugin, useCasePluginOf } from "./core/use-case/plugin.js";
|
|
102
95
|
export { isUseCaseCatalog, useCaseCatalogOf, } from "./core/use-case/plugin-catalog.js";
|
|
96
|
+
export type { CheckedSteps, StepReferencesOf, StepReferenceType, StepsInitialScope, StepValueCheck, } from "./core/use-case/steps/types/check.interface.js";
|
|
103
97
|
export type { StepArgs, StepEnsureKind, StepErrorDescription, StepFindTarget, StepReadAction, StepReference, StepRepositoryWith, StepValue, UseCaseStep, UseCaseStepDescription, } from "./core/use-case/steps/types/steps.interface.js";
|
|
104
|
-
export {
|
|
105
|
-
export type { AnyUseCasePlugin, EntityOfRepository, IUseCaseCatalog, IUseCasePlugin, MissingRecordPlugin, MissingRepositoryAction, UseCaseCompilation,
|
|
106
|
-
export type {
|
|
107
|
-
export {
|
|
98
|
+
export type { AccessDeclaration, Principal, } from "./core/use-case/types/access.interface.js";
|
|
99
|
+
export type { AnyUseCasePlugin, EntityOfRepository, IUseCaseCatalog, IUseCasePlugin, MissingRecordPlugin, MissingRepositoryAction, UseCaseCompilation, UseCaseFieldPlan, UseCaseMaker, UseCasePluginDescriptor, UseCasePluginRequirements, UseCasePluginSettings, UseCaseTarget, UseCaseTargetInfo, } from "./core/use-case/types/plugin.interface.js";
|
|
100
|
+
export type { RouteDeclaration, RouteSettings, } from "./core/use-case/types/route.interface.js";
|
|
101
|
+
export type { AnyExceptionClass, AnyUseCaseClass, DependencyFunctions, DependencyOf, DependencyOverrides, StepsUseCaseConstructor, UseCaseCollection, UseCaseConstructor, UseCaseContext, UseCaseDeclaration, UseCaseDependencies, UseCaseDependency, UseCaseInput, UseCaseOptions, UseCaseResponse, UseCaseSettings, UseCaseStepsSettings, } from "./core/use-case/use-case.js";
|
|
102
|
+
export { InvalidUseCaseDeclaration, InvalidUseCaseDependencies, isUseCase, isUseCaseClass, UseCaseAlreadyExecuted, useCaseOf, } from "./core/use-case/use-case.js";
|
|
108
103
|
export { blueprintOf } from "./std/blueprint.js";
|
|
109
104
|
export { Std } from "./std/blueprint-plugin.js";
|
|
110
105
|
export { commandOf } from "./std/command.js";
|
|
@@ -118,13 +113,14 @@ export { SchemaProperty } from "./std/properties/headless.js";
|
|
|
118
113
|
export { Id, Slug } from "./std/properties/identity.js";
|
|
119
114
|
export type { JsonClass, JsonValue } from "./std/properties/json.js";
|
|
120
115
|
export { checkJsonSchema, JsonProperty, jsonOf, jsonSchemaIssues, } from "./std/properties/json.js";
|
|
121
|
-
export {
|
|
116
|
+
export { Password, PlainPassword } from "./std/properties/password.js";
|
|
122
117
|
export { BooleanProperty, Integer, NumberProperty, StringProperty, Text, } from "./std/properties/primitives.js";
|
|
123
118
|
export { CreatedAt, DateProperty, DateTime, DeletedAt, ExpiresAt, UpdatedAt, } from "./std/properties/time.js";
|
|
124
119
|
export { recordOf } from "./std/record.js";
|
|
125
120
|
export { Archivable, Authenticatable, Ownable, Publishable, StdRecordPlugins, Taggable, } from "./std/record-plugins.js";
|
|
121
|
+
export { resourceOf } from "./std/resource.js";
|
|
126
122
|
export type { IdGenerator, PasswordHasher, RuntimeServices, } from "./std/runtime.js";
|
|
127
123
|
export { configure, PasswordHasherRequired, resetRuntime, SyncVerifyUnsupported, } from "./std/runtime.js";
|
|
128
124
|
export { StdStages } from "./std/stages.js";
|
|
129
125
|
export { StdUseCases } from "./std/use-cases/index.js";
|
|
130
|
-
export type { ArchiveMaker, CreateMaker, DeleteMaker, GetMaker, ListMaker, LoginMaker, PublishMaker, RegisterMaker, RestoreMaker, StdCreateOptions, StdEntityOptions, StdHookArgs, StdHookOptions, StdLifecycleOptions, StdListOptions, StdNoHookOptions, StdOwnerOption, StdUseCaseContext, StdUseCaseErrors, StdUseCaseOptions, StdUseCasePlugins, TagMaker, UpdateMaker, } from "./std/use-cases/types.js";
|
|
126
|
+
export type { ArchiveMaker, CreateMaker, DeleteMaker, GetMaker, ListMaker, LoginMaker, PublishMaker, RegisterMaker, ResourceAction, ResourceOptions, ResourceUseCases, RestoreMaker, StdCreateOptions, StdEntityOptions, StdHookArgs, StdHookOptions, StdLifecycleOptions, StdListOptions, StdNoHookOptions, StdOwnerOption, StdUseCaseContext, StdUseCaseErrors, StdUseCaseOptions, StdUseCasePlugins, TagMaker, UpdateMaker, } from "./std/use-cases/types.js";
|