buncargo 1.0.26 → 3.0.0

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.
Files changed (222) hide show
  1. package/dist/bin.d.ts +1 -12
  2. package/dist/bin.js +261 -252
  3. package/dist/cli/bin.d.ts +13 -0
  4. package/dist/cli/bin.js +315 -0
  5. package/dist/cli/commands/help.d.ts +1 -0
  6. package/dist/cli/commands/runtime.d.ts +5 -0
  7. package/dist/cli/commands/version.d.ts +1 -0
  8. package/dist/cli/index.d.ts +1 -0
  9. package/dist/cli/index.js +14 -0
  10. package/dist/cli/run-cli.d.ts +22 -0
  11. package/dist/cli.d.ts +1 -22
  12. package/dist/cli.js +5 -13
  13. package/dist/config/config.d.ts +1 -0
  14. package/dist/config/define-config.d.ts +13 -0
  15. package/dist/config/index.d.ts +3 -0
  16. package/dist/config/index.js +15 -0
  17. package/dist/config/merge-configs.d.ts +3 -0
  18. package/dist/config/validate-config.d.ts +3 -0
  19. package/dist/config.d.ts +1 -72
  20. package/dist/config.js +12 -12
  21. package/dist/core/docker.d.ts +1 -74
  22. package/dist/core/docker.js +35 -26
  23. package/dist/core/index.d.ts +1 -1
  24. package/dist/core/index.js +123 -108
  25. package/dist/core/network.js +2 -2
  26. package/dist/core/ports.d.ts +22 -0
  27. package/dist/core/ports.js +5 -1
  28. package/dist/core/process.js +1 -1
  29. package/dist/core/tunnel.d.ts +33 -0
  30. package/dist/core/utils.js +2 -2
  31. package/dist/core/watchdog-runner.js +45 -42
  32. package/dist/core/watchdog.d.ts +1 -0
  33. package/dist/core/watchdog.js +4 -2
  34. package/dist/docker/index.d.ts +1 -0
  35. package/dist/docker/index.js +38 -0
  36. package/dist/docker/runtime.d.ts +87 -0
  37. package/dist/docker/runtime.js +37 -0
  38. package/dist/docker-compose/compose.d.ts +1 -0
  39. package/dist/docker-compose/generated-file.d.ts +7 -0
  40. package/dist/docker-compose/index.d.ts +3 -0
  41. package/dist/docker-compose/index.js +15 -0
  42. package/dist/docker-compose/model.d.ts +6 -0
  43. package/dist/docker-compose/services/clickhouse.d.ts +16 -0
  44. package/dist/docker-compose/services/define-docker-service.d.ts +41 -0
  45. package/dist/docker-compose/services/index.d.ts +23 -0
  46. package/dist/docker-compose/services/index.js +17 -0
  47. package/dist/docker-compose/services/postgres.d.ts +12 -0
  48. package/dist/docker-compose/services/redis.d.ts +12 -0
  49. package/dist/docker-compose/services/shared.d.ts +7 -0
  50. package/dist/docker-compose/yaml.d.ts +2 -0
  51. package/dist/environment/create-dev-environment.d.ts +23 -0
  52. package/dist/environment/index.d.ts +1 -0
  53. package/dist/environment/index.js +15 -0
  54. package/dist/environment/logging.d.ts +17 -0
  55. package/dist/environment/seeding.d.ts +9 -0
  56. package/dist/environment.d.ts +1 -23
  57. package/dist/environment.js +12 -14
  58. package/dist/index-045jksh5.js +147 -0
  59. package/dist/index-08wa79cs.js +125 -117
  60. package/dist/index-0kxnae3z.js +335 -0
  61. package/dist/index-1mdrf7nz.js +66 -0
  62. package/dist/index-1yvbwj4k.js +262 -242
  63. package/dist/index-23ev345g.js +475 -0
  64. package/dist/index-2ckr49sf.js +228 -0
  65. package/dist/index-2f47khe5.js +376 -369
  66. package/dist/index-2fr3g85b.js +220 -183
  67. package/dist/index-38xnzpa6.js +450 -0
  68. package/dist/index-3h3dhtf2.js +51 -43
  69. package/dist/index-42x95209.js +51 -43
  70. package/dist/index-4gp0az1g.js +145 -0
  71. package/dist/index-4xrxh8yv.js +72 -0
  72. package/dist/index-5gmws6ah.js +181 -0
  73. package/dist/index-5hka0tff.js +78 -76
  74. package/dist/index-5rfqps4b.js +3 -0
  75. package/dist/index-5t9jxqm0.js +428 -0
  76. package/dist/index-6c1w1xk5.js +101 -0
  77. package/dist/index-6fm7mvwj.js +118 -97
  78. package/dist/index-6srpc523.js +127 -128
  79. package/dist/index-731rzzfp.js +187 -0
  80. package/dist/index-75y4cg2z.js +51 -43
  81. package/dist/index-7ja4ywyj.js +126 -127
  82. package/dist/index-8bw1cmz4.js +531 -0
  83. package/dist/index-8hbbj1mp.js +120 -121
  84. package/dist/index-8xj2p5n5.js +145 -0
  85. package/dist/index-bj79tw5w.js +0 -0
  86. package/dist/index-bnk6nr0g.js +73 -0
  87. package/dist/index-brbbzyks.js +72 -0
  88. package/dist/index-c0dr6mcv.js +123 -0
  89. package/dist/index-cty0bcry.js +235 -218
  90. package/dist/index-d8tyv5se.js +228 -0
  91. package/dist/index-d9efy0n4.js +176 -150
  92. package/dist/index-etfmqjjf.js +427 -0
  93. package/dist/index-fb29934k.js +172 -0
  94. package/dist/index-g50jw1yf.js +72 -0
  95. package/dist/index-g6eb5wdw.js +118 -117
  96. package/dist/index-ggq3yryx.js +99 -95
  97. package/dist/index-h70tce00.js +177 -0
  98. package/dist/index-hkxtfqtc.js +333 -0
  99. package/dist/index-kf3dhser.js +146 -143
  100. package/dist/index-ma6tgdb2.js +500 -0
  101. package/dist/index-mam0bcyz.js +123 -0
  102. package/dist/index-mm412dkp.js +274 -0
  103. package/dist/index-n8v18aeb.js +0 -0
  104. package/dist/index-ndnmnsej.js +378 -371
  105. package/dist/index-p8wty0e2.js +389 -379
  106. package/dist/index-qfphr2fd.js +100 -0
  107. package/dist/index-qqmms8rs.js +51 -43
  108. package/dist/index-qw4093g2.js +51 -43
  109. package/dist/index-qzwpzjbx.js +121 -122
  110. package/dist/index-segbnm0h.js +146 -143
  111. package/dist/index-t0fj6gg1.js +112 -0
  112. package/dist/index-thdkwnv7.js +122 -0
  113. package/dist/index-tjbx2r2t.js +270 -0
  114. package/dist/index-tjqw9vtj.js +62 -54
  115. package/dist/index-vbpb89jy.js +248 -0
  116. package/dist/index-vhs88xhe.js +99 -95
  117. package/dist/index-w8zxnjka.js +249 -0
  118. package/dist/index-wk2na3t9.js +404 -0
  119. package/dist/index-wz9x8g7z.js +383 -373
  120. package/dist/index-x249gyde.js +388 -378
  121. package/dist/index-xkvd0nsd.js +187 -0
  122. package/dist/index-yedqxm1z.js +80 -0
  123. package/dist/index-zfjzzjkf.js +266 -0
  124. package/dist/index.d.ts +12 -8
  125. package/dist/index.js +66 -35
  126. package/dist/lint.d.ts +1 -46
  127. package/dist/lint.js +3 -7
  128. package/dist/loader/cache.d.ts +4 -0
  129. package/dist/loader/find-config-file.d.ts +2 -0
  130. package/dist/loader/index.d.ts +5 -0
  131. package/dist/loader/index.js +24 -0
  132. package/dist/loader/load-dev-env.d.ts +5 -0
  133. package/dist/loader/loader.d.ts +1 -0
  134. package/dist/loader.d.ts +1 -45
  135. package/dist/loader.js +22 -20
  136. package/dist/prisma/index.d.ts +1 -0
  137. package/dist/prisma/prisma.d.ts +29 -0
  138. package/dist/prisma.d.ts +1 -29
  139. package/dist/prisma.js +6 -10
  140. package/dist/src/bin.js +309 -0
  141. package/dist/src/cli.js +5 -0
  142. package/dist/src/config.js +15 -0
  143. package/dist/src/core/docker.js +38 -0
  144. package/dist/src/core/index.js +130 -0
  145. package/dist/src/core/network.js +9 -0
  146. package/dist/src/core/ports.js +23 -0
  147. package/dist/src/core/process.js +31 -0
  148. package/dist/src/core/utils.js +11 -0
  149. package/dist/src/core/watchdog-runner.js +69 -0
  150. package/dist/src/core/watchdog.js +28 -0
  151. package/dist/src/docker/runtime.js +37 -0
  152. package/dist/src/docker-compose/index.js +16 -0
  153. package/dist/src/docker-compose/services/index.js +17 -0
  154. package/dist/src/environment.js +12 -0
  155. package/dist/src/index.js +122 -0
  156. package/dist/src/lint.js +3 -0
  157. package/dist/src/loader.js +25 -0
  158. package/dist/src/prisma.js +6 -0
  159. package/dist/src/types.js +0 -0
  160. package/dist/typecheck/index.d.ts +1 -0
  161. package/dist/typecheck/index.js +7 -0
  162. package/dist/typecheck/typecheck.d.ts +46 -0
  163. package/dist/types/all-types.d.ts +501 -0
  164. package/dist/types/cli.d.ts +1 -0
  165. package/dist/types/config.d.ts +6 -0
  166. package/dist/types/docker.d.ts +15 -0
  167. package/dist/types/environment.d.ts +8 -0
  168. package/dist/types/hooks.d.ts +9 -0
  169. package/dist/types/index.d.ts +1 -0
  170. package/dist/types/index.js +0 -0
  171. package/dist/types/prisma.d.ts +1 -0
  172. package/dist/types.d.ts +1 -393
  173. package/package.json +145 -140
  174. package/readme.md +358 -105
  175. package/src/cli/bin.ts +77 -0
  176. package/src/cli/commands/help.ts +39 -0
  177. package/src/cli/commands/runtime.ts +72 -0
  178. package/src/cli/commands/version.ts +4 -0
  179. package/src/cli/index.ts +1 -0
  180. package/{cli.ts → src/cli/run-cli.ts} +95 -6
  181. package/src/config/define-config.ts +30 -0
  182. package/src/config/index.ts +3 -0
  183. package/src/config/merge-configs.ts +33 -0
  184. package/src/config/validate-config.ts +136 -0
  185. package/{core → src/core}/index.ts +2 -2
  186. package/{core → src/core}/ports.ts +68 -1
  187. package/{core → src/core}/process.ts +6 -2
  188. package/src/core/tunnel.ts +151 -0
  189. package/{core → src/core}/utils.ts +1 -0
  190. package/{core → src/core}/watchdog.ts +5 -1
  191. package/src/docker/index.ts +1 -0
  192. package/{core/docker.ts → src/docker/runtime.ts} +40 -4
  193. package/src/docker-compose/generated-file.ts +45 -0
  194. package/src/docker-compose/index.ts +7 -0
  195. package/src/docker-compose/model.ts +197 -0
  196. package/src/docker-compose/services/clickhouse.ts +79 -0
  197. package/src/docker-compose/services/define-docker-service.ts +109 -0
  198. package/src/docker-compose/services/index.ts +67 -0
  199. package/src/docker-compose/services/postgres.ts +60 -0
  200. package/src/docker-compose/services/redis.ts +48 -0
  201. package/src/docker-compose/services/shared.ts +79 -0
  202. package/src/docker-compose/yaml.ts +88 -0
  203. package/{environment.ts → src/environment/create-dev-environment.ts} +101 -146
  204. package/src/environment/index.ts +1 -0
  205. package/src/environment/logging.ts +101 -0
  206. package/src/environment/seeding.ts +57 -0
  207. package/{index.ts → src/index.ts} +49 -15
  208. package/src/loader/cache.ts +23 -0
  209. package/src/loader/find-config-file.ts +29 -0
  210. package/src/loader/index.ts +17 -0
  211. package/src/loader/load-dev-env.ts +38 -0
  212. package/src/prisma/index.ts +1 -0
  213. package/{prisma.ts → src/prisma/prisma.ts} +4 -2
  214. package/src/typecheck/index.ts +1 -0
  215. package/{types.ts → src/types/all-types.ts} +137 -6
  216. package/src/types/index.ts +1 -0
  217. package/bin.ts +0 -191
  218. package/config.ts +0 -194
  219. package/loader.ts +0 -126
  220. /package/{core → src/core}/network.ts +0 -0
  221. /package/{core → src/core}/watchdog-runner.ts +0 -0
  222. /package/{lint.ts → src/typecheck/typecheck.ts} +0 -0
