runtime-resolver 0.3.12 → 0.3.14

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 (67) hide show
  1. package/bin/runtime-resolver.d.ts +1 -0
  2. package/bin/runtime-resolver.js +29 -261
  3. package/cli/commands/resolve.js +239 -0
  4. package/cli/schemas/json-schema.js +12 -0
  5. package/cli/schemas/response.js +86 -0
  6. package/data/bun-defaults.js +850 -0
  7. package/data/deno-defaults.js +1526 -0
  8. package/data/node-defaults.js +4400 -0
  9. package/errors/AuthenticationError.js +35 -0
  10. package/errors/CacheError.js +32 -0
  11. package/errors/FreshnessError.js +38 -0
  12. package/errors/InvalidInputError.js +33 -0
  13. package/errors/NetworkError.js +34 -0
  14. package/errors/ParseError.js +33 -0
  15. package/errors/RateLimitError.js +39 -0
  16. package/errors/VersionNotFoundError.js +37 -0
  17. package/index.d.ts +2577 -2608
  18. package/index.js +158 -132
  19. package/layers/AutoBunCacheLive.js +47 -0
  20. package/layers/AutoDenoCacheLive.js +47 -0
  21. package/layers/AutoNodeCacheLive.js +58 -0
  22. package/layers/BunReleaseCacheLive.js +25 -0
  23. package/layers/BunResolverLive.js +85 -0
  24. package/layers/BunVersionFetcherLive.js +55 -0
  25. package/layers/DenoReleaseCacheLive.js +25 -0
  26. package/layers/DenoResolverLive.js +84 -0
  27. package/layers/DenoVersionFetcherLive.js +51 -0
  28. package/layers/FreshBunCacheLive.js +60 -0
  29. package/layers/FreshDenoCacheLive.js +60 -0
  30. package/layers/FreshNodeCacheLive.js +55 -0
  31. package/layers/GitHubAppAuth.js +58 -0
  32. package/layers/GitHubAutoAuth.js +70 -0
  33. package/layers/GitHubClientLive.js +130 -0
  34. package/layers/GitHubTokenAuth.js +50 -0
  35. package/layers/NodeReleaseCacheLive.js +77 -0
  36. package/layers/NodeResolverLive.js +107 -0
  37. package/layers/NodeScheduleFetcherLive.js +37 -0
  38. package/layers/NodeVersionFetcherLive.js +55 -0
  39. package/layers/OfflineBunCacheLive.js +40 -0
  40. package/layers/OfflineDenoCacheLive.js +40 -0
  41. package/layers/OfflineNodeCacheLive.js +39 -0
  42. package/layers/RuntimeCacheLive.js +78 -0
  43. package/lib/retry.js +27 -0
  44. package/lib/semver.js +21 -0
  45. package/package.json +57 -68
  46. package/schemas/bun-release.js +61 -0
  47. package/schemas/deno-release.js +61 -0
  48. package/schemas/github.js +74 -0
  49. package/schemas/node-release.js +130 -0
  50. package/schemas/node-schedule.js +110 -0
  51. package/schemas/node.js +68 -0
  52. package/services/BunReleaseCache.js +33 -0
  53. package/services/BunResolver.js +36 -0
  54. package/services/BunVersionFetcher.js +41 -0
  55. package/services/DenoReleaseCache.js +33 -0
  56. package/services/DenoResolver.js +36 -0
  57. package/services/DenoVersionFetcher.js +41 -0
  58. package/services/GitHubClient.js +40 -0
  59. package/services/NodeReleaseCache.js +41 -0
  60. package/services/NodeResolver.js +44 -0
  61. package/services/NodeScheduleFetcher.js +38 -0
  62. package/services/NodeVersionFetcher.js +39 -0
  63. package/services/OctokitInstance.js +44 -0
  64. package/tsdoc-metadata.json +11 -11
  65. package/612.js +0 -23
  66. package/711.js +0 -7554
  67. package/json-schema.js +0 -95
