Files
codium_nostr_extension/package.json
T

334 lines
10 KiB
JSON

{
"name": "nostr-publish",
"displayName": "Nostr Publish",
"description": "Publish files to Nostr from Codium/VSCode. Phase 0: raw unsigned event JSON. Phase 1: long-form notes (.md). Phase 2: signer (Rust n_signer port) signing backend.",
"version": "0.1.3",
"publisher": "laantungir",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://laantungir.net/git/laantungir/nostr-publish.git"
},
"engines": {
"vscode": "^1.85.0"
},
"categories": [
"Other"
],
"main": "./dist/extension.js",
"activationEvents": [
"onCommand:nostr.signIn",
"onCommand:nostr.createUnsignedEvent",
"onCommand:nostr.signEventFile",
"onCommand:nostr.publishEventFile",
"onCommand:nostr.validateEventFile",
"onCommand:nostr.publishLongForm",
"onCommand:nostr.publishTextNote",
"onCommand:nostr.validateFrontMatter",
"onCommand:nostr.fetchRelays",
"onCommand:nostr.fetchBlossomServers",
"onCommand:nostr.uploadToBlossom",
"onCommand:nostr.publishBlossomFile",
"onCommand:nostr.selectBackend",
"onCommand:nostr.signInFromSidebar",
"onCommand:nostr.insertNoteHeader",
"onCommand:nostr.insertBlobHeader",
"onView:nostr.sidebar"
],
"contributes": {
"viewsContainers": {
"activitybar": [
{
"id": "nostr",
"title": "Nostr",
"icon": "media/activitybar.svg"
}
]
},
"views": {
"nostr": [
{
"id": "nostr.sidebar",
"name": "Nostr",
"type": "webview"
}
]
},
"commands": [
{
"command": "nostr.signIn",
"title": "Nostr: Sign In",
"category": "Nostr"
},
{
"command": "nostr.signOut",
"title": "Nostr: Sign Out",
"category": "Nostr"
},
{
"command": "nostr.createUnsignedEvent",
"title": "Nostr: Create Unsigned Event",
"category": "Nostr"
},
{
"command": "nostr.validateEventFile",
"title": "Nostr: Validate Event File",
"category": "Nostr",
"enablement": "editorLangId == json"
},
{
"command": "nostr.signEventFile",
"title": "Nostr: Sign Event",
"category": "Nostr",
"enablement": "resourceScheme == file || resourceScheme == untitled"
},
{
"command": "nostr.publishEventFile",
"title": "Nostr: Publish Event from JSON File",
"category": "Nostr",
"enablement": "editorLangId == json"
},
{
"command": "nostr.publishLongForm",
"title": "Nostr: Publish Current File as Long-Form Note",
"category": "Nostr",
"enablement": "editorLangId == markdown"
},
{
"command": "nostr.publishTextNote",
"title": "Nostr: Publish Current File as Text Note",
"category": "Nostr",
"enablement": "resourceScheme == file || resourceScheme == untitled"
},
{
"command": "nostr.validateFrontMatter",
"title": "Nostr: Validate Front-Matter",
"category": "Nostr",
"enablement": "editorLangId == markdown"
},
{
"command": "nostr.resetPublishedTimestamps",
"title": "Nostr: Reset Published Timestamps",
"category": "Nostr"
},
{
"command": "nostr.fetchRelays",
"title": "Nostr: Fetch My Relays (NIP-65)",
"category": "Nostr"
},
{
"command": "nostr.selectBackend",
"title": "Nostr: Select Signer Backend",
"category": "Nostr"
},
{
"command": "nostr.insertNoteHeader",
"title": "Nostr: Insert Note Header",
"category": "Nostr",
"enablement": "editorLangId == markdown"
},
{
"command": "nostr.insertBlobHeader",
"title": "Nostr: Insert Blob Header",
"category": "Nostr",
"enablement": "editorLangId == markdown"
},
{
"command": "nostr.fetchBlossomServers",
"title": "Nostr: Fetch My Blossom Servers (BUD-03)",
"category": "Nostr"
},
{
"command": "nostr.uploadToBlossom",
"title": "Nostr: Upload File to Blossom",
"category": "Nostr",
"enablement": "resourceScheme == file || resourceScheme == untitled"
},
{
"command": "nostr.publishBlossomFile",
"title": "Nostr: Publish to Blossom (with header)",
"category": "Nostr",
"enablement": "editorLangId == markdown"
}
],
"menus": {
"editor/context": [
{
"command": "nostr.validateEventFile",
"when": "editorLangId == json",
"group": "nostr@1"
},
{
"command": "nostr.signEventFile",
"when": "resourceScheme == file || resourceScheme == untitled",
"group": "nostr@2"
},
{
"command": "nostr.publishEventFile",
"when": "editorLangId == json",
"group": "nostr@3"
},
{
"command": "nostr.validateFrontMatter",
"when": "editorLangId == markdown",
"group": "nostr@1"
},
{
"command": "nostr.publishLongForm",
"when": "editorLangId == markdown",
"group": "nostr@2"
},
{
"command": "nostr.publishTextNote",
"when": "resourceScheme == file || resourceScheme == untitled",
"group": "nostr@3"
},
{
"command": "nostr.insertNoteHeader",
"when": "editorLangId == markdown",
"group": "nostr@0"
},
{
"command": "nostr.insertBlobHeader",
"when": "editorLangId == markdown",
"group": "nostr@0"
},
{
"command": "nostr.uploadToBlossom",
"when": "resourceScheme == file || resourceScheme == untitled",
"group": "nostr@4"
},
{
"command": "nostr.publishBlossomFile",
"when": "editorLangId == markdown",
"group": "nostr@3"
}
]
},
"configuration": {
"title": "Nostr Publish",
"properties": {
"nostr.relays": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"wss://relay.damus.io",
"wss://relay.primal.net",
"wss://laantungir.net/relay"
],
"description": "Relays to publish events to."
},
"nostr.publish.confirm": {
"type": "boolean",
"default": true,
"description": "Show a confirmation dialog before broadcasting an event."
},
"nostr.publish.timeoutMs": {
"type": "number",
"default": 10000,
"description": "Per-relay publish timeout in milliseconds."
},
"nostr.signerBackend": {
"type": "string",
"enum": [
"local",
"signer"
],
"default": "local",
"description": "Signing backend. 'local' uses an in-memory key; 'signer' delegates to a running signer (Rust port of n_signer) over an abstract Unix socket."
},
"nostr.signer.socketName": {
"type": "string",
"default": "signer01",
"description": "Abstract socket name (without @) of the running signer. Signer auto-names signer01, signer02, … Used when transport=unix."
},
"nostr.signer.role": {
"type": "string",
"default": "main",
"description": "signer role name (acts as an access token) used to select the Nostr key. Sent as 'role' to the nostr_* verbs."
},
"nostr.signer.rolePath": {
"type": "string",
"default": "m/44'/1237'/0'/0/0",
"description": "Full BIP-44 derivation path for the Nostr key. Sent as 'role_path' to the nostr_* verbs. Edit the account segment (e.g. m/44'/1237'/N'/0/0) to pick a different account."
},
"nostr.signer.transport": {
"type": "string",
"enum": [
"unix",
"qrexec",
"tcp"
],
"default": "unix",
"description": "Transport for reaching signer: unix (local abstract socket), qrexec (Qubes OS inter-qube), tcp (remote / FIPS mesh)."
},
"nostr.signer.tcpHost": {
"type": "string",
"default": "127.0.0.1",
"description": "TCP host for signer. Used when transport=tcp."
},
"nostr.signer.tcpPort": {
"type": "number",
"default": 8080,
"description": "TCP port for signer. Used when transport=tcp."
},
"nostr.signer.qrexecQube": {
"type": "string",
"default": "nostr_signer",
"description": "Target qube name for qrexec transport. Used when transport=qrexec."
},
"nostr.signer.qrexecService": {
"type": "string",
"default": "qubes.SignerRpc",
"description": "Qrexec service name. Used when transport=qrexec."
},
"nostr.signer.callerNsec": {
"type": "string",
"default": "",
"description": "Caller nsec/hex for TCP auth envelopes (kind 22242). Required for transport=tcp when the signer runs --auth required. Not persisted to disk by the extension."
},
"nostr.blossomServers": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Blossom media servers (full URLs) to upload blobs to. Used when no kind 10063 server list is fetched from your relays."
},
"nostr.blossom.uploadTimeoutMs": {
"type": "number",
"default": 30000,
"description": "Per-server Blossom upload timeout in milliseconds."
},
"nostr.blossom.authTokenTtlSec": {
"type": "number",
"default": 60,
"description": "Lifetime in seconds of the kind 24242 Blossom authorization token (BUD-11)."
}
}
}
},
"scripts": {
"compile": "node esbuild.mjs",
"watch": "node esbuild.mjs --watch",
"package": "vsce package",
"publish": "vsce publish",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"nostr-tools": "file:../nostr-tools",
"ws": "^8.16.0",
"yaml": "^2.9.0"
},
"devDependencies": {
"@types/node": "^20.10.0",
"@types/vscode": "^1.85.0",
"@types/ws": "^8.5.10",
"@vscode/vsce": "^2.22.0",
"esbuild": "^0.19.0",
"typescript": "^5.3.0"
}
}