Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import engine reporting protobuf and fix reporting readme #1429

Merged
merged 18 commits into from
Jul 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ All of the packages in the `apollo-server` repo are released with the same versi

### vNEXT

- update apollo-engine-reporting-protobuf to non-beta [#1429](https://github.com/apollographql/apollo-server/pull/1429)

### rc.10

- Fix and Export Extension and Playground Types [#1360](https://github.com/apollographql/apollo-server/pull/1360)
Expand Down
94 changes: 94 additions & 0 deletions packages/apollo-engine-reporting-protobuf/.circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
version: 2
#
# Reusable Snippets!
#
# These are re-used by the various tests below, to avoid repetition.
#
run_install_desired_npm: &run_install_desired_npm
run:
# Due to a bug, npm upgrades from the version of npm that ships with
# Node.js 6 (npm v3.10.10) go poorly and generally cause other problems
# within the environment. Since `yarn` is already available here we can
# use that to work-around the issue. It's possible that `npm` artifact
# jockeying might avoid this need, but this can be removed once Node 6 is
# no longer being built below.
name: Install npm@5, but with yarn.
command: sudo yarn global add npm@5

# These are the steps used for each version of Node which we're testing
# against. Thanks to YAMLs inability to merge arrays (though it is able
# to merge objects), every version of Node must use the exact same steps,
# or these steps would need to be repeated in a version of Node that needs
# something different. Probably best to avoid that, out of principle, though.
common_test_steps: &common_test_steps
steps:
# Install the latest npm, rather than using the versions which ship
# in older versions of Node.js This allows for a more consistent
# installation, and typically users of older Node versions at least
# update their npm to the latest.
- *run_install_desired_npm

- checkout

# Build a cache key which will bust with Node.js ABI and version changes.
- run: |
node -p process.config | tee .cache_key
node -p process.versions | tee -a .cache_key
cat package-lock.json | tee -a .cache_key

- restore_cache:
keys:
- v1-dependencies-{{ checksum ".cache_key" }}

- run: node --version

- run: npm --version

- run: npm install

- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum ".cache_key" }}

# test with coverage.
- run: npm run circle


jobs:
# Platform tests, each with the same tests but different platform or version.
# The docker tag represents the Node.js version and the full list is available
# at https://hub.docker.com/r/circleci/node/.
Node.js 4:
docker: [ { image: 'circleci/node:4' } ]
<<: *common_test_steps

Node.js 6:
docker: [ { image: 'circleci/node:6' } ]
<<: *common_test_steps

Node.js 8:
docker: [ { image: 'circleci/node:8' } ]
<<: *common_test_steps

Node.js 10:
docker: [ { image: 'circleci/node:10' } ]
<<: *common_test_steps

# Linting can run on the latest Node, which already has the latest `npm` and
# doesn't warrant run_install_desired_npm (which is more critical above)
Linting:
docker: [ { image: 'circleci/node:8' } ]
steps:
# (speed) Intentionally omitted (unnecessary) run_install_desired_npm.
- checkout
- run: npm install
- run: npm run lint

workflows:
version: 2
Build and Test:
jobs:
# There isn't any non-generated code in this package now, so we only
# bother to run one test job and no linting.
- Node.js 10
1 change: 1 addition & 0 deletions packages/apollo-engine-reporting-protobuf/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
layout node
2 changes: 2 additions & 0 deletions packages/apollo-engine-reporting-protobuf/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/dist
/node_modules
6 changes: 6 additions & 0 deletions packages/apollo-engine-reporting-protobuf/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*
!src/**/*
!dist/**/*
dist/**/*.test.*
!package.json
!README.md
7 changes: 7 additions & 0 deletions packages/apollo-engine-reporting-protobuf/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# apollo-engine-reporting-protobuf

This contains generated Javascript/TypeScript code for the protobuf definitions
for the Engine reporting API.

The Engine reporting API is currently subject to change at any time; do not rely
on this to build your own client.
99 changes: 99 additions & 0 deletions packages/apollo-engine-reporting-protobuf/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions packages/apollo-engine-reporting-protobuf/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "apollo-engine-reporting-protobuf",
"version": "0.0.0-beta.7",
"description": "Protobuf format for Apollo Engine",
"main": "dist/index.js",
"scripts": {
"prepublish": "npm run pbjs && npm run pbts",
"pbjs": "bash -c 'mkdir -p dist && pbjs --target static-module --out dist/index.js --wrap commonjs --force-number <(grep -v \"package mdg.engine.proto\" reports.proto)'",
"pbts": "pbts -o dist/index.d.ts dist/index.js",
"circle": "npm run prepare"
},
"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 <[email protected]>",
"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"
},
"typings": "dist/index.d.ts",
"typescript": {
"definition": "dist/index.d.ts"
}
}
Loading