@mindful-web/marko-web-identity-x 1.90.2 → 1.96.3

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/CLAUDE.md CHANGED
@@ -423,7 +423,10 @@ No coverage is lost: every field the fleet-wide impact analysis measured is a se
423
423
  `buildContentSource()`. **Definitions come from server config, never the body**, so a client
424
424
  cannot widen what gets written by posting extra rows. Drops an empty select rather than sending
425
425
  `optionIds: []`, which the writer reads as *unset* — the one way this feature could destroy data
426
- despite the fill-blanks-only rule.
426
+ despite the fill-blanks-only rule. `buildContentSource()` sends `appContextId` (falling back to
427
+ the app id) as `websiteChannelId`, which is what Insights scopes submissions by. watt, cox and
428
+ industrial-media share one app across their sites with a context per site; sending the app id
429
+ there gave WATT's first 44 submissions a channel no site maps to, and Insights showed 0.
427
430
  - `routes/progressive-profile.js` — `POST /__idx/progressive-profile` (+ `/dismiss`). A thin proxy;
428
431
  it owns *trust*, not writes.
429
432
  - `components/progressive-profile-form.marko` (`<marko-web-identity-x-progressive-profile-form>`)
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-identity-x$1.90.2/components/access.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.96.3/components/access.marko",
6
6
  marko_component = require("./access.marko"),
7
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
8
8
  module_objectPath_module = require("@mindful-web/object-path"),
@@ -53,7 +53,7 @@ marko_template._ = marko_renderer(render, {
53
53
  }, marko_component);
54
54
 
