incremental-compiler 18.0.10 → 18.0.12
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/assets/shared/shared_folder_info.txt +1 -1
- package/browser/esm2022/lib/base-client-compiler.mjs +269 -0
- package/browser/esm2022/lib/change-of-file.mjs +16 -0
- package/browser/esm2022/lib/compiler-manager.mjs +198 -0
- package/browser/esm2022/lib/constants.mjs +4 -0
- package/browser/esm2022/lib/incremental-watcher/incremental-watcher-events.mjs +4 -0
- package/browser/esm2022/lib/incremental-watcher/incremental-watcher-instance.mjs +4 -0
- package/browser/esm2022/lib/incremental-watcher/incremental-watcher-options.mjs +4 -0
- package/browser/esm2022/lib/incremental-watcher/incremental-watcher.mjs +49 -0
- package/browser/esm2022/lib/incremental-watcher/index.mjs +6 -0
- package/browser/esm2022/lib/index.mjs +24 -75
- package/browser/esm2022/lib/models.mjs +1 -3
- package/browser/fesm2022/incremental-compiler.mjs +360 -68
- package/browser/fesm2022/incremental-compiler.mjs.map +1 -1
- package/browser/lib/base-client-compiler.d.ts +56 -0
- package/browser/lib/change-of-file.d.ts +9 -0
- package/browser/lib/compiler-manager.d.ts +17 -0
- package/browser/lib/constants.d.ts +2 -0
- package/browser/lib/incremental-watcher/incremental-watcher-events.d.ts +6 -0
- package/browser/lib/incremental-watcher/incremental-watcher-instance.d.ts +7 -0
- package/browser/lib/incremental-watcher/incremental-watcher-options.d.ts +10 -0
- package/browser/lib/incremental-watcher/incremental-watcher.d.ts +4 -0
- package/browser/lib/incremental-watcher/index.d.ts +4 -0
- package/browser/lib/index.d.ts +24 -1
- package/browser/lib/models.d.ts +7 -6
- package/client/esm2022/lib/base-client-compiler.mjs +269 -0
- package/client/esm2022/lib/change-of-file.mjs +16 -0
- package/client/esm2022/lib/compiler-manager.mjs +198 -0
- package/client/esm2022/lib/constants.mjs +4 -0
- package/client/esm2022/lib/incremental-watcher/incremental-watcher-events.mjs +4 -0
- package/client/esm2022/lib/incremental-watcher/incremental-watcher-instance.mjs +4 -0
- package/client/esm2022/lib/incremental-watcher/incremental-watcher-options.mjs +4 -0
- package/client/esm2022/lib/incremental-watcher/incremental-watcher.mjs +49 -0
- package/client/esm2022/lib/incremental-watcher/index.mjs +6 -0
- package/client/esm2022/lib/index.mjs +24 -75
- package/client/esm2022/lib/models.mjs +1 -3
- package/client/fesm2022/incremental-compiler.mjs +360 -68
- package/client/fesm2022/incremental-compiler.mjs.map +1 -1
- package/client/lib/base-client-compiler.d.ts +56 -0
- package/client/lib/change-of-file.d.ts +9 -0
- package/client/lib/compiler-manager.d.ts +17 -0
- package/client/lib/constants.d.ts +2 -0
- package/client/lib/incremental-watcher/incremental-watcher-events.d.ts +6 -0
- package/client/lib/incremental-watcher/incremental-watcher-instance.d.ts +7 -0
- package/client/lib/incremental-watcher/incremental-watcher-options.d.ts +10 -0
- package/client/lib/incremental-watcher/incremental-watcher.d.ts +4 -0
- package/client/lib/incremental-watcher/index.d.ts +4 -0
- package/client/lib/index.d.ts +24 -1
- package/client/lib/models.d.ts +7 -6
- package/lib/{base-client-compiler.backend.d.ts → base-client-compiler.d.ts} +11 -11
- package/lib/{base-client-compiler.backend.js → base-client-compiler.js} +108 -83
- package/lib/base-client-compiler.js.map +1 -0
- package/lib/change-of-file.d.ts +8 -0
- package/lib/change-of-file.js +27 -0
- package/lib/change-of-file.js.map +1 -0
- package/lib/{compiler-manager.backend.d.ts → compiler-manager.d.ts} +1 -11
- package/lib/compiler-manager.js +220 -0
- package/lib/compiler-manager.js.map +1 -0
- package/lib/incremental-watcher/incremental-watcher.js +14 -10
- package/lib/incremental-watcher/incremental-watcher.js.map +1 -1
- package/lib/incremental-watcher/parcel-watcher-adapter.backend.js +10 -10
- package/lib/incremental-watcher/parcel-watcher-adapter.backend.js.map +1 -1
- package/lib/index._auto-generated_.d.ts +0 -0
- package/lib/index._auto-generated_.js +6 -0
- package/lib/index._auto-generated_.js.map +1 -0
- package/lib/index.d.ts +8 -25
- package/lib/index.js +8 -55
- package/lib/index.js.map +1 -1
- package/lib/models.d.ts +7 -6
- package/package.json +4 -6
- package/taon.jsonc +2 -3
- package/tmp-environment.json +28 -27
- package/websql/esm2022/lib/base-client-compiler.mjs +269 -0
- package/websql/esm2022/lib/change-of-file.mjs +16 -0
- package/websql/esm2022/lib/compiler-manager.mjs +198 -0
- package/websql/esm2022/lib/constants.mjs +4 -0
- package/websql/esm2022/lib/incremental-watcher/incremental-watcher-events.mjs +4 -0
- package/websql/esm2022/lib/incremental-watcher/incremental-watcher-instance.mjs +4 -0
- package/websql/esm2022/lib/incremental-watcher/incremental-watcher-options.mjs +4 -0
- package/websql/esm2022/lib/incremental-watcher/incremental-watcher.mjs +49 -0
- package/websql/esm2022/lib/incremental-watcher/index.mjs +6 -0
- package/websql/esm2022/lib/index.mjs +24 -75
- package/websql/esm2022/lib/models.mjs +1 -3
- package/websql/fesm2022/incremental-compiler.mjs +360 -68
- package/websql/fesm2022/incremental-compiler.mjs.map +1 -1
- package/websql/lib/base-client-compiler.d.ts +56 -0
- package/websql/lib/change-of-file.d.ts +9 -0
- package/websql/lib/compiler-manager.d.ts +17 -0
- package/websql/lib/constants.d.ts +2 -0
- package/websql/lib/incremental-watcher/incremental-watcher-events.d.ts +6 -0
- package/websql/lib/incremental-watcher/incremental-watcher-instance.d.ts +7 -0
- package/websql/lib/incremental-watcher/incremental-watcher-options.d.ts +10 -0
- package/websql/lib/incremental-watcher/incremental-watcher.d.ts +4 -0
- package/websql/lib/incremental-watcher/index.d.ts +4 -0
- package/websql/lib/index.d.ts +24 -1
- package/websql/lib/models.d.ts +7 -6
- package/lib/base-client-compiler.backend.js.map +0 -1
- package/lib/change-of-file.backend.d.ts +0 -14
- package/lib/change-of-file.backend.js +0 -54
- package/lib/change-of-file.backend.js.map +0 -1
- package/lib/compiler-manager.backend.js +0 -307
- package/lib/compiler-manager.backend.js.map +0 -1
- package/lib/decorators.backend.d.ts +0 -5
- package/lib/decorators.backend.js +0 -56
- package/lib/decorators.backend.js.map +0 -1
- package/lib/helpers.backend.d.ts +0 -3
- package/lib/helpers.backend.js +0 -31
- package/lib/helpers.backend.js.map +0 -1
@@ -1,81 +1,373 @@
|
|
1
|
+
import { path, _ } from 'tnp-core/websql';
|
2
|
+
|
3
|
+
class ChangeOfFile {
|
4
|
+
constructor(fileAbsolutePath = void 0, eventName = void 0) {
|
5
|
+
this.fileAbsolutePath = fileAbsolutePath;
|
6
|
+
this.eventName = eventName;
|
7
|
+
this.datetime = new Date();
|
8
|
+
}
|
9
|
+
get fileExt() {
|
10
|
+
return path
|
11
|
+
.extname(this.fileAbsolutePath)
|
12
|
+
.replace('.', '');
|
13
|
+
}
|
14
|
+
}
|
15
|
+
;
|
16
|
+
({}); // @--end-of-file-for-module=incremental-compiler lib/change-of-file.ts
|
17
|
+
|
18
|
+
const COMPILER_POOLING = (process.platform === 'win32') ? {} : {};
|
19
|
+
;
|
20
|
+
({}); // @--end-of-file-for-module=incremental-compiler lib/constants.ts
|
21
|
+
|
22
|
+
;
|
23
|
+
({}); // @--end-of-file-for-module=incremental-compiler lib/incremental-watcher/incremental-watcher-instance.ts
|
24
|
+
|
25
|
+
;
|
26
|
+
({}); // @--end-of-file-for-module=incremental-compiler lib/incremental-watcher/incremental-watcher-options.ts
|
27
|
+
|
1
28
|
/* */
|
2
29
|
/* */
|
3
30
|
/* */
|
4
31
|
/* */
|
32
|
+
async function incrementalWatcher(filePath, watchOptions) {
|
33
|
+
/* */
|
34
|
+
/* */
|
35
|
+
/* */
|
36
|
+
/* */
|
37
|
+
/* */
|
38
|
+
/* */
|
39
|
+
/* */
|
40
|
+
/* */
|
41
|
+
/* */
|
42
|
+
/* */
|
43
|
+
/* */
|
44
|
+
/* */
|
45
|
+
/* */
|
46
|
+
/* */
|
47
|
+
/* */
|
48
|
+
/* */
|
49
|
+
/* */
|
50
|
+
/* */
|
51
|
+
/* */
|
52
|
+
/* */
|
53
|
+
/* */
|
54
|
+
/* */
|
55
|
+
/* */
|
56
|
+
/* */
|
57
|
+
/* */
|
58
|
+
/* */
|
59
|
+
/* */
|
60
|
+
/* */
|
61
|
+
/* */
|
62
|
+
/* */
|
63
|
+
/* */
|
64
|
+
/* */
|
65
|
+
/* */
|
66
|
+
/* */
|
67
|
+
/* */
|
68
|
+
/* */
|
69
|
+
/* */
|
70
|
+
/* */
|
71
|
+
/* */
|
72
|
+
return (void 0);
|
73
|
+
}
|
74
|
+
;
|
75
|
+
({}); // @--end-of-file-for-module=incremental-compiler lib/incremental-watcher/incremental-watcher.ts
|
76
|
+
|
77
|
+
;
|
78
|
+
({}); // @--end-of-file-for-module=incremental-compiler lib/incremental-watcher/index.ts
|
79
|
+
|
5
80
|
/* */
|
6
81
|
/* */
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
/* */
|
11
|
-
/* */
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
/* */
|
37
|
-
/* */
|
38
|
-
/* */
|
39
|
-
/* */
|
40
|
-
/* */
|
41
|
-
/* */
|
42
|
-
/* */
|
43
|
-
/* */
|
44
|
-
/* */
|
45
|
-
/* */
|
46
|
-
/* */
|
47
|
-
/* */
|
48
|
-
/* */
|
49
|
-
/* */
|
50
|
-
/* */
|
51
|
-
/* */
|
52
|
-
/* */
|
53
|
-
|
54
|
-
|
55
|
-
/* */
|
56
|
-
/* */
|
57
|
-
/* */
|
58
|
-
/* */
|
59
|
-
/* */
|
60
|
-
/* */
|
61
|
-
/* */
|
62
|
-
/* */
|
63
|
-
/* */
|
64
|
-
/* */
|
65
|
-
/* */
|
66
|
-
/* */
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
/* */
|
72
|
-
/* */
|
73
|
-
/* */
|
82
|
+
class BaseClientCompiler {
|
83
|
+
constructor() {
|
84
|
+
this.subscribeOnlyFor = [];
|
85
|
+
/* */
|
86
|
+
/* */
|
87
|
+
this.pathResolve = false;
|
88
|
+
this.initedWithOptions = false;
|
89
|
+
this.__folderPath = [];
|
90
|
+
this.lastAsyncFiles = [];
|
91
|
+
this._folderPathContentCheck = [];
|
92
|
+
this.isWatchCompilation = false;
|
93
|
+
this.onlySingleRun = true;
|
94
|
+
}
|
95
|
+
get isInited() {
|
96
|
+
return this.initedWithOptions;
|
97
|
+
}
|
98
|
+
get folderPathContentCheck() {
|
99
|
+
return this._folderPathContentCheck;
|
100
|
+
}
|
101
|
+
set folderPathContentCheck(v) {
|
102
|
+
this._folderPathContentCheck = v;
|
103
|
+
}
|
104
|
+
set folderPath(v) {
|
105
|
+
if (_.isString(v)) {
|
106
|
+
v = [v];
|
107
|
+
}
|
108
|
+
this.__folderPath = v;
|
109
|
+
}
|
110
|
+
get folderPath() {
|
111
|
+
/* */
|
112
|
+
/* */
|
113
|
+
/* */
|
114
|
+
/* */
|
115
|
+
/* */
|
116
|
+
/* */
|
117
|
+
/* */
|
118
|
+
/* */
|
119
|
+
/* */
|
120
|
+
/* */
|
121
|
+
/* */
|
122
|
+
/* */
|
123
|
+
/* */
|
124
|
+
/* */
|
125
|
+
/* */
|
126
|
+
/* */
|
127
|
+
/* */
|
128
|
+
return (void 0);
|
129
|
+
}
|
130
|
+
/* */
|
131
|
+
/* */
|
132
|
+
/* */
|
133
|
+
/* */
|
134
|
+
/* */
|
135
|
+
/* */
|
136
|
+
/* */
|
137
|
+
/* */
|
138
|
+
/* */
|
139
|
+
/* */
|
140
|
+
/* */
|
141
|
+
/* */
|
142
|
+
/**
|
143
|
+
* manually init options (when no passing object to constructor super() )
|
144
|
+
*/
|
145
|
+
initOptions(options) {
|
146
|
+
/* */
|
147
|
+
/* */
|
148
|
+
/* */
|
149
|
+
/* */
|
150
|
+
/* */
|
151
|
+
/* */
|
152
|
+
/* */
|
153
|
+
/* */
|
154
|
+
/* */
|
155
|
+
/* */
|
156
|
+
/* */
|
157
|
+
/* */
|
158
|
+
/* */
|
159
|
+
/* */
|
160
|
+
/* */
|
161
|
+
/* */
|
162
|
+
/* */
|
163
|
+
return (void 0);
|
164
|
+
}
|
165
|
+
/**
|
166
|
+
* do not override this
|
167
|
+
*/
|
168
|
+
async runTask(options) {
|
169
|
+
/* */
|
170
|
+
/* */
|
171
|
+
/* */
|
172
|
+
/* */
|
173
|
+
/* */
|
174
|
+
/* */
|
175
|
+
/* */
|
176
|
+
/* */
|
177
|
+
return (void 0);
|
178
|
+
}
|
179
|
+
/**
|
180
|
+
* @deprecated use runTask instead
|
181
|
+
* Do not override this
|
182
|
+
*/
|
183
|
+
async start(options) {
|
184
|
+
/* */
|
185
|
+
/* */
|
186
|
+
/* */
|
187
|
+
/* */
|
188
|
+
/* */
|
189
|
+
/* */
|
190
|
+
/* */
|
191
|
+
/* */
|
192
|
+
/* */
|
193
|
+
/* */
|
194
|
+
/* */
|
195
|
+
/* */
|
196
|
+
/* */
|
197
|
+
/* */
|
198
|
+
/* */
|
199
|
+
/* */
|
200
|
+
/* */
|
201
|
+
/* */
|
202
|
+
/* */
|
203
|
+
/* */
|
204
|
+
/* */
|
205
|
+
/* */
|
206
|
+
/* */
|
207
|
+
/* */
|
208
|
+
/* */
|
209
|
+
/* */
|
210
|
+
/* */
|
211
|
+
/* */
|
212
|
+
/* */
|
213
|
+
/* */
|
214
|
+
return (void 0);
|
215
|
+
}
|
216
|
+
/**
|
217
|
+
* @deprecated use runTask instead
|
218
|
+
* Do not override this
|
219
|
+
*/
|
220
|
+
async startAndWatch(options) {
|
221
|
+
/* */
|
222
|
+
/* */
|
223
|
+
/* */
|
224
|
+
/* */
|
225
|
+
/* */
|
226
|
+
/* */
|
227
|
+
/* */
|
228
|
+
/* */
|
229
|
+
/* */
|
230
|
+
/* */
|
231
|
+
/* */
|
232
|
+
/* */
|
233
|
+
/* */
|
234
|
+
/* */
|
235
|
+
/* */
|
236
|
+
/* */
|
237
|
+
/* */
|
238
|
+
/* */
|
239
|
+
/* */
|
240
|
+
/* */
|
241
|
+
/* */
|
242
|
+
/* */
|
243
|
+
/* */
|
244
|
+
/* */
|
245
|
+
/* */
|
246
|
+
/* */
|
247
|
+
/* */
|
248
|
+
/* */
|
249
|
+
/* */
|
250
|
+
/* */
|
251
|
+
/* */
|
252
|
+
/* */
|
253
|
+
/* */
|
254
|
+
/* */
|
255
|
+
/* */
|
256
|
+
/* */
|
257
|
+
/* */
|
258
|
+
/* */
|
259
|
+
/* */
|
260
|
+
return (void 0);
|
261
|
+
}
|
262
|
+
/**
|
263
|
+
*
|
264
|
+
* @param absolteFilesPathes for each watched file
|
265
|
+
* @returns
|
266
|
+
*/
|
267
|
+
syncAction(absolteFilesPathes, initalParams) {
|
268
|
+
return void 0;
|
269
|
+
}
|
270
|
+
async preAsyncAction(initalParams) { }
|
271
|
+
asyncAction(asyncEvents, initalParams) {
|
272
|
+
return void 0;
|
273
|
+
}
|
274
|
+
_init(options) {
|
275
|
+
/* */
|
276
|
+
/* */
|
277
|
+
/* */
|
278
|
+
/* */
|
279
|
+
/* */
|
280
|
+
/* */
|
281
|
+
/* */
|
282
|
+
/* */
|
283
|
+
/* */
|
284
|
+
/* */
|
285
|
+
/* */
|
286
|
+
/* */
|
287
|
+
/* */
|
288
|
+
/* */
|
289
|
+
/* */
|
290
|
+
/* */
|
291
|
+
/* */
|
292
|
+
/* */
|
293
|
+
/* */
|
294
|
+
/* */
|
295
|
+
/* */
|
296
|
+
/* */
|
297
|
+
/* */
|
298
|
+
/* */
|
299
|
+
/* */
|
300
|
+
/* */
|
301
|
+
/* */
|
302
|
+
/* */
|
303
|
+
/* */
|
304
|
+
/* */
|
305
|
+
/* */
|
306
|
+
/* */
|
307
|
+
/* */
|
308
|
+
/* */
|
309
|
+
/* */
|
310
|
+
/* */
|
311
|
+
return (void 0);
|
312
|
+
}
|
313
|
+
fixTaskName(taskName) {
|
314
|
+
if (!_.isString(taskName)) {
|
315
|
+
taskName = `task "${this.taskName}"`;
|
316
|
+
}
|
317
|
+
return taskName;
|
318
|
+
}
|
319
|
+
filesToWatch() {
|
320
|
+
/* */
|
321
|
+
/* */
|
322
|
+
/* */
|
323
|
+
/* */
|
324
|
+
/* */
|
325
|
+
/* */
|
326
|
+
/* */
|
327
|
+
/* */
|
328
|
+
/* */
|
329
|
+
/* */
|
330
|
+
/* */
|
331
|
+
/* */
|
332
|
+
/* */
|
333
|
+
/* */
|
334
|
+
return (void 0);
|
335
|
+
}
|
336
|
+
mapForWatching(c) {
|
337
|
+
/* */
|
338
|
+
/* */
|
339
|
+
/* */
|
340
|
+
/* */
|
341
|
+
/* */
|
342
|
+
return (void 0);
|
343
|
+
}
|
344
|
+
}
|
345
|
+
;
|
346
|
+
({}); // @--end-of-file-for-module=incremental-compiler lib/base-client-compiler.ts
|
347
|
+
|
348
|
+
/**
|
349
|
+
* Template for watcher client:
|
350
|
+
* // @ts-ignore
|
351
|
+
* import { IncCompiler } from '../lib';
|
352
|
+
*
|
353
|
+
* export class TestWatcher extends IncCompiler.Base {
|
354
|
+
*
|
355
|
+
* syncAction(files = []) { }
|
356
|
+
* preAsyncAction() { }
|
357
|
+
* asyncAction(change: IncCompiler.Change, additionalData:any ) { }
|
358
|
+
* }
|
359
|
+
*/
|
360
|
+
var IncCompiler;
|
361
|
+
(function (IncCompiler) {
|
362
|
+
IncCompiler.Base = BaseClientCompiler;
|
363
|
+
IncCompiler.Change = ChangeOfFile;
|
364
|
+
})(IncCompiler || (IncCompiler = {}));
|
74
365
|
;
|
75
366
|
({}); // @--end-of-file-for-module=incremental-compiler lib/index.ts
|
76
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi90bXAtbGlicy1mb3ItZGlzdC13ZWJzcWwv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QUNMLEtBQUs7QUFDTCxLQUFLO0FBQ0wsS0FBSztBQUNMLEtBQUs7QUFDTCxLQUFLO0FBR0osQ0FBQztBQUFBLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQyw4REFBOEQiLCJzb3VyY2VzQ29udGVudCI6WyJcblxuaW1wb3J0ICogYXMgbW9kZWxzIGZyb20gJy4vbW9kZWxzJztcbi8qICovXG4vKiAqL1xuLyogKi9cbi8qICovXG4vKiAqL1xuLyogKi9cbi8qICovXG4vKiAqL1xuLyogKi9cbi8qICovXG4vKiAqL1xuLyogKi9cbi8qICovXG4vKiAqL1xuLyogKi9cbi8qICovXG4vKiAqL1xuLyogKi9cbi8qICovXG4vKiAqL1xuLyogKi9cbi8qICovXG4vKiAqL1xuLyogKi9cbi8qICovXG4vKiAqL1xuLyogKi9cbi8qICovXG4vKiAqL1xuLyogKi9cbi8qICovXG4vKiAqL1xuLyogKi9cbi8qICovXG4vKiAqL1xuLyogKi9cbi8qICovXG4vKiAqL1xuLyogKi9cbi8qICovXG4vKiAqL1xuLyogKi9cbi8qICovXG4vKiAqL1xuLyogKi9cbi8qICovXG4vKiAqL1xuLyogKi9cbi8qICovXG4vKiAqL1xuLyogKi9cbi8qICovXG4vKiAqL1xuLyogKi9cbi8qICovXG4vKiAqL1xuLyogKi9cbi8qICovXG4vKiAqL1xuLyogKi9cbi8qICovXG4vKiAqL1xuLyogKi9cbi8qICovXG4vKiAqL1xuLyogKi9cbi8qICovXG4vKiAqL1xuLyogKi9cbi8qICovXG4vKiAqL1xuLyogKi9cbi8qICovXG4gIFxuXG4gOyh7fSk7IC8vIEAtLWVuZC1vZi1maWxlLWZvci1tb2R1bGU9aW5jcmVtZW50YWwtY29tcGlsZXIgbGliL2luZGV4LnRzIl19
|
77
367
|
|
78
368
|
/**
|
79
369
|
* Generated bundle index. Do not edit.
|
80
370
|
*/
|
371
|
+
|
372
|
+
export { BaseClientCompiler, COMPILER_POOLING, ChangeOfFile, IncCompiler, incrementalWatcher };
|
81
373
|
//# sourceMappingURL=incremental-compiler.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"incremental-compiler.mjs","sources":["../../../tmp-libs-for-dist-websql/incremental-compiler/projects/incremental-compiler/src/lib/index.ts","../../../tmp-libs-for-dist-websql/incremental-compiler/projects/incremental-compiler/src/incremental-compiler.ts"],"sourcesContent":["\n\nimport * as models from './models';\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n \n\n ;({}); // @--end-of-file-for-module=incremental-compiler lib/index.ts","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGC,CAAC;AAAA,CAAC,EAAE,EAAE;;;AC9EP;;AAEG"}
|
1
|
+
{"version":3,"file":"incremental-compiler.mjs","sources":["../../../tmp-libs-for-dist-websql/incremental-compiler/projects/incremental-compiler/src/lib/change-of-file.ts","../../../tmp-libs-for-dist-websql/incremental-compiler/projects/incremental-compiler/src/lib/constants.ts","../../../tmp-libs-for-dist-websql/incremental-compiler/projects/incremental-compiler/src/lib/incremental-watcher/incremental-watcher-instance.ts","../../../tmp-libs-for-dist-websql/incremental-compiler/projects/incremental-compiler/src/lib/incremental-watcher/incremental-watcher-options.ts","../../../tmp-libs-for-dist-websql/incremental-compiler/projects/incremental-compiler/src/lib/incremental-watcher/incremental-watcher.ts","../../../tmp-libs-for-dist-websql/incremental-compiler/projects/incremental-compiler/src/lib/incremental-watcher/index.ts","../../../tmp-libs-for-dist-websql/incremental-compiler/projects/incremental-compiler/src/lib/base-client-compiler.ts","../../../tmp-libs-for-dist-websql/incremental-compiler/projects/incremental-compiler/src/lib/index.ts","../../../tmp-libs-for-dist-websql/incremental-compiler/projects/incremental-compiler/src/incremental-compiler.ts"],"sourcesContent":["\n\n\nimport { path, _ } from 'tnp-core/websql';\nimport { CoreModels } from 'tnp-core/websql';\n\n\nexport class ChangeOfFile {\n public readonly datetime: Date;\n\n constructor(\n public fileAbsolutePath: string = void 0,\n public readonly eventName:\n | 'add'\n | 'change'\n | 'unlink'\n | 'unlinkDir' = void 0,\n ) {\n this.datetime = new Date();\n }\n\n public get fileExt(): CoreModels.FileExtension {\n return path\n .extname(this.fileAbsolutePath)\n .replace('.', '') as CoreModels.FileExtension;\n }\n}\n\n ;({}); // @--end-of-file-for-module=incremental-compiler lib/change-of-file.ts","\n\nexport const COMPILER_POOLING = (process.platform === 'win32') ? {\n\n\n\n\n} : {};\n\n\n\n\n ;({}); // @--end-of-file-for-module=incremental-compiler lib/constants.ts","\n\nimport { IncrementalWatcherAllEvents, ListenerForAll, ListenerForSingleEvent } from \"./incremental-watcher-events\";/* */\n/* */\n/* */\n\n\n\nexport interface IncrementalWatcherInstance {\n add(paths: string | ReadonlyArray<string>): void;\n on(event: 'all', listener: ListenerForAll): this;\n\n on(event: IncrementalWatcherAllEvents, listener: ListenerForSingleEvent): this;\n}\n\n ;({}); // @--end-of-file-for-module=incremental-compiler lib/incremental-watcher/incremental-watcher-instance.ts","\n\nimport { WatchOptions } from 'chokidar';\nimport { Matcher } from 'anymatch';\n\nexport interface IncrementalWatcherOptions {\n cwd?: string;\n ignored?: Matcher;\n ignoreInitial?: boolean;\n followSymlinks?: boolean;\n name: string;\n engine?: 'chokidar' | '@parcel/watcher'\n}\n\n ;({}); // @--end-of-file-for-module=incremental-compiler lib/incremental-watcher/incremental-watcher-options.ts","\n\nimport { _, path, frameworkName, Helpers } from 'tnp-core/websql';\nimport { IncrementalWatcherInstance } from './incremental-watcher-instance';\nimport { IncrementalWatcherOptions } from './incremental-watcher-options';\n/* */\n/* */\n/* */\n/* */\n \n\nexport async function incrementalWatcher(\n filePath: string | string[],\n watchOptions: IncrementalWatcherOptions,\n): Promise<IncrementalWatcherInstance> {\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n return (void 0);\n}\n\n ;({}); // @--end-of-file-for-module=incremental-compiler lib/incremental-watcher/incremental-watcher.ts","\n\nexport * from './incremental-watcher-instance';\nexport * from './incremental-watcher-options';\nexport * from './incremental-watcher';\n\n ;({}); // @--end-of-file-for-module=incremental-compiler lib/incremental-watcher/index.ts","\n\n\n/* */\n/* */\n \nimport { path, _, crossPlatformPath } from 'tnp-core/websql';\nimport { ChangeOfFile } from './change-of-file';\nimport { CompilerManager } from './compiler-manager';\nimport { Models } from './models';\nimport { Helpers } from 'tnp-core/websql';\nimport { CLI } from 'tnp-core/websql';\nimport { CoreModels } from 'tnp-core/websql';\n\n\nexport class BaseClientCompiler<INITAL_PARAMS = any>\n implements Models.BaseClientCompilerOptions\n{\n\n public readonly followSymlinks: boolean;\n public readonly subscribeOnlyFor: CoreModels.FileExtension[] = [];\n public readonly executeOutsideScenario: boolean;\n public readonly taskName: string;\n public ignoreFolderPatter?: string[];\n public readonly notifyOnFileUnlink: boolean;\n/* */\n/* */\n \n private pathResolve: boolean = false;\n private initedWithOptions = false;\n private __folderPath: string[] = [];\n public lastAsyncFiles: string[] = [];\n private _folderPathContentCheck: string[] = [];\n isWatchCompilation: boolean = false;\n\n\n\n\n\n\n get isInited() {\n return this.initedWithOptions;\n }\n\n\n\n get folderPathContentCheck() {\n return this._folderPathContentCheck;\n }\n private set folderPathContentCheck(v) {\n this._folderPathContentCheck = v;\n }\n\n\n\n public set folderPath(v) {\n if (_.isString(v)) {\n v = [v];\n }\n this.__folderPath = v;\n }\n public get folderPath(): string[] {\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n return (void 0);\n }\n\n\n\n\n\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n \n\n\n\n /**\n * manually init options (when no passing object to constructor super() )\n */\n protected initOptions(options?: Models.BaseClientCompilerOptions) {\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n return (void 0);\n }\n\n\n protected onlySingleRun = true;\n\n\n /**\n * do not override this\n */\n async runTask(\n options?: { watch?: boolean } & Models.StartAndWatchOptions<INITAL_PARAMS>,\n ): Promise<BaseClientCompiler<INITAL_PARAMS>> {\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n return (void 0);\n }\n\n\n /**\n * @deprecated use runTask instead\n * Do not override this\n */\n public async start(\n options?: Models.StartOptions<INITAL_PARAMS>,\n ): Promise<BaseClientCompiler<INITAL_PARAMS>> {\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n return (void 0);\n }\n\n\n\n /**\n * @deprecated use runTask instead\n * Do not override this\n */\n public async startAndWatch(\n options?: Models.StartAndWatchOptions<INITAL_PARAMS>,\n ): Promise<BaseClientCompiler<INITAL_PARAMS>> {\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n return (void 0);\n }\n\n\n\n /**\n *\n * @param absolteFilesPathes for each watched file\n * @returns\n */\n public syncAction(\n absolteFilesPathes?: string[],\n initalParams?: INITAL_PARAMS,\n ): Promise<void> {\n return void 0;\n }\n\n\n\n public async preAsyncAction(initalParams?: INITAL_PARAMS): Promise<void> {}\n\n\n\n public asyncAction(\n asyncEvents: ChangeOfFile,\n initalParams?: INITAL_PARAMS,\n ): Promise<void> {\n return void 0;\n }\n\n\n\n\n\n\n\n private _init(options?: Models.BaseClientCompilerOptions) {\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n return (void 0);\n }\n\n\n\n private fixTaskName(taskName: string) {\n if (!_.isString(taskName)) {\n taskName = `task \"${this.taskName}\"`;\n }\n return taskName;\n }\n\n\n filesToWatch() {\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n return (void 0);\n }\n\n private mapForWatching(c: string): string[] {\n/* */\n/* */\n/* */\n/* */\n/* */\n return (void 0);\n }\n\n\n}\n\n ;({}); // @--end-of-file-for-module=incremental-compiler lib/base-client-compiler.ts","\n\nimport * as models from './models';\nexport * from './change-of-file';\nexport * from './constants';\nexport * from './incremental-watcher';\nimport * as change from './change-of-file';\nexport * from './base-client-compiler';\nimport * as incBase from './base-client-compiler';\n/* */\n/* */\n \n\nimport { _ } from 'tnp-core/websql';\n/**\n * Template for watcher client:\n * // @ts-ignore\n * import { IncCompiler } from '../lib';\n *\n * export class TestWatcher extends IncCompiler.Base {\n *\n * syncAction(files = []) { }\n * preAsyncAction() { }\n * asyncAction(change: IncCompiler.Change, additionalData:any ) { }\n * }\n */\nexport namespace IncCompiler {\n export import Models = models.Models;\n export import Base = incBase.BaseClientCompiler;\n export import Change = change.ChangeOfFile;\n}\n\n ;({}); // @--end-of-file-for-module=incremental-compiler lib/index.ts","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["incBase.BaseClientCompiler","change.ChangeOfFile"],"mappings":";;MAOa,YAAY,CAAA;AAGvB,IAAA,WAAA,CACS,mBAA2B,KAAK,CAAC,EACxB,SAAA,GAIE,KAAK,CAAC,EAAA;QALjB,IAAgB,CAAA,gBAAA,GAAhB,gBAAgB,CAAiB;QACxB,IAAS,CAAA,SAAA,GAAT,SAAS,CAID;AAExB,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI,IAAI,EAAE,CAAC;KAC5B;AAED,IAAA,IAAW,OAAO,GAAA;AAChB,QAAA,OAAO,IAAI;AACR,aAAA,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC;AAC9B,aAAA,OAAO,CAAC,GAAG,EAAE,EAAE,CAA6B,CAAC;KACjD;AACF,CAAA;AAEA,CAAC;AAA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AG,CAAC;SACtC;AACD,QAAA,OAAO,QAAQ,CAAC;KACjB;IAGD,YAAY,GAAA;;;;;;;;;;;;;;;AAeV,QAAA,QAAQ,KAAK,CAAC,EAAE;KACjB;AAEO,IAAA,cAAc,CAAC,CAAS,EAAA;;;;;;AAM9B,QAAA,QAAQ,KAAK,CAAC,EAAE;KACjB;AAGF,CAAA;AAEA,CAAC;AAAA,CAAC,EAAE,EAAE;;AClVP;;;;;;;;;;;AAWG;AACG,IAAW,YAIhB;AAJD,CAAA,UAAiB,WAAW,EAAA;AAEZ,IAAA,WAAA,CAAA,IAAI,GAAGA,kBAA0B,CAAC;AAClC,IAAA,WAAA,CAAA,MAAM,GAAGC,YAAmB,CAAC;AAC7C,CAAC,EAJgB,WAAW,KAAX,WAAW,GAI3B,EAAA,CAAA,CAAA,CAAA;AAEA,CAAC;AAAA,CAAC,EAAE,EAAE;;AChCP;;AAEG;;;;"}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
// @ts-nocheck
|
2
|
+
import { ChangeOfFile } from './change-of-file';
|
3
|
+
import { Models } from './models';
|
4
|
+
import { CoreModels } from 'tnp-core/websql';
|
5
|
+
export declare class BaseClientCompiler<INITAL_PARAMS = any> implements Models.BaseClientCompilerOptions {
|
6
|
+
readonly followSymlinks: boolean;
|
7
|
+
readonly subscribeOnlyFor: CoreModels.FileExtension[];
|
8
|
+
readonly executeOutsideScenario: boolean;
|
9
|
+
readonly taskName: string;
|
10
|
+
ignoreFolderPatter?: string[];
|
11
|
+
readonly notifyOnFileUnlink: boolean;
|
12
|
+
private pathResolve;
|
13
|
+
private initedWithOptions;
|
14
|
+
private __folderPath;
|
15
|
+
lastAsyncFiles: string[];
|
16
|
+
private _folderPathContentCheck;
|
17
|
+
isWatchCompilation: boolean;
|
18
|
+
get isInited(): boolean;
|
19
|
+
get folderPathContentCheck(): string[];
|
20
|
+
private set folderPathContentCheck(value);
|
21
|
+
set folderPath(v: string[]);
|
22
|
+
get folderPath(): string[];
|
23
|
+
/**
|
24
|
+
* manually init options (when no passing object to constructor super() )
|
25
|
+
*/
|
26
|
+
protected initOptions(options?: Models.BaseClientCompilerOptions): any;
|
27
|
+
protected onlySingleRun: boolean;
|
28
|
+
/**
|
29
|
+
* do not override this
|
30
|
+
*/
|
31
|
+
runTask(options?: {
|
32
|
+
watch?: boolean;
|
33
|
+
} & Models.StartAndWatchOptions<INITAL_PARAMS>): Promise<BaseClientCompiler<INITAL_PARAMS>>;
|
34
|
+
/**
|
35
|
+
* @deprecated use runTask instead
|
36
|
+
* Do not override this
|
37
|
+
*/
|
38
|
+
start(options?: Models.StartOptions<INITAL_PARAMS>): Promise<BaseClientCompiler<INITAL_PARAMS>>;
|
39
|
+
/**
|
40
|
+
* @deprecated use runTask instead
|
41
|
+
* Do not override this
|
42
|
+
*/
|
43
|
+
startAndWatch(options?: Models.StartAndWatchOptions<INITAL_PARAMS>): Promise<BaseClientCompiler<INITAL_PARAMS>>;
|
44
|
+
/**
|
45
|
+
*
|
46
|
+
* @param absolteFilesPathes for each watched file
|
47
|
+
* @returns
|
48
|
+
*/
|
49
|
+
syncAction(absolteFilesPathes?: string[], initalParams?: INITAL_PARAMS): Promise<void>;
|
50
|
+
preAsyncAction(initalParams?: INITAL_PARAMS): Promise<void>;
|
51
|
+
asyncAction(asyncEvents: ChangeOfFile, initalParams?: INITAL_PARAMS): Promise<void>;
|
52
|
+
private _init;
|
53
|
+
private fixTaskName;
|
54
|
+
filesToWatch(): any;
|
55
|
+
private mapForWatching;
|
56
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
// @ts-nocheck
|
2
|
+
import { CoreModels } from 'tnp-core/websql';
|
3
|
+
export declare class ChangeOfFile {
|
4
|
+
fileAbsolutePath: string;
|
5
|
+
readonly eventName: 'add' | 'change' | 'unlink' | 'unlinkDir';
|
6
|
+
readonly datetime: Date;
|
7
|
+
constructor(fileAbsolutePath?: string, eventName?: 'add' | 'change' | 'unlink' | 'unlinkDir');
|
8
|
+
get fileExt(): CoreModels.FileExtension;
|
9
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
// @ts-nocheck
|
2
|
+
import { BaseClientCompiler } from './base-client-compiler';
|
3
|
+
export declare class CompilerManager {
|
4
|
+
private static _instance;
|
5
|
+
static get Instance(): CompilerManager;
|
6
|
+
private clients;
|
7
|
+
private asyncEventScenario;
|
8
|
+
private inited;
|
9
|
+
private filesContentCache;
|
10
|
+
private constructor();
|
11
|
+
syncInit(client: BaseClientCompiler<any>, initalParams: any): Promise<any>;
|
12
|
+
asyncInit(client: BaseClientCompiler<any>, initialParams: any): Promise<any>;
|
13
|
+
private actionForAsyncEvent;
|
14
|
+
addClient(client: BaseClientCompiler<any>): any;
|
15
|
+
private preventAlreadyInited;
|
16
|
+
private fileShouldBeChecked;
|
17
|
+
}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
// @ts-nocheck
|
2
|
+
export type IncrementalWatcherEvents = 'add' | 'addDir' | 'change' | 'unlink' | 'unlinkDir';
|
3
|
+
export type IncrementalWatcherAllEvents = 'all' | IncrementalWatcherEvents;
|
4
|
+
export type ListenerForAll = (eventName: IncrementalWatcherEvents, path: string) => void;
|
5
|
+
export type ListenerForSingleEvent = (path: string) => void;
|
6
|
+
export type Listener = ListenerForAll | ListenerForSingleEvent;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
// @ts-nocheck
|
2
|
+
import { IncrementalWatcherAllEvents, ListenerForAll, ListenerForSingleEvent } from "./incremental-watcher-events";
|
3
|
+
export interface IncrementalWatcherInstance {
|
4
|
+
add(paths: string | ReadonlyArray<string>): void;
|
5
|
+
on(event: 'all', listener: ListenerForAll): this;
|
6
|
+
on(event: IncrementalWatcherAllEvents, listener: ListenerForSingleEvent): this;
|
7
|
+
}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
// @ts-nocheck
|
2
|
+
import { IncrementalWatcherInstance } from './incremental-watcher-instance';
|
3
|
+
import { IncrementalWatcherOptions } from './incremental-watcher-options';
|
4
|
+
export declare function incrementalWatcher(filePath: string | string[], watchOptions: IncrementalWatcherOptions): Promise<IncrementalWatcherInstance>;
|
package/websql/lib/index.d.ts
CHANGED
@@ -1,2 +1,25 @@
|
|
1
1
|
// @ts-nocheck
|
2
|
-
|
2
|
+
import * as models from './models';
|
3
|
+
export * from './change-of-file';
|
4
|
+
export * from './constants';
|
5
|
+
export * from './incremental-watcher';
|
6
|
+
import * as change from './change-of-file';
|
7
|
+
export * from './base-client-compiler';
|
8
|
+
import * as incBase from './base-client-compiler';
|
9
|
+
/**
|
10
|
+
* Template for watcher client:
|
11
|
+
* // @ts-ignore
|
12
|
+
* import { IncCompiler } from '../lib';
|
13
|
+
*
|
14
|
+
* export class TestWatcher extends IncCompiler.Base {
|
15
|
+
*
|
16
|
+
* syncAction(files = []) { }
|
17
|
+
* preAsyncAction() { }
|
18
|
+
* asyncAction(change: IncCompiler.Change, additionalData:any ) { }
|
19
|
+
* }
|
20
|
+
*/
|
21
|
+
export declare namespace IncCompiler {
|
22
|
+
export import Models = models.Models;
|
23
|
+
export import Base = incBase.BaseClientCompiler;
|
24
|
+
export import Change = change.ChangeOfFile;
|
25
|
+
}
|