@wrangled/cli 0.3.15 → 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/main.js +7 -2
- 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/main.js
CHANGED
|
@@ -686,13 +686,14 @@ const commands = {
|
|
|
686
686
|
},
|
|
687
687
|
},
|
|
688
688
|
"content status": {
|
|
689
|
-
usage: "content status <sku | item-id> <status> [--platform <platform> --external-id <id>]",
|
|
689
|
+
usage: "content status <sku | item-id> <status> [--platform <platform> [--object-type <type>] --external-id <id>]",
|
|
690
690
|
async run(args, options) {
|
|
691
691
|
if (args.length !== 2)
|
|
692
|
-
throw new CliError("Usage: content status <sku | item-id> <status> [--platform <platform> --external-id <id>]", exitCodes.usage);
|
|
692
|
+
throw new CliError("Usage: content status <sku | item-id> <status> [--platform <platform> [--object-type <type>] --external-id <id>]", exitCodes.usage);
|
|
693
693
|
const content = await api(await resolveConnection(options.apiUrl), `/api/v1/content/${encodeURIComponent(args[0])}/status`, {
|
|
694
694
|
status: args[1],
|
|
695
695
|
...(options.platform === undefined ? {} : { platform: options.platform }),
|
|
696
|
+
...(options.objectType === undefined ? {} : { objectType: options.objectType }),
|
|
696
697
|
...(options.externalId === undefined ? {} : { externalId: options.externalId }),
|
|
697
698
|
});
|
|
698
699
|
printContent(content, options.format);
|
|
@@ -1827,6 +1828,8 @@ Options:
|
|
|
1827
1828
|
--tool-run <id> a succeeded tool run content create and edit link; repeat for several
|
|
1828
1829
|
--run <id> the agent run making the content (content), or the tool run to record (creatives create)
|
|
1829
1830
|
--platform, --external-id where content status launched says it was published, and that platform's id for it
|
|
1831
|
+
--object-type <type> what that platform's sync calls it (campaign_message or flow_message on klaviyo); needed where
|
|
1832
|
+
the sync matches several kinds, so its next read joins the item
|
|
1830
1833
|
--notes <text> what changed in the version skill publish adds
|
|
1831
1834
|
--version <n> the map version funnels show prints (default: the confirmed one)
|
|
1832
1835
|
--based-on <n> the map version funnels draft was written from; refused when someone saved since
|
|
@@ -1921,6 +1924,7 @@ function parseOptions(argv) {
|
|
|
1921
1924
|
platform: { type: "string" },
|
|
1922
1925
|
library: { type: "string" },
|
|
1923
1926
|
"external-id": { type: "string" },
|
|
1927
|
+
"object-type": { type: "string" },
|
|
1924
1928
|
origin: { type: "string" },
|
|
1925
1929
|
text: { type: "string" },
|
|
1926
1930
|
mode: { type: "string" },
|
|
@@ -2014,6 +2018,7 @@ function parseOptions(argv) {
|
|
|
2014
2018
|
platform: values.platform,
|
|
2015
2019
|
library: values.library,
|
|
2016
2020
|
externalId: values["external-id"],
|
|
2021
|
+
objectType: values["object-type"],
|
|
2017
2022
|
origin: values.origin,
|
|
2018
2023
|
text: values.text,
|
|
2019
2024
|
mode: values.mode,
|
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;
|