@intellectual-frontiers/ergonex 0.2.6 → 0.3.0

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/README.md +2 -0
  2. package/dist/desired.d.ts +27 -0
  3. package/dist/diff.d.ts +12 -0
  4. package/dist/doctor.d.ts +79 -0
  5. package/dist/findings.d.ts +85 -0
  6. package/dist/layout.d.ts +83 -0
  7. package/dist/manifest.d.ts +84 -0
  8. package/dist/mod.d.ts +29 -0
  9. package/dist/mod.js +4219 -0
  10. package/dist/modules/external.d.ts +31 -0
  11. package/dist/modules/mod.d.ts +10 -0
  12. package/dist/modules/name.d.ts +32 -0
  13. package/dist/modules/registry.d.ts +51 -0
  14. package/dist/modules/types.d.ts +178 -0
  15. package/dist/places.d.ts +35 -0
  16. package/dist/plan.d.ts +176 -0
  17. package/dist/platform/k-args.d.ts +28 -0
  18. package/dist/policy.d.ts +39 -0
  19. package/dist/portable.d.ts +111 -0
  20. package/dist/render.d.ts +95 -0
  21. package/dist/setup/evidence.d.ts +58 -0
  22. package/dist/shell/block.d.ts +45 -0
  23. package/dist/shell/mod.d.ts +8 -0
  24. package/dist/shell/snippet.d.ts +43 -0
  25. package/dist/state-record.d.ts +59 -0
  26. package/dist/state.d.ts +64 -0
  27. package/dist/templates/data.d.ts +25 -0
  28. package/dist/templates/hooks.d.ts +13 -0
  29. package/dist/templates/mod.d.ts +16 -0
  30. package/dist/tools/catalog.d.ts +70 -0
  31. package/dist/types.d.ts +51 -0
  32. package/dist/vendor/ts/githost/capabilities.d.ts +18 -0
  33. package/dist/vendor/ts/githost/git.d.ts +16 -0
  34. package/dist/vendor/ts/githost/github.d.ts +15 -0
  35. package/dist/vendor/ts/githost/gitlab.d.ts +15 -0
  36. package/dist/vendor/ts/githost/mod.d.ts +29 -0
  37. package/dist/vendor/ts/githost/remote.d.ts +59 -0
  38. package/dist/vendor/ts/githost/types.d.ts +101 -0
  39. package/dist/vendor/ts/kernel/archive.d.ts +147 -0
  40. package/dist/vendor/ts/kernel/args.d.ts +240 -0
  41. package/dist/vendor/ts/kernel/assess.d.ts +247 -0
  42. package/dist/vendor/ts/kernel/attest.d.ts +164 -0
  43. package/dist/vendor/ts/kernel/base64.d.ts +24 -0
  44. package/dist/vendor/ts/kernel/cbor.d.ts +39 -0
  45. package/dist/vendor/ts/kernel/cms.d.ts +106 -0
  46. package/dist/vendor/ts/kernel/commands.d.ts +103 -0
  47. package/dist/vendor/ts/kernel/cose.d.ts +34 -0
  48. package/dist/vendor/ts/kernel/crypt.d.ts +30 -0
  49. package/dist/vendor/ts/kernel/csv.d.ts +38 -0
  50. package/dist/vendor/ts/kernel/der.d.ts +67 -0
  51. package/dist/vendor/ts/kernel/documentation.d.ts +118 -0
  52. package/dist/vendor/ts/kernel/dsse.d.ts +137 -0
  53. package/dist/vendor/ts/kernel/evidence.d.ts +212 -0
  54. package/dist/vendor/ts/kernel/glob.d.ts +64 -0
  55. package/dist/vendor/ts/kernel/grc.d.ts +356 -0
  56. package/dist/vendor/ts/kernel/http.d.ts +46 -0
  57. package/dist/vendor/ts/kernel/json5.d.ts +46 -0
  58. package/dist/vendor/ts/kernel/layers.d.ts +35 -0
  59. package/dist/vendor/ts/kernel/md5.d.ts +19 -0
  60. package/dist/vendor/ts/kernel/media-types.d.ts +28 -0
  61. package/dist/vendor/ts/kernel/mod.d.ts +95 -0
  62. package/dist/vendor/ts/kernel/ocsf-types.auto.d.ts +4374 -0
  63. package/dist/vendor/ts/kernel/ocsf.d.ts +160 -0
  64. package/dist/vendor/ts/kernel/oscal.d.ts +356 -0
  65. package/dist/vendor/ts/kernel/otel.d.ts +365 -0
  66. package/dist/vendor/ts/kernel/otlp.d.ts +83 -0
  67. package/dist/vendor/ts/kernel/palette.d.ts +44 -0
  68. package/dist/vendor/ts/kernel/png.d.ts +124 -0
  69. package/dist/vendor/ts/kernel/rdf-schema.d.ts +190 -0
  70. package/dist/vendor/ts/kernel/rdf-term.d.ts +162 -0
  71. package/dist/vendor/ts/kernel/rdf-vocabularies.d.ts +148 -0
  72. package/dist/vendor/ts/kernel/rdf-write.d.ts +25 -0
  73. package/dist/vendor/ts/kernel/rdf.d.ts +35 -0
  74. package/dist/vendor/ts/kernel/render.d.ts +111 -0
  75. package/dist/vendor/ts/kernel/schedule.d.ts +207 -0
  76. package/dist/vendor/ts/kernel/semver.d.ts +94 -0
  77. package/dist/vendor/ts/kernel/sha256.d.ts +29 -0
  78. package/dist/vendor/ts/kernel/signals.d.ts +371 -0
  79. package/dist/vendor/ts/kernel/sigv4.d.ts +67 -0
  80. package/dist/vendor/ts/kernel/test-record.d.ts +222 -0
  81. package/dist/vendor/ts/kernel/test-report.d.ts +294 -0
  82. package/dist/vendor/ts/kernel/toml.d.ts +51 -0
  83. package/dist/vendor/ts/kernel/trace.d.ts +169 -0
  84. package/dist/vendor/ts/kernel/ts-literal.d.ts +62 -0
  85. package/dist/vendor/ts/kernel/uuid.d.ts +53 -0
  86. package/dist/vendor/ts/kernel/vt.d.ts +78 -0
  87. package/dist/vendor/ts/kernel/webauthn.d.ts +212 -0
  88. package/dist/vendor/ts/kernel/width.d.ts +63 -0
  89. package/dist/vendor/ts/kernel/xml.d.ts +73 -0
  90. package/dist/vendor/ts/kernel/yaml.d.ts +44 -0
  91. package/dist/vendor/ts/runtime/http-client.d.ts +149 -0
  92. package/ergonex.mjs +137 -138
  93. package/package.json +17 -5
package/ergonex.mjs CHANGED
@@ -2,11 +2,11 @@
2
2
  // bin/main.ts
3
3
  import process7 from "node:process";
4
4
 
5
- // ../ts/kernel/absurd.ts
5
+ // ../core/src/absurd.ts
6
6
  function absurd(value) {
7
7
  throw new Error(`an alternative was not handled: ${JSON.stringify(value)}`);
8
8
  }
9
- // ../ts/kernel/result.ts
9
+ // ../core/src/result.ts
10
10
  function ok(value) {
11
11
  return { kind: "ok", value };
12
12
  }
@@ -15,6 +15,140 @@ function err(error) {
15
15
  }
16
16
  var done = ok(undefined);
17
17
 
18
+ // ../core/src/decode.ts
19
+ function describe(input) {
20
+ if (input === null)
21
+ return "null";
22
+ if (input === undefined)
23
+ return "nothing";
24
+ if (Array.isArray(input))
25
+ return "an array";
26
+ const t = typeof input;
27
+ if (t === "string")
28
+ return `the string ${JSON.stringify(input).slice(0, 60)}`;
29
+ if (t === "object")
30
+ return "an object";
31
+ if (t === "function")
32
+ return "a function";
33
+ if (typeof input === "symbol")
34
+ return "a symbol";
35
+ if (typeof input === "number" || typeof input === "bigint" || typeof input === "boolean")
36
+ return `${t} ${String(input)}`;
37
+ return t;
38
+ }
39
+ function fail(path, expected, input) {
40
+ return err({ kind: "decode", path, expected, found: describe(input) });
41
+ }
42
+ function formatDecodeError(e) {
43
+ return `${e.path}: expected ${e.expected}, found ${e.found}`;
44
+ }
45
+ var string = (input, path = "$") => typeof input === "string" ? ok(input) : fail(path, "a string", input);
46
+ var number = (input, path = "$") => typeof input === "number" && Number.isFinite(input) ? ok(input) : fail(path, "a finite number", input);
47
+ var integer = (input, path = "$") => typeof input === "number" && Number.isInteger(input) ? ok(input) : fail(path, "an integer", input);
48
+ var boolean = (input, path = "$") => typeof input === "boolean" ? ok(input) : fail(path, "a boolean", input);
49
+ var unknownValue = (input) => ok(input);
50
+ function literal(...values) {
51
+ return (input, path = "$") => typeof input === "string" && values.includes(input) ? ok(input) : fail(path, `one of ${values.join(", ")}`, input);
52
+ }
53
+ function nullable(inner) {
54
+ return (input, path = "$") => input === null ? ok(null) : inner(input, path);
55
+ }
56
+ function array(element) {
57
+ return (input, path = "$") => {
58
+ if (!Array.isArray(input))
59
+ return fail(path, "an array", input);
60
+ const out = [];
61
+ for (const [i, value] of input.entries()) {
62
+ const r = element(value, `${path}[${i}]`);
63
+ if (r.kind === "err")
64
+ return r;
65
+ out.push(r.value);
66
+ }
67
+ return ok(out);
68
+ };
69
+ }
70
+ var isPlainObject = (input) => typeof input === "object" && input !== null && !Array.isArray(input);
71
+ function record(value) {
72
+ return (input, path = "$") => {
73
+ if (!isPlainObject(input))
74
+ return fail(path, "an object", input);
75
+ const out = {};
76
+ for (const key of Object.keys(input)) {
77
+ const r = value(Reflect.get(input, key), `${path}.${key}`);
78
+ if (r.kind === "err")
79
+ return r;
80
+ out[key] = r.value;
81
+ }
82
+ return ok(out);
83
+ };
84
+ }
85
+ function object(required, optional) {
86
+ return (input, path = "$") => {
87
+ if (!isPlainObject(input))
88
+ return fail(path, "an object", input);
89
+ const out = {};
90
+ for (const [key, decoder] of Object.entries(required)) {
91
+ const r = decoder(Reflect.get(input, key), `${path}.${key}`);
92
+ if (r.kind === "err")
93
+ return r;
94
+ out[key] = r.value;
95
+ }
96
+ for (const [key, decoder] of Object.entries(optional ?? {})) {
97
+ const value = Reflect.get(input, key);
98
+ if (value === undefined)
99
+ continue;
100
+ const r = decoder(value, `${path}.${key}`);
101
+ if (r.kind === "err")
102
+ return r;
103
+ out[key] = r.value;
104
+ }
105
+ return ok(out);
106
+ };
107
+ }
108
+ function tagged(alternatives) {
109
+ return (input, path = "$") => {
110
+ const kind = isPlainObject(input) ? Reflect.get(input, "kind") : undefined;
111
+ const decoder = typeof kind === "string" && Object.hasOwn(alternatives, kind) ? alternatives[kind] : undefined;
112
+ if (decoder === undefined)
113
+ return fail(`${path}.kind`, `one of ${Object.keys(alternatives).join(", ")}`, kind);
114
+ return decoder(input, path);
115
+ };
116
+ }
117
+ function oneOf(...alternatives) {
118
+ return (input, path = "$") => {
119
+ for (const decoder of alternatives) {
120
+ const r = decoder(input, path);
121
+ if (r.kind === "ok")
122
+ return r;
123
+ }
124
+ return fail(path, `one of ${alternatives.length} alternatives`, input);
125
+ };
126
+ }
127
+ function mapDecoder(base, f) {
128
+ return (input, path = "$") => {
129
+ const r = base(input, path);
130
+ return r.kind === "ok" ? ok(f(r.value)) : r;
131
+ };
132
+ }
133
+ function refine(base, name, valid) {
134
+ return (input, path = "$") => {
135
+ const r = base(input, path);
136
+ if (r.kind === "err")
137
+ return r;
138
+ return valid(r.value) ? ok(r.value) : fail(path, `a ${name}`, input);
139
+ };
140
+ }
141
+ function json(text, decoder) {
142
+ let value;
143
+ try {
144
+ value = JSON.parse(text);
145
+ } catch (e) {
146
+ return err({ kind: "decode", path: "$", expected: "JSON", found: e instanceof Error ? e.message : String(e) });
147
+ }
148
+ return decoder(value);
149
+ }
150
+ // ../core/src/text.ts
151
+ var ANSI = new RegExp(`${String.fromCharCode(27)}\\[[0-9;?]*[A-Za-z]`, "g");
18
152
  // ../ts/kernel/archive.ts
