@contrail/cli 3.6.0-alpha.693d785 → 3.6.0-alpha.b1b3d9e

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 CHANGED
@@ -17,7 +17,7 @@ $ npm install -g @contrail/cli
17
17
  $ contrail COMMAND
18
18
  running command...
19
19
  $ contrail (--version)
20
- @contrail/cli/3.6.0-alpha.693d785 linux-x64 node-v24.22.1
20
+ @contrail/cli/3.6.0-alpha.b1b3d9e linux-x64 node-v24.22.1
21
21
  $ contrail --help [COMMAND]
22
22
  USAGE
23
23
  $ contrail COMMAND
@@ -17,7 +17,7 @@ const COGNITO_CONFIGS = {
17
17
  clientId: '209s9c62o165cqab0fu5ihjtu9',
18
18
  sso: {
19
19
  domain: 'https://dev-vibeiq.auth.us-east-1.amazoncognito.com',
20
- clientId: '4nrd626t15ukbertqmcngfnom3',
20
+ clientId: '37m7g73hfetr5ab4o5b2ocv1j9',
21
21
  pastedCodeCallbackUrl: 'https://login.dev.vibeiq.com/cli',
22
22
  },
23
23
  },
@@ -232,6 +232,7 @@ describe('signIn with SSO', () => {
232
232
  delete process.env.CONTRAIL_CLI_PASSWORD;
233
233
  config_1.getConfig.mockResolvedValue({ apiGateway: DEV_GATEWAY, orgSlug: 'adam-zone-1' });
234
234
  sdk_1.getCurrentUser.mockResolvedValue({ id: 'user-1' });
235
+ mockAuthenticateUser.mockImplementation((_details, callbacks) => callbacks.onSuccess({ idToken: { jwtToken: 'cognito-id-token' } }));
235
236
  promptSpy = jest.spyOn(inquirer_1.default, 'prompt');
236
237
  pasteCodeFromPrintedSignInUrl();
237
238
  fetchMock = jest.fn();
package/dist/auth/sso.js CHANGED
@@ -90,10 +90,16 @@ function listenForLoopbackCode(expectedState) {
90
90
  }
91
91
  }));
92
92
  });
93
+ const openSockets = new Set();
94
+ server.on('connection', (socket) => {
95
+ openSockets.add(socket);
96
+ socket.once('close', () => openSockets.delete(socket));
97
+ });
93
98
  const timeout = setTimeout(() => stopListening(() => rejectCode(new Error('Timed out waiting for the browser sign-in.'))), BROWSER_SIGN_IN_TIMEOUT_MS);
94
99
  function stopListening(settle) {
95
100
  clearTimeout(timeout);
96
101
  server.close();
102
+ openSockets.forEach((socket) => socket.destroy());
97
103
  settle();
98
104
  }
99
105
  return new Promise((resolve, reject) => {
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.6.0-alpha.693d785",
2
+ "version": "3.6.0-alpha.b1b3d9e",
3
3
  "commands": {
4
4
  "login": {
5
5
  "id": "login",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/cli",
3
- "version": "3.6.0-alpha.693d785",
3
+ "version": "3.6.0-alpha.b1b3d9e",
4
4
  "description": "VibeIQ's Contrail Platform CLI.",
5
5
  "bin": {
6
6
  "contrail-cli": "./bin/run",