@networkpro/web 1.16.0 → 1.17.0
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/.github/workflows/build-and-publish.yml +19 -12
- package/.github/workflows/lighthouse.yml +1 -1
- package/.github/workflows/meta-check.yml +34 -0
- package/.github/workflows/playwright.yml +3 -3
- package/.github/workflows/publish-test.yml +3 -3
- package/.github/workflows/templates/publish.template.yml +3 -3
- package/.node-version +1 -1
- package/.nvmrc +1 -1
- package/CHANGELOG.md +72 -1
- package/LICENSE.md +3 -3
- package/README.md +21 -9
- package/package.json +22 -23
- package/playwright.config.js +2 -2
- package/src/app.html +2 -2
- package/tests/e2e/app.spec.js +12 -31
- package/tests/e2e/mobile.spec.js +3 -3
- package/tests/meta/meta.test.js +40 -0
- package/tests/unit/server/internal/auditCoverage.test.js +2 -2
- package/tests/unit/server/meta.test.js +30 -0
- package/src/routes/example.svx +0 -9
|
@@ -49,7 +49,7 @@ jobs:
|
|
|
49
49
|
- name: Upgrade npm
|
|
50
50
|
run: |
|
|
51
51
|
corepack enable
|
|
52
|
-
npm install -g npm@11.
|
|
52
|
+
npm install -g npm@11.6.0
|
|
53
53
|
|
|
54
54
|
- name: Install Node.js dependencies
|
|
55
55
|
run: npm ci
|
|
@@ -61,25 +61,32 @@ jobs:
|
|
|
61
61
|
id: jsdoc_lint
|
|
62
62
|
continue-on-error: true
|
|
63
63
|
run: |
|
|
64
|
-
set -e
|
|
65
64
|
output=$(npm run lint:jsdoc || true)
|
|
66
65
|
echo "$output" | tee jsdoc-lint-output.txt
|
|
67
66
|
|
|
68
|
-
count=$(echo "$output" |
|
|
67
|
+
count=$(echo "$output" | grep -cve '^\s*$')
|
|
69
68
|
echo "jsdoc_count=$count" >> "$GITHUB_OUTPUT"
|
|
70
69
|
|
|
71
|
-
- name:
|
|
72
|
-
if: steps.jsdoc_lint.outputs.jsdoc_count ==
|
|
73
|
-
run: echo "JSDoc lint passed successfully!"
|
|
70
|
+
- name: PASS
|
|
71
|
+
if: ${{ steps.jsdoc_lint.outputs.jsdoc_count == 0 }}
|
|
72
|
+
run: echo "✅ JSDoc lint passed successfully!"
|
|
74
73
|
|
|
75
|
-
- name:
|
|
76
|
-
if: steps.jsdoc_lint.outputs.jsdoc_count !=
|
|
74
|
+
- name: JSDoc violations detected (non-blocking)
|
|
75
|
+
if: ${{ steps.jsdoc_lint.outputs.jsdoc_count != 0 }}
|
|
77
76
|
run: |
|
|
78
77
|
echo "⚠️ JSDoc lint check failed with ${{ steps.jsdoc_lint.outputs.jsdoc_count }} violations (non-blocking)"
|
|
79
78
|
echo "--- JSDoc Violations ---"
|
|
80
79
|
cat jsdoc-lint-output.txt
|
|
81
80
|
|
|
82
|
-
|
|
81
|
+
- name: Upload JSDoc results
|
|
82
|
+
if: ${{ steps.jsdoc_lint.outputs.jsdoc_count != 0 }}
|
|
83
|
+
uses: actions/upload-artifact@v4
|
|
84
|
+
with:
|
|
85
|
+
name: jsdoc-lint-results
|
|
86
|
+
path: jsdoc-lint-output.txt
|
|
87
|
+
if-no-files-found: error
|
|
88
|
+
|
|
89
|
+
# Build to ensure the package is functional
|
|
83
90
|
- name: Build Node.js project
|
|
84
91
|
run: npm run build
|
|
85
92
|
|
|
@@ -128,7 +135,7 @@ jobs:
|
|
|
128
135
|
- name: Upgrade npm
|
|
129
136
|
run: |
|
|
130
137
|
corepack enable
|
|
131
|
-
npm install -g npm@11.
|
|
138
|
+
npm install -g npm@11.6.0
|
|
132
139
|
|
|
133
140
|
- name: Install Node.js dependencies
|
|
134
141
|
run: npm ci
|
|
@@ -189,7 +196,7 @@ jobs:
|
|
|
189
196
|
- name: Upgrade npm
|
|
190
197
|
run: |
|
|
191
198
|
corepack enable
|
|
192
|
-
npm install -g npm@11.
|
|
199
|
+
npm install -g npm@11.6.0
|
|
193
200
|
|
|
194
201
|
- name: Install Node.js dependencies
|
|
195
202
|
run: npm ci
|
|
@@ -201,7 +208,7 @@ jobs:
|
|
|
201
208
|
|
|
202
209
|
- name: Update package name for GPR
|
|
203
210
|
run: |
|
|
204
|
-
sed -i 's/"name": "
|
|
211
|
+
sed -i 's/"name": "[^"]*"/"name": "@netwk-pro\/web"/' package.json
|
|
205
212
|
|
|
206
213
|
- name: Verify version not already published
|
|
207
214
|
run: |
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# .github/workflows/meta-check.yml
|
|
2
|
+
#
|
|
3
|
+
# Copyright © 2025 Network Pro Strategies (Network Pro™)
|
|
4
|
+
# SPDX-License-Identifier: CC-BY-4.0 OR GPL-3.0-or-later
|
|
5
|
+
# This file is part of Network Pro
|
|
6
|
+
|
|
7
|
+
name: Metadata Check
|
|
8
|
+
|
|
9
|
+
on:
|
|
10
|
+
push:
|
|
11
|
+
branches: [master]
|
|
12
|
+
pull_request:
|
|
13
|
+
workflow_dispatch:
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
meta:
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
steps:
|
|
22
|
+
- name: Checkout repo
|
|
23
|
+
uses: actions/checkout@v5
|
|
24
|
+
|
|
25
|
+
- name: Set up Node.js
|
|
26
|
+
uses: actions/setup-node@v5
|
|
27
|
+
with:
|
|
28
|
+
node-version: 24
|
|
29
|
+
|
|
30
|
+
- name: Install dependencies
|
|
31
|
+
run: npm ci
|
|
32
|
+
|
|
33
|
+
- name: Run meta tests
|
|
34
|
+
run: npx vitest run tests/meta/meta.test.js --reporter=verbose
|
|
@@ -12,9 +12,9 @@ on:
|
|
|
12
12
|
branches: [master]
|
|
13
13
|
workflow_dispatch:
|
|
14
14
|
|
|
15
|
-
#
|
|
15
|
+
# Required for actions/checkout
|
|
16
16
|
permissions:
|
|
17
|
-
contents: read
|
|
17
|
+
contents: read
|
|
18
18
|
|
|
19
19
|
jobs:
|
|
20
20
|
test:
|
|
@@ -41,7 +41,7 @@ jobs:
|
|
|
41
41
|
- name: Upgrade npm
|
|
42
42
|
run: |
|
|
43
43
|
corepack enable
|
|
44
|
-
npm install -g npm@11.
|
|
44
|
+
npm install -g npm@11.6.0
|
|
45
45
|
|
|
46
46
|
- name: Install Node.js dependencies
|
|
47
47
|
run: npm ci
|
|
@@ -47,7 +47,7 @@ jobs:
|
|
|
47
47
|
- name: Upgrade npm
|
|
48
48
|
run: |
|
|
49
49
|
corepack enable
|
|
50
|
-
npm install -g npm@11.
|
|
50
|
+
npm install -g npm@11.6.0
|
|
51
51
|
|
|
52
52
|
- name: Install Node.js dependencies
|
|
53
53
|
run: npm ci
|
|
@@ -126,7 +126,7 @@ jobs:
|
|
|
126
126
|
- name: Upgrade npm
|
|
127
127
|
run: |
|
|
128
128
|
corepack enable
|
|
129
|
-
npm install -g npm@11.
|
|
129
|
+
npm install -g npm@11.6.0
|
|
130
130
|
|
|
131
131
|
- name: Install Node.js dependencies
|
|
132
132
|
run: npm ci
|
|
@@ -187,7 +187,7 @@ jobs:
|
|
|
187
187
|
- name: Upgrade npm
|
|
188
188
|
run: |
|
|
189
189
|
corepack enable
|
|
190
|
-
npm install -g npm@11.
|
|
190
|
+
npm install -g npm@11.6.0
|
|
191
191
|
|
|
192
192
|
- name: Install Node.js dependencies
|
|
193
193
|
run: npm ci
|
|
@@ -57,7 +57,7 @@ jobs:
|
|
|
57
57
|
- name: Upgrade npm
|
|
58
58
|
run: |
|
|
59
59
|
corepack enable
|
|
60
|
-
npm install -g npm@11.
|
|
60
|
+
npm install -g npm@11.6.0
|
|
61
61
|
|
|
62
62
|
- name: Install Node.js dependencies
|
|
63
63
|
run: npm ci
|
|
@@ -136,7 +136,7 @@ jobs:
|
|
|
136
136
|
- name: Upgrade npm
|
|
137
137
|
run: |
|
|
138
138
|
corepack enable
|
|
139
|
-
npm install -g npm@11.
|
|
139
|
+
npm install -g npm@11.6.0
|
|
140
140
|
|
|
141
141
|
- name: Install Node.js dependencies
|
|
142
142
|
run: npm ci
|
|
@@ -197,7 +197,7 @@ jobs:
|
|
|
197
197
|
- name: Upgrade npm
|
|
198
198
|
run: |
|
|
199
199
|
corepack enable
|
|
200
|
-
npm install -g npm@11.
|
|
200
|
+
npm install -g npm@11.6.0
|
|
201
201
|
|
|
202
202
|
- name: Install Node.js dependencies
|
|
203
203
|
run: npm ci
|
package/.node-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
24.
|
|
1
|
+
24.8.0
|
package/.nvmrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
24.
|
|
1
|
+
24.8.0
|
package/CHANGELOG.md
CHANGED
|
@@ -22,6 +22,76 @@ This project attempts to follow [Keep a Changelog](https://keepachangelog.com/en
|
|
|
22
22
|
|
|
23
23
|
---
|
|
24
24
|
|
|
25
|
+
## [1.17.0] - 2025-09-16
|
|
26
|
+
|
|
27
|
+
### Security
|
|
28
|
+
|
|
29
|
+
- Updated dependencies to address known vulnerabilities (notably `@sveltejs/kit`, `vite`, and related plugins).
|
|
30
|
+
|
|
31
|
+
### Documentation
|
|
32
|
+
|
|
33
|
+
- Clarified CSP reporting setup in `README.md`:
|
|
34
|
+
- Explained relationship with external CSP reporting endpoint (`csp-endpoint` repo).
|
|
35
|
+
- Documented use of both `report-uri` (legacy) and `report-to` (modern, recommended).
|
|
36
|
+
- Added example headers including `Report-To` definition.
|
|
37
|
+
|
|
38
|
+
### Added
|
|
39
|
+
|
|
40
|
+
- New `meta-check.yml` GitHub Actions workflow to validate `<title>` and `<meta>` descriptions using Vitest.
|
|
41
|
+
- Runs separately from Playwright to avoid hydration timing issues.
|
|
42
|
+
- Ensures SEO metadata is tested in CI without blocking other jobs.
|
|
43
|
+
- New `meta.test.js` file in `tests/unit/meta` for testing in CI.
|
|
44
|
+
- New `meta.test.js` file in `tests/unit/server` for local testing.
|
|
45
|
+
|
|
46
|
+
### Changed
|
|
47
|
+
|
|
48
|
+
- Cleaned up Playwright E2E tests:
|
|
49
|
+
- Removed brittle `toHaveTitle` assertions causing CI failures.
|
|
50
|
+
- Standardized footer checks to use helper function.
|
|
51
|
+
- Improved test readability and consistency in `app.spec.js` and `mobile.spec.js`.
|
|
52
|
+
- Updated generator metadata in `app.html` to reflect `SvelteKit 2.42.1`.
|
|
53
|
+
- Updated Node.js version in `.node-version` and `.nvmrc` to `24.8.0`.
|
|
54
|
+
- Updated CSP endpoint section and footer in `README.md`.
|
|
55
|
+
- Updated JSDoc linting step and `sed` syntax in `build-and-publish.yml` workflow.
|
|
56
|
+
- Updated `npm` version to `11.6.0` in GitHub Actions workflow files:
|
|
57
|
+
- `build-and-publish.yml`
|
|
58
|
+
- `lighthouse.yml`
|
|
59
|
+
- `playwright.yml`
|
|
60
|
+
- `publish-test.yml`
|
|
61
|
+
- `templates/publish.template.yml`
|
|
62
|
+
- Upgraded dependencies:
|
|
63
|
+
- `@eslint/compat` `^1.3.1` → `^1.3.2`
|
|
64
|
+
- `@eslint/js` `^9.32.0` → `^9.35.0`
|
|
65
|
+
- `@playwright/test` `^1.54.1` → `^1.55.0`
|
|
66
|
+
- `@sveltejs/adapter-netlify` `^5.1.0` → `^5.2.3`
|
|
67
|
+
- `@sveltejs/kit` `2.27.0` → `2.42.1`
|
|
68
|
+
- `@sveltejs/vite-plugin-svelte` `^6.1.0` → `^6.2.0`
|
|
69
|
+
- `@testing-library/jest-dom` `^6.6.4` → `^6.8.0`
|
|
70
|
+
- `browserslist` `^4.25.1` → `^4.26.2`
|
|
71
|
+
- `dompurify` `^3.2.6` → `^3.2.7`
|
|
72
|
+
- `eslint` `^9.32.0` → `^9.35.0`
|
|
73
|
+
- `eslint-plugin-jsdoc` `^52.0.2` → `^58.1.1`
|
|
74
|
+
- `eslint-plugin-svelte` `^3.11.0` → `^3.12.3`
|
|
75
|
+
- `globals` `^16.3.0` → `^16.4.0`
|
|
76
|
+
- `playwright` `^1.54.1` → `^1.55.0`
|
|
77
|
+
- `posthog-js` `^1.258.4` → `^1.266.0`
|
|
78
|
+
- `stylelint` `^16.23.0` → `^16.24.0`
|
|
79
|
+
- `svelte` `5.37.2` → `5.39.1`
|
|
80
|
+
- `svelte-check` `^4.3.0` → `^4.3.1`
|
|
81
|
+
- `svelte-eslint-parser` `^1.3.0` → `^1.3.2`
|
|
82
|
+
- `vite` `^7.0.6` → `^7.1.5`
|
|
83
|
+
|
|
84
|
+
### Removed
|
|
85
|
+
|
|
86
|
+
- Deleted `src/routes/example.svx`, which was unused and unneeded.
|
|
87
|
+
- Removed `mdsvex` from package.json, as it is unlikely to be used.
|
|
88
|
+
|
|
89
|
+
### Notes
|
|
90
|
+
|
|
91
|
+
- Pinned `jsdom` to `26.1.0` due to build incompatibility in `27.x` (`cssstyle` parsing error with Vite/Rollup).
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
25
95
|
## [1.16.0] - 2025-07-31
|
|
26
96
|
|
|
27
97
|
### Added
|
|
@@ -752,7 +822,8 @@ This project attempts to follow [Keep a Changelog](https://keepachangelog.com/en
|
|
|
752
822
|
|
|
753
823
|
<!-- Link references -->
|
|
754
824
|
|
|
755
|
-
[Unreleased]: https://github.com/netwk-pro/netwk-pro.github.io/compare/v1.
|
|
825
|
+
[Unreleased]: https://github.com/netwk-pro/netwk-pro.github.io/compare/v1.17.0...HEAD
|
|
826
|
+
[1.17.0]: https://github.com/netwk-pro/netwk-pro.github.io/releases/tag/v1.17.0
|
|
756
827
|
[1.16.0]: https://github.com/netwk-pro/netwk-pro.github.io/releases/tag/v1.16.0
|
|
757
828
|
[1.15.4]: https://github.com/netwk-pro/netwk-pro.github.io/releases/tag/v1.15.4
|
|
758
829
|
[1.15.3]: https://github.com/netwk-pro/netwk-pro.github.io/releases/tag/v1.15.3
|
package/LICENSE.md
CHANGED
|
@@ -51,7 +51,7 @@ This document is provided for convenience only. In the event of any discrepancy,
|
|
|
51
51
|
|
|
52
52
|
## 1. Copyright
|
|
53
53
|
|
|
54
|
-
All content—including text, software, logos, graphics, documentation, and other materials—provided by **Network Pro Strategies** (“Network Pro
|
|
54
|
+
All content—including text, software, logos, graphics, documentation, and other materials—provided by **Network Pro Strategies** (“Network Pro™”, “Company”, “Licensor”) is protected by U.S. and international copyright laws.
|
|
55
55
|
|
|
56
56
|
Copyright © 2025 **[Network Pro Strategies](https://netwk.pro)** (Network Pro™)
|
|
57
57
|
|
|
@@ -113,7 +113,7 @@ This work is dual-licensed under:
|
|
|
113
113
|
|
|
114
114
|
## 7. Creative Commons License (CC BY 4.0)
|
|
115
115
|
|
|
116
|
-
<sup>
|
|
116
|
+
<sup>View / Download: [HTML](https://netwk.pro/bin/license/CC-BY-4.0.html) | [Markdown](https://netwk.pro/bin/license/CC-BY-4.0.md) | [Text](https://netwk.pro/bin/license/CC-BY-4.0.txt) | [RDFa](https://netwk.pro/bin/license/CC-BY-4.0-rdfa.xml) | [XMP](https://netwk.pro/bin/license/CC-BY-4.0.xml)</sup>
|
|
117
117
|
|
|
118
118
|
Network Pro™ (the "Licensed Material") is licensed under **Creative
|
|
119
119
|
Commons Attribution 4.0 International** (CC BY 4.0)
|
|
@@ -139,7 +139,7 @@ Permissions beyond the scope of this License—or instead of those permitted by
|
|
|
139
139
|
|
|
140
140
|
## 8. GNU General Public License (GPL)
|
|
141
141
|
|
|
142
|
-
<sup>
|
|
142
|
+
<sup>View / Download: [HTML](https://netwk.pro/bin/license/COPYING.html) | [Markdown](https://netwk.pro/bin/license/COPYING.md) | [Text](https://netwk.pro/bin/license/COPYING.txt) | [RDFa](https://netwk.pro/bin/license/COPYING-rdfa.xml) | [ODT](https://netwk.pro/bin/license/COPYING.odt)</sup>
|
|
143
143
|
|
|
144
144
|
Network Pro™ is free software: you can redistribute it and/or modify it under the terms of the **GNU General Public License** (GNU GPL) as published by the [Free Software Foundation](https://www.fsf.org/), either version 3 of the License, or (at your option) any later version.
|
|
145
145
|
|
package/README.md
CHANGED
|
@@ -309,18 +309,30 @@ https://netwk.pro/?debug=true
|
|
|
309
309
|
|
|
310
310
|
## 📣 CSP Report Handler
|
|
311
311
|
|
|
312
|
-
|
|
312
|
+
This project integrates with a dedicated CSP reporting endpoint, implemented as a [Netlify Edge Function](https://docs.netlify.com/edge-functions/overview/) and hosted separately at:
|
|
313
313
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
```
|
|
314
|
+
- <https://csp.netwk.pro/.netlify/functions/csp-report>
|
|
315
|
+
- Source: [netwk-pro/csp-endpoint](https://github.com/netwk-pro/csp-endpoint)
|
|
317
316
|
|
|
318
|
-
|
|
317
|
+
The endpoint receives Content Security Policy (CSP) violation reports and logs details for inspection. High-risk violations (e.g., `script-src`, `form-action`) also trigger real-time alerts via [`ntfy`](https://ntfy.sh/). You can extend this further by integrating with SIEM platforms, logging tools, or notification systems.
|
|
319
318
|
|
|
320
|
-
|
|
319
|
+
### Usage
|
|
321
320
|
|
|
322
|
-
|
|
323
|
-
|
|
321
|
+
To enable reporting, make sure your CSP headers include both the legacy `report-uri` and the modern `report-to` directives.
|
|
322
|
+
This project’s `hooks.server.js` already configures both, along with the required `Report-To` header:
|
|
323
|
+
|
|
324
|
+
```http
|
|
325
|
+
# Example response headers
|
|
326
|
+
Content-Security-Policy: ...; report-uri https://csp.netwk.pro/.netlify/functions/csp-report; report-to csp-endpoint;
|
|
327
|
+
|
|
328
|
+
Report-To: {
|
|
329
|
+
"group": "csp-endpoint",
|
|
330
|
+
"max_age": 10886400,
|
|
331
|
+
"endpoints": [
|
|
332
|
+
{ "url": "https://csp.netwk.pro/.netlify/functions/csp-report" }
|
|
333
|
+
],
|
|
334
|
+
"include_subdomains": true
|
|
335
|
+
}
|
|
324
336
|
```
|
|
325
337
|
|
|
326
338
|
</section>
|
|
@@ -494,7 +506,7 @@ _Designed for professionals. Hardened for privacy. Built with intent._
|
|
|
494
506
|
Copyright © 2025
|
|
495
507
|
**[Network Pro Strategies](https://netwk.pro) (Network Pro™)**
|
|
496
508
|
|
|
497
|
-
Network Pro™, the shield logo, and the "Locking Down Networks
|
|
509
|
+
Network Pro™, the shield logo, and the "Locking Down Networks...™" slogan are [trademarks](https://netwk.pro/license#trademark) of Network Pro Strategies.
|
|
498
510
|
|
|
499
511
|
Licensed under **[CC BY 4.0](https://netwk.pro/license#cc-by)** and the **[GNU GPL](https://netwk.pro/license#gnu-gpl)**, as published by the [Free Software Foundation](https://www.fsf.org), either version 3 of the License, or (at your option) any later version.
|
|
500
512
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@networkpro/web",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.17.0",
|
|
5
5
|
"description": "Locking Down Networks, Unlocking Confidence™ | Security, Networking, Privacy — Network Pro Strategies",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"advisory",
|
|
@@ -78,47 +78,46 @@
|
|
|
78
78
|
"postinstall": "npm run check:node"
|
|
79
79
|
},
|
|
80
80
|
"dependencies": {
|
|
81
|
-
"dompurify": "^3.2.
|
|
82
|
-
"posthog-js": "^1.
|
|
81
|
+
"dompurify": "^3.2.7",
|
|
82
|
+
"posthog-js": "^1.266.0",
|
|
83
83
|
"semver": "^7.7.2",
|
|
84
|
-
"svelte": "5.
|
|
84
|
+
"svelte": "5.39.1"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
|
-
"@eslint/compat": "^1.3.
|
|
88
|
-
"@eslint/js": "^9.
|
|
87
|
+
"@eslint/compat": "^1.3.2",
|
|
88
|
+
"@eslint/js": "^9.35.0",
|
|
89
89
|
"@lhci/cli": "^0.15.1",
|
|
90
|
-
"@playwright/test": "^1.
|
|
91
|
-
"@sveltejs/adapter-netlify": "^5.
|
|
92
|
-
"@sveltejs/kit": "2.
|
|
93
|
-
"@sveltejs/vite-plugin-svelte": "^6.
|
|
94
|
-
"@testing-library/jest-dom": "^6.
|
|
90
|
+
"@playwright/test": "^1.55.0",
|
|
91
|
+
"@sveltejs/adapter-netlify": "^5.2.3",
|
|
92
|
+
"@sveltejs/kit": "2.42.1",
|
|
93
|
+
"@sveltejs/vite-plugin-svelte": "^6.2.0",
|
|
94
|
+
"@testing-library/jest-dom": "^6.8.0",
|
|
95
95
|
"@testing-library/svelte": "^5.2.8",
|
|
96
96
|
"@vitest/coverage-v8": "^3.2.4",
|
|
97
97
|
"autoprefixer": "^10.4.21",
|
|
98
|
-
"browserslist": "^4.
|
|
99
|
-
"eslint": "^9.
|
|
98
|
+
"browserslist": "^4.26.2",
|
|
99
|
+
"eslint": "^9.35.0",
|
|
100
100
|
"eslint-config-prettier": "^10.1.8",
|
|
101
|
-
"eslint-plugin-jsdoc": "^
|
|
102
|
-
"eslint-plugin-svelte": "^3.
|
|
103
|
-
"globals": "^16.
|
|
104
|
-
"jsdom": "
|
|
101
|
+
"eslint-plugin-jsdoc": "^58.1.1",
|
|
102
|
+
"eslint-plugin-svelte": "^3.12.3",
|
|
103
|
+
"globals": "^16.4.0",
|
|
104
|
+
"jsdom": "26.1.0",
|
|
105
105
|
"lightningcss": "^1.30.1",
|
|
106
106
|
"markdownlint": "^0.38.0",
|
|
107
107
|
"markdownlint-cli2": "^0.18.1",
|
|
108
|
-
"
|
|
109
|
-
"playwright": "^1.54.1",
|
|
108
|
+
"playwright": "^1.55.0",
|
|
110
109
|
"postcss": "^8.5.6",
|
|
111
110
|
"prettier": "^3.6.2",
|
|
112
111
|
"prettier-plugin-svelte": "^3.4.0",
|
|
113
|
-
"stylelint": "^16.
|
|
112
|
+
"stylelint": "^16.24.0",
|
|
114
113
|
"stylelint-config-html": "^1.1.0",
|
|
115
114
|
"stylelint-config-recommended": "^17.0.0",
|
|
116
115
|
"stylelint-order": "^7.0.0",
|
|
117
|
-
"svelte-check": "^4.3.
|
|
118
|
-
"svelte-eslint-parser": "^1.3.
|
|
116
|
+
"svelte-check": "^4.3.1",
|
|
117
|
+
"svelte-eslint-parser": "^1.3.2",
|
|
119
118
|
"svelte-preprocess": "^6.0.3",
|
|
120
119
|
"typescript": "^5.9.2",
|
|
121
|
-
"vite": "^7.
|
|
120
|
+
"vite": "^7.1.5",
|
|
122
121
|
"vite-plugin-lightningcss": "^0.0.5",
|
|
123
122
|
"vite-tsconfig-paths": "^5.1.4",
|
|
124
123
|
"vitest": "^3.2.4"
|
package/playwright.config.js
CHANGED
|
@@ -33,7 +33,7 @@ export default defineConfig({
|
|
|
33
33
|
|
|
34
34
|
/* Shared settings for all projects */
|
|
35
35
|
use: {
|
|
36
|
-
baseURL: 'http://localhost:4173
|
|
36
|
+
baseURL: 'http://localhost:4173', // Update to use preview server URL
|
|
37
37
|
trace: 'on-first-retry',
|
|
38
38
|
timeout: 60000, // Default action timeout of 60 seconds for each step
|
|
39
39
|
navigationTimeout: 60000, // Timeout for navigation operations
|
|
@@ -83,7 +83,7 @@ export default defineConfig({
|
|
|
83
83
|
/* Run your local preview server before starting the tests */
|
|
84
84
|
webServer: {
|
|
85
85
|
command: 'npm run preview', // Use preview server
|
|
86
|
-
url: 'http://localhost:4173
|
|
86
|
+
url: 'http://localhost:4173', // Match the preview server URL
|
|
87
87
|
reuseExistingServer: !process.env.CI,
|
|
88
88
|
timeout: 60 * 1000, // wait up to 60 seconds for preview to be ready
|
|
89
89
|
},
|
package/src/app.html
CHANGED
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
content="bx4ham0zkpvzztzu213bhpt76m9siq" />
|
|
64
64
|
<!-- cspell:enable -->
|
|
65
65
|
|
|
66
|
-
<meta name="generator" content="SvelteKit 2.
|
|
66
|
+
<meta name="generator" content="SvelteKit 2.42.1" />
|
|
67
67
|
|
|
68
68
|
<script src="/disableSw.js"></script>
|
|
69
69
|
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
<body>
|
|
73
73
|
<div id="svelte">%sveltekit.body%</div>
|
|
74
74
|
|
|
75
|
-
<!-- LinkedIn Insight Tag removed 2025-05-26
|
|
75
|
+
<!-- LinkedIn Insight Tag removed 2025-05-26 -->
|
|
76
76
|
|
|
77
77
|
<!-- cspell:ignore preconnects webfonts lintrk -->
|
|
78
78
|
</body>
|
package/tests/e2e/app.spec.js
CHANGED
|
@@ -11,7 +11,7 @@ This file is part of Network Pro.
|
|
|
11
11
|
* @description Runs Playwright E2E tests with desktop and root route assertions.
|
|
12
12
|
* @module tests/e2e
|
|
13
13
|
* @author SunDevil311
|
|
14
|
-
* @updated 2025-
|
|
14
|
+
* @updated 2025-09-17
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { expect, test } from '@playwright/test';
|
|
@@ -22,26 +22,14 @@ import {
|
|
|
22
22
|
setMobileView,
|
|
23
23
|
} from './shared/helpers.js';
|
|
24
24
|
|
|
25
|
-
// Root route should
|
|
25
|
+
// Root route should display nav bar and about link
|
|
26
26
|
test.describe('Desktop Tests', () => {
|
|
27
|
-
test('should load successfully with the correct title', async ({
|
|
28
|
-
page,
|
|
29
|
-
browserName,
|
|
30
|
-
}) => {
|
|
31
|
-
if (browserName === 'webkit') test.skip();
|
|
32
|
-
|
|
33
|
-
await setDesktopView(page);
|
|
34
|
-
await page.goto('/');
|
|
35
|
-
await page.waitForLoadState('load', { timeout: 60000 });
|
|
36
|
-
await expect(page).toHaveTitle(/Security, Networking, Privacy/);
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
// Root route should display nav bar and about link
|
|
40
27
|
test("should display the navigation bar and 'about' link", async ({
|
|
41
28
|
page,
|
|
42
29
|
}) => {
|
|
43
30
|
await setDesktopView(page);
|
|
44
31
|
await page.goto('/');
|
|
32
|
+
await page.waitForLoadState('domcontentloaded', { timeout: 60000 });
|
|
45
33
|
|
|
46
34
|
const nav = await getVisibleNav(page);
|
|
47
35
|
|
|
@@ -54,8 +42,9 @@ test.describe('Desktop Tests', () => {
|
|
|
54
42
|
test('should display the footer correctly', async ({ page }) => {
|
|
55
43
|
await setDesktopView(page);
|
|
56
44
|
await page.goto('/');
|
|
45
|
+
await page.waitForLoadState('domcontentloaded', { timeout: 60000 });
|
|
57
46
|
|
|
58
|
-
const footer = page
|
|
47
|
+
const footer = getFooter(page);
|
|
59
48
|
await expect(footer).toBeVisible();
|
|
60
49
|
});
|
|
61
50
|
|
|
@@ -65,6 +54,7 @@ test.describe('Desktop Tests', () => {
|
|
|
65
54
|
}) => {
|
|
66
55
|
await setDesktopView(page);
|
|
67
56
|
await page.goto('/about');
|
|
57
|
+
await page.waitForLoadState('domcontentloaded', { timeout: 60000 });
|
|
68
58
|
|
|
69
59
|
const footer = getFooter(page);
|
|
70
60
|
await expect(footer).toBeVisible();
|
|
@@ -74,11 +64,12 @@ test.describe('Desktop Tests', () => {
|
|
|
74
64
|
test("should ensure the 'about' link is clickable", async ({ page }) => {
|
|
75
65
|
await setDesktopView(page);
|
|
76
66
|
await page.goto('/');
|
|
67
|
+
await page.waitForLoadState('domcontentloaded', { timeout: 60000 });
|
|
77
68
|
|
|
78
69
|
const nav = await getVisibleNav(page);
|
|
79
70
|
|
|
80
71
|
const aboutLink = nav.getByRole('link', { name: 'about' });
|
|
81
|
-
await expect(aboutLink).toBeVisible(
|
|
72
|
+
await expect(aboutLink).toBeVisible();
|
|
82
73
|
await aboutLink.click();
|
|
83
74
|
|
|
84
75
|
await page.waitForURL('/about', { timeout: 60000 });
|
|
@@ -86,26 +77,16 @@ test.describe('Desktop Tests', () => {
|
|
|
86
77
|
});
|
|
87
78
|
}); // End Desktop Tests
|
|
88
79
|
|
|
89
|
-
// Root route should
|
|
80
|
+
// Root route should display headings properly on mobile
|
|
90
81
|
test.describe('Mobile Tests', () => {
|
|
91
|
-
test('should load successfully with the correct title on mobile', async ({
|
|
92
|
-
page,
|
|
93
|
-
browserName,
|
|
94
|
-
}) => {
|
|
95
|
-
if (browserName === 'webkit') test.skip();
|
|
96
|
-
|
|
97
|
-
await setMobileView(page);
|
|
98
|
-
await page.goto('/');
|
|
99
|
-
await page.waitForLoadState('load', { timeout: 60000 });
|
|
100
|
-
await expect(page).toHaveTitle(/Security, Networking, Privacy/);
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
// Root route should display headings properly on mobile
|
|
104
82
|
test('should display main content correctly on mobile', async ({ page }) => {
|
|
105
83
|
await setMobileView(page);
|
|
106
84
|
await page.goto('/');
|
|
85
|
+
await page.waitForLoadState('domcontentloaded', { timeout: 60000 });
|
|
107
86
|
|
|
108
87
|
const mainHeading = page.locator('h1, h2');
|
|
109
88
|
await expect(mainHeading).toBeVisible();
|
|
110
89
|
});
|
|
111
90
|
});
|
|
91
|
+
|
|
92
|
+
// cspell:ignore domcontentloaded
|
package/tests/e2e/mobile.spec.js
CHANGED
|
@@ -11,7 +11,7 @@ This file is part of Network Pro.
|
|
|
11
11
|
* @description Runs Playwright E2E tests with mobile assertions.
|
|
12
12
|
* @module tests/e2e
|
|
13
13
|
* @author SunDevil311
|
|
14
|
-
* @updated 2025-
|
|
14
|
+
* @updated 2025-09-17
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { expect, test } from '@playwright/test';
|
|
@@ -60,10 +60,10 @@ test.describe('Mobile Tests', () => {
|
|
|
60
60
|
|
|
61
61
|
const nav = await getVisibleNav(page);
|
|
62
62
|
const aboutLink = nav.getByRole('link', { name: 'about' });
|
|
63
|
-
await expect(aboutLink).toBeVisible(
|
|
63
|
+
await expect(aboutLink).toBeVisible();
|
|
64
64
|
|
|
65
65
|
await aboutLink.click();
|
|
66
|
-
await expect(page).toHaveURL(/\/about
|
|
66
|
+
await expect(page).toHaveURL(/\/about/, { timeout: 60000 });
|
|
67
67
|
});
|
|
68
68
|
|
|
69
69
|
test('should display the footer on /about (mobile)', async ({
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
tests/meta/meta.test.js
|
|
3
|
+
|
|
4
|
+
Copyright © 2025 Network Pro Strategies (Network Pro™)
|
|
5
|
+
SPDX-License-Identifier: CC-BY-4.0 OR GPL-3.0-or-later
|
|
6
|
+
This file is part of Network Pro.
|
|
7
|
+
========================================================================== */
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @file meta.test.js
|
|
11
|
+
* @description Checks for correct metadata population in CI
|
|
12
|
+
* @module tests/meta
|
|
13
|
+
* @author SunDevil311
|
|
14
|
+
* @updated 2025-09-17
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { describe, expect, it } from 'vitest';
|
|
18
|
+
import { load } from '../../src/routes/+layout.js';
|
|
19
|
+
|
|
20
|
+
const routes = [
|
|
21
|
+
{
|
|
22
|
+
path: '/',
|
|
23
|
+
title: /Security, Networking, Privacy/,
|
|
24
|
+
description: /Network Pro/,
|
|
25
|
+
},
|
|
26
|
+
// add more paths as needed:
|
|
27
|
+
// { path: '/about', title: /About/, description: /Network Pro/ }
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
describe('Meta checks', () => {
|
|
31
|
+
for (const route of routes) {
|
|
32
|
+
it(`should return correct meta for ${route.path}`, () => {
|
|
33
|
+
const mockUrl = new URL(`http://localhost${route.path}`);
|
|
34
|
+
const { meta } = load({ url: mockUrl });
|
|
35
|
+
|
|
36
|
+
expect(meta.title).toMatch(route.title);
|
|
37
|
+
expect(meta.description).toMatch(route.description);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
});
|
|
@@ -10,9 +10,9 @@ This file is part of Network Pro.
|
|
|
10
10
|
* @file auditCoverage.test.js
|
|
11
11
|
* @description Scans all .js files in src/ and scripts/ for matching unit
|
|
12
12
|
* tests
|
|
13
|
-
* @module tests/internal
|
|
13
|
+
* @module tests/unit/server/internal
|
|
14
14
|
* @author SunDevil311
|
|
15
|
-
* @updated 2025-
|
|
15
|
+
* @updated 2025-09-17
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
import fs from 'fs';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
tests/unit/server/meta.test.js
|
|
3
|
+
|
|
4
|
+
Copyright © 2025 Network Pro Strategies (Network Pro™)
|
|
5
|
+
SPDX-License-Identifier: CC-BY-4.0 OR GPL-3.0-or-later
|
|
6
|
+
This file is part of Network Pro.
|
|
7
|
+
========================================================================== */
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @file meta.test.js
|
|
11
|
+
* @description Checks for correct metadata population
|
|
12
|
+
* @module tests/unit/server
|
|
13
|
+
* @author SunDevil311
|
|
14
|
+
* @updated 2025-09-17
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { describe, expect, it } from 'vitest';
|
|
18
|
+
import { load } from '../../../src/routes/+layout.js';
|
|
19
|
+
|
|
20
|
+
describe('Meta info', () => {
|
|
21
|
+
it('should have correct title and description', () => {
|
|
22
|
+
// Mock a URL similar to what SvelteKit provides
|
|
23
|
+
const mockUrl = new URL('http://localhost/');
|
|
24
|
+
|
|
25
|
+
const { meta } = load({ url: mockUrl });
|
|
26
|
+
|
|
27
|
+
expect(meta.title).toMatch(/Security, Networking, Privacy/);
|
|
28
|
+
expect(meta.description).toMatch(/Network Pro/);
|
|
29
|
+
});
|
|
30
|
+
});
|