@salla.sa/twilight 2.6.8 → 2.6.10

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salla.sa/twilight",
3
- "version": "2.6.8",
3
+ "version": "2.6.10",
4
4
  "description": "Salla Theme Toolkit, Webcomponents, Events, Requests, Utils",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -6,7 +6,7 @@ export default interface ScopeEvents {
6
6
  onNotFetched: RequestErrorEvent;
7
7
 
8
8
  // POST
9
- onChanged: (callback: (response: ScopeApiResponse.scopeAddition) => void) => void;
9
+ onChangeSucceeded: (callback: (response: ScopeApiResponse.scopeAddition) => void) => void;
10
10
  onChangeFailed: RequestErrorEvent;
11
11
 
12
12
  // Availability
package/watcher.js CHANGED
@@ -1,7 +1,7 @@
1
1
  const path = require('path');
2
2
  const glob = require("glob");
3
3
  const color = {normal: "\x1b[0m", red: "\x1b[31m", green: "\x1b[32m", yellow: "\x1b[33m", cyan: "\x1b[36m",}
4
- const {execSync} = require("child_process");
4
+ const {spawnSync} = require("child_process");
5
5
  const fs = require("fs");
6
6
  const WebSocketClient = require('websocket').client;
7
7
  const WebSocketServer = require("websocket").server;
@@ -100,7 +100,16 @@ class WatcherPlugin {
100
100
  let changes = false;
101
101
  files.map((file)=>{
102
102
  if(file.toLowerCase().endsWith('.twig')){
103
- execSync(`${this.sallaCli} theme sync -f "${file}" -id ${this.theme_id} -store_id ${this.store_id} -draft_id ${this.draft_id} -upload_url ${this.upload_url}`, {stdio: 'inherit'});
103
+ // https://github.com/vercel/pkg/issues/1292
104
+ console.log(spawnSync("salla", [this.sallaCli,
105
+ "theme","sync",
106
+ "-f",file,
107
+ "-id",this.theme_id,
108
+ "-store_id",this.store_id,
109
+ "-draft_id",this.draft_id,
110
+ "-upload_url",this.upload_url,
111
+ "--nohead"
112
+ ]).stdout.toString());
104
113
  changes = true;
105
114
  }
106
115
  });