Skip to content

Commit

Permalink
added type for common @run-at header options
Browse files Browse the repository at this point in the history
  • Loading branch information
Oaphi committed Jul 10, 2021
1 parent 75f2347 commit 7dffc69
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ jobs:
- uses: actions/checkout@v2
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
repo_token: "${{ secrets.PAT }}"
prerelease: false
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@userscripters/generate-headers",
"version": "1.6.2",
"version": "1.6.4",
"description": "Userscript manager header generator",
"icon": "",
"scripts": {
Expand Down
11 changes: 4 additions & 7 deletions src/generators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ export type GrantOptions =

type CommonGrants = "none";

type CommonRunAt = "document-start" | "document-end" | "document-idle";

/** {@link https://wiki.greasespot.net/@grant} */
export type GreasemonkeyGrants =
| CommonGrants
Expand Down Expand Up @@ -76,7 +78,7 @@ type CustomHeaders = { contributors: string };
type GreasemonkeyHeaders = CustomHeaders &
CommonHeaders<{
"grant": GreasemonkeyGrants[];
"run-at": "document-start" | "document-end" | "document-idle";
"run-at": CommonRunAt;
}>;

type TampermonkeyHeaders = CustomHeaders &
Expand All @@ -94,12 +96,7 @@ type TampermonkeyHeaders = CustomHeaders &
"downloadURL": string;
"supportURL": string;
"connect": string[];
"run-at":
| "context-menu"
| "document-start"
| "document-body"
| "document-end"
| "document-idle";
"run-at": CommonRunAt | "context-menu" | "document-body";
"grant": TampermonkeyGrants[];
"antifeature": `${"ads" | "tracking" | "miner"} ${string}`[];
"unwrap": "";
Expand Down

0 comments on commit 7dffc69

Please # to comment.