added seed script + renamed table fields + added field
This commit is contained in:
parent
385bdc2343
commit
98106b9f25
|
@ -25,9 +25,10 @@ export default function NewLinkModal({ onClose }: Props) {
|
||||||
description: "",
|
description: "",
|
||||||
type: "url",
|
type: "url",
|
||||||
tags: [],
|
tags: [],
|
||||||
screenshotPath: "",
|
preview: "",
|
||||||
pdfPath: "",
|
image: "",
|
||||||
readabilityPath: "",
|
pdf: "",
|
||||||
|
readable: "",
|
||||||
textContent: "",
|
textContent: "",
|
||||||
collection: {
|
collection: {
|
||||||
name: "",
|
name: "",
|
||||||
|
|
|
@ -70,12 +70,12 @@ export default function PreservedFormatsModal({ onClose, activeLink }: Props) {
|
||||||
const isReady = () => {
|
const isReady = () => {
|
||||||
return (
|
return (
|
||||||
collectionOwner.archiveAsScreenshot ===
|
collectionOwner.archiveAsScreenshot ===
|
||||||
(link && link.pdfPath && link.pdfPath !== "pending") &&
|
(link && link.pdf && link.pdf !== "pending") &&
|
||||||
collectionOwner.archiveAsPDF ===
|
collectionOwner.archiveAsPDF ===
|
||||||
(link && link.pdfPath && link.pdfPath !== "pending") &&
|
(link && link.pdf && link.pdf !== "pending") &&
|
||||||
link &&
|
link &&
|
||||||
link.readabilityPath &&
|
link.readable &&
|
||||||
link.readabilityPath !== "pending"
|
link.readable !== "pending"
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ export default function PreservedFormatsModal({ onClose, activeLink }: Props) {
|
||||||
clearInterval(interval);
|
clearInterval(interval);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}, [link?.screenshotPath, link?.pdfPath, link?.readabilityPath]);
|
}, [link?.image, link?.pdf, link?.readable]);
|
||||||
|
|
||||||
const updateArchive = async () => {
|
const updateArchive = async () => {
|
||||||
const load = toast.loading("Sending request...");
|
const load = toast.loading("Sending request...");
|
||||||
|
@ -154,7 +154,7 @@ export default function PreservedFormatsModal({ onClose, activeLink }: Props) {
|
||||||
name={"Screenshot"}
|
name={"Screenshot"}
|
||||||
icon={"bi-file-earmark-image"}
|
icon={"bi-file-earmark-image"}
|
||||||
format={
|
format={
|
||||||
link?.screenshotPath?.endsWith("png")
|
link?.image?.endsWith("png")
|
||||||
? ArchivedFormat.png
|
? ArchivedFormat.png
|
||||||
: ArchivedFormat.jpeg
|
: ArchivedFormat.jpeg
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,9 +27,10 @@ export default function UploadFileModal({ onClose }: Props) {
|
||||||
description: "",
|
description: "",
|
||||||
type: "url",
|
type: "url",
|
||||||
tags: [],
|
tags: [],
|
||||||
screenshotPath: "",
|
preview: "",
|
||||||
pdfPath: "",
|
image: "",
|
||||||
readabilityPath: "",
|
pdf: "",
|
||||||
|
readable: "",
|
||||||
textContent: "",
|
textContent: "",
|
||||||
collection: {
|
collection: {
|
||||||
name: "",
|
name: "",
|
||||||
|
|
|
@ -43,7 +43,7 @@ export default function PreservedFormatRow({
|
||||||
})();
|
})();
|
||||||
|
|
||||||
let interval: any;
|
let interval: any;
|
||||||
if (link?.screenshotPath === "pending" || link?.pdfPath === "pending") {
|
if (link?.image === "pending" || link?.pdf === "pending") {
|
||||||
interval = setInterval(async () => {
|
interval = setInterval(async () => {
|
||||||
const data = await getLink(link.id as number, isPublic);
|
const data = await getLink(link.id as number, isPublic);
|
||||||
setLink(
|
setLink(
|
||||||
|
@ -61,7 +61,7 @@ export default function PreservedFormatRow({
|
||||||
clearInterval(interval);
|
clearInterval(interval);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}, [link?.screenshotPath, link?.pdfPath, link?.readabilityPath]);
|
}, [link?.image, link?.pdf, link?.readable]);
|
||||||
|
|
||||||
const handleDownload = () => {
|
const handleDownload = () => {
|
||||||
const path = `/api/v1/archives/${link?.id}?format=${format}`;
|
const path = `/api/v1/archives/${link?.id}?format=${format}`;
|
||||||
|
|
|
@ -62,12 +62,12 @@ export default function ReadableView({ link }: Props) {
|
||||||
let interval: any;
|
let interval: any;
|
||||||
if (
|
if (
|
||||||
link &&
|
link &&
|
||||||
(link?.screenshotPath === "pending" ||
|
(link?.image === "pending" ||
|
||||||
link?.pdfPath === "pending" ||
|
link?.pdf === "pending" ||
|
||||||
link?.readabilityPath === "pending" ||
|
link?.readable === "pending" ||
|
||||||
!link?.screenshotPath ||
|
!link?.image ||
|
||||||
!link?.pdfPath ||
|
!link?.pdf ||
|
||||||
!link?.readabilityPath)
|
!link?.readable)
|
||||||
) {
|
) {
|
||||||
interval = setInterval(() => getLink(link.id as number), 5000);
|
interval = setInterval(() => getLink(link.id as number), 5000);
|
||||||
} else {
|
} else {
|
||||||
|
@ -81,7 +81,7 @@ export default function ReadableView({ link }: Props) {
|
||||||
clearInterval(interval);
|
clearInterval(interval);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}, [link?.screenshotPath, link?.pdfPath, link?.readabilityPath]);
|
}, [link?.image, link?.pdf, link?.readable]);
|
||||||
|
|
||||||
const rgbToHex = (r: number, g: number, b: number): string =>
|
const rgbToHex = (r: number, g: number, b: number): string =>
|
||||||
"#" +
|
"#" +
|
||||||
|
@ -225,7 +225,7 @@ export default function ReadableView({ link }: Props) {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex flex-col gap-5 h-full">
|
<div className="flex flex-col gap-5 h-full">
|
||||||
{link?.readabilityPath?.startsWith("archives") ? (
|
{link?.readable?.startsWith("archives") ? (
|
||||||
<div
|
<div
|
||||||
className="line-break px-1 reader-view"
|
className="line-break px-1 reader-view"
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
|
@ -235,9 +235,7 @@ export default function ReadableView({ link }: Props) {
|
||||||
) : (
|
) : (
|
||||||
<div
|
<div
|
||||||
className={`w-full h-full flex flex-col justify-center p-10 ${
|
className={`w-full h-full flex flex-col justify-center p-10 ${
|
||||||
link?.readabilityPath === "pending" || !link?.readabilityPath
|
link?.readable === "pending" || !link?.readable ? "skeleton" : ""
|
||||||
? "skeleton"
|
|
||||||
: ""
|
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
|
|
|
@ -46,18 +46,15 @@ export default async function archiveHandler(link: LinksAndCollectionAndOwner) {
|
||||||
where: { id: link.id },
|
where: { id: link.id },
|
||||||
data: {
|
data: {
|
||||||
type: linkType,
|
type: linkType,
|
||||||
screenshotPath:
|
image:
|
||||||
user.archiveAsScreenshot &&
|
user.archiveAsScreenshot && !link.image?.startsWith("archive")
|
||||||
!link.screenshotPath?.startsWith("archive")
|
|
||||||
? "pending"
|
? "pending"
|
||||||
: undefined,
|
: undefined,
|
||||||
pdfPath:
|
pdf:
|
||||||
user.archiveAsPDF && !link.pdfPath?.startsWith("archive")
|
user.archiveAsPDF && !link.pdf?.startsWith("archive")
|
||||||
? "pending"
|
? "pending"
|
||||||
: undefined,
|
: undefined,
|
||||||
readabilityPath: !link.readabilityPath?.startsWith("archive")
|
readable: !link.readable?.startsWith("archive") ? "pending" : undefined,
|
||||||
? "pending"
|
|
||||||
: undefined,
|
|
||||||
lastPreserved: new Date().toISOString(),
|
lastPreserved: new Date().toISOString(),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -107,7 +104,7 @@ export default async function archiveHandler(link: LinksAndCollectionAndOwner) {
|
||||||
await prisma.link.update({
|
await prisma.link.update({
|
||||||
where: { id: link.id },
|
where: { id: link.id },
|
||||||
data: {
|
data: {
|
||||||
readabilityPath: `archives/${targetLink.collectionId}/${link.id}_readability.json`,
|
readable: `archives/${targetLink.collectionId}/${link.id}_readability.json`,
|
||||||
textContent: articleText,
|
textContent: articleText,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -156,10 +153,10 @@ export default async function archiveHandler(link: LinksAndCollectionAndOwner) {
|
||||||
await prisma.link.update({
|
await prisma.link.update({
|
||||||
where: { id: link.id },
|
where: { id: link.id },
|
||||||
data: {
|
data: {
|
||||||
screenshotPath: user.archiveAsScreenshot
|
image: user.archiveAsScreenshot
|
||||||
? `archives/${linkExists.collectionId}/${link.id}.png`
|
? `archives/${linkExists.collectionId}/${link.id}.png`
|
||||||
: undefined,
|
: undefined,
|
||||||
pdfPath: user.archiveAsPDF
|
pdf: user.archiveAsPDF
|
||||||
? `archives/${linkExists.collectionId}/${link.id}.pdf`
|
? `archives/${linkExists.collectionId}/${link.id}.pdf`
|
||||||
: undefined,
|
: undefined,
|
||||||
},
|
},
|
||||||
|
@ -179,13 +176,13 @@ export default async function archiveHandler(link: LinksAndCollectionAndOwner) {
|
||||||
await prisma.link.update({
|
await prisma.link.update({
|
||||||
where: { id: link.id },
|
where: { id: link.id },
|
||||||
data: {
|
data: {
|
||||||
readabilityPath: !finalLink.readabilityPath?.startsWith("archives")
|
readable: !finalLink.readable?.startsWith("archives")
|
||||||
? "unavailable"
|
? "unavailable"
|
||||||
: undefined,
|
: undefined,
|
||||||
screenshotPath: !finalLink.screenshotPath?.startsWith("archives")
|
image: !finalLink.image?.startsWith("archives")
|
||||||
? "unavailable"
|
? "unavailable"
|
||||||
: undefined,
|
: undefined,
|
||||||
pdfPath: !finalLink.pdfPath?.startsWith("archives")
|
pdf: !finalLink.pdf?.startsWith("archives")
|
||||||
? "unavailable"
|
? "unavailable"
|
||||||
: undefined,
|
: undefined,
|
||||||
},
|
},
|
||||||
|
@ -245,7 +242,7 @@ const imageHandler = async ({ url, id }: Link, extension: string) => {
|
||||||
await prisma.link.update({
|
await prisma.link.update({
|
||||||
where: { id },
|
where: { id },
|
||||||
data: {
|
data: {
|
||||||
screenshotPath: `archives/${linkExists.collectionId}/${id}.${extension}`,
|
image: `archives/${linkExists.collectionId}/${id}.${extension}`,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -269,7 +266,7 @@ const pdfHandler = async ({ url, id }: Link) => {
|
||||||
await prisma.link.update({
|
await prisma.link.update({
|
||||||
where: { id },
|
where: { id },
|
||||||
data: {
|
data: {
|
||||||
pdfPath: `archives/${linkExists.collectionId}/${id}.pdf`,
|
pdf: `archives/${linkExists.collectionId}/${id}.pdf`,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,26 +1,23 @@
|
||||||
export function screenshotAvailable(link: any) {
|
export function screenshotAvailable(link: any) {
|
||||||
return (
|
return (
|
||||||
link &&
|
link &&
|
||||||
link.screenshotPath &&
|
link.image &&
|
||||||
link.screenshotPath !== "pending" &&
|
link.image !== "pending" &&
|
||||||
link.screenshotPath !== "unavailable"
|
link.image !== "unavailable"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function pdfAvailable(link: any) {
|
export function pdfAvailable(link: any) {
|
||||||
return (
|
return (
|
||||||
link &&
|
link && link.pdf && link.pdf !== "pending" && link.pdf !== "unavailable"
|
||||||
link.pdfPath &&
|
|
||||||
link.pdfPath !== "pending" &&
|
|
||||||
link.pdfPath !== "unavailable"
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function readabilityAvailable(link: any) {
|
export function readabilityAvailable(link: any) {
|
||||||
return (
|
return (
|
||||||
link &&
|
link &&
|
||||||
link.readabilityPath &&
|
link.readable &&
|
||||||
link.readabilityPath !== "pending" &&
|
link.readable !== "pending" &&
|
||||||
link.readabilityPath !== "unavailable"
|
link.readable !== "unavailable"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,9 @@
|
||||||
"author": "Daniel31X13 <daniel31x13@gmail.com>",
|
"author": "Daniel31X13 <daniel31x13@gmail.com>",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
"prisma": {
|
||||||
|
"seed": "node ./prisma/seed.js"
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
"worker": "ts-node --skip-project scripts/worker.ts",
|
"worker": "ts-node --skip-project scripts/worker.ts",
|
||||||
|
|
|
@ -125,7 +125,7 @@ export default async function Index(req: NextApiRequest, res: NextApiResponse) {
|
||||||
// await prisma.link.update({
|
// await prisma.link.update({
|
||||||
// where: { id: linkId },
|
// where: { id: linkId },
|
||||||
// data: {
|
// data: {
|
||||||
// screenshotPath: `archives/${collectionPermissions?.id}/${
|
// image: `archives/${collectionPermissions?.id}/${
|
||||||
// linkId + suffix
|
// linkId + suffix
|
||||||
// }`,
|
// }`,
|
||||||
// lastPreserved: new Date().toISOString(),
|
// lastPreserved: new Date().toISOString(),
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -73,9 +73,9 @@ const deleteArchivedFiles = async (link: Link & { collection: Collection }) => {
|
||||||
id: link.id,
|
id: link.id,
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
screenshotPath: null,
|
image: null,
|
||||||
pdfPath: null,
|
pdf: null,
|
||||||
readabilityPath: null,
|
readable: null,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
/*
|
||||||
|
Warnings:
|
||||||
|
|
||||||
|
- You are about to drop the column `pdf` on the `Link` table. All the data in the column will be lost.
|
||||||
|
- You are about to drop the column `readable` on the `Link` table. All the data in the column will be lost.
|
||||||
|
- You are about to drop the column `screenshotPath` on the `Link` table. All the data in the column will be lost.
|
||||||
|
|
||||||
|
*/
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "Link" RENAME COLUMN "screenshotPath" TO "image";
|
||||||
|
ALTER TABLE "Link" RENAME COLUMN "pdfPath" TO "pdf";
|
||||||
|
ALTER TABLE "Link" RENAME COLUMN "readabilityPath" TO "readable";
|
||||||
|
ALTER TABLE "Link" ADD COLUMN "preview" TEXT;
|
|
@ -20,16 +20,16 @@ model Account {
|
||||||
scope String?
|
scope String?
|
||||||
id_token String?
|
id_token String?
|
||||||
session_state String?
|
session_state String?
|
||||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||||
|
|
||||||
@@unique([provider, providerAccountId])
|
@@unique([provider, providerAccountId])
|
||||||
}
|
}
|
||||||
|
|
||||||
model User {
|
model User {
|
||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
name String
|
name String
|
||||||
username String? @unique
|
username String? @unique
|
||||||
email String? @unique
|
email String? @unique
|
||||||
emailVerified DateTime?
|
emailVerified DateTime?
|
||||||
image String?
|
image String?
|
||||||
accounts Account[]
|
accounts Account[]
|
||||||
|
@ -41,45 +41,45 @@ model User {
|
||||||
whitelistedUsers WhitelistedUser[]
|
whitelistedUsers WhitelistedUser[]
|
||||||
apiKeys ApiKey[]
|
apiKeys ApiKey[]
|
||||||
subscriptions Subscription?
|
subscriptions Subscription?
|
||||||
archiveAsScreenshot Boolean @default(true)
|
archiveAsScreenshot Boolean @default(true)
|
||||||
archiveAsPDF Boolean @default(true)
|
archiveAsPDF Boolean @default(true)
|
||||||
archiveAsWaybackMachine Boolean @default(false)
|
archiveAsWaybackMachine Boolean @default(false)
|
||||||
isPrivate Boolean @default(false)
|
isPrivate Boolean @default(false)
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
updatedAt DateTime @updatedAt @default(now())
|
updatedAt DateTime @default(now()) @updatedAt
|
||||||
}
|
}
|
||||||
|
|
||||||
model WhitelistedUser {
|
model WhitelistedUser {
|
||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
username String @default("")
|
username String @default("")
|
||||||
User User? @relation(fields: [userId], references: [id])
|
User User? @relation(fields: [userId], references: [id])
|
||||||
userId Int?
|
userId Int?
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
updatedAt DateTime @updatedAt @default(now())
|
updatedAt DateTime @default(now()) @updatedAt
|
||||||
}
|
}
|
||||||
|
|
||||||
model VerificationToken {
|
model VerificationToken {
|
||||||
identifier String
|
identifier String
|
||||||
token String @unique
|
token String @unique
|
||||||
expires DateTime
|
expires DateTime
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
updatedAt DateTime @updatedAt @default(now())
|
updatedAt DateTime @default(now()) @updatedAt
|
||||||
|
|
||||||
@@unique([identifier, token])
|
@@unique([identifier, token])
|
||||||
}
|
}
|
||||||
|
|
||||||
model Collection {
|
model Collection {
|
||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
name String
|
name String
|
||||||
description String @default("")
|
description String @default("")
|
||||||
color String @default("#0ea5e9")
|
color String @default("#0ea5e9")
|
||||||
isPublic Boolean @default(false)
|
isPublic Boolean @default(false)
|
||||||
owner User @relation(fields: [ownerId], references: [id])
|
owner User @relation(fields: [ownerId], references: [id])
|
||||||
ownerId Int
|
ownerId Int
|
||||||
members UsersAndCollections[]
|
members UsersAndCollections[]
|
||||||
links Link[]
|
links Link[]
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
updatedAt DateTime @updatedAt @default(now())
|
updatedAt DateTime @default(now()) @updatedAt
|
||||||
|
|
||||||
@@unique([name, ownerId])
|
@@unique([name, ownerId])
|
||||||
}
|
}
|
||||||
|
@ -93,64 +93,65 @@ model UsersAndCollections {
|
||||||
canUpdate Boolean
|
canUpdate Boolean
|
||||||
canDelete Boolean
|
canDelete Boolean
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
updatedAt DateTime @updatedAt @default(now())
|
updatedAt DateTime @default(now()) @updatedAt
|
||||||
|
|
||||||
@@id([userId, collectionId])
|
@@id([userId, collectionId])
|
||||||
}
|
}
|
||||||
|
|
||||||
model Link {
|
model Link {
|
||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
name String
|
name String
|
||||||
type String @default("url")
|
type String @default("url")
|
||||||
description String @default("")
|
description String @default("")
|
||||||
pinnedBy User[]
|
pinnedBy User[]
|
||||||
collection Collection @relation(fields: [collectionId], references: [id])
|
collection Collection @relation(fields: [collectionId], references: [id])
|
||||||
collectionId Int
|
collectionId Int
|
||||||
tags Tag[]
|
tags Tag[]
|
||||||
url String?
|
url String?
|
||||||
textContent String?
|
textContent String?
|
||||||
screenshotPath String?
|
preview String?
|
||||||
pdfPath String?
|
image String?
|
||||||
readabilityPath String?
|
pdf String?
|
||||||
lastPreserved DateTime?
|
readable String?
|
||||||
createdAt DateTime @default(now())
|
lastPreserved DateTime?
|
||||||
updatedAt DateTime @updatedAt @default(now())
|
createdAt DateTime @default(now())
|
||||||
|
updatedAt DateTime @default(now()) @updatedAt
|
||||||
}
|
}
|
||||||
|
|
||||||
model Tag {
|
model Tag {
|
||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
name String
|
name String
|
||||||
links Link[]
|
links Link[]
|
||||||
owner User @relation(fields: [ownerId], references: [id])
|
owner User @relation(fields: [ownerId], references: [id])
|
||||||
ownerId Int
|
ownerId Int
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
updatedAt DateTime @updatedAt @default(now())
|
updatedAt DateTime @default(now()) @updatedAt
|
||||||
|
|
||||||
@@unique([name, ownerId])
|
@@unique([name, ownerId])
|
||||||
}
|
}
|
||||||
|
|
||||||
model Subscription {
|
model Subscription {
|
||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
active Boolean
|
active Boolean
|
||||||
stripeSubscriptionId String @unique
|
stripeSubscriptionId String @unique
|
||||||
currentPeriodStart DateTime
|
currentPeriodStart DateTime
|
||||||
currentPeriodEnd DateTime
|
currentPeriodEnd DateTime
|
||||||
user User @relation(fields: [userId], references: [id])
|
user User @relation(fields: [userId], references: [id])
|
||||||
userId Int @unique
|
userId Int @unique
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
updatedAt DateTime @updatedAt @default(now())
|
updatedAt DateTime @default(now()) @updatedAt
|
||||||
}
|
}
|
||||||
|
|
||||||
model ApiKey {
|
model ApiKey {
|
||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
name String
|
name String
|
||||||
user User @relation(fields: [userId], references: [id])
|
user User @relation(fields: [userId], references: [id])
|
||||||
userId Int
|
userId Int
|
||||||
token String @unique
|
token String @unique
|
||||||
expires DateTime
|
expires DateTime
|
||||||
lastUsedAt DateTime?
|
lastUsedAt DateTime?
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
updatedAt DateTime @updatedAt @default(now())
|
updatedAt DateTime @default(now()) @updatedAt
|
||||||
|
|
||||||
@@unique([token, userId])
|
@@unique([token, userId])
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,571 @@
|
||||||
|
// A dirty script to seed the database with some data
|
||||||
|
|
||||||
|
const { PrismaClient } = require("@prisma/client");
|
||||||
|
const bcrypt = require("bcrypt");
|
||||||
|
const prisma = new PrismaClient();
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
const saltRounds = 10;
|
||||||
|
const defaultPassword = "11111111";
|
||||||
|
const hashedPassword = bcrypt.hashSync(defaultPassword, saltRounds);
|
||||||
|
|
||||||
|
// Subscription dates
|
||||||
|
const currentPeriodStart = new Date();
|
||||||
|
const currentPeriodEnd = new Date();
|
||||||
|
currentPeriodEnd.setFullYear(currentPeriodEnd.getFullYear() + 10);
|
||||||
|
|
||||||
|
// Operations to be executed within a transaction
|
||||||
|
const transaction = await prisma.$transaction(async (prisma) => {
|
||||||
|
// Create users with subscriptions
|
||||||
|
const user1 = await prisma.user.create({
|
||||||
|
data: {
|
||||||
|
name: "John Doe",
|
||||||
|
username: "user1",
|
||||||
|
email: "user1@example.com",
|
||||||
|
emailVerified: new Date(),
|
||||||
|
password: hashedPassword,
|
||||||
|
subscriptions: {
|
||||||
|
create: {
|
||||||
|
stripeSubscriptionId: "sub_4323",
|
||||||
|
active: true,
|
||||||
|
currentPeriodStart,
|
||||||
|
currentPeriodEnd,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const user2 = await prisma.user.create({
|
||||||
|
data: {
|
||||||
|
name: "Mary Smith",
|
||||||
|
username: "user2",
|
||||||
|
email: "user2@example.com",
|
||||||
|
emailVerified: new Date(),
|
||||||
|
password: hashedPassword,
|
||||||
|
subscriptions: {
|
||||||
|
create: {
|
||||||
|
stripeSubscriptionId: "sub_5435",
|
||||||
|
active: true,
|
||||||
|
currentPeriodStart,
|
||||||
|
currentPeriodEnd,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const user3 = await prisma.user.create({
|
||||||
|
data: {
|
||||||
|
name: "Linda Jones",
|
||||||
|
username: "user3",
|
||||||
|
email: "user3@example.com",
|
||||||
|
emailVerified: new Date(),
|
||||||
|
password: hashedPassword,
|
||||||
|
subscriptions: {
|
||||||
|
create: {
|
||||||
|
stripeSubscriptionId: "sub_6435",
|
||||||
|
active: true,
|
||||||
|
currentPeriodStart,
|
||||||
|
currentPeriodEnd,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const user4 = await prisma.user.create({
|
||||||
|
data: {
|
||||||
|
name: "Betty Sanchez",
|
||||||
|
username: "user4",
|
||||||
|
email: "user4@example.com",
|
||||||
|
emailVerified: new Date(),
|
||||||
|
password: hashedPassword,
|
||||||
|
subscriptions: {
|
||||||
|
create: {
|
||||||
|
stripeSubscriptionId: "sub_7868",
|
||||||
|
active: true,
|
||||||
|
currentPeriodStart,
|
||||||
|
currentPeriodEnd,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const user5 = await prisma.user.create({
|
||||||
|
data: {
|
||||||
|
name: "Jeffrey Edwards",
|
||||||
|
username: "user5",
|
||||||
|
email: "user5@example.com",
|
||||||
|
emailVerified: new Date(),
|
||||||
|
password: hashedPassword,
|
||||||
|
subscriptions: {
|
||||||
|
create: {
|
||||||
|
stripeSubscriptionId: "sub_5653",
|
||||||
|
active: true,
|
||||||
|
currentPeriodStart,
|
||||||
|
currentPeriodEnd,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
// Define and create collections
|
||||||
|
const collectionsUser1 = [
|
||||||
|
{
|
||||||
|
name: "Health and Wellness",
|
||||||
|
description: "Latest articles on health and wellness.",
|
||||||
|
ownerId: user1.id,
|
||||||
|
color: "#ff1100",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Research",
|
||||||
|
description: "Latest articles on research.",
|
||||||
|
ownerId: user1.id,
|
||||||
|
color: "#000dff",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Technology",
|
||||||
|
description: "Latest articles on technology.",
|
||||||
|
ownerId: user1.id,
|
||||||
|
color: "#0080ff",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Personal Finance",
|
||||||
|
description: "Latest articles on personal finance.",
|
||||||
|
ownerId: user1.id,
|
||||||
|
color: "#00ff40",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Productivity",
|
||||||
|
description: "Latest articles on productivity.",
|
||||||
|
ownerId: user1.id,
|
||||||
|
color: "#ff00f7",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Recipes",
|
||||||
|
description: "Latest recipes.",
|
||||||
|
ownerId: user1.id,
|
||||||
|
color: "#eeff00",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const collectionsUser2 = [
|
||||||
|
{
|
||||||
|
name: "Project Alpha",
|
||||||
|
description: "Articles for Project Alpha.",
|
||||||
|
ownerId: user2.id,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const user1Collections = await Promise.all(
|
||||||
|
collectionsUser1.map((c) => prisma.collection.create({ data: c }))
|
||||||
|
);
|
||||||
|
|
||||||
|
const user2Collections = await Promise.all(
|
||||||
|
collectionsUser2.map((c) => prisma.collection.create({ data: c }))
|
||||||
|
);
|
||||||
|
|
||||||
|
// Share one collection between users with permissions
|
||||||
|
await Promise.allSettled([
|
||||||
|
prisma.usersAndCollections.create({
|
||||||
|
data: {
|
||||||
|
userId: user1.id,
|
||||||
|
collectionId: user2Collections[0].id,
|
||||||
|
canCreate: true,
|
||||||
|
canUpdate: true,
|
||||||
|
canDelete: true,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
prisma.usersAndCollections.create({
|
||||||
|
data: {
|
||||||
|
userId: user2.id,
|
||||||
|
collectionId: user1Collections[1].id,
|
||||||
|
canCreate: true,
|
||||||
|
canUpdate: true,
|
||||||
|
canDelete: true,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
prisma.usersAndCollections.create({
|
||||||
|
data: {
|
||||||
|
userId: user3.id,
|
||||||
|
collectionId: user1Collections[1].id,
|
||||||
|
canCreate: true,
|
||||||
|
canUpdate: true,
|
||||||
|
canDelete: true,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
prisma.usersAndCollections.create({
|
||||||
|
data: {
|
||||||
|
userId: user4.id,
|
||||||
|
collectionId: user1Collections[1].id,
|
||||||
|
canCreate: true,
|
||||||
|
canUpdate: true,
|
||||||
|
canDelete: true,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
prisma.usersAndCollections.create({
|
||||||
|
data: {
|
||||||
|
userId: user5.id,
|
||||||
|
collectionId: user1Collections[1].id,
|
||||||
|
canCreate: true,
|
||||||
|
canUpdate: true,
|
||||||
|
canDelete: true,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
prisma.usersAndCollections.create({
|
||||||
|
data: {
|
||||||
|
userId: user2.id,
|
||||||
|
collectionId: user2Collections[0].id,
|
||||||
|
canCreate: true,
|
||||||
|
canUpdate: true,
|
||||||
|
canDelete: true,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
prisma.usersAndCollections.create({
|
||||||
|
data: {
|
||||||
|
userId: user3.id,
|
||||||
|
collectionId: user2Collections[0].id,
|
||||||
|
canCreate: true,
|
||||||
|
canUpdate: true,
|
||||||
|
canDelete: true,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
prisma.usersAndCollections.create({
|
||||||
|
data: {
|
||||||
|
userId: user2.id,
|
||||||
|
collectionId: user1Collections[0].id,
|
||||||
|
canCreate: true,
|
||||||
|
canUpdate: true,
|
||||||
|
canDelete: true,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
]);
|
||||||
|
|
||||||
|
let projectAlphaCollection = await prisma.collection.findFirst({
|
||||||
|
where: {
|
||||||
|
name: "Project Alpha",
|
||||||
|
ownerId: user2.id,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const projectAlphaLinks = [
|
||||||
|
{
|
||||||
|
name: "More than 10,000 research papers were retracted in 2023 — a new record",
|
||||||
|
url: "https://www.nature.com/articles/d41586-023-03974-8",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Advances in Liver Cancer Research",
|
||||||
|
url: "https://www.cancer.gov/types/liver/research",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "NEW RESEARCH REVEALS TOP AI TOOLS UTILIZED BY MUSIC PRODUCERS",
|
||||||
|
url: "https://edm.com/gear-tech/top-ai-tools-music-producers",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "New Google research: What we now know about 'decoding' consumer decision-making",
|
||||||
|
url: "https://www.thinkwithgoogle.com/intl/en-emea/consumer-insights/consumer-journey/the-consumer-decision-making-process/",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Drug Overdose Death Rates",
|
||||||
|
url: "https://nida.nih.gov/research-topics/trends-statistics/overdose-death-rates",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Explore the latest research making an impact in your field",
|
||||||
|
url: "https://biologue.plos.org/2023/10/25/latest-biological-science-research/",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
for (const link of projectAlphaLinks) {
|
||||||
|
await prisma.link.create({
|
||||||
|
data: {
|
||||||
|
name: link.name,
|
||||||
|
url: link.url,
|
||||||
|
collectionId: projectAlphaCollection.id,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const [collectionName, links] of Object.entries(linksAndCollections)) {
|
||||||
|
let collection = await prisma.collection.findFirst({
|
||||||
|
where: {
|
||||||
|
name: collectionName,
|
||||||
|
ownerId: user1.id,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!collection) {
|
||||||
|
collection = await prisma.collection.create({
|
||||||
|
data: {
|
||||||
|
name: collectionName,
|
||||||
|
ownerId: user1.id,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const link of links) {
|
||||||
|
await prisma.link.create({
|
||||||
|
data: {
|
||||||
|
name: link.name,
|
||||||
|
url: link.url,
|
||||||
|
collectionId: collection.id,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const tags = [
|
||||||
|
{ name: "technology", ownerId: user1.id },
|
||||||
|
{ name: "finance", ownerId: user1.id },
|
||||||
|
{ name: "future", ownerId: user1.id },
|
||||||
|
{ name: "health", ownerId: user1.id },
|
||||||
|
{ name: "hacks", ownerId: user1.id },
|
||||||
|
{ name: "lifestyle", ownerId: user1.id },
|
||||||
|
{ name: "routine", ownerId: user1.id },
|
||||||
|
{ name: "personal", ownerId: user1.id },
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
return transaction;
|
||||||
|
}
|
||||||
|
|
||||||
|
main()
|
||||||
|
.catch((e) => {
|
||||||
|
console.error(e);
|
||||||
|
process.exit(1);
|
||||||
|
})
|
||||||
|
.finally(async () => {
|
||||||
|
await prisma.$disconnect();
|
||||||
|
});
|
||||||
|
|
||||||
|
const linksAndCollections = {
|
||||||
|
"Health and Wellness": [
|
||||||
|
{
|
||||||
|
name: "50 Wellness Gifts for Anyone Who Could Use Some Self-Care",
|
||||||
|
url: "https://www.self.com/gallery/healthy-gift-ideas-for-wellness-gurus",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Hearing aids slow cognitive decline in people at high risk",
|
||||||
|
url: "https://www.nih.gov/news-events/nih-research-matters/hearing-aids-slow-cognitive-decline-people-high-risk",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Why Are Healthy Habits Important at Work and Home?",
|
||||||
|
url: "https://info.totalwellnesshealth.com/blog/why-are-healthy-habits-important",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Wellness Travel BC explores shifting travel trends as health and wellness take center stage for Canadians",
|
||||||
|
url: "https://www.vancouverisawesome.com/sponsored/wellness-travel-bc-explores-shifting-travel-trends-as-health-and-wellness-take-center-stage-for-canadians-8004505",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "50 Wellness Gifts for Anyone Who Could Use Some Self-Care",
|
||||||
|
url: "https://www.self.com/gallery/healthy-gift-ideas-for-wellness-gurus",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Example",
|
||||||
|
url: "https://example.com",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Example",
|
||||||
|
url: "https://example.com",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Example",
|
||||||
|
url: "https://example.com",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Example",
|
||||||
|
url: "https://example.com",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
Research: [
|
||||||
|
{
|
||||||
|
name: "More than 10,000 research papers were retracted in 2023 — a new record",
|
||||||
|
url: "https://www.nature.com/articles/d41586-023-03974-8",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Advances in Liver Cancer Research",
|
||||||
|
url: "https://www.cancer.gov/types/liver/research",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "NEW RESEARCH REVEALS TOP AI TOOLS UTILIZED BY MUSIC PRODUCERS",
|
||||||
|
url: "https://edm.com/gear-tech/top-ai-tools-music-producers",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "New Google research: What we now know about 'decoding' consumer decision-making",
|
||||||
|
url: "https://www.thinkwithgoogle.com/intl/en-emea/consumer-insights/consumer-journey/the-consumer-decision-making-process/",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Drug Overdose Death Rates",
|
||||||
|
url: "https://nida.nih.gov/research-topics/trends-statistics/overdose-death-rates",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Explore the latest research making an impact in your field",
|
||||||
|
url: "https://biologue.plos.org/2023/10/25/latest-biological-science-research/",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Example",
|
||||||
|
url: "https://example.com",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
Technology: [
|
||||||
|
{
|
||||||
|
name: "These six questions will dictate the future of generative AI",
|
||||||
|
url: "https://www.technologyreview.com/2023/12/19/1084505/generative-ai-artificial-intelligence-bias-jobs-copyright-misinformation/",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Q&A: People will only use technology they trust, Microsoft expert says",
|
||||||
|
url: "https://www.euronews.com/next/2023/12/21/qa-people-will-only-use-technology-they-trust-microsoft-expert-says",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "How technology and economics can help save endangered species",
|
||||||
|
url: "https://news.osu.edu/how-technology-and-economics-can-help-save-endangered-species/",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "How technology can help save Indigenous forests – and our planet",
|
||||||
|
url: "https://www.eco-business.com/opinion/how-technology-can-help-save-indigenous-forests-and-our-planet/",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "The most energy-efficient way to build homes",
|
||||||
|
url: "https://www.technologyreview.com/2023/12/22/1084532/passive-house-energy-efficient-harold-orr/",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Using virtual reality to diagnose Alzheimer's disease",
|
||||||
|
url: "https://www.bbc.com/news/technology-67794645",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"Personal Finance": [
|
||||||
|
{
|
||||||
|
name: "Turn your home’s empty bedroom into $875 in monthly rent",
|
||||||
|
url: "https://www.theglobeandmail.com/investing/personal-finance/household-finances/article-turn-your-homes-empty-bedroom-into-875-in-monthly-rent/",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Don’t let financial constraints slow down your gift-giving",
|
||||||
|
url: "https://www.thespec.com/life/personal-finance/don-t-let-financial-constraints-slow-down-your-gift-giving/article_e3c99ac5-912c-59a9-a815-654befcd4c9c.html",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "The worst retirement planning mistakes you should avoid, according to an expert",
|
||||||
|
url: "https://www.ctvnews.ca/business/the-worst-retirement-planning-mistakes-you-should-avoid-according-to-an-expert-1.6694093",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "What to Do About That Credit-Card Debt",
|
||||||
|
url: "https://www.thecut.com/2023/12/what-to-do-about-that-credit-card-debt.html",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "How to become rich: Nine golden personal finance rules that may help you make money",
|
||||||
|
url: "https://www.livemint.com/money/personal-finance/how-to-become-rich-nine-golden-personal-finance-rules-that-may-help-you-make-money-11703059139843.html",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Saving Money: Smart Strategies for Keeping Your Financial New Years’ Resolutions",
|
||||||
|
url: "https://www.tipranks.com/news/personal-finance/saving-money-smart-strategies-for-keeping-your-financial-new-years-resolutions",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Example",
|
||||||
|
url: "https://example.com",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Example",
|
||||||
|
url: "https://example.com",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
Productivity: [
|
||||||
|
{
|
||||||
|
name: "Efficiency Vs. Productivity At Work: How To Balance Both",
|
||||||
|
url: "https://www.forbes.com/sites/carolinecastrillon/2023/12/20/efficiency-vs-productivity-at-work-how-to-increase-both/?sh=4c7d486f1bee",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Is it worth measuring software developer productivity? CIOs weigh in",
|
||||||
|
url: "https://www.cio.com/article/1255774/is-it-worth-measuring-software-developer-productivity-cios-weigh-in.html",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Avoid These 10 Business Habits to Increase Workplace Productivity",
|
||||||
|
url: "https://www.entrepreneur.com/growing-a-business/10-bad-business-habits-that-destroy-productivity/466381",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "The value of productivity",
|
||||||
|
url: "https://www.tribuneindia.com/news/musings/the-value-of-productivity-573858",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "This new Canonical feature solves my biggest problem with online productivity apps",
|
||||||
|
url: "https://www.zdnet.com/article/canonical-will-soon-make-it-even-easier-to-work-with-google-workspace-and-office-365-online/",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "10 Practical Recommendations for Increasing Work Results and Value",
|
||||||
|
url: "https://www.inc.com/martin-zwilling/10-practical-recommendations-for-increasing-work-results-value.html",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Example",
|
||||||
|
url: "https://example.com",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Example",
|
||||||
|
url: "https://example.com",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Example",
|
||||||
|
url: "https://example.com",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Example",
|
||||||
|
url: "https://example.com",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Example",
|
||||||
|
url: "https://example.com",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Example",
|
||||||
|
url: "https://example.com",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
Recipes: [
|
||||||
|
{
|
||||||
|
name: "Joe Woodhouse’s vegetarian standouts for Christmas day – recipes",
|
||||||
|
url: "https://www.theguardian.com/food/2023/dec/22/joe-woodhouses-vegetarian-standouts-for-christmas-day-recipes",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "10 cookie recipes to bake for your holiday party",
|
||||||
|
url: "https://www.deseret.com/2023/12/21/24009656/best-holiday-cookie-recipes",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "The Best Potato Recipes for Holiday Season and Beyond, According to Eater Staff",
|
||||||
|
url: "https://www.eater.com/24003490/the-best-potato-recipes-for-holiday-season-and-beyond-according-to-eater-staff",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "The Most-Saved Recipes in the Epicurious App This Week",
|
||||||
|
url: "https://www.epicurious.com/recipes-menus/most-saved-recipes",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "11 Brand-New Recipes to Try This Month",
|
||||||
|
url: "https://www.tasteofhome.com/collection/new-recipes-to-try/",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "19 Baked Pasta Recipes for Golden, Gooey Comfort",
|
||||||
|
url: "https://www.bonappetit.com/gallery/baked-pasta-recipes",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Example",
|
||||||
|
url: "https://example.com",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Example",
|
||||||
|
url: "https://example.com",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Example",
|
||||||
|
url: "https://example.com",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Example",
|
||||||
|
url: "https://example.com",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Example",
|
||||||
|
url: "https://example.com",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Example",
|
||||||
|
url: "https://example.com",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Example",
|
||||||
|
url: "https://example.com",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
|
@ -23,7 +23,7 @@ async function processBatch() {
|
||||||
archiveAsScreenshot: true,
|
archiveAsScreenshot: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
screenshotPath: null,
|
image: null,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
collection: {
|
collection: {
|
||||||
|
@ -31,7 +31,7 @@ async function processBatch() {
|
||||||
archiveAsScreenshot: true,
|
archiveAsScreenshot: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
screenshotPath: "pending",
|
image: "pending",
|
||||||
},
|
},
|
||||||
///////////////////////
|
///////////////////////
|
||||||
{
|
{
|
||||||
|
@ -40,7 +40,7 @@ async function processBatch() {
|
||||||
archiveAsPDF: true,
|
archiveAsPDF: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
pdfPath: null,
|
pdf: null,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
collection: {
|
collection: {
|
||||||
|
@ -48,14 +48,14 @@ async function processBatch() {
|
||||||
archiveAsPDF: true,
|
archiveAsPDF: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
pdfPath: "pending",
|
pdf: "pending",
|
||||||
},
|
},
|
||||||
///////////////////////
|
///////////////////////
|
||||||
{
|
{
|
||||||
readabilityPath: null,
|
readable: null,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
readabilityPath: "pending",
|
readable: "pending",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -80,7 +80,7 @@ async function processBatch() {
|
||||||
archiveAsScreenshot: true,
|
archiveAsScreenshot: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
screenshotPath: null,
|
image: null,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
collection: {
|
collection: {
|
||||||
|
@ -88,7 +88,7 @@ async function processBatch() {
|
||||||
archiveAsScreenshot: true,
|
archiveAsScreenshot: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
screenshotPath: "pending",
|
image: "pending",
|
||||||
},
|
},
|
||||||
///////////////////////
|
///////////////////////
|
||||||
{
|
{
|
||||||
|
@ -97,7 +97,7 @@ async function processBatch() {
|
||||||
archiveAsPDF: true,
|
archiveAsPDF: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
pdfPath: null,
|
pdf: null,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
collection: {
|
collection: {
|
||||||
|
@ -105,14 +105,14 @@ async function processBatch() {
|
||||||
archiveAsPDF: true,
|
archiveAsPDF: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
pdfPath: "pending",
|
pdf: "pending",
|
||||||
},
|
},
|
||||||
///////////////////////
|
///////////////////////
|
||||||
{
|
{
|
||||||
readabilityPath: null,
|
readable: null,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
readabilityPath: "pending",
|
readable: "pending",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
Ŝarĝante…
Reference in New Issue