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

@@ -0,0 +1,2 @@
#!/usr/bin/env node
import './lib/cli.js'

View File

@@ -2,6 +2,7 @@
"name": "@openstapps/minimal-plugin",
"description": "Minimal Plugin",
"version": "2.1.0",
"type": "module",
"license": "GPL-3.0-only",
"author": "Thea Schöbl",
"contributors": [
@@ -36,7 +37,7 @@
"@types/node": "18.15.3",
"conventional-changelog-cli": "2.2.2",
"rimraf": "4.4.0",
"typedoc": "0.22.18",
"typescript": "4.4.4"
"typedoc": "0.23.26",
"typescript": "4.8.4"
}
}

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
/*
* Copyright (C) 2019-2021 StApps
* This program is free software: you can redistribute it and/or modify it
@@ -15,14 +13,14 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {HttpClient} from '@openstapps/api/lib/http-client';
import {PluginClient} from '@openstapps/api/lib/plugin-client';
import {Converter} from '@openstapps/core-tools/lib/schema';
import {HttpClient} from '@openstapps/api/lib/http-client.js';
import {PluginClient} from '@openstapps/api/lib/plugin-client.js';
import {Converter} from '@openstapps/core-tools/lib/schema.js';
import {Logger} from '@openstapps/logger';
import {Command, Option} from 'commander';
import {readFileSync} from 'fs';
import {join, resolve} from 'path';
import {MinimalPlugin} from './plugin/minimal-plugin';
import {MinimalPlugin} from './plugin/minimal-plugin.js';
process.on('unhandledRejection', (error) => {

View File

@@ -12,10 +12,10 @@
* 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 {Plugin} from '@openstapps/api/lib/plugin';
import {Plugin} from '@openstapps/api/lib/plugin.js';
import * as express from 'express';
import {SCMinimalRequest} from './protocol/request';
import {SCMinimalResponse} from './protocol/response';
import {SCMinimalRequest} from './protocol/request.js';
import {SCMinimalResponse} from './protocol/response.js';
/**
* The Plugin Class