feedsmith 2.9.5 → 2.9.6
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/dist/common/parse.d.cts +0 -1
- package/dist/common/parse.d.ts +0 -1
- package/dist/common/types.d.cts +3 -3
- package/dist/common/types.d.ts +3 -3
- package/dist/common/utils.cjs +0 -21
- package/dist/common/utils.js +1 -21
- package/dist/feeds/atom/common/types.d.cts +0 -1
- package/dist/feeds/atom/common/types.d.ts +0 -1
- package/dist/feeds/atom/generate/index.d.cts +0 -1
- package/dist/feeds/atom/generate/index.d.ts +0 -1
- package/dist/feeds/atom/parse/config.cjs +1 -5
- package/dist/feeds/atom/parse/config.js +2 -6
- package/dist/feeds/atom/parse/index.d.cts +0 -1
- package/dist/feeds/atom/parse/index.d.ts +0 -1
- package/dist/feeds/json/common/types.d.cts +0 -1
- package/dist/feeds/json/common/types.d.ts +0 -1
- package/dist/feeds/json/generate/index.d.cts +0 -1
- package/dist/feeds/json/generate/index.d.ts +0 -1
- package/dist/feeds/json/parse/index.d.cts +0 -1
- package/dist/feeds/json/parse/index.d.ts +0 -1
- package/dist/feeds/rdf/common/types.d.cts +0 -1
- package/dist/feeds/rdf/common/types.d.ts +0 -1
- package/dist/feeds/rdf/parse/config.cjs +1 -6
- package/dist/feeds/rdf/parse/config.js +2 -7
- package/dist/feeds/rdf/parse/index.d.cts +0 -1
- package/dist/feeds/rdf/parse/index.d.ts +0 -1
- package/dist/feeds/rss/common/types.d.cts +0 -1
- package/dist/feeds/rss/common/types.d.ts +0 -1
- package/dist/feeds/rss/generate/index.d.cts +0 -1
- package/dist/feeds/rss/generate/index.d.ts +0 -1
- package/dist/feeds/rss/parse/config.cjs +1 -6
- package/dist/feeds/rss/parse/config.js +2 -7
- package/dist/feeds/rss/parse/index.d.cts +0 -1
- package/dist/feeds/rss/parse/index.d.ts +0 -1
- package/dist/index.d.cts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/namespaces/app/common/types.d.cts +0 -1
- package/dist/namespaces/app/common/types.d.ts +0 -1
- package/dist/namespaces/atom/common/types.d.cts +0 -1
- package/dist/namespaces/atom/common/types.d.ts +0 -1
- package/dist/namespaces/dc/common/types.d.cts +30 -16
- package/dist/namespaces/dc/common/types.d.ts +30 -16
- package/dist/namespaces/dcterms/common/types.d.cts +110 -56
- package/dist/namespaces/dcterms/common/types.d.ts +110 -56
- package/dist/namespaces/itunes/common/types.d.cts +14 -7
- package/dist/namespaces/itunes/common/types.d.ts +14 -7
- package/dist/namespaces/media/common/types.d.cts +2 -1
- package/dist/namespaces/media/common/types.d.ts +2 -1
- package/dist/namespaces/podcast/common/types.d.cts +12 -7
- package/dist/namespaces/podcast/common/types.d.ts +12 -7
- package/dist/namespaces/prism/common/types.d.cts +16 -9
- package/dist/namespaces/prism/common/types.d.ts +16 -9
- package/dist/namespaces/rawvoice/common/types.d.cts +0 -1
- package/dist/namespaces/rawvoice/common/types.d.ts +0 -1
- package/dist/namespaces/sy/common/types.d.cts +0 -1
- package/dist/namespaces/sy/common/types.d.ts +0 -1
- package/dist/namespaces/thr/common/types.d.cts +0 -1
- package/dist/namespaces/thr/common/types.d.ts +0 -1
- package/dist/opml/common/types.d.cts +0 -1
- package/dist/opml/common/types.d.ts +0 -1
- package/dist/opml/generate/index.d.cts +0 -1
- package/dist/opml/generate/index.d.ts +0 -1
- package/dist/opml/parse/index.d.cts +0 -1
- package/dist/opml/parse/index.d.ts +0 -1
- package/package.json +5 -6
package/dist/common/parse.d.cts
CHANGED
|
@@ -3,7 +3,6 @@ import { Atom } from "../feeds/atom/common/types.cjs";
|
|
|
3
3
|
import { Json } from "../feeds/json/common/types.cjs";
|
|
4
4
|
import { Rdf } from "../feeds/rdf/common/types.cjs";
|
|
5
5
|
import { Rss } from "../feeds/rss/common/types.cjs";
|
|
6
|
-
|
|
7
6
|
//#region src/common/parse.d.ts
|
|
8
7
|
type Parse = (value: unknown, options?: ParseOptions) => {
|
|
9
8
|
format: 'rss';
|
package/dist/common/parse.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { Atom } from "../feeds/atom/common/types.js";
|
|
|
3
3
|
import { Json } from "../feeds/json/common/types.js";
|
|
4
4
|
import { Rdf } from "../feeds/rdf/common/types.js";
|
|
5
5
|
import { Rss } from "../feeds/rss/common/types.js";
|
|
6
|
-
|
|
7
6
|
//#region src/common/parse.d.ts
|
|
8
7
|
type Parse = (value: unknown, options?: ParseOptions) => {
|
|
9
8
|
format: 'rss';
|
package/dist/common/types.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
//#region src/common/types.d.ts
|
|
2
2
|
type DateLike = Date | string;
|
|
3
|
-
type ExtraFields<F extends ReadonlyArray<string>, V = unknown> = { [K in F[number]]?: V };
|
|
3
|
+
type ExtraFields<F extends ReadonlyArray<string>, V = unknown> = { [K in F[number]]?: V; };
|
|
4
4
|
type IsPlainObject<T> = T extends Array<unknown> ? false : T extends ((...args: Array<unknown>) => unknown) ? false : T extends Date ? false : T extends object ? T extends null ? false : true : false;
|
|
5
5
|
type RemoveUndefined<T> = T extends undefined ? never : T;
|
|
6
|
-
type DeepPartial<T> = IsPlainObject<T> extends true ? { [P in keyof T]?: DeepPartial<RemoveUndefined<T[P]
|
|
7
|
-
type DeepOmit<T, K extends string> = T extends Array<infer U> ? Array<DeepOmit<U, K>> : IsPlainObject<T> extends true ? Pick<{ [P in keyof T]: DeepOmit<T[P], K
|
|
6
|
+
type DeepPartial<T> = IsPlainObject<T> extends true ? { [P in keyof T]?: DeepPartial<RemoveUndefined<T[P]>>; } : T extends Array<infer U> ? Array<DeepPartial<U>> : T;
|
|
7
|
+
type DeepOmit<T, K extends string> = T extends Array<infer U> ? Array<DeepOmit<U, K>> : IsPlainObject<T> extends true ? Pick<{ [P in keyof T]: DeepOmit<T[P], K>; }, Exclude<keyof T, K>> : T;
|
|
8
8
|
type ParseOptions = {
|
|
9
9
|
maxItems?: number;
|
|
10
10
|
};
|
package/dist/common/types.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
//#region src/common/types.d.ts
|
|
2
2
|
type DateLike = Date | string;
|
|
3
|
-
type ExtraFields<F extends ReadonlyArray<string>, V = unknown> = { [K in F[number]]?: V };
|
|
3
|
+
type ExtraFields<F extends ReadonlyArray<string>, V = unknown> = { [K in F[number]]?: V; };
|
|
4
4
|
type IsPlainObject<T> = T extends Array<unknown> ? false : T extends ((...args: Array<unknown>) => unknown) ? false : T extends Date ? false : T extends object ? T extends null ? false : true : false;
|
|
5
5
|
type RemoveUndefined<T> = T extends undefined ? never : T;
|
|
6
|
-
type DeepPartial<T> = IsPlainObject<T> extends true ? { [P in keyof T]?: DeepPartial<RemoveUndefined<T[P]
|
|
7
|
-
type DeepOmit<T, K extends string> = T extends Array<infer U> ? Array<DeepOmit<U, K>> : IsPlainObject<T> extends true ? Pick<{ [P in keyof T]: DeepOmit<T[P], K
|
|
6
|
+
type DeepPartial<T> = IsPlainObject<T> extends true ? { [P in keyof T]?: DeepPartial<RemoveUndefined<T[P]>>; } : T extends Array<infer U> ? Array<DeepPartial<U>> : T;
|
|
7
|
+
type DeepOmit<T, K extends string> = T extends Array<infer U> ? Array<DeepOmit<U, K>> : IsPlainObject<T> extends true ? Pick<{ [P in keyof T]: DeepOmit<T[P], K>; }, Exclude<keyof T, K>> : T;
|
|
8
8
|
type ParseOptions = {
|
|
9
9
|
maxItems?: number;
|
|
10
10
|
};
|
package/dist/common/utils.cjs
CHANGED
|
@@ -425,30 +425,9 @@ const parseJsonObject = (value) => {
|
|
|
425
425
|
return JSON.parse(value);
|
|
426
426
|
} catch {}
|
|
427
427
|
};
|
|
428
|
-
const namespaceContainers = [
|
|
429
|
-
"media:group",
|
|
430
|
-
"media:content",
|
|
431
|
-
"media:group.media:content",
|
|
432
|
-
"media:embed",
|
|
433
|
-
"podcast:liveitem",
|
|
434
|
-
"itunes:owner"
|
|
435
|
-
];
|
|
436
|
-
const expandStopNodes = (stopNodes, feedContainerPaths) => {
|
|
437
|
-
const set = /* @__PURE__ */ new Set();
|
|
438
|
-
for (const node of stopNodes) {
|
|
439
|
-
const suffix = node.slice(2);
|
|
440
|
-
const prefix = suffix.split(":")[0];
|
|
441
|
-
for (const feedPath of feedContainerPaths) {
|
|
442
|
-
set.add(`${feedPath}.${suffix}`);
|
|
443
|
-
for (const nsContainer of namespaceContainers) if (nsContainer.split(":")[0] === prefix) set.add(`${feedPath}.${nsContainer}.${suffix}`);
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
return [...set];
|
|
447
|
-
};
|
|
448
428
|
//#endregion
|
|
449
429
|
exports.createNamespaceNormalizator = createNamespaceNormalizator;
|
|
450
430
|
exports.detectNamespaces = detectNamespaces;
|
|
451
|
-
exports.expandStopNodes = expandStopNodes;
|
|
452
431
|
exports.generateArrayOrSingular = generateArrayOrSingular;
|
|
453
432
|
exports.generateBoolean = generateBoolean;
|
|
454
433
|
exports.generateCdataString = generateCdataString;
|
package/dist/common/utils.js
CHANGED
|
@@ -425,25 +425,5 @@ const parseJsonObject = (value) => {
|
|
|
425
425
|
return JSON.parse(value);
|
|
426
426
|
} catch {}
|
|
427
427
|
};
|
|
428
|
-
const namespaceContainers = [
|
|
429
|
-
"media:group",
|
|
430
|
-
"media:content",
|
|
431
|
-
"media:group.media:content",
|
|
432
|
-
"media:embed",
|
|
433
|
-
"podcast:liveitem",
|
|
434
|
-
"itunes:owner"
|
|
435
|
-
];
|
|
436
|
-
const expandStopNodes = (stopNodes, feedContainerPaths) => {
|
|
437
|
-
const set = /* @__PURE__ */ new Set();
|
|
438
|
-
for (const node of stopNodes) {
|
|
439
|
-
const suffix = node.slice(2);
|
|
440
|
-
const prefix = suffix.split(":")[0];
|
|
441
|
-
for (const feedPath of feedContainerPaths) {
|
|
442
|
-
set.add(`${feedPath}.${suffix}`);
|
|
443
|
-
for (const nsContainer of namespaceContainers) if (nsContainer.split(":")[0] === prefix) set.add(`${feedPath}.${nsContainer}.${suffix}`);
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
return [...set];
|
|
447
|
-
};
|
|
448
428
|
//#endregion
|
|
449
|
-
export { createNamespaceNormalizator, detectNamespaces,
|
|
429
|
+
export { createNamespaceNormalizator, detectNamespaces, generateArrayOrSingular, generateBoolean, generateCdataString, generateCsvOf, generateNamespaceAttrs, generateNumber, generatePlainString, generateRdfResource, generateRfc3339Date, generateRfc822Date, generateSingularOrArray, generateTextOrCdataString, generateXml, generateXmlStylesheet, generateYesNoBoolean, hasEntities, isNonEmptyString, isNonEmptyStringOrNumber, isObject, isPresent, limitArray, parseArray, parseArrayOf, parseBoolean, parseCsvOf, parseDate, parseJsonObject, parseJsonString, parseNumber, parseSingular, parseSingularOf, parseString, parseYesNoBoolean, retrieveRdfResourceOrText, retrieveText, trimArray, trimObject };
|
|
@@ -20,7 +20,6 @@ import { ThrNs } from "../../../namespaces/thr/common/types.cjs";
|
|
|
20
20
|
import { TrackbackNs } from "../../../namespaces/trackback/common/types.cjs";
|
|
21
21
|
import { WfwNs } from "../../../namespaces/wfw/common/types.cjs";
|
|
22
22
|
import { YtNs } from "../../../namespaces/yt/common/types.cjs";
|
|
23
|
-
|
|
24
23
|
//#region src/feeds/atom/common/types.d.ts
|
|
25
24
|
declare namespace Atom {
|
|
26
25
|
type Text = string;
|
|
@@ -20,7 +20,6 @@ import { ThrNs } from "../../../namespaces/thr/common/types.js";
|
|
|
20
20
|
import { TrackbackNs } from "../../../namespaces/trackback/common/types.js";
|
|
21
21
|
import { WfwNs } from "../../../namespaces/wfw/common/types.js";
|
|
22
22
|
import { YtNs } from "../../../namespaces/yt/common/types.js";
|
|
23
|
-
|
|
24
23
|
//#region src/feeds/atom/common/types.d.ts
|
|
25
24
|
declare namespace Atom {
|
|
26
25
|
type Text = string;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DateLike, DeepPartial, XmlGenerateMain } from "../../../common/types.cjs";
|
|
2
2
|
import { Atom } from "../common/types.cjs";
|
|
3
|
-
|
|
4
3
|
//#region src/feeds/atom/generate/index.d.ts
|
|
5
4
|
declare const generate: XmlGenerateMain<Atom.Feed<Date>, DeepPartial<Atom.Feed<DateLike>>>;
|
|
6
5
|
//#endregion
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DateLike, DeepPartial, XmlGenerateMain } from "../../../common/types.js";
|
|
2
2
|
import { Atom } from "../common/types.js";
|
|
3
|
-
|
|
4
3
|
//#region src/feeds/atom/generate/index.d.ts
|
|
5
4
|
declare const generate: XmlGenerateMain<Atom.Feed<Date>, DeepPartial<Atom.Feed<DateLike>>>;
|
|
6
5
|
//#endregion
|
|
@@ -3,11 +3,7 @@ const require_utils = require("../../../common/utils.cjs");
|
|
|
3
3
|
let fast_xml_parser = require("fast-xml-parser");
|
|
4
4
|
//#region src/feeds/atom/parse/config.ts
|
|
5
5
|
const stopNodes = [
|
|
6
|
-
...
|
|
7
|
-
"feed",
|
|
8
|
-
"feed.entry",
|
|
9
|
-
"feed.entry.source"
|
|
10
|
-
]),
|
|
6
|
+
...require_config.namespaceStopNodes,
|
|
11
7
|
"feed.author.name",
|
|
12
8
|
"feed.author.uri",
|
|
13
9
|
"feed.author.url",
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { namespacePrefixes, namespaceStopNodes, namespaceUris, parserConfig } from "../../../common/config.js";
|
|
2
|
-
import { createNamespaceNormalizator
|
|
2
|
+
import { createNamespaceNormalizator } from "../../../common/utils.js";
|
|
3
3
|
import { XMLParser } from "fast-xml-parser";
|
|
4
4
|
//#region src/feeds/atom/parse/config.ts
|
|
5
5
|
const stopNodes = [
|
|
6
|
-
...
|
|
7
|
-
"feed",
|
|
8
|
-
"feed.entry",
|
|
9
|
-
"feed.entry.source"
|
|
10
|
-
]),
|
|
6
|
+
...namespaceStopNodes,
|
|
11
7
|
"feed.author.name",
|
|
12
8
|
"feed.author.uri",
|
|
13
9
|
"feed.author.url",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DeepPartial, ParseOptions } from "../../../common/types.cjs";
|
|
2
2
|
import { Atom } from "../common/types.cjs";
|
|
3
|
-
|
|
4
3
|
//#region src/feeds/atom/parse/index.d.ts
|
|
5
4
|
declare const parse: (value: unknown, options?: ParseOptions) => DeepPartial<Atom.Feed<string>>;
|
|
6
5
|
//#endregion
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DeepPartial, ParseOptions } from "../../../common/types.js";
|
|
2
2
|
import { Atom } from "../common/types.js";
|
|
3
|
-
|
|
4
3
|
//#region src/feeds/atom/parse/index.d.ts
|
|
5
4
|
declare const parse: (value: unknown, options?: ParseOptions) => DeepPartial<Atom.Feed<string>>;
|
|
6
5
|
//#endregion
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DateLike, DeepPartial, JsonGenerateMain } from "../../../common/types.cjs";
|
|
2
2
|
import { Json } from "../common/types.cjs";
|
|
3
|
-
|
|
4
3
|
//#region src/feeds/json/generate/index.d.ts
|
|
5
4
|
declare const generate: JsonGenerateMain<Json.Feed<Date>, DeepPartial<Json.Feed<DateLike>>>;
|
|
6
5
|
//#endregion
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DateLike, DeepPartial, JsonGenerateMain } from "../../../common/types.js";
|
|
2
2
|
import { Json } from "../common/types.js";
|
|
3
|
-
|
|
4
3
|
//#region src/feeds/json/generate/index.d.ts
|
|
5
4
|
declare const generate: JsonGenerateMain<Json.Feed<Date>, DeepPartial<Json.Feed<DateLike>>>;
|
|
6
5
|
//#endregion
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DeepPartial, ParseOptions } from "../../../common/types.cjs";
|
|
2
2
|
import { Json } from "../common/types.cjs";
|
|
3
|
-
|
|
4
3
|
//#region src/feeds/json/parse/index.d.ts
|
|
5
4
|
declare const parse: (value: unknown, options?: ParseOptions) => DeepPartial<Json.Feed<string>>;
|
|
6
5
|
//#endregion
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DeepPartial, ParseOptions } from "../../../common/types.js";
|
|
2
2
|
import { Json } from "../common/types.js";
|
|
3
|
-
|
|
4
3
|
//#region src/feeds/json/parse/index.d.ts
|
|
5
4
|
declare const parse: (value: unknown, options?: ParseOptions) => DeepPartial<Json.Feed<string>>;
|
|
6
5
|
//#endregion
|
|
@@ -10,7 +10,6 @@ import { WfwNs } from "../../../namespaces/wfw/common/types.cjs";
|
|
|
10
10
|
import { AtomNs } from "../../../namespaces/atom/common/types.cjs";
|
|
11
11
|
import { ContentNs } from "../../../namespaces/content/common/types.cjs";
|
|
12
12
|
import { RdfNs } from "../../../namespaces/rdf/common/types.cjs";
|
|
13
|
-
|
|
14
13
|
//#region src/feeds/rdf/common/types.d.ts
|
|
15
14
|
declare namespace Rdf {
|
|
16
15
|
type Image = {
|
|
@@ -10,7 +10,6 @@ import { WfwNs } from "../../../namespaces/wfw/common/types.js";
|
|
|
10
10
|
import { AtomNs } from "../../../namespaces/atom/common/types.js";
|
|
11
11
|
import { ContentNs } from "../../../namespaces/content/common/types.js";
|
|
12
12
|
import { RdfNs } from "../../../namespaces/rdf/common/types.js";
|
|
13
|
-
|
|
14
13
|
//#region src/feeds/rdf/common/types.d.ts
|
|
15
14
|
declare namespace Rdf {
|
|
16
15
|
type Image = {
|
|
@@ -3,12 +3,7 @@ const require_utils = require("../../../common/utils.cjs");
|
|
|
3
3
|
let fast_xml_parser = require("fast-xml-parser");
|
|
4
4
|
//#region src/feeds/rdf/parse/config.ts
|
|
5
5
|
const stopNodes = [
|
|
6
|
-
...
|
|
7
|
-
"rdf:rdf.channel",
|
|
8
|
-
"rdf:rdf.item",
|
|
9
|
-
"rdf:rdf.image",
|
|
10
|
-
"rdf:rdf.textinput"
|
|
11
|
-
]),
|
|
6
|
+
...require_config.namespaceStopNodes,
|
|
12
7
|
"rdf:rdf.channel.title",
|
|
13
8
|
"rdf:rdf.channel.link",
|
|
14
9
|
"rdf:rdf.channel.description",
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import { namespacePrefixes, namespaceStopNodes, namespaceUris, parserConfig } from "../../../common/config.js";
|
|
2
|
-
import { createNamespaceNormalizator
|
|
2
|
+
import { createNamespaceNormalizator } from "../../../common/utils.js";
|
|
3
3
|
import { XMLParser } from "fast-xml-parser";
|
|
4
4
|
//#region src/feeds/rdf/parse/config.ts
|
|
5
5
|
const stopNodes = [
|
|
6
|
-
...
|
|
7
|
-
"rdf:rdf.channel",
|
|
8
|
-
"rdf:rdf.item",
|
|
9
|
-
"rdf:rdf.image",
|
|
10
|
-
"rdf:rdf.textinput"
|
|
11
|
-
]),
|
|
6
|
+
...namespaceStopNodes,
|
|
12
7
|
"rdf:rdf.channel.title",
|
|
13
8
|
"rdf:rdf.channel.link",
|
|
14
9
|
"rdf:rdf.channel.description",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DeepPartial, ParseOptions } from "../../../common/types.cjs";
|
|
2
2
|
import { Rdf } from "../common/types.cjs";
|
|
3
|
-
|
|
4
3
|
//#region src/feeds/rdf/parse/index.d.ts
|
|
5
4
|
declare const parse: (value: unknown, options?: ParseOptions) => DeepPartial<Rdf.Feed<string>>;
|
|
6
5
|
//#endregion
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DeepPartial, ParseOptions } from "../../../common/types.js";
|
|
2
2
|
import { Rdf } from "../common/types.js";
|
|
3
|
-
|
|
4
3
|
//#region src/feeds/rdf/parse/index.d.ts
|
|
5
4
|
declare const parse: (value: unknown, options?: ParseOptions) => DeepPartial<Rdf.Feed<string>>;
|
|
6
5
|
//#endregion
|
|
@@ -27,7 +27,6 @@ import { PrismNs } from "../../../namespaces/prism/common/types.cjs";
|
|
|
27
27
|
import { RawVoiceNs } from "../../../namespaces/rawvoice/common/types.cjs";
|
|
28
28
|
import { SourceNs } from "../../../namespaces/source/common/types.cjs";
|
|
29
29
|
import { SpotifyNs } from "../../../namespaces/spotify/common/types.cjs";
|
|
30
|
-
|
|
31
30
|
//#region src/feeds/rss/common/types.d.ts
|
|
32
31
|
declare namespace Rss {
|
|
33
32
|
/** @internal Intermediary type before Person refactoring. Do not use downstream. */
|
|
@@ -27,7 +27,6 @@ import { PrismNs } from "../../../namespaces/prism/common/types.js";
|
|
|
27
27
|
import { RawVoiceNs } from "../../../namespaces/rawvoice/common/types.js";
|
|
28
28
|
import { SourceNs } from "../../../namespaces/source/common/types.js";
|
|
29
29
|
import { SpotifyNs } from "../../../namespaces/spotify/common/types.js";
|
|
30
|
-
|
|
31
30
|
//#region src/feeds/rss/common/types.d.ts
|
|
32
31
|
declare namespace Rss {
|
|
33
32
|
/** @internal Intermediary type before Person refactoring. Do not use downstream. */
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DateLike, DeepPartial, XmlGenerateMain } from "../../../common/types.cjs";
|
|
2
2
|
import { Rss } from "../common/types.cjs";
|
|
3
|
-
|
|
4
3
|
//#region src/feeds/rss/generate/index.d.ts
|
|
5
4
|
declare const generate: XmlGenerateMain<Rss.Feed<Date, Rss.PersonLike>, DeepPartial<Rss.Feed<DateLike, Rss.PersonLike>>>;
|
|
6
5
|
//#endregion
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DateLike, DeepPartial, XmlGenerateMain } from "../../../common/types.js";
|
|
2
2
|
import { Rss } from "../common/types.js";
|
|
3
|
-
|
|
4
3
|
//#region src/feeds/rss/generate/index.d.ts
|
|
5
4
|
declare const generate: XmlGenerateMain<Rss.Feed<Date, Rss.PersonLike>, DeepPartial<Rss.Feed<DateLike, Rss.PersonLike>>>;
|
|
6
5
|
//#endregion
|
|
@@ -25,12 +25,7 @@ const sharedStopNodes = [
|
|
|
25
25
|
"item.source"
|
|
26
26
|
];
|
|
27
27
|
const stopNodes = [
|
|
28
|
-
...
|
|
29
|
-
"rss.channel",
|
|
30
|
-
"rss.channel.item",
|
|
31
|
-
"rss",
|
|
32
|
-
"rss.item"
|
|
33
|
-
]),
|
|
28
|
+
...require_config.namespaceStopNodes,
|
|
34
29
|
"rss.channel.title",
|
|
35
30
|
"rss.channel.link",
|
|
36
31
|
"rss.channel.description",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { namespacePrefixes, namespaceStopNodes, namespaceUris, parserConfig } from "../../../common/config.js";
|
|
2
|
-
import { createNamespaceNormalizator
|
|
2
|
+
import { createNamespaceNormalizator } from "../../../common/utils.js";
|
|
3
3
|
import { XMLParser } from "fast-xml-parser";
|
|
4
4
|
//#region src/feeds/rss/parse/config.ts
|
|
5
5
|
const sharedStopNodes = [
|
|
@@ -25,12 +25,7 @@ const sharedStopNodes = [
|
|
|
25
25
|
"item.source"
|
|
26
26
|
];
|
|
27
27
|
const stopNodes = [
|
|
28
|
-
...
|
|
29
|
-
"rss.channel",
|
|
30
|
-
"rss.channel.item",
|
|
31
|
-
"rss",
|
|
32
|
-
"rss.item"
|
|
33
|
-
]),
|
|
28
|
+
...namespaceStopNodes,
|
|
34
29
|
"rss.channel.title",
|
|
35
30
|
"rss.channel.link",
|
|
36
31
|
"rss.channel.description",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DeepPartial, ParseOptions } from "../../../common/types.cjs";
|
|
2
2
|
import { Rss } from "../common/types.cjs";
|
|
3
|
-
|
|
4
3
|
//#region src/feeds/rss/parse/index.d.ts
|
|
5
4
|
declare const parse: (value: unknown, options?: ParseOptions) => DeepPartial<Rss.Feed<string>>;
|
|
6
5
|
//#endregion
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DeepPartial, ParseOptions } from "../../../common/types.js";
|
|
2
2
|
import { Rss } from "../common/types.js";
|
|
3
|
-
|
|
4
3
|
//#region src/feeds/rss/parse/index.d.ts
|
|
5
4
|
declare const parse: (value: unknown, options?: ParseOptions) => DeepPartial<Rss.Feed<string>>;
|
|
6
5
|
//#endregion
|
package/dist/index.d.cts
CHANGED
|
@@ -18,7 +18,6 @@ import { generate as generate$3 } from "./feeds/rss/generate/index.cjs";
|
|
|
18
18
|
import { parse as parse$5 } from "./feeds/rss/parse/index.cjs";
|
|
19
19
|
import { generate as generate$2 } from "./opml/generate/index.cjs";
|
|
20
20
|
import { parse as parse$3 } from "./opml/parse/index.cjs";
|
|
21
|
-
|
|
22
21
|
//#region src/index.d.ts
|
|
23
22
|
/** @deprecated Use `import type { Atom } from 'feedsmith/types'` and access as `Atom.Feed` instead. */
|
|
24
23
|
type AtomFeed<TDate extends DateLike> = Atom.Feed<TDate>;
|
package/dist/index.d.ts
CHANGED
|
@@ -18,7 +18,6 @@ import { generate as generate$3 } from "./feeds/rss/generate/index.js";
|
|
|
18
18
|
import { parse as parse$5 } from "./feeds/rss/parse/index.js";
|
|
19
19
|
import { generate as generate$2 } from "./opml/generate/index.js";
|
|
20
20
|
import { parse as parse$3 } from "./opml/parse/index.js";
|
|
21
|
-
|
|
22
21
|
//#region src/index.d.ts
|
|
23
22
|
/** @deprecated Use `import type { Atom } from 'feedsmith/types'` and access as `Atom.Feed` instead. */
|
|
24
23
|
type AtomFeed<TDate extends DateLike> = Atom.Feed<TDate>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DateLike, DeepOmit } from "../../../common/types.cjs";
|
|
2
2
|
import { Atom } from "../../../feeds/atom/common/types.cjs";
|
|
3
|
-
|
|
4
3
|
//#region src/namespaces/atom/common/types.d.ts
|
|
5
4
|
type NsKeys = 'admin' | 'app' | 'arxiv' | 'cc' | 'creativeCommons' | 'dc' | 'dcterms' | 'geo' | 'georss' | 'googleplay' | 'itunes' | 'media' | 'opensearch' | 'pingback' | 'psc' | 'slash' | 'sy' | 'thr' | 'trackback' | 'wfw' | 'yt';
|
|
6
5
|
declare namespace AtomNs {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DateLike, DeepOmit } from "../../../common/types.js";
|
|
2
2
|
import { Atom } from "../../../feeds/atom/common/types.js";
|
|
3
|
-
|
|
4
3
|
//#region src/namespaces/atom/common/types.d.ts
|
|
5
4
|
type NsKeys = 'admin' | 'app' | 'arxiv' | 'cc' | 'creativeCommons' | 'dc' | 'dcterms' | 'geo' | 'georss' | 'googleplay' | 'itunes' | 'media' | 'opensearch' | 'pingback' | 'psc' | 'slash' | 'sy' | 'thr' | 'trackback' | 'wfw' | 'yt';
|
|
6
5
|
declare namespace AtomNs {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DateLike } from "../../../common/types.cjs";
|
|
2
|
-
|
|
3
2
|
//#region src/namespaces/dc/common/types.d.ts
|
|
4
3
|
declare namespace DcNs {
|
|
5
4
|
type ItemOrFeed<TDate extends DateLike> = {
|
|
@@ -15,21 +14,36 @@ declare namespace DcNs {
|
|
|
15
14
|
identifiers?: Array<string>;
|
|
16
15
|
sources?: Array<string>;
|
|
17
16
|
languages?: Array<string>;
|
|
18
|
-
relations?: Array<string>;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
17
|
+
relations?: Array<string>;
|
|
18
|
+
/** @deprecated Use `titles` (array) instead. Dublin Core fields are repeatable. */
|
|
19
|
+
title?: string;
|
|
20
|
+
/** @deprecated Use `creators` (array) instead. Dublin Core fields are repeatable. */
|
|
21
|
+
creator?: string;
|
|
22
|
+
/** @deprecated Use `subjects` (array) instead. Dublin Core fields are repeatable. */
|
|
23
|
+
subject?: string;
|
|
24
|
+
/** @deprecated Use `descriptions` (array) instead. Dublin Core fields are repeatable. */
|
|
25
|
+
description?: string;
|
|
26
|
+
/** @deprecated Use `publishers` (array) instead. Dublin Core fields are repeatable. */
|
|
27
|
+
publisher?: string;
|
|
28
|
+
/** @deprecated Use `contributors` (array) instead. Dublin Core fields are repeatable. */
|
|
29
|
+
contributor?: string;
|
|
30
|
+
/** @deprecated Use `dates` (array) instead. Dublin Core fields are repeatable. */
|
|
31
|
+
date?: TDate;
|
|
32
|
+
/** @deprecated Use `types` (array) instead. Dublin Core fields are repeatable. */
|
|
33
|
+
type?: string;
|
|
34
|
+
/** @deprecated Use `formats` (array) instead. Dublin Core fields are repeatable. */
|
|
35
|
+
format?: string;
|
|
36
|
+
/** @deprecated Use `identifiers` (array) instead. Dublin Core fields are repeatable. */
|
|
37
|
+
identifier?: string;
|
|
38
|
+
/** @deprecated Use `sources` (array) instead. Dublin Core fields are repeatable. */
|
|
39
|
+
source?: string;
|
|
40
|
+
/** @deprecated Use `languages` (array) instead. Dublin Core fields are repeatable. */
|
|
41
|
+
language?: string;
|
|
42
|
+
/** @deprecated Use `relations` (array) instead. Dublin Core fields are repeatable. */
|
|
43
|
+
relation?: string;
|
|
44
|
+
/** @deprecated This field type will be changed to array in the next major version of the package. Dublin Core fields are repeatable. */
|
|
45
|
+
coverage?: string;
|
|
46
|
+
/** @deprecated This field type will be changed to array in the next major version of the package. Dublin Core fields are repeatable. */
|
|
33
47
|
rights?: string;
|
|
34
48
|
};
|
|
35
49
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DateLike } from "../../../common/types.js";
|
|
2
|
-
|
|
3
2
|
//#region src/namespaces/dc/common/types.d.ts
|
|
4
3
|
declare namespace DcNs {
|
|
5
4
|
type ItemOrFeed<TDate extends DateLike> = {
|
|
@@ -15,21 +14,36 @@ declare namespace DcNs {
|
|
|
15
14
|
identifiers?: Array<string>;
|
|
16
15
|
sources?: Array<string>;
|
|
17
16
|
languages?: Array<string>;
|
|
18
|
-
relations?: Array<string>;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
17
|
+
relations?: Array<string>;
|
|
18
|
+
/** @deprecated Use `titles` (array) instead. Dublin Core fields are repeatable. */
|
|
19
|
+
title?: string;
|
|
20
|
+
/** @deprecated Use `creators` (array) instead. Dublin Core fields are repeatable. */
|
|
21
|
+
creator?: string;
|
|
22
|
+
/** @deprecated Use `subjects` (array) instead. Dublin Core fields are repeatable. */
|
|
23
|
+
subject?: string;
|
|
24
|
+
/** @deprecated Use `descriptions` (array) instead. Dublin Core fields are repeatable. */
|
|
25
|
+
description?: string;
|
|
26
|
+
/** @deprecated Use `publishers` (array) instead. Dublin Core fields are repeatable. */
|
|
27
|
+
publisher?: string;
|
|
28
|
+
/** @deprecated Use `contributors` (array) instead. Dublin Core fields are repeatable. */
|
|
29
|
+
contributor?: string;
|
|
30
|
+
/** @deprecated Use `dates` (array) instead. Dublin Core fields are repeatable. */
|
|
31
|
+
date?: TDate;
|
|
32
|
+
/** @deprecated Use `types` (array) instead. Dublin Core fields are repeatable. */
|
|
33
|
+
type?: string;
|
|
34
|
+
/** @deprecated Use `formats` (array) instead. Dublin Core fields are repeatable. */
|
|
35
|
+
format?: string;
|
|
36
|
+
/** @deprecated Use `identifiers` (array) instead. Dublin Core fields are repeatable. */
|
|
37
|
+
identifier?: string;
|
|
38
|
+
/** @deprecated Use `sources` (array) instead. Dublin Core fields are repeatable. */
|
|
39
|
+
source?: string;
|
|
40
|
+
/** @deprecated Use `languages` (array) instead. Dublin Core fields are repeatable. */
|
|
41
|
+
language?: string;
|
|
42
|
+
/** @deprecated Use `relations` (array) instead. Dublin Core fields are repeatable. */
|
|
43
|
+
relation?: string;
|
|
44
|
+
/** @deprecated This field type will be changed to array in the next major version of the package. Dublin Core fields are repeatable. */
|
|
45
|
+
coverage?: string;
|
|
46
|
+
/** @deprecated This field type will be changed to array in the next major version of the package. Dublin Core fields are repeatable. */
|
|
33
47
|
rights?: string;
|
|
34
48
|
};
|
|
35
49
|
}
|