@appdirect/sfb-toolkit 3.0.5 → 4.0.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 (66) hide show
  1. package/.babelrc +8 -13
  2. package/Dockerfile +2 -2
  3. package/bin/index.js +0 -14
  4. package/coverage/clover.xml +32 -32
  5. package/coverage/coverage-final.json +10 -10
  6. package/coverage/lcov-report/block-navigation.js +8 -0
  7. package/coverage/lcov-report/constants/customUserAttributesMock.js.html +8 -3
  8. package/coverage/lcov-report/constants/index.html +8 -3
  9. package/coverage/lcov-report/constants/pageUrls.js.html +8 -3
  10. package/coverage/lcov-report/constants/userMock.js.html +8 -3
  11. package/coverage/lcov-report/controllers/controllers-utils/assetsUtils.js.html +8 -3
  12. package/coverage/lcov-report/controllers/controllers-utils/index.html +8 -3
  13. package/coverage/lcov-report/controllers/data-filters/bootstrap-data-filter.js.html +9 -4
  14. package/coverage/lcov-report/controllers/data-filters/call-to-actions-filter.js.html +8 -3
  15. package/coverage/lcov-report/controllers/data-filters/index.html +12 -7
  16. package/coverage/lcov-report/controllers/index.html +8 -3
  17. package/coverage/lcov-report/controllers/index.js.html +11 -6
  18. package/coverage/lcov-report/favicon.png +0 -0
  19. package/coverage/lcov-report/front-end-utils/src/components/base/ResultItem.js.html +18 -13
  20. package/coverage/lcov-report/front-end-utils/src/components/base/SearchBar.js.html +11 -6
  21. package/coverage/lcov-report/front-end-utils/src/components/base/index.html +13 -8
  22. package/coverage/lcov-report/front-end-utils/src/components/base/item.js.html +19 -14
  23. package/coverage/lcov-report/front-end-utils/src/components/container.js.html +11 -6
  24. package/coverage/lcov-report/front-end-utils/src/components/data-view.js.html +10 -5
  25. package/coverage/lcov-report/front-end-utils/src/components/header-view.js.html +10 -5
  26. package/coverage/lcov-report/front-end-utils/src/components/index.html +17 -12
  27. package/coverage/lcov-report/front-end-utils/src/components/search.js.html +23 -18
  28. package/coverage/lcov-report/front-end-utils/src/constants/index.html +8 -3
  29. package/coverage/lcov-report/front-end-utils/src/constants/pageUrl.js.html +8 -3
  30. package/coverage/lcov-report/front-end-utils/src/constants/roleType.js.html +8 -3
  31. package/coverage/lcov-report/front-end-utils/src/constants/searchType.js.html +8 -3
  32. package/coverage/lcov-report/front-end-utils/src/utils/debounce.js.html +8 -3
  33. package/coverage/lcov-report/front-end-utils/src/utils/index.html +8 -3
  34. package/coverage/lcov-report/index.html +18 -13
  35. package/coverage/lcov-report/middlewares/config.js.html +8 -3
  36. package/coverage/lcov-report/middlewares/index.html +8 -3
  37. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  38. package/coverage/lcov-report/sorter.js +26 -0
  39. package/coverage/lcov.info +81 -81
  40. package/index.js +14 -8
  41. package/npm-shrinkwrap.json +34576 -7042
  42. package/package.json +99 -80
  43. package/readme.md +18 -6
  44. package/src/controllers/index.js +1 -1
  45. package/src/front-end-utils/dist/toolbar.bundle.js +2 -49
  46. package/src/front-end-utils/dist/toolbar.bundle.js.LICENSE.txt +52 -0
  47. package/src/front-end-utils/src/components/base/ResultItem.js +2 -2
  48. package/src/front-end-utils/src/components/base/SearchBar.js +1 -1
  49. package/src/front-end-utils/src/components/container.js +1 -1
  50. package/src/front-end-utils/src/components/data-view.js +1 -1
  51. package/src/front-end-utils/src/components/header-view.js +1 -1
  52. package/src/front-end-utils/src/components/search.js +1 -1
  53. package/src/tools/compiler-components-prod.js +1 -1
  54. package/src/tools/gulp-tasks.js +2 -2
  55. package/src/tools/toolkit-common-fun.js +88 -4
  56. package/src/tools/toolkit-common-vars.js +1 -1
  57. package/src/tools/toolkit-components.js +11 -5
  58. package/src/tools/toolkit-create.js +19 -2
  59. package/src/tools/toolkit-install.js +20 -2
  60. package/src/tools/toolkit-package.js +4 -3
  61. package/src/tools/toolkit-setup.js +41 -7
  62. package/src/tools/toolkit-storybook.js +5 -5
  63. package/{webpack-components.config.js → webpack-components.config.cjs} +1 -3
  64. package/{webpack-components.config.prod.js → webpack-components.config.prod.cjs} +1 -3
  65. package/{webpack.config.js → webpack.config.cjs} +8 -5
  66. package/src/tools/toolkit-tests.js +0 -99
