@ripplo/testing 0.3.9 → 0.4.0

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/nestjs.d.ts CHANGED
@@ -1,8 +1,7 @@
1
1
  import { DynamicModule } from '@nestjs/common';
2
- import { R as RipploEngine } from './engine-U84UJ0sj.js';
3
- import './builder-CNJmzJVe.js';
4
- import './types-Do4o4Y_c.js';
5
- import 'zod';
2
+ import { R as RipploEngine } from './engine-BdKDGBYw.js';
3
+ import './builder-0oT23S0W.js';
4
+ import './types-B7YljrTz.js';
6
5
  import './step-De52hTLd.js';
7
6
  import '@ripplo/spec';
8
7
 
package/dist/nestjs.js CHANGED
@@ -2,10 +2,11 @@ import {
2
2
  batchRequestSchema,
3
3
  buildSetCookieHeader,
4
4
  observerRequestSchema,
5
+ readAdapterWebhookSecret,
5
6
  serializeCookie,
6
7
  teardownRequestSchema,
7
8
  verifyWebhookSignature
8
- } from "./chunk-TO3T2D2Y.js";
9
+ } from "./chunk-UFHSNW4E.js";
9
10
  import {
10
11
  __decorateClass,
11
12
  __decorateParam
@@ -118,7 +119,7 @@ function guard(req, res, opts) {
118
119
  res.status(404).json({ error: "Not found" });
119
120
  return false;
120
121
  }
121
- const webhookSecret = opts.engine.getConfig().webhookSecret;
122
+ const webhookSecret = readAdapterWebhookSecret();
122
123
  if (webhookSecret.length === 0) {
123
124
  res.status(403).json({ error: "Webhook secret not configured" });
124
125
  return false;
package/dist/nextjs.d.ts CHANGED
@@ -1,7 +1,6 @@
1
- import { R as RipploEngine } from './engine-U84UJ0sj.js';
2
- import './builder-CNJmzJVe.js';
3
- import './types-Do4o4Y_c.js';
4
- import 'zod';
1
+ import { R as RipploEngine } from './engine-BdKDGBYw.js';
2
+ import './builder-0oT23S0W.js';
3
+ import './types-B7YljrTz.js';
5
4
  import './step-De52hTLd.js';
6
5
  import '@ripplo/spec';
7
6
 
package/dist/nextjs.js CHANGED
@@ -2,10 +2,11 @@ import {
2
2
  batchRequestSchema,
3
3
  buildSetCookieHeader,
4
4
  observerRequestSchema,
5
+ readAdapterWebhookSecret,
5
6
  serializeCookie,
6
7
  teardownRequestSchema,
7
8
  verifyWebhookSignature
8
- } from "./chunk-TO3T2D2Y.js";
9
+ } from "./chunk-UFHSNW4E.js";
9
10
  import "./chunk-4MGIQFAJ.js";
10
11
 
11
12
  // src/adapters/nextjs.ts
@@ -13,7 +14,7 @@ function createNextHandler({ enabled, engine }) {
13
14
  if (!enabled) {
14
15
  return async () => jsonResponse({ error: "Not found" }, 404);
15
16
  }
16
- const webhookSecret = engine.getConfig().webhookSecret;
17
+ const webhookSecret = readAdapterWebhookSecret();
17
18
  return async function handler(req) {
18
19
  const action = lastPathSegment(req.url);
19
20
  if (action !== "execute-preconditions" && action !== "teardown-preconditions" && action !== "execute-observer") {
@@ -1,26 +1,7 @@
1
- import { z } from 'zod';
2
1
  import { S as Step } from './step-De52hTLd.js';
3
2
 
4
3
  declare const DEFAULT_WATCH_PATHS: ReadonlyArray<string>;
5
4
  declare const DEFAULT_IGNORE_PATHS: ReadonlyArray<string>;
6
- declare const dslConfigSchema: z.ZodObject<{
7
- appUrl: z.ZodString;
8
- engineUrl: z.ZodString;
9
- ignorePaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
10
- projectId: z.ZodString;
11
- watchPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
12
- webhookSecret: z.ZodString;
13
- }, z.core.$strip>;
14
- type DslConfig = z.infer<typeof dslConfigSchema>;
15
- declare const userDslConfigSchema: z.ZodObject<{
16
- appUrl: z.ZodString;
17
- engineUrl: z.ZodString;
18
- ignorePaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
19
- projectId: z.ZodString;
20
- watchPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
21
- webhookSecret: z.ZodOptional<z.ZodString>;
22
- }, z.core.$strip>;
23
- type UserDslConfig = z.infer<typeof userDslConfigSchema>;
24
5
  interface CookieOptions {
25
6
  readonly domain: string | undefined;
26
7
  readonly expires: number | undefined;
@@ -122,4 +103,4 @@ interface ObserverDefinition {
122
103
  readonly run: (ctx: ObserverContext, params: Record<string, string>) => Promise<ObserverOutcome>;
123
104
  }
124
105
 
125
- export { type CookieEntry as C, DEFAULT_IGNORE_PATHS as D, type ObserverHandle as O, type Precondition as P, type SetupContext as S, type TeardownContext as T, type UnimplementedItems as U, type ObserverInput as a, type ObserverBudgetTier as b, type CookieOptions as c, DEFAULT_WATCH_PATHS as d, type DslConfig as e, type ObserverContext as f, type ObserverDefinition as g, type ObserverOutcome as h, type PreconditionDeps as i, type TestDefinition as j, type PreconditionDefinition as k, type PreconditionData as l, type TestValue as m, type UserDslConfig as n };
106
+ export { type CookieEntry as C, DEFAULT_IGNORE_PATHS as D, type ObserverHandle as O, type Precondition as P, type SetupContext as S, type TeardownContext as T, type UnimplementedItems as U, type ObserverInput as a, type ObserverBudgetTier as b, type CookieOptions as c, DEFAULT_WATCH_PATHS as d, type ObserverContext as e, type ObserverDefinition as f, type ObserverOutcome as g, type PreconditionDeps as h, type TestDefinition as i, type PreconditionDefinition as j, type PreconditionData as k, type TestValue as l };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ripplo/testing",
3
3
  "description": "TypeScript DSL for defining and running Ripplo e2e workflow tests",
4
- "version": "0.3.9",
4
+ "version": "0.4.0",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"