podverse-parser 5.0.2 → 5.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,37 @@
1
+ # podverse-parser
2
+
3
+ A module used for handling RSS and other file type parsing operations.
4
+
5
+ ## Dev Setup
6
+
7
+ ### Environment Variables
8
+
9
+ The environment variables for this module must be set within the app that consumes this module (ex. `podverse-api` or `podverse-workers`). See `podverse-parser/config/index.ts` for a list of the env vars expected.
10
+
11
+ ### Local Dev Workflow
12
+
13
+ Podverse uses many modules that are maintained in separate repos, and they need to be linked and running for a local dev workflow. Please read the `podverse-ops/dev/local-dev-setup.md` file to set up the required dependencies and module linking.
14
+
15
+ ### Running Locally
16
+
17
+ Install the node_modules:
18
+
19
+ ```
20
+ npm install
21
+ ```
22
+
23
+ Then to build:
24
+
25
+ ```
26
+ npm run build
27
+ ```
28
+
29
+ Or if you want the app to auto-build on saved changes:
30
+
31
+ ```
32
+ npm run build:watch
33
+ ```
34
+
35
+ ## Publishing
36
+
37
+ To publish your changes to npm, increment the version number is `package.json` then run `npm publish`.
@@ -1,21 +1,21 @@
1
1
  import { FeedObject } from "podcast-partytime";
2
2
  export declare const compatChannelDto: (parsedFeed: FeedObject) => {
3
- podcast_guid: string | undefined;
4
- title: string;
5
- sortable_title: string;
3
+ podcast_guid: string | null;
4
+ title: string | null;
5
+ sortable_title: string | null;
6
6
  medium: import("podverse-orm").MediumEnum | null;
7
7
  };
8
8
  export declare const compatChannelAboutDto: (parsedFeed: FeedObject) => {
9
9
  author: string | null;
10
10
  explicit: boolean | null;
11
11
  language: string | null;
12
- last_pub_date: Date | null;
13
12
  website_link_url: string | null;
14
13
  itunes_type: import("podverse-orm").ChannelItunesTypeItunesTypeEnum;
15
14
  episode_count: number;
15
+ last_pub_date: Date;
16
16
  };
