@pipelab/shared 1.0.0-beta.22 → 1.0.0-beta.26

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/dist/index.d.mts CHANGED
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ import * as _pipelab_migration0 from "@pipelab/migration";
2
3
  import * as valibot from "valibot";
3
4
  import { GenericSchema, InferInput, InferOutput } from "valibot";
4
5
  import { ILogObjMeta, Logger } from "tslog";
@@ -10,6 +11,38 @@ import { WebSocket } from "ws";
10
11
  import { IncomingMessage as IncomingMessage$1 } from "http";
11
12
  import { SandboxFolder } from "@pipelab/constants";
12
13
 
14
+ //#region src/quickjs.d.ts
15
+ /**
16
+ * Creates a QuickJS instance from an already-resolved variant.
17
+ * Callers are responsible for importing and passing the correct variant
18
+ * for their environment (Node vs browser) using a static import.
19
+ */
20
+ declare const createQuickJsFromVariant: (variant: any) => Promise<{
21
+ run: (code: string, params: Record<string, unknown>) => any;
22
+ createContext: () => {
23
+ run: (code: string, params: Record<string, unknown>) => any;
24
+ dispose: () => void;
25
+ };
26
+ }>;
27
+ declare const createQuickJs: () => Promise<{
28
+ run: (code: string, params: Record<string, unknown>) => any;
29
+ createContext: () => {
30
+ run: (code: string, params: Record<string, unknown>) => any;
31
+ dispose: () => void;
32
+ };
33
+ }>;
34
+ type CreateQuickJSFn = ReturnType<typeof createQuickJs>;
35
+ //#endregion
36
+ //#region src/variables.d.ts
37
+ interface VariableBase {
38
+ value: string;
39
+ id: string;
40
+ name: string;
41
+ description: string;
42
+ }
43
+ type Variable = VariableBase;
44
+ declare const variableToFormattedVariable: (vm: Awaited<CreateQuickJSFn>, variables: Variable[]) => Promise<Record<string, string>>;
45
+ //#endregion
13
46
  //#region src/config/migrators.d.ts
