mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-21 00:01:22 +02:00
Some small tweaks for plugins
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@yaakapp/api",
|
"name": "@yaakapp/api",
|
||||||
"version": "0.5.0",
|
"version": "0.5.3",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"typings": "./lib/index.d.ts",
|
"typings": "./lib/index.d.ts",
|
||||||
"files": [
|
"files": [
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
|
||||||
export type Environment = { model: "environment", id: string, workspaceId: string, environmentId: string | null, createdAt: string, updatedAt: string, name: string, variables: Array<EnvironmentVariable>, };
|
export type Environment = { model: "environment", id: string, workspaceId: string, createdAt: string, updatedAt: string, name: string, public: boolean, base: boolean, variables: Array<EnvironmentVariable>, };
|
||||||
|
|
||||||
export type EnvironmentVariable = { enabled?: boolean, name: string, value: string, id?: string, };
|
export type EnvironmentVariable = { enabled?: boolean, name: string, value: string, id?: string, };
|
||||||
|
|
||||||
|
|||||||
@@ -3,3 +3,7 @@ export type * from './themes';
|
|||||||
|
|
||||||
export * from './bindings/gen_models';
|
export * from './bindings/gen_models';
|
||||||
export * from './bindings/gen_events';
|
export * from './bindings/gen_events';
|
||||||
|
|
||||||
|
// Some extras for utility
|
||||||
|
|
||||||
|
export type { PartialImportResources } from './plugins/ImporterPlugin';
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export interface Context {
|
|||||||
openUrl(
|
openUrl(
|
||||||
args: OpenWindowRequest & {
|
args: OpenWindowRequest & {
|
||||||
onNavigate?: (args: { url: string }) => void;
|
onNavigate?: (args: { url: string }) => void;
|
||||||
onClose: () => void;
|
onClose?: () => void;
|
||||||
},
|
},
|
||||||
): Promise<{ close: () => void }>;
|
): Promise<{ close: () => void }>;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { Context } from './Context';
|
import type { Context } from './Context';
|
||||||
|
|
||||||
export type FilterPluginResponse = { filtered: string };
|
type FilterPluginResponse = { filtered: string };
|
||||||
|
|
||||||
export type FilterPlugin = {
|
export type FilterPlugin = {
|
||||||
name: string;
|
name: string;
|
||||||
|
|||||||
@@ -1,15 +1,21 @@
|
|||||||
import { Environment, Folder, GrpcRequest, HttpRequest, Workspace } from '../bindings/gen_models';
|
import { ImportResources } from '../bindings/gen_events';
|
||||||
import type { AtLeast } from '../helpers';
|
import { AtLeast } from '../helpers';
|
||||||
import type { Context } from './Context';
|
import type { Context } from './Context';
|
||||||
|
|
||||||
type ImportPluginResponse = null | {
|
type RootFields = 'name' | 'id' | 'model';
|
||||||
resources: {
|
type CommonFields = RootFields | 'workspaceId';
|
||||||
workspaces: AtLeast<Workspace, 'name' | 'id' | 'model'>[];
|
|
||||||
environments: AtLeast<Environment, 'name' | 'id' | 'model' | 'workspaceId'>[];
|
export type PartialImportResources = {
|
||||||
folders: AtLeast<Folder, 'name' | 'id' | 'model' | 'workspaceId'>[];
|
workspaces: Array<AtLeast<ImportResources['workspaces'][0], RootFields>>;
|
||||||
httpRequests: AtLeast<HttpRequest, 'name' | 'id' | 'model' | 'workspaceId'>[];
|
environments: Array<AtLeast<ImportResources['environments'][0], CommonFields>>;
|
||||||
grpcRequests: AtLeast<GrpcRequest, 'name' | 'id' | 'model' | 'workspaceId'>[];
|
folders: Array<AtLeast<ImportResources['folders'][0], CommonFields>>;
|
||||||
};
|
httpRequests: Array<AtLeast<ImportResources['httpRequests'][0], CommonFields>>;
|
||||||
|
grpcRequests: Array<AtLeast<ImportResources['grpcRequests'][0], CommonFields>>;
|
||||||
|
websocketRequests: Array<AtLeast<ImportResources['websocketRequests'][0], CommonFields>>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type ImportPluginResponse = null | {
|
||||||
|
resources: PartialImportResources;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ImporterPlugin = {
|
export type ImporterPlugin = {
|
||||||
|
|||||||
@@ -258,7 +258,11 @@ const EnvironmentEditor = function ({
|
|||||||
)}
|
)}
|
||||||
</Heading>
|
</Heading>
|
||||||
{activeEnvironment.public && promptToEncrypt && (
|
{activeEnvironment.public && promptToEncrypt && (
|
||||||
<DismissibleBanner id={activeEnvironment.id} color="notice" className="mr-3">
|
<DismissibleBanner
|
||||||
|
id={`warn-unencrypted-${activeEnvironment.id}`}
|
||||||
|
color="notice"
|
||||||
|
className="mr-3"
|
||||||
|
>
|
||||||
This environment is sharable. Ensure variable values are encrypted to avoid accidental
|
This environment is sharable. Ensure variable values are encrypted to avoid accidental
|
||||||
leaking of secrets during directory sync or data export.
|
leaking of secrets during directory sync or data export.
|
||||||
</DismissibleBanner>
|
</DismissibleBanner>
|
||||||
|
|||||||
Reference in New Issue
Block a user