diff --git a/.github/workflows/check-pull-request.yml b/.github/workflows/check-pull-request.yml
new file mode 100644
index 0000000..b7cefe7
--- /dev/null
+++ b/.github/workflows/check-pull-request.yml
@@ -0,0 +1,28 @@
+name: "Check Pull Request"
+on: [pull_request]
+
+permissions:
+ contents: read
+
+jobs:
+ dependency-review:
+ runs-on: ubuntu-latest
+ steps:
+ - name: "Checkout Repository"
+ uses: actions/checkout@v3
+
+ - name: "Dependency Review"
+ uses: actions/dependency-review-action@v3
+
+ rome-ci:
+ runs-on: ubuntu-latest
+ steps:
+ - name: "Checkout Repository"
+ uses: actions/checkout@v3
+
+ - uses: rome/setup-rome@v0.4
+ with:
+ version: latest
+
+ - name: "Run rome ci ."
+ run: rome ci .
diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml
deleted file mode 100644
index 34b14c3..0000000
--- a/.github/workflows/dependency-review.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-# Dependency Review Action
-#
-# This Action will scan dependency manifest files that change as part of a Pull Reqest, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
-#
-# Source repository: https://github.com/actions/dependency-review-action
-# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
-name: 'Dependency Review'
-on: [pull_request]
-
-permissions:
- contents: read
-
-jobs:
- dependency-review:
- runs-on: ubuntu-latest
- steps:
- - name: 'Checkout Repository'
- uses: actions/checkout@v3
- - name: 'Dependency Review'
- uses: actions/dependency-review-action@v3
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
new file mode 100644
index 0000000..8b5e2e3
--- /dev/null
+++ b/.vscode/extensions.json
@@ -0,0 +1,5 @@
+{
+ "recommendations": [
+ "rome.rome"
+ ]
+}
diff --git a/example/Examples.js b/example/Examples.js
index a609c99..4c9f78b 100644
--- a/example/Examples.js
+++ b/example/Examples.js
@@ -1,49 +1,75 @@
/** Counter Prompt **/
-prompt({
- title: "Counter",
- label: "Choose a number:",
- value: "59",
- type: "counter",
- counterOptions: { minimum: -69, maximum: null, multiFire: true },
- resizable: true,
- height: 150,
- width: 300,
- customStylesheet: "dark",
-}, win).then(input => { console.log(`input == ${input}`) }).catch(console.error)
+prompt(
+ {
+ title: 'Counter',
+ label: 'Choose a number:',
+ value: '59',
+ type: 'counter',
+ counterOptions: { minimum: -69, maximum: null, multiFire: true },
+ resizable: true,
+ height: 150,
+ width: 300,
+ customStylesheet: 'dark',
+ },
+ win,
+)
+ .then((input) => {
+ console.log(`input == ${input}`);
+ })
+ .catch(console.error);
/** Select Prompt **/
-prompt({
- title: "Select",
- label: "Choose an option:",
- type: "select",
- value: "2",
- selectOptions: ["thisReturn0", "thisReturn1", "imSelected", "thisReturn3"],
- // selectOptions: {0: "thisReturn0", 1: "thisReturn1", 2: "imSelected" , potato: "thisReturnPotato"},
- resizable: true,
- height: 150,
- width: 300,
- customStylesheet: "dark",
-}, win).then(input => { console.log(`input == ${input}`) }).catch(console.error)
-
+prompt(
+ {
+ title: 'Select',
+ label: 'Choose an option:',
+ type: 'select',
+ value: '2',
+ selectOptions: [
+ 'thisReturn0',
+ 'thisReturn1',
+ 'imSelected',
+ 'thisReturn3',
+ ],
+ // selectOptions: {0: "thisReturn0", 1: "thisReturn1", 2: "imSelected" , potato: "thisReturnPotato"},
+ resizable: true,
+ height: 150,
+ width: 300,
+ customStylesheet: 'dark',
+ },
+ win,
+)
+ .then((input) => {
+ console.log(`input == ${input}`);
+ })
+ .catch(console.error);
/** Accelelerator Prompt **/
-const kb = ($value, $label, $default) => { return { value: $value, label: $label, default: $default } };
-prompt({
- title: "Keybinds",
- label: "Select keybind for each method",
- type: "keybind",
- value: "2",
- keybindOptions: [
- { value: "volumeUp", label: "Increase Volume", default: "Shift+PageUp" },
- kb("volumeDown", "Decrease Volume", "Shift+PageDown"),
- kb("playPause", "Play / Pause") // (null || empty string || undefined) == no default
- ],
- resizable: true,
- customStylesheet: "dark",
-}, win).then(input => {
- if (input)
- input.forEach(obj => console.log(obj))
- else
- console.log("Pressed Cancel");
-})
- .catch(console.error)
\ No newline at end of file
+const kb = ($value, $label, $default) => {
+ return { value: $value, label: $label, default: $default };
+};
+prompt(
+ {
+ title: 'Keybinds',
+ label: 'Select keybind for each method',
+ type: 'keybind',
+ value: '2',
+ keybindOptions: [
+ {
+ value: 'volumeUp',
+ label: 'Increase Volume',
+ default: 'Shift+PageUp',
+ },
+ kb('volumeDown', 'Decrease Volume', 'Shift+PageDown'),
+ kb('playPause', 'Play / Pause'), // (null || empty string || undefined) == no default
+ ],
+ resizable: true,
+ customStylesheet: 'dark',
+ },
+ win,
+)
+ .then((input) => {
+ if (input) input.forEach((obj) => console.log(obj));
+ else console.log('Pressed Cancel');
+ })
+ .catch(console.error);
diff --git a/example/custom-titlebar.js b/example/custom-titlebar.js
index 03db10b..15a2c2d 100644
--- a/example/custom-titlebar.js
+++ b/example/custom-titlebar.js
@@ -1,16 +1,16 @@
// this file could be used as a custom script, to use a custom titlebar
-const customTitlebar = require("custom-electron-titlebar");
+const customTitlebar = require('custom-electron-titlebar');
module.exports = () => {
- const bar = new customTitlebar.Titlebar({
- backgroundColor: customTitlebar.Color.fromHex("#050505"),
- minimizable: false,
- maximizable: false,
- menu: null
- });
- const mainStyle = document.querySelector("#container").style;
- mainStyle.width = "100%";
- mainStyle.position = "fixed";
- mainStyle.border = "unset";
+ const bar = new customTitlebar.Titlebar({
+ backgroundColor: customTitlebar.Color.fromHex('#050505'),
+ minimizable: false,
+ maximizable: false,
+ menu: null,
+ });
+ const mainStyle = document.querySelector('#container').style;
+ mainStyle.width = '100%';
+ mainStyle.position = 'fixed';
+ mainStyle.border = 'unset';
};
diff --git a/lib/index.js b/lib/index.js
index 83f03e4..8340a92 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -1,182 +1,216 @@
-const { BrowserWindow, ipcMain } = require("electron");
+const { BrowserWindow, ipcMain } = require('electron');
-const url = require("url");
-const path = require("path");
+const url = require('url');
+const path = require('path');
const DEFAULT_WIDTH = 370;
const DEFAULT_KEYBIND_WIDTH = 420;
const DEFAULT_COUNTER_WIDTH = 300;
const DEFAULT_HEIGHT = 200;
-const DEFAULT_KEYBIND_HEIGHT = options => (options.length * 50) + 130;
+const DEFAULT_KEYBIND_HEIGHT = (options) => options.length * 50 + 130;
function electronPrompt(options, parentWindow) {
- return new Promise((resolve, reject) => {
- //id used to ensure unique listeners per window
- const id = `${Date.now()}-${Math.random()}`;
-
- //custom options override default
- const options_ = Object.assign(
- {
- width: options?.type === "counter" ? DEFAULT_COUNTER_WIDTH : options?.type === "keybind" ? DEFAULT_KEYBIND_WIDTH : DEFAULT_WIDTH,
- height: options?.type === "keybind" && options?.keybindOptions ? DEFAULT_KEYBIND_HEIGHT(options.keybindOptions) : DEFAULT_HEIGHT,
- resizable: false,
- title: "Prompt",
- label: "Please input a value:",
- buttonLabels: null,
- alwaysOnTop: false,
- value: null,
- type: "input",
- selectOptions: null,
- keybindOptions: null,
- counterOptions: { minimum: null, maximum: null, multiFire: false },
- icon: null,
- useHtmlLabel: false,
- customStylesheet: null,
- menuBarVisible: false,
- skipTaskbar: true,
- frame: true,
- customScript: null,
- enableRemoteModule: false
- },
- options || {}
- );
-
-
-
- if (options_.customStylesheet === "dark") {
- options_.customStylesheet = require("path").join(__dirname, "dark-prompt.css");
- }
-
- for (const type of ["counter", "select", "keybind", "multiInput"]) {
- if (options_.type === type && (!options_[`${type}Options`] || typeof options_[`${type}Options`] !== "object")) {
- reject(new Error(`"${type}Options" must be an object if type = ${type}`));
- return;
- }
- }
-
- options_.minWidth = options?.minWidth || options?.width || options_.width;
- options_.minHeight = options?.minHeight || options?.height || options_.height;
-
- let promptWindow = new BrowserWindow({
- frame: options_.frame,
- width: options_.width,
- height: options_.height,
- minWidth: options_.minWidth,
- minHeight: options_.minHeight,
- resizable: options_.resizable,
- minimizable: !options_.skipTaskbar && !parentWindow && !options_.alwaysOnTop,
- fullscreenable: options_.resizable,
- maximizable: options_.resizable,
- parent: parentWindow,
- skipTaskbar: options_.skipTaskbar,
- alwaysOnTop: options_.alwaysOnTop,
- useContentSize: options_.resizable,
- modal: Boolean(parentWindow),
- title: options_.title,
- icon: options_.icon || undefined,
- webPreferences: {
- nodeIntegration: true,
- contextIsolation: false,
- enableRemoteModule: options_.enableRemoteModule
- },
- show: false
- });
-
- if (options_.enableRemoteModule) {
- require("@electron/remote/main").enable(promptWindow.webContents);
- }
-
- promptWindow.setMenu(null);
- promptWindow.setMenuBarVisibility(options_.menuBarVisible);
-
- //called on exit
- const cleanup = () => {
- ipcMain.removeListener("prompt-get-options:" + id, getOptionsListener);
- ipcMain.removeListener("prompt-post-data:" + id, postDataListener);
- ipcMain.removeListener("prompt-error:" + id, errorListener);
-
- parentWindow?.focus();
-
- if (promptWindow) {
- promptWindow.destroy();
- promptWindow = null;
- }
- };
-
- ///transfer options to front
- const getOptionsListener = event => {
- if (options_.button)
- options_.button.click = '(' + new String(options_.button.click) + ')()';
-
- event.returnValue = JSON.stringify(options_);
- };
-
- //get input from front
- const postDataListener = (event, value) => {
- if (options_.type === "keybind" && value) {
- for (let i = 0; i < value.length; i++) {
- value[i] = JSON.parse(value[i]);
- }
- }
- resolve(value);
- event.returnValue = null;
- cleanup();
- };
-
- const unresponsiveListener = () => {
- reject(new Error("Window was unresponsive"));
- cleanup();
- };
-
- //get error from front
- const errorListener = (event, message) => {
- reject(new Error(message));
- event.returnValue = null;
- cleanup();
- };
-
- //attach listeners
- ipcMain.once("prompt-get-options:" + id, getOptionsListener);
- ipcMain.once("prompt-post-data:" + id, postDataListener);
- ipcMain.once("prompt-error:" + id, errorListener);
- promptWindow.once("unresponsive", unresponsiveListener);
-
- promptWindow.once("close", () => {
- resolve(null);
- cleanup();
- })
-
- //should never happen
- promptWindow.webContents.once("did-fail-load", (
- _event,
- errorCode,
- errorDescription,
- validatedURL
- ) => {
- const log = {
- error: "did-fail-load",
- errorCode,
- errorDescription,
- validatedURL
- };
- reject(new Error("prompt.html did-fail-load, log:\n" + log.toString()));
- });
-
- const promptUrl = url.format({
- protocol: "file",
- slashes: true,
- pathname: path.join(__dirname, "page", "prompt.html"),
- hash: id
- });
-
- //Finally, load prompt
- promptWindow.loadURL(promptUrl);
-
- // show window only when ready
- promptWindow.once('ready-to-show', () => {
- promptWindow.show();
- });
- });
+ return new Promise((resolve, reject) => {
+ //id used to ensure unique listeners per window
+ const id = `${Date.now()}-${Math.random()}`;
+
+ //custom options override default
+ const options_ = Object.assign(
+ {
+ width:
+ options?.type === 'counter'
+ ? DEFAULT_COUNTER_WIDTH
+ : options?.type === 'keybind'
+ ? DEFAULT_KEYBIND_WIDTH
+ : DEFAULT_WIDTH,
+ height:
+ options?.type === 'keybind' && options?.keybindOptions
+ ? DEFAULT_KEYBIND_HEIGHT(options.keybindOptions)
+ : DEFAULT_HEIGHT,
+ resizable: false,
+ title: 'Prompt',
+ label: 'Please input a value:',
+ buttonLabels: null,
+ alwaysOnTop: false,
+ value: null,
+ type: 'input',
+ selectOptions: null,
+ keybindOptions: null,
+ counterOptions: {
+ minimum: null,
+ maximum: null,
+ multiFire: false,
+ },
+ icon: null,
+ useHtmlLabel: false,
+ customStylesheet: null,
+ menuBarVisible: false,
+ skipTaskbar: true,
+ frame: true,
+ customScript: null,
+ enableRemoteModule: false,
+ },
+ options || {},
+ );
+
+ if (options_.customStylesheet === 'dark') {
+ options_.customStylesheet = require('path').join(
+ __dirname,
+ 'dark-prompt.css',
+ );
+ }
+
+ for (const type of ['counter', 'select', 'keybind', 'multiInput']) {
+ if (
+ options_.type === type &&
+ (!options_[`${type}Options`] ||
+ typeof options_[`${type}Options`] !== 'object')
+ ) {
+ reject(
+ new Error(
+ `"${type}Options" must be an object if type = ${type}`,
+ ),
+ );
+ return;
+ }
+ }
+
+ options_.minWidth =
+ options?.minWidth || options?.width || options_.width;
+ options_.minHeight =
+ options?.minHeight || options?.height || options_.height;
+
+ let promptWindow = new BrowserWindow({
+ frame: options_.frame,
+ width: options_.width,
+ height: options_.height,
+ minWidth: options_.minWidth,
+ minHeight: options_.minHeight,
+ resizable: options_.resizable,
+ minimizable: !(
+ options_.skipTaskbar ||
+ parentWindow ||
+ options_.alwaysOnTop
+ ),
+ fullscreenable: options_.resizable,
+ maximizable: options_.resizable,
+ parent: parentWindow,
+ skipTaskbar: options_.skipTaskbar,
+ alwaysOnTop: options_.alwaysOnTop,
+ useContentSize: options_.resizable,
+ modal: Boolean(parentWindow),
+ title: options_.title,
+ icon: options_.icon || undefined,
+ webPreferences: {
+ nodeIntegration: true,
+ contextIsolation: false,
+ enableRemoteModule: options_.enableRemoteModule,
+ },
+ show: false,
+ });
+
+ if (options_.enableRemoteModule) {
+ require('@electron/remote/main').enable(promptWindow.webContents);
+ }
+
+ promptWindow.setMenu(null);
+ promptWindow.setMenuBarVisibility(options_.menuBarVisible);
+
+ //called on exit
+ const cleanup = () => {
+ ipcMain.removeListener(
+ `prompt-get-options:${id}`,
+ getOptionsListener,
+ );
+ ipcMain.removeListener(`prompt-post-data:${id}`, postDataListener);
+ ipcMain.removeListener(`prompt-error:${id}`, errorListener);
+
+ parentWindow?.focus();
+
+ if (promptWindow) {
+ promptWindow.destroy();
+ promptWindow = null;
+ }
+ };
+
+ ///transfer options to front
+ const getOptionsListener = (event) => {
+ if (options_.button)
+ options_.button.click = `(${new String(
+ options_.button.click,
+ )})()`;
+
+ event.returnValue = JSON.stringify(options_);
+ };
+
+ //get input from front
+ const postDataListener = (event, value) => {
+ if (options_.type === 'keybind' && value) {
+ for (let i = 0; i < value.length; i++) {
+ value[i] = JSON.parse(value[i]);
+ }
+ }
+ resolve(value);
+ event.returnValue = null;
+ cleanup();
+ };
+
+ const unresponsiveListener = () => {
+ reject(new Error('Window was unresponsive'));
+ cleanup();
+ };
+
+ //get error from front
+ const errorListener = (event, message) => {
+ reject(new Error(message));
+ event.returnValue = null;
+ cleanup();
+ };
+
+ //attach listeners
+ ipcMain.once(`prompt-get-options:${id}`, getOptionsListener);
+ ipcMain.once(`prompt-post-data:${id}`, postDataListener);
+ ipcMain.once(`prompt-error:${id}`, errorListener);
+ promptWindow.once('unresponsive', unresponsiveListener);
+
+ promptWindow.once('close', () => {
+ resolve(null);
+ cleanup();
+ });
+
+ //should never happen
+ promptWindow.webContents.once(
+ 'did-fail-load',
+ (_event, errorCode, errorDescription, validatedURL) => {
+ const log = {
+ error: 'did-fail-load',
+ errorCode,
+ errorDescription,
+ validatedURL,
+ };
+ reject(
+ new Error(
+ 'prompt.html did-fail-load, log:\n' + log.toString(),
+ ),
+ );
+ },
+ );
+
+ const promptUrl = url.format({
+ protocol: 'file',
+ slashes: true,
+ pathname: path.join(__dirname, 'page', 'prompt.html'),
+ hash: id,
+ });
+
+ //Finally, load prompt
+ promptWindow.loadURL(promptUrl);
+
+ // show window only when ready
+ promptWindow.once('ready-to-show', () => {
+ promptWindow.show();
+ });
+ });
}
module.exports = electronPrompt;
diff --git a/lib/page/keybind.js b/lib/page/keybind.js
index 2ea5ea6..844ee27 100644
--- a/lib/page/keybind.js
+++ b/lib/page/keybind.js
@@ -5,10 +5,10 @@
*/
-const {promptError} = require("./prompt");
+const { promptError } = require('./prompt');
class KeybindGetter {
- /* Attributes:
+ /* Attributes:
modifiers: Set
key: string
value: string
@@ -17,273 +17,289 @@ class KeybindGetter {
clearButton: buttonElement
*/
- constructor(options, parentElement) {
- if (!options.label || !options.value) {
- promptError("keybind option must contain label and value");
- return;
- }
-
- this.key = "";
- this.modifiers = new Set();
-
- this.value = options.value;
-
- this.label = document.createElement("label");
- this.label.classList.add("keybindLabel");
-
- this.input = document.createElement("input");
- this.input.setAttribute("readonly", true);
- this.input.classList.add("keybindData");
-
- this.clearButton = document.createElement("button");
- this.clearButton.classList.add("clearButton");
- this.clearButton.textContent = "Clear";
-
- parentElement.append(this.label, this.input, this.clearButton);
-
- this.setup(options);
-
- if (options.default) {
- this.setDefault(options.default);
- }
- }
-
- focus() {
- this.input.focus();
- }
-
- output() {
- const output = {value: this.value, accelerator: this.input.value.replaceAll(" ", "")};
- return JSON.stringify(output);
- }
-
- updateText() {
- let result = "";
- for (const modifier of this.modifiers) {
- result += modifier + " + ";
- }
-
- this.input.value = result + this.key;
- }
-
- setDefault(defaultValue) {
- const accelerator = parseAccelerator(defaultValue).split("+");
- for (const key of accelerator) {
- if (isModifier(key)) {
- this.modifiers.add(key);
- } else {
- this.key = key;
- }
- }
-
- this.updateText();
- }
-
- clear() {
- this.modifiers.clear();
- this.key = "";
- this.input.value = "";
- }
-
- setup(options) {
- this.input.addEventListener("keydown", event => {
- event.preventDefault();
- if (event.repeat) {
- return;
- }
-
- let key = event.code || event.key;
- if (key in virtualKeyCodes) {
- key = virtualKeyCodes[event.code];
- } else {
- console.log('Error, key "' + event.code + '" was not found');
- return;
- }
-
- if (isModifier(key)) {
- if (this.modifiers.size < 3) {
- this.modifiers.add(key);
- }
- } else { // Is key
- this.key = key;
- }
-
- this.updateText();
- });
-
- this.clearButton.addEventListener("click", event => {
- event.preventDefault();
- this.clear();
- });
-
- this.label.textContent = options.label + " ";
- }
+ constructor(options, parentElement) {
+ if (!(options.label && options.value)) {
+ promptError('keybind option must contain label and value');
+ return;
+ }
+
+ this.key = '';
+ this.modifiers = new Set();
+
+ this.value = options.value;
+
+ this.label = document.createElement('label');
+ this.label.classList.add('keybindLabel');
+
+ this.input = document.createElement('input');
+ this.input.setAttribute('readonly', true);
+ this.input.classList.add('keybindData');
+
+ this.clearButton = document.createElement('button');
+ this.clearButton.classList.add('clearButton');
+ this.clearButton.textContent = 'Clear';
+
+ parentElement.append(this.label, this.input, this.clearButton);
+
+ this.setup(options);
+
+ if (options.default) {
+ this.setDefault(options.default);
+ }
+ }
+
+ focus() {
+ this.input.focus();
+ }
+
+ output() {
+ const output = {
+ value: this.value,
+ accelerator: this.input.value.replaceAll(' ', ''),
+ };
+ return JSON.stringify(output);
+ }
+
+ updateText() {
+ let result = '';
+ for (const modifier of this.modifiers) {
+ result += `${modifier} + `;
+ }
+
+ this.input.value = result + this.key;
+ }
+
+ setDefault(defaultValue) {
+ const accelerator = parseAccelerator(defaultValue).split('+');
+ for (const key of accelerator) {
+ if (isModifier(key)) {
+ this.modifiers.add(key);
+ } else {
+ this.key = key;
+ }
+ }
+
+ this.updateText();
+ }
+
+ clear() {
+ this.modifiers.clear();
+ this.key = '';
+ this.input.value = '';
+ }
+
+ setup(options) {
+ this.input.addEventListener('keydown', (event) => {
+ event.preventDefault();
+ if (event.repeat) {
+ return;
+ }
+
+ let key = event.code || event.key;
+ if (key in virtualKeyCodes) {
+ key = virtualKeyCodes[event.code];
+ } else {
+ console.log(`Error, key "${event.code}" was not found`);
+ return;
+ }
+
+ if (isModifier(key)) {
+ if (this.modifiers.size < 3) {
+ this.modifiers.add(key);
+ }
+ } else {
+ // Is key
+ this.key = key;
+ }
+
+ this.updateText();
+ });
+
+ this.clearButton.addEventListener('click', (event) => {
+ event.preventDefault();
+ this.clear();
+ });
+
+ this.label.textContent = `${options.label} `;
+ }
}
class KeybindContainer {
- // Elements: KeybindGetter[];
-
- constructor(options, parentElement) {
- parentElement.classList.add("keybind");
- this.elements = options.map(option => new KeybindGetter(option, parentElement));
- document.querySelector("#buttons").style["padding-top"] = "20px";
- }
-
- focus() {
- if (this.elements.length > 0) {
- this.elements[0].focus();
- }
- }
-
- submit() {
- return this.elements.map(element => element.output());
- }
+ // Elements: KeybindGetter[];
+
+ constructor(options, parentElement) {
+ parentElement.classList.add('keybind');
+ this.elements = options.map(
+ (option) => new KeybindGetter(option, parentElement),
+ );
+ document.querySelector('#buttons').style['padding-top'] = '20px';
+ }
+
+ focus() {
+ if (this.elements.length > 0) {
+ this.elements[0].focus();
+ }
+ }
+
+ submit() {
+ return this.elements.map((element) => element.output());
+ }
}
function parseAccelerator(a) {
- let accelerator = a.toString();
+ let accelerator = a.toString();
- accelerator = process.platform === "darwin" ?
- accelerator.replace(/(ctrl)|(control)/gi, "") :
- accelerator.replace(/(cmd)|(command)/gi, "");
+ accelerator =
+ process.platform === 'darwin'
+ ? accelerator.replace(/(ctrl)|(control)/gi, '')
+ : accelerator.replace(/(cmd)|(command)/gi, '');
- return accelerator.replace(/(or)/gi, "");
+ return accelerator.replace(/(or)/gi, '');
}
function isModifier(key) {
- for (const modifier of ["Shift", "Control", "Ctrl", "Command", "Cmd", "Alt", "AltGr", "Super"]) {
- if (key === modifier) {
- return true;
- }
- }
-
- return false;
+ for (const modifier of [
+ 'Shift',
+ 'Control',
+ 'Ctrl',
+ 'Command',
+ 'Cmd',
+ 'Alt',
+ 'AltGr',
+ 'Super',
+ ]) {
+ if (key === modifier) {
+ return true;
+ }
+ }
+
+ return false;
}
const virtualKeyCodes = {
- ShiftLeft: "Shift",
- ShiftRight: "Shift",
- ControlLeft: "Ctrl",
- ControlRight: "Ctrl",
- AltLeft: "Alt",
- AltRight: "Alt",
- MetaLeft: "Super",
- MetaRight: "Super",
- NumLock: "NumLock",
- NumpadDivide: "NumDiv",
- NumpadMultiply: "NumMult",
- NumpadSubtract: "NumSub",
- NumpadAdd: "NumAdd",
- NumpadDecimal: "NumDec ",
- Numpad0: "Num0",
- Numpad1: "Num1",
- Numpad2: "Num2",
- Numpad3: "Num3",
- Numpad4: "Num4",
- Numpad5: "Num5",
- Numpad6: "Num6",
- Numpad7: "Num7",
- Numpad8: "Num8",
- Numpad9: "Num9",
- Digit0: "0",
- Digit1: "1",
- Digit2: "2",
- Digit3: "3",
- Digit4: "4",
- Digit5: "5",
- Digit6: "6",
- Digit7: "7",
- Digit8: "8",
- Digit9: "9",
- Minus: "-",
- Equal: "=",
- KeyQ: "Q",
- KeyW: "W",
- KeyE: "E",
- KeyR: "R",
- KeyT: "T",
- KeyY: "Y",
- KeyU: "U",
- KeyI: "I",
- KeyO: "O",
- KeyP: "P",
- KeyA: "A",
- KeyS: "S",
- KeyD: "D",
- KeyF: "F",
- KeyG: "G",
- KeyH: "H",
- KeyJ: "J",
- KeyK: "K",
- KeyL: "L",
- KeyZ: "Z",
- KeyX: "X",
- KeyC: "C",
- KeyV: "V",
- KeyB: "B",
- KeyN: "N",
- KeyM: "M",
- BracketLeft: "[",
- BracketRight: "]",
- Semicolon: ";",
- Quote: "'",
- Backquote: '`',
- Backslash: "\\",
- Comma: ",",
- Period: "'.'",
- Slash: "/",
- Plus: "+",
- Space: "Space",
- Tab: "Tab",
- Backspace: "Backspace",
- Delete: "Delete",
- Insert: "Insert",
- Return: "Return",
- Enter: "Enter",
- ArrowUp: "Up",
- ArrowDown: "Down",
- ArrowLeft: "Left",
- ArrowRight: "Right",
- Home: "Home",
- End: "End",
- PageUp: "PageUp",
- PageDown: "PageDown",
- Escape: "Escape",
- AudioVolumeUp: "VolumeUp",
- AudioVolumeDown: "VolumeDown",
- AudioVolumeMute: "VolumeMute",
- MediaTrackNext: "MediaNextTrack",
- MediaTrackPrevious: "MediaPreviousTrack",
- MediaStop: "MediaStop",
- MediaPlayPause: "MediaPlayPause",
- ScrollLock: "ScrollLock",
- PrintScreen: "PrintScreen",
- F1: "F1",
- F2: "F2",
- F3: "F3",
- F4: "F4",
- F5: "F5",
- F6: "F6",
- F7: "F7",
- F8: "F8",
- F9: "F9",
- F10: "F10",
- F11: "F11",
- F12: "F12",
- F13: "F13",
- F14: "F14",
- F15: "F15",
- F16: "F16",
- F17: "F17",
- F18: "F18",
- F19: "F19",
- F20: "F20",
- F21: "F21",
- F22: "F22",
- F23: "F23",
- F24: "F24"
+ ShiftLeft: 'Shift',
+ ShiftRight: 'Shift',
+ ControlLeft: 'Ctrl',
+ ControlRight: 'Ctrl',
+ AltLeft: 'Alt',
+ AltRight: 'Alt',
+ MetaLeft: 'Super',
+ MetaRight: 'Super',
+ NumLock: 'NumLock',
+ NumpadDivide: 'NumDiv',
+ NumpadMultiply: 'NumMult',
+ NumpadSubtract: 'NumSub',
+ NumpadAdd: 'NumAdd',
+ NumpadDecimal: 'NumDec ',
+ Numpad0: 'Num0',
+ Numpad1: 'Num1',
+ Numpad2: 'Num2',
+ Numpad3: 'Num3',
+ Numpad4: 'Num4',
+ Numpad5: 'Num5',
+ Numpad6: 'Num6',
+ Numpad7: 'Num7',
+ Numpad8: 'Num8',
+ Numpad9: 'Num9',
+ Digit0: '0',
+ Digit1: '1',
+ Digit2: '2',
+ Digit3: '3',
+ Digit4: '4',
+ Digit5: '5',
+ Digit6: '6',
+ Digit7: '7',
+ Digit8: '8',
+ Digit9: '9',
+ Minus: '-',
+ Equal: '=',
+ KeyQ: 'Q',
+ KeyW: 'W',
+ KeyE: 'E',
+ KeyR: 'R',
+ KeyT: 'T',
+ KeyY: 'Y',
+ KeyU: 'U',
+ KeyI: 'I',
+ KeyO: 'O',
+ KeyP: 'P',
+ KeyA: 'A',
+ KeyS: 'S',
+ KeyD: 'D',
+ KeyF: 'F',
+ KeyG: 'G',
+ KeyH: 'H',
+ KeyJ: 'J',
+ KeyK: 'K',
+ KeyL: 'L',
+ KeyZ: 'Z',
+ KeyX: 'X',
+ KeyC: 'C',
+ KeyV: 'V',
+ KeyB: 'B',
+ KeyN: 'N',
+ KeyM: 'M',
+ BracketLeft: '[',
+ BracketRight: ']',
+ Semicolon: ';',
+ Quote: "'",
+ Backquote: '`',
+ Backslash: '\\',
+ Comma: ',',
+ Period: "'.'",
+ Slash: '/',
+ Plus: '+',
+ Space: 'Space',
+ Tab: 'Tab',
+ Backspace: 'Backspace',
+ Delete: 'Delete',
+ Insert: 'Insert',
+ Return: 'Return',
+ Enter: 'Enter',
+ ArrowUp: 'Up',
+ ArrowDown: 'Down',
+ ArrowLeft: 'Left',
+ ArrowRight: 'Right',
+ Home: 'Home',
+ End: 'End',
+ PageUp: 'PageUp',
+ PageDown: 'PageDown',
+ Escape: 'Escape',
+ AudioVolumeUp: 'VolumeUp',
+ AudioVolumeDown: 'VolumeDown',
+ AudioVolumeMute: 'VolumeMute',
+ MediaTrackNext: 'MediaNextTrack',
+ MediaTrackPrevious: 'MediaPreviousTrack',
+ MediaStop: 'MediaStop',
+ MediaPlayPause: 'MediaPlayPause',
+ ScrollLock: 'ScrollLock',
+ PrintScreen: 'PrintScreen',
+ F1: 'F1',
+ F2: 'F2',
+ F3: 'F3',
+ F4: 'F4',
+ F5: 'F5',
+ F6: 'F6',
+ F7: 'F7',
+ F8: 'F8',
+ F9: 'F9',
+ F10: 'F10',
+ F11: 'F11',
+ F12: 'F12',
+ F13: 'F13',
+ F14: 'F14',
+ F15: 'F15',
+ F16: 'F16',
+ F17: 'F17',
+ F18: 'F18',
+ F19: 'F19',
+ F20: 'F20',
+ F21: 'F21',
+ F22: 'F22',
+ F23: 'F23',
+ F24: 'F24',
};
module.exports = (options, parentElement) => {
- return new KeybindContainer(options, parentElement);
+ return new KeybindContainer(options, parentElement);
};
diff --git a/lib/page/prompt.js b/lib/page/prompt.js
index 5fbef17..60aa6a9 100644
--- a/lib/page/prompt.js
+++ b/lib/page/prompt.js
@@ -1,284 +1,307 @@
-const fs = require("fs");
-const { ipcRenderer } = require("electron");
+const fs = require('fs');
+const { ipcRenderer } = require('electron');
let promptId = null;
let promptOptions = null;
let dataElement = null;
-function $(selector) { return document.querySelector(selector); }
+function $(selector) {
+ return document.querySelector(selector);
+}
-document.addEventListener("DOMContentLoaded", promptRegister);
+document.addEventListener('DOMContentLoaded', promptRegister);
function promptRegister() {
-
- //get custom session id
- promptId = document.location.hash.replace("#", "");
-
- //get options from back
- try {
- promptOptions = JSON.parse(ipcRenderer.sendSync("prompt-get-options:" + promptId));
- } catch (error) {
- return promptError(error);
- }
-
- //set label
- if (promptOptions.useHtmlLabel) {
- $("#label").innerHTML = promptOptions.label;
- }
- else {
- $("#label").textContent = promptOptions.label;
- }
-
- //set button label
- if (promptOptions.buttonLabels && promptOptions.buttonLabels.ok) {
- $("#ok").textContent = promptOptions.buttonLabels.ok;
- }
-
- if (promptOptions.buttonLabels && promptOptions.buttonLabels.cancel) {
- $("#cancel").textContent = promptOptions.buttonLabels.cancel;
- }
-
- //inject custom stylesheet from options
- if (promptOptions.customStylesheet) {
- try {
- const customStyleContent = fs.readFileSync(promptOptions.customStylesheet);
- if (customStyleContent) {
- const customStyle = document.createElement("style");
- customStyle.setAttribute("rel", "stylesheet");
- customStyle.append(document.createTextNode(customStyleContent));
- document.head.append(customStyle);
- }
- } catch (error) {
- return promptError(error);
- }
- }
-
- //add button listeners
- $("#form").addEventListener("submit", promptSubmit);
- $("#cancel").addEventListener("click", promptCancel);
-
- //create input/select/counter/keybind
- const dataContainerElement = $("#data-container");
- const buttonsContainer = $("#buttons");
-
- switch (promptOptions.type) {
- case "counter":
- dataElement = promptCreateCounter(dataContainerElement);
- break;
- case "input":
- dataElement = promptCreateInput(promptOptions);
- break;
- case "select":
- dataElement = promptCreateSelect(promptOptions);
- break;
- case "keybind":
- dataElement = require("./keybind")(promptOptions.keybindOptions, dataContainerElement);
- break;
- case "multiInput":
- dataElement = promptCreateMultiInput(dataContainerElement);
- break;
- default:
- return promptError(`Unhandled input type '${promptOptions.type}'`);
- }
-
- if (promptOptions.type !== "multiInput") {
- if (promptOptions.type !== "keybind") {
- dataElement.setAttribute("id", "data");
-
- if (promptOptions.type !== "counter") {
- dataContainerElement.append(dataElement);
- }
-
- if (promptOptions.type !== "select") {
- dataElement.select();
- }
- }
-
- dataElement.focus?.();
- }
-
- //load custom script from options
- if (promptOptions.customScript) {
- try {
- const customScript = require(promptOptions.customScript);
- customScript();
- } catch (error) {
- return promptError(error);
- }
- }
-
- if (promptOptions.button) {
- const button = document.createElement("button");
-
- // insert custom input attributes if in options
- if (promptOptions.button.attrs && typeof (promptOptions.button.attrs) === "object") {
- for (const k in promptOptions.button.attrs) {
- if (!Object.prototype.hasOwnProperty.call(promptOptions.button.attrs, k)) {
- continue;
- }
-
- button.setAttribute(k, promptOptions.button.attrs[k]);
- }
- }
- button.addEventListener("click", () => eval(promptOptions.button.click));
- button.innerText = promptOptions.button.label;
- button.setAttribute("type", "button");
- button.setAttribute("id", "custom");
-
- buttonsContainer.prepend(button);
- }
+ //get custom session id
+ promptId = document.location.hash.replace('#', '');
+
+ //get options from back
+ try {
+ promptOptions = JSON.parse(
+ ipcRenderer.sendSync(`prompt-get-options:${promptId}`),
+ );
+ } catch (error) {
+ return promptError(error);
+ }
+
+ //set label
+ if (promptOptions.useHtmlLabel) {
+ $('#label').innerHTML = promptOptions.label;
+ } else {
+ $('#label').textContent = promptOptions.label;
+ }
+
+ //set button label
+ if (promptOptions.buttonLabels?.ok) {
+ $('#ok').textContent = promptOptions.buttonLabels.ok;
+ }
+
+ if (promptOptions.buttonLabels?.cancel) {
+ $('#cancel').textContent = promptOptions.buttonLabels.cancel;
+ }
+
+ //inject custom stylesheet from options
+ if (promptOptions.customStylesheet) {
+ try {
+ const customStyleContent = fs.readFileSync(
+ promptOptions.customStylesheet,
+ );
+ if (customStyleContent) {
+ const customStyle = document.createElement('style');
+ customStyle.setAttribute('rel', 'stylesheet');
+ customStyle.append(document.createTextNode(customStyleContent));
+ document.head.append(customStyle);
+ }
+ } catch (error) {
+ return promptError(error);
+ }
+ }
+
+ //add button listeners
+ $('#form').addEventListener('submit', promptSubmit);
+ $('#cancel').addEventListener('click', promptCancel);
+
+ //create input/select/counter/keybind
+ const dataContainerElement = $('#data-container');
+ const buttonsContainer = $('#buttons');
+
+ switch (promptOptions.type) {
+ case 'counter':
+ dataElement = promptCreateCounter(dataContainerElement);
+ break;
+ case 'input':
+ dataElement = promptCreateInput(promptOptions);
+ break;
+ case 'select':
+ dataElement = promptCreateSelect(promptOptions);
+ break;
+ case 'keybind':
+ dataElement = require('./keybind')(
+ promptOptions.keybindOptions,
+ dataContainerElement,
+ );
+ break;
+ case 'multiInput':
+ dataElement = promptCreateMultiInput(dataContainerElement);
+ break;
+ default:
+ return promptError(`Unhandled input type '${promptOptions.type}'`);
+ }
+
+ if (promptOptions.type !== 'multiInput') {
+ if (promptOptions.type !== 'keybind') {
+ dataElement.setAttribute('id', 'data');
+
+ if (promptOptions.type !== 'counter') {
+ dataContainerElement.append(dataElement);
+ }
+
+ if (promptOptions.type !== 'select') {
+ dataElement.select();
+ }
+ }
+
+ dataElement.focus?.();
+ }
+
+ //load custom script from options
+ if (promptOptions.customScript) {
+ try {
+ const customScript = require(promptOptions.customScript);
+ customScript();
+ } catch (error) {
+ return promptError(error);
+ }
+ }
+
+ if (promptOptions.button) {
+ const button = document.createElement('button');
+
+ // insert custom input attributes if in options
+ if (
+ promptOptions.button.attrs &&
+ typeof promptOptions.button.attrs === 'object'
+ ) {
+ for (const k in promptOptions.button.attrs) {
+ if (
+ !Object.prototype.hasOwnProperty.call(
+ promptOptions.button.attrs,
+ k,
+ )
+ ) {
+ continue;
+ }
+
+ button.setAttribute(k, promptOptions.button.attrs[k]);
+ }
+ }
+ button.addEventListener('click', () =>
+ eval(promptOptions.button.click),
+ );
+ button.innerText = promptOptions.button.label;
+ button.setAttribute('type', 'button');
+ button.setAttribute('id', 'custom');
+
+ buttonsContainer.prepend(button);
+ }
}
-window.addEventListener("error", event => {
- if (promptId) {
- promptError("An error has occured on the prompt window: \n" +
- `Message: ${event.message}\nURL: ${event.url}\nLine: ${event.lineNo}, Column: ${event.columnNo}\nStack: ${event.error.stack}`
- );
- }
+window.addEventListener('error', (event) => {
+ if (promptId) {
+ promptError(
+ `An error has occured on the prompt window: \nMessage: ${event.message}\nURL: ${event.url}\nLine: ${event.lineNo}, Column: ${event.columnNo}\nStack: ${event.error.stack}`,
+ );
+ }
});
//send error to back
function promptError(error) {
- if (error instanceof Error) {
- error = error.message + "\n" + error.stack;
- }
+ if (error instanceof Error) {
+ error = error.message + '\n' + error.stack;
+ }
- ipcRenderer.sendSync("prompt-error:" + promptId, error);
+ ipcRenderer.sendSync(`prompt-error:${promptId}`, error);
}
//send to back: input=null
function promptCancel() {
- ipcRenderer.sendSync("prompt-post-data:" + promptId, null);
+ ipcRenderer.sendSync(`prompt-post-data:${promptId}`, null);
}
//transfer input data to back
function promptSubmit() {
- let data = null;
-
- switch (promptOptions.type) {
- case "input":
- case "select":
- data = dataElement.value;
- break;
- case "counter":
- data = validateCounterInput(dataElement.value);
- break;
- case "keybind":
- data = dataElement.submit();
- break;
- case "multiInput":
- data = Array.from(document.querySelectorAll("#data")).map(element => element.value);
- break;
- default: //will never happen
- return promptError(`Unhandled input type '${promptOptions.type}'`);
- }
-
- ipcRenderer.sendSync("prompt-post-data:" + promptId, data);
+ let data = null;
+
+ switch (promptOptions.type) {
+ case 'input':
+ case 'select':
+ data = dataElement.value;
+ break;
+ case 'counter':
+ data = validateCounterInput(dataElement.value);
+ break;
+ case 'keybind':
+ data = dataElement.submit();
+ break;
+ case 'multiInput':
+ data = Array.from(document.querySelectorAll('#data')).map(
+ (element) => element.value,
+ );
+ break;
+ default: //will never happen
+ return promptError(`Unhandled input type '${promptOptions.type}'`);
+ }
+
+ ipcRenderer.sendSync(`prompt-post-data:${promptId}`, data);
}
//creates input box
function promptCreateInput(options) {
- const dataElement = document.createElement("input");
- dataElement.setAttribute("type", "text");
-
- dataElement.value = options.value ?? "";
-
- //insert custom input attributes if in options
- if (options.inputAttrs && typeof (options.inputAttrs) === "object") {
- for (const k in options.inputAttrs) {
- if (!Object.prototype.hasOwnProperty.call(options.inputAttrs, k)) {
- continue;
- }
-
- dataElement.setAttribute(k, options.inputAttrs[k]);
- }
- }
-
- //Cancel/Exit on 'Escape'
- dataElement.addEventListener("keyup", event => {
- if (event.key === "Escape") {
- promptCancel();
- }
- });
-
- //Confirm on 'Enter'
- dataElement.addEventListener("keypress", event => {
- if (event.key === "Enter") {
- event.preventDefault();
- $("#ok").click();
- }
- });
-
- return dataElement;
+ const dataElement = document.createElement('input');
+ dataElement.setAttribute('type', 'text');
+
+ dataElement.value = options.value ?? '';
+
+ //insert custom input attributes if in options
+ if (options.inputAttrs && typeof options.inputAttrs === 'object') {
+ for (const k in options.inputAttrs) {
+ if (!Object.prototype.hasOwnProperty.call(options.inputAttrs, k)) {
+ continue;
+ }
+
+ dataElement.setAttribute(k, options.inputAttrs[k]);
+ }
+ }
+
+ //Cancel/Exit on 'Escape'
+ dataElement.addEventListener('keyup', (event) => {
+ if (event.key === 'Escape') {
+ promptCancel();
+ }
+ });
+
+ //Confirm on 'Enter'
+ dataElement.addEventListener('keypress', (event) => {
+ if (event.key === 'Enter') {
+ event.preventDefault();
+ $('#ok').click();
+ }
+ });
+
+ return dataElement;
}
//add many inputs to container element
function promptCreateMultiInput(parentElement) {
- let el;
- for (const option of promptOptions.multiInputOptions) {
- if (option.inputAttrs) {
- el = promptCreateInput(option);
- el.setAttribute("id", "data");
- }
- if (option.selectOptions) {
- el = promptCreateSelect(option);
- el.setAttribute("id", "data");
- }
- parentElement.append(el);
- }
-
- return el;
+ let el;
+ for (const option of promptOptions.multiInputOptions) {
+ if (option.inputAttrs) {
+ el = promptCreateInput(option);
+ el.setAttribute('id', 'data');
+ }
+ if (option.selectOptions) {
+ el = promptCreateSelect(option);
+ el.setAttribute('id', 'data');
+ }
+ parentElement.append(el);
+ }
+
+ return el;
}
//create multiple select
function promptCreateSelect(options) {
- const dataElement = document.createElement("select");
- let optionElement;
+ const dataElement = document.createElement('select');
+ let optionElement;
- for (const k in options.selectOptions) {
- if (!Object.prototype.hasOwnProperty.call(options.selectOptions, k)) {
- continue;
- }
+ for (const k in options.selectOptions) {
+ if (!Object.prototype.hasOwnProperty.call(options.selectOptions, k)) {
+ continue;
+ }
- optionElement = document.createElement("option");
- optionElement.setAttribute("value", k);
- optionElement.textContent = options.selectOptions[k];
- if (k === options.value) {
- optionElement.setAttribute("selected", "selected");
- }
+ optionElement = document.createElement('option');
+ optionElement.setAttribute('value', k);
+ optionElement.textContent = options.selectOptions[k];
+ if (k === String(options.value)) {
+ optionElement.setAttribute('selected', '');
+ }
- dataElement.append(optionElement);
- }
+ dataElement.append(optionElement);
+ }
- return dataElement;
+ return dataElement;
}
function promptCreateCounter(parentElement) {
- if (promptOptions.counterOptions?.multiFire) {
- document.onmouseup = () => {
- if (nextTimeoutID) {
- clearTimeout(nextTimeoutID)
- nextTimeoutID = null;
- }
- };
- }
-
- promptOptions.value = validateCounterInput(promptOptions.value);
-
- const dataElement = promptCreateInput(promptOptions);
- dataElement.onkeypress = (event) => {
- if (Number.isNaN(Number.parseInt(event.key)) && event.key !== "Backspace" && event.key !== "Delete")
- return false;
- return true;
- }
-
- dataElement.style.width = "unset";
- dataElement.style["text-align"] = "center";
-
- parentElement.append(createMinusButton(dataElement));
- parentElement.append(dataElement);
- parentElement.append(createPlusButton(dataElement));
-
- return dataElement;
+ if (promptOptions.counterOptions?.multiFire) {
+ document.onmouseup = () => {
+ if (nextTimeoutID) {
+ clearTimeout(nextTimeoutID);
+ nextTimeoutID = null;
+ }
+ };
+ }
+
+ promptOptions.value = validateCounterInput(promptOptions.value);
+
+ const dataElement = promptCreateInput(promptOptions);
+ dataElement.onkeypress = (event) => {
+ if (
+ Number.isNaN(Number.parseInt(event.key)) &&
+ event.key !== 'Backspace' &&
+ event.key !== 'Delete'
+ )
+ return false;
+ return true;
+ };
+
+ dataElement.style.width = 'unset';
+ dataElement.style['text-align'] = 'center';
+
+ parentElement.append(createMinusButton(dataElement));
+ parentElement.append(dataElement);
+ parentElement.append(createPlusButton(dataElement));
+
+ return dataElement;
}
let nextTimeoutID = null;
@@ -295,95 +318,102 @@ let nextTimeoutID = null;
* steps starts to increase when speed is too fast to notice
* @param {int} counter used internally to decrease timer.limit
*/
-function multiFire(callback, timer = { time: 300, scaleSpeed: 100, limit: 100 }, stepsArg = 1, counter = 0) {
- callback(stepsArg);
-
- const nextTimeout = timer.time;
-
- if (counter > 20) {
- counter = 0 - stepsArg;
- if (timer.limit > 1) {
- timer.limit /= 2;
- } else {
- stepsArg *= 2;
- }
- }
-
- if (timer.time !== timer.limit) {
- timer.time = Math.max(timer.time - timer.scaleSpeed, timer.limit)
- }
-
- nextTimeoutID = setTimeout(
- multiFire, //callback
- nextTimeout, //timer
- //multiFire args:
- callback,
- timer,
- stepsArg,
- counter + 1
- );
+function multiFire(
+ callback,
+ timer = { time: 300, scaleSpeed: 100, limit: 100 },
+ stepsArg = 1,
+ counter = 0,
+) {
+ callback(stepsArg);
+
+ const nextTimeout = timer.time;
+
+ if (counter > 20) {
+ counter = 0 - stepsArg;
+ if (timer.limit > 1) {
+ timer.limit /= 2;
+ } else {
+ stepsArg *= 2;
+ }
+ }
+
+ if (timer.time !== timer.limit) {
+ timer.time = Math.max(timer.time - timer.scaleSpeed, timer.limit);
+ }
+
+ nextTimeoutID = setTimeout(
+ multiFire, //callback
+ nextTimeout, //timer
+ //multiFire args:
+ callback,
+ timer,
+ stepsArg,
+ counter + 1,
+ );
}
function createMinusButton(dataElement) {
- function doMinus(steps) {
- dataElement.value = validateCounterInput(Number.parseInt(dataElement.value) - steps);
- }
-
- const minusBtn = document.createElement("span");
- minusBtn.textContent = "-";
- minusBtn.classList.add("minus");
-
- if (promptOptions.counterOptions?.multiFire) {
- minusBtn.onmousedown = () => {
- multiFire(doMinus);
- };
- } else {
- minusBtn.onmousedown = () => {
- doMinus();
- };
- }
-
- return minusBtn;
+ function doMinus(steps) {
+ dataElement.value = validateCounterInput(
+ Number.parseInt(dataElement.value) - steps,
+ );
+ }
+
+ const minusBtn = document.createElement('span');
+ minusBtn.textContent = '-';
+ minusBtn.classList.add('minus');
+
+ if (promptOptions.counterOptions?.multiFire) {
+ minusBtn.onmousedown = () => {
+ multiFire(doMinus);
+ };
+ } else {
+ minusBtn.onmousedown = () => {
+ doMinus();
+ };
+ }
+
+ return minusBtn;
}
function createPlusButton(dataElement) {
- function doPlus(steps) {
- dataElement.value = validateCounterInput(parseInt(dataElement.value) + steps);
- }
-
- const plusBtn = document.createElement("span");
- plusBtn.textContent = "+";
- plusBtn.classList.add("plus");
-
- if (promptOptions.counterOptions?.multiFire) {
- plusBtn.onmousedown = () => {
- multiFire(doPlus);
- };
- } else {
- plusBtn.onmousedown = () => {
- doPlus();
- };
- }
-
- return plusBtn;
+ function doPlus(steps) {
+ dataElement.value = validateCounterInput(
+ parseInt(dataElement.value) + steps,
+ );
+ }
+
+ const plusBtn = document.createElement('span');
+ plusBtn.textContent = '+';
+ plusBtn.classList.add('plus');
+
+ if (promptOptions.counterOptions?.multiFire) {
+ plusBtn.onmousedown = () => {
+ multiFire(doPlus);
+ };
+ } else {
+ plusBtn.onmousedown = () => {
+ doPlus();
+ };
+ }
+
+ return plusBtn;
}
//validate counter
function validateCounterInput(input) {
-
- const min = promptOptions.counterOptions?.minimum;
- const max = promptOptions.counterOptions?.maximum;
- //note that !min/max would proc if min/max are 0
- if (min !== null && min !== undefined && input < min) {
- return min;
- }
-
- if (max !== null && max !== undefined && input > max) {
- return max;
- }
-
- return input;
+ const min = promptOptions.counterOptions?.minimum;
+ const max = promptOptions.counterOptions?.maximum;
+ //note that !min/max would proc if min/max are 0
+ if (min !== null && min !== undefined && input < min) {
+ return min;
+ }
+
+ if (max !== null && max !== undefined && input > max) {
+ return max;
+ }
+
+ return input;
}
module.exports.promptError = promptError;
-
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 0000000..301be6f
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,912 @@
+{
+ "name": "custom-electron-prompt",
+ "version": "1.5.2",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "custom-electron-prompt",
+ "version": "1.5.2",
+ "license": "MIT",
+ "devDependencies": {
+ "rome": "^11.0.0"
+ },
+ "peerDependencies": {
+ "electron": ">=10.0.0"
+ }
+ },
+ "node_modules/@electron/get": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/@electron/get/-/get-2.0.2.tgz",
+ "integrity": "sha512-eFZVFoRXb3GFGd7Ak7W4+6jBl9wBtiZ4AaYOse97ej6mKj5tkyO0dUnUChs1IhJZtx1BENo4/p4WUTXpi6vT+g==",
+ "peer": true,
+ "dependencies": {
+ "debug": "^4.1.1",
+ "env-paths": "^2.2.0",
+ "fs-extra": "^8.1.0",
+ "got": "^11.8.5",
+ "progress": "^2.0.3",
+ "semver": "^6.2.0",
+ "sumchecker": "^3.0.1"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "optionalDependencies": {
+ "global-agent": "^3.0.0"
+ }
+ },
+ "node_modules/@rometools/cli-darwin-arm64": {
+ "version": "11.0.0",
+ "resolved": "https://registry.npmjs.org/@rometools/cli-darwin-arm64/-/cli-darwin-arm64-11.0.0.tgz",
+ "integrity": "sha512-F3vkdY+s3FLIEnAjSbyHTuIPB88cLpccimW4ecid5I7S6GzGG3iUJI4xT00JhH73K4P/qW20/9r+kH1T9Du8Xg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@rometools/cli-darwin-x64": {
+ "version": "11.0.0",
+ "resolved": "https://registry.npmjs.org/@rometools/cli-darwin-x64/-/cli-darwin-x64-11.0.0.tgz",
+ "integrity": "sha512-X6jhtS6Iml4GOzgNtnLwIp/KXXhSdqeVyfv69m/AHnIzx3gQAjPZ7BPnJLvTCbhe4SKHL+uTZYFSCJpkUUKE6w==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@rometools/cli-linux-arm64": {
+ "version": "11.0.0",
+ "resolved": "https://registry.npmjs.org/@rometools/cli-linux-arm64/-/cli-linux-arm64-11.0.0.tgz",
+ "integrity": "sha512-dktTJJlTpmycBZ2TwhJBcAO8ztK8DdevdyZnFFxdYRvtmJgTjIsC2UFayf/SbKew8B8q1IhI0it+D6ihAeIpeg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rometools/cli-linux-x64": {
+ "version": "11.0.0",
+ "resolved": "https://registry.npmjs.org/@rometools/cli-linux-x64/-/cli-linux-x64-11.0.0.tgz",
+ "integrity": "sha512-WVcnXPNdWGUWo0p4NU8YzuthjYR7q+b4vRcjdxtP1DlpphZmSsoC/RSE85nEqRAz8hChcKUansVzOPM8BSsuGA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rometools/cli-win32-arm64": {
+ "version": "11.0.0",
+ "resolved": "https://registry.npmjs.org/@rometools/cli-win32-arm64/-/cli-win32-arm64-11.0.0.tgz",
+ "integrity": "sha512-tPj6RThQzS7Q45jqQll7NlTYvNcsg/BEP3LYiiazqSh9FAFnMkrV6ewUcMPKWyAfiyLs7jlz4rRvdNRUSygzfQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@rometools/cli-win32-x64": {
+ "version": "11.0.0",
+ "resolved": "https://registry.npmjs.org/@rometools/cli-win32-x64/-/cli-win32-x64-11.0.0.tgz",
+ "integrity": "sha512-bmBai8WHxYjsGk1+je7ZTfCUCWq30WJI3pQM8pzTA674lfGTZ9ymJoZwTaIMSO4rL5V9mlO6uLunsBKso9VqOg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@sindresorhus/is": {
+ "version": "4.6.0",
+ "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz",
+ "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==",
+ "peer": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sindresorhus/is?sponsor=1"
+ }
+ },
+ "node_modules/@szmarczak/http-timer": {
+ "version": "4.0.6",
+ "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz",
+ "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==",
+ "peer": true,
+ "dependencies": {
+ "defer-to-connect": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@types/cacheable-request": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz",
+ "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==",
+ "peer": true,
+ "dependencies": {
+ "@types/http-cache-semantics": "*",
+ "@types/keyv": "^3.1.4",
+ "@types/node": "*",
+ "@types/responselike": "^1.0.0"
+ }
+ },
+ "node_modules/@types/http-cache-semantics": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz",
+ "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==",
+ "peer": true
+ },
+ "node_modules/@types/keyv": {
+ "version": "3.1.4",
+ "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz",
+ "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==",
+ "peer": true,
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/node": {
+ "version": "16.18.14",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.14.tgz",
+ "integrity": "sha512-wvzClDGQXOCVNU4APPopC2KtMYukaF1MN/W3xAmslx22Z4/IF1/izDMekuyoUlwfnDHYCIZGaj7jMwnJKBTxKw==",
+ "peer": true
+ },
+ "node_modules/@types/responselike": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz",
+ "integrity": "sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==",
+ "peer": true,
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/yauzl": {
+ "version": "2.10.0",
+ "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz",
+ "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==",
+ "optional": true,
+ "peer": true,
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/boolean": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/boolean/-/boolean-3.2.0.tgz",
+ "integrity": "sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==",
+ "optional": true,
+ "peer": true
+ },
+ "node_modules/buffer-crc32": {
+ "version": "0.2.13",
+ "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
+ "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==",
+ "peer": true,
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/cacheable-lookup": {
+ "version": "5.0.4",
+ "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz",
+ "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==",
+ "peer": true,
+ "engines": {
+ "node": ">=10.6.0"
+ }
+ },
+ "node_modules/cacheable-request": {
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz",
+ "integrity": "sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==",
+ "peer": true,
+ "dependencies": {
+ "clone-response": "^1.0.2",
+ "get-stream": "^5.1.0",
+ "http-cache-semantics": "^4.0.0",
+ "keyv": "^4.0.0",
+ "lowercase-keys": "^2.0.0",
+ "normalize-url": "^6.0.1",
+ "responselike": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/clone-response": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz",
+ "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==",
+ "peer": true,
+ "dependencies": {
+ "mimic-response": "^1.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/debug": {
+ "version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "peer": true,
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/decompress-response": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz",
+ "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",
+ "peer": true,
+ "dependencies": {
+ "mimic-response": "^3.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/decompress-response/node_modules/mimic-response": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz",
+ "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==",
+ "peer": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/defer-to-connect": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz",
+ "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==",
+ "peer": true,
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/define-properties": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz",
+ "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==",
+ "optional": true,
+ "peer": true,
+ "dependencies": {
+ "has-property-descriptors": "^1.0.0",
+ "object-keys": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/detect-node": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz",
+ "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==",
+ "optional": true,
+ "peer": true
+ },
+ "node_modules/electron": {
+ "version": "23.1.3",
+ "resolved": "https://registry.npmjs.org/electron/-/electron-23.1.3.tgz",
+ "integrity": "sha512-MNjuUS2K6/OxlJ0zTC77djo1R3xM038v1kUunvNFgDMZHYKpSOzOMNsPiwM2BGp+uZbkUb0nTnYafxXrM8H16w==",
+ "hasInstallScript": true,
+ "peer": true,
+ "dependencies": {
+ "@electron/get": "^2.0.0",
+ "@types/node": "^16.11.26",
+ "extract-zip": "^2.0.1"
+ },
+ "bin": {
+ "electron": "cli.js"
+ },
+ "engines": {
+ "node": ">= 12.20.55"
+ }
+ },
+ "node_modules/end-of-stream": {
+ "version": "1.4.4",
+ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
+ "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
+ "peer": true,
+ "dependencies": {
+ "once": "^1.4.0"
+ }
+ },
+ "node_modules/env-paths": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz",
+ "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==",
+ "peer": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/es6-error": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz",
+ "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==",
+ "optional": true,
+ "peer": true
+ },
+ "node_modules/escape-string-regexp": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
+ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
+ "optional": true,
+ "peer": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/extract-zip": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz",
+ "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==",
+ "peer": true,
+ "dependencies": {
+ "debug": "^4.1.1",
+ "get-stream": "^5.1.0",
+ "yauzl": "^2.10.0"
+ },
+ "bin": {
+ "extract-zip": "cli.js"
+ },
+ "engines": {
+ "node": ">= 10.17.0"
+ },
+ "optionalDependencies": {
+ "@types/yauzl": "^2.9.1"
+ }
+ },
+ "node_modules/fd-slicer": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
+ "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==",
+ "peer": true,
+ "dependencies": {
+ "pend": "~1.2.0"
+ }
+ },
+ "node_modules/fs-extra": {
+ "version": "8.1.0",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
+ "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
+ "peer": true,
+ "dependencies": {
+ "graceful-fs": "^4.2.0",
+ "jsonfile": "^4.0.0",
+ "universalify": "^0.1.0"
+ },
+ "engines": {
+ "node": ">=6 <7 || >=8"
+ }
+ },
+ "node_modules/function-bind": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
+ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
+ "optional": true,
+ "peer": true
+ },
+ "node_modules/get-intrinsic": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz",
+ "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==",
+ "optional": true,
+ "peer": true,
+ "dependencies": {
+ "function-bind": "^1.1.1",
+ "has": "^1.0.3",
+ "has-symbols": "^1.0.3"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/get-stream": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
+ "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==",
+ "peer": true,
+ "dependencies": {
+ "pump": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/global-agent": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/global-agent/-/global-agent-3.0.0.tgz",
+ "integrity": "sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==",
+ "optional": true,
+ "peer": true,
+ "dependencies": {
+ "boolean": "^3.0.1",
+ "es6-error": "^4.1.1",
+ "matcher": "^3.0.0",
+ "roarr": "^2.15.3",
+ "semver": "^7.3.2",
+ "serialize-error": "^7.0.1"
+ },
+ "engines": {
+ "node": ">=10.0"
+ }
+ },
+ "node_modules/global-agent/node_modules/semver": {
+ "version": "7.3.8",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
+ "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
+ "optional": true,
+ "peer": true,
+ "dependencies": {
+ "lru-cache": "^6.0.0"
+ },
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/globalthis": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz",
+ "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==",
+ "optional": true,
+ "peer": true,
+ "dependencies": {
+ "define-properties": "^1.1.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/got": {
+ "version": "11.8.6",
+ "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz",
+ "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==",
+ "peer": true,
+ "dependencies": {
+ "@sindresorhus/is": "^4.0.0",
+ "@szmarczak/http-timer": "^4.0.5",
+ "@types/cacheable-request": "^6.0.1",
+ "@types/responselike": "^1.0.0",
+ "cacheable-lookup": "^5.0.3",
+ "cacheable-request": "^7.0.2",
+ "decompress-response": "^6.0.0",
+ "http2-wrapper": "^1.0.0-beta.5.2",
+ "lowercase-keys": "^2.0.0",
+ "p-cancelable": "^2.0.0",
+ "responselike": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10.19.0"
+ },
+ "funding": {
+ "url": "https://github.com/sindresorhus/got?sponsor=1"
+ }
+ },
+ "node_modules/graceful-fs": {
+ "version": "4.2.10",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
+ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==",
+ "peer": true
+ },
+ "node_modules/has": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
+ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
+ "optional": true,
+ "peer": true,
+ "dependencies": {
+ "function-bind": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4.0"
+ }
+ },
+ "node_modules/has-property-descriptors": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz",
+ "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==",
+ "optional": true,
+ "peer": true,
+ "dependencies": {
+ "get-intrinsic": "^1.1.1"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-symbols": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
+ "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
+ "optional": true,
+ "peer": true,
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/http-cache-semantics": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz",
+ "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==",
+ "peer": true
+ },
+ "node_modules/http2-wrapper": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz",
+ "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==",
+ "peer": true,
+ "dependencies": {
+ "quick-lru": "^5.1.1",
+ "resolve-alpn": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=10.19.0"
+ }
+ },
+ "node_modules/json-buffer": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
+ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",
+ "peer": true
+ },
+ "node_modules/json-stringify-safe": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
+ "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==",
+ "optional": true,
+ "peer": true
+ },
+ "node_modules/jsonfile": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
+ "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==",
+ "peer": true,
+ "optionalDependencies": {
+ "graceful-fs": "^4.1.6"
+ }
+ },
+ "node_modules/keyv": {
+ "version": "4.5.2",
+ "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.2.tgz",
+ "integrity": "sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g==",
+ "peer": true,
+ "dependencies": {
+ "json-buffer": "3.0.1"
+ }
+ },
+ "node_modules/lowercase-keys": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz",
+ "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==",
+ "peer": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "optional": true,
+ "peer": true,
+ "dependencies": {
+ "yallist": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/matcher": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz",
+ "integrity": "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==",
+ "optional": true,
+ "peer": true,
+ "dependencies": {
+ "escape-string-regexp": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/mimic-response": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz",
+ "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==",
+ "peer": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "peer": true
+ },
+ "node_modules/normalize-url": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz",
+ "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==",
+ "peer": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/object-keys": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
+ "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
+ "optional": true,
+ "peer": true,
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
+ "peer": true,
+ "dependencies": {
+ "wrappy": "1"
+ }
+ },
+ "node_modules/p-cancelable": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz",
+ "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==",
+ "peer": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/pend": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
+ "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==",
+ "peer": true
+ },
+ "node_modules/progress": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
+ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
+ "peer": true,
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/pump": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
+ "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
+ "peer": true,
+ "dependencies": {
+ "end-of-stream": "^1.1.0",
+ "once": "^1.3.1"
+ }
+ },
+ "node_modules/quick-lru": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz",
+ "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==",
+ "peer": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/resolve-alpn": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz",
+ "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==",
+ "peer": true
+ },
+ "node_modules/responselike": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz",
+ "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==",
+ "peer": true,
+ "dependencies": {
+ "lowercase-keys": "^2.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/roarr": {
+ "version": "2.15.4",
+ "resolved": "https://registry.npmjs.org/roarr/-/roarr-2.15.4.tgz",
+ "integrity": "sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==",
+ "optional": true,
+ "peer": true,
+ "dependencies": {
+ "boolean": "^3.0.1",
+ "detect-node": "^2.0.4",
+ "globalthis": "^1.0.1",
+ "json-stringify-safe": "^5.0.1",
+ "semver-compare": "^1.0.0",
+ "sprintf-js": "^1.1.2"
+ },
+ "engines": {
+ "node": ">=8.0"
+ }
+ },
+ "node_modules/rome": {
+ "version": "11.0.0",
+ "resolved": "https://registry.npmjs.org/rome/-/rome-11.0.0.tgz",
+ "integrity": "sha512-rRo6JOwpMLc3OkeTDRXkrmrDqnxDvZ75GS4f0jLDBNmRgDXWbu0F8eVnJoRn+VbK2AE7vWvhVOMBjnWowcopkQ==",
+ "dev": true,
+ "hasInstallScript": true,
+ "bin": {
+ "rome": "bin/rome"
+ },
+ "engines": {
+ "node": ">=14.*"
+ },
+ "optionalDependencies": {
+ "@rometools/cli-darwin-arm64": "11.0.0",
+ "@rometools/cli-darwin-x64": "11.0.0",
+ "@rometools/cli-linux-arm64": "11.0.0",
+ "@rometools/cli-linux-x64": "11.0.0",
+ "@rometools/cli-win32-arm64": "11.0.0",
+ "@rometools/cli-win32-x64": "11.0.0"
+ }
+ },
+ "node_modules/semver": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+ "peer": true,
+ "bin": {
+ "semver": "bin/semver.js"
+ }
+ },
+ "node_modules/semver-compare": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz",
+ "integrity": "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==",
+ "optional": true,
+ "peer": true
+ },
+ "node_modules/serialize-error": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-7.0.1.tgz",
+ "integrity": "sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==",
+ "optional": true,
+ "peer": true,
+ "dependencies": {
+ "type-fest": "^0.13.1"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/sprintf-js": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz",
+ "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==",
+ "optional": true,
+ "peer": true
+ },
+ "node_modules/sumchecker": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-3.0.1.tgz",
+ "integrity": "sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg==",
+ "peer": true,
+ "dependencies": {
+ "debug": "^4.1.0"
+ },
+ "engines": {
+ "node": ">= 8.0"
+ }
+ },
+ "node_modules/type-fest": {
+ "version": "0.13.1",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz",
+ "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==",
+ "optional": true,
+ "peer": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/universalify": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
+ "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
+ "peer": true,
+ "engines": {
+ "node": ">= 4.0.0"
+ }
+ },
+ "node_modules/wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
+ "peer": true
+ },
+ "node_modules/yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "optional": true,
+ "peer": true
+ },
+ "node_modules/yauzl": {
+ "version": "2.10.0",
+ "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
+ "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==",
+ "peer": true,
+ "dependencies": {
+ "buffer-crc32": "~0.2.3",
+ "fd-slicer": "~1.1.0"
+ }
+ }
+ }
+}
diff --git a/package.json b/package.json
index 5339457..3b35bab 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "custom-electron-prompt",
- "version": "1.5.1",
+ "version": "1.5.2",
"description": "Custom prompt for Electron made easy with various templates",
"homepage": "https://araxeus.github.io/custom-electron-prompt",
"keywords": [
@@ -22,12 +22,18 @@
"license": "MIT",
"main": "lib/index",
"scripts": {
- "release": "npm publish"
+ "release": "npm run ci && npm publish",
+ "ci": "rome ci .",
+ "lint": "rome lint . --write"
},
"files": [
"lib/"
],
"peerDependencies": {
"electron": ">=10.0.0"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "rome": "^11.0.0"
}
}
diff --git a/rome.json b/rome.json
new file mode 100644
index 0000000..737dc5c
--- /dev/null
+++ b/rome.json
@@ -0,0 +1,28 @@
+{
+ "files": {
+ "ignore": ["./example/*"]
+ },
+ "javascript": {
+ "formatter": {
+ "quoteStyle": "single"
+ }
+ },
+ "formatter": {
+ "enabled": true,
+ "indentStyle": "space",
+ "indentSize": 4
+ },
+ "linter": {
+ "enabled": true,
+ "rules": {
+ "recommended": true,
+ "correctness": {
+ "noUndeclaredVariables": "error",
+ "noUnusedVariables": "error"
+ },
+ "nursery": {
+ "recommended": true
+ }
+ }
+ }
+}
diff --git a/yarn.lock b/yarn.lock
new file mode 100644
index 0000000..5cce16f
--- /dev/null
+++ b/yarn.lock
@@ -0,0 +1,498 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+
+
+"@electron/get@^2.0.0":
+ version "2.0.2"
+ resolved "https://registry.npmjs.org/@electron/get/-/get-2.0.2.tgz"
+ integrity sha512-eFZVFoRXb3GFGd7Ak7W4+6jBl9wBtiZ4AaYOse97ej6mKj5tkyO0dUnUChs1IhJZtx1BENo4/p4WUTXpi6vT+g==
+ dependencies:
+ debug "^4.1.1"
+ env-paths "^2.2.0"
+ fs-extra "^8.1.0"
+ got "^11.8.5"
+ progress "^2.0.3"
+ semver "^6.2.0"
+ sumchecker "^3.0.1"
+ optionalDependencies:
+ global-agent "^3.0.0"
+
+"@rometools/cli-win32-x64@11.0.0":
+ version "11.0.0"
+ resolved "https://registry.npmjs.org/@rometools/cli-win32-x64/-/cli-win32-x64-11.0.0.tgz"
+ integrity sha512-bmBai8WHxYjsGk1+je7ZTfCUCWq30WJI3pQM8pzTA674lfGTZ9ymJoZwTaIMSO4rL5V9mlO6uLunsBKso9VqOg==
+
+"@sindresorhus/is@^4.0.0":
+ version "4.6.0"
+ resolved "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz"
+ integrity sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==
+
+"@szmarczak/http-timer@^4.0.5":
+ version "4.0.6"
+ resolved "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz"
+ integrity sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==
+ dependencies:
+ defer-to-connect "^2.0.0"
+
+"@types/cacheable-request@^6.0.1":
+ version "6.0.3"
+ resolved "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz"
+ integrity sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==
+ dependencies:
+ "@types/http-cache-semantics" "*"
+ "@types/keyv" "^3.1.4"
+ "@types/node" "*"
+ "@types/responselike" "^1.0.0"
+
+"@types/http-cache-semantics@*":
+ version "4.0.1"
+ resolved "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz"
+ integrity sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==
+
+"@types/keyv@^3.1.4":
+ version "3.1.4"
+ resolved "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz"
+ integrity sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==
+ dependencies:
+ "@types/node" "*"
+
+"@types/node@*", "@types/node@^16.11.26":
+ version "16.18.14"
+ resolved "https://registry.npmjs.org/@types/node/-/node-16.18.14.tgz"
+ integrity sha512-wvzClDGQXOCVNU4APPopC2KtMYukaF1MN/W3xAmslx22Z4/IF1/izDMekuyoUlwfnDHYCIZGaj7jMwnJKBTxKw==
+
+"@types/responselike@^1.0.0":
+ version "1.0.0"
+ resolved "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz"
+ integrity sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==
+ dependencies:
+ "@types/node" "*"
+
+"@types/yauzl@^2.9.1":
+ version "2.10.0"
+ resolved "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz"
+ integrity sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==
+ dependencies:
+ "@types/node" "*"
+
+boolean@^3.0.1:
+ version "3.2.0"
+ resolved "https://registry.npmjs.org/boolean/-/boolean-3.2.0.tgz"
+ integrity sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==
+
+buffer-crc32@~0.2.3:
+ version "0.2.13"
+ resolved "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz"
+ integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==
+
+cacheable-lookup@^5.0.3:
+ version "5.0.4"
+ resolved "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz"
+ integrity sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==
+
+cacheable-request@^7.0.2:
+ version "7.0.2"
+ resolved "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz"
+ integrity sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==
+ dependencies:
+ clone-response "^1.0.2"
+ get-stream "^5.1.0"
+ http-cache-semantics "^4.0.0"
+ keyv "^4.0.0"
+ lowercase-keys "^2.0.0"
+ normalize-url "^6.0.1"
+ responselike "^2.0.0"
+
+clone-response@^1.0.2:
+ version "1.0.3"
+ resolved "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz"
+ integrity sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==
+ dependencies:
+ mimic-response "^1.0.0"
+
+debug@^4.1.0, debug@^4.1.1:
+ version "4.3.4"
+ resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz"
+ integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
+ dependencies:
+ ms "2.1.2"
+
+decompress-response@^6.0.0:
+ version "6.0.0"
+ resolved "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz"
+ integrity sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==
+ dependencies:
+ mimic-response "^3.1.0"
+
+defer-to-connect@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz"
+ integrity sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==
+
+define-properties@^1.1.3:
+ version "1.2.0"
+ resolved "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz"
+ integrity sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==
+ dependencies:
+ has-property-descriptors "^1.0.0"
+ object-keys "^1.1.1"
+
+detect-node@^2.0.4:
+ version "2.1.0"
+ resolved "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz"
+ integrity sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==
+
+electron@>=10.0.0:
+ version "23.1.3"
+ resolved "https://registry.npmjs.org/electron/-/electron-23.1.3.tgz"
+ integrity sha512-MNjuUS2K6/OxlJ0zTC77djo1R3xM038v1kUunvNFgDMZHYKpSOzOMNsPiwM2BGp+uZbkUb0nTnYafxXrM8H16w==
+ dependencies:
+ "@electron/get" "^2.0.0"
+ "@types/node" "^16.11.26"
+ extract-zip "^2.0.1"
+
+end-of-stream@^1.1.0:
+ version "1.4.4"
+ resolved "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz"
+ integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==
+ dependencies:
+ once "^1.4.0"
+
+env-paths@^2.2.0:
+ version "2.2.1"
+ resolved "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz"
+ integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==
+
+es6-error@^4.1.1:
+ version "4.1.1"
+ resolved "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz"
+ integrity sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==
+
+escape-string-regexp@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz"
+ integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==
+
+extract-zip@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz"
+ integrity sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==
+ dependencies:
+ debug "^4.1.1"
+ get-stream "^5.1.0"
+ yauzl "^2.10.0"
+ optionalDependencies:
+ "@types/yauzl" "^2.9.1"
+
+fd-slicer@~1.1.0:
+ version "1.1.0"
+ resolved "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz"
+ integrity sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==
+ dependencies:
+ pend "~1.2.0"
+
+fs-extra@^8.1.0:
+ version "8.1.0"
+ resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz"
+ integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==
+ dependencies:
+ graceful-fs "^4.2.0"
+ jsonfile "^4.0.0"
+ universalify "^0.1.0"
+
+function-bind@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz"
+ integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==
+
+get-intrinsic@^1.1.1:
+ version "1.2.0"
+ resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz"
+ integrity sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==
+ dependencies:
+ function-bind "^1.1.1"
+ has "^1.0.3"
+ has-symbols "^1.0.3"
+
+get-stream@^5.1.0:
+ version "5.2.0"
+ resolved "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz"
+ integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==
+ dependencies:
+ pump "^3.0.0"
+
+global-agent@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.npmjs.org/global-agent/-/global-agent-3.0.0.tgz"
+ integrity sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==
+ dependencies:
+ boolean "^3.0.1"
+ es6-error "^4.1.1"
+ matcher "^3.0.0"
+ roarr "^2.15.3"
+ semver "^7.3.2"
+ serialize-error "^7.0.1"
+
+globalthis@^1.0.1:
+ version "1.0.3"
+ resolved "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz"
+ integrity sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==
+ dependencies:
+ define-properties "^1.1.3"
+
+got@^11.8.5:
+ version "11.8.6"
+ resolved "https://registry.npmjs.org/got/-/got-11.8.6.tgz"
+ integrity sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==
+ dependencies:
+ "@sindresorhus/is" "^4.0.0"
+ "@szmarczak/http-timer" "^4.0.5"
+ "@types/cacheable-request" "^6.0.1"
+ "@types/responselike" "^1.0.0"
+ cacheable-lookup "^5.0.3"
+ cacheable-request "^7.0.2"
+ decompress-response "^6.0.0"
+ http2-wrapper "^1.0.0-beta.5.2"
+ lowercase-keys "^2.0.0"
+ p-cancelable "^2.0.0"
+ responselike "^2.0.0"
+
+graceful-fs@^4.1.6, graceful-fs@^4.2.0:
+ version "4.2.10"
+ resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz"
+ integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==
+
+has-property-descriptors@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz"
+ integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==
+ dependencies:
+ get-intrinsic "^1.1.1"
+
+has-symbols@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz"
+ integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==
+
+has@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.npmjs.org/has/-/has-1.0.3.tgz"
+ integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==
+ dependencies:
+ function-bind "^1.1.1"
+
+http-cache-semantics@^4.0.0:
+ version "4.1.1"
+ resolved "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz"
+ integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==
+
+http2-wrapper@^1.0.0-beta.5.2:
+ version "1.0.3"
+ resolved "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz"
+ integrity sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==
+ dependencies:
+ quick-lru "^5.1.1"
+ resolve-alpn "^1.0.0"
+
+json-buffer@3.0.1:
+ version "3.0.1"
+ resolved "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz"
+ integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==
+
+json-stringify-safe@^5.0.1:
+ version "5.0.1"
+ resolved "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz"
+ integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==
+
+jsonfile@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz"
+ integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==
+ optionalDependencies:
+ graceful-fs "^4.1.6"
+
+keyv@^4.0.0:
+ version "4.5.2"
+ resolved "https://registry.npmjs.org/keyv/-/keyv-4.5.2.tgz"
+ integrity sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g==
+ dependencies:
+ json-buffer "3.0.1"
+
+lowercase-keys@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz"
+ integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==
+
+lru-cache@^6.0.0:
+ version "6.0.0"
+ resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz"
+ integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==
+ dependencies:
+ yallist "^4.0.0"
+
+matcher@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz"
+ integrity sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==
+ dependencies:
+ escape-string-regexp "^4.0.0"
+
+mimic-response@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz"
+ integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==
+
+mimic-response@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz"
+ integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==
+
+ms@2.1.2:
+ version "2.1.2"
+ resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz"
+ integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
+
+normalize-url@^6.0.1:
+ version "6.1.0"
+ resolved "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz"
+ integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==
+
+object-keys@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz"
+ integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==
+
+once@^1.3.1, once@^1.4.0:
+ version "1.4.0"
+ resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz"
+ integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==
+ dependencies:
+ wrappy "1"
+
+p-cancelable@^2.0.0:
+ version "2.1.1"
+ resolved "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz"
+ integrity sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==
+
+pend@~1.2.0:
+ version "1.2.0"
+ resolved "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz"
+ integrity sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==
+
+progress@^2.0.3:
+ version "2.0.3"
+ resolved "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz"
+ integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==
+
+pump@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz"
+ integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==
+ dependencies:
+ end-of-stream "^1.1.0"
+ once "^1.3.1"
+
+quick-lru@^5.1.1:
+ version "5.1.1"
+ resolved "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz"
+ integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==
+
+resolve-alpn@^1.0.0:
+ version "1.2.1"
+ resolved "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz"
+ integrity sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==
+
+responselike@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz"
+ integrity sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==
+ dependencies:
+ lowercase-keys "^2.0.0"
+
+roarr@^2.15.3:
+ version "2.15.4"
+ resolved "https://registry.npmjs.org/roarr/-/roarr-2.15.4.tgz"
+ integrity sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==
+ dependencies:
+ boolean "^3.0.1"
+ detect-node "^2.0.4"
+ globalthis "^1.0.1"
+ json-stringify-safe "^5.0.1"
+ semver-compare "^1.0.0"
+ sprintf-js "^1.1.2"
+
+rome@^11.0.0:
+ version "11.0.0"
+ resolved "https://registry.npmjs.org/rome/-/rome-11.0.0.tgz"
+ integrity sha512-rRo6JOwpMLc3OkeTDRXkrmrDqnxDvZ75GS4f0jLDBNmRgDXWbu0F8eVnJoRn+VbK2AE7vWvhVOMBjnWowcopkQ==
+ optionalDependencies:
+ "@rometools/cli-darwin-arm64" "11.0.0"
+ "@rometools/cli-darwin-x64" "11.0.0"
+ "@rometools/cli-linux-arm64" "11.0.0"
+ "@rometools/cli-linux-x64" "11.0.0"
+ "@rometools/cli-win32-arm64" "11.0.0"
+ "@rometools/cli-win32-x64" "11.0.0"
+
+semver-compare@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz"
+ integrity sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==
+
+semver@^6.2.0:
+ version "6.3.0"
+ resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz"
+ integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
+
+semver@^7.3.2:
+ version "7.3.8"
+ resolved "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz"
+ integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==
+ dependencies:
+ lru-cache "^6.0.0"
+
+serialize-error@^7.0.1:
+ version "7.0.1"
+ resolved "https://registry.npmjs.org/serialize-error/-/serialize-error-7.0.1.tgz"
+ integrity sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==
+ dependencies:
+ type-fest "^0.13.1"
+
+sprintf-js@^1.1.2:
+ version "1.1.2"
+ resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz"
+ integrity sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==
+
+sumchecker@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.npmjs.org/sumchecker/-/sumchecker-3.0.1.tgz"
+ integrity sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg==
+ dependencies:
+ debug "^4.1.0"
+
+type-fest@^0.13.1:
+ version "0.13.1"
+ resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz"
+ integrity sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==
+
+universalify@^0.1.0:
+ version "0.1.2"
+ resolved "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz"
+ integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==
+
+wrappy@1:
+ version "1.0.2"
+ resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz"
+ integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==
+
+yallist@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz"
+ integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
+
+yauzl@^2.10.0:
+ version "2.10.0"
+ resolved "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz"
+ integrity sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==
+ dependencies:
+ buffer-crc32 "~0.2.3"
+ fd-slicer "~1.1.0"