package/json-schema.js DELETED
@@ -1,95 +0,0 @@
1
- import { __webpack_require__ } from "./612.js";
2
- import { JSONSchema, Schema } from "effect";
3
- var json_schema_namespaceObject = {};
4
- __webpack_require__.r(json_schema_namespaceObject);
5
- __webpack_require__.d(json_schema_namespaceObject, {
6
- cliJsonSchema: ()=>cliJsonSchema
7
- });
8
- const CliErrorDetail = Schema.Struct({
9
- _tag: Schema.String.annotations({
10
- description: "Error type identifier (e.g. RateLimitError, SemverError)"
11
- }),
12
- message: Schema.String.annotations({
13
- description: "Human-readable error message"
14
- })
15
- }).pipe(Schema.extend(Schema.Record({
16
- key: Schema.String,
17
- value: Schema.Unknown.annotations({
18
- description: "Additional error-specific metadata",
19
- title: "ErrorMetadata"
20
- })
21
- })), Schema.annotations({
22
- identifier: "CliErrorDetail",
23
- description: "Structured error with type tag, message, and optional metadata"
24
- }));
25
- const CliRuntimeSuccess = Schema.Struct({
26
- ok: Schema.Literal(true).annotations({
27
- description: "Indicates successful resolution"
28
- }),
29
- source: Schema.String.annotations({
30
- description: "Data source: 'api' or 'cache'"
31
- }),
32
- versions: Schema.Array(Schema.String.annotations({
33
- description: "Semver version string"
34
- })).annotations({
35
- description: "All resolved versions matching the semver range"
36
- }),
37
- latest: Schema.String.annotations({
38
- description: "Most recent version matching the range"
39
- }),
40
- lts: Schema.optional(Schema.String.annotations({
41
- description: "Current LTS version (Node.js only)"
42
- })),
43
- default: Schema.optional(Schema.String.annotations({
44
- description: "Default recommended version"
45
- }))
46
- }).annotations({
47
- identifier: "CliRuntimeSuccess",
48
- description: "Successful version resolution for a single runtime"
49
- });
50
- const CliRuntimeError = Schema.Struct({
51
- ok: Schema.Literal(false).annotations({
52
- description: "Indicates failed resolution"
53
- }),
54
- error: CliErrorDetail
55
- }).annotations({
56
- identifier: "CliRuntimeError",
57
- description: "Failed version resolution for a single runtime"
58
- });
59
- const CliRuntimeResult = Schema.Union(CliRuntimeSuccess, CliRuntimeError).annotations({
60
- identifier: "CliRuntimeResult",
61
- description: "Per-runtime resolution result: either success with versions or error with details"
62
- });
63
- const CliResultsMap = Schema.Record({
64
- key: Schema.String.annotations({
65
- description: "Runtime name (node, bun, or deno)"
66
- }),
67
- value: CliRuntimeResult
68
- }).annotations({
69
- description: "Map of runtime name to resolution result"
70
- });
71
- const CliSuccessResponse = Schema.Struct({
72
- ok: Schema.Literal(true).annotations({
73
- description: "True when all requested runtimes resolved successfully"
74
- }),
75
- results: CliResultsMap
76
- }).annotations({
77
- identifier: "CliSuccessResponse",
78
- description: "All requested runtimes resolved successfully"
79
- });
80
- const CliErrorResponse = Schema.Struct({
81
- ok: Schema.Literal(false).annotations({
82
- description: "False when one or more requested runtimes failed to resolve"
83
- }),
84
- results: CliResultsMap
85
- }).annotations({
86
- identifier: "CliErrorResponse",
87
- description: "One or more requested runtimes failed to resolve"
88
- });
89
- const CliResponse = Schema.Union(CliSuccessResponse, CliErrorResponse).annotations({
90
- identifier: "CliResponse",
91
- title: "RuntimeResolverResponse",
92
- description: "CLI response envelope. Contains an ok discriminator and a results map with per-runtime resolution outcomes."
93
- });
94
- const cliJsonSchema = JSONSchema.make(CliResponse);
95
- export { json_schema_namespaceObject };