@sjcx/vorma 0.0.0-pre.5 → 0.0.0-pre.7

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.
Files changed (111) hide show
  1. package/LICENSE +197 -1
  2. package/dist/build/assets/css-static-public-assets.d.ts +22 -0
  3. package/dist/build/assets/static-public-asset-plugin.d.ts +20 -0
  4. package/dist/build/assets/static-public-assets.d.ts +44 -0
  5. package/dist/build/build-application.d.ts +18 -0
  6. package/dist/build/{bundle-client.d.ts → bundling/bundle-client.d.ts} +16 -5
  7. package/dist/build/{client-output-hashing.d.ts → bundling/client-output-hashing.d.ts} +1 -1
  8. package/dist/build/bundling/critical-css.d.ts +19 -0
  9. package/dist/build/cli.js +4793 -860
  10. package/dist/build/config/load-config.d.ts +142 -0
  11. package/dist/build/config/resolve-config.d.ts +63 -0
  12. package/dist/build/{source-layout.d.ts → config/source-layout.d.ts} +4 -6
  13. package/dist/build/config/url-pathname.d.ts +13 -0
  14. package/dist/build/config/vite-options.d.ts +80 -0
  15. package/dist/build/dev/application-process.d.ts +18 -0
  16. package/dist/build/dev/artifacts.d.ts +37 -0
  17. package/dist/build/dev/browser-source.d.ts +25 -0
  18. package/dist/build/dev/build.d.ts +33 -0
  19. package/dist/build/dev/cargo-metadata.d.ts +28 -0
  20. package/dist/build/dev/changes.d.ts +11 -0
  21. package/dist/build/dev/client-inputs.d.ts +25 -0
  22. package/dist/build/dev/client.d.ts +39 -0
  23. package/dist/build/dev/dev-protocol.d.ts +23 -0
  24. package/dist/build/dev/generated-paths.d.ts +27 -0
  25. package/dist/build/dev/generation.d.ts +31 -0
  26. package/dist/build/dev/index-html.d.ts +28 -0
  27. package/dist/build/dev/module-server.d.ts +24 -0
  28. package/dist/build/dev/patterns.d.ts +26 -0
  29. package/dist/build/dev/ports.d.ts +25 -0
  30. package/dist/build/dev/server-process.d.ts +34 -0
  31. package/dist/build/dev/server-sources.d.ts +19 -0
  32. package/dist/build/dev/session.d.ts +28 -0
  33. package/dist/build/dev/sources.d.ts +46 -0
  34. package/dist/build/{development-stylesheet.d.ts → dev/stylesheet.d.ts} +4 -4
  35. package/dist/build/dev/watcher.d.ts +30 -0
  36. package/dist/build/dev/work.d.ts +67 -0
  37. package/dist/build/generation/client-view-entries.d.ts +8 -0
  38. package/dist/build/generation/compile-application.d.ts +28 -0
  39. package/dist/build/generation/generate-application.d.ts +52 -0
  40. package/dist/build/generation/render-client-contracts.d.ts +15 -0
  41. package/dist/build/{render-source-text.d.ts → generation/render-source-text.d.ts} +3 -7
  42. package/dist/build/inspection/http-method.d.ts +4 -0
  43. package/dist/build/inspection/inspect-application.d.ts +25 -0
  44. package/dist/build/inspection/inspect-projects.d.ts +85 -0
  45. package/dist/build/inspection/rust-server.d.ts +57 -0
  46. package/dist/build/inspection/type-declarations.d.ts +20 -0
  47. package/dist/build/inspection/typescript-projects.d.ts +31 -0
  48. package/dist/build/issues.d.ts +25 -0
  49. package/dist/build/{contained-path.d.ts → output/contained-path.d.ts} +3 -13
  50. package/dist/build/output/content-hash.d.ts +9 -0
  51. package/dist/build/output/dist-dir.d.ts +34 -0
  52. package/dist/build/output/output-files.d.ts +23 -0
  53. package/dist/build/output/output-ownership.d.ts +44 -0
  54. package/dist/build/output/published-file-url.d.ts +6 -0
  55. package/dist/build/patterns/nested-route-chains.d.ts +12 -0
  56. package/dist/build/patterns/pattern-language.d.ts +3 -0
  57. package/dist/build/patterns/route-patterns.d.ts +12 -0
  58. package/dist/build/publication/assemble-artifacts.d.ts +37 -0
  59. package/dist/build/{browser-contracts.d.ts → publication/browser-contracts.d.ts} +1 -1
  60. package/dist/build/publication/build-metadata.d.ts +45 -0
  61. package/dist/build/publication/publish-artifacts.d.ts +17 -0
  62. package/dist/config-FbabCxBO.js +56 -0
  63. package/dist/config.d.ts +106 -0
  64. package/dist/index.d.ts +1 -0
  65. package/dist/index.js +2 -0
  66. package/dist/plugin-api-Btb0teGk.js +36 -0
  67. package/dist/vite/index.d.ts +14 -3
  68. package/dist/vite/index.js +25 -9
  69. package/dist/vite/plugin-api.d.ts +18 -0
  70. package/package.json +12 -16
  71. package/dist/build/assemble-artifacts.d.ts +0 -23
  72. package/dist/build/client-inputs.d.ts +0 -11
  73. package/dist/build/client-public-urls.d.ts +0 -20
  74. package/dist/build/compare-text.d.ts +0 -5
  75. package/dist/build/compile-application.d.ts +0 -40
  76. package/dist/build/content-digest.d.ts +0 -7
  77. package/dist/build/critical-css.d.ts +0 -7
  78. package/dist/build/css-public-assets.d.ts +0 -15
  79. package/dist/build/development-artifacts.d.ts +0 -36
  80. package/dist/build/development-browser-source.d.ts +0 -3
  81. package/dist/build/development-build.d.ts +0 -27
  82. package/dist/build/development-changes.d.ts +0 -14
  83. package/dist/build/development-client.d.ts +0 -21
  84. package/dist/build/development-generation.d.ts +0 -20
  85. package/dist/build/development-listener.d.ts +0 -14
  86. package/dist/build/development-patterns.d.ts +0 -5
  87. package/dist/build/development-protocol.d.ts +0 -20
  88. package/dist/build/development-server-process.d.ts +0 -30
  89. package/dist/build/development-sources.d.ts +0 -22
  90. package/dist/build/development-watcher.d.ts +0 -15
  91. package/dist/build/development-work.d.ts +0 -33
  92. package/dist/build/development.d.ts +0 -3
  93. package/dist/build/generate-application.d.ts +0 -62
  94. package/dist/build/index.d.ts +0 -14
  95. package/dist/build/index.js +0 -2
  96. package/dist/build/inspect-css-artifacts.d.ts +0 -11
  97. package/dist/build/inspect-projects.d.ts +0 -69
  98. package/dist/build/load-config.d.ts +0 -57
  99. package/dist/build/output-files.d.ts +0 -8
  100. package/dist/build/output-ownership.d.ts +0 -21
  101. package/dist/build/public-assets.d.ts +0 -32
  102. package/dist/build/publish-artifacts.d.ts +0 -20
  103. package/dist/build/render-client-contracts.d.ts +0 -10
  104. package/dist/build/render-client-transport.d.ts +0 -11
  105. package/dist/build/render-server-generated.d.ts +0 -22
  106. package/dist/build/render-types.d.ts +0 -31
  107. package/dist/build/resolve-config.d.ts +0 -47
  108. package/dist/build/typescript-projects.d.ts +0 -43
  109. package/dist/build-BeUTL6eX.js +0 -3036
  110. package/dist/build-invocation-D7Fu8gBK.js +0 -4
  111. package/dist/vite/build-invocation.d.ts +0 -4
