@nx/cypress 16.5.1 → 16.6.0-beta.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.
Files changed (26) hide show
  1. package/generators.json +16 -14
  2. package/index.d.ts +6 -2
  3. package/index.js +9 -5
  4. package/package.json +6 -6
  5. package/src/generators/component-configuration/component-configuration.d.ts +6 -0
  6. package/src/generators/{cypress-component-configuration/cypress-component-configuration.js → component-configuration/component-configuration.js} +5 -4
  7. package/src/generators/{cypress-component-configuration → component-configuration}/schema.json +1 -1
  8. package/src/generators/{cypress-e2e-configuration/cypress-e2e-configuration.d.ts → configuration/configuration.d.ts} +2 -2
  9. package/src/generators/{cypress-e2e-configuration/cypress-e2e-configuration.js → configuration/configuration.js} +5 -5
  10. package/src/utils/add-linter.d.ts +2 -2
  11. package/src/generators/cypress-component-configuration/cypress-component-configuration.d.ts +0 -5
  12. /package/src/generators/{cypress-component-configuration → component-configuration}/files/__directory__/support/component-index.html +0 -0
  13. /package/src/generators/{cypress-component-configuration → component-configuration}/files/__directory__/support/component.ts__ext__ +0 -0
  14. /package/src/generators/{cypress-component-configuration → component-configuration}/schema.d.ts +0 -0
  15. /package/src/generators/{cypress-e2e-configuration → configuration}/files/v10/__directory__/e2e/app.cy.ts__tmpl__ +0 -0
  16. /package/src/generators/{cypress-e2e-configuration → configuration}/files/v10/__directory__/support/app.po.ts__tmpl__ +0 -0
  17. /package/src/generators/{cypress-e2e-configuration → configuration}/files/v10/__directory__/support/e2e.ts__tmpl__ +0 -0
  18. /package/src/generators/{cypress-e2e-configuration → configuration}/files/v9/__directory__/fixtures/example.json__tmpl__ +0 -0
  19. /package/src/generators/{cypress-e2e-configuration → configuration}/files/v9/__directory__/integration/app.spec.ts__tmpl__ +0 -0
  20. /package/src/generators/{cypress-e2e-configuration → configuration}/files/v9/__directory__/plugins/index.js +0 -0
  21. /package/src/generators/{cypress-e2e-configuration → configuration}/files/v9/__directory__/support/app.po.ts__tmpl__ +0 -0
  22. /package/src/generators/{cypress-e2e-configuration → configuration}/files/v9/__directory__/support/commands.ts__tmpl__ +0 -0
  23. /package/src/generators/{cypress-e2e-configuration → configuration}/files/v9/__directory__/support/index.ts__tmpl__ +0 -0
  24. /package/src/generators/{cypress-e2e-configuration → configuration}/files/v9/__directory__/tsconfig.json +0 -0
  25. /package/src/generators/{cypress-e2e-configuration → configuration}/files/v9/cypress.json +0 -0
  26. /package/src/generators/{cypress-e2e-configuration → configuration}/schema.json +0 -0
package/generators.json CHANGED
@@ -14,15 +14,16 @@
14
14
  "schema": "./src/generators/cypress-project/schema.json",
15
15
  "description": "Add a Cypress E2E Project."
16
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",
17
+ "configuration": {
18
+ "aliases": ["cypress-e2e-configuration", "e2e", "e2e-config"],
19
+ "factory": "./src/generators/configuration/configuration#compat",
20
+ "schema": "./src/generators/configuration/schema.json",
21
21
  "description": "Add a Cypress E2E Configuration to an existing project."
22
22
  },
