@networkpro/web 1.19.0 → 1.21.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.
Files changed (64) hide show
  1. package/.github/workflows/build-and-publish.yml +5 -4
  2. package/.github/workflows/lighthouse.yml +1 -1
  3. package/.github/workflows/meta-check.yml +1 -1
  4. package/.github/workflows/playwright.yml +1 -1
  5. package/.github/workflows/publish-test.yml +5 -4
  6. package/.github/workflows/templates/publish.template.yml +5 -4
  7. package/CHANGELOG.md +107 -1
  8. package/cspell.json +4 -0
  9. package/package.json +20 -20
  10. package/scripts/auditScripts.js +1 -1
  11. package/scripts/bundleCss.js +1 -1
  12. package/scripts/checkEnv.js +1 -1
  13. package/scripts/checkNode.js +1 -1
  14. package/scripts/checkVersions.js +1 -1
  15. package/scripts/generateTest.js +1 -1
  16. package/scripts/openReport.js +1 -1
  17. package/src/app.html +3 -6
  18. package/src/hooks.server.js +10 -7
  19. package/src/lib/components/ServiceSummaryTable.svelte +113 -0
  20. package/src/lib/components/index.js +2 -1
  21. package/src/lib/components/layout/HeaderDefault.svelte +3 -1
  22. package/src/lib/components/layout/HeaderHome.svelte +6 -5
  23. package/src/lib/images.js +1 -1
  24. package/src/lib/index.js +2 -2
  25. package/src/lib/meta.js +14 -9
  26. package/src/lib/pages/AboutContent.svelte +26 -10
  27. package/src/lib/pages/HomeContent.svelte +13 -1
  28. package/src/lib/pages/LicenseContent.svelte +3 -3
  29. package/src/lib/pages/PrivacyContent.svelte +31 -1
  30. package/src/lib/pages/ServicesContent.svelte +545 -0
  31. package/src/lib/pages/index.js +2 -1
  32. package/src/lib/registerServiceWorker.js +7 -5
  33. package/src/lib/stores/posthog.js +46 -25
  34. package/src/lib/styles/css/default.css +88 -0
  35. package/src/lib/styles/global.min.css +1 -3
  36. package/src/lib/types/appConstants.js +1 -1
  37. package/src/lib/types/fossTypes.js +1 -1
  38. package/src/lib/unregisterServiceWorker.js +10 -2
  39. package/src/lib/utils/getUTMParams.js +1 -1
  40. package/src/lib/utils/initAnalytics.js +75 -0
  41. package/src/lib/utils/purify.js +1 -1
  42. package/src/lib/utils/redirect.js +1 -1
  43. package/src/lib/utils/utm.js +2 -2
  44. package/src/routes/+layout.js +1 -1
  45. package/src/routes/+layout.svelte +6 -37
  46. package/src/routes/consultation/+page.svelte +1 -1
  47. package/src/routes/services/+page.server.js +18 -0
  48. package/src/routes/services/+page.svelte +65 -0
  49. package/src/routes/status/+page.server.js +1 -1
  50. package/src/service-worker.js +3 -3
  51. package/static/bin/contact.vcf +1 -2
  52. package/static/disableSw.js +1 -1
  53. package/static/manifest.json +1 -1
  54. package/static/sitemap.xml +17 -5
  55. package/tests/e2e/app.spec.js +1 -1
  56. package/tests/e2e/mobile.spec.js +1 -1
  57. package/tests/e2e/shared/helpers.js +1 -1
  58. package/tests/meta/meta.test.js +1 -1
  59. package/tests/unit/client/lib/PWAInstallButton.test.js +1 -1
  60. package/tests/unit/client/lib/utils/redirect.test.js +1 -1
  61. package/tests/unit/server/internal/auditCoverage.test.js +1 -1
  62. package/tests/unit/server/lib/utils/purify.test.js +1 -1
  63. package/tests/unit/server/meta.test.js +1 -1
  64. package/vercel.json +12 -0
@@ -19,6 +19,7 @@ concurrency:
19
19
  permissions:
20
20
  actions: read
21
21
  contents: read
22
+ packages: write
22
23
 
23
24
  jobs:
24
25
  check-codeql:
@@ -49,7 +50,7 @@ jobs:
49
50
  - name: Upgrade npm
50
51
  run: |
51
52
  corepack enable
