@coasys/ad4m 0.8.0-fix → 0.8.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 (161) hide show
  1. package/README.md +229 -229
  2. package/jest.config.js +5 -5
  3. package/jsdoc.json +27 -27
  4. package/lib/index.cjs +4522 -4571
  5. package/lib/index.js +4522 -4571
  6. package/lib/shims/type-graphql.d.ts +32 -32
  7. package/lib/shims/type-graphql.js +70 -70
  8. package/lib/src/Ad4mClient.d.ts +26 -26
  9. package/lib/src/Ad4mClient.js +66 -66
  10. package/lib/src/Address.d.ts +1 -1
  11. package/lib/src/Address.js +1 -1
  12. package/lib/src/DID.d.ts +1 -1
  13. package/lib/src/DID.js +1 -1
  14. package/lib/src/Exception.d.ts +6 -6
  15. package/lib/src/Exception.js +7 -7
  16. package/lib/src/Literal.d.ts +7 -7
  17. package/lib/src/Literal.js +76 -76
  18. package/lib/src/PubSub.d.ts +14 -14
  19. package/lib/src/PubSub.js +14 -14
  20. package/lib/src/SmartLiteral.d.ts +12 -12
  21. package/lib/src/SmartLiteral.js +74 -74
  22. package/lib/src/agent/Agent.d.ts +104 -104
  23. package/lib/src/agent/Agent.js +337 -337
  24. package/lib/src/agent/AgentClient.d.ts +57 -57
  25. package/lib/src/agent/AgentClient.js +431 -431
  26. package/lib/src/agent/AgentResolver.d.ts +30 -30
  27. package/lib/src/agent/AgentResolver.js +325 -325
  28. package/lib/src/agent/AgentStatus.d.ts +8 -8
  29. package/lib/src/agent/AgentStatus.js +61 -61
  30. package/lib/src/buildSchema.d.ts +1 -1
  31. package/lib/src/buildSchema.js +36 -36
  32. package/lib/src/expression/Expression.d.ts +28 -28
  33. package/lib/src/expression/Expression.js +143 -143
  34. package/lib/src/expression/ExpressionClient.d.ts +13 -13
  35. package/lib/src/expression/ExpressionClient.js +102 -102
  36. package/lib/src/expression/ExpressionRef.d.ts +9 -9
  37. package/lib/src/expression/ExpressionRef.js +67 -67
  38. package/lib/src/expression/ExpressionResolver.d.ts +10 -10
  39. package/lib/src/expression/ExpressionResolver.js +106 -106
  40. package/lib/src/index.d.ts +30 -30
  41. package/lib/src/index.js +30 -30
  42. package/lib/src/jestSetup.d.ts +1 -1
  43. package/lib/src/jestSetup.js +1 -1
  44. package/lib/src/language/Icon.d.ts +4 -4
  45. package/lib/src/language/Icon.js +24 -24
  46. package/lib/src/language/Language.d.ts +195 -195
  47. package/lib/src/language/Language.js +79 -79
  48. package/lib/src/language/LanguageClient.d.ts +17 -17
  49. package/lib/src/language/LanguageClient.js +137 -137
  50. package/lib/src/language/LanguageContext.d.ts +37 -37
  51. package/lib/src/language/LanguageContext.js +2 -2
  52. package/lib/src/language/LanguageHandle.d.ts +9 -9
  53. package/lib/src/language/LanguageHandle.js +41 -41
  54. package/lib/src/language/LanguageMeta.d.ts +35 -35
  55. package/lib/src/language/LanguageMeta.js +89 -89
  56. package/lib/src/language/LanguageRef.d.ts +6 -6
  57. package/lib/src/language/LanguageRef.js +30 -30
  58. package/lib/src/language/LanguageResolver.d.ts +19 -19
  59. package/lib/src/language/LanguageResolver.js +143 -143
  60. package/lib/src/links/Links.d.ts +39 -39
  61. package/lib/src/links/Links.js +148 -148
  62. package/lib/src/links/Links.test.d.ts +1 -1
  63. package/lib/src/links/Links.test.js +33 -33
  64. package/lib/src/neighbourhood/Neighbourhood.d.ts +10 -10
  65. package/lib/src/neighbourhood/Neighbourhood.js +38 -38
  66. package/lib/src/neighbourhood/NeighbourhoodClient.d.ts +25 -25
  67. package/lib/src/neighbourhood/NeighbourhoodClient.js +256 -256
  68. package/lib/src/neighbourhood/NeighbourhoodProxy.d.ts +19 -19
  69. package/lib/src/neighbourhood/NeighbourhoodProxy.js +54 -54
  70. package/lib/src/neighbourhood/NeighbourhoodResolver.d.ts +24 -24
  71. package/lib/src/neighbourhood/NeighbourhoodResolver.js +180 -180
  72. package/lib/src/perspectives/LinkQuery.d.ts +11 -11
  73. package/lib/src/perspectives/LinkQuery.js +80 -80
  74. package/lib/src/perspectives/Perspective.d.ts +38 -38
  75. package/lib/src/perspectives/Perspective.js +144 -144
  76. package/lib/src/perspectives/Perspective.test.d.ts +1 -1
  77. package/lib/src/perspectives/Perspective.test.js +20 -20
  78. package/lib/src/perspectives/PerspectiveClient.d.ts +55 -54
  79. package/lib/src/perspectives/PerspectiveClient.js +418 -410
  80. package/lib/src/perspectives/PerspectiveDiff.d.ts +9 -9
  81. package/lib/src/perspectives/PerspectiveDiff.js +33 -33
  82. package/lib/src/perspectives/PerspectiveHandle.d.ts +16 -16
  83. package/lib/src/perspectives/PerspectiveHandle.js +59 -59
  84. package/lib/src/perspectives/PerspectiveProxy.d.ts +178 -178
  85. package/lib/src/perspectives/PerspectiveProxy.js +501 -540
  86. package/lib/src/perspectives/PerspectiveResolver.d.ts +38 -37
  87. package/lib/src/perspectives/PerspectiveResolver.js +376 -362
  88. package/lib/src/runtime/RuntimeClient.d.ts +33 -33
  89. package/lib/src/runtime/RuntimeClient.js +263 -263
  90. package/lib/src/runtime/RuntimeResolver.d.ts +47 -47
  91. package/lib/src/runtime/RuntimeResolver.js +328 -328
  92. package/lib/src/schema.gql +1 -0
  93. package/lib/src/subject/SDNADecorators.d.ts +45 -45
  94. package/lib/src/subject/SDNADecorators.js +250 -250
  95. package/lib/src/subject/Subject.d.ts +7 -7
  96. package/lib/src/subject/Subject.js +160 -160
  97. package/lib/src/subject/SubjectEntity.d.ts +31 -31
  98. package/lib/src/subject/SubjectEntity.js +250 -250
  99. package/lib/src/subject/util.d.ts +12 -12
  100. package/lib/src/subject/util.js +73 -73
  101. package/lib/src/typeDefs.d.ts +1 -1
  102. package/lib/src/typeDefs.js +1 -0
  103. package/lib/src/unwrapApolloResult.d.ts +2 -2
  104. package/lib/src/unwrapApolloResult.js +14 -12
  105. package/lib/src/utils.d.ts +2 -2
  106. package/lib/src/utils.js +21 -21
  107. package/package.json +61 -61
  108. package/rollup.config.js +26 -26
  109. package/shims/type-graphql.ts +75 -75
  110. package/src/Ad4mClient.test.ts +1089 -1084
  111. package/src/Ad4mClient.ts +62 -62
  112. package/src/Address.ts +1 -1
  113. package/src/Exception.ts +6 -6
  114. package/src/Literal.test.ts +30 -30
  115. package/src/Literal.ts +80 -80
  116. package/src/PubSub.ts +13 -13
  117. package/src/SmartLiteral.ts +74 -74
  118. package/src/agent/Agent.ts +293 -293
  119. package/src/agent/AgentClient.ts +531 -531
  120. package/src/agent/AgentResolver.ts +263 -263
  121. package/src/agent/AgentStatus.ts +43 -43
  122. package/src/buildSchema.ts +41 -41
  123. package/src/expression/Expression.ts +99 -99
  124. package/src/expression/ExpressionClient.ts +98 -98
  125. package/src/expression/ExpressionRef.ts +62 -62
  126. package/src/expression/ExpressionResolver.ts +63 -63
  127. package/src/index.ts +30 -30
  128. package/src/language/Icon.ts +10 -10
  129. package/src/language/Language.ts +266 -266
  130. package/src/language/LanguageClient.ts +159 -159
  131. package/src/language/LanguageContext.ts +37 -37
  132. package/src/language/LanguageHandle.ts +23 -23
  133. package/src/language/LanguageMeta.ts +69 -69
  134. package/src/language/LanguageRef.ts +18 -18
  135. package/src/language/LanguageResolver.ts +98 -98
  136. package/src/links/Links.test.ts +39 -39
  137. package/src/links/Links.ts +107 -107
  138. package/src/neighbourhood/Neighbourhood.ts +22 -22
  139. package/src/neighbourhood/NeighbourhoodClient.ts +275 -275
  140. package/src/neighbourhood/NeighbourhoodProxy.ts +58 -58
  141. package/src/neighbourhood/NeighbourhoodResolver.ts +99 -99
  142. package/src/perspectives/LinkQuery.ts +65 -65
  143. package/src/perspectives/Perspective.test.ts +22 -22
  144. package/src/perspectives/Perspective.ts +118 -118
  145. package/src/perspectives/PerspectiveClient.ts +452 -443
  146. package/src/perspectives/PerspectiveDiff.ts +15 -15
  147. package/src/perspectives/PerspectiveHandle.ts +39 -39
  148. package/src/perspectives/PerspectiveProxy.ts +576 -610
  149. package/src/perspectives/PerspectiveResolver.ts +224 -219
  150. package/src/runtime/RuntimeClient.ts +282 -282
  151. package/src/runtime/RuntimeResolver.ts +192 -192
  152. package/src/subject/SDNADecorators.ts +333 -333
  153. package/src/subject/Subject.ts +152 -152
  154. package/src/subject/SubjectEntity.ts +291 -291
  155. package/src/subject/util.ts +84 -84
  156. package/src/typeDefs.ts +5 -5
  157. package/src/unwrapApolloResult.ts +15 -13
  158. package/src/utils.ts +25 -25
  159. package/tsconfig-browser.json +82 -82
  160. package/tsconfig.json +80 -80
  161. package/yarn-error.log +0 -22814
