Skip to content

Releases: heyMP/scratchpad

v1.0.0-next.20

19 Sep 16:02
41dd2f0

Choose a tag to compare

v1.0.0-next.20 Pre-release
Pre-release

Patch Changes

  • 9a81107: Update esbuild depencency

v1.0.0-next.19

02 Aug 16:21
f453797

Choose a tag to compare

v1.0.0-next.19 Pre-release
Pre-release

Patch Changes

  • 02e9e73: Add bypassCSP flag to run command.

    Example:

    scratchpad run test.ts --bypassCSP

v1.0.0-next.18

28 Jul 14:09
cda7165

Choose a tag to compare

v1.0.0-next.18 Pre-release
Pre-release

Patch Changes

  • 2b88c36: File argument for run command optional

    npx @heymp/scratchpad@next run

v1.0.0-next.17

25 May 13:49
80c8090

Choose a tag to compare

v1.0.0-next.17 Pre-release
Pre-release

Minor Changes

  • 96cefea: Add clone command to copy remote files locally

    npx @heymp/scratchpad@next clone https://www.example.com/scripts.js

    Added new generic helper to reroute both document and asset file types.

    scratchpad.config.ts

    export default Scratchpad.defineConfig({
      playwright: async (args) => {
        const { page } = args;
        Scratchpad.rerouteLocal(page, "pages");
      },
    });

v1.0.0-next.16

12 May 15:05
d666e75

Choose a tag to compare

v1.0.0-next.16 Pre-release
Pre-release

Patch Changes

  • 7522bd7: Fix: generate config failing

v1.0.0-next.15

12 May 13:46
d207bdc

Choose a tag to compare

v1.0.0-next.15 Pre-release
Pre-release

Minor Changes

  • 2f0fffb: Add new generate commands

    Generate document

    Fetch HTML source of url and save it to a local file. This is helpful when using the rerouteDocument command.

    npx @heymp/scratchpad@next generate document https://www.example.com pages

    Generate login

    Launch a new browser that saves your session so it can be reused.

    npx @heymp/scratchpad@next generate login

    You can then reuse the session by using the login option when using the run command.

    npx @heymp/scratchpad@next run --login

v1.0.0-next.14

09 May 21:55
3064f5d

Choose a tag to compare

v1.0.0-next.14 Pre-release
Pre-release

Minor Changes

  • 71270e1: Add config and playwright rerouting helpers

    Export defineConfig, rerouteUrl, rerouteDocument.

    Example:

    import * as Scratchpad from "@heymp/scratchpad";
    
    export default Scratchpad.defineConfig({
      devtools: true,
      url: "https://www.redhat.com/en",
      playwright: async (args) => {
        const { page } = args;
        await Scratchpad.rerouteDocument(page, "./pages");
        await Scratchpad.rerouteUrl(page, {
          type: "path",
          target: "**/rh-cta/rh-cta.js",
          source: "./rh-cta.js",
        });
      },
    });

v1.0.0-next.13

13 Apr 17:35
743d41f

Choose a tag to compare

v1.0.0-next.13 Pre-release
Pre-release

Minor Changes

  • 21f3bed: Add global readFile method

    Example

    await readFile("./log.txt", "utf8");

v1.0.0-next.12

23 Mar 14:02
9e0ac3a

Choose a tag to compare

v1.0.0-next.12 Pre-release
Pre-release

Patch Changes

  • 541383a: Fix: logging undefined breaks log output

    fixes: #58

v1.0.0-next.11

08 Aug 14:48
5aca333

Choose a tag to compare

v1.0.0-next.11 Pre-release
Pre-release

Minor Changes

  • 708f25e: Support ts config files

    scratchpad.config.ts

    import { Config } from "@heymp/scratchpad/src/config.js";
    
    export function hi(name: string) {
      console.log(`Hi there ${name}`);
    }
    
    declare global {
      interface Window {
        hi: typeof hi;
      }
    }
    
    export default {
      playwright: async (args) => {
        const { context } = args;
        await context.exposeFunction("hi", hi);
      },
    } satisfies Config;

    test.ts

    /// <reference path="./scratchpad.config.ts" />
    
    window.hi('Bob');