Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e02ad288e0 | ||
|
|
30f3596eb5 |
@@ -3,19 +3,19 @@
|
|||||||
## Build Commands
|
## Build Commands
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bun run dev # Development: runs build.js + tailwindcss --watch
|
npm run dev # Development: runs build.js + tailwindcss --watch
|
||||||
bun run build # Production build → extension/output
|
npm run build # Production build → extension/output
|
||||||
bun run package:chrome # Creates extension/releases/nostrconnect_chrome.zip
|
npm run package:chrome # Creates extension/releases/nostrconnect_chrome.zip
|
||||||
bun run package:firefox # Creates extension/releases/nostrconnect_firefox.xpi
|
npm run package:firefox # Creates extension/releases/nostrconnect_firefox.xpi
|
||||||
bun run lint # Run Biome linter
|
npm run lint # Run Biome linter
|
||||||
bun run format # Format with Biome (auto-fix)
|
npm run format # Format with Biome (auto-fix)
|
||||||
bun run test # Run tests with Vitest
|
npm run test # Run tests with Vitest
|
||||||
bun run test:watch # Run tests in watch mode
|
npm run test:watch # Run tests in watch mode
|
||||||
```
|
```
|
||||||
|
|
||||||
## Key Facts
|
## Key Facts
|
||||||
|
|
||||||
- **Package manager**: bun (preferred) or pnpm. Uses `@jsr` registry for `@nostr/tools`
|
- **Package manager**: npm. Peer dependency conflicts are tolerated via `legacy-peer-deps=true` in `.npmrc`
|
||||||
- **Build output**: `extension/output/` (not `dist/`)
|
- **Build output**: `extension/output/` (not `dist/`)
|
||||||
- **Ignore `extension/output/`**: It contains generated JS/HTML/CSS and is gitignored
|
- **Ignore `extension/output/`**: It contains generated JS/HTML/CSS and is gitignored
|
||||||
- **Tailwind source**: `extension/style.css` → `extension/output/style.css`
|
- **Tailwind source**: `extension/style.css` → `extension/output/style.css`
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ async window.nostr.nip44.decrypt(pubkey, ciphertext): string // NIP-44 decryptio
|
|||||||
```bash
|
```bash
|
||||||
git clone https://git.reya.su/reya/nostr-connect
|
git clone https://git.reya.su/reya/nostr-connect
|
||||||
cd nostr-connect
|
cd nostr-connect
|
||||||
bun install
|
npm install
|
||||||
bun run build
|
npm run build
|
||||||
```
|
```
|
||||||
|
|
||||||
Then:
|
Then:
|
||||||
@@ -37,9 +37,9 @@ Then:
|
|||||||
## Commands
|
## Commands
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bun run dev # Development mode
|
npm run dev # Development mode
|
||||||
bun run build # Production build
|
npm run build # Production build
|
||||||
bun run lint # Lint code
|
npm run lint # Lint code
|
||||||
bun run test # Run tests
|
npm run test # Run tests
|
||||||
bun run package:chrome # Package for Chrome
|
npm run package:chrome # Package for Chrome
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "Nostr Signer (formerly Nostr Connect)",
|
"name": "Nostr Signer (formerly Nostr Connect)",
|
||||||
"description": "Nostr Signer Extension",
|
"description": "Nostr Signer Extension",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"homepage_url": "https://git.reya.su/reya/nostr-connect",
|
"homepage_url": "https://git.reya.su/reya/nostr-connect",
|
||||||
"manifest_version": 3,
|
"manifest_version": 3,
|
||||||
"icons": {
|
"icons": {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "Nostr Signer (formerly Nostr Connect)",
|
"name": "Nostr Signer (formerly Nostr Connect)",
|
||||||
"description": "Nostr Signer Extension",
|
"description": "Nostr Signer Extension",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"homepage_url": "https://git.reya.su/reya/nostr-connect",
|
"homepage_url": "https://git.reya.su/reya/nostr-connect",
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"browser_specific_settings": {
|
"browser_specific_settings": {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -21,9 +21,9 @@
|
|||||||
mod
|
mod
|
||||||
));
|
));
|
||||||
|
|
||||||
// node_modules/.pnpm/webextension-polyfill@0.8.0/node_modules/webextension-polyfill/dist/browser-polyfill.js
|
// node_modules/webextension-polyfill/dist/browser-polyfill.js
|
||||||
var require_browser_polyfill = __commonJS({
|
var require_browser_polyfill = __commonJS({
|
||||||
"node_modules/.pnpm/webextension-polyfill@0.8.0/node_modules/webextension-polyfill/dist/browser-polyfill.js"(exports, module) {
|
"node_modules/webextension-polyfill/dist/browser-polyfill.js"(exports, module) {
|
||||||
(function(global, factory) {
|
(function(global, factory) {
|
||||||
if (typeof define === "function" && define.amd) {
|
if (typeof define === "function" && define.amd) {
|
||||||
define("webextension-polyfill", ["module"], factory);
|
define("webextension-polyfill", ["module"], factory);
|
||||||
|
|||||||
@@ -1,9 +1,16 @@
|
|||||||
{
|
{
|
||||||
"name": "Nostr Signer (formerly Nostr Connect)",
|
"name": "Nostr Signer (formerly Nostr Connect)",
|
||||||
"description": "Nostr Signer Extension",
|
"description": "Nostr Signer Extension",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"homepage_url": "https://git.reya.su/reya/nostr-connect",
|
"homepage_url": "https://git.reya.su/reya/nostr-connect",
|
||||||
"manifest_version": 3,
|
"manifest_version": 2,
|
||||||
|
"browser_specific_settings": {
|
||||||
|
"gecko": {
|
||||||
|
"data_collection_permissions": {
|
||||||
|
"required": ["none"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"icons": {
|
"icons": {
|
||||||
"16": "icons/icon16.png",
|
"16": "icons/icon16.png",
|
||||||
"32": "icons/icon32.png",
|
"32": "icons/icon32.png",
|
||||||
@@ -12,25 +19,19 @@
|
|||||||
},
|
},
|
||||||
"options_page": "options.html",
|
"options_page": "options.html",
|
||||||
"background": {
|
"background": {
|
||||||
"service_worker": "background.build.js"
|
"scripts": ["background.build.js"]
|
||||||
},
|
},
|
||||||
"action": {
|
"browser_action": {
|
||||||
"default_title": "Nostr Signer",
|
"default_title": "Nostr Signer",
|
||||||
"default_popup": "popup.html"
|
"default_popup": "popup.html"
|
||||||
},
|
},
|
||||||
"content_scripts": [
|
"content_scripts": [
|
||||||
{
|
{
|
||||||
"matches": ["<all_urls>"],
|
"matches": ["<all_urls>"],
|
||||||
"js": ["content-script.build.js"],
|
"js": ["content-script.build.js"]
|
||||||
"all_frames": true
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"permissions": ["storage", "activeTab", "windows"],
|
"permissions": ["storage", "activeTab", "windows"],
|
||||||
"optional_permissions": ["notifications"],
|
"optional_permissions": ["notifications"],
|
||||||
"web_accessible_resources": [
|
"web_accessible_resources": ["nostr-provider.js"]
|
||||||
{
|
|
||||||
"resources": ["nostr-provider.js"],
|
|
||||||
"matches": ["https://*/*", "http://localhost:*/*"]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
+3639
-1648
File diff suppressed because it is too large
Load Diff
+3519
-1560
File diff suppressed because it is too large
Load Diff
+546
-211
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Generated
+4050
File diff suppressed because it is too large
Load Diff
+4
-6
@@ -1,7 +1,6 @@
|
|||||||
{
|
{
|
||||||
"license": "WTFPL",
|
"license": "WTFPL",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nostr/tools": "npm:@jsr/nostr__tools@^2.23.3",
|
|
||||||
"@radix-ui/react-checkbox": "^1.3.3",
|
"@radix-ui/react-checkbox": "^1.3.3",
|
||||||
"@radix-ui/react-tabs": "^1.1.13",
|
"@radix-ui/react-tabs": "^1.1.13",
|
||||||
"async-mutex": "^0.3.2",
|
"async-mutex": "^0.3.2",
|
||||||
@@ -11,17 +10,16 @@
|
|||||||
"nostr-tools": "^2.8.1",
|
"nostr-tools": "^2.8.1",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
"react-dom": "^17.0.2",
|
"react-dom": "^17.0.2",
|
||||||
"react-native-svg": "^13.14.1",
|
|
||||||
"react-qr-code": "^2.0.18",
|
"react-qr-code": "^2.0.18",
|
||||||
"use-boolean-state": "^1.0.2",
|
"use-boolean-state": "^1.0.2",
|
||||||
"use-debounce": "^7.0.1",
|
"use-debounce": "^7.0.1",
|
||||||
"webextension-polyfill": "^0.8.0"
|
"webextension-polyfill": "^0.8.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "./build.js; bunx tailwindcss -i ./extension/style.css -o ./extension/output/style.css --watch",
|
"dev": "./build.js; npx tailwindcss -i ./extension/style.css -o ./extension/output/style.css --watch",
|
||||||
"build": "bunx tailwindcss -i ./extension/style.css -o ./extension/output/style.css; ./build.js prod",
|
"build": "npx tailwindcss -i ./extension/style.css -o ./extension/output/style.css; ./build.js prod",
|
||||||
"package:chrome": "bunx tailwindcss -i ./extension/style.css -o ./extension/output/style.css --minify; ./build.js prod; cd extension/output; zip -r archive *; cd ../../; mv extension/output/archive.zip extension/releases/nostrconnect_chrome.zip",
|
"package:chrome": "npx tailwindcss -i ./extension/style.css -o ./extension/output/style.css --minify; ./build.js prod; cd extension/output; zip -r archive *; cd ../../; mv extension/output/archive.zip extension/releases/nostrconnect_chrome.zip",
|
||||||
"package:firefox": "bunx tailwindcss -i ./extension/style.css -o ./extension/output/style.css --minify; ./build.js prod firefox; cd extension/output; zip -r archive *; cd ../../; mv extension/output/archive.zip extension/releases/nostrconnect_firefox.xpi",
|
"package:firefox": "npx tailwindcss -i ./extension/style.css -o ./extension/output/style.css --minify; ./build.js prod firefox; cd extension/output; zip -r archive *; cd ../../; mv extension/output/archive.zip extension/releases/nostrconnect_firefox.xpi",
|
||||||
"lint": "biome lint ./extension/background.js ./extension/common.js ./extension/nostr-provider.js ./extension/content-script.js ./extension/popup.jsx ./extension/prompt.jsx ./extension/options.jsx ./extension/icons.jsx ./extension/utils.js",
|
"lint": "biome lint ./extension/background.js ./extension/common.js ./extension/nostr-provider.js ./extension/content-script.js ./extension/popup.jsx ./extension/prompt.jsx ./extension/options.jsx ./extension/icons.jsx ./extension/utils.js",
|
||||||
"format": "biome format --write ./extension/background.js ./extension/common.js ./extension/nostr-provider.js ./extension/content-script.js ./extension/popup.jsx ./extension/prompt.jsx ./extension/options.jsx ./extension/icons.jsx ./extension/utils.js",
|
"format": "biome format --write ./extension/background.js ./extension/common.js ./extension/nostr-provider.js ./extension/content-script.js ./extension/popup.jsx ./extension/prompt.jsx ./extension/options.jsx ./extension/icons.jsx ./extension/utils.js",
|
||||||
"test": "vitest run",
|
"test": "vitest run",
|
||||||
|
|||||||
Generated
-7612
File diff suppressed because it is too large
Load Diff
@@ -1,2 +0,0 @@
|
|||||||
allowBuilds:
|
|
||||||
esbuild: false
|
|
||||||
Reference in New Issue
Block a user