Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
623 changes: 509 additions & 114 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/comms/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"name": "index.html",
"request": "launch",
"type": "msedge",
"url": "http://localhost:5521/index.html",
"url": "http://localhost:5173/index.html",
"runtimeArgs": [
"--disable-web-security"
],
Expand Down
36 changes: 18 additions & 18 deletions packages/comms/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,24 @@
<h1>ESM Quick Test</h1>
<div id="placeholder"></div>
<script type="module">
import { Workunit } from "./src/index.browser.ts";

Workunit.submit({ baseUrl: "http://localhost:8010" }, "hthor", "'Hello and Welcome!';")
.then((wu) => {
return wu.watchUntilComplete();
}).then((wu) => {
return wu.fetchResults().then((results) => {
return results[0].fetchRows();
}).then((rows) => {
return wu;
});
}).then((wu) => {
return wu.delete().then(() => wu);
}).then(wu => {
console.log("Deleted WU: " + wu.Wuid, wu.isDeleted());
}).catch((e) => {
console.error(e);
});
import { test } from "./tests/index.ts";
test();
// Workunit.submit({ baseUrl: "http://localhost:8010" }, "hthor", "'Hello and Welcome!';")
// .then((wu) => {
// return wu.watchUntilComplete();
// }).then((wu) => {
// return wu.fetchResults().then((results) => {
// return results[0].fetchRows();
// }).then((rows) => {
// return wu;
// });
// }).then((wu) => {
// return wu.delete().then(() => wu);
// }).then(wu => {
// console.log("Deleted WU: " + wu.Wuid, wu.isDeleted());
// }).catch((e) => {
// console.error(e);
// });
</script>
</body>

Expand Down
2 changes: 1 addition & 1 deletion packages/comms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"d3-time-format": "^2",
"data-uri-to-buffer": "6.0.2",
"safe-buffer": "5.2.1",
"tmp": "0.2.3",
"tmp": "0.2.4",
"soap": "1.2.0",
"typescript-formatter": "^7.2.2"
},
Expand Down
43 changes: 43 additions & 0 deletions packages/comms/tests/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { scopedLogger } from "@hpcc-js/util";
import { Workunit } from "@hpcc-js/comms";

const logger = scopedLogger("tests");

