gomtm-cli 0.6.31 → 0.6.32
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/gomtm +0 -0
- package/dist/gomtm-cli.js/main.js +46 -18886
- package/package.json +6 -9
- package/src/cli/main.ts +11 -5
package/package.json
CHANGED
|
@@ -1,28 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gomtm-cli",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.32",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"main": "./dist/index.js",
|
|
8
8
|
"publishConfig": {
|
|
9
9
|
"access": "public"
|
|
10
10
|
},
|
|
11
|
-
"files": [
|
|
12
|
-
"bin",
|
|
13
|
-
"dist",
|
|
14
|
-
"src"
|
|
15
|
-
],
|
|
11
|
+
"files": ["bin", "dist", "src"],
|
|
16
12
|
"bin": {
|
|
17
13
|
"gomtm-cli": "./dist/gomtm-cli.js",
|
|
18
14
|
"gomtm": "./bin/gomtm"
|
|
19
15
|
},
|
|
20
16
|
"sideEffects": false,
|
|
21
17
|
"scripts": {
|
|
22
|
-
"build": "bun build src/cli/main.ts --outdir=dist/gomtm-cli.js"
|
|
18
|
+
"build": "bun build src/cli/main.ts --outdir=dist/gomtm-cli.js --target node"
|
|
23
19
|
},
|
|
24
20
|
"dependencies": {},
|
|
25
21
|
"devDependencies": {
|
|
26
|
-
"commander": "^12.1.0"
|
|
22
|
+
"commander": "^12.1.0",
|
|
23
|
+
"vite": "^6.0.3"
|
|
27
24
|
}
|
|
28
|
-
}
|
|
25
|
+
}
|
package/src/cli/main.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { program } from "commander";
|
|
3
|
+
import { fileURLToPath } from 'node:url'
|
|
3
4
|
import dotenv from "dotenv";
|
|
4
5
|
import fs from "node:fs";
|
|
5
6
|
import path from "node:path";
|
|
7
|
+
import vite from "vite";
|
|
6
8
|
// import { buildWithTsc } from "./build_tsc";
|
|
7
9
|
// import { buildWithViteBuild } from "./build_vite";
|
|
8
10
|
// import { compileMigrations } from "./compile-migrations";
|
|
9
11
|
|
|
12
|
+
const __dirname = fileURLToPath(new URL('.', import.meta.url))
|
|
13
|
+
|
|
10
14
|
const envFiles = ["../../env/dev.env", "./env/dev.env", ".env"];
|
|
11
15
|
function loadEnv() {
|
|
12
16
|
// biome-ignore lint/complexity/noForEach: <explanation>
|
|
@@ -24,11 +28,13 @@ function loadEnv() {
|
|
|
24
28
|
}
|
|
25
29
|
(async () => {
|
|
26
30
|
await loadEnv();
|
|
27
|
-
program.command("
|
|
28
|
-
console.log("(
|
|
29
|
-
|
|
30
|
-
//
|
|
31
|
-
// await
|
|
31
|
+
program.command("build_mtmaiui").action(async () => {
|
|
32
|
+
console.log("(build_mtmaiui)", import.meta.url);
|
|
33
|
+
|
|
34
|
+
// const projectDir = path.resolve(__dirname, "../../../packages/mtmaiui");
|
|
35
|
+
// await vite.build({
|
|
36
|
+
// configFile: path.resolve(projectDir, "vite.config.js"),
|
|
37
|
+
// });
|
|
32
38
|
});
|
|
33
39
|
|
|
34
40
|
// program.command("gen").action(async () => {
|