@graphprotocol/graph-cli 0.69.2 → 0.70.0-alpha-20240415174849-cf18231
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 +8 -0
- package/dist/command-helpers/scaffold.d.ts +2 -0
- package/dist/scaffold/get-git-ignore.d.ts +1 -0
- package/dist/scaffold/get-git-ignore.js +41 -0
- package/dist/scaffold/index.d.ts +3 -0
- package/dist/scaffold/index.js +6 -0
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @graphprotocol/graph-cli
|
|
2
2
|
|
|
3
|
+
## 0.70.0-alpha-20240415174849-cf18231
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#1629](https://github.com/graphprotocol/graph-tooling/pull/1629)
|
|
8
|
+
[`cf18231`](https://github.com/graphprotocol/graph-tooling/commit/cf18231805e107644e634b548f2e762977165a3c)
|
|
9
|
+
Thanks [@saihaj](https://github.com/saihaj)! - generate gitignore file
|
|
10
|
+
|
|
3
11
|
## 0.69.2
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -18,6 +18,7 @@ export declare const generateScaffold: ({ protocolInstance, abi, contract, netwo
|
|
|
18
18
|
'subgraph.yaml': string;
|
|
19
19
|
'schema.graphql': string;
|
|
20
20
|
'package.json': string;
|
|
21
|
+
'.gitignore': string;
|
|
21
22
|
'tsconfig.json'?: undefined;
|
|
22
23
|
'docker-compose.yml'?: undefined;
|
|
23
24
|
src?: undefined;
|
|
@@ -29,6 +30,7 @@ export declare const generateScaffold: ({ protocolInstance, abi, contract, netwo
|
|
|
29
30
|
'schema.graphql': string;
|
|
30
31
|
'tsconfig.json': string;
|
|
31
32
|
'docker-compose.yml': string;
|
|
33
|
+
'.gitignore': string;
|
|
32
34
|
src: {
|
|
33
35
|
[x: string]: string;
|
|
34
36
|
} | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getGitIgnore: () => string;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getGitIgnore = void 0;
|
|
4
|
+
const getGitIgnore = () => {
|
|
5
|
+
return `# Graph CLI generated artifacts
|
|
6
|
+
build/
|
|
7
|
+
generated/
|
|
8
|
+
|
|
9
|
+
# Dependency directories
|
|
10
|
+
node_modules/
|
|
11
|
+
jspm_packages/
|
|
12
|
+
|
|
13
|
+
# Logs
|
|
14
|
+
logs
|
|
15
|
+
*.log
|
|
16
|
+
npm-debug.log*
|
|
17
|
+
yarn-debug.log*
|
|
18
|
+
yarn-error.log*
|
|
19
|
+
|
|
20
|
+
# Optional npm cache directory
|
|
21
|
+
.npm
|
|
22
|
+
|
|
23
|
+
# Optional eslint cache
|
|
24
|
+
.eslintcache
|
|
25
|
+
|
|
26
|
+
# dotenv environment variables file
|
|
27
|
+
.env
|
|
28
|
+
|
|
29
|
+
# Testing
|
|
30
|
+
coverage
|
|
31
|
+
coverage.json
|
|
32
|
+
|
|
33
|
+
# Typechain
|
|
34
|
+
typechain
|
|
35
|
+
typechain-types
|
|
36
|
+
|
|
37
|
+
# Hardhat files
|
|
38
|
+
cache
|
|
39
|
+
`;
|
|
40
|
+
};
|
|
41
|
+
exports.getGitIgnore = getGitIgnore;
|
package/dist/scaffold/index.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export default class Scaffold {
|
|
|
30
30
|
generateSchema(): Promise<string>;
|
|
31
31
|
generateTsConfig(): Promise<string>;
|
|
32
32
|
generateDockerFileConfig(): Promise<string>;
|
|
33
|
+
generateGitIgnoreFile(): string;
|
|
33
34
|
generateMappings(): Promise<{
|
|
34
35
|
[x: string]: string;
|
|
35
36
|
} | undefined>;
|
|
@@ -44,6 +45,7 @@ export default class Scaffold {
|
|
|
44
45
|
'subgraph.yaml': string;
|
|
45
46
|
'schema.graphql': string;
|
|
46
47
|
'package.json': string;
|
|
48
|
+
'.gitignore': string;
|
|
47
49
|
'tsconfig.json'?: undefined;
|
|
48
50
|
'docker-compose.yml'?: undefined;
|
|
49
51
|
src?: undefined;
|
|
@@ -55,6 +57,7 @@ export default class Scaffold {
|
|
|
55
57
|
'schema.graphql': string;
|
|
56
58
|
'tsconfig.json': string;
|
|
57
59
|
'docker-compose.yml': string;
|
|
60
|
+
'.gitignore': string;
|
|
58
61
|
src: {
|
|
59
62
|
[x: string]: string;
|
|
60
63
|
} | undefined;
|
package/dist/scaffold/index.js
CHANGED
|
@@ -8,6 +8,7 @@ const prettier_1 = __importDefault(require("prettier"));
|
|
|
8
8
|
const subgraph_1 = require("../command-helpers/subgraph");
|
|
9
9
|
const version_1 = require("../version");
|
|
10
10
|
const get_docker_file_1 = require("./get-docker-file");
|
|
11
|
+
const get_git_ignore_1 = require("./get-git-ignore");
|
|
11
12
|
const mapping_1 = require("./mapping");
|
|
12
13
|
const schema_1 = require("./schema");
|
|
13
14
|
const tests_1 = require("./tests");
|
|
@@ -110,6 +111,9 @@ dataSources:
|
|
|
110
111
|
async generateDockerFileConfig() {
|
|
111
112
|
return await prettier_1.default.format((0, get_docker_file_1.getDockerFile)(), { parser: 'yaml' });
|
|
112
113
|
}
|
|
114
|
+
generateGitIgnoreFile() {
|
|
115
|
+
return (0, get_git_ignore_1.getGitIgnore)();
|
|
116
|
+
}
|
|
113
117
|
async generateMappings() {
|
|
114
118
|
return this.protocol.getMappingScaffold()
|
|
115
119
|
? { [`${gluegun_1.strings.kebabCase(this.contractName)}.ts`]: await this.generateMapping() }
|
|
@@ -148,6 +152,7 @@ dataSources:
|
|
|
148
152
|
'subgraph.yaml': await this.generateManifest(),
|
|
149
153
|
'schema.graphql': await this.generateSchema(),
|
|
150
154
|
'package.json': await this.generatePackageJsonForSubstreams(),
|
|
155
|
+
'.gitignore': await this.generateGitIgnoreFile(),
|
|
151
156
|
};
|
|
152
157
|
}
|
|
153
158
|
return {
|
|
@@ -156,6 +161,7 @@ dataSources:
|
|
|
156
161
|
'schema.graphql': await this.generateSchema(),
|
|
157
162
|
'tsconfig.json': await this.generateTsConfig(),
|
|
158
163
|
'docker-compose.yml': await this.generateDockerFileConfig(),
|
|
164
|
+
'.gitignore': await this.generateGitIgnoreFile(),
|
|
159
165
|
src: await this.generateMappings(),
|
|
160
166
|
abis: await this.generateABIs(),
|
|
161
167
|
tests: await this.generateTests(),
|
package/oclif.manifest.json
CHANGED