mirror of
https://github.com/flarum/core.git
synced 2025-08-15 04:44:08 +02:00
Compare commits
178 Commits
dk/2022032
...
dk/assets-
Author | SHA1 | Date | |
---|---|---|---|
|
b7c583b208 | ||
|
01bdfcca33 | ||
|
fe20e2c212 | ||
|
795a500adb | ||
|
75aaef7d76 | ||
|
f128190f14 | ||
|
f926c58e01 | ||
|
e5a3598bf6 | ||
|
7cafd9f51a | ||
|
e9fec9b22f | ||
|
31a00eeb95 | ||
|
6b577e6f1f | ||
|
64f0ae7c33 | ||
|
343fe0e317 | ||
|
07b2f86dcc | ||
|
ffaea861e5 | ||
|
46b3b7a952 | ||
|
78544ce68d | ||
|
af3116bce9 | ||
|
6dde236d77 | ||
|
d0998be8fa | ||
|
8dcfa6c474 | ||
|
744927215a | ||
|
54c21459d6 | ||
|
91f8bd34b1 | ||
|
4e52f0e420 | ||
|
ac23d79fe7 | ||
|
29179e27c6 | ||
|
cd610a1cf2 | ||
|
0c017c2aa0 | ||
|
5721a2f487 | ||
|
b673d36f33 | ||
|
bacb095382 | ||
|
7471ef64d5 | ||
|
707ca2d16d | ||
|
3246f5a8f6 | ||
|
bf6f63cfe1 | ||
|
819602520a | ||
|
16f59f514b | ||
|
759f7ef327 | ||
|
9c825aaa2b | ||
|
952a5891bb | ||
|
0daa24cf4b | ||
|
33bf2284c7 | ||
|
d3e456a1bf | ||
|
51472625ba | ||
|
ec22162cf4 | ||
|
1af506d4b8 | ||
|
d86440506d | ||
|
556d461cfb | ||
|
6cfebe381a | ||
|
8ab2827f4c | ||
|
024155a608 | ||
|
4da21463c1 | ||
|
abc12b4ba5 | ||
|
d8d4eae9f5 | ||
|
d82a73feed | ||
|
ab6cee1a25 | ||
|
2e840dc73d | ||
|
ae9139bd73 | ||
|
2e3d6dfa2c | ||
|
7cd28710bc | ||
|
bc1d6f9e91 | ||
|
bf4c543692 | ||
|
709c5566bb | ||
|
9a62c32c28 | ||
|
bbf90e42ff | ||
|
0859bb13a5 | ||
|
62be3e01be | ||
|
613523c9b4 | ||
|
3e56bd3dc6 | ||
|
293e8ab8b6 | ||
|
824fb2feff | ||
|
4923253fbf | ||
|
36c296d787 | ||
|
9fc2e5e2c0 | ||
|
cb47a9c92e | ||
|
5dedec12f9 | ||
|
5e81592e18 | ||
|
74bcab866c | ||
|
1d949a3170 | ||
|
79e0f44324 | ||
|
976a03c9e5 | ||
|
49ab6630d4 | ||
|
27fb011bf5 | ||
|
6466427061 | ||
|
818035f385 | ||
|
4748f31d93 | ||
|
e049e9d7ae | ||
|
776f9bf132 | ||
|
f882ff9bb5 | ||
|
535052e3dc | ||
|
c2ba3bb7d5 | ||
|
b7332895db | ||
|
0a3f449f9e | ||
|
df1bdd2ad8 | ||
|
8e2a99c1eb | ||
|
e45547c649 | ||
|
29362ed924 | ||
|
eb4bac3b8f | ||
|
584884a3c9 | ||
|
96ead2a4df | ||
|
556f10ddd8 | ||
|
a79e2c20fe | ||
|
89b194034b | ||
|
01c54b13c8 | ||
|
24c8c65aa5 | ||
|
17de76f326 | ||
|
d3008d1e62 | ||
|
471947dfa7 | ||
|
2f506f1b24 | ||
|
81cf6047f9 | ||
|
57d3c9a99a | ||
|
999b345db1 | ||
|
5e2f952fe6 | ||
|
899b931b89 | ||
|
0431f15ac0 | ||
|
6c57470b13 | ||
|
6ca2ebc437 | ||
|
dd915c126c | ||
|
62ffe5ffdf | ||
|
592039c483 | ||
|
2f64f023b2 | ||
|
316a2067b6 | ||
|
de8d0d1d37 | ||
|
aea1a4cf63 | ||
|
7f5593021d | ||
|
f9ae7cd67f | ||
|
843a613cda | ||
|
da83e0c1a0 | ||
|
903026a7e4 | ||
|
1954d0383e | ||
|
2e89ba3c94 | ||
|
b14c0780d2 | ||
|
d465fd27bc | ||
|
ffc9f9f5a4 | ||
|
290bc19922 | ||
|
863a8ddfff | ||
|
b8df3863d1 | ||
|
4cb15501a2 | ||
|
42602a099f | ||
|
be2da3e12f | ||
|
09bed537b3 | ||
|
fb717db57c | ||
|
cca97f32c6 | ||
|
c658eb10f4 | ||
|
f667faa1bd | ||
|
542cc42538 | ||
|
518b39610e | ||
|
6de1ea0194 | ||
|
b5e5ae8c4c | ||
|
b0fa795cc9 | ||
|
c944fd0029 | ||
|
98e607a704 | ||
|
9a0bdf9a04 | ||
|
431ba30434 | ||
|
45aba446b3 | ||
|
9f7c5defaa | ||
|
2541349c68 | ||
|
1d27f62c15 | ||
|
9d9594a098 | ||
|
7c3da27fb3 | ||
|
402ace2070 | ||
|
ca7055f5d0 | ||
|
4dfbaa3271 | ||
|
cd8ed6cf66 | ||
|
cf8359daa4 | ||
|
803f4cc792 | ||
|
a7dd0b2b61 | ||
|
00b9151864 | ||
|
e25c53c00f | ||
|
6839c9436f | ||
|
3ae113b897 | ||
|
6a65993ea5 | ||
|
65dd37278b | ||
|
e429558d0e | ||
|
105481a181 | ||
|
b95b3646d3 |
@@ -17,3 +17,6 @@ trim_trailing_whitespace = false
|
|||||||
|
|
||||||
[*.{php,xml,json}]
|
[*.{php,xml,json}]
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
|
||||||
|
[tsconfig.json]
|
||||||
|
indent_size = 2
|
39
.github/ISSUE_TEMPLATE/bug-report.md
vendored
39
.github/ISSUE_TEMPLATE/bug-report.md
vendored
@@ -1,39 +0,0 @@
|
|||||||
---
|
|
||||||
name: "🐛 Bug Report"
|
|
||||||
about: "If something isn't working as expected"
|
|
||||||
|
|
||||||
---
|
|
||||||
## Bug Report
|
|
||||||
|
|
||||||
**Current Behavior**
|
|
||||||
A clear and concise description of the behavior.
|
|
||||||
|
|
||||||
**Steps to Reproduce**
|
|
||||||
1. Go to '...'
|
|
||||||
2. Click on '....'
|
|
||||||
3. Scroll down to '....'
|
|
||||||
4. See error
|
|
||||||
|
|
||||||
**Expected Behavior**
|
|
||||||
A clear and concise description of what you expected to happen.
|
|
||||||
|
|
||||||
**Screenshots**
|
|
||||||
If applicable, add screenshots to help explain your problem.
|
|
||||||
|
|
||||||
**Environment**
|
|
||||||
- Flarum version: x.y.z
|
|
||||||
- Website URL: http://example.com
|
|
||||||
- Webserver: [e.g. apache, nginx]
|
|
||||||
- Hosting environment: [e.g. shared, vps]
|
|
||||||
- PHP version: x.y.z
|
|
||||||
- Browser: [e.g. chrome 67, safari 11]
|
|
||||||
|
|
||||||
```
|
|
||||||
Output of "php flarum info", run this in terminal in your Flarum directory.
|
|
||||||
```
|
|
||||||
|
|
||||||
**Possible Solution**
|
|
||||||
<!--- Only if you have suggestions or a fix for the bug -->
|
|
||||||
|
|
||||||
**Additional Context**
|
|
||||||
Add any other context about the problem here.
|
|
78
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
Normal file
78
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
name: "🐛 Bug Report"
|
||||||
|
description: If something isn't working as expected
|
||||||
|
labels: ["type/bug"]
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
Thanks for taking the time to fill out this bug report!
|
||||||
|
- type: textarea
|
||||||
|
id: current_behavior
|
||||||
|
attributes:
|
||||||
|
label: Current Behavior
|
||||||
|
description: A clear and concise description of the behavior.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: steps_to_reproduce
|
||||||
|
attributes:
|
||||||
|
label: Steps to Reproduce
|
||||||
|
description: The exact steps to reproduce the bug.
|
||||||
|
placeholder: |
|
||||||
|
1. Go to '...'
|
||||||
|
2. Click on '....'
|
||||||
|
3. Scroll down to '....'
|
||||||
|
4. See error message '....'
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: expected_behavior
|
||||||
|
attributes:
|
||||||
|
label: Expected Behavior
|
||||||
|
description: A clear and concise description of what you expected to happen.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: screenshots
|
||||||
|
attributes:
|
||||||
|
label: Screenshots
|
||||||
|
description: If applicable, add screenshots to help explain your problem.
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
- type: textarea
|
||||||
|
id: enironment
|
||||||
|
attributes:
|
||||||
|
label: Environment
|
||||||
|
value: |
|
||||||
|
- Flarum version: x.y.z
|
||||||
|
- Website URL: http://example.com
|
||||||
|
- Webserver: [e.g. apache, nginx]
|
||||||
|
- Hosting environment: [e.g. shared, vps]
|
||||||
|
- PHP version: x.y.z
|
||||||
|
- Browser: [e.g. chrome 67, safari 11]
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: php_flarum_info
|
||||||
|
attributes:
|
||||||
|
label: "Output of `php flarum info`"
|
||||||
|
value: |
|
||||||
|
```
|
||||||
|
Output of "php flarum info", run this in terminal in your Flarum directory.
|
||||||
|
```
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
- type: textarea
|
||||||
|
id: possible_solution
|
||||||
|
attributes:
|
||||||
|
label: Possible Solution
|
||||||
|
description: Only if you have suggestions or a fix for the bug.
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
- type: textarea
|
||||||
|
id: additional_context
|
||||||
|
attributes:
|
||||||
|
label: Additional Context
|
||||||
|
description: Add any other context about the problem here.
|
||||||
|
validations:
|
||||||
|
required: false
|
17
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
17
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
blank_issues_enabled: false
|
||||||
|
contact_links:
|
||||||
|
- name: "🚀 Feature Request"
|
||||||
|
url: https://discuss.flarum.org/t/proposals
|
||||||
|
about: |
|
||||||
|
Thanks for taking the time to fill out this feature request!
|
||||||
|
We primarily use GitHub as a bug tracker and issue tracker for items we are sure to tackle in the near future.
|
||||||
|
For feature requests, ideas and feedback please post in the Flarum Community.
|
||||||
|
Feature requests are added to GitHub only when they have been accepted by the development team and implementation details have been laid out.
|
||||||
|
- name: "🙋 Support Question"
|
||||||
|
url: https://discuss.flarum.org/t/support
|
||||||
|
about: |
|
||||||
|
We primarily use GitHub as a bug tracker and issue tracker for items we are sure to tackle in the near future; for usage and support questions, please check out these resources below. Thanks!
|
||||||
|
|
||||||
|
* Flarum Community: https://discuss.flarum.org/
|
||||||
|
* Discord Chat: https://flarum.org/discord/
|
||||||
|
* Twitter: https://twitter.com/Flarum
|
26
.github/ISSUE_TEMPLATE/feature-request.md
vendored
26
.github/ISSUE_TEMPLATE/feature-request.md
vendored
@@ -1,26 +0,0 @@
|
|||||||
---
|
|
||||||
name: "🚀 Feature Request"
|
|
||||||
about: "I have a suggestion (and may want to implement it!)"
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
<!--
|
|
||||||
IMPORTANT: Feature requests on this GitHub issue tracker are only accepted in case they have been approved by a core developer or contain extensive argumentation and directions for implementation. For all other feature requests, ideas and feedback please post in the Flarum Community: https://discuss.flarum.org/t/feedback.
|
|
||||||
-->
|
|
||||||
|
|
||||||
## Feature Request
|
|
||||||
|
|
||||||
**Is your feature request related to a problem? Please describe.**
|
|
||||||
A clear and concise description of what the problem is. eg. I have an issue when [...]
|
|
||||||
|
|
||||||
**Describe the solution you'd like**
|
|
||||||
A detailed description of your proposed solution. Include:
|
|
||||||
- How the feature would work/behave
|
|
||||||
- Any potential drawbacks
|
|
||||||
- Maybe a screenshot, design, or example code
|
|
||||||
|
|
||||||
**Justify why this feature belongs in Flarum's core, rather than in a third-party extension**
|
|
||||||
Consider who this change will be useful to – most Flarum forums, or just a few?
|
|
||||||
|
|
||||||
**Describe alternatives you've considered**
|
|
||||||
A clear and concise description of any alternative solutions or features you've considered.
|
|
11
.github/ISSUE_TEMPLATE/support-question.md
vendored
11
.github/ISSUE_TEMPLATE/support-question.md
vendored
@@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
name: "🙋 Support Question"
|
|
||||||
about: "If you have a question, please check out our forum or Discord!"
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
We primarily use GitHub as an issue tracker; for usage and support questions, please check out these resources below. Thanks!
|
|
||||||
|
|
||||||
* Flarum Community: https://discuss.flarum.org/
|
|
||||||
* Discord Chat: https://flarum.org/discord/
|
|
||||||
* Twitter: https://twitter.com/Flarum
|
|
112
.github/workflows/REUSABLE_backend.yml
vendored
Normal file
112
.github/workflows/REUSABLE_backend.yml
vendored
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
name: Flarum Backend Jobs
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
enable_backend_testing:
|
||||||
|
description: "Enable Backend Testing?"
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
required: false
|
||||||
|
|
||||||
|
backend_directory:
|
||||||
|
description: The directory of the project where backend code is located. This should contain a `composer.json` file, and is generally the root directory of the repo.
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: '.'
|
||||||
|
|
||||||
|
php_versions:
|
||||||
|
description: Versions of PHP to test with. Should be array of strings encoded as JSON array
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: '["7.4", "8.0", "8.1"]'
|
||||||
|
db_versions:
|
||||||
|
description: Versions of databases to test with. Should be array of strings encoded as JSON array
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: '["mysql:5.7", "mariadb"]'
|
||||||
|
|
||||||
|
php_ini_values:
|
||||||
|
description: PHP ini values
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: error_reporting=E_ALL
|
||||||
|
|
||||||
|
env:
|
||||||
|
COMPOSER_ROOT_VERSION: dev-main
|
||||||
|
FLARUM_TEST_TMP_DIR_LOCAL: tests/integration/tmp
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
php: ${{ fromJSON(inputs.php_versions) }}
|
||||||
|
service: ${{ fromJSON(inputs.db_versions) }}
|
||||||
|
prefix: ['', flarum_]
|
||||||
|
|
||||||
|
include:
|
||||||
|
- service: 'mysql:5.7'
|
||||||
|
db: MySQL
|
||||||
|
- service: mariadb
|
||||||
|
db: MariaDB
|
||||||
|
- prefix: flarum_
|
||||||
|
prefixStr: (prefix)
|
||||||
|
|
||||||
|
exclude:
|
||||||
|
- php: 8.0
|
||||||
|
service: 'mysql:5.7'
|
||||||
|
prefix: flarum_
|
||||||
|
- php: 8.0
|
||||||
|
service: mariadb
|
||||||
|
prefix: flarum_
|
||||||
|
|
||||||
|
services:
|
||||||
|
mysql:
|
||||||
|
image: ${{ matrix.service }}
|
||||||
|
ports:
|
||||||
|
- 13306:3306
|
||||||
|
|
||||||
|
name: 'PHP ${{ matrix.php }} / ${{ matrix.db }} ${{ matrix.prefixStr }}'
|
||||||
|
|
||||||
|
if: inputs.enable_backend_testing
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@master
|
||||||
|
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php }}
|
||||||
|
coverage: xdebug
|
||||||
|
extensions: curl, dom, gd, json, mbstring, openssl, pdo_mysql, tokenizer, zip
|
||||||
|
tools: phpunit, composer:v2
|
||||||
|
ini-values: ${{ inputs.php_ini_values }}
|
||||||
|
|
||||||
|
# The authentication alter is necessary because newer mysql versions use the `caching_sha2_password` driver,
|
||||||
|
# which isn't supported prior to PHP7.4
|
||||||
|
# When we drop support for PHP7.3, we should remove this from the setup.
|
||||||
|
- name: Create MySQL Database
|
||||||
|
run: |
|
||||||
|
sudo systemctl start mysql
|
||||||
|
mysql -uroot -proot -e 'CREATE DATABASE flarum_test;' --port 13306
|
||||||
|
mysql -uroot -proot -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';" --port 13306
|
||||||
|
|
||||||
|
- name: Install Composer dependencies
|
||||||
|
run: composer install
|
||||||
|
working-directory: ${{ inputs.backend_directory }}
|
||||||
|
|
||||||
|
- name: Setup Composer tests
|
||||||
|
run: composer test:setup
|
||||||
|
working-directory: ${{ inputs.backend_directory }}
|
||||||
|
env:
|
||||||
|
DB_PORT: 13306
|
||||||
|
DB_PASSWORD: root
|
||||||
|
DB_PREFIX: ${{ matrix.prefix }}
|
||||||
|
|
||||||
|
- name: Run Composer tests
|
||||||
|
run: composer test
|
||||||
|
working-directory: ${{ inputs.backend_directory }}
|
||||||
|
env:
|
||||||
|
COMPOSER_PROCESS_TIMEOUT: 600
|
220
.github/workflows/REUSABLE_frontend.yml
vendored
Normal file
220
.github/workflows/REUSABLE_frontend.yml
vendored
Normal file
@@ -0,0 +1,220 @@
|
|||||||
|
name: Flarum Frontend Jobs
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
enable_bundlewatch:
|
||||||
|
description: "Enable Bundlewatch?"
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
required: false
|
||||||
|
enable_prettier:
|
||||||
|
description: "Enable Prettier?"
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
required: false
|
||||||
|
enable_typescript:
|
||||||
|
description: "Enable TypeScript?"
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
required: false
|
||||||
|
|
||||||
|
backend_directory:
|
||||||
|
description: The directory of the project where backend code is located. This should contain a `composer.json` file, and is generally the root directory of the repo.
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: '.'
|
||||||
|
frontend_directory:
|
||||||
|
description: The directory of the project where frontend code is located. This should contain a `package.json` file.
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: './js'
|
||||||
|
main_git_branch:
|
||||||
|
description: The main git branch to use for the workflow.
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: main
|
||||||
|
node_version:
|
||||||
|
description: The node version to use for the workflow.
|
||||||
|
type: number
|
||||||
|
required: false
|
||||||
|
default: 16
|
||||||
|
|
||||||
|
js_package_manager:
|
||||||
|
description: "Enable TypeScript?"
|
||||||
|
type: string
|
||||||
|
default: yarn
|
||||||
|
required: false
|
||||||
|
cache_dependency_path:
|
||||||
|
description: "The path to the cache dependency file."
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
|
||||||
|
secrets:
|
||||||
|
bundlewatch_github_token:
|
||||||
|
description: The GitHub token to use for Bundlewatch.
|
||||||
|
required: false
|
||||||
|
|
||||||
|
env:
|
||||||
|
COMPOSER_ROOT_VERSION: dev-main
|
||||||
|
ci_script: ${{ inputs.js_package_manager == 'yarn' && 'yarn install --immutable' || 'npm ci' }}
|
||||||
|
cache_dependency_path: ${{ inputs.cache_dependency_path || format(inputs.js_package_manager == 'yarn' && '{0}/yarn.lock' || '{0}/package-lock.json', inputs.frontend_directory) }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
bundlewatch:
|
||||||
|
name: Bundlewatch
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: inputs.enable_bundlewatch
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up Node
|
||||||
|
uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: ${{ inputs.node_version }}
|
||||||
|
cache: ${{ inputs.js_package_manager }}
|
||||||
|
cache-dependency-path: ${{ env.cache_dependency_path }}
|
||||||
|
|
||||||
|
- name: Build production assets
|
||||||
|
uses: flarum/action-build@2
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.github_token }}
|
||||||
|
build_script: build
|
||||||
|
package_manager: ${{ inputs.js_package_manager }}
|
||||||
|
js_path: ${{ inputs.frontend_directory }}
|
||||||
|
do_not_commit: true
|
||||||
|
|
||||||
|
- name: Check bundle size change
|
||||||
|
run: node_modules/.bin/bundlewatch --config .bundlewatch.config.json
|
||||||
|
working-directory: ${{ inputs.frontend_directory }}
|
||||||
|
env:
|
||||||
|
BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.bundlewatch_github_token }}
|
||||||
|
CI_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
|
||||||
|
|
||||||
|
prettier:
|
||||||
|
name: Prettier
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: inputs.enable_prettier
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up Node
|
||||||
|
uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: ${{ inputs.node_version }}
|
||||||
|
cache: ${{ inputs.js_package_manager }}
|
||||||
|
cache-dependency-path: ${{ env.cache_dependency_path }}
|
||||||
|
|
||||||
|
- name: Install JS dependencies
|
||||||
|
run: ${{ env.ci_script }}
|
||||||
|
working-directory: ${{ inputs.frontend_directory }}
|
||||||
|
|
||||||
|
- name: Check JS formatting
|
||||||
|
run: ${{ inputs.js_package_manager }} run format-check
|
||||||
|
working-directory: ${{ inputs.frontend_directory }}
|
||||||
|
|
||||||
|
typecheck:
|
||||||
|
name: Typecheck
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: inputs.enable_typescript
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up Node
|
||||||
|
uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: ${{ inputs.node_version }}
|
||||||
|
cache: ${{ inputs.js_package_manager }}
|
||||||
|
cache-dependency-path: ${{ env.cache_dependency_path }}
|
||||||
|
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: '8.0'
|
||||||
|
extensions: curl, dom, gd, json, mbstring, openssl, pdo_mysql, tokenizer, zip
|
||||||
|
tools: composer:v2
|
||||||
|
|
||||||
|
# Needed since tsconfig draws typings from vendor folder.
|
||||||
|
- name: Install Composer dependencies
|
||||||
|
run: composer install
|
||||||
|
working-directory: ${{ inputs.backend_directory }}
|
||||||
|
|
||||||
|
- name: Install JS dependencies
|
||||||
|
run: ${{ env.ci_script }}
|
||||||
|
working-directory: ${{ inputs.frontend_directory }}
|
||||||
|
|
||||||
|
- name: Typecheck
|
||||||
|
run: ${{ inputs.js_package_manager }} run check-typings
|
||||||
|
working-directory: ${{ inputs.frontend_directory }}
|
||||||
|
|
||||||
|
type-coverage:
|
||||||
|
name: Type Coverage
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: inputs.enable_typescript
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up Node
|
||||||
|
uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: ${{ inputs.node_version }}
|
||||||
|
cache: ${{ inputs.js_package_manager }}
|
||||||
|
cache-dependency-path: ${{ env.cache_dependency_path }}
|
||||||
|
|
||||||
|
- name: Install JS dependencies
|
||||||
|
run: ${{ env.ci_script }}
|
||||||
|
working-directory: ${{ inputs.frontend_directory }}
|
||||||
|
|
||||||
|
- name: Check type coverage
|
||||||
|
run: ${{ inputs.js_package_manager }} run check-typings-coverage
|
||||||
|
working-directory: ${{ inputs.frontend_directory }}
|
||||||
|
|
||||||
|
build:
|
||||||
|
name: Build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: "always() && !contains(needs.*.result, 'failed') && !contains(needs.*.result, 'cancelled')"
|
||||||
|
needs: [bundlewatch, prettier, typecheck, type-coverage]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up Node
|
||||||
|
uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: ${{ inputs.node_version }}
|
||||||
|
cache: ${{ inputs.js_package_manager }}
|
||||||
|
cache-dependency-path: ${{ env.cache_dependency_path }}
|
||||||
|
|
||||||
|
# Our action will install npm/yarn, cd into `${{ inputs.frontend_directory }}`, build dist JS and typings,
|
||||||
|
# then commit and upload any changes iff we are on the main branch and have just pushed.
|
||||||
|
- name: Build production JS
|
||||||
|
if: inputs.enable_typescript
|
||||||
|
uses: flarum/action-build@2
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
build_script: build
|
||||||
|
package_manager: ${{ inputs.js_package_manager }}
|
||||||
|
typings_script: build-typings
|
||||||
|
js_path: ${{ inputs.frontend_directory }}
|
||||||
|
do_not_commit: ${{ github.ref != format('refs/heads/{0}', inputs.main_git_branch) || github.event_name != 'push' }}
|
||||||
|
|
||||||
|
# Our action will install npm/yarn, cd into `${{ inputs.frontend_directory }}`, build dist JS and typings,
|
||||||
|
# then commit and upload any changes iff we are on the main branch and have just pushed.
|
||||||
|
- name: Build production JS
|
||||||
|
if: "! inputs.enable_typescript"
|
||||||
|
uses: flarum/action-build@2
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
build_script: build
|
||||||
|
package_manager: ${{ inputs.js_package_manager }}
|
||||||
|
js_path: ${{ inputs.frontend_directory }}
|
||||||
|
do_not_commit: ${{ github.ref != format('refs/heads/{0}', inputs.main_git_branch) || github.event_name != 'push' }}
|
6
.github/workflows/flarum-akismet-backend.yml
vendored
6
.github/workflows/flarum-akismet-backend.yml
vendored
@@ -2,13 +2,9 @@ name: Akismet PHP
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
with:
|
with:
|
||||||
enable_backend_testing: true
|
enable_backend_testing: true
|
||||||
|
|
||||||
|
@@ -2,13 +2,9 @@ name: Akismet JS
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
uses: ./.github/workflows/REUSABLE_frontend.yml
|
||||||
with:
|
with:
|
||||||
enable_bundlewatch: false
|
enable_bundlewatch: false
|
||||||
enable_prettier: true
|
enable_prettier: true
|
||||||
@@ -17,6 +13,7 @@ jobs:
|
|||||||
frontend_directory: ./extensions/akismet/js
|
frontend_directory: ./extensions/akismet/js
|
||||||
backend_directory: ./extensions/akismet
|
backend_directory: ./extensions/akismet
|
||||||
js_package_manager: yarn
|
js_package_manager: yarn
|
||||||
|
cache_dependency_path: ./yarn.lock
|
||||||
main_git_branch: main
|
main_git_branch: main
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
|
@@ -2,14 +2,10 @@ name: Approval PHP
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
with:
|
with:
|
||||||
enable_backend_testing: false
|
enable_backend_testing: true
|
||||||
|
|
||||||
backend_directory: ./extensions/approval
|
backend_directory: ./extensions/approval
|
||||||
|
@@ -2,13 +2,9 @@ name: Approval JS
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
uses: ./.github/workflows/REUSABLE_frontend.yml
|
||||||
with:
|
with:
|
||||||
enable_bundlewatch: false
|
enable_bundlewatch: false
|
||||||
enable_prettier: true
|
enable_prettier: true
|
||||||
@@ -17,6 +13,7 @@ jobs:
|
|||||||
frontend_directory: ./extensions/approval/js
|
frontend_directory: ./extensions/approval/js
|
||||||
backend_directory: ./extensions/approval
|
backend_directory: ./extensions/approval
|
||||||
js_package_manager: yarn
|
js_package_manager: yarn
|
||||||
|
cache_dependency_path: ./yarn.lock
|
||||||
main_git_branch: main
|
main_git_branch: main
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
|
6
.github/workflows/flarum-core-backend.yml
vendored
6
.github/workflows/flarum-core-backend.yml
vendored
@@ -2,13 +2,9 @@ name: Core PHP
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
with:
|
with:
|
||||||
enable_backend_testing: true
|
enable_backend_testing: true
|
||||||
|
|
||||||
|
7
.github/workflows/flarum-core-frontend.yml
vendored
7
.github/workflows/flarum-core-frontend.yml
vendored
@@ -2,13 +2,9 @@ name: Core JS
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
uses: ./.github/workflows/REUSABLE_frontend.yml
|
||||||
with:
|
with:
|
||||||
enable_bundlewatch: true
|
enable_bundlewatch: true
|
||||||
enable_prettier: true
|
enable_prettier: true
|
||||||
@@ -17,6 +13,7 @@ jobs:
|
|||||||
frontend_directory: ./framework/core/js
|
frontend_directory: ./framework/core/js
|
||||||
backend_directory: ./framework/core
|
backend_directory: ./framework/core
|
||||||
js_package_manager: yarn
|
js_package_manager: yarn
|
||||||
|
cache_dependency_path: ./yarn.lock
|
||||||
main_git_branch: main
|
main_git_branch: main
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
|
6
.github/workflows/flarum-embed-backend.yml
vendored
6
.github/workflows/flarum-embed-backend.yml
vendored
@@ -2,13 +2,9 @@ name: Embed PHP
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
with:
|
with:
|
||||||
enable_backend_testing: false
|
enable_backend_testing: false
|
||||||
|
|
||||||
|
7
.github/workflows/flarum-embed-frontend.yml
vendored
7
.github/workflows/flarum-embed-frontend.yml
vendored
@@ -2,13 +2,9 @@ name: Embed JS
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
uses: ./.github/workflows/REUSABLE_frontend.yml
|
||||||
with:
|
with:
|
||||||
enable_bundlewatch: false
|
enable_bundlewatch: false
|
||||||
enable_prettier: true
|
enable_prettier: true
|
||||||
@@ -17,6 +13,7 @@ jobs:
|
|||||||
frontend_directory: ./extensions/embed/js
|
frontend_directory: ./extensions/embed/js
|
||||||
backend_directory: ./extensions/embed
|
backend_directory: ./extensions/embed
|
||||||
js_package_manager: yarn
|
js_package_manager: yarn
|
||||||
|
cache_dependency_path: ./yarn.lock
|
||||||
main_git_branch: main
|
main_git_branch: main
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
|
6
.github/workflows/flarum-emoji-backend.yml
vendored
6
.github/workflows/flarum-emoji-backend.yml
vendored
@@ -2,13 +2,9 @@ name: Emoji PHP
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
with:
|
with:
|
||||||
enable_backend_testing: false
|
enable_backend_testing: false
|
||||||
|
|
||||||
|
7
.github/workflows/flarum-emoji-frontend.yml
vendored
7
.github/workflows/flarum-emoji-frontend.yml
vendored
@@ -2,13 +2,9 @@ name: Emoji JS
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
uses: ./.github/workflows/REUSABLE_frontend.yml
|
||||||
with:
|
with:
|
||||||
enable_bundlewatch: false
|
enable_bundlewatch: false
|
||||||
enable_prettier: true
|
enable_prettier: true
|
||||||
@@ -17,6 +13,7 @@ jobs:
|
|||||||
frontend_directory: ./extensions/emoji/js
|
frontend_directory: ./extensions/emoji/js
|
||||||
backend_directory: ./extensions/emoji
|
backend_directory: ./extensions/emoji
|
||||||
js_package_manager: yarn
|
js_package_manager: yarn
|
||||||
|
cache_dependency_path: ./yarn.lock
|
||||||
main_git_branch: main
|
main_git_branch: main
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
|
6
.github/workflows/flarum-flags-backend.yml
vendored
6
.github/workflows/flarum-flags-backend.yml
vendored
@@ -2,13 +2,9 @@ name: Flags PHP
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
with:
|
with:
|
||||||
enable_backend_testing: true
|
enable_backend_testing: true
|
||||||
|
|
||||||
|
7
.github/workflows/flarum-flags-frontend.yml
vendored
7
.github/workflows/flarum-flags-frontend.yml
vendored
@@ -2,13 +2,9 @@ name: Flags JS
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
uses: ./.github/workflows/REUSABLE_frontend.yml
|
||||||
with:
|
with:
|
||||||
enable_bundlewatch: false
|
enable_bundlewatch: false
|
||||||
enable_prettier: true
|
enable_prettier: true
|
||||||
@@ -17,6 +13,7 @@ jobs:
|
|||||||
frontend_directory: ./extensions/flags/js
|
frontend_directory: ./extensions/flags/js
|
||||||
backend_directory: ./extensions/flags
|
backend_directory: ./extensions/flags
|
||||||
js_package_manager: yarn
|
js_package_manager: yarn
|
||||||
|
cache_dependency_path: ./yarn.lock
|
||||||
main_git_branch: main
|
main_git_branch: main
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
|
8
.github/workflows/flarum-likes-backend.yml
vendored
8
.github/workflows/flarum-likes-backend.yml
vendored
@@ -2,14 +2,10 @@ name: Likes PHP
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
with:
|
with:
|
||||||
enable_backend_testing: false
|
enable_backend_testing: true
|
||||||
|
|
||||||
backend_directory: ./extensions/likes
|
backend_directory: ./extensions/likes
|
||||||
|
7
.github/workflows/flarum-likes-frontend.yml
vendored
7
.github/workflows/flarum-likes-frontend.yml
vendored
@@ -2,13 +2,9 @@ name: Likes JS
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
uses: ./.github/workflows/REUSABLE_frontend.yml
|
||||||
with:
|
with:
|
||||||
enable_bundlewatch: false
|
enable_bundlewatch: false
|
||||||
enable_prettier: true
|
enable_prettier: true
|
||||||
@@ -17,6 +13,7 @@ jobs:
|
|||||||
frontend_directory: ./extensions/likes/js
|
frontend_directory: ./extensions/likes/js
|
||||||
backend_directory: ./extensions/likes
|
backend_directory: ./extensions/likes
|
||||||
js_package_manager: yarn
|
js_package_manager: yarn
|
||||||
|
cache_dependency_path: ./yarn.lock
|
||||||
main_git_branch: main
|
main_git_branch: main
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
|
6
.github/workflows/flarum-lock-backend.yml
vendored
6
.github/workflows/flarum-lock-backend.yml
vendored
@@ -2,13 +2,9 @@ name: Lock PHP
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
with:
|
with:
|
||||||
enable_backend_testing: false
|
enable_backend_testing: false
|
||||||
|
|
||||||
|
7
.github/workflows/flarum-lock-frontend.yml
vendored
7
.github/workflows/flarum-lock-frontend.yml
vendored
@@ -2,13 +2,9 @@ name: Lock JS
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
uses: ./.github/workflows/REUSABLE_frontend.yml
|
||||||
with:
|
with:
|
||||||
enable_bundlewatch: false
|
enable_bundlewatch: false
|
||||||
enable_prettier: true
|
enable_prettier: true
|
||||||
@@ -17,6 +13,7 @@ jobs:
|
|||||||
frontend_directory: ./extensions/lock/js
|
frontend_directory: ./extensions/lock/js
|
||||||
backend_directory: ./extensions/lock
|
backend_directory: ./extensions/lock
|
||||||
js_package_manager: yarn
|
js_package_manager: yarn
|
||||||
|
cache_dependency_path: ./yarn.lock
|
||||||
main_git_branch: main
|
main_git_branch: main
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
|
@@ -2,13 +2,9 @@ name: Markdown PHP
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
with:
|
with:
|
||||||
enable_backend_testing: false
|
enable_backend_testing: false
|
||||||
|
|
||||||
|
@@ -2,13 +2,9 @@ name: Markdown JS
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
uses: ./.github/workflows/REUSABLE_frontend.yml
|
||||||
with:
|
with:
|
||||||
enable_bundlewatch: false
|
enable_bundlewatch: false
|
||||||
enable_prettier: true
|
enable_prettier: true
|
||||||
@@ -17,6 +13,7 @@ jobs:
|
|||||||
frontend_directory: ./extensions/markdown/js
|
frontend_directory: ./extensions/markdown/js
|
||||||
backend_directory: ./extensions/markdown
|
backend_directory: ./extensions/markdown
|
||||||
js_package_manager: yarn
|
js_package_manager: yarn
|
||||||
|
cache_dependency_path: ./yarn.lock
|
||||||
main_git_branch: main
|
main_git_branch: main
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
|
@@ -2,13 +2,9 @@ name: Mentions PHP
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
with:
|
with:
|
||||||
enable_backend_testing: true
|
enable_backend_testing: true
|
||||||
|
|
||||||
|
@@ -2,13 +2,9 @@ name: Mentions JS
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
uses: ./.github/workflows/REUSABLE_frontend.yml
|
||||||
with:
|
with:
|
||||||
enable_bundlewatch: false
|
enable_bundlewatch: false
|
||||||
enable_prettier: true
|
enable_prettier: true
|
||||||
@@ -17,6 +13,7 @@ jobs:
|
|||||||
frontend_directory: ./extensions/mentions/js
|
frontend_directory: ./extensions/mentions/js
|
||||||
backend_directory: ./extensions/mentions
|
backend_directory: ./extensions/mentions
|
||||||
js_package_manager: yarn
|
js_package_manager: yarn
|
||||||
|
cache_dependency_path: ./yarn.lock
|
||||||
main_git_branch: main
|
main_git_branch: main
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
|
@@ -2,13 +2,9 @@ name: Nicknames PHP
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
with:
|
with:
|
||||||
enable_backend_testing: true
|
enable_backend_testing: true
|
||||||
|
|
||||||
|
@@ -2,13 +2,9 @@ name: Nicknames JS
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
uses: ./.github/workflows/REUSABLE_frontend.yml
|
||||||
with:
|
with:
|
||||||
enable_bundlewatch: false
|
enable_bundlewatch: false
|
||||||
enable_prettier: true
|
enable_prettier: true
|
||||||
@@ -17,6 +13,7 @@ jobs:
|
|||||||
frontend_directory: ./extensions/nicknames/js
|
frontend_directory: ./extensions/nicknames/js
|
||||||
backend_directory: ./extensions/nicknames
|
backend_directory: ./extensions/nicknames
|
||||||
js_package_manager: yarn
|
js_package_manager: yarn
|
||||||
|
cache_dependency_path: ./yarn.lock
|
||||||
main_git_branch: main
|
main_git_branch: main
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
|
11
.github/workflows/flarum-package-manager-backend.yml
vendored
Normal file
11
.github/workflows/flarum-package-manager-backend.yml
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
name: Package Manager PHP
|
||||||
|
|
||||||
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
run:
|
||||||
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
|
with:
|
||||||
|
enable_backend_testing: true
|
||||||
|
|
||||||
|
backend_directory: ./extensions/package-manager
|
@@ -2,13 +2,9 @@ name: Package Manager JS
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
uses: ./.github/workflows/REUSABLE_frontend.yml
|
||||||
with:
|
with:
|
||||||
enable_bundlewatch: false
|
enable_bundlewatch: false
|
||||||
enable_prettier: true
|
enable_prettier: true
|
||||||
@@ -17,6 +13,7 @@ jobs:
|
|||||||
frontend_directory: ./extensions/package-manager/js
|
frontend_directory: ./extensions/package-manager/js
|
||||||
backend_directory: ./extensions/package-manager
|
backend_directory: ./extensions/package-manager
|
||||||
js_package_manager: yarn
|
js_package_manager: yarn
|
||||||
|
cache_dependency_path: ./yarn.lock
|
||||||
main_git_branch: main
|
main_git_branch: main
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
|
6
.github/workflows/flarum-pusher-backend.yml
vendored
6
.github/workflows/flarum-pusher-backend.yml
vendored
@@ -2,13 +2,9 @@ name: Pusher PHP
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
with:
|
with:
|
||||||
enable_backend_testing: false
|
enable_backend_testing: false
|
||||||
|
|
||||||
|
7
.github/workflows/flarum-pusher-frontend.yml
vendored
7
.github/workflows/flarum-pusher-frontend.yml
vendored
@@ -2,13 +2,9 @@ name: Pusher JS
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
uses: ./.github/workflows/REUSABLE_frontend.yml
|
||||||
with:
|
with:
|
||||||
enable_bundlewatch: false
|
enable_bundlewatch: false
|
||||||
enable_prettier: true
|
enable_prettier: true
|
||||||
@@ -17,6 +13,7 @@ jobs:
|
|||||||
frontend_directory: ./extensions/pusher/js
|
frontend_directory: ./extensions/pusher/js
|
||||||
backend_directory: ./extensions/pusher
|
backend_directory: ./extensions/pusher
|
||||||
js_package_manager: yarn
|
js_package_manager: yarn
|
||||||
|
cache_dependency_path: ./yarn.lock
|
||||||
main_git_branch: main
|
main_git_branch: main
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
|
@@ -2,13 +2,9 @@ name: Statistics PHP
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
with:
|
with:
|
||||||
enable_backend_testing: true
|
enable_backend_testing: true
|
||||||
|
|
||||||
|
@@ -2,13 +2,9 @@ name: Statistics JS
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
uses: ./.github/workflows/REUSABLE_frontend.yml
|
||||||
with:
|
with:
|
||||||
enable_bundlewatch: false
|
enable_bundlewatch: false
|
||||||
enable_prettier: true
|
enable_prettier: true
|
||||||
@@ -17,6 +13,7 @@ jobs:
|
|||||||
frontend_directory: ./extensions/statistics/js
|
frontend_directory: ./extensions/statistics/js
|
||||||
backend_directory: ./extensions/statistics
|
backend_directory: ./extensions/statistics
|
||||||
js_package_manager: yarn
|
js_package_manager: yarn
|
||||||
|
cache_dependency_path: ./yarn.lock
|
||||||
main_git_branch: main
|
main_git_branch: main
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
|
8
.github/workflows/flarum-sticky-backend.yml
vendored
8
.github/workflows/flarum-sticky-backend.yml
vendored
@@ -2,14 +2,10 @@ name: Sticky PHP
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
with:
|
with:
|
||||||
enable_backend_testing: false
|
enable_backend_testing: true
|
||||||
|
|
||||||
backend_directory: ./extensions/sticky
|
backend_directory: ./extensions/sticky
|
||||||
|
7
.github/workflows/flarum-sticky-frontend.yml
vendored
7
.github/workflows/flarum-sticky-frontend.yml
vendored
@@ -2,13 +2,9 @@ name: Sticky JS
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
uses: ./.github/workflows/REUSABLE_frontend.yml
|
||||||
with:
|
with:
|
||||||
enable_bundlewatch: false
|
enable_bundlewatch: false
|
||||||
enable_prettier: true
|
enable_prettier: true
|
||||||
@@ -17,6 +13,7 @@ jobs:
|
|||||||
frontend_directory: ./extensions/sticky/js
|
frontend_directory: ./extensions/sticky/js
|
||||||
backend_directory: ./extensions/sticky
|
backend_directory: ./extensions/sticky
|
||||||
js_package_manager: yarn
|
js_package_manager: yarn
|
||||||
|
cache_dependency_path: ./yarn.lock
|
||||||
main_git_branch: main
|
main_git_branch: main
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
|
@@ -2,14 +2,10 @@ name: Subscriptions PHP
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
with:
|
with:
|
||||||
enable_backend_testing: false
|
enable_backend_testing: true
|
||||||
|
|
||||||
backend_directory: ./extensions/subscriptions
|
backend_directory: ./extensions/subscriptions
|
||||||
|
@@ -2,13 +2,9 @@ name: Subscriptions JS
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
uses: ./.github/workflows/REUSABLE_frontend.yml
|
||||||
with:
|
with:
|
||||||
enable_bundlewatch: false
|
enable_bundlewatch: false
|
||||||
enable_prettier: true
|
enable_prettier: true
|
||||||
@@ -17,6 +13,7 @@ jobs:
|
|||||||
frontend_directory: ./extensions/subscriptions/js
|
frontend_directory: ./extensions/subscriptions/js
|
||||||
backend_directory: ./extensions/subscriptions
|
backend_directory: ./extensions/subscriptions
|
||||||
js_package_manager: yarn
|
js_package_manager: yarn
|
||||||
|
cache_dependency_path: ./yarn.lock
|
||||||
main_git_branch: main
|
main_git_branch: main
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
|
8
.github/workflows/flarum-suspend-backend.yml
vendored
8
.github/workflows/flarum-suspend-backend.yml
vendored
@@ -2,14 +2,10 @@ name: Suspend PHP
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
with:
|
with:
|
||||||
enable_backend_testing: false
|
enable_backend_testing: true
|
||||||
|
|
||||||
backend_directory: ./extensions/suspend
|
backend_directory: ./extensions/suspend
|
||||||
|
@@ -2,13 +2,9 @@ name: Suspend JS
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
uses: ./.github/workflows/REUSABLE_frontend.yml
|
||||||
with:
|
with:
|
||||||
enable_bundlewatch: false
|
enable_bundlewatch: false
|
||||||
enable_prettier: true
|
enable_prettier: true
|
||||||
@@ -17,6 +13,7 @@ jobs:
|
|||||||
frontend_directory: ./extensions/suspend/js
|
frontend_directory: ./extensions/suspend/js
|
||||||
backend_directory: ./extensions/suspend
|
backend_directory: ./extensions/suspend
|
||||||
js_package_manager: yarn
|
js_package_manager: yarn
|
||||||
|
cache_dependency_path: ./yarn.lock
|
||||||
main_git_branch: main
|
main_git_branch: main
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
|
6
.github/workflows/flarum-tags-backend.yml
vendored
6
.github/workflows/flarum-tags-backend.yml
vendored
@@ -2,13 +2,9 @@ name: Tags PHP
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
with:
|
with:
|
||||||
enable_backend_testing: true
|
enable_backend_testing: true
|
||||||
|
|
||||||
|
9
.github/workflows/flarum-tags-frontend.yml
vendored
9
.github/workflows/flarum-tags-frontend.yml
vendored
@@ -2,21 +2,18 @@ name: Tags JS
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
uses: ./.github/workflows/REUSABLE_frontend.yml
|
||||||
with:
|
with:
|
||||||
enable_bundlewatch: false
|
enable_bundlewatch: false
|
||||||
enable_prettier: false
|
enable_prettier: true
|
||||||
enable_typescript: true
|
enable_typescript: true
|
||||||
|
|
||||||
frontend_directory: ./extensions/tags/js
|
frontend_directory: ./extensions/tags/js
|
||||||
backend_directory: ./extensions/tags
|
backend_directory: ./extensions/tags
|
||||||
js_package_manager: yarn
|
js_package_manager: yarn
|
||||||
|
cache_dependency_path: ./yarn.lock
|
||||||
main_git_branch: main
|
main_git_branch: main
|
||||||
secrets:
|
secrets:
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
||||||
|
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1 +1,3 @@
|
|||||||
node_modules
|
node_modules
|
||||||
|
vendor
|
||||||
|
composer.lock
|
||||||
|
File diff suppressed because it is too large
Load Diff
182
composer.json
Normal file
182
composer.json
Normal file
@@ -0,0 +1,182 @@
|
|||||||
|
{
|
||||||
|
"name": "flarum/framework",
|
||||||
|
"description": "Delightfully simple forum software.",
|
||||||
|
"keywords": [
|
||||||
|
"forum",
|
||||||
|
"discussion"
|
||||||
|
],
|
||||||
|
"homepage": "https://flarum.org/",
|
||||||
|
"license": "MIT",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Flarum",
|
||||||
|
"email": "info@flarum.org",
|
||||||
|
"homepage": "https://flarum.org/team"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/flarum"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/flarum"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "other",
|
||||||
|
"url": "https://flarum.org/donate"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/flarum/framework/issues",
|
||||||
|
"source": "https://github.com/flarum/framework",
|
||||||
|
"docs": "https://docs.flarum.org",
|
||||||
|
"forum": "https://discuss.flarum.org",
|
||||||
|
"chat": "https://flarum.org/chat"
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Flarum\\": "framework/core/src",
|
||||||
|
"Flarum\\Akismet\\": "extensions/akismet/src",
|
||||||
|
"Flarum\\Approval\\": "extensions/approval/src",
|
||||||
|
"Flarum\\Flags\\": "extensions/flags/src",
|
||||||
|
"Flarum\\Likes\\": "extensions/likes/src",
|
||||||
|
"Flarum\\Lock\\": "extensions/lock/src",
|
||||||
|
"Flarum\\Mentions\\": "extensions/mentions/src",
|
||||||
|
"Flarum\\Nicknames\\": "extensions/nicknames/src",
|
||||||
|
"Flarum\\PackageManager\\": "extensions/package-manager/src",
|
||||||
|
"Flarum\\Pusher\\": "extensions/pusher/src",
|
||||||
|
"Flarum\\Statistics\\": "extensions/statistics/src",
|
||||||
|
"Flarum\\Sticky\\": "extensions/sticky/src",
|
||||||
|
"Flarum\\Subscriptions\\": "extensions/subscriptions/src",
|
||||||
|
"Flarum\\Suspend\\": "extensions/suspend/src",
|
||||||
|
"Flarum\\Tags\\": "extensions/tags/src",
|
||||||
|
"Flarum\\PHPStan\\": "php-packages/phpstan/src",
|
||||||
|
"Flarum\\Testing\\": "php-packages/testing/src"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"framework/core/src/helpers.php"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"replace": {
|
||||||
|
"flarum/core": "self.version",
|
||||||
|
"flarum/akismet": "self.version",
|
||||||
|
"flarum/approval": "self.version",
|
||||||
|
"flarum/bbcode": "self.version",
|
||||||
|
"flarum/embed": "self.version",
|
||||||
|
"flarum/emoji": "self.version",
|
||||||
|
"flarum/flags": "self.version",
|
||||||
|
"flarum/lang-english": "self.version",
|
||||||
|
"flarum/likes": "self.version",
|
||||||
|
"flarum/lock": "self.version",
|
||||||
|
"flarum/markdown": "self.version",
|
||||||
|
"flarum/mentions": "self.version",
|
||||||
|
"flarum/nicknames": "self.version",
|
||||||
|
"flarum/package-manager": "self.version",
|
||||||
|
"flarum/pusher": "self.version",
|
||||||
|
"flarum/statistics": "self.version",
|
||||||
|
"flarum/sticky": "self.version",
|
||||||
|
"flarum/subscriptions": "self.version",
|
||||||
|
"flarum/suspend": "self.version",
|
||||||
|
"flarum/tags": "self.version",
|
||||||
|
"flarum/phpstan": "self.version",
|
||||||
|
"flarum/testing": "self.version"
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-json": "*",
|
||||||
|
"php": ">=7.3",
|
||||||
|
"components/font-awesome": "^5.14.0",
|
||||||
|
"composer/composer": "^2.0",
|
||||||
|
"dflydev/fig-cookies": "^3.0.0",
|
||||||
|
"doctrine/dbal": "^2.7",
|
||||||
|
"dragonmantank/cron-expression": "^3.1.0",
|
||||||
|
"franzl/whoops-middleware": "^2.0.0",
|
||||||
|
"guzzlehttp/guzzle": "^6.0|^7.4",
|
||||||
|
"illuminate/bus": "^8.0",
|
||||||
|
"illuminate/cache": "^8.0",
|
||||||
|
"illuminate/config": "^8.0",
|
||||||
|
"illuminate/console": "^8.0",
|
||||||
|
"illuminate/container": "^8.0",
|
||||||
|
"illuminate/contracts": "^8.0",
|
||||||
|
"illuminate/database": "^8.0",
|
||||||
|
"illuminate/events": "^8.0",
|
||||||
|
"illuminate/filesystem": "^8.0",
|
||||||
|
"illuminate/hashing": "^8.0",
|
||||||
|
"illuminate/mail": "^8.0",
|
||||||
|
"illuminate/queue": "^8.0",
|
||||||
|
"illuminate/session": "^8.0",
|
||||||
|
"illuminate/support": "^8.0",
|
||||||
|
"illuminate/validation": "^8.0",
|
||||||
|
"illuminate/view": "^8.0",
|
||||||
|
"intervention/image": "2.5.* || ^2.6.1",
|
||||||
|
"laminas/laminas-diactoros": "^2.4.1",
|
||||||
|
"laminas/laminas-httphandlerrunner": "^1.2.0",
|
||||||
|
"laminas/laminas-stratigility": "^3.2.2",
|
||||||
|
"league/flysystem": "^1.0.11",
|
||||||
|
"matthiasmullie/minify": "^1.3",
|
||||||
|
"middlewares/base-path": "^2.0.1",
|
||||||
|
"middlewares/base-path-router": "^2.0.1",
|
||||||
|
"middlewares/request-handler": "^2.0.1",
|
||||||
|
"monolog/monolog": "^1.16.0",
|
||||||
|
"nesbot/carbon": "^2.0",
|
||||||
|
"nikic/fast-route": "^0.6",
|
||||||
|
"psr/http-message": "^1.0",
|
||||||
|
"psr/http-server-handler": "^1.0",
|
||||||
|
"psr/http-server-middleware": "^1.0",
|
||||||
|
"pusher/pusher-php-server": "^2.2",
|
||||||
|
"s9e/text-formatter": "^2.3.6",
|
||||||
|
"sycho/json-api": "^0.5.0",
|
||||||
|
"sycho/sourcemap": "^2.0.0",
|
||||||
|
"symfony/config": "^5.2.2",
|
||||||
|
"symfony/console": "^5.2.2",
|
||||||
|
"symfony/event-dispatcher": "^5.2.2",
|
||||||
|
"symfony/mime": "^5.2.0",
|
||||||
|
"symfony/polyfill-intl-messageformatter": "^1.22.0",
|
||||||
|
"symfony/translation": "^5.1.5",
|
||||||
|
"symfony/yaml": "^5.2.2",
|
||||||
|
"wikimedia/less.php": "^3.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"mockery/mockery": "^1.4",
|
||||||
|
"phpunit/phpunit": "^9.0",
|
||||||
|
"phpstan/phpstan-php-parser": "^1.0",
|
||||||
|
"phpstan/phpstan": "^1.2"
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"sort-packages": true
|
||||||
|
},
|
||||||
|
"minimum-stability": "dev",
|
||||||
|
"prefer-stable": true,
|
||||||
|
"extra": {
|
||||||
|
"flarum-subextensions": [
|
||||||
|
"extensions/akismet",
|
||||||
|
"extensions/approval",
|
||||||
|
"extensions/bbcode",
|
||||||
|
"extensions/embed",
|
||||||
|
"extensions/emoji",
|
||||||
|
"extensions/flags",
|
||||||
|
"extensions/lang-english",
|
||||||
|
"extensions/likes",
|
||||||
|
"extensions/lock",
|
||||||
|
"extensions/markdown",
|
||||||
|
"extensions/mentions",
|
||||||
|
"extensions/nicknames",
|
||||||
|
"extensions/package-manager",
|
||||||
|
"extensions/pusher",
|
||||||
|
"extensions/statistics",
|
||||||
|
"extensions/sticky",
|
||||||
|
"extensions/subscriptions",
|
||||||
|
"extensions/suspend",
|
||||||
|
"extensions/tags"
|
||||||
|
],
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-main": "1.x-dev"
|
||||||
|
},
|
||||||
|
"phpstan": {
|
||||||
|
"includes": [
|
||||||
|
"extension.neon"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -1,19 +0,0 @@
|
|||||||
# EditorConfig helps developers define and maintain consistent
|
|
||||||
# coding styles between different editors and IDEs
|
|
||||||
# editorconfig.org
|
|
||||||
|
|
||||||
root = true
|
|
||||||
|
|
||||||
[*]
|
|
||||||
end_of_line = lf
|
|
||||||
charset = utf-8
|
|
||||||
trim_trailing_whitespace = true
|
|
||||||
insert_final_newline = true
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 2
|
|
||||||
|
|
||||||
[*.{diff,md}]
|
|
||||||
trim_trailing_whitespace = false
|
|
||||||
|
|
||||||
[*.{php,xml,json}]
|
|
||||||
indent_size = 4
|
|
20
extensions/akismet/.gitattributes
vendored
Normal file
20
extensions/akismet/.gitattributes
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
**/.gitattributes export-ignore
|
||||||
|
**/.gitignore export-ignore
|
||||||
|
**/.gitmodules export-ignore
|
||||||
|
**/.github export-ignore
|
||||||
|
**/.travis export-ignore
|
||||||
|
**/.travis.yml export-ignore
|
||||||
|
**/.editorconfig export-ignore
|
||||||
|
**/.styleci.yml export-ignore
|
||||||
|
|
||||||
|
**/phpunit.xml export-ignore
|
||||||
|
**/tests export-ignore
|
||||||
|
|
||||||
|
**/js/dist/**/* -diff
|
||||||
|
**/js/dist/**/* linguist-generated
|
||||||
|
**/js/dist-typings/**/* -diff
|
||||||
|
**/js/dist-typings/**/* linguist-generated
|
||||||
|
**/js/yarn.lock -diff
|
||||||
|
**/js/package-lock.json -diff
|
||||||
|
|
||||||
|
* text=auto eol=lf
|
@@ -7,7 +7,7 @@
|
|||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/flarum/core/issues",
|
"issues": "https://github.com/flarum/framework/issues",
|
||||||
"source": "https://github.com/flarum/akismet",
|
"source": "https://github.com/flarum/akismet",
|
||||||
"forum": "https://discuss.flarum.org"
|
"forum": "https://discuss.flarum.org"
|
||||||
},
|
},
|
||||||
@@ -19,9 +19,8 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"flarum/core": "^1.2",
|
"flarum/core": "^1.4",
|
||||||
"flarum/approval": "^1.2",
|
"flarum/approval": "^1.2"
|
||||||
"guzzlehttp/guzzle": "^7.4"
|
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
2
extensions/akismet/js/dist/forum.js
generated
vendored
2
extensions/akismet/js/dist/forum.js
generated
vendored
@@ -1,2 +1,2 @@
|
|||||||
(()=>{var t={n:e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return t.d(o,{a:o}),o},d:(e,o)=>{for(var r in o)t.o(o,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:o[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};(()=>{"use strict";t.r(e);const o=flarum.core.compat["common/extend"],r=flarum.core.compat["forum/app"];var a=t.n(r);const n=flarum.core.compat["forum/utils/PostControls"];var m=t.n(n);const s=flarum.core.compat["forum/components/CommentPost"];var u=t.n(s);a().initializers.add("flarum-akismet",(function(){(0,o.extend)(m(),"destructiveControls",(function(t,e){if(t.has("approve")){var o=e.flags();o&&o.some((function(t){return"akismet"===t.type()}))&&(t.get("approve").children=a().translator.trans("flarum-akismet.forum.post.not_spam_button"))}})),(0,o.override)(u().prototype,"flagReason",(function(t,e){return"akismet"===e.type()?a().translator.trans("flarum-akismet.forum.post.akismet_flagged_text"):t(e)}))}))})(),module.exports=e})();
|
(()=>{var t={n:e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return t.d(o,{a:o}),o},d:(e,o)=>{for(var r in o)t.o(o,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:o[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};(()=>{"use strict";t.r(e);const o=flarum.core.compat["common/extend"],r=flarum.core.compat["forum/app"];var a=t.n(r);const n=flarum.core.compat["forum/utils/PostControls"];var m=t.n(n);const s=flarum.core.compat["forum/components/CommentPost"];var l=t.n(s);a().initializers.add("flarum-akismet",(function(){(0,o.extend)(m(),"destructiveControls",(function(t,e){if(t.has("approve")){var o=e.flags();if(o&&o.some((function(t){return"akismet"===(null==t?void 0:t.type())}))){var r=t.get("approve");r&&"object"==typeof r&&"children"in r&&(r.children=a().translator.trans("flarum-akismet.forum.post.not_spam_button"))}}})),(0,o.override)(l().prototype,"flagReason",(function(t,e){return"akismet"===e.type()?a().translator.trans("flarum-akismet.forum.post.akismet_flagged_text"):t(e)}))}))})(),module.exports=e})();
|
||||||
//# sourceMappingURL=forum.js.map
|
//# sourceMappingURL=forum.js.map
|
2
extensions/akismet/js/dist/forum.js.map
generated
vendored
2
extensions/akismet/js/dist/forum.js.map
generated
vendored
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,GCLRF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,MCJ3ER,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,M,+BCLvD,MAAM,EAA+BC,OAAOC,KAAKC,OAAO,iBCAlD,EAA+BF,OAAOC,KAAKC,OAAO,a,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,4B,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,gC,aCQxDC,IAAAA,aAAAA,IAAqB,kBAAkB,YACrCC,EAAAA,EAAAA,QAAOC,IAAc,uBAAuB,SAAUC,EAAiBC,GACrE,GAAID,EAAME,IAAI,WAAY,CACxB,IAAMC,EAAQF,EAAKE,QAEfA,GAASA,EAAMC,MAAK,SAACC,GAAD,MAA0B,YAAhBA,EAAKC,YACrCN,EAAMf,IAAI,WAAWsB,SAAWV,IAAAA,WAAAA,MAAqB,mDAK3DW,EAAAA,EAAAA,UAASC,IAAAA,UAAuB,cAAc,SAAUC,EAAUL,GAChE,MAAoB,YAAhBA,EAAKC,OACAT,IAAAA,WAAAA,MAAqB,kDAGvBa,EAASL,U","sources":["webpack://@flarum/akismet/webpack/bootstrap","webpack://@flarum/akismet/webpack/runtime/compat get default export","webpack://@flarum/akismet/webpack/runtime/define property getters","webpack://@flarum/akismet/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/akismet/webpack/runtime/make namespace object","webpack://@flarum/akismet/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/akismet/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/akismet/external root \"flarum.core.compat['forum/utils/PostControls']\"","webpack://@flarum/akismet/external root \"flarum.core.compat['forum/components/CommentPost']\"","webpack://@flarum/akismet/./src/forum/index.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/PostControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/CommentPost'];","import { extend, override } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\n\nimport PostControls from 'flarum/forum/utils/PostControls';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Post from 'flarum/common/models/Post';\n\napp.initializers.add('flarum-akismet', () => {\n extend(PostControls, 'destructiveControls', function (items: ItemList, post: Post) {\n if (items.has('approve')) {\n const flags = post.flags();\n\n if (flags && flags.some((flag) => flag.type() === 'akismet')) {\n items.get('approve').children = app.translator.trans('flarum-akismet.forum.post.not_spam_button');\n }\n }\n });\n\n override(CommentPost.prototype, 'flagReason', function (original, flag) {\n if (flag.type() === 'akismet') {\n return app.translator.trans('flarum-akismet.forum.post.akismet_flagged_text');\n }\n\n return original(flag);\n });\n});\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","app","extend","PostControls","items","post","has","flags","some","flag","type","children","override","CommentPost","original"],"sourceRoot":""}
|
{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,GCLRF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,MCJ3ER,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,M,+BCLvD,MAAM,EAA+BC,OAAOC,KAAKC,OAAO,iBCAlD,EAA+BF,OAAOC,KAAKC,OAAO,a,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,4B,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,gC,aCSxDC,IAAAA,aAAAA,IAAqB,kBAAkB,YACrCC,EAAAA,EAAAA,QAAOC,IAAc,uBAAuB,SAAUC,EAAmCC,GACvF,GAAID,EAAME,IAAI,WAAY,CACxB,IAAMC,EAAQF,EAAKE,QAEnB,GAAIA,GAASA,EAAMC,MAAK,SAACC,GAAD,MAA2B,aAAb,MAAJA,OAAA,EAAAA,EAAMC,WAAuB,CAC7D,IAAMC,EAAcP,EAAMf,IAAI,WAC1BsB,GAAsC,iBAAhBA,GAA4B,aAAcA,IAClEA,EAAYC,SAAWX,IAAAA,WAAAA,MAAqB,oDAMpDY,EAAAA,EAAAA,UAASC,IAAAA,UAAuB,cAAc,SAAUC,EAAUN,GAChE,MAAoB,YAAhBA,EAAKC,OACAT,IAAAA,WAAAA,MAAqB,kDAGvBc,EAASN,U","sources":["webpack://@flarum/akismet/webpack/bootstrap","webpack://@flarum/akismet/webpack/runtime/compat get default export","webpack://@flarum/akismet/webpack/runtime/define property getters","webpack://@flarum/akismet/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/akismet/webpack/runtime/make namespace object","webpack://@flarum/akismet/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/akismet/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/akismet/external root \"flarum.core.compat['forum/utils/PostControls']\"","webpack://@flarum/akismet/external root \"flarum.core.compat['forum/components/CommentPost']\"","webpack://@flarum/akismet/./src/forum/index.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/PostControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/CommentPost'];","import { extend, override } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport type Post from 'flarum/common/models/Post';\nimport type ItemList from 'flarum/common/utils/ItemList';\n\nimport PostControls from 'flarum/forum/utils/PostControls';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport type Mithril from 'mithril';\n\napp.initializers.add('flarum-akismet', () => {\n extend(PostControls, 'destructiveControls', function (items: ItemList<Mithril.Children>, post: Post) {\n if (items.has('approve')) {\n const flags = post.flags();\n\n if (flags && flags.some((flag) => flag?.type() === 'akismet')) {\n const approveItem = items.get('approve');\n if (approveItem && typeof approveItem === 'object' && 'children' in approveItem) {\n approveItem.children = app.translator.trans('flarum-akismet.forum.post.not_spam_button');\n }\n }\n }\n });\n\n override(CommentPost.prototype, 'flagReason', function (original, flag) {\n if (flag.type() === 'akismet') {\n return app.translator.trans('flarum-akismet.forum.post.akismet_flagged_text');\n }\n\n return original(flag);\n });\n});\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","app","extend","PostControls","items","post","has","flags","some","flag","type","approveItem","children","override","CommentPost","original"],"sourceRoot":""}
|
File diff suppressed because it is too large
Load Diff
20
extensions/approval/.gitattributes
vendored
Normal file
20
extensions/approval/.gitattributes
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
**/.gitattributes export-ignore
|
||||||
|
**/.gitignore export-ignore
|
||||||
|
**/.gitmodules export-ignore
|
||||||
|
**/.github export-ignore
|
||||||
|
**/.travis export-ignore
|
||||||
|
**/.travis.yml export-ignore
|
||||||
|
**/.editorconfig export-ignore
|
||||||
|
**/.styleci.yml export-ignore
|
||||||
|
|
||||||
|
**/phpunit.xml export-ignore
|
||||||
|
**/tests export-ignore
|
||||||
|
|
||||||
|
**/js/dist/**/* -diff
|
||||||
|
**/js/dist/**/* linguist-generated
|
||||||
|
**/js/dist-typings/**/* -diff
|
||||||
|
**/js/dist-typings/**/* linguist-generated
|
||||||
|
**/js/yarn.lock -diff
|
||||||
|
**/js/package-lock.json -diff
|
||||||
|
|
||||||
|
* text=auto eol=lf
|
@@ -7,7 +7,7 @@
|
|||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/flarum/core/issues",
|
"issues": "https://github.com/flarum/framework/issues",
|
||||||
"source": "https://github.com/flarum/approval",
|
"source": "https://github.com/flarum/approval",
|
||||||
"forum": "https://discuss.flarum.org"
|
"forum": "https://discuss.flarum.org"
|
||||||
},
|
},
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"flarum/core": "^1.2",
|
"flarum/core": "^1.4",
|
||||||
"flarum/flags": "^1.2"
|
"flarum/flags": "^1.2"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
"prettier": true,
|
"prettier": true,
|
||||||
"typescript": false,
|
"typescript": false,
|
||||||
"bundlewatch": false,
|
"bundlewatch": false,
|
||||||
"backendTesting": false,
|
"backendTesting": true,
|
||||||
"editorConfig": true,
|
"editorConfig": true,
|
||||||
"styleci": true
|
"styleci": true
|
||||||
}
|
}
|
||||||
@@ -65,5 +65,28 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"minimum-stability": "dev",
|
"minimum-stability": "dev",
|
||||||
"prefer-stable": true
|
"prefer-stable": true,
|
||||||
|
"autoload-dev": {
|
||||||
|
"psr-4": {
|
||||||
|
"Flarum\\Approval\\Tests\\": "tests/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"test": [
|
||||||
|
"@test:unit",
|
||||||
|
"@test:integration"
|
||||||
|
],
|
||||||
|
"test:unit": "phpunit -c tests/phpunit.unit.xml",
|
||||||
|
"test:integration": "phpunit -c tests/phpunit.integration.xml",
|
||||||
|
"test:setup": "@php tests/integration/setup.php"
|
||||||
|
},
|
||||||
|
"scripts-descriptions": {
|
||||||
|
"test": "Runs all tests.",
|
||||||
|
"test:unit": "Runs all unit tests.",
|
||||||
|
"test:integration": "Runs all integration tests.",
|
||||||
|
"test:setup": "Sets up a database for use with integration tests. Execute this only once."
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"flarum/testing": "^1.0.0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
namespace Flarum\Approval\Access;
|
namespace Flarum\Approval\Access;
|
||||||
|
|
||||||
|
use Closure;
|
||||||
use Flarum\Discussion\Discussion;
|
use Flarum\Discussion\Discussion;
|
||||||
use Flarum\User\User;
|
use Flarum\User\User;
|
||||||
use Illuminate\Database\Eloquent\Builder;
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
@@ -39,14 +40,23 @@ class ScopePrivatePostVisibility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private function discussionWhereCanApprovePosts(User $actor)
|
/**
|
||||||
|
* Looks if the actor has permission to approve posts,
|
||||||
|
* within the discussion which the post is a part of.
|
||||||
|
*
|
||||||
|
* For example, the tags extension,
|
||||||
|
* turns the `approvePosts` ability into per tag basis.
|
||||||
|
*/
|
||||||
|
private function discussionWhereCanApprovePosts(User $actor): Closure
|
||||||
{
|
{
|
||||||
return function ($query) use ($actor) {
|
return function ($query) use ($actor) {
|
||||||
$query->selectRaw('1')
|
$query->selectRaw('1')
|
||||||
->from('discussions')
|
->from('discussions')
|
||||||
->whereColumn('discussions.id', 'posts.discussion_id')
|
->whereColumn('discussions.id', 'posts.discussion_id')
|
||||||
->where(function ($query) use ($actor) {
|
->where(function ($query) use ($actor) {
|
||||||
Discussion::query()->setQuery($query)->whereVisibleTo($actor, 'approvePosts');
|
$query->whereRaw('1 != 1')->orWhere(function ($query) use ($actor) {
|
||||||
|
Discussion::query()->setQuery($query)->whereVisibleTo($actor, 'approvePosts');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@@ -24,7 +24,7 @@ class UnapproveNewContent
|
|||||||
$post = $event->post;
|
$post = $event->post;
|
||||||
|
|
||||||
if (! $post->exists) {
|
if (! $post->exists) {
|
||||||
$ability = $post->discussion->post_number_index == 0 ? 'startWithoutApproval' : 'replyWithoutApproval';
|
$ability = $post->discussion->first_post_id === null ? 'startWithoutApproval' : 'replyWithoutApproval';
|
||||||
|
|
||||||
if ($event->actor->can($ability, $post->discussion)) {
|
if ($event->actor->can($ability, $post->discussion)) {
|
||||||
if ($post->is_approved === null) {
|
if ($post->is_approved === null) {
|
||||||
|
0
extensions/approval/tests/fixtures/.gitkeep
vendored
Normal file
0
extensions/approval/tests/fixtures/.gitkeep
vendored
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Flarum.
|
||||||
|
*
|
||||||
|
* For detailed copyright and license information, please view the
|
||||||
|
* LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Flarum\Approval\Tests\integration;
|
||||||
|
|
||||||
|
use Carbon\Carbon;
|
||||||
|
|
||||||
|
trait InteractsWithUnapprovedContent
|
||||||
|
{
|
||||||
|
protected function prepareUnapprovedDatabaseContent()
|
||||||
|
{
|
||||||
|
$this->prepareDatabase([
|
||||||
|
'users' => [
|
||||||
|
['id' => 1, 'username' => 'Muralf', 'email' => 'muralf@machine.local', 'is_email_confirmed' => 1],
|
||||||
|
$this->normalUser(),
|
||||||
|
['id' => 3, 'username' => 'acme', 'email' => 'acme@machine.local', 'is_email_confirmed' => 1],
|
||||||
|
['id' => 4, 'username' => 'luceos', 'email' => 'luceos@machine.local', 'is_email_confirmed' => 1],
|
||||||
|
],
|
||||||
|
'discussions' => [
|
||||||
|
['id' => 1, 'title' => __CLASS__, 'created_at' => Carbon::now(), 'last_posted_at' => Carbon::now(), 'user_id' => 4, 'first_post_id' => 1, 'comment_count' => 1, 'is_approved' => 1, 'is_private' => 0],
|
||||||
|
['id' => 2, 'title' => __CLASS__, 'created_at' => Carbon::now(), 'last_posted_at' => Carbon::now(), 'user_id' => 4, 'first_post_id' => 2, 'comment_count' => 1, 'is_approved' => 0, 'is_private' => 1],
|
||||||
|
['id' => 3, 'title' => __CLASS__, 'created_at' => Carbon::now(), 'last_posted_at' => Carbon::now(), 'user_id' => 4, 'first_post_id' => 3, 'comment_count' => 1, 'is_approved' => 0, 'is_private' => 1],
|
||||||
|
['id' => 4, 'title' => __CLASS__, 'created_at' => Carbon::now(), 'last_posted_at' => Carbon::now(), 'user_id' => 4, 'first_post_id' => 4, 'comment_count' => 1, 'is_approved' => 1, 'is_private' => 0],
|
||||||
|
['id' => 5, 'title' => __CLASS__, 'created_at' => Carbon::now(), 'last_posted_at' => Carbon::now(), 'user_id' => 4, 'first_post_id' => 5, 'comment_count' => 1, 'is_approved' => 1, 'is_private' => 0],
|
||||||
|
['id' => 6, 'title' => __CLASS__, 'created_at' => Carbon::now(), 'last_posted_at' => Carbon::now(), 'user_id' => 4, 'first_post_id' => 6, 'comment_count' => 1, 'is_approved' => 0, 'is_private' => 1],
|
||||||
|
['id' => 7, 'title' => __CLASS__, 'created_at' => Carbon::now(), 'last_posted_at' => Carbon::now(), 'user_id' => 4, 'first_post_id' => 7, 'comment_count' => 1, 'is_approved' => 1, 'is_private' => 0],
|
||||||
|
],
|
||||||
|
'posts' => [
|
||||||
|
['id' => 1, 'discussion_id' => 1, 'user_id' => 4, 'type' => 'comment', 'content' => '<t><p>Text</p></t>', 'is_private' => 0, 'is_approved' => 1, 'number' => 1],
|
||||||
|
['id' => 2, 'discussion_id' => 2, 'user_id' => 4, 'type' => 'comment', 'content' => '<t><p>Text</p></t>', 'is_private' => 0, 'is_approved' => 1, 'number' => 1],
|
||||||
|
['id' => 3, 'discussion_id' => 3, 'user_id' => 4, 'type' => 'comment', 'content' => '<t><p>Text</p></t>', 'is_private' => 0, 'is_approved' => 1, 'number' => 1],
|
||||||
|
['id' => 4, 'discussion_id' => 4, 'user_id' => 4, 'type' => 'comment', 'content' => '<t><p>Text</p></t>', 'is_private' => 0, 'is_approved' => 1, 'number' => 1],
|
||||||
|
['id' => 5, 'discussion_id' => 5, 'user_id' => 4, 'type' => 'comment', 'content' => '<t><p>Text</p></t>', 'is_private' => 0, 'is_approved' => 1, 'number' => 1],
|
||||||
|
['id' => 6, 'discussion_id' => 6, 'user_id' => 4, 'type' => 'comment', 'content' => '<t><p>Text</p></t>', 'is_private' => 0, 'is_approved' => 1, 'number' => 1],
|
||||||
|
['id' => 7, 'discussion_id' => 7, 'user_id' => 4, 'type' => 'comment', 'content' => '<t><p>Text</p></t>', 'is_private' => 0, 'is_approved' => 1, 'number' => 1],
|
||||||
|
|
||||||
|
['id' => 8, 'discussion_id' => 7, 'user_id' => 4, 'type' => 'comment', 'content' => '<t><p>Text</p></t>', 'is_private' => 0, 'is_approved' => 1, 'number' => 2],
|
||||||
|
['id' => 9, 'discussion_id' => 7, 'user_id' => 4, 'type' => 'comment', 'content' => '<t><p>Text</p></t>', 'is_private' => 1, 'is_approved' => 0, 'number' => 3],
|
||||||
|
['id' => 10, 'discussion_id' => 7, 'user_id' => 4, 'type' => 'comment', 'content' => '<t><p>Text</p></t>', 'is_private' => 0, 'is_approved' => 1, 'number' => 4],
|
||||||
|
['id' => 11, 'discussion_id' => 7, 'user_id' => 4, 'type' => 'comment', 'content' => '<t><p>Text</p></t>', 'is_private' => 1, 'is_approved' => 0, 'number' => 5],
|
||||||
|
],
|
||||||
|
'groups' => [
|
||||||
|
['id' => 4, 'name_singular' => 'Acme', 'name_plural' => 'Acme', 'is_hidden' => 0]
|
||||||
|
],
|
||||||
|
'group_user' => [
|
||||||
|
['user_id' => 3, 'group_id' => 4]
|
||||||
|
],
|
||||||
|
'group_permission' => [
|
||||||
|
['permission' => 'discussion.approvePosts', 'group_id' => 4]
|
||||||
|
]
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* null: Guest, 2: Normal User.
|
||||||
|
*/
|
||||||
|
public function unallowedUsers(): array
|
||||||
|
{
|
||||||
|
return [[null], [2]];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1: Admin, 3: Permission Given, 4: Discussions Author.
|
||||||
|
*/
|
||||||
|
public function allowedUsers(): array
|
||||||
|
{
|
||||||
|
return [[1], [3], [4]];
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,62 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Flarum.
|
||||||
|
*
|
||||||
|
* For detailed copyright and license information, please view the
|
||||||
|
* LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Flarum\Approval\Tests\integration\api;
|
||||||
|
|
||||||
|
use Flarum\Approval\Tests\integration\InteractsWithUnapprovedContent;
|
||||||
|
use Flarum\Testing\integration\RetrievesAuthorizedUsers;
|
||||||
|
use Flarum\Testing\integration\TestCase;
|
||||||
|
use Illuminate\Support\Arr;
|
||||||
|
|
||||||
|
class ListDiscussionsTest extends TestCase
|
||||||
|
{
|
||||||
|
use RetrievesAuthorizedUsers;
|
||||||
|
use InteractsWithUnapprovedContent;
|
||||||
|
|
||||||
|
protected function setUp(): void
|
||||||
|
{
|
||||||
|
parent::setUp();
|
||||||
|
|
||||||
|
$this->extension('flarum-approval');
|
||||||
|
|
||||||
|
$this->prepareUnapprovedDatabaseContent();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @dataProvider unallowedUsers
|
||||||
|
* @test
|
||||||
|
*/
|
||||||
|
public function can_only_see_approved_if_not_allowed_to_approve(?int $authenticatedAs)
|
||||||
|
{
|
||||||
|
$response = $this->send(
|
||||||
|
$this->request('GET', '/api/discussions', compact('authenticatedAs'))
|
||||||
|
);
|
||||||
|
|
||||||
|
$body = json_decode($response->getBody()->getContents(), true);
|
||||||
|
|
||||||
|
$this->assertEquals(200, $response->getStatusCode());
|
||||||
|
$this->assertEqualsCanonicalizing([1, 4, 5, 7], Arr::pluck($body['data'], 'id'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @dataProvider allowedUsers
|
||||||
|
* @test
|
||||||
|
*/
|
||||||
|
public function can_see_unapproved_if_allowed_to_approve(int $authenticatedAs)
|
||||||
|
{
|
||||||
|
$response = $this->send(
|
||||||
|
$this->request('GET', '/api/discussions', compact('authenticatedAs'))
|
||||||
|
);
|
||||||
|
|
||||||
|
$body = json_decode($response->getBody()->getContents(), true);
|
||||||
|
|
||||||
|
$this->assertEquals(200, $response->getStatusCode());
|
||||||
|
$this->assertEqualsCanonicalizing([1, 2, 3, 4, 5, 6, 7], Arr::pluck($body['data'], 'id'));
|
||||||
|
}
|
||||||
|
}
|
74
extensions/approval/tests/integration/api/ListPostsTest.php
Normal file
74
extensions/approval/tests/integration/api/ListPostsTest.php
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Flarum.
|
||||||
|
*
|
||||||
|
* For detailed copyright and license information, please view the
|
||||||
|
* LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Flarum\Approval\Tests\integration\api;
|
||||||
|
|
||||||
|
use Flarum\Approval\Tests\integration\InteractsWithUnapprovedContent;
|
||||||
|
use Flarum\Testing\integration\RetrievesAuthorizedUsers;
|
||||||
|
use Flarum\Testing\integration\TestCase;
|
||||||
|
use Illuminate\Support\Arr;
|
||||||
|
|
||||||
|
class ListPostsTest extends TestCase
|
||||||
|
{
|
||||||
|
use RetrievesAuthorizedUsers;
|
||||||
|
use InteractsWithUnapprovedContent;
|
||||||
|
|
||||||
|
protected function setUp(): void
|
||||||
|
{
|
||||||
|
parent::setUp();
|
||||||
|
|
||||||
|
$this->extension('flarum-approval');
|
||||||
|
|
||||||
|
$this->prepareUnapprovedDatabaseContent();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @dataProvider unallowedUsers
|
||||||
|
* @test
|
||||||
|
*/
|
||||||
|
public function can_only_see_approved_if_not_allowed_to_approve(?int $authenticatedAs)
|
||||||
|
{
|
||||||
|
$response = $this->send(
|
||||||
|
$this
|
||||||
|
->request('GET', '/api/posts', compact('authenticatedAs'))
|
||||||
|
->withQueryParams([
|
||||||
|
'filter' => [
|
||||||
|
'discussion' => 7
|
||||||
|
]
|
||||||
|
])
|
||||||
|
);
|
||||||
|
|
||||||
|
$body = json_decode($response->getBody()->getContents(), true);
|
||||||
|
|
||||||
|
$this->assertEquals(200, $response->getStatusCode());
|
||||||
|
$this->assertEqualsCanonicalizing([7, 8, 10], Arr::pluck($body['data'], 'id'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @dataProvider allowedUsers
|
||||||
|
* @test
|
||||||
|
*/
|
||||||
|
public function can_see_unapproved_if_allowed_to_approve(int $authenticatedAs)
|
||||||
|
{
|
||||||
|
$response = $this->send(
|
||||||
|
$this
|
||||||
|
->request('GET', '/api/posts', compact('authenticatedAs'))
|
||||||
|
->withQueryParams([
|
||||||
|
'filter' => [
|
||||||
|
'discussion' => 7
|
||||||
|
]
|
||||||
|
])
|
||||||
|
);
|
||||||
|
|
||||||
|
$body = json_decode($response->getBody()->getContents(), true);
|
||||||
|
|
||||||
|
$this->assertEquals(200, $response->getStatusCode());
|
||||||
|
$this->assertEqualsCanonicalizing([7, 8, 9, 10, 11], Arr::pluck($body['data'], 'id'));
|
||||||
|
}
|
||||||
|
}
|
16
extensions/approval/tests/integration/setup.php
Normal file
16
extensions/approval/tests/integration/setup.php
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Flarum.
|
||||||
|
*
|
||||||
|
* For detailed copyright and license information, please view the
|
||||||
|
* LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
use Flarum\Testing\integration\Setup\SetupScript;
|
||||||
|
|
||||||
|
require __DIR__.'/../../vendor/autoload.php';
|
||||||
|
|
||||||
|
$setup = new SetupScript();
|
||||||
|
|
||||||
|
$setup->run();
|
25
extensions/approval/tests/phpunit.integration.xml
Normal file
25
extensions/approval/tests/phpunit.integration.xml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<phpunit
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
|
||||||
|
backupGlobals="false"
|
||||||
|
backupStaticAttributes="false"
|
||||||
|
colors="true"
|
||||||
|
convertErrorsToExceptions="true"
|
||||||
|
convertNoticesToExceptions="true"
|
||||||
|
convertWarningsToExceptions="true"
|
||||||
|
processIsolation="true"
|
||||||
|
stopOnFailure="false"
|
||||||
|
>
|
||||||
|
<coverage processUncoveredFiles="true">
|
||||||
|
<include>
|
||||||
|
<directory suffix=".php">../src/</directory>
|
||||||
|
</include>
|
||||||
|
</coverage>
|
||||||
|
<testsuites>
|
||||||
|
<testsuite name="Flarum Integration Tests">
|
||||||
|
<directory suffix="Test.php">./integration</directory>
|
||||||
|
<exclude>./integration/tmp</exclude>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
|
</phpunit>
|
27
extensions/approval/tests/phpunit.unit.xml
Normal file
27
extensions/approval/tests/phpunit.unit.xml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<phpunit
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
|
||||||
|
backupGlobals="false"
|
||||||
|
backupStaticAttributes="false"
|
||||||
|
colors="true"
|
||||||
|
convertErrorsToExceptions="true"
|
||||||
|
convertNoticesToExceptions="true"
|
||||||
|
convertWarningsToExceptions="true"
|
||||||
|
processIsolation="false"
|
||||||
|
stopOnFailure="false"
|
||||||
|
>
|
||||||
|
<coverage processUncoveredFiles="true">
|
||||||
|
<include>
|
||||||
|
<directory suffix=".php">../src/</directory>
|
||||||
|
</include>
|
||||||
|
</coverage>
|
||||||
|
<testsuites>
|
||||||
|
<testsuite name="Flarum Unit Tests">
|
||||||
|
<directory suffix="Test.php">./unit</directory>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
|
<listeners>
|
||||||
|
<listener class="\Mockery\Adapter\Phpunit\TestListener" />
|
||||||
|
</listeners>
|
||||||
|
</phpunit>
|
0
extensions/approval/tests/unit/.gitkeep
Normal file
0
extensions/approval/tests/unit/.gitkeep
Normal file
@@ -1,19 +0,0 @@
|
|||||||
# EditorConfig helps developers define and maintain consistent
|
|
||||||
# coding styles between different editors and IDEs
|
|
||||||
# editorconfig.org
|
|
||||||
|
|
||||||
root = true
|
|
||||||
|
|
||||||
[*]
|
|
||||||
end_of_line = lf
|
|
||||||
charset = utf-8
|
|
||||||
trim_trailing_whitespace = true
|
|
||||||
insert_final_newline = true
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 2
|
|
||||||
|
|
||||||
[*.{diff,md}]
|
|
||||||
trim_trailing_whitespace = false
|
|
||||||
|
|
||||||
[*.{php,xml,json}]
|
|
||||||
indent_size = 4
|
|
20
extensions/bbcode/.gitattributes
vendored
Normal file
20
extensions/bbcode/.gitattributes
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
**/.gitattributes export-ignore
|
||||||
|
**/.gitignore export-ignore
|
||||||
|
**/.gitmodules export-ignore
|
||||||
|
**/.github export-ignore
|
||||||
|
**/.travis export-ignore
|
||||||
|
**/.travis.yml export-ignore
|
||||||
|
**/.editorconfig export-ignore
|
||||||
|
**/.styleci.yml export-ignore
|
||||||
|
|
||||||
|
**/phpunit.xml export-ignore
|
||||||
|
**/tests export-ignore
|
||||||
|
|
||||||
|
**/js/dist/**/* -diff
|
||||||
|
**/js/dist/**/* linguist-generated
|
||||||
|
**/js/dist-typings/**/* -diff
|
||||||
|
**/js/dist-typings/**/* linguist-generated
|
||||||
|
**/js/yarn.lock -diff
|
||||||
|
**/js/package-lock.json -diff
|
||||||
|
|
||||||
|
* text=auto eol=lf
|
@@ -7,7 +7,7 @@
|
|||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/flarum/core/issues",
|
"issues": "https://github.com/flarum/framework/issues",
|
||||||
"source": "https://github.com/flarum/bbcode",
|
"source": "https://github.com/flarum/bbcode",
|
||||||
"forum": "https://discuss.flarum.org"
|
"forum": "https://discuss.flarum.org"
|
||||||
},
|
},
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"flarum/core": "^1.2"
|
"flarum/core": "^1.4"
|
||||||
},
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
|
@@ -1,19 +0,0 @@
|
|||||||
# EditorConfig helps developers define and maintain consistent
|
|
||||||
# coding styles between different editors and IDEs
|
|
||||||
# editorconfig.org
|
|
||||||
|
|
||||||
root = true
|
|
||||||
|
|
||||||
[*]
|
|
||||||
end_of_line = lf
|
|
||||||
charset = utf-8
|
|
||||||
trim_trailing_whitespace = true
|
|
||||||
insert_final_newline = true
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 2
|
|
||||||
|
|
||||||
[*.{diff,md}]
|
|
||||||
trim_trailing_whitespace = false
|
|
||||||
|
|
||||||
[*.{php,xml,json}]
|
|
||||||
indent_size = 4
|
|
20
extensions/embed/.gitattributes
vendored
Normal file
20
extensions/embed/.gitattributes
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
**/.gitattributes export-ignore
|
||||||
|
**/.gitignore export-ignore
|
||||||
|
**/.gitmodules export-ignore
|
||||||
|
**/.github export-ignore
|
||||||
|
**/.travis export-ignore
|
||||||
|
**/.travis.yml export-ignore
|
||||||
|
**/.editorconfig export-ignore
|
||||||
|
**/.styleci.yml export-ignore
|
||||||
|
|
||||||
|
**/phpunit.xml export-ignore
|
||||||
|
**/tests export-ignore
|
||||||
|
|
||||||
|
**/js/dist/**/* -diff
|
||||||
|
**/js/dist/**/* linguist-generated
|
||||||
|
**/js/dist-typings/**/* -diff
|
||||||
|
**/js/dist-typings/**/* linguist-generated
|
||||||
|
**/js/yarn.lock -diff
|
||||||
|
**/js/package-lock.json -diff
|
||||||
|
|
||||||
|
* text=auto eol=lf
|
@@ -7,7 +7,7 @@
|
|||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/flarum/core/issues",
|
"issues": "https://github.com/flarum/framework/issues",
|
||||||
"source": "https://github.com/flarum/embed",
|
"source": "https://github.com/flarum/embed",
|
||||||
"forum": "https://discuss.flarum.org"
|
"forum": "https://discuss.flarum.org"
|
||||||
},
|
},
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"flarum/core": "^1.2"
|
"flarum/core": "^1.4"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
2
extensions/embed/js/dist/forum.js
generated
vendored
2
extensions/embed/js/dist/forum.js
generated
vendored
File diff suppressed because one or more lines are too long
2
extensions/embed/js/dist/forum.js.map
generated
vendored
2
extensions/embed/js/dist/forum.js.map
generated
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -1,19 +0,0 @@
|
|||||||
# EditorConfig helps developers define and maintain consistent
|
|
||||||
# coding styles between different editors and IDEs
|
|
||||||
# editorconfig.org
|
|
||||||
|
|
||||||
root = true
|
|
||||||
|
|
||||||
[*]
|
|
||||||
end_of_line = lf
|
|
||||||
charset = utf-8
|
|
||||||
trim_trailing_whitespace = true
|
|
||||||
insert_final_newline = true
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 2
|
|
||||||
|
|
||||||
[*.{diff,md}]
|
|
||||||
trim_trailing_whitespace = false
|
|
||||||
|
|
||||||
[*.{php,xml,json}]
|
|
||||||
indent_size = 4
|
|
20
extensions/emoji/.gitattributes
vendored
Normal file
20
extensions/emoji/.gitattributes
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
**/.gitattributes export-ignore
|
||||||
|
**/.gitignore export-ignore
|
||||||
|
**/.gitmodules export-ignore
|
||||||
|
**/.github export-ignore
|
||||||
|
**/.travis export-ignore
|
||||||
|
**/.travis.yml export-ignore
|
||||||
|
**/.editorconfig export-ignore
|
||||||
|
**/.styleci.yml export-ignore
|
||||||
|
|
||||||
|
**/phpunit.xml export-ignore
|
||||||
|
**/tests export-ignore
|
||||||
|
|
||||||
|
**/js/dist/**/* -diff
|
||||||
|
**/js/dist/**/* linguist-generated
|
||||||
|
**/js/dist-typings/**/* -diff
|
||||||
|
**/js/dist-typings/**/* linguist-generated
|
||||||
|
**/js/yarn.lock -diff
|
||||||
|
**/js/package-lock.json -diff
|
||||||
|
|
||||||
|
* text=auto eol=lf
|
@@ -7,7 +7,7 @@
|
|||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/flarum/core/issues",
|
"issues": "https://github.com/flarum/framework/issues",
|
||||||
"source": "https://github.com/flarum/emoji",
|
"source": "https://github.com/flarum/emoji",
|
||||||
"forum": "https://discuss.flarum.org"
|
"forum": "https://discuss.flarum.org"
|
||||||
},
|
},
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"flarum/core": "^1.2"
|
"flarum/core": "^1.4"
|
||||||
},
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
|
2
extensions/emoji/js/dist/forum.js
generated
vendored
2
extensions/emoji/js/dist/forum.js
generated
vendored
File diff suppressed because one or more lines are too long
2
extensions/emoji/js/dist/forum.js.map
generated
vendored
2
extensions/emoji/js/dist/forum.js.map
generated
vendored
File diff suppressed because one or more lines are too long
8862
extensions/emoji/js/package-lock.json
generated
8862
extensions/emoji/js/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -4,18 +4,18 @@
|
|||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"prettier": "@flarum/prettier-config",
|
"prettier": "@flarum/prettier-config",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"simple-emoji-map": "^0.4.1",
|
"simple-emoji-map": "^0.5.1",
|
||||||
"twemoji": "^13.1.0"
|
"twemoji": "^14.0.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"prettier": "^2.5.1",
|
|
||||||
"flarum-webpack-config": "^2.0.0",
|
|
||||||
"webpack": "^5.65.0",
|
|
||||||
"webpack-cli": "^4.9.1",
|
|
||||||
"@flarum/prettier-config": "^1.0.0",
|
"@flarum/prettier-config": "^1.0.0",
|
||||||
"flarum-tsconfig": "^1.0.2",
|
"flarum-tsconfig": "^1.0.2",
|
||||||
|
"flarum-webpack-config": "^2.0.0",
|
||||||
|
"prettier": "^2.5.1",
|
||||||
"typescript": "^4.5.4",
|
"typescript": "^4.5.4",
|
||||||
"typescript-coverage-report": "^0.6.1"
|
"typescript-coverage-report": "^0.6.1",
|
||||||
|
"webpack": "^5.65.0",
|
||||||
|
"webpack-cli": "^4.9.1"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "webpack --mode development --watch",
|
"dev": "webpack --mode development --watch",
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,19 +0,0 @@
|
|||||||
# EditorConfig helps developers define and maintain consistent
|
|
||||||
# coding styles between different editors and IDEs
|
|
||||||
# editorconfig.org
|
|
||||||
|
|
||||||
root = true
|
|
||||||
|
|
||||||
[*]
|
|
||||||
end_of_line = lf
|
|
||||||
charset = utf-8
|
|
||||||
trim_trailing_whitespace = true
|
|
||||||
insert_final_newline = true
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 2
|
|
||||||
|
|
||||||
[*.{diff,md}]
|
|
||||||
trim_trailing_whitespace = false
|
|
||||||
|
|
||||||
[*.{php,xml,json}]
|
|
||||||
indent_size = 4
|
|
20
extensions/flags/.gitattributes
vendored
Normal file
20
extensions/flags/.gitattributes
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
**/.gitattributes export-ignore
|
||||||
|
**/.gitignore export-ignore
|
||||||
|
**/.gitmodules export-ignore
|
||||||
|
**/.github export-ignore
|
||||||
|
**/.travis export-ignore
|
||||||
|
**/.travis.yml export-ignore
|
||||||
|
**/.editorconfig export-ignore
|
||||||
|
**/.styleci.yml export-ignore
|
||||||
|
|
||||||
|
**/phpunit.xml export-ignore
|
||||||
|
**/tests export-ignore
|
||||||
|
|
||||||
|
**/js/dist/**/* -diff
|
||||||
|
**/js/dist/**/* linguist-generated
|
||||||
|
**/js/dist-typings/**/* -diff
|
||||||
|
**/js/dist-typings/**/* linguist-generated
|
||||||
|
**/js/yarn.lock -diff
|
||||||
|
**/js/package-lock.json -diff
|
||||||
|
|
||||||
|
* text=auto eol=lf
|
@@ -7,7 +7,7 @@
|
|||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/flarum/core/issues",
|
"issues": "https://github.com/flarum/framework/issues",
|
||||||
"source": "https://github.com/flarum/flags",
|
"source": "https://github.com/flarum/flags",
|
||||||
"forum": "https://discuss.flarum.org"
|
"forum": "https://discuss.flarum.org"
|
||||||
},
|
},
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"flarum/core": "^1.2"
|
"flarum/core": "^1.4"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
4
extensions/flags/js/dist-typings/forum/components/FlagList.d.ts
generated
vendored
4
extensions/flags/js/dist-typings/forum/components/FlagList.d.ts
generated
vendored
@@ -1,7 +1,5 @@
|
|||||||
export default class FlagList extends Component<import("flarum/common/Component").ComponentAttrs, undefined> {
|
export default class FlagList {
|
||||||
constructor();
|
|
||||||
oninit(vnode: any): void;
|
oninit(vnode: any): void;
|
||||||
state: any;
|
state: any;
|
||||||
view(): JSX.Element;
|
view(): JSX.Element;
|
||||||
}
|
}
|
||||||
import Component from "flarum/common/Component";
|
|
||||||
|
17
extensions/flags/js/dist-typings/forum/components/FlagPostModal.d.ts
generated
vendored
17
extensions/flags/js/dist-typings/forum/components/FlagPostModal.d.ts
generated
vendored
@@ -1,15 +1,12 @@
|
|||||||
/// <reference types="flarum/@types/translator-icu-rich" />
|
export default class FlagPostModal {
|
||||||
export default class FlagPostModal extends Modal<import("flarum/common/components/Modal").IInternalModalAttrs> {
|
|
||||||
constructor();
|
|
||||||
oninit(vnode: any): void;
|
oninit(vnode: any): void;
|
||||||
success: boolean | undefined;
|
success: boolean | undefined;
|
||||||
reason: Stream<string> | undefined;
|
reason: any;
|
||||||
reasonDetail: Stream<string> | undefined;
|
reasonDetail: any;
|
||||||
title(): import("@askvortsov/rich-icu-message-formatter").NestedStringArray;
|
className(): string;
|
||||||
|
title(): any;
|
||||||
content(): JSX.Element;
|
content(): JSX.Element;
|
||||||
flagReasons(): ItemList<any>;
|
flagReasons(): any;
|
||||||
onsubmit(e: any): void;
|
onsubmit(e: any): void;
|
||||||
|
loading: boolean | undefined;
|
||||||
}
|
}
|
||||||
import Modal from "flarum/common/components/Modal";
|
|
||||||
import Stream from "flarum/common/utils/Stream";
|
|
||||||
import ItemList from "flarum/common/utils/ItemList";
|
|
||||||
|
2
extensions/flags/js/dist-typings/forum/components/FlagsDropdown.d.ts
generated
vendored
2
extensions/flags/js/dist-typings/forum/components/FlagsDropdown.d.ts
generated
vendored
@@ -3,5 +3,5 @@ export default class FlagsDropdown {
|
|||||||
getMenu(): JSX.Element;
|
getMenu(): JSX.Element;
|
||||||
goToRoute(): void;
|
goToRoute(): void;
|
||||||
getUnreadCount(): any;
|
getUnreadCount(): any;
|
||||||
getNewCount(): unknown;
|
getNewCount(): any;
|
||||||
}
|
}
|
||||||
|
14
extensions/flags/js/dist-typings/forum/models/Flag.d.ts
generated
vendored
14
extensions/flags/js/dist-typings/forum/models/Flag.d.ts
generated
vendored
@@ -1,11 +1,9 @@
|
|||||||
import Model from 'flarum/common/Model';
|
import Model from 'flarum/common/Model';
|
||||||
import Post from 'flarum/common/models/Post';
|
|
||||||
import User from 'flarum/common/models/User';
|
|
||||||
export default class Flag extends Model {
|
export default class Flag extends Model {
|
||||||
type(): string;
|
type(): any;
|
||||||
reason(): string | null;
|
reason(): any;
|
||||||
reasonDetail(): string | null;
|
reasonDetail(): any;
|
||||||
createdAt(): Date | null | undefined;
|
createdAt(): any;
|
||||||
post(): false | Post;
|
post(): any;
|
||||||
user(): false | User | null;
|
user(): any;
|
||||||
}
|
}
|
||||||
|
2
extensions/flags/js/dist/admin.js
generated
vendored
2
extensions/flags/js/dist/admin.js
generated
vendored
@@ -1,2 +1,2 @@
|
|||||||
module.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=24)}({24:function(e,t,r){"use strict";r.r(t);var n=r(5),a=r.n(n);a.a.initializers.add("flarum-flags",(function(){a.a.extensionData.for("flarum-flags").registerSetting({setting:"flarum-flags.guidelines_url",type:"text",label:a.a.translator.trans("flarum-flags.admin.settings.guidelines_url_label")},15).registerSetting({setting:"flarum-flags.can_flag_own",type:"boolean",label:a.a.translator.trans("flarum-flags.admin.settings.flag_own_posts_label")}).registerPermission({icon:"fas fa-flag",label:a.a.translator.trans("flarum-flags.admin.permissions.view_flags_label"),permission:"discussion.viewFlags"},"moderate",65).registerPermission({icon:"fas fa-flag",label:a.a.translator.trans("flarum-flags.admin.permissions.flag_posts_label"),permission:"discussion.flagPosts"},"reply",65)}))},5:function(e,t){e.exports=flarum.core.compat["admin/app"]}});
|
(()=>{var e={n:a=>{var s=a&&a.__esModule?()=>a.default:()=>a;return e.d(s,{a:s}),s},d:(a,s)=>{for(var l in s)e.o(s,l)&&!e.o(a,l)&&Object.defineProperty(a,l,{enumerable:!0,get:s[l]})},o:(e,a)=>Object.prototype.hasOwnProperty.call(e,a),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},a={};(()=>{"use strict";e.r(a);const s=flarum.core.compat["admin/app"];var l=e.n(s);l().initializers.add("flarum-flags",(function(){l().extensionData.for("flarum-flags").registerSetting({setting:"flarum-flags.guidelines_url",type:"text",label:l().translator.trans("flarum-flags.admin.settings.guidelines_url_label")},15).registerSetting({setting:"flarum-flags.can_flag_own",type:"boolean",label:l().translator.trans("flarum-flags.admin.settings.flag_own_posts_label")}).registerPermission({icon:"fas fa-flag",label:l().translator.trans("flarum-flags.admin.permissions.view_flags_label"),permission:"discussion.viewFlags"},"moderate",65).registerPermission({icon:"fas fa-flag",label:l().translator.trans("flarum-flags.admin.permissions.flag_posts_label"),permission:"discussion.flagPosts"},"reply",65)}))})(),module.exports=a})();
|
||||||
//# sourceMappingURL=admin.js.map
|
//# sourceMappingURL=admin.js.map
|
2
extensions/flags/js/dist/admin.js.map
generated
vendored
2
extensions/flags/js/dist/admin.js.map
generated
vendored
File diff suppressed because one or more lines are too long
2
extensions/flags/js/dist/forum.js
generated
vendored
2
extensions/flags/js/dist/forum.js
generated
vendored
File diff suppressed because one or more lines are too long
2
extensions/flags/js/dist/forum.js.map
generated
vendored
2
extensions/flags/js/dist/forum.js.map
generated
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -1,19 +0,0 @@
|
|||||||
# EditorConfig helps developers define and maintain consistent
|
|
||||||
# coding styles between different editors and IDEs
|
|
||||||
# editorconfig.org
|
|
||||||
|
|
||||||
root = true
|
|
||||||
|
|
||||||
[*]
|
|
||||||
end_of_line = lf
|
|
||||||
charset = utf-8
|
|
||||||
trim_trailing_whitespace = true
|
|
||||||
insert_final_newline = true
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 2
|
|
||||||
|
|
||||||
[*.{diff,md}]
|
|
||||||
trim_trailing_whitespace = false
|
|
||||||
|
|
||||||
[*.{php,xml,json}]
|
|
||||||
indent_size = 4
|
|
20
extensions/lang-english/.gitattributes
vendored
Normal file
20
extensions/lang-english/.gitattributes
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
**/.gitattributes export-ignore
|
||||||
|
**/.gitignore export-ignore
|
||||||
|
**/.gitmodules export-ignore
|
||||||
|
**/.github export-ignore
|
||||||
|
**/.travis export-ignore
|
||||||
|
**/.travis.yml export-ignore
|
||||||
|
**/.editorconfig export-ignore
|
||||||
|
**/.styleci.yml export-ignore
|
||||||
|
|
||||||
|
**/phpunit.xml export-ignore
|
||||||
|
**/tests export-ignore
|
||||||
|
|
||||||
|
**/js/dist/**/* -diff
|
||||||
|
**/js/dist/**/* linguist-generated
|
||||||
|
**/js/dist-typings/**/* -diff
|
||||||
|
**/js/dist-typings/**/* linguist-generated
|
||||||
|
**/js/yarn.lock -diff
|
||||||
|
**/js/package-lock.json -diff
|
||||||
|
|
||||||
|
* text=auto eol=lf
|
@@ -7,7 +7,7 @@
|
|||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"require": {
|
"require": {
|
||||||
"flarum/core": "^1.2"
|
"flarum/core": "^1.4"
|
||||||
},
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
|
@@ -1,19 +0,0 @@
|
|||||||
# EditorConfig helps developers define and maintain consistent
|
|
||||||
# coding styles between different editors and IDEs
|
|
||||||
# editorconfig.org
|
|
||||||
|
|
||||||
root = true
|
|
||||||
|
|
||||||
[*]
|
|
||||||
end_of_line = lf
|
|
||||||
charset = utf-8
|
|
||||||
trim_trailing_whitespace = true
|
|
||||||
insert_final_newline = true
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 2
|
|
||||||
|
|
||||||
[*.{diff,md}]
|
|
||||||
trim_trailing_whitespace = false
|
|
||||||
|
|
||||||
[*.{php,xml,json}]
|
|
||||||
indent_size = 4
|
|
20
extensions/likes/.gitattributes
vendored
Normal file
20
extensions/likes/.gitattributes
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
**/.gitattributes export-ignore
|
||||||
|
**/.gitignore export-ignore
|
||||||
|
**/.gitmodules export-ignore
|
||||||
|
**/.github export-ignore
|
||||||
|
**/.travis export-ignore
|
||||||
|
**/.travis.yml export-ignore
|
||||||
|
**/.editorconfig export-ignore
|
||||||
|
**/.styleci.yml export-ignore
|
||||||
|
|
||||||
|
**/phpunit.xml export-ignore
|
||||||
|
**/tests export-ignore
|
||||||
|
|
||||||
|
**/js/dist/**/* -diff
|
||||||
|
**/js/dist/**/* linguist-generated
|
||||||
|
**/js/dist-typings/**/* -diff
|
||||||
|
**/js/dist-typings/**/* linguist-generated
|
||||||
|
**/js/yarn.lock -diff
|
||||||
|
**/js/package-lock.json -diff
|
||||||
|
|
||||||
|
* text=auto eol=lf
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user