@solid-stack/builder 1.1.4 → 1.1.5
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 +12 -0
- package/dist/bin.js +30 -5
- package/dist/bin.js.map +1 -1
- package/dist/commands/service/commands/up/command.d.ts.map +1 -1
- package/dist/commands/service/commands/up/handler.d.ts.map +1 -1
- package/dist/core/RunOptions.d.ts +1 -0
- package/dist/core/RunOptions.d.ts.map +1 -1
- package/dist/core/compileEnvironment.d.ts +4 -2
- package/dist/core/compileEnvironment.d.ts.map +1 -1
- package/dist/core/runners/runDev.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +30 -5
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -46,6 +46,16 @@ builder service up dev
|
|
|
46
46
|
- Merges `docker-compose.base.yml`, `docker-compose.dev.yml`, `.env.dev`, and any overrides defined in `build.json`
|
|
47
47
|
- Mounts source code with hot-reloading enabled
|
|
48
48
|
|
|
49
|
+
#### Full Development Mode (`builder service up dev --full`)
|
|
50
|
+
|
|
51
|
+
Spins up the development environment with hot-reloading while connecting to all declared mock dependencies and setting `INFRA_MODE=integrated`:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
builder service up dev --full
|
|
55
|
+
# Or alias:
|
|
56
|
+
builder service up dev --integrated
|
|
57
|
+
```
|
|
58
|
+
|
|
49
59
|
### 2. Production Mode (`builder service up prod`)
|
|
50
60
|
|
|
51
61
|
Spins up the production runtime with integrated local mocks:
|
|
@@ -97,6 +107,8 @@ builder service up test-e2e
|
|
|
97
107
|
| `-C, --project-dir <path>` | Specify target service directory (defaults to current working directory) |
|
|
98
108
|
| `--unit` | For `test`, run only unit test stage |
|
|
99
109
|
| `--e2e` | For `test`, run only e2e test stage |
|
|
110
|
+
| `--full` | For `dev`, spin up with mock dependencies and `INFRA_MODE=integrated` |
|
|
111
|
+
| `--integrated` | Alias for `--full` |
|
|
100
112
|
|
|
101
113
|
---
|
|
102
114
|
|
package/dist/bin.js
CHANGED
|
@@ -2613,6 +2613,12 @@ var compileEnvironment = (environment, projectDir = process.cwd(), options = {})
|
|
|
2613
2613
|
composeFlags.push("-f", overrides.dev.path);
|
|
2614
2614
|
filesUsed.push(overrides.dev.path);
|
|
2615
2615
|
}
|
|
2616
|
+
if (options.full && dependencies.length > 0) {
|
|
2617
|
+
for (const dep of dependencies) {
|
|
2618
|
+
composeFlags.push("-f", dep.path);
|
|
2619
|
+
filesUsed.push(dep.path);
|
|
2620
|
+
}
|
|
2621
|
+
}
|
|
2616
2622
|
composeFlags.push("-f", standalonePath);
|
|
2617
2623
|
filesUsed.push(standalonePath);
|
|
2618
2624
|
break;
|
|
@@ -2704,7 +2710,7 @@ ${explanation}`);
|
|
|
2704
2710
|
}
|
|
2705
2711
|
const mergedYamlConfig = result.stdout;
|
|
2706
2712
|
const yml = parse(mergedYamlConfig);
|
|
2707
|
-
if (environment === "prod" || environment === "e2e") {
|
|
2713
|
+
if (environment === "prod" || environment === "e2e" || environment === "dev" && options.full) {
|
|
2708
2714
|
renameServicesWithDependencies(yml, dependencies);
|
|
2709
2715
|
addDependenciesToAppService(yml, dependencies);
|
|
2710
2716
|
}
|
|
@@ -2814,6 +2820,10 @@ ${explanation}`);
|
|
|
2814
2820
|
}
|
|
2815
2821
|
}
|
|
2816
2822
|
}
|
|
2823
|
+
if (environment === "dev" && options.full && yml.services?.app) {
|
|
2824
|
+
normalizeEnvironment(yml.services.app);
|
|
2825
|
+
yml.services.app.environment.INFRA_MODE = "integrated";
|
|
2826
|
+
}
|
|
2817
2827
|
attachName(yml, projectName);
|
|
2818
2828
|
const finalYamlConfig = stringify(yml);
|
|
2819
2829
|
return finalYamlConfig;
|
|
@@ -3384,9 +3394,14 @@ Examples:
|
|
|
3384
3394
|
);
|
|
3385
3395
|
};
|
|
3386
3396
|
var runDev = async (options) => {
|
|
3387
|
-
console.log(
|
|
3397
|
+
console.log(
|
|
3398
|
+
pc22.cyan(
|
|
3399
|
+
options.full ? `\u{1F680} Starting DEV environment (full / integrated)...` : `\u{1F680} Starting DEV environment...`
|
|
3400
|
+
)
|
|
3401
|
+
);
|
|
3388
3402
|
const finalYamlConfig = compileEnvironment("dev", options.projectDir, {
|
|
3389
|
-
silenceWarnings: options.silenceWarnings
|
|
3403
|
+
silenceWarnings: options.silenceWarnings,
|
|
3404
|
+
full: options.full
|
|
3390
3405
|
});
|
|
3391
3406
|
const parsed = parse(finalYamlConfig);
|
|
3392
3407
|
const projectName = parsed?.name || "dev";
|
|
@@ -3474,12 +3489,14 @@ var runProd = async (options) => {
|
|
|
3474
3489
|
async function handleServiceUp(rawStage, options = {}) {
|
|
3475
3490
|
const projectDir = resolveProjectDir(options.projectDir);
|
|
3476
3491
|
const stage = (rawStage || "dev").toLowerCase();
|
|
3492
|
+
const isFull = Boolean(options.full || options.integrated);
|
|
3477
3493
|
const runOptions = {
|
|
3478
3494
|
projectDir,
|
|
3479
3495
|
debug: Boolean(options.debug),
|
|
3480
3496
|
detach: Boolean(options.detach),
|
|
3481
3497
|
dryRun: Boolean(options.dryRun),
|
|
3482
|
-
silenceWarnings: Boolean(options.silenceWarnings)
|
|
3498
|
+
silenceWarnings: Boolean(options.silenceWarnings),
|
|
3499
|
+
full: isFull
|
|
3483
3500
|
};
|
|
3484
3501
|
if (stage === "dev") {
|
|
3485
3502
|
return await runDev(runOptions);
|
|
@@ -3514,6 +3531,12 @@ var registerUpCommand = (cmd) => {
|
|
|
3514
3531
|
).option(
|
|
3515
3532
|
"--silence-warnings",
|
|
3516
3533
|
"Silence non-critical warnings like URL templating hints"
|
|
3534
|
+
).option(
|
|
3535
|
+
"--full",
|
|
3536
|
+
"Run dev environment with mock dependencies and integrated infra mode"
|
|
3537
|
+
).option(
|
|
3538
|
+
"--integrated",
|
|
3539
|
+
"Alias for --full"
|
|
3517
3540
|
).option(
|
|
3518
3541
|
"-C, --project-dir <dir>",
|
|
3519
3542
|
"Service project directory (defaults to cwd)"
|
|
@@ -3522,6 +3545,7 @@ var registerUpCommand = (cmd) => {
|
|
|
3522
3545
|
`
|
|
3523
3546
|
Examples:
|
|
3524
3547
|
$ builder service up dev
|
|
3548
|
+
$ builder service up dev --full
|
|
3525
3549
|
$ builder service up prod
|
|
3526
3550
|
$ builder service up test
|
|
3527
3551
|
$ builder service up test-unit
|
|
@@ -3534,7 +3558,8 @@ Examples:
|
|
|
3534
3558
|
detach: options.detach,
|
|
3535
3559
|
dryRun: options.dryRun,
|
|
3536
3560
|
skipChecks: options.skipChecks,
|
|
3537
|
-
silenceWarnings: options.silenceWarnings
|
|
3561
|
+
silenceWarnings: options.silenceWarnings,
|
|
3562
|
+
full: Boolean(options.full || options.integrated)
|
|
3538
3563
|
});
|
|
3539
3564
|
if (exitCode !== 0) {
|
|
3540
3565
|
process.exit(exitCode);
|