@memberjunction/actions-bizapps-social 6.1.0-edge.7 → 6.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.
@@ -1,4 +1,4 @@
1
1
 
2
- > @memberjunction/actions-bizapps-social@6.1.0-edge.7 build /home/runner/work/MJ/MJ/packages/Actions/BizApps/Social
2
+ > @memberjunction/actions-bizapps-social@6.1.0 build /home/runner/work/MJ/MJ/packages/Actions/BizApps/Social
3
3
  > tsc && tsc-alias -f
4
4
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,199 @@
1
1
  # @memberjunction/actions-bizapps-social
2
2
 
3
+ ## 6.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 6fd0a73: Buffer: publish as another identity, pass per-service metadata, and fix the createPost assets shape.
8
+
9
+ **`CredentialID`** is now accepted by every Buffer action. When given, the calls are made with the `accessToken` from that `MJ: Credentials` row instead of the CompanyIntegration's own token — which is what publishing to an employee's personal channel, or reading the queue of the person who owns it, requires. `CompanyIntegrationID` stays required: it is what identifies which Buffer integration this is, and the organization and channel context still come from it. A `CredentialID` that was supplied but cannot be read is **fatal** (`INVALID_CREDENTIAL`), never a silent fallback to the tenant token — falling back would publish under the wrong identity with nothing for the caller to notice. The token itself never travels through action params; only its id does.
10
+
11
+ **`PlatformMetadata`** on `Create Post (Buffer)` passes Buffer's per-service extras through to the mutation — `{ "linkedin": { "annotations": [...] } }` is how a LinkedIn @mention survives the trip, and without it the post publishes as plain text with the mention spelled out. It is accepted as an object or as a JSON string, since both forms arrive in practice. It is passed through untouched rather than modelled, because its shape belongs to whichever network the channel points at and Buffer extends it independently of this package. Unparseable input **fails** rather than being dropped, for the same reason the credential failure is fatal: quietly posting without the metadata publishes something other than what the caller composed.
12
+
13
+ **Fix — the createPost assets shape.** Buffer moved createPost's input to `[AssetInput!]` (`[{ image: { url } }]`, one entry per attachment naming its kind) on 2026-05-25 and rejects the older `{ images: [...] }` object, which is what this package was sending. Any post with `ImageURLs`, `VideoURLs` or `MediaLink` was therefore being rejected by Buffer. Reads are unaffected — Buffer still _returns_ the object form — so the input shape is now its own type, `BufferAssetInput`, alongside the unchanged `BufferAssets` response type.
14
+
15
+ This is a breaking change for any caller passing a hand-built `assets` object to the protected `createBufferPost`; the action's own `ImageURLs`/`VideoURLs`/`MediaLink` params are unchanged.
16
+
17
+ 27 tests cover the credential override, the metadata passthrough and the asset shape.
18
+
19
+ `minor` because this branch now ships `metadata/**` — the `MJ: Actions` / `MJ: Action Params` / `MJ: Action Result Codes` records these classes need to be invocable. Metadata becomes a migration at release via the build engineer's `mj sync push`, which is exactly what the `minor` trigger tracks. Without the metadata this would be `patch`.
20
+
21
+ ### Patch Changes
22
+
23
+ - 07cb22e: Fix `$`-sequence corruption in `String.prototype.replace` calls carrying runtime data (#3171).
24
+
25
+ `replace(search, replacement)` treats `$$`, `$&`, `` $` ``, `$'` and `$1`–`$99` as metacharacters when `replacement` is a **string**. Every site below passed runtime data there, so a `$` in that data was silently executed rather than inserted. The `$&`/`` $` ``/`$'` forms are worse than value corruption: they splice surrounding text _into_ the value. All are fixed by passing a replacement **function**, whose return value is used literally.
26
+ - **`@memberjunction/installer` — corrupted secrets (highest impact).** Re-running `mj install` syncs the root `.env` into MJAPI's. A DB password containing `$&` had the _stale_ MJAPI password spliced into it; ``$` `` spliced in the preceding `.env` line. The result was a wrong secret written to disk with no error, surfacing later as "MJAPI can't connect". Only the replace branch was affected — fresh installs (append branch, string concatenation) were always correct, which is why this survived. Also fixes the `newUserSetup` block (embeds user name/email) and the `mjRepoVersion` and Explorer `environment.ts` patchers.
27
+ - **`@memberjunction/core` — rewritten RLS predicates.** `RowLevelSecurityFilterInfo.MarkupFilterText` substitutes user properties, magic-link scope and `{{Acting*}}` tokens into row-level-security filters. A `$` in any of them rewrote the predicate — the exact outcome the neighbouring `'`-escaping exists to prevent. This feeds `GetEffectiveRowFilterWhereClause`, used across RunView reads, Create and Update. Also fixes organic-key `Custom` normalization, which builds a SQL `WHERE` from a data value.
28
+ - **`@memberjunction/generic-database-provider`, `@memberjunction/postgresql-dataprovider`** — end-user search terms substituted into `UserSearchParamFormatAPI` predicates, plus view-template inner SQL and PG identifier quoting. Also `QueryCompositionEngine.renameSQLIdentifier`, which rewrites CTE identifiers in composed queries: the search side was regex-escaped but the replacement side was not, so a `$` in a deconflicted CTE name (SQL Server bracketed and PG quoted identifiers both permit one) was expanded into the executed SQL.
29
+ - **`@memberjunction/ai-prompts`, `@memberjunction/computer-use`, `@memberjunction/ai-vector-sync`, `@memberjunction/aiengine`, `@memberjunction/ai-agents`** — assistant prefill text (routinely contains `$$` for LaTeX or currency), computer-use goals/URLs/step summaries, embedding-document field values, and entity field values, all interpolated into prompts and templates.
30
+ - **`@memberjunction/metadata-sync`** — parameter values in the debug SQL log.
31
+ - **`@memberjunction/testing-engine`** — test input/expected/actual values into the LLM-judge prompt, and parameter values into `SQLValidatorOracle`'s generated SQL.
32
+ - **`@memberjunction/sql-converter`** — the configured schema name substituted into emitted PostgreSQL view SQL, in both `ViewRule` and its previously-missed twin in `InsertRule`. The schema is now escaped on the _search_ side too: a `$` in it acted as an end-anchor, so the pattern matched nothing and the conversion silently emitted no rewrite.
33
+ - **`@memberjunction/sql-parser`** — `restoreAliases` swaps generated aliases back to the caller's original bracketed identifiers. Two of its three branches used `split`/`join` and were already safe; the third expanded `$`-sequences, so `[a$'b]` spliced surrounding SQL into an identifier. The aliasing path fires precisely _because_ an identifier contains a non-word character, so the input that triggers aliasing is the input that corrupted the restore. Reached from the public `ToSQL()`.
34
+ - **`@memberjunction/sqlserver-dataprovider`** — batch execution rewrites `@name` placeholders to `@q<N>_name`; the parameter name went into the `RegExp` unescaped, so a `$` in it prevented the rewrite entirely and mssql failed with "Must declare the scalar variable". Sibling of the PostgreSQL `escapeRegExp` fix below.
35
+ - **`@memberjunction/react-linter`** — component data substituted into diagnostic messages.
36
+ - **`@memberjunction/actions-bizapps-social`, `@memberjunction/ai-cli`** — hardened a numeric-only site; documented the AICLI JSON highlighter's `$1` back-references as intentional.
37
+
38
+ Also fixes a **test-tooling safety defect** found while verifying the above on a clean database: `@memberjunction/testing-cli` loaded `.env` with `dotenv.config({ override: true })`, so a variable already set in the environment was overwritten. `DB_DATABASE=MJ_scratch mj test …` was silently discarded and the suite ran — **including mutation tests** — against whatever `.env` pointed at. That made the "one database per agent" rule unenforceable by environment variable and diverged from every other `mj` command (`migrate`, `codegen`, `sync push` all honour the environment). `override` is now dotenv's default `false`, so `.env` still fills in anything unset but an explicit value wins. Guarded by a unit test. **Note the inverse hazard when upgrading:** any environment that exports `DB_*` globally — a Docker image, a CI container, a stale `export` in a shell profile — now wins over `.env`, where `.env` used to be authoritative. If a `mj test` run suddenly targets an unexpected database, check the exported environment first; the CLI prints `config.dbDatabase: <name>` at startup.
39
+
40
+ And an adjacent defect found while testing the above: `PostgreSQLDataProvider.quoteFieldNamesInToken` interpolated a field name into a `RegExp` **without escaping regex metacharacters**, so a column named `a.b` matched (and wrongly quoted) unrelated text like `axb`, and a column containing `$` was never matched at all — which had also made the replacement-side fix on that line unreachable. Field names are now escaped before interpolation.
41
+
42
+ Also adds `.github/scripts/check-dynamic-replace.mjs`, a CI gate that flags `.replace()`/`.replaceAll()` whose replacement is neither a string literal nor a function. No existing lint rule covered this — the React `string-replace-all-occurrences` rule only ever inspects the _search_ argument. The gate is line-aware (only lines a change touches), since ~100 pre-existing sites remain and a bare identifier holding a function reference is indistinguishable from one holding a string; `--all` is available for auditing. Regression tests now push `$$`, `$&`, `` $` ``, `$'` and `$1` through each fixed path.
43
+
44
+ Also fixes a **silently inert security check** found while verifying the above. `BaseTestDriver.Provider` fell back to `new Metadata() as unknown as IMetadataProvider`. `Metadata` is a facade that proxies a hand-maintained subset of members to the global provider, not a provider itself, and the cast is the only reason the compiler accepted it. Members it does not proxy read `undefined` — `RowLevelSecurityFilters` among them. The integration suite's `discoverTokenFilter` reads exactly that property to find a `{{UserID}}`-scoped filter, so it always found none: the `rls-isolation` RLS1/RLS2 token-substitution checks skipped-as-pass **on every database**, while the bundle reported green. There were 13 filters present, 5 of them `{{UserID}}`-scoped. The fallback now returns the global provider, which is what the getter's own doc comment always promised, and both checks now execute. A new `rls-isolation` check (RLS11) additionally pushes `$$`, `$&`, `` $` ``, `$'` and `$1` through a substituted user property and executes the resulting predicate, so the RLS half of this fix has live coverage rather than unit coverage alone.
45
+
46
+ - 7857d8e: Add `@memberjunction/network-utils` and remove `axios` from the repository.
47
+
48
+ The SSRF guard added for the web/HTTP actions was Actions-specific but the concern is not, so it
49
+ moves into a new dependency-free, Node-only package (`node:dns` + `node:net` only) that any
50
+ server-side package can depend on: `AssertPublicUrl`, `SafeFetch`, `IsBlockedIPAddress`, `SSRFError`.
51
+
52
+ The same package ships `HttpClient` / `HttpRequest` — a native-`fetch` HTTP client that replaces
53
+ `axios` across all 11 packages that used it. Consolidating on one client removes the third-party
54
+ dependency and puts the SSRF guard one option flag (`ValidateUrl`) away from every outbound call
55
+ site, which was impossible when each package reached for `axios` directly.
56
+
57
+ Also fixes an SSRF sink the original pass missed: the `API Rate Limiter` action takes a
58
+ caller-controlled URL and returns the response body, and is now guarded.
59
+
60
+ Public exports use `PascalCase`, per repo convention.
61
+
62
+ - Updated dependencies [394d276]
63
+ - Updated dependencies [834f8d7]
64
+ - Updated dependencies [a987913]
65
+ - Updated dependencies [e533ce5]
66
+ - Updated dependencies [b1b24d7]
67
+ - Updated dependencies [2c826f7]
68
+ - Updated dependencies [61b5612]
69
+ - Updated dependencies [ee15cf7]
70
+ - Updated dependencies [b7819d2]
71
+ - Updated dependencies [394d276]
72
+ - Updated dependencies [c42c0e8]
73
+ - Updated dependencies [4586215]
74
+ - Updated dependencies [197fdf8]
75
+ - Updated dependencies [f6a4341]
76
+ - Updated dependencies [67e4c9e]
77
+ - Updated dependencies [1a2ce13]
78
+ - Updated dependencies [0d3094c]
79
+ - Updated dependencies [255d506]
80
+ - Updated dependencies [0ec1980]
81
+ - Updated dependencies [1940a4d]
82
+ - Updated dependencies [07cb22e]
83
+ - Updated dependencies [1d2ffd4]
84
+ - Updated dependencies [711c208]
85
+ - Updated dependencies [e2ad3c0]
86
+ - Updated dependencies [c581b4f]
87
+ - Updated dependencies [d79fe39]
88
+ - Updated dependencies [59def38]
89
+ - Updated dependencies [2412415]
90
+ - Updated dependencies [06ccfb2]
91
+ - Updated dependencies [9699d0e]
92
+ - Updated dependencies [394d276]
93
+ - Updated dependencies [43f9133]
94
+ - Updated dependencies [08829f5]
95
+ - Updated dependencies [815b9bc]
96
+ - Updated dependencies [2cc08e1]
97
+ - Updated dependencies [a5f92d2]
98
+ - Updated dependencies [2d14c62]
99
+ - Updated dependencies [394d276]
100
+ - Updated dependencies [c996a56]
101
+ - Updated dependencies [de6eb14]
102
+ - Updated dependencies [38d4482]
103
+ - Updated dependencies [052b4c7]
104
+ - Updated dependencies [8ec1515]
105
+ - Updated dependencies [9a905e8]
106
+ - Updated dependencies [f5ec13b]
107
+ - Updated dependencies [50987c4]
108
+ - Updated dependencies [c996a56]
109
+ - Updated dependencies [7b4abe7]
110
+ - Updated dependencies [051e0ff]
111
+ - Updated dependencies [95fc3e6]
112
+ - Updated dependencies [8d880cc]
113
+ - Updated dependencies [1fa6f6b]
114
+ - Updated dependencies [cefc302]
115
+ - Updated dependencies [841e6ea]
116
+ - Updated dependencies [394d276]
117
+ - Updated dependencies [00a2483]
118
+ - Updated dependencies [8f199e2]
119
+ - Updated dependencies [6485ef0]
120
+ - Updated dependencies [b954812]
121
+ - Updated dependencies [080f4cd]
122
+ - Updated dependencies [bbb7fcc]
123
+ - Updated dependencies [b8130f3]
124
+ - Updated dependencies [d66a26a]
125
+ - Updated dependencies [c643ba3]
126
+ - Updated dependencies [e9e9873]
127
+ - Updated dependencies [1d88e00]
128
+ - Updated dependencies [647bd71]
129
+ - Updated dependencies [8288711]
130
+ - Updated dependencies [be0bdb2]
131
+ - Updated dependencies [9b9e5a4]
132
+ - Updated dependencies [f544a93]
133
+ - Updated dependencies [48ff99f]
134
+ - Updated dependencies [076fa5d]
135
+ - Updated dependencies [9f73528]
136
+ - Updated dependencies [7857d8e]
137
+ - Updated dependencies [68b9cf0]
138
+ - Updated dependencies [27e4d09]
139
+ - Updated dependencies [d90a3ea]
140
+ - Updated dependencies [23c2521]
141
+ - Updated dependencies [2741d46]
142
+ - Updated dependencies [048c5ce]
143
+ - Updated dependencies [63bc733]
144
+ - Updated dependencies [92f2ac9]
145
+ - Updated dependencies [8ad04e8]
146
+ - Updated dependencies [7300953]
147
+ - Updated dependencies [7300953]
148
+ - Updated dependencies [a77afac]
149
+ - Updated dependencies [98841bb]
150
+ - Updated dependencies [53c341c]
151
+ - Updated dependencies [9cbe17f]
152
+ - Updated dependencies [b46330e]
153
+ - Updated dependencies [fccd0b2]
154
+ - Updated dependencies [84f276e]
155
+ - Updated dependencies [6ecfaa0]
156
+ - Updated dependencies [0db4f4f]
157
+ - Updated dependencies [53d256f]
158
+ - Updated dependencies [0677595]
159
+ - Updated dependencies [2be2960]
160
+ - Updated dependencies [cf2484c]
161
+ - Updated dependencies [7f3c60c]
162
+ - Updated dependencies [97aefcc]
163
+ - Updated dependencies [0967ba7]
164
+ - Updated dependencies [f5ec13b]
165
+ - Updated dependencies [de343b5]
166
+ - Updated dependencies [5fc861f]
167
+ - Updated dependencies [1748491]
168
+ - Updated dependencies [4cdfdcf]
169
+ - Updated dependencies [7fefca2]
170
+ - Updated dependencies [a1a8989]
171
+ - Updated dependencies [b00a985]
172
+ - Updated dependencies [041865c]
173
+ - Updated dependencies [905820a]
174
+ - Updated dependencies [ca3657d]
175
+ - Updated dependencies [1bd9674]
176
+ - Updated dependencies [394d276]
177
+ - Updated dependencies [394d276]
178
+ - Updated dependencies [394d276]
179
+ - Updated dependencies [394d276]
180
+ - Updated dependencies [394d276]
181
+ - Updated dependencies [d8adda1]
182
+ - Updated dependencies [d078c54]
183
+ - Updated dependencies [7fcdc2d]
184
+ - Updated dependencies [15319b4]
185
+ - Updated dependencies [d0a2a55]
186
+ - Updated dependencies [4b1257f]
187
+ - Updated dependencies [ca4feb4]
188
+ - Updated dependencies [1c0d586]
189
+ - @memberjunction/actions@6.1.0
190
+ - @memberjunction/global@6.1.0
191
+ - @memberjunction/core@6.1.0
192
+ - @memberjunction/core-entities@6.1.0
193
+ - @memberjunction/actions-base@6.1.0
194
+ - @memberjunction/network-utils@6.1.0
195
+ - @memberjunction/credentials@6.1.0
196
+
3
197
  ## 6.1.0-edge.7
