pinokiod 3.2.182 → 3.2.185
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/conda.js +2 -0
- package/kernel/bin/index.js +2 -2
- package/package.json +1 -1
- package/server/index.js +17 -0
- package/server/views/pre.ejs +19 -5
package/kernel/bin/conda.js
CHANGED
package/kernel/bin/index.js
CHANGED
|
@@ -397,7 +397,7 @@ class Bin {
|
|
|
397
397
|
// check brew_installed
|
|
398
398
|
console.log("checking brew installed")
|
|
399
399
|
let e = await this.kernel.bin.exists("homebrew")
|
|
400
|
-
let { stdout }= await this.
|
|
400
|
+
let { stdout }= await this.exec({ message: "xcode-select -p" }, (stream) => { })
|
|
401
401
|
let e2 = /(.*Library.*Developer.*CommandLineTools.*|.*Xcode.*Developer.*)/gi.test(stdout)
|
|
402
402
|
let e3 = await this.kernel.exists("/Library/Developer/CommandLineTools")
|
|
403
403
|
|
|
@@ -408,7 +408,7 @@ class Bin {
|
|
|
408
408
|
// - no
|
|
409
409
|
|
|
410
410
|
let e4;
|
|
411
|
-
let result = await this.
|
|
411
|
+
let result = await this.exec({ message: "xcode-select --version" }, (stream) => { })
|
|
412
412
|
if (result && result.stdout) {
|
|
413
413
|
e4 = /xcode-select version ([0-9]+)/gi.exec(result.stdout)
|
|
414
414
|
if (e4 && e4.length > 1) {
|
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -2141,6 +2141,20 @@ class Server {
|
|
|
2141
2141
|
} else {
|
|
2142
2142
|
// update the py module if it's already installed
|
|
2143
2143
|
console.log("not up to date")
|
|
2144
|
+
|
|
2145
|
+
// give full permission to pinokio folder on windows
|
|
2146
|
+
if (this.kernel.platform === "win32") {
|
|
2147
|
+
console.log("Give full permission")
|
|
2148
|
+
await this.kernel.bin.exec({
|
|
2149
|
+
sudo: true,
|
|
2150
|
+
message: `icacls ${this.kernel.homedir} /grant Users:(OI)(CI)F /T`
|
|
2151
|
+
}, (stream) => {
|
|
2152
|
+
ondata(stream)
|
|
2153
|
+
})
|
|
2154
|
+
console.log("Give full permission done")
|
|
2155
|
+
}
|
|
2156
|
+
|
|
2157
|
+
|
|
2144
2158
|
await new Promise((resolve, reject) => {
|
|
2145
2159
|
let interval = setInterval(async () => {
|
|
2146
2160
|
console.log("checking mod.py")
|
|
@@ -2621,6 +2635,9 @@ class Server {
|
|
|
2621
2635
|
if (item.icon) {
|
|
2622
2636
|
item.icon = `/api/${req.params.name}/${item.icon}?raw=true`
|
|
2623
2637
|
}
|
|
2638
|
+
if (!item.href.startsWith("http")) {
|
|
2639
|
+
item.href = path.resolve(this.kernel.homedir, "api", req.params.name, item.href)
|
|
2640
|
+
}
|
|
2624
2641
|
})
|
|
2625
2642
|
let env = await Environment.get2(p2, this.kernel)
|
|
2626
2643
|
res.render("pre", {
|
package/server/views/pre.ejs
CHANGED
|
@@ -58,10 +58,6 @@ h1 {
|
|
|
58
58
|
.item .title {
|
|
59
59
|
font-weight: bold;
|
|
60
60
|
}
|
|
61
|
-
.item .btn {
|
|
62
|
-
width: 50px;
|
|
63
|
-
text-align: center;
|
|
64
|
-
}
|
|
65
61
|
.item img {
|
|
66
62
|
width: 100px;
|
|
67
63
|
}
|
|
@@ -97,6 +93,17 @@ footer a.btn {
|
|
|
97
93
|
box-sizing: border-box;
|
|
98
94
|
width: 100%;
|
|
99
95
|
}
|
|
96
|
+
.item .btn i {
|
|
97
|
+
margin-right: 5px;
|
|
98
|
+
}
|
|
99
|
+
.item .btn {
|
|
100
|
+
margin-top: 10px;
|
|
101
|
+
text-align: center;
|
|
102
|
+
display: flex;
|
|
103
|
+
align-items: center;
|
|
104
|
+
padding: 10px 20px;
|
|
105
|
+
display: inline-block;
|
|
106
|
+
}
|
|
100
107
|
</style>
|
|
101
108
|
</head>
|
|
102
109
|
<body class='columns <%=theme%>'>
|
|
@@ -118,8 +125,15 @@ footer a.btn {
|
|
|
118
125
|
<div class='col'>
|
|
119
126
|
<div class='title'><%=item.title%></div>
|
|
120
127
|
<div class='description'><%=item.description%></div>
|
|
128
|
+
<% if (item.href.startsWith("http")) { %>
|
|
129
|
+
<a target="_blank" features="browser" href='<%=item.href%>' class='btn'><i class="fa-solid fa-square-arrow-up-right"></i> Get</a>
|
|
130
|
+
<% } else { %>
|
|
131
|
+
<button class='btn' data-filepath="<%=item.href%>"><i class="fa-solid fa-square-arrow-up-right"></i> Get</button>
|
|
132
|
+
<% } %>
|
|
121
133
|
</div>
|
|
134
|
+
<!--
|
|
122
135
|
<a target="_blank" features="browser" href='<%=item.href%>' class='btn'>Get</a>
|
|
136
|
+
-->
|
|
123
137
|
</div>
|
|
124
138
|
<% } else if (item.env) { %>
|
|
125
139
|
<!--
|
|
@@ -136,7 +150,7 @@ footer a.btn {
|
|
|
136
150
|
<% }) %>
|
|
137
151
|
</div>
|
|
138
152
|
<footer>
|
|
139
|
-
<a class='btn' href="/env/api/<%=name%>?init=true">
|
|
153
|
+
<a class='btn' href="/env/api/<%=name%>?init=true">Next</a>
|
|
140
154
|
</footer>
|
|
141
155
|
</main>
|
|
142
156
|
</body>
|