Skip to content

Commit

Permalink
Use cpy-cli to create .env on postinstall
Browse files Browse the repository at this point in the history
  • Loading branch information
carletex committed Jun 24, 2024
1 parent caff159 commit 951f733
Show file tree
Hide file tree
Showing 2 changed files with 174 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/foundry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"format": "forge fmt && prettier --write ./script/**/*.js",
"generate": "node scripts-js/generateAccount.js",
"lint": "forge fmt --check && prettier --check ./script/**/*.js",
"postinstall": "cpy .env.example . --rename=.env --no-overwrite",
"test": "forge test",
"verify": "forge build --build-info --build-info-path out/build-info/ && forge script script/VerifyAll.s.sol --ffi --rpc-url ${1:-default_network}"
},
Expand All @@ -23,5 +24,8 @@
"prettier": "~2.8.8",
"qrcode": "~1.5.3",
"toml": "~3.0.0"
},
"devDependencies": {
"cpy-cli": "^5.0.0"
}
}
171 changes: 170 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1672,6 +1672,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@se-2/foundry@workspace:packages/foundry"
dependencies:
cpy-cli: ^5.0.0
dotenv: ~16.3.1
envfile: ~6.18.0
ethers: ~5.7.1
Expand Down Expand Up @@ -3103,6 +3104,16 @@ __metadata:
languageName: node
linkType: hard

"aggregate-error@npm:^4.0.0":
version: 4.0.1
resolution: "aggregate-error@npm:4.0.1"
dependencies:
clean-stack: ^4.0.0
indent-string: ^5.0.0
checksum: bb3ffdfd13447800fff237c2cba752c59868ee669104bb995dfbbe0b8320e967d679e683dabb640feb32e4882d60258165cde0baafc4cd467cc7d275a13ad6b5
languageName: node
linkType: hard

"ajv@npm:8.6.3":
version: 8.6.3
resolution: "ajv@npm:8.6.3"
Expand Down Expand Up @@ -3358,6 +3369,13 @@ __metadata:
languageName: node
linkType: hard

"arrify@npm:^3.0.0":
version: 3.0.0
resolution: "arrify@npm:3.0.0"
checksum: d6c6f3dad9571234f320e130d57fddb2cc283c87f2ac7df6c7005dffc5161b7bb9376f4be655ed257050330336e84afc4f3020d77696ad231ff580a94ae5aba6
languageName: node
linkType: hard

"ast-types-flow@npm:^0.0.7":
version: 0.0.7
resolution: "ast-types-flow@npm:0.0.7"
Expand Down Expand Up @@ -3805,6 +3823,15 @@ __metadata:
languageName: node
linkType: hard

"clean-stack@npm:^4.0.0":
version: 4.2.0
resolution: "clean-stack@npm:4.2.0"
dependencies:
escape-string-regexp: 5.0.0
checksum: 373f656a31face5c615c0839213b9b542a0a48057abfb1df66900eab4dc2a5c6097628e4a0b5aa559cdfc4e66f8a14ea47be9681773165a44470ef5fb8ccc172
languageName: node
linkType: hard

"cli-cursor@npm:^4.0.0":
version: 4.0.0
resolution: "cli-cursor@npm:4.0.0"
Expand Down Expand Up @@ -4012,6 +4039,45 @@ __metadata:
languageName: node
linkType: hard

"cp-file@npm:^10.0.0":
version: 10.0.0
resolution: "cp-file@npm:10.0.0"
dependencies:
graceful-fs: ^4.2.10
nested-error-stacks: ^2.1.1
p-event: ^5.0.1
checksum: 13d480872609c7ce5036624fd7998ad493ba1869a28d8595f515e7a3576145f05197a41989193a250b722836930c50efe2dd8f69e8c8ec2f4b2d511dd1688e4c
languageName: node
linkType: hard

"cpy-cli@npm:^5.0.0":
version: 5.0.0
resolution: "cpy-cli@npm:5.0.0"
dependencies:
cpy: ^10.1.0
meow: ^12.0.1
bin:
cpy: cli.js
checksum: f575e8e80262320c1b7c8ff57546a7dff69dcef892ac9dd381b9ec2418c5ecd5bdda5f6c6a900566af087c2167db57ae25521b66efe34dd59d8a41b16c4e5f96
languageName: node
linkType: hard

