File tree Expand file tree Collapse file tree 3 files changed +42
-0
lines changed
Expand file tree Collapse file tree 3 files changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,7 @@ udd supports the following registry domains:
114114- https://gitlab.com/:user/:repo/-/raw
115115- https://cdn.jsdelivr.net
116116- https://x.nest.land
117+ - https://pax.deno.dev
117118
118119_ Create an issue to request additional registries._
119120
Original file line number Diff line number Diff line change @@ -299,6 +299,37 @@ export class Denopkg implements RegistryUrl {
299299 regexp = / h t t p s ? : \/ \/ d e n o p k g .c o m \/ [ ^ \/ \" \' ] * ?\/ [ ^ \/ \" \' ] * ?\@ [ ^ \' \" ] * / ;
300300}
301301
302+ export class PaxDenoDev implements RegistryUrl {
303+ url : string ;
304+
305+ owner ( ) : string {
306+ return this . url . split ( "/" ) [ 3 ] ;
307+ }
308+
309+ repo ( ) : string {
310+ return defaultName ( this ) ;
311+ }
312+
313+ constructor ( url : string ) {
314+ this . url = url ;
315+ }
316+
317+ async all ( ) : Promise < string [ ] > {
318+ return await githubReleases ( this . owner ( ) , this . repo ( ) ) ;
319+ }
320+
321+ at ( version : string ) : RegistryUrl {
322+ const url = defaultAt ( this , version ) ;
323+ return new PaxDenoDev ( url ) ;
324+ }
325+
326+ version ( ) : string {
327+ return defaultVersion ( this ) ;
328+ }
329+
330+ regexp = / h t t p s ? : \/ \/ p a x .d e n o .d e v \/ [ ^ \/ \" \' ] * ?\/ [ ^ \/ \" \' ] * ?\@ [ ^ \' \" ] * / ;
331+ }
332+
302333export class PikaScope implements RegistryUrl {
303334 url : string ;
304335
@@ -667,6 +698,7 @@ export const REGISTRIES = [
667698 UnpkgScope ,
668699 Unpkg ,
669700 Denopkg ,
701+ PaxDenoDev ,
670702 Jspm ,
671703 PikaScope ,
672704 Pika ,
Original file line number Diff line number Diff line change @@ -60,6 +60,15 @@ Deno.test("registryDenopkg", () => {
6060 assertEquals ( vAt . url , "https://denopkg.com/bar/foo@0.2.0/foo.ts" ) ;
6161} ) ;
6262
63+ Deno . test ( "registryPaxDenoDev" , ( ) => {
64+ const url = "https://pax.deno.dev/bar/foo@0.1.0/foo.ts" ;
65+ const v = lookup ( url , REGISTRIES ) ;
66+ assert ( v !== undefined ) ;
67+
68+ const vAt = v . at ( "0.2.0" ) ;
69+ assertEquals ( vAt . url , "https://pax.deno.dev/bar/foo@0.2.0/foo.ts" ) ;
70+ } ) ;
71+
6372Deno . test ( "registryJspm" , ( ) => {
6473 const url = "https://dev.jspm.io/npm:foo@0.1.0/" ;
6574 const v = lookup ( url , REGISTRIES ) ;
You can’t perform that action at this time.
0 commit comments