open-index/open-npm huggingface dataset:
npm package: @pptr/recorder
Description: Interactively record puppeteer scripts
Author: The Chromium Authors
Latest version: 0.0.3

# Puppeteer Recorder

<img src="https://user-images.githubusercontent.com/10379601/29446482-04f7036a-841f-11e7-9872-91d1fc2ea683.png" height="200" align="right">

> :warning: This is still work in progress

> Puppeteer is a Node library which provides a high-level API to control Chrome or Chromium over the [DevTools Protocol](https://chromedevtools.github.io/devtools-protocol/). Puppeteer runs [headless](https://developers.google.com/web/updates/2017/04/headless-chrome) by default, but can be configured to run full (non-headless) Chrome or Chromium.

This repository allows to record puppeteer scripts by interacting with the browser:

```bash
npx @pptr/recorder [url]
```

will start a new browser in which every interaction with the page will be recorded and printed to the console as 
a script runnable via puppeteer.

```js
const {open, click, type, submit} = require('@pptr/recorder');
open('https://www.google.com/?hl=en', async () => {
  await click('ariaName/Search');
  await type('ariaName/Search', 'calculator');
  await click('ariaName/Google Search');
  await click('ariaName/1');
  await click('ariaName/plus');
  await click('ariaName/2');
  await click('ariaName/equals');
});
```

## Architecture

This project consists of three parts:
- __Recorder__: Cli script that starts a Chromium instance to record user interactions
- __Runner__: Npm package to abstract away the puppeteer details when running recorded interactions
- __Injected Script__: The recorder will automatically inject a script into the browser to collect information about interactions and to relay them to the recorder

## Setup

When checking out the repository locally, you can use 

```bash
npm run build
```

to compile the _injected script_, the _recorder_ and the _runner_.
By running `npm link`, the package will become available to be run via `npx`.
When running the recorded scripts, make sure the package is available in their node_modules folder by using `npm link @pptr/recorder`.

## Debugging

Use the runner with `DEBUG=1` to execute the script line by line.

## Known limitations

There are a number of known limitations:
- It's currently not possible to record interactions inside of [shadow doms](https://github.com/puppeteer/recorder/issues/4)
- It only records clicks, changes to text fields and form submits for now
npm package: @pptr/testrunner
Description: Puppeteer testrunner
Author: The Chromium Authors
Latest version: 0.8.0

# TestRunner

This test runner is used internally by Puppeteer to test Puppeteer itself.

- testrunner is a *library*: tests are `node.js` scripts
- parallel wrt IO operations
- supports async/await
- modular
- well-isolated state per execution thread

### Installation

```sh
npm install --save-dev @pptr/testrunner
```

### Example

Save the following as `test.js` and run using `node`:

```sh
node test.js
```

```js
const {TestRunner, Reporter, Matchers} = require('@pptr/testrunner');

// Runner holds and runs all the tests
const runner = new TestRunner({
  parallel: 2, // run 2 parallel threads
  timeout: 1000, // setup timeout of 1 second per test
});
// Simple expect-like matchers
const {expect} = new Matchers();

// Extract jasmine-like DSL into the global namespace
const {describe, xdescribe, fdescribe} = runner;
const {it, fit, xit} = runner;
const {beforeAll, beforeEach, afterAll, afterEach} = runner;

// Test hooks can be async.
beforeAll(async state => {
  state.parallelIndex; // either 0 or 1 in this example, depending on the executing thread
  state.foo = 'bar'; // set state for every test
});

describe('math', () => {
  it('to be sane', async (state, test) => {
    state.parallelIndex; // Very first test will always be ran by the 0's thread
    state.foo; // this will be 'bar'
    expect(2 + 2).toBe(4);
  });
});

// Reporter subscribes to TestRunner events and displays information in terminal
const reporter = new Reporter(runner);

// Run all tests.
runner.run();
```
npm package: @pptr/testserver
Description: testing server
Author: The Chromium Authors
Latest version: 0.5.0

# TestServer

A testing server used to test Puppeteer itself.

### Example

```js
const {TestServer} = require('@pptr/testserver');

(async(() => {
  const httpServer = await TestServer.create(__dirname, 8000),
  const httpsServer = await TestServer.createHTTPS(__dirname, 8001)
  httpServer.setRoute('/hello', (req, res) => {
    res.end('Hello, world!');
  });
  console.log('HTTP and HTTPS servers are running!');
})();
```
npm package: @ppwcode/angular-schematics
Description: PPWCode Angular Schematics
Author: Adriaan Peeters
Latest version: 4.0.0
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# Getting Started With ppwcode schematics

This repository is a ppwcode schematic implementation 
that serves as a starting point to create a ppwcode compliant Angular repository.

### Usage as package

To generate an Angular project with ppw compliant configurations
1. Run `npm install -g @ppwcode/angular-schematics`.
2. Go to your desired directory by running: `cd ./to/your/desired/directory`
2. Run `ng new --collection=@ppwcode/angular-schematics`

### Dev workflow

If you want to test the development code follow the following steps:
1. Run `npm run build` in this project
2. Go to your desired directory by running: `cd ./to/your/desired/directory`
3. Run `ng new --collection=<path_to_this_repo>/dist/collection.json`

### Unit Testing

`npm run test` will run the unit tests, using Jasmine as a runner and test framework.

### Publishing

Publishing is performed by the GitHub workflow.

Do this by browsing to https://github.com/peopleware/angular-ppwcode-schematics/releases
and click "draft a new release".