@drawbridge/drawbridge-utils 0.0.161 → 0.0.162
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/notification.cjs +4 -8
- package/dist/notification.d.cts +23 -16
- package/dist/notification.d.ts +23 -16
- package/dist/notification.js +4 -8
- package/package.json +1 -1
package/dist/notification.cjs
CHANGED
|
@@ -77,16 +77,12 @@ var messageWarnings = ({ message }) => {
|
|
|
77
77
|
};
|
|
78
78
|
var notificationWarnings = ({
|
|
79
79
|
brand,
|
|
80
|
-
channel = "email",
|
|
81
80
|
message,
|
|
82
81
|
subject
|
|
83
|
-
} = {}) => {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
subject: subjectWarnings({ brand, subject })
|
|
88
|
-
};
|
|
89
|
-
};
|
|
82
|
+
} = {}) => ({
|
|
83
|
+
message: messageWarnings({ message }),
|
|
84
|
+
subject: subjectWarnings({ brand, subject })
|
|
85
|
+
});
|
|
90
86
|
// Annotate the CommonJS export names for ESM import in node:
|
|
91
87
|
0 && (module.exports = {
|
|
92
88
|
notificationWarnings
|
package/dist/notification.d.cts
CHANGED
|
@@ -131,25 +131,32 @@ const messageWarnings = ({ message }) => {
|
|
|
131
131
|
// ONE ENTRY POINT, answering per field so each warning renders against the
|
|
132
132
|
// input it is about rather than as a pile at the bottom of the form.
|
|
133
133
|
//
|
|
134
|
-
//
|
|
135
|
-
//
|
|
136
|
-
//
|
|
137
|
-
//
|
|
138
|
-
//
|
|
134
|
+
// NO CHANNEL ARGUMENT, deliberately, and it is worth saying why since one was
|
|
135
|
+
// tried twice.
|
|
136
|
+
//
|
|
137
|
+
// First it gated SMS to silence, on the grounds that carriers filter on things
|
|
138
|
+
// these rules do not look at. That much is true, and it does not follow:
|
|
139
|
+
// shouting, repeated punctuation, currency amounts and scam-shaped phrasing
|
|
140
|
+
// matter at least as much on a phone, and an unbranded text is the exact shape
|
|
141
|
+
// of a smishing attempt. Then a hedge value was added for copy that could go
|
|
142
|
+
// either way, a caller passed it to a build that did not have it, and a whole
|
|
143
|
+
// form went quiet with nothing to show for the caution.
|
|
144
|
+
//
|
|
145
|
+
// Every rule here is one a person would want to hear wherever the words end up.
|
|
146
|
+
// Sorting them by channel bought accuracy on a single warning — the subject
|
|
147
|
+
// display limit, which is really an email idea — and cost the other six.
|
|
148
|
+
//
|
|
149
|
+
// SMS still has no rules of its OWN: SHAFT categories, link shorteners, opt-out
|
|
150
|
+
// wording, and the segment mechanics where one emoji drops the limit from 160
|
|
151
|
+
// characters to 70. Those belong with the SMS connection work rather than here,
|
|
152
|
+
// and their absence is a reason to write them, not to stay quiet meanwhile.
|
|
139
153
|
const notificationWarnings = ({
|
|
140
154
|
brand,
|
|
141
|
-
channel = 'email',
|
|
142
155
|
message,
|
|
143
156
|
subject
|
|
144
|
-
} = {}) => {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
return {
|
|
149
|
-
message : messageWarnings({ message }),
|
|
150
|
-
subject : subjectWarnings({ brand, subject })
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
};
|
|
157
|
+
} = {}) => ({
|
|
158
|
+
message : messageWarnings({ message }),
|
|
159
|
+
subject : subjectWarnings({ brand, subject })
|
|
160
|
+
});
|
|
154
161
|
|
|
155
162
|
export { notificationWarnings };
|
package/dist/notification.d.ts
CHANGED
|
@@ -131,25 +131,32 @@ const messageWarnings = ({ message }) => {
|
|
|
131
131
|
// ONE ENTRY POINT, answering per field so each warning renders against the
|
|
132
132
|
// input it is about rather than as a pile at the bottom of the form.
|
|
133
133
|
//
|
|
134
|
-
//
|
|
135
|
-
//
|
|
136
|
-
//
|
|
137
|
-
//
|
|
138
|
-
//
|
|
134
|
+
// NO CHANNEL ARGUMENT, deliberately, and it is worth saying why since one was
|
|
135
|
+
// tried twice.
|
|
136
|
+
//
|
|
137
|
+
// First it gated SMS to silence, on the grounds that carriers filter on things
|
|
138
|
+
// these rules do not look at. That much is true, and it does not follow:
|
|
139
|
+
// shouting, repeated punctuation, currency amounts and scam-shaped phrasing
|
|
140
|
+
// matter at least as much on a phone, and an unbranded text is the exact shape
|
|
141
|
+
// of a smishing attempt. Then a hedge value was added for copy that could go
|
|
142
|
+
// either way, a caller passed it to a build that did not have it, and a whole
|
|
143
|
+
// form went quiet with nothing to show for the caution.
|
|
144
|
+
//
|
|
145
|
+
// Every rule here is one a person would want to hear wherever the words end up.
|
|
146
|
+
// Sorting them by channel bought accuracy on a single warning — the subject
|
|
147
|
+
// display limit, which is really an email idea — and cost the other six.
|
|
148
|
+
//
|
|
149
|
+
// SMS still has no rules of its OWN: SHAFT categories, link shorteners, opt-out
|
|
150
|
+
// wording, and the segment mechanics where one emoji drops the limit from 160
|
|
151
|
+
// characters to 70. Those belong with the SMS connection work rather than here,
|
|
152
|
+
// and their absence is a reason to write them, not to stay quiet meanwhile.
|
|
139
153
|
const notificationWarnings = ({
|
|
140
154
|
brand,
|
|
141
|
-
channel = 'email',
|
|
142
155
|
message,
|
|
143
156
|
subject
|
|
144
|
-
} = {}) => {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
return {
|
|
149
|
-
message : messageWarnings({ message }),
|
|
150
|
-
subject : subjectWarnings({ brand, subject })
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
};
|
|
157
|
+
} = {}) => ({
|
|
158
|
+
message : messageWarnings({ message }),
|
|
159
|
+
subject : subjectWarnings({ brand, subject })
|
|
160
|
+
});
|
|
154
161
|
|
|
155
162
|
export { notificationWarnings };
|
package/dist/notification.js
CHANGED
|
@@ -54,16 +54,12 @@ var messageWarnings = ({ message }) => {
|
|
|
54
54
|
};
|
|
55
55
|
var notificationWarnings = ({
|
|
56
56
|
brand,
|
|
57
|
-
channel = "email",
|
|
58
57
|
message,
|
|
59
58
|
subject
|
|
60
|
-
} = {}) => {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
subject: subjectWarnings({ brand, subject })
|
|
65
|
-
};
|
|
66
|
-
};
|
|
59
|
+
} = {}) => ({
|
|
60
|
+
message: messageWarnings({ message }),
|
|
61
|
+
subject: subjectWarnings({ brand, subject })
|
|
62
|
+
});
|
|
67
63
|
export {
|
|
68
64
|
notificationWarnings
|
|
69
65
|
};
|
package/package.json
CHANGED