package/package.json CHANGED
@@ -1,30 +1,39 @@
1
1
  {
2
2
  "name": "@appdirect/sfb-toolkit",
3
- "version": "3.0.5",
3
+ "version": "4.0.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
7
7
  "sfb-toolkit": "./bin/index.js"
8
8
  },
9
9
  "jest": {
10
+ "testEnvironment": "jsdom",
10
11
  "setupFilesAfterEnv": [
11
12
  "./src/tests/__mocks__/setupTests.js"
12
13
  ],
13
14
  "setupFiles": [
14
15
  "./src/tests/__mocks__/localstorage.js"
15
16
  ],
16
- "testURL": "http://localhost",
17
+ "testEnvironmentOptions": {
18
+ "url": "http://localhost"
19
+ },
17
20
  "testMatch": [
18
21
  "**/src/tests/**/*test.js?(x)"
19
22
  ],
20
23
  "transform": {
21
24
  "^.+\\.js?$": "babel-jest"
25
+ },
26
+ "transformIgnorePatterns": [
27
+ "/node_modules/(?!(react-syntax-highlighter)/)"
28
+ ],
29
+ "globals": {
30
+ "window": {}
22
31
  }
23
32
  },
24
33
  "license": "SEE LICENSE IN https://help.appdirect.com/sfb-eula.pdf",
25
34
  "scripts": {
26
35
  "test": "jest --coverage",
27
- "buildToolbar": "webpack --config ./webpack.config.js --mode production",
36
+ "buildToolbar": "webpack --config ./webpack.config.cjs --mode production",
28
37
  "dev": "RUN_ENV=dev concurrently \"npm run watchCSS\" \"npm run devserver\"",
29
38
  "start": "RUN_ENV=test concurrently \"npm run watchCSS\" \"npm run devserver\"",
30
39
  "devserver": "nodemon ./index.js",
@@ -46,93 +55,103 @@
46
55
  "name": "appdirect/sfb-toolkit"
47
56
  },
