Skip to content

Commit ff51c46

Browse files
committed
Update wpcom-local-dev to wp-studio
1 parent df4a3f5 commit ff51c46

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/lib/deeplink/handlers/add-site-blueprint-with-url.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import { getMainWindow } from 'src/main-window';
1111
/**
1212
* Handles the add-site deeplink callback.
1313
* This function is called when a user clicks a deeplink like:
14-
* - wpcom-local-dev://add-site?blueprint_url=<encoded-url>
15-
* - wpcom-local-dev://add-site?blueprint=<base64-encoded-json>
14+
* - wp-studio://add-site?blueprint_url=<encoded-url>
15+
* - wp-studio://add-site?blueprint=<base64-encoded-json>
1616
*
1717
* It either downloads the blueprint from the URL or decodes the base64 blueprint,
1818
* and opens the Add Site modal with the blueprint pre-filled.

src/lib/deeplink/tests/add-site.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ describe( 'handleAddSiteWithBlueprint', () => {
3636

3737
const createBlueprintUrl = ( blueprintUrl: string ) => {
3838
const encodedUrl = encodeURIComponent( blueprintUrl );
39-
return new URL( `wpcom-local-dev://add-site?blueprint_url=${ encodedUrl }` );
39+
return new URL( `wp-studio://add-site?blueprint_url=${ encodedUrl }` );
4040
};
4141

4242
beforeEach( () => {
@@ -74,7 +74,7 @@ describe( 'handleAddSiteWithBlueprint', () => {
7474
} );
7575

7676
it( 'should not send event if blueprint_url parameter is missing', async () => {
77-
const url = new URL( 'wpcom-local-dev://add-site' );
77+
const url = new URL( 'wp-studio://add-site' );
7878

7979
await handleAddSiteWithBlueprint( url );
8080

@@ -85,7 +85,7 @@ describe( 'handleAddSiteWithBlueprint', () => {
8585
it( 'should handle invalid blueprint_url gracefully', async () => {
8686
const invalidUrl = 'not-a-valid-url';
8787
const encodedUrl = encodeURIComponent( invalidUrl );
88-
const url = new URL( `wpcom-local-dev://add-site?blueprint_url=${ encodedUrl }` );
88+
const url = new URL( `wp-studio://add-site?blueprint_url=${ encodedUrl }` );
8989

9090
await handleAddSiteWithBlueprint( url );
9191

@@ -172,7 +172,7 @@ describe( 'handleAddSiteWithBlueprint', () => {
172172
};
173173
const blueprintJson = JSON.stringify( blueprintData );
174174
const blueprintBase64 = Buffer.from( blueprintJson ).toString( 'base64' );
175-
const url = new URL( `wpcom-local-dev://add-site?blueprint=${ blueprintBase64 }` );
175+
const url = new URL( `wp-studio://add-site?blueprint=${ blueprintBase64 }` );
176176

177177
await handleAddSiteWithBlueprint( url );
178178

@@ -183,7 +183,7 @@ describe( 'handleAddSiteWithBlueprint', () => {
183183
} );
184184

185185
it( 'should handle invalid base64-encoded blueprint and display error message', async () => {
186-
const url = new URL( 'wpcom-local-dev://add-site?blueprint=invalid-base64!!!' );
186+
const url = new URL( 'wp-studio://add-site?blueprint=invalid-base64!!!' );
187187
await handleAddSiteWithBlueprint( url );
188188

189189
expect( sendIpcEventToRenderer ).not.toHaveBeenCalled();

0 commit comments

Comments
 (0)