Skip to content

Commit c990d34

Browse files
committed
520 sdk - Rename @bytechef/embedded-react to @bytechef/embedded and flatten SDK layout
1 parent 99853bd commit c990d34

63 files changed

Lines changed: 1743 additions & 4013 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

client/package-lock.json

Lines changed: 71 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"@ag-ui/core": "^0.0.57",
5050
"@assistant-ui/react": "^0.14.23",
5151
"@assistant-ui/react-markdown": "^0.14.4",
52-
"@bytechef/embedded-react": "file:../sdks/frontend/embedded/library/react",
52+
"@bytechef/embedded": "file:../sdks/frontend/embedded/library",
5353
"@hookform/resolvers": "^5.4.0",
5454
"@lingui/core": "^6.4.0",
5555
"@lingui/react": "^6.4.0",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
declare module '@bytechef/embedded-react' {
1+
declare module '@bytechef/embedded' {
22
interface UseConnectDialogProps {
33
baseUrl?: string;
44
environment?: string;

client/src/connect.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {useConnectDialog} from '@bytechef/embedded-react';
1+
import {useConnectDialog} from '@bytechef/embedded';
22
import {useEffect, useRef, useState} from 'react';
33
import {createRoot} from 'react-dom/client';
44

sdks/frontend/embedded/DEVELOPMENT.md

Lines changed: 36 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Development Guide for @bytechef/embedded-react
1+
# Development Guide for @bytechef/embedded
22

3-
This guide explains how to develop and test the `@bytechef/embedded-react` library with hot reload capabilities.
3+
This guide explains how to develop and test the `@bytechef/embedded` library with hot reload capabilities.
44

55
## Table of Contents
66

@@ -34,7 +34,7 @@ npm run setup:link
3434
This command does the following:
3535

3636
1. Builds the library
37-
2. Creates a global npm link for `@bytechef/embedded-react`
37+
2. Creates a global npm link for `@bytechef/embedded`
3838
3. Links the test app to use the globally linked library
3939

4040
### Development Workflow
@@ -44,20 +44,20 @@ Open **two terminal windows**:
4444
**Terminal 1 - Library (with watch mode):**
4545

4646
```bash
47-
cd library/react
47+
cd library
4848
npm run watch
4949
```
5050

5151
**Terminal 2 - Test App:**
5252

5353
```bash
54-
cd test-apps/react
54+
cd test-apps
5555
npm run dev
5656
```
5757

5858
Now:
5959

60-
- Make changes to the library source code in `library/react/src/`
60+
- Make changes to the library source code in `library/src/`
6161
- Vite will automatically rebuild the library
6262
- Next.js will detect the changes and hot reload the test app
6363
- See your changes immediately in the browser
@@ -67,10 +67,10 @@ Now:
6767
To unlink the library:
6868

6969
```bash
70-
# From test-apps/react directory
70+
# From test-apps directory
7171
npm run unlink:library
7272

73-
# From library/react directory
73+
# From library directory
7474
npm run unlink:local
7575
```
7676

@@ -113,7 +113,7 @@ npm run publish:library
113113
npm run install:test-app
114114

115115
# Start the test app
116-
cd test-apps/react
116+
cd test-apps
117117
npm run dev
118118
```
119119

@@ -124,14 +124,14 @@ When using the local registry, you need to republish after changes:
124124
1. Make changes to library code
125125
2. Rebuild and republish:
126126
```bash
127-
cd library/react
127+
cd library
128128
npm run build
129129
npm run publish:local
130130
```
131131
3. Reinstall in test app:
132132
```bash
133-
cd ../../test-apps/react
134-
npm install @bytechef/embedded-react@latest --registry http://localhost:4873
133+
cd ../../test-apps
134+
npm install @bytechef/embedded@latest --registry http://localhost:4873
135135
```
136136
4. Next.js will hot reload with the new version
137137

@@ -147,7 +147,7 @@ To automatically use the local registry for `@bytechef` packages, edit `.npmrc`:
147147
Then you can use standard npm commands:
148148

149149
```bash
150-
npm install @bytechef/embedded-react@latest
150+
npm install @bytechef/embedded@latest
151151
```
152152

153153
### Stop the Registry
@@ -167,8 +167,8 @@ This is the **recommended approach** for active development:
167167
npm run setup:link
168168
169169
# Development (in separate terminals)
170-
cd library/react && npm run watch # Terminal 1
171-
cd test-apps/react && npm run dev # Terminal 2
170+
cd library && npm run watch # Terminal 1
171+
cd test-apps && npm run dev # Terminal 2
172172
```
173173

174174
**Advantages:**
@@ -190,7 +190,7 @@ Occasionally test the full build process:
190190

191191
```bash
192192
# Build the library
193-
cd library/react
193+
cd library
194194
npm run build
195195
196196
# Test the built output
@@ -210,22 +210,20 @@ npm run publish:library
210210
211211
# Install and test in test-app
212212
npm run install:test-app
213-
cd test-apps/react && npm run build
213+
cd test-apps && npm run build
214214
```
215215

216216
## Project Structure
217217

218218
```
219219
frontend/embedded/
220-
├── library/ # SDK libraries
221-
│ └── react/ # React SDK library
222-
│ ├── src/ # Source code
223-
│ ├── dist/ # Built output (generated)
224-
│ └── package.json
225-
├── test-apps/ # Test applications
226-
│ └── react/ # Next.js test application
227-
│ ├── app/ # Next.js pages
228-
│ └── package.json
220+
├── library/ # React SDK library
221+
│ ├── src/ # Source code
222+
│ ├── dist/ # Built output (generated)
223+
│ └── package.json
224+
├── test-apps/ # Next.js test application
225+
│ ├── app/ # Next.js pages
226+
│ └── package.json
229227
├── verdaccio.config.yaml # Local registry config
230228
├── .npmrc # NPM configuration
231229
├── .gitignore # Git ignore file
@@ -248,7 +246,7 @@ frontend/embedded/
248246
| `npm run build:all` | Build the library |
249247
| `npm run clean` | Clean all build artifacts and node_modules |
250248
251-
### Library (`library/react/`)
249+
### Library (`library/`)
252250
253251
| Script | Description |
254252
| ------------------------- | ---------------------------------------- |
@@ -262,12 +260,12 @@ frontend/embedded/
262260
| `npm run storybook` | Run Storybook dev server |
263261
| `npm run build-storybook` | Build Storybook |
264262
265-
### Test App (`test-apps/react/`)
263+
### Test App (`test-apps/`)
266264
267265
| Script | Description |
268266
| ------------------------ | --------------------------------------- |
269267
| `npm run dev` | Start Next.js development server |
270-
| `npm run link:library` | Link to global @bytechef/embedded-react |
268+
| `npm run link:library` | Link to global @bytechef/embedded |
271269
| `npm run unlink:library` | Unlink from global package |
272270
| `npm run install:local` | Install from local registry |
273271
| `npm run build` | Build production test app |
@@ -278,21 +276,21 @@ frontend/embedded/
278276
279277
**Using npm link:**
280278
281-
1. Ensure `npm run watch` is running in library/react directory
282-
2. Check that the test app is linked: `ls -la test-apps/react/node_modules/@bytechef/embedded-react` (should show symlink)
279+
1. Ensure `npm run watch` is running in library directory
280+
2. Check that the test app is linked: `ls -la test-apps/node_modules/@bytechef/embedded` (should show symlink)
283281
3. Try restarting the Next.js dev server
284282
285283
**Using Verdaccio:**
286284
287285
1. You need to republish after changes
288286
2. Ensure test app is installing from local registry: check `@bytechef:registry` in `.npmrc`
289287
290-
### "Cannot find module @bytechef/embedded-react"
288+
### "Cannot find module @bytechef/embedded"
291289
292290
1. Check if the library is linked or installed:
293291
294292
```bash
295-
cd test-apps/react
293+
cd test-apps
296294
ls -la node_modules/@bytechef
297295
```
298296
@@ -328,17 +326,17 @@ npm run setup:link # or your preferred method
328326

329327
### Hot reload not working
330328

331-
1. Ensure library watch mode is running: `cd library/react && npm run watch`
329+
1. Ensure library watch mode is running: `cd library && npm run watch`
332330
2. Check Vite output for build errors
333-
3. Restart Next.js dev server: `cd test-apps/react && npm run dev`
334-
4. Check symlink exists: `ls -la test-apps/react/node_modules/@bytechef/embedded-react`
331+
3. Restart Next.js dev server: `cd test-apps && npm run dev`
332+
4. Check symlink exists: `ls -la test-apps/node_modules/@bytechef/embedded`
335333

336334
### Type errors in test app
337335

338336
The test app may cache old type definitions:
339337

340338
```bash
341-
cd test-apps/react
339+
cd test-apps
342340
rm -rf .next
343341
npm run dev
344342
```
@@ -375,4 +373,4 @@ npm run dev
375373
3. Start development servers
376374
4. Make changes and see them live!
377375

378-
For more information about the library itself, see the main [README.md](library/react/README.md).
376+
For more information about the library itself, see the main [README.md](library/README.md).

sdks/frontend/embedded/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ This workspace contains the ByteChef Embedded SDK for integrating workflow autom
44

55
## Structure
66

7-
- **library/react/** - The React SDK library for embedding ByteChef workflows
8-
- **test-apps/react/** - Next.js test application for development and testing
7+
- **library/** - The React SDK library for embedding ByteChef workflows
8+
- **test-apps/** - Next.js test application for development and testing
99

1010
## Quick Start
1111

@@ -40,7 +40,7 @@ npm run install:test-app
4040
## Documentation
4141

4242
- [DEVELOPMENT.md](DEVELOPMENT.md) - Detailed development guide with hot reload setup
43-
- [library/react/README.md](library/react/README.md) - Library documentation
43+
- [library/README.md](library/README.md) - Library documentation
4444

4545
## Package Versions
4646

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)