@wrangled/cli 0.3.16 → 0.3.18
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/main.js +3 -0
- package/dist/playbooks.js +4 -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/main.js
CHANGED
|
@@ -170,6 +170,9 @@ const commands = {
|
|
|
170
170
|
if (money.store_orders_in_stripe?.length) {
|
|
171
171
|
console.log(`\nStore orders paid through Stripe, counted under stripe:\n${renderTable(["source", "currency", "orders", "total"], money.store_orders_in_stripe)}`);
|
|
172
172
|
}
|
|
173
|
+
if (money.store_orders_in_paypal?.length) {
|
|
174
|
+
console.log(`\nStore orders paid through PayPal, counted under paypal:\n${renderTable(["source", "currency", "orders", "total"], money.store_orders_in_paypal)}`);
|
|
175
|
+
}
|
|
173
176
|
if (money.refund_days.length > 0)
|
|
174
177
|
console.log(`\nBiggest refund days:\n${renderTable(["date", "currency", "refunds"], money.refund_days)}`);
|
|
175
178
|
printLeftOut(money.left_out, "roas (net still counts it)");
|
package/dist/playbooks.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// The app imports this file too (src/lib/stories/story-hand.ts), and Turbopack cannot find x.ts from "./x.js", so these
|
|
2
|
+
// two imports name the .ts file; tsc rewrites them to .js in the published CLI (rewriteRelativeImportExtensions).
|
|
1
3
|
import { brand } from "./brand.js";
|
|
2
4
|
import { DLC_EXAMPLE_FILE, dlcExampleMap } from "./dlc-map-example.js";
|
|
3
5
|
const cli = brand.slug;
|
|
@@ -1031,10 +1033,10 @@ When \`resumed\` was true and that story's \`author\` is \`agent_run:<run.id>\`,
|
|
|
1031
1033
|
The story's days are the client's days. Find the workspace's reporting time zone:
|
|
1032
1034
|
|
|
1033
1035
|
\`\`\`sh
|
|
1034
|
-
${cli}
|
|
1036
|
+
${cli} guide --format json > guide.json
|
|
1035
1037
|
\`\`\`
|
|
1036
1038
|
|
|
1037
|
-
|
|
1039
|
+
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
1040
|
|
|
1039
1041
|
\`\`\`sql
|
|
1040
1042
|
${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;
|