@lastshotlabs/bunshot 0.1.2 → 0.2.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/.oclif.manifest.json
CHANGED
package/dist/src/app.d.ts
CHANGED
|
@@ -176,7 +176,7 @@ export interface CreateAppConfig {
|
|
|
176
176
|
*/
|
|
177
177
|
modelSchemas?: string | string[] | ModelSchemasConfig;
|
|
178
178
|
/** App name and version for the root endpoint and OpenAPI docs */
|
|
179
|
-
|
|
179
|
+
meta?: AppMeta;
|
|
180
180
|
/** Security: CORS, rate limiting, trust-proxy, signing, captcha */
|
|
181
181
|
security?: SecurityConfig;
|
|
182
182
|
/** Extra middleware injected after plugin middleware, before route matching */
|
package/dist/src/app.js
CHANGED
|
@@ -19,7 +19,7 @@ async function prepareBootstrap(config) {
|
|
|
19
19
|
const { warnings } = validateAppConfig(config);
|
|
20
20
|
for (const w of warnings)
|
|
21
21
|
console.warn(w);
|
|
22
|
-
const {
|
|
22
|
+
const { meta: appConfig = {}, security: securityInput = {}, db = {} } = config;
|
|
23
23
|
const securityConfig = {
|
|
24
24
|
...securityInput,
|
|
25
25
|
signing: securityInput.signing ? { ...securityInput.signing } : undefined,
|
|
@@ -16,7 +16,7 @@ export declare const appConfigSchema: z.ZodObject<{
|
|
|
16
16
|
auto: "auto";
|
|
17
17
|
}>>;
|
|
18
18
|
}, z.core.$loose>]>>;
|
|
19
|
-
|
|
19
|
+
meta: z.ZodOptional<z.ZodObject<{
|
|
20
20
|
name: z.ZodOptional<z.ZodString>;
|
|
21
21
|
version: z.ZodOptional<z.ZodString>;
|
|
22
22
|
}, z.core.$loose>>;
|
|
@@ -199,7 +199,7 @@ export declare const serverConfigSchema: z.ZodObject<{
|
|
|
199
199
|
auto: "auto";
|
|
200
200
|
}>>;
|
|
201
201
|
}, z.core.$loose>]>>;
|
|
202
|
-
|
|
202
|
+
meta: z.ZodOptional<z.ZodObject<{
|
|
203
203
|
name: z.ZodOptional<z.ZodString>;
|
|
204
204
|
version: z.ZodOptional<z.ZodString>;
|
|
205
205
|
}, z.core.$loose>>;
|
|
@@ -284,7 +284,7 @@ export const appConfigSchema = z
|
|
|
284
284
|
modelSchemas: z
|
|
285
285
|
.union([z.string(), z.array(z.string()), modelSchemasObjectSchema.passthrough()])
|
|
286
286
|
.optional(),
|
|
287
|
-
|
|
287
|
+
meta: appSectionSchema.passthrough().optional(),
|
|
288
288
|
security: securitySchema.passthrough().optional(),
|
|
289
289
|
middleware: z.array(z.unknown()).optional(),
|
|
290
290
|
db: dbSchema.passthrough().optional(),
|
|
@@ -324,7 +324,7 @@ export const serverConfigSchema = appConfigSchema
|
|
|
324
324
|
* Used to detect unknown/typo'd keys in nested config objects.
|
|
325
325
|
*/
|
|
326
326
|
const NESTED_KNOWN_KEYS = {
|
|
327
|
-
|
|
327
|
+
meta: new Set(['name', 'version']),
|
|
328
328
|
security: new Set([
|
|
329
329
|
'cors',
|
|
330
330
|
'headers',
|
|
@@ -429,7 +429,7 @@ const NESTED_KNOWN_KEYS = {
|
|
|
429
429
|
const APP_CONFIG_KEYS = new Set([
|
|
430
430
|
'routesDir',
|
|
431
431
|
'modelSchemas',
|
|
432
|
-
'
|
|
432
|
+
'meta',
|
|
433
433
|
'security',
|
|
434
434
|
'middleware',
|
|
435
435
|
'db',
|
package/dist/src/testing.js
CHANGED
package/package.json
CHANGED