@vidavidorra/create-project
Version:
Interactively create a GitHub project
24 lines • 792 B
JavaScript
import { z } from 'zod';
import { File } from './file.js';
const schema = z.strictObject({
'$schema': z.literal('https://docs.renovatebot.com/renovate-schema.json'),
extends: z.tuple([z.literal('github>vidavidorra/.github')]),
packageRules: z.array(z.record(z.string(), z.unknown())).optional(),
});
class Renovate extends File {
_config;
constructor(path, options) {
super(path, { ...options, format: true });
this._config = schema.parse(JSON.parse(this._content));
}
get config() {
return structuredClone(this._config);
}
process() {
delete this._config.packageRules;
this._content = JSON.stringify(this._config, undefined, 2);
return this;
}
}
export { Renovate };
//# sourceMappingURL=renovate.js.map