Skip to content

Commit

Permalink
feat: extract wasm tar in /jans-tarp folder
Browse files Browse the repository at this point in the history
Signed-off-by: Arnab Dutta <[email protected]>
  • Loading branch information
duttarnab committed Jan 17, 2025
1 parent ef8a07a commit 3f10f7f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion demos/jans-tarp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@
"react-spinner-overlay": "^0.1.33",
"styled-components": "^6.1.0",
"uuid": "^9.0.0",
"wasm": "file:src/wasm"
"wasm": "file:wasm"
}
}
5 changes: 3 additions & 2 deletions demos/jans-tarp/src/options/userDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import AccordionDetails from '@mui/material/AccordionDetails';
import Typography from '@mui/material/Typography';
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';

import __wbg_init, { init, Cedarling, AuthorizeResult } from "wasm";
import __wbg_init, { init, Cedarling, AuthorizeResult } from 'wasm';

const UserDetails = ({ data, notifyOnDataChange }) => {
const [loading, setLoading] = useState(false);
Expand Down Expand Up @@ -61,9 +61,10 @@ const UserDetails = ({ data, notifyOnDataChange }) => {
await __wbg_init();
instance = await init(!isEmpty(cedarlingConfig?.cedarlingConfig) ? cedarlingConfig?.cedarlingConfig[0] : undefined);
let result: AuthorizeResult = await instance.authorize(reqObj);
let logs = await instance.pop_logs();
setAuthzResult(result.json_string())
console.log("result:", result);
let logs = await instance.pop_logs();
logs.push(await instance.pop_logs());
if (logs.length != 0) {
let pretty_logs = logs.map(log => JSON.stringify(log, null, 2));
setAuthzLogs(pretty_logs.toString());
Expand Down

0 comments on commit 3f10f7f

Please sign in to comment.