Gathering detailed insights and metrics for ern-api-gen
Gathering detailed insights and metrics for ern-api-gen
Gathering detailed insights and metrics for ern-api-gen
Gathering detailed insights and metrics for ern-api-gen
A platform to ease integration&delivery of React Native apps in existing mobile applications
npm install ern-api-gen
Typescript
Module System
Node Version
NPM Version
TypeScript (54.23%)
Java (16.04%)
Objective-C (10.25%)
Mustache (9.33%)
Swift (5.27%)
JavaScript (4.28%)
Shell (0.49%)
Ruby (0.11%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
NOASSERTION License
732 Stars
4,132 Commits
113 Forks
33 Watchers
49 Branches
44 Contributors
Updated on Jul 09, 2025
Latest Version
0.53.0
Package Id
ern-api-gen@0.53.0
Unpacked Size
1.35 MB
Size
310.27 kB
File Count
571
NPM Version
lerna/4.0.0/node@v20.19.3+x64 (linux)
Node Version
20.19.3
Published on
Jul 09, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
11
1
This package is part of Electrode Native.
The Electrode Native API Generator creates new API projects based on a Swagger schema.
The generated code uses react-native-electrode-bridge to facilitate bi-directional message exchange between native code (Android/iOS) and JavaScript (React Native).
See the documentation and CLI help for more information:
1ern create-api --help
ern-api-gen
is based on code from the Swagger project, mainly version
2.X of Swagger Codegen.
The three primary code generators adapted from Swagger are:
In line with the main Swagger project, all three classes extend the base class
DefaultCodegen
.
For the purposes of ern-api-gen
there are three custom implementations
of API code generators for native code (Java/Swift) and JavaScript:
Codegen | Base Class | Template Folder |
---|---|---|
ErnAndroidApiCodegen | AndroidClientCodegen | resources/android/libraries/ern/ |
ErnES6ApiCodegen | ES6Codegen | resources/es6/libraries/ern/ |
ErnSwiftCodegen | SwiftCodegen | resources/swift/libraries/ern/ |
Note that ErnES6ApiCodegen
extends ES6Codegen
, not
JavascriptClientCodegen
(see next section for details).
The base class of ErnES6ApiCodegen
is the ES6Codegen
class which extends
JavascriptClientCodegen
. ES6Codegen
uses a different template directory but
otherwise does not change functionality much compared to its base class. It's
important to understand that Swagger does not have a ES6Codegen
and instead
uses conditionals in JavascriptClientCodegen
to generate ES6. The ES6
template folder of Swagger differs significantly from the one in ern-api-gen
.
This is likely due to the fact that ES6 generation was not yet available in
Swagger at the time the initial code was converted for ern-api-gen
.
Below is a brief summary of the significant events in this module. The information was mainly obtained from Git logs and by comparing select snapshots to historic state of swagger-codegen.
The very first version of the content in this folder can be traced back to the
addition of the ern-message-gen
folder in 36637761
on Apr 4, 2017.
When the code was first added to the repository it had not only
gone through a Java to JavaScript conversion, but also contained other changes
and additions. Some changes in the resource files (e.g. triple curly braces)
may have been a necessity due to subtle differences of the Mustache template
engine in Java, and the mustache JavaScript package used by ern-api-gen
.
For these two reasons is it very difficult (or impossible) to determine the
exact state of the Swagger project that was used as the actual "source".
The most accurate approximations point to somewhere between v2.2.1 and
v2.2.2, with most code being closer to v2.2.1
, while a few files more
closely resemble v2.2.2
. There are more than 900 commits between the two
tags.
ern-message-gen
was renamed to ern-api-gen
on Aug 9, 2017
(0f9e0e34
). This fully replaced the previous hull-based generator from
the initial commit.
A major update (mainly formatting) was done in 8fea575a when the rest of the Electrode Native code base was converted to TypeScript on Apr 28, 2018.
In May 2019, the JavaScript sources in ern-api-gen
were converted to
TypeScript: 92b69b9b (as well as 6d8f166a, 2e7d2327).
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
Found 9/10 approved changesets -- score normalized to 9
Reason
license file detected
Details
Reason
6 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 5
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
security policy file not detected
Details
Reason
binaries present in source code
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
83 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-14
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More