New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@8base/file-server-sdk

Package Overview
Dependencies
Maintainers
2
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@8base/file-server-sdk - npm Package Compare versions

Comparing version 0.0.22 to 0.0.23

3

lib/FileUploadLink.d.ts
import { ApolloLink, Observable, Operation, NextLink } from 'apollo-link-core';
export declare const MAXIMUM_OBJECT_DEEP = 10;
export declare const mutateOperationVariablesDeep: <T extends Object>(partialObject: T, handler: (object: T, fieldName: keyof T) => void, counter: any) => void;
export declare const mutateOperationVariables: <T extends Object>(partialObject: T, handler: (object: T, fieldName: keyof T) => void) => void;
export default class FileUploadLink extends ApolloLink {

@@ -3,0 +6,0 @@ private url;

30

lib/FileUploadLink.js

@@ -14,2 +14,19 @@ var __extends = (this && this.__extends) || (function () {

var isObject = function (value) { return value !== null && typeof value === 'object'; };
export var MAXIMUM_OBJECT_DEEP = 10;
export var mutateOperationVariablesDeep = function (partialObject, handler, counter) {
if (counter > MAXIMUM_OBJECT_DEEP)
return;
for (var fieldName in partialObject) {
var currentField = partialObject[fieldName];
if (currentField instanceof File) {
handler(partialObject, fieldName);
}
else if (isObject(currentField)) {
mutateOperationVariablesDeep(currentField, handler, ++counter);
}
}
};
export var mutateOperationVariables = function (partialObject, handler) {
return mutateOperationVariablesDeep(partialObject, handler, 0);
};
var FileUploadLink = (function (_super) {

@@ -40,14 +57,3 @@ __extends(FileUploadLink, _super);

};
var mutateOperationVariables = function (partialObject) {
for (var fieldName in partialObject) {
var currentField = partialObject[fieldName];
if (currentField instanceof File) {
handleFile(partialObject, fieldName);
}
else if (isObject(currentField)) {
mutateOperationVariables(currentField);
}
}
};
mutateOperationVariables(operation.variables || {});
mutateOperationVariables(operation.variables || {}, handleFile);
return new Observable(function (observer) {

@@ -54,0 +60,0 @@ Promise.all(promises)

{
"name": "@8base/file-server-sdk",
"version": "0.0.22",
"version": "0.0.23",
"description": "JavaScript SDK for working with files at 8base",

@@ -8,4 +8,5 @@ "main": "./lib/index.js",

"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"test": "jest",
"build": "tsc",
"start": "npm run build -- --watch",
"tslint": "tslint -c tslint.json -p tsconfig.json --type-check",

@@ -20,2 +21,3 @@ "preversion": "npm run tslint",

"apollo-link-core": "0.5.4",
"fast-memoize": "^2.2.8",
"graphql": "^0.10.5",

@@ -28,2 +30,3 @@ "typed-graphql": "^1.0.2"

"@types/graphql": "^0.11.5",
"@types/jest": "^21.1.6",
"@types/node": "^8.0.34",

@@ -33,5 +36,10 @@ "@types/ws": "^3.2.0",

"graphql-tag": "^2.4.2",
"jest": "^21.2.1",
"ts-jest": "^21.2.2",
"tslint": "^5.7.0",
"typescript": "^2.5.1"
},
"peerDependencies": {
"apollo-link-core": "0.5.4"
},
"repository": {

@@ -44,3 +52,16 @@ "type": "git",

},
"homepage": "https://gitlab.com/8base-shared/file-server-sdk#README"
"homepage": "https://gitlab.com/8base-shared/file-server-sdk#README",
"jest": {
"transform": {
"^.+\\.tsx?$": "<rootDir>/node_modules/ts-jest/preprocessor.js"
},
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json"
]
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc