@getstrata/core 0.5.48 → 0.5.50
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 +25 -0
- package/dist/core/auth/membershipContextMiddleware.d.ts +1 -1
- package/dist/core/auth/scimAuthMiddleware.d.ts +1 -1
- package/dist/core/database/errors.d.ts +1 -1
- package/dist/core/facades/index.d.ts +1 -1
- package/dist/core/http/authMiddleware.d.ts +2 -2
- package/dist/core/http/authorizeMiddleware.d.ts +2 -2
- package/dist/core/http/index.d.ts +1 -1
- package/dist/core/http/requireAuthMiddleware.d.ts +1 -1
- package/dist/core/http/requireWebAuthMiddleware.d.ts +1 -1
- package/dist/core/http/securedRouteModelBinding.d.ts +1 -1
- package/dist/core/logging/requestLoggingMiddleware.d.ts +1 -1
- package/dist/core/queue/failedJobRepository.d.ts +1 -1
- package/dist/core/queue/failedJobTable.d.ts +1 -1
- package/dist/core/runtime/applicationRegistry.d.ts +3 -3
- package/dist/core/tracing/tracingMiddleware.d.ts +1 -1
- package/dist/entries/audit/exportAuditLogs.js +9 -175
- package/dist/entries/auth/membershipMiddleware.js +2 -74
- package/dist/entries/auth/scimAuthMiddleware.js +10 -96
- package/dist/entries/auth/sessionGuard.js +138 -2732
- package/dist/entries/database/errors.js +6 -66
- package/dist/entries/database/model.js +2 -65
- package/dist/entries/http/authMiddleware.js +1 -23
- package/dist/entries/http/authorizeMiddleware.js +2 -89
- package/dist/entries/http/bodySizeLimitMiddleware.js +1 -66
- package/dist/entries/http/conditionalResponse.js +3 -66
- package/dist/entries/http/csrfMiddleware.js +2 -65
- package/dist/entries/http/etag.js +3 -66
- package/dist/entries/http/formRequest.js +5 -110
- package/dist/entries/http/pagination.js +8 -113
- package/dist/entries/http/parseFormBody.js +1 -66
- package/dist/entries/http/parseMultipartUpload.js +3 -66
- package/dist/entries/http/requireAbilityMiddleware.js +2 -89
- package/dist/entries/http/requireAuthMiddleware.js +1 -66
- package/dist/entries/http/requireGlobalAdminMiddleware.js +4 -128
- package/dist/entries/http/requireWebAuthMiddleware.js +2 -65
- package/dist/entries/http/routeModelBinding.js +3 -111
- package/dist/entries/http/securedRouteModelBinding.js +15 -206
- package/dist/entries/http/throttleMiddleware.js +2 -47
- package/dist/entries/http/webErrorResponse.js +222 -2732
- package/dist/entries/http/webFormRequest.js +8 -112
- package/dist/entries/jobs/dispatchWebhookJob.js +5 -174
- package/dist/entries/logging/requestLoggingMiddleware.js +2 -25
- package/dist/entries/queue/createAppQueue.js +13 -2332
- package/dist/entries/queue/failedJobRepository.js +4 -2324
- package/dist/entries/queue/jobRunner.js +9 -8
- package/dist/entries/queue/publicQueue.js +13 -2332
- package/dist/entries/queue/queueMetrics.js +13 -2332
- package/dist/entries/queue/redisQueue.js +9 -8
- package/dist/entries/security/safeFetch.js +1 -68
- package/dist/entries/security/safeUrl.js +1 -68
- package/dist/entries/security/stripeWebhook.js +1 -68
- package/dist/entries/tenant/databaseTenantContext.js +3 -105
- package/dist/entries/tenant/tenantDatabaseScope.js +3 -61
- package/dist/entries/validation/rules.js +1 -66
- package/dist/entries/view.js +159 -2735
- package/package.json +2 -2
|
@@ -1,116 +1,8 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
// ../../src/core/runtime/asyncContextStore.ts
|
|
3
|
-
import { AsyncLocalStorage } from "async_hooks";
|
|
4
|
-
function createAsyncContextStore(key) {
|
|
5
|
-
const symbol = Symbol.for(key);
|
|
6
|
-
const globalRecord = globalThis;
|
|
7
|
-
const existing = globalRecord[symbol];
|
|
8
|
-
if (existing) {
|
|
9
|
-
return existing;
|
|
10
|
-
}
|
|
11
|
-
const store = new AsyncLocalStorage;
|
|
12
|
-
globalRecord[symbol] = store;
|
|
13
|
-
return store;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// ../../src/core/auth/authContext.ts
|
|
17
|
-
var authContext = createAsyncContextStore("@getstrata/authContext");
|
|
18
|
-
function runWithAuthUser(user, callback) {
|
|
19
|
-
return authContext.run(user, callback);
|
|
20
|
-
}
|
|
21
|
-
function currentAuthUser() {
|
|
22
|
-
return authContext.getStore() ?? null;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// ../../src/core/errors/http.ts
|
|
26
|
-
class HttpError extends Error {
|
|
27
|
-
status;
|
|
28
|
-
details;
|
|
29
|
-
constructor(status, message, details) {
|
|
30
|
-
super(message);
|
|
31
|
-
this.name = new.target.name;
|
|
32
|
-
this.status = status;
|
|
33
|
-
this.details = details;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
class BadRequestError extends HttpError {
|
|
38
|
-
constructor(message = "Bad Request", details) {
|
|
39
|
-
super(400, message, details);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
class NotFoundError extends HttpError {
|
|
44
|
-
constructor(message = "Not Found", details) {
|
|
45
|
-
super(404, message, details);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
class ConflictError extends HttpError {
|
|
50
|
-
constructor(message = "Conflict", details) {
|
|
51
|
-
super(409, message, details);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
class UnprocessableEntityError extends HttpError {
|
|
56
|
-
constructor(message = "Unprocessable Entity", details) {
|
|
57
|
-
super(422, message, details);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
class ValidationError extends HttpError {
|
|
62
|
-
constructor(message = "Validation failed", details) {
|
|
63
|
-
super(422, message, details);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
class ForbiddenError extends HttpError {
|
|
68
|
-
constructor(message = "Forbidden", details) {
|
|
69
|
-
super(403, message, details);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
class UnauthorizedError extends HttpError {
|
|
74
|
-
constructor(message = "Unauthorized", details) {
|
|
75
|
-
super(401, message, details);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
class PayloadTooLargeError extends HttpError {
|
|
80
|
-
constructor(message = "Payload Too Large", details) {
|
|
81
|
-
super(413, message, details);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
class PreconditionFailedError extends HttpError {
|
|
86
|
-
constructor(message = "Precondition Failed", details) {
|
|
87
|
-
super(412, message, details);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
// ../../src/core/tenant/tenantContext.ts
|
|
92
|
-
var tenantContext = createAsyncContextStore("@getstrata/tenantContext");
|
|
93
|
-
function runWithTenant(tenant, callback) {
|
|
94
|
-
return tenantContext.run(tenant, callback);
|
|
95
|
-
}
|
|
96
|
-
function currentTenant() {
|
|
97
|
-
return tenantContext.getStore() ?? null;
|
|
98
|
-
}
|
|
99
|
-
function currentTenantId() {
|
|
100
|
-
return currentTenant()?.id ?? 1;
|
|
101
|
-
}
|
|
102
|
-
function rateLimitMultiplierForPlan(plan) {
|
|
103
|
-
switch (plan) {
|
|
104
|
-
case "enterprise":
|
|
105
|
-
return 4;
|
|
106
|
-
case "pro":
|
|
107
|
-
return 2;
|
|
108
|
-
default:
|
|
109
|
-
return 1;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
2
|
// ../../src/core/http/validation.ts
|
|
3
|
+
import { currentAuthUser } from "@getstrata/core/auth/authContext";
|
|
4
|
+
import { BadRequestError } from "@getstrata/core/errors/http";
|
|
5
|
+
import { currentTenantId } from "@getstrata/core/tenant/tenantContext";
|
|
114
6
|
function getQueryParams(request) {
|
|
115
7
|
if (!request) {
|
|
116
8
|
return new URLSearchParams;
|
|
@@ -1,186 +1,14 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
// ../../src/core/
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return existing;
|
|
10
|
-
}
|
|
11
|
-
const store = new AsyncLocalStorage;
|
|
12
|
-
globalRecord[symbol] = store;
|
|
13
|
-
return store;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// ../../src/core/auth/authContext.ts
|
|
17
|
-
var authContext = createAsyncContextStore("@getstrata/authContext");
|
|
18
|
-
function runWithAuthUser(user, callback) {
|
|
19
|
-
return authContext.run(user, callback);
|
|
20
|
-
}
|
|
21
|
-
function currentAuthUser() {
|
|
22
|
-
return authContext.getStore() ?? null;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// ../../src/core/errors/http.ts
|
|
26
|
-
class HttpError extends Error {
|
|
27
|
-
status;
|
|
28
|
-
details;
|
|
29
|
-
constructor(status, message, details) {
|
|
30
|
-
super(message);
|
|
31
|
-
this.name = new.target.name;
|
|
32
|
-
this.status = status;
|
|
33
|
-
this.details = details;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
class BadRequestError extends HttpError {
|
|
38
|
-
constructor(message = "Bad Request", details) {
|
|
39
|
-
super(400, message, details);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
class NotFoundError extends HttpError {
|
|
44
|
-
constructor(message = "Not Found", details) {
|
|
45
|
-
super(404, message, details);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
class ConflictError extends HttpError {
|
|
50
|
-
constructor(message = "Conflict", details) {
|
|
51
|
-
super(409, message, details);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
class UnprocessableEntityError extends HttpError {
|
|
56
|
-
constructor(message = "Unprocessable Entity", details) {
|
|
57
|
-
super(422, message, details);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
class ValidationError extends HttpError {
|
|
62
|
-
constructor(message = "Validation failed", details) {
|
|
63
|
-
super(422, message, details);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
class ForbiddenError extends HttpError {
|
|
68
|
-
constructor(message = "Forbidden", details) {
|
|
69
|
-
super(403, message, details);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
class UnauthorizedError extends HttpError {
|
|
74
|
-
constructor(message = "Unauthorized", details) {
|
|
75
|
-
super(401, message, details);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
class PayloadTooLargeError extends HttpError {
|
|
80
|
-
constructor(message = "Payload Too Large", details) {
|
|
81
|
-
super(413, message, details);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
class PreconditionFailedError extends HttpError {
|
|
86
|
-
constructor(message = "Precondition Failed", details) {
|
|
87
|
-
super(412, message, details);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
// ../../src/core/contracts/di.ts
|
|
92
|
-
var requiredDependencyKeys = [
|
|
93
|
-
"container",
|
|
94
|
-
"cache",
|
|
95
|
-
"storage"
|
|
96
|
-
];
|
|
97
|
-
function getRequiredDependency(dependencies, key) {
|
|
98
|
-
const dependency = dependencies[key];
|
|
99
|
-
if (dependency === undefined) {
|
|
100
|
-
throw new Error(`Required dependency "${key}" is not registered.`);
|
|
101
|
-
}
|
|
102
|
-
return dependency;
|
|
103
|
-
}
|
|
104
|
-
function assertAppDependenciesComplete(dependencies) {
|
|
105
|
-
for (const key of requiredDependencyKeys) {
|
|
106
|
-
getRequiredDependency(dependencies, key);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
function resolveService(dependencies, token) {
|
|
110
|
-
return dependencies.container.resolve(token);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
// ../../src/core/contracts/serviceTokens.ts
|
|
114
|
-
var CORE_CONFIG_TOKEN = "core.config";
|
|
115
|
-
var CORE_CACHE_TOKEN = "core.cache";
|
|
116
|
-
var CORE_QUEUE_TOKEN = "core.queue";
|
|
117
|
-
var CORE_EVENT_BUS_TOKEN = "core.eventBus";
|
|
118
|
-
var CORE_POLICY_GATE_TOKEN = "core.policyGate";
|
|
119
|
-
var CORE_AUTH_TOKEN = "core.auth";
|
|
120
|
-
var CORE_TOKEN_SERVICE_TOKEN = "core.tokenService";
|
|
121
|
-
|
|
122
|
-
// ../../src/core/logging/logger.ts
|
|
123
|
-
class Logger {
|
|
124
|
-
channel;
|
|
125
|
-
constructor(channel = "app") {
|
|
126
|
-
this.channel = channel;
|
|
127
|
-
}
|
|
128
|
-
write(level, message, context = {}) {
|
|
129
|
-
const entry = {
|
|
130
|
-
level,
|
|
131
|
-
channel: this.channel,
|
|
132
|
-
message,
|
|
133
|
-
timestamp: new Date().toISOString(),
|
|
134
|
-
...context
|
|
135
|
-
};
|
|
136
|
-
const line = JSON.stringify(entry);
|
|
137
|
-
if (level === "error") {
|
|
138
|
-
console.error(line);
|
|
139
|
-
return;
|
|
140
|
-
}
|
|
141
|
-
console.log(line);
|
|
142
|
-
}
|
|
143
|
-
debug(message, context) {
|
|
144
|
-
this.write("debug", message, context);
|
|
145
|
-
}
|
|
146
|
-
info(message, context) {
|
|
147
|
-
this.write("info", message, context);
|
|
148
|
-
}
|
|
149
|
-
warn(message, context) {
|
|
150
|
-
this.write("warn", message, context);
|
|
151
|
-
}
|
|
152
|
-
error(message, context) {
|
|
153
|
-
this.write("error", message, context);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
var appLogger = new Logger("app");
|
|
2
|
+
// ../../src/core/http/securedRouteModelBinding.ts
|
|
3
|
+
import { currentAuthUser as currentAuthUser2 } from "@getstrata/core/auth/authContext";
|
|
4
|
+
import { BadRequestError as BadRequestError2 } from "@getstrata/core/errors/http";
|
|
5
|
+
import {
|
|
6
|
+
resolveApplicationAuth,
|
|
7
|
+
resolveApplicationPolicyGate
|
|
8
|
+
} from "@getstrata/core/runtime/applicationRegistry";
|
|
157
9
|
|
|
158
|
-
// ../../src/core/
|
|
159
|
-
|
|
160
|
-
var activeContext;
|
|
161
|
-
function readStoredApplicationContext() {
|
|
162
|
-
if (activeContext) {
|
|
163
|
-
return activeContext;
|
|
164
|
-
}
|
|
165
|
-
const globalContext = globalThis[APPLICATION_CONTEXT_KEY];
|
|
166
|
-
if (globalContext) {
|
|
167
|
-
activeContext = globalContext;
|
|
168
|
-
}
|
|
169
|
-
return activeContext;
|
|
170
|
-
}
|
|
171
|
-
function requireActiveApplicationContext() {
|
|
172
|
-
const context = readStoredApplicationContext();
|
|
173
|
-
if (!context) {
|
|
174
|
-
throw new Error("The application context has not been bootstrapped.");
|
|
175
|
-
}
|
|
176
|
-
return context;
|
|
177
|
-
}
|
|
178
|
-
function resolveApplicationAuth() {
|
|
179
|
-
return requireActiveApplicationContext().container.resolve(CORE_AUTH_TOKEN);
|
|
180
|
-
}
|
|
181
|
-
function resolveApplicationPolicyGate() {
|
|
182
|
-
return requireActiveApplicationContext().container.resolve(CORE_POLICY_GATE_TOKEN);
|
|
183
|
-
}
|
|
10
|
+
// ../../src/core/http/etag.ts
|
|
11
|
+
import { PreconditionFailedError } from "@getstrata/core/errors/http";
|
|
184
12
|
|
|
185
13
|
// ../../src/core/crypto/nonCryptographicHash.ts
|
|
186
14
|
function nonCryptographicDigest(input) {
|
|
@@ -277,29 +105,10 @@ function applyConditionalGet(request, response, etag) {
|
|
|
277
105
|
});
|
|
278
106
|
}
|
|
279
107
|
|
|
280
|
-
// ../../src/core/tenant/tenantContext.ts
|
|
281
|
-
var tenantContext = createAsyncContextStore("@getstrata/tenantContext");
|
|
282
|
-
function runWithTenant(tenant, callback) {
|
|
283
|
-
return tenantContext.run(tenant, callback);
|
|
284
|
-
}
|
|
285
|
-
function currentTenant() {
|
|
286
|
-
return tenantContext.getStore() ?? null;
|
|
287
|
-
}
|
|
288
|
-
function currentTenantId() {
|
|
289
|
-
return currentTenant()?.id ?? 1;
|
|
290
|
-
}
|
|
291
|
-
function rateLimitMultiplierForPlan(plan) {
|
|
292
|
-
switch (plan) {
|
|
293
|
-
case "enterprise":
|
|
294
|
-
return 4;
|
|
295
|
-
case "pro":
|
|
296
|
-
return 2;
|
|
297
|
-
default:
|
|
298
|
-
return 1;
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
|
|
302
108
|
// ../../src/core/http/validation.ts
|
|
109
|
+
import { currentAuthUser } from "@getstrata/core/auth/authContext";
|
|
110
|
+
import { BadRequestError } from "@getstrata/core/errors/http";
|
|
111
|
+
import { currentTenantId } from "@getstrata/core/tenant/tenantContext";
|
|
303
112
|
function getQueryParams(request) {
|
|
304
113
|
if (!request) {
|
|
305
114
|
return new URLSearchParams;
|
|
@@ -333,7 +142,7 @@ function securedBindRouteModel(param, resolver, authorization, handler) {
|
|
|
333
142
|
const model = await resolver(id, request);
|
|
334
143
|
const gate = resolveApplicationPolicyGate();
|
|
335
144
|
const auth = resolveApplicationAuth();
|
|
336
|
-
const user =
|
|
145
|
+
const user = currentAuthUser2() ?? await auth.resolve(request);
|
|
337
146
|
gate.authorize(authorization.resource, authorization.action, user, model);
|
|
338
147
|
if (isEtagEnabled() && isMutatingPolicyAction(authorization.action)) {
|
|
339
148
|
assertIfMatch(request, etagFromResource(model), {
|
|
@@ -351,12 +160,12 @@ function securedBindRouteModelByKey(param, resolver, authorization, handler) {
|
|
|
351
160
|
return async (request) => {
|
|
352
161
|
const key = String(request.params[param] ?? "").trim();
|
|
353
162
|
if (!key) {
|
|
354
|
-
throw new
|
|
163
|
+
throw new BadRequestError2(`Missing route parameter "${String(param)}".`);
|
|
355
164
|
}
|
|
356
165
|
const model = await resolver(key, request);
|
|
357
166
|
const gate = resolveApplicationPolicyGate();
|
|
358
167
|
const auth = resolveApplicationAuth();
|
|
359
|
-
const user =
|
|
168
|
+
const user = currentAuthUser2() ?? await auth.resolve(request);
|
|
360
169
|
gate.authorize(authorization.resource, authorization.action, user, model);
|
|
361
170
|
if (isEtagEnabled() && isMutatingPolicyAction(authorization.action)) {
|
|
362
171
|
assertIfMatch(request, etagFromResource(model), {
|
|
@@ -1,53 +1,8 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
// ../../src/core/http/throttleMiddleware.ts
|
|
3
|
+
import { currentAuthUser } from "@getstrata/core/auth/authContext";
|
|
4
|
+
import { currentTenant, rateLimitMultiplierForPlan } from "@getstrata/core/tenant/tenantContext";
|
|
3
5
|
var {RedisClient } = globalThis.Bun;
|
|
4
|
-
|
|
5
|
-
// ../../src/core/runtime/asyncContextStore.ts
|
|
6
|
-
import { AsyncLocalStorage } from "async_hooks";
|
|
7
|
-
function createAsyncContextStore(key) {
|
|
8
|
-
const symbol = Symbol.for(key);
|
|
9
|
-
const globalRecord = globalThis;
|
|
10
|
-
const existing = globalRecord[symbol];
|
|
11
|
-
if (existing) {
|
|
12
|
-
return existing;
|
|
13
|
-
}
|
|
14
|
-
const store = new AsyncLocalStorage;
|
|
15
|
-
globalRecord[symbol] = store;
|
|
16
|
-
return store;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// ../../src/core/auth/authContext.ts
|
|
20
|
-
var authContext = createAsyncContextStore("@getstrata/authContext");
|
|
21
|
-
function runWithAuthUser(user, callback) {
|
|
22
|
-
return authContext.run(user, callback);
|
|
23
|
-
}
|
|
24
|
-
function currentAuthUser() {
|
|
25
|
-
return authContext.getStore() ?? null;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// ../../src/core/tenant/tenantContext.ts
|
|
29
|
-
var tenantContext = createAsyncContextStore("@getstrata/tenantContext");
|
|
30
|
-
function runWithTenant(tenant, callback) {
|
|
31
|
-
return tenantContext.run(tenant, callback);
|
|
32
|
-
}
|
|
33
|
-
function currentTenant() {
|
|
34
|
-
return tenantContext.getStore() ?? null;
|
|
35
|
-
}
|
|
36
|
-
function currentTenantId() {
|
|
37
|
-
return currentTenant()?.id ?? 1;
|
|
38
|
-
}
|
|
39
|
-
function rateLimitMultiplierForPlan(plan) {
|
|
40
|
-
switch (plan) {
|
|
41
|
-
case "enterprise":
|
|
42
|
-
return 4;
|
|
43
|
-
case "pro":
|
|
44
|
-
return 2;
|
|
45
|
-
default:
|
|
46
|
-
return 1;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// ../../src/core/http/throttleMiddleware.ts
|
|
51
6
|
function resolveThrottleIdentity(request) {
|
|
52
7
|
const user = currentAuthUser();
|
|
53
8
|
if (user?.tokenId !== undefined) {
|