Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/runner/src/builder/factory.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/**
* Factory function to create builder functions with runtime dependency injection
*/
import { getCellLinkOrThrow, type Runtime } from "../index.ts";
import type {
BuilderFunctionsAndConstants,
Cell,
Expand Down Expand Up @@ -34,14 +33,15 @@ import {
} from "./built-in.ts";
import { getRecipeEnvironment } from "./env.ts";
import type { RuntimeProgram } from "../harness/types.ts";
import type { IRuntime } from "../runtime.ts";

/**
* Creates a set of builder functions with the given runtime
* @param runtime - The runtime instance to use for cell creation
* @returns An object containing all builder functions
*/
export const createBuilder = (
runtime: Runtime,
runtime: IRuntime,
): {
commontools: BuilderFunctionsAndConstants;
exportsCallback: (exports: Map<any, RuntimeProgram>) => void;
Expand Down
10 changes: 7 additions & 3 deletions packages/runner/src/builder/json-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
import { getTopFrame } from "./recipe.ts";
import { deepEqual } from "../path-utils.ts";
import { IRuntime } from "../runtime.ts";
import { parseLink } from "../link-utils.ts";
import { parseLink, sanitizeSchemaForLinks } from "../link-utils.ts";

export function toJSONWithLegacyAliases(
value: Opaque<any>,
Expand Down Expand Up @@ -55,8 +55,12 @@ export function toJSONWithLegacyAliases(
$alias: {
...(isShadowRef(value) ? { cell: value } : {}),
path: pathToCell as (string | number)[],
...(exported?.schema ? { schema: exported.schema } : {}),
...(exported?.rootSchema ? { rootSchema: exported.rootSchema } : {}),
...(exported?.schema
? { schema: sanitizeSchemaForLinks(exported.schema) }
: {}),
...(exported?.rootSchema
? { rootSchema: sanitizeSchemaForLinks(exported.rootSchema) }
: {}),
},
} satisfies LegacyAlias;
} else throw new Error(`Cell not found in paths`);
Expand Down
4 changes: 0 additions & 4 deletions packages/runner/src/builtins/stream-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ export function streamData(
tx,
);

pending.getDoc().ephemeral = true;
result.getDoc().ephemeral = true;
error.getDoc().ephemeral = true;

pending.setSourceCell(parentCell);
result.setSourceCell(parentCell);
error.setSourceCell(parentCell);
Expand Down
Loading