podverse-parser 5.0.8 → 5.1.0-alpha.0
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/config/index.d.ts +11 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +13 -0
- package/dist/factories/podcastIndex.d.ts +3 -0
- package/dist/factories/podcastIndex.d.ts.map +1 -0
- package/dist/factories/podcastIndex.js +9 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/lib/chapters/chapters.d.ts.map +1 -1
- package/dist/lib/compat/chapters/chapters.d.ts.map +1 -1
- package/dist/lib/compat/chapters/chapters.js +3 -2
- package/dist/lib/compat/partytime/channel.d.ts +6 -3
- package/dist/lib/compat/partytime/channel.d.ts.map +1 -1
- package/dist/lib/compat/partytime/channel.js +48 -37
- package/dist/lib/compat/partytime/item.d.ts +30 -9
- package/dist/lib/compat/partytime/item.d.ts.map +1 -1
- package/dist/lib/compat/partytime/item.js +66 -35
- package/dist/lib/compat/partytime/liveItem.d.ts.map +1 -1
- package/dist/lib/compat/partytime/liveItem.js +8 -1
- package/dist/lib/compat/partytime/value.d.ts.map +1 -1
- package/dist/lib/compat/partytime/value.js +1 -1
- package/dist/lib/notifications/index.d.ts +8 -0
- package/dist/lib/notifications/index.d.ts.map +1 -0
- package/dist/lib/notifications/index.js +48 -0
- package/dist/lib/rss/base/handleParsedManyData.d.ts.map +1 -1
- package/dist/lib/rss/base/handleParsedOneData.d.ts.map +1 -1
- package/dist/lib/rss/channel/channel.d.ts.map +1 -1
- package/dist/lib/rss/channel/channel.js +32 -27
- package/dist/lib/rss/channel/channelAbout.d.ts +1 -1
- package/dist/lib/rss/channel/channelAbout.d.ts.map +1 -1
- package/dist/lib/rss/channel/channelAbout.js +3 -0
- package/dist/lib/rss/channel/channelCategory.d.ts +4 -0
- package/dist/lib/rss/channel/channelCategory.d.ts.map +1 -0
- package/dist/lib/rss/channel/channelCategory.js +28 -0
- package/dist/lib/rss/channel/channelChat.d.ts +1 -1
- package/dist/lib/rss/channel/channelChat.d.ts.map +1 -1
- package/dist/lib/rss/channel/channelChat.js +3 -0
- package/dist/lib/rss/channel/channelDescription.d.ts +1 -1
- package/dist/lib/rss/channel/channelDescription.d.ts.map +1 -1
- package/dist/lib/rss/channel/channelDescription.js +3 -0
- package/dist/lib/rss/channel/channelFunding.d.ts +1 -1
- package/dist/lib/rss/channel/channelFunding.d.ts.map +1 -1
- package/dist/lib/rss/channel/channelFunding.js +3 -0
- package/dist/lib/rss/channel/channelImage.d.ts +1 -1
- package/dist/lib/rss/channel/channelImage.d.ts.map +1 -1
- package/dist/lib/rss/channel/channelImage.js +3 -0
- package/dist/lib/rss/channel/channelLicense.d.ts +1 -1
- package/dist/lib/rss/channel/channelLicense.d.ts.map +1 -1
- package/dist/lib/rss/channel/channelLicense.js +3 -0
- package/dist/lib/rss/channel/channelLocation.d.ts +1 -1
- package/dist/lib/rss/channel/channelLocation.d.ts.map +1 -1
- package/dist/lib/rss/channel/channelLocation.js +3 -0
- package/dist/lib/rss/channel/channelPerson.d.ts +1 -1
- package/dist/lib/rss/channel/channelPerson.d.ts.map +1 -1
- package/dist/lib/rss/channel/channelPerson.js +3 -0
- package/dist/lib/rss/channel/channelPodroll.d.ts +1 -1
- package/dist/lib/rss/channel/channelPodroll.d.ts.map +1 -1
- package/dist/lib/rss/channel/channelPodroll.js +3 -0
- package/dist/lib/rss/channel/channelPublisher.d.ts +4 -0
- package/dist/lib/rss/channel/channelPublisher.d.ts.map +1 -0
- package/dist/lib/rss/channel/channelPublisher.js +31 -0
- package/dist/lib/rss/channel/channelRemoteItem.d.ts +1 -1
- package/dist/lib/rss/channel/channelRemoteItem.d.ts.map +1 -1
- package/dist/lib/rss/channel/channelRemoteItem.js +3 -0
- package/dist/lib/rss/channel/channelSeason.d.ts.map +1 -1
- package/dist/lib/rss/channel/channelSeason.js +3 -0
- package/dist/lib/rss/channel/channelSocialInteract.d.ts +1 -1
- package/dist/lib/rss/channel/channelSocialInteract.d.ts.map +1 -1
- package/dist/lib/rss/channel/channelSocialInteract.js +3 -0
- package/dist/lib/rss/channel/channelTrailer.d.ts +1 -1
- package/dist/lib/rss/channel/channelTrailer.d.ts.map +1 -1
- package/dist/lib/rss/channel/channelTrailer.js +4 -1
- package/dist/lib/rss/channel/channelTxt.d.ts +1 -1
- package/dist/lib/rss/channel/channelTxt.d.ts.map +1 -1
- package/dist/lib/rss/channel/channelTxt.js +3 -0
- package/dist/lib/rss/channel/channelValue.d.ts +1 -1
- package/dist/lib/rss/channel/channelValue.d.ts.map +1 -1
- package/dist/lib/rss/channel/channelValue.js +3 -0
- package/dist/lib/rss/feed/feed.d.ts +2 -1
- package/dist/lib/rss/feed/feed.d.ts.map +1 -1
- package/dist/lib/rss/feed/feed.js +33 -14
- package/dist/lib/rss/hash/parsedFeed.d.ts.map +1 -1
- package/dist/lib/rss/item/item.d.ts +36 -3
- package/dist/lib/rss/item/item.d.ts.map +1 -1
- package/dist/lib/rss/item/item.js +153 -22
- package/dist/lib/rss/item/itemAbout.d.ts +1 -1
- package/dist/lib/rss/item/itemAbout.d.ts.map +1 -1
- package/dist/lib/rss/item/itemChaptersFeed.d.ts +1 -1
- package/dist/lib/rss/item/itemChaptersFeed.d.ts.map +1 -1
- package/dist/lib/rss/item/itemChat.d.ts +1 -1
- package/dist/lib/rss/item/itemChat.d.ts.map +1 -1
- package/dist/lib/rss/item/itemDescription.d.ts +1 -1
- package/dist/lib/rss/item/itemDescription.d.ts.map +1 -1
- package/dist/lib/rss/item/itemEnclosure.d.ts +1 -1
- package/dist/lib/rss/item/itemEnclosure.d.ts.map +1 -1
- package/dist/lib/rss/item/itemImage.d.ts +1 -1
- package/dist/lib/rss/item/itemImage.d.ts.map +1 -1
- package/dist/lib/rss/item/itemLicense.d.ts +1 -1
- package/dist/lib/rss/item/itemLicense.d.ts.map +1 -1
- package/dist/lib/rss/item/itemLocation.d.ts +1 -1
- package/dist/lib/rss/item/itemLocation.d.ts.map +1 -1
- package/dist/lib/rss/item/itemPerson.d.ts +1 -1
- package/dist/lib/rss/item/itemPerson.d.ts.map +1 -1
- package/dist/lib/rss/item/itemSeason.d.ts +1 -1
- package/dist/lib/rss/item/itemSeason.d.ts.map +1 -1
- package/dist/lib/rss/item/itemSeasonEpisode.d.ts +1 -1
- package/dist/lib/rss/item/itemSeasonEpisode.d.ts.map +1 -1
- package/dist/lib/rss/item/itemSocialInteract.d.ts +1 -1
- package/dist/lib/rss/item/itemSocialInteract.d.ts.map +1 -1
- package/dist/lib/rss/item/itemSoundbite.d.ts +1 -1
- package/dist/lib/rss/item/itemSoundbite.d.ts.map +1 -1
- package/dist/lib/rss/item/itemTranscript.d.ts +1 -1
- package/dist/lib/rss/item/itemTranscript.d.ts.map +1 -1
- package/dist/lib/rss/item/itemTxt.d.ts +1 -1
- package/dist/lib/rss/item/itemTxt.d.ts.map +1 -1
- package/dist/lib/rss/item/itemValue.d.ts +2 -2
- package/dist/lib/rss/item/itemValue.d.ts.map +1 -1
- package/dist/lib/rss/item/itemValue.js +7 -1
- package/dist/lib/rss/liveItem/liveItem.d.ts +4 -1
- package/dist/lib/rss/liveItem/liveItem.d.ts.map +1 -1
- package/dist/lib/rss/liveItem/liveItem.js +45 -14
- package/dist/lib/rss/parser.d.ts +1 -2
- package/dist/lib/rss/parser.d.ts.map +1 -1
- package/dist/lib/rss/parser.js +52 -49
- package/dist/lib/rss/remoteItemParser.d.ts +3 -0
- package/dist/lib/rss/remoteItemParser.d.ts.map +1 -0
- package/dist/lib/rss/remoteItemParser.js +121 -0
- package/package.json +5 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"liveItem.d.ts","sourceRoot":"","sources":["../../../../src/lib/compat/partytime/liveItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;
|
|
1
|
+
{"version":3,"file":"liveItem.d.ts","sourceRoot":"","sources":["../../../../src/lib/compat/partytime/liveItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AAEpF,OAAO,EAA8B,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAE9E,eAAO,MAAM,mBAAmB,GAAI,iBAAiB,qBAAqB,EAAE;;;;;;;GAoB3E,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.compatLiveItemsDtos = void 0;
|
|
4
|
+
// import { isValidHttpUrl } from "podverse-helpers";
|
|
4
5
|
const podverse_orm_1 = require("podverse-orm");
|
|
5
6
|
const compatLiveItemsDtos = (parsedLiveItems) => {
|
|
6
7
|
var _a;
|
|
@@ -10,7 +11,13 @@ const compatLiveItemsDtos = (parsedLiveItems) => {
|
|
|
10
11
|
liveItem: {
|
|
11
12
|
live_item_status: (_a = (0, podverse_orm_1.getLiveItemStatusEnumValue)(parsedLiveItem.status)) !== null && _a !== void 0 ? _a : podverse_orm_1.LiveItemStatusEnum.Pending,
|
|
12
13
|
start_time: parsedLiveItem.start,
|
|
13
|
-
end_time: parsedLiveItem.end || null
|
|
14
|
+
end_time: parsedLiveItem.end || null,
|
|
15
|
+
/*
|
|
16
|
+
PTDO: why is this type not working?
|
|
17
|
+
Property 'url' does not exist on type 'Phase7Chat | { phase: "4"; url: string; }'.
|
|
18
|
+
Property 'url' does not exist on type 'Phase7Chat'.
|
|
19
|
+
*/
|
|
20
|
+
// chat_web_url: isValidHttpUrl(parsedLiveItem.chat?.url) && parsedLiveItem.chat.url.slice(0, 2083) || null
|
|
14
21
|
},
|
|
15
22
|
item: parsedLiveItem
|
|
16
23
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"value.d.ts","sourceRoot":"","sources":["../../../../src/lib/compat/partytime/value.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAwB,MAAM,mBAAmB,CAAC;AAGtE,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"value.d.ts","sourceRoot":"","sources":["../../../../src/lib/compat/partytime/value.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAwB,MAAM,mBAAmB,CAAC;AAGtE,eAAO,MAAM,kBAAkB,GAAI,OAAO,WAAW;;;;;;;;;;;;;CAOpD,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,OAAO,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCjD,CAAC"}
|
|
@@ -32,7 +32,7 @@ const compatItemValue = (value) => {
|
|
|
32
32
|
item_value_time_splits_recipients: [],
|
|
33
33
|
item_value_time_splits_remote_item: valueTimeSplit.remoteItem ? {
|
|
34
34
|
feed_guid: valueTimeSplit.remoteItem.feedGuid.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_url),
|
|
35
|
-
feed_url: ((_a = valueTimeSplit.remoteItem.feedUrl) === null || _a === void 0 ? void 0 : _a.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_uri)) || null,
|
|
35
|
+
feed_url: (0, podverse_helpers_1.isValidHttpUrl)(valueTimeSplit.remoteItem.feedUrl) && ((_a = valueTimeSplit.remoteItem.feedUrl) === null || _a === void 0 ? void 0 : _a.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_uri)) || null,
|
|
36
36
|
item_guid: ((_b = valueTimeSplit.remoteItem.itemGuid) === null || _b === void 0 ? void 0 : _b.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_normal)) || null,
|
|
37
37
|
title: /* PTDO: ri.title || */ null
|
|
38
38
|
} : null
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NotificationsService, SendNotificationOptions } from "podverse-external-services/dist/services/notifications";
|
|
2
|
+
import { AccountFCMDeviceService, Channel, Item, ItemService } from "podverse-orm";
|
|
3
|
+
import { HandleParsedItemsResult } from "../rss/item/item";
|
|
4
|
+
import { HandleParsedLiveItemsResult } from "../rss/liveItem/liveItem";
|
|
5
|
+
export declare const handleNotifications: (items: Item[], accountFCMDeviceService: AccountFCMDeviceService, sendNotificationMethod: (fcmTokens: string[], options: SendNotificationOptions) => Promise<void>) => Promise<void>;
|
|
6
|
+
export declare const handleNewItemsNotifications: (newItemIdentifiers: HandleParsedItemsResult, channel: Channel, notificationsService: NotificationsService, accountFCMDeviceService: AccountFCMDeviceService, itemService: ItemService) => Promise<void>;
|
|
7
|
+
export declare const handleNewLiveItemsNotifications: (newLiveItemIdentifiers: HandleParsedLiveItemsResult, channel: Channel, notificationsService: NotificationsService, accountFCMDeviceService: AccountFCMDeviceService, itemService: ItemService) => Promise<void>;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/notifications/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,wDAAwD,CAAC;AAEvH,OAAO,EAAE,uBAAuB,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACnF,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAEvE,eAAO,MAAM,mBAAmB,GAC9B,OAAO,IAAI,EAAE,EACb,yBAAyB,uBAAuB,EAChD,wBAAwB,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,uBAAuB,KAAK,OAAO,CAAC,IAAI,CAAC,kBAoBjG,CAAC;AAEF,eAAO,MAAM,2BAA2B,GACtC,oBAAoB,uBAAuB,EAC3C,SAAS,OAAO,EAChB,sBAAsB,oBAAoB,EAC1C,yBAAyB,uBAAuB,EAChD,aAAa,WAAW,kBAkBzB,CAAC;AAEF,eAAO,MAAM,+BAA+B,GAC1C,wBAAwB,2BAA2B,EACnD,SAAS,OAAO,EAChB,sBAAsB,oBAAoB,EAC1C,yBAAyB,uBAAuB,EAChD,aAAa,WAAW,kBAgBzB,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
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.handleNewLiveItemsNotifications = exports.handleNewItemsNotifications = exports.handleNotifications = void 0;
|
|
13
|
+
const podverse_helpers_1 = require("podverse-helpers");
|
|
14
|
+
const handleNotifications = (items, accountFCMDeviceService, sendNotificationMethod) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
+
for (const item of items) {
|
|
16
|
+
const channel = item.channel;
|
|
17
|
+
const fcmTokens = yield accountFCMDeviceService.getFCMTokensByChannelIdText(channel.id_text);
|
|
18
|
+
const channelImage = (0, podverse_helpers_1.findImageBySize)(channel.channel_images, 300, 'lesser');
|
|
19
|
+
const itemImage = (0, podverse_helpers_1.findImageBySize)(item.item_images, 300, 'lesser');
|
|
20
|
+
const sendNotificationOptions = {
|
|
21
|
+
itemFullImageUrl: (itemImage === null || itemImage === void 0 ? void 0 : itemImage.url) || null,
|
|
22
|
+
itemGuid: item.guid,
|
|
23
|
+
itemIdText: item.id_text,
|
|
24
|
+
itemTitle: item.title,
|
|
25
|
+
channelIdText: item.channel.channel_id_text,
|
|
26
|
+
channelFullImageUrl: (channelImage === null || channelImage === void 0 ? void 0 : channelImage.url) || null,
|
|
27
|
+
channelTitle: item.channel.title
|
|
28
|
+
};
|
|
29
|
+
yield sendNotificationMethod(fcmTokens, sendNotificationOptions);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
exports.handleNotifications = handleNotifications;
|
|
33
|
+
const handleNewItemsNotifications = (newItemIdentifiers, channel, notificationsService, accountFCMDeviceService, itemService) => __awaiter(void 0, void 0, void 0, function* () {
|
|
34
|
+
const itemsByGuid = yield itemService.getManyByGuid(channel, newItemIdentifiers.newItemGuids, {
|
|
35
|
+
relations: ['channel', 'channel.channel_images', 'item_images']
|
|
36
|
+
});
|
|
37
|
+
const itemsByGuidEnclosureUrl = yield itemService.getManyByGuidEnclosureUrl(channel, newItemIdentifiers.newItemGuids);
|
|
38
|
+
const itemsToNotify = itemsByGuid.concat(itemsByGuidEnclosureUrl);
|
|
39
|
+
yield (0, exports.handleNotifications)(itemsToNotify, accountFCMDeviceService, notificationsService.sendNewItemDetectedNotifications);
|
|
40
|
+
});
|
|
41
|
+
exports.handleNewItemsNotifications = handleNewItemsNotifications;
|
|
42
|
+
const handleNewLiveItemsNotifications = (newLiveItemIdentifiers, channel, notificationsService, accountFCMDeviceService, itemService) => __awaiter(void 0, void 0, void 0, function* () {
|
|
43
|
+
const itemsByGuid = yield itemService.getManyByGuid(channel, newLiveItemIdentifiers.newItemGuids, {
|
|
44
|
+
relations: ['channel', 'channel.channel_images', 'item_images']
|
|
45
|
+
});
|
|
46
|
+
yield (0, exports.handleNotifications)(itemsByGuid, accountFCMDeviceService, notificationsService.sendLiveItemLiveDetectedNotifications);
|
|
47
|
+
});
|
|
48
|
+
exports.handleNewLiveItemsNotifications = handleNewLiveItemsNotifications;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handleParsedManyData.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/base/handleParsedManyData.ts"],"names":[],"mappings":"AAAA,UAAU,OAAO,CAAC,CAAC,EAAE,CAAC;IACpB,UAAU,CAAC,YAAY,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;IAC9D,SAAS,CAAC,YAAY,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3C;AAED,eAAO,MAAM,oBAAoB,GAAS,CAAC,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"handleParsedManyData.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/base/handleParsedManyData.ts"],"names":[],"mappings":"AAAA,UAAU,OAAO,CAAC,CAAC,EAAE,CAAC;IACpB,UAAU,CAAC,YAAY,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;IAC9D,SAAS,CAAC,YAAY,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3C;AAED,eAAO,MAAM,oBAAoB,GAAS,CAAC,EAAE,CAAC,EAC5C,cAAc,CAAC,EACf,SAAS,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,EACtB,MAAM,OAAO,CAAC,CAAC,CAAC,EAAE,kBAOnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handleParsedOneData.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/base/handleParsedOneData.ts"],"names":[],"mappings":"AAAA,UAAU,OAAO,CAAC,CAAC,EAAE,CAAC;IACpB,MAAM,CAAC,YAAY,EAAE,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACrD,OAAO,CAAC,CAAC,YAAY,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1C;AAED,eAAO,MAAM,mBAAmB,GAAU,CAAC,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"handleParsedOneData.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/base/handleParsedOneData.ts"],"names":[],"mappings":"AAAA,UAAU,OAAO,CAAC,CAAC,EAAE,CAAC;IACpB,MAAM,CAAC,YAAY,EAAE,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACrD,OAAO,CAAC,CAAC,YAAY,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1C;AAED,eAAO,MAAM,mBAAmB,GAAU,CAAC,EAAE,CAAC,EAC5C,cAAc,CAAC,EACf,SAAS,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,EACtB,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,kBAOvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/channel/channel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/channel/channel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAA0B,OAAO,EAAkB,kBAAkB,EAAiB,MAAM,cAAc,CAAC;AAoBlH,eAAO,MAAM,mBAAmB,GAAU,YAAY,UAAU,EAAE,SAAS,OAAO,EAAE,oBAAoB,kBAAkB,kBAgBzH,CAAC"}
|
|
@@ -10,9 +10,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.handleParsedChannel = void 0;
|
|
13
|
+
const podverse_helpers_1 = require("podverse-helpers");
|
|
13
14
|
const podverse_orm_1 = require("podverse-orm");
|
|
15
|
+
const config_1 = require("@parser/config");
|
|
14
16
|
const channel_1 = require("@parser/lib/compat/partytime/channel");
|
|
15
17
|
const channelAbout_1 = require("@parser/lib/rss/channel/channelAbout");
|
|
18
|
+
const channelCategory_1 = require("@parser/lib/rss/channel/channelCategory");
|
|
16
19
|
const channelChat_1 = require("@parser/lib/rss/channel/channelChat");
|
|
17
20
|
const channelDescription_1 = require("@parser/lib/rss/channel/channelDescription");
|
|
18
21
|
const channelFunding_1 = require("@parser/lib/rss/channel/channelFunding");
|
|
@@ -21,41 +24,43 @@ const channelLicense_1 = require("@parser/lib/rss/channel/channelLicense");
|
|
|
21
24
|
const channelLocation_1 = require("@parser/lib/rss/channel/channelLocation");
|
|
22
25
|
const channelPerson_1 = require("@parser/lib/rss/channel/channelPerson");
|
|
23
26
|
const channelPodroll_1 = require("@parser/lib/rss/channel/channelPodroll");
|
|
27
|
+
const channelPublisher_1 = require("@parser/lib/rss/channel/channelPublisher");
|
|
24
28
|
const channelRemoteItem_1 = require("@parser/lib/rss/channel/channelRemoteItem");
|
|
25
29
|
const channelSocialInteract_1 = require("@parser/lib/rss/channel/channelSocialInteract");
|
|
26
30
|
const channelTrailer_1 = require("@parser/lib/rss/channel/channelTrailer");
|
|
27
31
|
const channelTxt_1 = require("@parser/lib/rss/channel/channelTxt");
|
|
28
32
|
const channelValue_1 = require("@parser/lib/rss/channel/channelValue");
|
|
29
33
|
const handleParsedChannel = (parsedFeed, channel, channelSeasonIndex) => __awaiter(void 0, void 0, void 0, function* () {
|
|
34
|
+
podverse_helpers_1.timerManager.start('handleParsedChannel');
|
|
30
35
|
const channelService = new podverse_orm_1.ChannelService();
|
|
31
36
|
const channelDto = (0, channel_1.compatChannelDto)(parsedFeed);
|
|
32
37
|
yield channelService.update(channel.id, channelDto);
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
yield (0,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
yield (0, channelPerson_1.handleParsedChannelPerson)(parsedFeed, channel, transactionalEntityManager);
|
|
43
|
-
yield (0, channelPodroll_1.handleParsedChannelPodroll)(parsedFeed, channel, transactionalEntityManager);
|
|
44
|
-
// PTDO: add channelPublisher support
|
|
45
|
-
// const channelPublisherService = new ChannelPublisherService();
|
|
46
|
-
// const channelPublisherRemoteItemService = new ChannelPublisherRemoteItemService();
|
|
47
|
-
// const channelPublisherRemoteItemDtos = compatChannelPublisherRemoteItemDtos(parsedFeed);
|
|
48
|
-
// if (channelPublisherRemoteItemDtos.length > 0) {
|
|
49
|
-
// const channel_publisher = await channelPublisherService.update(channel);
|
|
50
|
-
// await channelPublisherRemoteItemService.updateMany(channel_publisher, channelPodrollRemoteItemDtos);
|
|
51
|
-
// } else {
|
|
52
|
-
// await channelPublisherService.delete(channel);
|
|
53
|
-
// }
|
|
54
|
-
yield (0, channelRemoteItem_1.handleParsedChannelRemoteItem)(parsedFeed, channel, transactionalEntityManager);
|
|
55
|
-
yield (0, channelSocialInteract_1.handleParsedChannelSocialInteract)(parsedFeed, channel, transactionalEntityManager);
|
|
56
|
-
yield (0, channelTrailer_1.handleParsedChannelTrailer)(parsedFeed, channel, channelSeasonIndex, transactionalEntityManager);
|
|
57
|
-
yield (0, channelTxt_1.handleParsedChannelTxt)(parsedFeed, channel, transactionalEntityManager);
|
|
58
|
-
yield (0, channelValue_1.handleParsedChannelValue)(parsedFeed, channel, transactionalEntityManager);
|
|
59
|
-
}));
|
|
38
|
+
if (config_1.config.shouldLogTimer) {
|
|
39
|
+
yield handleParsingTables(parsedFeed, channel, channelSeasonIndex);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
yield podverse_orm_1.AppDataSourceReadWrite.manager.transaction((transactionalEntityManager) => __awaiter(void 0, void 0, void 0, function* () {
|
|
43
|
+
yield handleParsingTables(parsedFeed, channel, channelSeasonIndex, transactionalEntityManager);
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
podverse_helpers_1.timerManager.end('handleParsedChannel');
|
|
60
47
|
});
|
|
61
48
|
exports.handleParsedChannel = handleParsedChannel;
|
|
49
|
+
const handleParsingTables = (parsedFeed, channel, channelSeasonIndex, transactionalEntityManager) => __awaiter(void 0, void 0, void 0, function* () {
|
|
50
|
+
yield (0, channelAbout_1.handleParsedChannelAbout)(parsedFeed, channel, transactionalEntityManager);
|
|
51
|
+
yield (0, channelCategory_1.handleParsedChannelCategory)(parsedFeed, channel, transactionalEntityManager);
|
|
52
|
+
yield (0, channelChat_1.handleParsedChannelChat)(parsedFeed, channel, transactionalEntityManager);
|
|
53
|
+
yield (0, channelDescription_1.handleParsedChannelDescription)(parsedFeed, channel, transactionalEntityManager);
|
|
54
|
+
yield (0, channelFunding_1.handleParsedChannelFunding)(parsedFeed, channel, transactionalEntityManager);
|
|
55
|
+
yield (0, channelImage_1.handleParsedChannelImage)(parsedFeed, channel, transactionalEntityManager);
|
|
56
|
+
yield (0, channelLicense_1.handleParsedChannelLicense)(parsedFeed, channel, transactionalEntityManager);
|
|
57
|
+
yield (0, channelLocation_1.handleParsedChannelLocation)(parsedFeed, channel, transactionalEntityManager);
|
|
58
|
+
yield (0, channelPerson_1.handleParsedChannelPerson)(parsedFeed, channel, transactionalEntityManager);
|
|
59
|
+
yield (0, channelPodroll_1.handleParsedChannelPodroll)(parsedFeed, channel, transactionalEntityManager);
|
|
60
|
+
yield (0, channelPublisher_1.handleParsedChannelPublisher)(parsedFeed, channel, transactionalEntityManager);
|
|
61
|
+
yield (0, channelRemoteItem_1.handleParsedChannelRemoteItem)(parsedFeed, channel, transactionalEntityManager);
|
|
62
|
+
yield (0, channelSocialInteract_1.handleParsedChannelSocialInteract)(parsedFeed, channel, transactionalEntityManager);
|
|
63
|
+
yield (0, channelTrailer_1.handleParsedChannelTrailer)(parsedFeed, channel, channelSeasonIndex, transactionalEntityManager);
|
|
64
|
+
yield (0, channelTxt_1.handleParsedChannelTxt)(parsedFeed, channel, transactionalEntityManager);
|
|
65
|
+
yield (0, channelValue_1.handleParsedChannelValue)(parsedFeed, channel, transactionalEntityManager);
|
|
66
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { FeedObject } from "podcast-partytime";
|
|
2
2
|
import { Channel, EntityManager } from "podverse-orm";
|
|
3
|
-
export declare const handleParsedChannelAbout: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager
|
|
3
|
+
export declare const handleParsedChannelAbout: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager?: EntityManager) => Promise<void>;
|
|
4
4
|
//# sourceMappingURL=channelAbout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channelAbout.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/channel/channelAbout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"channelAbout.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/channel/channelAbout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAuB,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG3E,eAAO,MAAM,wBAAwB,GACnC,YAAY,UAAU,EACtB,SAAS,OAAO,EAChB,6BAA6B,aAAa,kBAO3C,CAAC"}
|
|
@@ -10,11 +10,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.handleParsedChannelAbout = void 0;
|
|
13
|
+
const podverse_helpers_1 = require("podverse-helpers");
|
|
13
14
|
const podverse_orm_1 = require("podverse-orm");
|
|
14
15
|
const channel_1 = require("@parser/lib/compat/partytime/channel");
|
|
15
16
|
const handleParsedChannelAbout = (parsedFeed, channel, transactionalEntityManager) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
|
+
podverse_helpers_1.timerManager.start("handleParsedChannelAbout");
|
|
16
18
|
const channelAboutService = new podverse_orm_1.ChannelAboutService(transactionalEntityManager);
|
|
17
19
|
const channelAboutDto = (0, channel_1.compatChannelAboutDto)(parsedFeed);
|
|
18
20
|
yield channelAboutService.update(channel, channelAboutDto);
|
|
21
|
+
podverse_helpers_1.timerManager.end("handleParsedChannelAbout");
|
|
19
22
|
});
|
|
20
23
|
exports.handleParsedChannelAbout = handleParsedChannelAbout;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FeedObject } from "podcast-partytime";
|
|
2
|
+
import { Channel, EntityManager } from "podverse-orm";
|
|
3
|
+
export declare const handleParsedChannelCategory: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager?: EntityManager) => Promise<void>;
|
|
4
|
+
//# sourceMappingURL=channelCategory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channelCategory.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/channel/channelCategory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,OAAO,EAA0B,aAAa,EAAE,MAAM,cAAc,CAAC;AAG9E,eAAO,MAAM,2BAA2B,GACtC,YAAY,UAAU,EACtB,SAAS,OAAO,EAChB,6BAA6B,aAAa,kBAY3C,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.handleParsedChannelCategory = void 0;
|
|
13
|
+
const podverse_helpers_1 = require("podverse-helpers");
|
|
14
|
+
const podverse_orm_1 = require("podverse-orm");
|
|
15
|
+
const channel_1 = require("@parser/lib/compat/partytime/channel");
|
|
16
|
+
const handleParsedChannelCategory = (parsedFeed, channel, transactionalEntityManager) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
|
+
podverse_helpers_1.timerManager.start("handleParsedChannelCategory");
|
|
18
|
+
const channelCategoryService = new podverse_orm_1.ChannelCategoryService(transactionalEntityManager);
|
|
19
|
+
const channelCategoryDtos = (0, channel_1.compatChannelCategoryDtos)(parsedFeed);
|
|
20
|
+
if (channelCategoryDtos.length > 0) {
|
|
21
|
+
yield channelCategoryService.updateMany(channel, channelCategoryDtos);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
yield channelCategoryService.deleteAll(channel);
|
|
25
|
+
}
|
|
26
|
+
podverse_helpers_1.timerManager.end("handleParsedChannelCategory");
|
|
27
|
+
});
|
|
28
|
+
exports.handleParsedChannelCategory = handleParsedChannelCategory;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { FeedObject } from "podcast-partytime";
|
|
2
2
|
import { Channel, EntityManager } from "podverse-orm";
|
|
3
|
-
export declare const handleParsedChannelChat: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager
|
|
3
|
+
export declare const handleParsedChannelChat: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager?: EntityManager) => Promise<void>;
|
|
4
4
|
//# sourceMappingURL=channelChat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channelChat.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/channel/channelChat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"channelChat.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/channel/channelChat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAsB,aAAa,EAAE,MAAM,cAAc,CAAC;AAI1E,eAAO,MAAM,uBAAuB,GAClC,YAAY,UAAU,EACtB,SAAS,OAAO,EAChB,6BAA6B,aAAa,kBAO3C,CAAC"}
|
|
@@ -10,12 +10,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.handleParsedChannelChat = void 0;
|
|
13
|
+
const podverse_helpers_1 = require("podverse-helpers");
|
|
13
14
|
const podverse_orm_1 = require("podverse-orm");
|
|
14
15
|
const channel_1 = require("@parser/lib/compat/partytime/channel");
|
|
15
16
|
const handleParsedOneData_1 = require("../base/handleParsedOneData");
|
|
16
17
|
const handleParsedChannelChat = (parsedFeed, channel, transactionalEntityManager) => __awaiter(void 0, void 0, void 0, function* () {
|
|
18
|
+
podverse_helpers_1.timerManager.start("handleParsedChannelChat");
|
|
17
19
|
const channelChatService = new podverse_orm_1.ChannelChatService(transactionalEntityManager);
|
|
18
20
|
const channelChatDto = (0, channel_1.compatChannelChatDto)(parsedFeed);
|
|
19
21
|
yield (0, handleParsedOneData_1.handleParsedOneData)(channel, channelChatService, channelChatDto);
|
|
22
|
+
podverse_helpers_1.timerManager.end("handleParsedChannelChat");
|
|
20
23
|
});
|
|
21
24
|
exports.handleParsedChannelChat = handleParsedChannelChat;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { FeedObject } from "podcast-partytime";
|
|
2
2
|
import { Channel, EntityManager } from "podverse-orm";
|
|
3
|
-
export declare const handleParsedChannelDescription: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager
|
|
3
|
+
export declare const handleParsedChannelDescription: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager?: EntityManager) => Promise<void>;
|
|
4
4
|
//# sourceMappingURL=channelDescription.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channelDescription.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/channel/channelDescription.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"channelDescription.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/channel/channelDescription.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,OAAO,EAA6B,aAAa,EAAE,MAAM,cAAc,CAAC;AAIjF,eAAO,MAAM,8BAA8B,GACzC,YAAY,UAAU,EACtB,SAAS,OAAO,EAChB,6BAA6B,aAAa,kBAO3C,CAAC"}
|
|
@@ -10,12 +10,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.handleParsedChannelDescription = void 0;
|
|
13
|
+
const podverse_helpers_1 = require("podverse-helpers");
|
|
13
14
|
const podverse_orm_1 = require("podverse-orm");
|
|
14
15
|
const channel_1 = require("@parser/lib/compat/partytime/channel");
|
|
15
16
|
const handleParsedOneData_1 = require("../base/handleParsedOneData");
|
|
16
17
|
const handleParsedChannelDescription = (parsedFeed, channel, transactionalEntityManager) => __awaiter(void 0, void 0, void 0, function* () {
|
|
18
|
+
podverse_helpers_1.timerManager.start("handleParsedChannelDescription");
|
|
17
19
|
const channelDescriptionService = new podverse_orm_1.ChannelDescriptionService(transactionalEntityManager);
|
|
18
20
|
const channelDescriptionDto = (0, channel_1.compatChannelDescriptionDto)(parsedFeed);
|
|
19
21
|
yield (0, handleParsedOneData_1.handleParsedOneData)(channel, channelDescriptionService, channelDescriptionDto);
|
|
22
|
+
podverse_helpers_1.timerManager.end("handleParsedChannelDescription");
|
|
20
23
|
});
|
|
21
24
|
exports.handleParsedChannelDescription = handleParsedChannelDescription;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { FeedObject } from "podcast-partytime";
|
|
2
2
|
import { Channel, EntityManager } from "podverse-orm";
|
|
3
|
-
export declare const handleParsedChannelFunding: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager
|
|
3
|
+
export declare const handleParsedChannelFunding: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager?: EntityManager) => Promise<void>;
|
|
4
4
|
//# sourceMappingURL=channelFunding.d.ts.map
|
|
@@ -1 +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;
|
|
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;AAE/C,OAAO,EAAE,OAAO,EAAyB,aAAa,EAAE,MAAM,cAAc,CAAC;AAI7E,eAAO,MAAM,0BAA0B,GACrC,YAAY,UAAU,EACtB,SAAS,OAAO,EAChB,6BAA6B,aAAa,kBAO3C,CAAC"}
|
|
@@ -10,12 +10,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.handleParsedChannelFunding = void 0;
|
|
13
|
+
const podverse_helpers_1 = require("podverse-helpers");
|
|
13
14
|
const podverse_orm_1 = require("podverse-orm");
|
|
14
15
|
const channel_1 = require("@parser/lib/compat/partytime/channel");
|
|
15
16
|
const handleParsedManyData_1 = require("../base/handleParsedManyData");
|
|
16
17
|
const handleParsedChannelFunding = (parsedFeed, channel, transactionalEntityManager) => __awaiter(void 0, void 0, void 0, function* () {
|
|
18
|
+
podverse_helpers_1.timerManager.start("handleParsedChannelFunding");
|
|
17
19
|
const channelFundingService = new podverse_orm_1.ChannelFundingService(transactionalEntityManager);
|
|
18
20
|
const channelFundingDtos = (0, channel_1.compatChannelFundingDtos)(parsedFeed);
|
|
19
21
|
yield (0, handleParsedManyData_1.handleParsedManyData)(channel, channelFundingService, channelFundingDtos);
|
|
22
|
+
podverse_helpers_1.timerManager.end("handleParsedChannelFunding");
|
|
20
23
|
});
|
|
21
24
|
exports.handleParsedChannelFunding = handleParsedChannelFunding;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { FeedObject } from "podcast-partytime";
|
|
2
2
|
import { Channel, EntityManager } from "podverse-orm";
|
|
3
|
-
export declare const handleParsedChannelImage: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager
|
|
3
|
+
export declare const handleParsedChannelImage: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager?: EntityManager) => Promise<void>;
|
|
4
4
|
//# sourceMappingURL=channelImage.d.ts.map
|
|
@@ -1 +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;
|
|
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;AAE/C,OAAO,EAAE,OAAO,EAAuB,aAAa,EAAE,MAAM,cAAc,CAAC;AAI3E,eAAO,MAAM,wBAAwB,GACnC,YAAY,UAAU,EACtB,SAAS,OAAO,EAChB,6BAA6B,aAAa,kBAO3C,CAAC"}
|
|
@@ -10,12 +10,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.handleParsedChannelImage = void 0;
|
|
13
|
+
const podverse_helpers_1 = require("podverse-helpers");
|
|
13
14
|
const podverse_orm_1 = require("podverse-orm");
|
|
14
15
|
const channel_1 = require("@parser/lib/compat/partytime/channel");
|
|
15
16
|
const handleParsedManyData_1 = require("../base/handleParsedManyData");
|
|
16
17
|
const handleParsedChannelImage = (parsedFeed, channel, transactionalEntityManager) => __awaiter(void 0, void 0, void 0, function* () {
|
|
18
|
+
podverse_helpers_1.timerManager.start("handleParsedChannelImage");
|
|
17
19
|
const channelImageService = new podverse_orm_1.ChannelImageService(transactionalEntityManager);
|
|
18
20
|
const channelImageDtos = (0, channel_1.compatChannelImageDtos)(parsedFeed);
|
|
19
21
|
yield (0, handleParsedManyData_1.handleParsedManyData)(channel, channelImageService, channelImageDtos);
|
|
22
|
+
podverse_helpers_1.timerManager.end("handleParsedChannelImage");
|
|
20
23
|
});
|
|
21
24
|
exports.handleParsedChannelImage = handleParsedChannelImage;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { FeedObject } from "podcast-partytime";
|
|
2
2
|
import { Channel, EntityManager } from "podverse-orm";
|
|
3
|
-
export declare const handleParsedChannelLicense: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager
|
|
3
|
+
export declare const handleParsedChannelLicense: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager?: EntityManager) => Promise<void>;
|
|
4
4
|
//# sourceMappingURL=channelLicense.d.ts.map
|
|
@@ -1 +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;
|
|
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;AAE/C,OAAO,EAAE,OAAO,EAAyB,aAAa,EAAE,MAAM,cAAc,CAAC;AAI7E,eAAO,MAAM,0BAA0B,GACrC,YAAY,UAAU,EACtB,SAAS,OAAO,EAChB,6BAA6B,aAAa,kBAO3C,CAAC"}
|
|
@@ -10,12 +10,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.handleParsedChannelLicense = void 0;
|
|
13
|
+
const podverse_helpers_1 = require("podverse-helpers");
|
|
13
14
|
const podverse_orm_1 = require("podverse-orm");
|
|
14
15
|
const channel_1 = require("@parser/lib/compat/partytime/channel");
|
|
15
16
|
const handleParsedOneData_1 = require("../base/handleParsedOneData");
|
|
16
17
|
const handleParsedChannelLicense = (parsedFeed, channel, transactionalEntityManager) => __awaiter(void 0, void 0, void 0, function* () {
|
|
18
|
+
podverse_helpers_1.timerManager.start("handleParsedChannelLicense");
|
|
17
19
|
const channelLicenseService = new podverse_orm_1.ChannelLicenseService(transactionalEntityManager);
|
|
18
20
|
const channelLicenseDtos = (0, channel_1.compatChannelLicenseDto)(parsedFeed);
|
|
19
21
|
yield (0, handleParsedOneData_1.handleParsedOneData)(channel, channelLicenseService, channelLicenseDtos);
|
|
22
|
+
podverse_helpers_1.timerManager.end("handleParsedChannelLicense");
|
|
20
23
|
});
|
|
21
24
|
exports.handleParsedChannelLicense = handleParsedChannelLicense;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { FeedObject } from "podcast-partytime";
|
|
2
2
|
import { Channel, EntityManager } from "podverse-orm";
|
|
3
|
-
export declare const handleParsedChannelLocation: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager
|
|
3
|
+
export declare const handleParsedChannelLocation: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager?: EntityManager) => Promise<void>;
|
|
4
4
|
//# sourceMappingURL=channelLocation.d.ts.map
|
|
@@ -1 +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;
|
|
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;AAE/C,OAAO,EAAE,OAAO,EAA0B,aAAa,EAAE,MAAM,cAAc,CAAC;AAI9E,eAAO,MAAM,2BAA2B,GACtC,YAAY,UAAU,EACtB,SAAS,OAAO,EAChB,6BAA6B,aAAa,kBAO3C,CAAC"}
|
|
@@ -10,12 +10,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.handleParsedChannelLocation = void 0;
|
|
13
|
+
const podverse_helpers_1 = require("podverse-helpers");
|
|
13
14
|
const podverse_orm_1 = require("podverse-orm");
|
|
14
15
|
const channel_1 = require("@parser/lib/compat/partytime/channel");
|
|
15
16
|
const handleParsedOneData_1 = require("../base/handleParsedOneData");
|
|
16
17
|
const handleParsedChannelLocation = (parsedFeed, channel, transactionalEntityManager) => __awaiter(void 0, void 0, void 0, function* () {
|
|
18
|
+
podverse_helpers_1.timerManager.start("handleParsedChannelLocation");
|
|
17
19
|
const channelLocationService = new podverse_orm_1.ChannelLocationService(transactionalEntityManager);
|
|
18
20
|
const channelLocationDtos = (0, channel_1.compatChannelLocationDto)(parsedFeed);
|
|
19
21
|
yield (0, handleParsedOneData_1.handleParsedOneData)(channel, channelLocationService, channelLocationDtos);
|
|
22
|
+
podverse_helpers_1.timerManager.end("handleParsedChannelLocation");
|
|
20
23
|
});
|
|
21
24
|
exports.handleParsedChannelLocation = handleParsedChannelLocation;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { FeedObject } from "podcast-partytime";
|
|
2
2
|
import { Channel, EntityManager } from "podverse-orm";
|
|
3
|
-
export declare const handleParsedChannelPerson: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager
|
|
3
|
+
export declare const handleParsedChannelPerson: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager?: EntityManager) => Promise<void>;
|
|
4
4
|
//# sourceMappingURL=channelPerson.d.ts.map
|
|
@@ -1 +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;
|
|
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;AAE/C,OAAO,EAAE,OAAO,EAAwB,aAAa,EAAE,MAAM,cAAc,CAAC;AAI5E,eAAO,MAAM,yBAAyB,GACpC,YAAY,UAAU,EACtB,SAAS,OAAO,EAChB,6BAA6B,aAAa,kBAO3C,CAAC"}
|
|
@@ -10,12 +10,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.handleParsedChannelPerson = void 0;
|
|
13
|
+
const podverse_helpers_1 = require("podverse-helpers");
|
|
13
14
|
const podverse_orm_1 = require("podverse-orm");
|
|
14
15
|
const channel_1 = require("@parser/lib/compat/partytime/channel");
|
|
15
16
|
const handleParsedManyData_1 = require("../base/handleParsedManyData");
|
|
16
17
|
const handleParsedChannelPerson = (parsedFeed, channel, transactionalEntityManager) => __awaiter(void 0, void 0, void 0, function* () {
|
|
18
|
+
podverse_helpers_1.timerManager.start("handleParsedChannelPerson");
|
|
17
19
|
const channelPersonService = new podverse_orm_1.ChannelPersonService(transactionalEntityManager);
|
|
18
20
|
const channelPersonDtos = (0, channel_1.compatChannelPersonDtos)(parsedFeed);
|
|
19
21
|
yield (0, handleParsedManyData_1.handleParsedManyData)(channel, channelPersonService, channelPersonDtos);
|
|
22
|
+
podverse_helpers_1.timerManager.end("handleParsedChannelPerson");
|
|
20
23
|
});
|
|
21
24
|
exports.handleParsedChannelPerson = handleParsedChannelPerson;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { FeedObject } from "podcast-partytime";
|
|
2
2
|
import { Channel, EntityManager } from "podverse-orm";
|
|
3
|
-
export declare const handleParsedChannelPodroll: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager
|
|
3
|
+
export declare const handleParsedChannelPodroll: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager?: EntityManager) => Promise<void>;
|
|
4
4
|
//# sourceMappingURL=channelPodroll.d.ts.map
|
|
@@ -1 +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;
|
|
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;AAE/C,OAAO,EAAE,OAAO,EAA0D,aAAa,EAAE,MAAM,cAAc,CAAC;AAG9G,eAAO,MAAM,0BAA0B,GACrC,YAAY,UAAU,EACtB,SAAS,OAAO,EAChB,6BAA6B,aAAa,kBAe3C,CAAC"}
|
|
@@ -10,9 +10,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.handleParsedChannelPodroll = void 0;
|
|
13
|
+
const podverse_helpers_1 = require("podverse-helpers");
|
|
13
14
|
const podverse_orm_1 = require("podverse-orm");
|
|
14
15
|
const channel_1 = require("@parser/lib/compat/partytime/channel");
|
|
15
16
|
const handleParsedChannelPodroll = (parsedFeed, channel, transactionalEntityManager) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
|
+
podverse_helpers_1.timerManager.start("handleParsedChannelPodroll");
|
|
16
18
|
const channelPodrollService = new podverse_orm_1.ChannelPodrollService(transactionalEntityManager);
|
|
17
19
|
const channelPodrollDto = {};
|
|
18
20
|
const channelPodrollRemoteItemService = new podverse_orm_1.ChannelPodrollRemoteItemService(transactionalEntityManager);
|
|
@@ -24,5 +26,6 @@ const handleParsedChannelPodroll = (parsedFeed, channel, transactionalEntityMana
|
|
|
24
26
|
else {
|
|
25
27
|
yield channelPodrollService.delete(channel);
|
|
26
28
|
}
|
|
29
|
+
podverse_helpers_1.timerManager.end("handleParsedChannelPodroll");
|
|
27
30
|
});
|
|
28
31
|
exports.handleParsedChannelPodroll = handleParsedChannelPodroll;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FeedObject } from "podcast-partytime";
|
|
2
|
+
import { Channel, EntityManager } from "podverse-orm";
|
|
3
|
+
export declare const handleParsedChannelPublisher: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager?: EntityManager) => Promise<void>;
|
|
4
|
+
//# sourceMappingURL=channelPublisher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channelPublisher.d.ts","sourceRoot":"","sources":["../../../../src/lib/rss/channel/channelPublisher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,OAAO,EAA8D,aAAa,EAAE,MAAM,cAAc,CAAC;AAGlH,eAAO,MAAM,4BAA4B,GACvC,YAAY,UAAU,EACtB,SAAS,OAAO,EAChB,6BAA6B,aAAa,kBAe3C,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
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.handleParsedChannelPublisher = void 0;
|
|
13
|
+
const podverse_helpers_1 = require("podverse-helpers");
|
|
14
|
+
const podverse_orm_1 = require("podverse-orm");
|
|
15
|
+
const channel_1 = require("@parser/lib/compat/partytime/channel");
|
|
16
|
+
const handleParsedChannelPublisher = (parsedFeed, channel, transactionalEntityManager) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
|
+
podverse_helpers_1.timerManager.start("handleParsedChannelPublisher");
|
|
18
|
+
const channelPublisherService = new podverse_orm_1.ChannelPublisherService(transactionalEntityManager);
|
|
19
|
+
const channelPublisherDto = {};
|
|
20
|
+
const channelPublisherRemoteItemService = new podverse_orm_1.ChannelPublisherRemoteItemService(transactionalEntityManager);
|
|
21
|
+
const channelPublisherRemoteItemDtos = (0, channel_1.compatChannelPublisherRemoteItemDtos)(parsedFeed);
|
|
22
|
+
if (channelPublisherRemoteItemDtos.length > 0) {
|
|
23
|
+
const channel_publisher = yield channelPublisherService.update(channel, channelPublisherDto);
|
|
24
|
+
yield channelPublisherRemoteItemService.updateMany(channel_publisher, channelPublisherRemoteItemDtos);
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
yield channelPublisherService.delete(channel);
|
|
28
|
+
}
|
|
29
|
+
podverse_helpers_1.timerManager.end("handleParsedChannelPublisher");
|
|
30
|
+
});
|
|
31
|
+
exports.handleParsedChannelPublisher = handleParsedChannelPublisher;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { FeedObject } from "podcast-partytime";
|
|
2
2
|
import { Channel, EntityManager } from "podverse-orm";
|
|
3
|
-
export declare const handleParsedChannelRemoteItem: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager
|
|
3
|
+
export declare const handleParsedChannelRemoteItem: (parsedFeed: FeedObject, channel: Channel, transactionalEntityManager?: EntityManager) => Promise<void>;
|
|
4
4
|
//# sourceMappingURL=channelRemoteItem.d.ts.map
|
|
@@ -1 +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;
|
|
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;AAE/C,OAAO,EAAE,OAAO,EAA4B,aAAa,EAAE,MAAM,cAAc,CAAC;AAIhF,eAAO,MAAM,6BAA6B,GACxC,YAAY,UAAU,EACtB,SAAS,OAAO,EAChB,6BAA6B,aAAa,kBAO3C,CAAC"}
|