create-fhevm-playground-pro 1.0.19 → 1.0.20

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.
@@ -82,6 +82,12 @@ async function createExample(options) {
82
82
  let content = fs_extra_1.default.readFileSync(srcPath, 'utf-8');
83
83
  // Fix import paths in test files
84
84
  content = content.replace(/import\s+{([^}]+)}\s+from\s+"\.\.\/\.\.\/\.\.\/\.\.\/scripts\/test-helpers"/, 'import { $1 } from "./test-helpers.js"');
85
+ // Only convert to .js if it's a .ts file - remove type annotations
86
+ if (file.endsWith('.ts')) {
87
+ // Remove ": Type" patterns for variable declarations
88
+ // This regex matches "variable: TypeAnnotation" patterns
89
+ content = content.replace(/([a-zA-Z_$]\w*)\s*:\s*(?:any|void|string|number|boolean|object|{[^}]*}|[A-Za-z_$][A-Za-z0-9_$<>\[\]|&\s]*)/g, '$1');
90
+ }
85
91
  fs_extra_1.default.writeFileSync(finalDestPath, content);
86
92
  }
87
93
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-fhevm-playground-pro",
3
- "version": "1.0.19",
3
+ "version": "1.0.20",
4
4
  "description": "Premium scaffolding CLI for fhEVM Playground Pro – Zama bounty",
5
5
  "main": "dist/create-example.js",
6
6
  "bin": {