@gbl-uzh/platform 0.4.13 → 0.4.16

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 (99) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/index.d.ts +7 -1473
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +11 -2012
  5. package/dist/index.js.map +1 -0
  6. package/dist/lib/SSELink.d.ts +9 -0
  7. package/dist/lib/SSELink.d.ts.map +1 -0
  8. package/dist/lib/SSELink.js +24 -0
  9. package/dist/lib/SSELink.js.map +1 -0
  10. package/dist/lib/apollo.d.ts +3 -4
  11. package/dist/lib/apollo.d.ts.map +1 -0
  12. package/dist/lib/apollo.js +50 -108
  13. package/dist/lib/apollo.js.map +1 -0
  14. package/dist/lib/constants.d.ts +8 -0
  15. package/dist/lib/constants.d.ts.map +1 -0
  16. package/dist/lib/logger.d.ts +4 -0
  17. package/dist/lib/logger.d.ts.map +1 -0
  18. package/dist/lib/logger.js +11 -0
  19. package/dist/lib/logger.js.map +1 -0
  20. package/dist/lib/pubsub.d.ts +5 -0
  21. package/dist/lib/pubsub.d.ts.map +1 -0
  22. package/dist/lib/pubsub.js +6 -0
  23. package/dist/lib/pubsub.js.map +1 -0
  24. package/dist/lib/util.d.ts +12 -13
  25. package/dist/lib/util.d.ts.map +1 -0
  26. package/dist/lib/util.js +63 -105
  27. package/dist/lib/util.js.map +1 -0
  28. package/dist/nexus.d.ts +11 -42
  29. package/dist/nexus.d.ts.map +1 -0
  30. package/dist/nexus.js +22 -2605
  31. package/dist/nexus.js.map +1 -0
  32. package/dist/ops/FGameData.graphql +1 -0
  33. package/dist/ops/FPeriodData.graphql +1 -0
  34. package/dist/ops/FPlayerData.graphql +0 -4
  35. package/dist/ops/FSegmentData.graphql +1 -0
  36. package/dist/ops/FStoryElementData.graphql +7 -0
  37. package/dist/ops/MActivateNextSegment.graphql +0 -3
  38. package/dist/ops/MAddGamePeriod.graphql +2 -2
  39. package/dist/ops/MUpdatePlayerData.graphql +1 -3
  40. package/dist/ops/QGame.graphql +2 -3
  41. package/dist/ops/QPastResults.graphql +0 -3
  42. package/dist/ops/QResult.graphql +4 -5
  43. package/dist/ops/QSpecificResults.graphql +11 -0
  44. package/dist/ops/QStoryElements.graphql +7 -0
  45. package/dist/schema.prisma +2 -3
  46. package/dist/services/AccountService.d.ts +65 -0
  47. package/dist/services/AccountService.d.ts.map +1 -0
  48. package/dist/services/AccountService.js +70 -0
  49. package/dist/services/AccountService.js.map +1 -0
  50. package/dist/services/EventService.d.ts +13 -0
  51. package/dist/services/EventService.d.ts.map +1 -0
  52. package/dist/services/EventService.js +180 -0
  53. package/dist/services/EventService.js.map +1 -0
  54. package/dist/services/GameService.d.ts +670 -0
  55. package/dist/services/GameService.d.ts.map +1 -0
  56. package/dist/services/GameService.js +1191 -0
  57. package/dist/services/GameService.js.map +1 -0
  58. package/dist/services/PlayService.d.ts +630 -0
  59. package/dist/services/PlayService.d.ts.map +1 -0
  60. package/dist/services/PlayService.js +534 -0
  61. package/dist/services/PlayService.js.map +1 -0
  62. package/dist/tsconfig.tsbuildinfo +1 -0
  63. package/dist/types/Achievement.d.ts +4 -0
  64. package/dist/types/Achievement.d.ts.map +1 -0
  65. package/dist/types/Achievement.js +35 -0
  66. package/dist/types/Achievement.js.map +1 -0
  67. package/dist/types/Game.d.ts +5 -0
  68. package/dist/types/Game.d.ts.map +1 -0
  69. package/dist/types/Game.js +85 -0
  70. package/dist/types/Game.js.map +1 -0
  71. package/dist/types/LearningElement.d.ts +5 -0
  72. package/dist/types/LearningElement.d.ts.map +1 -0
  73. package/dist/types/LearningElement.js +55 -0
  74. package/dist/types/LearningElement.js.map +1 -0
  75. package/dist/types/Mutation.d.ts +10 -0
  76. package/dist/types/Mutation.d.ts.map +1 -0
  77. package/dist/types/Mutation.js +194 -0
  78. package/dist/types/Mutation.js.map +1 -0
  79. package/dist/types/Player.d.ts +9 -0
  80. package/dist/types/Player.d.ts.map +1 -0
  81. package/dist/types/Player.js +139 -0
  82. package/dist/types/Player.js.map +1 -0
  83. package/dist/types/Query.d.ts +3 -0
  84. package/dist/types/Query.d.ts.map +1 -0
  85. package/dist/types/Query.js +91 -0
  86. package/dist/types/Query.js.map +1 -0
  87. package/dist/types/StoryElement.d.ts +3 -0
  88. package/dist/types/StoryElement.d.ts.map +1 -0
  89. package/dist/types/StoryElement.js +27 -0
  90. package/dist/types/StoryElement.js.map +1 -0
  91. package/dist/types/Subscription.d.ts +3 -0
  92. package/dist/types/Subscription.d.ts.map +1 -0
  93. package/dist/types/Subscription.js +35 -0
  94. package/dist/types/Subscription.js.map +1 -0
  95. package/dist/types.d.ts +139 -0
  96. package/dist/types.d.ts.map +1 -0
  97. package/dist/types.js +26 -0
  98. package/dist/types.js.map +1 -0
  99. package/package.json +42 -38
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
@@ -0,0 +1,9 @@
1
+ import { ApolloLink, FetchResult, Observable, Operation } from '@apollo/client/core';
2
+ import { ClientOptions } from 'graphql-sse';
3
+ declare class SSELink extends ApolloLink {
4
+ private client;
5
+ constructor(options: ClientOptions);
6
+ request(operation: Operation): Observable<FetchResult>;
7
+ }
8
+ export default SSELink;
9
+ //# sourceMappingURL=SSELink.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SSELink.d.ts","sourceRoot":"","sources":["../../src/lib/SSELink.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,UAAU,EACV,WAAW,EACX,UAAU,EACV,SAAS,EACV,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EAAU,aAAa,EAAgB,MAAM,aAAa,CAAA;AAEjE,cAAM,OAAQ,SAAQ,UAAU;IAC9B,OAAO,CAAC,MAAM,CAAQ;gBAEV,OAAO,EAAE,aAAa;IAKlB,OAAO,CAAC,SAAS,EAAE,SAAS,GAAG,UAAU,CAAC,WAAW,CAAC;CAYvE;AAED,eAAe,OAAO,CAAA"}
@@ -0,0 +1,24 @@
1
+ import { ApolloLink, Observable } from '@apollo/client/core';
2
+ import { print } from 'graphql';
3
+ import { createClient } from 'graphql-sse';
4
+
5
+ // ref: https://the-guild.dev/graphql/sse/recipes#with-apollo
6
+ class SSELink extends ApolloLink {
7
+ client;
8
+ constructor(options) {
9
+ super();
10
+ this.client = createClient(options);
11
+ }
12
+ request(operation) {
13
+ return new Observable((sink) => {
14
+ return this.client.subscribe({ ...operation, query: print(operation.query) }, {
15
+ next: sink.next.bind(sink),
16
+ complete: sink.complete.bind(sink),
17
+ error: sink.error.bind(sink),
18
+ });
19
+ });
20
+ }
21
+ }
22
+
23
+ export { SSELink as default };
24
+ //# sourceMappingURL=SSELink.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SSELink.js","sources":["../../src/lib/SSELink.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;AAWA,MAAM,OAAQ,SAAQ,UAAU,CAAA;AACtB,IAAA,MAAM;AAEd,IAAA,WAAA,CAAY,OAAsB,EAAA;AAChC,QAAA,KAAK,EAAE;AACP,QAAA,IAAI,CAAC,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC;;AAGrB,IAAA,OAAO,CAAC,SAAoB,EAAA;AAC1C,QAAA,OAAO,IAAI,UAAU,CAAC,CAAC,IAAI,KAAI;AAC7B,YAAA,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAC1B,EAAE,GAAG,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,EAC/C;gBACE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;gBAC1B,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;gBAClC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;AAC7B,aAAA,CACF;AACH,SAAC,CAAC;;AAEL;;;;"}
@@ -1,4 +1,3 @@
1
- declare function initializeApollo(initialState?: null): any;
2
- declare function useApollo(initialState: any): any;
3
-
4
- export { initializeApollo, useApollo };
1
+ export declare function initializeApollo(initialState?: null): any;
2
+ export declare function useApollo(initialState: any): any;
3
+ //# sourceMappingURL=apollo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apollo.d.ts","sourceRoot":"","sources":["../../src/lib/apollo.ts"],"names":[],"mappings":"AAoDA,wBAAgB,gBAAgB,CAAC,YAAY,OAAO,OAcnD;AAED,wBAAgB,SAAS,CAAC,YAAY,KAAA,OAGrC"}
@@ -1,119 +1,61 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
1
+ import { ApolloClient, InMemoryCache, split } from '@apollo/client';
2
+ import { HttpLink } from '@apollo/client/link/http';
3
+ import { getMainDefinition } from '@apollo/client/utilities';
4
+ import { useMemo } from 'react';
5
+ import SSELink from './SSELink.js';
29
6
 
