@balena/contrato
Advanced tools
Comparing version 0.9.5-build-renovate-typedoc-e1cb7588ed5f81ba7d2bec2323cd484b85bef07e-1 to 0.9.5
@@ -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) { |
@@ -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) { | ||
@@ -35,3 +45,3 @@ return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
const handlebars_1 = __importDefault(require("handlebars")); | ||
const handlebars_async_helpers_1 = __importDefault(require("handlebars-async-helpers")); | ||
const promised_handlebars_1 = __importDefault(require("promised-handlebars")); | ||
const first_1 = __importDefault(require("lodash/first")); | ||
@@ -54,3 +64,3 @@ const invokeMap_1 = __importDefault(require("lodash/invokeMap")); | ||
const utils_1 = require("./utils"); | ||
const hb = (0, handlebars_async_helpers_1.default)(handlebars_1.default); | ||
const hb = (0, promised_handlebars_1.default)(handlebars_1.default); | ||
const debug = (0, debug_1.default)('partials'); | ||
@@ -78,3 +88,6 @@ const REFERENCE_DELIMITER = '+'; | ||
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 | ||
@@ -81,0 +94,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.9.5", | ||
"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", | ||
@@ -40,6 +40,6 @@ "test:fast": "npm run build && npm run test:node", | ||
"handlebars": "^4.7.8", | ||
"handlebars-async-helpers": "^1.0.4", | ||
"js-combinatorics": "^0.5.5", | ||
"lodash": "^4.17.19", | ||
"object-hash": "^1.3.1", | ||
"promised-handlebars": "^2.0.1", | ||
"semver": "^5.7.1", | ||
@@ -68,12 +68,12 @@ "skhema": "^5.3.2" | ||
"ts-node": "^8.10.1", | ||
"typedoc": "^0.25.0", | ||
"typescript": "^4.9.5" | ||
"typedoc": "^0.27.5", | ||
"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-16T23:52:34.919Z" | ||
} | ||
} |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
127480
1560
+ Addedpromised-handlebars@^2.0.1
+ Addeddeep-aplus@1.0.4(transitive)
+ Addedlodash.isplainobject@4.0.6(transitive)
+ Addedpromised-handlebars@2.0.1(transitive)
- Removedhandlebars-async-helpers@^1.0.4
- Removedhandlebars@4.7.6(transitive)
- Removedhandlebars-async-helpers@1.0.6(transitive)