@michijs/dev-server 0.7.1 → 0.7.3
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/bin/actions/dist.js +9 -1
- package/bin/actions/testTsc.js +9 -1
- package/bin/cli.js +5 -1
- package/bin/types.d.ts +2 -2
- package/package.json +2 -2
package/bin/actions/dist.js
CHANGED
|
@@ -39,7 +39,15 @@ export async function dist(callback, watchOption = false) {
|
|
|
39
39
|
tsconfig.include.forEach((x) => copy(x, outDir, transformers, omit));
|
|
40
40
|
exec(
|
|
41
41
|
// outDir takes the dir from the extended tsconfig...
|
|
42
|
-
`tsc ${watchOption ? "-w --incremental" : ""} --emitDeclarationOnly --project ${config.esbuildOptions.tsconfig} --outDir ${outDir}`,
|
|
42
|
+
`tsc ${watchOption ? "-w --incremental" : ""} --emitDeclarationOnly --project ${config.esbuildOptions.tsconfig} --outDir ${outDir}`, { maxBuffer: 1024 * 500 }, (error, stdout, stderr) => {
|
|
43
|
+
if (stdout)
|
|
44
|
+
console.log(stdout);
|
|
45
|
+
if (error || stderr) {
|
|
46
|
+
console.error(error?.message ?? stderr);
|
|
47
|
+
process.exit(1);
|
|
48
|
+
}
|
|
49
|
+
callback();
|
|
50
|
+
});
|
|
43
51
|
coloredString(` Dist finished in ${timer.endTimer()}ms`);
|
|
44
52
|
if (watchOption)
|
|
45
53
|
tsconfig.include.forEach((x) => {
|
package/bin/actions/testTsc.js
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { config } from "../config/config.js";
|
|
2
2
|
import { exec } from "child_process";
|
|
3
3
|
export async function testTsc(callback) {
|
|
4
|
-
exec(`tsc --noEmit --project ${config.esbuildOptions.tsconfig}`,
|
|
4
|
+
exec(`tsc --noEmit --project ${config.esbuildOptions.tsconfig}`, { maxBuffer: 1024 * 500 }, (error, stdout, stderr) => {
|
|
5
|
+
if (stdout)
|
|
6
|
+
console.log(stdout);
|
|
7
|
+
if (error || stderr) {
|
|
8
|
+
console.error(error?.message ?? stderr);
|
|
9
|
+
process.exit(1);
|
|
10
|
+
}
|
|
11
|
+
callback();
|
|
12
|
+
});
|
|
5
13
|
}
|
package/bin/cli.js
CHANGED
|
@@ -49,7 +49,11 @@ export async function cli() {
|
|
|
49
49
|
process.env.NODE_ENV =
|
|
50
50
|
process.env.NODE_ENV ||
|
|
51
51
|
args.env ||
|
|
52
|
-
(args.build || args.minifyAsset
|
|
52
|
+
(args.build || args.minifyAsset
|
|
53
|
+
? "PRODUCTION"
|
|
54
|
+
: args.dist || args.testTsc
|
|
55
|
+
? "DISTRIBUTION"
|
|
56
|
+
: "DEVELOPMENT");
|
|
53
57
|
const generateAssets = args.generateAssets === "" ? "public/assets/icon.svg" : args.generateAssets;
|
|
54
58
|
if (generateAssets) {
|
|
55
59
|
const action = await import("./actions/generateAssets.js");
|
package/bin/types.d.ts
CHANGED
|
@@ -36,8 +36,8 @@ export interface WebAppOriginAssociation {
|
|
|
36
36
|
}[];
|
|
37
37
|
}
|
|
38
38
|
export interface WellKnown {
|
|
39
|
-
assetsLinks
|
|
40
|
-
webAppOriginAssociation
|
|
39
|
+
assetsLinks?: AssetLink[];
|
|
40
|
+
webAppOriginAssociation?: WebAppOriginAssociation;
|
|
41
41
|
}
|
|
42
42
|
export interface PageCallback<R = string | void> {
|
|
43
43
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@michijs/dev-server",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.3",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/michijs/dev-server.git"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"link": "bunx concurrently bun:dist-w bun:bun-link"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@michijs/tsconfig": "0.0.
|
|
32
|
+
"@michijs/tsconfig": "0.0.4",
|
|
33
33
|
"typescript": "^5.5.3",
|
|
34
34
|
"@types/node": "22.0.0",
|
|
35
35
|
"@types/yargs": "17.0.32"
|