@bagelink/workspace 1.7.37 → 1.7.41
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/README.md +20 -5
- package/dist/bin/bgl.cjs +1012 -14
- package/dist/bin/bgl.mjs +1001 -4
- package/dist/composable.cjs +21 -0
- package/dist/composable.d.cts +50 -0
- package/dist/composable.d.mts +50 -0
- package/dist/composable.d.ts +50 -0
- package/dist/composable.mjs +18 -0
- package/dist/index.cjs +3 -150
- package/dist/index.d.cts +4 -172
- package/dist/index.d.mts +4 -172
- package/dist/index.d.ts +4 -172
- package/dist/index.mjs +2 -126
- package/dist/shared/workspace.D1xukL92.d.cts +44 -0
- package/dist/shared/workspace.D1xukL92.d.mts +44 -0
- package/dist/shared/workspace.D1xukL92.d.ts +44 -0
- package/dist/shared/workspace.Dx9_TIij.cjs +86 -0
- package/dist/shared/workspace.Twuo1PFw.mjs +78 -0
- package/dist/vite.cjs +88 -4
- package/dist/vite.d.cts +97 -2
- package/dist/vite.d.mts +97 -2
- package/dist/vite.d.ts +97 -2
- package/dist/vite.mjs +82 -3
- package/package.json +6 -1
- package/src/index.ts +9 -77
- package/src/vite.ts +4 -0
- package/dist/shared/workspace.CSNgk3PR.d.cts +0 -113
- package/dist/shared/workspace.CSNgk3PR.d.mts +0 -113
- package/dist/shared/workspace.CSNgk3PR.d.ts +0 -113
- package/dist/shared/workspace.CamNrnD_.cjs +0 -1155
- package/dist/shared/workspace.D0MF8ERh.mjs +0 -79
- package/dist/shared/workspace.DfLGMczD.cjs +0 -87
- package/dist/shared/workspace.PLrsjsJ2.mjs +0 -1134
package/README.md
CHANGED
|
@@ -162,14 +162,13 @@ export default defineConfig(({ mode }) => {
|
|
|
162
162
|
**Access config at runtime with `useWorkspace()`:**
|
|
163
163
|
|
|
164
164
|
```typescript
|
|
165
|
-
import { useWorkspace } from '@bagelink/workspace'
|
|
165
|
+
import { useWorkspace, getApiUrl } from '@bagelink/workspace'
|
|
166
166
|
|
|
167
167
|
// In your app setup
|
|
168
168
|
const { proxy, host, mode } = useWorkspace()
|
|
169
169
|
const auth = initAuth({ baseURL: proxy })
|
|
170
170
|
|
|
171
171
|
// Or get full API URL
|
|
172
|
-
import { getApiUrl } from '@bagelink/workspace'
|
|
173
172
|
const apiUrl = getApiUrl() // 'https://project.bagel.to/api'
|
|
174
173
|
```
|
|
175
174
|
|
|
@@ -581,21 +580,37 @@ const proxy = workspace.createProxy(config)
|
|
|
581
580
|
workspace.generateNetlify(config, './netlify.toml')
|
|
582
581
|
```
|
|
583
582
|
|
|
584
|
-
###
|
|
583
|
+
### Build-Time Functions
|
|
584
|
+
|
|
585
|
+
These are available from `@bagelink/workspace/vite`:
|
|
586
|
+
|
|
587
|
+
#### `createViteProxy(config)`
|
|
585
588
|
|
|
586
589
|
Generate Vite proxy configuration.
|
|
587
590
|
|
|
588
|
-
|
|
591
|
+
```typescript
|
|
592
|
+
import { createViteProxy } from '@bagelink/workspace/vite'
|
|
593
|
+
```
|
|
594
|
+
|
|
595
|
+
#### `writeNetlifyConfig(config, outPath?, additionalConfig?)`
|
|
589
596
|
|
|
590
597
|
Generate and write netlify.toml file.
|
|
591
598
|
|
|
592
|
-
|
|
599
|
+
```typescript
|
|
600
|
+
import { writeNetlifyConfig } from '@bagelink/workspace/vite'
|
|
601
|
+
```
|
|
602
|
+
|
|
603
|
+
#### `setBuildEnvVars(config)`
|
|
593
604
|
|
|
594
605
|
Set environment variables for build process:
|
|
595
606
|
- `BGL_PROXY_PATH` - Proxy path (e.g., `/api`)
|
|
596
607
|
- `BGL_API_HOST` - API host URL
|
|
597
608
|
- `BGL_OPENAPI_URL` - OpenAPI specification URL
|
|
598
609
|
|
|
610
|
+
```typescript
|
|
611
|
+
import { setBuildEnvVars } from '@bagelink/workspace/vite'
|
|
612
|
+
```
|
|
613
|
+
|
|
599
614
|
## License
|
|
600
615
|
|
|
601
616
|
MIT © Bagel Studio
|