@jill64/playwright-config
Advanced tools
Comparing version 1.2.0 to 1.3.0
import { Config } from '@playwright/test'; | ||
declare const providers: readonly ["cloudflare"]; | ||
declare const providers: readonly ["cloudflare", "vercel"]; | ||
type Provider = (typeof providers)[number]; | ||
@@ -4,0 +4,0 @@ export declare const branchPreview: (provider: Provider, options?: { |
import { vitePreview } from './vitePreview.js'; | ||
const providers = ['cloudflare']; | ||
const providers = ['cloudflare', 'vercel']; | ||
const { GITHUB_REF_NAME, GITHUB_REPOSITORY } = process.env; | ||
@@ -12,3 +12,3 @@ export const branchPreview = (provider, options) => { | ||
} | ||
const project_name = project ?? GITHUB_REPOSITORY?.split('/')[1]; | ||
const project_name = project ?? GITHUB_REPOSITORY?.split('/')?.[1]; | ||
if (!project_name) { | ||
@@ -20,3 +20,5 @@ return fallback; | ||
use: { | ||
baseURL: `https://${project_name}.pages.dev` | ||
baseURL: provider === 'cloudflare' | ||
? `https://${project_name}.pages.dev` | ||
: `https://${project_name}.vercel.app` | ||
} | ||
@@ -31,5 +33,7 @@ }; | ||
use: { | ||
baseURL: `https://${sub}.${project_name}.pages.dev` | ||
baseURL: provider === 'cloudflare' | ||
? `https://${sub}.${project_name}.pages.dev` | ||
: `https://${project_name}-git-${sub}-jill-64.vercel.app` | ||
} | ||
}; | ||
}; |
{ | ||
"name": "@jill64/playwright-config", | ||
"description": "🎭 Reusable My Playwright Config", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"type": "module", | ||
@@ -6,0 +6,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6490
91