Skip to content

Commit c804854

Browse files
committed
intial commit
1 parent 7869d81 commit c804854

File tree

15 files changed

+1087
-0
lines changed

15 files changed

+1087
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ jobs:
6464
- press
6565
- product
6666
- progress
67+
- prompts
6768
- publish
6869
- record
6970
- restore

packages/prompts/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 currently don't track changes in this package. Please refer to the [Moox Monorepo](https://github.com/mooxphp/moox) for the latest changes.

packages/prompts/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 <[email protected]>
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/prompts/README.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Moox Prompts
2+
3+
CLI-kompatible Prompts für Laravel Artisan Commands.
4+
5+
## Übersicht
6+
7+
Dieses Package bietet eine einfache Proxy-Implementierung für Laravel Prompts. Es ermöglicht es, die gleichen Helper-Funktionen wie Laravel Prompts zu verwenden, mit der Möglichkeit, später Web-Funktionalität hinzuzufügen.
8+
9+
## Features
10+
11+
- ✅ Alle Laravel Prompt-Typen unterstützt (`text`, `select`, `multiselect`, `confirm`, etc.)
12+
- ✅ Identische API wie Laravel Prompts
13+
14+
## Installation
15+
16+
```bash
17+
composer require moox/prompts
18+
```
19+
20+
## Verwendung
21+
22+
### In Commands
23+
24+
Verwende die gleichen Helper-Funktionen wie in Laravel Prompts:
25+
26+
```php
27+
use function Moox\Prompts\text;
28+
use function Moox\Prompts\select;
29+
use function Moox\Prompts\confirm;
30+
use function Moox\Prompts\form;
31+
32+
public function handle()
33+
{
34+
// Einzelne Prompts
35+
$name = text('What is your name?');
36+
$package = select('Which package?', ['moox/core', 'moox/user']);
37+
$confirm = confirm('Are you sure?');
38+
39+
// FormBuilder
40+
$result = form()
41+
->text('Name?')
42+
->select('Package?', ['moox/core', 'moox/user'])
43+
->submit();
44+
45+
// Command-Logik...
46+
}
47+
```
48+
49+
## Architektur
50+
51+
Das Package besteht aus:
52+
53+
- **PromptRuntime**: Interface für Prompt-Implementierungen
54+
- **CliPromptRuntime**: CLI-Implementierung (delegiert an Laravel Prompts)
55+
- **functions.php**: Globale Helper-Funktionen
56+
- **PromptsServiceProvider**: Registriert Services
57+
58+
## License
59+
60+
Siehe [LICENSE.md](LICENSE.md)

packages/prompts/ROADMAP.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Roadmap
2+
3+
## Current tasks
4+
5+
- [ ] Create that package