17
17
  export declare const compatChannelChatDto: (parsedFeed: FeedObject) => {
18
- server: string;
18
+ server: string | null;
19
19
  protocol: string;
20
20
  account_id: string | null;
21
21
  space: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../../../src/lib/compat/partytime/channel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAgB,MAAM,mBAAmB,CAAC;AAM7D,eAAO,MAAM,gBAAgB,eAAgB,UAAU;;;;;CAKrD,CAAC;AAEH,eAAO,MAAM,qBAAqB,eAAgB,UAAU;;;;;;;;CAQ1D,CAAC;AAEH,eAAO,MAAM,oBAAoB,eAAgB,UAAU;;;;;QAU1D,CAAC;AAEF,eAAO,MAAM,2BAA2B,eAAgB,UAAU;;QAOjE,CAAC;AAEF,eAAO,MAAM,wBAAwB,eAAgB,UAAU;;;GAe9D,CAAC;AAEF,eAAO,MAAM,sBAAsB,eAAgB,UAAU;;;;;;IA8B5D,CAAC;AAEF,eAAO,MAAM,uBAAuB,eAAgB,UAAU;;;QAQ7D,CAAC;AAEF,eAAO,MAAM,wBAAwB,eAAgB,UAAU;;;;QAU9D,CAAC;AAEF,eAAO,MAAM,uBAAuB,eAAgB,UAAU;;;;;;GAkB7D,CAAC;AAEF,eAAO,MAAM,kCAAkC,eAAgB,UAAU;;;;;GAiBxE,CAAC;AAEF,eAAO,MAAM,oCAAoC,eAAgB,UAAU;;;;;GAiB1E,CAAC;AAEF,eAAO,MAAM,2BAA2B,eAAgB,UAAU;;;;;GAiBjE,CAAC;AAEF,eAAO,MAAM,+BAA+B,eAAgB,UAAU;;;;;;GAiBrE,CAAC;AAEF,eAAO,MAAM,uBAAuB,eAAgB,UAAU;;;GA0B7D,CAAC;AAEF,eAAO,MAAM,wBAAwB,eAAgB,UAAU;;;;;;;GAgB9D,CAAC;AAEF,eAAO,MAAM,oBAAoB,eAAgB,UAAU;;;GAY1D,CAAC;AAEF,eAAO,MAAM,sBAAsB,eAAgB,UAAU;;;;;;;;;;;;;;;GAiB5D,CAAC"}
1
+ {"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../../../src/lib/compat/partytime/channel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAgB,MAAM,mBAAmB,CAAC;AAO7D,eAAO,MAAM,gBAAgB,eAAgB,UAAU;;;;;CAKrD,CAAC;AAEH,eAAO,MAAM,qBAAqB,eAAgB,UAAU;;;;;;;;CAmB1D,CAAC;AAEH,eAAO,MAAM,oBAAoB,eAAgB,UAAU;;;;;QAU1D,CAAC;AAEF,eAAO,MAAM,2BAA2B,eAAgB,UAAU;;QAOjE,CAAC;AAEF,eAAO,MAAM,wBAAwB,eAAgB,UAAU;;;GAe9D,CAAC;AAEF,eAAO,MAAM,sBAAsB,eAAgB,UAAU;;;;;;IA8B5D,CAAC;AAEF,eAAO,MAAM,uBAAuB,eAAgB,UAAU;;;QAQ7D,CAAC;AAEF,eAAO,MAAM,wBAAwB,eAAgB,UAAU;;;;QAU9D,CAAC;AAEF,eAAO,MAAM,uBAAuB,eAAgB,UAAU;;;;;;GAkB7D,CAAC;AAEF,eAAO,MAAM,kCAAkC,eAAgB,UAAU;;;;;GAiBxE,CAAC;AAEF,eAAO,MAAM,oCAAoC,eAAgB,UAAU;;;;;GAiB1E,CAAC;AAEF,eAAO,MAAM,2BAA2B,eAAgB,UAAU;;;;;GAiBjE,CAAC;AAEF,eAAO,MAAM,+BAA+B,eAAgB,UAAU;;;;;;GAiBrE,CAAC;AAEF,eAAO,MAAM,uBAAuB,eAAgB,UAAU;;;GA0B7D,CAAC;AAEF,eAAO,MAAM,wBAAwB,eAAgB,UAAU;;;;;;;GAgB9D,CAAC;AAEF,eAAO,MAAM,oBAAoB,eAAgB,UAAU;;;GAY1D,CAAC;AAEF,eAAO,MAAM,sBAAsB,eAAgB,UAAU;;;;;;;;;;;;;;;GAiB5D,CAAC"}
@@ -3,40 +3,51 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.compatChannelValueDtos = exports.compatChannelTxtDtos = exports.compatChannelTrailerDtos = exports.compatChannelSeasonDtos = exports.compatChannelSocialInteractDtos = exports.compatChannelRemoteItemDtos = exports.compatChannelPublisherRemoteItemDtos = exports.compatChannelPodrollRemoteItemDtos = exports.compatChannelPersonDtos = exports.compatChannelLocationDto = exports.compatChannelLicenseDto = exports.compatChannelImageDtos = exports.compatChannelFundingDtos = exports.compatChannelDescriptionDto = exports.compatChannelChatDto = exports.compatChannelAboutDto = exports.compatChannelDto = void 0;
4
4
  const podcast_partytime_1 = require("podcast-partytime");
5
5
  const podverse_helpers_1 = require("podverse-helpers");
6
+ const podverse_helpers_2 = require("podverse-helpers");
6
7
  const podverse_orm_1 = require("podverse-orm");
7
8
  const value_1 = require("@parser/lib/compat/partytime/value");
8
9
  const compatChannelDto = (parsedFeed) => {
9
- var _a;
10
+ var _a, _b, _c, _d;
10
11
  return ({
11
- podcast_guid: parsedFeed.guid,
12
- title: parsedFeed.title,
13
- sortable_title: (0, podverse_helpers_1.createSortableTitle)(parsedFeed.title),
14
- medium: (0, podverse_orm_1.getMediumEnumValue)((_a = parsedFeed.medium) !== null && _a !== void 0 ? _a : podcast_partytime_1.Phase4Medium.Podcast)
12
+ podcast_guid: ((_a = parsedFeed.guid) === null || _a === void 0 ? void 0 : _a.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_guid)) || null,
13
+ title: ((_b = parsedFeed.title) === null || _b === void 0 ? void 0 : _b.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_normal)) || null,
14
+ sortable_title: ((_c = (0, podverse_helpers_2.createSortableTitle)(parsedFeed.title)) === null || _c === void 0 ? void 0 : _c.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_short)) || null,
15
+ medium: (0, podverse_orm_1.getMediumEnumValue)((_d = parsedFeed.medium) !== null && _d !== void 0 ? _d : podcast_partytime_1.Phase4Medium.Podcast)
15
16
  });
