@pellux/goodvibes-sdk 0.18.22 → 0.18.23
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/_internal/platform/runtime/network/inbound.d.ts +6 -3
- package/dist/_internal/platform/runtime/network/inbound.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/network/inbound.js +6 -6
- package/dist/_internal/platform/runtime/network/outbound.d.ts +9 -6
- package/dist/_internal/platform/runtime/network/outbound.d.ts.map +1 -1
- package/dist/_internal/platform/runtime/network/shared.d.ts +3 -3
- package/dist/_internal/platform/runtime/network/shared.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { ConfigManager } from '../../config/manager.js';
|
|
2
1
|
export type InboundTlsMode = 'off' | 'proxy' | 'direct';
|
|
3
2
|
export type InboundServerSurface = 'controlPlane' | 'httpListener';
|
|
4
3
|
export interface InboundTlsSnapshot {
|
|
@@ -22,6 +21,10 @@ export interface InboundTlsSnapshot {
|
|
|
22
21
|
export interface ResolvedInboundTlsContext extends InboundTlsSnapshot {
|
|
23
22
|
readonly tls?: Bun.TLSOptions;
|
|
24
23
|
}
|
|
25
|
-
export
|
|
26
|
-
|
|
24
|
+
export interface InboundTlsConfigReader {
|
|
25
|
+
get(path: string): unknown;
|
|
26
|
+
getControlPlaneConfigDir(): string;
|
|
27
|
+
}
|
|
28
|
+
export declare function inspectInboundTls(configManager: InboundTlsConfigReader, surface: InboundServerSurface): InboundTlsSnapshot;
|
|
29
|
+
export declare function resolveInboundTlsContext(configManager: InboundTlsConfigReader, surface: InboundServerSurface): ResolvedInboundTlsContext;
|
|
27
30
|
//# sourceMappingURL=inbound.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inbound.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/runtime/network/inbound.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"inbound.d.ts","sourceRo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B,GAAG,kBAAkB,CAyC1H;AAED,wBAAgB,wBAAwB,CAAC,aAAa,EAAE,sBAAsB,EAAE,OAAO,EAAE,oBAAoB,GAAG,yBAAyB,CAexI"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
2
|
import { getDefaultInboundCertPaths, inspectPrivateKeyPermissions, resolvePathFromGoodVibesRoot } from './shared.js';
|
|
3
3
|
function readMode(configManager, surface) {
|
|
4
|
-
return surface === 'controlPlane'
|
|
4
|
+
return (surface === 'controlPlane'
|
|
5
5
|
? configManager.get('controlPlane.tls.mode')
|
|
6
|
-
: configManager.get('httpListener.tls.mode');
|
|
6
|
+
: configManager.get('httpListener.tls.mode'));
|
|
7
7
|
}
|
|
8
8
|
function readTrustProxy(configManager, surface) {
|
|
9
9
|
return surface === 'controlPlane'
|
|
@@ -21,14 +21,14 @@ function readPort(configManager, surface) {
|
|
|
21
21
|
: configManager.get('httpListener.port'));
|
|
22
22
|
}
|
|
23
23
|
function readConfiguredCertPath(configManager, surface) {
|
|
24
|
-
return resolvePathFromGoodVibesRoot(surface === 'controlPlane'
|
|
24
|
+
return resolvePathFromGoodVibesRoot((surface === 'controlPlane'
|
|
25
25
|
? configManager.get('controlPlane.tls.certFile')
|
|
26
|
-
: configManager.get('httpListener.tls.certFile'), configManager);
|
|
26
|
+
: configManager.get('httpListener.tls.certFile')), configManager);
|
|
27
27
|
}
|
|
28
28
|
function readConfiguredKeyPath(configManager, surface) {
|
|
29
|
-
return resolvePathFromGoodVibesRoot(surface === 'controlPlane'
|
|
29
|
+
return resolvePathFromGoodVibesRoot((surface === 'controlPlane'
|
|
30
30
|
? configManager.get('controlPlane.tls.keyFile')
|
|
31
|
-
: configManager.get('httpListener.tls.keyFile'), configManager);
|
|
31
|
+
: configManager.get('httpListener.tls.keyFile')), configManager);
|
|
32
32
|
}
|
|
33
33
|
export function inspectInboundTls(configManager, surface) {
|
|
34
34
|
const mode = readMode(configManager, surface);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { ConfigManager } from '../../config/manager.js';
|
|
2
1
|
export type OutboundTrustMode = 'bundled' | 'bundled+custom' | 'custom';
|
|
3
2
|
type FetchTlsOptions = Bun.TLSOptions & {
|
|
4
3
|
checkServerIdentity?: NonNullable<import('node:tls').ConnectionOptions['checkServerIdentity']>;
|
|
@@ -15,14 +14,18 @@ export interface OutboundTlsSnapshot {
|
|
|
15
14
|
readonly effectiveCaStrategy: 'bun-default' | 'bundled+custom' | 'custom';
|
|
16
15
|
readonly errors: readonly string[];
|
|
17
16
|
}
|
|
18
|
-
export
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
export interface OutboundTlsConfigReader {
|
|
18
|
+
get(path: string): unknown;
|
|
19
|
+
getControlPlaneConfigDir(): string;
|
|
20
|
+
}
|
|
21
|
+
export declare function inspectOutboundTls(configManager: OutboundTlsConfigReader): OutboundTlsSnapshot;
|
|
22
|
+
export declare function applyOutboundTlsToFetchInit(input: RequestInfo | URL, init: RequestInit | undefined, configManager: OutboundTlsConfigReader): FetchInitWithTls;
|
|
23
|
+
export declare function createNetworkFetch(fetchImpl: typeof globalThis.fetch, configManager: OutboundTlsConfigReader): typeof globalThis.fetch;
|
|
21
24
|
export declare class GlobalNetworkTransportInstaller {
|
|
22
25
|
private originalFetchRef;
|
|
23
26
|
private configManager;
|
|
24
|
-
setConfigManager(configManager:
|
|
25
|
-
install(configManager:
|
|
27
|
+
setConfigManager(configManager: OutboundTlsConfigReader): void;
|
|
28
|
+
install(configManager: OutboundTlsConfigReader): void;
|
|
26
29
|
}
|
|
27
30
|
export {};
|
|
28
31
|
//# sourceMappingURL=outbound.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outbound.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/runtime/network/outbound.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"outbound.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/run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;IAC1C,OAAO,CAAC,gBAAgB,CAAwC;IAChE,OAAO,CAAC,aAAa,CAAwC;IAE7D,gBAAgB,CAAC,aAAa,EAAE,uBAAuB,GAAG,IAAI;IAI9D,OAAO,CAAC,aAAa,EAAE,uBAAuB,GAAG,IAAI;CAsBtD"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export interface NetworkRootConfig {
|
|
2
|
+
getControlPlaneConfigDir(): string;
|
|
3
|
+
}
|
|
3
4
|
export declare function getGoodVibesRootDir(configManager: NetworkRootConfig): string;
|
|
4
5
|
export declare function getDefaultCertDirectory(configManager: NetworkRootConfig): string;
|
|
5
6
|
export declare function getDefaultInboundCertPaths(configManager: NetworkRootConfig): {
|
|
@@ -15,5 +16,4 @@ export declare function inspectPrivateKeyPermissions(path: string): {
|
|
|
15
16
|
readonly safe?: boolean;
|
|
16
17
|
readonly mode?: string;
|
|
17
18
|
};
|
|
18
|
-
export {};
|
|
19
19
|
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/runtime/network/shared.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/runtime/network/shared.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,iBAAiB;IAChC,wBAAwB,IAAI,MAAM,CAAC;CACpC;AAED,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,iBAAiB,GAAG,MAAM,CAG5E;AAED,wBAAgB,uBAAuB,CAAC,aAAa,EAAE,iBAAiB,GAAG,MAAM,CAEhF;AAED,wBAAgB,0BAA0B,CAAC,aAAa,EAAE,iBAAiB,GAAG;IAC5E,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B,CAMA;AAED,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAChC,aAAa,EAAE,iBAAiB,GAC/B,MAAM,GAAG,IAAI,CAMf;AAED,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAMlE;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAMzD;AAED,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAS9F;AAED,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,MAAM,GAAG;IAC1D,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB,CAWA"}
|
package/package.json
CHANGED