Files
codium_nostr_extension/package.json
T

238 lines
7.0 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: n_signer signing backend.",
"version": "0.1.0",
"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.publishEventFile",
"onCommand:nostr.validateEventFile",
"onCommand:nostr.publishLongForm",
"onCommand:nostr.validateFrontMatter",
"onCommand:nostr.fetchRelays",
"onCommand:nostr.selectBackend",
"onCommand:nostr.signInFromSidebar",
"onCommand:nostr.insertNoteHeader",
"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.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.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"
}
],
"menus": {
"editor/context": [
{
"command": "nostr.validateEventFile",
"when": "editorLangId == json",
"group": "nostr@1"
},
{
"command": "nostr.publishEventFile",
"when": "editorLangId == json",
"group": "nostr@2"
},
{
"command": "nostr.validateFrontMatter",
"when": "editorLangId == markdown",
"group": "nostr@1"
},
{
"command": "nostr.publishLongForm",
"when": "editorLangId == markdown",
"group": "nostr@2"
},
{
"command": "nostr.insertNoteHeader",
"when": "editorLangId == markdown",
"group": "nostr@0"
}
]
},
"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", "nsigner"],
"default": "local",
"description": "Signing backend. 'local' uses an in-memory key; 'nsigner' delegates to a running n_signer over an abstract Unix socket."
},
"nostr.nsigner.socketName": {
"type": "string",
"default": "nsigner",
"description": "Abstract socket name (without @) of the running n_signer. Used when transport=unix."
},
"nostr.nsigner.nostrIndex": {
"type": "number",
"default": 0,
"description": "nostr_index passed to n_signer get_public_key / sign_event."
},
"nostr.nsigner.transport": {
"type": "string",
"enum": ["unix", "qrexec", "tcp"],
"default": "unix",
"description": "Transport for reaching n_signer: unix (local abstract socket), qrexec (Qubes OS inter-qube), tcp (remote / FIPS mesh)."
},
"nostr.nsigner.tcpHost": {
"type": "string",
"default": "127.0.0.1",
"description": "TCP host for n_signer. Used when transport=tcp."
},
"nostr.nsigner.tcpPort": {
"type": "number",
"default": 8080,
"description": "TCP port for n_signer. Used when transport=tcp."
},
"nostr.nsigner.qrexecQube": {
"type": "string",
"default": "nostr_signer",
"description": "Target qube name for qrexec transport. Used when transport=qrexec."
},
"nostr.nsigner.qrexecService": {
"type": "string",
"default": "qubes.NsignerRpc",
"description": "Qrexec service name. Used when transport=qrexec."
},
"nostr.nsigner.callerNsec": {
"type": "string",
"default": "",
"description": "Caller nsec/hex for TCP auth envelopes (kind 27235). Required for transport=tcp if not signed in locally. Not persisted to disk by the extension."
}
}
}
},
"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"
}
}