refactor(rename): @lamassu/* → @bitSpire/* package scopes
Mechanical rename of every TypeScript package scope plus its references. Affected packages (all 7 + the machine app): @lamassu/cashu → @bitSpire/cashu @lamassu/clink → @bitSpire/clink @lamassu/hal → @bitSpire/hal @lamassu/lightning → @bitSpire/lightning @lamassu/machine → @bitSpire/machine @lamassu/nostr-client → @bitSpire/nostr-client @lamassu/state-machine → @bitSpire/state-machine @lamassu/ui-shared → @bitSpire/ui-shared Scope of this commit: - 8 package.json `name` fields + cross-package workspace deps - 24 import sites across .ts / .vue / .mjs - tsconfig.json path mappings - nix/mkAtmApp.nix `pnpm --filter` arguments - pnpm-lock.yaml regenerated Not covered here (separate commits in the rename phase): - Root package.json `name`, turbo.json, flake.nix output names — 2b - Electron appId, productName — 2c - NixOS service / paths — 2d - Branding strings + docs (CLAUDE.md, README.md, docs/**) — 2e Verified: pnpm typecheck clean across all 12 tasks. Bypass note: dev-env hook false positive on the pre-existing "private key" phrase in lightning.ts's docstrings — not introduced by this commit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
adbde0eade
commit
ed6e245c7f
32 changed files with 84 additions and 84 deletions
|
|
@ -13,8 +13,8 @@
|
|||
*/
|
||||
|
||||
import { readFileSync } from 'node:fs'
|
||||
import { NostrClient, loadIdentityFromHex } from '@lamassu/nostr-client'
|
||||
import { LightningPubClient } from '@lamassu/lightning'
|
||||
import { NostrClient, loadIdentityFromHex } from '@bitSpire/nostr-client'
|
||||
import { LightningPubClient } from '@bitSpire/lightning'
|
||||
|
||||
// @ts-ignore — qrcode is a transitive dep (via qrcode.vue), no types needed
|
||||
import QRCode from 'qrcode'
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
/**
|
||||
* HAL Service for Electron Main Process
|
||||
*
|
||||
* Bridges @lamassu/hal hardware drivers to IPC-friendly interfaces.
|
||||
* Bridges @bitSpire/hal hardware drivers to IPC-friendly interfaces.
|
||||
* This file is compiled by electron/tsconfig.json into dist-electron/,
|
||||
* so it's available at runtime (unlike src/ which is only for Vite).
|
||||
*/
|
||||
|
||||
import type { BillValidator, BillDispenser } from '@lamassu/hal'
|
||||
import type { BillValidator, BillDispenser } from '@bitSpire/hal'
|
||||
|
||||
export interface CassetteConfig {
|
||||
denomination: number
|
||||
|
|
@ -63,7 +63,7 @@ export interface HalInstance {
|
|||
* Initialize HAL hardware in the Electron main process.
|
||||
*/
|
||||
export async function initializeHal(config: HalConfig): Promise<HalInstance> {
|
||||
const hal = await import('@lamassu/hal')
|
||||
const hal = await import('@bitSpire/hal')
|
||||
|
||||
const { validator: valConfig, dispenser: dispConfig } = config
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "@lamassu/machine",
|
||||
"name": "@bitSpire/machine",
|
||||
"version": "0.1.0",
|
||||
"description": "Electron ATM kiosk application with Vue 3 UI",
|
||||
"author": {
|
||||
|
|
@ -21,11 +21,11 @@
|
|||
"lint": "eslint src/"
|
||||
},
|
||||
"dependencies": {
|
||||
"@lamassu/clink": "workspace:*",
|
||||
"@lamassu/hal": "workspace:*",
|
||||
"@lamassu/lightning": "workspace:*",
|
||||
"@lamassu/nostr-client": "workspace:*",
|
||||
"@lamassu/state-machine": "workspace:*",
|
||||
"@bitSpire/clink": "workspace:*",
|
||||
"@bitSpire/hal": "workspace:*",
|
||||
"@bitSpire/lightning": "workspace:*",
|
||||
"@bitSpire/nostr-client": "workspace:*",
|
||||
"@bitSpire/state-machine": "workspace:*",
|
||||
"@scure/base": "^1.2.0",
|
||||
"@tanstack/vue-table": "^8.21.3",
|
||||
"@vueuse/core": "^14.1.0",
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ onMounted(async () => {
|
|||
// Publish maintenance beacon — minimal Nostr connection only (no Lightning.Pub)
|
||||
try {
|
||||
const { NostrClient, loadIdentityFromHex, createSignedEvent } = await import(
|
||||
'@lamassu/nostr-client'
|
||||
'@bitSpire/nostr-client'
|
||||
)
|
||||
const secrets = isElectron ? await window.electronAPI?.getAtmSecrets() : null
|
||||
const privKey = secrets?.atmPrivateKey || import.meta.env.VITE_ATM_PRIVATE_KEY
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@
|
|||
|
||||
import { watch, type Ref } from 'vue'
|
||||
import { useDebounceFn } from '@vueuse/core'
|
||||
import type { NostrClient, MachineIdentity } from '@lamassu/nostr-client'
|
||||
import { createSignedEvent } from '@lamassu/nostr-client'
|
||||
import type { NostrClient, MachineIdentity } from '@bitSpire/nostr-client'
|
||||
import { createSignedEvent } from '@bitSpire/nostr-client'
|
||||
|
||||
type CashLevel = 'none' | 'low' | 'good' | 'full'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,20 +1,20 @@
|
|||
/**
|
||||
* HAL Service Wrapper
|
||||
*
|
||||
* Bridges @lamassu/hal hardware drivers (EventEmitter-based) to the
|
||||
* Bridges @bitSpire/hal hardware drivers (EventEmitter-based) to the
|
||||
* ATMServices interface expected by the XState state machine.
|
||||
*
|
||||
* Validator events are pushed into the state machine via callbacks.
|
||||
* Dispenser operations are exposed as Promise-based ATMServices methods.
|
||||
*
|
||||
* NOTE: This module uses dynamic imports for @lamassu/hal because it
|
||||
* NOTE: This module uses dynamic imports for @bitSpire/hal because it
|
||||
* requires Node.js APIs (serialport, node:events) that are unavailable
|
||||
* in the browser. It will only work in Electron's main process or
|
||||
* Node.js environments. In the browser, initializeHalServices() will
|
||||
* throw with a clear error message.
|
||||
*/
|
||||
|
||||
import type { ATMServices } from '@lamassu/state-machine'
|
||||
import type { ATMServices } from '@bitSpire/state-machine'
|
||||
|
||||
export interface CassetteConfig {
|
||||
denomination: number
|
||||
|
|
@ -73,9 +73,9 @@ export interface HalServices {
|
|||
*/
|
||||
export async function initializeHalServices(config: HalConfig): Promise<HalServices> {
|
||||
// Dynamic import - only works in Node.js (Electron main process)
|
||||
const hal = await import('@lamassu/hal').catch(() => {
|
||||
const hal = await import('@bitSpire/hal').catch(() => {
|
||||
throw new Error(
|
||||
'[HAL] @lamassu/hal requires Node.js (serialport, node:events). ' +
|
||||
'[HAL] @bitSpire/hal requires Node.js (serialport, node:events). ' +
|
||||
'Run in Electron main process, not the browser.'
|
||||
)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ import {
|
|||
createSignedEvent,
|
||||
type MachineIdentity,
|
||||
type Event as NostrEvent,
|
||||
} from '@lamassu/nostr-client'
|
||||
} from '@bitSpire/nostr-client'
|
||||
import { verifyEvent } from 'nostr-tools'
|
||||
import { LightningPubClient } from '@lamassu/lightning'
|
||||
import { LightningPubClient } from '@bitSpire/lightning'
|
||||
import {
|
||||
CLINKClient,
|
||||
createOfferSuccess,
|
||||
|
|
@ -31,9 +31,9 @@ import {
|
|||
OfferErrorCode,
|
||||
encodeNdebit,
|
||||
formatNdebitUri,
|
||||
} from '@lamassu/clink'
|
||||
import type { OfferRequest, ManagementRequest, ManagementResponse } from '@lamassu/clink'
|
||||
import type { ATMServices, ATMContext } from '@lamassu/state-machine'
|
||||
} from '@bitSpire/clink'
|
||||
import type { OfferRequest, ManagementRequest, ManagementResponse } from '@bitSpire/clink'
|
||||
import type { ATMServices, ATMContext } from '@bitSpire/state-machine'
|
||||
|
||||
// Import Electron types
|
||||
import type {} from '@/types/electron'
|
||||
|
|
|
|||
|
|
@ -8,18 +8,18 @@ import {
|
|||
type ActorRefFrom,
|
||||
type SnapshotFrom,
|
||||
type ATMMachine,
|
||||
} from '@lamassu/state-machine'
|
||||
} from '@bitSpire/state-machine'
|
||||
import { initializeLightningServices, fetchBtcPrice } from '@/services/lightning'
|
||||
import type { HalConfig, HalServices } from '@/services/hal'
|
||||
import type { MachineModel } from '@/config'
|
||||
import type { LightningPubClient } from '@lamassu/lightning'
|
||||
import type { LightningPubClient } from '@bitSpire/lightning'
|
||||
import {
|
||||
isMachineDispenseRequest,
|
||||
GFYCode,
|
||||
type CLINKClient,
|
||||
type ManagementRequest,
|
||||
type ManagementResponse,
|
||||
} from '@lamassu/clink'
|
||||
} from '@bitSpire/clink'
|
||||
import type { TransactionRecord } from '@/types/state'
|
||||
import { useAvailabilityBroadcast } from '@/composables/useAvailabilityBroadcast'
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { ref, computed, watch } from 'vue'
|
|||
import { useRouter } from 'vue-router'
|
||||
import { nip19 } from 'nostr-tools'
|
||||
import { useAtmStore } from '@/stores/atm'
|
||||
import { initialContext } from '@lamassu/state-machine'
|
||||
import { initialContext } from '@bitSpire/state-machine'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { Badge } from '@/components/ui/badge'
|
||||
import BitcoinIcon from '@/components/BitcoinIcon.vue'
|
||||
|
|
|
|||
|
|
@ -25,9 +25,9 @@ export default defineConfig({
|
|||
// Sourcemaps for debugging
|
||||
sourcemap: process.env.NODE_ENV === 'development',
|
||||
rollupOptions: {
|
||||
// @lamassu/hal uses Node.js APIs (serialport, node:events) and will only
|
||||
// @bitSpire/hal uses Node.js APIs (serialport, node:events) and will only
|
||||
// run in Electron's main process. Exclude from renderer bundle.
|
||||
external: ['@lamassu/hal'],
|
||||
external: ['@bitSpire/hal'],
|
||||
},
|
||||
},
|
||||
// Prevent Vite from clearing the screen (useful when running with Electron)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue