feat: migrate to esm

This commit is contained in:
2023-03-16 01:58:13 +01:00
parent fd740b3091
commit 4df19e8c20
512 changed files with 3016 additions and 2222 deletions

View File

@@ -13,7 +13,7 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {StatusCodes} from 'http-status-codes';
import {SCError} from '../error';
import {SCError} from '../error.js';
/**
* An error that is returned, when an internal server error occurred

View File

@@ -13,7 +13,7 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {StatusCodes} from 'http-status-codes';
import {SCError} from '../error';
import {SCError} from '../error.js';
/**
* An error that is returned, when the used HTTP method is not allowed on the requested route

View File

@@ -13,7 +13,7 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {StatusCodes} from 'http-status-codes';
import {SCError} from '../error';
import {SCError} from '../error.js';
/**
* An error that is returned when the requested route or resource was not found

View File

@@ -13,7 +13,7 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {StatusCodes} from 'http-status-codes';
import {SCError} from '../error';
import {SCError} from '../error.js';
/**
* An error that is returned when the request is in the right format, but contains parameters that are invalid or not

View File

@@ -13,8 +13,8 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {StatusCodes} from 'http-status-codes';
import {SCError} from '../error';
import {SCPluginMetaData} from '../routes/plugin-register';
import {SCError} from '../error.js';
import {SCPluginMetaData} from '../routes/plugin-register.js';
/**
* An error that is returned when a plugin with the same name is already registered, to prevent two copies of a plugin

View File

@@ -13,7 +13,7 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {StatusCodes} from 'http-status-codes';
import {SCError} from '../error';
import {SCError} from '../error.js';
/**
* An error that is returned whenever there is an unexpected error while creating a plugin

View File

@@ -13,7 +13,7 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {StatusCodes} from 'http-status-codes';
import {SCError} from '../error';
import {SCError} from '../error.js';
/**
* An error that is returned, when the request body is too large.

View File

@@ -13,7 +13,7 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {StatusCodes} from 'http-status-codes';
import {SCError} from '../error';
import {SCError} from '../error.js';
/**
* An error that is returned whenever there is a syntax error

View File

@@ -13,7 +13,7 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {StatusCodes} from 'http-status-codes';
import {SCError} from '../error';
import {SCError} from '../error.js';
/**
* An error that is returned, when to many request are submitted at once

View File

@@ -13,7 +13,7 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {StatusCodes} from 'http-status-codes';
import {SCError} from '../error';
import {SCError} from '../error.js';
/**
* An error that is returned when the content type of the request is not supported

View File

@@ -12,9 +12,9 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {ValidationError} from '@openstapps/core-tools/lib/types/validator';
import {ValidationError} from '@openstapps/core-tools/lib/types/validator.js';
import {StatusCodes} from 'http-status-codes';
import {SCError} from '../error';
import {SCError} from '../error.js';
/**
* An error that is returned when the validation of a request fails