@thescaffold/ntx-apps-blobs 0.0.10
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/README.md +1 -0
- package/api/file/dto/create-file.dto.d.ts +10 -0
- package/api/file/dto/create-file.dto.js +63 -0
- package/api/file/dto/create-file.dto.js.map +1 -0
- package/api/file/dto/update-file.dto.d.ts +10 -0
- package/api/file/dto/update-file.dto.js +67 -0
- package/api/file/dto/update-file.dto.js.map +1 -0
- package/api/file/entities/file.entity.d.ts +16 -0
- package/api/file/entities/file.entity.js +75 -0
- package/api/file/entities/file.entity.js.map +1 -0
- package/api/file/file.controller.d.ts +25 -0
- package/api/file/file.controller.js +47 -0
- package/api/file/file.controller.js.map +1 -0
- package/api/file/file.module.d.ts +2 -0
- package/api/file/file.module.js +27 -0
- package/api/file/file.module.js.map +1 -0
- package/api/file/file.service.d.ts +17 -0
- package/api/file/file.service.js +46 -0
- package/api/file/file.service.js.map +1 -0
- package/api/file/index.d.ts +6 -0
- package/api/file/index.js +23 -0
- package/api/file/index.js.map +1 -0
- package/api/page/dto/create-page.dto.d.ts +7 -0
- package/api/page/dto/create-page.dto.js +47 -0
- package/api/page/dto/create-page.dto.js.map +1 -0
- package/api/page/dto/update-page.dto.d.ts +7 -0
- package/api/page/dto/update-page.dto.js +48 -0
- package/api/page/dto/update-page.dto.js.map +1 -0
- package/api/page/entities/page.entity.d.ts +11 -0
- package/api/page/entities/page.entity.js +53 -0
- package/api/page/entities/page.entity.js.map +1 -0
- package/api/page/index.d.ts +6 -0
- package/api/page/index.js +23 -0
- package/api/page/index.js.map +1 -0
- package/api/page/page.controller.d.ts +19 -0
- package/api/page/page.controller.js +40 -0
- package/api/page/page.controller.js.map +1 -0
- package/api/page/page.module.d.ts +2 -0
- package/api/page/page.module.js +27 -0
- package/api/page/page.module.js.map +1 -0
- package/api/page/page.service.d.ts +17 -0
- package/api/page/page.service.js +48 -0
- package/api/page/page.service.js.map +1 -0
- package/app.config.d.ts +0 -0
- package/app.config.js +1 -0
- package/app.config.js.map +1 -0
- package/app.controller.d.ts +62 -0
- package/app.controller.js +145 -0
- package/app.controller.js.map +1 -0
- package/app.dto.d.ts +13 -0
- package/app.dto.js +48 -0
- package/app.dto.js.map +1 -0
- package/app.module.d.ts +2 -0
- package/app.module.js +42 -0
- package/app.module.js.map +1 -0
- package/app.service.d.ts +31 -0
- package/app.service.js +170 -0
- package/app.service.js.map +1 -0
- package/index.d.ts +20 -0
- package/index.js +50 -0
- package/index.js.map +1 -0
- package/migrations/1759862889830-BlobsFile.d.ts +5 -0
- package/migrations/1759862889830-BlobsFile.js +47 -0
- package/migrations/1759862889830-BlobsFile.js.map +1 -0
- package/migrations/1759862889909-BlobsPage.d.ts +5 -0
- package/migrations/1759862889909-BlobsPage.js +33 -0
- package/migrations/1759862889909-BlobsPage.js.map +1 -0
- package/migrations/index.d.ts +2 -0
- package/migrations/index.js +7 -0
- package/migrations/index.js.map +1 -0
- package/package.json +18 -0
- package/tsconfig.lib.tsbuildinfo +1 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Page = void 0;
|
|
13
|
+
const ntx_core_1 = require("@thescaffold/ntx-core");
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
|
+
const file_entity_1 = require("../../file/entities/file.entity");
|
|
16
|
+
let Page = class Page extends ntx_core_1.BaseEntity {
|
|
17
|
+
};
|
|
18
|
+
exports.Page = Page;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.Column)('char', { name: 'fileId', length: 36 }),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], Page.prototype, "fileId", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.ManyToOne)((type) => file_entity_1.File, (file) => file.pages, {
|
|
25
|
+
createForeignKeyConstraints: false,
|
|
26
|
+
}),
|
|
27
|
+
__metadata("design:type", file_entity_1.File)
|
|
28
|
+
], Page.prototype, "file", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)('int', { name: 'index' }),
|
|
31
|
+
__metadata("design:type", Number)
|
|
32
|
+
], Page.prototype, "index", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)('longblob', { name: 'raw', nullable: true }),
|
|
35
|
+
__metadata("design:type", Buffer)
|
|
36
|
+
], Page.prototype, "raw", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)('varchar', { name: 'status', nullable: true, length: 52 }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], Page.prototype, "status", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)('json', { name: 'meta', nullable: true }),
|
|
43
|
+
__metadata("design:type", Object)
|
|
44
|
+
], Page.prototype, "meta", void 0);
|
|
45
|
+
exports.Page = Page = __decorate([
|
|
46
|
+
(0, typeorm_1.Entity)({
|
|
47
|
+
name: 'BlobsPages',
|
|
48
|
+
orderBy: {
|
|
49
|
+
createdAt: 'DESC',
|
|
50
|
+
},
|
|
51
|
+
})
|
|
52
|
+
], Page);
|
|
53
|
+
//# sourceMappingURL=page.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.entity.js","sourceRoot":"","sources":["../../../../../../libs/blobs/src/api/page/entities/page.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAmD;AACnD,qCAAoD;AACpD,iEAAuD;AAQhD,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,qBAAU;CAoBnC,CAAA;AApBY,oBAAI;AAEf;IADC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;oCAChC;AAKf;IAHC,IAAA,mBAAS,EAAC,CAAC,IAAI,EAAE,EAAE,CAAC,kBAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE;QAC/C,2BAA2B,EAAE,KAAK;KACnC,CAAC;8BACK,kBAAI;kCAAC;AAGZ;IADC,IAAA,gBAAM,EAAC,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;;mCACnB;AAGd;IADC,IAAA,gBAAM,EAAC,UAAU,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAC9C,MAAM;iCAAC;AAGb;IADC,IAAA,gBAAM,EAAC,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;oCAClD;AAGhB;IADC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kCACtC;eAnBA,IAAI;IANhB,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE;YACP,SAAS,EAAE,MAAM;SAClB;KACF,CAAC;GACW,IAAI,CAoBhB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./dto/create-page.dto"), exports);
|
|
18
|
+
__exportStar(require("./dto/update-page.dto"), exports);
|
|
19
|
+
__exportStar(require("./entities/page.entity"), exports);
|
|
20
|
+
__exportStar(require("./page.controller"), exports);
|
|
21
|
+
__exportStar(require("./page.module"), exports);
|
|
22
|
+
__exportStar(require("./page.service"), exports);
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/blobs/src/api/page/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,wDAAsC;AACtC,yDAAuC;AACvC,oDAAkC;AAClC,gDAA8B;AAC9B,iDAA+B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { LanguageService, MediaService } from '@thescaffold/ntx-core';
|
|
2
|
+
import { CreatePageDto } from './dto/create-page.dto';
|
|
3
|
+
import { UpdatePageDto } from './dto/update-page.dto';
|
|
4
|
+
import { Page } from './entities/page.entity';
|
|
5
|
+
import { PageService } from './page.service';
|
|
6
|
+
declare const PageController_base: import("@nestjs/common").Type<import("@thescaffold/ntx-core").CrudControllerContract<Page, CreatePageDto, UpdatePageDto>>;
|
|
7
|
+
export declare class PageController extends PageController_base {
|
|
8
|
+
private readonly pageService;
|
|
9
|
+
protected readonly languageService: LanguageService;
|
|
10
|
+
protected readonly mediaService: MediaService;
|
|
11
|
+
protected name: string;
|
|
12
|
+
protected searchable: any[];
|
|
13
|
+
protected service: PageService;
|
|
14
|
+
protected unique: ({}: Page) => any[];
|
|
15
|
+
protected morphRequest: (entity: Page) => Page;
|
|
16
|
+
protected hooks: {};
|
|
17
|
+
constructor(pageService: PageService, languageService: LanguageService, mediaService: MediaService);
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.PageController = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const ntx_core_1 = require("@thescaffold/ntx-core");
|
|
15
|
+
const create_page_dto_1 = require("./dto/create-page.dto");
|
|
16
|
+
const update_page_dto_1 = require("./dto/update-page.dto");
|
|
17
|
+
const page_entity_1 = require("./entities/page.entity");
|
|
18
|
+
const page_service_1 = require("./page.service");
|
|
19
|
+
let PageController = class PageController extends (0, ntx_core_1.CrudControllerFactory)(create_page_dto_1.CreatePageDto, update_page_dto_1.UpdatePageDto, page_entity_1.Page) {
|
|
20
|
+
constructor(pageService, languageService, mediaService) {
|
|
21
|
+
super();
|
|
22
|
+
this.pageService = pageService;
|
|
23
|
+
this.languageService = languageService;
|
|
24
|
+
this.mediaService = mediaService;
|
|
25
|
+
this.name = 'page';
|
|
26
|
+
this.searchable = [];
|
|
27
|
+
this.service = this.pageService;
|
|
28
|
+
this.unique = ({}) => [];
|
|
29
|
+
this.morphRequest = (entity) => entity;
|
|
30
|
+
this.hooks = {};
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
exports.PageController = PageController;
|
|
34
|
+
exports.PageController = PageController = __decorate([
|
|
35
|
+
(0, common_1.Controller)('page'),
|
|
36
|
+
__metadata("design:paramtypes", [page_service_1.PageService,
|
|
37
|
+
ntx_core_1.LanguageService,
|
|
38
|
+
ntx_core_1.MediaService])
|
|
39
|
+
], PageController);
|
|
40
|
+
//# sourceMappingURL=page.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.controller.js","sourceRoot":"","sources":["../../../../../libs/blobs/src/api/page/page.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,oDAI+B;AAC/B,2DAAsD;AACtD,2DAAsD;AACtD,wDAA8C;AAC9C,iDAA6C;AAGtC,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,IAAA,gCAAqB,EAIvD,+BAAa,EAAE,+BAAa,EAAE,kBAAI,CAAC;IAQnC,YACmB,WAAwB,EACtB,eAAgC,EAChC,YAA0B;QAE7C,KAAK,EAAE,CAAC;QAJS,gBAAW,GAAX,WAAW,CAAa;QACtB,oBAAe,GAAf,eAAe,CAAiB;QAChC,iBAAY,GAAZ,YAAY,CAAc;QAVrC,SAAI,GAAG,MAAM,CAAC;QACd,eAAU,GAAG,EAAE,CAAC;QAChB,YAAO,GAAG,IAAI,CAAC,WAAW,CAAC;QAC3B,WAAM,GAAG,CAAC,EAAQ,EAAE,EAAE,CAAC,EAAE,CAAC;QAC1B,iBAAY,GAAG,CAAC,MAAY,EAAE,EAAE,CAAC,MAAM,CAAC;QACxC,UAAK,GAAG,EAAE,CAAC;IAQrB,CAAC;CACF,CAAA;AAnBY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,mBAAU,EAAC,MAAM,CAAC;qCAce,0BAAW;QACL,0BAAe;QAClB,uBAAY;GAfpC,cAAc,CAmB1B"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.PageModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
12
|
+
const ntx_core_1 = require("@thescaffold/ntx-core");
|
|
13
|
+
const page_entity_1 = require("./entities/page.entity");
|
|
14
|
+
const page_controller_1 = require("./page.controller");
|
|
15
|
+
const page_service_1 = require("./page.service");
|
|
16
|
+
let PageModule = class PageModule {
|
|
17
|
+
};
|
|
18
|
+
exports.PageModule = PageModule;
|
|
19
|
+
exports.PageModule = PageModule = __decorate([
|
|
20
|
+
(0, common_1.Module)({
|
|
21
|
+
imports: [typeorm_1.TypeOrmModule.forFeature([page_entity_1.Page]), ntx_core_1.ServicesModule],
|
|
22
|
+
controllers: [page_controller_1.PageController],
|
|
23
|
+
providers: [page_service_1.PageService],
|
|
24
|
+
exports: [page_service_1.PageService],
|
|
25
|
+
})
|
|
26
|
+
], PageModule);
|
|
27
|
+
//# sourceMappingURL=page.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.module.js","sourceRoot":"","sources":["../../../../../libs/blobs/src/api/page/page.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6CAAgD;AAChD,oDAAuD;AACvD,wDAA8C;AAC9C,uDAAmD;AACnD,iDAA6C;AAQtC,IAAM,UAAU,GAAhB,MAAM,UAAU;CAAG,CAAA;AAAb,gCAAU;qBAAV,UAAU;IANtB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,uBAAa,CAAC,UAAU,CAAC,CAAC,kBAAI,CAAC,CAAC,EAAE,yBAAc,CAAC;QAC3D,WAAW,EAAE,CAAC,gCAAc,CAAC;QAC7B,SAAS,EAAE,CAAC,0BAAW,CAAC;QACxB,OAAO,EAAE,CAAC,0BAAW,CAAC;KACvB,CAAC;GACW,UAAU,CAAG"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ConfigService } from '@nestjs/config';
|
|
2
|
+
import { BaseRepository, LanguageService, MediaService, PermissionScopeType, TrackerService } from '@thescaffold/ntx-core';
|
|
3
|
+
import { Page } from './entities/page.entity';
|
|
4
|
+
export declare class PageService extends BaseRepository<Page> {
|
|
5
|
+
protected readonly trackerService: TrackerService;
|
|
6
|
+
protected readonly configService: ConfigService;
|
|
7
|
+
protected readonly languageService: LanguageService;
|
|
8
|
+
protected readonly mediaService: MediaService;
|
|
9
|
+
protected [PermissionScopeType.Self]: {
|
|
10
|
+
'file.userId': string;
|
|
11
|
+
}[];
|
|
12
|
+
protected [PermissionScopeType.Workspace]: {
|
|
13
|
+
'file.workspaceId': string;
|
|
14
|
+
}[];
|
|
15
|
+
protected [PermissionScopeType.Global]: any[];
|
|
16
|
+
constructor(request: any, trackerService: TrackerService, configService: ConfigService, languageService: LanguageService, mediaService: MediaService);
|
|
17
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
var _a, _b, _c;
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.PageService = void 0;
|
|
17
|
+
const common_1 = require("@nestjs/common");
|
|
18
|
+
const config_1 = require("@nestjs/config");
|
|
19
|
+
const core_1 = require("@nestjs/core");
|
|
20
|
+
const ntx_core_1 = require("@thescaffold/ntx-core");
|
|
21
|
+
const page_entity_1 = require("./entities/page.entity");
|
|
22
|
+
let PageService = class PageService extends ntx_core_1.BaseRepository {
|
|
23
|
+
constructor(request, trackerService, configService, languageService, mediaService) {
|
|
24
|
+
super(request, page_entity_1.Page);
|
|
25
|
+
this.trackerService = trackerService;
|
|
26
|
+
this.configService = configService;
|
|
27
|
+
this.languageService = languageService;
|
|
28
|
+
this.mediaService = mediaService;
|
|
29
|
+
this[_a] = [{ 'file.userId': 'user.id' }];
|
|
30
|
+
this[_b] = [
|
|
31
|
+
{ 'file.workspaceId': 'workspace.id' },
|
|
32
|
+
];
|
|
33
|
+
this[_c] = [];
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
exports.PageService = PageService;
|
|
37
|
+
_a = ntx_core_1.PermissionScopeType.Self;
|
|
38
|
+
_b = ntx_core_1.PermissionScopeType.Workspace;
|
|
39
|
+
_c = ntx_core_1.PermissionScopeType.Global;
|
|
40
|
+
exports.PageService = PageService = __decorate([
|
|
41
|
+
(0, common_1.Injectable)({ scope: common_1.Scope.REQUEST }),
|
|
42
|
+
__param(0, (0, common_1.Inject)(core_1.REQUEST)),
|
|
43
|
+
__metadata("design:paramtypes", [Object, ntx_core_1.TrackerService,
|
|
44
|
+
config_1.ConfigService,
|
|
45
|
+
ntx_core_1.LanguageService,
|
|
46
|
+
ntx_core_1.MediaService])
|
|
47
|
+
], PageService);
|
|
48
|
+
//# sourceMappingURL=page.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.service.js","sourceRoot":"","sources":["../../../../../libs/blobs/src/api/page/page.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAA2D;AAC3D,2CAA+C;AAC/C,uCAAuC;AACvC,oDAM+B;AAC/B,wDAA8C;AAGvC,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,yBAAoB;IASnD,YACmB,OAAY,EACV,cAA8B,EAC9B,aAA4B,EAC5B,eAAgC,EAChC,YAA0B;QAE7C,KAAK,CAAC,OAAO,EAAE,kBAAI,CAAC,CAAC;QALF,mBAAc,GAAd,cAAc,CAAgB;QAC9B,kBAAa,GAAb,aAAa,CAAe;QAC5B,oBAAe,GAAf,eAAe,CAAiB;QAChC,iBAAY,GAAZ,YAAY,CAAc;QAbrC,QAA0B,GAAG,CAAC,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC,CAAC;QAE5D,QAA+B,GAAG;YAC1C,EAAE,kBAAkB,EAAE,cAAc,EAAE;SACvC,CAAC;QAEQ,QAA4B,GAAG,EAAE,CAAC;IAU5C,CAAC;CACF,CAAA;AAlBY,kCAAW;KACX,8BAAmB,CAAC,IAAI;KAExB,8BAAmB,CAAC,SAAS;KAI7B,8BAAmB,CAAC,MAAM;sBAP1B,WAAW;IADvB,IAAA,mBAAU,EAAC,EAAE,KAAK,EAAE,cAAK,CAAC,OAAO,EAAE,CAAC;IAWhC,WAAA,IAAA,eAAM,EAAC,cAAO,CAAC,CAAA;6CACmB,yBAAc;QACf,sBAAa;QACX,0BAAe;QAClB,uBAAY;GAdpC,WAAW,CAkBvB"}
|
package/app.config.d.ts
ADDED
|
File without changes
|
package/app.config.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=app.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.config.js","sourceRoot":"","sources":["../../../libs/blobs/src/app.config.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ConfigService } from '@nestjs/config';
|
|
2
|
+
import { LanguageService, MediaService, SyncService } from '@thescaffold/ntx-core';
|
|
3
|
+
import { FastifyReply } from 'fastify';
|
|
4
|
+
import { BatchDto, FileUploadDto, InitDto, VerifyDto } from './app.dto';
|
|
5
|
+
import { AppService } from './app.service';
|
|
6
|
+
declare const AppController_base: import("@nestjs/common").Type<import("@thescaffold/ntx-core").AppControllerContract>;
|
|
7
|
+
export declare class AppController extends AppController_base {
|
|
8
|
+
private readonly appService;
|
|
9
|
+
protected readonly languageService: LanguageService;
|
|
10
|
+
protected readonly mediaService: MediaService;
|
|
11
|
+
protected readonly syncService: SyncService;
|
|
12
|
+
protected readonly configService: ConfigService;
|
|
13
|
+
subscriptions: {};
|
|
14
|
+
constructor(appService: AppService, languageService: LanguageService, mediaService: MediaService, syncService: SyncService, configService: ConfigService);
|
|
15
|
+
getHello(context: any): Promise<{
|
|
16
|
+
status: string;
|
|
17
|
+
title: string;
|
|
18
|
+
message: string;
|
|
19
|
+
data: any;
|
|
20
|
+
meta: any;
|
|
21
|
+
raw: string;
|
|
22
|
+
headers: any;
|
|
23
|
+
}>;
|
|
24
|
+
init(context: any, body: InitDto): Promise<{
|
|
25
|
+
status: string;
|
|
26
|
+
title: string;
|
|
27
|
+
message: string;
|
|
28
|
+
data: any;
|
|
29
|
+
meta: any;
|
|
30
|
+
raw: string;
|
|
31
|
+
headers: any;
|
|
32
|
+
}>;
|
|
33
|
+
batch(context: any, body: BatchDto): Promise<{
|
|
34
|
+
status: string;
|
|
35
|
+
title: string;
|
|
36
|
+
message: string;
|
|
37
|
+
data: any;
|
|
38
|
+
meta: any;
|
|
39
|
+
raw: string;
|
|
40
|
+
headers: any;
|
|
41
|
+
}>;
|
|
42
|
+
verify(context: any, body: VerifyDto): Promise<{
|
|
43
|
+
status: string;
|
|
44
|
+
title: string;
|
|
45
|
+
message: string;
|
|
46
|
+
data: any;
|
|
47
|
+
meta: any;
|
|
48
|
+
raw: string;
|
|
49
|
+
headers: any;
|
|
50
|
+
}>;
|
|
51
|
+
upload(context: any, body: FileUploadDto): Promise<{
|
|
52
|
+
status: string;
|
|
53
|
+
title: string;
|
|
54
|
+
message: string;
|
|
55
|
+
data: any;
|
|
56
|
+
meta: any;
|
|
57
|
+
raw: string;
|
|
58
|
+
headers: any;
|
|
59
|
+
}>;
|
|
60
|
+
download(context: any, res: FastifyReply, id: string): Promise<void>;
|
|
61
|
+
}
|
|
62
|
+
export {};
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.AppController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const config_1 = require("@nestjs/config");
|
|
18
|
+
const ntx_core_1 = require("@thescaffold/ntx-core");
|
|
19
|
+
const app_dto_1 = require("./app.dto");
|
|
20
|
+
const app_service_1 = require("./app.service");
|
|
21
|
+
let AppController = class AppController extends (0, ntx_core_1.AppControllerFactory)() {
|
|
22
|
+
constructor(appService, languageService, mediaService, syncService, configService) {
|
|
23
|
+
super();
|
|
24
|
+
this.appService = appService;
|
|
25
|
+
this.languageService = languageService;
|
|
26
|
+
this.mediaService = mediaService;
|
|
27
|
+
this.syncService = syncService;
|
|
28
|
+
this.configService = configService;
|
|
29
|
+
this.subscriptions = {};
|
|
30
|
+
}
|
|
31
|
+
async getHello(context) {
|
|
32
|
+
const { preference } = context;
|
|
33
|
+
return (0, ntx_core_1.success)(this.appService.getHello());
|
|
34
|
+
}
|
|
35
|
+
async init(context, body) {
|
|
36
|
+
const { preference } = context;
|
|
37
|
+
const { user, client, workspace } = context;
|
|
38
|
+
const file = await this.appService.init({
|
|
39
|
+
userId: user.id,
|
|
40
|
+
clientId: client.id,
|
|
41
|
+
workspaceId: workspace.id,
|
|
42
|
+
type: body.type,
|
|
43
|
+
name: body.name,
|
|
44
|
+
parentId: body.parentId,
|
|
45
|
+
tags: body.tags,
|
|
46
|
+
size: body.size,
|
|
47
|
+
mime: body.mime,
|
|
48
|
+
status: body.status,
|
|
49
|
+
meta: body.meta,
|
|
50
|
+
});
|
|
51
|
+
return (0, ntx_core_1.success)(file, this.translate('apps.blobs.app.title', null, preference), this.translate('apps.blobs.app.post.remote.success', null, preference));
|
|
52
|
+
}
|
|
53
|
+
async batch(context, body) {
|
|
54
|
+
const { preference } = context;
|
|
55
|
+
const { user, client, workspace } = context;
|
|
56
|
+
const pages = await this.appService.batch(body.pages.map((page) => (Object.assign(Object.assign({}, page), { raw: Buffer.from(page.raw, 'base64') }))));
|
|
57
|
+
return (0, ntx_core_1.success)(pages, this.translate('apps.blobs.app.title', null, preference), this.translate('apps.blobs.app.post.remote.success', null, preference));
|
|
58
|
+
}
|
|
59
|
+
async verify(context, body) {
|
|
60
|
+
const { preference } = context;
|
|
61
|
+
const { user, client, workspace } = context;
|
|
62
|
+
const file = await this.appService.verify({
|
|
63
|
+
userId: user.id,
|
|
64
|
+
clientId: client.id,
|
|
65
|
+
workspaceId: workspace.id,
|
|
66
|
+
type: body.type,
|
|
67
|
+
name: body.name,
|
|
68
|
+
parentId: body.parentId,
|
|
69
|
+
});
|
|
70
|
+
return (0, ntx_core_1.success)(file, this.translate('apps.blobs.app.title', null, preference), this.translate('apps.blobs.app.post.verify.success', null, preference));
|
|
71
|
+
}
|
|
72
|
+
async upload(context, body) {
|
|
73
|
+
const { preference } = context;
|
|
74
|
+
const { user, client, workspace } = context;
|
|
75
|
+
const { file, pages } = body;
|
|
76
|
+
const [nFile, nPages] = await this.appService.upload(Object.assign(Object.assign({}, file), { userId: user.id, clientId: client.id, workspaceId: workspace.id }), pages.map((page) => (Object.assign(Object.assign({}, page), { raw: Buffer.from(page.raw, 'base64') }))));
|
|
77
|
+
return (0, ntx_core_1.success)({
|
|
78
|
+
file: nFile,
|
|
79
|
+
pages: nPages,
|
|
80
|
+
}, this.translate('apps.blobs.app.title', null, preference), this.translate('apps.blobs.app.post.remote.success', null, preference));
|
|
81
|
+
}
|
|
82
|
+
async download(context, res, id) {
|
|
83
|
+
const { preference } = context;
|
|
84
|
+
const { user, client, workspace } = context;
|
|
85
|
+
return this.appService.download(id, res);
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
exports.AppController = AppController;
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, common_1.Get)(),
|
|
91
|
+
__param(0, (0, ntx_core_1.GetContext)()),
|
|
92
|
+
__metadata("design:type", Function),
|
|
93
|
+
__metadata("design:paramtypes", [Object]),
|
|
94
|
+
__metadata("design:returntype", Promise)
|
|
95
|
+
], AppController.prototype, "getHello", null);
|
|
96
|
+
__decorate([
|
|
97
|
+
(0, common_1.Post)('upload/init'),
|
|
98
|
+
__param(0, (0, ntx_core_1.GetContext)()),
|
|
99
|
+
__param(1, (0, common_1.Body)()),
|
|
100
|
+
__metadata("design:type", Function),
|
|
101
|
+
__metadata("design:paramtypes", [Object, app_dto_1.InitDto]),
|
|
102
|
+
__metadata("design:returntype", Promise)
|
|
103
|
+
], AppController.prototype, "init", null);
|
|
104
|
+
__decorate([
|
|
105
|
+
(0, common_1.Post)('upload/batch'),
|
|
106
|
+
__param(0, (0, ntx_core_1.GetContext)()),
|
|
107
|
+
__param(1, (0, common_1.Body)()),
|
|
108
|
+
__metadata("design:type", Function),
|
|
109
|
+
__metadata("design:paramtypes", [Object, app_dto_1.BatchDto]),
|
|
110
|
+
__metadata("design:returntype", Promise)
|
|
111
|
+
], AppController.prototype, "batch", null);
|
|
112
|
+
__decorate([
|
|
113
|
+
(0, common_1.Post)('upload/verify'),
|
|
114
|
+
__param(0, (0, ntx_core_1.GetContext)()),
|
|
115
|
+
__param(1, (0, common_1.Body)()),
|
|
116
|
+
__metadata("design:type", Function),
|
|
117
|
+
__metadata("design:paramtypes", [Object, app_dto_1.VerifyDto]),
|
|
118
|
+
__metadata("design:returntype", Promise)
|
|
119
|
+
], AppController.prototype, "verify", null);
|
|
120
|
+
__decorate([
|
|
121
|
+
(0, common_1.Post)('upload'),
|
|
122
|
+
__param(0, (0, ntx_core_1.GetContext)()),
|
|
123
|
+
__param(1, (0, common_1.Body)()),
|
|
124
|
+
__metadata("design:type", Function),
|
|
125
|
+
__metadata("design:paramtypes", [Object, app_dto_1.FileUploadDto]),
|
|
126
|
+
__metadata("design:returntype", Promise)
|
|
127
|
+
], AppController.prototype, "upload", null);
|
|
128
|
+
__decorate([
|
|
129
|
+
(0, common_1.Get)('download/:id'),
|
|
130
|
+
__param(0, (0, ntx_core_1.GetContext)()),
|
|
131
|
+
__param(1, (0, common_1.Res)()),
|
|
132
|
+
__param(2, (0, common_1.Param)('id')),
|
|
133
|
+
__metadata("design:type", Function),
|
|
134
|
+
__metadata("design:paramtypes", [Object, Object, String]),
|
|
135
|
+
__metadata("design:returntype", Promise)
|
|
136
|
+
], AppController.prototype, "download", null);
|
|
137
|
+
exports.AppController = AppController = __decorate([
|
|
138
|
+
(0, common_1.Controller)(),
|
|
139
|
+
__metadata("design:paramtypes", [app_service_1.AppService,
|
|
140
|
+
ntx_core_1.LanguageService,
|
|
141
|
+
ntx_core_1.MediaService,
|
|
142
|
+
ntx_core_1.SyncService,
|
|
143
|
+
config_1.ConfigService])
|
|
144
|
+
], AppController);
|
|
145
|
+
//# sourceMappingURL=app.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.controller.js","sourceRoot":"","sources":["../../../libs/blobs/src/app.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAyE;AACzE,2CAA+C;AAC/C,oDAO+B;AAI/B,uCAAwE;AACxE,+CAA2C;AAGpC,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,IAAA,+BAAoB,GAAE;IAGvD,YACmB,UAAsB,EACpB,eAAgC,EAChC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,QAAQ,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;IAC3C,CAAC;CACF,CAAA;AAnIY,sCAAa;AAclB;IADL,IAAA,YAAG,GAAE;IACU,WAAA,IAAA,qBAAU,GAAE,CAAA;;;;6CAG3B;AAGK;IADL,IAAA,aAAI,EAAC,aAAa,CAAC;IACR,WAAA,IAAA,qBAAU,GAAE,CAAA;IAAgB,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAO,iBAAO;;yCAuB3D;AAGK;IADL,IAAA,aAAI,EAAC,cAAc,CAAC;IACR,WAAA,IAAA,qBAAU,GAAE,CAAA;IAAgB,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAO,kBAAQ;;0CAmB7D;AAGK;IADL,IAAA,aAAI,EAAC,eAAe,CAAC;IACR,WAAA,IAAA,qBAAU,GAAE,CAAA;IAAgB,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAO,mBAAS;;2CAkB/D;AAGK;IADL,IAAA,aAAI,EAAC,QAAQ,CAAC;IACD,WAAA,IAAA,qBAAU,GAAE,CAAA;IAAgB,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAO,uBAAa;;2CA6BnE;AAGK;IADL,IAAA,YAAG,EAAC,cAAc,CAAC;IAEjB,WAAA,IAAA,qBAAU,GAAE,CAAA;IACZ,WAAA,IAAA,YAAG,GAAE,CAAA;IACL,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;6CAMb;wBAlIU,aAAa;IADzB,IAAA,mBAAU,GAAE;qCAKoB,wBAAU;QACH,0BAAe;QAClB,uBAAY;QACb,sBAAW;QACT,sBAAa;GARtC,aAAa,CAmIzB"}
|
package/app.dto.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CreateFileDto } from './api/file';
|
|
2
|
+
import { CreatePageDto } from './api/page';
|
|
3
|
+
export declare class InitDto extends CreateFileDto {
|
|
4
|
+
}
|
|
5
|
+
export declare class BatchDto {
|
|
6
|
+
pages?: CreatePageDto[];
|
|
7
|
+
}
|
|
8
|
+
export declare class VerifyDto extends CreateFileDto {
|
|
9
|
+
}
|
|
10
|
+
export declare class FileUploadDto {
|
|
11
|
+
file: CreateFileDto;
|
|
12
|
+
pages?: CreatePageDto[];
|
|
13
|
+
}
|
package/app.dto.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.FileUploadDto = exports.VerifyDto = exports.BatchDto = exports.InitDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_transformer_1 = require("class-transformer");
|
|
15
|
+
const class_validator_1 = require("class-validator");
|
|
16
|
+
const file_1 = require("./api/file");
|
|
17
|
+
const page_1 = require("./api/page");
|
|
18
|
+
class InitDto extends file_1.CreateFileDto {
|
|
19
|
+
}
|
|
20
|
+
exports.InitDto = InitDto;
|
|
21
|
+
class BatchDto {
|
|
22
|
+
}
|
|
23
|
+
exports.BatchDto = BatchDto;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
26
|
+
(0, class_transformer_1.Type)(() => page_1.CreatePageDto),
|
|
27
|
+
(0, swagger_1.ApiProperty)(),
|
|
28
|
+
__metadata("design:type", Array)
|
|
29
|
+
], BatchDto.prototype, "pages", void 0);
|
|
30
|
+
class VerifyDto extends file_1.CreateFileDto {
|
|
31
|
+
}
|
|
32
|
+
exports.VerifyDto = VerifyDto;
|
|
33
|
+
class FileUploadDto {
|
|
34
|
+
}
|
|
35
|
+
exports.FileUploadDto = FileUploadDto;
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_validator_1.ValidateNested)(),
|
|
38
|
+
(0, class_transformer_1.Type)(() => file_1.CreateFileDto),
|
|
39
|
+
(0, swagger_1.ApiProperty)(),
|
|
40
|
+
__metadata("design:type", file_1.CreateFileDto)
|
|
41
|
+
], FileUploadDto.prototype, "file", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
44
|
+
(0, class_transformer_1.Type)(() => page_1.CreatePageDto),
|
|
45
|
+
(0, swagger_1.ApiProperty)(),
|
|
46
|
+
__metadata("design:type", Array)
|
|
47
|
+
], FileUploadDto.prototype, "pages", void 0);
|
|
48
|
+
//# sourceMappingURL=app.dto.js.map
|
package/app.dto.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.dto.js","sourceRoot":"","sources":["../../../libs/blobs/src/app.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,yDAAyC;AACzC,qDAAiD;AACjD,qCAA2C;AAC3C,qCAA2C;AAE3C,MAAa,OAAQ,SAAQ,oBAAa;CAAG;AAA7C,0BAA6C;AAE7C,MAAa,QAAQ;CAKpB;AALD,4BAKC;AADC;IAHC,IAAA,gCAAc,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,oBAAa,CAAC;IACzB,IAAA,qBAAW,GAAE;;uCACU;AAG1B,MAAa,SAAU,SAAQ,oBAAa;CAAG;AAA/C,8BAA+C;AAE/C,MAAa,aAAa;CAUzB;AAVD,sCAUC;AANC;IAHC,IAAA,gCAAc,GAAE;IAChB,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,oBAAa,CAAC;IACzB,IAAA,qBAAW,GAAE;8BACR,oBAAa;2CAAC;AAKpB;IAHC,IAAA,gCAAc,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,oBAAa,CAAC;IACzB,IAAA,qBAAW,GAAE;;4CACU"}
|
package/app.module.d.ts
ADDED
package/app.module.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.AppModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const core_1 = require("@nestjs/core");
|
|
12
|
+
const ntx_core_1 = require("@thescaffold/ntx-core");
|
|
13
|
+
const file_module_1 = require("./api/file/file.module");
|
|
14
|
+
const page_module_1 = require("./api/page/page.module");
|
|
15
|
+
const app_controller_1 = require("./app.controller");
|
|
16
|
+
const app_service_1 = require("./app.service");
|
|
17
|
+
let AppModule = class AppModule {
|
|
18
|
+
};
|
|
19
|
+
exports.AppModule = AppModule;
|
|
20
|
+
exports.AppModule = AppModule = __decorate([
|
|
21
|
+
(0, common_1.Module)({
|
|
22
|
+
imports: [
|
|
23
|
+
ntx_core_1.ServicesModule,
|
|
24
|
+
file_module_1.FileModule,
|
|
25
|
+
page_module_1.PageModule,
|
|
26
|
+
core_1.RouterModule.register([
|
|
27
|
+
{
|
|
28
|
+
path: 'apps/blobs',
|
|
29
|
+
module: file_module_1.FileModule,
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
path: 'apps/blobs',
|
|
33
|
+
module: page_module_1.PageModule,
|
|
34
|
+
},
|
|
35
|
+
]),
|
|
36
|
+
],
|
|
37
|
+
controllers: [app_controller_1.AppController],
|
|
38
|
+
providers: [app_service_1.AppService],
|
|
39
|
+
exports: [app_service_1.AppService],
|
|
40
|
+
})
|
|
41
|
+
], AppModule);
|
|
42
|
+
//# sourceMappingURL=app.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../../../libs/blobs/src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,uCAA4C;AAC5C,oDAAuD;AACvD,wDAAoD;AACpD,wDAAoD;AACpD,qDAAiD;AACjD,+CAA2C;AAuBpC,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,8BAAS;oBAAT,SAAS;IArBrB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,yBAAc;YAEd,wBAAU;YACV,wBAAU;YACV,mBAAY,CAAC,QAAQ,CAAC;gBACpB;oBACE,IAAI,EAAE,YAAY;oBAClB,MAAM,EAAE,wBAAU;iBACnB;gBACD;oBACE,IAAI,EAAE,YAAY;oBAClB,MAAM,EAAE,wBAAU;iBACnB;aACF,CAAC;SACH;QACD,WAAW,EAAE,CAAC,8BAAa,CAAC;QAC5B,SAAS,EAAE,CAAC,wBAAU,CAAC;QACvB,OAAO,EAAE,CAAC,wBAAU,CAAC;KACtB,CAAC;GACW,SAAS,CAAG"}
|