@codigodoleo/wp-kit 5.0.1 → 5.1.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.
Files changed (68) hide show
  1. package/lib/commands/init.js +87 -78
  2. package/lib/config/versions.js +45 -45
  3. package/lib/core/infer-ci-capabilities.js +39 -26
  4. package/lib/prompts/index.js +113 -92
  5. package/lib/utils/logger.js +1 -1
  6. package/modules/blank-theme/index.js +49 -41
  7. package/modules/blank-theme/prompts.js +9 -25
  8. package/modules/blank-theme/templates/.lando.yml.hbs +5 -8
  9. package/modules/blank-theme/templates/functions.php.hbs +21 -15
  10. package/modules/blank-theme/templates/package.json.hbs +1 -1
  11. package/modules/deploy/index.js +51 -61
  12. package/modules/deploy/prompts.js +36 -12
  13. package/modules/deploy/templates/.github/workflows/ci.yml.hbs +356 -63
  14. package/modules/deploy/templates/.gitlab/ci/lint-blank-theme.yml.hbs +4 -4
  15. package/modules/deploy/templates/.gitlab/ci/lint-mu-plugin.yml.hbs +3 -2
  16. package/modules/deploy/templates/.gitlab/ci/lint-plugin.yml.hbs +3 -2
  17. package/modules/deploy/templates/.gitlab/ci/lint-sage.yml.hbs +17 -14
  18. package/modules/git/.lintstagedrc.json +2 -5
  19. package/modules/lint/.oxlintrc.json +19 -0
  20. package/modules/lint/.prettierignore +16 -1
  21. package/modules/lint/index.js +32 -40
  22. package/modules/lint/templates/mago.toml.hbs +83 -0
  23. package/modules/lint/templates/package.json.hbs +6 -10
  24. package/modules/lint/templates/workspace.json.hbs +2 -36
  25. package/modules/mu-plugin/index.js +64 -56
  26. package/modules/mu-plugin/prompts.js +21 -23
  27. package/modules/mu-plugin/templates/.lando.yml.hbs +8 -10
  28. package/modules/mu-plugin/templates/acorn/app/Providers/CoreServiceProvider.php.hbs +1 -1
  29. package/modules/mu-plugin/templates/acorn/composer.json.hbs +6 -5
  30. package/modules/mu-plugin/templates/composer.json.hbs +4 -2
  31. package/modules/php/templates/.lando.yml.hbs +13 -8
  32. package/modules/php/templates/composer.json.hbs +15 -7
  33. package/modules/php/templates/workspace.json.hbs +22 -19
  34. package/modules/plugin/index.js +10 -18
  35. package/modules/plugin/prompts.js +5 -19
  36. package/modules/plugin/templates/.lando.yml.hbs +8 -10
  37. package/modules/plugin/templates/composer.json.hbs +4 -2
  38. package/modules/sage/index.js +78 -88
  39. package/modules/sage/prompts.js +10 -24
  40. package/modules/sage/templates/.lando.yml.hbs +17 -7
  41. package/modules/sage/templates/theme/composer.json.hbs +36 -23
  42. package/modules/sage/templates/theme/package.json.hbs +24 -13
  43. package/modules/sage/templates/theme/style.css.hbs +12 -20
  44. package/modules/test/templates/composer.json.hbs +1 -1
  45. package/package.json +30 -35
  46. package/templates/.devcontainer/devcontainer.json.hbs +2 -2
  47. package/templates/.gitignore.hbs +9 -3
  48. package/templates/README.md.hbs +1 -1
  49. package/templates/auth.json.hbs +8 -0
  50. package/templates/composer.json.hbs +13 -5
  51. package/templates/package.json.hbs +2 -4
  52. package/templates/workspace.json.hbs +3 -4
  53. package/wp-config.php +5 -0
  54. package/modules/blank-theme/lint/eslint.config.mjs +0 -30
  55. package/modules/blank-theme/lint/pint.json +0 -11
  56. package/modules/deploy/.github/workflows/deploy-docker.yml +0 -104
  57. package/modules/deploy/.github/workflows/deploy-ssh.yml +0 -128
  58. package/modules/deploy/.github/workflows/release.yml +0 -57
  59. package/modules/mu-plugin/lint/eslint.config.mjs +0 -30
  60. package/modules/mu-plugin/lint/pint.json +0 -11
  61. package/modules/mu-plugin/templates/acorn/resources/.gitkeep +0 -0
  62. package/modules/mu-plugin/templates/acorn/storage/framework/cache/.gitkeep +0 -0
  63. package/modules/mu-plugin/templates/acorn/storage/framework/sessions/.gitkeep +0 -0
  64. package/modules/mu-plugin/templates/acorn/storage/framework/views/.gitkeep +0 -0
  65. package/modules/plugin/lint/eslint.config.mjs +0 -30
  66. package/modules/plugin/lint/pint.json +0 -11
  67. package/modules/sage/lint/eslint.config.mjs +0 -30
  68. package/modules/sage/lint/pint.json +0 -11
