refactor!: remove next.js (#3267)

This commit is contained in:
Alex Yang
2023-07-19 00:53:10 +08:00
committed by GitHub
parent 79227a1e7c
commit 47f12f77f2
296 changed files with 4115 additions and 3617 deletions
+18
View File
@@ -0,0 +1,18 @@
import { createHash } from 'node:crypto';
import type { BuildFlags } from '@affine/cli/config';
export function hash(content: string): string {
const hash = createHash('sha512');
hash.update(content);
const pkgHash = hash.digest('hex');
return pkgHash.substring(0, 8);
}
export function computeCacheKey(buildFlags: BuildFlags) {
return [
'1',
'node' + process.version,
buildFlags.mode,
buildFlags.distribution,
].join('-');
}