@networkpro/web 1.12.9 → 1.13.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 (98) hide show
  1. package/CHANGELOG.md +26 -1
  2. package/README.md +8 -8
  3. package/eslint.config.mjs +48 -48
  4. package/netlify/edge-functions/csp-report.js +31 -31
  5. package/package.json +1 -1
  6. package/playwright.config.js +14 -14
  7. package/postcss.config.mjs +1 -1
  8. package/scripts/auditScripts.js +16 -16
  9. package/scripts/bundleCss.js +5 -5
  10. package/scripts/checkEnv.js +6 -6
  11. package/scripts/checkNode.js +10 -10
  12. package/scripts/checkVersions.js +6 -6
  13. package/scripts/flattenHeaders.js +13 -13
  14. package/scripts/generateTest.js +5 -5
  15. package/scripts/openReport.js +3 -3
  16. package/scripts/validateHeaders.js +13 -13
  17. package/src/hooks.client.ts +1 -1
  18. package/src/hooks.server.js +31 -31
  19. package/src/lib/components/Badges.svelte +9 -9
  20. package/src/lib/components/CodeBlock.svelte +1 -1
  21. package/src/lib/components/ContainerSection.svelte +1 -1
  22. package/src/lib/components/FullWidthSection.svelte +3 -3
  23. package/src/lib/components/LegalNav.svelte +6 -6
  24. package/src/lib/components/Logo.svelte +9 -9
  25. package/src/lib/components/MetaTags.svelte +3 -3
  26. package/src/lib/components/PWAInstallButton.svelte +4 -4
  27. package/src/lib/components/RedirectPage.svelte +4 -4
  28. package/src/lib/components/SocialMedia.svelte +16 -16
  29. package/src/lib/components/foss/FossItemContent.svelte +18 -18
  30. package/src/lib/components/layout/Footer.svelte +17 -17
  31. package/src/lib/components/layout/HeaderDefault.svelte +16 -16
  32. package/src/lib/components/layout/HeaderHome.svelte +14 -14
  33. package/src/lib/images.js +34 -34
  34. package/src/lib/index.js +15 -15
  35. package/src/lib/meta.js +29 -29
  36. package/src/lib/pages/AboutContent.svelte +24 -24
  37. package/src/lib/pages/FossContent.svelte +12 -12
  38. package/src/lib/pages/HomeContent.svelte +6 -6
  39. package/src/lib/pages/LicenseContent.svelte +38 -38
  40. package/src/lib/pages/PGPContent.svelte +23 -23
  41. package/src/lib/pages/PrivacyContent.svelte +39 -39
  42. package/src/lib/pages/PrivacyDashboard.svelte +12 -12
  43. package/src/lib/pages/TermsConditionsContent.svelte +28 -28
  44. package/src/lib/pages/TermsUseContent.svelte +26 -26
  45. package/src/lib/registerServiceWorker.js +25 -25
  46. package/src/lib/stores/posthog.js +13 -13
  47. package/src/lib/stores/trackingPreferences.js +19 -19
  48. package/src/lib/unregisterServiceWorker.js +1 -1
  49. package/src/lib/utils/purify.js +4 -4
  50. package/src/lib/utils/utm.js +2 -2
  51. package/src/routes/+error.svelte +4 -4
  52. package/src/routes/+layout.js +6 -6
  53. package/src/routes/+layout.svelte +29 -29
  54. package/src/routes/+page.server.js +2 -2
  55. package/src/routes/+page.svelte +9 -9
  56. package/src/routes/about/+page.server.js +2 -2
  57. package/src/routes/about/+page.svelte +7 -7
  58. package/src/routes/api/mock-csp/+server.js +3 -3
  59. package/src/routes/consultation/+page.svelte +5 -5
  60. package/src/routes/contact/+page.svelte +5 -5
  61. package/src/routes/foss-spotlight/+page.server.js +2 -2
  62. package/src/routes/foss-spotlight/+page.svelte +7 -7
  63. package/src/routes/license/+page.server.js +2 -2
  64. package/src/routes/license/+page.svelte +7 -7
  65. package/src/routes/pgp/+page.server.js +2 -2
  66. package/src/routes/pgp/+page.svelte +7 -7
  67. package/src/routes/pgp/[key]/+server.js +9 -9
  68. package/src/routes/privacy/+page.server.js +2 -2
  69. package/src/routes/privacy/+page.svelte +7 -7
  70. package/src/routes/privacy-dashboard/+page.server.js +2 -2
  71. package/src/routes/privacy-dashboard/+page.svelte +8 -8
  72. package/src/routes/privacy-rights/+page.svelte +5 -5
  73. package/src/routes/status/+page.server.js +2 -2
  74. package/src/routes/terms-conditions/+page.server.js +2 -2
  75. package/src/routes/terms-conditions/+page.svelte +7 -7
  76. package/src/routes/terms-of-use/+page.server.js +2 -2
  77. package/src/routes/terms-of-use/+page.svelte +7 -7
  78. package/src/service-worker.js +86 -86
  79. package/static/disableSw.js +2 -2
  80. package/static/offline.html +7 -7
  81. package/stylelint.config.js +56 -56
  82. package/svelte.config.js +6 -6
  83. package/tests/e2e/app.spec.js +25 -25
  84. package/tests/e2e/mobile.spec.js +18 -18
  85. package/tests/e2e/shared/helpers.js +4 -4
  86. package/tests/internal/auditCoverage.test.js +24 -24
  87. package/tests/unit/checkEnv.test.js +10 -10
  88. package/tests/unit/checkVersions.test.js +4 -4
  89. package/tests/unit/csp-report.test.js +24 -24
  90. package/tests/unit/demo.test.js +3 -3
  91. package/tests/unit/lib/utils/purify.test.js +12 -12
  92. package/tests/unit/routes/page.svelte.test.js +10 -10
  93. package/tests/unit/unregisterServiceWorker.test.js +5 -5
  94. package/tests/unit/utm.test.js +13 -13
  95. package/vite.config.js +5 -5
  96. package/vitest-setup-client.js +4 -4
  97. package/vitest.config.client.js +15 -15
  98. package/vitest.config.server.js +13 -13
