mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-04 02:49:57 +08:00
refactor!: remove next.js (#3267)
This commit is contained in:
@@ -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('-');
|
||||
}
|
||||
Reference in New Issue
Block a user