mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-01 09:31:14 +03:00
Compare commits
4 Commits
4a60187ac1
...
ad98c31a14
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ad98c31a14 | ||
|
|
d982b3a782 | ||
|
|
d036061e3f | ||
|
|
551d3b0812 |
429
docs/package-lock.json
generated
429
docs/package-lock.json
generated
@ -11,7 +11,7 @@
|
||||
"@docusaurus/core": "^3.7.0",
|
||||
"@docusaurus/plugin-content-docs": "^3.7.0",
|
||||
"@docusaurus/preset-classic": "^3.7.0",
|
||||
"@docusaurus/theme-mermaid": "^3.7.0",
|
||||
"@docusaurus/theme-mermaid": "^3.10.1",
|
||||
"@inkeep/docusaurus": "^2.0.16",
|
||||
"@mdx-js/react": "^3.1.0",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
@ -4006,16 +4006,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@docusaurus/theme-mermaid": {
|
||||
"version": "3.9.2",
|
||||
"resolved": "https://registry.npmjs.org/@docusaurus/theme-mermaid/-/theme-mermaid-3.9.2.tgz",
|
||||
"integrity": "sha512-5vhShRDq/ntLzdInsQkTdoKWSzw8d1jB17sNPYhA/KvYYFXfuVEGHLM6nrf8MFbV8TruAHDG21Fn3W4lO8GaDw==",
|
||||
"version": "3.10.1",
|
||||
"resolved": "https://registry.npmjs.org/@docusaurus/theme-mermaid/-/theme-mermaid-3.10.1.tgz",
|
||||
"integrity": "sha512-2gxpmln8Pc4EN1oWzshQEx2HTs67jk14v7MmgqGs8ZU7Nm8oihg+fTouof2u4vN8DtB3Fln4cDJu4UprSX1S3Q==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@docusaurus/core": "3.9.2",
|
||||
"@docusaurus/module-type-aliases": "3.9.2",
|
||||
"@docusaurus/theme-common": "3.9.2",
|
||||
"@docusaurus/types": "3.9.2",
|
||||
"@docusaurus/utils-validation": "3.9.2",
|
||||
"@docusaurus/core": "3.10.1",
|
||||
"@docusaurus/module-type-aliases": "3.10.1",
|
||||
"@docusaurus/theme-common": "3.10.1",
|
||||
"@docusaurus/types": "3.10.1",
|
||||
"@docusaurus/utils-validation": "3.10.1",
|
||||
"mermaid": ">=11.6.0",
|
||||
"tslib": "^2.6.0"
|
||||
},
|
||||
@ -4033,6 +4033,382 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@docusaurus/theme-mermaid/node_modules/@docusaurus/babel": {
|
||||
"version": "3.10.1",
|
||||
"resolved": "https://registry.npmjs.org/@docusaurus/babel/-/babel-3.10.1.tgz",
|
||||
"integrity": "sha512-DZzFO1K3v/GoEt1fx1DiYHF4en+PuhtQf1AkQJa5zu3CoeKSpr5cpQRUlz3jr0m44wyzmSXu9bVpfir+N4+8bg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.25.9",
|
||||
"@babel/generator": "^7.25.9",
|
||||
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
||||
"@babel/plugin-transform-runtime": "^7.25.9",
|
||||
"@babel/preset-env": "^7.25.9",
|
||||
"@babel/preset-react": "^7.25.9",
|
||||
"@babel/preset-typescript": "^7.25.9",
|
||||
"@babel/runtime": "^7.25.9",
|
||||
"@babel/traverse": "^7.25.9",
|
||||
"@docusaurus/logger": "3.10.1",
|
||||
"@docusaurus/utils": "3.10.1",
|
||||
"babel-plugin-dynamic-import-node": "^2.3.3",
|
||||
"fs-extra": "^11.1.1",
|
||||
"tslib": "^2.6.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@docusaurus/theme-mermaid/node_modules/@docusaurus/bundler": {
|
||||
"version": "3.10.1",
|
||||
"resolved": "https://registry.npmjs.org/@docusaurus/bundler/-/bundler-3.10.1.tgz",
|
||||
"integrity": "sha512-HIqQPvbqnnQRe4NsBd1774KRarjXqS6wHsWELtyuSs1gCfvixJO2jUGH/OEBtr1Gvzpw+ze5CjGMvSJ8UE1KUw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.25.9",
|
||||
"@docusaurus/babel": "3.10.1",
|
||||
"@docusaurus/cssnano-preset": "3.10.1",
|
||||
"@docusaurus/logger": "3.10.1",
|
||||
"@docusaurus/types": "3.10.1",
|
||||
"@docusaurus/utils": "3.10.1",
|
||||
"babel-loader": "^9.2.1",
|
||||
"clean-css": "^5.3.3",
|
||||
"copy-webpack-plugin": "^11.0.0",
|
||||
"css-loader": "^6.11.0",
|
||||
"css-minimizer-webpack-plugin": "^5.0.1",
|
||||
"cssnano": "^6.1.2",
|
||||
"file-loader": "^6.2.0",
|
||||
"html-minifier-terser": "^7.2.0",
|
||||
"mini-css-extract-plugin": "^2.9.2",
|
||||
"null-loader": "^4.0.1",
|
||||
"postcss": "^8.5.4",
|
||||
"postcss-loader": "^7.3.4",
|
||||
"postcss-preset-env": "^10.2.1",
|
||||
"terser-webpack-plugin": "^5.3.9",
|
||||
"tslib": "^2.6.0",
|
||||
"url-loader": "^4.1.1",
|
||||
"webpack": "^5.95.0",
|
||||
"webpackbar": "^7.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@docusaurus/faster": "*"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@docusaurus/faster": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@docusaurus/theme-mermaid/node_modules/@docusaurus/core": {
|
||||
"version": "3.10.1",
|
||||
"resolved": "https://registry.npmjs.org/@docusaurus/core/-/core-3.10.1.tgz",
|
||||
"integrity": "sha512-3pf2fXXw0eVk8WnC3T4LIigRDupcpvngpKo9Vy7mYyBhuddc0klDUuZAIfzMoK6z05pdlk6EFC/vBSX43+1O5w==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@docusaurus/babel": "3.10.1",
|
||||
"@docusaurus/bundler": "3.10.1",
|
||||
"@docusaurus/logger": "3.10.1",
|
||||
"@docusaurus/mdx-loader": "3.10.1",
|
||||
"@docusaurus/utils": "3.10.1",
|
||||
"@docusaurus/utils-common": "3.10.1",
|
||||
"@docusaurus/utils-validation": "3.10.1",
|
||||
"boxen": "^6.2.1",
|
||||
"chalk": "^4.1.2",
|
||||
"chokidar": "^3.5.3",
|
||||
"cli-table3": "^0.6.3",
|
||||
"combine-promises": "^1.1.0",
|
||||
"commander": "^5.1.0",
|
||||
"core-js": "^3.31.1",
|
||||
"detect-port": "^1.5.1",
|
||||
"escape-html": "^1.0.3",
|
||||
"eta": "^2.2.0",
|
||||
"eval": "^0.1.8",
|
||||
"execa": "^5.1.1",
|
||||
"fs-extra": "^11.1.1",
|
||||
"html-tags": "^3.3.1",
|
||||
"html-webpack-plugin": "^5.6.0",
|
||||
"leven": "^3.1.0",
|
||||
"lodash": "^4.17.21",
|
||||
"open": "^8.4.0",
|
||||
"p-map": "^4.0.0",
|
||||
"prompts": "^2.4.2",
|
||||
"react-helmet-async": "npm:@slorber/react-helmet-async@1.3.0",
|
||||
"react-loadable": "npm:@docusaurus/react-loadable@6.0.0",
|
||||
"react-loadable-ssr-addon-v5-slorber": "^1.0.3",
|
||||
"react-router": "^5.3.4",
|
||||
"react-router-config": "^5.1.1",
|
||||
"react-router-dom": "^5.3.4",
|
||||
"semver": "^7.5.4",
|
||||
"serve-handler": "^6.1.7",
|
||||
"tinypool": "^1.0.2",
|
||||
"tslib": "^2.6.0",
|
||||
"update-notifier": "^6.0.2",
|
||||
"webpack": "^5.95.0",
|
||||
"webpack-bundle-analyzer": "^4.10.2",
|
||||
"webpack-dev-server": "^5.2.2",
|
||||
"webpack-merge": "^6.0.1"
|
||||
},
|
||||
"bin": {
|
||||
"docusaurus": "bin/docusaurus.mjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@docusaurus/faster": "*",
|
||||
"@mdx-js/react": "^3.0.0",
|
||||
"react": "^18.0.0 || ^19.0.0",
|
||||
"react-dom": "^18.0.0 || ^19.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@docusaurus/faster": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@docusaurus/theme-mermaid/node_modules/@docusaurus/cssnano-preset": {
|
||||
"version": "3.10.1",
|
||||
"resolved": "https://registry.npmjs.org/@docusaurus/cssnano-preset/-/cssnano-preset-3.10.1.tgz",
|
||||
"integrity": "sha512-eNfHGcTKCSq6xmcavAkX3RRclHaE2xRCMParlDXLdXVP01/a2e/jKXMj/0ULnLFQSNwwuI62L0Ge8J+nZsR7UQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"cssnano-preset-advanced": "^6.1.2",
|
||||
"postcss": "^8.5.4",
|
||||
"postcss-sort-media-queries": "^5.2.0",
|
||||
"tslib": "^2.6.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@docusaurus/theme-mermaid/node_modules/@docusaurus/logger": {
|
||||
"version": "3.10.1",
|
||||
"resolved": "https://registry.npmjs.org/@docusaurus/logger/-/logger-3.10.1.tgz",
|
||||
"integrity": "sha512-oPjNFnfJsRCkePVjkGrxWGq4MvJKRQT0r9jOP0eRBTZ7Wr9FAbzdP/Gjs0I2Ss6YRkPoEgygKG112OkE6skvJw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"chalk": "^4.1.2",
|
||||
"tslib": "^2.6.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@docusaurus/theme-mermaid/node_modules/@docusaurus/mdx-loader": {
|
||||
"version": "3.10.1",
|
||||
"resolved": "https://registry.npmjs.org/@docusaurus/mdx-loader/-/mdx-loader-3.10.1.tgz",
|
||||
"integrity": "sha512-GRmeb/wQ+iXRrFwcHBfgQhrJxGElgCsoTWZYDhccjsZVne1p8MK/EpQVIloXttz76TCe78kKD5AEG9n1xc1oxQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@docusaurus/logger": "3.10.1",
|
||||
"@docusaurus/utils": "3.10.1",
|
||||
"@docusaurus/utils-validation": "3.10.1",
|
||||
"@mdx-js/mdx": "^3.0.0",
|
||||
"@slorber/remark-comment": "^1.0.0",
|
||||
"escape-html": "^1.0.3",
|
||||
"estree-util-value-to-estree": "^3.0.1",
|
||||
"file-loader": "^6.2.0",
|
||||
"fs-extra": "^11.1.1",
|
||||
"image-size": "^2.0.2",
|
||||
"mdast-util-mdx": "^3.0.0",
|
||||
"mdast-util-to-string": "^4.0.0",
|
||||
"rehype-raw": "^7.0.0",
|
||||
"remark-directive": "^3.0.0",
|
||||
"remark-emoji": "^4.0.0",
|
||||
"remark-frontmatter": "^5.0.0",
|
||||
"remark-gfm": "^4.0.0",
|
||||
"stringify-object": "^3.3.0",
|
||||
"tslib": "^2.6.0",
|
||||
"unified": "^11.0.3",
|
||||
"unist-util-visit": "^5.0.0",
|
||||
"url-loader": "^4.1.1",
|
||||
"vfile": "^6.0.1",
|
||||
"webpack": "^5.88.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^18.0.0 || ^19.0.0",
|
||||
"react-dom": "^18.0.0 || ^19.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@docusaurus/theme-mermaid/node_modules/@docusaurus/module-type-aliases": {
|
||||
"version": "3.10.1",
|
||||
"resolved": "https://registry.npmjs.org/@docusaurus/module-type-aliases/-/module-type-aliases-3.10.1.tgz",
|
||||
"integrity": "sha512-YoOZKUdGlp8xSYhuAkGdSo5Ydkbq4V4eK3sD8v0a2hloxCWdQbNBhkc+Ko9QyjpESc0BYcIGM5iHVAy5hdFV6w==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@docusaurus/types": "3.10.1",
|
||||
"@types/history": "^4.7.11",
|
||||
"@types/react": "*",
|
||||
"@types/react-router-config": "*",
|
||||
"@types/react-router-dom": "*",
|
||||
"react-helmet-async": "npm:@slorber/react-helmet-async@1.3.0",
|
||||
"react-loadable": "npm:@docusaurus/react-loadable@6.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "*",
|
||||
"react-dom": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@docusaurus/theme-mermaid/node_modules/@docusaurus/theme-common": {
|
||||
"version": "3.10.1",
|
||||
"resolved": "https://registry.npmjs.org/@docusaurus/theme-common/-/theme-common-3.10.1.tgz",
|
||||
"integrity": "sha512-0YtmIeoNo1fIw65LO8+/1dPgmDV86UmhMkow37gzjytuiCSQm9xob6PJy0L4kuQEMTLfUOGvkXvZr7GPrHquMA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@docusaurus/mdx-loader": "3.10.1",
|
||||
"@docusaurus/module-type-aliases": "3.10.1",
|
||||
"@docusaurus/utils": "3.10.1",
|
||||
"@docusaurus/utils-common": "3.10.1",
|
||||
"@types/history": "^4.7.11",
|
||||
"@types/react": "*",
|
||||
"@types/react-router-config": "*",
|
||||
"clsx": "^2.0.0",
|
||||
"parse-numeric-range": "^1.3.0",
|
||||
"prism-react-renderer": "^2.3.0",
|
||||
"tslib": "^2.6.0",
|
||||
"utility-types": "^3.10.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@docusaurus/plugin-content-docs": "*",
|
||||
"react": "^18.0.0 || ^19.0.0",
|
||||
"react-dom": "^18.0.0 || ^19.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@docusaurus/theme-mermaid/node_modules/@docusaurus/types": {
|
||||
"version": "3.10.1",
|
||||
"resolved": "https://registry.npmjs.org/@docusaurus/types/-/types-3.10.1.tgz",
|
||||
"integrity": "sha512-XYMK8k1szDCFMw2V+Xyen0g7Kee1sP3dtFnl7vkGkZOkeAJ/oPDQPL8iz4HBKOo/cwU8QeV6onVjMqtP+tFzsw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@mdx-js/mdx": "^3.0.0",
|
||||
"@types/history": "^4.7.11",
|
||||
"@types/mdast": "^4.0.2",
|
||||
"@types/react": "*",
|
||||
"commander": "^5.1.0",
|
||||
"joi": "^17.9.2",
|
||||
"react-helmet-async": "npm:@slorber/react-helmet-async@1.3.0",
|
||||
"utility-types": "^3.10.0",
|
||||
"webpack": "^5.95.0",
|
||||
"webpack-merge": "^5.9.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^18.0.0 || ^19.0.0",
|
||||
"react-dom": "^18.0.0 || ^19.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@docusaurus/theme-mermaid/node_modules/@docusaurus/types/node_modules/webpack-merge": {
|
||||
"version": "5.10.0",
|
||||
"resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.10.0.tgz",
|
||||
"integrity": "sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"clone-deep": "^4.0.1",
|
||||
"flat": "^5.0.2",
|
||||
"wildcard": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@docusaurus/theme-mermaid/node_modules/@docusaurus/utils": {
|
||||
"version": "3.10.1",
|
||||
"resolved": "https://registry.npmjs.org/@docusaurus/utils/-/utils-3.10.1.tgz",
|
||||
"integrity": "sha512-3ojeJry9xBYdJO6qoyyzqeJFSJBVx2mXhyDzSdjwL2+URFQMf+h25gG38iswGImicK0ELjTd1EL2xzk8hf3QPw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@docusaurus/logger": "3.10.1",
|
||||
"@docusaurus/types": "3.10.1",
|
||||
"@docusaurus/utils-common": "3.10.1",
|
||||
"escape-string-regexp": "^4.0.0",
|
||||
"execa": "^5.1.1",
|
||||
"file-loader": "^6.2.0",
|
||||
"fs-extra": "^11.1.1",
|
||||
"github-slugger": "^1.5.0",
|
||||
"globby": "^11.1.0",
|
||||
"gray-matter": "^4.0.3",
|
||||
"jiti": "^1.20.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
"lodash": "^4.17.21",
|
||||
"micromatch": "^4.0.5",
|
||||
"p-queue": "^6.6.2",
|
||||
"prompts": "^2.4.2",
|
||||
"resolve-pathname": "^3.0.0",
|
||||
"tslib": "^2.6.0",
|
||||
"url-loader": "^4.1.1",
|
||||
"utility-types": "^3.10.0",
|
||||
"webpack": "^5.88.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@docusaurus/theme-mermaid/node_modules/@docusaurus/utils-common": {
|
||||
"version": "3.10.1",
|
||||
"resolved": "https://registry.npmjs.org/@docusaurus/utils-common/-/utils-common-3.10.1.tgz",
|
||||
"integrity": "sha512-5mFSgEADtnFxFH7RLw02QA5MpU5JVUCj0MPeIvi/aF4Fi45tQRIuTwXoXDqJ+1VfQJuYJGz3SI63wmGz4HvXzA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@docusaurus/types": "3.10.1",
|
||||
"tslib": "^2.6.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@docusaurus/theme-mermaid/node_modules/@docusaurus/utils-validation": {
|
||||
"version": "3.10.1",
|
||||
"resolved": "https://registry.npmjs.org/@docusaurus/utils-validation/-/utils-validation-3.10.1.tgz",
|
||||
"integrity": "sha512-cRv1X69jwaWv47waglllgZVWzeBFLhl53XT/XED/83BerVBTC5FTP8WTcVl8Z6sZOegDSwitu/wpCSPCDOT6lg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@docusaurus/logger": "3.10.1",
|
||||
"@docusaurus/utils": "3.10.1",
|
||||
"@docusaurus/utils-common": "3.10.1",
|
||||
"fs-extra": "^11.2.0",
|
||||
"joi": "^17.9.2",
|
||||
"js-yaml": "^4.1.0",
|
||||
"lodash": "^4.17.21",
|
||||
"tslib": "^2.6.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@docusaurus/theme-mermaid/node_modules/webpackbar": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/webpackbar/-/webpackbar-7.0.0.tgz",
|
||||
"integrity": "sha512-aS9soqSO2iCHgqHoCrj4LbfGQUboDCYJPSFOAchEK+9psIjNrfSWW4Y0YEz67MKURNvMmfo0ycOg9d/+OOf9/Q==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ansis": "^3.2.0",
|
||||
"consola": "^3.2.3",
|
||||
"pretty-time": "^1.1.0",
|
||||
"std-env": "^3.7.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.21.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@rspack/core": "*",
|
||||
"webpack": "3 || 4 || 5"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@rspack/core": {
|
||||
"optional": true
|
||||
},
|
||||
"webpack": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@docusaurus/theme-search-algolia": {
|
||||
"version": "3.9.2",
|
||||
"resolved": "https://registry.npmjs.org/@docusaurus/theme-search-algolia/-/theme-search-algolia-3.9.2.tgz",
|
||||
@ -6475,6 +6851,15 @@
|
||||
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/ansis": {
|
||||
"version": "3.17.0",
|
||||
"resolved": "https://registry.npmjs.org/ansis/-/ansis-3.17.0.tgz",
|
||||
"integrity": "sha512-0qWUglt9JEqLFr3w1I1pbrChn1grhaiAR2ocX1PP/flRmxgtwTzPFFFnfIlD6aMOLQZgSuCRlidD70lvx8yhzg==",
|
||||
"license": "ISC",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
}
|
||||
},
|
||||
"node_modules/any-promise": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz",
|
||||
@ -18818,9 +19203,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/react-loadable-ssr-addon-v5-slorber": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/react-loadable-ssr-addon-v5-slorber/-/react-loadable-ssr-addon-v5-slorber-1.0.1.tgz",
|
||||
"integrity": "sha512-lq3Lyw1lGku8zUEJPDxsNm1AfYHBrO9Y1+olAYwpUJ2IGFBskM0DMKok97A6LWUpHm+o7IvQBOWu9MLenp9Z+A==",
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/react-loadable-ssr-addon-v5-slorber/-/react-loadable-ssr-addon-v5-slorber-1.0.3.tgz",
|
||||
"integrity": "sha512-GXfh9VLwB5ERaCsU6RULh7tkemeX15aNh6wuMEBtfdyMa7fFG8TXrhXlx1SoEK2Ty/l6XIkzzYIQmyaWW3JgdQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.10.3"
|
||||
@ -20601,24 +20986,24 @@
|
||||
}
|
||||
},
|
||||
"node_modules/serve-handler": {
|
||||
"version": "6.1.6",
|
||||
"resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.6.tgz",
|
||||
"integrity": "sha512-x5RL9Y2p5+Sh3D38Fh9i/iQ5ZK+e4xuXRd/pGbM4D13tgo/MGwbttUk8emytcr1YYzBYs+apnUngBDFYfpjPuQ==",
|
||||
"version": "6.1.7",
|
||||
"resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.7.tgz",
|
||||
"integrity": "sha512-CinAq1xWb0vR3twAv9evEU8cNWkXCb9kd5ePAHUKJBkOsUpR1wt/CvGdeca7vqumL1U5cSaeVQ6zZMxiJ3yWsg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"bytes": "3.0.0",
|
||||
"content-disposition": "0.5.2",
|
||||
"mime-types": "2.1.18",
|
||||
"minimatch": "3.1.2",
|
||||
"minimatch": "3.1.5",
|
||||
"path-is-inside": "1.0.2",
|
||||
"path-to-regexp": "3.3.0",
|
||||
"range-parser": "1.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/serve-handler/node_modules/brace-expansion": {
|
||||
"version": "1.1.12",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
|
||||
"integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
|
||||
"version": "1.1.14",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz",
|
||||
"integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"balanced-match": "^1.0.0",
|
||||
@ -20647,9 +21032,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/serve-handler/node_modules/minimatch": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
||||
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
||||
"version": "3.1.5",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz",
|
||||
"integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
"@docusaurus/core": "^3.7.0",
|
||||
"@docusaurus/plugin-content-docs": "^3.7.0",
|
||||
"@docusaurus/preset-classic": "^3.7.0",
|
||||
"@docusaurus/theme-mermaid": "^3.7.0",
|
||||
"@docusaurus/theme-mermaid": "^3.10.1",
|
||||
"@inkeep/docusaurus": "^2.0.16",
|
||||
"@mdx-js/react": "^3.1.0",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
"""Preview apis."""
|
||||
|
||||
import bisect
|
||||
import logging
|
||||
import os
|
||||
import threading
|
||||
from datetime import datetime, timedelta, timezone
|
||||
|
||||
import pytz
|
||||
@ -133,6 +135,32 @@ def preview_hour(
|
||||
return preview_ts(camera_name, start_ts, end_ts, allowed_cameras)
|
||||
|
||||
|
||||
# cache one sorted listing of the shared preview_frames dir
|
||||
_preview_listing_lock = threading.Lock()
|
||||
_preview_listing_cache: tuple[float, list[str]] = (-1.0, [])
|
||||
|
||||
|
||||
def _get_preview_frame_listing(preview_dir: str) -> list[str]:
|
||||
"""Return the sorted preview_frames listing, cached until the dir changes."""
|
||||
global _preview_listing_cache
|
||||
|
||||
# mtime bumps when a frame is added or removed, invalidating the cache
|
||||
mtime = os.stat(preview_dir).st_mtime
|
||||
cached_mtime, files = _preview_listing_cache
|
||||
if mtime == cached_mtime:
|
||||
return files
|
||||
|
||||
with _preview_listing_lock:
|
||||
# another thread may have refreshed the cache while we waited
|
||||
cached_mtime, files = _preview_listing_cache
|
||||
if mtime == cached_mtime:
|
||||
return files
|
||||
|
||||
files = sorted(entry.name for entry in os.scandir(preview_dir))
|
||||
_preview_listing_cache = (mtime, files)
|
||||
return files
|
||||
|
||||
|
||||
@router.get(
|
||||
"/preview/{camera_name}/start/{start_ts}/end/{end_ts}/frames",
|
||||
response_model=PreviewFramesResponse,
|
||||
@ -149,23 +177,15 @@ def get_preview_frames_from_cache(camera_name: str, start_ts: float, end_ts: flo
|
||||
start_file = f"{file_start}{start_ts}.{PREVIEW_FRAME_TYPE}"
|
||||
end_file = f"{file_start}{end_ts}.{PREVIEW_FRAME_TYPE}"
|
||||
|
||||
camera_files = [
|
||||
entry.name
|
||||
for entry in os.scandir(preview_dir)
|
||||
if entry.name.startswith(file_start)
|
||||
files = _get_preview_frame_listing(preview_dir)
|
||||
|
||||
# a camera's frames form a contiguous slice of the sorted listing;
|
||||
# bisect locates it without scanning the whole directory
|
||||
left = bisect.bisect_left(files, start_file)
|
||||
right = bisect.bisect_right(files, end_file)
|
||||
selected_previews = [
|
||||
file for file in files[left:right] if file.startswith(file_start)
|
||||
]
|
||||
camera_files.sort()
|
||||
|
||||
selected_previews = []
|
||||
|
||||
for file in camera_files:
|
||||
if file < start_file:
|
||||
continue
|
||||
|
||||
if file > end_file:
|
||||
break
|
||||
|
||||
selected_previews.append(file)
|
||||
|
||||
return JSONResponse(
|
||||
content=selected_previews,
|
||||
|
||||
41
frigate/test/test_builtin.py
Normal file
41
frigate/test/test_builtin.py
Normal file
@ -0,0 +1,41 @@
|
||||
"""Tests for frigate.util.builtin helpers."""
|
||||
|
||||
import unittest
|
||||
from unittest.mock import patch
|
||||
|
||||
from frigate.util.builtin import EventsPerSecond
|
||||
|
||||
|
||||
class TestEventsPerSecond(unittest.TestCase):
|
||||
def test_eps_is_zero_before_any_events(self) -> None:
|
||||
eps = EventsPerSecond()
|
||||
with patch("frigate.util.builtin.time.monotonic", return_value=100.0):
|
||||
self.assertEqual(eps.eps(), 0.0)
|
||||
|
||||
def test_eps_counts_events_in_window(self) -> None:
|
||||
eps = EventsPerSecond(last_n_seconds=10)
|
||||
clock = [1000.0]
|
||||
with patch("frigate.util.builtin.time.monotonic", side_effect=lambda: clock[0]):
|
||||
eps.start()
|
||||
# one event per second for five seconds
|
||||
for _ in range(5):
|
||||
clock[0] += 1.0
|
||||
eps.update()
|
||||
# five events over the five seconds since start
|
||||
self.assertAlmostEqual(eps.eps(), 1.0)
|
||||
|
||||
def test_old_timestamps_expire_from_window(self) -> None:
|
||||
eps = EventsPerSecond(last_n_seconds=10)
|
||||
clock = [0.0]
|
||||
with patch("frigate.util.builtin.time.monotonic", side_effect=lambda: clock[0]):
|
||||
eps.start()
|
||||
for _ in range(10):
|
||||
clock[0] += 1.0
|
||||
eps.update()
|
||||
# jump well past the window so every timestamp ages out
|
||||
clock[0] += 100.0
|
||||
self.assertEqual(eps.eps(), 0.0)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
@ -2,7 +2,6 @@
|
||||
|
||||
import ast
|
||||
import copy
|
||||
import datetime
|
||||
import logging
|
||||
import math
|
||||
import multiprocessing.queues
|
||||
@ -10,7 +9,9 @@ import queue
|
||||
import re
|
||||
import shlex
|
||||
import struct
|
||||
import time
|
||||
import urllib.parse
|
||||
from collections import deque
|
||||
from collections.abc import Mapping
|
||||
from multiprocessing.managers import ValueProxy
|
||||
from pathlib import Path
|
||||
@ -32,23 +33,20 @@ class EventsPerSecond:
|
||||
self._start = None
|
||||
self._max_events = max_events
|
||||
self._last_n_seconds = last_n_seconds
|
||||
self._timestamps = []
|
||||
self._timestamps: deque[float] = deque(maxlen=max_events)
|
||||
|
||||
def start(self) -> None:
|
||||
self._start = datetime.datetime.now().timestamp()
|
||||
self._start = time.monotonic()
|
||||
|
||||
def update(self) -> None:
|
||||
now = datetime.datetime.now().timestamp()
|
||||
now = time.monotonic()
|
||||
if self._start is None:
|
||||
self._start = now
|
||||
self._timestamps.append(now)
|
||||
# truncate the list when it goes 100 over the max_size
|
||||
if len(self._timestamps) > self._max_events + 100:
|
||||
self._timestamps = self._timestamps[(1 - self._max_events) :]
|
||||
self.expire_timestamps(now)
|
||||
|
||||
def eps(self) -> float:
|
||||
now = datetime.datetime.now().timestamp()
|
||||
now = time.monotonic()
|
||||
if self._start is None:
|
||||
self._start = now
|
||||
# compute the (approximate) events in the last n seconds
|
||||
@ -63,7 +61,7 @@ class EventsPerSecond:
|
||||
def expire_timestamps(self, now: float) -> None:
|
||||
threshold = now - self._last_n_seconds
|
||||
while self._timestamps and self._timestamps[0] < threshold:
|
||||
del self._timestamps[0]
|
||||
self._timestamps.popleft()
|
||||
|
||||
|
||||
class InferenceSpeed:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user