Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update types #459

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nix/yarn-project.nix
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ let
rm $out/.gitignore
'';
outputHashMode = "recursive";
outputHash = "sha512-hdP43ZJVfjv5O+wLPiogOHmOLm25kx2P0vVUVRm210yDi5YhSLnVtyzDJDPSRwunrHEUo2jzEs7327vePbuwiw==";
outputHash = "sha512-yATp5SuF4aPnCV/WBUimCAeotQNLc5Ksi0Aj5G6A3Q+9EOjTQtVaOuck1J9uV6DN4MMkPB6n1pCS5sp1aTYANA==";
};

# Main project derivation.
Expand Down
22 changes: 21 additions & 1 deletion packages/catppuccin-vsc-typegen/types/errorlens.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file was automatically generated.
* DO NOT MODIFY IT BY HAND.
* Instead, run `yarn run updateVSCtypes` to regenerate this file.
* Instead, run `yarn run typegen:update` to regenerate this file.
*/
export interface ErrorLensColors {
/**
Expand All @@ -14,6 +14,11 @@ export interface ErrorLensColors {
*/
"errorLens.errorMessageBackground": string;

/**
* Background color of the error range (when errorLens.problemRangeDecorationEnabled setting enabled).
*/
"errorLens.errorRangeBackground": string;

/**
* Background color of the entire line containing error (Only in light themes).
*/
Expand All @@ -39,6 +44,11 @@ export interface ErrorLensColors {
*/
"errorLens.warningMessageBackground": string;

/**
* Background color of the warning range (when errorLens.problemRangeDecorationEnabled setting enabled).
*/
"errorLens.warningRangeBackground": string;

/**
* Background color used to highlight lines containing warnings (Only in light themes).
*/
Expand All @@ -64,6 +74,11 @@ export interface ErrorLensColors {
*/
"errorLens.infoMessageBackground": string;

/**
* Background color of the info range (when errorLens.problemRangeDecorationEnabled setting enabled).
*/
"errorLens.infoRangeBackground": string;

/**
* Background color used to highlight lines containing info (Only in light themes).
*/
Expand All @@ -89,6 +104,11 @@ export interface ErrorLensColors {
*/
"errorLens.hintMessageBackground": string;

/**
* Background color of the hint range (when errorLens.problemRangeDecorationEnabled setting enabled).
*/
"errorLens.hintRangeBackground": string;

/**
* Background color used to highlight lines containing hints (Only in light themes).
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file was automatically generated.
* DO NOT MODIFY IT BY HAND.
* Instead, run `yarn run updateVSCtypes` to regenerate this file.
* Instead, run `yarn run typegen:update` to regenerate this file.
*/
export interface GitHubPullRequestColors {
/**
Expand Down
42 changes: 41 additions & 1 deletion packages/catppuccin-vsc-typegen/types/gitlens.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This file was automatically generated.
* DO NOT MODIFY IT BY HAND.
* Instead, run `yarn run updateVSCtypes` to regenerate this file.
* Instead, run `yarn run typegen:update` to regenerate this file.
*/
export interface GitLensColors {
/**
Expand Down Expand Up @@ -279,6 +279,16 @@ export interface GitLensColors {
*/
"gitlens.graphScrollMarkerLocalBranchesColor": string;

/**
* Specifies the color marking pull requests on the minimap of the _Commit Graph_
*/
"gitlens.graphMinimapMarkerPullRequestsColor": string;

/**
* Specifies the color marking pull requests on the scrollbar of the _Commit Graph_
*/
"gitlens.graphScrollMarkerPullRequestsColor": string;

/**
* Specifies the color marking remote branches on the minimap of the _Commit Graph_
*/
Expand Down Expand Up @@ -308,4 +318,34 @@ export interface GitLensColors {
* Specifies the color marking tags on the scrollbar of the _Commit Graph_
*/
"gitlens.graphScrollMarkerTagsColor": string;

/**
* Specifies the color of the _Launchpad_ indicator icon when the priority is mergeable
*/
"gitlens.launchpadIndicatorMergeableColor": string;

/**
* Specifies the color of the _Launchpad_ indicator icon in the hover when the priority is mergeable
*/
"gitlens.launchpadIndicatorMergeableHoverColor": string;

/**
* Specifies the color of the _Launchpad_ indicator icon when the priority is blocked
*/
"gitlens.launchpadIndicatorBlockedColor": string;

/**
* Specifies the color of the _Launchpad_ indicator icon in the hover when the priority is blocked
*/
"gitlens.launchpadIndicatorBlockedHoverColor": string;

/**
* Specifies the color of the _Launchpad_ indicator icon when the priority is follow-up or needs review
*/
"gitlens.launchpadIndicatorAttentionColor": string;

/**
* Specifies the color of the _Launchpad_ indicator icon in the hover when the priority is follow-up or needs review
*/
"gitlens.launchpadIndicatorAttentionHoverColor": string;
}
55 changes: 31 additions & 24 deletions packages/catppuccin-vsc-typegen/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,51 +2,58 @@
import path from "node:path";
import { writeFileSync } from "node:fs";
import { compile, JSONSchema } from "json-schema-to-typescript";
const vscodeSchemasRoot =
"https://raw.githubusercontent.com/ota-meshi/extract-vscode-schemas/main/resources/vscode/schemas/";
// const vscodeSchemasRoot = "https://raw.githubusercontent.com/ota-meshi/extract-vscode-schemas/main/resources/vscode/schemas/";

const bannerComment = `/**
* This file was automatically generated.
* DO NOT MODIFY IT BY HAND.
* Instead, run \`yarn run updateVSCtypes\` to regenerate this file.
* Instead, run \`yarn run typegen:update\` to regenerate this file.
*/`;

const mappings = [
{
schema: vscodeSchemasRoot + "token-styling.json",
name: "SemanticTokens",
fname: "token-styling.d.ts",
kind: "jsonschema",
},
{
schema: vscodeSchemasRoot + "textmate-colors.json",
name: "TextmateColors",
fname: "textmate-colors.d.ts",
kind: "jsonschema",
},
{
schema: vscodeSchemasRoot + "workbench-colors.json",
name: "WorkbenchColors",
fname: "workbench-colors.d.ts",
kind: "jsonschema",
},
// VSCode have started auto-generating their schema since v1.92.0 and json-schema-to-typescript isn't so happy with that.
// The reason for that still needs to be investigated.
//
// For now, the schemas need to be manually updated by copy pasting the schema into https://transform.tools/json-schema-to-typescript
// and then figure out how best to include the changes inside the `types` directory.
//
// Last known working commit: https://github.com/ota-meshi/extract-vscode-schemas/commit/93dfa59357a3181e6c5985a417ef08324ad3d388
// Breaking commit: https://github.com/ota-meshi/extract-vscode-schemas/commit/31417f5c16f335d220140ca775c2951fcbab32f6
// {
// schema: vscodeSchemasRoot + "token-styling.json",
// name: "SemanticTokens",
// fname: "token-styling.d.ts",
// kind: "jsonschema",
// },
// {
// schema: vscodeSchemasRoot + "textmate-colors.json",
// name: "TextmateColors",
// fname: "textmate-colors.d.ts",
// kind: "jsonschema",
// },
// {
// schema: vscodeSchemasRoot + "workbench-colors.json",
// name: "WorkbenchColors",
// fname: "workbench-colors.d.ts",
// kind: "jsonschema",
// },
{
schema:
"https://raw.githubusercontent.com/usernamehw/vscode-error-lens/v3.13.0/package.json",
"https://raw.githubusercontent.com/usernamehw/vscode-error-lens/v3.20.0/package.json",
name: "ErrorLensColors",
fname: "errorlens.d.ts",
kind: "extension-packagejson",
},
{
schema:
"https://raw.githubusercontent.com/gitkraken/vscode-gitlens/v14.4.0/package.json",
"https://raw.githubusercontent.com/gitkraken/vscode-gitlens/v16.0.1/package.json",
name: "GitLensColors",
fname: "gitlens.d.ts",
kind: "extension-packagejson",
},
{
schema:
"https://github.com/microsoft/vscode-pull-request-github/raw/v0.77.2023112709/package.json",
"https://github.com/microsoft/vscode-pull-request-github/raw/v0.100.0/package.json",
name: "GitHubPullRequestColors",
fname: "github-pull-request.d.ts",
kind: "extension-packagejson",
Expand Down
4 changes: 2 additions & 2 deletions packages/catppuccin-vsc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@
"type": "object",
"default": {},
"markdownDescription": "Custom color overrides. Assign your own hex codes to palette colors. See [the docs](https://github.com/catppuccin/vscode#override-palette-colors) for reference.",
"$ref": "https://esm.sh/gh/catppuccin/vscode@catppuccin-vsc-v3.15.2/packages/catppuccin-vsc/schemas/colorOverrides.schema.json"
"$ref": "https://esm.sh/gh/catppuccin/vscode@catppuccin-vsc-v3.16.0/packages/catppuccin-vsc/schemas/colorOverrides.schema.json"
},
"catppuccin.customUIColors": {
"type": "object",
"default": {},
"markdownDescription": "Customize UI colors. Map `workbench.colorCustomizations` to palette colors. See [the docs](https://github.com/catppuccin/vscode#use-palette-colors-on-workbench-elements-ui) for reference.",
"$ref": "https://esm.sh/gh/catppuccin/vscode@catppuccin-vsc-v3.15.2/packages/catppuccin-vsc/schemas/customUIColors.schema.json"
"$ref": "https://esm.sh/gh/catppuccin/vscode@catppuccin-vsc-v3.16.0/packages/catppuccin-vsc/schemas/customUIColors.schema.json"
},
"catppuccin.accentColor": {
"type": "string",
Expand Down
Loading