4
198
 
5
199
  ### Patch Changes
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@memberjunction/actions-bizapps-social",
3
3
  "type": "module",
4
- "version": "6.1.0-edge.7",
4
+ "version": "6.1.0",
5
5
  "description": "Social Media Actions for MemberJunction - Twitter, LinkedIn, Facebook, Instagram, TikTok, YouTube, HootSuite, Buffer",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -21,13 +21,13 @@
21
21
  "author": "MemberJunction.com",
22
22
  "license": "BUSL-1.1",
23
23
  "dependencies": {
24
- "@memberjunction/actions": "6.1.0-edge.7",
25
- "@memberjunction/actions-base": "6.1.0-edge.7",
26
- "@memberjunction/core": "6.1.0-edge.7",
27
- "@memberjunction/core-entities": "6.1.0-edge.7",
28
- "@memberjunction/credentials": "6.1.0-edge.7",
29
- "@memberjunction/global": "6.1.0-edge.7",
30
- "@memberjunction/network-utils": "6.1.0-edge.7",
24
+ "@memberjunction/actions": "6.1.0",
25
+ "@memberjunction/actions-base": "6.1.0",
26
+ "@memberjunction/core": "6.1.0",
27
+ "@memberjunction/core-entities": "6.1.0",
28
+ "@memberjunction/credentials": "6.1.0",
29
+ "@memberjunction/global": "6.1.0",
30
+ "@memberjunction/network-utils": "6.1.0",
31
31
  "axios": "^1.13.4"
32
32
  },
33
33
  "devDependencies": {