@voxgig/model 4.0.0 → 5.1.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 +152 -31
- package/dist/build.d.ts +21 -0
- package/dist/{lib/build.js → build.js} +30 -19
- package/dist/build.js.map +1 -0
- package/dist/builder/local.js +48 -0
- package/dist/builder/local.js.map +1 -0
- package/dist/{lib/builder → builder}/model.js +13 -13
- package/dist/builder/model.js.map +1 -0
- package/dist/config.d.ts +12 -0
- package/dist/{lib/config.js → config.js} +8 -6
- package/dist/config.js.map +1 -0
- package/dist/model.d.ts +8 -6
- package/dist/model.js +60 -36
- package/dist/model.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types.d.ts +83 -0
- package/dist/types.js +4 -0
- package/dist/types.js.map +1 -0
- package/dist/{lib/watch.d.ts → watch.d.ts} +6 -20
- package/dist/{lib/watch.js → watch.js} +68 -66
- package/dist/watch.js.map +1 -0
- package/package.json +19 -19
- package/dist/lib/build.d.ts +0 -20
- package/dist/lib/build.js.map +0 -1
- package/dist/lib/builder/local.js +0 -76
- package/dist/lib/builder/local.js.map +0 -1
- package/dist/lib/builder/model.js.map +0 -1
- package/dist/lib/config.d.ts +0 -11
- package/dist/lib/config.js.map +0 -1
- package/dist/lib/model-builder.d.ts +0 -0
- package/dist/lib/model-builder.js +0 -2
- package/dist/lib/model-builder.js.map +0 -1
- package/dist/lib/types.d.ts +0 -48
- package/dist/lib/types.js +0 -3
- package/dist/lib/types.js.map +0 -1
- package/dist/lib/util.d.ts +0 -7
- package/dist/lib/util.js +0 -94
- package/dist/lib/util.js.map +0 -1
- package/dist/lib/watch.js.map +0 -1
- package/dist/model.min.js +0 -94
- package/lib/build.ts +0 -138
- package/lib/builder/local.ts +0 -130
- package/lib/builder/model.ts +0 -37
- package/lib/config.ts +0 -50
- package/lib/types.ts +0 -67
- package/lib/watch.ts +0 -301
- package/model.ts +0 -147
- /package/dist/{lib/builder → builder}/local.d.ts +0 -0
- /package/dist/{lib/builder → builder}/model.d.ts +0 -0
package/dist/model.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sourceRoot":"","sources":["../model.ts"],"names":[],"mappings":";AAAA,oDAAoD;;;;;;
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":";AAAA,oDAAoD;;;;;;AAGpD,sDAAwB;AAExB,uCAAyC;AAazC,qCAAiC;AACjC,mCAA+B;AAE/B,2CAA+C;AAC/C,2CAA+C;AAI/C,MAAM,KAAK;IAUT,YAAY,KAAgB;QAL5B,kBAAa,GAAG,KAAK,CAAA;QAMnB,MAAM,IAAI,GAAG,IAAI,CAAA;QACjB,IAAI,CAAC,EAAE,GAAG,KAAK,CAAC,EAAE,IAAI,iBAAE,CAAA;QAExB,MAAM,IAAI,GAAG,IAAA,iBAAU,EAAC,OAAO,EAAE,KAAY,CAAC,CAAA;QAE9C,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAA;QAEvC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,CAAA;QACtC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC;YACb,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI;gBACpC,IAAI,CAAC,SAAS,CAAC,EAAE,GAAG,KAAK,EAAE,GAAG,EAAE,aAAa,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;qBACtD,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;qBACjB,UAAU,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,GAAG,CAAC;SACpC,CAAC,CAAA;QAEF,oDAAoD;QACpD,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,C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IACvF,IAAI,KAAK,GAAG,KAAK,CAAC,IAAI,GAAG,gBAAgB,CAAA;IACzC,IAAI,KAAK,GAAG,KAAK,GAAG,sBAAsB,CAAA;IAE1C;;;;;;;;;;MAUE;IAEF,IAAI,KAAK,GAAc;QACrB,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,KAAK;QACX,GAAG,EAAE;YAEH,iDAAiD;YACjD;gBACE,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,qBAAa;aACrB;YAED,4BAA4B;YAC5B,mBAAmB;SACpB;QACD,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,GAAG;QACH,EAAE;KACH,CAAA;IAED,OAAO,IAAI,eAAM,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;AAC/B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"root":["../src/build.ts","../src/config.ts","../src/model.ts","../src/types.ts","../src/watch.ts","../src/builder/local.ts","../src/builder/model.ts"],"version":"5.6.3"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import Pino from 'pino';
|
|
2
|
+
type Log = ReturnType<typeof Pino>;
|
|
3
|
+
interface Build {
|
|
4
|
+
id: string;
|
|
5
|
+
base: string;
|
|
6
|
+
path: string;
|
|
7
|
+
root: any;
|
|
8
|
+
opts: {
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
};
|
|
11
|
+
res: BuildAction[];
|
|
12
|
+
spec: BuildSpec;
|
|
13
|
+
model: any;
|
|
14
|
+
use: {
|
|
15
|
+
[name: string]: any;
|
|
16
|
+
};
|
|
17
|
+
errs: any[];
|
|
18
|
+
ctx: BuildContext;
|
|
19
|
+
run: (rspec: RunSpec) => Promise<BuildResult>;
|
|
20
|
+
log: Log;
|
|
21
|
+
}
|
|
22
|
+
interface BuildResult {
|
|
23
|
+
ok: boolean;
|
|
24
|
+
builder?: string;
|
|
25
|
+
path?: string;
|
|
26
|
+
build?: Build;
|
|
27
|
+
builders?: BuildResult[];
|
|
28
|
+
step?: string;
|
|
29
|
+
errs?: any[];
|
|
30
|
+
}
|
|
31
|
+
interface BuildAction {
|
|
32
|
+
path: string;
|
|
33
|
+
build: Builder;
|
|
34
|
+
}
|
|
35
|
+
interface BuildContext {
|
|
36
|
+
step: 'pre' | 'post';
|
|
37
|
+
watch: boolean;
|
|
38
|
+
state: Record<string, any>;
|
|
39
|
+
}
|
|
40
|
+
type Builder = (build: Build, ctx: BuildContext) => Promise<BuildResult>;
|
|
41
|
+
interface BuildSpec {
|
|
42
|
+
path?: string;
|
|
43
|
+
base?: string;
|
|
44
|
+
res?: BuildAction[];
|
|
45
|
+
require?: any;
|
|
46
|
+
use?: {
|
|
47
|
+
[name: string]: any;
|
|
48
|
+
};
|
|
49
|
+
log?: Log;
|
|
50
|
+
idle?: number;
|
|
51
|
+
name?: string;
|
|
52
|
+
debug?: boolean | string;
|
|
53
|
+
fs: any;
|
|
54
|
+
}
|
|
55
|
+
type Run = {
|
|
56
|
+
canon: string;
|
|
57
|
+
path: string;
|
|
58
|
+
start: number;
|
|
59
|
+
end: number;
|
|
60
|
+
result?: BuildResult;
|
|
61
|
+
};
|
|
62
|
+
type RunSpec = {
|
|
63
|
+
watch: boolean;
|
|
64
|
+
};
|
|
65
|
+
type Canon = {
|
|
66
|
+
path: string;
|
|
67
|
+
isFolder: boolean;
|
|
68
|
+
when: number;
|
|
69
|
+
};
|
|
70
|
+
type ChangeItem = {
|
|
71
|
+
path: string;
|
|
72
|
+
when: number;
|
|
73
|
+
};
|
|
74
|
+
interface ModelSpec {
|
|
75
|
+
path?: string;
|
|
76
|
+
base?: string;
|
|
77
|
+
require?: any;
|
|
78
|
+
log?: Log;
|
|
79
|
+
idle?: number;
|
|
80
|
+
debug?: boolean | string;
|
|
81
|
+
fs?: any;
|
|
82
|
+
}
|
|
83
|
+
export type { Build, BuildResult, BuildAction, Builder, BuildContext, BuildSpec, Log, Run, Canon, ChangeItem, RunSpec, ModelSpec, };
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA,oDAAoD"}
|
|
@@ -1,23 +1,8 @@
|
|
|
1
|
-
import type { Build, BuildResult } from './types';
|
|
1
|
+
import type { Build, BuildResult, Log, Run, Canon, ChangeItem, BuildSpec } from './types';
|
|
2
2
|
import { FSWatcher } from 'chokidar';
|
|
3
|
-
type Run = {
|
|
4
|
-
canon: string;
|
|
5
|
-
path: string;
|
|
6
|
-
start: number;
|
|
7
|
-
end: number;
|
|
8
|
-
};
|
|
9
|
-
type Canon = {
|
|
10
|
-
path: string;
|
|
11
|
-
isFolder: boolean;
|
|
12
|
-
when: number;
|
|
13
|
-
};
|
|
14
|
-
type ChangeItem = {
|
|
15
|
-
path: string;
|
|
16
|
-
when: number;
|
|
17
|
-
};
|
|
18
3
|
declare class Watch {
|
|
19
4
|
fsw: FSWatcher;
|
|
20
|
-
|
|
5
|
+
wspec: any;
|
|
21
6
|
last?: BuildResult;
|
|
22
7
|
lastChangeTime: number;
|
|
23
8
|
build: Build | undefined;
|
|
@@ -30,16 +15,17 @@ declare class Watch {
|
|
|
30
15
|
running: boolean;
|
|
31
16
|
lastChange: ChangeItem;
|
|
32
17
|
lastTrigger: ChangeItem;
|
|
33
|
-
|
|
18
|
+
log: Log;
|
|
19
|
+
name: string;
|
|
20
|
+
constructor(wspec: BuildSpec, log: Log);
|
|
34
21
|
start(): void;
|
|
35
22
|
canon(path: string): string;
|
|
36
23
|
handleChange(path: string): void;
|
|
37
24
|
drain(): Promise<void>;
|
|
38
25
|
add(path: string): Promise<void>;
|
|
39
26
|
update(br: BuildResult): Promise<void>;
|
|
40
|
-
run(
|
|
27
|
+
run(name: string, watch?: boolean, trigger?: string): Promise<BuildResult>;
|
|
41
28
|
stop(): Promise<void>;
|
|
42
|
-
handleErrors(br: BuildResult): void;
|
|
43
29
|
descDeps(deps: Record<string, Record<string, {
|
|
44
30
|
tar: string;
|
|
45
31
|
}>>): string;
|
|
@@ -9,11 +9,11 @@ const node_path_1 = __importDefault(require("node:path"));
|
|
|
9
9
|
const build_1 = require("./build");
|
|
10
10
|
const chokidar_1 = require("chokidar");
|
|
11
11
|
const promises_1 = require("fs/promises");
|
|
12
|
-
const print = console.log;
|
|
13
|
-
const warn = console.warn;
|
|
14
12
|
class Watch {
|
|
15
|
-
constructor(
|
|
16
|
-
this.
|
|
13
|
+
constructor(wspec, log) {
|
|
14
|
+
this.wspec = wspec;
|
|
15
|
+
this.log = log;
|
|
16
|
+
this.name = wspec.name || 'model';
|
|
17
17
|
this.fsw = new chokidar_1.FSWatcher();
|
|
18
18
|
this.lastChangeTime = 0;
|
|
19
19
|
this.runq = [];
|
|
@@ -24,9 +24,9 @@ class Watch {
|
|
|
24
24
|
this.lastTrigger = { path: '', when: 0 };
|
|
25
25
|
this.running = false;
|
|
26
26
|
this.lastrun = undefined;
|
|
27
|
-
this.idle =
|
|
27
|
+
this.idle = wspec.idle || 111;
|
|
28
28
|
this.fsw.on('change', async (path) => {
|
|
29
|
-
// console.log('CHANGE',
|
|
29
|
+
// console.log('CHANGE:', path)
|
|
30
30
|
this.handleChange(path);
|
|
31
31
|
});
|
|
32
32
|
}
|
|
@@ -36,20 +36,14 @@ class Watch {
|
|
|
36
36
|
this.handleChange('<start>');
|
|
37
37
|
// Check if there have been no recent changes, if so, run build.
|
|
38
38
|
setInterval(() => {
|
|
39
|
-
const start = this.startTime
|
|
39
|
+
// const start = this.startTime
|
|
40
40
|
const now = Date.now();
|
|
41
41
|
const idleDuration = now - this.lastChange.when;
|
|
42
|
-
// Only trigger a build if there was
|
|
43
|
-
const trigger = this.lastChange.when !== this.lastTrigger.when &&
|
|
44
|
-
|
|
45
|
-
// console.log('CHECK-A', {
|
|
46
|
-
// tick: (now - start),
|
|
47
|
-
// idleDuration,
|
|
48
|
-
// trigger,
|
|
49
|
-
// running: this.running,
|
|
50
|
-
// path: this.lastChange.path
|
|
51
|
-
// })
|
|
42
|
+
// Only trigger a build if there was an actual change
|
|
43
|
+
const trigger = this.lastChange.when !== this.lastTrigger.when; // &&
|
|
44
|
+
// this.lastChange.path !== this.lastTrigger.path
|
|
52
45
|
if (trigger) {
|
|
46
|
+
// console.log('TRIGGER', this.idle < idleDuration, this.idle, idleDuration)
|
|
53
47
|
// Only add to build queue if we've been idle.
|
|
54
48
|
// This allows external compilation outputting multiple files to complete fully.
|
|
55
49
|
// IMPORTANT: always trigger a new build if there were changes *inside* a build period
|
|
@@ -58,12 +52,14 @@ class Watch {
|
|
|
58
52
|
this.lastTrigger.when = this.lastChange.when;
|
|
59
53
|
const path = this.lastChange.path;
|
|
60
54
|
const canon = this.canon(path);
|
|
61
|
-
|
|
55
|
+
const entry = {
|
|
62
56
|
canon,
|
|
63
57
|
path,
|
|
64
58
|
start: now,
|
|
65
59
|
end: -1,
|
|
66
|
-
}
|
|
60
|
+
};
|
|
61
|
+
// console.log('RUNQ ENTRY', entry)
|
|
62
|
+
this.runq.push(entry);
|
|
67
63
|
// Defer builds to the event loop to keep idle checking separate.
|
|
68
64
|
setImmediate(this.drain.bind(this));
|
|
69
65
|
}
|
|
@@ -93,20 +89,17 @@ class Watch {
|
|
|
93
89
|
let r;
|
|
94
90
|
// While there are queued runs, run them sequentially
|
|
95
91
|
while (r = this.runq.shift()) {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
let br = await this.run(false, r.canon);
|
|
99
|
-
// console.log('BR', br)
|
|
92
|
+
let br = await this.run(this.name, true, r.canon);
|
|
93
|
+
r.result = br;
|
|
100
94
|
r.end = Date.now();
|
|
101
95
|
this.doneq.push(r);
|
|
102
96
|
this.lastrun = r;
|
|
103
|
-
// console.log('===DRAIN-DONE', this.runq.length, new Date(), r.start, r.canon)
|
|
104
97
|
}
|
|
105
98
|
this.running = false;
|
|
106
99
|
}
|
|
107
100
|
async add(path) {
|
|
108
101
|
if (!node_path_1.default.isAbsolute(path)) {
|
|
109
|
-
path = node_path_1.default.join(this.
|
|
102
|
+
path = node_path_1.default.join(this.wspec.require, path);
|
|
110
103
|
}
|
|
111
104
|
// Ignore if aleady added
|
|
112
105
|
if (this.canons.find((c) => c.path === path)) {
|
|
@@ -120,7 +113,6 @@ class Watch {
|
|
|
120
113
|
};
|
|
121
114
|
this.canons.push(canon);
|
|
122
115
|
this.fsw.add(path);
|
|
123
|
-
// console.log('ADD', canon)
|
|
124
116
|
}
|
|
125
117
|
async update(br) {
|
|
126
118
|
let build = br.build;
|
|
@@ -137,61 +129,71 @@ class Watch {
|
|
|
137
129
|
}
|
|
138
130
|
});
|
|
139
131
|
}
|
|
140
|
-
async run(
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
132
|
+
async run(name, watch, trigger) {
|
|
133
|
+
try {
|
|
134
|
+
this.lastChangeTime = Date.now();
|
|
135
|
+
this.log.info({
|
|
136
|
+
point: 'build-start', last: this.lastChangeTime, watch: name,
|
|
137
|
+
note: 'watch:' + name + ' last:' + new Date(this.lastChangeTime).toISOString()
|
|
138
|
+
});
|
|
139
|
+
this.log.info({
|
|
140
|
+
point: 'build-trigger', trigger,
|
|
141
|
+
note: 'watch:' + name + ' trigger:' + ('' + trigger).replace(process.cwd() + '/', '')
|
|
142
|
+
});
|
|
143
|
+
this.build = this.build || (0, build_1.makeBuild)(this.wspec, this.log);
|
|
144
|
+
let rspec = { watch: true === watch };
|
|
145
|
+
let br = await this.build.run(rspec);
|
|
146
|
+
const deps = this.descDeps(br.build?.root.deps);
|
|
147
|
+
this.log.debug({
|
|
148
|
+
point: 'deps', deps,
|
|
149
|
+
note: 'watch:' + name + ' deps:\n' + deps
|
|
150
|
+
});
|
|
151
|
+
if (br.ok) {
|
|
152
|
+
const rootkeys = Object.keys(br.build?.model).join(';');
|
|
153
|
+
this.log.info({
|
|
154
|
+
point: 'root-keys', keys: rootkeys,
|
|
155
|
+
note: 'watch:' + name + ' keys: ' + rootkeys
|
|
156
|
+
});
|
|
157
|
+
if (watch) {
|
|
158
|
+
// There may be new files.
|
|
159
|
+
await this.update(br);
|
|
160
|
+
}
|
|
161
|
+
this.log.info({
|
|
162
|
+
point: 'build-end', watch: name,
|
|
163
|
+
note: 'watch:' + name + '\n',
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
let errs = br.errs || [new Error('Unknown build error')];
|
|
168
|
+
errs.map((err) => this.log.error({
|
|
169
|
+
fail: 'build', point: 'run-build', build: this, err
|
|
170
|
+
}));
|
|
171
|
+
// console.log('WATCH ERRS', errs)
|
|
159
172
|
}
|
|
173
|
+
this.last = br;
|
|
174
|
+
return br;
|
|
160
175
|
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
176
|
+
catch (err) {
|
|
177
|
+
let br = {
|
|
178
|
+
ok: false,
|
|
179
|
+
errs: [err]
|
|
180
|
+
};
|
|
181
|
+
return br;
|
|
164
182
|
}
|
|
165
|
-
this.last = br;
|
|
166
|
-
return br;
|
|
167
183
|
}
|
|
168
184
|
async stop() {
|
|
169
185
|
await this.fsw.close();
|
|
170
186
|
}
|
|
171
|
-
handleErrors(br) {
|
|
172
|
-
if (br.err) {
|
|
173
|
-
for (let be of br.err) {
|
|
174
|
-
// TODO: print stack if not a model error
|
|
175
|
-
if (be.isVal && be.msg) {
|
|
176
|
-
warn(be.msg);
|
|
177
|
-
}
|
|
178
|
-
// else if (be.message) {
|
|
179
|
-
// warn(be.message)
|
|
180
|
-
// }
|
|
181
|
-
else {
|
|
182
|
-
warn(be);
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
187
|
descDeps(deps) {
|
|
188
188
|
if (null == deps) {
|
|
189
189
|
return '';
|
|
190
190
|
}
|
|
191
|
+
let cwd = process.cwd();
|
|
191
192
|
let desc = [];
|
|
192
193
|
for (let entryPath of Object.keys(deps)) {
|
|
193
194
|
desc.push(' ' + entryPath);
|
|
194
195
|
for (let depPath of Object.keys(deps[entryPath])) {
|
|
196
|
+
depPath = depPath.replace(cwd, '.');
|
|
195
197
|
desc.push(' ' + depPath);
|
|
196
198
|
}
|
|
197
199
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watch.js","sourceRoot":"","sources":["../src/watch.ts"],"names":[],"mappings":";AAAA,oDAAoD;;;;;;AAEpD,0DAA4B;AAc5B,mCAAmC;AACnC,uCAAoC;AAEpC,0CAA4C;AAG5C,MAAM,KAAK;IAkBT,YAAY,KAAgB,EAAE,GAAQ;QACpC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;QAClB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;QAEd,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,OAAO,CAAA;QACjC,IAAI,CAAC,GAAG,GAAG,IAAI,oBAAS,EAAE,CAAA;QAC1B,IAAI,CAAC,cAAc,GAAG,CAAC,CAAA;QACvB,IAAI,CAAC,IAAI,GAAG,EAAE,CAAA;QACd,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;QACf,IAAI,CAAC,MAAM,GAAG,EAAE,CAAA;QAChB,IAAI,CAAC,SAAS,GAAG,CAAC,CAAA;QAClB,IAAI,CAAC,UAAU,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,CAAA;QACvC,IAAI,CAAC,WAAW,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,CAAA;QACxC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAA;QACpB,IAAI,CAAC,OAAO,GAAG,SAAS,CAAA;QAExB,IAAI,CAAC,IAAI,GAAG,KAA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1
1
|
{
|
|
2
2
|
"name": "@voxgig/model",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"main": "dist/model.js",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"types": "dist/model.d.ts",
|
|
@@ -19,16 +19,16 @@
|
|
|
19
19
|
"url": "git://github.com/voxgig/model.git"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
|
-
"test": "
|
|
23
|
-
"
|
|
24
|
-
"test-some": "
|
|
25
|
-
"test-
|
|
22
|
+
"test": "node --enable-source-maps --test dist-test",
|
|
23
|
+
"test22": "node --enable-source-maps --test \"dist-test/*.test.js\"",
|
|
24
|
+
"test-some": "node --enable-source-maps --test-name-pattern=\"$npm_config_pattern\" --test dist-test",
|
|
25
|
+
"test-cov": "rm -rf ./coverage && mkdir -p ./coverage && node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=coverage/lcov.info --enable-source-maps --test \"dist-test/*.test.js\"",
|
|
26
|
+
"watch": "tsc --build src test -w",
|
|
27
|
+
"build": "tsc --build src test",
|
|
26
28
|
"test-model": "voxgig-model test/sys01/model/model.jsonic",
|
|
27
|
-
"model": "voxgig-model model/sys.jsonic",
|
|
28
|
-
"model-build": "voxgig-model model/sys.jsonic
|
|
29
|
-
"
|
|
30
|
-
"build": "tsc -d",
|
|
31
|
-
"clean": "rm -rf node_modules yarn.lock package-lock.json",
|
|
29
|
+
"model": "voxgig-model -w model/sys.jsonic",
|
|
30
|
+
"model-build": "voxgig-model -g debug model/sys.jsonic",
|
|
31
|
+
"clean": "rm -rf node_modules dist dist-test yarn.lock package-lock.json",
|
|
32
32
|
"reset": "npm run clean && npm i && npm run build && npm test",
|
|
33
33
|
"repo-tag": "REPO_VERSION=`node -e \"console.log(require('./package').version)\"` && echo TAG: v$REPO_VERSION && git commit -a -m v$REPO_VERSION && git push && git tag v$REPO_VERSION && git push --tags;",
|
|
34
34
|
"repo-publish": "npm run clean && npm i && npm run repo-publish-quick",
|
|
@@ -44,17 +44,17 @@
|
|
|
44
44
|
"LICENSE"
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
47
|
+
"aontu": "0.25.1",
|
|
48
|
+
"chokidar": "4.0.1",
|
|
49
|
+
"gubu": "^8.3.0"
|
|
50
|
+
},
|
|
51
|
+
"peerDependencies": {
|
|
52
|
+
"@voxgig/util": ">=0",
|
|
53
|
+
"pino": ">=9"
|
|
50
54
|
},
|
|
51
55
|
"devDependencies": {
|
|
52
|
-
"@
|
|
53
|
-
"@types/node": "22.
|
|
54
|
-
"es-jest": "^2.1.0",
|
|
55
|
-
"esbuild": "^0.24.0",
|
|
56
|
-
"esbuild-jest": "^0.5.0",
|
|
57
|
-
"jest": "^29.7.0",
|
|
56
|
+
"@hapi/code": "^9.0.3",
|
|
57
|
+
"@types/node": "22.9.0",
|
|
58
58
|
"typescript": "^5.6.3"
|
|
59
59
|
}
|
|
60
60
|
}
|
package/dist/lib/build.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Val } from 'aontu';
|
|
2
|
-
import type { Build, BuildResult, BuildAction, BuildContext, Spec } from './types';
|
|
3
|
-
declare class BuildImpl implements Build {
|
|
4
|
-
id: string;
|
|
5
|
-
src: string;
|
|
6
|
-
base: string;
|
|
7
|
-
path: string;
|
|
8
|
-
root: any;
|
|
9
|
-
opts: any;
|
|
10
|
-
res: BuildAction[];
|
|
11
|
-
spec: Spec;
|
|
12
|
-
model: any;
|
|
13
|
-
use: {};
|
|
14
|
-
err: any[];
|
|
15
|
-
ctx: BuildContext;
|
|
16
|
-
constructor(spec: Spec);
|
|
17
|
-
run(): Promise<BuildResult>;
|
|
18
|
-
}
|
|
19
|
-
declare function makeBuild(spec: Spec): BuildImpl;
|
|
20
|
-
export { makeBuild, Spec, Val };
|
package/dist/lib/build.js.map
DELETED
|
@@ -1 +0,0 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AAE,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,CAAA;QAEvE,OAAO,EAAE,CAAA;IACX,CAAC;CACF;AAGD,SAAS,SAAS,CAAC,IAAU;IAC3B,OAAO,IAAI,SAAS,CAAC,IAAI,CAAC,CAAA;AAC5B,CAAC"}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.local_builder = void 0;
|
|
7
|
-
const path_1 = __importDefault(require("path"));
|
|
8
|
-
// Runs any builders local to the repo.
|
|
9
|
-
const local_builder = async (build, ctx) => {
|
|
10
|
-
ctx.state.local = (ctx.state.local || {});
|
|
11
|
-
let actionDefs = ctx.state.local.actionDefs;
|
|
12
|
-
if (null == actionDefs) {
|
|
13
|
-
try {
|
|
14
|
-
actionDefs = ctx.state.local.actionDefs = [];
|
|
15
|
-
// TODO: need to provide project root via build
|
|
16
|
-
let root = path_1.default.resolve(build.path, '..', '..');
|
|
17
|
-
// TODO: build should do this
|
|
18
|
-
let configbuild = build.use.config;
|
|
19
|
-
let config = configbuild.watch.last.build.model;
|
|
20
|
-
let builders = config.sys.model.builders;
|
|
21
|
-
// TODO: order by comma sep string
|
|
22
|
-
// Load builders
|
|
23
|
-
for (let name in builders) {
|
|
24
|
-
let builder = builders[name];
|
|
25
|
-
let action_path = path_1.default.join(root, builder.load);
|
|
26
|
-
// clear(action_path)
|
|
27
|
-
let action = require(action_path);
|
|
28
|
-
if (action instanceof Promise) {
|
|
29
|
-
action = await action;
|
|
30
|
-
}
|
|
31
|
-
const step = action.step || 'post';
|
|
32
|
-
actionDefs.push({ name, builder, action, step });
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
catch (e) {
|
|
36
|
-
throw e;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
if ('pre' === ctx.step) {
|
|
40
|
-
try {
|
|
41
|
-
let ok = true;
|
|
42
|
-
let brlog = [];
|
|
43
|
-
for (let actionDef of actionDefs) {
|
|
44
|
-
if ('pre' === actionDef.step || 'all' === actionDef.step) {
|
|
45
|
-
let br = await actionDef.action(build.model, build);
|
|
46
|
-
ok = ok && null != br && br.ok;
|
|
47
|
-
brlog.push(br);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return { ok: true, step: ctx.step, active: true };
|
|
51
|
-
}
|
|
52
|
-
catch (e) {
|
|
53
|
-
throw e;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
else if ('post' === ctx.step) {
|
|
57
|
-
try {
|
|
58
|
-
let ok = true;
|
|
59
|
-
let brlog = [];
|
|
60
|
-
for (let actionDef of actionDefs) {
|
|
61
|
-
if ('post' === actionDef.step || 'all' === actionDef.step) {
|
|
62
|
-
let br = await actionDef.action(build.model, build);
|
|
63
|
-
ok = ok && null != br && br.ok;
|
|
64
|
-
brlog.push(br);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
return { ok: true, step: ctx.step, active: true };
|
|
68
|
-
}
|
|
69
|
-
catch (e) {
|
|
70
|
-
throw e;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
return { ok: false, why: 'bad-step', step: ctx.step, active: false };
|
|
74
|
-
};
|
|
75
|
-
exports.local_builder = local_builder;
|
|
76
|
-
//# sourceMappingURL=local.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"local.js","sourceRoot":"","sources":["../../../lib/builder/local.ts"],"names":[],"mappings":";;;;;;AACA,gDAAuB;AAKvB,uCAAuC;AACvC,MAAM,aAAa,GAAY,KAAK,EAAE,KAAY,EAAE,GAAiB,EAAE,EAAE;IACvE,GAAG,CAAC,KAAK,CAAC,KAAK,GAAG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K,CAAC,IAAI,CAAC,IAAI,GAAG,GAAG,GAAG,QAAQ,GAAG,OAAO,CAAA;QAErD,MAAM,IAAA,oBAAS,EAAC,IAAI,EAAE,IAAI,CAAC,CAAA;QAE3B,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;IACnD,CAAC;IACD,OAAO,CAAM,EAAE,CAAC;QACd,MAAM,CAAC,CAAA;IACT,CAAC;AACH,CAAC,CAAA;AAGC,sCAAa"}
|
package/dist/lib/config.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { BuildResult, Spec } from './types';
|
|
2
|
-
import { Watch } from './watch';
|
|
3
|
-
declare class Config {
|
|
4
|
-
build: any;
|
|
5
|
-
watch: Watch;
|
|
6
|
-
constructor(spec: Spec);
|
|
7
|
-
run(): Promise<BuildResult>;
|
|
8
|
-
start(): Promise<void>;
|
|
9
|
-
stop(): Promise<void>;
|
|
10
|
-
}
|
|
11
|
-
export { Config, Spec };
|
package/dist/lib/config.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../lib/config.ts"],"names":[],"mappings":";AAAA,oDAAoD;;;AAKpD,mCAA+B;AAS/B,MAAM,MAAM;IAIV,YAAY,IAAU;QACpB,IAAI,CAAC,KAAK,GAAG;YACX,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,GAAG,EAAE;gBACH,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC;aACpB;YACD,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAA;QAED,IAAI,CAAC,KAAK,GAAG,IAAI,aAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IACpC,CAAC;IAED,KAAK,CAAC,GAAG;QACP,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,CAAA;IACzC,CAAC;IAED,KAAK,CAAC,KAAK;QACT,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAA;IAC3B,CAAC;IAED,KAAK,CAAC,IAAI;QACR,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAA;IAC1B,CAAC;CACF;AAGQ,wBAAM"}
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"model-builder.js","sourceRoot":"","sources":["../../lib/model-builder.ts"],"names":[],"mappings":""}
|
package/dist/lib/types.d.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
interface Build {
|
|
2
|
-
id: string;
|
|
3
|
-
src: string;
|
|
4
|
-
base: string;
|
|
5
|
-
path: string;
|
|
6
|
-
root: any;
|
|
7
|
-
opts: {
|
|
8
|
-
[key: string]: any;
|
|
9
|
-
};
|
|
10
|
-
res: BuildAction[];
|
|
11
|
-
spec: Spec;
|
|
12
|
-
model: any;
|
|
13
|
-
use: {
|
|
14
|
-
[name: string]: any;
|
|
15
|
-
};
|
|
16
|
-
err: any[];
|
|
17
|
-
ctx: BuildContext;
|
|
18
|
-
run: () => Promise<BuildResult>;
|
|
19
|
-
}
|
|
20
|
-
interface BuildResult {
|
|
21
|
-
ok: boolean;
|
|
22
|
-
builder?: string;
|
|
23
|
-
path?: string;
|
|
24
|
-
build?: Build;
|
|
25
|
-
builders?: BuildResult[];
|
|
26
|
-
step?: string;
|
|
27
|
-
err?: any[];
|
|
28
|
-
}
|
|
29
|
-
interface BuildAction {
|
|
30
|
-
path: string;
|
|
31
|
-
build: Builder;
|
|
32
|
-
}
|
|
33
|
-
interface BuildContext {
|
|
34
|
-
step: 'pre' | 'post';
|
|
35
|
-
state: Record<string, any>;
|
|
36
|
-
}
|
|
37
|
-
type Builder = (build: Build, ctx: BuildContext) => Promise<BuildResult>;
|
|
38
|
-
interface Spec {
|
|
39
|
-
src: string;
|
|
40
|
-
path?: string;
|
|
41
|
-
base?: string;
|
|
42
|
-
res?: BuildAction[];
|
|
43
|
-
require?: any;
|
|
44
|
-
use?: {
|
|
45
|
-
[name: string]: any;
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
export type { Build, BuildResult, BuildAction, Builder, BuildContext, Spec, };
|