Skip to content

Commit 25dac74

Browse files
committed
chore: initial commit
0 parents  commit 25dac74

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+13482
-0
lines changed

.changeset/config.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"commit": false,
4+
"changelog": false,
5+
"access": "public",
6+
"baseBranch": "main"
7+
}

.commitlintrc.ts

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import type { UserConfig } from '@commitlint/types';
2+
import { RuleConfigSeverity } from '@commitlint/types';
3+
4+
const config: UserConfig = {
5+
extends: ['@commitlint/config-conventional'],
6+
rules: {
7+
'type-enum': [
8+
RuleConfigSeverity.Error,
9+
'always',
10+
[
11+
'chore',
12+
'ci',
13+
'docs',
14+
'enhancement',
15+
'feat',
16+
'fix',
17+
'release',
18+
'revert',
19+
'security',
20+
'test',
21+
],
22+
],
23+
},
24+
};
25+
26+
export default config;

.editorconfig

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[{package.json,*.yml}]
12+
indent_style = space
13+
indent_size = 2
14+
15+
[*.md]
16+
trim_trailing_whitespace = false

.eslintignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
bin
2+
coverage
3+
dist
4+
*.yaml

.eslintrc.js

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
module.exports = {
2+
root: true,
3+
extends: ['@strapi/eslint-config/back/typescript'],
4+
parser: '@typescript-eslint/parser',
5+
plugins: ['@typescript-eslint', 'eslint-plugin-rxjs'],
6+
parserOptions: {
7+
project: ['./tsconfig.eslint.json'],
8+
},
9+
overrides: [
10+
{
11+
files: ['./scripts/**/*', './src/cli/errors.ts', './src/cli/index.ts'],
12+
rules: {
13+
'no-console': ['error', { allow: ['error'] }],
14+
},
15+
},
16+
{
17+
files: ['./src/node/core/logger.ts'],
18+
rules: {
19+
'no-console': 'off',
20+
},
21+
},
22+
],
23+
rules: {
24+
'rxjs/finnish': 'error',
25+
// TODO: The following rules from @strapi/eslint-config/back/typescript are disabled because they're causing problems we need to solve or fix
26+
// to be solved in configuration
27+
'node/no-unsupported-features/es-syntax': 'off',
28+
'import/prefer-default-export': 'off',
29+
'import/namespace': 'off',
30+
'node/no-missing-import': 'off',
31+
'no-process-exit': 'off',
32+
'import/no-dynamic-require': 'off',
33+
'global-require': 'off',
34+
'no-underscore-dangle': 'off',
35+
'@typescript-eslint/no-use-before-define': 'off',
36+
'@typescript-eslint/no-explicit-any': 'off',
37+
/**
38+
* Force us to use the Logger instance.
39+
*/
40+
'no-console': 'error',
41+
'import/extensions': 'off',
42+
'import/order': [
43+
'error',
44+
{
45+
groups: [
46+
['external', 'internal', 'builtin'],
47+
'parent',
48+
['sibling', 'index'],
49+
'object',
50+
'type',
51+
],
52+
'newlines-between': 'always',
53+
alphabetize: { order: 'asc', caseInsensitive: true },
54+
},
55+
],
56+
'nonblock-statement-body-position': ['error', 'below'],
57+
},
58+
};

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

.github/ISSUE_TEMPLATE/BUG_REPORT.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: 🐛 Bug Report
2+
description: Create a report to help us improve this repo.
3+
title: '[bug]: '
4+
labels: ['issue: bug']
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thank you for filing a bug report!
10+
- type: textarea
11+
attributes:
12+
label: What version of `@strapi/blocks-react-renderer` are you using?
13+
placeholder: |
14+
- Npm version
15+
- Node.js version
16+
- React version:
17+
- `@strapi/blocks-react-renderer` version
18+
- Browser
19+
validations:
20+
required: true
21+
- type: textarea
22+
attributes:
23+
label: "What's Wrong?"
24+
description: A concise description of what you expected to happen (please provide screenshots).
25+
validations:
26+
required: true
27+
- type: textarea
28+
attributes:
29+
label: To Reproduce
30+
description: Steps to reproduce the behavior
31+
validations:
32+
required: true
33+
- type: textarea
34+
attributes:
35+
label: Expected Behaviour
36+
description: What you expected to happen
37+
validations:
38+
required: true
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: 🚀 Feature Request
2+
description: Submit a request for a new feature
3+
title: '[feat]: '
4+
labels: ['issue: enhancement']
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thank you for contributing a feature request!
10+
- type: textarea
11+
attributes:
12+
label: A clear and concise description of what the feature is
13+
validations:
14+
required: true
15+
- type: textarea
16+
attributes:
17+
label: Why should this feature be included?
18+
validations:
19+
required: true
20+
- type: textarea
21+
attributes:
22+
label: Please provide an example for how this would work

