claudekit-cli 3.41.4-dev.11 → 3.41.4-dev.12

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 +8 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -15300,6 +15300,9 @@ function truncateField(value, field, warnings) {
15300
15300
  }
15301
15301
  return value;
15302
15302
  }
15303
+ function normalizeFrontmatterInput(content) {
15304
+ return content.replace(/^\uFEFF/, "");
15305
+ }
15303
15306
  function parseFrontmatterFallback(content) {
15304
15307
  const fmMatch = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
15305
15308
  if (!fmMatch)
@@ -15327,8 +15330,9 @@ function parseFrontmatterFallback(content) {
15327
15330
  return { frontmatter, body: body.trim(), warnings };
15328
15331
  }
15329
15332
  function parseFrontmatter(content) {
15333
+ const normalizedContent = normalizeFrontmatterInput(content);
15330
15334
  try {
15331
- const { data, content: body } = import_gray_matter3.default(content, {
15335
+ const { data, content: body } = import_gray_matter3.default(normalizedContent, {
15332
15336
  engines: { javascript: { parse: () => ({}) } }
15333
15337
  });
15334
15338
  const frontmatter = {};
@@ -15352,13 +15356,13 @@ function parseFrontmatter(content) {
15352
15356
  }
15353
15357
  return { frontmatter, body: body.trim(), warnings };
15354
15358
  } catch (error) {
15355
- const fallback = parseFrontmatterFallback(content);
15359
+ const fallback = parseFrontmatterFallback(normalizedContent);
15356
15360
  if (fallback && Object.keys(fallback.frontmatter).length > 0) {
15357
15361
  logger.verbose(`Failed to parse frontmatter: ${error instanceof Error ? error.message : "Unknown error"} (recovered via fallback)`);
15358
15362
  return fallback;
15359
15363
  }
15360
15364
  logger.warning(`Failed to parse frontmatter: ${error instanceof Error ? error.message : "Unknown error"}`);
15361
- return { frontmatter: {}, body: content.trim(), warnings: [] };
15365
+ return { frontmatter: {}, body: normalizedContent.trim(), warnings: [] };
15362
15366
  }
15363
15367
  }
15364
15368
  async function parseFrontmatterFile(filePath) {
@@ -58821,7 +58825,7 @@ var package_default;
58821
58825
  var init_package = __esm(() => {
58822
58826
  package_default = {
58823
58827
  name: "claudekit-cli",
58824
- version: "3.41.4-dev.11",
58828
+ version: "3.41.4-dev.12",
58825
58829
  description: "CLI tool for bootstrapping and updating ClaudeKit projects",
58826
58830
  type: "module",
58827
58831
  repository: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudekit-cli",
3
- "version": "3.41.4-dev.11",
3
+ "version": "3.41.4-dev.12",
4
4
  "description": "CLI tool for bootstrapping and updating ClaudeKit projects",
5
5
  "type": "module",
6
6
  "repository": {