Skip to content

Commit

Permalink
remove nest land
Browse files Browse the repository at this point in the history
  • Loading branch information
sylc committed Dec 24, 2021
1 parent 8ca6b67 commit 36194ec
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 52 deletions.
1 change: 0 additions & 1 deletion cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ await new Command()
packageName: "dkill",
currentVersion: version,
denoLand: true,
nestLand: true,
});
return;
}
Expand Down
51 changes: 0 additions & 51 deletions src/upgrader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export async function upgrader(config: {
packageName: string;
currentVersion: string;
denoLand?: boolean;
nestLand?: boolean;
}) {
// try to find the install script
console.log("Run ONE of the below commands");
Expand All @@ -37,54 +36,4 @@ export async function upgrader(config: {
console.log("Already up to date from deno.land");
}
}
if (config.nestLand) {
const res = await fetch("https://nest.land/api/package-client", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({ data: { name: config.packageName } }),
});
const info = await res.json();
// {
// "body": {
// "name": "dkill",
// "normalizedName": "dkill",
// "owner": "scau",
// "description": "Deno cli to kill processes and ports",
// "repository": "https://github.com/sylc/dkill",
// "latestVersion": "dkill@0.5.0",
// "latestStableVersion": "dkill@0.5.0",
// "packageUploadNames": [
// "dkill@0.2.0",
// "dkill@0.2.1",
// "dkill@0.2.2",
// "dkill@0.2.3",
// "dkill@0.3.0",
// "dkill@0.4.0",
// "dkill@0.5.0"
// ],
// "locked": null,
// "malicious": null,
// "unlisted": false,
// "updatedAt": "2021-02-21T06:06:18.931Z",
// "createdAt": "2021-02-06T12:40:59.473Z"
// }
// }
if (
`${config.packageName}@${config.currentVersion}` !==
info.body.latestVersion
) {
const newFlags = await fetchNewFlags(
`https://x.nest.land/${info.body.latestVersion}/version.ts`,
);
console.log(
`nest.land: deno install -f ${
newFlags.join(" ")
} https://x.nest.land/${info.body.latestVersion}/cli.ts`,
);
} else {
console.log("Already up to date from nest.land");
}
}
}

0 comments on commit 36194ec

Please sign in to comment.