fix(nx-dev): fix project details in nx dev (#23175)
<!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> ## Current Behavior <!-- This is the behavior we have today --> ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> fix project details in nx dev add metadata to nx dev's project details json ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #
This commit is contained in:
parent
30446df23b
commit
fd5ea92062
@ -62,6 +62,15 @@ nx show project myproject-e2e --web
|
|||||||
"project": {
|
"project": {
|
||||||
"name": "admin-e2e",
|
"name": "admin-e2e",
|
||||||
"data": {
|
"data": {
|
||||||
|
"metadata": {
|
||||||
|
"targetGroups": {
|
||||||
|
"E2E (CI)": [
|
||||||
|
"e2e-ci--src/e2e/app.cy.ts",
|
||||||
|
"e2e-ci--src/e2e/login.cy.ts",
|
||||||
|
"e2e-ci"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": "apps/admin-e2e",
|
"root": "apps/admin-e2e",
|
||||||
"projectType": "application",
|
"projectType": "application",
|
||||||
"targets": {
|
"targets": {
|
||||||
@ -82,6 +91,9 @@ nx show project myproject-e2e --web
|
|||||||
"production": {
|
"production": {
|
||||||
"command": "cypress run --env webServerCommand=\"nx run admin:preview\""
|
"command": "cypress run --env webServerCommand=\"nx run admin:preview\""
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["cypress"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"e2e-ci--src/e2e/app.cy.ts": {
|
"e2e-ci--src/e2e/app.cy.ts": {
|
||||||
@ -102,7 +114,10 @@ nx show project myproject-e2e --web
|
|||||||
"command": "cypress run --env webServerCommand=\"nx run admin:serve-static\" --spec src/e2e/app.cy.ts"
|
"command": "cypress run --env webServerCommand=\"nx run admin:serve-static\" --spec src/e2e/app.cy.ts"
|
||||||
},
|
},
|
||||||
"executor": "nx:run-commands",
|
"executor": "nx:run-commands",
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["cypress"]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"e2e-ci--src/e2e/login.cy.ts": {
|
"e2e-ci--src/e2e/login.cy.ts": {
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@ -122,7 +137,10 @@ nx show project myproject-e2e --web
|
|||||||
"command": "cypress run --env webServerCommand=\"nx run admin:serve-static\" --spec src/e2e/login.cy.ts"
|
"command": "cypress run --env webServerCommand=\"nx run admin:serve-static\" --spec src/e2e/login.cy.ts"
|
||||||
},
|
},
|
||||||
"executor": "nx:run-commands",
|
"executor": "nx:run-commands",
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["cypress"]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"e2e-ci": {
|
"e2e-ci": {
|
||||||
"executor": "nx:noop",
|
"executor": "nx:noop",
|
||||||
@ -151,7 +169,10 @@ nx show project myproject-e2e --web
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"options": {},
|
"options": {},
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["cypress"]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nx/eslint:lint",
|
"executor": "@nx/eslint:lint",
|
||||||
@ -159,7 +180,10 @@ nx show project myproject-e2e --web
|
|||||||
"cache": true,
|
"cache": true,
|
||||||
"outputs": ["{options.outputFile}"],
|
"outputs": ["{options.outputFile}"],
|
||||||
"options": {},
|
"options": {},
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["eslint"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"name": "admin-e2e",
|
"name": "admin-e2e",
|
||||||
|
|||||||
@ -218,6 +218,11 @@ nx show project e2e --web
|
|||||||
"name": "e2e",
|
"name": "e2e",
|
||||||
"type": "e2e",
|
"type": "e2e",
|
||||||
"data": {
|
"data": {
|
||||||
|
"metadata": {
|
||||||
|
"targetGroups": {
|
||||||
|
"E2E (CI)": ["e2e-ci--src/e2e/app.cy.ts", "e2e-ci"]
|
||||||
|
}
|
||||||
|
},
|
||||||
"name": "e2e",
|
"name": "e2e",
|
||||||
"root": "e2e",
|
"root": "e2e",
|
||||||
"sourceRoot": "e2e/src",
|
"sourceRoot": "e2e/src",
|
||||||
@ -247,7 +252,10 @@ nx show project e2e --web
|
|||||||
"command": "cypress run --env webServerCommand=\"nx run myngapp:serve:production\""
|
"command": "cypress run --env webServerCommand=\"nx run myngapp:serve:production\""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"executor": "nx:run-commands"
|
"executor": "nx:run-commands",
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["cypress"]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"e2e-ci--src/e2e/app.cy.ts": {
|
"e2e-ci--src/e2e/app.cy.ts": {
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@ -267,7 +275,10 @@ nx show project e2e --web
|
|||||||
"command": "cypress run --env webServerCommand=\"nx run myngapp:serve-static\" --spec src/e2e/app.cy.ts"
|
"command": "cypress run --env webServerCommand=\"nx run myngapp:serve-static\" --spec src/e2e/app.cy.ts"
|
||||||
},
|
},
|
||||||
"executor": "nx:run-commands",
|
"executor": "nx:run-commands",
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["cypress"]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"e2e-ci": {
|
"e2e-ci": {
|
||||||
"executor": "nx:noop",
|
"executor": "nx:noop",
|
||||||
@ -291,7 +302,10 @@ nx show project e2e --web
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"options": {},
|
"options": {},
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["cypress"]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"cache": true,
|
"cache": true,
|
||||||
@ -309,7 +323,10 @@ nx show project e2e --web
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"executor": "nx:run-commands",
|
"executor": "nx:run-commands",
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["eslint"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -635,6 +635,11 @@ nx show project angular-store-e2e --web
|
|||||||
"name": "angular-store-e2e",
|
"name": "angular-store-e2e",
|
||||||
"type": "e2e",
|
"type": "e2e",
|
||||||
"data": {
|
"data": {
|
||||||
|
"metadata": {
|
||||||
|
"targetGroups": {
|
||||||
|
"E2E (CI)": ["e2e-ci--src/e2e/app.cy.ts", "e2e-ci"]
|
||||||
|
}
|
||||||
|
},
|
||||||
"name": "angular-store-e2e",
|
"name": "angular-store-e2e",
|
||||||
"root": "apps/angular-store-e2e",
|
"root": "apps/angular-store-e2e",
|
||||||
"sourceRoot": "apps/angular-store-e2e/src",
|
"sourceRoot": "apps/angular-store-e2e/src",
|
||||||
@ -664,7 +669,10 @@ nx show project angular-store-e2e --web
|
|||||||
"command": "cypress run --env webServerCommand=\"nx run angular-store:serve:production\""
|
"command": "cypress run --env webServerCommand=\"nx run angular-store:serve:production\""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"executor": "nx:run-commands"
|
"executor": "nx:run-commands",
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["cypress"]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"e2e-ci--src/e2e/app.cy.ts": {
|
"e2e-ci--src/e2e/app.cy.ts": {
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@ -684,7 +692,10 @@ nx show project angular-store-e2e --web
|
|||||||
"command": "cypress run --env webServerCommand=\"nx run angular-store:serve-static\" --spec src/e2e/app.cy.ts"
|
"command": "cypress run --env webServerCommand=\"nx run angular-store:serve-static\" --spec src/e2e/app.cy.ts"
|
||||||
},
|
},
|
||||||
"executor": "nx:run-commands",
|
"executor": "nx:run-commands",
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["cypress"]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"e2e-ci": {
|
"e2e-ci": {
|
||||||
"executor": "nx:noop",
|
"executor": "nx:noop",
|
||||||
@ -708,7 +719,10 @@ nx show project angular-store-e2e --web
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"options": {},
|
"options": {},
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["cypress"]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"cache": true,
|
"cache": true,
|
||||||
@ -726,7 +740,10 @@ nx show project angular-store-e2e --web
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"executor": "nx:run-commands",
|
"executor": "nx:run-commands",
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["eslint"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,7 +21,10 @@
|
|||||||
],
|
],
|
||||||
"outputs": ["{workspaceRoot}/dist/apps/myreactapp"],
|
"outputs": ["{workspaceRoot}/dist/apps/myreactapp"],
|
||||||
"executor": "nx:run-commands",
|
"executor": "nx:run-commands",
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["vite"]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"serve": {
|
"serve": {
|
||||||
"options": {
|
"options": {
|
||||||
@ -29,7 +32,10 @@
|
|||||||
"command": "vite serve"
|
"command": "vite serve"
|
||||||
},
|
},
|
||||||
"executor": "nx:run-commands",
|
"executor": "nx:run-commands",
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["vite"]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"preview": {
|
"preview": {
|
||||||
"options": {
|
"options": {
|
||||||
@ -37,7 +43,10 @@
|
|||||||
"command": "vite preview"
|
"command": "vite preview"
|
||||||
},
|
},
|
||||||
"executor": "nx:run-commands",
|
"executor": "nx:run-commands",
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["vite"]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"serve-static": {
|
"serve-static": {
|
||||||
"executor": "@nx/web:file-server",
|
"executor": "@nx/web:file-server",
|
||||||
@ -61,7 +70,10 @@
|
|||||||
],
|
],
|
||||||
"outputs": ["{workspaceRoot}/coverage/apps/myreactapp"],
|
"outputs": ["{workspaceRoot}/coverage/apps/myreactapp"],
|
||||||
"executor": "nx:run-commands",
|
"executor": "nx:run-commands",
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["vite"]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"cache": true,
|
"cache": true,
|
||||||
@ -79,7 +91,10 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"executor": "nx:run-commands",
|
"executor": "nx:run-commands",
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["eslint"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"name": "myreactapp",
|
"name": "myreactapp",
|
||||||
@ -87,7 +102,10 @@
|
|||||||
"sourceRoot": "apps/myreactapp/src",
|
"sourceRoot": "apps/myreactapp/src",
|
||||||
"projectType": "application",
|
"projectType": "application",
|
||||||
"tags": [],
|
"tags": [],
|
||||||
"implicitDependencies": []
|
"implicitDependencies": [],
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["react"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sourceMap": {
|
"sourceMap": {
|
||||||
|
|||||||
@ -133,7 +133,10 @@ nx show project my-workspace --web
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"executor": "nx:run-commands",
|
"executor": "nx:run-commands",
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["eslint"]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"next:build": {
|
"next:build": {
|
||||||
"options": {
|
"options": {
|
||||||
@ -151,7 +154,10 @@ nx show project my-workspace --web
|
|||||||
],
|
],
|
||||||
"outputs": ["{projectRoot}/.next", "{projectRoot}/.next/!(cache)"],
|
"outputs": ["{projectRoot}/.next", "{projectRoot}/.next/!(cache)"],
|
||||||
"executor": "nx:run-commands",
|
"executor": "nx:run-commands",
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["next"]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"dev": {
|
"dev": {
|
||||||
"options": {
|
"options": {
|
||||||
@ -159,7 +165,10 @@ nx show project my-workspace --web
|
|||||||
"command": "next dev"
|
"command": "next dev"
|
||||||
},
|
},
|
||||||
"executor": "nx:run-commands",
|
"executor": "nx:run-commands",
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["next"]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"start": {
|
"start": {
|
||||||
"options": {
|
"options": {
|
||||||
@ -168,7 +177,10 @@ nx show project my-workspace --web
|
|||||||
},
|
},
|
||||||
"dependsOn": ["build"],
|
"dependsOn": ["build"],
|
||||||
"executor": "nx:run-commands",
|
"executor": "nx:run-commands",
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["next"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sourceRoot": ".",
|
"sourceRoot": ".",
|
||||||
|
|||||||
@ -136,7 +136,10 @@ nx show project my-workspace --web
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"executor": "nx:run-commands",
|
"executor": "nx:run-commands",
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["eslint"]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"next:build": {
|
"next:build": {
|
||||||
"options": {
|
"options": {
|
||||||
@ -154,7 +157,10 @@ nx show project my-workspace --web
|
|||||||
],
|
],
|
||||||
"outputs": ["{projectRoot}/.next", "{projectRoot}/.next/!(cache)"],
|
"outputs": ["{projectRoot}/.next", "{projectRoot}/.next/!(cache)"],
|
||||||
"executor": "nx:run-commands",
|
"executor": "nx:run-commands",
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["next"]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"dev": {
|
"dev": {
|
||||||
"options": {
|
"options": {
|
||||||
@ -162,7 +168,10 @@ nx show project my-workspace --web
|
|||||||
"command": "next dev"
|
"command": "next dev"
|
||||||
},
|
},
|
||||||
"executor": "nx:run-commands",
|
"executor": "nx:run-commands",
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["next"]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"start": {
|
"start": {
|
||||||
"options": {
|
"options": {
|
||||||
@ -171,7 +180,10 @@ nx show project my-workspace --web
|
|||||||
},
|
},
|
||||||
"dependsOn": ["build"],
|
"dependsOn": ["build"],
|
||||||
"executor": "nx:run-commands",
|
"executor": "nx:run-commands",
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["next"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sourceRoot": ".",
|
"sourceRoot": ".",
|
||||||
|
|||||||
@ -129,6 +129,9 @@ nx show project myreactapp --web
|
|||||||
"project": {
|
"project": {
|
||||||
"name": "myreactapp",
|
"name": "myreactapp",
|
||||||
"data": {
|
"data": {
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["react"]
|
||||||
|
},
|
||||||
"root": ".",
|
"root": ".",
|
||||||
"includedScripts": [],
|
"includedScripts": [],
|
||||||
"name": "myreactapp",
|
"name": "myreactapp",
|
||||||
@ -149,7 +152,10 @@ nx show project myreactapp --web
|
|||||||
],
|
],
|
||||||
"outputs": ["{projectRoot}/dist/myreactapp"],
|
"outputs": ["{projectRoot}/dist/myreactapp"],
|
||||||
"executor": "nx:run-commands",
|
"executor": "nx:run-commands",
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["vite"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sourceRoot": "./src",
|
"sourceRoot": "./src",
|
||||||
|
|||||||
@ -138,6 +138,9 @@ nx show project react-store --web
|
|||||||
"project": {
|
"project": {
|
||||||
"name": "react-store",
|
"name": "react-store",
|
||||||
"data": {
|
"data": {
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["react"]
|
||||||
|
},
|
||||||
"root": "apps/react-store",
|
"root": "apps/react-store",
|
||||||
"includedScripts": [],
|
"includedScripts": [],
|
||||||
"name": "react-store",
|
"name": "react-store",
|
||||||
@ -158,7 +161,10 @@ nx show project react-store --web
|
|||||||
],
|
],
|
||||||
"outputs": ["{workspaceRoot}/dist/apps/react-store"],
|
"outputs": ["{workspaceRoot}/dist/apps/react-store"],
|
||||||
"executor": "nx:run-commands",
|
"executor": "nx:run-commands",
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["vite"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sourceRoot": "apps/react-store/src",
|
"sourceRoot": "apps/react-store/src",
|
||||||
|
|||||||
@ -50,7 +50,10 @@ And the following [final configuration](/reference/project-configuration):
|
|||||||
],
|
],
|
||||||
"outputs": ["{workspaceRoot}/dist/apps/my-app"],
|
"outputs": ["{workspaceRoot}/dist/apps/my-app"],
|
||||||
"executor": "nx:run-commands",
|
"executor": "nx:run-commands",
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["vite"]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"serve": {
|
"serve": {
|
||||||
"options": {
|
"options": {
|
||||||
@ -58,7 +61,10 @@ And the following [final configuration](/reference/project-configuration):
|
|||||||
"command": "vite serve"
|
"command": "vite serve"
|
||||||
},
|
},
|
||||||
"executor": "nx:run-commands",
|
"executor": "nx:run-commands",
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["vite"]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"preview": {
|
"preview": {
|
||||||
"options": {
|
"options": {
|
||||||
@ -66,7 +72,10 @@ And the following [final configuration](/reference/project-configuration):
|
|||||||
"command": "vite preview"
|
"command": "vite preview"
|
||||||
},
|
},
|
||||||
"executor": "nx:run-commands",
|
"executor": "nx:run-commands",
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["vite"]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"test": {
|
"test": {
|
||||||
"options": {
|
"options": {
|
||||||
@ -83,7 +92,10 @@ And the following [final configuration](/reference/project-configuration):
|
|||||||
],
|
],
|
||||||
"outputs": ["{workspaceRoot}/coverage/apps/my-app"],
|
"outputs": ["{workspaceRoot}/coverage/apps/my-app"],
|
||||||
"executor": "nx:run-commands",
|
"executor": "nx:run-commands",
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["vite"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tags": [],
|
"tags": [],
|
||||||
|
|||||||
@ -26,6 +26,9 @@ nx show project myproject --web
|
|||||||
"executor": "nx:run-commands",
|
"executor": "nx:run-commands",
|
||||||
"options": {
|
"options": {
|
||||||
"command": "vite dev"
|
"command": "vite dev"
|
||||||
|
},
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["vite"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"build": {
|
"build": {
|
||||||
@ -34,6 +37,9 @@ nx show project myproject --web
|
|||||||
"outputs": ["{projectRoot}/dist"],
|
"outputs": ["{projectRoot}/dist"],
|
||||||
"options": {
|
"options": {
|
||||||
"command": "vite build"
|
"command": "vite build"
|
||||||
|
},
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["vite"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -127,6 +127,9 @@ nx show project myvueapp --web
|
|||||||
"project": {
|
"project": {
|
||||||
"name": "myvueapp",
|
"name": "myvueapp",
|
||||||
"data": {
|
"data": {
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["vue"]
|
||||||
|
},
|
||||||
"root": ".",
|
"root": ".",
|
||||||
"includedScripts": [],
|
"includedScripts": [],
|
||||||
"name": "myvueapp",
|
"name": "myvueapp",
|
||||||
@ -147,7 +150,10 @@ nx show project myvueapp --web
|
|||||||
],
|
],
|
||||||
"outputs": ["{projectRoot}/dist/myvueapp"],
|
"outputs": ["{projectRoot}/dist/myvueapp"],
|
||||||
"executor": "nx:run-commands",
|
"executor": "nx:run-commands",
|
||||||
"configurations": {}
|
"configurations": {},
|
||||||
|
"metadata": {
|
||||||
|
"technologies": ["vite"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sourceRoot": "./src",
|
"sourceRoot": "./src",
|
||||||
|
|||||||
@ -106,12 +106,18 @@ export function ProjectDetailsWrapper({
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const expandedTargetsParams = searchParams.get('expanded')?.split(',');
|
const expandedTargetsParams = searchParams.get('expanded')?.split(',');
|
||||||
if (expandedTargetsParams && expandedTargetsParams.length > 0) {
|
if (
|
||||||
|
expandedTargetsParams &&
|
||||||
|
expandedTargetsParams.length > 0 &&
|
||||||
|
setExpandedTargets
|
||||||
|
) {
|
||||||
setExpandedTargets(expandedTargetsParams);
|
setExpandedTargets(expandedTargetsParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
collapseAllTargets();
|
if (collapseAllTargets) {
|
||||||
|
collapseAllTargets();
|
||||||
|
}
|
||||||
setSearchParams(
|
setSearchParams(
|
||||||
(currentSearchParams) => {
|
(currentSearchParams) => {
|
||||||
currentSearchParams.delete('expanded');
|
currentSearchParams.delete('expanded');
|
||||||
|
|||||||
@ -1,9 +1,13 @@
|
|||||||
import type { Meta } from '@storybook/react';
|
import type { Meta } from '@storybook/react';
|
||||||
import { ProjectDetails } from './project-details';
|
import { ProjectDetails } from './project-details';
|
||||||
|
import { ExpandedTargetsProvider } from '@nx/graph/shared';
|
||||||
|
|
||||||
const meta: Meta<typeof ProjectDetails> = {
|
const meta: Meta<typeof ProjectDetails> = {
|
||||||
component: ProjectDetails,
|
component: ProjectDetails,
|
||||||
title: 'ProjectDetails',
|
title: 'ProjectDetails',
|
||||||
|
decorators: [
|
||||||
|
(story) => <ExpandedTargetsProvider>{story()}</ExpandedTargetsProvider>,
|
||||||
|
],
|
||||||
};
|
};
|
||||||
export default meta;
|
export default meta;
|
||||||
|
|
||||||
|
|||||||
@ -12,8 +12,8 @@ import { PropertyInfoTooltip, Tooltip } from '@nx/graph/ui-tooltips';
|
|||||||
import { TooltipTriggerText } from '../target-configuration-details/tooltip-trigger-text';
|
import { TooltipTriggerText } from '../target-configuration-details/tooltip-trigger-text';
|
||||||
import { twMerge } from 'tailwind-merge';
|
import { twMerge } from 'tailwind-merge';
|
||||||
import { Pill } from '../pill';
|
import { Pill } from '../pill';
|
||||||
import { TargetConfigurationDetailsList } from '../target-configuration-details-list/target-configuration-details-list';
|
|
||||||
import { TargetTechnologies } from '../target-technologies/target-technologies';
|
import { TargetTechnologies } from '../target-technologies/target-technologies';
|
||||||
|
import { TargetConfigurationGroupList } from '../target-configuration-details-group-list/target-configuration-details-group-list';
|
||||||
|
|
||||||
export interface ProjectDetailsProps {
|
export interface ProjectDetailsProps {
|
||||||
project: ProjectGraphProjectNode;
|
project: ProjectGraphProjectNode;
|
||||||
@ -145,7 +145,7 @@ export const ProjectDetails = ({
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<TargetConfigurationDetailsList
|
<TargetConfigurationGroupList
|
||||||
className="w-full"
|
className="w-full"
|
||||||
project={project}
|
project={project}
|
||||||
sourceMap={sourceMap}
|
sourceMap={sourceMap}
|
||||||
|
|||||||
@ -3,10 +3,14 @@ import {
|
|||||||
TargetConfigurationGroupList,
|
TargetConfigurationGroupList,
|
||||||
TargetConfigurationGroupListProps,
|
TargetConfigurationGroupListProps,
|
||||||
} from './target-configuration-details-group-list';
|
} from './target-configuration-details-group-list';
|
||||||
|
import { ExpandedTargetsProvider } from '@nx/graph/shared';
|
||||||
|
|
||||||
const meta: Meta<typeof TargetConfigurationGroupList> = {
|
const meta: Meta<typeof TargetConfigurationGroupList> = {
|
||||||
component: TargetConfigurationGroupList,
|
component: TargetConfigurationGroupList,
|
||||||
title: 'TargetConfigurationGroupList',
|
title: 'TargetConfigurationGroupList',
|
||||||
|
decorators: [
|
||||||
|
(story) => <ExpandedTargetsProvider>{story()}</ExpandedTargetsProvider>,
|
||||||
|
],
|
||||||
};
|
};
|
||||||
export default meta;
|
export default meta;
|
||||||
|
|
||||||
|
|||||||
@ -1,92 +0,0 @@
|
|||||||
import type { Meta, StoryObj } from '@storybook/react';
|
|
||||||
import {
|
|
||||||
TargetConfigurationDetailsList,
|
|
||||||
TargetConfigurationDetailsListProps,
|
|
||||||
} from './target-configuration-details-list';
|
|
||||||
|
|
||||||
const meta: Meta<typeof TargetConfigurationDetailsList> = {
|
|
||||||
component: TargetConfigurationDetailsList,
|
|
||||||
title: 'TargetConfigurationDetailsList',
|
|
||||||
};
|
|
||||||
export default meta;
|
|
||||||
|
|
||||||
type Story = StoryObj<typeof TargetConfigurationDetailsList>;
|
|
||||||
|
|
||||||
export const OneTarget: Story = {
|
|
||||||
args: {
|
|
||||||
project: {
|
|
||||||
name: 'react',
|
|
||||||
type: 'lib',
|
|
||||||
data: {
|
|
||||||
root: 'libs/react',
|
|
||||||
targets: {
|
|
||||||
build: {
|
|
||||||
executor: 'nx',
|
|
||||||
options: {},
|
|
||||||
configurations: {
|
|
||||||
production: {
|
|
||||||
executor: 'nx',
|
|
||||||
options: {},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
lint: {
|
|
||||||
executor: 'nx',
|
|
||||||
options: {},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
sourceMap: {
|
|
||||||
react: ['react'],
|
|
||||||
},
|
|
||||||
variant: 'default',
|
|
||||||
onRunTarget: () => {},
|
|
||||||
onViewInTaskGraph: () => {},
|
|
||||||
selectedTargetGroup: 'build',
|
|
||||||
setExpandTargets: () => {},
|
|
||||||
collapseAllTargets: () => {},
|
|
||||||
} as TargetConfigurationDetailsListProps,
|
|
||||||
};
|
|
||||||
|
|
||||||
export const TwoTargets: Story = {
|
|
||||||
args: {
|
|
||||||
project: {
|
|
||||||
name: 'react',
|
|
||||||
type: 'lib',
|
|
||||||
data: {
|
|
||||||
root: 'libs/react',
|
|
||||||
targets: {
|
|
||||||
build1: {
|
|
||||||
executor: 'nx',
|
|
||||||
options: {},
|
|
||||||
configurations: {
|
|
||||||
production: {
|
|
||||||
executor: 'nx',
|
|
||||||
options: {},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
build2: {
|
|
||||||
executor: 'nx',
|
|
||||||
options: {},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
metadata: {
|
|
||||||
targetGroups: {
|
|
||||||
build: ['build1', 'build2'],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
sourceMap: {
|
|
||||||
react: ['react'],
|
|
||||||
},
|
|
||||||
variant: 'default',
|
|
||||||
onRunTarget: () => {},
|
|
||||||
onViewInTaskGraph: () => {},
|
|
||||||
selectedTargetGroup: 'build',
|
|
||||||
setExpandTargets: () => {},
|
|
||||||
collapseAllTargets: () => {},
|
|
||||||
} as TargetConfigurationDetailsListProps,
|
|
||||||
};
|
|
||||||
@ -1,36 +0,0 @@
|
|||||||
/* eslint-disable @nx/enforce-module-boundaries */
|
|
||||||
// nx-ignore-next-line
|
|
||||||
import type { ProjectGraphProjectNode } from '@nx/devkit';
|
|
||||||
import { TargetConfigurationGroupList } from '../target-configuration-details-group-list/target-configuration-details-group-list';
|
|
||||||
|
|
||||||
export interface TargetConfigurationDetailsListProps {
|
|
||||||
project: ProjectGraphProjectNode;
|
|
||||||
sourceMap: Record<string, string[]>;
|
|
||||||
variant?: 'default' | 'compact';
|
|
||||||
onRunTarget?: (data: { projectName: string; targetName: string }) => void;
|
|
||||||
onViewInTaskGraph?: (data: {
|
|
||||||
projectName: string;
|
|
||||||
targetName: string;
|
|
||||||
}) => void;
|
|
||||||
className?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function TargetConfigurationDetailsList({
|
|
||||||
project,
|
|
||||||
variant,
|
|
||||||
sourceMap,
|
|
||||||
onRunTarget,
|
|
||||||
onViewInTaskGraph,
|
|
||||||
className,
|
|
||||||
}: TargetConfigurationDetailsListProps) {
|
|
||||||
return (
|
|
||||||
<TargetConfigurationGroupList
|
|
||||||
project={project}
|
|
||||||
sourceMap={sourceMap}
|
|
||||||
variant={variant}
|
|
||||||
onRunTarget={onRunTarget}
|
|
||||||
onViewInTaskGraph={onViewInTaskGraph}
|
|
||||||
className={className}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -1,5 +1,6 @@
|
|||||||
import { JSX, ReactElement, useEffect, useState } from 'react';
|
import { JSX, ReactElement, useEffect, useState } from 'react';
|
||||||
import { ProjectDetails as ProjectDetailsUi } from '@nx/graph/ui-project-details';
|
import { ProjectDetails as ProjectDetailsUi } from '@nx/graph/ui-project-details';
|
||||||
|
import { ExpandedTargetsProvider } from '@nx/graph/shared';
|
||||||
|
|
||||||
export function Loading() {
|
export function Loading() {
|
||||||
return (
|
return (
|
||||||
@ -80,11 +81,13 @@ export function ProjectDetails({
|
|||||||
height ? `p-4 h-[${height}] overflow-y-auto` : 'p-4'
|
height ? `p-4 h-[${height}] overflow-y-auto` : 'p-4'
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<ProjectDetailsUi
|
<ExpandedTargetsProvider>
|
||||||
project={parsedProps.project}
|
<ProjectDetailsUi
|
||||||
sourceMap={parsedProps.sourceMap}
|
project={parsedProps.project}
|
||||||
variant="compact"
|
sourceMap={parsedProps.sourceMap}
|
||||||
/>
|
variant="compact"
|
||||||
|
/>
|
||||||
|
</ExpandedTargetsProvider>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user