next-workflow-builder 0.4.0 → 0.4.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.
package/README.md CHANGED
@@ -162,7 +162,7 @@ For full documentation including configuration, authentication, database setup,
162
162
 
163
163
  ## Changelog
164
164
 
165
- Full [Changelog](CHANGELOG.md) file
165
+ Full [Changelog](./CHANGELOG.md) file
166
166
 
167
167
  ## License
168
168
 
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getIntegrationById
3
- } from "./chunk-BNYDOC3I.js";
3
+ } from "./chunk-BL6QJDNB.js";
4
4
  import {
5
5
  getCredentialMapping,
6
6
  getIntegration
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  db,
3
3
  integrations
4
- } from "./chunk-3MSAF2TH.js";
4
+ } from "./chunk-PGG52OSJ.js";
5
5
 
6
6
  // src/server/db/integrations.ts
7
7
  import "server-only";
@@ -9,7 +9,7 @@ import {
9
9
  workflowExecutions,
10
10
  workflowExecutionsRelations,
11
11
  workflows
12
- } from "./chunk-3MSAF2TH.js";
12
+ } from "./chunk-PGG52OSJ.js";
13
13
 
14
14
  // src/server/auth/index.ts
15
15
  import { betterAuth } from "better-auth";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  db,
3
3
  workflows
4
- } from "./chunk-3MSAF2TH.js";
4
+ } from "./chunk-PGG52OSJ.js";
5
5
 
6
6
  // src/server/lib/metadata.ts
7
7
  import { eq } from "drizzle-orm";
@@ -162,7 +162,7 @@ var schema = {
162
162
  apiKeys,
163
163
  integrations
164
164
  };
165
- var connectionString = process.env.DATABASE_URL || "postgres://localhost:5432/workflow";
165
+ var connectionString = process.env.__NWB_DATABASE_URL || process.env.DATABASE_URL || "postgres://localhost:5432/workflow";
166
166
  var migrationClient = postgres(connectionString, { max: 1 });
167
167
  var globalForDb = globalThis;
168
168
  var queryClient = globalForDb.queryClient ?? postgres(connectionString, { max: 10 });
@@ -1,15 +1,15 @@
1
- import "./chunk-7MUXUHEL.js";
1
+ import "./chunk-KZNRU3LB.js";
2
2
  import "./chunk-TFNZVQEH.js";
3
- import "./chunk-P3DTV3QS.js";
3
+ import "./chunk-F6HAK4HT.js";
4
4
  import "./chunk-5YYA34YV.js";
5
5
  import "./chunk-OQHML4II.js";
6
- import "./chunk-DJ7ANVJ3.js";
7
- import "./chunk-BNYDOC3I.js";
6
+ import "./chunk-2IJUDWUK.js";
7
+ import "./chunk-BL6QJDNB.js";
8
8
  import "./chunk-Z3BJJYHM.js";
9
9
  import "./chunk-O3I2INCD.js";
10
10
  import {
11
11
  withStepLogging
12
- } from "./chunk-3MSAF2TH.js";
12
+ } from "./chunk-PGG52OSJ.js";
13
13
 
14
14
  // src/plugins/condition/condition.ts
15
15
  import "server-only";
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  fetchCredentials
3
- } from "./chunk-DJ7ANVJ3.js";
4
- import "./chunk-BNYDOC3I.js";
3
+ } from "./chunk-2IJUDWUK.js";
4
+ import "./chunk-BL6QJDNB.js";
5
5
  import "./chunk-Z3BJJYHM.js";
6
6
  import {
7
7
  withStepLogging
8
- } from "./chunk-3MSAF2TH.js";
8
+ } from "./chunk-PGG52OSJ.js";
9
9
 
10
10
  // src/plugins/database-query/database-query.ts
11
11
  import "server-only";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-O3I2INCD.js";
4
4
  import {
5
5
  withStepLogging
6
- } from "./chunk-3MSAF2TH.js";
6
+ } from "./chunk-PGG52OSJ.js";
7
7
 
8
8
  // src/plugins/http-request/http-request.ts
9
9
  import "server-only";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  withStepLogging
3
- } from "./chunk-3MSAF2TH.js";
3
+ } from "./chunk-PGG52OSJ.js";
4
4
 
5
5
  // src/plugins/loop/loop.ts
6
6
  import "server-only";
