@graphprotocol/graph-cli 0.43.0 → 0.43.1-rc-20230320193528-6114dad
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
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @graphprotocol/graph-cli
|
|
2
2
|
|
|
3
|
+
## 0.43.1-rc-20230320193528-6114dad
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`876bc52`](https://github.com/graphprotocol/graph-tooling/commit/876bc523e5a53db162d9b5aa79e9de76a9e92ccf)
|
|
8
|
+
Thanks [@saihaj](https://github.com/saihaj)! - Allow file data sources (with no network) to deploy
|
|
9
|
+
to the studio. File data sources don't have a network specified.
|
|
10
|
+
|
|
3
11
|
## 0.43.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
|
@@ -26,9 +26,10 @@ exports.allowedStudioNetworks = [
|
|
|
26
26
|
];
|
|
27
27
|
const validateStudioNetwork = ({ studio, product, network, }) => {
|
|
28
28
|
const isStudio = studio || product === 'subgraph-studio';
|
|
29
|
-
const isAllowedNetwork =
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
const isAllowedNetwork = !network ||
|
|
30
|
+
exports.allowedStudioNetworks.includes(
|
|
31
|
+
// @ts-expect-error we're checking if the network is allowed
|
|
32
|
+
network);
|
|
32
33
|
if (isStudio && !isAllowedNetwork) {
|
|
33
34
|
throw new Error(`The Subgraph Studio only allows subgraphs for these networks: ${exports.allowedStudioNetworks.join(', ')}`);
|
|
34
35
|
}
|
|
@@ -16,6 +16,12 @@ describe('Version Command Helpers', () => {
|
|
|
16
16
|
network: 'gnosis',
|
|
17
17
|
})).not.toThrow(new Error(`The Subgraph Studio only allows subgraphs for these networks: ${studio_1.allowedStudioNetworks.join(', ')}`));
|
|
18
18
|
});
|
|
19
|
+
test('And no network is passed', () => {
|
|
20
|
+
expect(() => (0, studio_1.validateStudioNetwork)({
|
|
21
|
+
studio: true,
|
|
22
|
+
network: undefined,
|
|
23
|
+
})).not.toThrow(new Error(`The Subgraph Studio only allows subgraphs for these networks: ${studio_1.allowedStudioNetworks.join(', ')}`));
|
|
24
|
+
});
|
|
19
25
|
test("And it's NOT an allowed network", () => {
|
|
20
26
|
expect(() => (0, studio_1.validateStudioNetwork)({
|
|
21
27
|
product: 'subgraph-studio',
|
package/oclif.manifest.json
CHANGED