about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorWeijia Wang <9713184+wegank@users.noreply.github.com>2024-06-26 12:34:35 +0200
committerGitHub <noreply@github.com>2024-06-26 12:34:35 +0200
commita2fb5e8ffacaee6d246f7ede09d1fa899e657ff3 (patch)
tree7a8f9612ffd9e6a0eb9ea652ca1b20681741bbd0 /pkgs
parent4fe022bf30a544529f633cb969efbbcc7fb320b3 (diff)
parent590bc144c2a0d1d43e05897730e9b58ea08fa9a8 (diff)
Merge pull request #322570 from pyrox0/get-graphql-schema-init
get-graphql-schema: Move out of nodePackages
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/by-name/ge/get-graphql-schema/package.json35
-rw-r--r--pkgs/by-name/ge/get-graphql-schema/package.nix43
-rw-r--r--pkgs/development/node-packages/aliases.nix1
-rw-r--r--pkgs/development/node-packages/node-packages.json1
-rw-r--r--pkgs/development/node-packages/node-packages.nix46
5 files changed, 79 insertions, 47 deletions
diff --git a/pkgs/by-name/ge/get-graphql-schema/package.json b/pkgs/by-name/ge/get-graphql-schema/package.json
new file mode 100644
index 0000000000000..ade37982b91f9
--- /dev/null
+++ b/pkgs/by-name/ge/get-graphql-schema/package.json
@@ -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"
+  }
+}
diff --git a/pkgs/by-name/ge/get-graphql-schema/package.nix b/pkgs/by-name/ge/get-graphql-schema/package.nix
new file mode 100644
index 0000000000000..25d9f839778ca
--- /dev/null
+++ b/pkgs/by-name/ge/get-graphql-schema/package.nix
@@ -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 ];
+  };
+}
diff --git a/pkgs/development/node-packages/aliases.nix b/pkgs/development/node-packages/aliases.nix
index e09fe81e8048f..0aea2d9b22a23 100644
--- a/pkgs/development/node-packages/aliases.nix
+++ b/pkgs/development/node-packages/aliases.nix
@@ -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
diff --git a/pkgs/development/node-packages/node-packages.json b/pkgs/development/node-packages/node-packages.json
index 7668933f24173..22d9154e1f361 100644
--- a/pkgs/development/node-packages/node-packages.json
+++ b/pkgs/development/node-packages/node-packages.json
@@ -112,7 +112,6 @@
 , "fx"
 , "ganache"
 , "gatsby-cli"
-, "get-graphql-schema"
 , "git-run"
 , "@gitbeaker/cli"
 , "grammarly-languageserver"
diff --git a/pkgs/development/node-packages/node-packages.nix b/pkgs/development/node-packages/node-packages.nix
index 3e15567f1530c..5d584407b2dcb 100644
--- a/pkgs/development/node-packages/node-packages.nix
+++ b/pkgs/development/node-packages/node-packages.nix
@@ -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";