rwsdk 0.1.15 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/dist/lib/$.d.mts +0 -8
- package/dist/lib/$.mjs +0 -5
- package/dist/lib/constants.d.mts +0 -4
- package/dist/lib/constants.mjs +0 -6
- package/dist/lib/findWranglerConfig.d.mts +0 -1
- package/dist/lib/findWranglerConfig.mjs +0 -12
- package/dist/lib/getShortName.d.mts +0 -1
- package/dist/lib/getShortName.mjs +0 -2
- package/dist/lib/getSrcPaths.d.ts +0 -15
- package/dist/lib/getSrcPaths.js +0 -80
- package/dist/lib/hasPkgScript.d.mts +0 -1
- package/dist/lib/hasPkgScript.mjs +0 -9
- package/dist/lib/jsonUtils.d.mts +0 -28
- package/dist/lib/jsonUtils.mjs +0 -167
- package/dist/lib/setupEnvFiles.d.mts +0 -4
- package/dist/lib/setupEnvFiles.mjs +0 -31
- package/dist/lib/smokeTests/artifacts.d.mts +0 -10
- package/dist/lib/smokeTests/artifacts.mjs +0 -164
- package/dist/lib/smokeTests/browser.d.mts +0 -48
- package/dist/lib/smokeTests/browser.mjs +0 -1041
- package/dist/lib/smokeTests/cleanup.d.mts +0 -5
- package/dist/lib/smokeTests/cleanup.mjs +0 -214
- package/dist/lib/smokeTests/codeUpdates.d.mts +0 -8
- package/dist/lib/smokeTests/codeUpdates.mjs +0 -229
- package/dist/lib/smokeTests/constants.d.mts +0 -5
- package/dist/lib/smokeTests/constants.mjs +0 -10
- package/dist/lib/smokeTests/development.d.mts +0 -11
- package/dist/lib/smokeTests/development.mjs +0 -209
- package/dist/lib/smokeTests/environment.d.mts +0 -14
- package/dist/lib/smokeTests/environment.mjs +0 -163
- package/dist/lib/smokeTests/release.d.mts +0 -61
- package/dist/lib/smokeTests/release.mjs +0 -526
- package/dist/lib/smokeTests/reporting.d.mts +0 -13
- package/dist/lib/smokeTests/reporting.mjs +0 -355
- package/dist/lib/smokeTests/runSmokeTests.d.mts +0 -5
- package/dist/lib/smokeTests/runSmokeTests.mjs +0 -144
- package/dist/lib/smokeTests/state.d.mts +0 -48
- package/dist/lib/smokeTests/state.mjs +0 -57
- package/dist/lib/smokeTests/templates/SmokeTest.template.d.ts +0 -1
- package/dist/lib/smokeTests/templates/SmokeTest.template.js +0 -81
- package/dist/lib/smokeTests/templates/SmokeTestClient.template.d.ts +0 -1
- package/dist/lib/smokeTests/templates/SmokeTestClient.template.js +0 -159
- package/dist/lib/smokeTests/templates/smokeTestFunctions.template.d.ts +0 -1
- package/dist/lib/smokeTests/templates/smokeTestFunctions.template.js +0 -19
- package/dist/lib/smokeTests/types.d.mts +0 -75
- package/dist/lib/smokeTests/types.mjs +0 -1
- package/dist/lib/smokeTests/utils.d.mts +0 -15
- package/dist/lib/smokeTests/utils.mjs +0 -147
- package/dist/llms/index.d.ts +0 -3
- package/dist/llms/index.js +0 -35
- package/dist/llms/rules/interruptors.d.ts +0 -1
- package/dist/llms/rules/interruptors.js +0 -243
- package/dist/llms/rules/middleware.d.ts +0 -1
- package/dist/llms/rules/middleware.js +0 -71
- package/dist/llms/rules/react.d.ts +0 -1
- package/dist/llms/rules/react.js +0 -106
- package/dist/llms/rules/request-response.d.ts +0 -1
- package/dist/llms/rules/request-response.js +0 -209
- package/dist/runtime/client.d.ts +0 -17
- package/dist/runtime/client.js +0 -74
- package/dist/runtime/clientNavigation.d.ts +0 -4
- package/dist/runtime/clientNavigation.js +0 -53
- package/dist/runtime/clientNavigation.test.d.ts +0 -1
- package/dist/runtime/clientNavigation.test.js +0 -55
- package/dist/runtime/constants.d.ts +0 -1
- package/dist/runtime/constants.js +0 -1
- package/dist/runtime/entries/auth.d.ts +0 -1
- package/dist/runtime/entries/auth.js +0 -1
- package/dist/runtime/entries/client.d.ts +0 -4
- package/dist/runtime/entries/client.js +0 -4
- package/dist/runtime/entries/clientSSR.d.ts +0 -1
- package/dist/runtime/entries/clientSSR.js +0 -1
- package/dist/runtime/entries/no-react-server.d.ts +0 -0
- package/dist/runtime/entries/no-react-server.js +0 -2
- package/dist/runtime/entries/react-server-only.d.ts +0 -0
- package/dist/runtime/entries/react-server-only.js +0 -2
- package/dist/runtime/entries/router.d.ts +0 -2
- package/dist/runtime/entries/router.js +0 -2
- package/dist/runtime/entries/ssr.d.ts +0 -1
- package/dist/runtime/entries/ssr.js +0 -1
- package/dist/runtime/entries/worker.d.ts +0 -9
- package/dist/runtime/entries/worker.js +0 -9
- package/dist/runtime/error.d.ts +0 -6
- package/dist/runtime/error.js +0 -8
- package/dist/runtime/imports/ClientOnly.d.ts +0 -3
- package/dist/runtime/imports/ClientOnly.js +0 -8
- package/dist/runtime/imports/client.d.ts +0 -4
- package/dist/runtime/imports/client.js +0 -33
- package/dist/runtime/imports/ssr.d.ts +0 -5
- package/dist/runtime/imports/ssr.js +0 -20
- package/dist/runtime/imports/worker.d.ts +0 -5
- package/dist/runtime/imports/worker.js +0 -22
- package/dist/runtime/lib/auth/index.d.ts +0 -1
- package/dist/runtime/lib/auth/index.js +0 -1
- package/dist/runtime/lib/auth/session.d.ts +0 -50
- package/dist/runtime/lib/auth/session.js +0 -148
- package/dist/runtime/lib/db/DOWorkerDialect.d.ts +0 -29
- package/dist/runtime/lib/db/DOWorkerDialect.js +0 -66
- package/dist/runtime/lib/db/SqliteDurableObject.d.ts +0 -14
- package/dist/runtime/lib/db/SqliteDurableObject.js +0 -42
- package/dist/runtime/lib/db/createDb.d.ts +0 -2
- package/dist/runtime/lib/db/createDb.js +0 -33
- package/dist/runtime/lib/db/index.d.ts +0 -4
- package/dist/runtime/lib/db/index.js +0 -3
- package/dist/runtime/lib/db/migrations.d.ts +0 -23
- package/dist/runtime/lib/db/migrations.js +0 -34
- package/dist/runtime/lib/db/typeInference/assert.d.ts +0 -2
- package/dist/runtime/lib/db/typeInference/assert.js +0 -1
- package/dist/runtime/lib/db/typeInference/builders/alterColumn.d.ts +0 -27
- package/dist/runtime/lib/db/typeInference/builders/alterColumn.js +0 -1
- package/dist/runtime/lib/db/typeInference/builders/alterTable.d.ts +0 -53
- package/dist/runtime/lib/db/typeInference/builders/alterTable.js +0 -1
- package/dist/runtime/lib/db/typeInference/builders/columnDefinition.d.ts +0 -26
- package/dist/runtime/lib/db/typeInference/builders/columnDefinition.js +0 -1
- package/dist/runtime/lib/db/typeInference/builders/createTable.d.ts +0 -49
- package/dist/runtime/lib/db/typeInference/builders/createTable.js +0 -1
- package/dist/runtime/lib/db/typeInference/builders/createView.d.ts +0 -17
- package/dist/runtime/lib/db/typeInference/builders/createView.js +0 -1
- package/dist/runtime/lib/db/typeInference/builders/dropTable.d.ts +0 -11
- package/dist/runtime/lib/db/typeInference/builders/dropTable.js +0 -1
- package/dist/runtime/lib/db/typeInference/builders/dropView.d.ts +0 -12
- package/dist/runtime/lib/db/typeInference/builders/dropView.js +0 -1
- package/dist/runtime/lib/db/typeInference/builders/schema.d.ts +0 -24
- package/dist/runtime/lib/db/typeInference/builders/schema.js +0 -1
- package/dist/runtime/lib/db/typeInference/database.d.ts +0 -27
- package/dist/runtime/lib/db/typeInference/database.js +0 -1
- package/dist/runtime/lib/db/typeInference/typetests/alterTable.typetest.d.ts +0 -1
- package/dist/runtime/lib/db/typeInference/typetests/alterTable.typetest.js +0 -360
- package/dist/runtime/lib/db/typeInference/typetests/createTable.typetest.d.ts +0 -1
- package/dist/runtime/lib/db/typeInference/typetests/createTable.typetest.js +0 -33
- package/dist/runtime/lib/db/typeInference/typetests/dropTable.typetest.d.ts +0 -1
- package/dist/runtime/lib/db/typeInference/typetests/dropTable.typetest.js +0 -143
- package/dist/runtime/lib/db/typeInference/typetests/print.d.ts +0 -3
- package/dist/runtime/lib/db/typeInference/typetests/print.js +0 -1
- package/dist/runtime/lib/db/typeInference/typetests/testUtils.d.ts +0 -2
- package/dist/runtime/lib/db/typeInference/typetests/testUtils.js +0 -1
- package/dist/runtime/lib/db/typeInference/typetests/typeInference.typetest.d.ts +0 -1
- package/dist/runtime/lib/db/typeInference/typetests/typeInference.typetest.js +0 -17
- package/dist/runtime/lib/db/typeInference/utils.d.ts +0 -82
- package/dist/runtime/lib/db/typeInference/utils.js +0 -2
- package/dist/runtime/lib/debug.d.ts +0 -2
- package/dist/runtime/lib/debug.js +0 -36
- package/dist/runtime/lib/links.d.ts +0 -14
- package/dist/runtime/lib/links.js +0 -38
- package/dist/runtime/lib/realtime/client.d.ts +0 -7
- package/dist/runtime/lib/realtime/client.js +0 -166
- package/dist/runtime/lib/realtime/constants.d.ts +0 -1
- package/dist/runtime/lib/realtime/constants.js +0 -1
- package/dist/runtime/lib/realtime/durableObject.d.ts +0 -29
- package/dist/runtime/lib/realtime/durableObject.js +0 -187
- package/dist/runtime/lib/realtime/renderRealtimeClients.d.ts +0 -7
- package/dist/runtime/lib/realtime/renderRealtimeClients.js +0 -6
- package/dist/runtime/lib/realtime/shared.d.ts +0 -10
- package/dist/runtime/lib/realtime/shared.js +0 -10
- package/dist/runtime/lib/realtime/validateUpgradeRequest.d.ts +0 -6
- package/dist/runtime/lib/realtime/validateUpgradeRequest.js +0 -29
- package/dist/runtime/lib/realtime/worker.d.ts +0 -3
- package/dist/runtime/lib/realtime/worker.js +0 -16
- package/dist/runtime/lib/router.d.ts +0 -56
- package/dist/runtime/lib/router.js +0 -210
- package/dist/runtime/lib/router.test.d.ts +0 -1
- package/dist/runtime/lib/router.test.js +0 -58
- package/dist/runtime/lib/streams/consumeEventStream.d.ts +0 -4
- package/dist/runtime/lib/streams/consumeEventStream.js +0 -13
- package/dist/runtime/lib/turnstile/TurnstileScript.d.ts +0 -1
- package/dist/runtime/lib/turnstile/TurnstileScript.js +0 -2
- package/dist/runtime/lib/turnstile/turnstile.d.ts +0 -3
- package/dist/runtime/lib/turnstile/turnstile.js +0 -3
- package/dist/runtime/lib/turnstile/useTurnstile.d.ts +0 -4
- package/dist/runtime/lib/turnstile/useTurnstile.js +0 -23
- package/dist/runtime/lib/turnstile/verifyTurnstileToken.d.ts +0 -4
- package/dist/runtime/lib/turnstile/verifyTurnstileToken.js +0 -15
- package/dist/runtime/lib/utils.d.ts +0 -1
- package/dist/runtime/lib/utils.js +0 -1
- package/dist/runtime/register/client.d.ts +0 -1
- package/dist/runtime/register/client.js +0 -5
- package/dist/runtime/register/ssr.d.ts +0 -3
- package/dist/runtime/register/ssr.js +0 -26
- package/dist/runtime/register/worker.d.ts +0 -4
- package/dist/runtime/register/worker.js +0 -42
- package/dist/runtime/render/createClientManifest.d.ts +0 -1
- package/dist/runtime/render/createClientManifest.js +0 -7
- package/dist/runtime/render/createModuleMap.d.ts +0 -1
- package/dist/runtime/render/createModuleMap.js +0 -13
- package/dist/runtime/render/renderRscThenableToHtmlStream.d.ts +0 -9
- package/dist/runtime/render/renderRscThenableToHtmlStream.js +0 -49
- package/dist/runtime/render/renderToRscStream.d.ts +0 -5
- package/dist/runtime/render/renderToRscStream.js +0 -46
- package/dist/runtime/render/renderToStream.d.ts +0 -9
- package/dist/runtime/render/renderToStream.js +0 -27
- package/dist/runtime/render/renderToString.d.ts +0 -7
- package/dist/runtime/render/renderToString.js +0 -26
- package/dist/runtime/render/transformRscToHtmlStream.d.ts +0 -8
- package/dist/runtime/render/transformRscToHtmlStream.js +0 -19
- package/dist/runtime/requestInfo/types.d.ts +0 -11
- package/dist/runtime/requestInfo/types.js +0 -1
- package/dist/runtime/requestInfo/worker.d.ts +0 -5
- package/dist/runtime/requestInfo/worker.js +0 -33
- package/dist/runtime/script.d.ts +0 -5
- package/dist/runtime/script.js +0 -8
- package/dist/runtime/ssrBridge.d.ts +0 -2
- package/dist/runtime/ssrBridge.js +0 -11
- package/dist/runtime/worker.d.ts +0 -18
- package/dist/runtime/worker.js +0 -173
- package/dist/scripts/__sdk.d.mts +0 -1
- package/dist/scripts/__sdk.mjs +0 -14
- package/dist/scripts/debug-sync.d.mts +0 -6
- package/dist/scripts/debug-sync.mjs +0 -224
- package/dist/scripts/dev-init.d.mts +0 -1
- package/dist/scripts/dev-init.mjs +0 -25
- package/dist/scripts/ensure-deploy-env.d.mts +0 -1
- package/dist/scripts/ensure-deploy-env.mjs +0 -271
- package/dist/scripts/ensure-env.d.mts +0 -1
- package/dist/scripts/ensure-env.mjs +0 -9
- package/dist/scripts/migrate-new.d.mts +0 -1
- package/dist/scripts/migrate-new.mjs +0 -51
- package/dist/scripts/smoke-test.d.mts +0 -1
- package/dist/scripts/smoke-test.mjs +0 -166
- package/dist/scripts/worker-run.d.mts +0 -1
- package/dist/scripts/worker-run.mjs +0 -82
- package/dist/vite/checkIsUsingPrisma.d.mts +0 -6
- package/dist/vite/checkIsUsingPrisma.mjs +0 -18
- package/dist/vite/configPlugin.d.mts +0 -9
- package/dist/vite/configPlugin.mjs +0 -169
- package/dist/vite/createDirectiveLookupPlugin.d.mts +0 -21
- package/dist/vite/createDirectiveLookupPlugin.mjs +0 -233
- package/dist/vite/devServerTimingPlugin.d.mts +0 -2
- package/dist/vite/devServerTimingPlugin.mjs +0 -24
- package/dist/vite/directivesPlugin.d.mts +0 -6
- package/dist/vite/directivesPlugin.mjs +0 -200
- package/dist/vite/ensureAliasArray.d.mts +0 -2
- package/dist/vite/ensureAliasArray.mjs +0 -17
- package/dist/vite/findSpecifiers.d.mts +0 -31
- package/dist/vite/findSpecifiers.mjs +0 -230
- package/dist/vite/findSsrSpecifiers.d.mts +0 -11
- package/dist/vite/findSsrSpecifiers.mjs +0 -51
- package/dist/vite/hasDirective.d.mts +0 -7
- package/dist/vite/hasDirective.mjs +0 -54
- package/dist/vite/hasOwnCloudflareVitePlugin.d.mts +0 -3
- package/dist/vite/hasOwnCloudflareVitePlugin.mjs +0 -14
- package/dist/vite/index.d.mts +0 -1
- package/dist/vite/index.mjs +0 -1
- package/dist/vite/injectVitePreamblePlugin.d.mts +0 -4
- package/dist/vite/injectVitePreamblePlugin.mjs +0 -23
- package/dist/vite/invalidateCacheIfPrismaClientChanged.d.mts +0 -3
- package/dist/vite/invalidateCacheIfPrismaClientChanged.mjs +0 -27
- package/dist/vite/invalidateModule.d.mts +0 -6
- package/dist/vite/invalidateModule.mjs +0 -30
- package/dist/vite/isJsFile.d.mts +0 -1
- package/dist/vite/isJsFile.mjs +0 -3
- package/dist/vite/miniflareHMRPlugin.d.mts +0 -10
- package/dist/vite/miniflareHMRPlugin.mjs +0 -171
- package/dist/vite/moveStaticAssetsPlugin.d.mts +0 -4
- package/dist/vite/moveStaticAssetsPlugin.mjs +0 -12
- package/dist/vite/normalizeModulePath.d.mts +0 -1
- package/dist/vite/normalizeModulePath.mjs +0 -13
- package/dist/vite/prismaPlugin.d.mts +0 -4
- package/dist/vite/prismaPlugin.mjs +0 -43
- package/dist/vite/reactConditionsResolverPlugin.d.mts +0 -16
- package/dist/vite/reactConditionsResolverPlugin.mjs +0 -179
- package/dist/vite/redwoodPlugin.d.mts +0 -12
- package/dist/vite/redwoodPlugin.mjs +0 -105
- package/dist/vite/ssrBridgePlugin.d.mts +0 -7
- package/dist/vite/ssrBridgePlugin.mjs +0 -124
- package/dist/vite/transformClientComponents.d.mts +0 -12
- package/dist/vite/transformClientComponents.mjs +0 -116
- package/dist/vite/transformClientComponents.test.d.mts +0 -1
- package/dist/vite/transformClientComponents.test.mjs +0 -264
- package/dist/vite/transformJsxScriptTagsPlugin.d.mts +0 -8
- package/dist/vite/transformJsxScriptTagsPlugin.mjs +0 -315
- package/dist/vite/transformJsxScriptTagsPlugin.test.d.mts +0 -1
- package/dist/vite/transformJsxScriptTagsPlugin.test.mjs +0 -334
- package/dist/vite/transformServerFunctions.d.mts +0 -16
- package/dist/vite/transformServerFunctions.mjs +0 -296
- package/dist/vite/transformServerFunctions.test.d.mts +0 -1
- package/dist/vite/transformServerFunctions.test.mjs +0 -124
- package/dist/vite/useClientLookupPlugin.d.mts +0 -5
- package/dist/vite/useClientLookupPlugin.mjs +0 -15
- package/dist/vite/useServerLookupPlugin.d.mts +0 -5
- package/dist/vite/useServerLookupPlugin.mjs +0 -15
- package/dist/vite/useServerPlugin.d.mts +0 -1
- package/dist/vite/useServerPlugin.mjs +0 -1
- package/dist/vite/virtualPlugin.d.mts +0 -2
- package/dist/vite/virtualPlugin.mjs +0 -18
- package/dist/vite/vitePreamblePlugin.d.mts +0 -1
- package/dist/vite/vitePreamblePlugin.mjs +0 -11
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
import { join } from "path";
|
|
2
|
-
import { setTimeout } from "node:timers/promises";
|
|
3
|
-
import { pathExists } from "fs-extra";
|
|
4
|
-
import { mkdirp } from "fs-extra";
|
|
5
|
-
import * as fs from "fs/promises";
|
|
6
|
-
import { copy } from "fs-extra";
|
|
7
|
-
import { relative } from "path";
|
|
8
|
-
import ignore from "ignore";
|
|
9
|
-
import { log } from "./constants.mjs";
|
|
10
|
-
import { deleteWorker, listD1Databases, deleteD1Database } from "./release.mjs";
|
|
11
|
-
import { isRunningInCI } from "./utils.mjs";
|
|
12
|
-
import { capturer } from "./artifacts.mjs";
|
|
13
|
-
import { state } from "./state.mjs";
|
|
14
|
-
/**
|
|
15
|
-
* Cleans up any resources used during testing
|
|
16
|
-
*/
|
|
17
|
-
export async function cleanupResources(resources, options) {
|
|
18
|
-
log("Cleaning up resources");
|
|
19
|
-
const inCIMode = isRunningInCI(options.ci);
|
|
20
|
-
// Stop dev server if it was started
|
|
21
|
-
if (resources.stopDev) {
|
|
22
|
-
console.log("Stopping development server...");
|
|
23
|
-
try {
|
|
24
|
-
// Set a timeout for the stopDev function
|
|
25
|
-
const stopTimeout = 10000; // 10 seconds
|
|
26
|
-
await Promise.race([
|
|
27
|
-
resources.stopDev(),
|
|
28
|
-
(async () => {
|
|
29
|
-
await setTimeout(stopTimeout);
|
|
30
|
-
log("Timed out waiting for dev server to stop, continuing cleanup");
|
|
31
|
-
console.log("⚠️ Timed out waiting for development server to stop");
|
|
32
|
-
// Record this issue
|
|
33
|
-
state.failures.push({
|
|
34
|
-
step: "Development Server Shutdown",
|
|
35
|
-
error: "Timed out waiting for development server to stop after 10 seconds",
|
|
36
|
-
});
|
|
37
|
-
// If the dev server didn't stop in time, we'll continue with cleanup
|
|
38
|
-
return null;
|
|
39
|
-
})(),
|
|
40
|
-
]);
|
|
41
|
-
}
|
|
42
|
-
catch (error) {
|
|
43
|
-
log("Error while stopping development server: %O", error);
|
|
44
|
-
console.error(`Error while stopping development server: ${error instanceof Error ? error.message : String(error)}`);
|
|
45
|
-
// Record this issue
|
|
46
|
-
state.failures.push({
|
|
47
|
-
step: "Development Server Shutdown",
|
|
48
|
-
error: error instanceof Error ? error.message : String(error),
|
|
49
|
-
details: error instanceof Error && error.stack ? error.stack : undefined,
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
// Clean up resources only if release tests have run
|
|
54
|
-
if (resources.workerName && state.releaseTestsRan) {
|
|
55
|
-
// First, clean up any D1 databases associated with this worker
|
|
56
|
-
try {
|
|
57
|
-
log(`Finding D1 databases associated with worker ${resources.workerName}`);
|
|
58
|
-
console.log(`🔍 Looking for D1 databases associated with worker ${resources.workerName}...`);
|
|
59
|
-
const databases = await listD1Databases(resources.targetDir);
|
|
60
|
-
// Look for databases that contain the unique resource key
|
|
61
|
-
const resourceUniqueKey = resources.resourceUniqueKey;
|
|
62
|
-
const relatedDatabases = databases.filter((db) => db.name.includes(resourceUniqueKey));
|
|
63
|
-
log(`Found ${relatedDatabases.length} related D1 databases with unique key: ${resourceUniqueKey}`);
|
|
64
|
-
if (relatedDatabases.length > 0) {
|
|
65
|
-
console.log(`Found ${relatedDatabases.length} D1 database(s) to clean up`);
|
|
66
|
-
for (const db of relatedDatabases) {
|
|
67
|
-
try {
|
|
68
|
-
log(`Deleting D1 database: ${db.name}`);
|
|
69
|
-
await deleteD1Database(db.name, resources.targetDir || "", // Provide empty string as fallback
|
|
70
|
-
resourceUniqueKey);
|
|
71
|
-
}
|
|
72
|
-
catch (dbError) {
|
|
73
|
-
log("Error while deleting D1 database: %O", dbError);
|
|
74
|
-
console.error(`Error while deleting D1 database: ${dbError instanceof Error ? dbError.message : String(dbError)}`);
|
|
75
|
-
// Record this issue
|
|
76
|
-
state.failures.push({
|
|
77
|
-
step: `D1 Database Deletion: ${db.name}`,
|
|
78
|
-
error: dbError instanceof Error ? dbError.message : String(dbError),
|
|
79
|
-
details: dbError instanceof Error && dbError.stack
|
|
80
|
-
? dbError.stack
|
|
81
|
-
: undefined,
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
log("No related D1 databases found to clean up");
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
catch (error) {
|
|
91
|
-
log("Error finding D1 databases: %O", error);
|
|
92
|
-
console.error(`Error finding D1 databases: ${error instanceof Error ? error.message : String(error)}`);
|
|
93
|
-
// Record this issue
|
|
94
|
-
state.failures.push({
|
|
95
|
-
step: "D1 Database Lookup",
|
|
96
|
-
error: error instanceof Error ? error.message : String(error),
|
|
97
|
-
details: error instanceof Error && error.stack ? error.stack : undefined,
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
// Now delete the worker
|
|
101
|
-
console.log(`🧹 Cleaning up: Deleting worker ${resources.workerName}...`);
|
|
102
|
-
try {
|
|
103
|
-
await deleteWorker(resources.workerName, resources.targetDir || "", // Provide empty string as fallback
|
|
104
|
-
resources.resourceUniqueKey);
|
|
105
|
-
}
|
|
106
|
-
catch (error) {
|
|
107
|
-
log("Error while deleting worker: %O", error);
|
|
108
|
-
console.error(`Error while deleting worker: ${error instanceof Error ? error.message : String(error)}`);
|
|
109
|
-
// Record this issue
|
|
110
|
-
state.failures.push({
|
|
111
|
-
step: `Worker Deletion: ${resources.workerName}`,
|
|
112
|
-
error: error instanceof Error ? error.message : String(error),
|
|
113
|
-
details: error instanceof Error && error.stack ? error.stack : undefined,
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
else if (resources.workerName && !state.releaseTestsRan) {
|
|
118
|
-
log("Skipping worker and D1 database cleanup because release tests did not run");
|
|
119
|
-
console.log("⏭️ Skipping worker and D1 database cleanup (release tests did not run)");
|
|
120
|
-
}
|
|
121
|
-
else {
|
|
122
|
-
log("No worker name provided for cleanup");
|
|
123
|
-
}
|
|
124
|
-
// Always copy test directory to artifact directory if targetDir exists
|
|
125
|
-
if (resources.targetDir && options.artifactDir && options.copyProject) {
|
|
126
|
-
try {
|
|
127
|
-
// Use the standardized project directory
|
|
128
|
-
const projectDir = join(options.artifactDir, "project");
|
|
129
|
-
// Ensure directory exists
|
|
130
|
-
await mkdirp(projectDir);
|
|
131
|
-
// Use a simple project directory name without timestamp
|
|
132
|
-
const testResult = state.exitCode === 0 ? "passed" : "failed";
|
|
133
|
-
const artifactTargetDir = projectDir;
|
|
134
|
-
log("Copying test directory to artifacts: %s → %s", resources.targetDir, artifactTargetDir);
|
|
135
|
-
console.log(`📦 Copying test directory to artifacts: ${artifactTargetDir}`);
|
|
136
|
-
// Remove existing project directory if it exists
|
|
137
|
-
if (await pathExists(artifactTargetDir)) {
|
|
138
|
-
await fs.rm(artifactTargetDir, { recursive: true, force: true });
|
|
139
|
-
}
|
|
140
|
-
// Create gitignore filter for copying to artifacts
|
|
141
|
-
let ig = ignore();
|
|
142
|
-
const gitignorePath = join(resources.targetDir, ".gitignore");
|
|
143
|
-
if (await pathExists(gitignorePath)) {
|
|
144
|
-
log("Found .gitignore file at %s", gitignorePath);
|
|
145
|
-
const gitignoreContent = await fs.readFile(gitignorePath, "utf-8");
|
|
146
|
-
ig = ig.add(gitignoreContent);
|
|
147
|
-
}
|
|
148
|
-
else {
|
|
149
|
-
log("No .gitignore found, using default ignore patterns");
|
|
150
|
-
// Add default ignores if no .gitignore exists
|
|
151
|
-
ig = ig.add([
|
|
152
|
-
"node_modules",
|
|
153
|
-
".git",
|
|
154
|
-
"dist",
|
|
155
|
-
"build",
|
|
156
|
-
".DS_Store",
|
|
157
|
-
"coverage",
|
|
158
|
-
".cache",
|
|
159
|
-
".wrangler",
|
|
160
|
-
".env",
|
|
161
|
-
].join("\n"));
|
|
162
|
-
}
|
|
163
|
-
// Copy project directory respecting the .gitignore
|
|
164
|
-
await copy(resources.targetDir, artifactTargetDir, {
|
|
165
|
-
filter: (src) => {
|
|
166
|
-
// Get path relative to project directory
|
|
167
|
-
const relativePath = relative(resources.targetDir, src);
|
|
168
|
-
if (!relativePath)
|
|
169
|
-
return true; // Include the root directory
|
|
170
|
-
// Check against ignore patterns
|
|
171
|
-
const result = !ig.ignores(relativePath);
|
|
172
|
-
return result;
|
|
173
|
-
},
|
|
174
|
-
});
|
|
175
|
-
log("Project directory copied successfully");
|
|
176
|
-
console.log(`✅ Test directory copied to artifacts: ${artifactTargetDir}`);
|
|
177
|
-
}
|
|
178
|
-
catch (error) {
|
|
179
|
-
log("Error copying test directory to artifacts: %O", error);
|
|
180
|
-
console.error(`Error copying test directory to artifacts: ${error instanceof Error ? error.message : String(error)}`);
|
|
181
|
-
// Record this issue
|
|
182
|
-
state.failures.push({
|
|
183
|
-
step: "Artifact Copy",
|
|
184
|
-
error: error instanceof Error ? error.message : String(error),
|
|
185
|
-
details: error instanceof Error && error.stack ? error.stack : undefined,
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
// Clean up temporary directory only if keep flag is false and not in CI mode
|
|
190
|
-
if (resources.tempDirCleanup && !options.keep && !inCIMode) {
|
|
191
|
-
log("Cleaning up temporary directory");
|
|
192
|
-
try {
|
|
193
|
-
await resources.tempDirCleanup();
|
|
194
|
-
log("Temporary directory cleaned up");
|
|
195
|
-
}
|
|
196
|
-
catch (error) {
|
|
197
|
-
log("Error while cleaning up temporary directory: %O", error);
|
|
198
|
-
console.error(`Error while cleaning up temporary directory: ${error instanceof Error ? error.message : String(error)}`);
|
|
199
|
-
// Record this issue
|
|
200
|
-
state.failures.push({
|
|
201
|
-
step: "Temporary Directory Cleanup",
|
|
202
|
-
error: error instanceof Error ? error.message : String(error),
|
|
203
|
-
details: error instanceof Error && error.stack ? error.stack : undefined,
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
else if (resources.tempDirCleanup && resources.targetDir) {
|
|
208
|
-
console.log(`📂 Keeping temporary directory for inspection: ${resources.targetDir}`);
|
|
209
|
-
}
|
|
210
|
-
log("Resource cleanup completed");
|
|
211
|
-
// At the end of cleanup, stop log capturing
|
|
212
|
-
capturer.stop();
|
|
213
|
-
log("Log capturing stopped");
|
|
214
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Creates the smoke test components in the target project directory
|
|
3
|
-
*/
|
|
4
|
-
export declare function createSmokeTestComponents(targetDir: string, skipClient?: boolean): Promise<void>;
|
|
5
|
-
/**
|
|
6
|
-
* Modifies the worker.tsx and wrangler.jsonc files to add realtime support
|
|
7
|
-
*/
|
|
8
|
-
export declare function modifyAppForRealtime(targetDir: string): Promise<void>;
|
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
import { join } from "path";
|
|
2
|
-
import * as fs from "fs/promises";
|
|
3
|
-
import { log } from "./constants.mjs";
|
|
4
|
-
import { getSmokeTestFunctionsTemplate } from "./templates/smokeTestFunctions.template";
|
|
5
|
-
import { getSmokeTestTemplate } from "./templates/SmokeTest.template";
|
|
6
|
-
import { getSmokeTestClientTemplate } from "./templates/SmokeTestClient.template";
|
|
7
|
-
import MagicString from "magic-string";
|
|
8
|
-
import { parse as parseJsonc } from "jsonc-parser";
|
|
9
|
-
/**
|
|
10
|
-
* Creates the smoke test components in the target project directory
|
|
11
|
-
*/
|
|
12
|
-
export async function createSmokeTestComponents(targetDir, skipClient = false) {
|
|
13
|
-
console.log("Creating smoke test components in project...");
|
|
14
|
-
// Create directories if they don't exist
|
|
15
|
-
const componentsDir = join(targetDir, "src", "app", "components");
|
|
16
|
-
log("Creating components directory: %s", componentsDir);
|
|
17
|
-
await fs.mkdir(componentsDir, { recursive: true });
|
|
18
|
-
// Create __smokeTestFunctions.ts
|
|
19
|
-
const smokeTestFunctionsPath = join(componentsDir, "__smokeTestFunctions.ts");
|
|
20
|
-
log("Creating __smokeTestFunctions.ts at: %s", smokeTestFunctionsPath);
|
|
21
|
-
const smokeTestFunctionsContent = getSmokeTestFunctionsTemplate();
|
|
22
|
-
// Create SmokeTest.tsx with conditional client component import
|
|
23
|
-
const smokeTestPath = join(componentsDir, "__SmokeTest.tsx");
|
|
24
|
-
log("Creating __SmokeTest.tsx at: %s", smokeTestPath);
|
|
25
|
-
const smokeTestContent = getSmokeTestTemplate(skipClient);
|
|
26
|
-
// Write the server files
|
|
27
|
-
log("Writing SmokeTestFunctions file");
|
|
28
|
-
await fs.writeFile(smokeTestFunctionsPath, smokeTestFunctionsContent);
|
|
29
|
-
log("Writing SmokeTest component file");
|
|
30
|
-
await fs.writeFile(smokeTestPath, smokeTestContent);
|
|
31
|
-
// Only create client component if not skipping client-side tests
|
|
32
|
-
if (!skipClient) {
|
|
33
|
-
// Create SmokeTestClient.tsx
|
|
34
|
-
const smokeTestClientPath = join(componentsDir, "__SmokeTestClient.tsx");
|
|
35
|
-
log("Creating __SmokeTestClient.tsx at: %s", smokeTestClientPath);
|
|
36
|
-
const smokeTestClientContent = getSmokeTestClientTemplate();
|
|
37
|
-
log("Writing SmokeTestClient component file");
|
|
38
|
-
await fs.writeFile(smokeTestClientPath, smokeTestClientContent);
|
|
39
|
-
log("Created client-side smoke test component");
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
log("Skipping client-side smoke test component creation");
|
|
43
|
-
}
|
|
44
|
-
// Modify worker.tsx and wrangler.jsonc for realtime support
|
|
45
|
-
await modifyAppForRealtime(targetDir);
|
|
46
|
-
log("Smoke test components created successfully");
|
|
47
|
-
console.log("Created smoke test components:");
|
|
48
|
-
console.log(`- ${smokeTestFunctionsPath}`);
|
|
49
|
-
console.log(`- ${smokeTestPath}`);
|
|
50
|
-
if (!skipClient) {
|
|
51
|
-
console.log(`- ${join(componentsDir, "__SmokeTestClient.tsx")}`);
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
console.log("- Client component skipped (--skip-client was specified)");
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Modifies the worker.tsx and wrangler.jsonc files to add realtime support
|
|
59
|
-
*/
|
|
60
|
-
export async function modifyAppForRealtime(targetDir) {
|
|
61
|
-
log("Modifying worker.tsx and wrangler.jsonc for realtime support");
|
|
62
|
-
// Modify worker.tsx
|
|
63
|
-
const workerPath = join(targetDir, "src", "worker.tsx");
|
|
64
|
-
if (await fs
|
|
65
|
-
.access(workerPath)
|
|
66
|
-
.then(() => true)
|
|
67
|
-
.catch(() => false)) {
|
|
68
|
-
log("Found worker.tsx, checking for realtime code");
|
|
69
|
-
const workerContent = await fs.readFile(workerPath, "utf-8");
|
|
70
|
-
// Check if the realtime export line already exists
|
|
71
|
-
const hasRealtimeExport = workerContent.includes('export { RealtimeDurableObject } from "rwsdk/realtime/durableObject"');
|
|
72
|
-
const hasRealtimeRoute = workerContent.includes("realtimeRoute(");
|
|
73
|
-
const hasEnvImport = workerContent.includes('import { env } from "cloudflare:workers"');
|
|
74
|
-
if (!hasRealtimeExport || !hasRealtimeRoute || !hasEnvImport) {
|
|
75
|
-
log("Need to modify worker.tsx for realtime support");
|
|
76
|
-
const s = new MagicString(workerContent);
|
|
77
|
-
// Add the export line if it doesn't exist
|
|
78
|
-
if (!hasRealtimeExport) {
|
|
79
|
-
const importRegex = /import.*?from.*?;\n/g;
|
|
80
|
-
let lastImportMatch;
|
|
81
|
-
let lastImportPosition = 0;
|
|
82
|
-
// Find the position after the last import statement
|
|
83
|
-
while ((lastImportMatch = importRegex.exec(workerContent)) !== null) {
|
|
84
|
-
lastImportPosition =
|
|
85
|
-
lastImportMatch.index + lastImportMatch[0].length;
|
|
86
|
-
}
|
|
87
|
-
if (lastImportPosition > 0) {
|
|
88
|
-
s.appendRight(lastImportPosition, 'export { RealtimeDurableObject } from "rwsdk/realtime/durableObject";\n');
|
|
89
|
-
log("Added RealtimeDurableObject export");
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
// Add the env import if it doesn't exist
|
|
93
|
-
if (!hasEnvImport) {
|
|
94
|
-
const importRegex = /import.*?from.*?;\n/g;
|
|
95
|
-
let firstImportMatch = importRegex.exec(workerContent);
|
|
96
|
-
if (firstImportMatch) {
|
|
97
|
-
s.appendLeft(firstImportMatch.index, 'import { env } from "cloudflare:workers";\n');
|
|
98
|
-
log("Added env import from cloudflare:workers");
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
// Add the realtimeRoute line if it doesn't exist
|
|
102
|
-
if (!hasRealtimeRoute) {
|
|
103
|
-
const defineAppMatch = workerContent.match(/export default defineApp\(\[/);
|
|
104
|
-
if (defineAppMatch && defineAppMatch.index !== undefined) {
|
|
105
|
-
const insertPosition = defineAppMatch.index + defineAppMatch[0].length;
|
|
106
|
-
s.appendRight(insertPosition, "\n realtimeRoute(() => env.REALTIME_DURABLE_OBJECT),");
|
|
107
|
-
log("Added realtimeRoute to defineApp");
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
// Import realtimeRoute if it's not already imported
|
|
111
|
-
if (!workerContent.includes("realtimeRoute")) {
|
|
112
|
-
// First check if we already have the import from rwsdk/realtime/worker
|
|
113
|
-
const realtimeImportMatch = workerContent.match(/import.*?from "rwsdk\/realtime\/worker";/);
|
|
114
|
-
if (realtimeImportMatch) {
|
|
115
|
-
// If we have the import but not the specific function, add it
|
|
116
|
-
if (!realtimeImportMatch[0].includes("realtimeRoute")) {
|
|
117
|
-
s.replace(realtimeImportMatch[0], realtimeImportMatch[0].replace(/import (.*?) from "rwsdk\/realtime\/worker";/, (match, imports) => {
|
|
118
|
-
if (imports.includes("{") && imports.includes("}")) {
|
|
119
|
-
// It's a named import
|
|
120
|
-
return imports.includes("realtimeRoute")
|
|
121
|
-
? match
|
|
122
|
-
: match.replace(/\{ (.*?) \}/, `{ realtimeRoute, $1 }`);
|
|
123
|
-
}
|
|
124
|
-
else {
|
|
125
|
-
// It's a default import or something else
|
|
126
|
-
return `import { realtimeRoute } from "rwsdk/realtime/worker";${match}`;
|
|
127
|
-
}
|
|
128
|
-
}));
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
else {
|
|
132
|
-
// We don't have the rwsdk/realtime/worker import at all, add it
|
|
133
|
-
const importRegex = /import.*?from.*?;\n/g;
|
|
134
|
-
let lastImportMatch;
|
|
135
|
-
let lastImportPosition = 0;
|
|
136
|
-
// Find the position after the last import statement
|
|
137
|
-
while ((lastImportMatch = importRegex.exec(workerContent)) !== null) {
|
|
138
|
-
lastImportPosition =
|
|
139
|
-
lastImportMatch.index + lastImportMatch[0].length;
|
|
140
|
-
}
|
|
141
|
-
if (lastImportPosition > 0) {
|
|
142
|
-
s.appendRight(lastImportPosition, 'import { realtimeRoute } from "rwsdk/realtime/worker";\n');
|
|
143
|
-
log("Added realtimeRoute import from rwsdk/realtime/worker");
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
// Write the modified file
|
|
148
|
-
await fs.writeFile(workerPath, s.toString(), "utf-8");
|
|
149
|
-
log("Successfully modified worker.tsx");
|
|
150
|
-
}
|
|
151
|
-
else {
|
|
152
|
-
log("worker.tsx already has realtime support, no changes needed");
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
else {
|
|
156
|
-
log("worker.tsx not found, skipping modification");
|
|
157
|
-
}
|
|
158
|
-
// Modify wrangler.jsonc
|
|
159
|
-
const wranglerPath = join(targetDir, "wrangler.jsonc");
|
|
160
|
-
if (await fs
|
|
161
|
-
.access(wranglerPath)
|
|
162
|
-
.then(() => true)
|
|
163
|
-
.catch(() => false)) {
|
|
164
|
-
log("Found wrangler.jsonc, checking for realtime durable objects");
|
|
165
|
-
const wranglerContent = await fs.readFile(wranglerPath, "utf-8");
|
|
166
|
-
const wranglerConfig = parseJsonc(wranglerContent);
|
|
167
|
-
let modified = false;
|
|
168
|
-
// Check if REALTIME_DURABLE_OBJECT already exists in durable_objects bindings
|
|
169
|
-
const hasDurableObjectBinding = wranglerConfig.durable_objects?.bindings?.some((binding) => binding.name === "REALTIME_DURABLE_OBJECT");
|
|
170
|
-
// Check if RealtimeDurableObject is already in migrations
|
|
171
|
-
const hasMigration = wranglerConfig.migrations?.some((migration) => migration.new_sqlite_classes?.includes("RealtimeDurableObject"));
|
|
172
|
-
if (!hasDurableObjectBinding || !hasMigration) {
|
|
173
|
-
log("Need to modify wrangler.jsonc for realtime support");
|
|
174
|
-
// Create a deep copy of the config to make modifications
|
|
175
|
-
const newConfig = JSON.parse(JSON.stringify(wranglerConfig));
|
|
176
|
-
// Add durable objects binding if needed
|
|
177
|
-
if (!hasDurableObjectBinding) {
|
|
178
|
-
if (!newConfig.durable_objects) {
|
|
179
|
-
newConfig.durable_objects = {};
|
|
180
|
-
}
|
|
181
|
-
if (!newConfig.durable_objects.bindings) {
|
|
182
|
-
newConfig.durable_objects.bindings = [];
|
|
183
|
-
}
|
|
184
|
-
newConfig.durable_objects.bindings.push({
|
|
185
|
-
name: "REALTIME_DURABLE_OBJECT",
|
|
186
|
-
class_name: "RealtimeDurableObject",
|
|
187
|
-
});
|
|
188
|
-
modified = true;
|
|
189
|
-
log("Added REALTIME_DURABLE_OBJECT to durable_objects bindings");
|
|
190
|
-
}
|
|
191
|
-
// Add migration if needed
|
|
192
|
-
if (!hasMigration) {
|
|
193
|
-
if (!newConfig.migrations) {
|
|
194
|
-
newConfig.migrations = [
|
|
195
|
-
{
|
|
196
|
-
tag: "v1",
|
|
197
|
-
new_sqlite_classes: ["RealtimeDurableObject"],
|
|
198
|
-
},
|
|
199
|
-
];
|
|
200
|
-
modified = true;
|
|
201
|
-
log("Added new migrations with RealtimeDurableObject");
|
|
202
|
-
}
|
|
203
|
-
else if (newConfig.migrations.length > 0) {
|
|
204
|
-
// Add RealtimeDurableObject to the first migration's sqlite classes
|
|
205
|
-
const firstMigration = newConfig.migrations[0];
|
|
206
|
-
if (!firstMigration.new_sqlite_classes) {
|
|
207
|
-
firstMigration.new_sqlite_classes = ["RealtimeDurableObject"];
|
|
208
|
-
}
|
|
209
|
-
else if (!firstMigration.new_sqlite_classes.includes("RealtimeDurableObject")) {
|
|
210
|
-
firstMigration.new_sqlite_classes.push("RealtimeDurableObject");
|
|
211
|
-
}
|
|
212
|
-
modified = true;
|
|
213
|
-
log("Added RealtimeDurableObject to existing migration");
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
if (modified) {
|
|
217
|
-
// Write the modified config back to the file
|
|
218
|
-
await fs.writeFile(wranglerPath, JSON.stringify(newConfig, null, 2), "utf-8");
|
|
219
|
-
log("Successfully modified wrangler.jsonc");
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
else {
|
|
223
|
-
log("wrangler.jsonc already has realtime support, no changes needed");
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
else {
|
|
227
|
-
log("wrangler.jsonc not found, skipping modification");
|
|
228
|
-
}
|
|
229
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import debug from "debug";
|
|
2
|
-
// Configure debug logger
|
|
3
|
-
if (!process.env.DEBUG) {
|
|
4
|
-
debug.enable("rwsdk:smoke");
|
|
5
|
-
}
|
|
6
|
-
export const log = debug("rwsdk:smoke");
|
|
7
|
-
export const TIMEOUT = 30000; // 30 seconds timeout
|
|
8
|
-
export const RETRIES = 3;
|
|
9
|
-
// Known Cloudflare account ID - default to RedwoodJS account if we need one
|
|
10
|
-
export const REDWOODJS_ACCOUNT_ID = "1634a8e653b2ce7e0f7a23cca8cbd86a";
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Run the local development server and return the URL
|
|
3
|
-
*/
|
|
4
|
-
export declare function runDevServer(cwd?: string): Promise<{
|
|
5
|
-
url: string;
|
|
6
|
-
stopDev: () => Promise<void>;
|
|
7
|
-
}>;
|
|
8
|
-
/**
|
|
9
|
-
* Runs tests against the development server
|
|
10
|
-
*/
|
|
11
|
-
export declare function runDevTest(url: string, artifactDir: string, customPath?: string, browserPath?: string, headless?: boolean, bail?: boolean, skipClient?: boolean, realtime?: boolean, skipHmr?: boolean): Promise<void>;
|