-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* version 5.0.2 * contributing
- Loading branch information
Showing
8 changed files
with
88 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import requests | ||
import re | ||
|
||
# Function to fetch and process regions | ||
def fetch_and_process_regions(custom_regions=None): | ||
# Step 1: Fetch the raw content of the file from the URL | ||
url = "https://raw.githubusercontent.com/oracle/oci-typescript-sdk/refs/heads/master/lib/common/lib/region.ts" | ||
response = requests.get(url) | ||
file_content = response.text | ||
|
||
# Step 2: Find all lines that contain 'Region.register' | ||
matches = re.findall(r'Region\.register\("([^"]+)"', file_content) | ||
|
||
# Step 3: Sort the matches and remove duplicates | ||
unique_sorted_matches = sorted(set(matches)) | ||
|
||
# Step 4: Add custom regions (if provided) | ||
if custom_regions: | ||
unique_sorted_matches.extend(custom_regions) | ||
unique_sorted_matches = sorted(set(unique_sorted_matches)) # Remove duplicates after adding custom regions | ||
|
||
# Step 5: Format the result to mimic the output of the original command | ||
regions = ', '.join([f"'{match}'" for match in unique_sorted_matches]) | ||
regions = f"export const regions = [{regions}]" | ||
|
||
# Step 6: Write the result to the file 'regionlist.ts' | ||
with open('./src/regionlist.ts', 'w') as file: | ||
file.write(regions) | ||
|
||
print("Result successfully written to './src/regionlist.ts'") | ||
|
||
# Example usage with custom regions | ||
custom_regions = ['ap-silverdale-1', 'ap-hobsonville-1'] # Define custom regions here | ||
fetch_and_process_regions(custom_regions) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const regions = ['af-johannesburg-1', 'ap-chiyoda-1', 'ap-chuncheon-1', 'ap-dcc-canberra-1', 'ap-dcc-gazipur-1', 'ap-hobsonville-1', 'ap-hyderabad-1', 'ap-ibaraki-1', 'ap-melbourne-1', 'ap-mumbai-1', 'ap-osaka-1', 'ap-seoul-1', 'ap-silverdale-1', 'ap-singapore-1', 'ap-singapore-2', 'ap-sydney-1', 'ap-tokyo-1', 'ca-montreal-1', 'ca-toronto-1', 'eu-amsterdam-1', 'eu-crissier-1', 'eu-dcc-dublin-1', 'eu-dcc-dublin-2', 'eu-dcc-milan-1', 'eu-dcc-milan-2', 'eu-dcc-rating-1', 'eu-dcc-rating-2', 'eu-dcc-zurich-1', 'eu-frankfurt-1', 'eu-frankfurt-2', 'eu-jovanovac-1', 'eu-madrid-1', 'eu-madrid-2', 'eu-marseille-1', 'eu-milan-1', 'eu-paris-1', 'eu-stockholm-1', 'eu-zurich-1', 'il-jerusalem-1', 'me-abudhabi-1', 'me-abudhabi-2', 'me-abudhabi-3', 'me-abudhabi-4', 'me-dcc-doha-1', 'me-dcc-muscat-1', 'me-dubai-1', 'me-jeddah-1', 'me-riyadh-1', 'mx-monterrey-1', 'mx-queretaro-1', 'sa-bogota-1', 'sa-santiago-1', 'sa-saopaulo-1', 'sa-valparaiso-1', 'sa-vinhedo-1', 'uk-cardiff-1', 'uk-gov-cardiff-1', 'uk-gov-london-1', 'uk-london-1', 'us-ashburn-1', 'us-chicago-1', 'us-gov-ashburn-1', 'us-gov-chicago-1', 'us-gov-phoenix-1', 'us-langley-1', 'us-luke-1', 'us-phoenix-1', 'us-saltlake-2', 'us-sanjose-1', 'us-somerset-1', 'us-thames-1'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1346,13 +1346,13 @@ | |
dependencies: | ||
tslib "^2.4.0" | ||
|
||
"@grafana/[email protected].5", "@grafana/data@^10.4.0": | ||
version "10.4.5" | ||
resolved "https://registry.yarnpkg.com/@grafana/data/-/data-10.4.5.tgz#86a4d46a27097343ab97d6cf9c5ea8b918f07479" | ||
integrity sha512-SYyaPTKIO3p4MoS0PvZ+bIW7Q8EHYbu/czQENyk0/rFmodfBzcJA0AVuafFBY0T4oCQENFHfmhM9q7209B3oOw== | ||
"@grafana/[email protected].10", "@grafana/data@^10.4.10": | ||
version "10.4.10" | ||
resolved "https://registry.yarnpkg.com/@grafana/data/-/data-10.4.10.tgz#5c323efa44e788a6f6dadab4471c62e06d47a0a5" | ||
integrity sha512-s8IU8qtuxLht1l4FuxOHMXx16BTKfzr1G7w92etRYfi+DTEcXfP1g2rBcihoOcPpXZ/2uVWvZJmH0FeWFsvdLw== | ||
dependencies: | ||
"@braintree/sanitize-url" "7.0.0" | ||
"@grafana/schema" "10.4.5" | ||
"@grafana/schema" "10.4.10" | ||
"@types/d3-interpolate" "^3.0.0" | ||
"@types/string-hash" "1.1.3" | ||
d3-interpolate "3.0.1" | ||
|
@@ -1377,10 +1377,10 @@ | |
uplot "1.6.30" | ||
xss "^1.0.14" | ||
|
||
"@grafana/[email protected].5": | ||
version "10.4.5" | ||
resolved "https://registry.yarnpkg.com/@grafana/e2e-selectors/-/e2e-selectors-10.4.5.tgz#e6ac31c97c03567e8eb723f91e70e38646a0dd23" | ||
integrity sha512-BsFll+sCs8riIVDHzqZswDFmDdt5Mt0yqcDqc3FuQqyv5Lm0PLtoWCzVkadk3AJ74sxlXvC0pb/mtb5e+KaZTA== | ||
"@grafana/[email protected].10": | ||
version "10.4.10" | ||
resolved "https://registry.yarnpkg.com/@grafana/e2e-selectors/-/e2e-selectors-10.4.10.tgz#ca5b9522a4206432a50c4e0a5f900a34956d8288" | ||
integrity sha512-ZDFPc1x6NpdpynwCNvba+HfybWYPbgdi5WqpjXPEPyGsLg7/LyaPokuQtLBY/StYoQ4AsSD522IADjKJlMutWQ== | ||
dependencies: | ||
"@grafana/tsconfig" "^1.2.0-rc1" | ||
tslib "2.6.2" | ||
|
@@ -1417,27 +1417,27 @@ | |
ua-parser-js "^1.0.32" | ||
web-vitals "^4.0.1" | ||
|
||
"@grafana/runtime@^10.4.0": | ||
version "10.4.5" | ||
resolved "https://registry.yarnpkg.com/@grafana/runtime/-/runtime-10.4.5.tgz#704f3ab08624d1da7de003798c61a2a1aa4da641" | ||
integrity sha512-C+AAVz6T7g4TRmNHK/G0vmkJQ/i33tHNnsNg1wS6gzeSv6Jqu/xmDrws/wIe8oDBS5Asf68fXfyrrSnPs1KpyQ== | ||
"@grafana/runtime@^10.4.10": | ||
version "10.4.10" | ||
resolved "https://registry.yarnpkg.com/@grafana/runtime/-/runtime-10.4.10.tgz#31f087f8ff447e2dbe32f6c163bd80246ac5b7d1" | ||
integrity sha512-97OqYMk/epuQBfAi3RUNDfjJkUPDP8ls0gs/CbDVx7+yQVHnENjYKCq9rkkdsoEpK5STcpcPZwBo2G6umFyw8Q== | ||
dependencies: | ||
"@grafana/data" "10.4.5" | ||
"@grafana/e2e-selectors" "10.4.5" | ||
"@grafana/data" "10.4.10" | ||
"@grafana/e2e-selectors" "10.4.10" | ||
"@grafana/faro-web-sdk" "^1.3.6" | ||
"@grafana/schema" "10.4.5" | ||
"@grafana/ui" "10.4.5" | ||
"@grafana/schema" "10.4.10" | ||
"@grafana/ui" "10.4.10" | ||
history "4.10.1" | ||
lodash "4.17.21" | ||
rxjs "7.8.1" | ||
systemjs "6.14.3" | ||
systemjs-cjs-extra "0.2.0" | ||
tslib "2.6.2" | ||
|
||
"@grafana/[email protected].5", "@grafana/schema@^10.4.0": | ||
version "10.4.5" | ||
resolved "https://registry.yarnpkg.com/@grafana/schema/-/schema-10.4.5.tgz#e496cc5e247f58f4eb6e908b0ba156f96a9f886a" | ||
integrity sha512-Qi8GuMk5X8J+cIe18JZpU1QpagEeu+BdES97FmHXmBIR69i+sGebjzwH9NN++cjZZvq+x8tvXUxOpLL84VnYsg== | ||
"@grafana/[email protected].10", "@grafana/schema@^10.4.10": | ||
version "10.4.10" | ||
resolved "https://registry.yarnpkg.com/@grafana/schema/-/schema-10.4.10.tgz#058c9385910a2d93f4a5b1bd9fc40e26d57506b6" | ||
integrity sha512-CHL/YqLiUzvGXbQzbzY5URX2SUpioXscZ62+SUz38W/pRB4jErfvUNXL8YQGtTxnISjsS4I3ZGvWt8DWwZQgzg== | ||
dependencies: | ||
tslib "2.6.2" | ||
|
||
|
@@ -1446,18 +1446,18 @@ | |
resolved "https://registry.yarnpkg.com/@grafana/tsconfig/-/tsconfig-1.2.0-rc1.tgz#10973c978ec95b0ea637511254b5f478bce04de7" | ||
integrity sha512-+SgQeBQ1pT6D/E3/dEdADqTrlgdIGuexUZ8EU+8KxQFKUeFeU7/3z/ayI2q/wpJ/Kr6WxBBNlrST6aOKia19Ag== | ||
|
||
"@grafana/[email protected].5", "@grafana/ui@^10.4.0": | ||
version "10.4.5" | ||
resolved "https://registry.yarnpkg.com/@grafana/ui/-/ui-10.4.5.tgz#3780cdef9774dfb7b09cf051d61329c08be635dd" | ||
integrity sha512-BO9GTjm8AeXk+rgOYSaQ4XvRJ3otPRtHbQhIJ9D96ZFpYPbbLHno5DBOPazKcp3ukiW7SA72ymgDRbpcdND18Q== | ||
"@grafana/[email protected].10", "@grafana/ui@^10.4.10": | ||
version "10.4.10" | ||
resolved "https://registry.yarnpkg.com/@grafana/ui/-/ui-10.4.10.tgz#5884ae4cb4f077b9e2c8d7f0468dcbc4a8f83b9d" | ||
integrity sha512-2bdT7pyOZF2n+YCdI0M0UTjERh9attimGWdx4UuLfjAQ4ZPerhAA9YUuSZewyPx7VmZL2M6g+/LB8fGZMNMOKQ== | ||
dependencies: | ||
"@emotion/css" "11.11.2" | ||
"@emotion/react" "11.11.3" | ||
"@floating-ui/react" "0.26.9" | ||
"@grafana/data" "10.4.5" | ||
"@grafana/e2e-selectors" "10.4.5" | ||
"@grafana/data" "10.4.10" | ||
"@grafana/e2e-selectors" "10.4.10" | ||
"@grafana/faro-web-sdk" "^1.3.6" | ||
"@grafana/schema" "10.4.5" | ||
"@grafana/schema" "10.4.10" | ||
"@leeoniya/ufuzzy" "1.0.14" | ||
"@monaco-editor/react" "4.6.0" | ||
"@popperjs/core" "2.11.8" | ||
|
@@ -9205,10 +9205,10 @@ update-browserslist-db@^1.1.0: | |
escalade "^3.1.2" | ||
picocolors "^1.0.1" | ||
|
||
[email protected].30: | ||
version "1.6.30" | ||
resolved "https://registry.yarnpkg.com/uplot/-/uplot-1.6.30.tgz#1622a96b7cb2e50622c74330823c321847cbc147" | ||
integrity sha512-48oVVRALM/128ttW19F2a2xobc2WfGdJ0VJFX00099CfqbCTuML7L2OrTKxNzeFP34eo1+yJbqFSoFAp2u28/Q== | ||
[email protected].31: | ||
version "1.6.31" | ||
resolved "https://registry.yarnpkg.com/uplot/-/uplot-1.6.31.tgz#092a4b586590e9794b679e1df885a15584b03698" | ||
integrity sha512-sQZqSwVCbJGnFB4IQjQYopzj5CoTZJ4Br1fG/xdONimqgHmsacvCjNesdGDypNKFbrhLGIeshYhy89FxPF+H+w== | ||
|
||
uri-js@^4.2.2: | ||
version "4.4.1" | ||
|