52
- npm install -g npm@11.6.1
53
+ npm install -g npm@11.6.2
53
54
 
54
55
  - name: Install Node.js dependencies
55
56
  run: npm ci
@@ -135,7 +136,7 @@ jobs:
135
136
  - name: Upgrade npm
136
137
  run: |
137
138
  corepack enable
138
- npm install -g npm@11.6.1
139
+ npm install -g npm@11.6.2
139
140
 
140
141
  - name: Install Node.js dependencies
141
142
  run: npm ci
@@ -196,7 +197,7 @@ jobs:
196
197
  - name: Upgrade npm
197
198
  run: |
198
199
  corepack enable
199
- npm install -g npm@11.6.1
200
+ npm install -g npm@11.6.2
200
201
 
201
202
  - name: Install Node.js dependencies
202
203
  run: npm ci
@@ -224,4 +225,4 @@ jobs:
224
225
  - name: Publish package to GPR
225
226
  run: npm publish
226
227
  env:
227
- NODE_AUTH_TOKEN: ${{ secrets.NWPRO_GPR }}
228
+ NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -51,7 +51,7 @@ jobs:
51
51
  - name: Upgrade npm
52
52
  run: |
53
53
  corepack enable
54
- npm install -g npm@11.6.1
54
+ npm install -g npm@11.6.2
55
55
 
56
56
  - name: Clean previous Lighthouse reports
57
57
  run: |
@@ -17,7 +17,7 @@ permissions:
17
17
 
18
18
  jobs:
19
19
  meta:
20
- runs-on: ubuntu-latest
20
+ runs-on: ubuntu-24.04
21
21
  steps:
22
22
  - name: Checkout repo
23
23
  uses: actions/checkout@v5
@@ -41,7 +41,7 @@ jobs:
41
41
  - name: Upgrade npm
42
42
  run: |
43
43
  corepack enable
44
- npm install -g npm@11.6.1
44
+ npm install -g npm@11.6.2
45
45
 
46
46
  - name: Install Node.js dependencies
47
47
  run: npm ci
@@ -17,6 +17,7 @@ concurrency:
17
17
  permissions:
18
18
  actions: read
19
19
  contents: read
20
+ packages: write
20
21
 
21
22
  jobs:
22
23
  check-codeql:
@@ -47,7 +48,7 @@ jobs:
47
48
  - name: Upgrade npm
48
49
  run: |
49
50
  corepack enable
50
- npm install -g npm@11.6.1
51
+ npm install -g npm@11.6.2
51
52
 
52
53
  - name: Install Node.js dependencies
53
54
  run: npm ci
@@ -133,7 +134,7 @@ jobs:
133
134
  - name: Upgrade npm
134
135
  run: |
135
136
  corepack enable
136
- npm install -g npm@11.6.1
137
+ npm install -g npm@11.6.2
137
138
 
138
139
  - name: Install Node.js dependencies
139
140
  run: npm ci
@@ -194,7 +195,7 @@ jobs:
194
195
  - name: Upgrade npm
195
196
  run: |
196
197
  corepack enable
197
- npm install -g npm@11.6.1
198
+ npm install -g npm@11.6.2
198
199
 
199
200
  - name: Install Node.js dependencies
200
201
  run: npm ci
@@ -222,4 +223,4 @@ jobs:
222
223
  - name: Simulate publish package to GPR
223
224
  run: npm publish --dry-run
224
225
  env:
225
- NODE_AUTH_TOKEN: ${{ secrets.NWPRO_GPR }}
226
+ NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -27,6 +27,7 @@ concurrency:
27
27
  permissions:
28
28
  actions: read
29
29
  contents: read
30
+ packages: write
30
31
 
31
32
  jobs:
32
33
  check-codeql:
@@ -57,7 +58,7 @@ jobs:
57
58
  - name: Upgrade npm
58
59
  run: |
59
60
  corepack enable
60
- npm install -g npm@11.6.1
61
+ npm install -g npm@11.6.2
61
62
 
62
63
  - name: Install Node.js dependencies
63
64
  run: npm ci
@@ -143,7 +144,7 @@ jobs:
143
144
  - name: Upgrade npm
144
145
  run: |
145
146
  corepack enable
146
- npm install -g npm@11.6.1
147
+ npm install -g npm@11.6.2
147
148
 
148
149
  - name: Install Node.js dependencies
149
150
  run: npm ci