package/dist/index.js CHANGED
@@ -1,19 +1,58 @@
1
+ import"./index-bj79tw5w.js";
1
2
  import {
2
3
  getFlagValue,
3
4
  hasFlag,
4
- runCli
5
- } from "./index-segbnm0h.js";
6
- import {
7
- runWorkspaceTypecheck
8
- } from "./index-d9efy0n4.js";
5
+ resolveExposeTargets,
6
+ runCli,
7
+ startPublicTunnels,
8
+ stopPublicTunnels
9
+ } from "./index-0kxnae3z.js";
9
10
  import {
10
11
  clearDevEnvCache,
11
12
  getDevEnv,
12
13
  loadDevEnv
13
- } from "./index-42x95209.js";
14
+ } from "./index-4xrxh8yv.js";
14
15
  import {
15
16
  createDevEnvironment
16
- } from "./index-p8wty0e2.js";
17
+ } from "./index-ma6tgdb2.js";
18
+ import {
19
+ DOCKER_NOT_RUNNING_MESSAGE,
20
+ MAX_ATTEMPTS,
21
+ POLL_INTERVAL,
22
+ areContainersRunning,
23
+ assertDockerRunning,
24
+ isContainerRunning,
25
+ isDockerRunning
26
+ } from "./index-d8tyv5se.js";
27
+ import {
28
+ getEnvVar,
29
+ getLocalIp,
30
+ isCI,
31
+ isPortAvailable,
32
+ logApiUrl,
33
+ logExpoApiUrl,
34
+ logFrontendPort,
35
+ sleep,
36
+ waitForServer
37
+ } from "./index-c0dr6mcv.js";
38
+ import {
39
+ calculatePortOffset,
40
+ computeDevIdentity,
41
+ findMonorepoRoot,
42
+ getProjectName,
43
+ getWorktreeName,
44
+ getWorktreeProjectSuffix,
45
+ isWorktree
46
+ } from "./index-fb29934k.js";
47
+ import {
48
+ DEFAULT_GENERATED_COMPOSE_FILE,
49
+ buildComposeModel,
50
+ composeToYaml,
51
+ getGeneratedComposePath,
52
+ service,
53
+ writeGeneratedComposeFile
54
+ } from "./index-5t9jxqm0.js";
55
+ import"./index-bnk6nr0g.js";
17
56
  import {
18
57
  getHeartbeatFile,
19
58
  getWatchdogPidFile,
@@ -22,7 +61,7 @@ import {
22
61
  startHeartbeat,
23
62
  stopHeartbeat,
24
63
  stopWatchdog
25
- } from "./index-ggq3yryx.js";
64
+ } from "./index-mam0bcyz.js";
26
65
  import {
27
66
  getProcessOnPort,
28
67
  isPortInUse,
@@ -30,49 +69,32 @@ import {
30
69
  killProcessOnPort,
31
70
  killProcessOnPortAndWait,
32
71
  killProcessesOnAppPorts
33
- } from "./index-1yvbwj4k.js";
72
+ } from "./index-mm412dkp.js";
34
73
  import {
35
74
  assertValidConfig,
36
75
  defineDevConfig,
37
76
  mergeConfigs,
38
77
  validateConfig
39
- } from "./index-tjqw9vtj.js";
40
- import"./index-5hka0tff.js";
41
- import {
42
- MAX_ATTEMPTS,
43
- POLL_INTERVAL,
44
- areContainersRunning,
45
- isContainerRunning
46
- } from "./index-2fr3g85b.js";
78
+ } from "./index-t0fj6gg1.js";
47
79
  import {
48
- getEnvVar,
49
- getLocalIp,
50
- isCI,
51
- isPortAvailable,
52
- logApiUrl,
53
- logExpoApiUrl,
54
- logFrontendPort,
55
- sleep,
56
- waitForServer
57
- } from "./index-6fm7mvwj.js";
58
- import {
59
- calculatePortOffset,
60
- findMonorepoRoot,
61
- getProjectName,
62
- getWorktreeName,
63
- isWorktree
64
- } from "./index-08wa79cs.js";
80
+ runWorkspaceTypecheck
81
+ } from "./index-h70tce00.js";
65
82
  import"./index-qnx9j3qa.js";
