 
  
  import {useContainer, Validator} from "class-validator";
useContainer(Container);async function bootstrap() {
  const app = await NestFactory.create(AppModule);
  useContainer(app.select(AppModule), { fallbackOnErrors: true });
...}import {ValidatorConstraint, ValidatorConstraintInterface} from 'class-validator';
import {UsersService} from './user.service';
import {Injectable} from '@nestjs/common';
@ValidatorConstraint({ name: 'isUserAlreadyExist', async: true })
@Injectable() // this is needed in order to the class be injected into the module
export class IsUserAlreadyExist implements ValidatorConstraintInterface {
    constructor(protected readonly usersService: UsersService) {}
    async validate(text: string) {
        const user = await this.usersService.findOne({
            email: text
        });
        return !user;
    }
}@Module({
    controllers: [UsersController],
    providers: [IsUserAlreadyExist, UsersService],
    imports: [],
    exports: []
})
export class UserModule {
}Как выделить мышкой область на странице и присвоить класс элементам попавшим в эту область?
Может кто нибудь предложит решение на примере со скришота
import logging
from flask import Flask, request, jsonify
app = Flask(__name__)
@app.route('/api/v1/skill', methods=['POST'])
def skill():
        request_json = request.json
        if 'request' in request_json:
                command = request_json['request']['command']
        if 'Включи аудио стрим' in command:
                response_text = 'Включаю аудио стрим'
                url = 'http://you.site/stream.mp3'
                return jsonify({
                        "version": request_json['version'],
                        "response": {
                                "text": response_text,
                                "tts": response_text,
                                "buttons": [],
                                "end_session": False
                        },
                        "session": request_json['session'],
                        "user_id": request_json['session']['user_id'],
                        "audio": {
                                "url": url
                        }
                })
        return jsonify({'status': 'error'})
if __name__ == '__main__':
        app.run(host='0.0.0.0', port=5000){
        "key": "ctrl+`",
        "command": "workbench.action.terminal.focus"
    },
    {
        "key": "ctrl+`",
        "command": "workbench.action.focusActiveEditorGroup",
        "when": "terminalFocus"
    }stream { server { ... } } stream {
 server {
  listen $ext_ip:5432 so_keepalive=on;
  proxy_pass $lan_ip:5432;
 }
}server {
        listen       80;
        server_name  localhost;
        location / {
            root   /var/www/html;
            index  index.php;
        }
        location /metrics {
            stub_status;
            allow 127.0.0.1;
            deny all;
        }
        location ~ \.php$ {
            root           /var/www/html;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  /var/www/html$fastcgi_script_name;
            include        fastcgi_params;
        }
    }#!/bin/bash
ALL_CHANGED_FILES='[
  "monorepo/spfx-packages/news/src/webparts/news",
  "monorepo/spfx-packages/news/config",
  "monorepo/spfx-packages/news",
  "monorepo/spfx-packages/news/src/webparts/news/loc",
  "monorepo/spfx-packages/alert/src/webparts/alert",
  "monorepo/spfx-packages/alert/config",
  "monorepo/spfx-packages/alert",
  "monorepo/spfx-packages/alert/src/webparts/alert/loc"
]'
echo "$ALL_CHANGED_FILES" | sed -rn 's@([^/]+/[^/]+/[^/]+)/.+@\1"@p' | sort -u | sed -r '$!s/.+/&,/'http {
    geoip_country /path/to/GeoLite2-Country.mmdb;
    map $geoip_country_code $allowed_country {
        default yes;
        IN no; # banned india
    }
}
server {
    if ($allowed_country = no) {
        return 403;
    }
}class PrevClickListener {
    constructor(track, next) {
        this.track = track;
        this.next = next;
    }
    handleEvent() {
        const {track, next} = this;
        next.removeAttribute('disabled');
        track.scrollTo({
            left: track.scrollLeft - track.firstElementChild.offsetWidth,
            behavior: 'smooth',
        });
    }
}
class NextClickListener {
    constructor(track, prev) {
        this.track = track;
        this.prev = prev;
    }
    handleEvent() {
        const {track, prev} = this;
        prev.removeAttribute('disabled');
        track.scrollTo({
            left: track.scrollLeft + track.firstElementChild.offsetWidth,
            behavior: 'smooth',
        });
    }
}
class TrackScrollListener {
    constructor(track, prev, next) {
        this.track = track;
        this.prev = prev;
        this.next = next;
    }
    handleEvent() {
        const {track, next, prev} = this;
        const trackScrollWidth = track.scrollWidth;
        const trackOuterWidth = track.clientWidth;
        prev.removeAttribute('disabled');
        next.removeAttribute('disabled');
        if (track.scrollLeft <= 0) {
            prev.setAttribute('disabled', '');
        }
        if (track.scrollLeft === trackScrollWidth - trackOuterWidth) {
            next.setAttribute('disabled', '');
        }
    }
}
const sliders = document.querySelectorAll('[data-slider]');
for (const slider of sliders) {
    const track = slider.querySelector('[data-slider-track]');
    const prev = slider.querySelector('[data-slider-prev]');
    const next = slider.querySelector('[data-slider-next]');
    if (!track || !prev || !next) continue;
    prev.addEventListener('click', new PrevClickListener(track, next));
    next.addEventListener('click', new NextClickListener(track, prev));
    track.addEventListener('scroll', new TrackScrollListener(track, prev, next));
}