@observablehq/notebook-kit 1.9.0 → 1.9.1
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/package.json
CHANGED
|
@@ -14,6 +14,12 @@ export type TranspiledJavaScript = {
|
|
|
14
14
|
autoview?: boolean;
|
|
15
15
|
/** whether to implicitly derive a mutable; requires mutable output */
|
|
16
16
|
automutable?: boolean;
|
|
17
|
+
/** the names of any referenced files */
|
|
18
|
+
files?: Set<string>;
|
|
19
|
+
/** the names of any referenced databases */
|
|
20
|
+
databases?: Set<string>;
|
|
21
|
+
/** the names of any referenced secrets */
|
|
22
|
+
secrets?: Set<string>;
|
|
17
23
|
};
|
|
18
24
|
export type TranspileOptions = {
|
|
19
25
|
/** If true, resolve local imports paths relative to document.baseURI. */
|
|
@@ -60,5 +60,8 @@ export function transpileJavaScript(input, options) {
|
|
|
60
60
|
output.insertRight(input.length, "\n}");
|
|
61
61
|
const body = String(output);
|
|
62
62
|
const autodisplay = cell.expression && !(inputs.includes("display") || inputs.includes("view"));
|
|
63
|
-
|
|
63
|
+
const files = new Set(cell.files.map((f) => f.argument));
|
|
64
|
+
const databases = new Set(cell.databases.map((f) => f.argument));
|
|
65
|
+
const secrets = new Set(cell.secrets.map((f) => f.argument));
|
|
66
|
+
return { body, inputs, outputs, autodisplay, files, databases, secrets };
|
|
64
67
|
}
|