@vltpkg/vsr 0.0.0-26 → 0.0.0-28

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 (51) hide show
  1. package/dist/README.md +1 -0
  2. package/dist/assets/public/favicon.ico +0 -0
  3. package/dist/assets/public/fonts/courier-bold-italic.ttf +0 -0
  4. package/dist/assets/public/fonts/courier-bold.ttf +0 -0
  5. package/dist/assets/public/fonts/courier-italic.ttf +0 -0
  6. package/dist/assets/public/fonts/courier-regular.ttf +0 -0
  7. package/dist/assets/public/fonts/geist-mono.ttf +0 -0
  8. package/dist/assets/public/fonts/inter.ttf +0 -0
  9. package/dist/assets/public/images/bg.png +0 -0
  10. package/dist/assets/public/images/clients/logo-bun.png +0 -0
  11. package/dist/assets/public/images/clients/logo-deno.png +0 -0
  12. package/dist/assets/public/images/clients/logo-npm.png +0 -0
  13. package/dist/assets/public/images/clients/logo-pnpm.png +0 -0
  14. package/dist/assets/public/images/clients/logo-vlt.png +0 -0
  15. package/dist/assets/public/images/clients/logo-yarn.png +0 -0
  16. package/dist/assets/public/images/favicon/apple-touch-icon.png +0 -0
  17. package/dist/assets/public/images/favicon/favicon-96x96.png +0 -0
  18. package/dist/assets/public/images/favicon/favicon.ico +0 -0
  19. package/dist/assets/public/images/favicon/favicon.svg +3 -0
  20. package/dist/assets/public/images/favicon/site.webmanifest +21 -0
  21. package/dist/assets/public/images/favicon/web-app-manifest-192x192.png +0 -0
  22. package/dist/assets/public/images/favicon/web-app-manifest-512x512.png +0 -0
  23. package/dist/assets/public/index.html +70 -0
  24. package/dist/assets/public/index.js +1300 -0
  25. package/dist/assets/public/index.js.map +7 -0
  26. package/dist/assets/public/main.css +1 -0
  27. package/dist/assets/public/styles/styles.css +231 -0
  28. package/dist/bin/demo/package.json +6 -0
  29. package/dist/bin/demo/vlt.json +1 -0
  30. package/dist/bin/vsr.js +773 -0
  31. package/dist/index.js +28280 -0
  32. package/dist/index.js.map +8 -0
  33. package/package.json +6 -6
  34. package/scripts/build-bin.js +1 -0
  35. package/src/bin/vsr.ts +15 -3
  36. package/scripts/prepack.js +0 -27
  37. package/test/access.test.ts +0 -705
  38. package/test/audit.test.ts +0 -828
  39. package/test/dashboard.test.ts +0 -693
  40. package/test/dist-tags.test.ts +0 -678
  41. package/test/manifest.test.ts +0 -436
  42. package/test/packument.test.ts +0 -530
  43. package/test/ping.test.ts +0 -41
  44. package/test/search.test.ts +0 -472
  45. package/test/setup.ts +0 -130
  46. package/test/static.test.ts +0 -646
  47. package/test/tokens.test.ts +0 -389
  48. package/test/utils/auth.test.ts +0 -214
  49. package/test/utils/packages.test.ts +0 -235
  50. package/test/utils/response.test.ts +0 -184
  51. package/test/whoami.test.ts +0 -119
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vltpkg/vsr",
3
- "version": "0.0.0-26",
3
+ "version": "0.0.0-28",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/vltpkg/vltpkg.git",
@@ -21,10 +21,10 @@
21
21
  "validate-npm-package-name": "6.0.2",
22
22
  "wrangler": "^4.33.1",
23
23
  "zod": "^3.25.76",
24
- "@vltpkg/package-info": "0.0.0-26",
25
- "@vltpkg/server": "0.0.0-26",
26
- "@vltpkg/vlt-json": "0.0.0-26",
27
- "@vltpkg/package-json": "0.0.0-26"
24
+ "@vltpkg/package-info": "0.0.0-28",
25
+ "@vltpkg/package-json": "0.0.0-28",
26
+ "@vltpkg/server": "0.0.0-28",
27
+ "@vltpkg/vlt-json": "0.0.0-28"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@cloudflare/vitest-pool-workers": "^0.8.68",
@@ -39,7 +39,7 @@
39
39
  "typescript": "5.7.3",
