@pipelab/shared 0.0.1

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.
Files changed (55) hide show
  1. package/.oxfmtrc.json +3 -0
  2. package/.turbo/turbo-build.log +41 -0
  3. package/.turbo/turbo-format.log +6 -0
  4. package/.turbo/turbo-lint.log +156 -0
  5. package/CHANGELOG.md +44 -0
  6. package/LICENSE +110 -0
  7. package/README.md +3 -0
  8. package/dist/index.d.mts +3649 -0
  9. package/dist/index.d.mts.map +1 -0
  10. package/dist/index.mjs +43748 -0
  11. package/dist/index.mjs.map +1 -0
  12. package/package.json +53 -0
  13. package/src/apis.ts +193 -0
  14. package/src/build-history.ts +131 -0
  15. package/src/config/migrators.ts +291 -0
  16. package/src/config/projects-definition.ts +25 -0
  17. package/src/config/projects-types.ts +25 -0
  18. package/src/config/projects.ts +1 -0
  19. package/src/config/settings-definition.ts +21 -0
  20. package/src/config/settings.ts +21 -0
  21. package/src/config.schema.ts +147 -0
  22. package/src/database.types.ts +95 -0
  23. package/src/errors.ts +11 -0
  24. package/src/evaluator.ts +58 -0
  25. package/src/fmt.ts +5 -0
  26. package/src/graph.ts +207 -0
  27. package/src/i18n/de_DE.json +86 -0
  28. package/src/i18n/en_US.json +158 -0
  29. package/src/i18n/es_ES.json +86 -0
  30. package/src/i18n/fr_FR.json +89 -0
  31. package/src/i18n/pt_BR.json +86 -0
  32. package/src/i18n/zh_CN.json +86 -0
  33. package/src/i18n-utils.ts +10 -0
  34. package/src/index.ts +51 -0
  35. package/src/ipc.types.ts +73 -0
  36. package/src/logger.ts +20 -0
  37. package/src/migrations/model.ts +1 -0
  38. package/src/migrations/projects.ts +1 -0
  39. package/src/migrations/settings.ts +1 -0
  40. package/src/model.test.ts +214 -0
  41. package/src/model.ts +233 -0
  42. package/src/plugins/definitions.ts +472 -0
  43. package/src/plugins.ts +20 -0
  44. package/src/quickjs.ts +98 -0
  45. package/src/save-location.ts +42 -0
  46. package/src/subscription-errors.ts +87 -0
  47. package/src/supabase.ts +28 -0
  48. package/src/tests/helpers.ts +5 -0
  49. package/src/types.ts +3 -0
  50. package/src/utils.ts +3 -0
  51. package/src/validation.ts +16 -0
  52. package/src/variables.ts +27 -0
  53. package/src/wasm.d.ts +9 -0
  54. package/src/websocket.types.ts +186 -0
  55. package/tsconfig.json +13 -0
