mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-05 13:02:54 +00:00
refactor: split api into api, api-cli & api-plugin
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
"format:fix": "prettier --write . --ignore-path ../../.gitignore",
|
||||
"lint": "eslint --ext .ts src/",
|
||||
"lint:fix": "eslint --fix --ext .ts src/",
|
||||
"test": "c8 mocha"
|
||||
"test": "c8 mocha --exit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@openstapps/api": "workspace:*",
|
||||
@@ -45,7 +45,7 @@
|
||||
"nock": "13.3.1",
|
||||
"ts-node": "10.9.1",
|
||||
"tsup": "6.7.0",
|
||||
"typescript": "4.8.4"
|
||||
"typescript": "4.9.5"
|
||||
},
|
||||
"tsup": {
|
||||
"entry": [
|
||||
|
||||
@@ -18,7 +18,6 @@ import {Connector} from './connector.js';
|
||||
|
||||
/**
|
||||
* Checks if the input is a valid SCNamespace
|
||||
*
|
||||
* @param input Name of the potential SCNamespace
|
||||
*/
|
||||
export function isValidSCNamespace(input: string): input is SCLicensePlate {
|
||||
@@ -29,7 +28,6 @@ export function isValidSCNamespace(input: string): input is SCLicensePlate {
|
||||
* Creates a uuid from a JSON stringified item identifier
|
||||
*
|
||||
* You may create custom itemIdentifier-Interfaces to generate UIDs consistently
|
||||
*
|
||||
* @param itemIdentifier Identifying representation of the item
|
||||
* @param licensePlate License plate of the school
|
||||
*/
|
||||
@@ -40,7 +38,6 @@ export function createUUID(itemIdentifier: unknown, licensePlate: SCLicensePlate
|
||||
/**
|
||||
* Fetches items specified by the connector and pushs them to the backend,
|
||||
* by overwriting the bulk indexed with the `origin`.
|
||||
*
|
||||
* @param backend URL of the StApps backend eployment
|
||||
* @param connector Connector to be executed
|
||||
*/
|
||||
|
||||
@@ -20,7 +20,6 @@ import {createUUID} from './common.js';
|
||||
*
|
||||
* By extending this class connector-developers only need to implement the load and transform of the data
|
||||
* Pushing the data to the backend will be handled automatically
|
||||
*
|
||||
* @template T Any serializable type
|
||||
*/
|
||||
export abstract class Connector<T extends SCThings> {
|
||||
@@ -36,7 +35,6 @@ export abstract class Connector<T extends SCThings> {
|
||||
|
||||
/**
|
||||
* Abstract constructor for a connector
|
||||
*
|
||||
* @param licensePlate License plate of the school
|
||||
* @param origin Name of the connector
|
||||
*/
|
||||
|
||||
@@ -27,7 +27,6 @@ export class MinimalConnector extends Connector<SCMessage> {
|
||||
|
||||
/**
|
||||
* Constructor for the MinimalConnector
|
||||
*
|
||||
* @param licensePlate License plate of the school
|
||||
* @param origin Name of the connector
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user