@ruiapp/rapid-core 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/actionHandler.d.ts +1 -1
- package/dist/core/eventManager.d.ts +1 -1
- package/dist/core/pluginManager.d.ts +1 -1
- package/dist/core/routesBuilder.d.ts +2 -2
- package/dist/core/server.d.ts +1 -1
- package/dist/dataAccess/dataAccessor.d.ts +2 -2
- package/dist/dataAccess/entityManager.d.ts +2 -2
- package/dist/dataAccess/entityMapper.d.ts +1 -1
- package/dist/dataAccess/filterHelper.d.ts +1 -1
- package/dist/dataAccess/propertyMapper.d.ts +1 -1
- package/dist/helpers/runCollectionEntityActionHandler.d.ts +2 -2
- package/dist/plugins/auth/AuthPlugin.d.ts +3 -3
- package/dist/plugins/auth/actionHandlers/createSession.d.ts +2 -2
- package/dist/plugins/auth/actionHandlers/deleteSession.d.ts +2 -2
- package/dist/plugins/auth/actionHandlers/getMyProfile.d.ts +2 -2
- package/dist/plugins/auth/models/AccessToken.d.ts +1 -1
- package/dist/plugins/dataManage/DataManagePlugin.d.ts +2 -2
- package/dist/plugins/dataManage/actionHandlers/addEntityRelations.d.ts +3 -3
- package/dist/plugins/dataManage/actionHandlers/countCollectionEntities.d.ts +3 -3
- package/dist/plugins/dataManage/actionHandlers/createCollectionEntitiesBatch.d.ts +3 -3
- package/dist/plugins/dataManage/actionHandlers/createCollectionEntity.d.ts +3 -3
- package/dist/plugins/dataManage/actionHandlers/deleteCollectionEntityById.d.ts +3 -3
- package/dist/plugins/dataManage/actionHandlers/findCollectionEntities.d.ts +3 -3
- package/dist/plugins/dataManage/actionHandlers/findCollectionEntityById.d.ts +3 -3
- package/dist/plugins/dataManage/actionHandlers/queryDatabase.d.ts +3 -3
- package/dist/plugins/dataManage/actionHandlers/removeEntityRelations.d.ts +3 -3
- package/dist/plugins/dataManage/actionHandlers/updateCollectionEntityById.d.ts +3 -3
- package/dist/plugins/fileManage/FileManagePlugin.d.ts +2 -2
- package/dist/plugins/fileManage/actionHandlers/downloadDocument.d.ts +2 -2
- package/dist/plugins/fileManage/actionHandlers/downloadFile.d.ts +2 -2
- package/dist/plugins/fileManage/actionHandlers/uploadFile.d.ts +2 -2
- package/dist/plugins/metaManage/MetaManagePlugin.d.ts +2 -2
- package/dist/plugins/metaManage/actionHandlers/getMetaModelDetail.d.ts +2 -2
- package/dist/plugins/metaManage/actionHandlers/listMetaModels.d.ts +2 -2
- package/dist/plugins/metaManage/actionHandlers/listMetaRoutes.d.ts +2 -2
- package/dist/plugins/routeManage/RouteManagePlugin.d.ts +2 -2
- package/dist/plugins/routeManage/actionHandlers/httpProxy.d.ts +3 -3
- package/dist/plugins/webhooks/WebhooksPlugin.d.ts +2 -2
- package/dist/proxy/mod.d.ts +1 -1
- package/dist/proxy/types.d.ts +2 -2
- package/package.json +2 -2
- package/rollup.config.js +19 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import Router from "koa-tree-router";
|
|
2
|
-
import { IRpdServer } from "
|
|
3
|
-
import { RpdApplicationConfig } from "
|
|
2
|
+
import { IRpdServer } from "../core/server";
|
|
3
|
+
import { RpdApplicationConfig } from "../types";
|
|
4
4
|
export declare function buildRoutes(server: IRpdServer, applicationConfig: RpdApplicationConfig): Promise<Router.Middleware<any, {}>>;
|
package/dist/core/server.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GetDataAccessorOptions, GetModelOptions, IDatabaseConfig, IQueryBuilder, IRpdDataAccessor, RapidServerConfig, RpdApplicationConfig, RpdDataModel, RpdServerEventTypes } from "
|
|
1
|
+
import { GetDataAccessorOptions, GetModelOptions, IDatabaseConfig, IQueryBuilder, IRpdDataAccessor, RapidServerConfig, RpdApplicationConfig, RpdDataModel, RpdServerEventTypes } from "../types";
|
|
2
2
|
import { IPluginActionHandler, ActionHandler } from "./actionHandler";
|
|
3
3
|
import { Next, RouteContext } from "./routeContext";
|
|
4
4
|
export interface IRpdServer {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CountEntityOptions, FindEntityOptions, IRpdDataAccessor, RpdDataModel, IDatabaseAccessor } from "
|
|
2
|
-
import QueryBuilder from "
|
|
1
|
+
import { CountEntityOptions, FindEntityOptions, IRpdDataAccessor, RpdDataModel, IDatabaseAccessor } from "../types";
|
|
2
|
+
import QueryBuilder from "../queryBuilder/queryBuilder";
|
|
3
3
|
export interface IDataAccessorOptions {
|
|
4
4
|
model: RpdDataModel;
|
|
5
5
|
queryBuilder: QueryBuilder;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CreateEntityOptions, FindEntityOptions, IRpdDataAccessor, UpdateEntityByIdOptions } from "
|
|
2
|
-
import { IRpdServer } from "
|
|
1
|
+
import { CreateEntityOptions, FindEntityOptions, IRpdDataAccessor, UpdateEntityByIdOptions } from "../types";
|
|
2
|
+
import { IRpdServer } from "../core/server";
|
|
3
3
|
export declare function findEntities(server: IRpdServer, dataAccessor: IRpdDataAccessor, options: FindEntityOptions): Promise<any[]>;
|
|
4
4
|
export declare function findEntity(server: IRpdServer, dataAccessor: IRpdDataAccessor, options: FindEntityOptions): Promise<any>;
|
|
5
5
|
export declare function createEntity(server: IRpdServer, dataAccessor: IRpdDataAccessor, options: CreateEntityOptions): Promise<any>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { EntityFilterOptions } from "
|
|
1
|
+
import { EntityFilterOptions } from "../types";
|
|
2
2
|
export declare function removeFiltersWithNullValue(filters?: EntityFilterOptions[]): EntityFilterOptions[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { RpdDataModel } from "
|
|
1
|
+
import { RpdDataModel } from "../types";
|
|
2
2
|
export declare function mapPropertyNameToColumnName(model: RpdDataModel, propertyName: string): string;
|
|
3
3
|
export declare function mapPropertyNamesToColumnNames(model: RpdDataModel, propertyNames: string[]): string[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IRpdDataAccessor, RunEntityActionHandlerOptions } from "
|
|
2
|
-
import { ActionHandlerContext } from "
|
|
1
|
+
import { IRpdDataAccessor, RunEntityActionHandlerOptions } from "../types";
|
|
2
|
+
import { ActionHandlerContext } from "../core/actionHandler";
|
|
3
3
|
type DataAccessHandler = (dataAccessor: IRpdDataAccessor, input: any) => Promise<any>;
|
|
4
4
|
export default function runCollectionEntityActionHandler(ctx: ActionHandlerContext, options: RunEntityActionHandlerOptions, code: string, handleDataAccess: DataAccessHandler): Promise<void>;
|
|
5
5
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Auth manager plugin
|
|
3
3
|
*/
|
|
4
|
-
import { RpdApplicationConfig } from "
|
|
5
|
-
import { IRpdServer, RapidPlugin, RpdConfigurationItemOptions, RpdServerPluginConfigurableTargetOptions, RpdServerPluginExtendingAbilities } from "
|
|
6
|
-
import { RouteContext } from "
|
|
4
|
+
import { RpdApplicationConfig } from "../../types";
|
|
5
|
+
import { IRpdServer, RapidPlugin, RpdConfigurationItemOptions, RpdServerPluginConfigurableTargetOptions, RpdServerPluginExtendingAbilities } from "../../core/server";
|
|
6
|
+
import { RouteContext } from "../../core/routeContext";
|
|
7
7
|
declare class AuthPlugin implements RapidPlugin {
|
|
8
8
|
get code(): string;
|
|
9
9
|
get description(): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ActionHandlerContext } from "
|
|
2
|
-
import { RapidPlugin } from "
|
|
1
|
+
import { ActionHandlerContext } from "../../../core/actionHandler";
|
|
2
|
+
import { RapidPlugin } from "../../../core/server";
|
|
3
3
|
export interface UserAccessToken {
|
|
4
4
|
sub: "userAccessToken";
|
|
5
5
|
aud: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActionHandlerContext } from "
|
|
2
|
-
import { RapidPlugin } from "
|
|
1
|
+
import { ActionHandlerContext } from "../../../core/actionHandler";
|
|
2
|
+
import { RapidPlugin } from "../../../core/server";
|
|
3
3
|
export declare const code = "deleteSession";
|
|
4
4
|
export declare function handler(plugin: RapidPlugin, ctx: ActionHandlerContext, options: any): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActionHandlerContext } from "
|
|
2
|
-
import { RapidPlugin } from "
|
|
1
|
+
import { ActionHandlerContext } from "../../../core/actionHandler";
|
|
2
|
+
import { RapidPlugin } from "../../../core/server";
|
|
3
3
|
export declare const code = "getMyProfile";
|
|
4
4
|
export declare function handler(plugin: RapidPlugin, ctx: ActionHandlerContext, options: any): Promise<void>;
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* This plugin provide:
|
|
4
4
|
* - routes for manage data in database.
|
|
5
5
|
*/
|
|
6
|
-
import { RpdApplicationConfig } from "
|
|
7
|
-
import { RpdServerPluginExtendingAbilities, RpdServerPluginConfigurableTargetOptions, RpdConfigurationItemOptions, IRpdServer, RapidPlugin } from "
|
|
6
|
+
import { RpdApplicationConfig } from "../../types";
|
|
7
|
+
import { RpdServerPluginExtendingAbilities, RpdServerPluginConfigurableTargetOptions, RpdConfigurationItemOptions, IRpdServer, RapidPlugin } from "../../core/server";
|
|
8
8
|
declare class DataManager implements RapidPlugin {
|
|
9
9
|
get code(): string;
|
|
10
10
|
get description(): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RunEntityActionHandlerOptions } from "
|
|
2
|
-
import { ActionHandlerContext } from "
|
|
3
|
-
import { RapidPlugin } from "
|
|
1
|
+
import { RunEntityActionHandlerOptions } from "../../../types";
|
|
2
|
+
import { ActionHandlerContext } from "../../../core/actionHandler";
|
|
3
|
+
import { RapidPlugin } from "../../../core/server";
|
|
4
4
|
export declare const code = "addEntityRelations";
|
|
5
5
|
export declare function handler(plugin: RapidPlugin, ctx: ActionHandlerContext, options: RunEntityActionHandlerOptions): Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RunEntityActionHandlerOptions } from "
|
|
2
|
-
import { ActionHandlerContext } from "
|
|
3
|
-
import { RapidPlugin } from "
|
|
1
|
+
import { RunEntityActionHandlerOptions } from "../../../types";
|
|
2
|
+
import { ActionHandlerContext } from "../../../core/actionHandler";
|
|
3
|
+
import { RapidPlugin } from "../../../core/server";
|
|
4
4
|
export declare const code = "countCollectionEntities";
|
|
5
5
|
export declare function handler(plugin: RapidPlugin, ctx: ActionHandlerContext, options: RunEntityActionHandlerOptions): Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RunEntityActionHandlerOptions } from "
|
|
2
|
-
import { ActionHandlerContext } from "
|
|
3
|
-
import { RapidPlugin } from "
|
|
1
|
+
import { RunEntityActionHandlerOptions } from "../../../types";
|
|
2
|
+
import { ActionHandlerContext } from "../../../core/actionHandler";
|
|
3
|
+
import { RapidPlugin } from "../../../core/server";
|
|
4
4
|
export declare const code = "createCollectionEntitiesBatch";
|
|
5
5
|
export declare function handler(plugin: RapidPlugin, ctx: ActionHandlerContext, options: RunEntityActionHandlerOptions): Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RunEntityActionHandlerOptions } from "
|
|
2
|
-
import { ActionHandlerContext } from "
|
|
3
|
-
import { RapidPlugin } from "
|
|
1
|
+
import { RunEntityActionHandlerOptions } from "../../../types";
|
|
2
|
+
import { ActionHandlerContext } from "../../../core/actionHandler";
|
|
3
|
+
import { RapidPlugin } from "../../../core/server";
|
|
4
4
|
export declare const code = "createCollectionEntity";
|
|
5
5
|
export declare function handler(plugin: RapidPlugin, ctx: ActionHandlerContext, options: RunEntityActionHandlerOptions): Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RunEntityActionHandlerOptions } from "
|
|
2
|
-
import { ActionHandlerContext } from "
|
|
3
|
-
import { RapidPlugin } from "
|
|
1
|
+
import { RunEntityActionHandlerOptions } from "../../../types";
|
|
2
|
+
import { ActionHandlerContext } from "../../../core/actionHandler";
|
|
3
|
+
import { RapidPlugin } from "../../../core/server";
|
|
4
4
|
export declare const code = "deleteCollectionEntityById";
|
|
5
5
|
export declare function handler(plugin: RapidPlugin, ctx: ActionHandlerContext, options: RunEntityActionHandlerOptions): Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RunEntityActionHandlerOptions } from "
|
|
2
|
-
import { ActionHandlerContext } from "
|
|
3
|
-
import { RapidPlugin } from "
|
|
1
|
+
import { RunEntityActionHandlerOptions } from "../../../types";
|
|
2
|
+
import { ActionHandlerContext } from "../../../core/actionHandler";
|
|
3
|
+
import { RapidPlugin } from "../../../core/server";
|
|
4
4
|
export declare const code = "findCollectionEntities";
|
|
5
5
|
export declare function handler(plugin: RapidPlugin, ctx: ActionHandlerContext, options: RunEntityActionHandlerOptions): Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RunEntityActionHandlerOptions } from "
|
|
2
|
-
import { ActionHandlerContext } from "
|
|
3
|
-
import { RapidPlugin } from "
|
|
1
|
+
import { RunEntityActionHandlerOptions } from "../../../types";
|
|
2
|
+
import { ActionHandlerContext } from "../../../core/actionHandler";
|
|
3
|
+
import { RapidPlugin } from "../../../core/server";
|
|
4
4
|
export declare const code = "findCollectionEntityById";
|
|
5
5
|
export declare function handler(plugin: RapidPlugin, ctx: ActionHandlerContext, options: RunEntityActionHandlerOptions): Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RunQueryDatabaseHandlerOptions } from "
|
|
2
|
-
import { ActionHandlerContext } from "
|
|
3
|
-
import { RapidPlugin } from "
|
|
1
|
+
import { RunQueryDatabaseHandlerOptions } from "../../../types";
|
|
2
|
+
import { ActionHandlerContext } from "../../../core/actionHandler";
|
|
3
|
+
import { RapidPlugin } from "../../../core/server";
|
|
4
4
|
export declare const code = "queryDatabase";
|
|
5
5
|
export declare function handler(plugin: RapidPlugin, ctx: ActionHandlerContext, options: RunQueryDatabaseHandlerOptions): Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RunEntityActionHandlerOptions } from "
|
|
2
|
-
import { ActionHandlerContext } from "
|
|
3
|
-
import { RapidPlugin } from "
|
|
1
|
+
import { RunEntityActionHandlerOptions } from "../../../types";
|
|
2
|
+
import { ActionHandlerContext } from "../../../core/actionHandler";
|
|
3
|
+
import { RapidPlugin } from "../../../core/server";
|
|
4
4
|
export declare const code = "removeEntityRelations";
|
|
5
5
|
export declare function handler(plugin: RapidPlugin, ctx: ActionHandlerContext, options: RunEntityActionHandlerOptions): Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RunEntityActionHandlerOptions } from "
|
|
2
|
-
import { ActionHandlerContext } from "
|
|
3
|
-
import { RapidPlugin } from "
|
|
1
|
+
import { RunEntityActionHandlerOptions } from "../../../types";
|
|
2
|
+
import { ActionHandlerContext } from "../../../core/actionHandler";
|
|
3
|
+
import { RapidPlugin } from "../../../core/server";
|
|
4
4
|
export declare const code = "updateCollectionEntityById";
|
|
5
5
|
export declare function handler(plugin: RapidPlugin, ctx: ActionHandlerContext, options: RunEntityActionHandlerOptions): Promise<void>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* File manager plugin
|
|
3
3
|
*/
|
|
4
|
-
import { RpdApplicationConfig } from "
|
|
5
|
-
import { IRpdServer, RapidPlugin, RpdConfigurationItemOptions, RpdServerPluginConfigurableTargetOptions, RpdServerPluginExtendingAbilities } from "
|
|
4
|
+
import { RpdApplicationConfig } from "../../types";
|
|
5
|
+
import { IRpdServer, RapidPlugin, RpdConfigurationItemOptions, RpdServerPluginConfigurableTargetOptions, RpdServerPluginExtendingAbilities } from "../../core/server";
|
|
6
6
|
declare class FileManager implements RapidPlugin {
|
|
7
7
|
get code(): string;
|
|
8
8
|
get description(): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActionHandlerContext } from "
|
|
2
|
-
import { RapidPlugin } from "
|
|
1
|
+
import { ActionHandlerContext } from "../../../core/actionHandler";
|
|
2
|
+
import { RapidPlugin } from "../../../core/server";
|
|
3
3
|
export declare const code = "downloadDocument";
|
|
4
4
|
export declare function handler(plugin: RapidPlugin, ctx: ActionHandlerContext, options: any): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActionHandlerContext } from "
|
|
2
|
-
import { RapidPlugin } from "
|
|
1
|
+
import { ActionHandlerContext } from "../../../core/actionHandler";
|
|
2
|
+
import { RapidPlugin } from "../../../core/server";
|
|
3
3
|
export declare const code = "downloadFile";
|
|
4
4
|
export declare function handler(plugin: RapidPlugin, ctx: ActionHandlerContext, options: any): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActionHandlerContext } from "
|
|
2
|
-
import { RapidPlugin } from "
|
|
1
|
+
import { ActionHandlerContext } from "../../../core/actionHandler";
|
|
2
|
+
import { RapidPlugin } from "../../../core/server";
|
|
3
3
|
export declare const code = "uploadFile";
|
|
4
4
|
export declare function handler(plugin: RapidPlugin, ctx: ActionHandlerContext, options: any): Promise<void>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Meta manager plugin
|
|
3
3
|
*/
|
|
4
|
-
import { RpdApplicationConfig } from "
|
|
5
|
-
import { IRpdServer, RapidPlugin, RpdConfigurationItemOptions, RpdServerPluginConfigurableTargetOptions, RpdServerPluginExtendingAbilities } from "
|
|
4
|
+
import { RpdApplicationConfig } from "../../types";
|
|
5
|
+
import { IRpdServer, RapidPlugin, RpdConfigurationItemOptions, RpdServerPluginConfigurableTargetOptions, RpdServerPluginExtendingAbilities } from "../../core/server";
|
|
6
6
|
declare class MetaManager implements RapidPlugin {
|
|
7
7
|
get code(): string;
|
|
8
8
|
get description(): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActionHandlerContext } from "
|
|
2
|
-
import { RapidPlugin } from "
|
|
1
|
+
import { ActionHandlerContext } from "../../../core/actionHandler";
|
|
2
|
+
import { RapidPlugin } from "../../../core/server";
|
|
3
3
|
export declare const code = "getMetaModelDetail";
|
|
4
4
|
export declare function handler(plugin: RapidPlugin, ctx: ActionHandlerContext, options: any): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActionHandlerContext } from "
|
|
2
|
-
import { RapidPlugin } from "
|
|
1
|
+
import { ActionHandlerContext } from "../../../core/actionHandler";
|
|
2
|
+
import { RapidPlugin } from "../../../core/server";
|
|
3
3
|
export declare const code = "listMetaModels";
|
|
4
4
|
export declare function handler(plugin: RapidPlugin, ctx: ActionHandlerContext, options: any): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActionHandlerContext } from "
|
|
2
|
-
import { RapidPlugin } from "
|
|
1
|
+
import { ActionHandlerContext } from "../../../core/actionHandler";
|
|
2
|
+
import { RapidPlugin } from "../../../core/server";
|
|
3
3
|
export declare const code = "listMetaRoutes";
|
|
4
4
|
export declare function handler(plugin: RapidPlugin, ctx: ActionHandlerContext, options: any): Promise<void>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Route manager plugin
|
|
3
3
|
*/
|
|
4
|
-
import { RpdApplicationConfig } from "
|
|
5
|
-
import { RpdServerPluginExtendingAbilities, RpdServerPluginConfigurableTargetOptions, RpdConfigurationItemOptions, IRpdServer, RapidPlugin } from "
|
|
4
|
+
import { RpdApplicationConfig } from "../../types";
|
|
5
|
+
import { RpdServerPluginExtendingAbilities, RpdServerPluginConfigurableTargetOptions, RpdConfigurationItemOptions, IRpdServer, RapidPlugin } from "../../core/server";
|
|
6
6
|
declare class RouteManager implements RapidPlugin {
|
|
7
7
|
get code(): string;
|
|
8
8
|
get description(): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RunProxyHandlerOptions } from "
|
|
2
|
-
import { ActionHandlerContext } from "
|
|
3
|
-
import { RapidPlugin } from "
|
|
1
|
+
import { RunProxyHandlerOptions } from "../../../types";
|
|
2
|
+
import { ActionHandlerContext } from "../../../core/actionHandler";
|
|
3
|
+
import { RapidPlugin } from "../../../core/server";
|
|
4
4
|
export declare const code = "httpProxy";
|
|
5
5
|
export declare function handler(plugin: RapidPlugin, ctx: ActionHandlerContext, options: RunProxyHandlerOptions): Promise<void>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Webhooks plugin
|
|
3
3
|
*/
|
|
4
|
-
import { RpdApplicationConfig, RpdEntityCreateEventPayload, RpdEntityDeleteEventPayload, RpdEntityUpdateEventPayload, RpdServerEventTypes } from "
|
|
5
|
-
import { RpdServerPluginExtendingAbilities, RpdServerPluginConfigurableTargetOptions, RpdConfigurationItemOptions, IRpdServer, RapidPlugin } from "
|
|
4
|
+
import { RpdApplicationConfig, RpdEntityCreateEventPayload, RpdEntityDeleteEventPayload, RpdEntityUpdateEventPayload, RpdServerEventTypes } from "../../types";
|
|
5
|
+
import { RpdServerPluginExtendingAbilities, RpdServerPluginConfigurableTargetOptions, RpdConfigurationItemOptions, IRpdServer, RapidPlugin } from "../../core/server";
|
|
6
6
|
export interface Webhook {
|
|
7
7
|
name: string;
|
|
8
8
|
url: string;
|
package/dist/proxy/mod.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ProxyContext, ProxyOptions } from "./types";
|
|
2
|
-
import { RouteContext } from "
|
|
2
|
+
import { RouteContext } from "../core/routeContext";
|
|
3
3
|
export declare function doProxy(sourceRouterCtx: RouteContext, options: ProxyOptions): Promise<void>;
|
|
4
4
|
export declare function createProxyContext(sourceRouterCtx: RouteContext, options: ProxyOptions): {
|
|
5
5
|
sourceContext: {
|
package/dist/proxy/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { RapidRequest } from "
|
|
1
|
+
import { RapidRequest } from "../core/request";
|
|
2
2
|
import { RunProxyHandlerOptions } from "../types";
|
|
3
|
-
import { RapidResponse } from "
|
|
3
|
+
import { RapidResponse } from "../core/response";
|
|
4
4
|
export interface ProxyContext {
|
|
5
5
|
sourceContext: ProxySourceContext;
|
|
6
6
|
targetContext: ProxyTargetContext;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ruiapp/rapid-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"keywords": [],
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"@types/node": "^20.11.16",
|
|
13
13
|
"rimraf": "^3.0.2",
|
|
14
14
|
"rollup": "^2.79.1",
|
|
15
|
-
"rollup-plugin-tsconfig-paths": "^1.5.2",
|
|
16
15
|
"rollup-plugin-typescript2": "^0.34.1",
|
|
16
|
+
"tsc-alias": "^1.8.8",
|
|
17
17
|
"typescript": "^4.8.4"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
package/rollup.config.js
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
|
+
import { exec } from "child_process";
|
|
1
2
|
import typescript from 'rollup-plugin-typescript2';
|
|
2
|
-
|
|
3
|
+
|
|
4
|
+
const tscAlias = () => {
|
|
5
|
+
return {
|
|
6
|
+
name: "tsAlias",
|
|
7
|
+
writeBundle: () => {
|
|
8
|
+
return new Promise((resolve, reject) => {
|
|
9
|
+
exec("tsc-alias", function callback(error, stdout, stderr) {
|
|
10
|
+
if (stderr || error) {
|
|
11
|
+
reject(stderr || error);
|
|
12
|
+
} else {
|
|
13
|
+
resolve(stdout);
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
};
|
|
3
20
|
|
|
4
21
|
export default {
|
|
5
22
|
input: ["src/index.ts"],
|
|
@@ -13,7 +30,7 @@ export default {
|
|
|
13
30
|
],
|
|
14
31
|
plugins: [
|
|
15
32
|
typescript(),
|
|
16
|
-
|
|
33
|
+
tscAlias(),
|
|
17
34
|
],
|
|
18
35
|
external: [
|
|
19
36
|
]
|