@things-factory/operato-codelingua 9.0.0-beta.26 → 9.0.0-beta.27

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.
Files changed (65) hide show
  1. package/package.json +9 -6
  2. package/dist-client/bootstrap.d.ts +0 -8
  3. package/dist-client/bootstrap.js +0 -179
  4. package/dist-client/bootstrap.js.map +0 -1
  5. package/dist-client/icons/menu-icons.d.ts +0 -5
  6. package/dist-client/icons/menu-icons.js +0 -84
  7. package/dist-client/icons/menu-icons.js.map +0 -1
  8. package/dist-client/index.d.ts +0 -0
  9. package/dist-client/index.js +0 -2
  10. package/dist-client/index.js.map +0 -1
  11. package/dist-client/pages/git-project/git-project-list-page.d.ts +0 -55
  12. package/dist-client/pages/git-project/git-project-list-page.js +0 -406
  13. package/dist-client/pages/git-project/git-project-list-page.js.map +0 -1
  14. package/dist-client/route.d.ts +0 -1
  15. package/dist-client/route.js +0 -8
  16. package/dist-client/route.js.map +0 -1
  17. package/dist-client/themes/dark.css +0 -51
  18. package/dist-client/themes/light.css +0 -51
  19. package/dist-client/tsconfig.tsbuildinfo +0 -1
  20. package/dist-client/viewparts/menu-tools.d.ts +0 -17
  21. package/dist-client/viewparts/menu-tools.js +0 -172
  22. package/dist-client/viewparts/menu-tools.js.map +0 -1
  23. package/dist-client/viewparts/user-circle.d.ts +0 -5
  24. package/dist-client/viewparts/user-circle.js +0 -26
  25. package/dist-client/viewparts/user-circle.js.map +0 -1
  26. package/dist-server/controllers/github-controller.d.ts +0 -3
  27. package/dist-server/controllers/github-controller.js +0 -85
  28. package/dist-server/controllers/github-controller.js.map +0 -1
  29. package/dist-server/controllers/index.d.ts +0 -0
  30. package/dist-server/controllers/index.js +0 -1
  31. package/dist-server/controllers/index.js.map +0 -1
  32. package/dist-server/index.d.ts +0 -4
  33. package/dist-server/index.js +0 -9
  34. package/dist-server/index.js.map +0 -1
  35. package/dist-server/middlewares/index.d.ts +0 -1
  36. package/dist-server/middlewares/index.js +0 -7
  37. package/dist-server/middlewares/index.js.map +0 -1
  38. package/dist-server/migrations/index.d.ts +0 -1
  39. package/dist-server/migrations/index.js +0 -12
  40. package/dist-server/migrations/index.js.map +0 -1
  41. package/dist-server/routers/github-webhook-router.d.ts +0 -1
  42. package/dist-server/routers/github-webhook-router.js +0 -37
  43. package/dist-server/routers/github-webhook-router.js.map +0 -1
  44. package/dist-server/routes.d.ts +0 -1
  45. package/dist-server/routes.js +0 -28
  46. package/dist-server/routes.js.map +0 -1
  47. package/dist-server/service/git-project/git-project-mutation.d.ts +0 -12
  48. package/dist-server/service/git-project/git-project-mutation.js +0 -170
  49. package/dist-server/service/git-project/git-project-mutation.js.map +0 -1
  50. package/dist-server/service/git-project/git-project-query.d.ts +0 -11
  51. package/dist-server/service/git-project/git-project-query.js +0 -79
  52. package/dist-server/service/git-project/git-project-query.js.map +0 -1
  53. package/dist-server/service/git-project/git-project-type.d.ts +0 -27
  54. package/dist-server/service/git-project/git-project-type.js +0 -105
  55. package/dist-server/service/git-project/git-project-type.js.map +0 -1
  56. package/dist-server/service/git-project/git-project.d.ts +0 -34
  57. package/dist-server/service/git-project/git-project.js +0 -126
  58. package/dist-server/service/git-project/git-project.js.map +0 -1
  59. package/dist-server/service/git-project/index.d.ts +0 -6
  60. package/dist-server/service/git-project/index.js +0 -10
  61. package/dist-server/service/git-project/index.js.map +0 -1
  62. package/dist-server/service/index.d.ts +0 -5
  63. package/dist-server/service/index.js +0 -19
  64. package/dist-server/service/index.js.map +0 -1
  65. package/dist-server/tsconfig.tsbuildinfo +0 -1
