()
| 99 | } |
| 100 | |
| 101 | function buildEntries() { |
| 102 | const rootLockHash = hashFiles(["package-lock.json"]); |
| 103 | const clientLockHash = hashFiles(["packages/client/package-lock.json"]); |
| 104 | const cargoHash = hashFiles([ |
| 105 | "packages/server/Cargo.toml", |
| 106 | "packages/server/Cargo.lock", |
| 107 | ]); |
| 108 | const rustHost = rustHostTriple(); |
| 109 | |
| 110 | return [ |
| 111 | { |
| 112 | label: "root node_modules", |
| 113 | destination: "node_modules", |
| 114 | cachePath: join(CACHE_ROOT, "node", "root", rootLockHash, "node_modules"), |
| 115 | sourceLockFiles: ["package-lock.json"], |
| 116 | }, |
| 117 | { |
| 118 | label: "client node_modules", |
| 119 | destination: "packages/client/node_modules", |
| 120 | cachePath: join( |
| 121 | CACHE_ROOT, |
| 122 | "node", |
| 123 | "client", |
| 124 | clientLockHash, |
| 125 | "node_modules", |
| 126 | ), |
| 127 | sourceLockFiles: ["packages/client/package-lock.json"], |
| 128 | }, |
| 129 | { |
| 130 | label: "Rust target", |
| 131 | destination: "packages/server/target", |
| 132 | cachePath: join(CACHE_ROOT, "rust", rustHost, cargoHash, "target"), |
| 133 | sourceLockFiles: [ |
| 134 | "packages/server/Cargo.toml", |
| 135 | "packages/server/Cargo.lock", |
| 136 | ], |
| 137 | }, |
| 138 | ]; |
| 139 | } |
| 140 | |
| 141 | function findHydrationSource(entry, sourceRoots) { |
| 142 | if (existsAndHasContent(entry.cachePath)) { |
no test coverage detected