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.
- package/dist/bin.d.ts +1 -12
- package/dist/bin.js +261 -252
- package/dist/cli/bin.d.ts +13 -0
- package/dist/cli/bin.js +315 -0
- package/dist/cli/commands/help.d.ts +1 -0
- package/dist/cli/commands/runtime.d.ts +5 -0
- package/dist/cli/commands/version.d.ts +1 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +14 -0
- package/dist/cli/run-cli.d.ts +22 -0
- package/dist/cli.d.ts +1 -22
- package/dist/cli.js +5 -13
- package/dist/config/config.d.ts +1 -0
- package/dist/config/define-config.d.ts +13 -0
- package/dist/config/index.d.ts +3 -0
- package/dist/config/index.js +15 -0
- package/dist/config/merge-configs.d.ts +3 -0
- package/dist/config/validate-config.d.ts +3 -0
- package/dist/config.d.ts +1 -72
- package/dist/config.js +12 -12
- package/dist/core/docker.d.ts +1 -74
- package/dist/core/docker.js +35 -26
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +123 -108
- package/dist/core/network.js +2 -2
- package/dist/core/ports.d.ts +22 -0
- package/dist/core/ports.js +5 -1
- package/dist/core/process.js +1 -1
- package/dist/core/tunnel.d.ts +33 -0
- package/dist/core/utils.js +2 -2
- package/dist/core/watchdog-runner.js +45 -42
- package/dist/core/watchdog.d.ts +1 -0
- package/dist/core/watchdog.js +4 -2
- package/dist/docker/index.d.ts +1 -0
- package/dist/docker/index.js +38 -0
- package/dist/docker/runtime.d.ts +87 -0
- package/dist/docker/runtime.js +37 -0
- package/dist/docker-compose/compose.d.ts +1 -0
- package/dist/docker-compose/generated-file.d.ts +7 -0
- package/dist/docker-compose/index.d.ts +3 -0
- package/dist/docker-compose/index.js +15 -0
- package/dist/docker-compose/model.d.ts +6 -0
- package/dist/docker-compose/services/clickhouse.d.ts +16 -0
- package/dist/docker-compose/services/define-docker-service.d.ts +41 -0
- package/dist/docker-compose/services/index.d.ts +23 -0
- package/dist/docker-compose/services/index.js +17 -0
- package/dist/docker-compose/services/postgres.d.ts +12 -0
- package/dist/docker-compose/services/redis.d.ts +12 -0
- package/dist/docker-compose/services/shared.d.ts +7 -0
- package/dist/docker-compose/yaml.d.ts +2 -0
- package/dist/environment/create-dev-environment.d.ts +23 -0
- package/dist/environment/index.d.ts +1 -0
- package/dist/environment/index.js +15 -0
- package/dist/environment/logging.d.ts +17 -0
- package/dist/environment/seeding.d.ts +9 -0
- package/dist/environment.d.ts +1 -23
- package/dist/environment.js +12 -14
- package/dist/index-045jksh5.js +147 -0
- package/dist/index-08wa79cs.js +125 -117
- package/dist/index-0kxnae3z.js +335 -0
- package/dist/index-1mdrf7nz.js +66 -0
- package/dist/index-1yvbwj4k.js +262 -242
- package/dist/index-23ev345g.js +475 -0
- package/dist/index-2ckr49sf.js +228 -0
- package/dist/index-2f47khe5.js +376 -369
- package/dist/index-2fr3g85b.js +220 -183
- package/dist/index-38xnzpa6.js +450 -0
- package/dist/index-3h3dhtf2.js +51 -43
- package/dist/index-42x95209.js +51 -43
- package/dist/index-4gp0az1g.js +145 -0
- package/dist/index-4xrxh8yv.js +72 -0
- package/dist/index-5gmws6ah.js +181 -0
- package/dist/index-5hka0tff.js +78 -76
- package/dist/index-5rfqps4b.js +3 -0
- package/dist/index-5t9jxqm0.js +428 -0
- package/dist/index-6c1w1xk5.js +101 -0
- package/dist/index-6fm7mvwj.js +118 -97
- package/dist/index-6srpc523.js +127 -128
- package/dist/index-731rzzfp.js +187 -0
- package/dist/index-75y4cg2z.js +51 -43
- package/dist/index-7ja4ywyj.js +126 -127
- package/dist/index-8bw1cmz4.js +531 -0
- package/dist/index-8hbbj1mp.js +120 -121
- package/dist/index-8xj2p5n5.js +145 -0
- package/dist/index-bj79tw5w.js +0 -0
- package/dist/index-bnk6nr0g.js +73 -0
- package/dist/index-brbbzyks.js +72 -0
- package/dist/index-c0dr6mcv.js +123 -0
- package/dist/index-cty0bcry.js +235 -218
- package/dist/index-d8tyv5se.js +228 -0
- package/dist/index-d9efy0n4.js +176 -150
- package/dist/index-etfmqjjf.js +427 -0
- package/dist/index-fb29934k.js +172 -0
- package/dist/index-g50jw1yf.js +72 -0
- package/dist/index-g6eb5wdw.js +118 -117
- package/dist/index-ggq3yryx.js +99 -95
- package/dist/index-h70tce00.js +177 -0
- package/dist/index-hkxtfqtc.js +333 -0
- package/dist/index-kf3dhser.js +146 -143
- package/dist/index-ma6tgdb2.js +500 -0
- package/dist/index-mam0bcyz.js +123 -0
- package/dist/index-mm412dkp.js +274 -0
- package/dist/index-n8v18aeb.js +0 -0
- package/dist/index-ndnmnsej.js +378 -371
- package/dist/index-p8wty0e2.js +389 -379
- package/dist/index-qfphr2fd.js +100 -0
- package/dist/index-qqmms8rs.js +51 -43
- package/dist/index-qw4093g2.js +51 -43
- package/dist/index-qzwpzjbx.js +121 -122
- package/dist/index-segbnm0h.js +146 -143
- package/dist/index-t0fj6gg1.js +112 -0
- package/dist/index-thdkwnv7.js +122 -0
- package/dist/index-tjbx2r2t.js +270 -0
- package/dist/index-tjqw9vtj.js +62 -54
- package/dist/index-vbpb89jy.js +248 -0
- package/dist/index-vhs88xhe.js +99 -95
- package/dist/index-w8zxnjka.js +249 -0
- package/dist/index-wk2na3t9.js +404 -0
- package/dist/index-wz9x8g7z.js +383 -373
- package/dist/index-x249gyde.js +388 -378
- package/dist/index-xkvd0nsd.js +187 -0
- package/dist/index-yedqxm1z.js +80 -0
- package/dist/index-zfjzzjkf.js +266 -0
- package/dist/index.d.ts +12 -8
- package/dist/index.js +66 -35
- package/dist/lint.d.ts +1 -46
- package/dist/lint.js +3 -7
- package/dist/loader/cache.d.ts +4 -0
- package/dist/loader/find-config-file.d.ts +2 -0
- package/dist/loader/index.d.ts +5 -0
- package/dist/loader/index.js +24 -0
- package/dist/loader/load-dev-env.d.ts +5 -0
- package/dist/loader/loader.d.ts +1 -0
- package/dist/loader.d.ts +1 -45
- package/dist/loader.js +22 -20
- package/dist/prisma/index.d.ts +1 -0
- package/dist/prisma/prisma.d.ts +29 -0
- package/dist/prisma.d.ts +1 -29
- package/dist/prisma.js +6 -10
- package/dist/src/bin.js +309 -0
- package/dist/src/cli.js +5 -0
- package/dist/src/config.js +15 -0
- package/dist/src/core/docker.js +38 -0
- package/dist/src/core/index.js +130 -0
- package/dist/src/core/network.js +9 -0
- package/dist/src/core/ports.js +23 -0
- package/dist/src/core/process.js +31 -0
- package/dist/src/core/utils.js +11 -0
- package/dist/src/core/watchdog-runner.js +69 -0
- package/dist/src/core/watchdog.js +28 -0
- package/dist/src/docker/runtime.js +37 -0
- package/dist/src/docker-compose/index.js +16 -0
- package/dist/src/docker-compose/services/index.js +17 -0
- package/dist/src/environment.js +12 -0
- package/dist/src/index.js +122 -0
- package/dist/src/lint.js +3 -0
- package/dist/src/loader.js +25 -0
- package/dist/src/prisma.js +6 -0
- package/dist/src/types.js +0 -0
- package/dist/typecheck/index.d.ts +1 -0
- package/dist/typecheck/index.js +7 -0
- package/dist/typecheck/typecheck.d.ts +46 -0
- package/dist/types/all-types.d.ts +501 -0
- package/dist/types/cli.d.ts +1 -0
- package/dist/types/config.d.ts +6 -0
- package/dist/types/docker.d.ts +15 -0
- package/dist/types/environment.d.ts +8 -0
- package/dist/types/hooks.d.ts +9 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +0 -0
- package/dist/types/prisma.d.ts +1 -0
- package/dist/types.d.ts +1 -393
- package/package.json +145 -140
- package/readme.md +358 -105
- package/src/cli/bin.ts +77 -0
- package/src/cli/commands/help.ts +39 -0
- package/src/cli/commands/runtime.ts +72 -0
- package/src/cli/commands/version.ts +4 -0
- package/src/cli/index.ts +1 -0
- package/{cli.ts → src/cli/run-cli.ts} +95 -6
- package/src/config/define-config.ts +30 -0
- package/src/config/index.ts +3 -0
- package/src/config/merge-configs.ts +33 -0
- package/src/config/validate-config.ts +136 -0
- package/{core → src/core}/index.ts +2 -2
- package/{core → src/core}/ports.ts +68 -1
- package/{core → src/core}/process.ts +6 -2
- package/src/core/tunnel.ts +151 -0
- package/{core → src/core}/utils.ts +1 -0
- package/{core → src/core}/watchdog.ts +5 -1
- package/src/docker/index.ts +1 -0
- package/{core/docker.ts → src/docker/runtime.ts} +40 -4
- package/src/docker-compose/generated-file.ts +45 -0
- package/src/docker-compose/index.ts +7 -0
- package/src/docker-compose/model.ts +197 -0
- package/src/docker-compose/services/clickhouse.ts +79 -0
- package/src/docker-compose/services/define-docker-service.ts +109 -0
- package/src/docker-compose/services/index.ts +67 -0
- package/src/docker-compose/services/postgres.ts +60 -0
- package/src/docker-compose/services/redis.ts +48 -0
- package/src/docker-compose/services/shared.ts +79 -0
- package/src/docker-compose/yaml.ts +88 -0
- package/{environment.ts → src/environment/create-dev-environment.ts} +101 -146
- package/src/environment/index.ts +1 -0
- package/src/environment/logging.ts +101 -0
- package/src/environment/seeding.ts +57 -0
- package/{index.ts → src/index.ts} +49 -15
- package/src/loader/cache.ts +23 -0
- package/src/loader/find-config-file.ts +29 -0
- package/src/loader/index.ts +17 -0
- package/src/loader/load-dev-env.ts +38 -0
- package/src/prisma/index.ts +1 -0
- package/{prisma.ts → src/prisma/prisma.ts} +4 -2
- package/src/typecheck/index.ts +1 -0
- package/{types.ts → src/types/all-types.ts} +137 -6
- package/src/types/index.ts +1 -0
- package/bin.ts +0 -191
- package/config.ts +0 -194
- package/loader.ts +0 -126
- /package/{core → src/core}/network.ts +0 -0
- /package/{core → src/core}/watchdog-runner.ts +0 -0
- /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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} from "./index-
|
|
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-
|
|
14
|
+
} from "./index-4xrxh8yv.js";
|
|
14
15
|
import {
|
|
15
16
|
createDevEnvironment
|
|
16
|
-
} from "./index-
|
|
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-
|
|
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-
|
|
72
|
+
} from "./index-mm412dkp.js";
|
|
34
73
|
import {
|
|
35
74
|
assertValidConfig,
|
|
36
75
|
defineDevConfig,
|
|
37
76
|
mergeConfigs,
|
|
38
77
|
validateConfig
|
|
39
|
-
} from "./index-
|
|
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
|
-
|
|
49
|
-
|
|
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
|
-
|
|
3
|
-
|
|
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,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 @@
|
|
|
1
|
+
export * from "./index";
|
package/dist/loader.d.ts
CHANGED
|
@@ -1,45 +1 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
} from "./index-
|
|
8
|
-
import"./index-
|
|
9
|
-
import"./index-
|
|
10
|
-
import"./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
14
|
-
import"./index-
|
|
15
|
-
import"./index-
|
|
16
|
-
import"./index-
|
|
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
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
import"./index-
|
|
5
|
-
import"./index-
|
|
6
|
-
|
|
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 };
|