@loopress/cli 0.21.0 → 0.23.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 (103) hide show
  1. package/README.md +457 -67
  2. package/dist/commands/acf/list.d.ts +2 -2
  3. package/dist/commands/acf/list.js +2 -5
  4. package/dist/commands/acf/pull.js +9 -22
  5. package/dist/commands/acf/push.js +3 -6
  6. package/dist/commands/api/list.js +2 -1
  7. package/dist/commands/api/publish.js +6 -22
  8. package/dist/commands/api/pull.js +12 -17
  9. package/dist/commands/api/push.js +7 -10
  10. package/dist/commands/app/list.d.ts +17 -0
  11. package/dist/commands/app/list.js +35 -0
  12. package/dist/commands/app/pull.d.ts +27 -0
  13. package/dist/commands/app/pull.js +94 -0
  14. package/dist/commands/app/push.d.ts +28 -0
  15. package/dist/commands/app/push.js +130 -0
  16. package/dist/commands/app/remove.d.ts +20 -0
  17. package/dist/commands/app/remove.js +42 -0
  18. package/dist/commands/composer/push.d.ts +1 -0
  19. package/dist/commands/composer/push.js +43 -19
  20. package/dist/commands/dev.js +1 -1
  21. package/dist/commands/doctor.js +2 -1
  22. package/dist/commands/form/list.d.ts +2 -4
  23. package/dist/commands/form/list.js +3 -10
  24. package/dist/commands/form/pull.js +15 -24
  25. package/dist/commands/form/push.js +17 -42
  26. package/dist/commands/init.js +1 -0
  27. package/dist/commands/login.js +6 -2
  28. package/dist/commands/logout.js +2 -1
  29. package/dist/commands/page/pull.js +17 -28
  30. package/dist/commands/page/push.js +27 -52
  31. package/dist/commands/plugin/add.d.ts +1 -0
  32. package/dist/commands/plugin/add.js +18 -8
  33. package/dist/commands/plugin/audit.d.ts +30 -0
  34. package/dist/commands/plugin/audit.js +138 -0
  35. package/dist/commands/plugin/pull.d.ts +1 -1
  36. package/dist/commands/plugin/pull.js +13 -15
  37. package/dist/commands/plugin/push.d.ts +14 -5
  38. package/dist/commands/plugin/push.js +171 -60
  39. package/dist/commands/plugin/status.d.ts +22 -0
  40. package/dist/commands/plugin/status.js +65 -0
  41. package/dist/commands/project/config.js +4 -1
  42. package/dist/commands/project/list.d.ts +16 -1
  43. package/dist/commands/project/list.js +22 -16
  44. package/dist/commands/project/pull.js +3 -2
  45. package/dist/commands/project/push.d.ts +5 -0
  46. package/dist/commands/project/push.js +79 -58
  47. package/dist/commands/promote.d.ts +18 -0
  48. package/dist/commands/promote.js +90 -0
  49. package/dist/commands/pull.d.ts +12 -0
  50. package/dist/commands/pull.js +51 -0
  51. package/dist/commands/push.d.ts +13 -0
  52. package/dist/commands/push.js +57 -0
  53. package/dist/commands/seo/list.d.ts +9 -2
  54. package/dist/commands/seo/list.js +9 -11
  55. package/dist/commands/seo/pull.js +14 -37
  56. package/dist/commands/seo/push.js +24 -48
  57. package/dist/commands/snippet/list.js +2 -1
  58. package/dist/commands/snippet/publish.js +5 -21
  59. package/dist/commands/snippet/pull.js +15 -20
  60. package/dist/commands/snippet/push.js +21 -30
  61. package/dist/commands/theme/add.d.ts +13 -0
  62. package/dist/commands/theme/add.js +35 -0
  63. package/dist/commands/theme/pull.d.ts +21 -0
  64. package/dist/commands/theme/pull.js +37 -0
  65. package/dist/commands/theme/push.d.ts +23 -0
  66. package/dist/commands/theme/push.js +130 -0
  67. package/dist/commands/theme/status.d.ts +20 -0
  68. package/dist/commands/theme/status.js +51 -0
  69. package/dist/commands/validate.d.ts +8 -0
  70. package/dist/commands/validate.js +24 -0
  71. package/dist/lib/app-manifest.d.ts +36 -0
  72. package/dist/lib/app-manifest.js +162 -0
  73. package/dist/lib/base.d.ts +10 -0
  74. package/dist/lib/base.js +56 -22
  75. package/dist/lib/guard-production-push.d.ts +12 -0
  76. package/dist/lib/guard-production-push.js +20 -0
  77. package/dist/lib/load-snippets.js +65 -60
  78. package/dist/lib/local-callback-server.js +9 -4
  79. package/dist/lib/push-command.d.ts +3 -0
  80. package/dist/lib/push-command.js +22 -15
  81. package/dist/lib/put-or-create.d.ts +13 -0
  82. package/dist/lib/put-or-create.js +19 -0
  83. package/dist/lib/readdir-tolerant.d.ts +5 -0
  84. package/dist/lib/readdir-tolerant.js +11 -0
  85. package/dist/lib/resolve-linked-project.d.ts +8 -0
  86. package/dist/lib/resolve-linked-project.js +27 -0
  87. package/dist/lib/validate-local.d.ts +10 -0
  88. package/dist/lib/validate-local.js +183 -0
  89. package/dist/types/plugin.d.ts +1 -0
  90. package/dist/types/project-config.generated.d.ts +11 -1
  91. package/dist/utils/plugin-sync.d.ts +26 -0
  92. package/dist/utils/plugin-sync.js +31 -0
  93. package/dist/utils/plugins.d.ts +15 -2
  94. package/dist/utils/plugins.js +57 -12
  95. package/dist/utils/pluralize.d.ts +1 -0
  96. package/dist/utils/pluralize.js +5 -0
  97. package/dist/utils/themes.d.ts +30 -0
  98. package/dist/utils/themes.js +29 -0
  99. package/dist/utils/version.d.ts +2 -0
  100. package/dist/utils/version.js +21 -0
  101. package/oclif.manifest.json +986 -125
  102. package/package.json +25 -20
  103. package/schemas/project-config.schema.json +22 -4
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@loopress/cli",
3
3
  "description": "CLI tool for syncing WordPress code snippets, plugins, and Composer dependencies via the REST API",
