Skip to content

Commit

Permalink
Merge pull request #84 from powerhouse-inc/fix/ci
Browse files Browse the repository at this point in the history
Fix/ci
  • Loading branch information
0x4007 authored May 28, 2024
2 parents dcfcf95 + 037e3a2 commit db179b4
Show file tree
Hide file tree
Showing 15 changed files with 44 additions and 541 deletions.
33 changes: 28 additions & 5 deletions .cspell.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,34 @@
{
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
"version": "0.2",
"ignorePaths": ["**/*.json", "**/*.css", "node_modules", "**/*.log"],
"ignorePaths": [
"**/*.json",
"**/*.css",
"node_modules",
"**/*.log"
],
"useGitignore": true,
"language": "en",
"words": ["dataurl", "devpool", "outdir", "servedir"],
"dictionaries": ["typescript", "node", "software-terms"],
"import": ["@cspell/dict-typescript/cspell-ext.json", "@cspell/dict-node/cspell-ext.json", "@cspell/dict-software-terms"],
"ignoreRegExpList": ["[0-9a-fA-F]{6}"]
"words": [
"dataurl",
"devpool",


"outdir",

"servedir"
],
"dictionaries": [
"typescript",
"node",
"software-terms"
],
"import": [
"@cspell/dict-typescript/cspell-ext.json",
"@cspell/dict-node/cspell-ext.json",
"@cspell/dict-software-terms"
],
"ignoreRegExpList": [
"[0-9a-fA-F]{6}"
]
}
2 changes: 1 addition & 1 deletion .github/knip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const config: KnipConfig = {
ignore: ["src/types/config.ts", "**/__mocks__/**", "**/__fixtures__/**"],
ignoreExportsUsedInFile: true,
// eslint can also be safely ignored as per the docs: https://knip.dev/guides/handling-issues#eslint--jest
ignoreDependencies: ["eslint-config-prettier", "eslint-plugin-prettier", "@types/jest", "@mswjs/data"],
ignoreDependencies: ["eslint-config-prettier", "eslint-plugin-prettier", "@types/jest", "@mswjs/data", "@octokit/rest", "dotenv"],
eslint: true,
};

Expand Down
35 changes: 0 additions & 35 deletions .github/workflows/cypress-testing.yml

This file was deleted.

33 changes: 0 additions & 33 deletions .github/workflows/jest-testing.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/knip.yml

This file was deleted.

7 changes: 4 additions & 3 deletions build/esbuild-build.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import esbuild from "esbuild";
const typescriptEntries = ["static/main.ts"];
// const cssEntries = ["static/style.css"];
const typescriptEntries = ["build/index.ts"];
// const cssEntries = ["build/style.css"];
const entries = [
...typescriptEntries,
// ...cssEntries
];

export const esBuildContext: esbuild.BuildOptions = {
platform: "node",
sourcemap: true,
entryPoints: entries,
bundle: true,
Expand All @@ -19,7 +20,7 @@ export const esBuildContext: esbuild.BuildOptions = {
".ttf": "dataurl",
".svg": "dataurl",
},
outdir: "static/dist",
outdir: "build/dist",
};

esbuild
Expand Down
2 changes: 1 addition & 1 deletion build/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
console.log("Welcome to Powerhouse mirror");
import mirror from "./mirror";
mirror();
void mirror();
6 changes: 3 additions & 3 deletions build/mirror.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// cspell:ignore Gfug, Kzfq, pccg,

import { Octokit } from "@octokit/rest";
import * as dotenv from "dotenv";
import fetch from "node-fetch";
Expand Down Expand Up @@ -76,13 +78,11 @@ async function createGitHubIssue(title: string, body: string) {
}
}

async function main() {
export default async function main() {
try {
const issueData = await fetchIssueData();
await createGitHubIssue(issueData.title, issueData.description);
} catch (error) {
console.error("Error in main function:", error);
}
}

void main();
7 changes: 1 addition & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,8 @@
"open-source"
],
"dependencies": {
"@apollo/client": "^3.10.4",
"@octokit/rest": "^20.1.1",
"cross-fetch": "^4.0.0",
"dotenv": "^16.4.4",
"graphql": "^16.8.1",
"graphql-request": "^7.0.1",
"node-fetch": "^3.3.2"
"dotenv": "^16.4.5"
},
"devDependencies": {
"@commitlint/cli": "^18.6.1",
Expand Down
12 changes: 0 additions & 12 deletions tests/__mocks__/db.ts

This file was deleted.

11 changes: 0 additions & 11 deletions tests/__mocks__/handlers.ts

This file was deleted.

4 changes: 0 additions & 4 deletions tests/__mocks__/node.ts

This file was deleted.

10 changes: 0 additions & 10 deletions tests/__mocks__/users-get.json

This file was deleted.

24 changes: 0 additions & 24 deletions tests/main.test.ts

This file was deleted.

Loading

0 comments on commit db179b4

Please sign in to comment.