opscms-analytics-plugin 1.0.4 → 1.0.5
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/CHANGELOG.md +4 -0
- package/dist/index.js +9 -22
- package/dist/index.mjs +10 -23
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.5
|
|
4
|
+
|
|
5
|
+
Saving a new entry as the platform owner failed: the organization, which the form does not let anyone pick, was left empty. It now comes from the chosen site. Needs opscms-sdk 0.1.9 or later. No database change.
|
|
6
|
+
|
|
3
7
|
## 1.0.4
|
|
4
8
|
|
|
5
9
|
LinkedIn Insight Tag as a provider: a site enters its Partner ID, and the website loads the tag for visitors who allow marketing cookies, with nothing to add in a tag manager. The ID is checked when saved (a number). Adds a database change (the new provider).
|
package/dist/index.js
CHANGED
|
@@ -175,28 +175,10 @@ var AnalyticsIntegrations = {
|
|
|
175
175
|
}
|
|
176
176
|
},
|
|
177
177
|
// ── Relationships ───────────────────────────────────────────
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
required: true,
|
|
183
|
-
index: true,
|
|
184
|
-
admin: { description: "The site this integration applies to" },
|
|
185
|
-
// The value of `site` is decided by who is writing, not by what they submitted. Without this an editor could plant a `customScript` (rendered raw
|
|
186
|
-
// on every page) under another tenant's site: a cross-tenant stored-XSS path.
|
|
187
|
-
hooks: { beforeValidate: [import_opscms_sdk.tenancy.pinSite] }
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
name: "organization",
|
|
191
|
-
type: "relationship",
|
|
192
|
-
relationTo: "organizations",
|
|
193
|
-
required: true,
|
|
194
|
-
index: true,
|
|
195
|
-
admin: { readOnly: true, description: "Set from the site: a site belongs to exactly one organization." },
|
|
196
|
-
// Skipped on create (the hook sets it), so a read-only required field does not block the form.
|
|
197
|
-
validate: (value, { operation }) => operation === "create" || value != null ? true : "This field is required.",
|
|
198
|
-
hooks: { beforeValidate: [import_opscms_sdk.tenancy.pinOrganization] }
|
|
199
|
-
},
|
|
178
|
+
// `site` and `organization`. The value of `site` is decided by who is writing, not by what they submitted: without that an editor could plant a
|
|
179
|
+
// `customScript` (rendered raw on every page) under another tenant's site, a cross-tenant stored-XSS path. The organization is the site's, so the
|
|
180
|
+
// platform owner, who has none of their own, gets it from the site chosen.
|
|
181
|
+
...import_opscms_sdk.tenantFields,
|
|
200
182
|
{
|
|
201
183
|
name: "isActive",
|
|
202
184
|
type: "checkbox",
|
|
@@ -215,6 +197,11 @@ var analyticsManifest = (0, import_opscms_sdk2.definePluginManifest)({
|
|
|
215
197
|
category: "analytics",
|
|
216
198
|
icon: "icon.svg",
|
|
217
199
|
releases: [
|
|
200
|
+
{
|
|
201
|
+
version: "1.0.5",
|
|
202
|
+
date: "2026-11-30",
|
|
203
|
+
notes: ["Saving a new entry as the platform owner failed: the organization, which the form does not let anyone pick, was left empty. It now comes from the chosen site."]
|
|
204
|
+
},
|
|
218
205
|
{
|
|
219
206
|
version: "1.0.4",
|
|
220
207
|
date: "2026-11-30",
|
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { definePlugin } from "opscms-sdk";
|
|
3
3
|
|
|
4
4
|
// src/AnalyticsIntegrations.ts
|
|
5
|
-
import { access, platform, secretField, SETTINGS_MASK,
|
|
5
|
+
import { access, platform, secretField, SETTINGS_MASK, tenantFields } from "opscms-sdk";
|
|
6
6
|
|
|
7
7
|
// src/integrationValues.ts
|
|
8
8
|
var ID = /^[A-Za-z0-9._:/-]{1,100}$/;
|
|
@@ -142,28 +142,10 @@ var AnalyticsIntegrations = {
|
|
|
142
142
|
}
|
|
143
143
|
},
|
|
144
144
|
// ── Relationships ───────────────────────────────────────────
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
required: true,
|
|
150
|
-
index: true,
|
|
151
|
-
admin: { description: "The site this integration applies to" },
|
|
152
|
-
// The value of `site` is decided by who is writing, not by what they submitted. Without this an editor could plant a `customScript` (rendered raw
|
|
153
|
-
// on every page) under another tenant's site: a cross-tenant stored-XSS path.
|
|
154
|
-
hooks: { beforeValidate: [tenancy.pinSite] }
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
name: "organization",
|
|
158
|
-
type: "relationship",
|
|
159
|
-
relationTo: "organizations",
|
|
160
|
-
required: true,
|
|
161
|
-
index: true,
|
|
162
|
-
admin: { readOnly: true, description: "Set from the site: a site belongs to exactly one organization." },
|
|
163
|
-
// Skipped on create (the hook sets it), so a read-only required field does not block the form.
|
|
164
|
-
validate: (value, { operation }) => operation === "create" || value != null ? true : "This field is required.",
|
|
165
|
-
hooks: { beforeValidate: [tenancy.pinOrganization] }
|
|
166
|
-
},
|
|
145
|
+
// `site` and `organization`. The value of `site` is decided by who is writing, not by what they submitted: without that an editor could plant a
|
|
146
|
+
// `customScript` (rendered raw on every page) under another tenant's site, a cross-tenant stored-XSS path. The organization is the site's, so the
|
|
147
|
+
// platform owner, who has none of their own, gets it from the site chosen.
|
|
148
|
+
...tenantFields,
|
|
167
149
|
{
|
|
168
150
|
name: "isActive",
|
|
169
151
|
type: "checkbox",
|
|
@@ -182,6 +164,11 @@ var analyticsManifest = definePluginManifest({
|
|
|
182
164
|
category: "analytics",
|
|
183
165
|
icon: "icon.svg",
|
|
184
166
|
releases: [
|
|
167
|
+
{
|
|
168
|
+
version: "1.0.5",
|
|
169
|
+
date: "2026-11-30",
|
|
170
|
+
notes: ["Saving a new entry as the platform owner failed: the organization, which the form does not let anyone pick, was left empty. It now comes from the chosen site."]
|
|
171
|
+
},
|
|
185
172
|
{
|
|
186
173
|
version: "1.0.4",
|
|
187
174
|
date: "2026-11-30",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opscms-analytics-plugin",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Per-site analytics for an OpsCMS platform: each site's own Google, Matomo, Plausible, Fathom, Umami, PostHog or custom settings, and the server-side GA4 workflow action.",
|
|
3
|
+
"version": "1.0.5",
|
|
4
|
+
"description": "Per-site analytics for an OpsCMS platform: each site's own Google, LinkedIn, Matomo, Plausible, Fathom, Umami, PostHog or custom settings, and the server-side GA4 workflow action.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"author": "IVarse",
|
|
42
42
|
"license": "MIT",
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"opscms-sdk": "^0.1.
|
|
44
|
+
"opscms-sdk": "^0.1.9",
|
|
45
45
|
"payload": "^3.0.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|