@cypress/webpack-dev-server 5.5.0 → 5.6.1
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.
|
@@ -69,7 +69,7 @@ export declare function getAngularBuildOptions(buildOptions: BuildOptions, tsCon
|
|
|
69
69
|
namedChunks: boolean;
|
|
70
70
|
};
|
|
71
71
|
export declare function generateTsConfig(devServerConfig: AngularWebpackDevServerConfig, buildOptions: BuildOptions): Promise<string>;
|
|
72
|
-
export declare function getTempDir(projectName: string): Promise<string>;
|
|
72
|
+
export declare function getTempDir(projectName: string, projectRoot?: string): Promise<string>;
|
|
73
73
|
export declare function getAngularCliModules(projectRoot: string): Promise<{
|
|
74
74
|
generateBrowserWebpackConfigFromContext: any;
|
|
75
75
|
getCommonConfig: any;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.angularHandler = exports.toPosix = exports.getAngularJson = exports.getAngularCliModules = exports.getTempDir = exports.generateTsConfig = exports.getAngularBuildOptions = exports.getProjectConfig = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
const crypto_1 = require("crypto");
|
|
5
6
|
const fs = tslib_1.__importStar(require("fs-extra"));
|
|
6
7
|
const os_1 = require("os");
|
|
7
8
|
const path = tslib_1.__importStar(require("path"));
|
|
@@ -68,13 +69,16 @@ async function generateTsConfig(devServerConfig, buildOptions) {
|
|
|
68
69
|
},
|
|
69
70
|
include: includePaths,
|
|
70
71
|
}, null, 2);
|
|
71
|
-
const tsConfigPath = path.join(await getTempDir(path.basename(projectRoot)), 'tsconfig.json');
|
|
72
|
+
const tsConfigPath = path.join(await getTempDir(path.basename(projectRoot), projectRoot), 'tsconfig.json');
|
|
72
73
|
await fs.writeFile(tsConfigPath, tsConfigContent);
|
|
73
74
|
return tsConfigPath;
|
|
74
75
|
}
|
|
75
76
|
exports.generateTsConfig = generateTsConfig;
|
|
76
|
-
async function getTempDir(projectName) {
|
|
77
|
-
const
|
|
77
|
+
async function getTempDir(projectName, projectRoot) {
|
|
78
|
+
const uniqueName = projectRoot
|
|
79
|
+
? `${projectName}-${(0, crypto_1.createHash)('sha1').update(projectRoot).digest('hex').slice(0, 8)}`
|
|
80
|
+
: projectName;
|
|
81
|
+
const cypressTempDir = path.join((0, os_1.tmpdir)(), 'cypress-angular-ct', uniqueName);
|
|
78
82
|
await fs.ensureDir(cypressTempDir);
|
|
79
83
|
return cypressTempDir;
|
|
80
84
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cypress/webpack-dev-server",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.6.1",
|
|
4
4
|
"description": "Launches Webpack Dev Server for Component Testing",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"build": "tsc || echo 'built, with type errors'",
|
|
9
9
|
"check-ts": "tsc --noEmit",
|
|
10
10
|
"clean": "rimraf dist",
|
|
11
|
-
"cypress:open": "yarn cypress:run-cypress-in-cypress gulp open --project .",
|
|
12
|
-
"cypress:run": "yarn cypress:run-cypress-in-cypress node ../../scripts/cypress run --project . --browser chrome",
|
|
11
|
+
"cypress:open": "yarn cypress:run-cypress-in-cypress gulp open --project . --expose INTERNAL_E2E_TESTING_SELF_PARENT_PROJECT=true",
|
|
12
|
+
"cypress:run": "yarn cypress:run-cypress-in-cypress node ../../scripts/cypress run --project . --browser chrome --expose INTERNAL_E2E_TESTING_SELF_PARENT_PROJECT=true",
|
|
13
13
|
"cypress:run-cypress-in-cypress": "cross-env CYPRESS_INTERNAL_E2E_TESTING_SELF_PARENT_PROJECT=1 HTTP_PROXY_TARGET_FOR_ORIGIN_REQUESTS=http://localhost:4455 CYPRESS_REMOTE_DEBUGGING_PORT=6666 TZ=America/New_York",
|
|
14
14
|
"dev": "tsc --watch",
|
|
15
15
|
"lint": "eslint --ext .js,.ts,.json, .",
|