pinokiod 3.2.210 → 3.2.212

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.
@@ -6,25 +6,33 @@ class Playwright {
6
6
  let p = this.kernel.path("bin/playwright")
7
7
  await rimraf(p)
8
8
  await fs.promises.mkdir(p, { recursive: true }).catch((e) => { })
9
- await this.kernel.exec({
9
+ await this.kernel.bin.exec({
10
10
  message: [
11
- "npm init -y",
11
+ "npm init -y playwright@latest -- --lang js --quiet --install-deps",
12
12
  //"npm install npm corepack playwright@1.49.1 --loglevel verbose",
13
- "npm install playwright --loglevel verbose",
14
- "playwright install firefox",
13
+ //"npm install playwright --loglevel verbose",
14
+ //"playwright install firefox",
15
15
  // "playwright install chromium",
16
16
  ],
17
+ on: [{
18
+ event: "/error:/i",
19
+ break: false
20
+ }],
17
21
  path: p,
18
22
  env: {
19
23
  PLAYWRIGHT_BROWSERS_PATH: this.kernel.bin.path("playwright/browsers")
20
24
  }
21
25
  }, ondata)
26
+ console.log("INSTALL FINISHED")
27
+ let pwpath = this.kernel.bin.path("playwright/js/node_modules/playwright")
28
+ this.kernel.playwright = (await this.kernel.loader.load(pwpath)).resolved
22
29
  }
23
30
  async installed() {
24
- let browsers = this.kernel.bin.path("playwright/browsers")
25
- let node_modules = this.kernel.bin.path("playwright/node_modules")
31
+ let browsers = this.kernel.path("bin/playwright/browsers")
32
+ let node_modules = this.kernel.path("bin/playwright/js/node_modules/playwright")
26
33
  let e1 = await this.kernel.bin.exists(browsers)
27
34
  let e2 = await this.kernel.bin.exists(node_modules)
35
+ console.log({ e1, e2 })
28
36
  return e1 && e2
29
37
  }
30
38
  async uninstall(req, ondata) {
package/kernel/index.js CHANGED
@@ -544,11 +544,11 @@ class Kernel {
544
544
 
545
545
  let pwpath
546
546
  if (this.platform === "win32") {
547
- pwpath = this.bin.path("playwright/node_modules/playwright")
547
+ pwpath = this.bin.path("playwright/js/node_modules/playwright")
548
548
  } else {
549
- pwpath = this.bin.path("playwright/lib/node_modules/playwright")
549
+ pwpath = this.bin.path("playwright/js/node_modules/playwright")
550
550
  }
551
- this.kernel.playwright = (await this.kernel.loader.load(pwpath)).resolved
551
+ this.playwright = (await this.loader.load(pwpath)).resolved
552
552
 
553
553
 
554
554
  // let pwpath
package/kernel/shell.js CHANGED
@@ -673,7 +673,7 @@ class Shell {
673
673
  if (env_exists) {
674
674
  venv_activation = [
675
675
  (this.platform === "win32" ? `${activate_path} ${env_path}` : `source ${activate_path} ${env_path}`),
676
- (this.platform === 'win32' ? `${timeout} /t 1 > nul` : 'sleep 1'),
676
+ timeout,
677
677
  ]
678
678
  } else {
679
679
  venv_activation = [
@@ -681,9 +681,9 @@ class Shell {
681
681
  (this.platform === "win32" ? `${activate_path} ${env_path}` : `source ${activate_path} ${env_path}`),
682
682
  `python -m pip install --upgrade pip setuptools wheel`,
683
683
  deactivate_path,
684
- (this.platform === 'win32' ? `${timeout} /t 1 > nul` : 'sleep 1'),
684
+ timeout,
685
685
  (this.platform === "win32" ? `${activate_path} ${env_path}` : `source ${activate_path} ${env_path}`),
686
- (this.platform === 'win32' ? `${timeout} /t 1 > nul` : 'sleep 1'),
686
+ timeout,
687
687
  ]
688
688
  }
689
689
  } else {
package/kernel/shells.js CHANGED
@@ -60,8 +60,10 @@ class Shells {
60
60
  // if array, duplicate the action
61
61
  if (Array.isArray(params.message)) {
62
62
  let res
63
+ console.log("params.message", params.message)
63
64
  for(let i=0; i<params.message.length; i++) {
64
65
  let message = params.message[i]
66
+ console.log("Processing message", { message, i })
65
67
  let params_dup = Object.assign({}, params)
66
68
  params_dup.message = message
67
69
  res = await this._launch(params_dup, options, ondata)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.2.210",
3
+ "version": "3.2.212",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {