@nx/plugin 16.0.0-beta.5
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/CHANGELOG.md +8 -0
- package/LICENSE +22 -0
- package/README.md +67 -0
- package/executors.json +16 -0
- package/generators.d.ts +6 -0
- package/generators.js +10 -0
- package/generators.js.map +1 -0
- package/generators.json +81 -0
- package/index.d.ts +0 -0
- package/index.js +1 -0
- package/index.js.map +1 -0
- package/migrations.json +46 -0
- package/package.json +45 -0
- package/src/executors/e2e/compat.d.ts +1 -0
- package/src/executors/e2e/compat.js +7 -0
- package/src/executors/e2e/compat.js.map +1 -0
- package/src/executors/e2e/e2e.impl.d.ts +7 -0
- package/src/executors/e2e/e2e.impl.js +81 -0
- package/src/executors/e2e/e2e.impl.js.map +1 -0
- package/src/executors/e2e/schema.d.ts +6 -0
- package/src/executors/e2e/schema.json +220 -0
- package/src/generators/create-package/create-package.d.ts +5 -0
- package/src/generators/create-package/create-package.js +115 -0
- package/src/generators/create-package/create-package.js.map +1 -0
- package/src/generators/create-package/files/create-framework-package/bin/index.ts__tmpl__ +26 -0
- package/src/generators/create-package/files/e2e/__name__.spec.ts__tmpl__ +30 -0
- package/src/generators/create-package/schema.d.ts +17 -0
- package/src/generators/create-package/schema.json +69 -0
- package/src/generators/create-package/utils/normalize-schema.d.ts +10 -0
- package/src/generators/create-package/utils/normalize-schema.js +22 -0
- package/src/generators/create-package/utils/normalize-schema.js.map +1 -0
- package/src/generators/e2e-project/e2e.d.ts +6 -0
- package/src/generators/e2e-project/e2e.js +107 -0
- package/src/generators/e2e-project/e2e.js.map +1 -0
- package/src/generators/e2e-project/files/tests/__pluginName__.spec.ts__tmpl__ +37 -0
- package/src/generators/e2e-project/files/tsconfig.json__tmpl__ +6 -0
- package/src/generators/e2e-project/schema.d.ts +12 -0
- package/src/generators/e2e-project/schema.json +57 -0
- package/src/generators/executor/executor.d.ts +6 -0
- package/src/generators/executor/executor.js +104 -0
- package/src/generators/executor/executor.js.map +1 -0
- package/src/generators/executor/files/executor/__fileName__/executor.spec.ts__tmpl__ +11 -0
- package/src/generators/executor/files/executor/__fileName__/executor.ts__tmpl__ +11 -0
- package/src/generators/executor/files/executor/__fileName__/schema.d.ts__tmpl__ +1 -0
- package/src/generators/executor/files/executor/__fileName__/schema.json__tmpl__ +9 -0
- package/src/generators/executor/files/hasher/__fileName__/hasher.spec.ts__tmpl__ +22 -0
- package/src/generators/executor/files/hasher/__fileName__/hasher.ts__tmpl__ +12 -0
- package/src/generators/executor/schema.d.ts +9 -0
- package/src/generators/executor/schema.json +64 -0
- package/src/generators/generator/files/generator/__fileName__/generator.spec.ts__tmpl__ +20 -0
- package/src/generators/generator/files/generator/__fileName__/generator.ts__tmpl__ +72 -0
- package/src/generators/generator/files/generator/__fileName__/schema.d.ts__tmpl__ +5 -0
- package/src/generators/generator/files/generator/__fileName__/schema.json__tmpl__ +27 -0
- package/src/generators/generator/generator.d.ts +6 -0
- package/src/generators/generator/generator.js +106 -0
- package/src/generators/generator/generator.js.map +1 -0
- package/src/generators/generator/schema.d.ts +8 -0
- package/src/generators/generator/schema.json +60 -0
- package/src/generators/lint-checks/generator.d.ts +7 -0
- package/src/generators/lint-checks/generator.js +187 -0
- package/src/generators/lint-checks/generator.js.map +1 -0
- package/src/generators/lint-checks/schema.d.ts +4 -0
- package/src/generators/lint-checks/schema.json +25 -0
- package/src/generators/migration/files/migration/__name__/__name__.spec.ts__tmpl__ +17 -0
- package/src/generators/migration/files/migration/__name__/__name__.ts__tmpl__ +6 -0
- package/src/generators/migration/migration.d.ts +5 -0
- package/src/generators/migration/migration.js +111 -0
- package/src/generators/migration/migration.js.map +1 -0
- package/src/generators/migration/schema.d.ts +8 -0
- package/src/generators/migration/schema.json +59 -0
- package/src/generators/plugin/files/plugin/src/index.ts__tmpl__ +0 -0
- package/src/generators/plugin/plugin.d.ts +5 -0
- package/src/generators/plugin/plugin.js +95 -0
- package/src/generators/plugin/plugin.js.map +1 -0
- package/src/generators/plugin/schema.d.ts +17 -0
- package/src/generators/plugin/schema.json +93 -0
- package/src/generators/plugin/utils/normalize-schema.d.ts +14 -0
- package/src/generators/plugin/utils/normalize-schema.js +31 -0
- package/src/generators/plugin/utils/normalize-schema.js.map +1 -0
- package/src/generators/preset/generator.d.ts +3 -0
- package/src/generators/preset/generator.js +53 -0
- package/src/generators/preset/generator.js.map +1 -0
- package/src/generators/preset/schema.d.ts +4 -0
- package/src/generators/preset/schema.json +20 -0
- package/src/migrations/update-14-1-9/add-swc-deps-if-needed.d.ts +2 -0
- package/src/migrations/update-14-1-9/add-swc-deps-if-needed.js +14 -0
- package/src/migrations/update-14-1-9/add-swc-deps-if-needed.js.map +1 -0
- package/src/migrations/update-15-0-0/specify-output-capture.d.ts +2 -0
- package/src/migrations/update-15-0-0/specify-output-capture.js +57 -0
- package/src/migrations/update-15-0-0/specify-output-capture.js.map +1 -0
- package/src/migrations/update-15-9-0/jest-29-configs.d.ts +3 -0
- package/src/migrations/update-15-9-0/jest-29-configs.js +154 -0
- package/src/migrations/update-15-9-0/jest-29-configs.js.map +1 -0
- package/src/migrations/update-15-9-0/jest-29-tests.d.ts +5 -0
- package/src/migrations/update-15-9-0/jest-29-tests.js +65 -0
- package/src/migrations/update-15-9-0/jest-29-tests.js.map +1 -0
- package/src/migrations/update-16-0-0/cli-in-schema-json.d.ts +3 -0
- package/src/migrations/update-16-0-0/cli-in-schema-json.js +84 -0
- package/src/migrations/update-16-0-0/cli-in-schema-json.js.map +1 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +2 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +13 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js.map +1 -0
- package/src/utils/has-generator.d.ts +2 -0
- package/src/utils/has-generator.js +17 -0
- package/src/utils/has-generator.js.map +1 -0
- package/src/utils/testing-utils/async-commands.d.ts +28 -0
- package/src/utils/testing-utils/async-commands.js +51 -0
- package/src/utils/testing-utils/async-commands.js.map +1 -0
- package/src/utils/testing-utils/commands.d.ts +17 -0
- package/src/utils/testing-utils/commands.js +64 -0
- package/src/utils/testing-utils/commands.js.map +1 -0
- package/src/utils/testing-utils/create-package-cli.d.ts +18 -0
- package/src/utils/testing-utils/create-package-cli.js +53 -0
- package/src/utils/testing-utils/create-package-cli.js.map +1 -0
- package/src/utils/testing-utils/index.d.ts +6 -0
- package/src/utils/testing-utils/index.js +10 -0
- package/src/utils/testing-utils/index.js.map +1 -0
- package/src/utils/testing-utils/nx-project.d.ts +25 -0
- package/src/utils/testing-utils/nx-project.js +64 -0
- package/src/utils/testing-utils/nx-project.js.map +1 -0
- package/src/utils/testing-utils/paths.d.ts +15 -0
- package/src/utils/testing-utils/paths.js +33 -0
- package/src/utils/testing-utils/paths.js.map +1 -0
- package/src/utils/testing-utils/utils.d.ts +80 -0
- package/src/utils/testing-utils/utils.js +145 -0
- package/src/utils/testing-utils/utils.js.map +1 -0
- package/src/utils/versions.d.ts +1 -0
- package/src/utils/versions.js +5 -0
- package/src/utils/versions.js.map +1 -0
- package/testing.d.ts +1 -0
- package/testing.js +5 -0
- package/testing.js.map +1 -0
package/CHANGELOG.md
ADDED
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
(The MIT License)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2017-2023 Narwhal Technologies Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
a copy of this software and associated documentation files (the
|
|
7
|
+
'Software'), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be
|
|
14
|
+
included in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
20
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
21
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
22
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
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
|
+
## What is It?
|
|
23
|
+
|
|
24
|
+
It's an Nx plugin used to build other Nx plugins.
|
|
25
|
+
|
|
26
|
+
Check out the list of community plugins and the documentation on how to create one using `create-nx-plugin` here: [https://nx.dev/community](https://nx.dev/community)
|
|
27
|
+
|
|
28
|
+
## Getting Started
|
|
29
|
+
|
|
30
|
+
### Creating an Nx Workspace
|
|
31
|
+
|
|
32
|
+
**Using `npx`**
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npx create-nx-workspace
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**Using `npm init`**
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npm init nx-workspace
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**Using `yarn create`**
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
yarn create nx-workspace
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Adding Nx to an Existing Repository
|
|
51
|
+
|
|
52
|
+
Run:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
npx nx@latest init
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Documentation & Resources
|
|
59
|
+
|
|
60
|
+
- [Nx.Dev: Documentation, Guides, Tutorials](https://nx.dev)
|
|
61
|
+
- [Intro to Nx](https://nx.dev/getting-started/intro)
|
|
62
|
+
- [Official Nx YouTube Channel](https://www.youtube.com/@NxDevtools)
|
|
63
|
+
- [Blog Posts About Nx](https://blog.nrwl.io/nx/home)
|
|
64
|
+
|
|
65
|
+
<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"
|
|
66
|
+
width="100%" alt="Nx - Smart, Fast and Extensible Build System"></a></p>
|
|
67
|
+
|
package/executors.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"builders": {
|
|
3
|
+
"e2e": {
|
|
4
|
+
"implementation": "./src/executors/e2e/compat",
|
|
5
|
+
"schema": "./src/executors/e2e/schema.json",
|
|
6
|
+
"description": "Creates and runs the E2E tests for an Nx Plugin."
|
|
7
|
+
}
|
|
8
|
+
},
|
|
9
|
+
"executors": {
|
|
10
|
+
"e2e": {
|
|
11
|
+
"implementation": "./src/executors/e2e/e2e.impl",
|
|
12
|
+
"schema": "./src/executors/e2e/schema.json",
|
|
13
|
+
"description": "Creates and runs the E2E tests for an Nx Plugin."
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
package/generators.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './src/generators/create-package/create-package';
|
|
2
|
+
export * from './src/generators/e2e-project/e2e';
|
|
3
|
+
export * from './src/generators/executor/executor';
|
|
4
|
+
export * from './src/generators/generator/generator';
|
|
5
|
+
export * from './src/generators/plugin/plugin';
|
|
6
|
+
export * from './src/generators/migration/migration';
|
package/generators.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./src/generators/create-package/create-package"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./src/generators/e2e-project/e2e"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./src/generators/executor/executor"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./src/generators/generator/generator"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./src/generators/plugin/plugin"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./src/generators/migration/migration"), exports);
|
|
10
|
+
//# sourceMappingURL=generators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generators.js","sourceRoot":"","sources":["../../../packages/plugin/generators.ts"],"names":[],"mappings":";;;AAAA,yFAA+D;AAC/D,2EAAiD;AACjD,6EAAmD;AACnD,+EAAqD;AACrD,yEAA+C;AAC/C,+EAAqD"}
|
package/generators.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "nx/plugin",
|
|
3
|
+
"version": "0.1",
|
|
4
|
+
"extends": ["@nx/workspace"],
|
|
5
|
+
"generators": {
|
|
6
|
+
"plugin": {
|
|
7
|
+
"factory": "./src/generators/plugin/plugin",
|
|
8
|
+
"schema": "./src/generators/plugin/schema.json",
|
|
9
|
+
"description": "Create a Nx Plugin."
|
|
10
|
+
},
|
|
11
|
+
"create-package": {
|
|
12
|
+
"factory": "./src/generators/create-package/create-package",
|
|
13
|
+
"schema": "./src/generators/create-package/schema.json",
|
|
14
|
+
"description": "Create a package which can be used by npx to create a new workspace"
|
|
15
|
+
},
|
|
16
|
+
"e2e-project": {
|
|
17
|
+
"factory": "./src/generators/e2e-project/e2e",
|
|
18
|
+
"schema": "./src/generators/e2e-project/schema.json",
|
|
19
|
+
"description": "Create a E2E application for a Nx Plugin."
|
|
20
|
+
},
|
|
21
|
+
"migration": {
|
|
22
|
+
"factory": "./src/generators/migration/migration",
|
|
23
|
+
"schema": "./src/generators/migration/schema.json",
|
|
24
|
+
"description": "Create a migration for an Nx Plugin."
|
|
25
|
+
},
|
|
26
|
+
"generator": {
|
|
27
|
+
"factory": "./src/generators/generator/generator",
|
|
28
|
+
"schema": "./src/generators/generator/schema.json",
|
|
29
|
+
"description": "Create a generator for an Nx Plugin."
|
|
30
|
+
},
|
|
31
|
+
"executor": {
|
|
32
|
+
"factory": "./src/generators/executor/executor",
|
|
33
|
+
"schema": "./src/generators/executor/schema.json",
|
|
34
|
+
"description": "Create an executor for an Nx Plugin."
|
|
35
|
+
},
|
|
36
|
+
"plugin-lint-checks": {
|
|
37
|
+
"factory": "./src/generators/lint-checks/generator",
|
|
38
|
+
"schema": "./src/generators/lint-checks/schema.json",
|
|
39
|
+
"description": "Adds linting configuration to validate common json files for nx plugins."
|
|
40
|
+
},
|
|
41
|
+
"preset": {
|
|
42
|
+
"factory": "./src/generators/preset/generator",
|
|
43
|
+
"schema": "./src/generators/preset/schema.json",
|
|
44
|
+
"description": "Initializes a workspace with an nx-plugin inside of it. Use as: `create-nx-workspace --preset @nrwl/nx-plugin`.",
|
|
45
|
+
"hidden": true,
|
|
46
|
+
"x-use-standalone-layout": true
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"schematics": {
|
|
50
|
+
"plugin": {
|
|
51
|
+
"factory": "./src/generators/plugin/plugin#pluginSchematic",
|
|
52
|
+
"schema": "./src/generators/plugin/schema.json",
|
|
53
|
+
"description": "Create a Nx Plugin."
|
|
54
|
+
},
|
|
55
|
+
"create-package": {
|
|
56
|
+
"factory": "./src/generators/create-package/create-package#createPackageSchematic",
|
|
57
|
+
"schema": "./src/generators/create-package/schema.json",
|
|
58
|
+
"description": "Create a package which can be used by npx to create a new workspace"
|
|
59
|
+
},
|
|
60
|
+
"e2e-project": {
|
|
61
|
+
"factory": "./src/generators/e2e-project/e2e#e2eProjectSchematic",
|
|
62
|
+
"schema": "./src/generators/e2e-project/schema.json",
|
|
63
|
+
"description": "Create a E2E application for a Nx Plugin."
|
|
64
|
+
},
|
|
65
|
+
"migration": {
|
|
66
|
+
"factory": "./src/generators/migration/migration#migrationSchematic",
|
|
67
|
+
"schema": "./src/generators/migration/schema.json",
|
|
68
|
+
"description": "Create a migration for an Nx Plugin."
|
|
69
|
+
},
|
|
70
|
+
"generator": {
|
|
71
|
+
"factory": "./src/generators/generator/generator#generatorSchematic",
|
|
72
|
+
"schema": "./src/generators/generator/schema.json",
|
|
73
|
+
"description": "Create a generator for an Nx Plugin."
|
|
74
|
+
},
|
|
75
|
+
"executor": {
|
|
76
|
+
"factory": "./src/generators/executor/executor#executorSchematic",
|
|
77
|
+
"schema": "./src/generators/executor/schema.json",
|
|
78
|
+
"description": "Create an executor for an Nx Plugin."
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
package/index.d.ts
ADDED
|
File without changes
|
package/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index.js.map
|
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/plugin/index.ts"],"names":[],"mappings":""}
|
package/migrations.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"generators": {
|
|
3
|
+
"add-swc-deps": {
|
|
4
|
+
"cli": "nx",
|
|
5
|
+
"version": "14.1.9-beta.0",
|
|
6
|
+
"description": "Adds @swc/core and @swc-node as a dev dep if you are using them",
|
|
7
|
+
"factory": "./src/migrations/update-14-1-9/add-swc-deps-if-needed"
|
|
8
|
+
},
|
|
9
|
+
"add-swc-deps-again": {
|
|
10
|
+
"cli": "nx",
|
|
11
|
+
"version": "14.2.3-beta.0",
|
|
12
|
+
"description": "Adds @swc/core and @swc-node as a dev dep if you are using them (repeated due to bad version on earlier migration)",
|
|
13
|
+
"factory": "./src/migrations/update-14-1-9/add-swc-deps-if-needed"
|
|
14
|
+
},
|
|
15
|
+
"update-15-0-0": {
|
|
16
|
+
"cli": "nx",
|
|
17
|
+
"version": "15.0.0-beta.0",
|
|
18
|
+
"description": "Migrates executor schema files to v2",
|
|
19
|
+
"factory": "./src/migrations/update-15-0-0/specify-output-capture"
|
|
20
|
+
},
|
|
21
|
+
"update-configs-jest-29": {
|
|
22
|
+
"version": "15.9.0-beta.0",
|
|
23
|
+
"cli": "nx",
|
|
24
|
+
"description": "Update nx plugin jest configs to support jest 29 changes (https://jestjs.io/docs/upgrading-to-jest29)",
|
|
25
|
+
"factory": "./src/migrations/update-15-9-0/jest-29-configs"
|
|
26
|
+
},
|
|
27
|
+
"update-tests-jest-29": {
|
|
28
|
+
"version": "15.9.0-beta.0",
|
|
29
|
+
"cli": "nx",
|
|
30
|
+
"description": "Update nx plugin jest test files to support jest 29 changes (https://jestjs.io/docs/upgrading-to-jest29)",
|
|
31
|
+
"factory": "./src/migrations/update-15-9-0/jest-29-tests"
|
|
32
|
+
},
|
|
33
|
+
"update-remove-cli-prop": {
|
|
34
|
+
"version": "16.0.0-beta.1",
|
|
35
|
+
"cli": "nx",
|
|
36
|
+
"description": "Removes CLI property within schema.json files and moves generators and schematics to the proper root node in migrations.json",
|
|
37
|
+
"factory": "./src/migrations/update-16-0-0/cli-in-schema-json"
|
|
38
|
+
},
|
|
39
|
+
"update-16-0-0-add-nx-packages": {
|
|
40
|
+
"cli": "nx",
|
|
41
|
+
"version": "16.0.0-beta.1",
|
|
42
|
+
"description": "Replace @nrwl/nx-plugin with @nx/plugin",
|
|
43
|
+
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nx/plugin",
|
|
3
|
+
"version": "16.0.0-beta.5",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "This plugin is used to create Nx plugins! It contains generators for generating common plugin features like generators, executors, migrations and more.",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/nrwl/nx.git",
|
|
9
|
+
"directory": "packages/nx-plugin"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"Monorepo",
|
|
13
|
+
"Nx",
|
|
14
|
+
"CLI"
|
|
15
|
+
],
|
|
16
|
+
"main": "./index",
|
|
17
|
+
"types": "./index.d.ts",
|
|
18
|
+
"author": "Nrwl",
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/nrwl/nx/issues"
|
|
22
|
+
},
|
|
23
|
+
"homepage": "https://nx.dev",
|
|
24
|
+
"schematics": "./generators.json",
|
|
25
|
+
"builders": "./executors.json",
|
|
26
|
+
"ng-update": {
|
|
27
|
+
"requirements": {},
|
|
28
|
+
"migrations": "./migrations.json"
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@nrwl/nx-plugin": "16.0.0-beta.5",
|
|
32
|
+
"@nx/devkit": "16.0.0-beta.5",
|
|
33
|
+
"@nx/jest": "16.0.0-beta.5",
|
|
34
|
+
"@nx/js": "16.0.0-beta.5",
|
|
35
|
+
"@nx/linter": "16.0.0-beta.5",
|
|
36
|
+
"@phenomnomnominal/tsquery": "~5.0.1",
|
|
37
|
+
"dotenv": "~10.0.0",
|
|
38
|
+
"fs-extra": "^11.1.0",
|
|
39
|
+
"tslib": "^2.3.0"
|
|
40
|
+
},
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"access": "public"
|
|
43
|
+
},
|
|
44
|
+
"gitHead": "04fed26279d04c2b02663df5872c6857eb7914bf"
|
|
45
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const nxPluginE2EBuilder: any;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.nxPluginE2EBuilder = void 0;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const e2e_impl_1 = require("./e2e.impl");
|
|
6
|
+
exports.nxPluginE2EBuilder = (0, devkit_1.convertNxExecutor)(e2e_impl_1.nxPluginE2EExecutor);
|
|
7
|
+
//# sourceMappingURL=compat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../packages/plugin/src/executors/e2e/compat.ts"],"names":[],"mappings":";;;AAAA,uCAA+C;AAC/C,yCAAiD;AAEpC,QAAA,kBAAkB,GAAG,IAAA,0BAAiB,EAAC,8BAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import 'dotenv/config';
|
|
2
|
+
import type { ExecutorContext } from '@nx/devkit';
|
|
3
|
+
import type { NxPluginE2EExecutorOptions } from './schema';
|
|
4
|
+
export declare function nxPluginE2EExecutor(options: NxPluginE2EExecutorOptions, context: ExecutorContext): AsyncGenerator<{
|
|
5
|
+
success: boolean;
|
|
6
|
+
}>;
|
|
7
|
+
export default nxPluginE2EExecutor;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.nxPluginE2EExecutor = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
require("dotenv/config");
|
|
6
|
+
const devkit_1 = require("@nx/devkit");
|
|
7
|
+
const jest_impl_1 = require("@nx/jest/src/executors/jest/jest.impl");
|
|
8
|
+
// TODO(Caleb & Craigory): can we get rid of this and just use @nx/jest directly?
|
|
9
|
+
function nxPluginE2EExecutor(options, context) {
|
|
10
|
+
return tslib_1.__asyncGenerator(this, arguments, function* nxPluginE2EExecutor_1() {
|
|
11
|
+
var _a, e_1, _b, _c;
|
|
12
|
+
const { target } = options, jestOptions = tslib_1.__rest(options, ["target"]);
|
|
13
|
+
let success;
|
|
14
|
+
try {
|
|
15
|
+
for (var _d = true, _e = tslib_1.__asyncValues(runBuildTarget(target, context)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a;) {
|
|
16
|
+
_c = _f.value;
|
|
17
|
+
_d = false;
|
|
18
|
+
try {
|
|
19
|
+
const _ = _c;
|
|
20
|
+
try {
|
|
21
|
+
success = yield tslib_1.__await(runTests(jestOptions, context));
|
|
22
|
+
}
|
|
23
|
+
catch (e) {
|
|
24
|
+
devkit_1.logger.error(e.message);
|
|
25
|
+
success = false;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
finally {
|
|
29
|
+
_d = true;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
34
|
+
finally {
|
|
35
|
+
try {
|
|
36
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
37
|
+
}
|
|
38
|
+
finally { if (e_1) throw e_1.error; }
|
|
39
|
+
}
|
|
40
|
+
return yield tslib_1.__await({ success });
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
exports.nxPluginE2EExecutor = nxPluginE2EExecutor;
|
|
44
|
+
function runBuildTarget(buildTarget, context) {
|
|
45
|
+
return tslib_1.__asyncGenerator(this, arguments, function* runBuildTarget_1() {
|
|
46
|
+
var _a, e_2, _b, _c;
|
|
47
|
+
const { project, target, configuration } = (0, devkit_1.parseTargetString)(buildTarget);
|
|
48
|
+
const buildTargetOptions = (0, devkit_1.readTargetOptions)({ project, target, configuration }, context);
|
|
49
|
+
const targetSupportsWatch = Object.keys(buildTargetOptions).includes('watch');
|
|
50
|
+
try {
|
|
51
|
+
for (var _d = true, _e = tslib_1.__asyncValues(yield tslib_1.__await((0, devkit_1.runExecutor)({ project, target, configuration }, targetSupportsWatch ? { watch: false } : {}, context))), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a;) {
|
|
52
|
+
_c = _f.value;
|
|
53
|
+
_d = false;
|
|
54
|
+
try {
|
|
55
|
+
const output = _c;
|
|
56
|
+
if (!output.success)
|
|
57
|
+
throw new Error('Could not compile application files.');
|
|
58
|
+
yield yield tslib_1.__await(output.success);
|
|
59
|
+
}
|
|
60
|
+
finally {
|
|
61
|
+
_d = true;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
66
|
+
finally {
|
|
67
|
+
try {
|
|
68
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
69
|
+
}
|
|
70
|
+
finally { if (e_2) throw e_2.error; }
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
function runTests(jestOptions, context) {
|
|
75
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
76
|
+
const { success } = yield (0, jest_impl_1.jestExecutor)(Object.assign(Object.assign({}, jestOptions), { watch: false }), context);
|
|
77
|
+
return success;
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
exports.default = nxPluginE2EExecutor;
|
|
81
|
+
//# sourceMappingURL=e2e.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"e2e.impl.js","sourceRoot":"","sources":["../../../../../../packages/plugin/src/executors/e2e/e2e.impl.ts"],"names":[],"mappings":";;;;AAAA,yBAAuB;AAIvB,uCAKoB;AAEpB,qEAAqE;AAGrE,iFAAiF;AACjF,SAAuB,mBAAmB,CACxC,OAAmC,EACnC,OAAwB;;;QAExB,MAAM,EAAE,MAAM,KAAqB,OAAO,EAAvB,WAAW,kBAAK,OAAO,EAApC,UAA0B,CAAU,CAAC;QAE3C,IAAI,OAAgB,CAAC;;YACrB,KAAsB,eAAA,KAAA,sBAAA,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA,IAAA;gBAA/B,cAA+B;gBAA/B,WAA+B;;oBAA1C,MAAM,CAAC,KAAA,CAAA;oBAChB,IAAI;wBACF,OAAO,GAAG,sBAAM,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC,CAAA,CAAC;qBAChD;oBAAC,OAAO,CAAC,EAAE;wBACV,eAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;wBACxB,OAAO,GAAG,KAAK,CAAC;qBACjB;;;;;aACF;;;;;;;;;QAED,6BAAO,EAAE,OAAO,EAAE,EAAC;IACrB,CAAC;CAAA;AAjBD,kDAiBC;AAED,SAAgB,cAAc,CAC5B,WAAmB,EACnB,OAAwB;;;QAExB,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,IAAA,0BAAiB,EAAC,WAAW,CAAC,CAAC;QAC1E,MAAM,kBAAkB,GAAG,IAAA,0BAAiB,EAC1C,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,EAClC,OAAO,CACR,CAAC;QACF,MAAM,mBAAmB,GAAG,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;;YAE9E,KAA2B,eAAA,KAAA,sBAAA,sBAAM,IAAA,oBAAW,EAC1C,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,EAClC,mBAAmB,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,EAC3C,OAAO,CACR,CAAA,CAAA,IAAA;gBAJ0B,cAI1B;gBAJ0B,WAI1B;;oBAJU,MAAM,MAAM,KAAA,CAAA;oBAKrB,IAAI,CAAC,MAAM,CAAC,OAAO;wBACjB,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;oBAC1D,4BAAM,MAAM,CAAC,OAAO,CAAA,CAAC;;;;;aACtB;;;;;;;;;IACH,CAAC;CAAA;AAED,SAAe,QAAQ,CACrB,WAAgC,EAChC,OAAwB;;QAExB,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,IAAA,wBAAY,kCAC/B,WAAW,KAAE,KAAK,EAAE,KAAK,KAC9B,OAAO,CACR,CAAC;QAEF,OAAO,OAAO,CAAC;IACjB,CAAC;CAAA;AAED,kBAAe,mBAAmB,CAAC"}
|