Skip to content

Commit 2b7588a

Browse files
feature/file-flinger (#17)
* feat(file-flinger): ✨ add new module file-flinger to the repository * docs(general): 📝 update documentation * docs(core): 📝 update docs for new modules * docs(general): 📝 update docs and dependencies * test(general): 🧪 fix test * ci(ci): 💚 fix ci process * refactor(general): ♻️ refactor code * docs(general): 📝 update docs for complete repo * docs(general): 📝 update general docs * docs(general): 📝 update docs * docs(general): 📝 update docs * chore(service-config): ⬆️ upgrade dependencies and add modify default dependencies * chore(s3): ⬆️ update s3 dependencies * fix(http-client-provider): 🐛 fix schema check in provider * fix(polling): remove redundant max timeout check in RetryManager * chore(general): ⬆️ update dependencies * ci(ci): 💚 fix ci * test(redis-provider): ✅ update test on redis * ci(general): * test(openc2): ✅ update test in openc2 * chore(general): ⬆️ update dependencies * chore(file-flinger): update file-flinger * test(file-flinger): ✅ add more test for coverage --------- Co-authored-by: Victor <[email protected]>
1 parent 8f24663 commit 2b7588a

File tree

1,136 files changed

+38180
-28028
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,136 files changed

+38180
-28028
lines changed

.config/azure-pipelines.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ variables:
1717
value: 'mdf-js-api'
1818
## Node version
1919
- name: nodeVersion
20-
value: '20'
20+
value: '22'
2121
## Releases Wiki page
2222
- name: artifactWikiFileName
2323
value: '@mdf.js%2Djs-%2D-API'
24-
## GitFlow variables for branch maching
24+
## GitFlow variables for branch matching
2525
- template: mdf-pipelines-variables.yml
2626
stages:
2727
- stage: 'APP'

.config/envDoc.mjs

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@ const envVarRegex = /process\.env\[['"](?<varName>[^'"]+)['"]\]/;
3636
const defaultValueRegex = /(default:|@defaultValue) (?<defaultValue>[^,]+)/;
3737

3838
const srcFiles = glob.sync(SOURCE_FILES, {
39-
nodir: true, ignore: {
39+
nodir: true,
40+
ignore: {
4041
ignored: p => /\.test.ts$/.test(p.name),
41-
}
42+
},
4243
});
4344
const variables = [];
4445

@@ -102,7 +103,7 @@ function findAllEnvironmentVariablesInFile(fileContent, path) {
102103
comment = comment.replace(defaultValueRegex, '').trim();
103104
}
104105
variables.push({ name: matches.groups['varName'], comment, path, defaultValue });
105-
} catch (error) {
106+
} catch (error) {
106107
console.log(`ERROR: Error while processing file ${path}: ${error.message}`);
107108
}
108109
}
@@ -159,7 +160,9 @@ function findUpperCommentInFile(lines, index) {
159160
} else {
160161
const firstLine = lines[startOfComment].replace('/**', '');
161162
const lastLine = lines[endOfComment].replace('*/', '');
162-
const middleLines = lines.slice(startOfComment + 1, endOfComment).map(line => line.replace('*', ''));
163+
const middleLines = lines
164+
.slice(startOfComment + 1, endOfComment)
165+
.map(line => line.replace('*', ''));
163166
comment = [firstLine, ...middleLines, lastLine].join(' ');
164167
}
165168
// Clean spaces if there are more than one space between words or at the beginning or end of the comment
@@ -191,7 +194,7 @@ function isConstantDeclaration(line) {
191194
}
192195
/**
193196
* Finds and removes the section containing environment variables from a given Markdown document.
194-
*
197+
*
195198
* @param {object} readMeMD - The Markdown document object.
196199
*/
197200
function findAndRemoveEnvironmentVariablesSection(readMeMD) {
@@ -220,7 +223,7 @@ function findAndRemoveEnvironmentVariablesSection(readMeMD) {
220223
}
221224
/**
222225
* Finds, removes, and returns the license section from the given readMeMD object.
223-
*
226+
*
224227
* @param {Object} readMeMD - The readMeMD object.
225228
* @returns {Array} - An array of nodes representing the license section.
226229
*/
@@ -268,7 +271,7 @@ function deletePositionPropertyRecursively(nodes) {
268271
}
269272
/**
270273
* Generates a table of environment variables.
271-
*
274+
*
272275
* @param {Array<Object>} envVariables - An array of environment variables.
273276
* @returns {Array<Object>} - An array representing the table of environment variables.
274277
*/
@@ -306,7 +309,7 @@ function generateTableOfEnvironmentVariables(envVariables) {
306309
}
307310
/**
308311
* Generates a list of environment variables.
309-
*
312+
*
310313
* @param {Array<Object>} envVariables - The array of environment variables.
311314
* @returns {Array<Object>} - The list of environment variables in a specific format.
312315
*/
@@ -324,33 +327,38 @@ function generateListOfEnvironmentVariables(envVariables) {
324327
};
325328
for (const envVariable of envVariables) {
326329
if (!envVariable.comment) {
327-
console.log(`WARNING: No comment found for environment variable ${envVariable.name} in file ${envVariable.path}`);
328-
};
330+
console.log(
331+
`WARNING: No comment found for environment variable ${envVariable.name} in file ${envVariable.path}`
332+
);
333+
}
329334
let defaultValue = [];
330335
if (envVariable.defaultValue) {
331336
defaultValue = [
332-
{ type: 'text', value: ' (default: ', },
337+
{ type: 'text', value: ' (default: ' },
333338
{ type: 'inlineCode', value: envVariable.defaultValue },
334-
{ type: 'text', value: `): ${envVariable.comment}` }];
339+
{ type: 'text', value: `): ${envVariable.comment}` },
340+
];
335341
} else {
336342
defaultValue = [{ type: 'text', value: `: ${envVariable.comment}` }];
337343
}
338344
envVariablesList.children.push({
339345
type: 'listItem',
340346
spread: false,
341347
checked: null,
342-
children: [{
343-
type: 'paragraph',
344-
children: [
345-
{
346-
type: 'strong', children: [
347-
{ type: 'text', value: envVariable.name },
348-
]
349-
},
350-
...defaultValue,
351-
],
352-
}],
348+
children: [
349+
{
350+
type: 'paragraph',
351+
children: [
352+
{
353+
type: 'strong',
354+
children: [{ type: 'text', value: envVariable.name }],
355+
},
356+
...defaultValue,
357+
],
358+
},
359+
],
353360
});
354361
}
355362
return [envVariablesTitle, envVariablesList];
356363
}
364+

