Socket
Socket
Sign inDemoInstall

@files-stack/core

Package Overview
Dependencies
Maintainers
1
Versions
240
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@files-stack/core - npm Package Compare versions

Comparing version 0.0.26 to 0.0.27-0

lib/constants/types.d.ts

2

lib/constants/constants.d.ts

@@ -0,1 +1,2 @@

export declare const NATS_HEMERA_KUBE_FILESERVICE = "NATS_HEMERA_KUBE_FILESERVICE";
export declare const MAX_FILE_SIZE: number;

@@ -27,2 +28,3 @@ export declare enum FilesCommands {

FILE_OPERATION = "FILE_OPERATION",
FILE_CONTENT_STREAM = "FILE_CONTENT_STREAM",
}
export * from './constants';
export * from './types';

@@ -397,2 +397,5 @@ module.exports =

});
const sorter = ramda_1.sortBy(ramda_1.compose(ramda_1.toLower, ramda_1.prop('name')));
files = sorter(files);
directories = sorter(directories);
return directories.concat(files);

@@ -419,3 +422,3 @@ };

}
return arr2.every((a2, i) => (arr1[i] && arr1[i] == a2));
return arr2.every((a2, i) => (arr1[i] && arr1[i] === a2));
};

@@ -425,2 +428,29 @@ exports.getFileExt = name => {

};
exports.addEditorHistory = (editorWrappers, editorId, resource) => {
const index = ramda_1.findIndex(ramda_1.propEq('editorId', editorId))(editorWrappers);
if (index !== -1) {
let history = editorWrappers[index].history || [];
history = ramda_1.filter(item => item !== resource, history);
editorWrappers[index].history = [...history, resource];
}
return [...editorWrappers];
};
exports.removeEditorHistory = (editorWrappers, editorId, resource) => {
const index = ramda_1.findIndex(ramda_1.propEq('editorId', editorId))(editorWrappers);
if (index !== -1) {
const history = ramda_1.filter(item => item !== resource, editorWrappers[index].history);
editorWrappers[index].history = history;
}
return [...editorWrappers];
};
exports.getLastEditorHistory = (editorWrappers, editorId) => {
const index = ramda_1.findIndex(ramda_1.propEq('editorId', editorId))(editorWrappers);
if (index !== -1) {
const history = editorWrappers[index].history;
if (history.length) {
return history[history.length - 1];
}
}
return '';
};

@@ -445,2 +475,3 @@

__export(__webpack_require__(7));
__export(__webpack_require__(8));

@@ -455,2 +486,3 @@

Object.defineProperty(exports, "__esModule", { value: true });
exports.NATS_HEMERA_KUBE_FILESERVICE = 'NATS_HEMERA_KUBE_FILESERVICE';
exports.MAX_FILE_SIZE = 50 * 1024 * 1024;

@@ -484,7 +516,20 @@ var FilesCommands;

PubsubIdentifier["FILE_OPERATION"] = "FILE_OPERATION";
PubsubIdentifier["FILE_CONTENT_STREAM"] = "FILE_CONTENT_STREAM";
})(PubsubIdentifier = exports.PubsubIdentifier || (exports.PubsubIdentifier = {}));
/***/ }),
/* 8 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TYPES = {
IFilesSettings: Symbol('IFilesSettings'),
};
/***/ })
/******/ ]);
//# sourceMappingURL=index.js.map
export * from './files';
export * from './SUPPORTED_ENCODINGS';
export * from './files-configuration';
export * from './files-settings';

@@ -11,1 +11,4 @@ import { ICoreFileStat } from './interfaces';

export declare const getFileExt: (name: any) => any;
export declare const addEditorHistory: (editorWrappers: any, editorId: any, resource: any) => any[];
export declare const removeEditorHistory: (editorWrappers: any, editorId: any, resource: any) => any[];
export declare const getLastEditorHistory: (editorWrappers: any, editorId: any) => any;

2

package.json
{
"name": "@files-stack/core",
"version": "0.0.26",
"version": "0.0.27-0",
"description": "files core for higher packages to depend on",

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

Sorry, the diff of this file is not supported yet

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