@apollo/rover 0.5.0-rc.1 → 0.5.2

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
@@ -37,7 +37,7 @@ rover graph publish --schema ./path-to-valid-schema test@cats
37
37
  ## Command-line options
38
38
 
39
39
  ```console
40
- Rover 0.5.0-rc.1
40
+ Rover 0.5.2
41
41
 
42
42
  Rover - Your Graph Companion
43
43
  Read the getting started guide by running:
@@ -102,7 +102,6 @@ SUBCOMMANDS:
102
102
  config Configuration profile commands
103
103
  docs Interact with Rover's documentation
104
104
  explain Explain error codes
105
- fed2 Federation 2 Alpha commands
106
105
  graph Graph API schema commands
107
106
  help Prints this message or the help of the given subcommand(s)
108
107
  subgraph Subgraph schema commands
@@ -142,7 +141,7 @@ To install a specific version of Rover (note the `v` prefixing the version numbe
142
141
  > Note: If you're installing Rover in a CI environment, it's best to target a specific version rather than using the latest URL, since future major breaking changes could affect CI workflows otherwise.
143
142
 
144
143
  ```bash
145
- curl -sSL https://rover.apollo.dev/nix/v0.5.0-rc.1 | sh
144
+ curl -sSL https://rover.apollo.dev/nix/v0.5.2 | sh
146
145
  ```
147
146
 
148
147
  You will need `curl` installed on your system to run the above installation commands. You can get the latest version from [the curl downloads page](https://curl.se/download.html).
@@ -160,7 +159,7 @@ To install a specific version of Rover (note the `v` prefixing the version numbe
160
159
  > Note: If you're installing Rover in a CI environment, it's best to target a specific version rather than using the latest URL, since future major breaking changes could affect CI workflows otherwise.
161
160
 
162
161
  ```bash
163
- iwr 'https://rover.apollo.dev/win/v0.5.0-rc.1' | iex
162
+ iwr 'https://rover.apollo.dev/win/v0.5.2' | iex
164
163
  ```
165
164
 
166
165
  #### npm installer
package/binary.js CHANGED
@@ -3,7 +3,7 @@ const os = require("os");
3
3
  const cTable = require("console.table");
4
4
  const libc = require("detect-libc");
5
5
  const { join } = require("path");
6
- const { spawnSync } = require("child_process");
6
+ const { configureProxy } = require("axios-proxy-builder");
7
7
 
8
8
  const error = (msg) => {
9
9
  console.error(msg);
@@ -95,49 +95,28 @@ const getBinary = () => {
95
95
  const url = `https://rover.apollo.dev/tar/${name}/${platform.RUST_TARGET}/v${version}`;
96
96
  let binary = new Binary(platform.BINARY_NAME, url);
97
97
 
98
- // binary-install doesn't put the binary in the right place, so just patch it.
99
- binary.installDirectory = join(__dirname, "node_modules", ".bin");
100
- binary.binaryPath = join(binary.installDirectory, binary.name);
101
98
  // setting this allows us to extract supergraph plugins to the proper directory
102
99
  // the variable itself is read in Rust code
103
100
  process.env.APOLLO_NODE_MODULES_BIN_DIR = binary.installDirectory;
104
101
  return binary;
105
102
  };
106
103
 
107
- const run = () => {
108
- const binary = getBinary();
109
- binary.run();
110
- };
111
-
112
104
  const install = () => {
113
105
  const binary = getBinary();
114
- binary.install();
115
- let pluginInstallCommand = `${binary.binaryPath} install --plugin`;
116
- let commands = [
117
- `${pluginInstallCommand} supergraph@latest-0`,
118
- `${pluginInstallCommand} supergraph@latest-2`,
119
- ];
120
- for (command of commands) {
121
- try {
122
- spawnSync(command, {
123
- stdio: "inherit",
124
- shell: true,
125
- });
126
- } catch (e) {
127
- console.error(
128
- `'${command.replace(
129
- binary.binaryPath,
130
- binary.name
131
- )}' failed with message '${
132
- e.message
133
- }'. 'rover supergraph compose' might not work properly on your machine.`
134
- );
135
- }
136
- }
106
+ const proxy = configureProxy(binary.url);
107
+ binary.install(proxy);
108
+
109
+ // these messages are duplicated in `src/command/install/mod.rs`
110
+ // for the curl installer.
111
+ console.log(
112
+ "If you would like to disable Rover's anonymized usage collection, you can set APOLLO_TELEMETRY_DISABLED=1"
113
+ );
114
+ console.log(
115
+ "You can check out our documentation at https://go.apollo.dev/r/docs."
116
+ );
137
117
  };
138
118
 
139
119
  module.exports = {
140
120
  install,
141
- run,
142
121
  getBinary,
143
122
  };
package/install.js CHANGED
@@ -2,16 +2,3 @@
2
2
 
3
3
  const { install } = require("./binary");
4
4
  install();
5
-
6
- // use setTimeout so the message prints after the install happens.zzs
7
- setTimeout(() => {
8
- // these messages are duplicated in `src/command/install/mod.rs`
9
- // for the curl installer.
10
- console.log(
11
- "If you would like to disable Rover's anonymized usage collection, you can set APOLLO_TELEMETRY_DISABLED=1"
12
- );
13
- console.log(
14
- "You can check out our documentation at https://go.apollo.dev/r/docs."
15
- ),
16
- 400;
17
- });
package/package.json CHANGED
@@ -1,11 +1,8 @@
1
1
  {
2
2
  "name": "@apollo/rover",
3
- "version": "0.5.0-rc.1",
3
+ "version": "0.5.2",
4
4
  "description": "The new Apollo CLI",
5
5
  "main": "index.js",
6
- "bin": {
7
- "rover": "run.js"
8
- },
9
6
  "scripts": {
10
7
  "prepack": "cp ../../README.md . && cp ../../LICENSE .",
11
8
  "postinstall": "node ./install.js",
@@ -33,15 +30,16 @@
33
30
  },
34
31
  "volta": {
35
32
  "node": "17.5.0",
36
- "npm": "8.5.4"
33
+ "npm": "8.7.0"
37
34
  },
38
35
  "homepage": "https://github.com/apollographql/rover#readme",
39
36
  "dependencies": {
40
- "binary-install": "^0.1.1",
37
+ "axios-proxy-builder": "^0.1.1",
38
+ "binary-install": "^1.0.0",
41
39
  "console.table": "^0.10.0",
42
40
  "detect-libc": "^2.0.0"
43
41
  },
44
42
  "devDependencies": {
45
- "prettier": "2.6.0"
43
+ "prettier": "2.6.2"
46
44
  }
47
45
  }
package/run.js DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const { run } = require("./binary");
4
- run();