wyvrnpm 2.10.2 → 2.12.2

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 (49) hide show
  1. package/README.md +1914 -1860
  2. package/bin/{wyvrn.js → wyvrnpm.js} +66 -0
  3. package/cmake/cpp.cmake +9 -9
  4. package/cmake/functions.cmake +224 -224
  5. package/cmake/macros.cmake +284 -284
  6. package/package.json +3 -2
  7. package/src/auth.js +66 -66
  8. package/src/binary-dir.js +95 -0
  9. package/src/bootstrap/cookbook.js +196 -196
  10. package/src/bootstrap/detect.js +150 -150
  11. package/src/bootstrap/index.js +220 -220
  12. package/src/bootstrap/version.js +72 -72
  13. package/src/build/cache.js +344 -344
  14. package/src/build/clone.js +170 -170
  15. package/src/build/cmake.js +342 -342
  16. package/src/build/index.js +299 -297
  17. package/src/build/msvc-env.js +260 -260
  18. package/src/build/recipe.js +188 -188
  19. package/src/commands/add.js +141 -141
  20. package/src/commands/bootstrap.js +96 -96
  21. package/src/commands/build.js +482 -452
  22. package/src/commands/cache.js +189 -189
  23. package/src/commands/clean.js +80 -80
  24. package/src/commands/configure.js +92 -92
  25. package/src/commands/init.js +70 -70
  26. package/src/commands/install-skill.js +115 -115
  27. package/src/commands/install.js +730 -674
  28. package/src/commands/link.js +320 -320
  29. package/src/commands/profile.js +237 -237
  30. package/src/commands/publish.js +584 -555
  31. package/src/commands/show.js +252 -252
  32. package/src/commands/version.js +187 -0
  33. package/src/compat.js +273 -273
  34. package/src/conf/index.js +415 -391
  35. package/src/conf/namespaces.js +94 -94
  36. package/src/context.js +230 -230
  37. package/src/http-fetch.js +53 -53
  38. package/src/ignore.js +118 -118
  39. package/src/logger.js +122 -122
  40. package/src/options.js +303 -303
  41. package/src/settings-overrides.js +152 -152
  42. package/src/toolchain/deps.js +164 -164
  43. package/src/toolchain/index.js +212 -212
  44. package/src/toolchain/presets.js +356 -340
  45. package/src/toolchain/template.cmake +77 -77
  46. package/src/upload-built.js +265 -265
  47. package/src/version-range.js +301 -301
  48. package/src/zip-safe.js +52 -52
  49. package/src/zip-stream.js +126 -0
