@akinon/projectzero 1.45.0-rc.0 → 1.45.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 (44) hide show
  1. package/CHANGELOG.md +1 -40
  2. package/README.md +2 -3
  3. package/app-template/.lintstagedrc.js +4 -5
  4. package/app-template/CHANGELOG.md +34 -948
  5. package/app-template/docs/basic-setup.md +1 -1
  6. package/app-template/docs/plugins.md +7 -7
  7. package/app-template/package.json +21 -23
  8. package/app-template/public/locales/en/account.json +4 -4
  9. package/app-template/public/locales/tr/account.json +1 -1
  10. package/app-template/src/app/[commerce]/[locale]/[currency]/account/address/page.tsx +1 -1
  11. package/app-template/src/app/[commerce]/[locale]/[currency]/account/coupons/page.tsx +4 -4
  12. package/app-template/src/app/[commerce]/[locale]/[currency]/account/profile/page.tsx +0 -1
  13. package/app-template/src/app/[commerce]/[locale]/[currency]/category/[pk]/page.tsx +2 -5
  14. package/app-template/src/app/[commerce]/[locale]/[currency]/orders/completed/[token]/page.tsx +8 -12
  15. package/app-template/src/components/checkbox.tsx +2 -2
  16. package/app-template/src/components/input.tsx +7 -19
  17. package/app-template/src/components/price.tsx +4 -9
  18. package/app-template/src/redux/reducers/category.ts +1 -7
  19. package/app-template/src/settings.js +1 -6
  20. package/app-template/src/views/account/address-card.tsx +2 -2
  21. package/app-template/src/views/account/address-form.tsx +7 -22
  22. package/app-template/src/views/account/contact-form.tsx +6 -23
  23. package/app-template/src/views/account/favorite-item.tsx +2 -2
  24. package/app-template/src/views/account/favourite-products/favourite-products-list.tsx +1 -5
  25. package/app-template/src/views/breadcrumb.tsx +1 -4
  26. package/app-template/src/views/category/category-info.tsx +17 -31
  27. package/app-template/src/views/category/filters/index.tsx +105 -5
  28. package/app-template/src/views/category/layout.tsx +3 -5
  29. package/app-template/src/views/checkout/steps/payment/options/credit-card/index.tsx +4 -33
  30. package/app-template/src/views/checkout/steps/payment/options/redirection.tsx +37 -43
  31. package/app-template/src/views/checkout/steps/payment/payment-option-buttons.tsx +3 -19
  32. package/app-template/src/views/checkout/steps/shipping/address-box.tsx +2 -2
  33. package/app-template/src/views/checkout/steps/shipping/addresses.tsx +1 -1
  34. package/app-template/src/views/checkout/steps/shipping/shipping-options.tsx +37 -230
  35. package/app-template/src/views/find-in-store/index.tsx +3 -2
  36. package/app-template/src/views/header/mobile-menu.tsx +8 -25
  37. package/app-template/tsconfig.json +4 -14
  38. package/app-template/yarn.lock +1953 -1824
  39. package/commands/create.ts +5 -29
  40. package/dist/commands/create.js +2 -25
  41. package/package.json +2 -2
  42. package/app-template/package-lock.json +0 -29303
  43. package/app-template/src/app/[commerce]/[locale]/[currency]/[...prettyurl]/page.tsx +0 -8
  44. package/app-template/src/views/category/filters/filter-item.tsx +0 -131
@@ -3,7 +3,6 @@ import * as fs from 'fs';
3
3
  import * as readline from 'readline';
4
4
  import { slugify } from '../utils';
5
5
 
6
- const { execSync } = require('child_process');
7
6
  const loadingSpinner = require('loading-spinner');
8
7
 
