podverse-parser 1.0.0 → 5.0.0-beta.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/.nvmrc +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -81
- package/dist/lib/chapters/chapters.d.ts +3 -0
- package/dist/lib/chapters/chapters.d.ts.map +1 -0
- package/dist/lib/chapters/chapters.js +59 -0
- package/dist/lib/compat/channel.d.ts +108 -0
- package/dist/lib/compat/channel.d.ts.map +1 -0
- package/dist/lib/compat/channel.js +279 -0
- package/dist/lib/compat/chapters/chapters.d.ts +11 -0
- package/dist/lib/compat/chapters/chapters.d.ts.map +1 -0
- package/dist/lib/compat/chapters/chapters.js +16 -0
- package/dist/lib/compat/partytime/channel.d.ts +110 -0
- package/dist/lib/compat/partytime/channel.d.ts.map +1 -0
- package/dist/lib/compat/partytime/channel.js +281 -0
- package/dist/lib/compat/partytime/compatFull.d.ts +6 -0
- package/dist/lib/compat/partytime/compatFull.d.ts.map +1 -0
- package/dist/lib/compat/partytime/compatFull.js +11 -0
- package/dist/lib/compat/partytime/funding.d.ts +6 -0
- package/dist/lib/compat/partytime/funding.d.ts.map +1 -0
- package/dist/lib/compat/partytime/funding.js +10 -0
- package/dist/lib/compat/partytime/item.d.ts +146 -0
- package/dist/lib/compat/partytime/item.d.ts.map +1 -0
- package/dist/lib/compat/partytime/item.js +264 -0
- package/dist/lib/compat/partytime/liveItem.d.ts +11 -0
- package/dist/lib/compat/partytime/liveItem.d.ts.map +1 -0
- package/dist/lib/compat/partytime/liveItem.js +20 -0
- package/dist/lib/compat/partytime/value.d.ts +62 -0
- package/dist/lib/compat/partytime/value.d.ts.map +1 -0
- package/dist/lib/compat/partytime/value.js +69 -0
- package/dist/lib/rss/base/handleParsedManyData.d.ts +7 -0
- package/dist/lib/rss/base/handleParsedManyData.d.ts.map +1 -0
- package/dist/lib/rss/base/handleParsedManyData.js +21 -0
- package/dist/lib/rss/base/handleParsedOneData.d.ts +7 -0
- package/dist/lib/rss/base/handleParsedOneData.d.ts.map +1 -0
- package/dist/lib/rss/base/handleParsedOneData.js +21 -0
- package/dist/lib/rss/channel/channel.d.ts +4 -0
- package/dist/lib/rss/channel/channel.d.ts.map +1 -0
- package/dist/lib/rss/channel/channel.js +61 -0
- package/dist/lib/rss/channel/channelAbout.d.ts +4 -0
- package/dist/lib/rss/channel/channelAbout.d.ts.map +1 -0
- package/dist/lib/rss/channel/channelAbout.js +20 -0
- package/dist/lib/rss/channel/channelChat.d.ts +4 -0
- package/dist/lib/rss/channel/channelChat.d.ts.map +1 -0
- package/dist/lib/rss/channel/channelChat.js +21 -0
- package/dist/lib/rss/channel/channelDescription.d.ts +4 -0
- package/dist/lib/rss/channel/channelDescription.d.ts.map +1 -0
- package/dist/lib/rss/channel/channelDescription.js +21 -0
- package/dist/lib/rss/channel/channelFunding.d.ts +4 -0
- package/dist/lib/rss/channel/channelFunding.d.ts.map +1 -0
- package/dist/lib/rss/channel/channelFunding.js +21 -0
- package/dist/lib/rss/channel/channelImage.d.ts +4 -0
- package/dist/lib/rss/channel/channelImage.d.ts.map +1 -0
- package/dist/lib/rss/channel/channelImage.js +21 -0
- package/dist/lib/rss/channel/channelLicense.d.ts +4 -0
- package/dist/lib/rss/channel/channelLicense.d.ts.map +1 -0
- package/dist/lib/rss/channel/channelLicense.js +21 -0
- package/dist/lib/rss/channel/channelLocation.d.ts +4 -0
- package/dist/lib/rss/channel/channelLocation.d.ts.map +1 -0
- package/dist/lib/rss/channel/channelLocation.js +21 -0
- package/dist/lib/rss/channel/channelPerson.d.ts +4 -0
- package/dist/lib/rss/channel/channelPerson.d.ts.map +1 -0
- package/dist/lib/rss/channel/channelPerson.js +21 -0
- package/dist/lib/rss/channel/channelPodroll.d.ts +4 -0
- package/dist/lib/rss/channel/channelPodroll.d.ts.map +1 -0
- package/dist/lib/rss/channel/channelPodroll.js +28 -0
- package/dist/lib/rss/channel/channelRemoteItem.d.ts +4 -0
- package/dist/lib/rss/channel/channelRemoteItem.d.ts.map +1 -0
- package/dist/lib/rss/channel/channelRemoteItem.js +21 -0
- package/dist/lib/rss/channel/channelSeason.d.ts +4 -0
- package/dist/lib/rss/channel/channelSeason.d.ts.map +1 -0
- package/dist/lib/rss/channel/channelSeason.js +25 -0
- package/dist/lib/rss/channel/channelSocialInteract.d.ts +4 -0
- package/dist/lib/rss/channel/channelSocialInteract.d.ts.map +1 -0
- package/dist/lib/rss/channel/channelSocialInteract.js +21 -0
- package/dist/lib/rss/channel/channelTrailer.d.ts +4 -0
- package/dist/lib/rss/channel/channelTrailer.d.ts.map +1 -0
- package/dist/lib/rss/channel/channelTrailer.js +36 -0
- package/dist/lib/rss/channel/channelTxt.d.ts +4 -0
- package/dist/lib/rss/channel/channelTxt.d.ts.map +1 -0
- package/dist/lib/rss/channel/channelTxt.js +21 -0
- package/dist/lib/rss/channel/channelValue.d.ts +4 -0
- package/dist/lib/rss/channel/channelValue.d.ts.map +1 -0
- package/dist/lib/rss/channel/channelValue.js +37 -0
- package/dist/lib/rss/feed/feed.d.ts +5 -0
- package/dist/lib/rss/feed/feed.d.ts.map +1 -0
- package/dist/lib/rss/feed/feed.js +80 -0
- package/dist/lib/rss/hash/parsedFeed.d.ts +3 -0
- package/dist/lib/rss/hash/parsedFeed.d.ts.map +1 -0
- package/dist/lib/rss/hash/parsedFeed.js +22 -0
- package/dist/lib/rss/item/item.d.ts +5 -0
- package/dist/lib/rss/item/item.d.ts.map +1 -0
- package/dist/lib/rss/item/item.js +80 -0
- package/dist/lib/rss/item/itemAbout.d.ts +4 -0
- package/dist/lib/rss/item/itemAbout.d.ts.map +1 -0
- package/dist/lib/rss/item/itemAbout.js +20 -0
- package/dist/lib/rss/item/itemChaptersFeed.d.ts +4 -0
- package/dist/lib/rss/item/itemChaptersFeed.d.ts.map +1 -0
- package/dist/lib/rss/item/itemChaptersFeed.js +21 -0
- package/dist/lib/rss/item/itemChat.d.ts +4 -0
- package/dist/lib/rss/item/itemChat.d.ts.map +1 -0
- package/dist/lib/rss/item/itemChat.js +21 -0
- package/dist/lib/rss/item/itemContentLink.d.ts +1 -0
- package/dist/lib/rss/item/itemContentLink.d.ts.map +1 -0
- package/dist/lib/rss/item/itemContentLink.js +1 -0
- package/dist/lib/rss/item/itemDescription.d.ts +4 -0
- package/dist/lib/rss/item/itemDescription.d.ts.map +1 -0
- package/dist/lib/rss/item/itemDescription.js +21 -0
- package/dist/lib/rss/item/itemEnclosure.d.ts +4 -0
- package/dist/lib/rss/item/itemEnclosure.d.ts.map +1 -0
- package/dist/lib/rss/item/itemEnclosure.js +40 -0
- package/dist/lib/rss/item/itemImage.d.ts +4 -0
- package/dist/lib/rss/item/itemImage.d.ts.map +1 -0
- package/dist/lib/rss/item/itemImage.js +21 -0
- package/dist/lib/rss/item/itemLicense.d.ts +4 -0
- package/dist/lib/rss/item/itemLicense.d.ts.map +1 -0
- package/dist/lib/rss/item/itemLicense.js +21 -0
- package/dist/lib/rss/item/itemLocation.d.ts +4 -0
- package/dist/lib/rss/item/itemLocation.d.ts.map +1 -0
- package/dist/lib/rss/item/itemLocation.js +21 -0
- package/dist/lib/rss/item/itemPerson.d.ts +4 -0
- package/dist/lib/rss/item/itemPerson.d.ts.map +1 -0
- package/dist/lib/rss/item/itemPerson.js +21 -0
- package/dist/lib/rss/item/itemSeason.d.ts +4 -0
- package/dist/lib/rss/item/itemSeason.d.ts.map +1 -0
- package/dist/lib/rss/item/itemSeason.js +30 -0
- package/dist/lib/rss/item/itemSeasonEpisode.d.ts +4 -0
- package/dist/lib/rss/item/itemSeasonEpisode.d.ts.map +1 -0
- package/dist/lib/rss/item/itemSeasonEpisode.js +21 -0
- package/dist/lib/rss/item/itemSocialInteract.d.ts +4 -0
- package/dist/lib/rss/item/itemSocialInteract.d.ts.map +1 -0
- package/dist/lib/rss/item/itemSocialInteract.js +21 -0
- package/dist/lib/rss/item/itemSoundbite.d.ts +4 -0
- package/dist/lib/rss/item/itemSoundbite.d.ts.map +1 -0
- package/dist/lib/rss/item/itemSoundbite.js +21 -0
- package/dist/lib/rss/item/itemTranscript.d.ts +4 -0
- package/dist/lib/rss/item/itemTranscript.d.ts.map +1 -0
- package/dist/lib/rss/item/itemTranscript.js +21 -0
- package/dist/lib/rss/item/itemTxt.d.ts +4 -0
- package/dist/lib/rss/item/itemTxt.d.ts.map +1 -0
- package/dist/lib/rss/item/itemTxt.js +21 -0
- package/dist/lib/rss/item/itemValue.d.ts +4 -0
- package/dist/lib/rss/item/itemValue.d.ts.map +1 -0
- package/dist/lib/rss/item/itemValue.js +65 -0
- package/dist/lib/rss/liveItem/liveItem.d.ts +4 -0
- package/dist/lib/rss/liveItem/liveItem.d.ts.map +1 -0
- package/dist/lib/rss/liveItem/liveItem.js +41 -0
- package/dist/lib/rss/parser.d.ts +4 -0
- package/dist/lib/rss/parser.d.ts.map +1 -0
- package/dist/lib/rss/parser.js +83 -0
- package/dist/module-alias-config.d.ts +2 -0
- package/dist/module-alias-config.d.ts.map +1 -0
- package/dist/module-alias-config.js +7 -0
- package/eslint.config.mjs +38 -0
- package/package.json +20 -29
- package/src/index.ts +3 -0
- package/src/lib/chapters/chapters.ts +54 -0
- package/src/lib/compat/channel.ts +287 -0
- package/src/lib/compat/chapters/chapters.ts +23 -0
- package/src/lib/compat/partytime/channel.ts +289 -0
- package/src/lib/compat/partytime/compatFull.ts +7 -0
- package/src/lib/compat/partytime/funding.ts +8 -0
- package/src/lib/compat/partytime/item.ts +273 -0
- package/src/lib/compat/partytime/liveItem.ts +18 -0
- package/src/lib/compat/partytime/value.ts +64 -0
- package/src/lib/rss/base/handleParsedManyData.ts +16 -0
- package/src/lib/rss/base/handleParsedOneData.ts +17 -0
- package/src/lib/rss/channel/channel.ts +55 -0
- package/src/lib/rss/channel/channelAbout.ts +13 -0
- package/src/lib/rss/channel/channelChat.ts +14 -0
- package/src/lib/rss/channel/channelDescription.ts +14 -0
- package/src/lib/rss/channel/channelFunding.ts +14 -0
- package/src/lib/rss/channel/channelImage.ts +14 -0
- package/src/lib/rss/channel/channelLicense.ts +14 -0
- package/src/lib/rss/channel/channelLocation.ts +14 -0
- package/src/lib/rss/channel/channelPerson.ts +14 -0
- package/src/lib/rss/channel/channelPodroll.ts +21 -0
- package/src/lib/rss/channel/channelRemoteItem.ts +14 -0
- package/src/lib/rss/channel/channelSeason.ts +14 -0
- package/src/lib/rss/channel/channelSocialInteract.ts +14 -0
- package/src/lib/rss/channel/channelTrailer.ts +31 -0
- package/src/lib/rss/channel/channelTxt.ts +14 -0
- package/src/lib/rss/channel/channelValue.ts +30 -0
- package/src/lib/rss/feed/feed.ts +79 -0
- package/src/lib/rss/hash/parsedFeed.ts +9 -0
- package/src/lib/rss/item/item.ts +85 -0
- package/src/lib/rss/item/itemAbout.ts +13 -0
- package/src/lib/rss/item/itemChaptersFeed.ts +14 -0
- package/src/lib/rss/item/itemChat.ts +14 -0
- package/src/lib/rss/item/itemContentLink.ts +0 -0
- package/src/lib/rss/item/itemDescription.ts +14 -0
- package/src/lib/rss/item/itemEnclosure.ts +35 -0
- package/src/lib/rss/item/itemImage.ts +14 -0
- package/src/lib/rss/item/itemLicense.ts +14 -0
- package/src/lib/rss/item/itemLocation.ts +14 -0
- package/src/lib/rss/item/itemPerson.ts +14 -0
- package/src/lib/rss/item/itemSeason.ts +26 -0
- package/src/lib/rss/item/itemSeasonEpisode.ts +14 -0
- package/src/lib/rss/item/itemSocialInteract.ts +14 -0
- package/src/lib/rss/item/itemSoundbite.ts +14 -0
- package/src/lib/rss/item/itemTranscript.ts +14 -0
- package/src/lib/rss/item/itemTxt.ts +14 -0
- package/src/lib/rss/item/itemValue.ts +60 -0
- package/src/lib/rss/liveItem/liveItem.ts +34 -0
- package/src/lib/rss/parser.ts +85 -0
- package/src/module-alias-config.ts +8 -0
- package/tsconfig.json +25 -0
- package/LICENSE +0 -674
- package/README.md +0 -2
- package/dist/index.js.map +0 -7
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.handleParsedChannelDescription = void 0;
|
|
13
|
+
const podverse_orm_1 = require("podverse-orm");
|
|
14
|
+
const channel_1 = require("@parser/lib/compat/partytime/channel");
|
|
15
|
+
const handleParsedOneData_1 = require("../base/handleParsedOneData");
|
|
16
|
+
const handleParsedChannelDescription = (parsedFeed, channel, transactionalEntityManager) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
|
+
const channelDescriptionService = new podverse_orm_1.ChannelDescriptionService(transactionalEntityManager);
|
|
18
|
+
const channelDescriptionDto = (0, channel_1.compatChannelDescriptionDto)(parsedFeed);
|
|
19
|
+
yield (0, handleParsedOneData_1.handleParsedOneData)(channel, channelDescriptionService, channelDescriptionDto);
|
|
20
|
+
});
|
|
21
|
+
exports.handleParsedChannelDescription = handleParsedChannelDescription;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FeedObject } from "podcast-partytime";
|
|
2
|
+
import { Channel, EntityManager } from "podverse-orm";
|
|
3
|
+
export declare const handleParsedChannelFunding: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager: EntityManager) => Promise<void>;
|
|
4
|
+
//# sourceMappingURL=channelFunding.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channelFunding.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/channel/channelFunding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAyB,aAAa,EAAE,MAAM,cAAc,CAAC;AAI7E,eAAO,MAAM,0BAA0B,eACzB,UAAU,WACb,OAAO,8BACY,aAAa,kBAK1C,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.handleParsedChannelFunding = void 0;
|
|
13
|
+
const podverse_orm_1 = require("podverse-orm");
|
|
14
|
+
const channel_1 = require("@parser/lib/compat/partytime/channel");
|
|
15
|
+
const handleParsedManyData_1 = require("../base/handleParsedManyData");
|
|
16
|
+
const handleParsedChannelFunding = (parsedFeed, channel, transactionalEntityManager) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
|
+
const channelFundingService = new podverse_orm_1.ChannelFundingService(transactionalEntityManager);
|
|
18
|
+
const channelFundingDtos = (0, channel_1.compatChannelFundingDtos)(parsedFeed);
|
|
19
|
+
yield (0, handleParsedManyData_1.handleParsedManyData)(channel, channelFundingService, channelFundingDtos);
|
|
20
|
+
});
|
|
21
|
+
exports.handleParsedChannelFunding = handleParsedChannelFunding;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FeedObject } from "podcast-partytime";
|
|
2
|
+
import { Channel, EntityManager } from "podverse-orm";
|
|
3
|
+
export declare const handleParsedChannelImage: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager: EntityManager) => Promise<void>;
|
|
4
|
+
//# sourceMappingURL=channelImage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channelImage.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/channel/channelImage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAuB,aAAa,EAAE,MAAM,cAAc,CAAC;AAI3E,eAAO,MAAM,wBAAwB,eACvB,UAAU,WACb,OAAO,8BACY,aAAa,kBAK1C,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.handleParsedChannelImage = void 0;
|
|
13
|
+
const podverse_orm_1 = require("podverse-orm");
|
|
14
|
+
const channel_1 = require("@parser/lib/compat/partytime/channel");
|
|
15
|
+
const handleParsedManyData_1 = require("../base/handleParsedManyData");
|
|
16
|
+
const handleParsedChannelImage = (parsedFeed, channel, transactionalEntityManager) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
|
+
const channelImageService = new podverse_orm_1.ChannelImageService(transactionalEntityManager);
|
|
18
|
+
const channelImageDtos = (0, channel_1.compatChannelImageDtos)(parsedFeed);
|
|
19
|
+
yield (0, handleParsedManyData_1.handleParsedManyData)(channel, channelImageService, channelImageDtos);
|
|
20
|
+
});
|
|
21
|
+
exports.handleParsedChannelImage = handleParsedChannelImage;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FeedObject } from "podcast-partytime";
|
|
2
|
+
import { Channel, EntityManager } from "podverse-orm";
|
|
3
|
+
export declare const handleParsedChannelLicense: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager: EntityManager) => Promise<void>;
|
|
4
|
+
//# sourceMappingURL=channelLicense.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channelLicense.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/channel/channelLicense.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAyB,aAAa,EAAE,MAAM,cAAc,CAAC;AAI7E,eAAO,MAAM,0BAA0B,eACzB,UAAU,WACb,OAAO,8BACY,aAAa,kBAK1C,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.handleParsedChannelLicense = void 0;
|
|
13
|
+
const podverse_orm_1 = require("podverse-orm");
|
|
14
|
+
const channel_1 = require("@parser/lib/compat/partytime/channel");
|
|
15
|
+
const handleParsedOneData_1 = require("../base/handleParsedOneData");
|
|
16
|
+
const handleParsedChannelLicense = (parsedFeed, channel, transactionalEntityManager) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
|
+
const channelLicenseService = new podverse_orm_1.ChannelLicenseService(transactionalEntityManager);
|
|
18
|
+
const channelLicenseDtos = (0, channel_1.compatChannelLicenseDto)(parsedFeed);
|
|
19
|
+
yield (0, handleParsedOneData_1.handleParsedOneData)(channel, channelLicenseService, channelLicenseDtos);
|
|
20
|
+
});
|
|
21
|
+
exports.handleParsedChannelLicense = handleParsedChannelLicense;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FeedObject } from "podcast-partytime";
|
|
2
|
+
import { Channel, EntityManager } from "podverse-orm";
|
|
3
|
+
export declare const handleParsedChannelLocation: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager: EntityManager) => Promise<void>;
|
|
4
|
+
//# sourceMappingURL=channelLocation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channelLocation.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/channel/channelLocation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAA0B,aAAa,EAAE,MAAM,cAAc,CAAC;AAI9E,eAAO,MAAM,2BAA2B,eAC1B,UAAU,WACb,OAAO,8BACY,aAAa,kBAK1C,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.handleParsedChannelLocation = void 0;
|
|
13
|
+
const podverse_orm_1 = require("podverse-orm");
|
|
14
|
+
const channel_1 = require("@parser/lib/compat/partytime/channel");
|
|
15
|
+
const handleParsedOneData_1 = require("../base/handleParsedOneData");
|
|
16
|
+
const handleParsedChannelLocation = (parsedFeed, channel, transactionalEntityManager) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
|
+
const channelLocationService = new podverse_orm_1.ChannelLocationService(transactionalEntityManager);
|
|
18
|
+
const channelLocationDtos = (0, channel_1.compatChannelLocationDto)(parsedFeed);
|
|
19
|
+
yield (0, handleParsedOneData_1.handleParsedOneData)(channel, channelLocationService, channelLocationDtos);
|
|
20
|
+
});
|
|
21
|
+
exports.handleParsedChannelLocation = handleParsedChannelLocation;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FeedObject } from "podcast-partytime";
|
|
2
|
+
import { Channel, EntityManager } from "podverse-orm";
|
|
3
|
+
export declare const handleParsedChannelPerson: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager: EntityManager) => Promise<void>;
|
|
4
|
+
//# sourceMappingURL=channelPerson.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channelPerson.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/channel/channelPerson.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAwB,aAAa,EAAE,MAAM,cAAc,CAAC;AAI5E,eAAO,MAAM,yBAAyB,eACxB,UAAU,WACb,OAAO,8BACY,aAAa,kBAK1C,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.handleParsedChannelPerson = void 0;
|
|
13
|
+
const podverse_orm_1 = require("podverse-orm");
|
|
14
|
+
const channel_1 = require("@parser/lib/compat/partytime/channel");
|
|
15
|
+
const handleParsedManyData_1 = require("../base/handleParsedManyData");
|
|
16
|
+
const handleParsedChannelPerson = (parsedFeed, channel, transactionalEntityManager) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
|
+
const channelPersonService = new podverse_orm_1.ChannelPersonService(transactionalEntityManager);
|
|
18
|
+
const channelPersonDtos = (0, channel_1.compatChannelPersonDtos)(parsedFeed);
|
|
19
|
+
yield (0, handleParsedManyData_1.handleParsedManyData)(channel, channelPersonService, channelPersonDtos);
|
|
20
|
+
});
|
|
21
|
+
exports.handleParsedChannelPerson = handleParsedChannelPerson;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FeedObject } from "podcast-partytime";
|
|
2
|
+
import { Channel, EntityManager } from "podverse-orm";
|
|
3
|
+
export declare const handleParsedChannelPodroll: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager: EntityManager) => Promise<void>;
|
|
4
|
+
//# sourceMappingURL=channelPodroll.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channelPodroll.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/channel/channelPodroll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAA0D,aAAa,EAAE,MAAM,cAAc,CAAC;AAG9G,eAAO,MAAM,0BAA0B,eACzB,UAAU,WACb,OAAO,8BACY,aAAa,kBAa1C,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.handleParsedChannelPodroll = void 0;
|
|
13
|
+
const podverse_orm_1 = require("podverse-orm");
|
|
14
|
+
const channel_1 = require("@parser/lib/compat/partytime/channel");
|
|
15
|
+
const handleParsedChannelPodroll = (parsedFeed, channel, transactionalEntityManager) => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
+
const channelPodrollService = new podverse_orm_1.ChannelPodrollService(transactionalEntityManager);
|
|
17
|
+
const channelPodrollDto = {};
|
|
18
|
+
const channelPodrollRemoteItemService = new podverse_orm_1.ChannelPodrollRemoteItemService(transactionalEntityManager);
|
|
19
|
+
const channelPodrollRemoteItemDtos = (0, channel_1.compatChannelPodrollRemoteItemDtos)(parsedFeed);
|
|
20
|
+
if (channelPodrollRemoteItemDtos.length > 0) {
|
|
21
|
+
const channel_podroll = yield channelPodrollService.update(channel, channelPodrollDto);
|
|
22
|
+
yield channelPodrollRemoteItemService.updateMany(channel_podroll, channelPodrollRemoteItemDtos);
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
yield channelPodrollService.delete(channel);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
exports.handleParsedChannelPodroll = handleParsedChannelPodroll;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FeedObject } from "podcast-partytime";
|
|
2
|
+
import { Channel, EntityManager } from "podverse-orm";
|
|
3
|
+
export declare const handleParsedChannelRemoteItem: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager: EntityManager) => Promise<void>;
|
|
4
|
+
//# sourceMappingURL=channelRemoteItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channelRemoteItem.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/channel/channelRemoteItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAA4B,aAAa,EAAE,MAAM,cAAc,CAAC;AAIhF,eAAO,MAAM,6BAA6B,eAC5B,UAAU,WACb,OAAO,8BACY,aAAa,kBAK1C,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.handleParsedChannelRemoteItem = void 0;
|
|
13
|
+
const podverse_orm_1 = require("podverse-orm");
|
|
14
|
+
const channel_1 = require("@parser/lib/compat/partytime/channel");
|
|
15
|
+
const handleParsedManyData_1 = require("../base/handleParsedManyData");
|
|
16
|
+
const handleParsedChannelRemoteItem = (parsedFeed, channel, transactionalEntityManager) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
|
+
const channelRemoteItemService = new podverse_orm_1.ChannelRemoteItemService(transactionalEntityManager);
|
|
18
|
+
const channelRemoteItemDtos = (0, channel_1.compatChannelRemoteItemDtos)(parsedFeed);
|
|
19
|
+
yield (0, handleParsedManyData_1.handleParsedManyData)(channel, channelRemoteItemService, channelRemoteItemDtos);
|
|
20
|
+
});
|
|
21
|
+
exports.handleParsedChannelRemoteItem = handleParsedChannelRemoteItem;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channelSeason.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/channel/channelSeason.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAwB,MAAM,cAAc,CAAC;AAG7D,eAAO,MAAM,0BAA0B,eAAsB,UAAU,WAAW,OAAO,KAAG,OAAO,CAAC,IAAI,CASvG,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.handleParsedChannelSeasons = void 0;
|
|
13
|
+
const podverse_orm_1 = require("podverse-orm");
|
|
14
|
+
const channel_1 = require("@parser/lib/compat/partytime/channel");
|
|
15
|
+
const handleParsedChannelSeasons = (parsedFeed, channel) => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
+
const channelSeasonService = new podverse_orm_1.ChannelSeasonService();
|
|
17
|
+
const channelSeasonDtos = (0, channel_1.compatChannelSeasonDtos)(parsedFeed);
|
|
18
|
+
if (channelSeasonDtos.length > 0) {
|
|
19
|
+
yield channelSeasonService.updateMany(channel, channelSeasonDtos);
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
yield channelSeasonService.deleteAll(channel);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
exports.handleParsedChannelSeasons = handleParsedChannelSeasons;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FeedObject } from "podcast-partytime";
|
|
2
|
+
import { Channel, EntityManager } from "podverse-orm";
|
|
3
|
+
export declare const handleParsedChannelSocialInteract: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager: EntityManager) => Promise<void>;
|
|
4
|
+
//# sourceMappingURL=channelSocialInteract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channelSocialInteract.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/channel/channelSocialInteract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAgC,aAAa,EAAE,MAAM,cAAc,CAAC;AAIpF,eAAO,MAAM,iCAAiC,eAChC,UAAU,WACb,OAAO,8BACY,aAAa,kBAK1C,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.handleParsedChannelSocialInteract = void 0;
|
|
13
|
+
const podverse_orm_1 = require("podverse-orm");
|
|
14
|
+
const channel_1 = require("@parser/lib/compat/partytime/channel");
|
|
15
|
+
const handleParsedManyData_1 = require("../base/handleParsedManyData");
|
|
16
|
+
const handleParsedChannelSocialInteract = (parsedFeed, channel, transactionalEntityManager) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
|
+
const channelSocialInteractService = new podverse_orm_1.ChannelSocialInteractService(transactionalEntityManager);
|
|
18
|
+
const channelSocialInteractDtos = (0, channel_1.compatChannelSocialInteractDtos)(parsedFeed);
|
|
19
|
+
yield (0, handleParsedManyData_1.handleParsedManyData)(channel, channelSocialInteractService, channelSocialInteractDtos);
|
|
20
|
+
});
|
|
21
|
+
exports.handleParsedChannelSocialInteract = handleParsedChannelSocialInteract;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FeedObject } from "podcast-partytime";
|
|
2
|
+
import { Channel, ChannelSeason, EntityManager } from "podverse-orm";
|
|
3
|
+
export declare const handleParsedChannelTrailer: (parsedFeed: FeedObject, channel: Channel, channelSeasonIndex: Record<number, ChannelSeason>, transactionalEntityManager: EntityManager) => Promise<void>;
|
|
4
|
+
//# sourceMappingURL=channelTrailer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channelTrailer.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/channel/channelTrailer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,aAAa,EAA4C,aAAa,EAAE,MAAM,cAAc,CAAC;AAG/G,eAAO,MAAM,0BAA0B,eACzB,UAAU,WACb,OAAO,sBACI,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,8BACrB,aAAa,kBAsB1C,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.handleParsedChannelTrailer = void 0;
|
|
13
|
+
const podverse_orm_1 = require("podverse-orm");
|
|
14
|
+
const channel_1 = require("@parser/lib/compat/partytime/channel");
|
|
15
|
+
const handleParsedChannelTrailer = (parsedFeed, channel, channelSeasonIndex, transactionalEntityManager) => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
+
const channelTrailerService = new podverse_orm_1.ChannelTrailerService(transactionalEntityManager);
|
|
17
|
+
const channelTrailerDtos = (0, channel_1.compatChannelTrailerDtos)(parsedFeed);
|
|
18
|
+
const enrichedChannelTrailerDtos = channelTrailerDtos.map((channelTrailerDto) => {
|
|
19
|
+
const channel_season = channelTrailerDto.season ? channelSeasonIndex[channelTrailerDto.season] : null;
|
|
20
|
+
return {
|
|
21
|
+
url: channelTrailerDto.url,
|
|
22
|
+
pubdate: channelTrailerDto.pubdate,
|
|
23
|
+
title: channelTrailerDto.title,
|
|
24
|
+
length: channelTrailerDto.length,
|
|
25
|
+
type: channelTrailerDto.type,
|
|
26
|
+
channel_season
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
if (channelTrailerDtos.length > 0) {
|
|
30
|
+
yield channelTrailerService.updateMany(channel, enrichedChannelTrailerDtos);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
yield channelTrailerService.deleteAll(channel);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
exports.handleParsedChannelTrailer = handleParsedChannelTrailer;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FeedObject } from "podcast-partytime";
|
|
2
|
+
import { Channel, EntityManager } from "podverse-orm";
|
|
3
|
+
export declare const handleParsedChannelTxt: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager: EntityManager) => Promise<void>;
|
|
4
|
+
//# sourceMappingURL=channelTxt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channelTxt.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/channel/channelTxt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAqB,aAAa,EAAE,MAAM,cAAc,CAAC;AAIzE,eAAO,MAAM,sBAAsB,eACrB,UAAU,WACb,OAAO,8BACY,aAAa,kBAK1C,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.handleParsedChannelTxt = void 0;
|
|
13
|
+
const podverse_orm_1 = require("podverse-orm");
|
|
14
|
+
const channel_1 = require("@parser/lib/compat/partytime/channel");
|
|
15
|
+
const handleParsedManyData_1 = require("../base/handleParsedManyData");
|
|
16
|
+
const handleParsedChannelTxt = (parsedFeed, channel, transactionalEntityManager) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
|
+
const channelTxtService = new podverse_orm_1.ChannelTxtService(transactionalEntityManager);
|
|
18
|
+
const channelTxtDtos = (0, channel_1.compatChannelTxtDtos)(parsedFeed);
|
|
19
|
+
yield (0, handleParsedManyData_1.handleParsedManyData)(channel, channelTxtService, channelTxtDtos);
|
|
20
|
+
});
|
|
21
|
+
exports.handleParsedChannelTxt = handleParsedChannelTxt;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FeedObject } from "podcast-partytime";
|
|
2
|
+
import { Channel, EntityManager } from "podverse-orm";
|
|
3
|
+
export declare const handleParsedChannelValue: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager: EntityManager) => Promise<void>;
|
|
4
|
+
//# sourceMappingURL=channelValue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channelValue.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/channel/channelValue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAqD,aAAa,EAAE,MAAM,cAAc,CAAC;AAGzG,eAAO,MAAM,wBAAwB,eACvB,UAAU,WACb,OAAO,8BACY,aAAa,kBAsB1C,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.handleParsedChannelValue = void 0;
|
|
13
|
+
const podverse_orm_1 = require("podverse-orm");
|
|
14
|
+
const channel_1 = require("@parser/lib/compat/partytime/channel");
|
|
15
|
+
const handleParsedChannelValue = (parsedFeed, channel, transactionalEntityManager) => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
+
const channelValueService = new podverse_orm_1.ChannelValueService(transactionalEntityManager);
|
|
17
|
+
const channelValueDtos = (0, channel_1.compatChannelValueDtos)(parsedFeed);
|
|
18
|
+
const channelValueRecipientService = new podverse_orm_1.ChannelValueRecipientService(transactionalEntityManager);
|
|
19
|
+
if (channelValueDtos.length > 0) {
|
|
20
|
+
for (const channelValueDto of channelValueDtos) {
|
|
21
|
+
const channel_value = yield channelValueService.update(channel, channelValueDto.channel_value);
|
|
22
|
+
const channelValueRecipientDtos = channelValueDto.channel_value_recipients;
|
|
23
|
+
if (channelValueRecipientDtos.length > 0) {
|
|
24
|
+
for (const channelValueRecipientDto of channelValueRecipientDtos) {
|
|
25
|
+
yield channelValueRecipientService.update(channel_value, channelValueRecipientDto);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
yield channelValueService.deleteAll(channel);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
yield channelValueService.deleteAll(channel);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
exports.handleParsedChannelValue = handleParsedChannelValue;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { FeedObject } from "podcast-partytime";
|
|
2
|
+
import { Feed } from "podverse-orm";
|
|
3
|
+
export declare const handleGetRSSFeed: (feed: Feed) => Promise<FeedObject>;
|
|
4
|
+
export declare const handleParsedFeed: (parsedFeed: FeedObject, url: string, podcast_index_id: number) => Promise<Feed>;
|
|
5
|
+
//# sourceMappingURL=feed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feed.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/feed/feed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAoC,IAAI,EAA+B,MAAM,cAAc,CAAC;AAInG,eAAO,MAAM,gBAAgB,SAAgB,IAAI,KAAG,OAAO,CAAC,UAAU,CAmCrE,CAAC;AAEF,eAAO,MAAM,gBAAgB,eAAsB,UAAU,OAAO,MAAM,oBAAoB,MAAM,KAAG,OAAO,CAAC,IAAI,CAkBlH,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.handleParsedFeed = exports.handleGetRSSFeed = void 0;
|
|
13
|
+
const podverse_helpers_1 = require("podverse-helpers");
|
|
14
|
+
const podverse_orm_1 = require("podverse-orm");
|
|
15
|
+
const parsedFeed_1 = require("../hash/parsedFeed");
|
|
16
|
+
const parser_1 = require("../parser");
|
|
17
|
+
const handleGetRSSFeed = (feed) => __awaiter(void 0, void 0, void 0, function* () {
|
|
18
|
+
const feedLogService = new podverse_orm_1.FeedLogService();
|
|
19
|
+
let parsedFeed = null;
|
|
20
|
+
try {
|
|
21
|
+
parsedFeed = yield (0, parser_1.getAndParseRSSFeed)(feed.url);
|
|
22
|
+
yield feedLogService.update(feed, {
|
|
23
|
+
last_http_status: 200,
|
|
24
|
+
last_good_http_status_time: new Date()
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
catch (error) {
|
|
28
|
+
// TODO: how to handle errors?
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
30
|
+
const statusCode = error.statusCode;
|
|
31
|
+
const feedLog = yield feedLogService.get(feed);
|
|
32
|
+
if (statusCode) {
|
|
33
|
+
yield feedLogService.update(feed, {
|
|
34
|
+
last_http_status: statusCode,
|
|
35
|
+
parse_errors: ((feedLog === null || feedLog === void 0 ? void 0 : feedLog.parse_errors) || 0) + 1,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
return (0, podverse_helpers_1.throwRequestError)(error);
|
|
39
|
+
}
|
|
40
|
+
if (!parsedFeed) {
|
|
41
|
+
const feedLog = yield feedLogService.get(feed);
|
|
42
|
+
yield feedLogService.update(feed, {
|
|
43
|
+
last_http_status: 200,
|
|
44
|
+
last_finished_parse_time: new Date(),
|
|
45
|
+
parse_errors: ((feedLog === null || feedLog === void 0 ? void 0 : feedLog.parse_errors) || 0) + 1,
|
|
46
|
+
});
|
|
47
|
+
return (0, podverse_helpers_1.throwRequestError)('parsedFeed no data found');
|
|
48
|
+
}
|
|
49
|
+
return parsedFeed;
|
|
50
|
+
});
|
|
51
|
+
exports.handleGetRSSFeed = handleGetRSSFeed;
|
|
52
|
+
const handleParsedFeed = (parsedFeed, url, podcast_index_id) => __awaiter(void 0, void 0, void 0, function* () {
|
|
53
|
+
const feedService = new podverse_orm_1.FeedService();
|
|
54
|
+
const feed = yield feedService.getOrCreate({ url, podcast_index_id });
|
|
55
|
+
// TODO: move before partytime parsing
|
|
56
|
+
if (!(0, podverse_orm_1.checkIfFeedFlagStatusShouldParse)(feed.feed_flag_status.id)) {
|
|
57
|
+
throw new Error(`parseRSSFeedAndSaveToDatabase: feed_flag_status.status is not None or AlwaysAllow for ${url}`);
|
|
58
|
+
}
|
|
59
|
+
checkIfFeedIsParsing(feed);
|
|
60
|
+
const currentFeedFileHash = (0, parsedFeed_1.getParsedFeedMd5Hash)(parsedFeed);
|
|
61
|
+
if (feed.last_parsed_file_hash === currentFeedFileHash) {
|
|
62
|
+
throw new Error(`Feed ${feed.id} has no changes since last parsed.`);
|
|
63
|
+
}
|
|
64
|
+
return feedService.update(feed.id, { last_parsed_file_hash: currentFeedFileHash });
|
|
65
|
+
});
|
|
66
|
+
exports.handleParsedFeed = handleParsedFeed;
|
|
67
|
+
const checkIfFeedIsParsing = (feed) => {
|
|
68
|
+
// TODO: handle with caching db / redis instead of database?
|
|
69
|
+
if (feed.is_parsing) {
|
|
70
|
+
const parsingDate = new Date(feed.is_parsing);
|
|
71
|
+
const currentDate = new Date();
|
|
72
|
+
const timeDifference = (currentDate.getTime() - parsingDate.getTime()) / (1000 * 60);
|
|
73
|
+
if (isNaN(parsingDate.getTime())) {
|
|
74
|
+
throw new Error(`Feed ${feed.id} has an invalid parsing date`);
|
|
75
|
+
}
|
|
76
|
+
if (timeDifference <= 30) {
|
|
77
|
+
throw new Error(`Feed ${feed.id} is already parsing`);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parsedFeed.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/hash/parsedFeed.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,eAAO,MAAM,oBAAoB,eAAgB,UAAU,KAAG,MAK7D,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.getParsedFeedMd5Hash = void 0;
|
|
15
|
+
const podverse_helpers_1 = require("podverse-helpers");
|
|
16
|
+
const getParsedFeedMd5Hash = (parsedFeed) => {
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
18
|
+
const { lastUpdate, lastBuildDate, pubDate } = parsedFeed, parsedFeedPruned = __rest(parsedFeed, ["lastUpdate", "lastBuildDate", "pubDate"]);
|
|
19
|
+
const currentFeedFileHash = (0, podverse_helpers_1.getMd5Hash)(parsedFeedPruned);
|
|
20
|
+
return currentFeedFileHash;
|
|
21
|
+
};
|
|
22
|
+
exports.getParsedFeedMd5Hash = getParsedFeedMd5Hash;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Episode } from "podcast-partytime";
|
|
2
|
+
import { Channel, ChannelSeasonIndex, EntityManager } from "podverse-orm";
|
|
3
|
+
export declare const handleParsedItems: (parsedItems: Episode[], channel: Channel, channelSeasonIndex: ChannelSeasonIndex) => Promise<void>;
|
|
4
|
+
export declare const handleParsedItem: (parsedItem: Episode, channel: Channel, channelSeasonIndex: ChannelSeasonIndex, transactionalEntityManager: EntityManager) => Promise<Item>;
|
|
5
|
+
//# sourceMappingURL=item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/item/item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAiB,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAe,MAAM,cAAc,CAAC;AAmBtG,eAAO,MAAM,iBAAiB,gBAAuB,OAAO,EAAE,WAAW,OAAO,sBAAsB,kBAAkB,kBAuBvH,CAAC;AAEF,eAAO,MAAM,gBAAgB,eACf,OAAO,WACV,OAAO,sBACI,kBAAkB,8BACV,aAAa,kBAkC1C,CAAC"}
|