silgi 0.20.12 → 0.20.13
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/dist/_chunks/index.mjs +1 -1
- package/dist/kit/index.d.mts +5 -4
- package/dist/kit/index.d.ts +5 -4
- package/dist/meta/index.d.mts +1 -1
- package/dist/meta/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/_chunks/index.mjs
CHANGED
package/dist/kit/index.d.mts
CHANGED
|
@@ -2,8 +2,7 @@ import { SilgiCLI, ModuleOptionsCustom, ModuleDefinition, SilgiModule, ServicePa
|
|
|
2
2
|
import { Buffer } from 'node:buffer';
|
|
3
3
|
import * as consola from 'consola';
|
|
4
4
|
import { ConsolaOptions } from 'consola';
|
|
5
|
-
import
|
|
6
|
-
import { IncomingMessage } from 'node:http';
|
|
5
|
+
import { IncomingMessage, ServerResponse } from 'node:http';
|
|
7
6
|
|
|
8
7
|
declare function hasError(type: SilgiCLI['errors'][0]['type'], silgi?: SilgiCLI): boolean;
|
|
9
8
|
|
|
@@ -122,8 +121,10 @@ declare function addTemplate<T>(_template: SilgiTemplate<T> | string): ResolvedS
|
|
|
122
121
|
*/
|
|
123
122
|
declare function normalizeTemplate<T>(template: SilgiTemplate<T> | string, buildDir?: string): ResolvedSilgiTemplate<T>;
|
|
124
123
|
|
|
125
|
-
declare function useRequest(event: SilgiEvents): IncomingMessage
|
|
126
|
-
|
|
124
|
+
declare function useRequest<T extends IncomingMessage>(event: SilgiEvents): T | (IncomingMessage & {
|
|
125
|
+
originalUrl?: string;
|
|
126
|
+
});
|
|
127
|
+
declare function useResponse<T extends ServerResponse>(event: SilgiEvents): ServerResponse<IncomingMessage>;
|
|
127
128
|
declare function getIpAddress(event: SilgiEvents): string | false;
|
|
128
129
|
/**
|
|
129
130
|
* Extract the client's IP address from request headers with high accuracy
|
package/dist/kit/index.d.ts
CHANGED
|
@@ -2,8 +2,7 @@ import { SilgiCLI, ModuleOptionsCustom, ModuleDefinition, SilgiModule, ServicePa
|
|
|
2
2
|
import { Buffer } from 'node:buffer';
|
|
3
3
|
import * as consola from 'consola';
|
|
4
4
|
import { ConsolaOptions } from 'consola';
|
|
5
|
-
import
|
|
6
|
-
import { IncomingMessage } from 'node:http';
|
|
5
|
+
import { IncomingMessage, ServerResponse } from 'node:http';
|
|
7
6
|
|
|
8
7
|
declare function hasError(type: SilgiCLI['errors'][0]['type'], silgi?: SilgiCLI): boolean;
|
|
9
8
|
|
|
@@ -122,8 +121,10 @@ declare function addTemplate<T>(_template: SilgiTemplate<T> | string): ResolvedS
|
|
|
122
121
|
*/
|
|
123
122
|
declare function normalizeTemplate<T>(template: SilgiTemplate<T> | string, buildDir?: string): ResolvedSilgiTemplate<T>;
|
|
124
123
|
|
|
125
|
-
declare function useRequest(event: SilgiEvents): IncomingMessage
|
|
126
|
-
|
|
124
|
+
declare function useRequest<T extends IncomingMessage>(event: SilgiEvents): T | (IncomingMessage & {
|
|
125
|
+
originalUrl?: string;
|
|
126
|
+
});
|
|
127
|
+
declare function useResponse<T extends ServerResponse>(event: SilgiEvents): ServerResponse<IncomingMessage>;
|
|
127
128
|
declare function getIpAddress(event: SilgiEvents): string | false;
|
|
128
129
|
/**
|
|
129
130
|
* Extract the client's IP address from request headers with high accuracy
|
package/dist/meta/index.d.mts
CHANGED
package/dist/meta/index.d.ts
CHANGED