@akinon/projectzero 1.106.0 → 1.107.0-rc.86

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 (34) hide show
  1. package/CHANGELOG.md +233 -4
  2. package/app-template/.env.example +1 -0
  3. package/app-template/CHANGELOG.md +4955 -314
  4. package/app-template/README.md +25 -1
  5. package/app-template/package.json +20 -20
  6. package/app-template/public/locales/en/common.json +42 -1
  7. package/app-template/public/locales/tr/common.json +42 -1
  8. package/app-template/src/app/[commerce]/[locale]/[currency]/basket/page.tsx +9 -82
  9. package/app-template/src/app/[commerce]/[locale]/[currency]/landing-page/[pk]/page.tsx +12 -1
  10. package/app-template/src/app/[commerce]/[locale]/[currency]/product/[pk]/loading.tsx +67 -0
  11. package/app-template/src/app/api/image-proxy/route.ts +1 -0
  12. package/app-template/src/app/api/similar-product-list/route.ts +1 -0
  13. package/app-template/src/app/api/similar-products/route.ts +1 -0
  14. package/app-template/src/assets/fonts/pz-icon.css +3 -0
  15. package/app-template/src/components/input.tsx +2 -1
  16. package/app-template/src/hooks/index.ts +2 -0
  17. package/app-template/src/hooks/use-product-cart.ts +77 -0
  18. package/app-template/src/hooks/use-stock-alert.ts +74 -0
  19. package/app-template/src/plugins.js +2 -1
  20. package/app-template/src/settings.js +6 -1
  21. package/app-template/src/utils/variant-validation.ts +41 -0
  22. package/app-template/src/views/basket/basket-content.tsx +106 -0
  23. package/app-template/src/views/basket/basket-item.tsx +16 -13
  24. package/app-template/src/views/basket/summary.tsx +10 -7
  25. package/app-template/src/views/guest-login/index.tsx +6 -1
  26. package/app-template/src/views/header/search/index.tsx +17 -5
  27. package/app-template/src/views/product/product-actions.tsx +165 -0
  28. package/app-template/src/views/product/product-info.tsx +61 -263
  29. package/app-template/src/views/product/product-share.tsx +56 -0
  30. package/app-template/src/views/product/product-variants.tsx +26 -0
  31. package/app-template/src/views/product/slider.tsx +86 -73
  32. package/commands/plugins.ts +29 -2
  33. package/dist/commands/plugins.js +23 -2
  34. package/package.json +1 -1
@@ -50,7 +50,10 @@ function checkVersion(pkg) {
50
50
  const pkgInfo = (yield response.json());
51
51
  const latestVersion = pkgInfo['dist-tags'].latest;
52
52
  if (!semver_1.default.satisfies(pkg.dependencies['@akinon/next'], latestVersion)) {
53
- console.warn(`\x1b[43mWarning: The "${packageName}" package is currently at version ${pkg.dependencies['@akinon/next']}. Please upgrade it to the latest version (${latestVersion}) to ensure plugin compatibility.`, '\x1b[0m\n');
53
+ console.warn(`\x1b[43m Warning: The "${packageName}" package is currently at`, `\x1b[41m version ${pkg.dependencies['@akinon/next']}`, `\x1b[43m Please upgrade it to the latest version (${latestVersion}) to ensure plugin compatibility.`, '\x1b[0m\n');
54
+ }
55
+ else {
56
+ console.log(`\x1b[42m Info: The package "${packageName}" is currently in the current version (${latestVersion}).`, '\x1b[0m\n');
54
57
  }
55
58
  }
56
59
  catch (error) {
@@ -72,7 +75,25 @@ exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
72
75
  throw new Error('plugins.js was not found in either of the expected locations.');
73
76
  }
74
77
  }
75
- const pkg = require(path_1.default.resolve(rootDir, './package.json'));
78
+ function findPackageJson() {
79
+ const packageJsonPaths = [
80
+ path_1.default.resolve(rootDir, './package.json'),
81
+ path_1.default.resolve(rootDir, './apps/projectzeronext/package.json')
82
+ ];
83
+ for (const packageJsonPath of packageJsonPaths) {
84
+ try {
85
+ const pkg = require(packageJsonPath);
86
+ if (pkg.dependencies['@akinon/next']) {
87
+ return pkg;
88
+ }
89
+ }
90
+ catch (error) {
91
+ continue;
92
+ }
93
+ }
94
+ throw new Error('Could not find package.json with @akinon/next dependency');
95
+ }
96
+ const pkg = findPackageJson();
76
97
  yield checkVersion(pkg);
77
98
  const pluginsFilePath = findPluginsFilePath();
78
99
  let installedPlugins = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akinon/projectzero",
3
- "version": "1.106.0",
3
+ "version": "1.107.0-rc.86",
4
4
  "private": false,
5
5
  "description": "CLI tool to manage your Project Zero Next project",
6
6
  "bin": {