@crimson-education/replit-sdk 1.0.2-beta-1 → 1.0.2-beta-2

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/Readme.md CHANGED
@@ -39,7 +39,7 @@ Project Structure
39
39
  Prompts from replit:
40
40
 
41
41
  ````
42
- we are going to embed the app on a iframe, so now you need to do all things one by one listed here:
42
+ we are going to embed the app on a iframe, so now you need to do all things one by one listed here:
43
43
  1. install and save package @crimson-education/replit-sdk@1.0.2-beta
44
44
  2. call `useUrlParams` on the Root app component, like ```function App() {
45
45
  useUrlParams();
@@ -60,5 +60,9 @@ setStoredParams({'cappEndpoint': 'http://6d94f1eb.r8.cpolar.top/graphql'});```
60
60
  6. remove fetch button and staff userId input in every student picker dialog, and set getStoredUserId() as default staffId to load students once the dialog opened.
61
61
  7. replace the fetchLoginUser and fetchMyStudent function, use the exported functions from the sdk and clean up the redundant server-side endpoints.
62
62
  8. the fetchStudents api could return duplicated students, remove them to keep unique
63
- 9.
63
+ 9. init datadog, like: ```import { init as datadogInit } from "@crimson-education/replit-sdk/lib/utils/datadog";
64
+ datadogInit({ app: '{{here is the replit app name}}' });```
65
+ 10. use trackEvent function to track all events that you may intrest, ```import { ExternalLink, trackEvent } from "@crimson-education/replit-sdk";
66
+ trackEvent('OPEN_COPILOT'); ```
67
+
64
68
  ````
@@ -1 +1 @@
1
- {"version":3,"file":"datadog.d.ts","sourceRoot":"","sources":["../../src/utils/datadog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,QAAQ,EAAqB,MAAM,SAAS,CAAC;AAEjE,eAAO,MAAM,IAAI,GAAI,SAAS,QAAQ,SAErC,CAAC;AAGF,eAAO,MAAM,QAAQ,MAAO,CAAC;AAE7B,eAAO,MAAM,UAAU,GAAI,UAAU,GAAG,SAEvC,CAAC"}
1
+ {"version":3,"file":"datadog.d.ts","sourceRoot":"","sources":["../../src/utils/datadog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,QAAQ,EAAkC,MAAM,SAAS,CAAC;AAE9E,eAAO,MAAM,IAAI,GAAI,SAAS,QAAQ,SAErC,CAAC;AAGF,eAAO,MAAM,QAAQ,MAAO,CAAC;AAE7B,eAAO,MAAM,UAAU,GAAI,UAAU,GAAG,SAEvC,CAAC"}
@@ -9,7 +9,7 @@ exports.init = init;
9
9
  // TODO: return datadog instance
10
10
  exports.instance = null;
11
11
  const trackEvent = (metadata) => {
12
- postMessage(event_1.EVENT_KEY.TRACK_EVENT, metadata);
12
+ (0, event_1.postMessage)(event_1.EVENT_KEY.TRACK_EVENT, metadata);
13
13
  };
14
14
  exports.trackEvent = trackEvent;
15
15
  //# sourceMappingURL=datadog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"datadog.js","sourceRoot":"","sources":["../../src/utils/datadog.ts"],"names":[],"mappings":";;;AAAA,mCAAiE;AAE1D,MAAM,IAAI,GAAG,CAAC,OAAiB,EAAE,EAAE;IACxC,IAAA,YAAS,EAAC,OAAO,CAAC,CAAC;AACrB,CAAC,CAAC;AAFW,QAAA,IAAI,QAEf;AAEF,gCAAgC;AACnB,QAAA,QAAQ,GAAG,IAAI,CAAC;AAEtB,MAAM,UAAU,GAAG,CAAC,QAAa,EAAE,EAAE;IAC1C,WAAW,CAAC,iBAAS,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;AAC/C,CAAC,CAAC;AAFW,QAAA,UAAU,cAErB"}
1
+ {"version":3,"file":"datadog.js","sourceRoot":"","sources":["../../src/utils/datadog.ts"],"names":[],"mappings":";;;AAAA,mCAA8E;AAEvE,MAAM,IAAI,GAAG,CAAC,OAAiB,EAAE,EAAE;IACxC,IAAA,YAAS,EAAC,OAAO,CAAC,CAAC;AACrB,CAAC,CAAC;AAFW,QAAA,IAAI,QAEf;AAEF,gCAAgC;AACnB,QAAA,QAAQ,GAAG,IAAI,CAAC;AAEtB,MAAM,UAAU,GAAG,CAAC,QAAa,EAAE,EAAE;IAC1C,IAAA,mBAAW,EAAC,iBAAS,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;AAC/C,CAAC,CAAC;AAFW,QAAA,UAAU,cAErB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crimson-education/replit-sdk",
3
- "version": "1.0.2-beta-1",
3
+ "version": "1.0.2-beta-2",
4
4
  "description": "SDK for Replit app integration",
5
5
  "publishConfig": {
6
6
  "access": "public"