40
40
  "typescript-eslint": "^8.40.0",
41
41
  "vitest": "^3.2.4",
42
- "@vltpkg/gui": "0.0.0-26"
42
+ "@vltpkg/gui": "0.0.0-28"
43
43
  },
44
44
  "license": "FSL-1.1-MIT",
45
45
  "engines": {
@@ -43,6 +43,7 @@ async function main() {
43
43
  resolve(process.cwd(), 'node_modules/.bin/esbuild'),
44
44
  [
45
45
  join('./src/bin/vsr.ts'),
46
+ '--bundle',
46
47
  `--outfile=${join('./dist/bin/vsr.js')}`,
47
48
  '--packages=external',
48
49
  '--platform=node',
package/src/bin/vsr.ts CHANGED
@@ -17,6 +17,7 @@ import {
17
17
  } from '../../config.ts'
18
18
  import { minArgs } from 'minargs'
19
19
  import { load } from '@vltpkg/vlt-json'
20
+ import { createRequire } from 'node:module'
20
21
 
21
22
  const usage = `USAGE:
22
23
 
@@ -276,6 +277,8 @@ async function deployToCloudflare(): Promise<void> {
276
277
  const wranglerArgs = [
277
278
  'deploy',
278
279
  indexPath,
280
+ '--config',
281
+ wranglerConfigPath,
279
282
  '--name',
280
283
  `vsr-${ENV}`,
281
284
  '--compatibility-date',
@@ -382,15 +385,22 @@ if (!['dev', 'deploy'].includes(command)) {
382
385
  const __filename = fileURLToPath(import.meta.url)
383
386
  const __dirname = path.dirname(__filename)
384
387
  const demo = path.resolve(__dirname, './demo')
388
+ const require = createRequire(import.meta.url)
385
389
 
386
390
  // Resolve paths relative to this script's location
387
391
  const registryRoot = path.resolve(__dirname, '../../')
388
392
  const indexPath = path.resolve(registryRoot, 'dist/index.js')
393
+ const wranglerConfigPath = path.resolve(registryRoot, 'wrangler.json')
389
394
 
390
395
  // Find the wrangler binary from node_modules
391
- const wranglerBinPath = path.resolve(
392
- registryRoot,
393
- 'node_modules/.bin/wrangler',
396
+ const wranglerPkgPath = require.resolve('wrangler/package.json')
397
+ const wranglerRelBinPath = (
398
+ JSON.parse(readFileSync(wranglerPkgPath, 'utf8')) as {
399
+ bin: { wrangler: string }
400
+ }
401
+ ).bin.wrangler
402
+ const wranglerBinPath = require.resolve(
403
+ path.join('wrangler', wranglerRelBinPath),
394
404
  )
395
405
  const wranglerBin =
396
406
  existsSync(wranglerBinPath) ? wranglerBinPath : 'wrangler'
@@ -453,6 +463,8 @@ void (async () => {
453
463
  [
454
464
  'dev',
455
465
  indexPath,
466
+ '--config',
467
+ wranglerConfigPath,
456
468
  '--local',
457
469
  '--persist-to=local-store',
458
470
  '--no-remote',
@@ -1,27 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { writeFile, readFile, cp } from 'fs/promises'
4
-
5
- async function main() {
6
- console.log('Prepacking...')
7
-
8
- const pkg = JSON.parse(await readFile('./package.json', 'utf8'))
9
-
10
- delete pkg.publishConfig
11
- delete pkg.scripts
12
- delete pkg.devDependencies
13
- pkg.bin = './bin/vsr.js'
14
-
15
- await writeFile('./dist/package.json', JSON.stringify(pkg, null, 2))
16
-
17
- await cp('./README.md', './dist/README.md')
18
- }
19
-
20
- main()
21
- .then(() => {
22
- console.log('Prepacked successfully')
23
- })
24
- .catch(error => {
25
- console.error('Prepacking failed:', error)
26
- process.exit(1)
27
- })