Giter Club home page Giter Club logo

lama2's People

Contributors

bstaz avatar bumblebee1337 avatar lovestaco avatar nowke avatar rijultp avatar shrsv avatar varunvd avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

lama2's Issues

Investigate MULTIPART file attachments

With the changes related to l2config.env, I think MULTIPART attachments have gone broken. The MULTIPART attachment path must always be calculated relative the relevant .l2 file.

Moreover, in the environment loading logic, we seem to be making an error, that is chdir, load up env, chdir, go on parsing, making request, etc. The second chdir probably should happen as the last action.

@lovestaco

Windows & WSL Platform Support

Lama2 support in pure Windows and WSL contexts requires an end to end testing and calibration:

  1. Modify install.sh script to support Windows & WSL
  2. Update mechanism -u
  3. HexmosTech/Lama2Code support both in pure Windows and WSL

Windows Install Failed

choco -v

2.2.2
PS C:\WINDOWS\system32> choco install lama2 --version=1.0.0 --force -y
Chocolatey v2.2.2
3 validations performed. 2 success(es), 1 warning(s), and 0 error(s).

Validation Warnings:

  • A pending system reboot request has been detected, however, this is
    being ignored due to the current Chocolatey configuration. If you
    want to halt when this occurs, then either set the global feature
    using:
    choco feature enable --name="exitOnRebootDetected"
    or pass the option --exit-when-reboot-detected.

Installing the following packages:
lama2
By installing, you accept licenses for the packages.
lama2 not installed. The package was not found with the source(s) listed.
Source(s): 'https://community.chocolatey.org/api/v2/'
NOTE: When you specify explicit sources, it overrides default sources.
If the package version is a prerelease and you didn't specify --pre,
the package may not be found.
Version was specified as '1.0.0'. It is possible that version
does not exist for 'lama2' at the source specified.
Please see https://docs.chocolatey.org/en-us/troubleshooting for more
assistance.

Chocolatey installed 0/1 packages. 1 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures

  • lama2 - lama2 not installed. The package was not found with the source(s) listed.
    Source(s): 'https://community.chocolatey.org/api/v2/'
    NOTE: When you specify explicit sources, it overrides default sources.
    If the package version is a prerelease and you didn't specify --pre,
    the package may not be found.
    Version was specified as '1.0.0'. It is possible that version
    does not exist for 'lama2' at the source specified.
    Please see https://docs.chocolatey.org/en-us/troubleshooting for more
    assistance.

Enjoy using Chocolatey? Explore more amazing features to take your
experience to the next level at
https://chocolatey.org/compare

Prettify command switch for `l2` CLI

The prototype version of l2 had an option to prettify/standardize .l2 files. The previous version depended entirely on regular expressions for identifying the various pieces of input (verb, url, headers, json/varjson). It is not entirely clear, what is the correct approach to implementing a prettification algorithm. Hence, the task involves two phases:

  1. Specify the approach/algorithm
  2. Implement the algorithm

Note that, in the present version, it is almost trivial to implement JSON prettification. The difficulty is in dealing with arbitrary input order (say URL comes before Verb).

Easy way to URL encode parameters

Example file:

GET
${LOCAL_COORD}/api/request-pwd/[email protected]

In this case + is a special character which is part of the email value. It is not being interpreted correctly at backend.

However, if I URL encode the + character as follows, it works as expected:

${LOCAL_COORD}/api/request-pwd/?email=qp0co2%2Bc5yyclrbbhrt3e%40sharklasers.com

get "tar: Option --overwrite is not supported" on macos install

I'm using the command:

curl -s https://hexmos.com/lama2/install.sh | bash -s

and getting the following error message in the end:

tar: Option --overwrite is not supported
Usage:
  List:    tar -tf <archive-filename>
  Extract: tar -xf <archive-filename>
  Create:  tar -cf <archive-filename> [filenames...]
  Help:    tar --help
mv: rename /tmp/l2 to /usr/local/bin/l2: No such file or directory

The os version: macos Ventura version 13.1

Integer variable expansion fails in JSON body

image

${uid} expansion fails in the above example. If we include quotes around the variable ("${uid}"), variable expansion works as expected. However, the former case is supposed to work.

Export l2 file into cURL, Python, JS, etc

It'll be super handy to have an option to generate Python/JS/Other code from .l2 specifications.

curlconverter seems like a nice JS project which can generate code in multiple languages, given a curl input. So, then, the subproblems become:

  1. Create cURL from .l2
  2. Use goja VM to load curlconverter
  3. Pass the new curl command to curlconverter, to get code in various languages
  4. Add UI support in VSCode extension

How to make use of variable to remember the response and use it in subsequence command?

For application using JWT token this is the typical use case, like this in my current curl script:

TOKEN=$(curl   -d '{"email": "[email protected]", "pass": "hello"}' -H 'Content-Type: application/json'  http://localhost:3210/rpc/login | jq -r '.token')

curl -H 'Accept: application/json' -H "Authorization: Bearer ${TOKEN}" http://localhost:3210/user_articles?select=title

The first line gets the token from the response and then use the token to GET the result from the second line request.

Autocomplete variables in VSCode extension

We tend to have variables for remote/local hostname, and presently it is cumbersome to switch between the various values. Build an autocomplete for variables; fetch values from l2.env and if possible from JS blocks.

Add support for `x-www-form-urlencoded`

The following request cannot be made presently using Lama2:

curl --request POST \
  --url http://localhost:3000/oauth/token \
  --header 'Authorization: Basic YXBwbGljYXRpb246c2VjcmV0' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data grant_type=password \
  --data username=pedroetb \
  --data password=password

We have the MULTIPART keyword, but that is not exactly x-www-form-urlencoded. The difference between these two options can be found at SO

Maybe we could have something as simple as:

POST
FORM
http://xyz

a=b
c=d

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.