16
17
  };
17
18
  exports.compatChannelDto = compatChannelDto;
18
19
  const compatChannelAboutDto = (parsedFeed) => {
19
- var _a, _b, _c;
20
+ var _a, _b, _c, _d, _e, _f;
20
21
  return ({
21
- author: ((_a = (Array.isArray(parsedFeed.author) ? parsedFeed.author : parsedFeed.author ? [parsedFeed.author] : [])) === null || _a === void 0 ? void 0 : _a.join(', ')) || null,
22
- explicit: (0, podverse_helpers_1.getBooleanOrNull)(parsedFeed.explicit),
23
- language: parsedFeed.language || null,
24
- last_pub_date: parsedFeed.pubDate || null,
25
- website_link_url: parsedFeed.link || null,
22
+ author: ((_b = ((_a = (Array.isArray(parsedFeed.author)
23
+ ? parsedFeed.author
24
+ : parsedFeed.author
25
+ ? [parsedFeed.author] : [])) === null || _a === void 0 ? void 0 : _a.join(', '))) === null || _b === void 0 ? void 0 : _b.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_normal)) || null,
26
+ explicit: (0, podverse_helpers_2.getBooleanOrNull)(parsedFeed.explicit),
27
+ language: ((_c = parsedFeed.language) === null || _c === void 0 ? void 0 : _c.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_short)) || null,
28
+ website_link_url: ((_d = parsedFeed.link) === null || _d === void 0 ? void 0 : _d.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_url)) || null,
26
29
  itunes_type: (0, podverse_orm_1.getChannelItunesTypeItunesTypeEnumValue)(parsedFeed.itunesType || 'episodic'),
27
- episode_count: (((_b = parsedFeed.items) === null || _b === void 0 ? void 0 : _b.length) || 0) + (((_c = parsedFeed.podcastLiveItems) === null || _c === void 0 ? void 0 : _c.length) || 0),
30
+ episode_count: ((_e = parsedFeed.items) === null || _e === void 0 ? void 0 : _e.length) || 0,
31
+ last_pub_date: ((_f = parsedFeed.items) === null || _f === void 0 ? void 0 : _f.reduce((latest, item) => {
32
+ if (item.pubDate) {
33
+ const itemDate = new Date(item.pubDate);
34
+ return itemDate > latest ? itemDate : latest;
35
+ }
36
+ return latest;
37
+ }, new Date(0))) || null
28
38
  });
29
39
  };
30
40
  exports.compatChannelAboutDto = compatChannelAboutDto;
31
41
  const compatChannelChatDto = (parsedFeed) => {
42
+ var _a, _b, _c;
32
43
  if (!parsedFeed.chat) {
33
44
  return null;
34
45
  }
35
46
  return {
36
- server: parsedFeed.chat.server,
37
- protocol: parsedFeed.chat.protocol,
38
- account_id: parsedFeed.chat.accountId || null,
39
- space: parsedFeed.chat.space || null
47
+ server: ((_a = parsedFeed.chat.server) === null || _a === void 0 ? void 0 : _a.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_fqdn)) || null,
48
+ protocol: parsedFeed.chat.protocol.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_short),
49
+ account_id: ((_b = parsedFeed.chat.accountId) === null || _b === void 0 ? void 0 : _b.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_normal)) || null,
50
+ space: ((_c = parsedFeed.chat.space) === null || _c === void 0 ? void 0 : _c.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_normal)) || null
40
51
  };
41
52
  };
42
53
  exports.compatChannelChatDto = compatChannelChatDto;
@@ -45,18 +56,19 @@ const compatChannelDescriptionDto = (parsedFeed) => {
45
56
  return null;
46
57
  }
47
58
  return {
48
- value: parsedFeed.description
59
+ value: parsedFeed.description.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_long)
49
60
  };
50
61
  };
51
62
  exports.compatChannelDescriptionDto = compatChannelDescriptionDto;