19
153
  function formatArchiveError(e) {
20
154
  switch (e.kind) {
@@ -587,139 +721,6 @@ function helpOf(program, summary, spec, operands = []) {
587
721
  ].join(`
588
722
  `);
589
723
  }
590
- // ../ts/kernel/decode.ts
591
- function describe(input) {
592
- if (input === null)
593
- return "null";
594
- if (input === undefined)
595
- return "nothing";
596
- if (Array.isArray(input))
597
- return "an array";
598
- const t = typeof input;
599
- if (t === "string")
600
- return `the string ${JSON.stringify(input).slice(0, 60)}`;
601
- if (t === "object")
602
- return "an object";
603
- if (t === "function")
604
- return "a function";
605
- if (typeof input === "symbol")
606
- return "a symbol";
607
- if (typeof input === "number" || typeof input === "bigint" || typeof input === "boolean")
608
- return `${t} ${String(input)}`;
609
- return t;
610
- }
611
- function fail(path, expected, input) {
612
- return err({ kind: "decode", path, expected, found: describe(input) });
613
- }
614
- function formatDecodeError(e) {
615
- return `${e.path}: expected ${e.expected}, found ${e.found}`;
616
- }
617
- var string = (input, path = "$") => typeof input === "string" ? ok(input) : fail(path, "a string", input);
618
- var number = (input, path = "$") => typeof input === "number" && Number.isFinite(input) ? ok(input) : fail(path, "a finite number", input);
619
- var integer = (input, path = "$") => typeof input === "number" && Number.isInteger(input) ? ok(input) : fail(path, "an integer", input);
620
- var boolean = (input, path = "$") => typeof input === "boolean" ? ok(input) : fail(path, "a boolean", input);
621
- var unknownValue = (input) => ok(input);
622
- function literal(...values) {
623
- return (input, path = "$") => typeof input === "string" && values.includes(input) ? ok(input) : fail(path, `one of ${values.join(", ")}`, input);
624
- }
625
- function nullable(inner) {
626
- return (input, path = "$") => input === null ? ok(null) : inner(input, path);
627
- }
628
- function array(element) {
629
- return (input, path = "$") => {
630
- if (!Array.isArray(input))
631
- return fail(path, "an array", input);
632
- const out = [];
633
- for (const [i, value] of input.entries()) {
634
- const r = element(value, `${path}[${i}]`);
635
- if (r.kind === "err")
636
- return r;
637
- out.push(r.value);
638
- }
639
- return ok(out);
640
- };
641
- }
642
- var isPlainObject = (input) => typeof input === "object" && input !== null && !Array.isArray(input);
643
- function record(value) {
644
- return (input, path = "$") => {
645
- if (!isPlainObject(input))
646
- return fail(path, "an object", input);
647
- const out = {};
648
- for (const key of Object.keys(input)) {
649
- const r = value(Reflect.get(input, key), `${path}.${key}`);
650
- if (r.kind === "err")
651
- return r;
652
- out[key] = r.value;
653
- }
654
- return ok(out);
655
- };
656
- }
657
- function object(required, optional) {
658
- return (input, path = "$") => {
659
- if (!isPlainObject(input))
660
- return fail(path, "an object", input);
661
- const out = {};
662
- for (const [key, decoder] of Object.entries(required)) {
663
- const r = decoder(Reflect.get(input, key), `${path}.${key}`);
664
- if (r.kind === "err")
665
- return r;
666
- out[key] = r.value;
667
- }
668
- for (const [key, decoder] of Object.entries(optional ?? {})) {
669
- const value = Reflect.get(input, key);
670
- if (value === undefined)
671
- continue;
672
- const r = decoder(value, `${path}.${key}`);
673
- if (r.kind === "err")
674
- return r;
675
- out[key] = r.value;
676
- }
677
- return ok(out);
678
- };
679
- }
680
- function tagged(alternatives) {
681
- return (input, path = "$") => {
682
- const kind = isPlainObject(input) ? Reflect.get(input, "kind") : undefined;
683
- const decoder = typeof kind === "string" && Object.hasOwn(alternatives, kind) ? alternatives[kind] : undefined;
684
- if (decoder === undefined)
685
- return fail(`${path}.kind`, `one of ${Object.keys(alternatives).join(", ")}`, kind);
686
- return decoder(input, path);
687
- };
688
- }
689
- function oneOf(...alternatives) {
690
- return (input, path = "$") => {
691
- for (const decoder of alternatives) {
692
- const r = decoder(input, path);
693
- if (r.kind === "ok")
694
- return r;
695
- }
696
- return fail(path, `one of ${alternatives.length} alternatives`, input);
697
- };
698
- }
699
- function mapDecoder(base, f) {
700
- return (input, path = "$") => {
701
- const r = base(input, path);
702
- return r.kind === "ok" ? ok(f(r.value)) : r;
703
- };
704
- }
705
- function refine(base, name, valid) {
706
- return (input, path = "$") => {
707
- const r = base(input, path);
708
- if (r.kind === "err")
709
- return r;
710
- return valid(r.value) ? ok(r.value) : fail(path, `a ${name}`, input);
711
- };
712
- }
713
- function json(text, decoder) {
714
- let value;
715
- try {
716
- value = JSON.parse(text);
717
- } catch (e) {
718
- return err({ kind: "decode", path: "$", expected: "JSON", found: e instanceof Error ? e.message : String(e) });
719
- }
720
- return decoder(value);
721
- }
722
-
723
724
  // ../ts/kernel/grc.ts
724
725
  var INSTANT = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:[.,](\d{1,9}))?(Z|[+-]\d{2}:\d{2})$/i;
