Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
sbsrnt committed Mar 27, 2024
1 parent b028b3f commit d6ba161
Show file tree
Hide file tree
Showing 8 changed files with 12,607 additions and 12,605 deletions.
24,760 changes: 12,380 additions & 12,380 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
"lerna": "^8.0.2",
"nx": "18.1.2"
},
"workspaces": ["packages/*"],
"workspaces": [
"packages/*"
],
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
Expand Down
90 changes: 45 additions & 45 deletions packages/encounter-data/package.json
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
{
"name": "@exile-watch/encounter-data",
"version": "0.12.1",
"description": "Encounter data",
"homepage": "https://github.com/exile-watch/nucleus/pkgs/npm/encounter-data",
"repository": {
"type": "git",
"url": "git+https://github.com/exile-watch/nucleus.git",
"directory": "packages/encounter-data"
},
"main": "dist/index.js",
"module": "dist/index.esm.js",
"types": "dist/index.d.ts",
"files": ["dist"],
"scripts": {
"_clean": "del-cli dist",
"_build": "rollup -c",
"build": "npm run _build",
"ci:lint": "npx @biomejs/biome ci .",
"lint": "npx @biomejs/biome check .",
"lint:apply": "npx @biomejs/biome check --apply .",
"format": "npx @biomejs/biome format --write .",
"cq": "npm run format && npm run lint:apply",
"clean-invalid-data-files": "node scripts/clean-invalid-data-files.js",
"extract:encounter-skills": "node scripts/extract-skill-tokens.js",
"extract:encounter-tokens": "node scripts/extract-tokens-and-build-imports-exports.js",
"extract:all": "npm run extract:encounter-skills && npm run extract:encounter-tokens",
"generate:indexed-search": "node scripts/generateIndexedSearch.js",
"generate:paths": "node scripts/generatePaths.js",
"generate:homepage": "node scripts/generateHomepage.js",
"generate:category-pages": "node scripts/generateCategoryPages.js",
"generate:encounters-page": "node scripts/generateEncountersPage.js",
"generate": "npm run generate:indexed-search && npm run generate:paths && npm run generate:homepage && npm run generate:category-pages && npm run generate:encounters-page",
"update-content": "npm run extract:all && npm run generate && npm run format"
},
"publishConfig": {
"registry": "https://npm.pkg.github.com/",
"access": "public"
},
"workspaces": ["packages/*"],
"devDependencies": {
"@exile-watch/biome-config": "^0.3.5",
"@exile-watch/rollup-config": "0.2.7",
"@exile-watch/typescript-config": "^0.3.2",
"lodash": "^4.17.21"
}
"name": "@exile-watch/encounter-data",
"version": "0.12.1",
"description": "Encounter data",
"homepage": "https://github.com/exile-watch/nucleus/pkgs/npm/encounter-data",
"repository": {
"type": "git",
"url": "git+https://github.com/exile-watch/nucleus.git",
"directory": "packages/encounter-data"
},
"main": "dist/index.js",
"module": "dist/index.esm.js",
"types": "dist/index.d.ts",
"files": ["dist"],
"scripts": {
"_clean": "del-cli dist",
"_build": "rollup -c",
"build": "npm run _build",
"ci:lint": "npx @biomejs/biome ci .",
"lint": "npx @biomejs/biome check .",
"lint:apply": "npx @biomejs/biome check --apply .",
"format": "npx @biomejs/biome format --write .",
"cq": "npm run format && npm run lint:apply",
"clean-invalid-data-files": "node scripts/clean-invalid-data-files.js",
"extract:encounter-skills": "node scripts/extract-skill-tokens.js",
"extract:encounter-tokens": "node scripts/extract-tokens-and-build-imports-exports.js",
"extract:all": "npm run extract:encounter-skills && npm run extract:encounter-tokens",
"generate:indexed-search": "node scripts/generateIndexedSearch.js",
"generate:paths": "node scripts/generatePaths.js",
"generate:homepage": "node scripts/generateHomepage.js",
"generate:category-pages": "node scripts/generateCategoryPages.js",
"generate:encounters-page": "node scripts/generateEncountersPage.js",
"generate": "npm run generate:indexed-search && npm run generate:paths && npm run generate:homepage && npm run generate:category-pages && npm run generate:encounters-page",
"update-content": "npm run extract:all && npm run generate && npm run format"
},
"publishConfig": {
"registry": "https://npm.pkg.github.com/",
"access": "public"
},
"workspaces": ["packages/*"],
"devDependencies": {
"@exile-watch/biome-config": "^0.3.5",
"@exile-watch/rollup-config": "0.2.7",
"@exile-watch/typescript-config": "^0.3.2",
"lodash": "^4.17.21"
}
}
98 changes: 49 additions & 49 deletions packages/seo/package.json
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
{
"name": "@exile-watch/seo",
"version": "0.3.13",
"description": "exile.watch seo",
"homepage": "https://github.com/exile-watch/nucleus/pkgs/npm/seo",
"repository": {
"type": "git",
"url": "git+https://github.com/exile-watch/nucleus.git",
"directory": "packages/seo"
},
"main": "dist/index.js",
"module": "dist/index.esm.js",
"types": "dist/index.d.ts",
"files": ["dist", "sitemap.xml"],
"scripts": {
"_clean": "del-cli dist",
"_build": "rollup -c",
"build": "npm run _build",
"ci:lint": "npx @biomejs/biome ci .",
"lint": "npx @biomejs/biome check .",
"lint:apply": "npx @biomejs/biome check --apply .",
"format": "npx @biomejs/biome format --write .",
"cq": "npm run format && npm run lint:apply",
"generate:sitemap": "ts-node scripts/generateSitemap.ts"
},
"publishConfig": {
"registry": "https://npm.pkg.github.com/",
"access": "public"
},
"workspaces": ["packages/*"],
"peerDependencies": {
"@exile-watch/encounter-data": "> 0",
"next": ">=14"
},
"peerDependenciesMeta": {
"@exile-watch/encounter-data": {
"optional": true
}
},
"devDependencies": {
"@exile-watch/biome-config": "^0.3.5",
"@exile-watch/encounter-data": "^0.12.1",
"@exile-watch/rollup-config": "0.2.7",
"@exile-watch/typescript-config": "^0.3.2",
"date-fns": "^3.5.0",
"ts-node": "^10.9.2"
},
"dependencies": {
"next-seo": "^6.5.0"
}
"name": "@exile-watch/seo",
"version": "0.3.13",
"description": "exile.watch seo",
"homepage": "https://github.com/exile-watch/nucleus/pkgs/npm/seo",
"repository": {
"type": "git",
"url": "git+https://github.com/exile-watch/nucleus.git",
"directory": "packages/seo"
},
"main": "dist/index.js",
"module": "dist/index.esm.js",
"types": "dist/index.d.ts",
"files": ["dist", "sitemap.xml"],
"scripts": {
"_clean": "del-cli dist",
"_build": "rollup -c",
"build": "npm run _build",
"ci:lint": "npx @biomejs/biome ci .",
"lint": "npx @biomejs/biome check .",
"lint:apply": "npx @biomejs/biome check --apply .",
"format": "npx @biomejs/biome format --write .",
"cq": "npm run format && npm run lint:apply",
"generate:sitemap": "ts-node scripts/generateSitemap.ts"
},
"publishConfig": {
"registry": "https://npm.pkg.github.com/",
"access": "public"
},
"workspaces": ["packages/*"],
"peerDependencies": {
"@exile-watch/encounter-data": "> 0",
"next": ">=14"
},
"peerDependenciesMeta": {
"@exile-watch/encounter-data": {
"optional": true
}
},
"devDependencies": {
"@exile-watch/biome-config": "^0.3.5",
"@exile-watch/encounter-data": "^0.12.1",
"@exile-watch/rollup-config": "0.2.7",
"@exile-watch/typescript-config": "^0.3.2",
"date-fns": "^3.5.0",
"ts-node": "^10.9.2"
},
"dependencies": {
"next-seo": "^6.5.0"
}
}
58 changes: 29 additions & 29 deletions packages/seo/scripts/constants.ts
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
import {
pathOfExile1IndexedSearch,
pathOfExile1Paths,
pathOfExile2IndexedSearch,
pathOfExile2Paths,
pathOfExile1IndexedSearch,
pathOfExile1Paths,
pathOfExile2IndexedSearch,
pathOfExile2Paths,
} from "@exile-watch/encounter-data";
import { format } from "date-fns";

