ALGO node progress
This commit is contained in:
1 parent
bb2f622618
commit
46178212c6
12 files changed
+68
-45
No files matched your search
Generated
+30
-15
@@ -36,12 +36,12 @@
|
||||
"integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw=="
|
||||
},
|
||||
"axios": {
|
||||
"version": "0.18.0",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz",
|
||||
"integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=",
|
||||
"version": "0.19.0",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-0.19.0.tgz",
|
||||
"integrity": "sha512-1uvKqKQta3KBxIz14F2v06AEHZ/dIoeKfbTRkK1E5oqjDnuEerLmYTgJB5AiQZHJcljpg1TuRzdjDR06qNk0DQ==",
|
||||
"requires": {
|
||||
"follow-redirects": "^1.3.0",
|
||||
"is-buffer": "^1.1.5"
|
||||
"follow-redirects": "1.5.10",
|
||||
"is-buffer": "^2.0.2"
|
||||
}
|
||||
},
|
||||
"balanced-match": {
|
||||
@@ -186,9 +186,9 @@
|
||||
"integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA=="
|
||||
},
|
||||
"dotenv": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-7.0.0.tgz",
|
||||
"integrity": "sha512-M3NhsLbV1i6HuGzBUH8vXrtxOk+tWmzWKDMbAVSUp3Zsjm7ywFeuwrUXhmhQyRK1q5B5GGy7hcXPbj3bnfZg2g=="
|
||||
"version": "8.0.0",
|
||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.0.0.tgz",
|
||||
"integrity": "sha512-30xVGqjLjiUOArT4+M5q9sYdvuR4riM6yK9wMcas9Vbp6zZa+ocC9dp6QoftuhTPhFAiLK/0C5Ni2nou/Bk8lg=="
|
||||
},
|
||||
"emoji-regex": {
|
||||
"version": "7.0.3",
|
||||
@@ -274,11 +274,26 @@
|
||||
}
|
||||
},
|
||||
"follow-redirects": {
|
||||
"version": "1.7.0",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.7.0.tgz",
|
||||
"integrity": "sha512-m/pZQy4Gj287eNy94nivy5wchN3Kp+Q5WgUPNy5lJSZ3sgkVKSYV/ZChMAQVIgx1SqfZ2zBZtPA2YlXIWxxJOQ==",
|
||||
"version": "1.5.10",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz",
|
||||
"integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==",
|
||||
"requires": {
|
||||
"debug": "^3.2.6"
|
||||
"debug": "=3.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
|
||||
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
|
||||
"requires": {
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
|
||||
}
|
||||
}
|
||||
},
|
||||
"fs.realpath": {
|
||||
@@ -370,9 +385,9 @@
|
||||
"integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA=="
|
||||
},
|
||||
"is-buffer": {
|
||||
"version": "1.1.6",
|
||||
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
|
||||
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz",
|
||||
"integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw=="
|
||||
},
|
||||
"is-callable": {
|
||||
"version": "1.1.4",
|
||||
|
||||
+2
-2
@@ -9,9 +9,9 @@
|
||||
"author": "Superalgos, ltd.",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"axios": "0.18.0",
|
||||
"axios": "0.19.0",
|
||||
"chai": "^4.2.0",
|
||||
"dotenv": "^7.0.0",
|
||||
"dotenv": "8.0.0",
|
||||
"mocha": "^6.1.4"
|
||||
}
|
||||
}
|
||||
Generated
+20
-12
@@ -150,12 +150,19 @@
|
||||
"integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ=="
|
||||
},
|
||||
"axios": {
|
||||
"version": "0.18.0",
|
||||
"resolved": "http://registry.npmjs.org/axios/-/axios-0.18.0.tgz",
|
||||
"integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=",
|
||||
"version": "0.19.0",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-0.19.0.tgz",
|
||||
"integrity": "sha512-1uvKqKQta3KBxIz14F2v06AEHZ/dIoeKfbTRkK1E5oqjDnuEerLmYTgJB5AiQZHJcljpg1TuRzdjDR06qNk0DQ==",
|
||||
"requires": {
|
||||
"follow-redirects": "^1.3.0",
|
||||
"is-buffer": "^1.1.5"
|
||||
"follow-redirects": "1.5.10",
|
||||
"is-buffer": "^2.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"is-buffer": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz",
|
||||
"integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"babel-cli": {
|
||||
@@ -1791,9 +1798,9 @@
|
||||
}
|
||||
},
|
||||
"dotenv": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-6.0.0.tgz",
|
||||
"integrity": "sha512-FlWbnhgjtwD+uNLUGHbMykMOYQaTivdHEmYwAKFjn6GKe/CqY0fNae93ZHTd20snh9ZLr8mTzIL9m0APQ1pjQg=="
|
||||
"version": "8.0.0",
|
||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.0.0.tgz",
|
||||
"integrity": "sha512-30xVGqjLjiUOArT4+M5q9sYdvuR4riM6yK9wMcas9Vbp6zZa+ocC9dp6QoftuhTPhFAiLK/0C5Ni2nou/Bk8lg=="
|
||||
},
|
||||
"duplexer3": {
|
||||
"version": "0.1.4",
|
||||
@@ -2060,9 +2067,9 @@
|
||||
}
|
||||
},
|
||||
"follow-redirects": {
|
||||
"version": "1.5.9",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.9.tgz",
|
||||
"integrity": "sha512-Bh65EZI/RU8nx0wbYF9shkFZlqLP+6WT/5FnA3cE/djNSuKNHJEinGGZgu/cQEkeeb2GdFOgenAmn8qaqYke2w==",
|
||||
"version": "1.5.10",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz",
|
||||
"integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==",
|
||||
"requires": {
|
||||
"debug": "=3.1.0"
|
||||
},
|
||||
@@ -3043,7 +3050,8 @@
|
||||
"is-buffer": {
|
||||
"version": "1.1.6",
|
||||
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
|
||||
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
|
||||
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
|
||||
"dev": true
|
||||
},
|
||||
"is-ci": {
|
||||
"version": "1.2.1",
|
||||
|
||||
+2
-2
@@ -21,9 +21,9 @@
|
||||
"nodemon": "1.18.10"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "0.18.0",
|
||||
"axios": "0.19.0",
|
||||
"cors": "2.8.4",
|
||||
"dotenv": "6.0.0",
|
||||
"dotenv": "8.0.0",
|
||||
"express": "4.16.3",
|
||||
"express-graphql": "0.6.12",
|
||||
"graphql": "14.0.0",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export class AuthentificationError extends Error {
|
||||
export class AuthenticationError extends Error {
|
||||
code = 401
|
||||
message = 'Autentification not found, you have to be authentificated to perform this action.'
|
||||
constructor(){
|
||||
|
||||
@@ -7,7 +7,7 @@ import teamQuery from '../../graphQLCalls/teamQuery'
|
||||
import authorizeClone from '../../graphQLCalls/authorizeClone'
|
||||
import cloneDetails from '../cloneDetails'
|
||||
import {
|
||||
AuthentificationError,
|
||||
AuthenticationError,
|
||||
WrongArgumentsError,
|
||||
OperationsError,
|
||||
AuthorizationError
|
||||
@@ -25,7 +25,7 @@ const resolve = async (parent, { clone }, context) => {
|
||||
logger.debug('addClone -> Entering Fuction.')
|
||||
|
||||
if (!context.userId) {
|
||||
throw new AuthentificationError()
|
||||
throw new AuthenticationError()
|
||||
}
|
||||
|
||||
if (!Object.values(CloneModeEnum).includes(clone.mode)) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { GraphQLNonNull, GraphQLID, GraphQLString } from 'graphql'
|
||||
import { AuthentificationError, OperationsError } from '../../errors'
|
||||
import { AuthenticationError, OperationsError } from '../../errors'
|
||||
import { Clone } from '../../models'
|
||||
import logger from '../../config/logger'
|
||||
import removeKuberneteClone from '../../kubernetes/removeClone'
|
||||
@@ -17,7 +17,7 @@ const resolve = async (parent, { id }, context) => {
|
||||
logger.debug('removeClone -> Entering Fuction.')
|
||||
|
||||
if (!context.userId) {
|
||||
throw new AuthentificationError()
|
||||
throw new AuthenticationError()
|
||||
}
|
||||
try {
|
||||
let clone = await Clone.findOne({
|
||||
|
||||
@@ -7,7 +7,7 @@ import { DateTime } from 'luxon'
|
||||
import teamQuery from '../../graphQLCalls/teamQuery'
|
||||
import cloneDetails from '../cloneDetails'
|
||||
import {
|
||||
AuthentificationError,
|
||||
AuthenticationError,
|
||||
OperationsError
|
||||
} from '../../errors'
|
||||
import logger from '../../config/logger'
|
||||
@@ -21,7 +21,7 @@ const resolve = async (parent, { simulation }, context) => {
|
||||
logger.debug('runSimulation -> Entering Fuction.')
|
||||
|
||||
if (!context.userId) {
|
||||
throw new AuthentificationError()
|
||||
throw new AuthenticationError()
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
GraphQLInt,
|
||||
GraphQLFloat
|
||||
} from 'graphql'
|
||||
import { OperationsError, AuthorizationError, AuthentificationError } from '../../errors'
|
||||
import { OperationsError, AuthorizationError, AuthenticationError } from '../../errors'
|
||||
import { Clone } from '../../models'
|
||||
import logger from '../../config/logger'
|
||||
import { isDefined } from '../../config/utils'
|
||||
@@ -29,7 +29,7 @@ const resolve = async (parent,
|
||||
logger.debug('UpdateExecutionSummary -> Entering Function.')
|
||||
|
||||
if (!context.userId) {
|
||||
throw new AuthentificationError()
|
||||
throw new AuthenticationError()
|
||||
}
|
||||
|
||||
if (!(context.userId === process.env.AACLOUD_ID)) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { GraphQLList, GraphQLString } from 'graphql'
|
||||
import { AuthentificationError, OperationsError } from '../../errors'
|
||||
import { AuthenticationError, OperationsError } from '../../errors'
|
||||
import { CloneType } from '../types'
|
||||
import { Clone } from '../../models'
|
||||
import logger from '../../config/logger'
|
||||
@@ -14,7 +14,7 @@ const resolve = async(parent, { botType }, context) => {
|
||||
logger.debug('Retrieving History Clones.')
|
||||
try {
|
||||
if (!context.userId) {
|
||||
throw new AuthentificationError()
|
||||
throw new AuthenticationError()
|
||||
}
|
||||
|
||||
let clones = await Clone.find({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { GraphQLList, GraphQLString, GraphQLBoolean } from 'graphql'
|
||||
import { AuthentificationError, OperationsError } from '../../errors'
|
||||
import { AuthenticationError, OperationsError } from '../../errors'
|
||||
import { CloneType } from '../types'
|
||||
import { Clone } from '../../models'
|
||||
import logger from '../../config/logger'
|
||||
@@ -17,7 +17,7 @@ const resolve = async (parent, { botType, queryLogs }, context) => {
|
||||
logger.debug('List Clones -> Entering Fuction.')
|
||||
try {
|
||||
if (!context.userId) {
|
||||
throw new AuthentificationError()
|
||||
throw new AuthenticationError()
|
||||
}
|
||||
|
||||
let clones = await Clone.find({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
var assert = require('chai').assert
|
||||
const axios = require('axios')
|
||||
const { activeCloneList } = require('./activeCloneList')
|
||||
const { activeCloneList } = require('./activeCloneListDemo')
|
||||
require('dotenv').config()
|
||||
|
||||
describe('Admin clones Clones', function () {
|
||||
|
||||
Reference in new issue
Block a user