Skip to content

Commit 5311477

Browse files
committed
refactor(vis-network): migrate to TypeScript
1 parent 48b4016 commit 5311477

22 files changed

Lines changed: 10526 additions & 33673 deletions

.changeset/dull-results-admire.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@nodesecure/vis-network": major
3+
---
4+
5+
Migrate to TypeScript

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@
8585
"cross-env": "^10.1.0",
8686
"esbuild": "0.27.4",
8787
"eslint-plugin-jsdoc": "62.8.0",
88-
"http-server": "^14.1.1",
8988
"pkg-ok": "^3.0.0",
9089
"postcss-lit": "1.4.1",
9190
"pretty-bytes": "^7.0.0",

workspaces/vis-network/esbuild.config.js

Lines changed: 0 additions & 27 deletions
This file was deleted.

workspaces/vis-network/example/demo.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<link rel="preconnect" href="https://fonts.googleapis.com">
88
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
99
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" rel="stylesheet">
10-
<script src="master.js" type="module"></script>
10+
<script src="master.ts" type="module"></script>
1111
<style>
1212
body, html {
1313
height: 100%;

workspaces/vis-network/example/master.js

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Import Third-party Dependencies
2+
import type { Payload } from "@nodesecure/scanner";
3+
4+
// Import Internal Dependencies
5+
import {
6+
NodeSecureDataSet,
7+
NodeSecureNetwork
8+
} from "../src/index.ts";
9+
import payload from "./payload.json" with { type: "json" };
10+
11+
declare global {
12+
interface Window {
13+
FLAGS: unknown;
14+
}
15+
}
16+
17+
document.addEventListener("DOMContentLoaded", async() => {
18+
const secureDataSet = new NodeSecureDataSet();
19+
await secureDataSet.init(
20+
payload as unknown as Payload,
21+
window.FLAGS
22+
);
23+
24+
new NodeSecureNetwork(secureDataSet, {
25+
theme: "LIGHT"
26+
});
27+
});

0 commit comments

Comments
 (0)