Skip to content

Commit

Permalink
Automatically applying Prettier changes
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Apr 21, 2024
1 parent d4d2c5b commit 61418ca
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion JS/jsonnet/src/jsonnet.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ if (!isArakoo) {
let vars = JSON.stringify(this.vars);
return __jsonnet_evaluate_snippet(vars, snippet);
}
evaluateFile(filename){
evaluateFile(filename) {
let vars = JSON.stringify(this.vars);
return __jsonnet_evaluate_file(vars, filename);
}
Expand Down
18 changes: 10 additions & 8 deletions JS/jsonnet/src/jsonnet_wasm_bg.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { read_file } from './snippets/arakoo-jsonnet-17c737407ebd2d3c/read-file.js';
import { read_file } from "./snippets/arakoo-jsonnet-17c737407ebd2d3c/read-file.js";

let wasm;
export function __wbg_set_wasm(val) {
Expand Down Expand Up @@ -334,13 +334,15 @@ export function __wbindgen_string_new(arg0, arg1) {
return addHeapObject(ret);
}

export function __wbg_readfile_5b48d0f7e3518df2() { return handleError(function (arg0, arg1, arg2) {
const ret = read_file(getStringFromWasm0(arg1, arg2));
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len1 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len1;
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
}, arguments) };
export function __wbg_readfile_5b48d0f7e3518df2() {
return handleError(function (arg0, arg1, arg2) {
const ret = read_file(getStringFromWasm0(arg1, arg2));
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len1 = WASM_VECTOR_LEN;
getInt32Memory0()[arg0 / 4 + 1] = len1;
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
}, arguments);
}

export function __wbindgen_object_clone_ref(arg0) {
const ret = getObject(arg0);
Expand Down
4 changes: 2 additions & 2 deletions JS/wasm/examples/ec-wasmjs-hono/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ build({
target: "esnext",
platform: "node",
// external: ["arakoo"],
loader:{
".jsonnet":"copy"
loader: {
".jsonnet": "copy",
},
define: {
"process.env.arakoo": JSON.stringify(runtime === "arakoo"),
Expand Down
9 changes: 4 additions & 5 deletions JS/wasm/examples/ec-wasmjs-hono/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,16 @@ app.get("/", (c) => {
return c.json(JSON.parse(result));
});

app.get('/file', (c)=>{
app.get("/file", (c) => {
try {
let result = jsonnet.extString("extName","Mohan").evaluateFile("example.jsonnet");
let result = jsonnet.extString("extName", "Mohan").evaluateFile("example.jsonnet");
return c.json(JSON.parse(result));
} catch (error) {
console.log("Error occured");
console.log(error);
return c.json("Unable to evaluate File")
return c.json("Unable to evaluate File");
}

})
});

app.get("/:username", (c) => {
const { username } = c.req.param();
Expand Down

0 comments on commit 61418ca

Please sign in to comment.