Skip to content

Commit a953238

Browse files
feat: updated types to be stored under core package
1 parent bc26fb8 commit a953238

File tree

19 files changed

+25
-36
lines changed

19 files changed

+25
-36
lines changed

package-lock.json

Lines changed: 4 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,8 @@
6666
"lib": "lib"
6767
},
6868
"workspaces": [
69-
"packages/cache-core",
70-
"packages/common",
71-
"packages/redis-cache",
72-
"packages/s3-cache",
73-
"packages/tsconfig",
74-
"examples/app-router",
75-
"examples/page-router"
69+
"packages/*",
70+
"examples/*"
7671
],
7772
"lint-staged": {
7873
"*.{ts,tsx}": "eslint --fix"

packages/cache-core/__tests__/mocks/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
CacheEntry,
55
CacheContext,
66
CacheHandlerContext
7-
} from '@dbbs/next-cache-handler-common'
7+
} from '../../src/types'
88

99
export const mockNextHandlerContext: NextCacheHandlerContext = {
1010
revalidatedTags: [],

packages/cache-core/src/cacheHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import type {
1010
CacheHandlerContext,
1111
CacheEntry,
1212
IncrementalCacheValue
13-
} from '@dbbs/next-cache-handler-common'
13+
} from '../src/types'
1414
import { ConsoleLogger, type BaseLogger } from './logger'
1515
import { FileSystemCache } from './strategies/fileSystem'
1616

packages/cache-core/src/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export { Cache } from './cacheHandler'
22
export { FileSystemCache } from './strategies/fileSystem'
3-
export { MemoryCache, type MemoryCacheConstructorProps } from './strategies/memory'
4-
export type { LoggerInputParams, BaseLogger } from './logger'
3+
export { MemoryCache, MemoryCacheConstructorProps } from './strategies/memory'
4+
export { LoggerInputParams, BaseLogger } from './logger'
5+
export * from './types'

packages/cache-core/src/strategies/fileSystem.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import fs from 'node:fs/promises'
22
import { existsSync } from 'node:fs'
33
import path from 'node:path'
4-
import type { CacheStrategy, CacheEntry, CacheContext } from '@dbbs/next-cache-handler-common'
4+
import type { CacheStrategy, CacheEntry, CacheContext } from '../types'
55
import { checkHeaderTags } from '@dbbs/next-cache-handler-common'
66

77
export class FileSystemCache implements CacheStrategy {

packages/cache-core/src/strategies/memory.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { CacheEntry, CacheStrategy } from '@dbbs/next-cache-handler-common'
1+
import type { CacheEntry, CacheStrategy } from '../types'
22
import { checkHeaderTags } from '@dbbs/next-cache-handler-common'
33

44
const mapCache = new Map()
File renamed without changes.

packages/common/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
export * from './types'
21
export * from './aws'
32
export * from './utils'

packages/redis-cache/__tests__/mocks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CacheEntry } from '@dbbs/next-cache-handler-common'
1+
import { CacheEntry } from '@dbbs/next-cache-handler-core'
22
export const mockCacheEntry: CacheEntry = {
33
value: {
44
pageData: {},

0 commit comments

Comments
 (0)