@akinon/projectzero 1.43.0-rc.9 → 1.44.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 (42) hide show
  1. package/CHANGELOG.md +3 -66
  2. package/README.md +2 -3
  3. package/app-template/.lintstagedrc.js +4 -5
  4. package/app-template/CHANGELOG.md +35 -626
  5. package/app-template/build.sh +0 -0
  6. package/app-template/docs/basic-setup.md +1 -1
  7. package/app-template/docs/plugins.md +7 -7
  8. package/app-template/package.json +21 -23
  9. package/app-template/public/locales/en/account.json +4 -4
  10. package/app-template/public/locales/tr/account.json +1 -1
  11. package/app-template/src/app/[commerce]/[locale]/[currency]/account/address/page.tsx +1 -1
  12. package/app-template/src/app/[commerce]/[locale]/[currency]/account/coupons/page.tsx +4 -4
  13. package/app-template/src/app/[commerce]/[locale]/[currency]/account/profile/page.tsx +0 -1
  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/category/category-info.tsx +17 -31
  26. package/app-template/src/views/category/filters/index.tsx +105 -5
  27. package/app-template/src/views/checkout/steps/payment/options/credit-card/index.tsx +4 -33
  28. package/app-template/src/views/checkout/steps/payment/options/redirection.tsx +37 -43
  29. package/app-template/src/views/checkout/steps/payment/payment-option-buttons.tsx +3 -19
  30. package/app-template/src/views/checkout/steps/shipping/address-box.tsx +2 -2
  31. package/app-template/src/views/checkout/steps/shipping/addresses.tsx +1 -1
  32. package/app-template/src/views/checkout/steps/shipping/shipping-options.tsx +37 -230
  33. package/app-template/src/views/find-in-store/index.tsx +3 -2
  34. package/app-template/src/views/header/mobile-menu.tsx +8 -25
  35. package/app-template/tsconfig.json +4 -14
  36. package/app-template/yarn.lock +1953 -1824
  37. package/commands/create.ts +7 -29
  38. package/dist/commands/create.js +3 -25
  39. package/package.json +2 -2
  40. package/app-template/package-lock.json +0 -29303
  41. package/app-template/src/app/[commerce]/[locale]/[currency]/[...prettyurl]/page.tsx +0 -8
  42. 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 });
@@ -158,6 +156,8 @@ export default async (): Promise<void> => {
158
156
  createEnvironmentFile(projectDir);
159
157
  checkGitignore(projectDir);
160
158
 
159
+ fs.chmodSync(path.join(projectDir, 'build.sh'), 0o711);
160
+
161
161
  if (answers.projectDescription) {
162
162
  updateFileContents(path.join(projectDir, 'akinon.json'), {
163
163
  description: answers.projectDescription
@@ -174,34 +174,12 @@ export default async (): Promise<void> => {
174
174
  name: slugify(brandName)
175
175
  });
176
176
 
177
-
178
- console.log('\x1b[34m%s\x1b[0m', '\nšŸš€ Installing packages...\n');
179
-
180
- execSync(`cd ${relativeProjectDir} && yarn install`, { stdio: 'ignore' });
181
-
182
177
  loadingSpinner.stop();
183
178
 
184
- const successMessage = `
185
- ✨ ${brandName} project is ready at \x1b[4m${projectDir}\x1b[0m
186
-
187
- Within the directory, the following commands are available:
188
-
189
- \x1b[35m$ yarn dev\x1b[0m
190
- \x1b[32mLaunches the development server.\x1b[0m
191
-
192
- \x1b[35m$ yarn build\x1b[0m
193
- \x1b[32mCompiles the app into static files for production.\x1b[0m
194
-
195
- \x1b[35m$ yarn start\x1b[0m
196
- \x1b[32mRuns the production server.\x1b[0m
197
- `;
198
-
199
- const getStartedMessage = answers.brandName === '.'
200
- ? 'To get started, you can type:\n\n \x1b[35m$ yarn dev\x1b[0m\n'
201
- : `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
+ );
202
183
 
203
- console.log('\x1b[32m%s\x1b[0m', successMessage);
204
- console.log('\x1b[36m%s\x1b[0m', getStartedMessage);
205
- console.log('\x1b[33m%s\x1b[0m', 'Project setup is complete\n');
206
184
  console.log('\x1b[33m%s\x1b[0m', 'Project Zero - Akinon\n');
207
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
  }
@@ -142,6 +140,7 @@ exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
142
140
  updatePluginsFile(projectDir);
143
141
  createEnvironmentFile(projectDir);
144
142
  checkGitignore(projectDir);
143
+ fs.chmodSync(path_1.default.join(projectDir, 'build.sh'), 0o711);
145
144
  if (answers.projectDescription) {
146
145
  updateFileContents(path_1.default.join(projectDir, 'akinon.json'), {
147
146
  description: answers.projectDescription
@@ -155,28 +154,7 @@ exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
155
154
  updateFileContents(path_1.default.join(projectDir, 'package.json'), {
156
155
  name: (0, utils_1.slugify)(brandName)
157
156
  });
158
- console.log('\x1b[34m%s\x1b[0m', '\nšŸš€ Installing packages...\n');
159
- execSync(`cd ${relativeProjectDir} && yarn install`, { stdio: 'ignore' });
160
157
  loadingSpinner.stop();
161
- const successMessage = `
162
- ✨ ${brandName} project is ready at \x1b[4m${projectDir}\x1b[0m
163
-
164
- Within the directory, the following commands are available:
165
-
166
- \x1b[35m$ yarn dev\x1b[0m
167
- \x1b[32mLaunches the development server.\x1b[0m
168
-
169
- \x1b[35m$ yarn build\x1b[0m
170
- \x1b[32mCompiles the app into static files for production.\x1b[0m
171
-
172
- \x1b[35m$ yarn start\x1b[0m
173
- \x1b[32mRuns the production server.\x1b[0m
174
- `;
175
- const getStartedMessage = answers.brandName === '.'
176
- ? 'To get started, you can type:\n\n \x1b[35m$ yarn dev\x1b[0m\n'
177
- : `To get started, you can type:\n\n \x1b[35m$ cd ${relativeProjectDir}\x1b[0m\n \x1b[35m$ yarn dev\x1b[0m\n`;
178
- console.log('\x1b[32m%s\x1b[0m', successMessage);
179
- console.log('\x1b[36m%s\x1b[0m', getStartedMessage);
180
- 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`);
181
159
  console.log('\x1b[33m%s\x1b[0m', 'Project Zero - Akinon\n');
182
160
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akinon/projectzero",
3
- "version": "1.43.0-rc.9",
3
+ "version": "1.44.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
  }