@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.
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +14 -0
- package/package.json +1 -1
|
@@ -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,
|
|
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"}
|
package/dist/commands/init.js
CHANGED
|
@@ -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'));
|