@nxextensions/firebase-cypress
Version:
An NX Plugin for Firebase Applications that would like to use emulators for E2E testing with Cypress
23 lines • 851 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.targetStringToTarget = targetStringToTarget;
function targetStringToTarget(targetString) {
if (targetString.includes(' ')) {
const parts = targetString.split(' ');
const commandPart = parts.find(part => part.includes(':'));
if (!commandPart) {
throw new Error(`Unable to parse target: "${targetString}" to a valid target`);
}
targetString = commandPart;
}
if (targetString.includes(':')) {
const [project, target, configuration] = targetString.split(':');
return {
project,
target,
configuration
};
}
throw new Error(`Unable to parse target: "${targetString}" to a valid target`);
}
//# sourceMappingURL=target-string-to-target.js.map