@trailmix-cms/cms 0.0.1
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/auth.guard.d.ts +22 -0
- package/dist/auth.guard.d.ts.map +1 -0
- package/dist/auth.guard.js +109 -0
- package/dist/auth.guard.js.map +1 -0
- package/dist/cms.module.d.ts +7 -0
- package/dist/cms.module.d.ts.map +1 -0
- package/dist/cms.module.js +47 -0
- package/dist/cms.module.js.map +1 -0
- package/dist/cms.providers.d.ts +119 -0
- package/dist/cms.providers.d.ts.map +1 -0
- package/dist/cms.providers.js +122 -0
- package/dist/cms.providers.js.map +1 -0
- package/dist/collections/account.collection.d.ts +18 -0
- package/dist/collections/account.collection.d.ts.map +1 -0
- package/dist/collections/account.collection.js +52 -0
- package/dist/collections/account.collection.js.map +1 -0
- package/dist/collections/file.collection.d.ts +21 -0
- package/dist/collections/file.collection.d.ts.map +1 -0
- package/dist/collections/file.collection.js +59 -0
- package/dist/collections/file.collection.js.map +1 -0
- package/dist/collections/index.d.ts +4 -0
- package/dist/collections/index.d.ts.map +1 -0
- package/dist/collections/index.js +10 -0
- package/dist/collections/index.js.map +1 -0
- package/dist/collections/text.collection.d.ts +20 -0
- package/dist/collections/text.collection.d.ts.map +1 -0
- package/dist/collections/text.collection.js +56 -0
- package/dist/collections/text.collection.js.map +1 -0
- package/dist/config.d.ts +12 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +31 -0
- package/dist/config.js.map +1 -0
- package/dist/constants/cms-collection-names.d.ts +7 -0
- package/dist/constants/cms-collection-names.d.ts.map +1 -0
- package/dist/constants/cms-collection-names.js +9 -0
- package/dist/constants/cms-collection-names.js.map +1 -0
- package/dist/constants/index.d.ts +3 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/constants/index.js +19 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/constants/provider-symbols.d.ts +14 -0
- package/dist/constants/provider-symbols.d.ts.map +1 -0
- package/dist/constants/provider-symbols.js +17 -0
- package/dist/constants/provider-symbols.js.map +1 -0
- package/dist/controllers/account.controller.d.ts +10 -0
- package/dist/controllers/account.controller.d.ts.map +1 -0
- package/dist/controllers/account.controller.js +53 -0
- package/dist/controllers/account.controller.js.map +1 -0
- package/dist/controllers/file.controller.d.ts +2 -0
- package/dist/controllers/file.controller.d.ts.map +1 -0
- package/dist/controllers/file.controller.js +80 -0
- package/dist/controllers/file.controller.js.map +1 -0
- package/dist/controllers/text.controller.d.ts +2 -0
- package/dist/controllers/text.controller.d.ts.map +1 -0
- package/dist/controllers/text.controller.js +48 -0
- package/dist/controllers/text.controller.js.map +1 -0
- package/dist/decorators/account.decorator.d.ts +4 -0
- package/dist/decorators/account.decorator.d.ts.map +1 -0
- package/dist/decorators/account.decorator.js +16 -0
- package/dist/decorators/account.decorator.js.map +1 -0
- package/dist/decorators/audit-context.decorator.d.ts +2 -0
- package/dist/decorators/audit-context.decorator.d.ts.map +1 -0
- package/dist/decorators/audit-context.decorator.js +17 -0
- package/dist/decorators/audit-context.decorator.js.map +1 -0
- package/dist/decorators/auth.decorator.d.ts +9 -0
- package/dist/decorators/auth.decorator.d.ts.map +1 -0
- package/dist/decorators/auth.decorator.js +13 -0
- package/dist/decorators/auth.decorator.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -0
- package/dist/pipes/file.pipe.d.ts +8 -0
- package/dist/pipes/file.pipe.d.ts.map +1 -0
- package/dist/pipes/file.pipe.js +28 -0
- package/dist/pipes/file.pipe.js.map +1 -0
- package/dist/services/authorization.service.d.ts +14 -0
- package/dist/services/authorization.service.d.ts.map +1 -0
- package/dist/services/authorization.service.js +101 -0
- package/dist/services/authorization.service.js.map +1 -0
- package/dist/types/collection-config.d.ts +4 -0
- package/dist/types/collection-config.d.ts.map +1 -0
- package/dist/types/collection-config.js +3 -0
- package/dist/types/collection-config.js.map +1 -0
- package/package.json +44 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
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("./constants"), exports);
|
|
18
|
+
__exportStar(require("./decorators/auth.decorator"), exports);
|
|
19
|
+
__exportStar(require("./decorators/audit-context.decorator"), exports);
|
|
20
|
+
__exportStar(require("./decorators/account.decorator"), exports);
|
|
21
|
+
__exportStar(require("./cms.module"), exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,8DAA4C;AAC5C,uEAAqD;AACrD,iEAA+C;AAC/C,+CAA6B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BaseEntityByIdPipe } from '@trailmixcms/utils';
|
|
2
|
+
import { FileCollection } from '../collections/file.collection';
|
|
3
|
+
import * as models from '@trailmixcms/models';
|
|
4
|
+
export declare class FileByIdPipe extends BaseEntityByIdPipe<models.File.Entity> {
|
|
5
|
+
protected readonly collection: FileCollection;
|
|
6
|
+
constructor(collection: FileCollection);
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=file.pipe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.pipe.d.ts","sourceRoot":"","sources":["../../src/pipes/file.pipe.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAE9C,qBACa,YAAa,SAAQ,kBAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;IAEhE,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,cAAc;gBAA1B,UAAU,EAAE,cAAc;CAIpD"}
|
|
@@ -0,0 +1,28 @@
|
|
|
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.FileByIdPipe = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const utils_1 = require("@trailmixcms/utils");
|
|
15
|
+
const file_collection_1 = require("../collections/file.collection");
|
|
16
|
+
let FileByIdPipe = class FileByIdPipe extends utils_1.BaseEntityByIdPipe {
|
|
17
|
+
collection;
|
|
18
|
+
constructor(collection) {
|
|
19
|
+
super(collection);
|
|
20
|
+
this.collection = collection;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
exports.FileByIdPipe = FileByIdPipe;
|
|
24
|
+
exports.FileByIdPipe = FileByIdPipe = __decorate([
|
|
25
|
+
(0, common_1.Injectable)(),
|
|
26
|
+
__metadata("design:paramtypes", [file_collection_1.FileCollection])
|
|
27
|
+
], FileByIdPipe);
|
|
28
|
+
//# sourceMappingURL=file.pipe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.pipe.js","sourceRoot":"","sources":["../../src/pipes/file.pipe.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,8CAAwD;AACxD,oEAAgE;AAIzD,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,0BAAsC;IAE7C;IADvB,YACuB,UAA0B;QAE7C,KAAK,CAAC,UAAU,CAAC,CAAC;QAFC,eAAU,GAAV,UAAU,CAAgB;IAGjD,CAAC;CACJ,CAAA;AANY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;qCAG0B,gCAAc;GAFxC,YAAY,CAMxB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as models from '@trailmixcms/models';
|
|
2
|
+
export interface AccountAuthorization {
|
|
3
|
+
account?: models.Account.Entity;
|
|
4
|
+
roles: (models.Role | string)[];
|
|
5
|
+
}
|
|
6
|
+
export type AuthorizableEntity = models.Authorization.Model & models.Publishable.Model;
|
|
7
|
+
export declare class AuthorizationService {
|
|
8
|
+
private readonly logger;
|
|
9
|
+
constructor();
|
|
10
|
+
validateAuthorization<T extends AuthorizableEntity>(accountAuthorization: AccountAuthorization, entity: T): Promise<boolean>;
|
|
11
|
+
checkAccountAuthorizationOnEntity<T extends AuthorizableEntity>(accountAuthorization: AccountAuthorization, entity: T): boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const AccountAuthorization: (...dataOrPipes: unknown[]) => ParameterDecorator;
|
|
14
|
+
//# sourceMappingURL=authorization.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authorization.service.d.ts","sourceRoot":"","sources":["../../src/services/authorization.service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAE9C,MAAM,WAAW,oBAAoB;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;IAChC,KAAK,EAAE,CAAC,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,EAAE,CAAC;CACnC;AAED,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,aAAa,CAAC,KAAK,GAAG,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC;AAEvF,qBACa,oBAAoB;IAC7B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAyC;;IAI1D,qBAAqB,CAAC,CAAC,SAAS,kBAAkB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,EAAE,CAAC;IAS/G,iCAAiC,CAAC,CAAC,SAAS,kBAAkB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,EAAE,CAAC;CAiCxH;AAED,eAAO,MAAM,oBAAoB,mDAUhC,CAAA"}
|
|
@@ -0,0 +1,101 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
|
+
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;
|
|
22
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
+
};
|
|
24
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
+
var ownKeys = function(o) {
|
|
26
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
+
var ar = [];
|
|
28
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
+
return ar;
|
|
30
|
+
};
|
|
31
|
+
return ownKeys(o);
|
|
32
|
+
};
|
|
33
|
+
return function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
})();
|
|
41
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
42
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
43
|
+
};
|
|
44
|
+
var AuthorizationService_1;
|
|
45
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
exports.AccountAuthorization = exports.AuthorizationService = void 0;
|
|
47
|
+
const common_1 = require("@nestjs/common");
|
|
48
|
+
const models = __importStar(require("@trailmixcms/models"));
|
|
49
|
+
let AuthorizationService = AuthorizationService_1 = class AuthorizationService {
|
|
50
|
+
logger = new common_1.Logger(AuthorizationService_1.name);
|
|
51
|
+
constructor() { }
|
|
52
|
+
async validateAuthorization(accountAuthorization, entity) {
|
|
53
|
+
const result = this.checkAccountAuthorizationOnEntity(accountAuthorization, entity);
|
|
54
|
+
if (!result) {
|
|
55
|
+
// TODO: security audit
|
|
56
|
+
throw new common_1.NotFoundException('Entity not found');
|
|
57
|
+
}
|
|
58
|
+
return result;
|
|
59
|
+
}
|
|
60
|
+
checkAccountAuthorizationOnEntity(accountAuthorization, entity) {
|
|
61
|
+
// console.log('checkAccountAuthorizationOnEntity', { accountAuthorization }, { entity });
|
|
62
|
+
const account = accountAuthorization.account;
|
|
63
|
+
if (accountAuthorization.roles.includes(models.Role.Admin)) {
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
if (!entity.authorization) {
|
|
67
|
+
// Only admin can access entities that have no "authorization"
|
|
68
|
+
// TODO: security audit
|
|
69
|
+
this.logger.warn('Entity has no authorization', { entity });
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
// IF entity does not have a published property, it is published
|
|
73
|
+
if (entity.published === false) {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
if (entity.authorization.public) {
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
if (entity.authorization.roles?.some(role => accountAuthorization.roles.includes(role))) {
|
|
80
|
+
return true;
|
|
81
|
+
}
|
|
82
|
+
if (account && entity.authorization.accountIds?.some(id => account._id.equals(id))) {
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
return false;
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
exports.AuthorizationService = AuthorizationService;
|
|
89
|
+
exports.AuthorizationService = AuthorizationService = AuthorizationService_1 = __decorate([
|
|
90
|
+
(0, common_1.Injectable)(),
|
|
91
|
+
__metadata("design:paramtypes", [])
|
|
92
|
+
], AuthorizationService);
|
|
93
|
+
exports.AccountAuthorization = (0, common_1.createParamDecorator)((data, ctx) => {
|
|
94
|
+
const request = ctx.switchToHttp().getRequest();
|
|
95
|
+
const accountAuthorization = {
|
|
96
|
+
account: request.account,
|
|
97
|
+
roles: request.account?.roles ? request.account.roles.map(role => role) : [],
|
|
98
|
+
};
|
|
99
|
+
return accountAuthorization;
|
|
100
|
+
});
|
|
101
|
+
//# sourceMappingURL=authorization.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authorization.service.js","sourceRoot":"","sources":["../../src/services/authorization.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA+G;AAE/G,4DAA8C;AAUvC,IAAM,oBAAoB,4BAA1B,MAAM,oBAAoB;IACZ,MAAM,GAAG,IAAI,eAAM,CAAC,sBAAoB,CAAC,IAAI,CAAC,CAAC;IAEhE,gBAAgB,CAAC;IAEjB,KAAK,CAAC,qBAAqB,CAA+B,oBAA0C,EAAE,MAAS;QAC3G,MAAM,MAAM,GAAG,IAAI,CAAC,iCAAiC,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAC;QACpF,IAAI,CAAC,MAAM,EAAE,CAAC;YACV,uBAAuB;YACvB,MAAM,IAAI,0BAAiB,CAAC,kBAAkB,CAAC,CAAC;QACpD,CAAC;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,iCAAiC,CAA+B,oBAA0C,EAAE,MAAS;QACjH,0FAA0F;QAC1F,MAAM,OAAO,GAAG,oBAAoB,CAAC,OAAO,CAAC;QAE7C,IAAI,oBAAoB,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YACzD,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC;YACxB,8DAA8D;YAC9D,uBAAuB;YACvB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,6BAA6B,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;YAC5D,OAAO,KAAK,CAAC;QACjB,CAAC;QAED,gEAAgE;QAChE,IAAI,MAAM,CAAC,SAAS,KAAK,KAAK,EAAE,CAAC;YAC7B,OAAO,KAAK,CAAC;QACjB,CAAC;QAED,IAAI,MAAM,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC;YAC9B,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,IAAI,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,oBAAoB,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;YACtF,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,IAAI,OAAO,IAAI,MAAM,CAAC,aAAa,CAAC,UAAU,EAAE,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;YACjF,OAAO,IAAI,CAAC;QAChB,CAAC;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ,CAAA;AA/CY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;;GACA,oBAAoB,CA+ChC;AAEY,QAAA,oBAAoB,GAAG,IAAA,6BAAoB,EACpD,CAAC,IAAa,EAAE,GAAqB,EAAE,EAAE;IACrC,MAAM,OAAO,GAAG,GAAG,CAAC,YAAY,EAAE,CAAC,UAAU,EAAkB,CAAC;IAEhE,MAAM,oBAAoB,GAAyB;QAC/C,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,KAAK,EAAE,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAmB,CAAC,CAAC,CAAC,CAAC,EAAE;KAC9F,CAAA;IACD,OAAO,oBAAoB,CAAC;AAChC,CAAC,CACJ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collection-config.d.ts","sourceRoot":"","sources":["../../src/types/collection-config.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG;IAC3B,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACnC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collection-config.js","sourceRoot":"","sources":["../../src/types/collection-config.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@trailmix-cms/cms",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"main": "./dist/index.js",
|
|
5
|
+
"types": "./dist/index.d.ts",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "tsc -b -v",
|
|
8
|
+
"clean": "tsc -b --clean",
|
|
9
|
+
"trace": "tsc --traceResolution"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@clerk/fastify": "^2.6.5",
|
|
13
|
+
"@nestjs/cache-manager": "^3.0.1",
|
|
14
|
+
"@nestjs/common": "^11.1.9",
|
|
15
|
+
"@nestjs/config": "^4.0.2",
|
|
16
|
+
"@nestjs/core": "^11.1.9",
|
|
17
|
+
"@nestjs/swagger": "^11.2.3",
|
|
18
|
+
"@trailmix-cms/db": "0.0.1",
|
|
19
|
+
"@trailmix-cms/models": "0.0.1",
|
|
20
|
+
"@trailmix-cms/utils": "0.0.1",
|
|
21
|
+
"cache-manager": "^7.2.5",
|
|
22
|
+
"envalid": "^8.1.1",
|
|
23
|
+
"mongodb": "^7.0.0",
|
|
24
|
+
"reflect-metadata": "^0.2.2",
|
|
25
|
+
"rxjs": "^7.8.2",
|
|
26
|
+
"zod": "^4.1.12"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/node": "^24.10.1",
|
|
30
|
+
"fastify": "5.6.1",
|
|
31
|
+
"typescript": "5.9.3"
|
|
32
|
+
},
|
|
33
|
+
"peerDependencies": {
|
|
34
|
+
"@nestjs/common": "^11.1.9",
|
|
35
|
+
"@nestjs/config": "^4.0.2",
|
|
36
|
+
"@trailmix-cms/db": "0.0.1",
|
|
37
|
+
"@trailmix-cms/models": "0.0.1",
|
|
38
|
+
"@trailmix-cms/utils": "0.0.1",
|
|
39
|
+
"mongodb": "^7.0.0",
|
|
40
|
+
"reflect-metadata": "^0.2.2",
|
|
41
|
+
"rxjs": "^7.8.2",
|
|
42
|
+
"zod": "^4.1.12"
|
|
43
|
+
}
|
|
44
|
+
}
|