feedsmith 3.0.0-next.1 → 3.0.0-next.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/README.md +1 -0
- package/dist/common/parse.cjs +1 -1
- package/dist/common/parse.js +1 -1
- package/dist/common/utils.cjs +0 -5
- package/dist/common/utils.js +1 -5
- package/dist/feeds/atom/common/types.d.cts +3 -0
- package/dist/feeds/atom/common/types.d.ts +3 -0
- package/dist/feeds/atom/detect/index.cjs +2 -1
- package/dist/feeds/atom/detect/index.js +2 -1
- package/dist/feeds/atom/generate/index.cjs +1 -1
- package/dist/feeds/atom/generate/index.js +1 -1
- package/dist/feeds/atom/generate/utils.cjs +8 -5
- package/dist/feeds/atom/generate/utils.js +5 -2
- package/dist/feeds/atom/parse/index.cjs +1 -1
- package/dist/feeds/atom/parse/index.js +1 -1
- package/dist/feeds/atom/parse/utils.cjs +8 -5
- package/dist/feeds/atom/parse/utils.js +5 -2
- package/dist/feeds/json/parse/index.cjs +1 -1
- package/dist/feeds/json/parse/index.js +1 -1
- package/dist/feeds/rdf/common/types.d.cts +3 -0
- package/dist/feeds/rdf/common/types.d.ts +3 -0
- package/dist/feeds/rdf/detect/index.cjs +13 -2
- package/dist/feeds/rdf/detect/index.js +13 -2
- package/dist/feeds/rdf/parse/index.cjs +1 -1
- package/dist/feeds/rdf/parse/index.js +1 -1
- package/dist/feeds/rdf/parse/utils.cjs +15 -12
- package/dist/feeds/rdf/parse/utils.js +5 -2
- package/dist/feeds/rss/common/types.d.cts +3 -0
- package/dist/feeds/rss/common/types.d.ts +3 -0
- package/dist/feeds/rss/generate/index.cjs +1 -1
- package/dist/feeds/rss/generate/index.js +1 -1
- package/dist/feeds/rss/generate/utils.cjs +31 -28
- package/dist/feeds/rss/generate/utils.js +5 -2
- package/dist/feeds/rss/parse/index.cjs +1 -1
- package/dist/feeds/rss/parse/index.js +1 -1
- package/dist/feeds/rss/parse/utils.cjs +67 -63
- package/dist/feeds/rss/parse/utils.js +51 -47
- package/dist/namespaces/media/common/types.d.cts +0 -2
- package/dist/namespaces/media/common/types.d.ts +0 -2
- package/dist/namespaces/media/generate/utils.cjs +1 -1
- package/dist/namespaces/media/generate/utils.js +2 -2
- package/dist/namespaces/media/parse/utils.cjs +1 -2
- package/dist/namespaces/media/parse/utils.js +1 -2
- package/dist/namespaces/podcast/common/types.d.cts +0 -12
- package/dist/namespaces/podcast/common/types.d.ts +0 -12
- package/dist/namespaces/podcast/generate/utils.cjs +6 -6
- package/dist/namespaces/podcast/generate/utils.js +7 -7
- package/dist/namespaces/podcast/parse/utils.cjs +2 -8
- package/dist/namespaces/podcast/parse/utils.js +2 -8
- package/dist/namespaces/xml/common/types.d.cts +11 -0
- package/dist/namespaces/xml/common/types.d.ts +11 -0
- package/dist/namespaces/xml/generate/utils.cjs +15 -0
- package/dist/namespaces/xml/generate/utils.js +15 -0
- package/dist/namespaces/xml/parse/utils.cjs +15 -0
- package/dist/namespaces/xml/parse/utils.js +15 -0
- package/dist/opml/generate/index.cjs +1 -1
- package/dist/opml/generate/index.js +1 -1
- package/package.json +3 -3
|
@@ -8,16 +8,16 @@ const generateBaseItem = (baseItem) => {
|
|
|
8
8
|
"podcast:chapters": generateChapters(baseItem.chapters),
|
|
9
9
|
"podcast:soundbite": require_utils.trimArray(baseItem.soundbites, generateSoundbite),
|
|
10
10
|
"podcast:person": require_utils.trimArray(baseItem.persons, generatePerson),
|
|
11
|
-
"podcast:location": require_utils.
|
|
11
|
+
"podcast:location": require_utils.trimArray(baseItem.locations, generateLocation),
|
|
12
12
|
"podcast:season": generateSeason(baseItem.season),
|
|
13
13
|
"podcast:episode": generateEpisode(baseItem.episode),
|
|
14
14
|
"podcast:license": generateLicense(baseItem.license),
|
|
15
15
|
"podcast:alternateEnclosure": require_utils.trimArray(baseItem.alternateEnclosures, generateAlternateEnclosure),
|
|
16
|
-
"podcast:value": require_utils.
|
|
16
|
+
"podcast:value": require_utils.trimArray(baseItem.values, generateValue),
|
|
17
17
|
"podcast:image": require_utils.trimArray(baseItem.images, generateImage),
|
|
18
18
|
"podcast:socialInteract": require_utils.trimArray(baseItem.socialInteracts, generateSocialInteract),
|
|
19
19
|
"podcast:txt": require_utils.trimArray(baseItem.txts, generateTxt),
|
|
20
|
-
"podcast:chat":
|
|
20
|
+
"podcast:chat": generateChat(baseItem.chat)
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
const generateTranscript = (transcript) => {
|
|
@@ -276,11 +276,11 @@ const generateFeed = (feed) => {
|
|
|
276
276
|
"podcast:locked": generateLocked(feed.locked),
|
|
277
277
|
"podcast:funding": require_utils.trimArray(feed.fundings, generateFunding),
|
|
278
278
|
"podcast:person": require_utils.trimArray(feed.persons, generatePerson),
|
|
279
|
-
"podcast:location": require_utils.
|
|
279
|
+
"podcast:location": require_utils.trimArray(feed.locations, generateLocation),
|
|
280
280
|
"podcast:trailer": require_utils.trimArray(feed.trailers, generateTrailer),
|
|
281
281
|
"podcast:license": generateLicense(feed.license),
|
|
282
282
|
"podcast:guid": require_utils.generateCdataString(feed.guid),
|
|
283
|
-
"podcast:value": require_utils.
|
|
283
|
+
"podcast:value": require_utils.trimArray(feed.values, generateValue),
|
|
284
284
|
"podcast:medium": require_utils.generateCdataString(feed.medium),
|
|
285
285
|
"podcast:image": require_utils.trimArray(feed.images, generateImage),
|
|
286
286
|
"podcast:liveItem": require_utils.trimArray(feed.liveItems, generateLiveItem),
|
|
@@ -290,7 +290,7 @@ const generateFeed = (feed) => {
|
|
|
290
290
|
"podcast:podroll": generatePodroll(feed.podroll),
|
|
291
291
|
"podcast:updateFrequency": generateUpdateFrequency(feed.updateFrequency),
|
|
292
292
|
"podcast:podping": generatePodping(feed.podping),
|
|
293
|
-
"podcast:chat":
|
|
293
|
+
"podcast:chat": generateChat(feed.chat),
|
|
294
294
|
"podcast:publisher": generatePublisher(feed.publisher)
|
|
295
295
|
});
|
|
296
296
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { generateBoolean, generateCdataString, generateNumber, generatePlainString, generateRfc3339Date, generateRfc822Date, generateTextOrCdataString, generateYesNoBoolean, isObject, trimArray, trimObject } from "../../../common/utils.js";
|
|
2
2
|
|
|
3
3
|
//#region src/namespaces/podcast/generate/utils.ts
|
|
4
4
|
const generateBaseItem = (baseItem) => {
|
|
@@ -8,16 +8,16 @@ const generateBaseItem = (baseItem) => {
|
|
|
8
8
|
"podcast:chapters": generateChapters(baseItem.chapters),
|
|
9
9
|
"podcast:soundbite": trimArray(baseItem.soundbites, generateSoundbite),
|
|
10
10
|
"podcast:person": trimArray(baseItem.persons, generatePerson),
|
|
11
|
-
"podcast:location":
|
|
11
|
+
"podcast:location": trimArray(baseItem.locations, generateLocation),
|
|
12
12
|
"podcast:season": generateSeason(baseItem.season),
|
|
13
13
|
"podcast:episode": generateEpisode(baseItem.episode),
|
|
14
14
|
"podcast:license": generateLicense(baseItem.license),
|
|
15
15
|
"podcast:alternateEnclosure": trimArray(baseItem.alternateEnclosures, generateAlternateEnclosure),
|
|
16
|
-
"podcast:value":
|
|
16
|
+
"podcast:value": trimArray(baseItem.values, generateValue),
|
|
17
17
|
"podcast:image": trimArray(baseItem.images, generateImage),
|
|
18
18
|
"podcast:socialInteract": trimArray(baseItem.socialInteracts, generateSocialInteract),
|
|
19
19
|
"podcast:txt": trimArray(baseItem.txts, generateTxt),
|
|
20
|
-
"podcast:chat":
|
|
20
|
+
"podcast:chat": generateChat(baseItem.chat)
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
const generateTranscript = (transcript) => {
|
|
@@ -276,11 +276,11 @@ const generateFeed = (feed) => {
|
|
|
276
276
|
"podcast:locked": generateLocked(feed.locked),
|
|
277
277
|
"podcast:funding": trimArray(feed.fundings, generateFunding),
|
|
278
278
|
"podcast:person": trimArray(feed.persons, generatePerson),
|
|
279
|
-
"podcast:location":
|
|
279
|
+
"podcast:location": trimArray(feed.locations, generateLocation),
|
|
280
280
|
"podcast:trailer": trimArray(feed.trailers, generateTrailer),
|
|
281
281
|
"podcast:license": generateLicense(feed.license),
|
|
282
282
|
"podcast:guid": generateCdataString(feed.guid),
|
|
283
|
-
"podcast:value":
|
|
283
|
+
"podcast:value": trimArray(feed.values, generateValue),
|
|
284
284
|
"podcast:medium": generateCdataString(feed.medium),
|
|
285
285
|
"podcast:image": trimArray(feed.images, generateImage),
|
|
286
286
|
"podcast:liveItem": trimArray(feed.liveItems, generateLiveItem),
|
|
@@ -290,7 +290,7 @@ const generateFeed = (feed) => {
|
|
|
290
290
|
"podcast:podroll": generatePodroll(feed.podroll),
|
|
291
291
|
"podcast:updateFrequency": generateUpdateFrequency(feed.updateFrequency),
|
|
292
292
|
"podcast:podping": generatePodping(feed.podping),
|
|
293
|
-
"podcast:chat":
|
|
293
|
+
"podcast:chat": generateChat(feed.chat),
|
|
294
294
|
"podcast:publisher": generatePublisher(feed.publisher)
|
|
295
295
|
});
|
|
296
296
|
};
|
|
@@ -272,10 +272,7 @@ const retrieveItem = (value) => {
|
|
|
272
272
|
images: retrieveImages(value),
|
|
273
273
|
socialInteracts: require_utils.parseArrayOf(value["podcast:socialinteract"], parseSocialInteract),
|
|
274
274
|
txts: require_utils.parseArrayOf(value["podcast:txt"], parseTxt),
|
|
275
|
-
chat: require_utils.parseSingularOf(value["podcast:chat"], parseChat)
|
|
276
|
-
location: require_utils.parseSingularOf(value["podcast:location"], parseLocation),
|
|
277
|
-
value: require_utils.parseSingularOf(value["podcast:value"], parseValue),
|
|
278
|
-
chats: require_utils.parseArrayOf(value["podcast:chat"], parseChat)
|
|
275
|
+
chat: require_utils.parseSingularOf(value["podcast:chat"], parseChat)
|
|
279
276
|
});
|
|
280
277
|
};
|
|
281
278
|
const retrieveFeed = (value) => {
|
|
@@ -299,10 +296,7 @@ const retrieveFeed = (value) => {
|
|
|
299
296
|
updateFrequency: require_utils.parseSingularOf(value["podcast:updatefrequency"], parseUpdateFrequency),
|
|
300
297
|
podping: require_utils.parseSingularOf(value["podcast:podping"], parsePodping),
|
|
301
298
|
chat: require_utils.parseSingularOf(value["podcast:chat"], parseChat),
|
|
302
|
-
publisher: require_utils.parseSingularOf(value["podcast:publisher"], parsePublisher)
|
|
303
|
-
location: require_utils.parseSingularOf(value["podcast:location"], parseLocation),
|
|
304
|
-
value: require_utils.parseSingularOf(value["podcast:value"], parseValue),
|
|
305
|
-
chats: require_utils.parseArrayOf(value["podcast:chat"], parseChat)
|
|
299
|
+
publisher: require_utils.parseSingularOf(value["podcast:publisher"], parsePublisher)
|
|
306
300
|
});
|
|
307
301
|
};
|
|
308
302
|
|
|
@@ -272,10 +272,7 @@ const retrieveItem = (value) => {
|
|
|
272
272
|
images: retrieveImages(value),
|
|
273
273
|
socialInteracts: parseArrayOf(value["podcast:socialinteract"], parseSocialInteract),
|
|
274
274
|
txts: parseArrayOf(value["podcast:txt"], parseTxt),
|
|
275
|
-
chat: parseSingularOf(value["podcast:chat"], parseChat)
|
|
276
|
-
location: parseSingularOf(value["podcast:location"], parseLocation),
|
|
277
|
-
value: parseSingularOf(value["podcast:value"], parseValue),
|
|
278
|
-
chats: parseArrayOf(value["podcast:chat"], parseChat)
|
|
275
|
+
chat: parseSingularOf(value["podcast:chat"], parseChat)
|
|
279
276
|
});
|
|
280
277
|
};
|
|
281
278
|
const retrieveFeed = (value) => {
|
|
@@ -299,10 +296,7 @@ const retrieveFeed = (value) => {
|
|
|
299
296
|
updateFrequency: parseSingularOf(value["podcast:updatefrequency"], parseUpdateFrequency),
|
|
300
297
|
podping: parseSingularOf(value["podcast:podping"], parsePodping),
|
|
301
298
|
chat: parseSingularOf(value["podcast:chat"], parseChat),
|
|
302
|
-
publisher: parseSingularOf(value["podcast:publisher"], parsePublisher)
|
|
303
|
-
location: parseSingularOf(value["podcast:location"], parseLocation),
|
|
304
|
-
value: parseSingularOf(value["podcast:value"], parseValue),
|
|
305
|
-
chats: parseArrayOf(value["podcast:chat"], parseChat)
|
|
299
|
+
publisher: parseSingularOf(value["podcast:publisher"], parsePublisher)
|
|
306
300
|
});
|
|
307
301
|
};
|
|
308
302
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const require_utils = require('../../../common/utils.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/namespaces/xml/generate/utils.ts
|
|
4
|
+
const generateItemOrFeed = (itemOrFeed) => {
|
|
5
|
+
if (!require_utils.isObject(itemOrFeed)) return;
|
|
6
|
+
return require_utils.trimObject({
|
|
7
|
+
"@xml:lang": require_utils.generatePlainString(itemOrFeed.lang),
|
|
8
|
+
"@xml:base": require_utils.generatePlainString(itemOrFeed.base),
|
|
9
|
+
"@xml:space": require_utils.generatePlainString(itemOrFeed.space),
|
|
10
|
+
"@xml:id": require_utils.generatePlainString(itemOrFeed.id)
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
exports.generateItemOrFeed = generateItemOrFeed;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { generatePlainString, isObject, trimObject } from "../../../common/utils.js";
|
|
2
|
+
|
|
3
|
+
//#region src/namespaces/xml/generate/utils.ts
|
|
4
|
+
const generateItemOrFeed = (itemOrFeed) => {
|
|
5
|
+
if (!isObject(itemOrFeed)) return;
|
|
6
|
+
return trimObject({
|
|
7
|
+
"@xml:lang": generatePlainString(itemOrFeed.lang),
|
|
8
|
+
"@xml:base": generatePlainString(itemOrFeed.base),
|
|
9
|
+
"@xml:space": generatePlainString(itemOrFeed.space),
|
|
10
|
+
"@xml:id": generatePlainString(itemOrFeed.id)
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { generateItemOrFeed };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const require_utils = require('../../../common/utils.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/namespaces/xml/parse/utils.ts
|
|
4
|
+
const retrieveItemOrFeed = (value) => {
|
|
5
|
+
if (!require_utils.isObject(value)) return;
|
|
6
|
+
return require_utils.trimObject({
|
|
7
|
+
lang: require_utils.parseString(value["@xml:lang"]),
|
|
8
|
+
base: require_utils.parseString(value["@xml:base"]),
|
|
9
|
+
space: require_utils.parseString(value["@xml:space"]),
|
|
10
|
+
id: require_utils.parseString(value["@xml:id"])
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
exports.retrieveItemOrFeed = retrieveItemOrFeed;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { isObject, parseString, trimObject } from "../../../common/utils.js";
|
|
2
|
+
|
|
3
|
+
//#region src/namespaces/xml/parse/utils.ts
|
|
4
|
+
const retrieveItemOrFeed = (value) => {
|
|
5
|
+
if (!isObject(value)) return;
|
|
6
|
+
return trimObject({
|
|
7
|
+
lang: parseString(value["@xml:lang"]),
|
|
8
|
+
base: parseString(value["@xml:base"]),
|
|
9
|
+
space: parseString(value["@xml:space"]),
|
|
10
|
+
id: parseString(value["@xml:id"])
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { retrieveItemOrFeed };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_utils = require('../../common/utils.cjs');
|
|
2
1
|
const require_config = require('../../common/config.cjs');
|
|
2
|
+
const require_utils = require('../../common/utils.cjs');
|
|
3
3
|
const require_config$1 = require('./config.cjs');
|
|
4
4
|
const require_utils$1 = require('./utils.cjs');
|
|
5
5
|
|
package/package.json
CHANGED
|
@@ -75,10 +75,10 @@
|
|
|
75
75
|
"fast-xml-parser": "^5.3.3"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
|
-
"@types/bun": "^1.3.
|
|
78
|
+
"@types/bun": "^1.3.6",
|
|
79
79
|
"kvalita": "^1.9.0",
|
|
80
|
-
"tsdown": "^0.
|
|
80
|
+
"tsdown": "^0.20.0-beta.1",
|
|
81
81
|
"vitepress": "^1.6.4"
|
|
82
82
|
},
|
|
83
|
-
"version": "3.0.0-next.
|
|
83
|
+
"version": "3.0.0-next.2"
|
|
84
84
|
}
|