@jay-framework/jay-stack-cli 0.25.2 → 0.25.4
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/index.js +11 -23
- package/package.json +14 -14
package/dist/index.js
CHANGED
|
@@ -135,10 +135,6 @@ async function generatePageDefinitionFiles(jayHtmlPaths, tsConfigPath, projectRo
|
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
-
const generatePageDefinitionFiles$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
139
|
-
__proto__: null,
|
|
140
|
-
generatePageDefinitionFiles
|
|
141
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
142
138
|
const IGNORED_DIRS = /* @__PURE__ */ new Set(["node_modules", "build", "dist", ".git", ".cache"]);
|
|
143
139
|
async function generateContractDefinitionFiles(root) {
|
|
144
140
|
const contractFiles = await collectContractFiles(root);
|
|
@@ -196,10 +192,6 @@ async function collectContractFiles(root) {
|
|
|
196
192
|
await walk(root);
|
|
197
193
|
return results;
|
|
198
194
|
}
|
|
199
|
-
const generateContractDefinitionFiles$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
200
|
-
__proto__: null,
|
|
201
|
-
generateContractDefinitionFiles
|
|
202
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
203
195
|
function setWellKnownHeaders(res, filePath) {
|
|
204
196
|
if (filePath.includes(`${path$1.sep}.well-known${path$1.sep}`)) {
|
|
205
197
|
res.setHeader("Access-Control-Allow-Origin", "*");
|
|
@@ -4913,6 +4905,10 @@ async function collectPublicAssets(publicFolder) {
|
|
|
4913
4905
|
await walk(publicFolder, "");
|
|
4914
4906
|
return assets;
|
|
4915
4907
|
}
|
|
4908
|
+
function openingTag(el) {
|
|
4909
|
+
const attrs = el.rawAttrs?.replace(/\s+jay-[\w-]+(="[^"]*"|='[^']*')?/g, "").replace(/\s+/g, " ").trim();
|
|
4910
|
+
return attrs ? `<${el.rawTagName} ${attrs}>` : `<${el.rawTagName}>`;
|
|
4911
|
+
}
|
|
4916
4912
|
function originOf(baseUrl) {
|
|
4917
4913
|
try {
|
|
4918
4914
|
return new URL(baseUrl).origin;
|
|
@@ -4952,10 +4948,11 @@ function checkInternalLinks(options) {
|
|
|
4952
4948
|
if (raw === void 0 || raw === null) continue;
|
|
4953
4949
|
const verdict = classifyHref(raw, baseUrl);
|
|
4954
4950
|
if (verdict.kind === "skip") continue;
|
|
4951
|
+
const tag = openingTag(anchor);
|
|
4955
4952
|
if (verdict.kind === "degenerate") {
|
|
4956
4953
|
findings.push({
|
|
4957
4954
|
file: relativePath,
|
|
4958
|
-
message: `Anchor has a placeholder href "${raw}" — it links nowhere and ships as a dead link.`,
|
|
4955
|
+
message: `Anchor ${tag} has a placeholder href "${raw}" — it links nowhere and ships as a dead link.`,
|
|
4959
4956
|
suggestion: `Point the link at a real page, use <button> for a JS-driven action, or ${SUPPRESS_HINT}.`
|
|
4960
4957
|
});
|
|
4961
4958
|
continue;
|
|
@@ -4964,7 +4961,7 @@ function checkInternalLinks(options) {
|
|
|
4964
4961
|
if (ownUrl !== void 0 && target === ownUrl) {
|
|
4965
4962
|
findings.push({
|
|
4966
4963
|
file: relativePath,
|
|
4967
|
-
message: `
|
|
4964
|
+
message: `Anchor ${tag} points to the page's own route "${target}" — a self-link goes nowhere.`,
|
|
4968
4965
|
suggestion: `Remove the link, use "#" within-page navigation, or point it at a different page.`
|
|
4969
4966
|
});
|
|
4970
4967
|
continue;
|
|
@@ -4974,7 +4971,7 @@ function checkInternalLinks(options) {
|
|
|
4974
4971
|
if (oracle.dynamicMatchers.some((re) => re.test(target))) continue;
|
|
4975
4972
|
findings.push({
|
|
4976
4973
|
file: relativePath,
|
|
4977
|
-
message: `Broken internal link
|
|
4974
|
+
message: `Broken internal link in anchor ${tag} — no page or public asset produces the URL "${target}".`,
|
|
4978
4975
|
suggestion: `Create a placeholder page/route for "${target}", or remove the link. Otherwise ${SUPPRESS_HINT}.`
|
|
4979
4976
|
});
|
|
4980
4977
|
}
|
|
@@ -7489,12 +7486,6 @@ function printPluginValidationResult(result, verbose) {
|
|
|
7489
7486
|
logger.important(chalk.red(`${result.errors.length} errors found.`));
|
|
7490
7487
|
}
|
|
7491
7488
|
}
|
|
7492
|
-
const runValidate$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
7493
|
-
__proto__: null,
|
|
7494
|
-
runValidate,
|
|
7495
|
-
runValidatePlugin,
|
|
7496
|
-
surfaceValidationIssues
|
|
7497
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
7498
7489
|
async function runDev(projectPath, options) {
|
|
7499
7490
|
const logLevel = options.quiet ? "silent" : options.verbose ? "verbose" : "info";
|
|
7500
7491
|
setDevLogger(createDevLogger(logLevel));
|
|
@@ -7551,8 +7542,7 @@ function initLogger(verbose) {
|
|
|
7551
7542
|
}
|
|
7552
7543
|
async function runBuild(projectPath, options) {
|
|
7553
7544
|
initLogger(options.verbose);
|
|
7554
|
-
const
|
|
7555
|
-
const valid = await surfaceValidationIssues2(projectPath, { verbose: options.verbose });
|
|
7545
|
+
const valid = await surfaceValidationIssues(projectPath, { verbose: options.verbose });
|
|
7556
7546
|
if (!valid) {
|
|
7557
7547
|
process.exit(1);
|
|
7558
7548
|
}
|
|
@@ -7573,15 +7563,13 @@ async function runBuild(projectPath, options) {
|
|
|
7573
7563
|
}
|
|
7574
7564
|
async function generateDefinitionFiles(ctx) {
|
|
7575
7565
|
const { glob: glob2 } = await import("glob");
|
|
7576
|
-
const { generatePageDefinitionFiles: generatePageDefinitionFiles2 } = await Promise.resolve().then(() => generatePageDefinitionFiles$1);
|
|
7577
|
-
const { generateContractDefinitionFiles: generateContractDefinitionFiles2 } = await Promise.resolve().then(() => generateContractDefinitionFiles$1);
|
|
7578
7566
|
const jayHtmlPaths = await glob2("**/page.jay-html", {
|
|
7579
7567
|
cwd: ctx.pagesRoot,
|
|
7580
7568
|
absolute: true,
|
|
7581
7569
|
ignore: ["**/node_modules/**", "**/build/**", "**/dist/**"]
|
|
7582
7570
|
});
|
|
7583
|
-
await
|
|
7584
|
-
await
|
|
7571
|
+
await generatePageDefinitionFiles(jayHtmlPaths, ctx.tsConfigFilePath, ctx.resolvedPath);
|
|
7572
|
+
await generateContractDefinitionFiles(path__default.resolve(ctx.resolvedPath, "src"));
|
|
7585
7573
|
}
|
|
7586
7574
|
async function runServe(projectPath, options) {
|
|
7587
7575
|
initLogger(options.verbose);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jay-framework/jay-stack-cli",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.4",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -25,18 +25,18 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@inquirer/prompts": "^8.5.2",
|
|
28
|
-
"@jay-framework/compiler-inline-composition": "^0.25.
|
|
29
|
-
"@jay-framework/compiler-jay-html": "^0.25.
|
|
30
|
-
"@jay-framework/compiler-shared": "^0.25.
|
|
31
|
-
"@jay-framework/dev-server": "^0.25.
|
|
32
|
-
"@jay-framework/fullstack-component": "^0.25.
|
|
33
|
-
"@jay-framework/logger": "^0.25.
|
|
34
|
-
"@jay-framework/plugin-validator": "^0.25.
|
|
35
|
-
"@jay-framework/production-build": "^0.25.
|
|
36
|
-
"@jay-framework/production-server": "^0.25.
|
|
37
|
-
"@jay-framework/stack-route-scanner": "^0.25.
|
|
38
|
-
"@jay-framework/stack-server-build": "^0.25.
|
|
39
|
-
"@jay-framework/stack-server-runtime": "^0.25.
|
|
28
|
+
"@jay-framework/compiler-inline-composition": "^0.25.4",
|
|
29
|
+
"@jay-framework/compiler-jay-html": "^0.25.4",
|
|
30
|
+
"@jay-framework/compiler-shared": "^0.25.4",
|
|
31
|
+
"@jay-framework/dev-server": "^0.25.4",
|
|
32
|
+
"@jay-framework/fullstack-component": "^0.25.4",
|
|
33
|
+
"@jay-framework/logger": "^0.25.4",
|
|
34
|
+
"@jay-framework/plugin-validator": "^0.25.4",
|
|
35
|
+
"@jay-framework/production-build": "^0.25.4",
|
|
36
|
+
"@jay-framework/production-server": "^0.25.4",
|
|
37
|
+
"@jay-framework/stack-route-scanner": "^0.25.4",
|
|
38
|
+
"@jay-framework/stack-server-build": "^0.25.4",
|
|
39
|
+
"@jay-framework/stack-server-runtime": "^0.25.4",
|
|
40
40
|
"chalk": "^4.1.2",
|
|
41
41
|
"commander": "^14.0.0",
|
|
42
42
|
"express": "^5.0.1",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"yaml": "^2.3.4"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@jay-framework/dev-environment": "^0.25.
|
|
50
|
+
"@jay-framework/dev-environment": "^0.25.4",
|
|
51
51
|
"@types/express": "^5.0.2",
|
|
52
52
|
"@types/node": "^22.15.21",
|
|
53
53
|
"nodemon": "^3.0.3",
|