@bagelink/workspace 1.7.39 → 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 CHANGED
@@ -162,7 +162,7 @@ export default defineConfig(({ mode }) => {
162
162
  **Access config at runtime with `useWorkspace()`:**
163
163
 
164
164
  ```typescript
165
- import { useWorkspace, getApiUrl } from '@bagelink/workspace/composable'
165
+ import { useWorkspace, getApiUrl } from '@bagelink/workspace'
166
166
 
167
167
  // In your app setup
168
168
  const { proxy, host, mode } = useWorkspace()
@@ -176,7 +176,7 @@ const apiUrl = getApiUrl() // 'https://project.bagel.to/api'
176
176
 
177
177
  ```vue
178
178
  <script setup lang="ts">
179
- import { useWorkspace } from '@bagelink/workspace/composable'
179
+ import { useWorkspace } from '@bagelink/workspace'
180
180
  import { initAuth } from '@bagelink/auth'
181
181
 
182
182
  const { proxy, host, mode } = useWorkspace()
@@ -514,7 +514,7 @@ Show CLI help.
514
514
  Get workspace configuration at runtime. Config is injected as environment variables during build.
515
515
 
516
516
  ```typescript
517
- import { useWorkspace } from '@bagelink/workspace/composable'
517
+ import { useWorkspace } from '@bagelink/workspace'
518
518
 
519
519
  const { proxy, host, openapiUrl, mode } = useWorkspace()
520
520
  ```
@@ -534,7 +534,7 @@ interface RuntimeWorkspaceConfig {
534
534
  Get the full API URL by combining host and proxy.
535
535
 
536
536
  ```typescript
537
- import { getApiUrl } from '@bagelink/workspace/composable'
537
+ import { getApiUrl } from '@bagelink/workspace'
538
538
 
539
539
  const apiUrl = getApiUrl() // 'https://project.bagel.to/api'
540
540
  ```
@@ -580,21 +580,37 @@ const proxy = workspace.createProxy(config)
580
580
  workspace.generateNetlify(config, './netlify.toml')
581
581
  ```
582
582
 
583
- ### `createViteProxy(config)`
583
+ ### Build-Time Functions
584
+
585
+ These are available from `@bagelink/workspace/vite`:
586
+
587
+ #### `createViteProxy(config)`
584
588
 
585
589
  Generate Vite proxy configuration.
586
590
 
587
- ### `writeNetlifyConfig(config, outPath?, additionalConfig?)`
591
+ ```typescript
592
+ import { createViteProxy } from '@bagelink/workspace/vite'
593
+ ```
594
+
595
+ #### `writeNetlifyConfig(config, outPath?, additionalConfig?)`
588
596
 
589
597
  Generate and write netlify.toml file.
590
598
 
591
- ### `setBuildEnvVars(config)`
599
+ ```typescript
600
+ import { writeNetlifyConfig } from '@bagelink/workspace/vite'
601
+ ```
602
+
603
+ #### `setBuildEnvVars(config)`
592
604
 
593
605
  Set environment variables for build process:
594
606
  - `BGL_PROXY_PATH` - Proxy path (e.g., `/api`)
595
607
  - `BGL_API_HOST` - API host URL
596
608
  - `BGL_OPENAPI_URL` - OpenAPI specification URL
597
609
 
610
+ ```typescript
611
+ import { setBuildEnvVars } from '@bagelink/workspace/vite'
612
+ ```
613
+
598
614
  ## License
599
615
 
600
616
  MIT © Bagel Studio