const { maps: poe1maps, encounters: poe1encounters } =
pathOfExile1IndexedSearch;
pathOfExile1IndexedSearch;
const { maps: poe2maps, encounters: poe2encounters } =
pathOfExile2IndexedSearch;
pathOfExile2IndexedSearch;

const domain = "https://exile.watch";
const subDomains = [
"https://docs.exile.watch",
"https://engineering.exile.watch",
"https://docs.exile.watch",
"https://engineering.exile.watch",
];
const rootPages = ["", "/welcome"];
const directories = ["path-of-exile-1", "path-of-exile-2"];
const subDirectories = [
"path-of-exile-1/encounters",
"path-of-exile-2/encounters",
"path-of-exile-1/encounters",
"path-of-exile-2/encounters",
];
const categories = directories.flatMap((d, i) => {
switch (i) {
// poe1
case 0: {
return Object.keys(pathOfExile1Paths).map((c) => `/${d}/encounters/${c}`);
}
// poe2
case 1: {
return Object.keys(pathOfExile2Paths).map((c) => `/${d}/encounters/${c}`);
}
}
switch (i) {
// poe1
case 0: {
return Object.keys(pathOfExile1Paths).map((c) => `/${d}/encounters/${c}`);
}
// poe2
case 1: {
return Object.keys(pathOfExile2Paths).map((c) => `/${d}/encounters/${c}`);
}
}
});

