Skip to content

Commit

Permalink
chore: Fix License (#609)
Browse files Browse the repository at this point in the history
* chore: Fix Licenses

* chore: Update Author

* chore: type fix
  • Loading branch information
danielbankhead authored Feb 23, 2024
1 parent 5c687ec commit 4026b18
Show file tree
Hide file tree
Showing 13 changed files with 106 additions and 23 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"metadata server",
"metadata"
],
"author": "Stephen Sawchuk",
"author": "Google LLC",
"license": "Apache-2.0",
"dependencies": {
"gaxios": "^6.1.1",
Expand Down
2 changes: 1 addition & 1 deletion samples/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"description": "Samples for the gcp-metadata npm module.",
"license": "MIT",
"license": "Apache-2.0",
"author": "Google LLC",
"engines": {
"node": ">=14"
Expand Down
13 changes: 11 additions & 2 deletions samples/quickstart.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
/**
* Copyright 2018 Google LLC
*
* Distributed under MIT license.
* See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
* 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.
*/

'use strict';
Expand Down
13 changes: 11 additions & 2 deletions samples/test/test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
/**
* Copyright 2018 Google LLC
*
* Distributed under MIT license.
* See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
* 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 {assert} = require('chai');
Expand Down
17 changes: 14 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
/**
* Copyright 2018 Google LLC
*
* Distributed under MIT license.
* See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
* 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 {GaxiosError, GaxiosOptions, GaxiosResponse, request} from 'gaxios';
Expand Down Expand Up @@ -173,7 +182,9 @@ async function fastFailMetadataRequest<T>(
): Promise<GaxiosResponse> {
const secondaryOptions = {
...options,
url: options.url!.replace(getBaseUrl(), getBaseUrl(SECONDARY_HOST_ADDRESS)),
url: options.url
?.toString()
.replace(getBaseUrl(), getBaseUrl(SECONDARY_HOST_ADDRESS)),
};
// We race a connection between DNS/IP to metadata server. There are a couple
// reasons for this:
Expand Down
13 changes: 11 additions & 2 deletions system-test/fixtures/cloudbuild/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
/**
* Copyright 2018 Google LLC
*
* Distributed under MIT license.
* See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
* 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 gcpMetadata = require('gcp-metadata');
Expand Down
2 changes: 1 addition & 1 deletion system-test/fixtures/cloudbuild/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "gcb-test-fixtures",
"private": true,
"main": "index.js",
"license": "MIT",
"license": "Apache-2.0",
"scripts": {
"start": "node index.js"
},
Expand Down
13 changes: 11 additions & 2 deletions system-test/fixtures/hook/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
/**
* Copyright 2018 Google LLC
*
* Distributed under MIT license.
* See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
* 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 gcpMetadata = require('gcp-metadata');
Expand Down
2 changes: 1 addition & 1 deletion system-test/fixtures/hook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "gcf-kitchen-test",
"private": true,
"main": "index.js",
"license": "MIT",
"license": "Apache-2.0",
"engines": {
"node": ">=10"
},
Expand Down
13 changes: 11 additions & 2 deletions system-test/fixtures/kitchen/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
/**
* Copyright 2018 Google LLC
*
* Distributed under MIT license.
* See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
* 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.
*/

/* eslint-disable */
Expand Down
13 changes: 11 additions & 2 deletions system-test/kitchen.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
/**
* Copyright 2018 Google LLC
*
* Distributed under MIT license.
* See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
* 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 {ncp} from 'ncp';
Expand Down
13 changes: 11 additions & 2 deletions system-test/system.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
/**
* Copyright 2018 Google LLC
*
* Distributed under MIT license.
* See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
* 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 * as assert from 'assert';
Expand Down
13 changes: 11 additions & 2 deletions test/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
/**
* Copyright 2018 Google LLC
*
* Distributed under MIT license.
* See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
* 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 * as assert from 'assert';
Expand Down

0 comments on commit 4026b18

Please sign in to comment.