@bscotch/gamemaker-releases 0.4.1 → 0.4.3
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.md +23 -0
- package/README.md +1 -1
- package/dist/browser.d.ts +7 -7
- package/dist/browser.js +6 -6
- package/dist/constants.d.ts +2 -2
- package/dist/constants.js +4 -4
- package/dist/feeds.d.ts +4 -4
- package/dist/feeds.d.ts.map +1 -1
- package/dist/feeds.js +80 -77
- package/dist/feeds.js.map +1 -1
- package/dist/feeds.lib.d.ts +3 -3
- package/dist/feeds.lib.js +52 -52
- package/dist/feeds.types.d.ts +542 -542
- package/dist/feeds.types.js +68 -68
- package/dist/fetch.d.ts +5 -5
- package/dist/fetch.js +36 -36
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/notes.d.ts +33 -33
- package/dist/notes.d.ts.map +1 -1
- package/dist/notes.js +142 -140
- package/dist/notes.js.map +1 -1
- package/dist/releases.d.ts +49 -49
- package/dist/releases.d.ts.map +1 -1
- package/dist/releases.js +19 -19
- package/dist/releases.js.map +1 -1
- package/dist/urls.d.ts +12 -12
- package/dist/urls.js +19 -19
- package/dist/utils.d.ts +8 -8
- package/dist/utils.js +43 -43
- package/package.json +8 -8
package/dist/releases.d.ts
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This package is used to generate a releases object, stored
|
|
3
|
-
* as a JSON file for public download. The latest version of this
|
|
4
|
-
* releases object can be downloaded from this URL.
|
|
5
|
-
*/
|
|
6
|
-
export declare const releasesUrl = "https://github.com/bscotch/
|
|
7
|
-
/**
|
|
8
|
-
* Given a URL to an already-synthesized
|
|
9
|
-
* GameMaker Studio merged-releases feed,
|
|
10
|
-
* download the feed and return the list of
|
|
11
|
-
* releases.
|
|
12
|
-
*/
|
|
13
|
-
export declare function fetchReleasesSummaryWithNotes(url?: string): Promise<{
|
|
14
|
-
ide: {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
};
|
|
30
|
-
runtime: {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
};
|
|
46
|
-
channel: "lts" | "stable" | "beta" | "unstable";
|
|
47
|
-
summary: string;
|
|
48
|
-
publishedAt: string;
|
|
49
|
-
}[]>;
|
|
1
|
+
/**
|
|
2
|
+
* This package is used to generate a releases object, stored
|
|
3
|
+
* as a JSON file for public download. The latest version of this
|
|
4
|
+
* releases object can be downloaded from this URL.
|
|
5
|
+
*/
|
|
6
|
+
export declare const releasesUrl = "https://github.com/bscotch/stitch/releases/latest/download/releases-summary.json";
|
|
7
|
+
/**
|
|
8
|
+
* Given a URL to an already-synthesized
|
|
9
|
+
* GameMaker Studio merged-releases feed,
|
|
10
|
+
* download the feed and return the list of
|
|
11
|
+
* releases.
|
|
12
|
+
*/
|
|
13
|
+
export declare function fetchReleasesSummaryWithNotes(url?: string): Promise<{
|
|
14
|
+
ide: {
|
|
15
|
+
type: "ide" | "runtime";
|
|
16
|
+
channel: "lts" | "stable" | "beta" | "unstable";
|
|
17
|
+
version: string;
|
|
18
|
+
feedUrl: string;
|
|
19
|
+
publishedAt: string;
|
|
20
|
+
notesUrl: string;
|
|
21
|
+
notes: {
|
|
22
|
+
since: string | null;
|
|
23
|
+
groups: {
|
|
24
|
+
title: string;
|
|
25
|
+
changes: string[];
|
|
26
|
+
}[];
|
|
27
|
+
};
|
|
28
|
+
link?: string | undefined;
|
|
29
|
+
};
|
|
30
|
+
runtime: {
|
|
31
|
+
type: "ide" | "runtime";
|
|
32
|
+
channel: "lts" | "stable" | "beta" | "unstable";
|
|
33
|
+
version: string;
|
|
34
|
+
feedUrl: string;
|
|
35
|
+
publishedAt: string;
|
|
36
|
+
notesUrl: string;
|
|
37
|
+
notes: {
|
|
38
|
+
since: string | null;
|
|
39
|
+
groups: {
|
|
40
|
+
title: string;
|
|
41
|
+
changes: string[];
|
|
42
|
+
}[];
|
|
43
|
+
};
|
|
44
|
+
link?: string | undefined;
|
|
45
|
+
};
|
|
46
|
+
channel: "lts" | "stable" | "beta" | "unstable";
|
|
47
|
+
summary: string;
|
|
48
|
+
publishedAt: string;
|
|
49
|
+
}[]>;
|
|
50
50
|
//# sourceMappingURL=releases.d.ts.map
|
package/dist/releases.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"releases.d.ts","sourceRoot":"","sources":["../src/releases.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"releases.d.ts","sourceRoot":"","sources":["../src/releases.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,eAAO,MAAM,WAAW,qFAC2D,CAAC;AAEpF;;;;;GAKG;AACH,wBAAsB,6BAA6B,CAAC,GAAG,SAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAMpE"}
|
package/dist/releases.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { gameMakerReleaseWithNotesSchema } from './feeds.types.js';
|
|
3
|
-
import { fetchJson } from './fetch.js';
|
|
4
|
-
/**
|
|
5
|
-
* This package is used to generate a releases object, stored
|
|
6
|
-
* as a JSON file for public download. The latest version of this
|
|
7
|
-
* releases object can be downloaded from this URL.
|
|
8
|
-
*/
|
|
9
|
-
export const releasesUrl = 'https://github.com/bscotch/
|
|
10
|
-
/**
|
|
11
|
-
* Given a URL to an already-synthesized
|
|
12
|
-
* GameMaker Studio merged-releases feed,
|
|
13
|
-
* download the feed and return the list of
|
|
14
|
-
* releases.
|
|
15
|
-
*/
|
|
16
|
-
export async function fetchReleasesSummaryWithNotes(url = releasesUrl) {
|
|
17
|
-
const releases = await fetchJson(url, z.array(gameMakerReleaseWithNotesSchema));
|
|
18
|
-
return releases;
|
|
19
|
-
}
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { gameMakerReleaseWithNotesSchema } from './feeds.types.js';
|
|
3
|
+
import { fetchJson } from './fetch.js';
|
|
4
|
+
/**
|
|
5
|
+
* This package is used to generate a releases object, stored
|
|
6
|
+
* as a JSON file for public download. The latest version of this
|
|
7
|
+
* releases object can be downloaded from this URL.
|
|
8
|
+
*/
|
|
9
|
+
export const releasesUrl = 'https://github.com/bscotch/stitch/releases/latest/download/releases-summary.json';
|
|
10
|
+
/**
|
|
11
|
+
* Given a URL to an already-synthesized
|
|
12
|
+
* GameMaker Studio merged-releases feed,
|
|
13
|
+
* download the feed and return the list of
|
|
14
|
+
* releases.
|
|
15
|
+
*/
|
|
16
|
+
export async function fetchReleasesSummaryWithNotes(url = releasesUrl) {
|
|
17
|
+
const releases = await fetchJson(url, z.array(gameMakerReleaseWithNotesSchema));
|
|
18
|
+
return releases;
|
|
19
|
+
}
|
|
20
20
|
//# sourceMappingURL=releases.js.map
|
package/dist/releases.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"releases.js","sourceRoot":"","sources":["../src/releases.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,+BAA+B,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"releases.js","sourceRoot":"","sources":["../src/releases.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,+BAA+B,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GACvB,kFAAkF,CAAC;AAEpF;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,6BAA6B,CAAC,GAAG,GAAG,WAAW;IACpE,MAAM,QAAQ,GAAG,MAAM,SAAS,CAC/B,GAAG,EACH,CAAC,CAAC,KAAK,CAAC,+BAA+B,CAAC,CACxC,CAAC;IACF,OAAO,QAAQ,CAAC;AACjB,CAAC"}
|
package/dist/urls.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export declare function ideFeedUrls(): {
|
|
2
|
-
lts: "https://gms.yoyogames.com/update-win-LTS.rss";
|
|
3
|
-
stable: "https://gms.yoyogames.com/update-win.rss";
|
|
4
|
-
beta: "https://gms.yoyogames.com/update-win-NuBeta.rss";
|
|
5
|
-
unstable: "https://gms.yoyogames.com/update-win-NuBeta-I.rss";
|
|
6
|
-
};
|
|
7
|
-
export declare function runtimeFeedUrls(): {
|
|
8
|
-
lts: "https://gms.yoyogames.com/Zeus-Runtime-LTS.rss";
|
|
9
|
-
stable: "https://gms.yoyogames.com/Zeus-Runtime.rss";
|
|
10
|
-
beta: "https://gms.yoyogames.com/Zeus-Runtime-NuBeta.rss";
|
|
11
|
-
unstable: "https://gms.yoyogames.com/Zeus-Runtime-NuBeta-I.rss";
|
|
12
|
-
};
|
|
1
|
+
export declare function ideFeedUrls(): {
|
|
2
|
+
lts: "https://gms.yoyogames.com/update-win-LTS.rss";
|
|
3
|
+
stable: "https://gms.yoyogames.com/update-win.rss";
|
|
4
|
+
beta: "https://gms.yoyogames.com/update-win-NuBeta.rss";
|
|
5
|
+
unstable: "https://gms.yoyogames.com/update-win-NuBeta-I.rss";
|
|
6
|
+
};
|
|
7
|
+
export declare function runtimeFeedUrls(): {
|
|
8
|
+
lts: "https://gms.yoyogames.com/Zeus-Runtime-LTS.rss";
|
|
9
|
+
stable: "https://gms.yoyogames.com/Zeus-Runtime.rss";
|
|
10
|
+
beta: "https://gms.yoyogames.com/Zeus-Runtime-NuBeta.rss";
|
|
11
|
+
unstable: "https://gms.yoyogames.com/Zeus-Runtime-NuBeta-I.rss";
|
|
12
|
+
};
|
|
13
13
|
//# sourceMappingURL=urls.d.ts.map
|
package/dist/urls.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { literal } from '@bscotch/utility/browser';
|
|
2
|
-
export function ideFeedUrls() {
|
|
3
|
-
const prefix = `https://gms.yoyogames.com/update-win`;
|
|
4
|
-
return literal({
|
|
5
|
-
lts: `${prefix}-LTS.rss`,
|
|
6
|
-
stable: `${prefix}.rss`,
|
|
7
|
-
beta: `${prefix}-NuBeta.rss`,
|
|
8
|
-
unstable: `${prefix}-NuBeta-I.rss`,
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
export function runtimeFeedUrls() {
|
|
12
|
-
const prefix = `https://gms.yoyogames.com/Zeus-Runtime`;
|
|
13
|
-
return literal({
|
|
14
|
-
lts: `${prefix}-LTS.rss`,
|
|
15
|
-
stable: `${prefix}.rss`,
|
|
16
|
-
beta: `${prefix}-NuBeta.rss`,
|
|
17
|
-
unstable: `${prefix}-NuBeta-I.rss`,
|
|
18
|
-
});
|
|
19
|
-
}
|
|
1
|
+
import { literal } from '@bscotch/utility/browser';
|
|
2
|
+
export function ideFeedUrls() {
|
|
3
|
+
const prefix = `https://gms.yoyogames.com/update-win`;
|
|
4
|
+
return literal({
|
|
5
|
+
lts: `${prefix}-LTS.rss`,
|
|
6
|
+
stable: `${prefix}.rss`,
|
|
7
|
+
beta: `${prefix}-NuBeta.rss`,
|
|
8
|
+
unstable: `${prefix}-NuBeta-I.rss`,
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
export function runtimeFeedUrls() {
|
|
12
|
+
const prefix = `https://gms.yoyogames.com/Zeus-Runtime`;
|
|
13
|
+
return literal({
|
|
14
|
+
lts: `${prefix}-LTS.rss`,
|
|
15
|
+
stable: `${prefix}.rss`,
|
|
16
|
+
beta: `${prefix}-NuBeta.rss`,
|
|
17
|
+
unstable: `${prefix}-NuBeta-I.rss`,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
20
|
//# sourceMappingURL=urls.js.map
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export type ArrayItemScore<T> = (item: T, idx: number, items: T[]) => number;
|
|
3
|
-
export declare function findMax<T>(items: T[]): T;
|
|
4
|
-
export declare function findMax<T>(items: T[], byProperty: keyof T): T;
|
|
5
|
-
export declare function findMax<T>(items: T[], score: ArrayItemScore<T>): T;
|
|
6
|
-
export declare function htmlString(): z.ZodEffects<z.ZodString, string, string>;
|
|
7
|
-
export declare function countNonUnique(arr: any[]): number;
|
|
8
|
-
export declare function isError(thing: unknown): thing is Error;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export type ArrayItemScore<T> = (item: T, idx: number, items: T[]) => number;
|
|
3
|
+
export declare function findMax<T>(items: T[]): T;
|
|
4
|
+
export declare function findMax<T>(items: T[], byProperty: keyof T): T;
|
|
5
|
+
export declare function findMax<T>(items: T[], score: ArrayItemScore<T>): T;
|
|
6
|
+
export declare function htmlString(): z.ZodEffects<z.ZodString, string, string>;
|
|
7
|
+
export declare function countNonUnique(arr: any[]): number;
|
|
8
|
+
export declare function isError(thing: unknown): thing is Error;
|
|
9
9
|
//# sourceMappingURL=utils.d.ts.map
|
package/dist/utils.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { assert } from '@bscotch/utility/browser';
|
|
2
|
-
import { decode } from 'entities';
|
|
3
|
-
import { z } from 'zod';
|
|
4
|
-
export function findMax(items, propOrFunc) {
|
|
5
|
-
assert(items.length, 'Cannot find max of empty array');
|
|
6
|
-
const score = (item, idx) => propOrFunc === undefined
|
|
7
|
-
? item
|
|
8
|
-
: typeof propOrFunc === 'function'
|
|
9
|
-
? propOrFunc(item, idx, items)
|
|
10
|
-
: item[propOrFunc];
|
|
11
|
-
let maxScore = score(items[0], 0);
|
|
12
|
-
let maxIdx = 0;
|
|
13
|
-
for (let i = 1; i < items.length; i++) {
|
|
14
|
-
const itemScore = score(items[i], i);
|
|
15
|
-
if (itemScore > maxScore) {
|
|
16
|
-
maxScore = itemScore;
|
|
17
|
-
maxIdx = i;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return items[maxIdx];
|
|
21
|
-
}
|
|
22
|
-
export function htmlString() {
|
|
23
|
-
return z.string().transform((s) => {
|
|
24
|
-
if (!s || typeof s !== 'string') {
|
|
25
|
-
return s;
|
|
26
|
-
}
|
|
27
|
-
// decode HTML entities
|
|
28
|
-
s = decode(s.trim());
|
|
29
|
-
// remove anchor targets
|
|
30
|
-
s = s.replace(/\btarget=[^\s>]+/g, '');
|
|
31
|
-
// remove excess space
|
|
32
|
-
s = s.replace(/ +/g, ' ');
|
|
33
|
-
s = s.replace(/\r/g, '');
|
|
34
|
-
s = s.replace(/[\t ]*\n[\t ]*(\n[\t ]*)+/g, '\n\n');
|
|
35
|
-
return s;
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
export function countNonUnique(arr) {
|
|
39
|
-
return arr.length - new Set(arr).size;
|
|
40
|
-
}
|
|
41
|
-
export function isError(thing) {
|
|
42
|
-
return thing instanceof Error;
|
|
43
|
-
}
|
|
1
|
+
import { assert } from '@bscotch/utility/browser';
|
|
2
|
+
import { decode } from 'entities';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
export function findMax(items, propOrFunc) {
|
|
5
|
+
assert(items.length, 'Cannot find max of empty array');
|
|
6
|
+
const score = (item, idx) => propOrFunc === undefined
|
|
7
|
+
? item
|
|
8
|
+
: typeof propOrFunc === 'function'
|
|
9
|
+
? propOrFunc(item, idx, items)
|
|
10
|
+
: item[propOrFunc];
|
|
11
|
+
let maxScore = score(items[0], 0);
|
|
12
|
+
let maxIdx = 0;
|
|
13
|
+
for (let i = 1; i < items.length; i++) {
|
|
14
|
+
const itemScore = score(items[i], i);
|
|
15
|
+
if (itemScore > maxScore) {
|
|
16
|
+
maxScore = itemScore;
|
|
17
|
+
maxIdx = i;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return items[maxIdx];
|
|
21
|
+
}
|
|
22
|
+
export function htmlString() {
|
|
23
|
+
return z.string().transform((s) => {
|
|
24
|
+
if (!s || typeof s !== 'string') {
|
|
25
|
+
return s;
|
|
26
|
+
}
|
|
27
|
+
// decode HTML entities
|
|
28
|
+
s = decode(s.trim());
|
|
29
|
+
// remove anchor targets
|
|
30
|
+
s = s.replace(/\btarget=[^\s>]+/g, '');
|
|
31
|
+
// remove excess space
|
|
32
|
+
s = s.replace(/ +/g, ' ');
|
|
33
|
+
s = s.replace(/\r/g, '');
|
|
34
|
+
s = s.replace(/[\t ]*\n[\t ]*(\n[\t ]*)+/g, '\n\n');
|
|
35
|
+
return s;
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
export function countNonUnique(arr) {
|
|
39
|
+
return arr.length - new Set(arr).size;
|
|
40
|
+
}
|
|
41
|
+
export function isError(thing) {
|
|
42
|
+
return thing instanceof Error;
|
|
43
|
+
}
|
|
44
44
|
//# sourceMappingURL=utils.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bscotch/gamemaker-releases",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "Utility for combining GameMaker release data into a single feed.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"gamemaker",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"rss",
|
|
17
17
|
"feed"
|
|
18
18
|
],
|
|
19
|
-
"homepage": "https://github.com/bscotch/
|
|
19
|
+
"homepage": "https://github.com/bscotch/stitch/tree/develop/packages/releases#readme",
|
|
20
20
|
"repository": {
|
|
21
21
|
"type": "git",
|
|
22
22
|
"url": "https://github.com/bscotch/gamemaker-info.git",
|
|
@@ -41,19 +41,19 @@
|
|
|
41
41
|
"@bscotch/pathy": "^2.6.0",
|
|
42
42
|
"@bscotch/utility": "^6.8.0",
|
|
43
43
|
"entities": "^4.4.0",
|
|
44
|
-
"fast-xml-parser": "^4.1.
|
|
44
|
+
"fast-xml-parser": "^4.1.3",
|
|
45
45
|
"node-fetch": "^3.3.0",
|
|
46
46
|
"tslib": "^2.5.0",
|
|
47
|
-
"zod": "^3.
|
|
47
|
+
"zod": "^3.21.2"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@types/chai": "^4",
|
|
50
|
+
"@types/chai": "^4.3.4",
|
|
51
51
|
"@types/mocha": "^10.0.1",
|
|
52
52
|
"@types/rimraf": "^3",
|
|
53
53
|
"chai": "^4.3.7",
|
|
54
54
|
"mocha": "^10.2.0",
|
|
55
|
-
"rimraf": "^4.1
|
|
56
|
-
"typescript": "
|
|
55
|
+
"rimraf": "^4.3.1",
|
|
56
|
+
"typescript": "5.0.1-rc"
|
|
57
57
|
},
|
|
58
58
|
"publishConfig": {
|
|
59
59
|
"access": "public"
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"scripts": {
|
|
62
62
|
"build": "tsc --build",
|
|
63
63
|
"clean": "rimraf build dist",
|
|
64
|
-
"test": "mocha --config ../../config/.mocharc.cjs",
|
|
64
|
+
"test": "mocha --config ../../config/.mocharc.cjs --timeout=30000",
|
|
65
65
|
"test:dev": "mocha --config ../../config/.mocharc.cjs --forbid-only=false --parallel=false --timeout=9999999999",
|
|
66
66
|
"watch": "tsc --build --watch"
|
|
67
67
|
}
|