@defold-typescript/cli 0.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/dist/api-registry.d.ts +14 -0
- package/dist/api-surface.d.ts +6 -0
- package/dist/bin.d.ts +2 -0
- package/dist/bin.js +1023 -0
- package/dist/build-output.d.ts +11 -0
- package/dist/build-session.d.ts +11 -0
- package/dist/build.d.ts +7 -0
- package/dist/defold-version.d.ts +11 -0
- package/dist/dispatch.d.ts +17 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +1017 -0
- package/dist/init.d.ts +11 -0
- package/dist/json-output.d.ts +11 -0
- package/dist/materialize.d.ts +29 -0
- package/dist/ref-doc-test-fixture.d.ts +18 -0
- package/dist/scan.d.ts +1 -0
- package/dist/script-kind.d.ts +8 -0
- package/dist/watch.d.ts +24 -0
- package/package.json +36 -0
- package/src/api-registry.ts +65 -0
- package/src/api-surface.ts +18 -0
- package/src/bin.ts +8 -0
- package/src/build-output.ts +106 -0
- package/src/build-session.ts +98 -0
- package/src/build.ts +62 -0
- package/src/defold-version.ts +30 -0
- package/src/dispatch.ts +273 -0
- package/src/index.ts +17 -0
- package/src/init.ts +237 -0
- package/src/json-output.ts +29 -0
- package/src/materialize.ts +224 -0
- package/src/ref-doc-test-fixture.ts +92 -0
- package/src/scan.ts +10 -0
- package/src/script-kind.ts +68 -0
- package/src/watch.ts +185 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TranspileDiagnostic } from "@defold-typescript/transpiler";
|
|
2
|
+
export interface BuildConfig {
|
|
3
|
+
readonly outDir: string | undefined;
|
|
4
|
+
readonly include: string[];
|
|
5
|
+
}
|
|
6
|
+
export declare function toPosix(p: string, sep?: string): string;
|
|
7
|
+
export declare function readBuildConfig(cwd: string): BuildConfig;
|
|
8
|
+
export declare function computeLuaRel(rel: string, config: BuildConfig): string;
|
|
9
|
+
export declare function collectFailures(diagnostics: readonly TranspileDiagnostic[]): Map<string, string[]>;
|
|
10
|
+
export declare function throwIfFailures(failures: ReadonlyMap<string, string[]>): void;
|
|
11
|
+
export declare function writeLuaFile(cwd: string, luaRel: string, lua: string, map: string | undefined): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface CreateBuildSessionOptions {
|
|
2
|
+
readonly cwd: string;
|
|
3
|
+
}
|
|
4
|
+
export interface BuildResult {
|
|
5
|
+
readonly written: string[];
|
|
6
|
+
}
|
|
7
|
+
export interface BuildSession {
|
|
8
|
+
buildAll(): BuildResult;
|
|
9
|
+
applyEvents(changed: string[], removed: string[]): BuildResult;
|
|
10
|
+
}
|
|
11
|
+
export declare function createBuildSession(opts: CreateBuildSessionOptions): BuildSession;
|
package/dist/build.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const CURRENT_STABLE_DEFOLD_VERSION = "1.12.4";
|
|
2
|
+
export type DefoldVersionSource = "flag" | "pin" | "default";
|
|
3
|
+
export interface ResolvedDefoldVersion {
|
|
4
|
+
readonly version: string;
|
|
5
|
+
readonly source: DefoldVersionSource;
|
|
6
|
+
}
|
|
7
|
+
export declare function readDefoldVersionPin(pkg: unknown): string | undefined;
|
|
8
|
+
export declare function resolveDefoldVersion(opts: {
|
|
9
|
+
flag?: string;
|
|
10
|
+
pin?: string;
|
|
11
|
+
}): ResolvedDefoldVersion;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { RegistryTarget } from "./api-registry";
|
|
2
|
+
import { type RefDocResolveOptions } from "./materialize";
|
|
3
|
+
import { type RunWatchHandle, type WatcherFactory } from "./watch";
|
|
4
|
+
export interface DispatchIo {
|
|
5
|
+
readonly stdout: NodeJS.WritableStream;
|
|
6
|
+
readonly stderr: NodeJS.WritableStream;
|
|
7
|
+
}
|
|
8
|
+
export interface DispatchInternals {
|
|
9
|
+
readonly watcherFactory?: WatcherFactory;
|
|
10
|
+
readonly componentWatcherFactory?: WatcherFactory;
|
|
11
|
+
readonly debounceMs?: number;
|
|
12
|
+
readonly onWatchStart?: (handle: RunWatchHandle) => void;
|
|
13
|
+
readonly sourceGeneratedDir?: string;
|
|
14
|
+
readonly resolveOpts?: RefDocResolveOptions;
|
|
15
|
+
readonly refDocRegistry?: readonly RegistryTarget[];
|
|
16
|
+
}
|
|
17
|
+
export declare function dispatch(argv: string[], io: DispatchIo, internals?: DispatchInternals): number | Promise<number>;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type { BuildResult, BuildSession, CreateBuildSessionOptions, } from "./build-session";
|
|
2
|
+
export { createBuildSession } from "./build-session";
|
|
3
|
+
export type { DispatchInternals, DispatchIo } from "./dispatch";
|
|
4
|
+
export { dispatch } from "./dispatch";
|
|
5
|
+
export type { RunInitOptions, RunInitResult } from "./init";
|
|
6
|
+
export { runInit } from "./init";
|
|
7
|
+
export type { RunWatchHandle, RunWatchOptions, WatchEvent, WatcherFactory, } from "./watch";
|
|
8
|
+
export { runWatch } from "./watch";
|