@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/dist/@salla.sa/twilight.min.js +1 -1
- package/dist/@salla.sa/twilight.min.js.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/types/event/scope.d.ts +1 -1
- package/watcher.js +11 -2
package/package.json
CHANGED
package/types/event/scope.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export default interface ScopeEvents {
|
|
|
6
6
|
onNotFetched: RequestErrorEvent;
|
|
7
7
|
|
|
8
8
|
// POST
|
|
9
|
-
|
|
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 {
|
|
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
|
-
|
|
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
|
});
|