github-project-manager 0.1.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/LICENSE +21 -0
- package/apps/backend/dist/app.controller.d.ts +9 -0
- package/apps/backend/dist/app.controller.js +35 -0
- package/apps/backend/dist/app.controller.js.map +1 -0
- package/apps/backend/dist/app.module.d.ts +4 -0
- package/apps/backend/dist/app.module.js +59 -0
- package/apps/backend/dist/app.module.js.map +1 -0
- package/apps/backend/dist/app.service.d.ts +6 -0
- package/apps/backend/dist/app.service.js +20 -0
- package/apps/backend/dist/app.service.js.map +1 -0
- package/apps/backend/dist/filters/github-exception.filter.d.ts +4 -0
- package/apps/backend/dist/filters/github-exception.filter.js +63 -0
- package/apps/backend/dist/filters/github-exception.filter.js.map +1 -0
- package/apps/backend/dist/main.d.ts +1 -0
- package/apps/backend/dist/main.js +15 -0
- package/apps/backend/dist/main.js.map +1 -0
- package/apps/backend/dist/middleware/project-context.middleware.d.ts +8 -0
- package/apps/backend/dist/middleware/project-context.middleware.js +43 -0
- package/apps/backend/dist/middleware/project-context.middleware.js.map +1 -0
- package/apps/backend/dist/modules/label/label.entity.d.ts +10 -0
- package/apps/backend/dist/modules/label/label.entity.js +57 -0
- package/apps/backend/dist/modules/label/label.entity.js.map +1 -0
- package/apps/backend/dist/modules/label/label.module.d.ts +2 -0
- package/apps/backend/dist/modules/label/label.module.js +22 -0
- package/apps/backend/dist/modules/label/label.module.js.map +1 -0
- package/apps/backend/dist/modules/milestone/milestone.entity.d.ts +11 -0
- package/apps/backend/dist/modules/milestone/milestone.entity.js +62 -0
- package/apps/backend/dist/modules/milestone/milestone.entity.js.map +1 -0
- package/apps/backend/dist/modules/milestone/milestone.module.d.ts +2 -0
- package/apps/backend/dist/modules/milestone/milestone.module.js +22 -0
- package/apps/backend/dist/modules/milestone/milestone.module.js.map +1 -0
- package/apps/backend/dist/modules/project/project.controller.d.ts +6 -0
- package/apps/backend/dist/modules/project/project.controller.js +35 -0
- package/apps/backend/dist/modules/project/project.controller.js.map +1 -0
- package/apps/backend/dist/modules/project/project.entity.d.ts +19 -0
- package/apps/backend/dist/modules/project/project.entity.js +90 -0
- package/apps/backend/dist/modules/project/project.entity.js.map +1 -0
- package/apps/backend/dist/modules/project/project.module.d.ts +2 -0
- package/apps/backend/dist/modules/project/project.module.js +27 -0
- package/apps/backend/dist/modules/project/project.module.js.map +1 -0
- package/apps/backend/dist/modules/project/project.service.d.ts +10 -0
- package/apps/backend/dist/modules/project/project.service.js +59 -0
- package/apps/backend/dist/modules/project/project.service.js.map +1 -0
- package/apps/backend/dist/modules/sync/github.service.d.ts +61 -0
- package/apps/backend/dist/modules/sync/github.service.js +213 -0
- package/apps/backend/dist/modules/sync/github.service.js.map +1 -0
- package/apps/backend/dist/modules/sync/sync-log.entity.d.ts +11 -0
- package/apps/backend/dist/modules/sync/sync-log.entity.js +62 -0
- package/apps/backend/dist/modules/sync/sync-log.entity.js.map +1 -0
- package/apps/backend/dist/modules/sync/sync.controller.d.ts +8 -0
- package/apps/backend/dist/modules/sync/sync.controller.js +43 -0
- package/apps/backend/dist/modules/sync/sync.controller.js.map +1 -0
- package/apps/backend/dist/modules/sync/sync.module.d.ts +2 -0
- package/apps/backend/dist/modules/sync/sync.module.js +28 -0
- package/apps/backend/dist/modules/sync/sync.module.js.map +1 -0
- package/apps/backend/dist/modules/sync/sync.service.d.ts +24 -0
- package/apps/backend/dist/modules/sync/sync.service.js +193 -0
- package/apps/backend/dist/modules/sync/sync.service.js.map +1 -0
- package/apps/backend/dist/modules/task/task.controller.d.ts +23 -0
- package/apps/backend/dist/modules/task/task.controller.js +111 -0
- package/apps/backend/dist/modules/task/task.controller.js.map +1 -0
- package/apps/backend/dist/modules/task/task.entity.d.ts +22 -0
- package/apps/backend/dist/modules/task/task.entity.js +118 -0
- package/apps/backend/dist/modules/task/task.entity.js.map +1 -0
- package/apps/backend/dist/modules/task/task.module.d.ts +2 -0
- package/apps/backend/dist/modules/task/task.module.js +27 -0
- package/apps/backend/dist/modules/task/task.module.js.map +1 -0
- package/apps/backend/dist/modules/task/task.service.d.ts +11 -0
- package/apps/backend/dist/modules/task/task.service.js +57 -0
- package/apps/backend/dist/modules/task/task.service.js.map +1 -0
- package/apps/cli/bin/gpm.js +2 -0
- package/apps/cli/dist/commands/init.d.ts +14 -0
- package/apps/cli/dist/commands/init.js +177 -0
- package/apps/cli/dist/commands/init.js.map +1 -0
- package/apps/cli/dist/commands/server.d.ts +4 -0
- package/apps/cli/dist/commands/server.js +65 -0
- package/apps/cli/dist/commands/server.js.map +1 -0
- package/apps/cli/dist/index.d.ts +1 -0
- package/apps/cli/dist/index.js +231 -0
- package/apps/cli/dist/index.js.map +1 -0
- package/apps/cli/dist/types.d.ts +7 -0
- package/apps/cli/dist/types.js +3 -0
- package/apps/cli/dist/types.js.map +1 -0
- package/apps/cli/dist/utils/api-client.d.ts +7 -0
- package/apps/cli/dist/utils/api-client.js +53 -0
- package/apps/cli/dist/utils/api-client.js.map +1 -0
- package/apps/cli/dist/utils/bootstrap.d.ts +4 -0
- package/apps/cli/dist/utils/bootstrap.js +23 -0
- package/apps/cli/dist/utils/bootstrap.js.map +1 -0
- package/apps/cli/dist/utils/gpmrc.d.ts +3 -0
- package/apps/cli/dist/utils/gpmrc.js +22 -0
- package/apps/cli/dist/utils/gpmrc.js.map +1 -0
- package/apps/frontend/dist/assets/index-5kQElBCK.css +1 -0
- package/apps/frontend/dist/assets/index-DzMlDUgv.js +60 -0
- package/apps/frontend/dist/index.html +13 -0
- package/package.json +42 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Hyoungjun Seo
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,35 @@
|
|
|
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.AppController = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const app_service_1 = require("./app.service");
|
|
15
|
+
let AppController = class AppController {
|
|
16
|
+
appService;
|
|
17
|
+
constructor(appService) {
|
|
18
|
+
this.appService = appService;
|
|
19
|
+
}
|
|
20
|
+
getHealth() {
|
|
21
|
+
return this.appService.getHealth();
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.AppController = AppController;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, common_1.Get)('health'),
|
|
27
|
+
__metadata("design:type", Function),
|
|
28
|
+
__metadata("design:paramtypes", []),
|
|
29
|
+
__metadata("design:returntype", void 0)
|
|
30
|
+
], AppController.prototype, "getHealth", null);
|
|
31
|
+
exports.AppController = AppController = __decorate([
|
|
32
|
+
(0, common_1.Controller)(),
|
|
33
|
+
__metadata("design:paramtypes", [app_service_1.AppService])
|
|
34
|
+
], AppController);
|
|
35
|
+
//# sourceMappingURL=app.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.controller.js","sourceRoot":"","sources":["../src/app.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAiD;AACjD,+CAA2C;AAGpC,IAAM,aAAa,GAAnB,MAAM,aAAa;IACK;IAA7B,YAA6B,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;IAAG,CAAC;IAGvD,SAAS;QACP,OAAO,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC;IACrC,CAAC;CACF,CAAA;AAPY,sCAAa;AAIxB;IADC,IAAA,YAAG,EAAC,QAAQ,CAAC;;;;8CAGb;wBANU,aAAa;IADzB,IAAA,mBAAU,GAAE;qCAE8B,wBAAU;GADxC,aAAa,CAOzB"}
|
|
@@ -0,0 +1,59 @@
|
|
|
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 typeorm_1 = require("@nestjs/typeorm");
|
|
12
|
+
const serve_static_1 = require("@nestjs/serve-static");
|
|
13
|
+
const path_1 = require("path");
|
|
14
|
+
const os_1 = require("os");
|
|
15
|
+
const fs_1 = require("fs");
|
|
16
|
+
const app_controller_1 = require("./app.controller");
|
|
17
|
+
const app_service_1 = require("./app.service");
|
|
18
|
+
const project_module_1 = require("./modules/project/project.module");
|
|
19
|
+
const task_module_1 = require("./modules/task/task.module");
|
|
20
|
+
const label_module_1 = require("./modules/label/label.module");
|
|
21
|
+
const milestone_module_1 = require("./modules/milestone/milestone.module");
|
|
22
|
+
const sync_module_1 = require("./modules/sync/sync.module");
|
|
23
|
+
const project_context_middleware_1 = require("./middleware/project-context.middleware");
|
|
24
|
+
const gpmDir = (0, path_1.join)((0, os_1.homedir)(), '.gpm');
|
|
25
|
+
if (!(0, fs_1.existsSync)(gpmDir)) {
|
|
26
|
+
(0, fs_1.mkdirSync)(gpmDir, { recursive: true });
|
|
27
|
+
}
|
|
28
|
+
let AppModule = class AppModule {
|
|
29
|
+
configure(consumer) {
|
|
30
|
+
consumer
|
|
31
|
+
.apply(project_context_middleware_1.ProjectContextMiddleware)
|
|
32
|
+
.forRoutes('*path');
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
exports.AppModule = AppModule;
|
|
36
|
+
exports.AppModule = AppModule = __decorate([
|
|
37
|
+
(0, common_1.Module)({
|
|
38
|
+
imports: [
|
|
39
|
+
typeorm_1.TypeOrmModule.forRoot({
|
|
40
|
+
type: 'better-sqlite3',
|
|
41
|
+
database: (0, path_1.join)(gpmDir, 'data.db'),
|
|
42
|
+
autoLoadEntities: true,
|
|
43
|
+
synchronize: true,
|
|
44
|
+
}),
|
|
45
|
+
serve_static_1.ServeStaticModule.forRoot({
|
|
46
|
+
rootPath: (0, path_1.join)(__dirname, '..', '..', 'frontend', 'dist'),
|
|
47
|
+
exclude: ['/api/*path'],
|
|
48
|
+
}),
|
|
49
|
+
project_module_1.ProjectModule,
|
|
50
|
+
task_module_1.TaskModule,
|
|
51
|
+
label_module_1.LabelModule,
|
|
52
|
+
milestone_module_1.MilestoneModule,
|
|
53
|
+
sync_module_1.SyncModule,
|
|
54
|
+
],
|
|
55
|
+
controllers: [app_controller_1.AppController],
|
|
56
|
+
providers: [app_service_1.AppService],
|
|
57
|
+
})
|
|
58
|
+
], AppModule);
|
|
59
|
+
//# sourceMappingURL=app.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwE;AACxE,6CAAgD;AAChD,uDAAyD;AACzD,+BAA4B;AAC5B,2BAA6B;AAC7B,2BAA2C;AAC3C,qDAAiD;AACjD,+CAA2C;AAC3C,qEAAiE;AACjE,4DAAwD;AACxD,+DAA2D;AAC3D,2EAAuE;AACvE,4DAAwD;AACxD,wFAAmF;AAEnF,MAAM,MAAM,GAAG,IAAA,WAAI,EAAC,IAAA,YAAO,GAAE,EAAE,MAAM,CAAC,CAAC;AACvC,IAAI,CAAC,IAAA,eAAU,EAAC,MAAM,CAAC,EAAE,CAAC;IACxB,IAAA,cAAS,EAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;AACzC,CAAC;AAuBM,IAAM,SAAS,GAAf,MAAM,SAAS;IACpB,SAAS,CAAC,QAA4B;QACpC,QAAQ;aACL,KAAK,CAAC,qDAAwB,CAAC;aAC/B,SAAS,CAAC,OAAO,CAAC,CAAC;IACxB,CAAC;CACF,CAAA;AANY,8BAAS;oBAAT,SAAS;IArBrB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,uBAAa,CAAC,OAAO,CAAC;gBACpB,IAAI,EAAE,gBAAgB;gBACtB,QAAQ,EAAE,IAAA,WAAI,EAAC,MAAM,EAAE,SAAS,CAAC;gBACjC,gBAAgB,EAAE,IAAI;gBACtB,WAAW,EAAE,IAAI;aAClB,CAAC;YACF,gCAAiB,CAAC,OAAO,CAAC;gBACxB,QAAQ,EAAE,IAAA,WAAI,EAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,CAAC;gBACzD,OAAO,EAAE,CAAC,YAAY,CAAC;aACxB,CAAC;YACF,8BAAa;YACb,wBAAU;YACV,0BAAW;YACX,kCAAe;YACf,wBAAU;SACX;QACD,WAAW,EAAE,CAAC,8BAAa,CAAC;QAC5B,SAAS,EAAE,CAAC,wBAAU,CAAC;KACxB,CAAC;GACW,SAAS,CAMrB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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.AppService = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
let AppService = class AppService {
|
|
12
|
+
getHealth() {
|
|
13
|
+
return { status: 'ok', timestamp: new Date().toISOString() };
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
exports.AppService = AppService;
|
|
17
|
+
exports.AppService = AppService = __decorate([
|
|
18
|
+
(0, common_1.Injectable)()
|
|
19
|
+
], AppService);
|
|
20
|
+
//# sourceMappingURL=app.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.service.js","sourceRoot":"","sources":["../src/app.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAGrC,IAAM,UAAU,GAAhB,MAAM,UAAU;IACrB,SAAS;QACP,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC;IAC/D,CAAC;CACF,CAAA;AAJY,gCAAU;qBAAV,UAAU;IADtB,IAAA,mBAAU,GAAE;GACA,UAAU,CAItB"}
|
|
@@ -0,0 +1,63 @@
|
|
|
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.GithubExceptionFilter = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
let GithubExceptionFilter = class GithubExceptionFilter {
|
|
12
|
+
catch(exception, host) {
|
|
13
|
+
const ctx = host.switchToHttp();
|
|
14
|
+
const response = ctx.getResponse();
|
|
15
|
+
if (response.headersSent)
|
|
16
|
+
return;
|
|
17
|
+
if (exception?.name === 'GraphqlResponseError' || exception?.errors) {
|
|
18
|
+
const ghErrors = exception.errors || [];
|
|
19
|
+
const firstError = ghErrors[0];
|
|
20
|
+
let status = common_1.HttpStatus.BAD_GATEWAY;
|
|
21
|
+
let message = 'GitHub API error';
|
|
22
|
+
if (firstError?.type === 'NOT_FOUND') {
|
|
23
|
+
status = common_1.HttpStatus.NOT_FOUND;
|
|
24
|
+
message = firstError.message;
|
|
25
|
+
}
|
|
26
|
+
else if (firstError?.type === 'FORBIDDEN') {
|
|
27
|
+
status = common_1.HttpStatus.FORBIDDEN;
|
|
28
|
+
message = 'GitHub API permission denied. Check your token scopes.';
|
|
29
|
+
}
|
|
30
|
+
else if (exception?.status === 401) {
|
|
31
|
+
status = common_1.HttpStatus.UNAUTHORIZED;
|
|
32
|
+
message = 'GitHub authentication failed. Run "gh auth login".';
|
|
33
|
+
}
|
|
34
|
+
else if (firstError?.message) {
|
|
35
|
+
message = firstError.message;
|
|
36
|
+
}
|
|
37
|
+
const rateLimitRemaining = exception?.headers?.['x-ratelimit-remaining'];
|
|
38
|
+
if (rateLimitRemaining === '0') {
|
|
39
|
+
status = common_1.HttpStatus.TOO_MANY_REQUESTS;
|
|
40
|
+
message = 'GitHub API rate limit exceeded. Try again later.';
|
|
41
|
+
}
|
|
42
|
+
response.status(status).json({ statusCode: status, message });
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
if (exception instanceof Error) {
|
|
46
|
+
const status = exception.status || common_1.HttpStatus.INTERNAL_SERVER_ERROR;
|
|
47
|
+
response.status(status).json({
|
|
48
|
+
statusCode: status,
|
|
49
|
+
message: exception.message,
|
|
50
|
+
});
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
response.status(common_1.HttpStatus.INTERNAL_SERVER_ERROR).json({
|
|
54
|
+
statusCode: common_1.HttpStatus.INTERNAL_SERVER_ERROR,
|
|
55
|
+
message: 'Internal server error',
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
exports.GithubExceptionFilter = GithubExceptionFilter;
|
|
60
|
+
exports.GithubExceptionFilter = GithubExceptionFilter = __decorate([
|
|
61
|
+
(0, common_1.Catch)()
|
|
62
|
+
], GithubExceptionFilter);
|
|
63
|
+
//# sourceMappingURL=github-exception.filter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-exception.filter.js","sourceRoot":"","sources":["../../src/filters/github-exception.filter.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAmF;AAI5E,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAChC,KAAK,CAAC,SAAc,EAAE,IAAmB;QACvC,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QAChC,MAAM,QAAQ,GAAG,GAAG,CAAC,WAAW,EAAY,CAAC;QAG7C,IAAI,QAAQ,CAAC,WAAW;YAAE,OAAO;QAGjC,IAAI,SAAS,EAAE,IAAI,KAAK,sBAAsB,IAAI,SAAS,EAAE,MAAM,EAAE,CAAC;YACpE,MAAM,QAAQ,GAAG,SAAS,CAAC,MAAM,IAAI,EAAE,CAAC;YACxC,MAAM,UAAU,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;YAE/B,IAAI,MAAM,GAAG,mBAAU,CAAC,WAAW,CAAC;YACpC,IAAI,OAAO,GAAG,kBAAkB,CAAC;YAEjC,IAAI,UAAU,EAAE,IAAI,KAAK,WAAW,EAAE,CAAC;gBACrC,MAAM,GAAG,mBAAU,CAAC,SAAS,CAAC;gBAC9B,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;YAC/B,CAAC;iBAAM,IAAI,UAAU,EAAE,IAAI,KAAK,WAAW,EAAE,CAAC;gBAC5C,MAAM,GAAG,mBAAU,CAAC,SAAS,CAAC;gBAC9B,OAAO,GAAG,wDAAwD,CAAC;YACrE,CAAC;iBAAM,IAAI,SAAS,EAAE,MAAM,KAAK,GAAG,EAAE,CAAC;gBACrC,MAAM,GAAG,mBAAU,CAAC,YAAY,CAAC;gBACjC,OAAO,GAAG,oDAAoD,CAAC;YACjE,CAAC;iBAAM,IAAI,UAAU,EAAE,OAAO,EAAE,CAAC;gBAC/B,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;YAC/B,CAAC;YAGD,MAAM,kBAAkB,GAAG,SAAS,EAAE,OAAO,EAAE,CAAC,uBAAuB,CAAC,CAAC;YACzE,IAAI,kBAAkB,KAAK,GAAG,EAAE,CAAC;gBAC/B,MAAM,GAAG,mBAAU,CAAC,iBAAiB,CAAC;gBACtC,OAAO,GAAG,kDAAkD,CAAC;YAC/D,CAAC;YAED,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;YAC9D,OAAO;QACT,CAAC;QAGD,IAAI,SAAS,YAAY,KAAK,EAAE,CAAC;YAC/B,MAAM,MAAM,GAAI,SAAiB,CAAC,MAAM,IAAI,mBAAU,CAAC,qBAAqB,CAAC;YAC7E,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC;gBAC3B,UAAU,EAAE,MAAM;gBAClB,OAAO,EAAE,SAAS,CAAC,OAAO;aAC3B,CAAC,CAAC;YACH,OAAO;QACT,CAAC;QAED,QAAQ,CAAC,MAAM,CAAC,mBAAU,CAAC,qBAAqB,CAAC,CAAC,IAAI,CAAC;YACrD,UAAU,EAAE,mBAAU,CAAC,qBAAqB;YAC5C,OAAO,EAAE,uBAAuB;SACjC,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAvDY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,cAAK,GAAE;GACK,qBAAqB,CAuDjC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@nestjs/core");
|
|
4
|
+
const app_module_1 = require("./app.module");
|
|
5
|
+
const github_exception_filter_1 = require("./filters/github-exception.filter");
|
|
6
|
+
async function bootstrap() {
|
|
7
|
+
const app = await core_1.NestFactory.create(app_module_1.AppModule);
|
|
8
|
+
app.setGlobalPrefix('api');
|
|
9
|
+
app.useGlobalFilters(new github_exception_filter_1.GithubExceptionFilter());
|
|
10
|
+
const port = parseInt(process.env.GPM_PORT || '6170', 10);
|
|
11
|
+
await app.listen(port);
|
|
12
|
+
console.log(`Server is running on http://localhost:${port}`);
|
|
13
|
+
}
|
|
14
|
+
bootstrap();
|
|
15
|
+
//# sourceMappingURL=main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;AAAA,uCAA2C;AAC3C,6CAAyC;AACzC,+EAA0E;AAE1E,KAAK,UAAU,SAAS;IACtB,MAAM,GAAG,GAAG,MAAM,kBAAW,CAAC,MAAM,CAAC,sBAAS,CAAC,CAAC;IAChD,GAAG,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;IAC3B,GAAG,CAAC,gBAAgB,CAAC,IAAI,+CAAqB,EAAE,CAAC,CAAC;IAClD,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,MAAM,EAAE,EAAE,CAAC,CAAC;IAC1D,MAAM,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACvB,OAAO,CAAC,GAAG,CAAC,yCAAyC,IAAI,EAAE,CAAC,CAAC;AAC/D,CAAC;AACD,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NestMiddleware } from '@nestjs/common';
|
|
2
|
+
import { Request, Response, NextFunction } from 'express';
|
|
3
|
+
import { ProjectService } from '../modules/project/project.service';
|
|
4
|
+
export declare class ProjectContextMiddleware implements NestMiddleware {
|
|
5
|
+
private readonly projectService;
|
|
6
|
+
constructor(projectService: ProjectService);
|
|
7
|
+
use(req: Request, res: Response, next: NextFunction): Promise<void>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
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.ProjectContextMiddleware = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const project_service_1 = require("../modules/project/project.service");
|
|
15
|
+
let ProjectContextMiddleware = class ProjectContextMiddleware {
|
|
16
|
+
projectService;
|
|
17
|
+
constructor(projectService) {
|
|
18
|
+
this.projectService = projectService;
|
|
19
|
+
}
|
|
20
|
+
async use(req, res, next) {
|
|
21
|
+
const owner = req.headers['x-gpm-owner'];
|
|
22
|
+
const projectNumber = Number(req.headers['x-gpm-project-number']);
|
|
23
|
+
if (!owner || !projectNumber || isNaN(projectNumber)) {
|
|
24
|
+
return next();
|
|
25
|
+
}
|
|
26
|
+
const project = await this.projectService.findByOwnerAndNumber(owner, projectNumber);
|
|
27
|
+
if (!project) {
|
|
28
|
+
res.status(404).json({
|
|
29
|
+
statusCode: 404,
|
|
30
|
+
message: `Project not found: ${owner}/projects/${projectNumber}. Run "gpm init" first.`,
|
|
31
|
+
});
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
req.project = project;
|
|
35
|
+
next();
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
exports.ProjectContextMiddleware = ProjectContextMiddleware;
|
|
39
|
+
exports.ProjectContextMiddleware = ProjectContextMiddleware = __decorate([
|
|
40
|
+
(0, common_1.Injectable)(),
|
|
41
|
+
__metadata("design:paramtypes", [project_service_1.ProjectService])
|
|
42
|
+
], ProjectContextMiddleware);
|
|
43
|
+
//# sourceMappingURL=project-context.middleware.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-context.middleware.js","sourceRoot":"","sources":["../../src/middleware/project-context.middleware.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4D;AAE5D,wEAAoE;AAG7D,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IACN;IAA7B,YAA6B,cAA8B;QAA9B,mBAAc,GAAd,cAAc,CAAgB;IAAG,CAAC;IAE/D,KAAK,CAAC,GAAG,CAAC,GAAY,EAAE,GAAa,EAAE,IAAkB;QACvD,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,aAAa,CAAW,CAAC;QACnD,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC,CAAC;QAElE,IAAI,CAAC,KAAK,IAAI,CAAC,aAAa,IAAI,KAAK,CAAC,aAAa,CAAC,EAAE,CAAC;YACrD,OAAO,IAAI,EAAE,CAAC;QAChB,CAAC;QAED,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,oBAAoB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;QACrF,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;gBACnB,UAAU,EAAE,GAAG;gBACf,OAAO,EAAE,sBAAsB,KAAK,aAAa,aAAa,yBAAyB;aACxF,CAAC,CAAC;YACH,OAAO;QACT,CAAC;QACA,GAAW,CAAC,OAAO,GAAG,OAAO,CAAC;QAC/B,IAAI,EAAE,CAAC;IACT,CAAC;CACF,CAAA;AAtBY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,mBAAU,GAAE;qCAEkC,gCAAc;GADhD,wBAAwB,CAsBpC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
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.Label = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const project_entity_1 = require("../project/project.entity");
|
|
15
|
+
let Label = class Label {
|
|
16
|
+
id;
|
|
17
|
+
githubLabelId;
|
|
18
|
+
projectId;
|
|
19
|
+
project;
|
|
20
|
+
name;
|
|
21
|
+
color;
|
|
22
|
+
description;
|
|
23
|
+
};
|
|
24
|
+
exports.Label = Label;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
27
|
+
__metadata("design:type", Number)
|
|
28
|
+
], Label.prototype, "id", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ name: 'github_label_id', unique: true, nullable: true }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], Label.prototype, "githubLabelId", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ name: 'project_id' }),
|
|
35
|
+
__metadata("design:type", Number)
|
|
36
|
+
], Label.prototype, "projectId", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.ManyToOne)(() => project_entity_1.Project, (project) => project.labels, { onDelete: 'CASCADE' }),
|
|
39
|
+
(0, typeorm_1.JoinColumn)({ name: 'project_id' }),
|
|
40
|
+
__metadata("design:type", project_entity_1.Project)
|
|
41
|
+
], Label.prototype, "project", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)(),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], Label.prototype, "name", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], Label.prototype, "color", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], Label.prototype, "description", void 0);
|
|
54
|
+
exports.Label = Label = __decorate([
|
|
55
|
+
(0, typeorm_1.Entity)('labels')
|
|
56
|
+
], Label);
|
|
57
|
+
//# sourceMappingURL=label.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label.entity.js","sourceRoot":"","sources":["../../../src/modules/label/label.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAMiB;AACjB,8DAAoD;AAG7C,IAAM,KAAK,GAAX,MAAM,KAAK;IAEhB,EAAE,CAAS;IAGX,aAAa,CAAS;IAGtB,SAAS,CAAS;IAIlB,OAAO,CAAU;IAGjB,IAAI,CAAS;IAGb,KAAK,CAAS;IAGd,WAAW,CAAS;CACrB,CAAA;AAtBY,sBAAK;AAEhB;IADC,IAAA,gCAAsB,GAAE;;iCACd;AAGX;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CAC5C;AAGtB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;;wCACb;AAIlB;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,wBAAO,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAC9E,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;8BAC1B,wBAAO;sCAAC;AAGjB;IADC,IAAA,gBAAM,GAAE;;mCACI;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oCACb;AAGd;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACP;gBArBT,KAAK;IADjB,IAAA,gBAAM,EAAC,QAAQ,CAAC;GACJ,KAAK,CAsBjB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
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.LabelModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
12
|
+
const label_entity_1 = require("./label.entity");
|
|
13
|
+
let LabelModule = class LabelModule {
|
|
14
|
+
};
|
|
15
|
+
exports.LabelModule = LabelModule;
|
|
16
|
+
exports.LabelModule = LabelModule = __decorate([
|
|
17
|
+
(0, common_1.Module)({
|
|
18
|
+
imports: [typeorm_1.TypeOrmModule.forFeature([label_entity_1.Label])],
|
|
19
|
+
exports: [typeorm_1.TypeOrmModule],
|
|
20
|
+
})
|
|
21
|
+
], LabelModule);
|
|
22
|
+
//# sourceMappingURL=label.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label.module.js","sourceRoot":"","sources":["../../../src/modules/label/label.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6CAAgD;AAChD,iDAAuC;AAMhC,IAAM,WAAW,GAAjB,MAAM,WAAW;CAAG,CAAA;AAAd,kCAAW;sBAAX,WAAW;IAJvB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,uBAAa,CAAC,UAAU,CAAC,CAAC,oBAAK,CAAC,CAAC,CAAC;QAC5C,OAAO,EAAE,CAAC,uBAAa,CAAC;KACzB,CAAC;GACW,WAAW,CAAG"}
|
|
@@ -0,0 +1,62 @@
|
|
|
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.Milestone = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const project_entity_1 = require("../project/project.entity");
|
|
15
|
+
let Milestone = class Milestone {
|
|
16
|
+
id;
|
|
17
|
+
githubMilestoneId;
|
|
18
|
+
projectId;
|
|
19
|
+
project;
|
|
20
|
+
title;
|
|
21
|
+
description;
|
|
22
|
+
dueDate;
|
|
23
|
+
state;
|
|
24
|
+
};
|
|
25
|
+
exports.Milestone = Milestone;
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], Milestone.prototype, "id", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({ name: 'github_milestone_id', unique: true, nullable: true }),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], Milestone.prototype, "githubMilestoneId", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ name: 'project_id' }),
|
|
36
|
+
__metadata("design:type", Number)
|
|
37
|
+
], Milestone.prototype, "projectId", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.ManyToOne)(() => project_entity_1.Project, (project) => project.milestones, { onDelete: 'CASCADE' }),
|
|
40
|
+
(0, typeorm_1.JoinColumn)({ name: 'project_id' }),
|
|
41
|
+
__metadata("design:type", project_entity_1.Project)
|
|
42
|
+
], Milestone.prototype, "project", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)(),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], Milestone.prototype, "title", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], Milestone.prototype, "description", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, typeorm_1.Column)({ name: 'due_date', nullable: true }),
|
|
53
|
+
__metadata("design:type", Date)
|
|
54
|
+
], Milestone.prototype, "dueDate", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typeorm_1.Column)({ default: 'OPEN' }),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], Milestone.prototype, "state", void 0);
|
|
59
|
+
exports.Milestone = Milestone = __decorate([
|
|
60
|
+
(0, typeorm_1.Entity)('milestones')
|
|
61
|
+
], Milestone);
|
|
62
|
+
//# sourceMappingURL=milestone.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"milestone.entity.js","sourceRoot":"","sources":["../../../src/modules/milestone/milestone.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAMiB;AACjB,8DAAoD;AAG7C,IAAM,SAAS,GAAf,MAAM,SAAS;IAEpB,EAAE,CAAS;IAGX,iBAAiB,CAAS;IAG1B,SAAS,CAAS;IAIlB,OAAO,CAAU;IAGjB,KAAK,CAAS;IAGd,WAAW,CAAS;IAGpB,OAAO,CAAO;IAGd,KAAK,CAAS;CACf,CAAA;AAzBY,8BAAS;AAEpB;IADC,IAAA,gCAAsB,GAAE;;qCACd;AAGX;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,qBAAqB,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDAC5C;AAG1B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;;4CACb;AAIlB;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,wBAAO,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAClF,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;8BAC1B,wBAAO;0CAAC;AAGjB;IADC,IAAA,gBAAM,GAAE;;wCACK;AAGd;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACP;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACpC,IAAI;0CAAC;AAGd;IADC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;;wCACd;oBAxBH,SAAS;IADrB,IAAA,gBAAM,EAAC,YAAY,CAAC;GACR,SAAS,CAyBrB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
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.MilestoneModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
12
|
+
const milestone_entity_1 = require("./milestone.entity");
|
|
13
|
+
let MilestoneModule = class MilestoneModule {
|
|
14
|
+
};
|
|
15
|
+
exports.MilestoneModule = MilestoneModule;
|
|
16
|
+
exports.MilestoneModule = MilestoneModule = __decorate([
|
|
17
|
+
(0, common_1.Module)({
|
|
18
|
+
imports: [typeorm_1.TypeOrmModule.forFeature([milestone_entity_1.Milestone])],
|
|
19
|
+
exports: [typeorm_1.TypeOrmModule],
|
|
20
|
+
})
|
|
21
|
+
], MilestoneModule);
|
|
22
|
+
//# sourceMappingURL=milestone.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"milestone.module.js","sourceRoot":"","sources":["../../../src/modules/milestone/milestone.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6CAAgD;AAChD,yDAA+C;AAMxC,IAAM,eAAe,GAArB,MAAM,eAAe;CAAG,CAAA;AAAlB,0CAAe;0BAAf,eAAe;IAJ3B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,uBAAa,CAAC,UAAU,CAAC,CAAC,4BAAS,CAAC,CAAC,CAAC;QAChD,OAAO,EAAE,CAAC,uBAAa,CAAC;KACzB,CAAC;GACW,eAAe,CAAG"}
|
|
@@ -0,0 +1,35 @@
|
|
|
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.ProjectController = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const project_service_1 = require("./project.service");
|
|
15
|
+
let ProjectController = class ProjectController {
|
|
16
|
+
projectService;
|
|
17
|
+
constructor(projectService) {
|
|
18
|
+
this.projectService = projectService;
|
|
19
|
+
}
|
|
20
|
+
async findAll() {
|
|
21
|
+
return this.projectService.findAll();
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.ProjectController = ProjectController;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, common_1.Get)(),
|
|
27
|
+
__metadata("design:type", Function),
|
|
28
|
+
__metadata("design:paramtypes", []),
|
|
29
|
+
__metadata("design:returntype", Promise)
|
|
30
|
+
], ProjectController.prototype, "findAll", null);
|
|
31
|
+
exports.ProjectController = ProjectController = __decorate([
|
|
32
|
+
(0, common_1.Controller)('projects'),
|
|
33
|
+
__metadata("design:paramtypes", [project_service_1.ProjectService])
|
|
34
|
+
], ProjectController);
|
|
35
|
+
//# sourceMappingURL=project.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.controller.js","sourceRoot":"","sources":["../../../src/modules/project/project.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAiD;AACjD,uDAAmD;AAG5C,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IACC;IAA7B,YAA6B,cAA8B;QAA9B,mBAAc,GAAd,cAAc,CAAgB;IAAG,CAAC;IAGzD,AAAN,KAAK,CAAC,OAAO;QACX,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;IACvC,CAAC;CACF,CAAA;AAPY,8CAAiB;AAItB;IADL,IAAA,YAAG,GAAE;;;;gDAGL;4BANU,iBAAiB;IAD7B,IAAA,mBAAU,EAAC,UAAU,CAAC;qCAEwB,gCAAc;GADhD,iBAAiB,CAO7B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Task } from '../task/task.entity';
|
|
2
|
+
import { Label } from '../label/label.entity';
|
|
3
|
+
import { Milestone } from '../milestone/milestone.entity';
|
|
4
|
+
import { SyncLog } from '../sync/sync-log.entity';
|
|
5
|
+
export declare class Project {
|
|
6
|
+
id: number;
|
|
7
|
+
owner: string;
|
|
8
|
+
ownerType: string;
|
|
9
|
+
repo: string;
|
|
10
|
+
projectNumber: number;
|
|
11
|
+
projectUrl: string;
|
|
12
|
+
githubProjectId: string;
|
|
13
|
+
createdAt: Date;
|
|
14
|
+
updatedAt: Date;
|
|
15
|
+
tasks: Task[];
|
|
16
|
+
labels: Label[];
|
|
17
|
+
milestones: Milestone[];
|
|
18
|
+
syncLogs: SyncLog[];
|
|
19
|
+
}
|