solid-logic 3.0.9-c8d34ed5 → 3.0.9-dad75a1

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 (118) hide show
  1. package/README.md +28 -2
  2. package/dist/acl/aclLogic.d.ts +5 -0
  3. package/{lib → dist}/acl/aclLogic.d.ts.map +1 -1
  4. package/{lib → dist}/authSession/authSession.d.ts.map +1 -1
  5. package/{lib → dist}/authn/SolidAuthnLogic.d.ts +3 -3
  6. package/{lib → dist}/authn/SolidAuthnLogic.d.ts.map +1 -1
  7. package/{lib → dist}/authn/authUtil.d.ts +1 -1
  8. package/{lib → dist}/chat/chatLogic.d.ts +1 -1
  9. package/{lib → dist}/inbox/inboxLogic.d.ts +1 -1
  10. package/{lib → dist}/inbox/inboxLogic.d.ts.map +1 -1
  11. package/{lib → dist}/index.d.ts +1 -1
  12. package/{lib → dist}/index.d.ts.map +1 -1
  13. package/{lib → dist}/logic/CustomError.d.ts.map +1 -1
  14. package/dist/logic/solidLogic.d.ts +6 -0
  15. package/{lib → dist}/logic/solidLogic.d.ts.map +1 -1
  16. package/{lib → dist}/profile/profileLogic.d.ts +1 -1
  17. package/dist/solid-logic.js +35 -0
  18. package/dist/solid-logic.js.map +1 -0
  19. package/{lib → dist}/types.d.ts +2 -2
  20. package/{lib → dist}/util/containerLogic.d.ts +1 -1
  21. package/{lib → dist}/util/containerLogic.d.ts.map +1 -1
  22. package/dist/util/debug.d.ts.map +1 -0
  23. package/{lib → dist}/util/utilityLogic.d.ts +1 -1
  24. package/{lib → dist}/util/utilityLogic.d.ts.map +1 -1
  25. package/{lib → dist}/util/utils.d.ts +1 -1
  26. package/{lib → dist}/util/utils.d.ts.map +1 -1
  27. package/package.json +51 -18
  28. package/eslint.config.js +0 -29
  29. package/jest.config.js +0 -10
  30. package/lib/acl/aclLogic.d.ts +0 -5
  31. package/lib/acl/aclLogic.js +0 -168
  32. package/lib/acl/aclLogic.js.map +0 -1
  33. package/lib/authSession/authSession.js +0 -6
  34. package/lib/authSession/authSession.js.map +0 -1
  35. package/lib/authn/SolidAuthnLogic.js +0 -193
  36. package/lib/authn/SolidAuthnLogic.js.map +0 -1
  37. package/lib/authn/authUtil.js +0 -105
  38. package/lib/authn/authUtil.js.map +0 -1
  39. package/lib/chat/chatLogic.js +0 -272
  40. package/lib/chat/chatLogic.js.map +0 -1
  41. package/lib/inbox/inboxLogic.js +0 -139
  42. package/lib/inbox/inboxLogic.js.map +0 -1
  43. package/lib/index.js +0 -29
  44. package/lib/index.js.map +0 -1
  45. package/lib/issuer/issuerLogic.js +0 -52
  46. package/lib/issuer/issuerLogic.js.map +0 -1
  47. package/lib/logic/CustomError.js +0 -89
  48. package/lib/logic/CustomError.js.map +0 -1
  49. package/lib/logic/solidLogic.d.ts +0 -6
  50. package/lib/logic/solidLogic.js +0 -102
  51. package/lib/logic/solidLogic.js.map +0 -1
  52. package/lib/logic/solidLogicSingleton.js +0 -94
  53. package/lib/logic/solidLogicSingleton.js.map +0 -1
  54. package/lib/profile/profileLogic.js +0 -259
  55. package/lib/profile/profileLogic.js.map +0 -1
  56. package/lib/typeIndex/typeIndexLogic.js +0 -399
  57. package/lib/typeIndex/typeIndexLogic.js.map +0 -1
  58. package/lib/types.js +0 -3
  59. package/lib/types.js.map +0 -1
  60. package/lib/util/containerLogic.js +0 -102
  61. package/lib/util/containerLogic.js.map +0 -1
  62. package/lib/util/debug.d.ts.map +0 -1
  63. package/lib/util/debug.js +0 -40
  64. package/lib/util/debug.js.map +0 -1
  65. package/lib/util/ns.js +0 -44
  66. package/lib/util/ns.js.map +0 -1
  67. package/lib/util/utilityLogic.js +0 -284
  68. package/lib/util/utilityLogic.js.map +0 -1
  69. package/lib/util/utils.js +0 -47
  70. package/lib/util/utils.js.map +0 -1
  71. package/src/acl/aclLogic.ts +0 -156
  72. package/src/authSession/authSession.ts +0 -7
  73. package/src/authn/SolidAuthnLogic.ts +0 -127
  74. package/src/authn/authUtil.ts +0 -70
  75. package/src/chat/chatLogic.ts +0 -226
  76. package/src/inbox/inboxLogic.ts +0 -59
  77. package/src/index.ts +0 -21
  78. package/src/issuer/issuerLogic.ts +0 -40
  79. package/src/logic/CustomError.ts +0 -29
  80. package/src/logic/solidLogic.ts +0 -76
  81. package/src/logic/solidLogicSingleton.ts +0 -20
  82. package/src/profile/profileLogic.ts +0 -125
  83. package/src/typeIndex/typeIndexLogic.ts +0 -198
  84. package/src/types.ts +0 -122
  85. package/src/util/containerLogic.ts +0 -53
  86. package/src/util/debug.ts +0 -20
  87. package/src/util/ns.ts +0 -5
  88. package/src/util/utilityLogic.ts +0 -156
  89. package/src/util/utils.ts +0 -52
  90. package/test/aclLogic.test.ts +0 -24
  91. package/test/authUtil.test.ts +0 -23
  92. package/test/chatLogic.test.ts +0 -316
  93. package/test/container.test.ts +0 -58
  94. package/test/helpers/dataSetup.ts +0 -134
  95. package/test/helpers/setup.ts +0 -17
  96. package/test/inboxLogic.test.ts +0 -218
  97. package/test/logic.test.ts +0 -29
  98. package/test/profileLogic.test.ts +0 -246
  99. package/test/solidAuthLogic.test.ts +0 -49
  100. package/test/typeIndexLogic.test.ts +0 -255
  101. package/test/utilityLogic.test.ts +0 -179
  102. package/test/utils.test.ts +0 -32
  103. package/tsconfig.json +0 -75
  104. /package/{lib → dist}/authSession/authSession.d.ts +0 -0
  105. /package/{lib → dist}/authn/authUtil.d.ts.map +0 -0
  106. /package/{lib → dist}/chat/chatLogic.d.ts.map +0 -0
  107. /package/{lib → dist}/issuer/issuerLogic.d.ts +0 -0
  108. /package/{lib → dist}/issuer/issuerLogic.d.ts.map +0 -0
  109. /package/{lib → dist}/logic/CustomError.d.ts +0 -0
  110. /package/{lib → dist}/logic/solidLogicSingleton.d.ts +0 -0
  111. /package/{lib → dist}/logic/solidLogicSingleton.d.ts.map +0 -0
  112. /package/{lib → dist}/profile/profileLogic.d.ts.map +0 -0
  113. /package/{lib → dist}/typeIndex/typeIndexLogic.d.ts +0 -0
  114. /package/{lib → dist}/typeIndex/typeIndexLogic.d.ts.map +0 -0
  115. /package/{lib → dist}/types.d.ts.map +0 -0
  116. /package/{lib → dist}/util/debug.d.ts +0 -0
  117. /package/{lib → dist}/util/ns.d.ts +0 -0
  118. /package/{lib → dist}/util/ns.d.ts.map +0 -0
