fix: fixes tsc build

This commit is contained in:
Simone Corsi
2022-05-11 09:49:34 +02:00
parent 55cd9e9c58
commit ec10b79a91
5 changed files with 17185 additions and 10420 deletions

27553
index.js

File diff suppressed because one or more lines are too long

42
package-lock.json generated
View File

@@ -12,6 +12,7 @@
"@actions/core": "^1.8.0",
"@actions/exec": "^1.1.1",
"ejs": "^3.1.7",
"gh-star-fetch": "^1.1.0",
"got": "^11.8.1",
"remark": "^14.0.2",
"remark-toc": "^8.0.1"
@@ -4624,6 +4625,18 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/gh-star-fetch": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/gh-star-fetch/-/gh-star-fetch-1.1.0.tgz",
"integrity": "sha512-O8R0WcFfyh3MAvl0b2CPvUlbkjbi5KCyye9Ra3DkBxwpRWxUvutNUUK/aHEsgDOjJfP/TgcpchaXM9t6SRmUPg==",
"dependencies": {
"got": "^11.8.3",
"parse-link-header": "^2.0.0"
},
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
}
},
"node_modules/git-log-parser": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/git-log-parser/-/git-log-parser-1.2.0.tgz",
@@ -9932,6 +9945,14 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/parse-link-header": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/parse-link-header/-/parse-link-header-2.0.0.tgz",
"integrity": "sha512-xjU87V0VyHZybn2RrCX5TIFGxTVZE6zqqZWMPlIKiSKuWh/X5WZdt+w1Ki1nXB+8L/KtL+nZ4iq+sfI6MrhhMw==",
"dependencies": {
"xtend": "~4.0.1"
}
},
"node_modules/parse-ms": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-2.1.0.tgz",
@@ -12322,7 +12343,6 @@
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
"integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
"dev": true,
"engines": {
"node": ">=0.4"
}
@@ -15899,6 +15919,15 @@
"pump": "^3.0.0"
}
},
"gh-star-fetch": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/gh-star-fetch/-/gh-star-fetch-1.1.0.tgz",
"integrity": "sha512-O8R0WcFfyh3MAvl0b2CPvUlbkjbi5KCyye9Ra3DkBxwpRWxUvutNUUK/aHEsgDOjJfP/TgcpchaXM9t6SRmUPg==",
"requires": {
"got": "^11.8.3",
"parse-link-header": "^2.0.0"
}
},
"git-log-parser": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/git-log-parser/-/git-log-parser-1.2.0.tgz",
@@ -19649,6 +19678,14 @@
"lines-and-columns": "^1.1.6"
}
},
"parse-link-header": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/parse-link-header/-/parse-link-header-2.0.0.tgz",
"integrity": "sha512-xjU87V0VyHZybn2RrCX5TIFGxTVZE6zqqZWMPlIKiSKuWh/X5WZdt+w1Ki1nXB+8L/KtL+nZ4iq+sfI6MrhhMw==",
"requires": {
"xtend": "~4.0.1"
}
},
"parse-ms": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-2.1.0.tgz",
@@ -21417,8 +21454,7 @@
"xtend": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
"integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
"dev": true
"integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ=="
},
"y18n": {
"version": "4.0.1",

View File

@@ -60,6 +60,7 @@
"@actions/core": "^1.8.0",
"@actions/exec": "^1.1.1",
"ejs": "^3.1.7",
"gh-star-fetch": "^1.1.0",
"got": "^11.8.1",
"remark": "^14.0.2",
"remark-toc": "^8.0.1"

View File

@@ -1,12 +1,10 @@
import fs from 'fs';
import ejs from 'ejs';
import * as core from '@actions/core';
import remark from 'remark';
import { remark } from 'remark';
import toc from 'remark-toc';
import git from './git';
import type { PaginationLink, ApiGetStarResponse, Stars, Star } from './types';
export const REPO_USERNAME = process.env.GITHUB_REPOSITORY?.split('/')[0];
export const API_STARRED_URL = `${process.env.GITHUB_API_URL}/users/${REPO_USERNAME}/starred`;

View File

@@ -17,12 +17,11 @@ export async function main() {
// get template if found in the repo
const customTemplatePath = core.getInput('template-path');
console.log(`check if customTemplatePath: ${customTemplatePath} exists`);
core.info(`check if customTemplatePath: ${customTemplatePath} exists`);
try {
const dir = await readdir('./');
template = await readFile(customTemplatePath, 'utf8');
} catch {
console.log("Couldn't find template file, using default");
core.info("Couldn't find template file, using default");
}
const sortedByLanguages = await ghStarFetch({