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

@balena/contrato

Package Overview
Dependencies
Maintainers
0
Versions
144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@balena/contrato - npm Package Compare versions

Comparing version 0.9.5-build-renovate-typedoc-e1cb7588ed5f81ba7d2bec2323cd484b85bef07e-1 to 0.10.0-build-json-schema-is-valid-317eebc90ac4487be7775c38dee5c4c6ee856a6d-1

build/json-schema.d.ts

3

build/children-tree.js

@@ -15,2 +15,5 @@ "use strict";

const hash = (0, utils_1.setFirst)(contract.metadata.children.byType[type]);
if (hash === undefined) {
throw new Error('Error retrieving child');
}
const child = contract.getChildByHash(hash);

@@ -17,0 +20,0 @@ if (child === undefined) {

8

build/contract.d.ts

@@ -8,3 +8,3 @@ import type { ContractObject } from './types/types';

rebuild(): void;
interpolate(options?: object): Contract;
interpolate(options?: object): this;
getVersion(): string;

@@ -18,5 +18,5 @@ getSlug(): string;

toJSON(): ContractObject;
addChild(contract: Contract, options?: object): Contract;
removeChild(contract: Contract, options?: object): Contract;
addChildren(contracts?: Contract[], options?: object): Contract;
addChild(contract: Contract, options?: object): this;
removeChild(contract: Contract, options?: object): this;
addChildren(contracts?: Contract[], options?: object): this;
getChildrenTypes(): Set<string>;

@@ -23,0 +23,0 @@ getChildByHash(childHash: string): Contract | undefined;

@@ -22,5 +22,5 @@ "use strict";

const uniqWith_1 = __importDefault(require("lodash/uniqWith"));
const skhema_1 = require("skhema");
const js_combinatorics_1 = require("js-combinatorics");
const semver_1 = require("semver");
const json_schema_1 = require("./json-schema");
const object_set_1 = __importDefault(require("./object-set"));

@@ -354,3 +354,3 @@ const matcher_cache_1 = __importDefault(require("./matcher-cache"));

if (options['filter']) {
const filterValidator = (0, partial_1.default)(skhema_1.isValid, options['filter']);
const filterValidator = (0, partial_1.default)(json_schema_1.isValid, options['filter']);
contracts = (0, filter_1.default)(contracts, (con) => {

@@ -357,0 +357,0 @@ return filterValidator(con.raw);

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.sequence = exports.query = exports.parseCardinality = exports.buildTemplate = exports.Blueprint = exports.Contract = void 0;
exports.sequence = exports.parseCardinality = exports.buildTemplate = exports.Blueprint = exports.Contract = void 0;
exports.query = query;
const contract_1 = __importDefault(require("./contract"));

@@ -19,5 +20,4 @@ exports.Contract = contract_1.default;

}
exports.query = query;
const sequence = (universe, layout, skeleton) => new blueprint_1.default(layout, skeleton).sequence(universe);
exports.sequence = sequence;
//# sourceMappingURL=index.js.map

@@ -18,9 +18,19 @@ "use strict";

});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -76,3 +86,6 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

const slices = (0, reduce_1.default)((0, range_1.default)(options.structure.length, 1, -1), (accumulator, slice) => accumulator.concat((0, invokeMap_1.default)(products, 'slice', 0, slice)), []);
const fallbackPaths = combinations.reduce((accumulator, _, index, collection) => (0, map_1.default)([(0, map_1.default)(collection, first_1.default), (0, map_1.default)(collection, last_1.default)], (list) => (0, take_1.default)(list, index + 1)).concat(accumulator), []);
const fallbackPaths = combinations.reduce((accumulator, _, index, collection) => (0, map_1.default)([
(0, map_1.default)(collection, first_1.default),
(0, map_1.default)(collection, last_1.default),
], (list) => (0, take_1.default)(list, index + 1)).concat(accumulator), []);
return products

@@ -79,0 +92,0 @@ .concat(slices)

@@ -13,4 +13,2 @@ export interface paths {

};
} & {
[key: string]: any;
};

