From 5d9a498e086937a5d6b125c0c695e9eba759ab1e Mon Sep 17 00:00:00 2001 From: "jeanphi.baconnais" Date: Tue, 8 Nov 2022 13:10:04 +0000 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=9A=80=20draft=20:=20add=20hacktoberf?= =?UTF-8?q?est=20function=20but=20it's=20a=20draft=20=F0=9F=94=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hacktoberfest/index.js | 94 ++++++++++++++++++++++++++++++++++++++ hacktoberfest/package.json | 10 ++++ 2 files changed, 104 insertions(+) create mode 100644 hacktoberfest/index.js create mode 100644 hacktoberfest/package.json diff --git a/hacktoberfest/index.js b/hacktoberfest/index.js new file mode 100644 index 0000000..f5785e4 --- /dev/null +++ b/hacktoberfest/index.js @@ -0,0 +1,94 @@ +const fetch = require('node-fetch') +const { default: ApolloClient, gql } = require('apollo-boost') + +function sleep(ms) { + return new Promise(resolve => setTimeout(resolve, ms)) +} + +Date.prototype.addHours = function(h) { + this.setHours(this.getHours() + h) + return this +} + +const cache = { + data: [], + ttl: new Date(), +} + +exports.hacktoberfest = async (req, res) => { + res.set('Access-Control-Allow-Origin', '*') + + if (req.method === 'OPTIONS') { + res.set('Access-Control-Allow-Methods', 'GET') + res.set('Access-Control-Allow-Headers', 'Content-Type') + res.set('Access-Control-Max-Age', '3600') + return res.status(204).send('') + } + + const githubId = process.env.GITHUB_ID + const githubToken = process.env.GITHUB_OAUTH + + const client = new ApolloClient({ + uri: `https://api.github.com/graphql?access_token=${githubToken}`, + headers: { + 'User-Agent': githubId, + Authorization: `token ${githubToken}`, + }, + fetch, + }) + + if (cache.data.length > 0 && cache.ttl > new Date()) { + return res.status(200).send(cache.data) + } + + const handles = await fetch('https://oss.zenika.com/hacktoberfest.json').then( + response => response.json(), + ) + + console.log(JSON.stringify(handles)) + + const data = await Promise.all( + Object.keys(handles).map(async handle => { + await sleep(25) + try { + const response = await client.query({ + query: gql` + query getUserPullRequest($login: String!) { + user(login: $login) { + login + contributionsCollection( + from: "2022-10-01T00:00:00Z" + to: "2022-10-31T23:59:59Z" + ) { + pullRequestContributions(first: 1) { + totalCount + } + } + } + } + `, + variables: { + login: handle, + }, + }) + return response.data + } catch (e) { + console.log(JSON.stringify(e)) + return null + } + }), + ) + + console.log(JSON.stringify(data)) + + const filteredData = data.filter(Boolean) + + filteredData.forEach(({ user }) => { + user.location = handles[user.login] + }) + + cache.data = filteredData + cache.ttl = new Date().addHours(1) + + res.status(200).send(filteredData) +} diff --git a/hacktoberfest/package.json b/hacktoberfest/package.json new file mode 100644 index 0000000..c378f27 --- /dev/null +++ b/hacktoberfest/package.json @@ -0,0 +1,10 @@ +{ + "name": "sample-http", + "version": "0.0.1", + "dependencies": { + "apollo-boost": "^0.4.4", + "graphql": "^14.5.6", + "graphql-tag": "^2.10.1", + "node-fetch": "^2.6.0" + } +} From e93e0ebb1498c092e4c131a980ffd5c128ff71c8 Mon Sep 17 00:00:00 2001 From: "jeanphi.baconnais" Date: Thu, 10 Nov 2022 13:44:39 +0000 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=8E=89=20add=20recuperation=20of=20MR?= =?UTF-8?q?=20in=20GitLab.=20But=20needs=20to=20change=20oss.zenika.com?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hacktoberfest/README | 7 ++++ hacktoberfest/index.js | 88 ++++++++++++++++++++++++++++++++---------- 2 files changed, 74 insertions(+), 21 deletions(-) create mode 100644 hacktoberfest/README diff --git a/hacktoberfest/README b/hacktoberfest/README new file mode 100644 index 0000000..ce2919e --- /dev/null +++ b/hacktoberfest/README @@ -0,0 +1,7 @@ +# Hacktoberfest + +This directory contains the Cloud function used to get number of contribution for people. + +The list of contributors is in the oss.zenika.com website. + +⚠️ No CI exists on this project, so the cloud function has to be deployed manually (but it's in progress 😅) diff --git a/hacktoberfest/index.js b/hacktoberfest/index.js index f5785e4..dd184ea 100644 --- a/hacktoberfest/index.js +++ b/hacktoberfest/index.js @@ -27,8 +27,9 @@ exports.hacktoberfest = async (req, res) => { const githubId = process.env.GITHUB_ID const githubToken = process.env.GITHUB_OAUTH + const gitlabToken = process.env.GITLAB_TOKEN - const client = new ApolloClient({ + const clientGitHub = new ApolloClient({ uri: `https://api.github.com/graphql?access_token=${githubToken}`, headers: { 'User-Agent': githubId, @@ -37,6 +38,16 @@ exports.hacktoberfest = async (req, res) => { fetch, }) + const clientGitLab = new ApolloClient({ + uri: `https://gitlab.com/api/graphql`, + headers: { + 'User-Agent': githubId, + Authorization: `Bearer ${gitlabToken}`, + 'Content-Type': 'application/json', + }, + fetch, + }) + if (cache.data.length > 0 && cache.ttl > new Date()) { return res.status(200).send(cache.data) } @@ -48,32 +59,67 @@ exports.hacktoberfest = async (req, res) => { console.log(JSON.stringify(handles)) const data = await Promise.all( - Object.keys(handles).map(async handle => { + Object.entries(handles).map(async infosUser => { await sleep(25) try { - const response = await client.query({ - query: gql` - query getUserPullRequest($login: String!) { - user(login: $login) { - login - contributionsCollection( - from: "2022-10-01T00:00:00Z" - to: "2022-10-31T23:59:59Z" - ) { - pullRequestContributions(first: 1) { - totalCount + if (infosUser[1].github && infosUser[1].github.handle) { + const responseGitHub = await clientGitHub.query({ + query: gql` + query getUserPullRequest($login: String!) { + user(login: $login) { + login + contributionsCollection( + from: "2022-10-01T00:00:00Z" + to: "2022-10-31T23:59:59Z" + ) { + pullRequestContributions(first: 1) { + totalCount + } + } + } + } + `, + variables: { + login: infosUser[1].github.handle, + }, + }) + + // update json + infosUser[1].github.nbContributions = + responseGitHub.data.user.contributionsCollection.pullRequestContributions.totalCount + } + + if (infosUser[1].gitlab && infosUser[1].gitlab.handle) { + const responseGitLab = await clientGitLab.query({ + query: gql` + query getUserMR($login: String!) { + users(usernames: [$login]) { + nodes { + username + authoredMergeRequests( + createdAfter: "2022-10-01T00:00:00+00:00" + createdBefore: "2022-10-31T00:00:00+00:00" + state: merged + ) { + count + } } } } - } - `, - variables: { - login: handle, - }, - }) - return response.data + `, + variables: { + login: infosUser[1].gitlab.handle, + }, + }) + + // update json + infosUser[1].gitlab.nbContributions = + responseGitLab.data.users.nodes[0].authoredMergeRequests.count + } + + return infosUser } catch (e) { - console.log(JSON.stringify(e)) + console.log('error : ' + e + ' | ' + JSON.stringify(e)) return null } }), From e8f01b54162f14cc3b7a0eedabefe59f1c81daf2 Mon Sep 17 00:00:00 2001 From: Jean-Phi Baconnais Date: Mon, 14 Nov 2022 11:35:26 +0100 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=9A=80=20maj=20cloud=20functions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hacktoberfest/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hacktoberfest/index.js b/hacktoberfest/index.js index dd184ea..cb98eb9 100644 --- a/hacktoberfest/index.js +++ b/hacktoberfest/index.js @@ -52,7 +52,7 @@ exports.hacktoberfest = async (req, res) => { return res.status(200).send(cache.data) } - const handles = await fetch('https://oss.zenika.com/hacktoberfest.json').then( + const handles = await fetch('https://oss.zenika.com/hacktoberfest-new.json').then( response => response.json(), ) @@ -129,10 +129,10 @@ exports.hacktoberfest = async (req, res) => { const filteredData = data.filter(Boolean) - filteredData.forEach(({ user }) => { - user.location = handles[user.login] + filteredData.forEach((user) => { + user.location = handles[user[1].name] }) - + cache.data = filteredData cache.ttl = new Date().addHours(1) From 4e191f4359f316c6c0561eb27f401e1dd80be907 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Baconnais Date: Thu, 14 Dec 2023 21:54:12 +0100 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=9A=80=20Initiate=20a=20new=20js=20fi?= =?UTF-8?q?le=20to=20run=20the=20script=20in=20local?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.example | 6 + .gitignore | 1 + hacktoberfest/index.js | 82 ++++----- hacktoberfest/package-lock.json | 314 ++++++++++++++++++++++++++++++++ hacktoberfest/package.json | 3 +- 5 files changed, 362 insertions(+), 44 deletions(-) create mode 100644 .env.example create mode 100644 hacktoberfest/package-lock.json diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..551c810 --- /dev/null +++ b/.env.example @@ -0,0 +1,6 @@ +GITHUB_ID= +GITHUB_OAUTH= +GITHUB_ORGA= +GITHUB_WEBSITE= +GITHUB_WEBSITE_ORGA= +GITLAB_TOKEN= \ No newline at end of file diff --git a/.gitignore b/.gitignore index 3ded127..97f2dd0 100644 --- a/.gitignore +++ b/.gitignore @@ -56,6 +56,7 @@ typings/ # dotenv environment variables file .env +hacktoberfest/.env # next.js build output .next diff --git a/hacktoberfest/index.js b/hacktoberfest/index.js index cb98eb9..e459dff 100644 --- a/hacktoberfest/index.js +++ b/hacktoberfest/index.js @@ -1,6 +1,33 @@ +require('dotenv').config(); + const fetch = require('node-fetch') const { default: ApolloClient, gql } = require('apollo-boost') +const githubId = process.env.GITHUB_ID +const githubToken = process.env.GITHUB_OAUTH +const gitlabToken = process.env.GITLAB_TOKEN + +const clientGitHub = new ApolloClient({ + uri: `https://api.github.com/graphql?access_token=${githubToken}`, + headers: { + 'User-Agent': githubId, + Authorization: `token ${githubToken}`, + }, + fetch, +}) + +const clientGitLab = new ApolloClient({ + uri: `https://gitlab.com/api/graphql`, + headers: { + 'User-Agent': githubId, + Authorization: `Bearer ${gitlabToken}`, + 'Content-Type': 'application/json', + }, + fetch, +}) + +hacktoberfest(2023) + function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)) } @@ -15,44 +42,11 @@ const cache = { ttl: new Date(), } -exports.hacktoberfest = async (req, res) => { - res.set('Access-Control-Allow-Origin', '*') - - if (req.method === 'OPTIONS') { - res.set('Access-Control-Allow-Methods', 'GET') - res.set('Access-Control-Allow-Headers', 'Content-Type') - res.set('Access-Control-Max-Age', '3600') - return res.status(204).send('') - } - - const githubId = process.env.GITHUB_ID - const githubToken = process.env.GITHUB_OAUTH - const gitlabToken = process.env.GITLAB_TOKEN - - const clientGitHub = new ApolloClient({ - uri: `https://api.github.com/graphql?access_token=${githubToken}`, - headers: { - 'User-Agent': githubId, - Authorization: `token ${githubToken}`, - }, - fetch, - }) - - const clientGitLab = new ApolloClient({ - uri: `https://gitlab.com/api/graphql`, - headers: { - 'User-Agent': githubId, - Authorization: `Bearer ${gitlabToken}`, - 'Content-Type': 'application/json', - }, - fetch, - }) - - if (cache.data.length > 0 && cache.ttl > new Date()) { - return res.status(200).send(cache.data) - } +async function hacktoberfest (year) { + + console.log("🤖 Start getting data for " + year + " ... "); - const handles = await fetch('https://oss.zenika.com/hacktoberfest-new.json').then( + const handles = await fetch('https://oss.zenika.com/hacktoberfest.json').then( response => response.json(), ) @@ -69,8 +63,8 @@ exports.hacktoberfest = async (req, res) => { user(login: $login) { login contributionsCollection( - from: "2022-10-01T00:00:00Z" - to: "2022-10-31T23:59:59Z" + from: "2023-01-01T00:00:00Z" + to: "2023-12-31T23:59:59Z" ) { pullRequestContributions(first: 1) { totalCount @@ -81,6 +75,7 @@ exports.hacktoberfest = async (req, res) => { `, variables: { login: infosUser[1].github.handle, + year: year }, }) @@ -97,8 +92,8 @@ exports.hacktoberfest = async (req, res) => { nodes { username authoredMergeRequests( - createdAfter: "2022-10-01T00:00:00+00:00" - createdBefore: "2022-10-31T00:00:00+00:00" + createdAfter: "2023-01-01T00:00:00+00:00" + createdBefore: "2023-12-31T00:00:00+00:00" state: merged ) { count @@ -125,7 +120,8 @@ exports.hacktoberfest = async (req, res) => { }), ) - console.log(JSON.stringify(data)) + + console.log("\n" + JSON.stringify(data)) const filteredData = data.filter(Boolean) @@ -136,5 +132,5 @@ exports.hacktoberfest = async (req, res) => { cache.data = filteredData cache.ttl = new Date().addHours(1) - res.status(200).send(filteredData) + console.log("🤖 End ..."); } diff --git a/hacktoberfest/package-lock.json b/hacktoberfest/package-lock.json new file mode 100644 index 0000000..4d01ff6 --- /dev/null +++ b/hacktoberfest/package-lock.json @@ -0,0 +1,314 @@ +{ + "name": "zenika-insights", + "version": "0.0.1", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "zenika-insights", + "version": "0.0.1", + "dependencies": { + "apollo-boost": "^0.4.4", + "dotenv": "16.3.1", + "graphql": "^14.5.6", + "graphql-tag": "^2.10.1", + "node-fetch": "^2.6.0" + } + }, + "node_modules/@types/node": { + "version": "20.10.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.4.tgz", + "integrity": "sha512-D08YG6rr8X90YB56tSIuBaddy/UXAA9RKJoFvrsnogAum/0pmjkgi4+2nx96A330FmioegBWmEYQ+syqCFaveg==", + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@types/zen-observable": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/@types/zen-observable/-/zen-observable-0.8.7.tgz", + "integrity": "sha512-LKzNTjj+2j09wAo/vvVjzgw5qckJJzhdGgWHW7j69QIGdq/KnZrMAMIHQiWGl3Ccflh5/CudBAntTPYdprPltA==" + }, + "node_modules/@wry/context": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/@wry/context/-/context-0.4.4.tgz", + "integrity": "sha512-LrKVLove/zw6h2Md/KZyWxIkFM6AoyKp71OqpH9Hiip1csjPVoD3tPxlbQUNxEnHENks3UGgNpSBCAfq9KWuag==", + "dependencies": { + "@types/node": ">=6", + "tslib": "^1.9.3" + } + }, + "node_modules/@wry/equality": { + "version": "0.1.11", + "resolved": "https://registry.npmjs.org/@wry/equality/-/equality-0.1.11.tgz", + "integrity": "sha512-mwEVBDUVODlsQQ5dfuLUS5/Tf7jqUKyhKYHmVi4fPB6bDMOfWvUPJmKgS1Z7Za/sOI3vzWt4+O7yCiL/70MogA==", + "dependencies": { + "tslib": "^1.9.3" + } + }, + "node_modules/apollo-boost": { + "version": "0.4.9", + "resolved": "https://registry.npmjs.org/apollo-boost/-/apollo-boost-0.4.9.tgz", + "integrity": "sha512-05y5BKcDaa8w47f8d81UVwKqrAjn8uKLv6QM9fNdldoNzQ+rnOHgFlnrySUZRz9QIT3vPftQkEz2UEASp1Mi5g==", + "dependencies": { + "apollo-cache": "^1.3.5", + "apollo-cache-inmemory": "^1.6.6", + "apollo-client": "^2.6.10", + "apollo-link": "^1.0.6", + "apollo-link-error": "^1.0.3", + "apollo-link-http": "^1.3.1", + "graphql-tag": "^2.4.2", + "ts-invariant": "^0.4.0", + "tslib": "^1.10.0" + }, + "peerDependencies": { + "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" + } + }, + "node_modules/apollo-cache": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/apollo-cache/-/apollo-cache-1.3.5.tgz", + "integrity": "sha512-1XoDy8kJnyWY/i/+gLTEbYLnoiVtS8y7ikBr/IfmML4Qb+CM7dEEbIUOjnY716WqmZ/UpXIxTfJsY7rMcqiCXA==", + "dependencies": { + "apollo-utilities": "^1.3.4", + "tslib": "^1.10.0" + }, + "peerDependencies": { + "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" + } + }, + "node_modules/apollo-cache-inmemory": { + "version": "1.6.6", + "resolved": "https://registry.npmjs.org/apollo-cache-inmemory/-/apollo-cache-inmemory-1.6.6.tgz", + "integrity": "sha512-L8pToTW/+Xru2FFAhkZ1OA9q4V4nuvfoPecBM34DecAugUZEBhI2Hmpgnzq2hTKZ60LAMrlqiASm0aqAY6F8/A==", + "dependencies": { + "apollo-cache": "^1.3.5", + "apollo-utilities": "^1.3.4", + "optimism": "^0.10.0", + "ts-invariant": "^0.4.0", + "tslib": "^1.10.0" + }, + "peerDependencies": { + "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" + } + }, + "node_modules/apollo-client": { + "version": "2.6.10", + "resolved": "https://registry.npmjs.org/apollo-client/-/apollo-client-2.6.10.tgz", + "integrity": "sha512-jiPlMTN6/5CjZpJOkGeUV0mb4zxx33uXWdj/xQCfAMkuNAC3HN7CvYDyMHHEzmcQ5GV12LszWoQ/VlxET24CtA==", + "dependencies": { + "@types/zen-observable": "^0.8.0", + "apollo-cache": "1.3.5", + "apollo-link": "^1.0.0", + "apollo-utilities": "1.3.4", + "symbol-observable": "^1.0.2", + "ts-invariant": "^0.4.0", + "tslib": "^1.10.0", + "zen-observable": "^0.8.0" + }, + "peerDependencies": { + "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" + } + }, + "node_modules/apollo-link": { + "version": "1.2.14", + "resolved": "https://registry.npmjs.org/apollo-link/-/apollo-link-1.2.14.tgz", + "integrity": "sha512-p67CMEFP7kOG1JZ0ZkYZwRDa369w5PIjtMjvrQd/HnIV8FRsHRqLqK+oAZQnFa1DDdZtOtHTi+aMIW6EatC2jg==", + "dependencies": { + "apollo-utilities": "^1.3.0", + "ts-invariant": "^0.4.0", + "tslib": "^1.9.3", + "zen-observable-ts": "^0.8.21" + }, + "peerDependencies": { + "graphql": "^0.11.3 || ^0.12.3 || ^0.13.0 || ^14.0.0 || ^15.0.0" + } + }, + "node_modules/apollo-link-error": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/apollo-link-error/-/apollo-link-error-1.1.13.tgz", + "integrity": "sha512-jAZOOahJU6bwSqb2ZyskEK1XdgUY9nkmeclCrW7Gddh1uasHVqmoYc4CKdb0/H0Y1J9lvaXKle2Wsw/Zx1AyUg==", + "dependencies": { + "apollo-link": "^1.2.14", + "apollo-link-http-common": "^0.2.16", + "tslib": "^1.9.3" + } + }, + "node_modules/apollo-link-http": { + "version": "1.5.17", + "resolved": "https://registry.npmjs.org/apollo-link-http/-/apollo-link-http-1.5.17.tgz", + "integrity": "sha512-uWcqAotbwDEU/9+Dm9e1/clO7hTB2kQ/94JYcGouBVLjoKmTeJTUPQKcJGpPwUjZcSqgYicbFqQSoJIW0yrFvg==", + "dependencies": { + "apollo-link": "^1.2.14", + "apollo-link-http-common": "^0.2.16", + "tslib": "^1.9.3" + }, + "peerDependencies": { + "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" + } + }, + "node_modules/apollo-link-http-common": { + "version": "0.2.16", + "resolved": "https://registry.npmjs.org/apollo-link-http-common/-/apollo-link-http-common-0.2.16.tgz", + "integrity": "sha512-2tIhOIrnaF4UbQHf7kjeQA/EmSorB7+HyJIIrUjJOKBgnXwuexi8aMecRlqTIDWcyVXCeqLhUnztMa6bOH/jTg==", + "dependencies": { + "apollo-link": "^1.2.14", + "ts-invariant": "^0.4.0", + "tslib": "^1.9.3" + }, + "peerDependencies": { + "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" + } + }, + "node_modules/apollo-utilities": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/apollo-utilities/-/apollo-utilities-1.3.4.tgz", + "integrity": "sha512-pk2hiWrCXMAy2fRPwEyhvka+mqwzeP60Jr1tRYi5xru+3ko94HI9o6lK0CT33/w4RDlxWchmdhDCrvdr+pHCig==", + "dependencies": { + "@wry/equality": "^0.1.2", + "fast-json-stable-stringify": "^2.0.0", + "ts-invariant": "^0.4.0", + "tslib": "^1.10.0" + }, + "peerDependencies": { + "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" + } + }, + "node_modules/dotenv": { + "version": "16.3.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", + "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/motdotla/dotenv?sponsor=1" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "node_modules/graphql": { + "version": "14.7.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-14.7.0.tgz", + "integrity": "sha512-l0xWZpoPKpppFzMfvVyFmp9vLN7w/ZZJPefUicMCepfJeQ8sMcztloGYY9DfjVPo6tIUDzU5Hw3MUbIjj9AVVA==", + "dependencies": { + "iterall": "^1.2.2" + }, + "engines": { + "node": ">= 6.x" + } + }, + "node_modules/graphql-tag": { + "version": "2.12.6", + "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.12.6.tgz", + "integrity": "sha512-FdSNcu2QQcWnM2VNvSCCDCVS5PpPqpzgFT8+GXzqJuoDd0CBncxCY278u4mhRO7tMgo2JjgJA5aZ+nWSQ/Z+xg==", + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "graphql": "^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" + } + }, + "node_modules/graphql-tag/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/iterall": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.3.0.tgz", + "integrity": "sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==" + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/optimism": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/optimism/-/optimism-0.10.3.tgz", + "integrity": "sha512-9A5pqGoQk49H6Vhjb9kPgAeeECfUDF6aIICbMDL23kDLStBn1MWk3YvcZ4xWF9CsSf6XEgvRLkXy4xof/56vVw==", + "dependencies": { + "@wry/context": "^0.4.0" + } + }, + "node_modules/symbol-observable": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", + "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "node_modules/ts-invariant": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/ts-invariant/-/ts-invariant-0.4.4.tgz", + "integrity": "sha512-uEtWkFM/sdZvRNNDL3Ehu4WVpwaulhwQszV8mrtcdeE8nN00BV9mAmQ88RkrBhFgl9gMgvjJLAQcZbnPXI9mlA==", + "dependencies": { + "tslib": "^1.9.3" + } + }, + "node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/zen-observable": { + "version": "0.8.15", + "resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.8.15.tgz", + "integrity": "sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ==" + }, + "node_modules/zen-observable-ts": { + "version": "0.8.21", + "resolved": "https://registry.npmjs.org/zen-observable-ts/-/zen-observable-ts-0.8.21.tgz", + "integrity": "sha512-Yj3yXweRc8LdRMrCC8nIc4kkjWecPAUVh0TI0OUrWXx6aX790vLcDlWca6I4vsyCGH3LpWxq0dJRcMOFoVqmeg==", + "dependencies": { + "tslib": "^1.9.3", + "zen-observable": "^0.8.0" + } + } + } +} diff --git a/hacktoberfest/package.json b/hacktoberfest/package.json index c378f27..0e0b63a 100644 --- a/hacktoberfest/package.json +++ b/hacktoberfest/package.json @@ -1,8 +1,9 @@ { - "name": "sample-http", + "name": "zenika-insights", "version": "0.0.1", "dependencies": { "apollo-boost": "^0.4.4", + "dotenv": "16.3.1", "graphql": "^14.5.6", "graphql-tag": "^2.10.1", "node-fetch": "^2.6.0"