Skip to content

Commit c8749a7

Browse files
chore: Fix License (#609)
* chore: Fix Licenses * chore: Update Author * chore: type fix
1 parent a1d8005 commit c8749a7

12 files changed

Lines changed: 95 additions & 21 deletions

File tree

core/packages/gcp-metadata/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"metadata server",
3535
"metadata"
3636
],
37-
"author": "Stephen Sawchuk",
37+
"author": "Google LLC",
3838
"license": "Apache-2.0",
3939
"dependencies": {
4040
"gaxios": "^6.1.1",

core/packages/gcp-metadata/samples/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"description": "Samples for the gcp-metadata npm module.",
3-
"license": "MIT",
3+
"license": "Apache-2.0",
44
"author": "Google LLC",
55
"engines": {
66
"node": ">=14"

core/packages/gcp-metadata/samples/quickstart.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
/**
22
* Copyright 2018 Google LLC
33
*
4-
* Distributed under MIT license.
5-
* See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
615
*/
716

817
'use strict';

core/packages/gcp-metadata/src/index.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
/**
22
* Copyright 2018 Google LLC
33
*
4-
* Distributed under MIT license.
5-
* See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
615
*/
716

817
import {GaxiosError, GaxiosOptions, GaxiosResponse, request} from 'gaxios';
@@ -173,7 +182,9 @@ async function fastFailMetadataRequest<T>(
173182
): Promise<GaxiosResponse> {
174183
const secondaryOptions = {
175184
...options,
176-
url: options.url!.replace(getBaseUrl(), getBaseUrl(SECONDARY_HOST_ADDRESS)),
185+
url: options.url
186+
?.toString()
187+
.replace(getBaseUrl(), getBaseUrl(SECONDARY_HOST_ADDRESS)),
177188
};
178189
// We race a connection between DNS/IP to metadata server. There are a couple
179190
// reasons for this:

core/packages/gcp-metadata/system-test/fixtures/cloudbuild/index.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
/**
22
* Copyright 2018 Google LLC
33
*
4-
* Distributed under MIT license.
5-
* See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
615
*/
716

817
const gcpMetadata = require('gcp-metadata');

core/packages/gcp-metadata/system-test/fixtures/cloudbuild/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "gcb-test-fixtures",
33
"private": true,
44
"main": "index.js",
5-
"license": "MIT",
5+
"license": "Apache-2.0",
66
"scripts": {
77
"start": "node index.js"
88
},

core/packages/gcp-metadata/system-test/fixtures/hook/index.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
/**
22
* Copyright 2018 Google LLC
33
*
4-
* Distributed under MIT license.
5-
* See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
615
*/
716

817
const gcpMetadata = require('gcp-metadata');

core/packages/gcp-metadata/system-test/fixtures/hook/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "gcf-kitchen-test",
33
"private": true,
44
"main": "index.js",
5-
"license": "MIT",
5+
"license": "Apache-2.0",
66
"engines": {
77
"node": ">=10"
88
},

core/packages/gcp-metadata/system-test/fixtures/kitchen/src/index.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
/**
22
* Copyright 2018 Google LLC
33
*
4-
* Distributed under MIT license.
5-
* See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
615
*/
716

817
/* eslint-disable */

core/packages/gcp-metadata/system-test/kitchen.test.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
/**
22
* Copyright 2018 Google LLC
33
*
4-
* Distributed under MIT license.
5-
* See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
615
*/
716

817
import {ncp} from 'ncp';

0 commit comments

Comments
 (0)