@digigov/cli-app 2.0.0-rc.27 → 2.0.0-rc.29
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/.rush/temp/shrinkwrap-deps.json +1 -1
- package/index.js +13 -2
- package/package.json +7 -4
- package/subcommands/build.js +1 -1
- package/subcommands/dev.js +4 -3
- package/subcommands/export.js +1 -1
- package/subcommands/start.js +1 -1
- package/tsconfig.json +4 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"../../tooling/cli-app": "../../tooling/cli-app:
|
|
2
|
+
"../../tooling/cli-app": "../../tooling/cli-app:011gm5e2cPdzu1owzqG4Jet9+gIZoKgZMljJltgR3Ag=:",
|
|
3
3
|
"/@types/node@18.19.0": "Missing shrinkwrap entry!",
|
|
4
4
|
"/@types/react@18.3.3": "Missing shrinkwrap entry!",
|
|
5
5
|
"/autoprefixer@10.4.16(postcss@8.4.4)": "Missing shrinkwrap entry!",
|
package/index.js
CHANGED
|
@@ -1,11 +1,22 @@
|
|
|
1
|
-
import { DigigovCommand } from "@digigov/cli/lib";
|
|
1
|
+
import { DigigovCommand, logger } from "@digigov/cli/lib";
|
|
2
2
|
|
|
3
3
|
import path from "path";
|
|
4
4
|
import { fileURLToPath } from "url";
|
|
5
|
+
import fs from "fs";
|
|
5
6
|
|
|
6
7
|
const command = new DigigovCommand("app", import.meta.url);
|
|
7
8
|
|
|
8
9
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
9
|
-
|
|
10
|
+
const subcommandsDir = path.join(__dirname, "subcommands");
|
|
11
|
+
|
|
12
|
+
const subcommands = fs.readdirSync(subcommandsDir);
|
|
13
|
+
for (const subcommand of subcommands) {
|
|
14
|
+
const subcommandPath = path.join(subcommandsDir, subcommand);
|
|
15
|
+
const subcommandModule = await import(subcommandPath);
|
|
16
|
+
command.addCommand(subcommandModule.default);
|
|
17
|
+
logger.debug(
|
|
18
|
+
`Loaded subcommand for cli-app: ${subcommand.replace(".js", "")}`,
|
|
19
|
+
);
|
|
20
|
+
}
|
|
10
21
|
|
|
11
22
|
export default command;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digigov/cli-app",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.29",
|
|
4
4
|
"description": "@digigov developer cli tool",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"express": "4.17.1",
|
|
12
12
|
"http-proxy-middleware": "1.0.3",
|
|
13
13
|
"next-images": "1.3.0",
|
|
14
|
-
"@digigov/cli-build": "2.0.0-rc.
|
|
14
|
+
"@digigov/cli-build": "2.0.0-rc.29",
|
|
15
15
|
"url-loader": "4.1.1",
|
|
16
16
|
"next": "13.1.1",
|
|
17
17
|
"commander": "12.1.0",
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"rimraf": "3.0.2",
|
|
23
|
-
"@digigov/cli": "2.0.0-rc.
|
|
23
|
+
"@digigov/cli": "2.0.0-rc.29",
|
|
24
24
|
"typescript": "5.6.2",
|
|
25
25
|
"@types/node": "18.19.0",
|
|
26
26
|
"@types/react": "18.3.3",
|
|
27
27
|
"autoprefixer": "10.4.16",
|
|
28
28
|
"postcss": "8.4.4",
|
|
29
|
-
"@digigov/css": "2.0.0-rc.
|
|
29
|
+
"@digigov/css": "2.0.0-rc.29",
|
|
30
30
|
"tailwindcss": "3.4.13"
|
|
31
31
|
},
|
|
32
32
|
"exports": {
|
|
@@ -41,6 +41,9 @@
|
|
|
41
41
|
"./tailwind.common": "./tailwind.common.cjs",
|
|
42
42
|
"./tailwindrc": "./tailwindrc.cjs"
|
|
43
43
|
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"typescript": "5.6.2"
|
|
46
|
+
},
|
|
44
47
|
"scripts": {
|
|
45
48
|
"publint": "publint"
|
|
46
49
|
}
|
package/subcommands/build.js
CHANGED
|
@@ -7,7 +7,7 @@ buildCommand
|
|
|
7
7
|
.argument("[...args]", "Arguments to pass to the `next build` command")
|
|
8
8
|
.helpOption(false)
|
|
9
9
|
.allowUnknownOption()
|
|
10
|
-
.action(async (args, _, ctx) => {
|
|
10
|
+
.action(async (args = [], _, ctx) => {
|
|
11
11
|
await ctx.exec("rimraf", ["out"]);
|
|
12
12
|
await ctx.exec("next", ["build", ...args], EXEC_CONFIG);
|
|
13
13
|
});
|
package/subcommands/dev.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DigigovCommand, resolveProject } from "@digigov/cli/lib";
|
|
1
|
+
import { DigigovCommand, resolveProject, logger } from "@digigov/cli/lib";
|
|
2
2
|
import { EXEC_CONFIG } from "../common.js";
|
|
3
3
|
|
|
4
4
|
import path from "path";
|
|
@@ -13,7 +13,8 @@ devCommand
|
|
|
13
13
|
.argument("[...args]", "Arguments to pass to the `next dev` command")
|
|
14
14
|
.helpOption(false)
|
|
15
15
|
.allowUnknownOption()
|
|
16
|
-
.action(async (args, _, ctx) => {
|
|
16
|
+
.action(async (args = [], _, ctx) => {
|
|
17
|
+
logger.info("Starting development server...");
|
|
17
18
|
if (digigov && digigov.proxy) {
|
|
18
19
|
await ctx.exec(
|
|
19
20
|
"node",
|
|
@@ -21,7 +22,7 @@ devCommand
|
|
|
21
22
|
EXEC_CONFIG,
|
|
22
23
|
);
|
|
23
24
|
}
|
|
24
|
-
await ctx.exec("next", ["dev", ...args], EXEC_CONFIG);
|
|
25
|
+
await ctx.exec("next", ["dev", ...(args ?? [])], EXEC_CONFIG);
|
|
25
26
|
});
|
|
26
27
|
|
|
27
28
|
export default devCommand;
|
package/subcommands/export.js
CHANGED
|
@@ -7,7 +7,7 @@ exportCommand
|
|
|
7
7
|
.argument("[...args]", "Arguments to pass to the `next export` command")
|
|
8
8
|
.helpOption(false)
|
|
9
9
|
.allowUnknownOption()
|
|
10
|
-
.action(async (args, _, ctx) => {
|
|
10
|
+
.action(async (args = [], _, ctx) => {
|
|
11
11
|
await ctx.exec("rimraf", ["out"]);
|
|
12
12
|
await ctx.exec("next", ["build"]);
|
|
13
13
|
await ctx.exec("next", ["export", ...args], EXEC_CONFIG);
|
package/subcommands/start.js
CHANGED
|
@@ -12,7 +12,7 @@ startCommand
|
|
|
12
12
|
.argument("[...args]", "Arguments to pass to the `next start` command")
|
|
13
13
|
.helpOption(false)
|
|
14
14
|
.allowUnknownOption()
|
|
15
|
-
.action(async (args, _, ctx) => {
|
|
15
|
+
.action(async (args = [], _, ctx) => {
|
|
16
16
|
if (!fs.existsSync(path.join(project.root, ".next"))) {
|
|
17
17
|
await ctx.exec("next", ["build"]);
|
|
18
18
|
}
|
package/tsconfig.json
ADDED