From 5453a6aa8732fb32e2dd7ef147af800f292e787f Mon Sep 17 00:00:00 2001 From: Grzegorz Godlewski Date: Tue, 14 Nov 2023 17:42:38 +0100 Subject: [PATCH] feat: updated deps and react templates --- .../js-node-esm/src/index.js | 4 +- data/project-templates/js-node/src/index.js | 6 +- data/project-templates/react-js/package.json | 2 +- data/project-templates/react-js/src/App.css | 36 ++++ data/project-templates/react-js/src/App.jsx | 2 + .../src/components/NodeVersionCheck.jsx | 50 +++++ .../src/components/NodeVersionCheckTask.jsx | 27 +++ data/project-templates/react-js/src/index.css | 2 + data/project-templates/react-ts/package.json | 4 +- data/project-templates/react-ts/src/App.css | 36 ++++ data/project-templates/react-ts/src/App.tsx | 2 + .../src/components/NodeVersionCheck.tsx | 50 +++++ .../src/components/NodeVersionCheckTask.tsx | 22 +++ .../ts-node-esm/src/index.ts | 4 +- data/project-templates/ts-node/src/index.ts | 4 +- .../ts-node/src/market-strategy.ts | 30 +++ package-lock.json | 171 +++++++++--------- package.json | 10 +- tsconfig.json | 2 +- 19 files changed, 360 insertions(+), 104 deletions(-) create mode 100644 data/project-templates/react-js/src/components/NodeVersionCheck.jsx create mode 100644 data/project-templates/react-js/src/components/NodeVersionCheckTask.jsx create mode 100644 data/project-templates/react-ts/src/components/NodeVersionCheck.tsx create mode 100644 data/project-templates/react-ts/src/components/NodeVersionCheckTask.tsx create mode 100644 data/project-templates/ts-node/src/market-strategy.ts diff --git a/data/project-templates/js-node-esm/src/index.js b/data/project-templates/js-node-esm/src/index.js index 56524a5..5b289b1 100644 --- a/data/project-templates/js-node-esm/src/index.js +++ b/data/project-templates/js-node-esm/src/index.js @@ -10,6 +10,8 @@ dotenv.config(); // How much you wish to spend budget: 0.5, + + // How do you want to select market proposals proposalFilter: ProposalFilters.limitPriceFilter({ start: 0.1, cpuPerSec: 0.1 / 3600, @@ -36,6 +38,6 @@ dotenv.config(); } catch (err) { console.error("Running the task on Golem failed due to", err); } finally { - await executor.end(); + await executor.shutdown(); } })(); diff --git a/data/project-templates/js-node/src/index.js b/data/project-templates/js-node/src/index.js index 1749dcd..785ce8f 100644 --- a/data/project-templates/js-node/src/index.js +++ b/data/project-templates/js-node/src/index.js @@ -1,5 +1,5 @@ const dotenv = require("dotenv"); -const { LogLevel, ProposalFilters, TaskExecutor } = require("@golem-sdk/golem-js"); +const { LogLevel, TaskExecutor, ProposalFilters } = require("@golem-sdk/golem-js"); dotenv.config(); @@ -10,6 +10,8 @@ dotenv.config(); // How much you wish to spend budget: 0.5, + + // How do you want to select market proposals proposalFilter: ProposalFilters.limitPriceFilter({ start: 0.1, cpuPerSec: 0.1 / 3600, @@ -36,6 +38,6 @@ dotenv.config(); } catch (err) { console.error("Running the task on Golem failed due to", err); } finally { - await executor.end(); + await executor.shutdown(); } })(); diff --git a/data/project-templates/react-js/package.json b/data/project-templates/react-js/package.json index c1c1832..44ae873 100644 --- a/data/project-templates/react-js/package.json +++ b/data/project-templates/react-js/package.json @@ -16,7 +16,7 @@ "react-dom": "^18.2.0" }, "devDependencies": { - "@types/react": "^18.2.41", + "@types/react": "^18.2.42", "@types/react-dom": "^18.2.17", "@vitejs/plugin-react": "^4.2.1", "eslint": "^8.55.0", diff --git a/data/project-templates/react-js/src/App.css b/data/project-templates/react-js/src/App.css index 3d28fa1..0bf7741 100644 --- a/data/project-templates/react-js/src/App.css +++ b/data/project-templates/react-js/src/App.css @@ -30,3 +30,39 @@ max-width: 32em; text-align: left; } + +.node-version-check-wrapper { + padding: 5px; +} + +.node-version-check-task { + padding: 5px; +} + +.node-version-check-task-status { + padding: 5px; + margin: 5px; + font-size: 1.9em; + background-color: #fafafa; + border-radius: 10px; +} + +.text-error { + color: red; +} + +.text-progress { + color: steelblue; +} + +.bg-progress { + background-color: steelblue; +} + +.text-success { + color: forestgreen; +} + +.bg-success { + background-color: forestgreen; +} diff --git a/data/project-templates/react-js/src/App.jsx b/data/project-templates/react-js/src/App.jsx index ff9325a..07c0c7e 100644 --- a/data/project-templates/react-js/src/App.jsx +++ b/data/project-templates/react-js/src/App.jsx @@ -3,6 +3,7 @@ import reactLogo from "./assets/react.svg"; import viteLogo from "./assets/vite.svg"; import "./App.css"; import { useYagna } from "@golem-sdk/react"; +import { NodeVersionCheck } from "./components/NodeVersionCheck.jsx"; function App() { const { isConnected } = useYagna(); @@ -37,6 +38,7 @@ function App() { {`yagna service run --api-allow-origin='${window.location.origin}'`}

)} +
{isConnected && }

