@centreon/js-config 24.8.0 → 24.8.2
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/biome/base.json +224 -0
- package/cypress/e2e/commands.ts +17 -10
- package/cypress/e2e/configuration.ts +1 -0
- package/cypress/e2e/plugins.ts +0 -1
- package/package.json +8 -8
package/biome/base.json
ADDED
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
{
|
|
2
|
+
"formatter": {
|
|
3
|
+
"enabled": true,
|
|
4
|
+
"indentStyle": "space",
|
|
5
|
+
"formatWithErrors": false
|
|
6
|
+
},
|
|
7
|
+
"organizeImports": {
|
|
8
|
+
"enabled": true
|
|
9
|
+
},
|
|
10
|
+
"linter": {
|
|
11
|
+
"enabled": true,
|
|
12
|
+
"rules": {
|
|
13
|
+
"recommended": true,
|
|
14
|
+
"a11y": {
|
|
15
|
+
"noSvgWithoutTitle": "off"
|
|
16
|
+
},
|
|
17
|
+
"complexity": {
|
|
18
|
+
"noBannedTypes": "off",
|
|
19
|
+
"noForEach": "off"
|
|
20
|
+
},
|
|
21
|
+
"correctness": {
|
|
22
|
+
"noUnusedImports": "error",
|
|
23
|
+
"noUnusedVariables": "error",
|
|
24
|
+
"useExhaustiveDependencies": "off"
|
|
25
|
+
},
|
|
26
|
+
"nursery": {
|
|
27
|
+
"noConsole": "error",
|
|
28
|
+
"noRestrictedImports": {
|
|
29
|
+
"level": "error",
|
|
30
|
+
"options": {
|
|
31
|
+
"paths": {
|
|
32
|
+
"lodash": "Using lodash is not encouraged.",
|
|
33
|
+
"moment": "Using moment is not encouraged."
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"noUnknownFunction": "error",
|
|
38
|
+
"noUnknownProperty": "error",
|
|
39
|
+
"noUnknownUnit": "error"
|
|
40
|
+
},
|
|
41
|
+
"suspicious": {
|
|
42
|
+
"useAwait": "error"
|
|
43
|
+
},
|
|
44
|
+
"performance": {
|
|
45
|
+
"noAccumulatingSpread": "off"
|
|
46
|
+
},
|
|
47
|
+
"style": {
|
|
48
|
+
"useLiteralEnumMembers": "off",
|
|
49
|
+
"useImportType": "off",
|
|
50
|
+
"noNamespace": "error",
|
|
51
|
+
"noNamespaceImport": "error",
|
|
52
|
+
"useFragmentSyntax": "error",
|
|
53
|
+
"useFilenamingConvention": {
|
|
54
|
+
"level": "error",
|
|
55
|
+
"options": {
|
|
56
|
+
"strictCase": false,
|
|
57
|
+
"filenameCases": [
|
|
58
|
+
"camelCase",
|
|
59
|
+
"PascalCase",
|
|
60
|
+
"kebab-case"
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"useNamingConvention": {
|
|
65
|
+
"level": "error",
|
|
66
|
+
"options": {
|
|
67
|
+
"strictCase": false,
|
|
68
|
+
"conventions": [
|
|
69
|
+
{
|
|
70
|
+
"formats": [
|
|
71
|
+
"camelCase",
|
|
72
|
+
"PascalCase"
|
|
73
|
+
],
|
|
74
|
+
"selector": {
|
|
75
|
+
"kind": "variable"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"selector": {
|
|
80
|
+
"kind": "interface"
|
|
81
|
+
},
|
|
82
|
+
"formats": [
|
|
83
|
+
"PascalCase"
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"selector": {
|
|
88
|
+
"kind": "enum"
|
|
89
|
+
},
|
|
90
|
+
"formats": [
|
|
91
|
+
"PascalCase"
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"selector": {
|
|
96
|
+
"kind": "objectLiteralProperty"
|
|
97
|
+
},
|
|
98
|
+
"match": ".*"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"match": "_(.*)|([a-zA-Z].*)",
|
|
102
|
+
"selector": {
|
|
103
|
+
"kind": "functionParameter"
|
|
104
|
+
},
|
|
105
|
+
"formats": [
|
|
106
|
+
"snake_case",
|
|
107
|
+
"PascalCase",
|
|
108
|
+
"camelCase"
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"match": ".*",
|
|
113
|
+
"formats": [
|
|
114
|
+
"snake_case",
|
|
115
|
+
"camelCase",
|
|
116
|
+
"PascalCase",
|
|
117
|
+
"CONSTANT_CASE"
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"noRestrictedGlobals": {
|
|
124
|
+
"level": "error",
|
|
125
|
+
"options": {
|
|
126
|
+
"deniedGlobals": [
|
|
127
|
+
"isFinite",
|
|
128
|
+
"isNaN",
|
|
129
|
+
"addEventListener",
|
|
130
|
+
"blur",
|
|
131
|
+
"close",
|
|
132
|
+
"closed",
|
|
133
|
+
"confirm",
|
|
134
|
+
"defaultStatus",
|
|
135
|
+
"defaultstatus",
|
|
136
|
+
"event",
|
|
137
|
+
"external",
|
|
138
|
+
"find",
|
|
139
|
+
"focus",
|
|
140
|
+
"frameElement",
|
|
141
|
+
"frames",
|
|
142
|
+
"history",
|
|
143
|
+
"innerHeight",
|
|
144
|
+
"innerWidth",
|
|
145
|
+
"length",
|
|
146
|
+
"location",
|
|
147
|
+
"locationbar",
|
|
148
|
+
"menubar",
|
|
149
|
+
"moveBy",
|
|
150
|
+
"moveTo",
|
|
151
|
+
"name",
|
|
152
|
+
"onblur",
|
|
153
|
+
"onerror",
|
|
154
|
+
"onfocus",
|
|
155
|
+
"onload",
|
|
156
|
+
"onresize",
|
|
157
|
+
"onunload",
|
|
158
|
+
"open",
|
|
159
|
+
"opener",
|
|
160
|
+
"opera",
|
|
161
|
+
"outerHeight",
|
|
162
|
+
"outerWidth",
|
|
163
|
+
"pageXOffset",
|
|
164
|
+
"pageYOffset",
|
|
165
|
+
"parent",
|
|
166
|
+
"print",
|
|
167
|
+
"removeEventListener",
|
|
168
|
+
"resizeBy",
|
|
169
|
+
"resizeTo",
|
|
170
|
+
"screen",
|
|
171
|
+
"screenLeft",
|
|
172
|
+
"screenTop",
|
|
173
|
+
"screenX",
|
|
174
|
+
"screenY",
|
|
175
|
+
"scroll",
|
|
176
|
+
"scrollbars",
|
|
177
|
+
"scrollBy",
|
|
178
|
+
"scrollTo",
|
|
179
|
+
"scrollX",
|
|
180
|
+
"scrollY",
|
|
181
|
+
"self",
|
|
182
|
+
"status",
|
|
183
|
+
"statusbar",
|
|
184
|
+
"stop",
|
|
185
|
+
"toolbar",
|
|
186
|
+
"top"
|
|
187
|
+
]
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
"javascript": {
|
|
194
|
+
"formatter": {
|
|
195
|
+
"enabled": true,
|
|
196
|
+
"quoteStyle": "single",
|
|
197
|
+
"semicolons": "always",
|
|
198
|
+
"indentStyle": "space",
|
|
199
|
+
"trailingCommas": "none"
|
|
200
|
+
},
|
|
201
|
+
"linter": {
|
|
202
|
+
"enabled": true
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"json": {
|
|
206
|
+
"parser": {
|
|
207
|
+
"allowComments": true,
|
|
208
|
+
"allowTrailingCommas": false
|
|
209
|
+
},
|
|
210
|
+
"formatter": {
|
|
211
|
+
"enabled": true,
|
|
212
|
+
"indentStyle": "space"
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
"css": {
|
|
216
|
+
"formatter": {
|
|
217
|
+
"enabled": true,
|
|
218
|
+
"indentStyle": "space"
|
|
219
|
+
},
|
|
220
|
+
"linter": {
|
|
221
|
+
"enabled": true
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
package/cypress/e2e/commands.ts
CHANGED
|
@@ -312,6 +312,10 @@ interface ExecInContainerProps {
|
|
|
312
312
|
name: string;
|
|
313
313
|
}
|
|
314
314
|
|
|
315
|
+
interface ExecInContainerOptions {
|
|
316
|
+
log: boolean;
|
|
317
|
+
}
|
|
318
|
+
|
|
315
319
|
interface ExecInContainerResult {
|
|
316
320
|
exitCode: number;
|
|
317
321
|
output: string;
|
|
@@ -319,7 +323,7 @@ interface ExecInContainerResult {
|
|
|
319
323
|
|
|
320
324
|
Cypress.Commands.add(
|
|
321
325
|
'execInContainer',
|
|
322
|
-
({ command, name }:
|
|
326
|
+
({ command, name }, { log = true } = { log: true }): Cypress.Chainable => {
|
|
323
327
|
const commands =
|
|
324
328
|
typeof command === 'string' || command instanceof String
|
|
325
329
|
? [command]
|
|
@@ -330,19 +334,22 @@ Cypress.Commands.add(
|
|
|
330
334
|
cy.task<ExecInContainerResult>(
|
|
331
335
|
'execInContainer',
|
|
332
336
|
{ command: runCommand, name },
|
|
333
|
-
{ timeout: 600000 }
|
|
337
|
+
{ log, timeout: 600000 }
|
|
334
338
|
).then((result) => {
|
|
339
|
+
const displayedOutput = log ? result.output : 'hidden command output';
|
|
340
|
+
const displayedRunCommand = log ? runCommand : 'hidden run command';
|
|
341
|
+
|
|
335
342
|
if (result.exitCode) {
|
|
336
|
-
cy.log(
|
|
343
|
+
cy.log(displayedOutput);
|
|
337
344
|
|
|
338
345
|
// output will not be truncated
|
|
339
346
|
throw new Error(`
|
|
340
|
-
Execution of "${
|
|
347
|
+
Execution of "${displayedRunCommand}" failed
|
|
341
348
|
Exit code: ${result.exitCode}
|
|
342
|
-
Output:\n${
|
|
349
|
+
Output:\n${displayedOutput}`);
|
|
343
350
|
}
|
|
344
351
|
|
|
345
|
-
acc.output = `${acc.output}${
|
|
352
|
+
acc.output = `${acc.output}${displayedOutput}`;
|
|
346
353
|
});
|
|
347
354
|
|
|
348
355
|
return acc;
|
|
@@ -778,10 +785,10 @@ declare global {
|
|
|
778
785
|
options?: Partial<Cypress.ExecOptions>
|
|
779
786
|
) => Cypress.Chainable;
|
|
780
787
|
createDirectory: (directoryPath: string) => Cypress.Chainable;
|
|
781
|
-
execInContainer: (
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
788
|
+
execInContainer: (
|
|
789
|
+
props: ExecInContainerProps,
|
|
790
|
+
options?: ExecInContainerOptions
|
|
791
|
+
) => Cypress.Chainable;
|
|
785
792
|
getByLabel: ({
|
|
786
793
|
patternType,
|
|
787
794
|
tag,
|
|
@@ -64,6 +64,7 @@ export default ({
|
|
|
64
64
|
DATABASE_IMAGE: 'bitnami/mariadb:10.11',
|
|
65
65
|
OPENID_IMAGE_VERSION: process.env.MAJOR || '24.04',
|
|
66
66
|
SAML_IMAGE_VERSION: process.env.MAJOR || '24.04',
|
|
67
|
+
STABILITY: 'unstable',
|
|
67
68
|
WEB_IMAGE_OS: 'alma9',
|
|
68
69
|
WEB_IMAGE_VERSION: webImageVersion
|
|
69
70
|
},
|
package/cypress/e2e/plugins.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@centreon/js-config",
|
|
3
3
|
"description": "Centreon Frontend shared build configuration",
|
|
4
|
-
"version": "24.8.
|
|
4
|
+
"version": "24.8.2",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/centreon/centreon-frontend.git"
|
|
@@ -21,17 +21,17 @@
|
|
|
21
21
|
"prettier": "^3.0.0"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@badeball/cypress-cucumber-preprocessor": "^20.
|
|
25
|
-
"@bahmutov/cypress-esbuild-preprocessor": "^2.2.
|
|
24
|
+
"@badeball/cypress-cucumber-preprocessor": "^20.1.2",
|
|
25
|
+
"@bahmutov/cypress-esbuild-preprocessor": "^2.2.2",
|
|
26
26
|
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
|
|
27
27
|
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
|
|
28
28
|
"@tsconfig/node16": "^16.1.3",
|
|
29
29
|
"@tsconfig/node20": "^20.1.4",
|
|
30
30
|
"@types/cypress-cucumber-preprocessor": "^4.0.5",
|
|
31
|
-
"cypress": "^13.
|
|
31
|
+
"cypress": "^13.13.3",
|
|
32
32
|
"cypress-multi-reporters": "^1.6.4",
|
|
33
|
-
"cypress-terminal-report": "^6.1.
|
|
34
|
-
"cypress-wait-until": "^3.0.
|
|
33
|
+
"cypress-terminal-report": "^6.1.2",
|
|
34
|
+
"cypress-wait-until": "^3.0.2",
|
|
35
35
|
"dotenv": "^16.4.5",
|
|
36
36
|
"esbuild": "^0.21.5",
|
|
37
37
|
"eslint": "^8.53.0",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"eslint-plugin-sort-keys-fix": "^1.1.2",
|
|
53
53
|
"eslint-plugin-typescript-sort-keys": "^2.1.0",
|
|
54
54
|
"mochawesome": "^7.1.3",
|
|
55
|
-
"mysql2": "^3.
|
|
55
|
+
"mysql2": "^3.11.0",
|
|
56
56
|
"tar-fs": "^3.0.6",
|
|
57
|
-
"testcontainers": "^10.
|
|
57
|
+
"testcontainers": "^10.11.0"
|
|
58
58
|
}
|
|
59
59
|
}
|