@ms-cloudpack/create-express-app 1.6.31 → 1.7.0

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.
@@ -1,26 +1,47 @@
1
1
  import type { HttpsConfig } from '@ms-cloudpack/common-types';
2
2
  import { type Express } from 'express';
3
3
  import type { Server } from 'http';
4
- export declare function createExpressApp(options: {
4
+ export interface CreateExpressAppOptions {
5
+ /** Port(s) to try */
5
6
  portRange?: number | number[];
7
+ /** Throw an error if none of the ports specified in `portRange` are available. */
6
8
  requireSpecifiedPort?: boolean;
9
+ /**
10
+ * Hostname to use for the server. Supports replacement `{ip}` for the current IP address.
11
+ * @default 'localhost'
12
+ */
7
13
  hostname?: string;
14
+ /** Include these headers with all responses */
8
15
  requestHeaders?: Record<string, string>;
9
- cwd: string;
16
+ /** cwd for resolving any relative paths in `sslOptions` */
17
+ cwd?: string;
18
+ /** Options for an HTTPS server. Certificate paths support tokens `{homedir}` and `{tmpdir}`. */
10
19
  sslOptions?: HttpsConfig;
20
+ /** @deprecated use returned `app` */
11
21
  setupCallback?: (app: Express, baseUrl: string) => void | Promise<void>;
22
+ /** Path of any static assets */
12
23
  publicDir?: string;
24
+ /** @deprecated Inferred based on presence of `server` */
13
25
  middlewareMode?: boolean;
26
+ /** If provided, act as a middleware on this server, rather than starting a new server */
14
27
  server?: Server;
15
- }): Promise<{
28
+ }
29
+ export interface CreateExpressAppResult {
16
30
  app: Express;
17
- server: Server | undefined;
31
+ /** http or https server */
32
+ server: Server;
33
+ /** Close the server */
18
34
  close: () => Promise<void>;
35
+ /** Base URL of the app */
19
36
  url: string;
37
+ /** @deprecated use `url` */
20
38
  baseUrl: string;
21
39
  protocol: 'http' | 'https';
40
+ /** Domain (no protocol or port) the app is running on */
22
41
  domain: string;
42
+ /** Port the app is running on */
23
43
  port: number;
24
- }>;
44
+ }
45
+ export declare function createExpressApp(options: CreateExpressAppOptions): Promise<CreateExpressAppResult>;
25
46
  export type { Express };
26
47
  //# sourceMappingURL=createExpressApp.d.ts.map
@@ -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;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,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,GAAG,EAAE,MAAM,CAAC;IACZ,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,CA6FD;AAED,YAAY,EAAE,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"createExpressApp.d.ts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AM,CAAC;IACf,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAuGxG;AAED,YAAY,EAAE,OAAO,EAAE,CAAC"}
@@ -6,17 +6,22 @@ import https from 'https';
6
6
  import { parseHttpsConfig } from './parseHttpsConfig.js';
7
7
  import { getDomain } from './getDomain.js';