@@ -1,85 +1,85 @@
1
- export function capitalize(str: string) {
2
- return str.charAt(0).toUpperCase() + str.slice(1);
3
- }
4
-
5
- // e.g. "name" -> "setName"
6
- export function propertyNameToSetterName(property: string): string {
7
- return `set${capitalize(property)}`
8
- }
9
-
10
- // e.g. "setName" -> "name"
11
- export function setterNameToPropertyName(setter: string): string {
12
- return setter.replace("set", "").replace(/^[A-Z]/, (m) => m.toLowerCase())
13
- }
14
-
15
- export function singularToPlural(singular: string): string {
16
- if(singular.endsWith("y")) {
17
- return singular.slice(0, -1) + "ies"
18
- } else {
19
- return singular + "s"
20
- }
21
- }
22
-
23
- export function pluralToSingular(plural: string): string {
24
- if(plural.endsWith("ies")) {
25
- return plural.slice(0, -3) + "y"
26
- } else if(plural.endsWith("s")) {
27
- return plural.slice(0, -1)
28
- } else {
29
- return plural
30
- }
31
- }
32
-
33
- // e.g. "comments" -> "addComment"
34
- export function collectionToAdderName(collection: string): string {
35
- return `add${capitalize(pluralToSingular(collection))}`
36
- }
37
-
38
- // e.g. "addEntry" -> "entries"
39
- export function collectionAdderToName(adderName: string): string {
40
- let singular = adderName.substring(3)
41
- let plural = singularToPlural(singular)
42
- return plural.charAt(0).toLowerCase() + plural.slice(1)
43
- }
44
-
45
- // e.g. "comments" -> "removeComment"
46
- export function collectionToRemoverName(collection: string): string {
47
- return `remove${capitalize(pluralToSingular(collection))}`
48
- }
49
-
50
- // e.g. "removeEntry" -> "entries"
51
- export function collectionRemoverToName(removerName: string): string {
52
- let singular = removerName.substring(6)
53
- let plural = singularToPlural(singular)
54
- return plural.charAt(0).toLowerCase() + plural.slice(1)
55
- }
56
-
57
- export function collectionSetterToName(adderName: string): string {
58
- let singular = adderName.substring(13)
59
- let plural = singularToPlural(singular)
60
- return plural.charAt(0).toLowerCase() + plural.slice(1)
61
- }
62
-
63
- // e.g. "comments" -> "addComment"
64
- export function collectionToSetterName(collection: string): string {
65
- return `setCollection${capitalize(pluralToSingular(collection))}`
66
- }
67
-
68
-
69
- export function stringifyObjectLiteral(obj) {
70
- if(Array.isArray(obj)) {
71
- //@ts-ignore
72
- return `[${obj.map(stringifyObjectLiteral).join(", ")}]`
73
- }
74
-
75
- const keys = Object.keys(obj);
76
- const stringifiedPairs = [];
77
-
78
- for (const key of keys) {
79
- const valueString = JSON.stringify(obj[key]);
80
- const keyValuePairString = `${key}: ${valueString}`;
81
- stringifiedPairs.push(keyValuePairString);
82
- }
83
-
84
- return `{${stringifiedPairs.join(', ')}}`;
1
+ export function capitalize(str: string) {
2
+ return str.charAt(0).toUpperCase() + str.slice(1);
3
+ }
4
+
5
+ // e.g. "name" -> "setName"
6
+ export function propertyNameToSetterName(property: string): string {
7
+ return `set${capitalize(property)}`
8
+ }
9
+
10
+ // e.g. "setName" -> "name"
11
+ export function setterNameToPropertyName(setter: string): string {
12
+ return setter.replace("set", "").replace(/^[A-Z]/, (m) => m.toLowerCase())
13
+ }
14
+
15
+ export function singularToPlural(singular: string): string {
16
+ if(singular.endsWith("y")) {
17
+ return singular.slice(0, -1) + "ies"
18
+ } else {
19
+ return singular + "s"
20
+ }
21
+ }
22
+
23
+ export function pluralToSingular(plural: string): string {
24
+ if(plural.endsWith("ies")) {
25
+ return plural.slice(0, -3) + "y"
26
+ } else if(plural.endsWith("s")) {
27
+ return plural.slice(0, -1)
28
+ } else {
29
+ return plural
30
+ }
31
+ }
32
+
33
+ // e.g. "comments" -> "addComment"
34
+ export function collectionToAdderName(collection: string): string {
35
+ return `add${capitalize(pluralToSingular(collection))}`
36
+ }
37
+
38
+ // e.g. "addEntry" -> "entries"
39
+ export function collectionAdderToName(adderName: string): string {
40
+ let singular = adderName.substring(3)
41
+ let plural = singularToPlural(singular)
42
+ return plural.charAt(0).toLowerCase() + plural.slice(1)
43
+ }
44
+
45
+ // e.g. "comments" -> "removeComment"
46
+ export function collectionToRemoverName(collection: string): string {
47
+ return `remove${capitalize(pluralToSingular(collection))}`
48
+ }
49
+
50
+ // e.g. "removeEntry" -> "entries"
51
+ export function collectionRemoverToName(removerName: string): string {
52
+ let singular = removerName.substring(6)
53
+ let plural = singularToPlural(singular)
54
+ return plural.charAt(0).toLowerCase() + plural.slice(1)
55
+ }
56
+
57
+ export function collectionSetterToName(adderName: string): string {
58
+ let singular = adderName.substring(13)
59
+ let plural = singularToPlural(singular)
60
+ return plural.charAt(0).toLowerCase() + plural.slice(1)
61
+ }
62
+
63
+ // e.g. "comments" -> "addComment"
64
+ export function collectionToSetterName(collection: string): string {
65
+ return `setCollection${capitalize(pluralToSingular(collection))}`
66
+ }
67
+
68
+
69
+ export function stringifyObjectLiteral(obj) {
70
+ if(Array.isArray(obj)) {
71
+ //@ts-ignore
72
+ return `[${obj.map(stringifyObjectLiteral).join(", ")}]`
73
+ }
74
+
75
+ const keys = Object.keys(obj);
76
+ const stringifiedPairs = [];
77
+
78
+ for (const key of keys) {
79
+ const valueString = JSON.stringify(obj[key]);
80
+ const keyValuePairString = `${key}: ${valueString}`;
81
+ stringifiedPairs.push(keyValuePairString);
82
+ }
83
+
84
+ return `{${stringifiedPairs.join(', ')}}`;
85
85
  }
package/src/typeDefs.ts CHANGED
@@ -1,6 +1,6 @@
1
- // This is just a placeholder for the TS version of the index file.
2
- // buildSchema over-writes lib/typeDefs.js after tsc has run.
3
- // This way lib/index.js can stay the compiled version of index.ts,
4
- // where index.ts imports this file...
5
-
1
+ // This is just a placeholder for the TS version of the index file.
2
+ // buildSchema over-writes lib/typeDefs.js after tsc has run.
3
+ // This way lib/index.js can stay the compiled version of index.ts,
4
+ // where index.ts imports this file...
5
+
6
6
  export const typeDefsString = ""
@@ -1,14 +1,16 @@
1
- import { ApolloQueryResult, FetchResult } from "@apollo/client/core"
2
-
3
- export default function unwrapApolloResult(result: ApolloQueryResult<any> | FetchResult<any>) {
4
- //console.debug('GQL result:', result)
5
- //@ts-ignore
6
- if(result.error) {
7
- //@ts-ignore
8
- throw result.error
9
- }
10
- if(result.errors) {
11
- throw result.errors
12
- }
13
- return result.data
1
+ import { ApolloQueryResult, FetchResult } from "@apollo/client/core"
2
+
3
+ export default function unwrapApolloResult(result: ApolloQueryResult<any> | FetchResult<any>) {
4
+ if(!result) {
5
+ throw "Got no result from Apollo"
6
+ }
7
+ //@ts-ignore
8
+ if(result.error) {
9
+ //@ts-ignore
10
+ throw result.error
11
+ }
12
+ if(result.errors) {
13
+ throw result.errors
14
+ }
15
+ return result.data
14
16
  }
package/src/utils.ts CHANGED
@@ -1,25 +1,25 @@
1
- export function formatList(list) {
2
- if (!list?.length) {
3
- return "";
4
- }
5
- if (list.length === 1) {
6
- return list.toString();
7
- }
8
- if (list.length === 2) {
9
- return list.join(' and ');
10
- }
11
-
12
- return list.slice(0, -1).join(', ') + ', and ' + list.slice(-1);
13
- };
14
-
15
- export function capSentence(cap) {
16
- const can = cap.can.includes("*") ? ["READ", "WRITE", "UPDATE"] : cap.can;
17
- const domain = cap.with.domain === "*" ? "" : cap.with.domain;
18
- const pointers = cap.with.pointers.includes("*")
19
- ? ["all AD4M data"]
20
- : cap.with.pointers;
21
-
22
- return `${formatList(
23
- can
24
- )} your ${domain} actions, with access to ${formatList(pointers)}`;
25
- }
1
+ export function formatList(list) {
2
+ if (!list?.length) {
3
+ return "";
4
+ }
5
+ if (list.length === 1) {
6
+ return list.toString();
7
+ }
8
+ if (list.length === 2) {
9
+ return list.join(' and ');
10
+ }
11
+
12
+ return list.slice(0, -1).join(', ') + ', and ' + list.slice(-1);
13
+ };
14
+
15
+ export function capSentence(cap) {
16
+ const can = cap.can.includes("*") ? ["READ", "WRITE", "UPDATE"] : cap.can;
17
+ const domain = cap.with.domain === "*" ? "" : cap.with.domain;
18
+ const pointers = cap.with.pointers.includes("*")
19
+ ? ["all AD4M data"]
20
+ : cap.with.pointers;
21
+
22
+ return `${formatList(
23
+ can
24
+ )} your ${domain} actions, with access to ${formatList(pointers)}`;
25
+ }
@@ -1,82 +1,82 @@
1
- {
2
- "include": ["./src/**/*.ts"],
3
- "exclude": ["./src/buildSchema.ts", "./src/Ad4mClient.test.ts"],
4
- "compilerOptions": {
5
- "baseUrl": ".",
6
- "paths": {
7
- "type-graphql": ["./shims/type-graphql.ts"],
8
- "reflect-metadata": ["./shims/reflect-metadata.ts"]
9
- },
10
- /* Visit https://aka.ms/tsconfig.json to read more about this file */
11
-
12
- /* Basic Options */
13
- // "incremental": true, /* Enable incremental compilation */
14
- "target": "es2018", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
15
- "lib": ["es2018", "esnext.asynciterable"],
16
- "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
17
- // "lib": [], /* Specify library files to be included in the compilation. */
18
- // "allowJs": true, /* Allow javascript files to be compiled. */
19
- // "checkJs": true, /* Report errors in .js files. */
20
- // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */
21
- "declaration": true, /* Generates corresponding '.d.ts' file. */
22
- // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
23
- // "sourceMap": true, /* Generates corresponding '.map' file. */
24
- // "outFile": "./", /* Concatenate and emit output to single file. */
25
- "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
26
- "outDir": "./lib",
27
- // "composite": true, /* Enable project compilation */
28
- // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
29
- // "removeComments": true, /* Do not emit comments to output. */
30
- // "noEmit": true, /* Do not emit outputs. */
31
- // "importHelpers": true, /* Import emit helpers from 'tslib'. */
32
- // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
33
- // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
34
-
35
- /* Strict Type-Checking Options */
36
- // "strict": true, /* Enable all strict type-checking options. */
37
- // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
38
- // "strictNullChecks": true, /* Enable strict null checks. */
39
- // "strictFunctionTypes": true, /* Enable strict checking of function types. */
40
- // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
41
- // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
42
- // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
43
- // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
44
-
45
- /* Additional Checks */
46
- // "noUnusedLocals": true, /* Report errors on unused locals. */
47
- // "noUnusedParameters": true, /* Report errors on unused parameters. */
48
- // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
49
- // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
50
- // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
51
- // "noPropertyAccessFromIndexSignature": true, /* Require undeclared properties from index signatures to use element accesses. */
52
-
53
- /* Module Resolution Options */
54
- "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
55
- // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
56
- // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
57
- // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
58
- // "typeRoots": [], /* List of folders to include type definitions from. */
59
- // "types": [], /* Type declaration files to be included in compilation. */
60
- // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
61
- "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
62
- // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
63
- // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
64
-
65
- /* Source Map Options */
66
- // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
67
- // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
68
- // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
69
- // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
70
-
71
- /* Experimental Options */
72
- // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
73
- // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
74
-
75
- /* Advanced Options */
76
- "skipLibCheck": true, /* Skip type checking of declaration files. */
77
- "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */
78
- "emitDecoratorMetadata": true,
79
- "experimentalDecorators": true,
80
- "allowSyntheticDefaultImports": true
81
- },
82
- }
1
+ {
2
+ "include": ["./src/**/*.ts"],
3
+ "exclude": ["./src/buildSchema.ts", "./src/Ad4mClient.test.ts"],
4
+ "compilerOptions": {
5
+ "baseUrl": ".",
6
+ "paths": {
7
+ "type-graphql": ["./shims/type-graphql.ts"],
8
+ "reflect-metadata": ["./shims/reflect-metadata.ts"]
9
+ },
10
+ /* Visit https://aka.ms/tsconfig.json to read more about this file */
11
+
12
+ /* Basic Options */
13
+ // "incremental": true, /* Enable incremental compilation */
14
+ "target": "es2018", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
15
+ "lib": ["es2018", "esnext.asynciterable"],
16
+ "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
17
+ // "lib": [], /* Specify library files to be included in the compilation. */
18
+ // "allowJs": true, /* Allow javascript files to be compiled. */
19
+ // "checkJs": true, /* Report errors in .js files. */
20
+ // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */
21
+ "declaration": true, /* Generates corresponding '.d.ts' file. */
22
+ // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
23
+ // "sourceMap": true, /* Generates corresponding '.map' file. */
24
+ // "outFile": "./", /* Concatenate and emit output to single file. */
25
+ "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
26
+ "outDir": "./lib",
27
+ // "composite": true, /* Enable project compilation */
28
+ // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
29
+ // "removeComments": true, /* Do not emit comments to output. */
30
+ // "noEmit": true, /* Do not emit outputs. */
31
+ // "importHelpers": true, /* Import emit helpers from 'tslib'. */
32
+ // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
33
+ // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
34
+
35
+ /* Strict Type-Checking Options */
36
+ // "strict": true, /* Enable all strict type-checking options. */
37
+ // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
38
+ // "strictNullChecks": true, /* Enable strict null checks. */
39
+ // "strictFunctionTypes": true, /* Enable strict checking of function types. */
40
+ // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
41
+ // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
42
+ // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
43
+ // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
44
+
45
+ /* Additional Checks */
46
+ // "noUnusedLocals": true, /* Report errors on unused locals. */
47
+ // "noUnusedParameters": true, /* Report errors on unused parameters. */
48
+ // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
49
+ // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
50
+ // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
51
+ // "noPropertyAccessFromIndexSignature": true, /* Require undeclared properties from index signatures to use element accesses. */
52
+
53
+ /* Module Resolution Options */
54
+ "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
55
+ // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
56
+ // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
57
+ // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
58
+ // "typeRoots": [], /* List of folders to include type definitions from. */
59
+ // "types": [], /* Type declaration files to be included in compilation. */
60
+ // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
61
+ "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
62
+ // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
63
+ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
64
+
65
+ /* Source Map Options */
66
+ // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
67
+ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
68
+ // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
69
+ // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
70
+
71
+ /* Experimental Options */
72
+ // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
73
+ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
74
+
75
+ /* Advanced Options */
76
+ "skipLibCheck": true, /* Skip type checking of declaration files. */
77
+ "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */
78
+ "emitDecoratorMetadata": true,
79
+ "experimentalDecorators": true,
80
+ "allowSyntheticDefaultImports": true
81
+ },
82
+ }
package/tsconfig.json CHANGED
@@ -1,80 +1,80 @@
1
- {
2
- "include": ["./src/**/*.ts", "./src/*.ts", "./shims"],
3
- "exclude": ["./src/*.test.ts", "./src/*.test.ts"],
4
- "compilerOptions": {
5
- /* Visit https://aka.ms/tsconfig.json to read more about this file */
6
- // "paths": {
7
- // "type-graphql": ["./shims/type-graphql.ts"],
8
- // "reflect-metadata": ["./shims/reflect-metadata.ts"]
9
- // },
10
- /* Basic Options */
11
- // "incremental": true, /* Enable incremental compilation */
12
- "target": "es2020", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'es2015', or 'ESNEXT'. */
13
- "lib": ["es2020", "esnext.asynciterable"],
14
- "module": "es2020", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
15
- // "lib": [], /* Specify library files to be included in the compilation. */
16
- // "allowJs": true, /* Allow javascript files to be compiled. */
17
- // "checkJs": true, /* Report errors in .js files. */
18
- // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */
19
- "declaration": true, /* Generates corresponding '.d.ts' file. */
20
- // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
21
- // "sourceMap": true, /* Generates corresponding '.map' file. */
22
- // "outFile": "./", /* Concatenate and emit output to single file. */
23
- "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
24
- "outDir": "./lib",
25
- // "composite": true, /* Enable project compilation */
26
- // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
27
- // "removeComments": true, /* Do not emit comments to output. */
28
- // "noEmit": true, /* Do not emit outputs. */
29
- // "importHelpers": true, /* Import emit helpers from 'tslib'. */
30
- // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
31
- // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
32
-
33
- /* Strict Type-Checking Options */
34
- // "strict": true, /* Enable all strict type-checking options. */
35
- // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
36
- // "strictNullChecks": true, /* Enable strict null checks. */
37
- // "strictFunctionTypes": true, /* Enable strict checking of function types. */
38
- // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
39
- // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
40
- // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
41
- // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
42
-
43
- /* Additional Checks */
44
- // "noUnusedLocals": true, /* Report errors on unused locals. */
45
- // "noUnusedParameters": true, /* Report errors on unused parameters. */
46
- // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
47
- // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
48
- // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
49
- // "noPropertyAccessFromIndexSignature": true, /* Require undeclared properties from index signatures to use element accesses. */
50
-
51
- /* Module Resolution Options */
52
- "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
53
- // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
54
- // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
55
- // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
56
- // "typeRoots": [], /* List of folders to include type definitions from. */
57
- // "types": [], /* Type declaration files to be included in compilation. */
58
- // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
59
- "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
60
- // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
61
- // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
62
-
63
- /* Source Map Options */
64
- // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
65
- // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
66
- // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
67
- // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
68
-
69
- /* Experimental Options */
70
- // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
71
- // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
72
-
73
- /* Advanced Options */
74
- "skipLibCheck": true, /* Skip type checking of declaration files. */
75
- "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */
76
- "emitDecoratorMetadata": true,
77
- "experimentalDecorators": true,
78
- "allowSyntheticDefaultImports": true
79
- },
80
- }
1
+ {
2
+ "include": ["./src/**/*.ts", "./src/*.ts", "./shims"],
3
+ "exclude": ["./src/*.test.ts", "./src/*.test.ts"],
4
+ "compilerOptions": {
5
+ /* Visit https://aka.ms/tsconfig.json to read more about this file */
6
+ // "paths": {
7
+ // "type-graphql": ["./shims/type-graphql.ts"],
8
+ // "reflect-metadata": ["./shims/reflect-metadata.ts"]
9
+ // },
10
+ /* Basic Options */
11
+ // "incremental": true, /* Enable incremental compilation */
12
+ "target": "es2020", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'es2015', or 'ESNEXT'. */
13
+ "lib": ["es2020", "esnext.asynciterable"],
14
+ "module": "es2020", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
15
+ // "lib": [], /* Specify library files to be included in the compilation. */
16
+ // "allowJs": true, /* Allow javascript files to be compiled. */
17
+ // "checkJs": true, /* Report errors in .js files. */
18
+ // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */
19
+ "declaration": true, /* Generates corresponding '.d.ts' file. */
20
+ // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
21
+ // "sourceMap": true, /* Generates corresponding '.map' file. */
22
+ // "outFile": "./", /* Concatenate and emit output to single file. */
23
+ "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
24
+ "outDir": "./lib",
25
+ // "composite": true, /* Enable project compilation */
26
+ // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
27
+ // "removeComments": true, /* Do not emit comments to output. */
28
+ // "noEmit": true, /* Do not emit outputs. */
29
+ // "importHelpers": true, /* Import emit helpers from 'tslib'. */
30
+ // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
31
+ // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
32
+
33
+ /* Strict Type-Checking Options */
34
+ // "strict": true, /* Enable all strict type-checking options. */
35
+ // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
36
+ // "strictNullChecks": true, /* Enable strict null checks. */
37
+ // "strictFunctionTypes": true, /* Enable strict checking of function types. */
38
+ // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
39
+ // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
40
+ // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
41
+ // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
42
+
43
+ /* Additional Checks */
44
+ // "noUnusedLocals": true, /* Report errors on unused locals. */
45
+ // "noUnusedParameters": true, /* Report errors on unused parameters. */
46
+ // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
47
+ // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
48
+ // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
49
+ // "noPropertyAccessFromIndexSignature": true, /* Require undeclared properties from index signatures to use element accesses. */
50
+
51
+ /* Module Resolution Options */
52
+ "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
53
+ // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
54
+ // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
55
+ // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
56
+ // "typeRoots": [], /* List of folders to include type definitions from. */
57
+ // "types": [], /* Type declaration files to be included in compilation. */
58
+ // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
59
+ "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
60
+ // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
61
+ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
62
+
63
+ /* Source Map Options */
64
+ // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
65
+ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
66
+ // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
67
+ // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
68
+
69
+ /* Experimental Options */
70
+ // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
71
+ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
72
+
73
+ /* Advanced Options */
74
+ "skipLibCheck": true, /* Skip type checking of declaration files. */
75
+ "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */
76
+ "emitDecoratorMetadata": true,
77
+ "experimentalDecorators": true,
78
+ "allowSyntheticDefaultImports": true
79
+ },
80
+ }