48
57
  "dependencies": {
49
- "@appdirect/sfb-theme-classic": "0.0.21",
50
- "@appdirect/sfb-theme-plaza": "0.0.53",
51
- "@babel/core": "^7.4.4",
52
- "@babel/plugin-proposal-class-properties": "^7.4.4",
53
- "@babel/plugin-transform-runtime": "^7.14.3",
54
- "@babel/preset-env": "^7.4.4",
55
- "@babel/preset-react": "^7.0.0",
58
+ "@appdirect/sfb-theme-classic": "0.0.25",
59
+ "@appdirect/sfb-theme-plaza": "0.0.56",
60
+ "@babel/core": "^7.19.1",
61
+ "@babel/plugin-proposal-class-properties": "^7.18.6",
62
+ "@babel/plugin-transform-runtime": "^7.19.1",
63
+ "@babel/preset-env": "^7.19.1",
64
+ "@babel/preset-react": "^7.18.6",
65
+ "@babel/runtime": "^7.19.0",
56
66
  "@fortawesome/fontawesome": "^1.1.8",
57
- "@fortawesome/free-solid-svg-icons": "^5.15.3",
58
- "@fortawesome/react-fontawesome": "0.0.20",
59
- "app-root-path": "^2.0.1",
60
- "archiver": "^2.1.1",
61
- "axios": "^0.18.0",
62
- "babel-loader": "^8.0.5",
63
- "babel-preset-minify": "^0.5.0",
64
- "body-parser": "^1.18.2",
65
- "cheerio": "^1.0.0-rc.2",
66
- "colors": "^1.3.2",
67
- "commander": "^2.18.0",
68
- "concurrently": "^3.5.1",
69
- "cookie-parser": "^1.4.3",
70
- "css-loader": "^5.0.1",
71
- "directory-tree": "^2.0.0",
72
- "express": "^4.16.2",
73
- "fs-extra": "^7.0.0",
74
- "glob": "^7.1.3",
67
+ "@fortawesome/fontawesome-svg-core": "^6.2.0",
68
+ "@fortawesome/free-solid-svg-icons": "^6.2.0",
69
+ "@fortawesome/react-fontawesome": "0.2.0",
70
+ "app-root-path": "^3.1.0",
71
+ "archiver": "^5.3.1",
72
+ "axios": "^0.27.2",
73
+ "babel-loader": "^8.2.5",
74
+ "babel-preset-minify": "^0.5.2",
75
+ "body-parser": "^1.20.0",
76
+ "cheerio": "^1.0.0-rc.12",
77
+ "colors": "^1.4.0",
78
+ "commander": "^9.4.0",
79
+ "concurrently": "^7.4.0",
80
+ "cookie-parser": "^1.4.6",
81
+ "css-loader": "^6.7.1",
82
+ "directory-tree": "^3.3.1",
83
+ "express": "^4.18.1",
84
+ "fs-extra": "^10.1.0",
85
+ "glob": "^8.0.3",
75
86
  "gulp": "^4.0.2",
76
87
  "gulp-concat": "^2.6.1",
77
- "gulp-sass": "^4.0.2",
78
- "gulp-sourcemaps": "^2.6.4",
79
- "inquirer": "^6.2.0",
80
- "install": "^0.11.0",
81
- "js-cookie": "^2.2.1",
82
- "js-yaml": "^3.11.0",
83
- "lodash": "^4.17.10",
88
+ "gulp-sass": "^5.1.0",
89
+ "gulp-sourcemaps": "^3.0.0",
90
+ "inquirer": "^8.2.4",
91
+ "install": "^0.13.0",
92
+ "js-cookie": "^3.0.1",
93
+ "js-yaml": "^4.1.0",
94
+ "lodash": "^4.17.21",
84
95
  "message-format-inline": "^1.0.4",
85
- "mini-css-extract-plugin": "^1.3.4",
86
- "minimist": "^1.2.5",
87
- "moment": "^2.22.2",
88
- "node-fetch": "^2.1.1",
89
- "node-sass": "^4.13.1",
90
- "nodemon": "^2.0.2",
91
- "nunjucks": "^3.2.1",
92
- "nunjucks-intl": "^1.0.0",
96
+ "mini-css-extract-plugin": "^2.6.1",
97
+ "minimist": "^1.2.6",
98
+ "moment": "^2.29.4",
99
+ "node-fetch": "^3.2.10",
100
+ "nodemon": "^2.0.20",
101
+ "nunjucks": "^3.2.3",
102
+ "nunjucks-intl": "^1.0.3",
93
103
  "object-assign-deep": "^0.4.0",
94
- "package-json": "^5.0.0",
95
- "prop-types": "^15.6.1",
104
+ "package-json": "^7.0.0",
105
+ "prop-types": "^15.8.1",
96
106
  "querystrings": "^0.4.0",
97
- "react": "^16.4.0",
98
- "react-dom": "^16.3.2",
99
- "react-json-view": "^1.16.6",
100
- "react-syntax-highlighter": "^7.0.4",
101
- "react-test-renderer": "^16.4.0",
102
- "sass-loader": "^10.1.1",
103
- "seamless-immutable": "^7.1.3",
104
- "snapstub": "^4.0.0",
105
- "styled-components": "^3.2.6",
106
- "urijs": "^1.19.2",
107
+ "react": "16.14.0",
108
+ "react-dom": "16.14.0",
109
+ "react-json-view": "^1.21.3",
110
+ "react-select": "^4.3.1",
111
+ "react-syntax-highlighter": "^15.5.0",
112
+ "sass": "^1.55.0",
113
+ "sass-loader": "^13.0.2",
114
+ "scheduler": "^0.19.1",
115
+ "seamless-immutable": "^7.1.4",
116
+ "snapstub": "^5.0.1",
117
+ "styled-components": "^5.3.5",
118
+ "tslib": "^2.4.0",
119
+ "urijs": "^1.19.11",
107
120
  "watch": "^1.0.2",
108
- "webpack": "^4.41.5",
109
- "webpack-cli": "^3.3.10",
110
- "webpack-dev-middleware": "^3.6.2",
111
- "webpack-hot-middleware": "^2.25.0",
121
+ "webpack": "^5.74.0",
122
+ "webpack-cli": "^4.10.0",
123
+ "webpack-dev-middleware": "^5.3.3",
124
+ "webpack-hot-middleware": "^2.25.2",
112
125
  "@appdirect/storefront-utils": "latest"
113
126
  },
