Skip to content

Commit 4cff4b0

Browse files
authored
Merge pull request #219 from Open-MBEE/develop
5.0.0
2 parents c978d46 + 3d269e3 commit 4cff4b0

1,028 files changed

Lines changed: 117998 additions & 56411 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#Bundle Builders
2+
src/mms-directives/directives/charts/([a-zA-Z.0-9]*)\.ts
3+
import "./$1";
4+
5+
#Fat Arrow conversion
6+
function\(([a-zA-Z,]*)\)
7+
($1) =>

.00_migration_regex/regex.txt

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
Step 1
2+
(var|const|let)? ?(\$?scope\.)?([a-zA-Z]*) (= )?function? ?(\([A-Za-z, \?]*\))( =>)?
3+
public $2$3
4+
5+
function? ?([a-zA-Z]*) ?(\([A-Za-z, \?]*\))( =>)?
6+
^([^\S\r\n])[\s\t]*function ([_a-zA-Z]*) ?(\([A-Za-z, \?]*\))
7+
public $1$2
8+
9+
Step 2
10+
([a-zA-Z]*)Service\.(?!provider|factory|service)
11+
this.\l$1Svc.
12+
13+
(this\.)?((\$interval|\$http|\$window|\$q|\$timeout|\$uibModal|\$state|\$localStorage|autosaveSvc|growl|hotkeys|rootScopeSvc|eventSvc|edit)(\.|\())
14+
this.$2
15+
16+
function ?(\([0-9a-zA-Z_ ,:]*\))
17+
$1 =>
18+
19+
20+
public $2$3
21+
Region\.prototype\.([a-zA-Z]*) = (\([a-z,]*\)) =>
22+
(width|right|left|top|bottom|height)
23+
([a-zA-Z]*)Service\.(?!provider|factory|service)
24+
function ?(\([a-zA-Z_ ,]*\))
25+
26+
//Services in constructors
27+
([a-zA-Z]*)Service(,?)
28+
private \l$1Svc: $1Service$2
29+
30+
//Angular providers in constructors
31+
(\$)?([a-zA-Z]{2,20})(,?)
32+
private $1$2: angular.I\u$2Service
33+
34+
//Constructor to static $inject
35+
\s*(public|private) (\$)?([a-zA-Z]{2,20}|\$q): [A-Z<>a-z\.]*(,?)\n?
36+
'$2$3'$4
37+
38+
//then convert back to Service formal names
39+
'([a-zA-Z]*)Svc'
40+
'\u$1Service'
41+
42+
//Bindings
43+
([A-Za-z]{2,15}),
44+
$1: "<",\n
45+
46+
: '?"?[@<\?>a-zA-Z]{1,15}'?"?,?
47+
;
48+
49+
50+
this\.(editing|editable|edit|keepMode|editValue)
51+
52+
private ([a-zA-Z]{0,20}) ?:? ?([a-zA-Z$]*)
53+
54+
55+
//Change existing prototypes to instances for callback
56+
( )(public|private)? ([_a-zA-Z]{2,50})(\<[A-Z,]*\>)?(\([\n_A-Za-z:=>\(\), \$\?]*\))(: [| A-Z_a-z]*)? \{
57+
$1$2 $3 = $4$5 => {
58+
59+
For refactoring
60+
((import \{)(, )?(.*)(\} from "@ve-utils/mms-api-client")(;)?\n)?((import \{)(.*), ?(AuthService|CacheService|ElementService|HttpService|PermissionsService|ProjectService|URLService|ViewService)(\n)?(, )?(.*)?(, )?(\} from "@ve-utils/services"))
61+
import \{$4, $10\} from "@ve-utils/mms-api-client";\n$8$9$11$12$14
62+
63+
64+
myStr
65+
angular.module('veDirectives')['_invokeQueue'].forEach(function(value){
66+
var tag = value[2][0].replace(/([A-Z])/g, (g) => `-${g[0].toLowerCase()}`);
67+
console.log(value[1] + ": " + tag);
68+
});
69+
70+
//Module Exports
71+
import ("[A-Za-z./]*";)
72+
export * from $1
73+
74+
75+
(\(|: |, )bootstrap.(?!box|gradient|reset|\$link-|\$breadcrumb-|\$popover-|\$padding-|\$cursor-|\$jumbotron-|\$carousel-|\$badge-|\$close-|\$label-|\$line-|\$input-|\$thumbnail-|\$screen-|\$dropdown-|\$navbar-|\$grid-|\$panel|-\$well|\$alert-|\$progress-|\$list|\$border-|\$zindex|\$icon|\$bootstrap|\$caret|\$font|\$line|\$tooltip|\$btn)(\$)?

.circleci/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
build:
88
docker:
99
# specify the version you desire here
10-
- image: circleci/node:8.11.2-browsers
10+
- image: cimg/node:20.1.0-browsers
1111

1212
# Specify service dependencies here if necessary
1313
# CircleCI maintains a library of pre-built images
@@ -25,11 +25,11 @@ jobs:
2525
# fallback to using the latest cache if no exact match is found
2626
- openmbee-ve-
2727

28-
- run: npm install
28+
- run: yarn install
2929

3030
- save_cache:
3131
paths:
3232
- node_modules
3333
key: openmbee-ve-{{ checksum "package.json" }}
3434

35-
- run: ./node_modules/grunt/bin/grunt #--ARTIFACTORY_URL=https://oss.jfrog.org --ARTIFACTORY_USER=$ARTIFACTORY_USER --ARTIFACTORY_PASSWORD=$ARTIFACTORY_PASSWORD --SNAPSHOT_REPO=oss-snapshot-local --RELEASE_REPO=oss-release-local --GROUP_ID=org.openmbee deploy
35+
- run: VE_ENV=example yarn test

.dockerignore

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
1-
Dockerfile
1+
*
2+
3+
!yarn.lock
4+
!webpack.config.ts
5+
!package.json
6+
!src/
7+
!config/
8+
!tsconfig.json
9+
!lib

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
src/lib/**/*.js
2+
src/ve-extensions/present-plots/*
3+
src/ve-extensions/ts-diagram/*

.eslintrc

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
{
2+
"root": true,
3+
"extends": ["eslint:recommended"],
4+
"env": {
5+
"browser": true,
6+
"es2021": true
7+
},
8+
"parserOptions": {
9+
"ecmaVersion": 12,
10+
"sourceType": "module"
11+
},
12+
"overrides": [
13+
{
14+
"files": ["**/*.ts"],
15+
"settings": {
16+
"import/extensions": [".js", ".ts"],
17+
"import/parsers": {
18+
"@typescript-eslint/parser": [".ts"]
19+
},
20+
"import/resolver": {
21+
"typescript": {
22+
"alwaysCheckTypes": true,
23+
"project": "./tsconfig.json",
24+
"extensions": [".ts", ".tsx"]
25+
},
26+
"node": {
27+
"extensions": [".js", ".jsx", ".ts", ".tsx"],
28+
"moduleDirectory": ["node_modules"]
29+
}
30+
}
31+
},
32+
"parser": "@typescript-eslint/parser",
33+
"parserOptions": {
34+
"project": "./tsconfig.json",
35+
"tsconfigRootDir": "./"
36+
},
37+
"plugins": ["unused-imports"],
38+
"extends": [
39+
"plugin:@typescript-eslint/recommended",
40+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
41+
"plugin:import/errors",
42+
"plugin:import/warnings",
43+
"plugin:import/typescript",
44+
"plugin:prettier/recommended"
45+
],
46+
"rules": {
47+
"@typescript-eslint/no-unused-vars": "off",
48+
"unused-imports/no-unused-imports": "error",
49+
"no-multiple-empty-lines": 2,
50+
"import/newline-after-import": [2],
51+
"@typescript-eslint/explicit-function-return-type": 2,
52+
"@typescript-eslint/no-inferrable-types": [
53+
2,
54+
{
55+
"ignoreProperties": true
56+
}
57+
],
58+
"import/order": [
59+
"error",
60+
{
61+
"newlines-between": "always",
62+
"alphabetize": {
63+
"order": "asc",
64+
"caseInsensitive": true
65+
},
66+
"pathGroups": [
67+
{
68+
"pattern": "@/**",
69+
"group": "external",
70+
"position": "after"
71+
},
72+
{
73+
"pattern": "@ve-app",
74+
"group": "internal",
75+
"position": "after"
76+
},
77+
{
78+
"pattern": "@ve-components",
79+
"group": "internal",
80+
"position": "after"
81+
},
82+
{
83+
"pattern": "@ve-core",
84+
"group": "internal",
85+
"position": "after"
86+
},
87+
{
88+
"pattern": "@ve-utils",
89+
"group": "internal",
90+
"position": "after"
91+
},
92+
{
93+
"pattern": "@ve-types/**",
94+
"group": "type",
95+
"position": "after"
96+
},
97+
{
98+
"pattern": "../../lib/**",
99+
"group": "external",
100+
"position": "after"
101+
}
102+
],
103+
"groups": [
104+
"builtin",
105+
"external",
106+
"internal",
107+
"unknown",
108+
"parent",
109+
"sibling",
110+
"index",
111+
"object",
112+
"type"
113+
]
114+
}
115+
]
116+
}
117+
}
118+
]
119+
}

.github/workflows/codeql.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ "develop", "master" ]
6+
pull_request:
7+
branches: [ "develop" ]
8+
schedule:
9+
- cron: "39 21 * * 4"
10+
11+
jobs:
12+
analyze:
13+
name: Analyze
14+
runs-on: ubuntu-latest
15+
permissions:
16+
actions: read
17+
contents: read
18+
security-events: write
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
language: [ javascript ]
24+
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v3
28+
29+
- name: Initialize CodeQL
30+
uses: github/codeql-action/init@v2
31+
with:
32+
languages: ${{ matrix.language }}
33+
queries: +security-and-quality
34+
35+
- name: Autobuild
36+
uses: github/codeql-action/autobuild@v2
37+
38+
- name: Perform CodeQL Analysis
39+
uses: github/codeql-action/analyze@v2
40+
with:
41+
category: "/language:${{ matrix.language }}"

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ build
77
dist
88
deploy
99
docs
10-
app/bower_components
11-
app/bower_components_target
10+
/app/*
1211
.sass-cache
1312
.idea
1413
PhantomJS_*
1514
Chrome_*
1615
test-results/
1716
angular-mms-grunt-servers.json
17+
venv
18+
.vscode

.prettierrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// prettier.config.js or .prettierrc.js
2+
module.exports = {
3+
trailingComma: 'es5',
4+
tabWidth: 4,
5+
singleQuote: true,
6+
printWidth: 120,
7+
}

.stylelintrc.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"extends": "stylelint-config-standard-scss",
3+
"rules": {
4+
"selector-type-no-unknown": [true, {
5+
"ignore": [
6+
"custom-types"
7+
]
8+
}],
9+
"no-duplicate-selectors": null,
10+
"no-descending-specificity": null,
11+
"scss/at-extend-no-missing-placeholder": null,
12+
"max-line-length": null,
13+
"declaration-block-no-duplicate-properties": null,
14+
"function-linear-gradient-no-nonstandard-direction": null
15+
}
16+
}

0 commit comments

Comments
 (0)