@@ -7,10 +7,10 @@ This file is part of Network Pro.
7
7
  ========================================================================== -->
8
8
 
9
9
  <script>
10
- import RedirectPage from "$lib/components/RedirectPage.svelte";
11
- import { appendUTM } from "$lib/utils/utm.js";
12
- import { onMount } from "svelte";
13
- import { browser } from "$app/environment";
10
+ import RedirectPage from '$lib/components/RedirectPage.svelte';
11
+ import { appendUTM } from '$lib/utils/utm.js';
12
+ import { onMount } from 'svelte';
13
+ import { browser } from '$app/environment';
14
14
 
15
15
  /** @type {string | null} */
16
16
  let target = null;
@@ -22,7 +22,7 @@ This file is part of Network Pro.
22
22
  if (!browser) return;
23
23
 
24
24
  target = appendUTM(
25
- "https://cloud.neteng.pro/index.php/apps/forms/s/nyWEq9fdE7kWAjqMtMySLqJc",
25
+ 'https://cloud.neteng.pro/index.php/apps/forms/s/nyWEq9fdE7kWAjqMtMySLqJc',
26
26
  );
27
27
  show = true;
28
28
  });
@@ -6,13 +6,13 @@ SPDX-License-Identifier: CC-BY-4.0 OR GPL-3.0-or-later
6
6
  This file is part of Network Pro.
7
7
  ========================================================================== */
8
8
 
9
- import { defaultMeta, meta } from "$lib/meta.js";
9
+ import { defaultMeta, meta } from '$lib/meta.js';
10
10
 
11
11
  export const prerender = false;
12
12
 
13
13
  /** @type {import('./$types').PageServerLoad} */
14
14
  export function load() {
15
15
  return {
16
- meta: meta["/foss-spotlight"] || defaultMeta,
16
+ meta: meta['/foss-spotlight'] || defaultMeta,
17
17
  };
18
18
  }
@@ -7,18 +7,18 @@ This file is part of Network Pro.
7
7
  ========================================================================== -->
8
8
 
9
9
  <script>
