Skip to content

Commit

Permalink
Change some files (#3963)
Browse files Browse the repository at this point in the history
* C

* Delete http_cache.sqlite

* Update seeder.yml

* Update seeder.yml
  • Loading branch information
baseplate-admin authored Aug 11, 2024
1 parent c38f1ad commit c6a58f5
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 34 deletions.
61 changes: 30 additions & 31 deletions .github/workflows/seeder.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,37 @@
name: Seeder

on:
push:
branches: ["master"]
paths: ["seeder/**"]
pull_request:
branches: ["master"]
paths: ["seeder/**"]
push:
branches: ['master']
paths: ['seeder/**']
pull_request:
branches: ['master']
paths: ['seeder/**']

defaults:
run:
working-directory: seeder
run:
working-directory: seeder

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
name: Build on ${{ matrix.os }}
steps:
- name: Checkout Seeder
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
with:
cache: "npm"
# cache-dependency-path: seeder/package-lock.json
- name: Install Dependencies
run: npm ci
- name: Run Build
run: npm run build

build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
name: Build on ${{ matrix.os }}
steps:
- name: Checkout Seeder
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
with:
cache: 'npm'
cache-dependency-path: seeder/package-lock.json
- name: Install Dependencies
run: npm ci
- name: Run Build
run: npm run build
2 changes: 1 addition & 1 deletion seeder/electron.vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default defineConfig({
main: {
plugins: [externalizeDepsPlugin()],
esbuild: {
target: "es2017",
target: "esnext",
legalComments: "external"
},
build: {
Expand Down
Binary file removed seeder/http_cache.sqlite
Binary file not shown.
1 change: 0 additions & 1 deletion seeder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"build:linux": "electron-vite build && electron-builder --linux"
},
"dependencies": {
"@coreproject-moe/icons": "^0.0.11",
"@electron-toolkit/preload": "^3.0.1",
"@electron-toolkit/utils": "^3.0.0",
"electron-updater": "^6.1.7"
Expand Down
8 changes: 7 additions & 1 deletion seeder/src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ import { Shiinobi as _Shiinobi } from "@interfaces/shiinobi";

const Shiinobi = new _Shiinobi();

const IPC_MAPPING = {
"get-staff-urls": Shiinobi.get_myanimelist_staff_urls
};

function createWindow(): void {
// Create the browser window.
const mainWindow = new BrowserWindow({
Expand Down Expand Up @@ -56,7 +60,9 @@ app.whenReady().then(() => {
// IPC handlers
ipcMain.handle("get-app-version", () => app.getVersion());
// Shiinobi
ipcMain.handle("get-staff-urls", Shiinobi.get_myanimelist_staff_urls);
Object.entries(IPC_MAPPING).forEach((item) => {
ipcMain.handle(item[0], item[1]);
});

createWindow();

Expand Down

0 comments on commit c6a58f5

Please sign in to comment.