codarch 0.3.0-alpha.2 → 0.3.1-alpha.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.
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ de arquitectura para PR/CI.
|
|
|
6
6
|
|
|
7
7
|
> [!IMPORTANT]
|
|
8
8
|
> **🧪 Alpha.** La funcionalidad está ✓; el producto todavía no ✓. Las versiones llevan prerelease ✓
|
|
9
|
-
> (`0.3.
|
|
9
|
+
> (`0.3.1-alpha.2` ✓) y **no hay soporte** ✓. Lo que **sí** es estable ✓: el modelo `cc.json` 2.x ✓
|
|
10
10
|
> y su checksum ✓.
|
|
11
11
|
|
|
12
12
|
## Instalación
|
package/index.js
CHANGED
|
@@ -96,7 +96,46 @@ async function checkSource(current, source, fetchImpl) {
|
|
|
96
96
|
url: `https://www.npmjs.com/package/${source.package}`
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
|
-
const
|
|
99
|
+
const releasesUrl = `${GITHUB_API}/repos/${source.repo}/releases`;
|
|
100
|
+
if (source.includePrereleases) {
|
|
101
|
+
const url2 = `${releasesUrl}?per_page=100`;
|
|
102
|
+
const respuesta2 = await fetchImpl(url2, {
|
|
103
|
+
headers: { accept: "application/vnd.github+json" }
|
|
104
|
+
});
|
|
105
|
+
if (!respuesta2.ok) {
|
|
106
|
+
return { ...base, error: `${respuesta2.status} en ${url2}` };
|
|
107
|
+
}
|
|
108
|
+
const cuerpo2 = await respuesta2.json();
|
|
109
|
+
if (!Array.isArray(cuerpo2)) {
|
|
110
|
+
return { ...base, error: `la respuesta de ${url2} no trae releases` };
|
|
111
|
+
}
|
|
112
|
+
let best = null;
|
|
113
|
+
for (const item of cuerpo2) {
|
|
114
|
+
if (typeof item !== "object" || item === null) continue;
|
|
115
|
+
const release = item;
|
|
116
|
+
if (release.draft === true || typeof release.tag_name !== "string") {
|
|
117
|
+
continue;
|
|
118
|
+
}
|
|
119
|
+
const version3 = versionInTag(release.tag_name);
|
|
120
|
+
if (!parseVersion(version3)) continue;
|
|
121
|
+
if (!best || compareVersions(version3, best.version) > 0) {
|
|
122
|
+
best = {
|
|
123
|
+
version: version3,
|
|
124
|
+
url: typeof release.html_url === "string" ? release.html_url : null
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
if (!best) {
|
|
129
|
+
return { ...base, error: `la respuesta de ${url2} no trae versiones` };
|
|
130
|
+
}
|
|
131
|
+
return {
|
|
132
|
+
...base,
|
|
133
|
+
latest: best.version,
|
|
134
|
+
outdated: isOutdated(best.version, current),
|
|
135
|
+
url: best.url ?? `https://github.com/${source.repo}/releases`
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
const url = `${releasesUrl}/latest`;
|
|
100
139
|
const respuesta = await fetchImpl(url, {
|
|
101
140
|
headers: { accept: "application/vnd.github+json" }
|
|
102
141
|
});
|
|
@@ -7631,7 +7670,7 @@ import path11 from "node:path";
|
|
|
7631
7670
|
import { fileURLToPath } from "node:url";
|
|
7632
7671
|
|
|
7633
7672
|
// apps/cli/src/version.ts
|
|
7634
|
-
var VERSION = true ? "0.3.
|
|
7673
|
+
var VERSION = true ? "0.3.1-alpha.2" : "0.0.0";
|
|
7635
7674
|
|
|
7636
7675
|
// apps/cli/src/commands/serve.ts
|
|
7637
7676
|
var MIME = {
|