Edit src/App.jsx and save to test HMR diff --git a/data/project-templates/react-js/src/components/NodeVersionCheck.jsx b/data/project-templates/react-js/src/components/NodeVersionCheck.jsx new file mode 100644 index 0000000..25396d1 --- /dev/null +++ b/data/project-templates/react-js/src/components/NodeVersionCheck.jsx @@ -0,0 +1,50 @@ +import { useExecutor } from "@golem-sdk/react"; +import { LogLevel, ProposalFilters } from "@golem-sdk/golem-js"; +import { NodeVersionCheckTask } from "./NodeVersionCheckTask.jsx"; + +export function NodeVersionCheck() { + const { executor, initialize, isInitialized, isInitializing, terminate, error } = useExecutor({ + // What do you want to run + package: "golem/node:20-alpine", + + // How much you wish to spend + budget: 0.5, + + // How do you want to select market proposals + proposalFilter: ProposalFilters.limitPriceFilter({ + start: 0.1, + cpuPerSec: 0.1 / 3600, + envPerSec: 0.1 / 3600, + }), + + // Where you want to spend + payment: { + network: "polygon", + }, + + // Control the execution of tasks + maxTaskRetries: 0, + + // Useful for debugging + logLevel: LogLevel.Info, + taskTimeout: 5 * 60 * 1000, + }); + + return ( +

+ {error &&
Error: {error.toString()}
} + {isInitialized && } + {isInitializing &&
Executor is initializing
} + {!isInitialized && ( + + )} + {isInitialized && ( + + )} +
+ ); +} diff --git a/data/project-templates/react-js/src/components/NodeVersionCheckTask.jsx b/data/project-templates/react-js/src/components/NodeVersionCheckTask.jsx new file mode 100644 index 0000000..d8eee36 --- /dev/null +++ b/data/project-templates/react-js/src/components/NodeVersionCheckTask.jsx @@ -0,0 +1,27 @@ +import { useTask } from "@golem-sdk/react"; +import PropTypes from "prop-types"; + +export function NodeVersionCheckTask({ executor }) { + const { isRunning, result, run, error } = useTask(executor); + + const getNodeVersionTask = async (ctx) => { + return (await ctx.run("node -v")).stdout?.toString() ?? "No version information"; + }; + + return ( +
+ +
+ {isRunning &&
Task is running...
} + {error &&
Task failed: {error.toString()}
} + {result &&
Task result: {result}
} +
+
+ ); +} + +NodeVersionCheckTask.propTypes = { + executor: PropTypes.object, +}; diff --git a/data/project-templates/react-js/src/index.css b/data/project-templates/react-js/src/index.css index bbbfbb9..d48c697 100644 --- a/data/project-templates/react-js/src/index.css +++ b/data/project-templates/react-js/src/index.css @@ -47,9 +47,11 @@ button { cursor: pointer; transition: border-color 0.25s; } + button:hover { border-color: #646cff; } + button:focus, button:focus-visible { outline: 4px auto -webkit-focus-ring-color; diff --git a/data/project-templates/react-ts/package.json b/data/project-templates/react-ts/package.json index 1533926..a5203e5 100644 --- a/data/project-templates/react-ts/package.json +++ b/data/project-templates/react-ts/package.json @@ -16,7 +16,7 @@ "react-dom": "^18.2.0" }, "devDependencies": { - "@types/react": "^18.2.41", + "@types/react": "^18.2.42", "@types/react-dom": "^18.2.17", "@typescript-eslint/eslint-plugin": "^6.13.2", "@typescript-eslint/parser": "^6.13.2", @@ -24,7 +24,7 @@ "eslint": "^8.55.0", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.5", - "typescript": "^5.3.2", + "typescript": "^5.3.3", "vite": "^4.5.1" } } diff --git a/data/project-templates/react-ts/src/App.css b/data/project-templates/react-ts/src/App.css index 3d28fa1..0bf7741 100644 --- a/data/project-templates/react-ts/src/App.css +++ b/data/project-templates/react-ts/src/App.css @@ -30,3 +30,39 @@ max-width: 32em; text-align: left; } + +.node-version-check-wrapper { + padding: 5px; +} + +.node-version-check-task { + padding: 5px; +} + +.node-version-check-task-status { + padding: 5px; + margin: 5px; + font-size: 1.9em; + background-color: #fafafa; + border-radius: 10px; +} + +.text-error { + color: red; +} + +.text-progress { + color: steelblue; +} + +.bg-progress { + background-color: steelblue; +} + +.text-success { + color: forestgreen; +} + +.bg-success { + background-color: forestgreen; +} diff --git a/data/project-templates/react-ts/src/App.tsx b/data/project-templates/react-ts/src/App.tsx index a6f2dbd..1dfd8d1 100644 --- a/data/project-templates/react-ts/src/App.tsx +++ b/data/project-templates/react-ts/src/App.tsx @@ -3,6 +3,7 @@ import reactLogo from "./assets/react.svg"; import viteLogo from "./assets/vite.svg"; import "./App.css"; import { useYagna } from "@golem-sdk/react"; +import { NodeVersionCheck } from "./components/NodeVersionCheck"; function App() { const { isConnected } = useYagna(); @@ -37,6 +38,7 @@ function App() { {`yagna service run --api-allow-origin='${window.location.origin}'`}

)} +
{isConnected && }