@@ -1,17 +0,0 @@
1
- import { LitElement } from 'lit';
2
- declare const MenuTools_base: (new (...args: any[]) => {
3
- _storeUnsubscribe: import("redux").Unsubscribe;
4
- connectedCallback(): void;
5
- disconnectedCallback(): void;
6
- stateChanged(_state: unknown): void;
7
- readonly isConnected: boolean;
8
- }) & typeof LitElement;
9
- export declare class MenuTools extends MenuTools_base {
10
- static styles: import("lit").CSSResult[];
11
- page?: string;
12
- width?: string;
13
- private menus;
14
- render(): import("lit-html").TemplateResult<1>;
15
- stateChanged(state: any): void;
16
- }
17
- export {};
@@ -1,172 +0,0 @@
1
- import { __decorate, __metadata } from "tslib";
2
- import { css, html, LitElement } from 'lit';
3
- import { customElement, property } from 'lit/decorators.js';
4
- import { connect } from 'pwa-helpers';
5
- import { store } from '@operato/shell';
6
- import { ICONS_PROGRESS, ICONS_COMPLETED, ICONS_STATUS, ICONS_OPERATING, ICONS_SETTING } from '../icons/menu-icons';
7
- let MenuTools = class MenuTools extends connect(store)(LitElement) {
8
- constructor() {
9
- super(...arguments);
10
- this.menus = [];
11
- }
12
- render() {
13
- this.menus = [
14
- {
15
- name: '진행중',
16
- path: 'git-project-list',
17
- icons: ICONS_PROGRESS
18
- },
19
- {
20
- name: '완료',
21
- path: 'project-completed-list',
22
- icons: ICONS_COMPLETED
23
- },
24
- {
25
- name: '현황',
26
- path: 'dssp-status',
27
- icons: ICONS_STATUS
28
- },
29
- {
30
- name: '공정표',
31
- path: 'project-schedule-list',
32
- icons: ICONS_OPERATING
33
- },
34
- {
35
- name: '셋팅',
36
- path: 'project-setting-list',
37
- icons: ICONS_SETTING
38
- }
39
- ];
40
- var page = this.page || '';
41
- return html `
42
- <ul>
43
- ${this.menus.map(menu => html `
44
- <li>
45
- <a href=${menu.path} ?active=${!!~page.indexOf(menu.path)}>
46
- <img src=${!!~page.indexOf(menu.path) ? menu.icons[1] : menu.icons[0]} />
47
- <div>${menu.name}</div>
48
- </a>
49
- </li>
50
- `)}
51
- </ul>
52
- `;
53
- }
54
- stateChanged(state) {
55
- this.page = state.route.page;
56
- this.width = state.layout.width;
57
- }
58
- };
59
- MenuTools.styles = [
60
- css `
61
- :host {
62
- display: flex;
63
- background-color: var(--secondary-color);
64
-
65
- /* for narrow mode */
66
- flex-direction: column;
67
- width: 100%;
68
- --menu-tools-color: rgba(255, 255, 255, 0.9);
69
- --menu-tools-active-color: rgba(107, 178, 249, 1);
70
- }
71
-
72
- :host([width='WIDE']) {
73
- /* for wide mode */
74
- flex-direction: row;
75
- width: initial;
76
- height: 100%;
77
- }
78
-
79
- ul {
80
- display: flex;
81
- flex-direction: row;
82
-
83
- margin: auto;
84
- padding: 0;
85
- list-style: none;
86
- height: 100%;
87
- overflow: none;
88
- }
89
-
90
- :host([width='NARROW']) ul {
91
- width: 100%;
92
- justify-content: space-around;
93
- }
94
-
95
- :host([width='WIDE']) ul {
96
- flex-direction: column;
97
- }
98
- :host([width='NARROW']) li {
99
- flex: 1;
100
- }
101
-
102
- :host([width='WIDE']) li {
103
- border-top: 1px solid rgba(255, 255, 255, 0.1);
104
- border-bottom: 1px solid rgba(0, 0, 0, 0.1);
105
- }
106
-
107
- a {
108
- display: flex;
109
- flex-direction: column;
110
- padding: 5px 0px;
111
- opacity: 0.7;
112
- align-items: center;
113
- text-align: center;
114
- text-decoration: none;
115
- text-transform: capitalize;
116
- color: var(--menu-tools-color);
117
- border-left: 2px solid transparent;
118
- }
119
-
120
- a[active] {
121
- opacity: 1;
122
- color: var(--menu-tools-active-color);
123
- font-weight: bold;
124
- background-color: rgba(0, 0, 0, 0.15);
125
- border-left: 2px solid var(--menu-tools-active-color);
126
- }
127
-
128
- :host([width='NARROW']) a {
129
- padding: 0px 0px 5px 0px;
130
- opacity: 0.8;
131
- color: var(--menu-tools-color);
132
- border-left: none;
133
- border-top: 2px solid transparent;
134
- }
135
-
136
- :host([width='NARROW']) a[active] {
137
- opacity: 1;
138
- color: var(--menu-tools-active-color);
139
- font-weight: bold;
140
- background-color: rgba(0, 0, 0, 0.15);
141
- border-left: none;
142
- border-top: 2px solid var(--menu-tools-active-color);
143
- }
144
-
145
- img {
146
- display: block;
147
- width: 35px;
148
- padding: 5px 10px 0px 10px;
149
- }
150
-
151
- :host([width='NARROW']) img {
152
- padding: 0;
153
- }
154
-
155
- div {
156
- font-size: 0.6em;
157
- }
158
- `
159
- ];
160
- __decorate([
161
- property({ type: String }),
162
- __metadata("design:type", String)
163
- ], MenuTools.prototype, "page", void 0);
164
- __decorate([
165
- property({ type: String, reflect: true }),
166
- __metadata("design:type", String)
167
- ], MenuTools.prototype, "width", void 0);
168
- MenuTools = __decorate([
169
- customElement('menu-tools')
170
- ], MenuTools);
171
- export { MenuTools };
172
- //# sourceMappingURL=menu-tools.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"menu-tools.js","sourceRoot":"","sources":["../../client/viewparts/menu-tools.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAS,MAAM,mBAAmB,CAAA;AAElE,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAErC,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAEtC,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAG5G,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,OAAO,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC;IAAlD;;QA0GG,UAAK,GAAsD,EAAE,CAAA;IAqDvE,CAAC;IAnDC,MAAM;QACJ,IAAI,CAAC,KAAK,GAAG;YACX;gBACE,IAAI,EAAE,KAAK;gBACX,IAAI,EAAE,kBAAkB;gBACxB,KAAK,EAAE,cAAc;aACtB;YACD;gBACE,IAAI,EAAE,IAAI;gBACV,IAAI,EAAE,wBAAwB;gBAC9B,KAAK,EAAE,eAAe;aACvB;YACD;gBACE,IAAI,EAAE,IAAI;gBACV,IAAI,EAAE,aAAa;gBACnB,KAAK,EAAE,YAAY;aACpB;YACD;gBACE,IAAI,EAAE,KAAK;gBACX,IAAI,EAAE,uBAAuB;gBAC7B,KAAK,EAAE,eAAe;aACvB;YACD;gBACE,IAAI,EAAE,IAAI;gBACV,IAAI,EAAE,sBAAsB;gBAC5B,KAAK,EAAE,aAAa;aACrB;SACF,CAAA;QAED,IAAI,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,EAAE,CAAA;QAE1B,OAAO,IAAI,CAAA;;UAEL,IAAI,CAAC,KAAK,CAAC,GAAG,CACd,IAAI,CAAC,EAAE,CAAC,IAAI,CAAA;;wBAEE,IAAI,CAAC,IAAI,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;2BAC5C,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;uBAC9D,IAAI,CAAC,IAAI;;;WAGrB,CACF;;KAEJ,CAAA;IACH,CAAC;IAED,YAAY,CAAC,KAAK;QAChB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAA;QAC5B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAA;IACjC,CAAC;;AA7JM,gBAAM,GAAG;IACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAkGF;CACF,AApGY,CAoGZ;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uCAAc;AACE;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;wCAAe;AAxG9C,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CA+JrB","sourcesContent":["import { css, html, LitElement } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\n\nimport { connect } from 'pwa-helpers'\n\nimport { store } from '@operato/shell'\n\nimport { ICONS_PROGRESS, ICONS_COMPLETED, ICONS_STATUS, ICONS_OPERATING, ICONS_SETTING } from '../icons/menu-icons'\n\n@customElement('menu-tools')\nexport class MenuTools extends connect(store)(LitElement) {\n static styles = [\n css`\n :host {\n display: flex;\n background-color: var(--secondary-color);\n\n /* for narrow mode */\n flex-direction: column;\n width: 100%;\n --menu-tools-color: rgba(255, 255, 255, 0.9);\n --menu-tools-active-color: rgba(107, 178, 249, 1);\n }\n\n :host([width='WIDE']) {\n /* for wide mode */\n flex-direction: row;\n width: initial;\n height: 100%;\n }\n\n ul {\n display: flex;\n flex-direction: row;\n\n margin: auto;\n padding: 0;\n list-style: none;\n height: 100%;\n overflow: none;\n }\n\n :host([width='NARROW']) ul {\n width: 100%;\n justify-content: space-around;\n }\n\n :host([width='WIDE']) ul {\n flex-direction: column;\n }\n :host([width='NARROW']) li {\n flex: 1;\n }\n\n :host([width='WIDE']) li {\n border-top: 1px solid rgba(255, 255, 255, 0.1);\n border-bottom: 1px solid rgba(0, 0, 0, 0.1);\n }\n\n a {\n display: flex;\n flex-direction: column;\n padding: 5px 0px;\n opacity: 0.7;\n align-items: center;\n text-align: center;\n text-decoration: none;\n text-transform: capitalize;\n color: var(--menu-tools-color);\n border-left: 2px solid transparent;\n }\n\n a[active] {\n opacity: 1;\n color: var(--menu-tools-active-color);\n font-weight: bold;\n background-color: rgba(0, 0, 0, 0.15);\n border-left: 2px solid var(--menu-tools-active-color);\n }\n\n :host([width='NARROW']) a {\n padding: 0px 0px 5px 0px;\n opacity: 0.8;\n color: var(--menu-tools-color);\n border-left: none;\n border-top: 2px solid transparent;\n }\n\n :host([width='NARROW']) a[active] {\n opacity: 1;\n color: var(--menu-tools-active-color);\n font-weight: bold;\n background-color: rgba(0, 0, 0, 0.15);\n border-left: none;\n border-top: 2px solid var(--menu-tools-active-color);\n }\n\n img {\n display: block;\n width: 35px;\n padding: 5px 10px 0px 10px;\n }\n\n :host([width='NARROW']) img {\n padding: 0;\n }\n\n div {\n font-size: 0.6em;\n }\n `\n ]\n\n @property({ type: String }) page?: string\n @property({ type: String, reflect: true }) width?: string\n\n private menus: { name: string; path: string; icons: string[] }[] = []\n\n render() {\n this.menus = [\n {\n name: '진행중',\n path: 'git-project-list',\n icons: ICONS_PROGRESS\n },\n {\n name: '완료',\n path: 'project-completed-list',\n icons: ICONS_COMPLETED\n },\n {\n name: '현황',\n path: 'dssp-status',\n icons: ICONS_STATUS\n },\n {\n name: '공정표',\n path: 'project-schedule-list',\n icons: ICONS_OPERATING\n },\n {\n name: '셋팅',\n path: 'project-setting-list',\n icons: ICONS_SETTING\n }\n ]\n\n var page = this.page || ''\n\n return html`\n <ul>\n ${this.menus.map(\n menu => html`\n <li>\n <a href=${menu.path} ?active=${!!~page.indexOf(menu.path)}>\n <img src=${!!~page.indexOf(menu.path) ? menu.icons[1] : menu.icons[0]} />\n <div>${menu.name}</div>\n </a>\n </li>\n `\n )}\n </ul>\n `\n }\n\n stateChanged(state) {\n this.page = state.route.page\n this.width = state.layout.width\n }\n}\n"]}
@@ -1,5 +0,0 @@
1
- import { LitElement } from 'lit';
2
- export declare class UserCircle extends LitElement {
3
- static styles: import("lit").CSSResult[];
4
- render(): import("lit-html").TemplateResult<1>;
5
- }
@@ -1,26 +0,0 @@
1
- import { __decorate } from "tslib";
2
- import { LitElement, html, css } from 'lit';
3
- import { customElement } from 'lit/decorators.js';
4
- const userIcon = new URL('../../assets/images/user.png', import.meta.url).href;
5
- let UserCircle = class UserCircle extends LitElement {
6
- render() {
7
- return html ` <img src=${userIcon} class="user" /> `;
8
- }
9
- };
10
- UserCircle.styles = [
11
- css `
12
- img {
13
- display: block;
14
- width: 36px;
15
- height: 36px;
16
- border-radius: 50%;
17
-
18
- object-fit: cover;
19
- }
20
- `
21
- ];
22
- UserCircle = __decorate([
23
- customElement('user-circle')
24
- ], UserCircle);
25
- export { UserCircle };
26
- //# sourceMappingURL=user-circle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"user-circle.js","sourceRoot":"","sources":["../../client/viewparts/user-circle.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,8BAA8B,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AAGvE,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,UAAU;IAcxC,MAAM;QACJ,OAAO,IAAI,CAAA,aAAa,QAAQ,mBAAmB,CAAA;IACrD,CAAC;;AAfM,iBAAM,GAAG;IACd,GAAG,CAAA;;;;;;;;;KASF;CACF,AAXY,CAWZ;AAZU,UAAU;IADtB,aAAa,CAAC,aAAa,CAAC;GAChB,UAAU,CAiBtB","sourcesContent":["import { LitElement, html, css } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nconst userIcon = new URL('../../assets/images/user.png', import.meta.url).href\n\n@customElement('user-circle')\nexport class UserCircle extends LitElement {\n static styles = [\n css`\n img {\n display: block;\n width: 36px;\n height: 36px;\n border-radius: 50%;\n\n object-fit: cover;\n }\n `\n ]\n\n render() {\n return html` <img src=${userIcon} class=\"user\" /> `\n }\n}\n"]}
@@ -1,3 +0,0 @@
1
- export declare const postGitHubComment: (repoFullName: string, commitId: string, comment: string) => Promise<void>;
2
- export declare const registerWebhook: (accessToken: string, repoFullName: string, webhookUrl: string) => Promise<void>;
3
- export declare const unregisterWebhook: (accessToken: string, repoFullName: string, webhookUrl: string) => Promise<void>;
@@ -1,85 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.unregisterWebhook = exports.registerWebhook = exports.postGitHubComment = void 0;
4
- const tslib_1 = require("tslib");
5
- const node_fetch_1 = tslib_1.__importDefault(require("node-fetch"));
6
- const GITHUB_API_URL = 'https://api.github.com';
7
- const fetchOptions = (token) => ({
8
- headers: {
9
- 'Content-Type': 'application/json',
10
- Authorization: `token ${token}`
11
- }
12
- });
13
- const handleFetchError = (response, action) => {
14
- if (!response.ok) {
15
- console.error(`Failed to ${action}:`, response.statusText);
16
- throw new Error(`Failed to ${action}`);
17
- }
18
- };
19
- const getWebhooks = async (repoFullName, token) => {
20
- const response = await (0, node_fetch_1.default)(`${GITHUB_API_URL}/repos/${repoFullName}/hooks`, fetchOptions(token));
21
- handleFetchError(response, 'fetch webhooks');
22
- return response.json();
23
- };
24
- const webhookExists = async (repoFullName, webhookUrl, token) => {
25
- try {
26
- const hooks = await getWebhooks(repoFullName, token);
27
- const hook = hooks.find((hook) => hook.config.url === webhookUrl);
28
- return hook ? { exists: true, id: hook.id } : { exists: false };
29
- }
30
- catch (error) {
31
- console.error('Error checking webhook existence:', error);
32
- return { exists: false };
33
- }
34
- };
35
- const postGitHubComment = async (repoFullName, commitId, comment) => {
36
- try {
37
- const response = await (0, node_fetch_1.default)(`${GITHUB_API_URL}/repos/${repoFullName}/commits/${commitId}/comments`, Object.assign(Object.assign({ method: 'POST' }, fetchOptions(process.env.GITHUB_API_KEY)), { body: JSON.stringify({ body: comment }) }));
38
- handleFetchError(response, 'post GitHub comment');
39
- }
40
- catch (error) {
41
- console.error('Error posting GitHub comment:', error);
42
- }
43
- };
44
- exports.postGitHubComment = postGitHubComment;
45
- const registerWebhook = async (accessToken, repoFullName, webhookUrl) => {
46
- const { exists } = await webhookExists(repoFullName, webhookUrl, accessToken);
47
- if (exists) {
48
- console.log('Webhook already registered.');
49
- return;
50
- }
51
- try {
52
- const response = await (0, node_fetch_1.default)(`${GITHUB_API_URL}/repos/${repoFullName}/hooks`, Object.assign(Object.assign({ method: 'POST' }, fetchOptions(accessToken)), { body: JSON.stringify({
53
- name: 'web',
54
- active: true,
55
- events: ['push'],
56
- config: {
57
- url: webhookUrl,
58
- content_type: 'json'
59
- }
60
- }) }));
61
- handleFetchError(response, 'register webhook');
62
- console.log('Webhook registered successfully.');
63
- }
64
- catch (error) {
65
- console.error('Error registering webhook:', error);
66
- }
67
- };
68
- exports.registerWebhook = registerWebhook;
69
- const unregisterWebhook = async (accessToken, repoFullName, webhookUrl) => {
70
- const { exists, id } = await webhookExists(repoFullName, webhookUrl, accessToken);
71
- if (!exists || !id) {
72
- console.log('Webhook not found.');
73
- return;
74
- }
75
- try {
76
- const deleteResponse = await (0, node_fetch_1.default)(`${GITHUB_API_URL}/repos/${repoFullName}/hooks/${id}`, Object.assign({ method: 'DELETE' }, fetchOptions(accessToken)));
77
- handleFetchError(deleteResponse, 'unregister webhook');
78
- console.log('Webhook unregistered successfully.');
79
- }
80
- catch (error) {
81
- console.error('Error unregistering webhook:', error);
82
- }
83
- };
84
- exports.unregisterWebhook = unregisterWebhook;
85
- //# sourceMappingURL=github-controller.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"github-controller.js","sourceRoot":"","sources":["../../server/controllers/github-controller.ts"],"names":[],"mappings":"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","sourcesContent":["import fetch, { Response } from 'node-fetch'\n\nconst GITHUB_API_URL = 'https://api.github.com'\n\nconst fetchOptions = (token: string) => ({\n headers: {\n 'Content-Type': 'application/json',\n Authorization: `token ${token}`\n }\n})\n\nconst handleFetchError = (response: Response, action: string) => {\n if (!response.ok) {\n console.error(`Failed to ${action}:`, response.statusText)\n throw new Error(`Failed to ${action}`)\n }\n}\n\nconst getWebhooks = async (repoFullName: string, token: string): Promise<any[]> => {\n const response: Response = await fetch(`${GITHUB_API_URL}/repos/${repoFullName}/hooks`, fetchOptions(token))\n handleFetchError(response, 'fetch webhooks')\n return response.json()\n}\n\nconst webhookExists = async (\n repoFullName: string,\n webhookUrl: string,\n token: string\n): Promise<{ exists: boolean; id?: number }> => {\n try {\n const hooks: any[] = await getWebhooks(repoFullName, token)\n const hook = hooks.find((hook: any) => hook.config.url === webhookUrl)\n return hook ? { exists: true, id: hook.id } : { exists: false }\n } catch (error) {\n console.error('Error checking webhook existence:', error)\n return { exists: false }\n }\n}\n\nexport const postGitHubComment = async (repoFullName: string, commitId: string, comment: string): Promise<void> => {\n try {\n const response: Response = await fetch(`${GITHUB_API_URL}/repos/${repoFullName}/commits/${commitId}/comments`, {\n method: 'POST',\n ...fetchOptions(process.env.GITHUB_API_KEY!),\n body: JSON.stringify({ body: comment })\n })\n handleFetchError(response, 'post GitHub comment')\n } catch (error) {\n console.error('Error posting GitHub comment:', error)\n }\n}\n\nexport const registerWebhook = async (accessToken: string, repoFullName: string, webhookUrl: string) => {\n const { exists } = await webhookExists(repoFullName, webhookUrl, accessToken)\n if (exists) {\n console.log('Webhook already registered.')\n return\n }\n\n try {\n const response: Response = await fetch(`${GITHUB_API_URL}/repos/${repoFullName}/hooks`, {\n method: 'POST',\n ...fetchOptions(accessToken),\n body: JSON.stringify({\n name: 'web',\n active: true,\n events: ['push'],\n config: {\n url: webhookUrl,\n content_type: 'json'\n }\n })\n })\n handleFetchError(response, 'register webhook')\n console.log('Webhook registered successfully.')\n } catch (error) {\n console.error('Error registering webhook:', error)\n }\n}\n\nexport const unregisterWebhook = async (accessToken: string, repoFullName: string, webhookUrl: string) => {\n const { exists, id } = await webhookExists(repoFullName, webhookUrl, accessToken)\n if (!exists || !id) {\n console.log('Webhook not found.')\n return\n }\n\n try {\n const deleteResponse: Response = await fetch(`${GITHUB_API_URL}/repos/${repoFullName}/hooks/${id}`, {\n method: 'DELETE',\n ...fetchOptions(accessToken)\n })\n handleFetchError(deleteResponse, 'unregister webhook')\n console.log('Webhook unregistered successfully.')\n } catch (error) {\n console.error('Error unregistering webhook:', error)\n }\n}\n"]}
File without changes
@@ -1 +0,0 @@
1
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/controllers/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
@@ -1,4 +0,0 @@
1
- import './routes';
2
- export * from './migrations';
3
- export * from './middlewares';
4
- export * from './service';
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- require("./routes");
5
- tslib_1.__exportStar(require("./migrations"), exports);
6
- tslib_1.__exportStar(require("./middlewares"), exports);
7
- tslib_1.__exportStar(require("./service"), exports);
8
- /* github webhook 이 등록되지 않았다면, 웹훅을 등록한다. */
9
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../server/index.ts"],"names":[],"mappings":";;;AAAA,oBAAiB;AAEjB,uDAA4B;AAC5B,wDAA6B;AAC7B,oDAAyB;AAEzB,2CAA2C","sourcesContent":["import './routes'\n\nexport * from './migrations'\nexport * from './middlewares'\nexport * from './service'\n\n/* github webhook 이 등록되지 않았다면, 웹훅을 등록한다. */\n"]}
@@ -1 +0,0 @@
1
- export declare function initMiddlewares(app: any): void;
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.initMiddlewares = initMiddlewares;
4
- function initMiddlewares(app) {
5
- /* can add middlewares into app */
6
- }
7
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/middlewares/index.ts"],"names":[],"mappings":";;AAAA,0CAEC;AAFD,SAAgB,eAAe,CAAC,GAAG;IACjC,kCAAkC;AACpC,CAAC","sourcesContent":["export function initMiddlewares(app) {\n /* can add middlewares into app */\n}\n"]}
@@ -1 +0,0 @@
1
- export declare var migrations: any[];
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.migrations = void 0;
4
- const glob = require('glob');
5
- const path = require('path');
6
- exports.migrations = [];
7
- glob.sync(path.resolve(__dirname, '.', '**', '*.js')).forEach(function (file) {
8
- if (file.indexOf('index.js') !== -1)
9
- return;
10
- exports.migrations = exports.migrations.concat(Object.values(require(path.resolve(file))) || []);
11
- });
12
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/migrations/index.ts"],"names":[],"mappings":";;;AAAA,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAC5B,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAEjB,QAAA,UAAU,GAAG,EAAE,CAAA;AAE1B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,UAAS,IAAI;IACzE,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAAE,OAAM;IAC3C,kBAAU,GAAG,kBAAU,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAA;AAClF,CAAC,CAAC,CAAA","sourcesContent":["const glob = require('glob')\nconst path = require('path')\n\nexport var migrations = []\n\nglob.sync(path.resolve(__dirname, '.', '**', '*.js')).forEach(function(file) {\n if (file.indexOf('index.js') !== -1) return\n migrations = migrations.concat(Object.values(require(path.resolve(file))) || [])\n})\n"]}
@@ -1 +0,0 @@
1
- export declare const githubWebhookRouter: any;
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.githubWebhookRouter = void 0;
4
- const tslib_1 = require("tslib");
5
- const koa_router_1 = tslib_1.__importDefault(require("koa-router"));
6
- const codelingua_1 = require("@things-factory/codelingua");
7
- const github_controller_1 = require("../controllers/github-controller");
8
- const shell_1 = require("@things-factory/shell");
9
- const git_project_1 = require("../service/git-project/git-project");
10
- exports.githubWebhookRouter = new koa_router_1.default();
11
- exports.githubWebhookRouter.post('/github-webhook/:projectId', async (context, next) => {
12
- const { payload, head_commit } = context.request.body;
13
- const { commitDiff } = head_commit.diff;
14
- // const { commits, pull_request } = payload
15
- const projectId = context.params.projectId;
16
- const project = await (0, shell_1.getRepository)(git_project_1.GitProject).findOne({
17
- where: {
18
- id: projectId
19
- }
20
- });
21
- if (!project) {
22
- context.status = 404;
23
- context.body = 'Project not found';
24
- return;
25
- }
26
- // for (const commit of commits) {
27
- // const codeDiff = `diff of the changed code here` // 실제 diff 데이터를 가져오는 로직 필요
28
- // const reviewFeedback = await codereviewCompletion(codeDiff)
29
- // const pullNumber = pull_request.number // 풀 리퀘스트 번호를 받아옴
30
- // await postGitHubComment(project.repositoryUrl, pullNumber, reviewFeedback)
31
- // }
32
- const reviewFeedback = await (0, codelingua_1.codereviewCompletion)(commitDiff);
33
- await (0, github_controller_1.postGitHubComment)(context.request.body.repository.full_name, context.request.body.head_commit.id, reviewFeedback);
34
- context.status = 200;
35
- context.body = 'Success';
36
- });
37
- //# sourceMappingURL=github-webhook-router.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"github-webhook-router.js","sourceRoot":"","sources":["../../server/routers/github-webhook-router.ts"],"names":[],"mappings":";;;;AAAA,oEAA+B;AAC/B,2DAAiE;AAEjE,wEAAoE;AACpE,iDAAqD;AACrD,oEAA+D;AAElD,QAAA,mBAAmB,GAAG,IAAI,oBAAM,EAAE,CAAA;AAE/C,2BAAmB,CAAC,IAAI,CAAC,4BAA4B,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IAC7E,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAAA;IACrD,MAAM,EAAE,UAAU,EAAE,GAAG,WAAW,CAAC,IAAI,CAAA;IACvC,4CAA4C;IAC5C,MAAM,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,SAAS,CAAA;IAE1C,MAAM,OAAO,GAAG,MAAM,IAAA,qBAAa,EAAC,wBAAU,CAAC,CAAC,OAAO,CAAC;QACtD,KAAK,EAAE;YACL,EAAE,EAAE,SAAS;SACd;KACF,CAAC,CAAA;IAEF,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,CAAC,MAAM,GAAG,GAAG,CAAA;QACpB,OAAO,CAAC,IAAI,GAAG,mBAAmB,CAAA;QAClC,OAAM;IACR,CAAC;IAED,kCAAkC;IAClC,gFAAgF;IAChF,gEAAgE;IAChE,6DAA6D;IAC7D,+EAA+E;IAC/E,IAAI;IAEJ,MAAM,cAAc,GAAG,MAAM,IAAA,iCAAoB,EAAC,UAAU,CAAC,CAAA;IAE7D,MAAM,IAAA,qCAAiB,EACrB,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,EACzC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EACnC,cAAc,CACf,CAAA;IAED,OAAO,CAAC,MAAM,GAAG,GAAG,CAAA;IACpB,OAAO,CAAC,IAAI,GAAG,SAAS,CAAA;AAC1B,CAAC,CAAC,CAAA","sourcesContent":["import Router from 'koa-router'\nimport { codereviewCompletion } from '@things-factory/codelingua'\n\nimport { postGitHubComment } from '../controllers/github-controller'\nimport { getRepository } from '@things-factory/shell'\nimport { GitProject } from '../service/git-project/git-project'\n\nexport const githubWebhookRouter = new Router()\n\ngithubWebhookRouter.post('/github-webhook/:projectId', async (context, next) => {\n const { payload, head_commit } = context.request.body\n const { commitDiff } = head_commit.diff\n // const { commits, pull_request } = payload\n const projectId = context.params.projectId\n\n const project = await getRepository(GitProject).findOne({\n where: {\n id: projectId\n }\n })\n\n if (!project) {\n context.status = 404\n context.body = 'Project not found'\n return\n }\n\n // for (const commit of commits) {\n // const codeDiff = `diff of the changed code here` // 실제 diff 데이터를 가져오는 로직 필요\n // const reviewFeedback = await codereviewCompletion(codeDiff)\n // const pullNumber = pull_request.number // 풀 리퀘스트 번호를 받아옴\n // await postGitHubComment(project.repositoryUrl, pullNumber, reviewFeedback)\n // }\n\n const reviewFeedback = await codereviewCompletion(commitDiff)\n\n await postGitHubComment(\n context.request.body.repository.full_name,\n context.request.body.head_commit.id,\n reviewFeedback\n )\n\n context.status = 200\n context.body = 'Success'\n})\n"]}
@@ -1 +0,0 @@
1
- export {};
@@ -1,28 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const github_webhook_router_1 = require("./routers/github-webhook-router");
4
- process.on('bootstrap-module-global-public-route', (app, globalPublicRouter) => {
5
- /*
6
- * can add global public routes to application (auth not required, tenancy not required)
7
- *
8
- * ex) routes.get('/path', async(context, next) => {})
9
- * ex) routes.post('/path', async(context, next) => {})
10
- */
11
- globalPublicRouter.use('', github_webhook_router_1.githubWebhookRouter.routes(), github_webhook_router_1.githubWebhookRouter.allowedMethods());
12
- });
13
- process.on('bootstrap-module-global-private-route', (app, globalPrivateRouter) => {
14
- /*
15
- * can add global private routes to application (auth required, tenancy not required)
16
- */
17
- });
18
- process.on('bootstrap-module-domain-public-route', (app, domainPublicRouter) => {
19
- /*
20
- * can add domain public routes to application (auth not required, tenancy required)
21
- */
22
- });
23
- process.on('bootstrap-module-domain-private-route', (app, domainPrivateRouter) => {
24
- /*
25
- * can add domain private routes to application (auth required, tenancy required)
26
- */
27
- });
28
- //# sourceMappingURL=routes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"routes.js","sourceRoot":"","sources":["../server/routes.ts"],"names":[],"mappings":";;AAAA,2EAAqE;AAErE,OAAO,CAAC,EAAE,CAAC,sCAA6C,EAAE,CAAC,GAAG,EAAE,kBAAkB,EAAE,EAAE;IACpF;;;;;OAKG;IAEH,kBAAkB,CAAC,GAAG,CAAC,EAAE,EAAE,2CAAmB,CAAC,MAAM,EAAE,EAAE,2CAAmB,CAAC,cAAc,EAAE,CAAC,CAAA;AAChG,CAAC,CAAC,CAAA;AAEF,OAAO,CAAC,EAAE,CAAC,uCAA8C,EAAE,CAAC,GAAG,EAAE,mBAAmB,EAAE,EAAE;IACtF;;OAEG;AACL,CAAC,CAAC,CAAA;AAEF,OAAO,CAAC,EAAE,CAAC,sCAA6C,EAAE,CAAC,GAAG,EAAE,kBAAkB,EAAE,EAAE;IACpF;;OAEG;AACL,CAAC,CAAC,CAAA;AAEF,OAAO,CAAC,EAAE,CAAC,uCAA8C,EAAE,CAAC,GAAG,EAAE,mBAAmB,EAAE,EAAE;IACtF;;OAEG;AACL,CAAC,CAAC,CAAA","sourcesContent":["import { githubWebhookRouter } from './routers/github-webhook-router'\n\nprocess.on('bootstrap-module-global-public-route' as any, (app, globalPublicRouter) => {\n /*\n * can add global public routes to application (auth not required, tenancy not required)\n *\n * ex) routes.get('/path', async(context, next) => {})\n * ex) routes.post('/path', async(context, next) => {})\n */\n\n globalPublicRouter.use('', githubWebhookRouter.routes(), githubWebhookRouter.allowedMethods())\n})\n\nprocess.on('bootstrap-module-global-private-route' as any, (app, globalPrivateRouter) => {\n /*\n * can add global private routes to application (auth required, tenancy not required)\n */\n})\n\nprocess.on('bootstrap-module-domain-public-route' as any, (app, domainPublicRouter) => {\n /*\n * can add domain public routes to application (auth not required, tenancy required)\n */\n})\n\nprocess.on('bootstrap-module-domain-private-route' as any, (app, domainPrivateRouter) => {\n /*\n * can add domain private routes to application (auth required, tenancy required)\n */\n})\n"]}
@@ -1,12 +0,0 @@
1
- import { GitProject } from './git-project';
2
- import { NewGitProject, GitProjectPatch } from './git-project-type';
3
- export declare class GitProjectMutation {
4
- createGitProject(gitProject: NewGitProject, context: ResolverContext): Promise<GitProject>;
5
- updateGitProject(id: string, patch: GitProjectPatch, context: ResolverContext): Promise<GitProject>;
6
- updateMultipleGitProject(patches: GitProjectPatch[], context: ResolverContext): Promise<GitProject[]>;
7
- deleteGitProject(id: string, context: ResolverContext): Promise<boolean>;
8
- deleteGitProjects(ids: string[], context: ResolverContext): Promise<boolean>;
9
- importGitProjects(gitProjects: GitProjectPatch[], context: ResolverContext): Promise<boolean>;
10
- registerGithubWebhook(id: string, context: ResolverContext): Promise<boolean>;
11
- unregisterGithubWebhook(id: string, context: ResolverContext): Promise<boolean>;
12
- }