liara-cloud / cli Goto Github PK
View Code? Open in Web Editor NEWThe command line interface for Liara
Home Page: https://www.npmjs.com/package/@liara/cli
License: MIT License
The command line interface for Liara
Home Page: https://www.npmjs.com/package/@liara/cli
License: MIT License
I already have an liara.json
file in the root of my project and i expect liara to use the appName
from this file when I use liara logs
.
Line 59 in 5be8715
should be changed to something like:
const project = flags.app || (await readFromLiaraFile()) || (await this.promptProject());
It is good to be able to have multiple-account access (e.g. for freelancers),
you could add something like this in constants.ts for relative path lookup:
import fs from 'fs'
//...
if (fs.existsSync('.liara.json')) {
export const GLOBAL_CONF_PATH = path.resolve('.liara.json')
} else {
export const GLOBAL_CONF_PATH = path.join(os.homedir(), '.liara.json')
}
I was published your test .net core app ,but anyway display "Welcome to nginx!" page, was show.
Same as .net core 7 for my App too.
if I use this command "liara deploy --platform=netcore" then this error occurred:
dirname: missing operand
Try 'dirname --help' for more information.
Could not find a .csproj file.
⠹ Building...The command '/bin/bash -o pipefail -c chmod +x /usr/local/bin/configure.sh && /usr/local/bin/configure.sh' returned a non-zero code: 2
@liara/cli/5.0.0 darwin-arm64 node-v20.5.1
› Error: Deployment failed.
› Sorry for inconvenience. If you think it's a bug, please contact us.
› To file a ticket, please head to: https://console.liara.ir/tickets
hello liara team
I'm trying to run liara --version
command in ubuntu, but this is the result:
(node:438330) UnhandledPromiseRejectionWarning: /usr/local/lib/node_modules/@liara/cli/node_modules/@oclif/core/lib/command.js:45
delete this.baseFlags?.json;
^
SyntaxError: Unexpected token '.'
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/usr/local/lib/node_modules/@liara/cli/node_modules/@oclif/core/lib/index.js:5:19)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
(node:438330) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:438330) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Please add capability that liara cli auto detect new or changed files instead upload all the files
Respect envs section in liara.json
file and pass it to deploy endpoint.
ModuleLoadError: [MODULE_NOT_FOUND] import() failed to load
› /opt/hostedtoolcache/node/18.18.0/x64/lib/node_modules/@liara/cli/lib/comm
› ands/deploy.js: Cannot find module 'call-bind'
› Require stack:
› - /opt/hostedtoolcache/node/18.18.0/x64/lib/node_modules/@liara/cli/node_m
› odules/@ljharb/through/index.js
› Code: MODULE_NOT_FOUND
So many times, when I try to run liara deploy
and provide all the credentials in liara.json file, the compression and uploading process takes forever like it freezes.
It seems --detach for command: liara deploy --detach
not working in windows
after run this command I couldn't access CMD
When I run "liara deploy", I get the following error
› Error: A NodeJS app must be runnable with 'npm start'.
› You must add a 'start' command to your package.json scripts.
We are currently providing support for Node.js v16. However, as per the Node.js Release Schedule and Maintenance Policy, Node.js v16 has reached the end of its maintenance cycle, and there will be no more maintenance releases for this version.
Lets:
Reference:
Node.js Previous Releases
I just pressed ctrl + c when I was using liara shell
and got the following error:
root@c7fbcafa695b:/app# e^C
root@c7fbcafa695b:/app# exit
exit
events.js:352
throw er; // Unhandled 'error' event
^
Error: WebSocket is not open: readyState 2 (CLOSING)
at sendAfterClose (/Users/mhe/n/lib/node_modules/@liara/cli/node_modules/ws/lib/websocket.js:1015:17)
at WebSocket.send (/Users/mhe/n/lib/node_modules/@liara/cli/node_modules/ws/lib/websocket.js:451:7)
at Duplex.duplex._write (/Users/mhe/n/lib/node_modules/@liara/cli/node_modules/ws/lib/stream.js:151:8)
at writeOrBuffer (internal/streams/writable.js:358:12)
at Duplex.Writable.write (internal/streams/writable.js:303:10)
at ReadStream.ondata (internal/streams/readable.js:726:22)
at ReadStream.emit (events.js:387:35)
at addChunk (internal/streams/readable.js:290:12)
at readableAddChunk (internal/streams/readable.js:261:11)
at ReadStream.Readable.push (internal/streams/readable.js:204:10)
Emitted 'error' event on Duplex instance at:
at Duplex.duplexOnError (/Users/mhe/n/lib/node_modules/@liara/cli/node_modules/ws/lib/stream.js:37:10)
at Duplex.emit (events.js:387:35)
at emitErrorNT (internal/streams/destroy.js:106:8)
at errorOrDestroy (internal/streams/destroy.js:168:7)
at onwriteError (internal/streams/writable.js:391:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
It would be nice to have an liara init
command. this command will ask some questions and then generates a liara.json
file based on answers.
Questions like appName, port, platform, disks, which account to use for deploy, ...
@liara/cli/3.2.1 linux-x64 node-v16.14.2
here is my debug logs
$ liara logs --app=XXX -f --debug
[debug] [2024-05-14T09:56:38.974Z] Polling...
[debug] [2024-05-14T09:56:39.947Z] HTTPError: Response code 428 (Precondition Required)
at Request.<anonymous> (file:///home/erfanium/.nvm/versions/node/v20.9.0/lib/node_modules/@liara/cli/node_modules/got/dist/source/as-promise/index.js:86:42)
at Object.onceWrapper (node:events:629:26)
at Request.emit (node:events:526:35)
at Request._onResponseBase (file:///home/erfanium/.nvm/versions/node/v20.9.0/lib/node_modules/@liara/cli/node_modules/got/dist/source/core/index.js:726:22)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Request._onResponse (file:///home/erfanium/.nvm/versions/node/v20.9.0/lib/node_modules/@liara/cli/node_modules/got/dist/source/core/index.js:768:13)
[debug] [2024-05-14T09:56:39.979Z] Polling...
[debug] [2024-05-14T09:56:40.085Z] HTTPError: Response code 428 (Precondition Required)
at Request.<anonymous> (file:///home/erfanium/.nvm/versions/node/v20.9.0/lib/node_modules/@liara/cli/node_modules/got/dist/source/as-promise/index.js:86:42)
at Object.onceWrapper (node:events:629:26)
at Request.emit (node:events:526:35)
at Request._onResponseBase (file:///home/erfanium/.nvm/versions/node/v20.9.0/lib/node_modules/@liara/cli/node_modules/got/dist/source/core/index.js:726:22)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Request._onResponse (file:///home/erfanium/.nvm/versions/node/v20.9.0/lib/node_modules/@liara/cli/node_modules/got/dist/source/core/index.js:768:13)
[debug] [2024-05-14T09:56:40.979Z] Polling...
version:
$ liara --version
@liara/cli/6.0.1 linux-x64 node-v20.9.0
Hi,
I develop some kind of web services, and I plan to use GitLab CI/CD, I ran into a problem for cli
deployment, because cli
ask for email and password for authentication as a prompt question!
so I suggest add new command key like --api_token
to pass automatically this authentication prompt for deployment.
Hello, thanks for your awesome package.
I work as a freelancer so I have a lot of Liara accounts on my machine. even though I specified the app name in liara.json file, I have to change the account each time I change my workspace. it would be better if I could specify account name in liara.json file. something like my-username/my-app would be great. or even better the cli first searches for a matching app with the name specified in the main account, if not found, it search for it in other accounts too.
Sounds like after upgrading oclif to the latest version, we've missed a part.
https://github.com/oclif/core/blob/main/MIGRATION.md#update-your-bin-scirpts
We should be able to run the cli using ./bin/dev
file in development mode.
~ $ npm i -g @liara/cli
npm WARN deprecated [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
Would be great if you can add logout ability to the CLI tool.
Prefer to use lint-staged.
I'm gonna make this PR as soon as possible.
ability to set set list of volumes like :
{
"platform": "docker",
"project": "myApp",
"port": 8080,
"volume": [
"/opt/app/data",
"/opt/app/log",
"/opt/app/backup"
]
}
when using liara logs command like this:
liara logs --since=1714024894
cli will print just a few logs, but it should be many.
print all the logs from 1714024894
to now
That's because when I don't use --follow
, liara cli only makes one single API call to the sever. but in case of --since
, cli should do many API calls to the server in a loop
Wish you the bests. Really enjoyed your job.
See code links in deploy, liara login, liara logs, liara restart, liara start, liara stop, liara tunnel:open and close gives us 404 error.
sth like liara login --web
✖ Upload failed.
@liara/cli/5.1.1 linux-x64 node-v18.18.2
› Error: Deployment failed.
› To get help, visit our documentation at: https://docs.liara.ir/
›
› Additionally, you can also retry the build with the debug flag:
› $ liara deploy --debug
Error: Process completed with exit code 2.
Hi
After installation using "npm install -g @liara/cli" on windows 10x64, all commands (except -v and help) show the following error:
"SyntaxError: Unexpected token *"
here is the error log:
# liara deploy --build-arg='staging=1'
App: client
Path: /Users/vanenshi/Work/client-website
Platform: docker
Port: 80
Disks:
next-cache -> /app/.next/cache
Compressed size: 12.65MB (use .gitignore to reduce the size)
✔ Upload finished.
› Error: CODE 400: child "build" fails because [child "args" fails because ["args" must be an object]]
I have installed the @liara/cli using the npm install -g @liara/cli command in my terminal. However, when I try to run the "liara" command in my terminal, it returns an error message that reads "zsh: command not found: liara".
I have tried uninstalling and reinstalling @liara/cli multiple times, but the issue persists. I have also tried restarting my terminal and my computer, but the error message still appears.
Can anyone please help me resolve this issue? I would appreciate any suggestions or insights on how to fix this problem.
Environment:
Version: 2.21.2
Platform: Darwin-arm64
Error: write EPROTO 4419732864:error:1408F10B:SSL routines:ssl3_get_record:wrong version
› number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:
Can't signing in to my accounts
وقتی سعی میکنم برنامه رو نصب کنم ارور زیر رو میده!
sudo npm install -g @liara/cli
[sudo] password for ×××××:
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@liara/[email protected]',
npm WARN EBADENGINE required: { node: '>=14.0.0' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@oclif/[email protected]',
npm WARN EBADENGINE required: { node: '>=14.0.0' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
changed 286 packages, and audited 287 packages in 19s
44 packages are looking for funding
run `npm fund` for details
4 moderate severity vulnerabilities
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
و این که نمیتونم نسخه node رو بروز کنم! میگه این اخرین نسخه هست. دقیقا چی کار کنم؟!
...-:::::-... msadr471@Earth
.-MMMMMMMMMMMMMMM-. --------------
.-MMMM`..-:::::::-..`MMMM-. OS: Linux Mint 21.1 x86_64
.:MMMM.:MMMMMMMMMMMMMMM:.MMMM:. Host: X541UVK 1.0
-MMM-M---MMMMMMMMMMMMMMMMMMM.MMM- Kernel: 5.15.0-56-generic
`:MMM:MM` :MMMM:....::-...-MMMM:MMM:` Uptime: 4 hours, 30 mins
:MMM:MMM` :MM:` `` `` `:MMM:MMM: Packages: 4419 (dpkg), 14 (flatpak), 9 (snap)
.MMM.MMMM` :MM. -MM. .MM- `MMMM.MMM. Shell: bash 5.1.16
:MMM:MMMM` :MM. -MM- .MM: `MMMM-MMM: Resolution: 1920x1080
:MMM:MMMM` :MM. -MM- .MM: `MMMM:MMM: DE: Cinnamon 5.6.5
:MMM:MMMM` :MM. -MM- .MM: `MMMM-MMM: WM: Mutter (Muffin)
.MMM.MMMM` :MM:--:MM:--:MM: `MMMM.MMM. WM Theme: Mint-Y-Legacy-Dark-Orange (Mint-Y)
:MMM:MMM- `-MMMMMMMMMMMM-` -MMM-MMM: Theme: Mint-Y-Dark-Orange [GTK2/3]
:MMM:MMM:` `:MMM:MMM: Icons: Mint-Y-Red [GTK2/3]
.MMM.MMMM:--------------:MMMM.MMM. Terminal: gnome-terminal
'-MMMM.-MMMMMMMMMMMMMMM-.MMMM-' CPU: Intel i7-7500U (4) @ 3.500GHz
'.-MMMM``--:::::--``MMMM-.' GPU: Intel HD Graphics 620
'-MMMMMMMMMMMMM-' GPU: NVIDIA GeForce 920MX
``-:::::-`` Memory: 5191MiB / 7831MiB
****@****:~$ npm -v
9.2.0
****@****:~$ nodejs -v
v12.22.9
We have to integrate this repo with a CI service like TravisCI to run tests automatically.
So we can make sure that PRs are passing the tests.
from:
› Error: Response code 401 (Unauthorized)
to:
› Error: Authentication failed. Please log in to your account by running `liara login` command.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.