solid-ui 2.4.28-df3d9431 → 2.4.28-e581c53c
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/dist/solid-ui.js +318 -248
- package/dist/solid-ui.js.map +1 -1
- package/dist/solid-ui.min.js +1 -1
- package/dist/solid-ui.min.js.map +1 -1
- package/lib/chat/keys.d.ts +0 -3
- package/lib/chat/keys.d.ts.map +1 -1
- package/lib/chat/keys.js +80 -124
- package/lib/chat/keys.js.map +1 -1
- package/lib/chat/message.js +35 -35
- package/lib/chat/message.js.map +1 -1
- package/lib/chat/signature.d.ts +2 -0
- package/lib/chat/signature.d.ts.map +1 -1
- package/lib/chat/signature.js +70 -1
- package/lib/chat/signature.js.map +1 -1
- package/lib/style.js +0 -2
- package/lib/style.js.map +1 -1
- package/lib/utils/keyHelpers/accessData.d.ts +2 -2
- package/lib/utils/keyHelpers/accessData.d.ts.map +1 -1
- package/lib/utils/keyHelpers/accessData.js +131 -51
- package/lib/utils/keyHelpers/accessData.js.map +1 -1
- package/lib/versionInfo.js +2 -2
- package/lib/versionInfo.js.map +1 -1
- package/package.json +1 -3
- package/lib/utils/keyHelpers/otherHelpers.d.ts +0 -3
- package/lib/utils/keyHelpers/otherHelpers.d.ts.map +0 -1
- package/lib/utils/keyHelpers/otherHelpers.js +0 -23
- package/lib/utils/keyHelpers/otherHelpers.js.map +0 -1
|
@@ -14,96 +14,176 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
|
14
14
|
var debug = _interopRequireWildcard(require("../../debug"));
|
|
15
15
|
var _solidLogic = require("solid-logic");
|
|
16
16
|
var ns = _interopRequireWildcard(require("../../ns"));
|
|
17
|
-
var _otherHelpers = require("./otherHelpers");
|
|
18
17
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
18
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
/* export const getPodRoot = async (webId: NamedNode) => {
|
|
20
|
+
const webIdURL = new URL(webId.uri)
|
|
21
|
+
// find storages in webId document
|
|
22
|
+
await store.fetcher.load(webId.uri)
|
|
23
|
+
const storages = store.each(webId, ns.space('storage'), null, webId.doc())
|
|
24
|
+
var podRoot: NamedNode | undefined
|
|
25
|
+
if (!storages?.length) {
|
|
26
|
+
// find storage recursively in webId URL
|
|
27
|
+
let path = webIdURL.pathname
|
|
28
|
+
while (path.length) {
|
|
29
|
+
path = path.substring(0, path.lastIndexOf('/'))
|
|
30
|
+
podRoot = store.sym(webIdURL.origin + path + '/')
|
|
31
|
+
const res = await store.fetcher.webOperation('HEAD', podRoot.uri)
|
|
32
|
+
if (res.headers.get('link')?.includes(ns.space('Storage').value)) break
|
|
33
|
+
if (!path) debug.warn(`Current user storage not found for\n${webId}`)
|
|
34
|
+
}
|
|
35
|
+
} else {
|
|
36
|
+
// give preference to storage in webId root
|
|
37
|
+
podRoot = storages.find((storage) => webIdURL.origin === new URL(storage.value).origin) as NamedNode
|
|
38
|
+
if (!podRoot) podRoot = storages[0] as NamedNode
|
|
27
39
|
}
|
|
28
|
-
|
|
29
|
-
|
|
40
|
+
|
|
41
|
+
return podRoot as NamedNode
|
|
42
|
+
} */
|
|
43
|
+
|
|
44
|
+
var pubKeyUrl = /*#__PURE__*/function () {
|
|
45
|
+
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(webId) {
|
|
46
|
+
var _store$any, _parentSettings;
|
|
47
|
+
var parentSettings;
|
|
48
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
49
|
+
while (1) switch (_context.prev = _context.next) {
|
|
50
|
+
case 0:
|
|
51
|
+
parentSettings = (_store$any = _solidLogic.store.any(webId, ns.space('preferencesFile'), null, webId.doc())) === null || _store$any === void 0 ? void 0 : _store$any.value;
|
|
52
|
+
parentSettings = (_parentSettings = parentSettings) === null || _parentSettings === void 0 ? void 0 : _parentSettings.split('/').slice(0, -2).join('/');
|
|
53
|
+
if (parentSettings) {
|
|
54
|
+
_context.next = 4;
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
throw new Error("prefererencesFile is expected to exist in ".concat(webId.doc));
|
|
58
|
+
case 4:
|
|
59
|
+
return _context.abrupt("return", "".concat(parentSettings, "/profile/keys/publicKey.ttl"));
|
|
60
|
+
case 5:
|
|
61
|
+
case "end":
|
|
62
|
+
return _context.stop();
|
|
63
|
+
}
|
|
64
|
+
}, _callee);
|
|
65
|
+
}));
|
|
66
|
+
return function pubKeyUrl(_x) {
|
|
67
|
+
return _ref.apply(this, arguments);
|
|
68
|
+
};
|
|
69
|
+
}();
|
|
30
70
|
exports.pubKeyUrl = pubKeyUrl;
|
|
31
|
-
|
|
32
|
-
var url;
|
|
33
|
-
try {
|
|
34
|
-
var root = (0, _otherHelpers.getRootIfPreferencesExist)(webId);
|
|
35
|
-
url = "".concat(root, "/keys/privateKey.ttl");
|
|
36
|
-
} catch (err) {
|
|
37
|
-
debug.error(err);
|
|
38
|
-
}
|
|
39
|
-
return url;
|
|
40
|
-
};
|
|
41
|
-
exports.privKeyUrl = privKeyUrl;
|
|
42
|
-
function getExistingPublicKey(_x, _x2) {
|
|
71
|
+
function getExistingPublicKey(_x2, _x3) {
|
|
43
72
|
return _getExistingPublicKey.apply(this, arguments);
|
|
44
73
|
}
|
|
45
74
|
function _getExistingPublicKey() {
|
|
46
|
-
_getExistingPublicKey = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function
|
|
47
|
-
return _regenerator["default"].wrap(function
|
|
48
|
-
while (1) switch (
|
|
75
|
+
_getExistingPublicKey = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(webId, publicKeyUrl) {
|
|
76
|
+
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
77
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
49
78
|
case 0:
|
|
50
|
-
|
|
79
|
+
_context3.next = 2;
|
|
51
80
|
return getKeyIfExists(webId, publicKeyUrl, 'publicKey');
|
|
52
81
|
case 2:
|
|
53
|
-
return
|
|
82
|
+
return _context3.abrupt("return", _context3.sent);
|
|
54
83
|
case 3:
|
|
55
84
|
case "end":
|
|
56
|
-
return
|
|
85
|
+
return _context3.stop();
|
|
57
86
|
}
|
|
58
|
-
},
|
|
87
|
+
}, _callee3);
|
|
59
88
|
}));
|
|
60
89
|
return _getExistingPublicKey.apply(this, arguments);
|
|
61
90
|
}
|
|
62
|
-
function
|
|
91
|
+
var privKeyUrl = /*#__PURE__*/function () {
|
|
92
|
+
var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(webId) {
|
|
93
|
+
var _store$any2, _settings;
|
|
94
|
+
var settings;
|
|
95
|
+
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
96
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
97
|
+
case 0:
|
|
98
|
+
settings = (_store$any2 = _solidLogic.store.any(webId, ns.space('preferencesFile'), null, webId.doc())) === null || _store$any2 === void 0 ? void 0 : _store$any2.value;
|
|
99
|
+
settings = (_settings = settings) === null || _settings === void 0 ? void 0 : _settings.split('/').slice(0, -1).join('/');
|
|
100
|
+
if (settings) {
|
|
101
|
+
_context2.next = 4;
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
throw new Error("prefererencesFile is expected to exist in ".concat(webId.doc));
|
|
105
|
+
case 4:
|
|
106
|
+
return _context2.abrupt("return", "".concat(settings, "/keys/privateKey.ttl"));
|
|
107
|
+
case 5:
|
|
108
|
+
case "end":
|
|
109
|
+
return _context2.stop();
|
|
110
|
+
}
|
|
111
|
+
}, _callee2);
|
|
112
|
+
}));
|
|
113
|
+
return function privKeyUrl(_x4) {
|
|
114
|
+
return _ref2.apply(this, arguments);
|
|
115
|
+
};
|
|
116
|
+
}();
|
|
117
|
+
exports.privKeyUrl = privKeyUrl;
|
|
118
|
+
function getExistingPrivateKey(_x5, _x6) {
|
|
63
119
|
return _getExistingPrivateKey.apply(this, arguments);
|
|
64
120
|
}
|
|
65
121
|
function _getExistingPrivateKey() {
|
|
66
|
-
_getExistingPrivateKey = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function
|
|
67
|
-
return _regenerator["default"].wrap(function
|
|
68
|
-
while (1) switch (
|
|
122
|
+
_getExistingPrivateKey = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(webId, privateKeyUrl) {
|
|
123
|
+
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
124
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
69
125
|
case 0:
|
|
70
|
-
|
|
126
|
+
_context4.next = 2;
|
|
71
127
|
return getKeyIfExists(webId, privateKeyUrl, 'privateKey');
|
|
72
128
|
case 2:
|
|
73
|
-
return
|
|
129
|
+
return _context4.abrupt("return", _context4.sent);
|
|
74
130
|
case 3:
|
|
75
131
|
case "end":
|
|
76
|
-
return
|
|
132
|
+
return _context4.stop();
|
|
77
133
|
}
|
|
78
|
-
},
|
|
134
|
+
}, _callee4);
|
|
79
135
|
}));
|
|
80
136
|
return _getExistingPrivateKey.apply(this, arguments);
|
|
81
137
|
}
|
|
82
|
-
function getKeyIfExists(
|
|
138
|
+
function getKeyIfExists(_x7, _x8, _x9) {
|
|
83
139
|
return _getKeyIfExists.apply(this, arguments);
|
|
84
140
|
}
|
|
85
141
|
function _getKeyIfExists() {
|
|
86
|
-
_getKeyIfExists = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function
|
|
142
|
+
_getKeyIfExists = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(webId, keyUrl, keyType) {
|
|
87
143
|
var key;
|
|
88
|
-
return _regenerator["default"].wrap(function
|
|
89
|
-
while (1) switch (
|
|
144
|
+
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
|
145
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
90
146
|
case 0:
|
|
91
|
-
|
|
92
|
-
|
|
147
|
+
_context5.prev = 0;
|
|
148
|
+
_context5.next = 3;
|
|
93
149
|
return _solidLogic.store.fetcher.load(keyUrl);
|
|
94
150
|
case 3:
|
|
95
151
|
key = _solidLogic.store.any(webId, ns.solid(keyType)); // store.sym(CERT + keyType))
|
|
96
|
-
return
|
|
152
|
+
return _context5.abrupt("return", key === null || key === void 0 ? void 0 : key.value);
|
|
97
153
|
case 7:
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
154
|
+
_context5.prev = 7;
|
|
155
|
+
_context5.t0 = _context5["catch"](0);
|
|
156
|
+
if (!(_context5.t0.response.status === 404)) {
|
|
157
|
+
_context5.next = 24;
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
debug.log('createIfNotExists: doc does NOT exist, will create... ' + keyUrl);
|
|
161
|
+
_context5.prev = 11;
|
|
162
|
+
_context5.next = 14;
|
|
163
|
+
return _solidLogic.store.fetcher.webOperation('PUT', keyUrl, {
|
|
164
|
+
data: '',
|
|
165
|
+
contentType: 'text/turtle'
|
|
166
|
+
});
|
|
167
|
+
case 14:
|
|
168
|
+
_context5.next = 20;
|
|
169
|
+
break;
|
|
170
|
+
case 16:
|
|
171
|
+
_context5.prev = 16;
|
|
172
|
+
_context5.t1 = _context5["catch"](11);
|
|
173
|
+
debug.log('createIfNotExists doc FAILED: ' + keyUrl + ': ' + _context5.t1);
|
|
174
|
+
throw _context5.t1;
|
|
175
|
+
case 20:
|
|
176
|
+
delete _solidLogic.store.fetcher.requested[keyUrl]; // delete cached 404 error
|
|
177
|
+
// debug.log('createIfNotExists doc created ok ' + doc)
|
|
178
|
+
return _context5.abrupt("return", undefined);
|
|
179
|
+
case 24:
|
|
180
|
+
debug.log('createIfNotExists doc FAILED: ' + keyUrl + ': ' + _context5.t0);
|
|
181
|
+
throw _context5.t0;
|
|
182
|
+
case 26:
|
|
103
183
|
case "end":
|
|
104
|
-
return
|
|
184
|
+
return _context5.stop();
|
|
105
185
|
}
|
|
106
|
-
},
|
|
186
|
+
}, _callee5, null, [[0, 7], [11, 16]]);
|
|
107
187
|
}));
|
|
108
188
|
return _getKeyIfExists.apply(this, arguments);
|
|
109
189
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accessData.js","names":["debug","_interopRequireWildcard","require","_solidLogic","ns","_otherHelpers","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","pubKeyUrl","webId","url","root","getRootIfPreferencesExist","concat","err","error","exports","privKeyUrl","getExistingPublicKey","_x","_x2","_getExistingPublicKey","apply","arguments","_asyncToGenerator2","_regenerator","mark","_callee","publicKeyUrl","wrap","_callee$","_context","prev","next","getKeyIfExists","abrupt","sent","stop","getExistingPrivateKey","_x3","_x4","_getExistingPrivateKey","_callee2","privateKeyUrl","_callee2$","_context2","_x5","_x6","_x7","_getKeyIfExists","_callee3","keyUrl","keyType","_callee3$","_context3","store","fetcher","load","any","solid","value","t0","undefined"],"sources":["../../../src/utils/keyHelpers/accessData.ts"],"sourcesContent":["import * as debug from '../../debug'\nimport { store } from 'solid-logic'\nimport * as ns from '../../ns'\nimport { NamedNode } from 'rdflib'\nimport { getRootIfPreferencesExist } from './otherHelpers'\n\nexport const pubKeyUrl = (webId: NamedNode) => {\n let url\n try {\n const root = getRootIfPreferencesExist(webId)\n url = `${root}/profile/keys/publicKey.ttl`\n } catch (err) {\n debug.error(err)\n }\n return url\n}\n\nexport const privKeyUrl = (webId: NamedNode) => {\n let url\n try {\n const root = getRootIfPreferencesExist(webId)\n url = `${root}/keys/privateKey.ttl`\n } catch (err) {\n debug.error(err)\n }\n return url\n}\n\nexport async function getExistingPublicKey (webId: NamedNode, publicKeyUrl: string) {\n return await getKeyIfExists(webId, publicKeyUrl, 'publicKey')\n}\n\nexport async function getExistingPrivateKey (webId: NamedNode, privateKeyUrl: string) {\n return await getKeyIfExists(webId, privateKeyUrl, 'privateKey')\n}\n\ntype KeyType = 'publicKey' | 'privateKey'\n\nexport async function getKeyIfExists (webId: NamedNode, keyUrl: string, keyType: KeyType) {\n try {\n await store.fetcher.load(keyUrl)\n const key = store.any(webId, ns.solid(keyType)) // store.sym(CERT + keyType))\n return key?.value // as NamedNode\n } catch (err) {\n debug.error('createIfNotExists doc FAILED: ' + keyUrl + ': ' + err)\n return undefined\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,EAAA,GAAAH,uBAAA,CAAAC,OAAA;AAEA,IAAAG,aAAA,GAAAH,OAAA;AAA0D,SAAAI,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,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,GAAG,aAAHA,GAAG,uBAAHA,GAAG,CAAE0D,KAAK;QAAA;UAAAN,SAAA,CAAAtB,IAAA;UAAAsB,SAAA,CAAAO,EAAA,GAAAP,SAAA;UAEjB1E,KAAK,CAACmC,KAAK,CAAC,gCAAgC,GAAGoC,MAAM,GAAG,IAAI,GAAAG,SAAA,CAAAO,EAAM,CAAC;UAAA,OAAAP,SAAA,CAAAnB,MAAA,WAC5D2B,SAAS;QAAA;QAAA;UAAA,OAAAR,SAAA,CAAAjB,IAAA;MAAA;IAAA,GAAAa,QAAA;EAAA,CAEnB;EAAA,OAAAD,eAAA,CAAA3B,KAAA,OAAAC,SAAA;AAAA"}
|
|
1
|
+
{"version":3,"file":"accessData.js","names":["debug","_interopRequireWildcard","require","_solidLogic","ns","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","pubKeyUrl","_ref","_asyncToGenerator2","_regenerator","mark","_callee","webId","_store$any","_parentSettings","parentSettings","wrap","_callee$","_context","prev","next","store","any","space","doc","value","split","slice","join","Error","concat","abrupt","stop","_x","apply","arguments","exports","getExistingPublicKey","_x2","_x3","_getExistingPublicKey","_callee3","publicKeyUrl","_callee3$","_context3","getKeyIfExists","sent","privKeyUrl","_ref2","_callee2","_store$any2","_settings","settings","_callee2$","_context2","_x4","getExistingPrivateKey","_x5","_x6","_getExistingPrivateKey","_callee4","privateKeyUrl","_callee4$","_context4","_x7","_x8","_x9","_getKeyIfExists","_callee5","keyUrl","keyType","_callee5$","_context5","fetcher","load","solid","t0","response","status","log","webOperation","data","contentType","t1","requested","undefined"],"sources":["../../../src/utils/keyHelpers/accessData.ts"],"sourcesContent":["import * as debug from '../../debug'\nimport { store } from 'solid-logic'\nimport * as ns from '../../ns'\nimport { NamedNode } from 'rdflib'\n\n/* export const getPodRoot = async (webId: NamedNode) => {\n const webIdURL = new URL(webId.uri)\n // find storages in webId document\n await store.fetcher.load(webId.uri)\n const storages = store.each(webId, ns.space('storage'), null, webId.doc())\n var podRoot: NamedNode | undefined\n if (!storages?.length) {\n // find storage recursively in webId URL\n let path = webIdURL.pathname\n while (path.length) {\n path = path.substring(0, path.lastIndexOf('/'))\n podRoot = store.sym(webIdURL.origin + path + '/')\n const res = await store.fetcher.webOperation('HEAD', podRoot.uri)\n if (res.headers.get('link')?.includes(ns.space('Storage').value)) break\n if (!path) debug.warn(`Current user storage not found for\\n${webId}`)\n }\n } else {\n // give preference to storage in webId root\n podRoot = storages.find((storage) => webIdURL.origin === new URL(storage.value).origin) as NamedNode\n if (!podRoot) podRoot = storages[0] as NamedNode\n }\n\n return podRoot as NamedNode\n} */\n\nexport const pubKeyUrl = async (webId: NamedNode) => {\n let parentSettings = store.any(webId, ns.space('preferencesFile'), null, webId.doc())?.value\n parentSettings = parentSettings?.split('/').slice(0, -2).join('/')\n if (!parentSettings) throw new Error(`prefererencesFile is expected to exist in ${webId.doc}`)\n return `${parentSettings}/profile/keys/publicKey.ttl`\n /* try {\n return (await getPodRoot(webId)).value + 'profile/keys/publicKey.ttl'\n } catch (err) { throw new Error(err) } */\n}\n\nexport async function getExistingPublicKey (webId: NamedNode, publicKeyUrl: string) {\n // find publickey\n return await getKeyIfExists(webId, publicKeyUrl, 'publicKey')\n}\n\nexport const privKeyUrl = async (webId: NamedNode) => {\n let settings = store.any(webId, ns.space('preferencesFile'), null, webId.doc())?.value\n settings = settings?.split('/').slice(0, -1).join('/')\n if (!settings) throw new Error(`prefererencesFile is expected to exist in ${webId.doc}`)\n return `${settings}/keys/privateKey.ttl`\n /* try {\n const podRoot = await getPodRoot(webId)\n if (!settings?.startsWith(podRoot.value)) throw new Error(`/settings/ is expected to be in ${podRoot.value}`)\n return `${settings}/keys/privateKey.ttl`\n } catch (err) { throw new Error(err) } */\n}\n\nexport async function getExistingPrivateKey (webId: NamedNode, privateKeyUrl: string) {\n // find privateKey\n return await getKeyIfExists(webId, privateKeyUrl, 'privateKey')\n}\n\ntype KeyType = 'publicKey' | 'privateKey'\n\nexport async function getKeyIfExists (webId: NamedNode, keyUrl: string, keyType: KeyType) {\n try {\n await store.fetcher.load(keyUrl)\n const key = store.any(webId, ns.solid(keyType)) // store.sym(CERT + keyType))\n return key?.value // as NamedNode\n } catch (err) {\n if (err.response.status === 404) {\n debug.log(\n 'createIfNotExists: doc does NOT exist, will create... ' + keyUrl\n )\n try {\n await store.fetcher.webOperation('PUT', keyUrl, {\n data: '',\n contentType: 'text/turtle'\n })\n } catch (err) {\n debug.log('createIfNotExists doc FAILED: ' + keyUrl + ': ' + err)\n throw err\n }\n delete store.fetcher.requested[keyUrl] // delete cached 404 error\n // debug.log('createIfNotExists doc created ok ' + doc)\n return undefined // response\n } else {\n debug.log('createIfNotExists doc FAILED: ' + keyUrl + ': ' + err)\n throw err\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,EAAA,GAAAH,uBAAA,CAAAC,OAAA;AAA8B,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAL,wBAAAS,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,aAAAE,OAAA,CAAAF,GAAA,yBAAAA,GAAA,uCAAAA,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,M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versionInfo = {
|
|
8
|
-
buildTime: '2023-06-
|
|
9
|
-
commit: '
|
|
8
|
+
buildTime: '2023-06-20T22:08:42Z',
|
|
9
|
+
commit: 'e581c53c2db1fb41eb0f46072e3abe522816d159',
|
|
10
10
|
npmInfo: {
|
|
11
11
|
'solid-ui': '2.4.28',
|
|
12
12
|
npm: '8.19.4',
|
package/lib/versionInfo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versionInfo.js","names":["versionInfo","buildTime","commit","npmInfo","npm","node","v8","uv","zlib","brotli","ares","modules","nghttp2","napi","llhttp","openssl","cldr","icu","tz","unicode","ngtcp2","nghttp3","exports"],"sources":["../src/versionInfo.ts"],"sourcesContent":["export const versionInfo = {\n buildTime: '2023-06-
|
|
1
|
+
{"version":3,"file":"versionInfo.js","names":["versionInfo","buildTime","commit","npmInfo","npm","node","v8","uv","zlib","brotli","ares","modules","nghttp2","napi","llhttp","openssl","cldr","icu","tz","unicode","ngtcp2","nghttp3","exports"],"sources":["../src/versionInfo.ts"],"sourcesContent":["export const versionInfo = {\n buildTime: '2023-06-20T22:08:42Z',\n commit: 'e581c53c2db1fb41eb0f46072e3abe522816d159',\n npmInfo:\n{\n 'solid-ui': '2.4.28',\n npm: '8.19.4',\n node: '16.20.0',\n v8: '9.4.146.26-node.26',\n uv: '1.43.0',\n zlib: '1.2.11',\n brotli: '1.0.9',\n ares: '1.19.0',\n modules: '93',\n nghttp2: '1.47.0',\n napi: '8',\n llhttp: '6.0.10',\n openssl: '1.1.1t+quic',\n cldr: '41.0',\n icu: '71.1',\n tz: '2022f',\n unicode: '14.0',\n ngtcp2: '0.8.1',\n nghttp3: '0.7.0'\n}\n}\n"],"mappings":";;;;;;AAAO,IAAMA,WAAW,GAAG;EACzBC,SAAS,EAAE,sBAAsB;EACjCC,MAAM,EAAE,0CAA0C;EAClDC,OAAO,EACT;IACE,UAAU,EAAE,QAAQ;IACpBC,GAAG,EAAE,QAAQ;IACbC,IAAI,EAAE,SAAS;IACfC,EAAE,EAAE,oBAAoB;IACxBC,EAAE,EAAE,QAAQ;IACZC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE,OAAO;IACfC,IAAI,EAAE,QAAQ;IACdC,OAAO,EAAE,IAAI;IACbC,OAAO,EAAE,QAAQ;IACjBC,IAAI,EAAE,GAAG;IACTC,MAAM,EAAE,QAAQ;IAChBC,OAAO,EAAE,aAAa;IACtBC,IAAI,EAAE,MAAM;IACZC,GAAG,EAAE,MAAM;IACXC,EAAE,EAAE,OAAO;IACXC,OAAO,EAAE,MAAM;IACfC,MAAM,EAAE,OAAO;IACfC,OAAO,EAAE;EACX;AACA,CAAC;AAAAC,OAAA,CAAAtB,WAAA,GAAAA,WAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "solid-ui",
|
|
3
|
-
"version": "2.4.28-
|
|
3
|
+
"version": "2.4.28-e581c53c",
|
|
4
4
|
"description": "UI library for writing Solid read-write-web applications",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -60,7 +60,6 @@
|
|
|
60
60
|
"acorn": "^7.4.1",
|
|
61
61
|
"escape-html": "^1.0.3",
|
|
62
62
|
"eslint-plugin-n": "^15.6.1",
|
|
63
|
-
"fsevents": "*",
|
|
64
63
|
"i": "^0.3.7",
|
|
65
64
|
"mime-types": "^2.1.35",
|
|
66
65
|
"npm": "^8.19.4",
|
|
@@ -110,7 +109,6 @@
|
|
|
110
109
|
"husky": "^7.0.4",
|
|
111
110
|
"isomorphic-fetch": "^3.0.0",
|
|
112
111
|
"jest": "^27.5.1",
|
|
113
|
-
"jest-environment-jsdom": "^27.5.1",
|
|
114
112
|
"jsdom": "^16.7.0",
|
|
115
113
|
"lint-staged": "^12.5.0",
|
|
116
114
|
"nock": "^13.3.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"otherHelpers.d.ts","sourceRoot":"","sources":["../../../src/utils/keyHelpers/otherHelpers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAIlC,eAAO,MAAM,yBAAyB,UAAW,SAAS,WAKzD,CAAA"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.getRootIfPreferencesExist = void 0;
|
|
8
|
-
var _solidLogic = require("solid-logic");
|
|
9
|
-
var ns = _interopRequireWildcard(require("../../ns"));
|
|
10
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
11
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
12
|
-
// Will rename this file later. We will probably be using solid-logic anyway
|
|
13
|
-
// moved it out so I can mock
|
|
14
|
-
|
|
15
|
-
var getRootIfPreferencesExist = function getRootIfPreferencesExist(webId) {
|
|
16
|
-
var _store$any, _root;
|
|
17
|
-
var root = (_store$any = _solidLogic.store.any(webId, ns.space('preferencesFile'), null, webId.doc())) === null || _store$any === void 0 ? void 0 : _store$any.value;
|
|
18
|
-
root = (_root = root) === null || _root === void 0 ? void 0 : _root.split('/').slice(0, -2).join('/');
|
|
19
|
-
if (!root) throw new Error("prefererencesFile is expected to exist in ".concat(webId));
|
|
20
|
-
return root;
|
|
21
|
-
};
|
|
22
|
-
exports.getRootIfPreferencesExist = getRootIfPreferencesExist;
|
|
23
|
-
//# sourceMappingURL=otherHelpers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"otherHelpers.js","names":["_solidLogic","require","ns","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","getRootIfPreferencesExist","webId","_store$any","_root","root","store","any","space","doc","value","split","slice","join","Error","concat","exports"],"sources":["../../../src/utils/keyHelpers/otherHelpers.ts"],"sourcesContent":["import { store } from 'solid-logic'\nimport * as ns from '../../ns'\nimport { NamedNode } from 'rdflib'\n// Will rename this file later. We will probably be using solid-logic anyway\n// moved it out so I can mock\n\nexport const getRootIfPreferencesExist = (webId: NamedNode) => {\n let root = store.any(webId, ns.space('preferencesFile'), null, webId.doc())?.value\n root = root?.split('/').slice(0, -2).join('/')\n if (!root) throw new Error(`prefererencesFile is expected to exist in ${webId}`)\n return root\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,EAAA,GAAAC,uBAAA,CAAAF,OAAA;AAA8B,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,i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