Skip to content

Commit

Permalink
build: restructure folders (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
domjtalbot committed Mar 9, 2023
1 parent 82234b5 commit 3645190
Show file tree
Hide file tree
Showing 380 changed files with 672 additions and 667 deletions.
5 changes: 5 additions & 0 deletions .changeset/beige-walls-hug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'nx-mesh': patch
---

Rename `star-wars-api` to `star-wars`
2 changes: 1 addition & 1 deletion .github/workflows/__build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
if: inputs.node_version == 'lts'
shell: bash
run: |
cd dist/libs
cd dist/packages
tar cvzf nx-mesh.tar.gz nx-mesh
mv nx-mesh.tar.gz ../../
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/__changesets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
- name: Modify Workspace File
run: |
sed -e 's/libs\//dist\/libs\//g' pnpm-workspace.yaml > pnpm-workspace-dist.yaml
sed -e 's/packages\//dist\/packages\//g' pnpm-workspace.yaml > pnpm-workspace-dist.yaml
mv pnpm-workspace-dist.yaml pnpm-workspace.yaml
- name: Create Release Pull Request or Publish packages
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/__code-analysis--codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ jobs:
- name: Upload Lint CodeQL
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: reports/libs/nx-mesh/lint.sarif
sarif_file: reports/packages/nx-mesh/lint.sarif
wait-for-processing: true
2 changes: 1 addition & 1 deletion .github/workflows/__code-analysis--sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
id: version
uses: notiz-dev/github-action-json-property@a5a9c668b16513c737c3e1f8956772c99c73f6e8 # v0.2.0
with:
path: 'libs/nx-mesh/package.json'
path: 'packages/nx-mesh/package.json'
prop_path: 'version'

- name: SonarCloud Scan
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/__deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ jobs:
echo The env is $name
echo "name=$name" >> $GITHUB_OUTPUT
vercel-example-sdk-nextjs:
name: Vercel - example-sdk-nextjs
vercel-examples-sdk-nextjs:
name: Vercel - examples-sdk-nextjs
needs: [setup]
if: ${{ (inputs.affected == true && contains(needs.setup.outputs.affectedApps, 'example-sdk-nextjs')) || inputs.affected == false }}
if: ${{ (inputs.affected == true && contains(needs.setup.outputs.affectedApps, 'examples-sdk-nextjs')) || inputs.affected == false }}
uses: ./.github/workflows/__deploy-vercel.yml
with:
name: example-sdk-nextjs${{ needs.setup.outputs.suffix }}
name: examples-sdk-nextjs${{ needs.setup.outputs.suffix }}
production: ${{ inputs.production }}
secrets:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/__generators.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
The Nx version to test against
required: false
type: string
default: '["country-info", "fake-api", "rfam", "stackexchange", "star-wars-api", "trippin"]'
default: '["country-info", "fake-api", "rfam", "stackexchange", "star-wars", "trippin"]'
node_version:
description: >
Optionally define the version of Node to install via Volta.
Expand All @@ -28,7 +28,7 @@ on:
The Nx version to test against
required: false
type: string
default: '["15.4", "15.5", "15.6", "15.7", "15.8", "latest"]'
default: '["15.7", "15.8", "latest"]'
save_cache:
description: >
Should the cache be saved upon completion?
Expand Down
2 changes: 1 addition & 1 deletion .lintstagedrc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export default {
'*': () => ['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}/**/*.*': () => [
'{examples,packages}/**/*.*': () => [
'nx affected --target=build --parallel=2',
'nx affected --target=build --configuration=production --parallel=2',
'nx affected --target=test --parallel=2',
Expand Down
54 changes: 27 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,21 +146,21 @@ CREATE apps/my-api-gateway/.eslintrc.json
<details>
<summary>`application` generator options</summary>

| Name | Alias | Type | Required | Default | Description |
| ------------------------- | ----- | ------------------------------------------------------------------------------------------------------------ | :------: | --------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `name` | - | `string` || - | What name would you like to use for the application? |
| `directory` | `d` | `string` | - | - | The directory of the new application. |
| `meshConfig` | `mc` | `cjs`, `js`, `json`, `yml` | - | `yml` | Which config format would you like to use? |
| `example` | - | `country-info`, `fake-api`, `javascript-wiki`, `movies`, `rfam`, `stackexchange`, `star-wars-api`, `trippin` | - | `star-wars-api` | Which example project would you like to use? |
| `babelJest` | - | `boolean` | - | `false` | Use `babel` instead of `ts-jest`? |
| `e2eTestRunner` | - | `cypress`, `none` | - | `cypress` | Test runner to use for end to end (E2E) tests. |
| `linter` | - | `eslint`, `tslint` | - | `eslint` | The tool to use for running lint checks |
| `setParserOptionsProject` | - | `boolean` | - | `false` | Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons. |
| `skipFormat` | - | `boolean` | - | `false` | Skip formatting files. |
| `skipWorkspaceJson` | - | `boolean` | - | `false` | Skip updating `workspace.json` with default options based on values provided to this app (e.g. `babel`). |
| `standaloneConfig` | - | `boolean` | - | `false` | Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json` |
| `tags` | `t` | `string` | - | - | Add tags to the application (used for linting). |
| `unitTestRunner` | - | `jest`, `none` | - | `jest` | Test runner to use for unit tests. |
| Name | Alias | Type | Required | Default | Description |
| ------------------------- | ----- | -------------------------------------------------------------------------------------------------------- | :------: | ----------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `name` | - | `string` || - | What name would you like to use for the application? |
| `directory` | `d` | `string` | - | - | The directory of the new application. |
| `meshConfig` | `mc` | `cjs`, `js`, `json`, `yml` | - | `yml` | Which config format would you like to use? |
| `example` | - | `country-info`, `fake-api`, `javascript-wiki`, `movies`, `rfam`, `stackexchange`, `star-wars`, `trippin` | - | `star-wars` | Which example project would you like to use? |
| `babelJest` | - | `boolean` | - | `false` | Use `babel` instead of `ts-jest`? |
| `e2eTestRunner` | - | `cypress`, `none` | - | `cypress` | Test runner to use for end to end (E2E) tests. |
| `linter` | - | `eslint`, `tslint` | - | `eslint` | The tool to use for running lint checks |
| `setParserOptionsProject` | - | `boolean` | - | `false` | Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons. |
| `skipFormat` | - | `boolean` | - | `false` | Skip formatting files. |
| `skipWorkspaceJson` | - | `boolean` | - | `false` | Skip updating `workspace.json` with default options based on values provided to this app (e.g. `babel`). |
| `standaloneConfig` | - | `boolean` | - | `false` | Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json` |
| `tags` | `t` | `string` | - | - | Add tags to the application (used for linting). |
| `unitTestRunner` | - | `jest`, `none` | - | `jest` | Test runner to use for unit tests. |

</details>

Expand Down Expand Up @@ -551,18 +551,18 @@ This is the equivalent of using `graphql-mesh validate`.

## Examples

| Name | Type | Source Handler | Config | Notes |
| ------------------------------------------------------------------------------------------------------------------- | ------- | -------------- | ------ | -------------------------------------------------------------------------------------------------- |
| [country-info](https://github.com/domjtalbot/nx-mesh/tree/main/libs/example/sdk/mysql/country-info) | sdk | `soap` | `cjs` | - |
| [fake-api](https://github.com/domjtalbot/nx-mesh/tree/main/libs/example/sdk/json-schema/fake-api) | sdk | `json-schema` | `yml` | - |
| [javascript-wiki](https://github.com/domjtalbot/nx-mesh/tree/main/apps/example/api-gateway/openapi/javascript-wiki) | gateway | `openapi` | `json` | - |
| [javascript-wiki](https://github.com/domjtalbot/nx-mesh/tree/main/libs/example/sdk/mysql/javascript-wiki) | sdk | `openapi` | `yml` | - |
| [movies](https://github.com/domjtalbot/nx-mesh/tree/main/libs/example/sdk/mysql/movies) | sdk | `neo4j` | `yml` | - |
| [nextjs with sdks](https://github.com/domjtalbot/nx-mesh/tree/main/apps/example/sdk/nextjs) | - | - | - | Deployed to [Vercel](https://nx-mesh-domjtalbot.vercel.app/) |
| [rfam](https://github.com/domjtalbot/nx-mesh/tree/main/libs/example/sdk/mysql/rfam) | sdk | `mysql` | `yml` | - |
| [stackexchange](https://github.com/domjtalbot/nx-mesh/tree/main/libs/example/sdk/mysql/stackexchange) | sdk | `openapi` | `json` | - |
| [star-wars-api](https://github.com/domjtalbot/nx-mesh/tree/main/libs/example/sdk/graphql/star-wars-api) | sdk | `graphql` | `yml` | - |
| [trippin](https://github.com/domjtalbot/nx-mesh/tree/main/libs/example/sdk/mysql/trippin) | sdk | `odata` | `js` | [API Key documentation](https://www.odata.org/odata-services/service-usages/request-key-tutorial/) |
| Name | Type | Source Handler | Config | Notes |
| ---------------------------------------------------------------------------------------------------------------- | ------- | -------------- | ------ | -------------------------------------------------------------------------------------------------- |
| [country-info](https://github.com/domjtalbot/nx-mesh/tree/main/examples/sdk-soap--country-info) | sdk | `soap` | `cjs` | - |
| [fake-api](https://github.com/domjtalbot/nx-mesh/tree/main/examples/sdk-json-schema--fake-api) | sdk | `json-schema` | `yml` | - |
| [javascript-wiki](https://github.com/domjtalbot/nx-mesh/tree/main/examples/api-gateway-openapi--javascript-wiki) | gateway | `openapi` | `json` | - |
| [javascript-wiki](https://github.com/domjtalbot/nx-mesh/tree/main/examples/sdk-openapi--javascript-wiki) | sdk | `openapi` | `yml` | - |
| [movies](https://github.com/domjtalbot/nx-mesh/tree/main/examples/sdk-neo4j--movies) | sdk | `neo4j` | `yml` | - |
| [nextjs with sdks](https://github.com/domjtalbot/nx-mesh/tree/main/examples/sdk-nextjs) | - | - | - | Deployed to [Vercel](https://nx-mesh-domjtalbot.vercel.app/) |
| [rfam](https://github.com/domjtalbot/nx-mesh/tree/main/examples/sdk-mysql--rfam) | sdk | `mysql` | `yml` | - |
| [stackexchange](https://github.com/domjtalbot/nx-mesh/tree/main/examples/sdk-openapi--stackexchange) | sdk | `openapi` | `json` | - |
| [star-wars](https://github.com/domjtalbot/nx-mesh/tree/main/examples/sdk-graphql--star-wars) | sdk | `graphql` | `yml` | - |
| [trippin](https://github.com/domjtalbot/nx-mesh/tree/main/examples/sdk-odata--trippin) | sdk | `odata` | `js` | [API Key documentation](https://www.odata.org/odata-services/service-usages/request-key-tutorial/) |

<br/>

Expand Down
32 changes: 0 additions & 32 deletions apps/example/api-gateway/openapi/javascript-wiki-e2e/project.json

This file was deleted.

Loading

0 comments on commit 3645190

Please sign in to comment.