@jay-framework/jay-stack-cli 0.16.5 → 0.17.1
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.
|
@@ -28,7 +28,7 @@ tags:
|
|
|
28
28
|
```yaml
|
|
29
29
|
- tag: productName
|
|
30
30
|
type: data
|
|
31
|
-
dataType: string # string (default), number, boolean, date
|
|
31
|
+
dataType: string # string (default), html-string, number, boolean, date
|
|
32
32
|
required: true # optional, defaults to false
|
|
33
33
|
phase: slow # slow, fast, or fast+interactive
|
|
34
34
|
description: Display name
|
package/dist/index.js
CHANGED
|
@@ -4602,6 +4602,54 @@ program.command("dev [path]").description("Start the Jay Stack development serve
|
|
|
4602
4602
|
process.exit(1);
|
|
4603
4603
|
}
|
|
4604
4604
|
});
|
|
4605
|
+
program.command("build [path]").description("Build production artifacts").option("--version <n>", "Build version number", "1").option("--no-minify", "Disable minification (useful for debugging)").option("-v, --verbose", "Enable verbose logging output").action(async (projectPath, options) => {
|
|
4606
|
+
try {
|
|
4607
|
+
const logLevel = options.verbose ? "verbose" : "info";
|
|
4608
|
+
setDevLogger(createDevLogger(logLevel));
|
|
4609
|
+
const resolvedPath = path$1.resolve(projectPath || process.cwd());
|
|
4610
|
+
const jayConfigPath = path$1.join(resolvedPath, ".jay");
|
|
4611
|
+
let pagesBase = "./src/pages";
|
|
4612
|
+
try {
|
|
4613
|
+
const jayConfig = YAML.parse(await fs$1.readFile(jayConfigPath, "utf-8"));
|
|
4614
|
+
pagesBase = jayConfig?.devServer?.pagesBase || pagesBase;
|
|
4615
|
+
} catch {
|
|
4616
|
+
}
|
|
4617
|
+
const { buildVersion } = await import("@jay-framework/production-server");
|
|
4618
|
+
await buildVersion({
|
|
4619
|
+
version: parseInt(options.version, 10),
|
|
4620
|
+
projectRoot: resolvedPath,
|
|
4621
|
+
pagesRoot: path$1.resolve(resolvedPath, pagesBase),
|
|
4622
|
+
buildRoot: path$1.join(resolvedPath, "build"),
|
|
4623
|
+
publicBasePath: "/",
|
|
4624
|
+
concurrency: 4,
|
|
4625
|
+
tsConfigFilePath: path$1.join(resolvedPath, "tsconfig.json"),
|
|
4626
|
+
minify: options.minify
|
|
4627
|
+
});
|
|
4628
|
+
} catch (error) {
|
|
4629
|
+
getLogger().error(chalk.red("Build failed:") + " " + error.message);
|
|
4630
|
+
if (error.stack)
|
|
4631
|
+
getLogger().error(error.stack);
|
|
4632
|
+
process.exit(1);
|
|
4633
|
+
}
|
|
4634
|
+
});
|
|
4635
|
+
program.command("serve [path]").description("Start production server").option("--version <n>", "Build version to serve", "1").option("--port <n>", "Port number", "3000").action(async (projectPath, options) => {
|
|
4636
|
+
try {
|
|
4637
|
+
setDevLogger(createDevLogger("info"));
|
|
4638
|
+
const resolvedPath = path$1.resolve(projectPath || process.cwd());
|
|
4639
|
+
const { startMainServer } = await import("@jay-framework/production-server");
|
|
4640
|
+
await startMainServer({
|
|
4641
|
+
buildRoot: path$1.join(resolvedPath, "build"),
|
|
4642
|
+
version: parseInt(options.version, 10),
|
|
4643
|
+
port: parseInt(options.port, 10),
|
|
4644
|
+
publicBasePath: "/"
|
|
4645
|
+
});
|
|
4646
|
+
} catch (error) {
|
|
4647
|
+
getLogger().error(chalk.red("Server failed:") + " " + error.message);
|
|
4648
|
+
if (error.stack)
|
|
4649
|
+
getLogger().error(error.stack);
|
|
4650
|
+
process.exit(1);
|
|
4651
|
+
}
|
|
4652
|
+
});
|
|
4605
4653
|
program.command("validate [path]").description("Validate all .jay-html and .jay-contract files in the project").option("-v, --verbose", "Show per-file validation status").option("--json", "Output results as JSON").action(async (scanPath, options) => {
|
|
4606
4654
|
try {
|
|
4607
4655
|
const result = await validateJayFiles({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jay-framework/jay-stack-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -24,14 +24,15 @@
|
|
|
24
24
|
"test:watch": "vitest"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@jay-framework/compiler-jay-html": "^0.
|
|
28
|
-
"@jay-framework/compiler-shared": "^0.
|
|
29
|
-
"@jay-framework/dev-server": "^0.
|
|
30
|
-
"@jay-framework/editor-server": "^0.
|
|
31
|
-
"@jay-framework/fullstack-component": "^0.
|
|
32
|
-
"@jay-framework/logger": "^0.
|
|
33
|
-
"@jay-framework/plugin-validator": "^0.
|
|
34
|
-
"@jay-framework/
|
|
27
|
+
"@jay-framework/compiler-jay-html": "^0.17.1",
|
|
28
|
+
"@jay-framework/compiler-shared": "^0.17.1",
|
|
29
|
+
"@jay-framework/dev-server": "^0.17.1",
|
|
30
|
+
"@jay-framework/editor-server": "^0.17.1",
|
|
31
|
+
"@jay-framework/fullstack-component": "^0.17.1",
|
|
32
|
+
"@jay-framework/logger": "^0.17.1",
|
|
33
|
+
"@jay-framework/plugin-validator": "^0.17.1",
|
|
34
|
+
"@jay-framework/production-server": "^0.17.1",
|
|
35
|
+
"@jay-framework/stack-server-runtime": "^0.17.1",
|
|
35
36
|
"chalk": "^4.1.2",
|
|
36
37
|
"commander": "^14.0.0",
|
|
37
38
|
"express": "^5.0.1",
|
|
@@ -42,7 +43,7 @@
|
|
|
42
43
|
"yaml": "^2.3.4"
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|
|
45
|
-
"@jay-framework/dev-environment": "^0.
|
|
46
|
+
"@jay-framework/dev-environment": "^0.17.1",
|
|
46
47
|
"@types/express": "^5.0.2",
|
|
47
48
|
"@types/node": "^22.15.21",
|
|
48
49
|
"nodemon": "^3.0.3",
|