@@ -204,7 +205,7 @@ jobs:
204
205
  - name: Upgrade npm
205
206
  run: |
206
207
  corepack enable
207
- npm install -g npm@11.6.1
208
+ npm install -g npm@11.6.2
208
209
 
209
210
  - name: Install Node.js dependencies
210
211
  run: npm ci
@@ -232,4 +233,4 @@ jobs:
232
233
  - name: Publish package to GPR
233
234
  run: npm publish
234
235
  env:
235
- NODE_AUTH_TOKEN: ${{ secrets.NWPRO_GPR }}
236
+ NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
package/CHANGELOG.md CHANGED
@@ -22,6 +22,110 @@ This project attempts to follow [Keep a Changelog](https://keepachangelog.com/en
22
22
 
23
23
  ---
24
24
 
25
+ ## [1.21.0] - 2025-10-17
26
+
27
+ ### Added
28
+
29
+ - Introduced modular analytics initializer at `src/lib/utils/initAnalytics.js` to handle PostHog tracking, asset preloading, and cleanup logic.
30
+
31
+ ### Changed
32
+
33
+ - Bumped project version to `v1.21.0`.
34
+ - Added `pageleave` to `cspell.json` to support custom PostHog events.
35
+ - Expanded `lint` script in `package.json` to include `.cjs` files.
36
+ - Updated `src/service-worker.js` to correctly exclude `security.txt.sig` from caching.
37
+ - Refactored `+layout.svelte` to use the new `initAnalytics.js` utility for cleaner side-effect management.
38
+ - Updated fallback meta description logic in both `+layout.svelte` and `+layout.js`.
39
+ - Adjusted `"purpose"` value in `static/manifest.json` from `"any maskable"` to `"maskable"` for improved PWA icon support.
40
+ - Increased spacing before contact info in `src/lib/pages/HomeContent.svelte`.
41
+ - Enhanced `registerServiceWorker.js` to skip SW registration in Firefox during development, preventing known `/@fs/` path evaluation errors.
42
+ - Integrated automatic cleanup of existing service workers in `registerServiceWorker.js` when running in Firefox + dev mode.
43
+ - Improved logging clarity in `registerServiceWorker.js` to better distinguish SW lifecycle behavior by environment.
44
+ - Updated `unregisterServiceWorker.js` to include scoped SW logging when unregistering.
45
+ - Refactored `posthog.js` to add conditional guards for suppressing noisy analytics errors in development mode.
46
+
47
+ ---
48
+
49
+ ## [1.20.0] - 2025-10-17
50
+
51
+ ### Added
52
+
53
+ - Implemented new **Services** route at `/services`:
54
+ - Created `src/routes/services/+page.server.js` and `src/routes/services/+page.svelte`.
55
+ - Added full Services content in `src/lib/pages/ServicesContent.svelte`.
56
+ - Introduced **Services Summary Table** component (`src/lib/components/ServiceSummaryTable.svelte`).
57
+ - Added corresponding CSS for Services route in `src/lib/styles/css/default.css`.
58
+ - Added PostHog Cloud proxy rewrites to `vercel.json` for analytics endpoint.
59
+ - Added new terms to `cspell.json`: `hcaptcha`, `serv`, and `tshoot`.
60
+ - Updated CI workflows to use **npm v11.6.2** and added `packages: write` permission with `GITHUB_TOKEN` for GPR publishing:
61
+ - `.github/workflows/build-and-publish.yml`
62
+ - `.github/workflows/publish-test.yml`
63
+ - `.github/workflows/templates/publish.template.yml`
64
+ - Updated `.github/workflows/meta-check.yml` to explicitly use the `ubuntu-24.04` runner.
65
+
66
+ ### Changed
67
+
68
+ - Bumped project version to `v1.20.0`.
69
+ - Updated generator metadata in `src/app.html` to reflect `SvelteKit 2.47.1`.
70
+ - Updated `HeaderDefault.svelte` and `HeaderHome.svelte` to include a "Services" section in navigation.
71
+ - Rebuilt `src/lib/styles/global.min.css` using **LightningCSS**.
72
+ - Updated content in:
73
+ - `src/lib/pages/AboutContent.svelte` – added contact info and consultation link.
74
+ - `src/lib/pages/HomeContent.svelte` – added company contact info.
75
+ - `src/lib/pages/PrivacyContent.svelte` – added new _Security & Anti-Abuse Measures (hCaptcha)_ section.
76
+ - `src/lib/pages/LicenseContent.svelte` – relocated internal comment.
77
+ - Modified import handling for `RedirectPage` in `src/routes/consultation/+page.svelte`.
78
+ - Updated `src/hooks.server.js`:
79
+ - Corrected `isTestEnvironment` constant.
80
+ - Relaxed CSP rules for development mode to support local PostHog proxy.
81
+ - Updated `static/sitemap.xml` to include the `/services` route and refresh _Last Modified_ timestamps.
82
+ - Updated author metadata (`@author`)
83
+ from **SunDevil311** → **Scott Lopez** across all relevant JS files, including scripts, libs, and tests.
84
+ - Updated dependencies:
85
+ - `dompurify` `^3.2.7` → `^3.3.0`
86
+ - `posthog-js` `^1.271.0` → `^1.276.0`
87
+ - `semver` `^7.7.2` → `^7.7.3`
88
+ - `svelte` `^5.39.9` → `^5.40.2`
89
+ - `@eslint/js` `^9.37.0` → `^9.38.0`
90
+ - `@playwright/test` `^1.55.1` → `^1.56.1`
91
+ - `@sveltejs/adapter-vercel` `^5.10.3` → `^6.0.0`
92
+ - `@sveltejs/kit` `2.44.0` → `2.47.1`
93
+ - `eslint` `^9.37.0` → `^9.38.0`
94
+ - `eslint-plugin-jsdoc` `^60.8.2` → `^61.1.4`
95
+ - `markdownlint` `^0.38.0` → `^0.39.0`
96
+ - `playwright` `^1.55.1` → `^1.56.1`
97
+ - `svelte-check` `^4.3.2` → `^4.3.3`
98
+ - `vite` `^7.1.9` → `^7.1.10`
99
+
100
+ ### Removed
101
+
102
+ - Deleted redundant comment from `src/routes/layout.svelte`.
103
+
104
+ ### 🧩 Technical Notes
105
+
106
+ <!-- markdownlint-disable MD036 -->
107
+
108
+ **PostHog Proxy and CSP Adjustments**
109
+
110
+ - Introduced `/relay-MSR0` reverse proxy via **Vercel rewrites** to route PostHog analytics traffic through the site origin, improving privacy compliance and avoiding CORS preflight requests.
111
+ - Updated `vercel.json` accordingly to map:
112
+ - `/relay-MSR0/static/(.*)` → `https://us-assets.i.posthog.com/static/$1`
113
+ - `/relay-MSR0/(.*)` → `https://us.i.posthog.com/$1`
114
+ - Adjusted Content Security Policy (CSP) in `src/hooks.server.js`:
115
+ - Removed explicit `/relay-MSR0` source from `connect-src` (invalid in CSP).
116
+ - `'self'` now implicitly allows `/relay-MSR0` requests on the same origin.
117
+ - Development CSP remains more permissive (`unsafe-inline`, `unsafe-eval`, `localhost:*`) for compatibility with PostHog local testing.
118
+
119
+ **Miscellaneous**
120
+
121
+ - Confirmed `initPostHog()` dynamic import strategy prevents SSR evaluation errors.
122
+ - Verified service worker (`service-worker.js`) continues caching non-PostHog requests correctly.
123
+ - Verified `Strict-Transport-Security` and other headers remain unaffected by proxy rewrite behavior.
124
+
125
+ <!-- markdownlint-enable MD036 -->
126
+
127
+ ---
128
+
25
129
  ## [1.19.0] - 2025-10-06
26
130
 
27
131
  ### Added
@@ -1041,7 +1145,9 @@ This project attempts to follow [Keep a Changelog](https://keepachangelog.com/en
1041
1145
 
1042
1146
  <!-- Link references -->
1043
1147
 
1044
- [Unreleased]: https://github.com/netwk-pro/netwk-pro.github.io/compare/v1.19.0...HEAD
1148
+ [Unreleased]: https://github.com/netwk-pro/netwk-pro.github.io/compare/v1.21.0...HEAD
1149
+ [1.21.0]: https://github.com/netwk-pro/netwk-pro.github.io/releases/tag/v1.21.0
1150
+ [1.20.0]: https://github.com/netwk-pro/netwk-pro.github.io/releases/tag/v1.20.0
1045
1151
  [1.19.0]: https://github.com/netwk-pro/netwk-pro.github.io/releases/tag/v1.19.0
1046
1152
  [1.18.5]: https://github.com/netwk-pro/netwk-pro.github.io/releases/tag/v1.18.5
1047
1153
  [1.18.4]: https://github.com/netwk-pro/netwk-pro.github.io/releases/tag/v1.18.4
package/cspell.json CHANGED
@@ -23,6 +23,7 @@
23
23
  "fontawesome",
24
24
  "foss",
25
25
  "geolocation",
26
+ "hcaptcha",
26
27
  "heliboard",
27
28
  "homescreen",
28
29
  "HREFTOP",
@@ -60,12 +61,14 @@
60
61
  "obtainium",
61
62
  "openpgp",
62
63
  "opgp",
64
+ "pageleave",
63
65
  "pallyy",
64
66
  "posthog",
65
67
  "precaching",
66
68
  "prefs",
67
69
  "publickey",
68
70
  "reconsent",
71
+ "serv",
69
72
  "shizuku",
70
73
  "SIEM",
71
74
  "SPDY",
@@ -76,6 +79,7 @@
76
79
  "subsites",
77
80
  "Supercookie",
78
81
  "supercookies",
82
+ "tshoot",
79
83
  "unregisters",
80
84
  "urlcheck",
81
85
  "vcard",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@networkpro/web",
3
3
  "private": false,
4
- "version": "1.19.0",
4
+ "version": "1.21.0",
5
5
  "description": "Locking Down Networks, Unlocking Confidence™ | Security, Networking, Privacy — Network Pro Strategies",
6
6
  "keywords": [
7
7
  "advisory",
@@ -52,7 +52,7 @@
52
52
  "verify": "npm run checkout",
53
53
  "delete": "rm -rf build .svelte-kit node_modules package-lock.json",
54
54
  "clean": "npm run delete && npm cache clean --force && npm install",
55
- "upgrade": "npx npm-check-updates -u",
55
+ "upgrade": "npm-check-updates -u",
56
56
  "test": "npm run test:all",
57
57
  "test:all": "npm run test:client -- --run && npm run test:server -- --run",
58
58
  "test:client": "vitest --config vitest.config.client.js",
@@ -63,11 +63,11 @@
63
63
  "coverage:client": "node scripts/openReport.js client",
64
64
  "coverage:server": "node scripts/openReport.js server",
65
65
  "coverage:open": "npm run coverage:client && npm run coverage:server",
66
- "lint": "eslint . --ext .mjs,.js,.svelte",
67
- "lint:fix": "eslint . --ext .mjs,.js,.svelte --fix",
68
- "lint:jsdoc": "eslint . --ext .js,.mjs,.svelte --max-warnings=0",
66
+ "lint": "eslint . --ext .js,.cjs,.mjs,.svelte",
67
+ "lint:fix": "eslint . --ext .js,.cjs,.mjs,.svelte --fix",
68
+ "lint:jsdoc": "eslint . --ext .js,.cjs,.mjs,.svelte --max-warnings=0",
69
69
  "lint:css": "stylelint \"**/*.{css,svelte}\" --ignore-path .stylelintignore",
70
- "lint:md": "npx markdownlint-cli2 \"**/*.{md,markdown}\" \"#node_modules/**\" \"#build/**\" \"#playwright-report/**\" \"#test-results/**\"",
70
+ "lint:md": "npx markdownlint-cli2 \"**/*.{md,markdown}\" \"#node_modules/**\" \"#playwright-report/**\" \"#test-results/**\"",
71
71
  "lint:all": "npm run lint && npm run lint:md && npm run lint:css && npm run format",
72
72
  "format": "prettier --check .",
73
73
  "format:fix": "prettier --write .",
@@ -77,34 +77,34 @@
77
77
  "postinstall": "npm run check:node"
78
78
  },
79
79
  "dependencies": {
80
- "dompurify": "^3.2.7",
81
- "posthog-js": "^1.271.0",
82
- "semver": "^7.7.2",
83
- "svelte": "5.39.9"
80
+ "dompurify": "^3.3.0",
81
+ "posthog-js": "^1.276.0",
82
+ "semver": "^7.7.3",
83
+ "svelte": "5.40.2"
84
84
  },
85
85
  "devDependencies": {
86
86
  "@eslint/compat": "^1.4.0",
87
- "@eslint/js": "^9.37.0",
87
+ "@eslint/js": "^9.38.0",
88
88
  "@lhci/cli": "^0.15.1",
89
- "@playwright/test": "^1.55.1",
90
- "@sveltejs/adapter-vercel": "^5.10.3",
91
- "@sveltejs/kit": "2.44.0",
89
+ "@playwright/test": "^1.56.1",
90
+ "@sveltejs/adapter-vercel": "^6.0.0",
91
+ "@sveltejs/kit": "2.47.1",
92
92
  "@sveltejs/vite-plugin-svelte": "^6.2.1",
93
93
  "@testing-library/jest-dom": "^6.9.1",
94
94
  "@testing-library/svelte": "^5.2.8",
95
95
  "@vitest/coverage-v8": "^3.2.4",
96
96
  "autoprefixer": "^10.4.21",
97
97
  "browserslist": "^4.26.3",
98
- "eslint": "^9.37.0",
98
+ "eslint": "^9.38.0",
99
99
  "eslint-config-prettier": "^10.1.8",
100
- "eslint-plugin-jsdoc": "^60.8.2",
100
+ "eslint-plugin-jsdoc": "^61.1.4",
101
101
  "eslint-plugin-svelte": "^3.12.4",
102
102
  "globals": "^16.4.0",
103
103
  "jsdom": "26.1.0",
104
104
  "lightningcss": "^1.30.2",
105
- "markdownlint": "^0.38.0",
105
+ "markdownlint": "^0.39.0",
106
106
  "markdownlint-cli2": "^0.18.1",
107
- "playwright": "^1.55.1",
107
+ "playwright": "^1.56.1",
108
108
  "postcss": "^8.5.6",
109
109
  "prettier": "^3.6.2",
110
110
  "prettier-plugin-svelte": "^3.4.0",
@@ -112,11 +112,11 @@
112
112
  "stylelint-config-html": "^1.1.0",
113
113
  "stylelint-config-recommended": "^17.0.0",
114
114
  "stylelint-order": "^7.0.0",
115
- "svelte-check": "^4.3.2",
115
+ "svelte-check": "^4.3.3",
116
116
  "svelte-eslint-parser": "^1.3.3",
117
117
  "svelte-preprocess": "^6.0.3",
118
118
  "typescript": "^5.9.3",
119
- "vite": "^7.1.9",
119
+ "vite": "^7.1.10",
120
120
  "vite-plugin-lightningcss": "^0.0.5",
121
121
  "vite-tsconfig-paths": "^5.1.4",
122
122
  "vitest": "^3.2.4"
@@ -11,7 +11,7 @@ This file is part of Network Pro.
11
11
  * Looks for any .js/.mjs files without a matching test in tests/
12
12
  *
13
13
  * @module scripts/
14
- * @author SunDevil311
14
+ * @author Scott Lopez
15
15
  * @updated 2025-05-21
16
16
  */
17
17
 
@@ -11,7 +11,7 @@ This file is part of Network Pro.
11
11
  * Transforms and minifies CSS files using LightningCSS (single file)
12
12
  *
13
13
  * @module scripts/
14
- * @author SunDevil311
14
+ * @author Scott Lopez
15
15
  * @updated 2025-05-16
16
16
  */
17
17
 
@@ -11,7 +11,7 @@ This file is part of Network Pro.
11
11
  * Ensures `ENV_MODE` is defined and matches allowed environments
12
12
  *
13
13
  * @module scripts/
14
- * @author SunDevil311
14
+ * @author Scott Lopez
15
15
  * @updated 2025-05-21
16
16
  */
17
17
 
@@ -15,7 +15,7 @@ This file is part of Network Pro.
15
15
  * - In all other cases (manual run, CI, verify): fails on mismatch
16
16
  *
17
17
  * @module scripts/
18
- * @author SunDevil311
18
+ * @author Scott Lopez
19
19
  * @updated 2025-05-23
20
20
  */
21
21
 
@@ -12,7 +12,7 @@ This file is part of Network Pro.
12
12
  * test runs
13
13
  *
14
14
  * @module scripts/
15
- * @author SunDevil311
15
+ * @author Scott Lopez
16
16
  * @updated 2025-05-20
17
17
  */
18
18
 
@@ -13,7 +13,7 @@ This file is part of Network Pro.
13
13
  * @description Auto-generates a *.test.js scaffold for utilities and
14
14
  * components.
15
15
  * @module scripts
16
- * @author SunDevil311
16
+ * @author Scott Lopez
17
17
  * @updated 2025-06-01
18
18
  */
19
19
 
@@ -12,7 +12,7 @@ This file is part of Network Pro.
12
12
  * Handles platform-specific commands to launch the report in the default browser.
13
13
  *
14
14
  * @module scripts/
15
- * @author SunDevil311
15
+ * @author Scott Lopez
16
16
  * @updated 2025-06-09
17
17
  */
18
18
 
package/src/app.html CHANGED
@@ -24,7 +24,7 @@
24
24
  sizes="any"
25
25
  type="image/x-icon" />
26
26
 
27
- <!-- Preconnect to PostHog domains -->
27
+ <!-- Preconnect to PostHog domains
28
28
  <link
29
29
  rel="preconnect"
30
30
  href="https://us.i.posthog.com"
@@ -33,6 +33,7 @@
33
33
  rel="preconnect"
34
34
  href="https://us-assets.i.posthog.com"
35
35
  crossorigin="anonymous" />
36
+ -->
36
37
 
37
38
  <!-- Preload FontAwesome webfonts -->
38
39
  <link
@@ -63,7 +64,7 @@
63
64
  content="bx4ham0zkpvzztzu213bhpt76m9siq" />
64
65
  <!-- cspell:enable -->
65
66
 
66
- <meta name="generator" content="SvelteKit 2.44.0" />
67
+ <meta name="generator" content="SvelteKit 2.47.1" />
67
68
 
68
69
  <script src="/disableSw.js"></script>
69
70
 
@@ -71,9 +72,5 @@
71
72
  </head>
72
73
  <body>
73
74
  <div id="svelte">%sveltekit.body%</div>
74
-
75
- <!-- LinkedIn Insight Tag removed 2025-05-26 -->
76
-
77
- <!-- cspell:ignore preconnects webfonts lintrk -->
78
75
  </body>
79
76
  </html>
@@ -17,7 +17,9 @@ export async function handle({ event, resolve }) {
17
17
  // Determine environment flags
18
18
  // Default to development policy if neither test nor prod
19
19
  const isTestEnvironment =
20
- process.env.NODE_ENV === 'test' || process.env.ENV_MODE === 'ci';
20
+ process.env.NODE_ENV === 'development' ||
21
+ process.env.ENV_MODE === 'dev' ||
22
+ process.env.ENV_MODE === 'ci';
21
23
  const isProdEnvironment =
22
24
  process.env.NODE_ENV === 'production' || process.env.ENV_MODE === 'prod';
23
25
 
@@ -48,15 +50,16 @@ export async function handle({ event, resolve }) {
48
50
  'report-to csp-endpoint;',
49
51
  ];
50
52
 
51
- // Loosen up CSP for test environments
53
+ // Loosen up CSP for test environments (and allow local PostHog proxy)
52
54
  if (isTestEnvironment) {
53
55
  cspDirectives[1] =
54
- "script-src 'self' 'unsafe-inline' 'unsafe-eval' ws://localhost:*;";
56
+ "script-src 'self' 'unsafe-inline' 'unsafe-eval' http://localhost:* ws://localhost:*;";
55
57
  cspDirectives[2] =
56
- "script-src-elem 'self' 'unsafe-inline' 'unsafe-eval' ws://localhost:*;";
57
- cspDirectives[3] = "style-src 'self' 'unsafe-inline';";
58
- cspDirectives[4] = "img-src 'self' data:;";
59
- cspDirectives[5] = "connect-src 'self';";
58
+ "script-src-elem 'self' 'unsafe-inline' 'unsafe-eval' http://localhost:* ws://localhost:*;";
59
+ cspDirectives[3] = "style-src 'self' 'unsafe-inline' http://localhost:*;";
60
+ cspDirectives[4] = "img-src 'self' data: http://localhost:*;";
61
+ cspDirectives[5] =
62
+ "connect-src 'self' http://localhost:* ws://localhost:* https://us.i.posthog.com https://us-assets.i.posthog.com;";
60
63
  }
61
64
 
62
65
  response.headers.set(
@@ -0,0 +1,113 @@
1
+ <!-- ==========================================================================
2
+ src/lib/components/ServiceSummaryTable.svelte
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
+ <script>
10
+ import { onMount } from 'svelte';
11
+
12
+ let activeService = '';
13
+
14
+ // Detect which hash (anchor) is active
15
+ onMount(() => {
16
+ // Set initial hash (e.g. when user loads /services#wifi)
17
+ activeService = window.location.hash.replace('#', '');
18
+
19
+ // Update on hash change
20
+ const handleHashChange = () => {
21
+ activeService = window.location.hash.replace('#', '');
22
+ };
23
+
24
+ window.addEventListener('hashchange', handleHashChange);
25
+ return () => window.removeEventListener('hashchange', handleHashChange);
26
+ });
27
+
28
+ // Keep only this services array (your actual data)
29
+ export let services = [
30
+ {
31
+ id: 'modem',
32
+ name: 'Home Modem Setup',
33
+ price: '$99.99',
34
+ duration: '45–60 min',
35
+ summary:
36
+ 'Activate and secure your modem, verify connectivity and speeds.',
37
+ },
38
+ {
39
+ id: 'basic',
40
+ name: 'Basic Router Setup',
41
+ price: '$99.99',
42
+ duration: '60–75 min',
43
+ summary: 'Configure wired routing, DHCP, and security for LAN devices.',
44
+ },
45
+ {
46
+ id: 'wifi',
47
+ name: 'Wi-Fi & Wireless Network Setup',
48
+ price: '$149.99',
49
+ duration: '75–90 min',
50
+ summary: 'Establish reliable Wi-Fi coverage and secure wireless access.',
51
+ },
52
+ {
53
+ id: 'tshoot',
54
+ name: 'Network Troubleshooting',
55
+ price: 'from $49.99',
56
+ duration: '30-min diagnostic + hourly',
57
+ summary: 'Identify and resolve connectivity or performance issues.',
58
+ },
59
+ {
60
+ id: 'security',
61
+ name: 'Network Security Review',
62
+ price: '$79.99',
63
+ duration: '60–75 min',
64
+ summary:
65
+ 'Harden router and Wi-Fi configurations, eliminate vulnerabilities.',
66
+ },
67
+ {
68
+ id: 'device',
69
+ name: 'Add a Wi-Fi Device',
70
+ price: '$34.99',
71
+ duration: '15–30 min',
72
+ summary: 'Connect and verify new wireless devices on your home network.',
73
+ },
74
+ {
75
+ id: 'print',
76
+ name: 'Add or Configure a Printer',
77
+ price: '$74.99',
78
+ duration: '45–60 min',
79
+ summary: 'Install and configure printers for network and device access.',
80
+ },
81
+ ];
82
+ </script>
83
+
84
+ <section id="service-summary">
85
+ <h2>Service Summary</h2>
86
+ <p>
87
+ Quickly compare our range of on-site services designed primarily for
88
+ individual consumers. Each offering is crafted for convenience, reliability,
89
+ and top-tier support.<br />
90
+ Each item links to a detailed description below.
91
+ </p>
92
+
93
+ <table class="service-table">
94
+ <thead>
95
+ <tr>
96
+ <th>Service</th>
97
+ <th>Price</th>
98
+ <th>Estimated Time</th>
99
+ <th>Description</th>
100
+ </tr>
101
+ </thead>
102
+ <tbody>
103
+ {#each services as svc}
104
+ <tr class:selected={svc.id === activeService}>
105
+ <td><a href={'#' + svc.id}>{svc.name}</a></td>
106
+ <td>{svc.price}</td>
107
+ <td>{svc.duration}</td>
108
+ <td>{svc.summary}</td>
109
+ </tr>
110
+ {/each}
111
+ </tbody>
112
+ </table>
113
+ </section>
@@ -12,7 +12,7 @@ This file is part of Network Pro.
12
12
  * @file index.js
13
13
  * @description Export point for library components
14
14
  * @module src/lib/components
15
- * @author SunDevil311
15
+ * @author Scott Lopez
16
16
  * @updated 2025-10-05
17
17
  */
18
18
 
@@ -27,4 +27,5 @@ export { default as Logo } from './Logo.svelte';
27
27
  export { default as MetaTags } from './MetaTags.svelte';
28
28
  export { default as PWAInstallButton } from './PWAInstallButton.svelte';
29
29
  export { default as RedirectPage } from './RedirectPage.svelte';
30
+ export { default as ServiceSummaryTable } from './ServiceSummaryTable.svelte';
30
31
  export { default as SocialMedia } from './SocialMedia.svelte';