lukaskollmer / objc Goto Github PK
View Code? Open in Web Editor NEW๐ฎ NodeJS โ Objective-C bridge (experimental)
License: MIT License
๐ฎ NodeJS โ Objective-C bridge (experimental)
License: MIT License
This is a follow-up question to my previous one, and again I'm not sure if it's a bug or I'm doing something wrong.
I'm trying to check that the errorOut
variable is null in the following code:
const trashedFileUrlOut = objc.allocRef();
const errorOut = objc.allocRef();
const fm = NSFileManager.defaultManager();
const success = fm.trashItemAtURL_resultingItemURL_error_(
nsFileUrl,
trashedFileUrlOut,
errorOut
);
// Fails because errorOut seems to be an empty object in JS
expect(errorOut).toBeNull();
// js function fails with 'Unable to find method isKindOfClass_ on object (null)'
expect(objc.js(errorOut)).toBeNull();
But I seem to need some other way of converting a null NSError*
into JS land.
how can i import custom framework ,for example test.framework?
Bravo for doing this. I'm jonesing to pass in a delegate that ends up as a callback/event in JS. I see you support blocks; is there a way to define a delegate?
when install objc,
got an error:
[email protected]: The engine "node" is incompatible with this module. Expected version ">=8 <9". Got "10.13.0"
Hi! I'm trying to find all scan devices using ImageCaptureCore, but the code below doesn't call the delegate's methods. And the similar Objective-C code does.
Maybe I'm wrong somewhere because header file(https://github.com/phracker/MacOSX-SDKs/blob/master/MacOSX10.7.sdk/System/Library/Frameworks/ImageCaptureCore.framework/Versions/A/Headers/ICDeviceBrowser.h) is slight different from your example with NSFileManager
const objc = require('../src/index');
const ICDeviceLocationTypeMaskLocal = 0x00000100;
const ICDeviceLocationTypeMaskShared = 0x00000200;
const ICDeviceLocationTypeMaskBonjour = 0x00000400;
const ICDeviceLocationTypeMaskBluetooth = 0x00000800;
const ICDeviceLocationTypeMaskRemote = 0x0000FE00;
const ICDeviceTypeMaskCamera = 0x00000001;
const ICDeviceTypeMaskScanner = 0x00000002;
objc.import('ImageCaptureCore');
const {
ICDeviceBrowser
} = objc;
const DeviceBrowserDelegate = objc.createClass('DeviceBrowserDelegate', 'NSObject', {
"deviceBrowser:didAddDevice:moreComing:": (self, cmd, fileManager, srcPath, dstPath) => {
console.log("deviceBrowser:didAddDevice:moreComing:");
return 1;
},
"deviceBrowser:didRemoveDevice:moreGoing:": (self, cmd, fileManager, srcPath, dstPath) => {
console.log("deviceBrowser:didAddDevice:moreComing:");
return 1;
},
_encodings: {
"deviceBrowser:didAddDevice:moreComing:": ['v', ['@', ':', '@', '@', 'c']],
"deviceBrowser:didRemoveDevice:moreGoing:": ['v', ['@', ':', '@', '@', 'c']]
}
});
const deviceBrowser = ICDeviceBrowser.alloc().init();
const delegate = DeviceBrowserDelegate.new();
deviceBrowser.setDelegate_(delegate);
const mask = ICDeviceTypeMaskScanner | ICDeviceLocationTypeMaskLocal | ICDeviceLocationTypeMaskShared | ICDeviceLocationTypeMaskBonjour | ICDeviceLocationTypeMaskRemote;
deviceBrowser.setBrowsedDeviceTypeMask_(mask);
deviceBrowser.start();
setInterval(() => {
console.log(deviceBrowser.isBrowsing());
}, 2000);
I want to convert nativeWindowHandle to NSView, like
const myView = win.getNativeWindowHandle()
$.myFramework.setView(myView)
any suggestion?
I'm looking to create a block that takes an NSRange, and it seems I can't use a struct as a parameter, as I get TypeError: Unable to coerce type from [StructType] when supplying objc.types.NSRange as a type. Any ideas on how to do this? I'm also not sure how to create a block that takes primitives or the BOOL type (I'm trying to create a block of type ^(NSDictionary *attrs, NSRange range, BOOL *stop) {}
I'm getting an exception when calling
AVCaptureVideoDataOutput.setSampleBufferDelegate_queue_(delegate, queue)
.
While I am able to call other AVCaptureSession-related methods, this one throws an exception.
Two possible differences:
dispatch_queue_create
using ffi.In both cases I may not entirely know what I'm doing, but I think I'm setting up these arguments correctly.
I distilled the problem down in this gist:
https://gist.github.com/jmbldwn/0ca994f69ed9f7d0e5adcef2bb4c1e4f
The exception is triggered by the call to runtime.msgSend(types[returnType], argumentTypes);
at line 97 of instance.js.
Call stack:
Exception has occurred: Error
Error: NSInvalidArgumentException *** -[__NSDictionaryM setObject:forKey:]: object cannot be nil (key: get)
at Instance.call (/Users/jim/development/node/objc/test/node_modules/objc/src/instance.js:110:13)
at Object.apply (/Users/jim/development/node/objc/test/node_modules/objc/src/proxies.js:21:19)
at Function.ns (/Users/jim/development/node/objc/test/node_modules/objc/src/instance.js:249:20)
at argv.map (/Users/jim/development/node/objc/test/node_modules/objc/src/instance.js:90:31)
at Array.map (<anonymous>)
at Instance.call (/Users/jim/development/node/objc/test/node_modules/objc/src/instance.js:68:23)
at Object.apply (/Users/jim/development/node/objc/test/node_modules/objc/src/proxies.js:21:19)
at Function.ns (/Users/jim/development/node/objc/test/node_modules/objc/src/instance.js:249:20)
at argv.map (/Users/jim/development/node/objc/test/node_modules/objc/src/instance.js:90:31)
at Array.map (<anonymous>)
Anything else I should be trying?
Here is the log:
132 silly install [email protected]
133 info lifecycle [email protected]install: [email protected]install: unsafe-perm in lifecycle true
134 verbose lifecycle [email protected]
135 verbose lifecycle [email protected]install: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/rand/node_modules/ref/node_modules/.bin:/Users/rand/node_modules/.bin:/Users/rand/narwhal/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:/Users/rand/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/opt/local/bin:/opt/local/sbin:/Users/rand/Qt5.11.2/5.11.2/clang_64/bininstall: CWD: /Users/rand/node_modules/ref
136 verbose lifecycle [email protected]
137 silly lifecycle [email protected]install: Args: [ '-c', 'node-gyp rebuild' ]install: Returned: code: 1 signal: null
138 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 306ms
139 timing audit body Completed in 103ms
140 silly lifecycle [email protected]
141 info lifecycle [email protected]~install: Failed to exec install script
142 timing action:install Completed in 1767ms
143 verbose unlock done using /Users/rand/.npm/_locks/staging-e38be857e37e0d06.lock for /Users/rand/node_modules/.staging
144 timing stage:rollbackFailedOptional Completed in 67ms
145 timing stage:runTopLevelLifecycles Completed in 2597ms
146 silly saveTree rand
146 silly saveTree โโโ [email protected]
146 silly saveTree โโโฌ [email protected]
146 silly saveTree โ โโโ [email protected]
146 silly saveTree โโโ [email protected]
146 silly saveTree โโโ [email protected]
146 silly saveTree โโโฌ [email protected]
146 silly saveTree โโโฌ [email protected]
146 silly saveTree โ โโโฌ [email protected]
146 silly saveTree โ โ โโโ [email protected]
146 silly saveTree โ โโโ [email protected]
146 silly saveTree โโโ [email protected]
146 silly saveTree โโโ [email protected]
147 warn enoent ENOENT: no such file or directory, open '/Users/rand/package.json'
148 verbose enoent This is related to npm not being able to find a file.
149 warn rand No description
150 warn rand No repository field.
151 warn rand No README data
152 warn rand No license field.
153 verbose stack Error: [email protected] install: node-gyp rebuild
153 verbose stack Exit status 1
153 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
153 verbose stack at EventEmitter.emit (events.js:203:13)
153 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
153 verbose stack at ChildProcess.emit (events.js:203:13)
153 verbose stack at maybeClose (internal/child_process.js:1021:16)
153 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
154 verbose pkgid [email protected]
155 verbose cwd /Users/rand
156 verbose Darwin 18.6.0
157 verbose argv "/usr/local/Cellar/node/12.6.0/bin/node" "/usr/local/bin/npm" "install" "--save" "objc"
158 verbose node v12.6.0
159 verbose npm v6.9.0
160 error code ELIFECYCLE
161 error errno 1
162 error [email protected] install: node-gyp rebuild
162 error Exit status 1
163 error Failed at the [email protected] install script.
163 error This is probably not a problem with npm. There is likely additional logging output above.
164 verbose exit [ 1, true ]
And the stack trace:
[email protected] install /Users/rand/node_modules/ref
node-gyp rebuild
CXX(target) Release/obj.target/binding/src/binding.o
../src/binding.cc:222:30: error: no matching member function for call to 'BooleanValue'
bool persistent = info[3]->BooleanValue();
~~~~~~~~~^~~~~~~~~~~~
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:2559:8: note: candidate function not viable: requires single argument 'isolate',
but no arguments were provided
bool BooleanValue(Isolate* isolate) const;
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:2562:51: note: candidate function not viable: requires single argument 'context',
but no arguments were provided
V8_WARN_UNUSED_RESULT Maybe BooleanValue(
^
../src/binding.cc:253:38: error: too few arguments to function call, single argument 'context' was not specified
size_t size = info[2]->Uint32Value();
~~~~~~~~~~~~~~~~~~~~ ^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:2567:3: note: 'Uint32Value' declared here
V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:351:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT attribute((warn_unused_result))
^
../src/binding.cc:360:23: error: no matching constructor for initialization of 'String::Utf8Value'
String::Utf8Value _str(in);
^ ~~
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3002:5: note: candidate constructor not viable: no known conversion from
'Localv8::Value' to 'const v8::String::Utf8Value' for 1st argument
Utf8Value(const Utf8Value&) = delete;
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:2995:5: note: candidate constructor not viable: requires 2 arguments, but 1 was
provided
Utf8Value(Isolate* isolate, Localv8::Value obj);
^
../src/binding.cc:447:23: error: no matching constructor for initialization of 'String::Utf8Value'
String::Utf8Value _str(in);
^ ~~
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3002:5: note: candidate constructor not viable: no known conversion from
'Localv8::Value' to 'const v8::String::Utf8Value' for 1st argument
Utf8Value(const Utf8Value&) = delete;
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:2995:5: note: candidate constructor not viable: requires 2 arguments, but 1 was
provided
Utf8Value(Isolate* isolate, Localv8::Value obj);
^
../src/binding.cc:521:38: error: too few arguments to function call, single argument 'context' was not specified
size_t size = info[1]->Uint32Value();
~~~~~~~~~~~~~~~~~~~~ ^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:2567:3: note: 'Uint32Value' declared here
V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:351:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT attribute((warn_unused_result))
^
../src/binding.cc:550:44: error: too few arguments to function call, single argument 'context' was not specified
uint32_t numZeros = info[1]->Uint32Value();
~~~~~~~~~~~~~~~~~~~~ ^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:2567:3: note: 'Uint32Value' declared here
V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:351:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT attribute((warn_unused_result))
^
../src/binding.cc:582:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_SIZEOF(int8, int8_t);
^
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
smap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(sizeof(type))));
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:583:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_SIZEOF(uint8, uint8_t);
^
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
smap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(sizeof(type))));
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:584:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_SIZEOF(int16, int16_t);
^
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
smap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(sizeof(type))));
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:585:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_SIZEOF(uint16, uint16_t);
^
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
smap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(sizeof(type))));
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:586:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_SIZEOF(int32, int32_t);
^
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
smap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(sizeof(type))));
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:587:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_SIZEOF(uint32, uint32_t);
^
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
smap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(sizeof(type))));
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:588:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_SIZEOF(int64, int64_t);
^
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
smap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(sizeof(type))));
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:589:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_SIZEOF(uint64, uint64_t);
^
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
smap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(sizeof(type))));
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:590:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_SIZEOF(float, float);
^
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
smap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(sizeof(type))));
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:591:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_SIZEOF(double, double);
^
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
smap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(sizeof(type))));
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:593:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_SIZEOF(bool, bool);
^
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
smap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(sizeof(type))));
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:594:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_SIZEOF(byte, unsigned char);
^
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
smap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(sizeof(type))));
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:595:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_SIZEOF(char, char);
^
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
smap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(sizeof(type))));
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:596:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_SIZEOF(uchar, unsigned char);
^
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
smap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(sizeof(type))));
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:597:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_SIZEOF(short, short);
^
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
smap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(sizeof(type))));
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:598:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_SIZEOF(ushort, unsigned short);
^
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
smap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(sizeof(type))));
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:599:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_SIZEOF(int, int);
^
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
smap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(sizeof(type))));
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:600:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_SIZEOF(uint, unsigned int);
^
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
smap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(sizeof(type))));
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:601:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_SIZEOF(long, long);
^
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
smap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(sizeof(type))));
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:602:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_SIZEOF(ulong, unsigned long);
^
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
smap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(sizeof(type))));
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:603:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_SIZEOF(longlong, long long);
^
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
smap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(sizeof(type))));
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:604:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_SIZEOF(ulonglong, unsigned long long);
^
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
smap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(sizeof(type))));
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:605:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_SIZEOF(pointer, char *);
^
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
smap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(sizeof(type))));
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:606:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_SIZEOF(size_t, size_t);
^
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
smap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(sizeof(type))));
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:608:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_SIZEOF(Object, Nan::Persistent);
^
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
smap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(sizeof(type))));
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:615:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_ALIGNOF(int8, int8_t);
^
../src/binding.cc:614:9: note: expanded from macro 'SET_ALIGNOF'
amap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(alignof(struct ...
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:616:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_ALIGNOF(uint8, uint8_t);
^
../src/binding.cc:614:9: note: expanded from macro 'SET_ALIGNOF'
amap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(alignof(struct ...
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:617:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_ALIGNOF(int16, int16_t);
^
../src/binding.cc:614:9: note: expanded from macro 'SET_ALIGNOF'
amap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(alignof(struct ...
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:618:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_ALIGNOF(uint16, uint16_t);
^
../src/binding.cc:614:9: note: expanded from macro 'SET_ALIGNOF'
amap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(alignof(struct ...
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:619:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_ALIGNOF(int32, int32_t);
^
../src/binding.cc:614:9: note: expanded from macro 'SET_ALIGNOF'
amap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(alignof(struct ...
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:620:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_ALIGNOF(uint32, uint32_t);
^
../src/binding.cc:614:9: note: expanded from macro 'SET_ALIGNOF'
amap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(alignof(struct ...
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:621:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_ALIGNOF(int64, int64_t);
^
../src/binding.cc:614:9: note: expanded from macro 'SET_ALIGNOF'
amap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(alignof(struct ...
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:622:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_ALIGNOF(uint64, uint64_t);
^
../src/binding.cc:614:9: note: expanded from macro 'SET_ALIGNOF'
amap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(alignof(struct ...
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:623:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_ALIGNOF(float, float);
^
../src/binding.cc:614:9: note: expanded from macro 'SET_ALIGNOF'
amap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(alignof(struct ...
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:624:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_ALIGNOF(double, double);
^
../src/binding.cc:614:9: note: expanded from macro 'SET_ALIGNOF'
amap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(alignof(struct ...
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:625:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_ALIGNOF(bool, bool);
^
../src/binding.cc:614:9: note: expanded from macro 'SET_ALIGNOF'
amap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(alignof(struct ...
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:626:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_ALIGNOF(char, char);
^
../src/binding.cc:614:9: note: expanded from macro 'SET_ALIGNOF'
amap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(alignof(struct ...
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:627:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_ALIGNOF(uchar, unsigned char);
^
../src/binding.cc:614:9: note: expanded from macro 'SET_ALIGNOF'
amap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(alignof(struct ...
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:628:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_ALIGNOF(short, short);
^
../src/binding.cc:614:9: note: expanded from macro 'SET_ALIGNOF'
amap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(alignof(struct ...
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:629:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_ALIGNOF(ushort, unsigned short);
^
../src/binding.cc:614:9: note: expanded from macro 'SET_ALIGNOF'
amap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(alignof(struct ...
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:630:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_ALIGNOF(int, int);
^
../src/binding.cc:614:9: note: expanded from macro 'SET_ALIGNOF'
amap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(alignof(struct ...
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:631:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_ALIGNOF(uint, unsigned int);
^
../src/binding.cc:614:9: note: expanded from macro 'SET_ALIGNOF'
amap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(alignof(struct ...
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:632:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_ALIGNOF(long, long);
^
../src/binding.cc:614:9: note: expanded from macro 'SET_ALIGNOF'
amap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(alignof(struct ...
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:633:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_ALIGNOF(ulong, unsigned long);
^
../src/binding.cc:614:9: note: expanded from macro 'SET_ALIGNOF'
amap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(alignof(struct ...
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:634:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_ALIGNOF(longlong, long long);
^
../src/binding.cc:614:9: note: expanded from macro 'SET_ALIGNOF'
amap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(alignof(struct ...
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:635:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_ALIGNOF(ulonglong, unsigned long long);
^
../src/binding.cc:614:9: note: expanded from macro 'SET_ALIGNOF'
amap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(alignof(struct ...
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:636:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_ALIGNOF(pointer, char *);
^
../src/binding.cc:614:9: note: expanded from macro 'SET_ALIGNOF'
amap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(alignof(struct ...
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:637:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_ALIGNOF(size_t, size_t);
^
../src/binding.cc:614:9: note: expanded from macro 'SET_ALIGNOF'
amap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(alignof(struct ...
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:638:3: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
SET_ALIGNOF(Object, Nan::Persistent);
^
../src/binding.cc:614:9: note: expanded from macro 'SET_ALIGNOF'
amap->Set(Nan::Newv8::String( #name ).ToLocalChecked(), Nan::Newv8::Uint32(static_cast<uint32_t>(alignof(struct ...
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:641:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
target->Set(Nan::Newv8::String("sizeof").ToLocalChecked(), smap);
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:642:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
target->Set(Nan::Newv8::String("alignof").ToLocalChecked(), amap);
^
/Users/rand/.node-gyp/12.6.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON("Use maybe version",
^
/Users/rand/.node-gyp/12.6.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator attribute((deprecated(message)))
^
../src/binding.cc:643:8: warning: 'ForceSet' is deprecated [-Wdeprecated-declarations]
Nan::ForceSet(target, Nan::Newv8::String("endianness").ToLocalChecked(), Nan::Newv8::String(CheckEndianness()).ToLoc...
^
../../nan/nan_maybe_43_inl.h:117:1: note: 'ForceSet' has been explicitly marked deprecated here
NAN_DEPRECATED inline Maybe ForceSet(
^
../../nan/nan.h:104:40: note: expanded from macro 'NAN_DEPRECATED'
^
../src/binding.cc:644:8: warning: 'ForceSet' is deprecated [-Wdeprecated-declarations]
Nan::ForceSet(target, Nan::Newv8::String("NULL").ToLocalChecked(), WrapNullPointer(), static_cast(R...
^
../../nan/nan_maybe_43_inl.h:117:1: note: 'ForceSet' has been explicitly marked deprecated here
NAN_DEPRECATED inline Maybe ForceSet(
^
../../nan/nan.h:104:40: note: expanded from macro 'NAN_DEPRECATED'
^
53 warnings and 6 errors generated.
make: *** [Release/obj.target/binding/src/binding.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:203:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 18.6.0
gyp ERR! command "/usr/local/Cellar/node/12.6.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/rand/node_modules/ref
gyp ERR! node -v v12.6.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open '/Users/rand/package.json'
npm WARN rand No description
npm WARN rand No repository field.
npm WARN rand No README data
npm WARN rand No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Although we can introspect various Obj-C symbols via the Obj-C runtime helpers e.g. objc_getClass
, C functions, enums, and other symbols are not introspectable at runtime, as I found in #43 (you can see in the comments various symbol lookups that failed - NSTitledWindowMask
is one of them).
I believe the root of the problem is that bundle.load(), used here:
Line 28 in cc4d6f0
... does not load any C symbols for the dynamic linker to find. Well, my reasoning may be wrong, but either way, they're not being found in this call (we're throwing an error):
Lines 48 to 58 in cc4d6f0
I believe we'd have more success by adopting the approach used by NodObjc to look up symbols, which involves loading the BridgeSupport files, which were specifically designed for use by Objective-C bridges like RubyCocoa and PyObjC.
Alternatively, we may be able to get further on the back of the existing approach by importing Core Foundation and introducing calls to CFBundleGetDataPointerForName and CFBundleGetFunctionPointerForName, but this would turn things into an O(2N) lookup as more and more frameworks are imported (check the data pointer and then the function pointer for each framework we've imported during the app's lifespan), and unlike the BridgeSupport approach, it's not yet tried-and-tested.
Hi! ๐
Firstly, thanks for your work on this project! ๐
Today I used patch-package to patch [email protected]
for the project I'm working on.
objc[cls][method](...args)
// xxxx.apply is not a function
Here is the diff that solved my problem:
diff --git a/node_modules/objc/src/proxies.js b/node_modules/objc/src/proxies.js
index 4063011..bfe8622 100644
--- a/node_modules/objc/src/proxies.js
+++ b/node_modules/objc/src/proxies.js
@@ -14,6 +14,7 @@ const MethodProxy = (object, selector) => {
if (key === util.inspect.custom) {
return () => `[objc.MethodProxy '${self.type === 'class' ? '+' : '-'}[${object.class()} ${selector}]']`;
}
+ return pseudoTarget[key];
},
apply: (target, _this, args) => {
The importFramework
utility function throws an unhelpful error message when NSBundle.bundleWithPath_(path)
returns null
(e.g. because the path was invalid):
/Users/foo/node_modules/objc/src/util.js:25
bundle.load();
TypeError: Cannot read properties of null (reading 'load')
I suggest inserting a null check before the bundle.load()
line that throws a descriptive error:
if (bundle === null) { throw Error(`Framework not found: '${path}'`); }
I am trying to port an app of mine to macOS, and since I need to use MediaRemote.framework which is private, I wondered if there's a way to use this project with that.
After importing IOKit using objc.import("IOKit")
, it throws an error when attempting to access a function that would otherwise be a part of the library. For example, IOServiceMatching
;
const objc = require("objc");
objc.import("IOKit");
const { IOServiceMatching } = objc; // => Err
Error stack:
node:buffer:448
function fromArrayBuffer(obj, byteOffset, length) {
^
RangeError: Maximum call stack size exceeded
at fromArrayBuffer (node:buffer:448:25)
at from (node:buffer:301:14)
at Object.readPointer (<anonymous>)
at Object.get (/Users/***/Documents/sysinfo-ts/node_modules/ref-napi/lib/ref.js:461:31)
at Object.deref (/Users/***/Documents/sysinfo-ts/node_modules/ref-napi/lib/ref.js:665:18)
at Buffer.deref (/Users/***/Documents/sysinfo-ts/node_modules/ref-napi/lib/ref.js:1269:18)
at proxy (/Users/***/Documents/sysinfo-ts/node_modules/ffi-napi/lib/_foreign_function.js:64:19)
at new Selector (/Users/***/Documents/sysinfo-ts/node_modules/objc/src/selector.js:49:20)
at Instance.call (/Users/***/Documents/sysinfo-ts/node_modules/objc/src/instance.js:39:18)
at Instance.description (/Users/***/Documents/sysinfo-ts/node_modules/objc/src/instance.js:138:17)
Additional information:
21C5021h
)4.4.3
16.9.0
I'm not sure if I'm just doing something incorrectly, or if it's not meant to do this.
UPDATE:
This will also fail, but with a different error:
const objc = require("objc");
objc.import("IOKit");
const { IOServiceMatching } = objc; // => Err
Stack:
/Users/***/Documents/sysinfo-ts/node_modules/objc/src/instance.js:54
throw new Error(`Unable to find method ${selector.name} on object ${this.description()}`);
^
Error: Unable to find method UTF8String on object -2.39651e+16
at Instance.call (/Users/***/Documents/sysinfo-ts/node_modules/objc/src/instance.js:54:13)
at Object.apply (/Users/***/Documents/sysinfo-ts/node_modules/objc/src/proxies.js:27:19)
at Object.get (/Users/***/Documents/sysinfo-ts/node_modules/objc/src/index.js:43:55)
at Object.<anonymous> (/Users/***/Documents/sysinfo-ts/dist/index.js:4:9)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
at node:internal/main/run_main_module:17:47
I have a property I need to set with a dictionary. The obj.ns() method says it turns objects into dictionaries, but NSDictionary keys can be more than just strings. For example to configure video output settings, in Objective C I do this:
videoDataOutput.videoSettings = @{
(id)kCVPixelBufferPixelFormatTypeKey: [NSNumber numberWithUnsignedInteger:kCVPixelFormatType_32BGRA]
};
I can't quite figure out how to construct the JS object to pass to obj.ns() to make this happen. Am I missing something?
I can extract the base address from a CVPixelBuffer using CVPixelBufferGetBaseAddress
like this:
let baseAddress = c.CVPixelBufferGetBaseAddress(imageBuffer);
I also know the format, size, and width, and can lock down the base address.
I am having a mental block on getting the data out of the runtime so I can manipulate it in Node. Ideally, I'd like to get the pixel data into a Node Buffer object. I have a pointer now (baseAddress), how do I marshal the data over to Node?
I want to get current NSView or NSWindow.
Is it possible?
I need to use dispatch queues in my app. It's not super clear to me whether I have the mapping of this call right.
Apple docs say the call looks like this:
dispatch_queue_t dispatch_queue_create(const char *label, dispatch_queue_attr_t attr);
After some amount of whack-a-mole, I arrived at this code which seems to not cause an exception:
const c = new ffi.Library(null, {
'dispatch_queue_create': ['pointer', ['string', 'long']]
});
I call the function like this:
let queue = c.dispatch_queue_create('myQueue', 0);
But I am suspicious of defining the dispatch_queue_attr_t
parameter as a 'long'.
What should it be?
Hi, thanks for your work on this project!
I'm trying to work with CoreGraphics and can't see how to do that with objc
For example, I'm trying to call CGEventCreate(null)
by writing:
const objc = require('objc')
objc.import('Cocoa')
objc.import('Framework')
const {CGEventCreate} = objc
const test = CGEventCreate(null)
but I'm getting back an error that CGEventCreate
is not a function, and that it's value is 'H๏ฟฝ๏ฟฝAW'
.
Any pointers for how to get this to work?
Again, great package! This might just be a clarification, but as I'm trying to figure out why my delegate doesn't work, I'm noticing a few things I don't entirely understand that might help me figure it out.
I've created a custom class so I can register a delegate. I've used the FileManagerDelegate example as a template for my own.
Your readme mentions:
Note: You might have to specify individual offsets in the type encoding, see this example.
I'd love to know what you mean by this, and what it means for how I define my delegate.
For reference, I'm creating a delegate for AVCaptureVideoDataOutputSampleBufferDelegate
. One thing I noted is the use of the term 'c40' for the return value of the FileManagerDelegate example, which is a bool. I assume this means bool and char are the same, but not sure what the 40 is for.
This may not be my problem, but it might be nice to have this be clearer in the docs.
const AVCaptureVideoDataOutputSampleBufferDelegate = objc.createClass(
'AVCaptureVideoDataOutputSampleBufferDelegate',
'NSObject',
{
'captureOutput:didOutputSampleBuffer:fromConnection:': (
self,
cmd,
captureOutput,
sampleBuffer,
connection
) => {
console.log(
'-[AVCaptureVideoDataOutputSampleBufferDelegate captureOutput:didOutputSampleBuffer:fromConnection:]'
);
return 1;
},
_encodings: {
'captureOutput:didOutputSampleBuffer:fromConnection:': [
'v',
['@0', ':8', '@16', '@24', '@32']
]
}
}
);
First of all, big thanks for putting this library together. I was looking hard and long for something up-to-date for calling native Mac APIs and only discovered this through a comment hidden beneath a SO question.
I'm trying to use it to send an item to the Trash on MacOS via NSWorkspace.recycleURLs
, but I'm not sure I've quite got the hang of how to pass arguments into Cocoa functions. The method is expecting an NSArray of NSURL objects, but whatever I do, the call fails with the error:
NSInvalidArgumentException -[__NSDictionaryM isFileURL]: unrecognized selector sent to instance 0x103c71d10
Since isFileURL
is a method on NSURL
, I draw the conclusion that Cocoa somehow gets a dictionary instead of an NSURL
on which it tries to call isFileURL
.
I've tried various different ways of creating the array, but no luck so far. Here is my code:
objc.import("AppKit");
const {
NSWorkspace,
NSURL,
NSArray
} = objc;
const nsUrl = NSURL.fileURLWithPath_isDirectory_(
objc.ns(filePath),
false
);
// This logs what looks like an actual NSURL object
log.log("nsUrl", nsUrl);
const nsArray = [nsUrl];
//const nsArray = objc.ns([nsUrl]);
//const nsArray = NSArray.arrayWithArray_([nsUrl]);
// This logs an empty array if I use either of the latter two lines above
log.log("nsArray", nsArray);
const workspace = NSWorkspace.sharedWorkspace();
// Bam!
workspace.recycleURLs_completionHandler_(nsArray, null);
What am I missing?
I just upgraded my Electron project that uses objc to version 4.0.0, which meant a Node upgrade to 10.11.0. In the process I also upgraded objc to 0.19.
And now I get the following error at runtime:
dyld: lazy symbol binding failed: Symbol not found: __ZN2v811HandleScope12CreateHandleEPNS_8internal10HeapObjectEPNS1_6ObjectE
Referenced from: /Users/ejal/dev/filur/node_modules/ref/build/Release/binding.node
Expected in: flat namespace
By commenting out the import of objc, the error goes away.
Any ideas?
This code
'use strict';
const objc = require('objc');
const {
NSURL,
NSURLTypeIdentifierKey
} = objc;
const uti = objc.allocRef();
const error = objc.allocRef();
const fileURL = NSURL.fileURLWithPath('/Users/ck');
fileURL.getResourceValue_forKey_error(uti, NSURLTypeIdentifierKey, error);
throws this error:
Node.js v17.5.0
โฆ/node_modules/objc/src/type-encodings.js:175
throw new Error(`Unexpected token ${this.currentToken}`);
^
Error: Unexpected token o
at TypeEncodingParser.parseType (โฆ/node_modules/objc/src/type-encodings.js:175:17)
at TypeEncodingParser.parse (โฆ/node_modules/objc/src/type-encodings.js:125:23)
at coerceType (โฆ/node_modules/objc/src/type-encodings.js:258:28)
at โฆnode_modules/objc/src/instance.js:63:14
at Array.map (<anonymous>)
at Instance.call (โฆ/node_modules/objc/src/instance.js:62:72)
at Object.apply (โฆ/node_modules/objc/src/proxies.js:27:19)
at Object.<anonymous> (โฆ/testcase.js:12:9)
at Module._compile (node:internal/modules/cjs/loader:1097:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1151:10)
I think that the call to getResourceValue_forKey_error should be ok, but may of course be wrong. In that case, what should I change?
npm ERR! code 1
npm ERR! path /Users/foxt/dev/sk/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/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.6 found at "/Library/Developer/CommandLineTools/usr/bin/python3"
npm ERR! gyp info spawn /Library/Developer/CommandLineTools/usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/opt/homebrew/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/foxt/dev/sk/node_modules/ffi-napi/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/foxt/Library/Caches/node-gyp/19.6.0/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/foxt/Library/Caches/node-gyp/19.6.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/foxt/Library/Caches/node-gyp/19.6.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/foxt/dev/sk/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: libtool: archive library: Release/nothing.a the table of contents is empty (no object file members in the library define global symbols)
npm ERR! In file included from ../deps/libffi/src/prep_cif.c:27:
npm ERR! ../deps/libffi/include/ffi_common.h:23:12: fatal error: 'alloca.h' file not found
npm ERR! # include <alloca.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 (/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:203:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:512:28)
npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:293:12)
npm ERR! gyp ERR! System Darwin 22.3.0
npm ERR! gyp ERR! command "/opt/homebrew/Cellar/node/19.6.0/bin/node" "/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /Users/foxt/dev/sk/node_modules/ffi-napi
npm ERR! gyp ERR! node -v v19.6.0
npm ERR! gyp ERR! node-gyp -v v9.3.0
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/foxt/.npm/_logs/2023-02-16T14_28_21_780Z-debug-0.log
I'm trying to extract some data from a CGSize struct I got from a call to CVImageBufferGetDisplaySize.
I appear to be successfully calling the function that gives me the size for my image, using ffi:
const c = new ffi.Library(null, {
CMSampleBufferGetImageBuffer: ['pointer', ['pointer']],
CVImageBufferGetDisplaySize: ['pointer', ['pointer']]
});
The call to CVImageBufferGetDisplaySize returns a pointer to a CGSize struct. I want to convert that struct to a javascript object, but it's not clear how best to do that.
I tried adding the function NSStringFromCGSize
to my ffi definition. It's a call that converts CGSize to a string representation, whereupon I could do some js mojo to get the values out of it.
But ffi can't find NSStringFromCGSize
.
Not that this is the best way to do the conversion, but it seems like that should work.
So, really two questions:
NSStringFromCGSize
from frameworks like UIKit in javascript?A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.