@pipelab/shared 1.0.0-beta.14 → 1.0.0-beta.15
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 +9 -0
- package/dist/index.d.mts +504 -406
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +42 -12
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/apis.ts +75 -6
- package/src/config/migrators.ts +2 -3
- package/src/config.schema.ts +2 -1
- package/src/i18n/de_DE.json +6 -1
- package/src/i18n/en_US.json +6 -1
- package/src/i18n/es_ES.json +6 -1
- package/src/i18n/fr_FR.json +6 -1
- package/src/i18n/pt_BR.json +6 -1
- package/src/i18n/zh_CN.json +6 -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.15",
|
|
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.17",
|
|
41
|
+
"@pipelab/migration": "1.0.0-beta.15"
|
|
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.15"
|
|
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,58 @@ type EndEvent<DATA> = {
|
|
|
25
26
|
|
|
26
27
|
export type Presets = Record<string, PresetResult>;
|
|
27
28
|
|
|
29
|
+
export type StableDataReport = {
|
|
30
|
+
sourceChannel: "Stable" | "Beta";
|
|
31
|
+
targetChannel: "Stable" | "Beta";
|
|
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 MigrationOptions = {
|
|
75
|
+
migrateSettings: boolean;
|
|
76
|
+
migrateConnections: boolean;
|
|
77
|
+
selectedProjects: string[];
|
|
78
|
+
selectedPipelines: string[];
|
|
79
|
+
};
|
|
80
|
+
|
|
28
81
|
export type IpcDefinition = {
|
|
29
82
|
"fs:read": [
|
|
30
83
|
// input
|
|
@@ -95,10 +148,24 @@ export type IpcDefinition = {
|
|
|
95
148
|
|
|
96
149
|
"constants:get": [void, EndEvent<{ result: { userData: string } }>];
|
|
97
150
|
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
|
|
151
|
+
"settings:load": [void, EndEvent<AppConfig>];
|
|
152
|
+
"settings:save": [{ data: AppConfig }, EndEvent<"ok">];
|
|
153
|
+
"settings:reset": [{ key: string }, EndEvent<"ok">];
|
|
154
|
+
|
|
155
|
+
"connections:load": [void, EndEvent<ConnectionsConfig>];
|
|
156
|
+
"connections:save": [{ data: ConnectionsConfig }, EndEvent<"ok">];
|
|
157
|
+
"connections:reset": [{ key: string }, EndEvent<"ok">];
|
|
158
|
+
|
|
159
|
+
"projects:load": [void, EndEvent<FileRepo>];
|
|
160
|
+
"projects:save": [{ data: FileRepo }, EndEvent<"ok">];
|
|
161
|
+
"projects:reset": [{ key: string }, EndEvent<"ok">];
|
|
162
|
+
|
|
163
|
+
"pipeline:load-by-name": [{ name: string }, EndEvent<SavedFile>];
|
|
164
|
+
"pipeline:load-by-path": [{ path: string }, EndEvent<SavedFile>];
|
|
165
|
+
"pipeline:save-by-name": [{ name: string; data: string }, EndEvent<"ok">];
|
|
166
|
+
"pipeline:save-by-path": [{ path: string; data: string }, EndEvent<"ok">];
|
|
167
|
+
"pipeline:delete-by-name": [{ name: string }, EndEvent<"ok">];
|
|
168
|
+
"pipeline:delete-by-path": [{ path: string }, EndEvent<"ok">];
|
|
102
169
|
"action:cancel": [void, EndEvent<{ result: "ok" | "ko" }>];
|
|
103
170
|
|
|
104
171
|
// Build History APIs
|
|
@@ -193,6 +260,8 @@ export type IpcDefinition = {
|
|
|
193
260
|
{ plugins: Record<string, string> },
|
|
194
261
|
EndEvent<{ loaded: string[]; failed: string[] }>,
|
|
195
262
|
];
|
|
263
|
+
"migration:scan-stable": [void, EndEvent<StableDataReport>];
|
|
264
|
+
"migration:perform": [MigrationOptions, EndEvent<{ result: "ok" }>];
|
|
196
265
|
};
|
|
197
266
|
|
|
198
267
|
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,13 @@
|
|
|
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-pipeline-file": "Pipeline-Datei importieren (.pipelab)...",
|
|
140
142
|
"import-success": "Pipeline erfolgreich importiert",
|
|
141
|
-
"failed-to-read-file": "Ausgewählte Datei konnte nicht gelesen werden"
|
|
143
|
+
"failed-to-read-file": "Ausgewählte Datei konnte nicht gelesen werden",
|
|
144
|
+
"export-pipeline": "Pipeline exportieren...",
|
|
145
|
+
"export-success": "Pipeline erfolgreich exportiert",
|
|
146
|
+
"export-failed": "Fehler beim Exportieren der Pipeline"
|
|
142
147
|
},
|
|
143
148
|
"pipelines": {
|
|
144
149
|
"title": "@:headers.pipelines"
|
package/src/i18n/en_US.json
CHANGED
|
@@ -137,8 +137,13 @@
|
|
|
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-pipeline-file": "Import pipeline file (.pipelab)...",
|
|
140
142
|
"import-success": "Pipeline imported successfully",
|
|
141
|
-
"failed-to-read-file": "Failed to read the selected file"
|
|
143
|
+
"failed-to-read-file": "Failed to read the selected file",
|
|
144
|
+
"export-pipeline": "Export Pipeline...",
|
|
145
|
+
"export-success": "Pipeline exported successfully",
|
|
146
|
+
"export-failed": "Failed to export pipeline"
|
|
142
147
|
},
|
|
143
148
|
"pipelines": {
|
|
144
149
|
"title": "@:headers.pipelines"
|
package/src/i18n/es_ES.json
CHANGED
|
@@ -137,8 +137,13 @@
|
|
|
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-pipeline-file": "Importar archivo de pipeline (.pipelab)...",
|
|
140
142
|
"import-success": "Pipeline importado con éxito",
|
|
141
|
-
"failed-to-read-file": "Error al leer el archivo seleccionado"
|
|
143
|
+
"failed-to-read-file": "Error al leer el archivo seleccionado",
|
|
144
|
+
"export-pipeline": "Exportar pipeline...",
|
|
145
|
+
"export-success": "Pipeline exportado correctamente",
|
|
146
|
+
"export-failed": "Error al exportar el pipeline"
|
|
142
147
|
},
|
|
143
148
|
"pipelines": {
|
|
144
149
|
"title": "@:headers.pipelines"
|
package/src/i18n/fr_FR.json
CHANGED
|
@@ -137,8 +137,13 @@
|
|
|
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-pipeline-file": "Importer un fichier de pipeline (.pipelab)...",
|
|
140
142
|
"import-success": "Pipeline importé avec succès",
|
|
141
|
-
"failed-to-read-file": "Échec de la lecture du fichier sélectionné"
|
|
143
|
+
"failed-to-read-file": "Échec de la lecture du fichier sélectionné",
|
|
144
|
+
"export-pipeline": "Exporter le pipeline...",
|
|
145
|
+
"export-success": "Pipeline exporté avec succès",
|
|
146
|
+
"export-failed": "Échec de l'exportation du pipeline"
|
|
142
147
|
},
|
|
143
148
|
"pipelines": {
|
|
144
149
|
"title": "@:headers.pipelines"
|
package/src/i18n/pt_BR.json
CHANGED
|
@@ -137,8 +137,13 @@
|
|
|
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-pipeline-file": "Importar arquivo de pipeline (.pipelab)...",
|
|
140
142
|
"import-success": "Pipeline importada com sucesso",
|
|
141
|
-
"failed-to-read-file": "Falha ao ler o arquivo selecionado"
|
|
143
|
+
"failed-to-read-file": "Falha ao ler o arquivo selecionado",
|
|
144
|
+
"export-pipeline": "Exportar pipeline...",
|
|
145
|
+
"export-success": "Pipeline exportado com sucesso",
|
|
146
|
+
"export-failed": "Falha ao exportar pipeline"
|
|
142
147
|
},
|
|
143
148
|
"pipelines": {
|
|
144
149
|
"title": "@:headers.pipelines"
|
package/src/i18n/zh_CN.json
CHANGED
|
@@ -137,8 +137,13 @@
|
|
|
137
137
|
"migrate-to-internal": "移动到工作区",
|
|
138
138
|
"only-internal-supported-notice": "Pipelab 现在管理应用工作区内的所有流水线。外部文件已被弃用,但仍可以导入。",
|
|
139
139
|
"import-pipeline": "导入流水线",
|
|
140
|
+
"import-from-stable": "从 Stable 导入...",
|
|
141
|
+
"import-pipeline-file": "导入管道文件 (.pipelab)...",
|
|
140
142
|
"import-success": "流水线已成功导入",
|
|
141
|
-
"failed-to-read-file": "读取所选文件失败"
|
|
143
|
+
"failed-to-read-file": "读取所选文件失败",
|
|
144
|
+
"export-pipeline": "导出流水线...",
|
|
145
|
+
"export-success": "流水线导出成功",
|
|
146
|
+
"export-failed": "导出流水线失败"
|
|
142
147
|
},
|
|
143
148
|
"pipelines": {
|
|
144
149
|
"title": "@:headers.pipelines"
|