@@ -1,96 +1,96 @@
1
- 'use strict';
2
-
3
- const path = require('path');
4
-
5
- const { bootstrap } = require('../bootstrap');
6
- const { nameFromUrl } = require('../bootstrap/version');
7
- const log = require('../logger');
8
-
9
- /**
10
- * `wyvrnpm bootstrap <git-url>` — scaffold a first-draft `wyvrn.json`
11
- * inside a cloned OSS repo so it can be built + published as a wyvrnpm
12
- * package. See CLAUDE.md §5.9 and
13
- * claude/skills/wyvrnpm/references/oss-conversion-patterns.md.
14
- *
15
- * Typical use — batch-convert a list of OSS libraries into wyvrnpm:
16
- *
17
- * while read url; do
18
- * wyvrnpm bootstrap "$url" --dest "./pkgs/$(basename "$url" .git)"
19
- * done < urls.txt
20
- *
21
- * The output is always a *first draft* — bootstrap prints a TODO report
22
- * flagging gotchas that need human review (install gates, test-skip
23
- * flags upstream-specific, missing CMakeLists.txt on header-drop repos
24
- * like stb/imgui). Always review before `wyvrnpm publish`.
25
- *
26
- * @param {object} argv
27
- */
28
- async function bootstrapCmd(argv) {
29
- const url = argv.url ?? argv._?.[1] ?? null;
30
- if (!url && !argv.noClone) {
31
- log.error('bootstrap: missing git URL.\n Usage: wyvrnpm bootstrap <git-url> [--dest <dir>]');
32
- process.exit(1);
33
- }
34
-
35
- const dest = argv.dest || path.resolve(nameFromUrl(url ?? '') || 'package');
36
-
37
- let result;
38
- try {
39
- result = bootstrap({
40
- url,
41
- dest,
42
- ref: argv.ref,
43
- name: argv.name,
44
- version: argv.version,
45
- kind: argv.kind,
46
- description: argv.description,
47
- noClone: Boolean(argv.noClone),
48
- dryRun: Boolean(argv.dryRun),
49
- force: Boolean(argv.force),
50
- });
51
- } catch (err) {
52
- log.error(err.message);
53
- process.exit(1);
54
- }
55
-
56
- const { manifest, todos, manifestPath, wrote } = result;
57
-
58
- if (argv.format === 'json') {
59
- process.stdout.write(JSON.stringify({
60
- command: 'bootstrap',
61
- wyvrnpmVersion: require('../../package.json').version,
62
- dest,
63
- manifestPath,
64
- wrote,
65
- manifest,
66
- todos,
67
- }, null, 2) + '\n');
68
- return;
69
- }
70
-
71
- console.log();
72
- console.log(`─── ${manifest.name}@${manifest.version} (${manifest.kind}) ───`);
73
- console.log(JSON.stringify(manifest, null, 2));
74
- console.log();
75
-
76
- if (wrote) log.success(`Wrote ${manifestPath}`);
77
- else log.info(`Dry run — no manifest written.`);
78
-
79
- if (todos.length > 0) {
80
- console.log();
81
- console.log('TODOs — review before `wyvrnpm publish`:');
82
- for (const t of todos) console.log(` • ${t}`);
83
- }
84
-
85
- if (wrote) {
86
- console.log();
87
- console.log('Next steps:');
88
- console.log(` cd ${path.relative(process.cwd(), path.resolve(dest)) || '.'}`);
89
- console.log(' wyvrnpm install');
90
- console.log(' wyvrnpm build --install --all-configs');
91
- console.log(' # review the install tree, then:');
92
- console.log(' wyvrnpm publish --source <your-s3-publish-source>');
93
- }
94
- }
95
-
96
- module.exports = bootstrapCmd;
1
+ 'use strict';
2
+
3
+ const path = require('path');
4
+
5
+ const { bootstrap } = require('../bootstrap');
6
+ const { nameFromUrl } = require('../bootstrap/version');
7
+ const log = require('../logger');
8
+
9
+ /**
10
+ * `wyvrnpm bootstrap <git-url>` — scaffold a first-draft `wyvrn.json`
11
+ * inside a cloned OSS repo so it can be built + published as a wyvrnpm
12
+ * package. See CLAUDE.md §5.9 and
13
+ * claude/skills/wyvrnpm/references/oss-conversion-patterns.md.
14
+ *
15
+ * Typical use — batch-convert a list of OSS libraries into wyvrnpm:
16
+ *
17
+ * while read url; do
18
+ * wyvrnpm bootstrap "$url" --dest "./pkgs/$(basename "$url" .git)"
19
+ * done < urls.txt
20
+ *
21
+ * The output is always a *first draft* — bootstrap prints a TODO report
22
+ * flagging gotchas that need human review (install gates, test-skip
23
+ * flags upstream-specific, missing CMakeLists.txt on header-drop repos
24
+ * like stb/imgui). Always review before `wyvrnpm publish`.
25
+ *
26
+ * @param {object} argv
27
+ */
28
+ async function bootstrapCmd(argv) {
29
+ const url = argv.url ?? argv._?.[1] ?? null;
30
+ if (!url && !argv.noClone) {
31
+ log.error('bootstrap: missing git URL.\n Usage: wyvrnpm bootstrap <git-url> [--dest <dir>]');
32
+ process.exit(1);
33
+ }
34
+
35
+ const dest = argv.dest || path.resolve(nameFromUrl(url ?? '') || 'package');
36
+
37
+ let result;
38
+ try {
39
+ result = bootstrap({
40
+ url,
41
+ dest,
42
+ ref: argv.ref,
43
+ name: argv.name,
44
+ version: argv.version,
45
+ kind: argv.kind,
46
+ description: argv.description,
47
+ noClone: Boolean(argv.noClone),
48
+ dryRun: Boolean(argv.dryRun),
49
+ force: Boolean(argv.force),
50
+ });
51
+ } catch (err) {
52
+ log.error(err.message);
53
+ process.exit(1);
54
+ }
55
+
56
+ const { manifest, todos, manifestPath, wrote } = result;
57
+
58
+ if (argv.format === 'json') {
59
+ process.stdout.write(JSON.stringify({
60
+ command: 'bootstrap',
61
+ wyvrnpmVersion: require('../../package.json').version,
62
+ dest,
63
+ manifestPath,
64
+ wrote,
65
+ manifest,
66
+ todos,
67
+ }, null, 2) + '\n');
68
+ return;
69
+ }
70
+
71
+ console.log();
72
+ console.log(`─── ${manifest.name}@${manifest.version} (${manifest.kind}) ───`);
73
+ console.log(JSON.stringify(manifest, null, 2));
74
+ console.log();
75
+
76
+ if (wrote) log.success(`Wrote ${manifestPath}`);
77
+ else log.info(`Dry run — no manifest written.`);
78
+
79
+ if (todos.length > 0) {
80
+ console.log();
81
+ console.log('TODOs — review before `wyvrnpm publish`:');
82
+ for (const t of todos) console.log(` • ${t}`);
83
+ }
84
+
85
+ if (wrote) {
86
+ console.log();
87
+ console.log('Next steps:');
88
+ console.log(` cd ${path.relative(process.cwd(), path.resolve(dest)) || '.'}`);
89
+ console.log(' wyvrnpm install');
90
+ console.log(' wyvrnpm build --install --all-configs');
91
+ console.log(' # review the install tree, then:');
92
+ console.log(' wyvrnpm publish --source <your-s3-publish-source>');
93
+ }
94
+ }
95
+
96
+ module.exports = bootstrapCmd;