xoonya 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/server.js CHANGED
@@ -13,6 +13,56 @@ const {
13
13
  buildIntegrationDetailResponse,
14
14
  buildIntegrationListResponse
15
15
  } = require('./integrations/views');
16
+ const {
17
+ buildReleasePack,
18
+ summarizeReleasePack,
19
+ buildComparisonPack,
20
+ summarizeComparisonPack,
21
+ buildAdoptionPack,
22
+ summarizeAdoptionPack,
23
+ buildScenarioPack,
24
+ summarizeScenarioPack,
25
+ buildLaunchPack,
26
+ summarizeLaunchPack
27
+ } = require('./lib/release_pack');
28
+ const {
29
+ buildReleaseManifest,
30
+ summarizeReleaseManifest,
31
+ buildLaunchNotes,
32
+ summarizeLaunchNotes
33
+ } = require('./lib/release_manifest');
34
+ const {
35
+ buildReleaseCenter,
36
+ summarizeReleaseCenter
37
+ } = require('./lib/release_center');
38
+ const {
39
+ buildReleaseHistory,
40
+ summarizeReleaseHistory
41
+ } = require('./lib/release_history');
42
+ const {
43
+ buildPublishPlan,
44
+ summarizePublishPlan
45
+ } = require('./lib/publish_plan');
46
+ const {
47
+ buildEcosystemEntryPack,
48
+ summarizeEcosystemEntryPack
49
+ } = require('./lib/ecosystem_entry');
50
+ const {
51
+ buildLaunchNarrativePack,
52
+ summarizeLaunchNarrativePack
53
+ } = require('./lib/launch_narrative');
54
+ const {
55
+ buildOutreachProofPack,
56
+ summarizeOutreachProofPack
57
+ } = require('./lib/outreach_proof');
58
+ const {
59
+ buildAnnouncementPack,
60
+ summarizeAnnouncementPack
61
+ } = require('./lib/announcement_pack');
62
+ const {
63
+ buildReleaseCandidatePack,
64
+ summarizeReleaseCandidatePack
65
+ } = require('./lib/release_candidate');
16
66
 
