Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@invisionapp/studio-api

Package Overview
Dependencies
Maintainers
3
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@invisionapp/studio-api - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

16

COMMITS.json
[
{
"hash": "f4b184cf802fd4e71d7ecf93fd292a980e5f4b1f",
"message": "Merge pull request #13 from InVisionApp/jp/gutting-mock-api\n\nCleans up outdated mock api"
"hash": "0f66e79b8c83ab9e7ad3f1c8a55d30c9d313990b",
"message": "Merge pull request #14 from InVisionApp/jp/studio-api-bare-minimum\n\nstudio-api cleanup"
},
{
"hash": "46057e6c1926b644eba54bcf4807b360b98d5154",
"message": "Var allowed in eslint until webpack is setup.\n"
"hash": "e4a414c72ff576d3192f754c433e7bddcf508876",
"message": "Restores tape.\n"
},
{
"hash": "8d257bdfe0590fc569b4a2f32e39ad92a4291133",
"message": "Reverts es6 syntax, disables mock api and adds comments.\n"
},
{
"hash": "8ec04ab380bab7ffc23dc05399fcf55f90c4711e",
"message": "Removes react, react-dom and redux.\n"
"hash": "b015ed2317fa179157bf67fafa010be08f8cf78b",
"message": "studio-api cleanup\n"
}
]
{
"name": "@invisionapp/studio-api",
"version": "2.0.2",
"version": "2.0.3",
"repository": {

@@ -32,3 +32,2 @@ "type": "git",

"ghooks": "2.0.4",
"lodash": "^4.17.10",
"tape": "4.9.0"

@@ -35,0 +34,0 @@ },

@@ -10,8 +10,4 @@ # Studio Apps API

Studio Apps API determines the environment - browser or electron.
Studio Apps API returns Platform API.
In case of browser it uses mock api (included in studio-api).
In case of electron it uses real api (trapezoid-app repository).
## Contributing

@@ -18,0 +14,0 @@

@@ -1,43 +0,5 @@

// API major version
const APIversion = 0;
// Below will not work without Webpack + Babel due to outdated Uglify in Webpack 3.
// If we decide to support Mock API we need to add Webpack first.
// const findMockApi = require('./mockapi').default;
const key = 'invision@external';
var getApi = null;
const getApi = ((typeof global !== 'undefined') && (typeof global[key] === 'function')) ?
global[key] : function () { return null; };
module.exports = getApi();
if (typeof window !== 'undefined' && typeof window[key] === 'function') {
getApi = window[key];
} else if (typeof global !== 'undefined' && typeof global[key] === 'function') {
getApi = global[key];
} else if (typeof self !== 'undefined' && typeof self[key] === 'function') {
getApi = self[key];
} else {
// not inside of studio.
// // default mockType to renderer for electron window and browser situations.
// var mockType = 'renderer';
// if (typeof process !== 'undefined' && process.env && process.env.INVISION_PLUGIN_TYPE) {
// // Which mock to load was set explicitly.
// mockType = process.env.INVISION_PLUGIN_TYPE;
// } else if (typeof process !== 'undefined' && process.versions && process.versions.node) {
// // We are inside node or electron, are we indide a browser window?
// if (!process.versions.chrome) {
// mockType = 'main';
// }
// }
// MockAPI outdated and temporarily removed
// getApi = findMockApi(mockType);
getApi = function () { return null; };
}
const context = { version: APIversion };
if (typeof _INV_CONTEXT === 'object') {
Object.assign(context, _INV_CONTEXT);
}
module.exports = getApi(context);
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