geonix 1.20.5 → 1.20.6
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/index.d.ts +4 -1
- package/package.json +1 -1
- package/src/Codec.js +5 -1
- package/src/Service.js +3 -3
package/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export function encode(data: any): Uint8Array;
|
|
2
|
+
export function decode(data: any): unknown;
|
|
1
3
|
export const codec: import("nats").Codec<unknown>;
|
|
2
4
|
export const connection: Connection;
|
|
3
5
|
export function stopConnection(): void;
|
|
@@ -168,7 +170,8 @@ export function Stream(data: any, tag?: string): any;
|
|
|
168
170
|
export function isStream(object: any): any;
|
|
169
171
|
export function getReadable(object: any): Promise<any>;
|
|
170
172
|
export function streamToBuffer(object: any): Promise<any>;
|
|
171
|
-
export function streamToString(object: any): Promise<any>;
|
|
173
|
+
export function streamToString(object: any, encoding: any): Promise<any>;
|
|
174
|
+
export function streamToJSON(object: any): Promise<any>;
|
|
172
175
|
export const stats: {};
|
|
173
176
|
export const activeStreams: {};
|
|
174
177
|
/**
|
package/package.json
CHANGED
package/src/Codec.js
CHANGED
package/src/Service.js
CHANGED
|
@@ -183,13 +183,13 @@ export class Service {
|
|
|
183
183
|
const router = webserver.router();
|
|
184
184
|
|
|
185
185
|
// setup defualt middlewares
|
|
186
|
-
if (this.#options.middleware
|
|
186
|
+
if (this.#options.middleware?.json) {
|
|
187
187
|
router.use(json);
|
|
188
188
|
}
|
|
189
|
-
if (this.#options.middleware
|
|
189
|
+
if (this.#options.middleware?.raw) {
|
|
190
190
|
router.use(raw);
|
|
191
191
|
}
|
|
192
|
-
if (this.#options.middleware
|
|
192
|
+
if (this.#options.middleware?.cookies) {
|
|
193
193
|
router.use(cookies);
|
|
194
194
|
}
|
|
195
195
|
|