File tree Expand file tree Collapse file tree
server/api/registry/org/[org] Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { CACHE_MAX_AGE_ONE_HOUR , NPM_REGISTRY } from '#shared/utils/constants'
22import { FetchError } from 'ofetch'
33
4- // Validation pattern for npm org names (alphanumeric with hyphens )
5- const NPM_ORG_NAME_RE = / ^ [ a - z 0 - 9 ] (?: [ a - z 0 - 9 - ] * [ a - z 0 - 9 ] ) ? $ / i
4+ // Validation pattern for npm org names - url-sage symbold and not start with a dot (incl. ~test24214. or -ex~- )
5+ const NPM_ORG_NAME_RE = / ^ [ \w ~ - ] [ \w . ~ - ] * $ /
66
77function validateOrgName ( name : string ) : void {
88 if ( ! name || name . length > 50 || ! NPM_ORG_NAME_RE . test ( name ) ) {
Original file line number Diff line number Diff line change 77 "has" : [
88 {
99 "type" : " host" ,
10- "value" : " chat .npmx.dev"
10+ "value" : " build .npmx.dev"
1111 }
1212 ],
1313 "destination" : " https://discord.gg/x9KE5U2q8w"
1414 },
15+ {
16+ "source" : " /(.*)" ,
17+ "has" : [
18+ {
19+ "type" : " host" ,
20+ "value" : " chat.npmx.dev"
21+ }
22+ ],
23+ "destination" : " https://discord.gg/CjZM5qRbCu"
24+ },
1525 {
1626 "source" : " /(.*)" ,
1727 "has" : [
You can’t perform that action at this time.
0 commit comments