@uapkg/diagnostics 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 (81) hide show
  1. package/dist/base/Diagnostic.d.ts +22 -19
  2. package/dist/base/Diagnostic.d.ts.map +1 -1
  3. package/dist/base/Diagnostic.js +23 -24
  4. package/dist/base/Diagnostic.js.map +1 -1
  5. package/dist/base/DiagnosticBag.d.ts +32 -29
  6. package/dist/base/DiagnosticBag.d.ts.map +1 -1
  7. package/dist/base/DiagnosticBag.js +75 -76
  8. package/dist/base/DiagnosticBag.js.map +1 -1
  9. package/dist/base/DiagnosticFingerprint.d.ts +10 -8
  10. package/dist/base/DiagnosticFingerprint.d.ts.map +1 -1
  11. package/dist/base/DiagnosticFingerprint.js +18 -19
  12. package/dist/base/DiagnosticFingerprint.js.map +1 -1
  13. package/dist/base/DiagnosticLevel.d.ts +4 -1
  14. package/dist/base/DiagnosticLevel.d.ts.map +1 -1
  15. package/dist/base/DiagnosticLevel.js +1 -2
  16. package/dist/base/Result.d.ts +15 -12
  17. package/dist/base/Result.d.ts.map +1 -1
  18. package/dist/base/Result.js +28 -16
  19. package/dist/base/Result.js.map +1 -1
  20. package/dist/config/ConfigDiagnostics.d.ts +36 -33
  21. package/dist/config/ConfigDiagnostics.d.ts.map +1 -1
  22. package/dist/config/ConfigDiagnostics.js +51 -41
  23. package/dist/config/ConfigDiagnostics.js.map +1 -1
  24. package/dist/controlPlane/ControlPlaneDiagnostics.d.ts +22 -19
  25. package/dist/controlPlane/ControlPlaneDiagnostics.d.ts.map +1 -1
  26. package/dist/controlPlane/ControlPlaneDiagnostics.js +11 -7
  27. package/dist/controlPlane/ControlPlaneDiagnostics.js.map +1 -1
  28. package/dist/general/GeneralDiagnostics.d.ts +16 -13
  29. package/dist/general/GeneralDiagnostics.d.ts.map +1 -1
  30. package/dist/general/GeneralDiagnostics.js +34 -27
  31. package/dist/general/GeneralDiagnostics.js.map +1 -1
  32. package/dist/index.d.ts +20 -33
  33. package/dist/index.js +19 -20
  34. package/dist/installer/InstallerDiagnostics.d.ts +41 -38
  35. package/dist/installer/InstallerDiagnostics.d.ts.map +1 -1
  36. package/dist/installer/InstallerDiagnostics.js +86 -56
  37. package/dist/installer/InstallerDiagnostics.js.map +1 -1
  38. package/dist/manifest/ManifestDiagnostics.d.ts +50 -47
  39. package/dist/manifest/ManifestDiagnostics.d.ts.map +1 -1
  40. package/dist/manifest/ManifestDiagnostics.js +99 -80
  41. package/dist/manifest/ManifestDiagnostics.js.map +1 -1
  42. package/dist/pack/PackDiagnostics.d.ts +31 -28
  43. package/dist/pack/PackDiagnostics.d.ts.map +1 -1
  44. package/dist/pack/PackDiagnostics.js +70 -64
  45. package/dist/pack/PackDiagnostics.js.map +1 -1
  46. package/dist/postinstall/PostinstallDiagnostics.d.ts +35 -32
  47. package/dist/postinstall/PostinstallDiagnostics.d.ts.map +1 -1
  48. package/dist/postinstall/PostinstallDiagnostics.js +75 -52
  49. package/dist/postinstall/PostinstallDiagnostics.js.map +1 -1
  50. package/dist/publishing/PublishingDiagnostics.d.ts +78 -0
  51. package/dist/publishing/PublishingDiagnostics.d.ts.map +1 -0
  52. package/dist/publishing/PublishingDiagnostics.js +14 -0
  53. package/dist/publishing/PublishingDiagnostics.js.map +1 -0
  54. package/dist/registry/RegistryDiagnostics.d.ts +51 -48
  55. package/dist/registry/RegistryDiagnostics.d.ts.map +1 -1
  56. package/dist/registry/RegistryDiagnostics.js +106 -82
  57. package/dist/registry/RegistryDiagnostics.js.map +1 -1
  58. package/dist/registryTools/RegistryToolsDiagnostics.d.ts +97 -94
  59. package/dist/registryTools/RegistryToolsDiagnostics.d.ts.map +1 -1
  60. package/dist/registryTools/RegistryToolsDiagnostics.js +91 -40
  61. package/dist/registryTools/RegistryToolsDiagnostics.js.map +1 -1
  62. package/dist/resolver/ResolverDiagnostics.d.ts +27 -24
  63. package/dist/resolver/ResolverDiagnostics.d.ts.map +1 -1
  64. package/dist/resolver/ResolverDiagnostics.js +59 -43
  65. package/dist/resolver/ResolverDiagnostics.js.map +1 -1
  66. package/dist/safety/SafetyDiagnostics.d.ts +19 -16
  67. package/dist/safety/SafetyDiagnostics.d.ts.map +1 -1
  68. package/dist/safety/SafetyDiagnostics.js +38 -26
  69. package/dist/safety/SafetyDiagnostics.js.map +1 -1
  70. package/dist/spec/SpecDiagnostics.d.ts +17 -14
  71. package/dist/spec/SpecDiagnostics.d.ts.map +1 -1
  72. package/dist/spec/SpecDiagnostics.js +37 -27
  73. package/dist/spec/SpecDiagnostics.js.map +1 -1
  74. package/dist/types.d.ts +20 -16
  75. package/dist/types.d.ts.map +1 -1
  76. package/dist/types.js +1 -2
  77. package/package.json +14 -16
  78. package/dist/base/DiagnosticLevel.js.map +0 -1
  79. package/dist/index.d.ts.map +0 -1
  80. package/dist/index.js.map +0 -1
  81. package/dist/types.js.map +0 -1
@@ -1,47 +1,50 @@
1
- import type { DiagnosticBase } from '../base/Diagnostic.js';
1
+ import { DiagnosticBase } from "../base/Diagnostic.js";
2
+ //#region src/config/ConfigDiagnostics.d.ts
2
3
  /** A config file contains invalid JSON and could not be parsed. */