10
- import Badges from "$lib/components/Badges.svelte";
11
- import FullWidthSection from "$lib/components/FullWidthSection.svelte";
12
- import FossContent from "$lib/pages/FossContent.svelte";
13
- import LegalNav from "$lib/components/LegalNav.svelte";
14
- import SocialMedia from "$lib/components/SocialMedia.svelte";
15
- import MetaTags from "$lib/components/MetaTags.svelte";
10
+ import Badges from '$lib/components/Badges.svelte';
11
+ import FullWidthSection from '$lib/components/FullWidthSection.svelte';
12
+ import FossContent from '$lib/pages/FossContent.svelte';
13
+ import LegalNav from '$lib/components/LegalNav.svelte';
14
+ import SocialMedia from '$lib/components/SocialMedia.svelte';
15
+ import MetaTags from '$lib/components/MetaTags.svelte';
16
16
 
17
17
  /**
18
18
  * @type {string}
19
19
  * Style class for the div element.
20
20
  */
21
- const spaceStyle = "spacer";
21
+ const spaceStyle = 'spacer';
22
22
 
23
23
  export let data;
24
24
  </script>
@@ -6,13 +6,13 @@ SPDX-License-Identifier: CC-BY-4.0 OR GPL-3.0-or-later
6
6
  This file is part of Network Pro.
7
7
  ========================================================================== */
8
8
 
9
- import { defaultMeta, meta } from "$lib/meta.js";
9
+ import { defaultMeta, meta } from '$lib/meta.js';
10
10
 
11
11
  export const prerender = false;
12
12
 
13
13
  /** @type {import('./$types').PageServerLoad} */
14
14
  export function load() {
15
15
  return {
16
- meta: meta["/license"] || defaultMeta,
16
+ meta: meta['/license'] || defaultMeta,
17
17
  };
18
18
  }
@@ -7,18 +7,18 @@ This file is part of Network Pro.
7
7
  ========================================================================== -->
8
8
 
9
9
  <script>
10
- import Badges from "$lib/components/Badges.svelte";
11
- import FullWidthSection from "$lib/components/FullWidthSection.svelte";
12
- import LicenseContent from "$lib/pages/LicenseContent.svelte";
13
- import LegalNav from "$lib/components/LegalNav.svelte";
14
- import SocialMedia from "$lib/components/SocialMedia.svelte";
15
- import MetaTags from "$lib/components/MetaTags.svelte";
10
+ import Badges from '$lib/components/Badges.svelte';
11
+ import FullWidthSection from '$lib/components/FullWidthSection.svelte';
12
+ import LicenseContent from '$lib/pages/LicenseContent.svelte';
13
+ import LegalNav from '$lib/components/LegalNav.svelte';
14
+ import SocialMedia from '$lib/components/SocialMedia.svelte';
15
+ import MetaTags from '$lib/components/MetaTags.svelte';
16
16
 
17
17
  /**
18
18
  * @type {string}
19
19
  * Style class for the div element.
20
20
  */
21
- const spaceStyle = "spacer";
21
+ const spaceStyle = 'spacer';
22
22
 
23
23
  export let data;
24
24
  </script>
@@ -6,13 +6,13 @@ SPDX-License-Identifier: CC-BY-4.0 OR GPL-3.0-or-later
6
6
  This file is part of Network Pro.
7
7
  ========================================================================== */
8
8
 
9
- import { defaultMeta, meta } from "$lib/meta.js";
9
+ import { defaultMeta, meta } from '$lib/meta.js';
10
10
 
11
11
  export const prerender = false;
12
12
 
13
13
  /** @type {import('./$types').PageServerLoad} */
14
14
  export function load() {
15
15
  return {
16
- meta: meta["/pgp"] || defaultMeta,
16
+ meta: meta['/pgp'] || defaultMeta,
17
17
  };
18
18
  }
@@ -7,18 +7,18 @@ This file is part of Network Pro.
7
7
  ========================================================================== -->
8
8
 
9
9
  <script>
