@atscript/core 0.1.88 → 0.1.90
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/index.cjs +887 -761
- package/dist/index.d.ts +23 -1
- package/dist/index.mjs +791 -672
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -175,6 +175,14 @@ declare class BuildRepo {
|
|
|
175
175
|
getDoc(id: string): AtscriptDoc | undefined;
|
|
176
176
|
diagnostics(): Promise<Map<string, TMessages>>;
|
|
177
177
|
generate(config: TAtscriptConfigOutput, docs?: AtscriptDoc[]): Promise<TOutput[]>;
|
|
178
|
+
/**
|
|
179
|
+
* Renders every document and writes the outputs to disk.
|
|
180
|
+
*
|
|
181
|
+
* Each write is awaited and atomic (temp file + rename), because a consumer
|
|
182
|
+
* watching the output — a dev server, a type checker, another build — must
|
|
183
|
+
* never observe a half-written file, and an un-awaited write can be
|
|
184
|
+
* truncated when the process exits.
|
|
185
|
+
*/
|
|
178
186
|
write(config: TAtscriptConfigOutput, docs?: AtscriptDoc[]): Promise<TOutput[]>;
|
|
179
187
|
}
|
|
180
188
|
|
|
@@ -256,7 +264,7 @@ interface TAnnotationTokens {
|
|
|
256
264
|
}
|
|
257
265
|
type TPrimitiveAnnotationArg = string | number | boolean;
|
|
258
266
|
type TPrimitiveAnnotationArgs = Record<string, TPrimitiveAnnotationArg>;
|
|
259
|
-
type TPrimitiveAnnotationValue = boolean | string | number | TPrimitiveAnnotationArgs |
|
|
267
|
+
type TPrimitiveAnnotationValue = boolean | string | number | TPrimitiveAnnotationArgs | Array<TPrimitiveAnnotationArg | TPrimitiveAnnotationArgs>;
|
|
260
268
|
interface TPrimitiveBaseConfig {
|
|
261
269
|
type?: TPrimitiveTypeDef;
|
|
262
270
|
documentation?: string;
|
|
@@ -848,6 +856,20 @@ interface TAtscriptConfigInput {
|
|
|
848
856
|
include?: string[];
|
|
849
857
|
exclude?: string[];
|
|
850
858
|
db?: TDbConfig;
|
|
859
|
+
/**
|
|
860
|
+
* Extra Atscript models to include in `asc db sync` on top of the compiled
|
|
861
|
+
* `.as` files — typically models shipped by packages.
|
|
862
|
+
*
|
|
863
|
+
* The callback may return an array of annotated types, a module namespace
|
|
864
|
+
* object (`models: () => import('some-package/models')`), or a nested
|
|
865
|
+
* combination of both. Every export that `isAnnotatedType()` accepts and
|
|
866
|
+
* that carries `@db.table` or `@db.view` metadata is included, deduplicated
|
|
867
|
+
* by identity.
|
|
868
|
+
*
|
|
869
|
+
* Declared at the top level so it works with both the declarative and the
|
|
870
|
+
* function form of `db`.
|
|
871
|
+
*/
|
|
872
|
+
models?: () => unknown | Promise<unknown>;
|
|
851
873
|
}
|
|
852
874
|
interface TAtscriptConfigOutput {
|
|
853
875
|
format: TAtscriptRenderFormat;
|