Coder Social home page Coder Social logo

arena-js's People

Contributors

broskoski avatar dependabot[bot] avatar freder avatar ianmcdonald avatar ivangreene 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

arena-js's Issues

Better testing

Need to find a more sane way to run tests. Shouldn't bog down the live API with requests.
Currently tests are very repetitive and only test path construction and parameter interpolation for each method.

Ensure cross-origin requests are properly handled by Axios

I have yet to test this module in-browser, GET requests should already work in theory. Axios has options to automatically make the appropriate requests for other methods. Possibly allow a second parameter to the constructor for options/config to pass directly to Axios?

Docs example for block creation references string, but seems to require obj

Just a heads up for the readme example, noticed that attempts to create a block using arena.block().create("great-websites", "are.na/") yielded a

.../node_modules/are.na/index.js:128
        if (opts.content.match(/^https?:\/\//)) {
                         ^

TypeError: Cannot read property 'match' of undefined

error. This appears to be addressed by passing an object rather than a string as the argument:

const newBlock = {
  content: "are.na",
  title: "Your Title",
  description: "Your desc"
}


arena.block().create("great-websites", newBlock);

Create example scripts

Provide simple, fully functioning examples/ for consumers of this module to experiment with and base their own implementations on.

Blocks metadata?

Hello, is it possible to add custom metadata to blocks?
Something like Tags o custom fields? I tried to integrate YAML attributes on markdown blocks but it seems not to be working.

Thanks in advance!

Manuel

Axios vulnerability

Axios ^0.17.1 dependency is out of date, and running $ yarn/npm audit throws a moderate vulnerability. ⤵

┌───────────────┬──────────────────────────────────────────────────────────────┐
│ moderate      │ Denial of Service                                            │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ axios                                                        │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Patched in    │ >=0.18.1                                                     │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ axios                                                        │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ axios                                                        │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://www.npmjs.com/advisories/880                         │
└───────────────┴──────────────────────────────────────────────────────────────┘

From the npm advisory

Overview

Versions of axios prior to 0.18.1 are vulnerable to Denial of Service. If a request exceeds the maxContentLength property, the package prints an error but does not stop the request. This may cause high CPU usage and lead to Denial of Service.

Remediation

Upgrade to 0.18.1 or later.

Resources

Think this might be also be getting caught by some twitchy anti-virus software, but will update when I figure out.

Options not being passed.

Always getting 25 results no matter what I pass into the query.

Testing from the demo code in the readme.

arena.channel('arena-influences').contents({ page: 1, per: 3 })
  .then(content => {
    console.log(content.length)
  })
  .catch(err => console.log(err));

If I dig into the axios request - everything looks to be included, but no dice. Tested in choo and CRA.

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.