endform 0.66.1 → 0.68.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/lib/index.cjs ADDED
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Define an Endform configuration in an `endform.config.ts` (or `.js`) file.
3
+ * This is an identity function that exists to provide type checking and editor completion.
4
+ */
5
+ function defineEndformConfig(config) {
6
+ return config;
7
+ }
8
+
9
+ module.exports = { defineEndformConfig };
package/lib/index.d.ts ADDED
@@ -0,0 +1,204 @@
1
+ /**
2
+ * A concurrency limit for running tests, applied within a single suite run
3
+ * or across all currently running suite runs in your organization.
4
+ *
5
+ * Running tests must satisfy all applicable limits.
6
+ *
7
+ * @see https://endform.dev/docs/reference/endform-config-ts#concurrenttestlimits
8
+ */
9
+ export interface ConcurrentTestLimit {
10
+ /**
11
+ * The scope this limit applies to:
12
+ *
13
+ * - `"within-suite-run"` limits concurrent tests in that test suite run.
14
+ * - `"across-all-runs"` limits concurrent tests across all matching test
15
+ * suites that your organization is running - a shared, global limit.
16
+ */
17
+ scope: "within-suite-run" | "across-all-runs";
18
+ /**
19
+ * Optionally restrict which tests the limit applies to:
20
+ *
21
+ * - Use `"tag:@my-tag"` to limit by test tag
22
+ * (see https://playwright.dev/docs/test-annotations#tag-tests).
23
+ * - Use `"project:project-name"` to limit runs of tests within a Playwright project.
24
+ * - If not set, the limit applies to all tests in the run.
25
+ */
26
+ label?: string;
27
+ /**
28
+ * The maximum number of allowed concurrent tests to run within this group.
29
+ * Must be greater than 0.
30
+ */
31
+ limit: number;
32
+ }
33
+
34
+ /**
35
+ * Endform configuration.
36
+ *
37
+ * All fields are optional - Endform works without any configuration,
38
+ * enriching the defaults derived from your Playwright config.
39
+ *
40
+ * @see https://endform.dev/docs/reference/endform-config-ts
41
+ */
42
+ export interface EndformConfig {
43
+ /**
44
+ * An array of strings used as globs to send extra files to your test machines.
45
+ * Patterns are resolved relative to your Playwright config directory.
46
+ *
47
+ * If your Playwright config already specifies `storageState`, this parameter
48
+ * should not be needed - Endform will read and send those files automatically.
49
+ * Use this parameter if your tests have implicit dependencies on more files.
50
+ *
51
+ * @example ["user-state/*"]
52
+ * @see https://endform.dev/docs/reference/endform-config-ts#additionalfiles
53
+ */
54
+ additionalFiles?: string[];
55
+ /**
56
+ * An array of string regular expressions that are used to match environment
57
+ * variables that should be transferred to the remote runners.
58
+ *
59
+ * By default the following environment variables are automatically transferred:
60
+ *
61
+ * - Environment variables that start with `E2E_`
62
+ * - All environment variables that are set in your `playwright.config.ts`
63
+ *
64
+ * @example ["VERCEL_.*"]
65
+ * @see https://endform.dev/docs/reference/endform-config-ts#environmentvariables
66
+ */
67
+ environmentVariables?: string[];
68
+ /**
69
+ * Host names whose HTTP traffic will be redirected from the remote runners
70
+ * to the CLI on your local network. This is the easiest option for local web
71
+ * apps and APIs, and uses HTTP interception in Node and in the browser.
72
+ *
73
+ * Each string in the array is a match rule. Either:
74
+ *
75
+ * - A hostname pattern like `"my-domain.com"` or `"*.internal.org"`
76
+ * - An IP literal like `"127.0.0.1"`
77
+ * - `"<loopback>"` to match the interfaces `localhost`, `*.localhost`,
78
+ * `127.0.0.1` and `[::1]`
79
+ *
80
+ * All the traffic sent from the remote runners to your CLI is sent encrypted
81
+ * over direct peer-to-peer connections.
82
+ *
83
+ * @example ["*.test.internal-domain", "<loopback>"]
84
+ * @see https://endform.dev/docs/reference/endform-config-ts#proxynetworkhosts
85
+ * @see https://endform.dev/docs/guides/proxy-via-local
86
+ */
87
+ proxyNetworkHosts?: string[];
88
+ /**
89
+ * Local loopback ports that will accept raw TCP connections from the remote
90
+ * runners. Use this for databases or other clients that need to connect
91
+ * directly to `127.0.0.1:<port>`.
92
+ *
93
+ * All the traffic sent from the remote runners to your CLI is sent encrypted
94
+ * over direct peer-to-peer connections.
95
+ *
96
+ * @example [5432, 6379]
97
+ * @see https://endform.dev/docs/reference/endform-config-ts#proxynetworkports
98
+ * @see https://endform.dev/docs/guides/proxy-via-local
99
+ */
100
+ proxyNetworkPorts?: number[];
101
+ /**
102
+ * The organization ID this project should run within. This is the
103
+ * highest-precedence configuration for organization ID when running suites.
104
+ * Suite runs fail if the authenticated user does not have access to that
105
+ * organization.
106
+ *
107
+ * @see https://endform.dev/docs/reference/endform-config-ts#organizationid
108
+ */
109
+ organizationId?: string;
110
+ /**
111
+ * By default, your tests are run in the closest available region to where
112
+ * the Endform CLI was run. Set this to override that choice, for example if
113
+ * your test environment is in a different region from your CI jobs.
114
+ *
115
+ * @see https://endform.dev/docs/reference/endform-config-ts#region
116
+ */
117
+ region?: "eu" | "us";
118
+ /**
119
+ * An array of reporter names that should run exclusively during remote
120
+ * execution of tests. Each name must correspond to the name of a reporter
121
+ * configured in your Playwright config.
122
+ *
123
+ * Reporters listed here run once on each remotely running test machine
124
+ * (one per test), and _not_ on the collected result.
125
+ *
126
+ * @example ["./custom-reporter.ts"]
127
+ * @see https://endform.dev/docs/reference/endform-config-ts#remotereporters
128
+ */
129
+ remoteReporters?: string[];
130
+ /**
131
+ * Control whether Endform retains Playwright traces for viewing in the
132
+ * dashboard. Defaults to `"on"`.
133
+ *
134
+ * When set to `"off"`, traces are not uploaded to Endform. This can be
135
+ * useful for compliance requirements or if you have privacy concerns about
136
+ * trace data.
137
+ *
138
+ * Note: this setting only controls what Endform stores for dashboard
139
+ * viewing. Regardless of this setting, traces are still generated and
140
+ * accessible locally depending on your Playwright `trace` config option.
141
+ *
142
+ * @see https://endform.dev/docs/reference/endform-config-ts#traceretention
143
+ */
144
+ traceRetention?: "on" | "off";
145
+ /**
146
+ * Extra HTTP headers that will be applied to the Playwright browser
147
+ * contexts when tests run on remote runners.
148
+ *
149
+ * These headers are merged into Playwright's `extraHTTPHeaders` option on
150
+ * both the top-level `use` and each project's `use`. Headers defined in your
151
+ * `playwright.config.ts` take precedence - if the same header name exists in
152
+ * both your Playwright config and your Endform config, the value from your
153
+ * Playwright config wins.
154
+ *
155
+ * Can be overridden with the `ENDFORM_EXTRA_HTTP_HEADERS` environment
156
+ * variable, set to a JSON string of key-value pairs. When that environment
157
+ * variable is set, it fully replaces this value (the two are not merged).
158
+ *
159
+ * @example { "x-bypass-protection": "token-value" }
160
+ * @see https://endform.dev/docs/reference/endform-config-ts#extrahttpheaders
161
+ */
162
+ extraHttpHeaders?: Record<string, string>;
163
+ /**
164
+ * Concurrency limits for a suite run. Each item has a `scope`, optional
165
+ * `label`, and `limit`. Running tests must satisfy all applicable limits.
166
+ *
167
+ * @example
168
+ * [
169
+ * { scope: "within-suite-run", limit: 20 },
170
+ * { scope: "within-suite-run", label: "tag:@smoke", limit: 2 },
171
+ * { scope: "across-all-runs", label: "project:slow-backend", limit: 10 },
172
+ * ]
173
+ * @see https://endform.dev/docs/reference/endform-config-ts#concurrenttestlimits
174
+ */
175
+ concurrentTestLimits?: ConcurrentTestLimit[];
176
+ }
177
+
178
+ /**
179
+ * Define an Endform configuration in an `endform.config.ts` file
180
+ * (`.mts`, `.js`, `.mjs` and `.cjs` are also supported).
181
+ *
182
+ * Place the config file:
183
+ *
184
+ * - In the same folder as your Playwright suite -> applies to that suite
185
+ * - In the root of your repository -> applies to all suites in your repository
186
+ *
187
+ * This is an identity function that exists to provide type checking and
188
+ * editor completion.
189
+ *
190
+ * @example
191
+ * ```ts
192
+ * import { defineEndformConfig } from "endform";
193
+ *
194
+ * export default defineEndformConfig({
195
+ * environmentVariables: ["VERCEL_.*"],
196
+ * });
197
+ * ```
198
+ */
199
+ export declare function defineEndformConfig(
200
+ config: EndformConfig,
201
+ ): EndformConfig;
202
+ export declare function defineEndformConfig(
203
+ config: () => EndformConfig | Promise<EndformConfig>,
204
+ ): () => EndformConfig | Promise<EndformConfig>;
package/lib/index.mjs ADDED
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Define an Endform configuration in an `endform.config.ts` (or `.js`) file.
3
+ * This is an identity function that exists to provide type checking and editor completion.
4
+ */
5
+ export function defineEndformConfig(config) {
6
+ return config;
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "endform",
3
- "version": "0.66.1",
3
+ "version": "0.68.0",
4
4
  "description": "Endform CLI",
5
5
  "license": "UNLICENSED",
6
6
  "repository": "https://github.com/endformdev/npm",
@@ -8,13 +8,22 @@
8
8
  "endform": "./bin/endform"
9
9
  },
10
10
  "files": [
11
- "bin"
11
+ "bin",
12
+ "lib"
12
13
  ],
13
- "main": "./bin/endform",
14
+ "main": "./lib/index.cjs",
15
+ "types": "./lib/index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./lib/index.d.ts",
19
+ "import": "./lib/index.mjs",
20
+ "require": "./lib/index.cjs"
21
+ }
22
+ },
14
23
  "optionalDependencies": {
15
- "endform-darwin-arm64": "0.66.1",
16
- "endform-darwin-x86": "0.66.1",
17
- "endform-linux-arm64": "0.66.1",
18
- "endform-linux-x86": "0.66.1"
24
+ "endform-darwin-arm64": "0.68.0",
25
+ "endform-darwin-x86": "0.68.0",
26
+ "endform-linux-arm64": "0.68.0",
27
+ "endform-linux-x86": "0.68.0"
19
28
  }
20
29
  }