wireit
Version:
Upgrade your npm scripts to make them smarter and more efficient
32 lines • 976 B
JavaScript
/**
* @license
* Copyright 2022 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { BaseExecution } from './base.js';
import { Fingerprint } from '../fingerprint.js';
/**
* Execution for a {@link NoCommandScriptConfig}.
*/
export class NoCommandScriptExecution extends BaseExecution {
async _execute() {
const dependencyFingerprints = await this._executeDependencies();
if (!dependencyFingerprints.ok) {
return dependencyFingerprints;
}
const fingerprint = await Fingerprint.compute(this._config, dependencyFingerprints.value);
if (!fingerprint.ok) {
return {
ok: false,
error: [fingerprint.error],
};
}
this._logger.log({
script: this._config,
type: 'success',
reason: 'no-command',
});
return { ok: true, value: fingerprint.value };
}
}
//# sourceMappingURL=no-command.js.map