@@ -1,15 +1,15 @@
1
- import "./chunk-7MUXUHEL.js";
1
+ import "./chunk-KZNRU3LB.js";
2
2
  import "./chunk-TFNZVQEH.js";
3
- import "./chunk-P3DTV3QS.js";
3
+ import "./chunk-F6HAK4HT.js";
4
4
  import "./chunk-5YYA34YV.js";
5
5
  import "./chunk-OQHML4II.js";
6
- import "./chunk-DJ7ANVJ3.js";
7
- import "./chunk-BNYDOC3I.js";
6
+ import "./chunk-2IJUDWUK.js";
7
+ import "./chunk-BL6QJDNB.js";
8
8
  import "./chunk-Z3BJJYHM.js";
9
9
  import "./chunk-O3I2INCD.js";
10
10
  import {
11
11
  withStepLogging
12
- } from "./chunk-3MSAF2TH.js";
12
+ } from "./chunk-PGG52OSJ.js";
13
13
 
14
14
  // src/plugins/merge/merge.ts
15
15
  import "server-only";
@@ -6,6 +6,8 @@ declare const NextWorkflowBuilderConfigSchema: z.ZodObject<{
6
6
  debug: z.ZodOptional<z.ZodBoolean>;
7
7
  /** Set Better Auth options (must be JSON-serializable). */
8
8
  authOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
9
+ /** Override the database connection URL. Defaults to process.env.DATABASE_URL. */
10
+ databaseUrl: z.ZodOptional<z.ZodString>;
9
11
  }, z.core.$strict>;
10
12
 
11
13
  /**
@@ -14,7 +14,9 @@ var NextWorkflowBuilderConfigSchema = z.strictObject({
14
14
  /** Enable debug logging. */
15
15
  debug: z.boolean().optional(),
16
16
  /** Set Better Auth options (must be JSON-serializable). */
17
- authOptions: z.record(z.string(), z.unknown()).optional()
17
+ authOptions: z.record(z.string(), z.unknown()).optional(),
18
+ /** Override the database connection URL. Defaults to process.env.DATABASE_URL. */
19
+ databaseUrl: z.string().optional()
18
20
  });
19
21
 
20
22
  // src/next/index.ts
@@ -29,6 +31,9 @@ var nextWorkflowBuilder = (config = {}) => {
29
31
  if (loaderOptions.authOptions) {
30
32
  process.env.__NWB_AUTH_OPTIONS = JSON.stringify(loaderOptions.authOptions);
31
33
  }
34
+ if (loaderOptions.databaseUrl) {
35
+ process.env.__NWB_DATABASE_URL = loaderOptions.databaseUrl;
36
+ }
32
37
  discoverPlugins();
33
38
  return function withNextWorkflowBuilder(nextConfig = {}) {
34
39
  const consumerPluginsRelative = "./plugins/index.ts";
@@ -15,7 +15,7 @@ import {
15
15
  import {
16
16
  auth,
17
17
  getAuthConfig
18
- } from "../../chunk-P3DTV3QS.js";
18
+ } from "../../chunk-F6HAK4HT.js";
19
19
  import {
20
20
  getErrorMessageAsync
21
21
  } from "../../chunk-5YYA34YV.js";
@@ -33,7 +33,7 @@ import {
33
33
  getIntegrations,
34
34
  updateIntegration,
35
35
  validateWorkflowIntegrations
36
- } from "../../chunk-BNYDOC3I.js";
36
+ } from "../../chunk-BL6QJDNB.js";
37
37
  import {
38
38
  findActionById,
39
39
  getAllEnvVars,
@@ -50,7 +50,7 @@ import {
50
50
  workflowExecutionLogs,
51
51
  workflowExecutions,
52
52
  workflows
53
- } from "../../chunk-3MSAF2TH.js";
53
+ } from "../../chunk-PGG52OSJ.js";
54
54
 
55
55
  // src/server/api/index.ts
56
56
  import { NextResponse as NextResponse5 } from "next/server";
@@ -416,32 +416,32 @@ triggerStep.maxRetries = 0;
416
416
  var SYSTEM_ACTIONS = {
417
417
  "Database Query": {
418
418
  // biome-ignore lint/suspicious/noExplicitAny: Dynamic module import
419
- importer: () => import("../../database-query-GRWP3S3M.js"),
419
+ importer: () => import("../../database-query-Q2JDUQ3N.js"),
420
420
  stepFunction: "databaseQueryStep"
421
421
  },
422
422
  "HTTP Request": {
423
423
  // biome-ignore lint/suspicious/noExplicitAny: Dynamic module import
424
- importer: () => import("../../http-request-2HVCXQHK.js"),
424
+ importer: () => import("../../http-request-T2UP7JLH.js"),
425
425
  stepFunction: "httpRequestStep"
426
426
  },
427
427
  Condition: {
428
428
  // biome-ignore lint/suspicious/noExplicitAny: Dynamic module import
429
- importer: () => import("../../condition-JZJH7YSJ.js"),
429
+ importer: () => import("../../condition-YFHUXD7D.js"),
430
430
  stepFunction: "conditionStep"
431
431
  },
432
432
  Loop: {
433
433
  // biome-ignore lint/suspicious/noExplicitAny: Dynamic module import
434
- importer: () => import("../../loop-YPEZHNH2.js"),
434
+ importer: () => import("../../loop-EIU3JQIY.js"),
435
435
  stepFunction: "loopStep"
436
436
  },
437
437
  Switch: {
438
438
  // biome-ignore lint/suspicious/noExplicitAny: Dynamic module import
439
- importer: () => import("../../switch-GNPFCPCA.js"),
439
+ importer: () => import("../../switch-SG2SNUUJ.js"),
440
440
  stepFunction: "switchStep"
441
441
  },
442
442
  Merge: {
443
443
  // biome-ignore lint/suspicious/noExplicitAny: Dynamic module import
444
- importer: () => import("../../merge-T3RP6SKV.js"),
444
+ importer: () => import("../../merge-2GBB4W2S.js"),
445
445
  stepFunction: "mergeStep"
446
446
  }
447
447
  };
@@ -1,23 +1,23 @@
1
1
  import {
2
2
  generateWorkflowMetadata
3
- } from "../chunk-7MUXUHEL.js";
3
+ } from "../chunk-KZNRU3LB.js";
4
4
  import {
5
5
  discoverPlugins
6
6
  } from "../chunk-TFNZVQEH.js";
