mirror of
https://github.com/storytold/artcraft-services.git
synced 2026-11-28 14:18:42 -08:00
feat(linux-repos): support -nightly packages pointing at latest nightly releases (#418)
## Summary
Add support for `<app>-nightly` packages across the APT (`/apt`), RPM
(`/rpm`), and Arch (`/arch`) Linux repositories in
`artcraft-website-next`, always pointing at the newest published nightly
GitHub prerelease per repository regardless of its release tag.
## Changes
- **`crafting-app-releases.ts`**: Add `CraftNightlyRelease` and
`CRAFT_NIGHTLY_RELEASES` (initially `{}`).
- **`linux-repos.ts`**:
- Resolve `<pkg>-nightly-<version>-linux-<arch>.{deb,rpm,pkg.tar.zst}`
(and `.sig`/`.asc` signatures) against `CRAFT_NIGHTLY_RELEASES` using
each entry's exact GitHub release `tag`.
- Support `tagOverride` in `getShaSums`, `fetchValidatedSha256`,
`computePackageMetadata`, `durablePackageMetadata`,
`getLinuxPackageMetadata`, and `build{Deb,Rpm,Arch}Assets`.
- Emit `<app>-nightly` packages in `getLinuxRepoApps` (with
`ai.artcraft.app-nightly` / `ai.storyteller.<app>-nightly` for Pacman so
they install alongside stable).
- **`update-craft-release-versions.yml`**: Add a `latestNightlyRelease`
pass that scans each repo's published `prerelease: true` GitHub releases
(newest first, regardless of tag format) for `SHA256SUMS.txt` and
`<slug>-nightly-...` Linux packages, and updates
`CRAFT_NIGHTLY_RELEASES`.
- **`tests/linux-repos.spec.ts`**: Add unit test coverage for resolving
`-nightly` Linux package and signature URLs regardless of GitHub release
tag.
## Verification
- `next typegen && npm run typecheck` passed.
- `npx playwright test tests/linux-repos.spec.ts`: 28/29 passed (the 1
browser-based mobile tab test failed locally due to missing
`/opt/google/chrome/chrome` in this environment).
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **New Features**
* Nightly Linux packages are available for ArtCraft Studio, Craft
Launcher, and supported Crafting Apps when a matching release is
published.
* Packages are offered in Debian, RPM, and Arch formats where available,
with release-specific versions and checksums. Supported package
architectures include x86_64 and aarch64, with riscv64 also supported
for Debian and RPM packages.
* The catalog reflects the newest published nightly release with
compatible package assets; products without a matching release are not
listed.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
1 parent
fa0b36986c
commit
16141903a3
31 files changed
+405
-171
No files matched your search
@@ -42,7 +42,8 @@ jobs:
|
||||
BRANCH_SLUG="$(echo "${BRANCH_NAME}" | tr '/_.' '-' | tr '[:upper:]' '[:lower:]' | sed -E 's/[^a-z0-9-]+//g; s/^-+|-+$//g')"
|
||||
# A DNS label is at most 63 characters: past that the preview host is not this slug, so wait for the bot comment's URL instead.
|
||||
DEPLOY_URL=""
|
||||
if [[ ${#BRANCH_SLUG} -le 63 ]]; then DEPLOY_URL="https://${BRANCH_SLUG}.getartcraft.dev"; fi
|
||||
PREVIEW_LABEL="${BRANCH_SLUG}-artcraft-services"
|
||||
if [[ ${#PREVIEW_LABEL} -le 63 ]]; then DEPLOY_URL="https://${PREVIEW_LABEL}.brandon-396.workers.dev"; fi
|
||||
echo "Awaiting Cloudflare deploy preview for PR #${PR_NUMBER} (branch ${BRANCH_NAME}, commit ${TARGET_SHA})..."
|
||||
else
|
||||
TARGET_SHA="$COMMIT_SHA"
|
||||
|
||||
@@ -344,6 +344,63 @@ jobs:
|
||||
|
||||
fs.writeFileSync(file, content);
|
||||
|
||||
// Update nightly releases (newest published prerelease per repo with -nightly Linux packages,
|
||||
// regardless of tag format).
|
||||
async function latestNightlyRelease(repo, fileSlug = repo) {
|
||||
const releases = await github.paginate(
|
||||
github.rest.repos.listReleases,
|
||||
{ owner, repo, per_page: 30 },
|
||||
response => response.data
|
||||
);
|
||||
const nightlyPkgPrefix = `${fileSlug}-nightly-`;
|
||||
const linuxAssetPattern = new RegExp(
|
||||
`^${nightlyPkgPrefix.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}(.+)-linux-(?:(?:x86_64|aarch64|riscv64)\\.(?:deb|rpm)|(?:x86_64|aarch64)\\.pkg\\.tar\\.zst)$`
|
||||
);
|
||||
const published = releases
|
||||
.filter(r => !r.draft && r.prerelease)
|
||||
.sort((a, b) => new Date(b.published_at || b.created_at) - new Date(a.published_at || a.created_at));
|
||||
for (const rel of published) {
|
||||
const names = new Set((rel.assets || []).map(a => a.name));
|
||||
if (!names.has("SHA256SUMS.txt")) continue;
|
||||
for (const name of names) {
|
||||
const m = name.match(linuxAssetPattern);
|
||||
if (m) {
|
||||
return { tag: rel.tag_name, version: m[1] };
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
const nightlyTargets = [
|
||||
{ key: studio.repo, repo: studio.repo, fileSlug: studio.fileSlug },
|
||||
{ key: launcher.fileSlug, repo: launcher.repo, fileSlug: launcher.fileSlug },
|
||||
...apps.map(app => ({ key: app, repo: app, fileSlug: app })),
|
||||
];
|
||||
const nightlyEntries = {};
|
||||
for (const target of nightlyTargets) {
|
||||
const found = await latestNightlyRelease(target.repo, target.fileSlug);
|
||||
if (found) {
|
||||
nightlyEntries[target.key] = found;
|
||||
}
|
||||
}
|
||||
|
||||
const nightlyBlockPattern =
|
||||
/(export const CRAFT_NIGHTLY_RELEASES:\s*Partial<[\s\S]*?>\s*=\s*)\{[\s\S]*?\};/;
|
||||
if (!nightlyBlockPattern.test(content)) {
|
||||
throw new Error("Could not find CRAFT_NIGHTLY_RELEASES in crafting-app-releases.ts.");
|
||||
}
|
||||
const formattedNightlies = Object.keys(nightlyEntries).length === 0
|
||||
? "{}"
|
||||
: `{\n${Object.entries(nightlyEntries)
|
||||
.map(([k, v]) => {
|
||||
const keyStr = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(k) ? k : JSON.stringify(k);
|
||||
return ` ${keyStr}: { tag: ${JSON.stringify(v.tag)}, version: ${JSON.stringify(v.version)} },`;
|
||||
})
|
||||
.join("\n")}\n}`;
|
||||
content = content.replace(nightlyBlockPattern, (_, prefix) => `${prefix}${formattedNightlies};`);
|
||||
fs.writeFileSync(file, content);
|
||||
|
||||
core.info("Release versions updated successfully.");
|
||||
|
||||
- name: Create or update pull request
|
||||
|
||||
Generated
+35
-75
@@ -58,7 +58,7 @@ dependencies = [
|
||||
"http 0.2.11",
|
||||
"httparse",
|
||||
"httpdate",
|
||||
"itoa 1.0.11",
|
||||
"itoa",
|
||||
"language-tags",
|
||||
"local-channel",
|
||||
"mime",
|
||||
@@ -209,7 +209,7 @@ dependencies = [
|
||||
"futures-core",
|
||||
"futures-util",
|
||||
"impl-more 0.1.6",
|
||||
"itoa 1.0.11",
|
||||
"itoa",
|
||||
"language-tags",
|
||||
"log",
|
||||
"mime",
|
||||
@@ -1034,7 +1034,7 @@ dependencies = [
|
||||
"http 0.2.11",
|
||||
"http-body 0.4.6",
|
||||
"hyper 0.14.28",
|
||||
"itoa 1.0.11",
|
||||
"itoa",
|
||||
"matchit",
|
||||
"memchr",
|
||||
"mime",
|
||||
@@ -1802,7 +1802,7 @@ checksum = "f86b9c4c00838774a6d902ef931eff7470720c51d90c2e32cfe15dc304737b3f"
|
||||
dependencies = [
|
||||
"castaway",
|
||||
"cfg-if",
|
||||
"itoa 1.0.11",
|
||||
"itoa",
|
||||
"ryu",
|
||||
"static_assertions",
|
||||
]
|
||||
@@ -2251,7 +2251,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe"
|
||||
dependencies = [
|
||||
"csv-core",
|
||||
"itoa 1.0.11",
|
||||
"itoa",
|
||||
"ryu",
|
||||
"serde",
|
||||
]
|
||||
@@ -2736,7 +2736,8 @@ dependencies = [
|
||||
"log",
|
||||
"mimetypes",
|
||||
"mysql_queries",
|
||||
"r2d2_redis",
|
||||
"r2d2",
|
||||
"redis",
|
||||
"reusable_types",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
@@ -2768,12 +2769,6 @@ dependencies = [
|
||||
"syn 2.0.117",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dtoa"
|
||||
version = "0.4.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0"
|
||||
|
||||
[[package]]
|
||||
name = "dummy-service"
|
||||
version = "0.0.1"
|
||||
@@ -2972,7 +2967,8 @@ dependencies = [
|
||||
"jobs_common",
|
||||
"log",
|
||||
"mysql_queries",
|
||||
"r2d2_redis",
|
||||
"r2d2",
|
||||
"redis",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
@@ -4011,7 +4007,7 @@ checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"fnv",
|
||||
"itoa 1.0.11",
|
||||
"itoa",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4022,7 +4018,7 @@ checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"fnv",
|
||||
"itoa 1.0.11",
|
||||
"itoa",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4171,7 +4167,7 @@ dependencies = [
|
||||
"http-body 0.4.6",
|
||||
"httparse",
|
||||
"httpdate",
|
||||
"itoa 1.0.11",
|
||||
"itoa",
|
||||
"pin-project-lite",
|
||||
"socket2 0.5.10",
|
||||
"tokio",
|
||||
@@ -4193,7 +4189,7 @@ dependencies = [
|
||||
"http 1.3.1",
|
||||
"http-body 1.0.1",
|
||||
"httparse",
|
||||
"itoa 1.0.11",
|
||||
"itoa",
|
||||
"pin-project-lite",
|
||||
"smallvec",
|
||||
"tokio",
|
||||
@@ -4609,8 +4605,9 @@ dependencies = [
|
||||
"opentelemetry-otlp",
|
||||
"opentelemetry_sdk",
|
||||
"primitives",
|
||||
"r2d2_redis",
|
||||
"r2d2",
|
||||
"rand 0.8.5",
|
||||
"redis",
|
||||
"redis_common",
|
||||
"redis_schema",
|
||||
"reqwest 0.12.23",
|
||||
@@ -4724,12 +4721,6 @@ dependencies = [
|
||||
"either",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "itoa"
|
||||
version = "0.4.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4"
|
||||
|
||||
[[package]]
|
||||
name = "itoa"
|
||||
version = "1.0.11"
|
||||
@@ -4804,7 +4795,8 @@ dependencies = [
|
||||
"chrono",
|
||||
"errors",
|
||||
"log",
|
||||
"r2d2_redis",
|
||||
"r2d2",
|
||||
"redis",
|
||||
"redis_common",
|
||||
"workspace-build-acceleration",
|
||||
]
|
||||
@@ -5143,7 +5135,7 @@ version = "0.1.1"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"futures 0.1.31",
|
||||
"redis 1.0.2",
|
||||
"redis",
|
||||
"time",
|
||||
"version-sync",
|
||||
"workspace-build-acceleration",
|
||||
@@ -5535,7 +5527,7 @@ version = "0.1.42"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "08ec68bf2ad170a53a6efa92c3df7187968d6e475fe7a935725868154074ca0f"
|
||||
dependencies = [
|
||||
"itoa 1.0.11",
|
||||
"itoa",
|
||||
"mini-internal",
|
||||
"ryu",
|
||||
]
|
||||
@@ -6796,16 +6788,6 @@ dependencies = [
|
||||
"scheduled-thread-pool",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "r2d2_redis"
|
||||
version = "0.14.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "182473b876b0b93e353682ec58e207dd1cb4a62278bbe0045fe52b86b74363bb"
|
||||
dependencies = [
|
||||
"r2d2",
|
||||
"redis 0.20.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand"
|
||||
version = "0.4.6"
|
||||
@@ -7045,21 +7027,6 @@ dependencies = [
|
||||
"rand_core 0.3.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redis"
|
||||
version = "0.20.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d4f0ceb2ec0dd769483ecd283f6615aa83dcd0be556d5294c6e659caefe7cc54"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"combine",
|
||||
"dtoa",
|
||||
"itoa 0.4.8",
|
||||
"percent-encoding",
|
||||
"sha1 0.6.1",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redis"
|
||||
version = "1.0.2"
|
||||
@@ -7072,7 +7039,7 @@ dependencies = [
|
||||
"combine",
|
||||
"crc16",
|
||||
"futures-util",
|
||||
"itoa 1.0.11",
|
||||
"itoa",
|
||||
"log",
|
||||
"num-bigint",
|
||||
"percent-encoding",
|
||||
@@ -7097,7 +7064,7 @@ version = "0.0.1"
|
||||
dependencies = [
|
||||
"errors",
|
||||
"r2d2",
|
||||
"redis 1.0.2",
|
||||
"redis",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
@@ -7126,7 +7093,7 @@ dependencies = [
|
||||
"enums",
|
||||
"errors",
|
||||
"r2d2",
|
||||
"redis 1.0.2",
|
||||
"redis",
|
||||
"serde",
|
||||
"tokens",
|
||||
"url",
|
||||
@@ -7973,7 +7940,7 @@ checksum = "0946d52b4b7e28823148aebbeceb901012c595ad737920d504fa8634bb099e6f"
|
||||
dependencies = [
|
||||
"form_urlencoded",
|
||||
"indexmap 2.13.0",
|
||||
"itoa 1.0.11",
|
||||
"itoa",
|
||||
"ryu",
|
||||
"serde_core",
|
||||
]
|
||||
@@ -7985,7 +7952,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86"
|
||||
dependencies = [
|
||||
"indexmap 2.13.0",
|
||||
"itoa 1.0.11",
|
||||
"itoa",
|
||||
"memchr",
|
||||
"serde",
|
||||
"serde_core",
|
||||
@@ -7998,7 +7965,7 @@ version = "0.1.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4beec8bce849d58d06238cb50db2e1c417cfeafa4c63f692b15c82b7c80f8335"
|
||||
dependencies = [
|
||||
"itoa 1.0.11",
|
||||
"itoa",
|
||||
"serde",
|
||||
]
|
||||
|
||||
@@ -8069,7 +8036,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
|
||||
dependencies = [
|
||||
"form_urlencoded",
|
||||
"itoa 1.0.11",
|
||||
"itoa",
|
||||
"ryu",
|
||||
"serde",
|
||||
]
|
||||
@@ -8103,7 +8070,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47"
|
||||
dependencies = [
|
||||
"indexmap 2.13.0",
|
||||
"itoa 1.0.11",
|
||||
"itoa",
|
||||
"ryu",
|
||||
"serde",
|
||||
"unsafe-libyaml",
|
||||
@@ -8141,15 +8108,6 @@ dependencies = [
|
||||
"workspace-build-acceleration",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sha1"
|
||||
version = "0.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770"
|
||||
dependencies = [
|
||||
"sha1_smol",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sha1"
|
||||
version = "0.10.6"
|
||||
@@ -8524,7 +8482,7 @@ dependencies = [
|
||||
"hex",
|
||||
"hkdf",
|
||||
"hmac 0.12.1",
|
||||
"itoa 1.0.11",
|
||||
"itoa",
|
||||
"log",
|
||||
"md-5 0.10.6",
|
||||
"memchr",
|
||||
@@ -8566,7 +8524,7 @@ dependencies = [
|
||||
"hkdf",
|
||||
"hmac 0.12.1",
|
||||
"home",
|
||||
"itoa 1.0.11",
|
||||
"itoa",
|
||||
"log",
|
||||
"md-5 0.10.6",
|
||||
"memchr",
|
||||
@@ -8717,7 +8675,7 @@ dependencies = [
|
||||
"primitives",
|
||||
"r2d2",
|
||||
"rand 0.9.2",
|
||||
"redis 1.0.2",
|
||||
"redis",
|
||||
"redis_caching",
|
||||
"redis_common",
|
||||
"redis_schema",
|
||||
@@ -9477,7 +9435,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
|
||||
dependencies = [
|
||||
"deranged",
|
||||
"itoa 1.0.11",
|
||||
"itoa",
|
||||
"num-conv",
|
||||
"powerfmt",
|
||||
"serde",
|
||||
@@ -9939,7 +9897,8 @@ dependencies = [
|
||||
"jobs_common",
|
||||
"log",
|
||||
"mysql_queries",
|
||||
"r2d2_redis",
|
||||
"r2d2",
|
||||
"redis",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
@@ -9972,7 +9931,8 @@ dependencies = [
|
||||
"log",
|
||||
"memory_caching",
|
||||
"mysql_queries",
|
||||
"r2d2_redis",
|
||||
"r2d2",
|
||||
"redis",
|
||||
"reqwest 0.12.23",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
|
||||
@@ -314,7 +314,6 @@ md-5 = "0.10.6" # insecure but used for gravatar
|
||||
mockall = "0.12.1"
|
||||
once_cell = "1.21.4"
|
||||
r2d2 = "0.8.10"
|
||||
r2d2_redis = "0.14.0"
|
||||
rand = "0.9.1"
|
||||
redis = { version = "1.0.2", features = ["r2d2", "tokio-rustls-comp", "tokio-comp", "cluster-async", "aio"] }
|
||||
regex = "1.12.3"
|
||||
|
||||
@@ -30,4 +30,5 @@ redis_common = { path = "../../schema/database/redis_common" }
|
||||
anyhow = { workspace = true }
|
||||
chrono = { version = "0.4.22", features = ["serde"] }
|
||||
log = "0.4.14"
|
||||
r2d2_redis.workspace = true
|
||||
r2d2.workspace = true
|
||||
redis.workspace = true
|
||||
@@ -1,6 +1,5 @@
|
||||
use r2d2_redis::{r2d2, RedisConnectionManager};
|
||||
use r2d2_redis::r2d2::PooledConnection;
|
||||
use r2d2_redis::redis::Commands;
|
||||
use r2d2::PooledConnection;
|
||||
use redis::{Client, Commands};
|
||||
|
||||
use errors::AnyhowResult;
|
||||
use redis_common::redis_keys::RedisKeys;
|
||||
@@ -9,24 +8,24 @@ use crate::job_progress_reporter::job_progress_reporter::{JobProgressReporter, J
|
||||
|
||||
/// A job progress reporter that reports to Redis
|
||||
pub struct RedisJobProgressReporterBuilder {
|
||||
redis_pool: r2d2::Pool<RedisConnectionManager>,
|
||||
redis_pool: r2d2::Pool<Client>,
|
||||
}
|
||||
|
||||
/// A job progress reporter that reports to Redis
|
||||
pub struct RedisJobProgressReporter {
|
||||
redis: PooledConnection<RedisConnectionManager>,
|
||||
redis: PooledConnection<Client>,
|
||||
redis_key: String,
|
||||
}
|
||||
|
||||
impl RedisJobProgressReporterBuilder {
|
||||
pub fn from_redis_pool(redis_pool: r2d2::Pool<RedisConnectionManager>) -> Self {
|
||||
pub fn from_redis_pool(redis_pool: r2d2::Pool<Client>) -> Self {
|
||||
Self {
|
||||
redis_pool,
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a new instance. The backing Redis pool is Sync/Send behind an Arc.
|
||||
fn create_instance(redis_pool: r2d2::Pool<RedisConnectionManager>, redis_key: String) -> AnyhowResult<Box<dyn JobProgressReporter>> {
|
||||
fn create_instance(redis_pool: r2d2::Pool<Client>, redis_key: String) -> AnyhowResult<Box<dyn JobProgressReporter>> {
|
||||
let redis = redis_pool.get()?;
|
||||
|
||||
Ok(Box::new(RedisJobProgressReporter {
|
||||
@@ -37,7 +36,7 @@ impl RedisJobProgressReporterBuilder {
|
||||
}
|
||||
|
||||
impl RedisJobProgressReporter {
|
||||
pub const STATUS_KEY_TTL_SECONDS : usize = 60 * 60;
|
||||
pub const STATUS_KEY_TTL_SECONDS : u64 = 60 * 60;
|
||||
}
|
||||
|
||||
impl JobProgressReporterBuilder for RedisJobProgressReporterBuilder {
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
use r2d2_redis::r2d2::PooledConnection;
|
||||
use r2d2_redis::redis::Commands;
|
||||
use r2d2_redis::RedisConnectionManager;
|
||||
use r2d2::PooledConnection;
|
||||
use redis::{Client, Commands};
|
||||
|
||||
use errors::AnyhowResult;
|
||||
use redis_common::redis_keys::RedisKeys;
|
||||
|
||||
#[deprecated(note="Use JobProgressReporterBuilder")]
|
||||
pub type RedisPool = PooledConnection<RedisConnectionManager>;
|
||||
pub type RedisPool = PooledConnection<Client>;
|
||||
|
||||
#[deprecated(note="Use JobProgressReporterBuilder")]
|
||||
pub struct RedisJobStatusLogger <'a> {
|
||||
@@ -15,7 +14,7 @@ pub struct RedisJobStatusLogger <'a> {
|
||||
}
|
||||
|
||||
impl <'a> RedisJobStatusLogger <'a> {
|
||||
pub const STATUS_KEY_TTL_SECONDS : usize = 60 * 60;
|
||||
pub const STATUS_KEY_TTL_SECONDS : u64 = 60 * 60;
|
||||
|
||||
#[deprecated(note="Use JobProgressReporterBuilder")]
|
||||
pub fn new_tts_download(redis: &'a mut RedisPool, tts_job_token: &str) -> Self {
|
||||
|
||||
@@ -55,7 +55,8 @@ zip = "0.6.6"
|
||||
sqlx = { version = "0.7.4", features = [ "mysql", "runtime-tokio-rustls", "chrono" ] }
|
||||
|
||||
# Redis
|
||||
r2d2_redis.workspace = true
|
||||
r2d2.workspace = true
|
||||
redis.workspace = true
|
||||
|
||||
# Runtime
|
||||
# NB: We switched to Tokio from `async-std` for broader ecosystem support.
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
use r2d2_redis::r2d2;
|
||||
use r2d2_redis::RedisConnectionManager;
|
||||
use redis::Client;
|
||||
use sqlx::MySqlPool;
|
||||
|
||||
use bootstrap::bootstrap::ContainerEnvironment;
|
||||
@@ -31,7 +30,7 @@ pub struct JobState {
|
||||
pub download_temp_directory: PathBuf,
|
||||
pub mysql_pool: MySqlPool,
|
||||
|
||||
pub redis_pool: r2d2::Pool<RedisConnectionManager>,
|
||||
pub redis_pool: r2d2::Pool<Client>,
|
||||
|
||||
pub public_bucket_client: LegacyBucketClient,
|
||||
pub private_bucket_client: LegacyBucketClient,
|
||||
|
||||
@@ -22,8 +22,7 @@ use std::path::PathBuf;
|
||||
use std::time::Duration;
|
||||
|
||||
use log::info;
|
||||
use r2d2_redis::r2d2;
|
||||
use r2d2_redis::RedisConnectionManager;
|
||||
use redis::Client;
|
||||
use sqlx::mysql::MySqlPoolOptions;
|
||||
use tokio::runtime::Runtime;
|
||||
|
||||
@@ -326,7 +325,7 @@ async fn main() -> AnyhowResult<()> {
|
||||
info!("Connecting to redis...");
|
||||
|
||||
let redis_connection_string = env_get_redis_0_connection_string_or_default();
|
||||
let redis_manager = RedisConnectionManager::new(redis_connection_string.as_str())?;
|
||||
let redis_manager = Client::open(redis_connection_string.as_str())?;
|
||||
|
||||
let redis_pool = r2d2::Pool::builder()
|
||||
.build(redis_manager)?;
|
||||
|
||||
@@ -41,7 +41,8 @@ log = { workspace = true }
|
||||
sqlx = { version = "0.7.4", features = [ "mysql", "runtime-tokio-rustls", "chrono" ] }
|
||||
|
||||
# Redis
|
||||
r2d2_redis.workspace = true
|
||||
r2d2.workspace = true
|
||||
redis.workspace = true
|
||||
|
||||
# HTTP Server
|
||||
actix-web = { workspace = true }
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
use r2d2_redis::r2d2;
|
||||
use r2d2_redis::RedisConnectionManager;
|
||||
use redis::Client;
|
||||
use sqlx::MySqlPool;
|
||||
|
||||
use bootstrap::bootstrap::ContainerEnvironment;
|
||||
@@ -23,13 +22,13 @@ pub struct JobDependencies {
|
||||
// site to proactively kill their inference jobs and save on worker quota.
|
||||
// On local dev we probably don't care about Redis at all, and on on-prem workers, we cannot
|
||||
// connect to production Redis easily (requires lots of setup - ghosttunnel or something + IP rules)
|
||||
pub maybe_redis_pool: Option<r2d2::Pool<RedisConnectionManager>>,
|
||||
pub maybe_redis_pool: Option<r2d2::Pool<Client>>,
|
||||
|
||||
pub email_sender: SmtpEmailSender,
|
||||
|
||||
pub server_environment: ServerEnvironment,
|
||||
|
||||
pub maybe_keepalive_redis_pool: Option<r2d2::Pool<RedisConnectionManager>>,
|
||||
pub maybe_keepalive_redis_pool: Option<r2d2::Pool<Client>>,
|
||||
|
||||
pub job_progress_reporter: Box<dyn JobProgressReporterBuilder>,
|
||||
|
||||
|
||||
@@ -20,8 +20,7 @@
|
||||
|
||||
use anyhow::anyhow;
|
||||
use log::{info, warn};
|
||||
use r2d2_redis::r2d2;
|
||||
use r2d2_redis::RedisConnectionManager;
|
||||
use redis::Client;
|
||||
use sqlx::mysql::MySqlPoolOptions;
|
||||
|
||||
use bootstrap::bootstrap::{bootstrap, BootstrapArgs};
|
||||
@@ -102,7 +101,7 @@ async fn main() -> AnyhowResult<()> {
|
||||
},
|
||||
Some(redis_connection_string) => {
|
||||
info!("Connecting to Redis to use for reporting job progress... {}", redis_connection_string);
|
||||
let redis_manager = RedisConnectionManager::new(redis_connection_string)?;
|
||||
let redis_manager = Client::open(redis_connection_string)?;
|
||||
let redis_pool = r2d2::Pool::builder().build(redis_manager)?;
|
||||
|
||||
Box::new(RedisJobProgressReporterBuilder::from_redis_pool(redis_pool))
|
||||
@@ -113,7 +112,7 @@ async fn main() -> AnyhowResult<()> {
|
||||
match easyenv::get_env_string_optional("REDIS_FOR_KEEPALIVE_URL") {
|
||||
None => None,
|
||||
Some(redis_url) => {
|
||||
let redis_manager = RedisConnectionManager::new(redis_url)?;
|
||||
let redis_manager = Client::open(redis_url)?;
|
||||
let redis_pool = r2d2::Pool::builder().build(redis_manager)?;
|
||||
Some(redis_pool)
|
||||
}
|
||||
|
||||
@@ -67,7 +67,8 @@ tempdir.workspace = true
|
||||
sqlx = { version = "0.7.4", features = [ "mysql", "runtime-tokio-rustls", "chrono" ] }
|
||||
|
||||
# Redis
|
||||
r2d2_redis.workspace = true
|
||||
r2d2.workspace = true
|
||||
redis.workspace = true
|
||||
|
||||
# Runtime
|
||||
# NB: We switched to Tokio from `async-std` for broader ecosystem support.
|
||||
|
||||
@@ -3,7 +3,7 @@ use std::time::Instant;
|
||||
use anyhow::anyhow;
|
||||
use log::{debug, error, info, warn};
|
||||
use opentelemetry::KeyValue as OtelAttribute;
|
||||
use r2d2_redis::redis::Commands;
|
||||
use redis::Commands;
|
||||
|
||||
use enums::by_table::generic_inference_jobs::inference_category::InferenceCategory;
|
||||
use enums::by_table::generic_inference_jobs::inference_job_type::InferenceJobType;
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ use std::time::{Duration, Instant};
|
||||
use anyhow::{anyhow, Result};
|
||||
use log::{error, info, warn};
|
||||
use oneshot::channel;
|
||||
use r2d2_redis::redis::Commands;
|
||||
use redis::Commands;
|
||||
use tokio::sync::oneshot;
|
||||
|
||||
use bucket_paths::legacy::remote_file_manager_paths::remote_cloud_bucket_details::RemoteCloudBucketDetails;
|
||||
|
||||
+5
-6
@@ -1,9 +1,8 @@
|
||||
use chrono::Utc;
|
||||
use log::debug;
|
||||
use once_cell::sync::Lazy;
|
||||
use r2d2_redis::r2d2::Pool;
|
||||
use r2d2_redis::redis::Commands;
|
||||
use r2d2_redis::RedisConnectionManager;
|
||||
use r2d2::Pool;
|
||||
use redis::{Client, Commands};
|
||||
use std::cmp::PartialEq;
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::path::PathBuf;
|
||||
@@ -212,7 +211,7 @@ pub struct PreviewProcessor {
|
||||
base_directory: PathBuf,
|
||||
bucket_directory: MediaFileBucketDirectory,
|
||||
expected_frame_count: u32,
|
||||
redis_pool: Pool<RedisConnectionManager>,
|
||||
redis_pool: Pool<Client>,
|
||||
shutdown_receiver: oneshot::Receiver<()>,
|
||||
}
|
||||
|
||||
@@ -458,7 +457,7 @@ impl StageDirectoryState {
|
||||
impl PreviewProcessor {
|
||||
pub fn new(
|
||||
inference_job_token: InferenceJobToken,
|
||||
redis_pool: r2d2_redis::r2d2::Pool<RedisConnectionManager>,
|
||||
redis_pool: Pool<Client>,
|
||||
base_directory: PathBuf,
|
||||
bucket_directory: MediaFileBucketDirectory,
|
||||
expected_frame_count: u32,
|
||||
@@ -630,7 +629,7 @@ impl PreviewProcessor {
|
||||
|
||||
let key = StyleTransferProgressKey::new_for_job_id(self.job_id.clone());
|
||||
let ttl = StyleTransferProgressKey::get_redis_ttl();
|
||||
let expire_at = ttl.num_seconds() as usize;
|
||||
let expire_at = std::convert::TryFrom::try_from(ttl.num_seconds().max(0)).unwrap_or(0u64);
|
||||
|
||||
let _r: String = redis.set_ex(key.to_string(), serde_json::to_string(&status).unwrap(), expire_at).unwrap();
|
||||
}
|
||||
|
||||
@@ -22,8 +22,7 @@ use std::path::PathBuf;
|
||||
use std::time::Duration;
|
||||
|
||||
use log::{info, warn};
|
||||
use r2d2_redis::r2d2;
|
||||
use r2d2_redis::RedisConnectionManager;
|
||||
use redis::Client;
|
||||
use sqlx::mysql::MySqlPoolOptions;
|
||||
|
||||
use bootstrap::bootstrap::{bootstrap, BootstrapArgs};
|
||||
@@ -202,7 +201,7 @@ async fn main() -> AnyhowResult<()> {
|
||||
},
|
||||
Some(redis_connection_string) => {
|
||||
info!("Connecting to Redis to use for reporting job progress... {}", redis_connection_string);
|
||||
let redis_manager = RedisConnectionManager::new(redis_connection_string)?;
|
||||
let redis_manager = Client::open(redis_connection_string)?;
|
||||
let redis_pool = r2d2::Pool::builder().build(redis_manager)?;
|
||||
|
||||
Box::new(RedisJobProgressReporterBuilder::from_redis_pool(redis_pool))
|
||||
@@ -217,7 +216,7 @@ async fn main() -> AnyhowResult<()> {
|
||||
},
|
||||
Some(redis_url) => {
|
||||
info!("Connecting to Redis for keepalive signals... {}", redis_url);
|
||||
let redis_manager = RedisConnectionManager::new(redis_url)?;
|
||||
let redis_manager = Client::open(redis_url)?;
|
||||
let redis_pool = r2d2::Pool::builder().build(redis_manager)?;
|
||||
Some(redis_pool)
|
||||
}
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
|
||||
use std::path::PathBuf;
|
||||
|
||||
use r2d2_redis::r2d2;
|
||||
use r2d2_redis::RedisConnectionManager;
|
||||
use redis::Client;
|
||||
use sqlx::MySqlPool;
|
||||
|
||||
use bootstrap::bootstrap::ContainerEnvironment;
|
||||
@@ -129,9 +128,9 @@ pub struct DatabaseDependencies {
|
||||
// site to proactively kill their inference jobs and save on worker quota.
|
||||
// On local dev we probably don't care about Redis at all, and on on-prem workers, we cannot
|
||||
// connect to production Redis easily (requires lots of setup - ghosttunnel or something + IP rules)
|
||||
pub maybe_redis_pool: Option<r2d2::Pool<RedisConnectionManager>>,
|
||||
pub maybe_redis_pool: Option<r2d2::Pool<Client>>,
|
||||
|
||||
pub maybe_keepalive_redis_pool: Option<r2d2::Pool<RedisConnectionManager>>,
|
||||
pub maybe_keepalive_redis_pool: Option<r2d2::Pool<Client>>,
|
||||
}
|
||||
|
||||
pub struct BucketDependencies {
|
||||
|
||||
@@ -46,7 +46,8 @@ tempdir.workspace = true
|
||||
sqlx = { version = "0.7.4", features = [ "mysql", "runtime-tokio-rustls", "chrono" ] }
|
||||
|
||||
# Redis
|
||||
r2d2_redis.workspace = true
|
||||
r2d2.workspace = true
|
||||
redis.workspace = true
|
||||
|
||||
# Runtime
|
||||
tokio.workspace = true
|
||||
|
||||
@@ -22,8 +22,7 @@ use std::time::Duration;
|
||||
use anyhow::anyhow;
|
||||
use chrono::Utc;
|
||||
use log::{error, info, warn};
|
||||
use r2d2_redis::r2d2;
|
||||
use r2d2_redis::RedisConnectionManager;
|
||||
use redis::Client;
|
||||
use sqlx::mysql::MySqlPoolOptions;
|
||||
use sqlx::MySqlPool;
|
||||
use tempdir::TempDir;
|
||||
@@ -72,7 +71,7 @@ struct Downloader {
|
||||
pub download_temp_directory: PathBuf,
|
||||
pub mysql_pool: MySqlPool,
|
||||
|
||||
pub redis_pool: r2d2::Pool<RedisConnectionManager>,
|
||||
pub redis_pool: r2d2::Pool<Client>,
|
||||
|
||||
pub bucket_client: LegacyBucketClient,
|
||||
pub firehose_publisher: FirehosePublisher,
|
||||
@@ -167,7 +166,7 @@ async fn main() -> AnyhowResult<()> {
|
||||
info!("Connecting to redis...");
|
||||
|
||||
let redis_connection_string = env_get_redis_0_connection_string_or_default();
|
||||
let redis_manager = RedisConnectionManager::new(redis_connection_string.as_str())?;
|
||||
let redis_manager = Client::open(redis_connection_string.as_str())?;
|
||||
|
||||
let redis_pool = r2d2::Pool::builder()
|
||||
.build(redis_manager)?;
|
||||
|
||||
@@ -46,7 +46,8 @@ tempdir.workspace = true
|
||||
sqlx = { version = "0.7.4", features = [ "mysql", "runtime-tokio-rustls", "chrono" ] }
|
||||
|
||||
# Redis
|
||||
r2d2_redis.workspace = true
|
||||
r2d2.workspace = true
|
||||
redis.workspace = true
|
||||
|
||||
# Runtime
|
||||
tokio.workspace = true
|
||||
|
||||
@@ -20,8 +20,7 @@ use std::path::PathBuf;
|
||||
use std::time::Duration;
|
||||
|
||||
use log::{error, info, warn};
|
||||
use r2d2_redis::r2d2;
|
||||
use r2d2_redis::RedisConnectionManager;
|
||||
use redis::Client;
|
||||
use sqlx::mysql::MySqlPoolOptions;
|
||||
use sqlx::MySqlPool;
|
||||
|
||||
@@ -264,7 +263,7 @@ async fn main() -> AnyhowResult<()> {
|
||||
},
|
||||
Some(redis_connection_string) => {
|
||||
info!("Connecting to Redis to use for reporting job progress... {}", redis_connection_string);
|
||||
let redis_manager = RedisConnectionManager::new(redis_connection_string)?;
|
||||
let redis_manager = Client::open(redis_connection_string)?;
|
||||
let redis_pool = r2d2::Pool::builder().build(redis_manager)?;
|
||||
|
||||
Box::new(RedisJobProgressReporterBuilder::from_redis_pool(redis_pool))
|
||||
|
||||
@@ -16,5 +16,6 @@
|
||||
"pattern": "storyteller-docs.artcraft.team",
|
||||
"custom_domain": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"previews": {}
|
||||
}
|
||||
@@ -19,5 +19,6 @@
|
||||
"pattern": "dashboard.artcraft.team",
|
||||
"custom_domain": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"previews": {}
|
||||
}
|
||||
@@ -13,5 +13,6 @@
|
||||
"pattern": "app.getartcraft.com",
|
||||
"custom_domain": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"previews": {}
|
||||
}
|
||||
@@ -257,3 +257,16 @@ export const CRAFT_APP_RELEASES: Record<CraftAppSlug, CraftRelease | null> = {
|
||||
gridcraft: craftRelease("0.19.1"),
|
||||
"craft-anything": craftRelease("0.6.1"),
|
||||
};
|
||||
|
||||
export type CraftNightlyRelease = {
|
||||
/** Exact GitHub release tag of the latest nightly prerelease (any tag format). */
|
||||
tag: string;
|
||||
/** Package version used in the `-nightly-<version>-linux-<arch>` filenames. */
|
||||
version: string;
|
||||
};
|
||||
|
||||
// Updated automatically by `.github/workflows/update-craft-release-versions.yml` from the
|
||||
// newest published nightly prerelease per repository, regardless of its tag name.
|
||||
export const CRAFT_NIGHTLY_RELEASES: Partial<
|
||||
Record<CraftAppSlug | "artcraft-launcher" | "artcraft", CraftNightlyRelease>
|
||||
> = {};
|
||||
@@ -13,6 +13,7 @@ import {
|
||||
} from "./craft-launcher";
|
||||
import {
|
||||
CRAFT_LAUNCHER_RELEASE,
|
||||
CRAFT_NIGHTLY_RELEASES,
|
||||
} from "./crafting-app-releases";
|
||||
import { isRepoSigningConfigured } from "./repo-signing";
|
||||
|
||||
@@ -137,6 +138,73 @@ export function getRequestBaseUrl(request: Request): string {
|
||||
return "https://getartcraft.com";
|
||||
}
|
||||
|
||||
type NightlyRepoEntry = {
|
||||
slug: string;
|
||||
repo: string;
|
||||
baseName: string;
|
||||
packageName: string;
|
||||
tag: string;
|
||||
version: string;
|
||||
description: string;
|
||||
section: string;
|
||||
};
|
||||
|
||||
const NIGHTLY_LINUX_SUFFIXES = [
|
||||
"-linux-x86_64.deb",
|
||||
"-linux-aarch64.deb",
|
||||
"-linux-riscv64.deb",
|
||||
"-linux-x86_64.rpm",
|
||||
"-linux-aarch64.rpm",
|
||||
"-linux-riscv64.rpm",
|
||||
"-linux-x86_64.pkg.tar.zst",
|
||||
"-linux-aarch64.pkg.tar.zst",
|
||||
] as const;
|
||||
|
||||
export function getNightlyRepoEntries(): NightlyRepoEntry[] {
|
||||
const entries: NightlyRepoEntry[] = [];
|
||||
const studioNightly = CRAFT_NIGHTLY_RELEASES.artcraft;
|
||||
if (studioNightly) {
|
||||
entries.push({
|
||||
slug: "artcraft",
|
||||
repo: "artcraft",
|
||||
baseName: "artcraft",
|
||||
packageName: "artcraft-nightly",
|
||||
tag: studioNightly.tag,
|
||||
version: studioNightly.version,
|
||||
description: "ArtCraft Studio (Nightly): AI image and video creation.",
|
||||
section: "graphics",
|
||||
});
|
||||
}
|
||||
const launcherNightly = CRAFT_NIGHTLY_RELEASES["artcraft-launcher"];
|
||||
if (launcherNightly) {
|
||||
entries.push({
|
||||
slug: "artcraft-launcher",
|
||||
repo: "craft-launcher",
|
||||
baseName: "artcraft-launcher",
|
||||
packageName: "artcraft-launcher-nightly",
|
||||
tag: launcherNightly.tag,
|
||||
version: launcherNightly.version,
|
||||
description: "ArtCraft Launcher (Nightly): install, update and run native Crafting apps.",
|
||||
section: "utils",
|
||||
});
|
||||
}
|
||||
for (const app of CRAFTING_APPS) {
|
||||
const nightly = CRAFT_NIGHTLY_RELEASES[app.slug];
|
||||
if (!nightly) continue;
|
||||
entries.push({
|
||||
slug: app.slug,
|
||||
repo: app.slug,
|
||||
baseName: app.slug,
|
||||
packageName: `${app.slug}-nightly`,
|
||||
tag: nightly.tag,
|
||||
version: nightly.version,
|
||||
description: `${craftAppName(app)} (Nightly): ${app.lede || app.pitch}`,
|
||||
section: getAppSection(app.schemaCategory, app.slug),
|
||||
});
|
||||
}
|
||||
return entries;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve package file download request strictly to catalogued GitHub Release binary asset.
|
||||
* Uncatalogued filenames return null to preserve clean 404 behavior and block unauthorized redirects.
|
||||
@@ -158,6 +226,13 @@ export function resolvePackageDownloadUrl(filename: string): string | null {
|
||||
if (match) return match.href;
|
||||
}
|
||||
|
||||
for (const nightly of getNightlyRepoEntries()) {
|
||||
const prefix = `${nightly.packageName}-${nightly.version}`;
|
||||
if (NIGHTLY_LINUX_SUFFIXES.some((suffix) => filename === `${prefix}${suffix}`)) {
|
||||
return `https://github.com/storytold/${nightly.repo}/releases/download/${encodeURIComponent(nightly.tag)}/${filename}`;
|
||||
}
|
||||
}
|
||||
|
||||
// Signature assets sit next to the package they cover and are not part of the download manifest,
|
||||
// so derive them from the package they sign instead of listing every signature separately.
|
||||
const signatureSuffix = PACKAGE_SIGNATURE_SUFFIXES.find((suffix) => filename.endsWith(suffix));
|
||||
@@ -182,7 +257,9 @@ export async function isPackageSignaturePublished(filename: string): Promise<boo
|
||||
return false;
|
||||
}
|
||||
|
||||
const releases: Array<{ repo: string; version: string }> = [{ repo: "artcraft", version: ARTCRAFT_STUDIO_RELEASE.version }];
|
||||
const releases: Array<{ repo: string; version: string; tag?: string }> = [
|
||||
{ repo: "artcraft", version: ARTCRAFT_STUDIO_RELEASE.version },
|
||||
];
|
||||
if (CRAFT_LAUNCHER_RELEASE) {
|
||||
releases.push({ repo: "craft-launcher", version: CRAFT_LAUNCHER_RELEASE.version });
|
||||
}
|
||||
@@ -192,10 +269,13 @@ export async function isPackageSignaturePublished(filename: string): Promise<boo
|
||||
releases.push({ repo: app.slug, version: release.version });
|
||||
}
|
||||
}
|
||||
for (const nightly of getNightlyRepoEntries()) {
|
||||
releases.push({ repo: nightly.repo, version: nightly.version, tag: nightly.tag });
|
||||
}
|
||||
|
||||
for (const release of releases) {
|
||||
try {
|
||||
const sums = await getShaSums(release.repo, release.version);
|
||||
const sums = await getShaSums(release.repo, release.version, release.tag);
|
||||
if (sums.has(filename)) {
|
||||
return true;
|
||||
}
|
||||
@@ -230,14 +310,15 @@ const shaSumsCache = new Map<string, Promise<Map<string, string>>>();
|
||||
// In-memory cache for package metadata (filename -> LinuxPackageAssetMeta)
|
||||
const packageMetaCache = new Map<string, Promise<LinuxPackageAssetMeta>>();
|
||||
|
||||
async function getShaSums(repo: string, version: string): Promise<Map<string, string>> {
|
||||
const key = `${repo}:${version}`;
|
||||
async function getShaSums(repo: string, version: string, tagOverride?: string): Promise<Map<string, string>> {
|
||||
const tag = tagOverride ?? `${repo === "artcraft" ? "artcraft-v" : "v"}${version}`;
|
||||
const key = `${repo}:${tag}`;
|
||||
let promise = shaSumsCache.get(key);
|
||||
if (!promise) {
|
||||
promise = (async () => {
|
||||
const url = `https://github.com/storytold/${repo}/releases/download/${repo === "artcraft" ? "artcraft-v" : "v"}${version}/SHA256SUMS.txt`;
|
||||
const url = `https://github.com/storytold/${repo}/releases/download/${encodeURIComponent(tag)}/SHA256SUMS.txt`;
|
||||
const res = await fetch(url, { signal: AbortSignal.timeout(10_000) });
|
||||
if (!res.ok) throw new Error(`Unable to fetch checksums for ${repo} ${version}: ${res.status}`);
|
||||
if (!res.ok) throw new Error(`Unable to fetch checksums for ${repo} ${tag}: ${res.status}`);
|
||||
const text = await res.text();
|
||||
const map = new Map<string, string>();
|
||||
for (const line of text.split("\n")) {
|
||||
@@ -575,8 +656,13 @@ async function fetchArchPackageInfo(downloadUrl: string, filename: string): Prom
|
||||
/**
|
||||
* Fetches and validates the SHA-256 digest from SHA256SUMS.txt.
|
||||
*/
|
||||
async function fetchValidatedSha256(repo: string, version: string, filename: string): Promise<string> {
|
||||
const sumsMap = await getShaSums(repo, version);
|
||||
async function fetchValidatedSha256(
|
||||
repo: string,
|
||||
version: string,
|
||||
filename: string,
|
||||
tagOverride?: string,
|
||||
): Promise<string> {
|
||||
const sumsMap = await getShaSums(repo, version, tagOverride);
|
||||
const sha256 = sumsMap.get(filename);
|
||||
if (!sha256 || !/^[a-fA-F0-9]{64}$/.test(sha256) || /^0+$/.test(sha256)) {
|
||||
throw new Error(`Missing or invalid checksum for ${filename}`);
|
||||
@@ -595,13 +681,14 @@ async function computePackageMetadata(
|
||||
repo: string,
|
||||
version: string,
|
||||
knownSha256?: string,
|
||||
tagOverride?: string,
|
||||
): Promise<ComputedPackageMetadata> {
|
||||
const downloadUrl = resolvePackageDownloadUrl(filename);
|
||||
if (!downloadUrl) {
|
||||
throw new Error(`Package asset not found in release catalog: ${filename}`);
|
||||
}
|
||||
|
||||
const sha256 = knownSha256 ?? await fetchValidatedSha256(repo, version, filename);
|
||||
const sha256 = knownSha256 ?? await fetchValidatedSha256(repo, version, filename, tagOverride);
|
||||
|
||||
if (filename.endsWith(".pkg.tar.zst")) {
|
||||
const archInfo = await fetchArchPackageInfo(downloadUrl, filename);
|
||||
@@ -633,8 +720,8 @@ class EstimatedArchMetadataError extends Error {
|
||||
* are both misses.
|
||||
*/
|
||||
const durablePackageMetadata = unstable_cache(
|
||||
async (filename: string, repo: string, version: string, sha256: string) => {
|
||||
const metadata = await computePackageMetadata(filename, repo, version, sha256);
|
||||
async (filename: string, repo: string, version: string, sha256: string, tagOverride?: string) => {
|
||||
const metadata = await computePackageMetadata(filename, repo, version, sha256, tagOverride);
|
||||
if (metadata.estimated) {
|
||||
throw new EstimatedArchMetadataError(metadata);
|
||||
}
|
||||
@@ -652,22 +739,23 @@ export async function getLinuxPackageMetadata(
|
||||
filename: string,
|
||||
repo: string,
|
||||
version: string,
|
||||
tagOverride?: string,
|
||||
): Promise<LinuxPackageAssetMeta> {
|
||||
const sha256 = await fetchValidatedSha256(repo, version, filename);
|
||||
const sha256 = await fetchValidatedSha256(repo, version, filename, tagOverride);
|
||||
// Include the digest so a same-name re-upload is a miss in the per-process cache too.
|
||||
const cacheKey = `${filename}:${sha256}`;
|
||||
let promise = packageMetaCache.get(cacheKey);
|
||||
if (!promise) {
|
||||
promise = (async () => {
|
||||
try {
|
||||
return await durablePackageMetadata(filename, repo, version, sha256);
|
||||
return await durablePackageMetadata(filename, repo, version, sha256, tagOverride);
|
||||
} catch (error) {
|
||||
if (error instanceof EstimatedArchMetadataError) {
|
||||
// Serve the estimate now, but leave it to the per-process cache rather than persisting it.
|
||||
return error.metadata;
|
||||
}
|
||||
// The data cache can be unavailable (no cache handler, disabled in preview); read directly.
|
||||
return computePackageMetadata(filename, repo, version, sha256);
|
||||
return computePackageMetadata(filename, repo, version, sha256, tagOverride);
|
||||
}
|
||||
})();
|
||||
packageMetaCache.set(cacheKey, promise);
|
||||
@@ -699,6 +787,7 @@ async function buildDebAssets(
|
||||
name: string,
|
||||
repo: string,
|
||||
version: string,
|
||||
tagOverride?: string,
|
||||
): Promise<LinuxRepoApp["debAssets"]> {
|
||||
const debArchMap: DebArchMapItem[] = [
|
||||
{ debArch: "amd64", fileArch: "x86_64" },
|
||||
@@ -706,11 +795,12 @@ async function buildDebAssets(
|
||||
{ debArch: "riscv64", fileArch: "riscv64" },
|
||||
];
|
||||
|
||||
const sums = await getShaSums(repo, version);
|
||||
const sums = await getShaSums(repo, version, tagOverride);
|
||||
const candidates = debArchMap.filter(({ fileArch }) => sums.has(`${name}-${version}-linux-${fileArch}.deb`));
|
||||
|
||||
const baseName = name.replace(/-nightly$/, "");
|
||||
const baseDepends = "libc6 (>= 2.35), libgcc-s1, libxkbcommon0, libxkbcommon-x11-0, libwayland-client0, libx11-6, libx11-xcb1, libxcb1, libxcursor1, libxi6, libvulkan1 | libegl1";
|
||||
const defaultDepends = AUDIO_APPS.has(name)
|
||||
const defaultDepends = AUDIO_APPS.has(baseName)
|
||||
? `${baseDepends}, libasound2 | libasound2t64`
|
||||
: baseDepends;
|
||||
const defaultRecommends = "mesa-vulkan-drivers, libegl-mesa0, xdg-desktop-portal";
|
||||
@@ -718,12 +808,12 @@ async function buildDebAssets(
|
||||
const results = await Promise.all(
|
||||
candidates.map(async ({ debArch, fileArch }) => {
|
||||
const filename = `${name}-${version}-linux-${fileArch}.deb`;
|
||||
const meta = await getLinuxPackageMetadata(filename, repo, version);
|
||||
const meta = await getLinuxPackageMetadata(filename, repo, version, tagOverride);
|
||||
const glibcVer = debArch === "riscv64" ? "2.39" : "2.35";
|
||||
let depends = defaultDepends;
|
||||
if (name === "artcraft") {
|
||||
if (baseName === "artcraft") {
|
||||
depends = `libc6 (>= ${glibcVer}), libgcc-s1, libgtk-3-0, libwebkit2gtk-4.1-0, libssl3`;
|
||||
} else if (name === "artcraft-launcher" && debArch === "riscv64") {
|
||||
} else if (baseName === "artcraft-launcher" && debArch === "riscv64") {
|
||||
depends = "libc6 (>= 2.39), libgcc-s1, libxkbcommon0, libxkbcommon-x11-0, libwayland-client0, libx11-6, libx11-xcb1, libxcb1, libxcursor1, libxi6, libvulkan1 | libegl1";
|
||||
}
|
||||
return {
|
||||
@@ -772,22 +862,24 @@ async function buildRpmAssets(
|
||||
name: string,
|
||||
repo: string,
|
||||
version: string,
|
||||
tagOverride?: string,
|
||||
): Promise<LinuxRepoApp["rpmAssets"]> {
|
||||
const arches: RpmPackageArch[] = ["x86_64", "aarch64", "riscv64"];
|
||||
const sums = await getShaSums(repo, version);
|
||||
const sums = await getShaSums(repo, version, tagOverride);
|
||||
const candidates = arches.filter((arch) => sums.has(`${name}-${version}-linux-${arch}.rpm`));
|
||||
const baseName = name.replace(/-nightly$/, "");
|
||||
|
||||
const results = await Promise.all(
|
||||
candidates.map(async (arch) => {
|
||||
const filename = `${name}-${version}-linux-${arch}.rpm`;
|
||||
const meta = await getLinuxPackageMetadata(filename, repo, version);
|
||||
const glibcVer = (["artcraft-launcher", "artcraft"].includes(name) && arch === "riscv64") ? "2.39" : "2.35";
|
||||
const audioRequires: RpmRequire[] = AUDIO_APPS.has(name)
|
||||
const meta = await getLinuxPackageMetadata(filename, repo, version, tagOverride);
|
||||
const glibcVer = (["artcraft-launcher", "artcraft"].includes(baseName) && arch === "riscv64") ? "2.39" : "2.35";
|
||||
const audioRequires: RpmRequire[] = AUDIO_APPS.has(baseName)
|
||||
? [{ name: "alsa-lib" }, { name: "libasound.so.2()(64bit)" }]
|
||||
: [];
|
||||
const requires: RpmRequire[] = [
|
||||
{ name: "glibc", flags: "GE", epoch: 0, ver: glibcVer },
|
||||
...(name === "artcraft" ? [
|
||||
...(baseName === "artcraft" ? [
|
||||
{ name: "libgtk-3.so.0()(64bit)" },
|
||||
{ name: "libwebkit2gtk-4.1.so.0()(64bit)" },
|
||||
{ name: "libssl.so.3()(64bit)" },
|
||||
@@ -814,15 +906,16 @@ async function buildArchAssets(
|
||||
name: string,
|
||||
repo: string,
|
||||
version: string,
|
||||
tagOverride?: string,
|
||||
): Promise<LinuxRepoApp["archAssets"]> {
|
||||
const sums = await getShaSums(repo, version);
|
||||
const sums = await getShaSums(repo, version, tagOverride);
|
||||
const candidates: ArchPackageArch[] = (["x86_64", "aarch64"] as ArchPackageArch[])
|
||||
.filter((arch) => sums.has(`${name}-${version}-linux-${arch}.pkg.tar.zst`));
|
||||
|
||||
const results = await Promise.all(
|
||||
candidates.map(async (arch) => {
|
||||
const filename = `${name}-${version}-linux-${arch}.pkg.tar.zst`;
|
||||
const meta = await getLinuxPackageMetadata(filename, repo, version);
|
||||
const meta = await getLinuxPackageMetadata(filename, repo, version, tagOverride);
|
||||
return {
|
||||
arch,
|
||||
filename,
|
||||
@@ -928,6 +1021,30 @@ export async function getLinuxRepoApps(formats?: RepoFormatFilter): Promise<Linu
|
||||
})());
|
||||
}
|
||||
|
||||
// Nightly packages (`<app>-nightly`) pointing at the latest nightly prerelease per repo.
|
||||
for (const nightly of getNightlyRepoEntries()) {
|
||||
appPromises.push((async () => {
|
||||
const [debAssets, rpmAssets, archAssets] = await Promise.all([
|
||||
includeDeb ? buildDebAssets(nightly.packageName, nightly.repo, nightly.version, nightly.tag) : Promise.resolve([]),
|
||||
includeRpm ? buildRpmAssets(nightly.packageName, nightly.repo, nightly.version, nightly.tag) : Promise.resolve([]),
|
||||
includeArch ? buildArchAssets(nightly.packageName, nightly.repo, nightly.version, nightly.tag) : Promise.resolve([]),
|
||||
]);
|
||||
if (debAssets.length === 0 && rpmAssets.length === 0 && archAssets.length === 0) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
slug: nightly.slug,
|
||||
name: nightly.packageName,
|
||||
version: nightly.version,
|
||||
description: nightly.description,
|
||||
section: nightly.section,
|
||||
debAssets,
|
||||
rpmAssets,
|
||||
archAssets,
|
||||
};
|
||||
})());
|
||||
}
|
||||
|
||||
const settled = await Promise.all(appPromises);
|
||||
const apps: LinuxRepoApp[] = [];
|
||||
for (const app of settled) {
|
||||
@@ -1266,7 +1383,9 @@ export function buildTar(
|
||||
* and `ai.storyteller.<name>` for the Craft Launcher and Crafting Apps).
|
||||
*/
|
||||
function pacmanPkgName(app: LinuxRepoApp): string {
|
||||
return app.slug === "artcraft" ? "ai.artcraft.app" : `ai.storyteller.${app.name}`;
|
||||
if (app.name === "artcraft") return "ai.artcraft.app";
|
||||
if (app.name === "artcraft-nightly") return "ai.artcraft.app-nightly";
|
||||
return `ai.storyteller.${app.name}`;
|
||||
}
|
||||
|
||||
export function generatePacmanDesc(
|
||||
|
||||
@@ -14,6 +14,7 @@ import {
|
||||
getRpmPrimaryGz,
|
||||
getRpmRepomdXml,
|
||||
getLinuxRepoApps,
|
||||
resetLinuxRepoCachesForTests,
|
||||
resolvePackageDownloadUrl,
|
||||
withholdUnsignedPackages,
|
||||
RPM_REPO_TIMESTAMP,
|
||||
@@ -31,7 +32,7 @@ import * as openpgp from "openpgp";
|
||||
import { createHash } from "node:crypto";
|
||||
import { getSigningPublicKey, isRepoSigningConfigured, normalizeArmoredKey, signCleartext, signDetachedArmored, signDetachedBinary } from "../src/lib/repo-signing";
|
||||
import { CRAFTING_APPS, craftAppRelease, craftReleaseDownloads } from "../src/lib/crafting-apps";
|
||||
import { CRAFT_LAUNCHER_RELEASE } from "../src/lib/crafting-app-releases";
|
||||
import { CRAFT_LAUNCHER_RELEASE, CRAFT_NIGHTLY_RELEASES } from "../src/lib/crafting-app-releases";
|
||||
import { GET as getInRelease } from "../src/app/apt/dists/[distribution]/InRelease/route";
|
||||
import { GET as getReleaseGpg } from "../src/app/apt/dists/[distribution]/Release.gpg/route";
|
||||
import { GET as getRpmSignature } from "../src/app/rpm/[arch]/repodata/repomd.xml.asc/route";
|
||||
@@ -342,8 +343,8 @@ test.describe("Linux Package Repositories (APT, RPM & Pacman)", () => {
|
||||
|
||||
test("provides metadata and catalog for /linux setup page", async () => {
|
||||
const apps = await getLinuxRepoApps();
|
||||
// ArtCraft Studio, the launcher, and every Craft app that publishes Linux packages.
|
||||
expect(apps).toHaveLength(19);
|
||||
// ArtCraft Studio, the launcher, every Craft app that publishes Linux packages, plus any configured nightlies.
|
||||
expect(apps).toHaveLength(19 + Object.keys(CRAFT_NIGHTLY_RELEASES).length);
|
||||
const anicraftApp = apps.find((app) => app.slug === "anicraft");
|
||||
expect(anicraftApp?.version).toBe(catalogRelease("anicraft").version);
|
||||
expect(anicraftApp?.debAssets).toHaveLength(3);
|
||||
@@ -722,4 +723,83 @@ test.describe("signed repositories", () => {
|
||||
expect(binaryKey.isPrivate()).toBe(false);
|
||||
expect(binaryKey.getFingerprint().toUpperCase()).toBe(fingerprint);
|
||||
});
|
||||
|
||||
test("resolves -nightly Linux packages regardless of GitHub release tag", () => {
|
||||
CRAFT_NIGHTLY_RELEASES.photocraft = {
|
||||
tag: "nightly-20261123-abcdef",
|
||||
version: "0.24.0~nightly.20261123",
|
||||
};
|
||||
try {
|
||||
const base = "https://github.com/storytold/photocraft/releases/download/nightly-20261123-abcdef";
|
||||
expect(
|
||||
resolvePackageDownloadUrl("photocraft-nightly-0.24.0~nightly.20261123-linux-x86_64.deb"),
|
||||
).toBe(`${base}/photocraft-nightly-0.24.0~nightly.20261123-linux-x86_64.deb`);
|
||||
expect(
|
||||
resolvePackageDownloadUrl("photocraft-nightly-0.24.0~nightly.20261123-linux-x86_64.rpm.asc"),
|
||||
).toBe(`${base}/photocraft-nightly-0.24.0~nightly.20261123-linux-x86_64.rpm.asc`);
|
||||
expect(
|
||||
resolvePackageDownloadUrl("photocraft-nightly-0.24.0~nightly.20261123-linux-x86_64.pkg.tar.zst.sig"),
|
||||
).toBe(`${base}/photocraft-nightly-0.24.0~nightly.20261123-linux-x86_64.pkg.tar.zst.sig`);
|
||||
} finally {
|
||||
delete CRAFT_NIGHTLY_RELEASES.photocraft;
|
||||
}
|
||||
});
|
||||
|
||||
test("emits -nightly packages in APT, RPM, and Pacman repo metadata", async () => {
|
||||
const tag = "nightly-20261123-abcdef";
|
||||
const version = "0.24.0~nightly.20261123";
|
||||
const debName = `photocraft-nightly-${version}-linux-x86_64.deb`;
|
||||
const rpmName = `photocraft-nightly-${version}-linux-x86_64.rpm`;
|
||||
const archName = `photocraft-nightly-${version}-linux-x86_64.pkg.tar.zst`;
|
||||
const shaDeb = "1".repeat(64);
|
||||
const shaRpm = "2".repeat(64);
|
||||
const shaArch = "3".repeat(64);
|
||||
const realFetch = globalThis.fetch;
|
||||
|
||||
CRAFT_NIGHTLY_RELEASES.photocraft = { tag, version };
|
||||
resetLinuxRepoCachesForTests();
|
||||
globalThis.fetch = (async (input: RequestInfo | URL, init?: RequestInit) => {
|
||||
const url = typeof input === "string" ? input : input instanceof URL ? input.toString() : input.url;
|
||||
if (url.includes(`/releases/download/${tag}/SHA256SUMS.txt`)) {
|
||||
return new Response(
|
||||
`${shaDeb} ${debName}\n${shaRpm} ${rpmName}\n${shaRpm} ${rpmName}.asc\n${shaArch} ${archName}\n${shaArch} ${archName}.sig\n`,
|
||||
{ status: 200 },
|
||||
);
|
||||
}
|
||||
if (url.includes(`/releases/download/${tag}/`) && init?.method === "HEAD") {
|
||||
return new Response(null, { status: 200, headers: { "content-length": "123456" } });
|
||||
}
|
||||
if (url.endsWith(archName)) {
|
||||
return new Response(new Uint8Array(0), { status: 200, headers: { "content-range": "bytes 0-0/123456" } });
|
||||
}
|
||||
return realFetch(input, init);
|
||||
}) as typeof fetch;
|
||||
|
||||
try {
|
||||
const apps = await getLinuxRepoApps();
|
||||
const nightly = apps.find((a) => a.name === "photocraft-nightly");
|
||||
expect(nightly).toBeDefined();
|
||||
expect(nightly?.version).toBe(version);
|
||||
expect(nightly?.debAssets.map((a) => a.filename)).toEqual([debName]);
|
||||
expect(nightly?.rpmAssets.map((a) => a.filename)).toEqual([rpmName]);
|
||||
expect(nightly?.archAssets.map((a) => a.filename)).toEqual([archName]);
|
||||
|
||||
const aptPackages = await generateAptPackages("amd64");
|
||||
expect(aptPackages).toContain(`Package: photocraft-nightly\nVersion: ${version}-1`);
|
||||
expect(aptPackages).toContain(`Filename: pool/main/photocraft/${debName}`);
|
||||
|
||||
const rpmXml = await generateRpmPrimaryXml(RPM_REPO_TIMESTAMP, "x86_64");
|
||||
expect(rpmXml).toContain("<name>photocraft-nightly</name>");
|
||||
expect(rpmXml).toContain(`<location href="packages/${rpmName}"/>`);
|
||||
expect(rpmXml).toContain("<file>/usr/bin/photocraft-nightly</file>");
|
||||
|
||||
const pacmanDesc = generatePacmanDesc(nightly!, nightly!.archAssets[0]);
|
||||
expect(pacmanDesc).toContain("%NAME%\nai.storyteller.photocraft-nightly");
|
||||
expect(pacmanDesc).toContain(`%FILENAME%\n${archName}`);
|
||||
} finally {
|
||||
globalThis.fetch = realFetch;
|
||||
delete CRAFT_NIGHTLY_RELEASES.photocraft;
|
||||
resetLinuxRepoCachesForTests();
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -30,20 +30,27 @@ APP="${ARTCRAFT_APP:-artcraft-website}"
|
||||
|
||||
cd "$(dirname "$0")/../.."
|
||||
|
||||
WRANGLER_PREFIX=()
|
||||
WRANGLER_CMD="deploy"
|
||||
if [[ "${ACTION}" == "deploy" && -n "${WORKERS_CI_BRANCH:-}" && "${WORKERS_CI_BRANCH}" != "main" ]]; then
|
||||
WRANGLER_PREFIX=(env -u WRANGLER_CI_MATCH_TAG)
|
||||
WRANGLER_CMD="preview"
|
||||
fi
|
||||
|
||||
case "${APP}:${ACTION}" in
|
||||
artcraft-website:build)
|
||||
npm --prefix frontend/apps/artcraft-website-next ci --ignore-scripts
|
||||
npm --prefix frontend/apps/artcraft-website-next run build:cloudflare
|
||||
;;
|
||||
artcraft-website:deploy)
|
||||
npx --yes wrangler@4 deploy
|
||||
"${WRANGLER_PREFIX[@]}" npx --yes wrangler@4 ${WRANGLER_CMD}
|
||||
;;
|
||||
artcraft-webapp:build)
|
||||
npm --prefix frontend ci --ignore-scripts
|
||||
npm --prefix frontend run build:webapp
|
||||
;;
|
||||
artcraft-webapp:deploy)
|
||||
npx --yes wrangler@4 deploy --config frontend/apps/artcraft-webapp/wrangler.jsonc
|
||||
"${WRANGLER_PREFIX[@]}" npx --yes wrangler@4 ${WRANGLER_CMD} --config frontend/apps/artcraft-webapp/wrangler.jsonc
|
||||
;;
|
||||
artcraft-dashboard:build)
|
||||
# Standalone pnpm app outside the Nx/npm workspace; the script installs and
|
||||
@@ -51,7 +58,7 @@ case "${APP}:${ACTION}" in
|
||||
bash frontend/apps/artcraft-dashboard/script/build_cloudflare.sh
|
||||
;;
|
||||
artcraft-dashboard:deploy)
|
||||
npx --yes wrangler@4 deploy --config frontend/apps/artcraft-dashboard/wrangler.jsonc
|
||||
"${WRANGLER_PREFIX[@]}" npx --yes wrangler@4 ${WRANGLER_CMD} --config frontend/apps/artcraft-dashboard/wrangler.jsonc
|
||||
;;
|
||||
storyteller-docs:build)
|
||||
# The OpenAPI document comes from `cargo run --bin docs-cli`, which Workers
|
||||
@@ -72,7 +79,7 @@ case "${APP}:${ACTION}" in
|
||||
'
|
||||
;;
|
||||
storyteller-docs:deploy)
|
||||
npx --yes wrangler@4 deploy --config frontend/api_docs/wrangler.jsonc
|
||||
"${WRANGLER_PREFIX[@]}" npx --yes wrangler@4 ${WRANGLER_CMD} --config frontend/api_docs/wrangler.jsonc
|
||||
;;
|
||||
*)
|
||||
echo "Usage: ARTCRAFT_APP=<artcraft-website|artcraft-webapp|artcraft-dashboard|storyteller-docs> $0 <build|deploy>" >&2
|
||||
|
||||
@@ -12,4 +12,4 @@ sonar.cpd.exclusions=crates/vendor/**
|
||||
|
||||
# CI publishes Rust coverage only; TypeScript and JavaScript would never appear covered.
|
||||
# Same as artcraft.
|
||||
sonar.coverage.exclusions=**/*.ts,**/*.tsx,**/*.js,**/*.jsx,**/*.mjs,**/*.cjs
|
||||
sonar.coverage.exclusions=**/*.ts,**/*.tsx,**/*.js,**/*.jsx,**/*.mjs,**/*.cjs,crates/service/job/deprecated/**
|
||||
Reference in new issue
Block a user