const maps = [...poe1maps, ...poe2maps];
Expand All @@ -41,13 +41,13 @@ const encounters = [...poe1encounters, ...poe2encounters];
const lastmod = format(new Date(), `yyyy-MM-dd'T'HH:mmxxx`);

export {
domain,
subDomains,
rootPages,
directories,
subDirectories,
categories,
maps,
encounters,
lastmod,
domain,
subDomains,
rootPages,
directories,
subDirectories,
categories,
maps,
encounters,
lastmod,
};
74 changes: 37 additions & 37 deletions packages/seo/scripts/generateSitemap.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { writeFileSync } from "node:fs";
import {
domain,
categories,
directories,
encounters,
lastmod,
maps,
rootPages,
subDirectories,
subDomains,
domain,
categories,
directories,
encounters,
lastmod,
maps,
rootPages,
subDirectories,
subDomains,
} from "./constants";

const generateXmlUrl = ({ loc, priority, withDomain = true }) =>
`
`
<url>
<loc>${withDomain ? domain : ""}${loc}</loc>
<priority>${priority}</priority>
Expand All @@ -22,31 +22,31 @@ const generateXmlUrl = ({ loc, priority, withDomain = true }) =>
`.trim();

function generateXml() {
const indent = "\n ";
const header = `<?xml version="1.0" encoding="UTF-8"?>`;
const subDomainsXml = subDomains
.map((loc) => generateXmlUrl({ loc, priority: 1.0, withDomain: false }))
.join(indent);
const rootPagesXml = rootPages
.map((loc) => generateXmlUrl({ loc, priority: 1.0 }))
.join(indent);
const directoriesXml = directories
.map((d) => generateXmlUrl({ loc: `/${d}`, priority: 0.9 }))
.join(indent);
const subDirectoriesXml = subDirectories
.map((d) => generateXmlUrl({ loc: `/${d}`, priority: 0.8 }))
.join(indent);
const categoriesXml = categories
.map((loc) => generateXmlUrl({ loc, priority: 0.7 }))
.join(indent);
const mapsXml = maps
.map((m) => generateXmlUrl({ loc: m.mapPath, priority: 0.6 }))
.join(indent);
const encountersXml = encounters
.map((m) => generateXmlUrl({ loc: m.encounterPath, priority: 0.5 }))
.join(indent);
const indent = "\n ";
const header = `<?xml version="1.0" encoding="UTF-8"?>`;
const subDomainsXml = subDomains
.map((loc) => generateXmlUrl({ loc, priority: 1.0, withDomain: false }))
.join(indent);
const rootPagesXml = rootPages
.map((loc) => generateXmlUrl({ loc, priority: 1.0 }))
.join(indent);
const directoriesXml = directories
.map((d) => generateXmlUrl({ loc: `/${d}`, priority: 0.9 }))
.join(indent);
const subDirectoriesXml = subDirectories
.map((d) => generateXmlUrl({ loc: `/${d}`, priority: 0.8 }))
.join(indent);
const categoriesXml = categories
.map((loc) => generateXmlUrl({ loc, priority: 0.7 }))
.join(indent);
const mapsXml = maps
.map((m) => generateXmlUrl({ loc: m.mapPath, priority: 0.6 }))
.join(indent);
const encountersXml = encounters
.map((m) => generateXmlUrl({ loc: m.encounterPath, priority: 0.5 }))
.join(indent);

const xml = `
const xml = `
${header}
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
${subDomainsXml}
Expand All @@ -59,12 +59,12 @@ function generateXml() {
</urlset>
`;

return xml.trim();
return xml.trim();
}

function generateSitemap() {
const xml = generateXml();
writeFileSync("./sitemap.xml", xml);
const xml = generateXml();
writeFileSync("./sitemap.xml", xml);
}

generateSitemap();
Expand Down
Loading

0 comments on commit d6ba161

Please sign in to comment.