Skip to content

Commit

Permalink
Update dependencies, remove unused code, and add wasm version of jsonnet
Browse files Browse the repository at this point in the history
  • Loading branch information
rahul007-bit committed Jan 27, 2024
1 parent b564c0f commit 33f5c94
Show file tree
Hide file tree
Showing 16 changed files with 872 additions and 213 deletions.
2 changes: 1 addition & 1 deletion JS/wasm/examples/ec-wasmjs-hono/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ build({
format: "esm",
target: "esnext",
platform: "node",
external: ["arakoo-jsonnet"],
external: ["arakoo"],
}).catch((error) => {
console.error(error);
process.exit(1);
Expand Down
13 changes: 6 additions & 7 deletions JS/wasm/examples/ec-wasmjs-hono/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion JS/wasm/examples/ec-wasmjs-hono/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@hono/node-server": "^1.3.1",
"axios": "^1.6.2",
"crypto": "^1.0.1",
"arakoo-jsonnet": "file:../../types/jsonnet",
"arakoo": "file:../../types/jsonnet",
"http": "^0.0.1-security",
"stream": "^0.0.2"
}
Expand Down
11 changes: 0 additions & 11 deletions JS/wasm/examples/ec-wasmjs-hono/src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Hono } from "hono";
import { connect } from "@planetscale/database";
import { jsonnet, jsonnetExtVars } from "arakoo-jsonnet";

const app = new Hono();

Expand All @@ -9,16 +8,6 @@ app.get("/", (c) => {
return c.text(`Your from ${geo.city}, ${geo.country_name}!`);
});

app.get("/jsonnet", async (c) => {
try {
const result = await jsonnet("test.jsonnet");
return c.json(JSON.parse(result));
} catch (error) {
console.log(JSON.stringify(error));
c.text(error);
}
});

app.get("/vars", async (c) => {
try {
const extVars = JSON.stringify({
Expand Down
7 changes: 2 additions & 5 deletions JS/wasm/types/jsonnet/.gitignore
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
target
**/node_modules
**/.DS_Store
npm-debug.log*

/target
node_modules/
Loading

0 comments on commit 33f5c94

Please sign in to comment.