Coder Social home page Coder Social logo

everflow-sdk's People

Contributors

dependabot[bot] avatar hmigneron avatar jonathanbl avatar julienmouyal avatar lacroixdavid1 avatar mmartin5 avatar olivierboucher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

everflow-sdk's Issues

Unresolved EF.click() when transaction_id is empty string

I have a problem where EF.click() will return a transaction_id === '' In this case the Promise EF.Click is never resolved.

everflow-sdk/src/sdk.js

Lines 255 to 272 in 0ddfd41

fetch(url.toString(), {
method: 'GET',
credentials: 'include'
})
.then((response) => response.json(),
(error) => {
console.error(error);
resolve("");
})
.then((response) => {
if (response.transaction_id && response.transaction_id.length > 0) {
const tidOffer = this._fetch(`ef_tid_c_o_${response.oid || options.offer_id}`);
this._persist(`ef_tid_c_o_${response.oid || options.offer_id}`, tidOffer && tidOffer.length > 0 ? `${tidOffer}|${response.transaction_id}` : response.transaction_id);
const tidAdv = this._fetch(`ef_tid_c_a_${response.aid}`);
this._persist(`ef_tid_c_a_${response.aid}`, tidAdv && tidAdv.length > 0 ? `${tidAdv}|${response.transaction_id}` : response.transaction_id);
resolve(response.transaction_id);
}
})

Not a valid ES Module

Hi ๐Ÿ‘‹๐Ÿพ

I'm attempting to use the Everflow SDK in my SvelteKit project, which runs on Vite, but upon installing the @everflow/everflow-sdk and running my project, I get the following error. Is this something you all can update to make your package more usable?

@everflow/everflow-sdk doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module (i.e. it doesn't have "type": "module" or an .mjs extension for the entry point). Please contact the package author to fix.
/node_modules/.pnpm/@[email protected]/node_modules/@everflow/everflow-sdk/src/fp_sdk.js:17
                __vite_ssr_import_0__.default.get((components) => {
                                              ^

TypeError: Cannot read properties of undefined (reading 'get')
    at eval (/node_modules/.pnpm/@[email protected]/node_modules/@everflow/everflow-sdk/src/fp_sdk.js:17:47)
    at new Promise (<anonymous>)
    at eval (/node_modules/.pnpm/@[email protected]/node_modules/@everflow/everflow-sdk/src/fp_sdk.js:16:20)

Thanks!

Cannot Import EF into projects - Lacking Proper Documentation

After adding the @everflow/everflow-sdk package to my project, it seems that the contents of the package are not accessible by my project, via es5 and es6 syntax (require and import aren't working). Do I need to have an npmrc config to use this? I'm seeing errors saying that the package may lack proper main configuration in its package.json, which seems to be true as there is no index.js at the top level of the project.

Given that this repo is used and installed differently than a script tag, can you please add some documentation on how to use it and what steps are necessary to make its contents importable?

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.