pinokiod 3.19.59 → 3.19.61
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/kernel/bin/cli.js +3 -1
- package/kernel/prototype.js +0 -1
- package/package.json +1 -1
- package/server/views/prototype/init.ejs +13 -13
package/kernel/bin/cli.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const path = require('path')
|
|
2
2
|
const Util = require('../util')
|
|
3
3
|
class CLI {
|
|
4
|
+
version = "0.0.8"
|
|
4
5
|
async install(req, ondata) {
|
|
5
6
|
await this.kernel.exec({
|
|
6
7
|
message: "npm install -g pterm@latest --force",
|
|
@@ -26,7 +27,8 @@ class CLI {
|
|
|
26
27
|
let res = await this.kernel.exec({
|
|
27
28
|
message: "pinokio version terminal"
|
|
28
29
|
}, ondata)
|
|
29
|
-
|
|
30
|
+
let re = new RegExp(`.*pterm@${this.version}.*`)
|
|
31
|
+
if (res.stdout && re.test(res.stdout)) {
|
|
30
32
|
console.log("Installed")
|
|
31
33
|
return true
|
|
32
34
|
} else {
|
package/kernel/prototype.js
CHANGED
|
@@ -51,7 +51,6 @@ class Proto {
|
|
|
51
51
|
await fs.promises.rm(this.kernel.path("prototype"), { recursive: true })
|
|
52
52
|
}
|
|
53
53
|
async create(req, ondata) {
|
|
54
|
-
console.log("proto.create", req)
|
|
55
54
|
try {
|
|
56
55
|
let projectType = req.params.projectType
|
|
57
56
|
let startType = req.params.cliType || req.params.startType
|
package/package.json
CHANGED
|
@@ -1092,13 +1092,13 @@ body.dark .command-fields {
|
|
|
1092
1092
|
|
|
1093
1093
|
<div class='command-fields conditional-options' id="clone-command-fields">
|
|
1094
1094
|
<div class="git-url-input">
|
|
1095
|
-
<label for="gitUrl">Git Repository URL
|
|
1095
|
+
<label for="gitUrl">Git Repository URL</label>
|
|
1096
1096
|
<input type="url" name="gitUrl" id="gitUrl" placeholder="https://github.com/username/repository.git">
|
|
1097
1097
|
</div>
|
|
1098
1098
|
|
|
1099
1099
|
<!-- Additional Fields for Clone Mode -->
|
|
1100
1100
|
<div class="git-url-input">
|
|
1101
|
-
<label for="cloneInstallCommand">Install Command
|
|
1101
|
+
<label for="cloneInstallCommand">Install Command (Leave empty to decide later)</label>
|
|
1102
1102
|
<textarea name="cloneInstallCommand" id="cloneInstallCommand" rows="3" placeholder="Install commands (one per line)"></textarea>
|
|
1103
1103
|
<div class="checkbox-group">
|
|
1104
1104
|
<label>
|
|
@@ -1109,7 +1109,7 @@ body.dark .command-fields {
|
|
|
1109
1109
|
</div>
|
|
1110
1110
|
|
|
1111
1111
|
<div class="git-url-input">
|
|
1112
|
-
<label for="cloneStartCommand">Start Command
|
|
1112
|
+
<label for="cloneStartCommand">Start Command (Leave empty to decide later)</label>
|
|
1113
1113
|
<textarea name="cloneStartCommand" id="cloneStartCommand" rows="3" placeholder="Start commands (one per line)"></textarea>
|
|
1114
1114
|
<div class="checkbox-group">
|
|
1115
1115
|
<label>
|
|
@@ -1439,16 +1439,16 @@ function validateCurrentStep() {
|
|
|
1439
1439
|
return false;
|
|
1440
1440
|
}
|
|
1441
1441
|
|
|
1442
|
-
const cloneInstallCommand = document.getElementById('cloneInstallCommand').value.trim();
|
|
1443
|
-
const cloneStartCommand = document.getElementById('cloneStartCommand').value.trim();
|
|
1444
|
-
if (!cloneInstallCommand) {
|
|
1445
|
-
alert('Please enter at least one install command.');
|
|
1446
|
-
return false;
|
|
1447
|
-
}
|
|
1448
|
-
if (!cloneStartCommand) {
|
|
1449
|
-
alert('Please enter at least one start command.');
|
|
1450
|
-
return false;
|
|
1451
|
-
}
|
|
1442
|
+
// const cloneInstallCommand = document.getElementById('cloneInstallCommand').value.trim();
|
|
1443
|
+
// const cloneStartCommand = document.getElementById('cloneStartCommand').value.trim();
|
|
1444
|
+
// if (!cloneInstallCommand) {
|
|
1445
|
+
// alert('Please enter at least one install command.');
|
|
1446
|
+
// return false;
|
|
1447
|
+
// }
|
|
1448
|
+
// if (!cloneStartCommand) {
|
|
1449
|
+
// alert('Please enter at least one start command.');
|
|
1450
|
+
// return false;
|
|
1451
|
+
// }
|
|
1452
1452
|
}
|
|
1453
1453
|
|
|
1454
1454
|
// Validate CLI options
|