@based/server 3.4.1 → 3.4.2
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/.turbo/turbo-build.log +2 -2
- package/package.json +1 -1
- package/dist/workers/index.d.ts +0 -0
- package/dist/workers/index.js +0 -20
- package/dist/workers/index.js.map +0 -1
- package/dist/workers/workerCode.d.ts +0 -12
- package/dist/workers/workerCode.js +0 -46
- package/dist/workers/workerCode.js.map +0 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
[36m@based/server:build[0m: cache hit, replaying output [
|
|
1
|
+
[36m@based/server:build[0m: cache hit, replaying output [2m4fe59d6d46e30dfb[0m
|
|
2
2
|
[36m@based/server:build: [0m
|
|
3
|
-
[36m@based/server:build: [0m> @based/server@3.4.
|
|
3
|
+
[36m@based/server:build: [0m> @based/server@3.4.1 build
|
|
4
4
|
[36m@based/server:build: [0m> npx tsc
|
|
5
5
|
[36m@based/server:build: [0m
|
package/package.json
CHANGED
package/dist/workers/index.d.ts
DELETED
|
File without changes
|
package/dist/workers/index.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// make a based server thing useFunctionWorker
|
|
2
|
-
// workerConfig = {
|
|
3
|
-
// concurrency: 5
|
|
4
|
-
// maxCrashRate: [5, 1000] // 20 per second
|
|
5
|
-
// logs in a special way
|
|
6
|
-
// }
|
|
7
|
-
// import workerify from './workerify'
|
|
8
|
-
/*
|
|
9
|
-
import { CallFunction, ObservableFunction } from '@based/server/src/types'
|
|
10
|
-
|
|
11
|
-
export default (
|
|
12
|
-
fn: ObservableFunction | CallFunction
|
|
13
|
-
): ObservableFunction | CallFunction => {
|
|
14
|
-
console.info('GO GO GO', fn)
|
|
15
|
-
|
|
16
|
-
return fn
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
*/
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/workers/index.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,mBAAmB;AACnB,kBAAkB;AAClB,4CAA4C;AAC5C,wBAAwB;AACxB,IAAI;AACJ,sCAAsC;AAEtC;;;;;;;;;;;EAWE"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
// import { Client } from '@based/server/src/types'
|
|
2
|
-
// import { BasedServerClient } from '@based/server'
|
|
3
|
-
// export type CallParams = {
|
|
4
|
-
// payload: any
|
|
5
|
-
// based: BasedServerClient
|
|
6
|
-
// user: Client
|
|
7
|
-
// callStack: string[]
|
|
8
|
-
// }
|
|
9
|
-
// export type ObservableParams = {
|
|
10
|
-
// payload: any
|
|
11
|
-
// based: BasedServerClient
|
|
12
|
-
// user?: Client
|
|
13
|
-
// callStack: string[]
|
|
14
|
-
// // error later...
|
|
15
|
-
// update: (value: any, checksum?: number) => void
|
|
16
|
-
// }
|
|
17
|
-
// workers
|
|
18
|
-
// in the worker we are going to run the code with getters
|
|
19
|
-
// e.g.
|
|
20
|
-
// fn({ user, payload, update, based }) // we add error later
|
|
21
|
-
// fn({ user, payload, based })
|
|
22
|
-
// WorkerParams object - mimic normal params object
|
|
23
|
-
// this all has to be part of based server
|
|
24
|
-
// mimic normal client
|
|
25
|
-
class WorkerClient {
|
|
26
|
-
constructor(id) {
|
|
27
|
-
// yes number
|
|
28
|
-
console.info(id);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
// has to wrap every method
|
|
32
|
-
class WorkerBasedClient {
|
|
33
|
-
}
|
|
34
|
-
class WorkerParams {
|
|
35
|
-
constructor() {
|
|
36
|
-
this.callStack = [];
|
|
37
|
-
}
|
|
38
|
-
get user() {
|
|
39
|
-
// also pair it with other functions potentialy
|
|
40
|
-
return new WorkerClient(this._clientId);
|
|
41
|
-
}
|
|
42
|
-
get based() {
|
|
43
|
-
return new WorkerBasedClient();
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
//# sourceMappingURL=workerCode.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workerCode.js","sourceRoot":"","sources":["../../src/workers/workerCode.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,oDAAoD;AAEpD,6BAA6B;AAC7B,iBAAiB;AACjB,6BAA6B;AAC7B,iBAAiB;AACjB,wBAAwB;AACxB,IAAI;AAEJ,mCAAmC;AACnC,iBAAiB;AACjB,6BAA6B;AAC7B,kBAAkB;AAClB,wBAAwB;AACxB,sBAAsB;AACtB,oDAAoD;AACpD,IAAI;AAEJ,UAAU;AAEV,0DAA0D;AAE1D,OAAO;AAEP,6DAA6D;AAE7D,+BAA+B;AAE/B,mDAAmD;AAEnD,0CAA0C;AAE1C,sBAAsB;AACtB,MAAM,YAAY;IAChB,YAAY,EAAU;QACpB,aAAa;QACb,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAClB,CAAC;CAEF;AAED,2BAA2B;AAC3B,MAAM,iBAAiB;CAEtB;AAED,MAAM,YAAY;IAAlB;QAKS,cAAS,GAAG,EAAE,CAAA;IAUvB,CAAC;IARC,IAAI,IAAI;QACN,+CAA+C;QAC/C,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;IACzC,CAAC;IAED,IAAI,KAAK;QACP,OAAO,IAAI,iBAAiB,EAAE,CAAA;IAChC,CAAC;CACF"}
|