@cratis/chronicle.contracts 19.20.0 → 19.21.1

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 CHANGED
@@ -20,7 +20,7 @@ yarn add @cratis/chronicle.contracts
20
20
 
21
21
  ## Usage
22
22
 
23
- This package contains only the generated contracts: a `*Definition` for every Chronicle gRPC service and a TypeScript type for every message, produced by [ts-proto](https://github.com/stephenh/ts-proto) for [nice-grpc](https://github.com/deeplay-io/nice-grpc). It has no connection string parsing, authentication, or retry handling.
23
+ This package contains only the generated contracts: a `*Definition` for every Chronicle gRPC service and a TypeScript type for every message, produced by [ts-proto](https://github.com/stephenh/ts-proto) for [nice-grpc](https://github.com/deeplay-io/nice-grpc). It has no connection string parsing, authentication, or retry handling. Both ES module imports and CommonJS `require()` use the matching runtime and TypeScript declarations.
24
24
 
25
25
  **Building an application?** Use the idiomatic TypeScript client, [`@cratis/chronicle`](https://www.npmjs.com/package/@cratis/chronicle), which is built on these contracts. Reach for this package only when you are building a client or tool of your own.
26
26
 
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/chronicle.contracts",
3
- "version": "19.20.0",
3
+ "version": "19.21.1",
4
4
  "description": "TypeScript gRPC client contracts for Cratis Chronicle - the open-source event-sourcing database",
5
5
  "keywords": [
6
6
  "event-sourcing",
@@ -35,7 +35,7 @@
35
35
  "./package.json": "./package.json",
36
36
  ".": {
37
37
  "require": {
38
- "types": "./dist/esm/index.d.ts",
38
+ "types": "./dist/cjs/index.d.ts",
39
39
  "default": "./dist/cjs/index.js"
40
40
  },
41
41
  "import": {
@@ -47,7 +47,7 @@
47
47
  "scripts": {
48
48
  "clean": "rm -rf dist generated",
49
49
  "generate": "mkdir -p generated && protoc --plugin=protoc-gen-ts_proto=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_out=generated --ts_proto_opt=esModuleInterop=true,env=node,outputServices=nice-grpc,outputServices=generic-definitions,useExactTypes=false,forceLong=bigint -I ../../Kernel/Protobuf ../../Kernel/Protobuf/*.proto ../../Kernel/Protobuf/protobuf-net/*.proto && node ./embed-descriptor-set.mjs && node ./generate-generated-index.mjs",
50
- "build": "yarn generate && tsc -b && rollup -c ./rollup.config.mjs && node ./fix-declaration-imports.mjs",
50
+ "build": "yarn generate && tsc -b && rollup -c ./rollup.config.mjs && node ./fix-declaration-imports.mjs && node ./write-commonjs-package.mjs",
51
51
  "check:consumers": "node ./fix-declaration-imports.test.mjs && node ./check-consumers.mjs",
52
52
  "prepare": "yarn clean && yarn build"
53
53
  },