@42wp/dev-env 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/package.json +1 -1
- package/src/lib/naming.js +1 -1
- package/src/locales/en.js +6 -6
- package/src/locales/pt.js +6 -6
package/README.md
CHANGED
|
@@ -45,18 +45,18 @@ so you (and your team) can just run `42wp start` with no flags. Scaffold one wit
|
|
|
45
45
|
`42wp init`:
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
|
-
42wp init
|
|
48
|
+
42wp init mysite --subdomains --vip --locale pt_BR --theme my-theme --demo-content
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
That writes:
|
|
52
52
|
|
|
53
53
|
```ini
|
|
54
|
-
project_slug=
|
|
54
|
+
project_slug=mysite
|
|
55
55
|
multisite=subdomain # false | subdir | subdomain
|
|
56
56
|
username=admin
|
|
57
57
|
password=password
|
|
58
58
|
locale=pt_BR
|
|
59
|
-
default_theme=
|
|
59
|
+
default_theme=my-theme
|
|
60
60
|
wpvip=true
|
|
61
61
|
initial_content=200
|
|
62
62
|
```
|
package/package.json
CHANGED
package/src/lib/naming.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import { t } from './i18n.js';
|
|
8
8
|
|
|
9
|
-
// Remove the shortest trailing ".something", e.g. "
|
|
9
|
+
// Remove the shortest trailing ".something", e.g. "mysite.localhost" -> "mysite".
|
|
10
10
|
export function normalizeName(raw) {
|
|
11
11
|
return String(raw ?? '').replace(/\.[^.]*$/, '');
|
|
12
12
|
}
|
package/src/locales/en.js
CHANGED
|
@@ -13,7 +13,7 @@ export default {
|
|
|
13
13
|
'global.invalid': "Invalid global command. Use 'start' or 'stop'.",
|
|
14
14
|
|
|
15
15
|
// start
|
|
16
|
-
'start.needName': 'You must provide a project name (or set project_slug in .42wp-dev-env). e.g.: 42wp start
|
|
16
|
+
'start.needName': 'You must provide a project name (or set project_slug in .42wp-dev-env). e.g.: 42wp start mysite',
|
|
17
17
|
'start.usingConfig': 'Using options from .42wp-dev-env (CLI flags override).',
|
|
18
18
|
'start.notWpContent':
|
|
19
19
|
'${dir} is not a wp-content directory (missing ${missing}). Run 42wp start from your project root (it needs ${required}), or pass --force to override.',
|
|
@@ -54,14 +54,14 @@ export default {
|
|
|
54
54
|
'init.next': 'Tip: with project_slug set, you can run 42wp start with no name.',
|
|
55
55
|
|
|
56
56
|
// update
|
|
57
|
-
'update.needName': 'Tell me which project to update. e.g.: 42wp update
|
|
57
|
+
'update.needName': 'Tell me which project to update. e.g.: 42wp update mysite',
|
|
58
58
|
'update.notFound': "Project '${name}' not found at ${dir}. Run 42wp start ${name} first.",
|
|
59
59
|
'update.rebuilding': 'Rebuilding ${name} on ${image}...',
|
|
60
60
|
'update.updatingDb': 'Updating database schema (wp core update-db)...',
|
|
61
61
|
'update.done': 'Updated! ${name} is now on WordPress ${version}.',
|
|
62
62
|
|
|
63
63
|
// rm
|
|
64
|
-
'rm.needName': 'Tell me which project to remove. e.g.: 42wp rm
|
|
64
|
+
'rm.needName': 'Tell me which project to remove. e.g.: 42wp rm mysite',
|
|
65
65
|
'rm.notFound': "Project '${name}' not found at ${dir}.",
|
|
66
66
|
'rm.confirm':
|
|
67
67
|
"Remove '${name}'? This deletes its container, image and database. Your repository is kept.",
|
|
@@ -74,17 +74,17 @@ export default {
|
|
|
74
74
|
'rm.done': "Removed '${name}'. Your repository was left untouched.",
|
|
75
75
|
|
|
76
76
|
// seed
|
|
77
|
-
'seed.needName': 'Tell me which project to seed. e.g.: 42wp seed
|
|
77
|
+
'seed.needName': 'Tell me which project to seed. e.g.: 42wp seed mysite',
|
|
78
78
|
'seed.notRunning': "Project '${name}' is not running. Start it first with 42wp start ${name}.",
|
|
79
79
|
'seed.failed': 'Demo content generation failed.',
|
|
80
80
|
|
|
81
81
|
// stop
|
|
82
|
-
'stop.needName': 'Tell me which project to stop. e.g.: 42wp stop
|
|
82
|
+
'stop.needName': 'Tell me which project to stop. e.g.: 42wp stop mysite',
|
|
83
83
|
'stop.stopping': 'Stopping the ${name} environment...',
|
|
84
84
|
'stop.notFound': 'Environment for ${name} not found at ${dir}.',
|
|
85
85
|
|
|
86
86
|
// wp proxy
|
|
87
|
-
'wp.needArgs': 'Provide the project and command. e.g.: 42wp wp
|
|
87
|
+
'wp.needArgs': 'Provide the project and command. e.g.: 42wp wp mysite plugin list',
|
|
88
88
|
'wp.notRunning': 'Container ${container} is not running.',
|
|
89
89
|
|
|
90
90
|
// validation
|
package/src/locales/pt.js
CHANGED
|
@@ -13,7 +13,7 @@ export default {
|
|
|
13
13
|
'global.invalid': "Comando global inválido. Use 'start' ou 'stop'.",
|
|
14
14
|
|
|
15
15
|
// start
|
|
16
|
-
'start.needName': 'Você precisa informar o nome do projeto (ou definir project_slug no .42wp-dev-env). Ex: 42wp start
|
|
16
|
+
'start.needName': 'Você precisa informar o nome do projeto (ou definir project_slug no .42wp-dev-env). Ex: 42wp start mysite',
|
|
17
17
|
'start.usingConfig': 'Usando opções do .42wp-dev-env (flags da CLI têm prioridade).',
|
|
18
18
|
'start.notWpContent':
|
|
19
19
|
'${dir} não é um diretório wp-content (falta ${missing}). Rode 42wp start na raiz do projeto (precisa de ${required}), ou use --force para ignorar.',
|
|
@@ -54,14 +54,14 @@ export default {
|
|
|
54
54
|
'init.next': 'Dica: com project_slug definido, você pode rodar 42wp start sem o nome.',
|
|
55
55
|
|
|
56
56
|
// update
|
|
57
|
-
'update.needName': 'Informe o projeto para atualizar. Ex: 42wp update
|
|
57
|
+
'update.needName': 'Informe o projeto para atualizar. Ex: 42wp update mysite',
|
|
58
58
|
'update.notFound': "Projeto '${name}' não encontrado em ${dir}. Rode 42wp start ${name} primeiro.",
|
|
59
59
|
'update.rebuilding': 'Reconstruindo ${name} com ${image}...',
|
|
60
60
|
'update.updatingDb': 'Atualizando o schema do banco (wp core update-db)...',
|
|
61
61
|
'update.done': 'Atualizado! ${name} agora está no WordPress ${version}.',
|
|
62
62
|
|
|
63
63
|
// rm
|
|
64
|
-
'rm.needName': 'Informe o projeto para remover. Ex: 42wp rm
|
|
64
|
+
'rm.needName': 'Informe o projeto para remover. Ex: 42wp rm mysite',
|
|
65
65
|
'rm.notFound': "Projeto '${name}' não encontrado em ${dir}.",
|
|
66
66
|
'rm.confirm':
|
|
67
67
|
"Remover '${name}'? Isso apaga o container, a imagem e o banco de dados. Seu repositório é mantido.",
|
|
@@ -74,17 +74,17 @@ export default {
|
|
|
74
74
|
'rm.done': "Removido '${name}'. Seu repositório não foi tocado.",
|
|
75
75
|
|
|
76
76
|
// seed
|
|
77
|
-
'seed.needName': 'Informe o projeto para popular. Ex: 42wp seed
|
|
77
|
+
'seed.needName': 'Informe o projeto para popular. Ex: 42wp seed mysite',
|
|
78
78
|
'seed.notRunning': "O projeto '${name}' não está rodando. Inicie com 42wp start ${name} primeiro.",
|
|
79
79
|
'seed.failed': 'Falha ao gerar o conteúdo de demonstração.',
|
|
80
80
|
|
|
81
81
|
// stop
|
|
82
|
-
'stop.needName': 'Informe o projeto para parar. Ex: 42wp stop
|
|
82
|
+
'stop.needName': 'Informe o projeto para parar. Ex: 42wp stop mysite',
|
|
83
83
|
'stop.stopping': 'Parando o ambiente ${name}...',
|
|
84
84
|
'stop.notFound': 'Ambiente para ${name} não encontrado em ${dir}.',
|
|
85
85
|
|
|
86
86
|
// proxy wp
|
|
87
|
-
'wp.needArgs': 'Informe o projeto e o comando. Ex: 42wp wp
|
|
87
|
+
'wp.needArgs': 'Informe o projeto e o comando. Ex: 42wp wp mysite plugin list',
|
|
88
88
|
'wp.notRunning': 'Container ${container} não está rodando.',
|
|
89
89
|
|
|
90
90
|
// validação
|