@ms-cloudpack/create-express-app 1.1.5 → 1.1.6

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.
@@ -7,7 +7,7 @@ export declare function createExpressApp(options: {
7
7
  requireSpecifiedPort?: boolean;
8
8
  hostname?: string;
9
9
  sslOptions?: HttpsConfig;
10
- setupCallback?: (app: Express) => void;
10
+ setupCallback?: (app: Express) => void | Promise<void>;
11
11
  publicDir?: string;
12
12
  }): Promise<{
13
13
  server: Server;
@@ -25,7 +25,7 @@ export async function createExpressApp(options) {
25
25
  app.use(express.static(publicDir, { index: false }));
26
26
  }
27
27
  // Call setup callback with the app.
28
- setupCallback?.(app);
28
+ await setupCallback?.(app);
29
29
  const domain = hostname || 'localhost';
30
30
  let server;
31
31
  let protocol = 'http';
@@ -1 +1 @@
1
- {"version":3,"file":"createExpressApp.js","sourceRoot":"","sources":["../src/createExpressApp.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,EAAE,EAAgB,MAAM,SAAS,CAAC;AAChD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,WAAW,MAAM,aAAa,CAAC;AACtC,OAAO,OAAO,MAAM,UAAU,CAAC;AAI/B,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,OAOtC;IAMC,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,EAAE,oBAAoB,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;IAE3G,MAAM,SAAS,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAE9D,IAAI,oBAAoB,IAAI,CAAC,SAAS,KAAK,SAAS,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,CAAC,EAAE;QAC/E,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,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,SAAS,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;KACtD;IAED,oCAAoC;IACpC,MAAM,aAAa,EAAE,CAAC,GAAG,CAAC,CAAC;IAE3B,MAAM,MAAM,GAAG,QAAQ,IAAI,WAAW,CAAC;IACvC,IAAI,MAAc,CAAC;IACnB,IAAI,QAAQ,GAAqB,MAAM,CAAC;IAExC,IAAI,UAAU,IAAI,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;QACtD,0BAA0B;QAC1B,MAAM,WAAW,GAAG,KAAK,CAAC,YAAY,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;QACxD,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAC1C,QAAQ,GAAG,OAAO,CAAC;KACpB;SAAM;QACL,yBAAyB;QACzB,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;KACnC;IAED,OAAO;QACL,MAAM;QACN,QAAQ;QACR,MAAM;QACN,IAAI;KACL,CAAC;AACJ,CAAC"}
package/lib/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
- export { createExpressApp } from './createExpressApp.js';
1
+ import * as express from 'express';
2
2
  export type { Express, Request, Response } from 'express';
3
+ export { createExpressApp } from './createExpressApp.js';
3
4
  export { parseHttpsConfig, type HttpsConfig } from './parseHttpsConfig.js';
5
+ export { express };
package/lib/index.js CHANGED
@@ -1,3 +1,5 @@
1
+ import * as express from 'express';
1
2
  export { createExpressApp } from './createExpressApp.js';
2
3
  export { parseHttpsConfig } from './parseHttpsConfig.js';
4
+ export { express };
3
5
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAAE,gBAAgB,EAAoB,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAGnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAoB,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ms-cloudpack/create-express-app",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "description": "Helper for creating an express app server, abstracting a common plugin setup.",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/CHANGELOG.json DELETED
@@ -1,263 +0,0 @@
1
- {
2
- "name": "@ms-cloudpack/create-express-app",
3
- "entries": [
4
- {
5
- "date": "Tue, 31 Jan 2023 08:08:54 GMT",
6
- "tag": "@ms-cloudpack/create-express-app_v1.1.5",
7
- "version": "1.1.5",
8
- "comments": {
9
- "patch": [
10
- {
11
- "author": "elcraig@microsoft.com",
12
- "package": "@ms-cloudpack/create-express-app",
13
- "commit": "243bfddf2ccffa5d6aa479105156b8a5de0e66c2",
14
- "comment": "Don't publish test files"
15
- },
16
- {
17
- "author": "elcraig@microsoft.com",
18
- "package": "@ms-cloudpack/create-express-app",
19
- "commit": "aa26b86114817b738ea6062ef3b64234fc38c6ad",
20
- "comment": "Fix docs and add missing types dependency"
21
- },
22
- {
23
- "author": "beachball",
24
- "package": "@ms-cloudpack/create-express-app",
25
- "comment": "Bump @ms-cloudpack/path-utilities to v2.0.1",
26
- "commit": "d841a4219d236c863ef97e9b20ad1bc143e8bc84"
27
- }
28
- ]
29
- }
30
- },
31
- {
32
- "date": "Thu, 26 Jan 2023 08:12:44 GMT",
33
- "tag": "@ms-cloudpack/create-express-app_v1.1.4",
34
- "version": "1.1.4",
35
- "comments": {
36
- "none": [
37
- {
38
- "author": "email not defined",
39
- "package": "@ms-cloudpack/create-express-app",
40
- "commit": "d2f471ffe4d99b97c82c87d2ac64f3b9f48f5c62",
41
- "comment": "Update devDependency @types/express to v4.17.16"
42
- }
43
- ]
44
- }
45
- },
46
- {
47
- "date": "Fri, 16 Dec 2022 08:11:23 GMT",
48
- "tag": "@ms-cloudpack/create-express-app_v1.1.3",
49
- "version": "1.1.3",
50
- "comments": {
51
- "none": [
52
- {
53
- "author": "renovate@whitesourcesoftware.com",
54
- "package": "@ms-cloudpack/create-express-app",
55
- "commit": "617d7482500d884b909e3141db4bb0826bfb3392",
56
- "comment": "Update devDependency @types/express to v4.17.15"
57
- }
58
- ]
59
- }
60
- },
61
- {
62
- "date": "Wed, 07 Dec 2022 08:11:46 GMT",
63
- "tag": "@ms-cloudpack/create-express-app_v1.1.3",
64
- "version": "1.1.3",
65
- "comments": {
66
- "none": [
67
- {
68
- "author": "email not defined",
69
- "package": "@ms-cloudpack/create-express-app",
70
- "commit": "6063fc391367b3dc90d5cae3a5771ab3eedb21b6",
71
- "comment": "Update @types devDependencies"
72
- }
73
- ]
74
- }
75
- },
76
- {
77
- "date": "Sat, 03 Dec 2022 08:10:45 GMT",
78
- "tag": "@ms-cloudpack/create-express-app_v1.1.3",
79
- "version": "1.1.3",
80
- "comments": {
81
- "patch": [
82
- {
83
- "author": "beachball",
84
- "package": "@ms-cloudpack/create-express-app",
85
- "comment": "Bump @ms-cloudpack/path-utilities to v2.0.0",
86
- "commit": "adb6e5b06d2100f33ff9975c2999b81f81b65616"
87
- }
88
- ]
89
- }
90
- },
91
- {
92
- "date": "Tue, 29 Nov 2022 08:10:24 GMT",
93
- "tag": "@ms-cloudpack/create-express-app_v1.1.2",
94
- "version": "1.1.2",
95
- "comments": {
96
- "patch": [
97
- {
98
- "author": "dake.3601@gmail.com",
99
- "package": "@ms-cloudpack/create-express-app",
100
- "commit": "4ea7bd17f870a65b0b6df7c5d1893ac0115ad527",
101
- "comment": "Disabling directory indexing."
102
- }
103
- ]
104
- }
105
- },
106
- {
107
- "date": "Wed, 23 Nov 2022 08:10:05 GMT",
108
- "tag": "@ms-cloudpack/create-express-app_v1.1.1",
109
- "version": "1.1.1",
110
- "comments": {
111
- "patch": [
112
- {
113
- "author": "dake.3601@gmail.com",
114
- "package": "@ms-cloudpack/create-express-app",
115
- "commit": "d24cd9f25c708b1e3c02f5ba705e3610fb3e54c2",
116
- "comment": "If port range is specified, throw error if none is available."
117
- }
118
- ]
119
- }
120
- },
121
- {
122
- "date": "Tue, 22 Nov 2022 08:10:22 GMT",
123
- "tag": "@ms-cloudpack/create-express-app_v1.1.0",
124
- "version": "1.1.0",
125
- "comments": {
126
- "minor": [
127
- {
128
- "author": "dake.3601@gmail.com",
129
- "package": "@ms-cloudpack/create-express-app",
130
- "commit": "96959421cca3058863aee2097e83a2911f6cc460",
131
- "comment": "Added option to set directory to serve as plain static assets."
132
- }
133
- ]
134
- }
135
- },
136
- {
137
- "date": "Tue, 15 Nov 2022 08:13:12 GMT",
138
- "tag": "@ms-cloudpack/create-express-app_v1.0.2",
139
- "version": "1.0.2",
140
- "comments": {
141
- "patch": [
142
- {
143
- "author": "beachball",
144
- "package": "@ms-cloudpack/create-express-app",
145
- "comment": "Bump @ms-cloudpack/path-utilities to v1.1.1",
146
- "commit": "a71972309b615d683a5a3bac7a85c981fb6e89af"
147
- }
148
- ]
149
- }
150
- },
151
- {
152
- "date": "Wed, 02 Nov 2022 08:11:20 GMT",
153
- "tag": "@ms-cloudpack/create-express-app_v1.0.1",
154
- "version": "1.0.1",
155
- "comments": {
156
- "patch": [
157
- {
158
- "author": "dzearing@microsoft.com",
159
- "package": "@ms-cloudpack/create-express-app",
160
- "commit": "3439c51ff4eb7cb624cf84fb2881a781eabca83f",
161
- "comment": "Adding devDependency."
162
- }
163
- ]
164
- }
165
- },
166
- {
167
- "date": "Tue, 18 Oct 2022 08:16:24 GMT",
168
- "tag": "@ms-cloudpack/create-express-app_v1.0.0",
169
- "version": "1.0.0",
170
- "comments": {
171
- "major": [
172
- {
173
- "author": "dake.3601@gmail.com",
174
- "package": "@ms-cloudpack/create-express-app",
175
- "commit": "1bec1f80bb50ebe897f03dc74437c3e211bea83e",
176
- "comment": "Https express app can be created with options and domain."
177
- },
178
- {
179
- "author": "beachball",
180
- "package": "@ms-cloudpack/create-express-app",
181
- "comment": "Bump @ms-cloudpack/path-utilities to v1.1.0",
182
- "commit": "1bec1f80bb50ebe897f03dc74437c3e211bea83e"
183
- }
184
- ]
185
- }
186
- },
187
- {
188
- "date": "Wed, 28 Sep 2022 08:15:16 GMT",
189
- "tag": "@ms-cloudpack/create-express-app_v0.1.1",
190
- "version": "0.1.1",
191
- "comments": {
192
- "patch": [
193
- {
194
- "author": "elcraig@microsoft.com",
195
- "package": "@ms-cloudpack/create-express-app",
196
- "commit": "084168500b6320d6861a4c7e8f363fea9e4f831e",
197
- "comment": "Remove unnecessary await"
198
- }
199
- ]
200
- }
201
- },
202
- {
203
- "date": "Tue, 20 Sep 2022 08:13:46 GMT",
204
- "tag": "@ms-cloudpack/create-express-app_v0.1.0",
205
- "version": "0.1.0",
206
- "comments": {
207
- "none": [
208
- {
209
- "author": "email not defined",
210
- "package": "@ms-cloudpack/create-express-app",
211
- "commit": "f408318df04c9a3e4754975a28c39660abf32687",
212
- "comment": "Update devDependency @types/express to v4.17.14"
213
- }
214
- ]
215
- }
216
- },
217
- {
218
- "date": "Fri, 20 May 2022 04:26:15 GMT",
219
- "tag": "@ms-cloudpack/create-express-app_v0.1.0",
220
- "version": "0.1.0",
221
- "comments": {
222
- "minor": [
223
- {
224
- "author": "dzearing@microsoft.com",
225
- "package": "@ms-cloudpack/create-express-app",
226
- "commit": "b39bb143fc53e622c39f9e9fd349f71c9ebadd77",
227
- "comment": "Exporting express typings."
228
- }
229
- ]
230
- }
231
- },
232
- {
233
- "date": "Sat, 14 May 2022 04:36:11 GMT",
234
- "tag": "@ms-cloudpack/create-express-app_v0.0.2",
235
- "version": "0.0.2",
236
- "comments": {
237
- "none": [
238
- {
239
- "author": "dzearing@microsoft.com",
240
- "package": "@ms-cloudpack/create-express-app",
241
- "commit": "cc0844a7d18790d69e59b16dbd6eef8fab5bc4e0",
242
- "comment": "Updating package details."
243
- }
244
- ]
245
- }
246
- },
247
- {
248
- "date": "Mon, 09 May 2022 18:54:56 GMT",
249
- "tag": "@ms-cloudpack/create-express-app_v0.0.2",
250
- "version": "0.0.2",
251
- "comments": {
252
- "patch": [
253
- {
254
- "author": "dzearing@microsoft.com",
255
- "package": "@ms-cloudpack/create-express-app",
256
- "commit": "13c322180c016e6c653d4694b9f3380adeb8ad6f",
257
- "comment": "Initial publish."
258
- }
259
- ]
260
- }
261
- }
262
- ]
263
- }
package/CHANGELOG.md DELETED
@@ -1,96 +0,0 @@
1
- # Change Log - @ms-cloudpack/create-express-app
2
-
3
- This log was last generated on Tue, 31 Jan 2023 08:08:54 GMT and should not be manually modified.
4
-
5
- <!-- Start content -->
6
-
7
- ## 1.1.5
8
-
9
- Tue, 31 Jan 2023 08:08:54 GMT
10
-
11
- ### Patches
12
-
13
- - Don't publish test files (elcraig@microsoft.com)
14
- - Fix docs and add missing types dependency (elcraig@microsoft.com)
15
- - Bump @ms-cloudpack/path-utilities to v2.0.1
16
-
17
- ## 1.1.3
18
-
19
- Sat, 03 Dec 2022 08:10:45 GMT
20
-
21
- ### Patches
22
-
23
- - Bump @ms-cloudpack/path-utilities to v2.0.0
24
-
25
- ## 1.1.2
26
-
27
- Tue, 29 Nov 2022 08:10:24 GMT
28
-
29
- ### Patches
30
-
31
- - Disabling directory indexing. (dake.3601@gmail.com)
32
-
33
- ## 1.1.1
34
-
35
- Wed, 23 Nov 2022 08:10:05 GMT
36
-
37
- ### Patches
38
-
39
- - If port range is specified, throw error if none is available. (dake.3601@gmail.com)
40
-
41
- ## 1.1.0
42
-
43
- Tue, 22 Nov 2022 08:10:22 GMT
44
-
45
- ### Minor changes
46
-
47
- - Added option to set directory to serve as plain static assets. (dake.3601@gmail.com)
48
-
49
- ## 1.0.2
50
-
51
- Tue, 15 Nov 2022 08:13:12 GMT
52
-
53
- ### Patches
54
-
55
- - Bump @ms-cloudpack/path-utilities to v1.1.1
56
-
57
- ## 1.0.1
58
-
59
- Wed, 02 Nov 2022 08:11:20 GMT
60
-
61
- ### Patches
62
-
63
- - Adding devDependency. (dzearing@microsoft.com)
64
-
65
- ## 1.0.0
66
-
67
- Tue, 18 Oct 2022 08:16:24 GMT
68
-
69
- ### Major changes
70
-
71
- - Https express app can be created with options and domain. (dake.3601@gmail.com)
72
- - Bump @ms-cloudpack/path-utilities to v1.1.0
73
-
74
- ## 0.1.1
75
-
76
- Wed, 28 Sep 2022 08:15:16 GMT
77
-
78
- ### Patches
79
-
80
- - Remove unnecessary await (elcraig@microsoft.com)
81
-
82
- ## 0.1.0
83
-
84
- Fri, 20 May 2022 04:26:15 GMT
85
-
86
- ### Minor changes
87
-
88
- - Exporting express typings. (dzearing@microsoft.com)
89
-
90
- ## 0.0.2
91
-
92
- Mon, 09 May 2022 18:54:56 GMT
93
-
94
- ### Patches
95
-
96
- - Initial publish. (dzearing@microsoft.com)