@vercel/cervel 0.0.5 → 0.0.6
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/dist/cli.mjs +4 -3
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +4 -3
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -38,7 +38,7 @@ const Colors = {
|
|
|
38
38
|
//#endregion
|
|
39
39
|
//#region src/typescript.ts
|
|
40
40
|
const require_ = createRequire(import.meta.url);
|
|
41
|
-
const typescript =
|
|
41
|
+
const typescript = (args) => {
|
|
42
42
|
const extension = extname(args.entrypoint);
|
|
43
43
|
if (![
|
|
44
44
|
".ts",
|
|
@@ -48,7 +48,7 @@ const typescript = async (args) => {
|
|
|
48
48
|
const tscPath = resolveTscPath(args);
|
|
49
49
|
if (!tscPath) {
|
|
50
50
|
console.log(Colors.gray(`${Colors.bold(Colors.cyan("✓"))} Typecheck skipped ${Colors.gray("(TypeScript not found)")}`));
|
|
51
|
-
return
|
|
51
|
+
return null;
|
|
52
52
|
}
|
|
53
53
|
return doTypeCheck(args, tscPath);
|
|
54
54
|
};
|
|
@@ -305,7 +305,8 @@ const build$1 = async (args) => {
|
|
|
305
305
|
await writeFile(join(args.cwd, args.out, ".cervel.json"), JSON.stringify({ handler: rolldownResult.result.handler }, null, 2));
|
|
306
306
|
console.log(Colors.gray(`${Colors.bold(Colors.cyan("✓"))} Build complete`));
|
|
307
307
|
const typecheckComplete = true;
|
|
308
|
-
|
|
308
|
+
const result = tsPromise ? await Promise.race([tsPromise.then(() => typecheckComplete), Promise.resolve(false)]) : true;
|
|
309
|
+
if (tsPromise && !result) console.log(Colors.gray(`${Colors.bold(Colors.gray("*"))} Waiting for typecheck...`));
|
|
309
310
|
return {
|
|
310
311
|
rolldownResult: rolldownResult.result,
|
|
311
312
|
tsPromise
|
package/dist/index.d.mts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -37,7 +37,7 @@ const Colors = {
|
|
|
37
37
|
//#endregion
|
|
38
38
|
//#region src/typescript.ts
|
|
39
39
|
const require_ = createRequire(import.meta.url);
|
|
40
|
-
const typescript =
|
|
40
|
+
const typescript = (args) => {
|
|
41
41
|
const extension = extname(args.entrypoint);
|
|
42
42
|
if (![
|
|
43
43
|
".ts",
|
|
@@ -47,7 +47,7 @@ const typescript = async (args) => {
|
|
|
47
47
|
const tscPath = resolveTscPath(args);
|
|
48
48
|
if (!tscPath) {
|
|
49
49
|
console.log(Colors.gray(`${Colors.bold(Colors.cyan("✓"))} Typecheck skipped ${Colors.gray("(TypeScript not found)")}`));
|
|
50
|
-
return
|
|
50
|
+
return null;
|
|
51
51
|
}
|
|
52
52
|
return doTypeCheck(args, tscPath);
|
|
53
53
|
};
|
|
@@ -308,7 +308,8 @@ const build = async (args) => {
|
|
|
308
308
|
await writeFile(join(args.cwd, args.out, ".cervel.json"), JSON.stringify({ handler: rolldownResult.result.handler }, null, 2));
|
|
309
309
|
console.log(Colors.gray(`${Colors.bold(Colors.cyan("✓"))} Build complete`));
|
|
310
310
|
const typecheckComplete = true;
|
|
311
|
-
|
|
311
|
+
const result = tsPromise ? await Promise.race([tsPromise.then(() => typecheckComplete), Promise.resolve(false)]) : true;
|
|
312
|
+
if (tsPromise && !result) console.log(Colors.gray(`${Colors.bold(Colors.gray("*"))} Waiting for typecheck...`));
|
|
312
313
|
return {
|
|
313
314
|
rolldownResult: rolldownResult.result,
|
|
314
315
|
tsPromise
|