@codigodoleo/wp-kit 3.1.0 → 3.2.0
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/lib/commands/init.js +19 -10
- package/lib/config/versions.js +5 -5
- package/lib/prompts/index.js +24 -14
- package/lib/utils/git.js +50 -13
- package/modules/deploy/.github/workflows/deploy-docker.yml +102 -0
- package/modules/deploy/.github/workflows/deploy-ssh.yml +126 -0
- package/modules/deploy/.github/workflows/release.yml +55 -0
- package/modules/deploy/index.js +39 -0
- package/modules/deploy/prompts.js +1 -3
- package/modules/deploy/templates/.gitlab/ci/deploy-docker.yml.hbs +35 -0
- package/modules/deploy/templates/.gitlab/ci/deploy-ssh.yml.hbs +83 -0
- package/modules/deploy/templates/.gitlab/ci/release.yml.hbs +26 -0
- package/modules/git/.husky/commit-msg +8 -4
- package/modules/git/.husky/pre-commit +0 -3
- package/modules/git/index.js +34 -38
- package/modules/git/templates/.lando.yml.hbs +13 -5
- package/modules/git/templates/package.json.hbs +4 -4
- package/modules/git/templates/workspace.json.hbs +114 -28
- package/modules/lint/templates/.lando.yml.hbs +10 -2
- package/modules/lint/templates/package.json.hbs +4 -4
- package/modules/lint/templates/workspace.json.hbs +56 -15
- package/modules/php/templates/.lando.yml.hbs +11 -2
- package/modules/php/templates/composer.json.hbs +1 -1
- package/modules/php/templates/workspace.json.hbs +74 -15
- package/modules/redis/templates/.lando.yml.hbs +8 -1
- package/modules/sage/index.js +114 -15
- package/modules/sage/prompts.js +1 -1
- package/modules/sage/templates/.devcontainer/devcontainer.json.hbs +7 -0
- package/modules/sage/templates/.devcontainer/docker-compose.override.yml.hbs +6 -0
- package/modules/sage/templates/.devcontainer/post-create.sh.hbs +11 -0
- package/modules/sage/templates/.lando.yml.hbs +49 -20
- package/modules/sage/templates/server/cmd/setup-sage-node.sh.hbs +23 -0
- package/modules/sage/templates/server/cmd/setup-sage-php.sh.hbs +24 -0
- package/modules/sage/templates/theme/app/Blocks/.gitkeep.hbs +0 -0
- package/modules/sage/templates/theme/app/Fields/.gitkeep.hbs +0 -0
- package/modules/sage/templates/theme/composer.json.hbs +25 -3
- package/modules/sage/templates/theme/package.json.hbs +15 -3
- package/modules/sage/templates/theme/resources/views/blocks/.gitkeep.hbs +0 -0
- package/modules/sage/templates/theme/vite.config.js.hbs +55 -13
- package/modules/sage/templates/workspace.json.hbs +155 -12
- package/modules/skills/index.js +18 -0
- package/modules/skills/prompts.js +21 -0
- package/modules/test/index.js +19 -0
- package/modules/test/prompts.js +8 -0
- package/modules/test/templates/composer.json.hbs +16 -0
- package/modules/test/templates/package.json.hbs +11 -0
- package/modules/test/templates/playwright.config.js.hbs +29 -0
- package/modules/test/tests/Pest.php +39 -0
- package/modules/test/tests/SmokeTest.php +15 -0
- package/modules/test/tests/e2e/example.spec.js +11 -0
- package/modules/test/tests/e2e/helpers/loginHelper.js +40 -0
- package/package.json +1 -1
- package/templates/.devcontainer/Dockerfile.hbs +24 -0
- package/templates/.devcontainer/config/nginx.conf +23 -0
- package/templates/.devcontainer/config/nginx.conf.hbs +23 -0
- package/templates/.devcontainer/devcontainer.json.hbs +29 -0
- package/templates/.devcontainer/docker-compose.yml.hbs +73 -0
- package/templates/.devcontainer/setup.sh.hbs +17 -0
- package/templates/.env.hbs +38 -15
- package/templates/.gitignore.hbs +2 -2
- package/templates/.lando.yml.hbs +88 -11
- package/templates/README.md.hbs +23 -7
- package/templates/composer.json.hbs +4 -3
- package/templates/package.json.hbs +0 -2
- package/templates/server/cmd/install-wp.sh.hbs +54 -43
- package/templates/server/cmd/setup-node.sh.hbs +11 -0
- package/templates/server/cmd/setup-php.sh.hbs +14 -0
- package/templates/server/www/vhosts.conf.hbs +54 -17
- package/templates/workspace.json.hbs +233 -40
- package/templates/wp-cli.yml.hbs +1 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Job reutilizável — SSH Deploy via rsync
|
|
2
|
+
#
|
|
3
|
+
# Como usar no .gitlab-ci.yml principal:
|
|
4
|
+
#
|
|
5
|
+
# include:
|
|
6
|
+
# - local: '.gitlab/ci/deploy-ssh.yml'
|
|
7
|
+
#
|
|
8
|
+
# stages:
|
|
9
|
+
# - build
|
|
10
|
+
# - deploy
|
|
11
|
+
#
|
|
12
|
+
# Variáveis necessárias (Settings → CI/CD → Variables):
|
|
13
|
+
# SSH_PRIVATE_KEY — chave SSH privada (sem passphrase para CI)
|
|
14
|
+
# SSH_KNOWN_HOSTS — saída de: ssh-keyscan -H <host>
|
|
15
|
+
# DEPLOY_HOST — endereço do servidor (ex: meu-servidor.example.com)
|
|
16
|
+
# DEPLOY_USER — usuário SSH (ex: deploy)
|
|
17
|
+
# DEPLOY_PATH — caminho absoluto no servidor (ex: /var/www/html)
|
|
18
|
+
#
|
|
19
|
+
# O rsync usa --no-perms --no-owner --no-group, portanto não altera
|
|
20
|
+
# permissões nem proprietários existentes no servidor de destino.
|
|
21
|
+
|
|
22
|
+
.ssh-agent-setup: &ssh-agent-setup
|
|
23
|
+
- eval "$(ssh-agent -s)"
|
|
24
|
+
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
|
|
25
|
+
- mkdir -p ~/.ssh && chmod 700 ~/.ssh
|
|
26
|
+
- echo "$SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts && chmod 600 ~/.ssh/known_hosts
|
|
27
|
+
|
|
28
|
+
build:deps:
|
|
29
|
+
stage: build
|
|
30
|
+
image: composer:latest
|
|
31
|
+
script:
|
|
32
|
+
- composer install --no-dev --optimize-autoloader --no-interaction
|
|
33
|
+
artifacts:
|
|
34
|
+
paths:
|
|
35
|
+
- vendor/
|
|
36
|
+
expire_in: 1 hour
|
|
37
|
+
rules:
|
|
38
|
+
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
39
|
+
|
|
40
|
+
build:assets:
|
|
41
|
+
stage: build
|
|
42
|
+
image: node:{{nodeVersion}}-alpine
|
|
43
|
+
before_script:
|
|
44
|
+
- apk add --no-cache git
|
|
45
|
+
script:
|
|
46
|
+
- |
|
|
47
|
+
{{#if ci.theme.paths.themeRoot}}
|
|
48
|
+
if [ -d "{{ci.theme.paths.themeRoot}}" ]; then
|
|
49
|
+
npm install --prefix "{{ci.theme.paths.themeRoot}}"
|
|
50
|
+
npm run build --prefix "{{ci.theme.paths.themeRoot}}"
|
|
51
|
+
fi
|
|
52
|
+
{{else}}
|
|
53
|
+
if [ -f package.json ]; then npm ci && npm run build --if-present; fi
|
|
54
|
+
{{/if}}
|
|
55
|
+
artifacts:
|
|
56
|
+
paths:
|
|
57
|
+
- content/themes/*/public/
|
|
58
|
+
- public/
|
|
59
|
+
expire_in: 1 hour
|
|
60
|
+
rules:
|
|
61
|
+
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
62
|
+
|
|
63
|
+
deploy:ssh:
|
|
64
|
+
stage: deploy
|
|
65
|
+
image: alpine:latest
|
|
66
|
+
needs:
|
|
67
|
+
- job: build:deps
|
|
68
|
+
- job: build:assets
|
|
69
|
+
before_script:
|
|
70
|
+
- apk add --no-cache rsync openssh-client
|
|
71
|
+
- *ssh-agent-setup
|
|
72
|
+
script:
|
|
73
|
+
- |
|
|
74
|
+
rsync -avz --delete \
|
|
75
|
+
--no-perms --no-owner --no-group \
|
|
76
|
+
--exclude='.git' \
|
|
77
|
+
--exclude='.env' \
|
|
78
|
+
--exclude='node_modules' \
|
|
79
|
+
--exclude='node_modules/.cache' \
|
|
80
|
+
./ \
|
|
81
|
+
"$DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_PATH/"
|
|
82
|
+
rules:
|
|
83
|
+
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Job reutilizável — Semantic Release
|
|
2
|
+
#
|
|
3
|
+
# Como usar no .gitlab-ci.yml principal:
|
|
4
|
+
#
|
|
5
|
+
# include:
|
|
6
|
+
# - local: '.gitlab/ci/release.yml'
|
|
7
|
+
#
|
|
8
|
+
# stages:
|
|
9
|
+
# - release
|
|
10
|
+
#
|
|
11
|
+
# Variáveis necessárias (Settings → CI/CD → Variables):
|
|
12
|
+
# GITLAB_TOKEN — Personal/Project Access Token com scope "api"
|
|
13
|
+
# NPM_TOKEN — Token npm (omita se o projeto não publicar no npm)
|
|
14
|
+
|
|
15
|
+
semantic-release:
|
|
16
|
+
stage: release
|
|
17
|
+
image: node:{{nodeVersion}}-alpine
|
|
18
|
+
rules:
|
|
19
|
+
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
20
|
+
before_script:
|
|
21
|
+
- npm ci
|
|
22
|
+
script:
|
|
23
|
+
- npx semantic-release
|
|
24
|
+
variables:
|
|
25
|
+
GITLAB_TOKEN: $GITLAB_TOKEN
|
|
26
|
+
NPM_TOKEN: $NPM_TOKEN
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
echo "🔍 Validating commit message..."
|
|
2
|
+
if command -v lando >/dev/null 2>&1 && lando info >/dev/null 2>&1; then
|
|
3
|
+
echo "🐳 Using Lando environment..."
|
|
4
|
+
lando commitlint --edit "$1"
|
|
5
|
+
else
|
|
6
|
+
echo "🏠 Using local environment..."
|
|
7
|
+
npx --no commitlint --edit "$1"
|
|
8
|
+
fi
|
package/modules/git/index.js
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
|
-
import {
|
|
2
|
+
import { execFileSync } from 'child_process';
|
|
3
3
|
|
|
4
4
|
import fs from 'fs-extra';
|
|
5
5
|
|
|
6
6
|
import { log, color } from '../../lib/utils/logger.js';
|
|
7
7
|
|
|
8
|
+
function runGitCommand(args, cwd, stdio = 'ignore') {
|
|
9
|
+
return execFileSync('git', args, { cwd, stdio });
|
|
10
|
+
}
|
|
11
|
+
|
|
8
12
|
export async function setupModule(context, generator) {
|
|
9
13
|
const gitDir = path.join(generator.cwd, '.git');
|
|
10
14
|
|
|
@@ -25,17 +29,14 @@ export async function setupModule(context, generator) {
|
|
|
25
29
|
|
|
26
30
|
if (!(await fs.pathExists(gitDir))) {
|
|
27
31
|
log(color.orange, '[git] Initializing Git repository');
|
|
28
|
-
|
|
32
|
+
runGitCommand(['init'], generator.cwd);
|
|
29
33
|
await generator.copyFile('.gitmessage', 'git');
|
|
30
34
|
|
|
31
35
|
if (context.defaultBranch && context.defaultBranch !== 'main') {
|
|
32
36
|
try {
|
|
33
|
-
|
|
34
|
-
cwd: generator.cwd,
|
|
35
|
-
stdio: 'ignore',
|
|
36
|
-
});
|
|
37
|
+
runGitCommand(['branch', '-M', context.defaultBranch], generator.cwd);
|
|
37
38
|
log(color.green, `[git] Default branch set to: ${context.defaultBranch}`);
|
|
38
|
-
} catch
|
|
39
|
+
} catch {
|
|
39
40
|
log(color.yellow, '[git] Warning: Could not rename default branch');
|
|
40
41
|
}
|
|
41
42
|
}
|
|
@@ -50,39 +51,30 @@ export async function setupModule(context, generator) {
|
|
|
50
51
|
|
|
51
52
|
for (const [key, value] of gitConfigs) {
|
|
52
53
|
try {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
stdio: 'ignore',
|
|
56
|
-
});
|
|
57
|
-
} catch (error) {
|
|
54
|
+
runGitCommand(['config', key, value], generator.cwd);
|
|
55
|
+
} catch {
|
|
58
56
|
log(color.yellow, `[git] Warning: Could not set ${key}`);
|
|
59
57
|
}
|
|
60
58
|
}
|
|
61
59
|
|
|
62
60
|
try {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
stdio: 'ignore',
|
|
66
|
-
});
|
|
67
|
-
} catch (error) {
|
|
61
|
+
runGitCommand(['config', 'user.name', context.author], generator.cwd);
|
|
62
|
+
} catch {
|
|
68
63
|
log(color.yellow, `[git] Warning: Could not set user.name`);
|
|
69
64
|
}
|
|
70
65
|
|
|
71
66
|
try {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
stdio: 'ignore',
|
|
75
|
-
});
|
|
76
|
-
} catch (error) {
|
|
67
|
+
runGitCommand(['config', 'user.email', context.authorEmail], generator.cwd);
|
|
68
|
+
} catch {
|
|
77
69
|
log(color.yellow, `[git] Warning: Could not set user.email`);
|
|
78
70
|
}
|
|
79
71
|
|
|
80
72
|
try {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
} catch
|
|
73
|
+
runGitCommand(
|
|
74
|
+
['config', 'commit.template', path.join(generator.cwd, '.gitmessage')],
|
|
75
|
+
generator.cwd
|
|
76
|
+
);
|
|
77
|
+
} catch {
|
|
86
78
|
log(color.yellow, `[git] Warning: Could not set commit.template`);
|
|
87
79
|
}
|
|
88
80
|
}
|
|
@@ -110,7 +102,7 @@ export async function setupModule(context, generator) {
|
|
|
110
102
|
// Registra hook para fazer o commit inicial após todo o setup
|
|
111
103
|
generator.hooks.addAction(
|
|
112
104
|
'after_setup_complete',
|
|
113
|
-
async (context,
|
|
105
|
+
async (context, _generator) => {
|
|
114
106
|
const projectGitDir = path.join(context.cwd, '.git');
|
|
115
107
|
if (!(await fs.pathExists(projectGitDir))) {
|
|
116
108
|
return; // Repositório não foi inicializado neste setup
|
|
@@ -120,16 +112,20 @@ export async function setupModule(context, generator) {
|
|
|
120
112
|
log(color.blue, '[git] Making initial commit...');
|
|
121
113
|
|
|
122
114
|
// Adiciona todos os arquivos
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
115
|
+
runGitCommand(['add', '.'], context.cwd);
|
|
116
|
+
|
|
117
|
+
// Ignora assinatura e hooks neste commit automático para não depender do ambiente local.
|
|
118
|
+
runGitCommand(
|
|
119
|
+
[
|
|
120
|
+
'-c',
|
|
121
|
+
'commit.gpgsign=false',
|
|
122
|
+
'commit',
|
|
123
|
+
'--no-verify',
|
|
124
|
+
'-m',
|
|
125
|
+
'chore: initial project setup',
|
|
126
|
+
],
|
|
127
|
+
context.cwd
|
|
128
|
+
);
|
|
133
129
|
|
|
134
130
|
log(color.green, '[git] ✅ Initial commit created successfully');
|
|
135
131
|
} catch (error) {
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
tooling:
|
|
2
|
-
git-cz
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
tooling:
|
|
2
|
+
git-cz:
|
|
3
|
+
service: appserver
|
|
4
|
+
description: Make commit using Conventional Commits
|
|
5
|
+
cmd: npx git-cz
|
|
6
|
+
commitlint-check:
|
|
7
|
+
service: appserver
|
|
8
|
+
description: Verificar se a mensagem de commit segue o padrão
|
|
9
|
+
cmd: npx commitlint --from HEAD~1 --to HEAD --verbose
|
|
10
|
+
conventional-changelog:
|
|
11
|
+
service: appserver
|
|
12
|
+
description: Gerar changelog baseado em commits convencionais
|
|
13
|
+
cmd: npx conventional-changelog -p angular -i CHANGELOG.md -s
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{ "scripts": { "prepare": "husky
|
|
2
|
-
"@commitlint/cli": "^
|
|
3
|
-
"^
|
|
4
|
-
"lint-staged": "^15.
|
|
1
|
+
{ "scripts": { "prepare": "husky", "commit": "lando git-cz" }, "devDependencies": {
|
|
2
|
+
"@commitlint/cli": "^19.7.1", "@commitlint/config-conventional": "^19.7.1", "@commitlint/prompt":
|
|
3
|
+
"^19.5.0", "commitizen": "^4.3.1", "husky": "^9.0.11",
|
|
4
|
+
"lint-staged": "^15.5.0" } }
|
|
@@ -1,28 +1,114 @@
|
|
|
1
|
-
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
"
|
|
28
|
-
"
|
|
1
|
+
{
|
|
2
|
+
"settings": {
|
|
3
|
+
"git.inputValidation": "always",
|
|
4
|
+
"git.inputValidationSubjectLength": 72,
|
|
5
|
+
"git.inputValidationLength": 72,
|
|
6
|
+
"git.verboseCommit": true,
|
|
7
|
+
"git.useCommitInputAsStashMessage": true,
|
|
8
|
+
"git.promptToSaveFilesBeforeCommit": "always",
|
|
9
|
+
"git.confirmSync": false,
|
|
10
|
+
"git.autofetch": true,
|
|
11
|
+
"git.enableSmartCommit": true,
|
|
12
|
+
"git.smartCommitChanges": "tracked",
|
|
13
|
+
"git.allowForcePush": false,
|
|
14
|
+
"git.alwaysSignOff": false,
|
|
15
|
+
"git.enableCommitSigning": true,
|
|
16
|
+
"conventionalCommits.emojiFormat": "emoji",
|
|
17
|
+
"conventionalCommits.showEditor": true,
|
|
18
|
+
"conventionalCommits.silent": false,
|
|
19
|
+
"conventionalCommits.autoCommit": false,
|
|
20
|
+
"conventionalCommits.promptBody": true,
|
|
21
|
+
"conventionalCommits.promptFooter": true,
|
|
22
|
+
"conventionalCommits.promptScope": true,
|
|
23
|
+
"conventionalCommits.scopes": [
|
|
24
|
+
"ui",
|
|
25
|
+
"api",
|
|
26
|
+
"auth",
|
|
27
|
+
"config",
|
|
28
|
+
"deps",
|
|
29
|
+
"docs",
|
|
30
|
+
"tests",
|
|
31
|
+
"build",
|
|
32
|
+
"ci",
|
|
33
|
+
"theme",
|
|
34
|
+
"plugin",
|
|
35
|
+
"database",
|
|
36
|
+
"security",
|
|
37
|
+
"performance",
|
|
38
|
+
"core",
|
|
39
|
+
"docker",
|
|
40
|
+
"lando"
|
|
41
|
+
],
|
|
42
|
+
"conventionalCommits.gitmoji": false,
|
|
43
|
+
"conventionalCommits.lineBreak": "\\n",
|
|
44
|
+
"gitlens.ai.experimental.generateCommitMessage.enabled": true,
|
|
45
|
+
"gitlens.experimental.generateCommitMessage.enabled": true,
|
|
46
|
+
"gitlens.ai.experimental.generateCommitMessage.model": "gpt-4",
|
|
47
|
+
"gitlens.ai.experimental.generateCommitMessage.maxTokens": 200,
|
|
48
|
+
"gitlens.ai.experimental.generateCommitMessage.temperature": 0.2,
|
|
49
|
+
"github.copilot.enable": {
|
|
50
|
+
"*": true,
|
|
51
|
+
"yaml": true,
|
|
52
|
+
"plaintext": true,
|
|
53
|
+
"markdown": true,
|
|
54
|
+
"scminput": true
|
|
55
|
+
},
|
|
56
|
+
"github.copilot.advanced": {
|
|
57
|
+
"debug.overrideEngine": "copilot-chat",
|
|
58
|
+
"debug.useNodeFetcher": true
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"extensions": {
|
|
62
|
+
"recommendations": [
|
|
63
|
+
"eamodio.gitlens",
|
|
64
|
+
"mhutchie.git-graph",
|
|
65
|
+
"vivaxy.vscode-conventional-commits"
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"tasks": {
|
|
69
|
+
"tasks": [
|
|
70
|
+
{
|
|
71
|
+
"label": "📝 Conventional Commit (via Lando)",
|
|
72
|
+
"type": "shell",
|
|
73
|
+
"command": "lando",
|
|
74
|
+
"args": ["git-cz"],
|
|
75
|
+
"group": "build",
|
|
76
|
+
"presentation": {
|
|
77
|
+
"echo": true,
|
|
78
|
+
"reveal": "always",
|
|
79
|
+
"focus": false,
|
|
80
|
+
"panel": "shared"
|
|
81
|
+
},
|
|
82
|
+
"problemMatcher": []
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"label": "🔍 CommitLint: Check Last Commit",
|
|
86
|
+
"type": "shell",
|
|
87
|
+
"command": "lando",
|
|
88
|
+
"args": ["commitlint-check"],
|
|
89
|
+
"group": "test",
|
|
90
|
+
"presentation": {
|
|
91
|
+
"echo": true,
|
|
92
|
+
"reveal": "always",
|
|
93
|
+
"focus": false,
|
|
94
|
+
"panel": "shared"
|
|
95
|
+
},
|
|
96
|
+
"problemMatcher": []
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"label": "📋 Generate Changelog",
|
|
100
|
+
"type": "shell",
|
|
101
|
+
"command": "lando",
|
|
102
|
+
"args": ["conventional-changelog"],
|
|
103
|
+
"group": "build",
|
|
104
|
+
"presentation": {
|
|
105
|
+
"echo": true,
|
|
106
|
+
"reveal": "always",
|
|
107
|
+
"focus": false,
|
|
108
|
+
"panel": "shared"
|
|
109
|
+
},
|
|
110
|
+
"problemMatcher": []
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
tooling:
|
|
2
|
-
|
|
1
|
+
tooling:
|
|
2
|
+
eslint:
|
|
3
|
+
service: appserver
|
|
4
|
+
cmd: yarn eslint
|
|
5
|
+
prettier:
|
|
6
|
+
service: appserver
|
|
7
|
+
cmd: yarn prettier
|
|
8
|
+
stylelint:
|
|
9
|
+
service: appserver
|
|
10
|
+
cmd: yarn stylelint **/*.{css,scss,vue}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{ "scripts": { "format": "prettier --write .", "lint": "lando eslint .
|
|
2
|
-
"lando eslint . --
|
|
3
|
-
"@eslint/eslintrc": "^3.3.1", "@eslint/js": "^9.30.1", "eslint": "^
|
|
4
|
-
"eslint-config-prettier": "^
|
|
1
|
+
{ "scripts": { "format": "prettier --write .", "lint": "lando eslint .", "lint:fix":
|
|
2
|
+
"lando eslint . --fix" }, "devDependencies": { "globals": "^16.3.0",
|
|
3
|
+
"@eslint/eslintrc": "^3.3.1", "@eslint/js": "^9.30.1", "eslint": "^9.30.1",
|
|
4
|
+
"eslint-config-prettier": "^10.1.5", "eslint-plugin-prettier": "^5.3.1", "prettier": "^3.6.2" } }
|
|
@@ -1,15 +1,56 @@
|
|
|
1
|
-
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"editor.
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
1
|
+
{
|
|
2
|
+
"settings": {
|
|
3
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
4
|
+
"editor.formatOnSave": false,
|
|
5
|
+
"editor.codeActionsOnSave": {
|
|
6
|
+
"source.fixAll": true,
|
|
7
|
+
"source.fixAll.eslint": true,
|
|
8
|
+
"source.organizeImports": true
|
|
9
|
+
},
|
|
10
|
+
"prettier.requireConfig": true,
|
|
11
|
+
"prettier.useEditorConfig": true,
|
|
12
|
+
"[blade]": {
|
|
13
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
14
|
+
"editor.formatOnSave": false,
|
|
15
|
+
"editor.insertSpaces": true,
|
|
16
|
+
"editor.tabSize": 2
|
|
17
|
+
},
|
|
18
|
+
"[javascript]": {
|
|
19
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
20
|
+
"editor.formatOnSave": false,
|
|
21
|
+
"editor.insertSpaces": true,
|
|
22
|
+
"editor.tabSize": 2
|
|
23
|
+
},
|
|
24
|
+
"[typescript]": {
|
|
25
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
26
|
+
"editor.formatOnSave": false,
|
|
27
|
+
"editor.insertSpaces": true,
|
|
28
|
+
"editor.tabSize": 2
|
|
29
|
+
},
|
|
30
|
+
"[css]": {
|
|
31
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
32
|
+
"editor.formatOnSave": false,
|
|
33
|
+
"editor.insertSpaces": true,
|
|
34
|
+
"editor.tabSize": 2
|
|
35
|
+
},
|
|
36
|
+
"[scss]": {
|
|
37
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
38
|
+
"editor.formatOnSave": false,
|
|
39
|
+
"editor.insertSpaces": true,
|
|
40
|
+
"editor.tabSize": 2
|
|
41
|
+
},
|
|
42
|
+
"files.eol": "\n",
|
|
43
|
+
"files.trimTrailingWhitespace": true,
|
|
44
|
+
"files.insertFinalNewline": true
|
|
45
|
+
},
|
|
46
|
+
"extensions": {
|
|
47
|
+
"recommendations": [
|
|
48
|
+
"esbenp.prettier-vscode",
|
|
49
|
+
"dbaeumer.vscode-eslint",
|
|
50
|
+
"editorconfig.editorconfig",
|
|
51
|
+
"stylelint.vscode-stylelint",
|
|
52
|
+
"bmewburn.vscode-intelephense-client",
|
|
53
|
+
"bradlc.vscode-tailwindcss"
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
tooling:
|
|
2
|
-
pint
|
|
1
|
+
tooling:
|
|
2
|
+
pint:
|
|
3
|
+
service: appserver
|
|
4
|
+
description: PHP Code Style (modern PSR-12)
|
|
5
|
+
cmd:
|
|
6
|
+
- pint
|
|
7
|
+
pint-check:
|
|
8
|
+
service: appserver
|
|
9
|
+
description: Check code style without fixing
|
|
10
|
+
cmd:
|
|
11
|
+
- pint --test
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "require-dev": { "laravel/pint": "^1.
|
|
1
|
+
{ "require-dev": { "laravel/pint": "^1.29", "phpunit/phpunit": "^11.5", "phpstan/phpstan": "^2.1", "phpstan/extension-installer": "^1.4", "szepeviktor/phpstan-wordpress": "^2.0", "php-stubs/wordpress-stubs": "^6.8" }, "config": { "allow-plugins": { "phpstan/extension-installer": true } } }
|
|
@@ -1,15 +1,74 @@
|
|
|
1
|
-
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
|
|
1
|
+
{
|
|
2
|
+
"settings": {
|
|
3
|
+
"php.validate.enable": true,
|
|
4
|
+
"php.validate.executablePath": "${workspaceFolder}/scripts/php-wrapper.sh",
|
|
5
|
+
"php.validate.run": "onSave",
|
|
6
|
+
"php.suggest.basic": false,
|
|
7
|
+
"intelephense.files.maxSize": 5000000,
|
|
8
|
+
"intelephense.files.exclude": [
|
|
9
|
+
"**/.git/**",
|
|
10
|
+
"**/node_modules/**",
|
|
11
|
+
"**/vendor/**/{Test,test,Tests,tests}/**",
|
|
12
|
+
"**/.lando/**",
|
|
13
|
+
"**/wp/**",
|
|
14
|
+
"**/content/cache/**"
|
|
15
|
+
],
|
|
16
|
+
"intelephense.stubs": [
|
|
17
|
+
"wordpress"
|
|
18
|
+
],
|
|
19
|
+
"[php]": {
|
|
20
|
+
"editor.defaultFormatter": "open-southeners.laravel-pint",
|
|
21
|
+
"editor.formatOnSave": true,
|
|
22
|
+
"editor.insertSpaces": true,
|
|
23
|
+
"editor.tabSize": 4
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"extensions": {
|
|
27
|
+
"recommendations": [
|
|
28
|
+
"open-southeners.laravel-pint"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"tasks": {
|
|
32
|
+
"tasks": [
|
|
33
|
+
{
|
|
34
|
+
"label": "🔧 PHP: Fix Code Style (Pint)",
|
|
35
|
+
"type": "shell",
|
|
36
|
+
"command": "lando",
|
|
37
|
+
"args": ["pint"],
|
|
38
|
+
"group": "build",
|
|
39
|
+
"presentation": {
|
|
40
|
+
"echo": true,
|
|
41
|
+
"reveal": "always",
|
|
42
|
+
"focus": false,
|
|
43
|
+
"panel": "shared"
|
|
44
|
+
},
|
|
45
|
+
"problemMatcher": []
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"label": "🔍 PHP: Check Code Style (Pint)",
|
|
49
|
+
"type": "shell",
|
|
50
|
+
"command": "lando",
|
|
51
|
+
"args": ["pint", "--test"],
|
|
52
|
+
"group": "test",
|
|
53
|
+
"presentation": {
|
|
54
|
+
"echo": true,
|
|
55
|
+
"reveal": "always",
|
|
56
|
+
"focus": false,
|
|
57
|
+
"panel": "shared"
|
|
58
|
+
},
|
|
59
|
+
"problemMatcher": {
|
|
60
|
+
"owner": "pint",
|
|
61
|
+
"fileLocation": "absolute",
|
|
62
|
+
"pattern": {
|
|
63
|
+
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error)\\s+-\\s+(.*)$",
|
|
64
|
+
"file": 1,
|
|
65
|
+
"line": 2,
|
|
66
|
+
"column": 3,
|
|
67
|
+
"severity": 4,
|
|
68
|
+
"message": 5
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
}
|