23
- "cypress-component-configuration": {
24
- "factory": "./src/generators/cypress-component-configuration/cypress-component-configuration#cypressComponentConfiguration",
25
- "schema": "./src/generators/cypress-component-configuration/schema.json",
23
+ "component-configuration": {
24
+ "aliases": ["cypress-component-configuration"],
25
+ "factory": "./src/generators/component-configuration/component-configuration#compat",
26
+ "schema": "./src/generators/component-configuration/schema.json",
26
27
  "description": "Set up Cypress Component Test for a project"
27
28
  },
28
29
  "migrate-to-cypress-11": {
@@ -45,15 +46,16 @@
45
46
  "description": "Add a Cypress E2E Project.",
46
47
  "hidden": true
47
48
  },
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",
49
+ "configuration": {
50
+ "aliases": ["cypress-e2e-configuration", "e2e", "e2e-config"],
51
+ "factory": "./src/generators/configuration/configuration",
52
+ "schema": "./src/generators/configuration/schema.json",
52
53
  "description": "Add a Cypress E2E Configuration to an existing project."
53
54
  },
54
- "cypress-component-configuration": {
55
- "factory": "./src/generators/cypress-component-configuration/cypress-component-configuration#cypressComponentConfiguration",
56
- "schema": "./src/generators/cypress-component-configuration/schema.json",
55
+ "component-configuration": {
56
+ "aliases": ["cypress-component-configuration"],
57
+ "factory": "./src/generators/component-configuration/component-configuration",
58
+ "schema": "./src/generators/component-configuration/schema.json",
57
59
  "description": "Set up Cypress Component Test for a project",
58
60
  "hidden": true
59
61
  },
package/index.d.ts CHANGED
@@ -1,6 +1,10 @@
1
+ import { configurationGenerator } from './src/generators/configuration/configuration';
2
+ import { componentConfigurationGenerator } from './src/generators/component-configuration/component-configuration';
3
+ export { configurationGenerator, componentConfigurationGenerator };
4
+ /** @deprecated Use `configurationGenerator` instead. */
5
+ export declare const cypressComponentConfiguration: typeof componentConfigurationGenerator;
6
+ export { configurationGenerator as cypressE2EConfigurationGenerator };
1
7
  export { cypressProjectGenerator } from './src/generators/cypress-project/cypress-project';
2
8
  export { cypressInitGenerator } from './src/generators/init/init';
3
9
  export { conversionGenerator } from './src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint';
4
- export { cypressComponentConfiguration } from './src/generators/cypress-component-configuration/cypress-component-configuration';
5
10
  export { migrateCypressProject } from './src/generators/migrate-to-cypress-11/migrate-to-cypress-11';
6
- export { cypressE2EConfigurationGenerator } from './src/generators/cypress-e2e-configuration/cypress-e2e-configuration';
package/index.js CHANGED
@@ -1,15 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.cypressE2EConfigurationGenerator = exports.migrateCypressProject = exports.cypressComponentConfiguration = exports.conversionGenerator = exports.cypressInitGenerator = exports.cypressProjectGenerator = void 0;
3
+ exports.migrateCypressProject = exports.conversionGenerator = exports.cypressInitGenerator = exports.cypressProjectGenerator = exports.cypressE2EConfigurationGenerator = exports.cypressComponentConfiguration = exports.componentConfigurationGenerator = exports.configurationGenerator = void 0;
4
+ const configuration_1 = require("./src/generators/configuration/configuration");
5
+ Object.defineProperty(exports, "configurationGenerator", { enumerable: true, get: function () { return configuration_1.configurationGenerator; } });
6
+ Object.defineProperty(exports, "cypressE2EConfigurationGenerator", { enumerable: true, get: function () { return configuration_1.configurationGenerator; } });
7
+ const component_configuration_1 = require("./src/generators/component-configuration/component-configuration");
8
+ Object.defineProperty(exports, "componentConfigurationGenerator", { enumerable: true, get: function () { return component_configuration_1.componentConfigurationGenerator; } });
9
+ // Maintain backwards compatibility with the old names in case community plugins used them.
10
+ /** @deprecated Use `configurationGenerator` instead. */
11
+ exports.cypressComponentConfiguration = component_configuration_1.componentConfigurationGenerator;
4
12
  var cypress_project_1 = require("./src/generators/cypress-project/cypress-project");
5
13
  Object.defineProperty(exports, "cypressProjectGenerator", { enumerable: true, get: function () { return cypress_project_1.cypressProjectGenerator; } });
6
14
  var init_1 = require("./src/generators/init/init");
7
15
  Object.defineProperty(exports, "cypressInitGenerator", { enumerable: true, get: function () { return init_1.cypressInitGenerator; } });
8
16
  var convert_tslint_to_eslint_1 = require("./src/generators/convert-tslint-to-eslint/convert-tslint-to-eslint");
9
17
  Object.defineProperty(exports, "conversionGenerator", { enumerable: true, get: function () { return convert_tslint_to_eslint_1.conversionGenerator; } });
10
- var cypress_component_configuration_1 = require("./src/generators/cypress-component-configuration/cypress-component-configuration");
11
- Object.defineProperty(exports, "cypressComponentConfiguration", { enumerable: true, get: function () { return cypress_component_configuration_1.cypressComponentConfiguration; } });
12
18
  var migrate_to_cypress_11_1 = require("./src/generators/migrate-to-cypress-11/migrate-to-cypress-11");
13
19
  Object.defineProperty(exports, "migrateCypressProject", { enumerable: true, get: function () { return migrate_to_cypress_11_1.migrateCypressProject; } });
14
- var cypress_e2e_configuration_1 = require("./src/generators/cypress-e2e-configuration/cypress-e2e-configuration");
15
- Object.defineProperty(exports, "cypressE2EConfigurationGenerator", { enumerable: true, get: function () { return cypress_e2e_configuration_1.cypressE2EConfigurationGenerator; } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/cypress",
3
- "version": "16.5.1",
3
+ "version": "16.6.0-beta.1",
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": {
@@ -34,10 +34,10 @@
34
34
  "migrations": "./migrations.json"
35
35
  },
36
36
  "dependencies": {
37
- "@nrwl/cypress": "16.5.1",
38
- "@nx/devkit": "16.5.1",
39
- "@nx/js": "16.5.1",
40
- "@nx/linter": "16.5.1",
37
+ "@nrwl/cypress": "16.6.0-beta.1",
38
+ "@nx/devkit": "16.6.0-beta.1",
39
+ "@nx/js": "16.6.0-beta.1",
40
+ "@nx/linter": "16.6.0-beta.1",
41
41
  "@phenomnomnominal/tsquery": "~5.0.1",
42
42
  "detect-port": "^1.5.1",
43
43
  "dotenv": "~10.0.0",
@@ -55,5 +55,5 @@
55
55
  "access": "public"
56
56
  },
57
57
  "types": "./index.d.ts",
58
- "gitHead": "7b7f1e7f72a34cb31cff43ea0ebb80d0eab1ac79"
58
+ "gitHead": "cf9f5cbe6a7ce3b916ec6505dc8488f669cbc52b"
59
59
  }
@@ -0,0 +1,6 @@
1
+ import { ProjectConfiguration, Tree } from '@nx/devkit';
2
+ import { CypressComponentConfigurationSchema } from './schema';
3
+ export declare function componentConfigurationGenerator(tree: Tree, options: CypressComponentConfigurationSchema): Promise<() => void>;
4
+ export declare function updateTsConfigForComponentTesting(tree: Tree, projectConfig: ProjectConfiguration): void;
5
+ export default componentConfigurationGenerator;
6
+ export declare const compat: (generatorOptions: CypressComponentConfigurationSchema) => (tree: any, context: any) => Promise<any>;
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.updateTsConfigForComponentTesting = exports.cypressComponentConfiguration = void 0;
3
+ exports.compat = exports.updateTsConfigForComponentTesting = exports.componentConfigurationGenerator = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const devkit_1 = require("@nx/devkit");
6
6
  const cypress_version_1 = require("../../utils/cypress-version");
7
7
  const versions_1 = require("../../utils/versions");
8
8
  const base_setup_1 = require("../base-setup/base-setup");
9
- function cypressComponentConfiguration(tree, options) {
9
+ function componentConfigurationGenerator(tree, options) {
10
10
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
11
11
  const opts = normalizeOptions(options);
12
12
  const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, opts.project);
@@ -23,7 +23,7 @@ function cypressComponentConfiguration(tree, options) {
23
23
  };
24
24
  });
25
25
  }
