Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm up #410

Merged
merged 3 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,649 changes: 972 additions & 677 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@
"devDependencies": {
"@rushstack/eslint-patch": "^1.1.4",
"@vitejs/plugin-vue": "^4.0.0",
"@vue/eslint-config-prettier": "^7.0.0",
"@vue/eslint-config-prettier": "^9.0.0",
"@vue/test-utils": "^2.2.6",
"eslint": "^8.30.0",
"eslint-plugin-vue": "^9.3.0",
"jsdom": "^22.1.0",
"jsdom": "^24.0.0",
"postcss": "^8.4.31",
"postcss-preset-env": "^8.1.0",
"prettier": "^2.8.1",
"postcss-preset-env": "^9.3.0",
"prettier": "^3.2.5",
"rollup-plugin-node-polyfills": "^0.2.1",
"vite": "^4.0.4",
"vite-plugin-node-polyfills": "^0.9.0",
Expand Down
10 changes: 5 additions & 5 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default {
async saveValues(topicsToSave = undefined) {
function sleep(milliseconds) {
return new Promise((resolve) =>
setTimeout(resolve, milliseconds)
setTimeout(resolve, milliseconds),
);
}

Expand Down Expand Up @@ -136,7 +136,7 @@ export default {
this.doPublish(
"openWB/set/command/" + this.client.options.clientId + "/todo",
event,
false
false,
);
},
/**
Expand All @@ -162,7 +162,7 @@ export default {
this.client.on("connect", () => {
console.debug(
"Connection succeeded! ClientId: ",
this.client.options.clientId
this.client.options.clientId,
);
this.doSubscribe(["openWB/system/usage_terms_acknowledged"]); // required for route guard
});
Expand All @@ -180,7 +180,7 @@ export default {
} catch (error) {
console.debug(
"Json parsing failed, fallback to string: ",
topic
topic,
);
myPayload = message.toString();
}
Expand Down Expand Up @@ -221,7 +221,7 @@ export default {
if (error) {
console.error("Publish error", error);
}
}
},
);
},
postClientMessage(message, type = "secondary") {
Expand Down
2 changes: 1 addition & 1 deletion src/components/OpenwbBaseArrayInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ library.add(
fasTag,
fasTimesCircle,
fasPlus,
fasInfoCircle
fasInfoCircle,
);

export default {
Expand Down
4 changes: 2 additions & 2 deletions src/components/OpenwbBaseCopyToClipboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ export default {
},
() => {
console.error("copy to clipboard failed");
}
},
);
} else {
console.debug(
"clipboard api not supported/enabled, fallback to select"
"clipboard api not supported/enabled, fallback to select",
);
if (window.getSelection) {
console.debug("using 'window.getSelection'");
Expand Down
2 changes: 1 addition & 1 deletion src/components/OpenwbBaseModalDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export default {
validator: function (value) {
return (
["around", "between", "center", "end", "start"].indexOf(
value
value,
) !== -1
);
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/OpenwbBaseNumberInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ export default {
if (this.precision !== undefined) {
return parseFloat(
Math.round(
this.modelValue * Math.pow(10, this.precision)
) / Math.pow(10, this.precision)
this.modelValue * Math.pow(10, this.precision),
) / Math.pow(10, this.precision),
);
}
return this.modelValue;
Expand Down
8 changes: 4 additions & 4 deletions src/components/OpenwbBaseRangeInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ library.add(
fasQuestionCircle,
farQuestionCircle,
fasStepForward,
fasStepBackward
fasStepBackward,
);

export default {
Expand Down Expand Up @@ -138,7 +138,7 @@ export default {
"sliderValue: not found in values: ",
this.modelValue,
"using min as default: ",
this.min
this.min,
);
return this.min;
} else {
Expand All @@ -164,7 +164,7 @@ export default {
increment() {
var newSliderValue = Math.min(
this.sliderValue + this.step,
this.max
this.max,
);
// rounding needed!
this.sliderValue =
Expand All @@ -174,7 +174,7 @@ export default {
decrement() {
var newSliderValue = Math.max(
this.sliderValue - this.step,
this.min
this.min,
);
// rounding needed!
this.sliderValue =
Expand Down
6 changes: 3 additions & 3 deletions src/components/OpenwbBaseTextInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ library.add(
fasClock,
fasCalendarDay,
farEye,
farEyeSlash
farEyeSlash,
);

export default {
Expand Down Expand Up @@ -306,7 +306,7 @@ export default {
console.error("parsing JSON failed: " + newValue);
this.inputInvalid = true;
this.$refs.jsonInput.setCustomValidity(
"Ungültiger JSON Ausdruck!"
"Ungültiger JSON Ausdruck!",
);
this.tempValue = newValue;
}
Expand Down Expand Up @@ -375,7 +375,7 @@ export default {
break;
default:
console.warn(
`cannot modify input of subtype '${this.subtype}'`
`cannot modify input of subtype '${this.subtype}'`,
);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/OpenwbBaseTextarea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export default {
console.warn("parsing JSON failed: " + newValue);
this.inputInvalid = true;
this.$refs.jsonInput.setCustomValidity(
"Ungültiger JSON Ausdruck!"
"Ungültiger JSON Ausdruck!",
);
this.tempValue = newValue;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/OpenwbBaseToast.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default {
if (Math.abs(elapsed) > units[unit]) {
this.relativeTime = rtf.format(
Math.round(-elapsed / units[unit]), // negative time diff!
unit
unit,
);
break;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/OpenwbNestedList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ library.add(
fasChargingStation,
fasCarBattery,
fasSolarPanel,
fasGaugeHigh
fasGaugeHigh,
);

export default {
Expand Down
10 changes: 5 additions & 5 deletions src/components/OpenwbPageMessages.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ export default {
if (
(total == "light" &&
["info", "success", "warning", "danger"].includes(
currentMessage.type
currentMessage.type,
)) ||
(total == "info" &&
["success", "warning", "danger"].includes(
currentMessage.type
currentMessage.type,
)) ||
(total == "success" &&
["warning", "danger"].includes(currentMessage.type)) ||
Expand Down Expand Up @@ -157,7 +157,7 @@ export default {
},
systemMessages() {
let messageTopics = this.getWildcardTopics(
"openWB/system/messages/+"
"openWB/system/messages/+",
);
var messageList = [];
for (const [key, element] of Object.entries(messageTopics)) {
Expand All @@ -167,7 +167,7 @@ export default {
},
clientMessages() {
let messageTopics = this.getWildcardTopics(
"openWB/command/" + this.$root.mqttClientId + "/messages/+"
"openWB/command/" + this.$root.mqttClientId + "/messages/+",
);
var messageList = [];
for (const [key, element] of Object.entries(messageTopics)) {
Expand All @@ -192,7 +192,7 @@ export default {
*/
dismissError() {
this.clearTopic(
"openWB/command/" + this.$root.mqttClientId + "/error"
"openWB/command/" + this.$root.mqttClientId + "/error",
);
},
/**
Expand Down
6 changes: 3 additions & 3 deletions src/components/__tests__/OpenwbBaseArrayInput.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { describe, it, expect } from "vitest";
import { shallowMount } from "@vue/test-utils";
import OpenwbBaseArrayInput from "../OpenwbBaseArrayInput.vue";

describe("OpenwbBaseNumberInput.vue", () => {
describe("OpenwbBaseArrayInput.vue", () => {
// check title prop
it("render title", () => {
const title = "Array Input Test";
Expand Down Expand Up @@ -36,7 +36,7 @@ describe("OpenwbBaseNumberInput.vue", () => {
expect(wrapper.find("span.alert.alert-info").exists()).toBe(false);
await titleLabel.trigger("click");
expect(wrapper.find("span.alert.alert-info").html()).toContain(
helpContent
helpContent,
);
});
// check initial value
Expand All @@ -57,7 +57,7 @@ describe("OpenwbBaseNumberInput.vue", () => {
const renderedTextInput = wrapper.find("input[type=text]");
await renderedTextInput.setValue(newTag);
const renderedAddButton = wrapper.find(
".input-group-append font-awesome-icon-stub"
".input-group-append font-awesome-icon-stub",
);
await renderedAddButton.trigger("click");
expect(wrapper.emitted("update:modelValue")[0]).toStrictEqual([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe("OpenwbBaseButtonGroupInput.vue", () => {
expect(wrapper.find("span.alert.alert-info").exists()).toBe(false);
await titleLabel.trigger("click");
expect(wrapper.find("span.alert.alert-info").html()).toContain(
helpContent
helpContent,
);
});
// check buttons
Expand Down
2 changes: 1 addition & 1 deletion src/components/__tests__/OpenwbBaseCheckboxInput.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe("OpenwbBaseCheckboxInput.vue", () => {
expect(wrapper.find("span.alert.alert-info").exists()).toBe(false);
await titleLabel.trigger("click");
expect(wrapper.find("span.alert.alert-info").html()).toContain(
helpContent
helpContent,
);
});
// check buttons
Expand Down
2 changes: 1 addition & 1 deletion src/components/__tests__/OpenwbBaseNumberInput.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe("OpenwbBaseNumberInput.vue", () => {
expect(wrapper.find("span.alert.alert-info").exists()).toBe(false);
await titleLabel.trigger("click");
expect(wrapper.find("span.alert.alert-info").html()).toContain(
helpContent
helpContent,
);
});
// check initial value
Expand Down
2 changes: 1 addition & 1 deletion src/components/__tests__/OpenwbBaseRangeInput.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe("OpenwbBaseRangeInput.vue", () => {
expect(wrapper.find("div.alert.alert-info").exists()).toBe(false);
await titleLabel.trigger("click");
expect(wrapper.find("div.alert.alert-info").html()).toContain(
helpContent
helpContent,
);
});
// check initial value
Expand Down
4 changes: 2 additions & 2 deletions src/components/charge_points/OpenwbChargePointProxy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default {
computed: {
myChargePointSettingsComponent() {
console.debug(
`loading charge point settings: ${this.chargePointType}`
`loading charge point settings: ${this.chargePointType}`,
);
return defineAsyncComponent({
loader: () =>
Expand All @@ -48,7 +48,7 @@ export default {
},
myChargePointCommandsComponent() {
console.debug(
`loading charge point commands: ${this.chargePointType}`
`loading charge point commands: ${this.chargePointType}`,
);
return defineAsyncComponent({
loader: () => import(`./${this.chargePointType}/commands.vue`),
Expand Down
6 changes: 3 additions & 3 deletions src/components/charge_points/openwb_pro/commands.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default {
formData.append("command", "update");
formData.append(
"data",
'{"ip_address":"' + this.configuration.ip_address + '"}'
'{"ip_address":"' + this.configuration.ip_address + '"}',
);
const startedMessage =
"Die Aktualisierung der openWB Pro wird gestartet...";
Expand All @@ -41,7 +41,7 @@ export default {
location.host +
"/openWB/web/settings/modules/charge_points/openwb_pro/commands.php",
formData,
{ timeout: 5000 }
{ timeout: 5000 },
)
.then(() => {
const successMessage =
Expand All @@ -55,7 +55,7 @@ export default {
// that falls out of the range of 2xx
console.error(
error.response.status,
error.response.data
error.response.data,
);
alertMessage +=
error.response.status + ": " + error.response.data;
Expand Down
2 changes: 1 addition & 1 deletion src/components/devices/OpenwbConfigProxy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default {
computed: {
myComponent() {
console.debug(
`loading component: ${this.deviceType} / ${this.componentType}`
`loading component: ${this.deviceType} / ${this.componentType}`,
);
if (this.componentType !== undefined) {
return defineAsyncComponent({
Expand Down
2 changes: 1 addition & 1 deletion src/components/devices/virtual/counter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@update:model-value="
updateConfiguration(
$event * 1000,
'configuration.external_consumption'
'configuration.external_consumption',
)
"
>
Expand Down
Loading
Loading