Skip to content

Commit 54189ca

Browse files
chore: emit license header comments (#334)
1 parent 262032f commit 54189ca

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

scripts/protocol-dts-generator.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import type { IProtocol, Protocol as P } from './protocol-schema.d.ts';
44

55

66
// TODO: @noj validate this via https://github.com/andischerer/typescript-json-typesafe against protocol-schema.d.ts
7-
import jsProtocolJson from '../json/js_protocol.json' with { type: 'json' };
8-
import browserProtocolJson from '../json/browser_protocol.json' with { type: 'json' };
7+
import jsProtocolJson from '../json/js_protocol.json' with { type: 'json' };
8+
import browserProtocolJson from '../json/browser_protocol.json' with { type: 'json' };
99

1010

1111
const jsProtocol = jsProtocolJson as IProtocol;
@@ -56,10 +56,14 @@ const emitCloseBlock = (closeChar = '}') => {
5656
}
5757

5858
const emitHeaderComments = () => {
59-
emitLine('/**********************************************************************')
60-
emitLine(' * Auto-generated by protocol-dts-generator.ts, do not edit manually. *')
61-
emitLine(' **********************************************************************/')
62-
emitLine()
59+
emitLine(`// Copyright (c) ${new Date().getFullYear()} The Chromium Authors. All rights reserved.`);
60+
emitLine('// Use of this source code is governed by a BSD-style license that can be');
61+
emitLine('// found in the LICENSE file.');
62+
emitLine();
63+
emitLine('/**********************************************************************');
64+
emitLine(' * Auto-generated by protocol-dts-generator.ts. Do not edit manually. *');
65+
emitLine(' **********************************************************************/');
66+
emitLine();
6367
}
6468

6569
const fixCamelCase = (name: string): string => {
@@ -268,7 +272,7 @@ const emitEvent = (event: P.Event) => {
268272
if (!event.parameters) {
269273
return
270274
}
271-
275+
272276
emitInlineEnumsForEvents(event);
273277
emitLine()
274278
emitTsComment(event)

0 commit comments

Comments
 (0)