@celljs/faas-adapter 4.5.1 → 4.6.1

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,11 +1,9 @@
1
1
  import { container } from '@celljs/core/lib/common/container/dynamic-container';
2
2
  import { Application } from '@celljs/core/lib/common/application/application-protocol';
3
- import { ContainerProvider } from '@celljs/core/lib/common/container/container-provider';
4
3
  import { FaaSEventListener } from './event/event-protocol.js';
5
4
  let listeners;
6
5
  async function start() {
7
6
  const c = await container;
8
- ContainerProvider.set(c);
9
7
  await c.get(Application).start();
10
8
  listeners = c.getAll(FaaSEventListener);
11
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"dev-event-application-entry.js","sourceRoot":"","sources":["../../src/node/dev-event-application-entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qDAAqD,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,0DAA0D,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAE,MAAM,sDAAsD,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,IAAI,SAAyC,CAAC;AAE9C,KAAK,UAAU,KAAK;IAChB,MAAM,CAAC,GAAG,MAAM,SAAS,CAAC;IAC1B,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACzB,MAAM,CAAC,CAAC,GAAG,CAAc,WAAW,CAAC,CAAC,KAAK,EAAE,CAAC;IAC9C,SAAS,GAAG,CAAC,CAAC,MAAM,CAA+B,iBAAiB,CAAC,CAAC;AAC1E,CAAC;AAED,MAAM,YAAY,GAAG,KAAK,EAAE,CAAC;AAE7B,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,KAAa,EAAE,OAAY;IACrD,MAAM,YAAY,CAAC;IACnB,MAAM,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAC9D,CAAC"}
1
+ {"version":3,"file":"dev-event-application-entry.js","sourceRoot":"","sources":["../../src/node/dev-event-application-entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qDAAqD,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,0DAA0D,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,IAAI,SAAyC,CAAC;AAE9C,KAAK,UAAU,KAAK;IAChB,MAAM,CAAC,GAAG,MAAM,SAAS,CAAC;IAC1B,MAAM,CAAC,CAAC,GAAG,CAAc,WAAW,CAAC,CAAC,KAAK,EAAE,CAAC;IAC9C,SAAS,GAAG,CAAC,CAAC,MAAM,CAA+B,iBAAiB,CAAC,CAAC;AAC1E,CAAC;AAED,MAAM,YAAY,GAAG,KAAK,EAAE,CAAC;AAE7B,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,KAAa,EAAE,OAAY;IACrD,MAAM,YAAY,CAAC;IACnB,MAAM,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAC9D,CAAC"}
@@ -1,3 +1,4 @@
1
+ import type { Container } from '@celljs/core/lib/common/container/container';
1
2
  export declare namespace FaaSUtils {
2
- function getCallbackWaitsForEmptyEventLoop(): boolean;
3
+ function getCallbackWaitsForEmptyEventLoop(container: Container): boolean;
3
4
  }
package/esm/node/utils.js CHANGED
@@ -1,8 +1,8 @@
1
- import { ConfigUtil } from '@celljs/core/lib/common/config/config-util';
1
+ import { ConfigProvider } from '@celljs/core/lib/common/config/config-protocol';
2
2
  export var FaaSUtils;
3
3
  (function (FaaSUtils) {
4
- function getCallbackWaitsForEmptyEventLoop() {
5
- return ConfigUtil.get('cloud.function.callbackWaitsForEmptyEventLoop', false);
4
+ function getCallbackWaitsForEmptyEventLoop(container) {
5
+ return container.get(ConfigProvider).get('cloud.function.callbackWaitsForEmptyEventLoop', false);
6
6
  }
7
7
  FaaSUtils.getCallbackWaitsForEmptyEventLoop = getCallbackWaitsForEmptyEventLoop;
8
8
  })(FaaSUtils || (FaaSUtils = {}));
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/node/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AAExE,MAAM,KAAW,SAAS,CAIzB;AAJD,WAAiB,SAAS;IACtB,SAAgB,iCAAiC;QAC7C,OAAO,UAAU,CAAC,GAAG,CAAU,+CAA+C,EAAE,KAAK,CAAC,CAAC;IAC3F,CAAC;IAFe,UAAA,iCAAiC,oCAEhD,CAAA;AACL,CAAC,EAJgB,SAAS,KAAT,SAAS,QAIzB"}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/node/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,gDAAgD,CAAC;AAEhF,MAAM,KAAW,SAAS,CAIzB;AAJD,WAAiB,SAAS;IACtB,SAAgB,iCAAiC,CAAC,SAAoB;QAClE,OAAO,SAAS,CAAC,GAAG,CAAiB,cAAc,CAAC,CAAC,GAAG,CAAU,+CAA+C,EAAE,KAAK,CAAC,CAAC;IAC9H,CAAC;IAFe,UAAA,iCAAiC,oCAEhD,CAAA;AACL,CAAC,EAJgB,SAAS,KAAT,SAAS,QAIzB"}
@@ -1 +1 @@
1
- {"version":3,"file":"dev-event-application-entry.d.ts","sourceRoot":"","sources":["../../src/node/dev-event-application-entry.ts"],"names":[],"mappings":"AAgBA,wBAAsB,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,iBAGxD"}
1
+ {"version":3,"file":"dev-event-application-entry.d.ts","sourceRoot":"","sources":["../../src/node/dev-event-application-entry.ts"],"names":[],"mappings":"AAcA,wBAAsB,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,iBAGxD"}
@@ -3,12 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.handler = handler;
4
4
  const dynamic_container_1 = require("@celljs/core/lib/common/container/dynamic-container");
5
5
  const application_protocol_1 = require("@celljs/core/lib/common/application/application-protocol");
6
- const container_provider_1 = require("@celljs/core/lib/common/container/container-provider");
7
6
  const event_protocol_1 = require("./event/event-protocol");
8
7
  let listeners;
9
8
  async function start() {
10
9
  const c = await dynamic_container_1.container;
11
- container_provider_1.ContainerProvider.set(c);
12
10
  await c.get(application_protocol_1.Application).start();
13
11
  listeners = c.getAll(event_protocol_1.FaaSEventListener);
14
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"dev-event-application-entry.js","sourceRoot":"","sources":["../../src/node/dev-event-application-entry.ts"],"names":[],"mappings":";;;AAAA,2FAAgF;AAChF,mGAAuF;AACvF,6FAAyF;AACzF,2DAA2D;AAE3D,IAAI,SAAyC,CAAC;AAE9C,KAAK,UAAU,KAAK;IAChB,MAAM,CAAC,GAAG,MAAM,6BAAS,CAAC;IAC1B,sCAAiB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACzB,MAAM,CAAC,CAAC,GAAG,CAAc,kCAAW,CAAC,CAAC,KAAK,EAAE,CAAC;IAC9C,SAAS,GAAG,CAAC,CAAC,MAAM,CAA+B,kCAAiB,CAAC,CAAC;AAC1E,CAAC;AAED,MAAM,YAAY,GAAG,KAAK,EAAE,CAAC;AAEtB,KAAK,kBAAkB,KAAa,EAAE,OAAY;IACrD,MAAM,YAAY,CAAC;IACnB,MAAM,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAC9D,CAAC"}
1
+ {"version":3,"file":"dev-event-application-entry.js","sourceRoot":"","sources":["../../src/node/dev-event-application-entry.ts"],"names":[],"mappings":";;;AAAA,2FAAgF;AAChF,mGAAuF;AACvF,2DAA2D;AAE3D,IAAI,SAAyC,CAAC;AAE9C,KAAK,UAAU,KAAK;IAChB,MAAM,CAAC,GAAG,MAAM,6BAAS,CAAC;IAC1B,MAAM,CAAC,CAAC,GAAG,CAAc,kCAAW,CAAC,CAAC,KAAK,EAAE,CAAC;IAC9C,SAAS,GAAG,CAAC,CAAC,MAAM,CAA+B,kCAAiB,CAAC,CAAC;AAC1E,CAAC;AAED,MAAM,YAAY,GAAG,KAAK,EAAE,CAAC;AAEtB,KAAK,kBAAkB,KAAa,EAAE,OAAY;IACrD,MAAM,YAAY,CAAC;IACnB,MAAM,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAC9D,CAAC"}
@@ -1,4 +1,5 @@
1
+ import type { Container } from '@celljs/core/lib/common/container/container';
1
2
  export declare namespace FaaSUtils {
2
- function getCallbackWaitsForEmptyEventLoop(): boolean;
3
+ function getCallbackWaitsForEmptyEventLoop(container: Container): boolean;
3
4
  }
4
5
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/node/utils.ts"],"names":[],"mappings":"AAEA,yBAAiB,SAAS,CAAC;IACvB,SAAgB,iCAAiC,YAEhD;CACJ"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/node/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAC;AAG7E,yBAAiB,SAAS,CAAC;IACvB,SAAgB,iCAAiC,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAE/E;CACJ"}
package/lib/node/utils.js CHANGED
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FaaSUtils = void 0;
4
- const config_util_1 = require("@celljs/core/lib/common/config/config-util");
4
+ const config_protocol_1 = require("@celljs/core/lib/common/config/config-protocol");
5
5
  var FaaSUtils;
6
6
  (function (FaaSUtils) {
7
- function getCallbackWaitsForEmptyEventLoop() {
8
- return config_util_1.ConfigUtil.get('cloud.function.callbackWaitsForEmptyEventLoop', false);
7
+ function getCallbackWaitsForEmptyEventLoop(container) {
8
+ return container.get(config_protocol_1.ConfigProvider).get('cloud.function.callbackWaitsForEmptyEventLoop', false);
9
9
  }
10
10
  FaaSUtils.getCallbackWaitsForEmptyEventLoop = getCallbackWaitsForEmptyEventLoop;
11
11
  })(FaaSUtils || (exports.FaaSUtils = FaaSUtils = {}));
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/node/utils.ts"],"names":[],"mappings":";;;AAAA,4EAAwE;AAExE,IAAiB,SAAS,CAIzB;AAJD,WAAiB,SAAS;IACtB,SAAgB,iCAAiC;QAC7C,OAAO,wBAAU,CAAC,GAAG,CAAU,+CAA+C,EAAE,KAAK,CAAC,CAAC;IAC3F,CAAC;IAFe,UAAA,iCAAiC,oCAEhD,CAAA;AACL,CAAC,EAJgB,SAAS,aAAT,SAAS,GAAT,SAAS,QAIzB"}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/node/utils.ts"],"names":[],"mappings":";;;AACA,oFAAgF;AAEhF,IAAiB,SAAS,CAIzB;AAJD,WAAiB,SAAS;IACtB,SAAgB,iCAAiC,CAAC,SAAoB;QAClE,OAAO,SAAS,CAAC,GAAG,CAAiB,gCAAc,CAAC,CAAC,GAAG,CAAU,+CAA+C,EAAE,KAAK,CAAC,CAAC;IAC9H,CAAC;IAFe,UAAA,iCAAiC,oCAEhD,CAAA;AACL,CAAC,EAJgB,SAAS,aAAT,SAAS,GAAT,SAAS,QAIzB"}
@@ -1,7 +1,25 @@
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)('faas 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/cloud/lib/node/module"));
12
+ const module_2 = __importDefault(require("@celljs/schedule/lib/node/module"));
13
+ const module_3 = __importDefault(require("@celljs/http/lib/common/module"));
14
+ const module_4 = __importDefault(require("@celljs/web/lib/common/module"));
15
+ const module_5 = __importDefault(require("@celljs/web/lib/node/module"));
16
+ const module_6 = __importDefault(require("./node/module"));
17
+ core_1.currentThis.cellProps = {};
18
+ (0, bun_test_1.describe)('@celljs/faas-adapter', () => {
19
+ (0, bun_test_1.it)('its DI module loads after those of its dependencies and every binding resolves', () => {
20
+ 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, module_5.default], module_6.default);
21
+ (0, bun_test_1.expect)(errors).toEqual([]);
22
+ (0, bun_test_1.expect)(changed).toBeGreaterThan(0);
23
+ });
6
24
  });
