@prisma/composer 0.5.0 → 0.6.0-dev.2
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/{app-config-bsTo57A8-BfG21wAI.d.mts → app-config-Cbv_lA38-BHJsd1DF.d.mts} +5 -3
- package/dist/app-config-Cbv_lA38-BHJsd1DF.d.mts.map +1 -0
- package/dist/bin.mjs +11 -10
- package/dist/bin.mjs.map +1 -1
- package/dist/config-whuqZ5xT.d.mts +1 -0
- package/dist/config.d.mts +2 -2
- package/dist/deploy-whuqZ5xT.d.mts +1 -0
- package/dist/deploy.d.mts +2 -2
- package/dist/local-target.d.mts +1 -1
- package/dist/nextjs-control.d.mts +3 -3
- package/dist/node-control.d.mts +3 -3
- package/dist/report.d.mts +2 -2
- package/package.json +11 -10
- package/dist/app-config-bsTo57A8-BfG21wAI.d.mts.map +0 -1
- package/dist/config-DUzvB5cQ.d.mts +0 -1
- package/dist/deploy-DUzvB5cQ.d.mts +0 -1
|
@@ -5,7 +5,7 @@ import { Input, StackServices } from "alchemy";
|
|
|
5
5
|
import * as Effect from "effect/Effect";
|
|
6
6
|
import * as Layer from "effect/Layer";
|
|
7
7
|
import { State } from "alchemy/State/State";
|
|
8
|
-
//#region ../../0-framework/1-core/core/dist/app-config-
|
|
8
|
+
//#region ../../0-framework/1-core/core/dist/app-config-Cbv_lA38.d.mts
|
|
9
9
|
//#region src/container-transport.d.ts
|
|
10
10
|
/**
|
|
11
11
|
* Carries resolved containers from the CLI process into the alchemy process
|
|
@@ -21,7 +21,7 @@ import { State } from "alchemy/State/State";
|
|
|
21
21
|
interface LocateContainerInput {
|
|
22
22
|
/** The application name (root node's name, or `--name`). */
|
|
23
23
|
readonly appName: string;
|
|
24
|
-
/** The
|
|
24
|
+
/** The USER-FACING stage name — `--stage <name>` as the user typed it (git-ref validated), or `undefined` for the default (production) stage. Alchemy's stage is the container's `alchemyStage` when supplied, with this value as the explicit-user-stage fallback; when neither exists, the CLI fails before Alchemy runs. */
|
|
25
25
|
readonly stage: string | undefined;
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
@@ -31,6 +31,8 @@ interface LocateContainerInput {
|
|
|
31
31
|
*/
|
|
32
32
|
interface ContainerInstance {
|
|
33
33
|
readonly input: LocateContainerInput;
|
|
34
|
+
/** The exact string the CLI hands `alchemy` as its stage — the deploy-state scope. Distinct from `input.stage`, the user-facing name: for Prisma Cloud this is the resolved Branch id (stable across renames, machine-independent). Framework-visible like `input` — NOT part of the `serialize()` payload, which stays extension-owned. */
|
|
35
|
+
readonly alchemyStage?: string | undefined;
|
|
34
36
|
/** Serialize to a non-empty string for the process transport above. The format is the extension's own; only its `deserialize` reads it. */
|
|
35
37
|
serialize(): string;
|
|
36
38
|
}
|
|
@@ -492,4 +494,4 @@ interface PrismaAppConfig {
|
|
|
492
494
|
declare function defineConfig(config: PrismaAppConfig): PrismaAppConfig;
|
|
493
495
|
//#endregion
|
|
494
496
|
export { ProvisionerDescriptor as A, joinDeployment as B, Lowering as C, PreflightInput as D, PackageInput as E, containerEnv as F, lowering as H, containerEnvVarName as I, defineConfig as L, StateDescriptor as M, TeardownInput as N, PrismaAppConfig as O, buildConfig as P, deserializeContainers as R, LoweredResult as S, Outputs as T, mergedProviders as U, lower as V, resolveStateLayer as W, LocalTargetProvidersInput as _, Bundle as a, LowerError as b, DEV_DIR as c, DeploymentResult as d, ExtensionDescriptor as f, LocalTargetEmulatorsInput as g, LocalTargetDescriptor as h, AssembleInput as i, ServiceLowering as j, ProvisionEdge as k, DeployedEntity as l, LocalTargetAttachment as m, ApplicationDescriptor as n, ContainerDescriptor as o, LocalTargetAttachInput as p, Artifact as r, ContainerInstance as s, AlchemyStateLayer as t, DeployedNode as u, LocateContainerInput as v, NodeDescriptor as w, LowerOptions as x, LowerContext as y, isBuildOnlyExtension as z };
|
|
495
|
-
//# sourceMappingURL=app-config-
|
|
497
|
+
//# sourceMappingURL=app-config-Cbv_lA38-BHJsd1DF.d.mts.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AE1C,WAAW;;EAEpB,WAAW,OAAO,iBAAiB;;EAEnC,WAAW,OAAO,4BAA4B;;EAE9C,OAAO,OAAO,yBAAyB,QAAQ;;EAE/C,UAAU,OAAO,gBAAgB;;UAEzB;;WAEC,WAAW;;WAEX;;UAED;;WAEC,OAAO;WACP,WAAW;;WAEX;;UAED;WACC,WAAW;WACX;;UAED;;EAER,iBAAiB;;EAEjB,aAAa;aACF;aACA;;;EAGX,KAAK,QAAQ,aAAa;aACf;MACP;aACO;aACA;;;EAGX,gBAAgB;;;cAGJ;;;;;;;;;iBASG,qBAAqB,WAAW;;;;;;KAM5C;WACM;IACP;WACO;IACP;WACO;EACT,SAAS,OAAO,gBAAgB,QAAQ;;;;;;;UAOhC;WACC,YAAY;WACZ,OAAO;;;iBAGD,aAAa,QAAQ,kBAAkB"}
|
package/dist/bin.mjs
CHANGED
|
@@ -2244,7 +2244,7 @@ var esm_default = {
|
|
|
2244
2244
|
FSWatcher
|
|
2245
2245
|
};
|
|
2246
2246
|
//#endregion
|
|
2247
|
-
//#region ../../0-framework/3-tooling/cli/dist/cli-
|
|
2247
|
+
//#region ../../0-framework/3-tooling/cli/dist/cli-DBLZkgTv.mjs
|
|
2248
2248
|
/**
|
|
2249
2249
|
* A user-facing failure with a message that already names the fix (deploy-cli.md
|
|
2250
2250
|
* § Error surface). `bin.ts` catches this — and any other Error, including
|
|
@@ -2493,16 +2493,15 @@ function resolveAlchemyBin(startDir) {
|
|
|
2493
2493
|
dir = parent;
|
|
2494
2494
|
}
|
|
2495
2495
|
}
|
|
2496
|
-
/** Runs `alchemy deploy|destroy <stack file> --yes
|
|
2496
|
+
/** Runs `alchemy deploy|destroy <stack file> --yes --stage <stage>`, inheriting stdio + env, plus every extension's resolved container. */
|
|
2497
2497
|
function runAlchemy(input) {
|
|
2498
|
-
const
|
|
2499
|
-
const args = [
|
|
2498
|
+
const result = spawnSync(resolveAlchemyBin(input.cwd), [
|
|
2500
2499
|
input.command,
|
|
2501
2500
|
input.stackFileRelativePath,
|
|
2502
|
-
"--yes"
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2501
|
+
"--yes",
|
|
2502
|
+
"--stage",
|
|
2503
|
+
input.stage
|
|
2504
|
+
], {
|
|
2506
2505
|
cwd: input.cwd,
|
|
2507
2506
|
stdio: "inherit",
|
|
2508
2507
|
env: {
|
|
@@ -3195,6 +3194,8 @@ async function run(argv, deps = {}) {
|
|
|
3195
3194
|
throw error instanceof CliError ? error : new CliError(error instanceof Error ? error.message : String(error));
|
|
3196
3195
|
}
|
|
3197
3196
|
}
|
|
3197
|
+
const alchemyStage = containers.get(config.state.extension)?.alchemyStage ?? stage;
|
|
3198
|
+
if (alchemyStage === void 0) throw new CliError("The configured deploy target supplied no deploy scope (its container defines no alchemyStage), so Alchemy has no stage to run under. " + (args.command === "deploy" ? "Pass --stage <name> to choose the deploy scope explicitly." : "destroy --production needs a target whose container supplies the production deploy scope."));
|
|
3198
3199
|
if (args.command === "deploy") for (const extension of config.extensions) {
|
|
3199
3200
|
if (extension.preflight === void 0) continue;
|
|
3200
3201
|
try {
|
|
@@ -3219,12 +3220,12 @@ async function run(argv, deps = {}) {
|
|
|
3219
3220
|
command: args.command,
|
|
3220
3221
|
stackFileRelativePath: GENERATED_STACK_RELATIVE_PATH,
|
|
3221
3222
|
cwd,
|
|
3222
|
-
stage,
|
|
3223
|
+
stage: alchemyStage,
|
|
3223
3224
|
containerEnv: containerEnv(containers)
|
|
3224
3225
|
});
|
|
3225
3226
|
if (status !== 0) {
|
|
3226
3227
|
console.error(`\nGenerated stack file: ${stackPath}`);
|
|
3227
|
-
console.error(`Run \`alchemy ${args.command} ${GENERATED_STACK_RELATIVE_PATH} --yes\` from ${cwd} to reproduce this directly.`);
|
|
3228
|
+
console.error(`Run \`alchemy ${args.command} ${GENERATED_STACK_RELATIVE_PATH} --yes --stage ${alchemyStage}\` from ${cwd} to reproduce this directly.`);
|
|
3228
3229
|
return status;
|
|
3229
3230
|
}
|
|
3230
3231
|
if (args.command === "destroy") {
|