pinokiod 3.19.60 → 3.19.62

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.
@@ -1315,7 +1315,6 @@ class Api {
1315
1315
  // if the path is
1316
1316
  let relative = path.relative(this.kernel.homedir, request.path)
1317
1317
  let chunks = relative.split(path.sep)
1318
- console.log({ chunks })
1319
1318
  if (chunks.length == 2) {
1320
1319
  // the script is requesting a uri of the git repo
1321
1320
  // look for pinokio.js
package/kernel/bin/cli.js CHANGED
@@ -22,7 +22,6 @@ class CLI {
22
22
 
23
23
  if (exists) {
24
24
  let p = this.kernel.which("pinokio")
25
- console.log({ p })
26
25
  if (p) {
27
26
  let res = await this.kernel.exec({
28
27
  message: "pinokio version terminal"
@@ -754,6 +754,8 @@ class Bin {
754
754
  // }
755
755
  // }
756
756
  //}
757
+ await this.kernel.proto.init()
758
+
757
759
  if (this.kernel.shell) {
758
760
  this.kernel.shell.reset()
759
761
  }
@@ -19,7 +19,6 @@ class Registry {
19
19
  console.log("matches", matches)
20
20
  if (matches && matches.length > 0) {
21
21
  let chunks = matches[1].split(/\s+/)
22
- console.log("chunks", chunks)
23
22
  if (chunks.length === 3) {
24
23
  if (Number(chunks[2]) === 1) {
25
24
  this._installed = true
@@ -7,6 +7,7 @@ class Proto {
7
7
  this.kernel = kernel
8
8
  }
9
9
  async init() {
10
+ console.log("Proto init")
10
11
  this.items = []
11
12
  this.kv = {}
12
13
  if (this.kernel.bin.installed && this.kernel.bin.installed.conda && this.kernel.bin.installed.conda.has("git")) {
@@ -46,12 +47,12 @@ class Proto {
46
47
  })
47
48
  }
48
49
  }
50
+ console.log("Proto init done")
49
51
  }
50
52
  async reset() {
51
53
  await fs.promises.rm(this.kernel.path("prototype"), { recursive: true })
52
54
  }
53
55
  async create(req, ondata) {
54
- console.log("proto.create", req)
55
56
  try {
56
57
  let projectType = req.params.projectType
57
58
  let startType = req.params.cliType || req.params.startType
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.19.60",
3
+ "version": "3.19.62",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/server/index.js CHANGED
@@ -2973,6 +2973,7 @@ class Server {
2973
2973
  }))
2974
2974
 
2975
2975
  this.app.get("/init/:name", ex(async (req, res) => {
2976
+ console.log("Rnder init", req.params.name)
2976
2977
  /*
2977
2978
  option 1: new vs. clone
2978
2979
  - new|clone
@@ -2989,6 +2990,17 @@ class Server {
2989
2990
  - prompt
2990
2991
 
2991
2992
  */
2993
+
2994
+ let { requirements, install_required, requirements_pending, error } = await this.kernel.bin.check({
2995
+ bin: this.kernel.bin.preset("dev"),
2996
+ })
2997
+ if (!requirements_pending && install_required) {
2998
+ res.redirect(`/setup/dev?callback=${req.originalUrl}`)
2999
+ return
3000
+ }
3001
+
3002
+ // console.log("this.kernel.proto.init")
3003
+ // await this.kernel.proto.init()
2992
3004
  res.render("prototype/init", {
2993
3005
  cwd: this.kernel.path("api"),
2994
3006
  name: req.params.name,
@@ -3022,7 +3034,6 @@ class Server {
3022
3034
  })
3023
3035
  */
3024
3036
  }))
3025
-
3026
3037
  this.app.get("/check_router_up", ex(async (req, res) => {
3027
3038
  let response = await this.check_router_up()
3028
3039
  res.json(response)
@@ -3062,7 +3073,6 @@ class Server {
3062
3073
  let { requirements, install_required, requirements_pending, error } = await this.kernel.bin.check({
3063
3074
  bin: this.kernel.bin.preset("connect"),
3064
3075
  })
3065
- console.log("1", { requirements_pending, install_required })
3066
3076
  if (!requirements_pending && install_required) {
3067
3077
  console.log("REDIRECT", req.params.provider)
3068
3078
  res.redirect("/setup/connect?callback=/connect/" + req.params.provider)
@@ -3627,7 +3637,6 @@ class Server {
3627
3637
  let { requirements, install_required, requirements_pending, error } = await this.kernel.bin.check({
3628
3638
  bin: this.kernel.bin.preset(req.params.name)
3629
3639
  })
3630
- console.log({ requirements, install_required, requirements_pending })
3631
3640
  res.json({
3632
3641
  requirements,
3633
3642
  install_required,
@@ -5240,7 +5249,6 @@ class Server {
5240
5249
  }))
5241
5250
  this.app.get("/pinokio/requirements_ready", ex((req, res) => {
5242
5251
  let requirements_pending = !this.kernel.bin.installed_initialized
5243
- console.log({ requirements_pending })
5244
5252
  res.json({ requirements_pending })
5245
5253
  }))
5246
5254
  this.app.get("/check_peer", ex((req, res) => {
@@ -216,6 +216,9 @@ body.dark .conditional-options {
216
216
  display: block;
217
217
  }
218
218
 
219
+ body.dark textarea, body.dark input[type="url"], body.dark input[type="text"] {
220
+ background: white;
221
+ }
219
222
  textarea, input[type="url"], input[type="text"] {
220
223
  width: 100%;
221
224
  padding: 10px;
@@ -1092,13 +1095,13 @@ body.dark .command-fields {
1092
1095
 
1093
1096
  <div class='command-fields conditional-options' id="clone-command-fields">
1094
1097
  <div class="git-url-input">
1095
- <label for="gitUrl">Git Repository URL:</label>
1098
+ <label for="gitUrl">Git Repository URL</label>
1096
1099
  <input type="url" name="gitUrl" id="gitUrl" placeholder="https://github.com/username/repository.git">
1097
1100
  </div>
1098
1101
 
1099
1102
  <!-- Additional Fields for Clone Mode -->
1100
1103
  <div class="git-url-input">
1101
- <label for="cloneInstallCommand">Install Command:</label>
1104
+ <label for="cloneInstallCommand">Install Command (Leave empty to decide later)</label>
1102
1105
  <textarea name="cloneInstallCommand" id="cloneInstallCommand" rows="3" placeholder="Install commands (one per line)"></textarea>
1103
1106
  <div class="checkbox-group">
1104
1107
  <label>
@@ -1109,7 +1112,7 @@ body.dark .command-fields {
1109
1112
  </div>
1110
1113
 
1111
1114
  <div class="git-url-input">
1112
- <label for="cloneStartCommand">Start Command:</label>
1115
+ <label for="cloneStartCommand">Start Command (Leave empty to decide later)</label>
1113
1116
  <textarea name="cloneStartCommand" id="cloneStartCommand" rows="3" placeholder="Start commands (one per line)"></textarea>
1114
1117
  <div class="checkbox-group">
1115
1118
  <label>
@@ -1275,7 +1278,7 @@ body.dark .command-fields {
1275
1278
  <div class="step-content" id="step-3">
1276
1279
  <h2>Step 3: AI Prompt (Optional)</h2>
1277
1280
  <p>Enter a prompt to build your app with AI assistance.</p>
1278
- <blockquote>The prompt will be stored in README.md, which can be used by any AI coding tool to build the app and the launcher.</blockquote>
1281
+ <blockquote>The prompt will be stored in README.md, and ANY AI coding tool will be automatically instructed about the project (Just say "build the app").</blockquote>
1279
1282
  <textarea
1280
1283
  name="aiPrompt"
1281
1284
  id="aiPrompt"
@@ -1439,16 +1442,16 @@ function validateCurrentStep() {
1439
1442
  return false;
1440
1443
  }
1441
1444
 
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
- }
1445
+ // const cloneInstallCommand = document.getElementById('cloneInstallCommand').value.trim();
1446
+ // const cloneStartCommand = document.getElementById('cloneStartCommand').value.trim();
1447
+ // if (!cloneInstallCommand) {
1448
+ // alert('Please enter at least one install command.');
1449
+ // return false;
1450
+ // }
1451
+ // if (!cloneStartCommand) {
1452
+ // alert('Please enter at least one start command.');
1453
+ // return false;
1454
+ // }
1452
1455
  }
1453
1456
 
1454
1457
  // Validate CLI options