4
- "version": "0.21.0",
4
+ "version": "0.23.0",
5
5
  "author": "jean-smaug",
6
6
  "bin": {
7
7
  "loopress": "bin/run.js",
@@ -11,39 +11,41 @@
11
11
  "url": "https://github.com/loopress/loopress/issues"
12
12
  },
13
13
  "dependencies": {
14
- "@inquirer/prompts": "^8.5.2",
15
- "@oclif/core": "^4.13.2",
16
- "@oclif/plugin-help": "^6.2.56",
17
- "@oclif/plugin-warn-if-update-available": "^3.1.70",
18
- "@sentry/node": "^10.69.0",
14
+ "@inquirer/prompts": "^8.7.1",
15
+ "@oclif/core": "^5.0.0",
16
+ "@oclif/plugin-help": "^7.0.0",
17
+ "@oclif/plugin-warn-if-update-available": "^4.0.0",
18
+ "@sentry/node": "^10.73.0",
19
19
  "chokidar": "^5.0.0",
20
+ "compare-versions": "^6.1.1",
20
21
  "glob": "13.0.6",
21
- "got": "^15.1.0",
22
- "listr2": "^11.0.0",
23
- "open": "^11.0.0",
22
+ "got": "^16.0.0",
23
+ "listr2": "^11.1.0",
24
+ "open": "^11.0.2",
24
25
  "playwright-core": "^1.62.1",
25
26
  "slugify": "^1.6.9",
26
27
  "write-file-atomic": "^8.0.0"
27
28
  },
