Skip to content

Commit 203441e

Browse files
committed
Devlink init
1 parent 540fee5 commit 203441e

File tree

12 files changed

+624
-0
lines changed

12 files changed

+624
-0
lines changed

.github/workflows/monorepo-split-packages.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
- builder
2222
- category
2323
- core
24+
- devlink
2425
- expiry
2526
- flags
2627
- jobs

packages/devlink/.gitignore

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Environment
2+
.env
3+
.env.backup
4+
5+
# Composer
6+
/vendor
7+
composer.lock
8+
auth.json
9+
10+
# NPM / Node
11+
/node_modules
12+
npm-debug.log
13+
package-lock.json
14+
15+
# Laravel
16+
/public/hot
17+
/public/storage
18+
/storage/*.key
19+
20+
# PHPUnit
21+
.phpunit.result.cache
22+
phpunit.xml
23+
24+
# Yarn
25+
yarn-error.log
26+
27+
# PHPStan
28+
/build
29+
phpstan.neon
30+
31+
# Testbench
32+
testbench.yaml
33+
/workbench/*
34+
35+
# PHP CS Fixer
36+
.php-cs-fixer.cache
37+
38+
# Homestead
39+
Homestead.json
40+
Homestead.yaml
41+
42+
# IDEs
43+
/.idea
44+
/.vscode
45+
46+
# MacOS
47+
.DS_Store
48+
49+
# Windows
50+
Thumbs.db

packages/devlink/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Changelog
2+
3+
We don't track changes in this package. Please refer to the [Moox Monorepo](https://github.com/mooxphp/moox) for the latest changes.

packages/devlink/LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) Moox <devs@moox.org>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

packages/devlink/README.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Moox Devlink
2+
3+
This package is only for internal use.
4+
5+
It is used to link the packages from the `moox` monorepo into a project. It runs on MacOS, Linux and Windows.
6+
7+
## Installation
8+
9+
```bash
10+
composer require moox/devlink
11+
php artisan vendor:publish --tag="devlink-config"
12+
```
13+
14+
## Usage
15+
16+
```bash
17+
php artisan moox:devlink
18+
```
19+
20+
## Screenshot
21+
22+
![Moox Devlink](./devlink.jpg)
23+
24+
## Preparation
25+
26+
Before you can use this package, you need to prepare your project's `.gitignore` file.
27+
28+
```bash
29+
# Ignore all files in packages/ (including symlinks)
30+
packages/*
31+
# Allow tracking of real directories inside packages/
32+
!packages/**/
33+
# Ensure empty directories can be committed
34+
!packages/*/.gitkeep
35+
```
36+
37+
## Configuration
38+
39+
The configuration is done in the `config/devlink.php` file.
40+
41+
```php
42+
'base_paths' => [
43+
// 'path/to/base/path',
44+
],
45+
46+
'packages' => [
47+
// 'package-name',
48+
],
49+
```
50+
51+
## Command
52+
53+
The devlink command will create a `packages` directory in the root of the project and symlink the packages from the configured base paths.
54+
55+
```bash
56+
php artisan moox:devlink
57+
```
58+
59+
It will also update the `composer.json` file to include the packages in the `require` section and the `repositories` section.
60+
61+
Finally, it will run `composer update`.
62+
63+
You can have local packages mixed with the symlinked packages in your `/packages` folder.
64+
65+
![Moox Devlink](./devlink-mix.jpg)
66+
67+
### Changing branches
68+
69+
If you need to change the branches for ANY of the involved repositories, you just need to run the command again, it will automatically update the symlinks for the current branch.
70+
71+
```bash
72+
php artisan moox:devlink
73+
```
74+
75+
> ⚠️ **Important**
76+
> If you forget to run the command, when CHANGING BRANCHES ON ANY OF THE REPOS, you will surely run into a 500 error, that drives you nuts.
77+
78+
## Security Vulnerabilities
79+
80+
Please review [our security policy](https://github.com/mooxphp/moox/security/policy) on how to report security vulnerabilities.
81+
82+
## Credits
83+
84+
- [All Contributors](../../contributors)
85+
86+
## License
87+
88+
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

packages/devlink/SECURITY.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
We maintain the current version of `Moox Devlink` actively.
6+
7+
Do not expect security fixes for older versions.
8+
9+
## Reporting a Vulnerability
10+
11+
If you find any security-related bug, please report it to security@moox.org.
12+
13+
Please do not use Github issues, to give us enough time to review and fix the issue, before others can use it, to do stupid things.

packages/devlink/composer.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "moox/devlink",
3+
"description": "This package is only for internal use. It allows Moox developers to link packages from moox to their projects.",
4+
"keywords": [
5+
"Moox"
6+
],
7+
"homepage": "https://moox.org/",
8+
"license": "MIT",
9+
"authors": [
10+
{
11+
"name": "Moox Developer",
12+
"email": "dev@moox.org",
13+
"role": "Developer"
14+
}
15+
],
16+
"autoload": {
17+
"psr-4": {
18+
"Moox\\Devlink\\": "src"
19+
}
20+
},
21+
"extra": {
22+
"laravel": {
23+
"providers": [
24+
"Moox\\Devlink\\DevlinkServiceProvider"
25+
]
26+
}
27+
},
28+
"minimum-stability": "stable",
29+
"prefer-stable": true
30+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
3+
return [
4+
'base_paths' => [
5+
base_path('../moox/packages'),
6+
],
7+
8+
'packages' => [
9+
'audit',
10+
// 'backup-server-ui',
11+
'builder',
12+
// 'builder-pro',
13+
// 'category',
14+
// 'core',
15+
// 'connect',
16+
// 'data',
17+
// 'devops',
18+
// 'expiry',
19+
'flags',
20+
'jobs',
21+
// 'login-link',
22+
// 'localization',
23+
// 'media',
24+
// 'notifications',
25+
// 'page',
26+
// 'passkey',
27+
// 'permission',
28+
// 'press',
29+
// 'security',
30+
// 'sync',
31+
// 'tag',
32+
// 'trainings',
33+
// 'user',
34+
// 'user-device',
35+
// 'user-session',
36+
],
37+
];

packages/devlink/devlink-mix.jpg

57.2 KB
Loading

packages/devlink/devlink.jpg

670 KB
Loading

0 commit comments

Comments
 (0)