@forwardimpact/libcodegen 0.1.49 → 0.1.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -1
- package/bin/fit-codegen.js +7 -3
- package/package.json +13 -9
package/README.md
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
# libcodegen
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<!-- BEGIN:description — Do not edit. Generated from package.json. -->
|
|
4
|
+
|
|
5
|
+
Protobuf code generation — keep types in sync with proto definitions without
|
|
6
|
+
hand-writing.
|
|
7
|
+
|
|
8
|
+
<!-- END:description -->
|
|
4
9
|
|
|
5
10
|
## Getting Started
|
|
6
11
|
|
package/bin/fit-codegen.js
CHANGED
|
@@ -20,9 +20,13 @@ import {
|
|
|
20
20
|
} from "@forwardimpact/libcodegen";
|
|
21
21
|
import { createStorage } from "@forwardimpact/libstorage";
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
)
|
|
23
|
+
// `bun build --compile` injects FIT_CODEGEN_VERSION via --define, eliminating
|
|
24
|
+
// the readFileSync branch in the compiled binary (which would ENOENT against
|
|
25
|
+
// the bunfs virtual mount). Source execution falls through to package.json.
|
|
26
|
+
const VERSION =
|
|
27
|
+
process.env.FIT_CODEGEN_VERSION ||
|
|
28
|
+
JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"))
|
|
29
|
+
.version;
|
|
26
30
|
|
|
27
31
|
const definition = {
|
|
28
32
|
name: "fit-codegen",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forwardimpact/libcodegen",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Protobuf code generation —
|
|
3
|
+
"version": "0.1.52",
|
|
4
|
+
"description": "Protobuf code generation — keep types in sync with proto definitions without hand-writing.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"codegen",
|
|
7
7
|
"protobuf",
|
|
@@ -16,12 +16,16 @@
|
|
|
16
16
|
},
|
|
17
17
|
"license": "Apache-2.0",
|
|
18
18
|
"author": "D. Olsson <hi@senzilla.io>",
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
"jobs": [
|
|
20
|
+
{
|
|
21
|
+
"user": "Platform Builders",
|
|
22
|
+
"goal": "Keep Service Contracts Typed",
|
|
23
|
+
"trigger": "Adding a proto definition and realizing the JavaScript types are already stale.",
|
|
24
|
+
"bigHire": "keep types in sync with proto definitions without hand-writing.",
|
|
25
|
+
"littleHire": "change a proto definition and trust the JavaScript types follow.",
|
|
26
|
+
"competesWith": "manual type definitions; hoping hand-written types match; skipping types entirely"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
25
29
|
"type": "module",
|
|
26
30
|
"main": "./src/index.js",
|
|
27
31
|
"exports": {
|
|
@@ -45,7 +49,7 @@
|
|
|
45
49
|
"@forwardimpact/libstorage": "^0.1.53",
|
|
46
50
|
"@forwardimpact/libtelemetry": "^0.1.22",
|
|
47
51
|
"@forwardimpact/libutil": "^0.1.64",
|
|
48
|
-
"@grpc/proto-loader": "^0.8.
|
|
52
|
+
"@grpc/proto-loader": "^0.8.1",
|
|
49
53
|
"mustache": "^4.2.0",
|
|
50
54
|
"protobufjs": "^7.5.6",
|
|
51
55
|
"protobufjs-cli": "2.0.1"
|