@wrangled/cli 0.3.16 → 0.3.17
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/dist/guide.js +1 -1
- package/dist/playbooks.js +2 -2
- package/dist/runner/redact.js +2 -1
- package/package.json +1 -1
package/dist/guide.js
CHANGED
|
@@ -168,7 +168,7 @@ To suggest a fact, write it as JSON and run \`${cli} facts propose --file fact.j
|
|
|
168
168
|
|
|
169
169
|
## Ad tags
|
|
170
170
|
|
|
171
|
-
Ads not made here (built by hand or by an agency, names in no pattern) get the marketing grammar's tags (docs/marketing-grammar.md) by Meta ad id. \`${cli} ads tags\` lists them (\`--ad <id>\`, \`--status proposed|confirmed|rejected|replaced\`, \`--limit <n>\`, \`--json\`); by default the live ones, proposed and confirmed. A proposed tag is usable at once, but not yet confirmed; only an Owner or Admin confirms, rejects or changes tags,
|
|
171
|
+
Ads not made here (built by hand or by an agency, names in no pattern) get the marketing grammar's tags (docs/marketing-grammar.md) by Meta ad id. \`${cli} ads tags\` lists them (\`--ad <id>\`, \`--status proposed|confirmed|rejected|replaced\`, \`--limit <n>\`, \`--json\`); by default the live ones, proposed and confirmed. A proposed tag is usable at once, but not yet confirmed; only an Owner or Admin confirms, rejects or changes tags, on the app's Ad tags page.
|
|
172
172
|
|
|
173
173
|
To suggest tags, write them as JSON and run \`${cli} ads tag --file tags.json\` (or pipe it on stdin), up to 500 ads at a time: \`{"ads": [{"ad_id": "120214567890123", "tags": {"angle": "discovery", "desire": "money", "hook_spot": "spoken", "hook_text": "$29,000 is the smallest lead", "hook_kind": "big_win", "format": "video", "style": "presenter", "tag_reasons": {"worry": "none"}}, "confidence": "medium", "evidence": {"ad_name": "County lead v2", "transcript_start": "$29,000 is the smallest lead"}}]}\`. The tag fields are \`marketing\`, \`offer_key\`, \`landing_funnel_key\`, \`landing_step_key\`, \`persona\`, \`awareness\`, \`concept\`, \`angle\`, \`desire\`, \`hook_spot\`, \`hook_text\`, \`hook_kind\`, \`hook2_spot\`, \`hook2_kind\`, \`format\`, \`style\`, \`speaker\`, \`cta\`, \`proof\` and \`worry\`; leave out what you did not judge. A part with no value goes in \`tag_reasons\` as \`none\` (nothing on its list applies) or \`unclear\` (too little to judge, never \`high\` confidence). Confidence is \`high\`, \`medium\` or \`low\`. A value off its list is refused with the allowed values. New tags replace an ad's proposed ones, which stay as \`replaced\`; an ad whose tags a person confirmed is kept as it is.
|
|
174
174
|
|
package/dist/playbooks.js
CHANGED
|
@@ -1031,10 +1031,10 @@ When \`resumed\` was true and that story's \`author\` is \`agent_run:<run.id>\`,
|
|
|
1031
1031
|
The story's days are the client's days. Find the workspace's reporting time zone:
|
|
1032
1032
|
|
|
1033
1033
|
\`\`\`sh
|
|
1034
|
-
${cli}
|
|
1034
|
+
${cli} guide --format json > guide.json
|
|
1035
1035
|
\`\`\`
|
|
1036
1036
|
|
|
1037
|
-
|
|
1037
|
+
From \`guide.json\`, take its \`timeZone\`, such as \`America/New_York\`. Write this query to \`windows.sql\` with \`${S.timeZone}\` replaced by the zone, keeping the quotes:
|
|
1038
1038
|
|
|
1039
1039
|
\`\`\`sql
|
|
1040
1040
|
${storyWindowsQuery}
|
package/dist/runner/redact.js
CHANGED
|
@@ -10,7 +10,8 @@ const KEY_LIKE = new RegExp(`(?<![A-Za-z0-9])(?:${[brand.apiKeyPrefix, ...brand.
|
|
|
10
10
|
const SECRET_PARAM = /\b(access_token|token|api_key|apikey|key|secret|signature|sig|password)=[^&\s"']+/gi;
|
|
11
11
|
const BEARER = /\b(Bearer\s+)[A-Za-z0-9._~+/=-]{8,}/gi;
|
|
12
12
|
const PROVIDER_KEY = /(?<![A-Za-z0-9])sk-[A-Za-z0-9_-]{16,}/g;
|
|
13
|
-
|
|
13
|
+
// Starts only where a run of name characters starts, so one long run is not rescanned from each of its letters.
|
|
14
|
+
const CREDENTIAL_ASSIGNMENT = /(["']?)(?<![A-Za-z0-9_.-])((?=[A-Za-z0-9_.-]*?(?:key|token|secret|password|passwd|authorization|credential))[A-Za-z0-9_.-]+)\1(\s*[:=]\s*)(["']?)([^\s"'&,;}]{8,})/gi;
|
|
14
15
|
/** Known secrets, credential parameters, key-shaped strings, bearer tokens and credential-named values replaced. */
|
|
15
16
|
export function redact(text, secrets) {
|
|
16
17
|
let out = text;
|