@digest/webpack-express 3.4.3 → 3.5.1
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/COPYING.LESSER.md +157 -0
- package/{LICENSE.md → COPYING.md} +71 -71
- package/README.md +22 -36
- package/dist/app.js +36 -1
- package/dist/routers/index.js +5 -5
- package/dist/util/webpack.js +1 -2
- package/package.json +11 -11
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
### GNU LESSER GENERAL PUBLIC LICENSE
|
|
2
|
+
|
|
3
|
+
Version 3, 29 June 2007
|
|
4
|
+
|
|
5
|
+
Copyright (C) 2007 Free Software Foundation, Inc.
|
|
6
|
+
<https://fsf.org/>
|
|
7
|
+
|
|
8
|
+
Everyone is permitted to copy and distribute verbatim copies of this
|
|
9
|
+
license document, but changing it is not allowed.
|
|
10
|
+
|
|
11
|
+
This version of the GNU Lesser General Public License incorporates the
|
|
12
|
+
terms and conditions of version 3 of the GNU General Public License,
|
|
13
|
+
supplemented by the additional permissions listed below.
|
|
14
|
+
|
|
15
|
+
#### 0. Additional Definitions.
|
|
16
|
+
|
|
17
|
+
As used herein, "this License" refers to version 3 of the GNU Lesser
|
|
18
|
+
General Public License, and the "GNU GPL" refers to version 3 of the
|
|
19
|
+
GNU General Public License.
|
|
20
|
+
|
|
21
|
+
"The Library" refers to a covered work governed by this License, other
|
|
22
|
+
than an Application or a Combined Work as defined below.
|
|
23
|
+
|
|
24
|
+
An "Application" is any work that makes use of an interface provided
|
|
25
|
+
by the Library, but which is not otherwise based on the Library.
|
|
26
|
+
Defining a subclass of a class defined by the Library is deemed a mode
|
|
27
|
+
of using an interface provided by the Library.
|
|
28
|
+
|
|
29
|
+
A "Combined Work" is a work produced by combining or linking an
|
|
30
|
+
Application with the Library. The particular version of the Library
|
|
31
|
+
with which the Combined Work was made is also called the "Linked
|
|
32
|
+
Version".
|
|
33
|
+
|
|
34
|
+
The "Minimal Corresponding Source" for a Combined Work means the
|
|
35
|
+
Corresponding Source for the Combined Work, excluding any source code
|
|
36
|
+
for portions of the Combined Work that, considered in isolation, are
|
|
37
|
+
based on the Application, and not on the Linked Version.
|
|
38
|
+
|
|
39
|
+
The "Corresponding Application Code" for a Combined Work means the
|
|
40
|
+
object code and/or source code for the Application, including any data
|
|
41
|
+
and utility programs needed for reproducing the Combined Work from the
|
|
42
|
+
Application, but excluding the System Libraries of the Combined Work.
|
|
43
|
+
|
|
44
|
+
#### 1. Exception to Section 3 of the GNU GPL.
|
|
45
|
+
|
|
46
|
+
You may convey a covered work under sections 3 and 4 of this License
|
|
47
|
+
without being bound by section 3 of the GNU GPL.
|
|
48
|
+
|
|
49
|
+
#### 2. Conveying Modified Versions.
|
|
50
|
+
|
|
51
|
+
If you modify a copy of the Library, and, in your modifications, a
|
|
52
|
+
facility refers to a function or data to be supplied by an Application
|
|
53
|
+
that uses the facility (other than as an argument passed when the
|
|
54
|
+
facility is invoked), then you may convey a copy of the modified
|
|
55
|
+
version:
|
|
56
|
+
|
|
57
|
+
- a) under this License, provided that you make a good faith effort
|
|
58
|
+
to ensure that, in the event an Application does not supply the
|
|
59
|
+
function or data, the facility still operates, and performs
|
|
60
|
+
whatever part of its purpose remains meaningful, or
|
|
61
|
+
- b) under the GNU GPL, with none of the additional permissions of
|
|
62
|
+
this License applicable to that copy.
|
|
63
|
+
|
|
64
|
+
#### 3. Object Code Incorporating Material from Library Header Files.
|
|
65
|
+
|
|
66
|
+
The object code form of an Application may incorporate material from a
|
|
67
|
+
header file that is part of the Library. You may convey such object
|
|
68
|
+
code under terms of your choice, provided that, if the incorporated
|
|
69
|
+
material is not limited to numerical parameters, data structure
|
|
70
|
+
layouts and accessors, or small macros, inline functions and templates
|
|
71
|
+
(ten or fewer lines in length), you do both of the following:
|
|
72
|
+
|
|
73
|
+
- a) Give prominent notice with each copy of the object code that
|
|
74
|
+
the Library is used in it and that the Library and its use are
|
|
75
|
+
covered by this License.
|
|
76
|
+
- b) Accompany the object code with a copy of the GNU GPL and this
|
|
77
|
+
license document.
|
|
78
|
+
|
|
79
|
+
#### 4. Combined Works.
|
|
80
|
+
|
|
81
|
+
You may convey a Combined Work under terms of your choice that, taken
|
|
82
|
+
together, effectively do not restrict modification of the portions of
|
|
83
|
+
the Library contained in the Combined Work and reverse engineering for
|
|
84
|
+
debugging such modifications, if you also do each of the following:
|
|
85
|
+
|
|
86
|
+
- a) Give prominent notice with each copy of the Combined Work that
|
|
87
|
+
the Library is used in it and that the Library and its use are
|
|
88
|
+
covered by this License.
|
|
89
|
+
- b) Accompany the Combined Work with a copy of the GNU GPL and this
|
|
90
|
+
license document.
|
|
91
|
+
- c) For a Combined Work that displays copyright notices during
|
|
92
|
+
execution, include the copyright notice for the Library among
|
|
93
|
+
these notices, as well as a reference directing the user to the
|
|
94
|
+
copies of the GNU GPL and this license document.
|
|
95
|
+
- d) Do one of the following:
|
|
96
|
+
- 0) Convey the Minimal Corresponding Source under the terms of
|
|
97
|
+
this License, and the Corresponding Application Code in a form
|
|
98
|
+
suitable for, and under terms that permit, the user to
|
|
99
|
+
recombine or relink the Application with a modified version of
|
|
100
|
+
the Linked Version to produce a modified Combined Work, in the
|
|
101
|
+
manner specified by section 6 of the GNU GPL for conveying
|
|
102
|
+
Corresponding Source.
|
|
103
|
+
- 1) Use a suitable shared library mechanism for linking with
|
|
104
|
+
the Library. A suitable mechanism is one that (a) uses at run
|
|
105
|
+
time a copy of the Library already present on the user's
|
|
106
|
+
computer system, and (b) will operate properly with a modified
|
|
107
|
+
version of the Library that is interface-compatible with the
|
|
108
|
+
Linked Version.
|
|
109
|
+
- e) Provide Installation Information, but only if you would
|
|
110
|
+
otherwise be required to provide such information under section 6
|
|
111
|
+
of the GNU GPL, and only to the extent that such information is
|
|
112
|
+
necessary to install and execute a modified version of the
|
|
113
|
+
Combined Work produced by recombining or relinking the Application
|
|
114
|
+
with a modified version of the Linked Version. (If you use option
|
|
115
|
+
4d0, the Installation Information must accompany the Minimal
|
|
116
|
+
Corresponding Source and Corresponding Application Code. If you
|
|
117
|
+
use option 4d1, you must provide the Installation Information in
|
|
118
|
+
the manner specified by section 6 of the GNU GPL for conveying
|
|
119
|
+
Corresponding Source.)
|
|
120
|
+
|
|
121
|
+
#### 5. Combined Libraries.
|
|
122
|
+
|
|
123
|
+
You may place library facilities that are a work based on the Library
|
|
124
|
+
side by side in a single library together with other library
|
|
125
|
+
facilities that are not Applications and are not covered by this
|
|
126
|
+
License, and convey such a combined library under terms of your
|
|
127
|
+
choice, if you do both of the following:
|
|
128
|
+
|
|
129
|
+
- a) Accompany the combined library with a copy of the same work
|
|
130
|
+
based on the Library, uncombined with any other library
|
|
131
|
+
facilities, conveyed under the terms of this License.
|
|
132
|
+
- b) Give prominent notice with the combined library that part of it
|
|
133
|
+
is a work based on the Library, and explaining where to find the
|
|
134
|
+
accompanying uncombined form of the same work.
|
|
135
|
+
|
|
136
|
+
#### 6. Revised Versions of the GNU Lesser General Public License.
|
|
137
|
+
|
|
138
|
+
The Free Software Foundation may publish revised and/or new versions
|
|
139
|
+
of the GNU Lesser General Public License from time to time. Such new
|
|
140
|
+
versions will be similar in spirit to the present version, but may
|
|
141
|
+
differ in detail to address new problems or concerns.
|
|
142
|
+
|
|
143
|
+
Each version is given a distinguishing version number. If the Library
|
|
144
|
+
as you received it specifies that a certain numbered version of the
|
|
145
|
+
GNU Lesser General Public License "or any later version" applies to
|
|
146
|
+
it, you have the option of following the terms and conditions either
|
|
147
|
+
of that published version or of any later version published by the
|
|
148
|
+
Free Software Foundation. If the Library as you received it does not
|
|
149
|
+
specify a version number of the GNU Lesser General Public License, you
|
|
150
|
+
may choose any version of the GNU Lesser General Public License ever
|
|
151
|
+
published by the Free Software Foundation.
|
|
152
|
+
|
|
153
|
+
If the Library as you received it specifies that a proxy can decide
|
|
154
|
+
whether future versions of the GNU Lesser General Public License shall
|
|
155
|
+
apply, that proxy's public statement of acceptance of any version is
|
|
156
|
+
permanent authorization for you to choose that version for the
|
|
157
|
+
Library.
|
|
@@ -218,22 +218,22 @@ terms of section 4, provided that you also meet all of these
|
|
|
218
218
|
conditions:
|
|
219
219
|
|
|
220
220
|
- a) The work must carry prominent notices stating that you modified
|
|
221
|
-
|
|
221
|
+
it, and giving a relevant date.
|
|
222
222
|
- b) The work must carry prominent notices stating that it is
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
223
|
+
released under this License and any conditions added under
|
|
224
|
+
section 7. This requirement modifies the requirement in section 4
|
|
225
|
+
to "keep intact all notices".
|
|
226
226
|
- c) You must license the entire work, as a whole, under this
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
227
|
+
License to anyone who comes into possession of a copy. This
|
|
228
|
+
License will therefore apply, along with any applicable section 7
|
|
229
|
+
additional terms, to the whole of the work, and all its parts,
|
|
230
|
+
regardless of how they are packaged. This License gives no
|
|
231
|
+
permission to license the work in any other way, but it does not
|
|
232
|
+
invalidate such permission if you have separately received it.
|
|
233
233
|
- d) If the work has interactive user interfaces, each must display
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
234
|
+
Appropriate Legal Notices; however, if the Program has interactive
|
|
235
|
+
interfaces that do not display Appropriate Legal Notices, your
|
|
236
|
+
work need not make them do so.
|
|
237
237
|
|
|
238
238
|
A compilation of a covered work with other separate and independent
|
|
239
239
|
works, which are not by their nature extensions of the covered work,
|
|
@@ -253,41 +253,41 @@ Corresponding Source under the terms of this License, in one of these
|
|
|
253
253
|
ways:
|
|
254
254
|
|
|
255
255
|
- a) Convey the object code in, or embodied in, a physical product
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
256
|
+
(including a physical distribution medium), accompanied by the
|
|
257
|
+
Corresponding Source fixed on a durable physical medium
|
|
258
|
+
customarily used for software interchange.
|
|
259
259
|
- b) Convey the object code in, or embodied in, a physical product
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
260
|
+
(including a physical distribution medium), accompanied by a
|
|
261
|
+
written offer, valid for at least three years and valid for as
|
|
262
|
+
long as you offer spare parts or customer support for that product
|
|
263
|
+
model, to give anyone who possesses the object code either (1) a
|
|
264
|
+
copy of the Corresponding Source for all the software in the
|
|
265
|
+
product that is covered by this License, on a durable physical
|
|
266
|
+
medium customarily used for software interchange, for a price no
|
|
267
|
+
more than your reasonable cost of physically performing this
|
|
268
|
+
conveying of source, or (2) access to copy the Corresponding
|
|
269
|
+
Source from a network server at no charge.
|
|
270
270
|
- c) Convey individual copies of the object code with a copy of the
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
271
|
+
written offer to provide the Corresponding Source. This
|
|
272
|
+
alternative is allowed only occasionally and noncommercially, and
|
|
273
|
+
only if you received the object code with such an offer, in accord
|
|
274
|
+
with subsection 6b.
|
|
275
275
|
- d) Convey the object code by offering access from a designated
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
276
|
+
place (gratis or for a charge), and offer equivalent access to the
|
|
277
|
+
Corresponding Source in the same way through the same place at no
|
|
278
|
+
further charge. You need not require recipients to copy the
|
|
279
|
+
Corresponding Source along with the object code. If the place to
|
|
280
|
+
copy the object code is a network server, the Corresponding Source
|
|
281
|
+
may be on a different server (operated by you or a third party)
|
|
282
|
+
that supports equivalent copying facilities, provided you maintain
|
|
283
|
+
clear directions next to the object code saying where to find the
|
|
284
|
+
Corresponding Source. Regardless of what server hosts the
|
|
285
|
+
Corresponding Source, you remain obligated to ensure that it is
|
|
286
|
+
available for as long as needed to satisfy these requirements.
|
|
287
287
|
- e) Convey the object code using peer-to-peer transmission,
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
288
|
+
provided you inform other peers where the object code and
|
|
289
|
+
Corresponding Source of the work are being offered to the general
|
|
290
|
+
public at no charge under subsection 6d.
|
|
291
291
|
|
|
292
292
|
A separable portion of the object code, whose source code is excluded
|
|
293
293
|
from the Corresponding Source as a System Library, need not be
|
|
@@ -364,22 +364,22 @@ add to a covered work, you may (if authorized by the copyright holders
|
|
|
364
364
|
of that material) supplement the terms of this License with terms:
|
|
365
365
|
|
|
366
366
|
- a) Disclaiming warranty or limiting liability differently from the
|
|
367
|
-
|
|
367
|
+
terms of sections 15 and 16 of this License; or
|
|
368
368
|
- b) Requiring preservation of specified reasonable legal notices or
|
|
369
|
-
|
|
370
|
-
|
|
369
|
+
author attributions in that material or in the Appropriate Legal
|
|
370
|
+
Notices displayed by works containing it; or
|
|
371
371
|
- c) Prohibiting misrepresentation of the origin of that material,
|
|
372
|
-
|
|
373
|
-
|
|
372
|
+
or requiring that modified versions of such material be marked in
|
|
373
|
+
reasonable ways as different from the original version; or
|
|
374
374
|
- d) Limiting the use for publicity purposes of names of licensors
|
|
375
|
-
|
|
375
|
+
or authors of the material; or
|
|
376
376
|
- e) Declining to grant rights under trademark law for use of some
|
|
377
|
-
|
|
377
|
+
trade names, trademarks, or service marks; or
|
|
378
378
|
- f) Requiring indemnification of licensors and authors of that
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
379
|
+
material by anyone who conveys the material (or modified versions
|
|
380
|
+
of it) with contractual assumptions of liability to the recipient,
|
|
381
|
+
for any liability that these contractual assumptions directly
|
|
382
|
+
impose on those licensors and authors.
|
|
383
383
|
|
|
384
384
|
All other non-permissive additional terms are considered "further
|
|
385
385
|
restrictions" within the meaning of section 10. If the Program as you
|
|
@@ -630,21 +630,21 @@ attach them to the start of each source file to most effectively state
|
|
|
630
630
|
the exclusion of warranty; and each file should have at least the
|
|
631
631
|
"copyright" line and a pointer to where the full notice is found.
|
|
632
632
|
|
|
633
|
-
|
|
634
|
-
|
|
633
|
+
<one line to give the program's name and a brief idea of what it does.>
|
|
634
|
+
Copyright (C) <year> <name of author>
|
|
635
635
|
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
636
|
+
This program is free software: you can redistribute it and/or modify
|
|
637
|
+
it under the terms of the GNU General Public License as published by
|
|
638
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
639
|
+
(at your option) any later version.
|
|
640
640
|
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
641
|
+
This program is distributed in the hope that it will be useful,
|
|
642
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
643
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
644
|
+
GNU General Public License for more details.
|
|
645
645
|
|
|
646
|
-
|
|
647
|
-
|
|
646
|
+
You should have received a copy of the GNU General Public License
|
|
647
|
+
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
648
648
|
|
|
649
649
|
Also add information on how to contact you by electronic and paper
|
|
650
650
|
mail.
|
|
@@ -652,10 +652,10 @@ mail.
|
|
|
652
652
|
If the program does terminal interaction, make it output a short
|
|
653
653
|
notice like this when it starts in an interactive mode:
|
|
654
654
|
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
655
|
+
<program> Copyright (C) <year> <name of author>
|
|
656
|
+
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
|
657
|
+
This is free software, and you are welcome to redistribute it
|
|
658
|
+
under certain conditions; type `show c' for details.
|
|
659
659
|
|
|
660
660
|
The hypothetical commands \`show w' and \`show c' should show the
|
|
661
661
|
appropriate parts of the General Public License. Of course, your
|
package/README.md
CHANGED
|
@@ -7,47 +7,33 @@
|
|
|
7
7
|
</div>
|
|
8
8
|
|
|
9
9
|
<div align="center">
|
|
10
|
-
<a href="https://commitizen.github.io/cz-cli/"><img alt="Commitizen Friendly" src="https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?maxAge=2592000" /></a>
|
|
11
|
-
<a href="https://github.com/semantic-release/semantic-release"><img alt="Semantic Release" src="https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?maxAge=2592000" /></a>
|
|
10
|
+
<a href="https://commitizen.github.io/cz-cli/"><img alt="Commitizen Friendly" src="https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?maxAge=2592000" /></a>
|
|
11
|
+
<a href="https://github.com/semantic-release/semantic-release"><img alt="Semantic Release" src="https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?maxAge=2592000" /></a>
|
|
12
12
|
</div>
|
|
13
13
|
|
|
14
14
|
<div align="center">
|
|
15
|
-
<a href="https://gitlab.com/digested/node-digest
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
<a href="https://
|
|
19
|
-
<
|
|
15
|
+
<a href="https://gitlab.com/digested/node-digest/-/commits/master" target="_blank">
|
|
16
|
+
<img alt="Status" aria-hidden="" src="https://gitlab.com/digested/node-digest/badges/master/pipeline.svg">
|
|
17
|
+
</a>
|
|
18
|
+
<a href="https://digested.gitlab.io/node-digest/coverage">
|
|
19
|
+
<img alt="Coverage Report" src="https://gitlab.com/digested/node-digest/badges/master/coverage.svg" />
|
|
20
|
+
</a>
|
|
21
|
+
<a href="https://www.npmjs.org/package/@digest/webpack">
|
|
22
|
+
<img alt="NPM Version" src="http://img.shields.io/npm/v/@digest/webpack-express.svg?maxAge=86400" />
|
|
23
|
+
</a>
|
|
24
|
+
<a href="https://www.gnu.org/licenses/lgpl-3.0.en.html">
|
|
25
|
+
<img alt="License LGPL 3.0 or later" src="https://img.shields.io/npm/l/@digest/webpack-express.svg?maxAge=2592000" />
|
|
26
|
+
</a>
|
|
27
|
+
<a href="https://github.com/gajus/eslint-config-canonical">
|
|
28
|
+
<img alt="Code Style Canonical" src="https://img.shields.io/badge/code%20style-canonical-blue.svg?maxAge=2592000" />
|
|
29
|
+
</a>
|
|
20
30
|
</div>
|
|
31
|
+
<br />
|
|
32
|
+
<br />
|
|
21
33
|
|
|
22
|
-
|
|
34
|
+
> A node digest project package
|
|
23
35
|
|
|
24
|
-
|
|
25
|
-
[
|
|
26
|
-
reloading during development, and provides scripts to get up and running
|
|
27
|
-
quickly.
|
|
36
|
+
See the [project page](https://gitlab.com/digested/node-digest/) for documentation or the
|
|
37
|
+
[issues](https://gitlab.com/digested/node-digest/-/issues) associated with this package.
|
|
28
38
|
|
|
29
|
-
For production and development express servers, add the following scripts to your
|
|
30
|
-
`package.json`:
|
|
31
39
|
|
|
32
|
-
```json
|
|
33
|
-
"package.json"
|
|
34
|
-
|
|
35
|
-
{
|
|
36
|
-
...
|
|
37
|
-
"scripts": {
|
|
38
|
-
"start": "cross-env node node_modules/@digest/webpack-express",
|
|
39
|
-
"start:dev": "cross-env NODE_ENV='development' node node_modules/@digest/webpack-express",
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
The provided Express script is broken down into several steps:
|
|
45
|
-
|
|
46
|
-
* [**dev** \**when NODE_ENV='development'*](https://gitlab.com/digested/node-digest/blob/master/packages/webpack-express/dist/dev.js)
|
|
47
|
-
* [app](https://gitlab.com/digested/node-digest/blob/master/packages/express/dist/app.js)
|
|
48
|
-
* [server](https://gitlab.com/digested/node-digest/blob/master/packages/express/dist/server.js)
|
|
49
|
-
* [start](https://gitlab.com/digested/node-digest/blob/master/packages/webpack-express/dist/start.js)
|
|
50
|
-
|
|
51
|
-
## License
|
|
52
|
-
|
|
53
|
-
GPLv3
|
package/dist/app.js
CHANGED
|
@@ -1,14 +1,49 @@
|
|
|
1
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
27
|
};
|
|
5
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
29
|
const server_1 = __importDefault(require("@digest/express/dist/server"));
|
|
30
|
+
const scripts_1 = require("@digest/scripts");
|
|
7
31
|
const connect_slashes_1 = __importDefault(require("connect-slashes"));
|
|
8
32
|
const express_1 = __importDefault(require("express"));
|
|
9
|
-
const helmet_1 =
|
|
33
|
+
const helmet_1 = __importStar(require("helmet"));
|
|
10
34
|
const routers_1 = __importDefault(require("./routers"));
|
|
11
35
|
const app = (0, express_1.default)();
|
|
12
36
|
app.use((0, helmet_1.default)(), routers_1.default, (0, connect_slashes_1.default)(false));
|
|
37
|
+
if (!scripts_1.production) {
|
|
38
|
+
app.use((0, helmet_1.contentSecurityPolicy)({
|
|
39
|
+
directives: {
|
|
40
|
+
defaultSrc: [
|
|
41
|
+
'\'self\'',
|
|
42
|
+
'\'unsafe-inline\''
|
|
43
|
+
],
|
|
44
|
+
upgradeInsecureRequests: null
|
|
45
|
+
}
|
|
46
|
+
}));
|
|
47
|
+
}
|
|
13
48
|
(0, server_1.default)(app);
|
|
14
49
|
exports.default = app;
|
package/dist/routers/index.js
CHANGED
|
@@ -5,21 +5,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const history_1 = __importDefault(require("@digest/express/dist/routers/history"));
|
|
7
7
|
const statics_1 = __importDefault(require("@digest/express/dist/routers/statics"));
|
|
8
|
-
const scripts_1 =
|
|
8
|
+
const scripts_1 = require("@digest/scripts");
|
|
9
9
|
const express_1 = require("express");
|
|
10
10
|
const webpack_1 = __importDefault(require("../util/webpack"));
|
|
11
11
|
const dev_1 = __importDefault(require("./dev"));
|
|
12
12
|
const hot_1 = __importDefault(require("./hot"));
|
|
13
|
-
const { baseHref
|
|
14
|
-
const staticPath = scripts_1.
|
|
13
|
+
const { baseHref } = scripts_1.config;
|
|
14
|
+
const staticPath = scripts_1.config.staticPath;
|
|
15
15
|
const routers = (0, express_1.Router)({
|
|
16
16
|
caseSensitive: true,
|
|
17
17
|
strict: true
|
|
18
18
|
});
|
|
19
19
|
const historyRouter = (0, history_1.default)(baseHref);
|
|
20
|
-
const staticsRouter = (0, statics_1.default)(baseHref, staticPath, production);
|
|
20
|
+
const staticsRouter = (0, statics_1.default)(baseHref, staticPath, scripts_1.production);
|
|
21
21
|
routers.use(baseHref, historyRouter, staticsRouter);
|
|
22
|
-
if (!production) {
|
|
22
|
+
if (!scripts_1.production) {
|
|
23
23
|
const compiler = (0, webpack_1.default)();
|
|
24
24
|
const devRouter = (0, dev_1.default)(compiler, baseHref);
|
|
25
25
|
const hotRouter = (0, hot_1.default)(compiler, baseHref);
|
package/dist/util/webpack.js
CHANGED
|
@@ -3,11 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const scripts_1 = __importDefault(require("@digest/scripts"));
|
|
7
6
|
const webpack_1 = __importDefault(require("webpack"));
|
|
8
7
|
const webpack = (dashboard = false) => {
|
|
9
8
|
var _a;
|
|
10
|
-
const config = require(
|
|
9
|
+
const config = require('@digest/scripts');
|
|
11
10
|
if (dashboard) {
|
|
12
11
|
const DashboardPlugin = require('webpack-dashboard/plugin');
|
|
13
12
|
(_a = config.plugins) === null || _a === void 0 ? void 0 : _a.concat(new DashboardPlugin());
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digest/webpack-express",
|
|
3
3
|
"title": "Express Webpack Middleware Digest",
|
|
4
|
-
"license": "
|
|
5
|
-
"version": "3.
|
|
4
|
+
"license": "LGPL-3.0-or-later",
|
|
5
|
+
"version": "3.5.1",
|
|
6
6
|
"description": "Digested Express Webpack middleware configurations",
|
|
7
7
|
"author": "wallzero @wallzeroblog (http://wallzero.com)",
|
|
8
8
|
"contributors": [
|
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
"/dist/util/webpack.js",
|
|
28
28
|
"/dist/app.d.ts",
|
|
29
29
|
"/dist/app.js",
|
|
30
|
-
"
|
|
30
|
+
"COPYING.md",
|
|
31
|
+
"COPYING.LESSER.md"
|
|
31
32
|
],
|
|
32
33
|
"homepage": "https://gitlab.com/digested/node-digest/tree/master/packages/webpack-express",
|
|
33
34
|
"repository": {
|
|
@@ -44,21 +45,20 @@
|
|
|
44
45
|
"clean": "rimraf node_modules dist package-lock.json npm-debug.log"
|
|
45
46
|
},
|
|
46
47
|
"dependencies": {
|
|
47
|
-
"@digest/express": "^3.
|
|
48
|
-
"@digest/scripts": "^3.
|
|
49
|
-
"@digest/webpack": "^3.
|
|
50
|
-
"webpack-dev-middleware": "^5.3.
|
|
51
|
-
"webpack-hot-middleware": "^2.25.
|
|
48
|
+
"@digest/express": "^3.5.1",
|
|
49
|
+
"@digest/scripts": "^3.5.1",
|
|
50
|
+
"@digest/webpack": "^3.5.1",
|
|
51
|
+
"webpack-dev-middleware": "^5.3.3",
|
|
52
|
+
"webpack-hot-middleware": "^2.25.2"
|
|
52
53
|
},
|
|
53
54
|
"devDependencies": {
|
|
54
55
|
"@types/express": "^4.17.13",
|
|
55
|
-
"@types/webpack": "^5.28.0"
|
|
56
|
-
"@types/webpack-dev-middleware": "^5.3.0"
|
|
56
|
+
"@types/webpack": "^5.28.0"
|
|
57
57
|
},
|
|
58
58
|
"keywords": [
|
|
59
59
|
"digest",
|
|
60
60
|
"express",
|
|
61
61
|
"webpack"
|
|
62
62
|
],
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "ffae282c11332597e89a81ac88daa6af57508df2"
|
|
64
64
|
}
|