1.0.6 • Published 5 days ago

@teamteanpm2024/voluptatum-a-voluptate v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
5 days ago

Addon Tools

This is a part of Node3D project.

NPM ESLint Test Cpplint

npm i -s @teamteanpm2024/voluptatum-a-voluptate

include/addon-tools.hpp

Macro shortcuts for C++ addons using NAPI. See docs inside the folder.

Example of an addon method definition:

// hpp:
#include <addon-tools.hpp>
DBG_EXPORT JS_METHOD(doSomething);
// cpp:
DBG_EXPORT JS_METHOD(doSomething) { NAPI_ENV;
	LET_INT32_ARG(0, param0);
	std::cout << "param0: " << param0 << std::endl;
	RET_UNDEFINED;
}

index.js

JavaScript helpers for Node.js addon development. The short list of helpers:

	'getBin', 'getPlatform', 'getInclude', 'getPaths',
	'install', 'cpbin', 'download', 'read', 'write', 'copy', 'exists',
	'mkdir', 'stat', 'isDir', 'isFile', 'dirUp', 'ensuredir', 'copysafe',
	'readdir', 'subdirs', 'subfiles', 'traverse', 'copyall',
	'rmdir', 'rm', 'WritableBuffer', 'actionPack',

See the TypeScript definitions with comments.

Example for an ADDON's index.js:

	const { getBin } = require('@teamteanpm2024/voluptatum-a-voluptate');
	const core = require(`./${getBin()}/ADDON`); // uses the platform-specific ADDON.node

Example for binding.gyp:

	'include_dirs': [
		'<!@(node -p "require(\'@teamteanpm2024/voluptatum-a-voluptate\').getInclude()")',
	],

NOTE: the optional node-addon-api dependency is used by the getInclude() helper. If not found, the napi.h include path won't be a part of the returned string.

Example of cpbin in package.json :: scripts:

	"build": "cd src && node-gyp rebuild -j max --silent && node -e \"require('@teamteanpm2024/voluptatum-a-voluptate').cpbin('segfault')\" && cd ..",
	"build-only": "cd src && node-gyp build -j max --silent && node -e \"require('@teamteanpm2024/voluptatum-a-voluptate').cpbin('segfault')\" && cd ..",
