typed-bridge 2.0.3 → 2.0.4
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/context.md +6 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/readme.md +4 -4
package/context.md
CHANGED
|
@@ -166,3 +166,9 @@ console.log(user)
|
|
|
166
166
|
2. Add `'module.method': handler` to `src/bridge/index.ts`
|
|
167
167
|
3. (If validating) add types in `src/bridge/<module>/types.ts`
|
|
168
168
|
4. Run `npm run gen:typed-bridge-client` to refresh the client
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## **Environment Variables**
|
|
173
|
+
|
|
174
|
+
Typed Bridge automatically imports `.env` variables for you, internally using [`dotenv`](https://www.npmjs.com/package/dotenv`). This means any environment variables defined in a `.env` file at the root of your project will be available to your application without additional setup.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import 'dotenv/config';
|
|
2
2
|
export { createBridge, createMiddleware, onShutdown } from './bridge';
|
|
3
3
|
export { config as tbConfig } from './config';
|
|
4
|
-
export {
|
|
4
|
+
export { default as $z } from 'zod';
|
|
5
5
|
export { Application, default as express, NextFunction, Request, Response, Router } from 'express';
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "onShutdown", { enumerable: true, get: function (
|
|
|
12
12
|
var config_1 = require("./config");
|
|
13
13
|
Object.defineProperty(exports, "tbConfig", { enumerable: true, get: function () { return config_1.config; } });
|
|
14
14
|
var zod_1 = require("zod");
|
|
15
|
-
Object.defineProperty(exports, "$z", { enumerable: true, get: function () { return zod_1.
|
|
15
|
+
Object.defineProperty(exports, "$z", { enumerable: true, get: function () { return __importDefault(zod_1).default; } });
|
|
16
16
|
var express_1 = require("express");
|
|
17
17
|
Object.defineProperty(exports, "express", { enumerable: true, get: function () { return __importDefault(express_1).default; } });
|
|
18
18
|
Object.defineProperty(exports, "Router", { enumerable: true, get: function () { return express_1.Router; } });
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -284,6 +284,10 @@ tbConfig.logs.error = true // Enable error logging
|
|
|
284
284
|
tbConfig.responseDelay = 0 // Custom response delay in milliseconds (useful for testing)
|
|
285
285
|
```
|
|
286
286
|
|
|
287
|
+
## Environment File
|
|
288
|
+
|
|
289
|
+
Typed Bridge automatically imports `.env` variables for you, internally using [`dotenv`](https://www.npmjs.com/package/dotenv).
|
|
290
|
+
|
|
287
291
|
## Developer
|
|
288
292
|
|
|
289
293
|
Developed & maintained by [neilveil](https://github.com/neilveil). Give a ⭐ to support this project!
|
|
@@ -291,7 +295,3 @@ Developed & maintained by [neilveil](https://github.com/neilveil). Give a ⭐ to
|
|
|
291
295
|
---
|
|
292
296
|
|
|
293
297
|
[Context for AI IDE](https://raw.githubusercontent.com/neilveil/typed-bridge/refs/heads/main/context.md)
|
|
294
|
-
|
|
295
|
-
## To do
|
|
296
|
-
|
|
297
|
-
- Auto import `.env` variables
|