@hs-x/cli 0.4.2 → 0.4.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/commands/dev.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAI/C,OAAO,EAAU,MAAM,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,KAAK,QAAQ,EAAY,MAAM,iBAAiB,CAAC;AA2C1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAuzBzC,wBAAsB,UAAU,CAAC,EAC/B,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,QAAQ,GACT,EAAE;IACD,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;CAC9B,GAAG,OAAO,CAAC,SAAS,CAAC,CAuErB;AA0mFD,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiJlB,CAAC"}
1
+ {"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/commands/dev.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAI/C,OAAO,EAAU,MAAM,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,KAAK,QAAQ,EAAY,MAAM,iBAAiB,CAAC;AA2C1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAuzBzC,wBAAsB,UAAU,CAAC,EAC/B,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,QAAQ,GACT,EAAE;IACD,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;CAC9B,GAAG,OAAO,CAAC,SAAS,CAAC,CAuErB;AAmnFD,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiJlB,CAAC"}
@@ -810,17 +810,24 @@ async function devCommandCore({ argv, root, json, }) {
810
810
  }
811
811
  const workers = await discoverWorkerManifests(root);
812
812
  await generateProjectArtifacts({ root, workers });
813
- let portalId = resolveFlag(argv, '--portal');
813
+ const noHubSpot = argv.includes('--no-hubspot');
814
+ // `--no-hubspot` is an explicit local-only posture. It must win over both
815
+ // an accidental --portal flag and any account discovered from local CLI
816
+ // state, otherwise dev tries to register a provider override before the
817
+ // existing HubSpot dev-session guard gets a chance to skip that work.
818
+ let portalId = noHubSpot ? undefined : resolveFlag(argv, '--portal');
814
819
  const targetOrigin = resolveFlag(argv, '--target-origin');
815
820
  const telemetryOrigin = resolveFlag(argv, '--telemetry-origin');
816
821
  const forceDevOverride = argv.includes('--force');
817
- const resolvedDevAcct = await resolveAccountIdOrPrompt({
818
- argv,
819
- json,
820
- purpose: 'this dev session',
821
- root,
822
- });
823
- const accountId = resolvedDevAcct.accountId;
822
+ const resolvedDevAcct = noHubSpot
823
+ ? undefined
824
+ : await resolveAccountIdOrPrompt({
825
+ argv,
826
+ json,
827
+ purpose: 'this dev session',
828
+ root,
829
+ });
830
+ const accountId = resolvedDevAcct?.accountId;
824
831
  const devCliConfig = loadCliConfig(argv);
825
832
  // Portal id: HubSpot account ids in our store look like `portal-46993937`;
826
833
  // strip the prefix when the user didn't pass --portal explicitly.
@@ -863,16 +870,18 @@ async function devCommandCore({ argv, root, json, }) {
863
870
  reporter.done(undefined, 10);
864
871
  return { exitCode: 10 };
865
872
  }
866
- if (!portalId) {
873
+ if (!noHubSpot && !portalId) {
867
874
  portalId = await resolveDefaultPortalId({ root, accountId });
868
875
  }
869
876
  // Probe the HubSpot project IR up front so the picker can show UI-extension
870
877
  // nodes alongside HS-X capabilities. No-op if hsproject.json isn't present.
871
- const uiExtensionNodes = await probeHubSpotUiNodes({
872
- root,
873
- portalIdFlag: portalId,
874
- accountId,
875
- });
878
+ const uiExtensionNodes = noHubSpot
879
+ ? undefined
880
+ : await probeHubSpotUiNodes({
881
+ root,
882
+ portalIdFlag: portalId,
883
+ accountId,
884
+ });
876
885
  let capabilityIds = selectedCapabilities.length > 0 ? selectedCapabilities : allCapabilityIds;
877
886
  let selectedUiNodeUids = uiExtensionNodes && uiExtensionNodes.uids.length > 0 ? uiExtensionNodes.uids : undefined;
878
887
  // Unified picker: ask once over HS-X capabilities + HubSpot UI nodes.
@@ -922,7 +931,7 @@ async function devCommandCore({ argv, root, json, }) {
922
931
  // We register a dev override whenever the user has a HubSpot portal in
923
932
  // play. `hs-x connect` gives us the portal id implicitly; only edge cases
924
933
  // (no connected account, no --portal flag) skip registration.
925
- const shouldRegisterOverride = Boolean(portalId);
934
+ const shouldRegisterOverride = !noHubSpot && Boolean(portalId);
926
935
  if (shouldRegisterOverride) {
927
936
  const portalIdForOverride = portalId;
928
937
  if (!portalIdForOverride) {
@@ -1378,7 +1387,7 @@ async function devCommandCore({ argv, root, json, }) {
1378
1387
  ? [{ status: 'ok', key: 'telemetry', value: telemetryOrigin }]
1379
1388
  : []),
1380
1389
  ]);
1381
- if (!portalId) {
1390
+ if (!noHubSpot && !portalId) {
1382
1391
  reporter.info('No HubSpot portal found — running local-only. Pass `--portal <id>` (or set a default with `hs auth` / `hs-x login`) to mirror a live portal.');
1383
1392
  }
1384
1393
  // The pinned status line carries the key map (incl. quit); repeating it in