Initial i18n commit
This commit is contained in:
136
.drone.yml
Normal file
136
.drone.yml
Normal file
@@ -0,0 +1,136 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: Test Pipeline
|
||||
|
||||
workspace:
|
||||
path: /drone/auth
|
||||
|
||||
steps:
|
||||
- name: yarn install
|
||||
image: node:20-bullseye-slim
|
||||
environment:
|
||||
YARN_VERSION: 3.5.0
|
||||
commands:
|
||||
- yarn set version stable
|
||||
- yarn install
|
||||
volumes:
|
||||
- name: yarnrc
|
||||
path: /drone/auth/.yarnrc.yml
|
||||
- name: Code Style Checks
|
||||
image: node:latest
|
||||
commands:
|
||||
- yarn prettier
|
||||
- name: Lint
|
||||
image: node:latest
|
||||
commands:
|
||||
- yarn lint
|
||||
- name: Unit Tests
|
||||
image: node:latest
|
||||
commands:
|
||||
- yarn test
|
||||
- name: Send Test Status Notification
|
||||
image: plugins/webhook
|
||||
settings:
|
||||
urls: https://lab.mifi.dev/hooks/9p65zpagctgkmndo8nwwm4199r
|
||||
content_type: application/json
|
||||
template: |
|
||||
{
|
||||
"icon_url":"https://emojipedia-us.s3.dualstack.us-west-1.amazonaws.com/thumbs/120/apple/198/freezing-face_1f976.png",
|
||||
"text": "[{{ repo.name }} - Build # {{ build.number }}] Code Quality Checks {{ build.status }} {{#success build.status}}:tada:{{else}}:poop:{{/success}}",
|
||||
"username":"DroneBot"
|
||||
}
|
||||
when:
|
||||
status:
|
||||
- success
|
||||
- failure
|
||||
- name: Build
|
||||
image: node:latest
|
||||
commands:
|
||||
- yarn build:production
|
||||
- name: Send Build Status Notifications
|
||||
image: plugins/webhook
|
||||
settings:
|
||||
urls: https://lab.mifi.dev/hooks/9p65zpagctgkmndo8nwwm4199r
|
||||
content_type: application/json
|
||||
template: |
|
||||
{
|
||||
"icon_url":"https://emojipedia-us.s3.dualstack.us-west-1.amazonaws.com/thumbs/120/apple/198/freezing-face_1f976.png",
|
||||
"text": "[{{ repo.name }} - Build # {{ build.number }}] Build package {{ build.status }} {{#success build.status}}:tada:{{else}}:poop:{{/success}}",
|
||||
"username":"DroneBot"
|
||||
}
|
||||
when:
|
||||
status:
|
||||
- success
|
||||
- failure
|
||||
|
||||
volumes:
|
||||
- name: yarnrc
|
||||
host:
|
||||
path: /volume1/docker/.yarnrc.yml
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- main
|
||||
- develop
|
||||
event:
|
||||
- pull_request
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: Publish Pipeline
|
||||
|
||||
workspace:
|
||||
path: /drone/auth
|
||||
|
||||
steps:
|
||||
- name: Build
|
||||
image: node:20-bullseye-slim
|
||||
environment:
|
||||
YARN_VERSION: 3.5.0
|
||||
commands:
|
||||
- yarn set version stable
|
||||
- yarn install
|
||||
- yarn build:production
|
||||
volumes:
|
||||
- name: yarnrc
|
||||
path: /drone/auth/.yarnrc.yml
|
||||
- name: Publish NPM
|
||||
image: node:20-bullseye-slim
|
||||
commands:
|
||||
- yarn npm publish
|
||||
volumes:
|
||||
- name: npmrc
|
||||
path: /drone/auth/.npmrc
|
||||
- name: yarnrc
|
||||
path: /drone/auth/.yarnrc.yml
|
||||
- name: Report NPM Publish Status
|
||||
image: plugins/webhook
|
||||
settings:
|
||||
urls: https://lab.mifi.dev/hooks/ccw34hdf7tgbjmzp96nptn938r
|
||||
content_type: application/json
|
||||
template: |
|
||||
{
|
||||
"icon_url":"https://emojipedia-us.s3.dualstack.us-west-1.amazonaws.com/thumbs/120/apple/198/freezing-face_1f976.png",
|
||||
"text": "[{{ repo.name }} - New npm package release {{tag}} from # {{ build.number }}] Deploy {{ build.status }} {{#success build.status}}:tada:{{else}}:poop:{{/success}}",
|
||||
"username":"DroneBot"
|
||||
}
|
||||
when:
|
||||
status:
|
||||
- success
|
||||
- failure
|
||||
|
||||
volumes:
|
||||
- name: npmrc
|
||||
host:
|
||||
path: /volume1/docker/beethoven/labs-auth/.npmrc
|
||||
- name: yarnrc
|
||||
host:
|
||||
path: /volume1/docker/.yarnrc.yml
|
||||
|
||||
depends_on:
|
||||
- Test Pipeline
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- tag
|
||||
19
.eslintrc.js
Normal file
19
.eslintrc.js
Normal file
@@ -0,0 +1,19 @@
|
||||
/* eslint-env node */
|
||||
module.exports = {
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'plugin:import/errors',
|
||||
'plugin:prettier/recommended',
|
||||
'prettier',
|
||||
],
|
||||
parser: '@typescript-eslint/parser',
|
||||
plugins: ['@typescript-eslint'],
|
||||
settings: {
|
||||
'import/parsers': {
|
||||
'@typescript-eslint/parser': ['.ts', '.tsx'],
|
||||
},
|
||||
'import/resolver': 'typescript',
|
||||
},
|
||||
root: true,
|
||||
};
|
||||
135
.gitignore
vendored
Normal file
135
.gitignore
vendored
Normal file
@@ -0,0 +1,135 @@
|
||||
# ---> Node
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
lerna-debug.log*
|
||||
.pnpm-debug.log*
|
||||
|
||||
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
*.lcov
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# Bower dependency directory (https://bower.io/)
|
||||
bower_components
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
jspm_packages/
|
||||
|
||||
# Snowpack dependency directory (https://snowpack.dev/)
|
||||
web_modules/
|
||||
|
||||
# TypeScript cache
|
||||
*.tsbuildinfo
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
|
||||
# Optional stylelint cache
|
||||
.stylelintcache
|
||||
|
||||
# Microbundle cache
|
||||
.rpt2_cache/
|
||||
.rts2_cache_cjs/
|
||||
.rts2_cache_es/
|
||||
.rts2_cache_umd/
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
# Output of 'npm pack'
|
||||
*.tgz
|
||||
|
||||
# Yarn Integrity file
|
||||
.yarn-integrity
|
||||
|
||||
# dotenv environment variable files
|
||||
.env
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
.env.local
|
||||
|
||||
# parcel-bundler cache (https://parceljs.org/)
|
||||
.cache
|
||||
.parcel-cache
|
||||
|
||||
# Next.js build output
|
||||
.next
|
||||
out
|
||||
|
||||
# Nuxt.js build / generate output
|
||||
.nuxt
|
||||
dist
|
||||
|
||||
# Gatsby files
|
||||
.cache/
|
||||
# Comment in the public line in if your project uses Gatsby and not Next.js
|
||||
# https://nextjs.org/blog/next-9-1#public-directory-support
|
||||
# public
|
||||
|
||||
# vuepress build output
|
||||
.vuepress/dist
|
||||
|
||||
# vuepress v2.x temp and cache directory
|
||||
.temp
|
||||
.cache
|
||||
|
||||
# Docusaurus cache and generated files
|
||||
.docusaurus
|
||||
|
||||
# Serverless directories
|
||||
.serverless/
|
||||
|
||||
# FuseBox cache
|
||||
.fusebox/
|
||||
|
||||
# DynamoDB Local files
|
||||
.dynamodb/
|
||||
|
||||
# TernJS port file
|
||||
.tern-port
|
||||
|
||||
# Stores VSCode versions used for testing VSCode extensions
|
||||
.vscode-test
|
||||
|
||||
# yarn v2
|
||||
.yarn/cache
|
||||
.yarn/unplugged
|
||||
.yarn/build-state.yml
|
||||
.yarn/install-state.gz
|
||||
.pnp.*
|
||||
|
||||
# Project
|
||||
lib/
|
||||
.yarnrc.yml
|
||||
10
.npmignore
Normal file
10
.npmignore
Normal file
@@ -0,0 +1,10 @@
|
||||
.build.yarnrc.yml
|
||||
.drone.yml
|
||||
.eslintrc*
|
||||
.npmrc
|
||||
.prettierrc*
|
||||
.yarnrc.yml
|
||||
babel.config.*
|
||||
jest.config.*
|
||||
tsconfig*.json
|
||||
tslint.json
|
||||
7
.prettierrc.js
Normal file
7
.prettierrc.js
Normal file
@@ -0,0 +1,7 @@
|
||||
module.exports = {
|
||||
parser: 'typescript',
|
||||
printWidth: 120,
|
||||
trailingComma: 'all',
|
||||
tabWidth: 4,
|
||||
singleQuote: true,
|
||||
};
|
||||
873
.yarn/releases/yarn-3.5.1.cjs
vendored
Executable file
873
.yarn/releases/yarn-3.5.1.cjs
vendored
Executable file
File diff suppressed because one or more lines are too long
195
jest.config.ts
Normal file
195
jest.config.ts
Normal file
@@ -0,0 +1,195 @@
|
||||
/*
|
||||
* For a detailed explanation regarding each configuration property and type check, visit:
|
||||
* https://jestjs.io/docs/configuration
|
||||
*/
|
||||
|
||||
export default {
|
||||
// All imported modules in your tests should be mocked automatically
|
||||
// automock: false,
|
||||
|
||||
// Stop running tests after `n` failures
|
||||
// bail: 0,
|
||||
|
||||
// The directory where Jest should store its cached dependency information
|
||||
// cacheDirectory: "/private/var/folders/75/3cyx0pq133n7gk3ysqf0mj4r0000gn/T/jest_dx",
|
||||
|
||||
// Automatically clear mock calls, instances, contexts and results before every test
|
||||
clearMocks: true,
|
||||
|
||||
// Indicates whether the coverage information should be collected while executing the test
|
||||
collectCoverage: true,
|
||||
|
||||
// An array of glob patterns indicating a set of files for which coverage information should be collected
|
||||
// collectCoverageFrom: undefined,
|
||||
|
||||
// The directory where Jest should output its coverage files
|
||||
coverageDirectory: 'coverage',
|
||||
|
||||
// An array of regexp pattern strings used to skip coverage collection
|
||||
// coveragePathIgnorePatterns: [
|
||||
// "/node_modules/"
|
||||
// ],
|
||||
|
||||
// Indicates which provider should be used to instrument code for coverage
|
||||
// coverageProvider: "babel",
|
||||
|
||||
// A list of reporter names that Jest uses when writing coverage reports
|
||||
// coverageReporters: [
|
||||
// "json",
|
||||
// "text",
|
||||
// "lcov",
|
||||
// "clover"
|
||||
// ],
|
||||
|
||||
// An object that configures minimum threshold enforcement for coverage results
|
||||
// coverageThreshold: undefined,
|
||||
|
||||
// A path to a custom dependency extractor
|
||||
// dependencyExtractor: undefined,
|
||||
|
||||
// Make calling deprecated APIs throw helpful error messages
|
||||
// errorOnDeprecated: false,
|
||||
|
||||
// The default configuration for fake timers
|
||||
// fakeTimers: {
|
||||
// "enableGlobally": false
|
||||
// },
|
||||
|
||||
// Force coverage collection from ignored files using an array of glob patterns
|
||||
// forceCoverageMatch: [],
|
||||
|
||||
// A path to a module which exports an async function that is triggered once before all test suites
|
||||
// globalSetup: undefined,
|
||||
|
||||
// A path to a module which exports an async function that is triggered once after all test suites
|
||||
// globalTeardown: undefined,
|
||||
|
||||
// A set of global variables that need to be available in all test environments
|
||||
// globals: {},
|
||||
|
||||
// The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.
|
||||
// maxWorkers: "50%",
|
||||
|
||||
// An array of directory names to be searched recursively up from the requiring module's location
|
||||
// moduleDirectories: [
|
||||
// "node_modules"
|
||||
// ],
|
||||
|
||||
// An array of file extensions your modules use
|
||||
// moduleFileExtensions: [
|
||||
// "js",
|
||||
// "mjs",
|
||||
// "cjs",
|
||||
// "jsx",
|
||||
// "ts",
|
||||
// "tsx",
|
||||
// "json",
|
||||
// "node"
|
||||
// ],
|
||||
|
||||
// A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
|
||||
// moduleNameMapper: {},
|
||||
|
||||
// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
|
||||
// modulePathIgnorePatterns: [],
|
||||
|
||||
// Activates notifications for test results
|
||||
// notify: false,
|
||||
|
||||
// An enum that specifies notification mode. Requires { notify: true }
|
||||
// notifyMode: "failure-change",
|
||||
|
||||
// A preset that is used as a base for Jest's configuration
|
||||
// preset: undefined,
|
||||
|
||||
// Run tests from one or more projects
|
||||
// projects: undefined,
|
||||
|
||||
// Use this configuration option to add custom reporters to Jest
|
||||
// reporters: undefined,
|
||||
|
||||
// Automatically reset mock state before every test
|
||||
// resetMocks: false,
|
||||
|
||||
// Reset the module registry before running each individual test
|
||||
// resetModules: false,
|
||||
|
||||
// A path to a custom resolver
|
||||
// resolver: undefined,
|
||||
|
||||
// Automatically restore mock state and implementation before every test
|
||||
// restoreMocks: false,
|
||||
|
||||
// The root directory that Jest should scan for tests and modules within
|
||||
// rootDir: undefined,
|
||||
|
||||
// A list of paths to directories that Jest should use to search for files in
|
||||
// roots: [
|
||||
// "<rootDir>"
|
||||
// ],
|
||||
|
||||
// Allows you to use a custom runner instead of Jest's default test runner
|
||||
// runner: "jest-runner",
|
||||
|
||||
// The paths to modules that run some code to configure or set up the testing environment before each test
|
||||
// setupFiles: [],
|
||||
|
||||
// A list of paths to modules that run some code to configure or set up the testing framework before each test
|
||||
// setupFilesAfterEnv: [],
|
||||
|
||||
// The number of seconds after which a test is considered as slow and reported as such in the results.
|
||||
// slowTestThreshold: 5,
|
||||
|
||||
// A list of paths to snapshot serializer modules Jest should use for snapshot testing
|
||||
// snapshotSerializers: [],
|
||||
|
||||
// The test environment that will be used for testing
|
||||
// testEnvironment: "jest-environment-node",
|
||||
|
||||
// Options that will be passed to the testEnvironment
|
||||
// testEnvironmentOptions: {},
|
||||
|
||||
// Adds a location field to test results
|
||||
// testLocationInResults: false,
|
||||
|
||||
// The glob patterns Jest uses to detect test files
|
||||
// testMatch: [
|
||||
// "**/__tests__/**/*.[jt]s?(x)",
|
||||
// "**/?(*.)+(spec|test).[tj]s?(x)"
|
||||
// ],
|
||||
|
||||
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
|
||||
// testPathIgnorePatterns: [
|
||||
// "/node_modules/"
|
||||
// ],
|
||||
|
||||
// The regexp pattern or array of patterns that Jest uses to detect test files
|
||||
// testRegex: [],
|
||||
|
||||
// This option allows the use of a custom results processor
|
||||
// testResultsProcessor: undefined,
|
||||
|
||||
// This option allows use of a custom test runner
|
||||
// testRunner: "jest-circus/runner",
|
||||
|
||||
// A map from regular expressions to paths to transformers
|
||||
// transform: undefined,
|
||||
|
||||
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
|
||||
// transformIgnorePatterns: [
|
||||
// "/node_modules/",
|
||||
// "\\.pnp\\.[^\\/]+$"
|
||||
// ],
|
||||
|
||||
// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
|
||||
// unmockedModulePathPatterns: undefined,
|
||||
|
||||
// Indicates whether each individual test should be reported during the run
|
||||
// verbose: undefined,
|
||||
|
||||
// An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode
|
||||
// watchPathIgnorePatterns: [],
|
||||
|
||||
// Whether to use watchman for file crawling
|
||||
// watchman: true,
|
||||
};
|
||||
47
package.json
Normal file
47
package.json
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"name": "@mifi/i18n-common",
|
||||
"version": "0.0.1",
|
||||
"author": "mifi (Mike Fitzpatrick)",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"build:production": "tsc -p ./tsconfig.production.json",
|
||||
"format": "prettier:fix && lint:fix",
|
||||
"lint": "eslint --ext .ts,.tsx src/",
|
||||
"lint:fix": "eslint --fix --ext .ts,.tsx src/",
|
||||
"prettier": "prettier --check 'src/**/*.ts'",
|
||||
"prettier:fix": "prettier --write 'src/**/*.ts'",
|
||||
"test": "jest --passWithNoTests ./src"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.21.8",
|
||||
"@babel/preset-env": "^7.21.5",
|
||||
"@babel/preset-typescript": "^7.21.5",
|
||||
"@tsconfig/node16": "^1.0.4",
|
||||
"@types/jest": "^29.5.1",
|
||||
"@types/luxon": "^3.3.2",
|
||||
"@types/node": "^20.2.3",
|
||||
"@typescript-eslint/eslint-plugin": "^5.59.2",
|
||||
"@typescript-eslint/parser": "^5.59.2",
|
||||
"babel-jest": "^29.5.0",
|
||||
"eslint": "^8.39.0",
|
||||
"eslint-config-prettier": "^8.8.0",
|
||||
"eslint-import-resolver-typescript": "^3.5.5",
|
||||
"eslint-plugin-import": "^2.27.5",
|
||||
"eslint-plugin-n": "^15.0.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"eslint-plugin-promise": "^6.0.0",
|
||||
"jest": "^29.5.0",
|
||||
"prettier": "^2.8.4",
|
||||
"prettier-eslint": "^15.0.1",
|
||||
"prettier-eslint-cli": "^7.1.0",
|
||||
"ts-node": "^10.9.1",
|
||||
"typescript": "^4.9.5"
|
||||
},
|
||||
"description": "",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://git.mifi.dev/mifi/i18n-common.git"
|
||||
},
|
||||
"packageManager": "yarn@3.5.1"
|
||||
}
|
||||
247
src/constants/country.enum.ts
Normal file
247
src/constants/country.enum.ts
Normal file
@@ -0,0 +1,247 @@
|
||||
export enum Country {
|
||||
AF = 'Afghanistan',
|
||||
AL = 'Albania',
|
||||
AX = 'Aland Islands',
|
||||
DZ = 'Algeria',
|
||||
AS = 'American Samoa',
|
||||
AD = 'Andorra',
|
||||
AO = 'Angola',
|
||||
AI = 'Anguilla',
|
||||
AQ = 'Antarctica',
|
||||
AG = 'Antigua & Barbuda',
|
||||
AR = 'Argentina',
|
||||
AM = 'Armenia',
|
||||
AW = 'Aruba',
|
||||
AU = 'Australia',
|
||||
AT = 'Austria',
|
||||
AZ = 'Azerbaijan',
|
||||
BS = 'Bahamas',
|
||||
BH = 'Bahrain',
|
||||
BD = 'Bangladesh',
|
||||
BB = 'Barbados',
|
||||
BY = 'Belarus',
|
||||
BE = 'Belgium',
|
||||
BZ = 'Belize',
|
||||
BJ = 'Benin',
|
||||
BM = 'Bermuda',
|
||||
BT = 'Bhutan',
|
||||
BO = 'Bolivia',
|
||||
BQ = 'Bonaire Sint Eustatius Saba',
|
||||
BA = 'Bosnia Herzegovina',
|
||||
BW = 'Botswana',
|
||||
BR = 'Brazil',
|
||||
IO = 'British Indian Ocean Territory',
|
||||
BN = 'Brunei',
|
||||
BG = 'Bulgaria',
|
||||
BF = 'Burkina Faso',
|
||||
BI = 'Burundi',
|
||||
KH = 'Cambodia',
|
||||
CM = 'Cameroon',
|
||||
CA = 'Canada',
|
||||
CV = 'Cape Verde',
|
||||
KY = 'Cayman Islands',
|
||||
CF = 'Central African Republic',
|
||||
TD = 'Chad',
|
||||
CL = 'Chile',
|
||||
CN = 'Republic of China',
|
||||
CX = 'Christmas Island',
|
||||
CC = 'Cocos Keeling Islands',
|
||||
CO = 'Colombia',
|
||||
KM = 'Comoros',
|
||||
CD = 'Democratic Republic of the Congo',
|
||||
CK = 'CookIslands',
|
||||
CR = 'Costa Rica',
|
||||
CI = "Cote D'Ivoire",
|
||||
HR = 'Croatia',
|
||||
CU = 'Cuba',
|
||||
CW = 'Curaçao',
|
||||
CY = 'Cyprus',
|
||||
CZ = 'Czech Republic',
|
||||
DK = 'Denmark',
|
||||
DJ = 'Djibouti',
|
||||
DM = 'Dominica',
|
||||
DO = 'Dominican Republic',
|
||||
EC = 'Ecuador',
|
||||
EG = 'Egypt',
|
||||
SV = 'El Salvador',
|
||||
GQ = 'Equatorial Guinea',
|
||||
ER = 'Eritrea',
|
||||
EE = 'Estonia',
|
||||
ET = 'Ethiopia',
|
||||
FK = 'Falkland Islands',
|
||||
FO = 'Faroe Islands',
|
||||
FJ = 'Fiji',
|
||||
FI = 'Finland',
|
||||
FR = 'France',
|
||||
GF = 'French Guiana',
|
||||
FP = 'French Polynesia',
|
||||
TF = 'French Southern Territories',
|
||||
GA = 'Gabon',
|
||||
GM = 'The Gambia',
|
||||
GE = 'Georgia',
|
||||
DE = 'Germany',
|
||||
GH = 'Ghana',
|
||||
GI = 'Gibraltar',
|
||||
GR = 'Greece',
|
||||
GL = 'Greenland',
|
||||
GD = 'Grenada',
|
||||
GP = 'Guadeloupe',
|
||||
GU = 'Guam',
|
||||
GT = 'Guatemala',
|
||||
GG = 'Guernsey',
|
||||
GN = 'Guinea',
|
||||
GW = 'Guinea-Bissau',
|
||||
GY = 'Guyana',
|
||||
HT = 'Haiti',
|
||||
HM = 'Heard Island/Mcdonald Islands',
|
||||
VA = 'Holy See Vatican City State',
|
||||
HN = 'Honduras',
|
||||
HK = 'Hong Kong',
|
||||
HU = 'Hungary',
|
||||
IS = 'Iceland',
|
||||
IN = 'India',
|
||||
ID = 'Indonesia',
|
||||
IR = 'Iran',
|
||||
IQ = 'Iraq',
|
||||
IE = 'Republic of Ireland',
|
||||
IM = 'Isle of Man',
|
||||
IL = 'Israel',
|
||||
IT = 'Italy',
|
||||
JM = 'Jamaica',
|
||||
JP = 'Japan',
|
||||
JE = 'Jersey',
|
||||
JO = 'Jordan',
|
||||
KZ = 'Kazakhstan',
|
||||
KE = 'Kenya',
|
||||
KI = 'Kiribati',
|
||||
KP = 'North Korea',
|
||||
KR = 'South Korea',
|
||||
XK = 'Kosovo',
|
||||
KW = 'Kuwait',
|
||||
KG = 'Kyrgyzstan',
|
||||
LA = 'Laos',
|
||||
LV = 'Latvia',
|
||||
LB = 'Lebanon',
|
||||
LS = 'Lesotho',
|
||||
LR = 'Liberia',
|
||||
LY = 'Libya',
|
||||
LI = 'Liechtenstein',
|
||||
LT = 'Lithuania',
|
||||
LU = 'Luxembourg',
|
||||
MO = 'Macao',
|
||||
MK = 'Macedonia',
|
||||
MG = 'Madagascar',
|
||||
MW = 'Malawi',
|
||||
MY = 'Malaysia',
|
||||
MV = 'Maldives',
|
||||
ML = 'Mali',
|
||||
MT = 'Malta',
|
||||
MH = 'Marshall Islands',
|
||||
MQ = 'Martinique',
|
||||
MR = 'Mauritania',
|
||||
MU = 'Mauritius',
|
||||
MX = 'Mexico',
|
||||
FM = 'Micronesia',
|
||||
MD = 'Moldova',
|
||||
MC = 'Monaco',
|
||||
MN = 'Mongolia',
|
||||
ME = 'Montenegro',
|
||||
MS = 'Montserrat',
|
||||
MA = 'Morocco',
|
||||
MZ = 'Mozambique',
|
||||
MM = 'Myanmar',
|
||||
NA = 'Namibia',
|
||||
NR = 'Nauru',
|
||||
NP = 'Nepal',
|
||||
NL = 'Netherlands',
|
||||
NC = 'New Caledonia',
|
||||
NZ = 'New Zealand',
|
||||
NI = 'Nicaragua',
|
||||
NE = 'Niger',
|
||||
NG = 'Nigeria',
|
||||
NU = 'Niue',
|
||||
NF = 'Norfolk Island',
|
||||
MP = 'Northern Mariana Islands',
|
||||
NO = 'Norway',
|
||||
OM = 'Oman',
|
||||
PK = 'Pakistan',
|
||||
PW = 'Palau',
|
||||
PS = 'Palestinian Territory',
|
||||
PA = 'Panama',
|
||||
PG = 'Papua New Guinea',
|
||||
PY = 'Paraguay',
|
||||
PE = 'Peru',
|
||||
PH = 'Philippines',
|
||||
PL = 'Poland',
|
||||
PT = 'Portugal',
|
||||
PR = 'Puerto Rico',
|
||||
QA = 'Qatar',
|
||||
RE = 'Reunion',
|
||||
RO = 'Romania',
|
||||
RU = 'Russian Federation',
|
||||
RW = 'Rwanda',
|
||||
BL = 'Saint Barthelemy',
|
||||
SH = 'Saint Helena',
|
||||
KN = 'Saint Kitts and Nevis',
|
||||
LC = 'Saint Lucia',
|
||||
MF = 'Saint Martin',
|
||||
PM = 'Saint Pierre and Miquelon',
|
||||
VC = 'Saint Vincent and Grenadines',
|
||||
WS = 'Samoa',
|
||||
SM = 'San Marino',
|
||||
ST = 'Sao Tome & Principe',
|
||||
SA = 'Saudi Arabia',
|
||||
SN = 'Senegal',
|
||||
RS = 'Serbia',
|
||||
SC = 'Seychelles',
|
||||
SL = 'Sierra Leone',
|
||||
SG = 'Singapore',
|
||||
SX = 'Sint Maarten',
|
||||
SK = 'Slovakia',
|
||||
SI = 'Slovenia',
|
||||
SB = 'Solomon Islands',
|
||||
SO = 'Somalia',
|
||||
ZA = 'South Africa',
|
||||
GS = 'South Georgia and Sandwich Islands',
|
||||
SS = 'South Sudan',
|
||||
ES = 'Spain',
|
||||
LK = 'Sri Lanka',
|
||||
SD = 'Sudan',
|
||||
SR = 'Suriname',
|
||||
SZ = 'Swaziland',
|
||||
SE = 'Sweden',
|
||||
CH = 'Switzerland',
|
||||
SY = 'Syria',
|
||||
TW = 'Taiwan',
|
||||
TJ = 'Tajikistan',
|
||||
TZ = 'Tanzania',
|
||||
TH = 'Thailand',
|
||||
TL = 'Timor Leste',
|
||||
TG = 'Togo',
|
||||
TK = 'Tokelau',
|
||||
TO = 'Tonga',
|
||||
TT = 'Trinidad & Tobago',
|
||||
TN = 'Tunisia',
|
||||
TR = 'Turkey',
|
||||
TM = 'Turkmenistan',
|
||||
TC = 'Turks and Caicos Islands',
|
||||
TV = 'Tuvalu',
|
||||
UG = 'Uganda',
|
||||
UA = 'Ukraine',
|
||||
AE = 'United Arab Emirates',
|
||||
GB = 'United Kingdom',
|
||||
US = 'United States of America',
|
||||
UM = 'United States Outlying Islands',
|
||||
UY = 'Uruguay',
|
||||
UZ = 'Uzbekistan',
|
||||
VU = 'Vanuatu',
|
||||
VE = 'Venezuela',
|
||||
VN = 'Vietnam',
|
||||
VG = 'VirginIslandsBritish',
|
||||
VI = 'VirginIslandsUS',
|
||||
WF = 'WallisAndFutuna',
|
||||
EH = 'WesternSahara',
|
||||
YE = 'Yemen',
|
||||
ZM = 'Zambia',
|
||||
ZW = 'Zimbabwe',
|
||||
}
|
||||
15
src/constants/regions/ca.enum.ts
Normal file
15
src/constants/regions/ca.enum.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
export enum CA {
|
||||
AB = 'Alberta',
|
||||
BC = 'British Columbia',
|
||||
MB = 'Manitoba',
|
||||
NB = 'New Brunswick',
|
||||
NL = 'Newfoundland and Labrador',
|
||||
NS = 'Nova Scotia',
|
||||
ON = 'Ontario',
|
||||
PE = 'Prince Edward Island',
|
||||
QC = 'Québec',
|
||||
SK = 'Saskatchewan',
|
||||
NT = 'Northwest Territories',
|
||||
NU = 'Nunavut',
|
||||
YT = 'Yukon',
|
||||
}
|
||||
61
src/constants/regions/us.enum.ts
Normal file
61
src/constants/regions/us.enum.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
export enum US {
|
||||
AL = 'Alabama',
|
||||
AK = 'Alaska',
|
||||
AS = 'American Samoa',
|
||||
AZ = 'Arizona',
|
||||
AR = 'Arkansas',
|
||||
CA = 'California',
|
||||
CO = 'Colorado',
|
||||
CT = 'Connecticut',
|
||||
DE = 'Delaware',
|
||||
DC = 'District of Columbia',
|
||||
FM = 'Federated States of Micronesia',
|
||||
FL = 'Florida',
|
||||
GA = 'Georgia',
|
||||
GU = 'Guam',
|
||||
HI = 'Hawaii',
|
||||
ID = 'Idaho',
|
||||
IL = 'Illinois',
|
||||
IN = 'Indiana',
|
||||
IA = 'Iowa',
|
||||
KS = 'Kansas',
|
||||
KY = 'Kentucky',
|
||||
LA = 'Louisiana',
|
||||
ME = 'Maine',
|
||||
MD = 'Maryland',
|
||||
MH = 'Marshall Islands',
|
||||
MA = 'Massachusetts',
|
||||
MI = 'Michigan',
|
||||
MN = 'Minnesota',
|
||||
MS = 'Mississippi',
|
||||
MO = 'Missouri',
|
||||
MT = 'Montana',
|
||||
NE = 'Nebraska',
|
||||
NV = 'Nevada',
|
||||
NH = 'New Hampshire',
|
||||
NJ = 'New Jersey',
|
||||
NM = 'New Mexico',
|
||||
NY = 'New York',
|
||||
NC = 'North Carolina',
|
||||
ND = 'North Dakota',
|
||||
MP = 'Northern Mariana Islands',
|
||||
OH = 'Ohio',
|
||||
OK = 'Oklahoma',
|
||||
OR = 'Oregon',
|
||||
PW = 'Palau',
|
||||
PA = 'Pennsylvania',
|
||||
PR = 'Puerto Rico',
|
||||
RI = 'Rhode Island',
|
||||
SC = 'South Carolina',
|
||||
SD = 'South Dakota',
|
||||
TN = 'Tennessee',
|
||||
TX = 'Texas',
|
||||
UT = 'Utah',
|
||||
VT = 'Vermont',
|
||||
VI = 'Virgin Islands',
|
||||
VA = 'Virginia',
|
||||
WA = 'Washington',
|
||||
WV = 'West Virginia',
|
||||
WI = 'Wisconsin',
|
||||
WY = 'Wyoming',
|
||||
}
|
||||
25
tsconfig.json
Normal file
25
tsconfig.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
// "extends": "@tsconfig/node16/tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"allowJs": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"declaration": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"esModuleInterop": true,
|
||||
"experimentalDecorators": true,
|
||||
"jsx": "react",
|
||||
"lib": ["es2022", "dom"],
|
||||
"moduleResolution": "node",
|
||||
"noImplicitAny": true,
|
||||
"noImplicitReturns": true,
|
||||
"noImplicitThis": true,
|
||||
"outDir": "lib/",
|
||||
"removeComments": false,
|
||||
"rootDirs": ["./", "src/"],
|
||||
"sourceMap": true,
|
||||
"strict": true,
|
||||
"strictNullChecks": true,
|
||||
"target": "es2017"
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
24
tsconfig.production.json
Normal file
24
tsconfig.production.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"allowJs": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"declaration": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"esModuleInterop": true,
|
||||
"experimentalDecorators": true,
|
||||
"jsx": "react",
|
||||
"lib": ["es2022", "dom"],
|
||||
"moduleResolution": "node",
|
||||
"noImplicitAny": true,
|
||||
"noImplicitReturns": true,
|
||||
"noImplicitThis": true,
|
||||
"outDir": "lib/",
|
||||
"removeComments": false,
|
||||
"rootDirs": ["./", "src/"],
|
||||
"sourceMap": true,
|
||||
"strict": true,
|
||||
"strictNullChecks": true,
|
||||
"target": "es2017"
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
Reference in New Issue
Block a user