Giter Club home page Giter Club logo

gobot's People

Contributors

benallfree avatar tsfreddie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gobot's Issues

Doesn't detect `pb_public` folder with `pocketbase`

It works well when running bun x gobot pocketbase serve and creates pb_data & pb_migrations folder in the directory i ran it

But after adding a simple html file in pb_public folder in the same directory it fails to detect it and results in a data not found

As illustrated in this vid

d681b660-4d16-416e-93b7-03e5e4296f1e.mp4

List binary location.

const bot = await gobot(`pocketbase/pocketbase`, { version: `~0.22.12` });

bot.exePath // ???????

Need to know where Gobot downloaded the binary. For example if I want to run ./pocketbase migrations create with said binary.

0.22.8 wont download on Windows 64

file:///C:/Users/toryb/source/repos/Failreactor-Pocketbase%20-%20JS/node_modules/gobot/dist/chunk-Y2WPSBSM.js:435
      throw new Error(
            ^

Error: No release satisfying version ~0.22.8 for win32/x64

https://github.com/pocketbase/pocketbase/releases/tag/v0.22.8

Works when I set it to ~0.22.7 via:

import { gobot } from "gobot";
import { fileURLToPath } from "url";
import { dirname, join } from "path";

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

const bot = await gobot(`pocketbase/pocketbase`, { version: `~0.22.8` });
bot.run([`-v`]);
bot.run([`serve`, `--dir=${join(__dirname, "pb_data")}`]);

Updated from alpha 14 to 34 and getting an error

image

First it complained with this code:

import { gobot } from "gobot";
const bot = await gobot(`pocketbase`);
bot.run([`--help`]);

Error: pocketbase is not a binary known to Gobot. Try user/repo

this fixed that error:

import { gobot } from "gobot";
const bot = await gobot(`pocketbase/pocketbase`);
bot.run([`--help`]);

Got to say, its a major issue that code copied right off the README does not work. Anyway, after fixing the code, it appears pocketbase.exe downloads correctly, but the error says:

Error: Could not find pocketbase.exe anywhere in path C:\Users\toryb\AppData\Local\gobot-nodejs\Cache\pocketbase\pocketbase\archives\0.22.7\x64\win32

Which is imply not true, ls C:\Users\toryb\AppData\Local\gobot-nodejs\Cache\pocketbase\pocketbase\archives\0.22.7\x64\win32 reveals pocketbase.exe is right there in the folder.

pocketbase --dir does not work

import { gobot } from "gobot";
import { fileURLToPath } from "url";
import { dirname, join } from "path";

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

const bot = await gobot(`pocketbase/pocketbase`);
bot.run([`-v`]);
bot.run([`serve --dir ${join(__dirname, "/pb_data")}`]);
pocketbase.exe version 0.22.7
Error: unknown command "serve --dir 'C:\\Users\\toryb\\source\\repos\\Failreactor-Pocketbase - JS\\pb_data'" for "pocketbase.exe"
Run 'pocketbase.exe --help' for usage.

I have my index.js and my /pb_data in the same folder, I think most people will do this. Otherwise, wouldn't upgrading the PB version via GotBot create a new pb_data?

Anways, Gobot is not correctly passing the args to pocketbase it seems. As running the command manually works fine:

C:\Users\toryb\AppData\Local\gobot-nodejs\Cache\pocketbase\pocketbase\archives\0.22.7\x64\win32\pocketbase.exe serve --dir 'C:\\Users\\toryb\\source\\repos\\Failreactor-Pocketbase - JS\\pb_data'

Alpha 34 to 36 breaks Pocketbase

Code:

import { gobot } from "gobot";
import { fileURLToPath } from "url";
import { dirname, join } from "path";

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

const bot = await gobot(`pocketbase/pocketbase`, { version: `~0.22.7` });
bot.run([`-v`]);
bot.run([`serve`, `--dir=${join(__dirname, "pb_data")}`]);

image

Run npm i [email protected]

image

Broken, color output gone, URL wrong. Exact same index.js code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.