Coder Social home page Coder Social logo

fiskaly-sdk-node's People

Contributors

lumio avatar mihajlon97 avatar pgaubatz avatar prempador avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fiskaly-sdk-node's Issues

Service binary on macOS prints output to stderr since 1.2.100

Problem

We updated the Fiskaly service binary (from https://developer.fiskaly.com/downloads) from 1.2.000 to 1.2.100 and it looks like it's behavior on macOS changed.

When running 1.2.000 (com.fiskaly.service-darwin-amd64-v1.2.000) the log output is sent through stdout
When running 1.2.100 (com.fiskaly.service-darwin-amd64-v1.2.100) the output gets sent through stderr

We are using stderr output as an indication that something failed while starting the Fiskaly service.

Reproduction steps
This can be tried out by prefixing the console output using stdout or stderr like this:

➜  bin git:(fiskaly-update) ✗ ./com.fiskaly.service-darwin-amd64-v1.2.000 2> >(sed 's/^/stderr: /') > >(sed 's/^/stdout: /')
stdout: http service listening on :8080

➜  bin git:(fiskaly-update) ✗ ./com.fiskaly.service-darwin-amd64-v1.2.100 2> >(sed 's/^/stderr: /') > >(sed 's/^/stdout: /')
stderr: 2020/11/24 11:28:04 main.go:35: http service listening on :8080

Expected outcome
Regular logging/info output is printed through stdout for regular output and to stderr for errors.

debug_level: 4 from example in README ends in internal error

in the README you provide an example how to enable debug mode. This example uses "debug_level: 4" which (in my case) alway ends in an "internal error" if I send a request.
According to documentation of the service the highes debug level is 3, which works as expected.

NPM packages broken

latest NPM Packages are broken (seems to be empty).
Last working version is 1.2.0

Add option to customize client library path

Currently the path to the client library is hardcoded to the path of the source file.
In our (compiled) electron app there is no such path.
Please add an option to customize the path where to find the client library, so we can point it to an existing directory.

ffi-napi subdependeny causes issue on M1 Mac

The SDK can't be installed on a M1 Mac unfortunately. It is ok, when using Rosetta on your terminal, but with native M1 it's not working. With ffi-napi 4.0.3 it's working. Would it be possible to update that subdependeny?

npm ERR! code 1
npm ERR! path /Users/me/Developer/test/node_modules/fiskaly-sdk-node/node_modules/ffi-napi
npm ERR! command failed
npm ERR! command sh -c node-gyp-build
npm ERR! CC(target) Release/obj.target/nothing/../node-addon-api/src/nothing.o
npm ERR!   LIBTOOL-STATIC Release/nothing.a
npm ERR!   CC(target) Release/obj.target/ffi/deps/libffi/src/prep_cif.o
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | arm64
npm ERR! gyp info find Python using Python version 3.9.9 found at "/opt/homebrew/opt/[email protected]/bin/python3.9"
npm ERR! gyp info spawn /opt/homebrew/opt/[email protected]/bin/python3.9
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/Users/me/.nvm/versions/node/v16.13.2/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/me/Developer/test/node_modules/fiskaly-sdk-node/node_modules/ffi-napi/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/me/.nvm/versions/node/v16.13.2/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/me/Library/Caches/node-gyp/16.13.2/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/Users/me/Library/Caches/node-gyp/16.13.2',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/Users/me/.nvm/versions/node/v16.13.2/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/me/Library/Caches/node-gyp/16.13.2/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/me/Developer/test/node_modules/fiskaly-sdk-node/node_modules/ffi-napi',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! warning: /Library/Developer/CommandLineTools/usr/bin/libtool: archive library: Release/nothing.a the table of contents is empty (no object file members in the library define global symbols)
npm ERR! ../deps/libffi/src/prep_cif.c:26:10: fatal error: 'ffi.h' file not found
npm ERR! #include <ffi.h>
npm ERR!          ^~~~~~~
npm ERR! 1 error generated.
npm ERR! make: *** [Release/obj.target/ffi/deps/libffi/src/prep_cif.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/Users/me/.nvm/versions/node/v16.13.2/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Darwin 21.2.0
npm ERR! gyp ERR! command "/Users/me/.nvm/versions/node/v16.13.2/bin/node" "/Users/me/.nvm/versions/node/v16.13.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /Users/me/Developer/test/node_modules/fiskaly-sdk-node/node_modules/ffi-napi
npm ERR! gyp ERR! node -v v16.13.2
npm ERR! gyp ERR! node-gyp -v v8.3.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/me/.npm/_logs/2022-01-17T08_39_30_637Z-debug.log

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.