Compare commits
5 Commits
2025-09-05
...
2025-09-08
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a3c54b1c82 | ||
|
|
be7534be8d | ||
|
|
23fae22735 | ||
|
|
d436284476 | ||
|
|
800c9c488c |
@@ -33,11 +33,9 @@ function parseObjects(raw, type = "rooms") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function generateDungeon() {
|
export async function generateDungeon() {
|
||||||
console.log("Starting compact dungeon generation with debug logs...\n");
|
|
||||||
|
|
||||||
// Step 1: Titles
|
// Step 1: Titles
|
||||||
const titles10Raw = await callOllama(
|
const generatedTitlesRaw = await callOllama(
|
||||||
`Generate 10 short, punchy dungeon titles (max 5 words each), numbered as a plain text list.
|
`Generate 50 short, punchy dungeon titles (max 5 words each), numbered as a plain text list.
|
||||||
Each title should come from a different style or theme. Make the set varied and evocative. For example:
|
Each title should come from a different style or theme. Make the set varied and evocative. For example:
|
||||||
|
|
||||||
- OSR / classic tabletop: gritty, mysterious, old-school
|
- OSR / classic tabletop: gritty, mysterious, old-school
|
||||||
@@ -47,45 +45,24 @@ Each title should come from a different style or theme. Make the set varied and
|
|||||||
- Weird fantasy: uncanny, surreal, unsettling
|
- Weird fantasy: uncanny, surreal, unsettling
|
||||||
- Whimsical: fun, quirky, playful
|
- Whimsical: fun, quirky, playful
|
||||||
|
|
||||||
Avoid repeating materials or adjectives. Do not include any titles with the words "Obsidian" or "Clockwork". Do not include explanations, markdown, or preambles. Do not include the style or theme in parenthesis. Only the 10 numbered titles.`,
|
Avoid repeating materials or adjectives. Absolutely do not use the words "Obsidian" or "Clockwork" in any title. Do not include explanations, markdown, or preambles. Do not include the style or theme in parenthesis. Only the 50 numbered titles.`,
|
||||||
undefined, 5, "Step 1: Titles"
|
undefined, 5, "Step 1: Titles"
|
||||||
);
|
);
|
||||||
const titles10 = parseList(titles10Raw, 30);
|
const generatedTitles = parseList(generatedTitlesRaw);
|
||||||
console.log("Parsed titles10:", titles10);
|
console.log("Generated Titles:", generatedTitles);
|
||||||
|
const title = generatedTitles[Math.floor(Math.random() * generatedTitles.length)];
|
||||||
// Step 2: Narrow to 5
|
|
||||||
const titles5Raw = await callOllama(
|
|
||||||
`Here are 10 dungeon titles:
|
|
||||||
${titles10.join("\n")}
|
|
||||||
|
|
||||||
Randomly select 3 of the titles from the above list and create 2 additional unique titles. Do not include any titles with the words "Obsidian" or "Clockwork".
|
|
||||||
Output exactly 5 titles as a numbered list, plain text only. No explanations.`,
|
|
||||||
undefined, 5, "Step 2: Narrow Titles"
|
|
||||||
);
|
|
||||||
const titles5 = parseList(titles5Raw, 30);
|
|
||||||
console.log("Parsed titles5:", titles5);
|
|
||||||
|
|
||||||
// Step 3: Final title
|
|
||||||
const bestTitleRaw = await callOllama(
|
|
||||||
`From the following 5 dungeon titles, randomly select only one of them.
|
|
||||||
Output only the title, no explanation, no numbering, no extra text:
|
|
||||||
|
|
||||||
${titles5.join("\n")}`,
|
|
||||||
undefined, 5, "Step 3: Final Title"
|
|
||||||
);
|
|
||||||
const title = cleanText(bestTitleRaw.split("\n")[0]);
|
|
||||||
console.log("Selected title:", title);
|
console.log("Selected title:", title);
|
||||||
|
|
||||||
// Step 4: Flavor text
|
// Step 2: Flavor text
|
||||||
const flavorRaw = await callOllama(
|
const flavorRaw = await callOllama(
|
||||||
`Write a single evocative paragraph describing the location titled "${title}".
|
`Write a single evocative paragraph describing the location titled "${title}". Absolutely do not use the words "Obsidian" or "Clockwork" anywhere in the paragraph.
|
||||||
Do not include hooks, NPCs, treasure, or instructions. Do not use bullet points or em-dashes. Output plain text only, one paragraph. Maximum 4 sentences.`,
|
Do not include hooks, NPCs, treasure, or instructions. Do not use bullet points or em-dashes. Output plain text only, one paragraph. Maximum 4 sentences.`,
|
||||||
undefined, 5, "Step 4: Flavor"
|
undefined, 5, "Step 2: Flavor"
|
||||||
);
|
);
|
||||||
const flavor = flavorRaw;
|
const flavor = flavorRaw;
|
||||||
console.log("Flavor text:", flavor);
|
console.log("Flavor text:", flavor);
|
||||||
|
|
||||||
// Step 5: Hooks & Rumors
|
// Step 3: Hooks & Rumors
|
||||||
const hooksRumorsRaw = await callOllama(
|
const hooksRumorsRaw = await callOllama(
|
||||||
`Based only on this location's flavor:
|
`Based only on this location's flavor:
|
||||||
|
|
||||||
@@ -94,12 +71,12 @@ ${flavor}
|
|||||||
Generate 3 short adventure hooks or rumors (mix them naturally).
|
Generate 3 short adventure hooks or rumors (mix them naturally).
|
||||||
Output as a single numbered list, plain text only. Do not use em-dashes.
|
Output as a single numbered list, plain text only. Do not use em-dashes.
|
||||||
Maximum 2 sentences per item. No explanations or extra text.`,
|
Maximum 2 sentences per item. No explanations or extra text.`,
|
||||||
undefined, 5, "Step 5: Hooks & Rumors"
|
undefined, 5, "Step 3: Hooks & Rumors"
|
||||||
);
|
);
|
||||||
const hooksRumors = parseList(hooksRumorsRaw, 120);
|
const hooksRumors = parseList(hooksRumorsRaw);
|
||||||
console.log("Hooks & Rumors:", hooksRumors);
|
console.log("Hooks & Rumors:", hooksRumors);
|
||||||
|
|
||||||
// Step 6: Rooms & Encounters
|
// Step 4: Rooms & Encounters
|
||||||
const roomsEncountersRaw = await callOllama(
|
const roomsEncountersRaw = await callOllama(
|
||||||
`Using the flavor and these hooks/rumors:
|
`Using the flavor and these hooks/rumors:
|
||||||
|
|
||||||
@@ -111,7 +88,7 @@ ${hooksRumors.join("\n")}
|
|||||||
|
|
||||||
Generate 5 rooms (name + short description) and 6 encounters (name + details).
|
Generate 5 rooms (name + short description) and 6 encounters (name + details).
|
||||||
Output two numbered lists, labeled "Rooms:" and "Encounters:". Plain text only. No extra explanation.`,
|
Output two numbered lists, labeled "Rooms:" and "Encounters:". Plain text only. No extra explanation.`,
|
||||||
undefined, 5, "Step 6: Rooms & Encounters"
|
undefined, 5, "Step 4: Rooms & Encounters"
|
||||||
);
|
);
|
||||||
const [roomsSection, encountersSection] = roomsEncountersRaw.split(/Encounters[:\n]/i);
|
const [roomsSection, encountersSection] = roomsEncountersRaw.split(/Encounters[:\n]/i);
|
||||||
const rooms = parseObjects(roomsSection.replace(/Rooms[:\n]*/i, ""), "rooms", 120);
|
const rooms = parseObjects(roomsSection.replace(/Rooms[:\n]*/i, ""), "rooms", 120);
|
||||||
@@ -119,7 +96,7 @@ Output two numbered lists, labeled "Rooms:" and "Encounters:". Plain text only.
|
|||||||
console.log("Rooms:", rooms);
|
console.log("Rooms:", rooms);
|
||||||
console.log("Encounters:", encounters);
|
console.log("Encounters:", encounters);
|
||||||
|
|
||||||
// Step 7: Treasure & NPCs
|
// Step 5: Treasure & NPCs
|
||||||
const treasureNpcsRaw = await callOllama(
|
const treasureNpcsRaw = await callOllama(
|
||||||
`Based only on these rooms and encounters:
|
`Based only on these rooms and encounters:
|
||||||
|
|
||||||
@@ -129,15 +106,15 @@ Generate 3 treasures and 3 NPCs (name + trait, max 2 sentences each).
|
|||||||
Each NPC has a proper name, not just a title.
|
Each NPC has a proper name, not just a title.
|
||||||
Treasure should sometimes include a danger or side-effect.
|
Treasure should sometimes include a danger or side-effect.
|
||||||
Output numbered lists labeled "Treasure:" and "NPCs:". Plain text only, no extra text.`,
|
Output numbered lists labeled "Treasure:" and "NPCs:". Plain text only, no extra text.`,
|
||||||
undefined, 5, "Step 7: Treasure & NPCs"
|
undefined, 5, "Step 5: Treasure & NPCs"
|
||||||
);
|
);
|
||||||
const [treasureSection, npcsSection] = treasureNpcsRaw.split(/NPCs[:\n]/i);
|
const [treasureSection, npcsSection] = treasureNpcsRaw.split(/NPCs[:\n]/i);
|
||||||
const treasure = parseList(treasureSection.replace(/Treasures?[:\n]*/i, ""), 120);
|
const treasure = parseList(treasureSection.replace(/Treasures?[:\n]*/i, ""));
|
||||||
const npcs = parseObjects(npcsSection || "", "npcs", 120);
|
const npcs = parseObjects(npcsSection || "", "npcs", 120);
|
||||||
console.log("Treasure:", treasure);
|
console.log("Treasure:", treasure);
|
||||||
console.log("NPCs:", npcs);
|
console.log("NPCs:", npcs);
|
||||||
|
|
||||||
// Step 8: Plot Resolutions
|
// Step 6: Plot Resolutions
|
||||||
const plotResolutionsRaw = await callOllama(
|
const plotResolutionsRaw = await callOllama(
|
||||||
`Based on the following location's flavor and story hooks:
|
`Based on the following location's flavor and story hooks:
|
||||||
|
|
||||||
@@ -155,9 +132,9 @@ These are prompts and ideas for brainstorming the story's ending, not fixed outc
|
|||||||
Start each item with phrases like "The adventurers could" or "The PCs might" to emphasize their hypothetical nature.
|
Start each item with phrases like "The adventurers could" or "The PCs might" to emphasize their hypothetical nature.
|
||||||
Deepen the narrative texture and allow roleplay and tactical creativity.
|
Deepen the narrative texture and allow roleplay and tactical creativity.
|
||||||
Keep each item short (max 2 sentences). Output as a numbered list, plain text only.`,
|
Keep each item short (max 2 sentences). Output as a numbered list, plain text only.`,
|
||||||
undefined, 5, "Step 8: Plot Resolutions"
|
undefined, 5, "Step 6: Plot Resolutions"
|
||||||
);
|
);
|
||||||
const plotResolutions = parseList(plotResolutionsRaw, 180);
|
const plotResolutions = parseList(plotResolutionsRaw);
|
||||||
console.log("Plot Resolutions:", plotResolutions);
|
console.log("Plot Resolutions:", plotResolutions);
|
||||||
|
|
||||||
console.log("\nDungeon generation complete!");
|
console.log("\nDungeon generation complete!");
|
||||||
|
|||||||
@@ -11,8 +11,10 @@ export function dungeonTemplate(data) {
|
|||||||
];
|
];
|
||||||
|
|
||||||
const headingFonts = [
|
const headingFonts = [
|
||||||
|
"'New Rocker', system-ui",
|
||||||
|
"'UnifrakturCook', cursive",
|
||||||
|
"'IM Fell DW Pica', serif",
|
||||||
"'Cinzel', serif",
|
"'Cinzel', serif",
|
||||||
"'MedievalSharp', serif",
|
|
||||||
"'Cormorant Garamond', serif",
|
"'Cormorant Garamond', serif",
|
||||||
"'Playfair Display', serif"
|
"'Playfair Display', serif"
|
||||||
];
|
];
|
||||||
@@ -26,7 +28,6 @@ export function dungeonTemplate(data) {
|
|||||||
|
|
||||||
const quoteFonts = [
|
const quoteFonts = [
|
||||||
"'Playfair Display', serif",
|
"'Playfair Display', serif",
|
||||||
"'Uncial Antiqua', serif",
|
|
||||||
"'Libre Baskerville', serif",
|
"'Libre Baskerville', serif",
|
||||||
"'Merriweather', serif"
|
"'Merriweather', serif"
|
||||||
];
|
];
|
||||||
@@ -40,127 +41,185 @@ export function dungeonTemplate(data) {
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>${data.title}</title>
|
<title>${data.title}</title>
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Cinzel+Decorative&family=MedievalSharp&family=Metamorphous&family=Playfair+Display&family=Alegreya+Sans&family=Cabin&family=IBM+Plex+Sans&family=Cormorant+Garamond&family=Lora&family=Merriweather&family=Libre+Baskerville&family=Source+Serif+4&family=Walter+Turncoat&family=Uncial+Antiqua&family=Beth+Ellen&family=Pinyon+Script&display=swap" rel="stylesheet">
|
<link
|
||||||
<style>
|
href="https://fonts.googleapis.com/css2?family=Cinzel+Decorative&family=UnifrakturCook&family=New+Rocker&family=Metamorphous&family=Playfair+Display&family=Alegreya+Sans&family=Cabin&family=IBM+Plex+Sans&family=Cormorant+Garamond&family=Lora&family=Merriweather&family=Libre+Baskerville&family=Source+Serif+4&family=Walter+Turncoat&family=Uncial+Antiqua&family=Beth+Ellen&family=Pinyon+Script&display=swap"
|
||||||
@page { size: A4 landscape; margin: 0; }
|
rel="stylesheet">
|
||||||
body {
|
<style>
|
||||||
margin: 0; padding: 1.5cm;
|
@page {
|
||||||
background: #f5f5f5;
|
size: A4 landscape;
|
||||||
font-family: ${bodyFont};
|
margin: 0;
|
||||||
color: #1a1a1a;
|
}
|
||||||
font-size: 0.7em;
|
body {
|
||||||
line-height: 1.25em;
|
margin: 0;
|
||||||
}
|
padding: 0;
|
||||||
h1 {
|
font-family: ${bodyFont};
|
||||||
font-family: ${headingFont};
|
color: #1a1a1a;
|
||||||
text-align: center;
|
font-size: 0.7em;
|
||||||
font-size: 2em;
|
line-height: 1.25em;
|
||||||
margin: 0.2em 0 0.3em;
|
}
|
||||||
color: #1a1a1a;
|
.content-page {
|
||||||
border-bottom: 2px solid #1a1a1a;
|
height: 100vh;
|
||||||
padding-bottom: 0.2em;
|
box-sizing: border-box;
|
||||||
letter-spacing: 0.1em;
|
padding: 1.5cm;
|
||||||
}
|
page-break-after: always;
|
||||||
.flavor {
|
overflow: hidden;
|
||||||
text-align: center;
|
break-inside: avoid;
|
||||||
font-style: italic;
|
}
|
||||||
font-family: ${quoteFont};
|
h1 {
|
||||||
margin: 0.4em 0 0.8em;
|
font-family: ${headingFont};
|
||||||
font-size: 0.9em;
|
text-align: center;
|
||||||
}
|
text-transform: uppercase;
|
||||||
.columns {
|
font-size: 2em;
|
||||||
display: grid;
|
margin: 0.2em 0 0.3em;
|
||||||
grid-template-columns: 1fr 1fr 1fr;
|
color: #1a1a1a;
|
||||||
gap: 0.5cm;
|
border-bottom: 2px solid #1a1a1a;
|
||||||
align-items: start;
|
padding-bottom: 0.2em;
|
||||||
}
|
letter-spacing: 0.1em;
|
||||||
.col {
|
}
|
||||||
display: flex; flex-direction: column;
|
.flavor {
|
||||||
gap: 0.15em;
|
text-align: center;
|
||||||
}
|
font-style: italic;
|
||||||
h2 {
|
font-family: ${quoteFont};
|
||||||
font-family: ${headingFont};
|
margin: 0.4em 0 0.8em;
|
||||||
font-size: 1.0em;
|
font-size: 0.9em;
|
||||||
margin: 0.3em 0 0.1em;
|
}
|
||||||
color: #1a1a1a;
|
.columns {
|
||||||
border-bottom: 1px solid #1a1a1a;
|
display: grid;
|
||||||
padding-bottom: 0.1em;
|
grid-template-columns: 1fr 1fr 1fr;
|
||||||
text-transform: uppercase;
|
gap: 0.5cm;
|
||||||
letter-spacing: 0.05em;
|
align-items: start;
|
||||||
}
|
}
|
||||||
.room h3 { margin: 0.2em 0 0.05em; font-size: 0.95em; font-weight: bold; }
|
.col {
|
||||||
.room p { text-align: justify; word-wrap: break-word; margin: 0.1em 0 0.3em; }
|
display: flex;
|
||||||
ul { padding-left: 1em; margin: 0.1em 0 0.3em; }
|
flex-direction: column;
|
||||||
li { margin-bottom: 0.2em; }
|
gap: 0.15em;
|
||||||
table { width: 100%; border-collapse: collapse; font-family: ${tableFont}; font-size: 0.8em; }
|
}
|
||||||
th, td { border: 1px solid #1a1a1a; padding: 0.2em; text-align: left; vertical-align: top; }
|
h2 {
|
||||||
th { background: #e0e0e0; }
|
font-family: ${headingFont};
|
||||||
table tr:hover { background: rgba(0, 0, 0, 0.05); }
|
font-size: 1.0em;
|
||||||
.map-page {
|
margin: 0.3em 0 0.1em;
|
||||||
page-break-before: always;
|
color: #1a1a1a;
|
||||||
display: flex;
|
border-bottom: 1px solid #1a1a1a;
|
||||||
align-items: center;
|
padding-bottom: 0.1em;
|
||||||
justify-content: center;
|
text-transform: uppercase;
|
||||||
padding: 1.5cm;
|
letter-spacing: 0.05em;
|
||||||
height: calc(100vh - 3cm);
|
}
|
||||||
box-sizing: border-box;
|
.room h3 {
|
||||||
background: #f5f5f5;
|
margin: 0.2em 0 0.05em;
|
||||||
}
|
font-size: 0.95em;
|
||||||
.map-page img {
|
font-weight: bold;
|
||||||
max-width: 100%;
|
}
|
||||||
max-height: 100%;
|
.room p {
|
||||||
height: auto;
|
text-align: justify;
|
||||||
width: auto;
|
word-wrap: break-word;
|
||||||
border-radius: 0.2cm;
|
margin: 0.1em 0 0.3em;
|
||||||
object-fit: contain;
|
}
|
||||||
box-shadow:
|
ul {
|
||||||
0 0 20px 15px #f5f5f5 inset,
|
padding-left: 1em;
|
||||||
0 0 5px 2px rgba(0, 0, 0, 0.05);
|
margin: 0.1em 0 0.3em;
|
||||||
}
|
}
|
||||||
footer {
|
li {
|
||||||
text-align: center; font-size: 0.65em; color: #555; margin-top: 0.5em; font-style: italic;
|
margin-bottom: 0.2em;
|
||||||
}
|
}
|
||||||
</style>
|
table {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
font-family: ${tableFont};
|
||||||
|
font-size: 0.8em;
|
||||||
|
}
|
||||||
|
th,
|
||||||
|
td {
|
||||||
|
border: 1px solid #1a1a1a;
|
||||||
|
padding: 0.2em;
|
||||||
|
text-align: left;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
th {
|
||||||
|
background: #e0e0e0;
|
||||||
|
}
|
||||||
|
table tr:hover {
|
||||||
|
background: rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
.map-page {
|
||||||
|
height: 210mm;
|
||||||
|
width: 297mm;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 1.5cm;
|
||||||
|
position: relative;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.map-image-container {
|
||||||
|
position: absolute;
|
||||||
|
top: 1.5cm;
|
||||||
|
left: 1.5cm;
|
||||||
|
right: 1.5cm;
|
||||||
|
bottom: 3cm;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.map-page img {
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 100%;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
.map-page footer {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 1.5cm;
|
||||||
|
left: 1.5cm;
|
||||||
|
right: 1.5cm;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 0.65em;
|
||||||
|
color: #555;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>${data.title}</h1>
|
<div class="content-page">
|
||||||
<p class="flavor">${data.flavor}</p>
|
<h1>${data.title}</h1>
|
||||||
|
<p class="flavor">${data.flavor}</p>
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<h2>Adventure Hooks & Rumors</h2>
|
<h2>Adventure Hooks & Rumors</h2>
|
||||||
<ul>${data.hooksRumors.map(item => `<li>${item}</li>`).join("")}</ul>
|
<ul>${data.hooksRumors.map(item => `<li>${item}</li>`).join("")}</ul>
|
||||||
|
<h2>Locations</h2>
|
||||||
<h2>Locations</h2>
|
${data.rooms.map((room, i) => `<div class="room">
|
||||||
${data.rooms.map((room, i) => `<div class="room"><h3>${i + 1}. ${room.name}</h3><p>${room.description}</p></div>`).join("")}
|
<h3>${i + 1}. ${room.name}</h3>
|
||||||
|
<p>${room.description}</p>
|
||||||
|
</div>`).join("")}
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<h2>Encounters</h2>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Details</th>
|
||||||
|
</tr>
|
||||||
|
${data.encounters.map(e => `<tr>
|
||||||
|
<td>${e.name}</td>
|
||||||
|
<td>${e.details}</td>
|
||||||
|
</tr>`).join("")}
|
||||||
|
</table>
|
||||||
|
<h2>Treasure</h2>
|
||||||
|
<ul>${data.treasure.map(t => `<li>${t}</li>`).join("")}</ul>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<h2>NPCs</h2>
|
||||||
|
<ul>${data.npcs.map(n => `<li><b>${n.name}</b>: ${n.trait}</li>`).join("")}</ul>
|
||||||
|
<h2>Plot Resolutions</h2>
|
||||||
|
<ul>${data.plotResolutions.map(p => `<li>${p}</li>`).join("")}</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="map-page">
|
||||||
<div class="col">
|
<div class="map-image-container">
|
||||||
<h2>Encounters</h2>
|
<img src="${data.map}" alt="Dungeon Map">
|
||||||
<table><tr><th>Name</th><th>Details</th></tr>
|
</div>
|
||||||
${data.encounters.map(e => `<tr><td>${e.name}</td><td>${e.details}</td></tr>`).join("")}
|
<footer>Scrollsmith • © ${new Date().getFullYear()}</footer>
|
||||||
</table>
|
|
||||||
|
|
||||||
<h2>Treasure</h2>
|
|
||||||
<ul>${data.treasure.map(t => `<li>${t}</li>`).join("")}</ul>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col">
|
|
||||||
<h2>NPCs</h2>
|
|
||||||
<ul>${data.npcs.map(n => `<li><b>${n.name}</b>: ${n.trait}</li>`).join("")}</ul>
|
|
||||||
|
|
||||||
<h2>Plot Resolutions</h2>
|
|
||||||
<ul>${data.plotResolutions.map(p => `<li>${p}</li>`).join("")}</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="map-page">
|
|
||||||
<img src="${data.map}" alt="Dungeon Map">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<footer>Generated with Scrollsmith • © ${new Date().getFullYear()}</footer>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ export async function generatePDF(data, outputPath = "dungeon.pdf") {
|
|||||||
format: "A4",
|
format: "A4",
|
||||||
landscape: true,
|
landscape: true,
|
||||||
printBackground: true,
|
printBackground: true,
|
||||||
|
preferCSSPageSize: true
|
||||||
});
|
});
|
||||||
|
|
||||||
await browser.close();
|
await browser.close();
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import sharp from 'sharp';
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import { mkdir, writeFile } from "fs/promises";
|
import { mkdir, writeFile } from "fs/promises";
|
||||||
import { fileURLToPath } from "url";
|
import { fileURLToPath } from "url";
|
||||||
@@ -7,7 +8,27 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|||||||
const COMFYUI_URL = process.env.COMFYUI_URL || "http://localhost:8188";
|
const COMFYUI_URL = process.env.COMFYUI_URL || "http://localhost:8188";
|
||||||
|
|
||||||
// Drawing style prefix
|
// Drawing style prefix
|
||||||
const STYLE_PREFIX = `clean line art, minimalist sketch, concept art sketch, black and white line drawing, lots of white space, sparse shading, simple hatching, very low detail, subtle color accent`;
|
const STYLE_PREFIX = `clean line art, minimalist sketch, concept art sketch, black and white line drawing, lots of white space, sparse shading, very minimal shading, simple black hatching, very low detail, single accent color`;
|
||||||
|
|
||||||
|
async function upscaleImage(inputPath, outputPath, width, height) {
|
||||||
|
try {
|
||||||
|
await sharp(inputPath)
|
||||||
|
.resize(width, height, { kernel: 'lanczos3' })
|
||||||
|
.blur(0.3)
|
||||||
|
.sharpen()
|
||||||
|
.png({
|
||||||
|
compressionLevel: 9,
|
||||||
|
adaptiveFiltering: true,
|
||||||
|
palette: true
|
||||||
|
})
|
||||||
|
.toFile(outputPath);
|
||||||
|
console.log(`Upscaled + compressed PNG saved: ${outputPath}`);
|
||||||
|
return outputPath;
|
||||||
|
} catch (err) {
|
||||||
|
console.error("Error during upscaling:", err.message);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 1. Generate engineered visual prompt
|
// 1. Generate engineered visual prompt
|
||||||
async function generateVisualPrompt(flavor) {
|
async function generateVisualPrompt(flavor) {
|
||||||
@@ -51,7 +72,7 @@ function buildComfyWorkflow(promptText, negativeText = "") {
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"seed": Math.floor(Math.random() * 100000),
|
"seed": Math.floor(Math.random() * 100000),
|
||||||
"steps": 4,
|
"steps": 4,
|
||||||
"cfg": 3,
|
"cfg": 1,
|
||||||
"sampler_name": "euler",
|
"sampler_name": "euler",
|
||||||
"scheduler": "simple",
|
"scheduler": "simple",
|
||||||
"denoise": 1,
|
"denoise": 1,
|
||||||
@@ -71,8 +92,8 @@ function buildComfyWorkflow(promptText, negativeText = "") {
|
|||||||
},
|
},
|
||||||
"5": {
|
"5": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"width": 640,
|
"width": 728,
|
||||||
"height": 448,
|
"height": 512,
|
||||||
"batch_size": 1
|
"batch_size": 1
|
||||||
},
|
},
|
||||||
"class_type": "EmptyLatentImage"
|
"class_type": "EmptyLatentImage"
|
||||||
@@ -156,7 +177,7 @@ async function downloadImage(filename, localFilename) {
|
|||||||
|
|
||||||
// 4c. Submit prompt and handle full image pipeline
|
// 4c. Submit prompt and handle full image pipeline
|
||||||
async function generateImageViaComfyUI(prompt, filename) {
|
async function generateImageViaComfyUI(prompt, filename) {
|
||||||
const negativePrompt = `heavy shading, deep blacks, cross-hatching, dark, gritty, shadow-filled, chiaroscuro, scratchy lines, photorealism, hyper-realistic, high detail, 3D render, CGI, polished, smooth shading, detailed textures, noisy, cluttered, blurry, text, logo, signature, watermark`;
|
const negativePrompt = `heavy shading, deep blacks, cross-hatching, dark, gritty, shadow-filled, chiaroscuro, scratchy lines, photorealism, hyper-realistic, high detail, 3D render, CGI, polished, smooth shading, detailed textures, noisy, cluttered, blurry, text, logo, signature, watermark, artist name, branding, ugly, deformed, unnatural patterns, perfect curves, repetitive textures`;
|
||||||
const workflow = buildComfyWorkflow(prompt, negativePrompt);
|
const workflow = buildComfyWorkflow(prompt, negativePrompt);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -196,12 +217,19 @@ export async function generateDungeonImages({ flavor }) {
|
|||||||
const finalPrompt = await generateVisualPrompt(flavor);
|
const finalPrompt = await generateVisualPrompt(flavor);
|
||||||
console.log("Engineered visual prompt:\n", finalPrompt);
|
console.log("Engineered visual prompt:\n", finalPrompt);
|
||||||
|
|
||||||
const filename = `dungeon.png`;
|
const baseFilename = `dungeon.png`;
|
||||||
const filepath = await generateImageViaComfyUI(finalPrompt, filename);
|
const upscaledFilename = `dungeon_upscaled.png`;
|
||||||
|
|
||||||
|
const filepath = await generateImageViaComfyUI(finalPrompt, baseFilename);
|
||||||
if (!filepath) {
|
if (!filepath) {
|
||||||
throw new Error("Failed to generate dungeon image.");
|
throw new Error("Failed to generate dungeon image.");
|
||||||
}
|
}
|
||||||
|
|
||||||
return filepath;
|
// Upscale 2x (half of A4 at 300dpi)
|
||||||
|
const upscaledPath = await upscaleImage(filepath, upscaledFilename, 1456, 1024);
|
||||||
|
if (!upscaledPath) {
|
||||||
|
throw new Error("Failed to upscale dungeon image.");
|
||||||
|
}
|
||||||
|
|
||||||
|
return upscaledPath;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,8 +62,8 @@ export async function callOllama(prompt, model = "gemma3n:e4b", retries = 5, ste
|
|||||||
const cleaned = cleanText(rawText);
|
const cleaned = cleanText(rawText);
|
||||||
|
|
||||||
console.log(`[${stepName}] Received: ${rawText.length} chars, ~${rawText.split(/\s+/).length} words`);
|
console.log(`[${stepName}] Received: ${rawText.length} chars, ~${rawText.split(/\s+/).length} words`);
|
||||||
console.log(`Raw output:\n${rawText}\n`);
|
// console.log(`Raw output:\n${rawText}\n`);
|
||||||
console.log(`Cleaned output:\n${cleaned}\n`);
|
// console.log(`Cleaned output:\n${cleaned}\n`);
|
||||||
|
|
||||||
return cleaned;
|
return cleaned;
|
||||||
|
|
||||||
|
|||||||
520
package-lock.json
generated
520
package-lock.json
generated
@@ -10,7 +10,8 @@
|
|||||||
"license": "SEE LICENSE IN README.md",
|
"license": "SEE LICENSE IN README.md",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"dotenv": "^17.2.1",
|
"dotenv": "^17.2.1",
|
||||||
"puppeteer": "^24.17.1"
|
"puppeteer": "^24.17.1",
|
||||||
|
"sharp": "^0.34.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/js": "^9.34.0",
|
"@eslint/js": "^9.34.0",
|
||||||
@@ -41,6 +42,16 @@
|
|||||||
"node": ">=6.9.0"
|
"node": ">=6.9.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@emnapi/runtime": {
|
||||||
|
"version": "1.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.5.0.tgz",
|
||||||
|
"integrity": "sha512-97/BJ3iXHww3djw6hYIfErCZFee7qCtrneuLa20UXFCOTCfBM2cvQHjWJ2EG0s0MtdNwInarqCTz35i4wWXHsQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"dependencies": {
|
||||||
|
"tslib": "^2.4.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@eslint-community/eslint-utils": {
|
"node_modules/@eslint-community/eslint-utils": {
|
||||||
"version": "4.8.0",
|
"version": "4.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.8.0.tgz",
|
"resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.8.0.tgz",
|
||||||
@@ -247,6 +258,424 @@
|
|||||||
"url": "https://github.com/sponsors/nzakas"
|
"url": "https://github.com/sponsors/nzakas"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@img/sharp-darwin-arm64": {
|
||||||
|
"version": "0.34.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.34.3.tgz",
|
||||||
|
"integrity": "sha512-ryFMfvxxpQRsgZJqBd4wsttYQbCxsJksrv9Lw/v798JcQ8+w84mBWuXwl+TT0WJ/WrYOLaYpwQXi3sA9nTIaIg==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"darwin"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@img/sharp-libvips-darwin-arm64": "1.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@img/sharp-darwin-x64": {
|
||||||
|
"version": "0.34.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.34.3.tgz",
|
||||||
|
"integrity": "sha512-yHpJYynROAj12TA6qil58hmPmAwxKKC7reUqtGLzsOHfP7/rniNGTL8tjWX6L3CTV4+5P4ypcS7Pp+7OB+8ihA==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"darwin"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@img/sharp-libvips-darwin-x64": "1.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@img/sharp-libvips-darwin-arm64": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-sBZmpwmxqwlqG9ueWFXtockhsxefaV6O84BMOrhtg/YqbTaRdqDE7hxraVE3y6gVM4eExmfzW4a8el9ArLeEiQ==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"license": "LGPL-3.0-or-later",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"darwin"
|
||||||
|
],
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@img/sharp-libvips-darwin-x64": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-M64XVuL94OgiNHa5/m2YvEQI5q2cl9d/wk0qFTDVXcYzi43lxuiFTftMR1tOnFQovVXNZJ5TURSDK2pNe9Yzqg==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"license": "LGPL-3.0-or-later",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"darwin"
|
||||||
|
],
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@img/sharp-libvips-linux-arm": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-mWd2uWvDtL/nvIzThLq3fr2nnGfyr/XMXlq8ZJ9WMR6PXijHlC3ksp0IpuhK6bougvQrchUAfzRLnbsen0Cqvw==",
|
||||||
|
"cpu": [
|
||||||
|
"arm"
|
||||||
|
],
|
||||||
|
"license": "LGPL-3.0-or-later",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@img/sharp-libvips-linux-arm64": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-RXwd0CgG+uPRX5YYrkzKyalt2OJYRiJQ8ED/fi1tq9WQW2jsQIn0tqrlR5l5dr/rjqq6AHAxURhj2DVjyQWSOA==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"license": "LGPL-3.0-or-later",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@img/sharp-libvips-linux-ppc64": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-Xod/7KaDDHkYu2phxxfeEPXfVXFKx70EAFZ0qyUdOjCcxbjqyJOEUpDe6RIyaunGxT34Anf9ue/wuWOqBW2WcQ==",
|
||||||
|
"cpu": [
|
||||||
|
"ppc64"
|
||||||
|
],
|
||||||
|
"license": "LGPL-3.0-or-later",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@img/sharp-libvips-linux-s390x": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-eMKfzDxLGT8mnmPJTNMcjfO33fLiTDsrMlUVcp6b96ETbnJmd4uvZxVJSKPQfS+odwfVaGifhsB07J1LynFehw==",
|
||||||
|
"cpu": [
|
||||||
|
"s390x"
|
||||||
|
],
|
||||||
|
"license": "LGPL-3.0-or-later",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@img/sharp-libvips-linux-x64": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-ZW3FPWIc7K1sH9E3nxIGB3y3dZkpJlMnkk7z5tu1nSkBoCgw2nSRTFHI5pB/3CQaJM0pdzMF3paf9ckKMSE9Tg==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"license": "LGPL-3.0-or-later",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@img/sharp-libvips-linuxmusl-arm64": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-UG+LqQJbf5VJ8NWJ5Z3tdIe/HXjuIdo4JeVNADXBFuG7z9zjoegpzzGIyV5zQKi4zaJjnAd2+g2nna8TZvuW9Q==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"license": "LGPL-3.0-or-later",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@img/sharp-libvips-linuxmusl-x64": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-SRYOLR7CXPgNze8akZwjoGBoN1ThNZoqpOgfnOxmWsklTGVfJiGJoC/Lod7aNMGA1jSsKWM1+HRX43OP6p9+6Q==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"license": "LGPL-3.0-or-later",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@img/sharp-linux-arm": {
|
||||||
|
"version": "0.34.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.34.3.tgz",
|
||||||
|
"integrity": "sha512-oBK9l+h6KBN0i3dC8rYntLiVfW8D8wH+NPNT3O/WBHeW0OQWCjfWksLUaPidsrDKpJgXp3G3/hkmhptAW0I3+A==",
|
||||||
|
"cpu": [
|
||||||
|
"arm"
|
||||||
|
],
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@img/sharp-libvips-linux-arm": "1.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@img/sharp-linux-arm64": {
|
||||||
|
"version": "0.34.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.34.3.tgz",
|
||||||
|
"integrity": "sha512-QdrKe3EvQrqwkDrtuTIjI0bu6YEJHTgEeqdzI3uWJOH6G1O8Nl1iEeVYRGdj1h5I21CqxSvQp1Yv7xeU3ZewbA==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@img/sharp-libvips-linux-arm64": "1.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@img/sharp-linux-ppc64": {
|
||||||
|
"version": "0.34.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.34.3.tgz",
|
||||||
|
"integrity": "sha512-GLtbLQMCNC5nxuImPR2+RgrviwKwVql28FWZIW1zWruy6zLgA5/x2ZXk3mxj58X/tszVF69KK0Is83V8YgWhLA==",
|
||||||
|
"cpu": [
|
||||||
|
"ppc64"
|
||||||
|
],
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@img/sharp-libvips-linux-ppc64": "1.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@img/sharp-linux-s390x": {
|
||||||
|
"version": "0.34.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.34.3.tgz",
|
||||||
|
"integrity": "sha512-3gahT+A6c4cdc2edhsLHmIOXMb17ltffJlxR0aC2VPZfwKoTGZec6u5GrFgdR7ciJSsHT27BD3TIuGcuRT0KmQ==",
|
||||||
|
"cpu": [
|
||||||
|
"s390x"
|
||||||
|
],
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@img/sharp-libvips-linux-s390x": "1.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@img/sharp-linux-x64": {
|
||||||
|
"version": "0.34.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.34.3.tgz",
|
||||||
|
"integrity": "sha512-8kYso8d806ypnSq3/Ly0QEw90V5ZoHh10yH0HnrzOCr6DKAPI6QVHvwleqMkVQ0m+fc7EH8ah0BB0QPuWY6zJQ==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@img/sharp-libvips-linux-x64": "1.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@img/sharp-linuxmusl-arm64": {
|
||||||
|
"version": "0.34.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.34.3.tgz",
|
||||||
|
"integrity": "sha512-vAjbHDlr4izEiXM1OTggpCcPg9tn4YriK5vAjowJsHwdBIdx0fYRsURkxLG2RLm9gyBq66gwtWI8Gx0/ov+JKQ==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@img/sharp-libvips-linuxmusl-arm64": "1.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@img/sharp-linuxmusl-x64": {
|
||||||
|
"version": "0.34.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.34.3.tgz",
|
||||||
|
"integrity": "sha512-gCWUn9547K5bwvOn9l5XGAEjVTTRji4aPTqLzGXHvIr6bIDZKNTA34seMPgM0WmSf+RYBH411VavCejp3PkOeQ==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@img/sharp-libvips-linuxmusl-x64": "1.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@img/sharp-wasm32": {
|
||||||
|
"version": "0.34.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.34.3.tgz",
|
||||||
|
"integrity": "sha512-+CyRcpagHMGteySaWos8IbnXcHgfDn7pO2fiC2slJxvNq9gDipYBN42/RagzctVRKgxATmfqOSulgZv5e1RdMg==",
|
||||||
|
"cpu": [
|
||||||
|
"wasm32"
|
||||||
|
],
|
||||||
|
"license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT",
|
||||||
|
"optional": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@emnapi/runtime": "^1.4.4"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@img/sharp-win32-arm64": {
|
||||||
|
"version": "0.34.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.34.3.tgz",
|
||||||
|
"integrity": "sha512-MjnHPnbqMXNC2UgeLJtX4XqoVHHlZNd+nPt1kRPmj63wURegwBhZlApELdtxM2OIZDRv/DFtLcNhVbd1z8GYXQ==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"license": "Apache-2.0 AND LGPL-3.0-or-later",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"win32"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@img/sharp-win32-ia32": {
|
||||||
|
"version": "0.34.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.34.3.tgz",
|
||||||
|
"integrity": "sha512-xuCdhH44WxuXgOM714hn4amodJMZl3OEvf0GVTm0BEyMeA2to+8HEdRPShH0SLYptJY1uBw+SCFP9WVQi1Q/cw==",
|
||||||
|
"cpu": [
|
||||||
|
"ia32"
|
||||||
|
],
|
||||||
|
"license": "Apache-2.0 AND LGPL-3.0-or-later",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"win32"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@img/sharp-win32-x64": {
|
||||||
|
"version": "0.34.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.34.3.tgz",
|
||||||
|
"integrity": "sha512-OWwz05d++TxzLEv4VnsTz5CmZ6mI6S05sfQGEMrNrQcOEERbX46332IvE7pO/EUiw7jUrrS40z/M7kPyjfl04g==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"license": "Apache-2.0 AND LGPL-3.0-or-later",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"win32"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@puppeteer/browsers": {
|
"node_modules/@puppeteer/browsers": {
|
||||||
"version": "2.10.8",
|
"version": "2.10.8",
|
||||||
"resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.10.8.tgz",
|
"resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.10.8.tgz",
|
||||||
@@ -566,6 +995,19 @@
|
|||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/color": {
|
||||||
|
"version": "4.2.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz",
|
||||||
|
"integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"color-convert": "^2.0.1",
|
||||||
|
"color-string": "^1.9.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12.5.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/color-convert": {
|
"node_modules/color-convert": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||||
@@ -584,6 +1026,16 @@
|
|||||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/color-string": {
|
||||||
|
"version": "1.9.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz",
|
||||||
|
"integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"color-name": "^1.0.0",
|
||||||
|
"simple-swizzle": "^0.2.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/concat-map": {
|
"node_modules/concat-map": {
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||||
@@ -679,6 +1131,15 @@
|
|||||||
"node": ">= 14"
|
"node": ">= 14"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/detect-libc": {
|
||||||
|
"version": "2.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.4.tgz",
|
||||||
|
"integrity": "sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/devtools-protocol": {
|
"node_modules/devtools-protocol": {
|
||||||
"version": "0.0.1475386",
|
"version": "0.0.1475386",
|
||||||
"resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1475386.tgz",
|
"resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1475386.tgz",
|
||||||
@@ -1669,6 +2130,48 @@
|
|||||||
"node": ">=10"
|
"node": ">=10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/sharp": {
|
||||||
|
"version": "0.34.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/sharp/-/sharp-0.34.3.tgz",
|
||||||
|
"integrity": "sha512-eX2IQ6nFohW4DbvHIOLRB3MHFpYqaqvXd3Tp5e/T/dSH83fxaNJQRvDMhASmkNTsNTVF2/OOopzRCt7xokgPfg==",
|
||||||
|
"hasInstallScript": true,
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"color": "^4.2.3",
|
||||||
|
"detect-libc": "^2.0.4",
|
||||||
|
"semver": "^7.7.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://opencollective.com/libvips"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@img/sharp-darwin-arm64": "0.34.3",
|
||||||
|
"@img/sharp-darwin-x64": "0.34.3",
|
||||||
|
"@img/sharp-libvips-darwin-arm64": "1.2.0",
|
||||||
|
"@img/sharp-libvips-darwin-x64": "1.2.0",
|
||||||
|
"@img/sharp-libvips-linux-arm": "1.2.0",
|
||||||
|
"@img/sharp-libvips-linux-arm64": "1.2.0",
|
||||||
|
"@img/sharp-libvips-linux-ppc64": "1.2.0",
|
||||||
|
"@img/sharp-libvips-linux-s390x": "1.2.0",
|
||||||
|
"@img/sharp-libvips-linux-x64": "1.2.0",
|
||||||
|
"@img/sharp-libvips-linuxmusl-arm64": "1.2.0",
|
||||||
|
"@img/sharp-libvips-linuxmusl-x64": "1.2.0",
|
||||||
|
"@img/sharp-linux-arm": "0.34.3",
|
||||||
|
"@img/sharp-linux-arm64": "0.34.3",
|
||||||
|
"@img/sharp-linux-ppc64": "0.34.3",
|
||||||
|
"@img/sharp-linux-s390x": "0.34.3",
|
||||||
|
"@img/sharp-linux-x64": "0.34.3",
|
||||||
|
"@img/sharp-linuxmusl-arm64": "0.34.3",
|
||||||
|
"@img/sharp-linuxmusl-x64": "0.34.3",
|
||||||
|
"@img/sharp-wasm32": "0.34.3",
|
||||||
|
"@img/sharp-win32-arm64": "0.34.3",
|
||||||
|
"@img/sharp-win32-ia32": "0.34.3",
|
||||||
|
"@img/sharp-win32-x64": "0.34.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/shebang-command": {
|
"node_modules/shebang-command": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
|
||||||
@@ -1692,6 +2195,21 @@
|
|||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/simple-swizzle": {
|
||||||
|
"version": "0.2.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz",
|
||||||
|
"integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"is-arrayish": "^0.3.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/simple-swizzle/node_modules/is-arrayish": {
|
||||||
|
"version": "0.3.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz",
|
||||||
|
"integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/smart-buffer": {
|
"node_modules/smart-buffer": {
|
||||||
"version": "4.2.0",
|
"version": "4.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz",
|
||||||
|
|||||||
@@ -13,7 +13,8 @@
|
|||||||
"description": "",
|
"description": "",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"dotenv": "^17.2.1",
|
"dotenv": "^17.2.1",
|
||||||
"puppeteer": "^24.17.1"
|
"puppeteer": "^24.17.1",
|
||||||
|
"sharp": "^0.34.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/js": "^9.34.0",
|
"@eslint/js": "^9.34.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user