.config/mdf-publish-artifacts-lerna.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ steps:
2525

2626
- task: Yarn@3
2727
displayName: Publish package to internal feed as alfa version
28-
condition: and(succeeded(), eq(variables.isDevelop, true))
28+
condition: and(succeeded(), or(eq(variables.isDevelop, true), eq(variables.isFeature, true)))
2929
inputs:
3030
projectDirectory: '.'
3131
arguments: 'lerna publish $(Build.BuildNumber) --amend --dist-tag alpha --loglevel silly -m "chore(release): publish %v" --yes'

.config/mdf-test-sonarqube-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
steps:
2-
- task: SonarQubePrepare@6
2+
- task: SonarQubePrepare@7
33
displayName: 'Setting Sonarqube analysis'
44
inputs:
55
SonarQube: 'NetinSystems-SonarQube Endpoint-MytraManagementSystem'
66
scannerMode: 'CLI'
7-
cliVersion: '6.1.0.4477'
7+
cliVersion: '6.2.1.4610'
88
configMode: 'file'
99
configFile: './.config/sonar-project.properties'
1010
projectVersion: $(Build.BuildNumber)
1111
extraProperties:
1212
sonar.projectVersion=$(Build.BuildNumber)
1313

14-
- task: SonarQubeAnalyze@6
14+
- task: SonarQubeAnalyze@7
1515
displayName: 'Run Code Analysis'
1616
inputs:
1717
jdkversion: 'JAVA_HOME_17_X64'
1818

19-
- task: SonarQubePublish@6
19+
- task: SonarQubePublish@7
2020
displayName: 'Publish Quality Gate Result'
2121
inputs:
2222
pollingTimeoutSec: '300'

0 commit comments

Comments
 (0)