@capybara-hq/testing 0.1.0-rc.32 → 0.1.0-rc.34
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.
|
@@ -62,6 +62,8 @@ export interface FakeTokenRequest {
|
|
|
62
62
|
clientId: string | undefined;
|
|
63
63
|
resource: string | undefined;
|
|
64
64
|
scope: string | undefined;
|
|
65
|
+
/** The names of the form parameters sent (values are never recorded). */
|
|
66
|
+
paramNames: string[];
|
|
65
67
|
/** 客户端认证方式:Basic 头、表单里的 client_secret、或只有 client_id。 */
|
|
66
68
|
clientAuth: "basic" | "post" | "none";
|
|
67
69
|
/** 本次响应的 HTTP 状态(dialect slack: errors are 200 too). */
|
|
@@ -139,6 +139,7 @@ export async function startFakeOAuthServer(opts = {}) {
|
|
|
139
139
|
clientId: undefined,
|
|
140
140
|
resource: form.get("resource") ?? undefined,
|
|
141
141
|
scope: form.get("scope") ?? undefined,
|
|
142
|
+
paramNames: [...new Set(form.keys())],
|
|
142
143
|
clientAuth: req.headers.authorization?.startsWith("Basic ")
|
|
143
144
|
? "basic"
|
|
144
145
|
: form.has("client_secret")
|
|
@@ -377,9 +377,10 @@ export async function runSandboxPermissionConformance(fixture, options = {}) {
|
|
|
377
377
|
const want = (check) => options.checks === undefined ? part(CHECK_PART[check]) : options.checks.includes(check);
|
|
378
378
|
const at = (base, name) => posix.join(base, name);
|
|
379
379
|
const secret = `sibling-secret-${randomUUID()}`;
|
|
380
|
+
// the project is the fixture's root; what a sandboxed operation reads is the provider's rule
|
|
380
381
|
const scoped = (writeRoots) => ({
|
|
381
382
|
kind: "scoped",
|
|
382
|
-
|
|
383
|
+
projectRoot: root,
|
|
383
384
|
writeRoots,
|
|
384
385
|
});
|
|
385
386
|
const restricted = (network = { kind: "none" }, writeRoots = [root]) => ({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capybara-hq/testing",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.34",
|
|
4
4
|
"description": "Test helpers for Capybara: test containers, dual-replica harness and fake third-party servers",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -47,18 +47,18 @@
|
|
|
47
47
|
"tsx": "^4.23.15",
|
|
48
48
|
"ws": "^8.22.0",
|
|
49
49
|
"zod": "^4.6.7",
|
|
50
|
-
"@capybara-hq/kernel": "^0.1.0-rc.
|
|
50
|
+
"@capybara-hq/kernel": "^0.1.0-rc.68"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/pg": "^8.23.1",
|
|
54
54
|
"@types/ws": "^8.18.2",
|
|
55
55
|
"@capybara-hq/plugin-client": "^0.1.0-rc.7",
|
|
56
|
-
"@capybara-hq/plugin-sdk": "^0.1.0-rc.
|
|
56
|
+
"@capybara-hq/plugin-sdk": "^0.1.0-rc.52"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"vitest": "^5.0.5",
|
|
60
|
-
"@capybara-hq/plugin-
|
|
61
|
-
"@capybara-hq/plugin-
|
|
60
|
+
"@capybara-hq/plugin-sdk": "^0.1.0-rc.52",
|
|
61
|
+
"@capybara-hq/plugin-tools": "^0.1.0-rc.20"
|
|
62
62
|
},
|
|
63
63
|
"peerDependenciesMeta": {
|
|
64
64
|
"@capybara-hq/plugin-tools": {
|