8
8
  export async function createExpressApp(options) {
9
- const { setupCallback, hostname, requestHeaders = {}, cwd, sslOptions, requireSpecifiedPort, publicDir, portRange: ports, middlewareMode, } = options;
9
+ const {
10
+ // eslint-disable-next-line etc/no-deprecated
11
+ setupCallback, hostname, requestHeaders = {}, cwd = '', sslOptions, requireSpecifiedPort, publicDir, portRange: ports, } = options;
12
+ if (sslOptions && !cwd) {
13
+ throw new Error('Must provide `cwd` when `sslOptions` are provided');
14
+ }
10
15
  const portRange = typeof ports === 'number' ? [ports] : ports;
11
- if (requireSpecifiedPort && (portRange === undefined || portRange.length === 0)) {
12
- throw new Error('No port specified');
16
+ if (requireSpecifiedPort && !portRange?.length) {
17
+ throw new Error('Must specify a portRange when requireSpecifiedPort is true');
13
18
  }
14
19
  // Get the available port.
15
20
  const port = await getPort({
16
21
  port: portRange,
17
22
  });
18
- if (requireSpecifiedPort && portRange && !portRange.includes(port)) {
19
- throw new Error('Specified port not available');
23
+ if (requireSpecifiedPort && !portRange?.includes(port)) {
24
+ throw new Error(`No ports from portRange ${JSON.stringify(portRange)} are available`);
20
25
  }
21
26
  const app = express();
22
27
  // Use cors.
@@ -34,25 +39,30 @@ export async function createExpressApp(options) {
34
39
  }
35
40
  const domain = getDomain(hostname);
36
41
  let server = options.server;
37
- const protocol = sslOptions && Object.keys(sslOptions).length !== 0 ? 'https' : 'http';
42
+ const isHttps = !!sslOptions && Object.keys(sslOptions).length !== 0;
43
+ const protocol = isHttps ? 'https' : 'http';
38
44
  let url = `${protocol}://${domain}`;
39
- if ((protocol === 'https' && port !== 443) || (protocol === 'http' && port !== 80)) {
45
+ if ((isHttps && port !== 443) || (!isHttps && port !== 80)) {
40
46
  url += `:${port}`;
41
47
  }
42
48
  // Call setup callback with the app.
43
49
  await setupCallback?.(app, url);
44
- if (!middlewareMode && sslOptions && Object.keys(sslOptions).length !== 0) {
45
- // Create an HTTPS server.
46
- const httpsServer = https.createServer(parseHttpsConfig(sslOptions, cwd), app);
47
- server = httpsServer.listen(port, domain);
48
- }
49
- else if (!middlewareMode) {
50
- // Create an HTTP server.
51
- server = app.listen(port, domain);
50
+ if (!server) {
51
+ if (isHttps) {
52
+ // Create an HTTPS server.
53
+ const httpsServer = https.createServer(parseHttpsConfig(sslOptions, cwd), app);
54
+ server = httpsServer.listen(port, domain);
55
+ }
56
+ else {
57
+ // Create an HTTP server.
58
+ server = app.listen(port, domain);
59
+ }
52
60
  }
53
- // Track the server connections.
61
+ // Track new connections so that we can close them and exit cleanly on ctrl+C.
62
+ // (Calling close() on an express server simply stops it from accepting new connections;
63
+ // it doesn't close existing keep-alive connections, which makes the CLI hang on exit.)
54
64
  const sockets = new Set();
55
- server?.on('connection', (socket) => {
65
+ server.on('connection', (socket) => {
56
66
  sockets.add(socket);
57
67
  socket.on('close', () => {
58
68
  sockets.delete(socket);
@@ -66,7 +76,9 @@ export async function createExpressApp(options) {
66
76
  socket.destroy();
67
77
  }
68
78
  sockets.clear();
69
- await new Promise((resolve, reject) => server?.close((err) => (err ? reject(err) : resolve())));
79
+ await new Promise((resolve, reject) => {
80
+ server.close((err) => (err ? reject(err) : resolve()));
81
+ });
70
82
  },
71
83
  url,
72
84
  baseUrl: url,
@@ -1 +1 @@
1
- {"version":3,"file":"createExpressApp.js","sourceRoot":"","sources":["../src/createExpressApp.ts"],"names":[],"mappings":"AACA,OAAO,WAAW,MAAM,aAAa,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,OAAyB,MAAM,SAAS,CAAC;AAChD,OAAO,OAAO,MAAM,U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5C,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/common-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 requestHeaders?: Record<string, string>;\n cwd: 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 requestHeaders = {},\n cwd,\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 app.use((_, res, next) => {\n for (const [headerName, headerValue] of Object.entries(requestHeaders)) {\n res.setHeader(headerName, headerValue);\n }\n next();\n });\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, cwd), 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"]}
1
+ {"version":3,"file":"createExpressApp.js","sourceRoot":"","sources":["../src/createExpressApp.ts"],"names":[],"mappings":"AACA,OAAO,WAAW,MAAM,aAAa,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,OAAyB,MAAM,SAAS,CAAC;AAChD,OAAO,OAAO,MAAM,UAAU,CAAC;AAE/B,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AA6C3C,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,OAAgC;IACrE,MAAM;IACJ,6CAA6C;IAC7C,aAAa,EACb,QAAQ,EACR,cAAc,GAAG,EAAE,EACnB,GAAG,GAAG,EAAE,EACR,UAAU,EACV,oBAAoB,EACpB,SAAS,EACT,SAAS,EAAE,KAAK,GACjB,GAAG,OAAO,CAAC;IAEZ,IAAI,UAAU,IAAI,CAAC,GAAG,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACvE,CAAC;IAED,MAAM,SAAS,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAE9D,IAAI,oBAAoB,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,CAAC;QAC/C,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;I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,CAAC;YACD,OAAO,CAAC,KAAK,EAAE,CAAC;YAChB,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;gBAC1C,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;YACzD,CAAC,CAAC,CAAC;QACL,CAAC;QACD,GAAG;QACH,OAAO,EAAE,GAAG;QACZ,QAAQ;QACR,MAAM;QACN,IAAI;KACL,CAAC;AACJ,CAAC","sourcesContent":["import type { HttpsConfig } from '@ms-cloudpack/common-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 interface CreateExpressAppOptions {\n /** Port(s) to try */\n portRange?: number | number[];\n /** Throw an error if none of the ports specified in `portRange` are available. */\n requireSpecifiedPort?: boolean;\n /**\n * Hostname to use for the server. Supports replacement `{ip}` for the current IP address.\n * @default 'localhost'\n */\n hostname?: string;\n /** Include these headers with all responses */\n requestHeaders?: Record<string, string>;\n /** cwd for resolving any relative paths in `sslOptions` */\n cwd?: string;\n /** Options for an HTTPS server. Certificate paths support tokens `{homedir}` and `{tmpdir}`. */\n sslOptions?: HttpsConfig;\n /** @deprecated use returned `app` */\n setupCallback?: (app: Express, baseUrl: string) => void | Promise<void>;\n /** Path of any static assets */\n publicDir?: string;\n /** @deprecated Inferred based on presence of `server` */\n middlewareMode?: boolean;\n /** If provided, act as a middleware on this server, rather than starting a new server */\n server?: Server;\n}\n\nexport interface CreateExpressAppResult {\n app: Express;\n /** http or https server */\n server: Server;\n /** Close the server */\n close: () => Promise<void>;\n /** Base URL of the app */\n url: string;\n /** @deprecated use `url` */\n baseUrl: string;\n protocol: 'http' | 'https';\n /** Domain (no protocol or port) the app is running on */\n domain: string;\n /** Port the app is running on */\n port: number;\n}\n\nexport async function createExpressApp(options: CreateExpressAppOptions): Promise<CreateExpressAppResult> {\n const {\n // eslint-disable-next-line etc/no-deprecated\n setupCallback,\n hostname,\n requestHeaders = {},\n cwd = '',\n sslOptions,\n requireSpecifiedPort,\n publicDir,\n portRange: ports,\n } = options;\n\n if (sslOptions && !cwd) {\n throw new Error('Must provide `cwd` when `sslOptions` are provided');\n }\n\n const portRange = typeof ports === 'number' ? [ports] : ports;\n\n if (requireSpecifiedPort && !portRange?.length) {\n throw new Error('Must specify a portRange when requireSpecifiedPort is true');\n }\n\n // Get the available port.\n const port = await getPort({\n port: portRange,\n });\n\n if (requireSpecifiedPort && !portRange?.includes(port)) {\n throw new Error(`No ports from portRange ${JSON.stringify(portRange)} are 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 app.use((_, res, next) => {\n for (const [headerName, headerValue] of Object.entries(requestHeaders)) {\n res.setHeader(headerName, headerValue);\n }\n next();\n });\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 isHttps = !!sslOptions && Object.keys(sslOptions).length !== 0;\n const protocol = isHttps ? 'https' : 'http';\n let url = `${protocol}://${domain}`;\n\n if ((isHttps && port !== 443) || (!isHttps && port !== 80)) {\n url += `:${port}`;\n }\n // Call setup callback with the app.\n await setupCallback?.(app, url);\n\n if (!server) {\n if (isHttps) {\n // Create an HTTPS server.\n const httpsServer = https.createServer(parseHttpsConfig(sslOptions, cwd), app);\n server = httpsServer.listen(port, domain);\n } else {\n // Create an HTTP server.\n server = app.listen(port, domain);\n }\n }\n\n // Track new connections so that we can close them and exit cleanly on ctrl+C.\n // (Calling close() on an express server simply stops it from accepting new connections;\n // it doesn't close existing keep-alive connections, which makes the CLI hang on exit.)\n const sockets = new Set<Socket>();\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) => {\n server.close((err) => (err ? reject(err) : resolve()));\n });\n },\n url,\n baseUrl: url,\n protocol,\n domain,\n port,\n };\n}\n\nexport type { Express };\n"]}
@@ -1,10 +1,7 @@
1
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.
2
+ * Get the domain from the given string, replacing the `{ip}` symbol with the current IP.
3
+ * Defaults to 'localhost'.
4
+ * @returns The domain (no protocol)
8
5
  */
9
6
  export declare function getDomain(str: string | undefined): string;
10
7
  //# sourceMappingURL=getDomain.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"getDomain.d.ts","sourceRoot":"","sources":["../src/getDomain.ts"],"names":[],"mappings":"AAQA;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAIzD"}
package/lib/getDomain.js CHANGED
@@ -5,12 +5,9 @@ const addressSymbols = {
5
5
  ip: () => getLocalIP(),
6
6
  };
7
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.
8
+ * Get the domain from the given string, replacing the `{ip}` symbol with the current IP.
9
+ * Defaults to 'localhost'.
10
+ * @returns The domain (no protocol)
14
11
  */
15
12
  export function getDomain(str) {
16
13
  if (!str)
@@ -21,16 +18,13 @@ export function getDomain(str) {
21
18
  function getLocalIP() {
22
19
  const networkInterfaces = os.networkInterfaces();
23
20
  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
- }
21
+ // Skip over non-IPv4 and internal (i.e. 127.0.0.1) addresses
22
+ const net = nets?.find((n) => n.family === 'IPv4' && !n.internal);
23
+ if (net) {
24
+ return net.address;
31
25
  }
32
26
  }
33
- console.warn('Failed to get local IP address.');
34
- return undefined;
27
+ // Throw an error to avoid creating a server with an unexpected URL
28
+ throw new Error('Failed to get local IP address.');
35
29
  }
36
30
  //# sourceMappingURL=getDomain.js.map
@@ -1 +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"]}
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,GAAiC;IACnD,EAAE,EAAE,GAAG,EAAE,CAAC,UAAU,EAAE;CACvB,CAAC;AAEF;;;;GAIG;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,6DAA6D;QAC7D,MAAM,GAAG,GAAG,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,MAAM,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;QAClE,IAAI,GAAG,EAAE,CAAC;YACR,OAAO,GAAG,CAAC,OAAO,CAAC;QACrB,CAAC;IACH,CAAC;IAED,mEAAmE;IACnE,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;AACrD,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> = {\n ip: () => getLocalIP(),\n};\n\n/**\n * Get the domain from the given string, replacing the `{ip}` symbol with the current IP.\n * Defaults to 'localhost'.\n * @returns The domain (no protocol)\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 {\n const networkInterfaces = os.networkInterfaces();\n\n for (const nets of Object.values(networkInterfaces)) {\n // Skip over non-IPv4 and internal (i.e. 127.0.0.1) addresses\n const net = nets?.find((n) => n.family === 'IPv4' && !n.internal);\n if (net) {\n return net.address;\n }\n }\n\n // Throw an error to avoid creating a server with an unexpected URL\n throw new Error('Failed to get local IP address.');\n}\n"]}
package/lib/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as express from 'express';
2
2
  import type { HttpsConfig as _HttpsConfig } from '@ms-cloudpack/common-types';
3
3
  export type { Express, Request, Response, Router } from 'express';
4
- export { createExpressApp } from './createExpressApp.js';
4
+ export { createExpressApp, type CreateExpressAppOptions, type CreateExpressAppResult } from './createExpressApp.js';
5
5
  export { parseHttpsConfig } from './parseHttpsConfig.js';
6
6
  export { getDomain } from './getDomain.js';
7
7
  export { express };
@@ -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,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,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,KAAK,uBAAuB,EAAE,KAAK,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACpH,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.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,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/common-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/common-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,EAA6D,MAAM,uBAAuB,CAAC;AACpH,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/common-types';\n\nexport type { Express, Request, Response, Router } from 'express';\nexport { createExpressApp, type CreateExpressAppOptions, type CreateExpressAppResult } from './createExpressApp.js';\nexport { parseHttpsConfig } from './parseHttpsConfig.js';\nexport { getDomain } from './getDomain.js';\nexport { express };\n\n/** @deprecated Import from `@ms-cloudpack/common-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.6.31",
3
+ "version": "1.7.0",
4
4
  "description": "Helper for creating an express app server, abstracting a common plugin setup.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -14,9 +14,9 @@
14
14
  }
15
15
  },
16
16
  "dependencies": {
17
- "@ms-cloudpack/common-types": "^0.13.2",
17
+ "@ms-cloudpack/common-types": "^0.13.3",
18
18
  "@ms-cloudpack/path-string-parsing": "^1.2.3",
19
- "@ms-cloudpack/path-utilities": "^2.7.28",
19
+ "@ms-cloudpack/path-utilities": "^2.7.29",
20
20
  "@types/express": "^4.17.16",
21
21
  "compression": "^1.7.4",
22
22
  "cors": "^2.8.5",