├── .editorconfig ├── .gitignore ├── .prettierrc ├── .vscode └── settings.json ├── LICENSE ├── README.md ├── client ├── .eslintrc.json ├── .gitignore ├── .pa11yci ├── README.md ├── angular.json ├── karma.conf.js ├── package-lock.json ├── package.json ├── src │ ├── app │ │ ├── app.component.css │ │ ├── app.component.html │ │ ├── app.component.spec.ts │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ ├── components │ │ │ ├── control-errors │ │ │ │ ├── control-errors.component.html │ │ │ │ ├── control-errors.component.scss │ │ │ │ ├── control-errors.component.spec.ts │ │ │ │ └── control-errors.component.ts │ │ │ └── signup-form │ │ │ │ ├── signup-form.component.html │ │ │ │ ├── signup-form.component.scss │ │ │ │ ├── signup-form.component.spec.ts │ │ │ │ └── signup-form.component.ts │ │ ├── directives │ │ │ ├── error-message.directive.spec.ts │ │ │ └── error-message.directive.ts │ │ ├── sass │ │ │ ├── functions.scss │ │ │ ├── mixins.scss │ │ │ └── variables.scss │ │ ├── services │ │ │ ├── signup.service.spec.ts │ │ │ └── signup.service.ts │ │ ├── spec-helpers │ │ │ ├── element.spec-helper.ts │ │ │ └── signup-data.spec-helper.ts │ │ └── util │ │ │ └── findFormControl.ts │ ├── assets │ │ └── .gitkeep │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── favicon.ico │ ├── index.html │ ├── main.ts │ ├── proxy.conf.json │ └── styles.scss ├── tsconfig.app.json ├── tsconfig.json └── tsconfig.spec.json └── server ├── README.md ├── index.js ├── package-lock.json └── package.json /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.{js,ts}] 12 | quote_type = single 13 | 14 | [*.md] 15 | max_line_length = off 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | 3 | # IDE - VSCode 4 | .vscode/* 5 | !.vscode/settings.json 6 | !.vscode/tasks.json 7 | !.vscode/launch.json 8 | !.vscode/extensions.json 9 | 10 | # System Files 11 | .DS_Store 12 | Thumbs.db 13 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "all", 3 | "printWidth": 90, 4 | "tabWidth": 2, 5 | "singleQuote": true, 6 | "arrowParens": "always" 7 | } 8 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.formatOnSave": true, 3 | "git.ignoreLimitWarning": true 4 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Angular Form testing 2 | 3 | 📖 This example is part of the **[free online book: Testing Angular – A Guide to Robust Angular Applications 4 | ](https://testing-angular.com/)**. 📖 5 | 6 | This is an example for testing complex Angular forms. 7 | 8 | - The front-end Angular application can be found in [client](client/). Run `npm install` and `npm start` to start the client. 9 | - The back-end Node.js application can be found in [server](server/). Run `npm install` and `npm start` to start the server. 10 | -------------------------------------------------------------------------------- /client/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "ignorePatterns": ["projects/**/*"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts"], 7 | "parserOptions": { 8 | "project": ["tsconfig.json"], 9 | "createDefaultProgram": true 10 | }, 11 | "extends": [ 12 | "plugin:@angular-eslint/recommended", 13 | "plugin:@angular-eslint/template/process-inline-templates" 14 | ], 15 | "rules": { 16 | "@angular-eslint/directive-selector": [ 17 | "error", 18 | { 19 | "type": "attribute", 20 | "prefix": "app", 21 | "style": "camelCase" 22 | } 23 | ], 24 | "@angular-eslint/component-selector": [ 25 | "error", 26 | { 27 | "type": "element", 28 | "prefix": "app", 29 | "style": "kebab-case" 30 | } 31 | ] 32 | } 33 | }, 34 | { 35 | "files": ["*.html"], 36 | "extends": ["plugin:@angular-eslint/template/recommended"], 37 | "rules": {} 38 | } 39 | ] 40 | } 41 | -------------------------------------------------------------------------------- /client/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | # Only exists if Bazel was run 8 | /bazel-out 9 | 10 | # dependencies 11 | /node_modules 12 | 13 | # profiling files 14 | chrome-profiler-events*.json 15 | speed-measure-plugin*.json 16 | 17 | # IDEs and editors 18 | /.idea 19 | .project 20 | .classpath 21 | .c9/ 22 | *.launch 23 | .settings/ 24 | *.sublime-workspace 25 | 26 | # IDE - VSCode 27 | .vscode/* 28 | !.vscode/settings.json 29 | !.vscode/tasks.json 30 | !.vscode/launch.json 31 | !.vscode/extensions.json 32 | .history/* 33 | 34 | # misc 35 | /.angular/cache 36 | /.sass-cache 37 | /connect.lock 38 | /coverage 39 | /libpeerconnection.log 40 | npm-debug.log 41 | yarn-error.log 42 | testem.log 43 | /typings 44 | 45 | # System Files 46 | .DS_Store 47 | Thumbs.db 48 | -------------------------------------------------------------------------------- /client/.pa11yci: -------------------------------------------------------------------------------- 1 | { 2 | "defaults": { 3 | "runner": [ 4 | "axe", 5 | "htmlcs" 6 | ] 7 | }, 8 | "urls": [ 9 | "http://localhost:4200" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /client/README.md: -------------------------------------------------------------------------------- 1 | # Angular form testing: Client 2 | 3 | ## Development server 4 | 5 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. 6 | 7 | ## Build 8 | 9 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build. 10 | 11 | ## Running unit tests 12 | 13 | Run `ng test` to execute the unit tests. 14 | 15 | ## Running accessibility tests 16 | 17 | Run `npm run a11y` to start a dev server and execute the accessibility tests. 18 | 19 | Run `npm run pa11y-ci` to run the accessibility tests against an already running dev server. 20 | 21 | ## Further help 22 | 23 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page. 24 | -------------------------------------------------------------------------------- /client/angular.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "version": 1, 4 | "newProjectRoot": "projects", 5 | "projects": { 6 | "form-testing": { 7 | "projectType": "application", 8 | "schematics": { 9 | "@schematics/angular:component": { 10 | "style": "scss" 11 | }, 12 | "@schematics/angular:application": { 13 | "strict": true 14 | } 15 | }, 16 | "root": "", 17 | "sourceRoot": "src", 18 | "prefix": "app", 19 | "architect": { 20 | "build": { 21 | "builder": "@angular-devkit/build-angular:browser", 22 | "options": { 23 | "outputPath": "dist/form-testing", 24 | "index": "src/index.html", 25 | "main": "src/main.ts", 26 | "polyfills": ["zone.js"], 27 | "tsConfig": "tsconfig.app.json", 28 | "assets": ["src/favicon.ico", "src/assets"], 29 | "styles": ["src/styles.scss"], 30 | "scripts": [] 31 | }, 32 | "configurations": { 33 | "production": { 34 | "budgets": [ 35 | { 36 | "type": "initial", 37 | "maximumWarning": "500kb", 38 | "maximumError": "1mb" 39 | }, 40 | { 41 | "type": "anyComponentStyle", 42 | "maximumWarning": "2kb", 43 | "maximumError": "4kb" 44 | } 45 | ], 46 | "fileReplacements": [ 47 | { 48 | "replace": "src/environments/environment.ts", 49 | "with": "src/environments/environment.prod.ts" 50 | } 51 | ], 52 | "outputHashing": "all" 53 | }, 54 | "development": { 55 | "buildOptimizer": false, 56 | "optimization": false, 57 | "vendorChunk": true, 58 | "extractLicenses": false, 59 | "sourceMap": true, 60 | "namedChunks": true 61 | } 62 | }, 63 | "defaultConfiguration": "production" 64 | }, 65 | "serve": { 66 | "builder": "@angular-devkit/build-angular:dev-server", 67 | "options": { 68 | "proxyConfig": "src/proxy.conf.json" 69 | }, 70 | "configurations": { 71 | "production": { 72 | "browserTarget": "form-testing:build:production" 73 | }, 74 | "development": { 75 | "browserTarget": "form-testing:build:development" 76 | } 77 | }, 78 | "defaultConfiguration": "development" 79 | }, 80 | "extract-i18n": { 81 | "builder": "@angular-devkit/build-angular:extract-i18n", 82 | "options": { 83 | "browserTarget": "form-testing:build" 84 | } 85 | }, 86 | "test": { 87 | "builder": "@angular-devkit/build-angular:karma", 88 | "options": { 89 | "polyfills": ["zone.js", "zone.js/testing"], 90 | "tsConfig": "tsconfig.spec.json", 91 | "karmaConfig": "karma.conf.js", 92 | "assets": ["src/favicon.ico", "src/assets"], 93 | "styles": ["src/styles.scss"], 94 | "scripts": [] 95 | } 96 | }, 97 | "lint": { 98 | "builder": "@angular-eslint/builder:lint", 99 | "options": { 100 | "lintFilePatterns": ["src/**/*.ts", "src/**/*.html"] 101 | } 102 | }, 103 | "deploy": { 104 | "builder": "angular-cli-ghpages:deploy", 105 | "options": {} 106 | } 107 | } 108 | } 109 | }, 110 | "cli": { 111 | "schematicCollections": ["@angular-eslint/schematics"] 112 | }, 113 | "schematics": { 114 | "@angular-eslint/schematics:application": { 115 | "setParserOptionsProject": true 116 | }, 117 | "@angular-eslint/schematics:library": { 118 | "setParserOptionsProject": true 119 | } 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /client/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | basePath: '', 7 | frameworks: ['jasmine', '@angular-devkit/build-angular'], 8 | plugins: [ 9 | require('karma-jasmine'), 10 | require('karma-chrome-launcher'), 11 | require('karma-jasmine-html-reporter'), 12 | require('karma-coverage'), 13 | require('@angular-devkit/build-angular/plugins/karma') 14 | ], 15 | client: { 16 | jasmine: { 17 | // you can add configuration options for Jasmine here 18 | // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html 19 | // for example, you can disable the random execution with `random: false` 20 | // or set a specific seed with `seed: 4321` 21 | failSpecWithNoExpectations: true, 22 | }, 23 | clearContext: false // leave Jasmine Spec Runner output visible in browser 24 | }, 25 | jasmineHtmlReporter: { 26 | suppressAll: true // removes the duplicated traces 27 | }, 28 | coverageReporter: { 29 | dir: require('path').join(__dirname, './coverage/form-testing'), 30 | subdir: '.', 31 | reporters: [ 32 | { type: 'html' }, 33 | { type: 'text-summary' } 34 | ] 35 | }, 36 | reporters: ['progress', 'kjhtml'], 37 | port: 9876, 38 | colors: true, 39 | logLevel: config.LOG_INFO, 40 | autoWatch: true, 41 | browsers: ['Chrome'], 42 | singleRun: false, 43 | restartOnFileChange: true 44 | }); 45 | }; 46 | -------------------------------------------------------------------------------- /client/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "form-testing", 3 | "version": "0.0.0", 4 | "scripts": { 5 | "ng": "ng", 6 | "start": "ng serve", 7 | "build": "ng build", 8 | "test": "ng test", 9 | "lint": "ng lint", 10 | "a11y": "start-server-and-test start http-get://localhost:4200/ pa11y-ci", 11 | "pa11y-ci": "pa11y-ci", 12 | "deploy": "ng deploy --base-href=/angular-form-testing/" 13 | }, 14 | "private": true, 15 | "license": "Unlicense", 16 | "author": "Mathias Schäfer (https://molily.de)", 17 | "dependencies": { 18 | "@angular/animations": "^15.1.2", 19 | "@angular/common": "^15.1.2", 20 | "@angular/compiler": "^15.1.2", 21 | "@angular/core": "^15.1.2", 22 | "@angular/forms": "^15.1.2", 23 | "@angular/platform-browser": "^15.1.2", 24 | "@angular/platform-browser-dynamic": "^15.1.2", 25 | "@angular/router": "^15.1.2", 26 | "rxjs": "~7.8.0", 27 | "tslib": "^2.5.0", 28 | "zone.js": "~0.12.0" 29 | }, 30 | "devDependencies": { 31 | "@angular-devkit/build-angular": "^15.1.3", 32 | "@angular-eslint/builder": "15.2.0", 33 | "@angular-eslint/eslint-plugin": "15.2.0", 34 | "@angular-eslint/eslint-plugin-template": "15.2.0", 35 | "@angular-eslint/schematics": "15.2.0", 36 | "@angular-eslint/template-parser": "15.2.0", 37 | "@angular/cli": "^15.1.3", 38 | "@angular/compiler-cli": "^15.1.2", 39 | "@types/jasmine": "~4.3.1", 40 | "@typescript-eslint/eslint-plugin": "^5.49.0", 41 | "@typescript-eslint/parser": "^5.49.0", 42 | "angular-cli-ghpages": "^1.0.5", 43 | "eslint": "^8.32.0", 44 | "jasmine-core": "~4.5.0", 45 | "jasmine-spec-reporter": "~7.0.0", 46 | "karma": "~6.4.1", 47 | "karma-chrome-launcher": "~3.1.1", 48 | "karma-coverage": "~2.2.0", 49 | "karma-jasmine": "~5.1.0", 50 | "karma-jasmine-html-reporter": "^2.0.0", 51 | "pa11y-ci": "^3.0.1", 52 | "start-server-and-test": "^1.15.3", 53 | "typescript": "~4.9.4" 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /client/src/app/app.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/molily/angular-form-testing/c0f1163ea4a7f19b4f6459c05bf3c8263baa4aef/client/src/app/app.component.css -------------------------------------------------------------------------------- /client/src/app/app.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | -------------------------------------------------------------------------------- /client/src/app/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { NO_ERRORS_SCHEMA } from '@angular/core'; 2 | import { TestBed } from '@angular/core/testing'; 3 | 4 | import { AppComponent } from './app.component'; 5 | import { findComponent } from './spec-helpers/element.spec-helper'; 6 | 7 | describe('AppComponent', () => { 8 | beforeEach(async () => { 9 | await TestBed.configureTestingModule({ 10 | declarations: [AppComponent], 11 | schemas: [NO_ERRORS_SCHEMA], 12 | }).compileComponents(); 13 | }); 14 | 15 | it('renders the sign-up form', () => { 16 | const fixture = TestBed.createComponent(AppComponent); 17 | expect(findComponent(fixture, 'app-signup-form')).toBeTruthy(); 18 | }); 19 | }); 20 | -------------------------------------------------------------------------------- /client/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html', 6 | styleUrls: ['./app.component.css'], 7 | }) 8 | export class AppComponent {} 9 | -------------------------------------------------------------------------------- /client/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { HttpClientModule } from '@angular/common/http'; 2 | import { NgModule } from '@angular/core'; 3 | import { ReactiveFormsModule } from '@angular/forms'; 4 | import { BrowserModule } from '@angular/platform-browser'; 5 | 6 | import { AppComponent } from './app.component'; 7 | import { ControlErrorsComponent } from './components/control-errors/control-errors.component'; 8 | import { SignupFormComponent } from './components/signup-form/signup-form.component'; 9 | import { ErrorMessageDirective } from './directives/error-message.directive'; 10 | 11 | @NgModule({ 12 | declarations: [ 13 | AppComponent, 14 | SignupFormComponent, 15 | ErrorMessageDirective, 16 | ControlErrorsComponent, 17 | ], 18 | imports: [BrowserModule, ReactiveFormsModule, HttpClientModule], 19 | providers: [], 20 | bootstrap: [AppComponent], 21 | }) 22 | export class AppModule {} 23 | -------------------------------------------------------------------------------- /client/src/app/components/control-errors/control-errors.component.html: -------------------------------------------------------------------------------- 1 | 14 | -------------------------------------------------------------------------------- /client/src/app/components/control-errors/control-errors.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/molily/angular-form-testing/c0f1163ea4a7f19b4f6459c05bf3c8263baa4aef/client/src/app/components/control-errors/control-errors.component.scss -------------------------------------------------------------------------------- /client/src/app/components/control-errors/control-errors.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { 2 | Component, 3 | Type, 4 | } from '@angular/core'; 5 | import { 6 | ComponentFixture, 7 | TestBed, 8 | } from '@angular/core/testing'; 9 | import { 10 | FormControl, 11 | FormGroup, 12 | ReactiveFormsModule, 13 | Validators, 14 | } from '@angular/forms'; 15 | 16 | import { 17 | dispatchFakeEvent, 18 | expectContent, 19 | findEl, 20 | setFieldElementValue, 21 | } from 'src/app/spec-helpers/element.spec-helper'; 22 | 23 | import { ControlErrorsComponent } from './control-errors.component'; 24 | 25 | describe('ControlErrorComponent', () => { 26 | let fixture: ComponentFixture; 27 | 28 | let input: HTMLInputElement; 29 | 30 | const setup = async (HostComponent: Type) => { 31 | await TestBed.configureTestingModule({ 32 | imports: [ReactiveFormsModule], 33 | declarations: [ControlErrorsComponent, HostComponent], 34 | }).compileComponents(); 35 | 36 | fixture = TestBed.createComponent(HostComponent); 37 | fixture.detectChanges(); 38 | 39 | input = findEl(fixture, 'input').nativeElement; 40 | }; 41 | 42 | describe('passing the control', () => { 43 | @Component({ 44 | template: ` 45 | 46 | 47 | 48 | required 49 | 50 | 51 | `, 52 | }) 53 | class HostComponent { 54 | public control = new FormControl('', Validators.required); 55 | } 56 | 57 | beforeEach(async () => { 58 | await setup(HostComponent); 59 | }); 60 | 61 | describe('valid control', () => { 62 | it('renders nothing', () => { 63 | setFieldElementValue(input, 'something'); 64 | fixture.detectChanges(); 65 | expectContent(fixture, ''); 66 | }); 67 | }); 68 | 69 | describe('invalid, pristine, untouched control', () => { 70 | it('renders nothing', () => { 71 | expectContent(fixture, ''); 72 | }); 73 | }); 74 | 75 | describe('invalid control, touched', () => { 76 | it('renders the template', () => { 77 | // Mark control as touched 78 | dispatchFakeEvent(input, 'blur'); 79 | fixture.detectChanges(); 80 | expectContent(fixture, '❗ required'); 81 | expect(findEl(fixture, 'control-error').attributes.role).toBe('alert'); 82 | }); 83 | }); 84 | 85 | describe('invalid control, dirty', () => { 86 | it('renders the template', () => { 87 | // Mark control as dirty 88 | dispatchFakeEvent(input, 'input'); 89 | fixture.detectChanges(); 90 | expectContent(fixture, '❗ required'); 91 | expect(findEl(fixture, 'control-error').attributes.role).toBe('alert'); 92 | }); 93 | }); 94 | }); 95 | 96 | describe('passing the control name', () => { 97 | @Component({ 98 | template: ` 99 |
100 | 101 | 102 | 103 | required 104 | 105 | 106 |
107 | `, 108 | }) 109 | class HostComponent { 110 | public control = new FormControl('', Validators.required); 111 | public form = new FormGroup({ control: this.control }); 112 | } 113 | 114 | beforeEach(async () => { 115 | await setup(HostComponent); 116 | }); 117 | 118 | describe('valid control', () => { 119 | it('renders nothing', () => { 120 | setFieldElementValue(input, 'something'); 121 | fixture.detectChanges(); 122 | expectContent(fixture, ''); 123 | }); 124 | }); 125 | 126 | describe('invalid, pristine, untouched control', () => { 127 | it('renders nothing', () => { 128 | expectContent(fixture, ''); 129 | }); 130 | }); 131 | 132 | describe('invalid control, touched', () => { 133 | it('renders the template', () => { 134 | // Mark control as touched 135 | input.dispatchEvent(new FocusEvent('blur')); 136 | fixture.detectChanges(); 137 | expectContent(fixture, '❗ required'); 138 | expect(findEl(fixture, 'control-error').attributes.role).toBe('alert'); 139 | }); 140 | }); 141 | 142 | describe('invalid control, dirty', () => { 143 | it('renders the template', () => { 144 | // Mark control as dirty 145 | input.dispatchEvent(new Event('input')); 146 | fixture.detectChanges(); 147 | expectContent(fixture, '❗ required'); 148 | expect(findEl(fixture, 'control-error').attributes.role).toBe('alert'); 149 | }); 150 | }); 151 | }); 152 | 153 | describe('without control', () => { 154 | @Component({ 155 | template: ` 156 | 157 | 158 | required 159 | 160 | 161 | `, 162 | }) 163 | class HostComponent {} 164 | 165 | it('throws an error', async () => { 166 | await TestBed.configureTestingModule({ 167 | imports: [ReactiveFormsModule], 168 | declarations: [ControlErrorsComponent, HostComponent], 169 | }).compileComponents(); 170 | 171 | fixture = TestBed.createComponent(HostComponent); 172 | 173 | expect(() => { 174 | fixture.detectChanges(); 175 | }).toThrow(); 176 | }); 177 | }); 178 | 179 | describe('without template', () => { 180 | @Component({ 181 | template: ` 182 | 183 | 184 | `, 185 | }) 186 | class HostComponent { 187 | public control = new FormControl('', Validators.required); 188 | } 189 | 190 | beforeEach(async () => { 191 | await setup(HostComponent); 192 | }); 193 | 194 | it('renders the wrapper element', () => { 195 | // Mark control as dirty 196 | input.dispatchEvent(new Event('input')); 197 | fixture.detectChanges(); 198 | expectContent(fixture, '❗ '); 199 | expect(findEl(fixture, 'control-error').attributes.role).toBe('alert'); 200 | }); 201 | }); 202 | }); 203 | -------------------------------------------------------------------------------- /client/src/app/components/control-errors/control-errors.component.ts: -------------------------------------------------------------------------------- 1 | import { 2 | Component, 3 | ContentChild, 4 | Input, 5 | OnDestroy, 6 | OnInit, 7 | Optional, 8 | TemplateRef, 9 | } from '@angular/core'; 10 | import { 11 | AbstractControl, 12 | ControlContainer, 13 | ValidationErrors, 14 | } from '@angular/forms'; 15 | 16 | import { Subscription } from 'rxjs'; 17 | import { startWith } from 'rxjs/operators'; 18 | import { findFormControl } from 'src/app/util/findFormControl'; 19 | 20 | interface TemplateContext { 21 | $implicit: ValidationErrors; 22 | } 23 | 24 | @Component({ 25 | selector: 'app-control-errors', 26 | templateUrl: './control-errors.component.html', 27 | styleUrls: ['./control-errors.component.scss'], 28 | }) 29 | export class ControlErrorsComponent implements OnInit, OnDestroy { 30 | @Input() 31 | public control?: AbstractControl; 32 | 33 | @Input() 34 | public controlName?: string; 35 | 36 | public internalControl?: AbstractControl; 37 | 38 | @ContentChild(TemplateRef) 39 | public template: TemplateRef | null = null; 40 | 41 | public templateContext: TemplateContext = { 42 | $implicit: {}, 43 | }; 44 | 45 | private subscription?: Subscription; 46 | 47 | constructor( 48 | @Optional() 49 | private controlContainer?: ControlContainer, 50 | ) {} 51 | 52 | public ngOnInit(): void { 53 | const control = findFormControl( 54 | this.control, 55 | this.controlName, 56 | this.controlContainer, 57 | ); 58 | this.internalControl = control; 59 | 60 | this.subscription = control.statusChanges.pipe(startWith('PENDING')).subscribe(() => { 61 | this.updateTemplateContext(); 62 | }); 63 | } 64 | 65 | private updateTemplateContext(): void { 66 | if (this.internalControl && this.internalControl.errors) { 67 | this.templateContext = { 68 | $implicit: this.internalControl.errors, 69 | }; 70 | } 71 | } 72 | 73 | public ngOnDestroy(): void { 74 | this.subscription?.unsubscribe(); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /client/src/app/components/signup-form/signup-form.component.html: -------------------------------------------------------------------------------- 1 |

Sign-up

2 | 3 |
4 |
5 | Choose your plan 6 | 7 | 8 |
9 |
    10 |
  • 11 | 27 |
  • 28 |
  • 29 | 45 |
  • 46 |
  • 47 | 66 |
  • 67 |
68 |
69 |
70 | 71 |
72 | Account basics 73 | 74 | 75 |
76 |

77 | 92 |

93 |
94 |

95 | User name may only contain letters (a-z), numbers (0-9) and periods (.). 96 | Example: beautiful.flower.2020 97 |

98 | 99 | 100 | 101 | User name must be given. 102 | 103 | 104 | User name contains invalid characters. 105 | 106 | 107 | User name must have less then 50 characters. 108 | 109 | 110 | User name is already taken. Please choose another one. 111 | 112 | 113 | 114 |
115 |
116 | 117 | 118 |
119 |
120 |

121 | 136 |

137 |
138 |
139 |

140 | Example: brigitte.bryan@example.org 141 |

142 | 143 | 144 | Email must be given. 145 | Not a valid email address. 146 | 147 | Email must have less then 100 characters. 148 | 149 | 150 | Email is already taken. Please choose another one. 151 | 152 | 153 | 154 |
155 |
156 | 157 | 158 |
159 |

160 | 177 |

178 |
179 |
180 |

181 | 189 | 190 | Your password is 191 | {{ showPassword ? 'shown' : 'hidden' }} 192 | 193 |

194 |
198 |

199 | Strength: 200 | 201 | Weak 202 | 203 | 204 | Fair 205 | 206 | 207 | Strong 208 | 209 |

210 |

{{ passwordStrength.warning }}

211 |

212 | {{ suggestion }} 213 |

214 |
215 |
216 | 217 | 218 | Password must be given. 219 | Password is too weak. 220 | 221 | 222 |
223 |
224 |
225 | 226 |
227 | Address 228 | 229 | 230 |
231 |

232 | 246 |

247 |
248 | 249 | 250 | Name must be given. 251 | 252 | 253 |
254 |
255 | 256 | 257 |
258 |

259 | 288 |

289 |
290 | 291 | 292 | 293 | 294 | Company must be given. 295 | 296 | 297 | Organization must be given. 298 | 299 | 300 | 301 | 302 |
303 |
304 | 305 | 306 |
307 |

308 | 322 |

323 |
324 | 325 | 326 | 327 | Street and house number must be given. 328 | 329 | 330 | 331 |
332 |
333 | 334 | 335 |
336 |

337 | 351 |

352 |
353 | 354 | 355 | City must be given. 356 | 357 | 358 |
359 |
360 | 361 | 362 |
363 |

364 | 378 |

379 |
380 | 381 | 382 | Postcode must be given. 383 | 384 | 385 |
386 |
387 | 388 | 389 |
390 |

391 | 404 |

405 |
406 | 407 | 408 |
409 |

410 | 431 |

432 |
433 | 434 | 435 | Country must be given. 436 | 437 | 438 |
439 |
440 |
441 | 442 | 443 | 444 |
445 | Terms and Services 446 | 447 |

448 | 473 |

474 | 475 | 476 | 477 | Please accept the Terms and Services. 478 | 479 | 480 | 481 |
482 | 483 | 484 | 485 |

Please fill in the necessary fields above.

486 | 487 |

493 | Sign-up successful! 494 |

495 |

501 | Sign-up error 502 |

503 | 504 |

505 | 513 |

514 |
515 | -------------------------------------------------------------------------------- /client/src/app/components/signup-form/signup-form.component.scss: -------------------------------------------------------------------------------- 1 | @use '../../sass/variables' as v; 2 | @use '../../sass/mixins' as m; 3 | 4 | fieldset { 5 | position: relative; 6 | border-style: solid none none; 7 | border-color: gray; 8 | border-width: 2px; 9 | border-radius: 2px; 10 | margin: 0 0 2rem; 11 | padding: 5rem 0 0; 12 | 13 | @media (min-width: 40rem) { 14 | padding-left: 2rem; 15 | padding-right: 2rem; 16 | } 17 | } 18 | 19 | legend { 20 | position: absolute; 21 | top: 1.5rem; 22 | font-size: 1.4rem; 23 | font-weight: bold; 24 | } 25 | 26 | .field-block { 27 | margin-bottom: 1.5rem; 28 | } 29 | 30 | label { 31 | display: block; 32 | font-weight: bold; 33 | } 34 | 35 | input[type='text'], 36 | input[type='number'], 37 | input[type='email'], 38 | input[type='password'], 39 | select, 40 | button[type='submit'] { 41 | width: 100%; 42 | } 43 | 44 | @media (min-width: 40rem) { 45 | .field-block { 46 | display: flex; 47 | } 48 | 49 | .field-and-label { 50 | margin-right: 2rem; 51 | margin-bottom: 0; 52 | flex: 0 0 20rem; 53 | } 54 | 55 | .field-info { 56 | padding-top: 1.2rem + 0.5rem; 57 | } 58 | 59 | .field-info-checkbox { 60 | padding-top: 0; 61 | } 62 | } 63 | 64 | .label-text { 65 | display: flex; 66 | justify-content: space-between; 67 | padding-bottom: 0.5rem; 68 | } 69 | 70 | .necessity-required, 71 | .necessity-optional { 72 | font-weight: normal; 73 | font-size: 80%; 74 | } 75 | 76 | .necessity-optional { 77 | color: #666; 78 | 79 | @include m.dark-scheme { 80 | color: #aaa; 81 | } 82 | } 83 | 84 | .checkbox-and-label-text { 85 | position: relative; 86 | display: flex; 87 | align-items: flex-start; 88 | } 89 | 90 | input[type='checkbox'] { 91 | margin: 0 1rem; 92 | } 93 | 94 | .checkbox-label-text { 95 | display: inline; 96 | font-weight: normal; 97 | } 98 | 99 | .plans { 100 | padding: 0; 101 | list-style-type: none; 102 | 103 | @media (min-width: 40rem) { 104 | display: flex; 105 | margin: 0 -0.5rem; 106 | } 107 | } 108 | 109 | .plan { 110 | text-align: center; 111 | 112 | @media (min-width: 40rem) { 113 | flex: 1; 114 | margin: 0 0.5rem; 115 | } 116 | } 117 | 118 | .plan + .plan { 119 | margin-top: 1rem; 120 | 121 | @media (min-width: 40rem) { 122 | margin-top: 0; 123 | } 124 | } 125 | 126 | .plan-label { 127 | height: 100%; 128 | } 129 | 130 | .plan-radio { 131 | position: absolute; 132 | left: 0; 133 | top: 0; 134 | height: 1px; 135 | width: 1px; 136 | overflow: hidden; 137 | clip: rect(1px, 1px, 1px, 1px); 138 | } 139 | 140 | .plan-card { 141 | display: flex; 142 | flex-direction: column; 143 | justify-content: center; 144 | border: 2px solid v.$field-border-light; 145 | border-radius: 2px; 146 | background-color: v.$field-background-light; 147 | padding: 1.5rem 1rem; 148 | height: 100%; 149 | transition-property: color, border-color, transform, background-color; 150 | transition-duration: 150ms; 151 | transition-timing-function: ease; 152 | transform: scale(0.965); 153 | 154 | @include m.dark-scheme { 155 | border-color: v.$field-border-dark; 156 | background-color: v.$field-background-dark; 157 | } 158 | } 159 | 160 | .plan-radio:checked + .plan-card { 161 | transform: scale(1); 162 | border-color: v.$field-border-selected-light; 163 | color: v.$field-text-selected-light; 164 | background-color: v.$field-background-selected-light; 165 | 166 | @include m.dark-scheme { 167 | border-color: v.$field-border-selected-dark; 168 | color: v.$field-text-selected-dark; 169 | background-color: v.$field-background-selected-dark; 170 | } 171 | } 172 | 173 | .plan-radio:focus + .plan-card { 174 | border-color: v.$primary-color; 175 | } 176 | 177 | .plan-name { 178 | font-size: 1.5rem; 179 | 180 | @media (min-width: 40rem) { 181 | font-size: 1.6rem; 182 | } 183 | } 184 | 185 | .plan-description { 186 | font-weight: normal; 187 | 188 | @media (min-width: 40rem) { 189 | font-size: 1.2rem; 190 | } 191 | 192 | &:last-child { 193 | margin-bottom: 0; 194 | } 195 | } 196 | 197 | .password-strength-weak { 198 | color: v.$error-color-light; 199 | 200 | @include m.dark-scheme { 201 | color: v.$error-color-dark; 202 | } 203 | } 204 | 205 | .password-strength-fair { 206 | color: orange; 207 | } 208 | 209 | .password-strength-strong { 210 | color: v.$success-color-light; 211 | 212 | @include m.dark-scheme { 213 | color: v.$success-color-dark; 214 | } 215 | } 216 | 217 | button[type='submit'] { 218 | width: 100%; 219 | font-size: 1.2rem; 220 | 221 | @media (min-width: 40rem) { 222 | max-width: 20rem; 223 | } 224 | } 225 | 226 | .form-submit-success, 227 | .form-submit-error { 228 | padding: 1rem; 229 | } 230 | 231 | .form-submit-success { 232 | background-color: palegreen; 233 | color: green; 234 | } 235 | 236 | .form-submit-error { 237 | background-color: blanchedalmond; 238 | } 239 | 240 | /* 241 | Hide and show content accessibly. The content is visually hidden, 242 | but assistive technologies like screen readers still read it. 243 | http://snook.ca/archives/html_and_css/hiding-content-for-accessibility 244 | */ 245 | .visually-hidden { 246 | position: absolute; 247 | width: 1px; 248 | height: 1px; 249 | margin: 0; 250 | padding: 0; 251 | overflow: hidden; 252 | clip: rect(0 0 0 0); 253 | border: 0; 254 | white-space: nowrap; 255 | } 256 | -------------------------------------------------------------------------------- /client/src/app/components/signup-form/signup-form.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { DebugElement } from '@angular/core'; 2 | import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing'; 3 | import { ReactiveFormsModule } from '@angular/forms'; 4 | import { of, throwError } from 'rxjs'; 5 | import { ErrorMessageDirective } from 'src/app/directives/error-message.directive'; 6 | import { PasswordStrength, SignupService } from 'src/app/services/signup.service'; 7 | import { 8 | click, 9 | dispatchFakeEvent, 10 | expectText, 11 | findEl, 12 | checkField, 13 | setFieldValue, 14 | } from 'src/app/spec-helpers/element.spec-helper'; 15 | import { 16 | addressLine1, 17 | addressLine2, 18 | city, 19 | country, 20 | email, 21 | name, 22 | password, 23 | postcode, 24 | region, 25 | signupData, 26 | username, 27 | } from 'src/app/spec-helpers/signup-data.spec-helper'; 28 | 29 | import { ControlErrorsComponent } from '../control-errors/control-errors.component'; 30 | import { SignupFormComponent } from './signup-form.component'; 31 | 32 | const requiredFields = [ 33 | 'username', 34 | 'email', 35 | 'name', 36 | 'addressLine2', 37 | 'city', 38 | 'postcode', 39 | 'country', 40 | 'tos', 41 | ]; 42 | 43 | const weakPassword: PasswordStrength = { 44 | score: 2, 45 | warning: 'too short', 46 | suggestions: ['try a longer password'], 47 | }; 48 | 49 | const strongPassword: PasswordStrength = { 50 | score: 4, 51 | warning: '', 52 | suggestions: [], 53 | }; 54 | 55 | describe('SignupFormComponent', () => { 56 | let fixture: ComponentFixture; 57 | let signupService: jasmine.SpyObj; 58 | 59 | const setup = async ( 60 | signupServiceReturnValues?: jasmine.SpyObjMethodNames, 61 | ) => { 62 | signupService = jasmine.createSpyObj('SignupService', { 63 | // Successful responses per default 64 | isUsernameTaken: of(false), 65 | isEmailTaken: of(false), 66 | getPasswordStrength: of(strongPassword), 67 | signup: of({ success: true }), 68 | // Overwrite with given return values 69 | ...signupServiceReturnValues, 70 | }); 71 | 72 | await TestBed.configureTestingModule({ 73 | imports: [ReactiveFormsModule], 74 | declarations: [SignupFormComponent, ControlErrorsComponent, ErrorMessageDirective], 75 | providers: [{ provide: SignupService, useValue: signupService }], 76 | }).compileComponents(); 77 | 78 | fixture = TestBed.createComponent(SignupFormComponent); 79 | fixture.detectChanges(); 80 | }; 81 | 82 | const fillForm = () => { 83 | setFieldValue(fixture, 'username', username); 84 | setFieldValue(fixture, 'email', email); 85 | setFieldValue(fixture, 'password', password); 86 | setFieldValue(fixture, 'name', name); 87 | setFieldValue(fixture, 'addressLine1', addressLine1); 88 | setFieldValue(fixture, 'addressLine2', addressLine2); 89 | setFieldValue(fixture, 'city', city); 90 | setFieldValue(fixture, 'postcode', postcode); 91 | setFieldValue(fixture, 'region', region); 92 | setFieldValue(fixture, 'country', country); 93 | checkField(fixture, 'tos', true); 94 | }; 95 | 96 | const markFieldAsTouched = (element: DebugElement) => { 97 | dispatchFakeEvent(element.nativeElement, 'blur'); 98 | }; 99 | 100 | it('submits the form successfully', fakeAsync(async () => { 101 | await setup(); 102 | 103 | fillForm(); 104 | fixture.detectChanges(); 105 | 106 | expect(findEl(fixture, 'submit').properties.disabled).toBe(true); 107 | 108 | // Wait for async validators 109 | tick(1000); 110 | fixture.detectChanges(); 111 | 112 | expect(findEl(fixture, 'submit').properties.disabled).toBe(false); 113 | 114 | findEl(fixture, 'form').triggerEventHandler('submit', {}); 115 | fixture.detectChanges(); 116 | 117 | expectText(fixture, 'status', 'Sign-up successful!'); 118 | 119 | expect(signupService.isUsernameTaken).toHaveBeenCalledWith(username); 120 | expect(signupService.isEmailTaken).toHaveBeenCalledWith(email); 121 | expect(signupService.getPasswordStrength).toHaveBeenCalledWith(password); 122 | expect(signupService.signup).toHaveBeenCalledWith(signupData); 123 | })); 124 | 125 | it('does not submit an invalid form', fakeAsync(async () => { 126 | await setup(); 127 | 128 | // Wait for async validators 129 | tick(1000); 130 | 131 | findEl(fixture, 'form').triggerEventHandler('submit', {}); 132 | 133 | expect(signupService.isUsernameTaken).not.toHaveBeenCalled(); 134 | expect(signupService.isEmailTaken).not.toHaveBeenCalled(); 135 | expect(signupService.getPasswordStrength).not.toHaveBeenCalled(); 136 | expect(signupService.signup).not.toHaveBeenCalled(); 137 | })); 138 | 139 | it('handles signup failure', fakeAsync(async () => { 140 | await setup({ 141 | // Let the API report a failure 142 | signup: throwError(new Error('Validation failed')), 143 | }); 144 | 145 | fillForm(); 146 | 147 | // Wait for async validators 148 | tick(1000); 149 | 150 | findEl(fixture, 'form').triggerEventHandler('submit', {}); 151 | fixture.detectChanges(); 152 | 153 | expectText(fixture, 'status', 'Sign-up error'); 154 | 155 | expect(signupService.isUsernameTaken).toHaveBeenCalledWith(username); 156 | expect(signupService.getPasswordStrength).toHaveBeenCalledWith(password); 157 | expect(signupService.signup).toHaveBeenCalledWith(signupData); 158 | })); 159 | 160 | it('marks fields as required', async () => { 161 | await setup(); 162 | 163 | // Mark required fields as touched 164 | requiredFields.forEach((testId) => { 165 | markFieldAsTouched(findEl(fixture, testId)); 166 | }); 167 | fixture.detectChanges(); 168 | 169 | requiredFields.forEach((testId) => { 170 | const el = findEl(fixture, testId); 171 | 172 | // Check aria-required attribute 173 | expect(el.attributes['aria-required']).toBe( 174 | 'true', 175 | `${testId} must be marked as aria-required`, 176 | ); 177 | 178 | // Check aria-errormessage attribute 179 | const errormessageId = el.attributes['aria-errormessage']; 180 | if (!errormessageId) { 181 | throw new Error(`Error message id for ${testId} not present`); 182 | } 183 | // Check element with error message 184 | const errormessageEl = document.getElementById(errormessageId); 185 | if (!errormessageEl) { 186 | throw new Error(`Error message element for ${testId} not found`); 187 | } 188 | if (errormessageId === 'tos-errors') { 189 | expect(errormessageEl.textContent).toContain( 190 | 'Please accept the Terms and Services', 191 | ); 192 | } else { 193 | expect(errormessageEl.textContent).toContain('must be given'); 194 | } 195 | }); 196 | }); 197 | 198 | it('fails if the username is taken', fakeAsync(async () => { 199 | await setup({ 200 | // Let the API return that the username is taken 201 | isUsernameTaken: of(true), 202 | }); 203 | 204 | fillForm(); 205 | 206 | // Wait for async validators 207 | tick(1000); 208 | fixture.detectChanges(); 209 | 210 | expect(findEl(fixture, 'submit').properties.disabled).toBe(true); 211 | 212 | findEl(fixture, 'form').triggerEventHandler('submit', {}); 213 | 214 | expect(signupService.isUsernameTaken).toHaveBeenCalledWith(username); 215 | expect(signupService.isEmailTaken).toHaveBeenCalledWith(email); 216 | expect(signupService.getPasswordStrength).toHaveBeenCalledWith(password); 217 | expect(signupService.signup).not.toHaveBeenCalled(); 218 | })); 219 | 220 | it('fails if the email is taken', fakeAsync(async () => { 221 | await setup({ 222 | // Let the API return that the email is taken 223 | isEmailTaken: of(true), 224 | }); 225 | 226 | fillForm(); 227 | 228 | // Wait for async validators 229 | tick(1000); 230 | fixture.detectChanges(); 231 | 232 | expect(findEl(fixture, 'submit').properties.disabled).toBe(true); 233 | 234 | findEl(fixture, 'form').triggerEventHandler('submit', {}); 235 | 236 | expect(signupService.isUsernameTaken).toHaveBeenCalledWith(username); 237 | expect(signupService.isEmailTaken).toHaveBeenCalledWith(email); 238 | expect(signupService.getPasswordStrength).toHaveBeenCalledWith(password); 239 | expect(signupService.signup).not.toHaveBeenCalled(); 240 | })); 241 | 242 | it('fails if the password is too weak', fakeAsync(async () => { 243 | await setup({ 244 | // Let the API return that the password is weak 245 | getPasswordStrength: of(weakPassword), 246 | }); 247 | 248 | fillForm(); 249 | 250 | // Wait for async validators 251 | tick(1000); 252 | fixture.detectChanges(); 253 | 254 | expect(findEl(fixture, 'submit').properties.disabled).toBe(true); 255 | 256 | findEl(fixture, 'form').triggerEventHandler('submit', {}); 257 | 258 | expect(signupService.isUsernameTaken).toHaveBeenCalledWith(username); 259 | expect(signupService.isEmailTaken).toHaveBeenCalledWith(email); 260 | expect(signupService.getPasswordStrength).toHaveBeenCalledWith(password); 261 | expect(signupService.signup).not.toHaveBeenCalled(); 262 | })); 263 | 264 | it('requires address line 1 for business and non-profit plans', async () => { 265 | await setup(); 266 | 267 | // Initial state (personal plan) 268 | const addressLine1El = findEl(fixture, 'addressLine1'); 269 | expect('ng-invalid' in addressLine1El.classes).toBe(false); 270 | expect('aria-required' in addressLine1El.attributes).toBe(false); 271 | 272 | // Change plan to business 273 | checkField(fixture, 'plan-business', true); 274 | fixture.detectChanges(); 275 | 276 | expect(addressLine1El.attributes['aria-required']).toBe('true'); 277 | expect(addressLine1El.classes['ng-invalid']).toBe(true); 278 | 279 | // Change plan to non-profit 280 | checkField(fixture, 'plan-non-profit', true); 281 | fixture.detectChanges(); 282 | 283 | expect(addressLine1El.attributes['aria-required']).toBe('true'); 284 | expect(addressLine1El.classes['ng-invalid']).toBe(true); 285 | }); 286 | 287 | it('toggles the password display', async () => { 288 | await setup(); 289 | 290 | setFieldValue(fixture, 'password', 'top secret'); 291 | const passwordEl = findEl(fixture, 'password'); 292 | expect(passwordEl.attributes.type).toBe('password'); 293 | 294 | click(fixture, 'show-password'); 295 | fixture.detectChanges(); 296 | 297 | expect(passwordEl.attributes.type).toBe('text'); 298 | 299 | click(fixture, 'show-password'); 300 | fixture.detectChanges(); 301 | 302 | expect(passwordEl.attributes.type).toBe('password'); 303 | }); 304 | }); 305 | -------------------------------------------------------------------------------- /client/src/app/components/signup-form/signup-form.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { 3 | AbstractControl, 4 | AsyncValidatorFn, 5 | FormGroup, 6 | NonNullableFormBuilder, 7 | Validators, 8 | } from '@angular/forms'; 9 | 10 | import { 11 | EMPTY, 12 | merge, 13 | Subject, 14 | timer, 15 | } from 'rxjs'; 16 | import { 17 | catchError, 18 | debounceTime, 19 | first, 20 | map, 21 | switchMap, 22 | } from 'rxjs/operators'; 23 | import { 24 | PasswordStrength, 25 | Plan, 26 | SignupService, 27 | } from 'src/app/services/signup.service'; 28 | 29 | const { email, maxLength, pattern, required, requiredTrue } = Validators; 30 | 31 | /** 32 | * Wait for this time before sending async validation requests to the server. 33 | */ 34 | const ASYNC_VALIDATION_DELAY = 1000; 35 | 36 | @Component({ 37 | selector: 'app-signup-form', 38 | templateUrl: './signup-form.component.html', 39 | styleUrls: ['./signup-form.component.scss'], 40 | }) 41 | export class SignupFormComponent { 42 | public PERSONAL: Plan = 'personal'; 43 | public BUSINESS: Plan = 'business'; 44 | public NON_PROFIT: Plan = 'non-profit'; 45 | 46 | private passwordSubject = new Subject(); 47 | private passwordStrengthFromServer$ = this.passwordSubject.pipe( 48 | debounceTime(ASYNC_VALIDATION_DELAY), 49 | switchMap((password) => 50 | this.signupService.getPasswordStrength(password).pipe(catchError(() => EMPTY)), 51 | ), 52 | ); 53 | public passwordStrength$ = merge( 54 | this.passwordSubject.pipe(map(() => null)), 55 | this.passwordStrengthFromServer$, 56 | ); 57 | 58 | public showPassword = false; 59 | 60 | public form = this.formBuilder.group({ 61 | plan: this.formBuilder.control('personal', required), 62 | username: [ 63 | '', 64 | [required, pattern('[a-zA-Z0-9.]+'), maxLength(50)], 65 | (control: AbstractControl) => this.validateUsername(control.value), 66 | ], 67 | email: [ 68 | '', 69 | [required, email, maxLength(100)], 70 | (control: AbstractControl) => this.validateEmail(control.value), 71 | ], 72 | password: ['', required, () => this.validatePassword()], 73 | tos: [false, requiredTrue], 74 | address: this.formBuilder.group({ 75 | name: ['', required], 76 | addressLine1: [''], 77 | addressLine2: ['', required], 78 | city: ['', required], 79 | postcode: ['', required], 80 | region: [''], 81 | country: ['', required], 82 | }), 83 | }); 84 | 85 | public plan = this.form.controls.plan; 86 | public addressLine1 = (this.form.controls.address as FormGroup).controls.addressLine1; 87 | 88 | public passwordStrength?: PasswordStrength; 89 | 90 | public submitProgress: 'idle' | 'success' | 'error' = 'idle'; 91 | 92 | constructor( 93 | private signupService: SignupService, 94 | private formBuilder: NonNullableFormBuilder, 95 | ) { 96 | this.plan.valueChanges.subscribe((plan) => { 97 | if (plan !== this.PERSONAL) { 98 | this.addressLine1.setValidators(required); 99 | } else { 100 | this.addressLine1.setValidators(null); 101 | } 102 | this.addressLine1.updateValueAndValidity(); 103 | }); 104 | } 105 | 106 | public getPasswordStrength(): void { 107 | const password = this.form.controls.password.value; 108 | if (password !== null) { 109 | this.passwordSubject.next(password); 110 | } 111 | } 112 | 113 | private validateUsername(username: string): ReturnType { 114 | return timer(ASYNC_VALIDATION_DELAY).pipe( 115 | switchMap(() => this.signupService.isUsernameTaken(username)), 116 | map((usernameTaken) => (usernameTaken ? { taken: true } : null)), 117 | ); 118 | } 119 | 120 | private validateEmail(username: string): ReturnType { 121 | return timer(ASYNC_VALIDATION_DELAY).pipe( 122 | switchMap(() => this.signupService.isEmailTaken(username)), 123 | map((emailTaken) => (emailTaken ? { taken: true } : null)), 124 | ); 125 | } 126 | 127 | private validatePassword(): ReturnType { 128 | return this.passwordStrength$.pipe( 129 | first((passwordStrength) => passwordStrength !== null), 130 | map((passwordStrength) => 131 | passwordStrength && passwordStrength.score < 3 ? { weak: true } : null, 132 | ), 133 | ); 134 | } 135 | 136 | public onSubmit(): void { 137 | if (!this.form.valid) return; 138 | this.signupService.signup(this.form.getRawValue()).subscribe({ 139 | complete: () => { 140 | this.submitProgress = 'success'; 141 | }, 142 | error: () => { 143 | this.submitProgress = 'error'; 144 | }, 145 | }); 146 | } 147 | } 148 | -------------------------------------------------------------------------------- /client/src/app/directives/error-message.directive.spec.ts: -------------------------------------------------------------------------------- 1 | import { 2 | Component, 3 | Type, 4 | } from '@angular/core'; 5 | import { 6 | ComponentFixture, 7 | TestBed, 8 | } from '@angular/core/testing'; 9 | import { 10 | FormControl, 11 | FormGroup, 12 | ReactiveFormsModule, 13 | Validators, 14 | } from '@angular/forms'; 15 | 16 | import { 17 | dispatchFakeEvent, 18 | findEl, 19 | setFieldElementValue, 20 | } from '../spec-helpers/element.spec-helper'; 21 | import { ErrorMessageDirective } from './error-message.directive'; 22 | 23 | describe('ErrorMessageDirective', () => { 24 | let fixture: ComponentFixture; 25 | 26 | let input: HTMLInputElement; 27 | 28 | const setup = async (HostComponent: Type) => { 29 | await TestBed.configureTestingModule({ 30 | imports: [ReactiveFormsModule], 31 | declarations: [ErrorMessageDirective, HostComponent], 32 | }).compileComponents(); 33 | 34 | fixture = TestBed.createComponent(HostComponent); 35 | fixture.detectChanges(); 36 | 37 | input = findEl(fixture, 'input').nativeElement; 38 | }; 39 | 40 | describe('passing the control', () => { 41 | @Component({ 42 | template: ` 43 | 44 | `, 45 | }) 46 | class HostComponent { 47 | public control = new FormControl('', Validators.required); 48 | } 49 | 50 | beforeEach(async () => { 51 | await setup(HostComponent); 52 | }); 53 | 54 | describe('valid control', () => { 55 | it('does nothing', () => { 56 | setFieldElementValue(input, 'something'); 57 | fixture.detectChanges(); 58 | expect(input.getAttribute('aria-invalid')).toBe(null); 59 | expect(input.getAttribute('aria-errormessage')).toBe(null); 60 | }); 61 | }); 62 | 63 | describe('invalid, pristine, untouched control', () => { 64 | it('does nothing', () => { 65 | expect(input.getAttribute('aria-invalid')).toBe(null); 66 | expect(input.getAttribute('aria-errormessage')).toBe(null); 67 | }); 68 | }); 69 | 70 | describe('invalid control, touched', () => { 71 | it('links the error message', () => { 72 | // Mark control as touched 73 | dispatchFakeEvent(input, 'blur'); 74 | fixture.detectChanges(); 75 | expect(input.getAttribute('aria-invalid')).toBe('true'); 76 | expect(input.getAttribute('aria-errormessage')).toBe('errors'); 77 | }); 78 | }); 79 | 80 | describe('invalid control, dirty', () => { 81 | it('links the error message', () => { 82 | // Mark control as dirty 83 | dispatchFakeEvent(input, 'input'); 84 | fixture.detectChanges(); 85 | expect(input.getAttribute('aria-invalid')).toBe('true'); 86 | expect(input.getAttribute('aria-errormessage')).toBe('errors'); 87 | }); 88 | }); 89 | }); 90 | 91 | describe('passing the control name', () => { 92 | @Component({ 93 | template: ` 94 |
95 | 96 |
97 | `, 98 | }) 99 | class HostComponent { 100 | public control = new FormControl('', Validators.required); 101 | public form = new FormGroup({ control: this.control }); 102 | } 103 | 104 | beforeEach(async () => { 105 | await setup(HostComponent); 106 | }); 107 | 108 | describe('valid control', () => { 109 | it('does nothing', () => { 110 | setFieldElementValue(input, 'something'); 111 | fixture.detectChanges(); 112 | expect(input.getAttribute('aria-invalid')).toBe(null); 113 | expect(input.getAttribute('aria-errormessage')).toBe(null); 114 | }); 115 | }); 116 | 117 | describe('invalid, pristine, untouched control', () => { 118 | it('does nothing', () => { 119 | expect(input.getAttribute('aria-invalid')).toBe(null); 120 | expect(input.getAttribute('aria-errormessage')).toBe(null); 121 | }); 122 | }); 123 | 124 | describe('invalid control, touched', () => { 125 | it('links the error message', () => { 126 | // Mark control as touched 127 | dispatchFakeEvent(input, 'blur'); 128 | fixture.detectChanges(); 129 | expect(input.getAttribute('aria-invalid')).toBe('true'); 130 | expect(input.getAttribute('aria-errormessage')).toBe('errors'); 131 | }); 132 | }); 133 | 134 | describe('invalid control, dirty', () => { 135 | it('links the error message', () => { 136 | // Mark control as dirty 137 | dispatchFakeEvent(input, 'input'); 138 | fixture.detectChanges(); 139 | expect(input.getAttribute('aria-invalid')).toBe('true'); 140 | expect(input.getAttribute('aria-errormessage')).toBe('errors'); 141 | }); 142 | }); 143 | }); 144 | 145 | describe('without control', () => { 146 | @Component({ 147 | template: ``, 148 | }) 149 | class HostComponent {} 150 | 151 | it('throws an error', async () => { 152 | await TestBed.configureTestingModule({ 153 | imports: [ReactiveFormsModule], 154 | declarations: [ErrorMessageDirective, HostComponent], 155 | }).compileComponents(); 156 | 157 | fixture = TestBed.createComponent(HostComponent); 158 | 159 | expect(() => { 160 | fixture.detectChanges(); 161 | }).toThrow(); 162 | }); 163 | }); 164 | }); 165 | -------------------------------------------------------------------------------- /client/src/app/directives/error-message.directive.ts: -------------------------------------------------------------------------------- 1 | import { Directive, HostBinding, Input, OnInit, Optional } from '@angular/core'; 2 | import { AbstractControl, ControlContainer } from '@angular/forms'; 3 | 4 | import { findFormControl } from '../util/findFormControl'; 5 | 6 | /** 7 | * Directive that sets the `aria-invalid` and `aria-errormessage` attributes 8 | * when the form control is invalid and touched or dirty. 9 | * 10 | * https://w3c.github.io/aria/#aria-invalid 11 | * https://w3c.github.io/aria/#aria-errormessage 12 | * 13 | * Expects that the element either has a `formControl` or `formControlName` input. 14 | * 15 | * Expects the id of the element that contains the error messages. 16 | * 17 | * Usage examples: 18 | * 19 | * 20 | * 21 | *
22 | */ 23 | @Directive({ 24 | selector: '[appErrorMessage]', 25 | }) 26 | export class ErrorMessageDirective implements OnInit { 27 | @HostBinding('attr.aria-invalid') 28 | get ariaInvalid(): true | null { 29 | return this.isActive() ? true : null; 30 | } 31 | 32 | @HostBinding('attr.aria-errormessage') 33 | get ariaErrormessage(): string | null { 34 | return this.isActive() && this.appErrorMessage ? this.appErrorMessage : null; 35 | } 36 | 37 | @Input() 38 | public appErrorMessage?: string; 39 | 40 | @Input() 41 | public formControl?: AbstractControl; 42 | 43 | @Input() 44 | public formControlName?: string; 45 | 46 | private control?: AbstractControl; 47 | 48 | constructor(@Optional() private controlContainer?: ControlContainer) {} 49 | 50 | public ngOnInit(): void { 51 | this.control = findFormControl( 52 | this.formControl, 53 | this.formControlName, 54 | this.controlContainer, 55 | ); 56 | } 57 | 58 | /** 59 | * Whether link to the errors is established. 60 | */ 61 | private isActive(): boolean { 62 | const { control } = this; 63 | return control !== undefined && control.invalid && (control.touched || control.dirty); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /client/src/app/sass/functions.scss: -------------------------------------------------------------------------------- 1 | /// Replace `$search` with `$replace` in `$string` 2 | /// https://css-tricks.com/snippets/sass/str-replace-function/ 3 | /// 4 | /// @author Hugo Giraudel 5 | /// @param {String} $string - Initial string 6 | /// @param {String} $search - Substring to replace 7 | /// @param {String} $replace ('') - New value 8 | /// @return {String} - Updated string 9 | @function str-replace($string, $search, $replace: '') { 10 | $index: str-index($string, $search); 11 | 12 | @if $index { 13 | @return str-slice($string, 1, $index - 1) + $replace + 14 | str-replace(str-slice($string, $index + str-length($search)), $search, $replace); 15 | } 16 | 17 | @return $string; 18 | } 19 | -------------------------------------------------------------------------------- /client/src/app/sass/mixins.scss: -------------------------------------------------------------------------------- 1 | @mixin dark-scheme { 2 | @media (prefers-color-scheme: dark) { 3 | @content; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /client/src/app/sass/variables.scss: -------------------------------------------------------------------------------- 1 | $background-color-light: #fdfdfd; 2 | $text-color-light: black; 3 | 4 | $background-color-dark: #202020; 5 | $text-color-dark: #fdfdfd; 6 | 7 | $primary-color: #1976d2; 8 | 9 | $field-border-light: #486684; 10 | $field-border-dark: #f0f0f0; 11 | 12 | $field-border-selected-light: #486684; 13 | $field-border-selected-dark: $field-border-dark; 14 | 15 | $field-background-light: #f5f5fa; 16 | $field-background-dark: #2a2a2a; 17 | 18 | $field-text-selected-light: $text-color-light; 19 | $field-background-selected-light: #eaeaff; 20 | $field-text-selected-dark: $field-background-dark; 21 | $field-background-selected-dark: #bababa; 22 | 23 | $success-color-light: green; 24 | $success-color-dark: chartreuse; 25 | 26 | $error-color-light: crimson; 27 | $error-color-dark: #f55; 28 | 29 | $focus-shadow: 0 0 2px 4px rgba($primary-color, 0.2); 30 | -------------------------------------------------------------------------------- /client/src/app/services/signup.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { HttpErrorResponse } from '@angular/common/http'; 2 | import { 3 | HttpClientTestingModule, 4 | HttpTestingController, 5 | } from '@angular/common/http/testing'; 6 | import { TestBed } from '@angular/core/testing'; 7 | 8 | import { signupData } from '../spec-helpers/signup-data.spec-helper'; 9 | import { PasswordStrength, SignupService } from './signup.service'; 10 | 11 | const username = 'minnie'; 12 | const email = 'minnie@mouse.net'; 13 | const password = 'abcdef'; 14 | 15 | const passwordStrength: PasswordStrength = { 16 | score: 2, 17 | warning: 'too short', 18 | suggestions: ['try a longer password'], 19 | }; 20 | 21 | describe('SignupService', () => { 22 | let service: SignupService; 23 | let controller: HttpTestingController; 24 | 25 | beforeEach(() => { 26 | TestBed.configureTestingModule({ 27 | imports: [HttpClientTestingModule], 28 | }); 29 | service = TestBed.inject(SignupService); 30 | controller = TestBed.inject(HttpTestingController); 31 | }); 32 | 33 | afterEach(() => { 34 | controller.verify(); 35 | }); 36 | 37 | it('checks if the username is taken', () => { 38 | let result: boolean | undefined; 39 | service.isUsernameTaken(username).subscribe((otherResult) => { 40 | result = otherResult; 41 | }); 42 | 43 | const request = controller.expectOne({ 44 | method: 'POST', 45 | url: 'http://localhost:4200/api/username-taken', 46 | }); 47 | expect(request.request.body).toEqual({ username }); 48 | request.flush({ usernameTaken: true }); 49 | 50 | expect(result).toBe(true); 51 | }); 52 | 53 | it('checks if the email is taken', () => { 54 | let result: boolean | undefined; 55 | service.isEmailTaken(email).subscribe((otherResult) => { 56 | result = otherResult; 57 | }); 58 | 59 | const request = controller.expectOne({ 60 | method: 'POST', 61 | url: 'http://localhost:4200/api/email-taken', 62 | }); 63 | expect(request.request.body).toEqual({ email }); 64 | request.flush({ emailTaken: true }); 65 | 66 | expect(result).toBe(true); 67 | }); 68 | 69 | it('gets the password strength', () => { 70 | let result: PasswordStrength | undefined; 71 | service.getPasswordStrength(password).subscribe((otherResult) => { 72 | result = otherResult; 73 | }); 74 | 75 | const request = controller.expectOne({ 76 | method: 'POST', 77 | url: 'http://localhost:4200/api/password-strength', 78 | }); 79 | expect(request.request.body).toEqual({ password }); 80 | request.flush(passwordStrength); 81 | 82 | expect(result).toBe(passwordStrength); 83 | }); 84 | 85 | it('signs up', () => { 86 | let result: { success: true } | undefined; 87 | service.signup(signupData).subscribe((otherResult) => { 88 | result = otherResult; 89 | }); 90 | 91 | const request = controller.expectOne({ 92 | method: 'POST', 93 | url: 'http://localhost:4200/api/signup', 94 | }); 95 | expect(request.request.body).toEqual(signupData); 96 | request.flush({ success: true }); 97 | 98 | expect(result).toEqual({ success: true }); 99 | }); 100 | 101 | it('passes the errors through', () => { 102 | const errors: HttpErrorResponse[] = []; 103 | const recordError = (error: HttpErrorResponse) => { 104 | errors.push(error); 105 | }; 106 | 107 | service.isUsernameTaken(username).subscribe(fail, recordError, fail); 108 | service.getPasswordStrength(password).subscribe(fail, recordError, fail); 109 | service.signup(signupData).subscribe(fail, recordError, fail); 110 | 111 | const status = 500; 112 | const statusText = 'Internal Server Error'; 113 | const errorEvent = new ErrorEvent('API error'); 114 | 115 | const requests = controller.match(() => true); 116 | requests.forEach((request) => { 117 | request.error(errorEvent, { status, statusText }); 118 | }); 119 | 120 | expect(errors.length).toBe(3); 121 | errors.forEach((error) => { 122 | expect(error.error).toBe(errorEvent); 123 | expect(error.status).toBe(status); 124 | expect(error.statusText).toBe(statusText); 125 | }); 126 | }); 127 | }); 128 | -------------------------------------------------------------------------------- /client/src/app/services/signup.service.ts: -------------------------------------------------------------------------------- 1 | import { HttpClient } from '@angular/common/http'; 2 | import { Injectable } from '@angular/core'; 3 | import { Observable } from 'rxjs'; 4 | import { map } from 'rxjs/operators'; 5 | import { environment } from 'src/environments/environment'; 6 | 7 | export interface PasswordStrength { 8 | score: number; 9 | warning: string; 10 | suggestions: string[]; 11 | } 12 | 13 | export type Plan = 'personal' | 'business' | 'non-profit'; 14 | 15 | export interface SignupData { 16 | plan: Plan; 17 | username: string; 18 | email: string; 19 | password: string; 20 | address: { 21 | name: string; 22 | addressLine1?: string; 23 | addressLine2: string; 24 | city: string; 25 | postcode: string; 26 | region?: string; 27 | country: string; 28 | }; 29 | tos: boolean; 30 | } 31 | 32 | @Injectable({ 33 | providedIn: 'root', 34 | }) 35 | export class SignupService { 36 | constructor(private http: HttpClient) {} 37 | 38 | public isUsernameTaken(username: string): Observable { 39 | return this.post<{ usernameTaken: boolean }>('/username-taken', { 40 | username, 41 | }).pipe(map((result) => result.usernameTaken)); 42 | } 43 | 44 | public isEmailTaken(email: string): Observable { 45 | return this.post<{ emailTaken: boolean }>('/email-taken', { email }).pipe( 46 | map((result) => result.emailTaken), 47 | ); 48 | } 49 | 50 | public getPasswordStrength(password: string): Observable { 51 | return this.post('/password-strength', { 52 | password, 53 | }); 54 | } 55 | 56 | public signup(data: SignupData): Observable<{ success: true }> { 57 | return this.post<{ success: true }>('/signup', data); 58 | } 59 | 60 | private post(path: string, data: any): Observable { 61 | return this.http.post(`${environment.signupServiceUrl}${path}`, data); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /client/src/app/spec-helpers/element.spec-helper.ts: -------------------------------------------------------------------------------- 1 | /* istanbul ignore file */ 2 | 3 | import { DebugElement } from '@angular/core'; 4 | import { ComponentFixture } from '@angular/core/testing'; 5 | import { By } from '@angular/platform-browser'; 6 | 7 | /** 8 | * Spec helpers for working with the DOM 9 | */ 10 | 11 | /** 12 | * Returns a selector for the `data-testid` attribute with the given attribute value. 13 | * 14 | * @param testId Test id set by `data-testid` 15 | * 16 | */ 17 | export function testIdSelector(testId: string): string { 18 | return `[data-testid="${testId}"]`; 19 | } 20 | 21 | /** 22 | * Finds a single element inside the Component by the given CSS selector. 23 | * Throws an error if no element was found. 24 | * 25 | * @param fixture Component fixture 26 | * @param selector CSS selector 27 | * 28 | */ 29 | export function queryByCss( 30 | fixture: ComponentFixture, 31 | selector: string, 32 | ): DebugElement { 33 | // The return type of DebugElement#query() is declared as DebugElement, 34 | // but the actual return type is DebugElement | null. 35 | // See https://github.com/angular/angular/issues/22449. 36 | const debugElement = fixture.debugElement.query(By.css(selector)); 37 | // Fail on null so the return type is always DebugElement. 38 | if (!debugElement) { 39 | throw new Error(`queryByCss: Element with ${selector} not found`); 40 | } 41 | return debugElement; 42 | } 43 | 44 | /** 45 | * Finds an element inside the Component by the given `data-testid` attribute. 46 | * Throws an error if no element was found. 47 | * 48 | * @param fixture Component fixture 49 | * @param testId Test id set by `data-testid` 50 | * 51 | */ 52 | export function findEl(fixture: ComponentFixture, testId: string): DebugElement { 53 | return queryByCss(fixture, testIdSelector(testId)); 54 | } 55 | 56 | /** 57 | * Finds all elements with the given `data-testid` attribute. 58 | * 59 | * @param fixture Component fixture 60 | * @param testId Test id set by `data-testid` 61 | */ 62 | export function findEls(fixture: ComponentFixture, testId: string): DebugElement[] { 63 | return fixture.debugElement.queryAll(By.css(testIdSelector(testId))); 64 | } 65 | 66 | /** 67 | * Gets the text content of an element with the given `data-testid` attribute. 68 | * 69 | * @param fixture Component fixture 70 | * @param testId Test id set by `data-testid` 71 | */ 72 | export function getText(fixture: ComponentFixture, testId: string): string { 73 | return findEl(fixture, testId).nativeElement.textContent; 74 | } 75 | 76 | /** 77 | * Expects that the element with the given `data-testid` attribute 78 | * has the given text content. 79 | * 80 | * @param fixture Component fixture 81 | * @param testId Test id set by `data-testid` 82 | * @param text Expected text 83 | */ 84 | export function expectText( 85 | fixture: ComponentFixture, 86 | testId: string, 87 | text: string, 88 | ): void { 89 | expect(getText(fixture, testId)).toBe(text); 90 | } 91 | 92 | /** 93 | * Expects that the element with the given `data-testid` attribute 94 | * has the given text content. 95 | * 96 | * @param fixture Component fixture 97 | * @param text Expected text 98 | */ 99 | export function expectContainedText(fixture: ComponentFixture, text: string): void { 100 | expect(fixture.nativeElement.textContent).toContain(text); 101 | } 102 | 103 | /** 104 | * Expects that a component has the given text content. 105 | * Both the component text content and the expected text are trimmed for reliability. 106 | * 107 | * @param fixture Component fixture 108 | * @param text Expected text 109 | */ 110 | export function expectContent(fixture: ComponentFixture, text: string): void { 111 | expect(fixture.nativeElement.textContent).toBe(text); 112 | } 113 | 114 | /** 115 | * Dispatches a fake event (synthetic event) at the given element. 116 | * 117 | * @param element Element that is the target of the event 118 | * @param type Event name, e.g. `input` 119 | * @param bubbles Whether the event bubbles up in the DOM tree 120 | */ 121 | export function dispatchFakeEvent( 122 | element: EventTarget, 123 | type: string, 124 | bubbles: boolean = false, 125 | ): void { 126 | const event = document.createEvent('Event'); 127 | event.initEvent(type, bubbles, false); 128 | element.dispatchEvent(event); 129 | } 130 | 131 | /** 132 | * Enters text into a form field (`input`, `textarea` or `select` element). 133 | * Triggers appropriate events so Angular takes notice of the change. 134 | * If you listen for the `change` event on `input` or `textarea`, 135 | * you need to trigger it separately. 136 | * 137 | * @param element Form field 138 | * @param value Form field value 139 | */ 140 | export function setFieldElementValue( 141 | element: HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement, 142 | value: string, 143 | ): void { 144 | element.value = value; 145 | // Dispatch an `input` or `change` fake event 146 | // so Angular form bindings take notice of the change. 147 | const isSelect = element instanceof HTMLSelectElement; 148 | dispatchFakeEvent(element, isSelect ? 'change' : 'input', isSelect ? false : true); 149 | } 150 | 151 | /** 152 | * Sets the value of a form field with the given `data-testid` attribute. 153 | * 154 | * @param fixture Component fixture 155 | * @param testId Test id set by `data-testid` 156 | * @param value Form field value 157 | */ 158 | export function setFieldValue( 159 | fixture: ComponentFixture, 160 | testId: string, 161 | value: string, 162 | ): void { 163 | setFieldElementValue(findEl(fixture, testId).nativeElement, value); 164 | } 165 | 166 | /** 167 | * Checks or unchecks a checkbox or radio button. 168 | * Triggers appropriate events so Angular takes notice of the change. 169 | * 170 | * @param fixture Component fixture 171 | * @param testId Test id set by `data-testid` 172 | * @param checked Whether the checkbox or radio should be checked 173 | */ 174 | export function checkField( 175 | fixture: ComponentFixture, 176 | testId: string, 177 | checked: boolean, 178 | ): void { 179 | const { nativeElement } = findEl(fixture, testId); 180 | nativeElement.checked = checked; 181 | // Dispatch a `change` fake event so Angular form bindings take notice of the change. 182 | dispatchFakeEvent(nativeElement, 'change'); 183 | } 184 | 185 | /** 186 | * Makes a fake click event that provides the most important properties. 187 | * Sets the button to left. 188 | * The event can be passed to DebugElement#triggerEventHandler. 189 | * 190 | * @param target Element that is the target of the click event 191 | */ 192 | export function makeClickEvent(target: EventTarget): Partial { 193 | return { 194 | preventDefault(): void {}, 195 | stopPropagation(): void {}, 196 | stopImmediatePropagation(): void {}, 197 | type: 'click', 198 | target, 199 | currentTarget: target, 200 | bubbles: true, 201 | cancelable: true, 202 | button: 0 203 | }; 204 | } 205 | 206 | /** 207 | * Emulates a left click on the element with the given `data-testid` attribute. 208 | * 209 | * @param fixture Component fixture 210 | * @param testId Test id set by `data-testid` 211 | */ 212 | export function click(fixture: ComponentFixture, testId: string): void { 213 | const element = findEl(fixture, testId); 214 | const event = makeClickEvent(element.nativeElement); 215 | element.triggerEventHandler('click', event); 216 | } 217 | 218 | /** 219 | * Finds a nested Component by its selector, e.g. `app-example`. 220 | * Throws an error if no element was found. 221 | * Use this only for shallow component testing. 222 | * When finding other elements, use `findEl` / `findEls` and `data-testid` attributes. 223 | * 224 | * @param fixture Fixture of the parent Component 225 | * @param selector Element selector, e.g. `app-example` 226 | */ 227 | export function findComponent( 228 | fixture: ComponentFixture, 229 | selector: string, 230 | ): DebugElement { 231 | return queryByCss(fixture, selector); 232 | } 233 | 234 | /** 235 | * Finds all nested Components by its selector, e.g. `app-example`. 236 | */ 237 | export function findComponents( 238 | fixture: ComponentFixture, 239 | selector: string, 240 | ): DebugElement[] { 241 | return fixture.debugElement.queryAll(By.css(selector)); 242 | } 243 | -------------------------------------------------------------------------------- /client/src/app/spec-helpers/signup-data.spec-helper.ts: -------------------------------------------------------------------------------- 1 | import { SignupData } from '../services/signup.service'; 2 | 3 | export const username = 'quickBrownFox'; 4 | export const password = 'dog lazy the over jumps fox brown quick the'; 5 | export const email = 'quick.brown.fox@example.org'; 6 | export const name = 'Mr. Fox'; 7 | export const addressLine1 = ''; 8 | export const addressLine2 = 'Under the Tree 1'; 9 | export const city = 'Farmtown'; 10 | export const postcode = '123456'; 11 | export const region = 'Upper South'; 12 | export const country = 'Luggnagg'; 13 | 14 | export const signupData: SignupData = { 15 | plan: 'personal', 16 | username, 17 | email, 18 | password, 19 | address: { name, addressLine1, addressLine2, city, postcode, region, country }, 20 | tos: true, 21 | }; 22 | -------------------------------------------------------------------------------- /client/src/app/util/findFormControl.ts: -------------------------------------------------------------------------------- 1 | import { AbstractControl, ControlContainer } from '@angular/forms'; 2 | 3 | /** 4 | * Finds a form control explicitly or by name from the ControlContainer. 5 | * 6 | * @param control An existing form control, as passed with the formControl directive 7 | * @param controlName An form control name, as passed with the formControlName directive 8 | * @param controlContainer The Directive’s ControlContainer 9 | */ 10 | export const findFormControl = ( 11 | control?: AbstractControl, 12 | controlName?: string, 13 | controlContainer?: ControlContainer, 14 | ): AbstractControl => { 15 | if (control) { 16 | return control; 17 | } 18 | if (!controlName) { 19 | throw new Error('getFormControl: control or control name must be given'); 20 | } 21 | if (!(controlContainer && controlContainer.control)) { 22 | throw new Error( 23 | 'getFormControl: control name was given but parent control not found', 24 | ); 25 | } 26 | const controlFromName = controlContainer.control.get(controlName); 27 | if (!controlFromName) { 28 | throw new Error(`getFormControl: control '${controlName}' not found`); 29 | } 30 | return controlFromName; 31 | }; 32 | -------------------------------------------------------------------------------- /client/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/molily/angular-form-testing/c0f1163ea4a7f19b4f6459c05bf3c8263baa4aef/client/src/assets/.gitkeep -------------------------------------------------------------------------------- /client/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true, 3 | signupServiceUrl: 'https://angular-form-testing.onrender.com', 4 | }; 5 | -------------------------------------------------------------------------------- /client/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false, 7 | signupServiceUrl: 'http://localhost:4200/api', 8 | }; 9 | 10 | /* 11 | * For easier debugging in development mode, you can import the following file 12 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 13 | * 14 | * This import should be commented out in production mode because it will have a negative impact 15 | * on performance if an error is thrown. 16 | */ 17 | // import 'zone.js/plugins/zone-error'; // Included with Angular CLI. 18 | -------------------------------------------------------------------------------- /client/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/molily/angular-form-testing/c0f1163ea4a7f19b4f6459c05bf3c8263baa4aef/client/src/favicon.ico -------------------------------------------------------------------------------- /client/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Sign-up form 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /client/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.error(err)); 13 | -------------------------------------------------------------------------------- /client/src/proxy.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "/api": { 3 | "target": "http://localhost:3000", 4 | "secure": false, 5 | "pathRewrite": { 6 | "^/api": "" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /client/src/styles.scss: -------------------------------------------------------------------------------- 1 | @use 'sass:color'; 2 | @use 'app/sass/variables' as v; 3 | @use 'app/sass/mixins' as m; 4 | @use 'app/sass/functions' as f; 5 | 6 | *, 7 | *::before, 8 | *::after { 9 | box-sizing: border-box; 10 | } 11 | 12 | :root { 13 | color-scheme: light dark; 14 | } 15 | 16 | body { 17 | margin: 1rem; 18 | padding: 0; 19 | 20 | font-family: '-apple-system', BlinkMacSystemFont, 'Helvetica Neue', Helvetica, 21 | Arial, sans-serif; 22 | line-height: 1.2; 23 | 24 | background-color: v.$background-color-light; 25 | color: v.$text-color-light; 26 | 27 | @include m.dark-scheme { 28 | background-color: v.$background-color-dark; 29 | color: v.$text-color-dark; 30 | } 31 | } 32 | 33 | h1, 34 | h2, 35 | h3, 36 | ul, 37 | ol, 38 | dl, 39 | p { 40 | margin: 0 0 1rem; 41 | } 42 | 43 | a { 44 | @include m.dark-scheme { 45 | color: #77f; 46 | 47 | &:visited { 48 | color: #bbb; 49 | } 50 | } 51 | } 52 | 53 | button, 54 | input[type='text'], 55 | input[type='number'], 56 | input[type='email'], 57 | input[type='password'], 58 | select { 59 | padding: 0 0.5rem; 60 | font-size: inherit; 61 | font-family: inherit; 62 | color: inherit; 63 | line-height: 2.5; 64 | } 65 | 66 | button { 67 | min-width: 2rem; 68 | border: 0; 69 | padding: 0.5rem; 70 | line-height: 1.2; 71 | background-color: v.$primary-color; 72 | color: #fff; 73 | 74 | &:disabled { 75 | background-color: color.adjust(v.$primary-color, $lightness: -20%, $saturation: -70%); 76 | color: #bbb; 77 | } 78 | 79 | &:focus { 80 | outline: 0; 81 | box-shadow: v.$focus-shadow; 82 | } 83 | } 84 | 85 | input[type='text'], 86 | input[type='number'], 87 | input[type='email'], 88 | input[type='password'], 89 | select { 90 | background-color: v.$field-background-light; 91 | border: 2px solid v.$field-border-light; 92 | border-radius: 1px; 93 | 94 | @include m.dark-scheme { 95 | border-color: v.$field-border-dark; 96 | background-color: v.$field-background-dark; 97 | } 98 | 99 | &:focus { 100 | outline: 0; 101 | border-color: v.$primary-color; 102 | box-shadow: v.$focus-shadow; 103 | } 104 | } 105 | 106 | input[type='checkbox'] { 107 | width: 1.5rem; 108 | height: 1.5rem; 109 | 110 | &:focus { 111 | outline: 0; 112 | box-shadow: v.$focus-shadow; 113 | } 114 | } 115 | 116 | $error-shadow: 0 0 0 4px rgba(220, 20, 60, 0.1) inset; 117 | 118 | input[type='text'].ng-invalid.ng-touched, 119 | input[type='number'].ng-invalid.ng-touched, 120 | input[type='email'].ng-invalid.ng-touched, 121 | input[type='password'].ng-invalid.ng-touched, 122 | select.ng-invalid.ng-touched { 123 | border-color: v.$error-color-light; 124 | box-shadow: $error-shadow; 125 | 126 | @include m.dark-scheme { 127 | border-color: v.$error-color-dark; 128 | } 129 | 130 | &:focus { 131 | border-color: v.$primary-color; 132 | box-shadow: v.$focus-shadow, $error-shadow; 133 | } 134 | } 135 | 136 | select { 137 | -moz-appearance: none; 138 | -webkit-appearance: none; 139 | appearance: none; 140 | color: inherit; 141 | background-position: right 10px center; 142 | background-size: auto 35%; 143 | background-repeat: no-repeat; 144 | $fill-light: f.str-replace('#{v.$field-border-light}', '#', '%23'); 145 | background-image: url('data:image/svg+xml,'); 146 | 147 | @include m.dark-scheme { 148 | $fill-dark: f.str-replace('#{v.$field-border-dark}', '#', '%23'); 149 | background-image: url('data:image/svg+xml,'); 150 | } 151 | } 152 | 153 | .error-text { 154 | color: v.$error-color-light; 155 | 156 | @include m.dark-scheme { 157 | color: v.$error-color-dark; 158 | } 159 | } 160 | -------------------------------------------------------------------------------- /client/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/app", 6 | "types": [] 7 | }, 8 | "include": ["src/**/*.d.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /client/tsconfig.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "compileOnSave": false, 4 | "compilerOptions": { 5 | "baseUrl": "./", 6 | "outDir": "./dist/out-tsc", 7 | "forceConsistentCasingInFileNames": true, 8 | "strict": true, 9 | "noImplicitReturns": true, 10 | "noFallthroughCasesInSwitch": true, 11 | "sourceMap": true, 12 | "declaration": false, 13 | "downlevelIteration": true, 14 | "experimentalDecorators": true, 15 | "moduleResolution": "node", 16 | "importHelpers": true, 17 | "target": "ES2022", 18 | "module": "es2020", 19 | "lib": [ 20 | "es2018", 21 | "dom" 22 | ], 23 | "useDefineForClassFields": false 24 | }, 25 | "angularCompilerOptions": { 26 | "enableI18nLegacyMessageIdFormat": false, 27 | "strictInjectionParameters": true, 28 | "strictInputAccessModifiers": true, 29 | "strictTemplates": true 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /client/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/spec", 6 | "types": ["jasmine"] 7 | }, 8 | "include": ["src/**/*.spec.ts", "src/**/*.d.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /server/README.md: -------------------------------------------------------------------------------- 1 | # Angular form testing: Server 2 | 3 | This is a simple HTTP service based on Node.js and Express. It implements a fake backend for the sign-up form testing. This service does nothing useful and just simulates input validation and signup. Do not use it in production. 4 | 5 | ## Setup 6 | 7 | - Install the dependencies with `npm install`. 8 | - Start the server with `npm start`. The server runs at http://localhost:3000. 9 | - Start the client Angular application in `../client/`. The form uses the HTTP service. 10 | -------------------------------------------------------------------------------- /server/index.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const rateLimit = require('express-rate-limit'); 3 | const cors = require('cors'); 4 | const zxcvbn = require('zxcvbn'); 5 | 6 | /** 7 | * Fake service for the form example. This service does nothing useful 8 | * and just simulates input validation and signup. Do not use it in production. 9 | */ 10 | 11 | const PORT = process.env.PORT || 3000; 12 | 13 | /** 14 | * Regular expression for validating an email address. 15 | * Taken from Angular: 16 | * https://github.com/angular/angular/blob/43b4940c9d595c542a00795976bc3168dd0ca5af/packages/forms/src/validators.ts#L68-L99 17 | * Copyright Google LLC All Rights Reserved. 18 | * MIT-style license: https://angular.io/license 19 | */ 20 | const EMAIL_REGEXP = 21 | /^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; 22 | const USERNAME_REGEXP = /^[a-zA-Z0-9.]+$/; 23 | 24 | /** 25 | * Allowed origins 26 | */ 27 | const ALLOWED_ORIGINS = ['https://molily.github.io']; 28 | 29 | /** 30 | * Available plans 31 | */ 32 | const PLANS = ['personal', 'business', 'non-profit']; 33 | 34 | /** 35 | * Holds the users in memory. 36 | */ 37 | const users = []; 38 | 39 | const isUsernameSyntaxValid = (username) => 40 | typeof username === 'string' && 41 | username !== '' && 42 | username.length <= 50 && 43 | USERNAME_REGEXP.test(username); 44 | 45 | const isEmailSyntaxValid = (email) => 46 | typeof email === 'string' && 47 | email !== '' && 48 | email.length <= 100 && 49 | EMAIL_REGEXP.test(email); 50 | 51 | const isPasswordSyntaxValid = (password) => 52 | typeof password === 'string' && password !== '' && password.length <= 200; 53 | 54 | const isUsernameTaken = (username) => users.some((user) => user.username == username); 55 | 56 | const isEmailTaken = (email) => users.some((user) => user.email == email); 57 | 58 | const app = express(); 59 | app.use(express.json()); 60 | 61 | // Enable CORS 62 | app.use(cors({ origin: ALLOWED_ORIGINS })); 63 | 64 | // Enable API limiter 65 | const apiLimiter = rateLimit({ 66 | windowMs: 15 * 60 * 1000, // 15 minutes 67 | max: 100, 68 | standardHeaders: false, 69 | legacyHeaders: false, 70 | }); 71 | app.use(apiLimiter); 72 | 73 | app.get('/', (_req, res) => { 74 | res.send( 75 | 'It worksIt works', 76 | ); 77 | }); 78 | 79 | app.post('/password-strength', (req, res) => { 80 | const { password } = req.body; 81 | if (!isPasswordSyntaxValid(password)) { 82 | res.sendStatus(400); 83 | return; 84 | } 85 | const result = zxcvbn(password); 86 | res.send({ 87 | score: result.score, 88 | warning: result.feedback.warning, 89 | suggestions: result.feedback.suggestions, 90 | }); 91 | }); 92 | 93 | app.post('/username-taken', (req, res) => { 94 | const { username } = req.body; 95 | if (!isUsernameSyntaxValid(username)) { 96 | res.sendStatus(400); 97 | return; 98 | } 99 | res.send({ usernameTaken: isUsernameTaken(username) }); 100 | }); 101 | 102 | app.post('/email-taken', (req, res) => { 103 | const { email } = req.body; 104 | if (!isEmailSyntaxValid(email)) { 105 | res.sendStatus(400); 106 | return; 107 | } 108 | res.send({ emailTaken: isEmailTaken(email) }); 109 | }); 110 | 111 | const isNonEmptyString = (object, property) => { 112 | const value = object[property]; 113 | return typeof value === 'string' && value !== ''; 114 | }; 115 | 116 | const validateSignup = (body) => { 117 | if (!body) { 118 | return { valid: false, error: 'Bad request' }; 119 | } 120 | const { plan, username, email, password, address, tos } = body; 121 | const checks = { 122 | plan: () => PLANS.includes(plan), 123 | username: () => isUsernameSyntaxValid(username) && !isUsernameTaken(username), 124 | email: () => isEmailSyntaxValid(email) && !isEmailTaken(email), 125 | password: () => isPasswordSyntaxValid(password) && zxcvbn(password).score >= 3, 126 | address: () => !!body.address, 127 | name: () => isNonEmptyString(address, 'name'), 128 | addressLine1: () => 129 | plan !== 'personal' ? isNonEmptyString(address, 'addressLine1', address) : true, 130 | addressLine2: () => isNonEmptyString(address, 'addressLine2'), 131 | city: () => isNonEmptyString(address, 'city'), 132 | postcode: () => isNonEmptyString(address, 'postcode'), 133 | country: () => isNonEmptyString(address, 'country'), 134 | tos: () => tos === true, 135 | }; 136 | for (const [name, check] of Object.entries(checks)) { 137 | const valid = check(); 138 | if (!valid) { 139 | return { valid: false, error: `${name} is invalid` }; 140 | } 141 | } 142 | return { valid: true }; 143 | }; 144 | 145 | app.post('/signup', (req, res) => { 146 | const validationResult = validateSignup(req.body); 147 | if (!validationResult.valid) { 148 | res.status(400).send({ error: validationResult.error }); 149 | return; 150 | } 151 | const { username, email, password } = req.body; 152 | users.push({ 153 | username, 154 | email, 155 | password, 156 | }); 157 | console.log(`Successful signup: ${username}`); 158 | res.send({ success: true }); 159 | }); 160 | 161 | app.listen(PORT); 162 | console.log('Server running.'); 163 | -------------------------------------------------------------------------------- /server/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "signup", 3 | "version": "0.0.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "signup", 9 | "version": "0.0.0", 10 | "license": "Unlicense", 11 | "dependencies": { 12 | "cors": "^2.8.5", 13 | "express": "^4.21.2", 14 | "express-rate-limit": "^7.5.0", 15 | "nodemon": "^3.1.9", 16 | "zxcvbn": "^4.4.2" 17 | } 18 | }, 19 | "node_modules/abbrev": { 20 | "version": "1.1.1", 21 | "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", 22 | "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" 23 | }, 24 | "node_modules/accepts": { 25 | "version": "1.3.8", 26 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", 27 | "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", 28 | "dependencies": { 29 | "mime-types": "~2.1.34", 30 | "negotiator": "0.6.3" 31 | }, 32 | "engines": { 33 | "node": ">= 0.6" 34 | } 35 | }, 36 | "node_modules/anymatch": { 37 | "version": "3.1.3", 38 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", 39 | "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", 40 | "dependencies": { 41 | "normalize-path": "^3.0.0", 42 | "picomatch": "^2.0.4" 43 | }, 44 | "engines": { 45 | "node": ">= 8" 46 | } 47 | }, 48 | "node_modules/array-flatten": { 49 | "version": "1.1.1", 50 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", 51 | "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" 52 | }, 53 | "node_modules/balanced-match": { 54 | "version": "1.0.2", 55 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 56 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" 57 | }, 58 | "node_modules/binary-extensions": { 59 | "version": "2.2.0", 60 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", 61 | "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", 62 | "engines": { 63 | "node": ">=8" 64 | } 65 | }, 66 | "node_modules/body-parser": { 67 | "version": "1.20.3", 68 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", 69 | "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", 70 | "license": "MIT", 71 | "dependencies": { 72 | "bytes": "3.1.2", 73 | "content-type": "~1.0.5", 74 | "debug": "2.6.9", 75 | "depd": "2.0.0", 76 | "destroy": "1.2.0", 77 | "http-errors": "2.0.0", 78 | "iconv-lite": "0.4.24", 79 | "on-finished": "2.4.1", 80 | "qs": "6.13.0", 81 | "raw-body": "2.5.2", 82 | "type-is": "~1.6.18", 83 | "unpipe": "1.0.0" 84 | }, 85 | "engines": { 86 | "node": ">= 0.8", 87 | "npm": "1.2.8000 || >= 1.4.16" 88 | } 89 | }, 90 | "node_modules/brace-expansion": { 91 | "version": "1.1.11", 92 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 93 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 94 | "dependencies": { 95 | "balanced-match": "^1.0.0", 96 | "concat-map": "0.0.1" 97 | } 98 | }, 99 | "node_modules/braces": { 100 | "version": "3.0.2", 101 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", 102 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", 103 | "dependencies": { 104 | "fill-range": "^7.0.1" 105 | }, 106 | "engines": { 107 | "node": ">=8" 108 | } 109 | }, 110 | "node_modules/bytes": { 111 | "version": "3.1.2", 112 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", 113 | "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", 114 | "license": "MIT", 115 | "engines": { 116 | "node": ">= 0.8" 117 | } 118 | }, 119 | "node_modules/call-bind-apply-helpers": { 120 | "version": "1.0.1", 121 | "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", 122 | "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", 123 | "license": "MIT", 124 | "dependencies": { 125 | "es-errors": "^1.3.0", 126 | "function-bind": "^1.1.2" 127 | }, 128 | "engines": { 129 | "node": ">= 0.4" 130 | } 131 | }, 132 | "node_modules/call-bound": { 133 | "version": "1.0.3", 134 | "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", 135 | "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", 136 | "license": "MIT", 137 | "dependencies": { 138 | "call-bind-apply-helpers": "^1.0.1", 139 | "get-intrinsic": "^1.2.6" 140 | }, 141 | "engines": { 142 | "node": ">= 0.4" 143 | }, 144 | "funding": { 145 | "url": "https://github.com/sponsors/ljharb" 146 | } 147 | }, 148 | "node_modules/chokidar": { 149 | "version": "3.5.3", 150 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", 151 | "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", 152 | "funding": [ 153 | { 154 | "type": "individual", 155 | "url": "https://paulmillr.com/funding/" 156 | } 157 | ], 158 | "dependencies": { 159 | "anymatch": "~3.1.2", 160 | "braces": "~3.0.2", 161 | "glob-parent": "~5.1.2", 162 | "is-binary-path": "~2.1.0", 163 | "is-glob": "~4.0.1", 164 | "normalize-path": "~3.0.0", 165 | "readdirp": "~3.6.0" 166 | }, 167 | "engines": { 168 | "node": ">= 8.10.0" 169 | }, 170 | "optionalDependencies": { 171 | "fsevents": "~2.3.2" 172 | } 173 | }, 174 | "node_modules/concat-map": { 175 | "version": "0.0.1", 176 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 177 | "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" 178 | }, 179 | "node_modules/content-disposition": { 180 | "version": "0.5.4", 181 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", 182 | "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", 183 | "dependencies": { 184 | "safe-buffer": "5.2.1" 185 | }, 186 | "engines": { 187 | "node": ">= 0.6" 188 | } 189 | }, 190 | "node_modules/content-type": { 191 | "version": "1.0.5", 192 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", 193 | "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", 194 | "license": "MIT", 195 | "engines": { 196 | "node": ">= 0.6" 197 | } 198 | }, 199 | "node_modules/cookie": { 200 | "version": "0.7.1", 201 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", 202 | "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", 203 | "license": "MIT", 204 | "engines": { 205 | "node": ">= 0.6" 206 | } 207 | }, 208 | "node_modules/cookie-signature": { 209 | "version": "1.0.6", 210 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", 211 | "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" 212 | }, 213 | "node_modules/cors": { 214 | "version": "2.8.5", 215 | "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", 216 | "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", 217 | "dependencies": { 218 | "object-assign": "^4", 219 | "vary": "^1" 220 | }, 221 | "engines": { 222 | "node": ">= 0.10" 223 | } 224 | }, 225 | "node_modules/debug": { 226 | "version": "2.6.9", 227 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 228 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 229 | "license": "MIT", 230 | "dependencies": { 231 | "ms": "2.0.0" 232 | } 233 | }, 234 | "node_modules/depd": { 235 | "version": "2.0.0", 236 | "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", 237 | "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", 238 | "license": "MIT", 239 | "engines": { 240 | "node": ">= 0.8" 241 | } 242 | }, 243 | "node_modules/destroy": { 244 | "version": "1.2.0", 245 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", 246 | "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", 247 | "license": "MIT", 248 | "engines": { 249 | "node": ">= 0.8", 250 | "npm": "1.2.8000 || >= 1.4.16" 251 | } 252 | }, 253 | "node_modules/dunder-proto": { 254 | "version": "1.0.1", 255 | "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", 256 | "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", 257 | "license": "MIT", 258 | "dependencies": { 259 | "call-bind-apply-helpers": "^1.0.1", 260 | "es-errors": "^1.3.0", 261 | "gopd": "^1.2.0" 262 | }, 263 | "engines": { 264 | "node": ">= 0.4" 265 | } 266 | }, 267 | "node_modules/ee-first": { 268 | "version": "1.1.1", 269 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", 270 | "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", 271 | "license": "MIT" 272 | }, 273 | "node_modules/encodeurl": { 274 | "version": "2.0.0", 275 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", 276 | "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", 277 | "license": "MIT", 278 | "engines": { 279 | "node": ">= 0.8" 280 | } 281 | }, 282 | "node_modules/es-define-property": { 283 | "version": "1.0.1", 284 | "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", 285 | "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", 286 | "license": "MIT", 287 | "engines": { 288 | "node": ">= 0.4" 289 | } 290 | }, 291 | "node_modules/es-errors": { 292 | "version": "1.3.0", 293 | "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", 294 | "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", 295 | "license": "MIT", 296 | "engines": { 297 | "node": ">= 0.4" 298 | } 299 | }, 300 | "node_modules/es-object-atoms": { 301 | "version": "1.0.0", 302 | "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", 303 | "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", 304 | "license": "MIT", 305 | "dependencies": { 306 | "es-errors": "^1.3.0" 307 | }, 308 | "engines": { 309 | "node": ">= 0.4" 310 | } 311 | }, 312 | "node_modules/escape-html": { 313 | "version": "1.0.3", 314 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 315 | "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", 316 | "license": "MIT" 317 | }, 318 | "node_modules/etag": { 319 | "version": "1.8.1", 320 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", 321 | "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", 322 | "license": "MIT", 323 | "engines": { 324 | "node": ">= 0.6" 325 | } 326 | }, 327 | "node_modules/express": { 328 | "version": "4.21.2", 329 | "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", 330 | "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", 331 | "license": "MIT", 332 | "dependencies": { 333 | "accepts": "~1.3.8", 334 | "array-flatten": "1.1.1", 335 | "body-parser": "1.20.3", 336 | "content-disposition": "0.5.4", 337 | "content-type": "~1.0.4", 338 | "cookie": "0.7.1", 339 | "cookie-signature": "1.0.6", 340 | "debug": "2.6.9", 341 | "depd": "2.0.0", 342 | "encodeurl": "~2.0.0", 343 | "escape-html": "~1.0.3", 344 | "etag": "~1.8.1", 345 | "finalhandler": "1.3.1", 346 | "fresh": "0.5.2", 347 | "http-errors": "2.0.0", 348 | "merge-descriptors": "1.0.3", 349 | "methods": "~1.1.2", 350 | "on-finished": "2.4.1", 351 | "parseurl": "~1.3.3", 352 | "path-to-regexp": "0.1.12", 353 | "proxy-addr": "~2.0.7", 354 | "qs": "6.13.0", 355 | "range-parser": "~1.2.1", 356 | "safe-buffer": "5.2.1", 357 | "send": "0.19.0", 358 | "serve-static": "1.16.2", 359 | "setprototypeof": "1.2.0", 360 | "statuses": "2.0.1", 361 | "type-is": "~1.6.18", 362 | "utils-merge": "1.0.1", 363 | "vary": "~1.1.2" 364 | }, 365 | "engines": { 366 | "node": ">= 0.10.0" 367 | }, 368 | "funding": { 369 | "type": "opencollective", 370 | "url": "https://opencollective.com/express" 371 | } 372 | }, 373 | "node_modules/express-rate-limit": { 374 | "version": "7.5.0", 375 | "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-7.5.0.tgz", 376 | "integrity": "sha512-eB5zbQh5h+VenMPM3fh+nw1YExi5nMr6HUCR62ELSP11huvxm/Uir1H1QEyTkk5QX6A58pX6NmaTMceKZ0Eodg==", 377 | "license": "MIT", 378 | "engines": { 379 | "node": ">= 16" 380 | }, 381 | "funding": { 382 | "url": "https://github.com/sponsors/express-rate-limit" 383 | }, 384 | "peerDependencies": { 385 | "express": "^4.11 || 5 || ^5.0.0-beta.1" 386 | } 387 | }, 388 | "node_modules/fill-range": { 389 | "version": "7.0.1", 390 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", 391 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", 392 | "dependencies": { 393 | "to-regex-range": "^5.0.1" 394 | }, 395 | "engines": { 396 | "node": ">=8" 397 | } 398 | }, 399 | "node_modules/finalhandler": { 400 | "version": "1.3.1", 401 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", 402 | "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", 403 | "license": "MIT", 404 | "dependencies": { 405 | "debug": "2.6.9", 406 | "encodeurl": "~2.0.0", 407 | "escape-html": "~1.0.3", 408 | "on-finished": "2.4.1", 409 | "parseurl": "~1.3.3", 410 | "statuses": "2.0.1", 411 | "unpipe": "~1.0.0" 412 | }, 413 | "engines": { 414 | "node": ">= 0.8" 415 | } 416 | }, 417 | "node_modules/forwarded": { 418 | "version": "0.2.0", 419 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", 420 | "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", 421 | "engines": { 422 | "node": ">= 0.6" 423 | } 424 | }, 425 | "node_modules/fresh": { 426 | "version": "0.5.2", 427 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", 428 | "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", 429 | "license": "MIT", 430 | "engines": { 431 | "node": ">= 0.6" 432 | } 433 | }, 434 | "node_modules/fsevents": { 435 | "version": "2.3.2", 436 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", 437 | "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", 438 | "hasInstallScript": true, 439 | "optional": true, 440 | "os": [ 441 | "darwin" 442 | ], 443 | "engines": { 444 | "node": "^8.16.0 || ^10.6.0 || >=11.0.0" 445 | } 446 | }, 447 | "node_modules/function-bind": { 448 | "version": "1.1.2", 449 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", 450 | "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", 451 | "license": "MIT", 452 | "funding": { 453 | "url": "https://github.com/sponsors/ljharb" 454 | } 455 | }, 456 | "node_modules/get-intrinsic": { 457 | "version": "1.2.7", 458 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz", 459 | "integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==", 460 | "license": "MIT", 461 | "dependencies": { 462 | "call-bind-apply-helpers": "^1.0.1", 463 | "es-define-property": "^1.0.1", 464 | "es-errors": "^1.3.0", 465 | "es-object-atoms": "^1.0.0", 466 | "function-bind": "^1.1.2", 467 | "get-proto": "^1.0.0", 468 | "gopd": "^1.2.0", 469 | "has-symbols": "^1.1.0", 470 | "hasown": "^2.0.2", 471 | "math-intrinsics": "^1.1.0" 472 | }, 473 | "engines": { 474 | "node": ">= 0.4" 475 | }, 476 | "funding": { 477 | "url": "https://github.com/sponsors/ljharb" 478 | } 479 | }, 480 | "node_modules/get-proto": { 481 | "version": "1.0.1", 482 | "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", 483 | "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", 484 | "license": "MIT", 485 | "dependencies": { 486 | "dunder-proto": "^1.0.1", 487 | "es-object-atoms": "^1.0.0" 488 | }, 489 | "engines": { 490 | "node": ">= 0.4" 491 | } 492 | }, 493 | "node_modules/glob-parent": { 494 | "version": "5.1.2", 495 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 496 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 497 | "dependencies": { 498 | "is-glob": "^4.0.1" 499 | }, 500 | "engines": { 501 | "node": ">= 6" 502 | } 503 | }, 504 | "node_modules/gopd": { 505 | "version": "1.2.0", 506 | "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", 507 | "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", 508 | "license": "MIT", 509 | "engines": { 510 | "node": ">= 0.4" 511 | }, 512 | "funding": { 513 | "url": "https://github.com/sponsors/ljharb" 514 | } 515 | }, 516 | "node_modules/has-flag": { 517 | "version": "3.0.0", 518 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 519 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", 520 | "engines": { 521 | "node": ">=4" 522 | } 523 | }, 524 | "node_modules/has-symbols": { 525 | "version": "1.1.0", 526 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", 527 | "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", 528 | "license": "MIT", 529 | "engines": { 530 | "node": ">= 0.4" 531 | }, 532 | "funding": { 533 | "url": "https://github.com/sponsors/ljharb" 534 | } 535 | }, 536 | "node_modules/hasown": { 537 | "version": "2.0.2", 538 | "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", 539 | "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", 540 | "license": "MIT", 541 | "dependencies": { 542 | "function-bind": "^1.1.2" 543 | }, 544 | "engines": { 545 | "node": ">= 0.4" 546 | } 547 | }, 548 | "node_modules/http-errors": { 549 | "version": "2.0.0", 550 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", 551 | "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", 552 | "license": "MIT", 553 | "dependencies": { 554 | "depd": "2.0.0", 555 | "inherits": "2.0.4", 556 | "setprototypeof": "1.2.0", 557 | "statuses": "2.0.1", 558 | "toidentifier": "1.0.1" 559 | }, 560 | "engines": { 561 | "node": ">= 0.8" 562 | } 563 | }, 564 | "node_modules/iconv-lite": { 565 | "version": "0.4.24", 566 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 567 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 568 | "license": "MIT", 569 | "dependencies": { 570 | "safer-buffer": ">= 2.1.2 < 3" 571 | }, 572 | "engines": { 573 | "node": ">=0.10.0" 574 | } 575 | }, 576 | "node_modules/ignore-by-default": { 577 | "version": "1.0.1", 578 | "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", 579 | "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=" 580 | }, 581 | "node_modules/inherits": { 582 | "version": "2.0.4", 583 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 584 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 585 | "license": "ISC" 586 | }, 587 | "node_modules/ipaddr.js": { 588 | "version": "1.9.1", 589 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", 590 | "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", 591 | "engines": { 592 | "node": ">= 0.10" 593 | } 594 | }, 595 | "node_modules/is-binary-path": { 596 | "version": "2.1.0", 597 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", 598 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", 599 | "dependencies": { 600 | "binary-extensions": "^2.0.0" 601 | }, 602 | "engines": { 603 | "node": ">=8" 604 | } 605 | }, 606 | "node_modules/is-extglob": { 607 | "version": "2.1.1", 608 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 609 | "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", 610 | "engines": { 611 | "node": ">=0.10.0" 612 | } 613 | }, 614 | "node_modules/is-glob": { 615 | "version": "4.0.3", 616 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", 617 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", 618 | "dependencies": { 619 | "is-extglob": "^2.1.1" 620 | }, 621 | "engines": { 622 | "node": ">=0.10.0" 623 | } 624 | }, 625 | "node_modules/is-number": { 626 | "version": "7.0.0", 627 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 628 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 629 | "engines": { 630 | "node": ">=0.12.0" 631 | } 632 | }, 633 | "node_modules/math-intrinsics": { 634 | "version": "1.1.0", 635 | "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", 636 | "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", 637 | "license": "MIT", 638 | "engines": { 639 | "node": ">= 0.4" 640 | } 641 | }, 642 | "node_modules/media-typer": { 643 | "version": "0.3.0", 644 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", 645 | "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", 646 | "license": "MIT", 647 | "engines": { 648 | "node": ">= 0.6" 649 | } 650 | }, 651 | "node_modules/merge-descriptors": { 652 | "version": "1.0.3", 653 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", 654 | "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", 655 | "license": "MIT", 656 | "funding": { 657 | "url": "https://github.com/sponsors/sindresorhus" 658 | } 659 | }, 660 | "node_modules/methods": { 661 | "version": "1.1.2", 662 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", 663 | "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", 664 | "engines": { 665 | "node": ">= 0.6" 666 | } 667 | }, 668 | "node_modules/mime": { 669 | "version": "1.6.0", 670 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", 671 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", 672 | "license": "MIT", 673 | "bin": { 674 | "mime": "cli.js" 675 | }, 676 | "engines": { 677 | "node": ">=4" 678 | } 679 | }, 680 | "node_modules/mime-db": { 681 | "version": "1.52.0", 682 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 683 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", 684 | "engines": { 685 | "node": ">= 0.6" 686 | } 687 | }, 688 | "node_modules/mime-types": { 689 | "version": "2.1.35", 690 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 691 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 692 | "dependencies": { 693 | "mime-db": "1.52.0" 694 | }, 695 | "engines": { 696 | "node": ">= 0.6" 697 | } 698 | }, 699 | "node_modules/minimatch": { 700 | "version": "3.1.2", 701 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", 702 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", 703 | "dependencies": { 704 | "brace-expansion": "^1.1.7" 705 | }, 706 | "engines": { 707 | "node": "*" 708 | } 709 | }, 710 | "node_modules/ms": { 711 | "version": "2.0.0", 712 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 713 | "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", 714 | "license": "MIT" 715 | }, 716 | "node_modules/negotiator": { 717 | "version": "0.6.3", 718 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", 719 | "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", 720 | "engines": { 721 | "node": ">= 0.6" 722 | } 723 | }, 724 | "node_modules/nodemon": { 725 | "version": "3.1.9", 726 | "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.9.tgz", 727 | "integrity": "sha512-hdr1oIb2p6ZSxu3PB2JWWYS7ZQ0qvaZsc3hK8DR8f02kRzc8rjYmxAIvdz+aYC+8F2IjNaB7HMcSDg8nQpJxyg==", 728 | "license": "MIT", 729 | "dependencies": { 730 | "chokidar": "^3.5.2", 731 | "debug": "^4", 732 | "ignore-by-default": "^1.0.1", 733 | "minimatch": "^3.1.2", 734 | "pstree.remy": "^1.1.8", 735 | "semver": "^7.5.3", 736 | "simple-update-notifier": "^2.0.0", 737 | "supports-color": "^5.5.0", 738 | "touch": "^3.1.0", 739 | "undefsafe": "^2.0.5" 740 | }, 741 | "bin": { 742 | "nodemon": "bin/nodemon.js" 743 | }, 744 | "engines": { 745 | "node": ">=10" 746 | }, 747 | "funding": { 748 | "type": "opencollective", 749 | "url": "https://opencollective.com/nodemon" 750 | } 751 | }, 752 | "node_modules/nodemon/node_modules/debug": { 753 | "version": "4.4.0", 754 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", 755 | "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", 756 | "license": "MIT", 757 | "dependencies": { 758 | "ms": "^2.1.3" 759 | }, 760 | "engines": { 761 | "node": ">=6.0" 762 | }, 763 | "peerDependenciesMeta": { 764 | "supports-color": { 765 | "optional": true 766 | } 767 | } 768 | }, 769 | "node_modules/nodemon/node_modules/ms": { 770 | "version": "2.1.3", 771 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 772 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 773 | "license": "MIT" 774 | }, 775 | "node_modules/nopt": { 776 | "version": "1.0.10", 777 | "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", 778 | "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", 779 | "dependencies": { 780 | "abbrev": "1" 781 | }, 782 | "bin": { 783 | "nopt": "bin/nopt.js" 784 | }, 785 | "engines": { 786 | "node": "*" 787 | } 788 | }, 789 | "node_modules/normalize-path": { 790 | "version": "3.0.0", 791 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", 792 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", 793 | "engines": { 794 | "node": ">=0.10.0" 795 | } 796 | }, 797 | "node_modules/object-assign": { 798 | "version": "4.1.1", 799 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 800 | "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", 801 | "engines": { 802 | "node": ">=0.10.0" 803 | } 804 | }, 805 | "node_modules/object-inspect": { 806 | "version": "1.13.3", 807 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", 808 | "integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==", 809 | "license": "MIT", 810 | "engines": { 811 | "node": ">= 0.4" 812 | }, 813 | "funding": { 814 | "url": "https://github.com/sponsors/ljharb" 815 | } 816 | }, 817 | "node_modules/on-finished": { 818 | "version": "2.4.1", 819 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", 820 | "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", 821 | "license": "MIT", 822 | "dependencies": { 823 | "ee-first": "1.1.1" 824 | }, 825 | "engines": { 826 | "node": ">= 0.8" 827 | } 828 | }, 829 | "node_modules/parseurl": { 830 | "version": "1.3.3", 831 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", 832 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", 833 | "license": "MIT", 834 | "engines": { 835 | "node": ">= 0.8" 836 | } 837 | }, 838 | "node_modules/path-to-regexp": { 839 | "version": "0.1.12", 840 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", 841 | "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", 842 | "license": "MIT" 843 | }, 844 | "node_modules/picomatch": { 845 | "version": "2.3.1", 846 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", 847 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", 848 | "engines": { 849 | "node": ">=8.6" 850 | }, 851 | "funding": { 852 | "url": "https://github.com/sponsors/jonschlinkert" 853 | } 854 | }, 855 | "node_modules/proxy-addr": { 856 | "version": "2.0.7", 857 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", 858 | "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", 859 | "dependencies": { 860 | "forwarded": "0.2.0", 861 | "ipaddr.js": "1.9.1" 862 | }, 863 | "engines": { 864 | "node": ">= 0.10" 865 | } 866 | }, 867 | "node_modules/pstree.remy": { 868 | "version": "1.1.8", 869 | "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", 870 | "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==" 871 | }, 872 | "node_modules/qs": { 873 | "version": "6.13.0", 874 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", 875 | "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", 876 | "license": "BSD-3-Clause", 877 | "dependencies": { 878 | "side-channel": "^1.0.6" 879 | }, 880 | "engines": { 881 | "node": ">=0.6" 882 | }, 883 | "funding": { 884 | "url": "https://github.com/sponsors/ljharb" 885 | } 886 | }, 887 | "node_modules/range-parser": { 888 | "version": "1.2.1", 889 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", 890 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", 891 | "license": "MIT", 892 | "engines": { 893 | "node": ">= 0.6" 894 | } 895 | }, 896 | "node_modules/raw-body": { 897 | "version": "2.5.2", 898 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", 899 | "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", 900 | "license": "MIT", 901 | "dependencies": { 902 | "bytes": "3.1.2", 903 | "http-errors": "2.0.0", 904 | "iconv-lite": "0.4.24", 905 | "unpipe": "1.0.0" 906 | }, 907 | "engines": { 908 | "node": ">= 0.8" 909 | } 910 | }, 911 | "node_modules/readdirp": { 912 | "version": "3.6.0", 913 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", 914 | "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", 915 | "dependencies": { 916 | "picomatch": "^2.2.1" 917 | }, 918 | "engines": { 919 | "node": ">=8.10.0" 920 | } 921 | }, 922 | "node_modules/safe-buffer": { 923 | "version": "5.2.1", 924 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 925 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 926 | "funding": [ 927 | { 928 | "type": "github", 929 | "url": "https://github.com/sponsors/feross" 930 | }, 931 | { 932 | "type": "patreon", 933 | "url": "https://www.patreon.com/feross" 934 | }, 935 | { 936 | "type": "consulting", 937 | "url": "https://feross.org/support" 938 | } 939 | ] 940 | }, 941 | "node_modules/safer-buffer": { 942 | "version": "2.1.2", 943 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 944 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", 945 | "license": "MIT" 946 | }, 947 | "node_modules/semver": { 948 | "version": "7.6.3", 949 | "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", 950 | "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", 951 | "license": "ISC", 952 | "bin": { 953 | "semver": "bin/semver.js" 954 | }, 955 | "engines": { 956 | "node": ">=10" 957 | } 958 | }, 959 | "node_modules/send": { 960 | "version": "0.19.0", 961 | "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", 962 | "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", 963 | "license": "MIT", 964 | "dependencies": { 965 | "debug": "2.6.9", 966 | "depd": "2.0.0", 967 | "destroy": "1.2.0", 968 | "encodeurl": "~1.0.2", 969 | "escape-html": "~1.0.3", 970 | "etag": "~1.8.1", 971 | "fresh": "0.5.2", 972 | "http-errors": "2.0.0", 973 | "mime": "1.6.0", 974 | "ms": "2.1.3", 975 | "on-finished": "2.4.1", 976 | "range-parser": "~1.2.1", 977 | "statuses": "2.0.1" 978 | }, 979 | "engines": { 980 | "node": ">= 0.8.0" 981 | } 982 | }, 983 | "node_modules/send/node_modules/encodeurl": { 984 | "version": "1.0.2", 985 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", 986 | "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", 987 | "license": "MIT", 988 | "engines": { 989 | "node": ">= 0.8" 990 | } 991 | }, 992 | "node_modules/send/node_modules/ms": { 993 | "version": "2.1.3", 994 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 995 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 996 | "license": "MIT" 997 | }, 998 | "node_modules/serve-static": { 999 | "version": "1.16.2", 1000 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", 1001 | "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", 1002 | "license": "MIT", 1003 | "dependencies": { 1004 | "encodeurl": "~2.0.0", 1005 | "escape-html": "~1.0.3", 1006 | "parseurl": "~1.3.3", 1007 | "send": "0.19.0" 1008 | }, 1009 | "engines": { 1010 | "node": ">= 0.8.0" 1011 | } 1012 | }, 1013 | "node_modules/setprototypeof": { 1014 | "version": "1.2.0", 1015 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", 1016 | "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", 1017 | "license": "ISC" 1018 | }, 1019 | "node_modules/side-channel": { 1020 | "version": "1.1.0", 1021 | "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", 1022 | "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", 1023 | "license": "MIT", 1024 | "dependencies": { 1025 | "es-errors": "^1.3.0", 1026 | "object-inspect": "^1.13.3", 1027 | "side-channel-list": "^1.0.0", 1028 | "side-channel-map": "^1.0.1", 1029 | "side-channel-weakmap": "^1.0.2" 1030 | }, 1031 | "engines": { 1032 | "node": ">= 0.4" 1033 | }, 1034 | "funding": { 1035 | "url": "https://github.com/sponsors/ljharb" 1036 | } 1037 | }, 1038 | "node_modules/side-channel-list": { 1039 | "version": "1.0.0", 1040 | "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", 1041 | "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", 1042 | "license": "MIT", 1043 | "dependencies": { 1044 | "es-errors": "^1.3.0", 1045 | "object-inspect": "^1.13.3" 1046 | }, 1047 | "engines": { 1048 | "node": ">= 0.4" 1049 | }, 1050 | "funding": { 1051 | "url": "https://github.com/sponsors/ljharb" 1052 | } 1053 | }, 1054 | "node_modules/side-channel-map": { 1055 | "version": "1.0.1", 1056 | "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", 1057 | "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", 1058 | "license": "MIT", 1059 | "dependencies": { 1060 | "call-bound": "^1.0.2", 1061 | "es-errors": "^1.3.0", 1062 | "get-intrinsic": "^1.2.5", 1063 | "object-inspect": "^1.13.3" 1064 | }, 1065 | "engines": { 1066 | "node": ">= 0.4" 1067 | }, 1068 | "funding": { 1069 | "url": "https://github.com/sponsors/ljharb" 1070 | } 1071 | }, 1072 | "node_modules/side-channel-weakmap": { 1073 | "version": "1.0.2", 1074 | "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", 1075 | "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", 1076 | "license": "MIT", 1077 | "dependencies": { 1078 | "call-bound": "^1.0.2", 1079 | "es-errors": "^1.3.0", 1080 | "get-intrinsic": "^1.2.5", 1081 | "object-inspect": "^1.13.3", 1082 | "side-channel-map": "^1.0.1" 1083 | }, 1084 | "engines": { 1085 | "node": ">= 0.4" 1086 | }, 1087 | "funding": { 1088 | "url": "https://github.com/sponsors/ljharb" 1089 | } 1090 | }, 1091 | "node_modules/simple-update-notifier": { 1092 | "version": "2.0.0", 1093 | "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", 1094 | "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", 1095 | "license": "MIT", 1096 | "dependencies": { 1097 | "semver": "^7.5.3" 1098 | }, 1099 | "engines": { 1100 | "node": ">=10" 1101 | } 1102 | }, 1103 | "node_modules/statuses": { 1104 | "version": "2.0.1", 1105 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", 1106 | "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", 1107 | "license": "MIT", 1108 | "engines": { 1109 | "node": ">= 0.8" 1110 | } 1111 | }, 1112 | "node_modules/supports-color": { 1113 | "version": "5.5.0", 1114 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 1115 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 1116 | "dependencies": { 1117 | "has-flag": "^3.0.0" 1118 | }, 1119 | "engines": { 1120 | "node": ">=4" 1121 | } 1122 | }, 1123 | "node_modules/to-regex-range": { 1124 | "version": "5.0.1", 1125 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 1126 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 1127 | "dependencies": { 1128 | "is-number": "^7.0.0" 1129 | }, 1130 | "engines": { 1131 | "node": ">=8.0" 1132 | } 1133 | }, 1134 | "node_modules/toidentifier": { 1135 | "version": "1.0.1", 1136 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", 1137 | "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", 1138 | "license": "MIT", 1139 | "engines": { 1140 | "node": ">=0.6" 1141 | } 1142 | }, 1143 | "node_modules/touch": { 1144 | "version": "3.1.0", 1145 | "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", 1146 | "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", 1147 | "dependencies": { 1148 | "nopt": "~1.0.10" 1149 | }, 1150 | "bin": { 1151 | "nodetouch": "bin/nodetouch.js" 1152 | } 1153 | }, 1154 | "node_modules/type-is": { 1155 | "version": "1.6.18", 1156 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", 1157 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", 1158 | "license": "MIT", 1159 | "dependencies": { 1160 | "media-typer": "0.3.0", 1161 | "mime-types": "~2.1.24" 1162 | }, 1163 | "engines": { 1164 | "node": ">= 0.6" 1165 | } 1166 | }, 1167 | "node_modules/undefsafe": { 1168 | "version": "2.0.5", 1169 | "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", 1170 | "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==" 1171 | }, 1172 | "node_modules/unpipe": { 1173 | "version": "1.0.0", 1174 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", 1175 | "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", 1176 | "license": "MIT", 1177 | "engines": { 1178 | "node": ">= 0.8" 1179 | } 1180 | }, 1181 | "node_modules/utils-merge": { 1182 | "version": "1.0.1", 1183 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", 1184 | "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", 1185 | "engines": { 1186 | "node": ">= 0.4.0" 1187 | } 1188 | }, 1189 | "node_modules/vary": { 1190 | "version": "1.1.2", 1191 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", 1192 | "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", 1193 | "engines": { 1194 | "node": ">= 0.8" 1195 | } 1196 | }, 1197 | "node_modules/zxcvbn": { 1198 | "version": "4.4.2", 1199 | "resolved": "https://registry.npmjs.org/zxcvbn/-/zxcvbn-4.4.2.tgz", 1200 | "integrity": "sha1-KOwXzwl0PtyrBW3dixsGJizHPDA=" 1201 | } 1202 | }, 1203 | "dependencies": { 1204 | "abbrev": { 1205 | "version": "1.1.1", 1206 | "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", 1207 | "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" 1208 | }, 1209 | "accepts": { 1210 | "version": "1.3.8", 1211 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", 1212 | "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", 1213 | "requires": { 1214 | "mime-types": "~2.1.34", 1215 | "negotiator": "0.6.3" 1216 | } 1217 | }, 1218 | "anymatch": { 1219 | "version": "3.1.3", 1220 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", 1221 | "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", 1222 | "requires": { 1223 | "normalize-path": "^3.0.0", 1224 | "picomatch": "^2.0.4" 1225 | } 1226 | }, 1227 | "array-flatten": { 1228 | "version": "1.1.1", 1229 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", 1230 | "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" 1231 | }, 1232 | "balanced-match": { 1233 | "version": "1.0.2", 1234 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 1235 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" 1236 | }, 1237 | "binary-extensions": { 1238 | "version": "2.2.0", 1239 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", 1240 | "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==" 1241 | }, 1242 | "body-parser": { 1243 | "version": "1.20.3", 1244 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", 1245 | "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", 1246 | "requires": { 1247 | "bytes": "3.1.2", 1248 | "content-type": "~1.0.5", 1249 | "debug": "2.6.9", 1250 | "depd": "2.0.0", 1251 | "destroy": "1.2.0", 1252 | "http-errors": "2.0.0", 1253 | "iconv-lite": "0.4.24", 1254 | "on-finished": "2.4.1", 1255 | "qs": "6.13.0", 1256 | "raw-body": "2.5.2", 1257 | "type-is": "~1.6.18", 1258 | "unpipe": "1.0.0" 1259 | } 1260 | }, 1261 | "brace-expansion": { 1262 | "version": "1.1.11", 1263 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 1264 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 1265 | "requires": { 1266 | "balanced-match": "^1.0.0", 1267 | "concat-map": "0.0.1" 1268 | } 1269 | }, 1270 | "braces": { 1271 | "version": "3.0.2", 1272 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", 1273 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", 1274 | "requires": { 1275 | "fill-range": "^7.0.1" 1276 | } 1277 | }, 1278 | "bytes": { 1279 | "version": "3.1.2", 1280 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", 1281 | "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==" 1282 | }, 1283 | "call-bind-apply-helpers": { 1284 | "version": "1.0.1", 1285 | "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", 1286 | "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", 1287 | "requires": { 1288 | "es-errors": "^1.3.0", 1289 | "function-bind": "^1.1.2" 1290 | } 1291 | }, 1292 | "call-bound": { 1293 | "version": "1.0.3", 1294 | "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", 1295 | "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", 1296 | "requires": { 1297 | "call-bind-apply-helpers": "^1.0.1", 1298 | "get-intrinsic": "^1.2.6" 1299 | } 1300 | }, 1301 | "chokidar": { 1302 | "version": "3.5.3", 1303 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", 1304 | "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", 1305 | "requires": { 1306 | "anymatch": "~3.1.2", 1307 | "braces": "~3.0.2", 1308 | "fsevents": "~2.3.2", 1309 | "glob-parent": "~5.1.2", 1310 | "is-binary-path": "~2.1.0", 1311 | "is-glob": "~4.0.1", 1312 | "normalize-path": "~3.0.0", 1313 | "readdirp": "~3.6.0" 1314 | } 1315 | }, 1316 | "concat-map": { 1317 | "version": "0.0.1", 1318 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 1319 | "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" 1320 | }, 1321 | "content-disposition": { 1322 | "version": "0.5.4", 1323 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", 1324 | "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", 1325 | "requires": { 1326 | "safe-buffer": "5.2.1" 1327 | } 1328 | }, 1329 | "content-type": { 1330 | "version": "1.0.5", 1331 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", 1332 | "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==" 1333 | }, 1334 | "cookie": { 1335 | "version": "0.7.1", 1336 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", 1337 | "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==" 1338 | }, 1339 | "cookie-signature": { 1340 | "version": "1.0.6", 1341 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", 1342 | "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" 1343 | }, 1344 | "cors": { 1345 | "version": "2.8.5", 1346 | "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", 1347 | "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", 1348 | "requires": { 1349 | "object-assign": "^4", 1350 | "vary": "^1" 1351 | } 1352 | }, 1353 | "debug": { 1354 | "version": "2.6.9", 1355 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 1356 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 1357 | "requires": { 1358 | "ms": "2.0.0" 1359 | } 1360 | }, 1361 | "depd": { 1362 | "version": "2.0.0", 1363 | "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", 1364 | "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" 1365 | }, 1366 | "destroy": { 1367 | "version": "1.2.0", 1368 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", 1369 | "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==" 1370 | }, 1371 | "dunder-proto": { 1372 | "version": "1.0.1", 1373 | "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", 1374 | "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", 1375 | "requires": { 1376 | "call-bind-apply-helpers": "^1.0.1", 1377 | "es-errors": "^1.3.0", 1378 | "gopd": "^1.2.0" 1379 | } 1380 | }, 1381 | "ee-first": { 1382 | "version": "1.1.1", 1383 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", 1384 | "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" 1385 | }, 1386 | "encodeurl": { 1387 | "version": "2.0.0", 1388 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", 1389 | "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==" 1390 | }, 1391 | "es-define-property": { 1392 | "version": "1.0.1", 1393 | "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", 1394 | "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==" 1395 | }, 1396 | "es-errors": { 1397 | "version": "1.3.0", 1398 | "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", 1399 | "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==" 1400 | }, 1401 | "es-object-atoms": { 1402 | "version": "1.0.0", 1403 | "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", 1404 | "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", 1405 | "requires": { 1406 | "es-errors": "^1.3.0" 1407 | } 1408 | }, 1409 | "escape-html": { 1410 | "version": "1.0.3", 1411 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 1412 | "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" 1413 | }, 1414 | "etag": { 1415 | "version": "1.8.1", 1416 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", 1417 | "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==" 1418 | }, 1419 | "express": { 1420 | "version": "4.21.2", 1421 | "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", 1422 | "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", 1423 | "requires": { 1424 | "accepts": "~1.3.8", 1425 | "array-flatten": "1.1.1", 1426 | "body-parser": "1.20.3", 1427 | "content-disposition": "0.5.4", 1428 | "content-type": "~1.0.4", 1429 | "cookie": "0.7.1", 1430 | "cookie-signature": "1.0.6", 1431 | "debug": "2.6.9", 1432 | "depd": "2.0.0", 1433 | "encodeurl": "~2.0.0", 1434 | "escape-html": "~1.0.3", 1435 | "etag": "~1.8.1", 1436 | "finalhandler": "1.3.1", 1437 | "fresh": "0.5.2", 1438 | "http-errors": "2.0.0", 1439 | "merge-descriptors": "1.0.3", 1440 | "methods": "~1.1.2", 1441 | "on-finished": "2.4.1", 1442 | "parseurl": "~1.3.3", 1443 | "path-to-regexp": "0.1.12", 1444 | "proxy-addr": "~2.0.7", 1445 | "qs": "6.13.0", 1446 | "range-parser": "~1.2.1", 1447 | "safe-buffer": "5.2.1", 1448 | "send": "0.19.0", 1449 | "serve-static": "1.16.2", 1450 | "setprototypeof": "1.2.0", 1451 | "statuses": "2.0.1", 1452 | "type-is": "~1.6.18", 1453 | "utils-merge": "1.0.1", 1454 | "vary": "~1.1.2" 1455 | } 1456 | }, 1457 | "express-rate-limit": { 1458 | "version": "7.5.0", 1459 | "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-7.5.0.tgz", 1460 | "integrity": "sha512-eB5zbQh5h+VenMPM3fh+nw1YExi5nMr6HUCR62ELSP11huvxm/Uir1H1QEyTkk5QX6A58pX6NmaTMceKZ0Eodg==", 1461 | "requires": {} 1462 | }, 1463 | "fill-range": { 1464 | "version": "7.0.1", 1465 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", 1466 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", 1467 | "requires": { 1468 | "to-regex-range": "^5.0.1" 1469 | } 1470 | }, 1471 | "finalhandler": { 1472 | "version": "1.3.1", 1473 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", 1474 | "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", 1475 | "requires": { 1476 | "debug": "2.6.9", 1477 | "encodeurl": "~2.0.0", 1478 | "escape-html": "~1.0.3", 1479 | "on-finished": "2.4.1", 1480 | "parseurl": "~1.3.3", 1481 | "statuses": "2.0.1", 1482 | "unpipe": "~1.0.0" 1483 | } 1484 | }, 1485 | "forwarded": { 1486 | "version": "0.2.0", 1487 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", 1488 | "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==" 1489 | }, 1490 | "fresh": { 1491 | "version": "0.5.2", 1492 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", 1493 | "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==" 1494 | }, 1495 | "fsevents": { 1496 | "version": "2.3.2", 1497 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", 1498 | "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", 1499 | "optional": true 1500 | }, 1501 | "function-bind": { 1502 | "version": "1.1.2", 1503 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", 1504 | "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" 1505 | }, 1506 | "get-intrinsic": { 1507 | "version": "1.2.7", 1508 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz", 1509 | "integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==", 1510 | "requires": { 1511 | "call-bind-apply-helpers": "^1.0.1", 1512 | "es-define-property": "^1.0.1", 1513 | "es-errors": "^1.3.0", 1514 | "es-object-atoms": "^1.0.0", 1515 | "function-bind": "^1.1.2", 1516 | "get-proto": "^1.0.0", 1517 | "gopd": "^1.2.0", 1518 | "has-symbols": "^1.1.0", 1519 | "hasown": "^2.0.2", 1520 | "math-intrinsics": "^1.1.0" 1521 | } 1522 | }, 1523 | "get-proto": { 1524 | "version": "1.0.1", 1525 | "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", 1526 | "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", 1527 | "requires": { 1528 | "dunder-proto": "^1.0.1", 1529 | "es-object-atoms": "^1.0.0" 1530 | } 1531 | }, 1532 | "glob-parent": { 1533 | "version": "5.1.2", 1534 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 1535 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 1536 | "requires": { 1537 | "is-glob": "^4.0.1" 1538 | } 1539 | }, 1540 | "gopd": { 1541 | "version": "1.2.0", 1542 | "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", 1543 | "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==" 1544 | }, 1545 | "has-flag": { 1546 | "version": "3.0.0", 1547 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 1548 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" 1549 | }, 1550 | "has-symbols": { 1551 | "version": "1.1.0", 1552 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", 1553 | "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==" 1554 | }, 1555 | "hasown": { 1556 | "version": "2.0.2", 1557 | "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", 1558 | "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", 1559 | "requires": { 1560 | "function-bind": "^1.1.2" 1561 | } 1562 | }, 1563 | "http-errors": { 1564 | "version": "2.0.0", 1565 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", 1566 | "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", 1567 | "requires": { 1568 | "depd": "2.0.0", 1569 | "inherits": "2.0.4", 1570 | "setprototypeof": "1.2.0", 1571 | "statuses": "2.0.1", 1572 | "toidentifier": "1.0.1" 1573 | } 1574 | }, 1575 | "iconv-lite": { 1576 | "version": "0.4.24", 1577 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 1578 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 1579 | "requires": { 1580 | "safer-buffer": ">= 2.1.2 < 3" 1581 | } 1582 | }, 1583 | "ignore-by-default": { 1584 | "version": "1.0.1", 1585 | "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", 1586 | "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=" 1587 | }, 1588 | "inherits": { 1589 | "version": "2.0.4", 1590 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 1591 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" 1592 | }, 1593 | "ipaddr.js": { 1594 | "version": "1.9.1", 1595 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", 1596 | "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" 1597 | }, 1598 | "is-binary-path": { 1599 | "version": "2.1.0", 1600 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", 1601 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", 1602 | "requires": { 1603 | "binary-extensions": "^2.0.0" 1604 | } 1605 | }, 1606 | "is-extglob": { 1607 | "version": "2.1.1", 1608 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 1609 | "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==" 1610 | }, 1611 | "is-glob": { 1612 | "version": "4.0.3", 1613 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", 1614 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", 1615 | "requires": { 1616 | "is-extglob": "^2.1.1" 1617 | } 1618 | }, 1619 | "is-number": { 1620 | "version": "7.0.0", 1621 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 1622 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" 1623 | }, 1624 | "math-intrinsics": { 1625 | "version": "1.1.0", 1626 | "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", 1627 | "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==" 1628 | }, 1629 | "media-typer": { 1630 | "version": "0.3.0", 1631 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", 1632 | "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==" 1633 | }, 1634 | "merge-descriptors": { 1635 | "version": "1.0.3", 1636 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", 1637 | "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==" 1638 | }, 1639 | "methods": { 1640 | "version": "1.1.2", 1641 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", 1642 | "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" 1643 | }, 1644 | "mime": { 1645 | "version": "1.6.0", 1646 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", 1647 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" 1648 | }, 1649 | "mime-db": { 1650 | "version": "1.52.0", 1651 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 1652 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" 1653 | }, 1654 | "mime-types": { 1655 | "version": "2.1.35", 1656 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 1657 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 1658 | "requires": { 1659 | "mime-db": "1.52.0" 1660 | } 1661 | }, 1662 | "minimatch": { 1663 | "version": "3.1.2", 1664 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", 1665 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", 1666 | "requires": { 1667 | "brace-expansion": "^1.1.7" 1668 | } 1669 | }, 1670 | "ms": { 1671 | "version": "2.0.0", 1672 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 1673 | "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" 1674 | }, 1675 | "negotiator": { 1676 | "version": "0.6.3", 1677 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", 1678 | "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==" 1679 | }, 1680 | "nodemon": { 1681 | "version": "3.1.9", 1682 | "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.9.tgz", 1683 | "integrity": "sha512-hdr1oIb2p6ZSxu3PB2JWWYS7ZQ0qvaZsc3hK8DR8f02kRzc8rjYmxAIvdz+aYC+8F2IjNaB7HMcSDg8nQpJxyg==", 1684 | "requires": { 1685 | "chokidar": "^3.5.2", 1686 | "debug": "^4", 1687 | "ignore-by-default": "^1.0.1", 1688 | "minimatch": "^3.1.2", 1689 | "pstree.remy": "^1.1.8", 1690 | "semver": "^7.5.3", 1691 | "simple-update-notifier": "^2.0.0", 1692 | "supports-color": "^5.5.0", 1693 | "touch": "^3.1.0", 1694 | "undefsafe": "^2.0.5" 1695 | }, 1696 | "dependencies": { 1697 | "debug": { 1698 | "version": "4.4.0", 1699 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", 1700 | "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", 1701 | "requires": { 1702 | "ms": "^2.1.3" 1703 | } 1704 | }, 1705 | "ms": { 1706 | "version": "2.1.3", 1707 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 1708 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" 1709 | } 1710 | } 1711 | }, 1712 | "nopt": { 1713 | "version": "1.0.10", 1714 | "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", 1715 | "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", 1716 | "requires": { 1717 | "abbrev": "1" 1718 | } 1719 | }, 1720 | "normalize-path": { 1721 | "version": "3.0.0", 1722 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", 1723 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" 1724 | }, 1725 | "object-assign": { 1726 | "version": "4.1.1", 1727 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 1728 | "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" 1729 | }, 1730 | "object-inspect": { 1731 | "version": "1.13.3", 1732 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", 1733 | "integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==" 1734 | }, 1735 | "on-finished": { 1736 | "version": "2.4.1", 1737 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", 1738 | "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", 1739 | "requires": { 1740 | "ee-first": "1.1.1" 1741 | } 1742 | }, 1743 | "parseurl": { 1744 | "version": "1.3.3", 1745 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", 1746 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" 1747 | }, 1748 | "path-to-regexp": { 1749 | "version": "0.1.12", 1750 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", 1751 | "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==" 1752 | }, 1753 | "picomatch": { 1754 | "version": "2.3.1", 1755 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", 1756 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" 1757 | }, 1758 | "proxy-addr": { 1759 | "version": "2.0.7", 1760 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", 1761 | "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", 1762 | "requires": { 1763 | "forwarded": "0.2.0", 1764 | "ipaddr.js": "1.9.1" 1765 | } 1766 | }, 1767 | "pstree.remy": { 1768 | "version": "1.1.8", 1769 | "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", 1770 | "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==" 1771 | }, 1772 | "qs": { 1773 | "version": "6.13.0", 1774 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", 1775 | "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", 1776 | "requires": { 1777 | "side-channel": "^1.0.6" 1778 | } 1779 | }, 1780 | "range-parser": { 1781 | "version": "1.2.1", 1782 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", 1783 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" 1784 | }, 1785 | "raw-body": { 1786 | "version": "2.5.2", 1787 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", 1788 | "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", 1789 | "requires": { 1790 | "bytes": "3.1.2", 1791 | "http-errors": "2.0.0", 1792 | "iconv-lite": "0.4.24", 1793 | "unpipe": "1.0.0" 1794 | } 1795 | }, 1796 | "readdirp": { 1797 | "version": "3.6.0", 1798 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", 1799 | "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", 1800 | "requires": { 1801 | "picomatch": "^2.2.1" 1802 | } 1803 | }, 1804 | "safe-buffer": { 1805 | "version": "5.2.1", 1806 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 1807 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" 1808 | }, 1809 | "safer-buffer": { 1810 | "version": "2.1.2", 1811 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 1812 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 1813 | }, 1814 | "semver": { 1815 | "version": "7.6.3", 1816 | "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", 1817 | "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==" 1818 | }, 1819 | "send": { 1820 | "version": "0.19.0", 1821 | "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", 1822 | "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", 1823 | "requires": { 1824 | "debug": "2.6.9", 1825 | "depd": "2.0.0", 1826 | "destroy": "1.2.0", 1827 | "encodeurl": "~1.0.2", 1828 | "escape-html": "~1.0.3", 1829 | "etag": "~1.8.1", 1830 | "fresh": "0.5.2", 1831 | "http-errors": "2.0.0", 1832 | "mime": "1.6.0", 1833 | "ms": "2.1.3", 1834 | "on-finished": "2.4.1", 1835 | "range-parser": "~1.2.1", 1836 | "statuses": "2.0.1" 1837 | }, 1838 | "dependencies": { 1839 | "encodeurl": { 1840 | "version": "1.0.2", 1841 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", 1842 | "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==" 1843 | }, 1844 | "ms": { 1845 | "version": "2.1.3", 1846 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 1847 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" 1848 | } 1849 | } 1850 | }, 1851 | "serve-static": { 1852 | "version": "1.16.2", 1853 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", 1854 | "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", 1855 | "requires": { 1856 | "encodeurl": "~2.0.0", 1857 | "escape-html": "~1.0.3", 1858 | "parseurl": "~1.3.3", 1859 | "send": "0.19.0" 1860 | } 1861 | }, 1862 | "setprototypeof": { 1863 | "version": "1.2.0", 1864 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", 1865 | "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" 1866 | }, 1867 | "side-channel": { 1868 | "version": "1.1.0", 1869 | "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", 1870 | "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", 1871 | "requires": { 1872 | "es-errors": "^1.3.0", 1873 | "object-inspect": "^1.13.3", 1874 | "side-channel-list": "^1.0.0", 1875 | "side-channel-map": "^1.0.1", 1876 | "side-channel-weakmap": "^1.0.2" 1877 | } 1878 | }, 1879 | "side-channel-list": { 1880 | "version": "1.0.0", 1881 | "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", 1882 | "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", 1883 | "requires": { 1884 | "es-errors": "^1.3.0", 1885 | "object-inspect": "^1.13.3" 1886 | } 1887 | }, 1888 | "side-channel-map": { 1889 | "version": "1.0.1", 1890 | "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", 1891 | "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", 1892 | "requires": { 1893 | "call-bound": "^1.0.2", 1894 | "es-errors": "^1.3.0", 1895 | "get-intrinsic": "^1.2.5", 1896 | "object-inspect": "^1.13.3" 1897 | } 1898 | }, 1899 | "side-channel-weakmap": { 1900 | "version": "1.0.2", 1901 | "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", 1902 | "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", 1903 | "requires": { 1904 | "call-bound": "^1.0.2", 1905 | "es-errors": "^1.3.0", 1906 | "get-intrinsic": "^1.2.5", 1907 | "object-inspect": "^1.13.3", 1908 | "side-channel-map": "^1.0.1" 1909 | } 1910 | }, 1911 | "simple-update-notifier": { 1912 | "version": "2.0.0", 1913 | "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", 1914 | "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", 1915 | "requires": { 1916 | "semver": "^7.5.3" 1917 | } 1918 | }, 1919 | "statuses": { 1920 | "version": "2.0.1", 1921 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", 1922 | "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==" 1923 | }, 1924 | "supports-color": { 1925 | "version": "5.5.0", 1926 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 1927 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 1928 | "requires": { 1929 | "has-flag": "^3.0.0" 1930 | } 1931 | }, 1932 | "to-regex-range": { 1933 | "version": "5.0.1", 1934 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 1935 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 1936 | "requires": { 1937 | "is-number": "^7.0.0" 1938 | } 1939 | }, 1940 | "toidentifier": { 1941 | "version": "1.0.1", 1942 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", 1943 | "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==" 1944 | }, 1945 | "touch": { 1946 | "version": "3.1.0", 1947 | "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", 1948 | "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", 1949 | "requires": { 1950 | "nopt": "~1.0.10" 1951 | } 1952 | }, 1953 | "type-is": { 1954 | "version": "1.6.18", 1955 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", 1956 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", 1957 | "requires": { 1958 | "media-typer": "0.3.0", 1959 | "mime-types": "~2.1.24" 1960 | } 1961 | }, 1962 | "undefsafe": { 1963 | "version": "2.0.5", 1964 | "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", 1965 | "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==" 1966 | }, 1967 | "unpipe": { 1968 | "version": "1.0.0", 1969 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", 1970 | "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==" 1971 | }, 1972 | "utils-merge": { 1973 | "version": "1.0.1", 1974 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", 1975 | "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" 1976 | }, 1977 | "vary": { 1978 | "version": "1.1.2", 1979 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", 1980 | "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" 1981 | }, 1982 | "zxcvbn": { 1983 | "version": "4.4.2", 1984 | "resolved": "https://registry.npmjs.org/zxcvbn/-/zxcvbn-4.4.2.tgz", 1985 | "integrity": "sha1-KOwXzwl0PtyrBW3dixsGJizHPDA=" 1986 | } 1987 | } 1988 | } 1989 | -------------------------------------------------------------------------------- /server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "signup", 3 | "version": "0.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index.js" 8 | }, 9 | "private": true, 10 | "license": "Unlicense", 11 | "author": "Mathias Schäfer (https://molily.de)", 12 | "dependencies": { 13 | "cors": "^2.8.5", 14 | "express": "^4.21.2", 15 | "express-rate-limit": "^7.5.0", 16 | "nodemon": "^3.1.9", 17 | "zxcvbn": "^4.4.2" 18 | } 19 | } 20 | --------------------------------------------------------------------------------