{"id":13798707,"url":"https://github.com/stoically/webextensions-schema","last_synced_at":"2025-04-14T17:12:40.941Z","repository":{"id":39613595,"uuid":"222153272","full_name":"stoically/webextensions-schema","owner":"stoically","description":"Programmatically consume the WebExtensions Schema JSON files","archived":false,"fork":false,"pushed_at":"2022-06-24T17:15:39.000Z","size":250,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-14T17:12:35.679Z","etag":null,"topics":["schemas","webextensions"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stoically.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}},"created_at":"2019-11-16T20:08:04.000Z","updated_at":"2024-07-14T18:19:14.000Z","dependencies_parsed_at":"2022-09-15T21:40:50.408Z","dependency_job_id":null,"html_url":"https://github.com/stoically/webextensions-schema","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stoically%2Fwebextensions-schema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stoically%2Fwebextensions-schema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stoically%2Fwebextensions-schema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stoically%2Fwebextensions-schema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stoically","download_url":"https://codeload.github.com/stoically/webextensions-schema/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248923764,"owners_count":21183953,"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":["schemas","webextensions"],"created_at":"2024-08-04T00:00:50.400Z","updated_at":"2025-04-14T17:12:40.914Z","avatar_url":"https://github.com/stoically.png","language":"TypeScript","funding_links":[],"categories":["Testing"],"sub_categories":[],"readme":"# WebExtensions Schema\n\nProgrammatically consume the WebExtensions Schema JSON files. Defaults to the latest stable ones.\n\n## Install\n\n```\nnpm i webextensions-schema\n```\n\n## Usage\n\n```ts\nimport webExtensionsSchema from 'webextensions-schema';\n\n(async () =\u003e {\n  const schema = await webExtensionsSchema();\n  // do something with `schema`\n})();\n```\n\n## API\n\n### webExtensionsSchema([options])\n\n- Arguments\n  - `{Object}` options\n    - `tag` Any tag, except `tip`, [from mozilla-unified](https://hg.mozilla.org/mozilla-unified/tags) is valid. Default: Automatically fetches the latest stable release tag from `download.mozilla.org`.\n\nSchema files for a tag that don't exist in the [`.schemas`\ndirectory](https://github.com/stoically/webextensions-schema/tree/master/.schemas)\nare downloaded once and saved there for future calls. Already ships with some\nschema files (feel free to PR to add newer ones).\n\nReturns a `Promise` resolving to the `schema` instance.\n\n### schema.raw()\n\nReturns an `Object` with schema filename as key and parsed JSON as value.\n\nSample:\n\n```js\n{\n  'tabs.json': [\n    { namespace: 'manifest', types: [Array] },\n    {\n      namespace: 'tabs',\n      ...\n    }\n  ]\n}\n```\n\n### schema.namespaces()\n\nReturns an `Object` with namespace name as key and an `Array` of namespaces as value.\n\nSample:\n\n```js\n{\n  manifest: [\n    { namespace: 'manifest', types: [Array] },\n    { namespace: 'manifest', types: [Array] },\n    ...\n  ],\n  tabs: [\n    {\n      namespace: 'tabs',\n      functions: [\n        [Object], [Object], [Object],\n        ...\n      ]\n    }\n  ]\n}\n```\n\n### schema.tag()\n\nReturns a `string` with tag name that was used for the `schema` instance.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstoically%2Fwebextensions-schema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstoically%2Fwebextensions-schema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstoically%2Fwebextensions-schema/lists"}