feature: the entry point /shared exports the types and constants a server and its web application share.
Release / release (push) Failing after 17m12s

This commit is contained in:
slawek committed 2026-10-29 00:28:56 +01:00
1 parent 3d3a700f11
commit cd6ef1c120
7 files changed
+42 -6

No files matched your search

+2 -2
View File
@@ -10,7 +10,7 @@ import { join } from 'node:path';
const ROOT = import.meta.dirname;
const DIST = join(ROOT, 'dist');
const ENTRIES = ['server', 'web', 'vite'];
const ENTRIES = ['server', 'shared', 'web', 'vite'];
function fail(message) {
console.error(`build: ${message}`);
@@ -23,7 +23,7 @@ if (tsc.error) fail(`tsc: ${tsc.error.message}; run npm ci first`);
if (tsc.status !== 0) process.exit(tsc.status ?? 1);
// The declarations import the other declarations by their .js names, as the compiled JavaScript does.
for (const entry of [...ENTRIES, 'shared']) {
for (const entry of ENTRIES) {
for (const file of readdirSync(join(DIST, entry)).filter((name) => name.endsWith('.d.ts'))) {
const path = join(DIST, entry, file);
writeFileSync(path, readFileSync(path, 'utf8').replace(/(from\s+|import\s+)(['"])(\.{1,2}\/[^'"]+)\.tsx?\2/g, '$1$2$3.js$2'));