@pgflow/dsl 0.1.11 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CHANGELOG.md +6 -0
- package/dist/package.json +1 -1
- package/dist/utils.js +5 -5
- package/package.json +1 -1
package/dist/CHANGELOG.md
CHANGED
package/dist/package.json
CHANGED
package/dist/utils.js
CHANGED
|
@@ -11,19 +11,19 @@
|
|
|
11
11
|
*/
|
|
12
12
|
export function validateSlug(slug) {
|
|
13
13
|
if (slug.length > 128) {
|
|
14
|
-
throw new Error(`Slug cannot be longer than 128 characters`);
|
|
14
|
+
throw new Error(`Slug '${slug}' cannot be longer than 128 characters`);
|
|
15
15
|
}
|
|
16
16
|
if (/^\d/.test(slug)) {
|
|
17
|
-
throw new Error(`Slug cannot start with a number`);
|
|
17
|
+
throw new Error(`Slug '${slug}' cannot start with a number`);
|
|
18
18
|
}
|
|
19
19
|
if (/^_/.test(slug)) {
|
|
20
|
-
throw new Error(`Slug cannot start with an underscore`);
|
|
20
|
+
throw new Error(`Slug '${slug}' cannot start with an underscore`);
|
|
21
21
|
}
|
|
22
22
|
if (/\s/.test(slug)) {
|
|
23
|
-
throw new Error(`Slug cannot contain spaces`);
|
|
23
|
+
throw new Error(`Slug '${slug}' cannot contain spaces`);
|
|
24
24
|
}
|
|
25
25
|
if (/[/:#\-?]/.test(slug)) {
|
|
26
|
-
throw new Error(`Slug cannot contain special characters like /, :, ?, #, -`);
|
|
26
|
+
throw new Error(`Slug '${slug}' cannot contain special characters like /, :, ?, #, -`);
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
/**
|