52
63
  const compatChannelFundingDtos = (parsedFeed) => {
64
+ var _a, _b;
53
65
  const dtos = [];
54
66
  if (Array.isArray(parsedFeed.podcastFunding)) {
55
67
  for (const f of parsedFeed.podcastFunding) {
56
68
  if (f.url) {
57
69
  dtos.push({
58
- url: f.url,
59
- title: f.message || null
70
+ url: (_a = f.url) === null || _a === void 0 ? void 0 : _a.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_url),
71
+ title: ((_b = f.message) === null || _b === void 0 ? void 0 : _b.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_normal)) || null
60
72
  });
61
73
  }
62
74
  }
@@ -69,13 +81,13 @@ const compatChannelImageDtos = (parsedFeed) => {
69
81
  const dtos = [];
70
82
  if (parsedFeed.itunesImage) {
71
83
  dtos.push({
72
- url: parsedFeed.itunesImage,
84
+ url: parsedFeed.itunesImage.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_url),
73
85
  image_width_size: null
74
86
  });
75
87
  }
76
88
  else if ((_a = parsedFeed.image) === null || _a === void 0 ? void 0 : _a.url) {
77
89
  dtos.push({
78
- url: parsedFeed.image.url,
90
+ url: parsedFeed.image.url.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_url),
79
91
  image_width_size: null
80
92
  });
81
93
  }
@@ -86,7 +98,7 @@ const compatChannelImageDtos = (parsedFeed) => {
86
98
  for (const image of parsedFeed.podcastImages) {
87
99
  if (image.parsed.url && hasWidth(image.parsed)) {
88
100
  dtos.push({
89
- url: image.parsed.url,
101
+ url: image.parsed.url.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_url),
90
102
  image_width_size: image.parsed.width
91
103
  });
92
104
  }
@@ -96,40 +108,40 @@ const compatChannelImageDtos = (parsedFeed) => {
96
108
  };
97
109
  exports.compatChannelImageDtos = compatChannelImageDtos;
98
110
  const compatChannelLicenseDto = (parsedFeed) => {
99
- var _a;
111
+ var _a, _b;
100
112
  if (!((_a = parsedFeed === null || parsedFeed === void 0 ? void 0 : parsedFeed.license) === null || _a === void 0 ? void 0 : _a.identifier)) {
101
113
  return null;
102
114
  }
103
115
  return {
104
- identifier: parsedFeed.license.identifier,
105
- url: parsedFeed.license.url || null
116
+ identifier: parsedFeed.license.identifier.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_normal),
117
+ url: ((_b = parsedFeed.license.url) === null || _b === void 0 ? void 0 : _b.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_url)) || null
106
118
  };
107
119
  };
108
120
  exports.compatChannelLicenseDto = compatChannelLicenseDto;
109
121
  const compatChannelLocationDto = (parsedFeed) => {
110
- var _a, _b;
122
+ var _a, _b, _c, _d, _e;
111
123
  if (!((_a = parsedFeed === null || parsedFeed === void 0 ? void 0 : parsedFeed.podcastLocation) === null || _a === void 0 ? void 0 : _a.geo) && !((_b = parsedFeed === null || parsedFeed === void 0 ? void 0 : parsedFeed.podcastLocation) === null || _b === void 0 ? void 0 : _b.osm)) {
112
124
  return null;
113
125
  }
114
126
  return {
115
- geo: parsedFeed.podcastLocation.geo || null,
116
- osm: parsedFeed.podcastLocation.osm || null,
117
- name: parsedFeed.podcastLocation.name || null
127
+ geo: ((_c = parsedFeed.podcastLocation.geo) === null || _c === void 0 ? void 0 : _c.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_normal)) || null,
128
+ osm: ((_d = parsedFeed.podcastLocation.osm) === null || _d === void 0 ? void 0 : _d.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_normal)) || null,
129
+ name: ((_e = parsedFeed.podcastLocation.name) === null || _e === void 0 ? void 0 : _e.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_normal)) || null
118
130
  };
119
131
  };
120
132
  exports.compatChannelLocationDto = compatChannelLocationDto;
