@celljs/faas-adapter 4.5.0 → 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.
- package/esm/node/dev-event-application-entry.js +0 -2
- package/esm/node/dev-event-application-entry.js.map +1 -1
- package/esm/node/utils.d.ts +2 -1
- package/esm/node/utils.js +3 -3
- package/esm/node/utils.js.map +1 -1
- package/lib/node/dev-event-application-entry.d.ts.map +1 -1
- package/lib/node/dev-event-application-entry.js +0 -2
- package/lib/node/dev-event-application-entry.js.map +1 -1
- package/lib/node/utils.d.ts +2 -1
- package/lib/node/utils.d.ts.map +1 -1
- package/lib/node/utils.js +3 -3
- package/lib/node/utils.js.map +1 -1
- package/lib/package.spec.js +20 -2
- package/lib/package.spec.js.map +1 -1
- package/package.json +5 -5
- package/src/node/dev-event-application-entry.ts +0 -2
- package/src/node/utils.ts +4 -3
- package/src/package.spec.ts +19 -3
|
@@ -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,
|
|
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"}
|
package/esm/node/utils.d.ts
CHANGED
package/esm/node/utils.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
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
|
|
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 = {}));
|
package/esm/node/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/node/utils.ts"],"names":[],"mappings":"
|
|
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":"
|
|
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,
|
|
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"}
|
package/lib/node/utils.d.ts
CHANGED
|
@@ -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
|
package/lib/node/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/node/utils.ts"],"names":[],"mappings":"
|
|
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
|
|
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
|
|
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 = {}));
|
package/lib/node/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/node/utils.ts"],"names":[],"mappings":";;;
|
|
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"}
|
package/lib/package.spec.js
CHANGED
|
@@ -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
|
-
|
|
5
|
-
|
|
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
|
package/lib/package.spec.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.spec.js","sourceRoot":"","sources":["../src/package.spec.ts"],"names":[],"mappings":"
|
|
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.
|
|
3
|
+
"version": "4.6.0",
|
|
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.
|
|
36
|
-
"@celljs/core": "4.
|
|
37
|
-
"@celljs/schedule": "4.
|
|
38
|
-
"@celljs/web": "4.
|
|
35
|
+
"@celljs/cloud": "4.6.0",
|
|
36
|
+
"@celljs/core": "4.6.0",
|
|
37
|
+
"@celljs/schedule": "4.6.0",
|
|
38
|
+
"@celljs/web": "4.6.0",
|
|
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 {
|
|
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
|
|
5
|
+
export function getCallbackWaitsForEmptyEventLoop(container: Container): boolean {
|
|
6
|
+
return container.get<ConfigProvider>(ConfigProvider).get<boolean>('cloud.function.callbackWaitsForEmptyEventLoop', false);
|
|
6
7
|
}
|
|
7
8
|
}
|
package/src/package.spec.ts
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
|
-
import { describe, it } from 'bun:test';
|
|
2
|
-
|
|
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
|
-
|
|
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
|
});
|