@jay-framework/jay-stack-cli 0.25.2 → 0.25.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.
Files changed (2) hide show
  1. package/dist/index.js +11 -23
  2. 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: `Link points to the page's own route "${target}" — a self-link goes nowhere.`,
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 "${raw}" — no page or public asset produces the URL "${target}".`,
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 { surfaceValidationIssues: surfaceValidationIssues2 } = await Promise.resolve().then(() => runValidate$1);
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 generatePageDefinitionFiles2(jayHtmlPaths, ctx.tsConfigFilePath, ctx.resolvedPath);
7584
- await generateContractDefinitionFiles2(path__default.resolve(ctx.resolvedPath, "src"));
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.2",
3
+ "version": "0.25.3",
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.2",
29
- "@jay-framework/compiler-jay-html": "^0.25.2",
30
- "@jay-framework/compiler-shared": "^0.25.2",
31
- "@jay-framework/dev-server": "^0.25.2",
32
- "@jay-framework/fullstack-component": "^0.25.2",
33
- "@jay-framework/logger": "^0.25.2",
34
- "@jay-framework/plugin-validator": "^0.25.2",
35
- "@jay-framework/production-build": "^0.25.2",
36
- "@jay-framework/production-server": "^0.25.2",
37
- "@jay-framework/stack-route-scanner": "^0.25.2",
38
- "@jay-framework/stack-server-build": "^0.25.2",
39
- "@jay-framework/stack-server-runtime": "^0.25.2",
28
+ "@jay-framework/compiler-inline-composition": "^0.25.3",
29
+ "@jay-framework/compiler-jay-html": "^0.25.3",
30
+ "@jay-framework/compiler-shared": "^0.25.3",
31
+ "@jay-framework/dev-server": "^0.25.3",
32
+ "@jay-framework/fullstack-component": "^0.25.3",
33
+ "@jay-framework/logger": "^0.25.3",
34
+ "@jay-framework/plugin-validator": "^0.25.3",
35
+ "@jay-framework/production-build": "^0.25.3",
36
+ "@jay-framework/production-server": "^0.25.3",
37
+ "@jay-framework/stack-route-scanner": "^0.25.3",
38
+ "@jay-framework/stack-server-build": "^0.25.3",
39
+ "@jay-framework/stack-server-runtime": "^0.25.3",
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.2",
50
+ "@jay-framework/dev-environment": "^0.25.3",
51
51
  "@types/express": "^5.0.2",
52
52
  "@types/node": "^22.15.21",
53
53
  "nodemon": "^3.0.3",