mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
Remove base alias from packages (make scripts use relative paths for now)
This commit is contained in:
parent
fbb5c63c33
commit
785ba1e053
18 changed files with 37 additions and 33 deletions
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"version": "1.1.0",
|
||||
"workspace": [
|
||||
"./packages/api",
|
||||
"./packages/conf",
|
||||
|
|
@ -43,7 +44,6 @@
|
|||
"./public"
|
||||
],
|
||||
"imports": {
|
||||
"@/": "./packages/ditto/",
|
||||
"@b-fuze/deno-dom": "jsr:@b-fuze/deno-dom@^0.1.47",
|
||||
"@bradenmacdonald/s3-lite-client": "jsr:@bradenmacdonald/s3-lite-client@^0.7.4",
|
||||
"@cashu/cashu-ts": "npm:@cashu/cashu-ts@^2.2.0",
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"name": "@ditto/ditto",
|
||||
"version": "1.1.0",
|
||||
"exports": {},
|
||||
"imports": {
|
||||
"deno.json": "./deno.json"
|
||||
"@/": "./",
|
||||
"deno.json": "../../deno.json"
|
||||
},
|
||||
"lint": {
|
||||
"rules": {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import { JsonParseStream } from '@std/json/json-parse-stream';
|
||||
import { TextLineStream } from '@std/streams/text-line-stream';
|
||||
|
||||
import { AdminSigner } from '@/signers/AdminSigner.ts';
|
||||
import { Storages } from '@/storages.ts';
|
||||
import { type EventStub } from '@/utils/api.ts';
|
||||
import { nostrNow } from '@/utils.ts';
|
||||
import { AdminSigner } from '../packages/ditto/signers/AdminSigner.ts';
|
||||
import { Storages } from '../packages/ditto/storages.ts';
|
||||
import { type EventStub } from '../packages/ditto/utils/api.ts';
|
||||
import { nostrNow } from '../packages/ditto/utils.ts';
|
||||
|
||||
const signer = new AdminSigner();
|
||||
const store = await Storages.db();
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import { NSchema } from '@nostrify/nostrify';
|
||||
import { nip19 } from 'nostr-tools';
|
||||
|
||||
import { AdminSigner } from '@/signers/AdminSigner.ts';
|
||||
import { Storages } from '@/storages.ts';
|
||||
import { nostrNow } from '@/utils.ts';
|
||||
import { AdminSigner } from '../packages/ditto/signers/AdminSigner.ts';
|
||||
import { Storages } from '../packages/ditto/storages.ts';
|
||||
import { nostrNow } from '../packages/ditto/utils.ts';
|
||||
|
||||
const store = await Storages.db();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { assertEquals, assertThrows } from '@std/assert';
|
||||
|
||||
import { buildFilter } from './db-export.ts';
|
||||
|
||||
Deno.test('buildFilter should return an empty filter when no arguments are provided', () => {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
import { Storages } from '@/storages.ts';
|
||||
import { NostrFilter } from '@nostrify/nostrify';
|
||||
import { Command, InvalidOptionArgumentError } from 'commander';
|
||||
|
||||
import { Storages } from '../packages/ditto/storages.ts';
|
||||
|
||||
interface ExportFilter {
|
||||
authors?: string[];
|
||||
ids?: string[];
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ import { NostrEvent } from '@nostrify/nostrify';
|
|||
import { JsonParseStream } from '@std/json/json-parse-stream';
|
||||
import { TextLineStream } from '@std/streams/text-line-stream';
|
||||
|
||||
import { Conf } from '@/config.ts';
|
||||
import { Storages } from '@/storages.ts';
|
||||
import { Conf } from '../packages/ditto/config.ts';
|
||||
import { Storages } from '../packages/ditto/storages.ts';
|
||||
|
||||
const store = await Storages.db();
|
||||
const sem = new Semaphore(Conf.pg.poolSize);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Storages } from '@/storages.ts';
|
||||
import { Storages } from '../packages/ditto/storages.ts';
|
||||
|
||||
// This migrates kysely internally.
|
||||
const kysely = await Storages.kysely();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { policyWorker } from '@/workers/policy.ts';
|
||||
import { Storages } from '@/storages.ts';
|
||||
import { policyWorker } from '../packages/ditto/workers/policy.ts';
|
||||
import { Storages } from '../packages/ditto/storages.ts';
|
||||
|
||||
const db = await Storages.db();
|
||||
let count = 0;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { NostrEvent } from '@nostrify/nostrify';
|
||||
|
||||
import { Storages } from '@/storages.ts';
|
||||
import { EventsDB } from '@/storages/EventsDB.ts';
|
||||
import { Storages } from '../packages/ditto/storages.ts';
|
||||
import { EventsDB } from '../packages/ditto/storages/EventsDB.ts';
|
||||
|
||||
const kysely = await Storages.kysely();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import { Semaphore } from '@core/asyncutil';
|
||||
|
||||
import { updateAuthorData } from '@/pipeline.ts';
|
||||
import { Storages } from '@/storages.ts';
|
||||
import { NostrEvent } from '@nostrify/nostrify';
|
||||
|
||||
import { updateAuthorData } from '../packages/ditto/pipeline.ts';
|
||||
import { Storages } from '../packages/ditto/storages.ts';
|
||||
|
||||
const kysely = await Storages.kysely();
|
||||
const sem = new Semaphore(5);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import { NSchema as n } from '@nostrify/nostrify';
|
||||
import { Storages } from '@/storages.ts';
|
||||
|
||||
import { Storages } from '../packages/ditto/storages.ts';
|
||||
|
||||
const store = await Storages.db();
|
||||
const kysely = await Storages.kysely();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { Conf } from '@/config.ts';
|
||||
import { Storages } from '@/storages.ts';
|
||||
import { Conf } from '../packages/ditto/config.ts';
|
||||
import { Storages } from '../packages/ditto/storages.ts';
|
||||
|
||||
const kysely = await Storages.kysely();
|
||||
const statsQuery = kysely.selectFrom('author_stats').select('pubkey');
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
import { NostrEvent, NRelay1, NSchema } from '@nostrify/nostrify';
|
||||
import { nip19 } from 'nostr-tools';
|
||||
|
||||
import { Storages } from '@/storages.ts';
|
||||
import { Storages } from '../packages/ditto/storages.ts';
|
||||
|
||||
const store = await Storages.db();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
import { AdminSigner } from '@/signers/AdminSigner.ts';
|
||||
import { Command } from 'commander';
|
||||
import { NostrEvent } from 'nostr-tools';
|
||||
import { nostrNow } from '@/utils.ts';
|
||||
import { Conf } from '@/config.ts';
|
||||
import { Storages } from '@/storages.ts';
|
||||
|
||||
import { AdminSigner } from '../packages/ditto/signers/AdminSigner.ts';
|
||||
import { nostrNow } from '../packages/ditto/utils.ts';
|
||||
import { Conf } from '../packages/ditto/config.ts';
|
||||
import { Storages } from '../packages/ditto/storages.ts';
|
||||
|
||||
function die(code: number, ...args: unknown[]) {
|
||||
console.error(...args);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { exists } from '@std/fs/exists';
|
|||
import { generateSecretKey, nip19 } from 'nostr-tools';
|
||||
import question from 'question-deno';
|
||||
|
||||
import { Conf } from '@/config.ts';
|
||||
import { Conf } from '../packages/ditto/config.ts';
|
||||
|
||||
console.log('');
|
||||
console.log('Hello! Welcome to the Ditto setup tool. We will ask you a few questions to generate a .env file for you.');
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { nip19 } from 'nostr-tools';
|
||||
|
||||
import { Storages } from '@/storages.ts';
|
||||
import { refreshAuthorStats } from '@/utils/stats.ts';
|
||||
import { Storages } from '../packages/ditto/storages.ts';
|
||||
import { refreshAuthorStats } from '../packages/ditto/utils/stats.ts';
|
||||
|
||||
let pubkey: string;
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import {
|
|||
updateTrendingLinks,
|
||||
updateTrendingPubkeys,
|
||||
updateTrendingZappedEvents,
|
||||
} from '@/trends.ts';
|
||||
} from '../packages/ditto/trends.ts';
|
||||
|
||||
const trendSchema = z.enum(['pubkeys', 'zapped_events', 'events', 'hashtags', 'links']);
|
||||
const trends = trendSchema.array().parse(Deno.args);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue