@niledatabase/server 3.0.0-alpha.31 → 3.0.0-alpha.33

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/types.d.ts CHANGED
@@ -21,6 +21,7 @@ export type ServerConfig = {
21
21
  userId?: string | null | undefined;
22
22
  debug?: boolean;
23
23
  configureUrl?: string;
24
+ secureCookies?: boolean;
24
25
  db?: NilePoolConfig;
25
26
  api?: {
26
27
  version?: number;
@@ -4,6 +4,7 @@ export type EnvConfig = {
4
4
  logger?: string;
5
5
  config?: ServerConfig;
6
6
  };
7
+ export declare const getSecureCookies: (cfg: EnvConfig) => boolean | undefined;
7
8
  export declare const getDatabaseId: (cfg: EnvConfig) => string | undefined;
8
9
  export declare const getUsername: (cfg: EnvConfig) => string | undefined;
9
10
  export declare const getPassword: (cfg: EnvConfig) => string | undefined;
@@ -32,6 +32,7 @@ export declare class Config {
32
32
  routePrefix?: string;
33
33
  routes?: ConfigRoutes;
34
34
  logger?: LoggerType;
35
+ secureCookies?: boolean | undefined;
35
36
  debug: boolean;
36
37
  db: NilePoolConfig;
37
38
  api: ApiConfig;
@@ -3,7 +3,9 @@ import { Config } from './Config';
3
3
  import { NileRequest } from './Requester';
4
4
  export declare const X_NILE_TENANT = "niledb-tenant-id";
5
5
  export declare const X_NILE_USER_ID = "niledb-user-id";
6
+ export declare const X_NILE_SECURECOOKIES = "niledb-useSecureCookies";
6
7
  export declare function handleTenantId(req: NileRequest<any>, config: Config): ResponseError | void;
7
8
  export declare function getTenantFromHttp(headers: Headers, config?: Config): string | null | undefined;
8
9
  export declare function getUserFromHttp(headers: Headers, config: Config): string | null | undefined;
10
+ export declare function makeBasicHeaders(config: Config, opts?: RequestInit): Headers;
9
11
  export declare function _fetch(config: Config, path: string, opts?: RequestInit): Promise<Response | ResponseError>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@niledatabase/server",
3
- "version": "3.0.0-alpha.31",
3
+ "version": "3.0.0-alpha.33",
4
4
  "license": "MIT",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/server.esm.js",
@@ -74,5 +74,5 @@
74
74
  "jose": "^4.15.4",
75
75
  "pg": "^8.11.3"
76
76
  },
77
- "gitHead": "a39d4e3eae893c4992a5192a8a62ca5653c84bf4"
77
+ "gitHead": "62b0413edae3a13f1e80aa0c78096c8950eee903"
78
78
  }