From 856f57658f025008c4a86882c0ee94788fc99c22 Mon Sep 17 00:00:00 2001 From: Jon Imperiosi Date: Tue, 12 Nov 2024 23:35:27 -0800 Subject: [PATCH] Project import generated by Copybara PiperOrigin-RevId: 696002029 --- _build_update.sh | 50 +++++++++++++++++++++++++++++++++ src/generated/locale-codes.ts | 16 +++++++++++ src/generated/locales/ar.ts | 16 +++++++++++ src/generated/locales/bn.ts | 16 +++++++++++ src/generated/locales/de.ts | 16 +++++++++++ src/generated/locales/es-419.ts | 16 +++++++++++ src/generated/locales/fa.ts | 16 +++++++++++ src/generated/locales/fr.ts | 16 +++++++++++ src/generated/locales/he.ts | 16 +++++++++++ src/generated/locales/hi.ts | 16 +++++++++++ src/generated/locales/id.ts | 16 +++++++++++ src/generated/locales/it.ts | 16 +++++++++++ src/generated/locales/ja.ts | 16 +++++++++++ src/generated/locales/ko.ts | 16 +++++++++++ src/generated/locales/pl.ts | 16 +++++++++++ src/generated/locales/pt-br.ts | 16 +++++++++++ src/generated/locales/ru.ts | 16 +++++++++++ src/generated/locales/th.ts | 16 +++++++++++ src/generated/locales/tr.ts | 16 +++++++++++ src/generated/locales/vi.ts | 16 +++++++++++ src/generated/locales/zh-cn.ts | 16 +++++++++++ src/generated/locales/zh-tw.ts | 16 +++++++++++ 22 files changed, 386 insertions(+) create mode 100755 _build_update.sh diff --git a/_build_update.sh b/_build_update.sh new file mode 100755 index 0000000..6f4229e --- /dev/null +++ b/_build_update.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +CITC=$(g4 g4d) +PACKAGE=third_party/gpt_playground +TEMP=$(mktemp -d) + +ADDLICENSE=~/go/bin/addlicense + +# Exit if the temp directory wasn't created successfully. +if [ ! -e "$TEMP" ]; then + >&2 echo "Failed to create temp directory" + exit 1 +fi + +# Ensure addlicense is installed. +if ! command -v $ADDLICENSE >/dev/null; then + echo "addlicense not installed! Run: go install github.com/google/addlicense@latest." + exit 1 +fi + +cp -r $CITC/$PACKAGE/. $TEMP + +pushd $TEMP +# Update dependencies to the latest semver version. +echo 'Updating dependencies to the latest semver version...' +npx npm-check-updates -u -t semver + +# Address any fixable vulnerabilities (only update lockfile) +echo 'Addressing any fixable vulnerabilities...' +npm audit fix --package-lock-only + +# Install and run tests. +echo 'Installing dependencies and running tests...' +npm install +npm run build && npm run test + +# Clean up unneeded files. +echo 'Cleaning up unneeded files...' +rm -r dist/ +rm -r node_modules/ +find . ! -name "rollup.config.js" -name "*.js" -type f -delete + +# Add license headers +echo 'Adding license headers...' +$ADDLICENSE -l apache -ignore *.sh -ignore BUILD . + +# Copy changes back to google3. +echo 'Build and update complete, copying changes back to google3...' +cp -r . $CITC/$PACKAGE +popd \ No newline at end of file diff --git a/src/generated/locale-codes.ts b/src/generated/locale-codes.ts index 0051d8d..c03f071 100644 --- a/src/generated/locale-codes.ts +++ b/src/generated/locale-codes.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2024 Google LLC + * + * 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. + */ + // Do not modify this file by hand! // Re-generate this file by running lit-localize. diff --git a/src/generated/locales/ar.ts b/src/generated/locales/ar.ts index 3f7ff1b..29a6ba6 100644 --- a/src/generated/locales/ar.ts +++ b/src/generated/locales/ar.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2024 Google LLC + * + * 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. + */ + // Do not modify this file by hand! // Re-generate this file by running lit-localize diff --git a/src/generated/locales/bn.ts b/src/generated/locales/bn.ts index 3f7ff1b..29a6ba6 100644 --- a/src/generated/locales/bn.ts +++ b/src/generated/locales/bn.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2024 Google LLC + * + * 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. + */ + // Do not modify this file by hand! // Re-generate this file by running lit-localize diff --git a/src/generated/locales/de.ts b/src/generated/locales/de.ts index 3f7ff1b..29a6ba6 100644 --- a/src/generated/locales/de.ts +++ b/src/generated/locales/de.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2024 Google LLC + * + * 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. + */ + // Do not modify this file by hand! // Re-generate this file by running lit-localize diff --git a/src/generated/locales/es-419.ts b/src/generated/locales/es-419.ts index 3f7ff1b..29a6ba6 100644 --- a/src/generated/locales/es-419.ts +++ b/src/generated/locales/es-419.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2024 Google LLC + * + * 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. + */ + // Do not modify this file by hand! // Re-generate this file by running lit-localize diff --git a/src/generated/locales/fa.ts b/src/generated/locales/fa.ts index 3f7ff1b..29a6ba6 100644 --- a/src/generated/locales/fa.ts +++ b/src/generated/locales/fa.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2024 Google LLC + * + * 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. + */ + // Do not modify this file by hand! // Re-generate this file by running lit-localize diff --git a/src/generated/locales/fr.ts b/src/generated/locales/fr.ts index 3f7ff1b..29a6ba6 100644 --- a/src/generated/locales/fr.ts +++ b/src/generated/locales/fr.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2024 Google LLC + * + * 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. + */ + // Do not modify this file by hand! // Re-generate this file by running lit-localize diff --git a/src/generated/locales/he.ts b/src/generated/locales/he.ts index 3f7ff1b..29a6ba6 100644 --- a/src/generated/locales/he.ts +++ b/src/generated/locales/he.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2024 Google LLC + * + * 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. + */ + // Do not modify this file by hand! // Re-generate this file by running lit-localize diff --git a/src/generated/locales/hi.ts b/src/generated/locales/hi.ts index 3f7ff1b..29a6ba6 100644 --- a/src/generated/locales/hi.ts +++ b/src/generated/locales/hi.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2024 Google LLC + * + * 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. + */ + // Do not modify this file by hand! // Re-generate this file by running lit-localize diff --git a/src/generated/locales/id.ts b/src/generated/locales/id.ts index 3f7ff1b..29a6ba6 100644 --- a/src/generated/locales/id.ts +++ b/src/generated/locales/id.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2024 Google LLC + * + * 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. + */ + // Do not modify this file by hand! // Re-generate this file by running lit-localize diff --git a/src/generated/locales/it.ts b/src/generated/locales/it.ts index 3f7ff1b..29a6ba6 100644 --- a/src/generated/locales/it.ts +++ b/src/generated/locales/it.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2024 Google LLC + * + * 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. + */ + // Do not modify this file by hand! // Re-generate this file by running lit-localize diff --git a/src/generated/locales/ja.ts b/src/generated/locales/ja.ts index 3f7ff1b..29a6ba6 100644 --- a/src/generated/locales/ja.ts +++ b/src/generated/locales/ja.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2024 Google LLC + * + * 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. + */ + // Do not modify this file by hand! // Re-generate this file by running lit-localize diff --git a/src/generated/locales/ko.ts b/src/generated/locales/ko.ts index 3f7ff1b..29a6ba6 100644 --- a/src/generated/locales/ko.ts +++ b/src/generated/locales/ko.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2024 Google LLC + * + * 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. + */ + // Do not modify this file by hand! // Re-generate this file by running lit-localize diff --git a/src/generated/locales/pl.ts b/src/generated/locales/pl.ts index 3f7ff1b..29a6ba6 100644 --- a/src/generated/locales/pl.ts +++ b/src/generated/locales/pl.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2024 Google LLC + * + * 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. + */ + // Do not modify this file by hand! // Re-generate this file by running lit-localize diff --git a/src/generated/locales/pt-br.ts b/src/generated/locales/pt-br.ts index 3f7ff1b..29a6ba6 100644 --- a/src/generated/locales/pt-br.ts +++ b/src/generated/locales/pt-br.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2024 Google LLC + * + * 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. + */ + // Do not modify this file by hand! // Re-generate this file by running lit-localize diff --git a/src/generated/locales/ru.ts b/src/generated/locales/ru.ts index 3f7ff1b..29a6ba6 100644 --- a/src/generated/locales/ru.ts +++ b/src/generated/locales/ru.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2024 Google LLC + * + * 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. + */ + // Do not modify this file by hand! // Re-generate this file by running lit-localize diff --git a/src/generated/locales/th.ts b/src/generated/locales/th.ts index 3f7ff1b..29a6ba6 100644 --- a/src/generated/locales/th.ts +++ b/src/generated/locales/th.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2024 Google LLC + * + * 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. + */ + // Do not modify this file by hand! // Re-generate this file by running lit-localize diff --git a/src/generated/locales/tr.ts b/src/generated/locales/tr.ts index 3f7ff1b..29a6ba6 100644 --- a/src/generated/locales/tr.ts +++ b/src/generated/locales/tr.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2024 Google LLC + * + * 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. + */ + // Do not modify this file by hand! // Re-generate this file by running lit-localize diff --git a/src/generated/locales/vi.ts b/src/generated/locales/vi.ts index 3f7ff1b..29a6ba6 100644 --- a/src/generated/locales/vi.ts +++ b/src/generated/locales/vi.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2024 Google LLC + * + * 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. + */ + // Do not modify this file by hand! // Re-generate this file by running lit-localize diff --git a/src/generated/locales/zh-cn.ts b/src/generated/locales/zh-cn.ts index 3f7ff1b..29a6ba6 100644 --- a/src/generated/locales/zh-cn.ts +++ b/src/generated/locales/zh-cn.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2024 Google LLC + * + * 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. + */ + // Do not modify this file by hand! // Re-generate this file by running lit-localize diff --git a/src/generated/locales/zh-tw.ts b/src/generated/locales/zh-tw.ts index 3f7ff1b..29a6ba6 100644 --- a/src/generated/locales/zh-tw.ts +++ b/src/generated/locales/zh-tw.ts @@ -1,3 +1,19 @@ +/** + * Copyright 2024 Google LLC + * + * 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. + */ + // Do not modify this file by hand! // Re-generate this file by running lit-localize