@camunda8/cli 4.7.0-alpha.24 → 4.7.0-alpha.25
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.
|
@@ -4306,6 +4306,7 @@ import {
|
|
|
4306
4306
|
writeFileSync as writeFileSync2
|
|
4307
4307
|
} from "node:fs";
|
|
4308
4308
|
import { dirname as dirname4, isAbsolute as isAbsolute2, join as join3, relative as relative2, resolve as resolve3, sep as sep2 } from "node:path";
|
|
4309
|
+
var ROCKET_LAUNCH_START_VARIABLES = { missionName: "Apollo", fuelLevel: 80 };
|
|
4309
4310
|
var SETUP_BLUEPRINTS = [
|
|
4310
4311
|
{
|
|
4311
4312
|
id: "rocket-launch",
|
|
@@ -4319,19 +4320,25 @@ var SETUP_BLUEPRINTS = [
|
|
|
4319
4320
|
path: "1-rocket-launch"
|
|
4320
4321
|
},
|
|
4321
4322
|
processFile: "rocket-launch.bpmn",
|
|
4322
|
-
|
|
4323
|
-
// "full send" launch.
|
|
4324
|
-
startVariables: { missionName: "Apollo", fuelLevel: 80 },
|
|
4323
|
+
startVariables: ROCKET_LAUNCH_START_VARIABLES,
|
|
4325
4324
|
// Fully automated: setup already deployed and launched an
|
|
4326
|
-
// instance, so the next step is looking at it. The
|
|
4327
|
-
// the
|
|
4328
|
-
//
|
|
4329
|
-
//
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4325
|
+
// instance, so the next step is looking at it. The deeplink opens
|
|
4326
|
+
// the started instance in Operate directly — no filter clearing.
|
|
4327
|
+
// The CLI lines pin the local profile (the session's active
|
|
4328
|
+
// profile may point elsewhere) but not the tenant: the first-run
|
|
4329
|
+
// audience has no session tenant, so resolution already lands on
|
|
4330
|
+
// <default>. The rerun carries the same start variables setup
|
|
4331
|
+
// used, or the mission decision incidents; the JSON is
|
|
4332
|
+
// single-quoted, which cmd.exe does not strip — cmd users quote
|
|
4333
|
+
// the other way around. The run path is quoted: the working
|
|
4334
|
+
// directory may contain spaces. All lines stay printable ASCII so
|
|
4335
|
+
// the box keeps its borders.
|
|
4336
|
+
nextSteps: ({ projectDir, processInstanceKey }) => [
|
|
4337
|
+
"Process instance is running on the local cluster.",
|
|
4338
|
+
`Watch it: http://localhost:8080/operate/processes/${processInstanceKey}`,
|
|
4339
|
+
" (login using demo / demo as username / password)",
|
|
4340
|
+
`Inspect it: c8ctl get process-instance ${processInstanceKey} --profile local`,
|
|
4341
|
+
`Run again: c8ctl run "${join3(projectDir, "rocket-launch.bpmn")}" --profile local --variables '${JSON.stringify(ROCKET_LAUNCH_START_VARIABLES)}'`
|
|
4335
4342
|
]
|
|
4336
4343
|
},
|
|
4337
4344
|
{
|
|
@@ -4351,15 +4358,33 @@ var SETUP_BLUEPRINTS = [
|
|
|
4351
4358
|
processFile: "bpmn/order-process.bpmn",
|
|
4352
4359
|
// The started instance stalls at its first service task until a
|
|
4353
4360
|
// worker connects — starting one is the whole point of the box.
|
|
4354
|
-
//
|
|
4355
|
-
//
|
|
4356
|
-
//
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4361
|
+
// One block per shipped worker language. Node.js and Python cd
|
|
4362
|
+
// into the worker directory: a bare `npm install --prefix <dir>`
|
|
4363
|
+
// is misread by npm on Windows as a global install of the
|
|
4364
|
+
// caller's directory, and the Python worker needs a virtualenv —
|
|
4365
|
+
// pip into an externally managed system Python fails (PEP 668).
|
|
4366
|
+
// Java and C# can address the project directly: -f and --project
|
|
4367
|
+
// share neither defect. Paths are quoted (the working directory
|
|
4368
|
+
// may contain spaces), every command gets its own line (&& is a
|
|
4369
|
+
// syntax error in Windows PowerShell 5.1), and all lines stay
|
|
4370
|
+
// printable ASCII so the box keeps its borders.
|
|
4371
|
+
nextSteps: ({ projectDir, processInstanceKey }) => [
|
|
4372
|
+
"Process instance is running on the local cluster.",
|
|
4373
|
+
"It waits at the first service task until a worker connects.",
|
|
4374
|
+
`Open it: http://localhost:8080/operate/processes/${processInstanceKey}`,
|
|
4375
|
+
" (login using demo / demo as username / password)",
|
|
4376
|
+
"",
|
|
4377
|
+
"Start a worker in your language:",
|
|
4378
|
+
` Node.js: cd "${join3(projectDir, "nodejs")}"`,
|
|
4379
|
+
" npm install",
|
|
4380
|
+
" npm start",
|
|
4381
|
+
` Python: cd "${join3(projectDir, "python")}"`,
|
|
4382
|
+
" python -m venv .venv",
|
|
4383
|
+
" source .venv/bin/activate # Windows: .venv\\Scripts\\activate",
|
|
4384
|
+
" pip install -r requirements.txt",
|
|
4385
|
+
" python main.py",
|
|
4386
|
+
` Java: mvn -f "${join3(projectDir, "java")}" spring-boot:run`,
|
|
4387
|
+
` C#: dotnet run --project "${join3(projectDir, "csharp")}"`
|
|
4363
4388
|
]
|
|
4364
4389
|
}
|
|
4365
4390
|
];
|
|
@@ -5734,7 +5759,7 @@ async function runBlueprintDeploy(ctx, run) {
|
|
|
5734
5759
|
}
|
|
5735
5760
|
});
|
|
5736
5761
|
logger.info(`Process instance created: ${created.processInstanceKey}`);
|
|
5737
|
-
run.
|
|
5762
|
+
run.processInstanceKey = created.processInstanceKey;
|
|
5738
5763
|
}
|
|
5739
5764
|
function stageLocalProfile(deployDataDir) {
|
|
5740
5765
|
const profilesPath = join5(c8ctl2.getUserDataDir(), "profiles.json");
|
|
@@ -6346,8 +6371,13 @@ async function runSetup(ctx, flags) {
|
|
|
6346
6371
|
const blueprint = setupBlueprintById(
|
|
6347
6372
|
run.blueprintId ?? SETUP_BLUEPRINTS[0].id
|
|
6348
6373
|
);
|
|
6349
|
-
if (run.
|
|
6350
|
-
nextSteps.push(
|
|
6374
|
+
if (run.processInstanceKey !== void 0) {
|
|
6375
|
+
nextSteps.push(
|
|
6376
|
+
...blueprint.nextSteps({
|
|
6377
|
+
projectDir: run.blueprintDir,
|
|
6378
|
+
processInstanceKey: run.processInstanceKey
|
|
6379
|
+
})
|
|
6380
|
+
);
|
|
6351
6381
|
}
|
|
6352
6382
|
nextSteps.push(`Project: ${run.blueprintDir}`);
|
|
6353
6383
|
nextSteps.push(`Guide: ${blueprint.guideUrl}`);
|