Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/hip-ways-complain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@bigcommerce/create-catalyst": patch
---

Update the client id to the new one.
5 changes: 5 additions & 0 deletions .changeset/wise-worms-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@bigcommerce/catalyst": patch
---

Update the CLI with the new client id.
9 changes: 8 additions & 1 deletion packages/catalyst/src/cli/commands/start.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Command } from 'commander';
import { execa } from 'execa';
import { existsSync, lstatSync, symlinkSync } from 'node:fs';
import { join } from 'node:path';
import { afterEach, beforeAll, beforeEach, expect, test, vi } from 'vitest';

import { consola } from '../lib/logger';
Expand Down Expand Up @@ -44,7 +45,13 @@ test('calls execa with OpenNext production optimized server', async () => {

expect(execa).toHaveBeenCalledWith(
'pnpm',
['exec', 'opennextjs-cloudflare', 'preview', '--config', '.bigcommerce/wrangler.jsonc'],
[
'exec',
'opennextjs-cloudflare',
'preview',
'--config',
join('.bigcommerce', 'wrangler.jsonc'),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change for "best practice" purposes?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🪟 😆

],
expect.objectContaining({
stdio: 'inherit',
cwd: process.cwd(),
Expand Down
2 changes: 1 addition & 1 deletion packages/catalyst/src/cli/lib/auth.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ describe('waitForDeviceToken', () => {

describe('constants', () => {
test('DEVICE_OAUTH_CLIENT_ID matches create-catalyst', () => {
expect(DEVICE_OAUTH_CLIENT_ID).toBe('s1q4io7mah2lm1i6uwp9yl1eit80n3b');
expect(DEVICE_OAUTH_CLIENT_ID).toBe('b8063bu6hhml4e0lqh22yut63atsbyv');
});

test('DEVICE_OAUTH_SCOPES contains expected scopes', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/catalyst/src/cli/lib/auth.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { z } from 'zod';

export const DEVICE_OAUTH_CLIENT_ID = 's1q4io7mah2lm1i6uwp9yl1eit80n3b';
export const DEVICE_OAUTH_CLIENT_ID = 'b8063bu6hhml4e0lqh22yut63atsbyv';
export const DEVICE_OAUTH_SCOPES = [
'store_v2_information',
'store_infrastructure_deployments_manage',
Expand Down
2 changes: 1 addition & 1 deletion packages/create-catalyst/src/utils/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interface AuthConfig {

export class Auth {
private client: Https;
private readonly DEVICE_OAUTH_CLIENT_ID = 's1q4io7mah2lm1i6uwp9yl1eit80n3b';
private readonly DEVICE_OAUTH_CLIENT_ID = 'b8063bu6hhml4e0lqh22yut63atsbyv';

constructor({ baseUrl }: AuthConfig) {
this.client = new Https({ baseUrl });
Expand Down
Loading