Skip to content

Commit

Permalink
Merge pull request #244 from robin-thomas/ci_integration_tests
Browse files Browse the repository at this point in the history
Fix Ci integration tests
  • Loading branch information
PaulRBerg authored Sep 11, 2023
2 parents 206e08d + 97bdcd4 commit b2e345b
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 97 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
"prompts": "^2.4.2",
"tar": "^6.1.11",
"update-check": "^1.5.4",
"url-exist": "2.0.2",
"validate-npm-package-name": "^3.0.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/frameworks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import fsExtra from "fs-extra";
import got from "got";
import promisePipe from "promisepipe";
import tar from "tar";
import urlExists from "url-exist";

import { codeloadBaseUrl, githubApiBaseUrl } from "./constants";
import { getRefs, getRepository } from "./env";
import { urlExists } from "./url";

export async function downloadAndExtractFrameworkHandlebars(root: string, framework: string): Promise<void> {
await fsExtra.ensureDir(root);
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import Handlebars from "handlebars";
import path from "path";
import promisePipe from "promisepipe";
import tar from "tar";
import urlExists from "url-exist";

import {
FrameworkKey,
Expand All @@ -15,6 +14,7 @@ import {
githubApiBaseUrl,
} from "./constants";
import { getRefs, getRepository } from "./env";
import { urlExists } from "./url";

export async function downloadAndExtractTemplateContext(
root: string,
Expand Down
14 changes: 14 additions & 0 deletions src/helpers/url.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import https from "https";

export const urlExists = (url: string): Promise<boolean> =>
new Promise(resolve => {
https.get(
url,
{
headers: {
"User-Agent": "create-eth-app",
},
},
res => resolve(res.statusCode === 200),
);
});
102 changes: 8 additions & 94 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3209,15 +3209,6 @@ __metadata:
languageName: node
linkType: hard

"abort-controller@npm:^3.0.0":
version: 3.0.0
resolution: "abort-controller@npm:3.0.0"
dependencies:
event-target-shim: ^5.0.0
checksum: 170bdba9b47b7e65906a28c8ce4f38a7a369d78e2271706f020849c1bfe0ee2067d4261df8bbb66eb84f79208fd5b710df759d64191db58cfba7ce8ef9c54b75
languageName: node
linkType: hard

"acorn-globals@npm:^6.0.0":
version: 6.0.0
resolution: "acorn-globals@npm:6.0.0"
Expand Down Expand Up @@ -4718,7 +4709,6 @@ __metadata:
ts-jest: ^27.1.3
typescript: ~4.6.2
update-check: ^1.5.4
url-exist: 2.0.2
validate-npm-package-name: ^3.0.0
bin:
create-eth-app: ./dist/index.js
Expand Down Expand Up @@ -5548,13 +5538,6 @@ __metadata:
languageName: node
linkType: hard

"event-target-shim@npm:^5.0.0":
version: 5.0.1
resolution: "event-target-shim@npm:5.0.1"
checksum: 1ffe3bb22a6d51bdeb6bf6f7cf97d2ff4a74b017ad12284cc9e6a279e727dc30a5de6bb613e5596ff4dc3e517841339ad09a7eec44266eccb1aa201a30448166
languageName: node
linkType: hard

"eventemitter3@npm:^4.0.4":
version: 4.0.7
resolution: "eventemitter3@npm:4.0.7"
Expand Down Expand Up @@ -6922,13 +6905,6 @@ fsevents@^2.3.2:
languageName: node
linkType: hard

"ip-regex@npm:^4.1.0":
version: 4.3.0
resolution: "ip-regex@npm:4.3.0"
checksum: 7ff904b891221b1847f3fdf3dbb3e6a8660dc39bc283f79eb7ed88f5338e1a3d1104b779bc83759159be266249c59c2160e779ee39446d79d4ed0890dfd06f08
languageName: node
linkType: hard

"ip@npm:^1.1.5":
version: 1.1.5
resolution: "ip@npm:1.1.5"
Expand Down Expand Up @@ -7285,15 +7261,6 @@ fsevents@^2.3.2:
languageName: node
linkType: hard

"is-url-superb@npm:^3.0.0":
version: 3.0.0
resolution: "is-url-superb@npm:3.0.0"
dependencies:
url-regex: ^5.0.0
checksum: 5d1f9a945327b997fbfb3aafa18ccefe81b7a60b7101cd84d6fbd7321da738a45fb29447fa68de64324003d32bb1fbcb54cb68ee0f458c6fd4b5982feca70f9a
languageName: node
linkType: hard

"is-utf8@npm:^0.2.0, is-utf8@npm:^0.2.1":
version: 0.2.1
resolution: "is-utf8@npm:0.2.1"
Expand Down Expand Up @@ -8187,29 +8154,6 @@ fsevents@^2.3.2:
languageName: node
linkType: hard

"ky-universal@npm:^0.5.0":
version: 0.5.0
resolution: "ky-universal@npm:0.5.0"
dependencies:
abort-controller: ^3.0.0
node-fetch: ^2.6.0
peerDependencies:
ky: ">=0.17.0"
web-streams-polyfill: ">=2.0.0"
peerDependenciesMeta:
web-streams-polyfill:
optional: true
checksum: 9ad9f7ca4930cf93b1aee97c4ab1738b9962ad3cb8ae153975854f0612af1184cc5a628b1d19c9b83124364af5520f91a911685723f89588f4b39a7e544a498c
languageName: node
linkType: hard

"ky@npm:^0.19.0":
version: 0.19.1
resolution: "ky@npm:0.19.1"
checksum: 38838153fc52b10759e53893739aeb37be3705da0843ae366d71a822c1bd5bf522d52eb46fdd7ea579ff0a1185082b1f50633ba11ece27e51b081db98dacce96
languageName: node
linkType: hard

"lerna@npm:^4.0.0":
version: 4.0.0
resolution: "lerna@npm:4.0.0"
Expand Down Expand Up @@ -9114,7 +9058,14 @@ fsevents@^2.3.2:
languageName: node
linkType: hard

"node-fetch@npm:^2.6.0, node-fetch@npm:^2.6.7":
"node-fetch@npm:^2.6.1":
version: 2.6.1
resolution: "node-fetch@npm:2.6.1"
checksum: 91075bedd57879117e310fbcc36983ad5d699e522edb1ebcdc4ee5294c982843982652925c3532729fdc86b2d64a8a827797a745f332040d91823c8752ee4d7c
languageName: node
linkType: hard

"node-fetch@npm:^2.6.7":
version: 2.6.7
resolution: "node-fetch@npm:2.6.7"
dependencies:
Expand All @@ -9128,13 +9079,6 @@ fsevents@^2.3.2:
languageName: node
linkType: hard

"node-fetch@npm:^2.6.1":
version: 2.6.1
resolution: "node-fetch@npm:2.6.1"
checksum: 91075bedd57879117e310fbcc36983ad5d699e522edb1ebcdc4ee5294c982843982652925c3532729fdc86b2d64a8a827797a745f332040d91823c8752ee4d7c
languageName: node
linkType: hard

"node-gyp@npm:^5.0.2":
version: 5.1.1
resolution: "node-gyp@npm:5.1.1"
Expand Down Expand Up @@ -11791,15 +11735,6 @@ resolve@^1.3.2:
languageName: node
linkType: hard

"tlds@npm:^1.203.0":
version: 1.230.0
resolution: "tlds@npm:1.230.0"
bin:
tlds: bin.js
checksum: a1aa4e7a8887c197bf7ad4e739bee1672502aa9cb5e6e2c68ba319495988824044a1549332d284420deb14680a745179e955db13ff2ba69eef1d3850a32967ca
languageName: node
linkType: hard

"tmp@npm:^0.0.33":
version: 0.0.33
resolution: "tmp@npm:0.0.33"
Expand Down Expand Up @@ -12330,27 +12265,6 @@ typescript@^4.4.3:
languageName: node
linkType: hard

"url-exist@npm:2.0.2":
version: 2.0.2
resolution: "url-exist@npm:2.0.2"
dependencies:
is-url-superb: ^3.0.0
ky: ^0.19.0
ky-universal: ^0.5.0
checksum: fe2c4818d1365eee1c1978f40e4b759aa92e94ad8413930e4ac4226c67df34a12fa7ccd723463ae36ae493b0e79a8877961420eb70fe6947a7122c863db2651e
languageName: node
linkType: hard

"url-regex@npm:^5.0.0":
version: 5.0.0
resolution: "url-regex@npm:5.0.0"
dependencies:
ip-regex: ^4.1.0
tlds: ^1.203.0
checksum: 94f63ddd39bbc935fa3ee34ab496e1a62b2b6826982e5f7515b8b52acd6439e489d78fc2e202ab4585e0a5cc9cceca15993206153213affa928c41ce819e055c
languageName: node
linkType: hard

"use@npm:^3.1.0":
version: 3.1.1
resolution: "use@npm:3.1.1"
Expand Down

0 comments on commit b2e345b

Please sign in to comment.