diff --git a/bin/internal/check-release-excludes.sh b/bin/internal/check-release-excludes.sh index 4a182e635e..1309291991 100755 --- a/bin/internal/check-release-excludes.sh +++ b/bin/internal/check-release-excludes.sh @@ -57,7 +57,7 @@ validateExtension() { foundFileExt fi ;; - resources/js/src/*) + resources/js/*) if [ "${extension}" != "ts" ] && [ "${extension}" != "mjs" ]; then foundFileExt fi diff --git a/docs/faq.rst b/docs/faq.rst index 86b9532b6c..f2da83d199 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -694,8 +694,7 @@ A list of files and corresponding functionality which degrade gracefully when re * :file:`./setup/` (setup script) * :file:`./examples/` (configuration examples) * :file:`./resources/sql/` (SQL scripts to configure advanced functionalities) -* :file:`./resources/js/src/` (Source files to re-build `./public/js/`) -* :file:`./resources/js/global.d.ts` JS type declaration file +* :file:`./resources/js/` (Source files to re-build `./public/js/`) * Run `rm -rv vendor/tecnickcom/tcpdf && composer dump-autoload --no-interaction --optimize --dev` (exporting to PDF) * Run `rm -rv vendor/williamdes/mariadb-mysql-kbs && composer dump-autoload --no-interaction --optimize --dev` (external links to MariaDB and MySQL documentations) * Run `rm -rv vendor/code-lts/u2f-php-server && composer dump-autoload --no-interaction --optimize --dev` (U2F second factor authentication) diff --git a/jest.config.cjs b/jest.config.cjs index 317e5f3928..9a89da46f2 100644 --- a/jest.config.cjs +++ b/jest.config.cjs @@ -3,7 +3,7 @@ module.exports = { extensionsToTreatAsEsm: ['.ts'], coverageDirectory: '/build/javascript/', - collectCoverageFrom: ['/resources/js/src/**/*.ts'], + collectCoverageFrom: ['/resources/js/**/*.ts'], projects: [ { coveragePathIgnorePatterns: [ @@ -14,7 +14,7 @@ module.exports = { testMatch: ['/tests/javascript/**/*.ts'], transform: { '\\.[jt]sx?$': 'babel-jest' }, moduleNameMapper: { - '^phpmyadmin/(.*)$': '/resources/js/src/$1', + '^phpmyadmin/(.*)$': '/resources/js/$1', '^@vendor/(.*)$': '/public/js/vendor/$1', }, testEnvironment: 'jsdom', diff --git a/package.json b/package.json index f2c41fc9de..29137ced94 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "postinstall": "yarn run build", "build": "webpack", "css-lint": "stylelint \"public/themes/**/scss/*.scss\" \"public/setup/scss/*.scss\"", - "js-lint": "eslint resources/js/src tests/javascript jest.config.cjs", + "js-lint": "eslint resources/js tests/javascript jest.config.cjs", "test": "yarn node --experimental-vm-modules $(yarn bin jest)" }, "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" diff --git a/resources/js/src/codemirror/addon/lint/sql-lint.ts b/resources/js/codemirror/addon/lint/sql-lint.ts similarity index 100% rename from resources/js/src/codemirror/addon/lint/sql-lint.ts rename to resources/js/codemirror/addon/lint/sql-lint.ts diff --git a/resources/js/src/console.ts b/resources/js/console.ts similarity index 100% rename from resources/js/src/console.ts rename to resources/js/console.ts diff --git a/resources/js/src/database/central_columns.ts b/resources/js/database/central_columns.ts similarity index 100% rename from resources/js/src/database/central_columns.ts rename to resources/js/database/central_columns.ts diff --git a/resources/js/src/database/events.ts b/resources/js/database/events.ts similarity index 100% rename from resources/js/src/database/events.ts rename to resources/js/database/events.ts diff --git a/resources/js/src/database/multi_table_query.ts b/resources/js/database/multi_table_query.ts similarity index 100% rename from resources/js/src/database/multi_table_query.ts rename to resources/js/database/multi_table_query.ts diff --git a/resources/js/src/database/operations.ts b/resources/js/database/operations.ts similarity index 100% rename from resources/js/src/database/operations.ts rename to resources/js/database/operations.ts diff --git a/resources/js/src/database/query_generator.ts b/resources/js/database/query_generator.ts similarity index 100% rename from resources/js/src/database/query_generator.ts rename to resources/js/database/query_generator.ts diff --git a/resources/js/src/database/routines.ts b/resources/js/database/routines.ts similarity index 100% rename from resources/js/src/database/routines.ts rename to resources/js/database/routines.ts diff --git a/resources/js/src/database/search.ts b/resources/js/database/search.ts similarity index 100% rename from resources/js/src/database/search.ts rename to resources/js/database/search.ts diff --git a/resources/js/src/database/structure.ts b/resources/js/database/structure.ts similarity index 100% rename from resources/js/src/database/structure.ts rename to resources/js/database/structure.ts diff --git a/resources/js/src/database/tracking.ts b/resources/js/database/tracking.ts similarity index 100% rename from resources/js/src/database/tracking.ts rename to resources/js/database/tracking.ts diff --git a/resources/js/src/datetimepicker.ts b/resources/js/datetimepicker.ts similarity index 100% rename from resources/js/src/datetimepicker.ts rename to resources/js/datetimepicker.ts diff --git a/resources/js/src/designer/config.ts b/resources/js/designer/config.ts similarity index 100% rename from resources/js/src/designer/config.ts rename to resources/js/designer/config.ts diff --git a/resources/js/src/designer/database.ts b/resources/js/designer/database.ts similarity index 100% rename from resources/js/src/designer/database.ts rename to resources/js/designer/database.ts diff --git a/resources/js/src/designer/history.ts b/resources/js/designer/history.ts similarity index 100% rename from resources/js/src/designer/history.ts rename to resources/js/designer/history.ts diff --git a/resources/js/src/designer/init.ts b/resources/js/designer/init.ts similarity index 100% rename from resources/js/src/designer/init.ts rename to resources/js/designer/init.ts diff --git a/resources/js/src/designer/move.ts b/resources/js/designer/move.ts similarity index 100% rename from resources/js/src/designer/move.ts rename to resources/js/designer/move.ts diff --git a/resources/js/src/designer/objects.ts b/resources/js/designer/objects.ts similarity index 100% rename from resources/js/src/designer/objects.ts rename to resources/js/designer/objects.ts diff --git a/resources/js/src/designer/page.ts b/resources/js/designer/page.ts similarity index 100% rename from resources/js/src/designer/page.ts rename to resources/js/designer/page.ts diff --git a/resources/js/src/drag_drop_import.ts b/resources/js/drag_drop_import.ts similarity index 100% rename from resources/js/src/drag_drop_import.ts rename to resources/js/drag_drop_import.ts diff --git a/resources/js/src/error_report.ts b/resources/js/error_report.ts similarity index 100% rename from resources/js/src/error_report.ts rename to resources/js/error_report.ts diff --git a/resources/js/src/export.ts b/resources/js/export.ts similarity index 100% rename from resources/js/src/export.ts rename to resources/js/export.ts diff --git a/resources/js/src/export_output.ts b/resources/js/export_output.ts similarity index 100% rename from resources/js/src/export_output.ts rename to resources/js/export_output.ts diff --git a/resources/js/src/gis_data_editor.ts b/resources/js/gis_data_editor.ts similarity index 100% rename from resources/js/src/gis_data_editor.ts rename to resources/js/gis_data_editor.ts diff --git a/resources/js/global.d.ts b/resources/js/global.d.ts index 72c21b7186..967f883969 100644 --- a/resources/js/global.d.ts +++ b/resources/js/global.d.ts @@ -18,7 +18,7 @@ interface Window { interface JQuery { sortableTable: (method: any) => any; - menuResizer: (method: string|Function) => any; + menuResizer: (method: string|(() => number)) => any; filterByValue: (value: any) => any; diff --git a/resources/js/src/home.ts b/resources/js/home.ts similarity index 100% rename from resources/js/src/home.ts rename to resources/js/home.ts diff --git a/resources/js/src/import.ts b/resources/js/import.ts similarity index 100% rename from resources/js/src/import.ts rename to resources/js/import.ts diff --git a/resources/js/src/jquery.sortable-table.ts b/resources/js/jquery.sortable-table.ts similarity index 100% rename from resources/js/src/jquery.sortable-table.ts rename to resources/js/jquery.sortable-table.ts diff --git a/resources/js/src/main.ts b/resources/js/main.ts similarity index 100% rename from resources/js/src/main.ts rename to resources/js/main.ts diff --git a/resources/js/src/makegrid.ts b/resources/js/makegrid.ts similarity index 100% rename from resources/js/src/makegrid.ts rename to resources/js/makegrid.ts diff --git a/resources/js/src/menu_resizer.ts b/resources/js/menu_resizer.ts similarity index 100% rename from resources/js/src/menu_resizer.ts rename to resources/js/menu_resizer.ts diff --git a/resources/js/src/modules/ajax-message.ts b/resources/js/modules/ajax-message.ts similarity index 100% rename from resources/js/src/modules/ajax-message.ts rename to resources/js/modules/ajax-message.ts diff --git a/resources/js/src/modules/ajax.ts b/resources/js/modules/ajax.ts similarity index 100% rename from resources/js/src/modules/ajax.ts rename to resources/js/modules/ajax.ts diff --git a/resources/js/src/modules/chart.ts b/resources/js/modules/chart.ts similarity index 100% rename from resources/js/src/modules/chart.ts rename to resources/js/modules/chart.ts diff --git a/resources/js/src/modules/common.ts b/resources/js/modules/common.ts similarity index 100% rename from resources/js/src/modules/common.ts rename to resources/js/modules/common.ts diff --git a/resources/js/src/modules/config.ts b/resources/js/modules/config.ts similarity index 100% rename from resources/js/src/modules/config.ts rename to resources/js/modules/config.ts diff --git a/resources/js/src/modules/console.ts b/resources/js/modules/console.ts similarity index 100% rename from resources/js/src/modules/console.ts rename to resources/js/modules/console.ts diff --git a/resources/js/src/modules/console/config.ts b/resources/js/modules/console/config.ts similarity index 100% rename from resources/js/src/modules/console/config.ts rename to resources/js/modules/console/config.ts diff --git a/resources/js/src/modules/cross_framing_protection.ts b/resources/js/modules/cross_framing_protection.ts similarity index 100% rename from resources/js/src/modules/cross_framing_protection.ts rename to resources/js/modules/cross_framing_protection.ts diff --git a/resources/js/src/modules/functions.ts b/resources/js/modules/functions.ts similarity index 100% rename from resources/js/src/modules/functions.ts rename to resources/js/modules/functions.ts diff --git a/resources/js/src/modules/functions/adjustTotals.ts b/resources/js/modules/functions/adjustTotals.ts similarity index 100% rename from resources/js/src/modules/functions/adjustTotals.ts rename to resources/js/modules/functions/adjustTotals.ts diff --git a/resources/js/src/modules/functions/chartByteFormatter.ts b/resources/js/modules/functions/chartByteFormatter.ts similarity index 100% rename from resources/js/src/modules/functions/chartByteFormatter.ts rename to resources/js/modules/functions/chartByteFormatter.ts diff --git a/resources/js/src/modules/functions/checkNumberOfFields.ts b/resources/js/modules/functions/checkNumberOfFields.ts similarity index 100% rename from resources/js/src/modules/functions/checkNumberOfFields.ts rename to resources/js/modules/functions/checkNumberOfFields.ts diff --git a/resources/js/src/modules/functions/createProfilingChart.ts b/resources/js/modules/functions/createProfilingChart.ts similarity index 100% rename from resources/js/src/modules/functions/createProfilingChart.ts rename to resources/js/modules/functions/createProfilingChart.ts diff --git a/resources/js/src/modules/functions/escape.ts b/resources/js/modules/functions/escape.ts similarity index 100% rename from resources/js/src/modules/functions/escape.ts rename to resources/js/modules/functions/escape.ts diff --git a/resources/js/src/modules/functions/event-loader.ts b/resources/js/modules/functions/event-loader.ts similarity index 100% rename from resources/js/src/modules/functions/event-loader.ts rename to resources/js/modules/functions/event-loader.ts diff --git a/resources/js/src/modules/functions/formatDateTime.ts b/resources/js/modules/functions/formatDateTime.ts similarity index 100% rename from resources/js/src/modules/functions/formatDateTime.ts rename to resources/js/modules/functions/formatDateTime.ts diff --git a/resources/js/src/modules/functions/getImageTag.ts b/resources/js/modules/functions/getImageTag.ts similarity index 100% rename from resources/js/src/modules/functions/getImageTag.ts rename to resources/js/modules/functions/getImageTag.ts diff --git a/resources/js/src/modules/functions/getJsConfirmCommonParam.ts b/resources/js/modules/functions/getJsConfirmCommonParam.ts similarity index 100% rename from resources/js/src/modules/functions/getJsConfirmCommonParam.ts rename to resources/js/modules/functions/getJsConfirmCommonParam.ts diff --git a/resources/js/src/modules/functions/handleCreateViewModal.ts b/resources/js/modules/functions/handleCreateViewModal.ts similarity index 100% rename from resources/js/src/modules/functions/handleCreateViewModal.ts rename to resources/js/modules/functions/handleCreateViewModal.ts diff --git a/resources/js/src/modules/functions/handleRedirectAndReload.ts b/resources/js/modules/functions/handleRedirectAndReload.ts similarity index 100% rename from resources/js/src/modules/functions/handleRedirectAndReload.ts rename to resources/js/modules/functions/handleRedirectAndReload.ts diff --git a/resources/js/src/modules/functions/ignorePhpErrors.ts b/resources/js/modules/functions/ignorePhpErrors.ts similarity index 100% rename from resources/js/src/modules/functions/ignorePhpErrors.ts rename to resources/js/modules/functions/ignorePhpErrors.ts diff --git a/resources/js/src/modules/functions/isStorageSupported.ts b/resources/js/modules/functions/isStorageSupported.ts similarity index 100% rename from resources/js/src/modules/functions/isStorageSupported.ts rename to resources/js/modules/functions/isStorageSupported.ts diff --git a/resources/js/src/modules/functions/mainMenuResizerCallback.ts b/resources/js/modules/functions/mainMenuResizerCallback.ts similarity index 72% rename from resources/js/src/modules/functions/mainMenuResizerCallback.ts rename to resources/js/modules/functions/mainMenuResizerCallback.ts index e5c68d783a..9713c95570 100644 --- a/resources/js/src/modules/functions/mainMenuResizerCallback.ts +++ b/resources/js/modules/functions/mainMenuResizerCallback.ts @@ -1,6 +1,6 @@ import $ from 'jquery'; -export default function mainMenuResizerCallback () { +export default function mainMenuResizerCallback (): number { // 5 px margin for jumping menu in Chrome // eslint-disable-next-line compat/compat return $(document.body).width() - 5; diff --git a/resources/js/src/modules/functions/refreshMainContent.ts b/resources/js/modules/functions/refreshMainContent.ts similarity index 100% rename from resources/js/src/modules/functions/refreshMainContent.ts rename to resources/js/modules/functions/refreshMainContent.ts diff --git a/resources/js/src/modules/git-info.ts b/resources/js/modules/git-info.ts similarity index 100% rename from resources/js/src/modules/git-info.ts rename to resources/js/modules/git-info.ts diff --git a/resources/js/src/modules/indexes.ts b/resources/js/modules/indexes.ts similarity index 100% rename from resources/js/src/modules/indexes.ts rename to resources/js/modules/indexes.ts diff --git a/resources/js/src/modules/indexes/checkIndexName.ts b/resources/js/modules/indexes/checkIndexName.ts similarity index 100% rename from resources/js/src/modules/indexes/checkIndexName.ts rename to resources/js/modules/indexes/checkIndexName.ts diff --git a/resources/js/src/modules/indexes/checkIndexType.ts b/resources/js/modules/indexes/checkIndexType.ts similarity index 100% rename from resources/js/src/modules/indexes/checkIndexType.ts rename to resources/js/modules/indexes/checkIndexType.ts diff --git a/resources/js/src/modules/keyhandler.ts b/resources/js/modules/keyhandler.ts similarity index 100% rename from resources/js/src/modules/keyhandler.ts rename to resources/js/modules/keyhandler.ts diff --git a/resources/js/src/modules/navigation.ts b/resources/js/modules/navigation.ts similarity index 100% rename from resources/js/src/modules/navigation.ts rename to resources/js/modules/navigation.ts diff --git a/resources/js/src/modules/navigation/event-loader.ts b/resources/js/modules/navigation/event-loader.ts similarity index 100% rename from resources/js/src/modules/navigation/event-loader.ts rename to resources/js/modules/navigation/event-loader.ts diff --git a/resources/js/src/modules/navigation/updateNavigationWidthConfig.ts b/resources/js/modules/navigation/updateNavigationWidthConfig.ts similarity index 100% rename from resources/js/src/modules/navigation/updateNavigationWidthConfig.ts rename to resources/js/modules/navigation/updateNavigationWidthConfig.ts diff --git a/resources/js/src/modules/page_settings.ts b/resources/js/modules/page_settings.ts similarity index 100% rename from resources/js/src/modules/page_settings.ts rename to resources/js/modules/page_settings.ts diff --git a/resources/js/src/modules/sql-highlight.ts b/resources/js/modules/sql-highlight.ts similarity index 100% rename from resources/js/src/modules/sql-highlight.ts rename to resources/js/modules/sql-highlight.ts diff --git a/resources/js/src/modules/themes-manager.ts b/resources/js/modules/themes-manager.ts similarity index 100% rename from resources/js/src/modules/themes-manager.ts rename to resources/js/modules/themes-manager.ts diff --git a/resources/js/src/multi_column_sort.ts b/resources/js/multi_column_sort.ts similarity index 100% rename from resources/js/src/multi_column_sort.ts rename to resources/js/multi_column_sort.ts diff --git a/resources/js/src/normalization.ts b/resources/js/normalization.ts similarity index 100% rename from resources/js/src/normalization.ts rename to resources/js/normalization.ts diff --git a/resources/js/src/ol.mjs b/resources/js/ol.mjs similarity index 100% rename from resources/js/src/ol.mjs rename to resources/js/ol.mjs diff --git a/resources/js/src/replication.ts b/resources/js/replication.ts similarity index 100% rename from resources/js/src/replication.ts rename to resources/js/replication.ts diff --git a/resources/js/src/server/databases.ts b/resources/js/server/databases.ts similarity index 100% rename from resources/js/src/server/databases.ts rename to resources/js/server/databases.ts diff --git a/resources/js/src/server/plugins.ts b/resources/js/server/plugins.ts similarity index 100% rename from resources/js/src/server/plugins.ts rename to resources/js/server/plugins.ts diff --git a/resources/js/src/server/privileges.ts b/resources/js/server/privileges.ts similarity index 100% rename from resources/js/src/server/privileges.ts rename to resources/js/server/privileges.ts diff --git a/resources/js/src/server/status/monitor.ts b/resources/js/server/status/monitor.ts similarity index 100% rename from resources/js/src/server/status/monitor.ts rename to resources/js/server/status/monitor.ts diff --git a/resources/js/src/server/status/processes.ts b/resources/js/server/status/processes.ts similarity index 100% rename from resources/js/src/server/status/processes.ts rename to resources/js/server/status/processes.ts diff --git a/resources/js/src/server/status/queries.ts b/resources/js/server/status/queries.ts similarity index 100% rename from resources/js/src/server/status/queries.ts rename to resources/js/server/status/queries.ts diff --git a/resources/js/src/server/status/variables.ts b/resources/js/server/status/variables.ts similarity index 100% rename from resources/js/src/server/status/variables.ts rename to resources/js/server/status/variables.ts diff --git a/resources/js/src/server/user_groups.ts b/resources/js/server/user_groups.ts similarity index 100% rename from resources/js/src/server/user_groups.ts rename to resources/js/server/user_groups.ts diff --git a/resources/js/src/server/variables.ts b/resources/js/server/variables.ts similarity index 100% rename from resources/js/src/server/variables.ts rename to resources/js/server/variables.ts diff --git a/resources/js/src/setup/scripts.ts b/resources/js/setup/scripts.ts similarity index 100% rename from resources/js/src/setup/scripts.ts rename to resources/js/setup/scripts.ts diff --git a/resources/js/src/shortcuts_handler.ts b/resources/js/shortcuts_handler.ts similarity index 100% rename from resources/js/src/shortcuts_handler.ts rename to resources/js/shortcuts_handler.ts diff --git a/resources/js/src/sql.ts b/resources/js/sql.ts similarity index 100% rename from resources/js/src/sql.ts rename to resources/js/sql.ts diff --git a/resources/js/src/table/change.ts b/resources/js/table/change.ts similarity index 100% rename from resources/js/src/table/change.ts rename to resources/js/table/change.ts diff --git a/resources/js/src/table/chart.ts b/resources/js/table/chart.ts similarity index 100% rename from resources/js/src/table/chart.ts rename to resources/js/table/chart.ts diff --git a/resources/js/src/table/find_replace.ts b/resources/js/table/find_replace.ts similarity index 100% rename from resources/js/src/table/find_replace.ts rename to resources/js/table/find_replace.ts diff --git a/resources/js/src/table/gis_visualization.ts b/resources/js/table/gis_visualization.ts similarity index 100% rename from resources/js/src/table/gis_visualization.ts rename to resources/js/table/gis_visualization.ts diff --git a/resources/js/src/table/operations.ts b/resources/js/table/operations.ts similarity index 100% rename from resources/js/src/table/operations.ts rename to resources/js/table/operations.ts diff --git a/resources/js/src/table/relation.ts b/resources/js/table/relation.ts similarity index 100% rename from resources/js/src/table/relation.ts rename to resources/js/table/relation.ts diff --git a/resources/js/src/table/select.ts b/resources/js/table/select.ts similarity index 100% rename from resources/js/src/table/select.ts rename to resources/js/table/select.ts diff --git a/resources/js/src/table/structure.ts b/resources/js/table/structure.ts similarity index 100% rename from resources/js/src/table/structure.ts rename to resources/js/table/structure.ts diff --git a/resources/js/src/table/tracking.ts b/resources/js/table/tracking.ts similarity index 100% rename from resources/js/src/table/tracking.ts rename to resources/js/table/tracking.ts diff --git a/resources/js/src/table/zoom_search.ts b/resources/js/table/zoom_search.ts similarity index 100% rename from resources/js/src/table/zoom_search.ts rename to resources/js/table/zoom_search.ts diff --git a/resources/js/src/transformations/image_upload.ts b/resources/js/transformations/image_upload.ts similarity index 100% rename from resources/js/src/transformations/image_upload.ts rename to resources/js/transformations/image_upload.ts diff --git a/resources/js/src/transformations/json.ts b/resources/js/transformations/json.ts similarity index 100% rename from resources/js/src/transformations/json.ts rename to resources/js/transformations/json.ts diff --git a/resources/js/src/transformations/json_editor.ts b/resources/js/transformations/json_editor.ts similarity index 100% rename from resources/js/src/transformations/json_editor.ts rename to resources/js/transformations/json_editor.ts diff --git a/resources/js/src/transformations/sql_editor.ts b/resources/js/transformations/sql_editor.ts similarity index 100% rename from resources/js/src/transformations/sql_editor.ts rename to resources/js/transformations/sql_editor.ts diff --git a/resources/js/src/transformations/xml.ts b/resources/js/transformations/xml.ts similarity index 100% rename from resources/js/src/transformations/xml.ts rename to resources/js/transformations/xml.ts diff --git a/resources/js/src/transformations/xml_editor.ts b/resources/js/transformations/xml_editor.ts similarity index 100% rename from resources/js/src/transformations/xml_editor.ts rename to resources/js/transformations/xml_editor.ts diff --git a/resources/js/src/triggers.ts b/resources/js/triggers.ts similarity index 100% rename from resources/js/src/triggers.ts rename to resources/js/triggers.ts diff --git a/resources/js/src/u2f.ts b/resources/js/u2f.ts similarity index 100% rename from resources/js/src/u2f.ts rename to resources/js/u2f.ts diff --git a/resources/js/src/validator-messages.ts b/resources/js/validator-messages.ts similarity index 100% rename from resources/js/src/validator-messages.ts rename to resources/js/validator-messages.ts diff --git a/resources/js/src/webauthn.ts b/resources/js/webauthn.ts similarity index 100% rename from resources/js/src/webauthn.ts rename to resources/js/webauthn.ts diff --git a/tests/javascript/functions.test.ts b/tests/javascript/functions.test.ts index 8d136b8546..97fc951647 100644 --- a/tests/javascript/functions.test.ts +++ b/tests/javascript/functions.test.ts @@ -1,6 +1,6 @@ /* eslint-env node, jest */ -import { stringifyJSON } from '../../resources/js/src/modules/functions.ts'; +import { stringifyJSON } from '../../resources/js/modules/functions.ts'; describe('Functions', () => { describe('Testing stringifyJSON', function () { diff --git a/tsconfig.json b/tsconfig.json index cf05b99abb..9db56febbb 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,6 +12,6 @@ "strict": false, "isolatedModules": true }, - "include": ["./resources/js/global.d.ts", "./resources/js/src/**/*"], + "include": ["./resources/js/**/*"], "exclude": ["node_modules"] } diff --git a/webpack.config.cjs b/webpack.config.cjs index 3b50684a2e..1f35585876 100644 --- a/webpack.config.cjs +++ b/webpack.config.cjs @@ -17,65 +17,65 @@ module.exports = [ mode: 'none', devtool: 'source-map', entry: { - 'codemirror/addon/lint/sql-lint': rootPath + '/resources/js/src/codemirror/addon/lint/sql-lint.ts', - 'console': { import: rootPath + '/resources/js/src/console.ts', library: { name: 'Console', type: 'window', export: 'Console' } }, - 'datetimepicker': rootPath + '/resources/js/src/datetimepicker.ts', - 'database/central_columns': rootPath + '/resources/js/src/database/central_columns.ts', - 'database/events': rootPath + '/resources/js/src/database/events.ts', - 'database/multi_table_query': rootPath + '/resources/js/src/database/multi_table_query.ts', - 'database/operations': rootPath + '/resources/js/src/database/operations.ts', - 'database/query_generator': rootPath + '/resources/js/src/database/query_generator.ts', - 'database/routines': rootPath + '/resources/js/src/database/routines.ts', - 'database/search': rootPath + '/resources/js/src/database/search.ts', - 'database/structure': rootPath + '/resources/js/src/database/structure.ts', - 'database/tracking': rootPath + '/resources/js/src/database/tracking.ts', - 'designer/init': rootPath + '/resources/js/src/designer/init.ts', - 'drag_drop_import': rootPath + '/resources/js/src/drag_drop_import.ts', - 'error_report': rootPath + '/resources/js/src/error_report.ts', - 'export': rootPath + '/resources/js/src/export.ts', - 'export_output': rootPath + '/resources/js/src/export_output.ts', - 'gis_data_editor': rootPath + '/resources/js/src/gis_data_editor.ts', - 'home': rootPath + '/resources/js/src/home.ts', - 'import': rootPath + '/resources/js/src/import.ts', - 'jquery.sortable-table': rootPath + '/resources/js/src/jquery.sortable-table.ts', - 'main': rootPath + '/resources/js/src/main.ts', - 'makegrid': rootPath + '/resources/js/src/makegrid.ts', - 'menu_resizer': rootPath + '/resources/js/src/menu_resizer.ts', - 'multi_column_sort': rootPath + '/resources/js/src/multi_column_sort.ts', - 'normalization': rootPath + '/resources/js/src/normalization.ts', - 'replication': rootPath + '/resources/js/src/replication.ts', - 'server/databases': rootPath + '/resources/js/src/server/databases.ts', - 'server/plugins': rootPath + '/resources/js/src/server/plugins.ts', - 'server/privileges': rootPath + '/resources/js/src/server/privileges.ts', - 'server/status/monitor': rootPath + '/resources/js/src/server/status/monitor.ts', - 'server/status/processes': rootPath + '/resources/js/src/server/status/processes.ts', - 'server/status/queries': rootPath + '/resources/js/src/server/status/queries.ts', - 'server/status/variables': rootPath + '/resources/js/src/server/status/variables.ts', - 'server/user_groups': rootPath + '/resources/js/src/server/user_groups.ts', - 'server/variables': rootPath + '/resources/js/src/server/variables.ts', - 'setup/scripts': rootPath + '/resources/js/src/setup/scripts.ts', - 'shortcuts_handler': rootPath + '/resources/js/src/shortcuts_handler.ts', - 'sql': rootPath + '/resources/js/src/sql.ts', - 'table/change': rootPath + '/resources/js/src/table/change.ts', - 'table/chart': rootPath + '/resources/js/src/table/chart.ts', - 'table/find_replace': rootPath + '/resources/js/src/table/find_replace.ts', - 'table/gis_visualization': rootPath + '/resources/js/src/table/gis_visualization.ts', - 'table/operations': rootPath + '/resources/js/src/table/operations.ts', - 'table/relation': rootPath + '/resources/js/src/table/relation.ts', - 'table/select': rootPath + '/resources/js/src/table/select.ts', - 'table/structure': rootPath + '/resources/js/src/table/structure.ts', - 'table/tracking': rootPath + '/resources/js/src/table/tracking.ts', - 'table/zoom_search': rootPath + '/resources/js/src/table/zoom_search.ts', - 'transformations/image_upload': rootPath + '/resources/js/src/transformations/image_upload.ts', - 'transformations/json': rootPath + '/resources/js/src/transformations/json.ts', - 'transformations/json_editor': rootPath + '/resources/js/src/transformations/json_editor.ts', - 'transformations/sql_editor': rootPath + '/resources/js/src/transformations/sql_editor.ts', - 'transformations/xml': rootPath + '/resources/js/src/transformations/xml.ts', - 'transformations/xml_editor': rootPath + '/resources/js/src/transformations/xml_editor.ts', - 'triggers': rootPath + '/resources/js/src/triggers.ts', - 'u2f': rootPath + '/resources/js/src/u2f.ts', - 'validator-messages': rootPath + '/resources/js/src/validator-messages.ts', - 'webauthn': rootPath + '/resources/js/src/webauthn.ts', + 'codemirror/addon/lint/sql-lint': rootPath + '/resources/js/codemirror/addon/lint/sql-lint.ts', + 'console': { import: rootPath + '/resources/js/console.ts', library: { name: 'Console', type: 'window', export: 'Console' } }, + 'datetimepicker': rootPath + '/resources/js/datetimepicker.ts', + 'database/central_columns': rootPath + '/resources/js/database/central_columns.ts', + 'database/events': rootPath + '/resources/js/database/events.ts', + 'database/multi_table_query': rootPath + '/resources/js/database/multi_table_query.ts', + 'database/operations': rootPath + '/resources/js/database/operations.ts', + 'database/query_generator': rootPath + '/resources/js/database/query_generator.ts', + 'database/routines': rootPath + '/resources/js/database/routines.ts', + 'database/search': rootPath + '/resources/js/database/search.ts', + 'database/structure': rootPath + '/resources/js/database/structure.ts', + 'database/tracking': rootPath + '/resources/js/database/tracking.ts', + 'designer/init': rootPath + '/resources/js/designer/init.ts', + 'drag_drop_import': rootPath + '/resources/js/drag_drop_import.ts', + 'error_report': rootPath + '/resources/js/error_report.ts', + 'export': rootPath + '/resources/js/export.ts', + 'export_output': rootPath + '/resources/js/export_output.ts', + 'gis_data_editor': rootPath + '/resources/js/gis_data_editor.ts', + 'home': rootPath + '/resources/js/home.ts', + 'import': rootPath + '/resources/js/import.ts', + 'jquery.sortable-table': rootPath + '/resources/js/jquery.sortable-table.ts', + 'main': rootPath + '/resources/js/main.ts', + 'makegrid': rootPath + '/resources/js/makegrid.ts', + 'menu_resizer': rootPath + '/resources/js/menu_resizer.ts', + 'multi_column_sort': rootPath + '/resources/js/multi_column_sort.ts', + 'normalization': rootPath + '/resources/js/normalization.ts', + 'replication': rootPath + '/resources/js/replication.ts', + 'server/databases': rootPath + '/resources/js/server/databases.ts', + 'server/plugins': rootPath + '/resources/js/server/plugins.ts', + 'server/privileges': rootPath + '/resources/js/server/privileges.ts', + 'server/status/monitor': rootPath + '/resources/js/server/status/monitor.ts', + 'server/status/processes': rootPath + '/resources/js/server/status/processes.ts', + 'server/status/queries': rootPath + '/resources/js/server/status/queries.ts', + 'server/status/variables': rootPath + '/resources/js/server/status/variables.ts', + 'server/user_groups': rootPath + '/resources/js/server/user_groups.ts', + 'server/variables': rootPath + '/resources/js/server/variables.ts', + 'setup/scripts': rootPath + '/resources/js/setup/scripts.ts', + 'shortcuts_handler': rootPath + '/resources/js/shortcuts_handler.ts', + 'sql': rootPath + '/resources/js/sql.ts', + 'table/change': rootPath + '/resources/js/table/change.ts', + 'table/chart': rootPath + '/resources/js/table/chart.ts', + 'table/find_replace': rootPath + '/resources/js/table/find_replace.ts', + 'table/gis_visualization': rootPath + '/resources/js/table/gis_visualization.ts', + 'table/operations': rootPath + '/resources/js/table/operations.ts', + 'table/relation': rootPath + '/resources/js/table/relation.ts', + 'table/select': rootPath + '/resources/js/table/select.ts', + 'table/structure': rootPath + '/resources/js/table/structure.ts', + 'table/tracking': rootPath + '/resources/js/table/tracking.ts', + 'table/zoom_search': rootPath + '/resources/js/table/zoom_search.ts', + 'transformations/image_upload': rootPath + '/resources/js/transformations/image_upload.ts', + 'transformations/json': rootPath + '/resources/js/transformations/json.ts', + 'transformations/json_editor': rootPath + '/resources/js/transformations/json_editor.ts', + 'transformations/sql_editor': rootPath + '/resources/js/transformations/sql_editor.ts', + 'transformations/xml': rootPath + '/resources/js/transformations/xml.ts', + 'transformations/xml_editor': rootPath + '/resources/js/transformations/xml_editor.ts', + 'triggers': rootPath + '/resources/js/triggers.ts', + 'u2f': rootPath + '/resources/js/u2f.ts', + 'validator-messages': rootPath + '/resources/js/validator-messages.ts', + 'webauthn': rootPath + '/resources/js/webauthn.ts', }, output: { filename: '[name].js', @@ -163,7 +163,7 @@ module.exports = [ }, { name: 'OpenLayers', - entry: rootPath + '/resources/js/src/ol.mjs', + entry: rootPath + '/resources/js/ol.mjs', devtool: 'source-map', mode: 'production', performance: {