initial import for Open Source 🎉

This commit is contained in:
Jimmy Zelinskie 2019-11-12 11:09:47 -05:00
parent 1898c361f3
commit 9c0dd3b722
2048 changed files with 218743 additions and 0 deletions

View file

@ -0,0 +1,8 @@
[
"javascript",
"python",
"bash",
"nginx",
"xml",
"shell"
]

View file

@ -0,0 +1,16 @@
/**
* Configuration data set.
*/
export const INJECTED_CONFIG: any = (<any>window).__config;
/**
* REST API route information.
*/
export const INJECTED_ENDPOINTS: any = (<any>window).__endpoints;
/**
* Features information.
*/
export const INJECTED_FEATURES: any = (<any>window).__features;

View file

@ -0,0 +1,8 @@
/**
* Regex patterns to for validating account names.
*/
export const NAME_PATTERNS: any = {
TEAM_PATTERN: '^[a-z][a-z0-9]+$',
ROBOT_PATTERN: '^[a-z][a-z0-9_]{1,254}$',
USERNAME_PATTERN: '^(?=.{2,255}$)([a-z0-9]+(?:[._-][a-z0-9]+)*)$',
};

View file

@ -0,0 +1,19 @@
/**
* Type representing current browser platform.
* TODO: Add more browser platforms.
*/
export type BrowserPlatform = "firefox"
| "chrome";
/**
* Constant representing current browser platform. Used for determining available features.
* TODO Only rudimentary implementation, should prefer specific feature detection strategies instead.
*/
export const browserPlatform: BrowserPlatform = (() => {
if (navigator.userAgent.toLowerCase().indexOf('firefox') != -1) {
return 'firefox';
}
else {
return 'chrome';
}
})();