mirror of
https://github.com/home-assistant/frontend.git
synced 2025-08-12 10:49:25 +00:00
Compare commits
8 Commits
20250730.0
...
gulp-ts
Author | SHA1 | Date | |
---|---|---|---|
![]() |
efece17f50 | ||
![]() |
79e5c59fdf | ||
![]() |
0aa34a14dd | ||
![]() |
1ced9959fa | ||
![]() |
1b67a6f358 | ||
![]() |
62f2b286ae | ||
![]() |
8f7760f88f | ||
![]() |
ff3b65605e |
4
.github/workflows/cast_deployment.yaml
vendored
4
.github/workflows/cast_deployment.yaml
vendored
@@ -35,7 +35,7 @@ jobs:
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: Build Cast
|
||||
run: ./node_modules/.bin/gulp build-cast
|
||||
run: yarn run-task build-cast
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -70,7 +70,7 @@ jobs:
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: Build Cast
|
||||
run: ./node_modules/.bin/gulp build-cast
|
||||
run: yarn run-task build-cast
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
|
8
.github/workflows/ci.yaml
vendored
8
.github/workflows/ci.yaml
vendored
@@ -35,7 +35,7 @@ jobs:
|
||||
- name: Check for duplicate dependencies
|
||||
run: yarn dedupe --check
|
||||
- name: Build resources
|
||||
run: ./node_modules/.bin/gulp gen-icons-json build-translations build-locale-data gather-gallery-pages
|
||||
run: yarn run-task gen-icons-json build-translations build-locale-data gather-gallery-pages
|
||||
- name: Setup lint cache
|
||||
uses: actions/cache@v4.2.3
|
||||
with:
|
||||
@@ -67,7 +67,7 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: yarn install --immutable
|
||||
- name: Build resources
|
||||
run: ./node_modules/.bin/gulp gen-icons-json build-translations build-locale-data
|
||||
run: yarn run-task gen-icons-json build-translations build-locale-data
|
||||
- name: Run Tests
|
||||
run: yarn run test
|
||||
build:
|
||||
@@ -85,7 +85,7 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: yarn install --immutable
|
||||
- name: Build Application
|
||||
run: ./node_modules/.bin/gulp build-app
|
||||
run: yarn run-task build-app
|
||||
env:
|
||||
IS_TEST: "true"
|
||||
- name: Upload bundle stats
|
||||
@@ -109,7 +109,7 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: yarn install --immutable
|
||||
- name: Build Application
|
||||
run: ./node_modules/.bin/gulp build-hassio
|
||||
run: yarn run-task build-hassio
|
||||
env:
|
||||
IS_TEST: "true"
|
||||
- name: Upload bundle stats
|
||||
|
4
.github/workflows/demo_deployment.yaml
vendored
4
.github/workflows/demo_deployment.yaml
vendored
@@ -36,7 +36,7 @@ jobs:
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: Build Demo
|
||||
run: ./node_modules/.bin/gulp build-demo
|
||||
run: yarn run-task build-demo
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -71,7 +71,7 @@ jobs:
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: Build Demo
|
||||
run: ./node_modules/.bin/gulp build-demo
|
||||
run: yarn run-task build-demo
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
|
2
.github/workflows/design_deployment.yaml
vendored
2
.github/workflows/design_deployment.yaml
vendored
@@ -28,7 +28,7 @@ jobs:
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: Build Gallery
|
||||
run: ./node_modules/.bin/gulp build-gallery
|
||||
run: yarn run-task build-gallery
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
|
2
.github/workflows/design_preview.yaml
vendored
2
.github/workflows/design_preview.yaml
vendored
@@ -33,7 +33,7 @@ jobs:
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: Build Gallery
|
||||
run: ./node_modules/.bin/gulp build-gallery
|
||||
run: yarn run-task build-gallery
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import defineProvider from "@babel/helper-define-polyfill-provider";
|
||||
import { join } from "node:path";
|
||||
import paths from "../paths.cjs";
|
||||
import paths from "../paths";
|
||||
|
||||
const POLYFILL_DIR = join(paths.root_dir, "src/resources/polyfills");
|
||||
|
@@ -1,42 +1,41 @@
|
||||
const path = require("path");
|
||||
const env = require("./env.cjs");
|
||||
const paths = require("./paths.cjs");
|
||||
const { dependencies } = require("../package.json");
|
||||
import path from "node:path";
|
||||
import packageJson from "../package.json" assert { type: "json" };
|
||||
import { version } from "./env.ts";
|
||||
import paths, { dirname } from "./paths.ts";
|
||||
|
||||
const BABEL_PLUGINS = path.join(__dirname, "babel-plugins");
|
||||
const dependencies = packageJson.dependencies;
|
||||
|
||||
const BABEL_PLUGINS = path.join(dirname, "babel-plugins");
|
||||
|
||||
// GitHub base URL to use for production source maps
|
||||
// Nightly builds use the commit SHA, otherwise assumes there is a tag that matches the version
|
||||
module.exports.sourceMapURL = () => {
|
||||
const ref = env.version().endsWith("dev")
|
||||
export const sourceMapURL = () => {
|
||||
const ref = version().endsWith("dev")
|
||||
? process.env.GITHUB_SHA || "dev"
|
||||
: env.version();
|
||||
: version();
|
||||
return `https://raw.githubusercontent.com/home-assistant/frontend/${ref}/`;
|
||||
};
|
||||
|
||||
// Files from NPM Packages that should not be imported
|
||||
module.exports.ignorePackages = () => [];
|
||||
|
||||
// Files from NPM packages that we should replace with empty file
|
||||
module.exports.emptyPackages = ({ isHassioBuild }) =>
|
||||
export const emptyPackages = ({ isHassioBuild }) =>
|
||||
[
|
||||
require.resolve("@vaadin/vaadin-material-styles/typography.js"),
|
||||
require.resolve("@vaadin/vaadin-material-styles/font-icons.js"),
|
||||
import.meta.resolve("@vaadin/vaadin-material-styles/typography.js"),
|
||||
import.meta.resolve("@vaadin/vaadin-material-styles/font-icons.js"),
|
||||
// Icons in supervisor conflict with icons in HA so we don't load.
|
||||
isHassioBuild &&
|
||||
require.resolve(
|
||||
import.meta.resolve(
|
||||
path.resolve(paths.root_dir, "src/components/ha-icon.ts")
|
||||
),
|
||||
isHassioBuild &&
|
||||
require.resolve(
|
||||
import.meta.resolve(
|
||||
path.resolve(paths.root_dir, "src/components/ha-icon-picker.ts")
|
||||
),
|
||||
].filter(Boolean);
|
||||
|
||||
module.exports.definedVars = ({ isProdBuild, latestBuild, defineOverlay }) => ({
|
||||
export const definedVars = ({ isProdBuild, latestBuild, defineOverlay }) => ({
|
||||
__DEV__: !isProdBuild,
|
||||
__BUILD__: JSON.stringify(latestBuild ? "modern" : "legacy"),
|
||||
__VERSION__: JSON.stringify(env.version()),
|
||||
__VERSION__: JSON.stringify(version()),
|
||||
__DEMO__: false,
|
||||
__SUPERVISOR__: false,
|
||||
__BACKWARDS_COMPAT__: false,
|
||||
@@ -53,7 +52,7 @@ module.exports.definedVars = ({ isProdBuild, latestBuild, defineOverlay }) => ({
|
||||
...defineOverlay,
|
||||
});
|
||||
|
||||
module.exports.htmlMinifierOptions = {
|
||||
export const htmlMinifierOptions = {
|
||||
caseSensitive: true,
|
||||
collapseWhitespace: true,
|
||||
conservativeCollapse: true,
|
||||
@@ -65,16 +64,16 @@ module.exports.htmlMinifierOptions = {
|
||||
},
|
||||
};
|
||||
|
||||
module.exports.terserOptions = ({ latestBuild, isTestBuild }) => ({
|
||||
export const terserOptions = ({ latestBuild, isTestBuild }) => ({
|
||||
safari10: !latestBuild,
|
||||
ecma: latestBuild ? 2015 : 5,
|
||||
ecma: latestBuild ? (2015 as const) : (5 as const),
|
||||
module: latestBuild,
|
||||
format: { comments: false },
|
||||
sourceMap: !isTestBuild,
|
||||
});
|
||||
|
||||
/** @type {import('@rspack/core').SwcLoaderOptions} */
|
||||
module.exports.swcOptions = () => ({
|
||||
export const swcOptions = () => ({
|
||||
jsc: {
|
||||
loose: true,
|
||||
externalHelpers: true,
|
||||
@@ -86,11 +85,16 @@ module.exports.swcOptions = () => ({
|
||||
},
|
||||
});
|
||||
|
||||
module.exports.babelOptions = ({
|
||||
export const babelOptions = ({
|
||||
latestBuild,
|
||||
isProdBuild,
|
||||
isTestBuild,
|
||||
sw,
|
||||
}: {
|
||||
latestBuild?: boolean;
|
||||
isProdBuild?: boolean;
|
||||
isTestBuild?: boolean;
|
||||
sw?: boolean;
|
||||
}) => ({
|
||||
babelrc: false,
|
||||
compact: false,
|
||||
@@ -137,7 +141,7 @@ module.exports.babelOptions = ({
|
||||
"@polymer/polymer/lib/utils/html-tag.js": ["html"],
|
||||
},
|
||||
strictCSS: true,
|
||||
htmlMinifier: module.exports.htmlMinifierOptions,
|
||||
htmlMinifier: htmlMinifierOptions,
|
||||
failOnError: false, // we can turn this off in case of false positives
|
||||
},
|
||||
],
|
||||
@@ -160,7 +164,7 @@ module.exports.babelOptions = ({
|
||||
// themselves to prevent self-injection.
|
||||
plugins: [
|
||||
[
|
||||
path.join(BABEL_PLUGINS, "custom-polyfill-plugin.js"),
|
||||
path.join(BABEL_PLUGINS, "custom-polyfill-plugin.ts"),
|
||||
{ method: "usage-global" },
|
||||
],
|
||||
],
|
||||
@@ -221,8 +225,20 @@ const publicPath = (latestBuild, root = "") =>
|
||||
}
|
||||
*/
|
||||
|
||||
module.exports.config = {
|
||||
app({ isProdBuild, latestBuild, isStatsBuild, isTestBuild, isWDS }) {
|
||||
export const config = {
|
||||
app({
|
||||
isProdBuild,
|
||||
latestBuild,
|
||||
isStatsBuild,
|
||||
isTestBuild,
|
||||
isWDS,
|
||||
}: {
|
||||
isProdBuild?: boolean;
|
||||
latestBuild?: boolean;
|
||||
isStatsBuild?: boolean;
|
||||
isTestBuild?: boolean;
|
||||
isWDS?: boolean;
|
||||
}) {
|
||||
return {
|
||||
name: "frontend" + nameSuffix(latestBuild),
|
||||
entry: {
|
||||
@@ -257,7 +273,7 @@ module.exports.config = {
|
||||
outputPath: outputPath(paths.demo_output_root, latestBuild),
|
||||
publicPath: publicPath(latestBuild),
|
||||
defineOverlay: {
|
||||
__VERSION__: JSON.stringify(`DEMO-${env.version()}`),
|
||||
__VERSION__: JSON.stringify(`DEMO-${version()}`),
|
||||
__DEMO__: true,
|
||||
},
|
||||
isProdBuild,
|
||||
@@ -267,7 +283,7 @@ module.exports.config = {
|
||||
},
|
||||
|
||||
cast({ isProdBuild, latestBuild }) {
|
||||
const entry = {
|
||||
const entry: Record<string, string> = {
|
||||
launcher: path.resolve(paths.cast_dir, "src/launcher/entrypoint.ts"),
|
||||
media: path.resolve(paths.cast_dir, "src/media/entrypoint.ts"),
|
||||
};
|
@@ -1,34 +0,0 @@
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
const paths = require("./paths.cjs");
|
||||
|
||||
const isTrue = (value) => value === "1" || value?.toLowerCase() === "true";
|
||||
|
||||
module.exports = {
|
||||
isProdBuild() {
|
||||
return (
|
||||
process.env.NODE_ENV === "production" || module.exports.isStatsBuild()
|
||||
);
|
||||
},
|
||||
isStatsBuild() {
|
||||
return isTrue(process.env.STATS);
|
||||
},
|
||||
isTestBuild() {
|
||||
return isTrue(process.env.IS_TEST);
|
||||
},
|
||||
isNetlify() {
|
||||
return isTrue(process.env.NETLIFY);
|
||||
},
|
||||
version() {
|
||||
const version = fs
|
||||
.readFileSync(path.resolve(paths.root_dir, "pyproject.toml"), "utf8")
|
||||
.match(/version\W+=\W"(\d{8}\.\d(?:\.dev)?)"/);
|
||||
if (!version) {
|
||||
throw Error("Version not found");
|
||||
}
|
||||
return version[1];
|
||||
},
|
||||
isDevContainer() {
|
||||
return isTrue(process.env.DEV_CONTAINER);
|
||||
},
|
||||
};
|
21
build-scripts/env.ts
Normal file
21
build-scripts/env.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import paths from "./paths.ts";
|
||||
|
||||
const isTrue = (value) => value === "1" || value?.toLowerCase() === "true";
|
||||
|
||||
export const isProdBuild = () =>
|
||||
process.env.NODE_ENV === "production" || isStatsBuild();
|
||||
export const isStatsBuild = () => isTrue(process.env.STATS);
|
||||
export const isTestBuild = () => isTrue(process.env.IS_TEST);
|
||||
export const isNetlify = () => isTrue(process.env.NETLIFY);
|
||||
export const version = () => {
|
||||
const pyProjectVersion = fs
|
||||
.readFileSync(path.resolve(paths.root_dir, "pyproject.toml"), "utf8")
|
||||
.match(/version\W+=\W"(\d{8}\.\d(?:\.dev)?)"/);
|
||||
if (!pyProjectVersion) {
|
||||
throw Error("Version not found");
|
||||
}
|
||||
return pyProjectVersion[1];
|
||||
};
|
||||
export const isDevContainer = () => isTrue(process.env.DEV_CONTAINER);
|
@@ -1,57 +0,0 @@
|
||||
import gulp from "gulp";
|
||||
import env from "../env.cjs";
|
||||
import "./clean.js";
|
||||
import "./compress.js";
|
||||
import "./entry-html.js";
|
||||
import "./gather-static.js";
|
||||
import "./gen-icons-json.js";
|
||||
import "./locale-data.js";
|
||||
import "./service-worker.js";
|
||||
import "./translations.js";
|
||||
import "./rspack.js";
|
||||
|
||||
gulp.task(
|
||||
"develop-app",
|
||||
gulp.series(
|
||||
async function setEnv() {
|
||||
process.env.NODE_ENV = "development";
|
||||
},
|
||||
"clean",
|
||||
gulp.parallel(
|
||||
"gen-service-worker-app-dev",
|
||||
"gen-icons-json",
|
||||
"gen-pages-app-dev",
|
||||
"build-translations",
|
||||
"build-locale-data"
|
||||
),
|
||||
"copy-static-app",
|
||||
"rspack-watch-app"
|
||||
)
|
||||
);
|
||||
|
||||
gulp.task(
|
||||
"build-app",
|
||||
gulp.series(
|
||||
async function setEnv() {
|
||||
process.env.NODE_ENV = "production";
|
||||
},
|
||||
"clean",
|
||||
gulp.parallel("gen-icons-json", "build-translations", "build-locale-data"),
|
||||
"copy-static-app",
|
||||
"rspack-prod-app",
|
||||
gulp.parallel("gen-pages-app-prod", "gen-service-worker-app-prod"),
|
||||
// Don't compress running tests
|
||||
...(env.isTestBuild() || env.isStatsBuild() ? [] : ["compress-app"])
|
||||
)
|
||||
);
|
||||
|
||||
gulp.task(
|
||||
"analyze-app",
|
||||
gulp.series(
|
||||
async function setEnv() {
|
||||
process.env.STATS = "1";
|
||||
},
|
||||
"clean",
|
||||
"rspack-prod-app"
|
||||
)
|
||||
);
|
54
build-scripts/gulp/app.ts
Normal file
54
build-scripts/gulp/app.ts
Normal file
@@ -0,0 +1,54 @@
|
||||
import { parallel, series } from "gulp";
|
||||
import { isStatsBuild, isTestBuild } from "../env.ts";
|
||||
import { clean } from "./clean.ts";
|
||||
import { compressApp } from "./compress.ts";
|
||||
import { genPagesAppDev, genPagesAppProd } from "./entry-html.ts";
|
||||
import { copyStaticApp } from "./gather-static.ts";
|
||||
import { genIconsJson } from "./gen-icons-json.ts";
|
||||
import { buildLocaleData } from "./locale-data.ts";
|
||||
import { rspackProdApp, rspackWatchApp } from "./rspack.ts";
|
||||
import {
|
||||
genServiceWorkerAppDev,
|
||||
genServiceWorkerAppProd,
|
||||
} from "./service-worker.ts";
|
||||
import { buildTranslations } from "./translations.ts";
|
||||
|
||||
// develop-app
|
||||
export const developApp = series(
|
||||
async () => {
|
||||
process.env.NODE_ENV = "development";
|
||||
},
|
||||
clean,
|
||||
parallel(
|
||||
genServiceWorkerAppDev,
|
||||
genIconsJson,
|
||||
genPagesAppDev,
|
||||
buildTranslations,
|
||||
buildLocaleData
|
||||
),
|
||||
copyStaticApp,
|
||||
rspackWatchApp
|
||||
);
|
||||
|
||||
// build-app
|
||||
export const buildApp = series(
|
||||
async () => {
|
||||
process.env.NODE_ENV = "production";
|
||||
},
|
||||
clean,
|
||||
parallel(genIconsJson, buildTranslations, buildLocaleData),
|
||||
copyStaticApp,
|
||||
rspackProdApp,
|
||||
parallel(genPagesAppProd, genServiceWorkerAppProd),
|
||||
// Don't compress running tests
|
||||
...(isTestBuild() || isStatsBuild() ? [] : [compressApp])
|
||||
);
|
||||
|
||||
// analyze-app
|
||||
export const analyzeApp = series(
|
||||
async () => {
|
||||
process.env.STATS = "1";
|
||||
},
|
||||
clean,
|
||||
rspackProdApp
|
||||
);
|
@@ -1,37 +0,0 @@
|
||||
import gulp from "gulp";
|
||||
import "./clean.js";
|
||||
import "./entry-html.js";
|
||||
import "./gather-static.js";
|
||||
import "./service-worker.js";
|
||||
import "./translations.js";
|
||||
import "./rspack.js";
|
||||
|
||||
gulp.task(
|
||||
"develop-cast",
|
||||
gulp.series(
|
||||
async function setEnv() {
|
||||
process.env.NODE_ENV = "development";
|
||||
},
|
||||
"clean-cast",
|
||||
"translations-enable-merge-backend",
|
||||
gulp.parallel("gen-icons-json", "build-translations", "build-locale-data"),
|
||||
"copy-static-cast",
|
||||
"gen-pages-cast-dev",
|
||||
"rspack-dev-server-cast"
|
||||
)
|
||||
);
|
||||
|
||||
gulp.task(
|
||||
"build-cast",
|
||||
gulp.series(
|
||||
async function setEnv() {
|
||||
process.env.NODE_ENV = "production";
|
||||
},
|
||||
"clean-cast",
|
||||
"translations-enable-merge-backend",
|
||||
gulp.parallel("gen-icons-json", "build-translations", "build-locale-data"),
|
||||
"copy-static-cast",
|
||||
"rspack-prod-cast",
|
||||
"gen-pages-cast-prod"
|
||||
)
|
||||
);
|
38
build-scripts/gulp/cast.ts
Normal file
38
build-scripts/gulp/cast.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
import { parallel, series } from "gulp";
|
||||
import { cleanCast } from "./clean.ts";
|
||||
import { genPagesCastDev, genPagesCastProd } from "./entry-html.ts";
|
||||
import { copyStaticCast } from "./gather-static.ts";
|
||||
import { genIconsJson } from "./gen-icons-json.ts";
|
||||
import { buildLocaleData } from "./locale-data.ts";
|
||||
import { rspackDevServerCast, rspackProdCast } from "./rspack.ts";
|
||||
import "./service-worker.ts";
|
||||
import {
|
||||
buildTranslations,
|
||||
translationsEnableMergeBackend,
|
||||
} from "./translations.ts";
|
||||
|
||||
// develop-cast
|
||||
export const developCast = series(
|
||||
async () => {
|
||||
process.env.NODE_ENV = "development";
|
||||
},
|
||||
cleanCast,
|
||||
translationsEnableMergeBackend,
|
||||
parallel(genIconsJson, buildTranslations, buildLocaleData),
|
||||
copyStaticCast,
|
||||
genPagesCastDev,
|
||||
rspackDevServerCast
|
||||
);
|
||||
|
||||
// build-cast
|
||||
export const buildCast = series(
|
||||
async () => {
|
||||
process.env.NODE_ENV = "production";
|
||||
},
|
||||
cleanCast,
|
||||
translationsEnableMergeBackend,
|
||||
parallel(genIconsJson, buildTranslations, buildLocaleData),
|
||||
copyStaticCast,
|
||||
rspackProdCast,
|
||||
genPagesCastProd
|
||||
);
|
@@ -1,51 +0,0 @@
|
||||
import { deleteSync } from "del";
|
||||
import gulp from "gulp";
|
||||
import paths from "../paths.cjs";
|
||||
import "./translations.js";
|
||||
|
||||
gulp.task(
|
||||
"clean",
|
||||
gulp.parallel("clean-translations", async () =>
|
||||
deleteSync([paths.app_output_root, paths.build_dir])
|
||||
)
|
||||
);
|
||||
|
||||
gulp.task(
|
||||
"clean-demo",
|
||||
gulp.parallel("clean-translations", async () =>
|
||||
deleteSync([paths.demo_output_root, paths.build_dir])
|
||||
)
|
||||
);
|
||||
|
||||
gulp.task(
|
||||
"clean-cast",
|
||||
gulp.parallel("clean-translations", async () =>
|
||||
deleteSync([paths.cast_output_root, paths.build_dir])
|
||||
)
|
||||
);
|
||||
|
||||
gulp.task("clean-hassio", async () =>
|
||||
deleteSync([paths.hassio_output_root, paths.build_dir])
|
||||
);
|
||||
|
||||
gulp.task(
|
||||
"clean-gallery",
|
||||
gulp.parallel("clean-translations", async () =>
|
||||
deleteSync([
|
||||
paths.gallery_output_root,
|
||||
paths.gallery_build,
|
||||
paths.build_dir,
|
||||
])
|
||||
)
|
||||
);
|
||||
|
||||
gulp.task(
|
||||
"clean-landing-page",
|
||||
gulp.parallel("clean-translations", async () =>
|
||||
deleteSync([
|
||||
paths.landingPage_output_root,
|
||||
paths.landingPage_build,
|
||||
paths.build_dir,
|
||||
])
|
||||
)
|
||||
);
|
31
build-scripts/gulp/clean.ts
Normal file
31
build-scripts/gulp/clean.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import { deleteSync } from "del";
|
||||
import { parallel } from "gulp";
|
||||
import paths from "../paths.ts";
|
||||
import { cleanTranslations } from "./translations.ts";
|
||||
|
||||
export const clean = parallel(cleanTranslations, async () =>
|
||||
deleteSync([paths.app_output_root, paths.build_dir])
|
||||
);
|
||||
|
||||
export const cleanDemo = parallel(cleanTranslations, async () =>
|
||||
deleteSync([paths.demo_output_root, paths.build_dir])
|
||||
);
|
||||
|
||||
export const cleanCast = parallel(cleanTranslations, async () =>
|
||||
deleteSync([paths.cast_output_root, paths.build_dir])
|
||||
);
|
||||
|
||||
export const cleanHassio = async () =>
|
||||
deleteSync([paths.hassio_output_root, paths.build_dir]);
|
||||
|
||||
export const cleanGallery = parallel(cleanTranslations, async () =>
|
||||
deleteSync([paths.gallery_output_root, paths.gallery_build, paths.build_dir])
|
||||
);
|
||||
|
||||
export const cleanLandingPage = parallel(cleanTranslations, async () =>
|
||||
deleteSync([
|
||||
paths.landingPage_output_root,
|
||||
paths.landingPage_build,
|
||||
paths.build_dir,
|
||||
])
|
||||
);
|
@@ -1,10 +1,10 @@
|
||||
// Tasks to compress
|
||||
|
||||
import { constants } from "node:zlib";
|
||||
import gulp from "gulp";
|
||||
import { dest, parallel, src } from "gulp";
|
||||
import brotli from "gulp-brotli";
|
||||
import zopfli from "gulp-zopfli-green";
|
||||
import paths from "../paths.cjs";
|
||||
import { constants } from "node:zlib";
|
||||
import paths from "../paths.ts";
|
||||
|
||||
const filesGlob = "*.{js,json,css,svg,xml}";
|
||||
const brotliOptions = {
|
||||
@@ -16,27 +16,25 @@ const brotliOptions = {
|
||||
const zopfliOptions = { threshold: 150 };
|
||||
|
||||
const compressModern = (rootDir, modernDir, compress) =>
|
||||
gulp
|
||||
.src([`${modernDir}/**/${filesGlob}`, `${rootDir}/sw-modern.js`], {
|
||||
base: rootDir,
|
||||
allowEmpty: true,
|
||||
})
|
||||
src([`${modernDir}/**/${filesGlob}`, `${rootDir}/sw-modern.js`], {
|
||||
base: rootDir,
|
||||
allowEmpty: true,
|
||||
})
|
||||
.pipe(compress === "zopfli" ? zopfli(zopfliOptions) : brotli(brotliOptions))
|
||||
.pipe(gulp.dest(rootDir));
|
||||
.pipe(dest(rootDir));
|
||||
|
||||
const compressOther = (rootDir, modernDir, compress) =>
|
||||
gulp
|
||||
.src(
|
||||
[
|
||||
`${rootDir}/**/${filesGlob}`,
|
||||
`!${modernDir}/**/${filesGlob}`,
|
||||
`!${rootDir}/{sw-modern,service_worker}.js`,
|
||||
`${rootDir}/{authorize,onboarding}.html`,
|
||||
],
|
||||
{ base: rootDir, allowEmpty: true }
|
||||
)
|
||||
src(
|
||||
[
|
||||
`${rootDir}/**/${filesGlob}`,
|
||||
`!${modernDir}/**/${filesGlob}`,
|
||||
`!${rootDir}/{sw-modern,service_worker}.js`,
|
||||
`${rootDir}/{authorize,onboarding}.html`,
|
||||
],
|
||||
{ base: rootDir, allowEmpty: true }
|
||||
)
|
||||
.pipe(compress === "zopfli" ? zopfli(zopfliOptions) : brotli(brotliOptions))
|
||||
.pipe(gulp.dest(rootDir));
|
||||
.pipe(dest(rootDir));
|
||||
|
||||
const compressAppModernBrotli = () =>
|
||||
compressModern(paths.app_output_root, paths.app_output_latest, "brotli");
|
||||
@@ -66,21 +64,16 @@ const compressHassioOtherBrotli = () =>
|
||||
const compressHassioOtherZopfli = () =>
|
||||
compressOther(paths.hassio_output_root, paths.hassio_output_latest, "zopfli");
|
||||
|
||||
gulp.task(
|
||||
"compress-app",
|
||||
gulp.parallel(
|
||||
compressAppModernBrotli,
|
||||
compressAppOtherBrotli,
|
||||
compressAppModernZopfli,
|
||||
compressAppOtherZopfli
|
||||
)
|
||||
export const compressApp = parallel(
|
||||
compressAppModernBrotli,
|
||||
compressAppOtherBrotli,
|
||||
compressAppModernZopfli,
|
||||
compressAppOtherZopfli
|
||||
);
|
||||
gulp.task(
|
||||
"compress-hassio",
|
||||
gulp.parallel(
|
||||
compressHassioModernBrotli,
|
||||
compressHassioOtherBrotli,
|
||||
compressHassioModernZopfli,
|
||||
compressHassioOtherZopfli
|
||||
)
|
||||
|
||||
export const compressHassio = parallel(
|
||||
compressHassioModernBrotli,
|
||||
compressHassioOtherBrotli,
|
||||
compressHassioModernZopfli,
|
||||
compressHassioOtherZopfli
|
||||
);
|
@@ -1,54 +0,0 @@
|
||||
import gulp from "gulp";
|
||||
import "./clean.js";
|
||||
import "./entry-html.js";
|
||||
import "./gather-static.js";
|
||||
import "./gen-icons-json.js";
|
||||
import "./service-worker.js";
|
||||
import "./translations.js";
|
||||
import "./rspack.js";
|
||||
|
||||
gulp.task(
|
||||
"develop-demo",
|
||||
gulp.series(
|
||||
async function setEnv() {
|
||||
process.env.NODE_ENV = "development";
|
||||
},
|
||||
"clean-demo",
|
||||
"translations-enable-merge-backend",
|
||||
gulp.parallel(
|
||||
"gen-icons-json",
|
||||
"gen-pages-demo-dev",
|
||||
"build-translations",
|
||||
"build-locale-data"
|
||||
),
|
||||
"copy-static-demo",
|
||||
"rspack-dev-server-demo"
|
||||
)
|
||||
);
|
||||
|
||||
gulp.task(
|
||||
"build-demo",
|
||||
gulp.series(
|
||||
async function setEnv() {
|
||||
process.env.NODE_ENV = "production";
|
||||
},
|
||||
"clean-demo",
|
||||
// Cast needs to be backwards compatible and older HA has no translations
|
||||
"translations-enable-merge-backend",
|
||||
gulp.parallel("gen-icons-json", "build-translations", "build-locale-data"),
|
||||
"copy-static-demo",
|
||||
"rspack-prod-demo",
|
||||
"gen-pages-demo-prod"
|
||||
)
|
||||
);
|
||||
|
||||
gulp.task(
|
||||
"analyze-demo",
|
||||
gulp.series(
|
||||
async function setEnv() {
|
||||
process.env.STATS = "1";
|
||||
},
|
||||
"clean",
|
||||
"rspack-prod-demo"
|
||||
)
|
||||
);
|
47
build-scripts/gulp/demo.ts
Normal file
47
build-scripts/gulp/demo.ts
Normal file
@@ -0,0 +1,47 @@
|
||||
import { parallel, series } from "gulp";
|
||||
import { clean, cleanDemo } from "./clean.ts";
|
||||
import { genPagesDemoDev, genPagesDemoProd } from "./entry-html.ts";
|
||||
import { copyStaticDemo } from "./gather-static.ts";
|
||||
import { genIconsJson } from "./gen-icons-json.ts";
|
||||
import { buildLocaleData } from "./locale-data.ts";
|
||||
import { rspackDevServerDemo, rspackProdDemo } from "./rspack.ts";
|
||||
import "./service-worker.ts";
|
||||
import {
|
||||
buildTranslations,
|
||||
translationsEnableMergeBackend,
|
||||
} from "./translations.ts";
|
||||
|
||||
// develop-demo
|
||||
export const developDemo = series(
|
||||
async function setEnv() {
|
||||
process.env.NODE_ENV = "development";
|
||||
},
|
||||
cleanDemo,
|
||||
translationsEnableMergeBackend,
|
||||
parallel(genIconsJson, genPagesDemoDev, buildTranslations, buildLocaleData),
|
||||
copyStaticDemo,
|
||||
rspackDevServerDemo
|
||||
);
|
||||
|
||||
// build-demo
|
||||
export const buildDemo = series(
|
||||
async function setEnv() {
|
||||
process.env.NODE_ENV = "production";
|
||||
},
|
||||
cleanDemo,
|
||||
// Cast needs to be backwards compatible and older HA has no translations
|
||||
translationsEnableMergeBackend,
|
||||
parallel(genIconsJson, buildTranslations, buildLocaleData),
|
||||
copyStaticDemo,
|
||||
rspackProdDemo,
|
||||
genPagesDemoProd
|
||||
);
|
||||
|
||||
// analyze-demo
|
||||
export const analyzeDemo = series(
|
||||
async function setEnv() {
|
||||
process.env.STATS = "1";
|
||||
},
|
||||
clean,
|
||||
rspackProdDemo
|
||||
);
|
@@ -1,10 +1,10 @@
|
||||
import fs from "fs/promises";
|
||||
import gulp from "gulp";
|
||||
import path from "path";
|
||||
import mapStream from "map-stream";
|
||||
import transform from "gulp-json-transform";
|
||||
import { LokaliseApi } from "@lokalise/node-api";
|
||||
import { dest, series, src } from "gulp";
|
||||
import transform from "gulp-json-transform";
|
||||
import JSZip from "jszip";
|
||||
import mapStream from "map-stream";
|
||||
import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
|
||||
const inDir = "translations";
|
||||
const inDirFrontend = `${inDir}/frontend`;
|
||||
@@ -12,11 +12,14 @@ const inDirBackend = `${inDir}/backend`;
|
||||
const srcMeta = "src/translations/translationMetadata.json";
|
||||
const encoding = "utf8";
|
||||
|
||||
function hasHtml(data) {
|
||||
return /<\S*>/i.test(data);
|
||||
}
|
||||
const hasHtml = (data) => /<\S*>/i.test(data);
|
||||
|
||||
function recursiveCheckHasHtml(file, data, errors, recKey) {
|
||||
const recursiveCheckHasHtml = (
|
||||
file,
|
||||
data,
|
||||
errors: string[],
|
||||
recKey?: string
|
||||
) => {
|
||||
Object.keys(data).forEach(function (key) {
|
||||
if (typeof data[key] === "object") {
|
||||
const nextRecKey = recKey ? `${recKey}.${key}` : key;
|
||||
@@ -25,9 +28,9 @@ function recursiveCheckHasHtml(file, data, errors, recKey) {
|
||||
errors.push(`HTML found in ${file.path} at key ${recKey}.${key}`);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
function checkHtml() {
|
||||
const checkHtml = () => {
|
||||
const errors = [];
|
||||
|
||||
return mapStream(function (file, cb) {
|
||||
@@ -44,9 +47,9 @@ function checkHtml() {
|
||||
}
|
||||
cb(error, file);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
function convertBackendTranslations(data, _file) {
|
||||
const convertBackendTranslationsTransform = (data, _file) => {
|
||||
const output = { component: {} };
|
||||
if (!data.component) {
|
||||
return output;
|
||||
@@ -62,25 +65,22 @@ function convertBackendTranslations(data, _file) {
|
||||
});
|
||||
});
|
||||
return output;
|
||||
}
|
||||
};
|
||||
|
||||
gulp.task("convert-backend-translations", function () {
|
||||
return gulp
|
||||
.src([`${inDirBackend}/*.json`])
|
||||
.pipe(transform((data, file) => convertBackendTranslations(data, file)))
|
||||
.pipe(gulp.dest(inDirBackend));
|
||||
});
|
||||
const convertBackendTranslations = () =>
|
||||
src([`${inDirBackend}/*.json`])
|
||||
.pipe(
|
||||
transform((data, file) => convertBackendTranslationsTransform(data, file))
|
||||
)
|
||||
.pipe(dest(inDirBackend));
|
||||
|
||||
gulp.task("check-translations-html", function () {
|
||||
return gulp
|
||||
.src([`${inDirFrontend}/*.json`, `${inDirBackend}/*.json`])
|
||||
.pipe(checkHtml());
|
||||
});
|
||||
const checkTranslationsHtml = () =>
|
||||
src([`${inDirFrontend}/*.json`, `${inDirBackend}/*.json`]).pipe(checkHtml());
|
||||
|
||||
gulp.task("check-all-files-exist", async function () {
|
||||
const checkAllFilesExist = async () => {
|
||||
const file = await fs.readFile(srcMeta, { encoding });
|
||||
const meta = JSON.parse(file);
|
||||
const writings = [];
|
||||
const writings: Promise<void>[] = [];
|
||||
Object.keys(meta).forEach((lang) => {
|
||||
writings.push(
|
||||
fs.writeFile(`${inDirFrontend}/${lang}.json`, JSON.stringify({}), {
|
||||
@@ -92,14 +92,14 @@ gulp.task("check-all-files-exist", async function () {
|
||||
);
|
||||
});
|
||||
await Promise.allSettled(writings);
|
||||
});
|
||||
};
|
||||
|
||||
const lokaliseProjects = {
|
||||
backend: "130246255a974bd3b5e8a1.51616605",
|
||||
frontend: "3420425759f6d6d241f598.13594006",
|
||||
};
|
||||
|
||||
gulp.task("fetch-lokalise", async function () {
|
||||
const fetchLokalise = async () => {
|
||||
let apiKey;
|
||||
try {
|
||||
apiKey =
|
||||
@@ -168,14 +168,11 @@ gulp.task("fetch-lokalise", async function () {
|
||||
})
|
||||
)
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
gulp.task(
|
||||
"download-translations",
|
||||
gulp.series(
|
||||
"fetch-lokalise",
|
||||
"convert-backend-translations",
|
||||
"check-translations-html",
|
||||
"check-all-files-exist"
|
||||
)
|
||||
export const downloadTranslations = series(
|
||||
fetchLokalise,
|
||||
convertBackendTranslations,
|
||||
checkTranslationsHtml,
|
||||
checkAllFilesExist
|
||||
);
|
@@ -6,12 +6,11 @@ import {
|
||||
getPreUserAgentRegexes,
|
||||
} from "browserslist-useragent-regexp";
|
||||
import fs from "fs-extra";
|
||||
import gulp from "gulp";
|
||||
import { minify } from "html-minifier-terser";
|
||||
import template from "lodash.template";
|
||||
import { dirname, extname, resolve } from "node:path";
|
||||
import { htmlMinifierOptions, terserOptions } from "../bundle.cjs";
|
||||
import paths from "../paths.cjs";
|
||||
import { htmlMinifierOptions, terserOptions } from "../bundle.ts";
|
||||
import paths from "../paths.ts";
|
||||
|
||||
// macOS companion app has no way to obtain the Safari version used by WKWebView,
|
||||
// and it is not in the default user agent string. So we add an additional regex
|
||||
@@ -34,9 +33,9 @@ const getCommonTemplateVars = () => {
|
||||
mobileToDesktop: true,
|
||||
throwOnMissing: true,
|
||||
});
|
||||
const minSafariVersion = browserRegexes.find(
|
||||
(regex) => regex.family === "safari"
|
||||
)?.matchedVersions[0][0];
|
||||
const minSafariVersion =
|
||||
browserRegexes.find((regex) => regex.family === "safari")
|
||||
?.matchedVersions[0][0] ?? 18;
|
||||
const minMacOSVersion = SAFARI_TO_MACOS[minSafariVersion];
|
||||
if (!minMacOSVersion) {
|
||||
throw Error(
|
||||
@@ -106,10 +105,10 @@ const genPagesDevTask =
|
||||
resolve(inputRoot, inputSub, `${page}.template`),
|
||||
{
|
||||
...commonVars,
|
||||
latestEntryJS: entries.map(
|
||||
latestEntryJS: (entries as string[]).map(
|
||||
(entry) => `${publicRoot}/frontend_latest/${entry}.js`
|
||||
),
|
||||
es5EntryJS: entries.map(
|
||||
es5EntryJS: (entries as string[]).map(
|
||||
(entry) => `${publicRoot}/frontend_es5/${entry}.js`
|
||||
),
|
||||
latestCustomPanelJS: `${publicRoot}/frontend_latest/custom-panel.js`,
|
||||
@@ -128,7 +127,7 @@ const genPagesProdTask =
|
||||
inputRoot,
|
||||
outputRoot,
|
||||
outputLatest,
|
||||
outputES5,
|
||||
outputES5?: string,
|
||||
inputSub = "src/html"
|
||||
) =>
|
||||
async () => {
|
||||
@@ -139,14 +138,18 @@ const genPagesProdTask =
|
||||
? fs.readJsonSync(resolve(outputES5, "manifest.json"))
|
||||
: {};
|
||||
const commonVars = getCommonTemplateVars();
|
||||
const minifiedHTML = [];
|
||||
const minifiedHTML: Promise<void>[] = [];
|
||||
for (const [page, entries] of Object.entries(pageEntries)) {
|
||||
const content = renderTemplate(
|
||||
resolve(inputRoot, inputSub, `${page}.template`),
|
||||
{
|
||||
...commonVars,
|
||||
latestEntryJS: entries.map((entry) => latestManifest[`${entry}.js`]),
|
||||
es5EntryJS: entries.map((entry) => es5Manifest[`${entry}.js`]),
|
||||
latestEntryJS: (entries as string[]).map(
|
||||
(entry) => latestManifest[`${entry}.js`]
|
||||
),
|
||||
es5EntryJS: (entries as string[]).map(
|
||||
(entry) => es5Manifest[`${entry}.js`]
|
||||
),
|
||||
latestCustomPanelJS: latestManifest["custom-panel.js"],
|
||||
es5CustomPanelJS: es5Manifest["custom-panel.js"],
|
||||
}
|
||||
@@ -167,20 +170,18 @@ const APP_PAGE_ENTRIES = {
|
||||
"index.html": ["core", "app"],
|
||||
};
|
||||
|
||||
gulp.task(
|
||||
"gen-pages-app-dev",
|
||||
genPagesDevTask(APP_PAGE_ENTRIES, paths.root_dir, paths.app_output_root)
|
||||
export const genPagesAppDev = genPagesDevTask(
|
||||
APP_PAGE_ENTRIES,
|
||||
paths.root_dir,
|
||||
paths.app_output_root
|
||||
);
|
||||
|
||||
gulp.task(
|
||||
"gen-pages-app-prod",
|
||||
genPagesProdTask(
|
||||
APP_PAGE_ENTRIES,
|
||||
paths.root_dir,
|
||||
paths.app_output_root,
|
||||
paths.app_output_latest,
|
||||
paths.app_output_es5
|
||||
)
|
||||
export const genPagesAppProd = genPagesProdTask(
|
||||
APP_PAGE_ENTRIES,
|
||||
paths.root_dir,
|
||||
paths.app_output_root,
|
||||
paths.app_output_latest,
|
||||
paths.app_output_es5
|
||||
);
|
||||
|
||||
const CAST_PAGE_ENTRIES = {
|
||||
@@ -190,104 +191,82 @@ const CAST_PAGE_ENTRIES = {
|
||||
"receiver.html": ["receiver"],
|
||||
};
|
||||
|
||||
gulp.task(
|
||||
"gen-pages-cast-dev",
|
||||
genPagesDevTask(CAST_PAGE_ENTRIES, paths.cast_dir, paths.cast_output_root)
|
||||
export const genPagesCastDev = genPagesDevTask(
|
||||
CAST_PAGE_ENTRIES,
|
||||
paths.cast_dir,
|
||||
paths.cast_output_root
|
||||
);
|
||||
|
||||
gulp.task(
|
||||
"gen-pages-cast-prod",
|
||||
genPagesProdTask(
|
||||
CAST_PAGE_ENTRIES,
|
||||
paths.cast_dir,
|
||||
paths.cast_output_root,
|
||||
paths.cast_output_latest,
|
||||
paths.cast_output_es5
|
||||
)
|
||||
export const genPagesCastProd = genPagesProdTask(
|
||||
CAST_PAGE_ENTRIES,
|
||||
paths.cast_dir,
|
||||
paths.cast_output_root,
|
||||
paths.cast_output_latest,
|
||||
paths.cast_output_es5
|
||||
);
|
||||
|
||||
const DEMO_PAGE_ENTRIES = { "index.html": ["main"] };
|
||||
|
||||
gulp.task(
|
||||
"gen-pages-demo-dev",
|
||||
genPagesDevTask(DEMO_PAGE_ENTRIES, paths.demo_dir, paths.demo_output_root)
|
||||
export const genPagesDemoDev = genPagesDevTask(
|
||||
DEMO_PAGE_ENTRIES,
|
||||
paths.demo_dir,
|
||||
paths.demo_output_root
|
||||
);
|
||||
|
||||
gulp.task(
|
||||
"gen-pages-demo-prod",
|
||||
genPagesProdTask(
|
||||
DEMO_PAGE_ENTRIES,
|
||||
paths.demo_dir,
|
||||
paths.demo_output_root,
|
||||
paths.demo_output_latest,
|
||||
paths.demo_output_es5
|
||||
)
|
||||
export const genPagesDemoProd = genPagesProdTask(
|
||||
DEMO_PAGE_ENTRIES,
|
||||
paths.demo_dir,
|
||||
paths.demo_output_root,
|
||||
paths.demo_output_latest,
|
||||
paths.demo_output_es5
|
||||
);
|
||||
|
||||
const GALLERY_PAGE_ENTRIES = { "index.html": ["entrypoint"] };
|
||||
|
||||
gulp.task(
|
||||
"gen-pages-gallery-dev",
|
||||
genPagesDevTask(
|
||||
GALLERY_PAGE_ENTRIES,
|
||||
paths.gallery_dir,
|
||||
paths.gallery_output_root
|
||||
)
|
||||
export const genPagesGalleryDev = genPagesDevTask(
|
||||
GALLERY_PAGE_ENTRIES,
|
||||
paths.gallery_dir,
|
||||
paths.gallery_output_root
|
||||
);
|
||||
|
||||
gulp.task(
|
||||
"gen-pages-gallery-prod",
|
||||
genPagesProdTask(
|
||||
GALLERY_PAGE_ENTRIES,
|
||||
paths.gallery_dir,
|
||||
paths.gallery_output_root,
|
||||
paths.gallery_output_latest
|
||||
)
|
||||
export const genPagesGalleryProd = genPagesProdTask(
|
||||
GALLERY_PAGE_ENTRIES,
|
||||
paths.gallery_dir,
|
||||
paths.gallery_output_root,
|
||||
paths.gallery_output_latest
|
||||
);
|
||||
|
||||
const LANDING_PAGE_PAGE_ENTRIES = { "index.html": ["entrypoint"] };
|
||||
|
||||
gulp.task(
|
||||
"gen-pages-landing-page-dev",
|
||||
genPagesDevTask(
|
||||
LANDING_PAGE_PAGE_ENTRIES,
|
||||
paths.landingPage_dir,
|
||||
paths.landingPage_output_root
|
||||
)
|
||||
export const genPagesLandingPageDev = genPagesDevTask(
|
||||
LANDING_PAGE_PAGE_ENTRIES,
|
||||
paths.landingPage_dir,
|
||||
paths.landingPage_output_root
|
||||
);
|
||||
|
||||
gulp.task(
|
||||
"gen-pages-landing-page-prod",
|
||||
genPagesProdTask(
|
||||
LANDING_PAGE_PAGE_ENTRIES,
|
||||
paths.landingPage_dir,
|
||||
paths.landingPage_output_root,
|
||||
paths.landingPage_output_latest,
|
||||
paths.landingPage_output_es5
|
||||
)
|
||||
export const genPagesLandingPageProd = genPagesProdTask(
|
||||
LANDING_PAGE_PAGE_ENTRIES,
|
||||
paths.landingPage_dir,
|
||||
paths.landingPage_output_root,
|
||||
paths.landingPage_output_latest,
|
||||
paths.landingPage_output_es5
|
||||
);
|
||||
|
||||
const HASSIO_PAGE_ENTRIES = { "entrypoint.js": ["entrypoint"] };
|
||||
|
||||
gulp.task(
|
||||
"gen-pages-hassio-dev",
|
||||
genPagesDevTask(
|
||||
HASSIO_PAGE_ENTRIES,
|
||||
paths.hassio_dir,
|
||||
paths.hassio_output_root,
|
||||
"src",
|
||||
paths.hassio_publicPath
|
||||
)
|
||||
export const genPagesHassioDev = genPagesDevTask(
|
||||
HASSIO_PAGE_ENTRIES,
|
||||
paths.hassio_dir,
|
||||
paths.hassio_output_root,
|
||||
"src",
|
||||
paths.hassio_publicPath
|
||||
);
|
||||
|
||||
gulp.task(
|
||||
"gen-pages-hassio-prod",
|
||||
genPagesProdTask(
|
||||
HASSIO_PAGE_ENTRIES,
|
||||
paths.hassio_dir,
|
||||
paths.hassio_output_root,
|
||||
paths.hassio_output_latest,
|
||||
paths.hassio_output_es5,
|
||||
"src"
|
||||
)
|
||||
export const genPagesHassioProd = genPagesProdTask(
|
||||
HASSIO_PAGE_ENTRIES,
|
||||
paths.hassio_dir,
|
||||
paths.hassio_output_root,
|
||||
paths.hassio_output_latest,
|
||||
paths.hassio_output_es5,
|
||||
"src"
|
||||
);
|
@@ -1,14 +1,14 @@
|
||||
// Task to download the latest Lokalise translations from the nightly workflow artifacts
|
||||
// Task to download the latest 00Lokalise translations from the nightly workflow artifacts
|
||||
|
||||
import { createOAuthDeviceAuth } from "@octokit/auth-oauth-device";
|
||||
import { retry } from "@octokit/plugin-retry";
|
||||
import { Octokit } from "@octokit/rest";
|
||||
import { deleteAsync } from "del";
|
||||
import { mkdir, readFile, writeFile } from "fs/promises";
|
||||
import gulp from "gulp";
|
||||
import { series } from "gulp";
|
||||
import jszip from "jszip";
|
||||
import path from "path";
|
||||
import process from "process";
|
||||
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import process from "node:process";
|
||||
import { extract } from "tar";
|
||||
|
||||
const MAX_AGE = 24; // hours
|
||||
@@ -22,12 +22,13 @@ const TOKEN_FILE = path.posix.join(EXTRACT_DIR, "token.json");
|
||||
const ARTIFACT_FILE = path.posix.join(EXTRACT_DIR, "artifact.json");
|
||||
|
||||
let allowTokenSetup = false;
|
||||
gulp.task("allow-setup-fetch-nightly-translations", (done) => {
|
||||
|
||||
export const allowSetupFetchNightlyTranslations = (done) => {
|
||||
allowTokenSetup = true;
|
||||
done();
|
||||
});
|
||||
};
|
||||
|
||||
gulp.task("fetch-nightly-translations", async function () {
|
||||
export const fetchNightlyTranslations = async () => {
|
||||
// Skip all when environment flag is set (assumes translations are already in place)
|
||||
if (process.env?.SKIP_FETCH_NIGHTLY_TRANSLATIONS) {
|
||||
console.log("Skipping fetch due to environment signal");
|
||||
@@ -54,7 +55,7 @@ gulp.task("fetch-nightly-translations", async function () {
|
||||
|
||||
// To store file writing promises
|
||||
const createExtractDir = mkdir(EXTRACT_DIR, { recursive: true });
|
||||
const writings = [];
|
||||
const writings: Promise<void>[] = [];
|
||||
|
||||
// Authenticate to GitHub using GitHub action token if it exists,
|
||||
// otherwise look for a saved user token or generate a new one if none
|
||||
@@ -87,7 +88,7 @@ gulp.task("fetch-nightly-translations", async function () {
|
||||
});
|
||||
tokenAuth = await auth({ type: "oauth" });
|
||||
writings.push(
|
||||
createExtractDir.then(
|
||||
createExtractDir.then(() =>
|
||||
writeFile(TOKEN_FILE, JSON.stringify(tokenAuth, null, 2))
|
||||
)
|
||||
);
|
||||
@@ -131,13 +132,13 @@ gulp.task("fetch-nightly-translations", async function () {
|
||||
throw Error("Latest nightly workflow run has no translations artifact");
|
||||
}
|
||||
writings.push(
|
||||
createExtractDir.then(
|
||||
createExtractDir.then(() =>
|
||||
writeFile(ARTIFACT_FILE, JSON.stringify(latestArtifact, null, 2))
|
||||
)
|
||||
);
|
||||
|
||||
// Remove the current translations
|
||||
const deleteCurrent = Promise.all(writings).then(
|
||||
const deleteCurrent = Promise.all(writings).then(() =>
|
||||
deleteAsync([`${EXTRACT_DIR}/*`, `!${ARTIFACT_FILE}`, `!${TOKEN_FILE}`])
|
||||
);
|
||||
|
||||
@@ -148,24 +149,22 @@ gulp.task("fetch-nightly-translations", async function () {
|
||||
artifact_id: latestArtifact.id,
|
||||
archive_format: "zip",
|
||||
});
|
||||
// @ts-ignore OctokitResponse<unknown, 302> doesn't allow to check for 200
|
||||
if (downloadResponse.status !== 200) {
|
||||
throw Error("Failure downloading translations artifact");
|
||||
}
|
||||
|
||||
// Artifact is a tarball, but GitHub adds it to a zip file
|
||||
console.log("Unpacking downloaded translations...");
|
||||
const zip = await jszip.loadAsync(downloadResponse.data);
|
||||
const zip = await jszip.loadAsync(downloadResponse.data as any);
|
||||
await deleteCurrent;
|
||||
const extractStream = zip.file(/.*/)[0].nodeStream().pipe(extract());
|
||||
await new Promise((resolve, reject) => {
|
||||
extractStream.on("close", resolve).on("error", reject);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
gulp.task(
|
||||
"setup-and-fetch-nightly-translations",
|
||||
gulp.series(
|
||||
"allow-setup-fetch-nightly-translations",
|
||||
"fetch-nightly-translations"
|
||||
)
|
||||
export const setupAndFetchNightlyTranslations = series(
|
||||
allowSetupFetchNightlyTranslations,
|
||||
fetchNightlyTranslations
|
||||
);
|
@@ -1,19 +1,23 @@
|
||||
import fs from "fs";
|
||||
import { glob } from "glob";
|
||||
import gulp from "gulp";
|
||||
import { parallel, series, watch } from "gulp";
|
||||
import yaml from "js-yaml";
|
||||
import { marked } from "marked";
|
||||
import path from "path";
|
||||
import paths from "../paths.cjs";
|
||||
import "./clean.js";
|
||||
import "./entry-html.js";
|
||||
import "./gather-static.js";
|
||||
import "./gen-icons-json.js";
|
||||
import "./service-worker.js";
|
||||
import "./translations.js";
|
||||
import "./rspack.js";
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import paths from "../paths.ts";
|
||||
import { cleanGallery } from "./clean.ts";
|
||||
import { genPagesGalleryDev, genPagesGalleryProd } from "./entry-html.ts";
|
||||
import { copyStaticGallery } from "./gather-static.ts";
|
||||
import { genIconsJson } from "./gen-icons-json.ts";
|
||||
import { buildLocaleData } from "./locale-data.ts";
|
||||
import { rspackDevServerGallery, rspackProdGallery } from "./rspack.ts";
|
||||
import {
|
||||
buildTranslations,
|
||||
translationsEnableMergeBackend,
|
||||
} from "./translations.ts";
|
||||
|
||||
gulp.task("gather-gallery-pages", async function gatherPages() {
|
||||
// gather-gallery-pages
|
||||
export const gatherGalleryPages = async function gatherPages() {
|
||||
const pageDir = path.resolve(paths.gallery_dir, "src/pages");
|
||||
const files = await glob(path.resolve(pageDir, "**/*"));
|
||||
|
||||
@@ -22,7 +26,7 @@ gulp.task("gather-gallery-pages", async function gatherPages() {
|
||||
|
||||
let content = "export const PAGES = {\n";
|
||||
|
||||
const processed = new Set();
|
||||
const processed = new Set<string>();
|
||||
|
||||
for (const file of files) {
|
||||
if (fs.lstatSync(file).isDirectory()) {
|
||||
@@ -47,7 +51,9 @@ gulp.task("gather-gallery-pages", async function gatherPages() {
|
||||
|
||||
if (descriptionContent.startsWith("---")) {
|
||||
const metadataEnd = descriptionContent.indexOf("---", 3);
|
||||
metadata = yaml.load(descriptionContent.substring(3, metadataEnd));
|
||||
metadata = yaml.load(
|
||||
descriptionContent.substring(3, metadataEnd)
|
||||
) as any;
|
||||
descriptionContent = descriptionContent
|
||||
.substring(metadataEnd + 3)
|
||||
.trim();
|
||||
@@ -57,7 +63,9 @@ gulp.task("gather-gallery-pages", async function gatherPages() {
|
||||
if (descriptionContent === "") {
|
||||
hasDescription = false;
|
||||
} else {
|
||||
descriptionContent = marked(descriptionContent).replace(/`/g, "\\`");
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
descriptionContent = await marked(descriptionContent);
|
||||
descriptionContent = descriptionContent.replace(/`/g, "\\`");
|
||||
fs.mkdirSync(path.resolve(galleryBuild, category), { recursive: true });
|
||||
fs.writeFileSync(
|
||||
path.resolve(galleryBuild, `${pageId}-description.ts`),
|
||||
@@ -95,7 +103,10 @@ gulp.task("gather-gallery-pages", async function gatherPages() {
|
||||
pagesToProcess[category].add(page);
|
||||
}
|
||||
|
||||
for (const group of Object.values(sidebar)) {
|
||||
for (const group of Object.values(sidebar) as {
|
||||
category: string;
|
||||
pages?: string[];
|
||||
}[]) {
|
||||
const toProcess = pagesToProcess[group.category];
|
||||
delete pagesToProcess[group.category];
|
||||
|
||||
@@ -118,7 +129,7 @@ gulp.task("gather-gallery-pages", async function gatherPages() {
|
||||
group.pages = [];
|
||||
}
|
||||
for (const page of Array.from(toProcess).sort()) {
|
||||
group.pages.push(page);
|
||||
group.pages.push(page as string);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,7 +137,7 @@ gulp.task("gather-gallery-pages", async function gatherPages() {
|
||||
sidebar.push({
|
||||
category,
|
||||
header: category,
|
||||
pages: Array.from(pages).sort(),
|
||||
pages: Array.from(pages as Set<string>).sort(),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -137,55 +148,48 @@ gulp.task("gather-gallery-pages", async function gatherPages() {
|
||||
content,
|
||||
"utf-8"
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
gulp.task(
|
||||
"develop-gallery",
|
||||
gulp.series(
|
||||
async function setEnv() {
|
||||
process.env.NODE_ENV = "development";
|
||||
},
|
||||
"clean-gallery",
|
||||
"translations-enable-merge-backend",
|
||||
gulp.parallel(
|
||||
"gen-icons-json",
|
||||
"build-translations",
|
||||
"build-locale-data",
|
||||
"gather-gallery-pages"
|
||||
),
|
||||
"copy-static-gallery",
|
||||
"gen-pages-gallery-dev",
|
||||
gulp.parallel(
|
||||
"rspack-dev-server-gallery",
|
||||
async function watchMarkdownFiles() {
|
||||
gulp.watch(
|
||||
[
|
||||
path.resolve(paths.gallery_dir, "src/pages/**/*.markdown"),
|
||||
path.resolve(paths.gallery_dir, "sidebar.js"),
|
||||
],
|
||||
gulp.series("gather-gallery-pages")
|
||||
);
|
||||
}
|
||||
)
|
||||
)
|
||||
// develop-gallery
|
||||
export const developGallery = series(
|
||||
async function setEnv() {
|
||||
process.env.NODE_ENV = "development";
|
||||
},
|
||||
cleanGallery,
|
||||
translationsEnableMergeBackend,
|
||||
parallel(
|
||||
genIconsJson,
|
||||
buildTranslations,
|
||||
buildLocaleData,
|
||||
gatherGalleryPages
|
||||
),
|
||||
copyStaticGallery,
|
||||
genPagesGalleryDev,
|
||||
parallel(rspackDevServerGallery, async function watchMarkdownFiles() {
|
||||
watch(
|
||||
[
|
||||
path.resolve(paths.gallery_dir, "src/pages/**/*.markdown"),
|
||||
path.resolve(paths.gallery_dir, "sidebar.js"),
|
||||
],
|
||||
series(gatherGalleryPages)
|
||||
);
|
||||
})
|
||||
);
|
||||
|
||||
gulp.task(
|
||||
"build-gallery",
|
||||
gulp.series(
|
||||
async function setEnv() {
|
||||
process.env.NODE_ENV = "production";
|
||||
},
|
||||
"clean-gallery",
|
||||
"translations-enable-merge-backend",
|
||||
gulp.parallel(
|
||||
"gen-icons-json",
|
||||
"build-translations",
|
||||
"build-locale-data",
|
||||
"gather-gallery-pages"
|
||||
),
|
||||
"copy-static-gallery",
|
||||
"rspack-prod-gallery",
|
||||
"gen-pages-gallery-prod"
|
||||
)
|
||||
// build-gallery
|
||||
export const buildGallery = series(
|
||||
async function setEnv() {
|
||||
process.env.NODE_ENV = "production";
|
||||
},
|
||||
cleanGallery,
|
||||
translationsEnableMergeBackend,
|
||||
parallel(
|
||||
genIconsJson,
|
||||
buildTranslations,
|
||||
buildLocaleData,
|
||||
gatherGalleryPages
|
||||
),
|
||||
copyStaticGallery,
|
||||
rspackProdGallery,
|
||||
genPagesGalleryProd
|
||||
);
|
@@ -1,9 +1,8 @@
|
||||
// Gulp task to gather all static files.
|
||||
|
||||
import fs from "fs-extra";
|
||||
import gulp from "gulp";
|
||||
import path from "path";
|
||||
import paths from "../paths.cjs";
|
||||
import path from "node:path";
|
||||
import paths from "../paths.ts";
|
||||
|
||||
const npmPath = (...parts) =>
|
||||
path.resolve(paths.root_dir, "node_modules", ...parts);
|
||||
@@ -17,7 +16,7 @@ const genStaticPath =
|
||||
(...parts) =>
|
||||
path.resolve(staticDir, ...parts);
|
||||
|
||||
function copyTranslations(staticDir) {
|
||||
const copyTranslations = (staticDir) => {
|
||||
const staticPath = genStaticPath(staticDir);
|
||||
|
||||
// Translation output
|
||||
@@ -25,23 +24,23 @@ function copyTranslations(staticDir) {
|
||||
polyPath("build/translations/output"),
|
||||
staticPath("translations")
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
function copyLocaleData(staticDir) {
|
||||
const copyLocaleData = (staticDir) => {
|
||||
const staticPath = genStaticPath(staticDir);
|
||||
|
||||
// Locale data output
|
||||
fs.copySync(polyPath("build/locale-data"), staticPath("locale-data"));
|
||||
}
|
||||
};
|
||||
|
||||
function copyMdiIcons(staticDir) {
|
||||
const copyMdiIcons = (staticDir) => {
|
||||
const staticPath = genStaticPath(staticDir);
|
||||
|
||||
// MDI icons output
|
||||
fs.copySync(polyPath("build/mdi"), staticPath("mdi"));
|
||||
}
|
||||
};
|
||||
|
||||
function copyPolyfills(staticDir) {
|
||||
const copyPolyfills = (staticDir) => {
|
||||
const staticPath = genStaticPath(staticDir);
|
||||
|
||||
// For custom panels using ES5 builds that don't use Babel 7+
|
||||
@@ -70,9 +69,9 @@ function copyPolyfills(staticDir) {
|
||||
npmPath("dialog-polyfill/dialog-polyfill.css"),
|
||||
staticPath("polyfills/")
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
function copyFonts(staticDir) {
|
||||
const copyFonts = (staticDir) => {
|
||||
const staticPath = genStaticPath(staticDir);
|
||||
// Local fonts
|
||||
fs.copySync(
|
||||
@@ -82,14 +81,14 @@ function copyFonts(staticDir) {
|
||||
filter: (src) => !src.includes(".") || src.endsWith(".woff2"),
|
||||
}
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
function copyQrScannerWorker(staticDir) {
|
||||
const copyQrScannerWorker = (staticDir) => {
|
||||
const staticPath = genStaticPath(staticDir);
|
||||
copyFileDir(npmPath("qr-scanner/qr-scanner-worker.min.js"), staticPath("js"));
|
||||
}
|
||||
};
|
||||
|
||||
function copyMapPanel(staticDir) {
|
||||
const copyMapPanel = (staticDir) => {
|
||||
const staticPath = genStaticPath(staticDir);
|
||||
copyFileDir(
|
||||
npmPath("leaflet/dist/leaflet.css"),
|
||||
@@ -103,43 +102,38 @@ function copyMapPanel(staticDir) {
|
||||
npmPath("leaflet/dist/images"),
|
||||
staticPath("images/leaflet/images/")
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
function copyZXingWasm(staticDir) {
|
||||
const copyZXingWasm = (staticDir) => {
|
||||
const staticPath = genStaticPath(staticDir);
|
||||
copyFileDir(
|
||||
npmPath("zxing-wasm/dist/reader/zxing_reader.wasm"),
|
||||
staticPath("js")
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
gulp.task("copy-locale-data", async () => {
|
||||
const staticDir = paths.app_output_static;
|
||||
copyLocaleData(staticDir);
|
||||
});
|
||||
|
||||
gulp.task("copy-translations-app", async () => {
|
||||
export const copyTranslationsApp = async () => {
|
||||
const staticDir = paths.app_output_static;
|
||||
copyTranslations(staticDir);
|
||||
});
|
||||
};
|
||||
|
||||
gulp.task("copy-translations-supervisor", async () => {
|
||||
export const copyTranslationsSupervisor = async () => {
|
||||
const staticDir = paths.hassio_output_static;
|
||||
copyTranslations(staticDir);
|
||||
});
|
||||
};
|
||||
|
||||
gulp.task("copy-translations-landing-page", async () => {
|
||||
export const copyTranslationsLandingPage = async () => {
|
||||
const staticDir = paths.landingPage_output_static;
|
||||
copyTranslations(staticDir);
|
||||
});
|
||||
};
|
||||
|
||||
gulp.task("copy-static-supervisor", async () => {
|
||||
export const copyStaticSupervisor = async () => {
|
||||
const staticDir = paths.hassio_output_static;
|
||||
copyLocaleData(staticDir);
|
||||
copyFonts(staticDir);
|
||||
});
|
||||
};
|
||||
|
||||
gulp.task("copy-static-app", async () => {
|
||||
export const copyStaticApp = async () => {
|
||||
const staticDir = paths.app_output_static;
|
||||
// Basic static files
|
||||
fs.copySync(polyPath("public"), paths.app_output_root);
|
||||
@@ -155,9 +149,9 @@ gulp.task("copy-static-app", async () => {
|
||||
// Qr Scanner assets
|
||||
copyZXingWasm(staticDir);
|
||||
copyQrScannerWorker(staticDir);
|
||||
});
|
||||
};
|
||||
|
||||
gulp.task("copy-static-demo", async () => {
|
||||
export const copyStaticDemo = async () => {
|
||||
// Copy app static files
|
||||
fs.copySync(
|
||||
polyPath("public/static"),
|
||||
@@ -171,9 +165,9 @@ gulp.task("copy-static-demo", async () => {
|
||||
copyTranslations(paths.demo_output_static);
|
||||
copyLocaleData(paths.demo_output_static);
|
||||
copyMdiIcons(paths.demo_output_static);
|
||||
});
|
||||
};
|
||||
|
||||
gulp.task("copy-static-cast", async () => {
|
||||
export const copyStaticCast = async () => {
|
||||
// Copy app static files
|
||||
fs.copySync(polyPath("public/static"), paths.cast_output_static);
|
||||
// Copy cast static files
|
||||
@@ -184,9 +178,9 @@ gulp.task("copy-static-cast", async () => {
|
||||
copyTranslations(paths.cast_output_static);
|
||||
copyLocaleData(paths.cast_output_static);
|
||||
copyMdiIcons(paths.cast_output_static);
|
||||
});
|
||||
};
|
||||
|
||||
gulp.task("copy-static-gallery", async () => {
|
||||
export const copyStaticGallery = async () => {
|
||||
// Copy app static files
|
||||
fs.copySync(polyPath("public/static"), paths.gallery_output_static);
|
||||
// Copy gallery static files
|
||||
@@ -200,9 +194,9 @@ gulp.task("copy-static-gallery", async () => {
|
||||
copyTranslations(paths.gallery_output_static);
|
||||
copyLocaleData(paths.gallery_output_static);
|
||||
copyMdiIcons(paths.gallery_output_static);
|
||||
});
|
||||
};
|
||||
|
||||
gulp.task("copy-static-landing-page", async () => {
|
||||
export const copyStaticLandingPage = async () => {
|
||||
// Copy landing-page static files
|
||||
fs.copySync(
|
||||
path.resolve(paths.landingPage_dir, "public"),
|
||||
@@ -211,4 +205,4 @@ gulp.task("copy-static-landing-page", async () => {
|
||||
|
||||
copyFonts(paths.landingPage_output_static);
|
||||
copyTranslations(paths.landingPage_output_static);
|
||||
});
|
||||
};
|
@@ -1,8 +1,7 @@
|
||||
import fs from "fs";
|
||||
import gulp from "gulp";
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import hash from "object-hash";
|
||||
import path from "path";
|
||||
import paths from "../paths.cjs";
|
||||
import paths from "../paths.ts";
|
||||
|
||||
const ICON_PACKAGE_PATH = path.resolve("node_modules/@mdi/svg/");
|
||||
const META_PATH = path.resolve(ICON_PACKAGE_PATH, "meta.json");
|
||||
@@ -21,7 +20,7 @@ const getMeta = () => {
|
||||
encoding,
|
||||
});
|
||||
return {
|
||||
path: svg.match(/ d="([^"]+)"/)[1],
|
||||
path: svg.match(/ d="([^"]+)"/)?.[1],
|
||||
name: icon.name,
|
||||
tags: icon.tags,
|
||||
aliases: icon.aliases,
|
||||
@@ -55,14 +54,14 @@ const orderMeta = (meta) => {
|
||||
};
|
||||
|
||||
const splitBySize = (meta) => {
|
||||
const chunks = [];
|
||||
const chunks: any[] = [];
|
||||
const CHUNK_SIZE = 50000;
|
||||
|
||||
let curSize = 0;
|
||||
let startKey;
|
||||
let icons = [];
|
||||
let icons: any[] = [];
|
||||
|
||||
Object.values(meta).forEach((icon) => {
|
||||
Object.values(meta).forEach((icon: any) => {
|
||||
if (startKey === undefined) {
|
||||
startKey = icon.name;
|
||||
}
|
||||
@@ -94,10 +93,10 @@ const findDifferentiator = (curString, prevString) => {
|
||||
return curString.substring(0, i + 1);
|
||||
}
|
||||
}
|
||||
throw new Error("Cannot find differentiator", curString, prevString);
|
||||
throw new Error(`Cannot find differentiator; ${curString}; ${prevString}`);
|
||||
};
|
||||
|
||||
gulp.task("gen-icons-json", (done) => {
|
||||
export const genIconsJson = (done) => {
|
||||
const meta = getMeta();
|
||||
|
||||
const metaAndRemoved = addRemovedMeta(meta);
|
||||
@@ -106,7 +105,7 @@ gulp.task("gen-icons-json", (done) => {
|
||||
if (!fs.existsSync(OUTPUT_DIR)) {
|
||||
fs.mkdirSync(OUTPUT_DIR, { recursive: true });
|
||||
}
|
||||
const parts = [];
|
||||
const parts: any[] = [];
|
||||
|
||||
let lastEnd;
|
||||
split.forEach((chunk) => {
|
||||
@@ -153,13 +152,13 @@ gulp.task("gen-icons-json", (done) => {
|
||||
);
|
||||
|
||||
done();
|
||||
});
|
||||
};
|
||||
|
||||
gulp.task("gen-dummy-icons-json", (done) => {
|
||||
export const genDummyIconsJson = (done) => {
|
||||
if (!fs.existsSync(OUTPUT_DIR)) {
|
||||
fs.mkdirSync(OUTPUT_DIR, { recursive: true });
|
||||
}
|
||||
|
||||
fs.writeFileSync(path.resolve(OUTPUT_DIR, "iconList.json"), "[]");
|
||||
done();
|
||||
});
|
||||
};
|
@@ -1,45 +0,0 @@
|
||||
import gulp from "gulp";
|
||||
import env from "../env.cjs";
|
||||
import "./clean.js";
|
||||
import "./compress.js";
|
||||
import "./entry-html.js";
|
||||
import "./gather-static.js";
|
||||
import "./gen-icons-json.js";
|
||||
import "./translations.js";
|
||||
import "./rspack.js";
|
||||
|
||||
gulp.task(
|
||||
"develop-hassio",
|
||||
gulp.series(
|
||||
async function setEnv() {
|
||||
process.env.NODE_ENV = "development";
|
||||
},
|
||||
"clean-hassio",
|
||||
"gen-dummy-icons-json",
|
||||
"gen-pages-hassio-dev",
|
||||
"build-supervisor-translations",
|
||||
"copy-translations-supervisor",
|
||||
"build-locale-data",
|
||||
"copy-static-supervisor",
|
||||
"rspack-watch-hassio"
|
||||
)
|
||||
);
|
||||
|
||||
gulp.task(
|
||||
"build-hassio",
|
||||
gulp.series(
|
||||
async function setEnv() {
|
||||
process.env.NODE_ENV = "production";
|
||||
},
|
||||
"clean-hassio",
|
||||
"gen-dummy-icons-json",
|
||||
"build-supervisor-translations",
|
||||
"copy-translations-supervisor",
|
||||
"build-locale-data",
|
||||
"copy-static-supervisor",
|
||||
"rspack-prod-hassio",
|
||||
"gen-pages-hassio-prod",
|
||||
...// Don't compress running tests
|
||||
(env.isTestBuild() ? [] : ["compress-hassio"])
|
||||
)
|
||||
);
|
45
build-scripts/gulp/hassio.ts
Normal file
45
build-scripts/gulp/hassio.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
import { series } from "gulp";
|
||||
import { isTestBuild } from "../env.ts";
|
||||
import { cleanHassio } from "./clean.ts";
|
||||
import { compressHassio } from "./compress.ts";
|
||||
import { genPagesHassioDev, genPagesHassioProd } from "./entry-html.ts";
|
||||
import {
|
||||
copyStaticSupervisor,
|
||||
copyTranslationsSupervisor,
|
||||
} from "./gather-static.ts";
|
||||
import { genDummyIconsJson } from "./gen-icons-json.ts";
|
||||
import { buildLocaleData } from "./locale-data.ts";
|
||||
import { rspackProdHassio, rspackWatchHassio } from "./rspack.ts";
|
||||
import { buildSupervisorTranslations } from "./translations.ts";
|
||||
|
||||
// develop-hassio
|
||||
export const developHassio = series(
|
||||
async function setEnv() {
|
||||
process.env.NODE_ENV = "development";
|
||||
},
|
||||
cleanHassio,
|
||||
genDummyIconsJson,
|
||||
genPagesHassioDev,
|
||||
buildSupervisorTranslations,
|
||||
copyTranslationsSupervisor,
|
||||
buildLocaleData,
|
||||
copyStaticSupervisor,
|
||||
rspackWatchHassio
|
||||
);
|
||||
|
||||
// build-hassio
|
||||
export const buildHassio = series(
|
||||
async function setEnv() {
|
||||
process.env.NODE_ENV = "production";
|
||||
},
|
||||
cleanHassio,
|
||||
genDummyIconsJson,
|
||||
buildSupervisorTranslations,
|
||||
copyTranslationsSupervisor,
|
||||
buildLocaleData,
|
||||
copyStaticSupervisor,
|
||||
rspackProdHassio,
|
||||
genPagesHassioProd,
|
||||
...// Don't compress running tests
|
||||
(isTestBuild() ? [] : [compressHassio])
|
||||
);
|
@@ -1,17 +0,0 @@
|
||||
import "./app.js";
|
||||
import "./cast.js";
|
||||
import "./clean.js";
|
||||
import "./compress.js";
|
||||
import "./demo.js";
|
||||
import "./download-translations.js";
|
||||
import "./entry-html.js";
|
||||
import "./fetch-nightly-translations.js";
|
||||
import "./gallery.js";
|
||||
import "./gather-static.js";
|
||||
import "./gen-icons-json.js";
|
||||
import "./hassio.js";
|
||||
import "./landing-page.js";
|
||||
import "./locale-data.js";
|
||||
import "./rspack.js";
|
||||
import "./service-worker.js";
|
||||
import "./translations.js";
|
42
build-scripts/gulp/index.ts
Normal file
42
build-scripts/gulp/index.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
import { analyzeApp, buildApp, developApp } from "./app";
|
||||
import { buildCast, developCast } from "./cast";
|
||||
import { analyzeDemo, buildDemo, developDemo } from "./demo";
|
||||
import { downloadTranslations } from "./download-translations";
|
||||
import { setupAndFetchNightlyTranslations } from "./fetch-nightly-translations";
|
||||
import { buildGallery, developGallery, gatherGalleryPages } from "./gallery";
|
||||
import { genIconsJson } from "./gen-icons-json";
|
||||
import { buildHassio, developHassio } from "./hassio";
|
||||
import { buildLandingPage, developLandingPage } from "./landing-page";
|
||||
import { buildLocaleData } from "./locale-data";
|
||||
import { buildTranslations } from "./translations";
|
||||
|
||||
export default {
|
||||
"develop-app": developApp,
|
||||
"build-app": buildApp,
|
||||
"analyze-app": analyzeApp,
|
||||
|
||||
"develop-cast": developCast,
|
||||
"build-cast": buildCast,
|
||||
|
||||
"develop-demo": developDemo,
|
||||
"build-demo": buildDemo,
|
||||
"analyze-demo": analyzeDemo,
|
||||
|
||||
"develop-gallery": developGallery,
|
||||
"build-gallery": buildGallery,
|
||||
"gather-gallery-pages": gatherGalleryPages,
|
||||
|
||||
"develop-hassio": developHassio,
|
||||
"build-hassio": buildHassio,
|
||||
|
||||
"develop-landing-page": developLandingPage,
|
||||
"build-landing-page": buildLandingPage,
|
||||
|
||||
"setup-and-fetch-nightly-translations": setupAndFetchNightlyTranslations,
|
||||
"download-translations": downloadTranslations,
|
||||
"build-translations": buildTranslations,
|
||||
|
||||
"gen-icons-json": genIconsJson,
|
||||
|
||||
"build-locale-data": buildLocaleData,
|
||||
};
|
@@ -1,41 +0,0 @@
|
||||
import gulp from "gulp";
|
||||
import "./clean.js";
|
||||
import "./compress.js";
|
||||
import "./entry-html.js";
|
||||
import "./gather-static.js";
|
||||
import "./gen-icons-json.js";
|
||||
import "./translations.js";
|
||||
import "./rspack.js";
|
||||
|
||||
gulp.task(
|
||||
"develop-landing-page",
|
||||
gulp.series(
|
||||
async function setEnv() {
|
||||
process.env.NODE_ENV = "development";
|
||||
},
|
||||
"clean-landing-page",
|
||||
"translations-enable-merge-backend",
|
||||
"build-landing-page-translations",
|
||||
"copy-translations-landing-page",
|
||||
"build-locale-data",
|
||||
"copy-static-landing-page",
|
||||
"gen-pages-landing-page-dev",
|
||||
"rspack-watch-landing-page"
|
||||
)
|
||||
);
|
||||
|
||||
gulp.task(
|
||||
"build-landing-page",
|
||||
gulp.series(
|
||||
async function setEnv() {
|
||||
process.env.NODE_ENV = "production";
|
||||
},
|
||||
"clean-landing-page",
|
||||
"build-landing-page-translations",
|
||||
"copy-translations-landing-page",
|
||||
"build-locale-data",
|
||||
"copy-static-landing-page",
|
||||
"rspack-prod-landing-page",
|
||||
"gen-pages-landing-page-prod"
|
||||
)
|
||||
);
|
46
build-scripts/gulp/landing-page.ts
Normal file
46
build-scripts/gulp/landing-page.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
import { series } from "gulp";
|
||||
import { cleanLandingPage } from "./clean.ts";
|
||||
import "./compress.ts";
|
||||
import {
|
||||
genPagesLandingPageDev,
|
||||
genPagesLandingPageProd,
|
||||
} from "./entry-html.ts";
|
||||
import {
|
||||
copyStaticLandingPage,
|
||||
copyTranslationsLandingPage,
|
||||
} from "./gather-static.ts";
|
||||
import { buildLocaleData } from "./locale-data.ts";
|
||||
import { rspackProdLandingPage, rspackWatchLandingPage } from "./rspack.ts";
|
||||
import {
|
||||
buildLandingPageTranslations,
|
||||
translationsEnableMergeBackend,
|
||||
} from "./translations.ts";
|
||||
|
||||
// develop-landing-page
|
||||
export const developLandingPage = series(
|
||||
async function setEnv() {
|
||||
process.env.NODE_ENV = "development";
|
||||
},
|
||||
cleanLandingPage,
|
||||
translationsEnableMergeBackend,
|
||||
buildLandingPageTranslations,
|
||||
copyTranslationsLandingPage,
|
||||
buildLocaleData,
|
||||
copyStaticLandingPage,
|
||||
genPagesLandingPageDev,
|
||||
rspackWatchLandingPage
|
||||
);
|
||||
|
||||
// build-landing-page
|
||||
export const buildLandingPage = series(
|
||||
async function setEnv() {
|
||||
process.env.NODE_ENV = "production";
|
||||
},
|
||||
cleanLandingPage,
|
||||
buildLandingPageTranslations,
|
||||
copyTranslationsLandingPage,
|
||||
buildLocaleData,
|
||||
copyStaticLandingPage,
|
||||
rspackProdLandingPage,
|
||||
genPagesLandingPageProd
|
||||
);
|
@@ -1,8 +1,8 @@
|
||||
import { deleteSync } from "del";
|
||||
import { mkdir, readFile, writeFile } from "fs/promises";
|
||||
import gulp from "gulp";
|
||||
import { series } from "gulp";
|
||||
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
||||
import { join, resolve } from "node:path";
|
||||
import paths from "../paths.cjs";
|
||||
import paths from "../paths.ts";
|
||||
|
||||
const formatjsDir = join(paths.root_dir, "node_modules", "@formatjs");
|
||||
const outDir = join(paths.build_dir, "locale-data");
|
||||
@@ -31,7 +31,7 @@ const convertToJSON = async (
|
||||
join(formatjsDir, pkg, subDir, `${language}.js`),
|
||||
"utf-8"
|
||||
);
|
||||
} catch (e) {
|
||||
} catch (e: any) {
|
||||
// Ignore if language is missing (i.e. not supported by @formatjs)
|
||||
if (e.code === "ENOENT" && skipMissing) {
|
||||
console.warn(`Skipped missing data for language ${lang} from ${pkg}`);
|
||||
@@ -54,16 +54,16 @@ const convertToJSON = async (
|
||||
await writeFile(join(outDir, `${pkg}/${lang}.json`), localeData);
|
||||
};
|
||||
|
||||
gulp.task("clean-locale-data", async () => deleteSync([outDir]));
|
||||
const cleanLocaleData = async () => deleteSync([outDir]);
|
||||
|
||||
gulp.task("create-locale-data", async () => {
|
||||
const createLocaleData = async () => {
|
||||
const translationMeta = JSON.parse(
|
||||
await readFile(
|
||||
resolve(paths.translations_src, "translationMetadata.json"),
|
||||
"utf-8"
|
||||
)
|
||||
);
|
||||
const conversions = [];
|
||||
const conversions: any[] = [];
|
||||
for (const pkg of Object.keys(INTL_POLYFILLS)) {
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await mkdir(join(outDir, pkg), { recursive: true });
|
||||
@@ -81,9 +81,6 @@ gulp.task("create-locale-data", async () => {
|
||||
)
|
||||
);
|
||||
await Promise.all(conversions);
|
||||
});
|
||||
};
|
||||
|
||||
gulp.task(
|
||||
"build-locale-data",
|
||||
gulp.series("clean-locale-data", "create-locale-data")
|
||||
);
|
||||
export const buildLocaleData = series(cleanLocaleData, createLocaleData);
|
@@ -1,13 +1,13 @@
|
||||
// Tasks to run rspack.
|
||||
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
import log from "fancy-log";
|
||||
import gulp from "gulp";
|
||||
import rspack from "@rspack/core";
|
||||
import { RspackDevServer } from "@rspack/dev-server";
|
||||
import env from "../env.cjs";
|
||||
import paths from "../paths.cjs";
|
||||
import log from "fancy-log";
|
||||
import { series, watch } from "gulp";
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { isDevContainer, isStatsBuild, isTestBuild } from "../env.ts";
|
||||
import paths from "../paths.ts";
|
||||
import {
|
||||
createAppConfig,
|
||||
createCastConfig,
|
||||
@@ -15,7 +15,17 @@ import {
|
||||
createGalleryConfig,
|
||||
createHassioConfig,
|
||||
createLandingPageConfig,
|
||||
} from "../rspack.cjs";
|
||||
} from "../rspack.ts";
|
||||
import {
|
||||
copyTranslationsApp,
|
||||
copyTranslationsLandingPage,
|
||||
copyTranslationsSupervisor,
|
||||
} from "./gather-static.ts";
|
||||
import {
|
||||
buildLandingPageTranslations,
|
||||
buildSupervisorTranslations,
|
||||
buildTranslations,
|
||||
} from "./translations.ts";
|
||||
|
||||
const bothBuilds = (createConfigFunc, params) => [
|
||||
createConfigFunc({ ...params, latestBuild: true }),
|
||||
@@ -29,6 +39,14 @@ const isWsl =
|
||||
.toLocaleLowerCase()
|
||||
.includes("microsoft");
|
||||
|
||||
interface RunDevServer {
|
||||
compiler: any;
|
||||
contentBase: string;
|
||||
port: number;
|
||||
listenHost?: string;
|
||||
proxy?: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {{
|
||||
* compiler: import("@rspack/core").Compiler,
|
||||
@@ -41,12 +59,12 @@ const runDevServer = async ({
|
||||
compiler,
|
||||
contentBase,
|
||||
port,
|
||||
listenHost = undefined,
|
||||
proxy = undefined,
|
||||
}) => {
|
||||
listenHost,
|
||||
proxy,
|
||||
}: RunDevServer) => {
|
||||
if (listenHost === undefined) {
|
||||
// For dev container, we need to listen on all hosts
|
||||
listenHost = env.isDevContainer() ? "0.0.0.0" : "localhost";
|
||||
listenHost = isDevContainer() ? "0.0.0.0" : "localhost";
|
||||
}
|
||||
const server = new RspackDevServer(
|
||||
{
|
||||
@@ -68,7 +86,7 @@ const runDevServer = async ({
|
||||
log("[rspack-dev-server]", `Project is running at http://localhost:${port}`);
|
||||
};
|
||||
|
||||
const doneHandler = (done) => (err, stats) => {
|
||||
const doneHandler = (done?: (value?: unknown) => void) => (err, stats) => {
|
||||
if (err) {
|
||||
log.error(err.stack || err);
|
||||
if (err.details) {
|
||||
@@ -97,49 +115,46 @@ const prodBuild = (conf) =>
|
||||
);
|
||||
});
|
||||
|
||||
gulp.task("rspack-watch-app", () => {
|
||||
export const rspackWatchApp = () => {
|
||||
// This command will run forever because we don't close compiler
|
||||
rspack(
|
||||
process.env.ES5
|
||||
? bothBuilds(createAppConfig, { isProdBuild: false })
|
||||
: createAppConfig({ isProdBuild: false, latestBuild: true })
|
||||
).watch({ poll: isWsl }, doneHandler());
|
||||
gulp.watch(
|
||||
watch(
|
||||
path.join(paths.translations_src, "en.json"),
|
||||
gulp.series("build-translations", "copy-translations-app")
|
||||
series(buildTranslations, copyTranslationsApp)
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
gulp.task("rspack-prod-app", () =>
|
||||
export const rspackProdApp = () =>
|
||||
prodBuild(
|
||||
bothBuilds(createAppConfig, {
|
||||
isProdBuild: true,
|
||||
isStatsBuild: env.isStatsBuild(),
|
||||
isTestBuild: env.isTestBuild(),
|
||||
isStatsBuild: isStatsBuild(),
|
||||
isTestBuild: isTestBuild(),
|
||||
})
|
||||
)
|
||||
);
|
||||
);
|
||||
|
||||
gulp.task("rspack-dev-server-demo", () =>
|
||||
export const rspackDevServerDemo = () =>
|
||||
runDevServer({
|
||||
compiler: rspack(
|
||||
createDemoConfig({ isProdBuild: false, latestBuild: true })
|
||||
),
|
||||
contentBase: paths.demo_output_root,
|
||||
port: 8090,
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
gulp.task("rspack-prod-demo", () =>
|
||||
export const rspackProdDemo = () =>
|
||||
prodBuild(
|
||||
bothBuilds(createDemoConfig, {
|
||||
isProdBuild: true,
|
||||
isStatsBuild: env.isStatsBuild(),
|
||||
isStatsBuild: isStatsBuild(),
|
||||
})
|
||||
)
|
||||
);
|
||||
);
|
||||
|
||||
gulp.task("rspack-dev-server-cast", () =>
|
||||
export const rspackDevServerCast = () =>
|
||||
runDevServer({
|
||||
compiler: rspack(
|
||||
createCastConfig({ isProdBuild: false, latestBuild: true })
|
||||
@@ -148,18 +163,16 @@ gulp.task("rspack-dev-server-cast", () =>
|
||||
port: 8080,
|
||||
// Accessible from the network, because that's how Cast hits it.
|
||||
listenHost: "0.0.0.0",
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
gulp.task("rspack-prod-cast", () =>
|
||||
export const rspackProdCast = () =>
|
||||
prodBuild(
|
||||
bothBuilds(createCastConfig, {
|
||||
isProdBuild: true,
|
||||
})
|
||||
)
|
||||
);
|
||||
);
|
||||
|
||||
gulp.task("rspack-watch-hassio", () => {
|
||||
export const rspackWatchHassio = () => {
|
||||
// This command will run forever because we don't close compiler
|
||||
rspack(
|
||||
createHassioConfig({
|
||||
@@ -168,23 +181,22 @@ gulp.task("rspack-watch-hassio", () => {
|
||||
})
|
||||
).watch({ ignored: /build/, poll: isWsl }, doneHandler());
|
||||
|
||||
gulp.watch(
|
||||
watch(
|
||||
path.join(paths.translations_src, "en.json"),
|
||||
gulp.series("build-supervisor-translations", "copy-translations-supervisor")
|
||||
series(buildSupervisorTranslations, copyTranslationsSupervisor)
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
gulp.task("rspack-prod-hassio", () =>
|
||||
export const rspackProdHassio = () =>
|
||||
prodBuild(
|
||||
bothBuilds(createHassioConfig, {
|
||||
isProdBuild: true,
|
||||
isStatsBuild: env.isStatsBuild(),
|
||||
isTestBuild: env.isTestBuild(),
|
||||
isStatsBuild: isStatsBuild(),
|
||||
isTestBuild: isTestBuild(),
|
||||
})
|
||||
)
|
||||
);
|
||||
);
|
||||
|
||||
gulp.task("rspack-dev-server-gallery", () =>
|
||||
export const rspackDevServerGallery = () =>
|
||||
runDevServer({
|
||||
compiler: rspack(
|
||||
createGalleryConfig({ isProdBuild: false, latestBuild: true })
|
||||
@@ -192,19 +204,17 @@ gulp.task("rspack-dev-server-gallery", () =>
|
||||
contentBase: paths.gallery_output_root,
|
||||
port: 8100,
|
||||
listenHost: "0.0.0.0",
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
gulp.task("rspack-prod-gallery", () =>
|
||||
export const rspackProdGallery = () =>
|
||||
prodBuild(
|
||||
createGalleryConfig({
|
||||
isProdBuild: true,
|
||||
latestBuild: true,
|
||||
})
|
||||
)
|
||||
);
|
||||
);
|
||||
|
||||
gulp.task("rspack-watch-landing-page", () => {
|
||||
export const rspackWatchLandingPage = () => {
|
||||
// This command will run forever because we don't close compiler
|
||||
rspack(
|
||||
process.env.ES5
|
||||
@@ -212,21 +222,17 @@ gulp.task("rspack-watch-landing-page", () => {
|
||||
: createLandingPageConfig({ isProdBuild: false, latestBuild: true })
|
||||
).watch({ poll: isWsl }, doneHandler());
|
||||
|
||||
gulp.watch(
|
||||
watch(
|
||||
path.join(paths.translations_src, "en.json"),
|
||||
gulp.series(
|
||||
"build-landing-page-translations",
|
||||
"copy-translations-landing-page"
|
||||
)
|
||||
series(buildLandingPageTranslations, copyTranslationsLandingPage)
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
gulp.task("rspack-prod-landing-page", () =>
|
||||
export const rspackProdLandingPage = () =>
|
||||
prodBuild(
|
||||
bothBuilds(createLandingPageConfig, {
|
||||
isProdBuild: true,
|
||||
isStatsBuild: env.isStatsBuild(),
|
||||
isTestBuild: env.isTestBuild(),
|
||||
isStatsBuild: isStatsBuild(),
|
||||
isTestBuild: isTestBuild(),
|
||||
})
|
||||
)
|
||||
);
|
||||
);
|
@@ -1,11 +1,10 @@
|
||||
// Generate service workers
|
||||
|
||||
import { deleteAsync } from "del";
|
||||
import gulp from "gulp";
|
||||
import { mkdir, readFile, symlink, writeFile } from "node:fs/promises";
|
||||
import { basename, join, relative } from "node:path";
|
||||
import { injectManifest } from "workbox-build";
|
||||
import paths from "../paths.cjs";
|
||||
import paths from "../paths.ts";
|
||||
|
||||
const SW_MAP = {
|
||||
[paths.app_output_latest]: "modern",
|
||||
@@ -23,7 +22,7 @@ self.addEventListener('install', (event) => {
|
||||
});
|
||||
`.trim() + "\n";
|
||||
|
||||
gulp.task("gen-service-worker-app-dev", async () => {
|
||||
export const genServiceWorkerAppDev = async () => {
|
||||
await mkdir(paths.app_output_root, { recursive: true });
|
||||
await Promise.all(
|
||||
Object.values(SW_MAP).map((build) =>
|
||||
@@ -32,9 +31,9 @@ gulp.task("gen-service-worker-app-dev", async () => {
|
||||
})
|
||||
)
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
gulp.task("gen-service-worker-app-prod", () =>
|
||||
export const genServiceWorkerAppProd = () =>
|
||||
Promise.all(
|
||||
Object.entries(SW_MAP).map(async ([outPath, build]) => {
|
||||
const manifest = JSON.parse(
|
||||
@@ -83,5 +82,4 @@ gulp.task("gen-service-worker-app-prod", () =>
|
||||
await symlink(basename(swDest), swOld);
|
||||
}
|
||||
})
|
||||
)
|
||||
);
|
||||
);
|
@@ -2,7 +2,7 @@
|
||||
|
||||
import { deleteAsync } from "del";
|
||||
import { glob } from "glob";
|
||||
import gulp from "gulp";
|
||||
import { src as glupSrc, dest as gulpDest, parallel, series } from "gulp";
|
||||
import rename from "gulp-rename";
|
||||
import merge from "lodash.merge";
|
||||
import { createHash } from "node:crypto";
|
||||
@@ -10,9 +10,12 @@ import { mkdir, readFile } from "node:fs/promises";
|
||||
import { basename, join } from "node:path";
|
||||
import { PassThrough, Transform } from "node:stream";
|
||||
import { finished } from "node:stream/promises";
|
||||
import env from "../env.cjs";
|
||||
import paths from "../paths.cjs";
|
||||
import "./fetch-nightly-translations.js";
|
||||
import { isProdBuild } from "../env.ts";
|
||||
import paths from "../paths.ts";
|
||||
import {
|
||||
allowSetupFetchNightlyTranslations,
|
||||
fetchNightlyTranslations,
|
||||
} from "./fetch-nightly-translations.ts";
|
||||
|
||||
const inFrontendDir = "translations/frontend";
|
||||
const inBackendDir = "translations/backend";
|
||||
@@ -23,18 +26,20 @@ const TEST_LOCALE = "en-x-test";
|
||||
|
||||
let mergeBackend = false;
|
||||
|
||||
gulp.task(
|
||||
"translations-enable-merge-backend",
|
||||
gulp.parallel(async () => {
|
||||
mergeBackend = true;
|
||||
}, "allow-setup-fetch-nightly-translations")
|
||||
);
|
||||
// translations-enable-merge-backend
|
||||
export const translationsEnableMergeBackend = parallel(async () => {
|
||||
mergeBackend = true;
|
||||
}, allowSetupFetchNightlyTranslations);
|
||||
|
||||
// Transform stream to apply a function on Vinyl JSON files (buffer mode only).
|
||||
// The provided function can either return a new object, or an array of
|
||||
// [object, subdirectory] pairs for fragmentizing the JSON.
|
||||
class CustomJSON extends Transform {
|
||||
constructor(func, reviver = null) {
|
||||
_func: any;
|
||||
|
||||
_reviver: any;
|
||||
|
||||
constructor(func, reviver: any = null) {
|
||||
super({ objectMode: true });
|
||||
this._func = func;
|
||||
this._reviver = reviver;
|
||||
@@ -56,9 +61,17 @@ class CustomJSON extends Transform {
|
||||
|
||||
// Transform stream to merge Vinyl JSON files (buffer mode only).
|
||||
class MergeJSON extends Transform {
|
||||
_objects = [];
|
||||
_objects: any[] = [];
|
||||
|
||||
constructor(stem, startObj = {}, reviver = null) {
|
||||
_stem: any;
|
||||
|
||||
_startObj: any;
|
||||
|
||||
_reviver: any;
|
||||
|
||||
_outFile: any;
|
||||
|
||||
constructor(stem, startObj = {}, reviver: any = null) {
|
||||
super({ objectMode: true, allowHalfOpen: false });
|
||||
this._stem = stem;
|
||||
this._startObj = structuredClone(startObj);
|
||||
@@ -111,11 +124,12 @@ const testReviver = (_key, value) =>
|
||||
const KEY_REFERENCE = /\[%key:([^%]+)%\]/;
|
||||
const lokaliseTransform = (data, path, original = data) => {
|
||||
const output = {};
|
||||
for (const [key, value] of Object.entries(data)) {
|
||||
for (const entry of Object.entries(data)) {
|
||||
const [key, value] = entry as [string, string];
|
||||
if (typeof value === "object") {
|
||||
output[key] = lokaliseTransform(value, path, original);
|
||||
} else {
|
||||
output[key] = value.replace(KEY_REFERENCE, (_match, lokalise_key) => {
|
||||
output[key] = value?.replace(KEY_REFERENCE, (_match, lokalise_key) => {
|
||||
const replace = lokalise_key.split("::").reduce((tr, k) => {
|
||||
if (!tr) {
|
||||
throw Error(`Invalid key placeholder ${lokalise_key} in ${path}`);
|
||||
@@ -132,18 +146,17 @@ const lokaliseTransform = (data, path, original = data) => {
|
||||
return output;
|
||||
};
|
||||
|
||||
gulp.task("clean-translations", () => deleteAsync([workDir]));
|
||||
export const cleanTranslations = () => deleteAsync([workDir]);
|
||||
|
||||
const makeWorkDir = () => mkdir(workDir, { recursive: true });
|
||||
|
||||
const createTestTranslation = () =>
|
||||
env.isProdBuild()
|
||||
isProdBuild()
|
||||
? Promise.resolve()
|
||||
: gulp
|
||||
.src(EN_SRC)
|
||||
: glupSrc(EN_SRC)
|
||||
.pipe(new CustomJSON(null, testReviver))
|
||||
.pipe(rename(`${TEST_LOCALE}.json`))
|
||||
.pipe(gulp.dest(workDir));
|
||||
.pipe(gulpDest(workDir));
|
||||
|
||||
/**
|
||||
* This task will build a master translation file, to be used as the base for
|
||||
@@ -155,11 +168,10 @@ const createTestTranslation = () =>
|
||||
* the Lokalise update to translations/en.json will not happen immediately.
|
||||
*/
|
||||
const createMasterTranslation = () =>
|
||||
gulp
|
||||
.src([EN_SRC, ...(mergeBackend ? [`${inBackendDir}/en.json`] : [])])
|
||||
glupSrc([EN_SRC, ...(mergeBackend ? [`${inBackendDir}/en.json`] : [])])
|
||||
.pipe(new CustomJSON(lokaliseTransform))
|
||||
.pipe(new MergeJSON("en"))
|
||||
.pipe(gulp.dest(workDir));
|
||||
.pipe(gulpDest(workDir));
|
||||
|
||||
const FRAGMENTS = ["base"];
|
||||
|
||||
@@ -186,12 +198,12 @@ const createTranslations = async () => {
|
||||
// each locale, then fragmentizes and flattens the data for final output.
|
||||
const translationFiles = await glob([
|
||||
`${inFrontendDir}/!(en).json`,
|
||||
...(env.isProdBuild() ? [] : [`${workDir}/${TEST_LOCALE}.json`]),
|
||||
...(isProdBuild() ? [] : [`${workDir}/${TEST_LOCALE}.json`]),
|
||||
]);
|
||||
const hashStream = new Transform({
|
||||
objectMode: true,
|
||||
transform: async (file, _, callback) => {
|
||||
const hash = env.isProdBuild()
|
||||
const hash = isProdBuild()
|
||||
? createHash("md5").update(file.contents).digest("hex")
|
||||
: "dev";
|
||||
HASHES.set(file.stem, hash);
|
||||
@@ -230,7 +242,7 @@ const createTranslations = async () => {
|
||||
})
|
||||
)
|
||||
)
|
||||
.pipe(gulp.dest(outDir));
|
||||
.pipe(gulpDest(outDir));
|
||||
|
||||
// Send the English master downstream first, then for each other locale
|
||||
// generate merged JSON data to continue piping. It begins with the master
|
||||
@@ -240,15 +252,15 @@ const createTranslations = async () => {
|
||||
// TODO: This is a naive interpretation of BCP47 that should be improved.
|
||||
// Will be OK for now as long as we don't have anything more complicated
|
||||
// than a base translation + region.
|
||||
const masterStream = gulp
|
||||
.src(`${workDir}/en.json`)
|
||||
.pipe(new PassThrough({ objectMode: true }));
|
||||
const masterStream = glupSrc(`${workDir}/en.json`).pipe(
|
||||
new PassThrough({ objectMode: true })
|
||||
);
|
||||
masterStream.pipe(hashStream, { end: false });
|
||||
const mergesFinished = [finished(masterStream)];
|
||||
for (const translationFile of translationFiles) {
|
||||
const locale = basename(translationFile, ".json");
|
||||
const subtags = locale.split("-");
|
||||
const mergeFiles = [];
|
||||
const mergeFiles: string[] = [];
|
||||
for (let i = 1; i <= subtags.length; i++) {
|
||||
const lang = subtags.slice(0, i).join("-");
|
||||
if (lang === TEST_LOCALE) {
|
||||
@@ -260,9 +272,9 @@ const createTranslations = async () => {
|
||||
}
|
||||
}
|
||||
}
|
||||
const mergeStream = gulp
|
||||
.src(mergeFiles, { allowEmpty: true })
|
||||
.pipe(new MergeJSON(locale, enMaster, emptyReviver));
|
||||
const mergeStream = glupSrc(mergeFiles, { allowEmpty: true }).pipe(
|
||||
new MergeJSON(locale, enMaster, emptyReviver)
|
||||
);
|
||||
mergesFinished.push(finished(mergeStream));
|
||||
mergeStream.pipe(hashStream, { end: false });
|
||||
}
|
||||
@@ -275,12 +287,11 @@ const createTranslations = async () => {
|
||||
};
|
||||
|
||||
const writeTranslationMetaData = () =>
|
||||
gulp
|
||||
.src([`${paths.translations_src}/translationMetadata.json`])
|
||||
glupSrc([`${paths.translations_src}/translationMetadata.json`])
|
||||
.pipe(
|
||||
new CustomJSON((meta) => {
|
||||
// Add the test translation in development.
|
||||
if (!env.isProdBuild()) {
|
||||
if (!isProdBuild()) {
|
||||
meta[TEST_LOCALE] = { nativeName: "Translation Test" };
|
||||
}
|
||||
// Filter out locales without a native name, and add the hashes.
|
||||
@@ -300,28 +311,22 @@ const writeTranslationMetaData = () =>
|
||||
};
|
||||
})
|
||||
)
|
||||
.pipe(gulp.dest(workDir));
|
||||
.pipe(gulpDest(workDir));
|
||||
|
||||
gulp.task(
|
||||
"build-translations",
|
||||
gulp.series(
|
||||
gulp.parallel(
|
||||
"fetch-nightly-translations",
|
||||
gulp.series("clean-translations", makeWorkDir)
|
||||
),
|
||||
createTestTranslation,
|
||||
createMasterTranslation,
|
||||
createTranslations,
|
||||
writeTranslationMetaData
|
||||
)
|
||||
export const buildTranslations = series(
|
||||
parallel(fetchNightlyTranslations, series(cleanTranslations, makeWorkDir)),
|
||||
createTestTranslation,
|
||||
createMasterTranslation,
|
||||
createTranslations,
|
||||
writeTranslationMetaData
|
||||
);
|
||||
|
||||
gulp.task(
|
||||
"build-supervisor-translations",
|
||||
gulp.series(setFragment("supervisor"), "build-translations")
|
||||
export const buildSupervisorTranslations = series(
|
||||
setFragment("supervisor"),
|
||||
buildTranslations
|
||||
);
|
||||
|
||||
gulp.task(
|
||||
"build-landing-page-translations",
|
||||
gulp.series(setFragment("landing-page"), "build-translations")
|
||||
export const buildLandingPageTranslations = series(
|
||||
setFragment("landing-page"),
|
||||
buildTranslations
|
||||
);
|
@@ -5,10 +5,11 @@ import { version as babelVersion } from "@babel/core";
|
||||
import presetEnv from "@babel/preset-env";
|
||||
import compilationTargets from "@babel/helper-compilation-targets";
|
||||
import coreJSCompat from "core-js-compat";
|
||||
|
||||
import { logPlugin } from "@babel/preset-env/lib/debug.js";
|
||||
// eslint-disable-next-line import/no-relative-packages
|
||||
import shippedPolyfills from "../node_modules/babel-plugin-polyfill-corejs3/lib/shipped-proposals.js";
|
||||
import { babelOptions } from "./bundle.cjs";
|
||||
import { babelOptions } from "./bundle.ts";
|
||||
|
||||
const detailsOpen = (heading) =>
|
||||
`<details>\n<summary><h4>${heading}</h4></summary>\n`;
|
||||
@@ -50,6 +51,12 @@ for (const buildType of ["Modern", "Legacy"]) {
|
||||
const babelOpts = babelOptions({ latestBuild: browserslistEnv === "modern" });
|
||||
const presetEnvOpts = babelOpts.presets[0][1];
|
||||
|
||||
if (typeof presetEnvOpts !== "object") {
|
||||
throw new Error(
|
||||
"The first preset in babelOptions is not an object. This is unexpected."
|
||||
);
|
||||
}
|
||||
|
||||
// Invoking preset-env in debug mode will log the included plugins
|
||||
console.log(detailsOpen(`${buildType} Build Babel Plugins`));
|
||||
presetEnv.default(dummyAPI, {
|
@@ -1,63 +0,0 @@
|
||||
const path = require("path");
|
||||
|
||||
module.exports = {
|
||||
root_dir: path.resolve(__dirname, ".."),
|
||||
|
||||
build_dir: path.resolve(__dirname, "../build"),
|
||||
app_output_root: path.resolve(__dirname, "../hass_frontend"),
|
||||
app_output_static: path.resolve(__dirname, "../hass_frontend/static"),
|
||||
app_output_latest: path.resolve(
|
||||
__dirname,
|
||||
"../hass_frontend/frontend_latest"
|
||||
),
|
||||
app_output_es5: path.resolve(__dirname, "../hass_frontend/frontend_es5"),
|
||||
|
||||
demo_dir: path.resolve(__dirname, "../demo"),
|
||||
demo_output_root: path.resolve(__dirname, "../demo/dist"),
|
||||
demo_output_static: path.resolve(__dirname, "../demo/dist/static"),
|
||||
demo_output_latest: path.resolve(__dirname, "../demo/dist/frontend_latest"),
|
||||
demo_output_es5: path.resolve(__dirname, "../demo/dist/frontend_es5"),
|
||||
|
||||
cast_dir: path.resolve(__dirname, "../cast"),
|
||||
cast_output_root: path.resolve(__dirname, "../cast/dist"),
|
||||
cast_output_static: path.resolve(__dirname, "../cast/dist/static"),
|
||||
cast_output_latest: path.resolve(__dirname, "../cast/dist/frontend_latest"),
|
||||
cast_output_es5: path.resolve(__dirname, "../cast/dist/frontend_es5"),
|
||||
|
||||
gallery_dir: path.resolve(__dirname, "../gallery"),
|
||||
gallery_build: path.resolve(__dirname, "../gallery/build"),
|
||||
gallery_output_root: path.resolve(__dirname, "../gallery/dist"),
|
||||
gallery_output_latest: path.resolve(
|
||||
__dirname,
|
||||
"../gallery/dist/frontend_latest"
|
||||
),
|
||||
gallery_output_static: path.resolve(__dirname, "../gallery/dist/static"),
|
||||
|
||||
landingPage_dir: path.resolve(__dirname, "../landing-page"),
|
||||
landingPage_build: path.resolve(__dirname, "../landing-page/build"),
|
||||
landingPage_output_root: path.resolve(__dirname, "../landing-page/dist"),
|
||||
landingPage_output_latest: path.resolve(
|
||||
__dirname,
|
||||
"../landing-page/dist/frontend_latest"
|
||||
),
|
||||
landingPage_output_es5: path.resolve(
|
||||
__dirname,
|
||||
"../landing-page/dist/frontend_es5"
|
||||
),
|
||||
landingPage_output_static: path.resolve(
|
||||
__dirname,
|
||||
"../landing-page/dist/static"
|
||||
),
|
||||
|
||||
hassio_dir: path.resolve(__dirname, "../hassio"),
|
||||
hassio_output_root: path.resolve(__dirname, "../hassio/build"),
|
||||
hassio_output_static: path.resolve(__dirname, "../hassio/build/static"),
|
||||
hassio_output_latest: path.resolve(
|
||||
__dirname,
|
||||
"../hassio/build/frontend_latest"
|
||||
),
|
||||
hassio_output_es5: path.resolve(__dirname, "../hassio/build/frontend_es5"),
|
||||
hassio_publicPath: "/api/hassio/app",
|
||||
|
||||
translations_src: path.resolve(__dirname, "../src/translations"),
|
||||
};
|
63
build-scripts/paths.ts
Normal file
63
build-scripts/paths.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
import path, { dirname as pathDirname } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
export const dirname = pathDirname(fileURLToPath(import.meta.url));
|
||||
|
||||
export default {
|
||||
root_dir: path.resolve(dirname, ".."),
|
||||
|
||||
build_dir: path.resolve(dirname, "../build"),
|
||||
app_output_root: path.resolve(dirname, "../hass_frontend"),
|
||||
app_output_static: path.resolve(dirname, "../hass_frontend/static"),
|
||||
app_output_latest: path.resolve(dirname, "../hass_frontend/frontend_latest"),
|
||||
app_output_es5: path.resolve(dirname, "../hass_frontend/frontend_es5"),
|
||||
|
||||
demo_dir: path.resolve(dirname, "../demo"),
|
||||
demo_output_root: path.resolve(dirname, "../demo/dist"),
|
||||
demo_output_static: path.resolve(dirname, "../demo/dist/static"),
|
||||
demo_output_latest: path.resolve(dirname, "../demo/dist/frontend_latest"),
|
||||
demo_output_es5: path.resolve(dirname, "../demo/dist/frontend_es5"),
|
||||
|
||||
cast_dir: path.resolve(dirname, "../cast"),
|
||||
cast_output_root: path.resolve(dirname, "../cast/dist"),
|
||||
cast_output_static: path.resolve(dirname, "../cast/dist/static"),
|
||||
cast_output_latest: path.resolve(dirname, "../cast/dist/frontend_latest"),
|
||||
cast_output_es5: path.resolve(dirname, "../cast/dist/frontend_es5"),
|
||||
|
||||
gallery_dir: path.resolve(dirname, "../gallery"),
|
||||
gallery_build: path.resolve(dirname, "../gallery/build"),
|
||||
gallery_output_root: path.resolve(dirname, "../gallery/dist"),
|
||||
gallery_output_latest: path.resolve(
|
||||
dirname,
|
||||
"../gallery/dist/frontend_latest"
|
||||
),
|
||||
gallery_output_static: path.resolve(dirname, "../gallery/dist/static"),
|
||||
|
||||
landingPage_dir: path.resolve(dirname, "../landing-page"),
|
||||
landingPage_build: path.resolve(dirname, "../landing-page/build"),
|
||||
landingPage_output_root: path.resolve(dirname, "../landing-page/dist"),
|
||||
landingPage_output_latest: path.resolve(
|
||||
dirname,
|
||||
"../landing-page/dist/frontend_latest"
|
||||
),
|
||||
landingPage_output_es5: path.resolve(
|
||||
dirname,
|
||||
"../landing-page/dist/frontend_es5"
|
||||
),
|
||||
landingPage_output_static: path.resolve(
|
||||
dirname,
|
||||
"../landing-page/dist/static"
|
||||
),
|
||||
|
||||
hassio_dir: path.resolve(dirname, "../hassio"),
|
||||
hassio_output_root: path.resolve(dirname, "../hassio/build"),
|
||||
hassio_output_static: path.resolve(dirname, "../hassio/build/static"),
|
||||
hassio_output_latest: path.resolve(
|
||||
dirname,
|
||||
"../hassio/build/frontend_latest"
|
||||
),
|
||||
hassio_output_es5: path.resolve(dirname, "../hassio/build/frontend_es5"),
|
||||
hassio_publicPath: "/api/hassio/app",
|
||||
|
||||
translations_src: path.resolve(dirname, "../src/translations"),
|
||||
};
|
@@ -1,20 +1,25 @@
|
||||
const { existsSync } = require("fs");
|
||||
const path = require("path");
|
||||
const rspack = require("@rspack/core");
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
const { RsdoctorRspackPlugin } = require("@rsdoctor/rspack-plugin");
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
const { StatsWriterPlugin } = require("webpack-stats-plugin");
|
||||
const filterStats = require("@bundle-stats/plugin-webpack-filter");
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
const TerserPlugin = require("terser-webpack-plugin");
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
const { WebpackManifestPlugin } = require("rspack-manifest-plugin");
|
||||
const log = require("fancy-log");
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
const WebpackBar = require("webpackbar/rspack");
|
||||
const paths = require("./paths.cjs");
|
||||
const bundle = require("./bundle.cjs");
|
||||
import filterStats from "@bundle-stats/plugin-webpack-filter";
|
||||
import { RsdoctorRspackPlugin } from "@rsdoctor/rspack-plugin";
|
||||
import { DefinePlugin, NormalModuleReplacementPlugin } from "@rspack/core";
|
||||
import { defineConfig } from "@rspack/cli";
|
||||
import log from "fancy-log";
|
||||
import { existsSync } from "node:fs";
|
||||
import path from "node:path";
|
||||
import { WebpackManifestPlugin } from "rspack-manifest-plugin";
|
||||
import TerserPlugin from "terser-webpack-plugin";
|
||||
import { StatsWriterPlugin } from "webpack-stats-plugin";
|
||||
// @ts-ignore
|
||||
import WebpackBar from "webpackbar/rspack";
|
||||
import {
|
||||
babelOptions,
|
||||
config,
|
||||
definedVars,
|
||||
emptyPackages,
|
||||
sourceMapURL,
|
||||
swcOptions,
|
||||
terserOptions,
|
||||
} from "./bundle.ts";
|
||||
import paths from "./paths.ts";
|
||||
|
||||
class LogStartCompilePlugin {
|
||||
ignoredFirst = false;
|
||||
@@ -30,7 +35,7 @@ class LogStartCompilePlugin {
|
||||
}
|
||||
}
|
||||
|
||||
const createRspackConfig = ({
|
||||
export const createRspackConfig = ({
|
||||
name,
|
||||
entry,
|
||||
outputPath,
|
||||
@@ -42,12 +47,23 @@ const createRspackConfig = ({
|
||||
isTestBuild,
|
||||
isHassioBuild,
|
||||
dontHash,
|
||||
}: {
|
||||
name: string;
|
||||
entry: any;
|
||||
outputPath: string;
|
||||
publicPath: string;
|
||||
defineOverlay?: Record<string, any>;
|
||||
isProdBuild?: boolean;
|
||||
latestBuild?: boolean;
|
||||
isStatsBuild?: boolean;
|
||||
isTestBuild?: boolean;
|
||||
isHassioBuild?: boolean;
|
||||
dontHash?: Set<string>;
|
||||
}) => {
|
||||
if (!dontHash) {
|
||||
dontHash = new Set();
|
||||
}
|
||||
const ignorePackages = bundle.ignorePackages({ latestBuild });
|
||||
return {
|
||||
return defineConfig({
|
||||
name,
|
||||
mode: isProdBuild ? "production" : "development",
|
||||
target: `browserslist:${latestBuild ? "modern" : "legacy"}`,
|
||||
@@ -70,7 +86,7 @@ const createRspackConfig = ({
|
||||
{
|
||||
loader: "babel-loader",
|
||||
options: {
|
||||
...bundle.babelOptions({
|
||||
...babelOptions({
|
||||
latestBuild,
|
||||
isProdBuild,
|
||||
isTestBuild,
|
||||
@@ -82,7 +98,7 @@ const createRspackConfig = ({
|
||||
},
|
||||
{
|
||||
loader: "builtin:swc-loader",
|
||||
options: bundle.swcOptions(),
|
||||
options: swcOptions(),
|
||||
},
|
||||
],
|
||||
resolve: {
|
||||
@@ -103,7 +119,7 @@ const createRspackConfig = ({
|
||||
new TerserPlugin({
|
||||
parallel: true,
|
||||
extractComments: true,
|
||||
terserOptions: bundle.terserOptions({ latestBuild, isTestBuild }),
|
||||
terserOptions: terserOptions({ latestBuild, isTestBuild }),
|
||||
}),
|
||||
],
|
||||
moduleIds: isProdBuild && !isStatsBuild ? "deterministic" : "named",
|
||||
@@ -122,7 +138,7 @@ const createRspackConfig = ({
|
||||
!chunk.canBeInitial() &&
|
||||
!new RegExp(
|
||||
`^.+-work${latestBuild ? "(?:let|er)" : "let"}$`
|
||||
).test(chunk.name),
|
||||
).test(chunk?.name || ""),
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
@@ -131,44 +147,11 @@ const createRspackConfig = ({
|
||||
// Only include the JS of entrypoints
|
||||
filter: (file) => file.isInitial && !file.name.endsWith(".map"),
|
||||
}),
|
||||
new rspack.DefinePlugin(
|
||||
bundle.definedVars({ isProdBuild, latestBuild, defineOverlay })
|
||||
new DefinePlugin(
|
||||
definedVars({ isProdBuild, latestBuild, defineOverlay })
|
||||
),
|
||||
new rspack.IgnorePlugin({
|
||||
checkResource(resource, context) {
|
||||
// Only use ignore to intercept imports that we don't control
|
||||
// inside node_module dependencies.
|
||||
if (
|
||||
!context.includes("/node_modules/") ||
|
||||
// calling define.amd will call require("!!webpack amd options")
|
||||
resource.startsWith("!!webpack") ||
|
||||
// loaded by webpack dev server but doesn't exist.
|
||||
resource === "webpack/hot" ||
|
||||
resource.startsWith("@swc/helpers")
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
let fullPath;
|
||||
try {
|
||||
fullPath = resource.startsWith(".")
|
||||
? path.resolve(context, resource)
|
||||
: require.resolve(resource);
|
||||
} catch (err) {
|
||||
console.error(
|
||||
"Error in Home Assistant ignore plugin",
|
||||
resource,
|
||||
context
|
||||
);
|
||||
throw err;
|
||||
}
|
||||
|
||||
return ignorePackages.some((toIgnorePath) =>
|
||||
fullPath.startsWith(toIgnorePath)
|
||||
);
|
||||
},
|
||||
}),
|
||||
new rspack.NormalModuleReplacementPlugin(
|
||||
new RegExp(bundle.emptyPackages({ isHassioBuild }).join("|")),
|
||||
new NormalModuleReplacementPlugin(
|
||||
new RegExp(emptyPackages({ isHassioBuild }).join("|")),
|
||||
path.resolve(paths.root_dir, "src/util/empty.js")
|
||||
),
|
||||
!isProdBuild && new LogStartCompilePlugin(),
|
||||
@@ -184,7 +167,9 @@ const createRspackConfig = ({
|
||||
isProdBuild &&
|
||||
isStatsBuild &&
|
||||
new RsdoctorRspackPlugin({
|
||||
reportDir: path.join(paths.build_dir, "rsdoctor"),
|
||||
output: {
|
||||
reportDir: path.join(paths.build_dir, "rsdoctor"),
|
||||
},
|
||||
features: ["plugins", "bundle"],
|
||||
supports: {
|
||||
generateTileGraph: true,
|
||||
@@ -219,7 +204,9 @@ const createRspackConfig = ({
|
||||
output: {
|
||||
module: latestBuild,
|
||||
filename: ({ chunk }) =>
|
||||
!isProdBuild || isStatsBuild || dontHash.has(chunk.name)
|
||||
!isProdBuild ||
|
||||
isStatsBuild ||
|
||||
(chunk?.name && dontHash.has(chunk.name))
|
||||
? "[name].js"
|
||||
: "[name].[contenthash].js",
|
||||
chunkFilename:
|
||||
@@ -250,7 +237,7 @@ const createRspackConfig = ({
|
||||
// dev tools, and they stay happy getting 404s with valid requests.
|
||||
return `/unknown${path.resolve("/", info.resourcePath)}`;
|
||||
}
|
||||
return new URL(info.resourcePath, bundle.sourceMapURL()).href;
|
||||
return new URL(info.resourcePath, sourceMapURL()).href;
|
||||
}
|
||||
: undefined,
|
||||
])
|
||||
@@ -260,35 +247,51 @@ const createRspackConfig = ({
|
||||
layers: true,
|
||||
outputModule: true,
|
||||
},
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
const createAppConfig = ({
|
||||
export const createAppConfig = ({
|
||||
isProdBuild,
|
||||
latestBuild,
|
||||
isStatsBuild,
|
||||
isTestBuild,
|
||||
}: {
|
||||
isProdBuild?: boolean;
|
||||
latestBuild?: boolean;
|
||||
isStatsBuild?: boolean;
|
||||
isTestBuild?: boolean;
|
||||
}) =>
|
||||
createRspackConfig(
|
||||
bundle.config.app({ isProdBuild, latestBuild, isStatsBuild, isTestBuild })
|
||||
config.app({ isProdBuild, latestBuild, isStatsBuild, isTestBuild })
|
||||
);
|
||||
|
||||
const createDemoConfig = ({ isProdBuild, latestBuild, isStatsBuild }) =>
|
||||
createRspackConfig(
|
||||
bundle.config.demo({ isProdBuild, latestBuild, isStatsBuild })
|
||||
);
|
||||
export const createDemoConfig = ({
|
||||
isProdBuild,
|
||||
latestBuild,
|
||||
isStatsBuild,
|
||||
}: {
|
||||
isProdBuild?: boolean;
|
||||
latestBuild?: boolean;
|
||||
isStatsBuild?: boolean;
|
||||
}) =>
|
||||
createRspackConfig(config.demo({ isProdBuild, latestBuild, isStatsBuild }));
|
||||
|
||||
const createCastConfig = ({ isProdBuild, latestBuild }) =>
|
||||
createRspackConfig(bundle.config.cast({ isProdBuild, latestBuild }));
|
||||
export const createCastConfig = ({ isProdBuild, latestBuild }) =>
|
||||
createRspackConfig(config.cast({ isProdBuild, latestBuild }));
|
||||
|
||||
const createHassioConfig = ({
|
||||
export const createHassioConfig = ({
|
||||
isProdBuild,
|
||||
latestBuild,
|
||||
isStatsBuild,
|
||||
isTestBuild,
|
||||
}: {
|
||||
isProdBuild?: boolean;
|
||||
latestBuild?: boolean;
|
||||
isStatsBuild?: boolean;
|
||||
isTestBuild?: boolean;
|
||||
}) =>
|
||||
createRspackConfig(
|
||||
bundle.config.hassio({
|
||||
config.hassio({
|
||||
isProdBuild,
|
||||
latestBuild,
|
||||
isStatsBuild,
|
||||
@@ -296,18 +299,8 @@ const createHassioConfig = ({
|
||||
})
|
||||
);
|
||||
|
||||
const createGalleryConfig = ({ isProdBuild, latestBuild }) =>
|
||||
createRspackConfig(bundle.config.gallery({ isProdBuild, latestBuild }));
|
||||
export const createGalleryConfig = ({ isProdBuild, latestBuild }) =>
|
||||
createRspackConfig(config.gallery({ isProdBuild, latestBuild }));
|
||||
|
||||
const createLandingPageConfig = ({ isProdBuild, latestBuild }) =>
|
||||
createRspackConfig(bundle.config.landingPage({ isProdBuild, latestBuild }));
|
||||
|
||||
module.exports = {
|
||||
createAppConfig,
|
||||
createDemoConfig,
|
||||
createCastConfig,
|
||||
createHassioConfig,
|
||||
createGalleryConfig,
|
||||
createRspackConfig,
|
||||
createLandingPageConfig,
|
||||
};
|
||||
export const createLandingPageConfig = ({ isProdBuild, latestBuild }) =>
|
||||
createRspackConfig(config.landingPage({ isProdBuild, latestBuild }));
|
42
build-scripts/runTask.ts
Normal file
42
build-scripts/runTask.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
// run-build.ts
|
||||
import { series } from "gulp";
|
||||
import { availableParallelism } from "node:os";
|
||||
import tasks from "./gulp/index.ts";
|
||||
|
||||
process.env.UV_THREADPOOL_SIZE = availableParallelism().toString();
|
||||
|
||||
const runGulpTask = async (runTasks: string[]) => {
|
||||
try {
|
||||
for (const taskName of runTasks) {
|
||||
if (tasks[taskName] === undefined) {
|
||||
console.error(`Gulp task "${taskName}" does not exist.`);
|
||||
console.log("Available tasks:");
|
||||
Object.keys(tasks).forEach((task) => {
|
||||
console.log(` - ${task}`);
|
||||
});
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
await new Promise((resolve, reject) => {
|
||||
series(...runTasks.map((taskName) => tasks[taskName]))((err?: Error) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
} else {
|
||||
resolve(null);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
process.exit(0);
|
||||
} catch (error: any) {
|
||||
console.error(`Error running Gulp task "${runTasks}":`, error);
|
||||
process.exit(1);
|
||||
}
|
||||
};
|
||||
|
||||
// Get the task name from command line arguments
|
||||
// TODO arg validation
|
||||
const tasksToRun = process.argv.slice(2);
|
||||
|
||||
runGulpTask(tasksToRun);
|
@@ -6,4 +6,4 @@ set -e
|
||||
|
||||
cd "$(dirname "$0")/../.."
|
||||
|
||||
./node_modules/.bin/gulp build-cast
|
||||
yarn run-task build-cast
|
||||
|
@@ -6,4 +6,4 @@ set -e
|
||||
|
||||
cd "$(dirname "$0")/../.."
|
||||
|
||||
./node_modules/.bin/gulp develop-cast
|
||||
yarn run-task develop-cast
|
||||
|
@@ -6,4 +6,4 @@ set -e
|
||||
|
||||
cd "$(dirname "$0")/../.."
|
||||
|
||||
./node_modules/.bin/gulp build-demo
|
||||
yarn run-task build-demo
|
||||
|
@@ -6,4 +6,4 @@ set -e
|
||||
|
||||
cd "$(dirname "$0")/../.."
|
||||
|
||||
./node_modules/.bin/gulp develop-demo
|
||||
yarn run-task develop-demo
|
||||
|
@@ -6,4 +6,4 @@ set -e
|
||||
|
||||
cd "$(dirname "$0")/../.."
|
||||
|
||||
./node_modules/.bin/gulp analyze-demo
|
||||
yarn run-task analyze-demo
|
@@ -56,15 +56,6 @@ export default tseslint.config(
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
settings: {
|
||||
"import/resolver": {
|
||||
webpack: {
|
||||
config: "./rspack.config.cjs",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
rules: {
|
||||
"class-methods-use-this": "off",
|
||||
"new-cap": "off",
|
||||
@@ -187,5 +178,12 @@ export default tseslint.config(
|
||||
],
|
||||
"no-use-before-define": "off",
|
||||
},
|
||||
settings: {
|
||||
"import/resolver": {
|
||||
node: {
|
||||
extensions: [".ts", ".js"],
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
);
|
||||
|
@@ -6,4 +6,4 @@ set -e
|
||||
|
||||
cd "$(dirname "$0")/../.."
|
||||
|
||||
./node_modules/.bin/gulp build-gallery
|
||||
yarn run-task build-gallery
|
||||
|
@@ -6,4 +6,4 @@ set -e
|
||||
|
||||
cd "$(dirname "$0")/../.."
|
||||
|
||||
./node_modules/.bin/gulp develop-gallery
|
||||
yarn run-task develop-gallery
|
||||
|
@@ -1,4 +0,0 @@
|
||||
import { availableParallelism } from "node:os";
|
||||
import "./build-scripts/gulp/index.mjs";
|
||||
|
||||
process.env.UV_THREADPOOL_SIZE = availableParallelism();
|
@@ -6,4 +6,4 @@ set -e
|
||||
|
||||
cd "$(dirname "$0")/../.."
|
||||
|
||||
./node_modules/.bin/gulp build-hassio
|
||||
yarn run-task build-hassio
|
||||
|
@@ -6,4 +6,4 @@ set -e
|
||||
|
||||
cd "$(dirname "$0")/../.."
|
||||
|
||||
./node_modules/.bin/gulp develop-hassio
|
||||
yarn run-task develop-hassio
|
||||
|
@@ -6,4 +6,4 @@ set -e
|
||||
|
||||
cd "$(dirname "$0")/../.."
|
||||
|
||||
./node_modules/.bin/gulp build-landing-page
|
||||
yarn run-task build-landing-page
|
||||
|
@@ -6,4 +6,4 @@ set -e
|
||||
|
||||
cd "$(dirname "$0")/../.."
|
||||
|
||||
./node_modules/.bin/gulp develop-landing-page
|
||||
yarn run-task develop-landing-page
|
||||
|
@@ -1,5 +1,6 @@
|
||||
import "@material/mwc-linear-progress/mwc-linear-progress";
|
||||
import { mdiArrowCollapseDown, mdiDownload } from "@mdi/js";
|
||||
|
||||
// eslint-disable-next-line import/extensions
|
||||
import { IntersectionController } from "@lit-labs/observers/intersection-controller.js";
|
||||
import { LitElement, type PropertyValues, css, html, nothing } from "lit";
|
||||
|
@@ -20,7 +20,8 @@
|
||||
"prepack": "pinst --disable",
|
||||
"postpack": "pinst --enable",
|
||||
"test": "vitest run --config test/vitest.config.ts",
|
||||
"test:coverage": "vitest run --config test/vitest.config.ts --coverage"
|
||||
"test:coverage": "vitest run --config test/vitest.config.ts --coverage",
|
||||
"run-task": "tsx ./build-scripts/runTask.ts"
|
||||
},
|
||||
"author": "Paulus Schoutsen <Paulus@PaulusSchoutsen.nl> (http://paulusschoutsen.nl)",
|
||||
"license": "Apache-2.0",
|
||||
@@ -172,6 +173,7 @@
|
||||
"@types/lodash.merge": "4.6.9",
|
||||
"@types/luxon": "3.6.2",
|
||||
"@types/mocha": "10.0.10",
|
||||
"@types/node": "22.15.16",
|
||||
"@types/qrcode": "1.5.5",
|
||||
"@types/sortablejs": "1.15.8",
|
||||
"@types/tar": "6.1.13",
|
||||
@@ -185,7 +187,6 @@
|
||||
"eslint": "9.31.0",
|
||||
"eslint-config-airbnb-base": "15.0.0",
|
||||
"eslint-config-prettier": "10.1.8",
|
||||
"eslint-import-resolver-webpack": "0.13.10",
|
||||
"eslint-plugin-import": "2.32.0",
|
||||
"eslint-plugin-lit": "2.1.1",
|
||||
"eslint-plugin-lit-a11y": "5.1.0",
|
||||
@@ -215,6 +216,7 @@
|
||||
"tar": "7.4.3",
|
||||
"terser-webpack-plugin": "5.3.14",
|
||||
"ts-lit-plugin": "2.0.2",
|
||||
"tsx": "4.19.4",
|
||||
"typescript": "5.8.3",
|
||||
"typescript-eslint": "8.37.0",
|
||||
"vite-tsconfig-paths": "5.1.4",
|
||||
|
@@ -1,28 +0,0 @@
|
||||
/* eslint-disable @typescript-eslint/no-require-imports */
|
||||
// Needs to remain CommonJS until eslint-import-resolver-webpack supports ES modules
|
||||
const rspack = require("./build-scripts/rspack.cjs");
|
||||
const env = require("./build-scripts/env.cjs");
|
||||
|
||||
// This file exists because we haven't migrated the stats script yet
|
||||
|
||||
const configs = [
|
||||
rspack.createAppConfig({
|
||||
isProdBuild: env.isProdBuild(),
|
||||
isStatsBuild: env.isStatsBuild(),
|
||||
isTestBuild: env.isTestBuild(),
|
||||
latestBuild: true,
|
||||
}),
|
||||
];
|
||||
|
||||
if (env.isProdBuild() && !env.isStatsBuild()) {
|
||||
configs.push(
|
||||
rspack.createAppConfig({
|
||||
isProdBuild: env.isProdBuild(),
|
||||
isStatsBuild: env.isStatsBuild(),
|
||||
isTestBuild: env.isTestBuild(),
|
||||
latestBuild: false,
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
module.exports = configs;
|
@@ -6,4 +6,4 @@ set -e
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
./node_modules/.bin/gulp build-app
|
||||
yarn run-task build-app
|
||||
|
@@ -6,4 +6,4 @@ set -e
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
./node_modules/.bin/gulp develop-app
|
||||
yarn run-task develop-app
|
||||
|
@@ -6,4 +6,4 @@ set -e
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
./node_modules/.bin/gulp setup-and-fetch-nightly-translations
|
||||
yarn run-task setup-and-fetch-nightly-translations
|
@@ -6,4 +6,4 @@ set -e
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
./node_modules/.bin/gulp analyze-app
|
||||
yarn run-task analyze-app
|
||||
|
@@ -8,4 +8,4 @@ set -eu -o pipefail
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
./node_modules/.bin/gulp download-translations
|
||||
yarn run-task download-translations
|
@@ -26,6 +26,7 @@
|
||||
// Interop with CommonJS and other tools
|
||||
"esModuleInterop": true,
|
||||
"isolatedModules": true,
|
||||
"allowImportingTsExtensions": true,
|
||||
"plugins": [
|
||||
{
|
||||
"name": "ts-lit-plugin",
|
||||
|
476
yarn.lock
476
yarn.lock
@@ -28,16 +28,16 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@asamuzakjp/css-color@npm:^3.2.0":
|
||||
version: 3.2.0
|
||||
resolution: "@asamuzakjp/css-color@npm:3.2.0"
|
||||
"@asamuzakjp/css-color@npm:^3.1.1":
|
||||
version: 3.1.2
|
||||
resolution: "@asamuzakjp/css-color@npm:3.1.2"
|
||||
dependencies:
|
||||
"@csstools/css-calc": "npm:^2.1.3"
|
||||
"@csstools/css-color-parser": "npm:^3.0.9"
|
||||
"@csstools/css-calc": "npm:^2.1.2"
|
||||
"@csstools/css-color-parser": "npm:^3.0.8"
|
||||
"@csstools/css-parser-algorithms": "npm:^3.0.4"
|
||||
"@csstools/css-tokenizer": "npm:^3.0.3"
|
||||
lru-cache: "npm:^10.4.3"
|
||||
checksum: 10/870f661460173174fef8bfebea0799ba26566f3aa7b307e5adabb7aae84fed2da68e40080104ed0c83b43c5be632ee409e65396af13bfe948a3ef4c2c729ecd9
|
||||
checksum: 10/69cad0a6cd05ca4d1364f6d13b3da188363927e1f2dc84682f8b804683716d434a8666cd87709c769e5596b26467a4fa2cad52bf7d0020d69aff640ab94755dd
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -1284,42 +1284,42 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@csstools/css-calc@npm:^2.1.3, @csstools/css-calc@npm:^2.1.4":
|
||||
version: 2.1.4
|
||||
resolution: "@csstools/css-calc@npm:2.1.4"
|
||||
"@csstools/css-calc@npm:^2.1.2":
|
||||
version: 2.1.2
|
||||
resolution: "@csstools/css-calc@npm:2.1.2"
|
||||
peerDependencies:
|
||||
"@csstools/css-parser-algorithms": ^3.0.5
|
||||
"@csstools/css-tokenizer": ^3.0.4
|
||||
checksum: 10/06975b650c0f44c60eeb7afdb3fd236f2dd607b2c622e0bc908d3f54de39eb84e0692833320d03dac04bd6c1ab0154aa3fa0dd442bd9e5f917cf14d8e2ba8d74
|
||||
"@csstools/css-parser-algorithms": ^3.0.4
|
||||
"@csstools/css-tokenizer": ^3.0.3
|
||||
checksum: 10/23ba633b15ba733f9da6d65e6a97a34116d10add7df15f6b05df93f00bb47b335a2268fcfd93c442da5d4678706f7bb26ffcc26a74621e34fe0d399bb27e53d3
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@csstools/css-color-parser@npm:^3.0.9":
|
||||
version: 3.0.10
|
||||
resolution: "@csstools/css-color-parser@npm:3.0.10"
|
||||
"@csstools/css-color-parser@npm:^3.0.8":
|
||||
version: 3.0.8
|
||||
resolution: "@csstools/css-color-parser@npm:3.0.8"
|
||||
dependencies:
|
||||
"@csstools/color-helpers": "npm:^5.0.2"
|
||||
"@csstools/css-calc": "npm:^2.1.4"
|
||||
"@csstools/css-calc": "npm:^2.1.2"
|
||||
peerDependencies:
|
||||
"@csstools/css-parser-algorithms": ^3.0.5
|
||||
"@csstools/css-tokenizer": ^3.0.4
|
||||
checksum: 10/d5619639f067c0a6ac95ecce6ad6adce55a5500599a4444817ac6bb5ed2a9928a08f0978a148d4687de7ebf05c068c1a1c7f9eaa039984830a84148e011cbc05
|
||||
"@csstools/css-parser-algorithms": ^3.0.4
|
||||
"@csstools/css-tokenizer": ^3.0.3
|
||||
checksum: 10/935d0d6b484ee3b38390c765c66b0bb6632ca4172f211ef87f259a193bdae7f818732e8ef214fcce06016d5cf8fa1d917c24e4ff42f7359f589a979acc7e4511
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@csstools/css-parser-algorithms@npm:^3.0.4":
|
||||
version: 3.0.5
|
||||
resolution: "@csstools/css-parser-algorithms@npm:3.0.5"
|
||||
version: 3.0.4
|
||||
resolution: "@csstools/css-parser-algorithms@npm:3.0.4"
|
||||
peerDependencies:
|
||||
"@csstools/css-tokenizer": ^3.0.4
|
||||
checksum: 10/e93083b5cb36a3c1e7a47ce10cf62961d05bd1e4c608bb3ee50186ff740157ab0ec16a3956f7b86251efd10703034d849693201eea858ae904848c68d2d46ada
|
||||
"@csstools/css-tokenizer": ^3.0.3
|
||||
checksum: 10/dfb6926218d9f8ba25d8b43ea46c03863c819481f8c55e4de4925780eaab9e6bcd6bead1d56b4ef82d09fcd9d69a7db2750fa9db08eece9470fd499dc76d0edb
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@csstools/css-tokenizer@npm:^3.0.3":
|
||||
version: 3.0.4
|
||||
resolution: "@csstools/css-tokenizer@npm:3.0.4"
|
||||
checksum: 10/eb6c84c086312f6bb8758dfe2c85addd7475b0927333c5e39a4d59fb210b9810f8c346972046f95e60a721329cffe98895abe451e51de753ad1ca7a8c24ec65f
|
||||
version: 3.0.3
|
||||
resolution: "@csstools/css-tokenizer@npm:3.0.3"
|
||||
checksum: 10/6baa3160e426e1f177b8f10d54ec7a4a596090f65a05f16d7e9e4da049962a404eabc5f885f4867093702c259cd4080ac92a438326e22dea015201b3e71f5bbb
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -1585,6 +1585,15 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@eslint/core@npm:^0.14.0":
|
||||
version: 0.14.0
|
||||
resolution: "@eslint/core@npm:0.14.0"
|
||||
dependencies:
|
||||
"@types/json-schema": "npm:^7.0.15"
|
||||
checksum: 10/d9b060cf97468150675ddf4fb3db55edaa32467e0adf9f80919a5bfd15d0835ad7765456f4397ec2d16b0a1bb702af63f6d4712f94194d34fea118231ae1e2db
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@eslint/core@npm:^0.15.0":
|
||||
version: 0.15.0
|
||||
resolution: "@eslint/core@npm:0.15.0"
|
||||
@@ -1626,31 +1635,31 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"@eslint/plugin-kit@npm:^0.3.1":
|
||||
version: 0.3.2
|
||||
resolution: "@eslint/plugin-kit@npm:0.3.2"
|
||||
version: 0.3.1
|
||||
resolution: "@eslint/plugin-kit@npm:0.3.1"
|
||||
dependencies:
|
||||
"@eslint/core": "npm:^0.15.0"
|
||||
"@eslint/core": "npm:^0.14.0"
|
||||
levn: "npm:^0.4.1"
|
||||
checksum: 10/26ba99936f72ca124036fbc5ca93168713fab5984117109b1447642a93725fbb75aa457622683dc8797509e40294497d74b584caa26f285373bdde17ceba8eac
|
||||
checksum: 10/ab0c4cecadc6c38c7ae5f71b9831d3521d08237444d8f327751d1133a4369ccd42093a1c06b26fd6c311015807a27d95a0184a761d1cdd264b090896dcf0addb
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@floating-ui/core@npm:^1.7.1":
|
||||
version: 1.7.1
|
||||
resolution: "@floating-ui/core@npm:1.7.1"
|
||||
"@floating-ui/core@npm:^1.6.0":
|
||||
version: 1.6.9
|
||||
resolution: "@floating-ui/core@npm:1.6.9"
|
||||
dependencies:
|
||||
"@floating-ui/utils": "npm:^0.2.9"
|
||||
checksum: 10/5dbe5d92dcdaef6a915a6bfaa432a684b0a021e6eca0eab796216eecb0870282f8b9ecfcf449f1cac94cc24d8c5114d1677b1f7a6e11e2642967065f2497ce26
|
||||
checksum: 10/656fcd383da17fffca2efa0635cbe3c0b835c3312949e30bd19d05bf42479f2ac22aaf336a6a31cb160621fc6f35cfc9e115e76c5cf48ba96e33474d123ced22
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@floating-ui/dom@npm:^1.6.12":
|
||||
version: 1.7.1
|
||||
resolution: "@floating-ui/dom@npm:1.7.1"
|
||||
version: 1.6.13
|
||||
resolution: "@floating-ui/dom@npm:1.6.13"
|
||||
dependencies:
|
||||
"@floating-ui/core": "npm:^1.7.1"
|
||||
"@floating-ui/core": "npm:^1.6.0"
|
||||
"@floating-ui/utils": "npm:^0.2.9"
|
||||
checksum: 10/77f385e0202855aaeee7c8c96e40c8cd06c63f1946ed666824beed40b98e9414a5a8c19ac8c8f68653577eceb1866261a785d3d9855a531bd85d2865024ca9e9
|
||||
checksum: 10/4bb732baf3270007741bcdc91be1de767b2bb5d8b891eb838e5f1e7c4cccad998643dbdd4e8b8cec4c5d12c9898f80febc68e9793dd6e26a445283c4fb1b6a78
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -1937,9 +1946,9 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"@humanwhocodes/retry@npm:^0.4.2":
|
||||
version: 0.4.3
|
||||
resolution: "@humanwhocodes/retry@npm:0.4.3"
|
||||
checksum: 10/0b32cfd362bea7a30fbf80bb38dcaf77fee9c2cae477ee80b460871d03590110ac9c77d654f04ec5beaf71b6f6a89851bdf6c1e34ccdf2f686bd86fcd97d9e61
|
||||
version: 0.4.2
|
||||
resolution: "@humanwhocodes/retry@npm:0.4.2"
|
||||
checksum: 10/8910c4cdf8d46ce406e6f0cb4407ff6cfef70b15039bd5713cc059f32e02fe5119d833cfe2ebc5f522eae42fdd453b6d88f3fa7a1d8c4275aaad6eb3d3e9b117
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -2178,11 +2187,11 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"@jsonjoy.com/util@npm:^1.1.2, @jsonjoy.com/util@npm:^1.3.0":
|
||||
version: 1.6.0
|
||||
resolution: "@jsonjoy.com/util@npm:1.6.0"
|
||||
version: 1.5.0
|
||||
resolution: "@jsonjoy.com/util@npm:1.5.0"
|
||||
peerDependencies:
|
||||
tslib: 2
|
||||
checksum: 10/6f2fd06aa9fb8b6bde1301e30aef0115bb728eff4dc73ab3402f11f0674a58f0a96411c0eeeb9ef2ed28e5aca3a9dc8138a5de784e62d1d53a3200731f7a0379
|
||||
checksum: 10/5b370183700cb40af52841294ba99c3dfb3dcb7fe2a122e15c737eb908d11392d314b75518874c7d631092bb29658ebe298d174b05baeb1adeb33884b9aa33cf
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -3478,15 +3487,15 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"@octokit/request@npm:^10.0.2":
|
||||
version: 10.0.3
|
||||
resolution: "@octokit/request@npm:10.0.3"
|
||||
version: 10.0.2
|
||||
resolution: "@octokit/request@npm:10.0.2"
|
||||
dependencies:
|
||||
"@octokit/endpoint": "npm:^11.0.0"
|
||||
"@octokit/request-error": "npm:^7.0.0"
|
||||
"@octokit/types": "npm:^14.0.0"
|
||||
fast-content-type-parse: "npm:^3.0.0"
|
||||
universal-user-agent: "npm:^7.0.2"
|
||||
checksum: 10/f32a2c3fe97e0354390c0748a443e2f600a4e169b1014deb0b668ac3c52aa25cab523e87508751a1247806e3998c41f8849ad41ee3da531936975f5d32ab4c02
|
||||
checksum: 10/eaddfd49787e8caad664a80c7c665d69bd303f90b5e6be822d571b684a4cd42bdfee29119f838fdfaed2946bc09f38219e1d7a0923388436bff0bfdd0202acca
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -3636,8 +3645,8 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"@rollup/pluginutils@npm:^5.0.1":
|
||||
version: 5.2.0
|
||||
resolution: "@rollup/pluginutils@npm:5.2.0"
|
||||
version: 5.1.4
|
||||
resolution: "@rollup/pluginutils@npm:5.1.4"
|
||||
dependencies:
|
||||
"@types/estree": "npm:^1.0.0"
|
||||
estree-walker: "npm:^2.0.2"
|
||||
@@ -3647,7 +3656,7 @@ __metadata:
|
||||
peerDependenciesMeta:
|
||||
rollup:
|
||||
optional: true
|
||||
checksum: 10/15e98a9e7ebeb9fdbbf072ad40e72947654abf98bcd389d6e54dcffe28f7eb93d9653037d5e18b703b0160e04210a1995cf08fc2bf45601ce77b17e4461f55c0
|
||||
checksum: 10/598f628988af25541a9a6c6ef154aaf350f8be3238884e500cc0e47138684071abe490563c953f9bda9e8b113ecb1f99c11abfb9dbaf4f72cdd62e257a673fa3
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -4379,12 +4388,12 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"@types/body-parser@npm:*":
|
||||
version: 1.19.6
|
||||
resolution: "@types/body-parser@npm:1.19.6"
|
||||
version: 1.19.5
|
||||
resolution: "@types/body-parser@npm:1.19.5"
|
||||
dependencies:
|
||||
"@types/connect": "npm:*"
|
||||
"@types/node": "npm:*"
|
||||
checksum: 10/33041e88eae00af2cfa0827e951e5f1751eafab2a8b6fce06cd89ef368a988907996436b1325180edaeddd1c0c7d0d0d4c20a6c9ff294a91e0039a9db9e9b658
|
||||
checksum: 10/1e251118c4b2f61029cc43b0dc028495f2d1957fe8ee49a707fb940f86a9bd2f9754230805598278fe99958b49e9b7e66eec8ef6a50ab5c1f6b93e1ba2aaba82
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -4407,12 +4416,12 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"@types/chrome@npm:*":
|
||||
version: 0.0.326
|
||||
resolution: "@types/chrome@npm:0.0.326"
|
||||
version: 0.0.315
|
||||
resolution: "@types/chrome@npm:0.0.315"
|
||||
dependencies:
|
||||
"@types/filesystem": "npm:*"
|
||||
"@types/har-format": "npm:*"
|
||||
checksum: 10/88cd7ca8e3ceae180216ce92510f3a2d32eb1fbc8811801e09e6713d47aa227fc2b128bf9c55f7d5e71458d78ef4ab2cad5e1cf5238cc1ca877580d693b523b8
|
||||
checksum: 10/8a4f9f377118cb0b3d1afdb35b7ec45575b8f86e90949283a1e6e6868a8d045b34197133b3a7e8f4a834c51e7cd73ece79d4854324c65cebce4858809a072cf6
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -4459,11 +4468,11 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"@types/cors@npm:^2.8.12":
|
||||
version: 2.8.19
|
||||
resolution: "@types/cors@npm:2.8.19"
|
||||
version: 2.8.17
|
||||
resolution: "@types/cors@npm:2.8.17"
|
||||
dependencies:
|
||||
"@types/node": "npm:*"
|
||||
checksum: 10/9545cc532c9218754443f48a0c98c1a9ba4af1fe54a3425c95de75ff3158147bb39e666cb7c6bf98cc56a9c6dc7b4ce5b2cbdae6b55d5942e50c81b76ed6b825
|
||||
checksum: 10/469bd85e29a35977099a3745c78e489916011169a664e97c4c3d6538143b0a16e4cc72b05b407dc008df3892ed7bf595f9b7c0f1f4680e169565ee9d64966bde
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -4502,7 +4511,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/express-serve-static-core@npm:*, @types/express-serve-static-core@npm:^5.0.0":
|
||||
"@types/express-serve-static-core@npm:*":
|
||||
version: 5.0.6
|
||||
resolution: "@types/express-serve-static-core@npm:5.0.6"
|
||||
dependencies:
|
||||
@@ -4526,18 +4535,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/express@npm:*":
|
||||
version: 5.0.3
|
||||
resolution: "@types/express@npm:5.0.3"
|
||||
dependencies:
|
||||
"@types/body-parser": "npm:*"
|
||||
"@types/express-serve-static-core": "npm:^5.0.0"
|
||||
"@types/serve-static": "npm:*"
|
||||
checksum: 10/bb6f10c14c8e3cce07f79ee172688aa9592852abd7577b663cd0c2054307f172c2b2b36468c918fed0d4ac359b99695807b384b3da6157dfa79acbac2226b59b
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/express@npm:^4.17.21":
|
||||
"@types/express@npm:*, @types/express@npm:^4.17.21":
|
||||
version: 4.17.23
|
||||
resolution: "@types/express@npm:4.17.23"
|
||||
dependencies:
|
||||
@@ -4604,9 +4602,9 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"@types/http-errors@npm:*":
|
||||
version: 2.0.5
|
||||
resolution: "@types/http-errors@npm:2.0.5"
|
||||
checksum: 10/a88da669366bc483e8f3b3eb3d34ada5f8d13eeeef851b1204d77e2ba6fc42aba4566d877cca5c095204a3f4349b87fe397e3e21288837bdd945dd514120755b
|
||||
version: 2.0.4
|
||||
resolution: "@types/http-errors@npm:2.0.4"
|
||||
checksum: 10/1f3d7c3b32c7524811a45690881736b3ef741bf9849ae03d32ad1ab7062608454b150a4e7f1351f83d26a418b2d65af9bdc06198f1c079d75578282884c4e8e3
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -4695,9 +4693,9 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"@types/lodash@npm:*":
|
||||
version: 4.17.18
|
||||
resolution: "@types/lodash@npm:4.17.18"
|
||||
checksum: 10/54ebb15b29925112dbe9da3abd99fb80d7202bc5ba20fc1b4fc8ea835d0012f00cbd9a3e7f367b70e7c3f2d5ee635964e3920a489625647b558f02994b3dd381
|
||||
version: 4.17.16
|
||||
resolution: "@types/lodash@npm:4.17.16"
|
||||
checksum: 10/9a8bb7471a7521bd65d528e1bd14f79819a3eeb6f8a35a8a44649a7d773775c0813e93fd93bd32ccf350bb076c0bf02c6d47877c4625f526f6dd4d283c746aec
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -4742,11 +4740,11 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"@types/node@npm:*, @types/node@npm:>=10.0.0":
|
||||
version: 24.0.3
|
||||
resolution: "@types/node@npm:24.0.3"
|
||||
version: 22.15.19
|
||||
resolution: "@types/node@npm:22.15.19"
|
||||
dependencies:
|
||||
undici-types: "npm:~7.8.0"
|
||||
checksum: 10/6cce0afa9b0ff7f8eab7cb0339909c1e4ef480b824b8de5adc9cee05dac63ee3d8c7a46e1f95f13ecc94e84608118741f9949527a92fbf3f0e1f7714b37a7b61
|
||||
undici-types: "npm:~6.21.0"
|
||||
checksum: 10/02311c2b5dbf2e9e2c17497dc27858bcefbe12a81af0d9b81f865613d8d014726e0eb6cbebfbdb84a327c1b9f9da1347a65a7699ac58c8854fb4daf447031149
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -4757,12 +4755,21 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/node@npm:22.15.16":
|
||||
version: 22.15.16
|
||||
resolution: "@types/node@npm:22.15.16"
|
||||
dependencies:
|
||||
undici-types: "npm:~6.21.0"
|
||||
checksum: 10/d8055a0ab033ed16368109183f7e11d5364e5d8d5bd9a12df7fa1673a624823aaaaa54c0afef1648d0bfa7e12ef20b600f9d006accebecdb9931d2b72d05c7be
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/node@npm:^18.15.3":
|
||||
version: 18.19.112
|
||||
resolution: "@types/node@npm:18.19.112"
|
||||
version: 18.19.86
|
||||
resolution: "@types/node@npm:18.19.86"
|
||||
dependencies:
|
||||
undici-types: "npm:~5.26.4"
|
||||
checksum: 10/1d0150b4afbfa76ddcdbdcfaaa695dd1dc7485047d0c7e0b22207a0ffb61dab5bc44d536e4d2c3cb85c91ebb519479bfcd7033e76054fbc96fa6d13a86d9b26d
|
||||
checksum: 10/83e8f07305b102776c1970c2fbe2347eba15f6cca3d50cf8991d5f4e463ee7e204fbb3dec599892d25e613ed3b93f7fb5794b0de874ea6ba884affbe99670cc2
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -4806,9 +4813,9 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"@types/qs@npm:*":
|
||||
version: 6.14.0
|
||||
resolution: "@types/qs@npm:6.14.0"
|
||||
checksum: 10/1909205514d22b3cbc7c2314e2bd8056d5f05dfb21cf4377f0730ee5e338ea19957c41735d5e4806c746176563f50005bbab602d8358432e25d900bdf4970826
|
||||
version: 6.9.18
|
||||
resolution: "@types/qs@npm:6.9.18"
|
||||
checksum: 10/152fab96efd819cc82ae67c39f089df415da6deddb48f1680edaaaa4e86a2a597de7b2ff0ad391df66d11a07006a08d52c9405e86b8cb8f3d5ba15881fe56cc7
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -4834,12 +4841,12 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"@types/send@npm:*":
|
||||
version: 0.17.5
|
||||
resolution: "@types/send@npm:0.17.5"
|
||||
version: 0.17.4
|
||||
resolution: "@types/send@npm:0.17.4"
|
||||
dependencies:
|
||||
"@types/mime": "npm:^1"
|
||||
"@types/node": "npm:*"
|
||||
checksum: 10/b68ae8f9ba9328a4f276cd010914ed43b96371fbf34c7aa08a9111bff36661810bb14b96647e4a92e319dbd2689dc107fb0f9194ec3fa9335c162dc134026240
|
||||
checksum: 10/28320a2aa1eb704f7d96a65272a07c0bf3ae7ed5509c2c96ea5e33238980f71deeed51d3631927a77d5250e4091b3e66bce53b42d770873282c6a20bb8b0280d
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -4853,13 +4860,13 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"@types/serve-static@npm:*, @types/serve-static@npm:^1.15.5":
|
||||
version: 1.15.8
|
||||
resolution: "@types/serve-static@npm:1.15.8"
|
||||
version: 1.15.7
|
||||
resolution: "@types/serve-static@npm:1.15.7"
|
||||
dependencies:
|
||||
"@types/http-errors": "npm:*"
|
||||
"@types/node": "npm:*"
|
||||
"@types/send": "npm:*"
|
||||
checksum: 10/c031f870df6056a4c0a5a0ae94c5584006ab55400c74ae44de4d68d89338fbe982422861bad478b89a073f671efca454689fd28b6147358d6adc8edbc599caea
|
||||
checksum: 10/c5a7171d5647f9fbd096ed1a26105759f3153ccf683824d99fee4c7eb9cde2953509621c56a070dd9fb1159e799e86d300cbe4e42245ebc5b0c1767e8ca94a67
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -5570,7 +5577,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"acorn@npm:^8.0.4, acorn@npm:^8.10.0, acorn@npm:^8.11.0, acorn@npm:^8.14.0, acorn@npm:^8.15.0, acorn@npm:^8.5.0":
|
||||
"acorn@npm:^8.0.4, acorn@npm:^8.10.0, acorn@npm:^8.11.0, acorn@npm:^8.14.0, acorn@npm:^8.15.0, acorn@npm:^8.5.0, acorn@npm:^8.8.2":
|
||||
version: 8.15.0
|
||||
resolution: "acorn@npm:8.15.0"
|
||||
bin:
|
||||
@@ -6245,21 +6252,21 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"brace-expansion@npm:^1.1.7":
|
||||
version: 1.1.12
|
||||
resolution: "brace-expansion@npm:1.1.12"
|
||||
version: 1.1.11
|
||||
resolution: "brace-expansion@npm:1.1.11"
|
||||
dependencies:
|
||||
balanced-match: "npm:^1.0.0"
|
||||
concat-map: "npm:0.0.1"
|
||||
checksum: 10/12cb6d6310629e3048cadb003e1aca4d8c9bb5c67c3c321bafdd7e7a50155de081f78ea3e0ed92ecc75a9015e784f301efc8132383132f4f7904ad1ac529c562
|
||||
checksum: 10/faf34a7bb0c3fcf4b59c7808bc5d2a96a40988addf2e7e09dfbb67a2251800e0d14cd2bfc1aa79174f2f5095c54ff27f46fb1289fe2d77dac755b5eb3434cc07
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"brace-expansion@npm:^2.0.1":
|
||||
version: 2.0.2
|
||||
resolution: "brace-expansion@npm:2.0.2"
|
||||
version: 2.0.1
|
||||
resolution: "brace-expansion@npm:2.0.1"
|
||||
dependencies:
|
||||
balanced-match: "npm:^1.0.0"
|
||||
checksum: 10/01dff195e3646bc4b0d27b63d9bab84d2ebc06121ff5013ad6e5356daa5a9d6b60fa26cf73c74797f2dc3fbec112af13578d51f75228c1112b26c790a87b0488
|
||||
checksum: 10/a61e7cd2e8a8505e9f0036b3b6108ba5e926b4b55089eeb5550cd04a471fe216c96d4fe7e4c7f995c728c554ae20ddfc4244cad10aef255e72b62930afd233d1
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -7017,12 +7024,12 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"cssstyle@npm:^4.2.1":
|
||||
version: 4.5.0
|
||||
resolution: "cssstyle@npm:4.5.0"
|
||||
version: 4.3.0
|
||||
resolution: "cssstyle@npm:4.3.0"
|
||||
dependencies:
|
||||
"@asamuzakjp/css-color": "npm:^3.2.0"
|
||||
"@asamuzakjp/css-color": "npm:^3.1.1"
|
||||
rrweb-cssom: "npm:^0.8.0"
|
||||
checksum: 10/6bbf4ed5b8f8190389eca086018170e96250d86dad4d4e8955c67095999343085613e329fd6aac56f976c3f7e3c09862e17ed567b97e618d260e01be69267261
|
||||
checksum: 10/81e0634b1905080a4f07a117a345c773f531c01cb6dd408077b46d03e2c5b5b5f0b88ab36eba5fb82ce35ef2c5ddb02a3fd57f99b54e7ab0bd06d8708c319080
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -7589,11 +7596,11 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"end-of-stream@npm:^1.4.4":
|
||||
version: 1.4.5
|
||||
resolution: "end-of-stream@npm:1.4.5"
|
||||
version: 1.4.4
|
||||
resolution: "end-of-stream@npm:1.4.4"
|
||||
dependencies:
|
||||
once: "npm:^1.4.0"
|
||||
checksum: 10/1e0cfa6e7f49887544e03314f9dfc56a8cb6dde910cbb445983ecc2ff426fc05946df9d75d8a21a3a64f2cecfe1bf88f773952029f46756b2ed64a24e95b1fb8
|
||||
checksum: 10/530a5a5a1e517e962854a31693dbb5c0b2fc40b46dad2a56a2deec656ca040631124f4795823acc68238147805f8b021abbe221f4afed5ef3c8e8efc2024908b
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -7631,18 +7638,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"enhanced-resolve@npm:^0.9.1":
|
||||
version: 0.9.1
|
||||
resolution: "enhanced-resolve@npm:0.9.1"
|
||||
dependencies:
|
||||
graceful-fs: "npm:^4.1.2"
|
||||
memory-fs: "npm:^0.2.0"
|
||||
tapable: "npm:^0.1.8"
|
||||
checksum: 10/0044dad5e27adb608ba6c87939aef39ac3131d7f189470e5e3643ce78ec6ed06ccaed9e887103c64a2d36718d38e4568c0ffbdce5eed2bc6921cafc38d250ddc
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"entities@npm:^4.2.0, entities@npm:^4.4.0":
|
||||
"entities@npm:^4.2.0, entities@npm:^4.4.0, entities@npm:^4.5.0":
|
||||
version: 4.5.0
|
||||
resolution: "entities@npm:4.5.0"
|
||||
checksum: 10/ede2a35c9bce1aeccd055a1b445d41c75a14a2bb1cd22e242f20cf04d236cdcd7f9c859eb83f76885327bfae0c25bf03303665ee1ce3d47c5927b98b0e3e3d48
|
||||
@@ -7650,9 +7646,9 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"entities@npm:^6.0.0":
|
||||
version: 6.0.1
|
||||
resolution: "entities@npm:6.0.1"
|
||||
checksum: 10/62af1307202884349d2867f0aac5c60d8b57102ea0b0e768b16246099512c28e239254ad772d6834e7e14cb1b6f153fc3d0c031934e3183b086c86d3838d874a
|
||||
version: 6.0.0
|
||||
resolution: "entities@npm:6.0.0"
|
||||
checksum: 10/cf37a4aad887ba8573532346da1c78349dccd5b510a9bbddf92fe59b36b18a8b26fe619a862de4e7fd3b8addc6d5e0969261198bbeb690da87297011a61b7066
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -7819,7 +7815,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"esbuild@npm:^0.25.0":
|
||||
"esbuild@npm:^0.25.0, esbuild@npm:~0.25.0":
|
||||
version: 0.25.5
|
||||
resolution: "esbuild@npm:0.25.5"
|
||||
dependencies:
|
||||
@@ -7970,27 +7966,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"eslint-import-resolver-webpack@npm:0.13.10":
|
||||
version: 0.13.10
|
||||
resolution: "eslint-import-resolver-webpack@npm:0.13.10"
|
||||
dependencies:
|
||||
debug: "npm:^3.2.7"
|
||||
enhanced-resolve: "npm:^0.9.1"
|
||||
find-root: "npm:^1.1.0"
|
||||
hasown: "npm:^2.0.2"
|
||||
interpret: "npm:^1.4.0"
|
||||
is-core-module: "npm:^2.15.1"
|
||||
is-regex: "npm:^1.2.0"
|
||||
lodash: "npm:^4.17.21"
|
||||
resolve: "npm:^2.0.0-next.5"
|
||||
semver: "npm:^5.7.2"
|
||||
peerDependencies:
|
||||
eslint-plugin-import: ">=1.4.0"
|
||||
webpack: ">=1.11.0"
|
||||
checksum: 10/7d317bc96b2590ba83f0f2af2e64f67693452756bc95ffd77381e8177365ac10c2fb288776fc6620376d7fc811902a7efe4932010bc250a1ac5fd4171e2402fb
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"eslint-module-utils@npm:^2.12.1":
|
||||
version: 2.12.1
|
||||
resolution: "eslint-module-utils@npm:2.12.1"
|
||||
@@ -8578,13 +8553,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"find-root@npm:^1.1.0":
|
||||
version: 1.1.0
|
||||
resolution: "find-root@npm:1.1.0"
|
||||
checksum: 10/caa799c976a14925ba7f31ca1a226fe73d3aa270f4f1b623fcfeb1c6e263111db4beb807d8acd31bd4d48d44c343b93688a9288dfbccca27463c36a0301b0bb9
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"find-up@npm:^4.1.0":
|
||||
version: 4.1.0
|
||||
resolution: "find-up@npm:4.1.0"
|
||||
@@ -8910,6 +8878,15 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"get-tsconfig@npm:^4.7.5":
|
||||
version: 4.10.1
|
||||
resolution: "get-tsconfig@npm:4.10.1"
|
||||
dependencies:
|
||||
resolve-pkg-maps: "npm:^1.0.0"
|
||||
checksum: 10/04d63f47fdecaefbd1f73ec02949be4ec4db7d6d9fbc8d4e81f9a4bb1c6f876e48943712f2f9236643d3e4d61d9a7b06da08564d08b034631ebe3f5605bef237
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"gifwrap@npm:^0.10.1":
|
||||
version: 0.10.1
|
||||
resolution: "gifwrap@npm:0.10.1"
|
||||
@@ -9095,7 +9072,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.10, graceful-fs@npm:^4.2.11, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.8":
|
||||
"graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.10, graceful-fs@npm:^4.2.11, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.8":
|
||||
version: 4.2.11
|
||||
resolution: "graceful-fs@npm:4.2.11"
|
||||
checksum: 10/bf152d0ed1dc159239db1ba1f74fdbc40cb02f626770dcd5815c427ce0688c2635a06ed69af364396da4636d0408fcf7d4afdf7881724c3307e46aff30ca49e2
|
||||
@@ -9386,6 +9363,7 @@ __metadata:
|
||||
"@types/lodash.merge": "npm:4.6.9"
|
||||
"@types/luxon": "npm:3.6.2"
|
||||
"@types/mocha": "npm:10.0.10"
|
||||
"@types/node": "npm:22.15.16"
|
||||
"@types/qrcode": "npm:1.5.5"
|
||||
"@types/sortablejs": "npm:1.15.8"
|
||||
"@types/tar": "npm:6.1.13"
|
||||
@@ -9418,7 +9396,6 @@ __metadata:
|
||||
eslint: "npm:9.31.0"
|
||||
eslint-config-airbnb-base: "npm:15.0.0"
|
||||
eslint-config-prettier: "npm:10.1.8"
|
||||
eslint-import-resolver-webpack: "npm:0.13.10"
|
||||
eslint-plugin-import: "npm:2.32.0"
|
||||
eslint-plugin-lit: "npm:2.1.1"
|
||||
eslint-plugin-lit-a11y: "npm:5.1.0"
|
||||
@@ -9475,6 +9452,7 @@ __metadata:
|
||||
terser-webpack-plugin: "npm:5.3.14"
|
||||
tinykeys: "npm:3.0.0"
|
||||
ts-lit-plugin: "npm:2.0.2"
|
||||
tsx: "npm:4.19.4"
|
||||
typescript: "npm:5.8.3"
|
||||
typescript-eslint: "npm:8.37.0"
|
||||
ua-parser-js: "npm:2.0.4"
|
||||
@@ -9587,9 +9565,9 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"http-cache-semantics@npm:^4.1.1":
|
||||
version: 4.2.0
|
||||
resolution: "http-cache-semantics@npm:4.2.0"
|
||||
checksum: 10/4efd2dfcfeea9d5e88c84af450b9980be8a43c2c8179508b1c57c7b4421c855f3e8efe92fa53e0b3f4a43c85824ada930eabbc306d1b3beab750b6dcc5187693
|
||||
version: 4.1.1
|
||||
resolution: "http-cache-semantics@npm:4.1.1"
|
||||
checksum: 10/362d5ed66b12ceb9c0a328fb31200b590ab1b02f4a254a697dc796850cc4385603e75f53ec59f768b2dad3bfa1464bd229f7de278d2899a0e3beffc634b6683f
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -9751,9 +9729,9 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"ignore@npm:^7.0.0, ignore@npm:^7.0.3":
|
||||
version: 7.0.5
|
||||
resolution: "ignore@npm:7.0.5"
|
||||
checksum: 10/f134b96a4de0af419196f52c529d5c6120c4456ff8a6b5a14ceaaa399f883e15d58d2ce651c9b69b9388491d4669dda47285d307e827de9304a53a1824801bc6
|
||||
version: 7.0.4
|
||||
resolution: "ignore@npm:7.0.4"
|
||||
checksum: 10/01ee59df2ffd14b0844efc17f5ab3642c848e45efdb7cc757928da5e076cb74313748f77f5ffe362a6407c5e7cc71f10fad5e8eb9d91c1a17c4e7ef2c1f8e40e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -9832,13 +9810,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"interpret@npm:^1.4.0":
|
||||
version: 1.4.0
|
||||
resolution: "interpret@npm:1.4.0"
|
||||
checksum: 10/5beec568d3f60543d0f61f2c5969d44dffcb1a372fe5abcdb8013968114d4e4aaac06bc971a4c9f5bd52d150881d8ebad72a8c60686b1361f5f0522f39c0e1a3
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"interpret@npm:^3.1.1":
|
||||
version: 3.1.1
|
||||
resolution: "interpret@npm:3.1.1"
|
||||
@@ -9960,7 +9931,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"is-core-module@npm:^2.13.0, is-core-module@npm:^2.15.1, is-core-module@npm:^2.16.0, is-core-module@npm:^2.16.1":
|
||||
"is-core-module@npm:^2.13.0, is-core-module@npm:^2.16.0, is-core-module@npm:^2.16.1":
|
||||
version: 2.16.1
|
||||
resolution: "is-core-module@npm:2.16.1"
|
||||
dependencies:
|
||||
@@ -10198,7 +10169,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"is-regex@npm:^1.2.0, is-regex@npm:^1.2.1":
|
||||
"is-regex@npm:^1.2.1":
|
||||
version: 1.2.1
|
||||
resolution: "is-regex@npm:1.2.1"
|
||||
dependencies:
|
||||
@@ -10572,16 +10543,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"jsesc@npm:^3.0.2":
|
||||
version: 3.1.0
|
||||
resolution: "jsesc@npm:3.1.0"
|
||||
bin:
|
||||
jsesc: bin/jsesc
|
||||
checksum: 10/20bd37a142eca5d1794f354db8f1c9aeb54d85e1f5c247b371de05d23a9751ecd7bd3a9c4fc5298ea6fa09a100dafb4190fa5c98c6610b75952c3487f3ce7967
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"jsesc@npm:~3.0.2":
|
||||
"jsesc@npm:^3.0.2, jsesc@npm:~3.0.2":
|
||||
version: 3.0.2
|
||||
resolution: "jsesc@npm:3.0.2"
|
||||
bin:
|
||||
@@ -11167,14 +11129,14 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"memfs@npm:^4.6.0":
|
||||
version: 4.17.2
|
||||
resolution: "memfs@npm:4.17.2"
|
||||
version: 4.17.0
|
||||
resolution: "memfs@npm:4.17.0"
|
||||
dependencies:
|
||||
"@jsonjoy.com/json-pack": "npm:^1.0.3"
|
||||
"@jsonjoy.com/util": "npm:^1.3.0"
|
||||
tree-dump: "npm:^1.0.1"
|
||||
tslib: "npm:^2.0.0"
|
||||
checksum: 10/105175204e74e836460fbf18e431bc24def3f5ea7ecd94d644f35992dc28b5a4c5f425849dd5f342878ef0ba032508c05b2756e026491635a59fc7f631cbfcde
|
||||
checksum: 10/346cfc8c7396a4716c362bb5c4eebf995c52927a5de4bb7b5bbc31a759b443f22b5a8087d8d71e93feebff33f10d735682f4fa53afb461607e832a4aa4c80eb9
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -11185,13 +11147,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"memory-fs@npm:^0.2.0":
|
||||
version: 0.2.0
|
||||
resolution: "memory-fs@npm:0.2.0"
|
||||
checksum: 10/67ff4642b7767bf00159c248dbaa1203369866e9224579f8a7c7c0c3b0ed0a6e5eaa38b4753a9aa59e0f063bd09e2c9a2a97a8e593ec395b06ce216f75fc573d
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"merge-descriptors@npm:1.0.3":
|
||||
version: 1.0.3
|
||||
resolution: "merge-descriptors@npm:1.0.3"
|
||||
@@ -11833,14 +11788,14 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"open@npm:^10.0.3":
|
||||
version: 10.1.2
|
||||
resolution: "open@npm:10.1.2"
|
||||
version: 10.1.1
|
||||
resolution: "open@npm:10.1.1"
|
||||
dependencies:
|
||||
default-browser: "npm:^5.2.1"
|
||||
define-lazy-prop: "npm:^3.0.0"
|
||||
is-inside-container: "npm:^1.0.0"
|
||||
is-wsl: "npm:^3.1.0"
|
||||
checksum: 10/dc0496486fd79289844d8cac678402384488696db60ae5c5a175748cd728c381689cd937527762685dc27530408da0f0dac7653769f9730e773aa439d6674b98
|
||||
checksum: 10/911f8c3214a74e5adb6bae4cbb93112f66f776c9b042bd62914f8765621377cfea8b7dd0a9ef8430900e658c5eac61626f6c4672c5f5819cbfe450215e8f9d8f
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -12039,11 +11994,11 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"parse5@npm:^7.1.2, parse5@npm:^7.2.1":
|
||||
version: 7.3.0
|
||||
resolution: "parse5@npm:7.3.0"
|
||||
version: 7.2.1
|
||||
resolution: "parse5@npm:7.2.1"
|
||||
dependencies:
|
||||
entities: "npm:^6.0.0"
|
||||
checksum: 10/b0e48be20b820c655b138b86fa6fb3a790de6c891aa2aba536524f8027b4dca4fe538f11a0e5cf2f6f847d120dbb9e4822dcaeb933ff1e10850a2ef0154d1d88
|
||||
entities: "npm:^4.5.0"
|
||||
checksum: 10/fd1a8ad1540d871e1ad6ca9bf5b67e30280886f1ce4a28052c0cb885723aa984d8cb1ec3da998349a6146960c8a84aa87b1a42600eb3b94495c7303476f2f88e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -12757,6 +12712,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"resolve-pkg-maps@npm:^1.0.0":
|
||||
version: 1.0.0
|
||||
resolution: "resolve-pkg-maps@npm:1.0.0"
|
||||
checksum: 10/0763150adf303040c304009231314d1e84c6e5ebfa2d82b7d94e96a6e82bacd1dcc0b58ae257315f3c8adb89a91d8d0f12928241cba2df1680fbe6f60bf99b0e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"resolve@npm:^1.20.0, resolve@npm:^1.22.1, resolve@npm:^1.22.10, resolve@npm:^1.22.4":
|
||||
version: 1.22.10
|
||||
resolution: "resolve@npm:1.22.10"
|
||||
@@ -12770,19 +12732,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"resolve@npm:^2.0.0-next.5":
|
||||
version: 2.0.0-next.5
|
||||
resolution: "resolve@npm:2.0.0-next.5"
|
||||
dependencies:
|
||||
is-core-module: "npm:^2.13.0"
|
||||
path-parse: "npm:^1.0.7"
|
||||
supports-preserve-symlinks-flag: "npm:^1.0.0"
|
||||
bin:
|
||||
resolve: bin/resolve
|
||||
checksum: 10/2d6fd28699f901744368e6f2032b4268b4c7b9185fd8beb64f68c93ac6b22e52ae13560ceefc96241a665b985edf9ffd393ae26d2946a7d3a07b7007b7d51e79
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"resolve@patch:resolve@npm%3A^1.20.0#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.22.1#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.22.10#optional!builtin<compat/resolve>, resolve@patch:resolve@npm%3A^1.22.4#optional!builtin<compat/resolve>":
|
||||
version: 1.22.10
|
||||
resolution: "resolve@patch:resolve@npm%3A1.22.10#optional!builtin<compat/resolve>::version=1.22.10&hash=c3c19d"
|
||||
@@ -12796,19 +12745,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"resolve@patch:resolve@npm%3A^2.0.0-next.5#optional!builtin<compat/resolve>":
|
||||
version: 2.0.0-next.5
|
||||
resolution: "resolve@patch:resolve@npm%3A2.0.0-next.5#optional!builtin<compat/resolve>::version=2.0.0-next.5&hash=c3c19d"
|
||||
dependencies:
|
||||
is-core-module: "npm:^2.13.0"
|
||||
path-parse: "npm:^1.0.7"
|
||||
supports-preserve-symlinks-flag: "npm:^1.0.0"
|
||||
bin:
|
||||
resolve: bin/resolve
|
||||
checksum: 10/05fa778de9d0347c8b889eb7a18f1f06bf0f801b0eb4610b4871a4b2f22e220900cf0ad525e94f990bb8d8921c07754ab2122c0c225ab4cdcea98f36e64fa4c2
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"restore-cursor@npm:^5.0.0":
|
||||
version: 5.1.0
|
||||
resolution: "restore-cursor@npm:5.1.0"
|
||||
@@ -13061,14 +12997,14 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"schema-utils@npm:^4.0.0, schema-utils@npm:^4.2.0, schema-utils@npm:^4.3.0":
|
||||
version: 4.3.2
|
||||
resolution: "schema-utils@npm:4.3.2"
|
||||
version: 4.3.0
|
||||
resolution: "schema-utils@npm:4.3.0"
|
||||
dependencies:
|
||||
"@types/json-schema": "npm:^7.0.9"
|
||||
ajv: "npm:^8.9.0"
|
||||
ajv-formats: "npm:^2.1.1"
|
||||
ajv-keywords: "npm:^5.1.0"
|
||||
checksum: 10/02c32c34aae762d48468f98465a96a167fede637772871c7c7d8923671ddb9f20b2cc6f6e8448ae6bef5363e3597493c655212c8b06a4ee73aa099d9452fbd8b
|
||||
checksum: 10/86c5a7c72a275c56f140bc3cdd832d56efb11428c88ad588127db12cb9b2c83ccaa9540e115d7baa9c6175b5e360094457e29c44e6fb76787c9498c2eb6df5d6
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -13098,15 +13034,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"semver@npm:^5.7.2":
|
||||
version: 5.7.2
|
||||
resolution: "semver@npm:5.7.2"
|
||||
bin:
|
||||
semver: bin/semver
|
||||
checksum: 10/fca14418a174d4b4ef1fecb32c5941e3412d52a4d3d85165924ce3a47fbc7073372c26faf7484ceb4bbc2bde25880c6b97e492473dc7e9708fdfb1c6a02d546e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"semver@npm:^6.3.0, semver@npm:^6.3.1":
|
||||
version: 6.3.1
|
||||
resolution: "semver@npm:6.3.1"
|
||||
@@ -13300,9 +13227,9 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"shell-quote@npm:^1.8.1":
|
||||
version: 1.8.3
|
||||
resolution: "shell-quote@npm:1.8.3"
|
||||
checksum: 10/5473e354637c2bd698911224129c9a8961697486cff1fb221f234d71c153fc377674029b0223d1d3c953a68d451d79366abfe53d1a0b46ee1f28eb9ade928f4c
|
||||
version: 1.8.2
|
||||
resolution: "shell-quote@npm:1.8.2"
|
||||
checksum: 10/3ae4804fd80a12ba07650d0262804ae3b479a62a6b6971a6dc5fa12995507aa63d3de3e6a8b7a8d18f4ce6eb118b7d75db7fcb2c0acbf016f210f746b10cfe02
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -13498,12 +13425,12 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"socks@npm:^2.8.3":
|
||||
version: 2.8.5
|
||||
resolution: "socks@npm:2.8.5"
|
||||
version: 2.8.4
|
||||
resolution: "socks@npm:2.8.4"
|
||||
dependencies:
|
||||
ip-address: "npm:^9.0.5"
|
||||
smart-buffer: "npm:^4.2.0"
|
||||
checksum: 10/0109090ec2bcb8d12d3875a987e85539ed08697500ad971a603c3057e4c266b4bf6a603e07af6d19218c422dd9b72d923aaa6c1f20abae275510bba458e4ccc9
|
||||
checksum: 10/ab3af97aeb162f32c80e176c717ccf16a11a6ebb4656a62b94c0f96495ea2a1f4a8206c04b54438558485d83d0c5f61920c07a1a5d3963892a589b40cc6107dd
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -13726,8 +13653,8 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"streamx@npm:^2.12.0, streamx@npm:^2.12.5, streamx@npm:^2.13.2, streamx@npm:^2.14.0":
|
||||
version: 2.22.1
|
||||
resolution: "streamx@npm:2.22.1"
|
||||
version: 2.22.0
|
||||
resolution: "streamx@npm:2.22.0"
|
||||
dependencies:
|
||||
bare-events: "npm:^2.2.0"
|
||||
fast-fifo: "npm:^1.3.2"
|
||||
@@ -13735,7 +13662,7 @@ __metadata:
|
||||
dependenciesMeta:
|
||||
bare-events:
|
||||
optional: true
|
||||
checksum: 10/6d8576e0e5f4a67776427e3d29a877e66295bf7e17019a5b5c77d7fa026c5e8df6cdbd0cec2774999075af985179d70f07b25db7557b9226e33148fe67edd487
|
||||
checksum: 10/9c329bb316e2085e207e471ecd0da18b4ed5b1cfe5cf10e9e7fad3f8f50c6ca1a6a844bdfd9bc7521560b97f229890de82ca162a0e66115300b91a489b1cbefd
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -14013,13 +13940,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"tapable@npm:^0.1.8":
|
||||
version: 0.1.10
|
||||
resolution: "tapable@npm:0.1.10"
|
||||
checksum: 10/c1059b232ff4626dd032bc5620348983071c90edee5ebf779fb11bab59b31663d9d474da0d7c43c2004145f6dac260634a60b8dbd20691f514fc5d84fe5eda1f
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"tar@npm:7.4.3, tar@npm:^7.4.3":
|
||||
version: 7.4.3
|
||||
resolution: "tar@npm:7.4.3"
|
||||
@@ -14098,16 +14018,16 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"terser@npm:^5.15.1, terser@npm:^5.17.4, terser@npm:^5.31.1":
|
||||
version: 5.43.1
|
||||
resolution: "terser@npm:5.43.1"
|
||||
version: 5.39.0
|
||||
resolution: "terser@npm:5.39.0"
|
||||
dependencies:
|
||||
"@jridgewell/source-map": "npm:^0.3.3"
|
||||
acorn: "npm:^8.14.0"
|
||||
acorn: "npm:^8.8.2"
|
||||
commander: "npm:^2.20.0"
|
||||
source-map-support: "npm:~0.5.20"
|
||||
bin:
|
||||
terser: bin/terser
|
||||
checksum: 10/c0a0fd62319e0ce66e800f57ae12ef4ca45f12e9422dac160b866f0d890d01f8b547c96de2557b8443d96953db36be5d900e8006436ef9f628dbd38082e8fe5d
|
||||
checksum: 10/d84aff642398329f7179bbeaca28cac76a86100e2372d98d39d9b86c48023b6b9f797d983d6e7c0610b3f957c53d01ada1befa25d625614cb2ccd20714f1e98b
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -14344,11 +14264,11 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"tree-dump@npm:^1.0.1":
|
||||
version: 1.0.3
|
||||
resolution: "tree-dump@npm:1.0.3"
|
||||
version: 1.0.2
|
||||
resolution: "tree-dump@npm:1.0.2"
|
||||
peerDependencies:
|
||||
tslib: 2
|
||||
checksum: 10/cf382e61cfb5e3ff8f03425b5bc1923e8f0e385b3a02f43d9d0a32d09da9984477e0f2a7698628662263d1d3f1af17e33486c77ff454978f0f9f07fb5d1fe9a2
|
||||
checksum: 10/ddcde4da9ded8edc2fa77fc9153ef8d7fba9cd5f813db27c30c7039191b50e1512b7106f0f4fe7ccaa3aa69f85b4671eda7ed0b9f9d34781eb26ebe4593ad4eb
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -14379,8 +14299,8 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"tsconfck@npm:^3.0.3":
|
||||
version: 3.1.6
|
||||
resolution: "tsconfck@npm:3.1.6"
|
||||
version: 3.1.5
|
||||
resolution: "tsconfck@npm:3.1.5"
|
||||
peerDependencies:
|
||||
typescript: ^5.0.0
|
||||
peerDependenciesMeta:
|
||||
@@ -14388,7 +14308,7 @@ __metadata:
|
||||
optional: true
|
||||
bin:
|
||||
tsconfck: bin/tsconfck.js
|
||||
checksum: 10/8574595286850273bf83319b4e67ca760088df3c36f7ca1425aaf797416672e854271bd31e75c9b3e1836ed5b66410c6bc38cbbda9c638a5416c6a682ed94132
|
||||
checksum: 10/46b68f0fcec7da045490e427400c2a7fea67bdb6dae871257e8d2ec48e9dc99674214df86ff51c6d01ceb68ba9d7d806d3b69de432efa3c76b5fba160c252857
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -14411,6 +14331,22 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"tsx@npm:4.19.4":
|
||||
version: 4.19.4
|
||||
resolution: "tsx@npm:4.19.4"
|
||||
dependencies:
|
||||
esbuild: "npm:~0.25.0"
|
||||
fsevents: "npm:~2.3.3"
|
||||
get-tsconfig: "npm:^4.7.5"
|
||||
dependenciesMeta:
|
||||
fsevents:
|
||||
optional: true
|
||||
bin:
|
||||
tsx: dist/cli.mjs
|
||||
checksum: 10/4dde315aeda70b9cadfecbc8d05b1625f5831018b9cb2db25cbbd03c5f5ee9c59cdc6652a0fd8492176b50944a5af1d5af352b944d024f4a719f58d6f2ac3a7f
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"type-check@npm:^0.4.0, type-check@npm:~0.4.0":
|
||||
version: 0.4.0
|
||||
resolution: "type-check@npm:0.4.0"
|
||||
@@ -14647,10 +14583,10 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"undici-types@npm:~7.8.0":
|
||||
version: 7.8.0
|
||||
resolution: "undici-types@npm:7.8.0"
|
||||
checksum: 10/fcff3fbab234f067fbd69e374ee2c198ba74c364ceaf6d93db7ca267e784457b5518cd01d0d2329b075f412574205ea3172a9a675facb49b4c9efb7141cd80b7
|
||||
"undici-types@npm:~6.21.0":
|
||||
version: 6.21.0
|
||||
resolution: "undici-types@npm:6.21.0"
|
||||
checksum: 10/ec8f41aa4359d50f9b59fa61fe3efce3477cc681908c8f84354d8567bb3701fafdddf36ef6bff307024d3feb42c837cf6f670314ba37fc8145e219560e473d14
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -14720,9 +14656,9 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"universal-user-agent@npm:^7.0.0, universal-user-agent@npm:^7.0.2":
|
||||
version: 7.0.3
|
||||
resolution: "universal-user-agent@npm:7.0.3"
|
||||
checksum: 10/c497e85f8b11eb8fa4dce584d7a39cc98710164959f494cafc3c269b51abb20fff269951838efd7424d15f6b3d001507f3cb8b52bb5676fdb642019dfd17e63e
|
||||
version: 7.0.2
|
||||
resolution: "universal-user-agent@npm:7.0.2"
|
||||
checksum: 10/3f02cb6de0bb9fbaf379566bd0320d8e46af6e4358a2e88fce7e70687ed7b48b37f479d728bb22f4204a518e363f3038ac4841c033af1ee2253f6428a6c67e53
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -15873,8 +15809,8 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"ws@npm:^8.18.0":
|
||||
version: 8.18.2
|
||||
resolution: "ws@npm:8.18.2"
|
||||
version: 8.18.1
|
||||
resolution: "ws@npm:8.18.1"
|
||||
peerDependencies:
|
||||
bufferutil: ^4.0.1
|
||||
utf-8-validate: ">=5.0.2"
|
||||
@@ -15883,7 +15819,7 @@ __metadata:
|
||||
optional: true
|
||||
utf-8-validate:
|
||||
optional: true
|
||||
checksum: 10/018e04ec95561d88248d53a2eaf094b4ae131e9b062f2679e6e8a62f04649bc543448f1e038125225ac6bbb25f54c1e65d7a2cc9dbc1e28b43e5e6b7162ad88e
|
||||
checksum: 10/3f38e9594f2af5b6324138e86b74df7d77bbb8e310bf8188679dd80bac0d1f47e51536a1923ac3365f31f3d8b25ea0b03e4ade466aa8292a86cd5defca64b19b
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
Reference in New Issue
Block a user