@akinon/projectzero 1.36.0-rc.0 ā 1.36.0-rc.1
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 +6 -0
- package/app-template/CHANGELOG.md +12 -0
- package/app-template/package.json +9 -9
- package/commands/create.ts +29 -5
- package/dist/commands/create.js +25 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# projectzeronext
|
|
2
2
|
|
|
3
|
+
## 1.36.0-rc.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- @akinon/next@1.36.0-rc.1
|
|
8
|
+
- @akinon/pz-b2b@1.36.0-rc.1
|
|
9
|
+
- @akinon/pz-gpay@1.36.0-rc.1
|
|
10
|
+
- @akinon/pz-masterpass@1.36.0-rc.1
|
|
11
|
+
- @akinon/pz-one-click-checkout@1.36.0-rc.1
|
|
12
|
+
- @akinon/pz-otp@1.36.0-rc.1
|
|
13
|
+
- @akinon/pz-pay-on-delivery@1.36.0-rc.1
|
|
14
|
+
|
|
3
15
|
## 1.36.0-rc.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "projectzeronext",
|
|
3
|
-
"version": "1.36.0-rc.
|
|
3
|
+
"version": "1.36.0-rc.1",
|
|
4
4
|
"private": true,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
"prestart": "pz-prestart"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@akinon/next": "1.36.0-rc.
|
|
26
|
-
"@akinon/pz-b2b": "1.36.0-rc.
|
|
27
|
-
"@akinon/pz-gpay": "1.36.0-rc.
|
|
28
|
-
"@akinon/pz-masterpass": "1.36.0-rc.
|
|
29
|
-
"@akinon/pz-one-click-checkout": "1.36.0-rc.
|
|
30
|
-
"@akinon/pz-otp": "1.36.0-rc.
|
|
31
|
-
"@akinon/pz-pay-on-delivery": "1.36.0-rc.
|
|
25
|
+
"@akinon/next": "1.36.0-rc.1",
|
|
26
|
+
"@akinon/pz-b2b": "1.36.0-rc.1",
|
|
27
|
+
"@akinon/pz-gpay": "1.36.0-rc.1",
|
|
28
|
+
"@akinon/pz-masterpass": "1.36.0-rc.1",
|
|
29
|
+
"@akinon/pz-one-click-checkout": "1.36.0-rc.1",
|
|
30
|
+
"@akinon/pz-otp": "1.36.0-rc.1",
|
|
31
|
+
"@akinon/pz-pay-on-delivery": "1.36.0-rc.1",
|
|
32
32
|
"@hookform/resolvers": "2.9.0",
|
|
33
33
|
"@next/third-parties": "14.1.0",
|
|
34
34
|
"@react-google-maps/api": "2.17.1",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"yup": "0.32.11"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@akinon/eslint-plugin-projectzero": "1.36.0-rc.
|
|
56
|
+
"@akinon/eslint-plugin-projectzero": "1.36.0-rc.1",
|
|
57
57
|
"@semantic-release/changelog": "6.0.2",
|
|
58
58
|
"@semantic-release/exec": "6.0.3",
|
|
59
59
|
"@semantic-release/git": "10.0.1",
|
package/commands/create.ts
CHANGED
|
@@ -3,6 +3,7 @@ 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');
|
|
6
7
|
const loadingSpinner = require('loading-spinner');
|
|
7
8
|
|
|
8
9
|
interface Question {
|
|
@@ -139,7 +140,8 @@ export default async (): Promise<void> => {
|
|
|
139
140
|
const answers = await getAnswers();
|
|
140
141
|
const brandName =
|
|
141
142
|
answers.brandName === '.' ? path.basename(workingDir) : answers.brandName;
|
|
142
|
-
const projectDir = path.resolve(workingDir, slugify(brandName));
|
|
143
|
+
const projectDir = answers.brandName === '.' ? workingDir : path.resolve(workingDir, slugify(brandName));
|
|
144
|
+
const relativeProjectDir = answers.brandName === '.' ? '.' : slugify(brandName);
|
|
143
145
|
|
|
144
146
|
if (!fs.existsSync(projectDir)) {
|
|
145
147
|
fs.mkdirSync(projectDir, { recursive: true });
|
|
@@ -172,12 +174,34 @@ export default async (): Promise<void> => {
|
|
|
172
174
|
name: slugify(brandName)
|
|
173
175
|
});
|
|
174
176
|
|
|
177
|
+
|
|
178
|
+
console.log('\x1b[34m%s\x1b[0m', '\nš Installing packages...\n');
|
|
179
|
+
|
|
180
|
+
execSync(`cd ${relativeProjectDir} && yarn install`, { stdio: 'ignore' });
|
|
181
|
+
|
|
175
182
|
loadingSpinner.stop();
|
|
176
183
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
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`;
|
|
181
202
|
|
|
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');
|
|
182
206
|
console.log('\x1b[33m%s\x1b[0m', 'Project Zero - Akinon\n');
|
|
183
207
|
};
|
package/dist/commands/create.js
CHANGED
|
@@ -39,6 +39,7 @@ 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');
|
|
42
43
|
const loadingSpinner = require('loading-spinner');
|
|
43
44
|
const workingDir = path_1.default.resolve(process.cwd());
|
|
44
45
|
const rl = readline.createInterface({
|
|
@@ -128,7 +129,8 @@ exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
128
129
|
}
|
|
129
130
|
const answers = yield getAnswers();
|
|
130
131
|
const brandName = answers.brandName === '.' ? path_1.default.basename(workingDir) : answers.brandName;
|
|
131
|
-
const projectDir = path_1.default.resolve(workingDir, (0, utils_1.slugify)(brandName));
|
|
132
|
+
const projectDir = answers.brandName === '.' ? workingDir : path_1.default.resolve(workingDir, (0, utils_1.slugify)(brandName));
|
|
133
|
+
const relativeProjectDir = answers.brandName === '.' ? '.' : (0, utils_1.slugify)(brandName);
|
|
132
134
|
if (!fs.existsSync(projectDir)) {
|
|
133
135
|
fs.mkdirSync(projectDir, { recursive: true });
|
|
134
136
|
}
|
|
@@ -150,7 +152,28 @@ exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
150
152
|
updateFileContents(path_1.default.join(projectDir, 'package.json'), {
|
|
151
153
|
name: (0, utils_1.slugify)(brandName)
|
|
152
154
|
});
|
|
155
|
+
console.log('\x1b[34m%s\x1b[0m', '\nš Installing packages...\n');
|
|
156
|
+
execSync(`cd ${relativeProjectDir} && yarn install`, { stdio: 'ignore' });
|
|
153
157
|
loadingSpinner.stop();
|
|
154
|
-
|
|
158
|
+
const successMessage = `
|
|
159
|
+
⨠${brandName} project is ready at \x1b[4m${projectDir}\x1b[0m
|
|
160
|
+
|
|
161
|
+
Within the directory, the following commands are available:
|
|
162
|
+
|
|
163
|
+
\x1b[35m$ yarn dev\x1b[0m
|
|
164
|
+
\x1b[32mLaunches the development server.\x1b[0m
|
|
165
|
+
|
|
166
|
+
\x1b[35m$ yarn build\x1b[0m
|
|
167
|
+
\x1b[32mCompiles the app into static files for production.\x1b[0m
|
|
168
|
+
|
|
169
|
+
\x1b[35m$ yarn start\x1b[0m
|
|
170
|
+
\x1b[32mRuns the production server.\x1b[0m
|
|
171
|
+
`;
|
|
172
|
+
const getStartedMessage = answers.brandName === '.'
|
|
173
|
+
? 'To get started, you can type:\n\n \x1b[35m$ yarn dev\x1b[0m\n'
|
|
174
|
+
: `To get started, you can type:\n\n \x1b[35m$ cd ${relativeProjectDir}\x1b[0m\n \x1b[35m$ yarn dev\x1b[0m\n`;
|
|
175
|
+
console.log('\x1b[32m%s\x1b[0m', successMessage);
|
|
176
|
+
console.log('\x1b[36m%s\x1b[0m', getStartedMessage);
|
|
177
|
+
console.log('\x1b[33m%s\x1b[0m', 'Project setup is complete\n');
|
|
155
178
|
console.log('\x1b[33m%s\x1b[0m', 'Project Zero - Akinon\n');
|
|
156
179
|
});
|