30
- // src/lib/apollo.ts
31
- var apollo_exports = {};
32
- __export(apollo_exports, {
33
- initializeApollo: () => initializeApollo,
34
- useApollo: () => useApollo
35
- });
36
- module.exports = __toCommonJS(apollo_exports);
37
- var import_client = require("@apollo/client");
38
- var import_http = require("@apollo/client/link/http");
39
- var import_utilities = require("@apollo/client/utilities");
40
- var import_node_assert = __toESM(require("assert"));
41
- var import_react = require("react");
42
-
43
- // src/lib/SSELink.ts
44
- var import_core = require("@apollo/client/core");
45
- var import_graphql = require("graphql");
46
- var import_graphql_sse = require("graphql-sse");
47
- var SSELink = class extends import_core.ApolloLink {
48
- client;
49
- constructor(options) {
50
- super();
51
- this.client = (0, import_graphql_sse.createClient)(options);
52
- }
53
- request(operation) {
54
- return new import_core.Observable((sink) => {
55
- return this.client.subscribe(
56
- { ...operation, query: (0, import_graphql.print)(operation.query) },
57
- {
58
- next: sink.next.bind(sink),
59
- complete: sink.complete.bind(sink),
60
- error: sink.error.bind(sink)
61
- }
62
- );
63
- });
64
- }
65
- };
66
- var SSELink_default = SSELink;
67
-
68
- // src/lib/apollo.ts
69
- var apolloClient;
7
+ let apolloClient;
70
8
  function createIsomorphLink() {
71
- (0, import_node_assert.default)(typeof process.env.NEXT_PUBLIC_API_URL === "string");
72
- const isBrowser = typeof window !== "undefined";
73
- let httpLink = new import_http.HttpLink({
74
- uri: process.env.NEXT_PUBLIC_API_URL,
75
- credentials: "same-origin"
76
- });
77
- if (isBrowser) {
78
- const sseLink = new SSELink_default({
79
- url: process.env.NEXT_PUBLIC_API_URL,
80
- credentials: "same-origin"
9
+ const isBrowser = typeof window !== 'undefined';
10
+ const apiUrl = process.env.NEXT_PUBLIC_API_URL;
11
+ if (typeof apiUrl !== 'string' || !apiUrl) {
12
+ throw new Error('NEXT_PUBLIC_API_URL is not set');
13
+ }
14
+ let httpLink = new HttpLink({
15
+ uri: apiUrl,
16
+ credentials: 'same-origin',
81
17
  });
82
- httpLink = (0, import_client.split)(
83
- ({ query }) => {
84
- const { kind, operation } = (0, import_utilities.getMainDefinition)(query);
85
- return kind === "OperationDefinition" && operation === "subscription";
86
- },
87
- sseLink,
88
- httpLink
89
- );
90
- }
91
- return httpLink;
18
+ // on the client, differentiate between links for query/mutation and subscriptions
19
+ if (isBrowser) {
20
+ const sseLink = new SSELink({
21
+ url: apiUrl,
22
+ credentials: 'same-origin',
23
+ });
24
+ // swap out the http link with a split based on operation type
25
+ // use websocket link for subscriptions, http link for remainder
26
+ httpLink = split(({ query }) => {
27
+ const { kind, operation } = getMainDefinition(query);
28
+ return kind === 'OperationDefinition' && operation === 'subscription';
29
+ }, sseLink, httpLink);
30
+ }
31
+ return httpLink;
92
32
  }
93
33
  function createApolloClient() {
94
- return new import_client.ApolloClient({
95
- ssrMode: typeof window === "undefined",
96
- link: createIsomorphLink(),
97
- cache: new import_client.InMemoryCache()
98
- });
34
+ return new ApolloClient({
35
+ ssrMode: typeof window === 'undefined',
36
+ link: createIsomorphLink(),
37
+ cache: new InMemoryCache(),
38
+ });
99
39
  }
100
40
  function initializeApollo(initialState = null) {
101
- const _apolloClient = apolloClient ?? createApolloClient();
102
- if (initialState) {
103
- _apolloClient.cache.restore(initialState);
104
- }
105
- if (typeof window === "undefined")
41
+ const _apolloClient = apolloClient ?? createApolloClient();
42
+ // If your page has Next.js data fetching methods that use Apollo Client, the initial state
43
+ // gets hydrated here
44
+ if (initialState) {
45
+ _apolloClient.cache.restore(initialState);
46
+ }
47
+ // For SSG and SSR always create a new Apollo Client
48
+ if (typeof window === 'undefined')
49
+ return _apolloClient;
50
+ // Create the Apollo Client once in the client
51
+ if (!apolloClient)
52
+ apolloClient = _apolloClient;
106
53
  return _apolloClient;
107
- if (!apolloClient)
108
- apolloClient = _apolloClient;
109
- return _apolloClient;
110
54
  }
111
55
  function useApollo(initialState) {
112
- const store = (0, import_react.useMemo)(() => initializeApollo(initialState), [initialState]);
113
- return store;
56
+ const store = useMemo(() => initializeApollo(initialState), [initialState]);
57
+ return store;
114
58
  }
115
- // Annotate the CommonJS export names for ESM import in node:
116
- 0 && (module.exports = {
117
- initializeApollo,
118
- useApollo
119
- });
59
+
60
+ export { initializeApollo, useApollo };
61
+ //# sourceMappingURL=apollo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apollo.js","sources":["../../src/lib/apollo.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;AAOA,IAAI,YAAY;AAEhB,SAAS,kBAAkB,GAAA;AACzB,IAAA,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,WAAW;AAE/C,IAAA,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,mBAAmB;IAC9C,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,CAAC,MAAM,EAAE;AACzC,QAAA,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC;;AAGnD,IAAA,IAAI,QAAQ,GAAe,IAAI,QAAQ,CAAC;AACtC,QAAA,GAAG,EAAE,MAAM;AACX,QAAA,WAAW,EAAE,aAAa;AAC3B,KAAA,CAAC;;IAGF,IAAI,SAAS,EAAE;AACb,QAAA,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC;AAC1B,YAAA,GAAG,EAAE,MAAM;AACX,YAAA,WAAW,EAAE,aAAa;AAC3B,SAAA,CAAC;;;QAIF,QAAQ,GAAG,KAAK,CACd,CAAC,EAAE,KAAK,EAAE,KAAI;YACZ,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,iBAAiB,CAAC,KAAK,CAAQ;AAC3D,YAAA,OAAO,IAAI,KAAK,qBAAqB,IAAI,SAAS,KAAK,cAAc;AACvE,SAAC,EACD,OAAO,EACP,QAAQ,CACT;;AAGH,IAAA,OAAO,QAAQ;AACjB;AAEA,SAAS,kBAAkB,GAAA;IACzB,OAAO,IAAI,YAAY,CAAC;AACtB,QAAA,OAAO,EAAE,OAAO,MAAM,KAAK,WAAW;QACtC,IAAI,EAAE,kBAAkB,EAAE;QAC1B,KAAK,EAAE,IAAI,aAAa,EAAE;AAC3B,KAAA,CAAC;AACJ;AAEgB,SAAA,gBAAgB,CAAC,YAAY,GAAG,IAAI,EAAA;AAClD,IAAA,MAAM,aAAa,GAAG,YAAY,IAAI,kBAAkB,EAAE;;;IAI1D,IAAI,YAAY,EAAE;AAChB,QAAA,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC;;;IAG3C,IAAI,OAAO,MAAM,KAAK,WAAW;AAAE,QAAA,OAAO,aAAa;;AAEvD,IAAA,IAAI,CAAC,YAAY;QAAE,YAAY,GAAG,aAAa;AAE/C,IAAA,OAAO,aAAa;AACtB;AAEM,SAAU,SAAS,CAAC,YAAY,EAAA;AACpC,IAAA,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,gBAAgB,CAAC,YAAY,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC;AAC3E,IAAA,OAAO,KAAK;AACd;;;;"}
@@ -0,0 +1,8 @@
1
+ export declare const COLORS: {
2
+ Red: string;
3
+ Green: string;
4
+ Yellow: string;
5
+ Blue: string;
6
+ White: string;
7
+ };
8
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/lib/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;CAMlB,CAAA"}
@@ -0,0 +1,4 @@
1
+ import winston from 'winston';
2
+ declare const logger: winston.Logger;
3
+ export default logger;
4
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/lib/logger.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAA;AAE7B,QAAA,MAAM,MAAM,gBAQV,CAAA;AAEF,eAAe,MAAM,CAAA"}
@@ -0,0 +1,11 @@
1
+ import winston from 'winston';
2
+
3
+ const logger = winston.createLogger({
4
+ level: process.env.NODE_ENV === 'development' ? 'debug' : 'info',
5
+ format: winston.format.combine(winston.format.timestamp(), winston.format.json()),
6
+ defaultMeta: { service: '@gbl-uzh/platform' },
7
+ transports: [new winston.transports.Console()],
8
+ });
9
+
10
+ export { logger as default };
11
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sources":["../../src/lib/logger.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAEA,MAAM,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;AAClC,IAAA,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,GAAG,OAAO,GAAG,MAAM;IAChE,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO,CAC5B,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,EAC1B,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CACtB;AACD,IAAA,WAAW,EAAE,EAAE,OAAO,EAAE,mBAAmB,EAAE;IAC7C,UAAU,EAAE,CAAC,IAAI,OAAO,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;AAC/C,CAAA;;;;"}
@@ -0,0 +1,5 @@
1
+ export declare const pubSub: import("node_modules/graphql-yoga/typings/index.cjs").PubSub<{
2
+ 'global:events': [event: any];
3
+ 'user:events': [userId: string, events: any];
4
+ }>;
5
+ //# sourceMappingURL=pubsub.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pubsub.d.ts","sourceRoot":"","sources":["../../src/lib/pubsub.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM;qBACA,CAAC,KAAK,EAAE,GAAG,CAAC;mBACd,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC;EAC1C,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { createPubSub } from 'graphql-yoga';
2
+
3
+ const pubSub = createPubSub();
4
+
5
+ export { pubSub };
6
+ //# sourceMappingURL=pubsub.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pubsub.js","sources":["../../src/lib/pubsub.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAEa,MAAA,MAAM,GAAG,YAAY;;;;"}
@@ -1,20 +1,19 @@
1
1
  import * as DB from '@prisma/client';
2
-
3
- declare function setDifference(a: any, b: any, filterNoId?: boolean): any;
4
- declare function setIntersection(a: any, b: any): any;
5
- declare function debugLog(...args: any[]): void;
6
- declare function diceRoll(seeds?: number[]): number;
7
- declare function computeScenarioOutcome(trend: any, gap: any, diceRoll: any): any;
8
- declare function computePercentChange(newValue: any, oldValue: any): number;
9
- declare function withPercentChange(value: any, percentChange: any): number;
10
- declare enum STATUS {
2
+ export declare function setDifference(a: any, b: any, filterNoId?: boolean): any;
3
+ export declare function setIntersection(a: any, b: any): any;
4
+ export declare function debugLog(...args: any[]): void;
5
+ export declare function diceRoll(seeds?: number[]): number;
6
+ export declare function computeScenarioOutcome(trend: number, gap: number, diceRoll: number): number;
7
+ export declare function standardDeviation(arr: number[]): number;
8
+ export declare function computePercentChange(newValue: number, oldValue: number): number;
9
+ export declare function withPercentChange(value: number, percentChange: number): number;
10
+ export declare enum STATUS {
11
11
  ACTIVE = "ACTIVE",
12
12
  PAUSED = "PAUSED",
13
13
  SCHEDULED = "SCHEDULED",
14
14
  COMPLETED = "COMPLETED",
15
15
  RESULTS = "RESULTS"
16
16
  }
17
- declare function computePeriodStatus(game: DB.Game, periodIndex: number): string;
18
- declare function computeSegmentStatus(game: DB.Game, period: DB.Period, segmentIndex: number): string;
19
-
20
- export { STATUS, computePercentChange, computePeriodStatus, computeScenarioOutcome, computeSegmentStatus, debugLog, diceRoll, setDifference, setIntersection, withPercentChange };
17
+ export declare function computePeriodStatus(game: DB.Game, periodIndex: number): string;
18
+ export declare function computeSegmentStatus(game: DB.Game, period: DB.Period, segmentIndex: number): string;
19
+ //# sourceMappingURL=util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/lib/util.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAIpC,wBAAgB,aAAa,CAAC,CAAC,KAAA,EAAE,CAAC,KAAA,EAAE,UAAU,UAAQ,OAKrD;AAED,wBAAgB,eAAe,CAAC,CAAC,KAAA,EAAE,CAAC,KAAA,OAInC;AAED,wBAAgB,QAAQ,CAAC,GAAG,IAAI,OAAA,QAI/B;AAED,wBAAgB,QAAQ,CAAC,KAAK,GAAE,MAAM,EAAO,UAG5C;AAED,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,UAGjB;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,UAM9C;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,UAEtE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,UAErE;AAED,oBAAY,MAAM;IAChB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,OAAO,YAAY;CACpB;AAED,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,WAAW,EAAE,MAAM,GAClB,MAAM,CAmBR;AAED,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,MAAM,EAAE,EAAE,CAAC,MAAM,EACjB,YAAY,EAAE,MAAM,GACnB,MAAM,CAgBR"}
package/dist/lib/util.js CHANGED
@@ -1,123 +1,81 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
1
+ import * as DB from '@prisma/client';
2
+ import { MersenneTwister19937, integer } from 'random-js';
3
+ import util from 'util';
29
4
 
30
- // src/lib/util.ts
31
- var util_exports = {};
32
- __export(util_exports, {
33
- STATUS: () => STATUS,
34
- computePercentChange: () => computePercentChange,
35
- computePeriodStatus: () => computePeriodStatus,
36
- computeScenarioOutcome: () => computeScenarioOutcome,
37
- computeSegmentStatus: () => computeSegmentStatus,
38
- debugLog: () => debugLog,
39
- diceRoll: () => diceRoll,
40
- setDifference: () => setDifference,
41
- setIntersection: () => setIntersection,
42
- withPercentChange: () => withPercentChange
43
- });
44
- module.exports = __toCommonJS(util_exports);
45
- var DB = __toESM(require("@prisma/client"));
46
- var import_random_js = require("random-js");
47
- var import_util = __toESM(require("util"));
48
5
  function setDifference(a, b, filterNoId = false) {
49
- if (!b)
50
- return a;
51
- const A = a || [];
52
- const B = new Set(b.map((item) => item.id));
53
- return A.filter((item) => !B.has(item.id) || filterNoId && !item.id);
6
+ if (!b)
7
+ return a;
8
+ const A = a || [];
9
+ const B = new Set(b.map((item) => item.id));
10
+ return A.filter((item) => !B.has(item.id) || (filterNoId && !item.id));
54
11
  }
55
12
  function setIntersection(a, b) {
56
- if (!a || !b)
57
- return [];
58
- const B = new Set(b.map((item) => item.id));
59
- return a.filter((item) => B.has(item.id) && item.id);
13
+ if (!a || !b)
14
+ return [];
15
+ const B = new Set(b.map((item) => item.id));
16
+ return a.filter((item) => B.has(item.id) && item.id);
60
17
  }
61
18
  function debugLog(...args) {
62
- if (process.env.NODE_ENV === "development") {
63
- console.log(import_util.default.inspect(args, { showHidden: false, depth: null }));
64
- }
19
+ if (process.env.NODE_ENV === 'development') {
20
+ console.log(util.inspect(args, { showHidden: false, depth: null }));
21
+ }
65
22
  }
66
23
  function diceRoll(seeds = []) {
67
- const rng = import_random_js.MersenneTwister19937.seedWithArray(seeds);
68
- return (0, import_random_js.integer)(1, 6)(rng);
24
+ const rng = MersenneTwister19937.seedWithArray(seeds);
25
+ return integer(1, 6)(rng);
69
26
  }
70
- function computeScenarioOutcome(trend, gap, diceRoll2) {
71
- return trend + (diceRoll2 - 7) * gap;
27
+ function computeScenarioOutcome(trend, gap, diceRoll) {
28
+ return trend + (diceRoll - 7) * gap;
29
+ }
30
+ function standardDeviation(arr) {
31
+ const num = arr.length;
32
+ const mean = arr.reduce((acc, value) => acc + value, 0) / num;
33
+ const variance = arr.reduce((acc, value) => acc + Math.pow(value - mean, 2), 0) / (num - 1);
34
+ return Math.sqrt(variance);
72
35
  }
73
36
  function computePercentChange(newValue, oldValue) {
74
- return (newValue - oldValue) / oldValue;
37
+ return (newValue - oldValue) / oldValue;
75
38
  }
76
39
  function withPercentChange(value, percentChange) {
77
- return value * (1 + percentChange);
40
+ return value * (1 + percentChange);
78
41
  }
79
- var STATUS = /* @__PURE__ */ ((STATUS2) => {
80
- STATUS2["ACTIVE"] = "ACTIVE";
81
- STATUS2["PAUSED"] = "PAUSED";
82
- STATUS2["SCHEDULED"] = "SCHEDULED";
83
- STATUS2["COMPLETED"] = "COMPLETED";
84
- STATUS2["RESULTS"] = "RESULTS";
85
- return STATUS2;
86
- })(STATUS || {});
42
+ var STATUS;
43
+ (function (STATUS) {
44
+ STATUS["ACTIVE"] = "ACTIVE";
45
+ STATUS["PAUSED"] = "PAUSED";
46
+ STATUS["SCHEDULED"] = "SCHEDULED";
47
+ STATUS["COMPLETED"] = "COMPLETED";
48
+ STATUS["RESULTS"] = "RESULTS";
49
+ })(STATUS || (STATUS = {}));
87
50
  function computePeriodStatus(game, periodIndex) {
88
- if (typeof game.activePeriodIx === "number" && game.status === DB.GameStatus.RESULTS ? game.activePeriodIx - 1 === periodIndex : game.activePeriodIx === periodIndex) {
89
- if (game.status === DB.GameStatus.PAUSED)
90
- return "PAUSED" /* PAUSED */;
91
- if (game.status === DB.GameStatus.RESULTS)
92
- return "RESULTS" /* RESULTS */;
93
- return "ACTIVE" /* ACTIVE */;
94
- }
95
- if (typeof game.activePeriodIx === "number" && game.activePeriodIx <= periodIndex)
96
- return "SCHEDULED" /* SCHEDULED */;
97
- return "COMPLETED" /* COMPLETED */;
51
+ if (typeof game.activePeriodIx === 'number' &&
52
+ game.status === DB.GameStatus.RESULTS
53
+ ? game.activePeriodIx - 1 === periodIndex
54
+ : game.activePeriodIx === periodIndex) {
55
+ if (game.status === DB.GameStatus.PAUSED)
56
+ return STATUS.PAUSED;
57
+ if (game.status === DB.GameStatus.RESULTS)
58
+ return STATUS.RESULTS;
59
+ return STATUS.ACTIVE;
60
+ }
61
+ if (typeof game.activePeriodIx === 'number' &&
62
+ game.activePeriodIx <= periodIndex)
63
+ return STATUS.SCHEDULED;
64
+ return STATUS.COMPLETED;
98
65
  }
99
66
  function computeSegmentStatus(game, period, segmentIndex) {
100
- if (![
101
- DB.GameStatus.PAUSED,
102
- DB.GameStatus.PREPARATION,
103
- DB.GameStatus.CONSOLIDATION,
104
- DB.GameStatus.RESULTS
105
- ].includes(game.status) && period.activeSegmentIx === segmentIndex)
106
- return "ACTIVE" /* ACTIVE */;
107
- if (period.activeSegmentIx && period.activeSegmentIx < segmentIndex)
108
- return "SCHEDULED" /* SCHEDULED */;
109
- return "COMPLETED" /* COMPLETED */;
67
+ if (![
68
+ DB.GameStatus.PAUSED,
69
+ DB.GameStatus.PREPARATION,
70
+ DB.GameStatus.CONSOLIDATION,
71
+ DB.GameStatus.RESULTS,
72
+ ].includes(game.status) &&
73
+ period.activeSegmentIx === segmentIndex)
74
+ return STATUS.ACTIVE;
75
+ if (period.activeSegmentIx > -2 && period.activeSegmentIx < segmentIndex)
76
+ return STATUS.SCHEDULED;
77
+ return STATUS.COMPLETED;
110
78
  }
111
- // Annotate the CommonJS export names for ESM import in node:
112
- 0 && (module.exports = {
113
- STATUS,
114
- computePercentChange,
115
- computePeriodStatus,
116
- computeScenarioOutcome,
117
- computeSegmentStatus,
118
- debugLog,
119
- diceRoll,
120
- setDifference,
121
- setIntersection,
122
- withPercentChange
123
- });
79
+
80
+ export { STATUS, computePercentChange, computePeriodStatus, computeScenarioOutcome, computeSegmentStatus, debugLog, diceRoll, setDifference, setIntersection, standardDeviation, withPercentChange };
81
+ //# sourceMappingURL=util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.js","sources":["../../src/lib/util.ts"],"sourcesContent":[null],"names":[],"mappings":"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"}
package/dist/nexus.d.ts CHANGED
@@ -1,42 +1,11 @@
1
- import * as nexus_dist_core from 'nexus/dist/core';
2
-
3
- declare const GameStatus: nexus_dist_core.NexusEnumTypeDef<"GameStatus">;
4
- declare const Game: nexus_dist_core.NexusObjectTypeDef<"Game">;
5
- declare const Period: nexus_dist_core.NexusObjectTypeDef<"Period">;
6
- declare const PeriodSegment: nexus_dist_core.NexusObjectTypeDef<"PeriodSegment">;
7
-
8
- declare const LearningAnswerOption: nexus_dist_core.NexusObjectTypeDef<"LearningAnswerOption">;
9
- declare const LearningElementState: nexus_dist_core.NexusObjectTypeDef<"LearningElementState">;
10
- declare const LearningElementAttempt: nexus_dist_core.NexusObjectTypeDef<"LearningElementAttempt">;
11
- declare const LearningElement: nexus_dist_core.NexusObjectTypeDef<"LearningElement">;
12
-
13
- interface GenerateBaseMutationsArgs {
14
- reducers?: any;
15
- schemas?: any;
16
- inputTypes?: any;
17
- roleAssigner?: (ix: number) => void;
18
- }
19
- declare function generateBaseMutations<PeriodFacts, PeriodSegmentFacts>({ reducers, roleAssigner, schemas, inputTypes, }?: GenerateBaseMutationsArgs): nexus_dist_core.NexusObjectTypeDef<"Mutation">;
20
- declare const Mutation: nexus_dist_core.NexusObjectTypeDef<"Mutation">;
21
-
22
- declare const PlayerDecisionType: nexus_dist_core.NexusEnumTypeDef<"PlayerDecisionType">;
23
- declare const PlayerResultType: nexus_dist_core.NexusEnumTypeDef<"PlayerResultType">;
24
- declare const PlayerLevel: nexus_dist_core.NexusObjectTypeDef<"PlayerLevel">;
25
- declare const PlayerState: nexus_dist_core.NexusObjectTypeDef<"PlayerState">;
26
- declare const Player: nexus_dist_core.NexusObjectTypeDef<"Player">;
27
- declare const PlayerResult: nexus_dist_core.NexusObjectTypeDef<"PlayerResult">;
28
- declare const PlayerAction: nexus_dist_core.NexusObjectTypeDef<"PlayerAction">;
29
- declare const PlayerDecision: nexus_dist_core.NexusObjectTypeDef<"PlayerDecision">;
30
-
31
- declare function generateBaseQueries(): nexus_dist_core.NexusObjectTypeDef<"Query">;
32
- declare const Query: nexus_dist_core.NexusObjectTypeDef<"Query">;
33
-
34
- declare function generateBaseSubscriptions(): nexus_dist_core.NexusObjectTypeDef<string>;
35
- declare const Subscription: nexus_dist_core.NexusObjectTypeDef<string>;
36
-
37
- declare const JsonScalar: nexus_dist_core.AllNexusOutputTypeDefs;
38
- declare const DateScalar: nexus_dist_core.AllNexusOutputTypeDefs;
39
- declare const UserRole: nexus_dist_core.NexusEnumTypeDef<"UserRole">;
40
- declare const Event: nexus_dist_core.NexusObjectTypeDef<"Event">;
41
-
42
- export { DateScalar, Event, Game, GameStatus, JsonScalar, LearningAnswerOption, LearningElement, LearningElementAttempt, LearningElementState, Mutation, Period, PeriodSegment, Player, PlayerAction, PlayerDecision, PlayerDecisionType, PlayerLevel, PlayerResult, PlayerResultType, PlayerState, Query, Subscription, UserRole, generateBaseMutations, generateBaseQueries, generateBaseSubscriptions };
1
+ export declare const JsonScalar: import("nexus/dist/core.js").AllNexusOutputTypeDefs;
2
+ export declare const DateScalar: import("nexus/dist/core.js").AllNexusOutputTypeDefs;
3
+ export declare const UserRole: import("nexus/dist/core.js").NexusEnumTypeDef<"UserRole">;
4
+ export declare const Event: import("nexus/dist/core.js").NexusObjectTypeDef<"Event">;
5
+ export * from './types/Game.js';
6
+ export * from './types/LearningElement.js';
7
+ export * from './types/Mutation.js';
8
+ export * from './types/Player.js';
9
+ export * from './types/Query.js';
10
+ export * from './types/Subscription.js';
11
+ //# sourceMappingURL=nexus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nexus.d.ts","sourceRoot":"","sources":["../src/nexus.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU,qDAA4C,CAAA;AACnE,eAAO,MAAM,UAAU,qDAA0C,CAAA;AAEjE,eAAO,MAAM,QAAQ,2DAGnB,CAAA;AAEF,eAAO,MAAM,KAAK,0DAKhB,CAAA;AAEF,cAAc,iBAAiB,CAAA;AAC/B,cAAc,4BAA4B,CAAA;AAC1C,cAAc,qBAAqB,CAAA;AACnC,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,yBAAyB,CAAA"}