@bscotch/gamemaker-releases 0.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.
Files changed (46) hide show
  1. package/README.md +64 -0
  2. package/dist/browser.d.ts +7 -0
  3. package/dist/browser.d.ts.map +1 -0
  4. package/dist/browser.js +6 -0
  5. package/dist/browser.js.map +1 -0
  6. package/dist/constants.d.ts +3 -0
  7. package/dist/constants.d.ts.map +1 -0
  8. package/dist/constants.js +5 -0
  9. package/dist/constants.js.map +1 -0
  10. package/dist/feeds.d.ts +5 -0
  11. package/dist/feeds.d.ts.map +1 -0
  12. package/dist/feeds.js +78 -0
  13. package/dist/feeds.js.map +1 -0
  14. package/dist/feeds.lib.d.ts +4 -0
  15. package/dist/feeds.lib.d.ts.map +1 -0
  16. package/dist/feeds.lib.js +53 -0
  17. package/dist/feeds.lib.js.map +1 -0
  18. package/dist/feeds.types.d.ts +548 -0
  19. package/dist/feeds.types.d.ts.map +1 -0
  20. package/dist/feeds.types.js +69 -0
  21. package/dist/feeds.types.js.map +1 -0
  22. package/dist/fetch.d.ts +6 -0
  23. package/dist/fetch.d.ts.map +1 -0
  24. package/dist/fetch.js +37 -0
  25. package/dist/fetch.js.map +1 -0
  26. package/dist/index.d.ts +5 -0
  27. package/dist/index.d.ts.map +1 -0
  28. package/dist/index.js +4 -0
  29. package/dist/index.js.map +1 -0
  30. package/dist/notes.d.ts +16 -0
  31. package/dist/notes.d.ts.map +1 -0
  32. package/dist/notes.js +141 -0
  33. package/dist/notes.js.map +1 -0
  34. package/dist/notes.type.d.ts +2 -0
  35. package/dist/notes.type.d.ts.map +1 -0
  36. package/dist/notes.type.js +2 -0
  37. package/dist/notes.type.js.map +1 -0
  38. package/dist/urls.d.ts +13 -0
  39. package/dist/urls.d.ts.map +1 -0
  40. package/dist/urls.js +20 -0
  41. package/dist/urls.js.map +1 -0
  42. package/dist/utils.d.ts +9 -0
  43. package/dist/utils.d.ts.map +1 -0
  44. package/dist/utils.js +44 -0
  45. package/dist/utils.js.map +1 -0
  46. package/package.json +68 -0