.github/PULL_REQUEST_TEMPLATE.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
### What does it do?
2+
3+
Describe the technical changes you did.
4+
5+
### Why is it needed?
6+
7+
Describe the issue you are solving.
8+
9+
### How to test it?
10+
11+
Provide information about the environment and the path to verify the behaviour.
12+
13+
### Related issue(s)/PR(s)
14+
15+
Let us know if this is related to any issue/pull request
+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: 'Daily Cron - 00:00'
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *'
6+
7+
permissions:
8+
issues: write
9+
statuses: read
10+
11+
jobs:
12+
cron-tasks:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: check for inactive issues that can't be reproduced
16+
uses: actions-cool/issues-helper@v3
17+
with:
18+
actions: 'close-issues'
19+
token: ${{ secrets.GITHUB_TOKEN }}
20+
labels: 'status: can not reproduce'
21+
inactive-day: 14
22+
close-reason: 'completed'
23+
body: |
24+
Hello!
25+
26+
As we have not received any new or updated information to reproduce this issue in the last 14 days we are marking this issue as closed. Should you have new information please feel free to respond and we will consider reopening it.
27+
28+
If anyone else have updated information for this issue, please open up a new bug report and simply reference this closed bug report so that we can get any new information you may have. If you have questions please refer to the [contributor's guide](https://github.com/strapi/strapi/blob/main/CONTRIBUTING.md#reporting-an-issue) on opening issues.
29+
30+
Thank you and have a great day!
+96
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: Issue Labeled
2+
3+
on:
4+
issues:
5+
types: [labeled]
6+
7+
permissions:
8+
issues: write
9+
pull-requests: write
10+
actions: read
11+
checks: read
12+
contents: read
13+
repository-projects: read
14+
statuses: read
15+
16+
jobs:
17+
issue-labeled:
18+
runs-on: ubuntu-latest
19+
steps:
20+
# Unable to Reproduce Tasks
21+
- name: 'Comment: unable to reproduce'
22+
if: "${{ github.event.label.name == 'status: can not reproduce' }}"
23+
uses: actions-cool/issues-helper@v3
24+
with:
25+
actions: 'create-comment'
26+
token: ${{ secrets.GITHUB_TOKEN }}
27+
issue-number: ${{ github.event.issue.number }}
28+
body: |
29+
> This is a templated message
30+
31+
Hello @${{ github.event.issue.user.login }},
32+
33+
Thank you for reporting this bug, however we are unable to reproduce the issue you described given the information we have on hand. Can you please create a fresh project that you are able to reproduce the issue in, provide clear steps to reproduce this issue, and either upload this fresh project to a new GitHub repo or compress it into a `.zip` and upload it on this issue?
34+
35+
We would greatly appreciate your assistance with this, by working in a fresh project it will cut out any possible variables that might be unrelated.
36+
Please note that issues labeled with `status: can not reproduce` will be closed in 14 days if there is no activity.
37+
38+
Thank you!
39+
40+
# Invalid bug report template actions
41+
- name: 'Comment: invalid bug report template'
42+
if: "${{ github.event.label.name == 'flag: invalid template' }}"
43+
uses: actions-cool/issues-helper@v3
44+
with:
45+
actions: 'create-comment'
46+
token: ${{ secrets.GITHUB_TOKEN }}
47+
issue-number: ${{ github.event.issue.number }}
48+
body: |
49+
> This is a templated message
50+
51+
Hello @${{ github.event.issue.user.login }},
52+
53+
We ask that you please follow the [issue template](https://raw.githubusercontent.com/strapi/strapi/master/.github/ISSUE_TEMPLATE/BUG_REPORT.md).
54+
A proper issue submission let's us better understand the origin of your bug and therefore help you. We will reopen your issue when we receive the issue following the template guidelines and properly fill out the template. You can see the template guidelines for bug reports [here](https://github.com/strapi/strapi/blob/master/CONTRIBUTING.md#reporting-an-issue).
55+
56+
Please update the issue with the template and we can reopen this report.
57+
58+
Thank you.
59+
- name: 'Close: invalid bug report template'
60+
if: "${{ github.event.label.name == 'flag: invalid template' }}"
61+
uses: actions-cool/issues-helper@v3
62+
with:
63+
actions: 'close-issue'
64+
token: ${{ secrets.GITHUB_TOKEN }}
65+
issue-number: ${{ github.event.issue.number }}
66+
close-reason: 'not_planned'
67+
68+
# Redirect questions to community sources
69+
- name: 'Comment: redirect question to community'
70+
if: "${{ github.event.label.name == 'flag: question' }}"
71+
uses: actions-cool/issues-helper@v3
72+
with:
73+
actions: 'create-comment'
74+
token: ${{ secrets.GITHUB_TOKEN }}
75+
issue-number: ${{ github.event.issue.number }}
76+
body: |
77+
> This is a templated message
78+
79+
Hello @${{ github.event.issue.user.login }},
80+
81+
I see you are wanting to ask a question that is not really a bug report,
82+
83+
- questions should be directed to [our forum](https://forum.strapi.io) or our [Discord](https://discord.strapi.io)
84+
- feature requests should be directed to our [feedback and feature request database](https://feedback.strapi.io)
85+
86+
Please see the following contributing guidelines for asking a question [here](https://github.com/strapi/strapi/blob/master/CONTRIBUTING.md#reporting-an-issue).
87+
88+
Thank you.
89+
- name: 'Close: redirect question to community'
90+
if: "${{ github.event.label.name == 'flag: question' }}"
91+
uses: actions-cool/issues-helper@v3
92+
with:
93+
actions: 'close-issue'
94+
token: ${{ secrets.GITHUB_TOKEN }}
95+
issue-number: ${{ github.event.issue.number }}
96+
close-reason: 'complete'

.github/workflows/release.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency: ${{ github.workflow }}-${{ github.ref }}
9+
10+
jobs:
11+
release:
12+
name: Release
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: pnpm/action-setup@v3
17+
- uses: actions/setup-node@v4
18+
with:
19+
cache: pnpm
20+
node-version: lts/*
21+
- run: corepack enable && pnpm --version
22+
- run: pnpm install
23+
- run: pnpm build
24+
25+
- name: Create Release Pull Request or Publish to npm
26+
id: changesets
27+
uses: changesets/action@v1
28+
with:
29+
version: pnpm release:version
30+
publish: pnpm release:publish
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)