@loopress/cli 0.26.0 → 0.28.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/README.md +275 -177
- package/dist/commands/app/pull.js +17 -4
- package/dist/commands/app/push.d.ts +3 -0
- package/dist/commands/app/push.js +29 -5
- package/dist/commands/composer/push.js +1 -19
- package/dist/commands/diff.js +1 -1
- package/dist/commands/init.js +7 -1
- package/dist/commands/page/push.js +2 -2
- package/dist/commands/plugin/add.d.ts +8 -1
- package/dist/commands/plugin/add.js +10 -5
- package/dist/commands/plugin/audit.js +4 -5
- package/dist/commands/plugin/pull.d.ts +3 -1
- package/dist/commands/plugin/pull.js +17 -9
- package/dist/commands/plugin/push.d.ts +5 -1
- package/dist/commands/plugin/push.js +90 -37
- package/dist/commands/plugin/status.d.ts +1 -0
- package/dist/commands/plugin/status.js +21 -2
- package/dist/commands/project/config.js +12 -8
- package/dist/commands/promote.d.ts +2 -0
- package/dist/commands/promote.js +70 -8
- package/dist/commands/pull.js +8 -4
- package/dist/commands/push.d.ts +1 -0
- package/dist/commands/push.js +42 -4
- package/dist/commands/template/diff.d.ts +10 -0
- package/dist/commands/template/diff.js +13 -0
- package/dist/commands/template/list.d.ts +13 -0
- package/dist/commands/template/list.js +23 -0
- package/dist/commands/template/push.d.ts +20 -0
- package/dist/commands/template/push.js +42 -0
- package/dist/commands/theme/add.d.ts +8 -1
- package/dist/commands/theme/add.js +4 -2
- package/dist/commands/theme/pull.d.ts +3 -1
- package/dist/commands/theme/pull.js +10 -4
- package/dist/commands/theme/style/diff.d.ts +2 -0
- package/dist/commands/{theme-styles → theme/style}/diff.js +2 -1
- package/dist/commands/{theme-styles → theme/style}/pull.d.ts +1 -1
- package/dist/commands/{theme-styles → theme/style}/pull.js +3 -3
- package/dist/commands/{theme-styles → theme/style}/push.d.ts +1 -1
- package/dist/commands/{theme-styles → theme/style}/push.js +5 -5
- package/dist/commands/theme/style/rollback.d.ts +2 -0
- package/dist/commands/theme/style/rollback.js +6 -0
- package/dist/lib/api-client.js +26 -1
- package/dist/lib/app-build.d.ts +5 -0
- package/dist/lib/app-build.js +69 -0
- package/dist/lib/app-manifest.d.ts +4 -0
- package/dist/lib/app-manifest.js +8 -0
- package/dist/lib/base.js +11 -2
- package/dist/lib/bootstrap-full-install.js +45 -14
- package/dist/lib/dev-watch.d.ts +1 -1
- package/dist/lib/dev-watch.js +4 -1
- package/dist/lib/diff-command.d.ts +1 -0
- package/dist/lib/diff-command.js +6 -4
- package/dist/lib/json-delegation.d.ts +1 -0
- package/dist/lib/json-delegation.js +18 -0
- package/dist/lib/load-snippets.js +1 -1
- package/dist/lib/php-files-command.js +4 -3
- package/dist/lib/readdir-tolerant.js +15 -5
- package/dist/lib/resource-state.js +43 -1
- package/dist/lib/rollback-command.d.ts +1 -0
- package/dist/lib/rollback-command.js +8 -6
- package/dist/lib/rotate-app-password.js +2 -2
- package/dist/lib/snapshot-store.js +14 -0
- package/dist/lib/validate-local.js +34 -7
- package/dist/lib/wp-client.d.ts +4 -1
- package/dist/lib/wp-client.js +56 -3
- package/dist/types/plugin.d.ts +8 -1
- package/dist/types/plugin.js +4 -1
- package/dist/types/project-config.generated.d.ts +19 -2
- package/dist/utils/composer.d.ts +14 -0
- package/dist/utils/composer.js +136 -0
- package/dist/utils/loopress-config.d.ts +1 -0
- package/dist/utils/loopress-config.js +14 -0
- package/dist/utils/page-format.d.ts +12 -0
- package/dist/utils/page-format.js +41 -26
- package/dist/utils/plugins.d.ts +9 -4
- package/dist/utils/plugins.js +16 -7
- package/dist/utils/resource-dirs.d.ts +2 -0
- package/dist/utils/resource-dirs.js +4 -0
- package/dist/utils/seo-format.d.ts +2 -2
- package/dist/utils/template-format.d.ts +30 -0
- package/dist/utils/template-format.js +36 -0
- package/oclif.manifest.json +536 -320
- package/package.json +7 -4
- package/schemas/project-config.schema.json +25 -4
- package/dist/commands/theme-styles/diff.d.ts +0 -2
- package/dist/commands/theme-styles/rollback.d.ts +0 -2
- package/dist/commands/theme-styles/rollback.js +0 -5
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.
|
|
4
|
+
"version": "0.28.0",
|
|
5
5
|
"author": "jean-smaug",
|
|
6
6
|
"bin": {
|
|
7
7
|
"loopress": "bin/run.js",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"vitest": "^4.1.11"
|
|
51
51
|
},
|
|
52
52
|
"engines": {
|
|
53
|
-
"node": ">=
|
|
53
|
+
"node": ">=22.0.0"
|
|
54
54
|
},
|
|
55
55
|
"files": [
|
|
56
56
|
"./bin",
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
"main": "dist/index.js",
|
|
67
67
|
"exports": {
|
|
68
68
|
".": "./dist/index.js",
|
|
69
|
+
"./package.json": "./package.json",
|
|
69
70
|
"./schema/global-config": "./schemas/global-config.schema.json",
|
|
70
71
|
"./schema/project-config": "./schemas/project-config.schema.json",
|
|
71
72
|
"./schema/snippet": "./schemas/snippet.schema.json"
|
|
@@ -120,13 +121,14 @@
|
|
|
120
121
|
"theme": {
|
|
121
122
|
"description": "Manage WordPress.org themes tracked in loopress.json (versions only, never switches the active theme)"
|
|
122
123
|
},
|
|
123
|
-
"theme
|
|
124
|
+
"theme:style": {
|
|
124
125
|
"description": "Manage the active block theme's Global Styles customizations (Site Editor > Styles: colors, typography, spacing)"
|
|
125
126
|
},
|
|
126
127
|
"telemetry": {
|
|
127
128
|
"description": "Manage error reporting preferences"
|
|
128
129
|
}
|
|
129
|
-
}
|
|
130
|
+
},
|
|
131
|
+
"repositoryPrefix": "<%- repo %>/blob/%40loopress%2Fcli%40<%- version %>/cli/<%- commandPath %>"
|
|
130
132
|
},
|
|
131
133
|
"repository": {
|
|
132
134
|
"type": "git",
|
|
@@ -146,6 +148,7 @@
|
|
|
146
148
|
"posttest": "pnpm run lint",
|
|
147
149
|
"schema:types": "tsx scripts/generate-config-types.ts",
|
|
148
150
|
"test": "vitest run",
|
|
151
|
+
"typecheck:test": "tsc -p test/tsconfig.json",
|
|
149
152
|
"pretest:mutation": "pnpm run schema:types",
|
|
150
153
|
"test:mutation": "stryker run",
|
|
151
154
|
"version": "oclif manifest && oclif readme && git add README.md oclif.manifest.json",
|
|
@@ -54,6 +54,16 @@
|
|
|
54
54
|
"description": "Directory where static HTML pages (one <slug>.html per WordPress page, managed by Loopress) are read from, relative to rootDir.",
|
|
55
55
|
"default": "pages"
|
|
56
56
|
},
|
|
57
|
+
"templateDir": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"description": "Directory where block templates (one <slug>.html per template, written to the Loopress child theme of the active block theme) are read from, relative to rootDir. A static page uses one with its `template` header.",
|
|
60
|
+
"default": "templates"
|
|
61
|
+
},
|
|
62
|
+
"partDir": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"description": "Directory where block template parts (one <slug>.html per part, written to the Loopress child theme of the active block theme) are read from, relative to rootDir.",
|
|
65
|
+
"default": "parts"
|
|
66
|
+
},
|
|
57
67
|
"optionsDir": {
|
|
58
68
|
"type": "string",
|
|
59
69
|
"description": "Directory where explicitly tracked WordPress options (wp_options rows) are read from and written to, relative to rootDir. Only options added via `lps option add` live here, this is never the whole options table.",
|
|
@@ -75,15 +85,26 @@
|
|
|
75
85
|
},
|
|
76
86
|
"plugins": {
|
|
77
87
|
"type": "object",
|
|
78
|
-
"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).",
|
|
88
|
+
"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, and the plugin is kept active. An object with \"active\": false keeps the plugin installed but inactive. Removing an entry uninstalls the plugin on the next push. Ignored when a composer.json exists in rootDir (that file becomes authoritative).",
|
|
79
89
|
"additionalProperties": {
|
|
80
|
-
"
|
|
81
|
-
|
|
90
|
+
"anyOf": [
|
|
91
|
+
{"type": "string", "examples": ["9.4.2", "latest"]},
|
|
92
|
+
{
|
|
93
|
+
"type": "object",
|
|
94
|
+
"properties": {
|
|
95
|
+
"version": {"type": "string", "description": "Exact version to pin, or \"latest\".", "examples": ["1.7.2", "latest"]},
|
|
96
|
+
"active": {"type": "boolean", "description": "false keeps the plugin installed but inactive. Defaults to true.", "default": true}
|
|
97
|
+
},
|
|
98
|
+
"required": ["version"],
|
|
99
|
+
"additionalProperties": false
|
|
100
|
+
}
|
|
101
|
+
]
|
|
82
102
|
},
|
|
83
103
|
"examples": [
|
|
84
104
|
{
|
|
85
105
|
"woocommerce": "9.4.2",
|
|
86
|
-
"wordpress-seo": "latest"
|
|
106
|
+
"wordpress-seo": "latest",
|
|
107
|
+
"hello-dolly": {"version": "1.7.2", "active": false}
|
|
87
108
|
}
|
|
88
109
|
]
|
|
89
110
|
},
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { resourceRollbackCommand } from '../../lib/rollback-command.js';
|
|
2
|
-
export default resourceRollbackCommand('theme-styles', {
|
|
3
|
-
description: 'Restore the active theme’s Global Styles to a snapshot taken automatically before an earlier `lps theme-styles push`',
|
|
4
|
-
pathNoun: 'theme styles directory',
|
|
5
|
-
});
|