26
- exports.cypressComponentConfiguration = cypressComponentConfiguration;
26
+ exports.componentConfigurationGenerator = componentConfigurationGenerator;
27
27
  function normalizeOptions(options) {
28
28
  var _a;
29
29
  const cyVersion = (0, cypress_version_1.installedCypressVersion)();
@@ -134,4 +134,5 @@ function updateTsConfigForComponentTesting(tree, projectConfig) {
134
134
  }
135
135
  }
136
136
  exports.updateTsConfigForComponentTesting = updateTsConfigForComponentTesting;
137
- exports.default = cypressComponentConfiguration;
137
+ exports.default = componentConfigurationGenerator;
138
+ exports.compat = (0, devkit_1.convertNxGenerator)(componentConfigurationGenerator);
@@ -7,7 +7,7 @@
7
7
  "type": "object",
8
8
  "examples": [
9
9
  {
10
- "command": "nx g @nx/cypress:cypress-component-configuration --project=my-cool-lib ",
10
+ "command": "nx g @nx/cypress:component-configuration --project=my-cool-lib ",
11
11
  "description": "Add cypress component testing to an existing project named my-cool-lib"
12
12
  }
13
13
  ],
@@ -13,6 +13,6 @@ export interface CypressE2EConfigSchema {
13
13
  linter?: Linter;
14
14
  port?: number | 'cypress-auto';
15
15
  }
