@celljs/vercel-adapter 3.8.0 → 3.9.0
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/esm/node/context.d.ts +3 -0
- package/esm/node/context.js +4 -0
- package/esm/node/context.js.map +1 -0
- package/esm/node/http-application-entry.d.ts +1 -0
- package/esm/node/http-application-entry.js +20 -0
- package/esm/node/http-application-entry.js.map +1 -0
- package/esm/node/index.d.ts +1 -0
- package/esm/node/index.js +2 -0
- package/esm/node/index.js.map +1 -0
- package/esm/node/module.d.ts +2 -0
- package/esm/node/module.js +3 -0
- package/esm/node/module.js.map +1 -0
- package/esm/package.json +3 -0
- package/package.json +34 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/node/context.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,sBAAsB,GAAG;IAClC,IAAI,EAAE,IAAI;CACb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { container } from '@celljs/core/lib/common/container/dynamic-container';
|
|
2
|
+
import { Dispatcher, Context } from '@celljs/web/lib/node';
|
|
3
|
+
import express from 'express';
|
|
4
|
+
import { DEFAULT_SERVER_OPTIONS } from './context.js';
|
|
5
|
+
import { ContainerProvider, Application, ConfigProvider } from '@celljs/core';
|
|
6
|
+
container.then(async (c) => {
|
|
7
|
+
ContainerProvider.set(c);
|
|
8
|
+
await c.get(Application).start();
|
|
9
|
+
const configProvider = c.get(ConfigProvider);
|
|
10
|
+
const { port } = configProvider.get('cell.server', DEFAULT_SERVER_OPTIONS);
|
|
11
|
+
const app = express();
|
|
12
|
+
app.all('*', async (req, res) => {
|
|
13
|
+
const dispatcher = c.get(Dispatcher);
|
|
14
|
+
const httpContext = new Context(req, res);
|
|
15
|
+
Context.run(() => dispatcher.dispatch(httpContext));
|
|
16
|
+
});
|
|
17
|
+
app.listen(port);
|
|
18
|
+
console.log(`serve ${port}`);
|
|
19
|
+
});
|
|
20
|
+
//# sourceMappingURL=http-application-entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-application-entry.js","sourceRoot":"","sources":["../../src/node/http-application-entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qDAAqD,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9E,SAAS,CAAC,IAAI,CAAC,KAAK,EAAC,CAAC,EAAC,EAAE;IACrB,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACzB,MAAM,CAAC,CAAC,GAAG,CAAc,WAAW,CAAC,CAAC,KAAK,EAAE,CAAC;IAC9C,MAAM,cAAc,GAAG,CAAC,CAAC,GAAG,CAAiB,cAAc,CAAC,CAAC;IAC7D,MAAM,EAAE,IAAI,EAAE,GAAG,cAAc,CAAC,GAAG,CAAM,aAAa,EAAE,sBAAsB,CAAC,CAAC;IAEhF,MAAM,GAAG,GAAG,OAAO,EAAE,CAAC;IACtB,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,GAAQ,EAAE,GAAQ,EAAE,EAAE;QACtC,MAAM,UAAU,GAAG,CAAC,CAAC,GAAG,CAAsB,UAAU,CAAC,CAAC;QAC1D,MAAM,WAAW,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QAC1C,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;IACH,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACjB,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC;AACjC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './context.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../src/node/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,eAAe,QAAQ,EAAE,CAAC"}
|
package/esm/package.json
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celljs/vercel-adapter",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cell-component"
|
|
@@ -18,20 +18,21 @@
|
|
|
18
18
|
"typings": "lib/node/index.d.ts",
|
|
19
19
|
"files": [
|
|
20
20
|
"lib",
|
|
21
|
+
"esm",
|
|
21
22
|
"src",
|
|
22
23
|
"cell.yml",
|
|
23
24
|
"cell-remote.yml"
|
|
24
25
|
],
|
|
25
26
|
"scripts": {
|
|
26
|
-
"build": "tsc -b",
|
|
27
|
-
"clean": "rm -rf lib *.tsbuildinfo",
|
|
27
|
+
"build": "tsc -b && bun ../../scripts/build-esm.ts",
|
|
28
|
+
"clean": "rm -rf lib esm *.tsbuildinfo",
|
|
28
29
|
"test": "bun test --preload reflect-metadata ./lib",
|
|
29
30
|
"watch": "tsc -b -w --preserveWatchOutput"
|
|
30
31
|
},
|
|
31
32
|
"dependencies": {
|
|
32
|
-
"@celljs/cli-common": "3.
|
|
33
|
-
"@celljs/core": "3.
|
|
34
|
-
"@celljs/web": "3.
|
|
33
|
+
"@celljs/cli-common": "3.9.0",
|
|
34
|
+
"@celljs/core": "3.9.0",
|
|
35
|
+
"@celljs/web": "3.9.0",
|
|
35
36
|
"chalk": "^4.1.0",
|
|
36
37
|
"command-exists": "^1.2.9",
|
|
37
38
|
"express": "^4.17.1",
|
|
@@ -39,9 +40,35 @@
|
|
|
39
40
|
"tslib": "^2.8.0"
|
|
40
41
|
},
|
|
41
42
|
"devDependencies": {
|
|
42
|
-
"@celljs/cli-service": "3.
|
|
43
|
+
"@celljs/cli-service": "3.9.0"
|
|
43
44
|
},
|
|
44
45
|
"publishConfig": {
|
|
45
46
|
"access": "public"
|
|
47
|
+
},
|
|
48
|
+
"exports": {
|
|
49
|
+
".": {
|
|
50
|
+
"webpack": "./lib/node/index.js",
|
|
51
|
+
"import": "./esm/node/index.js",
|
|
52
|
+
"default": "./lib/node/index.js"
|
|
53
|
+
},
|
|
54
|
+
"./package.json": "./package.json",
|
|
55
|
+
"./lib/hooks/*.js": "./lib/hooks/*.js",
|
|
56
|
+
"./lib/hooks/*": "./lib/hooks/*.js",
|
|
57
|
+
"./lib/node": {
|
|
58
|
+
"webpack": "./lib/node/index.js",
|
|
59
|
+
"import": "./esm/node/index.js",
|
|
60
|
+
"default": "./lib/node/index.js"
|
|
61
|
+
},
|
|
62
|
+
"./lib/*.js": {
|
|
63
|
+
"webpack": "./lib/*.js",
|
|
64
|
+
"import": "./esm/*.js",
|
|
65
|
+
"default": "./lib/*.js"
|
|
66
|
+
},
|
|
67
|
+
"./lib/*": {
|
|
68
|
+
"webpack": "./lib/*.js",
|
|
69
|
+
"import": "./esm/*.js",
|
|
70
|
+
"default": "./lib/*.js"
|
|
71
|
+
},
|
|
72
|
+
"./*": "./*"
|
|
46
73
|
}
|
|
47
74
|
}
|