28
29
  "devDependencies": {
29
- "@eslint/compat": "2.1.0",
30
+ "@eslint/compat": "2.1.1",
30
31
  "@oclif/prettier-config": "^0.2.1",
31
- "@stryker-mutator/core": "^9.6.1",
32
- "@stryker-mutator/vitest-runner": "^9.6.1",
33
- "@types/node": "26.1.2",
32
+ "@stryker-mutator/core": "^10.0.0",
33
+ "@stryker-mutator/vitest-runner": "^10.0.0",
34
+ "@types/node": "26.4.1",
34
35
  "@types/write-file-atomic": "^4.0.3",
35
- "@vitest/coverage-v8": "4.1.10",
36
- "eslint": "^10.8.0",
37
- "eslint-config-oclif": "^7.1.1",
36
+ "@vitest/coverage-v8": "5.0.0",
37
+ "eslint": "^10.9.1",
38
+ "eslint-config-oclif": "^7.1.7",
38
39
  "eslint-config-prettier": "^10",
39
- "json-schema-to-typescript": "^15.0.4",
40
- "oclif": "^4.23.29",
40
+ "eslint-plugin-sonarjs": "^4.2.0",
41
+ "json-schema-to-typescript": "^16.0.0",
42
+ "oclif": "^5.0.1",
41
43
  "prettier": "3.9.6",
42
44
  "shx": "^0.4.0",
43
45
  "ts-node": "10.9.2",
44
- "tsx": "4.23.9",
46
+ "tsx": "4.23.13",
45
47
  "typescript": "^6.0.3",
46
- "vitest": "^4.1.10"
48
+ "vitest": "^5.0.0"
47
49
  },
48
50
  "engines": {
49
51
  "node": ">=18.0.0"
@@ -113,6 +115,9 @@
113
115
  "snippet": {
114
116
  "description": "Manage WordPress code snippets"
115
117
  },
118
+ "theme": {
119
+ "description": "Manage WordPress.org themes tracked in loopress.json (versions only, never switches the active theme)"
120
+ },
116
121
  "telemetry": {
117
122
  "description": "Manage error reporting preferences"
118
123
  }
@@ -44,21 +44,39 @@
44
44
  "description": "Directory where custom API route files are read from and written to, relative to rootDir.",
45
45
  "default": "api"
46
46
  },
47
+ "appsDir": {
48
+ "type": "string",
49
+ "description": "Directory where single-page app bundles are read from and written to, relative to rootDir. Each subdirectory is one app: a loopress.app.json plus a built dist/ folder.",
50
+ "default": "apps"
51
+ },
47
52
  "projectId": {
48
53
  "type": "string",
49
54
  "description": "Project identifier from the global Loopress config. When set, takes precedence over the currently active project in the global config."
50
55
  },
51
56
  "plugins": {
52
57
  "type": "object",
53
- "description": "WordPress.org plugins managed by Loopress. Keys are plugin slugs; values are written as \"latest\" since installs go through WordPress's native plugin API, which only installs the current version. Older files may still have a pinned version string here from before this was the case; it is read but no longer acted on.",
58
+ "description": "WordPress.org plugins managed by Loopress, installed via Composer + WPackagist on the site. Keys are plugin slugs. A value is either an exact version to pin (e.g. \"9.4.2\") or \"latest\" to track the newest release on every push. Removing an entry uninstalls the plugin on the next push. Ignored when a composer.json exists in rootDir (that file becomes authoritative).",
59
+ "additionalProperties": {
60
+ "type": "string",
61
+ "examples": ["9.4.2", "latest"]
62
+ },
63
+ "examples": [
64
+ {
65
+ "woocommerce": "9.4.2",
66
+ "wordpress-seo": "latest"
67
+ }
68
+ ]
69
+ },
70
+ "themes": {
71
+ "type": "object",
72
+ "description": "WordPress.org themes managed by Loopress, installed via Composer + WPackagist on the site. Keys are theme slugs; values are an exact version or \"latest\". Loopress manages installed theme versions only, it never switches the active theme. Ignored when a composer.json exists in rootDir.",
54
73
  "additionalProperties": {
55
74
  "type": "string",
56
- "examples": ["latest"]
75
+ "examples": ["3.4.0", "latest"]
57
76
  },
58
77
  "examples": [
59
78
  {
60
- "woocommerce": "latest",
61
- "contact-form-7": "latest"
79
+ "generatepress": "3.4.0"
62
80
  }
63
81
  ]
64
82
  }