9
8
  interface Question {
@@ -140,8 +139,7 @@ export default async (): Promise<void> => {
140
139
  const answers = await getAnswers();
141
140
  const brandName =
142
141
  answers.brandName === '.' ? path.basename(workingDir) : answers.brandName;
143
- const projectDir = answers.brandName === '.' ? workingDir : path.resolve(workingDir, slugify(brandName));
144
- const relativeProjectDir = answers.brandName === '.' ? '.' : slugify(brandName);
142
+ const projectDir = path.resolve(workingDir, slugify(brandName));
145
143
 
146
144
  if (!fs.existsSync(projectDir)) {
147
145
  fs.mkdirSync(projectDir, { recursive: true });
@@ -176,34 +174,12 @@ export default async (): Promise<void> => {
176
174
  name: slugify(brandName)
177
175
  });
178
176
 
179
-
180
- console.log('\x1b[34m%s\x1b[0m', '\nšŸš€ Installing packages...\n');
181
-
182
- execSync(`cd ${relativeProjectDir} && yarn install`, { stdio: 'ignore' });
183
-
184
177
  loadingSpinner.stop();
185
178
 
186
- const successMessage = `
187
- ✨ ${brandName} project is ready at \x1b[4m${projectDir}\x1b[0m
188
-
189
- Within the directory, the following commands are available:
190
-
191
- \x1b[35m$ yarn dev\x1b[0m
192
- \x1b[32mLaunches the development server.\x1b[0m
193
-
194
- \x1b[35m$ yarn build\x1b[0m
195
- \x1b[32mCompiles the app into static files for production.\x1b[0m
196
-
197
- \x1b[35m$ yarn start\x1b[0m
198
- \x1b[32mRuns the production server.\x1b[0m
199
- `;
200
-
201
- const getStartedMessage = answers.brandName === '.'
202
- ? 'To get started, you can type:\n\n \x1b[35m$ yarn dev\x1b[0m\n'
203
- : `To get started, you can type:\n\n \x1b[35m$ cd ${relativeProjectDir}\x1b[0m\n \x1b[35m$ yarn dev\x1b[0m\n`;
179
+ console.log(
180
+ '\x1b[32m%s\x1b[0m',
181
+ `\n āœ“ ${answers.brandName} project is ready.\n`
182
+ );
204
183
 
205
- console.log('\x1b[32m%s\x1b[0m', successMessage);
206
- console.log('\x1b[36m%s\x1b[0m', getStartedMessage);
207
- console.log('\x1b[33m%s\x1b[0m', 'Project setup is complete\n');
208
184
  console.log('\x1b[33m%s\x1b[0m', 'Project Zero - Akinon\n');
209
185
  };
@@ -39,7 +39,6 @@ const path_1 = __importDefault(require("path"));
39
39
  const fs = __importStar(require("fs"));
40
40
  const readline = __importStar(require("readline"));
41
41
  const utils_1 = require("../utils");
42
- const { execSync } = require('child_process');
43
42
  const loadingSpinner = require('loading-spinner');
44
43
  const workingDir = path_1.default.resolve(process.cwd());
45
44
  const rl = readline.createInterface({
@@ -132,8 +131,7 @@ exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
132
131
  }
133
132
  const answers = yield getAnswers();
134
133
  const brandName = answers.brandName === '.' ? path_1.default.basename(workingDir) : answers.brandName;
135
- const projectDir = answers.brandName === '.' ? workingDir : path_1.default.resolve(workingDir, (0, utils_1.slugify)(brandName));
136
- const relativeProjectDir = answers.brandName === '.' ? '.' : (0, utils_1.slugify)(brandName);
134
+ const projectDir = path_1.default.resolve(workingDir, (0, utils_1.slugify)(brandName));
137
135
  if (!fs.existsSync(projectDir)) {
138
136
  fs.mkdirSync(projectDir, { recursive: true });
139
137
  }
@@ -156,28 +154,7 @@ exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
156
154
  updateFileContents(path_1.default.join(projectDir, 'package.json'), {
157
155
  name: (0, utils_1.slugify)(brandName)
158
156
  });
159
- console.log('\x1b[34m%s\x1b[0m', '\nšŸš€ Installing packages...\n');
160
- execSync(`cd ${relativeProjectDir} && yarn install`, { stdio: 'ignore' });
161
157
  loadingSpinner.stop();
162
- const successMessage = `
163
- ✨ ${brandName} project is ready at \x1b[4m${projectDir}\x1b[0m
164
-
165
- Within the directory, the following commands are available:
166
-
167
- \x1b[35m$ yarn dev\x1b[0m
168
- \x1b[32mLaunches the development server.\x1b[0m
169
-
170
- \x1b[35m$ yarn build\x1b[0m
171
- \x1b[32mCompiles the app into static files for production.\x1b[0m
172
-
173
- \x1b[35m$ yarn start\x1b[0m
174
- \x1b[32mRuns the production server.\x1b[0m
175
- `;
176
- const getStartedMessage = answers.brandName === '.'
177
- ? 'To get started, you can type:\n\n \x1b[35m$ yarn dev\x1b[0m\n'
178
- : `To get started, you can type:\n\n \x1b[35m$ cd ${relativeProjectDir}\x1b[0m\n \x1b[35m$ yarn dev\x1b[0m\n`;
179
- console.log('\x1b[32m%s\x1b[0m', successMessage);
180
- console.log('\x1b[36m%s\x1b[0m', getStartedMessage);
181
- console.log('\x1b[33m%s\x1b[0m', 'Project setup is complete\n');
158
+ console.log('\x1b[32m%s\x1b[0m', `\n āœ“ ${answers.brandName} project is ready.\n`);
182
159
  console.log('\x1b[33m%s\x1b[0m', 'Project Zero - Akinon\n');
183
160
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akinon/projectzero",
3
- "version": "1.45.0-rc.0",
3
+ "version": "1.45.0",
4
4
  "private": false,
5
5
  "description": "CLI tool to manage your Project Zero Next project",
6
6
  "bin": {
@@ -21,7 +21,7 @@
21
21
  "dependencies": {
22
22
  "loading-spinner": "^1.2.1",
23
23
  "prompt-checkbox": "2.2.0",
24
- "semver": "7.6.2",
24
+ "semver": "7.5.4",
25
25
  "temp": "0.9.4",
26
26
  "yargs": "^17.6.0"
27
27
  }