@salla.sa/twilight 2.9.32 → 2.9.34
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 +2 -2
- 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 +4 -4
- package/types/api/profile.d.ts +2 -0
- package/watcher.js +7 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salla.sa/twilight",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.34",
|
|
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.
|
|
35
|
-
"@salla.sa/twilight-tailwind-theme": "^2.9.
|
|
34
|
+
"@salla.sa/base": "^2.9.34",
|
|
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": "
|
|
64
|
+
"gitHead": "4047d5f663b1159b495d8898b3441fc037b7c4ac"
|
|
65
65
|
}
|
package/types/api/profile.d.ts
CHANGED
|
@@ -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
|
-
|
|
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(),
|
|
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,
|
|
129
|
-
: glob.sync(path.join(viewsPath,
|
|
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
|
/**
|