66
83
  export {
84
+ writeGeneratedComposeFile,
67
85
  waitForServer,
68
86
  validateConfig,
69
87
  stopWatchdog,
88
+ stopPublicTunnels,
70
89
  stopHeartbeat,
90
+ startPublicTunnels,
71
91
  startHeartbeat,
72
92
  spawnWatchdog,
73
93
  sleep,
94
+ service,
74
95
  runWorkspaceTypecheck,
75
96
  runCli,
97
+ resolveExposeTargets,
76
98
  mergeConfigs,
77
99
  logFrontendPort,
78
100
  logExpoApiUrl,
@@ -86,25 +108,34 @@ export {
86
108
  isProcessAlive,
87
109
  isPortInUse,
88
110
  isPortAvailable,
111
+ isDockerRunning,
89
112
  isContainerRunning,
90
113
  isCI,
91
114
  hasFlag,
115
+ getWorktreeProjectSuffix,
92
116
  getWorktreeName,
93
117
  getWatchdogPidFile,
94
118
  getProjectName,
95
119
  getProcessOnPort,
96
120
  getLocalIp,
97
121
  getHeartbeatFile,
122
+ getGeneratedComposePath,
98
123
  getFlagValue,
99
124
  getEnvVar,
100
125
  getDevEnv,
101
126
  findMonorepoRoot,
102
127
  defineDevConfig,
103
128
  createDevEnvironment,
129
+ computeDevIdentity,
130
+ composeToYaml,
104
131
  clearDevEnvCache,
105
132
  calculatePortOffset,
133
+ buildComposeModel,
106
134
  assertValidConfig,
135
+ assertDockerRunning,
107
136
  areContainersRunning,
108
137
  POLL_INTERVAL,
109
- MAX_ATTEMPTS
138
+ MAX_ATTEMPTS,
139
+ DOCKER_NOT_RUNNING_MESSAGE,
140
+ DEFAULT_GENERATED_COMPOSE_FILE
110
141
  };
package/dist/lint.d.ts CHANGED
@@ -1,46 +1 @@
1
- /**
2
- * Options for running workspace typechecks.
3
- */
4
- export interface WorkspaceTypecheckOptions {
5
- /** Root directory to search from (defaults to cwd) */
6
- root?: string;
7
- /** Glob patterns for workspaces to check (defaults to apps/*, packages/*, modules) */
8
- patterns?: string[];
9
- /** Maximum concurrent typecheck processes (defaults to 1) */
10
- concurrency?: number;
11
- /** Print output to console (defaults to true) */
12
- verbose?: boolean;
13
- }
14
- /**
15
- * Result of a single workspace typecheck.
16
- */
17
- export interface WorkspaceTypecheckResult {
18
- workspace: string;
19
- duration: number;
20
- success: boolean;
21
- fileCount: number;
22
- errorOutput?: string;
23
- }
24
- /**
25
- * Overall result of running typechecks across all workspaces.
26
- */
27
- export interface TypecheckResult {
28
- success: boolean;
29
- totalDuration: number;
30
- totalFiles: number;
31
- workspaceCount: number;
32
- results: WorkspaceTypecheckResult[];
33
- }
34
- /**
35
- * Run TypeScript typechecks across all workspaces that have a `typecheck` script.
36
- *
37
- * @example
38
- * ```typescript
39
- * const result = await runWorkspaceTypecheck({ verbose: true })
40
- * if (!result.success) {
41
- * console.error('Typecheck failed')
42
- * process.exit(1)
43
- * }
44
- * ```
45
- */
46
- export declare function runWorkspaceTypecheck(options?: WorkspaceTypecheckOptions): Promise<TypecheckResult>;
1
+ export * from "./typecheck";
package/dist/lint.js CHANGED
@@ -1,7 +1,3 @@
1
- import {
2
- runWorkspaceTypecheck
3
- } from "./index-d9efy0n4.js";
4
- import"./index-qnx9j3qa.js";
5
- export {
6
- runWorkspaceTypecheck
7
- };
1
+ import { runWorkspaceTypecheck } from "./index-h70tce00.js";
2
+ import "./index-qnx9j3qa.js";
3
+ export { runWorkspaceTypecheck };
@@ -0,0 +1,4 @@
1
+ import type { AppConfig, DevEnvironment, ServiceConfig } from "../types";
2
+ export declare function setCachedDevEnv(env: DevEnvironment<Record<string, ServiceConfig>, Record<string, AppConfig>>): void;
3
+ export declare function getCachedDevEnv(): DevEnvironment<Record<string, ServiceConfig>, Record<string, AppConfig>> | null;
4
+ export declare function clearDevEnvCache(): void;
@@ -0,0 +1,2 @@
1
+ export declare const CONFIG_FILES: string[];
2
+ export declare function findConfigFile(startDir: string): string | null;
@@ -0,0 +1,5 @@
1
+ import type { AppConfig, DevEnvironment, ServiceConfig } from "../types";
2
+ export { clearDevEnvCache } from "./cache";
3
+ export { CONFIG_FILES, findConfigFile } from "./find-config-file";
4
+ export { loadDevEnv } from "./load-dev-env";
5
+ export declare function getDevEnv(): DevEnvironment<Record<string, ServiceConfig>, Record<string, AppConfig>>;
@@ -0,0 +1,24 @@
1
+ import {
2
+ CONFIG_FILES,
3
+ clearDevEnvCache,
4
+ findConfigFile,
5
+ getDevEnv,
6
+ loadDevEnv
7
+ } from "../index-4xrxh8yv.js";
8
+ import"../index-ma6tgdb2.js";
9
+ import"../index-d8tyv5se.js";
10
+ import"../index-c0dr6mcv.js";
11
+ import"../index-fb29934k.js";
12
+ import"../index-5t9jxqm0.js";
13
+ import"../index-bnk6nr0g.js";
14
+ import"../index-mam0bcyz.js";
15
+ import"../index-mm412dkp.js";
16
+ import"../index-t0fj6gg1.js";
17
+ import"../index-qnx9j3qa.js";
18
+ export {
19
+ loadDevEnv,
20
+ getDevEnv,
21
+ findConfigFile,
22
+ clearDevEnvCache,
23
+ CONFIG_FILES
24
+ };
@@ -0,0 +1,5 @@
1
+ import type { AppConfig, DevEnvironment, ServiceConfig } from "../types";
2
+ export declare function loadDevEnv(options?: {
3
+ cwd?: string;
4
+ reload?: boolean;
5
+ }): Promise<DevEnvironment<Record<string, ServiceConfig>, Record<string, AppConfig>>>;
@@ -0,0 +1 @@
1
+ export * from "./index";
package/dist/loader.d.ts CHANGED
@@ -1,45 +1 @@
1
- import type { AppConfig, DevEnvironment, ServiceConfig } from "./types";
2
- export declare const CONFIG_FILES: string[];
3
- /**
4
- * Find a config file by traversing up from the starting directory.
5
- * Returns the full path to the config file, or null if not found.
6
- */
7
- export declare function findConfigFile(startDir: string): string | null;
8
- /**
9
- * Load the dev environment from the config file.
10
- * Caches the result for subsequent calls.
11
- *
12
- * @example
13
- * ```typescript
14
- * import { loadDevEnv } from 'buncargo'
15
- *
16
- * const env = await loadDevEnv()
17
- * console.log(env.ports.postgres) // 5432 (or offset port)
18
- * console.log(env.urls.api) // http://localhost:3000
19
- * ```
20
- */
21
- export declare function loadDevEnv(options?: {
22
- /** Directory to search for config file. Defaults to process.cwd() */
23
- cwd?: string;
24
- /** Skip cache and reload config */
25
- reload?: boolean;
26
- }): Promise<DevEnvironment<Record<string, ServiceConfig>, Record<string, AppConfig>>>;
27
- /**
28
- * Get the cached dev environment synchronously.
29
- * Throws if loadDevEnv() hasn't been called yet.
30
- *
31
- * @example
32
- * ```typescript
33
- * // First load async
34
- * await loadDevEnv()
35
- *
36
- * // Then use sync getter anywhere
37
- * import { getDevEnv } from 'buncargo'
38
- * const env = getDevEnv()
39
- * ```
40
- */
41
- export declare function getDevEnv(): DevEnvironment<Record<string, ServiceConfig>, Record<string, AppConfig>>;
42
- /**
43
- * Clear the cached environment.
44
- */
45
- export declare function clearDevEnvCache(): void;
1
+ export * from "./loader/index";
package/dist/loader.js CHANGED
@@ -1,23 +1,25 @@
1
1
  import {
2
- CONFIG_FILES,
3
- clearDevEnvCache,
4
- findConfigFile,
5
- getDevEnv,
6
- loadDevEnv
7
- } from "./index-42x95209.js";
8
- import"./index-p8wty0e2.js";
9
- import"./index-ggq3yryx.js";
10
- import"./index-1yvbwj4k.js";
11
- import"./index-tjqw9vtj.js";
12
- import"./index-5hka0tff.js";
13
- import"./index-2fr3g85b.js";
14
- import"./index-6fm7mvwj.js";
15
- import"./index-08wa79cs.js";
16
- import"./index-qnx9j3qa.js";
2
+ CONFIG_FILES,
3
+ clearDevEnvCache,
4
+ findConfigFile,
5
+ getDevEnv,
6
+ loadDevEnv,
7
+ } from "./index-yedqxm1z.js";
8
+ import "./index-38xnzpa6.js";
9
+ import "./index-vbpb89jy.js";
10
+ import "./index-w8zxnjka.js";
11
+ import "./index-mam0bcyz.js";
12
+ import "./index-mm412dkp.js";
13
+ import "./index-045jksh5.js";
14
+ import "./index-6c1w1xk5.js";
15
+ import "./index-tjbx2r2t.js";
16
+ import "./index-4gp0az1g.js";
17
+ import "./index-xkvd0nsd.js";
18
+ import "./index-qnx9j3qa.js";
17
19
  export {
18
- loadDevEnv,
19
- getDevEnv,
20
- findConfigFile,
21
- clearDevEnvCache,
22
- CONFIG_FILES
20
+ loadDevEnv,
21
+ getDevEnv,
22
+ findConfigFile,
23
+ clearDevEnvCache,
24
+ CONFIG_FILES,
23
25
  };