@@ -17,0 +15,0 @@ BlueprintLayout: {

export declare const areSetsDisjoint: <T>(set1: Set<T>, set2: Set<T>) => boolean;
export declare const setUnion: <T>(set1: Set<T>, set2: Set<T>) => Set<T>;
export declare const setFirst: <T>(set1: Set<T>) => T;
export declare const setFirst: <T>(set1: Set<T>) => T | undefined;
export declare const setMap: <T, V>(set1: Set<T>, iteratee: (arg0: T) => V) => V[];

@@ -5,0 +5,0 @@ export declare function flatten<T>(iterable: Iterable<T | T[]>): IterableIterator<T>;

@@ -6,3 +6,6 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.stripExtraBlankLines = exports.cartesianProductWith = exports.filter = exports.flatten = exports.setMap = exports.setFirst = exports.setUnion = exports.areSetsDisjoint = void 0;
exports.stripExtraBlankLines = exports.setMap = exports.setFirst = exports.setUnion = exports.areSetsDisjoint = void 0;
exports.flatten = flatten;
exports.filter = filter;
exports.cartesianProductWith = cartesianProductWith;
const isEmpty_1 = __importDefault(require("lodash/isEmpty"));

@@ -49,3 +52,2 @@ const trim_1 = __importDefault(require("lodash/trim"));

}
exports.flatten = flatten;
function* filter(iterable, predicate) {

@@ -58,3 +60,2 @@ for (const it of iterable) {

}
exports.filter = filter;
function* nextCartesianProduct(sets, iteratee, combination, setRow, setCol) {

@@ -86,5 +87,4 @@ if (setRow >= sets.length) {

}
exports.cartesianProductWith = cartesianProductWith;
const stripExtraBlankLines = (text) => (0, trim_1.default)(text.replace(/(\r?\n){3,}/g, '\n\n'));
exports.stripExtraBlankLines = stripExtraBlankLines;
//# sourceMappingURL=utils.js.map
{
"name": "@balena/contrato",
"version": "0.9.5-build-renovate-typedoc-e1cb7588ed5f81ba7d2bec2323cd484b85bef07e-1",
"version": "0.10.0-build-json-schema-is-valid-317eebc90ac4487be7775c38dee5c4c6ee856a6d-1",
"description": "The official contract implementation",

@@ -31,3 +31,3 @@ "homepage": "https://github.com/product-os/contrato",

"lint-fix": "balena-lint -t tsconfig.dev.json --typescript --fix lib tests scripts",
"test:node": "mocha -r ts-node/register/transpile-only --reporter spec tests/**/*.spec.ts",
"test:node": "mocha -r ts-node/register/transpile-only --reporter spec \"tests/**/*.spec.ts\"",
"test": "npm run build && npm run lint && npm run test:node",

@@ -38,2 +38,4 @@ "test:fast": "npm run build && npm run test:node",

"dependencies": {
"ajv": "^8.17.1",
"ajv-formats": "^3.0.1",
"debug": "^3.2.6",

@@ -43,9 +45,9 @@ "handlebars": "^4.7.8",

"js-combinatorics": "^0.5.5",
"json-schema": "^0.4.0",
"lodash": "^4.17.19",
"object-hash": "^1.3.1",
"semver": "^5.7.1",
"skhema": "^5.3.2"
"semver": "^5.7.1"
},
"devDependencies": {
"@balena/lint": "^8.0.2",
"@balena/lint": "^8.2.8",
"@types/chai": "^4.2.11",

@@ -55,2 +57,3 @@ "@types/chai-as-promised": "^7.1.2",

"@types/js-combinatorics": "^0.5.32",
"@types/json-schema": "^7.0.15",
"@types/lodash": "^4.14.168",

@@ -70,12 +73,12 @@ "@types/mocha": "^10.0.6",

"ts-node": "^8.10.1",
"typedoc": "^0.25.0",
"typescript": "^4.9.5"
"typedoc": "^0.23.28",
"typescript": "^5.7.2"
},
"engines": {
"node": "^20.0.0",
"npm": "^10.0.0"
"node": ">=20.0.0",
"npm": ">=10.0.0"
},
"versionist": {
"publishedAt": "2024-04-30T23:45:04.974Z"
"publishedAt": "2024-12-16T22:00:02.660Z"
}
}

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

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