Skip to content

Commit

Permalink
Merge pull request #259 from vitalygashkov/next
Browse files Browse the repository at this point in the history
Added plugin loader package, improved global plugin API, added `install` function in `@streamyx/core` to load plugin
  • Loading branch information
vitalygashkov authored Dec 1, 2024
2 parents 12ecdf5 + ca89e71 commit 1be32bf
Showing 23 changed files with 541 additions and 44 deletions.
2 changes: 1 addition & 1 deletion apps/cli
Submodule cli updated from 6ae695 to 378e26
289 changes: 286 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@streamyx/api",
"version": "0.0.2",
"version": "0.0.5",
"description": "Type definitions for the latest Streamyx API",
"main": "streamyx.js",
"types": "streamyx.d.ts",
4 changes: 2 additions & 2 deletions packages/api/streamyx.d.ts
Original file line number Diff line number Diff line change
@@ -3,5 +3,5 @@ import './types/global';
export * from './types/app';
export * from './types/http';
export * from './types/logger';
export * from './types/prompt';
export * from './types/utils';
export * from './types/question';
export * from './types/common';
8 changes: 1 addition & 7 deletions packages/api/types/app.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
import type { AppLogger } from './logger';
import type { AppPrompt } from './prompt';
import type { AppUtils } from './utils';

export type App = {
log: AppLogger;
prompt: AppPrompt;
utils: AppUtils;
version: string;
};
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export type AppUtils = {
export type Common = {
sanitizeString: (text: string) => string;

execUrlPatterns: (
url: string,
patterns: string[],
baseUrls: string[]
baseUrls: string[],
) => {
pathname: Record<string, string | undefined>;
search: Record<string, string | undefined>;
12 changes: 8 additions & 4 deletions packages/api/types/global.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import { App } from './app';
import { AppStorage } from './storage';
import { AppHttp } from './http';
import { AppLogger } from './logger';
import { HttpClient } from './http';
import { Logger } from './logger';
import { Question } from './question';
import { Common } from './common';

declare global {
const app: App;
const storage: AppStorage;
const http: AppHttp;
const logger: AppLogger;
const http: HttpClient;
const logger: Logger;
const question: Question;
const common: Common;
}
Loading

0 comments on commit 1be32bf

Please sign in to comment.