affitor 0.4.3 → 0.4.5
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 +87 -5
- package/dist/cli.js +2 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/agent.d.ts +3 -0
- package/dist/commands/agent.d.ts.map +1 -0
- package/dist/commands/agent.js +85 -0
- package/dist/commands/agent.js.map +1 -0
- package/dist/commands/init.d.ts +4 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +6 -2
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/onboard.d.ts +39 -0
- package/dist/commands/onboard.d.ts.map +1 -1
- package/dist/commands/onboard.js +232 -22
- package/dist/commands/onboard.js.map +1 -1
- package/dist/commands/setup-stripe.d.ts +1 -1
- package/dist/commands/setup-stripe.d.ts.map +1 -1
- package/dist/commands/setup-stripe.js +2 -2
- package/dist/commands/setup-stripe.js.map +1 -1
- package/dist/commands/status.js +2 -2
- package/dist/commands/status.js.map +1 -1
- package/dist/lib/agent-launcher.d.ts +8 -0
- package/dist/lib/agent-launcher.d.ts.map +1 -0
- package/dist/lib/agent-launcher.js +94 -0
- package/dist/lib/agent-launcher.js.map +1 -0
- package/dist/lib/agent-setup.d.ts +38 -0
- package/dist/lib/agent-setup.d.ts.map +1 -0
- package/dist/lib/agent-setup.js +248 -0
- package/dist/lib/agent-setup.js.map +1 -0
- package/dist/lib/config.js +3 -3
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/inject.js +1 -1
- package/dist/lib/project-env.d.ts +10 -0
- package/dist/lib/project-env.d.ts.map +1 -0
- package/dist/lib/project-env.js +85 -0
- package/dist/lib/project-env.js.map +1 -0
- package/dist/lib/wizard.d.ts +2 -0
- package/dist/lib/wizard.d.ts.map +1 -1
- package/dist/lib/wizard.js +13 -1
- package/dist/lib/wizard.js.map +1 -1
- package/dist/types.d.ts +4 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -2,13 +2,95 @@
|
|
|
2
2
|
|
|
3
3
|
CLI-native affiliate tracking. Connect Stripe, track commissions, manage partners -- all from your terminal.
|
|
4
4
|
|
|
5
|
+
## AI agent setup
|
|
6
|
+
|
|
7
|
+
From the project root, preview the local installation before applying it:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
affitor agent setup --client claude_code --dry-run --json
|
|
11
|
+
affitor agent setup --client claude_code --yes
|
|
12
|
+
affitor doctor --client claude_code --json
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Choose `claude_code`, `cursor`, or `codex`; repeat `--client` for more than one.
|
|
16
|
+
Without a selection, an interactive terminal asks, with nothing selected by default.
|
|
17
|
+
Noninteractive runs require `--yes` and a selection. Inside an agent, setup can only
|
|
18
|
+
configure that agent. `--dry-run` writes nothing. Without confirmation, setup exits1.
|
|
19
|
+
|
|
20
|
+
Claude Code uses project `.mcp.json`; Cursor uses `.cursor/mcp.json`. Existing
|
|
21
|
+
unrelated settings are preserved. Existing file bytes are backed up under
|
|
22
|
+
`.affitor/backups/` before replacement, with mode0600; generated `.gitignore`
|
|
23
|
+
entries exclude backups and `.affitor/.env`. Updates use atomic replacement and
|
|
24
|
+
read-back, rolling back prior writes on failure. Backups and their local ignore
|
|
25
|
+
guard are kept on failure so a restored root `.gitignore` cannot expose them.
|
|
26
|
+
An existing backup guard must contain only `*`; negation or extra rules are refused.
|
|
27
|
+
It is installed before any merged config is written. Temporary writes stay under
|
|
28
|
+
this private, ignored backup directory, including after abrupt process termination.
|
|
29
|
+
Credential and backup ignore rules are appended at the end of both the root
|
|
30
|
+
`.gitignore` and `.affitor/.gitignore`, preserving earlier custom rules while
|
|
31
|
+
overriding negations. Existing files are backed up before changing them. The child
|
|
32
|
+
guard also protects `credentials.json` when a project directory is your home.
|
|
33
|
+
A concurrent edit is preserved;
|
|
34
|
+
inspect the files and private backups before retrying. This protects ordinary
|
|
35
|
+
local edits, not a hostile process racing filesystem operations.
|
|
36
|
+
|
|
37
|
+
The generated `.affitor/agent-mcp.cjs` launcher starts pinned `@affitor/mcp@0.2.2`
|
|
38
|
+
from this project's absolute directory. No credential is embedded in an agent
|
|
39
|
+
config, launcher, or skill. The launcher reads inherited `AFFITOR_API_KEY`, then
|
|
40
|
+
this project's `.affitor/.env` (created by `affitor init`). It never reads the user
|
|
41
|
+
login token in `~/.affitor/credentials.json`. If `onboard` wrote a key to your root
|
|
42
|
+
`.env`, provide it privately as `AFFITOR_API_KEY` when starting the agent instead.
|
|
43
|
+
It removes inherited API URL overrides regardless of their casing and uses the
|
|
44
|
+
production API. It disables sale/refund tools even when the parent
|
|
45
|
+
environment has `AFFITOR_MCP_WRITE=1`. Other tools still include tracking and
|
|
46
|
+
synthetic verification; approve those actions separately.
|
|
47
|
+
|
|
48
|
+
A recovery skill is installed in `.claude/skills/affitor/` or `.cursor/skills/affitor/`.
|
|
49
|
+
Codex gets `.agents/skills/affitor/` and a printed `codex mcp add` command; setup
|
|
50
|
+
does not edit its TOML config or run that command. Review it, then run it yourself.
|
|
51
|
+
If you move the project, run setup again to update absolute paths. The printed
|
|
52
|
+
command uses POSIX shell quoting on macOS/Linux. Plan notes flag machine-specific
|
|
53
|
+
absolute paths: keep generated MCP configs local or regenerate on each machine. On Windows, no shell command
|
|
54
|
+
is generated: add the MCP in Codex settings using `command: "node"` and the exact
|
|
55
|
+
absolute path from the preview's `entry.args` as one argument. Do not paste POSIX
|
|
56
|
+
commands into cmd.exe.
|
|
57
|
+
|
|
58
|
+
**Installed is not verified.** Successful setup returns `needs_human` (exit0).
|
|
59
|
+
`doctor` is read-only and static: it does not start an agent, connect to the API,
|
|
60
|
+
or prove the key works. It returns `aligned`/`stale`/`missing`/`manual`/`invalid`
|
|
61
|
+
per client and `present_unverified`/`missing` for credentials. With no selection,
|
|
62
|
+
doctor checks existing JSON client configs; an agent caller checks itself.
|
|
63
|
+
Exit0 means all selected static checks align and a credential is present;
|
|
64
|
+
otherwise exit1. A `credential_tracked` warning also returns exit1: doctor checks
|
|
65
|
+
Git when available without changing its index, including when the repository root is above the
|
|
66
|
+
project. Rotate an exposed key and remove it from tracking/history using your
|
|
67
|
+
repository process; adding an ignore rule does not untrack a credential.
|
|
68
|
+
Restart the agent and ask it to call `affitor_readiness`, checking
|
|
69
|
+
the program identity before integration. Only report the readiness checks that pass.
|
|
70
|
+
|
|
71
|
+
Doctor and the launcher use the same credential parser: empty, duplicate and
|
|
72
|
+
interpolated assignments fail closed. An explicit nonempty environment value
|
|
73
|
+
takes precedence and is validated without reading a file. On Windows, the
|
|
74
|
+
launcher runs `npx.cmd` through `cmd.exe` with a constant command; project paths
|
|
75
|
+
and credentials are passed through `cwd`/environment, outside shell text.
|
|
76
|
+
`NoDefaultCurrentDirectoryInExePath=1` prevents a project-root `npx.cmd` from
|
|
77
|
+
shadowing the PATH executable. The child receives only runtime paths, home/temp,
|
|
78
|
+
locale/terminal settings and the program key; parent proxy, Node options, npm
|
|
79
|
+
overrides and unrelated credentials are dropped. The public npm registry is
|
|
80
|
+
explicit. Project code, the generated launcher, PATH and project `.npmrc` still
|
|
81
|
+
belong to your trusted local environment; this installer is not a sandbox.
|
|
82
|
+
|
|
83
|
+
This local installer uses an existing program key. Per-agent key issuance,
|
|
84
|
+
pairing, connection telemetry, and the dashboard Agents page are separate work;
|
|
85
|
+
this command does not claim to create or verify an agent connection.
|
|
86
|
+
|
|
5
87
|
## Quick Start
|
|
6
88
|
|
|
7
89
|
```bash
|
|
8
90
|
# Create your affiliate program
|
|
9
91
|
npx affitor init
|
|
10
92
|
|
|
11
|
-
# Connect Stripe in the Affitor dashboard:
|
|
93
|
+
# Connect Stripe in the Affitor dashboard: Program settings → Payments, Connect Stripe
|
|
12
94
|
|
|
13
95
|
# Check program health
|
|
14
96
|
npx affitor status
|
|
@@ -25,7 +107,7 @@ npx affitor test sale
|
|
|
25
107
|
|---|---|
|
|
26
108
|
| `affitor init` | Create a new affiliate program. Interactive prompts or `--no-interactive` with flags. |
|
|
27
109
|
| `affitor onboard` | Wire Affitor into an existing app end-to-end: detect → install browser tracking → inject the Stripe sale call → verify. |
|
|
28
|
-
| `affitor setup stripe` | Points you to the dashboard, where Stripe is connected (
|
|
110
|
+
| `affitor setup stripe` | Points you to the dashboard, where Stripe is connected (Program settings → Payments, Connect Stripe). Exits 1. |
|
|
29
111
|
| `affitor setup dns` | Set up DNS CNAME tracking (coming soon). |
|
|
30
112
|
| `affitor status` | Show program health: DNS, Stripe connection, recent events. |
|
|
31
113
|
| `affitor test [type]` | Send a test event (`click`, `lead`, or `sale`). |
|
|
@@ -43,10 +125,10 @@ It runs the **detect → wire → inject → verify** flow:
|
|
|
43
125
|
|
|
44
126
|
1. **Detect** — your framework (`next-app`, `next-pages`, `fastify`, `express`, `node`) and payment provider (Stripe, …).
|
|
45
127
|
2. **Wire** — installs `@affitor/sdk`, injects `<AffitorTracker/>` browser tracking, scaffolds the server client, and persists `AFFITOR_API_KEY` into `.env.local`/`.env`.
|
|
46
|
-
3. **
|
|
128
|
+
3. **Review sale tracking** — if the program has a Stripe account bound in Affitor, the webhook stays unchanged to avoid a second sale path. When the runtime key or Connect state is uncertain, the CLI asks whether to keep the existing webhook unchanged (default Yes). Only choose No after confirming the runtime program key and ruling out current/shared-account/delayed Connect sales; a separate diff approval is required before adding `affitor.trackSale`. Unknown status never recommends removing an existing sale call. `--yes`, `--no-interactive` and `--json` leave Stripe webhooks unchanged when Connect cannot be ruled out. A conflicting runtime API key always requires manual review. Non-Stripe stacks and unrecognized webhooks get a recipe to review and add manually.
|
|
47
129
|
4. **Verify** — fires the synthetic click → lead → sale chain, then **polls readiness until `integration_verified`** (or reports the blocking gate + next action).
|
|
48
130
|
|
|
49
|
-
It is **idempotent** — re-running skips work already done (existing env key, sale call already present) and never overwrites a different `AFFITOR_API_KEY`.
|
|
131
|
+
It is **idempotent** — re-running skips work already done (existing env key, sale call already present) and never overwrites a different `AFFITOR_API_KEY`. The CLI trusts status only when the inherited process key and standard env layers declare one distinct usable key matching the checked key. It parses dotenv syntax (including colon assignments and quoted multiline values) without evaluating or expanding it. Duplicate assignments, conflicting keys across `.env`, `.env.local`, and `.env.{production,development,test}[.local]`, unreadable/nonregular files, or any other root `.env*` file make the runtime key uncertain. This includes custom modes and templates: the CLI does not infer how they are loaded. In interactive mode it asks and defaults to keeping the existing snippet; unattended runs keep it unchanged. Ambiguous env files are never overwritten. If no runtime key exists and every standard layer is readable, the normal env initialization can still add the explicit program key.
|
|
50
132
|
|
|
51
133
|
| Flag | Description |
|
|
52
134
|
|---|---|
|
|
@@ -93,7 +175,7 @@ Running `npx affitor init` creates:
|
|
|
93
175
|
|
|
94
176
|
## Stripe
|
|
95
177
|
|
|
96
|
-
Stripe is connected from the Affitor dashboard (
|
|
178
|
+
Stripe is connected from the Affitor dashboard (Program settings → Payments, Connect Stripe), not from the CLI. Affitor's own webhook then records sales and renewals; add Affitor metadata to your checkout so sales are attributed reliably.
|
|
97
179
|
|
|
98
180
|
## Requirements
|
|
99
181
|
|
package/dist/cli.js
CHANGED
|
@@ -12,6 +12,7 @@ import { registerSetupCommand } from "./commands/setup-stripe.js";
|
|
|
12
12
|
import { registerStatusCommand } from "./commands/status.js";
|
|
13
13
|
import { registerTestCommand } from "./commands/test.js";
|
|
14
14
|
import { registerProgramsCommand } from "./commands/programs.js";
|
|
15
|
+
import { registerAgentCommands } from "./commands/agent.js";
|
|
15
16
|
// Read the version from package.json at runtime so `affitor --version` never
|
|
16
17
|
// drifts from the published package version (dist/cli.js → ../package.json).
|
|
17
18
|
const { version } = createRequire(import.meta.url)("../package.json");
|
|
@@ -62,5 +63,6 @@ registerSetupCommand(program);
|
|
|
62
63
|
registerStatusCommand(program);
|
|
63
64
|
registerTestCommand(program);
|
|
64
65
|
registerProgramsCommand(program);
|
|
66
|
+
registerAgentCommands(program);
|
|
65
67
|
program.parse();
|
|
66
68
|
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EA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|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { checkbox, confirm } from "@inquirer/prompts";
|
|
2
|
+
import { existsSync } from "node:fs";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { CLIENTS, applySetup, callerClient, doctor, planSetup, selectedClients } from "../lib/agent-setup.js";
|
|
5
|
+
import { getFlags } from "../lib/flags.js";
|
|
6
|
+
export function registerAgentCommands(program) {
|
|
7
|
+
program.command("agent").description("Configure an AI coding agent for this project")
|
|
8
|
+
.command("setup")
|
|
9
|
+
.description("Preview and install project-scoped MCP configuration and an Affitor skill")
|
|
10
|
+
.option("--client <name>", "claude_code, cursor or codex (repeat to select)", (value, prior) => [...prior, value], [])
|
|
11
|
+
.option("--dry-run", "Show the plan without writing files")
|
|
12
|
+
.option("--yes", "Apply the selected client's plan")
|
|
13
|
+
.action(async (opts, cmd) => {
|
|
14
|
+
const flags = getFlags(cmd);
|
|
15
|
+
try {
|
|
16
|
+
let clients = selectedClients(opts.client ?? [], process.env);
|
|
17
|
+
const interactive = Boolean(process.stdin.isTTY && process.stdout.isTTY && !flags.noInteractive && !flags.json);
|
|
18
|
+
if (!clients.length && interactive && !opts.dryRun) {
|
|
19
|
+
clients = selectedClients(await checkbox({
|
|
20
|
+
message: "Which agents should get Affitor in this project?",
|
|
21
|
+
choices: CLIENTS.map(value => ({ value, name: `${value}${existsSync(join(process.cwd(), value === "claude_code" ? ".claude" : value === "cursor" ? ".cursor" : ".agents")) ? " (project directory found)" : ""}`, checked: false })),
|
|
22
|
+
}), process.env);
|
|
23
|
+
}
|
|
24
|
+
const plan = planSetup(process.cwd(), clients);
|
|
25
|
+
// Never serialize plan.actions.content: existing configs can contain
|
|
26
|
+
// unrelated credentials that must stay local, including in a dry-run.
|
|
27
|
+
const preview = {
|
|
28
|
+
project: plan.project, clients, caller: callerClient(process.env) ?? null,
|
|
29
|
+
entry: plan.entry, mcpVersion: plan.mcpVersion,
|
|
30
|
+
actions: plan.actions.map(({ path, operation, backup }) => ({ path, operation, backup })),
|
|
31
|
+
manual: plan.manual, notes: plan.notes,
|
|
32
|
+
};
|
|
33
|
+
let status = opts.dryRun ? "planned" : "needs_confirmation";
|
|
34
|
+
if (!flags.json)
|
|
35
|
+
process.stdout.write(JSON.stringify(preview, null, 2) + "\n");
|
|
36
|
+
let approved = Boolean(opts.yes || flags.autoConfirm);
|
|
37
|
+
if (!opts.dryRun && clients.length && !approved && interactive) {
|
|
38
|
+
approved = await confirm({ message: "Apply this plan? Existing files are backed up first.", default: false });
|
|
39
|
+
}
|
|
40
|
+
if (!opts.dryRun && approved && clients.length) {
|
|
41
|
+
applySetup(plan);
|
|
42
|
+
status = "needs_human";
|
|
43
|
+
}
|
|
44
|
+
const next = !clients.length
|
|
45
|
+
? "Select --client claude_code, cursor or codex. Detected agents are not selected automatically."
|
|
46
|
+
: status === "needs_confirmation"
|
|
47
|
+
? "Review the plan, then run affitor agent setup --client <name> --yes."
|
|
48
|
+
: "Installed is not verified. Configure the program key privately as AFFITOR_API_KEY or in .affitor/.env; restart the selected agent, then ask it to call affitor_readiness. For Codex, first follow the printed manual configuration instructions.";
|
|
49
|
+
if (flags.json)
|
|
50
|
+
process.stdout.write(JSON.stringify({ status, ...preview, next }) + "\n");
|
|
51
|
+
else
|
|
52
|
+
process.stdout.write(`${status}\n${next}\n`);
|
|
53
|
+
process.exitCode = status === "needs_confirmation" || (!clients.length && !opts.dryRun) ? 1 : 0;
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
// Expected installer errors contain only fixed messages and relative
|
|
57
|
+
// client paths. Do not print arbitrary fs/JSON/credential exceptions.
|
|
58
|
+
const message = error instanceof Error && /^(Unknown client|An agent can only|\.mcp\.json |\.cursor\/mcp\.json |Setup failed|A setup file|Unsafe setup|Setup target)/.test(error.message)
|
|
59
|
+
? error.message : "Agent setup could not finish. Check the project paths and run a fresh dry-run.";
|
|
60
|
+
process.stdout.write(JSON.stringify({ status: "error", message }) + "\n");
|
|
61
|
+
process.exitCode = 1;
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
program.command("doctor").description("Read-only static check of local agent configuration; does not verify a running session")
|
|
65
|
+
.option("--client <name>", "Check one client (repeat to select)", (value, prior) => [...prior, value], [])
|
|
66
|
+
.action((opts, cmd) => {
|
|
67
|
+
try {
|
|
68
|
+
const clients = selectedClients(opts.client ?? [], process.env);
|
|
69
|
+
const configured = CLIENTS.filter(client => client !== "codex" && existsSync(join(process.cwd(), client === "claude_code" ? ".mcp.json" : ".cursor/mcp.json")));
|
|
70
|
+
const results = doctor(process.cwd(), clients.length ? clients : configured.length ? configured : ["claude_code", "cursor"]);
|
|
71
|
+
const healthy = results.every(result => result.status === "aligned" && result.credential === "present_unverified" && result.warnings.length === 0);
|
|
72
|
+
const result = { status: healthy ? "aligned" : "needs_attention", mode: "static", clients: results, next: "Restart the selected agent and call affitor_readiness. A credential_tracked warning requires rotating the key and removing it from Git tracking/history through your repository process. Static checks do not prove a live connection or integration readiness." };
|
|
73
|
+
if (getFlags(cmd).json)
|
|
74
|
+
process.stdout.write(JSON.stringify(result) + "\n");
|
|
75
|
+
else
|
|
76
|
+
process.stdout.write(JSON.stringify(result, null, 2) + "\n");
|
|
77
|
+
process.exitCode = healthy ? 0 : 1;
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
process.stdout.write(JSON.stringify({ status: "error", message: "Doctor could not check the selected client. Use claude_code, cursor or codex." }) + "\n");
|
|
81
|
+
process.exitCode = 1;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=agent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../../src/commands/agent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EA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C,CAAC;YAC7H,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,KAAK,SAAS,IAAI,MAAM,CAAC,UAAU,KAAK,oBAAoB,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC;YACnJ,MAAM,MAAM,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,iBAAiB,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,iQAAiQ,EAAE,CAAC;YAC9W,IAAI,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI;gBAAE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC;;gBACvE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;YAClE,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACrC,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,+EAA+E,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;YAC3J,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACvB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/dist/commands/init.d.ts
CHANGED
|
@@ -10,4 +10,8 @@ export declare function runInit(opts: {
|
|
|
10
10
|
durationMonths?: number;
|
|
11
11
|
wizard?: boolean;
|
|
12
12
|
}, flags: CLIFlags): Promise<void>;
|
|
13
|
+
/** The program's partner-code parameter from the init response; aff when an older server omits it. */
|
|
14
|
+
export declare function refParamFrom(response: {
|
|
15
|
+
link_param?: string;
|
|
16
|
+
}): string;
|
|
13
17
|
//# sourceMappingURL=init.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAqBzC,OAAO,KAAK,EAAiB,QAAQ,EAAkB,MAAM,aAAa,CAAC;AAO3E,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,QAiBnD;AAED,wBAAsB,OAAO,CAC3B,IAAI,EAAE;IACJ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,EACD,KAAK,EAAE,QAAQ,iBA4OhB"}
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAqBzC,OAAO,KAAK,EAAiB,QAAQ,EAAkB,MAAM,aAAa,CAAC;AAO3E,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,QAiBnD;AAED,wBAAsB,OAAO,CAC3B,IAAI,EAAE;IACJ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,EACD,KAAK,EAAE,QAAQ,iBA4OhB;AAiBD,sGAAsG;AACtG,wBAAgB,YAAY,CAAC,QAAQ,EAAE;IAAE,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAEtE"}
|
package/dist/commands/init.js
CHANGED
|
@@ -42,7 +42,7 @@ export async function runInit(opts, flags) {
|
|
|
42
42
|
logger.error("Affitor already configured in this directory.\n" +
|
|
43
43
|
" Use `npx affitor status` to check your program.\n" +
|
|
44
44
|
" `init` creates a new program: it does not restore this one and does not replace its API key.\n" +
|
|
45
|
-
" For a new key, ask a workspace owner of this program to open Affitor →
|
|
45
|
+
" For a new key, ask a workspace owner of this program to open Affitor → Program settings → Developers → API keys " +
|
|
46
46
|
"and click Regenerate, then replace the key this project uses.");
|
|
47
47
|
if (flags.json) {
|
|
48
48
|
logger.json({ error: "already_configured" });
|
|
@@ -154,7 +154,7 @@ export async function runInit(opts, flags) {
|
|
|
154
154
|
name: "_aff",
|
|
155
155
|
duration_days: cookieDuration,
|
|
156
156
|
},
|
|
157
|
-
ref_param:
|
|
157
|
+
ref_param: refParamFrom(response),
|
|
158
158
|
api_url: apiUrl,
|
|
159
159
|
created_at: new Date().toISOString(),
|
|
160
160
|
};
|
|
@@ -245,4 +245,8 @@ function formatCommission(type, rate, durationMonths) {
|
|
|
245
245
|
}
|
|
246
246
|
return `${value} per sale`;
|
|
247
247
|
}
|
|
248
|
+
/** The program's partner-code parameter from the init response; aff when an older server omits it. */
|
|
249
|
+
export function refParamFrom(response) {
|
|
250
|
+
return response.link_param === "via" || response.link_param === "aff" ? response.link_param : "aff";
|
|
251
|
+
}
|
|
248
252
|
//# sourceMappingURL=init.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EA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CAAC,KAAK,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,+DAA+D,CAAC,CAAC;IACtG,MAAM,CAAC,IAAI,CAAC,KAAK,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,4DAA4D,CAAC,CAAC;IAClG,MAAM,CAAC,OAAO,EAAE,CAAC;AACnB,CAAC;AAED,SAAS,gBAAgB,CACvB,IAAoB,EACpB,IAAY,EACZ,cAAuB;IAEvB,MAAM,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAC3C,MAAM,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC;IAClD,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;IACjD,IAAI,WAAW,EAAE,CAAC;QAChB,MAAM,QAAQ,GAAG,cAAc,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,cAAc,SAAS,CAAC;QAChF,OAAO,GAAG,KAAK,eAAe,QAAQ,GAAG,CAAC;IAC5C,CAAC;IACD,OAAO,GAAG,KAAK,WAAW,CAAC;AAC7B,CAAC;AAED,sGAAsG;AACtG,MAAM,UAAU,YAAY,CAAC,QAAiC;IAC5D,OAAO,QAAQ,CAAC,UAAU,KAAK,KAAK,IAAI,QAAQ,CAAC,UAAU,KAAK,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC;AACtG,CAAC"}
|
|
@@ -1,12 +1,51 @@
|
|
|
1
1
|
import type { Command } from "commander";
|
|
2
|
+
import { AffitorAPI } from "../lib/api-client.js";
|
|
3
|
+
import { type Framework } from "../lib/stack-detect.js";
|
|
2
4
|
import { type CLIFlags, type ReadinessResult, type TestChainStatus } from "../types.js";
|
|
3
5
|
interface OnboardOpts {
|
|
4
6
|
apiKey?: string;
|
|
5
7
|
interactive?: boolean;
|
|
6
8
|
yes?: boolean;
|
|
7
9
|
}
|
|
10
|
+
/** A single machine-readable step in the --json summary. */
|
|
11
|
+
interface OnboardStep {
|
|
12
|
+
step: string;
|
|
13
|
+
status: "ok" | "skipped" | "manual" | "already" | "failed";
|
|
14
|
+
detail?: string;
|
|
15
|
+
}
|
|
8
16
|
export declare function registerOnboardCommand(program: Command): void;
|
|
9
17
|
export declare function runOnboard(opts: OnboardOpts, flags: CLIFlags): Promise<void>;
|
|
18
|
+
interface WireSaleArgs {
|
|
19
|
+
cwd: string;
|
|
20
|
+
framework: Framework;
|
|
21
|
+
provider: string;
|
|
22
|
+
interactive: boolean;
|
|
23
|
+
autoConfirm: boolean;
|
|
24
|
+
json: boolean;
|
|
25
|
+
/** A Stripe account is bound to the program in Affitor; undefined when it could not be read. */
|
|
26
|
+
stripeAccountBound?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Does Affitor record this program's Stripe payments through Connect? Connect credits a sale when
|
|
30
|
+
* the program is bound to the event's Stripe account, whatever the connection status says
|
|
31
|
+
* (pending_verification still records), so `GET /v1/cli/status` answers with
|
|
32
|
+
* `stripe_account_bound`. Not `stripe_connected`: it is false while pending, and before CMS
|
|
33
|
+
* v3.16.91 it was true for any Server API program. undefined when the call fails or the field
|
|
34
|
+
* is missing, so the caller asks instead of guessing.
|
|
35
|
+
*/
|
|
36
|
+
export declare function readStripeAccountBound(api: Pick<AffitorAPI, "getStatus">): Promise<true | undefined>;
|
|
37
|
+
/**
|
|
38
|
+
* The safety-critical part: locate the Stripe webhook, run the PURE
|
|
39
|
+
* `injectStripeTrackSale` transform, and:
|
|
40
|
+
* - `injected` → show the DIFF and confirm before writing.
|
|
41
|
+
* - `already` → no-op (idempotent).
|
|
42
|
+
* - `unrecognized` → PRINT the exact patch (snippet + inject_target + file:line).
|
|
43
|
+
* - no webhook → PRINT the full recipe.
|
|
44
|
+
* NEVER auto-edits when the structure isn't cleanly recognized.
|
|
45
|
+
*/
|
|
46
|
+
export declare function wireServerSale(args: WireSaleArgs): Promise<OnboardStep>;
|
|
47
|
+
/** Find call tokens outside comments/literals; template interpolation is executable code. */
|
|
48
|
+
export declare function callsTrackSale(source: string): boolean;
|
|
10
49
|
/**
|
|
11
50
|
* The first failing gate (the blocker). The CMS readiness payload reports the
|
|
12
51
|
* id of the first failing gate at the top-level `blocker` field, and the gate
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onboard.d.ts","sourceRoot":"","sources":["../../src/commands/onboard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"onboard.d.ts","sourceRoot":"","sources":["../../src/commands/onboard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOzC,OAAO,EAAE,UAAU,EAA0B,MAAM,sBAAsB,CAAC;AAG1E,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAMrE,OAAO,EAAmB,KAAK,QAAQ,EAAE,KAAK,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAEzG,UAAU,WAAW;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,4DAA4D;AAC5D,UAAU,WAAW;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,IAAI,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;IAC3D,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,QAWtD;AAQD,wBAAsB,UAAU,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,iBAsHlE;AAID,UAAU,YAAY;IACpB,GAAG,EAAE,MAAM,CA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