@@ -211,7 +211,7 @@ describe('readAppExtensionParameters', () => {
|
||||
}),
|
||||
),
|
||||
).toThrow(
|
||||
"Invalid extension configuration at app.extensions[0], extension ID must only contain letters, numbers, dashes, and dots, got 'core.router/routes'",
|
||||
"Invalid extension configuration at app.extensions[0], extension ID must only contain letters, numbers, and dots; got 'core.router/routes'",
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -260,10 +260,10 @@ describe('expandShorthandExtensionParameters', () => {
|
||||
disabled: false,
|
||||
});
|
||||
expect(() => run('')).toThrowErrorMatchingInlineSnapshot(
|
||||
`"Invalid extension configuration at app.extensions[1], extension ID must only contain letters, numbers, dashes, and dots, got ''"`,
|
||||
`"Invalid extension configuration at app.extensions[1], extension ID must only contain letters, numbers, and dots; got ''"`,
|
||||
);
|
||||
expect(() => run('core.router/routes')).toThrowErrorMatchingInlineSnapshot(
|
||||
`"Invalid extension configuration at app.extensions[1], extension ID must only contain letters, numbers, dashes, and dots, got 'core.router/routes'"`,
|
||||
`"Invalid extension configuration at app.extensions[1], extension ID must only contain letters, numbers, and dots; got 'core.router/routes'"`,
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -61,10 +61,10 @@ export function expandShorthandExtensionParameters(
|
||||
}
|
||||
|
||||
function assertValidId(id: string) {
|
||||
if (!id.match(/^[\.a-zA-Z0-9-]+$/)) {
|
||||
if (!id.match(/^[\.a-zA-Z0-9]+$/)) {
|
||||
throw new Error(
|
||||
errorMsg(
|
||||
`extension ID must only contain letters, numbers, dashes, and dots, got '${id}'`,
|
||||
`extension ID must only contain letters, numbers, and dots; got '${id}'`,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user