Add missing file extensions to imports
This commit is contained in:
parent
632184afb8
commit
ad07d260ab
|
@ -1,8 +1,8 @@
|
||||||
import { run, bench, group, baseline } from 'mitata'
|
import { run, bench, group, baseline } from 'mitata'
|
||||||
import { initNostrWasm } from 'nostr-wasm'
|
import { initNostrWasm } from 'nostr-wasm'
|
||||||
import { NostrEvent } from './core'
|
import { NostrEvent } from './core.ts'
|
||||||
import { finalizeEvent, generateSecretKey } from './pure'
|
import { finalizeEvent, generateSecretKey } from './pure.ts'
|
||||||
import { setNostrWasm, verifyEvent } from './wasm'
|
import { setNostrWasm, verifyEvent } from './wasm.ts'
|
||||||
import { AbstractRelay } from './abstract-relay.ts'
|
import { AbstractRelay } from './abstract-relay.ts'
|
||||||
import { Relay as PureRelay } from './relay.ts'
|
import { Relay as PureRelay } from './relay.ts'
|
||||||
import { alwaysTrue } from './helpers.ts'
|
import { alwaysTrue } from './helpers.ts'
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { describe, test, expect } from 'bun:test'
|
import { describe, test, expect } from 'bun:test'
|
||||||
import fetch from 'node-fetch'
|
import fetch from 'node-fetch'
|
||||||
import { useFetchImplementation, fetchRelayInformation } from './nip11'
|
import { useFetchImplementation, fetchRelayInformation } from './nip11.ts'
|
||||||
|
|
||||||
// TODO: replace with a mock
|
// TODO: replace with a mock
|
||||||
describe('requesting relay as for NIP11', () => {
|
describe('requesting relay as for NIP11', () => {
|
||||||
|
|
14
nip29.ts
14
nip29.ts
|
@ -1,10 +1,10 @@
|
||||||
import { AbstractSimplePool } from './abstract-pool'
|
import { AbstractSimplePool } from './abstract-pool.ts'
|
||||||
import { Subscription } from './abstract-relay'
|
import { Subscription } from './abstract-relay.ts'
|
||||||
import { decode } from './nip19'
|
import { decode } from './nip19.ts'
|
||||||
import type { Event } from './core'
|
import type { Event } from './core.ts'
|
||||||
import { fetchRelayInformation } from './nip11'
|
import { fetchRelayInformation } from './nip11.ts'
|
||||||
import { normalizeURL } from './utils'
|
import { normalizeURL } from './utils.ts'
|
||||||
import { AddressPointer } from './nip19'
|
import { AddressPointer } from './nip19.ts'
|
||||||
|
|
||||||
export function subscribeRelayGroups(
|
export function subscribeRelayGroups(
|
||||||
pool: AbstractSimplePool,
|
pool: AbstractSimplePool,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { describe, test, expect } from 'bun:test'
|
import { describe, test, expect } from 'bun:test'
|
||||||
import { hexToBytes } from '@noble/hashes/utils'
|
import { hexToBytes } from '@noble/hashes/utils'
|
||||||
import { makeNwcRequestEvent, parseConnectionString } from './nip47'
|
import { makeNwcRequestEvent, parseConnectionString } from './nip47.ts'
|
||||||
import { decrypt } from './nip04.ts'
|
import { decrypt } from './nip04.ts'
|
||||||
import { NWCWalletRequest } from './kinds.ts'
|
import { NWCWalletRequest } from './kinds.ts'
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { test, expect } from 'bun:test'
|
import { test, expect } from 'bun:test'
|
||||||
import { decrypt, encrypt } from './nip49'
|
import { decrypt, encrypt } from './nip49.ts'
|
||||||
import { hexToBytes } from '@noble/hashes/utils'
|
import { hexToBytes } from '@noble/hashes/utils'
|
||||||
|
|
||||||
test('encrypt and decrypt', () => {
|
test('encrypt and decrypt', () => {
|
||||||
|
|
2
nip49.ts
2
nip49.ts
|
@ -1,7 +1,7 @@
|
||||||
import { scrypt } from '@noble/hashes/scrypt'
|
import { scrypt } from '@noble/hashes/scrypt'
|
||||||
import { xchacha20poly1305 } from '@noble/ciphers/chacha'
|
import { xchacha20poly1305 } from '@noble/ciphers/chacha'
|
||||||
import { concatBytes, randomBytes } from '@noble/hashes/utils'
|
import { concatBytes, randomBytes } from '@noble/hashes/utils'
|
||||||
import { Bech32MaxSize, encodeBytes } from './nip19'
|
import { Bech32MaxSize, encodeBytes } from './nip19.ts'
|
||||||
import { bech32 } from '@scure/base'
|
import { bech32 } from '@scure/base'
|
||||||
|
|
||||||
export function encrypt(sec: Uint8Array, password: string, logn: number = 16, ksb: 0x00 | 0x01 | 0x02 = 0x02): string {
|
export function encrypt(sec: Uint8Array, password: string, logn: number = 16, ksb: 0x00 | 0x01 | 0x02 = 0x02): string {
|
||||||
|
|
4
nip58.ts
4
nip58.ts
|
@ -1,9 +1,9 @@
|
||||||
import { Event, EventTemplate } from './core'
|
import { Event, EventTemplate } from './core.ts'
|
||||||
import {
|
import {
|
||||||
BadgeAward as BadgeAwardKind,
|
BadgeAward as BadgeAwardKind,
|
||||||
BadgeDefinition as BadgeDefinitionKind,
|
BadgeDefinition as BadgeDefinitionKind,
|
||||||
ProfileBadges as ProfileBadgesKind,
|
ProfileBadges as ProfileBadgesKind,
|
||||||
} from './kinds'
|
} from './kinds.ts'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the structure for defining a badge within the Nostr network.
|
* Represents the structure for defining a badge within the Nostr network.
|
||||||
|
|
4
nip75.ts
4
nip75.ts
|
@ -1,5 +1,5 @@
|
||||||
import { Event, EventTemplate } from './core'
|
import { Event, EventTemplate } from './core.ts'
|
||||||
import { ZapGoal } from './kinds'
|
import { ZapGoal } from './kinds.ts'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a fundraising goal in the Nostr network as defined by NIP-75.
|
* Represents a fundraising goal in the Nostr network as defined by NIP-75.
|
||||||
|
|
2
nip94.ts
2
nip94.ts
|
@ -1,4 +1,4 @@
|
||||||
import { Event, EventTemplate } from './core'
|
import { Event, EventTemplate } from './core.ts'
|
||||||
import { FileMetadata as FileMetadataKind } from './kinds.ts'
|
import { FileMetadata as FileMetadataKind } from './kinds.ts'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
4
nip96.ts
4
nip96.ts
|
@ -1,6 +1,6 @@
|
||||||
import { sha256 } from '@noble/hashes/sha256'
|
import { sha256 } from '@noble/hashes/sha256'
|
||||||
import { EventTemplate } from './core'
|
import { EventTemplate } from './core.ts'
|
||||||
import { FileServerPreference } from './kinds'
|
import { FileServerPreference } from './kinds.ts'
|
||||||
import { bytesToHex } from '@noble/hashes/utils'
|
import { bytesToHex } from '@noble/hashes/utils'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { describe, expect, test } from 'bun:test'
|
import { describe, expect, test } from 'bun:test'
|
||||||
|
|
||||||
import { Event } from './core'
|
import { Event } from './core.ts'
|
||||||
import { ClassifiedListing, DraftClassifiedListing } from './kinds'
|
import { ClassifiedListing, DraftClassifiedListing } from './kinds.ts'
|
||||||
import { ClassifiedListingObject, generateEventTemplate, parseEvent, validateEvent } from './nip99'
|
import { ClassifiedListingObject, generateEventTemplate, parseEvent, validateEvent } from './nip99.ts'
|
||||||
import { finalizeEvent, generateSecretKey } from './pure'
|
import { finalizeEvent, generateSecretKey } from './pure.ts'
|
||||||
|
|
||||||
describe('validateEvent', () => {
|
describe('validateEvent', () => {
|
||||||
test('should return true for a valid classified listing event', () => {
|
test('should return true for a valid classified listing event', () => {
|
||||||
|
|
2
wasm.ts
2
wasm.ts
|
@ -1,6 +1,6 @@
|
||||||
import { bytesToHex } from '@noble/hashes/utils'
|
import { bytesToHex } from '@noble/hashes/utils'
|
||||||
import { Nostr as NostrWasm } from 'nostr-wasm'
|
import { Nostr as NostrWasm } from 'nostr-wasm'
|
||||||
import { EventTemplate, Event, Nostr, VerifiedEvent, verifiedSymbol } from './core'
|
import { EventTemplate, Event, Nostr, VerifiedEvent, verifiedSymbol } from './core.ts'
|
||||||
|
|
||||||
let nw: NostrWasm
|
let nw: NostrWasm
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue