solid-logic 1.3.13-afb00b40 → 1.3.13-b2cfa99d

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/jest.config.js CHANGED
@@ -1,6 +1,6 @@
1
1
  module.exports = {
2
2
  verbose: true,
3
- testEnvironment: 'jsdom',
3
+ testEnvironment: 'node',
4
4
  setupFilesAfterEnv: [
5
5
  './test/helpers/setup.ts'
6
6
  ]
@@ -1,4 +1,3 @@
1
1
  import { Session } from '@inrupt/solid-client-authn-browser';
2
- declare let authSession: Session;
3
- export default authSession;
2
+ export declare const authSession: Session;
4
3
  //# sourceMappingURL=authSession.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"authSession.d.ts","sourceRoot":"","sources":["../../src/authSession/authSession.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAER,MAAM,oCAAoC,CAAA;AAE3C,QAAA,IAAI,WAAW,EAAE,OAAO,CAAA;AAgBxB,eAAe,WAAW,CAAA"}
1
+ {"version":3,"file":"authSession.d.ts","sourceRoot":"","sources":["../../src/authSession/authSession.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAER,MAAM,oCAAoC,CAAA;AAE3C,eAAO,MAAM,WAAW,SAKrB,CAAA"}
@@ -1,18 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.authSession = void 0;
3
4
  var solid_client_authn_browser_1 = require("@inrupt/solid-client-authn-browser");
4
- var authSession;
5
- // @ts-ignore
6
- if (!window.authSession) {
7
- authSession = new solid_client_authn_browser_1.Session({
8
- clientAuthentication: (0, solid_client_authn_browser_1.getClientAuthenticationWithDependencies)({})
9
- }, 'mySession');
10
- // @ts-ignore
11
- window.authSession = authSession;
12
- }
13
- else {
14
- // @ts-ignore
15
- authSession = window.authSession;
16
- }
17
- exports.default = authSession;
5
+ exports.authSession = new solid_client_authn_browser_1.Session({
6
+ clientAuthentication: (0, solid_client_authn_browser_1.getClientAuthenticationWithDependencies)({})
7
+ }, 'mySession');
18
8
  //# sourceMappingURL=authSession.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"authSession.js","sourceRoot":"","sources":["../../src/authSession/authSession.ts"],"names":[],"mappings":";;AAAA,iFAG2C;AAE3C,IAAI,WAAoB,CAAA;AACxB,aAAa;AACb,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE;IACvB,WAAW,GAAG,IAAI,oCAAO,CACvB;QACE,oBAAoB,EAAE,IAAA,oEAAuC,EAAC,EAAE,CAAC;KAClE,EACD,WAAW,CACZ,CAAA;IACD,aAAa;IACb,MAAM,CAAC,WAAW,GAAG,WAAW,CAAA;CACjC;KAAM;IACL,aAAa;IACb,WAAW,GAAG,MAAM,CAAC,WAAW,CAAA;CACjC;AAED,kBAAe,WAAW,CAAA"}
1
+ {"version":3,"file":"authSession.js","sourceRoot":"","sources":["../../src/authSession/authSession.ts"],"names":[],"mappings":";;;AAAA,iFAG2C;AAE9B,QAAA,WAAW,GAAG,IAAI,oCAAO,CAClC;IACE,oBAAoB,EAAE,IAAA,oEAAuC,EAAC,EAAE,CAAC;CAClE,EACD,WAAW,CACZ,CAAA"}
package/lib/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export { setACLUserPublic, genACLText } from './acl/aclLogic';
2
2
  export { ensureTypeIndexes, loadTypeIndexes, registerInTypeIndex, loadIndex } from './typeIndex/typeIndexLogic';
3
- export { default as authSession } from './authSession/authSession';
4
- export { SolidLogic } from "./logic/SolidLogic";
3
+ export { authSession } from './authSession/authSession';
4
+ export { SolidLogic } from './logic/SolidLogic';
5
5
  export { offlineTestID, appContext } from './authn/authUtil';
6
6
  export { ACL_LINK } from './util/UtilityLogic';
7
7
  export { getSuggestedIssuers } from './issuer/issuerLogic';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,UAAU,EACX,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AAS,CAAA;AAC3E,OAAO,EAAE,mBAAmB,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAA;AAC9F,OAAO,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA"}
package/lib/index.js CHANGED
@@ -1,7 +1,4 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.FetchError = exports.NotFoundError = exports.SameOriginForbiddenError = exports.CrossOriginForbiddenError = exports.UnauthorizedError = exports.profile = exports.chat = exports.store = exports.authn = exports.solidLogicSingleton = exports.getSuggestedIssuers = exports.ACL_LINK = exports.appContext = exports.offlineTestID = exports.SolidLogic = exports.authSession = exports.loadIndex = exports.registerInTypeIndex = exports.loadTypeIndexes = exports.ensureTypeIndexes = exports.genACLText = exports.setACLUserPublic = void 0;
7
4
  var aclLogic_1 = require("./acl/aclLogic");
@@ -13,7 +10,7 @@ Object.defineProperty(exports, "loadTypeIndexes", { enumerable: true, get: funct
13
10
  Object.defineProperty(exports, "registerInTypeIndex", { enumerable: true, get: function () { return typeIndexLogic_1.registerInTypeIndex; } });
14
11
  Object.defineProperty(exports, "loadIndex", { enumerable: true, get: function () { return typeIndexLogic_1.loadIndex; } });
15
12
  var authSession_1 = require("./authSession/authSession");
16
- Object.defineProperty(exports, "authSession", { enumerable: true, get: function () { return __importDefault(authSession_1).default; } });
13
+ Object.defineProperty(exports, "authSession", { enumerable: true, get: function () { return authSession_1.authSession; } });
17
14
  var SolidLogic_1 = require("./logic/SolidLogic");
18
15
  Object.defineProperty(exports, "SolidLogic", { enumerable: true, get: function () { return SolidLogic_1.SolidLogic; } });
19
16
  var authUtil_1 = require("./authn/authUtil");
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,2CAGuB;AAFrB,4GAAA,gBAAgB,OAAA;AAChB,sGAAA,UAAU,OAAA;AAEZ,6DAKmC;AAJjC,mHAAA,iBAAiB,OAAA;AACjB,iHAAA,eAAe,OAAA;AACf,qHAAA,mBAAmB,OAAA;AACnB,2GAAA,SAAS,OAAA;AAEX,yDAAkE;AAAzD,2HAAA,OAAO,OAAe;AAC/B,iDAA+C;AAAtC,wGAAA,UAAU,OAAA;AACnB,6CAA4D;AAAnD,yGAAA,aAAa,OAAA;AAAE,sGAAA,UAAU,OAAA;AAClC,oDAA8C;AAArC,wGAAA,QAAQ,OAAA;AACjB,oDAA0D;AAAjD,kHAAA,mBAAmB,OAAA;AAE5B,mEAA8F;AAArF,0HAAA,mBAAmB,OAAA;AAAE,4GAAA,KAAK,OAAA;AAAE,4GAAA,KAAK,OAAA;AAAE,2GAAA,IAAI,OAAA;AAAE,8GAAA,OAAO,OAAA;AACzD,mDAAuI;AAA9H,gHAAA,iBAAiB,OAAA;AAAE,wHAAA,yBAAyB,OAAA;AAAE,uHAAA,wBAAwB,OAAA;AAAE,4GAAA,aAAa,OAAA;AAAE,yGAAA,UAAU,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,2CAGuB;AAFrB,4GAAA,gBAAgB,OAAA;AAChB,sGAAA,UAAU,OAAA;AAEZ,6DAKmC;AAJjC,mHAAA,iBAAiB,OAAA;AACjB,iHAAA,eAAe,OAAA;AACf,qHAAA,mBAAmB,OAAA;AACnB,2GAAA,SAAS,OAAA;AAEX,yDAAuD;AAA9C,0GAAA,WAAW,OAAA;AACpB,iDAA+C;AAAtC,wGAAA,UAAU,OAAA;AACnB,6CAA4D;AAAnD,yGAAA,aAAa,OAAA;AAAE,sGAAA,UAAU,OAAA;AAClC,oDAA8C;AAArC,wGAAA,QAAQ,OAAA;AACjB,oDAA0D;AAAjD,kHAAA,mBAAmB,OAAA;AAE5B,mEAA8F;AAArF,0HAAA,mBAAmB,OAAA;AAAE,4GAAA,KAAK,OAAA;AAAE,4GAAA,KAAK,OAAA;AAAE,2GAAA,IAAI,OAAA;AAAE,8GAAA,OAAO,OAAA;AACzD,mDAAuI;AAA9H,gHAAA,iBAAiB,OAAA;AAAE,wHAAA,yBAAyB,OAAA;AAAE,uHAAA,wBAAwB,OAAA;AAAE,4GAAA,aAAa,OAAA;AAAE,yGAAA,UAAU,OAAA"}
@@ -54,18 +54,15 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
54
54
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
55
55
  }
56
56
  };
57
- var __importDefault = (this && this.__importDefault) || function (mod) {
58
- return (mod && mod.__esModule) ? mod : { "default": mod };
59
- };
60
57
  Object.defineProperty(exports, "__esModule", { value: true });
61
58
  exports.profile = exports.chat = exports.store = exports.authn = exports.solidLogicSingleton = void 0;
62
59
  var debug = __importStar(require("../util/debug"));
63
- var authSession_1 = __importDefault(require("../authSession/authSession"));
60
+ var authSession_1 = require("../authSession/authSession");
64
61
  var SolidLogic_1 = require("./SolidLogic");
65
62
  var fetcher = function (url, requestInit) { return __awaiter(void 0, void 0, void 0, function () {
66
63
  return __generator(this, function (_a) {
67
- if (authSession_1.default.info.webId) {
68
- return [2 /*return*/, authSession_1.default.fetch(url, requestInit)];
64
+ if (authSession_1.authSession.info.webId) {
65
+ return [2 /*return*/, authSession_1.authSession.fetch(url, requestInit)];
69
66
  }
70
67
  else {
71
68
  return [2 /*return*/, window.fetch(url, requestInit)];
@@ -73,7 +70,7 @@ var fetcher = function (url, requestInit) { return __awaiter(void 0, void 0, voi
73
70
  return [2 /*return*/];
74
71
  });
75
72
  }); };
76
- var solidLogicSingleton = new SolidLogic_1.SolidLogic({ fetch: fetcher }, authSession_1.default);
73
+ var solidLogicSingleton = new SolidLogic_1.SolidLogic({ fetch: fetcher }, authSession_1.authSession);
77
74
  exports.solidLogicSingleton = solidLogicSingleton;
78
75
  // Make this directly accessible as it is what you need most of the time
79
76
  var authn = solidLogicSingleton.authn;
@@ -1 +1 @@
1
- {"version":3,"file":"solidLogicSingleton.js","sourceRoot":"","sources":["../../src/logic/solidLogicSingleton.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAsC;AACtC,2EAAoD;AACpD,2CAAyC;AAEzC,IAAM,OAAO,GAAG,UAAO,GAAG,EAAE,WAAW;;QACnC,IAAI,qBAAW,CAAC,IAAI,CAAC,KAAK,EAAE;YACxB,sBAAO,qBAAW,CAAC,KAAK,CAAC,GAAG,EAAE,WAAW,CAAC,EAAA;SAC7C;aAAM;YACH,sBAAO,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,WAAW,CAAC,EAAA;SACxC;;;KACJ,CAAA;AAED,IAAM,mBAAmB,GAAG,IAAI,uBAAU,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,qBAAW,CAAC,CAAA;AAWlE,kDAAmB;AAT5B,wEAAwE;AACxE,IAAM,KAAK,GAAG,mBAAmB,CAAC,KAAK,CAAA;AAQT,sBAAK;AAPnC,IAAM,KAAK,GAAG,mBAAmB,CAAC,KAAK,CAAA;AAOF,sBAAK;AAL1C,IAAM,IAAI,GAAG,mBAAmB,CAAC,IAAI,CAAA;AAKO,oBAAI;AAJhD,IAAM,OAAO,GAAG,mBAAmB,CAAC,OAAO,CAAA;AAIO,0BAAO;AAFzD,KAAK,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAA"}
1
+ {"version":3,"file":"solidLogicSingleton.js","sourceRoot":"","sources":["../../src/logic/solidLogicSingleton.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAsC;AACtC,0DAAwD;AACxD,2CAAyC;AAEzC,IAAM,OAAO,GAAG,UAAO,GAAG,EAAE,WAAW;;QACnC,IAAI,yBAAW,CAAC,IAAI,CAAC,KAAK,EAAE;YACxB,sBAAO,yBAAW,CAAC,KAAK,CAAC,GAAG,EAAE,WAAW,CAAC,EAAA;SAC7C;aAAM;YACH,sBAAO,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,WAAW,CAAC,EAAA;SACxC;;;KACJ,CAAA;AAED,IAAM,mBAAmB,GAAG,IAAI,uBAAU,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,yBAAW,CAAC,CAAA;AAWlE,kDAAmB;AAT5B,wEAAwE;AACxE,IAAM,KAAK,GAAG,mBAAmB,CAAC,KAAK,CAAA;AAQT,sBAAK;AAPnC,IAAM,KAAK,GAAG,mBAAmB,CAAC,KAAK,CAAA;AAOF,sBAAK;AAL1C,IAAM,IAAI,GAAG,mBAAmB,CAAC,IAAI,CAAA;AAKO,oBAAI;AAJhD,IAAM,OAAO,GAAG,mBAAmB,CAAC,OAAO,CAAA;AAIO,0BAAO;AAFzD,KAAK,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "solid-logic",
3
- "version": "1.3.13-afb00b40",
3
+ "version": "1.3.13-b2cfa99d",
4
4
  "description": "Core business logic of Solid OS",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
7
- "build": "tsc",
7
+ "build": "npm run clean && tsc",
8
8
  "clean": "rm -rf lib",
9
9
  "lint": "eslint ./src",
10
10
  "test": "jest",
@@ -3,20 +3,10 @@ import {
3
3
  getClientAuthenticationWithDependencies
4
4
  } from '@inrupt/solid-client-authn-browser'
5
5
 
6
- let authSession: Session
7
- // @ts-ignore
8
- if (!window.authSession) {
9
- authSession = new Session(
6
+ export const authSession = new Session(
10
7
  {
11
8
  clientAuthentication: getClientAuthenticationWithDependencies({})
12
9
  },
13
10
  'mySession'
14
11
  )
15
- // @ts-ignore
16
- window.authSession = authSession
17
- } else {
18
- // @ts-ignore
19
- authSession = window.authSession
20
- }
21
12
 
22
- export default authSession
package/src/index.ts CHANGED
@@ -8,8 +8,8 @@ export {
8
8
  registerInTypeIndex,
9
9
  loadIndex
10
10
  } from './typeIndex/typeIndexLogic'
11
- export { default as authSession } from './authSession/authSession'
12
- export { SolidLogic } from "./logic/SolidLogic"
11
+ export { authSession } from './authSession/authSession'
12
+ export { SolidLogic } from './logic/SolidLogic'
13
13
  export { offlineTestID, appContext } from './authn/authUtil'
14
14
  export { ACL_LINK } from './util/UtilityLogic'
15
15
  export { getSuggestedIssuers } from './issuer/issuerLogic'
@@ -1,5 +1,5 @@
1
1
  import * as debug from "../util/debug"
2
- import authSession from "../authSession/authSession"
2
+ import { authSession } from "../authSession/authSession"
3
3
  import { SolidLogic } from "./SolidLogic"
4
4
 
5
5
  const fetcher = async (url, requestInit) => {
@@ -1,3 +1,7 @@
1
+ /**
2
+ * @jest-environment jsdom
3
+ *
4
+ */
1
5
  import * as authUtil from '../src/authn/authUtil'
2
6
 
3
7
  describe('offlineTestID', () => {
@@ -1,6 +1,10 @@
1
+ /**
2
+ * @jest-environment jsdom
3
+ *
4
+ */
1
5
  import { SolidAuthnLogic } from '../src/authn/SolidAuthnLogic'
2
6
  import { silenceDebugMessages } from './helpers/setup'
3
- import { default as authSession } from '../src/authSession/authSession'
7
+ import { authSession } from '../src/authSession/authSession'
4
8
  import { AuthenticationContext } from '../src/types'
5
9
 
6
10
  silenceDebugMessages()