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
2 changes: 2 additions & 0 deletions .github/workflows/_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
node_version: ${{ inputs.node_version }}
- name: Build
run: npm run build
- name: Check bundle size
run: npm run size
- name: Package
run: npm pack
- name: Upload artifact
Expand Down
37 changes: 37 additions & 0 deletions .storybook/fake-ecosystem.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import type { IncomingMessage, ServerResponse } from 'node:http'

export declare const fakeEmbedKey: string
export declare const fakePartnerEmbedKey: string
export declare const fakeManufacturerEmbedKey: string
export declare const fakeWrongOriginEmbedKey: string
export declare const fakeInvalidEmbedKey: string

export interface FakeEcosystemRequest {
method: string
path: string
searchParams: URLSearchParams
headers: Record<string, string | undefined>
assetBaseUrl: string
}

export interface FakeEcosystemResponse {
status: number
headers: Record<string, string>
body: string | null
}

export declare function handleFakeEcosystemRequest(
request: FakeEcosystemRequest
): FakeEcosystemResponse

export declare function createFakeEcosystemMiddleware(options: {
assetBaseUrl: string
}): (req: IncomingMessage, res: ServerResponse) => void

export interface FakeEcosystemServer {
serverUrl: string
endpoint: string
close: () => Promise<void>
}

export declare function startFakeEcosystemServer(): Promise<FakeEcosystemServer>
Loading
Loading