@learncard/network-brain-client 2.5.41 → 2.5.43

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.
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  if (process.env.NODE_ENV === 'production') {
4
- module.exports = require('./brain-client.cjs.production.min.js');
4
+ module.exports = require('./brain-client.cjs.production.min.cjs');
5
5
  } else {
6
- module.exports = require('./brain-client.cjs.development.js');
6
+ module.exports = require('./brain-client.cjs.development.cjs');
7
7
  }
@@ -0,0 +1,8 @@
1
+ import { TRPCClient } from '@trpc/client';
2
+ import type { AppRouter } from '@learncard/network-brain-service';
3
+ export type LCNClient = TRPCClient<AppRouter>;
4
+ export type GuardianApprovalGetter = () => string | undefined | Promise<string | undefined>;
5
+ export declare const getClient: (url: string, didAuthFunction: (challenge?: string) => Promise<string>, guardianApprovalGetter?: GuardianApprovalGetter, extraHeaders?: Record<string, string>) => Promise<LCNClient>;
6
+ export declare const getApiTokenClient: (url: string, apiToken: string, guardianApprovalGetter?: GuardianApprovalGetter, extraHeaders?: Record<string, string>) => Promise<LCNClient>;
7
+ export default getClient;
8
+ //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,32 +1,50 @@
1
1
  {
2
- "name": "@learncard/network-brain-client",
3
- "version": "2.5.41",
4
- "description": "",
5
- "main": "dist/index.js",
6
- "module": "./dist/brain-client.esm.js",
7
- "types": "dist/index.d.ts",
8
- "keywords": [],
9
- "author": "Learning Economy Foundation (www.learningeconomy.io)",
10
- "license": "MIT",
11
- "devDependencies": {
12
- "dts-bundle-generator": "^6.10.0",
13
- "esbuild": "^0.27.1",
14
- "@learncard/helpers": "1.3.5",
15
- "@learncard/types": "5.17.3"
16
- },
17
- "dependencies": {
18
- "@trpc/client": "11.3.0",
19
- "@learncard/network-brain-service": "3.16.4"
20
- },
21
- "repository": {
22
- "type": "git",
23
- "url": "https://github.com/learningeconomy/LearnCard"
24
- },
25
- "homepage": "https://github.com/learningeconomy/LearnCard/tree/main/packages/learn-card-network/brain-client/README.md",
26
- "bugs": {
27
- "url": "https://github.com/learningeconomy/LearnCard/issues"
28
- },
29
- "scripts": {
30
- "build": "node ./scripts/build.mjs && shx cp ./scripts/mixedEntypoint.js ./dist/index.js && tsc --p tsconfig.json"
31
- }
32
- }
2
+ "name": "@learncard/network-brain-client",
3
+ "version": "2.5.43",
4
+ "description": "",
5
+ "type": "module",
6
+ "main": "./dist/index.cjs",
7
+ "module": "./dist/brain-client.esm.js",
8
+ "types": "dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "development": "./src/index.ts",
12
+ "import": {
13
+ "types": "./dist/index.d.ts",
14
+ "default": "./dist/brain-client.esm.js"
15
+ },
16
+ "require": {
17
+ "types": "./dist/index.d.cts",
18
+ "default": "./dist/index.cjs"
19
+ }
20
+ }
21
+ },
22
+ "files": [
23
+ "dist",
24
+ "src"
25
+ ],
26
+ "scripts": {
27
+ "build": "node ./scripts/build.mjs && shx cp ./scripts/mixedEntypoint.js ./dist/index.cjs && tsc --p tsconfig.json && shx cp ./dist/index.d.ts ./dist/index.d.cts"
28
+ },
29
+ "keywords": [],
30
+ "author": "Learning Economy Foundation (www.learningeconomy.io)",
31
+ "license": "MIT",
32
+ "devDependencies": {
33
+ "@learncard/helpers": "workspace:*",
34
+ "@learncard/types": "workspace:*",
35
+ "dts-bundle-generator": "^6.10.0",
36
+ "esbuild": "^0.27.1"
37
+ },
38
+ "dependencies": {
39
+ "@learncard/network-brain-service": "workspace:*",
40
+ "@trpc/client": "11.3.0"
41
+ },
42
+ "repository": {
43
+ "type": "git",
44
+ "url": "https://github.com/learningeconomy/LearnCard"
45
+ },
46
+ "homepage": "https://github.com/learningeconomy/LearnCard/tree/main/packages/learn-card-network/brain-client/README.md",
47
+ "bugs": {
48
+ "url": "https://github.com/learningeconomy/LearnCard/issues"
49
+ }
50
+ }
package/.env DELETED
@@ -1,7 +0,0 @@
1
- # Wait 60 seconds before connecting using these details, or login to https://console.neo4j.io to validate the Aura Instance is available
2
- NEO4J_URI=neo4j+s://ab9edde2.databases.neo4j.io
3
- NEO4J_USERNAME=neo4j
4
- NEO4J_PASSWORD=V58sFdxds9E42A62bD1oA39AONg8fl8tNSMXCCQomow
5
- AURA_INSTANCENAME=Instance01
6
-
7
- SEED=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa