@embeddables/cli 0.3.0 → 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"}
@@ -23,11 +23,11 @@ function copyDirSync(src, dest) {
23
23
  }
24
24
  }
25
25
  /**
26
- * Generate type declaration stubs in embeddables/.types/ so the editor
26
+ * Generate type declaration stubs in .types/ (project root) so the editor
27
27
  * can resolve imports in generated TSX files without npm install.
28
28
  */
29
- function writeTypeStubs(embeddablesDir) {
30
- const typesDir = path.join(embeddablesDir, '.types');
29
+ function writeTypeStubs(cwd) {
30
+ const typesDir = path.join(cwd, '.types');
31
31
  fs.mkdirSync(typesDir, { recursive: true });
32
32
  // React JSX runtime types (needed for "jsx": "react-jsx" in tsconfig)
33
33
  fs.writeFileSync(path.join(typesDir, 'react-jsx-runtime.d.ts'), `export namespace JSX {
@@ -203,9 +203,9 @@ export async function runInit(opts) {
203
203
  esModuleInterop: true,
204
204
  baseUrl: '.',
205
205
  paths: {
206
- 'react/jsx-runtime': ['./embeddables/.types/react-jsx-runtime'],
207
- '@embeddables/cli/components': ['./embeddables/.types/components'],
208
- '@embeddables/cli/types': ['./embeddables/.types/types'],
206
+ 'react/jsx-runtime': ['./.types/react-jsx-runtime'],
207
+ '@embeddables/cli/components': ['./.types/components'],
208
+ '@embeddables/cli/types': ['./.types/types'],
209
209
  },
210
210
  },
211
211
  include: ['embeddables'],
@@ -216,8 +216,22 @@ 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
- writeTypeStubs(embeddablesDir);
234
+ writeTypeStubs(cwd);
221
235
  console.log(pc.green(' ✓ Generated type declarations'));
222
236
  // Remind user to install dependencies
223
237
  console.log('');
@@ -3,5 +3,5 @@ export declare const BranchStatus: {
3
3
  readonly MERGED: "MERGED";
4
4
  };
5
5
  export type BranchStatus = (typeof BranchStatus)[keyof typeof BranchStatus];
6
- export declare const WEB_APP_BASE_URL = "http://localhost:3000";
6
+ export declare const WEB_APP_BASE_URL = "https://embeddables-web-fpnc2wscy-embeddables.vercel.app";
7
7
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY;;;CAGf,CAAA;AAEV,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAA;AAG3E,eAAO,MAAM,gBAAgB,0BAA0B,CAAA"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY;;;CAGf,CAAA;AAEV,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAA;AAG3E,eAAO,MAAM,gBAAgB,6DAA6D,CAAA"}
package/dist/constants.js CHANGED
@@ -3,4 +3,5 @@ export const BranchStatus = {
3
3
  MERGED: 'MERGED',
4
4
  };
5
5
  // export const WEB_APP_BASE_URL = 'https://app.embeddables.com'
6
- export const WEB_APP_BASE_URL = 'http://localhost:3000';
6
+ export const WEB_APP_BASE_URL = 'https://embeddables-web-fpnc2wscy-embeddables.vercel.app';
7
+ // export const WEB_APP_BASE_URL = 'http://localhost:3000'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@embeddables/cli",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "embeddables": "./bin/embeddables.mjs"