@ms-cloudpack/create-express-app 1.4.1 → 1.4.3
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/createExpressApp.d.ts.map +1 -1
- package/lib/createExpressApp.js +2 -1
- package/lib/createExpressApp.js.map +1 -1
- package/lib/getDomain.d.ts +10 -0
- package/lib/getDomain.d.ts.map +1 -0
- package/lib/getDomain.js +36 -0
- package/lib/getDomain.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createExpressApp.d.ts","sourceRoot":"","sources":["../src/createExpressApp.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAG9D,OAAgB,EAAE,KAAK,OAAO,EAAE,MAAM,SAAS,CAAC;AAEhD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"createExpressApp.d.ts","sourceRoot":"","sources":["../src/createExpressApp.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAG9D,OAAgB,EAAE,KAAK,OAAO,EAAE,MAAM,SAAS,CAAC;AAEhD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAMnC,wBAAsB,gBAAgB,CAAC,OAAO,EAAE;IAC9C,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC9B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,WAAW,CAAC;IAEzB,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,OAAO,CAAC;IACV,GAAG,EAAE,OAAO,CAAC;IAEb,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B,GAAG,EAAE,MAAM,CAAC;IAEZ,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,CAAC,CAoFD;AAED,YAAY,EAAE,OAAO,EAAE,CAAC"}
|
package/lib/createExpressApp.js
CHANGED
|
@@ -4,6 +4,7 @@ import express, {} from 'express';
|
|
|
4
4
|
import getPort from 'get-port';
|
|
5
5
|
import https from 'https';
|
|
6
6
|
import { parseHttpsConfig } from './parseHttpsConfig.js';
|
|
7
|
+
import { getDomain } from './getDomain.js';
|
|
7
8
|
export async function createExpressApp(options) {
|
|
8
9
|
const { setupCallback, hostname, sslOptions, requireSpecifiedPort, publicDir, portRange: ports, middlewareMode, } = options;
|
|
9
10
|
const portRange = typeof ports === 'number' ? [ports] : ports;
|
|
@@ -25,7 +26,7 @@ export async function createExpressApp(options) {
|
|
|
25
26
|
if (publicDir !== undefined) {
|
|
26
27
|
app.use(express.static(publicDir, { index: false }));
|
|
27
28
|
}
|
|
28
|
-
const domain = hostname
|
|
29
|
+
const domain = getDomain(hostname);
|
|
29
30
|
let server = options.server;
|
|
30
31
|
const protocol = sslOptions && Object.keys(sslOptions).length !== 0 ? 'https' : 'http';
|
|
31
32
|
let url = `${protocol}://${domain}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createExpressApp.js","sourceRoot":"","sources":["../src/createExpressApp.ts"],"names":[],"mappings":"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C,gBAAgB,CAAC,UAAU,CAAC,EAAE,GAAG,CAAC,CAAC;QAC1E,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC5C,CAAC;SAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAC3B,yBAAyB;QACzB,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACpC,CAAC;IAED,gCAAgC;IAChC,MAAM,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;IAElC,MAAM,EAAE,EAAE,CAAC,YAAY,EAAE,CAAC,MAAM,EAAE,EAAE;QAClC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACpB,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;YACtB,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO;QACL,GAAG;QACH,MAAM;QACN,KAAK,CAAC,KAAK;YACT,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;gBAC7B,MAAM,CAAC,OAAO,EAAE,CAAC;YACnB,CAAC;YACD,OAAO,CAAC,KAAK,EAAE,CAAC;YAChB,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;QACxG,CAAC;QACD,GAAG;QACH,OAAO,EAAE,GAAG;QACZ,QAAQ;QACR,MAAM;QACN,IAAI;KACL,CAAC;AACJ,CAAC","sourcesContent":["import type { HttpsConfig } from '@ms-cloudpack/config-types';\nimport compression from 'compression';\nimport cors from 'cors';\nimport express, { type Express } from 'express';\nimport getPort from 'get-port';\nimport type { Server } from 'http';\nimport https from 'https';\nimport type { Socket } from 'net';\nimport { parseHttpsConfig } from './parseHttpsConfig.js';\nimport { getDomain } from './getDomain.js';\n\nexport async function createExpressApp(options: {\n portRange?: number | number[];\n requireSpecifiedPort?: boolean;\n hostname?: string;\n sslOptions?: HttpsConfig;\n /* @deprecated - use returned app.*/\n setupCallback?: (app: Express, baseUrl: string) => void | Promise<void>;\n publicDir?: string;\n middlewareMode?: boolean;\n server?: Server;\n}): Promise<{\n app: Express;\n /* The server will be undefined if middlewareMode is true and server is not provided. */\n server: Server | undefined;\n close: () => Promise<void>;\n url: string;\n /* @deprecated - use url.*/\n baseUrl: string;\n protocol: 'http' | 'https';\n domain: string;\n port: number;\n}> {\n const {\n setupCallback,\n hostname,\n sslOptions,\n requireSpecifiedPort,\n publicDir,\n portRange: ports,\n middlewareMode,\n } = options;\n\n const portRange = typeof ports === 'number' ? [ports] : ports;\n\n if (requireSpecifiedPort && (portRange === undefined || portRange.length === 0)) {\n throw new Error('No port specified');\n }\n\n // Get the available port.\n const port = await getPort({\n port: portRange,\n });\n\n if (requireSpecifiedPort && portRange && !portRange.includes(port)) {\n throw new Error('Specified port not available');\n }\n\n const app = express();\n\n // Use cors.\n app.use(cors());\n\n // Use compression.\n app.use(compression());\n\n if (publicDir !== undefined) {\n app.use(express.static(publicDir, { index: false }));\n }\n\n const domain = getDomain(hostname);\n let server = options.server;\n const protocol = sslOptions && Object.keys(sslOptions).length !== 0 ? 'https' : 'http';\n let url = `${protocol}://${domain}`;\n\n if ((protocol === 'https' && port !== 443) || (protocol === 'http' && port !== 80)) {\n url += `:${port}`;\n }\n // Call setup callback with the app.\n await setupCallback?.(app, url);\n\n if (!middlewareMode && sslOptions && Object.keys(sslOptions).length !== 0) {\n // Create an HTTPS server.\n const httpsServer = https.createServer(parseHttpsConfig(sslOptions), app);\n server = httpsServer.listen(port, domain);\n } else if (!middlewareMode) {\n // Create an HTTP server.\n server = app.listen(port, domain);\n }\n\n // Track the server connections.\n const sockets = new Set<Socket>();\n\n server?.on('connection', (socket) => {\n sockets.add(socket);\n socket.on('close', () => {\n sockets.delete(socket);\n });\n });\n\n return {\n app,\n server,\n async close() {\n for (const socket of sockets) {\n socket.destroy();\n }\n sockets.clear();\n await new Promise<void>((resolve, reject) => server?.close((err) => (err ? reject(err) : resolve())));\n },\n url,\n baseUrl: url,\n protocol,\n domain,\n port,\n };\n}\n\nexport type { Express };\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Function to standardize domain.
|
|
3
|
+
* Get the domain from the given string.
|
|
4
|
+
* Replace the address symbols.
|
|
5
|
+
* If undefined or empty, returns 'localhost'.
|
|
6
|
+
* @param str The string to parse.
|
|
7
|
+
* @returns The domain.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getDomain(str: string | undefined): string;
|
|
10
|
+
//# sourceMappingURL=getDomain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getDomain.d.ts","sourceRoot":"","sources":["../src/getDomain.ts"],"names":[],"mappings":"AAQA;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAIzD"}
|
package/lib/getDomain.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import os from 'os';
|
|
2
|
+
// Supported address symbols:
|
|
3
|
+
// These are functions to not call them if they are not used.
|
|
4
|
+
const addressSymbols = {
|
|
5
|
+
ip: () => getLocalIP(),
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Function to standardize domain.
|
|
9
|
+
* Get the domain from the given string.
|
|
10
|
+
* Replace the address symbols.
|
|
11
|
+
* If undefined or empty, returns 'localhost'.
|
|
12
|
+
* @param str The string to parse.
|
|
13
|
+
* @returns The domain.
|
|
14
|
+
*/
|
|
15
|
+
export function getDomain(str) {
|
|
16
|
+
if (!str)
|
|
17
|
+
return 'localhost';
|
|
18
|
+
// Replace the address symbols.
|
|
19
|
+
return str.replace(/{(\w+)}/g, (match, symbol) => addressSymbols[symbol]() || match);
|
|
20
|
+
}
|
|
21
|
+
function getLocalIP() {
|
|
22
|
+
const networkInterfaces = os.networkInterfaces();
|
|
23
|
+
for (const nets of Object.values(networkInterfaces)) {
|
|
24
|
+
if (!nets)
|
|
25
|
+
continue;
|
|
26
|
+
for (const net of nets) {
|
|
27
|
+
// Skip over non-IPv4 and internal (i.e. 127.0.0.1) addresses
|
|
28
|
+
if (net.family === 'IPv4' && !net.internal) {
|
|
29
|
+
return net.address;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
console.warn('Failed to get local IP address.');
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=getDomain.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getDomain.js","sourceRoot":"","sources":["../src/getDomain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB,6BAA6B;AAC7B,6DAA6D;AAC7D,MAAM,cAAc,GAA6C;IAC/D,EAAE,EAAE,GAAG,EAAE,CAAC,UAAU,EAAE;CACvB,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,UAAU,SAAS,CAAC,GAAuB;IAC/C,IAAI,CAAC,GAAG;QAAE,OAAO,WAAW,CAAC;IAC7B,+BAA+B;IAC/B,OAAO,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,MAAc,EAAE,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,IAAI,KAAK,CAAC,CAAC;AAC/F,CAAC;AAED,SAAS,UAAU;IACjB,MAAM,iBAAiB,GAAG,EAAE,CAAC,iBAAiB,EAAE,CAAC;IAEjD,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,EAAE,CAAC;QACpD,IAAI,CAAC,IAAI;YAAE,SAAS;QACpB,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;YACvB,6DAA6D;YAC7D,IAAI,GAAG,CAAC,MAAM,KAAK,MAAM,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;gBAC3C,OAAO,GAAG,CAAC,OAAO,CAAC;YACrB,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;IAChD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import os from 'os';\n\n// Supported address symbols:\n// These are functions to not call them if they are not used.\nconst addressSymbols: Record<string, () => string | undefined> = {\n ip: () => getLocalIP(),\n};\n\n/**\n * Function to standardize domain.\n * Get the domain from the given string.\n * Replace the address symbols.\n * If undefined or empty, returns 'localhost'.\n * @param str The string to parse.\n * @returns The domain.\n */\nexport function getDomain(str: string | undefined): string {\n if (!str) return 'localhost';\n // Replace the address symbols.\n return str.replace(/{(\\w+)}/g, (match, symbol: string) => addressSymbols[symbol]() || match);\n}\n\nfunction getLocalIP(): string | undefined {\n const networkInterfaces = os.networkInterfaces();\n\n for (const nets of Object.values(networkInterfaces)) {\n if (!nets) continue;\n for (const net of nets) {\n // Skip over non-IPv4 and internal (i.e. 127.0.0.1) addresses\n if (net.family === 'IPv4' && !net.internal) {\n return net.address;\n }\n }\n }\n\n console.warn('Failed to get local IP address.');\n return undefined;\n}\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { HttpsConfig as _HttpsConfig } from '@ms-cloudpack/config-types';
|
|
|
3
3
|
export type { Express, Request, Response, Router } from 'express';
|
|
4
4
|
export { createExpressApp } from './createExpressApp.js';
|
|
5
5
|
export { parseHttpsConfig } from './parseHttpsConfig.js';
|
|
6
|
+
export { getDomain } from './getDomain.js';
|
|
6
7
|
export { express };
|
|
7
8
|
/** @deprecated Import from `@ms-cloudpack/config-types` */
|
|
8
9
|
export type HttpsConfig = _HttpsConfig;
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,KAAK,EAAE,WAAW,IAAI,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE9E,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,CAAC;AAEnB,2DAA2D;AAC3D,MAAM,MAAM,WAAW,GAAG,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,KAAK,EAAE,WAAW,IAAI,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE9E,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,CAAC;AAEnB,2DAA2D;AAC3D,MAAM,MAAM,WAAW,GAAG,YAAY,CAAC"}
|
package/lib/index.js
CHANGED
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAInC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,CAAC","sourcesContent":["import * as express from 'express';\nimport type { HttpsConfig as _HttpsConfig } from '@ms-cloudpack/config-types';\n\nexport type { Express, Request, Response, Router } from 'express';\nexport { createExpressApp } from './createExpressApp.js';\nexport { parseHttpsConfig } from './parseHttpsConfig.js';\nexport { express };\n\n/** @deprecated Import from `@ms-cloudpack/config-types` */\nexport type HttpsConfig = _HttpsConfig;\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAInC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,CAAC","sourcesContent":["import * as express from 'express';\nimport type { HttpsConfig as _HttpsConfig } from '@ms-cloudpack/config-types';\n\nexport type { Express, Request, Response, Router } from 'express';\nexport { createExpressApp } from './createExpressApp.js';\nexport { parseHttpsConfig } from './parseHttpsConfig.js';\nexport { getDomain } from './getDomain.js';\nexport { express };\n\n/** @deprecated Import from `@ms-cloudpack/config-types` */\nexport type HttpsConfig = _HttpsConfig;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/create-express-app",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.3",
|
|
4
4
|
"description": "Helper for creating an express app server, abstracting a common plugin setup.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@ms-cloudpack/config-types": "^0.5.
|
|
17
|
+
"@ms-cloudpack/config-types": "^0.5.1",
|
|
18
18
|
"@ms-cloudpack/path-utilities": "^2.5.0",
|
|
19
19
|
"@types/express": "^4.17.16",
|
|
20
20
|
"compression": "^1.7.4",
|