7
25
  //# 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,sBAAsB,EAAE,GAAG,EAAE;IAElC,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,2EAA+C;AAC/C,8EAAkD;AAClD,4EAAgD;AAChD,2EAA+C;AAC/C,yEAA6C;AAC7C,2DAAiC;AAEjC,kBAAW,CAAC,SAAS,GAAG,EAAE,CAAC;AAE3B,IAAA,mBAAQ,EAAC,sBAAsB,EAAE,GAAG,EAAE;IAClC,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,EAAE,gBAAE,EAAE,gBAAE,CAAC,EAAE,gBAAI,CAAC,CAAC;QACvF,IAAA,iBAAM,EAAC,MAAM,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAC3B,IAAA,iBAAM,EAAC,OAAO,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celljs/faas-adapter",
3
- "version": "4.5.1",
3
+ "version": "4.6.1",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "cell-component"
@@ -32,10 +32,10 @@
32
32
  "watch": "tsc -b -w --preserveWatchOutput"
33
33
  },
34
34
  "dependencies": {
35
- "@celljs/cloud": "4.5.1",
36
- "@celljs/core": "4.5.1",
37
- "@celljs/schedule": "4.5.1",
38
- "@celljs/web": "4.5.1",
35
+ "@celljs/cloud": "4.6.1",
36
+ "@celljs/core": "4.6.1",
37
+ "@celljs/schedule": "4.6.1",
38
+ "@celljs/web": "4.6.1",
39
39
  "cron": "^1.8.2"
40
40
  },
