@nrwl/cypress 16.0.0-beta.0 → 16.0.0-beta.2
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/executors.json +4 -4
- package/generators.json +2 -64
- package/index.d.ts +1 -5
- package/index.js +2 -11
- package/index.js.map +1 -1
- package/package.json +7 -23
- package/plugins/cypress-preset.d.ts +1 -62
- package/plugins/cypress-preset.js +2 -50
- package/plugins/cypress-preset.js.map +1 -1
- package/README.md +0 -63
- package/migrations.json +0 -47
- package/src/executors/cypress/compat.d.ts +0 -2
- package/src/executors/cypress/compat.js +0 -6
- package/src/executors/cypress/compat.js.map +0 -1
- package/src/executors/cypress/cypress.impl.d.ts +0 -40
- package/src/executors/cypress/cypress.impl.js +0 -372
- package/src/executors/cypress/cypress.impl.js.map +0 -1
- package/src/executors/cypress/schema.json +0 -158
- package/src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint.d.ts +0 -4
- package/src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint.js +0 -104
- package/src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint.js.map +0 -1
- package/src/generators/convert-tslint-to-eslint/schema.json +0 -44
- package/src/generators/cypress-component-project/cypress-component-project.d.ts +0 -4
- package/src/generators/cypress-component-project/cypress-component-project.js +0 -127
- package/src/generators/cypress-component-project/cypress-component-project.js.map +0 -1
- package/src/generators/cypress-component-project/files/cypress/fixtures/example.json +0 -5
- package/src/generators/cypress-component-project/files/cypress/support/commands.ts__ext__ +0 -34
- package/src/generators/cypress-component-project/files/cypress/support/component-index.html +0 -13
- package/src/generators/cypress-component-project/files/cypress/support/component.ts__ext__ +0 -17
- package/src/generators/cypress-component-project/files/cypress/tsconfig.cy.json +0 -17
- package/src/generators/cypress-component-project/files/cypress.config.ts__ext__ +0 -3
- package/src/generators/cypress-component-project/schema.d.ts +0 -5
- package/src/generators/cypress-component-project/schema.json +0 -33
- package/src/generators/cypress-e2e-configuration/cypress-e2e-configuration.d.ts +0 -18
- package/src/generators/cypress-e2e-configuration/cypress-e2e-configuration.js +0 -133
- package/src/generators/cypress-e2e-configuration/cypress-e2e-configuration.js.map +0 -1
- package/src/generators/cypress-e2e-configuration/files/v10/__dir__/e2e/app.cy.ts__tmpl__ +0 -13
- package/src/generators/cypress-e2e-configuration/files/v10/__dir__/fixtures/example.json__tmpl__ +0 -4
- package/src/generators/cypress-e2e-configuration/files/v10/__dir__/support/app.po.ts__tmpl__ +0 -1
- package/src/generators/cypress-e2e-configuration/files/v10/__dir__/support/commands.ts__tmpl__ +0 -33
- package/src/generators/cypress-e2e-configuration/files/v10/__dir__/support/e2e.ts__tmpl__ +0 -17
- package/src/generators/cypress-e2e-configuration/files/v10/cypress.config.ts__tmpl__ +0 -9
- package/src/generators/cypress-e2e-configuration/files/v10/tsconfig__tsFileExt__ +0 -10
- package/src/generators/cypress-e2e-configuration/files/v9/__dir__/fixtures/example.json__tmpl__ +0 -4
- package/src/generators/cypress-e2e-configuration/files/v9/__dir__/integration/app.spec.ts__tmpl__ +0 -13
- package/src/generators/cypress-e2e-configuration/files/v9/__dir__/plugins/index.js +0 -22
- package/src/generators/cypress-e2e-configuration/files/v9/__dir__/support/app.po.ts__tmpl__ +0 -1
- package/src/generators/cypress-e2e-configuration/files/v9/__dir__/support/commands.ts__tmpl__ +0 -33
- package/src/generators/cypress-e2e-configuration/files/v9/__dir__/support/index.ts__tmpl__ +0 -17
- package/src/generators/cypress-e2e-configuration/files/v9/cypress.json +0 -12
- package/src/generators/cypress-e2e-configuration/files/v9/tsconfig__tsFileExt__ +0 -10
- package/src/generators/cypress-e2e-configuration/schema.json +0 -91
- package/src/generators/cypress-project/cypress-project.d.ts +0 -13
- package/src/generators/cypress-project/cypress-project.js +0 -172
- package/src/generators/cypress-project/cypress-project.js.map +0 -1
- package/src/generators/cypress-project/files/v10-and-after/cypress.config.ts__tmpl__ +0 -10
- package/src/generators/cypress-project/files/v10-and-after/src/e2e/app.cy.ts__tmpl__ +0 -13
- package/src/generators/cypress-project/files/v10-and-after/src/fixtures/example.json__tmpl__ +0 -4
- package/src/generators/cypress-project/files/v10-and-after/src/support/app.po.ts__tmpl__ +0 -1
- package/src/generators/cypress-project/files/v10-and-after/src/support/commands.ts__tmpl__ +0 -33
- package/src/generators/cypress-project/files/v10-and-after/src/support/e2e.ts__tmpl__ +0 -17
- package/src/generators/cypress-project/files/v10-and-after/tsconfig.json +0 -10
- package/src/generators/cypress-project/files/v9-and-under/cypress.json +0 -12
- package/src/generators/cypress-project/files/v9-and-under/src/fixtures/example.json__tmpl__ +0 -4
- package/src/generators/cypress-project/files/v9-and-under/src/integration/app.spec.ts__tmpl__ +0 -13
- package/src/generators/cypress-project/files/v9-and-under/src/plugins/index.js +0 -22
- package/src/generators/cypress-project/files/v9-and-under/src/support/app.po.ts__tmpl__ +0 -1
- package/src/generators/cypress-project/files/v9-and-under/src/support/commands.ts__tmpl__ +0 -33
- package/src/generators/cypress-project/files/v9-and-under/src/support/index.ts__tmpl__ +0 -17
- package/src/generators/cypress-project/files/v9-and-under/tsconfig.json +0 -10
- package/src/generators/cypress-project/schema.d.ts +0 -15
- package/src/generators/cypress-project/schema.json +0 -79
- package/src/generators/init/init.d.ts +0 -5
- package/src/generators/init/init.js +0 -47
- package/src/generators/init/init.js.map +0 -1
- package/src/generators/init/schema.d.ts +0 -5
- package/src/generators/init/schema.json +0 -16
- package/src/generators/migrate-to-cypress-11/conversion.util.d.ts +0 -34
- package/src/generators/migrate-to-cypress-11/conversion.util.js +0 -241
- package/src/generators/migrate-to-cypress-11/conversion.util.js.map +0 -1
- package/src/generators/migrate-to-cypress-11/migrate-to-cypress-11.d.ts +0 -3
- package/src/generators/migrate-to-cypress-11/migrate-to-cypress-11.js +0 -85
- package/src/generators/migrate-to-cypress-11/migrate-to-cypress-11.js.map +0 -1
- package/src/generators/migrate-to-cypress-11/schema.json +0 -15
- package/src/migrations/update-12-8-0/remove-typescript-plugin.d.ts +0 -2
- package/src/migrations/update-12-8-0/remove-typescript-plugin.js +0 -89
- package/src/migrations/update-12-8-0/remove-typescript-plugin.js.map +0 -1
- package/src/migrations/update-14-6-1/update-cypress-configs-presets.d.ts +0 -3
- package/src/migrations/update-14-6-1/update-cypress-configs-presets.js +0 -111
- package/src/migrations/update-14-6-1/update-cypress-configs-presets.js.map +0 -1
- package/src/migrations/update-14-7-0/update-cypress-version-if-10.d.ts +0 -3
- package/src/migrations/update-14-7-0/update-cypress-version-if-10.js +0 -33
- package/src/migrations/update-14-7-0/update-cypress-version-if-10.js.map +0 -1
- package/src/migrations/update-15-0-0/add-cypress-inputs.d.ts +0 -2
- package/src/migrations/update-15-0-0/add-cypress-inputs.js +0 -48
- package/src/migrations/update-15-0-0/add-cypress-inputs.js.map +0 -1
- package/src/migrations/update-15-0-0/update-cy-mount-usage.d.ts +0 -5
- package/src/migrations/update-15-0-0/update-cy-mount-usage.js +0 -124
- package/src/migrations/update-15-0-0/update-cy-mount-usage.js.map +0 -1
- package/src/migrations/update-15-1-0/cypress-11.d.ts +0 -6
- package/src/migrations/update-15-1-0/cypress-11.js +0 -118
- package/src/migrations/update-15-1-0/cypress-11.js.map +0 -1
- package/src/migrations/update-15-5-0/helpers.d.ts +0 -3
- package/src/migrations/update-15-5-0/helpers.js +0 -40
- package/src/migrations/update-15-5-0/helpers.js.map +0 -1
- package/src/migrations/update-15-5-0/update-to-cypress-12.d.ts +0 -24
- package/src/migrations/update-15-5-0/update-to-cypress-12.js +0 -183
- package/src/migrations/update-15-5-0/update-to-cypress-12.js.map +0 -1
- package/src/plugins/preprocessor-vite.d.ts +0 -32
- package/src/plugins/preprocessor-vite.js +0 -96
- package/src/plugins/preprocessor-vite.js.map +0 -1
- package/src/utils/add-linter.d.ts +0 -21
- package/src/utils/add-linter.js +0 -90
- package/src/utils/add-linter.js.map +0 -1
- package/src/utils/ct-helpers.d.ts +0 -16
- package/src/utils/ct-helpers.js +0 -86
- package/src/utils/ct-helpers.js.map +0 -1
- package/src/utils/cypress-version.d.ts +0 -5
- package/src/utils/cypress-version.js +0 -34
- package/src/utils/cypress-version.js.map +0 -1
- package/src/utils/find-target-options.d.ts +0 -16
- package/src/utils/find-target-options.js +0 -115
- package/src/utils/find-target-options.js.map +0 -1
- package/src/utils/project-name.d.ts +0 -3
- package/src/utils/project-name.js +0 -20
- package/src/utils/project-name.js.map +0 -1
- package/src/utils/testing.d.ts +0 -4
- package/src/utils/testing.js +0 -22
- package/src/utils/testing.js.map +0 -1
- package/src/utils/versions.d.ts +0 -9
- package/src/utils/versions.js +0 -13
- package/src/utils/versions.js.map +0 -1
package/executors.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"builders": {
|
|
3
3
|
"cypress": {
|
|
4
|
-
"implementation": "
|
|
5
|
-
"schema": "
|
|
4
|
+
"implementation": "@nx/cypress/src/executors/cypress/compat",
|
|
5
|
+
"schema": "@nx/cypress/src/executors/cypress/schema.json",
|
|
6
6
|
"description": "Run Cypress E2E tests."
|
|
7
7
|
}
|
|
8
8
|
},
|
|
9
9
|
"executors": {
|
|
10
10
|
"cypress": {
|
|
11
|
-
"implementation": "
|
|
12
|
-
"schema": "
|
|
11
|
+
"implementation": "@nx/cypress/src/executors/cypress/cypress.impl",
|
|
12
|
+
"schema": "@nx/cypress/src/executors/cypress/schema.json",
|
|
13
13
|
"description": "Run Cypress E2E tests."
|
|
14
14
|
}
|
|
15
15
|
}
|
package/generators.json
CHANGED
|
@@ -1,66 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
"schematics": {
|
|
5
|
-
"init": {
|
|
6
|
-
"factory": "./src/generators/init/init#cypressInitSchematic",
|
|
7
|
-
"schema": "./src/generators/init/schema.json",
|
|
8
|
-
"description": "Initialize the `@nrwl/cypress` plugin.",
|
|
9
|
-
"aliases": ["ng-add"],
|
|
10
|
-
"hidden": true
|
|
11
|
-
},
|
|
12
|
-
"cypress-project": {
|
|
13
|
-
"factory": "./src/generators/cypress-project/cypress-project#cypressProjectSchematic",
|
|
14
|
-
"schema": "./src/generators/cypress-project/schema.json",
|
|
15
|
-
"description": "Add a Cypress E2E Project."
|
|
16
|
-
},
|
|
17
|
-
"cypress-e2e-configuration": {
|
|
18
|
-
"aliases": ["e2e", "e2e-config"],
|
|
19
|
-
"factory": "./src/generators/cypress-e2e-configuration/cypress-e2e-configuration#compat",
|
|
20
|
-
"schema": "./src/generators/cypress-e2e-configuration/schema.json",
|
|
21
|
-
"description": "Add a Cypress E2E Configuration to an existing project."
|
|
22
|
-
},
|
|
23
|
-
"cypress-component-project": {
|
|
24
|
-
"factory": "./src/generators/cypress-component-project/cypress-component-project#cypressComponentProject",
|
|
25
|
-
"schema": "./src/generators/cypress-component-project/schema.json",
|
|
26
|
-
"description": "Set up Cypress Component Test for a project"
|
|
27
|
-
},
|
|
28
|
-
"migrate-to-cypress-11": {
|
|
29
|
-
"factory": "./src/generators/migrate-to-cypress-11/migrate-to-cypress-11#migrateCypressProject",
|
|
30
|
-
"schema": "./src/generators/migrate-to-cypress-11/schema.json",
|
|
31
|
-
"description": "Migrate existing Cypress e2e projects to Cypress v11"
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"generators": {
|
|
35
|
-
"init": {
|
|
36
|
-
"factory": "./src/generators/init/init#cypressInitGenerator",
|
|
37
|
-
"schema": "./src/generators/init/schema.json",
|
|
38
|
-
"description": "Initialize the `@nrwl/cypress` plugin.",
|
|
39
|
-
"aliases": ["ng-add"],
|
|
40
|
-
"hidden": true
|
|
41
|
-
},
|
|
42
|
-
"cypress-project": {
|
|
43
|
-
"factory": "./src/generators/cypress-project/cypress-project#cypressProjectGenerator",
|
|
44
|
-
"schema": "./src/generators/cypress-project/schema.json",
|
|
45
|
-
"description": "Add a Cypress E2E Project.",
|
|
46
|
-
"hidden": true
|
|
47
|
-
},
|
|
48
|
-
"cypress-e2e-configuration": {
|
|
49
|
-
"aliases": ["e2e", "e2e-config"],
|
|
50
|
-
"factory": "./src/generators/cypress-e2e-configuration/cypress-e2e-configuration",
|
|
51
|
-
"schema": "./src/generators/cypress-e2e-configuration/schema.json",
|
|
52
|
-
"description": "Add a Cypress E2E Configuration to an existing project."
|
|
53
|
-
},
|
|
54
|
-
"cypress-component-project": {
|
|
55
|
-
"factory": "./src/generators/cypress-component-project/cypress-component-project#cypressComponentProject",
|
|
56
|
-
"schema": "./src/generators/cypress-component-project/schema.json",
|
|
57
|
-
"description": "Set up Cypress Component Test for a project",
|
|
58
|
-
"hidden": true
|
|
59
|
-
},
|
|
60
|
-
"migrate-to-cypress-11": {
|
|
61
|
-
"factory": "./src/generators/migrate-to-cypress-11/migrate-to-cypress-11#migrateCypressProject",
|
|
62
|
-
"schema": "./src/generators/migrate-to-cypress-11/schema.json",
|
|
63
|
-
"description": "Migrate existing Cypress e2e projects to Cypress v11"
|
|
64
|
-
}
|
|
65
|
-
}
|
|
2
|
+
"extends": ["@nx/cypress"],
|
|
3
|
+
"schematics": {}
|
|
66
4
|
}
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export { cypressInitGenerator } from './src/generators/init/init';
|
|
3
|
-
export { conversionGenerator } from './src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint';
|
|
4
|
-
export { cypressComponentProject } from './src/generators/cypress-component-project/cypress-component-project';
|
|
5
|
-
export { migrateCypressProject } from './src/generators/migrate-to-cypress-11/migrate-to-cypress-11';
|
|
1
|
+
export * from '@nx/cypress';
|
package/index.js
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "cypressProjectGenerator", { enumerable: true, get: function () { return cypress_project_1.cypressProjectGenerator; } });
|
|
6
|
-
var init_1 = require("./src/generators/init/init");
|
|
7
|
-
Object.defineProperty(exports, "cypressInitGenerator", { enumerable: true, get: function () { return init_1.cypressInitGenerator; } });
|
|
8
|
-
var convert_tslint_to_eslint_1 = require("./src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint");
|
|
9
|
-
Object.defineProperty(exports, "conversionGenerator", { enumerable: true, get: function () { return convert_tslint_to_eslint_1.conversionGenerator; } });
|
|
10
|
-
var cypress_component_project_1 = require("./src/generators/cypress-component-project/cypress-component-project");
|
|
11
|
-
Object.defineProperty(exports, "cypressComponentProject", { enumerable: true, get: function () { return cypress_component_project_1.cypressComponentProject; } });
|
|
12
|
-
var migrate_to_cypress_11_1 = require("./src/generators/migrate-to-cypress-11/migrate-to-cypress-11");
|
|
13
|
-
Object.defineProperty(exports, "migrateCypressProject", { enumerable: true, get: function () { return migrate_to_cypress_11_1.migrateCypressProject; } });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("@nx/cypress"), exports);
|
|
14
5
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/cypress/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages-legacy/cypress/index.ts"],"names":[],"mappings":";;;AAAA,sDAA4B"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nrwl/cypress",
|
|
3
|
-
"version": "16.0.0-beta.
|
|
3
|
+
"version": "16.0.0-beta.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nx Plugin for Cypress contains executors and generators allowing your workspace to use the powerful Cypress integration testing capabilities.",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/nrwl/nx.git",
|
|
9
|
-
"directory": "packages/cypress"
|
|
9
|
+
"directory": "packages-legacy/cypress"
|
|
10
10
|
},
|
|
11
11
|
"keywords": [
|
|
12
12
|
"Monorepo",
|
|
@@ -29,31 +29,15 @@
|
|
|
29
29
|
"homepage": "https://nx.dev",
|
|
30
30
|
"schematics": "./generators.json",
|
|
31
31
|
"builders": "./executors.json",
|
|
32
|
-
"ng-update": {
|
|
33
|
-
"requirements": {},
|
|
34
|
-
"migrations": "./migrations.json"
|
|
35
|
-
},
|
|
36
32
|
"dependencies": {
|
|
37
|
-
"@
|
|
38
|
-
"@nrwl/js": "16.0.0-beta.0",
|
|
39
|
-
"@nrwl/linter": "16.0.0-beta.0",
|
|
40
|
-
"@nrwl/workspace": "16.0.0-beta.0",
|
|
41
|
-
"@phenomnomnominal/tsquery": "~5.0.1",
|
|
42
|
-
"detect-port": "^1.5.1",
|
|
43
|
-
"dotenv": "~10.0.0",
|
|
44
|
-
"semver": "7.3.4"
|
|
45
|
-
},
|
|
46
|
-
"peerDependencies": {
|
|
47
|
-
"cypress": ">= 3 < 13"
|
|
48
|
-
},
|
|
49
|
-
"peerDependenciesMeta": {
|
|
50
|
-
"cypress": {
|
|
51
|
-
"optional": true
|
|
52
|
-
}
|
|
33
|
+
"@nx/cypress": "16.0.0-beta.2"
|
|
53
34
|
},
|
|
54
35
|
"publishConfig": {
|
|
55
36
|
"access": "public"
|
|
56
37
|
},
|
|
38
|
+
"nx-migrations": {
|
|
39
|
+
"migrations": "@nx/cypress/migrations.json"
|
|
40
|
+
},
|
|
57
41
|
"types": "./index.d.ts",
|
|
58
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "0d7dbbc5254390f53a28d94de536da916ed06a70"
|
|
59
43
|
}
|
|
@@ -1,62 +1 @@
|
|
|
1
|
-
|
|
2
|
-
videosFolder: string;
|
|
3
|
-
screenshotsFolder: string;
|
|
4
|
-
video: boolean;
|
|
5
|
-
chromeWebSecurity: boolean;
|
|
6
|
-
}
|
|
7
|
-
export interface NxComponentTestingOptions {
|
|
8
|
-
/**
|
|
9
|
-
* the component testing target name.
|
|
10
|
-
* this is only when customized away from the default value of `component-test`
|
|
11
|
-
* @example 'component-test'
|
|
12
|
-
*/
|
|
13
|
-
ctTargetName?: string;
|
|
14
|
-
bundler?: 'vite' | 'webpack';
|
|
15
|
-
}
|
|
16
|
-
export declare function nxBaseCypressPreset(pathToConfig: string): BaseCypressPreset;
|
|
17
|
-
/**
|
|
18
|
-
* nx E2E Preset for Cypress
|
|
19
|
-
* @description
|
|
20
|
-
* this preset contains the base configuration
|
|
21
|
-
* for your e2e tests that nx recommends.
|
|
22
|
-
* you can easily extend this within your cypress config via spreading the preset
|
|
23
|
-
* @example
|
|
24
|
-
* export default defineConfig({
|
|
25
|
-
* e2e: {
|
|
26
|
-
* ...nxE2EPreset(__dirname)
|
|
27
|
-
* // add your own config here
|
|
28
|
-
* }
|
|
29
|
-
* })
|
|
30
|
-
*
|
|
31
|
-
* @param pathToConfig will be used to construct the output paths for videos and screenshots
|
|
32
|
-
*/
|
|
33
|
-
export declare function nxE2EPreset(pathToConfig: string, options?: NxCypressE2EPresetOptions): {
|
|
34
|
-
fileServerFolder: string;
|
|
35
|
-
supportFile: string;
|
|
36
|
-
specPattern: string;
|
|
37
|
-
fixturesFolder: string;
|
|
38
|
-
videosFolder: string;
|
|
39
|
-
screenshotsFolder: string;
|
|
40
|
-
video: boolean;
|
|
41
|
-
chromeWebSecurity: boolean;
|
|
42
|
-
} | {
|
|
43
|
-
setupNodeEvents(on: any): void;
|
|
44
|
-
fileServerFolder: string;
|
|
45
|
-
supportFile: string;
|
|
46
|
-
specPattern: string;
|
|
47
|
-
fixturesFolder: string;
|
|
48
|
-
videosFolder: string;
|
|
49
|
-
screenshotsFolder: string;
|
|
50
|
-
video: boolean;
|
|
51
|
-
chromeWebSecurity: boolean;
|
|
52
|
-
};
|
|
53
|
-
export type NxCypressE2EPresetOptions = {
|
|
54
|
-
bundler?: string;
|
|
55
|
-
/**
|
|
56
|
-
* The directory from the project root, where the cypress files (support, fixtures, specs) are located.
|
|
57
|
-
* i.e. 'cypress/' or 'src'
|
|
58
|
-
* default is 'src'
|
|
59
|
-
**/
|
|
60
|
-
cypressDir?: string;
|
|
61
|
-
};
|
|
62
|
-
export {};
|
|
1
|
+
export * from '@nx/cypress/plugins/cypress-preset';
|
|
@@ -1,53 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const path_1 = require("path");
|
|
6
|
-
const fs_1 = require("fs");
|
|
7
|
-
const preprocessor_vite_1 = require("../src/plugins/preprocessor-vite");
|
|
8
|
-
function nxBaseCypressPreset(pathToConfig) {
|
|
9
|
-
// prevent from placing path outside the root of the workspace
|
|
10
|
-
// if they pass in a file or directory
|
|
11
|
-
const normalizedPath = (0, fs_1.lstatSync)(pathToConfig).isDirectory()
|
|
12
|
-
? pathToConfig
|
|
13
|
-
: (0, path_1.dirname)(pathToConfig);
|
|
14
|
-
const projectPath = (0, path_1.relative)(devkit_1.workspaceRoot, normalizedPath);
|
|
15
|
-
const offset = (0, path_1.relative)(normalizedPath, devkit_1.workspaceRoot);
|
|
16
|
-
const videosFolder = (0, path_1.join)(offset, 'dist', 'cypress', projectPath, 'videos');
|
|
17
|
-
const screenshotsFolder = (0, path_1.join)(offset, 'dist', 'cypress', projectPath, 'screenshots');
|
|
18
|
-
return {
|
|
19
|
-
videosFolder,
|
|
20
|
-
screenshotsFolder,
|
|
21
|
-
video: true,
|
|
22
|
-
chromeWebSecurity: false,
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
exports.nxBaseCypressPreset = nxBaseCypressPreset;
|
|
26
|
-
/**
|
|
27
|
-
* nx E2E Preset for Cypress
|
|
28
|
-
* @description
|
|
29
|
-
* this preset contains the base configuration
|
|
30
|
-
* for your e2e tests that nx recommends.
|
|
31
|
-
* you can easily extend this within your cypress config via spreading the preset
|
|
32
|
-
* @example
|
|
33
|
-
* export default defineConfig({
|
|
34
|
-
* e2e: {
|
|
35
|
-
* ...nxE2EPreset(__dirname)
|
|
36
|
-
* // add your own config here
|
|
37
|
-
* }
|
|
38
|
-
* })
|
|
39
|
-
*
|
|
40
|
-
* @param pathToConfig will be used to construct the output paths for videos and screenshots
|
|
41
|
-
*/
|
|
42
|
-
function nxE2EPreset(pathToConfig, options) {
|
|
43
|
-
const basePath = (options === null || options === void 0 ? void 0 : options.cypressDir) || 'src';
|
|
44
|
-
const baseConfig = Object.assign(Object.assign({}, nxBaseCypressPreset(pathToConfig)), { fileServerFolder: '.', supportFile: `${basePath}/support/e2e.ts`, specPattern: `${basePath}/**/*.cy.{js,jsx,ts,tsx}`, fixturesFolder: `${basePath}/fixtures` });
|
|
45
|
-
if ((options === null || options === void 0 ? void 0 : options.bundler) === 'vite') {
|
|
46
|
-
return Object.assign(Object.assign({}, baseConfig), { setupNodeEvents(on) {
|
|
47
|
-
on('file:preprocessor', (0, preprocessor_vite_1.default)());
|
|
48
|
-
} });
|
|
49
|
-
}
|
|
50
|
-
return baseConfig;
|
|
51
|
-
}
|
|
52
|
-
exports.nxE2EPreset = nxE2EPreset;
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("@nx/cypress/plugins/cypress-preset"), exports);
|
|
53
5
|
//# sourceMappingURL=cypress-preset.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cypress-preset.js","sourceRoot":"","sources":["../../../../packages/cypress/plugins/cypress-preset.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"cypress-preset.js","sourceRoot":"","sources":["../../../../packages-legacy/cypress/plugins/cypress-preset.ts"],"names":[],"mappings":";;;AAAA,6EAAmD"}
|
package/README.md
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
<p style="text-align: center;"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx.png" width="600" alt="Nx - Smart, Fast and Extensible Build System"></p>
|
|
2
|
-
|
|
3
|
-
<div style="text-align: center;">
|
|
4
|
-
|
|
5
|
-
[](https://circleci.com/gh/nrwl/nx)
|
|
6
|
-
[]()
|
|
7
|
-
[](https://www.npmjs.com/@nrwl/workspace)
|
|
8
|
-
[]()
|
|
9
|
-
[](http://commitizen.github.io/cz-cli/)
|
|
10
|
-
[](https://gitter.im/nrwl-nx/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
|
11
|
-
[](https://join.slack.com/t/nrwlcommunity/shared_invite/enQtNzU5MTE4OTQwOTk0LTgxY2E0ZWYzMWE0YzA5ZDA2MWM1NDVhNmI2ZWMyYmZhNWJiODk3MjkxZjY3MzU5ZjRmM2NmNWU1OTgyZmE4Mzc)
|
|
12
|
-
|
|
13
|
-
</div>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<hr>
|
|
17
|
-
|
|
18
|
-
# Nx: Smart, Fast and Extensible Build System
|
|
19
|
-
|
|
20
|
-
Nx is a next generation build system with first class monorepo support and powerful integrations.
|
|
21
|
-
|
|
22
|
-
This package is a [Cypress plugin for Nx](https://nx.dev/cypress/overview).
|
|
23
|
-
|
|
24
|
-
## Getting Started
|
|
25
|
-
|
|
26
|
-
### Creating an Nx Workspace
|
|
27
|
-
|
|
28
|
-
**Using `npx`**
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
npx create-nx-workspace
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
**Using `npm init`**
|
|
35
|
-
|
|
36
|
-
```bash
|
|
37
|
-
npm init nx-workspace
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
**Using `yarn create`**
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
yarn create nx-workspace
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
### Adding Nx to an Existing Repository
|
|
47
|
-
|
|
48
|
-
Run:
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
npx nx@latest init
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
## Documentation & Resources
|
|
55
|
-
|
|
56
|
-
- [Nx.Dev: Documentation, Guides, Tutorials](https://nx.dev)
|
|
57
|
-
- [Intro to Nx](https://nx.dev/getting-started/intro)
|
|
58
|
-
- [Official Nx YouTube Channel](https://www.youtube.com/@NxDevtools)
|
|
59
|
-
- [Blog Posts About Nx](https://blog.nrwl.io/nx/home)
|
|
60
|
-
|
|
61
|
-
<p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-courses-and-videos.svg"
|
|
62
|
-
width="100%" alt="Nx - Smart, Fast and Extensible Build System"></a></p>
|
|
63
|
-
|
package/migrations.json
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schematics": {
|
|
3
|
-
"remove-typescript-plugin": {
|
|
4
|
-
"cli": "nx",
|
|
5
|
-
"version": "12.8.0-beta.0",
|
|
6
|
-
"description": "Remove Typescript Preprocessor Plugin",
|
|
7
|
-
"factory": "./src/migrations/update-12-8-0/remove-typescript-plugin"
|
|
8
|
-
},
|
|
9
|
-
"update-cypress-configs-preset": {
|
|
10
|
-
"cli": "nx",
|
|
11
|
-
"version": "14.6.1-beta.0",
|
|
12
|
-
"description": "Change Cypress e2e and component testing presets to use __filename instead of __dirname and include a devServerTarget for component testing.",
|
|
13
|
-
"factory": "./src/migrations/update-14-6-1/update-cypress-configs-presets"
|
|
14
|
-
},
|
|
15
|
-
"update-cypress-if-v10": {
|
|
16
|
-
"cli": "nx",
|
|
17
|
-
"version": "14.7.0-beta.0",
|
|
18
|
-
"description": "Update Cypress if using v10 to support latest component testing features",
|
|
19
|
-
"factory": "./src/migrations/update-14-7-0/update-cypress-version-if-10"
|
|
20
|
-
},
|
|
21
|
-
"add-cypress-inputs": {
|
|
22
|
-
"cli": "nx",
|
|
23
|
-
"version": "15.0.0-beta.0",
|
|
24
|
-
"description": "Stop hashing cypress spec files and config files for build targets and dependent tasks",
|
|
25
|
-
"factory": "./src/migrations/update-15-0-0/add-cypress-inputs"
|
|
26
|
-
},
|
|
27
|
-
"update-cy-mount-usage": {
|
|
28
|
-
"cli": "nx",
|
|
29
|
-
"version": "15.0.0-beta.4",
|
|
30
|
-
"description": "Update to using cy.mount in the commands.ts file instead of importing mount for each component test file",
|
|
31
|
-
"factory": "./src/migrations/update-15-0-0/update-cy-mount-usage"
|
|
32
|
-
},
|
|
33
|
-
"update-to-cypress-11": {
|
|
34
|
-
"cli": "nx",
|
|
35
|
-
"version": "15.1.0-beta.0",
|
|
36
|
-
"description": "Update to Cypress v11. This migration will only update if the workspace is already on v10. https://www.cypress.io/blog/2022/11/04/upcoming-changes-to-component-testing/",
|
|
37
|
-
"factory": "./src/migrations/update-15-1-0/cypress-11"
|
|
38
|
-
},
|
|
39
|
-
"update-to-cypress-12": {
|
|
40
|
-
"cli": "nx",
|
|
41
|
-
"version": "15.5.0-beta.0",
|
|
42
|
-
"description": "Update to Cypress v12. Cypress 12 contains a handful of breaking changes that might causes tests to start failing that nx cannot directly fix. Read more Cypress 12 changes: https://docs.cypress.io/guides/references/migration-guide#Migrating-to-Cypress-12-0.This migration will only run if you are already using Cypress v11.",
|
|
43
|
-
"factory": "./src/migrations/update-15-5-0/update-to-cypress-12"
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
"packageJsonUpdates": {}
|
|
47
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const devkit_1 = require("@nrwl/devkit");
|
|
4
|
-
const cypress_impl_1 = require("./cypress.impl");
|
|
5
|
-
exports.default = (0, devkit_1.convertNxExecutor)(cypress_impl_1.default);
|
|
6
|
-
//# sourceMappingURL=compat.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../packages/cypress/src/executors/cypress/compat.ts"],"names":[],"mappings":";;AAAA,yCAAiD;AAEjD,iDAA4D;AAE5D,kBAAe,IAAA,0BAAiB,EAAC,sBAAe,CAAC,CAAC"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { ExecutorContext } from '@nrwl/devkit';
|
|
2
|
-
import 'dotenv/config';
|
|
3
|
-
export type Json = {
|
|
4
|
-
[k: string]: any;
|
|
5
|
-
};
|
|
6
|
-
export interface CypressExecutorOptions extends Json {
|
|
7
|
-
cypressConfig: string;
|
|
8
|
-
watch?: boolean;
|
|
9
|
-
tsConfig?: string;
|
|
10
|
-
devServerTarget?: string;
|
|
11
|
-
headed?: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* @deprecated use watch instead
|
|
14
|
-
**/
|
|
15
|
-
headless?: boolean;
|
|
16
|
-
exit?: boolean;
|
|
17
|
-
key?: string;
|
|
18
|
-
record?: boolean;
|
|
19
|
-
parallel?: boolean;
|
|
20
|
-
baseUrl?: string;
|
|
21
|
-
browser?: string;
|
|
22
|
-
env?: Record<string, string>;
|
|
23
|
-
spec?: string;
|
|
24
|
-
/**
|
|
25
|
-
* @deprecated no longer used since cypress supports typescript out of the box
|
|
26
|
-
**/
|
|
27
|
-
copyFiles?: string;
|
|
28
|
-
ciBuildId?: string | number;
|
|
29
|
-
group?: string;
|
|
30
|
-
ignoreTestFiles?: string;
|
|
31
|
-
reporter?: string;
|
|
32
|
-
reporterOptions?: string;
|
|
33
|
-
skipServe?: boolean;
|
|
34
|
-
testingType?: 'component' | 'e2e';
|
|
35
|
-
tag?: string;
|
|
36
|
-
port?: number | 'cypress-auto';
|
|
37
|
-
}
|
|
38
|
-
export default function cypressExecutor(options: CypressExecutorOptions, context: ExecutorContext): Promise<{
|
|
39
|
-
success: any;
|
|
40
|
-
}>;
|