@glissade/cli 0.47.0-pre.0 → 0.47.0-pre.1
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/describeLint.js +186 -2
- package/dist/typedSdk.js +1 -0
- package/package.json +10 -10
package/dist/describeLint.js
CHANGED
|
@@ -8,6 +8,174 @@ import { usageArity } from "@glissade/scene/describe";
|
|
|
8
8
|
*/
|
|
9
9
|
const RUNTIME_TYPE_ALLOWLIST = /* @__PURE__ */ new Set([]);
|
|
10
10
|
/**
|
|
11
|
+
* PUBLIC runtime exports that are intentionally NOT authoring surface, so they need
|
|
12
|
+
* not appear in describe().surface — the curated exempt-list that makes the
|
|
13
|
+
* BIDIRECTIONAL "no-MISSING" gate precise. Grouped by rationale. A NEW public export
|
|
14
|
+
* that fits none of these (nor a pattern below) must be added to describe()'s surface
|
|
15
|
+
* (authoring) OR here (internal), or `check:describe` fails — which is exactly how an
|
|
16
|
+
* omission (a real authoring export absent from surface, red-lining valid no-build
|
|
17
|
+
* code under the ambient .d.ts) is now caught instead of staying silently green.
|
|
18
|
+
*/
|
|
19
|
+
const EXEMPT_INTERNALS = new Set([
|
|
20
|
+
"Canvas2DBackend",
|
|
21
|
+
"Custom",
|
|
22
|
+
"Echo",
|
|
23
|
+
"FollowPath",
|
|
24
|
+
"GsPlayerElement",
|
|
25
|
+
"Highlight",
|
|
26
|
+
"ImageNode",
|
|
27
|
+
"LookAt",
|
|
28
|
+
"MotionBlur",
|
|
29
|
+
"Node",
|
|
30
|
+
"OrientToPath",
|
|
31
|
+
"Raster2D",
|
|
32
|
+
"ShaderEffect",
|
|
33
|
+
"TextCursor",
|
|
34
|
+
"TrackMatte",
|
|
35
|
+
"ALL_FILTER_KINDS",
|
|
36
|
+
"DEFAULT_EASE",
|
|
37
|
+
"EXPR_CONSTANTS",
|
|
38
|
+
"EXPR_FUNCTIONS",
|
|
39
|
+
"IDENTITY",
|
|
40
|
+
"MEASURE_QUANTUM_PX",
|
|
41
|
+
"MESH_DOWNSCALE",
|
|
42
|
+
"MESH_SHEPARD_POWER",
|
|
43
|
+
"MESH_SIGMA",
|
|
44
|
+
"NODE_TAXONOMY",
|
|
45
|
+
"TARGET_PATH",
|
|
46
|
+
"easingDerivatives",
|
|
47
|
+
"estimatingMeasurer",
|
|
48
|
+
"springPresets",
|
|
49
|
+
"clockDriver",
|
|
50
|
+
"scrollDriver",
|
|
51
|
+
"createPlayhead",
|
|
52
|
+
"createDisplayListBuilder",
|
|
53
|
+
"getLayoutEngine",
|
|
54
|
+
"setLayoutEngine",
|
|
55
|
+
"requireLayoutEngine",
|
|
56
|
+
"loadYogaLayoutEngine",
|
|
57
|
+
"swapOnHmr",
|
|
58
|
+
"setScheduler",
|
|
59
|
+
"synchronousScheduler",
|
|
60
|
+
"setDefaultMeasurer",
|
|
61
|
+
"setDevWarning",
|
|
62
|
+
"defineGsPlayer",
|
|
63
|
+
"buildFontRegistry",
|
|
64
|
+
"setShaderRunner",
|
|
65
|
+
"bake",
|
|
66
|
+
"bakeCheckpointed",
|
|
67
|
+
"batch",
|
|
68
|
+
"beginReadPhase",
|
|
69
|
+
"endReadPhase",
|
|
70
|
+
"inReadPhase",
|
|
71
|
+
"bindScene",
|
|
72
|
+
"bindTimeline",
|
|
73
|
+
"buildTimeline",
|
|
74
|
+
"compileExpr",
|
|
75
|
+
"compileTimeline",
|
|
76
|
+
"computed",
|
|
77
|
+
"collapseReplacer",
|
|
78
|
+
"evaluateAt",
|
|
79
|
+
"getTimelineCallbacks",
|
|
80
|
+
"sampleTrack",
|
|
81
|
+
"validateTrack",
|
|
82
|
+
"withDeterminismGuards",
|
|
83
|
+
"untracked",
|
|
84
|
+
"revealSchedule",
|
|
85
|
+
"registerExamples",
|
|
86
|
+
"listComponents",
|
|
87
|
+
"isDurationEditable",
|
|
88
|
+
"isEditableNodeId",
|
|
89
|
+
"targetNodeId",
|
|
90
|
+
"resolveTweenTarget",
|
|
91
|
+
"drawOn",
|
|
92
|
+
"drawOnEach",
|
|
93
|
+
"__resetEstimateWarnings",
|
|
94
|
+
"applyToPoint",
|
|
95
|
+
"arcLength",
|
|
96
|
+
"assertFiniteFontSize",
|
|
97
|
+
"audioOffsetSamples",
|
|
98
|
+
"breakLines",
|
|
99
|
+
"childId",
|
|
100
|
+
"coercePathData",
|
|
101
|
+
"collectLocalizedTextUsages",
|
|
102
|
+
"collectTextUsages",
|
|
103
|
+
"cubicBezierDerivative",
|
|
104
|
+
"driftLoop",
|
|
105
|
+
"each",
|
|
106
|
+
"emitDevWarning",
|
|
107
|
+
"filtersToCanvasFilter",
|
|
108
|
+
"flatten",
|
|
109
|
+
"fontString",
|
|
110
|
+
"formatColor",
|
|
111
|
+
"fromTRS",
|
|
112
|
+
"hachureLines",
|
|
113
|
+
"invert",
|
|
114
|
+
"isEstimatingMeasurer",
|
|
115
|
+
"isExemptFamily",
|
|
116
|
+
"lerpColor",
|
|
117
|
+
"listValueTypes",
|
|
118
|
+
"matEquals",
|
|
119
|
+
"mediaPrefersReducedMotion",
|
|
120
|
+
"meshRasterSize",
|
|
121
|
+
"multiply",
|
|
122
|
+
"oklabToRgba",
|
|
123
|
+
"parseCmap",
|
|
124
|
+
"parseColor",
|
|
125
|
+
"parseSvgPathData",
|
|
126
|
+
"pathFromSegs",
|
|
127
|
+
"pathLength",
|
|
128
|
+
"planReducedMotion",
|
|
129
|
+
"pointAtLength",
|
|
130
|
+
"quantize",
|
|
131
|
+
"random",
|
|
132
|
+
"rasterizeMesh",
|
|
133
|
+
"reprOf",
|
|
134
|
+
"resolveAnchor",
|
|
135
|
+
"resolveEase",
|
|
136
|
+
"resolveEaseDerivative",
|
|
137
|
+
"resolveSketch",
|
|
138
|
+
"rgbaToOklab",
|
|
139
|
+
"roughen",
|
|
140
|
+
"roundedRectSegs",
|
|
141
|
+
"segmentGraphemes",
|
|
142
|
+
"segmentWords",
|
|
143
|
+
"sketchStrokes",
|
|
144
|
+
"springEasing",
|
|
145
|
+
"springEasingDerivative",
|
|
146
|
+
"textCursor",
|
|
147
|
+
"transitionToClip",
|
|
148
|
+
"usageArity",
|
|
149
|
+
"validateFilters",
|
|
150
|
+
"validateFonts",
|
|
151
|
+
"validateHachure",
|
|
152
|
+
"validateSceneFonts",
|
|
153
|
+
"validateSketch",
|
|
154
|
+
"vec2Equals",
|
|
155
|
+
"vec2Signal",
|
|
156
|
+
"velocityAt"
|
|
157
|
+
]);
|
|
158
|
+
/**
|
|
159
|
+
* PATTERN-exempt runtime exports (no per-name entry needed): error classes
|
|
160
|
+
* (`…Error`), the value-type registry + its accessors (`…Type`), and the ESM
|
|
161
|
+
* `default` binding. Everything else must be surfaced or in {@link EXEMPT_INTERNALS}.
|
|
162
|
+
*/
|
|
163
|
+
function isExemptPattern(name) {
|
|
164
|
+
return name === "default" || /Error$/.test(name) || /Type$/.test(name);
|
|
165
|
+
}
|
|
166
|
+
/** Whether a public runtime export is intentionally NOT part of describe().surface. */
|
|
167
|
+
function isExemptFromSurface(name) {
|
|
168
|
+
return isExemptPattern(name) || EXEMPT_INTERNALS.has(name);
|
|
169
|
+
}
|
|
170
|
+
/** Every name the manifest presents as authoring surface (surface entries + node/helper names). */
|
|
171
|
+
function surfacedNames(manifest) {
|
|
172
|
+
const surfaced = /* @__PURE__ */ new Set();
|
|
173
|
+
for (const e of manifest.surface ?? []) surfaced.add(e.name);
|
|
174
|
+
for (const n of Object.keys(manifest.nodes)) surfaced.add(n);
|
|
175
|
+
for (const h of manifest.helpers) surfaced.add(h.name);
|
|
176
|
+
return surfaced;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
11
179
|
* Reconcile a describe() manifest against a runtime surface record. Returns every
|
|
12
180
|
* violation (empty = clean); the CLI prints them and exits non-zero.
|
|
13
181
|
*
|
|
@@ -19,7 +187,12 @@ const RUNTIME_TYPE_ALLOWLIST = /* @__PURE__ */ new Set([]);
|
|
|
19
187
|
* (c) arity: a documented callable must not REQUIRE materially more positional
|
|
20
188
|
* args than its usage advertises (`Function.length > documented total + 1`;
|
|
21
189
|
* tolerant by one — a trailing optional like `measurer` legitimately lifts
|
|
22
|
-
* `Function.length`)
|
|
190
|
+
* `Function.length`);
|
|
191
|
+
* (d) NO-MISSING (the BIDIRECTIONAL half): every PUBLIC runtime export on the
|
|
192
|
+
* bundle must be SURFACED or explicitly exempt ({@link isExemptFromSurface}) —
|
|
193
|
+
* an omission (a real authoring export absent from surface, which red-lines
|
|
194
|
+
* valid no-build code under the ambient .d.ts) fails here. Without (d) the gate
|
|
195
|
+
* could only catch PHANTOMS, never OMISSIONS — the class it was scoped to gate.
|
|
23
196
|
*/
|
|
24
197
|
function describeLint(manifest, surface, opts = {}) {
|
|
25
198
|
const exempt = opts.exempt ?? /* @__PURE__ */ new Set();
|
|
@@ -63,6 +236,15 @@ function describeLint(manifest, surface, opts = {}) {
|
|
|
63
236
|
detail: `window.glissade.${h.name} takes ${fn.length} params but its usage documents ${total} — update describe()'s usage or the signature`
|
|
64
237
|
});
|
|
65
238
|
}
|
|
239
|
+
const surfaced = surfacedNames(manifest);
|
|
240
|
+
for (const name of Object.keys(surface).sort()) {
|
|
241
|
+
if (surfaced.has(name) || exempt.has(name) || isExemptFromSurface(name)) continue;
|
|
242
|
+
out.push({
|
|
243
|
+
kind: "unsurfaced",
|
|
244
|
+
name,
|
|
245
|
+
detail: `on window.glissade but absent from describe().surface — add it to buildSurface() (an authoring export) or the exempt-list in describeLint.ts (an internal)`
|
|
246
|
+
});
|
|
247
|
+
}
|
|
66
248
|
return out;
|
|
67
249
|
}
|
|
68
250
|
/**
|
|
@@ -78,9 +260,11 @@ function describeLint(manifest, surface, opts = {}) {
|
|
|
78
260
|
async function collectRuntimeSurface(manifest) {
|
|
79
261
|
const modules = new Set([
|
|
80
262
|
"@glissade/core",
|
|
263
|
+
"@glissade/core/clips",
|
|
81
264
|
"@glissade/scene",
|
|
82
265
|
"@glissade/scene/describe",
|
|
83
|
-
"@glissade/scene/layout-ctors"
|
|
266
|
+
"@glissade/scene/layout-ctors",
|
|
267
|
+
"@glissade/scene/path"
|
|
84
268
|
]);
|
|
85
269
|
for (const h of manifest.helpers) modules.add(h.import);
|
|
86
270
|
const surface = {};
|
package/dist/typedSdk.js
CHANGED
|
@@ -250,6 +250,7 @@ function generateAmbientDts(manifest) {
|
|
|
250
250
|
L.push(`/** Construction props for \`new glissade.${node}({ … })\` (best-effort; opaque prop types → \`unknown\`). */`);
|
|
251
251
|
L.push(`interface ${propsInterfaceName(node)} {`);
|
|
252
252
|
for (const prop of Object.keys(props).sort()) L.push(` ${JSON.stringify(prop)}?: ${ambientPropType(props[prop].type)};`);
|
|
253
|
+
L.push(" [prop: string]: unknown;");
|
|
253
254
|
L.push("}");
|
|
254
255
|
L.push("");
|
|
255
256
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glissade/cli",
|
|
3
|
-
"version": "0.47.0-pre.
|
|
3
|
+
"version": "0.47.0-pre.1",
|
|
4
4
|
"description": "glissade CLI: headless rendering via backend-skia (+ FFmpeg mux).",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"engines": {
|
|
@@ -28,15 +28,15 @@
|
|
|
28
28
|
"@napi-rs/canvas": "^0.1.65",
|
|
29
29
|
"esbuild": "0.28.0",
|
|
30
30
|
"jiti": "^2.4.2",
|
|
31
|
-
"@glissade/backend-skia": "0.47.0-pre.
|
|
32
|
-
"@glissade/core": "0.47.0-pre.
|
|
33
|
-
"@glissade/interact": "0.47.0-pre.
|
|
34
|
-
"@glissade/lottie": "0.47.0-pre.
|
|
35
|
-
"@glissade/narrate": "0.47.0-pre.
|
|
36
|
-
"@glissade/player": "0.47.0-pre.
|
|
37
|
-
"@glissade/scene": "0.47.0-pre.
|
|
38
|
-
"@glissade/sfx": "0.47.0-pre.
|
|
39
|
-
"@glissade/svg": "0.47.0-pre.
|
|
31
|
+
"@glissade/backend-skia": "0.47.0-pre.1",
|
|
32
|
+
"@glissade/core": "0.47.0-pre.1",
|
|
33
|
+
"@glissade/interact": "0.47.0-pre.1",
|
|
34
|
+
"@glissade/lottie": "0.47.0-pre.1",
|
|
35
|
+
"@glissade/narrate": "0.47.0-pre.1",
|
|
36
|
+
"@glissade/player": "0.47.0-pre.1",
|
|
37
|
+
"@glissade/scene": "0.47.0-pre.1",
|
|
38
|
+
"@glissade/sfx": "0.47.0-pre.1",
|
|
39
|
+
"@glissade/svg": "0.47.0-pre.1"
|
|
40
40
|
},
|
|
41
41
|
"repository": {
|
|
42
42
|
"type": "git",
|