@graphprotocol/graph-cli 0.93.0 → 0.93.1-alpha-20241218175003-595e75e105c977ee9a4a2962ae00aca6fb51eebc
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 +12 -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-20241218175003-595e75e105c977ee9a4a2962ae00aca6fb51eebc
|
|
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,23 @@ 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
|
-
|
|
29
|
+
initial: initialDeployKey,
|
|
30
|
+
skip: this.validateStudioDeployKey(initialDeployKey),
|
|
31
|
+
validate: value => this.validateStudioDeployKey(value) || `Invalid Subgraph Studio deploy key: ${value}`,
|
|
28
32
|
},
|
|
29
33
|
]);
|
|
30
34
|
try {
|
|
@@ -32,7 +36,7 @@ export default class AuthCommand extends Command {
|
|
|
32
36
|
print.success(`Deploy key set for ${node}`);
|
|
33
37
|
}
|
|
34
38
|
catch (e) {
|
|
35
|
-
this.error(e
|
|
39
|
+
this.error(`Failed to set deploy key: ${e.message}`, { exit: 1 });
|
|
36
40
|
}
|
|
37
41
|
}
|
|
38
42
|
}
|
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-20241218175003-595e75e105c977ee9a4a2962ae00aca6fb51eebc",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "CLI for building for and deploying to The Graph",
|
|
6
6
|
"license": "(Apache-2.0 OR MIT)",
|