"cpy@npm:^10.1.0":
version: 10.1.0
resolution: "cpy@npm:10.1.0"
dependencies:
arrify: ^3.0.0
cp-file: ^10.0.0
globby: ^13.1.4
junk: ^4.0.1
micromatch: ^4.0.5
nested-error-stacks: ^2.1.1
p-filter: ^3.0.0
p-map: ^6.0.0
checksum: d914326e91f7b04be8f2a694b345a9d0a5ad220032ec9e8528c26e2132f80f028de4b61c42c5ce67a3fcd1018770ac31317c237e4ffc553371dfd6c13ebe0d42
languageName: node
linkType: hard

"crc-32@npm:^1.2.0":
version: 1.2.2
resolution: "crc-32@npm:1.2.2"
Expand Down Expand Up @@ -4857,6 +4923,13 @@ __metadata:
languageName: node
linkType: hard

"escape-string-regexp@npm:5.0.0":
version: 5.0.0
resolution: "escape-string-regexp@npm:5.0.0"
checksum: 20daabe197f3cb198ec28546deebcf24b3dbb1a5a269184381b3116d12f0532e06007f4bc8da25669d6a7f8efb68db0758df4cd981f57bc5b57f521a3e12c59e
languageName: node
linkType: hard

"escape-string-regexp@npm:^1.0.5":
version: 1.0.5
resolution: "escape-string-regexp@npm:1.0.5"
Expand Down Expand Up @@ -5938,6 +6011,19 @@ __metadata:
languageName: node
linkType: hard

"globby@npm:^13.1.4":
version: 13.2.2
resolution: "globby@npm:13.2.2"
dependencies:
dir-glob: ^3.0.1
fast-glob: ^3.3.0
ignore: ^5.2.4
merge2: ^1.4.1
slash: ^4.0.0
checksum: f3d84ced58a901b4fcc29c846983108c426631fe47e94872868b65565495f7bee7b3defd68923bd480582771fd4bbe819217803a164a618ad76f1d22f666f41e
languageName: node
linkType: hard

"goober@npm:^2.1.10":
version: 2.1.13
resolution: "goober@npm:2.1.13"
Expand All @@ -5956,7 +6042,7 @@ __metadata:
languageName: node
linkType: hard

"graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.11, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9":
"graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.10, graceful-fs@npm:^4.2.11, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9":
version: 4.2.11
resolution: "graceful-fs@npm:4.2.11"
checksum: ac85f94da92d8eb6b7f5a8b20ce65e43d66761c55ce85ac96df6865308390da45a8d3f0296dd3a663de65d30ba497bd46c696cc1e248c72b13d6d567138a4fc7
Expand Down Expand Up @@ -6237,6 +6323,13 @@ __metadata:
languageName: node
linkType: hard

"ignore@npm:^5.2.4":
version: 5.3.1
resolution: "ignore@npm:5.3.1"
checksum: 71d7bb4c1dbe020f915fd881108cbe85a0db3d636a0ea3ba911393c53946711d13a9b1143c7e70db06d571a5822c0a324a6bcde5c9904e7ca5047f01f1bf8cd3
languageName: node
linkType: hard

"import-fresh@npm:^3.2.1":
version: 3.3.0
resolution: "import-fresh@npm:3.3.0"
Expand All @@ -6261,6 +6354,13 @@ __metadata:
languageName: node
linkType: hard

"indent-string@npm:^5.0.0":
version: 5.0.0
resolution: "indent-string@npm:5.0.0"
checksum: e466c27b6373440e6d84fbc19e750219ce25865cb82d578e41a6053d727e5520dc5725217d6eb1cc76005a1bb1696a0f106d84ce7ebda3033b963a38583fb3b3
languageName: node
linkType: hard

"inflight@npm:^1.0.4":
version: 1.0.6
resolution: "inflight@npm:1.0.6"
Expand Down Expand Up @@ -6880,6 +6980,13 @@ __metadata:
languageName: node
linkType: hard

"junk@npm:^4.0.1":
version: 4.0.1
resolution: "junk@npm:4.0.1"
checksum: 4f0c94c0b2e46172284d9eaeb57bf1b784d86d218dbc673a1c8e08ef3443d03164238eb067591d0ad9f2c76a6ad012aeb618bb8135a2f0f26a6da931058e131b
languageName: node
linkType: hard