10
- import PGPContent from "$lib/pages/PGPContent.svelte";
11
- import Badges from "$lib/components/Badges.svelte";
12
- import FullWidthSection from "$lib/components/FullWidthSection.svelte";
13
- import LegalNav from "$lib/components/LegalNav.svelte";
14
- import SocialMedia from "$lib/components/SocialMedia.svelte";
15
- import MetaTags from "$lib/components/MetaTags.svelte";
10
+ import PGPContent from '$lib/pages/PGPContent.svelte';
11
+ import Badges from '$lib/components/Badges.svelte';
12
+ import FullWidthSection from '$lib/components/FullWidthSection.svelte';
13
+ import LegalNav from '$lib/components/LegalNav.svelte';
14
+ import SocialMedia from '$lib/components/SocialMedia.svelte';
15
+ import MetaTags from '$lib/components/MetaTags.svelte';
16
16
 
17
17
  /**
18
18
  * @type {string}
19
19
  * Style class for the div element.
20
20
  */
21
- const spaceStyle = "spacer";
21
+ const spaceStyle = 'spacer';
22
22
 
23
23
  export let data;
24
24
  </script>
@@ -6,9 +6,9 @@ SPDX-License-Identifier: CC-BY-4.0 OR GPL-3.0-or-later
6
6
  This file is part of Network Pro.
7
7
  ========================================================================== */
8
8
 
9
- import { error } from "@sveltejs/kit";
10
- import fs from "fs/promises";
11
- import path from "path";
9
+ import { error } from '@sveltejs/kit';
10
+ import fs from 'fs/promises';
11
+ import path from 'path';
12
12
 
13
13
  /**
14
14
  * @type {import('@sveltejs/kit').RequestHandler}
@@ -16,20 +16,20 @@ import path from "path";
16
16
  export async function GET({ params, setHeaders }) {
17
17
  const key = params.key;
18
18
 
19
- if (!key || !key.endsWith(".asc")) {
20
- throw error(400, "Invalid or missing file name");
19
+ if (!key || !key.endsWith('.asc')) {
20
+ throw error(400, 'Invalid or missing file name');
21
21
  }
22
22
 
23
- const filePath = path.resolve("static/pgp", key);
23
+ const filePath = path.resolve('static/pgp', key);
24
24
 
25
25
  try {
26
26
  const file = await fs.readFile(filePath);
27
27
  setHeaders({
28
- "Content-Type": "application/pgp-keys",
29
- "Content-Disposition": `attachment; filename="${key}"`,
28
+ 'Content-Type': 'application/pgp-keys',
29
+ 'Content-Disposition': `attachment; filename="${key}"`,
30
30
  });
31
31
  return new Response(file);
32
32
  } catch {
33
- return new Response("File not found", { status: 404 });
33
+ return new Response('File not found', { status: 404 });
34
34
  }
35
35
  }
@@ -6,13 +6,13 @@ SPDX-License-Identifier: CC-BY-4.0 OR GPL-3.0-or-later
6
6
  This file is part of Network Pro.
7
7
  ========================================================================== */
8
8
 
9
- import { defaultMeta, meta } from "$lib/meta.js";
9
+ import { defaultMeta, meta } from '$lib/meta.js';
10
10
 
11
11
  export const prerender = false;
12
12
 
13
13
  /** @type {import('./$types').PageServerLoad} */
14
14
  export function load() {
15
15
  return {
16
- meta: meta["/privacy"] || defaultMeta,
16
+ meta: meta['/privacy'] || defaultMeta,
17
17
  };
18
18
  }
@@ -7,18 +7,18 @@ This file is part of Network Pro.
7
7
  ========================================================================== -->
8
8
 
9
9
  <script>
10
- import Badges from "$lib/components/Badges.svelte";
11
- import FullWidthSection from "$lib/components/FullWidthSection.svelte";
12
- import PrivacyContent from "$lib/pages/PrivacyContent.svelte";
13
- import LegalNav from "$lib/components/LegalNav.svelte";
14
- import SocialMedia from "$lib/components/SocialMedia.svelte";
15
- import MetaTags from "$lib/components/MetaTags.svelte";
10
+ import Badges from '$lib/components/Badges.svelte';
11
+ import FullWidthSection from '$lib/components/FullWidthSection.svelte';
12
+ import PrivacyContent from '$lib/pages/PrivacyContent.svelte';
13
+ import LegalNav from '$lib/components/LegalNav.svelte';
14
+ import SocialMedia from '$lib/components/SocialMedia.svelte';
15
+ import MetaTags from '$lib/components/MetaTags.svelte';
16
16
 
