Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
foxriver76 committed May 5, 2024
1 parent 2ca9a20 commit bcf35d4
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 53 deletions.
77 changes: 39 additions & 38 deletions packages/admin/src/package.json
Original file line number Diff line number Diff line change
@@ -1,41 +1,42 @@
{
"name": "src-rx",
"private": true,
"homepage": ".",
"scripts": {
"start": "set DANGEROUSLY_DISABLE_HOST_CHECK=true&& craco start",
"old-start": "react-scripts start",
"lint": "eslint --fix --ext .js,.jsx,.tsx src",
"build": "craco build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"check-ts": "tsc --noEmit --checkJS false",
"tsc": "tsc --project tsconfig.build.json"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": [
">0.2%",
"not dead",
"not op_mini all"
],
"dependencies": {
"@iobroker/json-config": "file:../../jsonConfig"
},
"proxy": "http://127.0.0.1:8081",
"plugins": [
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
"name": "src-rx",
"private": true,
"homepage": ".",
"scripts": {
"start": "set DANGEROUSLY_DISABLE_HOST_CHECK=true&& craco start",
"old-start": "react-scripts start",
"lint": "eslint --fix --ext .js,.jsx,.tsx src",
"build": "craco build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"check-ts": "tsc --noEmit --checkJS false",
"tsc": "tsc --project tsconfig.build.json"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": [
">0.2%",
"not dead",
"not op_mini all"
],
[
"@babel/plugin-proposal-class-properties",
{
"loose": true
}
]
]
"dependencies": {
"@iobroker/json-config": "file:../../jsonConfig"
},
"proxy": "http://127.0.0.1:8081",
"plugins": [
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
],
[
"@babel/plugin-proposal-class-properties",
{
"loose": true
}
]
],
"version": "6.17.7"
}
2 changes: 1 addition & 1 deletion packages/admin/src/public/css/adapter.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/admin/src/public/lib/css/iob/selectID.css.map

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ import {
Close as IconClose,
} from '@mui/icons-material';

import type { SystemConfig } from '@iobroker/socket-client';
import { localeMap } from './utils';

const styles: Record<string, any> = (theme: Theme) => ({
Expand Down Expand Up @@ -445,7 +444,7 @@ class ObjectHistoryData extends Component<ObjectHistoryDataProps, ObjectHistoryD
async prepareData(): Promise<void> {
const list: { id: string; alive: boolean }[] = await this.getHistoryInstances();
// read default history
const config: SystemConfig = await this.props.socket.getCompactSystemConfig();
const config = await this.props.socket.getCompactSystemConfig();
const defaultHistory = config?.common?.defaultHistory;

// find current history
Expand Down
11 changes: 5 additions & 6 deletions packages/admin/src/src/tabs/Intro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
} from '@mui/icons-material';

import { AdminConnection, i18n, Utils as UtilsCommon } from '@iobroker/adapter-react-v5';
import type { SystemConfig } from '@iobroker/socket-client';

import type InstancesWorker from '@/Workers/InstancesWorker';
import type HostsWorker from '@/Workers/HostsWorker';
Expand Down Expand Up @@ -255,9 +254,9 @@ class Intro extends React.Component<IntroProps, IntroState> {
};

activateEditMode() {
let systemConfig: SystemConfig;
let systemConfig: Awaited<ReturnType<typeof this.props.socket.getSystemConfig>>;
this.props.socket.getSystemConfig(true)
.then((_systemConfig: SystemConfig) => {
.then(_systemConfig => {
systemConfig = _systemConfig;
return this.getInstances(true, null, systemConfig);
})
Expand Down Expand Up @@ -641,7 +640,7 @@ class Intro extends React.Component<IntroProps, IntroState> {
}
}

async getInstances(update: boolean | undefined, hosts: Record<string, any> | null, systemConfig: SystemConfig) {
async getInstances(update: boolean | undefined, hosts: Record<string, any> | null, systemConfig: Awaited<ReturnType<typeof this.props.socket.getSystemConfig>>) {
hosts = hosts || this.state.hosts;

try {
Expand Down Expand Up @@ -1027,10 +1026,10 @@ class Intro extends React.Component<IntroProps, IntroState> {

getData(update?: boolean) {
let hosts: any;
let systemConfig: SystemConfig;
let systemConfig: Awaited<ReturnType<typeof this.props.socket.getSystemConfig>>;

return this.props.socket.getSystemConfig(update)
.then((_systemConfig: SystemConfig) => {
.then(_systemConfig => {
systemConfig = _systemConfig;
return this.props.socket.getCompactHosts(update);
})
Expand Down
3 changes: 1 addition & 2 deletions packages/jsonConfig/src/JsonConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import {
} from '@iobroker/adapter-react-v5';

import type { Theme, ThemeName, ThemeType } from '@iobroker/adapter-react-v5/types';
import type { SystemConfig } from '@iobroker/socket-client';
import Utils from '#JC/Utils';
import ConfigGeneric from './JsonConfigComponent/ConfigGeneric';
import JsonConfigComponent from './JsonConfigComponent';
Expand Down Expand Up @@ -368,7 +367,7 @@ class JsonConfig extends Router<JsonConfigProps, JsonConfigState> {
// decode all native attributes listed in obj.encryptedNative
if (Array.isArray(obj.encryptedNative)) {
return this.props.socket.getSystemConfig()
.then(async (systemConfig: SystemConfig) => {
.then(async systemConfig => {
await loadScript('../../lib/js/crypto-js/crypto-js.js', 'crypto-js');
this.secret = systemConfig.native.secret;
obj.encryptedNative?.forEach(attr => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
Select,
} from '@mui/material';

import type { SystemConfig } from '@iobroker/socket-client';
import { I18n } from '@iobroker/adapter-react-v5';

import ConfigGeneric, { type ConfigGenericProps, type ConfigGenericState } from './ConfigGeneric';
Expand Down Expand Up @@ -128,7 +127,7 @@ class ConfigLanguage extends ConfigGeneric<ConfigLanguageProps, ConfigLanguageSt
this.props.changeLanguage && this.props.changeLanguage();
} else {
this.props.socket.getSystemConfig()
.then((systemConfig: SystemConfig) => {
.then(systemConfig => {
if (systemConfig.common.language === I18n.getLanguage()) {
return;
}
Expand Down

0 comments on commit bcf35d4

Please sign in to comment.