@defold-typescript/library-types 0.23.0 → 0.24.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/api-doc/boom.json +3870 -0
- package/api-doc/bridge.json +10 -5
- package/api-doc/bzAnim.json +338 -0
- package/api-doc/decore.json +1 -1
- package/api-doc/defcon.json +150 -0
- package/api-doc/{defmath.defmath.json → defmath.json} +6 -46
- package/api-doc/defsave.json +518 -0
- package/api-doc/deftest.json +741 -0
- package/api-doc/{dicebag.dicebag.json → dicebag.json} +19 -1
- package/api-doc/druid.json +90 -92
- package/api-doc/event.json +16 -16
- package/api-doc/gooey.json +2050 -0
- package/api-doc/in.accelerometer.json +75 -1
- package/api-doc/in.button.json +17 -10
- package/api-doc/in.cursor.json +26 -0
- package/api-doc/in.gesture.json +401 -6
- package/api-doc/in.keyboard.json +2 -0
- package/api-doc/in.mapper.json +12 -8
- package/api-doc/in.onscreen.json +61 -5
- package/api-doc/in.state.json +61 -13
- package/api-doc/in.textbox.json +23 -12
- package/api-doc/in.triggers.json +336 -0
- package/api-doc/lang.json +5 -5
- package/api-doc/log.json +1 -1
- package/api-doc/metrics.fps.json +61 -2
- package/api-doc/metrics.mem.json +61 -2
- package/api-doc/monarch.monarch.json +249 -7
- package/api-doc/monarch.transitions.easings.json +19 -26
- package/api-doc/monarch.transitions.gui.json +782 -79
- package/api-doc/nakama.engine.defold.json +31 -18
- package/api-doc/{nakama.nakama.json → nakama.json} +4752 -2554
- package/api-doc/nakama.util.log.json +32 -4
- package/api-doc/narrator.json +1 -1
- package/api-doc/openapi/nakama.nakama.json +7680 -0
- package/api-doc/orthographic.camera.json +96 -98
- package/api-doc/orthographic.json +602 -0
- package/api-doc/panthera.json +1183 -0
- package/api-doc/{persist.persist.json → persist.json} +26 -1
- package/api-doc/{platypus.platypus.json → platypus.json} +68 -14
- package/api-doc/{rendy.rendy.json → rendy.json} +46 -99
- package/api-doc/richtext.color.json +77 -0
- package/api-doc/richtext.richtext.json +375 -5
- package/api-doc/saver.saver.json +2 -1
- package/api-doc/saver.storage.json +2 -1
- package/api-doc/{starly.starly.json → starly.json} +1 -1
- package/api-doc/{yagames.yagames.json → yagames.json} +784 -189
- package/api-doc/{zzfx.api.json → zzfx.json} +9 -9
- package/authored-targets.json +403 -0
- package/generated/{boom.boom.d.ts → boom.d.ts} +14 -0
- package/generated/bridge.d.ts +5 -5
- package/generated/{bzAnim.bzLibrary.d.ts → bzAnim.d.ts} +6 -0
- package/generated/decore.d.ts +1 -1
- package/generated/defcon.d.ts +43 -0
- package/generated/{defmath.defmath.d.ts → defmath.d.ts} +3 -2
- package/generated/defsave.d.ts +144 -0
- package/generated/{dicebag.dicebag.d.ts → dicebag.d.ts} +25 -0
- package/generated/druid.d.ts +81 -79
- package/generated/event.d.ts +15 -15
- package/generated/{gooey.gooey.d.ts → gooey.d.ts} +61 -6
- package/generated/in.onscreen.d.ts +5 -0
- package/generated/in.textbox.d.ts +4 -0
- package/generated/lang.d.ts +5 -5
- package/generated/log.d.ts +1 -1
- package/generated/metrics.fps.d.ts +19 -1
- package/generated/metrics.mem.d.ts +19 -1
- package/generated/monarch.monarch.d.ts +44 -1
- package/generated/monarch.transitions.easings.d.ts +0 -1
- package/generated/monarch.transitions.gui.d.ts +96 -12
- package/generated/nakama.d.ts +1158 -0
- package/generated/nakama.engine.defold.d.ts +3 -1
- package/generated/nakama.util.log.d.ts +6 -0
- package/generated/narrator.d.ts +1 -1
- package/generated/openapi/nakama.nakama.d.ts +884 -0
- package/generated/orthographic.camera.d.ts +24 -38
- package/generated/orthographic.d.ts +155 -0
- package/generated/panthera.d.ts +170 -0
- package/generated/{persist.persist.d.ts → persist.d.ts} +3 -0
- package/generated/{platypus.platypus.d.ts → platypus.d.ts} +9 -0
- package/generated/{rendy.rendy.d.ts → rendy.d.ts} +33 -80
- package/generated/richtext.color.d.ts +15 -0
- package/generated/saver.saver.d.ts +2 -0
- package/generated/saver.storage.d.ts +2 -0
- package/generated/{yagames.yagames.d.ts → yagames.d.ts} +151 -29
- package/generated/{zzfx.api.d.ts → zzfx.d.ts} +7 -0
- package/library-classification.json +0 -156
- package/library-targets.json +1 -218
- package/luals-targets.json +56 -3
- package/openapi-targets.json +17 -0
- package/package.json +7 -57
- package/scripts/__snapshots__/parse-luals.test.ts.snap +164 -10
- package/scripts/apply-luals-overrides.ts +39 -7
- package/scripts/authored-parity.ts +718 -0
- package/scripts/emit-library-dts.ts +94 -17
- package/scripts/extract-api-doc.ts +189 -38
- package/scripts/fidelity-floor.ts +178 -0
- package/scripts/import-upstream-docs.ts +125 -0
- package/scripts/lower-api-doc.ts +21 -3
- package/scripts/luals-fidelity.ts +16 -11
- package/scripts/map-luals-types.ts +52 -21
- package/scripts/parse-lua-surface.ts +187 -0
- package/scripts/parse-luals.ts +50 -4
- package/scripts/parse-markdown-api.ts +247 -0
- package/scripts/parse-openapi-api.ts +313 -0
- package/scripts/sync-authored-types.ts +249 -0
- package/scripts/sync-library-types.ts +99 -3
- package/scripts/sync-luals-types.ts +14 -1
- package/scripts/sync-markdown-types.ts +761 -0
- package/scripts/sync-openapi-types.ts +308 -0
- package/scripts/sync-script-api-types.ts +16 -17
- package/api-doc/boom.boom.json +0 -26
- package/api-doc/bzAnim.bzLibrary.json +0 -156
- package/api-doc/defcon.console.json +0 -109
- package/api-doc/defsave.defsave.json +0 -175
- package/api-doc/deftest.deftest.json +0 -71
- package/api-doc/gooey.gooey.json +0 -963
- package/generated/defcon.console.d.ts +0 -24
- package/generated/defsave.defsave.d.ts +0 -31
- package/generated/nakama.nakama.d.ts +0 -594
- /package/generated/{deftest.deftest.d.ts → deftest.d.ts} +0 -0
- /package/generated/{starly.starly.d.ts → starly.d.ts} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mkdirSync, readdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { dirname, join } from "node:path";
|
|
3
3
|
import { type AnnotationOverrides, applyAnnotationOverrides } from "./apply-luals-overrides";
|
|
4
|
-
import { emitLibraryDeclarations } from "./emit-library-dts";
|
|
4
|
+
import { type ExternalTypeRef, emitLibraryDeclarations } from "./emit-library-dts";
|
|
5
5
|
import { lowerLibraryModel } from "./lower-api-doc";
|
|
6
6
|
import { buildFidelityReport, type FidelityReport } from "./luals-fidelity";
|
|
7
7
|
import { type LibraryModel, mergeLibraryModels, parseLualsSource } from "./parse-luals";
|
|
@@ -18,6 +18,10 @@ export interface LualsTarget {
|
|
|
18
18
|
sourceGlobs: string[];
|
|
19
19
|
moduleId: string;
|
|
20
20
|
namespace: string;
|
|
21
|
+
// Token -> TypeScript type *text*, not an identifier: the mapper emits the value
|
|
22
|
+
// verbatim. The value may name an ambient global that needs no import — a core
|
|
23
|
+
// rename (`Vector3`, `Opaque<"node">`) or a type the Lua stdlib already declares
|
|
24
|
+
// (`debug.FunctionInfo`) — which is what distinguishes it from `externalTypes`.
|
|
21
25
|
typeRenames: Record<string, string>;
|
|
22
26
|
ignore: string[];
|
|
23
27
|
// SPDX-style license id, surfaced by the docs-site provenance block. Optional
|
|
@@ -27,6 +31,11 @@ export interface LualsTarget {
|
|
|
27
31
|
// upstream annotation the fixtures freeze diverges from the runtime. Optional and
|
|
28
32
|
// loud-failing on an absent key — see `apply-luals-overrides.ts`.
|
|
29
33
|
annotationOverrides?: AnnotationOverrides;
|
|
34
|
+
// Type tokens this library references but another target owns, keyed by the token:
|
|
35
|
+
// the emitter writes a real cross-module `import` for each. A project consuming this
|
|
36
|
+
// library must declare the named upstream dependency too — `resolve` materializes no
|
|
37
|
+
// inter-library graph. See `emit-library-dts.ts`.
|
|
38
|
+
externalTypes?: Record<string, ExternalTypeRef>;
|
|
30
39
|
}
|
|
31
40
|
|
|
32
41
|
export interface LualsTargets {
|
|
@@ -65,6 +74,7 @@ export function readLualsTargets(packageRoot: string): LualsTarget[] {
|
|
|
65
74
|
...(entry.annotationOverrides !== undefined
|
|
66
75
|
? { annotationOverrides: entry.annotationOverrides }
|
|
67
76
|
: {}),
|
|
77
|
+
...(entry.externalTypes !== undefined ? { externalTypes: entry.externalTypes } : {}),
|
|
68
78
|
};
|
|
69
79
|
});
|
|
70
80
|
}
|
|
@@ -210,6 +220,7 @@ export function buildTargetFidelity(packageRoot: string, target: LualsTarget): F
|
|
|
210
220
|
target.namespace,
|
|
211
221
|
buildTargetModel(packageRoot, target),
|
|
212
222
|
target.typeRenames,
|
|
223
|
+
target.externalTypes,
|
|
213
224
|
);
|
|
214
225
|
}
|
|
215
226
|
|
|
@@ -293,6 +304,7 @@ if (import.meta.main) {
|
|
|
293
304
|
const declarations = emitLibraryDeclarations(model, {
|
|
294
305
|
moduleId: target.moduleId,
|
|
295
306
|
typeRenames: target.typeRenames,
|
|
307
|
+
externalTypes: target.externalTypes,
|
|
296
308
|
});
|
|
297
309
|
const dest = join(root, "generated", `${target.namespace}.d.ts`);
|
|
298
310
|
mkdirSync(dirname(dest), { recursive: true });
|
|
@@ -307,6 +319,7 @@ if (import.meta.main) {
|
|
|
307
319
|
const lowered = lowerLibraryModel(model, {
|
|
308
320
|
namespace: target.namespace,
|
|
309
321
|
typeRenames: target.typeRenames,
|
|
322
|
+
externalTypes: target.externalTypes,
|
|
310
323
|
});
|
|
311
324
|
const dest = join(root, "api-doc", `${target.namespace}.json`);
|
|
312
325
|
mkdirSync(dirname(dest), { recursive: true });
|