.
|-package.json
|-turbo.json
|-apps
| |-backend
| | |-package.json
| | |-turbo
| | | |-generators
| | | | |-package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Module, Global } from '@nestjs/common'; | |
| import { BypassExtClientModule } from './prisma-client/client-extension-proxies/bypass'; | |
| import { TenancyExtClientModule } from './prisma-client/client-extension-proxies/tenancy'; | |
| import { PrismaTenancyService } from './prisma-tenancy.service'; | |
| import { ClsModule } from 'nestjs-cls'; | |
| @Module({ | |
| imports: [BypassExtClientModule, TenancyExtClientModule, ClsModule], | |
| providers: [PrismaTenancyService], | |
| exports: [PrismaTenancyService] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Injectable, Inject } from '@nestjs/common'; | |
| import { ClsService } from 'nestjs-cls'; | |
| import { BYPASS_CLIENT_TOKEN, ExtendedBypassClient } from './prisma-client/client-extension-proxies/bypass'; | |
| import { TENANCY_CLIENT_TOKEN, ExtendedTenantClient } from './prisma-client/client-extension-proxies/tenancy'; | |
| import { SessionUser } from 'types'; | |
| @Injectable() | |
| export class PrismaTenancyService { | |
| constructor( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { NestFactory } from '@nestjs/core'; | |
| import { AppModule } from './app.module'; | |
| import { PrismaService } from 'prisma-tenancy'; | |
| import { ClsMiddleware } from 'nestjs-cls'; | |
| async function bootstrap() { | |
| const app = await NestFactory.create(AppModule); | |
| app.setGlobalPrefix('nest'); | |
| app.use(new ClsMiddleware({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"/> | |
| <title>for-in vs. Object.keys vs. Сached keys</title> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
| <script src="./suite.js"></script> | |
| </head> | |
| <body> | |
| <h1>Open the console to view the results</h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| --- | |
| name: Class.PatternMutators | |
| description: Pattern-Based Mutation for MooTools 1.3 | |
| license: MIT-style license. | |
| copyright: Mark Obcena |