Skip to content

Commit 7573a07

Browse files
committed
chore: Prep stable release
1 parent 63ac38c commit 7573a07

5 files changed

Lines changed: 51 additions & 28 deletions

File tree

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,17 @@ npm run build
6666
npm run develop
6767
```
6868

69-
The **Config Sync** plugin should appear in the **Plugins** section of Strapi sidebar after you run app again.
69+
The **Config Sync** plugin should now appear in the **Settings** section of your Strapi app.
70+
71+
To start tracking your config changes you have to make the first export. This will dump all your configuration data to the `/config/sync` directory. To export, run:
72+
73+
```bash
74+
# using yarn
75+
yarn config-sync export
76+
77+
# using npm
78+
npm run config-sync export
79+
```
7080

7181
Enjoy 🎉
7282

@@ -76,7 +86,7 @@ Complete installation requirements are the exact same as for Strapi itself and c
7686

7787
**Supported Strapi versions**:
7888

79-
- Strapi 4.0.7 (recently tested)
89+
- Strapi 4.1.5 (recently tested)
8090
- Strapi ^4.x (use `strapi-plugin-config-sync@^1.0.0`)
8191
- Strapi ^3.4.x (use `strapi-plugin-config-sync@0.1.6`)
8292

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "strapi-plugin-config-sync",
33
"version": "1.0.0-beta.8",
4-
"description": "CLI & GUI for syncing config data across environments.",
4+
"description": "Migrate your config data across environments using the CLI or Strapi admin panel.",
55
"strapi": {
66
"displayName": "Config Sync",
77
"name": "config-sync",
88
"icon": "sync",
9-
"description": "CLI & GUI for syncing config data across environments.",
9+
"description": "Migrate your config data across environments using the CLI or Strapi admin panel.",
1010
"required": false,
1111
"kind": "plugin"
1212
},
@@ -57,10 +57,10 @@
5757
},
5858
"devDependencies": {
5959
"@fortawesome/react-fontawesome": "^0.1.16",
60-
"@strapi/design-system": "^0.0.1-alpha.75",
61-
"@strapi/helper-plugin": "^4.0.7",
62-
"@strapi/icons": "^0.0.1-alpha.75",
63-
"@strapi/utils": "^4.0.7",
60+
"@strapi/design-system": "^0.0.1-alpha.79",
61+
"@strapi/helper-plugin": "^4.1.5",
62+
"@strapi/icons": "^0.0.1-alpha.79",
63+
"@strapi/utils": "^4.1.5",
6464
"babel-eslint": "9.0.0",
6565
"eslint": "^7.32.0",
6666
"eslint-config-airbnb": "^18.2.1",

playground/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
"jest-cli": "^26.0.1"
1616
},
1717
"dependencies": {
18-
"@strapi/plugin-i18n": "^4.0.2",
19-
"@strapi/plugin-users-permissions": "^4.0.2",
20-
"@strapi/strapi": "^4.0.2",
18+
"@strapi/plugin-i18n": "^4.0.0",
19+
"@strapi/plugin-users-permissions": "^4.0.0",
20+
"@strapi/strapi": "^4.0.0",
2121
"sqlite3": "5.0.2",
2222
"strapi-plugin-config-sync": "boazpoolman/strapi-plugin-config-sync"
2323
},

server/cli.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env node
22

3+
const fs = require('fs');
34
const { Command } = require('commander');
45
const Table = require('cli-table');
56
const chalk = require('chalk');
@@ -68,6 +69,14 @@ const getConfigState = (diff, configName, syncType) => {
6869

6970
const handleAction = async (syncType, skipConfirm, configType, partials) => {
7071
const app = await strapi().load();
72+
const hasSyncDir = fs.existsSync(app.config.get('plugin.config-sync.syncDir'));
73+
74+
// No import with empty sync dir.
75+
if (!hasSyncDir && syncType === 'import') {
76+
console.log(`${chalk.yellow.bold('[warning]')} You can't import an empty sync directory. Please export before continuing.`);
77+
process.exit(0);
78+
}
79+
7180
const diff = await app.plugin('config-sync').service('main').getFormattedDiff();
7281

7382
// No changes.
@@ -109,7 +118,9 @@ const handleAction = async (syncType, skipConfirm, configType, partials) => {
109118
});
110119

111120
// Print table.
112-
console.log(table.toString(), '\n');
121+
if (hasSyncDir) {
122+
console.log(table.toString(), '\n');
123+
}
113124

114125
// Prompt to confirm.
115126
let answer = {};

yarn.lock

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -814,19 +814,19 @@
814814
dependencies:
815815
"@sinonjs/commons" "^1.7.0"
816816

