From 7412aa303758396f4a7af1c44f82741f0ec86ae0 Mon Sep 17 00:00:00 2001 From: Cameron Streete Date: Fri, 14 Mar 2025 13:57:42 +0100 Subject: [PATCH 1/2] improvements - fixed issue where configuring debugg setting would error due to pupeter not finding "Click anywhere to continue" - added env support for port in minima-cli --- packages/create-minima-app/src/index.ts | 2 +- .../src/utils/setup-debug-config.ts | 280 ++++++++++++++---- packages/minima-cli/src/cli.ts | 40 ++- packages/minima-cli/src/utils/read-env.ts | 70 +++++ pnpm-lock.yaml | 265 ++++++++++------- 5 files changed, 483 insertions(+), 174 deletions(-) create mode 100644 packages/minima-cli/src/utils/read-env.ts diff --git a/packages/create-minima-app/src/index.ts b/packages/create-minima-app/src/index.ts index d09aa66..b74dfa5 100644 --- a/packages/create-minima-app/src/index.ts +++ b/packages/create-minima-app/src/index.ts @@ -1,6 +1,6 @@ #!/usr/bin/env node import { Command } from "commander" -import packageJson from "../package.json" +import packageJson from "../package.json" with { type: "json" } import { init } from "./commands/init.js" process.on("SIGINT", () => process.exit(0)) diff --git a/packages/create-minima-app/src/utils/setup-debug-config.ts b/packages/create-minima-app/src/utils/setup-debug-config.ts index 2f17faf..d90e36c 100644 --- a/packages/create-minima-app/src/utils/setup-debug-config.ts +++ b/packages/create-minima-app/src/utils/setup-debug-config.ts @@ -2,7 +2,7 @@ import type { DappLink, MDSObj } from "@minima-global/mds" import chalk from "chalk" import fs from "fs/promises" import path from "path" -import puppeteer from "puppeteer" +import puppeteer, { Browser, Page } from "puppeteer" import { z } from "zod" import { getRunCommand, type PackageManager } from "./get-package-manager.js" import { logger } from "./logger.js" @@ -23,101 +23,253 @@ const DEBUGGING_SCHEMA = z.object({ template: z.string(), }) -export async function setupDebugConfig( - options: z.infer -) { +type DebugOptions = z.infer + +/** + * Sets up debug configuration for a Minima app + */ +export async function setupDebugConfig(options: DebugOptions) { const debuggingSpinner = spinner("Configuring debug settings...").start() - const values = DEBUGGING_SCHEMA.parse(options) + try { + const values = DEBUGGING_SCHEMA.parse(options) + + // Launch browser and navigate to Minima node + const browser = await launchBrowser() + const page = await setupBrowserPage(browser, values.host, values.port) + + // Login to Minima node + await loginToMinimaNode(page, values.password, debuggingSpinner) + + // Handle fresh node if needed + await handleFreshNodeIfNeeded(page, debuggingSpinner) + + // Get session ID from MDS + const sessionID = await getSessionIDFromMDS(page) + + // Close browser + await browser.close() + + // Update configuration files + await updateConfigFiles(values, sessionID) + + // Display success message + displaySuccessMessage(values, debuggingSpinner) - const browser = await puppeteer.launch({ + process.exit(0) + } catch (error: unknown) { + const err = error instanceof Error ? error : new Error(String(error)) + debuggingSpinner.fail("Debug configuration failed") + logger.error(`Error: ${err.message}`) + process.exit(1) + } +} + +/** + * Launches a headless browser + */ +async function launchBrowser(): Promise { + return await puppeteer.launch({ headless: true, acceptInsecureCerts: true, ignoreDefaultArgs: ["--disable-extensions", "--ignore-certificate-errors"], }) +} +/** + * Sets up the browser page and navigates to the Minima node + */ +async function setupBrowserPage( + browser: Browser, + host: string, + port: number +): Promise { const page = await browser.newPage() await page.setViewport({ width: 1280, height: 1024 }) - await page.goto(`https://${values.host}:${values.port}`) + await page.goto(`https://${host}:${port}`) await page.waitForNetworkIdle() - await page.type("#password", values.password).catch(() => { - logger.error("Invalid password") + return page +} + +/** + * Logs in to the Minima node + */ +async function loginToMinimaNode( + page: Page, + password: string, + debuggingSpinner: any +): Promise { + try { + // Enter password + await page.type("#password", password) + + // Click submit and wait for navigation + await Promise.all([ + page.waitForNavigation({ waitUntil: "networkidle0" }), + page.click("[type='submit']"), + ]) + + // Wait for page to stabilize + await new Promise((resolve) => setTimeout(resolve, 2000)) + } catch (err) { + debuggingSpinner.fail("Login failed") + if (err instanceof Error) { + logger.error(`Failed to login: ${err.message}`) + } + logger.info("Please check your password, host, port and try again.") process.exit(1) - }) - await page.click("[type='submit']") - await page - .waitForFunction( - () => document.body.innerText.includes("Click anywhere to continue"), - { timeout: 5000 } - ) - .catch(() => { - debuggingSpinner.fail("Something went wrong!") - logger.info("Please check your password, host, port and try again.") - logger.info( - "If you need further help or guidance, visit https://docs.minima.global\n" + } +} + +/** + * Handles the case of a fresh node that requires clicking to continue + */ +async function handleFreshNodeIfNeeded( + page: Page, + debuggingSpinner: any +): Promise { + try { + // Check if this is a fresh node by looking for the text + const isFreshNode = await page + .evaluate(() => + document.body.innerText.includes("Click anywhere to continue") ) - process.exit(1) - }) - await page.click("body") + .catch(() => false) - const data = await page.evaluate(() => { - return new Promise((resolve) => { - window.MDS.dapplink("Health", function (data) { - resolve(data) + if (isFreshNode) { + // Click to continue for fresh nodes + await page.click("body").catch((err) => { + debuggingSpinner.fail("Something went wrong!") + logger.error(`Failed to click body: ${err.message}`) + logger.info("Please check your password, host, port and try again.") + process.exit(1) }) + + // Wait for the click to take effect + await new Promise((resolve) => setTimeout(resolve, 2000)) + } + } catch (err) { + // If there's an error in the detection process, log it but continue + logger.info(`Error checking for fresh node: ${err}. Proceeding anyway.`) + } +} + +/** + * Gets the session ID from MDS + */ +async function getSessionIDFromMDS(page: Page): Promise { + // First check if MDS is available on the page + const hasMDS = await page + .evaluate(() => typeof window.MDS !== "undefined" && window.MDS !== null) + .catch(() => false) + + if (!hasMDS) { + throw new Error( + "MDS object not found on the page. This may indicate that you're not properly logged in or the Minima node is not running correctly." + ) + } + + // Get session ID using MDS.dapplink + const data = await page.evaluate(() => { + return new Promise((resolve, reject) => { + if (!window.MDS) { + reject(new Error("MDS is not defined in the window object")) + return + } + + try { + window.MDS.dapplink("Health", function (data) { + if (!data || data.status === false) { + reject(new Error(`MDS.dapplink failed: ${JSON.stringify(data)}`)) + return + } + resolve(data) + }) + } catch (e) { + reject(new Error(`Exception in MDS.dapplink: ${e}`)) + } }) }) - const sessionID = data.sessionid - debuggingSpinner.text = "Writing environment variables..." + if (!data || !data.sessionid) { + throw new Error( + `Invalid data returned from MDS.dapplink: ${JSON.stringify(data)}` + ) + } - await browser.close() + return data.sessionid +} +/** + * Updates configuration files based on the template + */ +async function updateConfigFiles( + values: DebugOptions, + sessionID: string +): Promise { if (values.template === "vanilla-js") { - // Update the mds.js file for vanilla-js template - const mdsPath = path.join(process.cwd(), "mds.js") - const mdsContent = await fs.readFile(mdsPath, "utf-8") + await updateVanillaJsConfig(values, sessionID) + } else { + await updateOtherTemplatesConfig(values, sessionID) + } +} - const updatedContent = mdsContent - .replace(/DEBUG_HOST: null,/, `DEBUG_HOST: "${values.host}",`) - .replace(/DEBUG_PORT: -1,/, `DEBUG_PORT: ${values.port},`) - .replace(/DEBUG_MINIDAPPID: "0x00",/, `DEBUG_MINIDAPPID: "${sessionID}",`) +/** + * Updates configuration for vanilla-js template + */ +async function updateVanillaJsConfig( + values: DebugOptions, + sessionID: string +): Promise { + // Update the mds.js file for vanilla-js template + const mdsPath = path.join(process.cwd(), "mds.js") + const mdsContent = await fs.readFile(mdsPath, "utf-8") - await fs.writeFile(mdsPath, updatedContent, "utf-8") - } else { - // Write .env file for other templates + const updatedContent = mdsContent + .replace(/DEBUG_HOST: null,/, `DEBUG_HOST: "${values.host}",`) + .replace(/DEBUG_PORT: -1,/, `DEBUG_PORT: ${values.port},`) + .replace(/DEBUG_MINIDAPPID: "0x00",/, `DEBUG_MINIDAPPID: "${sessionID}",`) - await writeEnvFile({ - VITE_DEBUG_MDS_PORT: values.port, - VITE_DEBUG_SESSION_ID: sessionID, - VITE_DEBUG: "true", - VITE_DEBUG_HOST: values.host, - }) - } + await fs.writeFile(mdsPath, updatedContent, "utf-8") +} - if (values.logs) { - debuggingSpinner.succeed( - chalk.green(`Debug settings configured successfully!\n`) - ) +/** + * Updates configuration for other templates + */ +async function updateOtherTemplatesConfig( + values: DebugOptions, + sessionID: string +): Promise { + // Write .env file for other templates + await writeEnvFile({ + VITE_DEBUG_MDS_PORT: values.port, + VITE_DEBUG_SESSION_ID: sessionID, + VITE_DEBUG: "true", + VITE_DEBUG_HOST: values.host, + }) +} +/** + * Displays success message + */ +function displaySuccessMessage( + values: DebugOptions, + debuggingSpinner: any +): void { + debuggingSpinner.succeed( + chalk.green("Debug settings configured successfully!\n") + ) + + if (values.logs) { logger.secondary("You can navigate to your project directory with:\n") logger.secondary(`cd ${values.appName}`) if (values.template === "react-ts") { logger.secondary(`${getRunCommand(values.packageManager, "dev")}`) } - - logger.secondary( - "If you need further help or guidance, visit https://docs.minima.global\n" - ) - } else { - debuggingSpinner.succeed( - chalk.green("Debug settings configured successfully!\n") - ) - logger.secondary( - "If you need further help or guidance, visit https://docs.minima.global\n" - ) } - process.exit(0) + logger.secondary( + "If you need further help or guidance, visit https://docs.minima.global\n" + ) } diff --git a/packages/minima-cli/src/cli.ts b/packages/minima-cli/src/cli.ts index 4cc160d..425c465 100644 --- a/packages/minima-cli/src/cli.ts +++ b/packages/minima-cli/src/cli.ts @@ -10,6 +10,7 @@ import { update } from "./scripts/update.js" import { zip } from "./scripts/zip.js" import { isReactProject } from "./utils/is-react-project.js" import { logger } from "./utils/logger.js" +import { readEnvVars } from "./utils/read-env.js" const program = new Command() const version = JSON.parse(readFileSync("./package.json", "utf-8")).version @@ -59,7 +60,7 @@ program program .command("install") .description("Install the MiniDapp") - .option("-p, --port ", "rpcport number", "9005") + .option("-p, --port ", "rpcport number") .action(async (options) => { let installSpinner: Ora | undefined try { @@ -69,7 +70,18 @@ program await configureDappConf() + const env = readEnvVars() + + if (!options.port) { + if (env.mdsPort) { + options.port = env.mdsPort + 2 + } else { + options.port = "9005" + } + } + const zipFileName = `${packageJson.name}-${packageJson.version}.mds.zip` + const filePath = packageJson.template === "react-ts" ? "build/" : "./" await zip(zipFileName, filePath) @@ -87,8 +99,6 @@ program } catch (error) { installSpinner?.fail("Failed to install MiniDapp") if (error instanceof Error) { - logger.error(error.message) - logger.info(`Port: ${options.port}`) logger.info( "Please check that you have RPC enabled on your Minima node and that the port is correct" ) @@ -104,11 +114,21 @@ program program .command("uninstall") - .option("-p, --port ", "port number", "9005") + .option("-p, --port ", "port number") .description("Uninstall the MiniDapp") .action(async (options) => { let uninstallSpinner: Ora | undefined try { + const env = readEnvVars() + + if (!options.port) { + if (env.mdsPort) { + options.port = env.mdsPort + 2 + } else { + options.port = "9005" + } + } + uninstallSpinner = ora("Uninstalling MiniDapp...").start() await uninstall({ port: parseInt(options.port), @@ -137,7 +157,7 @@ program program .command("update") .description("Update the MiniDapp") - .option("-p, --port ", "rpcport number", "9005") + .option("-p, --port ", "rpcport number") .action(async (options) => { let updateSpinner: Ora | undefined try { @@ -154,6 +174,16 @@ program // Zip the MiniDapp await zip(zipFileName, filePath) + const env = readEnvVars() + + if (!options.port) { + if (env.mdsPort) { + options.port = env.mdsPort + 2 + } else { + options.port = "9005" + } + } + // Update the MiniDapp await update({ port: parseInt(options.port), diff --git a/packages/minima-cli/src/utils/read-env.ts b/packages/minima-cli/src/utils/read-env.ts new file mode 100644 index 0000000..6f4cd0d --- /dev/null +++ b/packages/minima-cli/src/utils/read-env.ts @@ -0,0 +1,70 @@ +import { existsSync, readFileSync } from "fs" +import { resolve } from "path" +import { logger } from "./logger.js" + +interface DebugEnvVars { + debug: boolean + host: string + mdsPort: number + sessionId: string +} + +/** + * Reads environment variables from the .env file in the project root + * @returns Object containing the environment variables + */ +export function readEnvVars(): DebugEnvVars { + try { + // Default values + const defaultEnvVars: DebugEnvVars = { + debug: false, + host: "127.0.0.1", + mdsPort: 9003, + sessionId: "", + } + + // Find the .env file + const envPath = resolve(process.cwd(), ".env") + + if (!existsSync(envPath)) { + logger.error("No .env file found, using default values") + return defaultEnvVars + } + + // Read the .env file + const envContent = readFileSync(envPath, "utf-8") + const envLines = envContent.split("\n") + + // Parse the environment variables + const envVars: Record = {} + + for (const line of envLines) { + const trimmedLine = line.trim() + if (!trimmedLine || trimmedLine.startsWith("#")) continue + + const [key, ...valueParts] = trimmedLine.split("=") + if (key && valueParts.length > 0) { + envVars[key] = valueParts.join("=") + } + } + + // Extract the relevant environment variables + return { + debug: envVars.VITE_DEBUG === "true", + host: envVars.VITE_DEBUG_HOST || defaultEnvVars.host, + mdsPort: parseInt( + envVars.VITE_DEBUG_MDS_PORT || String(defaultEnvVars.mdsPort), + 10 + ), + sessionId: envVars.VITE_DEBUG_SESSION_ID || defaultEnvVars.sessionId, + } + } catch (error) { + logger.error(`Error reading environment variables: ${error}`) + return { + debug: false, + host: "127.0.0.1", + mdsPort: 9003, + sessionId: "", + } + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8f4f3aa..fceb5a5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,7 +10,7 @@ importers: dependencies: prettier-plugin-organize-imports: specifier: ^3.2.4 - version: 3.2.4(prettier@3.3.2)(typescript@5.6.2) + version: 3.2.4(prettier@3.3.2)(typescript@5.7.3) devDependencies: '@changesets/cli': specifier: ^2.27.8 @@ -38,10 +38,10 @@ importers: dependencies: '@typescript-eslint/eslint-plugin': specifier: ^7.1.0 - version: 7.16.0(@typescript-eslint/parser@7.16.0)(eslint@8.57.0)(typescript@5.6.2) + version: 7.16.0(@typescript-eslint/parser@7.16.0)(eslint@8.57.0)(typescript@5.7.3) '@typescript-eslint/parser': specifier: ^7.1.0 - version: 7.16.0(eslint@8.57.0)(typescript@5.6.2) + version: 7.16.0(eslint@8.57.0)(typescript@5.7.3) eslint-config-prettier: specifier: ^9.1.0 version: 9.1.0(eslint@8.57.0) @@ -51,7 +51,7 @@ importers: packages/create-minima-app: dependencies: '@minima-global/mds': - specifier: 0.14.9 + specifier: 0.14.11 version: link:../mds '@minima-global/minima-cli': specifier: 0.1.4 @@ -220,6 +220,82 @@ importers: specifier: ^5.0.0 version: 5.6.2 + test-cool: + dependencies: + '@minima-global/mds': + specifier: workspace:^ + version: link:../packages/mds + '@tanstack/react-router': + specifier: ^1.76.3 + version: 1.98.4(react-dom@19.0.0)(react@19.0.0) + react: + specifier: ^19.0.0 + version: 19.0.0 + react-dom: + specifier: ^19.0.0 + version: 19.0.0(react@19.0.0) + devDependencies: + '@eslint/js': + specifier: ^9.13.0 + version: 9.19.0 + '@minima-global/minima-cli': + specifier: workspace:* + version: link:../packages/minima-cli + '@tanstack/router-cli': + specifier: ^1.97.23 + version: 1.98.6(@tanstack/react-router@1.98.4) + '@tanstack/router-devtools': + specifier: ^1.76.3 + version: 1.98.4(@tanstack/react-router@1.98.4)(csstype@3.1.3)(react-dom@19.0.0)(react@19.0.0) + '@tanstack/router-plugin': + specifier: ^1.76.0 + version: 1.98.6(@tanstack/react-router@1.98.4)(vite@5.4.11) + '@types/node': + specifier: ^22.7.6 + version: 22.13.1 + '@types/react': + specifier: ^19.0.0 + version: 19.0.8 + '@types/react-dom': + specifier: ^19.0.0 + version: 19.0.3(@types/react@19.0.8) + '@vitejs/plugin-legacy': + specifier: ^5.4.2 + version: 5.4.3(terser@5.31.3)(vite@5.4.11) + '@vitejs/plugin-react': + specifier: ^4.3.3 + version: 4.3.4(vite@5.4.11) + '@vitejs/plugin-react-swc': + specifier: ^3.7.1 + version: 3.7.2(vite@5.4.11) + autoprefixer: + specifier: ^10.4.16 + version: 10.4.20(postcss@8.4.49) + eslint: + specifier: ^9.13.0 + version: 9.19.0 + eslint-plugin-react-hooks: + specifier: ^5.0.0 + version: 5.1.0(eslint@9.19.0) + eslint-plugin-react-refresh: + specifier: ^0.4.13 + version: 0.4.18(eslint@9.19.0) + tailwindcss: + specifier: ^3.3.5 + version: 3.4.17 + typescript: + specifier: ~5.6.2 + version: 5.6.2 + typescript-eslint: + specifier: ^8.10.0 + version: 8.22.0(eslint@9.19.0)(typescript@5.6.2) + vite: + specifier: ^5.4.9 + version: 5.4.11(@types/node@22.13.1)(terser@5.31.3) + vite-plugin-html: + specifier: ^3.2.0 + version: 3.2.2(vite@5.4.11) + tests/test-app-new: dependencies: '@minima-global/mds': @@ -395,13 +471,6 @@ packages: jsesc: 3.1.0 dev: true - /@babel/helper-annotate-as-pure@7.24.7: - resolution: {integrity: sha512-BaDeOonYvhdKw+JoMVkAixAAJzG2jVPIwWoKBPdYuY9b452e2rPuI9QPYh3KpofZ3pW2akOmwZLOiOsHMiqRAg==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.26.7 - dev: true - /@babel/helper-annotate-as-pure@7.25.9: resolution: {integrity: sha512-gv7320KBUFJz1RnylIg5WWYPRXKZ884AGkYpgpWW02TH66Dl+HaC1t1CKd0z3R4b6hdYEcmrNZHUmfCP+1u3/g==} engines: {node: '>=6.9.0'} @@ -438,18 +507,6 @@ packages: - supports-color dev: true - /@babel/helper-create-regexp-features-plugin@7.24.7(@babel/core@7.26.7): - resolution: {integrity: sha512-03TCmXy2FtXJEZfbXDTSqq1fRJArk7lX9DOFC/47VthYcxyIOx+eXQmdo6DOQvrbpIix+KfXwvuXdFDZHxt+rA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.26.7 - '@babel/helper-annotate-as-pure': 7.24.7 - regexpu-core: 5.3.2 - semver: 6.3.1 - dev: true - /@babel/helper-create-regexp-features-plugin@7.26.3(@babel/core@7.26.7): resolution: {integrity: sha512-G7ZRb40uUgdKOQqPLjfD12ZmGA54PzqDFUv2BKImnC9QIfGhIHKvVML0oN8IUiDq4iRqpq74ABpvOaerfWdong==} engines: {node: '>=6.9.0'} @@ -518,11 +575,6 @@ packages: '@babel/types': 7.26.7 dev: true - /@babel/helper-plugin-utils@7.24.8: - resolution: {integrity: sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg==} - engines: {node: '>=6.9.0'} - dev: true - /@babel/helper-plugin-utils@7.26.5: resolution: {integrity: sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==} engines: {node: '>=6.9.0'} @@ -627,14 +679,6 @@ packages: '@babel/types': 7.24.8 dev: true - /@babel/parser@7.26.3: - resolution: {integrity: sha512-WJ/CvmY8Mea8iDXo6a7RK2wbmJITT5fN3BEkRuFlxVyNx8jOKIIhmC4fSkTcPcf8JyavbBwIe6OpiCOBXt/IcA==} - engines: {node: '>=6.0.0'} - hasBin: true - dependencies: - '@babel/types': 7.26.7 - dev: true - /@babel/parser@7.26.7: resolution: {integrity: sha512-kEvgGGgEjRUutvdVvZhbn/BxVt+5VSpwXz1j3WYXQbXDo8KzFOPNG2GQbdAiNq8g6wn1yKk7C/qrke03a84V+w==} engines: {node: '>=6.0.0'} @@ -759,8 +803,8 @@ packages: '@babel/core': ^7.0.0 dependencies: '@babel/core': 7.26.7 - '@babel/helper-create-regexp-features-plugin': 7.24.7(@babel/core@7.26.7) - '@babel/helper-plugin-utils': 7.24.8 + '@babel/helper-create-regexp-features-plugin': 7.26.3(@babel/core@7.26.7) + '@babel/helper-plugin-utils': 7.26.5 dev: true /@babel/plugin-transform-arrow-functions@7.25.9(@babel/core@7.26.7): @@ -1443,10 +1487,6 @@ packages: esutils: 2.0.3 dev: true - /@babel/regjsgen@0.8.0: - resolution: {integrity: sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==} - dev: true - /@babel/runtime@7.24.8: resolution: {integrity: sha512-5F7SDGs1T72ZczbRwbGO9lQi0NLjQxzl6i4lJxLxfW9U5UluCSyEJeniWvnhl3/euNiqQVbo8zruhsDfid0esA==} engines: {node: '>=6.9.0'} @@ -3108,7 +3148,7 @@ packages: babel-dead-code-elimination: 1.0.8 chokidar: 3.6.0 unplugin: 2.1.2 - vite: 5.4.11(terser@5.31.3) + vite: 5.4.11(@types/node@22.13.1)(terser@5.31.3) zod: 3.24.1 transitivePeerDependencies: - '@tanstack/react-router' @@ -3146,7 +3186,7 @@ packages: /@types/babel__core@7.20.5: resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} dependencies: - '@babel/parser': 7.26.3 + '@babel/parser': 7.26.7 '@babel/types': 7.26.7 '@types/babel__generator': 7.6.8 '@types/babel__template': 7.4.4 @@ -3162,7 +3202,7 @@ packages: /@types/babel__template@7.4.4: resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} dependencies: - '@babel/parser': 7.26.3 + '@babel/parser': 7.26.7 '@babel/types': 7.26.7 dev: true @@ -3301,7 +3341,7 @@ packages: - supports-color dev: true - /@typescript-eslint/eslint-plugin@7.16.0(@typescript-eslint/parser@7.16.0)(eslint@8.57.0)(typescript@5.6.2): + /@typescript-eslint/eslint-plugin@7.16.0(@typescript-eslint/parser@7.16.0)(eslint@8.57.0)(typescript@5.7.3): resolution: {integrity: sha512-py1miT6iQpJcs1BiJjm54AMzeuMPBSPuKPlnT8HlfudbcS5rYeX5jajpLf3mrdRh9dA/Ec2FVUY0ifeVNDIhZw==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: @@ -3313,17 +3353,17 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.11.0 - '@typescript-eslint/parser': 7.16.0(eslint@8.57.0)(typescript@5.6.2) + '@typescript-eslint/parser': 7.16.0(eslint@8.57.0)(typescript@5.7.3) '@typescript-eslint/scope-manager': 7.16.0 - '@typescript-eslint/type-utils': 7.16.0(eslint@8.57.0)(typescript@5.6.2) - '@typescript-eslint/utils': 7.16.0(eslint@8.57.0)(typescript@5.6.2) + '@typescript-eslint/type-utils': 7.16.0(eslint@8.57.0)(typescript@5.7.3) + '@typescript-eslint/utils': 7.16.0(eslint@8.57.0)(typescript@5.7.3) '@typescript-eslint/visitor-keys': 7.16.0 eslint: 8.57.0 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.6.2) - typescript: 5.6.2 + ts-api-utils: 1.3.0(typescript@5.7.3) + typescript: 5.7.3 transitivePeerDependencies: - supports-color dev: false @@ -3373,7 +3413,7 @@ packages: - supports-color dev: true - /@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.6.2): + /@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.7.3): resolution: {integrity: sha512-ar9E+k7CU8rWi2e5ErzQiC93KKEFAXA2Kky0scAlPcxYblLt8+XZuHUZwlyfXILyQa95P6lQg+eZgh/dDs3+Vw==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: @@ -3385,11 +3425,11 @@ packages: dependencies: '@typescript-eslint/scope-manager': 7.16.0 '@typescript-eslint/types': 7.16.0 - '@typescript-eslint/typescript-estree': 7.16.0(typescript@5.6.2) + '@typescript-eslint/typescript-estree': 7.16.0(typescript@5.7.3) '@typescript-eslint/visitor-keys': 7.16.0 debug: 4.3.5 eslint: 8.57.0 - typescript: 5.6.2 + typescript: 5.7.3 transitivePeerDependencies: - supports-color dev: false @@ -3456,7 +3496,7 @@ packages: - supports-color dev: true - /@typescript-eslint/type-utils@7.16.0(eslint@8.57.0)(typescript@5.6.2): + /@typescript-eslint/type-utils@7.16.0(eslint@8.57.0)(typescript@5.7.3): resolution: {integrity: sha512-j0fuUswUjDHfqV/UdW6mLtOQQseORqfdmoBNDFOqs9rvNVR2e+cmu6zJu/Ku4SDuqiJko6YnhwcL8x45r8Oqxg==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: @@ -3466,12 +3506,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 7.16.0(typescript@5.6.2) - '@typescript-eslint/utils': 7.16.0(eslint@8.57.0)(typescript@5.6.2) + '@typescript-eslint/typescript-estree': 7.16.0(typescript@5.7.3) + '@typescript-eslint/utils': 7.16.0(eslint@8.57.0)(typescript@5.7.3) debug: 4.3.5 eslint: 8.57.0 - ts-api-utils: 1.3.0(typescript@5.6.2) - typescript: 5.6.2 + ts-api-utils: 1.3.0(typescript@5.7.3) + typescript: 5.7.3 transitivePeerDependencies: - supports-color dev: false @@ -3530,7 +3570,7 @@ packages: - supports-color dev: true - /@typescript-eslint/typescript-estree@7.16.0(typescript@5.6.2): + /@typescript-eslint/typescript-estree@7.16.0(typescript@5.7.3): resolution: {integrity: sha512-a5NTvk51ZndFuOLCh5OaJBELYc2O3Zqxfl3Js78VFE1zE46J2AaVuW+rEbVkQznjkmlzWsUI15BG5tQMixzZLw==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: @@ -3546,8 +3586,8 @@ packages: is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.2 - ts-api-utils: 1.3.0(typescript@5.6.2) - typescript: 5.6.2 + ts-api-utils: 1.3.0(typescript@5.7.3) + typescript: 5.7.3 transitivePeerDependencies: - supports-color dev: false @@ -3590,7 +3630,7 @@ packages: - typescript dev: true - /@typescript-eslint/utils@7.16.0(eslint@8.57.0)(typescript@5.6.2): + /@typescript-eslint/utils@7.16.0(eslint@8.57.0)(typescript@5.7.3): resolution: {integrity: sha512-PqP4kP3hb4r7Jav+NiRCntlVzhxBNWq6ZQ+zQwII1y/G/1gdIPeYDCKr2+dH6049yJQsWZiHU6RlwvIFBXXGNA==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: @@ -3599,7 +3639,7 @@ packages: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@typescript-eslint/scope-manager': 7.16.0 '@typescript-eslint/types': 7.16.0 - '@typescript-eslint/typescript-estree': 7.16.0(typescript@5.6.2) + '@typescript-eslint/typescript-estree': 7.16.0(typescript@5.7.3) eslint: 8.57.0 transitivePeerDependencies: - supports-color @@ -3666,7 +3706,7 @@ packages: regenerator-runtime: 0.14.1 systemjs: 6.15.1 terser: 5.31.3 - vite: 5.4.11(terser@5.31.3) + vite: 5.4.11(@types/node@22.13.1)(terser@5.31.3) transitivePeerDependencies: - supports-color dev: true @@ -3677,7 +3717,7 @@ packages: vite: ^4 || ^5 || ^6 dependencies: '@swc/core': 1.10.12 - vite: 5.4.11(terser@5.31.3) + vite: 5.4.11(@types/node@22.13.1)(terser@5.31.3) transitivePeerDependencies: - '@swc/helpers' dev: true @@ -3693,7 +3733,7 @@ packages: '@babel/plugin-transform-react-jsx-source': 7.25.9(@babel/core@7.26.7) '@types/babel__core': 7.20.5 react-refresh: 0.14.2 - vite: 5.4.11(terser@5.31.3) + vite: 5.4.11(@types/node@22.13.1)(terser@5.31.3) transitivePeerDependencies: - supports-color dev: true @@ -4511,7 +4551,6 @@ packages: path-key: 3.1.1 shebang-command: 2.0.0 which: 2.0.2 - dev: true /css-select@4.3.0: resolution: {integrity: sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==} @@ -5245,7 +5284,7 @@ packages: resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} engines: {node: '>=14'} dependencies: - cross-spawn: 7.0.3 + cross-spawn: 7.0.6 signal-exit: 4.1.0 /form-data@4.0.1: @@ -5751,11 +5790,6 @@ packages: resolution: {integrity: sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==} dev: false - /jsesc@0.5.0: - resolution: {integrity: sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==} - hasBin: true - dev: true - /jsesc@3.0.2: resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==} engines: {node: '>=6'} @@ -6572,7 +6606,7 @@ packages: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} - /prettier-plugin-organize-imports@3.2.4(prettier@3.3.2)(typescript@5.6.2): + /prettier-plugin-organize-imports@3.2.4(prettier@3.3.2)(typescript@5.7.3): resolution: {integrity: sha512-6m8WBhIp0dfwu0SkgfOxJqh+HpdyfqSSLfKKRZSFbDuEQXDDndb8fTpRWkUrX/uBenkex3MgnVk0J3b3Y5byog==} peerDependencies: '@volar/vue-language-plugin-pug': ^1.0.4 @@ -6586,7 +6620,7 @@ packages: optional: true dependencies: prettier: 3.3.2 - typescript: 5.6.2 + typescript: 5.7.3 dev: false /prettier@2.8.8: @@ -6792,13 +6826,6 @@ packages: engines: {node: '>= 14.16.0'} dev: true - /regenerate-unicode-properties@10.1.1: - resolution: {integrity: sha512-X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q==} - engines: {node: '>=4'} - dependencies: - regenerate: 1.4.2 - dev: true - /regenerate-unicode-properties@10.2.0: resolution: {integrity: sha512-DqHn3DwbmmPVzeKj9woBadqmXxLvQoQIwu7nopMc72ztvxVmVk2SBhSnx67zuye5TP+lJsb/TBQsjLKhnDf3MA==} engines: {node: '>=4'} @@ -6820,18 +6847,6 @@ packages: '@babel/runtime': 7.24.8 dev: true - /regexpu-core@5.3.2: - resolution: {integrity: sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ==} - engines: {node: '>=4'} - dependencies: - '@babel/regjsgen': 0.8.0 - regenerate: 1.4.2 - regenerate-unicode-properties: 10.1.1 - regjsparser: 0.9.1 - unicode-match-property-ecmascript: 2.0.0 - unicode-match-property-value-ecmascript: 2.1.0 - dev: true - /regexpu-core@6.2.0: resolution: {integrity: sha512-H66BPQMrv+V16t8xtmq+UC0CBpiTBA60V8ibS1QVReIp8T1z8hwFxqcGzm9K6lgsN7sB5edVH8a+ze6Fqm4weA==} engines: {node: '>=4'} @@ -6855,13 +6870,6 @@ packages: jsesc: 3.0.2 dev: true - /regjsparser@0.9.1: - resolution: {integrity: sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==} - hasBin: true - dependencies: - jsesc: 0.5.0 - dev: true - /relateurl@0.2.7: resolution: {integrity: sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog==} engines: {node: '>= 0.10'} @@ -7409,6 +7417,16 @@ packages: typescript: '>=4.2.0' dependencies: typescript: 5.6.2 + dev: true + + /ts-api-utils@1.3.0(typescript@5.7.3): + resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} + engines: {node: '>=16'} + peerDependencies: + typescript: '>=4.2.0' + dependencies: + typescript: 5.7.3 + dev: false /ts-api-utils@2.0.0(typescript@5.6.2): resolution: {integrity: sha512-xCt/TOAc+EOHS1XPnijD3/yzpH6qg2xppZO1YDqGoVsNXfQfzHpOdNuXwrwOU8u4ITXJyDCTyt8w5g1sZv9ynQ==} @@ -7600,7 +7618,6 @@ packages: resolution: {integrity: sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==} engines: {node: '>=14.17'} hasBin: true - dev: true /ufo@1.5.3: resolution: {integrity: sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw==} @@ -7739,7 +7756,7 @@ packages: html-minifier-terser: 6.1.0 node-html-parser: 5.4.2 pathe: 0.2.0 - vite: 5.4.11(terser@5.31.3) + vite: 5.4.11(@types/node@22.13.1)(terser@5.31.3) dev: true /vite@5.3.3: @@ -7777,6 +7794,46 @@ packages: fsevents: 2.3.3 dev: true + /vite@5.4.11(@types/node@22.13.1)(terser@5.31.3): + resolution: {integrity: sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || >=20.0.0 + less: '*' + lightningcss: ^1.21.0 + sass: '*' + sass-embedded: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + '@types/node': 22.13.1 + esbuild: 0.21.5 + postcss: 8.4.49 + rollup: 4.34.2 + terser: 5.31.3 + optionalDependencies: + fsevents: 2.3.3 + dev: true + /vite@5.4.11(terser@5.31.3): resolution: {integrity: sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==} engines: {node: ^18.0.0 || >=20.0.0} From bd9881b9abd6dc6b7fa8fcb693972388cd0f5294 Mon Sep 17 00:00:00 2001 From: Cameron Streete Date: Fri, 14 Mar 2025 16:36:58 +0100 Subject: [PATCH 2/2] docs(changeset): improvements - fixed issue where configuring debugg setting would error due to pupeter not finding "Click anywhere to continue" - added env support for port in minima-cli --- .changeset/flat-tables-remain.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .changeset/flat-tables-remain.md diff --git a/.changeset/flat-tables-remain.md b/.changeset/flat-tables-remain.md new file mode 100644 index 0000000..929dcfe --- /dev/null +++ b/.changeset/flat-tables-remain.md @@ -0,0 +1,10 @@ +--- +"@minima-global/create-minima-app": patch +"@minima-global/minima-cli": patch +--- + +improvements + +- fixed issue where configuring debugg setting would error due to + pupeter not finding "Click anywhere to continue" +- added env support for port in minima-cli