114
127
  "devDependencies": {
115
- "@types/enzyme-adapter-react-16": "^1.0.2",
116
- "assert": "^1.4.1",
128
+ "@babel/plugin-transform-modules-commonjs": "^7.18.6",
129
+ "@types/enzyme-adapter-react-16": "^1.0.6",
130
+ "assert": "^2.0.0",
117
131
  "babel-eslint": "^8.2.3",
118
- "babel-jest": "^25.2.6",
119
- "enzyme": "^3.3.0",
120
- "enzyme-adapter-react-16": "^1.0.4",
121
- "eslint": "^4.19.1",
122
- "eslint-config-airbnb": "^16.1.0",
123
- "eslint-config-prettier": "^2.9.0",
132
+ "babel-jest": "^29.0.3",
133
+ "enzyme": "^3.11.0",
134
+ "enzyme-adapter-react-16": "^1.15.6",
135
+ "eslint": "^8.23.1",
136
+ "eslint-config-airbnb": "^19.0.4",
137
+ "eslint-config-prettier": "^8.5.0",
124
138
  "eslint-config-strongloop": "^2.1.0",
125
- "eslint-plugin-import": "^2.11.0",
126
- "eslint-plugin-jsx-a11y": "^6.0.3",
127
- "eslint-plugin-prettier": "^2.6.0",
128
- "eslint-plugin-react": "^7.7.0",
129
- "jest": "^25.2.6",
130
- "jest-fetch-mock": "^1.6.2",
131
- "mock-require": "^3.0.2",
132
- "npm-run-all": "^4.1.2",
133
- "prettier": "1.12.1",
134
- "react-redux": "^5.0.7",
135
- "redux": "^3.7.2",
136
- "redux-thunk": "^2.2.0"
139
+ "eslint-plugin-import": "^2.26.0",
140
+ "eslint-plugin-jsx-a11y": "^6.6.1",
141
+ "eslint-plugin-prettier": "^4.2.1",
142
+ "eslint-plugin-react": "^7.31.8",
143
+ "jest": "^29.0.3",
144
+ "jest-environment-jsdom": "^29.0.3",
145
+ "jest-fetch-mock": "^3.0.3",
146
+ "mock-require": "^3.0.3",
147
+ "npm-run-all": "^4.1.5",
148
+ "prettier": "2.7.1",
149
+ "react-redux": "^8.0.2",
150
+ "redux": "^4.2.0",
151
+ "redux-thunk": "^2.4.1"
152
+ },
153
+ "engines": {
154
+ "node": "16",
155
+ "npm": "8"
137
156
  }