14
47
  interface Migrator<T> {
15
48
  migrate: (data: any, options?: any) => Promise<T>;
@@ -381,38 +414,6 @@ declare const createEvent: <T extends Omit<Event$1, "type">>(event: T) => T & {
381
414
  type: "event";
382
415
  };
383
416
  //#endregion
384
- //#region src/quickjs.d.ts
385
- /**
386
- * Creates a QuickJS instance from an already-resolved variant.
387
- * Callers are responsible for importing and passing the correct variant
388
- * for their environment (Node vs browser) using a static import.
389
- */
390
- declare const createQuickJsFromVariant: (variant: any) => Promise<{
391
- run: (code: string, params: Record<string, unknown>) => any;
392
- createContext: () => {
393
- run: (code: string, params: Record<string, unknown>) => any;
394
- dispose: () => void;
395
- };
396
- }>;
397
- declare const createQuickJs: () => Promise<{
398
- run: (code: string, params: Record<string, unknown>) => any;
399
- createContext: () => {
400
- run: (code: string, params: Record<string, unknown>) => any;
401
- dispose: () => void;
402
- };
403
- }>;
404
- type CreateQuickJSFn = ReturnType<typeof createQuickJs>;
405
- //#endregion
406
- //#region src/variables.d.ts
407
- interface VariableBase {
408
- value: string;
409
- id: string;
410
- name: string;
411
- description: string;
412
- }
413
- type Variable = VariableBase;
414
- declare const variableToFormattedVariable: (vm: Awaited<CreateQuickJSFn>, variables: Variable[]) => Promise<Record<string, string>>;
415
- //#endregion
416
417
  //#region src/utils.d.ts
417
418
  declare const foo = "bar";
418
419
  type WithId<T> = T extends string | number ? never : T & {
@@ -1678,6 +1679,7 @@ type IpcDefinition = {
1678
1679
  version: string;
1679
1680
  channel: ReleaseChannel;
1680
1681
  }>];
1682
+ "system:packages:cleanup": [void, EndEvent$1<boolean>];
1681
1683
  "startup:progress": [void, {
1682
1684
  type: "progress";
1683
1685
  data: {
@@ -4402,15 +4404,257 @@ declare const isRequired: (param: InputDefinition) => boolean;
4402
4404
  declare const isRenderer: () => boolean;
4403
4405
  //#endregion
4404
4406
  //#region src/index.d.ts
4405
- declare const appSettingsMigrator: any;
4406
- declare const defaultAppSettings: any;
4407
- declare const fileRepoMigrations: any;
4408
- declare const defaultFileRepo: any;
4409
- declare const savedFileMigrator: any;
4407
+ declare const appSettingsMigrator: _pipelab_migration0.Migrator<{
4408
+ version: "1.0.0";
4409
+ theme: "light" | "dark";
4410
+ cacheFolder: string;
4411
+ }, {
4412
+ version: "7.0.0";
4413
+ theme: "light" | "dark";
4414
+ locale: "en-US" | "fr-FR" | "pt-BR" | "zh-CN" | "es-ES" | "de-DE";
4415
+ tours: {
4416
+ dashboard: {
4417
+ step: number;
4418
+ completed: boolean;
4419
+ };
4420
+ editor: {
4421
+ step: number;
4422
+ completed: boolean;
4423
+ };
4424
+ };
4425
+ agents: {
4426
+ id: string;
4427
+ name: string;
4428
+ url: string;
4429
+ }[];
4430
+ plugins: {
4431
+ name: string;
4432
+ enabled: boolean;
4433
+ description: string;
4434
+ }[];
4435
+ autosave: boolean;
4436
+ cacheFolder?: string;
4437
+ tempFolder?: string;
4438
+ }>;
4439
+ declare const defaultAppSettings: {
4440
+ version: "7.0.0";
4441
+ theme: "light" | "dark";
4442
+ locale: "en-US" | "fr-FR" | "pt-BR" | "zh-CN" | "es-ES" | "de-DE";
4443
+ tours: {
4444
+ dashboard: {
4445
+ step: number;
4446
+ completed: boolean;
4447
+ };
4448
+ editor: {
4449
+ step: number;
4450
+ completed: boolean;
4451
+ };
4452
+ };
4453
+ agents: {
4454
+ id: string;
4455
+ name: string;
4456
+ url: string;
4457
+ }[];
4458
+ plugins: {
4459
+ name: string;
4460
+ enabled: boolean;
4461
+ description: string;
4462
+ }[];
4463
+ autosave: boolean;
4464
+ cacheFolder?: string;
4465
+ tempFolder?: string;
4466
+ };
4467
+ declare const fileRepoMigrations: _pipelab_migration0.Migrator<{
4468
+ version: "1.0.0";
4469
+ data?: {
4470
+ [x: string]: {
4471
+ type: "external";
4472
+ id: string;
4473
+ summary: {
4474
+ name: string;
4475
+ plugins: string[];
4476
+ description: string;
4477
+ };
4478
+ project: string;
4479
+ path: string;
4480
+ lastModified: string;
4481
+ } | {
4482
+ type: "internal";
4483
+ id: string;
4484
+ project: string;
4485
+ lastModified: string;
4486
+ configName: string;
4487
+ } | {
4488
+ type: "pipelab-cloud";
4489
+ id: string;
4490
+ project: string;
4491
+ };
4492
+ };
4493
+ }, {
4494
+ version: "3.0.0";
4495
+ projects: {
4496
+ id: string;
4497
+ name: string;
4498
+ description: string;
4499
+ }[];
4500
+ pipelines?: ({
4501
+ type: "external";
4502
+ id: string;
4503
+ summary: {
4504
+ name: string;
4505
+ plugins: string[];
4506
+ description: string;
4507
+ };
4508
+ project: string;
4509
+ path: string;
4510
+ lastModified: string;
4511
+ } | {
4512
+ type: "internal";
4513
+ id: string;
4514
+ project: string;
4515
+ lastModified: string;
4516
+ configName: string;
4517
+ } | {
4518
+ type: "pipelab-cloud";
4519
+ id: string;
4520
+ project: string;
4521
+ })[];
4522
+ }>;
4523
+ declare const defaultFileRepo: {
4524
+ version: "3.0.0";
4525
+ projects: {
4526
+ id: string;
4527
+ name: string;
4528
+ description: string;
4529
+ }[];
4530
+ pipelines?: ({
4531
+ type: "external";
4532
+ id: string;
4533
+ summary: {
4534
+ name: string;
4535
+ plugins: string[];
4536
+ description: string;
4537
+ };
4538
+ project: string;
4539
+ path: string;
4540
+ lastModified: string;
4541
+ } | {
4542
+ type: "internal";
4543
+ id: string;
4544
+ project: string;
4545
+ lastModified: string;
4546
+ configName: string;
4547
+ } | {
4548
+ type: "pipelab-cloud";
4549
+ id: string;
4550
+ project: string;
4551
+ })[];
4552
+ };
4553
+ declare const savedFileMigrator: _pipelab_migration0.Migrator<{
4554
+ version: "1.0.0";
4555
+ name: string;
4556
+ description: string;
4557
+ variables: VariableBase[];
4558
+ canvas: {
4559
+ blocks: ({
4560
+ type: "action";
4561
+ params: {
4562
+ [x: string]: any;
4563
+ };
4564
+ uid: string;
4565
+ origin: {
4566
+ pluginId: string;
4567
+ nodeId: string;
4568
+ version?: string;
4569
+ };
4570
+ disabled?: boolean;
4571
+ } | {
4572
+ type: "event";
4573
+ params: {
4574
+ [x: string]: any;
4575
+ };
4576
+ uid: string;
4577
+ origin: {
4578
+ pluginId: string;
4579
+ nodeId: string;
4580
+ version?: string;
4581
+ };
4582
+ })[];
4583
+ };
4584
+ }, {
4585
+ version: "5.0.0";
4586
+ name: string;
4587
+ description: string;
4588
+ variables: VariableBase[];
4589
+ canvas: {
4590
+ blocks: {
4591
+ type: "action";
4592
+ params: {
4593
+ [x: string]: {
4594
+ editor: "editor" | "simple";
4595
+ value: unknown;
4596
+ };
4597
+ };
4598
+ uid: string;
4599
+ origin: {
4600
+ pluginId: string;
4601
+ nodeId: string;
4602
+ version?: string;
4603
+ };
4604
+ name?: string;
4605
+ disabled?: boolean;
4606
+ }[];
4607
+ triggers: {
4608
+ type: "event";
4609
+ params: {
4610
+ [x: string]: any;
4611
+ };
4612
+ uid: string;
4613
+ origin: {
4614
+ pluginId: string;
4615
+ nodeId: string;
4616
+ version?: string;
4617
+ };
4618
+ }[];
4619
+ };
4620
+ }>;
4410
4621
  declare const configRegistry: Record<string, Migrator<any>>;
4411
4622
  declare const normalizePipelineConfig: (state: any) => boolean;
4412
- declare const connectionsMigrator: any;
4413
- declare const defaultConnections: any;
4623
+ declare const connectionsMigrator: _pipelab_migration0.Migrator<{
4624
+ version: "1.0.0";
4625
+ connections: ({
4626
+ id: string;
4627
+ name: string;
4628
+ pluginName: string;
4629
+ createdAt: string;
4630
+ isDefault: boolean;
4631
+ } & {
4632
+ [key: string]: unknown;
4633
+ })[];
4634
+ }, {
4635
+ version: "1.0.0";
4636
+ connections: ({
4637
+ id: string;
4638
+ name: string;
4639
+ pluginName: string;
4640
+ createdAt: string;
4641
+ isDefault: boolean;
4642
+ } & {
4643
+ [key: string]: unknown;
4644
+ })[];
4645
+ }>;
4646
+ declare const defaultConnections: {
4647
+ version: "1.0.0";
4648
+ connections: ({
4649
+ id: string;
4650
+ name: string;
4651
+ pluginName: string;
4652
+ createdAt: string;
4653
+ isDefault: boolean;
4654
+ } & {
4655
+ [key: string]: unknown;
4656
+ })[];
4657
+ };
4414
4658
  //#endregion
4415
4659
  export { Action, Agent, type AppConfig, type AppConfigV1, type AppConfigV2, type AppConfigV3, type AppConfigV4, type AppConfigV5, type AppConfigV6, type AppConfigV7, AppSettingsValidator, AppSettingsValidatorV1, AppSettingsValidatorV2, AppSettingsValidatorV3, AppSettingsValidatorV4, AppSettingsValidatorV5, AppSettingsValidatorV6, AppSettingsValidatorV7, AuthorizationCheck, AuthorizationContext, BaseNode, BenefitNotFoundError, Block, BlockAction, BlockComment, BlockEvent, BuildHistoryEntry, BuildHistoryQuery, BuildHistoryResponse, Channels, type Connection, ConnectionValidator, type ConnectionsConfig, type ConnectionsConfigV1, ConnectionsValidator, ConnectionsValidatorV1, Context, ControlType, ControlTypeArray, ControlTypeBase, ControlTypeBoolean, ControlTypeCheckbox, ControlTypeColor, ControlTypeElectronConfigureV2, ControlTypeExpression, ControlTypeInput, ControlTypeJSON, ControlTypeMultiSelect, ControlTypeNetlifySite, ControlTypePath, ControlTypeSelect, CreateQuickJSFn, Data$1 as Data, DataResult, Database, EditorParam, EditorParamValidatorV3, End, EndEvent, EnhancedFile, Enums, Event$1 as Event, Events, ExecutionError, ExecutionStep, Expression, ExtractInputsFromAction, ExtractInputsFromEvent, ExtractInputsFromExpression, type FileRepo, FileRepoProjectValidatorV2, type FileRepoV1, type FileRepoV2, type FileRepoV3, FileRepoValidator, FileRepoValidatorV1, FileRepoValidatorV2, FileRepoValidatorV3, GetDataEntries, GetDataKeys, GetFlowEntries, GetFlowKeys, HandleListenerRenderer, HandleListenerRendererSendFn, IBuildHistoryStorage, IconType, InputDefinition, InputOutputDefinition, InputsDefinition, InputsOutputsDefinition, IntegrationDefinition, IntegrationField, type IpcDefinition, IpcEvent, IpcMessage, Json, Locales, LogEntry, MainPluginDefinition, MessageSchema, Meta, MigrationChannel, MigrationOptions, type Migrator, type NodeId, Origin, OriginValidator, OutputDefinition, OutputsDefinition, ParamsToInput, PathOptions, PipelabNode, PipelabSelectOption, PluginDefinition, Position, Preset, PresetFn, PresetResult, Presets, PropType, RELEASE_SYNC, ReleaseChannel, RendererChannels, RendererData, RendererEnd, RendererEvents, type IpcDefinition$1 as RendererIpcDefinition, RendererMessage, RendererNodeDefinition, RendererPluginDefinition, type RequestId as RendererRequestId, type RequestId$1 as RequestId, SaveLocation, SaveLocationExternal, SaveLocationExternalValidator, SaveLocationInternal, SaveLocationInternalValidator, SaveLocationPipelabCloud, SaveLocationPipelabCloudValidator, SaveLocationValidator, SavedFile, SavedFileDefault, SavedFileDefaultValidatorV4, SavedFileDefaultValidatorV5, SavedFileSimple, SavedFileSimpleValidatorV4, SavedFileSimpleValidatorV5, SavedFileV1, SavedFileV2, SavedFileV3, SavedFileV4, SavedFileV5, SavedFileValidator, SavedFileValidatorV1, SavedFileValidatorV2, SavedFileValidatorV3, SavedFileValidatorV4, SavedFileValidatorV5, SetOutputActionFn, SetOutputExpressionFn, ShellChannels, StableDataReport, Steps, SubscriptionBenefit, SubscriptionError, SubscriptionExpiredError, SubscriptionRequiredError, Tables, TablesInsert, TablesUpdate, UnauthorizedError, UpdateStatus, Variable, VariableBase, VariableValidatorV1, WebSocketAPI, WebSocketClientConfig, WebSocketClientEvents, WebSocketConnectionError, WebSocketConnectionInfo, WebSocketConnectionState, WebSocketError, WebSocketErrorMessage, WebSocketEvent, WebSocketHandler, WebSocketListener, WebSocketManager, WebSocketMessage, WebSocketMessageType, WebSocketRequestMessage, WebSocketResponseMessage, WebSocketResponseType, WebSocketSendFunction, WebSocketServerConfig, WebSocketServerEvents, WebSocketTimeoutError, WithId, appSettingsMigrator, configRegistry, connectionsMigrator, createAction, createArray, createBooleanParam, createColorPicker, createDefinition, createEvent, createExpression, createNetlifySiteParam, createNodeDefinition, createNumberParam, createPasswordParam, createPathParam, createQuickJs, createQuickJsFromVariant, createRawParam, createStringParam, createSubscriptionError, createVersionSchema, __json_default_export as de_DE, defaultAppSettings, defaultConnections, defaultFileRepo, __json_default_export$1 as en_US, __json_default_export$2 as es_ES, fileRepoMigrations, fmt, foo, __json_default_export$3 as fr_FR, getSubscriptionErrorMessage, isRenderer, isRequired, isSubscriptionError, isSupabaseAvailable, isWebSocketErrorMessage, isWebSocketRequestMessage, isWebSocketResponseMessage, makeResolvedParams, newVariant, normalizePipelineConfig, processGraph, __json_default_export$4 as pt_BR, savedFileMigrator, supabase, transformUrl, useLogger, usePlugins, variableToFormattedVariable, __json_default_export$5 as zh_CN };
4416
4660
  //# sourceMappingURL=index.d.mts.map