@@ -0,0 +1 @@
1
+ export * from "./prisma";
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Prisma integration for dev-tools-v2.
3
+ *
4
+ * When `prisma` is configured in defineDevConfig, `dev.prisma` becomes available
5
+ * with methods to run prisma commands against the Docker development database.
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * // In dev.config.ts
10
+ * const config = defineDevConfig({
11
+ * projectPrefix: 'myapp',
12
+ * services: { postgres: { port: 5432, healthCheck: 'pg_isready' } },
13
+ * prisma: { cwd: 'packages/prisma' } // Enable prisma integration
14
+ * })
15
+ *
16
+ * // Usage
17
+ * await dev.prisma.run(['migrate', 'dev'])
18
+ * await dev.prisma.ensureDatabase()
19
+ * const url = dev.prisma.getDatabaseUrl()
20
+ * ```
21
+ *
22
+ * @internal This module is used internally by createDevEnvironment.
23
+ */
24
+ import type { AppConfig, DevEnvironment, PrismaConfig, PrismaRunner, ServiceConfig } from "../types";
25
+ /**
26
+ * Create a Prisma runner from config (used internally by createDevEnvironment).
27
+ * @internal
28
+ */
29
+ export declare function createPrismaRunner<TServices extends Record<string, ServiceConfig>, TApps extends Record<string, AppConfig>>(env: DevEnvironment<TServices, TApps>, config: PrismaConfig): PrismaRunner;
package/dist/prisma.d.ts CHANGED
@@ -1,29 +1 @@
1
- /**
2
- * Prisma integration for dev-tools-v2.
3
- *
4
- * When `prisma` is configured in defineDevConfig, `dev.prisma` becomes available
5
- * with methods to run prisma commands against the Docker development database.
6
- *
7
- * @example
8
- * ```typescript
9
- * // In dev.config.ts
10
- * const config = defineDevConfig({
11
- * projectPrefix: 'myapp',
12
- * services: { postgres: { port: 5432, healthCheck: 'pg_isready' } },
13
- * prisma: { cwd: 'packages/prisma' } // Enable prisma integration
14
- * })
15
- *
16
- * // Usage
17
- * await dev.prisma.run(['migrate', 'dev'])
18
- * await dev.prisma.ensureDatabase()
19
- * const url = dev.prisma.getDatabaseUrl()
20
- * ```
21
- *
22
- * @internal This module is used internally by createDevEnvironment.
23
- */
24
- import type { AppConfig, DevEnvironment, PrismaConfig, PrismaRunner, ServiceConfig } from "./types";
25
- /**
26
- * Create a Prisma runner from config (used internally by createDevEnvironment).
27
- * @internal
28
- */
29
- export declare function createPrismaRunner<TServices extends Record<string, ServiceConfig>, TApps extends Record<string, AppConfig>>(env: DevEnvironment<TServices, TApps>, config: PrismaConfig): PrismaRunner;
1
+ export * from "./prisma/index";
package/dist/prisma.js CHANGED
@@ -1,10 +1,6 @@
1
- import {
2
- createPrismaRunner
3
- } from "./index-5hka0tff.js";
4
- import"./index-2fr3g85b.js";
5
- import"./index-6fm7mvwj.js";
6
- import"./index-08wa79cs.js";
7
- import"./index-qnx9j3qa.js";
8
- export {
9
- createPrismaRunner
10
- };
1
+ import { createPrismaRunner } from "./index-6c1w1xk5.js";
2
+ import "./index-tjbx2r2t.js";
3
+ import "./index-4gp0az1g.js";
4
+ import "./index-xkvd0nsd.js";
5
+ import "./index-qnx9j3qa.js";
6
+ export { createPrismaRunner };