725
726
  var CANONICAL_INSTANT = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;
@@ -1205,8 +1206,6 @@ var ver = (major, minor, patch, pre) => ({
1205
1206
  });
1206
1207
  var at = (op, version) => ({ op, version });
1207
1208
  var NOTHING = [at("<", ver(0, 0, 0, "0"))];
1208
- // ../ts/kernel/text.ts
1209
- var ANSI = new RegExp(`${String.fromCharCode(27)}\\[[0-9;?]*[A-Za-z]`, "g");
1210
1209
  // ../ts/kernel/oscal.ts
1211
1210
  var OPEN_OUTCOMES = new Set(["fail", "warn", "gap", "error", "accepted"]);
1212
1211
  // ../ts/kernel/otel.ts
@@ -5094,7 +5093,7 @@ function checkFiles(files, repositories) {
5094
5093
  }
5095
5094
 
5096
5095
  // src/state-record.ts
5097
- var ERGONEX_VERSION = "0.2.6";
5096
+ var ERGONEX_VERSION = "0.3.0";
5098
5097
  var STATE_RECORD_PATH = ".ergonex/state.auto.json";
5099
5098
  var EMPTY_RECORD = {
5100
5099
  ergonex: ERGONEX_VERSION,
package/package.json CHANGED
@@ -1,20 +1,32 @@
1
1
  {
2
2
  "name": "@intellectual-frontiers/ergonex",
3
- "version": "0.2.6",
3
+ "version": "0.3.0",
4
4
  "description": "Ergonex, the workspaces management of Intellectual Frontiers: one command that sets up, configures and operates a team's software repositories, package registries and builds, on Windows, macOS and Linux, with Bun by default and Node 26 as the backup.",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
+ "engines": {
8
+ "node": ">=26"
9
+ },
10
+ "sideEffects": false,
7
11
  "bin": {
8
12
  "ergonex": "./ergonex.mjs"
9
13
  },
10
- "engines": {
11
- "node": ">=26"
14
+ "types": "./dist/mod.d.ts",
15
+ "exports": {
16
+ ".": {
17
+ "types": "./dist/mod.d.ts",
18
+ "default": "./dist/mod.js"
19
+ }
20
+ },
21
+ "dependencies": {
22
+ "@intellectual-frontiers/core": "0.1.0"
12
23
  },
13
24
  "files": [
25
+ "dist",
14
26
  "ergonex.mjs",
15
27
  "README.md",
16
- "CREDITS.md",
17
- "LICENSE"
28
+ "LICENSE",
29
+ "CREDITS.md"
18
30
  ],
19
31
  "repository": {
20
32
  "type": "git",