wyvrnpm 1.2.1 → 2.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.
- package/README.md +513 -413
- package/bin/wyvrn.js +277 -163
- package/package.json +37 -37
- package/src/commands/install.js +156 -109
- package/src/commands/link.js +316 -0
- package/src/commands/profile.js +171 -0
- package/src/commands/publish.js +232 -180
- package/src/config.js +63 -60
- package/src/download.js +325 -164
- package/src/index.js +10 -9
- package/src/link-utils.js +95 -0
- package/src/manifest.js +133 -77
- package/src/profile.js +377 -0
- package/src/providers/base.js +133 -56
- package/src/providers/file.js +181 -71
- package/src/providers/http.js +268 -118
- package/src/providers/s3.js +273 -136
- package/src/resolve.js +262 -200
package/README.md
CHANGED
|
@@ -1,413 +1,513 @@
|
|
|
1
|
-
# wyvrnpm
|
|
2
|
-
|
|
3
|
-
A simple, private C++ package manager that works with any static file hosting provider — Amazon S3, a plain HTTP/HTTPS server, a local directory, or an SMB/UNC network share.
|
|
4
|
-
|
|
5
|
-
There is no central registry. You control where packages are hosted.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Install
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
npm install -g wyvrnpm
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Requires Node.js >= 18.
|
|
16
|
-
|
|
17
|
-
For S3 publishing, also install the AWS SDK:
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
npm install -g @aws-sdk/client-s3 @aws-sdk/credential-providers
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
## Quick Start
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
# 1. Initialise a manifest in your project
|
|
29
|
-
wyvrnpm init
|
|
30
|
-
|
|
31
|
-
# 2. Configure your package sources once
|
|
32
|
-
wyvrnpm configure add-source --kind install --name corp-s3 --url s3://my-bucket/packages --profile my-sso
|
|
33
|
-
wyvrnpm configure add-source --kind publish --name default --url s3://my-bucket/packages --profile my-sso
|
|
34
|
-
|
|
35
|
-
# 3. Install dependencies (uses configured sources automatically)
|
|
36
|
-
wyvrnpm install --platform win_x64
|
|
37
|
-
|
|
38
|
-
# 4. Publish your package
|
|
39
|
-
wyvrnpm publish --platform win_x64
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
|
84
|
-
|
|
85
|
-
| `--
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
wyvrnpm publish --source
|
|
113
|
-
|
|
114
|
-
#
|
|
115
|
-
wyvrnpm publish --
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
|
125
|
-
|
|
126
|
-
| `--
|
|
127
|
-
| `--
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
wyvrnpm
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
wyvrnpm
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
**Options**
|
|
196
|
-
|
|
197
|
-
| Option |
|
|
198
|
-
|
|
199
|
-
| `--
|
|
200
|
-
| `--
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
wyvrnpm
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
https://
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
```
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
{
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
1
|
+
# wyvrnpm
|
|
2
|
+
|
|
3
|
+
A simple, private C++ package manager that works with any static file hosting provider — Amazon S3, a plain HTTP/HTTPS server, a local directory, or an SMB/UNC network share.
|
|
4
|
+
|
|
5
|
+
There is no central registry. You control where packages are hosted.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install -g wyvrnpm
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Requires Node.js >= 18.
|
|
16
|
+
|
|
17
|
+
For S3 publishing, also install the AWS SDK:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install -g @aws-sdk/client-s3 @aws-sdk/credential-providers
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Quick Start
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# 1. Initialise a manifest in your project
|
|
29
|
+
wyvrnpm init
|
|
30
|
+
|
|
31
|
+
# 2. Configure your package sources once
|
|
32
|
+
wyvrnpm configure add-source --kind install --name corp-s3 --url s3://my-bucket/packages --profile my-sso
|
|
33
|
+
wyvrnpm configure add-source --kind publish --name default --url s3://my-bucket/packages --profile my-sso
|
|
34
|
+
|
|
35
|
+
# 3. Install dependencies (uses configured sources automatically)
|
|
36
|
+
wyvrnpm install --platform win_x64
|
|
37
|
+
|
|
38
|
+
# 4. Publish your package
|
|
39
|
+
wyvrnpm publish --platform win_x64
|
|
40
|
+
|
|
41
|
+
# 5. (Optional) Link local packages for development
|
|
42
|
+
cd ../my-local-lib && wyvrnpm link
|
|
43
|
+
cd ../my-app && wyvrnpm link my-local-lib
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Commands
|
|
49
|
+
|
|
50
|
+
### `wyvrnpm init`
|
|
51
|
+
|
|
52
|
+
Creates a `wyvrn.json` manifest in the current directory.
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
wyvrnpm init
|
|
56
|
+
wyvrnpm init --root ./my-project
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
### `wyvrnpm install`
|
|
62
|
+
|
|
63
|
+
Resolves the full dependency graph and downloads all packages.
|
|
64
|
+
|
|
65
|
+
**Source priority:** CLI `--source` values are used if provided. If omitted, sources are loaded from the [configuration file](#configuration-file).
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
# Use configured sources (set up via wyvrnpm configure)
|
|
69
|
+
wyvrnpm install --platform win_x64
|
|
70
|
+
|
|
71
|
+
# Override with explicit sources — ignores config
|
|
72
|
+
wyvrnpm install --source https://pkg.example.com/cpp --platform win_x64
|
|
73
|
+
|
|
74
|
+
# Multiple sources — tried in order, first to respond wins
|
|
75
|
+
wyvrnpm install \
|
|
76
|
+
--source https://primary.example.com/cpp \
|
|
77
|
+
--source https://mirror.example.com/cpp \
|
|
78
|
+
--platform linux_x64
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**Options**
|
|
82
|
+
|
|
83
|
+
| Option | Default | Description |
|
|
84
|
+
|---|---|---|
|
|
85
|
+
| `--source` / `-s` | *(config)* | Base URL of a package source. Repeat for multiple. Overrides config when provided. |
|
|
86
|
+
| `--platform` | `win_x64` | Target platform: `win_x64` `win_x86` `linux_x64` `linux_x86` `osx_x64` `osx_arm64` |
|
|
87
|
+
| `--timeout` | `300` | HTTP request timeout in seconds |
|
|
88
|
+
| `--manifest` | `./wyvrn.json` | Path to the manifest file |
|
|
89
|
+
| `--root` | `./` | Project root (packages extracted to `{root}/wyvrn_internal/`) |
|
|
90
|
+
|
|
91
|
+
Packages are extracted to `wyvrn_internal/{name}/`. A `wyvrn.lock` file is written alongside the manifest recording the exact resolved versions. On subsequent installs the lock file pins all previously resolved versions — only newly added dependencies are resolved fresh.
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
### `wyvrnpm publish`
|
|
96
|
+
|
|
97
|
+
Zips the project directory and uploads `wyvrn.json` + `wyvrn.zip` to the destination source.
|
|
98
|
+
|
|
99
|
+
**Source priority:** CLI `--source` is used if provided (as a URL/URI or a configured source name). If omitted, the first configured publish source is used.
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
# Use the first configured publish source
|
|
103
|
+
wyvrnpm publish --platform win_x64
|
|
104
|
+
|
|
105
|
+
# Reference a configured source by name
|
|
106
|
+
wyvrnpm publish --source default --platform win_x64
|
|
107
|
+
|
|
108
|
+
# Explicit destination URL — ignores config
|
|
109
|
+
wyvrnpm publish --source s3://my-bucket/packages --profile my-sso --platform win_x64
|
|
110
|
+
|
|
111
|
+
# HTTP server with token auth
|
|
112
|
+
wyvrnpm publish --source https://pkg.corp.com --token mytoken --platform linux_x64
|
|
113
|
+
|
|
114
|
+
# Local directory or SMB share
|
|
115
|
+
wyvrnpm publish --source \\fileserver\packages --platform win_x64
|
|
116
|
+
wyvrnpm publish --source /mnt/packages --platform linux_x64
|
|
117
|
+
|
|
118
|
+
# Publish build artifacts from a specific directory
|
|
119
|
+
wyvrnpm publish --path ./dist --platform win_x64
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
**Options**
|
|
123
|
+
|
|
124
|
+
| Option | Default | Description |
|
|
125
|
+
|---|---|---|
|
|
126
|
+
| `--source` / `-s` | *(config)* | Destination URL/URI or configured source name. Overrides config when provided. |
|
|
127
|
+
| `--profile` / `-p` | *(config)* | AWS SSO profile for S3 authentication. Overrides config when provided. |
|
|
128
|
+
| `--token` | *(config)* | Bearer token for HTTP server authentication. Overrides config when provided. |
|
|
129
|
+
| `--platform` | `common` | Target platform sub-path: `win_x64` `win_x86` `linux_x64` `linux_x86` `osx_x64` `osx_arm64` `common` |
|
|
130
|
+
| `--path` | `.` | Directory to zip and publish |
|
|
131
|
+
| `--manifest` | `./wyvrn.json` | Path to the manifest file |
|
|
132
|
+
|
|
133
|
+
Files are uploaded to `{source}/{platform}/{name}/{version}/wyvrn.json` and `wyvrn.zip`.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
### `wyvrnpm clean`
|
|
138
|
+
|
|
139
|
+
Removes the `wyvrn_internal/` package cache and `wyvrn.lock`.
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
wyvrnpm clean
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
### `wyvrnpm link`
|
|
148
|
+
|
|
149
|
+
Links a local package for development, similar to `npm link`. This allows you to test packages from local source directories without publishing to the registry.
|
|
150
|
+
|
|
151
|
+
#### Register a package globally
|
|
152
|
+
|
|
153
|
+
Run `wyvrnpm link` in a package directory to register it for linking:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
cd C:\Dev\my-library
|
|
157
|
+
wyvrnpm link
|
|
158
|
+
# [wyvrn] Registered "my-library" -> C:\Dev\my-library
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
For CMake packages where the installable content is in a subdirectory:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
cd C:\Dev\my-cmake-lib
|
|
165
|
+
wyvrnpm link --subdir output/install
|
|
166
|
+
# [wyvrn] Registered "my-cmake-lib" -> C:\Dev\my-cmake-lib\output\install
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
#### Link a package into your project
|
|
170
|
+
|
|
171
|
+
Link a globally registered package:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
cd C:\Projects\my-app
|
|
175
|
+
wyvrnpm link my-library
|
|
176
|
+
# [wyvrn] Linked: my-library -> C:\Dev\my-library
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Or link directly from a path (skip global registration):
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
wyvrnpm link my-library C:\Dev\my-library
|
|
183
|
+
wyvrnpm link my-library C:\Dev\my-library --subdir output/install
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
#### List registered packages
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
wyvrnpm link --list
|
|
190
|
+
# [wyvrn] Globally registered packages:
|
|
191
|
+
# my-library -> C:\Dev\my-library
|
|
192
|
+
# my-cmake-lib -> C:\Dev\my-cmake-lib\output\install [subdir: output/install]
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
**Options**
|
|
196
|
+
|
|
197
|
+
| Option | Description |
|
|
198
|
+
|---|---|
|
|
199
|
+
| `--list` | List all globally registered packages |
|
|
200
|
+
| `--subdir` | Subdirectory within the package to link (e.g., `output/install` for CMake packages) |
|
|
201
|
+
|
|
202
|
+
**How it works:**
|
|
203
|
+
- Creates a symlink (Unix) or junction (Windows) in `wyvrn_internal/`
|
|
204
|
+
- Junctions on Windows don't require admin rights
|
|
205
|
+
- Linked packages are recorded in `wyvrn.lock` with a `linked:` prefix
|
|
206
|
+
- `wyvrnpm install` automatically skips downloading linked packages
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
### `wyvrnpm unlink`
|
|
211
|
+
|
|
212
|
+
Removes a linked package from the current project.
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
wyvrnpm unlink my-library
|
|
216
|
+
# [wyvrn] Unlinked: my-library
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
To unlink and re-download from the registry:
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
wyvrnpm unlink my-library --restore
|
|
223
|
+
# [wyvrn] Unlinked: my-library
|
|
224
|
+
# [wyvrn] Downloading: my-library@1.0.0.0
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
**Options**
|
|
228
|
+
|
|
229
|
+
| Option | Default | Description |
|
|
230
|
+
|---|---|---|
|
|
231
|
+
| `--restore` | `false` | Re-download the package from registry after unlinking |
|
|
232
|
+
| `--source` | *(config)* | Package source for `--restore` |
|
|
233
|
+
| `--platform` | `win_x64` | Target platform for `--restore` |
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
### `wyvrnpm configure`
|
|
238
|
+
|
|
239
|
+
Manages the [configuration file](#configuration-file). All sub-commands read and write `config.json` in the platform config directory.
|
|
240
|
+
|
|
241
|
+
#### `wyvrnpm configure list`
|
|
242
|
+
|
|
243
|
+
Prints all configured sources.
|
|
244
|
+
|
|
245
|
+
```
|
|
246
|
+
Config: C:\Users\you\AppData\Local\wyvrnpm\config.json
|
|
247
|
+
|
|
248
|
+
Install Sources:
|
|
249
|
+
corp-s3 s3://my-bucket/packages [profile: my-sso]
|
|
250
|
+
fallback https://pkg.corp.com [token: ***]
|
|
251
|
+
|
|
252
|
+
Publish Sources:
|
|
253
|
+
default s3://my-bucket/packages [profile: my-sso]
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
#### `wyvrnpm configure add-source`
|
|
257
|
+
|
|
258
|
+
Adds a new source or updates an existing one with the same name.
|
|
259
|
+
|
|
260
|
+
```bash
|
|
261
|
+
# S3 with AWS SSO profile (install)
|
|
262
|
+
wyvrnpm configure add-source \
|
|
263
|
+
--kind install \
|
|
264
|
+
--name corp-s3 \
|
|
265
|
+
--url s3://my-bucket/packages \
|
|
266
|
+
--profile my-sso-profile
|
|
267
|
+
|
|
268
|
+
# HTTPS server with token auth (install)
|
|
269
|
+
wyvrnpm configure add-source \
|
|
270
|
+
--kind install \
|
|
271
|
+
--name fallback \
|
|
272
|
+
--url https://pkg.corp.com \
|
|
273
|
+
--token mytoken
|
|
274
|
+
|
|
275
|
+
# Local or SMB path (no auth required)
|
|
276
|
+
wyvrnpm configure add-source \
|
|
277
|
+
--kind install \
|
|
278
|
+
--name local \
|
|
279
|
+
--url \\fileserver\packages
|
|
280
|
+
|
|
281
|
+
# Publish destination
|
|
282
|
+
wyvrnpm configure add-source \
|
|
283
|
+
--kind publish \
|
|
284
|
+
--name default \
|
|
285
|
+
--url s3://my-bucket/packages \
|
|
286
|
+
--profile my-sso-profile
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
**Options**
|
|
290
|
+
|
|
291
|
+
| Option | Required | Description |
|
|
292
|
+
|---|---|---|
|
|
293
|
+
| `--kind` | Yes | `install` or `publish` |
|
|
294
|
+
| `--name` | Yes | Unique name for this source |
|
|
295
|
+
| `--url` | Yes | Destination URL, URI, or file path |
|
|
296
|
+
| `--profile` | No | AWS SSO profile (S3 sources) |
|
|
297
|
+
| `--token` | No | Bearer token (HTTP sources) |
|
|
298
|
+
|
|
299
|
+
#### `wyvrnpm configure remove-source`
|
|
300
|
+
|
|
301
|
+
Removes a source by name.
|
|
302
|
+
|
|
303
|
+
```bash
|
|
304
|
+
wyvrnpm configure remove-source --kind install --name fallback
|
|
305
|
+
wyvrnpm configure remove-source --kind publish --name default
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
---
|
|
309
|
+
|
|
310
|
+
## Configuration File
|
|
311
|
+
|
|
312
|
+
wyvrnpm stores persistent configuration in a `config.json` file:
|
|
313
|
+
|
|
314
|
+
| Platform | Path |
|
|
315
|
+
|---|---|
|
|
316
|
+
| Windows | `%LOCALAPPDATA%\wyvrnpm\config.json` |
|
|
317
|
+
| Linux / macOS | `~/.config/wyvrnpm/config.json` |
|
|
318
|
+
|
|
319
|
+
**Example config.json**
|
|
320
|
+
|
|
321
|
+
```json
|
|
322
|
+
{
|
|
323
|
+
"installSources": [
|
|
324
|
+
{
|
|
325
|
+
"name": "corp-s3",
|
|
326
|
+
"url": "s3://my-bucket/packages",
|
|
327
|
+
"profile": "my-sso-profile"
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"name": "fallback",
|
|
331
|
+
"url": "https://pkg.corp.com",
|
|
332
|
+
"token": "mytoken"
|
|
333
|
+
}
|
|
334
|
+
],
|
|
335
|
+
"publishSources": [
|
|
336
|
+
{
|
|
337
|
+
"name": "default",
|
|
338
|
+
"url": "s3://my-bucket/packages",
|
|
339
|
+
"profile": "my-sso-profile"
|
|
340
|
+
}
|
|
341
|
+
],
|
|
342
|
+
"linkedPackages": {
|
|
343
|
+
"my-library": { "path": "C:\\Dev\\my-library" },
|
|
344
|
+
"my-cmake-lib": { "path": "C:\\Dev\\my-cmake-lib", "subdir": "output/install" }
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
The `linkedPackages` field stores globally registered packages for `wyvrnpm link`. Each entry maps a package name to its local path and optional subdirectory.
|
|
350
|
+
|
|
351
|
+
**CLI options always take priority over config.** Config values are only used when the corresponding CLI option is not provided.
|
|
352
|
+
|
|
353
|
+
---
|
|
354
|
+
|
|
355
|
+
## Publish Providers
|
|
356
|
+
|
|
357
|
+
wyvrnpm uses a provider architecture to support different destination types. The correct provider is selected automatically based on the source URL format.
|
|
358
|
+
|
|
359
|
+
| Provider | Detected from | Auth |
|
|
360
|
+
|---|---|---|
|
|
361
|
+
| **S3** | `s3://` URI, or S3 HTTPS endpoint | `--profile` (AWS SSO) |
|
|
362
|
+
| **HTTP** | `http://` or `https://` | `--token` (Bearer) |
|
|
363
|
+
| **File** | Local path or UNC/SMB share | none |
|
|
364
|
+
|
|
365
|
+
### S3 Provider
|
|
366
|
+
|
|
367
|
+
Accepts any of these source formats:
|
|
368
|
+
|
|
369
|
+
```
|
|
370
|
+
s3://bucket-name/optional/prefix
|
|
371
|
+
https://bucket-name.s3.amazonaws.com/prefix
|
|
372
|
+
https://bucket-name.s3.us-east-1.amazonaws.com/prefix
|
|
373
|
+
https://s3.amazonaws.com/bucket-name/prefix
|
|
374
|
+
https://s3.us-east-1.amazonaws.com/bucket-name/prefix
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
Authentication uses AWS SSO via `--profile`. If no profile is given, the default AWS credential chain is used.
|
|
378
|
+
|
|
379
|
+
### HTTP Provider
|
|
380
|
+
|
|
381
|
+
Accepts `http://` and `https://` URLs. Uploads files via HTTP `PUT`. Optionally authenticates with a Bearer token via `--token`.
|
|
382
|
+
|
|
383
|
+
### File Provider
|
|
384
|
+
|
|
385
|
+
Accepts local directory paths and SMB/UNC network shares. Files are copied with no authentication required.
|
|
386
|
+
|
|
387
|
+
```
|
|
388
|
+
/absolute/unix/path
|
|
389
|
+
./relative/path
|
|
390
|
+
C:\Windows\path
|
|
391
|
+
\\server\share\path
|
|
392
|
+
//server/share/path
|
|
393
|
+
file:///absolute/path
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
### Adding a Custom Provider
|
|
397
|
+
|
|
398
|
+
1. Create `src/providers/myprovider.js` extending `BaseProvider`:
|
|
399
|
+
|
|
400
|
+
```js
|
|
401
|
+
'use strict';
|
|
402
|
+
const BaseProvider = require('./base');
|
|
403
|
+
|
|
404
|
+
class MyProvider extends BaseProvider {
|
|
405
|
+
static canHandle(source) {
|
|
406
|
+
return source.startsWith('myscheme://');
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
static get providerName() { return 'MyProvider'; }
|
|
410
|
+
|
|
411
|
+
async publish(files, options) {
|
|
412
|
+
// files.manifest — path to wyvrn.json
|
|
413
|
+
// files.zip — path to wyvrn.zip
|
|
414
|
+
// options.source, options.platform, options.name, options.version
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
module.exports = MyProvider;
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
2. Register it in `src/providers/index.js`:
|
|
422
|
+
|
|
423
|
+
```js
|
|
424
|
+
const MyProvider = require('./myprovider');
|
|
425
|
+
|
|
426
|
+
const PROVIDERS = [
|
|
427
|
+
S3Provider,
|
|
428
|
+
HttpProvider,
|
|
429
|
+
FileProvider,
|
|
430
|
+
MyProvider, // add here
|
|
431
|
+
];
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
---
|
|
435
|
+
|
|
436
|
+
## Registry Layout
|
|
437
|
+
|
|
438
|
+
Packages must be hosted at the following path structure relative to the source base:
|
|
439
|
+
|
|
440
|
+
```
|
|
441
|
+
{source}/{platform}/{name}/{version}/wyvrn.json <- package manifest
|
|
442
|
+
{source}/{platform}/{name}/{version}/wyvrn.zip <- package archive
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
The tool also falls back to `razer.json` / `razer.zip` and a `common/` platform path for backwards compatibility.
|
|
446
|
+
|
|
447
|
+
**Example (S3):**
|
|
448
|
+
|
|
449
|
+
```
|
|
450
|
+
s3://my-bucket/packages/win_x64/OpenSSL/3.0.0.0/wyvrn.json
|
|
451
|
+
s3://my-bucket/packages/win_x64/OpenSSL/3.0.0.0/wyvrn.zip
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
**Example (HTTP):**
|
|
455
|
+
|
|
456
|
+
```
|
|
457
|
+
https://pkg.corp.com/win_x64/OpenSSL/3.0.0.0/wyvrn.json
|
|
458
|
+
https://pkg.corp.com/win_x64/OpenSSL/3.0.0.0/wyvrn.zip
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
### Package manifest (wyvrn.json hosted on source)
|
|
462
|
+
|
|
463
|
+
```json
|
|
464
|
+
{
|
|
465
|
+
"Name": "OpenSSL",
|
|
466
|
+
"Version": "3.0.0.0",
|
|
467
|
+
"Description": "TLS/SSL toolkit",
|
|
468
|
+
"Dependencies": [
|
|
469
|
+
{ "Name": "zlib", "Version": "1.3.0.0" }
|
|
470
|
+
]
|
|
471
|
+
}
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
Fields use PascalCase. `Dependencies` is an array — transitive dependencies are resolved automatically.
|
|
475
|
+
|
|
476
|
+
---
|
|
477
|
+
|
|
478
|
+
## Project Manifest (wyvrn.json)
|
|
479
|
+
|
|
480
|
+
```json
|
|
481
|
+
{
|
|
482
|
+
"name": "my-app",
|
|
483
|
+
"version": "1.0.0.0",
|
|
484
|
+
"description": "My C++ application",
|
|
485
|
+
"kind": "ConsoleApp",
|
|
486
|
+
"dependencies": {
|
|
487
|
+
"OpenSSL": "3.0.0.0",
|
|
488
|
+
"zlib": "1.3.0.0"
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
**`kind` values:** `ConsoleApp`, `StaticLib`, `DynamicLib`, `HeaderOnlyLib`, `WebApp`, `Utility`, `Service`, `TestProject`
|
|
494
|
+
|
|
495
|
+
**`dependencies`** maps package names to version strings (`"major.minor.patch.build"`).
|
|
496
|
+
|
|
497
|
+
---
|
|
498
|
+
|
|
499
|
+
## Version Conflict Resolution
|
|
500
|
+
|
|
501
|
+
When the dependency graph requires the same package at multiple versions, the highest version wins. If a `wyvrn.lock` exists, locked versions always take priority over any conflicting transitive request. A warning is printed for every conflict detected.
|
|
502
|
+
|
|
503
|
+
---
|
|
504
|
+
|
|
505
|
+
## Ignoring generated files
|
|
506
|
+
|
|
507
|
+
Add the following to your `.gitignore`:
|
|
508
|
+
|
|
509
|
+
```
|
|
510
|
+
wyvrn_internal/
|
|
511
|
+
wyvrn.lock
|
|
512
|
+
*.zip
|
|
513
|
+
```
|