@celljs/vercel-adapter 4.5.1 → 4.6.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.
@@ -1,9 +1,8 @@
1
1
  import { container } from '@celljs/core/lib/common/container/dynamic-container';
2
2
  import { HttpServerUtil } from '@celljs/web/lib/node/server';
3
3
  import { DEFAULT_SERVER_OPTIONS } from './context.js';
4
- import { ContainerProvider, Application, ConfigProvider } from '@celljs/core';
4
+ import { Application, ConfigProvider } from '@celljs/core';
5
5
  container.then(async (c) => {
6
- ContainerProvider.set(c);
7
6
  await c.get(Application).start();
8
7
  const configProvider = c.get(ConfigProvider);
9
8
  const { port } = configProvider.get('server', DEFAULT_SERVER_OPTIONS);
@@ -1 +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,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,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,QAAQ,EAAE,sBAAsB,CAAC,CAAC;IAC3E,cAAc,CAAC,gBAAgB,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC9E,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC;AACjC,CAAC,CAAC,CAAC"}
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,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE3D,SAAS,CAAC,IAAI,CAAC,KAAK,EAAC,CAAC,EAAC,EAAE;IACrB,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,QAAQ,EAAE,sBAAsB,CAAC,CAAC;IAC3E,cAAc,CAAC,gBAAgB,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC9E,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC;AACjC,CAAC,CAAC,CAAC"}
@@ -5,7 +5,6 @@ const server_1 = require("@celljs/web/lib/node/server");
5
5
  const context_1 = require("./context");
6
6
  const core_1 = require("@celljs/core");
7
7
  dynamic_container_1.container.then(async (c) => {
8
- core_1.ContainerProvider.set(c);
9
8
  await c.get(core_1.Application).start();
10
9
  const configProvider = c.get(core_1.ConfigProvider);
11
10
  const { port } = configProvider.get('server', context_1.DEFAULT_SERVER_OPTIONS);
@@ -1 +1 @@
1
- {"version":3,"file":"http-application-entry.js","sourceRoot":"","sources":["../../src/node/http-application-entry.ts"],"names":[],"mappings":";;AAA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C,CAAC,CAAC"}
@@ -1,7 +1,24 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  const bun_test_1 = require("bun:test");
4
- (0, bun_test_1.describe)('vercel adapter package', () => {
5
- (0, bun_test_1.it)('support code coverage statistics', () => { });
7
+ const core_1 = require("@celljs/core");
8
+ const assembly_test_util_1 = require("@celljs/core/lib/common/test/assembly-test-util");
9
+ const static_module_1 = __importDefault(require("@celljs/core/lib/common/static-module"));
10
+ const static_module_2 = __importDefault(require("@celljs/core/lib/node/static-module"));
11
+ const module_1 = __importDefault(require("@celljs/http/lib/common/module"));
12
+ const module_2 = __importDefault(require("@celljs/web/lib/common/module"));
13
+ const module_3 = __importDefault(require("@celljs/web/lib/node/module"));
14
+ const module_4 = __importDefault(require("./node/module"));
15
+ core_1.currentThis.cellProps = {};
16
+ (0, bun_test_1.describe)('@celljs/vercel-adapter', () => {
17
+ (0, bun_test_1.it)('its DI module loads after those of its dependencies and every binding resolves', () => {
18
+ const { changed, errors } = assembly_test_util_1.AssemblyTestUtil.check([static_module_1.default, static_module_2.default, module_1.default, module_2.default, module_3.default], module_4.default);
19
+ (0, bun_test_1.expect)(errors).toEqual([]);
20
+ // The package brings an entry (the HTTP server), not components.
21
+ (0, bun_test_1.expect)(changed).toBe(0);
22
+ });
6
23
  });
7
24
  //# sourceMappingURL=package.spec.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"package.spec.js","sourceRoot":"","sources":["../src/package.spec.ts"],"names":[],"mappings":";;AAAA,uCAAwC;AACxC,IAAA,mBAAQ,EAAC,wBAAwB,EAAE,GAAG,EAAE;IAEpC,IAAA,aAAE,EAAC,kCAAkC,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;AACrD,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"package.spec.js","sourceRoot":"","sources":["../src/package.spec.ts"],"names":[],"mappings":";;;;;AAAA,uCAAgD;AAChD,uCAA2C;AAC3C,wFAAmF;AACnF,0FAAuD;AACvD,wFAAqD;AACrD,4EAAgD;AAChD,2EAA+C;AAC/C,yEAA6C;AAC7C,2DAAiC;AAEjC,kBAAW,CAAC,SAAS,GAAG,EAAE,CAAC;AAE3B,IAAA,mBAAQ,EAAC,wBAAwB,EAAE,GAAG,EAAE;IACpC,IAAA,aAAE,EAAC,gFAAgF,EAAE,GAAG,EAAE;QACtF,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,qCAAgB,CAAC,KAAK,CAAC,CAAC,uBAAE,EAAE,uBAAE,EAAE,gBAAE,EAAE,gBAAE,EAAE,gBAAE,CAAC,EAAE,gBAAI,CAAC,CAAC;QAC/E,IAAA,iBAAM,EAAC,MAAM,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAC3B,iEAAiE;QACjE,IAAA,iBAAM,EAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celljs/vercel-adapter",
3
- "version": "4.5.1",
3
+ "version": "4.6.0",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "cell-component"
@@ -31,8 +31,8 @@
31
31
  "watch": "tsc -b -w --preserveWatchOutput"
32
32
  },
33
33
  "dependencies": {
34
- "@celljs/core": "4.5.1",
35
- "@celljs/web": "4.5.1"
34
+ "@celljs/core": "4.6.0",
35
+ "@celljs/web": "4.6.0"
36
36
  },
37
37
  "publishConfig": {
38
38
  "access": "public"
@@ -1,10 +1,9 @@
1
1
  import { container } from '@celljs/core/lib/common/container/dynamic-container';
2
2
  import { HttpServerUtil } from '@celljs/web/lib/node/server';
3
3
  import { DEFAULT_SERVER_OPTIONS } from './context';
4
- import { ContainerProvider, Application, ConfigProvider } from '@celljs/core';
4
+ import { Application, ConfigProvider } from '@celljs/core';
5
5
 
6
6
  container.then(async c => {
7
- ContainerProvider.set(c);
8
7
  await c.get<Application>(Application).start();
9
8
  const configProvider = c.get<ConfigProvider>(ConfigProvider);
10
9
  const { port } = configProvider.get<any>('server', DEFAULT_SERVER_OPTIONS);
@@ -1,5 +1,20 @@
1
- import { describe, it } from 'bun:test';
2
- describe('vercel adapter package', () => {
1
+ import { describe, expect, it } from 'bun:test';
2
+ import { currentThis } from '@celljs/core';
3
+ import { AssemblyTestUtil } from '@celljs/core/lib/common/test/assembly-test-util';
4
+ import m0 from '@celljs/core/lib/common/static-module';
5
+ import m1 from '@celljs/core/lib/node/static-module';
6
+ import m2 from '@celljs/http/lib/common/module';
7
+ import m3 from '@celljs/web/lib/common/module';
8
+ import m4 from '@celljs/web/lib/node/module';
9
+ import own0 from './node/module';
3
10
 
4
- it('support code coverage statistics', () => {});
11
+ currentThis.cellProps = {};
12
+
13
+ describe('@celljs/vercel-adapter', () => {
14
+ it('its DI module loads after those of its dependencies and every binding resolves', () => {
15
+ const { changed, errors } = AssemblyTestUtil.check([m0, m1, m2, m3, m4], own0);
16
+ expect(errors).toEqual([]);
17
+ // The package brings an entry (the HTTP server), not components.
18
+ expect(changed).toBe(0);
19
+ });
5
20
  });