Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions npm-alias/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dealmachine",
"version": "0.4.1-rc.2",
"version": "0.4.1",
"description": "Short install alias for the DealMachine property intelligence CLI",
"author": "DealMachine",
"license": "MIT",
Expand All @@ -23,7 +23,7 @@
"LICENSE"
],
"dependencies": {
"@dealmachine/cli": "0.4.1-rc.2"
"@dealmachine/cli": "0.4.1"
},
"engines": {
"node": ">=18"
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dealmachine/cli",
"version": "0.4.1-rc.2",
"version": "0.4.1",
"description": "DealMachine CLI for property intelligence, people lookup, and enrichment through the public API",
"author": "DealMachine",
"license": "MIT",
Expand Down
2 changes: 2 additions & 0 deletions src/lib/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ export async function verifyCredentials(apiKey: string): Promise<{
headers: {
'Authorization': `Bearer ${apiKey}`,
'User-Agent': CLI_USER_AGENT,
// Counts this check as CLI use in the API's request log.
'X-DealMachine-Source': 'cli',
},
});

Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const CLI_VERSION = '0.4.1-rc.2';
export const CLI_VERSION = '0.4.1';
export const CLI_USER_AGENT = `dm-cli/${CLI_VERSION}`;
29 changes: 29 additions & 0 deletions tests/factory/FW-1829.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"version": 1,
"issue": "FW-1829",
"criteria": [
{
"id": "AC-1",
"text": "GIVEN a person uses the CLI with an API key, WHEN they sign in with that key or ask the CLI to verify who they are signed in as, THEN the request that checks the key tells the API it came from the CLI, so it is counted as CLI use and not as plain API use."
}
],
"checks": [
{
"title": "CLI key check tells the API it came from the CLI",
"surface": "cli",
"repository": "cli",
"preconditions": [
"Run the reviewed CLI candidate with the approved Factory executor. No API credentials are needed."
],
"steps": [
"Run the CLI check suite. The CLI API helpers test in tests/lib/api.test.ts checks a key and inspects the request that was sent."
],
"expected": "The request that checks a key carries the CLI source marker alongside the key and the CLI version, so the API counts it as CLI use.",
"criterionId": "AC-1",
"execution": "automated",
"automation": {
"taskId": "cli:check"
}
}
]
}
1 change: 1 addition & 0 deletions tests/lib/api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ describe('CLI API helpers', () => {
headers: {
'Authorization': 'Bearer dm_sk_live_test',
'User-Agent': `dm-cli/${manifest.version}`,
'X-DealMachine-Source': 'cli',
},
});
});
Expand Down
Loading