Socket
Socket
Sign inDemoInstall

@intuned/runner

Package Overview
Dependencies
Maintainers
4
Versions
309
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@intuned/runner

runner package for intuned functions


Version published
Maintainers
4
Created
Source

To test locally, you can:

  • create index.ts file with the following content:
import type { BrowserContext } from "playwright";

async function run(context: BrowserContext, params: any) {
  const page = await context.newPage();
  await page.goto("https://www.wikipedia.org/");
  await page.getByLabel("Search Wikipedia").click();
  await page.getByLabel("Search Wikipedia").type("ahmad");
  await page.getByLabel("Search Wikipedia").press("Enter");
  await page.goto("https://en.wikipedia.org/wiki/Muslim_world");
  await page.goto("https://www.google.com/");
  return { done: "true", params };
}

export default run;
  • to test cli mode, do yarn intuned-runner.

  • to test web server mode, do yarn intuned-build.

  • to run the output server node ./output/bundle.js and call on port 4000

Notes:

  • you can do yarn intuned-runner --help or yarn intuned-build --help to get cli options.
  • for publishing yarn build and npm publish (for now, faisal only can publish).
  • to test vanilla mode, do the same as the above except the index.ts content and the mode you should pass.
async function userscript(params) {
  return {
    name: "vanilla",
    params,
  };
}

export default userscript;

new commands

yarn intuned-browser-start
yarn intuned-identity-create -j '{"username":"rami@rami.com"}' --pathToSave localSessions/1.json
yarn intuned-identity-check --identityPath localSessions/1.json
yarn intuned-api-run authenticated -j '{}' --identityPath localSessions/1.json

yarn intuned-api-run execution-info -j '{}' playwright

publishing the runner.

  • update the version on the runner package.json
  • run the script on scripts/publish_runner, the script will install dps, build, publish, and update templates.

running an extraction in parallel

  • brew install parallel
  • parallel -j 5 'yarn intuned-api-run -i ./sandbox/input.json authenticated playwright' ::: {1..5}

How to test production

  • yarn intuned-build
  • node ./output/bundle.js
  • use test-api.http and use REST Client to run it.

FAQs

Package last updated on 27 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc