sim-setup 1.0.31-preview.176.1 → 1.0.31-preview.178.1

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.
Files changed (2) hide show
  1. package/dist/index.js +58 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1598,6 +1598,7 @@ var init_env_capabilities = __esm(() => {
1598
1598
  asana: ["ASANA_CLIENT_ID", "ASANA_CLIENT_SECRET"],
1599
1599
  pipedrive: ["PIPEDRIVE_CLIENT_ID", "PIPEDRIVE_CLIENT_SECRET"],
1600
1600
  hubspot: ["HUBSPOT_CLIENT_ID", "HUBSPOT_CLIENT_SECRET"],
1601
+ "hubspot-mcp": ["HUBSPOT_MCP_CLIENT_ID", "HUBSPOT_MCP_CLIENT_SECRET"],
1601
1602
  linkedin: ["LINKEDIN_CLIENT_ID", "LINKEDIN_CLIENT_SECRET"],
1602
1603
  instagram: ["INSTAGRAM_CLIENT_ID", "INSTAGRAM_CLIENT_SECRET"],
1603
1604
  salesforce: ["SALESFORCE_CLIENT_ID", "SALESFORCE_CLIENT_SECRET"],
@@ -2781,6 +2782,10 @@ var init_capability_config = __esm(() => {
2781
2782
  HUBSPOT_CLIENT_ID: { input: "text" },
2782
2783
  HUBSPOT_CLIENT_SECRET: { input: "secret" }
2783
2784
  },
2785
+ "hubspot-mcp": {
2786
+ HUBSPOT_MCP_CLIENT_ID: { input: "text" },
2787
+ HUBSPOT_MCP_CLIENT_SECRET: { input: "secret" }
2788
+ },
2784
2789
  linkedin: {
2785
2790
  LINKEDIN_CLIENT_ID: { input: "text" },
2786
2791
  LINKEDIN_CLIENT_SECRET: { input: "secret" }
@@ -12016,6 +12021,45 @@ function dockerText(args, cwd = ROOT) {
12016
12021
  const result = spawnSync8("docker", args, { cwd, encoding: "utf8" });
12017
12022
  return result.status === 0 ? result.stdout.trim() : null;
12018
12023
  }
12024
+ function composeServiceState(stateOutput) {
12025
+ if (stateOutput === null)
12026
+ return "unknown";
12027
+ const states = stateOutput.split(`
12028
+ `).map((state) => state.trim()).filter(Boolean);
12029
+ if (states.length === 0)
12030
+ return null;
12031
+ return { state: states.includes("running") ? "running" : "stopped" };
12032
+ }
12033
+ function composeServiceQuery(project, service) {
12034
+ return [
12035
+ "ps",
12036
+ "-a",
12037
+ "--filter",
12038
+ `label=com.docker.compose.project=${project}`,
12039
+ "--filter",
12040
+ `label=com.docker.compose.service=${service}`,
12041
+ "--format",
12042
+ "{{.State}}"
12043
+ ];
12044
+ }
12045
+ function serviceStatusRows(installs, standalone, query = (args) => dockerText(args)) {
12046
+ const rows = [];
12047
+ const stacks = installs.filter((install) => install.kind === "compose");
12048
+ if (stacks.length === 0 || installs.some((install) => install.kind === "dev")) {
12049
+ rows.push({ label: `postgres (${DB_CONTAINER})`, state: standalone.db }, { label: `redis (${REDIS_CONTAINER})`, state: standalone.redis });
12050
+ }
12051
+ for (const stack of stacks) {
12052
+ const scope = stacks.length > 1 ? `${stack.project} ` : "";
12053
+ rows.push({
12054
+ label: `${scope}postgres (compose db)`,
12055
+ state: composeServiceState(query(composeServiceQuery(stack.project, "db")))
12056
+ }, {
12057
+ label: `${scope}redis (compose redis)`,
12058
+ state: composeServiceState(query(composeServiceQuery(stack.project, "redis")))
12059
+ });
12060
+ }
12061
+ return rows;
12062
+ }
12019
12063
  function dockerInherit(args, cwd = ROOT) {
12020
12064
  return spawnSync8("docker", args, { cwd, stdio: "inherit" }).status ?? 1;
12021
12065
  }
@@ -12394,10 +12438,21 @@ ${theme.heading("◆ Sim status")}
12394
12438
  }
12395
12439
  for (const install of installs)
12396
12440
  console.log(` ${glyph.pass} ${describeInstall(install)}`);
12397
- const containerState = (state) => docker ? state ? state.state : "absent" : "unknown (docker down)";
12441
+ const containerState = (state) => {
12442
+ if (!docker)
12443
+ return "unknown (docker down)";
12444
+ if (state === "unknown")
12445
+ return "unknown (docker query failed)";
12446
+ return state ? state.state : "absent";
12447
+ };
12398
12448
  console.log();
12399
- console.log(` postgres (${DB_CONTAINER}): ${containerState(detection.dbContainer)}`);
12400
- console.log(` redis (${REDIS_CONTAINER}): ${containerState(detection.redisContainer)}`);
12449
+ const rows = serviceStatusRows(installs, {
12450
+ db: detection.dbContainer,
12451
+ redis: detection.redisContainer
12452
+ });
12453
+ const width = Math.max(...rows.map((row) => row.label.length)) + 3;
12454
+ for (const row of rows)
12455
+ console.log(` ${`${row.label}:`.padEnd(width)}${containerState(row.state)}`);
12401
12456
  const [app, realtime] = await Promise.all([
12402
12457
  httpHealth(`${APP_URL}/api/health`),
12403
12458
  httpHealth(REALTIME_HEALTH)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sim-setup",
3
- "version": "1.0.31-preview.176.1",
3
+ "version": "1.0.31-preview.178.1",
4
4
  "description": "Set up and manage a self-hosted Sim installation",
5
5
  "type": "module",
6
6
  "bin": {