Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
build: rename to nx-mesh (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
domjtalbot authored Aug 20, 2022
1 parent db600e0 commit 625dfb8
Show file tree
Hide file tree
Showing 163 changed files with 191 additions and 213 deletions.
2 changes: 1 addition & 1 deletion .changeset/beige-planets-perform.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'nx-plugin-graphql-mesh': minor
'nx-mesh': minor
---

Add automatic port selection for `dev`, `start` & `serve` executors
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": [
"@changesets/changelog-github",
{ "repo": "domjtalbot/nx-plugin-graphql-mesh" }
{ "repo": "domjtalbot/nx-mesh" }
],
"commit": false,
"fixed": [],
Expand Down
2 changes: 1 addition & 1 deletion .changeset/dirty-drinks-drum.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'nx-plugin-graphql-mesh': major
'nx-mesh': major
---

Add `start` executor
2 changes: 1 addition & 1 deletion .changeset/moody-carrots-arrive.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'nx-plugin-graphql-mesh': major
'nx-mesh': major
---

Add `build`, `build-gateway` & `build-swc` executors
2 changes: 1 addition & 1 deletion .changeset/nine-hounds-jump.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'nx-plugin-graphql-mesh': major
'nx-mesh': major
---

Add `app` generator
2 changes: 1 addition & 1 deletion .changeset/serious-pumas-shave.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'nx-plugin-graphql-mesh': major
'nx-mesh': major
---

Add `serve` executor
2 changes: 1 addition & 1 deletion .changeset/soft-terms-run.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'nx-plugin-graphql-mesh': minor
'nx-mesh': minor
---

Update nx to 14.4.3
2 changes: 1 addition & 1 deletion .changeset/strong-insects-whisper.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'nx-plugin-graphql-mesh': major
'nx-mesh': major
---

Add mesh `validate` executor
2 changes: 1 addition & 1 deletion .changeset/ten-apples-flow.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'nx-plugin-graphql-mesh': major
'nx-mesh': major
---