"keccak@npm:^3.0.3":
version: 3.0.4
resolution: "keccak@npm:3.0.4"
Expand Down Expand Up @@ -7208,6 +7315,13 @@ __metadata:
languageName: node
linkType: hard

"meow@npm:^12.0.1":
version: 12.1.1
resolution: "meow@npm:12.1.1"
checksum: a6f3be85fbe53430ef53ab933dd790c39216eb4dbaabdbef593aa59efb40ecaa417897000175476bc33eed09e4cbce01df7ba53ba91e9a4bd84ec07024cb8914
languageName: node
linkType: hard

"merge-stream@npm:^2.0.0":
version: 2.0.0
resolution: "merge-stream@npm:2.0.0"
Expand Down Expand Up @@ -7567,6 +7681,13 @@ __metadata:
languageName: node
linkType: hard

"nested-error-stacks@npm:^2.1.1":
version: 2.1.1
resolution: "nested-error-stacks@npm:2.1.1"
checksum: 5f452fad75db8480b4db584e1602894ff5977f8bf3d2822f7ba5cb7be80e89adf1fffa34dada3347ef313a4288850b4486eb0635b315c32bdfb505577e8880e3
languageName: node
linkType: hard

"next-themes@npm:^0.2.1":
version: 0.2.1
resolution: "next-themes@npm:0.2.1"
Expand Down Expand Up @@ -8040,6 +8161,24 @@ __metadata:
languageName: node
linkType: hard

"p-event@npm:^5.0.1":
version: 5.0.1
resolution: "p-event@npm:5.0.1"
dependencies:
p-timeout: ^5.0.2
checksum: 3bdd8df6092e6b149f25e9c2eb1c0843b3b4279b07be2a2c72c02b65b267a8908c2040fefd606f2497b0f2bcefcd214f8ca5a74f0c883515d400ccf1d88d5683
languageName: node
linkType: hard

"p-filter@npm:^3.0.0":
version: 3.0.0
resolution: "p-filter@npm:3.0.0"
dependencies:
p-map: ^5.1.0
checksum: aacc36820f0531c01963334edc6debf5038b47c83a1c2255b7c14f6964a9a5fc1887ce0b93e72d137727403253bcc9bb26eed9bb79896ece1fa9f52d979bb97b
languageName: node
linkType: hard

"p-finally@npm:^2.0.0":
version: 2.0.1
resolution: "p-finally@npm:2.0.1"
Expand Down Expand Up @@ -8092,6 +8231,29 @@ __metadata:
languageName: node
linkType: hard

"p-map@npm:^5.1.0":
version: 5.5.0
resolution: "p-map@npm:5.5.0"
dependencies:
aggregate-error: ^4.0.0
checksum: 065cb6fca6b78afbd070dd9224ff160dc23eea96e57863c09a0c8ea7ce921043f76854be7ee0abc295cff1ac9adcf700e79a1fbe3b80b625081087be58e7effb
languageName: node
linkType: hard

"p-map@npm:^6.0.0":
version: 6.0.0
resolution: "p-map@npm:6.0.0"
checksum: 41e20c30a08da664610ff1ed198519d8cb93567491392c819ce502f523dde1187afab23e75e4c0fe74310d424a6f74ceaebe73ad5496c9e27d91183184fedd37
languageName: node
linkType: hard

"p-timeout@npm:^5.0.2":
version: 5.1.0
resolution: "p-timeout@npm:5.1.0"
checksum: f5cd4e17301ff1ff1d8dbf2817df0ad88c6bba99349fc24d8d181827176ad4f8aca649190b8a5b1a428dfd6ddc091af4606835d3e0cb0656e04045da5c9e270c
languageName: node
linkType: hard

"p-try@npm:^2.0.0":
version: 2.2.0
resolution: "p-try@npm:2.2.0"
Expand Down Expand Up @@ -9254,6 +9416,13 @@ __metadata:
languageName: node
linkType: hard

"slash@npm:^4.0.0":
version: 4.0.0
resolution: "slash@npm:4.0.0"
checksum: da8e4af73712253acd21b7853b7e0dbba776b786e82b010a5bfc8b5051a1db38ed8aba8e1e8f400dd2c9f373be91eb1c42b66e91abb407ff42b10feece5e1d2d
languageName: node
linkType: hard

"slice-ansi@npm:^5.0.0":
version: 5.0.0
resolution: "slice-ansi@npm:5.0.0"
Expand Down

0 comments on commit 951f733

Please sign in to comment.