MCPcopy Create free account
hub / github.com/callstack/agent-device / validateArchiveEntryPath

Function validateArchiveEntryPath

src/daemon/artifact-archive.ts:130–137  ·  view source on GitHub ↗
(entry: string, rootName: string)

Source from the content-addressed store, hash-verified

128}
129
130function validateArchiveEntryPath(entry: string, rootName: string): void {
131 if (entry !== rootName && !entry.startsWith(`${rootName}/`)) {
132 throw new AppError(
133 'INVALID_ARGS',
134 `Archive entry must stay inside top-level "${rootName}" bundle: ${entry}`,
135 );
136 }
137}

Callers 1

Calls 1

startsWithMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…