@pipelab/shared 1.0.0-beta.14 → 1.0.0-beta.17
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/CHANGELOG.md +27 -0
- package/dist/index.d.mts +516 -406
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +48 -12
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/apis.ts +86 -7
- package/src/config/migrators.ts +2 -3
- package/src/config.schema.ts +2 -1
- package/src/i18n/de_DE.json +7 -1
- package/src/i18n/en_US.json +7 -1
- package/src/i18n/es_ES.json +7 -1
- package/src/i18n/fr_FR.json +7 -1
- package/src/i18n/pt_BR.json +7 -1
- package/src/i18n/zh_CN.json +7 -1
- package/src/model.test.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipelab/shared",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.17",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Shared logic and types for the Pipelab ecosystem",
|
|
6
6
|
"license": "FSL-1.1-MIT",
|
|
@@ -37,15 +37,15 @@
|
|
|
37
37
|
"tslog": "4.9.3",
|
|
38
38
|
"type-fest": "4.26.1",
|
|
39
39
|
"valibot": "0.42.1",
|
|
40
|
-
"@pipelab/constants": "1.0.0-beta.
|
|
41
|
-
"@pipelab/migration": "1.0.0-beta.
|
|
40
|
+
"@pipelab/constants": "1.0.0-beta.19",
|
|
41
|
+
"@pipelab/migration": "1.0.0-beta.17"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"esbuild-plugin-wasm": "1.1.0",
|
|
45
45
|
"tsdown": "0.21.2",
|
|
46
46
|
"typescript": "5.9.3",
|
|
47
47
|
"vitest": "3.1.4",
|
|
48
|
-
"@pipelab/tsconfig": "1.0.0-beta.
|
|
48
|
+
"@pipelab/tsconfig": "1.0.0-beta.17"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
51
|
"build": "tsdown",
|
package/src/apis.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { RendererPluginDefinition } from "./plugins/definitions";
|
|
2
2
|
import { User, UserResponse } from "@supabase/supabase-js";
|
|
3
3
|
import type { Tagged } from "type-fest";
|
|
4
|
-
import { PresetResult, Steps } from "./model";
|
|
5
|
-
import { AppConfig } from "./config.schema";
|
|
4
|
+
import { PresetResult, Steps, SavedFile } from "./model";
|
|
5
|
+
import { AppConfig, ConnectionsConfig } from "./config.schema";
|
|
6
|
+
import { FileRepo } from "./config/projects-definition";
|
|
6
7
|
import { Agent } from "./websocket.types";
|
|
7
8
|
import { BuildHistoryEntry, BuildHistoryQuery, BuildHistoryResponse } from "./build-history";
|
|
8
9
|
|
|
@@ -25,6 +26,62 @@ type EndEvent<DATA> = {
|
|
|
25
26
|
|
|
26
27
|
export type Presets = Record<string, PresetResult>;
|
|
27
28
|
|
|
29
|
+
export type StableDataReport = {
|
|
30
|
+
sourceChannel: "Stable" | "Beta" | "Dev";
|
|
31
|
+
targetChannel: "Stable" | "Beta" | "Dev";
|
|
32
|
+
|
|
33
|
+
// Settings
|
|
34
|
+
settingsExists: boolean;
|
|
35
|
+
settingsVersion: string | null;
|
|
36
|
+
settingsVersionTarget: string | null;
|
|
37
|
+
settingsMtimeSource: number;
|
|
38
|
+
settingsMtimeTarget: number;
|
|
39
|
+
settingsImportable: boolean;
|
|
40
|
+
|
|
41
|
+
// Connections
|
|
42
|
+
connectionsExists: boolean;
|
|
43
|
+
connectionsCount: number;
|
|
44
|
+
connectionsVersion: string | null;
|
|
45
|
+
connectionsVersionTarget: string | null;
|
|
46
|
+
connectionsMtimeSource: number;
|
|
47
|
+
connectionsMtimeTarget: number;
|
|
48
|
+
connectionsImportable: boolean;
|
|
49
|
+
|
|
50
|
+
// Projects
|
|
51
|
+
projectsExists: boolean;
|
|
52
|
+
projectsVersion: string | null;
|
|
53
|
+
projectsVersionTarget: string | null;
|
|
54
|
+
projectsMtimeSource: number;
|
|
55
|
+
projectsMtimeTarget: number;
|
|
56
|
+
projectsImportable: boolean;
|
|
57
|
+
|
|
58
|
+
projects: Array<{
|
|
59
|
+
id: string;
|
|
60
|
+
name: string;
|
|
61
|
+
description: string;
|
|
62
|
+
pipelines: Array<{
|
|
63
|
+
id: string;
|
|
64
|
+
name: string;
|
|
65
|
+
description: string;
|
|
66
|
+
type: "internal" | "external" | "pipelab-cloud";
|
|
67
|
+
lastModifiedStable?: string;
|
|
68
|
+
lastModifiedBeta?: string;
|
|
69
|
+
existsInBeta: boolean;
|
|
70
|
+
}>;
|
|
71
|
+
}>;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export type ReleaseChannel = "stable" | "beta" | "dev";
|
|
75
|
+
export type MigrationChannel = "stable" | "beta";
|
|
76
|
+
|
|
77
|
+
export type MigrationOptions = {
|
|
78
|
+
migrateSettings: boolean;
|
|
79
|
+
migrateConnections: boolean;
|
|
80
|
+
selectedProjects: string[];
|
|
81
|
+
selectedPipelines: string[];
|
|
82
|
+
sourceChannel?: MigrationChannel;
|
|
83
|
+
};
|
|
84
|
+
|
|
28
85
|
export type IpcDefinition = {
|
|
29
86
|
"fs:read": [
|
|
30
87
|
// input
|
|
@@ -95,10 +152,24 @@ export type IpcDefinition = {
|
|
|
95
152
|
|
|
96
153
|
"constants:get": [void, EndEvent<{ result: { userData: string } }>];
|
|
97
154
|
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
|
|
155
|
+
"settings:load": [void, EndEvent<AppConfig>];
|
|
156
|
+
"settings:save": [{ data: AppConfig }, EndEvent<"ok">];
|
|
157
|
+
"settings:reset": [{ key: string }, EndEvent<"ok">];
|
|
158
|
+
|
|
159
|
+
"connections:load": [void, EndEvent<ConnectionsConfig>];
|
|
160
|
+
"connections:save": [{ data: ConnectionsConfig }, EndEvent<"ok">];
|
|
161
|
+
"connections:reset": [{ key: string }, EndEvent<"ok">];
|
|
162
|
+
|
|
163
|
+
"projects:load": [void, EndEvent<FileRepo>];
|
|
164
|
+
"projects:save": [{ data: FileRepo }, EndEvent<"ok">];
|
|
165
|
+
"projects:reset": [{ key: string }, EndEvent<"ok">];
|
|
166
|
+
|
|
167
|
+
"pipeline:load-by-name": [{ name: string }, EndEvent<SavedFile>];
|
|
168
|
+
"pipeline:load-by-path": [{ path: string }, EndEvent<SavedFile>];
|
|
169
|
+
"pipeline:save-by-name": [{ name: string; data: string }, EndEvent<"ok">];
|
|
170
|
+
"pipeline:save-by-path": [{ path: string; data: string }, EndEvent<"ok">];
|
|
171
|
+
"pipeline:delete-by-name": [{ name: string }, EndEvent<"ok">];
|
|
172
|
+
"pipeline:delete-by-path": [{ path: string }, EndEvent<"ok">];
|
|
102
173
|
"action:cancel": [void, EndEvent<{ result: "ok" | "ko" }>];
|
|
103
174
|
|
|
104
175
|
// Build History APIs
|
|
@@ -150,7 +221,10 @@ export type IpcDefinition = {
|
|
|
150
221
|
{ name: string; options?: any },
|
|
151
222
|
EndEvent<{ data: any | null; error: any | null }>,
|
|
152
223
|
];
|
|
153
|
-
"agent:version:get": [
|
|
224
|
+
"agent:version:get": [
|
|
225
|
+
void,
|
|
226
|
+
EndEvent<{ version: string; channel: ReleaseChannel }>,
|
|
227
|
+
];
|
|
154
228
|
"startup:progress": [
|
|
155
229
|
void,
|
|
156
230
|
{ type: "progress"; data: { message: string } } | { type: "ready" } | { type: "done" },
|
|
@@ -193,6 +267,11 @@ export type IpcDefinition = {
|
|
|
193
267
|
{ plugins: Record<string, string> },
|
|
194
268
|
EndEvent<{ loaded: string[]; failed: string[] }>,
|
|
195
269
|
];
|
|
270
|
+
"migration:scan-stable": [
|
|
271
|
+
{ sourceChannel?: MigrationChannel },
|
|
272
|
+
EndEvent<StableDataReport>,
|
|
273
|
+
];
|
|
274
|
+
"migration:perform": [MigrationOptions, EndEvent<{ result: "ok" }>];
|
|
196
275
|
};
|
|
197
276
|
|
|
198
277
|
export type Channels = keyof IpcDefinition;
|
package/src/config/migrators.ts
CHANGED
|
@@ -86,7 +86,6 @@ export const defaultAppSettings = settingsMigratorInternal.createDefault({
|
|
|
86
86
|
},
|
|
87
87
|
},
|
|
88
88
|
plugins: DEFAULT_PLUGINS,
|
|
89
|
-
isInternalMigrationBannerClosed: false,
|
|
90
89
|
});
|
|
91
90
|
|
|
92
91
|
export const appSettingsMigrator = settingsMigratorInternal.createMigrations({
|
|
@@ -138,12 +137,12 @@ export const appSettingsMigrator = settingsMigratorInternal.createMigrations({
|
|
|
138
137
|
createMigration<AppConfigV6, AppConfigV7>({
|
|
139
138
|
version: "6.0.0" as SemVer,
|
|
140
139
|
up: (state) => {
|
|
141
|
-
const { cacheFolder
|
|
140
|
+
const { cacheFolder, clearTemporaryFoldersOnPipelineEnd: __, ...rest } = state;
|
|
142
141
|
return {
|
|
143
142
|
...rest,
|
|
143
|
+
cacheFolder,
|
|
144
144
|
agents: [],
|
|
145
145
|
plugins: DEFAULT_PLUGINS,
|
|
146
|
-
isInternalMigrationBannerClosed: false,
|
|
147
146
|
};
|
|
148
147
|
},
|
|
149
148
|
}),
|
package/src/config.schema.ts
CHANGED
|
@@ -137,7 +137,8 @@ export const AppSettingsValidatorV7 = object({
|
|
|
137
137
|
description: string(),
|
|
138
138
|
}),
|
|
139
139
|
),
|
|
140
|
-
|
|
140
|
+
cacheFolder: optional(string()),
|
|
141
|
+
tempFolder: optional(string()),
|
|
141
142
|
});
|
|
142
143
|
|
|
143
144
|
export const ConnectionValidator = looseObject({
|
package/src/i18n/de_DE.json
CHANGED
|
@@ -137,8 +137,14 @@
|
|
|
137
137
|
"migrate-to-internal": "In Arbeitsbereich verschieben",
|
|
138
138
|
"only-internal-supported-notice": "Pipelab verwaltet jetzt alle Pipelines im Arbeitsbereich der Anwendung. Externe Dateien sind veraltet, können aber weiterhin importiert werden.",
|
|
139
139
|
"import-pipeline": "Pipeline importieren",
|
|
140
|
+
"import-from-stable": "Aus Stable importieren...",
|
|
141
|
+
"import-from-beta": "Aus Beta importieren...",
|
|
142
|
+
"import-pipeline-file": "Pipeline-Datei importieren (.pipelab)...",
|
|
140
143
|
"import-success": "Pipeline erfolgreich importiert",
|
|
141
|
-
"failed-to-read-file": "Ausgewählte Datei konnte nicht gelesen werden"
|
|
144
|
+
"failed-to-read-file": "Ausgewählte Datei konnte nicht gelesen werden",
|
|
145
|
+
"export-pipeline": "Pipeline exportieren...",
|
|
146
|
+
"export-success": "Pipeline erfolgreich exportiert",
|
|
147
|
+
"export-failed": "Fehler beim Exportieren der Pipeline"
|
|
142
148
|
},
|
|
143
149
|
"pipelines": {
|
|
144
150
|
"title": "@:headers.pipelines"
|
package/src/i18n/en_US.json
CHANGED
|
@@ -137,8 +137,14 @@
|
|
|
137
137
|
"migrate-to-internal": "Move to Workspace",
|
|
138
138
|
"only-internal-supported-notice": "Pipelab now manages all pipelines within the application workspace. External files are deprecated, but can be imported into your workspace.",
|
|
139
139
|
"import-pipeline": "Import Pipeline",
|
|
140
|
+
"import-from-stable": "Import from Stable...",
|
|
141
|
+
"import-from-beta": "Import from Beta...",
|
|
142
|
+
"import-pipeline-file": "Import pipeline file (.pipelab)...",
|
|
140
143
|
"import-success": "Pipeline imported successfully",
|
|
141
|
-
"failed-to-read-file": "Failed to read the selected file"
|
|
144
|
+
"failed-to-read-file": "Failed to read the selected file",
|
|
145
|
+
"export-pipeline": "Export Pipeline...",
|
|
146
|
+
"export-success": "Pipeline exported successfully",
|
|
147
|
+
"export-failed": "Failed to export pipeline"
|
|
142
148
|
},
|
|
143
149
|
"pipelines": {
|
|
144
150
|
"title": "@:headers.pipelines"
|
package/src/i18n/es_ES.json
CHANGED
|
@@ -137,8 +137,14 @@
|
|
|
137
137
|
"migrate-to-internal": "Mover al espacio de trabajo",
|
|
138
138
|
"only-internal-supported-notice": "Pipelab ahora gestiona todos los pipelines dentro del espacio de trabajo. Los archivos externos están obsoletos, pero pueden importarse.",
|
|
139
139
|
"import-pipeline": "Importar Pipeline",
|
|
140
|
+
"import-from-stable": "Importar desde Stable...",
|
|
141
|
+
"import-from-beta": "Importar desde Beta...",
|
|
142
|
+
"import-pipeline-file": "Importar archivo de pipeline (.pipelab)...",
|
|
140
143
|
"import-success": "Pipeline importado con éxito",
|
|
141
|
-
"failed-to-read-file": "Error al leer el archivo seleccionado"
|
|
144
|
+
"failed-to-read-file": "Error al leer el archivo seleccionado",
|
|
145
|
+
"export-pipeline": "Exportar pipeline...",
|
|
146
|
+
"export-success": "Pipeline exportado correctamente",
|
|
147
|
+
"export-failed": "Error al exportar el pipeline"
|
|
142
148
|
},
|
|
143
149
|
"pipelines": {
|
|
144
150
|
"title": "@:headers.pipelines"
|
package/src/i18n/fr_FR.json
CHANGED
|
@@ -137,8 +137,14 @@
|
|
|
137
137
|
"migrate-to-internal": "Déplacer vers l'espace de travail",
|
|
138
138
|
"only-internal-supported-notice": "Pipelab gère désormais tous les pipelines au sein de l'espace de travail de l'application. Les fichiers externes sont obsolètes, mais peuvent toujours être importés.",
|
|
139
139
|
"import-pipeline": "Importer le Pipeline",
|
|
140
|
+
"import-from-stable": "Importer depuis Stable...",
|
|
141
|
+
"import-from-beta": "Importer depuis Beta...",
|
|
142
|
+
"import-pipeline-file": "Importer un fichier de pipeline (.pipelab)...",
|
|
140
143
|
"import-success": "Pipeline importé avec succès",
|
|
141
|
-
"failed-to-read-file": "Échec de la lecture du fichier sélectionné"
|
|
144
|
+
"failed-to-read-file": "Échec de la lecture du fichier sélectionné",
|
|
145
|
+
"export-pipeline": "Exporter le pipeline...",
|
|
146
|
+
"export-success": "Pipeline exporté avec succès",
|
|
147
|
+
"export-failed": "Échec de l'exportation du pipeline"
|
|
142
148
|
},
|
|
143
149
|
"pipelines": {
|
|
144
150
|
"title": "@:headers.pipelines"
|
package/src/i18n/pt_BR.json
CHANGED
|
@@ -137,8 +137,14 @@
|
|
|
137
137
|
"migrate-to-internal": "Mover para o espaço de trabalho",
|
|
138
138
|
"only-internal-supported-notice": "O Pipelab agora gerencia todas as pipelines dentro do espaço de trabalho do aplicativo. Arquivos externos foram descontinuados, mas podem ser importados.",
|
|
139
139
|
"import-pipeline": "Importar Pipeline",
|
|
140
|
+
"import-from-stable": "Importar do Stable...",
|
|
141
|
+
"import-from-beta": "Importar do Beta...",
|
|
142
|
+
"import-pipeline-file": "Importar arquivo de pipeline (.pipelab)...",
|
|
140
143
|
"import-success": "Pipeline importada com sucesso",
|
|
141
|
-
"failed-to-read-file": "Falha ao ler o arquivo selecionado"
|
|
144
|
+
"failed-to-read-file": "Falha ao ler o arquivo selecionado",
|
|
145
|
+
"export-pipeline": "Exportar pipeline...",
|
|
146
|
+
"export-success": "Pipeline exportado com sucesso",
|
|
147
|
+
"export-failed": "Falha ao exportar pipeline"
|
|
142
148
|
},
|
|
143
149
|
"pipelines": {
|
|
144
150
|
"title": "@:headers.pipelines"
|
package/src/i18n/zh_CN.json
CHANGED
|
@@ -137,8 +137,14 @@
|
|
|
137
137
|
"migrate-to-internal": "移动到工作区",
|
|
138
138
|
"only-internal-supported-notice": "Pipelab 现在管理应用工作区内的所有流水线。外部文件已被弃用,但仍可以导入。",
|
|
139
139
|
"import-pipeline": "导入流水线",
|
|
140
|
+
"import-from-stable": "从 Stable 导入...",
|
|
141
|
+
"import-from-beta": "从 Beta 导入...",
|
|
142
|
+
"import-pipeline-file": "导入管道文件 (.pipelab)...",
|
|
140
143
|
"import-success": "流水线已成功导入",
|
|
141
|
-
"failed-to-read-file": "读取所选文件失败"
|
|
144
|
+
"failed-to-read-file": "读取所选文件失败",
|
|
145
|
+
"export-pipeline": "导出流水线...",
|
|
146
|
+
"export-success": "流水线导出成功",
|
|
147
|
+
"export-failed": "导出流水线失败"
|
|
142
148
|
},
|
|
143
149
|
"pipelines": {
|
|
144
150
|
"title": "@:headers.pipelines"
|