121
133
  const compatChannelPersonDtos = (parsedFeed) => {
122
- var _a, _b;
134
+ var _a, _b, _c, _d, _e, _f;
123
135
  const dtos = [];
124
136
  if (Array.isArray(parsedFeed.podcastPeople)) {
125
137
  for (const p of parsedFeed.podcastPeople) {
126
138
  if (p.name) {
127
139
  dtos.push({
128
- name: p.name,
129
- role: ((_a = p.role) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || null,
130
- person_group: ((_b = p.group) === null || _b === void 0 ? void 0 : _b.toLowerCase()) || 'cast',
131
- img: p.img || null,
132
- href: p.href || null
140
+ name: p.name.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_normal),
141
+ role: ((_b = (_a = p.role) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === null || _b === void 0 ? void 0 : _b.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_normal)) || null,
142
+ person_group: ((_d = (_c = p.group) === null || _c === void 0 ? void 0 : _c.toLowerCase()) === null || _d === void 0 ? void 0 : _d.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_normal)) || 'cast',
143
+ img: ((_e = p.img) === null || _e === void 0 ? void 0 : _e.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_url)) || null,
144
+ href: ((_f = p.href) === null || _f === void 0 ? void 0 : _f.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_url)) || null
133
145
  });
134
146
  }
135
147
  }
@@ -138,13 +150,14 @@ const compatChannelPersonDtos = (parsedFeed) => {
138
150
  };
139
151
  exports.compatChannelPersonDtos = compatChannelPersonDtos;