package/.oxfmtrc.json ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "ignorePatterns": ["dist", "out", "node_modules", "bin"]
3
+ }
@@ -0,0 +1,41 @@
1
+
2
+
3
+ > @pipelab/shared@1.0.0-beta.2 build /run/media/armaldio/SSD/Projects/Pipelab/pipelab/packages/shared
4
+ > tsdown
5
+
6
+ ℹ tsdown v0.21.2 powered by rolldown v1.0.0-rc.9
7
+ ℹ entry: src/index.ts
8
+ ℹ tsconfig: tsconfig.json
9
+ ℹ Build start
10
+ ℹ Cleaning 4 files
11
+ ℹ Hint: consider adding deps.onlyBundle option to avoid unintended bundling of dependencies, or set deps.onlyBundle: false to disable this hint.
12
+ See more at https://tsdown.dev/options/dependencies#deps-onlybundle
13
+ Detected dependencies in bundle:
14
+ - electron
15
+ - @vue/shared
16
+ - @vue/reactivity
17
+ - @vue/runtime-core
18
+ - @vue/runtime-dom
19
+ - vue
20
+ - entities
21
+ - @babel/parser
22
+ - estree-walker
23
+ - source-map-js
24
+ - @vue/compiler-core
25
+ - @vue/compiler-dom
26
+ ℹ dist/index.mjs  1.65 MB
27
+ ℹ dist/index.mjs.map  2.94 MB
28
+ ℹ dist/index.d.mts.map 134.25 kB │ gzip: 36.79 kB
29
+ ℹ dist/index.d.mts 148.52 kB │ gzip: 26.96 kB
30
+ ℹ 4 files, total: 4.87 MB
31
+ src/plugins/definitions.d.ts (2:9) [MISSING_EXPORT] Warning: "OpenDialogOptions" is not exported by "../../node_modules/electron/electron.d.ts".
32
+ ╭─[ src/plugins/definitions.d.ts:2:10 ]
33
+ │
34
+ 2 │ import { OpenDialogOptions } from "electron";
35
+  │ ────────┬────────
36
+  │ ╰────────── Missing export
37
+  │
38
+  │ Note: If you meant to import a type rather than a value, make sure to add the `type` modifier (e.g. `import { type Foo } from 'electron'`).
39
+ ───╯
40
+
41
+ ✔ Build complete in 2158ms
@@ -0,0 +1,6 @@
1
+
2
+
3
+ > @pipelab/shared@1.0.0-beta.0 format /run/media/armaldio/SSD/Projects/Pipelab/pipelab/packages/shared
4
+ > oxfmt .
5
+
6
+ Finished in 1002ms on 47 files using 16 threads.
@@ -0,0 +1,156 @@
1
+
2
+
3
+ > @pipelab/shared@1.0.0-beta.0 lint /run/media/armaldio/SSD/Projects/Pipelab/pipelab/packages/shared
4
+ > oxlint .
5
+
6
+
7
+ âš  ]8;;https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-unused-vars.html\eslint(no-unused-vars)]8;;\: Variable 'locale' is declared but never used. Unused variables should start with a '_'.
8
+ ╭─[src/config/migrators.ts:80:17]
9
+ 79 │ down: (state) => {
10
+ 80 │ const { locale, ...rest } = state as AppConfigV4;
11
+ ·  ───┬──
12
+ · ╰── 'locale' is declared here
13
+ 81 │ return rest as unknown as AppConfigV3;
14
+ ╰────
15
+  help: Consider removing this declaration.
16
+
17
+ âš  ]8;;https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-unused-vars.html\eslint(no-unused-vars)]8;;\: Variable 'tours' is declared but never used. Unused variables should start with a '_'.
18
+ ╭─[src/config/migrators.ts:100:17]
19
+  99 │ down: (state) => {
20
+ 100 │ const { tours, ...rest } = state as AppConfigV5;
21
+ ·  ──┬──
22
+ · ╰── 'tours' is declared here
23
+ 101 │ return rest as unknown as AppConfigV4;
24
+ ╰────
25
+  help: Consider removing this declaration.
26
+
27
+ âš  ]8;;https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-unused-vars.html\eslint(no-unused-vars)]8;;\: Variable 'autosave' is declared but never used. Unused variables should start with a '_'.
28
+ ╭─[src/config/migrators.ts:111:17]
29
+ 110 │ down: (state) => {
30
+ 111 │ const { autosave, ...rest } = state as AppConfigV6;
31
+ ·  ────┬───
32
+ · ╰── 'autosave' is declared here
33
+ 112 │ return rest as unknown as AppConfigV5;
34
+ ╰────
35
+  help: Consider removing this declaration.
36
+
37
+ âš  ]8;;https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-unused-vars.html\eslint(no-unused-vars)]8;;\: Variable 'agents' is declared but never used. Unused variables should start with a '_'.
38
+ ╭─[src/config/migrators.ts:122:17]
39
+ 121 │ down: (state) => {
40
+ 122 │ const { agents, ...rest } = state as AppConfigV7;
41
+ ·  ───┬──
42
+ · ╰── 'agents' is declared here
43
+ 123 │ return rest as unknown as AppConfigV6;
44
+ ╰────
45
+  help: Consider removing this declaration.
46
+
47
+ âš  ]8;;https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-unused-vars.html\eslint(no-unused-vars)]8;;\: Parameter 'state' is declared but never used. Unused parameters should start with a '_'.
48
+ ╭─[src/config/migrators.ts:186:14]
49
+ 185 │ up: finalVersion,
50
+ 186 │ down: (state) => {
51
+ ·  ──┬──
52
+ · ╰── 'state' is declared here
53
+ 187 │ throw new Error("Cannot downgrade to version 1.0.0");
54
+ ╰────
55
+  help: Consider removing this parameter.
56
+
57
+ âš  ]8;;https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-unused-vars.html\eslint(no-unused-vars)]8;;\: Catch parameter 'e' is caught but never used.
58
+ ╭─[src/evaluator.ts:30:16]
59
+ 29 │ continue;
60
+ 30 │ } catch (e) {
61
+ ·  ┬
62
+ · ╰── 'e' is declared here
63
+ 31 │ // Not a simple JSON value, proceed to QuickJS evaluation
64
+ ╰────
65
+  help: Consider handling this error.
66
+
67
+ âš  ]8;;https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-unused-vars.html\eslint(no-unused-vars)]8;;\: Identifier 'IpcMessage' is imported but never used.
68
+ ╭─[src/websocket.types.ts:1:39]
69
+ 1 │ import { Channels, Data, Events, End, IpcMessage, RequestId } from "./apis";
70
+ ·  ─────┬────
71
+ · ╰── 'IpcMessage' is imported here
72
+ 2 │ import { WebSocket as WSWebSocket } from "ws";
73
+ ╰────
74
+  help: Consider removing this import.
75
+
76
+ âš  ]8;;https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-unused-vars.html\eslint(no-unused-vars)]8;;\: Parameter 'requestId' is declared but never used. Unused parameters should start with a '_'.
77
+ ╭─[src/websocket.types.ts:152:5]
78
+ 151 │ public timeout: number,
79
+ 152 │ requestId?: RequestId,
80
+ ·  ────┬────
81
+ · ╰── 'requestId' is declared here
82
+ 153 │ ) {
83
+ ╰────
84
+  help: Consider removing this parameter.
85
+
86
+ âš  ]8;;https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-unused-vars.html\eslint(no-unused-vars)]8;;\: Variable 'pluginDefinition' is declared but never used. Unused variables should start with a '_'.
87
+ ╭─[src/graph.ts:64:11]
88
+ 63 │
89
+ 64 │ const pluginDefinition = getPluginDefinition(node.origin.pluginId, options.definitions);
90
+ ·  ────────┬───────
91
+ · ╰── 'pluginDefinition' is declared here
92
+ 65 │ const nodeDefinition = getNodeDefinition(
93
+ ╰────
94
+  help: Consider removing this declaration.
95
+
96
+ âš  ]8;;https://oxc.rs/docs/guide/usage/linter/rules/typescript/no-unnecessary-parameter-property-assignment.html\typescript-eslint(no-unnecessary-parameter-property-assignment)]8;;\: Assignment of parameter property is unnecessary
97
+ ╭─[src/quickjs.ts:12:5]
98
+ 11 │ super(description);
99
+ 12 │ this.name = name;
100
+ ·  ────────────────
101
+ 13 │ }
102
+ ╰────
103
+  help: Remove the unnecessary assignment
104
+
105
+ âš  ]8;;https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-unused-vars.html\eslint(no-unused-vars)]8;;\: Identifier 'AppConfig' is imported but never used.
106
+ ╭─[src/apis.ts:5:10]
107
+ 4 │ import { PresetResult, Steps } from "./model";
108
+ 5 │ import { AppConfig } from "./config.schema";
109
+ ·  ────┬────
110
+ · ╰── 'AppConfig' is imported here
111
+ 6 │ import { Agent } from "./websocket.types";
112
+ ╰────
113
+  help: Consider removing this import.
114
+
115
+ âš  ]8;;https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-unused-vars.html\eslint(no-unused-vars)]8;;\: Identifier 'RetentionPolicy' is imported but never used.
116
+ ╭─[src/apis.ts:12:3]
117
+ 11 │ BuildHistoryConfig,
118
+ 12 │ RetentionPolicy,
119
+ ·  ───────┬───────
120
+ · ╰── 'RetentionPolicy' is imported here
121
+ 13 │ } from "./build-history";
122
+ ╰────
123
+  help: Consider removing this import.
124
+
125
+ âš  ]8;;https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-unused-vars.html\eslint(no-unused-vars)]8;;\: Type 'BrowserWindow' is imported but never used.
126
+ ╭─[src/plugins/definitions.ts:2:15]
127
+ 1 │ import type { ConditionalPick } from "type-fest";
128
+ 2 │ import type { BrowserWindow, OpenDialogOptions } from "electron";
129
+ ·  ──────┬──────
130
+ · ╰── 'BrowserWindow' is imported here
131
+ 3 │
132
+ ╰────
133
+  help: Consider removing this import.
134
+
135
+ âš  ]8;;https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-unused-vars.html\eslint(no-unused-vars)]8;;\: Variable 'BlockConditionValidator' is declared but never used. Unused variables should start with a '_'.
136
+ ╭─[src/model.ts:73:7]
137
+ 72 │
138
+ 73 │ const BlockConditionValidator: GenericSchema<BlockCondition> = object({
139
+ ·  ───────────┬───────────
140
+ · ╰── 'BlockConditionValidator' is declared here
141
+ 74 │ type: literal("condition"),
142
+ ╰────
143
+  help: Consider removing this declaration.
144
+
145
+ âš  ]8;;https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-unused-vars.html\eslint(no-unused-vars)]8;;\: Variable 'BlockLoopValidator' is declared but never used. Unused variables should start with a '_'.
146
+ ╭─[src/model.ts:89:7]
147
+ 88 │ };
148
+ 89 │ const BlockLoopValidator: GenericSchema<BlockLoop> = object({
149
+ ·  ─────────┬────────
150
+ · ╰── 'BlockLoopValidator' is declared here
151
+ 90 │ type: literal("loop"),
152
+ ╰────
153
+  help: Consider removing this declaration.
154
+
155
+ Found 15 warnings and 0 errors.
156
+ Finished in 30ms on 36 files with 93 rules using 16 threads.
package/CHANGELOG.md ADDED
@@ -0,0 +1,44 @@
1
+ # @pipelab/shared
2
+
3
+ ## 1.0.0-beta.4
4
+
5
+ ### Patch Changes
6
+
7
+ - beta tag
8
+ - Updated dependencies
9
+ - @pipelab/migration@1.0.0-beta.4
10
+
11
+ ## 1.0.0-beta.3
12
+
13
+ ### Patch Changes
14
+
15
+ - bump
16
+ - Updated dependencies
17
+ - @pipelab/migration@1.0.0-beta.3
18
+
19
+ ## 1.0.0-beta.2
20
+
21
+ ### Patch Changes
22
+
23
+ - update
24
+ - Updated dependencies
25
+ - @pipelab/migration@1.0.0-beta.2
26
+
27
+ ## 1.0.0-beta.1
28
+
29
+ ### Patch Changes
30
+
31
+ - general improvements
32
+ - Updated dependencies
33
+ - @pipelab/migration@1.0.0-beta.1
34
+
35
+ ## 1.0.0-beta.0
36
+
37
+ ### Major Changes
38
+
39
+ - e1befbf: initial release
40
+
41
+ ### Patch Changes
42
+
43
+ - Updated dependencies [e1befbf]
44
+ - @pipelab/migration@1.0.0-beta.0
package/LICENSE ADDED
@@ -0,0 +1,110 @@
1
+ # Functional Source License, Version 1.1, MIT Future License
2
+
3
+ ## Abbreviation
4
+
5
+ FSL-1.1-MIT
6
+
7
+ ## Notice
8
+
9
+ Copyright 2026 CynToolkit
10
+
11
+ ## Terms and Conditions
12
+
13
+ ### Licensor ("We")
14
+
15
+ The party offering the Software under these Terms and Conditions.
16
+
17
+ ### The Software
18
+
19
+ The "Software" is each version of the software that we make available under
20
+ these Terms and Conditions, as indicated by our inclusion of these Terms and
21
+ Conditions with the Software.
22
+
23
+ ### License Grant
24
+
25
+ Subject to your compliance with this License Grant and the Patents,
26
+ Redistribution and Trademark clauses below, we hereby grant you the right to
27
+ use, copy, modify, create derivative works, publicly perform, publicly display
28
+ and redistribute the Software for any Permitted Purpose identified below.
29
+
30
+ ### Permitted Purpose
31
+
32
+ A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
33
+ means making the Software available to others in a commercial product or
34
+ service that:
35
+
36
+ 1. substitutes for the Software;
37
+
38
+ 2. substitutes for any other product or service we offer using the Software
39
+ that exists as of the date we make the Software available; or
40
+
41
+ 3. offers the same or substantially similar functionality as the Software.
42
+
43
+ Permitted Purposes specifically include using the Software:
44
+
45
+ 1. for your internal use and access;
46
+
47
+ 2. for non-commercial education;
48
+
49
+ 3. for non-commercial research; and
50
+
51
+ 4. in connection with professional services that you provide to a licensee
52
+ using the Software in accordance with these Terms and Conditions.
53
+
54
+ ### Patents
55
+
56
+ To the extent your use for a Permitted Purpose would necessarily infringe our
57
+ patents, the license grant above includes a license under our patents. If you
58
+ make a claim against any party that the Software infringes or contributes to
59
+ the infringement of any patent, then your patent license to the Software ends
60
+ immediately.
61
+
62
+ ### Redistribution
63
+
64
+ The Terms and Conditions apply to all copies, modifications and derivatives of
65
+ the Software.
66
+
67
+ If you redistribute any copies, modifications or derivatives of the Software,
68
+ you must include a copy of or a link to these Terms and Conditions and not
69
+ remove any copyright notices provided in or with the Software.
70
+
71
+ ### Disclaimer
72
+
73
+ THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
74
+ IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
75
+ PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
76
+
77
+ IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
78
+ SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
79
+ EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
80
+
81
+ ### Trademarks
82
+
83
+ Except for displaying the License Details and identifying us as the origin of
84
+ the Software, you have no right under these Terms and Conditions to use our
85
+ trademarks, trade names, service marks or product names.
86
+
87
+ ## Grant of Future License
88
+
89
+ We hereby irrevocably grant you an additional license to use the Software under
90
+ the MIT license that is effective on the second anniversary of the date we make
91
+ the Software available. On or after that date, you may use the Software under
92
+ the MIT license, in which case the following will apply:
93
+
94
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
95
+ this software and associated documentation files (the "Software"), to deal in
96
+ the Software without restriction, including without limitation the rights to
97
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
98
+ of the Software, and to permit persons to whom the Software is furnished to do
99
+ so, subject to the following conditions:
100
+
101
+ The above copyright notice and this permission notice shall be included in all
102
+ copies or substantial portions of the Software.
103
+
104
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
105
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
106
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
107
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
108
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
109
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
110
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # @pipelab/shared
2
+
3
+ Shared models, types, and utility functions used by both the frontend and backend of Pipelab.