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

@lifeomic/abac

Package Overview
Dependencies
Maintainers
2
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lifeomic/abac - npm Package Compare versions

Comparing version 4.10.1 to 4.10.2

src/browser.js

12

package.json
{
"name": "@lifeomic/abac",
"version": "4.10.1",
"version": "4.10.2",
"description": "LifeOmic Attribute Based Access Control Support Module",
"main": "src/index.cjs",
"main": "src/index.js",
"types": "src/index.d.ts",
"browser": "browser/index.js",
"browser": "src/browser.js",
"module": "src/index.mjs",

@@ -21,5 +21,5 @@ "engines": {

"import": "./src/index.mjs",
"require": "./src/index.cjs"
"require": "./src/index.js"
},
"browser": "./src/index.js"
"browser": "./src/browser.js"
}

@@ -36,3 +36,2 @@ },

"src/**/*.js",
"src/**/*.cjs",
"src/**/*.mjs",

@@ -90,3 +89,2 @@ "src/**/*.d.ts"

"files": [
"test/**/*.test.js",
"test/**/*.test.ts"

@@ -93,0 +91,0 @@ ],

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

declare const _default: {
export declare const Comparison: {
readonly $schema: "http://json-schema.org/draft-07/schema#";

@@ -92,2 +92,1 @@ readonly definitions: {

};
export default _default;
"use strict";
(() => {
// src/schemas/Comparison.ts
var Comparison_default = {
$schema: "http://json-schema.org/draft-07/schema#",
definitions: {
ValidTargetString: {
type: "string",
pattern: "^(([$%a-zA-Z_][$%0-9a-zA-Z_]*)|\\*)(\\.([$%0-9a-zA-Z_]*)|\\*)*$"
}
},
$id: "Comparison",
title: "Comparison",
description: "An individual ABAC attribute comparison",
type: "object",
oneOf: [
{
properties: {
comparison: {
type: "string",
enum: ["superset", "subset", "in", "notIn", "equals", "notEquals"]
},
value: {
type: "array",
items: {
type: ["number", "string"]
}
}
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var Comparison_exports = {};
__export(Comparison_exports, {
Comparison: () => Comparison
});
module.exports = __toCommonJS(Comparison_exports);
const Comparison = {
$schema: "http://json-schema.org/draft-07/schema#",
definitions: {
ValidTargetString: {
type: "string",
pattern: "^(([$%a-zA-Z_][$%0-9a-zA-Z_]*)|\\*)(\\.([$%0-9a-zA-Z_]*)|\\*)*$"
}
},
$id: "Comparison",
title: "Comparison",
description: "An individual ABAC attribute comparison",
type: "object",
oneOf: [
{
properties: {
comparison: {
type: "string",
enum: ["superset", "subset", "in", "notIn", "equals", "notEquals"]
},
required: ["comparison", "value"],
additionalProperties: false
},
{
properties: {
comparison: {
type: "string",
enum: ["includes", "notIncludes", "equals", "notEquals"]
},
value: {
value: {
type: "array",
items: {
type: ["number", "string"]
}
}
},
required: ["comparison", "value"],
additionalProperties: false
},
{
properties: {
comparison: {
type: "string",
enum: ["includes", "notIncludes", "equals", "notEquals"]
},
required: ["comparison", "value"],
additionalProperties: false
value: {
type: ["number", "string"]
}
},
{
properties: {
comparison: {
type: "string",
enum: ["startsWith", "prefixOf", "suffixOf", "endsWith"]
},
value: {
type: ["string"]
},
target: {
$ref: "#/definitions/ValidTargetString"
}
required: ["comparison", "value"],
additionalProperties: false
},
{
properties: {
comparison: {
type: "string",
enum: ["startsWith", "prefixOf", "suffixOf", "endsWith"]
},
required: ["comparison"],
additionalProperties: false
value: {
type: ["string"]
},
target: {
$ref: "#/definitions/ValidTargetString"
}
},
{
properties: {
comparison: {
type: "string",
enum: ["equals", "notEquals"]
},
value: {
type: "boolean"
}
required: ["comparison"],
additionalProperties: false
},
{
properties: {
comparison: {
type: "string",
enum: ["equals", "notEquals"]
},
required: ["comparison", "value"],
additionalProperties: false
value: {
type: "boolean"
}
},
{
properties: {
comparison: {
type: "string",
required: ["comparison", "value"],
additionalProperties: false
},
{
properties: {
comparison: {
type: "string",
enum: [
"superset",
"subset",
"in",
"equals",
"includes",
"notIncludes",
"notEquals",
"notIn"
]
},
target: {
$ref: "#/definitions/ValidTargetString"
}
},
required: ["comparison", "target"],
additionalProperties: false
},
{
properties: {
comparison: {
type: "string",
not: {
enum: [

@@ -87,39 +130,19 @@ "superset",

"notEquals",
"notIn"
"notIn",
"startsWith",
"prefixOf",
"endsWith",
"suffixOf"
]
},
target: {
$ref: "#/definitions/ValidTargetString"
}
},
required: ["comparison", "target"],
additionalProperties: false
}
},
{
properties: {
comparison: {
type: "string",
not: {
enum: [
"superset",
"subset",
"in",
"equals",
"includes",
"notIncludes",
"notEquals",
"notIn",
"startsWith",
"prefixOf",
"endsWith",
"suffixOf"
]
}
}
},
required: ["comparison"],
additionalProperties: true
}
]
};
})();
required: ["comparison"],
additionalProperties: true
}
]
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
Comparison
});

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

export { default as Comparison } from './Comparison';
export { default as Policy } from './Policy';
export { default as Rule } from './Rule';
export { default as Rules } from './Rules';
export { default as OperationNames } from './OperationNames';
export { default as ReduceOptions } from './ReduceOptions';
export { Comparison } from './Comparison';
export { Policy } from './Policy';
export { Rule } from './Rule';
export { Rules } from './Rules';
export { OperationNames } from './OperationNames';
export { ReduceOptions } from './ReduceOptions';
"use strict";
(() => {
// src/schemas/Comparison.ts
var Comparison_default = {
$schema: "http://json-schema.org/draft-07/schema#",
definitions: {
ValidTargetString: {
type: "string",
pattern: "^(([$%a-zA-Z_][$%0-9a-zA-Z_]*)|\\*)(\\.([$%0-9a-zA-Z_]*)|\\*)*$"
}
},
$id: "Comparison",
title: "Comparison",
description: "An individual ABAC attribute comparison",
type: "object",
oneOf: [
{
properties: {
comparison: {
type: "string",
enum: ["superset", "subset", "in", "notIn", "equals", "notEquals"]
},
value: {
type: "array",
items: {
type: ["number", "string"]
}
}
},
required: ["comparison", "value"],
additionalProperties: false
},
{
properties: {
comparison: {
type: "string",
enum: ["includes", "notIncludes", "equals", "notEquals"]
},
value: {
type: ["number", "string"]
}
},
required: ["comparison", "value"],
additionalProperties: false
},
{
properties: {
comparison: {
type: "string",
enum: ["startsWith", "prefixOf", "suffixOf", "endsWith"]
},
value: {
type: ["string"]
},
target: {
$ref: "#/definitions/ValidTargetString"
}
},
required: ["comparison"],
additionalProperties: false
},
{
properties: {
comparison: {
type: "string",
enum: ["equals", "notEquals"]
},
value: {
type: "boolean"
}
},
required: ["comparison", "value"],
additionalProperties: false
},
{
properties: {
comparison: {
type: "string",
enum: [
"superset",
"subset",
"in",
"equals",
"includes",
"notIncludes",
"notEquals",
"notIn"
]
},
target: {
$ref: "#/definitions/ValidTargetString"
}
},
required: ["comparison", "target"],
additionalProperties: false
},
{
properties: {
comparison: {
type: "string",
not: {
enum: [
"superset",
"subset",
"in",
"equals",
"includes",
"notIncludes",
"notEquals",
"notIn",
"startsWith",
"prefixOf",
"endsWith",
"suffixOf"
]
}
}
},
required: ["comparison"],
additionalProperties: true
}
]
};
// src/schemas/Policy.ts
var Policy_default = {
$schema: "http://json-schema.org/draft-07/schema#",
$id: "Policy",
title: "Policy",
description: "An ABAC policy document.",
type: "object",
properties: {
rules: {
type: "object",
propertyNames: { $ref: "OperationNames" },
additionalProperties: { $ref: "Rules" }
}
},
required: ["rules"],
additionalProperties: false
};
// src/schemas/Rule.ts
var Rule_default = {
$schema: "http://json-schema.org/draft-07/schema#",
$id: "Rule",
title: "Rule",
description: "An individual ABAC policy rule",
type: "object",
patternProperties: {
"^(([$%a-zA-Z_][$%0-9a-zA-Z_]*)|\\*)(\\.([$%0-9a-zA-Z_]*)|\\*)*$": {
$ref: "Comparison"
}
},
additionalProperties: false
};
// src/schemas/Rules.ts
var Rules_default = {
$schema: "http://json-schema.org/draft-07/schema#",
$id: "Rules",
title: "Rules",
description: "An ABAC rules list or true.",
oneOf: [
{
type: "array",
items: {
$ref: "Rule"
},
minItems: 1
},
{
type: "boolean",
const: true
}
]
};
// src/schemas/OperationNames.ts
var OperationNames_default = {
$schema: "http://json-schema.org/draft-07/schema#",
$id: "OperationNames",
title: "OperationNames",
description: "The set of valid operation names",
type: "string",
minLength: 2,
maxLength: 64,
pattern: "[a-zA-z]+"
};
// src/schemas/ReduceOptions.ts
var ReduceOptions_default = {
$schema: "http://json-schema.org/draft-07/schema#",
$id: "ReduceOptions",
title: "ReduceOptions",
description: "An options object that can be passed to the reduce function for configuration.",
type: "object",
properties: {
inlineTargets: {
type: "array",
items: {
type: ["string"]
},
minItems: 1
}
},
additionalProperties: false
};
})();
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var schemas_exports = {};
__export(schemas_exports, {
Comparison: () => import_Comparison.Comparison,
OperationNames: () => import_OperationNames.OperationNames,
Policy: () => import_Policy.Policy,
ReduceOptions: () => import_ReduceOptions.ReduceOptions,
Rule: () => import_Rule.Rule,
Rules: () => import_Rules.Rules
});
module.exports = __toCommonJS(schemas_exports);
var import_Comparison = require("./Comparison");
var import_Policy = require("./Policy");
var import_Rule = require("./Rule");
var import_Rules = require("./Rules");
var import_OperationNames = require("./OperationNames");
var import_ReduceOptions = require("./ReduceOptions");
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
Comparison,
OperationNames,
Policy,
ReduceOptions,
Rule,
Rules
});

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

declare const _default: {
export declare const OperationNames: {
readonly $schema: "http://json-schema.org/draft-07/schema#";

@@ -11,2 +11,1 @@ readonly $id: "OperationNames";

};
export default _default;
"use strict";
(() => {
// src/schemas/OperationNames.ts
var OperationNames_default = {
$schema: "http://json-schema.org/draft-07/schema#",
$id: "OperationNames",
title: "OperationNames",
description: "The set of valid operation names",
type: "string",
minLength: 2,
maxLength: 64,
pattern: "[a-zA-z]+"
};
})();
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var OperationNames_exports = {};
__export(OperationNames_exports, {
OperationNames: () => OperationNames
});
module.exports = __toCommonJS(OperationNames_exports);
const OperationNames = {
$schema: "http://json-schema.org/draft-07/schema#",
$id: "OperationNames",
title: "OperationNames",
description: "The set of valid operation names",
type: "string",
minLength: 2,
maxLength: 64,
pattern: "[a-zA-z]+"
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
OperationNames
});

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

declare const _default: {
export declare const Policy: {
readonly $schema: "http://json-schema.org/draft-07/schema#";

@@ -21,2 +21,1 @@ readonly $id: "Policy";

};
export default _default;
"use strict";
(() => {
// src/schemas/Policy.ts
var Policy_default = {
$schema: "http://json-schema.org/draft-07/schema#",
$id: "Policy",
title: "Policy",
description: "An ABAC policy document.",
type: "object",
properties: {
rules: {
type: "object",
propertyNames: { $ref: "OperationNames" },
additionalProperties: { $ref: "Rules" }
}
},
required: ["rules"],
additionalProperties: false
};
})();
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var Policy_exports = {};
__export(Policy_exports, {
Policy: () => Policy
});
module.exports = __toCommonJS(Policy_exports);
const Policy = {
$schema: "http://json-schema.org/draft-07/schema#",
$id: "Policy",
title: "Policy",
description: "An ABAC policy document.",
type: "object",
properties: {
rules: {
type: "object",
propertyNames: { $ref: "OperationNames" },
additionalProperties: { $ref: "Rules" }
}
},
required: ["rules"],
additionalProperties: false
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
Policy
});

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

declare const _default: {
export declare const ReduceOptions: {
readonly $schema: "http://json-schema.org/draft-07/schema#";

@@ -18,2 +18,1 @@ readonly $id: "ReduceOptions";

};
export default _default;
"use strict";
(() => {
// src/schemas/ReduceOptions.ts
var ReduceOptions_default = {
$schema: "http://json-schema.org/draft-07/schema#",
$id: "ReduceOptions",
title: "ReduceOptions",
description: "An options object that can be passed to the reduce function for configuration.",
type: "object",
properties: {
inlineTargets: {
type: "array",
items: {
type: ["string"]
},
minItems: 1
}
},
additionalProperties: false
};
})();
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var ReduceOptions_exports = {};
__export(ReduceOptions_exports, {
ReduceOptions: () => ReduceOptions
});
module.exports = __toCommonJS(ReduceOptions_exports);
const ReduceOptions = {
$schema: "http://json-schema.org/draft-07/schema#",
$id: "ReduceOptions",
title: "ReduceOptions",
description: "An options object that can be passed to the reduce function for configuration.",
type: "object",
properties: {
inlineTargets: {
type: "array",
items: {
type: ["string"]
},
minItems: 1
}
},
additionalProperties: false
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
ReduceOptions
});

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

declare const _default: {
export declare const Rule: {
readonly $schema: "http://json-schema.org/draft-07/schema#";

@@ -14,2 +14,1 @@ readonly $id: "Rule";

};
export default _default;
"use strict";
(() => {
// src/schemas/Rule.ts
var Rule_default = {
$schema: "http://json-schema.org/draft-07/schema#",
$id: "Rule",
title: "Rule",
description: "An individual ABAC policy rule",
type: "object",
patternProperties: {
"^(([$%a-zA-Z_][$%0-9a-zA-Z_]*)|\\*)(\\.([$%0-9a-zA-Z_]*)|\\*)*$": {
$ref: "Comparison"
}
},
additionalProperties: false
};
})();
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var Rule_exports = {};
__export(Rule_exports, {
Rule: () => Rule
});
module.exports = __toCommonJS(Rule_exports);
const Rule = {
$schema: "http://json-schema.org/draft-07/schema#",
$id: "Rule",
title: "Rule",
description: "An individual ABAC policy rule",
type: "object",
patternProperties: {
"^(([$%a-zA-Z_][$%0-9a-zA-Z_]*)|\\*)(\\.([$%0-9a-zA-Z_]*)|\\*)*$": {
$ref: "Comparison"
}
},
additionalProperties: false
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
Rule
});

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

declare const _default: {
export declare const Rules: {
readonly $schema: "http://json-schema.org/draft-07/schema#";

@@ -17,2 +17,1 @@ readonly $id: "Rules";

};
export default _default;
"use strict";
(() => {
// src/schemas/Rules.ts
var Rules_default = {
$schema: "http://json-schema.org/draft-07/schema#",
$id: "Rules",
title: "Rules",
description: "An ABAC rules list or true.",
oneOf: [
{
type: "array",
items: {
$ref: "Rule"
},
minItems: 1
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var Rules_exports = {};
__export(Rules_exports, {
Rules: () => Rules
});
module.exports = __toCommonJS(Rules_exports);
const Rules = {
$schema: "http://json-schema.org/draft-07/schema#",
$id: "Rules",
title: "Rules",
description: "An ABAC rules list or true.",
oneOf: [
{
type: "array",
items: {
$ref: "Rule"
},
{
type: "boolean",
const: true
}
]
};
})();
minItems: 1
},
{
type: "boolean",
const: true
}
]
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
Rules
});
"use strict";
(() => {
})();
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var types_exports = {};
module.exports = __toCommonJS(types_exports);

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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