@@ -1,57 +0,0 @@
1
- # Reusable workflow — Semantic Release
2
- #
3
- # Como usar no seu workflow principal (.github/workflows/main.yml):
4
- #
5
- # on:
6
- # push:
7
- # branches: [main]
8
- #
9
- # jobs:
10
- # release:
11
- # uses: ./.github/workflows/release.yml
12
- # secrets:
13
- # NPM_TOKEN: ${{ secrets.NPM_TOKEN }} # opcional para projetos WordPress
14
- #
15
- # GITHUB_TOKEN é injetado automaticamente com os devidos escopos.
16
-
17
- name: Semantic Release (reusable)
18
-
19
- on:
20
- workflow_call:
21
- secrets:
22
- NPM_TOKEN:
23
- required: false
24
-
25
- permissions:
26
- contents: write
27
- issues: write
28
- pull-requests: write
29
- id-token: write
30
-
31
- jobs:
32
- release:
33
- name: Semantic Release
34
- runs-on: ubuntu-latest
35
- env:
36
- FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
37
- steps:
38
- - name: Checkout
39
- uses: actions/checkout@v4
40
- with:
41
- fetch-depth: 0
42
- persist-credentials: false
43
-
44
- - name: Setup Node.js
45
- uses: actions/setup-node@v4
46
- with:
47
- node-version: '24'
48
- cache: 'npm'
49
-
50
- - name: Install dependencies
51
- run: npm ci
52
-
53
- - name: Release
54
- run: npx semantic-release
55
- env:
56
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -1,30 +0,0 @@
1
- import js from '@eslint/js';
2
- import eslintConfigPrettier from 'eslint-config-prettier/flat';
3
- import prettierPlugin from 'eslint-plugin-prettier';
4
- import globals from 'globals';
5
-
6
- export default [
7
- {
8
- ignores: ['node_modules/**', 'vendor/**', 'dist/**'],
9
- },
10
- js.configs.recommended,
11
- {
12
- files: ['resources/**/*.{js,mjs,ts}'],
13
- languageOptions: {
14
- ecmaVersion: 2022,
15
- sourceType: 'module',
16
- globals: {
17
- ...globals.browser,
18
- ...globals.node,
19
- },
20
- },
21
- plugins: {
22
- prettier: prettierPlugin,
23
- },
24
- rules: {
25
- 'prettier/prettier': 'error',
26
- 'no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
27
- },
28
- },
29
- eslintConfigPrettier,
30
- ];
@@ -1,11 +0,0 @@
1
- {
2
- "preset": "psr12",
3
- "rules": {
4
- "array_syntax": {
5
- "syntax": "short"
6
- },
7
- "binary_operator_spaces": {
8
- "default": "single_space"
9
- }
10
- }
11
- }
@@ -1,30 +0,0 @@
1
- import js from '@eslint/js';
2
- import eslintConfigPrettier from 'eslint-config-prettier/flat';
3
- import prettierPlugin from 'eslint-plugin-prettier';
4
- import globals from 'globals';
5
-
6
- export default [
7
- {
8
- ignores: ['node_modules/**', 'vendor/**', 'dist/**'],
9
- },
10
- js.configs.recommended,
11
- {
12
- files: ['resources/**/*.{js,mjs,ts}'],
13
- languageOptions: {
14
- ecmaVersion: 2022,
15
- sourceType: 'module',
16
- globals: {
17
- ...globals.browser,
18
- ...globals.node,
19
- },
20
- },
21
- plugins: {
22
- prettier: prettierPlugin,
23
- },
24
- rules: {
25
- 'prettier/prettier': 'error',
26
- 'no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
27
- },
28
- },
29
- eslintConfigPrettier,
30
- ];
@@ -1,11 +0,0 @@
1
- {
2
- "preset": "psr12",
3
- "rules": {
4
- "array_syntax": {
5
- "syntax": "short"
6
- },
7
- "binary_operator_spaces": {
8
- "default": "single_space"
9
- }
10
- }
11
- }
@@ -1,30 +0,0 @@
1
- import js from '@eslint/js';
2
- import eslintConfigPrettier from 'eslint-config-prettier/flat';
3
- import prettierPlugin from 'eslint-plugin-prettier';
4
- import globals from 'globals';
5
-
6
- export default [
7
- {
8
- ignores: ['node_modules/**', 'vendor/**', 'public/build/**'],
9
- },
10
- js.configs.recommended,
11
- {
12
- files: ['resources/**/*.{js,mjs,ts,vue}'],
13
- languageOptions: {
14
- ecmaVersion: 2022,
15
- sourceType: 'module',
16
- globals: {
17
- ...globals.browser,
18
- ...globals.node,
19
- },
20
- },
21
- plugins: {
22
- prettier: prettierPlugin,
23
- },
24
- rules: {
25
- 'prettier/prettier': 'error',
26
- 'no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
27
- },
28
- },
29
- eslintConfigPrettier,
30
- ];
@@ -1,11 +0,0 @@
1
- {
2
- "preset": "psr12",
3
- "rules": {
4
- "array_syntax": {
5
- "syntax": "short"
6
- },
7
- "binary_operator_spaces": {
8
- "default": "single_space"
9
- }
10
- }
11
- }