Skip to content

Commit

Permalink
Epik/hs 16 send email refractor handle submit function (#183)
Browse files Browse the repository at this point in the history
* fix: HS-18 refractor code

* Update gulpfile.js

* Automated Gulp build changes

* updated babel

* Update babel.config.json

* Automated Gulp build changes

* gulpfile update

* Update gulpfile.js

* Update gulpfile.js

* Update gulpfile.js

* Update babel.config.json

* Update gulpfile.js

* Automated Gulp build changes

* gulp update

* Automated Gulp build changes

* Update gulpfile.js

* uglify-js

* gulpfile

* update gulpfile

* hs-18 refractor code

* gulpfile

* HS-19 refractor and modularize handleSubmit function

* Automated Gulp build changes

* HS-18 refractor code of send_email.js and modules

* Automated Gulp build changes

* HS-17 CSFR protection

* Automated Gulp build changes

* HS-17 csfr protection

* Update .deepsource.toml

* deepsource

* Update php

* Rename ogmeta to ogmeta.php

* Update .deepsource.toml

* HS-25 Security audit

* Automated Gulp build changes

* Update send_email.php

* HS-25 security patch

* Automated Gulp build changes

* [HS-16/HS-25]fix: security update

* Automated Gulp build changes

* [HS-16] run gulp

* Automated Gulp build changes

* [HS-16/HS-18/HS-19/HS-20] Poprawa obsługi  animacji i walidacji danych

* Automated Gulp build changes

* Babel for Jest

* jest setup

* Automated Gulp build changes

---------

Co-authored-by: GitHub Action <action@github.com>
  • Loading branch information
reisene and actions-user authored Dec 10, 2024
1 parent a755b65 commit 45e1484
Show file tree
Hide file tree
Showing 58 changed files with 3,200 additions and 4,081 deletions.
10 changes: 9 additions & 1 deletion .deepsource.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,21 @@ exclude_patterns = [

[[analyzers]]
name = "javascript"
enabled = true

[analyzers.meta]
environment = [
"jquery",
"browser",
"nodejs"
]
module_system = "es-modules"
dialect = "flow"

[[analyzers]]
name = "php"

name = "php"

[[analyzers]]
name = "test-coverage"
enabled = true
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
node.DMP
node_modules/
generate-token.php
__tests__/

config.*
Binary file modified .vs/Hd serwis/v17/.wsuo
Binary file not shown.
23 changes: 23 additions & 0 deletions .vs/Hd serwis/v17/DocumentLayout.backup.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"Version": 1,
"WorkspaceRootPath": "D:\\Hd serwis\\",
"Documents": [],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": -1,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
}
]
}
]
}
]
}
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@
"peacock.color": "#AC2A21",
"liveServer.settings.port": 5502,
"codeQL.createQuery.qlPackLocation": "d:\\Hd serwis",
"php.version": "8.3",
}
3 changes: 3 additions & 0 deletions Babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [['@babel/preset-env', {targets: {node: 'current'}}]],
};
18 changes: 0 additions & 18 deletions babel.config.json

This file was deleted.

9 changes: 9 additions & 0 deletions coverage/cobertura-coverage.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" ?>
<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">
<coverage lines-valid="0" lines-covered="0" line-rate="NaN" branches-valid="0" branches-covered="0" branch-rate="NaN" timestamp="1730062279353" complexity="0" version="0.1">
<sources>
<source>D:\Hd serwis</source>
</sources>
<packages>
</packages>
</coverage>
20 changes: 14 additions & 6 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
require ('./instruments.js');

const Sentry = require('@sentry/node');

const gulp = require('gulp');
const fileInclude = require('gulp-file-include');
const replace = require('gulp-replace');
const uglify = require('gulp-uglify');
const path = require('path');
const ignore = require('gulp-ignore');
const postcss = require('gulp-postcss');
Expand Down Expand Up @@ -59,12 +61,18 @@ gulp.task('watchPosts', async function() {
});
const content = `export default [\n${postPaths.map(path => ` '${path}'`).join(',\n')}\n];`;
await fs.writeFile('src/js/modules/post-paths.js', content, 'utf8');
await fs.copyFile('src/js/modules/post-paths.js', 'public_html/js/modules/post-paths.js');
});

gulp.task('js', () => {
return gulp.src(paths.js)
.pipe(gulp.dest(path.join(paths.dest, 'js')));
try {
return gulp.src(paths.js)
.pipe(sourcemaps.init())
.pipe(uglify())
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest(path.join(paths.dest, 'js')));
} catch (error) {
Sentry.captureException(error);
}
});

gulp.task('watch', function() {
Expand All @@ -75,7 +83,7 @@ gulp.task('watch', function() {
], gulp.series('html'));
gulp.watch(paths.css, gulp.series('css')); // Monitoruje zmiany w plikach CSS
gulp.watch(paths.js, gulp.series('js'));
gulp.watch(paths.posts, '*.html', gulp.series('watchPosts'));
gulp.watch(paths.posts, '*.html', gulp.series('watchPosts') );
});

gulp.task('default', gulp.series('html', 'css', 'watchPosts', 'js'));
gulp.task('default', gulp.series('html', 'css', 'watchPosts', 'js'));
3 changes: 2 additions & 1 deletion instruments.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const { nodeProfilingIntegration } = require("@sentry/profiling-node");

Sentry.init({
environment: "development",
release: "dev",
dsn: "https://63e2bb53c6fbdeb59c0b5430398260e9@o4507719861075968.ingest.de.sentry.io/4507719884144720",
integrations: [
nodeProfilingIntegration(),
Expand All @@ -13,4 +14,4 @@ Sentry.init({

// Set sampling rate for profiling - this is relative to tracesSampleRate
profilesSampleRate: 1.0,
});
});
1 change: 1 addition & 0 deletions jest.setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '@testing-library/jest-dom/extend-expect';
Loading

0 comments on commit 45e1484

Please sign in to comment.