Skip to content

Commit 6594f13

Browse files
committed
delete shared's barrel file
1 parent e611def commit 6594f13

File tree

114 files changed

+375
-339
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+375
-339
lines changed

api-ugc/src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import { Hono } from 'hono'
1212
import { cors } from 'hono/cors'
1313
import { type Env, type ApiUgcContext } from './util'
14-
import { type MediaHash, hstsName, hstsValue, parsePublicToken } from 'shared'
1514
import {
1615
setKysely,
1716
lookupMediaHash,
@@ -21,6 +20,9 @@ import {
2120
} from 'shared-edge'
2221
import { appRouter } from './router'
2322
import { fetchRequestHandler } from '@trpc/server/adapters/fetch'
23+
import { type MediaHash } from 'shared/brand'
24+
import { hstsName, hstsValue } from 'shared/headers'
25+
import { parsePublicToken } from 'shared/publicToken'
2426

2527
// eslint-disable-next-line @typescript-eslint/naming-convention
2628
const app = new Hono<{ Bindings: Env }>()

api-ugc/src/noteRouter.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
import { type Result, type UserId, remoteNoteId } from 'shared'
21
import { getNote, searchNotes } from 'shared-edge'
32
import { z } from 'zod'
43
import { publicProcedure } from './trpc'
4+
import { type UserId } from 'shared/brand'
5+
import { remoteNoteId } from 'shared/schema'
6+
import { type Result } from 'shared/result'
57

68
function getUser(result: Result<UserId, string>) {
79
return result.tag === 'Ok' ? result.ok : null

api-ugc/src/templateRouter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { getTemplate } from 'shared-edge'
22
import { publicProcedure } from './trpc'
3-
import { remoteTemplateId } from 'shared'
3+
import { remoteTemplateId } from 'shared/schema'
44

55
export const templateRouter = {
66
getTemplate: publicProcedure

api-ugc/src/trpc.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { initTRPC, TRPCError } from '@trpc/server'
22
import superjson from 'superjson'
33
import { type Env } from './util'
4-
import { type Result, type UserId } from 'shared'
4+
import { type Result } from 'shared/result'
5+
import { type UserId } from 'shared/brand'
56

67
export interface Context {
78
user: Result<UserId, string>

app-ugc/buildHeaders.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { hstsName, hstsValue } from 'shared'
21
import * as fs from 'fs'
2+
import { hstsName, hstsValue } from 'shared/headers'
33

44
const contents = `/*
55
Cross-Origin-Embedder-Policy: require-corp

app-ugc/src/registerServiceWorker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { type MediaId } from 'shared'
21
import * as Comlink from 'comlink' // https://github.com/GoogleChromeLabs/comlink/tree/main/docs/examples/05-serviceworker-example
32
import { appMessenger } from './appMessenger'
43
import { setBody } from './setBody'
4+
import { type MediaId } from 'shared/brand'
55

66
export interface ComlinkInit {
77
type: 'ComlinkInit'

app-ugc/src/serviceWorker.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import type {
55
Exposed,
66
PostMessageTypes,
77
} from './registerServiceWorker'
8-
import { throwExp, type MediaId } from 'shared'
8+
import { type MediaId } from 'shared/brand'
9+
import { throwExp } from 'shared/utility'
910

1011
declare let self: ServiceWorkerGlobalScope
1112

app/buildHeaders.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { hstsName, hstsValue } from 'shared'
21
import * as fs from 'fs'
2+
import { hstsName, hstsValue } from 'shared/headers'
33

44
const contents = `/*
55
Cross-Origin-Embedder-Policy: require-corp

app/src/components/addNote.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,16 @@ import {
1010
on,
1111
} from 'solid-js'
1212
import { FieldsEditor } from '../components/fieldsEditor'
13-
import {
14-
type Note,
15-
type Card,
16-
type CardId,
17-
type NoteId,
18-
type Template,
19-
} from 'shared'
2013
import { ulidAsBase64Url } from '../domain/utility'
2114
import { createStore } from 'solid-js/store'
2215
import { C } from '../topLevelAwait'
2316
import { CardsPreview } from '../components/cardsPreview'
2417
import { db } from '../db'
2518
import { type NoteCardView } from '../uiLogic/cards'
19+
import { type Template } from 'shared/domain/template'
20+
import { type Note } from 'shared/domain/note'
21+
import { type Card } from 'shared/domain/card'
22+
import { type NoteId, type CardId } from 'shared/brand'
2623

2724
function toView(template: Template): NoteCardView {
2825
const now = C.getDate()

app/src/components/cardsPreview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { For, Show, type VoidComponent } from 'solid-js'
22
import ResizingIframe from './resizingIframe'
3-
import { type NoteCard } from 'shared'
43
import { toNoteCards, type NoteCardView } from '../uiLogic/cards'
54
import { C } from '../topLevelAwait'
5+
import { type NoteCard } from 'shared/domain/card'
66

77
function toMainNoteCards(noteCardView: NoteCardView): NoteCard {
88
return {

0 commit comments

Comments
 (0)