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

@eva/inspector-decorator

Package Overview
Dependencies
Maintainers
5
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eva/inspector-decorator - npm Package Compare versions

Comparing version 0.1.0-alpha.1 to 0.1.0-alpha.2

4

dist/inspector-decorator.d.ts

@@ -11,2 +11,4 @@ declare type AnyOptions = Record<string, any>;

export declare const ExecuteInEditMode: ClassDecorator;
export declare function Field(): PropertyDecorator;

@@ -60,2 +62,4 @@

export declare const shouldExecuteInEditMode: (target: ClassType) => boolean;
export declare type StaticGetProperties<T extends ClassType<any>> = () => DynamicGetProperties<T> | FieldMetadata<InstanceType<T>>;

@@ -62,0 +66,0 @@

@@ -29,2 +29,3 @@ 'use strict';

var IDE_PROPERTY_METADATA = 'IDE_PROPERTY_METADATA';
var COMPONENT_EXECUTE_MODE_METADATA = 'COMPONENT_EXECUTE_MODE_METADATA';

@@ -109,4 +110,19 @@ function isFunction(val) {

}
var ExecuteMode;
(function (ExecuteMode) {
ExecuteMode[ExecuteMode["Edit"] = 2] = "Edit";
ExecuteMode[ExecuteMode["Game"] = 4] = "Game";
ExecuteMode[ExecuteMode["All"] = 6] = "All";
})(ExecuteMode || (ExecuteMode = {}));
var ExecuteInEditMode = function (target) {
Reflect.defineMetadata(COMPONENT_EXECUTE_MODE_METADATA, ExecuteMode.Edit, target);
};
var shouldExecuteInEditMode = function (target) {
var mode = Reflect.getMetadata(COMPONENT_EXECUTE_MODE_METADATA, target);
return !!(mode & ExecuteMode.Edit);
};
exports.ExecuteInEditMode = ExecuteInEditMode;
exports.Field = Field;
exports.getPropertiesOf = getPropertiesOf;
exports.shouldExecuteInEditMode = shouldExecuteInEditMode;

2

dist/plugin.cjs.prod.js

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

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("tslib"),e=function(e){function r(){var t=this.constructor,r=e.call(this,"Symbol keys are not supported yet!")||this;return Object.setPrototypeOf(r,t.prototype),r}return t.__extends(r,e),r}(Error),r=function(e){function r(){var t=this.constructor,r=e.call(this,"getProperties is not a function!")||this;return Object.setPrototypeOf(r,t.prototype),r}return t.__extends(r,e),r}(Error);function n(t){return t===String?"string":t===Number?"number":t===Boolean?"boolean":"unknown"}exports.Field=function(r,o){return function(i,u){if("symbol"==typeof u)throw new e;var s=function(t,e){return"function"==typeof t?{returnTypeFunc:t,options:e||{}}:{options:t||{}}}(r,o);!function(e,r,o,i){var u=Reflect.getMetadata("design:type",e,r),s=u===Array,c=n(u);if("unknown"!==c&&(u=c),i){var a=i();Array.isArray(a)?(s=!0,u=a[0]):u=a}var f=Reflect.getMetadata("IDE_PROPERTY_METADATA",e.constructor)||{};f[r]=t.__assign({type:u,isArray:s},o),Reflect.defineMetadata("IDE_PROPERTY_METADATA",f,e.constructor)}(i,u,s.options,s.returnTypeFunc)}},exports.getPropertiesOf=function t(e){if("getProperties"in e){if("function"!=typeof e.getProperties)throw new r;return e.getProperties()}var o=Reflect.getMetadata("IDE_PROPERTY_METADATA",e)||{};return Object.keys(o).forEach((function(e){if("function"==typeof o[e].type){var r=n(o[e].type);o[e].type="unknown"!==r?r:t(o[e].type)}})),o};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t,e=require("tslib"),r=function(t){function r(){var e=this.constructor,r=t.call(this,"Symbol keys are not supported yet!")||this;return Object.setPrototypeOf(r,e.prototype),r}return e.__extends(r,t),r}(Error),n=function(t){function r(){var e=this.constructor,r=t.call(this,"getProperties is not a function!")||this;return Object.setPrototypeOf(r,e.prototype),r}return e.__extends(r,t),r}(Error);function o(t){return t===String?"string":t===Number?"number":t===Boolean?"boolean":"unknown"}!function(t){t[t.Edit=2]="Edit",t[t.Game=4]="Game",t[t.All=6]="All"}(t||(t={}));exports.ExecuteInEditMode=function(e){Reflect.defineMetadata("COMPONENT_EXECUTE_MODE_METADATA",t.Edit,e)},exports.Field=function(t,n){return function(i,u){if("symbol"==typeof u)throw new r;var c=function(t,e){return"function"==typeof t?{returnTypeFunc:t,options:e||{}}:{options:t||{}}}(t,n);!function(t,r,n,i){var u=Reflect.getMetadata("design:type",t,r),c=u===Array,s=o(u);if("unknown"!==s&&(u=s),i){var a=i();Array.isArray(a)?(c=!0,u=a[0]):u=a}var f=Reflect.getMetadata("IDE_PROPERTY_METADATA",t.constructor)||{};f[r]=e.__assign({type:u,isArray:c},n),Reflect.defineMetadata("IDE_PROPERTY_METADATA",f,t.constructor)}(i,u,c.options,c.returnTypeFunc)}},exports.getPropertiesOf=function t(e){if("getProperties"in e){if("function"!=typeof e.getProperties)throw new n;return e.getProperties()}var r=Reflect.getMetadata("IDE_PROPERTY_METADATA",e)||{};return Object.keys(r).forEach((function(e){if("function"==typeof r[e].type){var n=o(r[e].type);r[e].type="unknown"!==n?n:t(r[e].type)}})),r},exports.shouldExecuteInEditMode=function(e){return!!(Reflect.getMetadata("COMPONENT_EXECUTE_MODE_METADATA",e)&t.Edit)};

@@ -25,2 +25,3 @@ import { __extends, __assign } from 'tslib';

var IDE_PROPERTY_METADATA = 'IDE_PROPERTY_METADATA';
var COMPONENT_EXECUTE_MODE_METADATA = 'COMPONENT_EXECUTE_MODE_METADATA';

@@ -105,3 +106,16 @@ function isFunction(val) {

}
var ExecuteMode;
(function (ExecuteMode) {
ExecuteMode[ExecuteMode["Edit"] = 2] = "Edit";
ExecuteMode[ExecuteMode["Game"] = 4] = "Game";
ExecuteMode[ExecuteMode["All"] = 6] = "All";
})(ExecuteMode || (ExecuteMode = {}));
var ExecuteInEditMode = function (target) {
Reflect.defineMetadata(COMPONENT_EXECUTE_MODE_METADATA, ExecuteMode.Edit, target);
};
var shouldExecuteInEditMode = function (target) {
var mode = Reflect.getMetadata(COMPONENT_EXECUTE_MODE_METADATA, target);
return !!(mode & ExecuteMode.Edit);
};
export { Field, getPropertiesOf };
export { ExecuteInEditMode, Field, getPropertiesOf, shouldExecuteInEditMode };
{
"name": "@eva/inspector-decorator",
"version": "0.1.0-alpha.1",
"version": "0.1.0-alpha.2",
"scripts": {

@@ -5,0 +5,0 @@ "build": "node ./scripts/build.js",

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