@getstrata/bootstrap 0.4.3 → 1.0.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/CHANGELOG.md +4 -0
- package/dist/_.._/_.._/index.html +1 -1
- package/dist/entries/applicationRegistry.js +0 -2
- package/dist/entries/buildModuleRoutes.js +2 -4
- package/dist/entries/buildWebModuleRoutes.js +2 -4
- package/dist/entries/cache/modelCacheTags.js +0 -2
- package/dist/entries/config.js +0 -2
- package/dist/entries/context.js +0 -2
- package/dist/entries/contracts.js +0 -2
- package/dist/entries/createRoutes.js +4 -4
- package/dist/entries/createSpaRoutes.js +1 -3
- package/dist/entries/createWebRoutes.js +2 -4
- package/dist/entries/dependencies.js +0 -2
- package/dist/entries/discoverModules.js +0 -2
- package/dist/entries/health.js +0 -2
- package/dist/entries/http/securedRouteModelBinding.js +0 -2
- package/dist/entries/httpKernel.js +2 -4
- package/dist/entries/listeners/invalidateCacheOnModelWrite.js +0 -2
- package/dist/entries/membershipService.js +0 -2
- package/dist/entries/metricsRoutes.js +0 -2
- package/dist/entries/providers/view.js +0 -2
- package/dist/entries/providers.js +0 -2
- package/dist/entries/queue/defaultJobs.js +0 -2
- package/dist/entries/routeRegistry.js +0 -2
- package/dist/entries/schedule.js +0 -2
- package/dist/entries/secretsGuard.js +0 -2
- package/dist/entries/web/forms.js +0 -2
- package/dist/entries/web/routing.js +2 -4
- package/dist/entries/web/server.js +0 -2
- package/dist/entries/web/session.js +0 -2
- package/dist/entries/web/slug.js +0 -2
- package/dist/index.js +2 -2
- package/package.json +2 -2
- /package/dist/{index-sfreg6q3.js → index-a3tzxvag.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var __jsonParse = (a) => JSON.parse(a);
|
|
3
|
-
|
|
4
2
|
// ../../src/bootstrap/buildModuleRoutes.ts
|
|
5
3
|
import { conditionalJsonResponse } from "@getstrata/core/http/conditionalResponse";
|
|
6
4
|
import { applyMiddlewareToRoutes } from "@getstrata/core/http/middleware";
|
|
@@ -146,10 +144,10 @@ class HttpKernel {
|
|
|
146
144
|
const config = this.dependencies.container.resolve(CORE_CONFIG_TOKEN);
|
|
147
145
|
const redisUrl = config.get(REDIS_URL_CONFIG_KEY)?.trim() ?? "";
|
|
148
146
|
if (!redisUrl) {
|
|
149
|
-
const
|
|
147
|
+
const maxAttempts = Number(process.env.RATE_LIMIT_PER_MINUTE ?? "120");
|
|
150
148
|
return [
|
|
151
149
|
createMemoryThrottleMiddleware({
|
|
152
|
-
maxAttempts: Number.isFinite(
|
|
150
|
+
maxAttempts: Number.isFinite(maxAttempts) ? maxAttempts : 120,
|
|
153
151
|
decaySeconds: 60
|
|
154
152
|
})
|
|
155
153
|
];
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var __jsonParse = (a) => JSON.parse(a);
|
|
3
|
-
|
|
4
2
|
// ../../src/bootstrap/buildWebModuleRoutes.ts
|
|
5
3
|
import { applyMiddlewareToRoutes as applyMiddlewareToRoutes2 } from "@getstrata/core/http/middleware";
|
|
6
4
|
|
|
@@ -149,10 +147,10 @@ class HttpKernel {
|
|
|
149
147
|
const config = this.dependencies.container.resolve(CORE_CONFIG_TOKEN);
|
|
150
148
|
const redisUrl = config.get(REDIS_URL_CONFIG_KEY)?.trim() ?? "";
|
|
151
149
|
if (!redisUrl) {
|
|
152
|
-
const
|
|
150
|
+
const maxAttempts = Number(process.env.RATE_LIMIT_PER_MINUTE ?? "120");
|
|
153
151
|
return [
|
|
154
152
|
createMemoryThrottleMiddleware({
|
|
155
|
-
maxAttempts: Number.isFinite(
|
|
153
|
+
maxAttempts: Number.isFinite(maxAttempts) ? maxAttempts : 120,
|
|
156
154
|
decaySeconds: 60
|
|
157
155
|
})
|
|
158
156
|
];
|
package/dist/entries/config.js
CHANGED
package/dist/entries/context.js
CHANGED
|
@@ -7,7 +7,7 @@ import { isSpaEnabled as isSpaEnabled2, isViewsEnabled as isViewsEnabled4 } from
|
|
|
7
7
|
import { notFoundHtmlResponse as notFoundHtmlResponse2 } from "@getstrata/core/view";
|
|
8
8
|
|
|
9
9
|
// ../../index.html
|
|
10
|
-
var strata_default = __jsonParse("{\"index\":\"_.._/_.._/index.html\",\"files\":[{\"input\":\"../../index.html\",\"path\":\"./index-
|
|
10
|
+
var strata_default = __jsonParse("{\"index\":\"_.._/_.._/index.html\",\"files\":[{\"input\":\"../../index.html\",\"path\":\"./index-a3tzxvag.js\",\"loader\":\"js\",\"isEntry\":true,\"headers\":{\"etag\":\"qoOafz0bKrA\",\"content-type\":\"text/javascript;charset=utf-8\"}},{\"input\":\"../../index.html\",\"path\":\"_.._/_.._/index.html\",\"loader\":\"html\",\"isEntry\":true,\"headers\":{\"etag\":\"g_F9s_nobLw\",\"content-type\":\"text/html;charset=utf-8\"}}]}");
|
|
11
11
|
|
|
12
12
|
// ../../src/config/app.ts
|
|
13
13
|
var appConfig = {
|
|
@@ -163,10 +163,10 @@ class HttpKernel {
|
|
|
163
163
|
const config = this.dependencies.container.resolve(CORE_CONFIG_TOKEN);
|
|
164
164
|
const redisUrl = config.get(REDIS_URL_CONFIG_KEY)?.trim() ?? "";
|
|
165
165
|
if (!redisUrl) {
|
|
166
|
-
const
|
|
166
|
+
const maxAttempts = Number(process.env.RATE_LIMIT_PER_MINUTE ?? "120");
|
|
167
167
|
return [
|
|
168
168
|
createMemoryThrottleMiddleware({
|
|
169
|
-
maxAttempts: Number.isFinite(
|
|
169
|
+
maxAttempts: Number.isFinite(maxAttempts) ? maxAttempts : 120,
|
|
170
170
|
decaySeconds: 60
|
|
171
171
|
})
|
|
172
172
|
];
|
|
@@ -534,7 +534,7 @@ function createSpaDocumentHandler(prefix, distDirectory) {
|
|
|
534
534
|
function createSpaRoutes(_dependencies, options = {}) {
|
|
535
535
|
const prefix = options.prefix ?? readSpaPrefix();
|
|
536
536
|
const distDirectory = options.distDirectory ?? SPA_DIST_DIRECTORY;
|
|
537
|
-
const wrap = options.wrap ?? ((
|
|
537
|
+
const wrap = options.wrap ?? ((handler) => handler);
|
|
538
538
|
const handler = wrap(createSpaDocumentHandler(prefix, distDirectory));
|
|
539
539
|
const routes = {
|
|
540
540
|
[prefix]: handler,
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var __jsonParse = (a) => JSON.parse(a);
|
|
3
|
-
|
|
4
2
|
// ../../src/bootstrap/createSpaRoutes.ts
|
|
5
3
|
import { join } from "path";
|
|
6
4
|
import { jsonResponse } from "@getstrata/core/http/response";
|
|
@@ -41,7 +39,7 @@ function createSpaDocumentHandler(prefix, distDirectory) {
|
|
|
41
39
|
function createSpaRoutes(_dependencies, options = {}) {
|
|
42
40
|
const prefix = options.prefix ?? readSpaPrefix();
|
|
43
41
|
const distDirectory = options.distDirectory ?? SPA_DIST_DIRECTORY;
|
|
44
|
-
const wrap = options.wrap ?? ((
|
|
42
|
+
const wrap = options.wrap ?? ((handler) => handler);
|
|
45
43
|
const handler = wrap(createSpaDocumentHandler(prefix, distDirectory));
|
|
46
44
|
const routes = {
|
|
47
45
|
[prefix]: handler,
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var __jsonParse = (a) => JSON.parse(a);
|
|
3
|
-
|
|
4
2
|
// ../../src/bootstrap/createWebRoutes.ts
|
|
5
3
|
import { join as join2 } from "path";
|
|
6
4
|
import { isViewsEnabled as isViewsEnabled2 } from "@getstrata/core/runtime/frontendMode";
|
|
@@ -154,10 +152,10 @@ class HttpKernel {
|
|
|
154
152
|
const config = this.dependencies.container.resolve(CORE_CONFIG_TOKEN);
|
|
155
153
|
const redisUrl = config.get(REDIS_URL_CONFIG_KEY)?.trim() ?? "";
|
|
156
154
|
if (!redisUrl) {
|
|
157
|
-
const
|
|
155
|
+
const maxAttempts = Number(process.env.RATE_LIMIT_PER_MINUTE ?? "120");
|
|
158
156
|
return [
|
|
159
157
|
createMemoryThrottleMiddleware({
|
|
160
|
-
maxAttempts: Number.isFinite(
|
|
158
|
+
maxAttempts: Number.isFinite(maxAttempts) ? maxAttempts : 120,
|
|
161
159
|
decaySeconds: 60
|
|
162
160
|
})
|
|
163
161
|
];
|
package/dist/entries/health.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var __jsonParse = (a) => JSON.parse(a);
|
|
3
|
-
|
|
4
2
|
// ../../src/bootstrap/httpKernel.ts
|
|
5
3
|
import {
|
|
6
4
|
hasVerifiedEmail,
|
|
@@ -142,10 +140,10 @@ class HttpKernel {
|
|
|
142
140
|
const config = this.dependencies.container.resolve(CORE_CONFIG_TOKEN);
|
|
143
141
|
const redisUrl = config.get(REDIS_URL_CONFIG_KEY)?.trim() ?? "";
|
|
144
142
|
if (!redisUrl) {
|
|
145
|
-
const
|
|
143
|
+
const maxAttempts = Number(process.env.RATE_LIMIT_PER_MINUTE ?? "120");
|
|
146
144
|
return [
|
|
147
145
|
createMemoryThrottleMiddleware({
|
|
148
|
-
maxAttempts: Number.isFinite(
|
|
146
|
+
maxAttempts: Number.isFinite(maxAttempts) ? maxAttempts : 120,
|
|
149
147
|
decaySeconds: 60
|
|
150
148
|
})
|
|
151
149
|
];
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var __jsonParse = (a) => JSON.parse(a);
|
|
3
|
-
|
|
4
2
|
// ../../src/bootstrap/listeners/invalidateCacheOnModelWrite.ts
|
|
5
3
|
import { eventBus, modelEventName } from "@getstrata/core/events";
|
|
6
4
|
import { InvalidateCacheTagsJob } from "@getstrata/core/jobs/invalidateCacheTagsJob";
|
package/dist/entries/schedule.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var __jsonParse = (a) => JSON.parse(a);
|
|
3
|
-
|
|
4
2
|
// ../../src/bootstrap/web/routing.ts
|
|
5
3
|
import { requestPrefersJson } from "@getstrata/core/http/contentNegotiation";
|
|
6
4
|
import { withErrorHandling as withErrorHandling2 } from "@getstrata/core/http/response";
|
|
@@ -152,10 +150,10 @@ class HttpKernel {
|
|
|
152
150
|
const config = this.dependencies.container.resolve(CORE_CONFIG_TOKEN);
|
|
153
151
|
const redisUrl = config.get(REDIS_URL_CONFIG_KEY)?.trim() ?? "";
|
|
154
152
|
if (!redisUrl) {
|
|
155
|
-
const
|
|
153
|
+
const maxAttempts = Number(process.env.RATE_LIMIT_PER_MINUTE ?? "120");
|
|
156
154
|
return [
|
|
157
155
|
createMemoryThrottleMiddleware({
|
|
158
|
-
maxAttempts: Number.isFinite(
|
|
156
|
+
maxAttempts: Number.isFinite(maxAttempts) ? maxAttempts : 120,
|
|
159
157
|
decaySeconds: 60
|
|
160
158
|
})
|
|
161
159
|
];
|
package/dist/entries/web/slug.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -158,10 +158,10 @@ class HttpKernel {
|
|
|
158
158
|
const config = this.dependencies.container.resolve(CORE_CONFIG_TOKEN);
|
|
159
159
|
const redisUrl = config.get(REDIS_URL_CONFIG_KEY)?.trim() ?? "";
|
|
160
160
|
if (!redisUrl) {
|
|
161
|
-
const
|
|
161
|
+
const maxAttempts = Number(process.env.RATE_LIMIT_PER_MINUTE ?? "120");
|
|
162
162
|
return [
|
|
163
163
|
createMemoryThrottleMiddleware({
|
|
164
|
-
maxAttempts: Number.isFinite(
|
|
164
|
+
maxAttempts: Number.isFinite(maxAttempts) ? maxAttempts : 120,
|
|
165
165
|
decaySeconds: 60
|
|
166
166
|
})
|
|
167
167
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getstrata/bootstrap",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Strata application bootstrap: HttpKernel, DI, web session helpers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -180,7 +180,7 @@
|
|
|
180
180
|
"access": "public"
|
|
181
181
|
},
|
|
182
182
|
"peerDependencies": {
|
|
183
|
-
"@getstrata/core": "^0.
|
|
183
|
+
"@getstrata/core": "^1.0.0",
|
|
184
184
|
"typescript": "^5.9.0"
|
|
185
185
|
}
|
|
186
186
|
}
|
|
File without changes
|