create-ponder 0.0.7 → 0.0.9

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
@@ -1 +1,7 @@
1
- # Go to [docs on GitHub](https://github.com/0xOlias/ponder#readme)
1
+ # create-ponder
2
+
3
+ `create-ponder` is a CLI tool for creating projects using the Ponder framework.
4
+
5
+ ## Documentation
6
+
7
+ For full documentation, visit [ponder.sh](https://ponder.sh).
File without changes
@@ -46,7 +46,7 @@ var import_detectPackageManager = require("./helpers/detectPackageManager");
46
46
  var import_basic = require("./templates/basic");
47
47
  var import_etherscan = require("./templates/etherscan");
48
48
  var import_subgraph = require("./templates/subgraph");
49
- const run = async (options) => {
49
+ const run = async (options, overrides = {}) => {
50
50
  const { ponderRootDir } = options;
51
51
  (0, import_node_fs.mkdirSync)(
52
52
  import_node_path.default.join(ponderRootDir, "abis"),
@@ -226,7 +226,7 @@ services:
226
226
  buildCommand: ${packageManager} install
227
227
  startCommand: ${runCommand} start
228
228
  envVars:
229
- - key: POSTGRES_URL
229
+ - key: DATABASE_URL
230
230
  fromDatabase:
231
231
  name: ponder-db
232
232
  property: connectionString
@@ -249,7 +249,10 @@ databases:
249
249
  import_picocolors.default.cyan("[create-ponder] ") +
250
250
  `Installing using ${packageManager}`
251
251
  );
252
- (0, import_node_child_process.execSync)(`${packageManager} install`, {
252
+ const installCommand = overrides.installCommand
253
+ ? overrides.installCommand
254
+ : `${packageManager} install`;
255
+ (0, import_node_child_process.execSync)(installCommand, {
253
256
  cwd: ponderRootDir,
254
257
  stdio: "inherit",
255
258
  });
File without changes
@@ -77,7 +77,10 @@ const fromEtherscan = async (options) => {
77
77
  ponderRootDir,
78
78
  abiRelativePath
79
79
  );
80
- (0, import_node_fs.writeFileSync)(abiAbsolutePath, abi);
80
+ (0, import_node_fs.writeFileSync)(
81
+ abiAbsolutePath,
82
+ import_prettier.default.format(abi, { parser: "json" })
83
+ );
81
84
  const schemaGraphqlFileContents = `
82
85
  type ExampleEntity @entity {
83
86
  id: ID!
File without changes
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "create-ponder",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "description": "Tool to bootstrap a Ponder project",
5
5
  "license": "MIT",
6
6
  "author": "olias.eth",
7
7
  "files": [
8
- "dist"
8
+ "dist/src"
9
9
  ],
10
10
  "bin": {
11
- "create-ponder": "./dist/bin/create-ponder"
11
+ "create-ponder": "dist/src/bin/create-ponder"
12
12
  },
13
13
  "scripts": {
14
14
  "clean": "rm -rf dist",
@@ -16,11 +16,12 @@
16
16
  "lint": "eslint src",
17
17
  "format": "prettier src --write",
18
18
  "replace-paths": "tsconfig-replace-paths --src src",
19
- "esbuild": "esbuild `find src \\( -name '*.ts' \\)` --platform=node --format=cjs --outdir=dist && $npm_execpath run replace-paths",
20
- "build": "$npm_execpath run clean && $npm_execpath run esbuild && mv dist/bin/create-ponder.js dist/bin/create-ponder",
19
+ "esbuild": "esbuild `find . \\( -name '*.ts' \\)` --platform=node --format=cjs --outdir=dist && $npm_execpath run replace-paths",
20
+ "build": "$npm_execpath run clean && $npm_execpath run esbuild && mv dist/src/bin/create-ponder.js dist/src/bin/create-ponder",
21
21
  "format-dist": "prettier dist --write --loglevel warn",
22
22
  "prerelease": "$npm_execpath run build && $npm_execpath run format-dist",
23
- "release": "$npm_execpath run prerelease && VERSION=$(npm version patch) && npm publish && git add ./package.json && git commit -m \"release(create-ponder): $VERSION\""
23
+ "release": "$npm_execpath run prerelease && VERSION=$(npm version patch) && npm publish && git add ./package.json && git commit -m \"release(create-ponder): $VERSION\"",
24
+ "test": "$npm_execpath build && export $(grep -v '^#' .env.local | xargs) && jest"
24
25
  },
25
26
  "dependencies": {
26
27
  "@ethersproject/abi": "^5.6.4",
@@ -34,10 +35,13 @@
34
35
  "yaml": "^2.1.1"
35
36
  },
36
37
  "devDependencies": {
38
+ "@ponder/core": "latest",
39
+ "@types/jest": "^29.2.3",
37
40
  "@types/node": "^18.7.8",
38
41
  "@types/node-fetch": "2",
39
42
  "@types/prettier": "^2.7.1",
40
43
  "esbuild": "^0.15.2",
44
+ "jest": "^29.3.1",
41
45
  "tsconfig-replace-paths": "^0.0.11",
42
46
  "typescript": "^4.5.5"
43
47
  }