@voxgig/model 11.1.1 → 12.0.0
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/bin/voxgig-model +7 -5
- package/dist/build.js +0 -7
- package/dist/build.js.map +1 -1
- package/dist/config.d.ts +14 -2
- package/dist/config.js +179 -3
- package/dist/config.js.map +1 -1
- package/dist/init.js +4 -4
- package/dist/init.js.map +1 -1
- package/dist/model.js +6 -50
- package/dist/model.js.map +1 -1
- package/dist/producer/local.js +0 -5
- package/dist/producer/local.js.map +1 -1
- package/dist/producer/model.js +0 -14
- package/dist/producer/model.js.map +1 -1
- package/dist/producer/msg.js +0 -63
- package/dist/producer/msg.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/watch.js +4 -6
- package/dist/watch.js.map +1 -1
- package/model/{sys.aon → sys.aontu} +3 -51
- package/package.json +8 -8
- package/src/build.ts +0 -7
- package/src/config.ts +220 -3
- package/src/init.ts +4 -4
- package/src/model.ts +7 -50
- package/src/producer/local.ts +0 -5
- package/src/producer/model.ts +0 -14
- package/src/producer/msg.ts +0 -63
- package/src/types.ts +0 -3
- package/src/watch.ts +4 -6
- /package/model/.model-config/{model-config.aon → model-config.aontu} +0 -0
package/src/watch.ts
CHANGED
|
@@ -17,6 +17,7 @@ import type {
|
|
|
17
17
|
import { makeBuild } from './build'
|
|
18
18
|
import { FSWatcher } from 'chokidar'
|
|
19
19
|
|
|
20
|
+
import { existsSync } from 'node:fs'
|
|
20
21
|
import { stat } from 'fs/promises'
|
|
21
22
|
|
|
22
23
|
|
|
@@ -108,7 +109,6 @@ class Watch {
|
|
|
108
109
|
|
|
109
110
|
// Check if there have been no recent changes, if so, run build.
|
|
110
111
|
this.intervalId = setInterval(() => {
|
|
111
|
-
// const start = this.startTime
|
|
112
112
|
const now = Date.now()
|
|
113
113
|
const idleDuration = now - this.lastChange.when
|
|
114
114
|
|
|
@@ -117,9 +117,6 @@ class Watch {
|
|
|
117
117
|
// this.lastChange.path !== this.lastTrigger.path
|
|
118
118
|
|
|
119
119
|
if (trigger) {
|
|
120
|
-
// Only add to build queue if we've been idle.
|
|
121
|
-
// This allows external compilation outputting multiple files to complete fully.
|
|
122
|
-
// IMPORTANT: always trigger a new build if there were changes *inside* a build period
|
|
123
120
|
if (this.idle < idleDuration) {
|
|
124
121
|
this.lastTrigger.path = this.lastChange.path
|
|
125
122
|
this.lastTrigger.when = this.lastChange.when
|
|
@@ -216,9 +213,10 @@ class Watch {
|
|
|
216
213
|
files.push(...Object.keys(build.deps[target]))
|
|
217
214
|
}
|
|
218
215
|
|
|
219
|
-
// TODO: remove deleted files
|
|
220
216
|
for (const file of files) {
|
|
221
|
-
|
|
217
|
+
// A dry run's in-memory config is not on disk to be watched.
|
|
218
|
+
if ('string' === typeof file && '' !== file && build.opts.base !== file &&
|
|
219
|
+
existsSync(file)) {
|
|
222
220
|
await this.add(file)
|
|
223
221
|
}
|
|
224
222
|
}
|
|
File without changes
|