@overaihq/cli 0.16.0 → 0.16.2
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/index.js +29 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -46069,6 +46069,8 @@ var NodeEnum = /* @__PURE__ */ ((NodeEnum2) => {
|
|
|
46069
46069
|
NodeEnum2["dropboxDownloadFile"] = "DROPBOX_DOWNLOAD_FILE";
|
|
46070
46070
|
NodeEnum2["dropboxListFolder"] = "DROPBOX_LIST_FOLDER";
|
|
46071
46071
|
NodeEnum2["dropboxUploadFile"] = "DROPBOX_UPLOAD_FILE";
|
|
46072
|
+
NodeEnum2["dynamics365Action"] = "DYNAMICS365_ACTION";
|
|
46073
|
+
NodeEnum2["dynamics365Query"] = "DYNAMICS365_QUERY";
|
|
46072
46074
|
NodeEnum2["emailReceived"] = "EMAIL_RECEIVED";
|
|
46073
46075
|
NodeEnum2["entraIdAction"] = "ENTRA_ID_ACTION";
|
|
46074
46076
|
NodeEnum2["error"] = "ERROR";
|
|
@@ -46360,7 +46362,7 @@ var jsonStringSchema = (fieldName) => external_exports.coerce.string().trim().de
|
|
|
46360
46362
|
{ message: `${fieldName} was not valid JSON` }
|
|
46361
46363
|
);
|
|
46362
46364
|
var jsonStringRecordSchema = (fieldName) => jsonStringSchema(fieldName).refine(
|
|
46363
|
-
(v) => external_exports.record(external_exports.string(), external_exports.string()).safeParse(JSON.parse(v)).success,
|
|
46365
|
+
(v) => external_exports.record(external_exports.string(), external_exports.string()).safeParse(resultOfSync(() => JSON.parse(v))[0]).success,
|
|
46364
46366
|
{ message: `${fieldName} should be a JSON object of string values` }
|
|
46365
46367
|
);
|
|
46366
46368
|
var integrationHttpActionRunnableSchema = external_exports.object({
|
|
@@ -61767,7 +61769,9 @@ var printablePageRender = (client, id) => ({
|
|
|
61767
61769
|
inputs: {
|
|
61768
61770
|
printablePageId: id,
|
|
61769
61771
|
searchParams: options?.searchParams ?? "{}",
|
|
61770
|
-
includeDiagnostics: true
|
|
61772
|
+
includeDiagnostics: true,
|
|
61773
|
+
...options?.format == null ? {} : { format: options.format },
|
|
61774
|
+
...options?.scale == null ? {} : { scale: options.scale }
|
|
61771
61775
|
}
|
|
61772
61776
|
}),
|
|
61773
61777
|
signal: AbortSignal.timeout(options?.timeoutMs ?? 6e4)
|
|
@@ -65855,12 +65859,21 @@ var runPrintablePage = async (args) => {
|
|
|
65855
65859
|
const [operation, id] = args;
|
|
65856
65860
|
if (operation !== "render" || id == null)
|
|
65857
65861
|
throw new Error(
|
|
65858
|
-
"Usage: overai printable-page render <id> [--search-params <json|@file>] [--timeout <ms>]"
|
|
65862
|
+
"Usage: overai printable-page render <id> [--search-params <json|@file>] [--format pdf|png|jpeg] [--scale <1-4>] [--timeout <ms>]"
|
|
65859
65863
|
);
|
|
65864
|
+
const rawFormat = flagValue(args, "--format");
|
|
65865
|
+
const format2 = ["pdf", "png", "jpeg"].find((f) => f === rawFormat);
|
|
65866
|
+
if (rawFormat != null && format2 == null)
|
|
65867
|
+
throw new Error("--format must be pdf, png, or jpeg.");
|
|
65868
|
+
const scale = integerFlag(args, "--scale");
|
|
65869
|
+
if (scale != null && (scale < 1 || scale > 4))
|
|
65870
|
+
throw new Error("--scale must be 1 to 4.");
|
|
65860
65871
|
const searchParams = await readValue(flagValue(args, "--search-params"), "--search-params") ?? "{}";
|
|
65861
65872
|
JSON.parse(searchParams);
|
|
65862
65873
|
const body = await cliClient().printablePage(id).render({
|
|
65863
65874
|
searchParams,
|
|
65875
|
+
format: format2,
|
|
65876
|
+
scale,
|
|
65864
65877
|
timeoutMs: integerFlag(args, "--timeout", 6e4)
|
|
65865
65878
|
});
|
|
65866
65879
|
printResult(body, resolveFormat(flagValue(args, "-o", "--output")));
|
|
@@ -68261,6 +68274,13 @@ requests. That distinguishes "my code is broken" from "my edit isn't deployed
|
|
|
68261
68274
|
yet" \u2014 which otherwise look like the same blank page. A guess about why a render
|
|
68262
68275
|
failed, written down as a conclusion, will mislead every step that follows it.
|
|
68263
68276
|
|
|
68277
|
+
## Rendering to an image
|
|
68278
|
+
|
|
68279
|
+
To get a page as an image (for a document, email, or slide), run the Printable
|
|
68280
|
+
Page to PDF action with the image \`format\`; never rasterize page HTML with
|
|
68281
|
+
html2canvas or similar. The action's input and output descriptions carry
|
|
68282
|
+
formats, scale, and the \`fileUrls\` output.
|
|
68283
|
+
|
|
68264
68284
|
## \`data\` and \`items\` are legacy \u2014 fetch in the page instead
|
|
68265
68285
|
|
|
68266
68286
|
\`data\` (from \`dataSourceUrl\`) and \`items\` (from \`filter\`) are the original way a
|
|
@@ -68906,6 +68926,7 @@ These populate the \`data\`/\`items\` globals once, at render start, from the ol
|
|
|
68906
68926
|
11. **All visualizations must be responsive.** Never hard-code width or height. Use a \`ResizeObserver\` hook to measure the container and pass width/height to your chart. Wrap every chart in a resizable container sized by CSS grid or flex.
|
|
68907
68927
|
12. **Sanity-check chart math with console.log.** You cannot see the rendered output. When building or debugging visualizations, log intermediate values (scales, domains, ranges, computed positions, angles) and verify they make sense before saving. For example: \`console.log("gauge", { min, max, value, fraction, startAngle, endAngle, valueAngle })\`. Remove logs once the chart is working.
|
|
68908
68928
|
13. **Rebuild imported HTML natively \u2014 never embed it.** When the user brings HTML from somewhere else (an exported dashboard, a design mockup, a page from another tool), recreate it as a native page: an \`App\` component, Tailwind, d3 for charts. Pay close attention to preserving the original styling \u2014 colors, spacing, type scale, layout. Do NOT load a foreign HTML file into a \`srcDoc\` iframe or inject it into the DOM. Embedded HTML is opaque to code outlines and reachable only by blind string patches that silently do nothing when the source drifts \u2014 so every later request turns into guesswork. Port it once and every edit after that is a normal edit. (A Liquid printable page is the exception: Liquid is HTML templating, so imported markup becomes the template body directly.)
|
|
68929
|
+
14. **A PDF, image, or print export of page content is a printable page.** Never rasterize the DOM with html2canvas, dom-to-image, or jsPDF \u2014 they re-implement layout off-screen, so badge text clips, photos stretch, and the result drifts from what the page shows. Move the exportable section into a printable page (read the \`printablePages\` topic) and render it with the Printable Page to PDF action, which also outputs PNG/JPEG for embedding in documents; for a user-facing download, call \`openPrintablePage\`.
|
|
68909
68930
|
|
|
68910
68931
|
## Best Practices
|
|
68911
68932
|
|
|
@@ -70038,6 +70059,11 @@ Other resources:
|
|
|
70038
70059
|
overai integration secret unset <id> <KEY>
|
|
70039
70060
|
Remove one credential outright
|
|
70040
70061
|
overai printable-page render <id> [--search-params <json|@file>]
|
|
70062
|
+
[--format pdf|png|jpeg] [--scale <1-4>]
|
|
70063
|
+
Images: one per .page at the configured
|
|
70064
|
+
page size. Images clip at the sheet;
|
|
70065
|
+
the PDF flows overflow onto extra
|
|
70066
|
+
pages. fileUrls lists them all
|
|
70041
70067
|
|
|
70042
70068
|
Self-hosted runners (enabling remote access stays on-device \u2014 not a CLI action):
|
|
70043
70069
|
overai runner create <workspaceId> [--name <name>]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@overaihq/cli",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.2",
|
|
4
4
|
"description": "Create, edit, deploy, and run OverAI workspace resources from the command line",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://overai.com",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"access": "public"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@overaihq/sdk": "0.6.
|
|
23
|
+
"@overaihq/sdk": "0.6.1",
|
|
24
24
|
"@perygee/common": "0.0.0",
|
|
25
25
|
"@types/node": "^24.19.2",
|
|
26
26
|
"@types/proper-lockfile": "^4.1.4",
|