diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index 4f7b4405..5e3e8630 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -18,23 +18,3 @@ updates: - "Skip Changelog" - "dependencies" - "javascript" - - - package-ecosystem: "npm" - directory: "/vendor" - schedule: - interval: "monthly" - target-branch: "develop" - labels: - - "Skip Changelog" - - "dependencies" - - "javascript" - - - package-ecosystem: "npm" - directory: "/fonts" - schedule: - interval: "monthly" - target-branch: "develop" - labels: - - "Skip Changelog" - - "dependencies" - - "javascript" diff --git a/.gitignore b/.gitignore index 31c9a0bf..d279c822 100644 --- a/.gitignore +++ b/.gitignore @@ -10,8 +10,6 @@ coverage .lock-wscript build/Release /node_modules/**/* -fonts/node_modules/**/* -vendor/node_modules/**/* !/tests/node_modules/**/* jspm_modules .npm @@ -67,6 +65,8 @@ Temporary Items /css/* !/css/custom.css.sample !/css/main.css +!/css/roboto.css +!/css/font-awesome.css # Ignore users config file but keep the sample. /config/* diff --git a/CHANGELOG.md b/CHANGELOG.md index ab7bb02c..c81b67c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,7 +31,8 @@ planned for 2025-07-01 - Switch Stylelint config to flat format and simplify Stylelint scripts - [workflow] Replace Node.js version v23 with v24 (#3770) - [refactor] Replace deprecated constants `fs.F_OK` and `fs.R_OK` (#3789) -- [refactor] Replace `ansis` with built-in function `util.styleText` +- [refactor] Replace `ansis` with built-in function `util.styleText` (#3793) +- [core] Integrate stuff from `vendor` and `fonts` folders into main `package.json`, simplifies install and maintaining dependencies (#3795) ### Fixed diff --git a/cspell.config.json b/cspell.config.json index 337a7ee8..e681059f 100644 --- a/cspell.config.json +++ b/cspell.config.json @@ -244,6 +244,6 @@ "Ybbet", "yearmatchgroup" ], - "ignorePaths": ["node_modules/**", "modules/**", "vendor/node_modules/**", "translations/**", "tests/mocks/**", "tests/e2e/modules/clock_es_spec.js", "fonts/roboto.css"], + "ignorePaths": ["node_modules/**", "modules/**", "translations/**", "tests/mocks/**", "tests/e2e/modules/clock_es_spec.js", "css/roboto.css"], "dictionaries": ["node"] } diff --git a/vendor/css/font-awesome.css b/css/font-awesome.css similarity index 100% rename from vendor/css/font-awesome.css rename to css/font-awesome.css diff --git a/fonts/roboto.css b/css/roboto.css similarity index 57% rename from fonts/roboto.css rename to css/roboto.css index 3743e4a8..4f214a05 100644 --- a/fonts/roboto.css +++ b/css/roboto.css @@ -5,8 +5,8 @@ font-display: swap; font-weight: 100; src: - url("node_modules/@fontsource/roboto/files/roboto-cyrillic-ext-100-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto/files/roboto-cyrillic-ext-100-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto/files/roboto-cyrillic-ext-100-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto/files/roboto-cyrillic-ext-100-normal.woff") format("woff"); unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; } @@ -17,8 +17,8 @@ font-display: swap; font-weight: 100; src: - url("node_modules/@fontsource/roboto/files/roboto-cyrillic-100-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto/files/roboto-cyrillic-100-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto/files/roboto-cyrillic-100-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto/files/roboto-cyrillic-100-normal.woff") format("woff"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } @@ -29,8 +29,8 @@ font-display: swap; font-weight: 100; src: - url("node_modules/@fontsource/roboto/files/roboto-greek-ext-100-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto/files/roboto-greek-ext-100-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto/files/roboto-greek-ext-100-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto/files/roboto-greek-ext-100-normal.woff") format("woff"); unicode-range: U+1F00-1FFF; } @@ -41,8 +41,8 @@ font-display: swap; font-weight: 100; src: - url("node_modules/@fontsource/roboto/files/roboto-greek-100-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto/files/roboto-greek-100-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto/files/roboto-greek-100-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto/files/roboto-greek-100-normal.woff") format("woff"); unicode-range: U+0370-03FF; } @@ -53,8 +53,8 @@ font-display: swap; font-weight: 100; src: - url("node_modules/@fontsource/roboto/files/roboto-vietnamese-100-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto/files/roboto-vietnamese-100-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto/files/roboto-vietnamese-100-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto/files/roboto-vietnamese-100-normal.woff") format("woff"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; } @@ -65,8 +65,8 @@ font-display: swap; font-weight: 100; src: - url("node_modules/@fontsource/roboto/files/roboto-latin-ext-100-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto/files/roboto-latin-ext-100-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto/files/roboto-latin-ext-100-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto/files/roboto-latin-ext-100-normal.woff") format("woff"); unicode-range: U+0100-02AF, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; } @@ -77,8 +77,8 @@ font-display: swap; font-weight: 100; src: - url("node_modules/@fontsource/roboto/files/roboto-latin-100-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto/files/roboto-latin-100-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto/files/roboto-latin-100-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto/files/roboto-latin-100-normal.woff") format("woff"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } @@ -89,8 +89,8 @@ font-display: swap; font-weight: 300; src: - url("node_modules/@fontsource/roboto/files/roboto-cyrillic-ext-300-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto/files/roboto-cyrillic-ext-300-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto/files/roboto-cyrillic-ext-300-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto/files/roboto-cyrillic-ext-300-normal.woff") format("woff"); unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; } @@ -101,8 +101,8 @@ font-display: swap; font-weight: 300; src: - url("node_modules/@fontsource/roboto/files/roboto-cyrillic-300-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto/files/roboto-cyrillic-300-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto/files/roboto-cyrillic-300-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto/files/roboto-cyrillic-300-normal.woff") format("woff"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } @@ -113,8 +113,8 @@ font-display: swap; font-weight: 300; src: - url("node_modules/@fontsource/roboto/files/roboto-greek-ext-300-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto/files/roboto-greek-ext-300-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto/files/roboto-greek-ext-300-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto/files/roboto-greek-ext-300-normal.woff") format("woff"); unicode-range: U+1F00-1FFF; } @@ -125,8 +125,8 @@ font-display: swap; font-weight: 300; src: - url("node_modules/@fontsource/roboto/files/roboto-greek-300-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto/files/roboto-greek-300-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto/files/roboto-greek-300-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto/files/roboto-greek-300-normal.woff") format("woff"); unicode-range: U+0370-03FF; } @@ -137,8 +137,8 @@ font-display: swap; font-weight: 300; src: - url("node_modules/@fontsource/roboto/files/roboto-vietnamese-300-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto/files/roboto-vietnamese-300-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto/files/roboto-vietnamese-300-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto/files/roboto-vietnamese-300-normal.woff") format("woff"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; } @@ -149,8 +149,8 @@ font-display: swap; font-weight: 300; src: - url("node_modules/@fontsource/roboto/files/roboto-latin-ext-300-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto/files/roboto-latin-ext-300-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto/files/roboto-latin-ext-300-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto/files/roboto-latin-ext-300-normal.woff") format("woff"); unicode-range: U+0100-02AF, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; } @@ -161,8 +161,8 @@ font-display: swap; font-weight: 300; src: - url("node_modules/@fontsource/roboto/files/roboto-latin-300-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto/files/roboto-latin-300-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto/files/roboto-latin-300-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto/files/roboto-latin-300-normal.woff") format("woff"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } @@ -173,8 +173,8 @@ font-display: swap; font-weight: 400; src: - url("node_modules/@fontsource/roboto/files/roboto-cyrillic-ext-400-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto/files/roboto-cyrillic-ext-400-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto/files/roboto-cyrillic-ext-400-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto/files/roboto-cyrillic-ext-400-normal.woff") format("woff"); unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; } @@ -185,8 +185,8 @@ font-display: swap; font-weight: 400; src: - url("node_modules/@fontsource/roboto/files/roboto-cyrillic-400-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto/files/roboto-cyrillic-400-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto/files/roboto-cyrillic-400-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto/files/roboto-cyrillic-400-normal.woff") format("woff"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } @@ -197,8 +197,8 @@ font-display: swap; font-weight: 400; src: - url("node_modules/@fontsource/roboto/files/roboto-greek-ext-400-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto/files/roboto-greek-ext-400-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto/files/roboto-greek-ext-400-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto/files/roboto-greek-ext-400-normal.woff") format("woff"); unicode-range: U+1F00-1FFF; } @@ -209,8 +209,8 @@ font-display: swap; font-weight: 400; src: - url("node_modules/@fontsource/roboto/files/roboto-greek-400-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto/files/roboto-greek-400-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto/files/roboto-greek-400-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto/files/roboto-greek-400-normal.woff") format("woff"); unicode-range: U+0370-03FF; } @@ -221,8 +221,8 @@ font-display: swap; font-weight: 400; src: - url("node_modules/@fontsource/roboto/files/roboto-vietnamese-400-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto/files/roboto-vietnamese-400-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto/files/roboto-vietnamese-400-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto/files/roboto-vietnamese-400-normal.woff") format("woff"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; } @@ -233,8 +233,8 @@ font-display: swap; font-weight: 400; src: - url("node_modules/@fontsource/roboto/files/roboto-latin-ext-400-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto/files/roboto-latin-ext-400-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto/files/roboto-latin-ext-400-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto/files/roboto-latin-ext-400-normal.woff") format("woff"); unicode-range: U+0100-02AF, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; } @@ -245,8 +245,8 @@ font-display: swap; font-weight: 400; src: - url("node_modules/@fontsource/roboto/files/roboto-latin-400-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto/files/roboto-latin-400-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto/files/roboto-latin-400-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto/files/roboto-latin-400-normal.woff") format("woff"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } @@ -257,8 +257,8 @@ font-display: swap; font-weight: 500; src: - url("node_modules/@fontsource/roboto/files/roboto-cyrillic-ext-500-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto/files/roboto-cyrillic-ext-500-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto/files/roboto-cyrillic-ext-500-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto/files/roboto-cyrillic-ext-500-normal.woff") format("woff"); unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; } @@ -269,8 +269,8 @@ font-display: swap; font-weight: 500; src: - url("node_modules/@fontsource/roboto/files/roboto-cyrillic-500-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto/files/roboto-cyrillic-500-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto/files/roboto-cyrillic-500-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto/files/roboto-cyrillic-500-normal.woff") format("woff"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } @@ -281,8 +281,8 @@ font-display: swap; font-weight: 500; src: - url("node_modules/@fontsource/roboto/files/roboto-greek-ext-500-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto/files/roboto-greek-ext-500-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto/files/roboto-greek-ext-500-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto/files/roboto-greek-ext-500-normal.woff") format("woff"); unicode-range: U+1F00-1FFF; } @@ -293,8 +293,8 @@ font-display: swap; font-weight: 500; src: - url("node_modules/@fontsource/roboto/files/roboto-greek-500-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto/files/roboto-greek-500-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto/files/roboto-greek-500-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto/files/roboto-greek-500-normal.woff") format("woff"); unicode-range: U+0370-03FF; } @@ -305,8 +305,8 @@ font-display: swap; font-weight: 500; src: - url("node_modules/@fontsource/roboto/files/roboto-vietnamese-500-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto/files/roboto-vietnamese-500-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto/files/roboto-vietnamese-500-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto/files/roboto-vietnamese-500-normal.woff") format("woff"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; } @@ -317,8 +317,8 @@ font-display: swap; font-weight: 500; src: - url("node_modules/@fontsource/roboto/files/roboto-latin-ext-500-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto/files/roboto-latin-ext-500-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto/files/roboto-latin-ext-500-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto/files/roboto-latin-ext-500-normal.woff") format("woff"); unicode-range: U+0100-02AF, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; } @@ -329,8 +329,8 @@ font-display: swap; font-weight: 500; src: - url("node_modules/@fontsource/roboto/files/roboto-latin-500-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto/files/roboto-latin-500-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto/files/roboto-latin-500-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto/files/roboto-latin-500-normal.woff") format("woff"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } @@ -341,8 +341,8 @@ font-display: swap; font-weight: 700; src: - url("node_modules/@fontsource/roboto/files/roboto-cyrillic-ext-700-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto/files/roboto-cyrillic-ext-700-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto/files/roboto-cyrillic-ext-700-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto/files/roboto-cyrillic-ext-700-normal.woff") format("woff"); unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; } @@ -353,8 +353,8 @@ font-display: swap; font-weight: 700; src: - url("node_modules/@fontsource/roboto/files/roboto-cyrillic-700-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto/files/roboto-cyrillic-700-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto/files/roboto-cyrillic-700-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto/files/roboto-cyrillic-700-normal.woff") format("woff"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } @@ -365,8 +365,8 @@ font-display: swap; font-weight: 700; src: - url("node_modules/@fontsource/roboto/files/roboto-greek-ext-700-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto/files/roboto-greek-ext-700-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto/files/roboto-greek-ext-700-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto/files/roboto-greek-ext-700-normal.woff") format("woff"); unicode-range: U+1F00-1FFF; } @@ -377,8 +377,8 @@ font-display: swap; font-weight: 700; src: - url("node_modules/@fontsource/roboto/files/roboto-greek-700-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto/files/roboto-greek-700-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto/files/roboto-greek-700-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto/files/roboto-greek-700-normal.woff") format("woff"); unicode-range: U+0370-03FF; } @@ -389,8 +389,8 @@ font-display: swap; font-weight: 700; src: - url("node_modules/@fontsource/roboto/files/roboto-vietnamese-700-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto/files/roboto-vietnamese-700-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto/files/roboto-vietnamese-700-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto/files/roboto-vietnamese-700-normal.woff") format("woff"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; } @@ -401,8 +401,8 @@ font-display: swap; font-weight: 700; src: - url("node_modules/@fontsource/roboto/files/roboto-latin-ext-700-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto/files/roboto-latin-ext-700-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto/files/roboto-latin-ext-700-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto/files/roboto-latin-ext-700-normal.woff") format("woff"); unicode-range: U+0100-02AF, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; } @@ -413,8 +413,8 @@ font-display: swap; font-weight: 700; src: - url("node_modules/@fontsource/roboto/files/roboto-latin-700-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto/files/roboto-latin-700-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto/files/roboto-latin-700-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto/files/roboto-latin-700-normal.woff") format("woff"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } @@ -425,8 +425,8 @@ font-display: swap; font-weight: 300; src: - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-cyrillic-ext-300-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-cyrillic-ext-300-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-cyrillic-ext-300-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-cyrillic-ext-300-normal.woff") format("woff"); unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; } @@ -437,8 +437,8 @@ font-display: swap; font-weight: 300; src: - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-cyrillic-300-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-cyrillic-300-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-cyrillic-300-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-cyrillic-300-normal.woff") format("woff"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } @@ -449,8 +449,8 @@ font-display: swap; font-weight: 300; src: - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-greek-ext-300-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-greek-ext-300-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-greek-ext-300-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-greek-ext-300-normal.woff") format("woff"); unicode-range: U+1F00-1FFF; } @@ -461,8 +461,8 @@ font-display: swap; font-weight: 300; src: - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-greek-300-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-greek-300-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-greek-300-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-greek-300-normal.woff") format("woff"); unicode-range: U+0370-03FF; } @@ -473,8 +473,8 @@ font-display: swap; font-weight: 300; src: - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-vietnamese-300-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-vietnamese-300-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-vietnamese-300-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-vietnamese-300-normal.woff") format("woff"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; } @@ -485,8 +485,8 @@ font-display: swap; font-weight: 300; src: - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-latin-ext-300-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-latin-ext-300-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-latin-ext-300-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-latin-ext-300-normal.woff") format("woff"); unicode-range: U+0100-02AF, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; } @@ -497,8 +497,8 @@ font-display: swap; font-weight: 300; src: - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-latin-300-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-latin-300-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-latin-300-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-latin-300-normal.woff") format("woff"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } @@ -509,8 +509,8 @@ font-display: swap; font-weight: 400; src: - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-cyrillic-ext-400-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-cyrillic-ext-400-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-cyrillic-ext-400-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-cyrillic-ext-400-normal.woff") format("woff"); unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; } @@ -521,8 +521,8 @@ font-display: swap; font-weight: 400; src: - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-cyrillic-400-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-cyrillic-400-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-cyrillic-400-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-cyrillic-400-normal.woff") format("woff"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } @@ -533,8 +533,8 @@ font-display: swap; font-weight: 400; src: - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-greek-ext-400-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-greek-ext-400-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-greek-ext-400-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-greek-ext-400-normal.woff") format("woff"); unicode-range: U+1F00-1FFF; } @@ -545,8 +545,8 @@ font-display: swap; font-weight: 400; src: - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-greek-400-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-greek-400-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-greek-400-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-greek-400-normal.woff") format("woff"); unicode-range: U+0370-03FF; } @@ -557,8 +557,8 @@ font-display: swap; font-weight: 400; src: - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-vietnamese-400-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-vietnamese-400-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-vietnamese-400-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-vietnamese-400-normal.woff") format("woff"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; } @@ -569,8 +569,8 @@ font-display: swap; font-weight: 400; src: - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-latin-ext-400-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-latin-ext-400-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-latin-ext-400-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-latin-ext-400-normal.woff") format("woff"); unicode-range: U+0100-02AF, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; } @@ -581,8 +581,8 @@ font-display: swap; font-weight: 400; src: - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-latin-400-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-latin-400-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-latin-400-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-latin-400-normal.woff") format("woff"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } @@ -593,8 +593,8 @@ font-display: swap; font-weight: 700; src: - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-cyrillic-ext-700-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-cyrillic-ext-700-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-cyrillic-ext-700-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-cyrillic-ext-700-normal.woff") format("woff"); unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; } @@ -605,8 +605,8 @@ font-display: swap; font-weight: 700; src: - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-cyrillic-700-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-cyrillic-700-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-cyrillic-700-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-cyrillic-700-normal.woff") format("woff"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } @@ -617,8 +617,8 @@ font-display: swap; font-weight: 700; src: - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-greek-ext-700-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-greek-ext-700-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-greek-ext-700-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-greek-ext-700-normal.woff") format("woff"); unicode-range: U+1F00-1FFF; } @@ -629,8 +629,8 @@ font-display: swap; font-weight: 700; src: - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-greek-700-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-greek-700-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-greek-700-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-greek-700-normal.woff") format("woff"); unicode-range: U+0370-03FF; } @@ -641,8 +641,8 @@ font-display: swap; font-weight: 700; src: - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-vietnamese-700-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-vietnamese-700-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-vietnamese-700-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-vietnamese-700-normal.woff") format("woff"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; } @@ -653,8 +653,8 @@ font-display: swap; font-weight: 700; src: - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-latin-ext-700-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-latin-ext-700-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-latin-ext-700-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-latin-ext-700-normal.woff") format("woff"); unicode-range: U+0100-02AF, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; } @@ -665,7 +665,7 @@ font-display: swap; font-weight: 700; src: - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-latin-700-normal.woff2") format("woff2"), - url("node_modules/@fontsource/roboto-condensed/files/roboto-condensed-latin-700-normal.woff") format("woff"); + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-latin-700-normal.woff2") format("woff2"), + url("../node_modules/@fontsource/roboto-condensed/files/roboto-condensed-latin-700-normal.woff") format("woff"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } diff --git a/fonts/package-lock.json b/fonts/package-lock.json deleted file mode 100644 index 0e5c7452..00000000 --- a/fonts/package-lock.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "magicmirror-fonts", - "version": "1.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "magicmirror-fonts", - "version": "1.0.0", - "license": "MIT", - "dependencies": { - "@fontsource/roboto": "^5.2.5", - "@fontsource/roboto-condensed": "^5.2.5" - } - }, - "node_modules/@fontsource/roboto": { - "version": "5.2.5", - "resolved": "https://registry.npmjs.org/@fontsource/roboto/-/roboto-5.2.5.tgz", - "integrity": "sha512-70r2UZ0raqLn5W+sPeKhqlf8wGvUXFWlofaDlcbt/S3d06+17gXKr3VNqDODB0I1ASme3dGT5OJj9NABt7OTZQ==", - "license": "OFL-1.1", - "funding": { - "url": "https://github.com/sponsors/ayuhito" - } - }, - "node_modules/@fontsource/roboto-condensed": { - "version": "5.2.5", - "resolved": "https://registry.npmjs.org/@fontsource/roboto-condensed/-/roboto-condensed-5.2.5.tgz", - "integrity": "sha512-FVubmVJpZ2js2+nCBEA3IOHhAgWmZ2/YKvTae0X25jlxbd85umOOvUIY6FL6OMpUvIgvwOImS9l0GJjzEPk+mg==", - "license": "OFL-1.1", - "funding": { - "url": "https://github.com/sponsors/ayuhito" - } - } - } -} diff --git a/fonts/package.json b/fonts/package.json deleted file mode 100644 index 62d73e15..00000000 --- a/fonts/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "magicmirror-fonts", - "version": "1.0.0", - "description": "Package for fonts use by MagicMirror² core.", - "bugs": { - "url": "https://github.com/MagicMirrorOrg/MagicMirror/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/MagicMirrorOrg/MagicMirror" - }, - "license": "MIT", - "dependencies": { - "@fontsource/roboto": "^5.2.5", - "@fontsource/roboto-condensed": "^5.2.5" - } -} diff --git a/index.html b/index.html index df64a082..de29247d 100644 --- a/index.html +++ b/index.html @@ -12,8 +12,8 @@ - - + + - + - + diff --git a/js/loader.js b/js/loader.js index 2380b02e..d43dcb72 100644 --- a/js/loader.js +++ b/js/loader.js @@ -260,7 +260,7 @@ const Loader = (function () { // This file is available in the vendor folder. // Load it from this vendor folder. loadedFiles.push(fileName.toLowerCase()); - return loadFile(`vendor/${vendor[fileName]}`); + return loadFile(`${vendor[fileName]}`); } // File not loaded yet. diff --git a/js/server.js b/js/server.js index dd8b7b2e..a15c811d 100644 --- a/js/server.js +++ b/js/server.js @@ -6,10 +6,11 @@ const express = require("express"); const ipfilter = require("express-ipfilter").IpFilter; const helmet = require("helmet"); const socketio = require("socket.io"); - const Log = require("logger"); const { cors, getConfig, getHtml, getVersion, getStartup, getEnvVars } = require("./server_functions"); +const vendor = require(`${__dirname}/vendor`); + /** * Server * @param {object} config The MM config @@ -72,8 +73,13 @@ function Server (config) { app.use(helmet(config.httpHeaders)); app.use("/js", express.static(__dirname)); - let directories = ["/config", "/css", "/fonts", "/modules", "/vendor", "/translations", "/tests/configs", "/tests/mocks"]; - for (const directory of directories) { + let directories = ["/config", "/css", "/modules", "/node_modules/animate.css", "/node_modules/@fontsource", "/node_modules/@fortawesome", "/translations", "/tests/configs", "/tests/mocks"]; + for (const [key, value] of Object.entries(vendor)) { + const dirArr = value.split("/"); + if (dirArr[0] === "node_modules") directories.push(`/${dirArr[0]}/${dirArr[1]}`); + } + const uniqDirs = [...new Set(directories)]; + for (const directory of uniqDirs) { app.use(directory, express.static(path.resolve(global.root_path + directory))); } diff --git a/vendor/vendor.js b/js/vendor.js similarity index 100% rename from vendor/vendor.js rename to js/vendor.js diff --git a/package-lock.json b/package-lock.json index 87ea69a0..5f77251d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,11 +7,15 @@ "": { "name": "magicmirror", "version": "2.32.0-develop", - "hasInstallScript": true, "license": "MIT", "dependencies": { + "@fontsource/roboto": "^5.2.5", + "@fontsource/roboto-condensed": "^5.2.5", + "@fortawesome/fontawesome-free": "^6.7.2", "ajv": "^8.17.1", + "animate.css": "^4.1.1", "console-stamp": "^3.1.2", + "croner": "^9.0.0", "envsub": "^4.1.0", "eslint": "^9.27.0", "express": "^5.1.0", @@ -22,12 +26,15 @@ "iconv-lite": "^0.6.3", "module-alias": "^2.2.3", "moment": "^2.30.1", + "moment-timezone": "^0.5.48", "node-ical": "^0.20.1", + "nunjucks": "^3.2.4", "pm2": "^6.0.6", "socket.io": "^4.8.1", "suncalc": "^1.9.0", "systeminformation": "^5.26.1", - "undici": "^7.10.0" + "undici": "^7.10.0", + "weathericons": "^2.1.0" }, "devDependencies": { "@stylistic/eslint-plugin": "^4.2.0", @@ -1665,6 +1672,33 @@ "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, + "node_modules/@fontsource/roboto": { + "version": "5.2.5", + "resolved": "https://registry.npmjs.org/@fontsource/roboto/-/roboto-5.2.5.tgz", + "integrity": "sha512-70r2UZ0raqLn5W+sPeKhqlf8wGvUXFWlofaDlcbt/S3d06+17gXKr3VNqDODB0I1ASme3dGT5OJj9NABt7OTZQ==", + "license": "OFL-1.1", + "funding": { + "url": "https://github.com/sponsors/ayuhito" + } + }, + "node_modules/@fontsource/roboto-condensed": { + "version": "5.2.5", + "resolved": "https://registry.npmjs.org/@fontsource/roboto-condensed/-/roboto-condensed-5.2.5.tgz", + "integrity": "sha512-FVubmVJpZ2js2+nCBEA3IOHhAgWmZ2/YKvTae0X25jlxbd85umOOvUIY6FL6OMpUvIgvwOImS9l0GJjzEPk+mg==", + "license": "OFL-1.1", + "funding": { + "url": "https://github.com/sponsors/ayuhito" + } + }, + "node_modules/@fortawesome/fontawesome-free": { + "version": "6.7.2", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.7.2.tgz", + "integrity": "sha512-JUOtgFW6k9u4Y+xeIaEiLr3+cjoUPiAuLXoyKOJSia6Duzb7pq+A76P9ZdPDoAoxHdHzq6gE9/jKBGXlZT8FbA==", + "license": "(CC-BY-4.0 AND OFL-1.1 AND MIT)", + "engines": { + "node": ">=6" + } + }, "node_modules/@humanfs/core": { "version": "0.19.1", "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", @@ -3227,6 +3261,12 @@ "win32" ] }, + "node_modules/a-sync-waterfall": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/a-sync-waterfall/-/a-sync-waterfall-1.0.1.tgz", + "integrity": "sha512-RYTOHHdWipFUliRFMCS4X2Yn2X8M87V/OpSqWzKKOGhzqyUxzyVmhHDH9sAvG+ZuQf/TAOFsLCpMw09I1ufUnA==", + "license": "MIT" + }, "node_modules/accepts": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz", @@ -3301,6 +3341,12 @@ "amp": "0.3.1" } }, + "node_modules/animate.css": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/animate.css/-/animate.css-4.1.1.tgz", + "integrity": "sha512-+mRmCTv6SbCmtYJCN4faJMNFVNN5EuCTTprDTAo7YzIGji2KADmakjVA3+8mVDkZ2Bf09vayB35lSQIex2+QaQ==", + "license": "MIT" + }, "node_modules/ansi-colors": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", @@ -3455,6 +3501,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", + "license": "MIT" + }, "node_modules/ast-types": { "version": "0.13.4", "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz", @@ -4591,10 +4643,13 @@ } }, "node_modules/croner": { - "version": "4.1.97", - "resolved": "https://registry.npmjs.org/croner/-/croner-4.1.97.tgz", - "integrity": "sha512-/f6gpQuxDaqXu+1kwQYSckUglPaOrHdbIlBAu0YuW8/Cdb45XwXYNUBXg3r/9Mo6n540Kn/smKcZWko5x99KrQ==", - "license": "MIT" + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/croner/-/croner-9.0.0.tgz", + "integrity": "sha512-onMB0OkDjkXunhdW9htFjEhqrD54+M94i6ackoUkjHKbRnXdyEyKRelp4nJ1kAz32+s27jP1FsebpJCVl0BsvA==", + "license": "MIT", + "engines": { + "node": ">=18.0" + } }, "node_modules/cross-spawn": { "version": "7.0.6", @@ -10474,6 +10529,40 @@ "node": ">=8" } }, + "node_modules/nunjucks": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/nunjucks/-/nunjucks-3.2.4.tgz", + "integrity": "sha512-26XRV6BhkgK0VOxfbU5cQI+ICFUtMLixv1noZn1tGU38kQH5A5nmmbk/O45xdyBhD1esk47nKrY0mvQpZIhRjQ==", + "license": "BSD-2-Clause", + "dependencies": { + "a-sync-waterfall": "^1.0.0", + "asap": "^2.0.3", + "commander": "^5.1.0" + }, + "bin": { + "nunjucks-precompile": "bin/precompile" + }, + "engines": { + "node": ">= 6.9.0" + }, + "peerDependencies": { + "chokidar": "^3.3.0" + }, + "peerDependenciesMeta": { + "chokidar": { + "optional": true + } + } + }, + "node_modules/nunjucks/node_modules/commander": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, "node_modules/nwsapi": { "version": "2.2.20", "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.20.tgz", @@ -11197,6 +11286,12 @@ "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", "license": "MIT" }, + "node_modules/pm2/node_modules/croner": { + "version": "4.1.97", + "resolved": "https://registry.npmjs.org/croner/-/croner-4.1.97.tgz", + "integrity": "sha512-/f6gpQuxDaqXu+1kwQYSckUglPaOrHdbIlBAu0YuW8/Cdb45XwXYNUBXg3r/9Mo6n540Kn/smKcZWko5x99KrQ==", + "license": "MIT" + }, "node_modules/pm2/node_modules/source-map-support": { "version": "0.5.21", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", @@ -13952,6 +14047,12 @@ "makeerror": "1.0.12" } }, + "node_modules/weathericons": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/weathericons/-/weathericons-2.1.0.tgz", + "integrity": "sha512-V45viuyuQQOuoePTqzxvP/wBpYALWkD695fkFvqpn+BiMyo64fFlyDbP2A8umZyFyz1cXFPNw1pWqeaSaQqJlQ==", + "license": "MIT" + }, "node_modules/webidl-conversions": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", diff --git a/package.json b/package.json index 60c70397..e2839b00 100644 --- a/package.json +++ b/package.json @@ -25,15 +25,12 @@ "main": "js/electron.js", "scripts": { "config:check": "node js/check_config.js", - "install-fonts": "echo \"Installing fonts ...\n\" && cd fonts && npm install --loglevel=error --no-audit --no-fund --no-update-notifier", "install-mm": "npm install --no-audit --no-fund --no-update-notifier --only=prod --omit=dev", "install-mm:dev": "npm install --no-audit --no-fund --no-update-notifier", - "install-vendor": "echo \"Installing vendor files ...\n\" && cd vendor && npm install --loglevel=error --no-audit --no-fund --no-update-notifier", - "lint:css": "stylelint 'css/main.css' 'fonts/*.css' 'modules/default/**/*.css' 'vendor/*.css' --fix", + "lint:css": "stylelint 'css/main.css' 'css/roboto.css' 'css/font-awesome.css' 'modules/default/**/*.css' --fix", "lint:js": "eslint --fix", "lint:markdown": "markdownlint-cli2 . --fix", "lint:prettier": "prettier . --write", - "postinstall": "node --run install-vendor && node --run install-fonts && echo \"MagicMirror² installation finished successfully! \n\"", "prepare": "[ -f node_modules/.bin/husky ] && husky || echo no husky installed.", "server": "node ./serveronly", "start": "node --run start:x11", @@ -47,7 +44,7 @@ "test": "NODE_ENV=test jest -i --forceExit", "test:calendar": "node ./modules/default/calendar/debug.js", "test:coverage": "NODE_ENV=test jest --coverage -i --verbose false --forceExit", - "test:css": "stylelint 'css/main.css' 'fonts/*.css' 'modules/default/**/*.css' 'vendor/*.css'", + "test:css": "stylelint 'css/main.css' 'css/roboto.css' 'css/font-awesome.css' 'modules/default/**/*.css'", "test:e2e": "NODE_ENV=test jest --selectProjects e2e -i --forceExit", "test:electron": "NODE_ENV=test jest --selectProjects electron -i --forceExit", "test:js": "eslint", @@ -62,8 +59,13 @@ "*.css": "stylelint --fix" }, "dependencies": { + "@fontsource/roboto": "^5.2.5", + "@fontsource/roboto-condensed": "^5.2.5", + "@fortawesome/fontawesome-free": "^6.7.2", "ajv": "^8.17.1", + "animate.css": "^4.1.1", "console-stamp": "^3.1.2", + "croner": "^9.0.0", "envsub": "^4.1.0", "eslint": "^9.27.0", "express": "^5.1.0", @@ -74,12 +76,15 @@ "iconv-lite": "^0.6.3", "module-alias": "^2.2.3", "moment": "^2.30.1", + "moment-timezone": "^0.5.48", "node-ical": "^0.20.1", + "nunjucks": "^3.2.4", "pm2": "^6.0.6", "socket.io": "^4.8.1", "suncalc": "^1.9.0", "systeminformation": "^5.26.1", - "undici": "^7.10.0" + "undici": "^7.10.0", + "weathericons": "^2.1.0" }, "devDependencies": { "@stylistic/eslint-plugin": "^4.2.0", diff --git a/tests/e2e/fonts_spec.js b/tests/e2e/fonts_spec.js index 80e3e340..e09f745a 100644 --- a/tests/e2e/fonts_spec.js +++ b/tests/e2e/fonts_spec.js @@ -3,7 +3,7 @@ const helpers = require("./helpers/global-setup"); describe("All font files from roboto.css should be downloadable", () => { const fontFiles = []; // Statements below filters out all 'url' lines in the CSS file - const fileContent = require("node:fs").readFileSync(`${__dirname}/../../fonts/roboto.css`, "utf8"); + const fileContent = require("node:fs").readFileSync(`${__dirname}/../../css/roboto.css`, "utf8"); const regex = /\burl\(['"]([^'"]+)['"]\)/g; let match = regex.exec(fileContent); while (match !== null) { diff --git a/tests/e2e/vendor_spec.js b/tests/e2e/vendor_spec.js index 49d3ab85..bd4407ed 100644 --- a/tests/e2e/vendor_spec.js +++ b/tests/e2e/vendor_spec.js @@ -9,22 +9,14 @@ describe("Vendors", () => { }); describe("Get list vendors", () => { - const vendors = require(`${__dirname}/../../vendor/vendor.js`); + const vendors = require(`${__dirname}/../../js/vendor.js`); Object.keys(vendors).forEach((vendor) => { it(`should return 200 HTTP code for vendor "${vendor}"`, async () => { - const urlVendor = `http://localhost:8080/vendor/${vendors[vendor]}`; + const urlVendor = `http://localhost:8080/${vendors[vendor]}`; const res = await fetch(urlVendor); expect(res.status).toBe(200); }); }); - - Object.keys(vendors).forEach((vendor) => { - it(`should return 404 HTTP code for vendor https://localhost/"${vendor}"`, async () => { - const urlVendor = `http://localhost:8080/${vendors[vendor]}`; - const res = await fetch(urlVendor); - expect(res.status).toBe(404); - }); - }); }); }); diff --git a/vendor/package-lock.json b/vendor/package-lock.json deleted file mode 100644 index 220bc63a..00000000 --- a/vendor/package-lock.json +++ /dev/null @@ -1,125 +0,0 @@ -{ - "name": "magicmirror-vendors", - "version": "1.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "magicmirror-vendors", - "version": "1.0.0", - "license": "MIT", - "dependencies": { - "@fortawesome/fontawesome-free": "^6.7.2", - "animate.css": "^4.1.1", - "croner": "^9.0.0", - "moment": "^2.30.1", - "moment-timezone": "^0.5.48", - "nunjucks": "^3.2.4", - "suncalc": "^1.9.0", - "weathericons": "^2.1.0" - } - }, - "node_modules/@fortawesome/fontawesome-free": { - "version": "6.7.2", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.7.2.tgz", - "integrity": "sha512-JUOtgFW6k9u4Y+xeIaEiLr3+cjoUPiAuLXoyKOJSia6Duzb7pq+A76P9ZdPDoAoxHdHzq6gE9/jKBGXlZT8FbA==", - "license": "(CC-BY-4.0 AND OFL-1.1 AND MIT)", - "engines": { - "node": ">=6" - } - }, - "node_modules/a-sync-waterfall": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/a-sync-waterfall/-/a-sync-waterfall-1.0.1.tgz", - "integrity": "sha512-RYTOHHdWipFUliRFMCS4X2Yn2X8M87V/OpSqWzKKOGhzqyUxzyVmhHDH9sAvG+ZuQf/TAOFsLCpMw09I1ufUnA==", - "license": "MIT" - }, - "node_modules/animate.css": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/animate.css/-/animate.css-4.1.1.tgz", - "integrity": "sha512-+mRmCTv6SbCmtYJCN4faJMNFVNN5EuCTTprDTAo7YzIGji2KADmakjVA3+8mVDkZ2Bf09vayB35lSQIex2+QaQ==", - "license": "MIT" - }, - "node_modules/asap": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", - "license": "MIT" - }, - "node_modules/commander": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", - "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "node_modules/croner": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/croner/-/croner-9.0.0.tgz", - "integrity": "sha512-onMB0OkDjkXunhdW9htFjEhqrD54+M94i6ackoUkjHKbRnXdyEyKRelp4nJ1kAz32+s27jP1FsebpJCVl0BsvA==", - "license": "MIT", - "engines": { - "node": ">=18.0" - } - }, - "node_modules/moment": { - "version": "2.30.1", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", - "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==", - "license": "MIT", - "engines": { - "node": "*" - } - }, - "node_modules/moment-timezone": { - "version": "0.5.48", - "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.48.tgz", - "integrity": "sha512-f22b8LV1gbTO2ms2j2z13MuPogNoh5UzxL3nzNAYKGraILnbGc9NEE6dyiiiLv46DGRb8A4kg8UKWLjPthxBHw==", - "license": "MIT", - "dependencies": { - "moment": "^2.29.4" - }, - "engines": { - "node": "*" - } - }, - "node_modules/nunjucks": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/nunjucks/-/nunjucks-3.2.4.tgz", - "integrity": "sha512-26XRV6BhkgK0VOxfbU5cQI+ICFUtMLixv1noZn1tGU38kQH5A5nmmbk/O45xdyBhD1esk47nKrY0mvQpZIhRjQ==", - "license": "BSD-2-Clause", - "dependencies": { - "a-sync-waterfall": "^1.0.0", - "asap": "^2.0.3", - "commander": "^5.1.0" - }, - "bin": { - "nunjucks-precompile": "bin/precompile" - }, - "engines": { - "node": ">= 6.9.0" - }, - "peerDependencies": { - "chokidar": "^3.3.0" - }, - "peerDependenciesMeta": { - "chokidar": { - "optional": true - } - } - }, - "node_modules/suncalc": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/suncalc/-/suncalc-1.9.0.tgz", - "integrity": "sha512-vMJ8Byp1uIPoj+wb9c1AdK4jpkSKVAywgHX0lqY7zt6+EWRRC3Z+0Ucfjy/0yxTVO1hwwchZe4uoFNqrIC24+A==" - }, - "node_modules/weathericons": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/weathericons/-/weathericons-2.1.0.tgz", - "integrity": "sha512-V45viuyuQQOuoePTqzxvP/wBpYALWkD695fkFvqpn+BiMyo64fFlyDbP2A8umZyFyz1cXFPNw1pWqeaSaQqJlQ==", - "license": "MIT" - } - } -} diff --git a/vendor/package.json b/vendor/package.json deleted file mode 100644 index 4f5ad311..00000000 --- a/vendor/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "magicmirror-vendors", - "version": "1.0.0", - "description": "Package for vendors use by MagicMirror² core.", - "bugs": { - "url": "https://github.com/MagicMirrorOrg/MagicMirror/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/MagicMirrorOrg/MagicMirror" - }, - "license": "MIT", - "dependencies": { - "@fortawesome/fontawesome-free": "^6.7.2", - "animate.css": "^4.1.1", - "croner": "^9.0.0", - "moment": "^2.30.1", - "moment-timezone": "^0.5.48", - "nunjucks": "^3.2.4", - "suncalc": "^1.9.0", - "weathericons": "^2.1.0" - } -}