{"id":28122647,"url":"https://github.com/eclipse-biscuit/biscuit-web-components","last_synced_at":"2025-10-17T21:12:11.114Z","repository":{"id":42627361,"uuid":"425236955","full_name":"eclipse-biscuit/biscuit-web-components","owner":"eclipse-biscuit","description":"web components for Biscuit based Datalog editors and policy execution","archived":false,"fork":false,"pushed_at":"2025-04-08T13:50:35.000Z","size":808,"stargazers_count":2,"open_issues_count":6,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-03T16:36:11.727Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eclipse-biscuit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-06T12:20:20.000Z","updated_at":"2025-04-08T13:50:39.000Z","dependencies_parsed_at":"2022-09-26T16:22:20.101Z","dependency_job_id":"19e99d4b-5883-483c-b654-3b7f7463b288","html_url":"https://github.com/eclipse-biscuit/biscuit-web-components","commit_stats":{"total_commits":144,"total_committers":3,"mean_commits":48.0,"dds":0.5347222222222222,"last_synced_commit":"26a9fd7d8fd6e871595e4b81aa5a2318725c44fe"},"previous_names":["biscuit-auth/biscuit-web-components"],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-biscuit%2Fbiscuit-web-components","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-biscuit%2Fbiscuit-web-components/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-biscuit%2Fbiscuit-web-components/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-biscuit%2Fbiscuit-web-components/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eclipse-biscuit","download_url":"https://codeload.github.com/eclipse-biscuit/biscuit-web-components/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254101543,"owners_count":22014909,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-14T08:14:19.292Z","updated_at":"2025-10-17T21:12:11.094Z","avatar_url":"https://github.com/eclipse-biscuit.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `biscuit-web-components`\n\nThis repo is part of the [eclipse biscuit](https://github.com/biscuit-auth/biscuit) project.\n\nBiscuit web components are tools used to provide in-browser biscuit tooling.\nSee [documentation](https://doc.biscuitsec.org/usage/web-components.html)\n\n## How to update tree-sitter\n\nTree-sitter is packaged in a way that makes it difficult to load it up with `wds`, it is packaged as a CommonJS module (modifying a `module.exports` object) and as such does not play well with es modules.\n\nThe simplest solution I have found is to turn the CommonJS module into an ES module by adding the following at the end of the file:\n\n```js\nawait TreeSitter.init({\n  locateFile(scriptName, scriptDirectory) {\n    return \"/assets/tree-sitter.wasm\";\n  }\n});\nexport const Parser = TreeSitter;\n```\n\nThis also calls `init` once, with the proper location of the wasm file.\n\nSo to update `tree-sitter`:\n\n- run `npm install --no-save web-tree-sitter` (check if that’s the correct version)\n- `cp node_modules/web-tree-sitter/tree-sitter.wasm assets/`\n- `cp node_modules/web-tree-sitter/tree-sitter-web.d.ts ./tree-sitter.d.ts`\n- edit `tree-sitter.d.ts`\n  - remove the `declare module` scope\n  - remove the `export = Parser`\n  - add `export ` in front of `class Parser`\n  - add `export ` in front of `namespace Parser`\n- `cp node_modules/web-tree-sitter/tree-sitter.js ./`\n- ```bash\ncat \u003c\u003c 'EOF' \u003e\u003e tree-sitter.js\nawait TreeSitter.init({\n  locateFile(scriptName, scriptDirectory) {\n    return \"/assets/tree-sitter.wasm\";\n  }\n});\nexport const Parser = TreeSitter;\nEOF\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-biscuit%2Fbiscuit-web-components","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feclipse-biscuit%2Fbiscuit-web-components","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-biscuit%2Fbiscuit-web-components/lists"}