Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
StoneT2000 committed Jan 15, 2022
1 parent 952820b commit 60323f9
Show file tree
Hide file tree
Showing 17 changed files with 71 additions and 81 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
"css-minimizer-webpack-plugin": "^2.0.0",
"detect-port": "^1.3.0",
"electron": "^13.1.8",
"electron-builder": "^22.11.1",
"electron-builder": "22.14.5",
"electron-devtools-installer": "^3.2.0",
"electron-notarize": "^1.0.0",
"electron-rebuild": "^2.3.5",
Expand Down
1 change: 0 additions & 1 deletion src/main/ipc/dimensions/actions/initializeAgents.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type { Dimension } from 'dimensions-ai-temp/lib/main/Dimension';
import type { Agent } from 'dimensions-ai-temp/lib/main/Agent';
import type { Action } from 'main/ipc/types';
import { Context } from 'main/ipc/dimensions/context';
Expand Down
1 change: 0 additions & 1 deletion src/main/ipc/dimensions/actions/runEpisode.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type { Dimension } from 'dimensions-ai-temp/lib/main/Dimension';
import { Environment } from 'dimensions-ai-temp/lib/main/Environment';
import { Context } from 'main/ipc/dimensions/context';
import type { Action } from 'main/ipc/types';
Expand Down
1 change: 0 additions & 1 deletion src/main/ipc/dimensions/actions/runSingleEpisode.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type { Dimension } from 'dimensions-ai-temp/lib/main/Dimension';
import { Environment } from 'dimensions-ai-temp/lib/main/Environment';
import { Context } from 'main/ipc/dimensions/context';
import type { Action } from 'main/ipc/types';
Expand Down
2 changes: 1 addition & 1 deletion src/main/ipc/dimensions/dimensions.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable */
import type { MainProcessApi } from '../types';
import * as actions from './actions';

Expand All @@ -10,6 +11,5 @@ export type Dimensions = typeof DimensionsApi;

export default DimensionsApi;

// eslint-disable-next-line @typescript-eslint/no-unused-vars
// @ts-expect-error - want to check for typing but ignore no unused locals here
const typecheck = DimensionsApi as MainProcessApi; // should error if it doesn't conform
3 changes: 1 addition & 2 deletions src/main/ipc/dimensions/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { Context } from 'main/ipc/dimensions/context';
import { Dimension } from 'dimensions-ai-temp/lib/main/Dimension';
import { handleFunc } from '../wrapper';
import * as pipeline from './pipeline';
import DimensionsApi from './dimensions';

export const setupDimensions = (store: Store) => {
const dim = new Dimension();
pipeline.setup(dim, store);
// pipeline.setup(dim, store);
const ctx: Context = {
dim,
data: { envs: new Map(), envNameToEnvs: new Map() },
Expand Down
17 changes: 0 additions & 17 deletions src/main/ipc/dimensions/pipeline.ts

This file was deleted.

11 changes: 5 additions & 6 deletions src/main/ipc/system/actions/getPythonInterpreters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ export type Data = void;

export type Result = string[];

export const getPythonInterpreters: Action<Data, Result> =
() => async (_event) => {
// execSync('')
// TODO:
return [];
};
export const getPythonInterpreters: Action<Data, Result> = () => async () => {
// execSync('')
// TODO:
return [];
};
1 change: 0 additions & 1 deletion src/main/ipc/system/actions/readFile.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { dialog } from 'electron';
import type { Action } from 'main/ipc/types';
import fs from 'fs';

Expand Down
2 changes: 1 addition & 1 deletion src/main/ipc/system/system.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import type { MainProcessApi } from '../types';
import * as actions from './actions';

Expand All @@ -10,6 +11,5 @@ export type System = typeof SystemApi;

export default SystemApi;

// eslint-disable-next-line @typescript-eslint/no-unused-vars
// @ts-expect-error - want to check for typing but ignore no unused locals here
const typecheck = SystemApi as MainProcessApi; // should error if it doesn't conform
1 change: 1 addition & 0 deletions src/main/ipc/types.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { IpcMainInvokeEvent } from 'electron';

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export type Action<Data = any, Result = any, Context = any> = (
ctx: Context
) => (_event: IpcMainInvokeEvent, data: Data) => Promise<Result>;
Expand Down
2 changes: 1 addition & 1 deletion src/main/ipc/user/user.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import type { MainProcessApi } from '../types';
import * as actions from './actions';

Expand All @@ -10,6 +11,5 @@ export type User = typeof UserApi;

export default UserApi;

// eslint-disable-next-line @typescript-eslint/no-unused-vars
// @ts-expect-error - want to check for typing but ignore no unused locals here
const typecheck = UserApi as MainProcessApi; // should error if it doesn't conform
12 changes: 6 additions & 6 deletions src/renderer/contexts/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ const EnvContext = React.createContext(
html?: string;
postdata: string;
}>;
createEpisode: (env: string) => Promise<{
episodeId: string;
}>;
envStep: (env: string) => Promise<{
postdata: string;
}>;
// createEpisode: (env: string) => Promise<{
// episodeId: string;
// }>;
// envStep: (env: string) => Promise<{
// postdata: string;
// }>;
}
);

