@forge/util 1.3.0 → 1.3.1-next.1

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.
Files changed (53) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/package.json +2 -2
  3. package/packages/analytics-node-client/CHANGELOG.md +30 -0
  4. package/packages/analytics-node-client/README.md +42 -0
  5. package/packages/analytics-node-client/package.json +3 -2
  6. package/packages/analytics-node-client/src/index.js +1 -1
  7. package/packages/cs-ari/CHANGELOG.md +63 -1
  8. package/packages/cs-ari/dist/app-ari-impls.d.ts +31 -0
  9. package/packages/cs-ari/dist/app-ari-impls.d.ts.map +1 -0
  10. package/packages/cs-ari/dist/app-ari-impls.js +234 -0
  11. package/packages/cs-ari/dist/app-ari-impls.js.map +1 -0
  12. package/packages/cs-ari/dist/app-aris.d.ts +7 -0
  13. package/packages/cs-ari/dist/app-aris.d.ts.map +1 -0
  14. package/packages/cs-ari/dist/app-aris.js +16 -0
  15. package/packages/cs-ari/dist/app-aris.js.map +1 -0
  16. package/packages/cs-ari/dist/app-family-ari.d.ts +10 -0
  17. package/packages/cs-ari/dist/app-family-ari.d.ts.map +1 -0
  18. package/packages/cs-ari/dist/app-family-ari.js +30 -0
  19. package/packages/cs-ari/dist/app-family-ari.js.map +1 -0
  20. package/packages/cs-ari/dist/{AppAris.d.ts → ari.d.ts} +29 -18
  21. package/packages/cs-ari/dist/ari.d.ts.map +1 -0
  22. package/packages/cs-ari/dist/ari.js +25 -0
  23. package/packages/cs-ari/dist/ari.js.map +1 -0
  24. package/packages/cs-ari/dist/{Constraints.d.ts → constraints.d.ts} +3 -2
  25. package/packages/cs-ari/dist/constraints.d.ts.map +1 -0
  26. package/packages/cs-ari/dist/{Constraints.js → constraints.js} +11 -6
  27. package/packages/cs-ari/dist/constraints.js.map +1 -0
  28. package/packages/cs-ari/dist/index.d.ts +21 -0
  29. package/packages/cs-ari/dist/index.d.ts.map +1 -0
  30. package/packages/cs-ari/dist/index.js +40 -0
  31. package/packages/cs-ari/dist/index.js.map +1 -0
  32. package/packages/cs-ari/dist/{Index.d.ts → resource-identifier.d.ts} +11 -43
  33. package/packages/cs-ari/dist/resource-identifier.d.ts.map +1 -0
  34. package/packages/cs-ari/dist/{Index.js → resource-identifier.js} +47 -67
  35. package/packages/cs-ari/dist/resource-identifier.js.map +1 -0
  36. package/packages/cs-ari/package.json +20 -31
  37. package/packages/logger-interface/CHANGELOG.md +7 -0
  38. package/packages/logger-interface/package.json +1 -1
  39. package/packages/metrics-interface/CHANGELOG.md +11 -0
  40. package/packages/metrics-interface/dist/metrics.d.ts +1 -0
  41. package/packages/metrics-interface/dist/metrics.d.ts.map +1 -1
  42. package/packages/metrics-interface/dist/metrics.js +4 -3
  43. package/packages/metrics-interface/dist/metrics.js.map +1 -1
  44. package/packages/metrics-interface/package.json +1 -1
  45. package/packages/cs-ari/dist/AppAriImpls.d.ts +0 -27
  46. package/packages/cs-ari/dist/AppAriImpls.js +0 -172
  47. package/packages/cs-ari/dist/AppAriImpls.js.map +0 -1
  48. package/packages/cs-ari/dist/AppAris.js +0 -45
  49. package/packages/cs-ari/dist/AppAris.js.map +0 -1
  50. package/packages/cs-ari/dist/Constraints.js.map +0 -1
  51. package/packages/cs-ari/dist/Index.js.map +0 -1
  52. package/packages/cs-ari/xunit.xml +0 -109
  53. package/packages/cs-ari/yarn.lock +0 -643
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @forge/util
2
2
 
3
+ ## 1.3.1-next.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 801ea11: Renovate
8
+
9
+ ## 1.3.1-next.0
10
+
11
+ ### Patch Changes
12
+
13
+ - 94b724a: Renovate
14
+
3
15
  ## 1.3.0
4
16
 
5
17
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/util",
3
- "version": "1.3.0",
3
+ "version": "1.3.1-next.1",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "build": "./scripts/build.sh",
@@ -9,7 +9,7 @@
9
9
  "author": "Daniel Winter-Wijntjes",
10
10
  "license": "UNLICENSED",
11
11
  "exports": {
12
- "./packages/cs-ari": "./packages/cs-ari/dist/Index.js",
12
+ "./packages/cs-ari": "./packages/cs-ari/dist/index.js",
13
13
  "./packages/metrics-interface": "./packages/metrics-interface/dist/index.js",
14
14
  "./packages/logger-interface": "./packages/logger-interface/dist/index.js",
15
15
  "./packages/analytics-node-client": "./packages/analytics-node-client/src/index.js"
@@ -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": "2.2.2",
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": "^5.1.0",
38
+ "analytics-node": "^6.2.0",
38
39
  "lodash": "^4.17.21"
39
40
  },
40
41
  "files": [