spec-3nweb-server 1.7.0 → 1.7.5
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/build/3nstorage/3nstorage-app.d.ts +4 -1
- package/build/3nstorage/3nstorage-app.js +18 -9
- package/build/3nstorage/owner.d.ts +3 -2
- package/build/3nstorage/owner.js +39 -32
- package/build/3nstorage/resources/sessions.d.ts +2 -2
- package/build/3nstorage/resources/sessions.js +2 -1
- package/build/3nstorage/resources/store.d.ts +6 -6
- package/build/3nstorage/resources/store.js +3 -12
- package/build/3nstorage/resources/users.d.ts +16 -16
- package/build/3nstorage/resources/users.js +13 -16
- package/build/3nstorage/shared.d.ts +2 -6
- package/build/3nstorage/shared.js +5 -9
- package/build/asmail/asmail-app.d.ts +1 -1
- package/build/asmail/asmail-app.js +3 -3
- package/build/asmail/config.d.ts +2 -6
- package/build/asmail/config.js +20 -12
- package/build/asmail/delivery.d.ts +2 -6
- package/build/asmail/delivery.js +0 -6
- package/build/asmail/resources/delivery-sessions.d.ts +3 -3
- package/build/asmail/resources/delivery-sessions.js +1 -2
- package/build/asmail/resources/inbox.d.ts +26 -35
- package/build/asmail/resources/inbox.js +15 -59
- package/build/asmail/resources/recipients.d.ts +39 -21
- package/build/asmail/resources/recipients.js +62 -22
- package/build/asmail/resources/sessions.d.ts +2 -2
- package/build/asmail/retrieval.d.ts +2 -2
- package/build/asmail/retrieval.js +11 -18
- package/build/asmail/routes/delivery/sender-authorization.d.ts +1 -1
- package/build/asmail/routes/delivery/start-session.d.ts +1 -1
- package/build/config/letsencrypt.d.ts +1 -1
- package/build/config/signup.d.ts +1 -1
- package/build/config/signup.js +2 -1
- package/build/lib-common/assert.js +2 -1
- package/build/lib-common/buffer-utils.js +2 -1
- package/build/lib-common/byte-streaming/common.d.ts +2 -2
- package/build/lib-common/byte-streaming/common.js +16 -16
- package/build/lib-common/bytes-equal.js +2 -1
- package/build/lib-common/exceptions/error.js +2 -1
- package/build/lib-common/exceptions/file.d.ts +1 -1
- package/build/lib-common/exceptions/file.js +2 -1
- package/build/lib-common/exceptions/http.js +2 -1
- package/build/lib-common/ipc/generic-ipc.d.ts +7 -7
- package/build/lib-common/ipc/generic-ipc.js +20 -20
- package/build/lib-common/ipc/ws-ipc.js +2 -1
- package/build/lib-common/json-equal.js +2 -1
- package/build/lib-common/json-utils.js +2 -1
- package/build/lib-common/jwkeys.js +2 -1
- package/build/lib-common/map-of-sets.js +2 -1
- package/build/lib-common/mid-sigs-NaCl-Ed.js +2 -1
- package/build/lib-common/objs-on-disk/file-layout.d.ts +4 -4
- package/build/lib-common/objs-on-disk/file-layout.js +2 -1
- package/build/lib-common/objs-on-disk/obj-file.js +2 -1
- package/build/lib-common/objs-on-disk/utils.d.ts +3 -3
- package/build/lib-common/objs-on-disk/v1-obj-file-format.js +2 -1
- package/build/lib-common/processes.d.ts +1 -1
- package/build/lib-common/processes.js +2 -1
- package/build/lib-common/random-node.js +2 -1
- package/build/lib-common/service-api/3nstorage/owner.d.ts +1 -3
- package/build/lib-common/service-api/3nstorage/owner.js +2 -4
- package/build/lib-common/service-api/asmail/config.d.ts +1 -3
- package/build/lib-common/service-api/asmail/config.js +4 -5
- package/build/lib-common/service-api/asmail/delivery.js +2 -1
- package/build/lib-common/service-api/asmail/retrieval.d.ts +1 -3
- package/build/lib-common/service-api/asmail/retrieval.js +3 -4
- package/build/lib-common/service-api/ipc-api.d.ts +6 -6
- package/build/lib-common/service-api/ipc-api.js +2 -1
- package/build/lib-common/service-api/locker.d.ts +17 -0
- package/build/lib-common/service-api/locker.js +31 -0
- package/build/lib-common/service-api/mailer-id/login.js +2 -1
- package/build/lib-common/service-api/mailer-id/provisioning.d.ts +3 -4
- package/build/lib-common/service-api/mailer-id/provisioning.js +3 -12
- package/build/lib-common/service-api/pub-key-login.js +2 -1
- package/build/lib-common/service-api/web-socket-base.d.ts +1 -1
- package/build/lib-common/service-api/web-socket-base.js +2 -1
- package/build/lib-common/session-encryptor.js +2 -1
- package/build/lib-common/time-window-cache.js +2 -1
- package/build/lib-server/mid-access.d.ts +5 -0
- package/build/lib-server/mid-access.js +28 -0
- package/build/lib-server/middleware/body-parsers.d.ts +7 -7
- package/build/lib-server/middleware/body-parsers.js +14 -14
- package/build/lib-server/middleware/error-handler.d.ts +1 -1
- package/build/lib-server/pkl-access.d.ts +4 -0
- package/build/lib-server/pkl-access.js +28 -0
- package/build/lib-server/resources/dns.d.ts +1 -1
- package/build/lib-server/resources/dns.js +2 -1
- package/build/lib-server/resources/mailerid-authorizer.js +5 -6
- package/build/lib-server/resources/server-data-folders.d.ts +1 -0
- package/build/lib-server/resources/server-data-folders.js +9 -4
- package/build/{mailerId/resources/compute-login-dhshared-key.js → lib-server/resources/server-key-for-pkl-challenge.js} +5 -5
- package/build/lib-server/resources/sessions.d.ts +2 -2
- package/build/lib-server/resources/sessions.js +7 -7
- package/build/lib-server/resources/user-files.d.ts +4 -4
- package/build/lib-server/resources/user-files.js +4 -2
- package/build/lib-server/routes/pub-key-login/start-exchange.d.ts +4 -4
- package/build/lib-server/routes/sessions/close.js +2 -1
- package/build/lib-server/routes/sessions/mid-auth.d.ts +1 -1
- package/build/lib-server/routes/sessions/start.d.ts +4 -4
- package/build/lib-server/web-sockets/app.d.ts +1 -1
- package/build/lib-server/web-sockets/app.js +8 -9
- package/build/lib-server/web-sockets/server-events.d.ts +1 -1
- package/build/lib-server/web-sockets/server-events.js +1 -2
- package/build/lib.d.ts +1 -2
- package/build/lib.js +2 -5
- package/build/locker/locker-app.d.ts +3 -0
- package/build/locker/locker-app.js +41 -0
- package/build/locker/resources/lockers.d.ts +0 -0
- package/build/{lib-common/binding.js → locker/resources/lockers.js} +3 -10
- package/build/locker/resources/sessions.d.ts +9 -0
- package/build/locker/resources/sessions.js +33 -0
- package/build/locker/routes/create-locker.d.ts +4 -0
- package/build/locker/routes/create-locker.js +37 -0
- package/build/mailerId/mailerId-app.d.ts +1 -1
- package/build/mailerId/mailerId-app.js +12 -11
- package/build/mailerId/resources/certifier.d.ts +1 -1
- package/build/mailerId/resources/sessions.d.ts +1 -1
- package/build/mailerId/routes/certify.js +2 -1
- package/build/main.js +1 -1
- package/build/mock/dns.js +3 -4
- package/build/mock/mock-as-child-proc.js +2 -2
- package/build/mock/node-child-ipc.d.ts +2 -2
- package/build/mock/node-child-ipc.js +2 -1
- package/build/mock/run-in-proc.js +2 -2
- package/build/mock/tls-options.js +2 -1
- package/build/services.d.ts +2 -1
- package/build/services.js +22 -11
- package/build/{admin → signup}/resources/users.d.ts +3 -3
- package/build/{admin → signup}/resources/users.js +3 -4
- package/build/{admin/admin-app.d.ts → signup/signup-app.d.ts} +1 -1
- package/build/{admin/admin-app.js → signup/signup-app.js} +6 -16
- package/build/{admin → signup}/signup-tokens.d.ts +1 -1
- package/package.json +3 -3
- package/build/config/from-env.d.ts +0 -9
- package/build/config/from-env.js +0 -117
- package/build/lib-common/binding.d.ts +0 -1
- package/build/run.d.ts +0 -1
- package/build/run.js +0 -45
- /package/build/{mailerId/resources/compute-login-dhshared-key.d.ts → lib-server/resources/server-key-for-pkl-challenge.d.ts} +0 -0
- /package/build/{admin → signup}/routes/add.d.ts +0 -0
- /package/build/{admin → signup}/routes/add.js +0 -0
- /package/build/{admin → signup}/routes/get-available-addresses.d.ts +0 -0
- /package/build/{admin → signup}/routes/get-available-addresses.js +0 -0
- /package/build/{admin → signup}/routes/get-available-domains.d.ts +0 -0
- /package/build/{admin → signup}/routes/get-available-domains.js +0 -0
- /package/build/{admin → signup}/signup-tokens.js +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type ByteSource = web3n.ByteSource;
|
|
2
2
|
export declare function wrapByteSourceImplementation(src: ByteSource): ByteSource;
|
|
3
|
-
export
|
|
3
|
+
export type ByteSink = web3n.ByteSink;
|
|
4
4
|
export declare function wrapByteSinkImplementation(sink: ByteSink): ByteSink;
|
|
5
5
|
export declare class BytesFIFOBuffer {
|
|
6
6
|
private queue;
|
|
@@ -13,18 +13,18 @@
|
|
|
13
13
|
See the GNU General Public License for more details.
|
|
14
14
|
|
|
15
15
|
You should have received a copy of the GNU General Public License along with
|
|
16
|
-
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
17
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
19
|
exports.sourceFromArray = exports.BytesFIFOBuffer = exports.wrapByteSinkImplementation = exports.wrapByteSourceImplementation = void 0;
|
|
19
|
-
const binding_1 = require("../binding");
|
|
20
20
|
function wrapByteSourceImplementation(src) {
|
|
21
21
|
const wrap = {
|
|
22
|
-
read:
|
|
23
|
-
getSize:
|
|
22
|
+
read: src.read.bind(src),
|
|
23
|
+
getSize: src.getSize.bind(src)
|
|
24
24
|
};
|
|
25
25
|
if (src.seek) {
|
|
26
|
-
wrap.seek =
|
|
27
|
-
wrap.getPosition =
|
|
26
|
+
wrap.seek = src.seek.bind(src);
|
|
27
|
+
wrap.getPosition = src.getPosition.bind(src);
|
|
28
28
|
}
|
|
29
29
|
wrap.$_transferrable_type_id_$ = 'ByteSource';
|
|
30
30
|
return wrap;
|
|
@@ -32,30 +32,30 @@ function wrapByteSourceImplementation(src) {
|
|
|
32
32
|
exports.wrapByteSourceImplementation = wrapByteSourceImplementation;
|
|
33
33
|
function wrapByteSinkImplementation(sink) {
|
|
34
34
|
const wrap = {
|
|
35
|
-
setSize:
|
|
36
|
-
write:
|
|
37
|
-
getSize:
|
|
35
|
+
setSize: sink.setSize.bind(sink),
|
|
36
|
+
write: sink.write.bind(sink),
|
|
37
|
+
getSize: sink.getSize.bind(sink)
|
|
38
38
|
};
|
|
39
39
|
if (sink.seek) {
|
|
40
|
-
wrap.seek =
|
|
41
|
-
wrap.getPosition =
|
|
40
|
+
wrap.seek = sink.seek.bind(sink);
|
|
41
|
+
wrap.getPosition = sink.getPosition.bind(sink);
|
|
42
42
|
}
|
|
43
43
|
wrap.$_transferrable_type_id_$ = 'ByteSink';
|
|
44
44
|
return wrap;
|
|
45
45
|
}
|
|
46
46
|
exports.wrapByteSinkImplementation = wrapByteSinkImplementation;
|
|
47
47
|
class BytesFIFOBuffer {
|
|
48
|
-
constructor() {
|
|
49
|
-
this.queue = [];
|
|
50
|
-
this.bytesLen = 0;
|
|
51
|
-
Object.seal(this);
|
|
52
|
-
}
|
|
53
48
|
get length() {
|
|
54
49
|
return this.bytesLen;
|
|
55
50
|
}
|
|
56
51
|
get queueLength() {
|
|
57
52
|
return this.queue.length;
|
|
58
53
|
}
|
|
54
|
+
constructor() {
|
|
55
|
+
this.queue = [];
|
|
56
|
+
this.bytesLen = 0;
|
|
57
|
+
Object.seal(this);
|
|
58
|
+
}
|
|
59
59
|
clear() {
|
|
60
60
|
this.queue = [];
|
|
61
61
|
this.bytesLen = 0;
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
See the GNU General Public License for more details.
|
|
14
14
|
|
|
15
15
|
You should have received a copy of the GNU General Public License along with
|
|
16
|
-
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
17
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
19
|
exports.bytesEqual = void 0;
|
|
19
20
|
function bytesEqual(a, b) {
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
See the GNU General Public License for more details.
|
|
14
14
|
|
|
15
15
|
You should have received a copy of the GNU General Public License along with
|
|
16
|
-
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
17
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
19
|
exports.stringifyErr = exports.errWithCause = void 0;
|
|
19
20
|
function errWithCause(cause, message) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const fileExceptionType = "file";
|
|
2
2
|
export declare const Code: web3n.files.exceptionCode;
|
|
3
|
-
export
|
|
3
|
+
export type FileException = web3n.files.FileException;
|
|
4
4
|
export declare function makeFileException(code: string | undefined, path: string, cause?: any): FileException;
|
|
5
5
|
export declare function maskPathInExc(pathPrefixMaskLen: number, exc: any): FileException;
|
|
6
6
|
export declare function ensureCorrectFS(fs: web3n.files.FS, type: web3n.files.FSType, writable: boolean): void;
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
See the GNU General Public License for more details.
|
|
14
14
|
|
|
15
15
|
You should have received a copy of the GNU General Public License along with
|
|
16
|
-
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
17
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
19
|
exports.ensureCorrectFS = exports.maskPathInExc = exports.makeFileException = exports.Code = exports.fileExceptionType = void 0;
|
|
19
20
|
exports.fileExceptionType = 'file';
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
See the GNU General Public License for more details.
|
|
14
14
|
|
|
15
15
|
You should have received a copy of the GNU General Public License along with
|
|
16
|
-
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
17
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
19
|
exports.makeHTTPException = exports.makeConnectionException = void 0;
|
|
19
20
|
function makeConnectionException(url, method, msg, cause) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Envelope } from '../service-api/ipc-api';
|
|
2
2
|
export { Envelope, EventEnvelope, EventEndEnvelope, EventException, RequestEnvelope, ReplyEnvelope } from '../service-api/ipc-api';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
3
|
+
export type RequestHandler<TReq, TRes> = web3n.ipc.RequestHandler<TReq, TRes>;
|
|
4
|
+
export type RequestingClient = web3n.ipc.RequestingClient;
|
|
5
|
+
export type RequestServer = web3n.ipc.RequestServer;
|
|
6
|
+
export type EventfulServer = web3n.ipc.EventfulServer;
|
|
7
|
+
export type SubscribingClient = web3n.ipc.SubscribingClient;
|
|
8
|
+
export type Observer<T> = web3n.Observer<T>;
|
|
9
|
+
export type RawDuplex<T> = web3n.ipc.RawDuplex<T>;
|
|
10
10
|
export declare function makeRequestingClient(channel: string | undefined, comm: RawDuplex<Envelope>): RequestingClient;
|
|
11
11
|
export declare function makeRequestServer(channel: string | undefined, comm: RawDuplex<Envelope>): RequestServer;
|
|
12
12
|
export declare function makeEventfulServer(channel: string | undefined, comm: RawDuplex<Envelope>): EventfulServer;
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
See the GNU General Public License for more details.
|
|
14
14
|
|
|
15
15
|
You should have received a copy of the GNU General Public License along with
|
|
16
|
-
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
17
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
19
|
exports.SingleObserverWrap = exports.MultiObserverWrap = exports.makeSubscribingClient = exports.makeEventfulServer = exports.makeRequestServer = exports.makeRequestingClient = void 0;
|
|
19
20
|
const ipc_api_1 = require("../service-api/ipc-api");
|
|
20
|
-
const binding_1 = require("../binding");
|
|
21
21
|
const map_of_sets_1 = require("../map-of-sets");
|
|
22
22
|
const processes_1 = require("../processes");
|
|
23
23
|
function toTransferrableError(e) {
|
|
@@ -159,8 +159,8 @@ class RequestingSide extends MessageHandler {
|
|
|
159
159
|
wrap() {
|
|
160
160
|
const w = {
|
|
161
161
|
makeRequest: this.makeRequest.bind(this),
|
|
162
|
-
close:
|
|
163
|
-
on:
|
|
162
|
+
close: this.close.bind(this),
|
|
163
|
+
on: this.on.bind(this)
|
|
164
164
|
};
|
|
165
165
|
return Object.freeze(w);
|
|
166
166
|
}
|
|
@@ -261,10 +261,10 @@ class ReplyingSide extends MessageHandler {
|
|
|
261
261
|
}
|
|
262
262
|
wrap() {
|
|
263
263
|
const w = {
|
|
264
|
-
addHandler:
|
|
265
|
-
notifyOfProgressOnRequest:
|
|
266
|
-
close:
|
|
267
|
-
on:
|
|
264
|
+
addHandler: this.addHandler.bind(this),
|
|
265
|
+
notifyOfProgressOnRequest: this.notifyOfProgressOnRequest.bind(this),
|
|
266
|
+
close: this.close.bind(this),
|
|
267
|
+
on: this.on.bind(this)
|
|
268
268
|
};
|
|
269
269
|
return Object.freeze(w);
|
|
270
270
|
}
|
|
@@ -287,8 +287,8 @@ class EventsSendingSide extends ReplyingSide {
|
|
|
287
287
|
super(channel, comm);
|
|
288
288
|
this.subscriptionGroups = [];
|
|
289
289
|
this.subscribedEvents = new Set();
|
|
290
|
-
this.addHandler(ipc_api_1.events.subscribe.REQ_NAME,
|
|
291
|
-
this.addHandler(ipc_api_1.events.unsubscribe.REQ_NAME,
|
|
290
|
+
this.addHandler(ipc_api_1.events.subscribe.REQ_NAME, this.handleSubscribe.bind(this));
|
|
291
|
+
this.addHandler(ipc_api_1.events.unsubscribe.REQ_NAME, this.handleUnsubscribe.bind(this));
|
|
292
292
|
}
|
|
293
293
|
findGroup(eventChannel) {
|
|
294
294
|
for (const gr of this.subscriptionGroups) {
|
|
@@ -373,9 +373,9 @@ class EventsSendingSide extends ReplyingSide {
|
|
|
373
373
|
notifyOfProgressOnRequest: reqServer.notifyOfProgressOnRequest,
|
|
374
374
|
close: reqServer.close,
|
|
375
375
|
on: reqServer.on,
|
|
376
|
-
addEventGroup:
|
|
377
|
-
sendEvent:
|
|
378
|
-
endEvent:
|
|
376
|
+
addEventGroup: this.addEventGroup.bind(this),
|
|
377
|
+
sendEvent: this.sendEvent.bind(this),
|
|
378
|
+
endEvent: this.endEvent.bind(this)
|
|
379
379
|
};
|
|
380
380
|
return Object.freeze(w);
|
|
381
381
|
}
|
|
@@ -536,7 +536,7 @@ class EventsReceivingSide extends RequestingSide {
|
|
|
536
536
|
makeRequest: reqClient.makeRequest,
|
|
537
537
|
close: reqClient.close,
|
|
538
538
|
on: reqClient.on,
|
|
539
|
-
subscribe:
|
|
539
|
+
subscribe: this.subscribe.bind(this)
|
|
540
540
|
};
|
|
541
541
|
return Object.freeze(w);
|
|
542
542
|
}
|
|
@@ -586,14 +586,14 @@ function makeSubscribingClient(channel, comm) {
|
|
|
586
586
|
}
|
|
587
587
|
exports.makeSubscribingClient = makeSubscribingClient;
|
|
588
588
|
class MultiObserverWrap {
|
|
589
|
+
get done() {
|
|
590
|
+
return this.isDone;
|
|
591
|
+
}
|
|
589
592
|
constructor() {
|
|
590
593
|
this.isDone = false;
|
|
591
594
|
this.obs = new Set();
|
|
592
595
|
Object.seal(this);
|
|
593
596
|
}
|
|
594
|
-
get done() {
|
|
595
|
-
return this.isDone;
|
|
596
|
-
}
|
|
597
597
|
add(obs) {
|
|
598
598
|
if (this.isDone) {
|
|
599
599
|
throw new Error(`Cannot add observer, as this source is already done`);
|
|
@@ -645,15 +645,15 @@ exports.MultiObserverWrap = MultiObserverWrap;
|
|
|
645
645
|
Object.freeze(MultiObserverWrap.prototype);
|
|
646
646
|
Object.freeze(MultiObserverWrap);
|
|
647
647
|
class SingleObserverWrap {
|
|
648
|
+
get done() {
|
|
649
|
+
return this.isDone;
|
|
650
|
+
}
|
|
648
651
|
constructor() {
|
|
649
652
|
this.isDone = false;
|
|
650
653
|
this.obs = undefined;
|
|
651
654
|
this.detach = () => this.setDone();
|
|
652
655
|
Object.seal(this);
|
|
653
656
|
}
|
|
654
|
-
get done() {
|
|
655
|
-
return this.isDone;
|
|
656
|
-
}
|
|
657
657
|
set(obs) {
|
|
658
658
|
if (this.isDone) {
|
|
659
659
|
throw new Error(`Cannot add observer, as this source is already done`);
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
See the GNU General Public License for more details.
|
|
14
14
|
|
|
15
15
|
You should have received a copy of the GNU General Public License along with
|
|
16
|
-
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
17
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
19
|
exports.makeSubscriber = exports.makeJsonCommPoint = exports.makeEventfulServer = void 0;
|
|
19
20
|
const generic_ipc_1 = require("./generic-ipc");
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
See the GNU General Public License for more details.
|
|
14
14
|
|
|
15
15
|
You should have received a copy of the GNU General Public License along with
|
|
16
|
-
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
17
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
19
|
exports.deepEqual = void 0;
|
|
19
20
|
/**
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
See the GNU General Public License for more details.
|
|
14
14
|
|
|
15
15
|
You should have received a copy of the GNU General Public License along with
|
|
16
|
-
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
17
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
19
|
exports.applyChangesToJSON = exports.deepFind = exports.deepEqual = exports.copy = void 0;
|
|
19
20
|
/**
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
See the GNU General Public License for more details.
|
|
14
14
|
|
|
15
15
|
You should have received a copy of the GNU General Public License along with
|
|
16
|
-
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
17
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
19
|
exports.isLikeSignedMailerIdAssertion = exports.isLikeMailerIdAssertion = exports.use = exports.getPrincipalAddress = exports.getPubKey = exports.getKeyCert = exports.keyToJson = exports.keyFromJson = exports.isLikeSignedKeyCert = exports.isLikeKeyCert = exports.isLikeSignedLoad = exports.isLikeJsonKey = void 0;
|
|
19
20
|
/**
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
See the GNU General Public License for more details.
|
|
14
14
|
|
|
15
15
|
You should have received a copy of the GNU General Public License along with
|
|
16
|
-
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
17
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
19
|
exports.MapOfSets = void 0;
|
|
19
20
|
class MapOfSets {
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
See the GNU General Public License for more details.
|
|
14
14
|
|
|
15
15
|
You should have received a copy of the GNU General Public License along with
|
|
16
|
-
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
17
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
19
|
exports.user = exports.relyingParty = exports.idProvider = exports.makeMalformedCertsException = exports.exceptionType = exports.KEY_USE = void 0;
|
|
19
20
|
/**
|
|
@@ -4,10 +4,10 @@ export interface HeaderChunkInfo {
|
|
|
4
4
|
len: number;
|
|
5
5
|
fileOfs: number;
|
|
6
6
|
}
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
7
|
+
export type NotOnDiskFiniteChunk = NewSegsChunk | BaseSegsChunk;
|
|
8
|
+
export type OnDiskChunk = NewSegsChunkOnDisk | BaseSegsChunkOnDisk;
|
|
9
|
+
export type FiniteSegsChunk = OnDiskChunk | NotOnDiskFiniteChunk;
|
|
10
|
+
export type SegsChunk = OnDiskChunk | NotOnDiskFiniteChunk | NewEndlessSegsChunk;
|
|
11
11
|
export interface FiniteChunk {
|
|
12
12
|
thisVerOfs: number;
|
|
13
13
|
len: number;
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
See the GNU General Public License for more details.
|
|
14
14
|
|
|
15
15
|
You should have received a copy of the GNU General Public License along with
|
|
16
|
-
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
17
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
19
|
exports.ObjVersionBytesLayout = void 0;
|
|
19
20
|
const v1_obj_file_format_1 = require("./v1-obj-file-format");
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
See the GNU General Public License for more details.
|
|
14
14
|
|
|
15
15
|
You should have received a copy of the GNU General Public License along with
|
|
16
|
-
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
17
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
19
|
exports.ObjVersionFile = void 0;
|
|
19
20
|
const fs = require("../async-fs-node");
|
|
@@ -14,10 +14,10 @@ export interface ChunkWithSegs {
|
|
|
14
14
|
len: number;
|
|
15
15
|
segsOfs: number;
|
|
16
16
|
}
|
|
17
|
-
export
|
|
17
|
+
export type Chunk = ChunkWithHeader | ChunkWithSegs;
|
|
18
18
|
export declare function streamToObjFile(file: ObjVersionFile, content: Chunk[], src: Readable, maxBufferLen: number): Promise<void>;
|
|
19
19
|
export declare function chunksInOrderedStream(len: number, headerLen: undefined | number, segsOfs: number): Chunk[];
|
|
20
|
-
export
|
|
21
|
-
export
|
|
20
|
+
export type ObjPipe = (outStream: NodeJS.WritableStream) => Promise<void>;
|
|
21
|
+
export type GetObjFile = (objId: string | null, version: number) => Promise<ObjVersionFile>;
|
|
22
22
|
export declare function makeObjPipe(file: ObjVersionFile, header: boolean, segsOfs: number, segsLen: number, objId: string | null, getObjFile: GetObjFile): ObjPipe;
|
|
23
23
|
export declare function makeNoBaseObjPipe(file: ObjVersionFile, header: boolean, segsOfs: number, segsLen: number): ObjPipe;
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
See the GNU General Public License for more details.
|
|
14
14
|
|
|
15
15
|
You should have received a copy of the GNU General Public License along with
|
|
16
|
-
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
17
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
19
|
exports.layoutV1 = exports.uintFrom8Bytes = exports.uintTo8Bytes = exports.V1_FILE_START = void 0;
|
|
19
20
|
exports.V1_FILE_START = Buffer.from('1xsp', 'utf8');
|
|
@@ -29,7 +29,7 @@ export declare function finalizeAsync<T>(promise: Promise<T>, fin: () => Promise
|
|
|
29
29
|
* later time. Scheduler needs a not-yet-started activity, as scheduler has
|
|
30
30
|
* control action's start.
|
|
31
31
|
*/
|
|
32
|
-
export
|
|
32
|
+
export type Action<T> = () => Promise<T>;
|
|
33
33
|
/**
|
|
34
34
|
* This is a container of processes, labeled by some ids. It allows to track if
|
|
35
35
|
* there is a process already in progress with a given id. And, it allows to
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
See the GNU General Public License for more details.
|
|
14
14
|
|
|
15
15
|
You should have received a copy of the GNU General Public License along with
|
|
16
|
-
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
17
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
19
|
exports.PressureValve = exports.defer = exports.makeReadWriteLock = exports.makeLock = exports.SingleCyclicProc = exports.makeSyncedFunc = exports.SingleProc = exports.NamedProcs = exports.finalizeAsync = exports.finalize = exports.sleep = void 0;
|
|
19
20
|
const error_1 = require("./exceptions/error");
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
See the GNU General Public License for more details.
|
|
14
14
|
|
|
15
15
|
You should have received a copy of the GNU General Public License along with
|
|
16
|
-
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
17
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
19
|
exports.stringOfB64Chars = exports.stringOfB64UrlSafeChars = exports.stringOfB64CharsSync = exports.stringOfB64UrlSafeCharsSync = exports.uint48 = exports.uint48Sync = exports.uint8 = exports.uint8Sync = exports.bytes = exports.bytesSync = void 0;
|
|
19
20
|
const buffer_utils_1 = require("./buffer-utils");
|
|
@@ -17,9 +17,7 @@ export declare const HTTP_HEADER: {
|
|
|
17
17
|
};
|
|
18
18
|
export declare const BIN_TYPE = "application/octet-stream";
|
|
19
19
|
export declare namespace midLogin {
|
|
20
|
-
const
|
|
21
|
-
const START_URL_END: string;
|
|
22
|
-
const AUTH_URL_END: string;
|
|
20
|
+
const URL_PART = "login/mailerid/";
|
|
23
21
|
}
|
|
24
22
|
export declare namespace closeSession {
|
|
25
23
|
const URL_END = "session/close";
|
|
@@ -44,11 +44,9 @@ Object.freeze(exports.HTTP_HEADER);
|
|
|
44
44
|
exports.BIN_TYPE = 'application/octet-stream';
|
|
45
45
|
var midLogin;
|
|
46
46
|
(function (midLogin) {
|
|
47
|
-
midLogin.
|
|
48
|
-
midLogin.START_URL_END = midLogin.MID_URL_PART + midApi.startSession.URL_END;
|
|
49
|
-
midLogin.AUTH_URL_END = midLogin.MID_URL_PART + midApi.authSession.URL_END;
|
|
47
|
+
midLogin.URL_PART = 'login/mailerid/';
|
|
50
48
|
})(midLogin = exports.midLogin || (exports.midLogin = {}));
|
|
51
|
-
Object.freeze(
|
|
49
|
+
Object.freeze(closeSession);
|
|
52
50
|
var closeSession;
|
|
53
51
|
(function (closeSession) {
|
|
54
52
|
closeSession.URL_END = 'session/close';
|
|
@@ -11,9 +11,7 @@ export declare const PARAM_SC: {
|
|
|
11
11
|
ok: number;
|
|
12
12
|
};
|
|
13
13
|
export declare namespace midLogin {
|
|
14
|
-
const
|
|
15
|
-
const START_URL_END: string;
|
|
16
|
-
const AUTH_URL_END: string;
|
|
14
|
+
const URL_PART = "login/mailerid/";
|
|
17
15
|
}
|
|
18
16
|
export declare namespace closeSession {
|
|
19
17
|
const URL_END = "close-session";
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
See the GNU General Public License for more details.
|
|
14
14
|
|
|
15
15
|
You should have received a copy of the GNU General Public License along with
|
|
16
|
-
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
17
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
19
|
exports.p = exports.closeSession = exports.midLogin = exports.PARAM_SC = exports.ERR_SC = void 0;
|
|
19
20
|
const midApi = require("../mailer-id/login");
|
|
@@ -29,11 +30,9 @@ exports.PARAM_SC = {
|
|
|
29
30
|
Object.freeze(exports.PARAM_SC);
|
|
30
31
|
var midLogin;
|
|
31
32
|
(function (midLogin) {
|
|
32
|
-
midLogin.
|
|
33
|
-
midLogin.START_URL_END = midLogin.MID_URL_PART + midApi.startSession.URL_END;
|
|
34
|
-
midLogin.AUTH_URL_END = midLogin.MID_URL_PART + midApi.authSession.URL_END;
|
|
33
|
+
midLogin.URL_PART = 'login/mailerid/';
|
|
35
34
|
})(midLogin = exports.midLogin || (exports.midLogin = {}));
|
|
36
|
-
Object.freeze(
|
|
35
|
+
Object.freeze(closeSession);
|
|
37
36
|
var closeSession;
|
|
38
37
|
(function (closeSession) {
|
|
39
38
|
closeSession.URL_END = 'close-session';
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
See the GNU General Public License for more details.
|
|
14
14
|
|
|
15
15
|
You should have received a copy of the GNU General Public License along with
|
|
16
|
-
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
17
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
19
|
exports.completion = exports.msgObj = exports.msgMeta = exports.initPubKey = exports.authSender = exports.sessionRestart = exports.sessionStart = exports.preFlight = exports.ERR_SC = exports.HTTP_HEADER = void 0;
|
|
19
20
|
const querystring_1 = require("querystring");
|
|
@@ -12,9 +12,7 @@ export declare const ERR_SC: {
|
|
|
12
12
|
server: number;
|
|
13
13
|
};
|
|
14
14
|
export declare namespace midLogin {
|
|
15
|
-
const
|
|
16
|
-
const START_URL_END: string;
|
|
17
|
-
const AUTH_URL_END: string;
|
|
15
|
+
const URL_PART = "login/mailerid/";
|
|
18
16
|
}
|
|
19
17
|
export declare namespace closeSession {
|
|
20
18
|
const URL_END = "close-session";
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
See the GNU General Public License for more details.
|
|
14
14
|
|
|
15
15
|
You should have received a copy of the GNU General Public License along with
|
|
16
|
-
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
17
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
19
|
exports.msgMainObjRecieved = exports.msgRecievedCompletely = exports.wsEventChannel = exports.msgObj = exports.sanitizedMeta = exports.msgMetadata = exports.rmMsg = exports.listMsgs = exports.closeSession = exports.midLogin = exports.ERR_SC = exports.HTTP_HEADER = exports.BIN_TYPE = void 0;
|
|
19
20
|
/**
|
|
@@ -37,9 +38,7 @@ exports.ERR_SC = {
|
|
|
37
38
|
Object.freeze(exports.ERR_SC);
|
|
38
39
|
var midLogin;
|
|
39
40
|
(function (midLogin) {
|
|
40
|
-
midLogin.
|
|
41
|
-
midLogin.START_URL_END = midLogin.MID_URL_PART + midApi.startSession.URL_END;
|
|
42
|
-
midLogin.AUTH_URL_END = midLogin.MID_URL_PART + midApi.authSession.URL_END;
|
|
41
|
+
midLogin.URL_PART = 'login/mailerid/';
|
|
43
42
|
})(midLogin = exports.midLogin || (exports.midLogin = {}));
|
|
44
43
|
Object.freeze(midLogin);
|
|
45
44
|
var closeSession;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
1
|
+
export type Envelope = web3n.ipc.Envelope;
|
|
2
|
+
export type EventEnvelope<T> = web3n.ipc.EventEnvelope<T>;
|
|
3
|
+
export type EventEndEnvelope = web3n.ipc.EventEndEnvelope;
|
|
4
|
+
export type EventException = web3n.ipc.EventException;
|
|
5
|
+
export type RequestEnvelope<T> = web3n.ipc.RequestEnvelope<T>;
|
|
6
|
+
export type ReplyEnvelope<T> = web3n.ipc.ReplyEnvelope<T>;
|
|
7
7
|
export declare namespace events {
|
|
8
8
|
namespace subscribe {
|
|
9
9
|
const REQ_NAME = "subscribe";
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
See the GNU General Public License for more details.
|
|
14
14
|
|
|
15
15
|
You should have received a copy of the GNU General Public License along with
|
|
16
|
-
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
17
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
19
|
exports.events = void 0;
|
|
19
20
|
var events;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare namespace createLocker {
|
|
2
|
+
const URL_END = "create";
|
|
3
|
+
const method = "PUT";
|
|
4
|
+
interface Request {
|
|
5
|
+
token?: string;
|
|
6
|
+
}
|
|
7
|
+
interface Reply {
|
|
8
|
+
userId: string;
|
|
9
|
+
storageUri: string;
|
|
10
|
+
storageMBs: number;
|
|
11
|
+
willBeRemovedAt: number;
|
|
12
|
+
}
|
|
13
|
+
const SC: {
|
|
14
|
+
ok: number;
|
|
15
|
+
invalidToken: number;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
Copyright (C) 2024 3NSoft Inc.
|
|
4
|
+
|
|
5
|
+
This program is free software: you can redistribute it and/or modify it under
|
|
6
|
+
the terms of the GNU General Public License as published by the Free Software
|
|
7
|
+
Foundation, either version 3 of the License, or (at your option) any later
|
|
8
|
+
version.
|
|
9
|
+
|
|
10
|
+
This program is distributed in the hope that it will be useful, but
|
|
11
|
+
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
13
|
+
See the GNU General Public License for more details.
|
|
14
|
+
|
|
15
|
+
You should have received a copy of the GNU General Public License along with
|
|
16
|
+
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.createLocker = void 0;
|
|
20
|
+
var createLocker;
|
|
21
|
+
(function (createLocker) {
|
|
22
|
+
createLocker.URL_END = 'create';
|
|
23
|
+
createLocker.method = 'PUT';
|
|
24
|
+
createLocker.SC = {
|
|
25
|
+
ok: 200,
|
|
26
|
+
invalidToken: 403
|
|
27
|
+
};
|
|
28
|
+
Object.freeze(createLocker.SC);
|
|
29
|
+
})(createLocker = exports.createLocker || (exports.createLocker = {}));
|
|
30
|
+
;
|
|
31
|
+
Object.freeze(createLocker);
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
See the GNU General Public License for more details.
|
|
14
14
|
|
|
15
15
|
You should have received a copy of the GNU General Public License along with
|
|
16
|
-
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
17
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
19
|
exports.authSession = exports.startSession = exports.ERR_SC = void 0;
|
|
19
20
|
exports.ERR_SC = {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This defines request interfaces for MailerId certificate provisioning.
|
|
3
|
+
*/
|
|
1
4
|
import { JsonKey, SignedLoad } from '../../jwkeys';
|
|
2
|
-
export declare namespace pkl {
|
|
3
|
-
const START_URL_END = "start-login-exchange";
|
|
4
|
-
const COMPL_URL_END = "complete-login-exchange";
|
|
5
|
-
}
|
|
6
5
|
export declare namespace certify {
|
|
7
6
|
const URL_END = "certify";
|
|
8
7
|
interface Request {
|