@forge/util 1.3.0 → 1.3.1-next.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.
- package/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/packages/analytics-node-client/CHANGELOG.md +30 -0
- package/packages/analytics-node-client/README.md +42 -0
- package/packages/analytics-node-client/package.json +3 -2
- package/packages/analytics-node-client/src/index.js +1 -1
- package/packages/logger-interface/CHANGELOG.md +7 -0
- package/packages/logger-interface/package.json +1 -1
- package/packages/metrics-interface/CHANGELOG.md +11 -0
- package/packages/metrics-interface/dist/metrics.d.ts +1 -0
- package/packages/metrics-interface/dist/metrics.d.ts.map +1 -1
- package/packages/metrics-interface/dist/metrics.js +4 -3
- package/packages/metrics-interface/dist/metrics.js.map +1 -1
- package/packages/metrics-interface/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# Change log
|
|
2
2
|
|
|
3
|
+
## 3.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- fa5c710: Added customerAccount as a valid userIdType
|
|
8
|
+
|
|
9
|
+
## 3.2.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 9d7ba15: add changesets as devDependencies
|
|
14
|
+
|
|
15
|
+
## 3.2.0
|
|
16
|
+
|
|
17
|
+
Added workspaceId and orgId as additional fields to ui, track, operational and screen events
|
|
18
|
+
|
|
19
|
+
## 3.1.0
|
|
20
|
+
|
|
21
|
+
Updated analytics-node from v6.0.0 to v6.2.0. This incorporates a
|
|
22
|
+
[fix](https://github.com/segmentio/analytics-node/pull/347) for a
|
|
23
|
+
bug that could result in the callback for a message not being called during
|
|
24
|
+
flush if the `errorHandler` property is used. The `errorHandler` property
|
|
25
|
+
_should_ now be safe and usable.
|
|
26
|
+
|
|
27
|
+
## 3.0.0
|
|
28
|
+
|
|
29
|
+
Updated analytics-node from [5.1.0 to 6.0.0](https://github.com/segmentio/analytics-node/releases/tag/v6.0.0).
|
|
30
|
+
Add support for `errorHandler` argument to allow library users
|
|
31
|
+
to prevent uncaught exception errors.
|
|
32
|
+
|
|
3
33
|
## 2.2.1
|
|
4
34
|
|
|
5
35
|
Removed SourceClear build step
|
|
@@ -32,6 +32,7 @@ We support the following `userIdType`s:
|
|
|
32
32
|
* `HASHED_EMAIL`
|
|
33
33
|
* `OPSGENIE`
|
|
34
34
|
* `HALP`
|
|
35
|
+
* `CUSTOMER_ACCOUNT` - This type is the JSM customer account
|
|
35
36
|
|
|
36
37
|
#### Tenant information
|
|
37
38
|
|
|
@@ -43,6 +44,14 @@ We support the following `tenantIdType`s:
|
|
|
43
44
|
* `HALP_TEAM_ID` - Halp
|
|
44
45
|
* `NONE` - Products without a tenant concept
|
|
45
46
|
|
|
47
|
+
#### Org information
|
|
48
|
+
|
|
49
|
+
You can provide org information by specifying an `orgId`.
|
|
50
|
+
|
|
51
|
+
#### Workspace information
|
|
52
|
+
|
|
53
|
+
If you specify a `workspaceId`, you can use it to provide information about the workspace
|
|
54
|
+
|
|
46
55
|
#### Containers
|
|
47
56
|
|
|
48
57
|
The `containers` field is meant to be the new representation of the container hierarchy where the event takes place. Think something like issue -> board -> project.
|
|
@@ -130,6 +139,8 @@ client.sendTrackEvent({
|
|
|
130
139
|
userIdType: 'atlassianAccount',
|
|
131
140
|
tenantIdType: 'cloudId',
|
|
132
141
|
tenantId: 'some-tenant-id',
|
|
142
|
+
orgId: 'some-org-id',
|
|
143
|
+
workspaceId: 'some-workspace-id',
|
|
133
144
|
trackEvent: {
|
|
134
145
|
source: 'api', // required
|
|
135
146
|
action: 'testAction', // required
|
|
@@ -161,6 +172,8 @@ client.sendTrackEvent({
|
|
|
161
172
|
userIdType: 'atlassianAccount',
|
|
162
173
|
tenantIdType: 'cloudId',
|
|
163
174
|
tenantId: 'some-tenant-id',
|
|
175
|
+
orgId: 'some-org-id',
|
|
176
|
+
workspaceId: 'some-workspace-id',
|
|
164
177
|
trackEvent: {
|
|
165
178
|
source: 'api', // required
|
|
166
179
|
action: 'testAction', // required
|
|
@@ -196,6 +209,8 @@ client.sendUIEvent({
|
|
|
196
209
|
userIdType: 'atlassianAccount',
|
|
197
210
|
tenantIdType: 'cloudId',
|
|
198
211
|
tenantType: 'my-tenant-type',
|
|
212
|
+
orgId: 'some-org-id',
|
|
213
|
+
workspaceId: 'some-workspace-id',
|
|
199
214
|
uiEvent: {
|
|
200
215
|
source: 'api',
|
|
201
216
|
action: 'testAction', // required
|
|
@@ -227,6 +242,8 @@ client.sendScreenEvent({
|
|
|
227
242
|
userIdType: 'atlassianAccount',
|
|
228
243
|
tenantIdType: 'cloudId',
|
|
229
244
|
tenantType: 'my-tenant-type',
|
|
245
|
+
orgId: 'some-org-id',
|
|
246
|
+
workspaceId: 'some-workspace-id',
|
|
230
247
|
name: 'some-screen-name', // required
|
|
231
248
|
screenEvent: {
|
|
232
249
|
origin: 'some-origin', // required
|
|
@@ -257,6 +274,8 @@ client.sendOperationalEvent({
|
|
|
257
274
|
userIdType: 'atlassianAccount',
|
|
258
275
|
tenantIdType: 'cloudId',
|
|
259
276
|
tenantId: 'some-tenant-id',
|
|
277
|
+
orgId: 'some-org-id',
|
|
278
|
+
workspaceId: 'some-workspace-id',
|
|
260
279
|
operationalEvent: {
|
|
261
280
|
source: 'api', // required
|
|
262
281
|
action: 'testAction', // required
|
|
@@ -291,6 +310,21 @@ client.sendTraitEvent({
|
|
|
291
310
|
});
|
|
292
311
|
```
|
|
293
312
|
|
|
313
|
+
## Error Handling
|
|
314
|
+
|
|
315
|
+
If an error is encountered while flushing messages, some versions of this
|
|
316
|
+
library will throw an uncaught exception which can only be handled in
|
|
317
|
+
`process.on('unhandledRejection', ...)`, and will, otherwise, crash your
|
|
318
|
+
process.
|
|
319
|
+
|
|
320
|
+
As of v3.1.0 of this library, you can pass an `errorHandler` function to
|
|
321
|
+
the constructor and that function will be called instead of crashing your
|
|
322
|
+
process. You can use this function to log the error.
|
|
323
|
+
|
|
324
|
+
Likely, you don't want your process to crash when you get a 429 from GAS
|
|
325
|
+
(essentially creating a hard coupling from your service to GAS), so we
|
|
326
|
+
recommend passing this property.
|
|
327
|
+
|
|
294
328
|
## Developing Locally
|
|
295
329
|
|
|
296
330
|
Setup: `npm install`
|
|
@@ -300,3 +334,11 @@ Cleaning up Typescript Types: `npm run cleanTypes`
|
|
|
300
334
|
### Tests:
|
|
301
335
|
|
|
302
336
|
`npm test`
|
|
337
|
+
|
|
338
|
+
### Writing changesets:
|
|
339
|
+
|
|
340
|
+
Changesets are an important part of the development process. Version bumping is automatic and controlled via changeset files.
|
|
341
|
+
|
|
342
|
+
Please adhere to the [this](https://developer.atlassian.com/cloud/framework/atlassian-frontend/development/versioning/#versioning-guidelines) guideline when selecting the bump type for your package.
|
|
343
|
+
|
|
344
|
+
Run the command line script `npx changeset`, write changesets that users understand and can take action on and commit changes.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "analytics-node-client",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "Analytics Serverside client for Node JS",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"author": "Atlassian",
|
|
22
22
|
"license": "Private",
|
|
23
23
|
"devDependencies": {
|
|
24
|
+
"@changesets/cli": "^2.26.1",
|
|
24
25
|
"eslint": "^4.18.1",
|
|
25
26
|
"eslint-config-jbunton": "0.0.3",
|
|
26
27
|
"jasmine": "^3.0.0",
|
|
@@ -34,7 +35,7 @@
|
|
|
34
35
|
"watch": "https://github.com/jbunton-atlassian/watch#5de0fc9c13df5ebc3320c1cbe275916cc954142d"
|
|
35
36
|
},
|
|
36
37
|
"dependencies": {
|
|
37
|
-
"analytics-node": "^
|
|
38
|
+
"analytics-node": "^6.2.0",
|
|
38
39
|
"lodash": "^4.17.21"
|
|
39
40
|
},
|
|
40
41
|
"files": [
|