17
67
  function readJsonBody(req) {
18
68
  return new Promise((resolve, reject) => {
@@ -77,6 +127,156 @@ async function routeRequest(req, res) {
77
127
  return;
78
128
  }
79
129
 
130
+ if (req.method === 'GET' && url.pathname === '/v1/release-pack') {
131
+ sendJson(res, 200, buildReleasePack());
132
+ return;
133
+ }
134
+
135
+ if (req.method === 'GET' && url.pathname === '/v1/release-pack/summary') {
136
+ sendJson(res, 200, summarizeReleasePack());
137
+ return;
138
+ }
139
+
140
+ if (req.method === 'GET' && url.pathname === '/v1/release-pack/comparison') {
141
+ sendJson(res, 200, buildComparisonPack());
142
+ return;
143
+ }
144
+
145
+ if (req.method === 'GET' && url.pathname === '/v1/release-pack/comparison/summary') {
146
+ sendJson(res, 200, summarizeComparisonPack());
147
+ return;
148
+ }
149
+
150
+ if (req.method === 'GET' && url.pathname === '/v1/release-pack/adoption') {
151
+ sendJson(res, 200, buildAdoptionPack());
152
+ return;
153
+ }
154
+
155
+ if (req.method === 'GET' && url.pathname === '/v1/release-pack/adoption/summary') {
156
+ sendJson(res, 200, summarizeAdoptionPack());
157
+ return;
158
+ }
159
+
160
+ if (req.method === 'GET' && url.pathname === '/v1/release-pack/scenarios') {
161
+ sendJson(res, 200, buildScenarioPack());
162
+ return;
163
+ }
164
+
165
+ if (req.method === 'GET' && url.pathname === '/v1/release-pack/scenarios/summary') {
166
+ sendJson(res, 200, summarizeScenarioPack());
167
+ return;
168
+ }
169
+
170
+ if (req.method === 'GET' && url.pathname === '/v1/release-pack/launch') {
171
+ sendJson(res, 200, buildLaunchPack());
172
+ return;
173
+ }
174
+
175
+ if (req.method === 'GET' && url.pathname === '/v1/release-pack/launch/summary') {
176
+ sendJson(res, 200, summarizeLaunchPack());
177
+ return;
178
+ }
179
+
180
+ if (req.method === 'GET' && url.pathname === '/v1/release-manifest') {
181
+ sendJson(res, 200, buildReleaseManifest());
182
+ return;
183
+ }
184
+
185
+ if (req.method === 'GET' && url.pathname === '/v1/release-manifest/summary') {
186
+ sendJson(res, 200, summarizeReleaseManifest());
187
+ return;
188
+ }
189
+
190
+ if (req.method === 'GET' && url.pathname === '/v1/release-notes') {
191
+ sendJson(res, 200, buildLaunchNotes());
192
+ return;
193
+ }
194
+
195
+ if (req.method === 'GET' && url.pathname === '/v1/release-notes/summary') {
196
+ sendJson(res, 200, summarizeLaunchNotes());
197
+ return;
198
+ }
199
+
200
+ if (req.method === 'GET' && url.pathname === '/v1/release-center') {
201
+ sendJson(res, 200, buildReleaseCenter());
202
+ return;
203
+ }
204
+
205
+ if (req.method === 'GET' && url.pathname === '/v1/release-center/summary') {
206
+ sendJson(res, 200, summarizeReleaseCenter());
207
+ return;
208
+ }
209
+
210
+ if (req.method === 'GET' && url.pathname === '/v1/release-history') {
211
+ sendJson(res, 200, buildReleaseHistory());
212
+ return;
213
+ }
214
+
215
+ if (req.method === 'GET' && url.pathname === '/v1/release-history/summary') {
216
+ sendJson(res, 200, summarizeReleaseHistory());
217
+ return;
218
+ }
219
+
220
+ if (req.method === 'GET' && url.pathname === '/v1/publish-plan') {
221
+ sendJson(res, 200, buildPublishPlan());
222
+ return;
223
+ }
224
+
225
+ if (req.method === 'GET' && url.pathname === '/v1/publish-plan/summary') {
226
+ sendJson(res, 200, summarizePublishPlan());
227
+ return;
228
+ }
229
+
230
+ if (req.method === 'GET' && url.pathname === '/v1/ecosystem-entry') {
231
+ sendJson(res, 200, buildEcosystemEntryPack());
232
+ return;
233
+ }
234
+
235
+ if (req.method === 'GET' && url.pathname === '/v1/ecosystem-entry/summary') {
236
+ sendJson(res, 200, summarizeEcosystemEntryPack());
237
+ return;
238
+ }
239
+
240
+ if (req.method === 'GET' && url.pathname === '/v1/launch-narrative') {
241
+ sendJson(res, 200, buildLaunchNarrativePack());
242
+ return;
243
+ }
244
+
245
+ if (req.method === 'GET' && url.pathname === '/v1/launch-narrative/summary') {
246
+ sendJson(res, 200, summarizeLaunchNarrativePack());
247
+ return;
248
+ }
249
+
250
+ if (req.method === 'GET' && url.pathname === '/v1/outreach-proof') {
251
+ sendJson(res, 200, buildOutreachProofPack());
252
+ return;
253
+ }
254
+
255
+ if (req.method === 'GET' && url.pathname === '/v1/outreach-proof/summary') {
256
+ sendJson(res, 200, summarizeOutreachProofPack());
257
+ return;
258
+ }
259
+
260
+ if (req.method === 'GET' && url.pathname === '/v1/announcement-pack') {
261
+ sendJson(res, 200, buildAnnouncementPack());
262
+ return;
263
+ }
264
+
265
+ if (req.method === 'GET' && url.pathname === '/v1/announcement-pack/summary') {
266
+ sendJson(res, 200, summarizeAnnouncementPack());
267
+ return;
268
+ }
269
+
270
+ if (req.method === 'GET' && url.pathname === '/v1/release-candidate') {
271
+ sendJson(res, 200, buildReleaseCandidatePack());
272
+ return;
273
+ }
274
+
275
+ if (req.method === 'GET' && url.pathname === '/v1/release-candidate/summary') {
276
+ sendJson(res, 200, summarizeReleaseCandidatePack());
277
+ return;
278
+ }
279
+
80
280
  if (req.method === 'GET' && url.pathname === '/v1/proof-center') {
81
281
  sendJson(res, 200, proofSdk.buildDefaultProofCenter());
82
282
  return;