deepline 0.1.81 → 0.1.83
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/cli/index.js +57 -28
- package/dist/cli/index.mjs +66 -31
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/dist/repo/sdk/src/release.ts +2 -2
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -229,10 +229,10 @@ var import_node_path2 = require("path");
|
|
|
229
229
|
|
|
230
230
|
// src/release.ts
|
|
231
231
|
var SDK_RELEASE = {
|
|
232
|
-
version: "0.1.
|
|
232
|
+
version: "0.1.83",
|
|
233
233
|
apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
|
|
234
234
|
supportPolicy: {
|
|
235
|
-
latest: "0.1.
|
|
235
|
+
latest: "0.1.83",
|
|
236
236
|
minimumSupported: "0.1.53",
|
|
237
237
|
deprecatedBelow: "0.1.53"
|
|
238
238
|
}
|
|
@@ -1875,7 +1875,7 @@ var import_node_path3 = require("path");
|
|
|
1875
1875
|
var childProcess = __toESM(require("child_process"));
|
|
1876
1876
|
var import_sync = require("csv-parse/sync");
|
|
1877
1877
|
var import_sync2 = require("csv-stringify/sync");
|
|
1878
|
-
var
|
|
1878
|
+
var BROWSER_OPEN_COOLDOWN_MS = 3e4;
|
|
1879
1879
|
var defaultBrowserCommandRunner = childProcess;
|
|
1880
1880
|
function getAuthedHttpClient() {
|
|
1881
1881
|
const config = resolveConfig();
|
|
@@ -1888,7 +1888,7 @@ async function writeOutputFile(filename, content) {
|
|
|
1888
1888
|
await (0, import_promises.writeFile)(fullPath, content, "utf-8");
|
|
1889
1889
|
return fullPath;
|
|
1890
1890
|
}
|
|
1891
|
-
function
|
|
1891
|
+
function browserOpenStateFile() {
|
|
1892
1892
|
const homeDir = process.env.HOME || (0, import_node_os3.homedir)();
|
|
1893
1893
|
return (0, import_node_path3.join)(
|
|
1894
1894
|
homeDir,
|
|
@@ -1896,31 +1896,43 @@ function browserFocusStateFile() {
|
|
|
1896
1896
|
"deepline",
|
|
1897
1897
|
"runtime",
|
|
1898
1898
|
"state",
|
|
1899
|
-
"browser-
|
|
1899
|
+
"browser-open.json"
|
|
1900
1900
|
);
|
|
1901
1901
|
}
|
|
1902
|
-
function
|
|
1903
|
-
const statePath =
|
|
1902
|
+
function claimBrowserOpen(now = Date.now()) {
|
|
1903
|
+
const statePath = browserOpenStateFile();
|
|
1904
|
+
const lockPath = `${statePath}.lock`;
|
|
1905
|
+
let locked = false;
|
|
1904
1906
|
try {
|
|
1905
1907
|
(0, import_node_fs3.mkdirSync)((0, import_node_path3.dirname)(statePath), { recursive: true });
|
|
1906
|
-
|
|
1908
|
+
try {
|
|
1909
|
+
(0, import_node_fs3.mkdirSync)(lockPath);
|
|
1910
|
+
locked = true;
|
|
1911
|
+
} catch {
|
|
1912
|
+
return false;
|
|
1913
|
+
}
|
|
1914
|
+
let lastOpenedAt = 0;
|
|
1907
1915
|
if ((0, import_node_fs3.existsSync)(statePath)) {
|
|
1908
1916
|
const payload = JSON.parse((0, import_node_fs3.readFileSync)(statePath, "utf-8"));
|
|
1909
|
-
const value = payload.lastFocusedAt ?? payload.last_focused_at;
|
|
1917
|
+
const value = payload.lastOpenedAt ?? payload.last_opened_at ?? payload.lastFocusedAt ?? payload.last_focused_at;
|
|
1910
1918
|
if (typeof value === "number" && Number.isFinite(value)) {
|
|
1911
|
-
|
|
1919
|
+
lastOpenedAt = value;
|
|
1912
1920
|
}
|
|
1913
1921
|
}
|
|
1914
|
-
if (
|
|
1915
|
-
|
|
1922
|
+
if (lastOpenedAt > now) {
|
|
1923
|
+
lastOpenedAt = 0;
|
|
1916
1924
|
}
|
|
1917
|
-
if (now -
|
|
1925
|
+
if (now - lastOpenedAt < BROWSER_OPEN_COOLDOWN_MS) {
|
|
1918
1926
|
return false;
|
|
1919
1927
|
}
|
|
1920
|
-
(0, import_node_fs3.writeFileSync)(statePath, JSON.stringify({
|
|
1928
|
+
(0, import_node_fs3.writeFileSync)(statePath, JSON.stringify({ lastOpenedAt: now }), "utf-8");
|
|
1921
1929
|
return true;
|
|
1922
1930
|
} catch {
|
|
1923
1931
|
return true;
|
|
1932
|
+
} finally {
|
|
1933
|
+
if (locked) {
|
|
1934
|
+
(0, import_node_fs3.rmSync)(lockPath, { recursive: true, force: true });
|
|
1935
|
+
}
|
|
1924
1936
|
}
|
|
1925
1937
|
}
|
|
1926
1938
|
function extractUrlHost(raw) {
|
|
@@ -2090,7 +2102,8 @@ function openInBrowser(url) {
|
|
|
2090
2102
|
if (browserOpeningDisabled()) return;
|
|
2091
2103
|
const targetUrl = String(url || "").trim();
|
|
2092
2104
|
if (!targetUrl) return;
|
|
2093
|
-
|
|
2105
|
+
if (!claimBrowserOpen()) return;
|
|
2106
|
+
const allowFocus = true;
|
|
2094
2107
|
if (process.platform === "darwin") {
|
|
2095
2108
|
openUrlMacos(targetUrl, allowFocus);
|
|
2096
2109
|
return;
|
|
@@ -6562,6 +6575,9 @@ function jsonSchemaTypeExpression(schema) {
|
|
|
6562
6575
|
function objectPropertySchema(schema, property) {
|
|
6563
6576
|
return isRecord3(schema) && isRecord3(schema.properties) ? schema.properties[property] : null;
|
|
6564
6577
|
}
|
|
6578
|
+
function playOutputHasField(schema, field) {
|
|
6579
|
+
return objectPropertySchema(schema, field) != null;
|
|
6580
|
+
}
|
|
6565
6581
|
function finderResultTypeName(finder) {
|
|
6566
6582
|
return finder === "email_finder" ? "EmailFinderPlayResult" : "PhoneFinderPlayResult";
|
|
6567
6583
|
}
|
|
@@ -6572,13 +6588,13 @@ function renderFinderPlayResultType(input2) {
|
|
|
6572
6588
|
input2.play.outputSchema,
|
|
6573
6589
|
outputField
|
|
6574
6590
|
);
|
|
6575
|
-
|
|
6576
|
-
|
|
6577
|
-
|
|
6578
|
-
| null
|
|
6579
|
-
| {
|
|
6591
|
+
if (fieldSchema) {
|
|
6592
|
+
const fieldType = jsonSchemaTypeExpression(fieldSchema);
|
|
6593
|
+
return `type ${finderResultTypeName(input2.finder)} = {
|
|
6580
6594
|
${outputField}?: ${fieldType};
|
|
6581
6595
|
};`;
|
|
6596
|
+
}
|
|
6597
|
+
return `type ${finderResultTypeName(input2.finder)} = ${jsonSchemaTypeExpression(input2.play.outputSchema)};`;
|
|
6582
6598
|
}
|
|
6583
6599
|
function generatedFinderPlayResultTypes(input2) {
|
|
6584
6600
|
return ["email_finder", "phone_finder"].flatMap((finder) => {
|
|
@@ -6598,6 +6614,15 @@ function exampleValueComment(field) {
|
|
|
6598
6614
|
if (field === "roles" || field.endsWith("s")) return '["..."]';
|
|
6599
6615
|
return '"..."';
|
|
6600
6616
|
}
|
|
6617
|
+
function rowFieldValueExpression(field) {
|
|
6618
|
+
if (field === "limit" || field === "numResults" || field === "num_results" || field === "page_size" || field === "max_duration") {
|
|
6619
|
+
return `Number(row[${jsString(field)}] ?? 0)`;
|
|
6620
|
+
}
|
|
6621
|
+
if (field === "roles" || field.endsWith("s")) {
|
|
6622
|
+
return `String(row[${jsString(field)}] ?? '').split(',').map((item) => item.trim()).filter(Boolean)`;
|
|
6623
|
+
}
|
|
6624
|
+
return `String(row[${jsString(field)}] ?? '')`;
|
|
6625
|
+
}
|
|
6601
6626
|
function generateContactInputObjectFromSchema(schema, indent2, label, fallbackFields = ["first_name", "last_name", "domain"]) {
|
|
6602
6627
|
const details = schemaFieldDetails(schema);
|
|
6603
6628
|
const required = details.required.length ? details.required : fallbackFields;
|
|
@@ -6608,7 +6633,9 @@ function generateContactInputObjectFromSchema(schema, indent2, label, fallbackFi
|
|
|
6608
6633
|
`${indent2}// Required: ${required.join(", ") || "none declared"}.`
|
|
6609
6634
|
];
|
|
6610
6635
|
for (const field of required) {
|
|
6611
|
-
lines.push(
|
|
6636
|
+
lines.push(
|
|
6637
|
+
`${indent2}${field}: ${rowFieldValueExpression(field)}, // TODO: confirm source field`
|
|
6638
|
+
);
|
|
6612
6639
|
}
|
|
6613
6640
|
if (optional.length > 0) {
|
|
6614
6641
|
lines.push("");
|
|
@@ -6994,9 +7021,9 @@ function generatePlaySourceRowsBlock(input2) {
|
|
|
6994
7021
|
});
|
|
6995
7022
|
return `const sourceInput = ${playInput};
|
|
6996
7023
|
throw new Error(${jsString(`TODO: map sourceInput for ${input2.source.value}, choose the play output rows field, then delete this throw.`)});
|
|
6997
|
-
const sourceResult = await ctx.runPlay('source_play', ${jsString(input2.source.value)}, sourceInput, {
|
|
7024
|
+
const sourceResult = (await ctx.runPlay('source_play', ${jsString(input2.source.value)}, sourceInput, {
|
|
6998
7025
|
description: ${jsString(`Seed ${input2.entity} rows from the selected play.`)},
|
|
6999
|
-
});
|
|
7026
|
+
})) as { rows?: unknown[] };
|
|
7000
7027
|
// TODO: Replace sourceResult.rows with the selected play's actual row output field.
|
|
7001
7028
|
const ${input2.collection}: ${input2.collectionType}[] = (sourceResult.rows ?? []) as ${input2.collectionType}[];`;
|
|
7002
7029
|
}
|
|
@@ -7086,14 +7113,14 @@ function generateSourceSeedBlock(input2) {
|
|
|
7086
7113
|
for (const [index, company] of companies.slice(0, limit).entries()) {
|
|
7087
7114
|
const peopleInput = ${peopleInput};
|
|
7088
7115
|
throw new Error(${jsString(`TODO: map company fields into peopleInput for ${peoplePlayRef}, choose the play output rows field, then delete this throw.`)});
|
|
7089
|
-
const peopleResult = await ctx.runPlay(
|
|
7116
|
+
const peopleResult = (await ctx.runPlay(
|
|
7090
7117
|
\`people_play_\${index}\`,
|
|
7091
7118
|
${jsString(peoplePlayRef)},
|
|
7092
7119
|
peopleInput,
|
|
7093
7120
|
{
|
|
7094
7121
|
description: 'Map one company row into people/contact rows with the selected play.',
|
|
7095
7122
|
},
|
|
7096
|
-
);
|
|
7123
|
+
)) as { rows?: unknown[] };
|
|
7097
7124
|
// TODO: Replace peopleResult.rows with the selected play's actual contact rows field.
|
|
7098
7125
|
contacts.push(...((peopleResult.rows ?? []) as ContactSourceRow[]));
|
|
7099
7126
|
}`;
|
|
@@ -7117,6 +7144,10 @@ function optionalFinderValueExpression(candidateExpression, outputField) {
|
|
|
7117
7144
|
function generateFinderPlayStep(input2) {
|
|
7118
7145
|
const outputField = PLAY_BOOTSTRAP_OUTPUT_FIELD_BY_FINDER[input2.finder];
|
|
7119
7146
|
const resultTypeName = finderResultTypeName(input2.finder);
|
|
7147
|
+
const returnsObjectWithField = playOutputHasField(
|
|
7148
|
+
input2.play?.outputSchema,
|
|
7149
|
+
outputField
|
|
7150
|
+
);
|
|
7120
7151
|
const payload = generateContactInputObjectFromSchema(
|
|
7121
7152
|
input2.play?.inputSchema,
|
|
7122
7153
|
" ",
|
|
@@ -7133,9 +7164,7 @@ function generateFinderPlayStep(input2) {
|
|
|
7133
7164
|
description: ${jsString(`Run ${input2.finder} play.`)},
|
|
7134
7165
|
},
|
|
7135
7166
|
);
|
|
7136
|
-
return
|
|
7137
|
-
? ${input2.aggregateStepName}Result.trim() || null
|
|
7138
|
-
: ${input2.aggregateStepName}Result?.${outputField} ?? null;
|
|
7167
|
+
return ${returnsObjectWithField ? `${input2.aggregateStepName}Result.${outputField} ?? null` : `${input2.aggregateStepName}Result ?? null`};
|
|
7139
7168
|
})`;
|
|
7140
7169
|
}
|
|
7141
7170
|
function generateFinderProviderResolver(input2) {
|
package/dist/cli/index.mjs
CHANGED
|
@@ -206,10 +206,10 @@ import { join as join2 } from "path";
|
|
|
206
206
|
|
|
207
207
|
// src/release.ts
|
|
208
208
|
var SDK_RELEASE = {
|
|
209
|
-
version: "0.1.
|
|
209
|
+
version: "0.1.83",
|
|
210
210
|
apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
|
|
211
211
|
supportPolicy: {
|
|
212
|
-
latest: "0.1.
|
|
212
|
+
latest: "0.1.83",
|
|
213
213
|
minimumSupported: "0.1.53",
|
|
214
214
|
deprecatedBelow: "0.1.53"
|
|
215
215
|
}
|
|
@@ -1844,21 +1844,27 @@ import {
|
|
|
1844
1844
|
existsSync as existsSync4,
|
|
1845
1845
|
mkdirSync as mkdirSync3,
|
|
1846
1846
|
readFileSync as readFileSync4,
|
|
1847
|
-
rmSync,
|
|
1847
|
+
rmSync as rmSync2,
|
|
1848
1848
|
writeFileSync as writeFileSync3
|
|
1849
1849
|
} from "fs";
|
|
1850
1850
|
import { hostname } from "os";
|
|
1851
1851
|
import { dirname as dirname3 } from "path";
|
|
1852
1852
|
|
|
1853
1853
|
// src/cli/utils.ts
|
|
1854
|
-
import {
|
|
1854
|
+
import {
|
|
1855
|
+
existsSync as existsSync3,
|
|
1856
|
+
mkdirSync as mkdirSync2,
|
|
1857
|
+
readFileSync as readFileSync3,
|
|
1858
|
+
rmSync,
|
|
1859
|
+
writeFileSync as writeFileSync2
|
|
1860
|
+
} from "fs";
|
|
1855
1861
|
import { mkdir, writeFile } from "fs/promises";
|
|
1856
1862
|
import { homedir as homedir3 } from "os";
|
|
1857
1863
|
import { dirname as dirname2, join as join3, resolve as resolve2 } from "path";
|
|
1858
1864
|
import * as childProcess from "child_process";
|
|
1859
1865
|
import { parse } from "csv-parse/sync";
|
|
1860
1866
|
import { stringify } from "csv-stringify/sync";
|
|
1861
|
-
var
|
|
1867
|
+
var BROWSER_OPEN_COOLDOWN_MS = 3e4;
|
|
1862
1868
|
var defaultBrowserCommandRunner = childProcess;
|
|
1863
1869
|
function getAuthedHttpClient() {
|
|
1864
1870
|
const config = resolveConfig();
|
|
@@ -1871,7 +1877,7 @@ async function writeOutputFile(filename, content) {
|
|
|
1871
1877
|
await writeFile(fullPath, content, "utf-8");
|
|
1872
1878
|
return fullPath;
|
|
1873
1879
|
}
|
|
1874
|
-
function
|
|
1880
|
+
function browserOpenStateFile() {
|
|
1875
1881
|
const homeDir = process.env.HOME || homedir3();
|
|
1876
1882
|
return join3(
|
|
1877
1883
|
homeDir,
|
|
@@ -1879,31 +1885,43 @@ function browserFocusStateFile() {
|
|
|
1879
1885
|
"deepline",
|
|
1880
1886
|
"runtime",
|
|
1881
1887
|
"state",
|
|
1882
|
-
"browser-
|
|
1888
|
+
"browser-open.json"
|
|
1883
1889
|
);
|
|
1884
1890
|
}
|
|
1885
|
-
function
|
|
1886
|
-
const statePath =
|
|
1891
|
+
function claimBrowserOpen(now = Date.now()) {
|
|
1892
|
+
const statePath = browserOpenStateFile();
|
|
1893
|
+
const lockPath = `${statePath}.lock`;
|
|
1894
|
+
let locked = false;
|
|
1887
1895
|
try {
|
|
1888
1896
|
mkdirSync2(dirname2(statePath), { recursive: true });
|
|
1889
|
-
|
|
1897
|
+
try {
|
|
1898
|
+
mkdirSync2(lockPath);
|
|
1899
|
+
locked = true;
|
|
1900
|
+
} catch {
|
|
1901
|
+
return false;
|
|
1902
|
+
}
|
|
1903
|
+
let lastOpenedAt = 0;
|
|
1890
1904
|
if (existsSync3(statePath)) {
|
|
1891
1905
|
const payload = JSON.parse(readFileSync3(statePath, "utf-8"));
|
|
1892
|
-
const value = payload.lastFocusedAt ?? payload.last_focused_at;
|
|
1906
|
+
const value = payload.lastOpenedAt ?? payload.last_opened_at ?? payload.lastFocusedAt ?? payload.last_focused_at;
|
|
1893
1907
|
if (typeof value === "number" && Number.isFinite(value)) {
|
|
1894
|
-
|
|
1908
|
+
lastOpenedAt = value;
|
|
1895
1909
|
}
|
|
1896
1910
|
}
|
|
1897
|
-
if (
|
|
1898
|
-
|
|
1911
|
+
if (lastOpenedAt > now) {
|
|
1912
|
+
lastOpenedAt = 0;
|
|
1899
1913
|
}
|
|
1900
|
-
if (now -
|
|
1914
|
+
if (now - lastOpenedAt < BROWSER_OPEN_COOLDOWN_MS) {
|
|
1901
1915
|
return false;
|
|
1902
1916
|
}
|
|
1903
|
-
writeFileSync2(statePath, JSON.stringify({
|
|
1917
|
+
writeFileSync2(statePath, JSON.stringify({ lastOpenedAt: now }), "utf-8");
|
|
1904
1918
|
return true;
|
|
1905
1919
|
} catch {
|
|
1906
1920
|
return true;
|
|
1921
|
+
} finally {
|
|
1922
|
+
if (locked) {
|
|
1923
|
+
rmSync(lockPath, { recursive: true, force: true });
|
|
1924
|
+
}
|
|
1907
1925
|
}
|
|
1908
1926
|
}
|
|
1909
1927
|
function extractUrlHost(raw) {
|
|
@@ -2073,7 +2091,8 @@ function openInBrowser(url) {
|
|
|
2073
2091
|
if (browserOpeningDisabled()) return;
|
|
2074
2092
|
const targetUrl = String(url || "").trim();
|
|
2075
2093
|
if (!targetUrl) return;
|
|
2076
|
-
|
|
2094
|
+
if (!claimBrowserOpen()) return;
|
|
2095
|
+
const allowFocus = true;
|
|
2077
2096
|
if (process.platform === "darwin") {
|
|
2078
2097
|
openUrlMacos(targetUrl, allowFocus);
|
|
2079
2098
|
return;
|
|
@@ -2322,7 +2341,7 @@ function readPendingClaimToken(baseUrl) {
|
|
|
2322
2341
|
}
|
|
2323
2342
|
function clearPendingClaimToken(baseUrl) {
|
|
2324
2343
|
try {
|
|
2325
|
-
|
|
2344
|
+
rmSync2(pendingClaimTokenPath(baseUrl), { force: true });
|
|
2326
2345
|
} catch {
|
|
2327
2346
|
}
|
|
2328
2347
|
}
|
|
@@ -6565,6 +6584,9 @@ function jsonSchemaTypeExpression(schema) {
|
|
|
6565
6584
|
function objectPropertySchema(schema, property) {
|
|
6566
6585
|
return isRecord3(schema) && isRecord3(schema.properties) ? schema.properties[property] : null;
|
|
6567
6586
|
}
|
|
6587
|
+
function playOutputHasField(schema, field) {
|
|
6588
|
+
return objectPropertySchema(schema, field) != null;
|
|
6589
|
+
}
|
|
6568
6590
|
function finderResultTypeName(finder) {
|
|
6569
6591
|
return finder === "email_finder" ? "EmailFinderPlayResult" : "PhoneFinderPlayResult";
|
|
6570
6592
|
}
|
|
@@ -6575,13 +6597,13 @@ function renderFinderPlayResultType(input2) {
|
|
|
6575
6597
|
input2.play.outputSchema,
|
|
6576
6598
|
outputField
|
|
6577
6599
|
);
|
|
6578
|
-
|
|
6579
|
-
|
|
6580
|
-
|
|
6581
|
-
| null
|
|
6582
|
-
| {
|
|
6600
|
+
if (fieldSchema) {
|
|
6601
|
+
const fieldType = jsonSchemaTypeExpression(fieldSchema);
|
|
6602
|
+
return `type ${finderResultTypeName(input2.finder)} = {
|
|
6583
6603
|
${outputField}?: ${fieldType};
|
|
6584
6604
|
};`;
|
|
6605
|
+
}
|
|
6606
|
+
return `type ${finderResultTypeName(input2.finder)} = ${jsonSchemaTypeExpression(input2.play.outputSchema)};`;
|
|
6585
6607
|
}
|
|
6586
6608
|
function generatedFinderPlayResultTypes(input2) {
|
|
6587
6609
|
return ["email_finder", "phone_finder"].flatMap((finder) => {
|
|
@@ -6601,6 +6623,15 @@ function exampleValueComment(field) {
|
|
|
6601
6623
|
if (field === "roles" || field.endsWith("s")) return '["..."]';
|
|
6602
6624
|
return '"..."';
|
|
6603
6625
|
}
|
|
6626
|
+
function rowFieldValueExpression(field) {
|
|
6627
|
+
if (field === "limit" || field === "numResults" || field === "num_results" || field === "page_size" || field === "max_duration") {
|
|
6628
|
+
return `Number(row[${jsString(field)}] ?? 0)`;
|
|
6629
|
+
}
|
|
6630
|
+
if (field === "roles" || field.endsWith("s")) {
|
|
6631
|
+
return `String(row[${jsString(field)}] ?? '').split(',').map((item) => item.trim()).filter(Boolean)`;
|
|
6632
|
+
}
|
|
6633
|
+
return `String(row[${jsString(field)}] ?? '')`;
|
|
6634
|
+
}
|
|
6604
6635
|
function generateContactInputObjectFromSchema(schema, indent2, label, fallbackFields = ["first_name", "last_name", "domain"]) {
|
|
6605
6636
|
const details = schemaFieldDetails(schema);
|
|
6606
6637
|
const required = details.required.length ? details.required : fallbackFields;
|
|
@@ -6611,7 +6642,9 @@ function generateContactInputObjectFromSchema(schema, indent2, label, fallbackFi
|
|
|
6611
6642
|
`${indent2}// Required: ${required.join(", ") || "none declared"}.`
|
|
6612
6643
|
];
|
|
6613
6644
|
for (const field of required) {
|
|
6614
|
-
lines.push(
|
|
6645
|
+
lines.push(
|
|
6646
|
+
`${indent2}${field}: ${rowFieldValueExpression(field)}, // TODO: confirm source field`
|
|
6647
|
+
);
|
|
6615
6648
|
}
|
|
6616
6649
|
if (optional.length > 0) {
|
|
6617
6650
|
lines.push("");
|
|
@@ -6997,9 +7030,9 @@ function generatePlaySourceRowsBlock(input2) {
|
|
|
6997
7030
|
});
|
|
6998
7031
|
return `const sourceInput = ${playInput};
|
|
6999
7032
|
throw new Error(${jsString(`TODO: map sourceInput for ${input2.source.value}, choose the play output rows field, then delete this throw.`)});
|
|
7000
|
-
const sourceResult = await ctx.runPlay('source_play', ${jsString(input2.source.value)}, sourceInput, {
|
|
7033
|
+
const sourceResult = (await ctx.runPlay('source_play', ${jsString(input2.source.value)}, sourceInput, {
|
|
7001
7034
|
description: ${jsString(`Seed ${input2.entity} rows from the selected play.`)},
|
|
7002
|
-
});
|
|
7035
|
+
})) as { rows?: unknown[] };
|
|
7003
7036
|
// TODO: Replace sourceResult.rows with the selected play's actual row output field.
|
|
7004
7037
|
const ${input2.collection}: ${input2.collectionType}[] = (sourceResult.rows ?? []) as ${input2.collectionType}[];`;
|
|
7005
7038
|
}
|
|
@@ -7089,14 +7122,14 @@ function generateSourceSeedBlock(input2) {
|
|
|
7089
7122
|
for (const [index, company] of companies.slice(0, limit).entries()) {
|
|
7090
7123
|
const peopleInput = ${peopleInput};
|
|
7091
7124
|
throw new Error(${jsString(`TODO: map company fields into peopleInput for ${peoplePlayRef}, choose the play output rows field, then delete this throw.`)});
|
|
7092
|
-
const peopleResult = await ctx.runPlay(
|
|
7125
|
+
const peopleResult = (await ctx.runPlay(
|
|
7093
7126
|
\`people_play_\${index}\`,
|
|
7094
7127
|
${jsString(peoplePlayRef)},
|
|
7095
7128
|
peopleInput,
|
|
7096
7129
|
{
|
|
7097
7130
|
description: 'Map one company row into people/contact rows with the selected play.',
|
|
7098
7131
|
},
|
|
7099
|
-
);
|
|
7132
|
+
)) as { rows?: unknown[] };
|
|
7100
7133
|
// TODO: Replace peopleResult.rows with the selected play's actual contact rows field.
|
|
7101
7134
|
contacts.push(...((peopleResult.rows ?? []) as ContactSourceRow[]));
|
|
7102
7135
|
}`;
|
|
@@ -7120,6 +7153,10 @@ function optionalFinderValueExpression(candidateExpression, outputField) {
|
|
|
7120
7153
|
function generateFinderPlayStep(input2) {
|
|
7121
7154
|
const outputField = PLAY_BOOTSTRAP_OUTPUT_FIELD_BY_FINDER[input2.finder];
|
|
7122
7155
|
const resultTypeName = finderResultTypeName(input2.finder);
|
|
7156
|
+
const returnsObjectWithField = playOutputHasField(
|
|
7157
|
+
input2.play?.outputSchema,
|
|
7158
|
+
outputField
|
|
7159
|
+
);
|
|
7123
7160
|
const payload = generateContactInputObjectFromSchema(
|
|
7124
7161
|
input2.play?.inputSchema,
|
|
7125
7162
|
" ",
|
|
@@ -7136,9 +7173,7 @@ function generateFinderPlayStep(input2) {
|
|
|
7136
7173
|
description: ${jsString(`Run ${input2.finder} play.`)},
|
|
7137
7174
|
},
|
|
7138
7175
|
);
|
|
7139
|
-
return
|
|
7140
|
-
? ${input2.aggregateStepName}Result.trim() || null
|
|
7141
|
-
: ${input2.aggregateStepName}Result?.${outputField} ?? null;
|
|
7176
|
+
return ${returnsObjectWithField ? `${input2.aggregateStepName}Result.${outputField} ?? null` : `${input2.aggregateStepName}Result ?? null`};
|
|
7142
7177
|
})`;
|
|
7143
7178
|
}
|
|
7144
7179
|
function generateFinderProviderResolver(input2) {
|
package/dist/index.js
CHANGED
|
@@ -241,10 +241,10 @@ var import_node_path2 = require("path");
|
|
|
241
241
|
|
|
242
242
|
// src/release.ts
|
|
243
243
|
var SDK_RELEASE = {
|
|
244
|
-
version: "0.1.
|
|
244
|
+
version: "0.1.83",
|
|
245
245
|
apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
|
|
246
246
|
supportPolicy: {
|
|
247
|
-
latest: "0.1.
|
|
247
|
+
latest: "0.1.83",
|
|
248
248
|
minimumSupported: "0.1.53",
|
|
249
249
|
deprecatedBelow: "0.1.53"
|
|
250
250
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -179,10 +179,10 @@ import { join as join2 } from "path";
|
|
|
179
179
|
|
|
180
180
|
// src/release.ts
|
|
181
181
|
var SDK_RELEASE = {
|
|
182
|
-
version: "0.1.
|
|
182
|
+
version: "0.1.83",
|
|
183
183
|
apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
|
|
184
184
|
supportPolicy: {
|
|
185
|
-
latest: "0.1.
|
|
185
|
+
latest: "0.1.83",
|
|
186
186
|
minimumSupported: "0.1.53",
|
|
187
187
|
deprecatedBelow: "0.1.53"
|
|
188
188
|
}
|
|
@@ -50,10 +50,10 @@ export type SdkRelease = {
|
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
export const SDK_RELEASE = {
|
|
53
|
-
version: '0.1.
|
|
53
|
+
version: '0.1.83',
|
|
54
54
|
apiContract: '2026-06-dataset-column-cell-stale-hard-cutover',
|
|
55
55
|
supportPolicy: {
|
|
56
|
-
latest: '0.1.
|
|
56
|
+
latest: '0.1.83',
|
|
57
57
|
minimumSupported: '0.1.53',
|
|
58
58
|
deprecatedBelow: '0.1.53',
|
|
59
59
|
},
|