pinokiod 1.0.5 → 1.0.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -38,20 +38,33 @@ const installname = async (url, name) => {
38
38
  }
39
39
  }
40
40
  const install = async (name, url, term, socket, options) => {
41
+ console.log("options", options)
41
42
  const n = new N()
42
43
  await new Promise((resolve, reject) => {
43
44
  socket.close()
44
45
 
45
46
  // normalize git url to the standard .git format
47
+ let branch
48
+ if (options && options.branch) {
49
+ branch = options.branch
50
+ }
46
51
 
47
52
  if (!url.endsWith(".git")) {
48
53
  url = url + ".git"
49
54
  }
50
55
 
56
+ console.log({ url , branch })
57
+ let cmd
58
+ if (branch) {
59
+ cmd = `git clone -b ${branch} ${url} ${name}`
60
+ } else {
61
+ cmd = `git clone ${url} ${name}`
62
+ }
63
+ debugger
51
64
  socket.run({
52
65
  method: "shell.run",
53
66
  params: {
54
- message: `git clone ${url} ${name}`,
67
+ message: cmd,
55
68
  path: "~/api"
56
69
  }
57
70
  }, (packet) => {
@@ -507,7 +507,7 @@ const renderSelection = (e, force) => {
507
507
  console.log("# 5", { src: targetFrame.src, href: target.href, target: target.target })
508
508
  // triggered with a click
509
509
  // do not reload iframe if the href and the src is the same
510
- if (targetFrame.src.includes(target.target) {
510
+ if (targetFrame.src.includes(target.target)) {
511
511
  // if (targetFrame.src.includes(target.href)) {
512
512
  // if (targetFrame.src === target.href) {
513
513
  e.preventDefault()