@networkpro/web 1.5.1 → 1.5.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.
- package/CODE_OF_CONDUCT.md +1 -0
- package/LICENSE.md +2 -39
- package/README.md +259 -35
- package/cspell.json +56 -0
- package/eslint.config.mjs +2 -1
- package/package.json +45 -52
- package/playwright.config.js +1 -0
- package/postcss.config.mjs +1 -0
- package/scripts/auditScripts.js +1 -0
- package/scripts/bundleCss.js +1 -0
- package/scripts/checkEnv.js +1 -0
- package/scripts/checkNode.js +39 -18
- package/scripts/checkVersions.js +1 -0
- package/scripts/flattenHeaders.js +1 -0
- package/scripts/validateHeaders.js +1 -0
- package/src/app.d.ts +8 -0
- package/src/app.html +1 -10
- package/src/global.d.ts +1 -0
- package/src/hooks.client.ts +1 -0
- package/src/lib/components/Badges.svelte +1 -0
- package/src/lib/components/ContainerSection.svelte +1 -0
- package/src/lib/components/FullWidthSection.svelte +15 -1
- package/src/lib/components/LegalNav.svelte +1 -0
- package/src/lib/components/Logo.svelte +1 -0
- package/src/lib/components/MetaTags.svelte +1 -0
- package/src/lib/components/PWAInstallButton.svelte +1 -0
- package/src/lib/components/RedirectPage.svelte +20 -12
- package/src/lib/components/SocialMedia.svelte +1 -0
- package/src/lib/components/foss/FossFeatures.svelte +1 -0
- package/src/lib/components/foss/FossItemContent.svelte +1 -0
- package/src/lib/components/layout/Footer.svelte +3 -0
- package/src/lib/components/layout/HeaderDefault.svelte +1 -0
- package/src/lib/components/layout/HeaderHome.svelte +1 -0
- package/src/lib/images.js +4 -1
- package/src/lib/img/logo-web.png +0 -0
- package/src/lib/img/logo-web.webp +0 -0
- package/src/lib/index.js +1 -0
- package/src/lib/meta.js +1 -0
- package/src/lib/pages/AboutContent.svelte +1 -0
- package/src/lib/pages/FossContent.svelte +1 -0
- package/src/lib/pages/HomeContent.svelte +1 -0
- package/src/lib/pages/LicenseContent.svelte +33 -3
- package/src/lib/pages/PrivacyContent.svelte +33 -12
- package/src/lib/pages/TermsConditionsContent.svelte +3 -0
- package/src/lib/pages/TermsUseContent.svelte +3 -0
- package/src/lib/registerServiceWorker.js +26 -14
- package/src/lib/styles/css/default.css +1 -0
- package/src/lib/styles/css/global.css +1 -0
- package/src/lib/styles/css/normalize.css +1 -0
- package/src/lib/styles/css/offline.css +1 -0
- package/src/lib/styles/css/style.css +1 -0
- package/src/lib/styles/fa-global.css +1 -0
- package/src/lib/styles/global.min.css +1 -0
- package/src/lib/styles/index.js +2 -1
- package/src/lib/types/metadata.js +1 -0
- package/src/lib/unregisterServiceWorker.js +1 -0
- package/src/lib/utils/utm.js +1 -0
- package/src/routes/+error.svelte +1 -0
- package/src/routes/+layout.js +1 -8
- package/src/routes/+layout.svelte +7 -0
- package/src/routes/+page.server.js +1 -0
- package/src/routes/+page.svelte +1 -0
- package/src/routes/about/+page.server.js +1 -0
- package/src/routes/about/+page.svelte +1 -0
- package/src/routes/consultation/+page.svelte +1 -0
- package/src/routes/contact/+page.svelte +1 -0
- package/src/routes/foss-spotlight/+page.server.js +1 -0
- package/src/routes/foss-spotlight/+page.svelte +1 -0
- package/src/routes/license/+page.server.js +1 -0
- package/src/routes/license/+page.svelte +1 -0
- package/src/routes/privacy-policy/+page.server.js +1 -0
- package/src/routes/privacy-policy/+page.svelte +1 -0
- package/src/routes/privacy-rights/+page.svelte +1 -0
- package/src/routes/terms-conditions/+page.server.js +1 -0
- package/src/routes/terms-conditions/+page.svelte +1 -0
- package/src/routes/terms-of-use/+page.server.js +1 -0
- package/src/routes/terms-of-use/+page.svelte +1 -0
- package/src/service-worker.d.ts +8 -0
- package/src/service-worker.js +51 -32
- package/static/docs/Home.md +63 -0
- package/static/docs/extensions.md +58 -0
- package/static/sitemap.xml +7 -7
- package/stylelint.config.js +2 -1
- package/svelte.config.js +1 -0
- package/tests/e2e/app.spec.js +1 -0
- package/tests/e2e/mobile.spec.js +1 -0
- package/tests/unit/auditScripts.test.js +1 -0
- package/tests/unit/checkEnv.test.js +1 -0
- package/tests/unit/checkVersions.test.js +1 -0
- package/tests/unit/demo.test.js +1 -0
- package/tests/unit/routes/page.svelte.test.js +1 -0
- package/tests/unit/unregisterServiceWorker.test.js +1 -0
- package/tests/unit/utm.test.js +1 -0
- package/{tsconfig.custom.json → tsconfig.custom.jsonc} +2 -1
- package/vite.config.js +1 -0
- package/vitest.config.client.js +1 -0
- package/vitest.config.server.js +1 -0
package/CODE_OF_CONDUCT.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<!-- =========================================================================
|
|
2
2
|
CODE_OF_CONDUCT.md
|
|
3
3
|
|
|
4
|
+
Copyright © 2025 Network Pro Strategies (Network Pro™)
|
|
4
5
|
SPDX-License-Identifier: CC-BY-4.0 OR GPL-3.0-or-later
|
|
5
6
|
This file is part of Network Pro.
|
|
6
7
|
========================================================================== -->
|
package/LICENSE.md
CHANGED
|
@@ -1,47 +1,10 @@
|
|
|
1
1
|
<!-- =========================================================================
|
|
2
2
|
LICENSE.md
|
|
3
3
|
|
|
4
|
+
Copyright © 2025 Network Pro Strategies (Network Pro™)
|
|
4
5
|
SPDX-License-Identifier: CC-BY-4.0 OR GPL-3.0-or-later
|
|
5
6
|
This file is part of Network Pro.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
<!--
|
|
9
|
-
Copyright © 2025 Network Pro Strategies (Network Pro)
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
I. Creative Commons Attribution 4.0 International
|
|
14
|
-
|
|
15
|
-
Network Pro (the "Licensed Material") is licensed under Creative Commons Attribution 4.0 International ("CC BY 4.0"). To view a copy of this license, visit https://creativecommons.org/licenses/by/4.0/.
|
|
16
|
-
|
|
17
|
-
Per the terms of the License, you are free to distribute, remix, adapt, and build upon the Licensed Material for any purpose, even commercially. You must give appropriate credit, provide a link to the License, and indicate if changes were made.
|
|
18
|
-
|
|
19
|
-
The Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable.
|
|
20
|
-
|
|
21
|
-
Permissions beyond the scope of this License—or instead of those permitted by this License—may be available as further defined within this document.
|
|
22
|
-
|
|
23
|
-
SPDX Reference: https://spdx.org/licenses/CC-BY-4.0.html
|
|
24
|
-
Canonical URL: https://creativecommons.org/licenses/by/4.0/
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
II. GNU General Public License
|
|
29
|
-
|
|
30
|
-
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, either version 3 of the License, or (at your option) any later version.
|
|
31
|
-
|
|
32
|
-
This material is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
33
|
-
|
|
34
|
-
See the GNU General Public License for more details.
|
|
35
|
-
|
|
36
|
-
SPDX Reference: https://spdx.org/licenses/GPL-3.0-or-later.html
|
|
37
|
-
Canonical URL: https://www.gnu.org/licenses/gpl-3.0.html
|
|
38
|
-
|
|
39
|
-
---
|
|
40
|
-
|
|
41
|
-
Author: Scott Lopez
|
|
42
|
-
Email: <contact@neteng.pro>
|
|
43
|
-
Web: <https://bio.neteng.pro>
|
|
44
|
-
-->
|
|
7
|
+
====================================================================== -->
|
|
45
8
|
|
|
46
9
|
[SPDX-License-Identifier](https://spdx.dev/learn/handling-license-info/):
|
|
47
10
|
`CC-BY-4.0 OR GPL-3.0-or-later`
|
package/README.md
CHANGED
|
@@ -1,35 +1,53 @@
|
|
|
1
|
-
|
|
1
|
+
<!-- =====================================================================
|
|
2
|
+
README.md
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
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
|
+
# 🌐 Network Pro™ — Web Presence
|
|
10
|
+
|
|
11
|
+
> **Locking Down Networks, Unlocking Confidence™**
|
|
12
|
+
> _Security, Networking, Privacy — Network Pro™_
|
|
5
13
|
|
|
6
14
|
|
|
7
15
|
|
|
16
|
+
[](https://app.netlify.com/projects/networkpro-web/deploys) [](https://www.npmjs.com/package/@networkpro/web) [](https://github.com/netwk-pro/netwk-pro.github.io/actions/workflows/build-and-publish.yml)
|
|
17
|
+
[](https://github.com/prettier/prettier) [](https://stylelint.io/)
|
|
18
|
+
[](https://github.com/netwk-pro/netwk-pro.github.io/blob/master/CODE_OF_CONDUCT.md)
|
|
19
|
+
|
|
8
20
|
## 🚀 Project Overview
|
|
9
21
|
|
|
10
|
-
This
|
|
22
|
+
This GitHub repository powers the official web presence of **[Network Pro Strategies](https://netwk.pro/about)** — a privacy-first consultancy specializing in cybersecurity, network engineering, and information security. We also lead public advocacy efforts promoting digital privacy and responsible cyber policy.
|
|
11
23
|
|
|
12
24
|
Built with [SvelteKit](https://kit.svelte.dev/) and deployed via [Netlify](https://www.netlify.com/).
|
|
13
|
-
Blog and documentation subsites built with [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/) and deployed via [GitHub Pages](https://pages.github.com/).
|
|
25
|
+
[Blog](https://github.com/netwk-pro/blog) and [documentation](https://github.com/netwk-pro/docs) subsites built with [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/) and deployed via [GitHub Pages](https://pages.github.com/).
|
|
26
|
+
|
|
14
27
|
All infrastructure and data flows are designed with **maximum transparency, self-hosting, and user privacy** in mind.
|
|
15
28
|
|
|
16
29
|
### 📁 Repository Structure
|
|
17
30
|
|
|
18
31
|
```bash
|
|
19
32
|
.
|
|
33
|
+
├── .github/workflows # CI workflows and automation
|
|
34
|
+
├── .vscode/ # Recommended VS Code settings, extensions
|
|
35
|
+
├── scripts/ # Utility scripts
|
|
20
36
|
├── src/
|
|
21
|
-
│ ├── lib/
|
|
22
|
-
│ ├── routes/
|
|
23
|
-
│ ├── hooks.client.ts
|
|
24
|
-
│
|
|
25
|
-
|
|
26
|
-
├──
|
|
27
|
-
├──
|
|
28
|
-
├──
|
|
37
|
+
│ ├── lib/ # Reusable components, styles, utilities
|
|
38
|
+
│ ├── routes/ # SvelteKit routes (+page.svelte, +page.server.js)
|
|
39
|
+
│ ├── hooks.client.ts # Client-only lifecycle hooks (e.g., SW control)
|
|
40
|
+
│ ├── app.html # SvelteKit entry HTML with CSP/meta/bootentry
|
|
41
|
+
│ └── service-worker.js # Custom Service Worker
|
|
42
|
+
├── static/ # Static assets served at root
|
|
43
|
+
├── tests/
|
|
44
|
+
│ ├── e2e/ # End-to-end Playwright tests
|
|
45
|
+
│ └── unit/ # Vite unit tests
|
|
46
|
+
├── netlify.toml # Netlify configuration
|
|
29
47
|
└── ...
|
|
30
48
|
```
|
|
31
49
|
|
|
32
|
-
|
|
50
|
+
---
|
|
33
51
|
|
|
34
52
|
## 🛠 Getting Started
|
|
35
53
|
|
|
@@ -48,31 +66,237 @@ Edit .env to configure your environment mode:
|
|
|
48
66
|
ENV_MODE=dev # Options: dev, test, ci, preview, prod
|
|
49
67
|
```
|
|
50
68
|
|
|
51
|
-
>
|
|
52
|
-
> Use
|
|
69
|
+
> `ENV_MODE` is used for tooling and workflows — not by SvelteKit itself.
|
|
70
|
+
> Use `VITE_`-prefixed env variables for runtime values.
|
|
53
71
|
|
|
54
72
|
|
|
55
73
|
|
|
56
|
-
###
|
|
74
|
+
### 🧰 Local Setup Scripts
|
|
75
|
+
|
|
76
|
+
To streamline onboarding and enforce project conventions, you may use the optional helper scripts:
|
|
57
77
|
|
|
58
|
-
|
|
78
|
+
| File/Script | Description |
|
|
79
|
+
| ---------------------------------- | --------------------------------------------------------------------------------- |
|
|
80
|
+
| `.env.template` | Template for local environment variables |
|
|
81
|
+
| `scripts/checkNode.js` | Validates your Node.js and npm versions |
|
|
82
|
+
| `scripts/bootstrap.local.sh` (TBD) | Interactive setup for local configuration and tooling |
|
|
83
|
+
| `.vscode/` | Editor recommendations compatible with [VSCodium](https://vscodium.com) / VS Code |
|
|
59
84
|
|
|
60
|
-
|
|
61
|
-
- asdf
|
|
62
|
-
- Volta
|
|
63
|
-
- GitHub Actions
|
|
85
|
+
To get started quickly:
|
|
64
86
|
|
|
65
87
|
```bash
|
|
66
|
-
|
|
67
|
-
npm
|
|
88
|
+
cp .env.template .env
|
|
89
|
+
npm install
|
|
68
90
|
```
|
|
69
91
|
|
|
92
|
+
> You can also use `bootstrap.local.sh` to automate the steps above and more (optional).
|
|
93
|
+
> `ENV_MODE` controls local tooling behavior — it is not used by the app runtime directly.
|
|
94
|
+
|
|
70
95
|
|
|
71
96
|
|
|
72
|
-
|
|
97
|
+
### 💾 Version Enforcement
|
|
98
|
+
|
|
99
|
+
To ensure consistent environments across contributors and CI systems, this project enforces specific Node.js and npm versions via the `"engines"` field in `package.json`:
|
|
100
|
+
|
|
101
|
+
```json
|
|
102
|
+
"engines": {
|
|
103
|
+
"node": ">=22.0.0 <25",
|
|
104
|
+
"npm": ">=11.0.0 <12"
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Version compliance is **softly enforced** after installation via a postinstall lifecycle hook:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
npm run check:node
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
This script runs `scripts/checkNode.js`, which compares your current Node.js and npm versions against the required ranges. During the install phase, it will log **warnings** for out-of-range versions but allow installation to continue. In all other contexts (manual runs, CI workflows, etc.), it will **fail** with a descriptive error if the versions are out of spec.
|
|
115
|
+
|
|
116
|
+
**_Node Version Check (snippet from `scripts/checkNode.js`)_**
|
|
117
|
+
|
|
118
|
+
```javascript
|
|
119
|
+
const semver = require("semver");
|
|
120
|
+
const { engines } = require("../package.json");
|
|
121
|
+
|
|
122
|
+
const requiredNode = engines.node;
|
|
123
|
+
const requiredNpm = engines.npm;
|
|
124
|
+
const isPostInstall = process.env.npm_lifecycle_event === "postinstall";
|
|
125
|
+
|
|
126
|
+
let hasError = false;
|
|
127
|
+
|
|
128
|
+
if (!semver.satisfies(process.version, requiredNode)) {
|
|
129
|
+
const msg = `Node.js ${process.version} does not satisfy required range: ${requiredNode}`;
|
|
130
|
+
isPostInstall ? console.warn(`⚠️ ${msg}`) : console.error(`❌ ${msg}`);
|
|
131
|
+
if (!isPostInstall) hasError = true;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
const npmVersion = require("child_process")
|
|
135
|
+
.execSync("npm -v")
|
|
136
|
+
.toString()
|
|
137
|
+
.trim();
|
|
138
|
+
|
|
139
|
+
if (!semver.satisfies(npmVersion, requiredNpm)) {
|
|
140
|
+
const msg = `npm ${npmVersion} does not satisfy required range: ${requiredNpm}`;
|
|
141
|
+
isPostInstall ? console.warn(`⚠️ ${msg}`) : console.error(`❌ ${msg}`);
|
|
142
|
+
if (!isPostInstall) hasError = true;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
if (!hasError) {
|
|
146
|
+
console.log("✅ Node and npm versions are valid.");
|
|
147
|
+
} else {
|
|
148
|
+
process.exit(1);
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
For full compatibility, `.nvmrc` and `.node-version` files are provided to work seamlessly with version managers like nvm, asdf, and Volta. This ensures consistent environments across local development, CI pipelines, and deployment targets.
|
|
153
|
+
|
|
154
|
+
To manually verify your environment:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
node -v # Should fall within engines.node
|
|
158
|
+
npm -v # Should fall within engines.npm
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
### 🧪 Testing
|
|
164
|
+
|
|
165
|
+
This project uses a mix of automated performance, accessibility, and end-to-end testing tools to maintain quality across environments and deployments.
|
|
166
|
+
|
|
167
|
+
| Tool | Purpose | Usage Context |
|
|
168
|
+
| ------------------------------------------------------------ | ---------------------------------------------------- | ------------------- |
|
|
169
|
+
| [`@playwright/test`](https://playwright.dev/docs/test-intro) | End-to-end testing framework with browser automation | Local + CI |
|
|
170
|
+
| [`@lhci/cli`](https://github.com/GoogleChrome/lighthouse-ci) | Lighthouse CI — automated performance audits | CI (optional local) |
|
|
171
|
+
| [`lighthouse`](https://github.com/GoogleChrome/lighthouse) | Manual/scripted Lighthouse runs via CLI | Local (global) |
|
|
172
|
+
|
|
173
|
+
> **Note:** `lighthouse` is intended to be installed globally (`npm i -g lighthouse)` or run via the `lighthouse` npm script, which uses the locally installed binary if available. You can also run Lighthouse through Chrome DevTools manually if preferred.
|
|
174
|
+
|
|
175
|
+
<!-- markdownlint-disable MD028 -->
|
|
176
|
+
|
|
177
|
+
> CI uses Chrome for Lighthouse audits. For local experimentation, you may run Lighthouse manually using [Brave](https://brave.com), which can reveal differences related to privacy features or tracking protection.
|
|
178
|
+
|
|
179
|
+
<!-- markdownlint-enable MD028 -->
|
|
73
180
|
|
|
74
181
|
|
|
75
182
|
|
|
183
|
+
#### Configuration Files
|
|
184
|
+
|
|
185
|
+
| File | Description | Usage Context |
|
|
186
|
+
| ---------------------- | ------------------------------------------------------------------------ | ------------- |
|
|
187
|
+
| `playwright.config.js` | Configures Playwright test environment (browsers, timeouts, base URL) | Local + CI |
|
|
188
|
+
| `.lighthouserc.cjs` | Lighthouse CI config for defining audit targets, budgets, and assertions | CI |
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
#### Running Tests
|
|
193
|
+
|
|
194
|
+
Local testing via Playwright:
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
npm run test:client # Run client-side unit tests with Vitest
|
|
198
|
+
npm run test:server # Run server-side unit tests with Vitest
|
|
199
|
+
npm run test:all # Run full test suite
|
|
200
|
+
npm run test:watch # Watch mode for client tests
|
|
201
|
+
npm run test:coverage # Collect code coverage reports
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Audit your app using Lighthouse:
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
# Run Lighthouse CI (via @lhci/cli) using the current build
|
|
208
|
+
npm run lhci:run
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
Manual auditing with Lighthouse (e.g., via Brave or Chrome):
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
# Install globally (if not already installed)
|
|
215
|
+
npm install -g lighthouse
|
|
216
|
+
|
|
217
|
+
# Run Lighthouse manually against a deployed site
|
|
218
|
+
lighthouse https://netwk.pro --view
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
You can also audit locally using Chrome DevTools → Lighthouse tab for on-the-fly testing and preview reports.
|
|
222
|
+
|
|
223
|
+
> The repo uses `@lhci/cli` for CI-based audits. It is installed as a dev dependency and does not require a global install.
|
|
224
|
+
|
|
225
|
+
<!-- markdownlint-disable MD028 -->
|
|
226
|
+
|
|
227
|
+
> To trace the exact Chrome version and audit timestamp used in CI:
|
|
228
|
+
>
|
|
229
|
+
> ```bash
|
|
230
|
+
> cat .lighthouseci/chrome-version.txt
|
|
231
|
+
> ```
|
|
232
|
+
|
|
233
|
+
<!-- markdownlint-disable MD028 -->
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
### 🛠 Recommended Toolchain
|
|
238
|
+
|
|
239
|
+
To streamline development and align with project conventions, we recommend the following setup — especially for contributors without a strong existing preference.
|
|
240
|
+
|
|
241
|
+
| Tool | Description |
|
|
242
|
+
| ------------------------------------------------------------------------ | --------------------------------------------------------- |
|
|
243
|
+
| **[VSCodium](https://vscodium.com/)** | Fully open-source alternative to VS Code (telemetry-free) |
|
|
244
|
+
| **[Prettier](https://prettier.io/)** | Code formatter for JS, TS, Svelte, Markdown, etc. |
|
|
245
|
+
| **[ESLint](https://eslint.org/)** | JavaScript/TypeScript linter with Svelte support |
|
|
246
|
+
| **[Stylelint](https://stylelint.io/)** | Linting for CSS, SCSS, and inline styles in Svelte |
|
|
247
|
+
| **[markdownlint](https://github.com/DavidAnson/markdownlint)** | Markdown style checker and linter |
|
|
248
|
+
| **[markdownlint-cli2](https://github.com/DavidAnson/markdownlint-cli2)** | Config-based CLI linter for Markdown |
|
|
249
|
+
| **[EditorConfig](https://editorconfig.org/)** | Consistent line endings, spacing, and indentation |
|
|
250
|
+
| **[Volta](https://volta.sh) / [nvm](https://github.com/nvm-sh/nvm)** | Node.js version manager for consistent tooling |
|
|
251
|
+
|
|
252
|
+
> The `.vscode/` folder includes editor recommendations compatible with **VSCodium**. These are non-enforced and optional, but align with our formatter, linter, and language server configs.
|
|
253
|
+
|
|
254
|
+
Install dev tooling:
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
npm install --include=dev
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
Run all format and lint checks:
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
npm run lint:all
|
|
264
|
+
npm run format
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
To auto-fix issues:
|
|
268
|
+
|
|
269
|
+
```bash
|
|
270
|
+
npm run lint:fix
|
|
271
|
+
npm run format:fix
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
### ⚙️ Tooling Configuration
|
|
277
|
+
|
|
278
|
+
All linting, formatting, and version settings are defined in versioned project config files:
|
|
279
|
+
|
|
280
|
+
| File | Purpose |
|
|
281
|
+
| ------------------------- | ---------------------------------------------------------- |
|
|
282
|
+
| `.prettierrc` | Prettier formatting rules |
|
|
283
|
+
| `.prettierignore` | Files that should be ignored by Prettier |
|
|
284
|
+
| `eslint.config.mjs` | ESLint config with SvelteKit support |
|
|
285
|
+
| `stylelint.config.js` | CSS/SASS/Svelte style rules |
|
|
286
|
+
| `.stylelintignore` | Files that should be ignored by Stylelint |
|
|
287
|
+
| `.editorconfig` | Base indentation and line ending settings |
|
|
288
|
+
| `.nvmrc`, `.node-version` | Node.js version constraints for `nvm`, `asdf`, and `Volta` |
|
|
289
|
+
| `.vscode/extensions.json` | Suggested extensions for VSCodium |
|
|
290
|
+
| `.vscode/settings.json` | Default workspace settings (non-binding) |
|
|
291
|
+
| `.vscode/customData.json` | Custom CSS data for FontAwesome classes |
|
|
292
|
+
| `cspell.json` | Custom words and exclusions for spell checking |
|
|
293
|
+
|
|
294
|
+
These are the same rules used by CI and automation, so aligning your local setup avoids surprises later.
|
|
295
|
+
|
|
296
|
+
> Note: `.vscode/extensions.json` defines a minimal recommended dev stack for VSCodium / VS Code. These extensions are **optional but thoughtfully curated** to improve developer experience without introducing bloat.
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
76
300
|
## 📜 Available Scripts
|
|
77
301
|
|
|
78
302
|
The following CLI commands are available via `npm run <script>` or `pnpm run <script>`.
|
|
@@ -96,7 +320,7 @@ The following CLI commands are available via `npm run <script>` or `pnpm run <sc
|
|
|
96
320
|
| `prepare` | Run SvelteKit sync |
|
|
97
321
|
| `check` | Run SvelteKit sync and type check with `svelte-check` |
|
|
98
322
|
| `check:watch` | Watch mode for type checks |
|
|
99
|
-
| `check:node` | Validate Node &
|
|
323
|
+
| `check:node` | Validate Node & npm versions match package.json `engines` |
|
|
100
324
|
| `checkout` | Full local validation: check versions, test, lint, typecheck |
|
|
101
325
|
| `verify` | Alias for `checkout` |
|
|
102
326
|
|
|
@@ -112,8 +336,12 @@ The following CLI commands are available via `npm run <script>` or `pnpm run <sc
|
|
|
112
336
|
|
|
113
337
|
---
|
|
114
338
|
|
|
339
|
+
<!-- markdownlint-disable MD024 -->
|
|
340
|
+
|
|
115
341
|
### 🧪 Testing
|
|
116
342
|
|
|
343
|
+
<!-- markdownlint-enable MD024 -->
|
|
344
|
+
|
|
117
345
|
| Script | Description |
|
|
118
346
|
| --------------- | -------------------------------------------- |
|
|
119
347
|
| `test` | Alias for `test:all` |
|
|
@@ -142,12 +370,10 @@ The following CLI commands are available via `npm run <script>` or `pnpm run <sc
|
|
|
142
370
|
|
|
143
371
|
### 💡 Lighthouse / Performance
|
|
144
372
|
|
|
145
|
-
| Script
|
|
146
|
-
|
|
|
147
|
-
| `lhci`
|
|
148
|
-
| `
|
|
149
|
-
| `lighthouse:local` | Build site, preview, and run Lighthouse locally |
|
|
150
|
-
| `lhci:run` | Run Lighthouse CI autorun |
|
|
373
|
+
| Script | Description |
|
|
374
|
+
| ---------- | ------------------------- |
|
|
375
|
+
| `lhci` | Alias for Lighthouse CI |
|
|
376
|
+
| `lhci:run` | Run Lighthouse CI autorun |
|
|
151
377
|
|
|
152
378
|
---
|
|
153
379
|
|
|
@@ -171,8 +397,6 @@ The following CLI commands are available via `npm run <script>` or `pnpm run <sc
|
|
|
171
397
|
|
|
172
398
|
---
|
|
173
399
|
|
|
174
|
-
|
|
175
|
-
|
|
176
400
|
## 🧾 License
|
|
177
401
|
|
|
178
402
|
This project is licensed under:
|
|
@@ -185,7 +409,7 @@ Source code, branding, and visual assets are subject to reuse and distribution t
|
|
|
185
409
|
|
|
186
410
|
|
|
187
411
|
|
|
188
|
-
## 🙋♂️
|
|
412
|
+
## 🙋♂️Questions?
|
|
189
413
|
|
|
190
414
|
Reach out via [netwk.pro/contact](https://netwk.pro/contact), open an issue on this repo, or email us directly at `contact (at) s.neteng.pro`.
|
|
191
415
|
|
package/cspell.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.2",
|
|
3
|
+
"language": "en",
|
|
4
|
+
"words": [
|
|
5
|
+
"acode",
|
|
6
|
+
"autorun",
|
|
7
|
+
"bootentry",
|
|
8
|
+
"foss",
|
|
9
|
+
"homescreen",
|
|
10
|
+
"lhci",
|
|
11
|
+
"lighthouseci",
|
|
12
|
+
"lighthouserc",
|
|
13
|
+
"lightningcss",
|
|
14
|
+
"linksheet",
|
|
15
|
+
"Maricopa",
|
|
16
|
+
"mdsvex",
|
|
17
|
+
"neteng",
|
|
18
|
+
"NETPRO",
|
|
19
|
+
"netwk",
|
|
20
|
+
"networkpro",
|
|
21
|
+
"Nextcloud",
|
|
22
|
+
"noopener",
|
|
23
|
+
"noreferrer",
|
|
24
|
+
"obtainium",
|
|
25
|
+
"stylelintignore",
|
|
26
|
+
"Subsite",
|
|
27
|
+
"subsites",
|
|
28
|
+
"urlcheck",
|
|
29
|
+
"vcard",
|
|
30
|
+
"vite",
|
|
31
|
+
"vitest"
|
|
32
|
+
],
|
|
33
|
+
"ignorePaths": [
|
|
34
|
+
".gitignore",
|
|
35
|
+
".gitattributes",
|
|
36
|
+
"static/sitemap.xml",
|
|
37
|
+
"static/robots.txt",
|
|
38
|
+
"src/lib/styles/**",
|
|
39
|
+
"**/node_modules/**",
|
|
40
|
+
"**/dist/**",
|
|
41
|
+
"**/.svelte-kit/**",
|
|
42
|
+
"**/.vite/**",
|
|
43
|
+
"**/coverage/**",
|
|
44
|
+
"**/playwright-report/**"
|
|
45
|
+
],
|
|
46
|
+
"ignoreWords": [],
|
|
47
|
+
"enableFiletypes": [
|
|
48
|
+
"javascript",
|
|
49
|
+
"typescript",
|
|
50
|
+
"json",
|
|
51
|
+
"markdown",
|
|
52
|
+
"html",
|
|
53
|
+
"svelte"
|
|
54
|
+
],
|
|
55
|
+
"useGitignore": true
|
|
56
|
+
}
|
package/eslint.config.mjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/* ==========================================================================
|
|
2
2
|
eslint.config.mjs
|
|
3
3
|
|
|
4
|
+
Copyright © 2025 Network Pro Strategies (Network Pro™)
|
|
4
5
|
SPDX-License-Identifier: CC-BY-4.0 OR GPL-3.0-or-later
|
|
5
6
|
This file is part of Network Pro.
|
|
6
|
-
|
|
7
|
+
========================================================================= */
|
|
7
8
|
|
|
8
9
|
import js from "@eslint/js"; // Provides ESLint core rules and recommended config
|
|
9
10
|
import eslintConfigPrettier from "eslint-config-prettier"; // Prettier config to disable conflicting ESLint rules
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@networkpro/web",
|
|
3
3
|
"private": false,
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "1.5.
|
|
5
|
+
"version": "1.5.6",
|
|
6
6
|
"description": "Locking Down Networks, Unlocking Confidence | Security, Networking, Privacy — Network Pro Strategies",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"advisory",
|
|
@@ -34,62 +34,52 @@
|
|
|
34
34
|
"node": ">=22.0.0 <25",
|
|
35
35
|
"npm": ">=11.0.0 <12"
|
|
36
36
|
},
|
|
37
|
-
"style": "src/lib/styles/
|
|
38
|
-
"scripts": {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
"lhci": "lhci",
|
|
77
|
-
"lighthouse": "npm run lighthouse:local",
|
|
78
|
-
"lighthouse:local": "npm run build && npm run preview & wait-on http://localhost:4173 && npm run lhci:run",
|
|
79
|
-
"lhci:run": "lhci autorun --config=.lighthouserc.cjs",
|
|
80
|
-
|
|
81
|
-
"audit:scripts": "node scripts/auditScripts.js",
|
|
82
|
-
"head:flatten": "node scripts/flattenHeaders.js",
|
|
83
|
-
"head:validate": "node scripts/validateHeaders.js",
|
|
84
|
-
|
|
85
|
-
"postinstall": "npm run check:node"
|
|
86
|
-
},
|
|
37
|
+
"style": "src/lib/styles/index.js",
|
|
38
|
+
"scripts": {
|
|
39
|
+
"dev": "vite dev",
|
|
40
|
+
"preview": "vite preview",
|
|
41
|
+
"start": "npm run dev",
|
|
42
|
+
"build": "vite build",
|
|
43
|
+
"build:netlify": "netlify build",
|
|
44
|
+
"css:bundle": "node scripts/bundleCss.js",
|
|
45
|
+
"prepare": "svelte-kit sync || echo ''",
|
|
46
|
+
"check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json",
|
|
47
|
+
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch",
|
|
48
|
+
"check:env": "node scripts/checkEnv.js",
|
|
49
|
+
"check:node": "node scripts/checkNode.js",
|
|
50
|
+
"checkout": "npm run check:node && npm run test:all && npm run lint:all && npm run check && npm run audit:scripts",
|
|
51
|
+
"verify": "npm run checkout",
|
|
52
|
+
"delete": "rm -rf build .svelte-kit node_modules package-lock.json",
|
|
53
|
+
"clean": "npm run delete && npm cache clean --force && npm install",
|
|
54
|
+
"upgrade": "npx npm-check-updates -u",
|
|
55
|
+
"test": "npm run test:all",
|
|
56
|
+
"test:all": "npm run test:client -- --run && npm run test:server -- --run",
|
|
57
|
+
"test:client": "vitest --config vitest.config.client.js",
|
|
58
|
+
"test:server": "vitest --config vitest.config.server.js",
|
|
59
|
+
"test:watch": "vitest --config vitest.config.client.js --watch",
|
|
60
|
+
"test:coverage": "npm run test:client -- --run --coverage && npm run test:server -- --run --coverage",
|
|
61
|
+
"lint": "eslint . --ext .mjs,.js,.svelte",
|
|
62
|
+
"lint:fix": "eslint . --ext .mjs,.js,.svelte --fix",
|
|
63
|
+
"lint:jsdoc": "eslint . --ext .js,.mjs,.svelte --max-warnings=0",
|
|
64
|
+
"lint:css": "stylelint \"**/*.{css,svelte}\" --ignore-path .stylelintignore",
|
|
65
|
+
"lint:md": "npx markdownlint-cli2 \"**/*.{md,markdown}\" \"#node_modules/**\" \"#build/**\"",
|
|
66
|
+
"lint:all": "npm run lint && npm run lint:md && npm run lint:css && npm run format",
|
|
67
|
+
"format": "prettier --check .",
|
|
68
|
+
"format:fix": "prettier --write .",
|
|
69
|
+
"lhci": "lhci",
|
|
70
|
+
"lhci:run": "lhci autorun --config=.lighthouserc.cjs",
|
|
71
|
+
"audit:scripts": "node scripts/auditScripts.js",
|
|
72
|
+
"head:flatten": "node scripts/flattenHeaders.js",
|
|
73
|
+
"head:validate": "node scripts/validateHeaders.js",
|
|
74
|
+
"postinstall": "npm run check:node"
|
|
75
|
+
},
|
|
87
76
|
"dependencies": {
|
|
88
|
-
"svelte": "5.
|
|
77
|
+
"svelte": "5.33.1"
|
|
89
78
|
},
|
|
90
79
|
"devDependencies": {
|
|
91
80
|
"@eslint/compat": "^1.2.9",
|
|
92
81
|
"@eslint/js": "^9.27.0",
|
|
82
|
+
"@lhci/cli": "^0.14.0",
|
|
93
83
|
"@netlify/plugin-sitemap": "^0.8.1",
|
|
94
84
|
"@playwright/test": "^1.52.0",
|
|
95
85
|
"@sveltejs/adapter-netlify": "^5.0.2",
|
|
@@ -131,6 +121,9 @@
|
|
|
131
121
|
"overrides": {
|
|
132
122
|
"@sveltejs/kit": {
|
|
133
123
|
"cookie": "^0.7.0"
|
|
124
|
+
},
|
|
125
|
+
"@lhci/cli": {
|
|
126
|
+
"cookie": "^0.7.0"
|
|
134
127
|
}
|
|
135
128
|
}
|
|
136
129
|
}
|
package/playwright.config.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* ==========================================================================
|
|
2
2
|
playwright.config.js
|
|
3
3
|
|
|
4
|
+
Copyright © 2025 Network Pro Strategies (Network Pro™)
|
|
4
5
|
SPDX-License-Identifier: CC-BY-4.0 OR GPL-3.0-or-later
|
|
5
6
|
This file is part of Network Pro.
|
|
6
7
|
========================================================================== */
|
package/postcss.config.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* ==========================================================================
|
|
2
2
|
postcss.config.mjs
|
|
3
3
|
|
|
4
|
+
Copyright © 2025 Network Pro Strategies (Network Pro™)
|
|
4
5
|
SPDX-License-Identifier: CC-BY-4.0 OR GPL-3.0-or-later
|
|
5
6
|
This file is part of Network Pro.
|
|
6
7
|
========================================================================== */
|
package/scripts/auditScripts.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* ==========================================================================
|
|
2
2
|
scripts/auditScripts.js
|
|
3
3
|
|
|
4
|
+
Copyright © 2025 Network Pro Strategies (Network Pro™)
|
|
4
5
|
SPDX-License-Identifier: CC-BY-4.0 OR GPL-3.0-or-later
|
|
5
6
|
This file is part of Network Pro.
|
|
6
7
|
========================================================================== */
|