@vltpkg/vsr 0.0.0-26

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 (93) hide show
  1. package/DEPLOY.md +163 -0
  2. package/LICENSE +119 -0
  3. package/README.md +314 -0
  4. package/config.ts +221 -0
  5. package/drizzle.config.js +40 -0
  6. package/info/COMPARISONS.md +37 -0
  7. package/info/CONFIGURATION.md +143 -0
  8. package/info/CONTRIBUTING.md +32 -0
  9. package/info/DATABASE_SETUP.md +108 -0
  10. package/info/GRANULAR_ACCESS_TOKENS.md +160 -0
  11. package/info/PROJECT_STRUCTURE.md +291 -0
  12. package/info/ROADMAP.md +27 -0
  13. package/info/SUPPORT.md +39 -0
  14. package/info/TESTING.md +301 -0
  15. package/info/USER_SUPPORT.md +31 -0
  16. package/package.json +77 -0
  17. package/scripts/build-assets.js +31 -0
  18. package/scripts/build-bin.js +62 -0
  19. package/scripts/prepack.js +27 -0
  20. package/src/assets/public/images/bg.png +0 -0
  21. package/src/assets/public/images/clients/logo-bun.png +0 -0
  22. package/src/assets/public/images/clients/logo-deno.png +0 -0
  23. package/src/assets/public/images/clients/logo-npm.png +0 -0
  24. package/src/assets/public/images/clients/logo-pnpm.png +0 -0
  25. package/src/assets/public/images/clients/logo-vlt.png +0 -0
  26. package/src/assets/public/images/clients/logo-yarn.png +0 -0
  27. package/src/assets/public/images/favicon/apple-touch-icon.png +0 -0
  28. package/src/assets/public/images/favicon/favicon-96x96.png +0 -0
  29. package/src/assets/public/images/favicon/favicon.ico +0 -0
  30. package/src/assets/public/images/favicon/favicon.svg +3 -0
  31. package/src/assets/public/images/favicon/site.webmanifest +21 -0
  32. package/src/assets/public/images/favicon/web-app-manifest-192x192.png +0 -0
  33. package/src/assets/public/images/favicon/web-app-manifest-512x512.png +0 -0
  34. package/src/assets/public/styles/styles.css +231 -0
  35. package/src/bin/demo/package.json +6 -0
  36. package/src/bin/demo/vlt.json +1 -0
  37. package/src/bin/vsr.ts +484 -0
  38. package/src/db/client.ts +590 -0
  39. package/src/db/migrations/0000_faulty_ricochet.sql +14 -0
  40. package/src/db/migrations/0000_initial.sql +29 -0
  41. package/src/db/migrations/0001_uuid_validation.sql +35 -0
  42. package/src/db/migrations/0001_wealthy_magdalene.sql +7 -0
  43. package/src/db/migrations/drop.sql +3 -0
  44. package/src/db/migrations/meta/0000_snapshot.json +104 -0
  45. package/src/db/migrations/meta/0001_snapshot.json +155 -0
  46. package/src/db/migrations/meta/_journal.json +20 -0
  47. package/src/db/schema.ts +43 -0
  48. package/src/index.ts +434 -0
  49. package/src/middleware/config.ts +79 -0
  50. package/src/middleware/telemetry.ts +43 -0
  51. package/src/queue/index.ts +97 -0
  52. package/src/routes/access.ts +852 -0
  53. package/src/routes/docs.ts +63 -0
  54. package/src/routes/misc.ts +469 -0
  55. package/src/routes/packages.ts +2823 -0
  56. package/src/routes/ping.ts +39 -0
  57. package/src/routes/search.ts +131 -0
  58. package/src/routes/static.ts +74 -0
  59. package/src/routes/tokens.ts +259 -0
  60. package/src/routes/users.ts +68 -0
  61. package/src/utils/auth.ts +202 -0
  62. package/src/utils/cache.ts +587 -0
  63. package/src/utils/config.ts +50 -0
  64. package/src/utils/database.ts +69 -0
  65. package/src/utils/docs.ts +146 -0
  66. package/src/utils/packages.ts +453 -0
  67. package/src/utils/response.ts +125 -0
  68. package/src/utils/routes.ts +64 -0
  69. package/src/utils/spa.ts +52 -0
  70. package/src/utils/tracing.ts +52 -0
  71. package/src/utils/upstream.ts +172 -0
  72. package/test/access.test.ts +705 -0
  73. package/test/audit.test.ts +828 -0
  74. package/test/dashboard.test.ts +693 -0
  75. package/test/dist-tags.test.ts +678 -0
  76. package/test/manifest.test.ts +436 -0
  77. package/test/packument.test.ts +530 -0
  78. package/test/ping.test.ts +41 -0
  79. package/test/search.test.ts +472 -0
  80. package/test/setup.ts +130 -0
  81. package/test/static.test.ts +646 -0
  82. package/test/tokens.test.ts +389 -0
  83. package/test/utils/auth.test.ts +214 -0
  84. package/test/utils/packages.test.ts +235 -0
  85. package/test/utils/response.test.ts +184 -0
  86. package/test/whoami.test.ts +119 -0
  87. package/tsconfig.json +16 -0
  88. package/tsconfig.worker.json +3 -0
  89. package/typedoc.mjs +2 -0
  90. package/types.ts +598 -0
  91. package/vitest.config.ts +25 -0
  92. package/vlt.json.example +56 -0
  93. package/wrangler.json +65 -0
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "vlt /vōlt/",
3
+ "short_name": "vlt",
4
+ "icons": [
5
+ {
6
+ "src": "/web-app-manifest-192x192.png",
7
+ "sizes": "192x192",
8
+ "type": "image/png",
9
+ "purpose": "maskable"
10
+ },
11
+ {
12
+ "src": "/web-app-manifest-512x512.png",
13
+ "sizes": "512x512",
14
+ "type": "image/png",
15
+ "purpose": "maskable"
16
+ }
17
+ ],
18
+ "theme_color": "#262626",
19
+ "background_color": "#262626",
20
+ "display": "standalone"
21
+ }
@@ -0,0 +1,231 @@
1
+ .open-api-client-button {
2
+ display: none !important;
3
+ }
4
+
5
+ :root {
6
+ --scalar-text-decoration: underline;
7
+ }
8
+
9
+ .light-mode {
10
+ --scalar-background-1: #fff;
11
+ --scalar-background-2: #f7f7f7;
12
+ --scalar-background-3: #e7e7e7;
13
+ --scalar-background-accent: #8ab4f81f;
14
+
15
+ --scalar-color-1: #2a2f45;
16
+ --scalar-color-2: #757575;
17
+ --scalar-color-3: #8e8e8e;
18
+
19
+ --scalar-color-accent: var(--scalar-color-1);
20
+ --scalar-border-color: rgba(0, 0, 0, 0.1);
21
+ }
22
+
23
+ .dark-mode {
24
+ --scalar-background-1: #000;
25
+ --scalar-background-2: #0f0f0f;
26
+ --scalar-background-3: #1d1d1d;
27
+
28
+ --scalar-color-1: rgba(255, 255, 255, 0.9);
29
+ --scalar-color-2: rgba(255, 255, 255, 0.62);
30
+ --scalar-color-3: rgba(255, 255, 255, 0.44);
31
+
32
+ --scalar-color-accent: var(--scalar-color-1);
33
+ --scalar-background-accent: #3ea6ff1f;
34
+
35
+ --scalar-border-color: rgba(255, 255, 255, 0.15);
36
+ }
37
+
38
+ /* Document Sidebar */
39
+ .light-mode .t-doc__sidebar,
40
+ .dark-mode .t-doc__sidebar {
41
+ --scalar-sidebar-background-1: var(--scalar-background-1);
42
+ --scalar-sidebar-color-1: var(--scalar-color-1);
43
+ --scalar-sidebar-color-2: var(--scalar-color-2);
44
+ --scalar-sidebar-border-color: var(--scalar-border-color);
45
+
46
+ --scalar-sidebar-item-hover-background: var(--scalar-background-2);
47
+ --scalar-sidebar-item-hover-color: currentColor;
48
+
49
+ --scalar-sidebar-item-active-background: var(--scalar-background-2);
50
+ --scalar-sidebar-color-active: var(--scalar-color-1);
51
+
52
+ --scalar-sidebar-search-background: transparent;
53
+ --scalar-sidebar-search-color: var(--scalar-color-3);
54
+ --scalar-sidebar-search-border-color: var(--scalar-border-color);
55
+ }
56
+
57
+ /* advanced */
58
+ .light-mode {
59
+ --scalar-color-green: #069061;
60
+ --scalar-color-red: #ef0006;
61
+ --scalar-color-yellow: #edbe20;
62
+ --scalar-color-blue: #0082d0;
63
+ --scalar-color-orange: #fb892c;
64
+ --scalar-color-purple: #5203d1;
65
+
66
+ --scalar-button-1: rgba(0, 0, 0, 1);
67
+ --scalar-button-1-hover: rgba(0, 0, 0, 0.8);
68
+ --scalar-button-1-color: rgba(255, 255, 255, 0.9);
69
+ }
70
+
71
+ .dark-mode {
72
+ --scalar-color-green: #00b648;
73
+ --scalar-color-red: #dc1b19;
74
+ --scalar-color-yellow: #ffc90d;
75
+ --scalar-color-blue: #4eb3ec;
76
+ --scalar-color-orange: #ff8d4d;
77
+ --scalar-color-purple: #b191f9;
78
+
79
+ --scalar-button-1: rgba(255, 255, 255, 1);
80
+ --scalar-button-1-hover: rgba(255, 255, 255, 0.9);
81
+ --scalar-button-1-color: black;
82
+ }
83
+
84
+ /* custom stuff for vlt */
85
+ .introduction-section {
86
+ position: static !important;
87
+ }
88
+
89
+ .introduction-section:before {
90
+ content: '';
91
+ position: absolute;
92
+ top: 0;
93
+ left: 0;
94
+ width: 100%;
95
+ height: 100%;
96
+ z-index: 0;
97
+ background: url('/public/images/bg.png');
98
+ background-position: center;
99
+ background-size: cover;
100
+ background-repeat: no-repeat;
101
+ opacity: 0.3;
102
+ mask-image: linear-gradient(135deg, transparent 60%, black 100%);
103
+ }
104
+
105
+ .dark-mode .introduction-section:before {
106
+ filter: invert(1);
107
+ opacity: 0.4;
108
+ }
109
+
110
+ .introduction-section .section-columns {
111
+ position: relative;
112
+ }
113
+
114
+ .introduction-description table,
115
+ .introduction-description table tbody,
116
+ .introduction-description table tbody tr {
117
+ display: flex !important;
118
+ overflow: hidden !important;
119
+ }
120
+
121
+ .introduction-description table {
122
+ width: 90% !important;
123
+ border: none !important;
124
+ box-shadow: none !important;
125
+ }
126
+
127
+ .introduction-description table tbody,
128
+ .introduction-description table tbody tr {
129
+ width: 100% !important;
130
+ border: none !important;
131
+ }
132
+
133
+ .introduction-description table tbody {
134
+ flex-wrap: wrap !important;
135
+ }
136
+
137
+ .introduction-description table td {
138
+ padding: 0 !important;
139
+ width: 33.3333% !important;
140
+ display: flex !important;
141
+ border: none !important;
142
+ }
143
+
144
+ .introduction-description table a {
145
+ box-sizing: border-box !important;
146
+ padding: 0 !important;
147
+ width: 100% !important;
148
+ display: block !important;
149
+ outline: none !important;
150
+ border: none !important;
151
+ width: 100% !important;
152
+ height: 65px !important;
153
+ text-indent: -9999px !important;
154
+ white-space: nowrap !important;
155
+ background-size: 60px auto !important;
156
+ background-position: center !important;
157
+ background-repeat: no-repeat !important;
158
+ transition: transform 0.25s !important;
159
+ }
160
+
161
+ .dark-mode .introduction-description table a {
162
+ filter: invert(1) !important;
163
+ }
164
+
165
+ .introduction-description table a:hover {
166
+ transform: scale(1.25) !important;
167
+ }
168
+
169
+ .introduction-description table a[alt='vlt'] {
170
+ background-image: url('/public/images/clients/logo-vlt.png') !important;
171
+ }
172
+
173
+ .introduction-description table a[alt='npm'] {
174
+ background-image: url('/public/images/clients/logo-npm.png') !important;
175
+ }
176
+
177
+ .introduction-description table a[alt='yarn'] {
178
+ background-image: url('/public/images/clients/logo-yarn.png') !important;
179
+ }
180
+
181
+ .introduction-description table a[alt='pnpm'] {
182
+ background-image: url('/public/images/clients/logo-pnpm.png') !important;
183
+ }
184
+
185
+ .introduction-description table a[alt='deno'] {
186
+ background-image: url('/public/images/clients/logo-deno.png') !important;
187
+ }
188
+
189
+ .introduction-description table a[alt='bun'] {
190
+ background-image: url('/public/images/clients/logo-bun.png') !important;
191
+ }
192
+
193
+ .scalar-app .markdown [alt='license'] summary:after {
194
+ top: 11px;
195
+ left: 10px;
196
+ }
197
+
198
+ .sidebar-heading-link {
199
+ font-size: 11px;
200
+ }
201
+
202
+ [alt='features'],
203
+ [alt='resources'],
204
+ [alt='trademark-disclaimer'],
205
+ [alt='license'],
206
+ [alt='license'] summary {
207
+ font-size: 12px !important;
208
+ line-height: 180% !important;
209
+ }
210
+
211
+ [alt='license'] {
212
+ padding: 0 !important;
213
+ font-family: courier !important;
214
+ }
215
+
216
+ [alt='license'] summary {
217
+ padding: 9px 10px 10px 30px !important;
218
+ margin: 0 !important;
219
+ font-family:
220
+ Inter,
221
+ -apple-system,
222
+ 'system-ui',
223
+ 'Segoe UI',
224
+ Roboto,
225
+ Oxygen,
226
+ Ubuntu,
227
+ Cantarell,
228
+ 'Open Sans',
229
+ 'Helvetica Neue',
230
+ sans-serif !important;
231
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "demo",
3
+ "version": "1.0.0",
4
+ "private": true,
5
+ "dependencies": {}
6
+ }
@@ -0,0 +1 @@
1
+ {}