securenow 7.0.0-anas.2 → 7.1.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/CONSUMING-APPS-GUIDE.md +17 -11
- package/README.md +204 -282
- package/SKILL-CLI.md +8 -4
- package/app-config.js +21 -1
- package/cli/apiKey.js +55 -0
- package/cli/apps.js +8 -19
- package/cli/auth.js +13 -2
- package/cli/config.js +24 -0
- package/cli/diagnostics.js +3 -1
- package/cli.js +24 -0
- package/docs/ALL-FRAMEWORKS-QUICKSTART.md +8 -0
- package/docs/ENVIRONMENT-VARIABLES.md +24 -15
- package/docs/LOGGING-QUICKSTART.md +25 -38
- package/docs/NEXTJS-QUICKSTART.md +46 -36
- package/docs/NUXT-GUIDE.md +17 -13
- package/examples/nextjs-env-example.txt +32 -34
- package/firewall-only.js +3 -2
- package/nextjs.js +4 -2
- package/package.json +1 -1
- package/postinstall.js +3 -11
package/CONSUMING-APPS-GUIDE.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
This guide is for developers who want to add the `securenow` package to their applications to enable logging to SecureNow or any OTLP-compatible backend.
|
|
4
4
|
|
|
5
|
-
**Since
|
|
5
|
+
**Since v7.0.0:** Logging, body capture, and multipart capture are **on by default**. Credentials come from `.securenow/credentials.json` written by `npx securenow login` — no env vars required for local dev. Set `SECURENOW_LOGGING_ENABLED=0` to disable logging if you don't want it.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -10,30 +10,36 @@ This guide is for developers who want to add the `securenow` package to their ap
|
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
12
|
npm install securenow
|
|
13
|
+
npx securenow login # pick/create your app in the browser
|
|
13
14
|
```
|
|
14
15
|
|
|
16
|
+
That's it for local dev. The `login` step writes `.securenow/credentials.json` (gitignored automatically) and the SDK reads it at boot.
|
|
17
|
+
|
|
18
|
+
For CI / Docker / production where you can't run the browser flow, set env vars — see "Step 1 (alternative)" below.
|
|
19
|
+
|
|
15
20
|
---
|
|
16
21
|
|
|
17
22
|
## Setup Steps
|
|
18
23
|
|
|
19
|
-
### Step 1
|
|
24
|
+
### Step 1 (alternative) — Environment variables for CI / Docker / prod
|
|
20
25
|
|
|
21
|
-
|
|
26
|
+
If `npx securenow login` isn't an option on the target machine, set:
|
|
22
27
|
|
|
23
28
|
```bash
|
|
24
|
-
#
|
|
25
|
-
|
|
29
|
+
# App routing key (UUID) — from `npx securenow apps`
|
|
30
|
+
SECURENOW_APPID=your-app-key-uuid
|
|
26
31
|
|
|
27
|
-
#
|
|
28
|
-
|
|
32
|
+
# OTLP collector (defaults to https://freetrial.securenow.ai:4318)
|
|
33
|
+
SECURENOW_INSTANCE=https://freetrial.securenow.ai:4318
|
|
29
34
|
|
|
30
|
-
#
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
# For managed OTLP / authentication (optional):
|
|
35
|
+
# Optional — defaults are already on:
|
|
36
|
+
# SECURENOW_LOGGING_ENABLED=0 # to disable console-log forwarding
|
|
37
|
+
# SECURENOW_CAPTURE_BODY=0 # to disable body capture (required for Fastify/Hapi/Hono)
|
|
34
38
|
# OTEL_EXPORTER_OTLP_HEADERS="x-api-key=your-key"
|
|
35
39
|
```
|
|
36
40
|
|
|
41
|
+
Env vars always take precedence over the credentials file.
|
|
42
|
+
|
|
37
43
|
---
|
|
38
44
|
|
|
39
45
|
### Step 2: Choose Your Integration Method
|