Merge pull request #322570 from pyrox0/get-graphql-schema-init

get-graphql-schema: Move out of nodePackages
This commit is contained in:
Weijia Wang 2024-06-26 12:34:35 +02:00 committed by GitHub
commit a2fb5e8ffa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 79 additions and 47 deletions

View File

@ -0,0 +1,35 @@
{
"name": "get-graphql-schema",
"bin": "dist/index.js",
"files": [
"README.md",
"dist/"
],
"version": "2.1.1",
"description": "Downloads the GraphQL Schema of an GraphQL endpoint URL",
"scripts": {
"build": "tsc",
"prepublish": "npm run build && chmod +x dist/index.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/graphcool/get-graphql-schema.git"
},
"author": "Johannes Schickling <johannes@graph.cool>",
"license": "MIT",
"dependencies": {
"@types/chalk": "^0.4.31",
"@types/graphql": "^0.8.6",
"@types/minimist": "^1.2.0",
"@types/node": "^7.0.4",
"@types/node-fetch": "^1.6.7",
"chalk": "^1.1.3",
"graphql": "^0.9.1",
"minimist": "^1.2.0",
"node-fetch": "^1.6.3"
},
"devDependencies": {
"typescript": "^2.1.5"
}
}

View File

@ -0,0 +1,43 @@
{
lib,
mkYarnPackage,
fetchYarnDeps,
fetchFromGitHub,
nodejs_22
}: mkYarnPackage rec {
pname = "get-graphql-schema";
version = "2.1.1";
src = fetchFromGitHub {
owner = "prisma-labs";
repo = "get-graphql-schema";
rev = "v${version}";
hash = "sha256-ujc0LGAqmo4SmItm4VcbBOtmUvL6aV1ppMm4fMmuSRs=";
};
packageJSON = ./package.json;
offlineCache = fetchYarnDeps {
yarnLock = "${src}/yarn.lock";
hash = "sha256-TZGNX8UHbolLyBmQNGTnFjgx3/3f2HNVQf/h9rIVJKs=";
};
buildPhase = ''
runHook preBuild
yarn --offline build
runHook postBuild
'';
postFixup = ''
substituteInPlace $out/libexec/get-graphql-schema/deps/get-graphql-schema/dist/index.js \
--replace-fail "#!/usr/bin/env node" "#!${lib.getExe nodejs_22}"
chmod +x $out/bin/get-graphql-schema
'';
meta = {
description = "Command line tool for generating a changelog from git tags and commit history";
homepage = "https://github.com/cookpete/auto-changelog";
changelog = "https://github.com/cookpete/auto-changelog/blob/master/CHANGELOG.md";
license = lib.licenses.mit;
mainProgram = "get-graphql-schema";
maintainers = with lib.maintainers; [ pyrox0 ];
};
}

View File

@ -87,6 +87,7 @@ mapAliases {
inherit (pkgs) git-standup; # added 2024-06-26
inherit (pkgs) gitmoji-cli; # added 2023-09-23
glob = pkgs.node-glob; # added 2023-08-18
inherit (pkgs) get-graphql-schema; # added 2024-06-26
inherit (pkgs) gqlint; # added 2023-08-19
inherit (pkgs) gramma; # added 2024-06-26
inherit (pkgs) graphite-cli; # added 2024-01-25

View File

@ -112,7 +112,6 @@
, "fx"
, "ganache"
, "gatsby-cli"
, "get-graphql-schema"
, "git-run"
, "@gitbeaker/cli"
, "grammarly-languageserver"

View File

@ -28771,15 +28771,6 @@ let
sha512 = "tdcqOOpwArNjEr0gNQKCXwaNCWnQJrog14nJNQPeemcLnXQUUGrsCWpWkVKt46zLjcS6/KGoayeJfHHyPDlvwA==";
};
};
"graphql-14.7.0" = {
name = "graphql";
packageName = "graphql";
version = "14.7.0";
src = fetchurl {
url = "https://registry.npmjs.org/graphql/-/graphql-14.7.0.tgz";
sha512 = "l0xWZpoPKpppFzMfvVyFmp9vLN7w/ZZJPefUicMCepfJeQ8sMcztloGYY9DfjVPo6tIUDzU5Hw3MUbIjj9AVVA==";
};
};
"graphql-15.3.0" = {
name = "graphql";
packageName = "graphql";
@ -74170,43 +74161,6 @@ in
bypassCache = true;
reconstructLock = true;
};
get-graphql-schema = nodeEnv.buildNodePackage {
name = "get-graphql-schema";
packageName = "get-graphql-schema";
version = "2.1.2";
src = fetchurl {
url = "https://registry.npmjs.org/get-graphql-schema/-/get-graphql-schema-2.1.2.tgz";
sha512 = "1z5Hw91VrE3GrpCZE6lE8Dy+jz4kXWesLS7rCSjwOxf5BOcIedAZeTUJRIeIzmmR+PA9CKOkPTYFRJbdgUtrxA==";
};
dependencies = [
sources."ansi-styles-3.2.1"
sources."chalk-2.4.2"
sources."color-convert-1.9.3"
sources."color-name-1.1.3"
sources."encoding-0.1.13"
sources."escape-string-regexp-1.0.5"
sources."graphql-14.7.0"
sources."has-flag-3.0.0"
sources."iconv-lite-0.6.3"
sources."iterall-1.3.0"
sources."minimist-1.2.8"
sources."node-fetch-2.7.0"
sources."safer-buffer-2.1.2"
sources."supports-color-5.5.0"
sources."tr46-0.0.3"
sources."webidl-conversions-3.0.1"
sources."whatwg-url-5.0.0"
];
buildInputs = globalBuildInputs;
meta = {
description = "Downloads the GraphQL Schema of an GraphQL endpoint URL";
homepage = "https://github.com/graphcool/get-graphql-schema#readme";
license = "MIT";
};
production = true;
bypassCache = true;
reconstructLock = true;
};
git-run = nodeEnv.buildNodePackage {
name = "git-run";
packageName = "git-run";