Add SDK generator
12 changes: 6 additions & 6 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ runs:
with:
path: |
~/.cache/Cypress
key: ${{ runner.os }}-${{ inputs.node-version }}-cypress-dep-cache-v1-${{ hashFiles('**/pnpm-lock.yaml') }}
key: ${{ runner.os }}-${{ inputs.node-version }}-cypress-dep-cache-v2-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-${{ inputs.node-version }}-cypress-dep-cache-v1-
${{ runner.os }}-${{ inputs.node-version }}-cypress-dep-cache-v2-
- name: PNPM Repo Cache
uses: actions/cache@0865c47f36e68161719c5b124609996bb5c40129 # tag=v3
Expand All @@ -41,9 +41,9 @@ runs:
path: |
**/node_modules
!**/node_modules/.cache/nx
key: ${{ runner.os }}-${{ inputs.node-version }}-pnpm-dep-cache-v1-${{ hashFiles('**/pnpm-lock.yaml') }}
key: ${{ runner.os }}-${{ inputs.node-version }}-pnpm-dep-cache-v2-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-${{ inputs.node-version }}-pnpm-dep-cache-v1-
${{ runner.os }}-${{ inputs.node-version }}-pnpm-dep-cache-v2-
- uses: pnpm/action-setup@v2
with:
Expand All @@ -62,9 +62,9 @@ runs:
with:
path: |
${{ steps.pnpm-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-${{ inputs.node-version }}-pnpm-global-cache-v1-${{ hashFiles('**/pnpm-lock.yaml') }}
key: ${{ runner.os }}-${{ inputs.node-version }}-pnpm-global-cache-v2-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-${{ inputs.node-version }}-pnpm-global-cache-v1-
${{ runner.os }}-${{ inputs.node-version }}-pnpm-global-cache-v2-
- name: Install Node Dependencies
if: steps.pnpm-repo-cache.outputs.cache-hit != 'true'
Expand Down
11 changes: 6 additions & 5 deletions .lintstagedrc.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
export default {
'*': () => 'nx format:write',
'{nx,workspace}.json': () => 'nx workspace-lint --fix',
'**/*.{js,jsx,ts,tsx}': () => 'nx affected --target=lint --fix',
'*': () => ['nx-cloud record -- nx format:write'],
'{nx,workspace}.json': () => ['nx-cloud record -- nx workspace-lint --fix'],
'**/*.{js,jsx,ts,tsx}': () => ['nx affected --target=lint --fix'],
'{apps,libs}/**/*.*': () => [
'nx affected --target=build --parallel=1',
'nx affected --target=build --parallel=2',
'nx affected --target=build --configuration=production --parallel=2',
'nx affected --target=test --parallel=2',
'nx affected --target=validate --parallel=1',
'nx affected --target=test --parallel=1',
'nx affected --target=e2e --parallel=1',
'nx affected --target=e2e --configuration=start --parallel=1',
'nx affected --target=e2e --configuration=serve --parallel=1',
Expand Down
42 changes: 21 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@ TBC
Create a GraphQL Mesh API Gateway application for Nx.

```bash
nx generate @domjtalbot/nx-plugin-graphql-mesh:application my-api-gateway
nx generate nx-mesh:application my-api-gateway

# Alias
nx generate @domjtalbot/nx-plugin-graphql-mesh:app my-api-gateway
nx generate nx-mesh:app my-api-gateway
```

#### Example Output

```bash
> NX Generating @domjtalbot/nx-plugin-graphql-mesh:application
> NX Generating nx-mesh:application

CREATE apps/my-api-gateway/.meshrc.yml
CREATE apps/my-api-gateway/tsconfig.app.json
Expand Down Expand Up @@ -92,19 +92,19 @@ CREATE apps/my-api-gateway/.eslintrc.json
Create a GraphQL Mesh SDK library for Nx.

```bash
nx generate @domjtalbot/nx-plugin-graphql-mesh:sdk my-mesh-sdk
nx generate nx-mesh:sdk my-mesh-sdk

# Alias
nx generate @domjtalbot/nx-plugin-graphql-mesh:sdk-library my-mesh-sdk
nx generate @domjtalbot/nx-plugin-graphql-mesh:library my-mesh-sdk
nx generate nx-mesh:sdk-library my-mesh-sdk
nx generate nx-mesh:library my-mesh-sdk
```

#### Example Output

##### TSC

```bash
> NX Generating @domjtalbot/nx-plugin-graphql-mesh:sdk
> NX Generating nx-mesh:sdk

CREATE libs/my-mesh-sdk/README.md
CREATE libs/my-mesh-sdk/.babelrc
Expand All @@ -126,7 +126,7 @@ UPDATE nx.json
##### SWC

```bash
> NX Generating @domjtalbot/nx-plugin-graphql-mesh:sdk
> NX Generating nx-mesh:sdk

CREATE libs/my-mesh-sdk/README.md
CREATE libs/my-mesh-sdk/package.json
Expand Down Expand Up @@ -181,7 +181,7 @@ This is the equivalent of using `graphql-mesh dev`, but with extra steps for pac
```json
"targets": {
"build": {
"executor": "@domjtalbot/nx-plugin-graphql-mesh:build",
"executor": "nx-mesh:build",
"options": {
"dir": "libs/example-lib",
"outputPath": "dist/libs/example-lib",
Expand Down Expand Up @@ -219,7 +219,7 @@ This is the equivalent of using `graphql-mesh build`, but with extra steps for c
```json
"targets": {
"build": {
"executor": "@domjtalbot/nx-plugin-graphql-mesh:build-gateway",
"executor": "nx-mesh:build-gateway",
"options": {
"dir": "apps/example-app",
"outputPath": "dist/apps/example-app"
Expand Down Expand Up @@ -248,7 +248,7 @@ This is the equivalent of using `graphql-mesh build`, but with extra steps for p
```json
"targets": {
"build": {
"executor": "@domjtalbot/nx-plugin-graphql-mesh:build-swc",
"executor": "nx-mesh:build-swc",
"options": {
"dir": "libs/example-lib",
"outputPath": "dist/libs/example-lib",
Expand Down Expand Up @@ -288,7 +288,7 @@ This is the equifilent of using `graphql-mesh dev`.
```json
"targets": {
"dev": {
"executor": "@domjtalbot/nx-plugin-graphql-mesh:dev",
"executor": "nx-mesh:dev",
"options": {
"dir": "path/to/app/or/lib",
},
Expand Down Expand Up @@ -323,7 +323,7 @@ This is the equifilent of using `graphql-mesh start`.
```json
"targets": {
"start": {
"executor": "@domjtalbot/nx-plugin-graphql-mesh:start",
"executor": "nx-mesh:start",
"options": {
"dir": "path/to/app/or/lib",
},
Expand Down Expand Up @@ -358,7 +358,7 @@ This combines `dev` & `start` via a `dev` option toggle.
```json
"targets": {
"serve": {
"executor": "@domjtalbot/nx-plugin-graphql-mesh:serve",
"executor": "nx-mesh:serve",
"options": {
"dir": "path/to/app/or/lib",
"dev": true,
Expand Down Expand Up @@ -400,7 +400,7 @@ This is the equifilent of using `graphql-mesh validate`.
```json
"targets": {
"validate": {
"executor": "@domjtalbot/nx-plugin-graphql-mesh:validate",
"executor": "nx-mesh:validate",
"options": {
"dir": "path/to/app/or/lib",
},
Expand Down Expand Up @@ -434,12 +434,12 @@ This is the equifilent of using `graphql-mesh validate`.

### SDK

| Name | Source Handler | Framework | Compiler | Deployed |
| ------------------------------- | -------------- | --------- | -------- | -------------------------------------------------------------------------- |
| **`apps/nextjs/stackexchange`** | `openapi` | `nextjs` | `tsc` | - |
| **`apps/nextjs/trippin`** | `odata` | `nextjs` | `tsc` | [Vercel](https://nx-plugin-graphql-mesh-trippin-domjtalbot.vercel.app) |
| **`apps/nextjs/trippin-swc`** | `odata` | `nextjs` | `swc` | [Vercel](https://nx-plugin-graphql-mesh-trippin-swc-domjtalbot.vercel.app) |
| **`apps/nextjs/weatherbit`** | `new-openapi` | `nextjs` | `tsc` | - |
| Name | Source Handler | Framework | Compiler | Deployed |
| ------------------------------- | -------------- | --------- | -------- | ----------------------------------------------------------- |
| **`apps/nextjs/stackexchange`** | `openapi` | `nextjs` | `tsc` | - |
| **`apps/nextjs/trippin`** | `odata` | `nextjs` | `tsc` | [Vercel](https://nx-mesh-trippin-domjtalbot.vercel.app) |
| **`apps/nextjs/trippin-swc`** | `odata` | `nextjs` | `swc` | [Vercel](https://nx-mesh-trippin-swc-domjtalbot.vercel.app) |
| **`apps/nextjs/weatherbit`** | `new-openapi` | `nextjs` | `tsc` | - |

<br/>
<br/>
Expand Down
6 changes: 3 additions & 3 deletions apps/api-gateway/javascript-wiki/cjs-config/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"sourceRoot": "apps/api-gateway/javascript-wiki/cjs-config/",
"targets": {
"build": {
"executor": "@domjtalbot/nx-plugin-graphql-mesh:build-gateway",
"executor": "nx-mesh:build-gateway",
"outputs": [
"apps/api-gateway/javascript-wiki/cjs-config/.mesh",
"{options.outputPath}"
Expand All @@ -15,7 +15,7 @@
}
},
"serve": {
"executor": "@domjtalbot/nx-plugin-graphql-mesh:serve",
"executor": "nx-mesh:serve",
"options": {
"dev": true,
"dir": "apps/api-gateway/javascript-wiki/cjs-config"
Expand All @@ -28,7 +28,7 @@
}
},
"validate": {
"executor": "@domjtalbot/nx-plugin-graphql-mesh:validate",
"executor": "nx-mesh:validate",
"options": {
"dir": "apps/api-gateway/javascript-wiki/cjs-config"
}
Expand Down
6 changes: 3 additions & 3 deletions apps/api-gateway/javascript-wiki/js-config/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"sourceRoot": "apps/api-gateway/javascript-wiki/js-config/",
"targets": {
"build": {
"executor": "@domjtalbot/nx-plugin-graphql-mesh:build-gateway",
"executor": "nx-mesh:build-gateway",
"outputs": [
"apps/api-gateway/javascript-wiki/js-config/.mesh",
"{options.outputPath}"
Expand All @@ -15,7 +15,7 @@
}
},
"serve": {
"executor": "@domjtalbot/nx-plugin-graphql-mesh:serve",
"executor": "nx-mesh:serve",
"options": {
"dev": true,
"dir": "apps/api-gateway/javascript-wiki/js-config"
Expand All @@ -28,7 +28,7 @@
}
},
"validate": {
"executor": "@domjtalbot/nx-plugin-graphql-mesh:validate",
"executor": "nx-mesh:validate",
"options": {
"dir": "apps/api-gateway/javascript-wiki/js-config"
}
Expand Down
6 changes: 3 additions & 3 deletions apps/api-gateway/javascript-wiki/json-config/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"sourceRoot": "apps/api-gateway/javascript-wiki/json-config/",
"targets": {
"build": {
"executor": "@domjtalbot/nx-plugin-graphql-mesh:build-gateway",
"executor": "nx-mesh:build-gateway",
"outputs": [
"apps/api-gateway/javascript-wiki/json-config/.mesh",
"{options.outputPath}"
Expand All @@ -15,7 +15,7 @@
}
},
"serve": {
"executor": "@domjtalbot/nx-plugin-graphql-mesh:serve",
"executor": "nx-mesh:serve",
"options": {
"dev": true,
"dir": "apps/api-gateway/javascript-wiki/json-config"
Expand All @@ -28,7 +28,7 @@
}
},
"validate": {
"executor": "@domjtalbot/nx-plugin-graphql-mesh:validate",
"executor": "nx-mesh:validate",
"options": {
"dir": "apps/api-gateway/javascript-wiki/json-config"
}
Expand Down
6 changes: 3 additions & 3 deletions apps/api-gateway/javascript-wiki/yml-config/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"sourceRoot": "apps/api-gateway/javascript-wiki/yml-config/",
"targets": {
"build": {
"executor": "@domjtalbot/nx-plugin-graphql-mesh:build-gateway",
"executor": "nx-mesh:build-gateway",
"outputs": [
"apps/api-gateway/javascript-wiki/yml-config/.mesh",
"{options.outputPath}"
Expand All @@ -15,7 +15,7 @@
}
},
"serve": {
"executor": "@domjtalbot/nx-plugin-graphql-mesh:serve",
"executor": "nx-mesh:serve",
"options": {
"dev": true,
"dir": "apps/api-gateway/javascript-wiki/yml-config"
Expand All @@ -28,7 +28,7 @@
}
},
"validate": {
"executor": "@domjtalbot/nx-plugin-graphql-mesh:validate",
"executor": "nx-mesh:validate",
"options": {
"dir": "apps/api-gateway/javascript-wiki/yml-config"
}
Expand Down
Loading

0 comments on commit 625dfb8

Please sign in to comment.