817-
"@strapi/design-system@^0.0.1-alpha.75":
818-
version "0.0.1-alpha.75"
819-
resolved "https://registry.yarnpkg.com/@strapi/design-system/-/design-system-0.0.1-alpha.75.tgz#8a06eb07a0d25791a93537578387e401dff116d2"
820-
integrity sha512-JSIRFCiAOtTbjMDIa/KULSkfyPP/mphBhJDdeBx8bLNDKhU0SX3/zSXghjMWQ48aHvmyWTfwm8SVdw6EolzpIQ==
817+
"@strapi/design-system@^0.0.1-alpha.79":
818+
version "0.0.1-alpha.79"
819+
resolved "https://registry.yarnpkg.com/@strapi/design-system/-/design-system-0.0.1-alpha.79.tgz#23e6a7f73383b72148c926fa74ed0ba1acc32f0a"
820+
integrity sha512-o/F55Qjwao1HkqKcL8ovQ280QijJH8dLfzP+t3XMNL5Ihh3HBD2wcMS6dOsrnNDGdDE0LWQfG8bDbLPmWHmk1A==
821821
dependencies:
822822
"@internationalized/number" "^3.0.2"
823823
compute-scroll-into-view "^1.0.17"
824824
prop-types "^15.7.2"
825825

826-
"@strapi/helper-plugin@^4.0.7":
827-
version "4.0.7"
828-
resolved "https://registry.yarnpkg.com/@strapi/helper-plugin/-/helper-plugin-4.0.7.tgz#5eb91e0faf4496769ad5a2bd90a06be58f1840d2"
829-
integrity sha512-0rFjdr7ZBi7P//dD56eL3LEaA2bQ9+ooqqYz9v9hMm9NCWJm8j7ybKUghLpoIUca48DKGItb9ap2BDt0CYKSAw==
826+
"@strapi/helper-plugin@^4.1.5":
827+
version "4.1.5"
828+
resolved "https://registry.yarnpkg.com/@strapi/helper-plugin/-/helper-plugin-4.1.5.tgz#f6032b38af88a02d64552cbb48ca382bc48c5288"
829+
integrity sha512-Pog53h0W+dgA+QjZpcrPgtt+hkBcRx9LYJ/CAW+BMCtqnqP0qcqQFtP5xPPxSJCkkmPX4GJT3XRWJUnjdPEq/A==
830830
dependencies:
831831
"@fortawesome/fontawesome-free" "^5.15.2"
832832
"@fortawesome/fontawesome-svg-core" "^1.2.35"
@@ -850,15 +850,17 @@
850850
styled-components "^5.2.3"
851851
whatwg-fetch "^3.6.2"
852852

853-
"@strapi/icons@^0.0.1-alpha.75":
854-
version "0.0.1-alpha.75"
855-
resolved "https://registry.yarnpkg.com/@strapi/icons/-/icons-0.0.1-alpha.75.tgz#12a38c2c921cedc26f5bd8c3aa91c5b82246c066"
856-
integrity sha512-h9ZlIPVg95+WaBsXEthKSw9eZQ/VsuuZE5aad/4Cx0NBEUyQl+0h5Z/JqIUSNMX4KMyJJjo9Ad4FGUyOLNHLmw==
853+
"@strapi/icons@^0.0.1-alpha.79":
854+
version "0.0.1-alpha.79"
855+
resolved "https://registry.yarnpkg.com/@strapi/icons/-/icons-0.0.1-alpha.79.tgz#eff8790ea3897419489a61cbfd72a436661d1420"
856+
integrity sha512-mIPzpwOir92939rSRuRS22GLWFpLfQDyoK0vMZUsGD7uujNnRon//TUa9DJTjTHjdEjRwWO60JbJOePgJ+2cvg==
857+
dependencies:
858+
rimraf "^3.0.2"
857859

858-
"@strapi/utils@^4.0.7":
859-
version "4.0.7"
860-
resolved "https://registry.yarnpkg.com/@strapi/utils/-/utils-4.0.7.tgz#718823fcf23c028a65ce8c317a36cc6d7321eb0c"
861-
integrity sha512-coGjVudsnlXvb20mobyeoguCfXKnLjXnKhYiMoS6wqy4ozazu12+5MsCh7Hs9UAkvK4Fzhf7+urvyoj/UpSkaQ==
860+
"@strapi/utils@^4.1.5":
861+
version "4.1.5"
862+
resolved "https://registry.yarnpkg.com/@strapi/utils/-/utils-4.1.5.tgz#3e80f59476cab470ba0fdb42a075b5ae47e998f2"
863+
integrity sha512-Oz7ur7TsoqA4IOPdk6H3YwsVZ+FOi9wp+iRReKao8yfo4YKJjSYlHQlNXUaAqOOlFnT0ol7G3KF+uF8jLcfxDA==
862864
dependencies:
863865
"@sindresorhus/slugify" "1.1.0"
864866
date-fns "2.24.0"

0 commit comments

Comments
 (0)