create-v-kit-spa 1.0.10 → 1.0.12
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/README.md +4 -1
- package/dist/commands.d.ts +1 -1
- package/dist/commands.js +78 -67
- package/dist/count.d.ts +2 -2
- package/dist/count.d.ts.map +1 -1
- package/dist/count.js +45 -44
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/messages.d.ts +2 -2
- package/dist/messages.d.ts.map +1 -1
- package/dist/messages.js +70 -69
- package/dist/progress.d.ts +1 -1
- package/dist/progress.d.ts.map +1 -1
- package/dist/progress.js +38 -37
- package/dist/prompts.d.ts +4 -3
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +80 -77
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +33 -33
- package/dist/version.d.ts +1 -1
- package/dist/version.js +20 -20
- package/lib/162/.env.example +1 -7
- package/lib/162/README.md +0 -19
- package/lib/162/app/Http/Controllers/MainController.php +12 -0
- package/lib/162/composer.json +3 -7
- package/lib/162/composer.lock +579 -1140
- package/lib/162/config/cache.php +4 -3
- package/lib/162/config/database.php +5 -2
- package/lib/162/config/filesystems.php +3 -2
- package/lib/162/config/logging.php +1 -1
- package/lib/162/config/mail.php +15 -2
- package/lib/162/config/queue.php +4 -4
- package/lib/162/config/services.php +4 -0
- package/lib/162/config/session.php +0 -1
- package/lib/162/package.json +1 -9
- package/lib/162/public/.htaccess +6 -8
- package/lib/162/resources/js/app.js +10 -10
- package/lib/162/resources/js/components/About.vue +4 -4
- package/lib/162/resources/js/components/Home.vue +11 -11
- package/lib/162/resources/js/components/pages/About.vue +5 -0
- package/lib/162/resources/js/components/pages/Error.vue +5 -0
- package/lib/162/resources/js/components/pages/Home.vue +21 -0
- package/lib/162/resources/js/components/templates/App.vue +86 -0
- package/lib/162/resources/js/failOver.js +8 -8
- package/lib/162/resources/js/mainStore.js +20 -0
- package/lib/162/resources/js/router.js +40 -24
- package/lib/162/resources/js/store.js +18 -18
- package/lib/162/resources/js/templates/App.vue +65 -65
- package/lib/162/resources/js/views/HomeView.vue +7 -7
- package/lib/162/resources/views/layouts/app.blade.php +13 -14
- package/lib/162/resources/views/welcome.blade.php +2 -2
- package/lib/162/routes/web.php +2 -3
- package/lib/162/vite.config.js +1 -1
- package/package.json +1 -1
- package/lib/162/package-lock.json +0 -1330
package/dist/prompts.js
CHANGED
|
@@ -1,77 +1,80 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.
|
|
16
|
-
exports.
|
|
17
|
-
exports.
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
//
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
console.log(chalk_1.default.
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
message
|
|
66
|
-
message += `[
|
|
67
|
-
message += `[
|
|
68
|
-
message += '
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.fileNameVariable = void 0;
|
|
16
|
+
exports.getProjectName = getProjectName;
|
|
17
|
+
exports.getBoilerplateChoice = getBoilerplateChoice;
|
|
18
|
+
exports.closeReadline = closeReadline;
|
|
19
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
20
|
+
const { spawn } = require('child_process');
|
|
21
|
+
const readline_1 = require("readline");
|
|
22
|
+
const readline = (0, readline_1.createInterface)({
|
|
23
|
+
input: process.stdin,
|
|
24
|
+
output: process.stdout
|
|
25
|
+
});
|
|
26
|
+
exports.fileNameVariable = '';
|
|
27
|
+
function getProjectName() {
|
|
28
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
return new Promise((resolve) => {
|
|
30
|
+
// readline.question('? Enter a project name (using default "v-kit-app" if left blank): ', (answer) => {
|
|
31
|
+
// resolve(answer || 'v-kit-app');
|
|
32
|
+
// });
|
|
33
|
+
let message = `\n${chalk_1.default.bold.cyan('?')} ${chalk_1.default.bold('Enter a project name')} (using default "${chalk_1.default.bold.magentaBright('v-kit-app')}" if left blank): `;
|
|
34
|
+
readline.question(message, (answer) => {
|
|
35
|
+
exports.fileNameVariable = answer ? answer : 'v-kit-spa';
|
|
36
|
+
resolve(answer || 'v-kit-app');
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function getBoilerplateChoice() {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {
|
|
44
|
+
//!
|
|
45
|
+
const phpProcess = spawn('php', ['-v']);
|
|
46
|
+
let version = null;
|
|
47
|
+
phpProcess.stdout.on('data', (data) => {
|
|
48
|
+
const match = data.toString().match(/PHP (\d+\.\d+\.\d+)/);
|
|
49
|
+
if (match) {
|
|
50
|
+
version = `v${match[1]}`;
|
|
51
|
+
console.log(chalk_1.default.italic('Scanning... your php is:'), chalk_1.default.greenBright(version));
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
console.log(chalk_1.default.redBright(`Php is not installed in your machine`));
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
phpProcess.stderr.on('data', (data) => {
|
|
58
|
+
console.error(`Php not found: ${data}`);
|
|
59
|
+
});
|
|
60
|
+
//!!
|
|
61
|
+
yield new Promise((resolve) => {
|
|
62
|
+
phpProcess.stdout.once('data', () => resolve());
|
|
63
|
+
});
|
|
64
|
+
//! This will not run before the function above 'resolve'
|
|
65
|
+
let message = `\n${chalk_1.default.bold.cyan('?')} ${chalk_1.default.bold('Select your preferred boilerplate:')}\n`;
|
|
66
|
+
message += `[1] - ${chalk_1.default.underline('Vue2-Laravel8')} ${chalk_1.default.grey.italic('~ php v7.4')}\n`;
|
|
67
|
+
message += `[2] - ${chalk_1.default.underline('Vue3-Laravel8')} ${chalk_1.default.grey.italic('~ php v7.4')}\n`;
|
|
68
|
+
message += `[3] - ${chalk_1.default.underline('Vue3-Laravel9')} ${chalk_1.default.grey.italic('~ php v8.0')}\n`;
|
|
69
|
+
message += `[4] - ${chalk_1.default.underline('Vue3-Laravel10')} ${chalk_1.default.grey.italic('~ php v8.1')}\n`;
|
|
70
|
+
message += `[5] - ${chalk_1.default.underline('Vue3-Laravel11')} ${chalk_1.default.grey.italic('~ php v8.2 - v8.3')}\n`;
|
|
71
|
+
message += '=> ';
|
|
72
|
+
readline.question(message, (answer) => __awaiter(this, void 0, void 0, function* () {
|
|
73
|
+
resolve(parseInt(answer));
|
|
74
|
+
}));
|
|
75
|
+
}));
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
function closeReadline() {
|
|
79
|
+
readline.close();
|
|
80
|
+
}
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function copyProjectStructure(sourcePath: string, destinationPath: string): Promise<void>;
|
|
1
|
+
export declare function copyProjectStructure(sourcePath: string, destinationPath: string): Promise<void>;
|
|
2
2
|
//# sourceMappingURL=utils.d.ts.map
|
package/dist/utils.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.copyProjectStructure = copyProjectStructure;
|
|
16
|
-
const fs_1 = __importDefault(require("fs"));
|
|
17
|
-
const path_1 = __importDefault(require("path"));
|
|
18
|
-
function copyProjectStructure(sourcePath, destinationPath) {
|
|
19
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
20
|
-
const entries = yield fs_1.default.promises.readdir(sourcePath, { withFileTypes: true });
|
|
21
|
-
for (const entry of entries) {
|
|
22
|
-
const sourceFile = path_1.default.join(sourcePath, entry.name);
|
|
23
|
-
const destinationFile = path_1.default.join(destinationPath, entry.name);
|
|
24
|
-
if (entry.isDirectory()) {
|
|
25
|
-
yield fs_1.default.promises.mkdir(destinationFile);
|
|
26
|
-
yield copyProjectStructure(sourceFile, destinationFile);
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
yield fs_1.default.promises.copyFile(sourceFile, destinationFile);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
}
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.copyProjectStructure = copyProjectStructure;
|
|
16
|
+
const fs_1 = __importDefault(require("fs"));
|
|
17
|
+
const path_1 = __importDefault(require("path"));
|
|
18
|
+
function copyProjectStructure(sourcePath, destinationPath) {
|
|
19
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
20
|
+
const entries = yield fs_1.default.promises.readdir(sourcePath, { withFileTypes: true });
|
|
21
|
+
for (const entry of entries) {
|
|
22
|
+
const sourceFile = path_1.default.join(sourcePath, entry.name);
|
|
23
|
+
const destinationFile = path_1.default.join(destinationPath, entry.name);
|
|
24
|
+
if (entry.isDirectory()) {
|
|
25
|
+
yield fs_1.default.promises.mkdir(destinationFile);
|
|
26
|
+
yield copyProjectStructure(sourceFile, destinationFile);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
yield fs_1.default.promises.copyFile(sourceFile, destinationFile);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
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 chalk_1 = __importDefault(require("chalk"));
|
|
7
|
-
const { spawn } = require('child_process');
|
|
8
|
-
const phpProcess = spawn('php', ['-v']);
|
|
9
|
-
phpProcess.stdout.on('data', (data) => {
|
|
10
|
-
const match = data.toString().match(/PHP (\d+\.\d+\.\d+)/);
|
|
11
|
-
if (match) {
|
|
12
|
-
console.log('Scanning... your php is:', chalk_1.default.greenBright(`v${match[1]}`));
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
console.error('Could not find Php version');
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
phpProcess.stderr.on('data', (data) => {
|
|
19
|
-
console.error(`Php not found: ${data}`);
|
|
20
|
-
});
|
|
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 chalk_1 = __importDefault(require("chalk"));
|
|
7
|
+
const { spawn } = require('child_process');
|
|
8
|
+
const phpProcess = spawn('php', ['-v']);
|
|
9
|
+
phpProcess.stdout.on('data', (data) => {
|
|
10
|
+
const match = data.toString().match(/PHP (\d+\.\d+\.\d+)/);
|
|
11
|
+
if (match) {
|
|
12
|
+
console.log('Scanning... your php is:', chalk_1.default.greenBright(`v${match[1]}`));
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
console.error('Could not find Php version');
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
phpProcess.stderr.on('data', (data) => {
|
|
19
|
+
console.error(`Php not found: ${data}`);
|
|
20
|
+
});
|
package/lib/162/.env.example
CHANGED
|
@@ -5,18 +5,12 @@ APP_DEBUG=true
|
|
|
5
5
|
APP_TIMEZONE=UTC
|
|
6
6
|
APP_URL=http://localhost
|
|
7
7
|
|
|
8
|
-
# DEPLOYMENT
|
|
9
|
-
ASSET_URL=http://{ip_address}:{port}/ProjectName
|
|
10
|
-
VITE_HOST={ip_address}
|
|
11
|
-
VITE_BASE_URL=http://{ip_address}:{port}/ProjectName
|
|
12
|
-
VITE_LOCAL_IP={ip_address}
|
|
13
|
-
|
|
14
8
|
APP_LOCALE=en
|
|
15
9
|
APP_FALLBACK_LOCALE=en
|
|
16
10
|
APP_FAKER_LOCALE=en_US
|
|
17
11
|
|
|
18
12
|
APP_MAINTENANCE_DRIVER=file
|
|
19
|
-
APP_MAINTENANCE_STORE=database
|
|
13
|
+
# APP_MAINTENANCE_STORE=database
|
|
20
14
|
|
|
21
15
|
BCRYPT_ROUNDS=12
|
|
22
16
|
|
package/lib/162/README.md
CHANGED
|
@@ -64,22 +64,3 @@ If you discover a security vulnerability within Laravel, please send an e-mail t
|
|
|
64
64
|
## License
|
|
65
65
|
|
|
66
66
|
The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
|
|
67
|
-
|
|
68
|
-
## isNeed of api.php
|
|
69
|
-
```
|
|
70
|
-
php artisan install:api
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
## Deployment
|
|
74
|
-
|
|
75
|
-
```
|
|
76
|
-
// .env
|
|
77
|
-
ASSET_URL=http://{ip_address}:{port}/ProjectName
|
|
78
|
-
VITE_HOST={ip_address}
|
|
79
|
-
VITE_BASE_URL=http://{ip_address}:{port}/ProjectName
|
|
80
|
-
VITE_LOCAL_IP={ip_address}
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
```
|
|
84
|
-
npm run build
|
|
85
|
-
```
|
package/lib/162/composer.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"require": {
|
|
8
8
|
"php": "^8.2",
|
|
9
|
-
"laravel/framework": "^11.
|
|
9
|
+
"laravel/framework": "^11.9",
|
|
10
10
|
"laravel/tinker": "^2.9"
|
|
11
11
|
},
|
|
12
12
|
"require-dev": {
|
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
"laravel/sail": "^1.26",
|
|
16
16
|
"mockery/mockery": "^1.6",
|
|
17
17
|
"nunomaduro/collision": "^8.0",
|
|
18
|
-
"phpunit/phpunit": "^
|
|
19
|
-
"spatie/laravel-ignition": "^2.4"
|
|
18
|
+
"phpunit/phpunit": "^11.0.1"
|
|
20
19
|
},
|
|
21
20
|
"autoload": {
|
|
22
21
|
"psr-4": {
|
|
@@ -44,13 +43,10 @@
|
|
|
44
43
|
"post-create-project-cmd": [
|
|
45
44
|
"@php artisan key:generate --ansi",
|
|
46
45
|
"@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
|
|
47
|
-
"@php artisan migrate --ansi"
|
|
46
|
+
"@php artisan migrate --graceful --ansi"
|
|
48
47
|
]
|
|
49
48
|
},
|
|
50
49
|
"extra": {
|
|
51
|
-
"branch-alias": {
|
|
52
|
-
"dev-master": "11.x-dev"
|
|
53
|
-
},
|
|
54
50
|
"laravel": {
|
|
55
51
|
"dont-discover": []
|
|
56
52
|
}
|