deepline 0.1.55 → 0.1.56

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.
@@ -55,14 +55,34 @@ export type PlayDatasetInput<T> =
55
55
  | AsyncIterable<T>
56
56
  | PlayDataset<T>;
57
57
 
58
+ /**
59
+ * Durable handle for rows produced by `ctx.csv(...)` or `ctx.map(...).run()`.
60
+ *
61
+ * A `PlayDataset` is not a normal in-memory array. It points at runtime-managed
62
+ * rows, usually backed by persisted sheet storage, and carries metadata such as
63
+ * dataset kind, dataset id, table namespace, count, and preview rows.
64
+ *
65
+ * Pass dataset handles directly into later `ctx.map(...)` stages by default so
66
+ * Deepline keeps row progress, retries, memory use, and table output under
67
+ * runtime control. Use `count()` and `peek()` for bounded inspection. Use
68
+ * `materialize(limit)` or async iteration only when the dataset is intentionally
69
+ * small and bounded.
70
+ */
58
71
  export interface PlayDataset<T> extends AsyncIterable<T> {
59
72
  readonly [PLAY_DATASET_BRAND]: true;
73
+ /** Dataset kind. */
60
74
  readonly datasetKind: PlayDatasetKind;
75
+ /** Dataset id. */
61
76
  readonly datasetId: string;
77
+ /** Backing store info. */
62
78
  readonly backing?: PlayDatasetBacking;
79
+ /** Display label. */
63
80
  readonly sourceLabel?: string | null;
81
+ /** Runtime table name. */
64
82
  readonly tableNamespace?: string | null;
83
+ /** Row count. */
65
84
  count(): Promise<number>;
85
+ /** Preview rows. */
66
86
  peek(limit?: number): Promise<T[]>;
67
87
  /**
68
88
  * Explicit escape hatch for bounded result sets.
@@ -310,7 +330,11 @@ export async function materializePlayDatasetInput<T>(
310
330
  input: PlayDatasetInput<T>,
311
331
  ): Promise<T[]> {
312
332
  if (isPlayDataset(input)) {
313
- return await input.materialize();
333
+ const rows: T[] = [];
334
+ for await (const row of input) {
335
+ rows.push(row);
336
+ }
337
+ return rows;
314
338
  }
315
339
 
316
340
  if (Array.isArray(input)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepline",
3
- "version": "0.1.55",
3
+ "version": "0.1.56",
4
4
  "description": "Deepline SDK + CLI — B2B data enrichment powered by durable cloud execution",
5
5
  "license": "MIT",
6
6
  "repository": {