packages/prompts/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 Prompts` 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 [email protected].
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/prompts/banner.jpg

404 KB
Loading

packages/prompts/composer.json

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
{
2+
"name": "moox/prompts",
3+
"description": "Prompts is a simple Moox Entity, that can be used to create and manage simple entries, like logs.",
4+
"keywords": [
5+
"Moox",
6+
"Laravel",
7+
"Filament",
8+
"Moox package",
9+
"Laravel package"
10+
],
11+
"homepage": "https://moox.org/docs/prompts",
12+
"license": "MIT",
13+
"authors": [
14+
{
15+
"name": "Moox Developer",
16+
"email": "[email protected]",
17+
"role": "Developer"
18+
}
19+
],
20+
"require": {
21+
"moox/core": "*"
22+
},
23+
"autoload": {
24+
"psr-4": {
25+
"Moox\\Prompts\\": "src",
26+
"Moox\\Prompts\\Database\\Factories\\": "database/factories"
27+
}
28+
},
29+
"autoload-dev": {
30+
"psr-4": {
31+
"Moox\\Prompts\\Tests\\": "tests/",
32+
"Workbench\\App\\": "workbench/app/",
33+
"Workbench\\Database\\Factories\\": "workbench/database/factories/",
34+
"Workbench\\Database\\Seeders\\": "workbench/database/seeders/"
35+
}
36+
},
37+
"extra": {
38+
"laravel": {
39+
"providers": [
40+
"Moox\\Prompts\\PromptsServiceProvider"
41+
]
42+
},
43+
"moox": {
44+
"name": "Moox Prompts",
45+
"stability": "stable",
46+
"type": "moox-plugin",
47+
"install": {
48+
"auto_migrate": "database/migrations",
49+
"auto_entities": {
50+
"Prompts": true
51+
},
52+
"auto_class": {
53+
"Prompts": "Moox\\Prompts\\Prompts"
54+
},
55+
"auto_run": {
56+
"Run this": "php artisan run:this",
57+
"Build the frontend": "npm run build",
58+
"Clear the cache": "php artisan cache:clear"
59+
},
60+
"auto_runhere": {
61+
"Build the frontend": "npm run build"
62+
}
63+
},
64+
"update": {
65+
"migrate": "database/migrations",
66+
"merge": "moox-prompts-config"
67+
},
68+
"uninstall": {
69+
"migrate": "database/migrations",
70+
"remove": "moox-prompts-config"
71+
}
72+
}
73+
},
74+
"prefer-stable": true,
75+
"require-dev": {
76+
"moox/devtools": "^4.0",
77+
"pestphp/pest-plugin-browser": "^4.0",
78+
"pestphp/pest-plugin-livewire": "^4.0"
79+
},
80+
"config": {
81+
"allow-plugins": {
82+
"pestphp/pest-plugin": true
83+
}
84+
},
85+
"scripts": {
86+
"post-autoload-dump": [
87+
"@clear",
88+
"@prepare"
89+
],
90+
"clear": "@php vendor/bin/testbench package:purge-skeleton --ansi",
91+
"prepare": "@php vendor/bin/testbench package:discover --ansi",
92+
"build": "@php vendor/bin/testbench workbench:build --ansi",
93+
"serve": [
94+
"Composer\\Config::disableProcessTimeout",
95+
"@build",
96+
"@php vendor/bin/testbench serve --ansi"
97+
],
98+
"lint": [
99+
"@php vendor/bin/pint --ansi",
100+
"@php vendor/bin/phpstan analyse --verbose --ansi"
101+
],
102+
"test": [
103+
"@clear",
104+
"@php vendor/bin/pest"
105+
]
106+
}
107+
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<?php
2+
3+
/*
4+
|--------------------------------------------------------------------------
5+
| Moox Configuration
6+
|--------------------------------------------------------------------------
7+
|
8+
| This configuration file uses translatable strings. If you want to
9+
| translate the strings, you can do so in the language files
10+
| published from moox_core. Example:
11+
|
12+
| 'trans//core::core.all',
13+
| loads from common.php
14+
| outputs 'All'
15+
|
16+
*/
17+
return [
18+
19+
'readonly' => false,
20+
21+
'resources' => [
22+
'item' => [
23+
'single' => 'trans//item::item.item',
24+
'plural' => 'trans//item::item.items',
25+
'tabs' => [
26+
'all' => [
27+
'label' => 'trans//core::core.all',
28+
'icon' => 'gmdi-filter-list',
29+
'query' => [
30+
[
31+
'field' => 'title',
32+
'operator' => '!=',
33+
'value' => null,
34+
],
35+
],
36+
],
37+
],
38+
],
39+
],
40+
41+
'relations' => [],
42+
43+
/*
44+
|--------------------------------------------------------------------------
45+
| Navigation
46+
|--------------------------------------------------------------------------
47+
|
48+
| The navigation group and sort of the Resource,
49+
| and if the panel is enabled.
50+
|
51+
*/
52+
'auth' => [
53+
'user' => 'Moox\\DevTools\\Models\\TestUser',
54+
],
55+
'navigation_group' => 'DEV',
56+
];
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php
2+
3+
return [
4+
'prompt' => 'Prompt',
5+
'prompts' => 'Prompts',
6+
];

0 commit comments

Comments
 (0)