@storm-software/workspace-tools 1.1.0 → 1.3.0
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 +88 -0
- package/README.md +2 -2
- package/config/nx.json +22 -53
- package/package.json +1 -1
- package/src/generators/init/init.js +1 -16
- package/src/generators/init/init.js.map +1 -1
- package/src/generators/preset/files/.all-contributorsrc.template +18 -4
- package/src/generators/preset/files/.env.template +11 -32
- package/src/generators/preset/files/.gitattributes +9 -0
- package/src/generators/preset/files/.github/CONTRIBUTING.md.template +1 -1
- package/src/generators/preset/files/.github/ISSUE_TEMPLATE/bug-report.yml.template +38 -7
- package/src/generators/preset/files/.github/ISSUE_TEMPLATE/documentation.yml.template +12 -12
- package/src/generators/preset/files/.github/ISSUE_TEMPLATE/feature-request.yml.template +4 -7
- package/src/generators/preset/files/.github/PULL_REQUEST_TEMPLATE.md.template +1 -1
- package/src/generators/preset/files/.github/actions/node/action.yaml +11 -12
- package/src/generators/preset/files/.github/codecov.yml +1 -1
- package/src/generators/preset/files/.github/renovate.json.template +3 -7
- package/src/generators/preset/files/.github/workflows/ci.yml.template +91 -0
- package/src/generators/preset/files/.github/workflows/codeql.yml +4 -1
- package/src/generators/preset/files/.github/workflows/git-guardian.yml +5 -3
- package/src/generators/preset/files/.github/workflows/labels.yml +6 -5
- package/src/generators/preset/files/.github/workflows/lock.yml +1 -4
- package/src/generators/preset/files/.github/workflows/nextjs-bundle-analysis.yml +12 -28
- package/src/generators/preset/files/.husky/post-checkout +1 -2
- package/src/generators/preset/files/.husky/post-commit +4 -0
- package/src/generators/preset/files/.husky/post-merge +1 -2
- package/src/generators/preset/files/.husky/pre-commit +1 -2
- package/src/generators/preset/files/.husky/pre-push +3 -2
- package/src/generators/preset/files/.markdownlint.json +4 -1
- package/src/generators/preset/files/.verdaccio/config.yml.template +1 -1
- package/src/generators/preset/files/.vscode/extensions.json +1 -1
- package/src/generators/preset/files/.vscode/launch.json +3 -3
- package/src/generators/preset/files/README.md.template +31 -30
- package/src/generators/preset/files/eslint.config.js +58 -0
- package/src/generators/preset/files/nx.json +98 -0
- package/src/generators/preset/files/pnpm-workspace.yaml +2 -0
- package/src/generators/preset/files/socket.yaml +20 -0
- package/src/generators/preset/files/tsconfig.base.json.template +1 -1
- package/src/generators/preset/generator.js +140 -65
- package/src/generators/preset/generator.js.map +1 -1
- package/src/generators/preset/schema.d.ts +8 -0
- package/src/generators/preset/schema.json +86 -2
- package/src/utils/versions.d.ts +4 -1
- package/src/generators/preset/files/.alexignore +0 -4
- package/src/generators/preset/files/.alexrc +0 -39
- package/src/generators/preset/files/.eslintrc.json +0 -123
- package/src/generators/preset/files/.github/workflows/ci.yml +0 -131
- package/src/generators/preset/files/.github/workflows/documentation.yml.template +0 -85
- package/src/generators/preset/files/.husky/commit-msg +0 -4
- package/src/generators/preset/files/commitlint.config.d.ts +0 -2
- package/src/generators/preset/files/commitlint.config.js +0 -3
- package/src/generators/preset/files/commitlint.config.js.map +0 -1
- package/src/generators/preset/files/src/index.ts.template +0 -1
- /package/src/generators/preset/files/{.log4brains.yml → .log4brains.yml.template} +0 -0
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"ignorePatterns": ["**/*", "**/node_modules/**"],
|
|
3
|
-
"plugins": ["@nx"],
|
|
4
|
-
"extends": [
|
|
5
|
-
"@storm-software/linting-tools/eslint/typescript",
|
|
6
|
-
"@storm-software/linting-tools/eslint/javascript",
|
|
7
|
-
"@storm-software/linting-tools/eslint/graphql",
|
|
8
|
-
"@storm-software/linting-tools/eslint/react",
|
|
9
|
-
"@storm-software/linting-tools/eslint/next",
|
|
10
|
-
"@storm-software/linting-tools/eslint/json",
|
|
11
|
-
"@storm-software/linting-tools/eslint/jest"
|
|
12
|
-
],
|
|
13
|
-
"overrides": [
|
|
14
|
-
{
|
|
15
|
-
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
|
16
|
-
"rules": {
|
|
17
|
-
"@nx/enforce-module-boundaries": [
|
|
18
|
-
"error",
|
|
19
|
-
{
|
|
20
|
-
"enforceBuildableLibDependency": true,
|
|
21
|
-
"allow": [],
|
|
22
|
-
"depConstraints": [
|
|
23
|
-
{
|
|
24
|
-
"sourceTag": "*",
|
|
25
|
-
"onlyDependOnLibsWithTags": ["*"]
|
|
26
|
-
},
|
|
27
|
-
/**
|
|
28
|
-
* Platform type dependency rules
|
|
29
|
-
*/
|
|
30
|
-
{
|
|
31
|
-
"sourceTag": "platform:shared",
|
|
32
|
-
"onlyDependOnLibsWithTags": ["platform:shared"]
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"sourceTag": "platform:server",
|
|
36
|
-
"onlyDependOnLibsWithTags": [
|
|
37
|
-
"platform:server",
|
|
38
|
-
"platform:shared"
|
|
39
|
-
]
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"sourceTag": "platform:client",
|
|
43
|
-
"onlyDependOnLibsWithTags": [
|
|
44
|
-
"platform:client",
|
|
45
|
-
"platform:shared"
|
|
46
|
-
]
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"sourceTag": "platform:admin",
|
|
50
|
-
"onlyDependOnLibsWithTags": [
|
|
51
|
-
"platform:admin",
|
|
52
|
-
"platform:client",
|
|
53
|
-
"platform:server",
|
|
54
|
-
"platform:shared"
|
|
55
|
-
]
|
|
56
|
-
},
|
|
57
|
-
/**
|
|
58
|
-
* Scope dependency rules
|
|
59
|
-
*/
|
|
60
|
-
{
|
|
61
|
-
"sourceTag": "scope:core",
|
|
62
|
-
"onlyDependOnLibsWithTags": ["scope:core"]
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"sourceTag": "scope:adapters",
|
|
66
|
-
"onlyDependOnLibsWithTags": ["scope:core", "scope:adapters"]
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
"sourceTag": "scope:tools",
|
|
70
|
-
"onlyDependOnLibsWithTags": ["scope:core", "scope:tools"]
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"sourceTag": "scope:docs",
|
|
74
|
-
"onlyDependOnLibsWithTags": [
|
|
75
|
-
"scope:core",
|
|
76
|
-
"scope:tools",
|
|
77
|
-
"scope:docs"
|
|
78
|
-
]
|
|
79
|
-
},
|
|
80
|
-
/**
|
|
81
|
-
* Domain Level dependency rules
|
|
82
|
-
*/
|
|
83
|
-
{
|
|
84
|
-
"sourceTag": "level:utilities",
|
|
85
|
-
"onlyDependOnLibsWithTags": ["level:utilities"]
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
"sourceTag": "level:domain",
|
|
89
|
-
"onlyDependOnLibsWithTags": ["level:utilities", "level:domain"]
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"sourceTag": "level:application",
|
|
93
|
-
"onlyDependOnLibsWithTags": [
|
|
94
|
-
"level:utilities",
|
|
95
|
-
"level:domain",
|
|
96
|
-
"level:application"
|
|
97
|
-
]
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
"sourceTag": "level:infrastructure",
|
|
101
|
-
"onlyDependOnLibsWithTags": [
|
|
102
|
-
"level:utilities",
|
|
103
|
-
"level:domain",
|
|
104
|
-
"level:application",
|
|
105
|
-
"level:infrastructure"
|
|
106
|
-
]
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
"sourceTag": "level:application",
|
|
110
|
-
"onlyDependOnLibsWithTags": [
|
|
111
|
-
"level:utilities",
|
|
112
|
-
"level:domain",
|
|
113
|
-
"level:application",
|
|
114
|
-
"level:infrastructure"
|
|
115
|
-
]
|
|
116
|
-
}
|
|
117
|
-
]
|
|
118
|
-
}
|
|
119
|
-
]
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
]
|
|
123
|
-
}
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
name: "CI/CD"
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
inputs:
|
|
6
|
-
tag:
|
|
7
|
-
description: override release tag
|
|
8
|
-
required: false
|
|
9
|
-
push:
|
|
10
|
-
branches:
|
|
11
|
-
- "main"
|
|
12
|
-
- "alpha"
|
|
13
|
-
- "beta"
|
|
14
|
-
|
|
15
|
-
env:
|
|
16
|
-
CI: true
|
|
17
|
-
NX_DAEMON: false
|
|
18
|
-
NX_VERBOSE_LOGGING: true
|
|
19
|
-
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
|
|
20
|
-
NX_CLOUD_AUTH_TOKEN: ${{ secrets.NX_CLOUD_AUTH_TOKEN }}
|
|
21
|
-
GITHUB_ACTOR: "🤖 Storm Bot"
|
|
22
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
23
|
-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
24
|
-
|
|
25
|
-
jobs:
|
|
26
|
-
build-and-release:
|
|
27
|
-
if: github.repository == 'storm-software/<%= name %>' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/alpha' || github.ref == 'refs/heads/beta')
|
|
28
|
-
name: "Build & Release"
|
|
29
|
-
runs-on: ubuntu-latest
|
|
30
|
-
steps:
|
|
31
|
-
- uses: actions/checkout@v3
|
|
32
|
-
with:
|
|
33
|
-
fetch-depth: 0
|
|
34
|
-
|
|
35
|
-
- name: configure git
|
|
36
|
-
run: |
|
|
37
|
-
git config user.name "${GITHUB_ACTOR}"
|
|
38
|
-
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
|
39
|
-
|
|
40
|
-
- name: Setup pnpm
|
|
41
|
-
uses: pnpm/action-setup@v2.2.4
|
|
42
|
-
with:
|
|
43
|
-
version: 8
|
|
44
|
-
|
|
45
|
-
- uses: actions/setup-node@v3
|
|
46
|
-
with:
|
|
47
|
-
registry-url: https://registry.npmjs.org/
|
|
48
|
-
node-version-file: .github/.nvmrc
|
|
49
|
-
cache: pnpm
|
|
50
|
-
cache-dependency-path: pnpm-lock.yaml
|
|
51
|
-
|
|
52
|
-
- name: Install Dependencies
|
|
53
|
-
run: pnpm ci
|
|
54
|
-
|
|
55
|
-
- name: Get appropriate base and head commits for `nx affected` commands
|
|
56
|
-
uses: nrwl/nx-set-shas@v3
|
|
57
|
-
with:
|
|
58
|
-
main-branch-name: "main"
|
|
59
|
-
|
|
60
|
-
- name: Set appropriate base and head commits for `nx affected` commands
|
|
61
|
-
run: |
|
|
62
|
-
echo "BASE: ${{ env.NX_BASE }}"
|
|
63
|
-
echo "HEAD: ${{ env.NX_HEAD }}"
|
|
64
|
-
|
|
65
|
-
#- name: Prepare for build
|
|
66
|
-
# run: pnpm build
|
|
67
|
-
|
|
68
|
-
- name: Build repository packages
|
|
69
|
-
run: pnpm build --base=${{ env.NX_BASE }} --head=${{ env.NX_HEAD }}
|
|
70
|
-
|
|
71
|
-
#- name: Run Linters
|
|
72
|
-
# run: pnpm nx affected -t lint --parallel=3 --base=${{ env.NX_BASE }} --head=${{ env.NX_HEAD }}
|
|
73
|
-
|
|
74
|
-
- name: Run Formatters
|
|
75
|
-
run: pnpm nx format
|
|
76
|
-
|
|
77
|
-
# - run: npx nx affected -t lint --parallel=3
|
|
78
|
-
# - run: npx nx affected -t test --parallel=3 --configuration=ci --base=${{ github.event.before }}
|
|
79
|
-
|
|
80
|
-
# run: pnpm nx affected -t build --parallel=5 --exclude="core-server-cloudflare,worker-*" --base=${{ env.NX_BASE }} --head=${{ env.NX_HEAD }}
|
|
81
|
-
# run: pnpm nx affected -t build --parallel=3 --base=${{ env.NX_BASE }} --head=${{ env.NX_HEAD }}
|
|
82
|
-
|
|
83
|
-
#- name: Run Tests
|
|
84
|
-
# uses: nick-fields/retry@v2.8.3
|
|
85
|
-
# with:
|
|
86
|
-
# command: npx nx affected -t test --parallel=3 --configuration=ci --base=${{ github.event.before }}
|
|
87
|
-
# timeout_minutes: 10
|
|
88
|
-
# max_attempts: 3
|
|
89
|
-
|
|
90
|
-
- name: Upload coverage to Codecov
|
|
91
|
-
uses: codecov/codecov-action@v3
|
|
92
|
-
|
|
93
|
-
- name: Release Library Version Updates
|
|
94
|
-
run: npx nx affected -t semantic-release --parallel=3 --base=${{ env.NX_BASE }} --head=${{ env.NX_HEAD }}
|
|
95
|
-
|
|
96
|
-
#- name: Release Repository Version Updates
|
|
97
|
-
# run: pnpm nx run-many --target=semantic-release --parallel=false
|
|
98
|
-
|
|
99
|
-
- name: Create Pull Request
|
|
100
|
-
uses: repo-sync/pull-request@v2
|
|
101
|
-
with:
|
|
102
|
-
destination_branch: main
|
|
103
|
-
pr_title: "chore(repo): Github CI/CD automated updates"
|
|
104
|
-
pr_body: "This changeset is the result of updates made in the repository's files via the CI/CD pipeline automatically. The changes include linting, formatting, and version updates."
|
|
105
|
-
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
106
|
-
|
|
107
|
-
# - name: Publish
|
|
108
|
-
# run: |
|
|
109
|
-
# git config --global user.name 'Pat Sullivan'
|
|
110
|
-
# git config --global user.email 'sullivanpj@users.noreply.github.com'
|
|
111
|
-
# npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
|
|
112
|
-
# npm run cipublish
|
|
113
|
-
# env:
|
|
114
|
-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
115
|
-
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
116
|
-
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
117
|
-
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
118
|
-
# TAG: ${{ inputs.tag }}
|
|
119
|
-
|
|
120
|
-
#- name: Release Library Version Updates
|
|
121
|
-
# run: npx nx affected -t semantic-release --parallel=3 --base=${{ env.NX_BASE }} --head=${{ env.NX_HEAD }}
|
|
122
|
-
# env:
|
|
123
|
-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
124
|
-
|
|
125
|
-
#- name: Release Repository Version Updates
|
|
126
|
-
# run: npm run semantic-release
|
|
127
|
-
# env:
|
|
128
|
-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
129
|
-
|
|
130
|
-
# - name: Build Latest Documentation
|
|
131
|
-
# run: npx nx run docs:build
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
# Simple workflow for deploying documentation to GitHub Pages
|
|
2
|
-
name: "Deploy Documentation"
|
|
3
|
-
|
|
4
|
-
on:
|
|
5
|
-
# Runs on pushes targeting the default branch
|
|
6
|
-
push:
|
|
7
|
-
branches:
|
|
8
|
-
- "main"
|
|
9
|
-
|
|
10
|
-
# Allows you to run this workflow manually from the Actions tab
|
|
11
|
-
workflow_dispatch:
|
|
12
|
-
|
|
13
|
-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
|
14
|
-
permissions:
|
|
15
|
-
contents: read
|
|
16
|
-
pages: write
|
|
17
|
-
id-token: write
|
|
18
|
-
|
|
19
|
-
# Allow one concurrent deployment
|
|
20
|
-
concurrency:
|
|
21
|
-
group: "pages"
|
|
22
|
-
cancel-in-progress: true
|
|
23
|
-
|
|
24
|
-
env:
|
|
25
|
-
CI: true
|
|
26
|
-
NX_DAEMON: false
|
|
27
|
-
NX_VERBOSE_LOGGING: true
|
|
28
|
-
GITHUB_ACTOR: "🤖 Storm Bot"
|
|
29
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
30
|
-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
31
|
-
|
|
32
|
-
jobs:
|
|
33
|
-
deploy-docs:
|
|
34
|
-
if: github.repository == 'storm-software/<%= name %>' && github.ref == 'refs/heads/main'
|
|
35
|
-
environment:
|
|
36
|
-
name: github-pages
|
|
37
|
-
url: ${{ steps.deployment.outputs.page_url }}
|
|
38
|
-
runs-on: ubuntu-latest
|
|
39
|
-
steps:
|
|
40
|
-
- name: Checkout
|
|
41
|
-
uses: actions/checkout@v3
|
|
42
|
-
with:
|
|
43
|
-
fetch-depth: 0
|
|
44
|
-
|
|
45
|
-
- name: Setup pnpm
|
|
46
|
-
uses: pnpm/action-setup@v2.2.4
|
|
47
|
-
with:
|
|
48
|
-
version: 8
|
|
49
|
-
|
|
50
|
-
- uses: actions/setup-node@v3
|
|
51
|
-
with:
|
|
52
|
-
registry-url: https://registry.npmjs.org/
|
|
53
|
-
node-version-file: .github/.nvmrc
|
|
54
|
-
cache: pnpm
|
|
55
|
-
cache-dependency-path: pnpm-lock.yaml
|
|
56
|
-
|
|
57
|
-
- name: Install Dependencies
|
|
58
|
-
run: pnpm ci
|
|
59
|
-
|
|
60
|
-
- name: Prepare for build
|
|
61
|
-
run: pnpm build --base=${{ env.NX_BASE }} --head=${{ env.NX_HEAD }}
|
|
62
|
-
|
|
63
|
-
- name: Generate TSDocs Markdown with API Extractor
|
|
64
|
-
run: pnpm nx g @storm-software/workspace-tools:api-extractor --outputPath 'docs/website/docs/api-reference' --clean --no-interactive
|
|
65
|
-
|
|
66
|
-
- name: Build website
|
|
67
|
-
run: pnpm nx run docs-website:build
|
|
68
|
-
|
|
69
|
-
- name: Build event catalog
|
|
70
|
-
run: pnpm nx run docs-event-catalog:build
|
|
71
|
-
|
|
72
|
-
- name: Copy event catalog into website
|
|
73
|
-
run: mkdir ./dist/docs/website/event-catalog && cp -r ./dist/docs/event-catalog/dist/out/* ./dist/docs/website/event-catalog
|
|
74
|
-
|
|
75
|
-
- name: Setup Pages
|
|
76
|
-
uses: actions/configure-pages@v3
|
|
77
|
-
|
|
78
|
-
- name: Upload artifact
|
|
79
|
-
uses: actions/upload-pages-artifact@v2
|
|
80
|
-
with:
|
|
81
|
-
path: "./dist/docs/website"
|
|
82
|
-
|
|
83
|
-
- name: Deploy to GitHub Pages
|
|
84
|
-
id: deployment
|
|
85
|
-
uses: actions/deploy-pages@v2
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"commitlint.config.js","sourceRoot":"","sources":["../../../../../../../packages/workspace-tools/src/generators/preset/files/commitlint.config.js"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,GAAG;IACf,OAAO,EAAE,CAAC,0CAA0C,CAAC;CACtD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const variable = "<%= name %>";
|
|
File without changes
|