sharedarraybufferuuidRegExp.prototype.flagsreuseESnextmkdirsesArray.prototype.containsbabel-coreeventDispatcherECMAScript 7everyxhrsigintpushloadbalancingconcatMapES2023internalmetadatalintcalloffsettoolkitReactiveXsettervalidworkspace:*rfc4122RxJSsideform-validationcolorzodequalityparseinferenceratelibphonenumberavaawaitserializationbundlergroupBylistenersmatchestacittypeerrorcallbindthroatfunctionanimationresolvecore-jsdataviewrapidsqsboundECMAScript 2022flagsirqreducerflattentypescripttranspilervariables in csslasttapECMAScript 2015syntaxerrorhandlersletserializetrimLeftreact-testing-libraryarraysconsumehookformpreserve-symlinksregexhigher-orderinputjsoncorecolumnsgetPrototypeOfbabelvisualObject.isObjectshamjsonschemafoldercharactersdiffES2018checklanguageless.jsfindupweaksetserializerquotearktypeURLECMAScript 2017real-timecachenamesmacoscommand-linetypedarraysmimeastroute53ES8progresspatchspinneri18ncopyprotobufinstallermimetypesObject.keystestercallboundschemepromiseglobcjkcolourautoprefixerconnectjsonpathpnpm9consoleclonemkdirpparentasciisuperagentpasswordformatbddshellauthenticationObject.entriesnamesometoSortedeslintconfigreact-hook-formelbvestgradients cssterminalbyteOffsetbufferfast-copytyped arrayargumentgetOwnPropertyDescriptortexthashworkerestreesnsES2017react poseevents[[Prototype]]coercibleremovecloudwatchsortedcode pointsprettyECMAScript 20163dreactprocessjsdifflook-upjavascript__proto__trimenderes-shim APIcss lesstestECMAScript 6bannerObject.getPrototypeOfebspackagesfastinspectstatushasOwnnegativeclass-validatortoolswgetInt8Arraypackage managerObject.fromEntrieshttpvariablescommandFunction.prototype.nameprotocol-buffersexpressiontypeofparentsloadingstoragegatewayECMAScript 5symbolfilterlockfilees2015unicodewatcherbindlimitedquerystringdeepcopycryptflatstylesheetES5directoryfile systemwordbreakInt32Arrayless cssjwttoStringTagexitclimergesigtermglacieres2018propcallbackautoscalingArray.prototype.includesconcurrencyutil.inspectvalidationsequencefindLastdescriptoramazonoptionregexpsanitizekoreanarraybundlinginvariantIteratortrimStartECMAScript 2023json-schema-validationbcrypt0dependenciesUint16ArrayrequestMapiteratoremrmaprandomoptimizerCSSwidthchineselogenvstylingformes6typanionECMAScript 3ES7flatMaptrimRightRFC-6455ArrayBufferdeep-cloneiterationUint8ArrayschemastringnodeWeakMapjoinpmpostcsseslintpluginformattingclassnameselasticacheArray.prototype.flattenjsdomtraverseYAMLTypeBoxpolyfillobjecttsframeworkdeep-copypropertiescall-bindutillengthfastifyomitsymlinksmkdirsdir256outputRegExp#flagsfpyamlcodesapisetImmediatevalueawsfunctionscomparePushWeakSetfullwidth_.extendstylesBigUint64Array@@toStringTagformsPromiseutilsECMAScript 2019Array.prototype.flatsanitizationasyncemojibrowserlistassertjson-schema-validatorshimwhichsameValueZeroregular expressiongetoptwatchFileratelimitsetscheme-validationwindowsa11ypoint-freeArray.prototype.findLastIndexreduxslotmime-dbagentdropgradients css3dayjsmapreducetoArraychromiumbusyreact-hooksutilitiesprivate datareadcssBigInt64ArrayArrayBuffer#slicetrimEndinternal slotmobilefromstringifierstructuredClonespecReflect.getPrototypeOfmakedatakeysrm -rfnopeframerswfjson-schemapathES6preprocessores7compilerspringJSONparserjestES2015tostringtagmatchObject.definePropertycommandereast-asian-widthenumerableArraycss variabledomextendonceurltsliboptimistsyntaxcontainsguidcloudtrailartforEachcall-boundwrapReactiveExtensionsl10nvpcencryptionwaapiajaxprunegdprkinesiswritereduceECMAScript 2020Uint8ClampedArraywalkingconfiggesturesSetruntimeArrayBuffer.prototype.sliceObject.valuesfind-uppackagenodejsrecursiveio-tschannelpicomatchnegative zeromomentredactvalidateexpresstranspileargvloggingsharedlinuximmutablefindLastIndexfetchassigntoobjectchromehardlinksreact animationES3hooksUint32Arraystreamesbreaktypesclassesduplexwaitdependency managersettingsfseventsvarsignalsnativeWebSockets-0uninstallproxycolorsgetsimpledbfast-deep-clonegroupes2017Array.prototype.filtertddspinnersjapaneseObservablecloudfrontcharacterauthtc39$.extendSymbol.toStringTagextensionmatchAllES2022mochacurriedjasmineJSON-SchemaRxharmonyES2019whatwgopenwebcensoryupfsgetintrinsictaskeventEmitterbootstrap cssfixed-widthtypesafeInt16ArrayCSSStyleDeclarationkarmaxterm
1.0.6

5 days ago

1.0.5

6 days ago

1.0.4

7 days ago

1.0.3

8 days ago

1.0.2

9 days ago

1.0.1

10 days ago

1.0.0

11 days ago