@@ -1,5 +1,5 @@
1
- import { Session } from "@inrupt/solid-client-authn-browser";
2
- import { LiveStore, NamedNode, Statement } from "rdflib";
1
+ import { Session } from '@inrupt/solid-client-authn-browser';
2
+ import { LiveStore, NamedNode, Statement } from 'rdflib';
3
3
  export type AppDetails = {
4
4
  noun: string;
5
5
  appPathSegment: string;
@@ -1,4 +1,4 @@
1
- import { NamedNode } from "rdflib";
1
+ import { NamedNode } from 'rdflib';
2
2
  /**
3
3
  * Container-related class
4
4
  */
@@ -1 +1 @@
1
- {"version":3,"file":"containerLogic.d.ts","sourceRoot":"","sources":["../../src/util/containerLogic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAkB,MAAM,QAAQ,CAAC;AAEnD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,KAAA;uBAYZ,SAAS;2BAKC,MAAM;0CAfG,SAAS,KAAG,SAAS,EAAE;wCAmCnB,SAAS,KAAG,OAAO,CAAC,SAAS,EAAE,CAAC;EAUpF"}
1
+ {"version":3,"file":"containerLogic.d.ts","sourceRoot":"","sources":["../../src/util/containerLogic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAkB,MAAM,QAAQ,CAAA;AAElD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,KAAA;uBAYZ,SAAS;2BAKC,MAAM;0CAfG,SAAS,KAAG,SAAS,EAAE;wCAmCnB,SAAS,KAAG,OAAO,CAAC,SAAS,EAAE,CAAC;EAUpF"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../src/util/debug.ts"],"names":[],"mappings":"AACA,wBAAgB,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAExC;AAED,wBAAgB,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAEzC;AAED,wBAAgB,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAE1C;AAED,wBAAgB,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAE1C"}
@@ -1,4 +1,4 @@
1
- import { NamedNode } from "rdflib";
1
+ import { NamedNode } from 'rdflib';
2
2
  export declare function createUtilityLogic(store: any, aclLogic: any, containerLogic: any): {
3
3
  recursiveDelete: (containerNode: NamedNode) => Promise<any>;
4
4
  setSinglePeerAccess: (options: {
@@ -1 +1 @@
1
- {"version":3,"file":"utilityLogic.d.ts","sourceRoot":"","sources":["../../src/util/utilityLogic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAW,MAAM,QAAQ,CAAC;AAK5C,wBAAgB,kBAAkB,CAAC,KAAK,KAAA,EAAE,QAAQ,KAAA,EAAE,cAAc,KAAA;qCAElB,SAAS;mCAwFX;QAC1C,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,MAAM,EAAE,MAAM,CAAA;KACf;6BAsCqC,SAAS,WAAW,MAAM;kCA3ErB,SAAS,aAAa,SAAS,UAChE,SAAS,OAAO,SAAS,KAChC,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC;mCApCgB,SAAS;EA4HtD"}
1
+ {"version":3,"file":"utilityLogic.d.ts","sourceRoot":"","sources":["../../src/util/utilityLogic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAW,MAAM,QAAQ,CAAA;AAK3C,wBAAgB,kBAAkB,CAAC,KAAK,KAAA,EAAE,QAAQ,KAAA,EAAE,cAAc,KAAA;qCAElB,SAAS;mCAwFX;QAC1C,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,MAAM,EAAE,MAAM,CAAA;KACf;6BAsCqC,SAAS,WAAW,MAAM;kCA3ErB,SAAS,aAAa,SAAS,UAChE,SAAS,OAAO,SAAS,KAChC,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC;mCApCgB,SAAS;EA4HtD"}
@@ -1,4 +1,4 @@
1
- import { NamedNode } from "rdflib";
1
+ import { NamedNode } from 'rdflib';
2
2
  export declare function newThing(doc: NamedNode): NamedNode;
3
3
  export declare function uniqueNodes(arr: NamedNode[]): NamedNode[];
4
4
  export declare function getArchiveUrl(baseUrl: string, date: Date): string;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/util/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAO,MAAM,QAAQ,CAAC;AAExC,wBAAgB,QAAQ,CAAC,GAAG,EAAE,SAAS,GAAG,SAAS,CAElD;AAED,wBAAgB,WAAW,CAAE,GAAG,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,CAM1D;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,UAOxD;AAED,wBAAgB,eAAe,CAAC,GAAG,KAAA,GAAG,OAAO,CAO5C;AAED,wBAAgB,sBAAsB,CAAE,EAAE,EAAC,SAAS,aAMnD;AAED,wBAAgB,sBAAsB,CAClC,OAAO,EAAE,SAAS,EAClB,OAAO,EAAE,SAAS,GACnB,SAAS,CAQX"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/util/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAO,MAAM,QAAQ,CAAA;AAEvC,wBAAgB,QAAQ,CAAC,GAAG,EAAE,SAAS,GAAG,SAAS,CAElD;AAED,wBAAgB,WAAW,CAAE,GAAG,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,CAM1D;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,UAOxD;AAED,wBAAgB,eAAe,CAAC,GAAG,KAAA,GAAG,OAAO,CAO5C;AAED,wBAAgB,sBAAsB,CAAE,EAAE,EAAC,SAAS,aAMnD;AAED,wBAAgB,sBAAsB,CAClC,OAAO,EAAE,SAAS,EAClB,OAAO,EAAE,SAAS,GACnB,SAAS,CAQX"}
package/package.json CHANGED
@@ -1,18 +1,32 @@
1
1
  {
2
2
  "name": "solid-logic",
3
- "version": "3.0.9-c8d34ed5",
4
- "description": "Core business logic of Solid OS",
5
- "main": "lib/index.js",
3
+ "type": "module",
4
+ "version": "3.0.9-dad75a1",
5
+ "description": "Core business logic of SolidOS",
6
+ "main": "dist/solid-logic.js",
7
+ "types": "dist/index.d.ts",
8
+ "sideEffects": false,
9
+ "files": [
10
+ "dist/",
11
+ "README.md",
12
+ "LICENSE"
13
+ ],
6
14
  "scripts": {
7
- "build": "npm run clean && tsc",
8
- "clean": "rm -rf lib",
9
- "lint": "eslint ./src",
10
- "test": "jest",
15
+ "clean": "rm -rf dist src/versionInfo.ts",
16
+ "build": "npm run clean && npm run build-types && npm run build-version && npm run build-dist",
17
+ "build-version": "./timestamp.sh > src/versionInfo.ts && eslint 'src/versionInfo.ts' --fix",
18
+ "build-types": "tsc --emitDeclarationOnly",
19
+ "build-dist": "rollup -c",
20
+ "lint": "eslint 'src/**/*.ts' 'test/**/*.ts'",
21
+ "typecheck": "tsc --noEmit",
22
+ "typecheck:test": "tsc --noEmit -p tsconfig.test.json",
23
+ "test": "jest --no-coverage",
24
+ "test:coverage": "jest --coverage",
11
25
  "test-debug": "node --inspect-brk ./node_modules/.bin/jest -i --env jest-environment-node-debug",
12
- "preversion": "npm test",
13
- "postversion": "git push --follow-tags",
14
26
  "ignore:prepublishOnly": "npm run build && npm run test",
15
- "watch": "tsc --watch"
27
+ "preversion": "npm run lint && npm run typecheck && npm test",
28
+ "postversion": "git push origin main --follow-tags",
29
+ "watch": "npm run build-version && tsc --watch"
16
30
  },
17
31
  "repository": {
18
32
  "type": "git",
@@ -25,26 +39,45 @@
25
39
  },
26
40
  "homepage": "https://github.com/solidos/solid-logic#readme",
27
41
  "devDependencies": {
28
- "@babel/plugin-transform-async-to-generator": "^7.27.1",
29
- "@babel/plugin-transform-class-properties": "^7.27.1",
30
- "@babel/plugin-transform-optional-chaining": "^7.27.1",
31
- "@babel/plugin-transform-runtime": "^7.28.0",
32
- "@babel/preset-env": "^7.28.0",
42
+ "@babel/core": "^7.28.3",
43
+ "@babel/preset-env": "^7.28.3",
33
44
  "@babel/preset-typescript": "^7.27.1",
45
+ "@rollup/plugin-commonjs": "^28.0.6",
46
+ "@rollup/plugin-json": "^6.1.0",
47
+ "@rollup/plugin-node-resolve": "^16.0.1",
48
+ "@rollup/plugin-typescript": "^12.1.4",
34
49
  "@types/jest": "^30.0.0",
35
50
  "@typescript-eslint/eslint-plugin": "^8.34.0",
36
51
  "@typescript-eslint/parser": "^8.34.0",
52
+ "babel-jest": "^30.1.2",
37
53
  "eslint": "^9.28.0",
54
+ "eslint-config-prettier": "^10.1.8",
55
+ "eslint-plugin-import": "^2.32.0",
56
+ "husky": "^9.1.7",
38
57
  "jest": "^30.0.2",
39
58
  "jest-environment-jsdom": "^30.0.2",
40
59
  "jest-environment-node-debug": "^2.0.0",
41
60
  "jest-fetch-mock": "^3.0.3",
42
- "typescript": "^5.7.3"
61
+ "lint-staged": "^16.1.5",
62
+ "rollup": "^2.79.2",
63
+ "rollup-plugin-terser": "^7.0.2",
64
+ "ts-loader": "^9.5.4",
65
+ "tslib": "^2.8.1",
66
+ "typescript": "^5.9.2",
67
+ "typescript-eslint": "^8.42.0"
43
68
  },
44
69
  "dependencies": {
45
- "@inrupt/solid-client-authn-browser": "^3.1.0",
46
- "lint-staged": "^16.1.5",
70
+ "@inrupt/solid-client-authn-browser": "1.17",
47
71
  "rdflib": "^2.2.37",
48
72
  "solid-namespace": "^0.5.4"
73
+ },
74
+ "husky": {
75
+ "hooks": {
76
+ "pre-commit": "lint-staged",
77
+ "pre-push": "npm test"
78
+ }
79
+ },
80
+ "lint-staged": {
81
+ "*.ts": "eslint --fix"
49
82
  }
50
83
  }
package/eslint.config.js DELETED
@@ -1,29 +0,0 @@
1
- const {
2
- defineConfig,
3
- } = require("eslint/config");
4
-
5
- const tsParser = require("@typescript-eslint/parser");
6
- const typescriptEslint = require("@typescript-eslint/eslint-plugin");
7
- const js = require("@eslint/js");
8
-
9
- const {
10
- FlatCompat,
11
- } = require("@eslint/eslintrc");
12
-
13
- const compat = new FlatCompat({
14
- baseDirectory: __dirname,
15
- recommendedConfig: js.configs.recommended,
16
- allConfig: js.configs.all
17
- });
18
-
19
- module.exports = defineConfig([{
20
- languageOptions: {
21
- parser: tsParser,
22
- },
23
-
24
- plugins: {
25
- "@typescript-eslint": typescriptEslint,
26
- },
27
-
28
- extends: compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended"),
29
- }]);
package/jest.config.js DELETED
@@ -1,10 +0,0 @@
1
- module.exports = {
2
- verbose: true,
3
- testEnvironment: 'jsdom',
4
- testEnvironmentOptions: {
5
- customExportConditions: ['node']
6
- },
7
- setupFilesAfterEnv: [
8
- './test/helpers/setup.ts'
9
- ]
10
- }
@@ -1,5 +0,0 @@
1
- import { NamedNode } from "rdflib";
2
- import { AclLogic } from "../types";
3
- export declare const ACL_LINK: NamedNode;
4
- export declare function createAclLogic(store: any): AclLogic;
5
- //# sourceMappingURL=aclLogic.d.ts.map
@@ -1,168 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.ACL_LINK = void 0;
40
- exports.createAclLogic = createAclLogic;
41
- var rdflib_1 = require("rdflib");
42
- var ns_1 = require("../util/ns");
43
- exports.ACL_LINK = (0, rdflib_1.sym)("http://www.iana.org/assignments/link-relations/acl");
44
- function createAclLogic(store) {
45
- var ns = ns_1.ns;
46
- function findAclDocUrl(url) {
47
- return __awaiter(this, void 0, void 0, function () {
48
- var docNode;
49
- return __generator(this, function (_a) {
50
- switch (_a.label) {
51
- case 0: return [4 /*yield*/, store.fetcher.load(url)];
52
- case 1:
53
- _a.sent();
54
- docNode = store.any(url, exports.ACL_LINK);
55
- if (!docNode) {
56
- throw new Error("No ACL link discovered for ".concat(url));
57
- }
58
- return [2 /*return*/, docNode.value];
59
- }
60
- });
61
- });
62
- }
63
- /**
64
- * Simple Access Control
65
- *
66
- * This function sets up a simple default ACL for a resource, with
67
- * RWC for the owner, and a specified access (default none) for the public.
68
- * In all cases owner has read write control.
69
- * Parameter lists modes allowed to public
70
- *
71
- * @param options
72
- * @param options.public eg ['Read', 'Write']
73
- *
74
- * @returns Resolves with aclDoc uri on successful write
75
- */
76
- function setACLUserPublic(docURI, me, options) {
77
- var aclDoc = store.any(store.sym(docURI), exports.ACL_LINK);
78
- return Promise.resolve()
79
- .then(function () {
80
- if (aclDoc) {
81
- return aclDoc;
82
- }
83
- return fetchACLRel(docURI).catch(function (err) {
84
- throw new Error("Error fetching rel=ACL header for ".concat(docURI, ": ").concat(err));
85
- });
86
- })
87
- .then(function (aclDoc) {
88
- var aclText = genACLText(docURI, me, aclDoc.uri, options);
89
- if (!store.fetcher) {
90
- throw new Error('Cannot PUT this, store has no fetcher');
91
- }
92
- return store.fetcher
93
- .webOperation('PUT', aclDoc.uri, {
94
- data: aclText,
95
- contentType: 'text/turtle'
96
- })
97
- .then(function (result) {
98
- if (!result.ok) {
99
- throw new Error('Error writing ACL text: ' + result.error);
100
- }
101
- return aclDoc;
102
- });
103
- });
104
- }
105
- /**
106
- * @param docURI
107
- * @returns
108
- */
109
- function fetchACLRel(docURI) {
110
- var fetcher = store.fetcher;
111
- if (!fetcher) {
112
- throw new Error('Cannot fetch ACL rel, store has no fetcher');
113
- }
114
- return fetcher.load(docURI).then(function (result) {
115
- if (!result.ok) {
116
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
117
- throw new Error('fetchACLRel: While loading:' + result.error);
118
- }
119
- var aclDoc = store.any(store.sym(docURI), exports.ACL_LINK);
120
- if (!aclDoc) {
121
- throw new Error('fetchACLRel: No Link rel=ACL header for ' + docURI);
122
- }
123
- return aclDoc;
124
- });
125
- }
126
- /**
127
- * @param docURI
128
- * @param me
129
- * @param aclURI
130
- * @param options
131
- *
132
- * @returns Serialized ACL
133
- */
134
- function genACLText(docURI, me, aclURI, options) {
135
- if (options === void 0) { options = {}; }
136
- var optPublic = options.public || [];
137
- var g = (0, rdflib_1.graph)();
138
- var auth = (0, rdflib_1.Namespace)('http://www.w3.org/ns/auth/acl#');
139
- var a = g.sym("".concat(aclURI, "#a1"));
140
- var acl = g.sym(aclURI);
141
- var doc = g.sym(docURI);
142
- g.add(a, ns.rdf('type'), auth('Authorization'), acl);
143
- g.add(a, auth('accessTo'), doc, acl);
144
- if (options.defaultForNew) {
145
- g.add(a, auth('default'), doc, acl);
146
- }
147
- g.add(a, auth('agent'), me, acl);
148
- g.add(a, auth('mode'), auth('Read'), acl);
149
- g.add(a, auth('mode'), auth('Write'), acl);
150
- g.add(a, auth('mode'), auth('Control'), acl);
151
- if (optPublic.length) {
152
- a = g.sym("".concat(aclURI, "#a2"));
153
- g.add(a, ns.rdf('type'), auth('Authorization'), acl);
154
- g.add(a, auth('accessTo'), doc, acl);
155
- g.add(a, auth('agentClass'), ns.foaf('Agent'), acl);
156
- for (var p = 0; p < optPublic.length; p++) {
157
- g.add(a, auth('mode'), auth(optPublic[p]), acl); // Like 'Read' etc
158
- }
159
- }
160
- return (0, rdflib_1.serialize)(acl, g, aclURI);
161
- }
162
- return {
163
- findAclDocUrl: findAclDocUrl,
164
- setACLUserPublic: setACLUserPublic,
165
- genACLText: genACLText
166
- };
167
- }
168
- //# sourceMappingURL=aclLogic.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"aclLogic.js","sourceRoot":"","sources":["../../src/acl/aclLogic.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,wCAkJC;AA3JD,iCAAoE;AAEpE,iCAA4C;AAG/B,QAAA,QAAQ,GAAG,IAAA,YAAG,EACvB,oDAAoD,CACvD,CAAC;AAEF,SAAgB,cAAc,CAAC,KAAK;IAEhC,IAAM,EAAE,GAAG,OAAS,CAAA;IAEpB,SAAe,aAAa,CAAC,GAAc;;;;;4BACvC,qBAAM,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAA;;wBAA7B,SAA6B,CAAC;wBACxB,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,gBAAQ,CAAC,CAAC;wBACzC,IAAI,CAAC,OAAO,EAAE,CAAC;4BACX,MAAM,IAAI,KAAK,CAAC,qCAA8B,GAAG,CAAE,CAAC,CAAC;wBACzD,CAAC;wBACD,sBAAO,OAAO,CAAC,KAAK,EAAC;;;;KACxB;IACD;;;;;;;;;;;;OAYG;IACH,SAAS,gBAAgB,CACzB,MAAc,EACd,EAAa,EACb,OAGC;QAED,IAAM,MAAM,GAAG,KAAK,CAAC,GAAG,CACpB,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,EACjB,gBAAQ,CACX,CAAA;QAED,OAAO,OAAO,CAAC,OAAO,EAAE;aACnB,IAAI,CAAC;YACN,IAAI,MAAM,EAAE,CAAC;gBACT,OAAO,MAAmB,CAAA;YAC9B,CAAC;YAED,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,UAAA,GAAG;gBAChC,MAAM,IAAI,KAAK,CAAC,4CAAqC,MAAM,eAAK,GAAG,CAAE,CAAC,CAAA;YAC1E,CAAC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esModule", { value: true });
3
- exports.authSession = void 0;
4
- var solid_client_authn_browser_1 = require("@inrupt/solid-client-authn-browser");
5
- exports.authSession = new solid_client_authn_browser_1.Session();
6
- //# sourceMappingURL=authSession.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"authSession.js","sourceRoot":"","sources":["../../src/authSession/authSession.ts"],"names":[],"mappings":";;;AAAA,iFAE2C;AAE9B,QAAA,WAAW,GAAG,IAAI,oCAAO,EAAE,CAAA"}
@@ -1,193 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
- return new (P || (P = Promise))(function (resolve, reject) {
38
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
- step((generator = generator.apply(thisArg, _arguments || [])).next());
42
- });
43
- };
44
- var __generator = (this && this.__generator) || function (thisArg, body) {
45
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
46
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
47
- function verb(n) { return function (v) { return step([n, v]); }; }
48
- function step(op) {
49
- if (f) throw new TypeError("Generator is already executing.");
50
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
51
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
52
- if (y = 0, t) op = [op[0] & 2, t.value];
53
- switch (op[0]) {
54
- case 0: case 1: t = op; break;
55
- case 4: _.label++; return { value: op[1], done: false };
56
- case 5: _.label++; y = op[1]; op = [0]; continue;
57
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
58
- default:
59
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
60
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
61
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
62
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
63
- if (t[2]) _.ops.pop();
64
- _.trys.pop(); continue;
65
- }
66
- op = body.call(thisArg, _);
67
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
68
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
69
- }
70
- };
71
- Object.defineProperty(exports, "__esModule", { value: true });
72
- exports.SolidAuthnLogic = void 0;
73
- var rdflib_1 = require("rdflib");
74
- var authUtil_1 = require("./authUtil");
75
- var debug = __importStar(require("../util/debug"));
76
- var solid_client_authn_browser_1 = require("@inrupt/solid-client-authn-browser");
77
- var SolidAuthnLogic = /** @class */ (function () {
78
- function SolidAuthnLogic(solidAuthSession) {
79
- this.session = solidAuthSession;
80
- }
81
- Object.defineProperty(SolidAuthnLogic.prototype, "authSession", {
82
- // we created authSession getter because we want to access it as authn.authSession externally
83
- get: function () { return this.session; },
84
- enumerable: false,
85
- configurable: true
86
- });
87
- SolidAuthnLogic.prototype.currentUser = function () {
88
- var app = (0, authUtil_1.appContext)();
89
- if (app.viewingNoAuthPage) {
90
- return (0, rdflib_1.sym)(app.webId);
91
- }
92
- if (this && this.session && this.session.info && this.session.info.webId && this.session.info.isLoggedIn) {
93
- return (0, rdflib_1.sym)(this.session.info.webId);
94
- }
95
- return (0, authUtil_1.offlineTestID)(); // null unless testing
96
- };
97
- /**
98
- * Retrieves currently logged in webId from either
99
- * defaultTestUser or SolidAuth
100
- * Also activates a session after login
101
- * @param [setUserCallback] Optional callback
102
- * @returns Resolves with webId uri, if no callback provided
103
- */
104
- SolidAuthnLogic.prototype.checkUser = function (setUserCallback) {
105
- return __awaiter(this, void 0, void 0, function () {
106
- var preLoginRedirectHash, redirectUrl, postLoginRedirectHash, curUrl, me, webId;
107
- return __generator(this, function (_a) {
108
- switch (_a.label) {
109
- case 0:
110
- preLoginRedirectHash = new URL(window.location.href).hash;
111
- if (preLoginRedirectHash) {
112
- window.localStorage.setItem('preLoginRedirectHash', preLoginRedirectHash);
113
- }
114
- this.session.events.on(solid_client_authn_browser_1.EVENTS.SESSION_RESTORED, function (url) {
115
- debug.log("Session restored to ".concat(url));
116
- if (document.location.toString() !== url)
117
- history.replaceState(null, '', url);
118
- });
119
- redirectUrl = new URL(window.location.href);
120
- redirectUrl.hash = '';
121
- return [4 /*yield*/, this.session
122
- .handleIncomingRedirect({
123
- restorePreviousSession: true,
124
- url: redirectUrl.href
125
- })
126
- // Check to see if a hash was stored in local storage
127
- ];
128
- case 1:
129
- _a.sent();
130
- postLoginRedirectHash = window.localStorage.getItem('preLoginRedirectHash');
131
- if (postLoginRedirectHash) {
132
- curUrl = new URL(window.location.href);
133
- if (curUrl.hash !== postLoginRedirectHash) {
134
- if (history.pushState) {
135
- // debug.log('Setting window.location.has using pushState')
136
- history.pushState(null, document.title, postLoginRedirectHash);
137
- }
138
- else {
139
- // debug.warn('Setting window.location.has using location.hash')
140
- location.hash = postLoginRedirectHash;
141
- }
142
- curUrl.hash = postLoginRedirectHash;
143
- }
144
- // See https://stackoverflow.com/questions/3870057/how-can-i-update-window-location-hash-without-jumping-the-document
145
- // window.location.href = curUrl.toString()// @@ See https://developer.mozilla.org/en-US/docs/Web/API/Window/location
146
- window.localStorage.setItem('preLoginRedirectHash', '');
147
- }
148
- me = (0, authUtil_1.offlineTestID)();
149
- if (me) {
150
- return [2 /*return*/, Promise.resolve(setUserCallback ? setUserCallback(me) : me)];
151
- }
152
- webId = this.webIdFromSession(this.session.info);
153
- if (webId) {
154
- me = this.saveUser(webId);
155
- }
156
- if (me) {
157
- debug.log("(Logged in as ".concat(me, " by authentication)"));
158
- }
159
- return [2 /*return*/, Promise.resolve(setUserCallback ? setUserCallback(me) : me)];
160
- }
161
- });
162
- });
163
- };
164
- /**
165
- * Saves `webId` in `context.me`
166
- * @param webId
167
- * @param context
168
- *
169
- * @returns Returns the WebID, after setting it
170
- */
171
- SolidAuthnLogic.prototype.saveUser = function (webId, context) {
172
- var webIdUri;
173
- if (webId) {
174
- webIdUri = (typeof webId === 'string') ? webId : webId.uri;
175
- var me = (0, rdflib_1.namedNode)(webIdUri);
176
- if (context) {
177
- context.me = me;
178
- }
179
- return me;
180
- }
181
- return null;
182
- };
183
- /**
184
- * @returns {Promise<string|null>} Resolves with WebID URI or null
185
- */
186
- SolidAuthnLogic.prototype.webIdFromSession = function (session) {
187
- var webId = (session === null || session === void 0 ? void 0 : session.webId) && session.isLoggedIn ? session.webId : null;
188
- return webId;
189
- };
190
- return SolidAuthnLogic;
191
- }());
192
- exports.SolidAuthnLogic = SolidAuthnLogic;
193
- //# sourceMappingURL=SolidAuthnLogic.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SolidAuthnLogic.js","sourceRoot":"","sources":["../../src/authn/SolidAuthnLogic.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAmD;AACnD,uCAAuD;AACvD,mDAAsC;AACtC,iFAAqE;AAGrE;IAGE,yBAAY,gBAAyB;QACnC,IAAI,CAAC,OAAO,GAAG,gBAAgB,CAAC;IAClC,CAAC;IAGD,sBAAI,wCAAW;QADf,6FAA6F;aAC7F,cAA4B,OAAO,IAAI,CAAC,OAAO,CAAA,CAAC,CAAC;;;OAAA;IAEjD,qCAAW,GAAX;QACE,IAAM,GAAG,GAAG,IAAA,qBAAU,GAAE,CAAA;QACxB,IAAI,GAAG,CAAC,iBAAiB,EAAE,CAAC;YAC1B,OAAO,IAAA,YAAG,EAAC,GAAG,CAAC,KAAK,CAAC,CAAA;QACvB,CAAC;QACD,IAAI,IAAI,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;YACzG,OAAO,IAAA,YAAG,EAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QACrC,CAAC;QACD,OAAO,IAAA,wBAAa,GAAE,CAAA,CAAC,sBAAsB;IAC/C,CAAC;IAED;;;;;;OAMG;IACG,mCAAS,GAAf,UACE,eAA6C;;;;;;wB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