From dda85944b8af5233abd186ee7034eaab8e7d0485 Mon Sep 17 00:00:00 2001 From: jrandolf <101637635+jrandolf@users.noreply.github.com> Date: Mon, 19 Sep 2022 12:49:13 +0200 Subject: [PATCH] chore: add licenses (#8978) --- src/common/ElementHandle.ts | 16 ++++++++++++++++ src/common/EventEmitter.ts | 16 ++++++++++++++++ src/common/LazyArg.ts | 16 ++++++++++++++++ src/common/NetworkEventManager.ts | 16 ++++++++++++++++ src/common/WaitTask.ts | 16 ++++++++++++++++ src/compat.d.ts | 16 ++++++++++++++++ src/constants.ts | 16 ++++++++++++++++ src/injected/Poller.ts | 18 +++++++++++++++++- src/injected/TextContent.ts | 16 ++++++++++++++++ src/injected/TextSelector.ts | 16 ++++++++++++++++ src/injected/injected.ts | 18 +++++++++++++++++- src/injected/util.ts | 16 ++++++++++++++++ 12 files changed, 194 insertions(+), 2 deletions(-) diff --git a/src/common/ElementHandle.ts b/src/common/ElementHandle.ts index 8cb19fa0428..39db023d1ba 100644 --- a/src/common/ElementHandle.ts +++ b/src/common/ElementHandle.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2019 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import {Protocol} from 'devtools-protocol'; import {assert} from '../util/assert.js'; import {ExecutionContext} from './ExecutionContext.js'; diff --git a/src/common/EventEmitter.ts b/src/common/EventEmitter.ts index ce78874b436..e7c8015550e 100644 --- a/src/common/EventEmitter.ts +++ b/src/common/EventEmitter.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2022 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import mitt, { Emitter, EventType, diff --git a/src/common/LazyArg.ts b/src/common/LazyArg.ts index e4db8e68da8..c182663a295 100644 --- a/src/common/LazyArg.ts +++ b/src/common/LazyArg.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2022 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + /** * @internal */ diff --git a/src/common/NetworkEventManager.ts b/src/common/NetworkEventManager.ts index 0b0e373fc12..ecea2c2ebd7 100644 --- a/src/common/NetworkEventManager.ts +++ b/src/common/NetworkEventManager.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2022 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import {Protocol} from 'devtools-protocol'; import {HTTPRequest} from './HTTPRequest.js'; diff --git a/src/common/WaitTask.ts b/src/common/WaitTask.ts index 660f2ac3b0f..4a5370e515b 100644 --- a/src/common/WaitTask.ts +++ b/src/common/WaitTask.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2022 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import type {Poller} from '../injected/Poller.js'; import {createDeferredPromise} from '../util/DeferredPromise.js'; import {ElementHandle} from './ElementHandle.js'; diff --git a/src/compat.d.ts b/src/compat.d.ts index 6c330dc078f..9d41b661e96 100644 --- a/src/compat.d.ts +++ b/src/compat.d.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2022 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + declare const puppeteerDirname: string; export {puppeteerDirname}; diff --git a/src/constants.ts b/src/constants.ts index d8e562ccec5..36e64652f99 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2022 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import {dirname} from 'path'; import {puppeteerDirname} from './compat.js'; diff --git a/src/injected/Poller.ts b/src/injected/Poller.ts index 8abf4673721..73d0f1a02bb 100644 --- a/src/injected/Poller.ts +++ b/src/injected/Poller.ts @@ -1,8 +1,24 @@ +/** + * Copyright 2022 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {assert} from '../util/assert.js'; import { createDeferredPromise, DeferredPromise, } from '../util/DeferredPromise.js'; -import {assert} from '../util/assert.js'; /** * @internal diff --git a/src/injected/TextContent.ts b/src/injected/TextContent.ts index 60455cba904..b01fcd4c0ca 100644 --- a/src/injected/TextContent.ts +++ b/src/injected/TextContent.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2022 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + interface NonTrivialValueNode extends Node { value: string; } diff --git a/src/injected/TextSelector.ts b/src/injected/TextSelector.ts index be696bcf49c..90eb1d657b7 100644 --- a/src/injected/TextSelector.ts +++ b/src/injected/TextSelector.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2022 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { createTextContent, isSuitableNodeForTextMatching, diff --git a/src/injected/injected.ts b/src/injected/injected.ts index e7f86d5f393..45cc30ca7ce 100644 --- a/src/injected/injected.ts +++ b/src/injected/injected.ts @@ -1,8 +1,24 @@ +/** + * Copyright 2022 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import {createDeferredPromise} from '../util/DeferredPromise.js'; -import * as util from './util.js'; import * as Poller from './Poller.js'; import * as TextContent from './TextContent.js'; import * as TextSelector from './TextSelector.js'; +import * as util from './util.js'; const PuppeteerUtil = Object.freeze({ ...util, diff --git a/src/injected/util.ts b/src/injected/util.ts index 7895b50e451..94f993f75ed 100644 --- a/src/injected/util.ts +++ b/src/injected/util.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2022 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + const createdFunctions = new Map unknown>(); /**