-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Mart Somermaa <[email protected]>
- Loading branch information
Showing
35 changed files
with
4,733 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
max_line_length = 120 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
bin | ||
node_modules | ||
dist | ||
*.mjs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
module.exports = { | ||
env: { | ||
"browser": true, | ||
"es6": true, | ||
"webextensions": true, | ||
"node": true | ||
}, | ||
root: true, | ||
parser: "@typescript-eslint/parser", | ||
plugins: [ | ||
"@typescript-eslint", | ||
], | ||
extends: [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
], | ||
rules: { | ||
"quotes": "error", | ||
"semi": "off", | ||
"key-spacing": ["error", { "align": "value" }], | ||
"comma-dangle": ["error", "always-multiline"], | ||
"object-curly-spacing": ["error", "always"], | ||
"array-bracket-spacing": "error", | ||
"indent": "off", | ||
"@typescript-eslint/indent": ["error", 2], | ||
"@typescript-eslint/semi": ["error"], | ||
"@typescript-eslint/no-explicit-any": "off", | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
yarn.lock* | ||
|
||
# Dependency directories | ||
node_modules/ | ||
|
||
# Parcel related files | ||
dist/ | ||
.cache/ | ||
|
||
# Windows | ||
Thumbs.db | ||
Thumbs.db:encryptable | ||
ehthumbs.db | ||
ehthumbs_vista.db | ||
[Dd]esktop.ini | ||
|
||
# macOS | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
._* | ||
|
||
# Python | ||
__pycache__ | ||
|
||
# Vim | ||
*.swp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@web-eid:registry=https://gitlab.com/api/v4/packages/npm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Web-eID WebExtension | ||
|
||
 | ||
|
||
The Web eID extension for the Chrome, Edge, Firefox and Opera web browsers is | ||
built using the WebExtensions API, a cross-browser system for developing | ||
extensions. The extension communicates with the Web eID native application | ||
using Native messaging. Native messaging enables an extension to exchange | ||
messages with a native application installed on the user's computer to enable | ||
the extension to access resources that are not accessible through WebExtension | ||
APIs, like the smart card subsystem. | ||
|
||
## Setup (for developers/testers) | ||
|
||
1. Install the latest LTS version of Node.js - [https://nodejs.org](https://nodejs.org) | ||
|
||
2. Clone the project | ||
```bash | ||
git clone [email protected]:web-eid/webextension/web-eid-webextension.git | ||
``` | ||
|
||
3. Install dependencies | ||
```bash | ||
cd web-eid-webextension | ||
npm install | ||
``` | ||
|
||
4. Build the project with zip packages | ||
```bash | ||
npm run clean build package | ||
``` | ||
|
||
For reproducible builds, set the `SOURCE_DATE_EPOCH` environment variable. | ||
See [https://reproducible-builds.org/docs/source-date-epoch](https://reproducible-builds.org/docs/source-date-epoch) for details. | ||
```bash | ||
SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) npm run clean build package | ||
``` | ||
|
||
Alternatively, for reproducible builds, the `SOURCE_DATE_EPOCH` value can be taken from the `SOURCE_DATE_EPOCH` file of a previous build. | ||
```bash | ||
SOURCE_DATE_EPOCH=$(cat ../previous-build/dist/firefox/SOURCE_DATE_EPOCH) npm run clean build package | ||
``` | ||
|
||
5. Load in Firefox as a Temporary Extension | ||
1. Open [about:debugging#/runtime/this-firefox](about:debugging#/runtime/this-firefox) | ||
2. Click "Load temporary Add-on..." and open `/web-eid-webextension/dist/manifest.json` | ||
|
||
### Configuration | ||
|
||
Make sure the `NATIVE_APP_NAME` value in `src/config.ts` matches the one in | ||
the Web-eID native application manifest file. | ||
|
Oops, something went wrong.