@observablehq/notebook-kit 2.1.2 → 2.1.4
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
|
@@ -16,12 +16,9 @@ export function findFeatures(name, body, input) {
|
|
|
16
16
|
const { callee } = node;
|
|
17
17
|
if (callee.type !== "Identifier" || !references.has(callee))
|
|
18
18
|
return;
|
|
19
|
-
const
|
|
20
|
-
if (
|
|
21
|
-
throw syntaxError(`${name} requires a
|
|
22
|
-
const [arg] = args;
|
|
23
|
-
if (!isStringLiteral(arg))
|
|
24
|
-
throw syntaxError(`${name} requires a single literal string argument`, node, input); // prettier-ignore
|
|
19
|
+
const [arg] = node.arguments;
|
|
20
|
+
if (!arg || !isStringLiteral(arg))
|
|
21
|
+
throw syntaxError(`${name} requires a literal string argument`, node, input); // prettier-ignore
|
|
25
22
|
calls.push(Object.assign(node, { argument: getStringLiteralValue(arg) }));
|
|
26
23
|
}
|
|
27
24
|
});
|
|
@@ -36,7 +36,10 @@ export function transpileObservable(input, options) {
|
|
|
36
36
|
output: cell.id ? asDeclaration(cell.id) : undefined,
|
|
37
37
|
autodisplay: true,
|
|
38
38
|
automutable: cell.id?.type === "MutableExpression",
|
|
39
|
-
autoview: cell.id?.type === "ViewExpression"
|
|
39
|
+
autoview: cell.id?.type === "ViewExpression",
|
|
40
|
+
files: new Set(cell.fileAttachments.keys()),
|
|
41
|
+
databases: new Set(cell.databaseClients.keys()),
|
|
42
|
+
secrets: new Set(cell.secrets.keys())
|
|
40
43
|
};
|
|
41
44
|
}
|
|
42
45
|
/** Rewrite bare module specifiers to have the observable: protocol. */
|