@legalplace/tagextractor 2.1.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +2 -0
- package/.eslintrc +2 -58
- package/CHANGELOG.md +17 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/libs/Extractor.d.ts +5 -5
- package/dist/libs/Extractor.js +99 -100
- package/dist/libs/Extractor.test.d.ts +1 -0
- package/dist/libs/Extractor.test.js +274 -0
- package/dist/libs/fixtures/inputs.json +60 -0
- package/dist/libs/fixtures/model.json +291 -0
- package/dist/libs/fixtures/ovc.json +15 -0
- package/dist/libs/fixtures/references.json +946 -0
- package/jest.config.ts +205 -0
- package/package.json +25 -22
- package/setupJest.ts +8 -0
- package/src/index.ts +4 -4
- package/src/libs/Extractor.test.ts +360 -0
- package/src/libs/Extractor.ts +127 -72
- package/src/libs/fixtures/inputs.json +60 -0
- package/src/libs/fixtures/model.json +291 -0
- package/src/libs/fixtures/ovc.json +15 -0
- package/src/libs/fixtures/references.json +946 -0
- package/src/types/tags.type.ts +15 -15
- package/tsconfig.json +21 -8
- package/.gitlab-ci.yml +0 -43
- package/.prettierrc.js +0 -10
- package/tsconfig.eslint.json +0 -12
package/src/types/tags.type.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
interface TagsType {
|
|
2
|
-
options: Record<string, OptionTagType[]
|
|
3
|
-
variables: Record<string, VariableTagType[]
|
|
2
|
+
options: Record<string, OptionTagType[]>;
|
|
3
|
+
variables: Record<string, VariableTagType[]>;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
export interface OptionTagType {
|
|
7
|
-
id: number
|
|
8
|
-
index: number
|
|
9
|
-
label: string
|
|
10
|
-
condition: boolean
|
|
11
|
-
visible: boolean
|
|
12
|
-
value: boolean
|
|
7
|
+
id: number;
|
|
8
|
+
index: number;
|
|
9
|
+
label: string;
|
|
10
|
+
condition: boolean;
|
|
11
|
+
visible: boolean;
|
|
12
|
+
value: boolean;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export interface VariableTagType {
|
|
16
|
-
id: number
|
|
17
|
-
index: number
|
|
18
|
-
label: string
|
|
19
|
-
condition: boolean
|
|
20
|
-
visible: boolean
|
|
21
|
-
value: string | number
|
|
16
|
+
id: number;
|
|
17
|
+
index: number;
|
|
18
|
+
label: string;
|
|
19
|
+
condition: boolean;
|
|
20
|
+
visible: boolean;
|
|
21
|
+
value: string | number;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
export default TagsType
|
|
24
|
+
export default TagsType;
|
package/tsconfig.json
CHANGED
|
@@ -1,16 +1,29 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
2
|
+
"extends": "../../tsconfig.json",
|
|
3
3
|
"compilerOptions": {
|
|
4
|
-
"target": "
|
|
4
|
+
"target": "es2019",
|
|
5
5
|
"module": "commonjs",
|
|
6
|
-
"
|
|
7
|
-
"
|
|
6
|
+
"outDir": "dist",
|
|
7
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
8
8
|
"strict": true,
|
|
9
|
-
"typeRoots": ["node_modules/@types"],
|
|
9
|
+
"typeRoots": ["node_modules/@types", "../../node_modules/@types"],
|
|
10
|
+
"useUnknownInCatchVariables": false,
|
|
10
11
|
"esModuleInterop": true,
|
|
11
12
|
"removeComments": true,
|
|
12
|
-
"declaration": true
|
|
13
|
+
"declaration": true,
|
|
14
|
+
"allowJs": true,
|
|
15
|
+
"skipLibCheck": true,
|
|
16
|
+
"allowSyntheticDefaultImports": true,
|
|
17
|
+
"forceConsistentCasingInFileNames": true,
|
|
18
|
+
"moduleResolution": "node",
|
|
19
|
+
"resolveJsonModule": true,
|
|
20
|
+
"isolatedModules": true,
|
|
21
|
+
"jsx": "react",
|
|
22
|
+
"noImplicitAny": true,
|
|
23
|
+
"noImplicitThis": true,
|
|
24
|
+
"noFallthroughCasesInSwitch": true,
|
|
25
|
+
"types": ["jest", "jest-fetch-mock"]
|
|
13
26
|
},
|
|
14
27
|
"include": ["src"],
|
|
15
|
-
"exclude": ["node_modules"]
|
|
16
|
-
}
|
|
28
|
+
"exclude": ["**/node_modules", "*.test.ts"]
|
|
29
|
+
}
|
package/.gitlab-ci.yml
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
image: 148253454541.dkr.ecr.eu-west-1.amazonaws.com/legalplace:latest
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
stages:
|
|
5
|
-
- setup
|
|
6
|
-
- publish
|
|
7
|
-
|
|
8
|
-
before_script:
|
|
9
|
-
- export PATH=$PATH:./node_modules/.bin/
|
|
10
|
-
|
|
11
|
-
variables:
|
|
12
|
-
DOCKER_DRIVER: overlay2
|
|
13
|
-
|
|
14
|
-
setup:
|
|
15
|
-
stage: setup
|
|
16
|
-
artifacts:
|
|
17
|
-
paths:
|
|
18
|
-
- dist/
|
|
19
|
-
only:
|
|
20
|
-
changes:
|
|
21
|
-
- yarn.lock
|
|
22
|
-
- package.json
|
|
23
|
-
- .gitlab-ci.yml
|
|
24
|
-
script:
|
|
25
|
-
- yarn -v
|
|
26
|
-
- node -v
|
|
27
|
-
- yarn install --frozen-lockfile --check-files --silent
|
|
28
|
-
- yarn build
|
|
29
|
-
|
|
30
|
-
publish:
|
|
31
|
-
stage: publish
|
|
32
|
-
except:
|
|
33
|
-
variables:
|
|
34
|
-
- $CI_COMMIT_MESSAGE =~ /skip-publish/
|
|
35
|
-
script:
|
|
36
|
-
- npm publish
|
|
37
|
-
environment:
|
|
38
|
-
name: development
|
|
39
|
-
only:
|
|
40
|
-
refs:
|
|
41
|
-
- master
|
|
42
|
-
changes:
|
|
43
|
-
- package.json
|
package/.prettierrc.js
DELETED
package/tsconfig.eslint.json
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
// extend your base config so you don't have to redefine your compilerOptions
|
|
3
|
-
"extends": "./tsconfig.json",
|
|
4
|
-
"include": [
|
|
5
|
-
"src/**/*.ts",
|
|
6
|
-
"*.ts",
|
|
7
|
-
// etc
|
|
8
|
-
|
|
9
|
-
// if you have a mixed JS/TS codebase, don't forget to include your JS files
|
|
10
|
-
"src/**/*.js"
|
|
11
|
-
]
|
|
12
|
-
}
|