export function test() {
const wu = Workunit.attach({ baseUrl: "http://localhost:8010" }, "W20250806-122131");

Promise.all([
wu.fetchInfo({ IncludeExceptions: true }),
wu.fetchDetailsNormalized({
ScopeFilter: "logical:*",
NestedFilter: "",
PropertiesToReturn: {
AllScopes: true,
AllAttributes: true,
AllProperties: true,
AllNotes: true,
AllStatistics: true,
AllHints: true
},
ScopeOptions: {
IncludeId: true,
IncludeScope: true,
IncludeScopeType: true,
IncludeMatchedScopesInResults: true
},
PropertyOptions: {
IncludeName: true,
IncludeRawValue: true,
IncludeFormatted: true,
IncludeMeasure: true,
IncludeCreator: false,
IncludeCreatorType: false
}
})
]).then(([info, response]) => {
debugger;
}).catch(e => {
logger.error(e);
}).finally(() => {
});
}
4 changes: 2 additions & 2 deletions packages/esbuild-plugins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
"esbuild-copy-static-files": "0.1.0",
"esbuild-plugin-inline-css": "0.0.1",
"fzstd": "0.1.1",
"vite": "7.0.6",
"vite": "7.0.7",
"vite-plugin-css-injected-by-js": "3.5.2",
"vite-plugin-static-copy": "3.1.1"
"vite-plugin-static-copy": "3.1.2"
},
"devDependencies": {
"@hpcc-js/wasm-base91": "1.5.0",
Expand Down
5 changes: 4 additions & 1 deletion packages/markdown-it-plugins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@
"dependencies": {
"@hpcc-js/observablehq-compiler": "^3.3.9",
"@observablehq/framework": "1.13.3",
"@observablehq/runtime": "5.9.9",
"@observablehq/parser": "6.1.0",
"@observablehq/inspector": "5.0.1",
"@observablehq/stdlib": "5.8.8",
"@observablehq/runtime": "6.0.0",
"@types/markdown-it": "14.1.2"
},
"peerDependencies": {
Expand Down
14 changes: 14 additions & 0 deletions packages/observablehq-compiler/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,20 @@
"!**/node_modules/**"
]
},
{
"name": "index-notebook-kit.html",
"request": "launch",
"type": "msedge",
"url": "http://localhost:5514/index-notebook-kit.html",
"runtimeArgs": [
"--disable-web-security"
],
"webRoot": "${workspaceFolder}",
"outFiles": [
"${workspaceFolder}/**/*.js",
"!**/node_modules/**"
]
},
{
"name": "index-preview.html",
"request": "launch",
Expand Down
4 changes: 3 additions & 1 deletion packages/observablehq-compiler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ The interpreter is 100% compatible with:
It also supports fetching notebooks directly from the ObservableHQ repository.

```js
import { Library, Runtime, Inspector } from "@observablehq/runtime";
import { Inspector } from "@observablehq/inspector";
import { Library } from "@observablehq/stdlib";
import { Runtime } from "@observablehq/runtime";
import { download, compile } from "@hpcc-js/observablehq-compiler";

const placeholder = document.getElementById("placeholder");
Expand Down
4 changes: 0 additions & 4 deletions packages/observablehq-compiler/esbuild.js

This file was deleted.

39 changes: 39 additions & 0 deletions packages/observablehq-compiler/index-notebook-kit.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!DOCTYPE html>
<html>

<head>
<title>Home</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f0f0f0;
}

h1 {
text-align: center;
margin-top: 50px;
}

#placeholder {
width: 100%;
height: 500px;
background-color: #fff;
margin-top: 20px;
}
</style>
</head>

<body>
<h1>ESM Quick Test</h1>
<div id="placeholder"></div>
<script type="module">

import { test } from "./tests/index-notebook-kit.ts";
test();

</script>
</body>

</html>
13 changes: 11 additions & 2 deletions packages/observablehq-compiler/index-preview.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,14 @@
<script type="importmap">
{
"imports": {
"@observablehq/runtime": "https://cdn.jsdelivr.net/npm/@observablehq/runtime@5.9.9/dist/runtime.js",
"@observablehq/stdlib": "https://cdn.jsdelivr.net/npm/@observablehq/stdlib@5.8.8/src/index.js",
"@observablehq/inspector": "https://cdn.jsdelivr.net/npm/@observablehq/inspector@5.0.1/src/index.js",
"@observablehq/runtime": "https://cdn.jsdelivr.net/npm/@observablehq/runtime@6.0.0/src/index.js",
"isoformat": "https://cdn.jsdelivr.net/npm/isoformat@0.2.1/src/index.js",
"d3-dsv": "https://cdn.jsdelivr.net/npm/d3-dsv@3.0.1/src/index.js",
"d3-require": "https://cdn.jsdelivr.net/npm/d3-require@1.3.0/src/index.mjs",
"d3-array": "https://cdn.jsdelivr.net/npm/d3-array@3.2.4/src/index.js",
"internmap": "https://cdn.jsdelivr.net/npm/internmap@2.0.3/src/index.js",

"@hpcc-js/observablehq-compiler": "../observablehq-compiler/dist/index.js"
}
Expand All @@ -38,7 +45,9 @@
<h1>ESM Quick Test</h1>
<div id="placeholder"></div>
<script type="module">
import { Library, Runtime, Inspector } from "@observablehq/runtime";
import { Inspector } from "@observablehq/inspector";
import { Library } from "@observablehq/stdlib";
import { Runtime } from "@observablehq/runtime";
import { omd2notebook, compile } from "@hpcc-js/observablehq-compiler";

const md = `\
Expand Down
4 changes: 3 additions & 1 deletion packages/observablehq-compiler/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
<h1>ESM Quick Test</h1>
<div id="placeholder"></div>
<script type="module">
import { Library, Runtime, Inspector } from "@observablehq/runtime";
import { Inspector } from "@observablehq/inspector";
import { Library } from "@observablehq/stdlib";
import { Runtime } from "@observablehq/runtime";
import { omd2notebook, compile } from "./src/index.ts";

const md = `\
Expand Down
5 changes: 4 additions & 1 deletion packages/observablehq-compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@
"devDependencies": {
"@hpcc-js/esbuild-plugins": "^1.4.9",
"@observablehq/parser": "6.1.0",
"@observablehq/runtime": "5.9.9"
"@observablehq/inspector": "5.0.1",
"@observablehq/stdlib": "5.8.8",
"@observablehq/notebook-kit": "1.0.1"

},
"repository": {
"type": "git",
Expand Down
11 changes: 7 additions & 4 deletions packages/observablehq-compiler/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
export type { ohq } from "./observable-shim.ts";
export type { ohq } from "./ojs/observable-shim.ts";

export * from "./compiler.ts";
export { ojs2notebook, omd2notebook, download } from "./util.ts";
export * from "./writer.ts";
export * from "./ojs/compiler.ts";
export { ojs2notebook, omd2notebook } from "./ojs/util.ts";
export { download } from "./util/comms.ts";
export * from "./ojs/writer.ts";

import "../src/index.css";

export * from "./ohqnk/index.ts";
Loading
Loading