kofi-stack-template-generator 2.1.39 → 2.1.41

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.
@@ -1,9 +1,9 @@
1
1
 
2
- > kofi-stack-template-generator@2.1.39 build /Users/theodenanyoh/Documents/Krumalabs/create-kofi-stack-v2/packages/template-generator
2
+ > kofi-stack-template-generator@2.1.41 build /Users/theodenanyoh/Documents/Krumalabs/create-kofi-stack-v2/packages/template-generator
3
3
  > pnpm run prebuild && tsup src/index.ts --format esm --dts
4
4
 
5
5
 
6
- > kofi-stack-template-generator@2.1.39 prebuild /Users/theodenanyoh/Documents/Krumalabs/create-kofi-stack-v2/packages/template-generator
6
+ > kofi-stack-template-generator@2.1.41 prebuild /Users/theodenanyoh/Documents/Krumalabs/create-kofi-stack-v2/packages/template-generator
7
7
  > node scripts/generate-templates.js
8
8
 
9
9
  Generating templates.generated.ts...
@@ -14,7 +14,7 @@ CLI tsup v8.5.1
14
14
  CLI Target: es2022
15
15
  ESM Build start
16
16
  ESM dist/index.js 2.28 MB
17
- ESM ⚡️ Build success in 80ms
17
+ ESM ⚡️ Build success in 56ms
18
18
  DTS Build start
19
- DTS ⚡️ Build success in 616ms
19
+ DTS ⚡️ Build success in 538ms
20
20
  DTS dist/index.d.ts 2.96 KB
package/dist/index.js CHANGED
@@ -10398,11 +10398,13 @@ function processTemplatesFromPrefix(vfs, prefix, outputPrefix, config) {
10398
10398
  const finalPath = path3.join(dir, transformedFilename);
10399
10399
  if (isBinaryFile(filename)) {
10400
10400
  vfs.writeFile(finalPath, Buffer.from(content, "base64"));
10401
- } else {
10401
+ } else if (filename.endsWith(".hbs")) {
10402
10402
  const processedContent = processTemplateString(content, config);
10403
10403
  if (processedContent.trim()) {
10404
10404
  vfs.writeFile(finalPath, processedContent);
10405
10405
  }
10406
+ } else {
10407
+ vfs.writeFile(finalPath, content);
10406
10408
  }
10407
10409
  }
10408
10410
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kofi-stack-template-generator",
3
- "version": "2.1.39",
3
+ "version": "2.1.41",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -17,7 +17,7 @@
17
17
  "typecheck": "tsc --noEmit"
18
18
  },
19
19
  "dependencies": {
20
- "kofi-stack-types": "^2.2.0",
20
+ "kofi-stack-types": "^2.1.41",
21
21
  "handlebars": "^4.7.8",
22
22
  "memfs": "^4.9.0"
23
23
  },
package/src/generator.ts CHANGED
@@ -99,13 +99,16 @@ function processTemplatesFromPrefix(
99
99
  if (isBinaryFile(filename)) {
100
100
  // For binary files, we store the source path for later copying
101
101
  vfs.writeFile(finalPath, Buffer.from(content, 'base64'))
102
- } else {
103
- // Process as template
102
+ } else if (filename.endsWith('.hbs')) {
103
+ // Only process .hbs files through Handlebars
104
104
  const processedContent = processTemplateString(content, config)
105
105
  // Skip writing empty files (can happen with conditional templates)
106
106
  if (processedContent.trim()) {
107
107
  vfs.writeFile(finalPath, processedContent)
108
108
  }
109
+ } else {
110
+ // For non-template files, copy content directly without Handlebars processing
111
+ vfs.writeFile(finalPath, content)
109
112
  }
110
113
  }
111
114
  }
@@ -1,6 +1,6 @@
1
1
  // Auto-generated file. Do not edit manually.
2
2
  // Run 'pnpm prebuild' to regenerate.
3
- // Generated: 2026-01-18T22:21:48.031Z
3
+ // Generated: 2026-01-19T02:14:34.205Z
4
4
  // Template count: 338
5
5
 
6
6
  export const EMBEDDED_TEMPLATES: Record<string, string> = {