diff --git a/deno.json b/deno.json index 67e08893ea..48f93ab864 100644 --- a/deno.json +++ b/deno.json @@ -3,6 +3,7 @@ "@/": "./scripts/", "std/": "https://deno.land/std@0.206.0/", "catppuccin-repo/": "https://raw.githubusercontent.com/catppuccin/catppuccin/d4f2666c2b04337f0a8632713de0889d9a7d332d/", + "@catppuccin/palette": "npm:@catppuccin/palette@1.2.0", "@actions/core": "npm:@actions/core@1.10.1", "@octokit/rest": "npm:@octokit/rest@20.0.2", "ajv": "npm:ajv@8.12.0", diff --git a/deno.lock b/deno.lock index 50f7e26453..b777008cfb 100644 --- a/deno.lock +++ b/deno.lock @@ -3,8 +3,10 @@ "packages": { "specifiers": { "npm:@actions/core@1.10.1": "npm:@actions/core@1.10.1", + "npm:@catppuccin/palette@1.2.0": "npm:@catppuccin/palette@1.2.0", "npm:@octokit/rest@20.0.2": "npm:@octokit/rest@20.0.2_@octokit+core@5.2.0", "npm:@types/less": "npm:@types/less@3.0.6", + "npm:@types/node": "npm:@types/node@18.16.19", "npm:ajv@8.12.0": "npm:ajv@8.12.0", "npm:handlebars@4.7.8": "npm:handlebars@4.7.8", "npm:json-schema-to-typescript@13.1.2": "npm:json-schema-to-typescript@13.1.2_glob@7.2.3", @@ -64,6 +66,10 @@ "js-yaml": "js-yaml@4.1.0" } }, + "@catppuccin/palette@1.2.0": { + "integrity": "sha512-R5fxLcU47mRcsdQkXZBNfxt7SdEqLGWb1qhEKBrnYfEB4ZWOQRBEow4e78PKxaFUECBNOs6uEkwvwxFL9FmQqQ==", + "dependencies": {} + }, "@csstools/css-parser-algorithms@2.6.3_@csstools+css-tokenizer@2.3.1": { "integrity": "sha512-xI/tL2zxzEbESvnSxwFgwvy5HS00oCXxL4MLs6HUiDcYfwowsoQaABKxUElp1ARITrINzBnsECOc1q0eg2GOrA==", "dependencies": { @@ -1517,12 +1523,12 @@ "https://deno.land/std@0.206.0/yaml/schema/mod.ts": "4472e827bab5025e92bc2eb2eeefa70ecbefc64b2799b765c69af84822efef32", "https://deno.land/std@0.206.0/yaml/stringify.ts": "fffc09c65c68d3d63f8159e8cbaa3f489bc20a8e55b4fbb61a8c2e9f914d1d02", "https://deno.land/std@0.206.0/yaml/type.ts": "65553da3da3c029b6589c6e4903f0afbea6768be8fca61580711457151f2b30f", - "https://raw.githubusercontent.com/catppuccin/catppuccin/d4f2666c2b04337f0a8632713de0889d9a7d332d/resources/ports.schema.json": "39ce3bcd2dabd033010684df7caa82cc69c25584174eba0922e6435dce53f06a", - "https://raw.githubusercontent.com/catppuccin/palette/v0.2.0/palette-porcelain.json": "a13a97027e630bdac3a498696b9465f6f947ec6abc2acfee9084e9a951effe4b" + "https://raw.githubusercontent.com/catppuccin/catppuccin/d4f2666c2b04337f0a8632713de0889d9a7d332d/resources/ports.schema.json": "39ce3bcd2dabd033010684df7caa82cc69c25584174eba0922e6435dce53f06a" }, "workspace": { "dependencies": [ "npm:@actions/core@1.10.1", + "npm:@catppuccin/palette@1.2.0", "npm:@octokit/rest@20.0.2", "npm:ajv@8.12.0", "npm:handlebars@4.7.8", diff --git a/scripts/generate/labels.ts b/scripts/generate/labels.ts index 0b5e2ea7b9..e0ca089910 100644 --- a/scripts/generate/labels.ts +++ b/scripts/generate/labels.ts @@ -4,18 +4,16 @@ import { REPO_ROOT } from "@/deps.ts"; import { updateFile } from "@/generate/utils.ts"; import { UserStylesSchema } from "@/types/mod.ts"; import { stringify } from "std/yaml/stringify.ts"; -import palette from "https://raw.githubusercontent.com/catppuccin/palette/v0.2.0/palette-porcelain.json" with { - type: "json", -}; +import { type ColorName, flavors } from "@catppuccin/palette"; /** * Macchiato color definitions as hex values. */ -const macchiatoHex = Object.entries(palette.macchiato) - .reduce((acc, [k, v]) => { - acc[k] = `#${v.hex}`; +const macchiatoHex = flavors.macchiato.colorEntries + .reduce((acc, [identifier, { hex }]) => { + acc[identifier] = hex; return acc; - }, {} as Record); + }, {} as Record); const toIssueLabel = (slug: string | number) => `lbl:${slug}`;