@salla.sa/twilight 2.9.32 → 2.9.33

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.9.32",
3
+ "version": "2.9.33",
4
4
  "description": "Salla Theme Toolkit, Webcomponents, Events, Requests, Utils",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -31,8 +31,8 @@
31
31
  ],
32
32
  "homepage": "https://salla.dev",
33
33
  "dependencies": {
34
- "@salla.sa/base": "^2.9.32",
35
- "@salla.sa/twilight-tailwind-theme": "^2.9.30",
34
+ "@salla.sa/base": "^2.9.33",
35
+ "@salla.sa/twilight-tailwind-theme": "^2.9.33",
36
36
  "axios": "^0.27.2",
37
37
  "infinite-scroll": "^4.0.1",
38
38
  "jwt-decode": "^3.1.2",
@@ -61,5 +61,5 @@
61
61
  "peerDependencies": {
62
62
  "webpack": "^4 || ^5"
63
63
  },
64
- "gitHead": "0445b6d5b088ac79778b452ef6f4662e647c80ca"
64
+ "gitHead": "6cb4dbbffb71b17a635dc591714b33c25c290c09"
65
65
  }
@@ -32,6 +32,8 @@ export interface ProfileResponse extends SuccessResponse {
32
32
  gender?: 'male' | 'female';
33
33
  birthday: string | '2022-02-22';
34
34
  verification?: VerificationStatus; //exists when trying to update email/phone
35
+ pending_orders: number;
36
+ notifications: number;
35
37
  };
36
38
  }
37
39
 
package/watcher.js CHANGED
@@ -106,7 +106,8 @@ class WatcherPlugin {
106
106
  : Object.keys(compiler_.watchFileSystem.watcher.mtimes);
107
107
 
108
108
  files.map((file) => {
109
- if (file.toLowerCase().endsWith(".twig")) this.addToQ(file);
109
+ const FileExt = file.substr(file.length - 5);
110
+ if ([".twig",".json"].includes(FileExt)) this.addToQ(file);
110
111
  });
111
112
  }
112
113
  );
@@ -116,17 +117,17 @@ class WatcherPlugin {
116
117
  * @param {Compiler} compiler
117
118
  */
118
119
  addFilesToWatcher(compiler) {
119
- let filesToWatch = this.getEntry();
120
+ let filesToWatch = [...this.getEntry("src/views","twig"), ...this.getEntry("src","json")];
120
121
  compiler.hooks.afterEmit.tap('afterEmit', compilation =>
121
122
  compilation.fileDependencies = new Set([...compilation.fileDependencies, ...filesToWatch])
122
123
  );
123
124
  }
124
125
 
125
- getEntry() {
126
- let viewsPath = path.join(process.cwd(), "src/views");
126
+ getEntry(folder,type) {
127
+ let viewsPath = path.join(process.cwd(), folder);
127
128
  return this.isWin && this.isWebpack5
128
- ? glob.sync(path.join(viewsPath, "**/*.twig").replace(/\\/g, "/"), {absolute: true}).map((file)=>file.replace(/\//g, "\\"))
129
- : glob.sync(path.join(viewsPath, "**/*.twig"), {absolute: true});
129
+ ? glob.sync(path.join(viewsPath, `**/*.${type}`).replace(/\\/g, "/"), {absolute: true}).map((file)=>file.replace(/\//g, "\\"))
130
+ : glob.sync(path.join(viewsPath, `**/*.${type}`), {absolute: true});
130
131
  }
131
132
 
132
133
  /**