2018-07-26 17:39:11 -07:00
|
|
|
{
|
|
|
|
"name": "apollo-engine-reporting-protobuf",
|
2019-02-14 15:25:38 +02:00
|
|
|
"version": "0.2.1",
|
2018-07-26 17:39:11 -07:00
|
|
|
"description": "Protobuf format for Apollo Engine",
|
|
|
|
"main": "dist/index.js",
|
2018-08-01 10:13:16 +02:00
|
|
|
"types": "dist/index.d.ts",
|
2018-07-26 17:39:11 -07:00
|
|
|
"scripts": {
|
(engine-reporting) Include `encodedTraces` only once. (#2040)
* AER: Remove encodedTraces to prevent duplicates
When there are multiple instances of apollo-engine-reporting, the
`Trace.encode` method gets wrapped each time to add the
`encodedTraces`. In order to prevent them from being added to the
protobuf multiple times, we remove the encodedTraces after adding them
once
* Add changelog
* Move incremental Trace encoding to a-e-r-protobuf
To enable incrmental compilation of traces, we add a patch to the
Trace.encode method generated by protobujs to accept and store encoded
traces. Occassionally with multiple instances of apollo-engine-reporting
that share the same version of the protobuf, the wrapper method gets
applied more than once. In order to ensure that the wrapper only gets
applied once, we patch the Trace.encode method inside of
apollo-engine-protobuf.
tsc hangs on the processing the generated protobuf.js files, so the
tsconfig.json ignores the generated protobuf file. In order for the
typescript index.ts file to compile the generated protobuf.js file is
output to the src folder. To ensure the protobuf files are available to
the production build, `npm run compile` copies the protobuf file
manually from src to dist.
* Reexport protobuf import after modification
`export * from './protobuf'` exports the unmodified reference
* Update comment on Trace.encode to point at a-e-r-p
The override now occurs inside of apollo-engine-reporting-protobuf due
to the case of having multiple reporting challenges, so we need to
update the comments to help indicate that
* Remove typescript build step
In order to simplify the generation of this library, we move the change
the index.ts file into index.js and remove the typescript build step.
Since the type safety is created by the protobufjs generation, this
seems acceptable. In general this portion of the code should remain
relatively stable, so generating and copying the code with `prepare`
remains reasonable.
2018-12-04 02:06:08 -08:00
|
|
|
"prepare": "npm run pbjs && npm run pbts && cp src/* dist",
|
|
|
|
"pbjs": "bash -c 'mkdir -p dist && pbjs --target static-module --out dist/protobuf.js --wrap commonjs --force-number <(grep -v \"package mdg.engine.proto\" src/reports.proto)'",
|
|
|
|
"pbts": "pbts -o dist/protobuf.d.ts dist/protobuf.js"
|
2018-07-26 17:39:11 -07:00
|
|
|
},
|
|
|
|
"repository": {
|
|
|
|
"type": "git",
|
|
|
|
"url": "https://github.com/apollographql/apollo-engine-reporting/tree/master/packages/apollo-engine-reporting-protobuf"
|
|
|
|
},
|
|
|
|
"keywords": [
|
|
|
|
"GraphQL",
|
|
|
|
"Apollo",
|
|
|
|
"Engine",
|
|
|
|
"Server",
|
|
|
|
"Javascript"
|
|
|
|
],
|
|
|
|
"author": "Apollo <community@apollographql.com>",
|
|
|
|
"license": "MIT",
|
|
|
|
"bugs": {
|
|
|
|
"url": "https://github.com/apollographql/apollo-engine-reporting/issues"
|
|
|
|
},
|
|
|
|
"homepage": "https://github.com/apollographql/apollo-engine-reporting#readme",
|
|
|
|
"dependencies": {
|
|
|
|
"protobufjs": "^6.8.6"
|
2018-08-01 10:13:16 +02:00
|
|
|
}
|
2018-07-26 17:39:11 -07:00
|
|
|
}
|