@ms-cloudpack/create-express-app 1.3.3 → 1.3.5
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 +1 -0
- package/lib/createExpressApp.d.ts.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/parseHttpsConfig.d.ts +1 -0
- package/lib/parseHttpsConfig.d.ts.map +1 -0
- package/lib/parseHttpsConfig.js +1 -1
- package/lib/parseHttpsConfig.js.map +1 -1
- package/lib/tsdoc-metadata.json +11 -11
- package/package.json +5 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createExpressApp.d.ts","sourceRoot":"","sources":["../src/createExpressApp.ts"],"names":[],"mappings":";AAAA,OAAgB,EAAE,KAAK,OAAO,EAAE,MAAM,SAAS,CAAC;AAKhD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EAAoB,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAG3E,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;IACzB,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;CACpB,GAAG,OAAO,CAAC;IACV,MAAM,EAAE,MAAM,CAAC;IACf,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,CA2ED;AAED,YAAY,EAAE,OAAO,EAAE,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,KAAK,WAAW,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -4,3 +4,4 @@ import type { ServerOptions } from 'https';
|
|
|
4
4
|
import type { IncomingMessage, ServerResponse } from 'http';
|
|
5
5
|
export type HttpsConfig = ServerOptions<typeof IncomingMessage, typeof ServerResponse>;
|
|
6
6
|
export declare function parseHttpsConfig(config: HttpsConfig): HttpsConfig;
|
|
7
|
+
//# sourceMappingURL=parseHttpsConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseHttpsConfig.d.ts","sourceRoot":"","sources":["../src/parseHttpsConfig.ts"],"names":[],"mappings":";;AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAI5D,MAAM,MAAM,WAAW,GAAG,aAAa,CAAC,OAAO,eAAe,EAAE,OAAO,cAAc,CAAC,CAAC;AAKvF,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW,CAqBjE"}
|
package/lib/parseHttpsConfig.js
CHANGED
|
@@ -14,7 +14,7 @@ export function parseHttpsConfig(config) {
|
|
|
14
14
|
sslOptions[key] = fs.readFileSync(certFilePath);
|
|
15
15
|
}
|
|
16
16
|
else {
|
|
17
|
-
throw
|
|
17
|
+
throw new Error(`The specified certificate to be used for the web server is missing at "${certFilePath}". Make sure the path is correct, the file exists, and try starting again.`);
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseHttpsConfig.js","sourceRoot":"","sources":["../src/parseHttpsConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAQrE;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAmB;IAClD,MAAM,UAAU,GAAyC,EAAE,CAAC;IAE5D,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;QACjD,+CAA+C;QAC/C,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC3E,MAAM,YAAY,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;YAClD,IAAI,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE;gBAC/B,gDAAgD;gBAChD,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;aACjD;iBAAM;gBACL,MAAM,
|
|
1
|
+
{"version":3,"file":"parseHttpsConfig.js","sourceRoot":"","sources":["../src/parseHttpsConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAQrE;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAmB;IAClD,MAAM,UAAU,GAAyC,EAAE,CAAC;IAE5D,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;QACjD,+CAA+C;QAC/C,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC3E,MAAM,YAAY,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;YAClD,IAAI,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE;gBAC/B,gDAAgD;gBAChD,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;aACjD;iBAAM;gBACL,MAAM,IAAI,KAAK,CACb,0EAA0E,YAAY,4EAA4E,CACnK,CAAC;aACH;SACF;aAAM;YACL,4CAA4C;YAC5C,UAAU,CAAC,GAAG,CAAC,GAAyB,KAAK,CAAC;SAC/C;KACF;IACD,OAAO,UAAU,CAAC;AACpB,CAAC","sourcesContent":["import fs from 'fs';\nimport { pathSymbolReplacement } from '@ms-cloudpack/path-utilities';\nimport type { ServerOptions } from 'https';\nimport type { IncomingMessage, ServerResponse } from 'http';\n\ntype ValueOf<T> = T[keyof T];\n\nexport type HttpsConfig = ServerOptions<typeof IncomingMessage, typeof ServerResponse>;\n\n/*\n * Read certificates files in Https Config and return the contents.\n */\nexport function parseHttpsConfig(config: HttpsConfig): HttpsConfig {\n const sslOptions: Record<string, ValueOf<HttpsConfig>> = {};\n\n for (const [key, value] of Object.entries(config)) {\n // Read the file contents for the certificates.\n if (['ca', 'cert', 'key', 'pfx'].includes(key) && typeof value === 'string') {\n const certFilePath = pathSymbolReplacement(value);\n if (fs.existsSync(certFilePath)) {\n // eslint-disable-next-line no-restricted-syntax\n sslOptions[key] = fs.readFileSync(certFilePath);\n } else {\n throw new Error(\n `The specified certificate to be used for the web server is missing at \"${certFilePath}\". Make sure the path is correct, the file exists, and try starting again.`,\n );\n }\n } else {\n // If not a certificate, just use the value.\n sslOptions[key] = <ValueOf<HttpsConfig>>value;\n }\n }\n return sslOptions;\n}\n"]}
|
package/lib/tsdoc-metadata.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
-
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
-
{
|
|
4
|
-
"tsdocVersion": "0.12",
|
|
5
|
-
"toolPackages": [
|
|
6
|
-
{
|
|
7
|
-
"packageName": "@microsoft/api-extractor",
|
|
8
|
-
"packageVersion": "7.34.
|
|
9
|
-
}
|
|
10
|
-
]
|
|
11
|
-
}
|
|
1
|
+
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
+
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
+
{
|
|
4
|
+
"tsdocVersion": "0.12",
|
|
5
|
+
"toolPackages": [
|
|
6
|
+
{
|
|
7
|
+
"packageName": "@microsoft/api-extractor",
|
|
8
|
+
"packageVersion": "7.34.8"
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/create-express-app",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.5",
|
|
4
4
|
"description": "Helper for creating an express app server, abstracting a common plugin setup.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@ms-cloudpack/path-utilities": "^2.2.
|
|
16
|
+
"@ms-cloudpack/path-utilities": "^2.2.2",
|
|
17
17
|
"@types/express": "^4.17.16",
|
|
18
18
|
"compression": "^1.7.4",
|
|
19
19
|
"cors": "^2.8.5",
|
|
@@ -21,14 +21,13 @@
|
|
|
21
21
|
"get-port": "^6.1.2"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
+
"@ms-cloudpack/eslint-plugin-internal": "*",
|
|
24
25
|
"@ms-cloudpack/scripts": "*",
|
|
25
|
-
"@ms-cloudpack/eslint-config-base": "*",
|
|
26
26
|
"@ms-cloudpack/test-utilities": "*",
|
|
27
|
-
"@types/compression": "1.7.2",
|
|
28
|
-
"@types/cors": "2.8.13"
|
|
27
|
+
"@types/compression": "^1.7.2",
|
|
28
|
+
"@types/cors": "^2.8.13"
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
|
-
"api:update": "cloudpack-scripts api-update",
|
|
32
31
|
"api": "cloudpack-scripts api",
|
|
33
32
|
"build:watch": "cloudpack-scripts build-watch",
|
|
34
33
|
"build": "cloudpack-scripts build",
|