quidproquo-webserver 0.1.27 → 0.1.28
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/lib/commonjs/config/constants/FEDERATED_VIEWS_SUBDOMAIN.d.ts +5 -0
- package/lib/commonjs/config/constants/FEDERATED_VIEWS_SUBDOMAIN.js +10 -0
- package/lib/commonjs/config/constants/FEDERATED_VIEWS_SUBDOMAIN.js.map +1 -0
- package/lib/commonjs/config/constants/index.d.ts +1 -0
- package/lib/commonjs/config/constants/index.js +18 -0
- package/lib/commonjs/config/constants/index.js.map +1 -0
- package/lib/commonjs/config/index.d.ts +1 -0
- package/lib/commonjs/config/index.js +1 -0
- package/lib/commonjs/config/index.js.map +1 -1
- package/lib/commonjs/config/types/index.d.ts +1 -0
- package/lib/commonjs/config/types/index.js +1 -0
- package/lib/commonjs/config/types/index.js.map +1 -1
- package/lib/commonjs/config/types/webAddressing/ApiAddress.d.ts +6 -0
- package/lib/commonjs/config/types/webAddressing/ApiAddress.js +3 -0
- package/lib/commonjs/config/types/webAddressing/ApiAddress.js.map +1 -0
- package/lib/commonjs/config/types/webAddressing/WebAddressing.d.ts +20 -0
- package/lib/commonjs/config/types/webAddressing/WebAddressing.js +3 -0
- package/lib/commonjs/config/types/webAddressing/WebAddressing.js.map +1 -0
- package/lib/commonjs/config/types/webAddressing/WebAddressingMode.d.ts +5 -0
- package/lib/commonjs/config/types/webAddressing/WebAddressingMode.js +10 -0
- package/lib/commonjs/config/types/webAddressing/WebAddressingMode.js.map +1 -0
- package/lib/commonjs/config/types/webAddressing/WebEntryAddress.d.ts +9 -0
- package/lib/commonjs/config/types/webAddressing/WebEntryAddress.js +3 -0
- package/lib/commonjs/config/types/webAddressing/WebEntryAddress.js.map +1 -0
- package/lib/commonjs/config/types/webAddressing/index.d.ts +4 -0
- package/lib/commonjs/config/types/webAddressing/index.js +21 -0
- package/lib/commonjs/config/types/webAddressing/index.js.map +1 -0
- package/lib/esm/config/constants/FEDERATED_VIEWS_SUBDOMAIN.d.ts +5 -0
- package/lib/esm/config/constants/FEDERATED_VIEWS_SUBDOMAIN.js +7 -0
- package/lib/esm/config/constants/FEDERATED_VIEWS_SUBDOMAIN.js.map +1 -0
- package/lib/esm/config/constants/index.d.ts +1 -0
- package/lib/esm/config/constants/index.js +2 -0
- package/lib/esm/config/constants/index.js.map +1 -0
- package/lib/esm/config/index.d.ts +1 -0
- package/lib/esm/config/index.js +1 -0
- package/lib/esm/config/index.js.map +1 -1
- package/lib/esm/config/types/index.d.ts +1 -0
- package/lib/esm/config/types/index.js +1 -0
- package/lib/esm/config/types/index.js.map +1 -1
- package/lib/esm/config/types/webAddressing/ApiAddress.d.ts +6 -0
- package/lib/esm/config/types/webAddressing/ApiAddress.js +2 -0
- package/lib/esm/config/types/webAddressing/ApiAddress.js.map +1 -0
- package/lib/esm/config/types/webAddressing/WebAddressing.d.ts +20 -0
- package/lib/esm/config/types/webAddressing/WebAddressing.js +2 -0
- package/lib/esm/config/types/webAddressing/WebAddressing.js.map +1 -0
- package/lib/esm/config/types/webAddressing/WebAddressingMode.d.ts +5 -0
- package/lib/esm/config/types/webAddressing/WebAddressingMode.js +7 -0
- package/lib/esm/config/types/webAddressing/WebAddressingMode.js.map +1 -0
- package/lib/esm/config/types/webAddressing/WebEntryAddress.d.ts +9 -0
- package/lib/esm/config/types/webAddressing/WebEntryAddress.js +2 -0
- package/lib/esm/config/types/webAddressing/WebEntryAddress.js.map +1 -0
- package/lib/esm/config/types/webAddressing/index.d.ts +4 -0
- package/lib/esm/config/types/webAddressing/index.js +5 -0
- package/lib/esm/config/types/webAddressing/index.js.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FEDERATED_VIEWS_SUBDOMAIN = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Subdomain of the web entry that holds every service's federated views, each under `/<service>`.
|
|
6
|
+
* The views build bakes remote urls against it, so the entry that serves the remotes must use it.
|
|
7
|
+
*/
|
|
8
|
+
// TODO: We need to pass this into the build system.
|
|
9
|
+
exports.FEDERATED_VIEWS_SUBDOMAIN = 'views';
|
|
10
|
+
//# sourceMappingURL=FEDERATED_VIEWS_SUBDOMAIN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FEDERATED_VIEWS_SUBDOMAIN.js","sourceRoot":"","sources":["../../../../src/config/constants/FEDERATED_VIEWS_SUBDOMAIN.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,oDAAoD;AACvC,QAAA,yBAAyB,GAAG,OAAO,CAAC","sourcesContent":["/**\n * Subdomain of the web entry that holds every service's federated views, each under `/<service>`.\n * The views build bakes remote urls against it, so the entry that serves the remotes must use it.\n */\n// TODO: We need to pass this into the build system.\nexport const FEDERATED_VIEWS_SUBDOMAIN = 'views';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FEDERATED_VIEWS_SUBDOMAIN';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./FEDERATED_VIEWS_SUBDOMAIN"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/config/constants/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C","sourcesContent":["export * from './FEDERATED_VIEWS_SUBDOMAIN';\n"]}
|
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./constants"), exports);
|
|
17
18
|
__exportStar(require("./QPQConfig"), exports);
|
|
18
19
|
__exportStar(require("./settings"), exports);
|
|
19
20
|
__exportStar(require("./types"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,6CAA2B;AAC3B,0CAAwB","sourcesContent":["export * from './QPQConfig';\nexport * from './settings';\nexport * from './types';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,8CAA4B;AAC5B,6CAA2B;AAC3B,0CAAwB","sourcesContent":["export * from './constants';\nexport * from './QPQConfig';\nexport * from './settings';\nexport * from './types';\n"]}
|
|
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./JsonSchema"), exports);
|
|
18
18
|
__exportStar(require("./ResponseSecurityHeaders"), exports);
|
|
19
19
|
__exportStar(require("./RouteSchema"), exports);
|
|
20
|
+
__exportStar(require("./webAddressing"), exports);
|
|
20
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/config/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,4DAA0C;AAC1C,gDAA8B","sourcesContent":["export * from './JsonSchema';\nexport * from './ResponseSecurityHeaders';\nexport * from './RouteSchema';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/config/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,4DAA0C;AAC1C,gDAA8B;AAC9B,kDAAgC","sourcesContent":["export * from './JsonSchema';\nexport * from './ResponseSecurityHeaders';\nexport * from './RouteSchema';\nexport * from './webAddressing';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiAddress.js","sourceRoot":"","sources":["../../../../../src/config/types/webAddressing/ApiAddress.ts"],"names":[],"mappings":"","sourcesContent":["/** A service's api (or websocket api) in subdomain mode: the resolved host per root domain. */\nexport type ApiAddress = {\n service: string;\n apiSubdomain: string;\n hosts: string[];\n};\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ApiAddress } from './ApiAddress';
|
|
2
|
+
import { WebAddressingMode } from './WebAddressingMode';
|
|
3
|
+
import { WebEntryAddress } from './WebEntryAddress';
|
|
4
|
+
/**
|
|
5
|
+
* Baked into every views build so the frontend can address the api, websockets and other web
|
|
6
|
+
* entries without inspecting its own hostname. Subdomain mode carries hosts already resolved
|
|
7
|
+
* by the app's domain resolver, one per root domain; port mode carries the host-side ports.
|
|
8
|
+
*/
|
|
9
|
+
export type WebAddressing = {
|
|
10
|
+
mode: WebAddressingMode.subdomain;
|
|
11
|
+
rootDomains: string[];
|
|
12
|
+
entries: WebEntryAddress[];
|
|
13
|
+
apis: ApiAddress[];
|
|
14
|
+
webSockets: ApiAddress[];
|
|
15
|
+
} | {
|
|
16
|
+
mode: WebAddressingMode.port;
|
|
17
|
+
apiPort: number;
|
|
18
|
+
webSocketPort: number;
|
|
19
|
+
entries: WebEntryAddress[];
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebAddressing.js","sourceRoot":"","sources":["../../../../../src/config/types/webAddressing/WebAddressing.ts"],"names":[],"mappings":"","sourcesContent":["import { ApiAddress } from './ApiAddress';\nimport { WebAddressingMode } from './WebAddressingMode';\nimport { WebEntryAddress } from './WebEntryAddress';\n\n/**\n * Baked into every views build so the frontend can address the api, websockets and other web\n * entries without inspecting its own hostname. Subdomain mode carries hosts already resolved\n * by the app's domain resolver, one per root domain; port mode carries the host-side ports.\n */\nexport type WebAddressing =\n | {\n mode: WebAddressingMode.subdomain;\n // Primary first; every `hosts` array runs in this order.\n rootDomains: string[];\n entries: WebEntryAddress[];\n apis: ApiAddress[];\n webSockets: ApiAddress[];\n }\n | {\n mode: WebAddressingMode.port;\n apiPort: number;\n webSocketPort: number;\n entries: WebEntryAddress[];\n };\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebAddressingMode = void 0;
|
|
4
|
+
/** How a frontend reaches the app's other origins: one host per subdomain (AWS) or one host on several ports (dev server, docker). */
|
|
5
|
+
var WebAddressingMode;
|
|
6
|
+
(function (WebAddressingMode) {
|
|
7
|
+
WebAddressingMode["subdomain"] = "subdomain";
|
|
8
|
+
WebAddressingMode["port"] = "port";
|
|
9
|
+
})(WebAddressingMode || (exports.WebAddressingMode = WebAddressingMode = {}));
|
|
10
|
+
//# sourceMappingURL=WebAddressingMode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebAddressingMode.js","sourceRoot":"","sources":["../../../../../src/config/types/webAddressing/WebAddressingMode.ts"],"names":[],"mappings":";;;AAAA,sIAAsI;AACtI,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,4CAAuB,CAAA;IACvB,kCAAa,CAAA;AACf,CAAC,EAHW,iBAAiB,iCAAjB,iBAAiB,QAG5B","sourcesContent":["/** How a frontend reaches the app's other origins: one host per subdomain (AWS) or one host on several ports (dev server, docker). */\nexport enum WebAddressingMode {\n subdomain = 'subdomain',\n port = 'port',\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Nullable } from 'quidproquo-core';
|
|
2
|
+
/** Where one web entry is reachable from the browser, in either addressing mode. */
|
|
3
|
+
export type WebEntryAddress = {
|
|
4
|
+
service: string;
|
|
5
|
+
name: string;
|
|
6
|
+
hosts: string[];
|
|
7
|
+
port: Nullable<number>;
|
|
8
|
+
path: string;
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebEntryAddress.js","sourceRoot":"","sources":["../../../../../src/config/types/webAddressing/WebEntryAddress.ts"],"names":[],"mappings":"","sourcesContent":["import { Nullable } from 'quidproquo-core';\n\n/** Where one web entry is reachable from the browser, in either addressing mode. */\nexport type WebEntryAddress = {\n service: string;\n name: string;\n // Subdomain mode: the resolved host per root domain, in `WebAddressing.rootDomains` order.\n hosts: string[];\n // Port mode: the host-side port when the entry has its own listener, else null (served at `path` on the api origin).\n port: Nullable<number>;\n // Port mode: '/' for the root-domain entry, '/<subdomain>' otherwise.\n path: string;\n};\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./ApiAddress"), exports);
|
|
18
|
+
__exportStar(require("./WebAddressing"), exports);
|
|
19
|
+
__exportStar(require("./WebAddressingMode"), exports);
|
|
20
|
+
__exportStar(require("./WebEntryAddress"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/config/types/webAddressing/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,kDAAgC;AAChC,sDAAoC;AACpC,oDAAkC","sourcesContent":["export * from './ApiAddress';\nexport * from './WebAddressing';\nexport * from './WebAddressingMode';\nexport * from './WebEntryAddress';\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Subdomain of the web entry that holds every service's federated views, each under `/<service>`.
|
|
3
|
+
* The views build bakes remote urls against it, so the entry that serves the remotes must use it.
|
|
4
|
+
*/
|
|
5
|
+
// TODO: We need to pass this into the build system.
|
|
6
|
+
export const FEDERATED_VIEWS_SUBDOMAIN = 'views';
|
|
7
|
+
//# sourceMappingURL=FEDERATED_VIEWS_SUBDOMAIN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FEDERATED_VIEWS_SUBDOMAIN.js","sourceRoot":"","sources":["../../../../src/config/constants/FEDERATED_VIEWS_SUBDOMAIN.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,oDAAoD;AACpD,MAAM,CAAC,MAAM,yBAAyB,GAAG,OAAO,CAAC","sourcesContent":["/**\n * Subdomain of the web entry that holds every service's federated views, each under `/<service>`.\n * The views build bakes remote urls against it, so the entry that serves the remotes must use it.\n */\n// TODO: We need to pass this into the build system.\nexport const FEDERATED_VIEWS_SUBDOMAIN = 'views';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FEDERATED_VIEWS_SUBDOMAIN';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/config/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC","sourcesContent":["export * from './FEDERATED_VIEWS_SUBDOMAIN';\n"]}
|
package/lib/esm/config/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC","sourcesContent":["export * from './QPQConfig';\nexport * from './settings';\nexport * from './types';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC","sourcesContent":["export * from './constants';\nexport * from './QPQConfig';\nexport * from './settings';\nexport * from './types';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/config/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,eAAe,CAAC","sourcesContent":["export * from './JsonSchema';\nexport * from './ResponseSecurityHeaders';\nexport * from './RouteSchema';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/config/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC","sourcesContent":["export * from './JsonSchema';\nexport * from './ResponseSecurityHeaders';\nexport * from './RouteSchema';\nexport * from './webAddressing';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiAddress.js","sourceRoot":"","sources":["../../../../../src/config/types/webAddressing/ApiAddress.ts"],"names":[],"mappings":"","sourcesContent":["/** A service's api (or websocket api) in subdomain mode: the resolved host per root domain. */\nexport type ApiAddress = {\n service: string;\n apiSubdomain: string;\n hosts: string[];\n};\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ApiAddress } from './ApiAddress';
|
|
2
|
+
import { WebAddressingMode } from './WebAddressingMode';
|
|
3
|
+
import { WebEntryAddress } from './WebEntryAddress';
|
|
4
|
+
/**
|
|
5
|
+
* Baked into every views build so the frontend can address the api, websockets and other web
|
|
6
|
+
* entries without inspecting its own hostname. Subdomain mode carries hosts already resolved
|
|
7
|
+
* by the app's domain resolver, one per root domain; port mode carries the host-side ports.
|
|
8
|
+
*/
|
|
9
|
+
export type WebAddressing = {
|
|
10
|
+
mode: WebAddressingMode.subdomain;
|
|
11
|
+
rootDomains: string[];
|
|
12
|
+
entries: WebEntryAddress[];
|
|
13
|
+
apis: ApiAddress[];
|
|
14
|
+
webSockets: ApiAddress[];
|
|
15
|
+
} | {
|
|
16
|
+
mode: WebAddressingMode.port;
|
|
17
|
+
apiPort: number;
|
|
18
|
+
webSocketPort: number;
|
|
19
|
+
entries: WebEntryAddress[];
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebAddressing.js","sourceRoot":"","sources":["../../../../../src/config/types/webAddressing/WebAddressing.ts"],"names":[],"mappings":"","sourcesContent":["import { ApiAddress } from './ApiAddress';\nimport { WebAddressingMode } from './WebAddressingMode';\nimport { WebEntryAddress } from './WebEntryAddress';\n\n/**\n * Baked into every views build so the frontend can address the api, websockets and other web\n * entries without inspecting its own hostname. Subdomain mode carries hosts already resolved\n * by the app's domain resolver, one per root domain; port mode carries the host-side ports.\n */\nexport type WebAddressing =\n | {\n mode: WebAddressingMode.subdomain;\n // Primary first; every `hosts` array runs in this order.\n rootDomains: string[];\n entries: WebEntryAddress[];\n apis: ApiAddress[];\n webSockets: ApiAddress[];\n }\n | {\n mode: WebAddressingMode.port;\n apiPort: number;\n webSocketPort: number;\n entries: WebEntryAddress[];\n };\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** How a frontend reaches the app's other origins: one host per subdomain (AWS) or one host on several ports (dev server, docker). */
|
|
2
|
+
export var WebAddressingMode;
|
|
3
|
+
(function (WebAddressingMode) {
|
|
4
|
+
WebAddressingMode["subdomain"] = "subdomain";
|
|
5
|
+
WebAddressingMode["port"] = "port";
|
|
6
|
+
})(WebAddressingMode || (WebAddressingMode = {}));
|
|
7
|
+
//# sourceMappingURL=WebAddressingMode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebAddressingMode.js","sourceRoot":"","sources":["../../../../../src/config/types/webAddressing/WebAddressingMode.ts"],"names":[],"mappings":"AAAA,sIAAsI;AACtI,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,4CAAuB,CAAA;IACvB,kCAAa,CAAA;AACf,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B","sourcesContent":["/** How a frontend reaches the app's other origins: one host per subdomain (AWS) or one host on several ports (dev server, docker). */\nexport enum WebAddressingMode {\n subdomain = 'subdomain',\n port = 'port',\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Nullable } from 'quidproquo-core';
|
|
2
|
+
/** Where one web entry is reachable from the browser, in either addressing mode. */
|
|
3
|
+
export type WebEntryAddress = {
|
|
4
|
+
service: string;
|
|
5
|
+
name: string;
|
|
6
|
+
hosts: string[];
|
|
7
|
+
port: Nullable<number>;
|
|
8
|
+
path: string;
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebEntryAddress.js","sourceRoot":"","sources":["../../../../../src/config/types/webAddressing/WebEntryAddress.ts"],"names":[],"mappings":"","sourcesContent":["import { Nullable } from 'quidproquo-core';\n\n/** Where one web entry is reachable from the browser, in either addressing mode. */\nexport type WebEntryAddress = {\n service: string;\n name: string;\n // Subdomain mode: the resolved host per root domain, in `WebAddressing.rootDomains` order.\n hosts: string[];\n // Port mode: the host-side port when the entry has its own listener, else null (served at `path` on the api origin).\n port: Nullable<number>;\n // Port mode: '/' for the root-domain entry, '/<subdomain>' otherwise.\n path: string;\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/config/types/webAddressing/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC","sourcesContent":["export * from './ApiAddress';\nexport * from './WebAddressing';\nexport * from './WebAddressingMode';\nexport * from './WebEntryAddress';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quidproquo-webserver",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.28",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/commonjs/index.js",
|
|
6
6
|
"module": "./lib/esm/index.js",
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
},
|
|
36
36
|
"homepage": "https://github.com/qpqjs/quidproquo#readme",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"quidproquo-core": "0.1.
|
|
38
|
+
"quidproquo-core": "0.1.28"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"quidproquo-tsconfig": "0.1.
|
|
41
|
+
"quidproquo-tsconfig": "0.1.28",
|
|
42
42
|
"typescript": "^5.8.2"
|
|
43
43
|
}
|
|
44
44
|
}
|