Skip to content

Commit

Permalink
fixing ci build issue [run ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
mschile committed Apr 9, 2024
1 parent 4de2375 commit 67db370
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion packages/proxy/lib/http/util/service-worker-injector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ export const injectIntoServiceWorker = (body: Buffer) => {
// if the binding has been created, we can call it
// otherwise, we need to queue the event
if (self.__cypressServiceWorkerClientEvent) {
self.__cypressServiceWorkerClientEvent(JSON.stringify({ ...event, scope: self.registration.scope }))
const payload = Object.assign({}, event, { scope: self.registration.scope })

self.__cypressServiceWorkerClientEvent(JSON.stringify(payload))
} else {
eventQueue.push(event)
}
Expand Down
8 changes: 4 additions & 4 deletions packages/proxy/lib/http/util/service-worker-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,14 @@ export class ServiceWorkerManager {
* @param event the service worker fetch event to handle
*/
handleServiceWorkerClientEvent (event: ServiceWorkerClientEvent) {
debug('Handling service worker fetch event: %o', event)
debug('Handling service worker event: %o', event)

switch (event.type) {
case 'fetchRequest':
this.handleServiceWorkerFetchEvent(event.payload as ServiceWorkerEventsPayload['fetchRequest'])
break
case 'hasFetchHandler':
this.hasServiceWorkerFetchHandlers(event.payload as ServiceWorkerEventsPayload['hasFetchHandler'], event.scope)
this.handleHasServiceWorkerFetchHandlersEvent(event.payload as ServiceWorkerEventsPayload['hasFetchHandler'], event.scope)
break
case 'startHandlingRequests':
this.handleStartHandlingRequestsEvent(event.payload as ServiceWorkerEventsPayload['startHandlingRequests'], event.scope)
Expand Down Expand Up @@ -188,7 +188,7 @@ export class ServiceWorkerManager {
activatedServiceWorker.scriptURL === paramlessDocumentURL ||
!activatedServiceWorker.initiatorOrigin ||
!paramlessDocumentURL.startsWith(activatedServiceWorker.initiatorOrigin)) {
debug('Service worker not activated or request URL is from the service worker, skipping: %o', { registration, browserPreRequest })
debug('Service worker not activated/handling requests, or the request is directly from the service worker, skipping: %o', { registration, browserPreRequest })

return
}
Expand Down Expand Up @@ -234,7 +234,7 @@ export class ServiceWorkerManager {
* Handles a service worker has fetch handlers event.
* @param event the service worker has fetch handlers event to handle
*/
private hasServiceWorkerFetchHandlers (event: ServiceWorkerEventsPayload['hasFetchHandler'], scope: string) {
private handleHasServiceWorkerFetchHandlersEvent (event: ServiceWorkerEventsPayload['hasFetchHandler'], scope: string) {
debug('service worker has fetch handlers event called: %o', { event, scope })

const registration = this.getRegistrationForScope(scope)
Expand Down

4 comments on commit 67db370

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 67db370 Apr 9, 2024

Choose a reason for hiding this comment

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

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.7.3/linux-x64/mschile/service_worker_uncontrolled-67db370d9a583aa30d62ae3188125e75c13de43f/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 67db370 Apr 9, 2024

Choose a reason for hiding this comment

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

Circle has built the linux arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.7.3/linux-arm64/mschile/service_worker_uncontrolled-67db370d9a583aa30d62ae3188125e75c13de43f/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 67db370 Apr 9, 2024

Choose a reason for hiding this comment

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

Circle has built the darwin arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.7.3/darwin-arm64/mschile/service_worker_uncontrolled-67db370d9a583aa30d62ae3188125e75c13de43f/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 67db370 Apr 9, 2024

Choose a reason for hiding this comment

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

Circle has built the win32 x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.7.3/win32-x64/mschile/service_worker_uncontrolled-67db370d9a583aa30d62ae3188125e75c13de43f/cypress.tgz

Please sign in to comment.