16
- export declare function cypressE2EConfigurationGenerator(tree: Tree, options: CypressE2EConfigSchema): Promise<GeneratorCallback>;
17
- export default cypressE2EConfigurationGenerator;
16
+ export declare function configurationGenerator(tree: Tree, options: CypressE2EConfigSchema): Promise<GeneratorCallback>;
17
+ export default configurationGenerator;
18
18
  export declare const compat: (generatorOptions: CypressE2EConfigSchema) => (tree: any, context: any) => Promise<any>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.compat = exports.cypressE2EConfigurationGenerator = void 0;
3
+ exports.compat = exports.configurationGenerator = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const devkit_1 = require("@nx/devkit");
6
6
  const js_1 = require("@nx/js");
@@ -12,7 +12,7 @@ const cypress_version_1 = require("../../utils/cypress-version");
12
12
  const versions_1 = require("../../utils/versions");
13
13
  const init_1 = require("../init/init");
14
14
  const base_setup_1 = require("../base-setup/base-setup");
15
- function cypressE2EConfigurationGenerator(tree, options) {
15
+ function configurationGenerator(tree, options) {
16
16
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
17
17
  const opts = normalizeOptions(tree, options);
18
18
  const tasks = [];
@@ -31,7 +31,7 @@ function cypressE2EConfigurationGenerator(tree, options) {
31
31
  return (0, devkit_1.runTasksInSerial)(...tasks);
32
32
  });
33
33
  }
34
- exports.cypressE2EConfigurationGenerator = cypressE2EConfigurationGenerator;
34
+ exports.configurationGenerator = configurationGenerator;
35
35
  function normalizeOptions(tree, options) {
36
36
  var _a, _b, _c, _d, _e;
37
37
  const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, options.project);
@@ -128,5 +128,5 @@ function addTarget(tree, opts) {
128
128
  }
129
129
  (0, devkit_1.updateProjectConfiguration)(tree, opts.project, projectConfig);
130
130
  }
131
- exports.default = cypressE2EConfigurationGenerator;
132
- exports.compat = (0, devkit_1.convertNxGenerator)(cypressE2EConfigurationGenerator);
131
+ exports.default = configurationGenerator;
132
+ exports.compat = (0, devkit_1.convertNxGenerator)(configurationGenerator);
@@ -1,4 +1,4 @@
1
- import { GeneratorCallback, Tree } from '@nx/devkit';
1
+ import { Tree } from '@nx/devkit';
2
2
  import { Linter } from '@nx/linter';
3
3
  export interface CyLinterOptions {
4
4
  project: string;
@@ -18,4 +18,4 @@ export interface CyLinterOptions {
18
18
  **/
19
19
  overwriteExisting?: boolean;
20
20
  }
21
- export declare function addLinterToCyProject(tree: Tree, options: CyLinterOptions): Promise<GeneratorCallback>;
21
+ export declare function addLinterToCyProject(tree: Tree, options: CyLinterOptions): Promise<() => void>;
@@ -1,5 +0,0 @@
1
- import { ProjectConfiguration, Tree } from '@nx/devkit';
2
- import { CypressComponentConfigurationSchema } from './schema';
3
- export declare function cypressComponentConfiguration(tree: Tree, options: CypressComponentConfigurationSchema): Promise<() => void>;
4
- export declare function updateTsConfigForComponentTesting(tree: Tree, projectConfig: ProjectConfiguration): void;
5
- export default cypressComponentConfiguration;