diff --git a/.eslint-import-groups.cjs b/.eslint-import-groups.cjs index 1d67ad5a6..a09f4600f 100644 --- a/.eslint-import-groups.cjs +++ b/.eslint-import-groups.cjs @@ -16,29 +16,16 @@ const externalDeps = [ ), ].sort() -const nodeDeps = [ - 'child_process', - 'crypto', - 'dgram', - 'electron', - 'fs', - 'http', - 'https', - 'net', - 'os', - 'path', - 'tls', - 'url', -] const reactDeps = ['react', 'react-dom'] const baseUrlPatterns = ['^[a-z_]'] const parentPatterns = ['^\\.\\.'] const siblingPatterns = ['^\\.'] const nakedImports = ['^\\u0000'] +const explicitNodeImports = ['^node:'] module.exports = [ nakedImports, - nodeDeps.map((dep) => `^${dep}$`), + explicitNodeImports, reactDeps.map((dep) => `^${dep}(\\/|$)`), externalDeps.map((dep) => `^${dep}(\\/|$)`), baseUrlPatterns, diff --git a/.eslintrc.cjs b/.eslintrc.cjs index afdb15fa0..efb54c9b0 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -9,11 +9,12 @@ module.exports = { ecmaFeatures: { jsx: true }, ecmaVersion: 2022, project: [ - './tsconfig.eslint.json', + './example-overlay-react/tsconfig.json', './overlay/tsconfig.json', './player/tsconfig.json', './streams/tsconfig.json', - './example-overlay-react/tsconfig.json', + './tools/tsconfig.json', + './tsconfig.eslint.json', ], sourceType: 'module', tsconfigRootDir: __dirname, @@ -34,5 +35,9 @@ module.exports = { settings: { react: { version: '18' }, }, - ignorePatterns: ['**/dist/'], + ignorePatterns: [ + '**/*.min.js*', + '**/__generated__/', + '**/dist/', + ], } diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ba51daba0..7d5a3823c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -44,7 +44,7 @@ jobs: with: tag_name: ${{ steps.vars.outputs.version }} release_name: Release ${{ steps.vars.outputs.version }} - body_path: changeset.md + body_path: CHANGELOG.md draft: false prerelease: false diff --git a/justfile b/justfile index 45673c80c..f3f289c2c 100644 --- a/justfile +++ b/justfile @@ -1,6 +1,6 @@ set shell := ["bash", "-uc"] -export PATH := "./node_modules/.bin:" + env_var('PATH') +export PATH := "./node_modules/.bin" + ":" + join(justfile_directory(), "node_modules/.bin") + ":" + env_var('PATH') # just setup -- default when running just with no command default: @@ -13,9 +13,19 @@ build: _build-streams _build-player _build-overlay @changed: git diff --diff-filter=d --name-only $(git merge-base --fork-point origin/main) -# create a changelog or changeset +# create a changelog changelog: - scripts/changelog.mjs --write=CHANGELOG.md > changeset.md + #!/usr/bin/env bash + set -euo pipefail + new_version="$(jq -r .version package.json)" + old_version="$(git show HEAD:package.json | jq -r .version)" + url="$(jq -r .repository.url package.json)" + range=$(just sha v$old_version)..$(just sha HEAD) + changelog $new_version $range --url $url --outfile=CHANGELOG.md + +# check if there are uncommitted changes in the workspace +@check-dirty: + git diff --quiet || (echo "workspace dirty!"; git diff; exit 1) # format or check files with dprint (default formats all matching files) dprint +args="fmt": @@ -69,18 +79,36 @@ rtsp-ws: serve path *args='--bind 0.0.0.0': http-server {{ path }} {{ args }} +# get the complete SHA ID for a commit +@sha $commitish='HEAD': + git rev-parse $commitish + +# generate tools +tools: + cd tools && esbuild --platform=node --outfile=src/__generated__/changelog.mjs --format=esm --out-extension:.js=.mjs --bundle --external:cmd-ts src/changelog/cli.ts + just dprint fmt 'tools/src/__generated__/*' + +# update a specific dependency to latest update package: just ncu -u {{ package }} npm install npm update --include-workspace-root --workspaces {{ package }} +# CI verification +verify: + just build + just lint . + just test + just tools + just check-dirty + # update the package version of all workspaces version $level='prerelease': #!/usr/bin/env bash current=$(jq -r '.version' package.json) next=$(semver -i $level --preid alpha $current) echo "update: $current => $next" - npm version $next --workspace=streams --workspace=player --workspace=overlay + npm version $next --git-tag-version=false --workspace=streams --workspace=player --workspace=overlay --include-workspace-root # run vite development server, WORKSPACE=(player) vite WORKSPACE *ARGS: @@ -106,10 +134,6 @@ tsc workspace: uvu path pattern='.*\.test\.tsx?': c8 -r none --clean=false --src={{ path }} -- tsx --tsconfig {{ path }}/tsconfig.json node_modules/uvu/bin.js {{ path }}/tests/ {{ pattern }} -# get workspace from pathname -@workspace pathname=invocation_directory(): - node scripts/top-level-dir.mjs {{ justfile_directory() }} {{ pathname }} - # # hidden commands (these can be run but they are not shown with just --list) # diff --git a/overlay/esbuild.mjs b/overlay/esbuild.mjs index 2790975e7..b36f2937f 100755 --- a/overlay/esbuild.mjs +++ b/overlay/esbuild.mjs @@ -1,6 +1,6 @@ #!/usr/bin/env node -import { existsSync, mkdirSync } from 'fs' -import { join } from 'path' +import { existsSync, mkdirSync } from 'node:fs' +import { join } from 'node:path' import { buildSync } from 'esbuild' diff --git a/package-lock.json b/package-lock.json index c92cd1ceb..e35616ffe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,10 +1,12 @@ { "name": "media-js", + "version": "12.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "media-js", + "version": "12.2.0", "workspaces": [ "example-overlay-react", "example-player-react", @@ -13,7 +15,8 @@ "example-streams-web", "overlay", "player", - "streams" + "streams", + "tools" ], "devDependencies": { "@typescript-eslint/eslint-plugin": "5.62.0", @@ -23,6 +26,7 @@ "cypress": "12.17.4", "dpdm": "3.14.0", "dprint": "0.41.0", + "esbuild": "0.17.19", "eslint": "8.49.0", "eslint-plugin-deprecation": "1.5.0", "eslint-plugin-node": "11.1.0", @@ -1293,9 +1297,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.19.3", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.3.tgz", - "integrity": "sha512-Lemgw4io4VZl9GHJmjiBGzQ7ONXRfRPHcUEerndjwiSkbxzrpq0Uggku5MxxrXdwJ+pTj1qyw4jwTu7hkPsgIA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.19.tgz", + "integrity": "sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==", "cpu": [ "arm" ], @@ -1309,9 +1313,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.19.3", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.3.tgz", - "integrity": "sha512-w+Akc0vv5leog550kjJV9Ru+MXMR2VuMrui3C61mnysim0gkFCPOUTAfzTP0qX+HpN9Syu3YA3p1hf3EPqObRw==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.19.tgz", + "integrity": "sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==", "cpu": [ "arm64" ], @@ -1325,9 +1329,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.19.3", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.3.tgz", - "integrity": "sha512-FKQJKkK5MXcBHoNZMDNUAg1+WcZlV/cuXrWCoGF/TvdRiYS4znA0m5Il5idUwfxrE20bG/vU1Cr5e1AD6IEIjQ==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.19.tgz", + "integrity": "sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==", "cpu": [ "x64" ], @@ -1341,9 +1345,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.19.3", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.3.tgz", - "integrity": "sha512-kw7e3FXU+VsJSSSl2nMKvACYlwtvZB8RUIeVShIEY6PVnuZ3c9+L9lWB2nWeeKWNNYDdtL19foCQ0ZyUL7nqGw==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.19.tgz", + "integrity": "sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==", "cpu": [ "arm64" ], @@ -1357,9 +1361,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.19.3", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.3.tgz", - "integrity": "sha512-tPfZiwF9rO0jW6Jh9ipi58N5ZLoSjdxXeSrAYypy4psA2Yl1dAMhM71KxVfmjZhJmxRjSnb29YlRXXhh3GqzYw==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.19.tgz", + "integrity": "sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==", "cpu": [ "x64" ], @@ -1373,9 +1377,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.19.3", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.3.tgz", - "integrity": "sha512-ERDyjOgYeKe0Vrlr1iLrqTByB026YLPzTytDTz1DRCYM+JI92Dw2dbpRHYmdqn6VBnQ9Bor6J8ZlNwdZdxjlSg==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.19.tgz", + "integrity": "sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==", "cpu": [ "arm64" ], @@ -1389,9 +1393,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.19.3", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.3.tgz", - "integrity": "sha512-nXesBZ2Ad1qL+Rm3crN7NmEVJ5uvfLFPLJev3x1j3feCQXfAhoYrojC681RhpdOph8NsvKBBwpYZHR7W0ifTTA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.19.tgz", + "integrity": "sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==", "cpu": [ "x64" ], @@ -1405,9 +1409,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.19.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.3.tgz", - "integrity": "sha512-zr48Cg/8zkzZCzDHNxXO/89bf9e+r4HtzNUPoz4GmgAkF1gFAFmfgOdCbR8zMbzFDGb1FqBBhdXUpcTQRYS1cQ==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.19.tgz", + "integrity": "sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==", "cpu": [ "arm" ], @@ -1421,9 +1425,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.19.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.3.tgz", - "integrity": "sha512-qXvYKmXj8GcJgWq3aGvxL/JG1ZM3UR272SdPU4QSTzD0eymrM7leiZH77pvY3UetCy0k1xuXZ+VPvoJNdtrsWQ==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.19.tgz", + "integrity": "sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==", "cpu": [ "arm64" ], @@ -1437,9 +1441,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.19.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.3.tgz", - "integrity": "sha512-7XlCKCA0nWcbvYpusARWkFjRQNWNGlt45S+Q18UeS///K6Aw8bB2FKYe9mhVWy/XLShvCweOLZPrnMswIaDXQA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.19.tgz", + "integrity": "sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==", "cpu": [ "ia32" ], @@ -1453,9 +1457,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.19.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.3.tgz", - "integrity": "sha512-qGTgjweER5xqweiWtUIDl9OKz338EQqCwbS9c2Bh5jgEH19xQ1yhgGPNesugmDFq+UUSDtWgZ264st26b3de8A==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.19.tgz", + "integrity": "sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==", "cpu": [ "loong64" ], @@ -1469,9 +1473,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.19.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.3.tgz", - "integrity": "sha512-gy1bFskwEyxVMFRNYSvBauDIWNggD6pyxUksc0MV9UOBD138dKTzr8XnM2R4mBsHwVzeuIH8X5JhmNs2Pzrx+A==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.19.tgz", + "integrity": "sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==", "cpu": [ "mips64el" ], @@ -1485,9 +1489,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.19.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.3.tgz", - "integrity": "sha512-UrYLFu62x1MmmIe85rpR3qou92wB9lEXluwMB/STDzPF9k8mi/9UvNsG07Tt9AqwPQXluMQ6bZbTzYt01+Ue5g==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.19.tgz", + "integrity": "sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==", "cpu": [ "ppc64" ], @@ -1501,9 +1505,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.19.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.3.tgz", - "integrity": "sha512-9E73TfyMCbE+1AwFOg3glnzZ5fBAFK4aawssvuMgCRqCYzE0ylVxxzjEfut8xjmKkR320BEoMui4o/t9KA96gA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.19.tgz", + "integrity": "sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==", "cpu": [ "riscv64" ], @@ -1517,9 +1521,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.19.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.3.tgz", - "integrity": "sha512-LlmsbuBdm1/D66TJ3HW6URY8wO6IlYHf+ChOUz8SUAjVTuaisfuwCOAgcxo3Zsu3BZGxmI7yt//yGOxV+lHcEA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.19.tgz", + "integrity": "sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==", "cpu": [ "s390x" ], @@ -1533,9 +1537,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.19.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.3.tgz", - "integrity": "sha512-ogV0+GwEmvwg/8ZbsyfkYGaLACBQWDvO0Kkh8LKBGKj9Ru8VM39zssrnu9Sxn1wbapA2qNS6BiLdwJZGouyCwQ==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.19.tgz", + "integrity": "sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==", "cpu": [ "x64" ], @@ -1549,9 +1553,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.19.3", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.3.tgz", - "integrity": "sha512-o1jLNe4uzQv2DKXMlmEzf66Wd8MoIhLNO2nlQBHLtWyh2MitDG7sMpfCO3NTcoTMuqHjfufgUQDFRI5C+xsXQw==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.19.tgz", + "integrity": "sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==", "cpu": [ "x64" ], @@ -1565,9 +1569,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.19.3", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.3.tgz", - "integrity": "sha512-AZJCnr5CZgZOdhouLcfRdnk9Zv6HbaBxjcyhq0StNcvAdVZJSKIdOiPB9az2zc06ywl0ePYJz60CjdKsQacp5Q==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.19.tgz", + "integrity": "sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==", "cpu": [ "x64" ], @@ -1581,9 +1585,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.19.3", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.3.tgz", - "integrity": "sha512-Acsujgeqg9InR4glTRvLKGZ+1HMtDm94ehTIHKhJjFpgVzZG9/pIcWW/HA/DoMfEyXmANLDuDZ2sNrWcjq1lxw==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.19.tgz", + "integrity": "sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==", "cpu": [ "x64" ], @@ -1597,9 +1601,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.19.3", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.3.tgz", - "integrity": "sha512-FSrAfjVVy7TifFgYgliiJOyYynhQmqgPj15pzLyJk8BUsnlWNwP/IAy6GAiB1LqtoivowRgidZsfpoYLZH586A==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.19.tgz", + "integrity": "sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==", "cpu": [ "arm64" ], @@ -1613,9 +1617,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.19.3", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.3.tgz", - "integrity": "sha512-xTScXYi12xLOWZ/sc5RBmMN99BcXp/eEf7scUC0oeiRoiT5Vvo9AycuqCp+xdpDyAU+LkrCqEpUS9fCSZF8J3Q==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.19.tgz", + "integrity": "sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==", "cpu": [ "ia32" ], @@ -1629,9 +1633,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.19.3", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.3.tgz", - "integrity": "sha512-FbUN+0ZRXsypPyWE2IwIkVjDkDnJoMJARWOcFZn4KPPli+QnKqF0z1anvfaYe3ev5HFCpRDLLBDHyOALLppWHw==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.19.tgz", + "integrity": "sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==", "cpu": [ "x64" ], @@ -2744,7 +2748,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, "engines": { "node": ">=8" } @@ -2753,7 +2756,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, "dependencies": { "color-convert": "^2.0.1" }, @@ -3584,7 +3586,6 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -3749,7 +3750,6 @@ "version": "0.13.0", "resolved": "https://registry.npmjs.org/cmd-ts/-/cmd-ts-0.13.0.tgz", "integrity": "sha512-nsnxf6wNIM/JAS7T/x/1JmbEsjH0a8tezXqqpaL0O6+eV0/aDEnRxwjxpu0VzDdRcaC1ixGSbRlUuf/IU59I4g==", - "dev": true, "dependencies": { "chalk": "^4.0.0", "debug": "^4.3.4", @@ -3761,7 +3761,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, "dependencies": { "color-name": "~1.1.4" }, @@ -3772,8 +3771,7 @@ "node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "node_modules/color-support": { "version": "1.1.3", @@ -4359,8 +4357,7 @@ "node_modules/didyoumean": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", - "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", - "dev": true + "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==" }, "node_modules/diff": { "version": "5.1.0", @@ -4684,9 +4681,9 @@ } }, "node_modules/esbuild": { - "version": "0.19.3", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.3.tgz", - "integrity": "sha512-UlJ1qUUA2jL2nNib1JTSkifQTcYTroFqRjwCFW4QYEKEsixXD5Tik9xML7zh2gTxkYTBKGHNH9y7txMwVyPbjw==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.19.tgz", + "integrity": "sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==", "dev": true, "hasInstallScript": true, "bin": { @@ -4696,28 +4693,28 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/android-arm": "0.19.3", - "@esbuild/android-arm64": "0.19.3", - "@esbuild/android-x64": "0.19.3", - "@esbuild/darwin-arm64": "0.19.3", - "@esbuild/darwin-x64": "0.19.3", - "@esbuild/freebsd-arm64": "0.19.3", - "@esbuild/freebsd-x64": "0.19.3", - "@esbuild/linux-arm": "0.19.3", - "@esbuild/linux-arm64": "0.19.3", - "@esbuild/linux-ia32": "0.19.3", - "@esbuild/linux-loong64": "0.19.3", - "@esbuild/linux-mips64el": "0.19.3", - "@esbuild/linux-ppc64": "0.19.3", - "@esbuild/linux-riscv64": "0.19.3", - "@esbuild/linux-s390x": "0.19.3", - "@esbuild/linux-x64": "0.19.3", - "@esbuild/netbsd-x64": "0.19.3", - "@esbuild/openbsd-x64": "0.19.3", - "@esbuild/sunos-x64": "0.19.3", - "@esbuild/win32-arm64": "0.19.3", - "@esbuild/win32-ia32": "0.19.3", - "@esbuild/win32-x64": "0.19.3" + "@esbuild/android-arm": "0.17.19", + "@esbuild/android-arm64": "0.17.19", + "@esbuild/android-x64": "0.17.19", + "@esbuild/darwin-arm64": "0.17.19", + "@esbuild/darwin-x64": "0.17.19", + "@esbuild/freebsd-arm64": "0.17.19", + "@esbuild/freebsd-x64": "0.17.19", + "@esbuild/linux-arm": "0.17.19", + "@esbuild/linux-arm64": "0.17.19", + "@esbuild/linux-ia32": "0.17.19", + "@esbuild/linux-loong64": "0.17.19", + "@esbuild/linux-mips64el": "0.17.19", + "@esbuild/linux-ppc64": "0.17.19", + "@esbuild/linux-riscv64": "0.17.19", + "@esbuild/linux-s390x": "0.17.19", + "@esbuild/linux-x64": "0.17.19", + "@esbuild/netbsd-x64": "0.17.19", + "@esbuild/openbsd-x64": "0.17.19", + "@esbuild/sunos-x64": "0.17.19", + "@esbuild/win32-arm64": "0.17.19", + "@esbuild/win32-ia32": "0.17.19", + "@esbuild/win32-x64": "0.17.19" } }, "node_modules/escalade": { @@ -6022,7 +6019,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, "engines": { "node": ">=8" } @@ -10695,7 +10691,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -10886,7 +10881,6 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -11139,6 +11133,10 @@ "node": ">=8.0" } }, + "node_modules/tools": { + "resolved": "tools", + "link": true + }, "node_modules/tough-cookie": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", @@ -12604,107 +12602,1282 @@ "react-dom": "^17.0.1 || ^18.0.0" } }, - "player": { - "name": "media-stream-player", - "version": "12.2.0", - "license": "MIT", - "dependencies": { - "@juggle/resize-observer": "3.4.0", - "debug": "4.3.4", - "react-hooks-shareable": "1.53.0" - }, - "devDependencies": { - "@types/debug": "4.1.8", - "@types/luxon": "3.3.2", - "@types/react": "18.2.22", - "@types/react-dom": "18.2.7", - "@types/styled-components": "5.1.27", - "@vitejs/plugin-react": "4.0.4", - "chalk": "5.3.0", - "esbuild": "0.19.3", - "luxon": "3.4.3", - "media-stream-library": "12.2.0", - "react": "18.2.0", - "react-dom": "18.2.0", - "react-is": "18.2.0", - "semver": "7.5.4", - "styled-components": "5.3.11", - "typescript": "5.2.2", - "vite": "4.4.9" - }, - "peerDependencies": { - "luxon": "^3.0.0", - "media-stream-library": "^12.2.0", - "react": "^17.0.2 || ^18.1.0", - "react-dom": "^17.0.2 || ^18.1.0", - "styled-components": "^5.3.5" + "overlay/node_modules/@esbuild/android-arm": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.3.tgz", + "integrity": "sha512-Lemgw4io4VZl9GHJmjiBGzQ7ONXRfRPHcUEerndjwiSkbxzrpq0Uggku5MxxrXdwJ+pTj1qyw4jwTu7hkPsgIA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" } }, - "player/node_modules/chalk": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", - "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "overlay/node_modules/@esbuild/android-arm64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.3.tgz", + "integrity": "sha512-w+Akc0vv5leog550kjJV9Ru+MXMR2VuMrui3C61mnysim0gkFCPOUTAfzTP0qX+HpN9Syu3YA3p1hf3EPqObRw==", + "cpu": [ + "arm64" + ], "dev": true, + "optional": true, + "os": [ + "android" + ], "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "node": ">=12" } }, - "streams": { - "name": "media-stream-library", - "version": "12.2.0", - "license": "MIT", - "dependencies": { - "buffer": "6.0.3", - "debug": "4.3.4", - "events": "3.3.0", - "process": "0.11.10", - "stream-browserify": "3.0.0", - "ts-md5": "1.3.1", - "ws": "8.14.2" - }, - "devDependencies": { - "@types/debug": "4.1.8", - "@types/node": "18.17.17", - "@types/ws": "8.5.5", - "esbuild": "0.19.3", - "global-jsdom": "8.8.0", - "jsdom": "21.1.2", - "mock-socket": "9.3.1", - "semver": "7.5.4", - "typescript": "5.2.2", - "uvu": "0.5.6" + "overlay/node_modules/@esbuild/android-x64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.3.tgz", + "integrity": "sha512-FKQJKkK5MXcBHoNZMDNUAg1+WcZlV/cuXrWCoGF/TvdRiYS4znA0m5Il5idUwfxrE20bG/vU1Cr5e1AD6IEIjQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" } }, - "streams/node_modules/@types/node": { - "version": "18.17.17", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.17.17.tgz", - "integrity": "sha512-cOxcXsQ2sxiwkykdJqvyFS+MLQPLvIdwh5l6gNg8qF6s+C7XSkEWOZjK+XhUZd+mYvHV/180g2cnCcIl4l06Pw==", - "dev": true + "overlay/node_modules/@esbuild/darwin-arm64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.3.tgz", + "integrity": "sha512-kw7e3FXU+VsJSSSl2nMKvACYlwtvZB8RUIeVShIEY6PVnuZ3c9+L9lWB2nWeeKWNNYDdtL19foCQ0ZyUL7nqGw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } }, - "streams/node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } + "overlay/node_modules/@esbuild/darwin-x64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.3.tgz", + "integrity": "sha512-tPfZiwF9rO0jW6Jh9ipi58N5ZLoSjdxXeSrAYypy4psA2Yl1dAMhM71KxVfmjZhJmxRjSnb29YlRXXhh3GqzYw==", + "cpu": [ + "x64" ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "overlay/node_modules/@esbuild/freebsd-arm64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.3.tgz", + "integrity": "sha512-ERDyjOgYeKe0Vrlr1iLrqTByB026YLPzTytDTz1DRCYM+JI92Dw2dbpRHYmdqn6VBnQ9Bor6J8ZlNwdZdxjlSg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "overlay/node_modules/@esbuild/freebsd-x64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.3.tgz", + "integrity": "sha512-nXesBZ2Ad1qL+Rm3crN7NmEVJ5uvfLFPLJev3x1j3feCQXfAhoYrojC681RhpdOph8NsvKBBwpYZHR7W0ifTTA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "overlay/node_modules/@esbuild/linux-arm": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.3.tgz", + "integrity": "sha512-zr48Cg/8zkzZCzDHNxXO/89bf9e+r4HtzNUPoz4GmgAkF1gFAFmfgOdCbR8zMbzFDGb1FqBBhdXUpcTQRYS1cQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "overlay/node_modules/@esbuild/linux-arm64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.3.tgz", + "integrity": "sha512-qXvYKmXj8GcJgWq3aGvxL/JG1ZM3UR272SdPU4QSTzD0eymrM7leiZH77pvY3UetCy0k1xuXZ+VPvoJNdtrsWQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "overlay/node_modules/@esbuild/linux-ia32": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.3.tgz", + "integrity": "sha512-7XlCKCA0nWcbvYpusARWkFjRQNWNGlt45S+Q18UeS///K6Aw8bB2FKYe9mhVWy/XLShvCweOLZPrnMswIaDXQA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "overlay/node_modules/@esbuild/linux-loong64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.3.tgz", + "integrity": "sha512-qGTgjweER5xqweiWtUIDl9OKz338EQqCwbS9c2Bh5jgEH19xQ1yhgGPNesugmDFq+UUSDtWgZ264st26b3de8A==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "overlay/node_modules/@esbuild/linux-mips64el": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.3.tgz", + "integrity": "sha512-gy1bFskwEyxVMFRNYSvBauDIWNggD6pyxUksc0MV9UOBD138dKTzr8XnM2R4mBsHwVzeuIH8X5JhmNs2Pzrx+A==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "overlay/node_modules/@esbuild/linux-ppc64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.3.tgz", + "integrity": "sha512-UrYLFu62x1MmmIe85rpR3qou92wB9lEXluwMB/STDzPF9k8mi/9UvNsG07Tt9AqwPQXluMQ6bZbTzYt01+Ue5g==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "overlay/node_modules/@esbuild/linux-riscv64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.3.tgz", + "integrity": "sha512-9E73TfyMCbE+1AwFOg3glnzZ5fBAFK4aawssvuMgCRqCYzE0ylVxxzjEfut8xjmKkR320BEoMui4o/t9KA96gA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "overlay/node_modules/@esbuild/linux-s390x": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.3.tgz", + "integrity": "sha512-LlmsbuBdm1/D66TJ3HW6URY8wO6IlYHf+ChOUz8SUAjVTuaisfuwCOAgcxo3Zsu3BZGxmI7yt//yGOxV+lHcEA==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "overlay/node_modules/@esbuild/linux-x64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.3.tgz", + "integrity": "sha512-ogV0+GwEmvwg/8ZbsyfkYGaLACBQWDvO0Kkh8LKBGKj9Ru8VM39zssrnu9Sxn1wbapA2qNS6BiLdwJZGouyCwQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "overlay/node_modules/@esbuild/netbsd-x64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.3.tgz", + "integrity": "sha512-o1jLNe4uzQv2DKXMlmEzf66Wd8MoIhLNO2nlQBHLtWyh2MitDG7sMpfCO3NTcoTMuqHjfufgUQDFRI5C+xsXQw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "overlay/node_modules/@esbuild/openbsd-x64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.3.tgz", + "integrity": "sha512-AZJCnr5CZgZOdhouLcfRdnk9Zv6HbaBxjcyhq0StNcvAdVZJSKIdOiPB9az2zc06ywl0ePYJz60CjdKsQacp5Q==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "overlay/node_modules/@esbuild/sunos-x64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.3.tgz", + "integrity": "sha512-Acsujgeqg9InR4glTRvLKGZ+1HMtDm94ehTIHKhJjFpgVzZG9/pIcWW/HA/DoMfEyXmANLDuDZ2sNrWcjq1lxw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "overlay/node_modules/@esbuild/win32-arm64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.3.tgz", + "integrity": "sha512-FSrAfjVVy7TifFgYgliiJOyYynhQmqgPj15pzLyJk8BUsnlWNwP/IAy6GAiB1LqtoivowRgidZsfpoYLZH586A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "overlay/node_modules/@esbuild/win32-ia32": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.3.tgz", + "integrity": "sha512-xTScXYi12xLOWZ/sc5RBmMN99BcXp/eEf7scUC0oeiRoiT5Vvo9AycuqCp+xdpDyAU+LkrCqEpUS9fCSZF8J3Q==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "overlay/node_modules/@esbuild/win32-x64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.3.tgz", + "integrity": "sha512-FbUN+0ZRXsypPyWE2IwIkVjDkDnJoMJARWOcFZn4KPPli+QnKqF0z1anvfaYe3ev5HFCpRDLLBDHyOALLppWHw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "overlay/node_modules/esbuild": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.3.tgz", + "integrity": "sha512-UlJ1qUUA2jL2nNib1JTSkifQTcYTroFqRjwCFW4QYEKEsixXD5Tik9xML7zh2gTxkYTBKGHNH9y7txMwVyPbjw==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.19.3", + "@esbuild/android-arm64": "0.19.3", + "@esbuild/android-x64": "0.19.3", + "@esbuild/darwin-arm64": "0.19.3", + "@esbuild/darwin-x64": "0.19.3", + "@esbuild/freebsd-arm64": "0.19.3", + "@esbuild/freebsd-x64": "0.19.3", + "@esbuild/linux-arm": "0.19.3", + "@esbuild/linux-arm64": "0.19.3", + "@esbuild/linux-ia32": "0.19.3", + "@esbuild/linux-loong64": "0.19.3", + "@esbuild/linux-mips64el": "0.19.3", + "@esbuild/linux-ppc64": "0.19.3", + "@esbuild/linux-riscv64": "0.19.3", + "@esbuild/linux-s390x": "0.19.3", + "@esbuild/linux-x64": "0.19.3", + "@esbuild/netbsd-x64": "0.19.3", + "@esbuild/openbsd-x64": "0.19.3", + "@esbuild/sunos-x64": "0.19.3", + "@esbuild/win32-arm64": "0.19.3", + "@esbuild/win32-ia32": "0.19.3", + "@esbuild/win32-x64": "0.19.3" + } + }, + "player": { + "name": "media-stream-player", + "version": "12.2.0", + "license": "MIT", + "dependencies": { + "@juggle/resize-observer": "3.4.0", + "debug": "4.3.4", + "react-hooks-shareable": "1.53.0" + }, + "devDependencies": { + "@types/debug": "4.1.8", + "@types/luxon": "3.3.2", + "@types/react": "18.2.22", + "@types/react-dom": "18.2.7", + "@types/styled-components": "5.1.27", + "@vitejs/plugin-react": "4.0.4", + "chalk": "5.3.0", + "esbuild": "0.19.3", + "luxon": "3.4.3", + "media-stream-library": "file:../streams", + "react": "18.2.0", + "react-dom": "18.2.0", + "react-is": "18.2.0", + "semver": "7.5.4", + "styled-components": "5.3.11", + "typescript": "5.2.2", + "vite": "4.4.9" + }, + "peerDependencies": { + "luxon": "^3.0.0", + "media-stream-library": "^12.2.0", + "react": "^17.0.2 || ^18.1.0", + "react-dom": "^17.0.2 || ^18.1.0", + "styled-components": "^5.3.5" + } + }, + "player/node_modules/@esbuild/android-arm": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.3.tgz", + "integrity": "sha512-Lemgw4io4VZl9GHJmjiBGzQ7ONXRfRPHcUEerndjwiSkbxzrpq0Uggku5MxxrXdwJ+pTj1qyw4jwTu7hkPsgIA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "player/node_modules/@esbuild/android-arm64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.3.tgz", + "integrity": "sha512-w+Akc0vv5leog550kjJV9Ru+MXMR2VuMrui3C61mnysim0gkFCPOUTAfzTP0qX+HpN9Syu3YA3p1hf3EPqObRw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "player/node_modules/@esbuild/android-x64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.3.tgz", + "integrity": "sha512-FKQJKkK5MXcBHoNZMDNUAg1+WcZlV/cuXrWCoGF/TvdRiYS4znA0m5Il5idUwfxrE20bG/vU1Cr5e1AD6IEIjQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "player/node_modules/@esbuild/darwin-arm64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.3.tgz", + "integrity": "sha512-kw7e3FXU+VsJSSSl2nMKvACYlwtvZB8RUIeVShIEY6PVnuZ3c9+L9lWB2nWeeKWNNYDdtL19foCQ0ZyUL7nqGw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "player/node_modules/@esbuild/darwin-x64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.3.tgz", + "integrity": "sha512-tPfZiwF9rO0jW6Jh9ipi58N5ZLoSjdxXeSrAYypy4psA2Yl1dAMhM71KxVfmjZhJmxRjSnb29YlRXXhh3GqzYw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "player/node_modules/@esbuild/freebsd-arm64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.3.tgz", + "integrity": "sha512-ERDyjOgYeKe0Vrlr1iLrqTByB026YLPzTytDTz1DRCYM+JI92Dw2dbpRHYmdqn6VBnQ9Bor6J8ZlNwdZdxjlSg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "player/node_modules/@esbuild/freebsd-x64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.3.tgz", + "integrity": "sha512-nXesBZ2Ad1qL+Rm3crN7NmEVJ5uvfLFPLJev3x1j3feCQXfAhoYrojC681RhpdOph8NsvKBBwpYZHR7W0ifTTA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "player/node_modules/@esbuild/linux-arm": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.3.tgz", + "integrity": "sha512-zr48Cg/8zkzZCzDHNxXO/89bf9e+r4HtzNUPoz4GmgAkF1gFAFmfgOdCbR8zMbzFDGb1FqBBhdXUpcTQRYS1cQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "player/node_modules/@esbuild/linux-arm64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.3.tgz", + "integrity": "sha512-qXvYKmXj8GcJgWq3aGvxL/JG1ZM3UR272SdPU4QSTzD0eymrM7leiZH77pvY3UetCy0k1xuXZ+VPvoJNdtrsWQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "player/node_modules/@esbuild/linux-ia32": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.3.tgz", + "integrity": "sha512-7XlCKCA0nWcbvYpusARWkFjRQNWNGlt45S+Q18UeS///K6Aw8bB2FKYe9mhVWy/XLShvCweOLZPrnMswIaDXQA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "player/node_modules/@esbuild/linux-loong64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.3.tgz", + "integrity": "sha512-qGTgjweER5xqweiWtUIDl9OKz338EQqCwbS9c2Bh5jgEH19xQ1yhgGPNesugmDFq+UUSDtWgZ264st26b3de8A==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "player/node_modules/@esbuild/linux-mips64el": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.3.tgz", + "integrity": "sha512-gy1bFskwEyxVMFRNYSvBauDIWNggD6pyxUksc0MV9UOBD138dKTzr8XnM2R4mBsHwVzeuIH8X5JhmNs2Pzrx+A==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "player/node_modules/@esbuild/linux-ppc64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.3.tgz", + "integrity": "sha512-UrYLFu62x1MmmIe85rpR3qou92wB9lEXluwMB/STDzPF9k8mi/9UvNsG07Tt9AqwPQXluMQ6bZbTzYt01+Ue5g==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "player/node_modules/@esbuild/linux-riscv64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.3.tgz", + "integrity": "sha512-9E73TfyMCbE+1AwFOg3glnzZ5fBAFK4aawssvuMgCRqCYzE0ylVxxzjEfut8xjmKkR320BEoMui4o/t9KA96gA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "player/node_modules/@esbuild/linux-s390x": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.3.tgz", + "integrity": "sha512-LlmsbuBdm1/D66TJ3HW6URY8wO6IlYHf+ChOUz8SUAjVTuaisfuwCOAgcxo3Zsu3BZGxmI7yt//yGOxV+lHcEA==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "player/node_modules/@esbuild/linux-x64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.3.tgz", + "integrity": "sha512-ogV0+GwEmvwg/8ZbsyfkYGaLACBQWDvO0Kkh8LKBGKj9Ru8VM39zssrnu9Sxn1wbapA2qNS6BiLdwJZGouyCwQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "player/node_modules/@esbuild/netbsd-x64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.3.tgz", + "integrity": "sha512-o1jLNe4uzQv2DKXMlmEzf66Wd8MoIhLNO2nlQBHLtWyh2MitDG7sMpfCO3NTcoTMuqHjfufgUQDFRI5C+xsXQw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "player/node_modules/@esbuild/openbsd-x64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.3.tgz", + "integrity": "sha512-AZJCnr5CZgZOdhouLcfRdnk9Zv6HbaBxjcyhq0StNcvAdVZJSKIdOiPB9az2zc06ywl0ePYJz60CjdKsQacp5Q==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "player/node_modules/@esbuild/sunos-x64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.3.tgz", + "integrity": "sha512-Acsujgeqg9InR4glTRvLKGZ+1HMtDm94ehTIHKhJjFpgVzZG9/pIcWW/HA/DoMfEyXmANLDuDZ2sNrWcjq1lxw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "player/node_modules/@esbuild/win32-arm64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.3.tgz", + "integrity": "sha512-FSrAfjVVy7TifFgYgliiJOyYynhQmqgPj15pzLyJk8BUsnlWNwP/IAy6GAiB1LqtoivowRgidZsfpoYLZH586A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "player/node_modules/@esbuild/win32-ia32": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.3.tgz", + "integrity": "sha512-xTScXYi12xLOWZ/sc5RBmMN99BcXp/eEf7scUC0oeiRoiT5Vvo9AycuqCp+xdpDyAU+LkrCqEpUS9fCSZF8J3Q==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "player/node_modules/@esbuild/win32-x64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.3.tgz", + "integrity": "sha512-FbUN+0ZRXsypPyWE2IwIkVjDkDnJoMJARWOcFZn4KPPli+QnKqF0z1anvfaYe3ev5HFCpRDLLBDHyOALLppWHw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "player/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "dev": true, + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "player/node_modules/esbuild": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.3.tgz", + "integrity": "sha512-UlJ1qUUA2jL2nNib1JTSkifQTcYTroFqRjwCFW4QYEKEsixXD5Tik9xML7zh2gTxkYTBKGHNH9y7txMwVyPbjw==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.19.3", + "@esbuild/android-arm64": "0.19.3", + "@esbuild/android-x64": "0.19.3", + "@esbuild/darwin-arm64": "0.19.3", + "@esbuild/darwin-x64": "0.19.3", + "@esbuild/freebsd-arm64": "0.19.3", + "@esbuild/freebsd-x64": "0.19.3", + "@esbuild/linux-arm": "0.19.3", + "@esbuild/linux-arm64": "0.19.3", + "@esbuild/linux-ia32": "0.19.3", + "@esbuild/linux-loong64": "0.19.3", + "@esbuild/linux-mips64el": "0.19.3", + "@esbuild/linux-ppc64": "0.19.3", + "@esbuild/linux-riscv64": "0.19.3", + "@esbuild/linux-s390x": "0.19.3", + "@esbuild/linux-x64": "0.19.3", + "@esbuild/netbsd-x64": "0.19.3", + "@esbuild/openbsd-x64": "0.19.3", + "@esbuild/sunos-x64": "0.19.3", + "@esbuild/win32-arm64": "0.19.3", + "@esbuild/win32-ia32": "0.19.3", + "@esbuild/win32-x64": "0.19.3" + } + }, + "streams": { + "name": "media-stream-library", + "version": "12.2.0", + "license": "MIT", + "dependencies": { + "buffer": "6.0.3", + "debug": "4.3.4", + "events": "3.3.0", + "process": "0.11.10", + "stream-browserify": "3.0.0", + "ts-md5": "1.3.1", + "ws": "8.14.2" + }, + "devDependencies": { + "@types/debug": "4.1.8", + "@types/node": "18.17.17", + "@types/ws": "8.5.5", + "esbuild": "0.19.3", + "global-jsdom": "8.8.0", + "jsdom": "21.1.2", + "mock-socket": "9.3.1", + "semver": "7.5.4", + "typescript": "5.2.2", + "uvu": "0.5.6" + } + }, + "streams/node_modules/@esbuild/android-arm": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.3.tgz", + "integrity": "sha512-Lemgw4io4VZl9GHJmjiBGzQ7ONXRfRPHcUEerndjwiSkbxzrpq0Uggku5MxxrXdwJ+pTj1qyw4jwTu7hkPsgIA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "streams/node_modules/@esbuild/android-arm64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.3.tgz", + "integrity": "sha512-w+Akc0vv5leog550kjJV9Ru+MXMR2VuMrui3C61mnysim0gkFCPOUTAfzTP0qX+HpN9Syu3YA3p1hf3EPqObRw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "streams/node_modules/@esbuild/android-x64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.3.tgz", + "integrity": "sha512-FKQJKkK5MXcBHoNZMDNUAg1+WcZlV/cuXrWCoGF/TvdRiYS4znA0m5Il5idUwfxrE20bG/vU1Cr5e1AD6IEIjQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "streams/node_modules/@esbuild/darwin-arm64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.3.tgz", + "integrity": "sha512-kw7e3FXU+VsJSSSl2nMKvACYlwtvZB8RUIeVShIEY6PVnuZ3c9+L9lWB2nWeeKWNNYDdtL19foCQ0ZyUL7nqGw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "streams/node_modules/@esbuild/darwin-x64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.3.tgz", + "integrity": "sha512-tPfZiwF9rO0jW6Jh9ipi58N5ZLoSjdxXeSrAYypy4psA2Yl1dAMhM71KxVfmjZhJmxRjSnb29YlRXXhh3GqzYw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "streams/node_modules/@esbuild/freebsd-arm64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.3.tgz", + "integrity": "sha512-ERDyjOgYeKe0Vrlr1iLrqTByB026YLPzTytDTz1DRCYM+JI92Dw2dbpRHYmdqn6VBnQ9Bor6J8ZlNwdZdxjlSg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "streams/node_modules/@esbuild/freebsd-x64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.3.tgz", + "integrity": "sha512-nXesBZ2Ad1qL+Rm3crN7NmEVJ5uvfLFPLJev3x1j3feCQXfAhoYrojC681RhpdOph8NsvKBBwpYZHR7W0ifTTA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "streams/node_modules/@esbuild/linux-arm": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.3.tgz", + "integrity": "sha512-zr48Cg/8zkzZCzDHNxXO/89bf9e+r4HtzNUPoz4GmgAkF1gFAFmfgOdCbR8zMbzFDGb1FqBBhdXUpcTQRYS1cQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "streams/node_modules/@esbuild/linux-arm64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.3.tgz", + "integrity": "sha512-qXvYKmXj8GcJgWq3aGvxL/JG1ZM3UR272SdPU4QSTzD0eymrM7leiZH77pvY3UetCy0k1xuXZ+VPvoJNdtrsWQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "streams/node_modules/@esbuild/linux-ia32": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.3.tgz", + "integrity": "sha512-7XlCKCA0nWcbvYpusARWkFjRQNWNGlt45S+Q18UeS///K6Aw8bB2FKYe9mhVWy/XLShvCweOLZPrnMswIaDXQA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "streams/node_modules/@esbuild/linux-loong64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.3.tgz", + "integrity": "sha512-qGTgjweER5xqweiWtUIDl9OKz338EQqCwbS9c2Bh5jgEH19xQ1yhgGPNesugmDFq+UUSDtWgZ264st26b3de8A==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "streams/node_modules/@esbuild/linux-mips64el": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.3.tgz", + "integrity": "sha512-gy1bFskwEyxVMFRNYSvBauDIWNggD6pyxUksc0MV9UOBD138dKTzr8XnM2R4mBsHwVzeuIH8X5JhmNs2Pzrx+A==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "streams/node_modules/@esbuild/linux-ppc64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.3.tgz", + "integrity": "sha512-UrYLFu62x1MmmIe85rpR3qou92wB9lEXluwMB/STDzPF9k8mi/9UvNsG07Tt9AqwPQXluMQ6bZbTzYt01+Ue5g==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "streams/node_modules/@esbuild/linux-riscv64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.3.tgz", + "integrity": "sha512-9E73TfyMCbE+1AwFOg3glnzZ5fBAFK4aawssvuMgCRqCYzE0ylVxxzjEfut8xjmKkR320BEoMui4o/t9KA96gA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "streams/node_modules/@esbuild/linux-s390x": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.3.tgz", + "integrity": "sha512-LlmsbuBdm1/D66TJ3HW6URY8wO6IlYHf+ChOUz8SUAjVTuaisfuwCOAgcxo3Zsu3BZGxmI7yt//yGOxV+lHcEA==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "streams/node_modules/@esbuild/linux-x64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.3.tgz", + "integrity": "sha512-ogV0+GwEmvwg/8ZbsyfkYGaLACBQWDvO0Kkh8LKBGKj9Ru8VM39zssrnu9Sxn1wbapA2qNS6BiLdwJZGouyCwQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "streams/node_modules/@esbuild/netbsd-x64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.3.tgz", + "integrity": "sha512-o1jLNe4uzQv2DKXMlmEzf66Wd8MoIhLNO2nlQBHLtWyh2MitDG7sMpfCO3NTcoTMuqHjfufgUQDFRI5C+xsXQw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "streams/node_modules/@esbuild/openbsd-x64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.3.tgz", + "integrity": "sha512-AZJCnr5CZgZOdhouLcfRdnk9Zv6HbaBxjcyhq0StNcvAdVZJSKIdOiPB9az2zc06ywl0ePYJz60CjdKsQacp5Q==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "streams/node_modules/@esbuild/sunos-x64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.3.tgz", + "integrity": "sha512-Acsujgeqg9InR4glTRvLKGZ+1HMtDm94ehTIHKhJjFpgVzZG9/pIcWW/HA/DoMfEyXmANLDuDZ2sNrWcjq1lxw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "streams/node_modules/@esbuild/win32-arm64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.3.tgz", + "integrity": "sha512-FSrAfjVVy7TifFgYgliiJOyYynhQmqgPj15pzLyJk8BUsnlWNwP/IAy6GAiB1LqtoivowRgidZsfpoYLZH586A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "streams/node_modules/@esbuild/win32-ia32": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.3.tgz", + "integrity": "sha512-xTScXYi12xLOWZ/sc5RBmMN99BcXp/eEf7scUC0oeiRoiT5Vvo9AycuqCp+xdpDyAU+LkrCqEpUS9fCSZF8J3Q==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "streams/node_modules/@esbuild/win32-x64": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.3.tgz", + "integrity": "sha512-FbUN+0ZRXsypPyWE2IwIkVjDkDnJoMJARWOcFZn4KPPli+QnKqF0z1anvfaYe3ev5HFCpRDLLBDHyOALLppWHw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "streams/node_modules/@types/node": { + "version": "18.17.17", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.17.17.tgz", + "integrity": "sha512-cOxcXsQ2sxiwkykdJqvyFS+MLQPLvIdwh5l6gNg8qF6s+C7XSkEWOZjK+XhUZd+mYvHV/180g2cnCcIl4l06Pw==", + "dev": true + }, + "streams/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "streams/node_modules/esbuild": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.3.tgz", + "integrity": "sha512-UlJ1qUUA2jL2nNib1JTSkifQTcYTroFqRjwCFW4QYEKEsixXD5Tik9xML7zh2gTxkYTBKGHNH9y7txMwVyPbjw==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.19.3", + "@esbuild/android-arm64": "0.19.3", + "@esbuild/android-x64": "0.19.3", + "@esbuild/darwin-arm64": "0.19.3", + "@esbuild/darwin-x64": "0.19.3", + "@esbuild/freebsd-arm64": "0.19.3", + "@esbuild/freebsd-x64": "0.19.3", + "@esbuild/linux-arm": "0.19.3", + "@esbuild/linux-arm64": "0.19.3", + "@esbuild/linux-ia32": "0.19.3", + "@esbuild/linux-loong64": "0.19.3", + "@esbuild/linux-mips64el": "0.19.3", + "@esbuild/linux-ppc64": "0.19.3", + "@esbuild/linux-riscv64": "0.19.3", + "@esbuild/linux-s390x": "0.19.3", + "@esbuild/linux-x64": "0.19.3", + "@esbuild/netbsd-x64": "0.19.3", + "@esbuild/openbsd-x64": "0.19.3", + "@esbuild/sunos-x64": "0.19.3", + "@esbuild/win32-arm64": "0.19.3", + "@esbuild/win32-ia32": "0.19.3", + "@esbuild/win32-x64": "0.19.3" + } + }, + "tools": { + "dependencies": { + "cmd-ts": "0.13.0" + }, + "bin": { + "changelog": "src/__generated__/changelog.mjs" } } } diff --git a/package.json b/package.json index c5a5d3fe8..d1edad965 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,12 @@ { "name": "media-js", - "private": true, "description": "Media libraries for Node and the Web.", + "private": true, + "version": "12.2.0", + "repository": { + "type": "git", + "url": "https://github.com/AxisCommunications/media-stream-library-js" + }, "workspaces": [ "example-overlay-react", "example-player-react", @@ -10,7 +15,8 @@ "example-streams-web", "overlay", "player", - "streams" + "streams", + "tools" ], "devDependencies": { "@typescript-eslint/eslint-plugin": "5.62.0", @@ -20,6 +26,7 @@ "cypress": "12.17.4", "dpdm": "3.14.0", "dprint": "0.41.0", + "esbuild": "0.17.19", "eslint": "8.49.0", "eslint-plugin-deprecation": "1.5.0", "eslint-plugin-node": "11.1.0", diff --git a/player/esbuild.mjs b/player/esbuild.mjs index d8f2f4c68..2d0fc22b4 100755 --- a/player/esbuild.mjs +++ b/player/esbuild.mjs @@ -1,6 +1,6 @@ #!/usr/bin/env node -import { existsSync, mkdirSync } from 'fs' -import { join } from 'path' +import { existsSync, mkdirSync } from 'node:fs' +import { join } from 'node:path' import { buildSync } from 'esbuild' diff --git a/player/package.json b/player/package.json index d5397ca8e..b6a2d2a28 100644 --- a/player/package.json +++ b/player/package.json @@ -53,7 +53,7 @@ "chalk": "5.3.0", "esbuild": "0.19.3", "luxon": "3.4.3", - "media-stream-library": "12.2.0", + "media-stream-library": "file:../streams", "react": "18.2.0", "react-dom": "18.2.0", "react-is": "18.2.0", diff --git a/scripts/changelog.mjs b/scripts/changelog.mjs deleted file mode 100755 index f478ec0fb..000000000 --- a/scripts/changelog.mjs +++ /dev/null @@ -1,236 +0,0 @@ -#!/usr/bin/env node -import { execSync } from 'child_process' -import fs from 'fs' -import path from 'path' - -import { - binary, - boolean, - command, - flag, - option, - optional, - run, - string, -} from 'cmd-ts' -const ChangeLogHeader = `# Changelog - -All notable changes to this project will be documented in this file. -` -const GitHubCompareUrl = - 'https://github.com/AxisCommunications/media-stream-library-js/compare' -const GitHubCommitUrl = - 'https://github.com/AxisCommunications/media-stream-library-js/commit' -const GroupTitles = { - 'build': '\u{1F477} Build', - 'chore': '\u{1F6A7} Maintenance', - 'ci': '\u{1F6A6} Continous integration', - 'docs': '\u{1F4DD} Documentation', - 'feat': '\u2728 Features', - 'fix': '\u{1F41B} Bug fixes', - 'perf': '\u{1F3CE}\uFE0F Performance', - 'refactor': '\u267B\uFE0F Refactoring', - 'revert': '\u23EA\uFE0F Reverts', - 'style': '\u{1F484} Styling', - 'test': '\u{1F9EA} Test', -} -const GroupKeys = new Set(Object.keys(GroupTitles)) -const PackageJson = 'package.json' -const changelog = command({ - name: 'changelog', - description: `Generate a full or partial changelog. Outputs to stdout, -with an option to additionally write to a changelog file.`, - args: { - workspace: option({ - description: ` -Filter scope by workspace. In this case, the scope itself is not included in the output. -You can use this to only generate changelogs for a specific workspace, if you have -separate releases within the same monorepo for different workspaces. -`, - long: 'workspace', - type: optional(string), - }), - full: flag({ - defaultValue: () => false, - description: 'generate the entire changelog', - long: 'full', - short: 'f', - type: boolean, - }), - write: option({ - description: 'write (or update) a changelog file', - long: 'write', - short: 'w', - type: optional(string), - }), - }, - handler(args) { - const contents = args.full - ? generateChangelog(args.workspace) - : generateChangeset(args.workspace) - if (args.full) { - args.write !== void 0 - ? fs.writeFileSync(args.write, contents) - : process.stdout.write(contents) - } else { - args.write !== void 0 && updateChangelog(args.write, contents) - process.stdout.write(contents) - } - }, -}) -await run(binary(changelog), process.argv) -function generateChangeset(workspace) { - const packageJson = path.join(workspace ?? '.', PackageJson) - const toVersion = worktreeVersion(packageJson) - const fromVersion = committedVersion(packageJson) - return changeSetFromRange(fromVersion, toVersion, workspace, 'HEAD') -} -function generateChangelog(workspace) { - const packageJson = path.join(workspace ?? '.', PackageJson) - const outputChunks = [ChangeLogHeader] - let toRev = 'HEAD' - while (existingCommit(toRev)) { - const version = committedVersion(packageJson, toRev) - const parentRev = `${tagFromVersion(version, workspace)}~1` - if (!existingCommit(parentRev)) { - break - } - const previousVersion = committedVersion(packageJson, parentRev) - outputChunks.push( - changeSetFromRange(previousVersion, version, workspace) - ) - toRev = tagFromVersion(previousVersion, workspace) - } - return outputChunks.join('\n') -} -function updateChangelog(changelogPath, changeset) { - const oldChangelogChunks = fs.readFileSync(changelogPath).toString().split( - '\n' - ) - const startOfVersions = oldChangelogChunks.findIndex((chunk) => - chunk.startsWith('##') - ) - const newChangelogChunks = [ - ...oldChangelogChunks.slice(0, startOfVersions), - changeset, - ...oldChangelogChunks.slice(startOfVersions), - ] - const newChangelog = newChangelogChunks.join('\n') - fs.writeFileSync(changelogPath, newChangelog) -} -function changeSetFromRange(previousVersion, version, scope, rev) { - const outputChunks = [] - const prevTag = tagFromVersion(previousVersion, scope) - const tag = tagFromVersion(version, scope) - const date = rev !== void 0 - ? (/* @__PURE__ */ new Date()).toISOString() - : commitDate(tag) - outputChunks.push( - `## [${version}](${GitHubCompareUrl}/${prevTag}...${tag}) (${date}) -` - ) - const groups = {} - for (const [sha, msg] of gitLogFromRange(prevTag, rev ?? `${tag}~1`)) { - const cc = parseConventionalCommitMessage(msg) - if (scope !== void 0 && cc.scope !== scope) { - continue - } - if (groups[cc.group] === void 0) { - groups[cc.group] = [] - } - groups[cc.group].push([sha, cc]) - } - for (const group of GroupKeys) { - if (groups[group] === void 0) { - continue - } - outputChunks.push(` -### ${GroupTitles[group]} - -`) - for (const [sha, cc] of groups[group]) { - const scopePrefix = scope === void 0 && cc.scope !== void 0 - ? ` **${cc.scope}**:` - : '' - const breakingPrefix = cc.breaking ? ` **BREAKING**` : '' - const link = `([${shortSha(sha)}](${GitHubCommitUrl}/${sha}))` - outputChunks.push(` -${scopePrefix}${breakingPrefix} ${cc.title} ${link} -`) - } - } - return outputChunks.join('') -} -function parseConventionalCommitMessage(msg) { - try { - const match = msg.match(/^([^:!(]+)(?:\(([^)]+)\))?(!)?: (.*)$/) - if (match === null) { - throw new Error('no matches found') - } - const [_, group, scope, breaking, title] = match - return { - group, - scope, - breaking: breaking !== void 0, - title, - } - } catch { - process.stderr.write(`invalid conventional commit message: ${msg} -`) - } - return { - group: 'chore', - breaking: false, - title: msg, - } -} -function existingCommit(commit) { - try { - execSync(`git rev-parse -q --verify ${commit}`) - } catch { - return false - } - return true -} -function worktreeVersion(pkgPath) { - const { version } = JSON.parse(fs.readFileSync(pkgPath).toString()) - if (typeof version !== 'string') { - throw new Error(`no version in ${pkgPath}`) - } - return version -} -function committedVersion(pkgPath, commit = 'HEAD') { - const { version } = JSON.parse( - execSync(`git show ${commit}:${pkgPath}`).toString() - ) - if (typeof version !== 'string') { - throw new Error(`no version in ${commit}:${pkgPath}`) - } - return version -} -function tagFromVersion(version, scope) { - if (scope === void 0) { - return `v${version}` - } - return `${scope}-v${version}` -} -function gitLogFromRange(prev, curr = 'HEAD') { - try { - const logOut = execSync( - `git log --no-merges --date-order --format="%H%x09%s" ${prev}..${curr}` - ) - const lines = logOut.toString().trim().split('\n') - const shaMessagePairs = lines.map((line) => line.split(' ')) - return shaMessagePairs - } catch (err) { - console.warn( - `git log failed on range ${prev}..${curr}, one of those tags probably does not exist` - ) - return [] - } -} -function shortSha(sha) { - return execSync(`git log -1 --format=%h ${sha}`).toString().trim() -} -function commitDate(commit) { - return execSync(`git log -1 --format=%ci ${commit}`).toString().trim() -} diff --git a/scripts/ci-video-test.sh b/scripts/ci-video-test.sh index 63a9b059c..e0414448d 100755 --- a/scripts/ci-video-test.sh +++ b/scripts/ci-video-test.sh @@ -3,16 +3,6 @@ set -e CYPRESS_DOCKER_IMAGE=cypress/included:12.8.1 -#trap "kill 0" EXIT - -# echo -n "Starting RTSP WebSocket proxy..." -# node scripts/tcp-ws-proxy.cjs --rtspHost localhost:8554 >& tcp-ws-proxy.log & -# echo "done." - -# echo -n "Starting HTTP server with examples..." -# just serve example-streams-web >& http-server.log & -# echo "done." - echo -n "Starting RTSP/WebSocket proxy and example server..." just _run-example-streams-web >& example-streams-web.log & echo "done." diff --git a/scripts/tcp-ws-proxy.mjs b/scripts/tcp-ws-proxy.mjs deleted file mode 100755 index a3efaa3cb..000000000 --- a/scripts/tcp-ws-proxy.mjs +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env node -import { pipelines } from 'media-stream-library' - -import yargs from 'yargs' -import { hideBin } from 'yargs/helpers' - -const argv = yargs(hideBin(process.argv)) - .option('port', { - type: 'string', - description: 'websocket port (8854)', - default: '8854', - }) - .option('rtspHost', { type: 'string', description: 'RTSP host' }) - .parse() // Setup a new pipeline -;(function wrap() { - console.log(`WebSocket server at ws://localhost:${argv.port}`) - console.log(pipelines, pipelines.TcpWsProxyPipeline) - return new pipelines.TcpWsProxyPipeline({ - wsOptions: { host: '::', port: argv.port }, - rtspHost: argv.rtspHost, - }) -})() diff --git a/scripts/top-level-dir.mjs b/scripts/top-level-dir.mjs deleted file mode 100755 index 44d9c4208..000000000 --- a/scripts/top-level-dir.mjs +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env node - -// Determine the top-level directory relative to a project root, -// used to determine the workspace from an invocation directory. -// Example usage: -// node top-level-dir.mjs /home/user/project '.' => '' -// node top-level-dir.mjs /home/user/project /home/user/project/hello/there => hello -// node top-level-dir.mjs /home/user/project ./hello/there => hello -import { relative, sep } from 'path' - -function topLevelDir(root, pathname) { - const relativeInvocationDir = relative(root, pathname) - const topDir = relativeInvocationDir.split(sep)[0] - return topDir -} - -const dir = topLevelDir(process.argv[2], process.argv[3]) -console.log(dir) diff --git a/scripts/workspaces.mjs b/scripts/workspaces.mjs deleted file mode 100755 index 3878efb44..000000000 --- a/scripts/workspaces.mjs +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env node -import { readFileSync } from 'fs' - -function workspacesFromPackage(packageJsonPath) { - const contents = JSON.parse(readFileSync(packageJsonPath)) - return contents.workspaces.packages -} - -const workspaces = workspacesFromPackage(process.argv[2]) -console.log(workspaces.join(' ')) diff --git a/streams/esbuild.mjs b/streams/esbuild.mjs index a929c990b..4235dcc61 100755 --- a/streams/esbuild.mjs +++ b/streams/esbuild.mjs @@ -1,6 +1,6 @@ #!/usr/bin/env node -import { existsSync, mkdirSync } from 'fs' -import { join } from 'path' +import { existsSync, mkdirSync } from 'node:fs' +import { join } from 'node:path' import { buildSync } from 'esbuild' diff --git a/streams/src/components/replayer/index.ts b/streams/src/components/replayer/index.ts index bb5eb9122..2764fcc8f 100644 --- a/streams/src/components/replayer/index.ts +++ b/streams/src/components/replayer/index.ts @@ -1,5 +1,5 @@ -import { readFileSync } from 'fs' -import { join } from 'path' +import { readFileSync } from 'node:fs' +import { join } from 'node:path' import { Readable, Writable } from 'stream' diff --git a/streams/src/components/tcp/index.ts b/streams/src/components/tcp/index.ts index c0bebd440..50ee3e1a9 100644 --- a/streams/src/components/tcp/index.ts +++ b/streams/src/components/tcp/index.ts @@ -1,4 +1,4 @@ -import { connect, Socket } from 'net' +import { connect, Socket } from 'node:net' import { Readable, Writable } from 'stream' diff --git a/tools/CHANGELOG.md b/tools/CHANGELOG.md new file mode 100644 index 000000000..ef6a6dc94 --- /dev/null +++ b/tools/CHANGELOG.md @@ -0,0 +1,5 @@ +## [1.1.2](https://github.com/axteams-software/zeno-web/compare/8441e498d6933194cd16e038ca4007e050e053a0..41509cf37d3555a8bedc327765ff785a7bb82fac) (2023-07-10T08:52:40.748Z) + +### ๐Ÿ› Bug fixes + +- use correct registry (#1950) ([41509cf37](https://github.com/axteams-software/zeno-web/commit/41509cf37d3555a8bedc327765ff785a7bb82fac)) diff --git a/tools/package.json b/tools/package.json new file mode 100644 index 000000000..6713bc663 --- /dev/null +++ b/tools/package.json @@ -0,0 +1,11 @@ +{ + "name": "tools", + "private": true, + "type": "module", + "bin": { + "changelog": "src/__generated__/changelog.mjs" + }, + "dependencies": { + "cmd-ts": "0.13.0" + } +} diff --git a/tools/src/__generated__/changelog.mjs b/tools/src/__generated__/changelog.mjs new file mode 100755 index 000000000..65967b4da --- /dev/null +++ b/tools/src/__generated__/changelog.mjs @@ -0,0 +1,201 @@ +#!/usr/bin/env node + +// src/changelog/cli.ts +import fs from 'node:fs' +import { + binary, + command, + option, + optional, + positional, + run, + string, +} from 'cmd-ts' + +// src/changelog/git.ts +import { execSync } from 'node:child_process' +function sanitizeGitHubUrl(url) { + if (new URL(url).hostname !== 'github.com') { + throw new Error('not implemented: only GitHub repositories are supported') + } + return url.replace(/\.git$/, '') +} +var compareUrl = (url, range) => `${sanitizeGitHubUrl(url)}/compare/${range}` +var commitUrl = (url, commit) => `${sanitizeGitHubUrl(url)}/commit/${commit}` +function gitLogFromRange(range) { + try { + const logOut = execSync( + `git log --no-merges --date-order --format="%H%x09%s" ${range}` + ) + const lines = logOut.toString().trim().split('\n') + const shaMessagePairs = lines.map((line) => line.split(' ')) + return shaMessagePairs + } catch (err) { + console.warn( + `git log failed on range ${range}, one of those tags probably does not exist` + ) + return [] + } +} +function shortSha(sha) { + return execSync(`git log -1 --format=%h ${sha}`).toString().trim() +} + +// src/changelog/changeset.ts +var GroupTitles = { + 'build': '\u{1F477} Build', + 'chore': '\u{1F6A7} Maintenance', + 'ci': '\u{1F6A6} Continous integration', + 'docs': '\u{1F4DD} Documentation', + 'feat': '\u2728 Features', + 'fix': '\u{1F41B} Bug fixes', + 'perf': '\u{1F3CE}\uFE0F Performance', + 'refactor': '\u267B\uFE0F Refactoring', + 'revert': '\u23EA\uFE0F Reverts', + 'style': '\u{1F484} Styling', + 'test': '\u{1F9EA} Test', +} +var GroupKeys = new Set(Object.keys(GroupTitles)) +function changeset({ + date, + name, + range, + scope, + url, +}) { + return [ + changesetHeader({ date, name, range, url }), + changesetBody({ range, scope, url }), + ].join('') +} +function changesetHeader({ date, name, range, url }) { + if (url !== void 0) { + return `## [${name}](${compareUrl(url, range)}) (${date}) +` + } + return `## ${name} (${date}) +` +} +function changesetBody({ + range, + scope, + url, +}) { + const outputChunks = [] + const groups = {} + for (const [sha, msg] of gitLogFromRange(range)) { + const cc = parseConventionalCommitMessage(msg) + if (scope !== void 0 && cc.scope !== scope) { + continue + } + if (groups[cc.group] === void 0) { + groups[cc.group] = [] + } + groups[cc.group].push([sha, cc]) + } + for (const group of GroupKeys) { + if (groups[group] === void 0) { + continue + } + outputChunks.push(` +### ${GroupTitles[group]} + +`) + for (const [sha, cc] of groups[group]) { + const scopePrefix = scope === void 0 && cc.scope !== void 0 + ? ` **${cc.scope}**:` + : '' + const breakingPrefix = cc.breaking ? ` **BREAKING**` : '' + const link = url !== void 0 + ? `([${shortSha(sha)}](${commitUrl(url, sha)}))` + : `(${shortSha(sha)})` + outputChunks.push( + ` -${scopePrefix}${breakingPrefix} ${cc.title} ${link} +` + ) + } + } + return outputChunks.join('') +} +function parseConventionalCommitMessage(msg) { + try { + const match = msg.match(/^([^:!(]+)(?:\(([^)]+)\))?(!)?: (.*)$/) + if (match === null) { + throw new Error('no matches found') + } + const [_, group, scope, breaking, title] = match + return { + group, + scope, + breaking: breaking !== void 0, + title, + } + } catch { + process.stderr.write(`invalid conventional commit message: ${msg} +`) + } + return { + group: 'chore', + breaking: false, + title: msg, + } +} + +// src/changelog/cli.ts +var changesetCli = command({ + name: 'changelog', + description: `Generate a changelog for a range of commits.`, + args: { + name: positional({ + type: string, + description: 'name for the changes (used in header)', + displayName: 'name', + }), + range: positional({ + type: string, + description: 'range of the changes (git revision range)', + displayName: 'range', + }), + date: option({ + description: 'date of the changeset', + long: 'date', + short: 'd', + defaultValue: () => (/* @__PURE__ */ new Date()).toISOString(), + type: string, + }), + outfile: option({ + description: 'output file to write to', + long: 'outfile', + short: 'o', + type: optional(string), + }), + scope: option({ + description: + 'Only include conventional commits that match "...(): ..."', + long: 'scope', + short: 's', + type: optional(string), + }), + url: option({ + description: 'GitHub URL of the repository', + long: 'url', + short: 'u', + type: optional(string), + }), + }, + handler(args) { + const contents = changeset({ + date: args.date, + name: args.name, + range: args.range, + scope: args.scope, + url: args.url, + }) + if (args.outfile !== void 0) { + fs.writeFileSync(args.outfile, contents) + } else { + process.stdout.write(contents) + } + }, +}) +await run(binary(changesetCli), process.argv) diff --git a/tools/src/changelog/changeset.ts b/tools/src/changelog/changeset.ts new file mode 100644 index 000000000..fd1862b89 --- /dev/null +++ b/tools/src/changelog/changeset.ts @@ -0,0 +1,133 @@ +import { commitUrl, compareUrl, gitLogFromRange, shortSha } from './git' + +const GroupTitles = { + 'build': '๐Ÿ‘ท Build', + 'chore': '๐Ÿšง Maintenance', + 'ci': '๐Ÿšฆ Continous integration', + 'docs': '๐Ÿ“ Documentation', + 'feat': 'โœจ Features', + 'fix': '๐Ÿ› Bug fixes', + 'perf': '๐ŸŽ๏ธ Performance', + 'refactor': 'โ™ป๏ธ Refactoring', + 'revert': 'โช๏ธ Reverts', + 'style': '๐Ÿ’„ Styling', + 'test': '๐Ÿงช Test', +} as const +const GroupKeys = new Set(Object.keys(GroupTitles)) as ReadonlySet< + keyof typeof GroupTitles +> + +interface ChangesetArgs { + readonly date: string + readonly name: string + readonly range: string + readonly scope?: string + readonly url?: string +} +export function changeset({ + date, + name, + range, + scope, + url, +}: ChangesetArgs) { + return [ + changesetHeader({ date, name, range, url }), + changesetBody({ range, scope, url }), + ] + .join('') +} + +interface ChangesetHeaderArgs { + readonly date: string + readonly name: string + readonly range: string + readonly url?: string +} +function changesetHeader({ date, name, range, url }: ChangesetHeaderArgs) { + if (url !== undefined) { + return `## [${name}](${compareUrl(url, range)}) (${date})\n` + } + + return `## ${name} (${date})\n` +} + +interface ChangesetBodyArgs { + readonly range: string + readonly scope?: string + readonly url?: string +} +function changesetBody( + { + range, + scope, + url, + }: ChangesetBodyArgs +): string { + const outputChunks = [] + + const groups: Record> = {} + for (const [sha, msg] of gitLogFromRange(range)) { + const cc = parseConventionalCommitMessage(msg) + if (scope !== undefined && cc.scope !== scope) { + continue + } + if (groups[cc.group] === undefined) { + groups[cc.group] = [] + } + groups[cc.group].push([sha, cc]) + } + + for (const group of GroupKeys) { + if (groups[group] === undefined) { + continue + } + outputChunks.push(`\n### ${GroupTitles[group]}\n\n`) + for (const [sha, cc] of groups[group]) { + const scopePrefix = scope === undefined && cc.scope !== undefined + ? ` **${cc.scope}**:` + : '' + const breakingPrefix = cc.breaking ? ` **BREAKING**` : '' + const link = url !== undefined + ? `([${shortSha(sha)}](${commitUrl(url, sha)}))` + : `(${shortSha(sha)})` + outputChunks.push( + ` -${scopePrefix}${breakingPrefix} ${cc.title} ${link}\n` + ) + } + } + + return outputChunks.join('') +} + +// Conventional commits + +interface ConventionalCommit { + readonly group: string + readonly scope?: string + readonly breaking: boolean + readonly title: string +} + +function parseConventionalCommitMessage(msg: string): ConventionalCommit { + try { + const match = msg.match(/^([^:!(]+)(?:\(([^)]+)\))?(!)?: (.*)$/) + if (match === null) { + throw new Error('no matches found') + } + const [_, group, scope, breaking, title] = match + return { + group, + scope, + breaking: breaking !== undefined, + title, + } + } catch { + process.stderr.write(`invalid conventional commit message: ${msg}\n`) + } + return { + group: 'chore', + breaking: false, + title: msg, + } +} diff --git a/tools/src/changelog/cli.ts b/tools/src/changelog/cli.ts new file mode 100644 index 000000000..dd262d0aa --- /dev/null +++ b/tools/src/changelog/cli.ts @@ -0,0 +1,74 @@ +#!/usr/bin/env node +import fs from 'node:fs' + +import { + binary, + command, + option, + optional, + positional, + run, + string, +} from 'cmd-ts' + +import { changeset } from './changeset' + +const changesetCli = command({ + name: 'changelog', + description: `Generate a changelog for a range of commits.`, + args: { + name: positional({ + type: string, + description: 'name for the changes (used in header)', + displayName: 'name', + }), + range: positional({ + type: string, + description: 'range of the changes (git revision range)', + displayName: 'range', + }), + date: option({ + description: 'date of the changeset', + long: 'date', + short: 'd', + defaultValue: () => (new Date()).toISOString(), + type: string, + }), + outfile: option({ + description: 'output file to write to', + long: 'outfile', + short: 'o', + type: optional(string), + }), + scope: option({ + description: + 'Only include conventional commits that match "...(): ..."', + long: 'scope', + short: 's', + type: optional(string), + }), + url: option({ + description: 'GitHub URL of the repository', + long: 'url', + short: 'u', + type: optional(string), + }), + }, + + handler(args) { + const contents = changeset({ + date: args.date, + name: args.name, + range: args.range, + scope: args.scope, + url: args.url, + }) + if (args.outfile !== undefined) { + fs.writeFileSync(args.outfile, contents) + } else { + process.stdout.write(contents) + } + }, +}) + +await run(binary(changesetCli), process.argv) diff --git a/tools/src/changelog/git.ts b/tools/src/changelog/git.ts new file mode 100644 index 000000000..7739739fd --- /dev/null +++ b/tools/src/changelog/git.ts @@ -0,0 +1,32 @@ +import { execSync } from 'node:child_process' + +function sanitizeGitHubUrl(url: string) { + if ((new URL(url)).hostname !== 'github.com') { + throw new Error('not implemented: only GitHub repositories are supported') + } + return url.replace(/\.git$/, '') +} +export const compareUrl = (url: string, range: string) => + `${sanitizeGitHubUrl(url)}/compare/${range}` +export const commitUrl = (url: string, commit: string) => + `${sanitizeGitHubUrl(url)}/commit/${commit}` + +export function gitLogFromRange(range: string) { + try { + const logOut = execSync( + `git log --no-merges --date-order --format="%H%x09%s" ${range}` + ) + const lines = logOut.toString().trim().split('\n') + const shaMessagePairs = lines.map((line) => line.split('\t')) + return shaMessagePairs + } catch (err) { + console.warn( + `git log failed on range ${range}, one of those tags probably does not exist` + ) + return [] + } +} + +export function shortSha(sha: string) { + return execSync(`git log -1 --format=%h ${sha}`).toString().trim() +} diff --git a/tools/tsconfig.eslint.json b/tools/tsconfig.eslint.json new file mode 100644 index 000000000..452cbc274 --- /dev/null +++ b/tools/tsconfig.eslint.json @@ -0,0 +1,10 @@ +{ + "extends": "../tsconfig.base.json", + "compilerOptions": { + "allowJs": true + }, + "include": [ + "*.json", + ".eslintrc.cjs" + ] +} diff --git a/tools/tsconfig.json b/tools/tsconfig.json new file mode 100644 index 000000000..0f6809db0 --- /dev/null +++ b/tools/tsconfig.json @@ -0,0 +1,7 @@ +{ + "compilerOptions": { + "customConditions": ["node"] + }, + "extends": "../tsconfig.base.json", + "include": ["./src/**/*"] +}