3
- export type ConfigInvalidJsonDiagnostic = DiagnosticBase<'CONFIG_INVALID_JSON', {
4
- readonly filePath: string;
5
- readonly reason: string;
4
+ type ConfigInvalidJsonDiagnostic = DiagnosticBase<'CONFIG_INVALID_JSON', {
5
+ readonly filePath: string;
6
+ readonly reason: string;
6
7
  }>;
7
8
  /** Config value type is incompatible with expected merge shape. */
8
- export type ConfigTypeMismatchDiagnostic = DiagnosticBase<'CONFIG_TYPE_MISMATCH', {
9
- readonly path: string;
10
- readonly expectedType: string;
11
- readonly actualType: string;
12
- readonly source: string;
13
- readonly filePath?: string;
9
+ type ConfigTypeMismatchDiagnostic = DiagnosticBase<'CONFIG_TYPE_MISMATCH', {
10
+ readonly path: string;
11
+ readonly expectedType: string;
12
+ readonly actualType: string;
13
+ readonly source: string;
14
+ readonly filePath?: string;
14
15
  }>;
15
16
  /** Unknown config key encountered in a config layer. */
16
- export type ConfigUnknownKeyDiagnostic = DiagnosticBase<'CONFIG_UNKNOWN_KEY', {
17
- readonly path: string;
18
- readonly source: string;
19
- readonly filePath?: string;
17
+ type ConfigUnknownKeyDiagnostic = DiagnosticBase<'CONFIG_UNKNOWN_KEY', {
18
+ readonly path: string;
19
+ readonly source: string;
20
+ readonly filePath?: string;
20
21
  }>;
21
22
  /** Cross-field semantic mismatch: default registry not defined in registries map. */
22
- export type ConfigUnresolvedDefaultRegistryDiagnostic = DiagnosticBase<'CONFIG_UNRESOLVED_DEFAULT_REGISTRY', {
23
- readonly registryName: string;
23
+ type ConfigUnresolvedDefaultRegistryDiagnostic = DiagnosticBase<'CONFIG_UNRESOLVED_DEFAULT_REGISTRY', {
24
+ readonly registryName: string;
24
25
  }>;
25
26
  /** Value failed a narrower semantic validation rule. */
26
- export type ConfigInvalidValueDiagnostic = DiagnosticBase<'CONFIG_INVALID_VALUE', {
27
- readonly path: string;
28
- readonly rule: string;
27
+ type ConfigInvalidValueDiagnostic = DiagnosticBase<'CONFIG_INVALID_VALUE', {
28
+ readonly path: string;
29
+ readonly rule: string;
29
30
  }>;
30
31
  /** Union of all config diagnostics. */
31
- export type ConfigDiagnostic = ConfigInvalidJsonDiagnostic | ConfigTypeMismatchDiagnostic | ConfigUnknownKeyDiagnostic | ConfigUnresolvedDefaultRegistryDiagnostic | ConfigInvalidValueDiagnostic;
32
- export declare function createConfigInvalidJsonDiagnostic(filePath: string, reason: string): ConfigInvalidJsonDiagnostic;
33
- export declare function createConfigTypeMismatchDiagnostic(input: {
34
- readonly path: string;
35
- readonly expectedType: string;
36
- readonly actualType: string;
37
- readonly source: string;
38
- readonly filePath?: string;
32
+ type ConfigDiagnostic = ConfigInvalidJsonDiagnostic | ConfigTypeMismatchDiagnostic | ConfigUnknownKeyDiagnostic | ConfigUnresolvedDefaultRegistryDiagnostic | ConfigInvalidValueDiagnostic;
33
+ declare function createConfigInvalidJsonDiagnostic(filePath: string, reason: string): ConfigInvalidJsonDiagnostic;
34
+ declare function createConfigTypeMismatchDiagnostic(input: {
35
+ readonly path: string;
36
+ readonly expectedType: string;
37
+ readonly actualType: string;
38
+ readonly source: string;
39
+ readonly filePath?: string;
39
40
  }): ConfigTypeMismatchDiagnostic;
40
- export declare function createConfigUnknownKeyDiagnostic(input: {
41
- readonly path: string;
42
- readonly source: string;
43
- readonly filePath?: string;
41
+ declare function createConfigUnknownKeyDiagnostic(input: {
42
+ readonly path: string;
43
+ readonly source: string;
44
+ readonly filePath?: string;
44
45
  }): ConfigUnknownKeyDiagnostic;
45
- export declare function createConfigUnresolvedDefaultRegistryDiagnostic(registryName: string): ConfigUnresolvedDefaultRegistryDiagnostic;
46
- export declare function createConfigInvalidValueDiagnostic(path: string, rule: string): ConfigInvalidValueDiagnostic;
46
+ declare function createConfigUnresolvedDefaultRegistryDiagnostic(registryName: string): ConfigUnresolvedDefaultRegistryDiagnostic;
47
+ declare function createConfigInvalidValueDiagnostic(path: string, rule: string): ConfigInvalidValueDiagnostic;
48
+ //#endregion
49
+ export { ConfigDiagnostic, ConfigInvalidJsonDiagnostic, ConfigInvalidValueDiagnostic, ConfigTypeMismatchDiagnostic, ConfigUnknownKeyDiagnostic, ConfigUnresolvedDefaultRegistryDiagnostic, createConfigInvalidJsonDiagnostic, createConfigInvalidValueDiagnostic, createConfigTypeMismatchDiagnostic, createConfigUnknownKeyDiagnostic, createConfigUnresolvedDefaultRegistryDiagnostic };
47
50
  //# sourceMappingURL=ConfigDiagnostics.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigDiagnostics.d.ts","sourceRoot":"","sources":["../../src/config/ConfigDiagnostics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,mEAAmE;AACnE,MAAM,MAAM,2BAA2B,GAAG,cAAc,CACtD,qBAAqB,EACrB;IACE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB,CACF,CAAC;AAEF,mEAAmE;AACnE,MAAM,MAAM,4BAA4B,GAAG,cAAc,CACvD,sBAAsB,EACtB;IACE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B,CACF,CAAC;AAEF,wDAAwD;AACxD,MAAM,MAAM,0BAA0B,GAAG,cAAc,CACrD,oBAAoB,EACpB;IACE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B,CACF,CAAC;AAEF,qFAAqF;AACrF,MAAM,MAAM,yCAAyC,GAAG,cAAc,CACpE,oCAAoC,EACpC;IACE,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B,CACF,CAAC;AAEF,wDAAwD;AACxD,MAAM,MAAM,4BAA4B,GAAG,cAAc,CACvD,sBAAsB,EACtB;IACE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB,CACF,CAAC;AAEF,uCAAuC;AACvC,MAAM,MAAM,gBAAgB,GACxB,2BAA2B,GAC3B,4BAA4B,GAC5B,0BAA0B,GAC1B,yCAAyC,GACzC,4BAA4B,CAAC;AAEjC,wBAAgB,iCAAiC,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,2BAA2B,CAQ/G;AAED,wBAAgB,kCAAkC,CAAC,KAAK,EAAE;IACxD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B,GAAG,4BAA4B,CAQ/B;AAED,wBAAgB,gCAAgC,CAAC,KAAK,EAAE;IACtD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B,GAAG,0BAA0B,CAQ7B;AAED,wBAAgB,+CAA+C,CAC7D,YAAY,EAAE,MAAM,GACnB,yCAAyC,CAS3C;AAED,wBAAgB,kCAAkC,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,4BAA4B,CAQ3G"}
1
+ {"version":3,"file":"ConfigDiagnostics.d.ts","names":[],"sources":["../../src/config/ConfigDiagnostics.ts"],"mappings":";;;KAGY,8BAA8B;WAG7B;WACA;;;KAKD,+BAA+B;WAG9B;WACA;WACA;WACA;WACA;;;KAKD,6BAA6B;WAG5B;WACA;WACA;;;KAKD,4CAA4C;WAG3C;;;KAKD,+BAA+B;WAG9B;WACA;;;KAKD,mBACR,8BACA,+BACA,6BACA,4CACA;iBAEY,kCAAkC,kBAAkB,iBAAiB;iBAUrE,mCAAmC;WACxC;WACA;WACA;WACA;WACA;IACP;iBAUY,iCAAiC;WACtC;WACA;WACA;IACP;iBAUY,gDACd,uBACC;iBAWa,mCAAmC,cAAc,eAAe"}
@@ -1,47 +1,57 @@
1
- export function createConfigInvalidJsonDiagnostic(filePath, reason) {
2
- return {
3
- level: 'warning',
4
- code: 'CONFIG_INVALID_JSON',
5
- message: `Ignoring invalid JSON in config file "${filePath}".`,
6
- hint: 'Fix JSON syntax in this file to restore those settings.',
7
- data: { filePath, reason },
8
- };
1
+ //#region src/config/ConfigDiagnostics.ts
2
+ function createConfigInvalidJsonDiagnostic(filePath, reason) {
3
+ return {
4
+ level: "warning",
5
+ code: "CONFIG_INVALID_JSON",
6
+ message: `Ignoring invalid JSON in config file "${filePath}".`,
7
+ hint: "Fix JSON syntax in this file to restore those settings.",
8
+ data: {
9
+ filePath,
10
+ reason
11
+ }
12
+ };
9
13
  }
10
- export function createConfigTypeMismatchDiagnostic(input) {
11
- return {
12
- level: 'warning',
13
- code: 'CONFIG_TYPE_MISMATCH',
14
- message: `Ignoring config value at "${input.path}" because it is ${input.actualType}, expected ${input.expectedType}.`,
15
- hint: 'Use a value type compatible with this config key.',
16
- data: input,
17
- };
14
+ function createConfigTypeMismatchDiagnostic(input) {
15
+ return {
16
+ level: "warning",
17
+ code: "CONFIG_TYPE_MISMATCH",
18
+ message: `Ignoring config value at "${input.path}" because it is ${input.actualType}, expected ${input.expectedType}.`,
19
+ hint: "Use a value type compatible with this config key.",
20
+ data: input
21
+ };
18
22
  }
19
- export function createConfigUnknownKeyDiagnostic(input) {
20
- return {
21
- level: 'warning',
22
- code: 'CONFIG_UNKNOWN_KEY',
23
- message: `Ignoring unknown config key "${input.path}".`,
24
- hint: 'Remove or rename this key to a supported configuration path.',
25
- data: input,
26
- };
23
+ function createConfigUnknownKeyDiagnostic(input) {
24
+ return {
25
+ level: "warning",
26
+ code: "CONFIG_UNKNOWN_KEY",
27
+ message: `Ignoring unknown config key "${input.path}".`,
28
+ hint: "Remove or rename this key to a supported configuration path.",
29
+ data: input
30
+ };
27
31
  }
28
- export function createConfigUnresolvedDefaultRegistryDiagnostic(registryName) {
29
- return {
30
- level: 'warning',
31
- code: 'CONFIG_UNRESOLVED_DEFAULT_REGISTRY',
32
- message: `Default registry "${registryName}" is not defined under "registries".`,
33
- emitPolicy: 'once',
34
- hint: `Add "registries.${registryName}" or set a different default with 'uapkg registry use <name>'.`,
35
- data: { registryName },
36
- };
32
+ function createConfigUnresolvedDefaultRegistryDiagnostic(registryName) {
33
+ return {
34
+ level: "warning",
35
+ code: "CONFIG_UNRESOLVED_DEFAULT_REGISTRY",
36
+ message: `Default registry "${registryName}" is not defined under "registries".`,
37
+ emitPolicy: "once",
38
+ hint: `Add "registries.${registryName}" or set a different default with 'uapkg registry use <name>'.`,
39
+ data: { registryName }
40
+ };
37
41
  }
38
- export function createConfigInvalidValueDiagnostic(path, rule) {
39
- return {
40
- level: 'warning',
41
- code: 'CONFIG_INVALID_VALUE',
42
- message: `Config value at "${path}" may be invalid: ${rule}.`,
43
- hint: 'Update this value to match the expected format for this key.',
44
- data: { path, rule },
45
- };
42
+ function createConfigInvalidValueDiagnostic(path, rule) {
43
+ return {
44
+ level: "warning",
45
+ code: "CONFIG_INVALID_VALUE",
46
+ message: `Config value at "${path}" may be invalid: ${rule}.`,
47
+ hint: "Update this value to match the expected format for this key.",
48
+ data: {
49
+ path,
50
+ rule
51
+ }
52
+ };
46
53
  }
54
+
55
+ //#endregion
56
+ export { createConfigInvalidJsonDiagnostic, createConfigInvalidValueDiagnostic, createConfigTypeMismatchDiagnostic, createConfigUnknownKeyDiagnostic, createConfigUnresolvedDefaultRegistryDiagnostic };
47
57
  //# sourceMappingURL=ConfigDiagnostics.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigDiagnostics.js","sourceRoot":"","sources":["../../src/config/ConfigDiagnostics.ts"],"names":[],"mappings":"AA0DA,MAAM,UAAU,iCAAiC,CAAC,QAAgB,EAAE,MAAc;IAChF,OAAO;QACL,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,qBAAqB;QAC3B,OAAO,EAAE,yCAAyC,QAAQ,IAAI;QAC9D,IAAI,EAAE,yDAAyD;QAC/D,IAAI,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE;KAC3B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,kCAAkC,CAAC,KAMlD;IACC,OAAO;QACL,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,sBAAsB;QAC5B,OAAO,EAAE,6BAA6B,KAAK,CAAC,IAAI,mBAAmB,KAAK,CAAC,UAAU,cAAc,KAAK,CAAC,YAAY,GAAG;QACtH,IAAI,EAAE,mDAAmD;QACzD,IAAI,EAAE,KAAK;KACZ,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gCAAgC,CAAC,KAIhD;IACC,OAAO;QACL,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,oBAAoB;QAC1B,OAAO,EAAE,gCAAgC,KAAK,CAAC,IAAI,IAAI;QACvD,IAAI,EAAE,8DAA8D;QACpE,IAAI,EAAE,KAAK;KACZ,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,+CAA+C,CAC7D,YAAoB;IAEpB,OAAO;QACL,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,oCAAoC;QAC1C,OAAO,EAAE,qBAAqB,YAAY,sCAAsC;QAChF,UAAU,EAAE,MAAM;QAClB,IAAI,EAAE,mBAAmB,YAAY,gEAAgE;QACrG,IAAI,EAAE,EAAE,YAAY,EAAE;KACvB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,kCAAkC,CAAC,IAAY,EAAE,IAAY;IAC3E,OAAO;QACL,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,sBAAsB;QAC5B,OAAO,EAAE,oBAAoB,IAAI,qBAAqB,IAAI,GAAG;QAC7D,IAAI,EAAE,8DAA8D;QACpE,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;KACrB,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"ConfigDiagnostics.js","names":[],"sources":["../../src/config/ConfigDiagnostics.ts"],"sourcesContent":["import type { DiagnosticBase } from '../base/Diagnostic.js';\n\n/** A config file contains invalid JSON and could not be parsed. */\nexport type ConfigInvalidJsonDiagnostic = DiagnosticBase<\n 'CONFIG_INVALID_JSON',\n {\n readonly filePath: string;\n readonly reason: string;\n }\n>;\n\n/** Config value type is incompatible with expected merge shape. */\nexport type ConfigTypeMismatchDiagnostic = DiagnosticBase<\n 'CONFIG_TYPE_MISMATCH',\n {\n readonly path: string;\n readonly expectedType: string;\n readonly actualType: string;\n readonly source: string;\n readonly filePath?: string;\n }\n>;\n\n/** Unknown config key encountered in a config layer. */\nexport type ConfigUnknownKeyDiagnostic = DiagnosticBase<\n 'CONFIG_UNKNOWN_KEY',\n {\n readonly path: string;\n readonly source: string;\n readonly filePath?: string;\n }\n>;\n\n/** Cross-field semantic mismatch: default registry not defined in registries map. */\nexport type ConfigUnresolvedDefaultRegistryDiagnostic = DiagnosticBase<\n 'CONFIG_UNRESOLVED_DEFAULT_REGISTRY',\n {\n readonly registryName: string;\n }\n>;\n\n/** Value failed a narrower semantic validation rule. */\nexport type ConfigInvalidValueDiagnostic = DiagnosticBase<\n 'CONFIG_INVALID_VALUE',\n {\n readonly path: string;\n readonly rule: string;\n }\n>;\n\n/** Union of all config diagnostics. */\nexport type ConfigDiagnostic =\n | ConfigInvalidJsonDiagnostic\n | ConfigTypeMismatchDiagnostic\n | ConfigUnknownKeyDiagnostic\n | ConfigUnresolvedDefaultRegistryDiagnostic\n | ConfigInvalidValueDiagnostic;\n\nexport function createConfigInvalidJsonDiagnostic(filePath: string, reason: string): ConfigInvalidJsonDiagnostic {\n return {\n level: 'warning',\n code: 'CONFIG_INVALID_JSON',\n message: `Ignoring invalid JSON in config file \"${filePath}\".`,\n hint: 'Fix JSON syntax in this file to restore those settings.',\n data: { filePath, reason },\n };\n}\n\nexport function createConfigTypeMismatchDiagnostic(input: {\n readonly path: string;\n readonly expectedType: string;\n readonly actualType: string;\n readonly source: string;\n readonly filePath?: string;\n}): ConfigTypeMismatchDiagnostic {\n return {\n level: 'warning',\n code: 'CONFIG_TYPE_MISMATCH',\n message: `Ignoring config value at \"${input.path}\" because it is ${input.actualType}, expected ${input.expectedType}.`,\n hint: 'Use a value type compatible with this config key.',\n data: input,\n };\n}\n\nexport function createConfigUnknownKeyDiagnostic(input: {\n readonly path: string;\n readonly source: string;\n readonly filePath?: string;\n}): ConfigUnknownKeyDiagnostic {\n return {\n level: 'warning',\n code: 'CONFIG_UNKNOWN_KEY',\n message: `Ignoring unknown config key \"${input.path}\".`,\n hint: 'Remove or rename this key to a supported configuration path.',\n data: input,\n };\n}\n\nexport function createConfigUnresolvedDefaultRegistryDiagnostic(\n registryName: string,\n): ConfigUnresolvedDefaultRegistryDiagnostic {\n return {\n level: 'warning',\n code: 'CONFIG_UNRESOLVED_DEFAULT_REGISTRY',\n message: `Default registry \"${registryName}\" is not defined under \"registries\".`,\n emitPolicy: 'once',\n hint: `Add \"registries.${registryName}\" or set a different default with 'uapkg registry use <name>'.`,\n data: { registryName },\n };\n}\n\nexport function createConfigInvalidValueDiagnostic(path: string, rule: string): ConfigInvalidValueDiagnostic {\n return {\n level: 'warning',\n code: 'CONFIG_INVALID_VALUE',\n message: `Config value at \"${path}\" may be invalid: ${rule}.`,\n hint: 'Update this value to match the expected format for this key.',\n data: { path, rule },\n };\n}\n"],"mappings":";AA0DA,SAAgB,kCAAkC,UAAkB,QAA6C;CAC/G,OAAO;EACL,OAAO;EACP,MAAM;EACN,SAAS,yCAAyC,SAAS;EAC3D,MAAM;EACN,MAAM;GAAE;GAAU;EAAO;CAC3B;AACF;AAEA,SAAgB,mCAAmC,OAMlB;CAC/B,OAAO;EACL,OAAO;EACP,MAAM;EACN,SAAS,6BAA6B,MAAM,KAAK,kBAAkB,MAAM,WAAW,aAAa,MAAM,aAAa;EACpH,MAAM;EACN,MAAM;CACR;AACF;AAEA,SAAgB,iCAAiC,OAIlB;CAC7B,OAAO;EACL,OAAO;EACP,MAAM;EACN,SAAS,gCAAgC,MAAM,KAAK;EACpD,MAAM;EACN,MAAM;CACR;AACF;AAEA,SAAgB,gDACd,cAC2C;CAC3C,OAAO;EACL,OAAO;EACP,MAAM;EACN,SAAS,qBAAqB,aAAa;EAC3C,YAAY;EACZ,MAAM,mBAAmB,aAAa;EACtC,MAAM,EAAE,aAAa;CACvB;AACF;AAEA,SAAgB,mCAAmC,MAAc,MAA4C;CAC3G,OAAO;EACL,OAAO;EACP,MAAM;EACN,SAAS,oBAAoB,KAAK,oBAAoB,KAAK;EAC3D,MAAM;EACN,MAAM;GAAE;GAAM;EAAK;CACrB;AACF"}
@@ -1,23 +1,26 @@
1
- import type { DiagnosticBase } from '../base/Diagnostic.js';
2
- export type LoginDiagnosticCode = 'LOGIN_ACCESS_DENIED' | 'LOGIN_AUTHORIZATION_TIMEOUT' | 'LOGIN_AUTHORIZATION_RESPONSE_INVALID' | 'LOGIN_REAUTHORIZATION_CONFLICT' | 'LOGIN_OAUTH_ERROR' | 'LOGIN_FAILED';
3
- export interface LoginDiagnosticData {
4
- readonly oauthError?: string;
1
+ import { DiagnosticBase } from "../base/Diagnostic.js";
2
+ //#region src/controlPlane/ControlPlaneDiagnostics.d.ts
3
+ type LoginDiagnosticCode = 'LOGIN_ACCESS_DENIED' | 'LOGIN_AUTHORIZATION_TIMEOUT' | 'LOGIN_AUTHORIZATION_RESPONSE_INVALID' | 'LOGIN_REAUTHORIZATION_CONFLICT' | 'LOGIN_OAUTH_ERROR' | 'LOGIN_FAILED';
4
+ interface LoginDiagnosticData {
5
+ readonly oauthError?: string;
5
6
  }
6
- export interface ControlPlaneCommandFailedDiagnosticData {
7
- readonly operation: string;
8
- readonly serverCode?: string;
9
- readonly status?: number;
7
+ interface ControlPlaneCommandFailedDiagnosticData {
8
+ readonly operation: string;
9
+ readonly serverCode?: string;
10
+ readonly status?: number;
10
11
  }
11
- export type LoginAccessDeniedDiagnostic = DiagnosticBase<'LOGIN_ACCESS_DENIED', LoginDiagnosticData>;
12
- export type LoginAuthorizationTimeoutDiagnostic = DiagnosticBase<'LOGIN_AUTHORIZATION_TIMEOUT', LoginDiagnosticData>;
13
- export type LoginAuthorizationResponseInvalidDiagnostic = DiagnosticBase<'LOGIN_AUTHORIZATION_RESPONSE_INVALID', LoginDiagnosticData>;
14
- export type LoginReauthorizationConflictDiagnostic = DiagnosticBase<'LOGIN_REAUTHORIZATION_CONFLICT', LoginDiagnosticData>;
15
- export type LoginOAuthErrorDiagnostic = DiagnosticBase<'LOGIN_OAUTH_ERROR', LoginDiagnosticData>;
16
- export type LoginFailedDiagnostic = DiagnosticBase<'LOGIN_FAILED', LoginDiagnosticData>;
17
- export type ControlPlaneCommandFailedDiagnostic = DiagnosticBase<'CONTROL_PLANE_COMMAND_FAILED', ControlPlaneCommandFailedDiagnosticData>;
18
- export type ControlPlaneDiagnostic = LoginAccessDeniedDiagnostic | LoginAuthorizationTimeoutDiagnostic | LoginAuthorizationResponseInvalidDiagnostic | LoginReauthorizationConflictDiagnostic | LoginOAuthErrorDiagnostic | LoginFailedDiagnostic | ControlPlaneCommandFailedDiagnostic;
19
- export type LoginDiagnosticByCode<C extends LoginDiagnosticCode> = Extract<ControlPlaneDiagnostic, {
20
- code: C;
12
+ type LoginAccessDeniedDiagnostic = DiagnosticBase<'LOGIN_ACCESS_DENIED', LoginDiagnosticData>;
13
+ type LoginAuthorizationTimeoutDiagnostic = DiagnosticBase<'LOGIN_AUTHORIZATION_TIMEOUT', LoginDiagnosticData>;
14
+ type LoginAuthorizationResponseInvalidDiagnostic = DiagnosticBase<'LOGIN_AUTHORIZATION_RESPONSE_INVALID', LoginDiagnosticData>;
15
+ type LoginReauthorizationConflictDiagnostic = DiagnosticBase<'LOGIN_REAUTHORIZATION_CONFLICT', LoginDiagnosticData>;
16
+ type LoginOAuthErrorDiagnostic = DiagnosticBase<'LOGIN_OAUTH_ERROR', LoginDiagnosticData>;
17
+ type LoginFailedDiagnostic = DiagnosticBase<'LOGIN_FAILED', LoginDiagnosticData>;
18
+ type ControlPlaneCommandFailedDiagnostic = DiagnosticBase<'CONTROL_PLANE_COMMAND_FAILED', ControlPlaneCommandFailedDiagnosticData>;
19
+ type ControlPlaneDiagnostic = LoginAccessDeniedDiagnostic | LoginAuthorizationTimeoutDiagnostic | LoginAuthorizationResponseInvalidDiagnostic | LoginReauthorizationConflictDiagnostic | LoginOAuthErrorDiagnostic | LoginFailedDiagnostic | ControlPlaneCommandFailedDiagnostic;
20
+ type LoginDiagnosticByCode<C extends LoginDiagnosticCode> = Extract<ControlPlaneDiagnostic, {
21
+ code: C;
21
22
  }>;
22
- export declare function createControlPlaneCommandFailedDiagnostic(message: string, data: ControlPlaneCommandFailedDiagnosticData): ControlPlaneCommandFailedDiagnostic;
23
+ declare function createControlPlaneCommandFailedDiagnostic(message: string, data: ControlPlaneCommandFailedDiagnosticData): ControlPlaneCommandFailedDiagnostic;
24
+ //#endregion
25
+ export { ControlPlaneCommandFailedDiagnostic, ControlPlaneCommandFailedDiagnosticData, ControlPlaneDiagnostic, LoginAccessDeniedDiagnostic, LoginAuthorizationResponseInvalidDiagnostic, LoginAuthorizationTimeoutDiagnostic, LoginDiagnosticByCode, LoginDiagnosticCode, LoginDiagnosticData, LoginFailedDiagnostic, LoginOAuthErrorDiagnostic, LoginReauthorizationConflictDiagnostic, createControlPlaneCommandFailedDiagnostic };
23
26
  //# sourceMappingURL=ControlPlaneDiagnostics.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ControlPlaneDiagnostics.d.ts","sourceRoot":"","sources":["../../src/controlPlane/ControlPlaneDiagnostics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,MAAM,mBAAmB,GAC3B,qBAAqB,GACrB,6BAA6B,GAC7B,sCAAsC,GACtC,gCAAgC,GAChC,mBAAmB,GACnB,cAAc,CAAC;AAEnB,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,uCAAuC;IACtD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,MAAM,2BAA2B,GAAG,cAAc,CAAC,qBAAqB,EAAE,mBAAmB,CAAC,CAAC;AACrG,MAAM,MAAM,mCAAmC,GAAG,cAAc,CAAC,6BAA6B,EAAE,mBAAmB,CAAC,CAAC;AACrH,MAAM,MAAM,2CAA2C,GAAG,cAAc,CACtE,sCAAsC,EACtC,mBAAmB,CACpB,CAAC;AACF,MAAM,MAAM,sCAAsC,GAAG,cAAc,CACjE,gCAAgC,EAChC,mBAAmB,CACpB,CAAC;AACF,MAAM,MAAM,yBAAyB,GAAG,cAAc,CAAC,mBAAmB,EAAE,mBAAmB,CAAC,CAAC;AACjG,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,cAAc,EAAE,mBAAmB,CAAC,CAAC;AACxF,MAAM,MAAM,mCAAmC,GAAG,cAAc,CAC9D,8BAA8B,EAC9B,uCAAuC,CACxC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAC9B,2BAA2B,GAC3B,mCAAmC,GACnC,2CAA2C,GAC3C,sCAAsC,GACtC,yBAAyB,GACzB,qBAAqB,GACrB,mCAAmC,CAAC;AAExC,MAAM,MAAM,qBAAqB,CAAC,CAAC,SAAS,mBAAmB,IAAI,OAAO,CAAC,sBAAsB,EAAE;IAAE,IAAI,EAAE,CAAC,CAAA;CAAE,CAAC,CAAC;AAEhH,wBAAgB,yCAAyC,CACvD,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,uCAAuC,GAC5C,mCAAmC,CAOrC"}
1
+ {"version":3,"file":"ControlPlaneDiagnostics.d.ts","names":[],"sources":["../../src/controlPlane/ControlPlaneDiagnostics.ts"],"mappings":";;KAEY;UAQK;WACN;;UAGM;WACN;WACA;WACA;;KAGC,8BAA8B,sCAAsC;KACpE,sCAAsC,8CAA8C;KACpF,8CAA8C,uDAExD;KAEU,yCAAyC,iDAEnD;KAEU,4BAA4B,oCAAoC;KAChE,wBAAwB,+BAA+B;KACvD,sCAAsC,+CAEhD;KAGU,yBACR,8BACA,sCACA,8CACA,yCACA,4BACA,wBACA;KAEQ,sBAAsB,UAAU,uBAAuB,QAAQ;EAA0B,MAAM;;iBAE3F,0CACd,iBACA,MAAM,0CACL"}
@@ -1,9 +1,13 @@
1
- export function createControlPlaneCommandFailedDiagnostic(message, data) {
2
- return {
3
- level: 'error',
4
- code: 'CONTROL_PLANE_COMMAND_FAILED',
5
- message,
6
- data,
7
- };
1
+ //#region src/controlPlane/ControlPlaneDiagnostics.ts
2
+ function createControlPlaneCommandFailedDiagnostic(message, data) {
3
+ return {
4
+ level: "error",
5
+ code: "CONTROL_PLANE_COMMAND_FAILED",
6
+ message,
7
+ data
8
+ };
8
9
  }
10
+
11
+ //#endregion
12
+ export { createControlPlaneCommandFailedDiagnostic };
9
13
  //# sourceMappingURL=ControlPlaneDiagnostics.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ControlPlaneDiagnostics.js","sourceRoot":"","sources":["../../src/controlPlane/ControlPlaneDiagnostics.ts"],"names":[],"mappings":"AAgDA,MAAM,UAAU,yCAAyC,CACvD,OAAe,EACf,IAA6C;IAE7C,OAAO;QACL,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,8BAA8B;QACpC,OAAO;QACP,IAAI;KACL,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"ControlPlaneDiagnostics.js","names":[],"sources":["../../src/controlPlane/ControlPlaneDiagnostics.ts"],"sourcesContent":["import type { DiagnosticBase } from '../base/Diagnostic.js';\n\nexport type LoginDiagnosticCode =\n | 'LOGIN_ACCESS_DENIED'\n | 'LOGIN_AUTHORIZATION_TIMEOUT'\n | 'LOGIN_AUTHORIZATION_RESPONSE_INVALID'\n | 'LOGIN_REAUTHORIZATION_CONFLICT'\n | 'LOGIN_OAUTH_ERROR'\n | 'LOGIN_FAILED';\n\nexport interface LoginDiagnosticData {\n readonly oauthError?: string;\n}\n\nexport interface ControlPlaneCommandFailedDiagnosticData {\n readonly operation: string;\n readonly serverCode?: string;\n readonly status?: number;\n}\n\nexport type LoginAccessDeniedDiagnostic = DiagnosticBase<'LOGIN_ACCESS_DENIED', LoginDiagnosticData>;\nexport type LoginAuthorizationTimeoutDiagnostic = DiagnosticBase<'LOGIN_AUTHORIZATION_TIMEOUT', LoginDiagnosticData>;\nexport type LoginAuthorizationResponseInvalidDiagnostic = DiagnosticBase<\n 'LOGIN_AUTHORIZATION_RESPONSE_INVALID',\n LoginDiagnosticData\n>;\nexport type LoginReauthorizationConflictDiagnostic = DiagnosticBase<\n 'LOGIN_REAUTHORIZATION_CONFLICT',\n LoginDiagnosticData\n>;\nexport type LoginOAuthErrorDiagnostic = DiagnosticBase<'LOGIN_OAUTH_ERROR', LoginDiagnosticData>;\nexport type LoginFailedDiagnostic = DiagnosticBase<'LOGIN_FAILED', LoginDiagnosticData>;\nexport type ControlPlaneCommandFailedDiagnostic = DiagnosticBase<\n 'CONTROL_PLANE_COMMAND_FAILED',\n ControlPlaneCommandFailedDiagnosticData\n>;\n\nexport type ControlPlaneDiagnostic =\n | LoginAccessDeniedDiagnostic\n | LoginAuthorizationTimeoutDiagnostic\n | LoginAuthorizationResponseInvalidDiagnostic\n | LoginReauthorizationConflictDiagnostic\n | LoginOAuthErrorDiagnostic\n | LoginFailedDiagnostic\n | ControlPlaneCommandFailedDiagnostic;\n\nexport type LoginDiagnosticByCode<C extends LoginDiagnosticCode> = Extract<ControlPlaneDiagnostic, { code: C }>;\n\nexport function createControlPlaneCommandFailedDiagnostic(\n message: string,\n data: ControlPlaneCommandFailedDiagnosticData,\n): ControlPlaneCommandFailedDiagnostic {\n return {\n level: 'error',\n code: 'CONTROL_PLANE_COMMAND_FAILED',\n message,\n data,\n };\n}\n"],"mappings":";AAgDA,SAAgB,0CACd,SACA,MACqC;CACrC,OAAO;EACL,OAAO;EACP,MAAM;EACN;EACA;CACF;AACF"}
@@ -1,21 +1,24 @@
1
- import type { DiagnosticBase } from '../base/Diagnostic.js';
1
+ import { DiagnosticBase } from "../base/Diagnostic.js";
2
+ //#region src/general/GeneralDiagnostics.d.ts
2
3
  /** Generic JSON or data parse error. */
3
- export type ParseErrorDiagnostic = DiagnosticBase<'PARSE_ERROR', {
4
- readonly filePath?: string;
5
- readonly reason: string;
4
+ type ParseErrorDiagnostic = DiagnosticBase<'PARSE_ERROR', {
5
+ readonly filePath?: string;
6
+ readonly reason: string;
6
7
  }>;
7
8
  /** File system I/O error. */
8
- export type IoErrorDiagnostic = DiagnosticBase<'IO_ERROR', {
9
- readonly path: string;
10
- readonly reason: string;
9
+ type IoErrorDiagnostic = DiagnosticBase<'IO_ERROR', {
10
+ readonly path: string;
11
+ readonly reason: string;
11
12
  }>;
12
13
  /** Catch-all for truly unexpected situations (should be rare). */
13
- export type UnknownErrorDiagnostic = DiagnosticBase<'UNKNOWN_ERROR', {
14
- readonly reason: string;
14
+ type UnknownErrorDiagnostic = DiagnosticBase<'UNKNOWN_ERROR', {
15
+ readonly reason: string;
15
16
  }>;
16
17
  /** Union of all general diagnostics. */
17
- export type GeneralDiagnostic = ParseErrorDiagnostic | IoErrorDiagnostic | UnknownErrorDiagnostic;
18
- export declare function createParseErrorDiagnostic(reason: string, filePath?: string): ParseErrorDiagnostic;
19
- export declare function createIoErrorDiagnostic(path: string, reason: string): IoErrorDiagnostic;
20
- export declare function createUnknownErrorDiagnostic(reason: string): UnknownErrorDiagnostic;
18
+ type GeneralDiagnostic = ParseErrorDiagnostic | IoErrorDiagnostic | UnknownErrorDiagnostic;
19
+ declare function createParseErrorDiagnostic(reason: string, filePath?: string): ParseErrorDiagnostic;
20
+ declare function createIoErrorDiagnostic(path: string, reason: string): IoErrorDiagnostic;
21
+ declare function createUnknownErrorDiagnostic(reason: string): UnknownErrorDiagnostic;
22
+ //#endregion
23
+ export { GeneralDiagnostic, IoErrorDiagnostic, ParseErrorDiagnostic, UnknownErrorDiagnostic, createIoErrorDiagnostic, createParseErrorDiagnostic, createUnknownErrorDiagnostic };
21
24
  //# sourceMappingURL=GeneralDiagnostics.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GeneralDiagnostics.d.ts","sourceRoot":"","sources":["../../src/general/GeneralDiagnostics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAM5D,wCAAwC;AACxC,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAC/C,aAAa,EACb;IACE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB,CACF,CAAC;AAEF,6BAA6B;AAC7B,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAC5C,UAAU,EACV;IACE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB,CACF,CAAC;AAEF,kEAAkE;AAClE,MAAM,MAAM,sBAAsB,GAAG,cAAc,CACjD,eAAe,EACf;IACE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB,CACF,CAAC;AAEF,wCAAwC;AACxC,MAAM,MAAM,iBAAiB,GAAG,oBAAoB,GAAG,iBAAiB,GAAG,sBAAsB,CAAC;AAMlG,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,oBAAoB,CAQlG;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,iBAAiB,CAQvF;AAED,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,MAAM,GAAG,sBAAsB,CAQnF"}
1
+ {"version":3,"file":"GeneralDiagnostics.d.ts","names":[],"sources":["../../src/general/GeneralDiagnostics.ts"],"mappings":";;;KAOY,uBAAuB;WAGtB;WACA;;;KAKD,oBAAoB;WAGnB;WACA;;;KAKD,yBAAyB;WAGxB;;;KAKD,oBAAoB,uBAAuB,oBAAoB;iBAM3D,2BAA2B,gBAAgB,oBAAoB;iBAU/D,wBAAwB,cAAc,iBAAiB;iBAUvD,6BAA6B,iBAAiB"}
@@ -1,31 +1,38 @@
1
- // ---------------------------------------------------------------------------
2
- // Factory helpers
3
- // ---------------------------------------------------------------------------
4
- export function createParseErrorDiagnostic(reason, filePath) {
5
- return {
6
- level: 'error',
7
- code: 'PARSE_ERROR',
8
- message: filePath ? `Parse error in "${filePath}": ${reason}.` : `Parse error: ${reason}.`,
9
- hint: 'Ensure the input is well-formed.',
10
- data: { filePath, reason },
11
- };
1
+ //#region src/general/GeneralDiagnostics.ts
2
+ function createParseErrorDiagnostic(reason, filePath) {
3
+ return {
4
+ level: "error",
5
+ code: "PARSE_ERROR",
6
+ message: filePath ? `Parse error in "${filePath}": ${reason}.` : `Parse error: ${reason}.`,
7
+ hint: "Ensure the input is well-formed.",
8
+ data: {
9
+ filePath,
10
+ reason
11
+ }
12
+ };
12
13
  }
13
- export function createIoErrorDiagnostic(path, reason) {
14
- return {
15
- level: 'error',
16
- code: 'IO_ERROR',
17
- message: `I/O error at "${path}": ${reason}.`,
18
- hint: 'Check file permissions and that the path exists.',
19
- data: { path, reason },
20
- };
14
+ function createIoErrorDiagnostic(path, reason) {
15
+ return {
16
+ level: "error",
17
+ code: "IO_ERROR",
18
+ message: `I/O error at "${path}": ${reason}.`,
19
+ hint: "Check file permissions and that the path exists.",
20
+ data: {
21
+ path,
22
+ reason
23
+ }
24
+ };
21
25
  }
22
- export function createUnknownErrorDiagnostic(reason) {
23
- return {
24
- level: 'error',
25
- code: 'UNKNOWN_ERROR',
26
- message: `An unexpected error occurred: ${reason}.`,
27
- hint: 'If this persists, please report a bug.',
28
- data: { reason },
29
- };
26
+ function createUnknownErrorDiagnostic(reason) {
27
+ return {
28
+ level: "error",
29
+ code: "UNKNOWN_ERROR",
30
+ message: `An unexpected error occurred: ${reason}.`,
31
+ hint: "If this persists, please report a bug.",
32
+ data: { reason }
33
+ };
30
34
  }
35
+
36
+ //#endregion
37
+ export { createIoErrorDiagnostic, createParseErrorDiagnostic, createUnknownErrorDiagnostic };
31
38
  //# sourceMappingURL=GeneralDiagnostics.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GeneralDiagnostics.js","sourceRoot":"","sources":["../../src/general/GeneralDiagnostics.ts"],"names":[],"mappings":"AAmCA,8EAA8E;AAC9E,kBAAkB;AAClB,8EAA8E;AAE9E,MAAM,UAAU,0BAA0B,CAAC,MAAc,EAAE,QAAiB;IAC1E,OAAO;QACL,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,aAAa;QACnB,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,mBAAmB,QAAQ,MAAM,MAAM,GAAG,CAAC,CAAC,CAAC,gBAAgB,MAAM,GAAG;QAC1F,IAAI,EAAE,kCAAkC;QACxC,IAAI,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE;KAC3B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,IAAY,EAAE,MAAc;IAClE,OAAO;QACL,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,iBAAiB,IAAI,MAAM,MAAM,GAAG;QAC7C,IAAI,EAAE,kDAAkD;QACxD,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;KACvB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,4BAA4B,CAAC,MAAc;IACzD,OAAO;QACL,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,eAAe;QACrB,OAAO,EAAE,iCAAiC,MAAM,GAAG;QACnD,IAAI,EAAE,wCAAwC;QAC9C,IAAI,EAAE,EAAE,MAAM,EAAE;KACjB,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"GeneralDiagnostics.js","names":[],"sources":["../../src/general/GeneralDiagnostics.ts"],"sourcesContent":["import type { DiagnosticBase } from '../base/Diagnostic.js';\n\n// ---------------------------------------------------------------------------\n// General-purpose diagnostic codes\n// ---------------------------------------------------------------------------\n\n/** Generic JSON or data parse error. */\nexport type ParseErrorDiagnostic = DiagnosticBase<\n 'PARSE_ERROR',\n {\n readonly filePath?: string;\n readonly reason: string;\n }\n>;\n\n/** File system I/O error. */\nexport type IoErrorDiagnostic = DiagnosticBase<\n 'IO_ERROR',\n {\n readonly path: string;\n readonly reason: string;\n }\n>;\n\n/** Catch-all for truly unexpected situations (should be rare). */\nexport type UnknownErrorDiagnostic = DiagnosticBase<\n 'UNKNOWN_ERROR',\n {\n readonly reason: string;\n }\n>;\n\n/** Union of all general diagnostics. */\nexport type GeneralDiagnostic = ParseErrorDiagnostic | IoErrorDiagnostic | UnknownErrorDiagnostic;\n\n// ---------------------------------------------------------------------------\n// Factory helpers\n// ---------------------------------------------------------------------------\n\nexport function createParseErrorDiagnostic(reason: string, filePath?: string): ParseErrorDiagnostic {\n return {\n level: 'error',\n code: 'PARSE_ERROR',\n message: filePath ? `Parse error in \"${filePath}\": ${reason}.` : `Parse error: ${reason}.`,\n hint: 'Ensure the input is well-formed.',\n data: { filePath, reason },\n };\n}\n\nexport function createIoErrorDiagnostic(path: string, reason: string): IoErrorDiagnostic {\n return {\n level: 'error',\n code: 'IO_ERROR',\n message: `I/O error at \"${path}\": ${reason}.`,\n hint: 'Check file permissions and that the path exists.',\n data: { path, reason },\n };\n}\n\nexport function createUnknownErrorDiagnostic(reason: string): UnknownErrorDiagnostic {\n return {\n level: 'error',\n code: 'UNKNOWN_ERROR',\n message: `An unexpected error occurred: ${reason}.`,\n hint: 'If this persists, please report a bug.',\n data: { reason },\n };\n}\n"],"mappings":";AAuCA,SAAgB,2BAA2B,QAAgB,UAAyC;CAClG,OAAO;EACL,OAAO;EACP,MAAM;EACN,SAAS,WAAW,mBAAmB,SAAS,KAAK,OAAO,KAAK,gBAAgB,OAAO;EACxF,MAAM;EACN,MAAM;GAAE;GAAU;EAAO;CAC3B;AACF;AAEA,SAAgB,wBAAwB,MAAc,QAAmC;CACvF,OAAO;EACL,OAAO;EACP,MAAM;EACN,SAAS,iBAAiB,KAAK,KAAK,OAAO;EAC3C,MAAM;EACN,MAAM;GAAE;GAAM;EAAO;CACvB;AACF;AAEA,SAAgB,6BAA6B,QAAwC;CACnF,OAAO;EACL,OAAO;EACP,MAAM;EACN,SAAS,iCAAiC,OAAO;EACjD,MAAM;EACN,MAAM,EAAE,OAAO;CACjB;AACF"}
package/dist/index.d.ts CHANGED
@@ -1,33 +1,20 @@
1
- export type { DiagnosticBase, DiagnosticEmitPolicy } from './base/Diagnostic.js';
2
- export { createDiagnostic } from './base/Diagnostic.js';
3
- export { DiagnosticBag } from './base/DiagnosticBag.js';
4
- export { createDiagnosticFingerprint } from './base/DiagnosticFingerprint.js';
5
- export type { DiagnosticLevel } from './base/DiagnosticLevel.js';
6
- export type { Result, ResultFail, ResultOk } from './base/Result.js';
7
- export { fail, fromDiagnostics, ok } from './base/Result.js';
8
- export type { ConfigDiagnostic, ConfigInvalidJsonDiagnostic, ConfigInvalidValueDiagnostic, ConfigTypeMismatchDiagnostic, ConfigUnknownKeyDiagnostic, ConfigUnresolvedDefaultRegistryDiagnostic, } from './config/ConfigDiagnostics.js';
9
- export { createConfigInvalidJsonDiagnostic, createConfigInvalidValueDiagnostic, createConfigTypeMismatchDiagnostic, createConfigUnknownKeyDiagnostic, createConfigUnresolvedDefaultRegistryDiagnostic, } from './config/ConfigDiagnostics.js';
10
- export type { ControlPlaneCommandFailedDiagnostic, ControlPlaneCommandFailedDiagnosticData, ControlPlaneDiagnostic, LoginAccessDeniedDiagnostic, LoginAuthorizationResponseInvalidDiagnostic, LoginAuthorizationTimeoutDiagnostic, LoginDiagnosticByCode, LoginDiagnosticCode, LoginDiagnosticData, LoginFailedDiagnostic, LoginOAuthErrorDiagnostic, LoginReauthorizationConflictDiagnostic, } from './controlPlane/ControlPlaneDiagnostics.js';
11
- export { createControlPlaneCommandFailedDiagnostic } from './controlPlane/ControlPlaneDiagnostics.js';
12
- export type { GeneralDiagnostic, IoErrorDiagnostic, ParseErrorDiagnostic, UnknownErrorDiagnostic, } from './general/GeneralDiagnostics.js';
13
- export { createIoErrorDiagnostic, createParseErrorDiagnostic, createUnknownErrorDiagnostic, } from './general/GeneralDiagnostics.js';
14
- export type { DiskRemoveFailedDiagnostic, DownloadFailedDiagnostic, DownloadHttpStatusDiagnostic, ExtractionFailedDiagnostic, InstallerDiagnostic, IntegrityMismatchDiagnostic, NetworkRetriesExhaustedDiagnostic, NetworkTimeoutDiagnostic, } from './installer/InstallerDiagnostics.js';
15
- export { createDiskRemoveFailedDiagnostic, createDownloadFailedDiagnostic, createDownloadHttpStatusDiagnostic, createExtractionFailedDiagnostic, createIntegrityMismatchDiagnostic, createNetworkRetriesExhaustedDiagnostic, createNetworkTimeoutDiagnostic, } from './installer/InstallerDiagnostics.js';
16
- export type { DependencyNotFoundDiagnostic, ForbiddenOverridesDiagnostic, LockfileInvalidDiagnostic, LockfileMissingDiagnostic, LockfileOutOfSyncDiagnostic, ManifestDiagnostic, ManifestInvalidDiagnostic, ManifestReadErrorDiagnostic, ManifestWriteErrorDiagnostic, UnresolvedRegistryDiagnostic, } from './manifest/ManifestDiagnostics.js';
17
- export { createDependencyNotFoundDiagnostic, createForbiddenOverridesDiagnostic, createLockfileInvalidDiagnostic, createLockfileMissingDiagnostic, createLockfileOutOfSyncDiagnostic, createManifestInvalidDiagnostic, createManifestReadErrorDiagnostic, createManifestWriteErrorDiagnostic, createUnresolvedRegistryDiagnostic, } from './manifest/ManifestDiagnostics.js';
18
- export type { CyclicSymlinkDiagnostic, InvalidPathDiagnostic, LfsSkippedDiagnostic, NoFilesSelectedDiagnostic, OutFileIsDirectoryDiagnostic, PackDiagnostic, PluginRootNotFoundDiagnostic, SymlinkOutsideRootDiagnostic, UnresolvedLfsDiagnostic, UpluginMissingDiagnostic, } from './pack/PackDiagnostics.js';
19
- export { createCyclicSymlinkDiagnostic, createInvalidPathDiagnostic, createLfsSkippedDiagnostic, createNoFilesSelectedDiagnostic, createOutFileIsDirectoryDiagnostic, createPluginRootNotFoundDiagnostic, createSymlinkOutsideRootDiagnostic, createUnresolvedLfsDiagnostic, createUpluginMissingDiagnostic, } from './pack/PackDiagnostics.js';
20
- export type { PostinstallDiagnostic, PostinstallDuplicateEntryDiagnostic, PostinstallEsbuildErrorDiagnostic, PostinstallInvalidExportDiagnostic, PostinstallLoadFailedDiagnostic, PostinstallMarkerCorruptDiagnostic, PostinstallPolicyDeniedDiagnostic, } from './postinstall/PostinstallDiagnostics.js';
21
- export { createPostinstallDuplicateEntryDiagnostic, createPostinstallEsbuildErrorDiagnostic, createPostinstallInvalidExportDiagnostic, createPostinstallLoadFailedDiagnostic, createPostinstallMarkerCorruptDiagnostic, createPostinstallPolicyDeniedDiagnostic, } from './postinstall/PostinstallDiagnostics.js';
22
- export type { CacheCorruptDiagnostic, CacheIdentifierCollisionDiagnostic, CacheReadErrorDiagnostic, GitErrorDiagnostic, LockAcquisitionFailedDiagnostic, NetworkErrorDiagnostic, RegistryDiagnostic, RegistryNotFoundDiagnostic, RegistryUnreachableDiagnostic, SchemaInvalidDiagnostic, } from './registry/RegistryDiagnostics.js';
23
- export { createCacheCorruptDiagnostic, createCacheIdentifierCollisionDiagnostic, createCacheReadErrorDiagnostic, createGitErrorDiagnostic, createLockAcquisitionFailedDiagnostic, createNetworkErrorDiagnostic, createRegistryNotFoundDiagnostic, createRegistryUnreachableDiagnostic, createSchemaInvalidDiagnostic, } from './registry/RegistryDiagnostics.js';
24
- export type { RegistryToolsDependencyNotInRegistryDiagnostic, RegistryToolsDependencyRangeUnreachableDiagnostic, RegistryToolsDiagnostic, RegistryToolsExternalRegistryDeniedDiagnostic, RegistryToolsExternalRegistryNotAllowedDiagnostic, RegistryToolsIntegrityMismatchDiagnostic, RegistryToolsOfficialPolicyViolationDiagnostic, RegistryToolsPackageMissingDiagnostic, RegistryToolsPackageSourceMismatchDiagnostic, RegistryToolsPathMismatchDiagnostic, RegistryToolsReleaseFileNameInvalidDiagnostic, RegistryToolsRemovalDeniedDiagnostic, RegistryToolsUnknownKeyDiagnostic, RegistryToolsVersionExistsDiagnostic, RegistryToolsVersionNotFoundDiagnostic, RegistryToolsVersionsUnsortedDiagnostic, } from './registryTools/RegistryToolsDiagnostics.js';
25
- export { createRegistryToolsDependencyNotInRegistryDiagnostic, createRegistryToolsDependencyRangeUnreachableDiagnostic, createRegistryToolsExternalRegistryDeniedDiagnostic, createRegistryToolsExternalRegistryNotAllowedDiagnostic, createRegistryToolsIntegrityMismatchDiagnostic, createRegistryToolsOfficialPolicyViolationDiagnostic, createRegistryToolsPackageMissingDiagnostic, createRegistryToolsPackageSourceMismatchDiagnostic, createRegistryToolsPathMismatchDiagnostic, createRegistryToolsReleaseFileNameInvalidDiagnostic, createRegistryToolsRemovalDeniedDiagnostic, createRegistryToolsUnknownKeyDiagnostic, createRegistryToolsVersionExistsDiagnostic, createRegistryToolsVersionNotFoundDiagnostic, createRegistryToolsVersionsUnsortedDiagnostic, } from './registryTools/RegistryToolsDiagnostics.js';
26
- export type { CircularDepDiagnostic, PackageNotFoundDiagnostic, RegistryNameCollisionDiagnostic, ResolverDiagnostic, VersionConflictDiagnostic, VersionNotFoundDiagnostic, } from './resolver/ResolverDiagnostics.js';
27
- export { createCircularDepDiagnostic, createPackageNotFoundDiagnostic, createRegistryNameCollisionDiagnostic, createVersionConflictDiagnostic, createVersionNotFoundDiagnostic, } from './resolver/ResolverDiagnostics.js';
28
- export type { SafetyDiagnostic, SafetyOverriddenByForceDiagnostic, SafetyPathNotProjectManifestDiagnostic, SafetyTargetExistsNoManifestDiagnostic, } from './safety/SafetyDiagnostics.js';
29
- export { createSafetyOverriddenByForceDiagnostic, createSafetyPathNotProjectManifestDiagnostic, createSafetyTargetExistsNoManifestDiagnostic, } from './safety/SafetyDiagnostics.js';
30
- export type { InvalidOrgNameDiagnostic, InvalidPackageSpecDiagnostic, InvalidVersionRangeDiagnostic, SpecParseDiagnostic, } from './spec/SpecDiagnostics.js';
31
- export { createInvalidOrgNameDiagnostic, createInvalidPackageSpecDiagnostic, createInvalidVersionRangeDiagnostic, } from './spec/SpecDiagnostics.js';
32
- export type { Diagnostic, DiagnosticByCode, DiagnosticCode } from './types.js';
33
- //# sourceMappingURL=index.d.ts.map
1
+ import { DiagnosticLevel } from "./base/DiagnosticLevel.js";
2
+ import { DiagnosticBase, DiagnosticEmitPolicy, createDiagnostic } from "./base/Diagnostic.js";
3
+ import { ConfigDiagnostic, ConfigInvalidJsonDiagnostic, ConfigInvalidValueDiagnostic, ConfigTypeMismatchDiagnostic, ConfigUnknownKeyDiagnostic, ConfigUnresolvedDefaultRegistryDiagnostic, createConfigInvalidJsonDiagnostic, createConfigInvalidValueDiagnostic, createConfigTypeMismatchDiagnostic, createConfigUnknownKeyDiagnostic, createConfigUnresolvedDefaultRegistryDiagnostic } from "./config/ConfigDiagnostics.js";
4
+ import { ControlPlaneCommandFailedDiagnostic, ControlPlaneCommandFailedDiagnosticData, ControlPlaneDiagnostic, LoginAccessDeniedDiagnostic, LoginAuthorizationResponseInvalidDiagnostic, LoginAuthorizationTimeoutDiagnostic, LoginDiagnosticByCode, LoginDiagnosticCode, LoginDiagnosticData, LoginFailedDiagnostic, LoginOAuthErrorDiagnostic, LoginReauthorizationConflictDiagnostic, createControlPlaneCommandFailedDiagnostic } from "./controlPlane/ControlPlaneDiagnostics.js";
5
+ import { GeneralDiagnostic, IoErrorDiagnostic, ParseErrorDiagnostic, UnknownErrorDiagnostic, createIoErrorDiagnostic, createParseErrorDiagnostic, createUnknownErrorDiagnostic } from "./general/GeneralDiagnostics.js";
6
+ import { DiskRemoveFailedDiagnostic, DownloadFailedDiagnostic, DownloadHttpStatusDiagnostic, ExtractionFailedDiagnostic, InstallerDiagnostic, IntegrityMismatchDiagnostic, NetworkRetriesExhaustedDiagnostic, NetworkTimeoutDiagnostic, createDiskRemoveFailedDiagnostic, createDownloadFailedDiagnostic, createDownloadHttpStatusDiagnostic, createExtractionFailedDiagnostic, createIntegrityMismatchDiagnostic, createNetworkRetriesExhaustedDiagnostic, createNetworkTimeoutDiagnostic } from "./installer/InstallerDiagnostics.js";
7
+ import { DependencyNotFoundDiagnostic, ForbiddenOverridesDiagnostic, LockfileInvalidDiagnostic, LockfileMissingDiagnostic, LockfileOutOfSyncDiagnostic, ManifestDiagnostic, ManifestInvalidDiagnostic, ManifestReadErrorDiagnostic, ManifestWriteErrorDiagnostic, UnresolvedRegistryDiagnostic, createDependencyNotFoundDiagnostic, createForbiddenOverridesDiagnostic, createLockfileInvalidDiagnostic, createLockfileMissingDiagnostic, createLockfileOutOfSyncDiagnostic, createManifestInvalidDiagnostic, createManifestReadErrorDiagnostic, createManifestWriteErrorDiagnostic, createUnresolvedRegistryDiagnostic } from "./manifest/ManifestDiagnostics.js";
8
+ import { CyclicSymlinkDiagnostic, InvalidPathDiagnostic, LfsSkippedDiagnostic, NoFilesSelectedDiagnostic, OutFileIsDirectoryDiagnostic, PackDiagnostic, PluginRootNotFoundDiagnostic, SymlinkOutsideRootDiagnostic, UnresolvedLfsDiagnostic, UpluginMissingDiagnostic, createCyclicSymlinkDiagnostic, createInvalidPathDiagnostic, createLfsSkippedDiagnostic, createNoFilesSelectedDiagnostic, createOutFileIsDirectoryDiagnostic, createPluginRootNotFoundDiagnostic, createSymlinkOutsideRootDiagnostic, createUnresolvedLfsDiagnostic, createUpluginMissingDiagnostic } from "./pack/PackDiagnostics.js";
9
+ import { PostinstallDiagnostic, PostinstallDuplicateEntryDiagnostic, PostinstallEsbuildErrorDiagnostic, PostinstallInvalidExportDiagnostic, PostinstallLoadFailedDiagnostic, PostinstallMarkerCorruptDiagnostic, PostinstallPolicyDeniedDiagnostic, createPostinstallDuplicateEntryDiagnostic, createPostinstallEsbuildErrorDiagnostic, createPostinstallInvalidExportDiagnostic, createPostinstallLoadFailedDiagnostic, createPostinstallMarkerCorruptDiagnostic, createPostinstallPolicyDeniedDiagnostic } from "./postinstall/PostinstallDiagnostics.js";
10
+ import { PublishDiagnosticFact, PublishDiagnosticResource, PublishRequestFailedDiagnostic, PublishRequestFailedDiagnosticData, PublishingDiagnostic, createPublishRequestFailedDiagnostic } from "./publishing/PublishingDiagnostics.js";
11
+ import { CacheCorruptDiagnostic, CacheIdentifierCollisionDiagnostic, CacheReadErrorDiagnostic, GitErrorDiagnostic, LockAcquisitionFailedDiagnostic, NetworkErrorDiagnostic, RegistryDiagnostic, RegistryNotFoundDiagnostic, RegistryUnreachableDiagnostic, SchemaInvalidDiagnostic, createCacheCorruptDiagnostic, createCacheIdentifierCollisionDiagnostic, createCacheReadErrorDiagnostic, createGitErrorDiagnostic, createLockAcquisitionFailedDiagnostic, createNetworkErrorDiagnostic, createRegistryNotFoundDiagnostic, createRegistryUnreachableDiagnostic, createSchemaInvalidDiagnostic } from "./registry/RegistryDiagnostics.js";
12
+ import { RegistryToolsDependencyNotInRegistryDiagnostic, RegistryToolsDependencyRangeUnreachableDiagnostic, RegistryToolsDiagnostic, RegistryToolsExternalRegistryDeniedDiagnostic, RegistryToolsExternalRegistryNotAllowedDiagnostic, RegistryToolsIntegrityMismatchDiagnostic, RegistryToolsOfficialPolicyViolationDiagnostic, RegistryToolsPackageMissingDiagnostic, RegistryToolsPackageSourceMismatchDiagnostic, RegistryToolsPathMismatchDiagnostic, RegistryToolsReleaseFileNameInvalidDiagnostic, RegistryToolsRemovalDeniedDiagnostic, RegistryToolsUnknownKeyDiagnostic, RegistryToolsVersionExistsDiagnostic, RegistryToolsVersionNotFoundDiagnostic, RegistryToolsVersionsUnsortedDiagnostic, createRegistryToolsDependencyNotInRegistryDiagnostic, createRegistryToolsDependencyRangeUnreachableDiagnostic, createRegistryToolsExternalRegistryDeniedDiagnostic, createRegistryToolsExternalRegistryNotAllowedDiagnostic, createRegistryToolsIntegrityMismatchDiagnostic, createRegistryToolsOfficialPolicyViolationDiagnostic, createRegistryToolsPackageMissingDiagnostic, createRegistryToolsPackageSourceMismatchDiagnostic, createRegistryToolsPathMismatchDiagnostic, createRegistryToolsReleaseFileNameInvalidDiagnostic, createRegistryToolsRemovalDeniedDiagnostic, createRegistryToolsUnknownKeyDiagnostic, createRegistryToolsVersionExistsDiagnostic, createRegistryToolsVersionNotFoundDiagnostic, createRegistryToolsVersionsUnsortedDiagnostic } from "./registryTools/RegistryToolsDiagnostics.js";
13
+ import { CircularDepDiagnostic, PackageNotFoundDiagnostic, RegistryNameCollisionDiagnostic, ResolverDiagnostic, VersionConflictDiagnostic, VersionNotFoundDiagnostic, createCircularDepDiagnostic, createPackageNotFoundDiagnostic, createRegistryNameCollisionDiagnostic, createVersionConflictDiagnostic, createVersionNotFoundDiagnostic } from "./resolver/ResolverDiagnostics.js";
14
+ import { SafetyDiagnostic, SafetyOverriddenByForceDiagnostic, SafetyPathNotProjectManifestDiagnostic, SafetyTargetExistsNoManifestDiagnostic, createSafetyOverriddenByForceDiagnostic, createSafetyPathNotProjectManifestDiagnostic, createSafetyTargetExistsNoManifestDiagnostic } from "./safety/SafetyDiagnostics.js";
15
+ import { InvalidOrgNameDiagnostic, InvalidPackageSpecDiagnostic, InvalidVersionRangeDiagnostic, SpecParseDiagnostic, createInvalidOrgNameDiagnostic, createInvalidPackageSpecDiagnostic, createInvalidVersionRangeDiagnostic } from "./spec/SpecDiagnostics.js";
16
+ import { Diagnostic, DiagnosticByCode, DiagnosticCode } from "./types.js";
17
+ import { Result, ResultFail, ResultOk, fail, fromDiagnostics, ok } from "./base/Result.js";
18
+ import { DiagnosticBag } from "./base/DiagnosticBag.js";
19
+ import { createDiagnosticFingerprint } from "./base/DiagnosticFingerprint.js";
20
+ export { type CacheCorruptDiagnostic, type CacheIdentifierCollisionDiagnostic, type CacheReadErrorDiagnostic, type CircularDepDiagnostic, type ConfigDiagnostic, type ConfigInvalidJsonDiagnostic, type ConfigInvalidValueDiagnostic, type ConfigTypeMismatchDiagnostic, type ConfigUnknownKeyDiagnostic, type ConfigUnresolvedDefaultRegistryDiagnostic, type ControlPlaneCommandFailedDiagnostic, type ControlPlaneCommandFailedDiagnosticData, type ControlPlaneDiagnostic, type CyclicSymlinkDiagnostic, type DependencyNotFoundDiagnostic, type Diagnostic, DiagnosticBag, type DiagnosticBase, type DiagnosticByCode, type DiagnosticCode, type DiagnosticEmitPolicy, type DiagnosticLevel, type DiskRemoveFailedDiagnostic, type DownloadFailedDiagnostic, type DownloadHttpStatusDiagnostic, type ExtractionFailedDiagnostic, type ForbiddenOverridesDiagnostic, type GeneralDiagnostic, type GitErrorDiagnostic, type InstallerDiagnostic, type IntegrityMismatchDiagnostic, type InvalidOrgNameDiagnostic, type InvalidPackageSpecDiagnostic, type InvalidPathDiagnostic, type InvalidVersionRangeDiagnostic, type IoErrorDiagnostic, type LfsSkippedDiagnostic, type LockAcquisitionFailedDiagnostic, type LockfileInvalidDiagnostic, type LockfileMissingDiagnostic, type LockfileOutOfSyncDiagnostic, type LoginAccessDeniedDiagnostic, type LoginAuthorizationResponseInvalidDiagnostic, type LoginAuthorizationTimeoutDiagnostic, type LoginDiagnosticByCode, type LoginDiagnosticCode, type LoginDiagnosticData, type LoginFailedDiagnostic, type LoginOAuthErrorDiagnostic, type LoginReauthorizationConflictDiagnostic, type ManifestDiagnostic, type ManifestInvalidDiagnostic, type ManifestReadErrorDiagnostic, type ManifestWriteErrorDiagnostic, type NetworkErrorDiagnostic, type NetworkRetriesExhaustedDiagnostic, type NetworkTimeoutDiagnostic, type NoFilesSelectedDiagnostic, type OutFileIsDirectoryDiagnostic, type PackDiagnostic, type PackageNotFoundDiagnostic, type ParseErrorDiagnostic, type PluginRootNotFoundDiagnostic, type PostinstallDiagnostic, type PostinstallDuplicateEntryDiagnostic, type PostinstallEsbuildErrorDiagnostic, type PostinstallInvalidExportDiagnostic, type PostinstallLoadFailedDiagnostic, type PostinstallMarkerCorruptDiagnostic, type PostinstallPolicyDeniedDiagnostic, type PublishDiagnosticFact, type PublishDiagnosticResource, type PublishRequestFailedDiagnostic, type PublishRequestFailedDiagnosticData, type PublishingDiagnostic, type RegistryDiagnostic, type RegistryNameCollisionDiagnostic, type RegistryNotFoundDiagnostic, type RegistryToolsDependencyNotInRegistryDiagnostic, type RegistryToolsDependencyRangeUnreachableDiagnostic, type RegistryToolsDiagnostic, type RegistryToolsExternalRegistryDeniedDiagnostic, type RegistryToolsExternalRegistryNotAllowedDiagnostic, type RegistryToolsIntegrityMismatchDiagnostic, type RegistryToolsOfficialPolicyViolationDiagnostic, type RegistryToolsPackageMissingDiagnostic, type RegistryToolsPackageSourceMismatchDiagnostic, type RegistryToolsPathMismatchDiagnostic, type RegistryToolsReleaseFileNameInvalidDiagnostic, type RegistryToolsRemovalDeniedDiagnostic, type RegistryToolsUnknownKeyDiagnostic, type RegistryToolsVersionExistsDiagnostic, type RegistryToolsVersionNotFoundDiagnostic, type RegistryToolsVersionsUnsortedDiagnostic, type RegistryUnreachableDiagnostic, type ResolverDiagnostic, type Result, type ResultFail, type ResultOk, type SafetyDiagnostic, type SafetyOverriddenByForceDiagnostic, type SafetyPathNotProjectManifestDiagnostic, type SafetyTargetExistsNoManifestDiagnostic, type SchemaInvalidDiagnostic, type SpecParseDiagnostic, type SymlinkOutsideRootDiagnostic, type UnknownErrorDiagnostic, type UnresolvedLfsDiagnostic, type UnresolvedRegistryDiagnostic, type UpluginMissingDiagnostic, type VersionConflictDiagnostic, type VersionNotFoundDiagnostic, createCacheCorruptDiagnostic, createCacheIdentifierCollisionDiagnostic, createCacheReadErrorDiagnostic, createCircularDepDiagnostic, createConfigInvalidJsonDiagnostic, createConfigInvalidValueDiagnostic, createConfigTypeMismatchDiagnostic, createConfigUnknownKeyDiagnostic, createConfigUnresolvedDefaultRegistryDiagnostic, createControlPlaneCommandFailedDiagnostic, createCyclicSymlinkDiagnostic, createDependencyNotFoundDiagnostic, createDiagnostic, createDiagnosticFingerprint, createDiskRemoveFailedDiagnostic, createDownloadFailedDiagnostic, createDownloadHttpStatusDiagnostic, createExtractionFailedDiagnostic, createForbiddenOverridesDiagnostic, createGitErrorDiagnostic, createIntegrityMismatchDiagnostic, createInvalidOrgNameDiagnostic, createInvalidPackageSpecDiagnostic, createInvalidPathDiagnostic, createInvalidVersionRangeDiagnostic, createIoErrorDiagnostic, createLfsSkippedDiagnostic, createLockAcquisitionFailedDiagnostic, createLockfileInvalidDiagnostic, createLockfileMissingDiagnostic, createLockfileOutOfSyncDiagnostic, createManifestInvalidDiagnostic, createManifestReadErrorDiagnostic, createManifestWriteErrorDiagnostic, createNetworkErrorDiagnostic, createNetworkRetriesExhaustedDiagnostic, createNetworkTimeoutDiagnostic, createNoFilesSelectedDiagnostic, createOutFileIsDirectoryDiagnostic, createPackageNotFoundDiagnostic, createParseErrorDiagnostic, createPluginRootNotFoundDiagnostic, createPostinstallDuplicateEntryDiagnostic, createPostinstallEsbuildErrorDiagnostic, createPostinstallInvalidExportDiagnostic, createPostinstallLoadFailedDiagnostic, createPostinstallMarkerCorruptDiagnostic, createPostinstallPolicyDeniedDiagnostic, createPublishRequestFailedDiagnostic, createRegistryNameCollisionDiagnostic, createRegistryNotFoundDiagnostic, createRegistryToolsDependencyNotInRegistryDiagnostic, createRegistryToolsDependencyRangeUnreachableDiagnostic, createRegistryToolsExternalRegistryDeniedDiagnostic, createRegistryToolsExternalRegistryNotAllowedDiagnostic, createRegistryToolsIntegrityMismatchDiagnostic, createRegistryToolsOfficialPolicyViolationDiagnostic, createRegistryToolsPackageMissingDiagnostic, createRegistryToolsPackageSourceMismatchDiagnostic, createRegistryToolsPathMismatchDiagnostic, createRegistryToolsReleaseFileNameInvalidDiagnostic, createRegistryToolsRemovalDeniedDiagnostic, createRegistryToolsUnknownKeyDiagnostic, createRegistryToolsVersionExistsDiagnostic, createRegistryToolsVersionNotFoundDiagnostic, createRegistryToolsVersionsUnsortedDiagnostic, createRegistryUnreachableDiagnostic, createSafetyOverriddenByForceDiagnostic, createSafetyPathNotProjectManifestDiagnostic, createSafetyTargetExistsNoManifestDiagnostic, createSchemaInvalidDiagnostic, createSymlinkOutsideRootDiagnostic, createUnknownErrorDiagnostic, createUnresolvedLfsDiagnostic, createUnresolvedRegistryDiagnostic, createUpluginMissingDiagnostic, createVersionConflictDiagnostic, createVersionNotFoundDiagnostic, fail, fromDiagnostics, ok };