puppeteer-browser-ready 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
//! puppeteer-browser-ready v1.0.
|
|
1
|
+
//! puppeteer-browser-ready v1.0.1 ~~ https://github.com/center-key/puppeteer-browser-ready ~~ MIT License
|
|
2
2
|
|
|
3
3
|
/// <reference types="cheerio" />
|
|
4
4
|
import { Browser, HTTPResponse, Page } from 'puppeteer';
|
|
5
5
|
import { Server } from 'http';
|
|
6
|
+
import { SuiteFunction } from 'mocha';
|
|
6
7
|
import httpTerminator from 'http-terminator';
|
|
7
8
|
export type StartWebServerSettings = {
|
|
8
9
|
folder: string;
|
|
@@ -34,6 +35,9 @@ export type BrowserReadySettings = {
|
|
|
34
35
|
verbose: boolean;
|
|
35
36
|
};
|
|
36
37
|
export type BrowserReadyOptions = Partial<BrowserReadySettings>;
|
|
38
|
+
declare global {
|
|
39
|
+
var describe: SuiteFunction;
|
|
40
|
+
}
|
|
37
41
|
declare const browserReady: {
|
|
38
42
|
log(...args: unknown[]): void;
|
|
39
43
|
startWebServer(options?: StartWebServerOptions): Promise<Http>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//! puppeteer-browser-ready v1.0.
|
|
1
|
+
//! puppeteer-browser-ready v1.0.1 ~~ https://github.com/center-key/puppeteer-browser-ready ~~ MIT License
|
|
2
2
|
|
|
3
3
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
4
4
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -15,7 +15,7 @@ import httpTerminator from 'http-terminator';
|
|
|
15
15
|
// Package
|
|
16
16
|
const browserReady = {
|
|
17
17
|
log(...args) {
|
|
18
|
-
const indent = typeof globalThis
|
|
18
|
+
const indent = typeof globalThis.describe === 'function' ? ' [' : '[';
|
|
19
19
|
console.log(indent + new Date().toISOString() + ']', ...args);
|
|
20
20
|
},
|
|
21
21
|
startWebServer(options) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//! puppeteer-browser-ready v1.0.
|
|
1
|
+
//! puppeteer-browser-ready v1.0.1 ~~ https://github.com/center-key/puppeteer-browser-ready ~~ MIT License
|
|
2
2
|
|
|
3
3
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
4
4
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -30,7 +30,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
30
30
|
// Package
|
|
31
31
|
const browserReady = {
|
|
32
32
|
log(...args) {
|
|
33
|
-
const indent = typeof globalThis
|
|
33
|
+
const indent = typeof globalThis.describe === 'function' ? ' [' : '[';
|
|
34
34
|
console.log(indent + new Date().toISOString() + ']', ...args);
|
|
35
35
|
},
|
|
36
36
|
startWebServer(options) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "puppeteer-browser-ready",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Simple utility to go to a URL and wait for the HTTP response",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
},
|
|
67
67
|
"runScriptsConfig": {
|
|
68
68
|
"build": [
|
|
69
|
-
"rimraf build dist
|
|
69
|
+
"rimraf build dist",
|
|
70
70
|
"jshint . --exclude-path .gitignore",
|
|
71
71
|
"eslint --max-warnings 0 . --ext .ts",
|
|
72
72
|
"tsc",
|
|
@@ -91,22 +91,23 @@
|
|
|
91
91
|
"devDependencies": {
|
|
92
92
|
"@types/cheerio": "~0.22",
|
|
93
93
|
"@types/express": "~4.17",
|
|
94
|
-
"@types/
|
|
94
|
+
"@types/mocha": "~10.0",
|
|
95
|
+
"@types/node": "~18.15",
|
|
95
96
|
"@types/ws": "~8.5",
|
|
96
|
-
"@typescript-eslint/eslint-plugin": "~5.
|
|
97
|
-
"@typescript-eslint/parser": "~5.
|
|
97
|
+
"@typescript-eslint/eslint-plugin": "~5.56",
|
|
98
|
+
"@typescript-eslint/parser": "~5.56",
|
|
98
99
|
"add-dist-header": "~1.0",
|
|
99
100
|
"assert-deep-strict-equal": "~1.0",
|
|
100
101
|
"copy-file-util": "~1.0",
|
|
101
102
|
"copy-folder-util": "~1.0",
|
|
102
|
-
"eslint": "~8.
|
|
103
|
+
"eslint": "~8.36",
|
|
103
104
|
"jshint": "~2.13",
|
|
104
105
|
"mocha": "~10.2",
|
|
105
106
|
"open": "~8.4",
|
|
106
107
|
"puppeteer": "~19.7",
|
|
107
|
-
"rimraf": "
|
|
108
|
-
"run-scripts-util": "~0
|
|
109
|
-
"typescript": "~
|
|
108
|
+
"rimraf": "~4.4",
|
|
109
|
+
"run-scripts-util": "~1.0",
|
|
110
|
+
"typescript": "~5.0",
|
|
110
111
|
"w3c-html-validator": "~1.3"
|
|
111
112
|
}
|
|
112
113
|
}
|