17
17
  /**
18
18
  * @type {string}
19
19
  * Style class for the div element.
20
20
  */
21
- const spaceStyle = "spacer";
21
+ const spaceStyle = 'spacer';
22
22
 
23
23
  export let data;
24
24
  </script>
@@ -6,13 +6,13 @@ SPDX-License-Identifier: CC-BY-4.0 OR GPL-3.0-or-later
6
6
  This file is part of Network Pro.
7
7
  ========================================================================== */
8
8
 
9
- import { defaultMeta, meta } from "$lib/meta.js";
9
+ import { defaultMeta, meta } from '$lib/meta.js';
10
10
 
11
11
  export const prerender = false;
12
12
 
13
13
  /** @type {import('./$types').PageServerLoad} */
14
14
  export function load() {
15
15
  return {
16
- meta: meta["/privacy-dashboard"] || defaultMeta,
16
+ meta: meta['/privacy-dashboard'] || defaultMeta,
17
17
  };
18
18
  }
@@ -7,24 +7,24 @@ This file is part of Network Pro.
7
7
  ========================================================================== -->
8
8
 
9
9
  <script>
10
- import Badges from "$lib/components/Badges.svelte";
11
- import FullWidthSection from "$lib/components/FullWidthSection.svelte";
12
- import PrivacyDashboard from "$lib/pages/PrivacyDashboard.svelte";
13
- import LegalNav from "$lib/components/LegalNav.svelte";
14
- import SocialMedia from "$lib/components/SocialMedia.svelte";
15
- import MetaTags from "$lib/components/MetaTags.svelte";
10
+ import Badges from '$lib/components/Badges.svelte';
11
+ import FullWidthSection from '$lib/components/FullWidthSection.svelte';
12
+ import PrivacyDashboard from '$lib/pages/PrivacyDashboard.svelte';
13
+ import LegalNav from '$lib/components/LegalNav.svelte';
14
+ import SocialMedia from '$lib/components/SocialMedia.svelte';
15
+ import MetaTags from '$lib/components/MetaTags.svelte';
16
16
 
17
17
  /**
18
18
  * @type {string}
19
19
  * Style class for the horizontal rule element.
20
20
  */
21
- const hrStyle = "hr-styled";
21
+ const hrStyle = 'hr-styled';
22
22
 
23
23
  /**
24
24
  * @type {string}
25
25
  * Style class for the div element.
26
26
  */
27
- const spaceStyle = "spacer";
27
+ const spaceStyle = 'spacer';
28
28
 
29
29
  export let data;
30
30
  </script>
@@ -7,10 +7,10 @@ This file is part of Network Pro.
7
7
  ========================================================================== -->
8
8
 
9
9
  <script>
10
- import RedirectPage from "$lib/components/RedirectPage.svelte";
11
- import { appendUTM } from "$lib/utils/utm.js";
12
- import { onMount } from "svelte";
13
- import { browser } from "$app/environment";
10
+ import RedirectPage from '$lib/components/RedirectPage.svelte';
11
+ import { appendUTM } from '$lib/utils/utm.js';
12
+ import { onMount } from 'svelte';
13
+ import { browser } from '$app/environment';
14
14
 
15
15
  /** @type {string | null} */
16
16
  let target = null;
@@ -22,7 +22,7 @@ This file is part of Network Pro.
22
22
  if (!browser) return;
23
23
 
24
24
  target = appendUTM(
25
- "https://cloud.neteng.pro/index.php/apps/forms/s/6HpZKZCaLwb6TXYL99nLQM8t",
25
+ 'https://cloud.neteng.pro/index.php/apps/forms/s/6HpZKZCaLwb6TXYL99nLQM8t',
26
26
  );
27
27
  show = true;
28
28
  });
@@ -26,7 +26,7 @@ export const prerender = false;
26
26
  * @returns {{ ok: boolean }} Response indicating successful execution
27
27
  */
28
28
  export function load() {
29
- console.log("[Status Debug] ENV_MODE:", process.env.ENV_MODE);
30
- console.log("[Status Debug] NODE_ENV:", process.env.NODE_ENV);
29
+ console.log('[Status Debug] ENV_MODE:', process.env.ENV_MODE);
30
+ console.log('[Status Debug] NODE_ENV:', process.env.NODE_ENV);
31
31
  return { ok: true };
32
32
  }