41
41
  "publishConfig": {
@@ -1,13 +1,11 @@
1
1
  import { container } from '@celljs/core/lib/common/container/dynamic-container';
2
2
  import { Application } from '@celljs/core/lib/common/application/application-protocol';
3
- import { ContainerProvider } from '@celljs/core/lib/common/container/container-provider';
4
3
  import { FaaSEventListener } from './event/event-protocol';
5
4
 
6
5
  let listeners: FaaSEventListener<any, void>[];
7
6
 
8
7
  async function start() {
9
8
  const c = await container;
10
- ContainerProvider.set(c);
11
9
  await c.get<Application>(Application).start();
12
10
  listeners = c.getAll<FaaSEventListener<any, void>>(FaaSEventListener);
13
11
  }
package/src/node/utils.ts CHANGED
@@ -1,7 +1,8 @@
1
- import { ConfigUtil } from '@celljs/core/lib/common/config/config-util';
1
+ import type { Container } from '@celljs/core/lib/common/container/container';
2
+ import { ConfigProvider } from '@celljs/core/lib/common/config/config-protocol';
2
3
 
3
4
  export namespace FaaSUtils {
4
- export function getCallbackWaitsForEmptyEventLoop() {
5
- return ConfigUtil.get<boolean>('cloud.function.callbackWaitsForEmptyEventLoop', false);
5
+ export function getCallbackWaitsForEmptyEventLoop(container: Container): boolean {
6
+ return container.get<ConfigProvider>(ConfigProvider).get<boolean>('cloud.function.callbackWaitsForEmptyEventLoop', false);
6
7
  }
7
8
  }
@@ -1,5 +1,21 @@
1
- import { describe, it } from 'bun:test';
2
- describe('faas 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/cloud/lib/node/module';
7
+ import m3 from '@celljs/schedule/lib/node/module';
8
+ import m4 from '@celljs/http/lib/common/module';
9
+ import m5 from '@celljs/web/lib/common/module';
10
+ import m6 from '@celljs/web/lib/node/module';
11
+ import own0 from './node/module';
3
12
 
4
- it('support code coverage statistics', () => {});
13
+ currentThis.cellProps = {};
14
+
15
+ describe('@celljs/faas-adapter', () => {
16
+ it('its DI module loads after those of its dependencies and every binding resolves', () => {
17
+ const { changed, errors } = AssemblyTestUtil.check([m0, m1, m2, m3, m4, m5, m6], own0);
18
+ expect(errors).toEqual([]);
19
+ expect(changed).toBeGreaterThan(0);
20
+ });
5
21
  });