Edit src/App.tsx and save to test HMR diff --git a/data/project-templates/react-ts/src/components/NodeVersionCheck.tsx b/data/project-templates/react-ts/src/components/NodeVersionCheck.tsx new file mode 100644 index 0000000..b493c32 --- /dev/null +++ b/data/project-templates/react-ts/src/components/NodeVersionCheck.tsx @@ -0,0 +1,50 @@ +import { useExecutor } from "@golem-sdk/react"; +import { LogLevel, ProposalFilters } from "@golem-sdk/golem-js"; +import { NodeVersionCheckTask } from "./NodeVersionCheckTask"; + +export function NodeVersionCheck() { + const { executor, initialize, isInitialized, isInitializing, terminate, error } = useExecutor({ + // What do you want to run + package: "golem/node:20-alpine", + + // How much you wish to spend + budget: 0.5, + + // How do you want to select market proposals + proposalFilter: ProposalFilters.limitPriceFilter({ + start: 0.1, + cpuPerSec: 0.1 / 3600, + envPerSec: 0.1 / 3600, + }), + + // Where you want to spend + payment: { + network: "polygon", + }, + + // Control the execution of tasks + maxTaskRetries: 0, + + // Useful for debugging + logLevel: LogLevel.Info, + taskTimeout: 5 * 60 * 1000, + }); + + return ( +

+ {error &&
Error: {error.toString()}
} + {isInitialized && executor && } + {isInitializing &&
Executor is initializing
} + {!isInitialized && ( + + )} + {isInitialized && ( + + )} +
+ ); +} diff --git a/data/project-templates/react-ts/src/components/NodeVersionCheckTask.tsx b/data/project-templates/react-ts/src/components/NodeVersionCheckTask.tsx new file mode 100644 index 0000000..8201629 --- /dev/null +++ b/data/project-templates/react-ts/src/components/NodeVersionCheckTask.tsx @@ -0,0 +1,22 @@ +import { TaskExecutor, useTask, Worker } from "@golem-sdk/react"; + +export function NodeVersionCheckTask({ executor }: { executor: TaskExecutor }) { + const { isRunning, result, run, error } = useTask(executor); + + const getNodeVersionTask: Worker = async (ctx) => { + return (await ctx.run("node -v")).stdout?.toString() ?? "No version information"; + }; + + return ( +
+ +
+ {isRunning &&
Task is running...
} + {error &&
Task failed: {error.toString()}
} + {result &&
Task result: {result}
} +
+
+ ); +} diff --git a/data/project-templates/ts-node-esm/src/index.ts b/data/project-templates/ts-node-esm/src/index.ts index f0c3bf2..21d9c4c 100644 --- a/data/project-templates/ts-node-esm/src/index.ts +++ b/data/project-templates/ts-node-esm/src/index.ts @@ -10,6 +10,8 @@ dotenv.config(); // How much you wish to spend budget: 0.5, + + // How do you want to select market proposals proposalFilter: ProposalFilters.limitPriceFilter({ start: 0.1, cpuPerSec: 0.1 / 3600, @@ -36,6 +38,6 @@ dotenv.config(); } catch (err) { console.error("Running the task on Golem failed due to", err); } finally { - await executor.end(); + await executor.shutdown(); } })(); diff --git a/data/project-templates/ts-node/src/index.ts b/data/project-templates/ts-node/src/index.ts index f0c3bf2..21d9c4c 100644 --- a/data/project-templates/ts-node/src/index.ts +++ b/data/project-templates/ts-node/src/index.ts @@ -10,6 +10,8 @@ dotenv.config(); // How much you wish to spend budget: 0.5, + + // How do you want to select market proposals proposalFilter: ProposalFilters.limitPriceFilter({ start: 0.1, cpuPerSec: 0.1 / 3600, @@ -36,6 +38,6 @@ dotenv.config(); } catch (err) { console.error("Running the task on Golem failed due to", err); } finally { - await executor.end(); + await executor.shutdown(); } })(); diff --git a/data/project-templates/ts-node/src/market-strategy.ts b/data/project-templates/ts-node/src/market-strategy.ts new file mode 100644 index 0000000..decfa54 --- /dev/null +++ b/data/project-templates/ts-node/src/market-strategy.ts @@ -0,0 +1,30 @@ +import { MarketHelpers, ProposalFilter, ProposalFilters } from "@golem-sdk/golem-js"; +import { MarketOptions } from "@golem-sdk/golem-js/dist/market/service"; + +/** + * Helper function wrapping the logic of creating a custom market strategy for the TaskExecutor + * + * Feel free to adjust the contents of this method to reflect your needs. The default implementation + * contains some recommended steps and checks. + */ +export default async function buildMarketStrategy(): Promise> { + const reliableProviders = await MarketHelpers.getHealthyProvidersWhiteList(); + + const filterByReliable = ProposalFilters.whiteListProposalIdsFilter(reliableProviders); + + const filterByPrice = ProposalFilters.limitPriceFilter({ + start: 0.1, + cpuPerSec: 0.1 / 3600, + envPerSec: 0.1 / 3600, + }); + + const proposalFilter: ProposalFilter = async (proposal) => { + const [isReliable, isWithinPriceRange] = await Promise.all([filterByReliable(proposal), filterByPrice(proposal)]); + + return isReliable && isWithinPriceRange; + }; + + return { + proposalFilter, + }; +} diff --git a/package-lock.json b/package-lock.json index d66f935..9193cad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "new-find-package-json": "^2.0.0", "pretty-ms": "^8.0.0", "shell-quote": "^1.8.1", - "typescript": "^5.3.2" + "typescript": "^5.3.3" }, "bin": { "golem-sdk": "dist/main.js" @@ -31,10 +31,10 @@ "@commitlint/cli": "^18.4.3", "@commitlint/config-conventional": "^18.4.3", "@tsconfig/node18": "^18.2.2", - "@types/jest": "^29.5.10", + "@types/jest": "^29.5.11", "@types/lodash": "^4.14.202", - "@types/luxon": "^3.3.6", - "@types/node": "^20.10.3", + "@types/luxon": "^3.3.7", + "@types/node": "^20.10.4", "@types/node-fetch": "^2.6.9", "@types/shell-quote": "^1.7.5", "@typescript-eslint/eslint-plugin": "^6.13.2", @@ -44,13 +44,14 @@ "husky": "^8.0.3", "jest": "^29.7.0", "prettier": "^3.1.0", - "semantic-release": "^22.0.8" + "semantic-release": "^22.0.10" }, "engines": { "node": ">=18.0.0" } }, "data/project-templates/js-node": { + "name": "js-node-golem-app", "version": "1.0.0", "license": "ISC", "dependencies": { @@ -62,6 +63,7 @@ } }, "data/project-templates/js-node-esm": { + "name": "js-node-esm-golem-app", "version": "1.0.0", "license": "ISC", "dependencies": { @@ -73,6 +75,7 @@ } }, "data/project-templates/react-js": { + "name": "react-js-golem-app", "version": "0.0.0", "dependencies": { "@golem-sdk/golem-js": "^1.0.1", @@ -81,7 +84,7 @@ "react-dom": "^18.2.0" }, "devDependencies": { - "@types/react": "^18.2.41", + "@types/react": "^18.2.42", "@types/react-dom": "^18.2.17", "@vitejs/plugin-react": "^4.2.1", "eslint": "^8.55.0", @@ -92,6 +95,7 @@ } }, "data/project-templates/react-ts": { + "name": "react-ts-golem-app", "version": "0.0.0", "dependencies": { "@golem-sdk/golem-js": "^1.0.1", @@ -100,7 +104,7 @@ "react-dom": "^18.2.0" }, "devDependencies": { - "@types/react": "^18.2.41", + "@types/react": "^18.2.42", "@types/react-dom": "^18.2.17", "@typescript-eslint/eslint-plugin": "^6.13.2", "@typescript-eslint/parser": "^6.13.2", @@ -108,11 +112,12 @@ "eslint": "^8.55.0", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.5", - "typescript": "^5.3.2", + "typescript": "^5.3.3", "vite": "^4.5.1" } }, "data/project-templates/ts-node": { + "name": "ts-node-golem-app", "version": "1.0.0", "license": "ISC", "dependencies": { @@ -124,6 +129,7 @@ } }, "data/project-templates/ts-node-esm": { + "name": "ts-node-esm-golem-app", "version": "1.0.0", "license": "ISC", "dependencies": { @@ -985,9 +991,9 @@ } }, "node_modules/@commitlint/load/node_modules/@types/node": { - "version": "18.19.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.2.tgz", - "integrity": "sha512-6wzfBdbWpe8QykUkXBjtmO3zITA0A3FIjoy+in0Y2K4KrCiRhNYJIdwAPDffZ3G6GnaKaSLSEa9ZuORLfEoiwg==", + "version": "18.19.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.3.tgz", + "integrity": "sha512-k5fggr14DwAytoA/t8rPrIz++lXK7/DqckthCmoZOKNsEbJkId4Z//BqgApXBUGrGddrigYa1oqheo/7YmW4rg==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -2165,12 +2171,12 @@ "dev": true }, "node_modules/@octokit/plugin-paginate-rest": { - "version": "9.1.4", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.1.4.tgz", - "integrity": "sha512-MvZx4WvfhBnt7PtH5XE7HORsO7bBk4er1FgRIUr1qJ89NR2I6bWjGyKsxk8z42FPQ34hFQm0Baanh4gzdZR4gQ==", + "version": "9.1.5", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.1.5.tgz", + "integrity": "sha512-WKTQXxK+bu49qzwv4qKbMMRXej1DU2gq017euWyKVudA6MldaSSQuxtz+vGbhxV4CjxpUxjZu6rM2wfc1FiWVg==", "dev": true, "dependencies": { - "@octokit/types": "^12.3.0" + "@octokit/types": "^12.4.0" }, "engines": { "node": ">= 18" @@ -2322,9 +2328,9 @@ } }, "node_modules/@semantic-release/github": { - "version": "9.2.4", - "resolved": "https://registry.npmjs.org/@semantic-release/github/-/github-9.2.4.tgz", - "integrity": "sha512-VMzqiuSLhHc0/1Q8M/FmWnOaclh5aXL2pQWceldWBYSWLNzQu8GOR4bkGl57ciUtvm+MCMi4FaStZxSDJGEfUg==", + "version": "9.2.5", + "resolved": "https://registry.npmjs.org/@semantic-release/github/-/github-9.2.5.tgz", + "integrity": "sha512-XWumFEOHiWllekymZjeVgkQCJ4YnD8020ZspAHYIIBNX8O4d/1ldeU5iNXu6NGkKlOCokyXh13KwVP0UEMm5kw==", "dev": true, "dependencies": { "@octokit/core": "^5.0.0", @@ -2396,9 +2402,9 @@ } }, "node_modules/@semantic-release/npm": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/@semantic-release/npm/-/npm-11.0.1.tgz", - "integrity": "sha512-nFcT0pgVwpXsPkzjqP3ObH+pILeN1AbYscCDuYwgZEPZukL+RsGhrtdT4HA1Gjb/y1bVbE90JNtMIcgRi5z/Fg==", + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/@semantic-release/npm/-/npm-11.0.2.tgz", + "integrity": "sha512-owtf3RjyPvRE63iUKZ5/xO4uqjRpVQDUB9+nnXj0xwfIeM9pRl+cG+zGDzdftR4m3f2s4Wyf3SexW+kF5DFtWA==", "dev": true, "dependencies": { "@semantic-release/error": "^4.0.0", @@ -2721,9 +2727,9 @@ } }, "node_modules/@types/jest": { - "version": "29.5.10", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.10.tgz", - "integrity": "sha512-tE4yxKEphEyxj9s4inideLHktW/x6DwesIwWZ9NN1FKf9zbJYsnhBoA9vrHA/IuIOKwPa5PcFBNV4lpMIOEzyQ==", + "version": "29.5.11", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.11.tgz", + "integrity": "sha512-S2mHmYIVe13vrm6q4kN6fLYYAka15ALQki/vgDC3mIukEOx8WJlv0kQPM+d4w8Gp6u0uSdKND04IlTXBv0rwnQ==", "dev": true, "dependencies": { "expect": "^29.0.0", @@ -2743,9 +2749,9 @@ "dev": true }, "node_modules/@types/luxon": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/@types/luxon/-/luxon-3.3.6.tgz", - "integrity": "sha512-LblarKeI26YsMLxHDIQ0295wPSLjkl98eNwDcVhz3zbo1H+kfnkzR01H5Ai5LBzSeddX0ZJSpGwKEZihGb5diw==", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/@types/luxon/-/luxon-3.3.7.tgz", + "integrity": "sha512-gKc9P2d4g5uYwmy4s/MO/yOVPmvHyvzka1YH6i5dM03UrFofHSmgc0D0ymbDRStFWHusk6cwwF6nhLm/ckBbbQ==", "dev": true }, "node_modules/@types/minimist": { @@ -2755,9 +2761,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.10.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.3.tgz", - "integrity": "sha512-XJavIpZqiXID5Yxnxv3RUDKTN5b81ddNC3ecsA0SoFXz/QU8OGBwZGMomiq0zw+uuqbL/krztv/DINAQ/EV4gg==", + "version": "20.10.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.4.tgz", + "integrity": "sha512-D08YG6rr8X90YB56tSIuBaddy/UXAA9RKJoFvrsnogAum/0pmjkgi4+2nx96A330FmioegBWmEYQ+syqCFaveg==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -2786,9 +2792,9 @@ "dev": true }, "node_modules/@types/react": { - "version": "18.2.41", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.41.tgz", - "integrity": "sha512-CwOGr/PiLiNBxEBqpJ7fO3kocP/2SSuC9fpH5K7tusrg4xPSRT/193rzolYwQnTN02We/ATXKnb6GqA5w4fRxw==", + "version": "18.2.42", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.42.tgz", + "integrity": "sha512-c1zEr96MjakLYus/wPnuWDo1/zErfdU9rNsIGmE+NV71nx88FG9Ttgo5dqorXTu/LImX2f63WBP986gJkMPNbA==", "dev": true, "dependencies": { "@types/prop-types": "*", @@ -4116,9 +4122,9 @@ } }, "node_modules/csstype": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz", - "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", "dev": true }, "node_modules/dargs": { @@ -4376,9 +4382,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.602", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.602.tgz", - "integrity": "sha512-TZdkh+47iRPDtFH9+vuOU7uaZftA7PBDQkk+Tny/gLrYgflyooAk/bHvmK7MSTvQoPKLvy702PC4RiS/6Ffdxw==", + "version": "1.4.608", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.608.tgz", + "integrity": "sha512-J2f/3iIIm3Mo0npneITZ2UPe4B1bg8fTNrFjD8715F/k1BvbviRuqYGkET1PgprrczXYTHFvotbBOmUp6KE0uA==", "dev": true }, "node_modules/emittery": { @@ -8200,9 +8206,9 @@ } }, "node_modules/npm": { - "version": "10.2.4", - "resolved": "https://registry.npmjs.org/npm/-/npm-10.2.4.tgz", - "integrity": "sha512-umEuYneVEYO9KoEEI8n2sSGmNQeqco/3BSeacRlqIkCzw4E7XGtYSWMeJobxzr6hZ2n9cM+u5TsMTcC5bAgoWA==", + "version": "10.2.5", + "resolved": "https://registry.npmjs.org/npm/-/npm-10.2.5.tgz", + "integrity": "sha512-lXdZ7titEN8CH5YJk9C/aYRU9JeDxQ4d8rwIIDsvH3SMjLjHTukB2CFstMiB30zXs4vCrPN2WH6cDq1yHBeJAw==", "bundleDependencies": [ "@isaacs/string-locale-compare", "@npmcli/arborist", @@ -8289,7 +8295,7 @@ "@sigstore/tuf": "^2.2.0", "abbrev": "^2.0.0", "archy": "~1.0.0", - "cacache": "^18.0.0", + "cacache": "^18.0.1", "chalk": "^5.3.0", "ci-info": "^4.0.0", "cli-columns": "^4.0.0", @@ -8303,7 +8309,7 @@ "ini": "^4.1.1", "init-package-json": "^6.0.0", "is-cidr": "^5.0.3", - "json-parse-even-better-errors": "^3.0.0", + "json-parse-even-better-errors": "^3.0.1", "libnpmaccess": "^8.0.1", "libnpmdiff": "^6.0.3", "libnpmexec": "^7.0.4", @@ -8332,7 +8338,7 @@ "npm-user-validate": "^2.0.0", "npmlog": "^7.0.1", "p-map": "^4.0.0", - "pacote": "^17.0.4", + "pacote": "^17.0.5", "parse-conflict-json": "^3.0.1", "proc-log": "^3.0.0", "qrcode-terminal": "^0.12.0", @@ -8443,7 +8449,7 @@ } }, "node_modules/npm/node_modules/@npmcli/arborist": { - "version": "7.2.1", + "version": "7.2.2", "dev": true, "inBundle": true, "license": "ISC", @@ -8490,7 +8496,7 @@ } }, "node_modules/npm/node_modules/@npmcli/config": { - "version": "8.0.2", + "version": "8.0.3", "dev": true, "inBundle": true, "license": "ISC", @@ -8956,7 +8962,7 @@ } }, "node_modules/npm/node_modules/cacache": { - "version": "18.0.0", + "version": "18.0.1", "dev": true, "inBundle": true, "license": "ISC", @@ -8966,7 +8972,7 @@ "glob": "^10.2.2", "lru-cache": "^10.0.1", "minipass": "^7.0.3", - "minipass-collect": "^1.0.2", + "minipass-collect": "^2.0.1", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", "p-map": "^4.0.0", @@ -9537,7 +9543,7 @@ "license": "BSD-3-Clause" }, "node_modules/npm/node_modules/ignore-walk": { - "version": "6.0.3", + "version": "6.0.4", "dev": true, "inBundle": true, "license": "ISC", @@ -9675,7 +9681,7 @@ } }, "node_modules/npm/node_modules/json-parse-even-better-errors": { - "version": "3.0.0", + "version": "3.0.1", "dev": true, "inBundle": true, "license": "MIT", @@ -9714,7 +9720,7 @@ "license": "MIT" }, "node_modules/npm/node_modules/libnpmaccess": { - "version": "8.0.1", + "version": "8.0.2", "dev": true, "inBundle": true, "license": "ISC", @@ -9727,7 +9733,7 @@ } }, "node_modules/npm/node_modules/libnpmdiff": { - "version": "6.0.3", + "version": "6.0.4", "dev": true, "inBundle": true, "license": "ISC", @@ -9747,7 +9753,7 @@ } }, "node_modules/npm/node_modules/libnpmexec": { - "version": "7.0.4", + "version": "7.0.5", "dev": true, "inBundle": true, "license": "ISC", @@ -9769,7 +9775,7 @@ } }, "node_modules/npm/node_modules/libnpmfund": { - "version": "5.0.1", + "version": "5.0.2", "dev": true, "inBundle": true, "license": "ISC", @@ -9781,7 +9787,7 @@ } }, "node_modules/npm/node_modules/libnpmhook": { - "version": "10.0.0", + "version": "10.0.1", "dev": true, "inBundle": true, "license": "ISC", @@ -9794,7 +9800,7 @@ } }, "node_modules/npm/node_modules/libnpmorg": { - "version": "6.0.1", + "version": "6.0.2", "dev": true, "inBundle": true, "license": "ISC", @@ -9807,7 +9813,7 @@ } }, "node_modules/npm/node_modules/libnpmpack": { - "version": "6.0.3", + "version": "6.0.4", "dev": true, "inBundle": true, "license": "ISC", @@ -9822,7 +9828,7 @@ } }, "node_modules/npm/node_modules/libnpmpublish": { - "version": "9.0.2", + "version": "9.0.3", "dev": true, "inBundle": true, "license": "ISC", @@ -9841,7 +9847,7 @@ } }, "node_modules/npm/node_modules/libnpmsearch": { - "version": "7.0.0", + "version": "7.0.1", "dev": true, "inBundle": true, "license": "ISC", @@ -9853,7 +9859,7 @@ } }, "node_modules/npm/node_modules/libnpmteam": { - "version": "6.0.0", + "version": "6.0.1", "dev": true, "inBundle": true, "license": "ISC", @@ -9866,7 +9872,7 @@ } }, "node_modules/npm/node_modules/libnpmversion": { - "version": "5.0.1", + "version": "5.0.2", "dev": true, "inBundle": true, "license": "ISC", @@ -9882,13 +9888,10 @@ } }, "node_modules/npm/node_modules/lru-cache": { - "version": "10.0.2", + "version": "10.1.0", "dev": true, "inBundle": true, "license": "ISC", - "dependencies": { - "semver": "^7.3.5" - }, "engines": { "node": "14 || >=16.14" } @@ -9940,27 +9943,15 @@ } }, "node_modules/npm/node_modules/minipass-collect": { - "version": "1.0.2", - "dev": true, - "inBundle": true, - "license": "ISC", - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/npm/node_modules/minipass-collect/node_modules/minipass": { - "version": "3.3.6", + "version": "2.0.1", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "yallist": "^4.0.0" + "minipass": "^7.0.3" }, "engines": { - "node": ">=8" + "node": ">=16 || 14 >=14.17" } }, "node_modules/npm/node_modules/minipass-fetch": { @@ -10247,12 +10238,12 @@ } }, "node_modules/npm/node_modules/npm-packlist": { - "version": "8.0.0", + "version": "8.0.1", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "ignore-walk": "^6.0.0" + "ignore-walk": "^6.0.4" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" @@ -10344,7 +10335,7 @@ } }, "node_modules/npm/node_modules/pacote": { - "version": "17.0.4", + "version": "17.0.5", "dev": true, "inBundle": true, "license": "ISC", @@ -12501,9 +12492,9 @@ "integrity": "sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==" }, "node_modules/semantic-release": { - "version": "22.0.8", - "resolved": "https://registry.npmjs.org/semantic-release/-/semantic-release-22.0.8.tgz", - "integrity": "sha512-55rb31jygqIYsGU/rY+gXXm2fnxBIWo9azOjxbqKsPnq7p70zwZ5v+xnD7TxJC+zvS3sy1eHLGXYWCaX3WI76A==", + "version": "22.0.10", + "resolved": "https://registry.npmjs.org/semantic-release/-/semantic-release-22.0.10.tgz", + "integrity": "sha512-4ahPaOX+0UYpYlosjc/tfCzB/cqlnjN0/xSKGryEC4bOpuYSkoK+QHw7xDPmAuiMNBBvkFD+m3aVMENUr++CIg==", "dev": true, "dependencies": { "@semantic-release/commit-analyzer": "^11.0.0", @@ -13584,9 +13575,9 @@ } }, "node_modules/typescript": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz", - "integrity": "sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==", + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/package.json b/package.json index 09076e4..4e73dc4 100644 --- a/package.json +++ b/package.json @@ -50,16 +50,16 @@ "new-find-package-json": "^2.0.0", "pretty-ms": "^8.0.0", "shell-quote": "^1.8.1", - "typescript": "^5.3.2" + "typescript": "^5.3.3" }, "devDependencies": { "@commitlint/cli": "^18.4.3", "@commitlint/config-conventional": "^18.4.3", "@tsconfig/node18": "^18.2.2", - "@types/jest": "^29.5.10", + "@types/jest": "^29.5.11", "@types/lodash": "^4.14.202", - "@types/luxon": "^3.3.6", - "@types/node": "^20.10.3", + "@types/luxon": "^3.3.7", + "@types/node": "^20.10.4", "@types/node-fetch": "^2.6.9", "@types/shell-quote": "^1.7.5", "@typescript-eslint/eslint-plugin": "^6.13.2", @@ -69,7 +69,7 @@ "husky": "^8.0.3", "jest": "^29.7.0", "prettier": "^3.1.0", - "semantic-release": "^22.0.8" + "semantic-release": "^22.0.10" }, "workspaces": [ "data/project-templates/*" diff --git a/tsconfig.json b/tsconfig.json index 0c023b0..4ca9c7d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,5 @@ { - // This is an alias to @tsconfig/node16: https://github.com/tsconfig/bases + // This is an alias to @tsconfig/node18: https://github.com/tsconfig/bases "extends": "@tsconfig/node18/tsconfig.json", // Most ts-node options can be specified here using their programmatic names.