7
7
  import {
8
8
  auth
9
- } from "../chunk-P3DTV3QS.js";
9
+ } from "../chunk-F6HAK4HT.js";
10
10
  import {
11
11
  getErrorMessageAsync
12
12
  } from "../chunk-5YYA34YV.js";
13
13
  import "../chunk-OQHML4II.js";
14
14
  import {
15
15
  fetchCredentials
16
- } from "../chunk-DJ7ANVJ3.js";
16
+ } from "../chunk-2IJUDWUK.js";
17
17
  import {
18
18
  decrypt,
19
19
  encrypt
20
- } from "../chunk-BNYDOC3I.js";
20
+ } from "../chunk-BL6QJDNB.js";
21
21
  import "../chunk-Z3BJJYHM.js";
22
22
  import {
23
23
  getErrorMessage
@@ -35,7 +35,7 @@ import {
35
35
  workflowExecutionLogs,
36
36
  workflowExecutions,
37
37
  workflowExecutionsRelations
38
- } from "../chunk-3MSAF2TH.js";
38
+ } from "../chunk-PGG52OSJ.js";
39
39
  export {
40
40
  accounts,
41
41
  apiKeys,
@@ -1,15 +1,15 @@
1
- import "./chunk-7MUXUHEL.js";
1
+ import "./chunk-KZNRU3LB.js";
2
2
  import "./chunk-TFNZVQEH.js";
3
- import "./chunk-P3DTV3QS.js";
3
+ import "./chunk-F6HAK4HT.js";
4
4
  import "./chunk-5YYA34YV.js";
5
5
  import "./chunk-OQHML4II.js";
6
- import "./chunk-DJ7ANVJ3.js";
7
- import "./chunk-BNYDOC3I.js";
6
+ import "./chunk-2IJUDWUK.js";
7
+ import "./chunk-BL6QJDNB.js";
8
8
  import "./chunk-Z3BJJYHM.js";
9
9
  import "./chunk-O3I2INCD.js";
10
10
  import {
11
11
  withStepLogging
12
- } from "./chunk-3MSAF2TH.js";
12
+ } from "./chunk-PGG52OSJ.js";
13
13
 
14
14
  // src/plugins/switch/switch.ts
15
15
  import "server-only";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-workflow-builder",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "type": "module",
5
5
  "description": "Next.js plugin for Workflow Builder",
6
6
  "repository": "https://github.com/emulienfou/next-workflow-builder",