Template base para proyectos SaaS multi-tenant. Estructura inicial: - apps/backend (NestJS API) - apps/frontend (React/Vite) - apps/database (PostgreSQL DDL) - docs/ (Documentación) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
29 lines
1.2 KiB
JavaScript
29 lines
1.2 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.getStorageToken = exports.getOptionsToken = exports.ThrottlerStorageProvider = void 0;
|
|
exports.createThrottlerProviders = createThrottlerProviders;
|
|
const throttler_storage_interface_1 = require("./throttler-storage.interface");
|
|
const throttler_constants_1 = require("./throttler.constants");
|
|
const throttler_service_1 = require("./throttler.service");
|
|
function createThrottlerProviders(options) {
|
|
return [
|
|
{
|
|
provide: throttler_constants_1.THROTTLER_OPTIONS,
|
|
useValue: options,
|
|
},
|
|
];
|
|
}
|
|
exports.ThrottlerStorageProvider = {
|
|
provide: throttler_storage_interface_1.ThrottlerStorage,
|
|
useFactory: (options) => {
|
|
return !Array.isArray(options) && options.storage
|
|
? options.storage
|
|
: new throttler_service_1.ThrottlerStorageService();
|
|
},
|
|
inject: [throttler_constants_1.THROTTLER_OPTIONS],
|
|
};
|
|
const getOptionsToken = () => throttler_constants_1.THROTTLER_OPTIONS;
|
|
exports.getOptionsToken = getOptionsToken;
|
|
const getStorageToken = () => throttler_storage_interface_1.ThrottlerStorage;
|
|
exports.getStorageToken = getStorageToken;
|
|
//# sourceMappingURL=throttler.providers.js.map
|