UNPKG

piral-cli

Version:

The standard CLI for creating and building a Piral instance or a Pilet.

21 lines 818 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = default_1; /** * Checks that the externals to be used in pilets are valid. */ function default_1(context, options = undefined) { const { externals } = context; const invalidDepRefs = externals .filter((ext) => !ext.parents || ext.parents.length === 0) .map((ext) => ext.name) .filter((name) => context.dependencies[name] === undefined && context.devDependencies[name] === undefined); for (const invalidDepRef of invalidDepRefs) { context.warning(` The shared dependency "${invalidDepRef}" is not listed in the "dependencies" and "devDependencies". Expected: "${invalidDepRef}" in dependencies. Received: <none>. `); } } //# sourceMappingURL=piral-has-valid-externals.js.map