@akinon/projectzero 2.0.0-beta.0 → 2.0.0-beta.10
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 +41 -0
- package/app-template/.env.example +5 -0
- package/app-template/.gitignore +2 -0
- package/app-template/CHANGELOG.md +250 -0
- package/app-template/README.md +6 -0
- package/app-template/config/prebuild-tests.json +5 -0
- package/app-template/next-env.d.ts +1 -1
- package/app-template/{next.config.mjs → next.config.ts} +6 -3
- package/app-template/package.json +43 -40
- package/app-template/postcss.config.mjs +8 -0
- package/app-template/public/locales/en/account.json +4 -0
- package/app-template/public/locales/en/common.json +10 -0
- package/app-template/public/locales/tr/account.json +4 -0
- package/app-template/public/locales/tr/common.json +10 -0
- package/app-template/src/__tests__/middleware-matcher.test.ts +135 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/[...prettyurl]/page.tsx +6 -4
- package/app-template/src/app/[commerce]/[locale]/[currency]/account/orders/[id]/cancellation/page.tsx +98 -7
- package/app-template/src/app/[commerce]/[locale]/[currency]/account/orders/[id]/page.tsx +71 -7
- package/app-template/src/app/[commerce]/[locale]/[currency]/account/page.tsx +1 -1
- package/app-template/src/app/[commerce]/[locale]/[currency]/account/profile/page.tsx +1 -1
- package/app-template/src/app/[commerce]/[locale]/[currency]/address/stores/page.tsx +2 -2
- package/app-template/src/app/[commerce]/[locale]/[currency]/auth/page.tsx +1 -1
- package/app-template/src/app/[commerce]/[locale]/[currency]/basket/page.tsx +2 -2
- package/app-template/src/app/[commerce]/[locale]/[currency]/category/[pk]/page.tsx +4 -1
- package/app-template/src/app/[commerce]/[locale]/[currency]/error.tsx +12 -15
- package/app-template/src/app/[commerce]/[locale]/[currency]/flat-page/[pk]/page.tsx +3 -1
- package/app-template/src/app/[commerce]/[locale]/[currency]/forms/[pk]/generate/page.tsx +5 -3
- package/app-template/src/app/[commerce]/[locale]/[currency]/group-product/[pk]/page.tsx +7 -5
- package/app-template/src/app/[commerce]/[locale]/[currency]/landing-page/[pk]/page.tsx +3 -1
- package/app-template/src/app/[commerce]/[locale]/[currency]/layout.tsx +3 -1
- package/app-template/src/app/[commerce]/[locale]/[currency]/list/page.tsx +3 -1
- package/app-template/src/app/[commerce]/[locale]/[currency]/{pz-not-found/page.tsx → not-found.tsx} +2 -2
- package/app-template/src/app/[commerce]/[locale]/[currency]/orders/checkout/page.tsx +7 -4
- package/app-template/src/app/[commerce]/[locale]/[currency]/orders/completed/[token]/page.tsx +3 -7
- package/app-template/src/app/[commerce]/[locale]/[currency]/product/[pk]/page.tsx +8 -5
- package/app-template/src/app/[commerce]/[locale]/[currency]/special-page/[pk]/page.tsx +3 -1
- package/app-template/src/app/[commerce]/[locale]/[currency]/users/email-set-primary/[[...id]]/page.tsx +4 -1
- package/app-template/src/app/[commerce]/[locale]/[currency]/users/registration/account-confirm-email/[[...id]]/page.tsx +3 -1
- package/app-template/src/app/[commerce]/[locale]/[currency]/users/reset/[[...id]]/page.tsx +11 -3
- package/app-template/src/app/[commerce]/[locale]/[currency]/xml-sitemap/[node]/route.ts +48 -2
- package/app-template/src/assets/globals.scss +162 -34
- package/app-template/src/components/__tests__/badge.test.tsx +2 -2
- package/app-template/src/components/accordion.tsx +1 -1
- package/app-template/src/components/button.tsx +50 -35
- package/app-template/src/components/file-input.tsx +44 -2
- package/app-template/src/components/input.tsx +3 -3
- package/app-template/src/components/modal.tsx +1 -1
- package/app-template/src/components/pwa-tags.tsx +0 -1
- package/app-template/src/components/select.tsx +2 -2
- package/app-template/src/components/shimmer.tsx +1 -1
- package/app-template/src/components/tabs.tsx +2 -2
- package/app-template/src/components/types/index.ts +4 -1
- package/app-template/src/middleware.ts +1 -0
- package/app-template/src/plugins.js +2 -1
- package/app-template/src/redux/middlewares/category.ts +1 -1
- package/app-template/src/redux/reducers/category.ts +1 -1
- package/app-template/src/redux/store.ts +4 -3
- package/app-template/src/settings.js +1 -2
- package/app-template/src/utils/convert-facet-search-params.ts +1 -1
- package/app-template/src/views/account/address-form.tsx +2 -2
- package/app-template/src/views/account/contact-form.tsx +4 -9
- package/app-template/src/views/account/content-header.tsx +2 -3
- package/app-template/src/views/account/order.tsx +1 -1
- package/app-template/src/views/account/orders/order-cancellation-item.tsx +5 -4
- package/app-template/src/views/anonymous-tracking/order-detail/index.tsx +1 -1
- package/app-template/src/views/basket/basket-item.tsx +1 -0
- package/app-template/src/views/category/category-active-filters.tsx +1 -1
- package/app-template/src/views/category/category-header.tsx +12 -6
- package/app-template/src/views/category/category-info.tsx +4 -4
- package/app-template/src/views/category/filters/index.tsx +2 -2
- package/app-template/src/views/checkout/auth.tsx +1 -1
- package/app-template/src/views/checkout/layout/header.tsx +1 -1
- package/app-template/src/views/checkout/steps/payment/index.tsx +1 -1
- package/app-template/src/views/checkout/steps/payment/options/credit-card/index.tsx +1 -1
- package/app-template/src/views/checkout/steps/payment/payment-option-buttons.tsx +4 -4
- package/app-template/src/views/checkout/steps/shipping/address-box.tsx +3 -3
- package/app-template/src/views/checkout/steps/shipping/addresses.tsx +1 -1
- package/app-template/src/views/checkout/summary.tsx +2 -2
- package/app-template/src/views/guest-login/index.tsx +1 -1
- package/app-template/src/views/header/action-menu.tsx +6 -3
- package/app-template/src/views/header/band.tsx +2 -2
- package/app-template/src/views/header/mini-basket.tsx +16 -5
- package/app-template/src/views/header/mobile-menu.tsx +6 -6
- package/app-template/src/views/header/navbar.tsx +1 -1
- package/app-template/src/views/header/pwa-back-button.tsx +1 -1
- package/app-template/src/views/header/search/index.tsx +16 -4
- package/app-template/src/views/header/search/results.tsx +1 -1
- package/app-template/src/views/header/user-menu.tsx +3 -1
- package/app-template/src/views/installment-options/index.tsx +1 -1
- package/app-template/src/views/login/index.tsx +30 -6
- package/app-template/src/views/otp-login/index.tsx +13 -15
- package/app-template/src/views/product/product-info.tsx +2 -2
- package/app-template/src/views/product/slider.tsx +1 -1
- package/app-template/src/views/product-pointer-banner-item.tsx +1 -1
- package/app-template/src/views/register/index.tsx +30 -5
- package/app-template/src/views/sales-contract-modal/index.tsx +17 -17
- package/app-template/src/widgets/footer-info.tsx +1 -1
- package/app-template/src/widgets/footer-menu.tsx +1 -1
- package/app-template/src/widgets/footer-subscription/index.tsx +1 -1
- package/app-template/src/widgets/home-stories-eng.tsx +1 -1
- package/app-template/tailwind.config.js +1 -137
- package/codemods/sentry-9/index.js +30 -0
- package/codemods/sentry-9/remove-sentry-configs.js +14 -0
- package/codemods/sentry-9/remove-sentry-dependency.js +25 -0
- package/codemods/sentry-9/replace-error-page.js +32 -0
- package/commands/codemod.ts +18 -0
- package/commands/index.ts +3 -1
- package/commands/plugins.ts +4 -0
- package/dist/codemods/sentry-9/templates/error.js +14 -0
- package/dist/commands/codemod.js +16 -0
- package/dist/commands/commerce-url.js +17 -7
- package/dist/commands/create.js +17 -7
- package/dist/commands/index.js +3 -1
- package/dist/commands/plugins.js +21 -7
- package/package.json +1 -1
- package/app-template/postcss.config.js +0 -6
- package/app-template/sentry.client.config.ts +0 -16
- package/app-template/sentry.edge.config.ts +0 -3
- package/app-template/sentry.properties +0 -4
- package/app-template/sentry.server.config.ts +0 -3
- package/app-template/src/app/[commerce]/[locale]/[currency]/product/[pk]/loading.tsx +0 -67
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
const deepMerge = require('@akinon/next/utils/deep-merge');
|
|
2
|
-
const defaultTheme = require('tailwindcss/defaultTheme');
|
|
3
2
|
const plugins = require('./src/plugins');
|
|
4
3
|
const fs = require('fs');
|
|
5
4
|
const path = require('path');
|
|
@@ -19,148 +18,13 @@ if (themeName !== 'default' && fs.existsSync(themeConfigPath)) {
|
|
|
19
18
|
|
|
20
19
|
const defaultConfig = {
|
|
21
20
|
content: [
|
|
22
|
-
'./src/app/**/*.{js,ts,jsx,tsx}',
|
|
23
|
-
'./src/pages/**/*.{js,ts,jsx,tsx}',
|
|
24
|
-
'./src/components/**/*.{js,ts,jsx,tsx}',
|
|
25
|
-
'./src/views/**/*.{js,ts,jsx,tsx}',
|
|
26
|
-
'./src/widgets/**/*.{js,ts,jsx,tsx}',
|
|
27
|
-
'./src/hooks/**/*.{js,ts,jsx,tsx}',
|
|
28
|
-
'./src/utils/**/*.{js,ts,jsx,tsx}',
|
|
29
21
|
...plugins
|
|
30
22
|
.map((plugin) => [
|
|
31
23
|
`./node_modules/@akinon/${plugin}/**/*.{js,ts,jsx,tsx}`,
|
|
32
24
|
`../../node_modules/@akinon/${plugin}/**/*.{js,ts,jsx,tsx}`
|
|
33
25
|
])
|
|
34
26
|
.flat()
|
|
35
|
-
]
|
|
36
|
-
theme: {
|
|
37
|
-
extend: {
|
|
38
|
-
fontSize: {
|
|
39
|
-
'2xs': '0.5rem'
|
|
40
|
-
},
|
|
41
|
-
outline: {
|
|
42
|
-
off: 'none'
|
|
43
|
-
},
|
|
44
|
-
width: {
|
|
45
|
-
'1/10': '10%',
|
|
46
|
-
'2/10': '20%',
|
|
47
|
-
'3/10': '30%',
|
|
48
|
-
'4/10': '40%',
|
|
49
|
-
'5/10': '50%',
|
|
50
|
-
'6/10': '60%',
|
|
51
|
-
'7/10': '70%',
|
|
52
|
-
'8/10': '80%',
|
|
53
|
-
'9/10': '90%'
|
|
54
|
-
},
|
|
55
|
-
transitionProperty: {
|
|
56
|
-
'max-width': 'max-width'
|
|
57
|
-
},
|
|
58
|
-
backgroundImage: {
|
|
59
|
-
'skeleton-shimmer':
|
|
60
|
-
'linear-gradient(90deg, #d7d7d7 0%, #ebebeb 40%, #eeeeee 60%, #d7d7d7)'
|
|
61
|
-
},
|
|
62
|
-
keyframes: {
|
|
63
|
-
'skeleton-shimmer': {
|
|
64
|
-
'100%': {
|
|
65
|
-
transform: 'translateX(100%)'
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
animation: {
|
|
70
|
-
'skeleton-shimmer': 'skeleton-shimmer 2s linear infinite'
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
colors: {
|
|
74
|
-
transparent: 'transparent',
|
|
75
|
-
white: '#ffffff',
|
|
76
|
-
primary: {
|
|
77
|
-
DEFAULT: '#000000',
|
|
78
|
-
hover: '#181818',
|
|
79
|
-
foreground: '#ffffff',
|
|
80
|
-
100: '#525252',
|
|
81
|
-
200: '#404040',
|
|
82
|
-
300: '#3d3d3d',
|
|
83
|
-
400: '#333333',
|
|
84
|
-
500: '#2d2d2d',
|
|
85
|
-
600: '#292929',
|
|
86
|
-
700: '#2b2b2b',
|
|
87
|
-
800: '#181818',
|
|
88
|
-
900: '#000000'
|
|
89
|
-
},
|
|
90
|
-
secondary: {
|
|
91
|
-
DEFAULT: '#e95151',
|
|
92
|
-
hover: '#d03838',
|
|
93
|
-
foreground: '#ffffff',
|
|
94
|
-
100: '#ffb7b7',
|
|
95
|
-
200: '#ff9e9e',
|
|
96
|
-
300: '#ff8484',
|
|
97
|
-
400: '#ff6b6b',
|
|
98
|
-
500: '#e95151',
|
|
99
|
-
600: '#d72b01',
|
|
100
|
-
700: '#b61e1e',
|
|
101
|
-
800: '#9d0505',
|
|
102
|
-
900: '#830000'
|
|
103
|
-
},
|
|
104
|
-
black: {
|
|
105
|
-
DEFAULT: '#000000',
|
|
106
|
-
100: '#525252',
|
|
107
|
-
200: '#404040',
|
|
108
|
-
300: '#3d3d3d',
|
|
109
|
-
400: '#333333',
|
|
110
|
-
500: '#2d2d2d',
|
|
111
|
-
600: '#292929',
|
|
112
|
-
700: '#2b2b2b',
|
|
113
|
-
800: '#181818',
|
|
114
|
-
900: '#000000'
|
|
115
|
-
},
|
|
116
|
-
gray: {
|
|
117
|
-
DEFAULT: '#ebebeb',
|
|
118
|
-
25: '#fdfdfd',
|
|
119
|
-
50: '#f7f7f7',
|
|
120
|
-
100: '#f5f5f5',
|
|
121
|
-
150: '#f4f4f4',
|
|
122
|
-
200: '#eeeeee',
|
|
123
|
-
300: '#ebebeb',
|
|
124
|
-
400: '#d7d7d7',
|
|
125
|
-
450: '#d4d4d4',
|
|
126
|
-
500: '#c9c9c9',
|
|
127
|
-
600: '#9d9d9d',
|
|
128
|
-
700: '#686868',
|
|
129
|
-
800: '#615f62',
|
|
130
|
-
850: '#58585a',
|
|
131
|
-
900: '#4a4f54',
|
|
132
|
-
950: '#424242'
|
|
133
|
-
},
|
|
134
|
-
error: {
|
|
135
|
-
DEFAULT: '#d72b01',
|
|
136
|
-
100: '#e20008'
|
|
137
|
-
},
|
|
138
|
-
success: {
|
|
139
|
-
DEFAULT: '#7b9d76',
|
|
140
|
-
100: '#7b9d76'
|
|
141
|
-
}
|
|
142
|
-
},
|
|
143
|
-
container: {
|
|
144
|
-
center: true,
|
|
145
|
-
padding: {
|
|
146
|
-
DEFAULT: '0rem',
|
|
147
|
-
sm: '2rem',
|
|
148
|
-
'2xl': '0rem'
|
|
149
|
-
}
|
|
150
|
-
},
|
|
151
|
-
fontFamily: {
|
|
152
|
-
sans: ['Jost'].concat(defaultTheme.fontFamily.sans)
|
|
153
|
-
},
|
|
154
|
-
screens: {
|
|
155
|
-
xs: '575px',
|
|
156
|
-
sm: '640px',
|
|
157
|
-
md: '768px',
|
|
158
|
-
lg: '1024px',
|
|
159
|
-
xl: '1170px',
|
|
160
|
-
'2xl': '1370px'
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
plugins: [require('@tailwindcss/typography')]
|
|
27
|
+
]
|
|
164
28
|
};
|
|
165
29
|
|
|
166
30
|
if (Object.keys(themeOverrides).length === 0) {
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const { execSync } = require('child_process');
|
|
3
|
+
|
|
4
|
+
const codemodScripts = [
|
|
5
|
+
path.resolve(__dirname, 'remove-sentry-dependency.js'),
|
|
6
|
+
path.resolve(__dirname, 'remove-sentry-configs.js'),
|
|
7
|
+
path.resolve(__dirname, 'replace-error-page.js')
|
|
8
|
+
];
|
|
9
|
+
|
|
10
|
+
const transform = () => {
|
|
11
|
+
const workingDir = path.resolve(process.cwd());
|
|
12
|
+
|
|
13
|
+
codemodScripts.forEach((script) => {
|
|
14
|
+
try {
|
|
15
|
+
execSync(
|
|
16
|
+
`jscodeshift --ignore-pattern="**/node_modules/**" -t ${script} ${workingDir} --extensions=json,ts,tsx,js,jsx,properties,md`,
|
|
17
|
+
{
|
|
18
|
+
cwd: workingDir,
|
|
19
|
+
stdio: 'inherit'
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
} catch (e) {
|
|
23
|
+
console.error(e);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
module.exports = {
|
|
29
|
+
transform
|
|
30
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
|
|
3
|
+
const transform = (fileInfo, api, options) => {
|
|
4
|
+
const filePath = fileInfo.path;
|
|
5
|
+
const regex = /sentry\.\w+\.config\.(ts|js)$|sentry\.properties$/i;
|
|
6
|
+
|
|
7
|
+
if (regex.test(filePath) && fs.existsSync(filePath)) {
|
|
8
|
+
fs.unlinkSync(filePath);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
return fileInfo.source;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
module.exports = transform;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const transform = (fileInfo, api, options) => {
|
|
2
|
+
if (fileInfo.path.endsWith('package.json')) {
|
|
3
|
+
const packageJson = JSON.parse(fileInfo.source);
|
|
4
|
+
|
|
5
|
+
if (
|
|
6
|
+
packageJson.dependencies &&
|
|
7
|
+
packageJson.dependencies['@sentry/nextjs']
|
|
8
|
+
) {
|
|
9
|
+
delete packageJson.dependencies['@sentry/nextjs'];
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
if (
|
|
13
|
+
packageJson.devDependencies &&
|
|
14
|
+
packageJson.devDependencies['@sentry/nextjs']
|
|
15
|
+
) {
|
|
16
|
+
delete packageJson.devDependencies['@sentry/nextjs'];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return JSON.stringify(packageJson, null, 2);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return fileInfo.source;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
module.exports = transform;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
|
|
3
|
+
const template = `
|
|
4
|
+
'use client';
|
|
5
|
+
|
|
6
|
+
import { useSentryUncaughtErrors } from '@akinon/next/hooks';
|
|
7
|
+
import PzErrorPage from '@akinon/next/views/error-page';
|
|
8
|
+
|
|
9
|
+
export default function ErrorPage({
|
|
10
|
+
error,
|
|
11
|
+
reset
|
|
12
|
+
}: {
|
|
13
|
+
error: Error & { digest?: string; isServerError?: boolean };
|
|
14
|
+
reset: () => void;
|
|
15
|
+
}) {
|
|
16
|
+
// DO NOT REMOVE THIS LINE TO REPORT UNCAUGHT ERRORS TO SENTRY
|
|
17
|
+
useSentryUncaughtErrors(error);
|
|
18
|
+
|
|
19
|
+
return <PzErrorPage error={error} reset={reset} />;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
`;
|
|
23
|
+
|
|
24
|
+
const transform = (fileInfo, api, options) => {
|
|
25
|
+
const filePath = fileInfo.path;
|
|
26
|
+
|
|
27
|
+
if (filePath.endsWith('error.tsx')) {
|
|
28
|
+
fs.writeFileSync(filePath, template, { encoding: 'utf8' });
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
module.exports = transform;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import path from 'path';
|
|
2
|
+
|
|
3
|
+
const yargs = require('yargs/yargs');
|
|
4
|
+
const { hideBin } = require('yargs/helpers');
|
|
5
|
+
const args = yargs(hideBin(process.argv)).argv;
|
|
6
|
+
|
|
7
|
+
export default () => {
|
|
8
|
+
const workingDir = path.resolve(process.cwd());
|
|
9
|
+
const codemodName = args.codemod;
|
|
10
|
+
const codemodPath = path.resolve(
|
|
11
|
+
__dirname,
|
|
12
|
+
`../../codemods/${codemodName}/index.js`
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
const codemod = require(codemodPath);
|
|
16
|
+
|
|
17
|
+
codemod.transform();
|
|
18
|
+
};
|
package/commands/index.ts
CHANGED
|
@@ -4,6 +4,7 @@ import addLanguage from './add-language';
|
|
|
4
4
|
import removeLanguage from './remove-language';
|
|
5
5
|
import defaultLanguage from './default-language';
|
|
6
6
|
import plugins from './plugins';
|
|
7
|
+
import codemod from './codemod';
|
|
7
8
|
|
|
8
9
|
export default {
|
|
9
10
|
commerceUrl,
|
|
@@ -11,5 +12,6 @@ export default {
|
|
|
11
12
|
addLanguage,
|
|
12
13
|
removeLanguage,
|
|
13
14
|
defaultLanguage,
|
|
14
|
-
plugins
|
|
15
|
+
plugins,
|
|
16
|
+
codemod
|
|
15
17
|
};
|
package/commands/plugins.ts
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const hooks_1 = require("@akinon/next/hooks");
|
|
8
|
+
const error_page_1 = __importDefault(require("@akinon/next/views/error-page"));
|
|
9
|
+
function ErrorPage({ error, reset }) {
|
|
10
|
+
// DO NOT REMOVE THIS LINE TO REPORT UNCAUGHT ERRORS TO SENTRY
|
|
11
|
+
(0, hooks_1.useSentryUncaughtErrors)(error);
|
|
12
|
+
return React.createElement(error_page_1.default, { error: error, reset: reset });
|
|
13
|
+
}
|
|
14
|
+
exports.default = ErrorPage;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const path_1 = __importDefault(require("path"));
|
|
7
|
+
const yargs = require('yargs/yargs');
|
|
8
|
+
const { hideBin } = require('yargs/helpers');
|
|
9
|
+
const args = yargs(hideBin(process.argv)).argv;
|
|
10
|
+
exports.default = () => {
|
|
11
|
+
const workingDir = path_1.default.resolve(process.cwd());
|
|
12
|
+
const codemodName = args.codemod;
|
|
13
|
+
const codemodPath = path_1.default.resolve(__dirname, `../../codemods/${codemodName}/index.js`);
|
|
14
|
+
const codemod = require(codemodPath);
|
|
15
|
+
codemod.transform();
|
|
16
|
+
};
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
package/dist/commands/create.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
36
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
37
|
return new (P || (P = Promise))(function (resolve, reject) {
|
package/dist/commands/index.js
CHANGED
|
@@ -9,11 +9,13 @@ const add_language_1 = __importDefault(require("./add-language"));
|
|
|
9
9
|
const remove_language_1 = __importDefault(require("./remove-language"));
|
|
10
10
|
const default_language_1 = __importDefault(require("./default-language"));
|
|
11
11
|
const plugins_1 = __importDefault(require("./plugins"));
|
|
12
|
+
const codemod_1 = __importDefault(require("./codemod"));
|
|
12
13
|
exports.default = {
|
|
13
14
|
commerceUrl: commerce_url_1.default,
|
|
14
15
|
create: create_1.default,
|
|
15
16
|
addLanguage: add_language_1.default,
|
|
16
17
|
removeLanguage: remove_language_1.default,
|
|
17
18
|
defaultLanguage: default_language_1.default,
|
|
18
|
-
plugins: plugins_1.default
|
|
19
|
+
plugins: plugins_1.default,
|
|
20
|
+
codemod: codemod_1.default
|
|
19
21
|
};
|
package/dist/commands/plugins.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
36
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
37
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -127,6 +137,10 @@ exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
127
137
|
{
|
|
128
138
|
name: 'Tabby Payment Extension',
|
|
129
139
|
value: 'pz-tabby-extension'
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
name: 'Tamara Payment Extension',
|
|
143
|
+
value: 'pz-tamara-extension'
|
|
130
144
|
}
|
|
131
145
|
];
|
|
132
146
|
const prompt = new Prompt({
|
package/package.json
CHANGED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { initSentry } from '@akinon/next/sentry';
|
|
2
|
-
|
|
3
|
-
async function initializeSentry() {
|
|
4
|
-
const response = await fetch('/api/sentry', { next: { revalidate: 0 } });
|
|
5
|
-
const data = await response.json();
|
|
6
|
-
|
|
7
|
-
const options = {
|
|
8
|
-
dsn: data.dsn,
|
|
9
|
-
integrations: [],
|
|
10
|
-
tracesSampleRate: 1.0
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
initSentry('Client', options);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
initializeSentry();
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { Skeleton, SkeletonWrapper } from 'components';
|
|
2
|
-
|
|
3
|
-
export default function Loading() {
|
|
4
|
-
return (
|
|
5
|
-
<div className="container mx-auto">
|
|
6
|
-
<div className="max-w-5xl mx-auto my-5 px-7">
|
|
7
|
-
<SkeletonWrapper className="md:mb-7">
|
|
8
|
-
<Skeleton className="w-[17.25rem] h-4 lg:w-64" />
|
|
9
|
-
</SkeletonWrapper>
|
|
10
|
-
</div>
|
|
11
|
-
<div className="grid max-w-5xl grid-cols-2 lg:gap-8 mx-auto px-7">
|
|
12
|
-
<div className="col-span-2 mb-7 md:mb-0 lg:col-span-1">
|
|
13
|
-
<div className="flex gap-1">
|
|
14
|
-
<SkeletonWrapper className="hidden md:block md:mb-7">
|
|
15
|
-
{Array(5)
|
|
16
|
-
.fill(null)
|
|
17
|
-
.map((_, index) => (
|
|
18
|
-
<Skeleton key={index} className="w-20 h-24 mb-2" />
|
|
19
|
-
))}
|
|
20
|
-
</SkeletonWrapper>
|
|
21
|
-
|
|
22
|
-
<div className="flex-1">
|
|
23
|
-
<SkeletonWrapper className="md:mb-7">
|
|
24
|
-
<Skeleton className="w-full h-[30.375rem] md:h-[36.375rem]" />
|
|
25
|
-
</SkeletonWrapper>
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
<div className="flex flex-col items-center col-span-2 lg:col-span-1">
|
|
30
|
-
<div className="w-full">
|
|
31
|
-
<SkeletonWrapper className="w-full md:mb-7 flex justify-center items-center">
|
|
32
|
-
<Skeleton className="w-96 h-16 mb-9" />
|
|
33
|
-
<Skeleton className="hidden w-36 h-14 mb-9 md:block" />
|
|
34
|
-
|
|
35
|
-
<div className="flex flex-col justify-center items-center mb-9">
|
|
36
|
-
<Skeleton className="w-36 h-4 mb-2" />
|
|
37
|
-
<div className="flex items-center gap-2">
|
|
38
|
-
{Array(3)
|
|
39
|
-
.fill(null)
|
|
40
|
-
.map((_, index) => (
|
|
41
|
-
<Skeleton key={index} className="w-24 h-10" />
|
|
42
|
-
))}
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
|
|
46
|
-
<div className="flex flex-col justify-center items-center mb-4">
|
|
47
|
-
<Skeleton className="w-36 h-4 mb-2" />
|
|
48
|
-
<div className="flex items-center gap-2">
|
|
49
|
-
{Array(5)
|
|
50
|
-
.fill(null)
|
|
51
|
-
.map((_, index) => (
|
|
52
|
-
<Skeleton key={index} className="w-11 h-11" />
|
|
53
|
-
))}
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
56
|
-
|
|
57
|
-
<Skeleton className="hidden w-full h-14 mb-6 md:block" />
|
|
58
|
-
<Skeleton className="w-40 h-10 mb-9 md:w-72" />
|
|
59
|
-
<Skeleton className="w-24 h-10 mb-7" />
|
|
60
|
-
<Skeleton className="w-full h-36" />
|
|
61
|
-
</SkeletonWrapper>
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
</div>
|
|
65
|
-
</div>
|
|
66
|
-
);
|
|
67
|
-
}
|