create-ponder 0.0.8 → 0.0.10
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 +1 -1
- package/dist/{bin → src/bin}/create-ponder +0 -0
- package/dist/{helpers → src/helpers}/detectPackageManager.js +0 -0
- package/dist/{helpers → src/helpers}/getEtherscanChainId.js +0 -0
- package/dist/{helpers → src/helpers}/getGraphProtocolChainId.js +0 -0
- package/dist/{helpers → src/helpers}/validateGraphProtocolSource.js +0 -0
- package/dist/{index.js → src/index.js} +5 -32
- package/dist/{templates → src/templates}/basic.js +0 -0
- package/dist/{templates → src/templates}/etherscan.js +0 -0
- package/dist/{templates → src/templates}/subgraph.js +0 -0
- package/package.json +10 -6
package/README.md
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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"),
|
|
@@ -215,41 +215,14 @@ generated/`
|
|
|
215
215
|
const packageManager = await (0, import_detectPackageManager.detect)();
|
|
216
216
|
const runCommand =
|
|
217
217
|
packageManager === "npm" ? `${packageManager} run` : packageManager;
|
|
218
|
-
const renderYaml = `
|
|
219
|
-
# This file was generated by \`create-ponder\`. You can deploy your Ponder app
|
|
220
|
-
# by signing in to https://render.com, connecting this repository, and clicking Deploy.
|
|
221
|
-
|
|
222
|
-
services:
|
|
223
|
-
- type: web
|
|
224
|
-
name: ponder-app
|
|
225
|
-
env: node
|
|
226
|
-
buildCommand: ${packageManager} install
|
|
227
|
-
startCommand: ${runCommand} start
|
|
228
|
-
envVars:
|
|
229
|
-
- key: DATABASE_URL
|
|
230
|
-
fromDatabase:
|
|
231
|
-
name: ponder-db
|
|
232
|
-
property: connectionString
|
|
233
|
-
${ponderConfig.networks
|
|
234
|
-
.map(
|
|
235
|
-
(n) => ` - key: PONDER_RPC_URL_${n.chainId}
|
|
236
|
-
sync: false`
|
|
237
|
-
)
|
|
238
|
-
.join("\n")}
|
|
239
|
-
|
|
240
|
-
databases:
|
|
241
|
-
- name: ponder-db
|
|
242
|
-
postgresMajorVersion: 14
|
|
243
|
-
`;
|
|
244
|
-
(0, import_node_fs.writeFileSync)(
|
|
245
|
-
import_node_path.default.join(ponderRootDir, "render.yaml"),
|
|
246
|
-
import_prettier.default.format(renderYaml, { parser: "yaml" })
|
|
247
|
-
);
|
|
248
218
|
console.log(
|
|
249
219
|
import_picocolors.default.cyan("[create-ponder] ") +
|
|
250
220
|
`Installing using ${packageManager}`
|
|
251
221
|
);
|
|
252
|
-
|
|
222
|
+
const installCommand = overrides.installCommand
|
|
223
|
+
? overrides.installCommand
|
|
224
|
+
: `${packageManager} install`;
|
|
225
|
+
(0, import_node_child_process.execSync)(installCommand, {
|
|
253
226
|
cwd: ponderRootDir,
|
|
254
227
|
stdio: "inherit",
|
|
255
228
|
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-ponder",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
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": "
|
|
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
|
|
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
|
}
|