MCPcopy Index your code
hub / github.com/massCodeIO/massCode / addWarning

Function addWarning

src/main/http/import/normalize.ts:35–52  ·  view source on GitHub ↗
(
  warnings: HttpImportWarning[],
  source: string,
  message: string,
)

Source from the content-addressed store, hash-verified

33 = /^(?:con|prn|aux|nul|com[1-9]|lpt[1-9])(?:\..*)?$/i
34
35export function addWarning(
36 warnings: HttpImportWarning[],
37 source: string,
38 message: string,
39): void {
40 if (warnings.length >= 200) {
41 if (
42 !warnings.some(
43 warning => warning.message === 'Additional warnings omitted',
44 )
45 ) {
46 warnings.push({ message: 'Additional warnings omitted', source })
47 }
48 return
49 }
50
51 warnings.push({ message, source })
52}
53
54export function normalizeImportName(value: unknown, fallback: string): string {
55 const raw = typeof value === 'string' ? value : ''

Callers 15

readDocumentFunction · 0.90
parseRequestBodyFunction · 0.90
parseSecurityFunction · 0.90
readJsonFileFunction · 0.90
parseAuthFunction · 0.90
parseBodyFunction · 0.90
parseVariablesFunction · 0.90
parsePostmanFilesFunction · 0.90
readYamlFunction · 0.90
parseAuthFunction · 0.90
parseBodyFunction · 0.90
parseRequestFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected