Track HiveGrid Cloud planning reference

This commit is contained in:
david committed 2026-06-26 20:48:01 +02:00
1 parent b3d5ea6764
commit e341c5938a
5784 files changed
+1104929 -3

No files matched your search

@@ -0,0 +1,13 @@
import { CookieCategory } from "./CookieCategory";
export type ApplicationCookie = {
category: CookieCategory;
name: string;
domain?: string;
expiry?: string;
expiryKey?: string;
description?: string;
descriptionKey?: string;
type?: "http" | "https";
href?: string;
};
@@ -0,0 +1,33 @@
import {describe, it, expect} from 'vitest'
import { CookieCategory } from "./CookieCategory";
import { allApplicationCookies, allCookieCategories } from "./ApplicationCookies";
describe("CookieData", () => {
describe("allApplicationCookies", () => {
it("should contain at least one cookie", () => {
expect(allApplicationCookies.length).toBeGreaterThan(0);
});
it("should have unique cookie names", () => {
const cookieNames = allApplicationCookies.map((cookie) => cookie.name);
const uniqueCookieNames = new Set(cookieNames);
expect(uniqueCookieNames.size).toEqual(cookieNames.length);
});
it("should provide translation keys for rendered expiry values", () => {
expect(allApplicationCookies.filter((cookie) => cookie.expiry && !cookie.expiryKey)).toEqual([]);
});
});
describe("allCookieCategories", () => {
it("should contain all categories present in allApplicationCookies", () => {
const expectedCategories = [
CookieCategory.REQUIRED,
CookieCategory.FUNCTIONAL,
CookieCategory.ANALYTICS,
CookieCategory.ADVERTISEMENT,
];
expect(allCookieCategories).toEqual(expectedCategories);
});
});
});
@@ -0,0 +1,84 @@
import { ApplicationCookie } from "./ApplicationCookie";
import { CookieCategory } from "./CookieCategory";
// I used https://www.cookieserve.com/report
const allApplicationCookies: ApplicationCookie[] = [
{
category: CookieCategory.REQUIRED,
name: "RJ_session",
expiry: "1 month",
expiryKey: "cookies.expiry.oneMonth",
descriptionKey: "cookies.items.session.description",
},
{
category: CookieCategory.FUNCTIONAL,
name: "crisp-client/*",
expiry: "6 months",
expiryKey: "cookies.expiry.sixMonths",
descriptionKey: "cookies.items.crisp.description",
href: "https://help.crisp.chat/en/article/crisp-chatbox-cookie-ip-policy-1147xor/",
},
{
category: CookieCategory.ANALYTICS,
name: "app_analytics",
expiry: "1 month",
expiryKey: "cookies.expiry.oneMonth",
type: "https",
descriptionKey: "cookies.items.analytics.description",
},
{
category: CookieCategory.ANALYTICS,
name: "CONSENT",
domain: ".youtube.com",
expiry: "2 years",
expiryKey: "cookies.expiry.twoYears",
descriptionKey: "cookies.items.youtubeConsent.description",
href: "https://policies.google.com/technologies/cookies",
},
{
category: CookieCategory.ADVERTISEMENT,
name: "VISITOR_INFO1_LIVE",
domain: ".youtube.com",
expiry: "5 months 27 days",
expiryKey: "cookies.expiry.fiveMonths27Days",
descriptionKey: "cookies.items.youtubeVisitor.description",
href: "https://policies.google.com/technologies/cookies",
},
{
category: CookieCategory.ADVERTISEMENT,
name: "YSC",
domain: ".youtube.com",
expiry: "Session",
expiryKey: "cookies.expiry.session",
descriptionKey: "cookies.items.youtubeYsc.description",
href: "https://policies.google.com/technologies/cookies",
},
{
category: CookieCategory.ADVERTISEMENT,
name: "yt-remote-device-id",
domain: ".youtube.com",
expiry: "Never",
expiryKey: "cookies.expiry.never",
descriptionKey: "cookies.items.youtubeRemoteDevice.description",
href: "https://policies.google.com/technologies/cookies",
},
{
category: CookieCategory.ADVERTISEMENT,
name: "yt-remote-connected-devices",
domain: ".youtube.com",
expiry: "Never",
expiryKey: "cookies.expiry.never",
descriptionKey: "cookies.items.youtubeRemoteConnected.description",
href: "https://policies.google.com/technologies/cookies",
},
];
const allCookieCategories: CookieCategory[] = [];
allApplicationCookies.forEach((cookie) => {
if (!allCookieCategories.includes(cookie.category)) {
allCookieCategories.push(cookie.category);
}
});
export { allCookieCategories, allApplicationCookies };
@@ -0,0 +1,6 @@
export enum CookieCategory {
REQUIRED, // userId, lightOrDarkMode, lng, csrf, consent
FUNCTIONAL, // chat, feedback
ANALYTICS, // analytics
ADVERTISEMENT, // ads
}