diff --git a/LICENSE b/LICENSE index 272cfcb..d645695 100644 --- a/LICENSE +++ b/LICENSE @@ -1,16 +1,202 @@ -Apache License -Version 2.0, January 2004 -Copyright 2026 ScyllaDB + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -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 + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -http://www.apache.org/licenses/LICENSE-2.0 + 1. Definitions. -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. + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/eslint.config.js b/eslint.config.js index 752882c..6abfb36 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,8 +1,42 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 js from "@eslint/js"; +import licenseHeaderPlugin from "eslint-plugin-license-header"; import globals from "globals"; import tseslint from "typescript-eslint"; const tsFiles = ["src/**/*.ts", "test/**/*.ts", "vitest.config.ts", "vitest.integration.config.ts", "tsup.config.ts"]; +const licenseHeader = [ + "/*", + " * Copyright ScyllaDB, Inc.", + " *", + " * 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.", + " */", +]; export default tseslint.config( { @@ -12,6 +46,15 @@ export default tseslint.config( "node_modules/**", ], }, + { + files: ["**/*.{js,ts}"], + plugins: { + "license-header": licenseHeaderPlugin, + }, + rules: { + "license-header/header": ["error", licenseHeader], + }, + }, { ...js.configs.recommended, files: ["*.js"], diff --git a/package-lock.json b/package-lock.json index 3ef08f3..f3e6bfc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,6 +20,7 @@ "@eslint/js": "^10.0.1", "@types/node": "^24.0.0", "eslint": "^10.5.0", + "eslint-plugin-license-header": "0.9.0", "globals": "^17.7.0", "tsup": "^8.5.1", "typescript": "^6.0.3", @@ -2767,6 +2768,19 @@ } } }, + "node_modules/eslint-plugin-license-header": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-license-header/-/eslint-plugin-license-header-0.9.0.tgz", + "integrity": "sha512-Qd7cCljVC0h+uJjcIuYjpRFrdzwqBBDCi5U0ocr6Bt/5t3zuBkZSa1Igc4lBLEVBDoUUqIcok/UUNAAu6CtwmQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "requireindex": "^1.2.0" + }, + "peerDependencies": { + "eslint": "^9 || ^10" + } + }, "node_modules/eslint-scope": { "version": "9.1.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.2.tgz", @@ -3798,6 +3812,16 @@ "url": "https://paulmillr.com/funding/" } }, + "node_modules/requireindex": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/requireindex/-/requireindex-1.2.0.tgz", + "integrity": "sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.5" + } + }, "node_modules/resolve-from": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", diff --git a/package.json b/package.json index 3d15a68..345d8f4 100644 --- a/package.json +++ b/package.json @@ -80,6 +80,7 @@ "@eslint/js": "^10.0.1", "@types/node": "^24.0.0", "eslint": "^10.5.0", + "eslint-plugin-license-header": "0.9.0", "globals": "^17.7.0", "tsup": "^8.5.1", "typescript": "^6.0.3", diff --git a/src/affinity.ts b/src/affinity.ts index de00b5b..5c88b6d 100644 --- a/src/affinity.ts +++ b/src/affinity.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { AlternatorQueryPlan, firstNodeWithSeed } from "./query-plan.js"; import { murmur3H1 } from "./murmur.js"; import type { diff --git a/src/body.ts b/src/body.ts index 431ad54..58e3fd3 100644 --- a/src/body.ts +++ b/src/body.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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. + */ + export async function bodyToString(body: unknown): Promise { if (body === undefined || body === null) { return ""; diff --git a/src/client-base.ts b/src/client-base.ts index aa66cdf..d15970c 100644 --- a/src/client-base.ts +++ b/src/client-base.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { DescribeTableCommand, DynamoDBClient, diff --git a/src/client-edge.ts b/src/client-edge.ts index a8db254..6bd70d9 100644 --- a/src/client-edge.ts +++ b/src/client-edge.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { AlternatorDynamoDBClientBase } from "./client-base.js"; import { edgeRuntimePlatform } from "./runtime-edge.js"; import type { AlternatorDynamoDBClientConfig } from "./types.js"; diff --git a/src/client.ts b/src/client.ts index b938cb9..dc10f15 100644 --- a/src/client.ts +++ b/src/client.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { AlternatorDynamoDBClientBase } from "./client-base.js"; import { nodeRuntimePlatform } from "./runtime-node.js"; import type { AlternatorDynamoDBClientConfig } from "./types.js"; diff --git a/src/compression-edge.ts b/src/compression-edge.ts index 9e86d74..6850f6c 100644 --- a/src/compression-edge.ts +++ b/src/compression-edge.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { HttpResponse } from "@smithy/protocol-http"; import { bodyToBytes } from "./body.js"; import { diff --git a/src/compression-node.ts b/src/compression-node.ts index 6b1a245..b751a9f 100644 --- a/src/compression-node.ts +++ b/src/compression-node.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { HttpResponse } from "@smithy/protocol-http"; import * as zlib from "node:zlib"; import { bodyToBytes } from "./body.js"; diff --git a/src/compression-shared.ts b/src/compression-shared.ts index 04e4cbd..e5801b6 100644 --- a/src/compression-shared.ts +++ b/src/compression-shared.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { HttpResponse } from "@smithy/protocol-http"; import { bodyToBytes } from "./body.js"; import type { AlternatorResponseCompressionAlgorithm } from "./types.js"; diff --git a/src/compression-types.ts b/src/compression-types.ts index b211a56..4fc2a13 100644 --- a/src/compression-types.ts +++ b/src/compression-types.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { NormalizedRequestCompressionOptions } from "./types.js"; export interface CompressedBody { diff --git a/src/config.ts b/src/config.ts index 15ea7de..8d2d2dc 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { routing } from "./routing.js"; import { normalizeLogger } from "./logger.js"; import { normalizeUserAgent } from "./user-agent.js"; diff --git a/src/discovery.ts b/src/discovery.ts index 2eb05f3..a55b5e4 100644 --- a/src/discovery.ts +++ b/src/discovery.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { HttpRequest } from "@smithy/protocol-http"; import type { HttpHandlerOptions } from "@smithy/types"; import { bodyToString } from "./body.js"; diff --git a/src/document-edge.ts b/src/document-edge.ts index 2c228b6..4fd49dc 100644 --- a/src/document-edge.ts +++ b/src/document-edge.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { DynamoDBClient } from "@aws-sdk/client-dynamodb"; import { DynamoDBDocumentClient, diff --git a/src/document.ts b/src/document.ts index 1a045ed..35d5754 100644 --- a/src/document.ts +++ b/src/document.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { DynamoDBClient } from "@aws-sdk/client-dynamodb"; import { DynamoDBDocumentClient, diff --git a/src/edge.ts b/src/edge.ts index e8534c3..9320d9e 100644 --- a/src/edge.ts +++ b/src/edge.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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. + */ + export { AlternatorDynamoDBClient } from "./client-edge.js"; export { routing } from "./routing.js"; export type { diff --git a/src/index.ts b/src/index.ts index 174fc0e..f07525d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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. + */ + export { AlternatorDynamoDBClient } from "./client.js"; export { routing } from "./routing.js"; export type { AlternatorDynamoDBClientApi } from "./client.js"; diff --git a/src/logger.ts b/src/logger.ts index b4c7006..31a61b1 100644 --- a/src/logger.ts +++ b/src/logger.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { AlternatorLogger } from "./types.js"; export const noopLogger: Required = { diff --git a/src/middleware.ts b/src/middleware.ts index 1233957..6461701 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { HttpRequest } from "@smithy/protocol-http"; import type { FinalizeRequestMiddleware, HandlerExecutionContext } from "@smithy/types"; import { applyResponseEncodingHeaders } from "./compression-shared.js"; diff --git a/src/murmur.ts b/src/murmur.ts index e2b3a8d..9a5fbf0 100644 --- a/src/murmur.ts +++ b/src/murmur.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 MASK_64 = (1n << 64n) - 1n; const SIGN_BIT = 1n << 63n; diff --git a/src/query-plan.ts b/src/query-plan.ts index ba9e205..836344c 100644 --- a/src/query-plan.ts +++ b/src/query-plan.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { AlternatorNode } from "./types.js"; import { SeededRandom } from "./seeded-random.js"; diff --git a/src/routing.ts b/src/routing.ts index a976840..3390dde 100644 --- a/src/routing.ts +++ b/src/routing.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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. + */ + export type AlternatorRoutingScopeKind = "cluster" | "datacenter" | "rack"; export interface AlternatorRoutingFallbackOptions { diff --git a/src/runtime-common.ts b/src/runtime-common.ts index 0443010..ea54657 100644 --- a/src/runtime-common.ts +++ b/src/runtime-common.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { HttpHandler, HttpHandlerUserInput, HttpRequest, HttpResponse } from "@smithy/protocol-http"; import type { HttpHandlerOptions, diff --git a/src/runtime-edge.ts b/src/runtime-edge.ts index 4f15138..8cdd34d 100644 --- a/src/runtime-edge.ts +++ b/src/runtime-edge.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { FetchHttpHandler } from "@smithy/fetch-http-handler"; import type { HttpHandlerUserInput } from "@smithy/protocol-http"; import { compressBody, decompressResponse } from "./compression-edge.js"; diff --git a/src/runtime-node.ts b/src/runtime-node.ts index 2acf7ec..1344f3d 100644 --- a/src/runtime-node.ts +++ b/src/runtime-node.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { NodeHttpHandler } from "@smithy/node-http-handler"; import type { HttpHandler, HttpHandlerUserInput, HttpRequest, HttpResponse } from "@smithy/protocol-http"; import type { diff --git a/src/seeded-random.ts b/src/seeded-random.ts index 1843b03..fb03c4d 100644 --- a/src/seeded-random.ts +++ b/src/seeded-random.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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. + */ + // Seeded lagged Fibonacci generator for key-route affinity. const RNG_LEN = 607; diff --git a/src/types.ts b/src/types.ts index 7f36a37..9f0a67c 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { DynamoDBClientConfig } from "@aws-sdk/client-dynamodb"; import type { FetchHttpHandlerOptions, NodeHttpHandlerOptions } from "@smithy/types"; import type { AlternatorRoutingScope } from "./routing.js"; diff --git a/src/user-agent.ts b/src/user-agent.ts index 4639878..168f1c6 100644 --- a/src/user-agent.ts +++ b/src/user-agent.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { AlternatorUserAgentConfig, AlternatorUserAgentOptions, diff --git a/test/affinity.test.ts b/test/affinity.test.ts index 1fe8eac..0e85b76 100644 --- a/test/affinity.test.ts +++ b/test/affinity.test.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { BatchWriteItemCommand, PutItemCommand } from "@aws-sdk/client-dynamodb"; import { describe, expect, it } from "vitest"; import { hashAttributeValue } from "../src/affinity.js"; diff --git a/test/config.test.ts b/test/config.test.ts index ddadb11..3ff7546 100644 --- a/test/config.test.ts +++ b/test/config.test.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { ListTablesCommand } from "@aws-sdk/client-dynamodb"; import { describe, expect, it } from "vitest"; import { AlternatorDynamoDBClient } from "../src/index.js"; diff --git a/test/discovery.test.ts b/test/discovery.test.ts index 8eb1f5e..cee46a2 100644 --- a/test/discovery.test.ts +++ b/test/discovery.test.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { describe, expect, it } from "vitest"; import { AlternatorDynamoDBClient, routing } from "../src/index.js"; import { AlternatorDynamoDBClient as EdgeAlternatorDynamoDBClient } from "../src/edge.js"; diff --git a/test/document.test.ts b/test/document.test.ts index bb5b1df..b9e49b2 100644 --- a/test/document.test.ts +++ b/test/document.test.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { DynamoDBClient } from "@aws-sdk/client-dynamodb"; import { PutCommand } from "@aws-sdk/lib-dynamodb"; import { describe, expect, it, vi } from "vitest"; diff --git a/test/helpers.ts b/test/helpers.ts index 4fd1da2..b2a310f 100644 --- a/test/helpers.ts +++ b/test/helpers.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { HttpRequest, HttpResponse } from "@smithy/protocol-http"; import type { HttpHandlerOptions } from "@smithy/types"; import { Readable } from "node:stream"; diff --git a/test/integration-test/alternator-client.test.ts b/test/integration-test/alternator-client.test.ts index de7d626..98f7d3f 100644 --- a/test/integration-test/alternator-client.test.ts +++ b/test/integration-test/alternator-client.test.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { GetItemCommand, ListTablesCommand, PutItemCommand } from "@aws-sdk/client-dynamodb"; import { createServer, type Server } from "node:http"; import type { AddressInfo } from "node:net"; diff --git a/test/integration-test/config.ts b/test/integration-test/config.ts index 4294e3f..95bb092 100644 --- a/test/integration-test/config.ts +++ b/test/integration-test/config.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { describe } from "vitest"; import type { AlternatorScheme } from "../../src/index.js"; diff --git a/test/integration-test/dynamodb-operations.test.ts b/test/integration-test/dynamodb-operations.test.ts index 2bae512..b767d95 100644 --- a/test/integration-test/dynamodb-operations.test.ts +++ b/test/integration-test/dynamodb-operations.test.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { DeleteCommand, GetCommand, PutCommand } from "@aws-sdk/lib-dynamodb"; import { DeleteItemCommand, GetItemCommand, PutItemCommand } from "@aws-sdk/client-dynamodb"; import { expect, it } from "vitest"; diff --git a/test/integration-test/helpers.ts b/test/integration-test/helpers.ts index a2c9e9a..30cfb0a 100644 --- a/test/integration-test/helpers.ts +++ b/test/integration-test/helpers.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { CreateTableCommand, DeleteItemCommand, diff --git a/test/integration-test/http-client-implementation.test.ts b/test/integration-test/http-client-implementation.test.ts index 581c61e..c48f5dc 100644 --- a/test/integration-test/http-client-implementation.test.ts +++ b/test/integration-test/http-client-implementation.test.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { ListTablesCommand } from "@aws-sdk/client-dynamodb"; import { NodeHttpHandler } from "@smithy/node-http-handler"; import { Agent as HttpAgent } from "node:http"; diff --git a/test/integration-test/http-connection-reuse.test.ts b/test/integration-test/http-connection-reuse.test.ts index e56ed14..bef6ad2 100644 --- a/test/integration-test/http-connection-reuse.test.ts +++ b/test/integration-test/http-connection-reuse.test.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { ListTablesCommand } from "@aws-sdk/client-dynamodb"; import { expect, it } from "vitest"; import { describeIntegration, integrationEndpoints } from "./config.js"; diff --git a/test/integration-test/internal/connection-pool.test.ts b/test/integration-test/internal/connection-pool.test.ts index 8f70665..d5e5cfb 100644 --- a/test/integration-test/internal/connection-pool.test.ts +++ b/test/integration-test/internal/connection-pool.test.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { ListTablesCommand } from "@aws-sdk/client-dynamodb"; import { expect, it } from "vitest"; import { describeIntegration, integrationEndpoints } from "../config.js"; diff --git a/test/integration-test/key-route-affinity-autodiscovery.test.ts b/test/integration-test/key-route-affinity-autodiscovery.test.ts index 4b11fe2..4da3872 100644 --- a/test/integration-test/key-route-affinity-autodiscovery.test.ts +++ b/test/integration-test/key-route-affinity-autodiscovery.test.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { GetItemCommand, PutItemCommand } from "@aws-sdk/client-dynamodb"; import { expect, it } from "vitest"; import { describeIntegration, integrationEndpoints } from "./config.js"; diff --git a/test/integration-test/tls-config.test.ts b/test/integration-test/tls-config.test.ts index fafa78a..3ba2e17 100644 --- a/test/integration-test/tls-config.test.ts +++ b/test/integration-test/tls-config.test.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { ListTablesCommand, PutItemCommand } from "@aws-sdk/client-dynamodb"; import { expect, it } from "vitest"; import { routing } from "../../src/index.js"; diff --git a/test/integration-test/tls-session-resumption.test.ts b/test/integration-test/tls-session-resumption.test.ts index afee416..f108c0d 100644 --- a/test/integration-test/tls-session-resumption.test.ts +++ b/test/integration-test/tls-session-resumption.test.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { ListTablesCommand } from "@aws-sdk/client-dynamodb"; import { expect, it } from "vitest"; import { routing } from "../../src/index.js"; diff --git a/test/middleware.test.ts b/test/middleware.test.ts index be13d5a..48022b9 100644 --- a/test/middleware.test.ts +++ b/test/middleware.test.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { ListTablesCommand, PutItemCommand, diff --git a/test/query-plan.test.ts b/test/query-plan.test.ts index a36392b..4b92e20 100644 --- a/test/query-plan.test.ts +++ b/test/query-plan.test.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { describe, expect, it, vi } from "vitest"; import { SeededRandom } from "../src/seeded-random.js"; import { AlternatorQueryPlan, firstNodeWithSeed } from "../src/query-plan.js"; diff --git a/test/type-usage.test.ts b/test/type-usage.test.ts index 7a9119d..af71b69 100644 --- a/test/type-usage.test.ts +++ b/test/type-usage.test.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { ListTablesCommand, type ListTablesCommandOutput, diff --git a/tsup.config.ts b/tsup.config.ts index a9a246e..88c61ab 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { defineConfig } from "tsup"; import packageJson from "./package.json" with { type: "json" }; diff --git a/vitest.config.ts b/vitest.config.ts index ee7bf05..3bfe8d9 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { defineConfig } from "vitest/config"; import packageJson from "./package.json" with { type: "json" }; diff --git a/vitest.integration.config.ts b/vitest.integration.config.ts index 14776f5..9833077 100644 --- a/vitest.integration.config.ts +++ b/vitest.integration.config.ts @@ -1,3 +1,19 @@ +/* + * Copyright ScyllaDB, Inc. + * + * 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 { defineConfig } from "vitest/config"; import packageJson from "./package.json" with { type: "json" };