Expand Down
7 changes: 4 additions & 3 deletions src/renderer/pages/illuminator/Illuminator.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import React, { useContext, useEffect, useState } from 'react';
import Viewer from 'renderer/components/section/viewer';
import Base from 'renderer/components/section/base';
Expand All @@ -16,9 +17,9 @@ const Illuminator = () => {
const [html, setHtml] = useState('');
const runEpisode = async (
envFile: string, // change to env name
agents: string[],
live: boolean,
seed?: number
_agents: string[],
_live: boolean,
_seed?: number
) => {
const envData = await window.electron.dimensions.makeEnv({ env: envFile });
const htmlPath = path.join(path.dirname(envFile), envData.metaData.html);
Expand Down
1 change: 1 addition & 0 deletions src/typings/globals.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import type Electronstore from 'electron-store';
import type { Dimensions } from 'main/ipc/dimensions/dimensions';
import type { System } from 'main/ipc/system/system';
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"sourceMap": true,
"baseUrl": "./src",
/* Additional Checks */
"noUnusedLocals": true,
"noUnusedParameters": true,
// "noUnusedLocals": true,
// "noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
/* Module Resolution Options */
Expand Down
84 changes: 47 additions & 37 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2592,24 +2592,25 @@ [email protected]:
resolved "https://registry.yarnpkg.com/app-builder-bin/-/app-builder-bin-3.7.1.tgz#cb0825c5e12efc85b196ac3ed9c89f076c61040e"
integrity sha512-ql93vEUq6WsstGXD+SBLSIQw6SNnhbDEM0swzgugytMxLp3rT24Ag/jcC80ZHxiPRTdew1niuR7P3/FCrDqIjw==

app-builder-lib@22.13.1:
version "22.13.1"
resolved "https://registry.yarnpkg.com/app-builder-lib/-/app-builder-lib-22.13.1.tgz#9beee0dd3df32fcce303b933d187bf986efe3381"
integrity sha512-TsUe7gCdH1cnSknUcqwVRAAxsFxsxcU/BJvnKR8ASzjaZtePW7MU+AEaDVDUURycgYxQ9XeymGjmuQGS32jcbw==
app-builder-lib@22.14.5:
version "22.14.5"
resolved "https://registry.yarnpkg.com/app-builder-lib/-/app-builder-lib-22.14.5.tgz#a61a50b132b858e98fdc70b6b88994ae99b4f96d"
integrity sha512-k3VwKP4kpsnUaXoUkm1s4zaSHPHIMFnN4kPMU9yXaKmE1LfHHqBaEah5bXeTAX5V/BC41wFdg8CF5vOjvgy8Rg==
dependencies:
"7zip-bin" "~5.1.1"
"@develar/schema-utils" "~2.6.5"
"@electron/universal" "1.0.5"
"@malept/flatpak-bundler" "^0.4.0"
async-exit-hook "^2.0.1"
bluebird-lst "^1.0.9"
builder-util "22.13.1"
builder-util-runtime "8.8.1"
builder-util "22.14.5"
builder-util-runtime "8.9.1"
chromium-pickle-js "^0.2.0"
debug "^4.3.2"
ejs "^3.1.6"
electron-osx-sign "^0.5.0"
electron-publish "22.13.1"
electron-publish "22.14.5"
form-data "^4.0.0"
fs-extra "^10.0.0"
hosted-git-info "^4.0.2"
is-ci "^3.0.0"
Expand Down Expand Up @@ -3255,25 +3256,25 @@ [email protected]:
debug "^4.3.2"
sax "^1.2.4"

builder-util-runtime@8.8.1:
version "8.8.1"
resolved "https://registry.yarnpkg.com/builder-util-runtime/-/builder-util-runtime-8.8.1.tgz#d6e2b5f27723a7606f381e52a3000dadb1d6e4a9"
integrity sha512-xHxAzdsJmMV8m/N+INzYUKfyJASeKyKHnA1uGkY8Y8JKLI/c4BG+If+L0If2YETv96CiRASkvd02tIt2pvrchQ==
builder-util-runtime@8.9.1:
version "8.9.1"
resolved "https://registry.yarnpkg.com/builder-util-runtime/-/builder-util-runtime-8.9.1.tgz#25f066b3fbc20b3e6236a9b956b1ebb0e33ff66a"
integrity sha512-c8a8J3wK6BIVLW7ls+7TRK9igspTbzWmUqxFbgK0m40Ggm6efUbxtWVCGIjc+dtchyr5qAMAUL6iEGRdS/6vwg==
dependencies:
debug "^4.3.2"
sax "^1.2.4"

builder-util@22.13.1:
version "22.13.1"
resolved "https://registry.yarnpkg.com/builder-util/-/builder-util-22.13.1.tgz#fb2165c725b9405f0605a765cf91ec1870995ada"
integrity sha512-gMdoW9aQbWYxuQ4k4jT4An1BTo/hWzvsdv3pwNz18iNYnqn9j+xMllQOg9CHgfQYKSUd8VuMsZnbCvLO4NltYw==
builder-util@22.14.5:
version "22.14.5"
resolved "https://registry.yarnpkg.com/builder-util/-/builder-util-22.14.5.tgz#42a18608d2a566c0846e91266464776c8bfb0cc9"
integrity sha512-zqIHDFJwmA7jV7SC9aI+33MWwT2mWoijH+Ol9IntNAwuuRXoS+7XeJwnhLBXOhcDBzXT4kDzHnRk4JKeaygEYA==
dependencies:
"7zip-bin" "~5.1.1"
"@types/debug" "^4.1.6"
"@types/fs-extra" "^9.0.11"
app-builder-bin "3.7.1"
bluebird-lst "^1.0.9"
builder-util-runtime "8.8.1"
builder-util-runtime "8.9.1"
chalk "^4.1.1"
cross-spawn "^7.0.3"
debug "^4.3.2"
Expand Down Expand Up @@ -4410,14 +4411,14 @@ [email protected]:
resolved "https://registry.yarnpkg.com/discontinuous-range/-/discontinuous-range-1.0.0.tgz#e38331f0844bba49b9a9cb71c771585aab1bc65a"
integrity sha1-44Mx8IRLukm5qctxx3FYWqsbxlo=

dmg-builder@22.13.1:
version "22.13.1"
resolved "https://registry.yarnpkg.com/dmg-builder/-/dmg-builder-22.13.1.tgz#5a77655e691ad7e5d28fbf008c68e819e0e2bd69"
integrity sha512-qgfLN2fo4q2wIWNvbcKlZ71DLRDLvWIElOB7oxlSxUrMi6xhI+9v1Mh7E0FJ+r5UXhQzaQXaGuyMsQRbGgrSwg==
dmg-builder@22.14.5:
version "22.14.5"
resolved "https://registry.yarnpkg.com/dmg-builder/-/dmg-builder-22.14.5.tgz#137c0b55e639badcc0b119eb060e6fa4ed61d948"
integrity sha512-1GvFGQE332bvPamcMwZDqWqfWfJTyyDLOsHMcGi0zs+Jh7JOn6/zuBkHJIWHdsj2QJbhzLVyd2/ZqttOKv7I8w==
dependencies:
app-builder-lib "22.13.1"
builder-util "22.13.1"
builder-util-runtime "8.8.1"
app-builder-lib "22.14.5"
builder-util "22.14.5"
builder-util-runtime "8.9.1"
fs-extra "^10.0.0"
iconv-lite "^0.6.2"
js-yaml "^4.1.0"
Expand Down Expand Up @@ -4592,17 +4593,17 @@ ejs@^3.1.6:
dependencies:
jake "^10.6.1"

electron-builder@^22.11.1:
version "22.13.1"
resolved "https://registry.yarnpkg.com/electron-builder/-/electron-builder-22.13.1.tgz#419b2736c0b08f54cb024bc02cfae6b878b34fc3"
integrity sha512-ajlI40L60qKBBxvpf770kcjxHAccMpEWpwsHAppytl3WmWgJfMut4Wz9VUFqyNtX/9a624QTatk6TqoxqewRug==
electron-builder@22.14.5:
version "22.14.5"
resolved "https://registry.yarnpkg.com/electron-builder/-/electron-builder-22.14.5.tgz#3a25547bd4fe3728d4704da80956a794c5c31496"
integrity sha512-N73hSbXFz6Mz5Z6h6C5ly6CB+dUN6k1LuCDJjI8VF47bMXv/QE0HE+Kkb0GPKqTqM7Hsk/yIYX+kHCfSkR5FGg==
dependencies:
"@types/yargs" "^17.0.1"
app-builder-lib "22.13.1"
builder-util "22.13.1"
builder-util-runtime "8.8.1"
app-builder-lib "22.14.5"
builder-util "22.14.5"
builder-util-runtime "8.9.1"
chalk "^4.1.1"
dmg-builder "22.13.1"
dmg-builder "22.14.5"
fs-extra "^10.0.0"
is-ci "^3.0.0"
lazy-val "^1.0.5"
Expand Down Expand Up @@ -4673,14 +4674,14 @@ electron-osx-sign@^0.5.0:
minimist "^1.2.0"
plist "^3.0.1"

electron-publish@22.13.1:
version "22.13.1"
resolved "https://registry.yarnpkg.com/electron-publish/-/electron-publish-22.13.1.tgz#7d3aedf988f995c149cc620aef0772559342ea03"
integrity sha512-5nCXhnsqrRxP5NsZxUKjiMkcFmQglXp7i/YY4rp3h1s1psg3utOIkM29Z93YTSXicZJU1J+8811eo5HX1vpoKg==
electron-publish@22.14.5:
version "22.14.5"
resolved "https://registry.yarnpkg.com/electron-publish/-/electron-publish-22.14.5.tgz#34bcdce671f0e651330db20040d6919c77c94bd6"
integrity sha512-h+NANRdaA0PqGF15GKvorseWPzh1PXa/zx4I37//PIokW8eKIov8ky23foUSb55ZFWUHGpxQJux7y2NCfBtQeg==
dependencies:
"@types/fs-extra" "^9.0.11"
builder-util "22.13.1"
builder-util-runtime "8.8.1"
builder-util "22.14.5"
builder-util-runtime "8.9.1"
chalk "^4.1.1"
fs-extra "^10.0.0"
lazy-val "^1.0.5"
Expand Down Expand Up @@ -5736,6 +5737,15 @@ form-data@^3.0.0:
combined-stream "^1.0.8"
mime-types "^2.1.12"

form-data@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452"
integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==
dependencies:
asynckit "^0.4.0"
combined-stream "^1.0.8"
mime-types "^2.1.12"

form-data@~2.3.2:
version "2.3.3"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6"
Expand Down

0 comments on commit 60323f9

Please sign in to comment.