138
- }
157
+ }
package/readme.md CHANGED
@@ -1,15 +1,27 @@
1
-
2
1
  # @appdirect/sfb-toolkit
3
2
  Storefront Toolkit CLI to power up building your custom theme for AppDirect's Marketplace.
4
3
 
5
4
  Theming a template leverages [Nunjucks Template System](https://mozilla.github.io/nunjucks/) to keep Server Side Rendering.
6
- It can be easily mixed with eg. HTML, CSS, JavaScript, jQuery, SASS.
5
+ It can be easily mixed with eg. HTML, CSS, JavaScript, jQuery, SASS.
7
6
 
8
7
  ### Requirements
9
- * Node 10.x or 12.x
8
+ * Node 10.x or 12.x for versions 1.x.x to 3.0.6
9
+ * Node 16.x for versions 4.x.x
10
10
 
11
11
  ### Release Notes:
12
12
 
13
+ **4.0.0**
14
+ - Toolkit is now able to work on Node 16.
15
+ - Remove deprecated `node-sass` to compile SASS files in favour of `sass` aka Dart Sass.
16
+ - Update `sfb-theme-components` library to version [0.0.293](https://www.npmjs.com/package/@appdirect/sfb-theme-components/v/0.0.293)
17
+ - Update `@appdirect/sfb-theme-plaza` to version 0.0.56 ([sfb-theme-mp2@0.0.56](https://www.npmjs.com/package/@appdirect/sfb-theme-plaza/v/0.0.56))
18
+ - Update `@appdirect/sfb-theme-classic` to version 0.0.25 ([sfb-theme-classic@0.0.25](https://www.npmjs.com/package/@appdirect/sfb-theme-classic/v/0.0.25))
19
+
20
+ **3.0.6**
21
+ - Update `sfb-theme-components` library to version [0.0.282](https://www.npmjs.com/package/@appdirect/sfb-theme-components/v/0.0.282)
22
+ - Update `@appdirect/sfb-theme-plaza` to version 0.0.55 ([sfb-theme-mp2@0.0.55](https://www.npmjs.com/package/@appdirect/sfb-theme-plaza/v/0.0.55))
23
+ - Update `@appdirect/sfb-theme-classic` to version 0.0.24 ([sfb-theme-classic@0.0.24](https://www.npmjs.com/package/@appdirect/sfb-theme-classic/v/0.0.24))
24
+
13
25
  **3.0.5**
14
26
  - Update `sfb-theme-components` library to version [0.0.272](https://www.npmjs.com/package/@appdirect/sfb-theme-components/v/0.0.272)
15
27
  - Update `@appdirect/sfb-theme-plaza` to version 0.0.53 ([sfb-theme-mp2@0.0.53](https://www.npmjs.com/package/@appdirect/sfb-theme-plaza/v/0.0.53))
@@ -104,8 +116,8 @@ It can be easily mixed with eg. HTML, CSS, JavaScript, jQuery, SASS.
104
116
  - Initial release
105
117
 
106
118
  ### How to use
107
- The idea behind Toolkit CLI is similar to how `git` CLI have been made.
108
- Developer can have multiple themes in single environment.
119
+ The idea behind Toolkit CLI is similar to how `git` CLI has been made.
120
+ Developers can have multiple themes in a single environment.
109
121
 
110
122
  |Command|Description|
111
123
  |---|---|
@@ -131,4 +143,4 @@ Developer can have multiple themes in single environment.
131
143
  - [Contact Support](storefrontbuilder@appdirect.com)
132
144
 
133
145
 
134
- This Repository is owned and maintained by Storefront Builder Team @ AppDirect Inc.
146
+ This Repository is owned and maintained by Storefront Builder Team @ AppDirect Inc.
@@ -218,7 +218,7 @@ class Pages {
218
218
 
219
219
  static getLocaleFile(locale, config) {
220
220
  try {
221
- return yaml.safeLoad(
221
+ return yaml.load(
222
222
  fs.readFileSync(
223
223
  `${currentPath}/themes/${
224
224
  config.theme