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

@actbase/native

Package Overview
Dependencies
Maintainers
5
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@actbase/native - npm Package Compare versions

Comparing version 0.1.10 to 0.1.11

5

lib/Application.d.ts

@@ -5,3 +5,6 @@ import { PropsWithChildren } from 'react';

style?: StyleProp<ViewStyle>;
debug?: boolean;
debug?: boolean | {
network?: boolean;
console?: boolean;
};
}

@@ -8,0 +11,0 @@ export declare const Providers: {

4

lib/Application.js

@@ -89,3 +89,5 @@ "use strict";

var ToolElement = !debug ? _react.Fragment : _devtools["default"];
return _react["default"].createElement(_reactNativeSafeAreaContext.SafeAreaProvider, null, _react["default"].createElement(ToolElement, null, _react["default"].createElement(_reactNative.View, {
return _react["default"].createElement(_reactNativeSafeAreaContext.SafeAreaProvider, null, _react["default"].createElement(ToolElement, {
debug: debug
}, _react["default"].createElement(_reactNative.View, {
style: style

@@ -92,0 +94,0 @@ }, _react["default"].createElement(_reactAbsolute.AbsoluteProvider, null, output))));

export default DevTool;
declare function DevTool({ children }: {
declare function DevTool({ children, debug }: {
children: any;
debug: any;
}): JSX.Element;

@@ -80,3 +80,4 @@ "use strict";

var DevTool = function DevTool(_a) {
var children = _a.children;
var children = _a.children,
debug = _a.debug;
var inset = (0, _reactNativeSafeAreaContext.useSafeAreaInsets)();

@@ -94,191 +95,200 @@

// setHttpLogs([]);
prevData.httpSend = XMLHttpRequest.prototype.send;
if ((debug === null || debug === void 0 ? void 0 : debug.network) !== false) {
prevData.httpSend = XMLHttpRequest.prototype.send;
XMLHttpRequest.prototype.send = function (body) {
var _a, _b;
XMLHttpRequest.prototype.send = function (body) {
var _a, _b;
if (body) {
var that_1 = this;
var _method_1 = that_1._method,
_url_1 = that_1._url;
setHttpLogs(function (o) {
var draft = (0, _tslib.__spreadArrays)(o);
if (body) {
var that_1 = this;
var _method_1 = that_1._method,
_url_1 = that_1._url;
setHttpLogs(function (o) {
var draft = (0, _tslib.__spreadArrays)(o);
if (draft.length > 100) {
draft.splice(100, draft.length - 100);
}
if (draft.length > 100) {
draft.splice(100, draft.length - 100);
}
var ix = draft.findIndex(function (x) {
return x.obj === that_1;
});
if (ix < 0) {
draft.splice(0, 0, {
obj: that_1,
url: _url_1,
method: _method_1,
state: 'ready',
time: new Date().getTime(),
body: body
var ix = draft.findIndex(function (x) {
return x.obj === that_1;
});
} else {
draft[ix].body = body;
}
return draft;
});
}
(_b = (_a = prevData.httpSend) === null || _a === void 0 ? void 0 : _a.apply) === null || _b === void 0 ? void 0 : _b.call(_a, this, arguments);
};
prevData.httpOpen = XMLHttpRequest.prototype.open;
XMLHttpRequest.prototype.open = function (XMLHttpRequest) {
var _a, _b;
this.addEventListener('readystatechange', function (e) {
var that = this;
var readyState = that.readyState,
status = that.status,
_method = that._method,
_url = that._url,
_response = that._response,
_headers = that._headers;
var success = status === 0 || status >= 200 && status < 400;
setHttpLogs(function (o) {
var draft = (0, _tslib.__spreadArrays)(o);
var ix = draft.findIndex(function (x) {
return x.obj === that;
});
if (readyState === _common.READY_STATUS.OPENED) {
if (ix < 0) {
draft.splice(0, 0, {
obj: that,
url: _url,
method: _method,
obj: that_1,
url: _url_1,
method: _method_1,
state: 'ready',
time: new Date().getTime()
time: new Date().getTime(),
body: body
});
} else {
draft[ix].state = 'ready';
draft[ix].time = new Date().getTime();
draft[ix].body = body;
}
} else if (readyState === _common.READY_STATUS.DONE && ix >= 0) {
draft[ix].state = success ? 'ok' : 'fail';
draft[ix].status = status;
draft[ix].finish = new Date().getTime();
draft[ix].obj = undefined;
draft[ix].response = _response;
draft[ix].headers = _headers; // delete that._response;
// prevData.consoleLog?.(JSON.stringify(that, null, 2));
}
return draft;
});
}, false);
(_b = (_a = prevData.httpOpen) === null || _a === void 0 ? void 0 : _a.apply) === null || _b === void 0 ? void 0 : _b.call(_a, this, arguments);
};
return draft;
});
}
prevData.consoleLog = console.log;
(_b = (_a = prevData.httpSend) === null || _a === void 0 ? void 0 : _a.apply) === null || _b === void 0 ? void 0 : _b.call(_a, this, arguments);
};
console.log = function () {
var _a, _b;
prevData.httpOpen = XMLHttpRequest.prototype.open;
setConsoleLogs(function (o) {
var draft = (0, _tslib.__spreadArrays)(o);
draft.splice(0, 0, {
type: 'log',
data: parseLogs(arguments),
time: new Date().getTime()
XMLHttpRequest.prototype.open = function (XMLHttpRequest) {
var _a, _b;
this.addEventListener('readystatechange', function (e) {
var that = this;
var readyState = that.readyState,
status = that.status,
_method = that._method,
_url = that._url,
_response = that._response,
_headers = that._headers;
var success = status === 0 || status >= 200 && status < 400;
setHttpLogs(function (o) {
var draft = (0, _tslib.__spreadArrays)(o);
var ix = draft.findIndex(function (x) {
return x.obj === that;
});
if (readyState === _common.READY_STATUS.OPENED) {
if (ix < 0) {
draft.splice(0, 0, {
obj: that,
url: _url,
method: _method,
state: 'ready',
time: new Date().getTime()
});
} else {
draft[ix].state = 'ready';
draft[ix].time = new Date().getTime();
}
} else if (readyState === _common.READY_STATUS.DONE && ix >= 0) {
draft[ix].state = success ? 'ok' : 'fail';
draft[ix].status = status;
draft[ix].finish = new Date().getTime();
draft[ix].obj = undefined;
draft[ix].response = _response;
draft[ix].headers = _headers; // delete that._response;
// prevData.consoleLog?.(JSON.stringify(that, null, 2));
}
return draft;
});
}, false);
(_b = (_a = prevData.httpOpen) === null || _a === void 0 ? void 0 : _a.apply) === null || _b === void 0 ? void 0 : _b.call(_a, this, arguments);
};
}
if ((debug === null || debug === void 0 ? void 0 : debug.console) !== false) {
prevData.consoleLog = console.log;
console.log = function () {
var _a, _b;
setConsoleLogs(function (o) {
var draft = (0, _tslib.__spreadArrays)(o);
draft.splice(0, 0, {
type: 'log',
data: parseLogs(arguments),
time: new Date().getTime()
});
return draft;
});
return draft;
});
(_b = (_a = prevData.consoleLog) === null || _a === void 0 ? void 0 : _a.apply) === null || _b === void 0 ? void 0 : _b.call(_a, this, arguments);
};
(_b = (_a = prevData.consoleLog) === null || _a === void 0 ? void 0 : _a.apply) === null || _b === void 0 ? void 0 : _b.call(_a, this, arguments);
};
prevData.consoleWarn = console.warn;
prevData.consoleWarn = console.warn;
console.warn = function () {
var _a, _b;
console.warn = function () {
var _a, _b;
setConsoleLogs(function (o) {
var draft = (0, _tslib.__spreadArrays)(o);
draft.splice(0, 0, {
type: 'warn',
data: parseLogs(arguments),
time: new Date().getTime()
setConsoleLogs(function (o) {
var draft = (0, _tslib.__spreadArrays)(o);
draft.splice(0, 0, {
type: 'warn',
data: parseLogs(arguments),
time: new Date().getTime()
});
return draft;
});
return draft;
});
(_b = (_a = prevData.consoleWarn) === null || _a === void 0 ? void 0 : _a.apply) === null || _b === void 0 ? void 0 : _b.call(_a, this, arguments);
};
(_b = (_a = prevData.consoleWarn) === null || _a === void 0 ? void 0 : _a.apply) === null || _b === void 0 ? void 0 : _b.call(_a, this, arguments);
};
prevData.consoleDebug = console.debug;
prevData.consoleDebug = console.debug;
console.debug = function () {
var _a, _b;
console.debug = function () {
var _a, _b;
setConsoleLogs(function (o) {
var draft = (0, _tslib.__spreadArrays)(o);
draft.splice(0, 0, {
type: 'debug',
data: parseLogs(arguments),
time: new Date().getTime()
setConsoleLogs(function (o) {
var draft = (0, _tslib.__spreadArrays)(o);
draft.splice(0, 0, {
type: 'debug',
data: parseLogs(arguments),
time: new Date().getTime()
});
return draft;
});
return draft;
});
(_b = (_a = prevData.consoleDebug) === null || _a === void 0 ? void 0 : _a.apply) === null || _b === void 0 ? void 0 : _b.call(_a, this, arguments);
};
(_b = (_a = prevData.consoleDebug) === null || _a === void 0 ? void 0 : _a.apply) === null || _b === void 0 ? void 0 : _b.call(_a, this, arguments);
};
prevData.consoleTrace = console.trace;
prevData.consoleTrace = console.trace;
console.trace = function () {
var _a, _b;
console.trace = function () {
var _a, _b;
setConsoleLogs(function (o) {
var draft = (0, _tslib.__spreadArrays)(o);
draft.splice(0, 0, {
type: 'trace',
data: parseLogs(arguments),
time: new Date().getTime()
setConsoleLogs(function (o) {
var draft = (0, _tslib.__spreadArrays)(o);
draft.splice(0, 0, {
type: 'trace',
data: parseLogs(arguments),
time: new Date().getTime()
});
return draft;
});
return draft;
});
(_b = (_a = prevData.consoleTrace) === null || _a === void 0 ? void 0 : _a.apply) === null || _b === void 0 ? void 0 : _b.call(_a, this, arguments);
};
(_b = (_a = prevData.consoleTrace) === null || _a === void 0 ? void 0 : _a.apply) === null || _b === void 0 ? void 0 : _b.call(_a, this, arguments);
};
prevData.consoleInfo = console.info;
prevData.consoleInfo = console.info;
console.info = function () {
var _a, _b;
console.info = function () {
var _a, _b;
setConsoleLogs(function (o) {
var draft = (0, _tslib.__spreadArrays)(o);
draft.splice(0, 0, {
type: 'info',
data: parseLogs(arguments),
time: new Date().getTime()
setConsoleLogs(function (o) {
var draft = (0, _tslib.__spreadArrays)(o);
draft.splice(0, 0, {
type: 'info',
data: parseLogs(arguments),
time: new Date().getTime()
});
return draft;
});
return draft;
});
(_b = (_a = prevData.consoleInfo) === null || _a === void 0 ? void 0 : _a.apply) === null || _b === void 0 ? void 0 : _b.call(_a, this, arguments);
};
(_b = (_a = prevData.consoleInfo) === null || _a === void 0 ? void 0 : _a.apply) === null || _b === void 0 ? void 0 : _b.call(_a, this, arguments);
};
}
return function () {
XMLHttpRequest.prototype.open = prevData.httpOpen;
prevData.httpOpen = undefined;
XMLHttpRequest.prototype.send = prevData.httpSend;
prevData.httpSend = undefined;
console.log = prevData.consoleLog;
prevData.consoleLog = undefined;
console.warn = prevData.consoleWarn;
prevData.consoleWarn = undefined;
console.debug = prevData.consoleDebug;
prevData.consoleDebug = undefined;
console.trace = prevData.consoleTrace;
prevData.consoleTrace = undefined;
console.info = prevData.consoleInfo;
prevData.consoleInfo = undefined;
if ((debug === null || debug === void 0 ? void 0 : debug.network) !== false) {
XMLHttpRequest.prototype.open = prevData.httpOpen;
prevData.httpOpen = undefined;
XMLHttpRequest.prototype.send = prevData.httpSend;
prevData.httpSend = undefined;
}
if ((debug === null || debug === void 0 ? void 0 : debug.console) !== false) {
console.log = prevData.consoleLog;
prevData.consoleLog = undefined;
console.warn = prevData.consoleWarn;
prevData.consoleWarn = undefined;
console.debug = prevData.consoleDebug;
prevData.consoleDebug = undefined;
console.trace = prevData.consoleTrace;
prevData.consoleTrace = undefined;
console.info = prevData.consoleInfo;
prevData.consoleInfo = undefined;
}
};

@@ -285,0 +295,0 @@ }, []);

{
"name": "@actbase/native",
"version": "0.1.10",
"version": "0.1.11",
"description": "React-Native Generic UI Components",

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

Sorry, the diff of this file is not supported yet

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