@uapkg/registry-tools 1.3.0 → 1.3.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 (73) hide show
  1. package/dist/aggregator/RegistryToolsAggregator.d.ts +31 -28
  2. package/dist/aggregator/RegistryToolsAggregator.d.ts.map +1 -1
  3. package/dist/aggregator/RegistryToolsAggregator.js +71 -73
  4. package/dist/aggregator/RegistryToolsAggregator.js.map +1 -1
  5. package/dist/contracts/RegistryToolsTypes.d.ts +101 -98
  6. package/dist/contracts/RegistryToolsTypes.d.ts.map +1 -1
  7. package/dist/contracts/RegistryToolsTypes.js +5 -4
  8. package/dist/contracts/RegistryToolsTypes.js.map +1 -1
  9. package/dist/index.d.ts +18 -18
  10. package/dist/index.js +18 -30
  11. package/dist/io/IntegrityCalculator.d.ts +16 -13
  12. package/dist/io/IntegrityCalculator.d.ts.map +1 -1
  13. package/dist/io/IntegrityCalculator.js +96 -92
  14. package/dist/io/IntegrityCalculator.js.map +1 -1
  15. package/dist/io/ManifestStore.d.ts +31 -28
  16. package/dist/io/ManifestStore.d.ts.map +1 -1
  17. package/dist/io/ManifestStore.js +127 -124
  18. package/dist/io/ManifestStore.js.map +1 -1
  19. package/dist/listing/PackageLister.d.ts +18 -15
  20. package/dist/listing/PackageLister.d.ts.map +1 -1
  21. package/dist/listing/PackageLister.js +75 -77
  22. package/dist/listing/PackageLister.js.map +1 -1
  23. package/dist/mutation/AddPackageVersionPlanner.d.ts +18 -15
  24. package/dist/mutation/AddPackageVersionPlanner.d.ts.map +1 -1
  25. package/dist/mutation/AddPackageVersionPlanner.js +110 -117
  26. package/dist/mutation/AddPackageVersionPlanner.js.map +1 -1
  27. package/dist/mutation/RemovePackagePlanner.d.ts +15 -12
  28. package/dist/mutation/RemovePackagePlanner.d.ts.map +1 -1
  29. package/dist/mutation/RemovePackagePlanner.js +45 -37
  30. package/dist/mutation/RemovePackagePlanner.js.map +1 -1
  31. package/dist/mutation/RemovePackageVersionPlanner.d.ts +15 -12
  32. package/dist/mutation/RemovePackageVersionPlanner.d.ts.map +1 -1
  33. package/dist/mutation/RemovePackageVersionPlanner.js +60 -52
  34. package/dist/mutation/RemovePackageVersionPlanner.js.map +1 -1
  35. package/dist/mutation/VersionSorter.d.ts +4 -1
  36. package/dist/mutation/VersionSorter.d.ts.map +1 -1
  37. package/dist/mutation/VersionSorter.js +24 -24
  38. package/dist/mutation/VersionSorter.js.map +1 -1
  39. package/dist/paths/RegistryRepoPaths.d.ts +15 -12
  40. package/dist/paths/RegistryRepoPaths.d.ts.map +1 -1
  41. package/dist/paths/RegistryRepoPaths.js +38 -33
  42. package/dist/paths/RegistryRepoPaths.js.map +1 -1
  43. package/dist/tools/RegistryTools.d.ts +53 -50
  44. package/dist/tools/RegistryTools.d.ts.map +1 -1
  45. package/dist/tools/RegistryTools.js +205 -220
  46. package/dist/tools/RegistryTools.js.map +1 -1
  47. package/dist/validation/DependencyReachabilityValidator.d.ts +15 -12
  48. package/dist/validation/DependencyReachabilityValidator.d.ts.map +1 -1
  49. package/dist/validation/DependencyReachabilityValidator.js +62 -55
  50. package/dist/validation/DependencyReachabilityValidator.js.map +1 -1
  51. package/dist/validation/ExternalRegistryPolicyValidator.d.ts +13 -10
  52. package/dist/validation/ExternalRegistryPolicyValidator.d.ts.map +1 -1
  53. package/dist/validation/ExternalRegistryPolicyValidator.js +63 -63
  54. package/dist/validation/ExternalRegistryPolicyValidator.js.map +1 -1
  55. package/dist/validation/ManifestValidator.d.ts +11 -8
  56. package/dist/validation/ManifestValidator.d.ts.map +1 -1
  57. package/dist/validation/ManifestValidator.js +29 -24
  58. package/dist/validation/ManifestValidator.js.map +1 -1
  59. package/dist/validation/OfficialRegistryPolicyValidator.d.ts +18 -15
  60. package/dist/validation/OfficialRegistryPolicyValidator.d.ts.map +1 -1
  61. package/dist/validation/OfficialRegistryPolicyValidator.js +80 -89
  62. package/dist/validation/OfficialRegistryPolicyValidator.js.map +1 -1
  63. package/dist/validation/RegistryValidator.d.ts +25 -22
  64. package/dist/validation/RegistryValidator.d.ts.map +1 -1
  65. package/dist/validation/RegistryValidator.js +89 -87
  66. package/dist/validation/RegistryValidator.js.map +1 -1
  67. package/dist/validation/ReleaseFileNameValidator.d.ts +12 -9
  68. package/dist/validation/ReleaseFileNameValidator.d.ts.map +1 -1
  69. package/dist/validation/ReleaseFileNameValidator.js +36 -29
  70. package/dist/validation/ReleaseFileNameValidator.js.map +1 -1
  71. package/package.json +19 -21
  72. package/dist/index.d.ts.map +0 -1
  73. package/dist/index.js.map +0 -1
@@ -1,4 +1,5 @@
1
- import type { Diagnostic, DiagnosticLevel } from '@uapkg/diagnostics';
1
+ import { Diagnostic, DiagnosticLevel } from "@uapkg/diagnostics";
2
+ //#region src/aggregator/RegistryToolsAggregator.d.ts
2
3
  /**
3
4
  * Process-wide aggregator for all diagnostics emitted by `@uapkg/registry-tools`.
4
5
  *
@@ -11,33 +12,35 @@ import type { Diagnostic, DiagnosticLevel } from '@uapkg/diagnostics';
11
12
  * This is a true singleton — instantiating multiple `RegistryTools` objects in
12
13
  * the same process all push into the same aggregator.
13
14
  */