@@ -6,13 +6,13 @@ SPDX-License-Identifier: CC-BY-4.0 OR GPL-3.0-or-later
6
6
  This file is part of Network Pro.
7
7
  ========================================================================== */
8
8
 
9
- import { defaultMeta, meta } from "$lib/meta.js";
9
+ import { defaultMeta, meta } from '$lib/meta.js';
10
10
 
11
11
  export const prerender = false;
12
12
 
13
13
  /** @type {import('./$types').PageServerLoad} */
14
14
  export function load() {
15
15
  return {
16
- meta: meta["/terms-conditions"] || defaultMeta,
16
+ meta: meta['/terms-conditions'] || defaultMeta,
17
17
  };
18
18
  }
@@ -7,18 +7,18 @@ This file is part of Network Pro.
7
7
  ========================================================================== -->
8
8
 
9
9
  <script>
10
- import Badges from "$lib/components/Badges.svelte";
11
- import FullWidthSection from "$lib/components/FullWidthSection.svelte";
12
- import TermsConditionsContent from "$lib/pages/TermsConditionsContent.svelte";
13
- import LegalNav from "$lib/components/LegalNav.svelte";
14
- import SocialMedia from "$lib/components/SocialMedia.svelte";
15
- import MetaTags from "$lib/components/MetaTags.svelte";
10
+ import Badges from '$lib/components/Badges.svelte';
11
+ import FullWidthSection from '$lib/components/FullWidthSection.svelte';
12
+ import TermsConditionsContent from '$lib/pages/TermsConditionsContent.svelte';
13
+ import LegalNav from '$lib/components/LegalNav.svelte';
14
+ import SocialMedia from '$lib/components/SocialMedia.svelte';
15
+ import MetaTags from '$lib/components/MetaTags.svelte';
16
16
 
17
17
  /**
18
18
  * @type {string}
19
19
  * Style class for the div element.
20
20
  */
21
- const spaceStyle = "spacer";
21
+ const spaceStyle = 'spacer';
22
22
 
23
23
  export let data;
24
24
  </script>
@@ -6,13 +6,13 @@ SPDX-License-Identifier: CC-BY-4.0 OR GPL-3.0-or-later
6
6
  This file is part of Network Pro.
7
7
  ========================================================================== */
8
8
 
9
- import { defaultMeta, meta } from "$lib/meta.js";
9
+ import { defaultMeta, meta } from '$lib/meta.js';
10
10
 
11
11
  export const prerender = false;
12
12
 
13
13
  /** @type {import('./$types').PageServerLoad} */
14
14
  export function load() {
15
15
  return {
16
- meta: meta["/terms-of-use"] || defaultMeta,
16
+ meta: meta['/terms-of-use'] || defaultMeta,
17
17
  };
18
18
  }
@@ -7,18 +7,18 @@ This file is part of Network Pro.
7
7
  ========================================================================== -->
8
8
 
9
9
  <script>
10
- import Badges from "$lib/components/Badges.svelte";
11
- import FullWidthSection from "$lib/components/FullWidthSection.svelte";
12
- import TermsUseContent from "$lib/pages/TermsUseContent.svelte";
13
- import LegalNav from "$lib/components/LegalNav.svelte";
14
- import SocialMedia from "$lib/components/SocialMedia.svelte";
15
- import MetaTags from "$lib/components/MetaTags.svelte";
10
+ import Badges from '$lib/components/Badges.svelte';
11
+ import FullWidthSection from '$lib/components/FullWidthSection.svelte';
12
+ import TermsUseContent from '$lib/pages/TermsUseContent.svelte';
13
+ import LegalNav from '$lib/components/LegalNav.svelte';
14
+ import SocialMedia from '$lib/components/SocialMedia.svelte';
15
+ import MetaTags from '$lib/components/MetaTags.svelte';
16
16
 
17
17
  /**
18
18
  * @type {string}
19
19
  * Style class for the div element.
20
20
  */
21
- const spaceStyle = "spacer";
21
+ const spaceStyle = 'spacer';
22
22
 
23
23
  export let data;
24
24
  </script>