@punks/backend-entity-manager 0.0.84 → 0.0.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +11 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/platforms/nest/index.d.ts +1 -0
- package/dist/cjs/types/platforms/nest/infrastructure/api.d.ts +8 -0
- package/dist/cjs/types/platforms/nest/infrastructure/index.d.ts +1 -8
- package/dist/esm/index.js +12 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/platforms/nest/index.d.ts +1 -0
- package/dist/esm/types/platforms/nest/infrastructure/api.d.ts +8 -0
- package/dist/esm/types/platforms/nest/infrastructure/index.d.ts +1 -8
- package/dist/index.d.ts +10 -4
- package/package.json +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type { Response } from "express";
|
|
3
|
+
import { StreamableFile } from "@nestjs/common";
|
|
4
|
+
export declare const createExpressFileResponse: (res: Response, file: {
|
|
5
|
+
content: Buffer;
|
|
6
|
+
contentType: string;
|
|
7
|
+
name: string;
|
|
8
|
+
}) => StreamableFile;
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import type { Response } from "express";
|
|
3
|
-
import { StreamableFile } from "@nestjs/common";
|
|
4
|
-
export declare const createExpressFileResponse: (res: Response, file: {
|
|
5
|
-
content: Buffer;
|
|
6
|
-
contentType: string;
|
|
7
|
-
name: string;
|
|
8
|
-
}) => StreamableFile;
|
|
1
|
+
export { createExpressFileResponse } from "./api";
|
package/dist/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Log, excelBuild, csvBuild, isNullOrUndefined, sort, byField, toDict, newUuid as newUuid$1, ensureTailingSlash, removeUndefinedProps } from '@punks/backend-core';
|
|
2
|
-
import { applyDecorators, Injectable, SetMetadata, Global, Module, Scope, Logger, HttpException, HttpStatus } from '@nestjs/common';
|
|
2
|
+
import { applyDecorators, Injectable, SetMetadata, Global, Module, Scope, Logger, StreamableFile, HttpException, HttpStatus } from '@nestjs/common';
|
|
3
3
|
import { ApiProperty } from '@nestjs/swagger';
|
|
4
4
|
import { Reflector } from '@nestjs/core';
|
|
5
5
|
import { AsyncLocalStorage } from 'async_hooks';
|
|
@@ -9,11 +9,11 @@ import { STATIC_CONTEXT } from '@nestjs/core/injector/constants';
|
|
|
9
9
|
import { MetadataScanner } from '@nestjs/core/metadata-scanner';
|
|
10
10
|
import { JwtService, JwtModule } from '@nestjs/jwt';
|
|
11
11
|
import { EventEmitter2, EventEmitterModule } from '@nestjs/event-emitter';
|
|
12
|
+
import require$$2, { createReadStream } from 'fs';
|
|
12
13
|
import { In } from 'typeorm';
|
|
13
14
|
import { ListObjectsCommand, PutObjectCommand, GetObjectCommand, DeleteObjectCommand, S3Client } from '@aws-sdk/client-s3';
|
|
14
15
|
import { getSignedUrl } from '@aws-sdk/s3-request-presigner';
|
|
15
16
|
import { SendEmailCommand, SESClient } from '@aws-sdk/client-ses';
|
|
16
|
-
import require$$2 from 'fs';
|
|
17
17
|
import { MailService } from '@sendgrid/mail';
|
|
18
18
|
|
|
19
19
|
var BucketItemType;
|
|
@@ -21252,6 +21252,15 @@ MultiTenancyModule = __decorate([
|
|
|
21252
21252
|
})
|
|
21253
21253
|
], MultiTenancyModule);
|
|
21254
21254
|
|
|
21255
|
+
const createExpressFileResponse = (res, file) => {
|
|
21256
|
+
const stream = createReadStream(file.content);
|
|
21257
|
+
res.set({
|
|
21258
|
+
"Content-Type": file.contentType,
|
|
21259
|
+
"Content-Disposition": `attachment; filename="${file.name}"`,
|
|
21260
|
+
});
|
|
21261
|
+
return new StreamableFile(stream);
|
|
21262
|
+
};
|
|
21263
|
+
|
|
21255
21264
|
class QueryBuilderBase {
|
|
21256
21265
|
getIndexBasedPagingResult({ paging, totResults, currentPageResults, }) {
|
|
21257
21266
|
if (!paging) {
|
|
@@ -27125,5 +27134,5 @@ InMemoryEmailProvider = __decorate([
|
|
|
27125
27134
|
WpEmailProvider("in-memory")
|
|
27126
27135
|
], InMemoryEmailProvider);
|
|
27127
27136
|
|
|
27128
|
-
export { AUTHENTICATION_EVENTS_NAMESPACE, AppExceptionsFilterBase, AppHashingService, AppInMemorySettings, AppSessionMiddleware, AppSessionService, AuthGuard, Authenticated, AuthenticationEmailTemplates, AuthenticationError, AuthenticationEvents, AuthenticationExtensionSymbols, AuthenticationModule, AuthenticationService, AwsBucketModule, AwsEmailModule, AwsS2BucketError, AwsS3BucketProvider, AwsSesEmailTemplate, BooleanFacet, BooleanFacetItem, BucketItemType, EmailService, EntityManagerConfigurationError, EntityManagerException, EntityManagerInitializer, EntityManagerModule, EntityManagerRegistry, EntityManagerService, EntityManagerSymbols, EntityManagerUnauthorizedException, EntityNotFoundException, EntityOperationType, EntityOperationUnauthorizedException, EntitySeeder, EntitySerializationFormat, EntitySerializer, EventsService, InMemoryBucketProvider, InMemoryEmailProvider, InvalidCredentialsError, MemberOf, MissingEntityIdError, ModulesContainerProvider, MultiTenancyModule, MultipleEntitiesFoundException, NestEntityActions, NestEntityAuthorizationMiddleware, NestEntityManager, NestEntitySerializer, NestPipelineTemplate, NestTypeOrmEntitySeeder, NestTypeOrmQueryBuilder, NestTypeOrmRepository, NumericFacet, NumericFacetItem, OperationTokenMismatchError, PLATFORM_EVENT_NAMESPACE, PipelineController, PipelineErrorType, PipelineStatus, PipelineStepErrorType, PipelinesBuilder, PipelinesRunner, PlatformEvents, Public, QueryBuilderBase, ReplicationMode, Roles, SendgridEmailModule, SendgridEmailTemplate, SortDirection, StringFacet, StringFacetItem, TrackingService, UserCreationError, UserRegistrationError, WpAppInitializer, WpAwsSesEmailTemplate, WpBucketProvider, WpEmailTemplate, WpEntity, WpEntityActions, WpEntityAdapter, WpEntityAuthMiddleware, WpEntityConnector, WpEntityConverter, WpEntityManager, WpEntityQueryBuilder, WpEntityRepository, WpEntitySeeder, WpEntitySerializer, WpEventsTracker, WpPipeline, WpRolesService, WpSendgridEmailTemplate, WpUserRolesService, WpUserService, buildRolesGuard, getLocalizedText, newUuid, renderHandlebarsTemplate };
|
|
27137
|
+
export { AUTHENTICATION_EVENTS_NAMESPACE, AppExceptionsFilterBase, AppHashingService, AppInMemorySettings, AppSessionMiddleware, AppSessionService, AuthGuard, Authenticated, AuthenticationEmailTemplates, AuthenticationError, AuthenticationEvents, AuthenticationExtensionSymbols, AuthenticationModule, AuthenticationService, AwsBucketModule, AwsEmailModule, AwsS2BucketError, AwsS3BucketProvider, AwsSesEmailTemplate, BooleanFacet, BooleanFacetItem, BucketItemType, EmailService, EntityManagerConfigurationError, EntityManagerException, EntityManagerInitializer, EntityManagerModule, EntityManagerRegistry, EntityManagerService, EntityManagerSymbols, EntityManagerUnauthorizedException, EntityNotFoundException, EntityOperationType, EntityOperationUnauthorizedException, EntitySeeder, EntitySerializationFormat, EntitySerializer, EventsService, InMemoryBucketProvider, InMemoryEmailProvider, InvalidCredentialsError, MemberOf, MissingEntityIdError, ModulesContainerProvider, MultiTenancyModule, MultipleEntitiesFoundException, NestEntityActions, NestEntityAuthorizationMiddleware, NestEntityManager, NestEntitySerializer, NestPipelineTemplate, NestTypeOrmEntitySeeder, NestTypeOrmQueryBuilder, NestTypeOrmRepository, NumericFacet, NumericFacetItem, OperationTokenMismatchError, PLATFORM_EVENT_NAMESPACE, PipelineController, PipelineErrorType, PipelineStatus, PipelineStepErrorType, PipelinesBuilder, PipelinesRunner, PlatformEvents, Public, QueryBuilderBase, ReplicationMode, Roles, SendgridEmailModule, SendgridEmailTemplate, SortDirection, StringFacet, StringFacetItem, TrackingService, UserCreationError, UserRegistrationError, WpAppInitializer, WpAwsSesEmailTemplate, WpBucketProvider, WpEmailTemplate, WpEntity, WpEntityActions, WpEntityAdapter, WpEntityAuthMiddleware, WpEntityConnector, WpEntityConverter, WpEntityManager, WpEntityQueryBuilder, WpEntityRepository, WpEntitySeeder, WpEntitySerializer, WpEventsTracker, WpPipeline, WpRolesService, WpSendgridEmailTemplate, WpUserRolesService, WpUserService, buildRolesGuard, createExpressFileResponse, getLocalizedText, newUuid, renderHandlebarsTemplate };
|
|
27129
27138
|
//# sourceMappingURL=index.js.map
|