single-file-cli 2.0.3 → 2.0.4

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.
@@ -25,7 +25,7 @@
25
25
 
26
26
  import { launchBrowser, closeBrowser } from "./chromium-browser.js";
27
27
  import { getScriptSource, getHookScriptSource } from "./single-file-script.js";
28
- import { getCDP } from "../deno-polyfill.js";
28
+ import { CDP } from "simple-cdp";
29
29
 
30
30
  const LOAD_TIMEOUT_ERROR = "ERR_LOAD_TIMEOUT";
31
31
  const NETWORK_IDLE_STATE = "networkIdle";
@@ -42,7 +42,6 @@ async function initialize(options) {
42
42
 
43
43
  async function getPageData(options) {
44
44
  let targetInfo;
45
- const CDP = await getCDP();
46
45
  try {
47
46
  const targetInfo = await CDP.createTarget({ url: EMPTY_PAGE_URL });
48
47
  const { Browser, Security, Page, Emulation, Fetch, Network, Runtime, Debugger } = new CDP(targetInfo);
package/deno-polyfill.js CHANGED
@@ -24,7 +24,6 @@
24
24
  /* global globalThis, URL, Deno, process */
25
25
 
26
26
  import * as path from "path";
27
- import { CDP } from "simple-cdp";
28
27
 
29
28
  const DENO_RUNTIME_DETECTED = typeof Deno !== "undefined";
30
29
 
@@ -55,8 +54,7 @@ export {
55
54
  errors,
56
55
  Command,
57
56
  toFileUrl,
58
- dirname,
59
- getCDP
57
+ dirname
60
58
  };
61
59
 
62
60
  const args = DENO_RUNTIME_DETECTED ? Deno.args : process.argv.slice(2);
@@ -66,7 +64,7 @@ const stdout = {
66
64
  };
67
65
 
68
66
  const build = {
69
- os: DENO_RUNTIME_DETECTED ? Deno.build.os : process.platform
67
+ os: DENO_RUNTIME_DETECTED ? Deno.build.os : process.platform == "win32" ? "windows" : process.platform
70
68
  };
71
69
 
72
70
  const errors = {
@@ -210,14 +208,6 @@ async function dirname(filePath) {
210
208
  }
211
209
  }
212
210
 
213
- async function getCDP() {
214
- if (DENO_RUNTIME_DETECTED) {
215
- return CDP;
216
- } else {
217
- return CDP;
218
- }
219
- }
220
-
221
211
  function getNPMModule(module) {
222
212
  return NPM_MODULES[module];
223
213
  }
package/deno.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@single-file/single-file-cli",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "description": "SingleFile CLI",
5
5
  "nodeModulesDir": true,
6
6
  "exports": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "single-file-cli",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "description": "SingleFile CLI",
5
5
  "author": "Gildas Lormeau",
6
6
  "engines": {