@@ -1,14 +0,0 @@
1
- import type { VormaConfig } from "@vorma/server/config";
2
- import { Effect } from "effect";
3
- /**
4
- * Builds and publishes one production application while holding all generated
5
- * output ownership. `configFilePath` is the absolute path of the configuration
6
- * file; every configured path resolves against its directory.
7
- */
8
- export declare function buildApplication(input: {
9
- readonly config: VormaConfig;
10
- readonly configFilePath: string;
11
- }): Effect.Effect<{
12
- clientBuildId: string;
13
- publicDirectory: string;
14
- }, import("./assemble-artifacts.ts").ArtifactAssemblyIssue | import("./publish-artifacts.ts").ArtifactPublicationIssue | import("./bundle-client.ts").ClientBundleIssue | import("./generate-application.ts").GeneratedApplicationWriteError | import("./output-ownership.ts").OutputOwnershipIssue | import("effect/PlatformError").PlatformError | import("./generate-application.ts").ApplicationGenerationError, import("effect/FileSystem").FileSystem | import("effect/Path").Path>;
@@ -1,2 +0,0 @@
1
- import { t as buildApplication } from "../build-BeUTL6eX.js";
2
- export { buildApplication };
@@ -1,11 +0,0 @@
1
- import { Result } from "effect";
2
- /** Records dependencies from compiled stylesheets for nonblocking preload hints. */
3
- export declare function inspectCssArtifacts(input: {
4
- readonly stylesheets: ReadonlyArray<{
5
- readonly url: string | null;
6
- readonly source: Uint8Array;
7
- }>;
8
- }): Result.Result<ReadonlyMap<string | null, ReadonlyArray<{
9
- readonly url: string;
10
- readonly kind: "url" | "import";
11
- }>>, string>;
@@ -1,69 +0,0 @@
1
- import type { HttpMethod, InputTransportKind } from "@vorma/protocol";
2
- import type { EffectTransportMarkKind } from "@vorma/protocol/transport";
3
- import { Effect } from "effect";
4
- import * as Path from "effect/Path";
5
- import type { ApplicationSourceLayout } from "./source-layout.ts";
6
- import { type TypescriptProjectError, type TypescriptProjects } from "./typescript-projects.ts";
7
- export type DeclarationSource = {
8
- readonly filePath: string;
9
- readonly exportName: string;
10
- };
11
- export type InspectedUiLoader = DeclarationSource & {
12
- readonly kind: "UiLoader";
13
- readonly pattern: string;
14
- /** The decoded search type as text; absent when the loader takes no search parameters. */
15
- readonly input: string | undefined;
16
- readonly output: string;
17
- };
18
- export type InspectedEndpointError = {
19
- readonly tag: string;
20
- /** The error's schema fields as text. */
21
- readonly fields: string;
22
- };
23
- export type InspectedEndpoint = DeclarationSource & {
24
- readonly kind: "Endpoint";
25
- readonly operation: "query" | "mutation" | "stream";
26
- readonly method: HttpMethod;
27
- readonly pattern: string;
28
- readonly input: string | undefined;
29
- readonly inputTransport: InputTransportKind;
30
- readonly output: string | undefined;
31
- readonly event: string | undefined;
32
- readonly errors: ReadonlyArray<InspectedEndpointError>;
33
- };
34
- export type InspectedServerDeclaration = InspectedUiLoader | InspectedEndpoint;
35
- export type InspectedClientView = DeclarationSource & {
36
- readonly pattern: string;
37
- };
38
- /** A `getPublicUrl` call: the span to replace and the asset key it names. */
39
- export type PublicUrlSite = {
40
- readonly filePath: string;
41
- readonly start: number;
42
- readonly end: number;
43
- readonly key: string;
44
- };
45
- export type InspectedProjects = {
46
- readonly serverDeclarations: ReadonlyArray<InspectedServerDeclaration>;
47
- readonly clientViews: ReadonlyArray<InspectedClientView>;
48
- readonly clientApplication: DeclarationSource;
49
- readonly publicUrlSites: ReadonlyArray<PublicUrlSite>;
50
- /** The text of every client file that has a public URL site, as the checker read it. */
51
- readonly clientSourceTexts: ReadonlyMap<string, string>;
52
- /** Alias declarations that rendered contract types refer to. */
53
- readonly typeAliases: ReadonlyArray<string>;
54
- /** Effect modules that rendered contract types name. */
55
- readonly effectModules: ReadonlyArray<string>;
56
- readonly transportTypeNames: ReadonlySet<EffectTransportMarkKind>;
57
- };
58
- export type InspectionIssue = {
59
- readonly _tag: "InspectionIssue";
60
- readonly filePath: string;
61
- readonly exportName?: string;
62
- readonly position?: number;
63
- readonly message: string;
64
- };
65
- /** Reads every registerable declaration, view, the client application, and every public URL call from the two projects. */
66
- export declare function inspectProjects(input: {
67
- readonly projects: TypescriptProjects;
68
- readonly layout: ApplicationSourceLayout;
69
- }): Effect.Effect<InspectedProjects, InspectionIssue | TypescriptProjectError, Path.Path>;
@@ -1,57 +0,0 @@
1
- import { Effect, Path, Schema } from "effect";
2
- type ConfigLoadError = {
3
- readonly _tag: "ConfigLoadError";
4
- readonly message: string;
5
- readonly cause?: unknown;
6
- };
7
- /** Vite's configuration loader recompiles configuration dependencies on each development restart. */
8
- export declare function loadDevelopmentConfig(configPath: string): Effect.Effect<{
9
- config: {
10
- importMeta: {
11
- readonly url: string;
12
- };
13
- serverTsconfigFile: string;
14
- clientEntry: string;
15
- clientTsconfigFile: string;
16
- publicAssetsDir: string;
17
- viteConfigFile: string;
18
- criticalCssEntry?: string;
19
- publicAssetsBasePath: string;
20
- bodySsr?: boolean;
21
- dev: {
22
- readonly serverCommand: readonly [string, ...string[]];
23
- readonly revalidateClientOnChange?: readonly string[];
24
- };
25
- };
26
- configFilePath: string;
27
- dependencies: string[];
28
- }, ConfigLoadError | Schema.SchemaError | {
29
- _tag: "ConfigLoadError";
30
- message: string;
31
- }, Path.Path>;
32
- /**
33
- * Imports the explicitly selected configuration using the CLI host's module
34
- * loader and reports the absolute path of the file it was loaded from,
35
- * because every configured path is relative to that file's directory.
36
- */
37
- export declare function loadVormaConfig(configPath: string): Effect.Effect<{
38
- config: {
39
- readonly importMeta: {
40
- readonly url: string;
41
- };
42
- readonly serverTsconfigFile: string;
43
- readonly clientEntry: string;
44
- readonly clientTsconfigFile: string;
45
- readonly publicAssetsDir: string;
46
- readonly viteConfigFile: string;
47
- readonly criticalCssEntry?: string;
48
- readonly publicAssetsBasePath: string;
49
- readonly bodySsr?: boolean;
50
- readonly dev?: {
51
- readonly serverCommand: readonly [string, ...string[]];
52
- readonly revalidateClientOnChange?: readonly string[];
53
- };
54
- };
55
- configFilePath: string;
56
- }, import("effect/PlatformError").BadArgument | ConfigLoadError, Path.Path>;
57
- export {};
@@ -1,8 +0,0 @@
1
- import { Effect } from "effect";
2
- import * as FileSystem from "effect/FileSystem";
3
- import * as Path from "effect/Path";
4
- /** Atomically replaces generated source that TypeScript and build tools can read. */
5
- export declare function writeOutputFile(input: {
6
- readonly filePath: string;
7
- readonly source: string | Uint8Array;
8
- }): Effect.Effect<void, import("effect/PlatformError").PlatformError, FileSystem.FileSystem | Path.Path>;
@@ -1,21 +0,0 @@
1
- import { Effect, FileSystem, type Scope } from "effect";
2
- import * as Path from "effect/Path";
3
- export type OutputOwnershipIssue = {
4
- readonly _tag: "OutputOwnershipIssue";
5
- readonly directory: string;
6
- readonly message: string;
7
- readonly cause?: unknown;
8
- };
9
- /** Resolves aliases even when the output directory has not been created. */
10
- export declare function canonicalizeOutputPath(filePath: string): Effect.Effect<string, OutputOwnershipIssue, FileSystem.FileSystem | Path.Path>;
11
- /** Checks canonical containment before removing or replacing generated output. */
12
- export declare function checkOutputPath(input: {
13
- readonly filePath: string;
14
- readonly rootDirectory: string;
15
- }): Effect.Effect<void, OutputOwnershipIssue, FileSystem.FileSystem | Path.Path>;
16
- /** Owns the application's generated output until the build or development scope closes. */
17
- export declare function acquireOutputOwnership(input: {
18
- readonly lockDirectory: string;
19
- readonly boundaryDirectories: ReadonlyArray<string>;
20
- readonly kind: "build" | "dev";
21
- }): Effect.Effect<void, OutputOwnershipIssue, Scope.Scope | FileSystem.FileSystem | Path.Path>;
@@ -1,32 +0,0 @@
1
- import { Effect } from "effect";
2
- import * as FileSystem from "effect/FileSystem";
3
- import * as Path from "effect/Path";
4
- import type { GeneratedSource } from "./render-source-text.ts";
5
- import type { ApplicationSourceLayout } from "./source-layout.ts";
6
- export type PublicAssetIssue = {
7
- readonly _tag: "PublicAssetIssue";
8
- readonly sourcePath: string;
9
- readonly message: string;
10
- readonly cause?: unknown;
11
- };
12
- export type PublicAsset = {
13
- readonly sourceKey: string;
14
- readonly sourcePath: string;
15
- /** Relative to the published public directory, with decoded path segments. */
16
- readonly fileName: string;
17
- readonly url: string;
18
- readonly digest: string;
19
- };
20
- export type PublicAssetProjection = {
21
- readonly assets: ReadonlyArray<PublicAsset>;
22
- readonly publicFilemap: Readonly<Record<string, string>>;
23
- readonly publicFilepaths: ReadonlyArray<string>;
24
- readonly types: GeneratedSource;
25
- };
26
- /** Hashes and publishes each public file's exact bytes, retaining only metadata and erased key types. */
27
- export declare function collectPublicAssets(config: ApplicationSourceLayout): Effect.Effect<PublicAssetProjection, PublicAssetIssue, FileSystem.FileSystem | Path.Path>;
28
- export declare function renderAssetKeyDeclaration(input: {
29
- readonly prefix: string;
30
- readonly assets: ReadonlyArray<PublicAsset>;
31
- readonly depth: number;
32
- }): string;
@@ -1,20 +0,0 @@
1
- import { Effect } from "effect";
2
- import * as FileSystem from "effect/FileSystem";
3
- import * as Path from "effect/Path";
4
- import type { ApplicationArtifacts } from "./assemble-artifacts.ts";
5
- import type { ApplicationGeneration } from "./generate-application.ts";
6
- import type { ApplicationSourceLayout } from "./source-layout.ts";
7
- export type ArtifactPublicationIssue = {
8
- readonly _tag: "ArtifactPublicationIssue";
9
- readonly cause: unknown;
10
- };
11
- /** Prepares one public output before Vite adds its browser files to it. */
12
- export declare function preparePublicOutput(config: ApplicationSourceLayout): Effect.Effect<void, import("./output-ownership.ts").OutputOwnershipIssue | import("effect/PlatformError").PlatformError, FileSystem.FileSystem | Path.Path>;
13
- /** Publishes private metadata for the completed browser build. */
14
- export declare function publishApplicationArtifacts(input: {
15
- readonly artifacts: ApplicationArtifacts;
16
- readonly generation: ApplicationGeneration;
17
- }): Effect.Effect<{
18
- clientBuildId: string;
19
- publicDirectory: string;
20
- }, ArtifactPublicationIssue, FileSystem.FileSystem | Path.Path>;
@@ -1,10 +0,0 @@
1
- import type * as Path from "effect/Path";
2
- import type { ApplicationModel } from "./compile-application.ts";
3
- import type { InspectedProjects } from "./inspect-projects.ts";
4
- import { type GeneratedSource } from "./render-source-text.ts";
5
- export declare function renderGeneratedClientContracts(input: {
6
- readonly model: ApplicationModel;
7
- readonly inspection: InspectedProjects;
8
- readonly filePath: string;
9
- readonly path: Path.Path;
10
- }): GeneratedSource;
@@ -1,11 +0,0 @@
1
- import { type EffectTransportMarkKind } from "@vorma/protocol/transport";
2
- import type { GeneratedSource } from "./render-source-text.ts";
3
- /**
4
- * Selects generic value adapters without generating application schemas or route
5
- * metadata. The shared adapters use pure initializers so that unused Effect
6
- * export reads do not retain optional data modules in the browser bundle.
7
- */
8
- export declare function renderGeneratedClientTransport(input: {
9
- readonly typeNames: ReadonlySet<EffectTransportMarkKind>;
10
- readonly filePath: string;
11
- }): GeneratedSource;
@@ -1,22 +0,0 @@
1
- import type * as Path from "effect/Path";
2
- import type { ApplicationModel } from "./compile-application.ts";
3
- import type { DeclarationSource } from "./inspect-projects.ts";
4
- import { type PublicAssetProjection } from "./public-assets.ts";
5
- import { type GeneratedSource } from "./render-source-text.ts";
6
- /** Renders registration imports independently of final browser output. */
7
- export declare function renderGeneratedBuildModule(input: {
8
- readonly declarations: ReadonlyArray<DeclarationSource>;
9
- readonly filePath: string;
10
- readonly path: Path.Path;
11
- }): GeneratedSource;
12
- /** Renders the declaration that augments `@vorma/server` with this application's patterns, search types, and asset keys. */
13
- export declare function renderGeneratedServerContracts(input: {
14
- readonly model: ApplicationModel;
15
- readonly publicAssets: PublicAssetProjection;
16
- readonly typeAliases: ReadonlyArray<string>;
17
- readonly effectModules: ReadonlyArray<string>;
18
- readonly filePath: string;
19
- readonly path: Path.Path;
20
- }): GeneratedSource;
21
- /** One type-only namespace import per Effect module that rendered contract types name. */
22
- export declare function renderEffectModuleImports(effectModules: ReadonlyArray<string>): ReadonlyArray<string>;
@@ -1,31 +0,0 @@
1
- import type { EffectTransportMarkKind } from "@vorma/protocol/transport";
2
- import { Result } from "effect";
3
- import { type Checker, type Emitter, type Program, type Symbol as TypeSymbol, type Type } from "typescript/unstable/async";
4
- export type TypeRenderIssue = {
5
- readonly _tag: "UnrenderableContractType";
6
- readonly reason: string;
7
- readonly typeText: string;
8
- };
9
- export type TypeRenderer = {
10
- /** The decoded type as text, at the given tab depth for its inner lines. */
11
- readonly renderType: (input: {
12
- readonly type: Type;
13
- readonly depth: number;
14
- }) => Promise<Result.Result<string, TypeRenderIssue>>;
15
- /** The alias declarations that rendering needed, each at depth zero. */
16
- readonly renderAliases: () => ReadonlyArray<string>;
17
- /** The Effect modules that rendered text names, for the generated file's type imports. */
18
- readonly getEffectModules: () => ReadonlyArray<string>;
19
- /** The Effect data types that occurred in at least one rendered contract. */
20
- readonly getTransportTypeNames: () => ReadonlySet<EffectTransportMarkKind>;
21
- };
22
- /** True when a symbol is declared outside the application: in a default library or an installed package. */
23
- export declare function matchesLibrarySymbol(input: {
24
- readonly program: Program;
25
- readonly symbol: TypeSymbol;
26
- }): Promise<boolean>;
27
- export declare function createTypeRenderer(input: {
28
- readonly checker: Checker;
29
- readonly program: Program;
30
- readonly emitter: Emitter;
31
- }): Promise<TypeRenderer>;
@@ -1,47 +0,0 @@
1
- import { type VormaConfig } from "@vorma/server/config";
2
- import { Effect } from "effect";
3
- import * as Path from "effect/Path";
4
- export type PublicAssetsBasePath = "/" | `/${string}/`;
5
- export type ResolvedVormaConfig = {
6
- readonly configFilePath: string;
7
- /** The directory of the configuration file; every configured path is relative to it. */
8
- readonly configDirectory: string;
9
- readonly serverTsconfigFilePath: string;
10
- /** The directory containing the server tsconfig, used as the compiler's working directory. */
11
- readonly serverProjectDirectory: string;
12
- readonly clientEntryFilePath: string;
13
- readonly clientTsconfigFilePath: string;
14
- readonly publicAssetsSourceDirectory: string;
15
- readonly viteConfigFilePath: string;
16
- readonly criticalCssEntryFilePath?: string;
17
- readonly publicAssetsBasePath: PublicAssetsBasePath;
18
- readonly bodySsr: VormaConfig["bodySsr"];
19
- readonly dev: VormaConfig["dev"];
20
- } & VormaOwnedPaths;
21
- export type VormaOwnedPaths = {
22
- readonly publicDirectory: string;
23
- readonly ignoreFilePaths: ReadonlyArray<string>;
24
- readonly serverGeneratedDirectory: string;
25
- readonly clientGeneratedDirectory: string;
26
- readonly generatedRegistrationFilePath: string;
27
- readonly generatedServerContractsFilePath: string;
28
- };
29
- /** The build excludes both projects' generated directories from application source. */
30
- export declare function getGeneratedSourceDirectories(config: VormaOwnedPaths): ReadonlyArray<string>;
31
- /** Derives generated source, public assets, and build coordination from the tsconfig directories. */
32
- export declare function getVormaOwnedPaths(input: {
33
- readonly path: Path.Path;
34
- readonly serverProjectDirectory: string;
35
- readonly clientProjectDirectory: string;
36
- }): VormaOwnedPaths;
37
- export type ConfigResolutionError = {
38
- readonly _tag: "ConfigResolutionError";
39
- readonly field: "config" | "configFilePath" | "publicAssetsBasePath" | "bodySsr";
40
- readonly message: string;
41
- readonly cause?: unknown;
42
- };
43
- /** Resolves every configured path once against the configuration file's directory. */
44
- export declare function resolveVormaConfig(input: {
45
- readonly config: VormaConfig;
46
- readonly configFilePath: string;
47
- }): Effect.Effect<ResolvedVormaConfig, ConfigResolutionError, Path.Path>;
@@ -1,43 +0,0 @@
1
- import { Effect } from "effect";
2
- import { type APIOptions, type Project } from "typescript/unstable/async";
3
- export type TypescriptProjectError = {
4
- readonly _tag: "TypescriptProjectError";
5
- readonly message: string;
6
- readonly cause?: unknown;
7
- };
8
- export type TypescriptProjects = {
9
- readonly server: Project;
10
- readonly client: Project;
11
- };
12
- export type TypescriptProjectRoots = {
13
- readonly server: ReadonlySet<string>;
14
- readonly client: ReadonlySet<string>;
15
- };
16
- /** Reads native project membership without loading programs or declaration types. */
17
- export declare function readTypescriptProjectRoots(input: {
18
- readonly configDirectory: string;
19
- readonly serverTsconfigFilePath: string;
20
- readonly clientTsconfigFilePath: string;
21
- }): Effect.Effect<{
22
- server: string[];
23
- client: string[];
24
- }, TypescriptProjectError, never>;
25
- /** Checks actual compiler membership after generation, including restrictive files/include/exclude settings. */
26
- export declare function checkGeneratedTypeInclusion(input: {
27
- readonly configDirectory: string;
28
- readonly serverTsconfigFilePath: string;
29
- readonly clientTsconfigFilePath: string;
30
- readonly serverFiles: ReadonlyArray<string>;
31
- readonly clientFiles: ReadonlyArray<string>;
32
- readonly knownRootFiles?: TypescriptProjectRoots;
33
- }): Effect.Effect<void, TypescriptProjectError>;
34
- /** Opens the two configured TypeScript projects for the duration of `useFn`, then closes the checker session. */
35
- export declare function withTypescriptProjects<A, E, R>(input: {
36
- readonly configDirectory: string;
37
- readonly serverTsconfigFilePath: string;
38
- readonly clientTsconfigFilePath: string;
39
- readonly fileSystem?: APIOptions["fs"];
40
- readonly useFn: (projects: TypescriptProjects) => Effect.Effect<A, E, R>;
41
- }): Effect.Effect<A, E | TypescriptProjectError, R>;
42
- /** Native compiler operations have no cancellation API; settle each operation before its session can close. */
43
- export declare function runTypescriptOperation<Value>(fn: () => Promise<Value>): Effect.Effect<Value, TypescriptProjectError, never>;