@graphprotocol/graph-cli 0.93.0 → 0.93.1-alpha-20241218173119-1eb80f4bb4830a1adb0894087328b56e4fc6ee13
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/CHANGELOG.md +9 -0
- package/dist/commands/auth.d.ts +1 -0
- package/dist/commands/auth.js +11 -8
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @graphprotocol/graph-cli
|
|
2
2
|
|
|
3
|
+
## 0.93.1-alpha-20241218173119-1eb80f4bb4830a1adb0894087328b56e4fc6ee13
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1859](https://github.com/graphprotocol/graph-tooling/pull/1859)
|
|
8
|
+
[`1eb80f4`](https://github.com/graphprotocol/graph-tooling/commit/1eb80f4bb4830a1adb0894087328b56e4fc6ee13)
|
|
9
|
+
Thanks [@YaroShkvorets](https://github.com/YaroShkvorets)! - `graph auth`: fix bug with setting
|
|
10
|
+
deploy key
|
|
11
|
+
|
|
3
12
|
## 0.93.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
package/dist/commands/auth.d.ts
CHANGED
package/dist/commands/auth.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { print, prompt } from 'gluegun';
|
|
2
|
-
import { Args, Command, Flags
|
|
2
|
+
import { Args, Command, Flags } from '@oclif/core';
|
|
3
3
|
import { saveDeployKey } from '../command-helpers/auth.js';
|
|
4
4
|
import { chooseNodeUrl } from '../command-helpers/node.js';
|
|
5
5
|
export default class AuthCommand extends Command {
|
|
@@ -12,19 +12,22 @@ export default class AuthCommand extends Command {
|
|
|
12
12
|
char: 'h',
|
|
13
13
|
}),
|
|
14
14
|
};
|
|
15
|
+
validateStudioDeployKey(value) {
|
|
16
|
+
if (!value)
|
|
17
|
+
return false;
|
|
18
|
+
return /^[0-9a-fA-F]{32}$/.test(value);
|
|
19
|
+
}
|
|
15
20
|
async run() {
|
|
16
21
|
const { args: { 'deploy-key': initialDeployKey }, } = await this.parse(AuthCommand);
|
|
17
22
|
const { node } = chooseNodeUrl({});
|
|
18
23
|
const { deployKey } = await prompt.ask([
|
|
19
24
|
{
|
|
20
|
-
type: '
|
|
25
|
+
type: 'input',
|
|
21
26
|
name: 'deployKey',
|
|
22
|
-
message: () => 'What is
|
|
23
|
-
initial: initialDeployKey,
|
|
27
|
+
message: () => 'What is your Subgraph Studio deploy key?',
|
|
24
28
|
required: true,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
: value,
|
|
29
|
+
skip: this.validateStudioDeployKey(initialDeployKey),
|
|
30
|
+
validate: value => this.validateStudioDeployKey(value) || `Invalid Subgraph Studio deploy key: ${value}`,
|
|
28
31
|
},
|
|
29
32
|
]);
|
|
30
33
|
try {
|
|
@@ -32,7 +35,7 @@ export default class AuthCommand extends Command {
|
|
|
32
35
|
print.success(`Deploy key set for ${node}`);
|
|
33
36
|
}
|
|
34
37
|
catch (e) {
|
|
35
|
-
this.error(e
|
|
38
|
+
this.error(`Failed to set deploy key: ${e.message}`, { exit: 1 });
|
|
36
39
|
}
|
|
37
40
|
}
|
|
38
41
|
}
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphprotocol/graph-cli",
|
|
3
|
-
"version": "0.93.
|
|
3
|
+
"version": "0.93.1-alpha-20241218173119-1eb80f4bb4830a1adb0894087328b56e4fc6ee13",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "CLI for building for and deploying to The Graph",
|
|
6
6
|
"license": "(Apache-2.0 OR MIT)",
|