@networkpro/web 1.1.2 → 1.1.3
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/LICENSE.md +12 -41
- package/package.json +3 -1
- package/scripts/flattenHeaders.js +61 -0
- package/scripts/validateHeaders.js +95 -0
- package/static/manifest.json +30 -0
- package/static/screenshots/desktop-about.png +0 -0
- package/static/screenshots/desktop-foss.png +0 -0
- package/static/screenshots/desktop-home.png +0 -0
- package/static/screenshots/mobile-foss.png +0 -0
- package/static/screenshots/mobile-home.png +0 -0
package/LICENSE.md
CHANGED
|
@@ -51,7 +51,7 @@ Web: <https://bio.neteng.pro>
|
|
|
51
51
|
# Legal, Copyright, and Licensing
|
|
52
52
|
|
|
53
53
|
**Network Pro Strategies**
|
|
54
|
-
**Effective Date:** May
|
|
54
|
+
**Effective Date:** May 18, 2025
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
|
|
@@ -74,11 +74,10 @@ Web: <https://bio.neteng.pro>
|
|
|
74
74
|
11. [Modifications and Liability Disclaimer](#disclaimer)
|
|
75
75
|
12. [Contact](#contact)
|
|
76
76
|
13. [Revisions](#revisions)
|
|
77
|
-
14. [Attribution](#attribution)
|
|
78
77
|
|
|
79
78
|
---
|
|
80
79
|
|
|
81
|
-
**Formats Available:** [HTML](
|
|
80
|
+
**Formats Available:** [HTML](https://netwk.pro/license) | Markdown
|
|
82
81
|
|
|
83
82
|
<a name="ownership"></a>
|
|
84
83
|
|
|
@@ -144,7 +143,7 @@ This work is dual-licensed under:
|
|
|
144
143
|
|
|
145
144
|
<a name="cc-by"></a>
|
|
146
145
|
|
|
147
|
-
##
|
|
146
|
+
## 7. Creative Commons License (CC BY 4.0)
|
|
148
147
|
|
|
149
148
|
<sup>Formats: [HTML](https://legal.netwk.pro/html/CC-BY-4.0.html) | [Markdown](https://github.com/netwk-pro/netwk-pro-legal/blob/master/assets/license/CC-BY-4.0.md) | [Text](https://github.com/netwk-pro/netwk-pro-legal/blob/master/assets/license/CC-BY-4.0.txt) | [RDFa](https://github.com/netwk-pro/netwk-pro-legal/blob/master/assets/license/CC-BY-4.0-rdfa.xml) | [XMP](https://github.com/netwk-pro/netwk-pro-legal/blob/master/assets/license/CC-BY-4.0.xml)</sup>
|
|
150
149
|
|
|
@@ -170,7 +169,7 @@ Permissions beyond the scope of this License—or instead of those permitted by
|
|
|
170
169
|
|
|
171
170
|
<a name="gnu-gpl"></a>
|
|
172
171
|
|
|
173
|
-
##
|
|
172
|
+
## 8. GNU General Public License (GPL)
|
|
174
173
|
|
|
175
174
|
<sup>Formats: [HTML](https://legal.netwk.pro/html/COPYING.html) | [Markdown](https://github.com/netwk-pro/netwk-pro-legal/blob/master/assets/license/COPYING.md) | [Text](https://github.com/netwk-pro/netwk-pro-legal/blob/master/assets/license/COPYING.txt) | [RDFa](https://github.com/netwk-pro/netwk-pro-legal/blob/master/assets/license/COPYING-rdfa.xml) | [ODT](https://github.com/netwk-pro/netwk-pro-legal/raw/refs/heads/master/assets/license/COPYING.odt)</sup>
|
|
176
175
|
|
|
@@ -203,7 +202,7 @@ The inclusion, reference, or linking of any third-party content **does not const
|
|
|
203
202
|
|
|
204
203
|
<a name="prohibited-uses"></a>
|
|
205
204
|
|
|
206
|
-
##
|
|
205
|
+
## 10. Prohibited Uses
|
|
207
206
|
|
|
208
207
|
**The following activities are strictly prohibited and may constitute infringement or unfair competition under applicable law, unless explicitly authorized in writing by the Company:**
|
|
209
208
|
|
|
@@ -216,7 +215,7 @@ The inclusion, reference, or linking of any third-party content **does not const
|
|
|
216
215
|
|
|
217
216
|
<a name="disclaimer"></a>
|
|
218
217
|
|
|
219
|
-
##
|
|
218
|
+
## 11. Modifications and Liability Disclaimer
|
|
220
219
|
|
|
221
220
|
Modifications, redistribution, or any use of the Licensed Material are performed entirely at your own risk.
|
|
222
221
|
|
|
@@ -228,16 +227,16 @@ Modifications, redistribution, or any use of the Licensed Material are performed
|
|
|
228
227
|
|
|
229
228
|
<a name="contact"></a>
|
|
230
229
|
|
|
231
|
-
##
|
|
230
|
+
## 12. Contact
|
|
232
231
|
|
|
233
|
-
The Company may be contacted via our [contact form](https://
|
|
234
|
-
📧 `
|
|
232
|
+
The Company may be contacted via our [contact form](https://netwk.pro/contact) or by email at:
|
|
233
|
+
📧 `contact (at) s.neteng.pro`
|
|
235
234
|
|
|
236
235
|
<sub>[Back to top](#top)</sub>
|
|
237
236
|
|
|
238
237
|
<a name="revisions"></a>
|
|
239
238
|
|
|
240
|
-
##
|
|
239
|
+
## 13. Revisions
|
|
241
240
|
|
|
242
241
|
This legal page may be updated to comply with legal or operational changes. The current effective date is listed at the top of this document.
|
|
243
242
|
|
|
@@ -245,40 +244,12 @@ This legal page may be updated to comply with legal or operational changes. The
|
|
|
245
244
|
|
|
246
245
|
<a name="attribution"></a>
|
|
247
246
|
|
|
248
|
-
## 13. Attribution
|
|
249
|
-
|
|
250
|
-
Website base structure provided by HTML5 Boilerplate:
|
|
251
|
-
<[https://html5boilerplate.com/](https://html5boilerplate.com/)>>
|
|
252
|
-
|
|
253
|
-
```markdown
|
|
254
|
-
Copyright (c) HTML5 Boilerplate
|
|
255
|
-
|
|
256
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
257
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
258
|
-
the Software without restriction, including without limitation the rights to
|
|
259
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
260
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
261
|
-
subject to the following conditions:
|
|
262
|
-
|
|
263
|
-
The above copyright notice and this permission notice shall be included in all
|
|
264
|
-
copies or substantial portions of the Software.
|
|
265
|
-
|
|
266
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
267
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
268
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
269
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
270
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
271
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
<sub>[Back to top](#top)</sub>
|
|
275
|
-
|
|
276
247
|
---
|
|
277
248
|
|
|
278
249
|
<div style="font-size: 12px; font-weight: bold; text-align: center;">
|
|
279
250
|
|
|
280
|
-
[Home](
|
|
281
|
-
[Privacy Policy](
|
|
251
|
+
[Home](https://netwk.pro) | [Terms of Use](https://netwk.pro/terms-of-use)
|
|
252
|
+
[Privacy Policy](https://netwk.pro/privacy-policy) | Legal
|
|
282
253
|
|
|
283
254
|
</div>
|
|
284
255
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@networkpro/web",
|
|
3
3
|
"private": false,
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "1.1.
|
|
5
|
+
"version": "1.1.3",
|
|
6
6
|
"description": "Locking Down Networks, Unlocking Confidence | Security, Networking, Privacy — Network Pro Strategies",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"security",
|
|
@@ -58,6 +58,8 @@
|
|
|
58
58
|
"test:watch": "vitest --config vitest.config.client.js --watch",
|
|
59
59
|
"test:coverage": "npm run test:client -- --run --coverage && npm run test:server -- --run --coverage",
|
|
60
60
|
"css:bundle": "node scripts/bundleCss.js",
|
|
61
|
+
"head:flatten": "node scripts/flattenHeaders.js",
|
|
62
|
+
"head:validate": "node scripts/validateHeaders.js",
|
|
61
63
|
"checkout": "npm run test:all && npm run lint:all && npm run check"
|
|
62
64
|
},
|
|
63
65
|
"devDependencies": {
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
scripts/flattenHeaders.js
|
|
3
|
+
|
|
4
|
+
SPDX-License-Identifier: CC-BY-4.0 OR GPL-3.0-or-later
|
|
5
|
+
This file is part of Network Pro.
|
|
6
|
+
========================================================================== */
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* CSP header flattening utility
|
|
10
|
+
* Flattens the Content-Security-Policy header in a headers file
|
|
11
|
+
*
|
|
12
|
+
* @module scripts/
|
|
13
|
+
* @author SunDevil311
|
|
14
|
+
* @updated 2025-05-18
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import fs from "fs";
|
|
18
|
+
|
|
19
|
+
const HEADERS_PATH = "./static/_headers"; // update if needed
|
|
20
|
+
const OUTPUT_PATH = "./static/_headers.flattened";
|
|
21
|
+
|
|
22
|
+
const lines = fs.readFileSync(HEADERS_PATH, "utf-8").split("\n");
|
|
23
|
+
const output = [];
|
|
24
|
+
|
|
25
|
+
let cspLines = [];
|
|
26
|
+
let inCSP = false;
|
|
27
|
+
|
|
28
|
+
for (const line of lines) {
|
|
29
|
+
if (line.trim().startsWith("Content-Security-Policy:")) {
|
|
30
|
+
inCSP = true;
|
|
31
|
+
cspLines.push(line.trim());
|
|
32
|
+
} else if (inCSP && line.startsWith(" ")) {
|
|
33
|
+
cspLines.push(line.trim());
|
|
34
|
+
} else {
|
|
35
|
+
if (inCSP) {
|
|
36
|
+
// Output flattened CSP
|
|
37
|
+
const flattened = cspLines
|
|
38
|
+
.join(" ")
|
|
39
|
+
.replace(/\s*;\s*/g, "; ") // Normalize spacing
|
|
40
|
+
.replace(/\s+/g, " ")
|
|
41
|
+
.trim();
|
|
42
|
+
output.push(` ${flattened}`);
|
|
43
|
+
cspLines = [];
|
|
44
|
+
inCSP = false;
|
|
45
|
+
}
|
|
46
|
+
output.push(line);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Handle edge case: CSP is last in file
|
|
51
|
+
if (cspLines.length > 0) {
|
|
52
|
+
const flattened = cspLines
|
|
53
|
+
.join(" ")
|
|
54
|
+
.replace(/\s*;\s*/g, "; ")
|
|
55
|
+
.replace(/\s+/g, " ")
|
|
56
|
+
.trim();
|
|
57
|
+
output.push(` ${flattened}`);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
fs.writeFileSync(OUTPUT_PATH, output.join("\n"));
|
|
61
|
+
console.log(`Flattened headers written to ${OUTPUT_PATH}`);
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
scripts/validateHeaders.js
|
|
3
|
+
|
|
4
|
+
SPDX-License-Identifier: CC-BY-4.0 OR GPL-3.0-or-later
|
|
5
|
+
This file is part of Network Pro.
|
|
6
|
+
========================================================================== */
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* CSP header validation utility
|
|
10
|
+
* Validates the Content-Security-Policy header in a headers file
|
|
11
|
+
*
|
|
12
|
+
* @module scripts/
|
|
13
|
+
* @author SunDevil311
|
|
14
|
+
* @updated 2025-05-18
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
// validate-headers.js
|
|
18
|
+
import fs from "fs";
|
|
19
|
+
|
|
20
|
+
const file = "./static/_headers";
|
|
21
|
+
const lines = fs.readFileSync(file, "utf-8").split("\n");
|
|
22
|
+
|
|
23
|
+
let currentPath = null;
|
|
24
|
+
let errors = [];
|
|
25
|
+
|
|
26
|
+
let currentHeader = null;
|
|
27
|
+
let headerValueBuffer = [];
|
|
28
|
+
|
|
29
|
+
function flushBufferedHeader(lineNum) {
|
|
30
|
+
if (!currentHeader) return;
|
|
31
|
+
|
|
32
|
+
const value = headerValueBuffer.join(" ").trim();
|
|
33
|
+
|
|
34
|
+
if (currentHeader !== "Content-Security-Policy" && value.endsWith(";")) {
|
|
35
|
+
errors.push(
|
|
36
|
+
`Line ${lineNum}: Header '${currentHeader}' should not end with a semicolon`,
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (currentHeader === "Content-Security-Policy" && !value.endsWith(";")) {
|
|
41
|
+
errors.push(
|
|
42
|
+
`Line ${lineNum}: 'Content-Security-Policy' must end with a semicolon`,
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
currentHeader = null;
|
|
47
|
+
headerValueBuffer = [];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
for (let i = 0; i < lines.length; i++) {
|
|
51
|
+
const line = lines[i];
|
|
52
|
+
const trimmed = line.trim();
|
|
53
|
+
|
|
54
|
+
if (trimmed.startsWith("/*")) {
|
|
55
|
+
if (currentPath) {
|
|
56
|
+
errors.push(
|
|
57
|
+
`Line ${i + 1}: Multiple '/*' blocks detected. Only one is allowed in Netlify _headers`,
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
currentPath = trimmed;
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (trimmed === "") continue;
|
|
65
|
+
|
|
66
|
+
if (line.startsWith(" ")) {
|
|
67
|
+
const colonIndex = line.indexOf(":");
|
|
68
|
+
|
|
69
|
+
if (colonIndex !== -1) {
|
|
70
|
+
// New header
|
|
71
|
+
flushBufferedHeader(i);
|
|
72
|
+
currentHeader = line.substring(0, colonIndex).trim();
|
|
73
|
+
const rest = line.substring(colonIndex + 1).trim();
|
|
74
|
+
headerValueBuffer.push(rest);
|
|
75
|
+
} else if (currentHeader) {
|
|
76
|
+
// Continuation of previous header
|
|
77
|
+
headerValueBuffer.push(trimmed);
|
|
78
|
+
} else {
|
|
79
|
+
errors.push(
|
|
80
|
+
`Line ${i + 1}: Continuation line without a valid header context`,
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Final flush
|
|
87
|
+
flushBufferedHeader(lines.length);
|
|
88
|
+
|
|
89
|
+
if (errors.length) {
|
|
90
|
+
console.error("❌ Header validation failed:");
|
|
91
|
+
errors.forEach((e) => console.error(" -", e));
|
|
92
|
+
process.exit(1);
|
|
93
|
+
} else {
|
|
94
|
+
console.log("✅ _headers file passed validation!");
|
|
95
|
+
}
|
package/static/manifest.json
CHANGED
|
@@ -30,6 +30,36 @@
|
|
|
30
30
|
"sizes": "512x512"
|
|
31
31
|
}
|
|
32
32
|
],
|
|
33
|
+
"screenshots": [
|
|
34
|
+
{
|
|
35
|
+
"src": "/screenshots/desktop-home.png",
|
|
36
|
+
"type": "image/png",
|
|
37
|
+
"sizes": "1920x1080",
|
|
38
|
+
"form_factor": "wide",
|
|
39
|
+
"label": "Homescreen of Network Pro Strategies"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"src": "/screenshots/desktop-about.png",
|
|
43
|
+
"type": "image/png",
|
|
44
|
+
"sizes": "1920x1080",
|
|
45
|
+
"form_factor": "wide",
|
|
46
|
+
"label": "About Network Pro Strategies"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"src": "/screenshots/mobile-home.png",
|
|
50
|
+
"type": "image/png",
|
|
51
|
+
"sizes": "1080x1920",
|
|
52
|
+
"form_factor": "narrow",
|
|
53
|
+
"label": "Mobile view of Network Pro Strategies homepage"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"src": "/screenshots/mobile-foss.png",
|
|
57
|
+
"type": "image/png",
|
|
58
|
+
"sizes": "1080x1920",
|
|
59
|
+
"form_factor": "narrow",
|
|
60
|
+
"label": "FOSS Spotlight on mobile"
|
|
61
|
+
}
|
|
62
|
+
],
|
|
33
63
|
"orientation": "any",
|
|
34
64
|
"scope": "/",
|
|
35
65
|
"categories": ["business", "security", "technology", "network", "privacy"],
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|