@loopress/cli 0.27.0 → 0.29.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 +448 -189
- package/bin/dev.js +0 -0
- package/dist/commands/acf/pull.d.ts +9 -1
- package/dist/commands/acf/pull.js +2 -0
- package/dist/commands/acf/push.d.ts +9 -1
- package/dist/commands/acf/push.js +3 -1
- package/dist/commands/api/publish.js +1 -1
- package/dist/commands/app/pull.js +17 -4
- package/dist/commands/app/push.d.ts +3 -0
- package/dist/commands/app/push.js +30 -6
- package/dist/commands/composer/push.js +3 -21
- package/dist/commands/diff.js +1 -1
- package/dist/commands/form/pull.d.ts +9 -1
- package/dist/commands/form/pull.js +3 -1
- package/dist/commands/form/push.d.ts +7 -1
- package/dist/commands/form/push.js +3 -1
- package/dist/commands/init.js +6 -36
- package/dist/commands/menu/pull.d.ts +7 -1
- package/dist/commands/menu/pull.js +2 -0
- package/dist/commands/menu/push.d.ts +7 -1
- package/dist/commands/menu/push.js +3 -1
- package/dist/commands/option/pull.js +4 -4
- package/dist/commands/option/push.js +2 -0
- package/dist/commands/page/push.js +3 -0
- package/dist/commands/plugin/add.js +6 -3
- package/dist/commands/plugin/audit.js +4 -5
- package/dist/commands/plugin/pull.d.ts +7 -1
- package/dist/commands/plugin/pull.js +68 -14
- package/dist/commands/plugin/push.d.ts +5 -1
- package/dist/commands/plugin/push.js +92 -38
- 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 +69 -8
- package/dist/commands/pull.js +2 -2
- package/dist/commands/push.d.ts +1 -0
- package/dist/commands/push.js +40 -5
- package/dist/commands/seo/pull.d.ts +8 -1
- package/dist/commands/seo/pull.js +2 -0
- package/dist/commands/seo/push.d.ts +7 -1
- package/dist/commands/seo/push.js +3 -1
- package/dist/commands/snippet/publish.js +1 -1
- package/dist/commands/snippet/pull.js +1 -1
- package/dist/commands/snippet/push.js +1 -1
- package/dist/commands/status.d.ts +1 -0
- package/dist/commands/status.js +4 -4
- package/dist/commands/theme/pull.d.ts +6 -8
- package/dist/commands/theme/pull.js +30 -26
- package/dist/commands/theme/push.d.ts +8 -9
- package/dist/commands/theme/push.js +54 -111
- 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 +8 -2
- package/dist/commands/{theme-styles → theme/style}/pull.js +6 -4
- package/dist/commands/{theme-styles → theme/style}/push.d.ts +9 -2
- package/dist/commands/{theme-styles → theme/style}/push.js +9 -6
- package/dist/commands/theme/style/rollback.d.ts +2 -0
- package/dist/commands/theme/style/rollback.js +6 -0
- package/dist/commands/theme/template/diff.d.ts +10 -0
- package/dist/commands/theme/template/diff.js +13 -0
- package/dist/commands/theme/template/list.d.ts +13 -0
- package/dist/commands/theme/template/list.js +23 -0
- package/dist/commands/theme/template/push.d.ts +20 -0
- package/dist/commands/theme/template/push.js +44 -0
- package/dist/commands/theme/version/pull.d.ts +23 -0
- package/dist/commands/theme/version/pull.js +43 -0
- package/dist/commands/theme/version/push.d.ts +22 -0
- package/dist/commands/theme/version/push.js +123 -0
- package/dist/hooks/finally.d.ts +2 -1
- package/dist/hooks/finally.js +27 -4
- package/dist/lib/api-client.js +3 -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 +10 -2
- package/dist/lib/base.d.ts +1 -0
- package/dist/lib/base.js +14 -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 +3 -1
- package/dist/lib/diff-command.d.ts +1 -0
- package/dist/lib/diff-command.js +6 -4
- package/dist/lib/diff-state.js +1 -0
- package/dist/lib/github-release.js +0 -1
- package/dist/lib/local-callback-server.d.ts +12 -6
- package/dist/lib/local-callback-server.js +21 -22
- package/dist/lib/php-files-command.js +3 -1
- package/dist/lib/push-command.d.ts +5 -0
- package/dist/lib/push-command.js +30 -8
- package/dist/lib/resource-state.js +47 -4
- 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 +2 -2
- package/dist/lib/validate-local.js +6 -0
- package/dist/lib/wp-authorize-flow.d.ts +10 -17
- package/dist/lib/wp-authorize-flow.js +24 -28
- package/dist/lib/wp-client.d.ts +4 -1
- package/dist/lib/wp-client.js +25 -1
- package/dist/lib/wp-site-diagnostic.js +37 -0
- 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 +16 -0
- package/dist/utils/composer.js +144 -0
- package/dist/utils/option-format.d.ts +3 -1
- package/dist/utils/option-format.js +14 -3
- package/dist/utils/page-format.d.ts +12 -0
- package/dist/utils/page-format.js +40 -28
- package/dist/utils/plugin-sync.js +1 -1
- 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 +6 -2
- package/dist/utils/seo-format.d.ts +2 -2
- package/dist/utils/template-format.d.ts +31 -0
- package/dist/utils/template-format.js +43 -0
- package/oclif.manifest.json +841 -63
- package/package.json +24 -17
- 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.29.0",
|
|
5
5
|
"author": "jean-smaug",
|
|
6
6
|
"bin": {
|
|
7
7
|
"loopress": "bin/run.js",
|
|
@@ -12,42 +12,42 @@
|
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@inquirer/prompts": "^8.7.2",
|
|
15
|
-
"@oclif/core": "^5.
|
|
16
|
-
"@oclif/plugin-help": "^7.0.
|
|
17
|
-
"@oclif/plugin-warn-if-update-available": "^4.0.
|
|
15
|
+
"@oclif/core": "^5.1.2",
|
|
16
|
+
"@oclif/plugin-help": "^7.0.2",
|
|
17
|
+
"@oclif/plugin-warn-if-update-available": "^4.0.1",
|
|
18
18
|
"@sentry/node": "^10.74.0",
|
|
19
19
|
"chokidar": "^5.0.0",
|
|
20
20
|
"compare-versions": "^6.1.1",
|
|
21
21
|
"diff": "^9.0.0",
|
|
22
22
|
"got": "^16.0.0",
|
|
23
|
-
"listr2": "^11.1.
|
|
23
|
+
"listr2": "^11.1.1",
|
|
24
24
|
"microdiff": "^1.6.0",
|
|
25
|
-
"open": "^11.0.
|
|
25
|
+
"open": "^11.0.4",
|
|
26
26
|
"playwright-core": "^1.63.0",
|
|
27
27
|
"slugify": "^1.6.9",
|
|
28
28
|
"tty-table": "^5.0.0",
|
|
29
29
|
"write-file-atomic": "^8.0.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@eslint/compat": "2.1.1",
|
|
33
32
|
"@oclif/prettier-config": "^0.2.1",
|
|
34
33
|
"@stryker-mutator/core": "^10.0.0",
|
|
35
34
|
"@stryker-mutator/vitest-runner": "^10.0.0",
|
|
36
|
-
"@types/node": "26.
|
|
35
|
+
"@types/node": "26.6.4",
|
|
37
36
|
"@types/write-file-atomic": "^4.0.3",
|
|
38
37
|
"@vitest/coverage-v8": "^4.1.11",
|
|
39
|
-
"eslint": "^
|
|
40
|
-
"eslint
|
|
38
|
+
"@vitest/eslint-plugin": "^1.6.27",
|
|
39
|
+
"eslint": "^10.12.0",
|
|
40
|
+
"eslint-config-oclif": "^7.1.8",
|
|
41
41
|
"eslint-config-prettier": "^10",
|
|
42
|
-
"eslint-plugin-sonarjs": "^4.2.
|
|
42
|
+
"eslint-plugin-sonarjs": "^4.2.2",
|
|
43
43
|
"json-schema-to-typescript": "^16.0.0",
|
|
44
|
-
"oclif": "^
|
|
45
|
-
"prettier": "3.9.
|
|
44
|
+
"oclif": "^6.0.2",
|
|
45
|
+
"prettier": "3.9.9",
|
|
46
46
|
"shx": "^0.4.0",
|
|
47
47
|
"ts-node": "10.9.2",
|
|
48
|
-
"tsx": "4.23.
|
|
48
|
+
"tsx": "4.23.15",
|
|
49
49
|
"typescript": "^6.0.3",
|
|
50
|
-
"vitest": "^
|
|
50
|
+
"vitest": "^5.0.3"
|
|
51
51
|
},
|
|
52
52
|
"engines": {
|
|
53
53
|
"node": ">=22.0.0"
|
|
@@ -119,9 +119,15 @@
|
|
|
119
119
|
"description": "Manage WordPress code snippets"
|
|
120
120
|
},
|
|
121
121
|
"theme": {
|
|
122
|
-
"description": "Manage
|
|
122
|
+
"description": "Manage everything theme related: versions, block templates and parts, Global Styles (never switches the active theme)"
|
|
123
123
|
},
|
|
124
|
-
"theme
|
|
124
|
+
"theme:template": {
|
|
125
|
+
"description": "Manage block templates and template parts, written as the files of the <parent>-loopress child theme"
|
|
126
|
+
},
|
|
127
|
+
"theme:version": {
|
|
128
|
+
"description": "Manage WordPress.org themes tracked in loopress.json (versions only)"
|
|
129
|
+
},
|
|
130
|
+
"theme:style": {
|
|
125
131
|
"description": "Manage the active block theme's Global Styles customizations (Site Editor > Styles: colors, typography, spacing)"
|
|
126
132
|
},
|
|
127
133
|
"telemetry": {
|
|
@@ -148,6 +154,7 @@
|
|
|
148
154
|
"posttest": "pnpm run lint",
|
|
149
155
|
"schema:types": "tsx scripts/generate-config-types.ts",
|
|
150
156
|
"test": "vitest run",
|
|
157
|
+
"typecheck:test": "tsc -p test/tsconfig.json",
|
|
151
158
|
"pretest:mutation": "pnpm run schema:types",
|
|
152
159
|
"test:mutation": "stryker run",
|
|
153
160
|
"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
|
-
});
|