feat: Major updates to backend structure and security enhancements
- Removed `COMMON_ERRORS.md` file to streamline documentation. - Added `Flask-Limiter` for rate limiting and `redis` for session management in `requirements.txt`. - Expanded `ROADMAP.md` to include completed security features and planned enhancements for version 2.2. - Enhanced `setup_myp.sh` for ultra-secure kiosk installation, including system hardening and security configurations. - Updated `app.py` to integrate CSRF protection and improved logging setup. - Refactored user model to include username and active status for better user management. - Improved job scheduler with uptime tracking and task management features. - Updated various templates for a more cohesive user interface and experience.
This commit is contained in:
13
backend/app/node_modules/yaml/LICENSE
generated
vendored
Normal file
13
backend/app/node_modules/yaml/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
Copyright Eemeli Aro <eemeli@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any purpose
|
||||
with or without fee is hereby granted, provided that the above copyright notice
|
||||
and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
||||
THIS SOFTWARE.
|
190
backend/app/node_modules/yaml/README.md
generated
vendored
Normal file
190
backend/app/node_modules/yaml/README.md
generated
vendored
Normal file
@@ -0,0 +1,190 @@
|
||||
# YAML <a href="https://www.npmjs.com/package/yaml"><img align="right" src="https://badge.fury.io/js/yaml.svg" title="npm package" /></a>
|
||||
|
||||
`yaml` is a definitive library for [YAML](https://yaml.org/), the human friendly data serialization standard.
|
||||
This library:
|
||||
|
||||
- Supports both YAML 1.1 and YAML 1.2 and all common data schemas,
|
||||
- Passes all of the [yaml-test-suite](https://github.com/yaml/yaml-test-suite) tests,
|
||||
- Can accept any string as input without throwing, parsing as much YAML out of it as it can, and
|
||||
- Supports parsing, modifying, and writing YAML comments and blank lines.
|
||||
|
||||
The library is released under the ISC open source license, and the code is [available on GitHub](https://github.com/eemeli/yaml/).
|
||||
It has no external dependencies and runs on Node.js as well as modern browsers.
|
||||
|
||||
For the purposes of versioning, any changes that break any of the documented endpoints or APIs will be considered semver-major breaking changes.
|
||||
Undocumented library internals may change between minor versions, and previous APIs may be deprecated (but not removed).
|
||||
|
||||
The minimum supported TypeScript version of the included typings is 3.9;
|
||||
for use in earlier versions you may need to set `skipLibCheck: true` in your config.
|
||||
This requirement may be updated between minor versions of the library.
|
||||
|
||||
For more information, see the project's documentation site: [**eemeli.org/yaml**](https://eemeli.org/yaml/)
|
||||
|
||||
To install:
|
||||
|
||||
```sh
|
||||
npm install yaml
|
||||
# or
|
||||
deno add jsr:@eemeli/yaml
|
||||
```
|
||||
|
||||
**Note:** These docs are for `yaml@2`. For v1, see the [v1.10.0 tag](https://github.com/eemeli/yaml/tree/v1.10.0) for the source and [eemeli.org/yaml/v1](https://eemeli.org/yaml/v1/) for the documentation.
|
||||
|
||||
The development and maintenance of this library is [sponsored](https://github.com/sponsors/eemeli) by:
|
||||
|
||||
<p align="center" width="100%">
|
||||
<a href="https://www.scipress.io/"
|
||||
><img
|
||||
width="150"
|
||||
align="top"
|
||||
src="https://eemeli.org/yaml/images/scipress.svg"
|
||||
alt="Scipress"
|
||||
/></a>
|
||||
|
||||
<a href="https://manifest.build/"
|
||||
><img
|
||||
width="150"
|
||||
align="top"
|
||||
src="https://eemeli.org/yaml/images/manifest.svg"
|
||||
alt="Manifest"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
## API Overview
|
||||
|
||||
The API provided by `yaml` has three layers, depending on how deep you need to go: [Parse & Stringify](https://eemeli.org/yaml/#parse-amp-stringify), [Documents](https://eemeli.org/yaml/#documents), and the underlying [Lexer/Parser/Composer](https://eemeli.org/yaml/#parsing-yaml).
|
||||
The first has the simplest API and "just works", the second gets you all the bells and whistles supported by the library along with a decent [AST](https://eemeli.org/yaml/#content-nodes), and the third lets you get progressively closer to YAML source, if that's your thing.
|
||||
|
||||
A [command-line tool](https://eemeli.org/yaml/#command-line-tool) is also included.
|
||||
|
||||
### Parse & Stringify
|
||||
|
||||
```js
|
||||
import { parse, stringify } from 'yaml'
|
||||
```
|
||||
|
||||
- [`parse(str, reviver?, options?): value`](https://eemeli.org/yaml/#yaml-parse)
|
||||
- [`stringify(value, replacer?, options?): string`](https://eemeli.org/yaml/#yaml-stringify)
|
||||
|
||||
### Documents
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```js
|
||||
import {
|
||||
Document,
|
||||
isDocument,
|
||||
parseAllDocuments,
|
||||
parseDocument
|
||||
} from 'yaml'
|
||||
```
|
||||
|
||||
- [`Document`](https://eemeli.org/yaml/#documents)
|
||||
- [`constructor(value, replacer?, options?)`](https://eemeli.org/yaml/#creating-documents)
|
||||
- [`#contents`](https://eemeli.org/yaml/#content-nodes)
|
||||
- [`#directives`](https://eemeli.org/yaml/#stream-directives)
|
||||
- [`#errors`](https://eemeli.org/yaml/#errors)
|
||||
- [`#warnings`](https://eemeli.org/yaml/#errors)
|
||||
- [`isDocument(foo): boolean`](https://eemeli.org/yaml/#identifying-node-types)
|
||||
- [`parseAllDocuments(str, options?): Document[]`](https://eemeli.org/yaml/#parsing-documents)
|
||||
- [`parseDocument(str, options?): Document`](https://eemeli.org/yaml/#parsing-documents)
|
||||
|
||||
### Content Nodes
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```js
|
||||
import {
|
||||
isAlias, isCollection, isMap, isNode,
|
||||
isPair, isScalar, isSeq, Scalar,
|
||||
visit, visitAsync, YAMLMap, YAMLSeq
|
||||
} from 'yaml'
|
||||
```
|
||||
|
||||
- [`isAlias(foo): boolean`](https://eemeli.org/yaml/#identifying-node-types)
|
||||
- [`isCollection(foo): boolean`](https://eemeli.org/yaml/#identifying-node-types)
|
||||
- [`isMap(foo): boolean`](https://eemeli.org/yaml/#identifying-node-types)
|
||||
- [`isNode(foo): boolean`](https://eemeli.org/yaml/#identifying-node-types)
|
||||
- [`isPair(foo): boolean`](https://eemeli.org/yaml/#identifying-node-types)
|
||||
- [`isScalar(foo): boolean`](https://eemeli.org/yaml/#identifying-node-types)
|
||||
- [`isSeq(foo): boolean`](https://eemeli.org/yaml/#identifying-node-types)
|
||||
- [`new Scalar(value)`](https://eemeli.org/yaml/#scalar-values)
|
||||
- [`new YAMLMap()`](https://eemeli.org/yaml/#collections)
|
||||
- [`new YAMLSeq()`](https://eemeli.org/yaml/#collections)
|
||||
- [`doc.createAlias(node, name?): Alias`](https://eemeli.org/yaml/#creating-nodes)
|
||||
- [`doc.createNode(value, options?): Node`](https://eemeli.org/yaml/#creating-nodes)
|
||||
- [`doc.createPair(key, value): Pair`](https://eemeli.org/yaml/#creating-nodes)
|
||||
- [`visit(node, visitor)`](https://eemeli.org/yaml/#finding-and-modifying-nodes)
|
||||
- [`visitAsync(node, visitor)`](https://eemeli.org/yaml/#finding-and-modifying-nodes)
|
||||
|
||||
### Parsing YAML
|
||||
|
||||
```js
|
||||
import { Composer, Lexer, Parser } from 'yaml'
|
||||
```
|
||||
|
||||
- [`new Lexer().lex(src)`](https://eemeli.org/yaml/#lexer)
|
||||
- [`new Parser(onNewLine?).parse(src)`](https://eemeli.org/yaml/#parser)
|
||||
- [`new Composer(options?).compose(tokens)`](https://eemeli.org/yaml/#composer)
|
||||
|
||||
## YAML.parse
|
||||
|
||||
```yaml
|
||||
# file.yml
|
||||
YAML:
|
||||
- A human-readable data serialization language
|
||||
- https://en.wikipedia.org/wiki/YAML
|
||||
yaml:
|
||||
- A complete JavaScript implementation
|
||||
- https://www.npmjs.com/package/yaml
|
||||
```
|
||||
|
||||
```js
|
||||
import fs from 'fs'
|
||||
import YAML from 'yaml'
|
||||
|
||||
YAML.parse('3.14159')
|
||||
// 3.14159
|
||||
|
||||
YAML.parse('[ true, false, maybe, null ]\n')
|
||||
// [ true, false, 'maybe', null ]
|
||||
|
||||
const file = fs.readFileSync('./file.yml', 'utf8')
|
||||
YAML.parse(file)
|
||||
// { YAML:
|
||||
// [ 'A human-readable data serialization language',
|
||||
// 'https://en.wikipedia.org/wiki/YAML' ],
|
||||
// yaml:
|
||||
// [ 'A complete JavaScript implementation',
|
||||
// 'https://www.npmjs.com/package/yaml' ] }
|
||||
```
|
||||
|
||||
## YAML.stringify
|
||||
|
||||
```js
|
||||
import YAML from 'yaml'
|
||||
|
||||
YAML.stringify(3.14159)
|
||||
// '3.14159\n'
|
||||
|
||||
YAML.stringify([true, false, 'maybe', null])
|
||||
// `- true
|
||||
// - false
|
||||
// - maybe
|
||||
// - null
|
||||
// `
|
||||
|
||||
YAML.stringify({ number: 3, plain: 'string', block: 'two\nlines\n' })
|
||||
// `number: 3
|
||||
// plain: string
|
||||
// block: |
|
||||
// two
|
||||
// lines
|
||||
// `
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Browser testing provided by:
|
||||
|
||||
<a href="https://www.browserstack.com/open-source">
|
||||
<img width=200 src="https://eemeli.org/yaml/images/browserstack.svg" alt="BrowserStack" />
|
||||
</a>
|
11
backend/app/node_modules/yaml/bin.mjs
generated
vendored
Executable file
11
backend/app/node_modules/yaml/bin.mjs
generated
vendored
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
import { UserError, cli, help } from './dist/cli.mjs'
|
||||
|
||||
cli(process.stdin, error => {
|
||||
if (error instanceof UserError) {
|
||||
if (error.code === UserError.ARGS) console.error(`${help}\n`)
|
||||
console.error(error.message)
|
||||
process.exitCode = error.code
|
||||
} else if (error) throw error
|
||||
})
|
5
backend/app/node_modules/yaml/browser/index.js
generated
vendored
Normal file
5
backend/app/node_modules/yaml/browser/index.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
// `export * as default from ...` fails on Webpack v4
|
||||
// https://github.com/eemeli/yaml/issues/228
|
||||
import * as YAML from './dist/index.js'
|
||||
export default YAML
|
||||
export * from './dist/index.js'
|
3
backend/app/node_modules/yaml/browser/package.json
generated
vendored
Normal file
3
backend/app/node_modules/yaml/browser/package.json
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
96
backend/app/node_modules/yaml/package.json
generated
vendored
Normal file
96
backend/app/node_modules/yaml/package.json
generated
vendored
Normal file
@@ -0,0 +1,96 @@
|
||||
{
|
||||
"name": "yaml",
|
||||
"version": "2.8.0",
|
||||
"license": "ISC",
|
||||
"author": "Eemeli Aro <eemeli@gmail.com>",
|
||||
"repository": "github:eemeli/yaml",
|
||||
"description": "JavaScript parser and stringifier for YAML",
|
||||
"keywords": [
|
||||
"YAML",
|
||||
"parser",
|
||||
"stringifier"
|
||||
],
|
||||
"homepage": "https://eemeli.org/yaml/",
|
||||
"files": [
|
||||
"browser/",
|
||||
"dist/",
|
||||
"util.js"
|
||||
],
|
||||
"type": "commonjs",
|
||||
"main": "./dist/index.js",
|
||||
"bin": "./bin.mjs",
|
||||
"browser": {
|
||||
"./dist/index.js": "./browser/index.js",
|
||||
"./dist/util.js": "./browser/dist/util.js",
|
||||
"./util.js": "./browser/dist/util.js"
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"node": "./dist/index.js",
|
||||
"default": "./browser/index.js"
|
||||
},
|
||||
"./package.json": "./package.json",
|
||||
"./util": {
|
||||
"types": "./dist/util.d.ts",
|
||||
"node": "./dist/util.js",
|
||||
"default": "./browser/dist/util.js"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"build": "npm run build:node && npm run build:browser",
|
||||
"build:browser": "rollup -c config/rollup.browser-config.mjs",
|
||||
"build:node": "rollup -c config/rollup.node-config.mjs",
|
||||
"clean": "git clean -fdxe node_modules",
|
||||
"lint": "eslint config/ src/",
|
||||
"prettier": "prettier --write .",
|
||||
"prestart": "rollup --sourcemap -c config/rollup.node-config.mjs",
|
||||
"start": "node --enable-source-maps -i -e 'YAML=require(\"./dist/index.js\");const{parse,parseDocument,parseAllDocuments}=YAML'",
|
||||
"test": "jest --config config/jest.config.js",
|
||||
"test:all": "npm test && npm run test:types && npm run test:dist && npm run test:dist:types",
|
||||
"test:browsers": "cd playground && npm test",
|
||||
"test:dist": "npm run build:node && jest --config config/jest.config.js",
|
||||
"test:dist:types": "tsc --allowJs --moduleResolution node --noEmit --target es5 dist/index.js",
|
||||
"test:types": "tsc --noEmit && tsc --noEmit -p tests/tsconfig.json",
|
||||
"docs:install": "cd docs-slate && bundle install",
|
||||
"predocs:deploy": "node docs/prepare-docs.mjs",
|
||||
"docs:deploy": "cd docs-slate && ./deploy.sh",
|
||||
"predocs": "node docs/prepare-docs.mjs",
|
||||
"docs": "cd docs-slate && bundle exec middleman server",
|
||||
"preversion": "npm test && npm run build",
|
||||
"prepublishOnly": "npm run clean && npm test && npm run build"
|
||||
},
|
||||
"browserslist": "defaults, not ie 11",
|
||||
"prettier": {
|
||||
"arrowParens": "avoid",
|
||||
"semi": false,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "none"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.12.10",
|
||||
"@babel/plugin-transform-typescript": "^7.12.17",
|
||||
"@babel/preset-env": "^7.12.11",
|
||||
"@eslint/js": "^9.9.1",
|
||||
"@rollup/plugin-babel": "^6.0.3",
|
||||
"@rollup/plugin-replace": "^5.0.2",
|
||||
"@rollup/plugin-typescript": "^12.1.1",
|
||||
"@types/jest": "^29.2.4",
|
||||
"@types/node": "^20.11.20",
|
||||
"babel-jest": "^29.0.1",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^9.9.1",
|
||||
"eslint-config-prettier": "^9.0.0",
|
||||
"fast-check": "^2.12.0",
|
||||
"jest": "^29.0.1",
|
||||
"jest-ts-webcompat-resolver": "^1.0.0",
|
||||
"prettier": "^3.0.2",
|
||||
"rollup": "^4.12.0",
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.7.2",
|
||||
"typescript-eslint": "^8.4.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 14.6"
|
||||
}
|
||||
}
|
2
backend/app/node_modules/yaml/util.js
generated
vendored
Normal file
2
backend/app/node_modules/yaml/util.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
// Re-exporter for Node.js < 12.16.0
|
||||
module.exports = require('./dist/util.js')
|
Reference in New Issue
Block a user