@@ -0,0 +1,548 @@
1
+ import { z } from 'zod';
2
+ export interface RssFeedEntry {
3
+ title: string;
4
+ pubDate: string;
5
+ link?: string;
6
+ comments: string;
7
+ description?: string;
8
+ }
9
+ export type Channel = typeof channels[number];
10
+ export declare const channels: readonly ["lts", "stable", "beta", "unstable"];
11
+ export declare const channelSchema: z.ZodEnum<["lts", "stable", "beta", "unstable"]>;
12
+ export type ArtifactType = typeof artifactTypes[number];
13
+ export declare const artifactTypes: readonly ["ide", "runtime"];
14
+ export declare const rssFeedSchema: z.ZodObject<{
15
+ rss: z.ZodObject<{
16
+ channel: z.ZodObject<{
17
+ title: z.ZodEffects<z.ZodString, string, string>;
18
+ description: z.ZodEffects<z.ZodString, string, string>;
19
+ link: z.ZodString;
20
+ item: z.ZodEffects<z.ZodArray<z.ZodObject<{
21
+ title: z.ZodString;
22
+ pubDate: z.ZodString;
23
+ link: z.ZodOptional<z.ZodString>;
24
+ comments: z.ZodString;
25
+ description: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
26
+ }, "strip", z.ZodTypeAny, {
27
+ description?: string | undefined;
28
+ link?: string | undefined;
29
+ title: string;
30
+ pubDate: string;
31
+ comments: string;
32
+ }, {
33
+ description?: string | undefined;
34
+ link?: string | undefined;
35
+ title: string;
36
+ pubDate: string;
37
+ comments: string;
38
+ }>, "many">, {
39
+ description?: string | undefined;
40
+ link?: string | undefined;
41
+ title: string;
42
+ pubDate: string;
43
+ comments: string;
44
+ }[], unknown>;
45
+ }, "strip", z.ZodTypeAny, {
46
+ title: string;
47
+ description: string;
48
+ link: string;
49
+ item: {
50
+ description?: string | undefined;
51
+ link?: string | undefined;
52
+ title: string;
53
+ pubDate: string;
54
+ comments: string;
55
+ }[];
56
+ }, {
57
+ item?: unknown;
58
+ title: string;
59
+ description: string;
60
+ link: string;
61
+ }>;
62
+ }, "strip", z.ZodTypeAny, {
63
+ channel: {
64
+ title: string;
65
+ description: string;
66
+ link: string;
67
+ item: {
68
+ description?: string | undefined;
69
+ link?: string | undefined;
70
+ title: string;
71
+ pubDate: string;
72
+ comments: string;
73
+ }[];
74
+ };
75
+ }, {
76
+ channel: {
77
+ item?: unknown;
78
+ title: string;
79
+ description: string;
80
+ link: string;
81
+ };
82
+ }>;
83
+ }, "strip", z.ZodTypeAny, {
84
+ rss: {
85
+ channel: {
86
+ title: string;
87
+ description: string;
88
+ link: string;
89
+ item: {
90
+ description?: string | undefined;
91
+ link?: string | undefined;
92
+ title: string;
93
+ pubDate: string;
94
+ comments: string;
95
+ }[];
96
+ };
97
+ };
98
+ }, {
99
+ rss: {
100
+ channel: {
101
+ item?: unknown;
102
+ title: string;
103
+ description: string;
104
+ link: string;
105
+ };
106
+ };
107
+ }>;
108
+ export type GameMakerArtifact = z.infer<typeof gameMakerArtifactSchema>;
109
+ export declare const gameMakerArtifactSchema: z.ZodObject<{
110
+ type: z.ZodEnum<["ide", "runtime"]>;
111
+ version: z.ZodString;
112
+ channel: z.ZodEnum<["lts", "stable", "beta", "unstable"]>;
113
+ summary: z.ZodOptional<z.ZodString>;
114
+ feedUrl: z.ZodString;
115
+ publishedAt: z.ZodString;
116
+ link: z.ZodOptional<z.ZodString>;
117
+ notesUrl: z.ZodString;
118
+ }, "strip", z.ZodTypeAny, {
119
+ link?: string | undefined;
120
+ summary?: string | undefined;
121
+ type: "ide" | "runtime";
122
+ channel: "lts" | "stable" | "beta" | "unstable";
123
+ version: string;
124
+ feedUrl: string;
125
+ publishedAt: string;
126
+ notesUrl: string;
127
+ }, {
128
+ link?: string | undefined;
129
+ summary?: string | undefined;
130
+ type: "ide" | "runtime";
131
+ channel: "lts" | "stable" | "beta" | "unstable";
132
+ version: string;
133
+ feedUrl: string;
134
+ publishedAt: string;
135
+ notesUrl: string;
136
+ }>;
137
+ export type GameMakerArtifactWithNotes = z.infer<typeof gameMakerArtifactWithNotesSchema>;
138
+ export declare const gameMakerArtifactWithNotesSchema: z.ZodObject<z.extendShape<{
139
+ type: z.ZodEnum<["ide", "runtime"]>;
140
+ version: z.ZodString;
141
+ channel: z.ZodEnum<["lts", "stable", "beta", "unstable"]>;
142
+ summary: z.ZodOptional<z.ZodString>;
143
+ feedUrl: z.ZodString;
144
+ publishedAt: z.ZodString;
145
+ link: z.ZodOptional<z.ZodString>;
146
+ notesUrl: z.ZodString;
147
+ }, {
148
+ notes: z.ZodObject<{
149
+ since: z.ZodNullable<z.ZodString>;
150
+ groups: z.ZodArray<z.ZodObject<{
151
+ title: z.ZodEffects<z.ZodString, string, string>;
152
+ changes: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
153
+ }, "strip", z.ZodTypeAny, {
154
+ title: string;
155
+ changes: string[];
156
+ }, {
157
+ title: string;
158
+ changes: string[];
159
+ }>, "many">;
160
+ }, "strip", z.ZodTypeAny, {
161
+ since: string | null;
162
+ groups: {
163
+ title: string;
164
+ changes: string[];
165
+ }[];
166
+ }, {
167
+ since: string | null;
168
+ groups: {
169
+ title: string;
170
+ changes: string[];
171
+ }[];
172
+ }>;
173
+ }>, "strip", z.ZodTypeAny, {
174
+ link?: string | undefined;
175
+ summary?: string | undefined;
176
+ type: "ide" | "runtime";
177
+ channel: "lts" | "stable" | "beta" | "unstable";
178
+ version: string;
179
+ feedUrl: string;
180
+ publishedAt: string;
181
+ notesUrl: string;
182
+ notes: {
183
+ since: string | null;
184
+ groups: {
185
+ title: string;
186
+ changes: string[];
187
+ }[];
188
+ };
189
+ }, {
190
+ link?: string | undefined;
191
+ summary?: string | undefined;
192
+ type: "ide" | "runtime";
193
+ channel: "lts" | "stable" | "beta" | "unstable";
194
+ version: string;
195
+ feedUrl: string;
196
+ publishedAt: string;
197
+ notesUrl: string;
198
+ notes: {
199
+ since: string | null;
200
+ groups: {
201
+ title: string;
202
+ changes: string[];
203
+ }[];
204
+ };
205
+ }>;
206
+ export type GameMakerReleaseWithNotes = z.infer<typeof gameMakerReleaseWithNotesSchema>;
207
+ export declare const gameMakerReleaseWithNotesSchema: z.ZodObject<z.extendShape<{
208
+ channel: z.ZodEnum<["lts", "stable", "beta", "unstable"]>;
209
+ publishedAt: z.ZodString;
210
+ summary: z.ZodEffects<z.ZodString, string, string>;
211
+ }, {
212
+ ide: z.ZodObject<Omit<z.extendShape<{
213
+ type: z.ZodEnum<["ide", "runtime"]>;
214
+ version: z.ZodString;
215
+ channel: z.ZodEnum<["lts", "stable", "beta", "unstable"]>;
216
+ summary: z.ZodOptional<z.ZodString>;
217
+ feedUrl: z.ZodString;
218
+ publishedAt: z.ZodString;
219
+ link: z.ZodOptional<z.ZodString>;
220
+ notesUrl: z.ZodString;
221
+ }, {
222
+ notes: z.ZodObject<{
223
+ since: z.ZodNullable<z.ZodString>;
224
+ groups: z.ZodArray<z.ZodObject<{
225
+ title: z.ZodEffects<z.ZodString, string, string>;
226
+ changes: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
227
+ }, "strip", z.ZodTypeAny, {
228
+ title: string;
229
+ changes: string[];
230
+ }, {
231
+ title: string;
232
+ changes: string[];
233
+ }>, "many">;
234
+ }, "strip", z.ZodTypeAny, {
235
+ since: string | null;
236
+ groups: {
237
+ title: string;
238
+ changes: string[];
239
+ }[];
240
+ }, {
241
+ since: string | null;
242
+ groups: {
243
+ title: string;
244
+ changes: string[];
245
+ }[];
246
+ }>;
247
+ }>, "summary">, "strip", z.ZodTypeAny, {
248
+ link?: string | undefined;
249
+ type: "ide" | "runtime";
250
+ channel: "lts" | "stable" | "beta" | "unstable";
251
+ version: string;
252
+ feedUrl: string;
253
+ publishedAt: string;
254
+ notesUrl: string;
255
+ notes: {
256
+ since: string | null;
257
+ groups: {
258
+ title: string;
259
+ changes: string[];
260
+ }[];
261
+ };
262
+ }, {
263
+ link?: string | undefined;
264
+ type: "ide" | "runtime";
265
+ channel: "lts" | "stable" | "beta" | "unstable";
266
+ version: string;
267
+ feedUrl: string;
268
+ publishedAt: string;
269
+ notesUrl: string;
270
+ notes: {
271
+ since: string | null;
272
+ groups: {
273
+ title: string;
274
+ changes: string[];
275
+ }[];
276
+ };
277
+ }>;
278
+ runtime: z.ZodObject<Omit<z.extendShape<{
279
+ type: z.ZodEnum<["ide", "runtime"]>;
280
+ version: z.ZodString;
281
+ channel: z.ZodEnum<["lts", "stable", "beta", "unstable"]>;
282
+ summary: z.ZodOptional<z.ZodString>;
283
+ feedUrl: z.ZodString;
284
+ publishedAt: z.ZodString;
285
+ link: z.ZodOptional<z.ZodString>;
286
+ notesUrl: z.ZodString;
287
+ }, {
288
+ notes: z.ZodObject<{
289
+ since: z.ZodNullable<z.ZodString>;
290
+ groups: z.ZodArray<z.ZodObject<{
291
+ title: z.ZodEffects<z.ZodString, string, string>;
292
+ changes: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
293
+ }, "strip", z.ZodTypeAny, {
294
+ title: string;
295
+ changes: string[];
296
+ }, {
297
+ title: string;
298
+ changes: string[];
299
+ }>, "many">;
300
+ }, "strip", z.ZodTypeAny, {
301
+ since: string | null;
302
+ groups: {
303
+ title: string;
304
+ changes: string[];
305
+ }[];
306
+ }, {
307
+ since: string | null;
308
+ groups: {
309
+ title: string;
310
+ changes: string[];
311
+ }[];
312
+ }>;
313
+ }>, "summary">, "strip", z.ZodTypeAny, {
314
+ link?: string | undefined;
315
+ type: "ide" | "runtime";
316
+ channel: "lts" | "stable" | "beta" | "unstable";
317
+ version: string;
318
+ feedUrl: string;
319
+ publishedAt: string;
320
+ notesUrl: string;
321
+ notes: {
322
+ since: string | null;
323
+ groups: {
324
+ title: string;
325
+ changes: string[];
326
+ }[];
327
+ };
328
+ }, {
329
+ link?: string | undefined;
330
+ type: "ide" | "runtime";
331
+ channel: "lts" | "stable" | "beta" | "unstable";
332
+ version: string;
333
+ feedUrl: string;
334
+ publishedAt: string;
335
+ notesUrl: string;
336
+ notes: {
337
+ since: string | null;
338
+ groups: {
339
+ title: string;
340
+ changes: string[];
341
+ }[];
342
+ };
343
+ }>;
344
+ }>, "strip", z.ZodTypeAny, {
345
+ ide: {
346
+ link?: string | undefined;
347
+ type: "ide" | "runtime";
348
+ channel: "lts" | "stable" | "beta" | "unstable";
349
+ version: string;
350
+ feedUrl: string;
351
+ publishedAt: string;
352
+ notesUrl: string;
353
+ notes: {
354
+ since: string | null;
355
+ groups: {
356
+ title: string;
357
+ changes: string[];
358
+ }[];
359
+ };
360
+ };
361
+ runtime: {
362
+ link?: string | undefined;
363
+ type: "ide" | "runtime";
364
+ channel: "lts" | "stable" | "beta" | "unstable";
365
+ version: string;
366
+ feedUrl: string;
367
+ publishedAt: string;
368
+ notesUrl: string;
369
+ notes: {
370
+ since: string | null;
371
+ groups: {
372
+ title: string;
373
+ changes: string[];
374
+ }[];
375
+ };
376
+ };
377
+ channel: "lts" | "stable" | "beta" | "unstable";
378
+ summary: string;
379
+ publishedAt: string;
380
+ }, {
381
+ ide: {
382
+ link?: string | undefined;
383
+ type: "ide" | "runtime";
384
+ channel: "lts" | "stable" | "beta" | "unstable";
385
+ version: string;
386
+ feedUrl: string;
387
+ publishedAt: string;
388
+ notesUrl: string;
389
+ notes: {
390
+ since: string | null;
391
+ groups: {
392
+ title: string;
393
+ changes: string[];
394
+ }[];
395
+ };
396
+ };
397
+ runtime: {
398
+ link?: string | undefined;
399
+ type: "ide" | "runtime";
400
+ channel: "lts" | "stable" | "beta" | "unstable";
401
+ version: string;
402
+ feedUrl: string;
403
+ publishedAt: string;
404
+ notesUrl: string;
405
+ notes: {
406
+ since: string | null;
407
+ groups: {
408
+ title: string;
409
+ changes: string[];
410
+ }[];
411
+ };
412
+ };
413
+ channel: "lts" | "stable" | "beta" | "unstable";
414
+ summary: string;
415
+ publishedAt: string;
416
+ }>;
417
+ export type GameMakerRelease = z.infer<typeof gameMakerReleaseSchema>;
418
+ export declare const gameMakerReleaseSchema: z.ZodObject<z.extendShape<{
419
+ channel: z.ZodEnum<["lts", "stable", "beta", "unstable"]>;
420
+ publishedAt: z.ZodString;
421
+ summary: z.ZodEffects<z.ZodString, string, string>;
422
+ }, {
423
+ ide: z.ZodObject<Omit<{
424
+ type: z.ZodEnum<["ide", "runtime"]>;
425
+ version: z.ZodString;
426
+ channel: z.ZodEnum<["lts", "stable", "beta", "unstable"]>;
427
+ summary: z.ZodOptional<z.ZodString>;
428
+ feedUrl: z.ZodString;
429
+ publishedAt: z.ZodString;
430
+ link: z.ZodOptional<z.ZodString>;
431
+ notesUrl: z.ZodString;
432
+ }, "summary">, "strip", z.ZodTypeAny, {
433
+ link?: string | undefined;
434
+ type: "ide" | "runtime";
435
+ channel: "lts" | "stable" | "beta" | "unstable";
436
+ version: string;
437
+ feedUrl: string;
438
+ publishedAt: string;
439
+ notesUrl: string;
440
+ }, {
441
+ link?: string | undefined;
442
+ type: "ide" | "runtime";
443
+ channel: "lts" | "stable" | "beta" | "unstable";
444
+ version: string;
445
+ feedUrl: string;
446
+ publishedAt: string;
447
+ notesUrl: string;
448
+ }>;
449
+ runtime: z.ZodObject<Omit<{
450
+ type: z.ZodEnum<["ide", "runtime"]>;
451
+ version: z.ZodString;
452
+ channel: z.ZodEnum<["lts", "stable", "beta", "unstable"]>;
453
+ summary: z.ZodOptional<z.ZodString>;
454
+ feedUrl: z.ZodString;
455
+ publishedAt: z.ZodString;
456
+ link: z.ZodOptional<z.ZodString>;
457
+ notesUrl: z.ZodString;
458
+ }, "summary">, "strip", z.ZodTypeAny, {
459
+ link?: string | undefined;
460
+ type: "ide" | "runtime";
461
+ channel: "lts" | "stable" | "beta" | "unstable";
462
+ version: string;
463
+ feedUrl: string;
464
+ publishedAt: string;
465
+ notesUrl: string;
466
+ }, {
467
+ link?: string | undefined;
468
+ type: "ide" | "runtime";
469
+ channel: "lts" | "stable" | "beta" | "unstable";
470
+ version: string;
471
+ feedUrl: string;
472
+ publishedAt: string;
473
+ notesUrl: string;
474
+ }>;
475
+ }>, "strip", z.ZodTypeAny, {
476
+ ide: {
477
+ link?: string | undefined;
478
+ type: "ide" | "runtime";
479
+ channel: "lts" | "stable" | "beta" | "unstable";
480
+ version: string;
481
+ feedUrl: string;
482
+ publishedAt: string;
483
+ notesUrl: string;
484
+ };
485
+ runtime: {
486
+ link?: string | undefined;
487
+ type: "ide" | "runtime";
488
+ channel: "lts" | "stable" | "beta" | "unstable";
489
+ version: string;
490
+ feedUrl: string;
491
+ publishedAt: string;
492
+ notesUrl: string;
493
+ };
494
+ channel: "lts" | "stable" | "beta" | "unstable";
495
+ summary: string;
496
+ publishedAt: string;
497
+ }, {
498
+ ide: {
499
+ link?: string | undefined;
500
+ type: "ide" | "runtime";
501
+ channel: "lts" | "stable" | "beta" | "unstable";
502
+ version: string;
503
+ feedUrl: string;
504
+ publishedAt: string;
505
+ notesUrl: string;
506
+ };
507
+ runtime: {
508
+ link?: string | undefined;
509
+ type: "ide" | "runtime";
510
+ channel: "lts" | "stable" | "beta" | "unstable";
511
+ version: string;
512
+ feedUrl: string;
513
+ publishedAt: string;
514
+ notesUrl: string;
515
+ };
516
+ channel: "lts" | "stable" | "beta" | "unstable";
517
+ summary: string;
518
+ publishedAt: string;
519
+ }>;
520
+ export type RawReleaseNote = z.infer<typeof rawReleaseNoteSchema>;
521
+ export declare const rawReleaseNoteSchema: z.ZodObject<{
522
+ type: z.ZodOptional<z.ZodEnum<["ide", "runtime"]>>;
523
+ version: z.ZodString;
524
+ release_notes: z.ZodArray<z.ZodString, "many">;
525
+ }, "strict", z.ZodTypeAny, {
526
+ type?: "ide" | "runtime" | undefined;
527
+ version: string;
528
+ release_notes: string[];
529
+ }, {
530
+ type?: "ide" | "runtime" | undefined;
531
+ version: string;
532
+ release_notes: string[];
533
+ }>;
534
+ export type RawReleaseNotesCache = Record<string, RawReleaseNote>;
535
+ export declare const rawReleaseNotesCacheSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
536
+ type: z.ZodOptional<z.ZodEnum<["ide", "runtime"]>>;
537
+ version: z.ZodString;
538
+ release_notes: z.ZodArray<z.ZodString, "many">;
539
+ }, "strict", z.ZodTypeAny, {
540
+ type?: "ide" | "runtime" | undefined;
541
+ version: string;
542
+ release_notes: string[];
543
+ }, {
544
+ type?: "ide" | "runtime" | undefined;
545
+ version: string;
546
+ release_notes: string[];
547
+ }>>;
548
+ //# sourceMappingURL=feeds.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feeds.types.d.ts","sourceRoot":"","sources":["../src/feeds.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,MAAM,OAAO,GAAG,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC9C,eAAO,MAAM,QAAQ,gDAAiD,CAAC;AACvE,eAAO,MAAM,aAAa,kDAAmB,CAAC;AAG9C,MAAM,MAAM,YAAY,GAAG,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC;AACxD,eAAO,MAAM,aAAa,6BAA8B,CAAC;AAGzD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyBxB,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;EASlC,CAAC;AAEH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,gCAAgC,CACxC,CAAC;AACF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAU3C,CAAC;AAUH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,+BAA+B,CACvC,CAAC;AACF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIxC,CAAC;AAEL,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGjC,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAMtB,CAAC;AAEZ,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;AAClE,eAAO,MAAM,0BAA0B;;;;;;;;;;;;GAAiC,CAAC"}
@@ -0,0 +1,69 @@
1
+ import { z } from 'zod';
2
+ import { htmlString } from './utils.js';
3
+ export const channels = ['lts', 'stable', 'beta', 'unstable'];
4
+ export const channelSchema = z.enum(channels);
5
+ Object.freeze(channels);
6
+ export const artifactTypes = ['ide', 'runtime'];
7
+ Object.freeze(artifactTypes);
8
+ export const rssFeedSchema = z.object({
9
+ rss: z.object({
10
+ channel: z.object({
11
+ title: htmlString(),
12
+ description: htmlString(),
13
+ link: z.string(),
14
+ item: z.preprocess((arg) => {
15
+ if (!Array.isArray(arg)) {
16
+ return [arg];
17
+ }
18
+ return arg;
19
+ }, z.array(z.object({
20
+ title: z.string().regex(/^Version \d+\.\d+\.\d+\.\d+$/),
21
+ pubDate: z.string(),
22
+ link: z.string().optional(),
23
+ comments: z.string(),
24
+ description: htmlString().optional(),
25
+ }))),
26
+ }),
27
+ }),
28
+ });
29
+ export const gameMakerArtifactSchema = z.object({
30
+ type: z.enum(artifactTypes),
31
+ version: z.string().regex(/^\d+\.\d+\.\d+\.\d+$/),
32
+ channel: channelSchema,
33
+ summary: z.string().optional(),
34
+ feedUrl: z.string(),
35
+ publishedAt: z.string(),
36
+ link: z.string().optional(),
37
+ notesUrl: z.string(),
38
+ });
39
+ export const gameMakerArtifactWithNotesSchema = gameMakerArtifactSchema.extend({
40
+ notes: z.object({
41
+ since: z.string().nullable(),
42
+ groups: z.array(z.object({
43
+ title: htmlString(),
44
+ changes: z.array(htmlString()),
45
+ })),
46
+ }),
47
+ });
48
+ const gameMakerReleaseBaseSchema = z.object({
49
+ channel: channelSchema,
50
+ publishedAt: z.string().describe('Date of release for the IDE in this pair'),
51
+ summary: htmlString().describe('Summary of the release, from the RSS feed for the IDE'),
52
+ });
53
+ export const gameMakerReleaseWithNotesSchema = gameMakerReleaseBaseSchema.extend({
54
+ ide: gameMakerArtifactWithNotesSchema.omit({ summary: true }),
55
+ runtime: gameMakerArtifactWithNotesSchema.omit({ summary: true }),
56
+ });
57
+ export const gameMakerReleaseSchema = gameMakerReleaseBaseSchema.extend({
58
+ ide: gameMakerArtifactSchema.omit({ summary: true }),
59
+ runtime: gameMakerArtifactSchema.omit({ summary: true }),
60
+ });
61
+ export const rawReleaseNoteSchema = z
62
+ .object({
63
+ type: z.enum(artifactTypes).optional(),
64
+ version: z.string(),
65
+ release_notes: z.array(z.string()),
66
+ })
67
+ .strict();
68
+ export const rawReleaseNotesCacheSchema = z.record(rawReleaseNoteSchema);
69
+ //# sourceMappingURL=feeds.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,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+BAA+B,GAC1C,0BAA0B,CAAC,MAAM,CAAC;IAChC,GAAG,EAAE,gCAAgC,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC7D,OAAO,EAAE,gCAAgC,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;CAClE,CAAC,CAAC;AAGL,MAAM,CAAC,MAAM,sBAAsB,GAAG,0BAA0B,CAAC,MAAM,CAAC;IACtE,GAAG,EAAE,uBAAuB,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IACpD,OAAO,EAAE,uBAAuB,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;CACzD,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC;KAClC,MAAM,CAAC;IACN,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,QAAQ,EAAE;IACtC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CACnC,CAAC;KACD,MAAM,EAAE,CAAC;AAGZ,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export type Validator<T> = {
2
+ parse: (data: any) => T;
3
+ };
4
+ export declare function fetchXml<T = unknown>(url: string, validator?: Validator<T>): Promise<T>;
5
+ export declare function fetchJson<T = unknown>(url: string, validator?: Validator<T>): Promise<T>;
6
+ //# sourceMappingURL=fetch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../src/fetch.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI;IAAE,KAAK,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,CAAC,CAAA;CAAE,CAAC;AAEvD,wBAAsB,QAAQ,CAAC,CAAC,GAAG,OAAO,EACxC,GAAG,EAAE,MAAM,EACX,SAAS,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,GACvB,OAAO,CAAC,CAAC,CAAC,CAaZ;AAED,wBAAsB,SAAS,CAAC,CAAC,GAAG,OAAO,EACzC,GAAG,EAAE,MAAM,EACX,SAAS,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,GACvB,OAAO,CAAC,CAAC,CAAC,CAYZ"}
package/dist/fetch.js ADDED
@@ -0,0 +1,37 @@
1
+ import fetch from 'node-fetch';
2
+ import { XMLParser } from 'fast-xml-parser';
3
+ import { isError } from './utils.js';
4
+ export async function fetchXml(url, validator) {
5
+ const res = await fetchUrl(url);
6
+ try {
7
+ const data = await res.text();
8
+ const asJson = new XMLParser().parse(data);
9
+ return validator ? validator.parse(asJson) : asJson;
10
+ }
11
+ catch (err) {
12
+ throw new Error(`Error parsing XML from ${url}: ${isError(err) ? err.message : 'UNKNOWN'}`);
13
+ }
14
+ }
15
+ export async function fetchJson(url, validator) {
16
+ const res = await fetchUrl(url);
17
+ try {
18
+ const parsed = await res.json();
19
+ return validator ? validator.parse(parsed) : parsed;
20
+ }
21
+ catch (err) {
22
+ throw new Error(`Error parsing JSON from ${url}: ${isError(err) ? err.message : 'UNKNOWN'}`);
23
+ }
24
+ }
25
+ async function fetchUrl(url) {
26
+ try {
27
+ const res = await fetch(url);
28
+ if (res.status >= 300) {
29
+ throw new Error(`Error fetching "${url}": ${res.status} ${res.statusText}`);
30
+ }
31
+ return res;
32
+ }
33
+ catch (err) {
34
+ throw new Error(`Error fetching "${url}": ${isError(err) ? err.message : 'UNKNOWN'}`);
35
+ }
36
+ }
37
+ //# sourceMappingURL=fetch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch.js","sourceRoot":"","sources":["../src/fetch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,EA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AM,KAAK,CAAC,GAAG,CAAC,CAAC;QAC7B,IAAI,GAAG,CAAC,MAAM,IAAI,GAAG,EAAE;YACrB,MAAM,IAAI,KAAK,CACb,mBAAmB,GAAG,MAAM,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,UAAU,EAAE,CAC3D,CAAC;SACH;QACD,OAAO,GAAG,CAAC;KACZ;IAAC,OAAO,GAAG,EAAE;QACZ,MAAM,IAAI,KAAK,CACb,mBAAmB,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,EAAE,CACrE,CAAC;KACH;AACH,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { listReleases, listReleasesWithNotes } from './feeds.js';
2
+ export { ideFeedUrls, runtimeFeedUrls } from './urls.js';
3
+ export { gameMakerReleaseWithNotesSchema } from './feeds.types.js';
4
+ export type { ArtifactType, Channel, GameMakerRelease, GameMakerReleaseWithNotes, } from './feeds.types.js';
5
+ //# sourceMappingURL=index.d.ts.map