55
55
  marko_template.meta = {
56
- id: "/@mindful-web/marko-web-identity-x$1.90.2/components/access.marko",
56
+ id: "/@mindful-web/marko-web-identity-x$1.96.3/components/access.marko",
57
57
  component: "./access.marko",
58
58
  tags: [
59
59
  "@mindful-web/marko-core/components/resolve.marko"
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-identity-x$1.90.2/components/comment-stream.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.96.3/components/comment-stream.marko",
6
6
  marko_component = require("./comment-stream.marko"),
7
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
8
8
  module_objectPath_module = require("@mindful-web/object-path"),
@@ -91,7 +91,7 @@ marko_template._ = marko_renderer(render, {
91
91
  }, marko_component);
92
92
 
93
93
  marko_template.meta = {
94
- id: "/@mindful-web/marko-web-identity-x$1.90.2/components/comment-stream.marko",
94
+ id: "/@mindful-web/marko-web-identity-x$1.96.3/components/comment-stream.marko",
95
95
  component: "./comment-stream.marko",
96
96
  tags: [
97
97
  "@mindful-web/marko-web/components/browser-component.marko",
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-identity-x$1.90.2/components/context.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.96.3/components/context.marko",
6
6
  marko_component = require("./context.marko"),
7
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
8
8
  marko_dynamicTag = require("marko/dist/runtime/helpers/dynamic-tag"),
@@ -49,7 +49,7 @@ marko_template._ = marko_renderer(render, {
49
49
  }, marko_component);
50
50
 
51
51
  marko_template.meta = {
52
- id: "/@mindful-web/marko-web-identity-x$1.90.2/components/context.marko",
52
+ id: "/@mindful-web/marko-web-identity-x$1.96.3/components/context.marko",
53
53
  component: "./context.marko",
54
54
  tags: [
55
55
  "@mindful-web/marko-core/components/resolve.marko"
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-identity-x$1.90.2/components/form-access.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.96.3/components/form-access.marko",
6
6
  marko_component = require("./form-access.marko"),
7
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
8
8
  module_defaultValue = require("@mindful-web/marko-core/utils/default-value"),
@@ -179,7 +179,7 @@ marko_template._ = marko_renderer(render, {
179
179
  }, marko_component);
180
180
 
181
181
  marko_template.meta = {
182
- id: "/@mindful-web/marko-web-identity-x$1.90.2/components/form-access.marko",
182
+ id: "/@mindful-web/marko-web-identity-x$1.96.3/components/form-access.marko",
183
183
  component: "./form-access.marko",
184
184
  tags: [
185
185
  "@mindful-web/marko-web/components/browser-component.marko",
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-identity-x$1.90.2/components/form-authenticate.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.96.3/components/form-authenticate.marko",
6
6
  marko_component = require("./form-authenticate.marko"),
7
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
8
8
  module_objectPath_module = require("@mindful-web/object-path"),
@@ -81,7 +81,7 @@ marko_template._ = marko_renderer(render, {
81
81
  }, marko_component);
82
82
 
83
83
  marko_template.meta = {
84
- id: "/@mindful-web/marko-web-identity-x$1.90.2/components/form-authenticate.marko",
84
+ id: "/@mindful-web/marko-web-identity-x$1.96.3/components/form-authenticate.marko",
85
85
  component: "./form-authenticate.marko",
86
86
  tags: [
87
87
  "@mindful-web/marko-web/components/browser-component.marko",
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-identity-x$1.90.2/components/form-change-email.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.96.3/components/form-change-email.marko",
6
6
  marko_component = require("./form-change-email.marko"),
7
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
8
8
  module_objectPath_module = require("@mindful-web/object-path"),
@@ -59,7 +59,7 @@ marko_template._ = marko_renderer(render, {
59
59
  }, marko_component);
60
60
 
61
61
  marko_template.meta = {
62
- id: "/@mindful-web/marko-web-identity-x$1.90.2/components/form-change-email.marko",
62
+ id: "/@mindful-web/marko-web-identity-x$1.96.3/components/form-change-email.marko",
63
63
  component: "./form-change-email.marko",
64
64
  tags: [
65
65
  "@mindful-web/marko-web/components/browser-component.marko",
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-identity-x$1.90.2/components/form-login.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.96.3/components/form-login.marko",
6
6
  marko_component = require("./form-login.marko"),
7
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
8
8
  module_objectPath_module = require("@mindful-web/object-path"),
@@ -92,7 +92,7 @@ marko_template._ = marko_renderer(render, {
92
92
  }, marko_component);
93
93
 
94
94
  marko_template.meta = {
95
- id: "/@mindful-web/marko-web-identity-x$1.90.2/components/form-login.marko",
95
+ id: "/@mindful-web/marko-web-identity-x$1.96.3/components/form-login.marko",
96
96
  component: "./form-login.marko",
97
97
  tags: [
98
98
  "@mindful-web/marko-web/components/browser-component.marko",
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-identity-x$1.90.2/components/form-logout.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.96.3/components/form-logout.marko",
6
6
  marko_renderer = require("marko/dist/runtime/components/renderer"),
7
7
  module_defaultValue = require("@mindful-web/marko-core/utils/default-value"),
8
8
  defaultValue = module_defaultValue.default || module_defaultValue,
@@ -29,7 +29,7 @@ marko_template._ = marko_renderer(render, {
29
29
  });
30
30
 
31
31
  marko_template.meta = {
32
- id: "/@mindful-web/marko-web-identity-x$1.90.2/components/form-logout.marko",
32
+ id: "/@mindful-web/marko-web-identity-x$1.96.3/components/form-logout.marko",
33
33
  tags: [
34
34
  "@mindful-web/marko-web/components/browser-component.marko"
35
35
  ]
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-identity-x$1.90.2/components/form-profile.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.96.3/components/form-profile.marko",
6
6
  marko_component = require("./form-profile.marko"),
7
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
8
8
  module_objectPath_module = require("@mindful-web/object-path"),
@@ -84,7 +84,7 @@ marko_template._ = marko_renderer(render, {
84
84
  }, marko_component);
85
85
 
86
86
  marko_template.meta = {
87
- id: "/@mindful-web/marko-web-identity-x$1.90.2/components/form-profile.marko",
87
+ id: "/@mindful-web/marko-web-identity-x$1.96.3/components/form-profile.marko",
88
88
  component: "./form-profile.marko",
89
89
  tags: [
90
90
  "@mindful-web/marko-web/components/browser-component.marko",
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-identity-x$1.90.2/components/form-register.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.96.3/components/form-register.marko",
6
6
  marko_renderer = require("marko/dist/runtime/components/renderer"),
7
7
  marko_assign = require("marko/dist/runtime/helpers/assign"),
8
8
  marko_web_identity_x_form_login_template = require("./form-login.marko"),
@@ -25,7 +25,7 @@ marko_template._ = marko_renderer(render, {
25
25
  });
26
26
 
27
27
  marko_template.meta = {
28
- id: "/@mindful-web/marko-web-identity-x$1.90.2/components/form-register.marko",
28
+ id: "/@mindful-web/marko-web-identity-x$1.96.3/components/form-register.marko",
29
29
  tags: [
30
30
  "./form-login.marko"
31
31
  ]
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-identity-x$1.90.2/components/google-init.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.96.3/components/google-init.marko",
6
6
  marko_renderer = require("marko/dist/runtime/components/renderer"),
7
7
  marko_attr = require("marko/dist/runtime/html/helpers/attr"),
8
8
  marko_str = require("marko/dist/runtime/helpers/to-string");
@@ -239,5 +239,5 @@ marko_template._ = marko_renderer(render, {
239
239
  });
240
240
 
241
241
  marko_template.meta = {
242
- id: "/@mindful-web/marko-web-identity-x$1.90.2/components/google-init.marko"
242
+ id: "/@mindful-web/marko-web-identity-x$1.96.3/components/google-init.marko"
243
243
  };
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-identity-x$1.90.2/components/google-sign-in-button.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.96.3/components/google-sign-in-button.marko",
6
6
  marko_renderer = require("marko/dist/runtime/components/renderer"),
7
7
  helpers_escape_xml = require("marko/dist/runtime/html/helpers/escape-xml"),
8
8
  marko_escapeXml = helpers_escape_xml.x,
@@ -40,5 +40,5 @@ marko_template._ = marko_renderer(render, {
40
40
  });
41
41
 
42
42
  marko_template.meta = {
43
- id: "/@mindful-web/marko-web-identity-x$1.90.2/components/google-sign-in-button.marko"
43
+ id: "/@mindful-web/marko-web-identity-x$1.96.3/components/google-sign-in-button.marko"
44
44
  };
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-identity-x$1.90.2/components/identify.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.96.3/components/identify.marko",
6
6
  marko_component = require("./identify.marko"),
7
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
8
8
  module_objectPath_module = require("@mindful-web/object-path"),
@@ -50,7 +50,7 @@ marko_template._ = marko_renderer(render, {
50
50
  }, marko_component);
51
51
 
52
52
  marko_template.meta = {
53
- id: "/@mindful-web/marko-web-identity-x$1.90.2/components/identify.marko",
53
+ id: "/@mindful-web/marko-web-identity-x$1.96.3/components/identify.marko",
54
54
  component: "./identify.marko",
55
55
  tags: [
56
56
  "@mindful-web/marko-web-gtm/components/push.marko",
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-identity-x$1.90.2/components/non-auth-identify.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.96.3/components/non-auth-identify.marko",
6
6
  marko_component = require("./non-auth-identify.marko"),
7
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
8
8
  marko_dynamicTag = require("marko/dist/runtime/helpers/dynamic-tag"),
@@ -45,7 +45,7 @@ marko_template._ = marko_renderer(render, {
45
45
  }, marko_component);
46
46
 
47
47
  marko_template.meta = {
48
- id: "/@mindful-web/marko-web-identity-x$1.90.2/components/non-auth-identify.marko",
48
+ id: "/@mindful-web/marko-web-identity-x$1.96.3/components/non-auth-identify.marko",
49
49
  component: "./non-auth-identify.marko",
50
50
  tags: [
51
51
  "@mindful-web/marko-core/components/resolve.marko"
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-identity-x$1.90.2/components/progressive-profile-form.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.96.3/components/progressive-profile-form.marko",
6
6
  marko_component = require("./progressive-profile-form.marko"),
7
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
8
8
  module_defaultValue = require("@mindful-web/marko-core/utils/default-value"),
@@ -137,7 +137,7 @@ marko_template._ = marko_renderer(render, {
137
137
  }, marko_component);
138
138
 
139
139
  marko_template.meta = {
140
- id: "/@mindful-web/marko-web-identity-x$1.90.2/components/progressive-profile-form.marko",
140
+ id: "/@mindful-web/marko-web-identity-x$1.96.3/components/progressive-profile-form.marko",
141
141
  component: "./progressive-profile-form.marko",
142
142
  tags: [
143
143
  "@mindful-web/marko-web/components/browser-component.marko",
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
 
4
4
  var marko_template = module.exports = require("marko/dist/html").t(__filename),
5
- marko_componentType = "/@mindful-web/marko-web-identity-x$1.90.2/components/subscribe.marko",
5
+ marko_componentType = "/@mindful-web/marko-web-identity-x$1.96.3/components/subscribe.marko",
6
6
  marko_component = require("./subscribe.marko"),
7
7
  marko_renderer = require("marko/dist/runtime/components/renderer"),
8
8
  module_objectPath_module = require("@mindful-web/object-path"),
@@ -73,7 +73,7 @@ marko_template._ = marko_renderer(render, {
73
73
  }, marko_component);
74
74
 
75
75
  marko_template.meta = {
76
- id: "/@mindful-web/marko-web-identity-x$1.90.2/components/subscribe.marko",
76
+ id: "/@mindful-web/marko-web-identity-x$1.96.3/components/subscribe.marko",
77
77
  component: "./subscribe.marko",
78
78
  tags: [
79
79
  "@mindful-web/marko-web/components/browser-component.marko",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindful-web/marko-web-identity-x",
3
- "version": "1.90.2",
3
+ "version": "1.96.3",
4
4
  "description": "Marko Wrapper for IdentityX",
5
5
  "repository": "https://github.com/parameter1/mindful-web/tree/main/packages/marko-web-identity-x",
6
6
  "author": "Josh Worden <josh@parameter1.com>",
@@ -13,10 +13,10 @@
13
13
  "test": "yarn compile --no-clean && yarn lint && mocha --reporter spec"
14
14
  },
15
15
  "dependencies": {
16
- "@mindful-web/marko-web-gtm": "^1.83.1",
16
+ "@mindful-web/marko-web-gtm": "^1.92.0",
17
17
  "@mindful-web/marko-web-recaptcha": "^1.83.1",
18
- "@mindful-web/object-path": "^1.83.1",
19
- "@mindful-web/utils": "^1.83.1",
18
+ "@mindful-web/object-path": "^1.92.0",
19
+ "@mindful-web/utils": "^1.92.0",
20
20
  "apollo-cache-inmemory": "^1.6.6",
21
21
  "apollo-client": "^2.6.10",
22
22
  "apollo-link-context": "^1.0.20",
@@ -43,5 +43,5 @@
43
43
  "chai": "^4.3.7",
44
44
  "mocha": "^6.2.3"
45
45
  },
46
- "gitHead": "0e498d1c31b3c6a8856b9d75cd9233a121fa173b"
46
+ "gitHead": "3b66b74c73d0d784f2baf47a506f705012071923"
47
47
  }
@@ -0,0 +1,29 @@
1
+ const { describe, it } = require('mocha');
2
+ const { expect } = require('chai');
3
+ const { buildContentSource } = require('../../utils/build-progressive-profile-payload');
4
+
5
+ const config = ({ appId, appContextId } = {}) => ({
6
+ getAppId: () => appId,
7
+ get: (path) => (path === 'appContextId' ? appContextId : undefined),
8
+ });
9
+
10
+ describe('utils/build-progressive-profile-payload buildContentSource', () => {
11
+ it('uses the app id as the website channel on a single-app tenant', () => {
12
+ const source = buildContentSource({ config: config({ appId: 'app-1' }), contentId: '15836353' });
13
+ expect(source.websiteChannelId).to.equal('app-1');
14
+ });
15
+
16
+ it('uses the app context id when the site has one', () => {
17
+ // A tenant whose sites share one app (watt): the shared app id is no site's channel.
18
+ const source = buildContentSource({
19
+ config: config({ appId: 'shared-app', appContextId: 'site-context' }),
20
+ contentId: '15836353',
21
+ });
22
+ expect(source.websiteChannelId).to.equal('site-context');
23
+ });
24
+
25
+ it('parses the content id as an integer', () => {
26
+ const source = buildContentSource({ config: config({ appId: 'app-1' }), contentId: '15836353' });
27
+ expect(source.integerId).to.equal(15836353);
28
+ });
29
+ });
@@ -99,8 +99,10 @@ module.exports = ({ body, definitions = [] } = {}) => {
99
99
  * digits (true of all 442 content routes across the 18 website repos). A mismatch therefore
100
100
  * surfaces as a `UserInputError` rather than silently recording a wrong `postId`.
101
101
  *
102
- * `websiteChannelId` is the idx app id: the two are the same value, confirmed against the tenancy
103
- * `websites` map and the audience `attributes.websiteChannelIds` data.
102
+ * `websiteChannelId` is the site's audience website channel. On a single-app tenant that is the idx
103
+ * app id. A tenant whose sites share one app (watt, cox, industrial-media) gives each site its own
104
+ * app context instead, and the context id is the channel: sending the shared app id there stamps
105
+ * every site's submissions with a channel no site maps to, so Insights counts zero.
104
106
  *
105
107
  * @param {object} params
106
108
  * @param {import('../config')} params.config
@@ -112,6 +114,6 @@ module.exports.buildContentSource = ({ config, contentId, actionSource } = {}) =
112
114
  // `website.tenant`.
113
115
  legacyTenantKey: process.env.TENANT_KEY,
114
116
  integerId: Number.parseInt(contentId, 10),
115
- websiteChannelId: config.getAppId(),
117
+ websiteChannelId: config.get('appContextId') || config.getAppId(),
116
118
  ...(actionSource && { actionSource }),
117
119
  });