@flusys/nestjs-storage 7.1.0 → 8.0.0
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/config/index.d.ts +3 -3
- package/controllers/file-manager.controller.d.ts +4 -4
- package/controllers/folder.controller.d.ts +2 -2
- package/controllers/index.d.ts +4 -4
- package/controllers/storage-config.controller.d.ts +2 -2
- package/controllers/upload.controller.d.ts +3 -3
- package/docs/index.d.ts +1 -1
- package/docs/storage-swagger.config.d.ts +2 -2
- package/dtos/index.d.ts +4 -4
- package/entities/file-manager-with-company.entity.d.ts +2 -2
- package/entities/file-manager.entity.d.ts +1 -1
- package/entities/folder-with-company.entity.d.ts +1 -1
- package/entities/index.d.ts +15 -15
- package/entities/storage-config-with-company.entity.d.ts +1 -1
- package/enums/index.d.ts +1 -1
- package/fesm/493.js +2768 -0
- package/fesm/537.js +1157 -0
- package/fesm/562.js +786 -0
- package/fesm/{providers/azure-provider.optional.js → chunks/190.js} +33 -30
- package/fesm/chunks/252.js +12 -0
- package/fesm/chunks/327.js +12 -0
- package/fesm/chunks/385.js +12 -0
- package/fesm/{providers/s3-provider.optional.js → chunks/591.js} +37 -34
- package/fesm/chunks/746.js +12 -0
- package/fesm/chunks/798.js +12 -0
- package/fesm/{providers/sftp-provider.optional.js → chunks/918.js} +35 -31
- package/fesm/config/index.js +119 -3
- package/fesm/controllers/index.js +16 -4
- package/fesm/docs/index.js +206 -1
- package/fesm/dtos/index.js +879 -4
- package/fesm/entities/index.js +463 -18
- package/fesm/enums/index.js +36 -1
- package/fesm/index.js +398 -12
- package/fesm/interfaces/index.js +19 -5
- package/fesm/modules/index.js +16 -1
- package/fesm/providers/index.js +364 -3
- package/fesm/runtime.js +252 -0
- package/fesm/services/index.js +16 -6
- package/fesm/utils/index.js +149 -1
- package/index.d.ts +11 -11
- package/interfaces/file-manager.interface.d.ts +1 -1
- package/interfaces/folder.interface.d.ts +1 -1
- package/interfaces/index.d.ts +5 -5
- package/interfaces/storage-config.interface.d.ts +1 -1
- package/interfaces/storage-module-options.interface.d.ts +3 -3
- package/interfaces/storage-provider.interface.d.ts +1 -1
- package/middlewares/file-serve.middleware.d.ts +4 -3
- package/middlewares/index.d.ts +1 -1
- package/modules/index.d.ts +1 -1
- package/modules/storage.module.d.ts +2 -2
- package/package.json +30 -41
- package/providers/azure-provider.optional.d.ts +2 -2
- package/providers/index.d.ts +3 -3
- package/providers/local-provider.d.ts +2 -2
- package/providers/s3-provider.optional.d.ts +2 -2
- package/providers/sftp-provider.optional.d.ts +2 -2
- package/providers/storage-factory.service.d.ts +3 -3
- package/providers/storage-provider.registry.d.ts +2 -2
- package/services/file-manager.service.d.ts +9 -8
- package/services/folder.service.d.ts +6 -6
- package/services/index.d.ts +6 -6
- package/services/storage-config.service.d.ts +3 -3
- package/services/storage-datasource.provider.d.ts +3 -3
- package/services/storage-provider-config.service.d.ts +7 -7
- package/services/upload.service.d.ts +6 -6
- package/utils/image-compressor.util.d.ts +1 -1
- package/utils/index.d.ts +1 -1
- package/cjs/config/event-actions.js +0 -34
- package/cjs/config/index.js +0 -20
- package/cjs/config/message-keys.js +0 -46
- package/cjs/config/storage.constants.js +0 -28
- package/cjs/controllers/file-manager.controller.js +0 -152
- package/cjs/controllers/file-manager.controller.spec.js +0 -135
- package/cjs/controllers/folder.controller.js +0 -102
- package/cjs/controllers/folder.controller.spec.js +0 -86
- package/cjs/controllers/index.js +0 -21
- package/cjs/controllers/storage-config.controller.js +0 -102
- package/cjs/controllers/storage-config.controller.spec.js +0 -85
- package/cjs/controllers/upload.controller.js +0 -234
- package/cjs/controllers/upload.controller.spec.js +0 -132
- package/cjs/docs/index.js +0 -11
- package/cjs/docs/storage-swagger.config.js +0 -188
- package/cjs/docs/storage-swagger.config.spec.js +0 -72
- package/cjs/dtos/file-manager.dto.js +0 -327
- package/cjs/dtos/folder.dto.js +0 -105
- package/cjs/dtos/index.js +0 -21
- package/cjs/dtos/storage-config.dto.js +0 -170
- package/cjs/dtos/upload.dto.js +0 -272
- package/cjs/entities/file-manager-with-company.entity.js +0 -61
- package/cjs/entities/file-manager.entity.js +0 -122
- package/cjs/entities/folder-with-company.entity.js +0 -55
- package/cjs/entities/folder.entity.js +0 -64
- package/cjs/entities/index.js +0 -63
- package/cjs/entities/index.spec.js +0 -18
- package/cjs/entities/storage-config-with-company.entity.js +0 -51
- package/cjs/entities/storage-config.entity.js +0 -96
- package/cjs/enums/file-location.enum.js +0 -17
- package/cjs/enums/index.js +0 -18
- package/cjs/index.js +0 -29
- package/cjs/interfaces/file-manager.interface.js +0 -4
- package/cjs/interfaces/folder.interface.js +0 -4
- package/cjs/interfaces/index.js +0 -22
- package/cjs/interfaces/storage-config.interface.js +0 -4
- package/cjs/interfaces/storage-module-options.interface.js +0 -4
- package/cjs/interfaces/storage-provider.interface.js +0 -4
- package/cjs/middlewares/file-serve.middleware.js +0 -241
- package/cjs/middlewares/file-serve.middleware.spec.js +0 -211
- package/cjs/middlewares/index.js +0 -18
- package/cjs/modules/index.js +0 -18
- package/cjs/modules/storage.module.js +0 -165
- package/cjs/modules/storage.module.spec.js +0 -184
- package/cjs/providers/azure-provider.optional.js +0 -155
- package/cjs/providers/azure-provider.optional.spec.js +0 -228
- package/cjs/providers/index.js +0 -26
- package/cjs/providers/local-provider.js +0 -230
- package/cjs/providers/local-provider.spec.js +0 -239
- package/cjs/providers/s3-provider.optional.js +0 -175
- package/cjs/providers/s3-provider.optional.spec.js +0 -243
- package/cjs/providers/sftp-provider.optional.js +0 -203
- package/cjs/providers/sftp-provider.optional.spec.js +0 -217
- package/cjs/providers/storage-factory.service.js +0 -175
- package/cjs/providers/storage-factory.service.spec.js +0 -253
- package/cjs/providers/storage-provider.registry.js +0 -41
- package/cjs/providers/storage-provider.registry.spec.js +0 -67
- package/cjs/services/file-manager.service.js +0 -387
- package/cjs/services/file-manager.service.spec.js +0 -580
- package/cjs/services/folder.service.js +0 -101
- package/cjs/services/folder.service.spec.js +0 -167
- package/cjs/services/index.js +0 -23
- package/cjs/services/storage-config.service.js +0 -129
- package/cjs/services/storage-config.service.spec.js +0 -257
- package/cjs/services/storage-datasource.provider.js +0 -137
- package/cjs/services/storage-datasource.provider.spec.js +0 -217
- package/cjs/services/storage-provider-config.service.js +0 -171
- package/cjs/services/storage-provider-config.service.spec.js +0 -265
- package/cjs/services/upload.service.js +0 -376
- package/cjs/services/upload.service.spec.js +0 -426
- package/cjs/utils/file-validator.util.js +0 -440
- package/cjs/utils/file-validator.util.spec.js +0 -259
- package/cjs/utils/image-compressor.util.js +0 -162
- package/cjs/utils/image-compressor.util.spec.js +0 -166
- package/cjs/utils/index.js +0 -18
- package/fesm/config/event-actions.js +0 -13
- package/fesm/config/message-keys.js +0 -22
- package/fesm/config/storage.constants.js +0 -7
- package/fesm/controllers/file-manager.controller.js +0 -142
- package/fesm/controllers/file-manager.controller.spec.js +0 -131
- package/fesm/controllers/folder.controller.js +0 -92
- package/fesm/controllers/folder.controller.spec.js +0 -82
- package/fesm/controllers/storage-config.controller.js +0 -92
- package/fesm/controllers/storage-config.controller.spec.js +0 -81
- package/fesm/controllers/upload.controller.js +0 -224
- package/fesm/controllers/upload.controller.spec.js +0 -128
- package/fesm/docs/storage-swagger.config.js +0 -181
- package/fesm/docs/storage-swagger.config.spec.js +0 -68
- package/fesm/dtos/file-manager.dto.js +0 -300
- package/fesm/dtos/folder.dto.js +0 -84
- package/fesm/dtos/storage-config.dto.js +0 -149
- package/fesm/dtos/upload.dto.js +0 -245
- package/fesm/entities/file-manager-with-company.entity.js +0 -51
- package/fesm/entities/file-manager.entity.js +0 -112
- package/fesm/entities/folder-with-company.entity.js +0 -45
- package/fesm/entities/folder.entity.js +0 -54
- package/fesm/entities/index.spec.js +0 -14
- package/fesm/entities/storage-config-with-company.entity.js +0 -41
- package/fesm/entities/storage-config.entity.js +0 -86
- package/fesm/enums/file-location.enum.js +0 -7
- package/fesm/interfaces/file-manager.interface.js +0 -1
- package/fesm/interfaces/folder.interface.js +0 -1
- package/fesm/interfaces/storage-config.interface.js +0 -1
- package/fesm/interfaces/storage-module-options.interface.js +0 -3
- package/fesm/interfaces/storage-provider.interface.js +0 -4
- package/fesm/middlewares/file-serve.middleware.js +0 -190
- package/fesm/middlewares/file-serve.middleware.spec.js +0 -207
- package/fesm/middlewares/index.js +0 -1
- package/fesm/modules/storage.module.js +0 -156
- package/fesm/modules/storage.module.spec.js +0 -180
- package/fesm/providers/azure-provider.optional.spec.js +0 -224
- package/fesm/providers/local-provider.js +0 -182
- package/fesm/providers/local-provider.spec.js +0 -194
- package/fesm/providers/s3-provider.optional.spec.js +0 -239
- package/fesm/providers/sftp-provider.optional.spec.js +0 -213
- package/fesm/providers/storage-factory.service.js +0 -124
- package/fesm/providers/storage-factory.service.spec.js +0 -249
- package/fesm/providers/storage-provider.registry.js +0 -34
- package/fesm/providers/storage-provider.registry.spec.js +0 -63
- package/fesm/services/file-manager.service.js +0 -336
- package/fesm/services/file-manager.service.spec.js +0 -576
- package/fesm/services/folder.service.js +0 -91
- package/fesm/services/folder.service.spec.js +0 -163
- package/fesm/services/storage-config.service.js +0 -119
- package/fesm/services/storage-config.service.spec.js +0 -253
- package/fesm/services/storage-datasource.provider.js +0 -86
- package/fesm/services/storage-datasource.provider.spec.js +0 -172
- package/fesm/services/storage-provider-config.service.js +0 -161
- package/fesm/services/storage-provider-config.service.spec.js +0 -261
- package/fesm/services/upload.service.js +0 -366
- package/fesm/services/upload.service.spec.js +0 -422
- package/fesm/utils/file-validator.util.js +0 -433
- package/fesm/utils/file-validator.util.spec.js +0 -255
- package/fesm/utils/image-compressor.util.js +0 -114
- package/fesm/utils/image-compressor.util.spec.js +0 -162
package/fesm/entities/index.js
CHANGED
|
@@ -1,33 +1,478 @@
|
|
|
1
|
+
import { Identity } from "@flusys/nestjs-shared/entities";
|
|
2
|
+
import * as __rspack_external__flusys_nestjs_shared_393d2cae from "@flusys/nestjs-shared";
|
|
3
|
+
import * as __rspack_external_typeorm from "typeorm";
|
|
4
|
+
export const __rspack_esm_id = 604;
|
|
5
|
+
export const __rspack_esm_ids = [604];
|
|
6
|
+
export const __webpack_modules__ = {
|
|
7
|
+
975(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
8
|
+
|
|
9
|
+
// EXPORTS
|
|
10
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
11
|
+
FileManager: () => (/* reexport */ FileManager),
|
|
12
|
+
NP: () => (/* reexport */ FileManager),
|
|
13
|
+
FileManagerWithCompany: () => (/* reexport */ FileManagerWithCompany),
|
|
14
|
+
Folder: () => (/* reexport */ Folder),
|
|
15
|
+
KQ: () => (/* reexport */ Folder),
|
|
16
|
+
FolderWithCompany: () => (/* reexport */ FolderWithCompany),
|
|
17
|
+
eZ: () => (/* binding */ StorageCompanyEntities),
|
|
18
|
+
StorageConfig: () => (/* reexport */ StorageConfig),
|
|
19
|
+
Zk: () => (/* reexport */ StorageConfig),
|
|
20
|
+
StorageConfigWithCompany: () => (/* reexport */ StorageConfigWithCompany),
|
|
21
|
+
oM: () => (/* binding */ StorageCoreEntities),
|
|
22
|
+
eu: () => (/* binding */ getStorageEntitiesByConfig)
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
;// CONCATENATED MODULE: external "@flusys/nestjs-shared/entities"
|
|
26
|
+
|
|
27
|
+
// EXTERNAL MODULE: external "typeorm"
|
|
28
|
+
var external_typeorm_ = __webpack_require__(158);
|
|
29
|
+
;// CONCATENATED MODULE: ./projects/nestjs-storage/src/entities/file-manager.entity.ts
|
|
30
|
+
function _ts_decorate(decorators, target, key, desc) {
|
|
31
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
32
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
33
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
34
|
+
} else {
|
|
35
|
+
for(var i = decorators.length - 1; i >= 0; i--){
|
|
36
|
+
if (d = decorators[i]) {
|
|
37
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
42
|
+
}
|
|
43
|
+
function _ts_metadata(metadataKey, metadataValue) {
|
|
44
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") {
|
|
45
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class FileManager extends Identity {
|
|
51
|
+
name;
|
|
52
|
+
contentType;
|
|
53
|
+
size;
|
|
54
|
+
key;
|
|
55
|
+
url;
|
|
56
|
+
location;
|
|
57
|
+
storageConfigId;
|
|
58
|
+
expiresAt = null;
|
|
59
|
+
isPrivate;
|
|
60
|
+
folder;
|
|
61
|
+
}
|
|
62
|
+
_ts_decorate([
|
|
63
|
+
(0,external_typeorm_.Column)({
|
|
64
|
+
type: 'varchar',
|
|
65
|
+
length: 255,
|
|
66
|
+
nullable: false
|
|
67
|
+
}),
|
|
68
|
+
_ts_metadata("design:type", String)
|
|
69
|
+
], FileManager.prototype, "name", void 0);
|
|
70
|
+
_ts_decorate([
|
|
71
|
+
(0,external_typeorm_.Column)({
|
|
72
|
+
type: 'varchar',
|
|
73
|
+
length: 255,
|
|
74
|
+
nullable: false
|
|
75
|
+
}),
|
|
76
|
+
_ts_metadata("design:type", String)
|
|
77
|
+
], FileManager.prototype, "contentType", void 0);
|
|
78
|
+
_ts_decorate([
|
|
79
|
+
(0,external_typeorm_.Column)({
|
|
80
|
+
type: 'varchar',
|
|
81
|
+
length: 255,
|
|
82
|
+
nullable: false
|
|
83
|
+
}),
|
|
84
|
+
_ts_metadata("design:type", String)
|
|
85
|
+
], FileManager.prototype, "size", void 0);
|
|
86
|
+
_ts_decorate([
|
|
87
|
+
(0,external_typeorm_.Column)({
|
|
88
|
+
type: 'text',
|
|
89
|
+
nullable: false
|
|
90
|
+
}),
|
|
91
|
+
_ts_metadata("design:type", String)
|
|
92
|
+
], FileManager.prototype, "key", void 0);
|
|
93
|
+
_ts_decorate([
|
|
94
|
+
(0,external_typeorm_.Column)({
|
|
95
|
+
type: 'text',
|
|
96
|
+
nullable: true
|
|
97
|
+
}),
|
|
98
|
+
_ts_metadata("design:type", Object)
|
|
99
|
+
], FileManager.prototype, "url", void 0);
|
|
100
|
+
_ts_decorate([
|
|
101
|
+
(0,external_typeorm_.Column)({
|
|
102
|
+
type: 'varchar',
|
|
103
|
+
length: 50,
|
|
104
|
+
nullable: false
|
|
105
|
+
}),
|
|
106
|
+
_ts_metadata("design:type", String)
|
|
107
|
+
], FileManager.prototype, "location", void 0);
|
|
108
|
+
_ts_decorate([
|
|
109
|
+
(0,external_typeorm_.Column)({
|
|
110
|
+
type: 'uuid',
|
|
111
|
+
nullable: true
|
|
112
|
+
}),
|
|
113
|
+
_ts_metadata("design:type", Object)
|
|
114
|
+
], FileManager.prototype, "storageConfigId", void 0);
|
|
115
|
+
_ts_decorate([
|
|
116
|
+
(0,external_typeorm_.Column)({
|
|
117
|
+
type: 'bigint',
|
|
118
|
+
nullable: true
|
|
119
|
+
}),
|
|
120
|
+
_ts_metadata("design:type", Object)
|
|
121
|
+
], FileManager.prototype, "expiresAt", void 0);
|
|
122
|
+
_ts_decorate([
|
|
123
|
+
(0,external_typeorm_.Column)({
|
|
124
|
+
type: 'boolean',
|
|
125
|
+
nullable: false,
|
|
126
|
+
default: false
|
|
127
|
+
}),
|
|
128
|
+
_ts_metadata("design:type", Boolean)
|
|
129
|
+
], FileManager.prototype, "isPrivate", void 0);
|
|
130
|
+
_ts_decorate([
|
|
131
|
+
(0,external_typeorm_.ManyToOne)('Folder', (folder)=>folder.fileManager, {
|
|
132
|
+
nullable: true,
|
|
133
|
+
onDelete: 'SET NULL'
|
|
134
|
+
}),
|
|
135
|
+
(0,external_typeorm_.JoinColumn)({
|
|
136
|
+
name: 'folder_id'
|
|
137
|
+
}),
|
|
138
|
+
_ts_metadata("design:type", Object)
|
|
139
|
+
], FileManager.prototype, "folder", void 0);
|
|
140
|
+
FileManager = _ts_decorate([
|
|
141
|
+
(0,external_typeorm_.Entity)({
|
|
142
|
+
name: 'file_manager'
|
|
143
|
+
})
|
|
144
|
+
], FileManager);
|
|
145
|
+
|
|
146
|
+
;// CONCATENATED MODULE: ./projects/nestjs-storage/src/entities/folder.entity.ts
|
|
147
|
+
function folder_entity_ts_decorate(decorators, target, key, desc) {
|
|
148
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
149
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
150
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
151
|
+
} else {
|
|
152
|
+
for(var i = decorators.length - 1; i >= 0; i--){
|
|
153
|
+
if (d = decorators[i]) {
|
|
154
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
159
|
+
}
|
|
160
|
+
function folder_entity_ts_metadata(metadataKey, metadataValue) {
|
|
161
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") {
|
|
162
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
class Folder extends Identity {
|
|
168
|
+
name;
|
|
169
|
+
slug;
|
|
170
|
+
fileManager;
|
|
171
|
+
}
|
|
172
|
+
folder_entity_ts_decorate([
|
|
173
|
+
(0,external_typeorm_.Column)({
|
|
174
|
+
type: 'varchar',
|
|
175
|
+
length: 255,
|
|
176
|
+
nullable: false
|
|
177
|
+
}),
|
|
178
|
+
folder_entity_ts_metadata("design:type", String)
|
|
179
|
+
], Folder.prototype, "name", void 0);
|
|
180
|
+
folder_entity_ts_decorate([
|
|
181
|
+
(0,external_typeorm_.Column)({
|
|
182
|
+
type: 'varchar',
|
|
183
|
+
length: 255,
|
|
184
|
+
nullable: false
|
|
185
|
+
}),
|
|
186
|
+
folder_entity_ts_metadata("design:type", String)
|
|
187
|
+
], Folder.prototype, "slug", void 0);
|
|
188
|
+
folder_entity_ts_decorate([
|
|
189
|
+
(0,external_typeorm_.OneToMany)('FileManager', (fileManager)=>fileManager.folder),
|
|
190
|
+
folder_entity_ts_metadata("design:type", Array)
|
|
191
|
+
], Folder.prototype, "fileManager", void 0);
|
|
192
|
+
Folder = folder_entity_ts_decorate([
|
|
193
|
+
(0,external_typeorm_.Entity)({
|
|
194
|
+
name: 'folder'
|
|
195
|
+
})
|
|
196
|
+
], Folder);
|
|
197
|
+
|
|
198
|
+
// EXTERNAL MODULE: external "@flusys/nestjs-shared"
|
|
199
|
+
var nestjs_shared_ = __webpack_require__(422);
|
|
200
|
+
;// CONCATENATED MODULE: ./projects/nestjs-storage/src/entities/storage-config.entity.ts
|
|
201
|
+
function storage_config_entity_ts_decorate(decorators, target, key, desc) {
|
|
202
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
203
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
204
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
205
|
+
} else {
|
|
206
|
+
for(var i = decorators.length - 1; i >= 0; i--){
|
|
207
|
+
if (d = decorators[i]) {
|
|
208
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
213
|
+
}
|
|
214
|
+
function storage_config_entity_ts_metadata(metadataKey, metadataValue) {
|
|
215
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") {
|
|
216
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
class StorageConfig extends Identity {
|
|
223
|
+
name;
|
|
224
|
+
storage;
|
|
225
|
+
config;
|
|
226
|
+
isActive;
|
|
227
|
+
isDefault;
|
|
228
|
+
}
|
|
229
|
+
storage_config_entity_ts_decorate([
|
|
230
|
+
(0,external_typeorm_.Column)({
|
|
231
|
+
type: 'varchar',
|
|
232
|
+
length: 255,
|
|
233
|
+
nullable: false
|
|
234
|
+
}),
|
|
235
|
+
storage_config_entity_ts_metadata("design:type", String)
|
|
236
|
+
], StorageConfig.prototype, "name", void 0);
|
|
237
|
+
storage_config_entity_ts_decorate([
|
|
238
|
+
(0,external_typeorm_.Column)({
|
|
239
|
+
type: 'varchar',
|
|
240
|
+
length: 50,
|
|
241
|
+
nullable: false
|
|
242
|
+
}),
|
|
243
|
+
storage_config_entity_ts_metadata("design:type", String)
|
|
244
|
+
], StorageConfig.prototype, "storage", void 0);
|
|
245
|
+
storage_config_entity_ts_decorate([
|
|
246
|
+
(0,external_typeorm_.Column)({
|
|
247
|
+
type: (0,nestjs_shared_.getJsonColumnType)(),
|
|
248
|
+
nullable: false
|
|
249
|
+
}),
|
|
250
|
+
storage_config_entity_ts_metadata("design:type", typeof Record === "undefined" ? Object : Record)
|
|
251
|
+
], StorageConfig.prototype, "config", void 0);
|
|
252
|
+
storage_config_entity_ts_decorate([
|
|
253
|
+
(0,external_typeorm_.Column)({
|
|
254
|
+
type: 'boolean',
|
|
255
|
+
default: true,
|
|
256
|
+
name: 'is_active'
|
|
257
|
+
}),
|
|
258
|
+
storage_config_entity_ts_metadata("design:type", Boolean)
|
|
259
|
+
], StorageConfig.prototype, "isActive", void 0);
|
|
260
|
+
storage_config_entity_ts_decorate([
|
|
261
|
+
(0,external_typeorm_.Column)({
|
|
262
|
+
type: 'boolean',
|
|
263
|
+
default: false,
|
|
264
|
+
name: 'is_default'
|
|
265
|
+
}),
|
|
266
|
+
storage_config_entity_ts_metadata("design:type", Boolean)
|
|
267
|
+
], StorageConfig.prototype, "isDefault", void 0);
|
|
268
|
+
StorageConfig = storage_config_entity_ts_decorate([
|
|
269
|
+
(0,external_typeorm_.Entity)({
|
|
270
|
+
name: 'storage_config'
|
|
271
|
+
}),
|
|
272
|
+
(0,external_typeorm_.Index)([
|
|
273
|
+
'name'
|
|
274
|
+
]),
|
|
275
|
+
(0,external_typeorm_.Index)([
|
|
276
|
+
'storage'
|
|
277
|
+
]),
|
|
278
|
+
(0,external_typeorm_.Index)([
|
|
279
|
+
'isActive'
|
|
280
|
+
]),
|
|
281
|
+
(0,external_typeorm_.Index)([
|
|
282
|
+
'isDefault'
|
|
283
|
+
])
|
|
284
|
+
], StorageConfig);
|
|
285
|
+
|
|
286
|
+
;// CONCATENATED MODULE: ./projects/nestjs-storage/src/entities/file-manager-with-company.entity.ts
|
|
287
|
+
function file_manager_with_company_entity_ts_decorate(decorators, target, key, desc) {
|
|
288
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
289
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
290
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
291
|
+
} else {
|
|
292
|
+
for(var i = decorators.length - 1; i >= 0; i--){
|
|
293
|
+
if (d = decorators[i]) {
|
|
294
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
299
|
+
}
|
|
300
|
+
function file_manager_with_company_entity_ts_metadata(metadataKey, metadataValue) {
|
|
301
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") {
|
|
302
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
class FileManagerWithCompany extends FileManager {
|
|
308
|
+
companyId;
|
|
309
|
+
}
|
|
310
|
+
file_manager_with_company_entity_ts_decorate([
|
|
311
|
+
(0,external_typeorm_.Column)({
|
|
312
|
+
type: 'uuid',
|
|
313
|
+
nullable: true
|
|
314
|
+
}),
|
|
315
|
+
file_manager_with_company_entity_ts_metadata("design:type", Object)
|
|
316
|
+
], FileManagerWithCompany.prototype, "companyId", void 0);
|
|
317
|
+
file_manager_with_company_entity_ts_decorate([
|
|
318
|
+
(0,external_typeorm_.ManyToOne)('FolderWithCompany', (folder)=>folder.fileManager, {
|
|
319
|
+
nullable: true,
|
|
320
|
+
onDelete: 'SET NULL'
|
|
321
|
+
}),
|
|
322
|
+
(0,external_typeorm_.JoinColumn)({
|
|
323
|
+
name: 'folder_id'
|
|
324
|
+
}),
|
|
325
|
+
file_manager_with_company_entity_ts_metadata("design:type", Object)
|
|
326
|
+
], FileManagerWithCompany.prototype, "folder", void 0);
|
|
327
|
+
FileManagerWithCompany = file_manager_with_company_entity_ts_decorate([
|
|
328
|
+
(0,external_typeorm_.Entity)({
|
|
329
|
+
name: 'file_manager'
|
|
330
|
+
})
|
|
331
|
+
], FileManagerWithCompany);
|
|
332
|
+
|
|
333
|
+
;// CONCATENATED MODULE: ./projects/nestjs-storage/src/entities/folder-with-company.entity.ts
|
|
334
|
+
function folder_with_company_entity_ts_decorate(decorators, target, key, desc) {
|
|
335
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
336
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
337
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
338
|
+
} else {
|
|
339
|
+
for(var i = decorators.length - 1; i >= 0; i--){
|
|
340
|
+
if (d = decorators[i]) {
|
|
341
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
346
|
+
}
|
|
347
|
+
function folder_with_company_entity_ts_metadata(metadataKey, metadataValue) {
|
|
348
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") {
|
|
349
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
class FolderWithCompany extends Folder {
|
|
355
|
+
companyId;
|
|
356
|
+
}
|
|
357
|
+
folder_with_company_entity_ts_decorate([
|
|
358
|
+
(0,external_typeorm_.Column)({
|
|
359
|
+
type: 'uuid',
|
|
360
|
+
nullable: true
|
|
361
|
+
}),
|
|
362
|
+
folder_with_company_entity_ts_metadata("design:type", Object)
|
|
363
|
+
], FolderWithCompany.prototype, "companyId", void 0);
|
|
364
|
+
folder_with_company_entity_ts_decorate([
|
|
365
|
+
(0,external_typeorm_.OneToMany)('FileManagerWithCompany', (fileManager)=>fileManager.folder),
|
|
366
|
+
folder_with_company_entity_ts_metadata("design:type", Array)
|
|
367
|
+
], FolderWithCompany.prototype, "fileManager", void 0);
|
|
368
|
+
FolderWithCompany = folder_with_company_entity_ts_decorate([
|
|
369
|
+
(0,external_typeorm_.Entity)({
|
|
370
|
+
name: 'folder'
|
|
371
|
+
})
|
|
372
|
+
], FolderWithCompany);
|
|
373
|
+
|
|
374
|
+
;// CONCATENATED MODULE: ./projects/nestjs-storage/src/entities/storage-config-with-company.entity.ts
|
|
375
|
+
function storage_config_with_company_entity_ts_decorate(decorators, target, key, desc) {
|
|
376
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
377
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
378
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
379
|
+
} else {
|
|
380
|
+
for(var i = decorators.length - 1; i >= 0; i--){
|
|
381
|
+
if (d = decorators[i]) {
|
|
382
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
387
|
+
}
|
|
388
|
+
function storage_config_with_company_entity_ts_metadata(metadataKey, metadataValue) {
|
|
389
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") {
|
|
390
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
class StorageConfigWithCompany extends StorageConfig {
|
|
396
|
+
companyId;
|
|
397
|
+
}
|
|
398
|
+
storage_config_with_company_entity_ts_decorate([
|
|
399
|
+
(0,external_typeorm_.Column)({
|
|
400
|
+
type: 'uuid',
|
|
401
|
+
nullable: true
|
|
402
|
+
}),
|
|
403
|
+
storage_config_with_company_entity_ts_metadata("design:type", Object)
|
|
404
|
+
], StorageConfigWithCompany.prototype, "companyId", void 0);
|
|
405
|
+
StorageConfigWithCompany = storage_config_with_company_entity_ts_decorate([
|
|
406
|
+
(0,external_typeorm_.Entity)({
|
|
407
|
+
name: 'storage_config'
|
|
408
|
+
})
|
|
409
|
+
], StorageConfigWithCompany);
|
|
410
|
+
|
|
411
|
+
;// CONCATENATED MODULE: ./projects/nestjs-storage/src/entities/index.ts
|
|
1
412
|
// Entities without company feature
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
|
|
5
416
|
// Entities with company feature
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
|
|
15
426
|
// Core entities (no company feature)
|
|
16
|
-
|
|
427
|
+
const StorageCoreEntities = [
|
|
17
428
|
FileManager,
|
|
18
429
|
Folder,
|
|
19
430
|
StorageConfig
|
|
20
431
|
];
|
|
21
432
|
// Company-specific entities
|
|
22
|
-
|
|
433
|
+
const StorageCompanyEntities = [
|
|
23
434
|
FileManagerWithCompany,
|
|
24
435
|
FolderWithCompany,
|
|
25
436
|
StorageConfigWithCompany
|
|
26
437
|
];
|
|
27
|
-
|
|
438
|
+
function getStorageEntitiesByConfig(enableCompanyFeature) {
|
|
28
439
|
return enableCompanyFeature ? StorageCompanyEntities : StorageCoreEntities;
|
|
29
440
|
}
|
|
30
441
|
// Base type aliases for backwards compatibility with services
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
},
|
|
448
|
+
422(module) {
|
|
449
|
+
|
|
450
|
+
module.exports = __rspack_external__flusys_nestjs_shared_393d2cae;
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
},
|
|
454
|
+
158(module) {
|
|
455
|
+
|
|
456
|
+
module.exports = __rspack_external_typeorm;
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
},
|
|
460
|
+
|
|
461
|
+
};
|
|
462
|
+
import { __webpack_require__ } from '../runtime.js';
|
|
463
|
+
var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
|
|
464
|
+
import * as __rspack_chunk_1 from './index.js';
|
|
465
|
+
__webpack_require__.C(__rspack_chunk_1);
|
|
466
|
+
var __webpack_exports__ = __webpack_exec__(975);var __webpack_exports__FileManager = __webpack_exports__.FileManager;
|
|
467
|
+
var __webpack_exports__FileManagerBase = __webpack_exports__.NP;
|
|
468
|
+
var __webpack_exports__FileManagerWithCompany = __webpack_exports__.FileManagerWithCompany;
|
|
469
|
+
var __webpack_exports__Folder = __webpack_exports__.Folder;
|
|
470
|
+
var __webpack_exports__FolderBase = __webpack_exports__.KQ;
|
|
471
|
+
var __webpack_exports__FolderWithCompany = __webpack_exports__.FolderWithCompany;
|
|
472
|
+
var __webpack_exports__StorageCompanyEntities = __webpack_exports__.eZ;
|
|
473
|
+
var __webpack_exports__StorageConfig = __webpack_exports__.StorageConfig;
|
|
474
|
+
var __webpack_exports__StorageConfigBase = __webpack_exports__.Zk;
|
|
475
|
+
var __webpack_exports__StorageConfigWithCompany = __webpack_exports__.StorageConfigWithCompany;
|
|
476
|
+
var __webpack_exports__StorageCoreEntities = __webpack_exports__.oM;
|
|
477
|
+
var __webpack_exports__getStorageEntitiesByConfig = __webpack_exports__.eu;
|
|
478
|
+
export { __webpack_exports__FileManager as FileManager, __webpack_exports__FileManagerBase as FileManagerBase, __webpack_exports__FileManagerWithCompany as FileManagerWithCompany, __webpack_exports__Folder as Folder, __webpack_exports__FolderBase as FolderBase, __webpack_exports__FolderWithCompany as FolderWithCompany, __webpack_exports__StorageCompanyEntities as StorageCompanyEntities, __webpack_exports__StorageConfig as StorageConfig, __webpack_exports__StorageConfigBase as StorageConfigBase, __webpack_exports__StorageConfigWithCompany as StorageConfigWithCompany, __webpack_exports__StorageCoreEntities as StorageCoreEntities, __webpack_exports__getStorageEntitiesByConfig as getStorageEntitiesByConfig };
|
package/fesm/enums/index.js
CHANGED
|
@@ -1 +1,36 @@
|
|
|
1
|
-
export
|
|
1
|
+
export const __rspack_esm_id = 743;
|
|
2
|
+
export const __rspack_esm_ids = [743];
|
|
3
|
+
export const __webpack_modules__ = {
|
|
4
|
+
733(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
5
|
+
var FileLocationEnum = /*#__PURE__*/ function(FileLocationEnum) {
|
|
6
|
+
FileLocationEnum["AWS"] = "aws";
|
|
7
|
+
FileLocationEnum["AZURE"] = "azure";
|
|
8
|
+
FileLocationEnum["SFTP"] = "sftp";
|
|
9
|
+
FileLocationEnum["LOCAL"] = "local";
|
|
10
|
+
return FileLocationEnum;
|
|
11
|
+
}({});
|
|
12
|
+
|
|
13
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
14
|
+
N: () => (FileLocationEnum)
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
},
|
|
19
|
+
406(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
20
|
+
/* import */ var _file_location_enum_js__rspack_import_0 = __webpack_require__(733);
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
24
|
+
N: () => (/* reexport safe */ _file_location_enum_js__rspack_import_0.N)
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
};
|
|
31
|
+
import { __webpack_require__ } from '../runtime.js';
|
|
32
|
+
var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
|
|
33
|
+
import * as __rspack_chunk_1 from './index.js';
|
|
34
|
+
__webpack_require__.C(__rspack_chunk_1);
|
|
35
|
+
var __webpack_exports__ = __webpack_exec__(406);var __webpack_exports__FileLocationEnum = __webpack_exports__.N;
|
|
36
|
+
export { __webpack_exports__FileLocationEnum as FileLocationEnum };
|