@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.
- package/CHANGELOG.md +233 -4
- package/app-template/.env.example +1 -0
- package/app-template/CHANGELOG.md +4955 -314
- package/app-template/README.md +25 -1
- package/app-template/package.json +20 -20
- package/app-template/public/locales/en/common.json +42 -1
- package/app-template/public/locales/tr/common.json +42 -1
- package/app-template/src/app/[commerce]/[locale]/[currency]/basket/page.tsx +9 -82
- package/app-template/src/app/[commerce]/[locale]/[currency]/landing-page/[pk]/page.tsx +12 -1
- package/app-template/src/app/[commerce]/[locale]/[currency]/product/[pk]/loading.tsx +67 -0
- package/app-template/src/app/api/image-proxy/route.ts +1 -0
- package/app-template/src/app/api/similar-product-list/route.ts +1 -0
- package/app-template/src/app/api/similar-products/route.ts +1 -0
- package/app-template/src/assets/fonts/pz-icon.css +3 -0
- package/app-template/src/components/input.tsx +2 -1
- package/app-template/src/hooks/index.ts +2 -0
- package/app-template/src/hooks/use-product-cart.ts +77 -0
- package/app-template/src/hooks/use-stock-alert.ts +74 -0
- package/app-template/src/plugins.js +2 -1
- package/app-template/src/settings.js +6 -1
- package/app-template/src/utils/variant-validation.ts +41 -0
- package/app-template/src/views/basket/basket-content.tsx +106 -0
- package/app-template/src/views/basket/basket-item.tsx +16 -13
- package/app-template/src/views/basket/summary.tsx +10 -7
- package/app-template/src/views/guest-login/index.tsx +6 -1
- package/app-template/src/views/header/search/index.tsx +17 -5
- package/app-template/src/views/product/product-actions.tsx +165 -0
- package/app-template/src/views/product/product-info.tsx +61 -263
- package/app-template/src/views/product/product-share.tsx +56 -0
- package/app-template/src/views/product/product-variants.tsx +26 -0
- package/app-template/src/views/product/slider.tsx +86 -73
- package/commands/plugins.ts +29 -2
- package/dist/commands/plugins.js +23 -2
- package/package.json +1 -1
package/dist/commands/plugins.js
CHANGED
|
@@ -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[
|
|
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
|
-
|
|
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 = [];
|