All files / src/utils resolve-path.ts

100% Statements 8/8
100% Branches 1/1
100% Functions 1/1
100% Lines 8/8

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 361x                                                       1x 10x 10x 10x 10x 10x 10x  
import path from 'node:path';
 
export type ProjectPath =
    | './'
    | 'dist'
    | 'dist/index.mjs'
    | 'dist/package.json'
    | 'dist/client'
    | 'dist/client/manifest.json'
    | 'dist/client/js'
    | 'dist/client/css'
    | 'dist/client/images'
    | 'dist/client/media'
    | 'dist/client/fonts'
    | 'dist/client/workers'
    | 'dist/client/importmap'
    | 'dist/client/versions/latest.tgz'
    | 'dist/server'
    | 'dist/server/js'
    | 'dist/server/manifest.json'
    | 'dist/node'
    | 'dist/node/js'
    | 'src'
    | 'src/entry.node.ts'
    | 'src/entry.client.ts'
    | 'src/entry.server.ts'
    | 'package.json';
 
export function resolvePath(
    root: string,
    projectPath: ProjectPath,
    ...args: string[]
): string {
    return path.resolve(root, projectPath, ...args);
}