@caweb/cli 1.3.15 → 1.3.17
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 +2 -1
- package/docs/CREDITS.MD +27 -0
- package/docs/ISSUES.MD +7 -0
- package/docs/OVERRIDES.md +53 -0
- package/docs/ROADMAP.MD +19 -0
- package/docs/SYNC.MD +29 -0
- package/docs/tool/index.js +45 -0
- package/package.json +15 -15
- package/template/index.cjs +2 -5
package/README.md
CHANGED
|
@@ -195,5 +195,6 @@ Arguments:
|
|
|
195
195
|
|
|
196
196
|
Options:
|
|
197
197
|
-h, --help display help for command
|
|
198
|
-
-
|
|
198
|
+
-i, --include [include...] IDs to of taxonomies to include. Omitting this option will sync all items for given taxonomy.
|
|
199
|
+
-t, --tax [tax...] Taxonomy that should be synced. Omitting this option will sync the full site. (choices: "pages", "posts", "media", "menus")
|
|
199
200
|
</pre>
|
package/docs/CREDITS.MD
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Sources
|
|
2
|
+
### <ins>Design System Components</ins>
|
|
3
|
+
[Github](https://github.com/cagov/design-system/tree/main/components)
|
|
4
|
+
[NPM Packages](https://www.npmjs.com/search?q=%40cagov)
|
|
5
|
+
|
|
6
|
+
### <ins>docker-compose</ins>
|
|
7
|
+
[Documentation](https://pdmlab.github.io/docker-compose/)
|
|
8
|
+
[Github](https://github.com/PDMLab/docker-compose)
|
|
9
|
+
[NPM Package](https://www.npmjs.com/package/docker-compose)
|
|
10
|
+
|
|
11
|
+
### <ins>wp-env</ins>
|
|
12
|
+
[Documentation](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-env/)
|
|
13
|
+
[Github](https://github.com/WordPress/gutenberg/tree/HEAD/packages/env)
|
|
14
|
+
[NPM Package](https://www.npmjs.com/package/@wordpress/env)
|
|
15
|
+
|
|
16
|
+
### <ins>create-block</ins>
|
|
17
|
+
[Block API](https://developer.wordpress.org/block-editor/reference-guides/block-api/)
|
|
18
|
+
[Documentation](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-create-block/)
|
|
19
|
+
[External Project Templates](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-create-block/packages-create-block-external-template/)
|
|
20
|
+
[NPM Package](https://www.npmjs.com/package/@wordpress/create-block)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### <ins>wp cli</ins>
|
|
24
|
+
[Documentation](https://developer.wordpress.org/cli/commands/)
|
|
25
|
+
|
|
26
|
+
### <ins>phpMyAdmin</ins>
|
|
27
|
+
[Docker](https://hub.docker.com/_/phpmyadmin)
|
package/docs/ISSUES.MD
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Known Issues
|
|
2
|
+
[[Bug](https://github.com/npm/cli/issues/3136)] Arguments are not correctly passed from CLI to npm script (npm 7, Windows, Powershell)
|
|
3
|
+
- Workaround - If using < Node 20, add an additional `--` when passing arguments
|
|
4
|
+
-- Example run
|
|
5
|
+
`npm run caweb start -- -- --multisite`
|
|
6
|
+
instead of
|
|
7
|
+
`npm run caweb start -- --multisite`
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
## [.wp-env.override.json](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-env/#wp-env-override-json)
|
|
2
|
+
Any fields here will take precedence over .wp-env.json.
|
|
3
|
+
## <ins>Special Config Values</ins>
|
|
4
|
+
### <ins>CAWeb Options</ins>
|
|
5
|
+
`CAWEB_TEMPLATE_VER` - Updates CAWeb State Template Version
|
|
6
|
+
`CAWEB_NAV_MENU_STYLE` - Updates CAWeb Header Menu Type
|
|
7
|
+
`CAWEB_COLORSCHEME` - Updates CAWeb Color Scheme
|
|
8
|
+
`CAWEB_TITLE_DISPLAY` - Updates CAWeb Title Display Default
|
|
9
|
+
`CAWEB_STICKY_NAV` - Updates CAWeb Sticky Navigation
|
|
10
|
+
`CAWEB_MENU_HOME_LINK` - Updates CAWeb Menu Home Link
|
|
11
|
+
`CAWEB_DISPLAY_POSTS_DATE` - Updates CAWeb Display Date for Non-Divi Posts
|
|
12
|
+
`CAWEB_X_UA_COMPATIBILITY` - Updates CAWeb Legacy Browser Support
|
|
13
|
+
`CAWEB_FRONTPAGE_SEARCH` - Updates CAWeb Show Search on Front Page
|
|
14
|
+
`CAWEB_CONTACT_US_PAGE` - Updates CAWeb Contact Us Page
|
|
15
|
+
`CAWEB_GEO_LOCATOR` - Updates CAWeb Enable Geo Locator
|
|
16
|
+
`CAWEB_UTILITY_HOME_LINK` - Updates CAWeb Home Link
|
|
17
|
+
`CAWEB_UTILITY_LINK1_ENABLED` - Updates CAWeb Custom Link 1
|
|
18
|
+
`CAWEB_UTILITY_LINK1_LABEL` - Updates CAWeb Custom Link 1 Label
|
|
19
|
+
`CAWEB_UTILITY_LINK1_URL` - Updates CAWeb Custom Link 1 URL
|
|
20
|
+
`CAWEB_UTILITY_LINK1_NEW_WINDOW` - Updates CAWeb Custom Link 1 Open in New Tab
|
|
21
|
+
`CAWEB_UTILITY_LINK2_ENABLED` - Updates CAWeb Custom Link 2
|
|
22
|
+
`CAWEB_UTILITY_LINK2_LABEL` - Updates CAWeb Custom Link 2 Label
|
|
23
|
+
`CAWEB_UTILITY_LINK2_URL` - Updates CAWeb Custom Link 2 URL
|
|
24
|
+
`CAWEB_UTILITY_LINK2_NEW_WINDOW` - Updates CAWeb Custom Link 2 Open in New Tab
|
|
25
|
+
`CAWEB_UTILITY_LINK3_ENABLED` - Updates CAWeb Custom Link 3
|
|
26
|
+
`CAWEB_UTILITY_LINK3_LABEL` - Updates CAWeb Custom Link 3 Label
|
|
27
|
+
`CAWEB_UTILITY_LINK3_URL` - Updates CAWeb Custom Link 3 URL
|
|
28
|
+
`CAWEB_UTILITY_LINK3_NEW_WINDOW` - Updates CAWeb Custom Link 3 Open in New Tab
|
|
29
|
+
`CAWEB_CAWEB_ORG_LOGO_ALT_TEXT` - Updates CAWeb Organization Logo-Alt Text
|
|
30
|
+
`CAWEB_GOOGLE_SEARCH_ENGINE_ID` - Updates CAWeb Search Engine ID
|
|
31
|
+
`CAWEB_GOOGLE_ANALYTICS_ID` - Updates CAWeb Analytics ID
|
|
32
|
+
`CAWEB_GOOGLE_ANALYTICS4_ID` - Updates CAWeb Analytics 4 ID
|
|
33
|
+
`CAWEB_GOOGLE_TAG_MANAGER_ID` - Updates CAWeb Tag Manager ID
|
|
34
|
+
`CAWEB_GOOGLE_META_ID` - Updates CAWeb Site Verification Meta ID
|
|
35
|
+
`CAWEB_GOOGLE_TRANSLATE_MODE` - Updates CAWeb Enable Google Translate
|
|
36
|
+
`CAWEB_GOOGLE_TRANSLATE_PAGE` - Updates CAWeb Translate Page
|
|
37
|
+
`CAWEB_GOOGLE_TRANSLATE_PAGE_NEW_WINDOW` - Updates CAWeb Open in New Tab
|
|
38
|
+
`CAWEB_GOOGLE_TRANSLATE_ICON` - Updates CAWeb Icon
|
|
39
|
+
`CAWEB_PRIVATE_REPO` - Updates CAWeb Is Private?
|
|
40
|
+
`CAWEB_GIT_USER` - Updates CAWeb Username
|
|
41
|
+
`CAWEB_ACCESS_TOKEN` - Updates CAWeb Token
|
|
42
|
+
### <ins>Divi Options</ins>
|
|
43
|
+
`ET_DYNAMIC_MODULE` - Updates CAWeb Dynamic Module Framework
|
|
44
|
+
`ET_DYNAMIC_CSS` - Updates CAWeb Dynamic CSS
|
|
45
|
+
`ET_CRITICAL_CSS` - Updates CAWeb Critical CSS
|
|
46
|
+
`ET_DYNAMIC_JS` - Updates CAWeb Dynamic JavaScript Libraries
|
|
47
|
+
`ET_CLASSIC_EDITOR` - Updates CAWeb Enable Classic Editor
|
|
48
|
+
`ET_STATIC_CSS_GENERATION` - Updates CAWeb Static CSS File Generation
|
|
49
|
+
`ET_PRODUCT_TOUR` - Updates CAWeb Product Tour
|
|
50
|
+
`ET_NEW_BUILDER_EXPERIENCE` - Updates CAWeb Enable The Latest Divi Builder Experience
|
|
51
|
+
`ET_OUTPUT_STYLES_INLINE` - Updates CAWeb Output Styles Inline
|
|
52
|
+
`ET_USERNAME` - Updates CAWeb Username
|
|
53
|
+
`ET_API_KEY` - Updates CAWeb API Key
|
package/docs/ROADMAP.MD
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Roadmap Features:
|
|
2
|
+
|
|
3
|
+
## Testaro
|
|
4
|
+
https://www.npmjs.com/package/testaro
|
|
5
|
+
|
|
6
|
+
## Sonarqube Scanner
|
|
7
|
+
https://www.npmjs.com/package/sonarqube-scanner
|
|
8
|
+
|
|
9
|
+
## BrowserStack
|
|
10
|
+
https://www.npmjs.com/package/browserstack
|
|
11
|
+
|
|
12
|
+
## Accessibility Checker
|
|
13
|
+
https://www.npmjs.com/package/accessibility-checker
|
|
14
|
+
|
|
15
|
+
## Control Panel
|
|
16
|
+
https://aapanel.com/new/download.html
|
|
17
|
+
|
|
18
|
+
## SNYK
|
|
19
|
+
https://www.npmjs.com/package/snyk
|
package/docs/SYNC.MD
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# caweb.json Configuration
|
|
2
|
+
Under the `sync` property you can list the various WordPress Instances. Each Instance, requires a WordPress Username, Application Password and the Site URL.
|
|
3
|
+
|
|
4
|
+
Sync Example Command:
|
|
5
|
+
Using the example, if you wanted to sync all the changes from the dev instance to your local instance.
|
|
6
|
+
`caweb sync dev local`
|
|
7
|
+
|
|
8
|
+
Sync Configuration Example:
|
|
9
|
+
<pre>
|
|
10
|
+
{
|
|
11
|
+
"sync": {
|
|
12
|
+
"local": {
|
|
13
|
+
"user": "<Username>",
|
|
14
|
+
"pwd": "<a href="https://developer.wordpress.org/rest-api/using-the-rest-api/authentication/#basic-authentication-with-application-passwords">Application Password</a>",
|
|
15
|
+
"url": "http://example1.com"
|
|
16
|
+
},
|
|
17
|
+
"dev": {
|
|
18
|
+
"user": "<Username>",
|
|
19
|
+
"pwd": "<a href="https://developer.wordpress.org/rest-api/using-the-rest-api/authentication/#basic-authentication-with-application-passwords">Application Password</a>",
|
|
20
|
+
"url": "http://example2.com"
|
|
21
|
+
},
|
|
22
|
+
"test": {
|
|
23
|
+
"user": "<Username>",
|
|
24
|
+
"pwd": "<a href="https://developer.wordpress.org/rest-api/using-the-rest-api/authentication/#basic-authentication-with-application-passwords">Application Password</a>",
|
|
25
|
+
"url": "http://example3.com"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
</pre>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* External dependencies
|
|
6
|
+
*/
|
|
7
|
+
import path from 'node:path';
|
|
8
|
+
import fs from 'fs-extra';
|
|
9
|
+
|
|
10
|
+
import { CAWEB_OPTIONS, DIVI_OPTIONS } from '../../lib/options.js';
|
|
11
|
+
|
|
12
|
+
generateOverridesMD()
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Generates the OVERRIDES.MD
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
export default async function generateOverridesMD() {
|
|
19
|
+
|
|
20
|
+
let output = [
|
|
21
|
+
'## [.wp-env.override.json](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-env/#wp-env-override-json)',
|
|
22
|
+
'Any fields here will take precedence over .wp-env.json.',
|
|
23
|
+
'## <ins>Special Config Values</ins>',
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
// Generate CAWeb Options overrides.
|
|
27
|
+
output.push('### <ins>CAWeb Options</ins>');
|
|
28
|
+
for (const [key, option] of Object.entries(CAWEB_OPTIONS)) {
|
|
29
|
+
output.push(`\`${key}\` - Updates CAWeb ${option.label} `);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Generate Divi Options overrides.
|
|
33
|
+
output.push('### <ins>Divi Options</ins>');
|
|
34
|
+
for (const [group, options] of Object.entries(DIVI_OPTIONS)) {
|
|
35
|
+
for (const [key, option] of Object.entries(options)) {
|
|
36
|
+
output.push(`\`${key}\` - Updates CAWeb ${option.label} `);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
fs.writeFileSync(
|
|
41
|
+
path.join(process.cwd(), 'docs', 'OVERRIDES.MD'),
|
|
42
|
+
output.join('\n')
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@caweb/cli",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.17",
|
|
4
4
|
"description": "CAWebPublishing Command Line Interface.",
|
|
5
5
|
"exports": "./lib/env.js",
|
|
6
6
|
"type": "module",
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
"caweb": "bin/caweb.js"
|
|
12
12
|
},
|
|
13
13
|
"files": [
|
|
14
|
-
"assets",
|
|
15
14
|
"bin",
|
|
16
15
|
"commands",
|
|
17
16
|
"configs",
|
|
17
|
+
"docs",
|
|
18
18
|
"gen",
|
|
19
19
|
"lib",
|
|
20
20
|
"template"
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
"scripts": {
|
|
23
23
|
"test": "echo \"Error: run tests from root\" && exit 0"
|
|
24
24
|
},
|
|
25
|
-
"homepage": "https://github.com/CAWebPublishing/
|
|
25
|
+
"homepage": "https://github.com/CAWebPublishing/cli#readme",
|
|
26
26
|
"repository": {
|
|
27
27
|
"type": "git",
|
|
28
|
-
"url": "git+https://github.com/CAWebPublishing/
|
|
28
|
+
"url": "git+https://github.com/CAWebPublishing/cli.git"
|
|
29
29
|
},
|
|
30
30
|
"bugs": {
|
|
31
|
-
"url": "https://github.com/CAWebPublishing/
|
|
31
|
+
"url": "https://github.com/CAWebPublishing/cli/issues"
|
|
32
32
|
},
|
|
33
33
|
"keywords": [
|
|
34
34
|
"caweb",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
40
|
"config": {
|
|
41
|
-
"WP_VER": "6.
|
|
41
|
+
"WP_VER": "6.5.3",
|
|
42
42
|
"PHP_VER": "8.1",
|
|
43
43
|
"DEFAULTS": {
|
|
44
44
|
"FS_METHOD": "direct",
|
|
@@ -56,27 +56,27 @@
|
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@wordpress/create-block": "^4.
|
|
60
|
-
"@wordpress/env": "^9.
|
|
61
|
-
"@wordpress/scripts": "^27.
|
|
62
|
-
"accessibility-checker": "^3.1.
|
|
59
|
+
"@wordpress/create-block": "^4.41.0",
|
|
60
|
+
"@wordpress/env": "^9.9.0",
|
|
61
|
+
"@wordpress/scripts": "^27.8.0",
|
|
62
|
+
"accessibility-checker": "^3.1.71",
|
|
63
63
|
"autoprefixer": "^10.4.19",
|
|
64
64
|
"axios": "^1.6.8",
|
|
65
|
-
"axios-retry": "^4.
|
|
65
|
+
"axios-retry": "^4.2.0",
|
|
66
66
|
"chalk": "^5.3.0",
|
|
67
67
|
"commander": "^12.0.0",
|
|
68
68
|
"cross-spawn": "^7.0.3",
|
|
69
|
-
"css-loader": "^
|
|
70
|
-
"docker-compose": "^0.24.
|
|
69
|
+
"css-loader": "^7.1.1",
|
|
70
|
+
"docker-compose": "^0.24.8",
|
|
71
71
|
"fs-extra": "^11.2.0",
|
|
72
72
|
"handlebars-loader": "^1.7.3",
|
|
73
73
|
"html-to-json-parser": "^2.0.1",
|
|
74
74
|
"html-webpack-plugin": "^5.6.0",
|
|
75
|
-
"mini-css-extract-plugin": "^2.
|
|
75
|
+
"mini-css-extract-plugin": "^2.9.0",
|
|
76
76
|
"ora": "^8.0.1",
|
|
77
77
|
"postcss-loader": "^8.1.1",
|
|
78
78
|
"resolve-bin": "^1.0.1",
|
|
79
|
-
"sass-loader": "^14.
|
|
79
|
+
"sass-loader": "^14.2.1",
|
|
80
80
|
"terminal-link": "^3.0.0",
|
|
81
81
|
"url": "^0.11.3",
|
|
82
82
|
"webpack": "^5.91.0"
|
package/template/index.cjs
CHANGED
|
@@ -2,18 +2,17 @@
|
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
4
|
const { join } = require( 'path' );
|
|
5
|
-
const { capitalCase } = require( 'change-case' );
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* Internal dependencies
|
|
9
8
|
*/
|
|
10
9
|
const blockSlug = process.argv[ 2 ];
|
|
11
|
-
const blockSlugTitle =
|
|
10
|
+
const blockSlugTitle = blockSlug.charAt(0).toUpperCase() + blockSlug.substring(1);
|
|
12
11
|
|
|
13
12
|
const customScripts = {};
|
|
14
13
|
|
|
15
14
|
const npmDependencies = [
|
|
16
|
-
'@wordpress/icons@9.
|
|
15
|
+
'@wordpress/icons@9.46.0'
|
|
17
16
|
];
|
|
18
17
|
|
|
19
18
|
const npmDevDependencies = [
|
|
@@ -45,8 +44,6 @@ module.exports = {
|
|
|
45
44
|
customScripts: customScripts,
|
|
46
45
|
npmDependencies: npmDependencies,
|
|
47
46
|
npmDevDependencies: npmDevDependencies,
|
|
48
|
-
},
|
|
49
|
-
customBlockJSON: {
|
|
50
47
|
viewScript: "file:./frontend.js",
|
|
51
48
|
render: "file:./render.php"
|
|
52
49
|
}
|