@embeddables/cli 0.3.1 → 0.3.2

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 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAuGA,wBAAsB,OAAO,CAAC,IAAI,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAA;CAAE,iBA0KxE"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAuGA,wBAAsB,OAAO,CAAC,IAAI,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAA;CAAE,iBA8LxE"}
@@ -216,6 +216,20 @@ export async function runInit(opts) {
216
216
  else {
217
217
  console.log(pc.gray(' ✓ tsconfig.json already exists'));
218
218
  }
219
+ // Migrate .types from old location (embeddables/.types/) to project root (.types/)
220
+ const oldTypesDir = path.join(embeddablesDir, '.types');
221
+ if (fs.existsSync(oldTypesDir)) {
222
+ fs.rmSync(oldTypesDir, { recursive: true });
223
+ console.log(pc.green(' ✓ Removed old embeddables/.types/'));
224
+ }
225
+ // Fix tsconfig paths if they still reference the old embeddables/.types/ location
226
+ if (fs.existsSync(tsconfigPath)) {
227
+ const tsconfigContent = fs.readFileSync(tsconfigPath, 'utf8');
228
+ if (tsconfigContent.includes('./embeddables/.types/')) {
229
+ fs.writeFileSync(tsconfigPath, tsconfigContent.replaceAll('./embeddables/.types/', './.types/'), 'utf8');
230
+ console.log(pc.green(' ✓ Updated tsconfig.json paths'));
231
+ }
232
+ }
219
233
  // Generate type declaration stubs for editor support (no npm install needed)
220
234
  writeTypeStubs(cwd);
221
235
  console.log(pc.green(' ✓ Generated type declarations'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@embeddables/cli",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "embeddables": "./bin/embeddables.mjs"