Code Monkey home page Code Monkey logo

carbone-sdk-node's People

Contributors

dgrelaud avatar dobby85 avatar steevepay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

moofoo mtpoison

carbone-sdk-node's Issues

Error: while rendering template Cannot detect file extension

I have the expected template right in the path. I'm getting this error once in a while but not always. At first, it works well then it won't work later on.

Node version: 16.0.0 or 14.16.1
Carbone-sdk version: 1.0.0
OS: MacOS, M1

I'm using carbone.renderPromise() for promise based response.

// Function declaration:

export const renderReport = async (
    absolutePathToTemplate: string,
    data: any
) => {
    return carboneSDK.renderPromise(absolutePathToTemplate, data);
};

// And then called using this

const { content } = await renderReport(
            templatePath,
            dummyDataForCarbone
 );

Typescript declaration file

Hello,

I'm using your package with Typescript and I'm having some difficulties with the types, I tried npm i --save-dev @types/carbone-sdk and it seems that you don't have a Typescript package.

So, do you have a declaration file for Typescript?

Thank you.

Accept URL without slash in .setOptions

This code works

carboneV2.setOptions({
  carboneUrl : https://caboneurl:2000/ 
});

This code does not work:

carboneV2.setOptions({
  carboneUrl : https://caboneurl:2000
});

Create a request queue

Problems

  • If a template is not uploaded yet and the render method is called in a loop, the SDK will upload x time the same template.
  • Requests with no delay

Solution

Create request queue to:

  • avoid duplicated requests when adding a template, we could create a request queue.
  • add delay between requests

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.