@mesh-tech/mesh-cli 0.20.1 → 0.20.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/README.md +6 -5
- package/dist/bin/mesh.js +87 -38
- package/dist/bin/mesh.js.map +3 -3
- package/dist/build-info.json +2 -2
- package/dist/src/commands/create-app.d.ts +14 -0
- package/dist/src/commands/create-app.d.ts.map +1 -1
- package/dist/src/commands/create-app.js +25 -2
- package/dist/src/commands/create-app.js.map +1 -1
- package/dist/src/commands/init/wizard.d.ts +21 -4
- package/dist/src/commands/init/wizard.d.ts.map +1 -1
- package/dist/src/commands/init/wizard.js +51 -10
- package/dist/src/commands/init/wizard.js.map +1 -1
- package/package.json +1 -1
- package/skills/core/SKILL.md +1 -1
package/README.md
CHANGED
|
@@ -78,11 +78,12 @@ runs it for you.
|
|
|
78
78
|
mesh init
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
-
Run it in your `<tenant>-mesh-apps` clone
|
|
82
|
-
asks which tenant this repo belongs to
|
|
83
|
-
(`mesh start` / `mesh dev`) or *a deployed Mesh
|
|
84
|
-
registry access (signing you in if step 2 was
|
|
85
|
-
layout, installs the agent skills, and prints a
|
|
81
|
+
Run it in your `<tenant>-mesh-apps` clone, or in a brand-new empty folder — the
|
|
82
|
+
wizard runs `git init` there for you. It asks which tenant this repo belongs to
|
|
83
|
+
and where it runs — *local only* (`mesh start` / `mesh dev`) or *a deployed Mesh
|
|
84
|
+
platform* — then checks your registry access (signing you in if step 2 was
|
|
85
|
+
skipped), bootstraps the repo layout, installs the agent skills, and prints a
|
|
86
|
+
summary with the next command.
|
|
86
87
|
Every answer has a flag, so a headless run is one line:
|
|
87
88
|
|
|
88
89
|
```bash
|
package/dist/bin/mesh.js
CHANGED
|
@@ -12272,6 +12272,7 @@ __export(create_app_exports, {
|
|
|
12272
12272
|
PLATFORM_MONOREPO_NAME: () => PLATFORM_MONOREPO_NAME,
|
|
12273
12273
|
bootstrapAppsRepo: () => bootstrapAppsRepo,
|
|
12274
12274
|
copyTemplate: () => copyTemplate,
|
|
12275
|
+
describeNoAppsHome: () => describeNoAppsHome,
|
|
12275
12276
|
ensureRegistryAccess: () => ensureRegistryAccess,
|
|
12276
12277
|
ensureWorkspaceGlobs: () => ensureWorkspaceGlobs,
|
|
12277
12278
|
generateComposableApp: () => generateComposableApp,
|
|
@@ -12461,6 +12462,18 @@ function parsePrimitives(input2) {
|
|
|
12461
12462
|
}
|
|
12462
12463
|
return selected;
|
|
12463
12464
|
}
|
|
12465
|
+
function describeNoAppsHome(cwd, tenant, baseDir, test) {
|
|
12466
|
+
if (test || isInsidePlatformMonorepo(cwd)) {
|
|
12467
|
+
return {
|
|
12468
|
+
message: `Tenant directory not found: ${baseDir}/${tenant}/`,
|
|
12469
|
+
hint: "Create the tenant directory first, or run from within it."
|
|
12470
|
+
};
|
|
12471
|
+
}
|
|
12472
|
+
return {
|
|
12473
|
+
message: `This directory is not a Mesh apps repo \u2014 no apps/ here${fs23.existsSync(path25.join(cwd, ".git")) ? "" : " and it is not a git repo"}.`,
|
|
12474
|
+
hint: `Run: mesh init (turns this folder into your ${tenant}-mesh-apps repo), or cd into that repo and re-run mesh create-app.`
|
|
12475
|
+
};
|
|
12476
|
+
}
|
|
12464
12477
|
function resolveAppDir(cwd, tenant, name, test) {
|
|
12465
12478
|
const baseDir = test ? "tests/tenants" : "tenants";
|
|
12466
12479
|
const possiblePaths = test ? [path25.join(cwd, baseDir, tenant, "apps")] : [
|
|
@@ -12472,8 +12485,9 @@ function resolveAppDir(cwd, tenant, name, test) {
|
|
|
12472
12485
|
if (!appsDir) {
|
|
12473
12486
|
appsDir = path25.join(cwd, baseDir, tenant, "apps");
|
|
12474
12487
|
if (!fs23.existsSync(path25.join(cwd, baseDir, tenant))) {
|
|
12475
|
-
|
|
12476
|
-
|
|
12488
|
+
const { message, hint } = describeNoAppsHome(cwd, tenant, baseDir, test);
|
|
12489
|
+
logError(message);
|
|
12490
|
+
logInfo(hint);
|
|
12477
12491
|
process.exit(1);
|
|
12478
12492
|
}
|
|
12479
12493
|
if (!fs23.existsSync(appsDir)) {
|
|
@@ -16887,6 +16901,7 @@ var init_registry = __esm({
|
|
|
16887
16901
|
// libs/mesh-cli/src/commands/init/wizard.ts
|
|
16888
16902
|
var wizard_exports = {};
|
|
16889
16903
|
__export(wizard_exports, {
|
|
16904
|
+
INIT_REPO_FIX: () => INIT_REPO_FIX,
|
|
16890
16905
|
INTERRUPTED_EXIT_CODE: () => INTERRUPTED_EXIT_CODE,
|
|
16891
16906
|
NO_SESSION_NO_TTY_MESSAGE: () => NO_SESSION_NO_TTY_MESSAGE,
|
|
16892
16907
|
TENANT_REQUIRED_MESSAGE: () => TENANT_REQUIRED_MESSAGE,
|
|
@@ -16895,6 +16910,7 @@ __export(wizard_exports, {
|
|
|
16895
16910
|
describeMode: () => describeMode,
|
|
16896
16911
|
registryStep: () => registryStep,
|
|
16897
16912
|
renderWizardSummary: () => renderWizardSummary,
|
|
16913
|
+
repoStep: () => repoStep,
|
|
16898
16914
|
resolveAnswers: () => resolveAnswers,
|
|
16899
16915
|
runInitWizard: () => runInitWizard,
|
|
16900
16916
|
runWizardSteps: () => runWizardSteps,
|
|
@@ -16904,12 +16920,15 @@ __export(wizard_exports, {
|
|
|
16904
16920
|
});
|
|
16905
16921
|
import * as fs30 from "fs";
|
|
16906
16922
|
import * as path37 from "path";
|
|
16923
|
+
import { execFileSync as execFileSync25 } from "child_process";
|
|
16907
16924
|
import chalk4 from "chalk";
|
|
16908
16925
|
function wizardExitCode(steps) {
|
|
16909
16926
|
return steps.some((s) => s.status === "fail") ? 1 : 0;
|
|
16910
16927
|
}
|
|
16911
|
-
function wizardNextCommands(mode) {
|
|
16912
|
-
|
|
16928
|
+
function wizardNextCommands(mode, steps = []) {
|
|
16929
|
+
const repo = steps.find((s) => s.name === STEP_LABELS.repo);
|
|
16930
|
+
const first = repo && repo.status !== "pass" && repo.fix ? repo.fix : "mesh create-app";
|
|
16931
|
+
return mode === "local" ? [first] : [first, "mesh deploy up # from the app directory, once it exists"];
|
|
16913
16932
|
}
|
|
16914
16933
|
function stepBlocks(result) {
|
|
16915
16934
|
return result.status === "fail" && result.blocking !== false;
|
|
@@ -16958,12 +16977,18 @@ function classifyRepo(cwd) {
|
|
|
16958
16977
|
if (shouldBootstrapAppsRepo(cwd)) return { kind: "empty-apps-repo", root: cwd };
|
|
16959
16978
|
const root = resolveTargetRoot(cwd);
|
|
16960
16979
|
const inRepo = fs30.existsSync(path37.join(root, ".git"));
|
|
16961
|
-
if (!inRepo)
|
|
16980
|
+
if (!inRepo) {
|
|
16981
|
+
const hasContent = fs30.readdirSync(cwd).some((entry) => !entry.startsWith("."));
|
|
16982
|
+
return { kind: hasContent ? "no-repo" : "empty-dir", root: cwd };
|
|
16983
|
+
}
|
|
16962
16984
|
const hasWorkspace = fs30.existsSync(path37.join(root, "pnpm-workspace.yaml")) || fs30.existsSync(path37.join(root, "pnpm-lock.yaml"));
|
|
16963
16985
|
const hasApps = fs30.existsSync(path37.join(root, "apps")) || fs30.existsSync(path37.join(root, "tenants"));
|
|
16964
16986
|
if (hasWorkspace || hasApps) return { kind: "apps-repo", root };
|
|
16965
16987
|
return { kind: "other-repo", root };
|
|
16966
16988
|
}
|
|
16989
|
+
function gitInit(dir) {
|
|
16990
|
+
execFileSync25("git", ["init", "-q"], { cwd: dir, stdio: ["ignore", "ignore", "pipe"] });
|
|
16991
|
+
}
|
|
16967
16992
|
async function runWizardSteps(ctx, steps) {
|
|
16968
16993
|
const results = [];
|
|
16969
16994
|
for (const step of steps) {
|
|
@@ -17055,7 +17080,7 @@ async function runInitWizard(opts, deps = {}) {
|
|
|
17055
17080
|
const written = writeMeshJson(root, { tenant, platform: mode === "local" ? "local" : mode.platform });
|
|
17056
17081
|
logInfo(`Recorded tenant + mode in ${written}`);
|
|
17057
17082
|
}
|
|
17058
|
-
const outcome = { tenant, mode, steps, next: wizardNextCommands(mode) };
|
|
17083
|
+
const outcome = { tenant, mode, steps, next: wizardNextCommands(mode, steps) };
|
|
17059
17084
|
const code = wizardExitCode(steps);
|
|
17060
17085
|
if (opts.json) {
|
|
17061
17086
|
console.log = origLog;
|
|
@@ -17077,7 +17102,7 @@ async function runInitWizard(opts, deps = {}) {
|
|
|
17077
17102
|
console.log = origLog;
|
|
17078
17103
|
}
|
|
17079
17104
|
}
|
|
17080
|
-
var NO_SESSION_NO_TTY_MESSAGE, TENANT_REQUIRED_MESSAGE, INTERRUPTED_EXIT_CODE, STEP_LABELS, registryStep, platformStep, repoStep, skillsStep, WIZARD_STEPS;
|
|
17105
|
+
var NO_SESSION_NO_TTY_MESSAGE, TENANT_REQUIRED_MESSAGE, INTERRUPTED_EXIT_CODE, STEP_LABELS, registryStep, platformStep, INIT_REPO_FIX, repoStep, skillsStep, WIZARD_STEPS;
|
|
17081
17106
|
var init_wizard = __esm({
|
|
17082
17107
|
"libs/mesh-cli/src/commands/init/wizard.ts"() {
|
|
17083
17108
|
"use strict";
|
|
@@ -17181,6 +17206,7 @@ var init_wizard = __esm({
|
|
|
17181
17206
|
};
|
|
17182
17207
|
}
|
|
17183
17208
|
};
|
|
17209
|
+
INIT_REPO_FIX = "git init && mesh init";
|
|
17184
17210
|
repoStep = {
|
|
17185
17211
|
name: "repo",
|
|
17186
17212
|
async run(ctx) {
|
|
@@ -17190,11 +17216,34 @@ var init_wizard = __esm({
|
|
|
17190
17216
|
switch (kind) {
|
|
17191
17217
|
case "platform-monorepo":
|
|
17192
17218
|
return { name, status: "skip", detail: "inside mesh-platform \u2014 apps here link workspace packages; nothing to set up" };
|
|
17219
|
+
case "empty-dir": {
|
|
17220
|
+
const go = ctx.yes || !ctx.interactive ? true : await ctx.prompts.confirm({
|
|
17221
|
+
message: `This folder is not a git repo \u2014 initialize ${root} as your ${ctx.tenant}-mesh-apps repo here?`,
|
|
17222
|
+
default: true
|
|
17223
|
+
});
|
|
17224
|
+
if (!go) {
|
|
17225
|
+
return { name, status: "skip", detail: "folder left as is", fix: `cd <your ${ctx.tenant}-mesh-apps clone> && mesh init` };
|
|
17226
|
+
}
|
|
17227
|
+
try {
|
|
17228
|
+
(ctx.seams?.gitInit ?? gitInit)(root);
|
|
17229
|
+
} catch (err) {
|
|
17230
|
+
const why = err instanceof Error && "stderr" in err && err.stderr ? String(err.stderr).trim() : "";
|
|
17231
|
+
return {
|
|
17232
|
+
name,
|
|
17233
|
+
status: "fail",
|
|
17234
|
+
detail: `git init failed \u2014 is git installed and ${root} writable?${why ? ` (${why})` : ""}`,
|
|
17235
|
+
fix: INIT_REPO_FIX
|
|
17236
|
+
};
|
|
17237
|
+
}
|
|
17238
|
+
const created = bootstrapAppsRepo(root, ctx.tenant);
|
|
17239
|
+
return { name, status: "pass", detail: `initialized a git repo and bootstrapped the apps repo: ${created.join(", ")}` };
|
|
17240
|
+
}
|
|
17193
17241
|
case "no-repo":
|
|
17194
17242
|
return {
|
|
17195
17243
|
name,
|
|
17196
17244
|
status: "skip",
|
|
17197
|
-
detail: `not in a git repo \u2014 clone (or git init) your ${ctx.tenant}-mesh-apps repo and re-run mesh init there
|
|
17245
|
+
detail: `not in a git repo, and this folder already holds files \u2014 clone (or git init) your ${ctx.tenant}-mesh-apps repo and re-run mesh init there`,
|
|
17246
|
+
fix: INIT_REPO_FIX
|
|
17198
17247
|
};
|
|
17199
17248
|
case "other-repo":
|
|
17200
17249
|
return {
|
|
@@ -17533,7 +17582,7 @@ var init_init = __esm({
|
|
|
17533
17582
|
});
|
|
17534
17583
|
|
|
17535
17584
|
// libs/mesh-cli/src/commands/install-shim.ts
|
|
17536
|
-
import { execFileSync as
|
|
17585
|
+
import { execFileSync as execFileSync26 } from "child_process";
|
|
17537
17586
|
import * as fs32 from "fs";
|
|
17538
17587
|
import * as os10 from "os";
|
|
17539
17588
|
import * as path39 from "path";
|
|
@@ -17646,7 +17695,7 @@ function registerInstallShimCommand(program2) {
|
|
|
17646
17695
|
let status = 0;
|
|
17647
17696
|
let ok = true;
|
|
17648
17697
|
try {
|
|
17649
|
-
stdout =
|
|
17698
|
+
stdout = execFileSync26(target, ["--help"], {
|
|
17650
17699
|
cwd: process.cwd(),
|
|
17651
17700
|
encoding: "utf8",
|
|
17652
17701
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -17693,7 +17742,7 @@ var init_install_shim = __esm({
|
|
|
17693
17742
|
});
|
|
17694
17743
|
|
|
17695
17744
|
// libs/mesh-cli/src/commands/local/hub-local.ts
|
|
17696
|
-
import { execFile as execFile3, execFileSync as
|
|
17745
|
+
import { execFile as execFile3, execFileSync as execFileSync27 } from "child_process";
|
|
17697
17746
|
import * as fs33 from "fs";
|
|
17698
17747
|
import * as os11 from "os";
|
|
17699
17748
|
import * as path40 from "path";
|
|
@@ -17713,7 +17762,7 @@ function npmrcPath() {
|
|
|
17713
17762
|
}
|
|
17714
17763
|
function imageExists(tag) {
|
|
17715
17764
|
try {
|
|
17716
|
-
|
|
17765
|
+
execFileSync27("docker", ["image", "inspect", tag], { stdio: ["ignore", "pipe", "pipe"] });
|
|
17717
17766
|
return true;
|
|
17718
17767
|
} catch {
|
|
17719
17768
|
return false;
|
|
@@ -17723,7 +17772,7 @@ function ensureHubAuthImage() {
|
|
|
17723
17772
|
if (imageExists(HUB_AUTH_IMAGE)) return;
|
|
17724
17773
|
logInfo(`Building ${HUB_AUTH_IMAGE} (Hub auth proxy)\u2026`);
|
|
17725
17774
|
const hubStackDir = path40.join(findPackageRoot(), "stack", "hub");
|
|
17726
|
-
|
|
17775
|
+
execFileSync27(
|
|
17727
17776
|
"docker",
|
|
17728
17777
|
["build", "-f", path40.join(hubStackDir, "Dockerfile.auth"), "-t", HUB_AUTH_IMAGE, hubStackDir],
|
|
17729
17778
|
{ stdio: ["ignore", "inherit", "inherit"], env: { ...process.env, DOCKER_BUILDKIT: "1" } }
|
|
@@ -17737,7 +17786,7 @@ function hasRegistryAuth() {
|
|
|
17737
17786
|
function localHubVersion() {
|
|
17738
17787
|
const versions = HUB_IMAGES.map((name) => {
|
|
17739
17788
|
try {
|
|
17740
|
-
const out =
|
|
17789
|
+
const out = execFileSync27("docker", ["images", name, "--format", "{{.Tag}}"], {
|
|
17741
17790
|
encoding: "utf-8",
|
|
17742
17791
|
stdio: ["ignore", "pipe", "pipe"]
|
|
17743
17792
|
});
|
|
@@ -17816,7 +17865,7 @@ async function ensureHubImages() {
|
|
|
17816
17865
|
const context = path40.join(cacheDir(), `context-${version}`);
|
|
17817
17866
|
fs33.rmSync(context, { recursive: true, force: true });
|
|
17818
17867
|
fs33.mkdirSync(context, { recursive: true });
|
|
17819
|
-
|
|
17868
|
+
execFileSync27("tar", ["-xzf", tarball, "-C", context, "--strip-components", "1"], {
|
|
17820
17869
|
stdio: ["ignore", "pipe", "pipe"]
|
|
17821
17870
|
});
|
|
17822
17871
|
const hubStackDir = path40.join(findPackageRoot(), "stack", "hub");
|
|
@@ -17827,7 +17876,7 @@ async function ensureHubImages() {
|
|
|
17827
17876
|
const tag = `${name}:${version}`;
|
|
17828
17877
|
if (imageExists(tag)) continue;
|
|
17829
17878
|
logInfo(`Building ${tag} from the published tarball\u2026`);
|
|
17830
|
-
|
|
17879
|
+
execFileSync27(
|
|
17831
17880
|
"docker",
|
|
17832
17881
|
[
|
|
17833
17882
|
"build",
|
|
@@ -17857,7 +17906,7 @@ function readHubCompiledAuthz(version) {
|
|
|
17857
17906
|
if (!tarball || !fs33.existsSync(path40.join(cacheDir(), tarball))) return null;
|
|
17858
17907
|
fs33.mkdirSync(context, { recursive: true });
|
|
17859
17908
|
try {
|
|
17860
|
-
|
|
17909
|
+
execFileSync27(
|
|
17861
17910
|
"tar",
|
|
17862
17911
|
["-xzf", path40.join(cacheDir(), tarball), "-C", context, "--strip-components", "1", `package/${HUB_COMPILED_AUTHZ_REL}`],
|
|
17863
17912
|
{ stdio: ["ignore", "pipe", "pipe"] }
|
|
@@ -17951,7 +18000,7 @@ async function buildHubImagesFromSource(repoRoot2) {
|
|
|
17951
18000
|
await execFileAsync2("pnpm", ["pack", "--pack-destination", context], { cwd: hubDir, maxBuffer: 64 * 1024 * 1024 });
|
|
17952
18001
|
const tarball = fs33.readdirSync(context).find((f) => f.endsWith(".tgz"));
|
|
17953
18002
|
if (!tarball) throw new MeshCliError("pnpm pack produced no tarball for apps/hub");
|
|
17954
|
-
|
|
18003
|
+
execFileSync27("tar", ["-xzf", path40.join(context, tarball), "-C", context, "--strip-components", "1"], {
|
|
17955
18004
|
stdio: ["ignore", "pipe", "pipe"]
|
|
17956
18005
|
});
|
|
17957
18006
|
const rewritten = normalizeHubManifests(context, readWorkspaceCatalog(repoRoot2));
|
|
@@ -17963,7 +18012,7 @@ async function buildHubImagesFromSource(repoRoot2) {
|
|
|
17963
18012
|
]) {
|
|
17964
18013
|
const tag = `${name}:${version}`;
|
|
17965
18014
|
logInfo(`Building ${tag} from source\u2026`);
|
|
17966
|
-
|
|
18015
|
+
execFileSync27(
|
|
17967
18016
|
"docker",
|
|
17968
18017
|
["build", "-f", path40.join(hubStackDir, dockerfile), "-t", tag, "--secret", `id=npmrc,src=${npmrc}`, context],
|
|
17969
18018
|
{ stdio: ["ignore", "inherit", "inherit"], env: { ...process.env, DOCKER_BUILDKIT: "1" } }
|
|
@@ -19595,7 +19644,7 @@ var init_site = __esm({
|
|
|
19595
19644
|
});
|
|
19596
19645
|
|
|
19597
19646
|
// libs/mesh-cli/src/commands/stack.ts
|
|
19598
|
-
import { execFileSync as
|
|
19647
|
+
import { execFileSync as execFileSync28 } from "child_process";
|
|
19599
19648
|
import * as path42 from "path";
|
|
19600
19649
|
import * as fs35 from "fs";
|
|
19601
19650
|
import { parse as parseYaml5 } from "yaml";
|
|
@@ -19688,7 +19737,7 @@ function readBaseConfigFromYaml(appRoot, stack) {
|
|
|
19688
19737
|
}
|
|
19689
19738
|
function getGitHubUsername() {
|
|
19690
19739
|
try {
|
|
19691
|
-
const result =
|
|
19740
|
+
const result = execFileSync28("gh", ["api", "user", "--jq", ".login"], {
|
|
19692
19741
|
encoding: "utf-8",
|
|
19693
19742
|
stdio: ["pipe", "pipe", "pipe"]
|
|
19694
19743
|
});
|
|
@@ -19697,7 +19746,7 @@ function getGitHubUsername() {
|
|
|
19697
19746
|
} catch {
|
|
19698
19747
|
}
|
|
19699
19748
|
try {
|
|
19700
|
-
const result =
|
|
19749
|
+
const result = execFileSync28("git", ["config", "user.email"], {
|
|
19701
19750
|
encoding: "utf-8",
|
|
19702
19751
|
stdio: ["pipe", "pipe", "pipe"]
|
|
19703
19752
|
});
|
|
@@ -19783,7 +19832,7 @@ Specify which to base on: mesh stack init --from <stack>`
|
|
|
19783
19832
|
if (!opts.adopt) {
|
|
19784
19833
|
let existing = [];
|
|
19785
19834
|
try {
|
|
19786
|
-
const raw =
|
|
19835
|
+
const raw = execFileSync28("pulumi", ["stack", "ls", "--json"], {
|
|
19787
19836
|
cwd: appRoot,
|
|
19788
19837
|
encoding: "utf-8",
|
|
19789
19838
|
env: pulumiEnv,
|
|
@@ -19807,7 +19856,7 @@ Specify which to base on: mesh stack init --from <stack>`
|
|
|
19807
19856
|
logInfo(`Using KMS secrets provider: ${secretsProvider}`);
|
|
19808
19857
|
}
|
|
19809
19858
|
try {
|
|
19810
|
-
|
|
19859
|
+
execFileSync28("pulumi", initArgs, {
|
|
19811
19860
|
cwd: appRoot,
|
|
19812
19861
|
env: pulumiEnv,
|
|
19813
19862
|
stdio: "inherit"
|
|
@@ -19824,7 +19873,7 @@ Specify which to base on: mesh stack init --from <stack>`
|
|
|
19824
19873
|
}
|
|
19825
19874
|
}
|
|
19826
19875
|
try {
|
|
19827
|
-
|
|
19876
|
+
execFileSync28("pulumi", ["stack", "select", newStack], {
|
|
19828
19877
|
cwd: appRoot,
|
|
19829
19878
|
env: pulumiEnv,
|
|
19830
19879
|
stdio: ["pipe", "pipe", "pipe"]
|
|
@@ -19834,7 +19883,7 @@ Specify which to base on: mesh stack init --from <stack>`
|
|
|
19834
19883
|
if (!configExists) {
|
|
19835
19884
|
let baseConfig = {};
|
|
19836
19885
|
try {
|
|
19837
|
-
const raw =
|
|
19886
|
+
const raw = execFileSync28(
|
|
19838
19887
|
"pulumi",
|
|
19839
19888
|
["config", "--json", "--stack", baseStack],
|
|
19840
19889
|
{ cwd: appRoot, env: pulumiEnv, encoding: "utf-8", stdio: ["pipe", "pipe", "pipe"] }
|
|
@@ -19852,19 +19901,19 @@ Specify which to base on: mesh stack init --from <stack>`
|
|
|
19852
19901
|
if (key === "mesh:deploy") continue;
|
|
19853
19902
|
try {
|
|
19854
19903
|
if (entry.objectValue !== void 0) {
|
|
19855
|
-
|
|
19904
|
+
execFileSync28(
|
|
19856
19905
|
"pulumi",
|
|
19857
19906
|
["config", "set", key, JSON.stringify(entry.objectValue)],
|
|
19858
19907
|
{ cwd: appRoot, env: pulumiEnv, stdio: ["pipe", "pipe", "pipe"] }
|
|
19859
19908
|
);
|
|
19860
19909
|
} else if (entry.value === "true" || entry.value === "false") {
|
|
19861
|
-
|
|
19910
|
+
execFileSync28(
|
|
19862
19911
|
"pulumi",
|
|
19863
19912
|
["config", "set", "--type", "bool", key, entry.value],
|
|
19864
19913
|
{ cwd: appRoot, env: pulumiEnv, stdio: ["pipe", "pipe", "pipe"] }
|
|
19865
19914
|
);
|
|
19866
19915
|
} else {
|
|
19867
|
-
|
|
19916
|
+
execFileSync28(
|
|
19868
19917
|
"pulumi",
|
|
19869
19918
|
["config", "set", key, entry.value],
|
|
19870
19919
|
{ cwd: appRoot, env: pulumiEnv, stdio: ["pipe", "pipe", "pipe"] }
|
|
@@ -19877,7 +19926,7 @@ Specify which to base on: mesh stack init --from <stack>`
|
|
|
19877
19926
|
const baseEnv = readConfigBlockKey(appRoot, baseStack, "mesh:coreEnv") ?? (baseTenant && baseStack.startsWith(`${baseTenant}-`) ? baseStack.slice(baseTenant.length + 1) : baseStack);
|
|
19878
19927
|
const setCfg = (args) => {
|
|
19879
19928
|
try {
|
|
19880
|
-
|
|
19929
|
+
execFileSync28("pulumi", ["config", "set", ...args], {
|
|
19881
19930
|
cwd: appRoot,
|
|
19882
19931
|
env: pulumiEnv,
|
|
19883
19932
|
stdio: ["pipe", "pipe", "pipe"]
|
|
@@ -19926,7 +19975,7 @@ Specify which to base on: mesh stack init --from <stack>`
|
|
|
19926
19975
|
`Configured Pulumi.${newStack}.yaml (personal platform env on core '${baseEnv}'${opts.parentZone ? `, DNS zone ${newStack.startsWith(`${baseTenant}-`) ? newStack.slice(baseTenant.length + 1) : newStack}.${opts.parentZone}` : ""})`
|
|
19927
19976
|
);
|
|
19928
19977
|
} else {
|
|
19929
|
-
|
|
19978
|
+
execFileSync28("pulumi", ["config", "set", "--type", "bool", "mesh:deploy", "false"], {
|
|
19930
19979
|
cwd: appRoot,
|
|
19931
19980
|
env: pulumiEnv,
|
|
19932
19981
|
stdio: ["pipe", "pipe", "pipe"]
|
|
@@ -19956,7 +20005,7 @@ Specify which to base on: mesh stack init --from <stack>`
|
|
|
19956
20005
|
const args = ["stack", "rm", name];
|
|
19957
20006
|
if (opts.yes) args.push("--yes");
|
|
19958
20007
|
try {
|
|
19959
|
-
|
|
20008
|
+
execFileSync28("pulumi", args, { cwd: appRoot, env: pulumiEnv, stdio: "inherit" });
|
|
19960
20009
|
logSuccess(`Removed stack ${name}`);
|
|
19961
20010
|
} catch (err) {
|
|
19962
20011
|
process.exit(err.status ?? 1);
|
|
@@ -20168,12 +20217,12 @@ var init_recover_conversation = __esm({
|
|
|
20168
20217
|
});
|
|
20169
20218
|
|
|
20170
20219
|
// libs/mesh-cli/src/utils/temporal-codec.ts
|
|
20171
|
-
import { execFileSync as
|
|
20220
|
+
import { execFileSync as execFileSync29 } from "child_process";
|
|
20172
20221
|
import { webcrypto as crypto4 } from "node:crypto";
|
|
20173
20222
|
function resolveTemporalEncodingKeyFromK8s(namespace) {
|
|
20174
20223
|
const secretName = `${namespace}-temporal-encoding-key`;
|
|
20175
20224
|
try {
|
|
20176
|
-
const b64 =
|
|
20225
|
+
const b64 = execFileSync29(
|
|
20177
20226
|
"kubectl",
|
|
20178
20227
|
[
|
|
20179
20228
|
"get",
|
|
@@ -23513,7 +23562,7 @@ var init_src4 = __esm({
|
|
|
23513
23562
|
import * as fs38 from "fs";
|
|
23514
23563
|
import * as path45 from "path";
|
|
23515
23564
|
import { createRequire as createRequire2 } from "module";
|
|
23516
|
-
import { execFileSync as
|
|
23565
|
+
import { execFileSync as execFileSync30 } from "child_process";
|
|
23517
23566
|
function resolveExtractorPath() {
|
|
23518
23567
|
try {
|
|
23519
23568
|
const require2 = createRequire2(import.meta.url);
|
|
@@ -23568,7 +23617,7 @@ for (const file of files) {
|
|
|
23568
23617
|
process.stdout.write(JSON.stringify(results));
|
|
23569
23618
|
`;
|
|
23570
23619
|
try {
|
|
23571
|
-
const result =
|
|
23620
|
+
const result = execFileSync30("npx", ["tsx", "--eval", script], {
|
|
23572
23621
|
encoding: "utf-8",
|
|
23573
23622
|
stdio: ["pipe", "pipe", "inherit"],
|
|
23574
23623
|
maxBuffer: 10 * 1024 * 1024
|
|
@@ -23610,7 +23659,7 @@ for (const file of files) {
|
|
|
23610
23659
|
process.stdout.write(JSON.stringify(results));
|
|
23611
23660
|
`;
|
|
23612
23661
|
try {
|
|
23613
|
-
const result =
|
|
23662
|
+
const result = execFileSync30("npx", ["tsx", "--eval", script], {
|
|
23614
23663
|
encoding: "utf-8",
|
|
23615
23664
|
stdio: ["pipe", "pipe", "inherit"],
|
|
23616
23665
|
maxBuffer: 10 * 1024 * 1024
|
|
@@ -23665,7 +23714,7 @@ for (const file of files) {
|
|
|
23665
23714
|
process.stdout.write(JSON.stringify(results));
|
|
23666
23715
|
`;
|
|
23667
23716
|
try {
|
|
23668
|
-
const result =
|
|
23717
|
+
const result = execFileSync30("npx", ["tsx", "--eval", script], {
|
|
23669
23718
|
encoding: "utf-8",
|
|
23670
23719
|
stdio: ["pipe", "pipe", "inherit"],
|
|
23671
23720
|
maxBuffer: 10 * 1024 * 1024
|