MCPcopy Index your code
hub / github.com/subquery/subql / resolveToAbsolutePath

Function resolveToAbsolutePath

packages/cli/src/utils/utils.ts:129–132  ·  view source on GitHub ↗
(inputPath: string)

Source from the content-addressed store, hash-verified

127// oclif's default path resolver only applies when parsed as `--flag path`
128// else it would not resolve, hence we need to resolve it manually.
129export function resolveToAbsolutePath(inputPath: string): string {
130 const regex = new RegExp(`^~(?=$|[/\\\\])`);
131 return path.resolve(inputPath.replace(regex, os.homedir()));
132}
133
134export function isValidEnum<T extends Record<string, string>>(enumType: T, input: string): input is T[keyof T] {
135 return Object.values(enumType).includes(input);

Callers 7

prepareAbiDirectoryFunction · 0.90
buildManifestAdapterFunction · 0.90
initAdapterFunction · 0.90
publishAdapterFunction · 0.90
buildAdapterFunction · 0.90
codegenAdapterFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected