nameslink 1.0.4 → 1.0.6
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 +10 -0
- package/package.json +1 -1
- package/src/hosted-site.mjs +5 -1
- package/src/journey.mjs +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# NamesLink CLI
|
|
2
2
|
|
|
3
|
+
Hosted preview receipts are checked against the selected API environment. Production API
|
|
4
|
+
hosts accept production preview URLs; the explicit HTTPS PRE API hosts accept only PRE
|
|
5
|
+
preview URLs. Custom endpoints still require a process-local opt-in; environment admission
|
|
6
|
+
and business login remain separate. Resuming the same preview keeps its original upload.
|
|
7
|
+
|
|
8
|
+
Agent integrations can set `NAMESLINK_TOUCHPOINT=CODEX_PLUGIN` on an individual CLI process.
|
|
9
|
+
It uses the existing journey, request headers and OAuth state, preserves an earlier first touch,
|
|
10
|
+
and labels later touches. This client-reported label is not installation proof or authorization.
|
|
11
|
+
Keep it process-local so ordinary terminal calls are not mislabeled.
|
|
12
|
+
|
|
3
13
|
Ship a real website in one sentence: check a domain, review an exact quote, approve it explicitly,
|
|
4
14
|
and purchase or reuse the domain through NamesLink. The same CLI manages account-scoped DNS records
|
|
5
15
|
and can publish a reviewed static artifact through NamesLink, then bind it through NamesLink DNS.
|
package/package.json
CHANGED
package/src/hosted-site.mjs
CHANGED
|
@@ -508,7 +508,11 @@ function validateSession(session, expected) {
|
|
|
508
508
|
function validatedPreviewUrl(endpoint, apiEndpoint) {
|
|
509
509
|
let url;
|
|
510
510
|
try { url = new URL(endpoint.url); } catch { throw failure('InvalidReceipt'); }
|
|
511
|
-
|
|
511
|
+
let api;
|
|
512
|
+
try { api = new URL(apiEndpoint); } catch { throw failure('InvalidReceipt'); }
|
|
513
|
+
const pre = api.protocol === 'https:' && !api.port && !api.username && !api.password
|
|
514
|
+
&& ['pre.nameslink.com', 'preo.nameslink.com', 'apipre.nameslink.com'].includes(api.hostname);
|
|
515
|
+
const suffix = pre ? '.pre.nameslink.site' : '.nameslink.site';
|
|
512
516
|
const slug = url.hostname.slice(0, -suffix.length);
|
|
513
517
|
if (url.protocol !== 'https:' || url.username || url.password || url.search || url.hash
|
|
514
518
|
|| !url.hostname.endsWith(suffix) || !/^[a-z0-9-]{3,48}$/.test(slug)
|
package/src/journey.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { randomBytes } from 'node:crypto';
|
|
2
2
|
|
|
3
3
|
const JOURNEY_PATTERN = /^jny_[a-f0-9]{32}$/;
|
|
4
|
-
const TOUCHPOINTS = new Set(['CLI_DIRECT', 'AGENT_SKILL', 'CLI_BROWSER_HANDOFF']);
|
|
4
|
+
const TOUCHPOINTS = new Set(['CLI_DIRECT', 'AGENT_SKILL', 'CLI_BROWSER_HANDOFF', 'CODEX_PLUGIN']);
|
|
5
5
|
const COMMANDS = new Set([
|
|
6
6
|
'login', 'logout', 'whoami', 'auth:status', 'doctor', 'configure', 'capabilities',
|
|
7
7
|
'wallet:balance', 'wallet:top-up', 'mfa:send-code', 'domain:search', 'domain:check',
|