safely-serve 0.0.8 → 0.0.10

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,3 +1,27 @@
1
+ /** ----------------------------------------------------------------------
2
+ * libsafely-serve.webpack.config.cjs
3
+ * --------------------------------------------------------------------------
4
+ * Copyright ©
5
+ * Pellegrino Prevete
6
+ * 2025, 2026
7
+ *
8
+ * All rights reserved
9
+ * ----------------------------------------------------------------------
10
+ *
11
+ * This program is free software: you can redistribute it and/or modify
12
+ * it under the terms of the GNU General Public License as published by
13
+ * the Free Software Foundation, either version 3 of the License, or
14
+ * (at your option) any later version.
15
+ *
16
+ * This program is distributed in the hope that it will be useful,
17
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
+ * GNU General Public License for more details.
20
+ *
21
+ * You should have received a copy of the GNU General Public License
22
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
23
+ */
24
+
1
25
  const
2
26
  _path =
3
27
  require(
@@ -19,6 +43,10 @@ const
19
43
  _child_process_ignore =
20
44
  { resourceRegExp:
21
45
  /^node:child_process$/ };
46
+ const
47
+ _node_fs_ignore =
48
+ { resourceRegExp:
49
+ /^node:fs$/ };
22
50
  const
23
51
  _serve_ignore =
24
52
  { resourceRegExp:
@@ -43,6 +71,10 @@ const
43
71
  _child_process_ignore_plugin =
44
72
  new _ignore_plugin(
45
73
  _child_process_ignore);
74
+ const
75
+ _node_fs_ignore_plugin =
76
+ new _ignore_plugin(
77
+ _node_fs_ignore);
46
78
  const
47
79
  _serve_ignore_plugin =
48
80
  new _ignore_plugin(
@@ -88,6 +120,8 @@ module.exports = {
88
120
  fallback: {
89
121
  "node:child_process":
90
122
  false,
123
+ "node:fs":
124
+ false,
91
125
  "serve":
92
126
  false,
93
127
  "utils":
@@ -105,6 +139,7 @@ module.exports = {
105
139
  'yargs' },
106
140
  plugins: [
107
141
  _child_process_ignore_plugin,
142
+ _node_fs_ignore_plugin,
108
143
  _serve_ignore_plugin,
109
144
  _yargs_ignore_plugin,
110
145
  _yargs_helpers_ignore_plugin
@@ -1,5 +1,5 @@
1
1
  .\" Man page generated from reStructuredText
2
- .\" by the Docutils 0.22.3 manpage writer.
2
+ .\" by the Docutils 0.22.4 manpage writer.
3
3
  .
4
4
  .
5
5
  .nr rst2man-indent-level 0
@@ -31,6 +31,27 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
31
31
  .TH "safely-serve" "1" "" "safely-serve insert.version.here"
32
32
  .SH Name
33
33
  safely-serve \- Safe static file serving and directory listing
34
+ .\" SPDX-License-Identifier: AGPL-3.0-or-later
35
+ .\"
36
+ .\" ----------------------------------------------------------------------
37
+ .\" Copyright © 2024, 2025, 2026 Pellegrino Prevete
38
+ .\"
39
+ .\" All rights reserved
40
+ .\" ----------------------------------------------------------------------
41
+ .\"
42
+ .\" This program is free software: you can redistribute it and/or modify
43
+ .\" it under the terms of the GNU Affero General Public License as published by
44
+ .\" the Free Software Foundation, either version 3 of the License, or
45
+ .\" (at your option) any later version.
46
+ .\"
47
+ .\" This program is distributed in the hope that it will be useful,
48
+ .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
49
+ .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
50
+ .\" GNU Affero General Public License for more details.
51
+ .\"
52
+ .\" You should have received a copy of the GNU Affero General Public License
53
+ .\" along with this program. If not, see <https://www.gnu.org/licenses/>.
54
+ .
34
55
  .SH Synopsis
35
56
  .sp
36
57
  safely\-serve \fIoption\fP
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name":
3
3
  "safely-serve",
4
4
  "version":
5
- "0.0.8",
5
+ "0.0.10",
6
6
  "description":
7
7
  "Serve extension which auto-generates self-signed OpenSSL certificates' at runtime",
8
8
  "funding": {
@@ -17,13 +17,11 @@
17
17
  "AUTHORS.rst",
18
18
  "COPYING",
19
19
  "README.md",
20
+ "dist",
20
21
  "eslint.config.mjs",
21
22
  "package.json",
22
- "safely-serve.js",
23
23
  "safely-serve",
24
- "fs-worker.js",
25
24
  "fs-worker.webpack.config.cjs",
26
- "index.html",
27
25
  "libsafely-serve",
28
26
  "libsafely-serve.webpack.config.cjs",
29
27
  "man",
@@ -60,9 +58,13 @@
60
58
  },
61
59
  "devDependencies": {
62
60
  "crash-js-webpack":
63
- "^0.0.3",
61
+ "^0.0.31",
64
62
  "eslint":
65
- "^9.32.0",
63
+ "^10.3.0",
64
+ "globals":
65
+ "^17.3.0",
66
+ "@eslint/js":
67
+ "^10.0.1",
66
68
  "webpack":
67
69
  "^5.102.1",
68
70
  "webpack-cli":
@@ -70,9 +72,9 @@
70
72
  },
71
73
  "dependencies": {
72
74
  "crash-js":
73
- "^0.1.67",
75
+ "^0.11.1",
74
76
  "cert-tools":
75
- "^0.0.7",
77
+ "^0.0.12",
76
78
  "js-sha256":
77
79
  "^0.11.1",
78
80
  "os":
@@ -89,11 +91,11 @@
89
91
  "safely-serve" },
90
92
  "scripts": {
91
93
  "build-fs-worker":
92
- "npx webpack --mode 'production' --config 'fs-worker.webpack.config.cjs' --stats-error-details",
94
+ "npx webpack --mode 'production' --config 'fs-worker.webpack.config.cjs' --stats-error-details; for _component in {'','lib'}'safely-serve'; do cp 'fs-worker.js' \"dist/${_component}\"; done",
93
95
  "build-lib":
94
- "npx webpack --mode 'production' --config 'libsafely-serve.webpack.config.cjs' --stats-error-details",
96
+ "npx webpack --mode 'production' --config 'libsafely-serve.webpack.config.cjs' --stats-error-details; mv 'libsafely-serve.js' 'dist/libsafely-serve'",
95
97
  "build-bin":
96
- "npx webpack --mode 'production' --config 'webpack.config.cjs' --stats-error-details",
98
+ "npx webpack --mode 'production' --config 'webpack.config.cjs' --stats-error-details; mv 'safely-serve.js' 'dist/safely-serve'",
97
99
  "build":
98
100
  "npm run lint && npm run build-fs-worker && npm run build-lib && npm run build-bin",
99
101
  "lint":
@@ -101,7 +103,7 @@
101
103
  "publish-pnm":
102
104
  "npm run build && npm publish --access public",
103
105
  "start":
104
- "npx safely-serve -d .",
106
+ "npx safely-serve -d 'dist/safely-serve'",
105
107
  "test":
106
108
  "echo \"Error: no test specified\" && exit 1"
107
109
  }