14
- export declare class RegistryToolsAggregator {
15
- private static instance;
16
- private readonly items;
17
- private readonly seenFingerprints;
18
- /** Get (or lazily create) the process-wide singleton aggregator. */
19
- static getInstance(): RegistryToolsAggregator;
20
- /** Replace the singleton — primarily intended for tests. */
21
- static resetForTests(): void;
22
- /**
23
- * Add a diagnostic to the aggregator.
24
- *
25
- * If the diagnostic uses `emitPolicy: 'once'` and a matching fingerprint has
26
- * already been recorded, the call is a no-op and the method returns `false`.
27
- */
28
- add(diagnostic: Diagnostic): boolean;
29
- /** Add many diagnostics. */
30
- addMany(diagnostics: readonly Diagnostic[]): void;
31
- /** All diagnostics collected so far, in insertion order. */
32
- all(): readonly Diagnostic[];
33
- /** Diagnostics filtered by level. */
34
- byLevel(level: DiagnosticLevel): readonly Diagnostic[];
35
- errors(): readonly Diagnostic[];
36
- warnings(): readonly Diagnostic[];
37
- hasErrors(): boolean;
38
- /** Wipe collected diagnostics. */
39
- clear(): void;
15
+ declare class RegistryToolsAggregator {
16
+ private static instance;
17
+ private readonly items;
18
+ private readonly seenFingerprints;
19
+ /** Get (or lazily create) the process-wide singleton aggregator. */
20
+ static getInstance(): RegistryToolsAggregator;
21
+ /** Replace the singleton — primarily intended for tests. */
22
+ static resetForTests(): void;
23
+ /**
24
+ * Add a diagnostic to the aggregator.
25
+ *
26
+ * If the diagnostic uses `emitPolicy: 'once'` and a matching fingerprint has
27
+ * already been recorded, the call is a no-op and the method returns `false`.
28
+ */
29
+ add(diagnostic: Diagnostic): boolean;
30
+ /** Add many diagnostics. */
31
+ addMany(diagnostics: readonly Diagnostic[]): void;
32
+ /** All diagnostics collected so far, in insertion order. */
33
+ all(): readonly Diagnostic[];
34
+ /** Diagnostics filtered by level. */
35
+ byLevel(level: DiagnosticLevel): readonly Diagnostic[];
36
+ errors(): readonly Diagnostic[];
37
+ warnings(): readonly Diagnostic[];
38
+ hasErrors(): boolean;
39
+ /** Wipe collected diagnostics. */
40
+ clear(): void;
40
41
  }
41
42
  /** Convenience accessor for the process-wide singleton. */
42
- export declare function getRegistryToolsAggregator(): RegistryToolsAggregator;
43
+ declare function getRegistryToolsAggregator(): RegistryToolsAggregator;
44
+ //#endregion
45
+ export { RegistryToolsAggregator, getRegistryToolsAggregator };
43
46
  //# sourceMappingURL=RegistryToolsAggregator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RegistryToolsAggregator.d.ts","sourceRoot":"","sources":["../../src/aggregator/RegistryToolsAggregator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAEtE;;;;;;;;;;;GAWG;AACH,qBAAa,uBAAuB;IAClC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAsC;IAE7D,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAoB;IAC1C,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAqB;IAEtD,oEAAoE;IACpE,MAAM,CAAC,WAAW,IAAI,uBAAuB;IAO7C,4DAA4D;IAC5D,MAAM,CAAC,aAAa,IAAI,IAAI;IAI5B;;;;;OAKG;IACH,GAAG,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO;IAWpC,4BAA4B;IAC5B,OAAO,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,GAAG,IAAI;IAMjD,4DAA4D;IAC5D,GAAG,IAAI,SAAS,UAAU,EAAE;IAI5B,qCAAqC;IACrC,OAAO,CAAC,KAAK,EAAE,eAAe,GAAG,SAAS,UAAU,EAAE;IAItD,MAAM,IAAI,SAAS,UAAU,EAAE;IAI/B,QAAQ,IAAI,SAAS,UAAU,EAAE;IAIjC,SAAS,IAAI,OAAO;IAIpB,kCAAkC;IAClC,KAAK,IAAI,IAAI;CAId;AAED,2DAA2D;AAC3D,wBAAgB,0BAA0B,IAAI,uBAAuB,CAEpE"}
1
+ {"version":3,"file":"RegistryToolsAggregator.d.ts","names":[],"sources":["../../src/aggregator/RegistryToolsAggregator.ts"],"mappings":";;;;;;;;;;;;;;cAca;iBACI;mBAEE;mBACA;;SAGV,eAAe;;SAQf;;;;;;;EAUP,IAAI,YAAY;;EAYhB,QAAQ,sBAAsB;;EAO9B,gBAAgB;;EAKhB,QAAQ,OAAO,2BAA2B;EAI1C,mBAAmB;EAInB,qBAAqB;EAIrB;;EAKA;;;iBAOc,8BAA8B"}
@@ -1,77 +1,75 @@
1
+ //#region src/aggregator/RegistryToolsAggregator.ts
1
2
  /**
2
- * Process-wide aggregator for all diagnostics emitted by `@uapkg/registry-tools`.
3
- *
4
- * Goals:
5
- * - Single source of truth for CI consumers that want one consolidated list of
6
- * warnings and errors across an entire run.
7
- * - Plan-then-apply flows do not double-report: diagnostics with
8
- * `emitPolicy: 'once'` are deduplicated by their stable `emitFingerprint`.
9
- *
10
- * This is a true singleton — instantiating multiple `RegistryTools` objects in
11
- * the same process all push into the same aggregator.
12
- */
13
- export class RegistryToolsAggregator {
14
- static instance;
15
- items = [];
16
- seenFingerprints = new Set();
17
- /** Get (or lazily create) the process-wide singleton aggregator. */
18
- static getInstance() {
19
- if (!RegistryToolsAggregator.instance) {
20
- RegistryToolsAggregator.instance = new RegistryToolsAggregator();
21
- }
22
- return RegistryToolsAggregator.instance;
23
- }
24
- /** Replace the singleton — primarily intended for tests. */
25
- static resetForTests() {
26
- RegistryToolsAggregator.instance = new RegistryToolsAggregator();
27
- }
28
- /**
29
- * Add a diagnostic to the aggregator.
30
- *
31
- * If the diagnostic uses `emitPolicy: 'once'` and a matching fingerprint has
32
- * already been recorded, the call is a no-op and the method returns `false`.
33
- */
34
- add(diagnostic) {
35
- if (diagnostic.emitPolicy === 'once' && diagnostic.emitFingerprint) {
36
- if (this.seenFingerprints.has(diagnostic.emitFingerprint)) {
37
- return false;
38
- }
39
- this.seenFingerprints.add(diagnostic.emitFingerprint);
40
- }
41
- this.items.push(diagnostic);
42
- return true;
43
- }
44
- /** Add many diagnostics. */
45
- addMany(diagnostics) {
46
- for (const d of diagnostics) {
47
- this.add(d);
48
- }
49
- }
50
- /** All diagnostics collected so far, in insertion order. */
51
- all() {
52
- return this.items;
53
- }
54
- /** Diagnostics filtered by level. */
55
- byLevel(level) {
56
- return this.items.filter((d) => d.level === level);
57
- }
58
- errors() {
59
- return this.byLevel('error');
60
- }
61
- warnings() {
62
- return this.byLevel('warning');
63
- }
64
- hasErrors() {
65
- return this.items.some((d) => d.level === 'error');
66
- }
67
- /** Wipe collected diagnostics. */
68
- clear() {
69
- this.items.length = 0;
70
- this.seenFingerprints.clear();
71
- }
72
- }
3
+ * Process-wide aggregator for all diagnostics emitted by `@uapkg/registry-tools`.
4
+ *
5
+ * Goals:
6
+ * - Single source of truth for CI consumers that want one consolidated list of
7
+ * warnings and errors across an entire run.
8
+ * - Plan-then-apply flows do not double-report: diagnostics with
9
+ * `emitPolicy: 'once'` are deduplicated by their stable `emitFingerprint`.
10
+ *
11
+ * This is a true singleton — instantiating multiple `RegistryTools` objects in
12
+ * the same process all push into the same aggregator.
13
+ */
14
+ var RegistryToolsAggregator = class RegistryToolsAggregator {
15
+ static instance;
16
+ items = [];
17
+ seenFingerprints = /* @__PURE__ */ new Set();
18
+ /** Get (or lazily create) the process-wide singleton aggregator. */
19
+ static getInstance() {
20
+ if (!RegistryToolsAggregator.instance) RegistryToolsAggregator.instance = new RegistryToolsAggregator();
21
+ return RegistryToolsAggregator.instance;
22
+ }
23
+ /** Replace the singleton — primarily intended for tests. */
24
+ static resetForTests() {
25
+ RegistryToolsAggregator.instance = new RegistryToolsAggregator();
26
+ }
27
+ /**
28
+ * Add a diagnostic to the aggregator.
29
+ *
30
+ * If the diagnostic uses `emitPolicy: 'once'` and a matching fingerprint has
31
+ * already been recorded, the call is a no-op and the method returns `false`.
32
+ */
33
+ add(diagnostic) {
34
+ if (diagnostic.emitPolicy === "once" && diagnostic.emitFingerprint) {
35
+ if (this.seenFingerprints.has(diagnostic.emitFingerprint)) return false;
36
+ this.seenFingerprints.add(diagnostic.emitFingerprint);
37
+ }
38
+ this.items.push(diagnostic);
39
+ return true;
40
+ }
41
+ /** Add many diagnostics. */
42
+ addMany(diagnostics) {
43
+ for (const d of diagnostics) this.add(d);
44
+ }
45
+ /** All diagnostics collected so far, in insertion order. */
46
+ all() {
47
+ return this.items;
48
+ }
49
+ /** Diagnostics filtered by level. */
50
+ byLevel(level) {
51
+ return this.items.filter((d) => d.level === level);
52
+ }
53
+ errors() {
54
+ return this.byLevel("error");
55
+ }
56
+ warnings() {
57
+ return this.byLevel("warning");
58
+ }
59
+ hasErrors() {
60
+ return this.items.some((d) => d.level === "error");
61
+ }
62
+ /** Wipe collected diagnostics. */
63
+ clear() {
64
+ this.items.length = 0;
65
+ this.seenFingerprints.clear();
66
+ }
67
+ };
73
68
  /** Convenience accessor for the process-wide singleton. */
74
- export function getRegistryToolsAggregator() {
75
- return RegistryToolsAggregator.getInstance();
69
+ function getRegistryToolsAggregator() {
70
+ return RegistryToolsAggregator.getInstance();
76
71
  }
72
+
73
+ //#endregion
74
+ export { RegistryToolsAggregator, getRegistryToolsAggregator };
77
75
  //# sourceMappingURL=RegistryToolsAggregator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RegistryToolsAggregator.js","sourceRoot":"","sources":["../../src/aggregator/RegistryToolsAggregator.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,uBAAuB;IAC1B,MAAM,CAAC,QAAQ,CAAsC;IAE5C,KAAK,GAAiB,EAAE,CAAC;IACzB,gBAAgB,GAAG,IAAI,GAAG,EAAU,CAAC;IAEtD,oEAAoE;IACpE,MAAM,CAAC,WAAW;QAChB,IAAI,CAAC,uBAAuB,CAAC,QAAQ,EAAE,CAAC;YACtC,uBAAuB,CAAC,QAAQ,GAAG,IAAI,uBAAuB,EAAE,CAAC;QACnE,CAAC;QACD,OAAO,uBAAuB,CAAC,QAAQ,CAAC;IAC1C,CAAC;IAED,4DAA4D;IAC5D,MAAM,CAAC,aAAa;QAClB,uBAAuB,CAAC,QAAQ,GAAG,IAAI,uBAAuB,EAAE,CAAC;IACnE,CAAC;IAED;;;;;OAKG;IACH,GAAG,CAAC,UAAsB;QACxB,IAAI,UAAU,CAAC,UAAU,KAAK,MAAM,IAAI,UAAU,CAAC,eAAe,EAAE,CAAC;YACnE,IAAI,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE,CAAC;gBAC1D,OAAO,KAAK,CAAC;YACf,CAAC;YACD,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;QACxD,CAAC;QACD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,4BAA4B;IAC5B,OAAO,CAAC,WAAkC;QACxC,KAAK,MAAM,CAAC,IAAI,WAAW,EAAE,CAAC;YAC5B,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QACd,CAAC;IACH,CAAC;IAED,4DAA4D;IAC5D,GAAG;QACD,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,qCAAqC;IACrC,OAAO,CAAC,KAAsB;QAC5B,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC;IACrD,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/B,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACjC,CAAC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,OAAO,CAAC,CAAC;IACrD,CAAC;IAED,kCAAkC;IAClC,KAAK;QACH,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;QACtB,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,CAAC;IAChC,CAAC;CACF;AAED,2DAA2D;AAC3D,MAAM,UAAU,0BAA0B;IACxC,OAAO,uBAAuB,CAAC,WAAW,EAAE,CAAC;AAC/C,CAAC"}
1
+ {"version":3,"file":"RegistryToolsAggregator.js","names":[],"sources":["../../src/aggregator/RegistryToolsAggregator.ts"],"sourcesContent":["import type { Diagnostic, DiagnosticLevel } from '@uapkg/diagnostics';\n\n/**\n * Process-wide aggregator for all diagnostics emitted by `@uapkg/registry-tools`.\n *\n * Goals:\n * - Single source of truth for CI consumers that want one consolidated list of\n * warnings and errors across an entire run.\n * - Plan-then-apply flows do not double-report: diagnostics with\n * `emitPolicy: 'once'` are deduplicated by their stable `emitFingerprint`.\n *\n * This is a true singleton — instantiating multiple `RegistryTools` objects in\n * the same process all push into the same aggregator.\n */\nexport class RegistryToolsAggregator {\n private static instance: RegistryToolsAggregator | undefined;\n\n private readonly items: Diagnostic[] = [];\n private readonly seenFingerprints = new Set<string>();\n\n /** Get (or lazily create) the process-wide singleton aggregator. */\n static getInstance(): RegistryToolsAggregator {\n if (!RegistryToolsAggregator.instance) {\n RegistryToolsAggregator.instance = new RegistryToolsAggregator();\n }\n return RegistryToolsAggregator.instance;\n }\n\n /** Replace the singleton — primarily intended for tests. */\n static resetForTests(): void {\n RegistryToolsAggregator.instance = new RegistryToolsAggregator();\n }\n\n /**\n * Add a diagnostic to the aggregator.\n *\n * If the diagnostic uses `emitPolicy: 'once'` and a matching fingerprint has\n * already been recorded, the call is a no-op and the method returns `false`.\n */\n add(diagnostic: Diagnostic): boolean {\n if (diagnostic.emitPolicy === 'once' && diagnostic.emitFingerprint) {\n if (this.seenFingerprints.has(diagnostic.emitFingerprint)) {\n return false;\n }\n this.seenFingerprints.add(diagnostic.emitFingerprint);\n }\n this.items.push(diagnostic);\n return true;\n }\n\n /** Add many diagnostics. */\n addMany(diagnostics: readonly Diagnostic[]): void {\n for (const d of diagnostics) {\n this.add(d);\n }\n }\n\n /** All diagnostics collected so far, in insertion order. */\n all(): readonly Diagnostic[] {\n return this.items;\n }\n\n /** Diagnostics filtered by level. */\n byLevel(level: DiagnosticLevel): readonly Diagnostic[] {\n return this.items.filter((d) => d.level === level);\n }\n\n errors(): readonly Diagnostic[] {\n return this.byLevel('error');\n }\n\n warnings(): readonly Diagnostic[] {\n return this.byLevel('warning');\n }\n\n hasErrors(): boolean {\n return this.items.some((d) => d.level === 'error');\n }\n\n /** Wipe collected diagnostics. */\n clear(): void {\n this.items.length = 0;\n this.seenFingerprints.clear();\n }\n}\n\n/** Convenience accessor for the process-wide singleton. */\nexport function getRegistryToolsAggregator(): RegistryToolsAggregator {\n return RegistryToolsAggregator.getInstance();\n}\n"],"mappings":";;;;;;;;;;;;;AAcA,IAAa,0BAAb,MAAa,wBAAwB;CACnC,OAAe;CAEf,AAAiB,QAAsB,CAAC;CACxC,AAAiB,mCAAmB,IAAI,IAAY;;CAGpD,OAAO,cAAuC;EAC5C,IAAI,CAAC,wBAAwB,UAC3B,wBAAwB,WAAW,IAAI,wBAAwB;EAEjE,OAAO,wBAAwB;CACjC;;CAGA,OAAO,gBAAsB;EAC3B,wBAAwB,WAAW,IAAI,wBAAwB;CACjE;;;;;;;CAQA,IAAI,YAAiC;EACnC,IAAI,WAAW,eAAe,UAAU,WAAW,iBAAiB;GAClE,IAAI,KAAK,iBAAiB,IAAI,WAAW,eAAe,GACtD,OAAO;GAET,KAAK,iBAAiB,IAAI,WAAW,eAAe;EACtD;EACA,KAAK,MAAM,KAAK,UAAU;EAC1B,OAAO;CACT;;CAGA,QAAQ,aAA0C;EAChD,KAAK,MAAM,KAAK,aACd,KAAK,IAAI,CAAC;CAEd;;CAGA,MAA6B;EAC3B,OAAO,KAAK;CACd;;CAGA,QAAQ,OAA+C;EACrD,OAAO,KAAK,MAAM,QAAQ,MAAM,EAAE,UAAU,KAAK;CACnD;CAEA,SAAgC;EAC9B,OAAO,KAAK,QAAQ,OAAO;CAC7B;CAEA,WAAkC;EAChC,OAAO,KAAK,QAAQ,SAAS;CAC/B;CAEA,YAAqB;EACnB,OAAO,KAAK,MAAM,MAAM,MAAM,EAAE,UAAU,OAAO;CACnD;;CAGA,QAAc;EACZ,KAAK,MAAM,SAAS;EACpB,KAAK,iBAAiB,MAAM;CAC9B;AACF;;AAGA,SAAgB,6BAAsD;CACpE,OAAO,wBAAwB,YAAY;AAC7C"}
@@ -1,114 +1,117 @@
1
- import type { PackageName, PackageVersion } from '@uapkg/common-schema';
2
- import type { Diagnostic } from '@uapkg/diagnostics';
3
- import type { Integrity, PackageRegistryManifest, PackageSource, RegistryVersion } from '@uapkg/registry-schema';
4
- export type ExternalRegistryPolicyMode = 'deny' | 'allow-listed' | 'allow-any';
5
- export type RemovalsPolicyMode = 'deny' | 'allow-version-remove' | 'allow-package-remove';
6
- export type UnknownKeysPolicyMode = 'ignore' | 'warn' | 'error';
7
- export interface RegistryToolsPolicy {
8
- readonly externalRegistries?: ExternalRegistryPolicyMode;
9
- readonly allowedExternalRegistryNames?: readonly string[];
10
- readonly removals?: RemovalsPolicyMode;
11
- readonly unknownKeys?: UnknownKeysPolicyMode;
12
- readonly requireExistingDependencies?: boolean;
13
- readonly requireReachableDependencyRanges?: boolean;
14
- readonly requireSortedVersions?: boolean;
1
+ import { Diagnostic } from "@uapkg/diagnostics";
2
+ import { Integrity, PackageRegistryManifest, PackageSource, RegistryVersion } from "@uapkg/registry-schema";
3
+ import { PackageName, PackageVersion } from "@uapkg/common-schema";
4
+ //#region src/contracts/RegistryToolsTypes.d.ts
5
+ type ExternalRegistryPolicyMode = 'deny' | 'allow-listed' | 'allow-any';
6
+ type RemovalsPolicyMode = 'deny' | 'allow-version-remove' | 'allow-package-remove';
7
+ type UnknownKeysPolicyMode = 'ignore' | 'warn' | 'error';
8
+ interface RegistryToolsPolicy {
9
+ readonly externalRegistries?: ExternalRegistryPolicyMode;
10
+ readonly allowedExternalRegistryNames?: readonly string[];
11
+ readonly removals?: RemovalsPolicyMode;
12
+ readonly unknownKeys?: UnknownKeysPolicyMode;
13
+ readonly requireExistingDependencies?: boolean;
14
+ readonly requireReachableDependencyRanges?: boolean;
15
+ readonly requireSortedVersions?: boolean;
15
16
  }
16
17
  /** Fully resolved policy with defaults applied. */
17
- export type ResolvedRegistryToolsPolicy = Required<RegistryToolsPolicy>;
18
- export interface RegistryToolsOptions {
19
- /** Root directory of the registry repo (NOT a package directory). */
20
- readonly cwd: string;
21
- readonly policy?: RegistryToolsPolicy;
22
- }
23
- export interface PackageSummary {
24
- readonly name: PackageName;
25
- readonly manifestPath: string;
26
- readonly versionCount: number;
27
- }
28
- export interface WriteManifestResult {
29
- readonly manifestPath: string;
30
- readonly bytesWritten: number;
31
- }
32
- export interface WriteResult {
18
+ type ResolvedRegistryToolsPolicy = Required<RegistryToolsPolicy>;
19
+ interface RegistryToolsOptions {
20
+ /** Root directory of the registry repo (NOT a package directory). */
21
+ readonly cwd: string;
22
+ readonly policy?: RegistryToolsPolicy;
23
+ }
24
+ interface PackageSummary {
25
+ readonly name: PackageName;
26
+ readonly manifestPath: string;
27
+ readonly versionCount: number;
28
+ }
29
+ interface WriteManifestResult {
30
+ readonly manifestPath: string;
31
+ readonly bytesWritten: number;
32
+ }
33
+ interface WriteResult {
34
+ readonly path: string;
35
+ readonly bytesWritten: number;
36
+ }
37
+ interface RegistryVersionValidationReport {
38
+ readonly packageName: PackageName;
39
+ readonly version: PackageVersion;
40
+ readonly diagnostics: readonly Diagnostic[];
41
+ }
42
+ interface PackageValidationReport {
43
+ readonly packageName: PackageName;
44
+ readonly manifestPath: string;
45
+ readonly diagnostics: readonly Diagnostic[];
46
+ }
47
+ interface RegistryValidationReport {
48
+ readonly packageReports: readonly PackageValidationReport[];
49
+ readonly diagnostics: readonly Diagnostic[];
50
+ }
51
+ interface RegistryLintReport {
52
+ readonly diagnostics: readonly Diagnostic[];
53
+ }
54
+ interface ChangedManifestValidation {
55
+ readonly perFile: readonly {
33
56
  readonly path: string;
34
- readonly bytesWritten: number;
35
- }
36
- export interface RegistryVersionValidationReport {
37
- readonly packageName: PackageName;
38
- readonly version: PackageVersion;
39
- readonly diagnostics: readonly Diagnostic[];
40
- }
41
- export interface PackageValidationReport {
42
- readonly packageName: PackageName;
43
- readonly manifestPath: string;
44
- readonly diagnostics: readonly Diagnostic[];
45
- }
46
- export interface RegistryValidationReport {
47
- readonly packageReports: readonly PackageValidationReport[];
48
57
  readonly diagnostics: readonly Diagnostic[];
58
+ }[];
49
59
  }
50
- export interface RegistryLintReport {
51
- readonly diagnostics: readonly Diagnostic[];
52
- }
53
- export interface ChangedManifestValidation {
54
- readonly perFile: readonly {
55
- readonly path: string;
56
- readonly diagnostics: readonly Diagnostic[];
57
- }[];
60
+ interface DependencyValidationReport {
61
+ readonly packageName: PackageName;
62
+ readonly version: PackageVersion;
63
+ readonly diagnostics: readonly Diagnostic[];
58
64
  }
59
- export interface DependencyValidationReport {
60
- readonly packageName: PackageName;
61
- readonly version: PackageVersion;
62
- readonly diagnostics: readonly Diagnostic[];
63
- }
64
- export interface ExternalRegistryPolicyReport {
65
- readonly diagnostics: readonly Diagnostic[];
65
+ interface ExternalRegistryPolicyReport {
66
+ readonly diagnostics: readonly Diagnostic[];
66
67
  }
67
- export interface ReleaseFileNameReport {
68
- readonly diagnostics: readonly Diagnostic[];
68
+ interface ReleaseFileNameReport {
69
+ readonly diagnostics: readonly Diagnostic[];
69
70
  }
70
- export interface OfficialPackagePolicyReport {
71
- readonly diagnostics: readonly Diagnostic[];
71
+ interface OfficialPackagePolicyReport {
72
+ readonly diagnostics: readonly Diagnostic[];
72
73
  }
73
- export interface AddPackageVersionRequest {
74
- readonly packageName: PackageName;
75
- readonly version: PackageVersion;
76
- readonly packageSource: PackageSource;
77
- readonly registryVersion: RegistryVersion;
78
- readonly createPackageManifestIfMissing?: boolean;
79
- readonly overwriteExistingVersion?: boolean;
74
+ interface AddPackageVersionRequest {
75
+ readonly packageName: PackageName;
76
+ readonly version: PackageVersion;
77
+ readonly packageSource: PackageSource;
78
+ readonly registryVersion: RegistryVersion;
79
+ readonly createPackageManifestIfMissing?: boolean;
80
+ readonly overwriteExistingVersion?: boolean;
80
81
  }
81
- export interface RemovePackageVersionRequest {
82
- readonly packageName: PackageName;
83
- readonly version: PackageVersion;
82
+ interface RemovePackageVersionRequest {
83
+ readonly packageName: PackageName;
84
+ readonly version: PackageVersion;
84
85
  }
85
- export interface RemovePackageRequest {
86
- readonly packageName: PackageName;
86
+ interface RemovePackageRequest {
87
+ readonly packageName: PackageName;
87
88
  }
88
- export type RegistryMutationOperation = {
89
- readonly kind: 'create-manifest';
90
- readonly path: string;
89
+ type RegistryMutationOperation = {
90
+ readonly kind: 'create-manifest';
91
+ readonly path: string;
91
92
  } | {
92
- readonly kind: 'update-manifest';
93
- readonly path: string;
93
+ readonly kind: 'update-manifest';
94
+ readonly path: string;
94
95
  } | {
95
- readonly kind: 'delete-manifest';
96
- readonly path: string;
96
+ readonly kind: 'delete-manifest';
97
+ readonly path: string;
97
98
  };
98
- export interface RegistryMutationPlan {
99
- readonly operations: readonly RegistryMutationOperation[];
100
- readonly nextManifest?: PackageRegistryManifest;
101
- readonly diagnostics: readonly Diagnostic[];
102
- }
103
- export interface RegistryMutationSummary {
104
- readonly operations: readonly RegistryMutationOperation[];
105
- readonly diagnostics: readonly Diagnostic[];
106
- }
107
- export type IntegrityAlgorithm = 'sha256' | 'sha512';
108
- export interface IntegrityVerificationResult {
109
- readonly ok: boolean;
110
- readonly actual: Integrity;
111
- readonly expected: Integrity;
112
- }
113
- export declare const REGISTRY_TOOLS_PACKAGES_DIR = "packages";
99
+ interface RegistryMutationPlan {
100
+ readonly operations: readonly RegistryMutationOperation[];
101
+ readonly nextManifest?: PackageRegistryManifest;
102
+ readonly diagnostics: readonly Diagnostic[];
103
+ }
104
+ interface RegistryMutationSummary {
105
+ readonly operations: readonly RegistryMutationOperation[];
106
+ readonly diagnostics: readonly Diagnostic[];
107
+ }
108
+ type IntegrityAlgorithm = 'sha256' | 'sha512';
109
+ interface IntegrityVerificationResult {
110
+ readonly ok: boolean;
111
+ readonly actual: Integrity;
112
+ readonly expected: Integrity;
113
+ }
114
+ declare const REGISTRY_TOOLS_PACKAGES_DIR = "packages";
115
+ //#endregion
116
+ export { AddPackageVersionRequest, ChangedManifestValidation, DependencyValidationReport, ExternalRegistryPolicyMode, ExternalRegistryPolicyReport, IntegrityAlgorithm, IntegrityVerificationResult, OfficialPackagePolicyReport, PackageSummary, PackageValidationReport, REGISTRY_TOOLS_PACKAGES_DIR, RegistryLintReport, RegistryMutationOperation, RegistryMutationPlan, RegistryMutationSummary, RegistryToolsOptions, RegistryToolsPolicy, RegistryValidationReport, RegistryVersionValidationReport, ReleaseFileNameReport, RemovalsPolicyMode, RemovePackageRequest, RemovePackageVersionRequest, ResolvedRegistryToolsPolicy, UnknownKeysPolicyMode, WriteManifestResult, WriteResult };
114
117
  //# sourceMappingURL=RegistryToolsTypes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RegistryToolsTypes.d.ts","sourceRoot":"","sources":["../../src/contracts/RegistryToolsTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,uBAAuB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAMjH,MAAM,MAAM,0BAA0B,GAAG,MAAM,GAAG,cAAc,GAAG,WAAW,CAAC;AAC/E,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,sBAAsB,GAAG,sBAAsB,CAAC;AAC1F,MAAM,MAAM,qBAAqB,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AAEhE,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,0BAA0B,CAAC;IACzD,QAAQ,CAAC,4BAA4B,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1D,QAAQ,CAAC,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IACvC,QAAQ,CAAC,WAAW,CAAC,EAAE,qBAAqB,CAAC;IAC7C,QAAQ,CAAC,2BAA2B,CAAC,EAAE,OAAO,CAAC;IAC/C,QAAQ,CAAC,gCAAgC,CAAC,EAAE,OAAO,CAAC;IACpD,QAAQ,CAAC,qBAAqB,CAAC,EAAE,OAAO,CAAC;CAC1C;AAED,mDAAmD;AACnD,MAAM,MAAM,2BAA2B,GAAG,QAAQ,CAAC,mBAAmB,CAAC,CAAC;AAExE,MAAM,WAAW,oBAAoB;IACnC,qEAAqE;IACrE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,MAAM,CAAC,EAAE,mBAAmB,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ACA;;UAGM;WACN,aAAa;WACb,SAAS;;UAGH;WACN,aAAa;;KAOZ;WACG;WAAkC;;WAClC;WAAkC;;WAClC;WAAkC;;UAEhC;WACN,qBAAqB;WACrB,eAAe;WACf,sBAAsB;;UAGhB;WACN,qBAAqB;WACrB,sBAAsB;;KAOrB;UAEK;WACN;WACA,QAAQ;WACR,UAAU;;cAOR"}
@@ -1,5 +1,6 @@
1
- // ---------------------------------------------------------------------------
2
- // Misc
3
- // ---------------------------------------------------------------------------
4
- export const REGISTRY_TOOLS_PACKAGES_DIR = 'packages';
1
+ //#region src/contracts/RegistryToolsTypes.ts
2
+ const REGISTRY_TOOLS_PACKAGES_DIR = "packages";
3
+
4
+ //#endregion
5
+ export { REGISTRY_TOOLS_PACKAGES_DIR };
5
6
  //# sourceMappingURL=RegistryToolsTypes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RegistryToolsTypes.js","sourceRoot":"","sources":["../../src/contracts/RegistryToolsTypes.ts"],"names":[],"mappings":"AA2JA,8EAA8E;AAC9E,OAAO;AACP,8EAA8E;AAE9E,MAAM,CAAC,MAAM,2BAA2B,GAAG,UAAU,CAAC"}
1
+ {"version":3,"file":"RegistryToolsTypes.js","names":[],"sources":["../../src/contracts/RegistryToolsTypes.ts"],"sourcesContent":["import type { PackageName, PackageVersion } from '@uapkg/common-schema';\nimport type { Diagnostic } from '@uapkg/diagnostics';\nimport type { Integrity, PackageRegistryManifest, PackageSource, RegistryVersion } from '@uapkg/registry-schema';\n\n// ---------------------------------------------------------------------------\n// Options & policy\n// ---------------------------------------------------------------------------\n\nexport type ExternalRegistryPolicyMode = 'deny' | 'allow-listed' | 'allow-any';\nexport type RemovalsPolicyMode = 'deny' | 'allow-version-remove' | 'allow-package-remove';\nexport type UnknownKeysPolicyMode = 'ignore' | 'warn' | 'error';\n\nexport interface RegistryToolsPolicy {\n readonly externalRegistries?: ExternalRegistryPolicyMode;\n readonly allowedExternalRegistryNames?: readonly string[];\n readonly removals?: RemovalsPolicyMode;\n readonly unknownKeys?: UnknownKeysPolicyMode;\n readonly requireExistingDependencies?: boolean;\n readonly requireReachableDependencyRanges?: boolean;\n readonly requireSortedVersions?: boolean;\n}\n\n/** Fully resolved policy with defaults applied. */\nexport type ResolvedRegistryToolsPolicy = Required<RegistryToolsPolicy>;\n\nexport interface RegistryToolsOptions {\n /** Root directory of the registry repo (NOT a package directory). */\n readonly cwd: string;\n readonly policy?: RegistryToolsPolicy;\n}\n\n// ---------------------------------------------------------------------------\n// Read / list results\n// ---------------------------------------------------------------------------\n\nexport interface PackageSummary {\n readonly name: PackageName;\n readonly manifestPath: string;\n readonly versionCount: number;\n}\n\nexport interface WriteManifestResult {\n readonly manifestPath: string;\n readonly bytesWritten: number;\n}\n\nexport interface WriteResult {\n readonly path: string;\n readonly bytesWritten: number;\n}\n\n// ---------------------------------------------------------------------------\n// Validation reports\n// ---------------------------------------------------------------------------\n\nexport interface RegistryVersionValidationReport {\n readonly packageName: PackageName;\n readonly version: PackageVersion;\n readonly diagnostics: readonly Diagnostic[];\n}\n\nexport interface PackageValidationReport {\n readonly packageName: PackageName;\n readonly manifestPath: string;\n readonly diagnostics: readonly Diagnostic[];\n}\n\nexport interface RegistryValidationReport {\n readonly packageReports: readonly PackageValidationReport[];\n readonly diagnostics: readonly Diagnostic[];\n}\n\nexport interface RegistryLintReport {\n readonly diagnostics: readonly Diagnostic[];\n}\n\nexport interface ChangedManifestValidation {\n readonly perFile: readonly {\n readonly path: string;\n readonly diagnostics: readonly Diagnostic[];\n }[];\n}\n\nexport interface DependencyValidationReport {\n readonly packageName: PackageName;\n readonly version: PackageVersion;\n readonly diagnostics: readonly Diagnostic[];\n}\n\nexport interface ExternalRegistryPolicyReport {\n readonly diagnostics: readonly Diagnostic[];\n}\n\nexport interface ReleaseFileNameReport {\n readonly diagnostics: readonly Diagnostic[];\n}\n\nexport interface OfficialPackagePolicyReport {\n readonly diagnostics: readonly Diagnostic[];\n}\n\n// ---------------------------------------------------------------------------\n// Mutation requests\n// ---------------------------------------------------------------------------\n\nexport interface AddPackageVersionRequest {\n readonly packageName: PackageName;\n readonly version: PackageVersion;\n readonly packageSource: PackageSource;\n readonly registryVersion: RegistryVersion;\n readonly createPackageManifestIfMissing?: boolean;\n readonly overwriteExistingVersion?: boolean;\n}\n\nexport interface RemovePackageVersionRequest {\n readonly packageName: PackageName;\n readonly version: PackageVersion;\n}\n\nexport interface RemovePackageRequest {\n readonly packageName: PackageName;\n}\n\n// ---------------------------------------------------------------------------\n// Mutation plans / summaries\n// ---------------------------------------------------------------------------\n\nexport type RegistryMutationOperation =\n | { readonly kind: 'create-manifest'; readonly path: string }\n | { readonly kind: 'update-manifest'; readonly path: string }\n | { readonly kind: 'delete-manifest'; readonly path: string };\n\nexport interface RegistryMutationPlan {\n readonly operations: readonly RegistryMutationOperation[];\n readonly nextManifest?: PackageRegistryManifest;\n readonly diagnostics: readonly Diagnostic[];\n}\n\nexport interface RegistryMutationSummary {\n readonly operations: readonly RegistryMutationOperation[];\n readonly diagnostics: readonly Diagnostic[];\n}\n\n// ---------------------------------------------------------------------------\n// Integrity\n// ---------------------------------------------------------------------------\n\nexport type IntegrityAlgorithm = 'sha256' | 'sha512';\n\nexport interface IntegrityVerificationResult {\n readonly ok: boolean;\n readonly actual: Integrity;\n readonly expected: Integrity;\n}\n\n// ---------------------------------------------------------------------------\n// Misc\n// ---------------------------------------------------------------------------\n\nexport const REGISTRY_TOOLS_PACKAGES_DIR = 'packages';\n"],"mappings":";AA+JA,MAAa,8BAA8B"}
package/dist/index.d.ts CHANGED
@@ -1,18 +1,18 @@
1
- export { getRegistryToolsAggregator, RegistryToolsAggregator, } from './aggregator/RegistryToolsAggregator.js';
2
- export type { AddPackageVersionRequest, ChangedManifestValidation, DependencyValidationReport, ExternalRegistryPolicyMode, ExternalRegistryPolicyReport, IntegrityAlgorithm, IntegrityVerificationResult, OfficialPackagePolicyReport, PackageSummary, PackageValidationReport, RegistryLintReport, RegistryMutationOperation, RegistryMutationPlan, RegistryMutationSummary, RegistryToolsOptions, RegistryToolsPolicy, RegistryValidationReport, RegistryVersionValidationReport, ReleaseFileNameReport, RemovalsPolicyMode, RemovePackageRequest, RemovePackageVersionRequest, ResolvedRegistryToolsPolicy, UnknownKeysPolicyMode, WriteManifestResult, WriteResult, } from './contracts/RegistryToolsTypes.js';
3
- export { IntegrityCalculator } from './io/IntegrityCalculator.js';
4
- export { ManifestStore } from './io/ManifestStore.js';
5
- export { PackageLister } from './listing/PackageLister.js';
6
- export { AddPackageVersionPlanner } from './mutation/AddPackageVersionPlanner.js';
7
- export { RemovePackagePlanner } from './mutation/RemovePackagePlanner.js';
8
- export { RemovePackageVersionPlanner } from './mutation/RemovePackageVersionPlanner.js';
9
- export { sortVersionsNewestFirst } from './mutation/VersionSorter.js';
10
- export { RegistryRepoPaths } from './paths/RegistryRepoPaths.js';
11
- export { RegistryTools } from './tools/RegistryTools.js';
12
- export { DependencyReachabilityValidator } from './validation/DependencyReachabilityValidator.js';
13
- export { ExternalRegistryPolicyValidator } from './validation/ExternalRegistryPolicyValidator.js';
14
- export { ManifestValidator } from './validation/ManifestValidator.js';
15
- export { type OfficialRegistryPolicyRequest, OfficialRegistryPolicyValidator, } from './validation/OfficialRegistryPolicyValidator.js';
16
- export { RegistryValidator } from './validation/RegistryValidator.js';
17
- export { ReleaseFileNameValidator } from './validation/ReleaseFileNameValidator.js';
18
- //# sourceMappingURL=index.d.ts.map
1
+ import { RegistryToolsAggregator, getRegistryToolsAggregator } from "./aggregator/RegistryToolsAggregator.js";
2
+ import { AddPackageVersionRequest, ChangedManifestValidation, DependencyValidationReport, ExternalRegistryPolicyMode, ExternalRegistryPolicyReport, IntegrityAlgorithm, IntegrityVerificationResult, OfficialPackagePolicyReport, PackageSummary, PackageValidationReport, RegistryLintReport, RegistryMutationOperation, RegistryMutationPlan, RegistryMutationSummary, RegistryToolsOptions, RegistryToolsPolicy, RegistryValidationReport, RegistryVersionValidationReport, ReleaseFileNameReport, RemovalsPolicyMode, RemovePackageRequest, RemovePackageVersionRequest, ResolvedRegistryToolsPolicy, UnknownKeysPolicyMode, WriteManifestResult, WriteResult } from "./contracts/RegistryToolsTypes.js";
3
+ import { IntegrityCalculator } from "./io/IntegrityCalculator.js";
4
+ import { RegistryRepoPaths } from "./paths/RegistryRepoPaths.js";
5
+ import { ManifestStore } from "./io/ManifestStore.js";
6
+ import { PackageLister } from "./listing/PackageLister.js";
7
+ import { DependencyReachabilityValidator } from "./validation/DependencyReachabilityValidator.js";
8
+ import { ExternalRegistryPolicyValidator } from "./validation/ExternalRegistryPolicyValidator.js";
9
+ import { AddPackageVersionPlanner } from "./mutation/AddPackageVersionPlanner.js";
10
+ import { RemovePackagePlanner } from "./mutation/RemovePackagePlanner.js";
11
+ import { RemovePackageVersionPlanner } from "./mutation/RemovePackageVersionPlanner.js";
12
+ import { sortVersionsNewestFirst } from "./mutation/VersionSorter.js";
13
+ import { OfficialRegistryPolicyRequest, OfficialRegistryPolicyValidator } from "./validation/OfficialRegistryPolicyValidator.js";
14
+ import { RegistryTools } from "./tools/RegistryTools.js";
15
+ import { ManifestValidator } from "./validation/ManifestValidator.js";
16
+ import { RegistryValidator } from "./validation/RegistryValidator.js";
17
+ import { ReleaseFileNameValidator } from "./validation/ReleaseFileNameValidator.js";
18
+ export { AddPackageVersionPlanner, type AddPackageVersionRequest, type ChangedManifestValidation, DependencyReachabilityValidator, type DependencyValidationReport, type ExternalRegistryPolicyMode, type ExternalRegistryPolicyReport, ExternalRegistryPolicyValidator, type IntegrityAlgorithm, IntegrityCalculator, type IntegrityVerificationResult, ManifestStore, ManifestValidator, type OfficialPackagePolicyReport, type OfficialRegistryPolicyRequest, OfficialRegistryPolicyValidator, PackageLister, type PackageSummary, type PackageValidationReport, type RegistryLintReport, type RegistryMutationOperation, type RegistryMutationPlan, type RegistryMutationSummary, RegistryRepoPaths, RegistryTools, RegistryToolsAggregator, type RegistryToolsOptions, type RegistryToolsPolicy, type RegistryValidationReport, RegistryValidator, type RegistryVersionValidationReport, type ReleaseFileNameReport, ReleaseFileNameValidator, type RemovalsPolicyMode, RemovePackagePlanner, type RemovePackageRequest, RemovePackageVersionPlanner, type RemovePackageVersionRequest, type ResolvedRegistryToolsPolicy, type UnknownKeysPolicyMode, type WriteManifestResult, type WriteResult, getRegistryToolsAggregator, sortVersionsNewestFirst };
package/dist/index.js CHANGED
@@ -1,30 +1,18 @@
1
- // ---------------------------------------------------------------------------
2
- // @uapkg/registry-tools — public API
3
- //
4
- // Programmatic, registry-owner / CI-side toolkit for uapkg registry repos.
5
- // This package is NOT a CLI and is NOT used by normal `uapkg` consumers.
6
- // ---------------------------------------------------------------------------
7
- // Aggregator
8
- export { getRegistryToolsAggregator, RegistryToolsAggregator, } from './aggregator/RegistryToolsAggregator.js';
9
- // IO helpers
10
- export { IntegrityCalculator } from './io/IntegrityCalculator.js';
11
- export { ManifestStore } from './io/ManifestStore.js';
12
- // Listing
13
- export { PackageLister } from './listing/PackageLister.js';
14
- // Mutation planners
15
- export { AddPackageVersionPlanner } from './mutation/AddPackageVersionPlanner.js';
16
- export { RemovePackagePlanner } from './mutation/RemovePackagePlanner.js';
17
- export { RemovePackageVersionPlanner } from './mutation/RemovePackageVersionPlanner.js';
18
- export { sortVersionsNewestFirst } from './mutation/VersionSorter.js';
19
- // Paths
20
- export { RegistryRepoPaths } from './paths/RegistryRepoPaths.js';
21
- // Orchestrator
22
- export { RegistryTools } from './tools/RegistryTools.js';
23
- // Validators
24
- export { DependencyReachabilityValidator } from './validation/DependencyReachabilityValidator.js';
25
- export { ExternalRegistryPolicyValidator } from './validation/ExternalRegistryPolicyValidator.js';
26
- export { ManifestValidator } from './validation/ManifestValidator.js';
27
- export { OfficialRegistryPolicyValidator, } from './validation/OfficialRegistryPolicyValidator.js';
28
- export { RegistryValidator } from './validation/RegistryValidator.js';
29
- export { ReleaseFileNameValidator } from './validation/ReleaseFileNameValidator.js';
30
- //# sourceMappingURL=index.js.map
1
+ import { RegistryToolsAggregator, getRegistryToolsAggregator } from "./aggregator/RegistryToolsAggregator.js";
2
+ import { IntegrityCalculator } from "./io/IntegrityCalculator.js";
3
+ import { sortVersionsNewestFirst } from "./mutation/VersionSorter.js";
4
+ import { ManifestStore } from "./io/ManifestStore.js";
5
+ import { PackageLister } from "./listing/PackageLister.js";
6
+ import { AddPackageVersionPlanner } from "./mutation/AddPackageVersionPlanner.js";
7
+ import { RemovePackagePlanner } from "./mutation/RemovePackagePlanner.js";
8
+ import { RemovePackageVersionPlanner } from "./mutation/RemovePackageVersionPlanner.js";
9
+ import { RegistryRepoPaths } from "./paths/RegistryRepoPaths.js";
10
+ import { DependencyReachabilityValidator } from "./validation/DependencyReachabilityValidator.js";
11
+ import { ExternalRegistryPolicyValidator } from "./validation/ExternalRegistryPolicyValidator.js";
12
+ import { ManifestValidator } from "./validation/ManifestValidator.js";
13
+ import { OfficialRegistryPolicyValidator } from "./validation/OfficialRegistryPolicyValidator.js";
14
+ import { RegistryValidator } from "./validation/RegistryValidator.js";
15
+ import { ReleaseFileNameValidator } from "./validation/ReleaseFileNameValidator.js";
16
+ import { RegistryTools } from "./tools/RegistryTools.js";
17
+
18
+ export { AddPackageVersionPlanner, DependencyReachabilityValidator, ExternalRegistryPolicyValidator, IntegrityCalculator, ManifestStore, ManifestValidator, OfficialRegistryPolicyValidator, PackageLister, RegistryRepoPaths, RegistryTools, RegistryToolsAggregator, RegistryValidator, ReleaseFileNameValidator, RemovePackagePlanner, RemovePackageVersionPlanner, getRegistryToolsAggregator, sortVersionsNewestFirst };