@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.
@@ -35,5 +35,5 @@
35
35
  ]
36
36
  }
37
37
  },
38
- "version": "0.1.2"
38
+ "version": "0.2.0"
39
39
  }
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
- app?: AppMeta;
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 { app: appConfig = {}, security: securityInput = {}, db = {} } = config;
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
- app: z.ZodOptional<z.ZodObject<{
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
- app: z.ZodOptional<z.ZodObject<{
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
- app: appSectionSchema.passthrough().optional(),
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
- app: new Set(['name', 'version']),
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
- 'app',
432
+ 'meta',
433
433
  'security',
434
434
  'middleware',
435
435
  'db',
@@ -28,7 +28,7 @@ export function wrapAppAsTestServer(app) {
28
28
  export async function createTestFullServer(config) {
29
29
  const fullConfig = {
30
30
  routesDir: '.',
31
- app: { name: 'E2E Test App' },
31
+ meta: { name: 'E2E Test App' },
32
32
  db: {
33
33
  mongo: false,
34
34
  redis: false,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "workspaces": [
4
4
  "packages/*"
5
5
  ],
6
- "version": "0.1.2",
6
+ "version": "0.2.0",
7
7
  "description": "Batteries-included Bun + Hono API framework — auth, sessions, rate limiting, WebSocket, queues, and OpenAPI docs out of the box",
8
8
  "repository": {
9
9
  "type": "git",