140
152
  const compatChannelPodrollRemoteItemDtos = (parsedFeed) => {
153
+ var _a;
141
154
  const dtos = [];
142
155
  if (Array.isArray(parsedFeed.podroll)) {
143
156
  for (const ri of parsedFeed.podroll) {
144
157
  if (ri.feedGuid) {
145
158
  dtos.push({
146
- feed_guid: ri.feedGuid,
147
- feed_url: ri.feedUrl || null,
159
+ feed_guid: ri.feedGuid.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_guid),
160
+ feed_url: ((_a = ri.feedUrl) === null || _a === void 0 ? void 0 : _a.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_url)) || null,
148
161
  item_guid: null,
149
162
  title: /* PTDO: ri.title || */ null
150
163
  });
@@ -155,13 +168,14 @@ const compatChannelPodrollRemoteItemDtos = (parsedFeed) => {
155
168
  };
156
169
  exports.compatChannelPodrollRemoteItemDtos = compatChannelPodrollRemoteItemDtos;
157
170
  const compatChannelPublisherRemoteItemDtos = (parsedFeed) => {
171
+ var _a;
158
172
  const dtos = [];
159
173
  if (Array.isArray(parsedFeed.podroll)) {
160
174
  for (const ri of parsedFeed.podroll) {
161
175
  if (ri.feedGuid) {
162
176
  dtos.push({
163
- feed_guid: ri.feedGuid,
164
- feed_url: ri.feedUrl || null,
177
+ feed_guid: ri.feedGuid.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_guid),
178
+ feed_url: ((_a = ri.feedUrl) === null || _a === void 0 ? void 0 : _a.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_url)) || null,
165
179
  item_guid: null,
166
180
  title: /* PTDO: ri.title || */ null
167
181
  });
@@ -172,13 +186,14 @@ const compatChannelPublisherRemoteItemDtos = (parsedFeed) => {
172
186
  };
173
187
  exports.compatChannelPublisherRemoteItemDtos = compatChannelPublisherRemoteItemDtos;
174
188
  const compatChannelRemoteItemDtos = (parsedFeed) => {
189
+ var _a;
175
190
  const dtos = [];
176
191
  if (Array.isArray(parsedFeed.podcastRemoteItems)) {
177
192
  for (const ri of parsedFeed.podcastRemoteItems) {
178
193
  if (ri.feedGuid) {
179
194
  dtos.push({
180
- feed_guid: ri.feedGuid,
181
- feed_url: ri.feedUrl || null,
195
+ feed_guid: ri.feedGuid.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_guid),
196
+ feed_url: ((_a = ri.feedUrl) === null || _a === void 0 ? void 0 : _a.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_url)) || null,
182
197
  item_guid: null,
183
198
  title: /* PTDO: ri.title || */ null
184
199
  });
@@ -189,16 +204,16 @@ const compatChannelRemoteItemDtos = (parsedFeed) => {
189
204
  };
190
205
  exports.compatChannelRemoteItemDtos = compatChannelRemoteItemDtos;
191
206
  const compatChannelSocialInteractDtos = (parsedFeed) => {
192
- var _a;
207
+ var _a, _b, _c;
193
208
  const dtos = [];
194
209
  if ((_a = parsedFeed === null || parsedFeed === void 0 ? void 0 : parsedFeed.podcastSocial) === null || _a === void 0 ? void 0 : _a.length) {
195
210
  for (const ps of parsedFeed.podcastSocial) {
196
211
  dtos.push({
197
212
  // PTDO: fix keys mismatch between partytime and podverse
198
- protocol: ps.platform,
199
- uri: ps.url,
200
- account_id: ps.id || null,
201
- account_url: ps.name || null,
213
+ protocol: ps.platform.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_short),
214
+ uri: ps.url.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_uri),
215
+ account_id: ((_b = ps.id) === null || _b === void 0 ? void 0 : _b.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_normal)) || null,
216
+ account_url: ((_c = ps.name) === null || _c === void 0 ? void 0 : _c.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_url)) || null,
202
217
  priority: ps.priority || null
203
218
  });
204
219
  }
@@ -217,7 +232,7 @@ const compatChannelSeasonDtos = (parsedFeed) => {
217
232
  if (Number.isInteger(seasonNumber)) {
218
233
  const seasonNumberAsNumber = seasonNumber;
219
234
  seasonsIndex[seasonNumberAsNumber] = {
220
- name: seasonName
235
+ name: (seasonName === null || seasonName === void 0 ? void 0 : seasonName.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_normal)) || null
221
236
  };
222
237
  }
223
238
  }
@@ -231,16 +246,16 @@ const compatChannelSeasonDtos = (parsedFeed) => {
231
246
  };
232
247
  exports.compatChannelSeasonDtos = compatChannelSeasonDtos;
233
248
  const compatChannelTrailerDtos = (parsedFeed) => {
234
- var _a;
249
+ var _a, _b;
235
250
  const dtos = [];
236
251
  if ((_a = parsedFeed === null || parsedFeed === void 0 ? void 0 : parsedFeed.trailers) === null || _a === void 0 ? void 0 : _a.length) {
237
252
  for (const pt of parsedFeed.trailers) {
238
253
  dtos.push({
239
- url: pt.url,
254
+ url: pt.url.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_url),
240
255
  title: /* PTDO: add pt.title || */ null,
241
256
  pubdate: pt.pubdate,
242
257
  length: pt.length || null,
243
- type: pt.type || null,
258
+ type: ((_b = pt.type) === null || _b === void 0 ? void 0 : _b.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_short)) || null,
244
259
  season: pt.season || null
245
260
  });
246
261
  }
@@ -249,13 +264,13 @@ const compatChannelTrailerDtos = (parsedFeed) => {
249
264
  };
250
265
  exports.compatChannelTrailerDtos = compatChannelTrailerDtos;
251
266
  const compatChannelTxtDtos = (parsedFeed) => {
252
- var _a;
267
+ var _a, _b;
253
268
  const dtos = [];
254
269
  if ((_a = parsedFeed === null || parsedFeed === void 0 ? void 0 : parsedFeed.podcastTxt) === null || _a === void 0 ? void 0 : _a.length) {
255
270
  for (const pt of parsedFeed.podcastTxt) {
256
271
  dtos.push({
257
- purpose: pt.purpose || null,
258
- value: pt.value
272
+ purpose: ((_b = pt.purpose) === null || _b === void 0 ? void 0 : _b.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_normal)) || null,
273
+ value: pt.value.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_long)
259
274
  });
260
275
  }
261
276
  }
@@ -268,8 +283,8 @@ const compatChannelValueDtos = (parsedFeed) => {
268
283
  const dto = (0, value_1.compatChannelValue)(parsedFeed.value);
269
284
  const formattedDto = {
270
285
  channel_value: {
271
- type: dto.type,
272
- method: dto.method,
286
+ type: dto.type.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_short),
287
+ method: dto.method.slice(0, podverse_helpers_1.DATABASE_CONSTANTS.varchar_short),
273
288
  suggested: dto.suggested || null
274
289
  },
275
290
  channel_value_recipients: dto.channel_value_recipients
@@ -87,9 +87,9 @@ export declare const compatItemSoundbiteDtos: (parsedItem: Episode) => {
87
87
  }[];
88
88
  export declare const compatItemTranscriptDtos: (parsedItem: Episode) => {
89
89
  url: string;
90
- type: import("podcast-partytime").TranscriptType;
90
+ type: string;
91
91
  language: string | null;
92
- rel: "captions" | null;
92
+ rel: string | null;
93
93
  }[];
94
94
  export declare const compatItemTxtDtos: (parsedItem: Episode) => {
95
95
  purpose: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../../../../src/lib/compat/partytime/item.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAKjD,eAAO,MAAM,aAAa,eAAgB,OAAO;;;;;CAK/C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