webring 1.1.4 → 1.2.2
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/CHANGELOG.md +28 -0
- package/dist/cache.js +2 -2
- package/dist/cache.js.map +1 -1
- package/dist/fetch.d.ts +1 -0
- package/dist/fetch.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -2
- package/dist/index.js.map +1 -1
- package/dist/index.test.js +1 -0
- package/dist/index.test.js.map +1 -1
- package/dist/types.d.ts +53 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +5 -1
- package/dist/types.js.map +1 -1
- package/package.json +25 -20
- package/src/cache.ts +2 -2
- package/src/index.test.ts +2 -0
- package/src/index.ts +17 -3
- package/src/types.ts +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,34 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.2.2](https://github.com/shepherdjerred/webring/compare/v1.2.1...v1.2.2) (2024-09-13)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **deps:** update npm ([b0e54f4](https://github.com/shepherdjerred/webring/commit/b0e54f4f0d9428c14cbbfa69b4654b9a09d70368))
|
|
14
|
+
|
|
15
|
+
## [1.2.1](https://github.com/shepherdjerred/webring/compare/v1.2.0...v1.2.1) (2024-08-12)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* deps ([ba13fdb](https://github.com/shepherdjerred/webring/commit/ba13fdbd0420d03049a713b6901fb236eb409cac))
|
|
21
|
+
* revert cheerio ([0b71e1e](https://github.com/shepherdjerred/webring/commit/0b71e1e2be61853c8ca99a614d7c2095969493c2))
|
|
22
|
+
|
|
23
|
+
## [1.2.0](https://github.com/shepherdjerred/webring/compare/v1.1.4...v1.2.0) (2024-08-12)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Features
|
|
27
|
+
|
|
28
|
+
* add ability to filter and shuffle ([51dcc9d](https://github.com/shepherdjerred/webring/commit/51dcc9d946ed0bee2f854cf5249d8cd9680e1bc6))
|
|
29
|
+
* update to eslint 9 ([7721ac1](https://github.com/shepherdjerred/webring/commit/7721ac190acfdabfd7b6ece3019c018a05700336))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Bug Fixes
|
|
33
|
+
|
|
34
|
+
* **deps:** update npm ([27dd6e3](https://github.com/shepherdjerred/webring/commit/27dd6e3e96be57ad3093e494234e3ba2d790494c))
|
|
35
|
+
|
|
8
36
|
## [1.1.4](https://github.com/shepherdjerred/webring/compare/v1.1.3...v1.1.4) (2024-07-28)
|
|
9
37
|
|
|
10
38
|
|
package/dist/cache.js
CHANGED
|
@@ -2,14 +2,14 @@ import * as R from "remeda";
|
|
|
2
2
|
import { CacheSchema, } from "./types.js";
|
|
3
3
|
import { fetch } from "./fetch.js";
|
|
4
4
|
import { asyncMapFilterUndefined } from "./util.js";
|
|
5
|
-
import fs from "fs/promises";
|
|
5
|
+
import * as fs from "fs/promises";
|
|
6
6
|
async function loadCache({ cache_file }) {
|
|
7
7
|
try {
|
|
8
8
|
await fs.access(cache_file);
|
|
9
9
|
const cacheFile = await fs.readFile(cache_file);
|
|
10
10
|
return CacheSchema.parse(JSON.parse(cacheFile.toString()));
|
|
11
11
|
}
|
|
12
|
-
catch (
|
|
12
|
+
catch (_e) {
|
|
13
13
|
return {};
|
|
14
14
|
}
|
|
15
15
|
}
|
package/dist/cache.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache.js","sourceRoot":"","sources":["../src/cache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,E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AM,CAAC,KAAK,UAAU,cAAc,CAClC,MAAc,EACd,KAAY,EACZ,MAA2B;IAE3B,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACrC,IAAI,UAAU,EAAE,CAAC;QACf,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,IAAI,GAAG,CAAC,OAAO,EAAE,GAAG,UAAU,CAAC,SAAS,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,sBAAsB,GAAG,EAAE,GAAG,IAAI,EAAE,CAAC;YACrG,OAAO,CAAC,GAAG,CAAC,yBAAyB,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC;YACpD,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAC1C,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,mBAAmB,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC;QAC3D,CAAC;IACH,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,sBAAsB,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC;IACnD,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,YAAY,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC;IACtC,OAAO,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;AACxC,CAAC"}
|
package/dist/fetch.d.ts
CHANGED
package/dist/fetch.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../src/fetch.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,WAAW,EAAmB,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAOhG,wBAAsB,QAAQ,CAAC,MAAM,EAAE,aAAa
|
|
1
|
+
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../src/fetch.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,WAAW,EAAmB,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAOhG,wBAAsB,QAAQ,CAAC,MAAM,EAAE,aAAa;;;;;;;;;;KAEnD;AAED,wBAAsB,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC,CAuC5F"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,MAAM,EAA6B,MAAM,YAAY,CAAC;AAExF,wBAAsB,GAAG,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,MAAM,EAA6B,MAAM,YAAY,CAAC;AAExF,wBAAsB,GAAG,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAkChE;AAED,cAAc,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -13,8 +13,21 @@ export async function run(config) {
|
|
|
13
13
|
console.log("Cache disabled.");
|
|
14
14
|
result = await fetchAllUncached(config);
|
|
15
15
|
}
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
let results = R.pipe(result, R.sortBy((result) => result.date.getTime()), R.reverse(), R.filter((result) => {
|
|
17
|
+
if (result.source.filter && result.preview) {
|
|
18
|
+
return result.source.filter(result.preview);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
}));
|
|
24
|
+
// shuffle if wanted
|
|
25
|
+
if (config.shuffle) {
|
|
26
|
+
results = R.shuffle(results);
|
|
27
|
+
}
|
|
28
|
+
// take n
|
|
29
|
+
results = R.take(results, config.number);
|
|
30
|
+
return results;
|
|
18
31
|
}
|
|
19
32
|
export * from "./types.js";
|
|
20
33
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,cAAc,IAAI,cAAc,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EAAE,QAAQ,IAAI,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAmC,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAExF,MAAM,CAAC,KAAK,UAAU,GAAG,CAAC,MAAqB;IAC7C,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,yBAAyB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAEtE,IAAI,MAAc,CAAC;IACnB,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC,CAAC;QACxD,MAAM,GAAG,MAAM,cAAc,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;QAC/B,MAAM,GAAG,MAAM,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;IAED,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,cAAc,IAAI,cAAc,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EAAE,QAAQ,IAAI,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAmC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AAO,OAAO,CAAC;AACjB,CAAC;AAED,cAAc,YAAY,CAAC"}
|
package/dist/index.test.js
CHANGED
|
@@ -10,6 +10,7 @@ const port = Math.floor(Math.random() * 10000) + 3000;
|
|
|
10
10
|
app.listen(port, () => {
|
|
11
11
|
console.log(`Test server listening at http://localhost:${port.toString()}`);
|
|
12
12
|
});
|
|
13
|
+
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
13
14
|
function createUrl(path) {
|
|
14
15
|
return `http://localhost:${port.toString()}/${path}`;
|
|
15
16
|
}
|
package/dist/index.test.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.test.js","sourceRoot":"","sources":["../src/index.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEtC,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,MAAM,GAAG,GAAG,OAAO,EAAE,CAAC;AACtB,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC;AAExC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,KAAK,CAAC,GAAG,IAAI,CAAC;AACtD,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE;IACpB,OAAO,CAAC,GAAG,CAAC,6CAA6C,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;AAC9E,CAAC,CAAC,CAAC;AAEH,SAAS,SAAS,CAAC,IAAY;IAC7B,OAAO,oBAAoB,IAAI,CAAC,QAAQ,EAAE,IAAI,IAAI,EAAE,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CAAC,MAAM,CAAC,CAAC;IACjC,IAAI,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACpC,6CAA6C;IAC7C,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,MAAM,CAAC,CAAC;IACpD,MAAM,CAAC,MAAM,CAAC,CAAC,eAAe,EAAE,CAAC;AACnC,CAAC,CAAC,CAAC;AAEH,oDAAoD;AACpD,KAAK,UAAU,aAAa;IAC1B,MAAM,QAAQ,GAAG,MAAM,EAAE,CAAC;IAC1B,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IACzC,OAAO,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC;AAC5B,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -6,12 +6,16 @@ declare const SourceSchema: z.ZodObject<{
|
|
|
6
6
|
url: z.ZodString;
|
|
7
7
|
/** A title to describe the feed */
|
|
8
8
|
title: z.ZodString;
|
|
9
|
+
/** Takes a entry preview and returns whether or not it should be displayed */
|
|
10
|
+
filter: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodBoolean>>;
|
|
9
11
|
}, "strip", z.ZodTypeAny, {
|
|
10
12
|
url: string;
|
|
11
13
|
title: string;
|
|
14
|
+
filter?: ((args_0: string, ...args: unknown[]) => boolean) | undefined;
|
|
12
15
|
}, {
|
|
13
16
|
url: string;
|
|
14
17
|
title: string;
|
|
18
|
+
filter?: ((args_0: string, ...args: unknown[]) => boolean) | undefined;
|
|
15
19
|
}>;
|
|
16
20
|
export type CacheConfiguration = z.infer<typeof CacheConfigurationSchema>;
|
|
17
21
|
/** Configuration for the cache */
|
|
@@ -36,12 +40,16 @@ declare const ConfigurationSchema: z.ZodObject<{
|
|
|
36
40
|
url: z.ZodString;
|
|
37
41
|
/** A title to describe the feed */
|
|
38
42
|
title: z.ZodString;
|
|
43
|
+
/** Takes a entry preview and returns whether or not it should be displayed */
|
|
44
|
+
filter: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodBoolean>>;
|
|
39
45
|
}, "strip", z.ZodTypeAny, {
|
|
40
46
|
url: string;
|
|
41
47
|
title: string;
|
|
48
|
+
filter?: ((args_0: string, ...args: unknown[]) => boolean) | undefined;
|
|
42
49
|
}, {
|
|
43
50
|
url: string;
|
|
44
51
|
title: string;
|
|
52
|
+
filter?: ((args_0: string, ...args: unknown[]) => boolean) | undefined;
|
|
45
53
|
}>, "many">;
|
|
46
54
|
/** Return the n latest updates from the source list. */
|
|
47
55
|
number: z.ZodDefault<z.ZodNumber>;
|
|
@@ -60,21 +68,26 @@ declare const ConfigurationSchema: z.ZodObject<{
|
|
|
60
68
|
cache_duration_minutes?: number | undefined;
|
|
61
69
|
cache_file?: string | undefined;
|
|
62
70
|
}>>;
|
|
71
|
+
/** Randomize the output order */
|
|
72
|
+
shuffle: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
63
73
|
}, "strip", z.ZodTypeAny, {
|
|
64
74
|
number: number;
|
|
65
75
|
sources: {
|
|
66
76
|
url: string;
|
|
67
77
|
title: string;
|
|
78
|
+
filter?: ((args_0: string, ...args: unknown[]) => boolean) | undefined;
|
|
68
79
|
}[];
|
|
69
80
|
truncate: number;
|
|
70
81
|
cache?: {
|
|
71
82
|
cache_duration_minutes: number;
|
|
72
83
|
cache_file: string;
|
|
73
84
|
} | undefined;
|
|
85
|
+
shuffle?: boolean | undefined;
|
|
74
86
|
}, {
|
|
75
87
|
sources: {
|
|
76
88
|
url: string;
|
|
77
89
|
title: string;
|
|
90
|
+
filter?: ((args_0: string, ...args: unknown[]) => boolean) | undefined;
|
|
78
91
|
}[];
|
|
79
92
|
number?: number | undefined;
|
|
80
93
|
truncate?: number | undefined;
|
|
@@ -82,6 +95,7 @@ declare const ConfigurationSchema: z.ZodObject<{
|
|
|
82
95
|
cache_duration_minutes?: number | undefined;
|
|
83
96
|
cache_file?: string | undefined;
|
|
84
97
|
} | undefined;
|
|
98
|
+
shuffle?: boolean | undefined;
|
|
85
99
|
}>;
|
|
86
100
|
export type CachedConfiguration = z.infer<typeof CachedConfigurationSchema>;
|
|
87
101
|
/** A configuration object with caching definitely configured */
|
|
@@ -92,12 +106,16 @@ export declare const CachedConfigurationSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
92
106
|
url: z.ZodString;
|
|
93
107
|
/** A title to describe the feed */
|
|
94
108
|
title: z.ZodString;
|
|
109
|
+
/** Takes a entry preview and returns whether or not it should be displayed */
|
|
110
|
+
filter: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodBoolean>>;
|
|
95
111
|
}, "strip", z.ZodTypeAny, {
|
|
96
112
|
url: string;
|
|
97
113
|
title: string;
|
|
114
|
+
filter?: ((args_0: string, ...args: unknown[]) => boolean) | undefined;
|
|
98
115
|
}, {
|
|
99
116
|
url: string;
|
|
100
117
|
title: string;
|
|
118
|
+
filter?: ((args_0: string, ...args: unknown[]) => boolean) | undefined;
|
|
101
119
|
}>, "many">;
|
|
102
120
|
/** Return the n latest updates from the source list. */
|
|
103
121
|
number: z.ZodDefault<z.ZodNumber>;
|
|
@@ -116,6 +134,8 @@ export declare const CachedConfigurationSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
116
134
|
cache_duration_minutes?: number | undefined;
|
|
117
135
|
cache_file?: string | undefined;
|
|
118
136
|
}>>;
|
|
137
|
+
/** Randomize the output order */
|
|
138
|
+
shuffle: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
119
139
|
}, {
|
|
120
140
|
/** Configuration for the cache */
|
|
121
141
|
cache: z.ZodObject<{
|
|
@@ -135,16 +155,19 @@ export declare const CachedConfigurationSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
135
155
|
sources: {
|
|
136
156
|
url: string;
|
|
137
157
|
title: string;
|
|
158
|
+
filter?: ((args_0: string, ...args: unknown[]) => boolean) | undefined;
|
|
138
159
|
}[];
|
|
139
160
|
truncate: number;
|
|
140
161
|
cache: {
|
|
141
162
|
cache_duration_minutes: number;
|
|
142
163
|
cache_file: string;
|
|
143
164
|
};
|
|
165
|
+
shuffle?: boolean | undefined;
|
|
144
166
|
}, {
|
|
145
167
|
sources: {
|
|
146
168
|
url: string;
|
|
147
169
|
title: string;
|
|
170
|
+
filter?: ((args_0: string, ...args: unknown[]) => boolean) | undefined;
|
|
148
171
|
}[];
|
|
149
172
|
cache: {
|
|
150
173
|
cache_duration_minutes?: number | undefined;
|
|
@@ -152,6 +175,7 @@ export declare const CachedConfigurationSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
152
175
|
};
|
|
153
176
|
number?: number | undefined;
|
|
154
177
|
truncate?: number | undefined;
|
|
178
|
+
shuffle?: boolean | undefined;
|
|
155
179
|
}>;
|
|
156
180
|
export type ResultEntry = z.infer<typeof ResultEntrySchema>;
|
|
157
181
|
/** A single entry from an RSS feed */
|
|
@@ -168,12 +192,16 @@ declare const ResultEntrySchema: z.ZodObject<{
|
|
|
168
192
|
url: z.ZodString;
|
|
169
193
|
/** A title to describe the feed */
|
|
170
194
|
title: z.ZodString;
|
|
195
|
+
/** Takes a entry preview and returns whether or not it should be displayed */
|
|
196
|
+
filter: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodBoolean>>;
|
|
171
197
|
}, "strip", z.ZodTypeAny, {
|
|
172
198
|
url: string;
|
|
173
199
|
title: string;
|
|
200
|
+
filter?: ((args_0: string, ...args: unknown[]) => boolean) | undefined;
|
|
174
201
|
}, {
|
|
175
202
|
url: string;
|
|
176
203
|
title: string;
|
|
204
|
+
filter?: ((args_0: string, ...args: unknown[]) => boolean) | undefined;
|
|
177
205
|
}>;
|
|
178
206
|
/** A preview of the entry. This may contain sanitized HTML. */
|
|
179
207
|
preview: z.ZodOptional<z.ZodString>;
|
|
@@ -184,6 +212,7 @@ declare const ResultEntrySchema: z.ZodObject<{
|
|
|
184
212
|
source: {
|
|
185
213
|
url: string;
|
|
186
214
|
title: string;
|
|
215
|
+
filter?: ((args_0: string, ...args: unknown[]) => boolean) | undefined;
|
|
187
216
|
};
|
|
188
217
|
preview?: string | undefined;
|
|
189
218
|
}, {
|
|
@@ -193,12 +222,13 @@ declare const ResultEntrySchema: z.ZodObject<{
|
|
|
193
222
|
source: {
|
|
194
223
|
url: string;
|
|
195
224
|
title: string;
|
|
225
|
+
filter?: ((args_0: string, ...args: unknown[]) => boolean) | undefined;
|
|
196
226
|
};
|
|
197
227
|
preview?: string | undefined;
|
|
198
228
|
}>;
|
|
199
229
|
export type Result = z.infer<typeof ResultSchema>;
|
|
200
230
|
/** A list of results */
|
|
201
|
-
declare const ResultSchema: z.ZodArray<z.ZodObject<{
|
|
231
|
+
export declare const ResultSchema: z.ZodArray<z.ZodObject<{
|
|
202
232
|
/** The title of the entry */
|
|
203
233
|
title: z.ZodString;
|
|
204
234
|
/** A direct link to the entry */
|
|
@@ -211,12 +241,16 @@ declare const ResultSchema: z.ZodArray<z.ZodObject<{
|
|
|
211
241
|
url: z.ZodString;
|
|
212
242
|
/** A title to describe the feed */
|
|
213
243
|
title: z.ZodString;
|
|
244
|
+
/** Takes a entry preview and returns whether or not it should be displayed */
|
|
245
|
+
filter: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodBoolean>>;
|
|
214
246
|
}, "strip", z.ZodTypeAny, {
|
|
215
247
|
url: string;
|
|
216
248
|
title: string;
|
|
249
|
+
filter?: ((args_0: string, ...args: unknown[]) => boolean) | undefined;
|
|
217
250
|
}, {
|
|
218
251
|
url: string;
|
|
219
252
|
title: string;
|
|
253
|
+
filter?: ((args_0: string, ...args: unknown[]) => boolean) | undefined;
|
|
220
254
|
}>;
|
|
221
255
|
/** A preview of the entry. This may contain sanitized HTML. */
|
|
222
256
|
preview: z.ZodOptional<z.ZodString>;
|
|
@@ -227,6 +261,7 @@ declare const ResultSchema: z.ZodArray<z.ZodObject<{
|
|
|
227
261
|
source: {
|
|
228
262
|
url: string;
|
|
229
263
|
title: string;
|
|
264
|
+
filter?: ((args_0: string, ...args: unknown[]) => boolean) | undefined;
|
|
230
265
|
};
|
|
231
266
|
preview?: string | undefined;
|
|
232
267
|
}, {
|
|
@@ -236,6 +271,7 @@ declare const ResultSchema: z.ZodArray<z.ZodObject<{
|
|
|
236
271
|
source: {
|
|
237
272
|
url: string;
|
|
238
273
|
title: string;
|
|
274
|
+
filter?: ((args_0: string, ...args: unknown[]) => boolean) | undefined;
|
|
239
275
|
};
|
|
240
276
|
preview?: string | undefined;
|
|
241
277
|
}>, "many">;
|
|
@@ -258,12 +294,16 @@ export declare const CacheEntrySchema: z.ZodObject<{
|
|
|
258
294
|
url: z.ZodString;
|
|
259
295
|
/** A title to describe the feed */
|
|
260
296
|
title: z.ZodString;
|
|
297
|
+
/** Takes a entry preview and returns whether or not it should be displayed */
|
|
298
|
+
filter: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodBoolean>>;
|
|
261
299
|
}, "strip", z.ZodTypeAny, {
|
|
262
300
|
url: string;
|
|
263
301
|
title: string;
|
|
302
|
+
filter?: ((args_0: string, ...args: unknown[]) => boolean) | undefined;
|
|
264
303
|
}, {
|
|
265
304
|
url: string;
|
|
266
305
|
title: string;
|
|
306
|
+
filter?: ((args_0: string, ...args: unknown[]) => boolean) | undefined;
|
|
267
307
|
}>;
|
|
268
308
|
/** A preview of the entry. This may contain sanitized HTML. */
|
|
269
309
|
preview: z.ZodOptional<z.ZodString>;
|
|
@@ -274,6 +314,7 @@ export declare const CacheEntrySchema: z.ZodObject<{
|
|
|
274
314
|
source: {
|
|
275
315
|
url: string;
|
|
276
316
|
title: string;
|
|
317
|
+
filter?: ((args_0: string, ...args: unknown[]) => boolean) | undefined;
|
|
277
318
|
};
|
|
278
319
|
preview?: string | undefined;
|
|
279
320
|
}, {
|
|
@@ -283,6 +324,7 @@ export declare const CacheEntrySchema: z.ZodObject<{
|
|
|
283
324
|
source: {
|
|
284
325
|
url: string;
|
|
285
326
|
title: string;
|
|
327
|
+
filter?: ((args_0: string, ...args: unknown[]) => boolean) | undefined;
|
|
286
328
|
};
|
|
287
329
|
preview?: string | undefined;
|
|
288
330
|
}>;
|
|
@@ -295,6 +337,7 @@ export declare const CacheEntrySchema: z.ZodObject<{
|
|
|
295
337
|
source: {
|
|
296
338
|
url: string;
|
|
297
339
|
title: string;
|
|
340
|
+
filter?: ((args_0: string, ...args: unknown[]) => boolean) | undefined;
|
|
298
341
|
};
|
|
299
342
|
preview?: string | undefined;
|
|
300
343
|
};
|
|
@@ -307,6 +350,7 @@ export declare const CacheEntrySchema: z.ZodObject<{
|
|
|
307
350
|
source: {
|
|
308
351
|
url: string;
|
|
309
352
|
title: string;
|
|
353
|
+
filter?: ((args_0: string, ...args: unknown[]) => boolean) | undefined;
|
|
310
354
|
};
|
|
311
355
|
preview?: string | undefined;
|
|
312
356
|
};
|
|
@@ -330,12 +374,16 @@ export declare const CacheSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
330
374
|
url: z.ZodString;
|
|
331
375
|
/** A title to describe the feed */
|
|
332
376
|
title: z.ZodString;
|
|
377
|
+
/** Takes a entry preview and returns whether or not it should be displayed */
|
|
378
|
+
filter: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodBoolean>>;
|
|
333
379
|
}, "strip", z.ZodTypeAny, {
|
|
334
380
|
url: string;
|
|
335
381
|
title: string;
|
|
382
|
+
filter?: ((args_0: string, ...args: unknown[]) => boolean) | undefined;
|
|
336
383
|
}, {
|
|
337
384
|
url: string;
|
|
338
385
|
title: string;
|
|
386
|
+
filter?: ((args_0: string, ...args: unknown[]) => boolean) | undefined;
|
|
339
387
|
}>;
|
|
340
388
|
/** A preview of the entry. This may contain sanitized HTML. */
|
|
341
389
|
preview: z.ZodOptional<z.ZodString>;
|
|
@@ -346,6 +394,7 @@ export declare const CacheSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
346
394
|
source: {
|
|
347
395
|
url: string;
|
|
348
396
|
title: string;
|
|
397
|
+
filter?: ((args_0: string, ...args: unknown[]) => boolean) | undefined;
|
|
349
398
|
};
|
|
350
399
|
preview?: string | undefined;
|
|
351
400
|
}, {
|
|
@@ -355,6 +404,7 @@ export declare const CacheSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
355
404
|
source: {
|
|
356
405
|
url: string;
|
|
357
406
|
title: string;
|
|
407
|
+
filter?: ((args_0: string, ...args: unknown[]) => boolean) | undefined;
|
|
358
408
|
};
|
|
359
409
|
preview?: string | undefined;
|
|
360
410
|
}>;
|
|
@@ -367,6 +417,7 @@ export declare const CacheSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
367
417
|
source: {
|
|
368
418
|
url: string;
|
|
369
419
|
title: string;
|
|
420
|
+
filter?: ((args_0: string, ...args: unknown[]) => boolean) | undefined;
|
|
370
421
|
};
|
|
371
422
|
preview?: string | undefined;
|
|
372
423
|
};
|
|
@@ -379,6 +430,7 @@ export declare const CacheSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
|
379
430
|
source: {
|
|
380
431
|
url: string;
|
|
381
432
|
title: string;
|
|
433
|
+
filter?: ((args_0: string, ...args: unknown[]) => boolean) | undefined;
|
|
382
434
|
};
|
|
383
435
|
preview?: string | undefined;
|
|
384
436
|
};
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAClD,oBAAoB;AACpB,QAAA,MAAM,YAAY;IAChB,6BAA6B;;I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AmC;;YAhDnC,6BAA6B;;YAE7B,mCAAmC;;YAEnC,8EAA8E;;;;;;;;;;;QA8C9E,+DAA+D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmBZ,CAAC;AAEtD,mDAAmD;AACnD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyBxB,CAAC"}
|
package/dist/types.js
CHANGED
|
@@ -5,6 +5,8 @@ const SourceSchema = z.object({
|
|
|
5
5
|
url: z.string(),
|
|
6
6
|
/** A title to describe the feed */
|
|
7
7
|
title: z.string().describe("A title for the feed"),
|
|
8
|
+
/** Takes a entry preview and returns whether or not it should be displayed */
|
|
9
|
+
filter: z.function().args(z.string()).returns(z.boolean()).optional(),
|
|
8
10
|
});
|
|
9
11
|
/** Configuration for the cache */
|
|
10
12
|
const CacheConfigurationSchema = z.object({
|
|
@@ -23,6 +25,8 @@ const ConfigurationSchema = z.object({
|
|
|
23
25
|
truncate: z.number().default(300),
|
|
24
26
|
/** Configuration for the cache */
|
|
25
27
|
cache: CacheConfigurationSchema.optional(),
|
|
28
|
+
/** Randomize the output order */
|
|
29
|
+
shuffle: z.boolean().default(false).optional(),
|
|
26
30
|
});
|
|
27
31
|
/** A configuration object with caching definitely configured */
|
|
28
32
|
export const CachedConfigurationSchema = ConfigurationSchema.extend({
|
|
@@ -43,7 +47,7 @@ const ResultEntrySchema = z.object({
|
|
|
43
47
|
preview: z.string().optional(),
|
|
44
48
|
});
|
|
45
49
|
/** A list of results */
|
|
46
|
-
const ResultSchema = z.array(ResultEntrySchema);
|
|
50
|
+
export const ResultSchema = z.array(ResultEntrySchema);
|
|
47
51
|
/** A single cache entry */
|
|
48
52
|
export const CacheEntrySchema = z.object({
|
|
49
53
|
/** The time a source was last checked */
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"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AEtD,mDAAmD;AACnD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC;KAC7B,MAAM,CAAC;IACN,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IACnC,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IACnC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACxC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACnC,CAAC;KACD,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE;IACnB,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC;IAC5C,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;IACjD,CAAC;IACD,OAAO;QACL,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,IAAI;QACJ,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,cAAc,EAAE,KAAK,CAAC,cAAc;QACpC,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,iBAAiB,EAAE,KAAK,CAAC,iBAAiB,CAAC;KAC5C,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"url": "https://github.com/shepherdjerred/webring/issues"
|
|
17
17
|
},
|
|
18
18
|
"type": "module",
|
|
19
|
-
"version": "1.
|
|
19
|
+
"version": "1.2.2",
|
|
20
20
|
"scripts": {
|
|
21
21
|
"prepare": "husky",
|
|
22
|
-
"lint": "eslint src",
|
|
22
|
+
"lint": "eslint src --cache",
|
|
23
23
|
"build": "tsc",
|
|
24
24
|
"watch": "tsc -w",
|
|
25
25
|
"test": "vitest --disable-console-intercept",
|
|
@@ -28,33 +28,38 @@
|
|
|
28
28
|
"main": "dist/index.js",
|
|
29
29
|
"types": "dist/index.d.ts",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"remeda": "^2.
|
|
31
|
+
"remeda": "^2.12.1",
|
|
32
32
|
"rss-parser": "^3.13.0",
|
|
33
33
|
"sanitize-html": "^2.13.0",
|
|
34
|
-
"truncate-html": "^1.1.
|
|
34
|
+
"truncate-html": "^1.1.2",
|
|
35
35
|
"zod": "^3.23.8"
|
|
36
36
|
},
|
|
37
|
+
"overrides": {
|
|
38
|
+
"truncate-html": {
|
|
39
|
+
"cheerio": "1.0.0-rc.12"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
37
42
|
"devDependencies": {
|
|
38
|
-
"@commitlint/cli": "^19.
|
|
39
|
-
"@commitlint/config-conventional": "^19.
|
|
40
|
-
"@eslint/js": "^9.
|
|
43
|
+
"@commitlint/cli": "^19.5.0",
|
|
44
|
+
"@commitlint/config-conventional": "^19.5.0",
|
|
45
|
+
"@eslint/js": "^9.10.0",
|
|
41
46
|
"@tsconfig/node20": "^20.1.4",
|
|
42
47
|
"@tsconfig/strictest": "^2.0.5",
|
|
48
|
+
"@types/eslint__js": "^8.42.3",
|
|
43
49
|
"@types/express": "^4.17.21",
|
|
44
|
-
"@types/node": "^
|
|
45
|
-
"@types/sanitize-html": "^2.
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"lint-staged": "^15.2.7",
|
|
50
|
+
"@types/node": "^22.5.4",
|
|
51
|
+
"@types/sanitize-html": "^2.13.0",
|
|
52
|
+
"eslint": "^9.10.0",
|
|
53
|
+
"express": "^4.21.0",
|
|
54
|
+
"globals": "^15.9.0",
|
|
55
|
+
"husky": "^9.1.6",
|
|
56
|
+
"lint-staged": "^15.2.10",
|
|
52
57
|
"prettier": "^3.3.3",
|
|
53
|
-
"typedoc": "^0.26.
|
|
54
|
-
"typedoc-plugin-zod": "^1.2.
|
|
55
|
-
"typescript": "^5.
|
|
56
|
-
"typescript-eslint": "^
|
|
57
|
-
"vitest": "^2.
|
|
58
|
+
"typedoc": "^0.26.7",
|
|
59
|
+
"typedoc-plugin-zod": "^1.2.1",
|
|
60
|
+
"typescript": "^5.6.2",
|
|
61
|
+
"typescript-eslint": "^8.5.0",
|
|
62
|
+
"vitest": "^2.1.1"
|
|
58
63
|
},
|
|
59
64
|
"lint-staged": {
|
|
60
65
|
"*.{ts,tsx}": "eslint --cache --fix",
|
package/src/cache.ts
CHANGED
|
@@ -11,14 +11,14 @@ import {
|
|
|
11
11
|
} from "./types.js";
|
|
12
12
|
import { fetch } from "./fetch.js";
|
|
13
13
|
import { asyncMapFilterUndefined } from "./util.js";
|
|
14
|
-
import fs from "fs/promises";
|
|
14
|
+
import * as fs from "fs/promises";
|
|
15
15
|
|
|
16
16
|
async function loadCache({ cache_file }: CacheConfiguration): Promise<Cache> {
|
|
17
17
|
try {
|
|
18
18
|
await fs.access(cache_file);
|
|
19
19
|
const cacheFile = await fs.readFile(cache_file);
|
|
20
20
|
return CacheSchema.parse(JSON.parse(cacheFile.toString()));
|
|
21
|
-
} catch (
|
|
21
|
+
} catch (_e) {
|
|
22
22
|
return {};
|
|
23
23
|
}
|
|
24
24
|
}
|
package/src/index.test.ts
CHANGED
|
@@ -14,6 +14,8 @@ app.listen(port, () => {
|
|
|
14
14
|
console.log(`Test server listening at http://localhost:${port.toString()}`);
|
|
15
15
|
});
|
|
16
16
|
|
|
17
|
+
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
18
|
+
|
|
17
19
|
function createUrl(path: string): string {
|
|
18
20
|
return `http://localhost:${port.toString()}/${path}`;
|
|
19
21
|
}
|
package/src/index.ts
CHANGED
|
@@ -15,14 +15,28 @@ export async function run(config: Configuration): Promise<Result> {
|
|
|
15
15
|
result = await fetchAllUncached(config);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
let results = R.pipe(
|
|
19
19
|
result,
|
|
20
20
|
R.sortBy((result) => result.date.getTime()),
|
|
21
21
|
R.reverse(),
|
|
22
|
-
R.
|
|
22
|
+
R.filter((result) => {
|
|
23
|
+
if (result.source.filter && result.preview) {
|
|
24
|
+
return result.source.filter(result.preview);
|
|
25
|
+
} else {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
}),
|
|
23
29
|
);
|
|
24
30
|
|
|
25
|
-
|
|
31
|
+
// shuffle if wanted
|
|
32
|
+
if (config.shuffle) {
|
|
33
|
+
results = R.shuffle(results);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// take n
|
|
37
|
+
results = R.take(results, config.number);
|
|
38
|
+
|
|
39
|
+
return results;
|
|
26
40
|
}
|
|
27
41
|
|
|
28
42
|
export * from "./types.js";
|
package/src/types.ts
CHANGED
|
@@ -7,6 +7,8 @@ const SourceSchema = z.object({
|
|
|
7
7
|
url: z.string(),
|
|
8
8
|
/** A title to describe the feed */
|
|
9
9
|
title: z.string().describe("A title for the feed"),
|
|
10
|
+
/** Takes a entry preview and returns whether or not it should be displayed */
|
|
11
|
+
filter: z.function().args(z.string()).returns(z.boolean()).optional(),
|
|
10
12
|
});
|
|
11
13
|
|
|
12
14
|
export type CacheConfiguration = z.infer<typeof CacheConfigurationSchema>;
|
|
@@ -29,6 +31,8 @@ const ConfigurationSchema = z.object({
|
|
|
29
31
|
truncate: z.number().default(300),
|
|
30
32
|
/** Configuration for the cache */
|
|
31
33
|
cache: CacheConfigurationSchema.optional(),
|
|
34
|
+
/** Randomize the output order */
|
|
35
|
+
shuffle: z.boolean().default(false).optional(),
|
|
32
36
|
});
|
|
33
37
|
|
|
34
38
|
export type CachedConfiguration = z.infer<typeof CachedConfigurationSchema>;
|
|
@@ -55,7 +59,7 @@ const ResultEntrySchema = z.object({
|
|
|
55
59
|
|
|
56
60
|
export type Result = z.infer<typeof ResultSchema>;
|
|
57
61
|
/** A list of results */
|
|
58
|
-
const ResultSchema = z.array(ResultEntrySchema);
|
|
62
|
+
export const ResultSchema = z.array(ResultEntrySchema);
|
|
59
63
|
|
|
60
64
|
export type CacheEntry = z.infer<typeof CacheEntrySchema>;
|
|
61
65
|
/** A single cache entry */
|