@alanszp/serverless 7.8.1 → 7.10.3
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/dist/index.js
CHANGED
|
@@ -10,6 +10,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
// Adding dummy code to deploy package
|
|
13
14
|
__exportStar(require("./middlewares"), exports);
|
|
14
15
|
__exportStar(require("./errors"), exports);
|
|
15
16
|
__exportStar(require("./handlers"), exports);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gDAA8B;AAC9B,2CAAyB;AACzB,6CAA2B;AAC3B,0CAAwB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,sCAAsC;AACtC,gDAA8B;AAC9B,2CAAyB;AACzB,6CAA2B;AAC3B,0CAAwB"}
|
|
@@ -16,6 +16,10 @@ function initializeSplitMiddleware(splitClient) {
|
|
|
16
16
|
before: () => __awaiter(this, void 0, void 0, function* () {
|
|
17
17
|
const loaded = yield splitClient.hasLoaded();
|
|
18
18
|
if (!loaded) {
|
|
19
|
+
try {
|
|
20
|
+
yield splitClient.destroy();
|
|
21
|
+
}
|
|
22
|
+
catch (error) { }
|
|
19
23
|
throw new splitCouldNotLoadError_1.SplitCouldNotLoadError();
|
|
20
24
|
}
|
|
21
25
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initializeSplitMiddleware.js","sourceRoot":"","sources":["../../src/middlewares/initializeSplitMiddleware.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,6EAA0E;AAE1E,SAAgB,yBAAyB,CACvC,WAA4B;IAE5B,OAAO;QACL,MAAM,EAAE,GAAwB,EAAE;YAChC,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,SAAS,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"initializeSplitMiddleware.js","sourceRoot":"","sources":["../../src/middlewares/initializeSplitMiddleware.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,6EAA0E;AAE1E,SAAgB,yBAAyB,CACvC,WAA4B;IAE5B,OAAO;QACL,MAAM,EAAE,GAAwB,EAAE;YAChC,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,SAAS,EAAE,CAAC;YAE7C,IAAI,CAAC,MAAM,EAAE;gBACX,IAAI;oBACF,MAAM,WAAW,CAAC,OAAO,EAAE,CAAC;iBAC7B;gBAAC,OAAO,KAAK,EAAE,GAAE;gBAClB,MAAM,IAAI,+CAAsB,EAAE,CAAC;aACpC;QACH,CAAC,CAAA;QACD,KAAK,EAAE,GAAwB,EAAE;YAC/B,MAAM,WAAW,CAAC,OAAO,EAAE,CAAC;QAC9B,CAAC,CAAA;KACF,CAAC;AACJ,CAAC;AAlBD,8DAkBC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alanszp/serverless",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.10.3",
|
|
4
4
|
"description": "Alan's serverless utils and middlewares.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@alanszp/audit": "^7.0.0",
|
|
28
28
|
"@alanszp/logger": "^7.0.0",
|
|
29
|
-
"@alanszp/split": "^7.
|
|
29
|
+
"@alanszp/split": "^7.10.3",
|
|
30
30
|
"@types/lodash": "^4.14.170",
|
|
31
31
|
"@types/node": "^15.12.3",
|
|
32
32
|
"ts-node": "^10.0.0",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"cuid": "^2.1.8",
|
|
44
44
|
"lodash": "^4.17.21"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "b921afdb66be64a60a1558105896e6d24d371ccd"
|
|
47
47
|
}
|
package/src/index.ts
CHANGED
|
@@ -8,7 +8,11 @@ export function initializeSplitMiddleware<TEvent, TResult>(
|
|
|
8
8
|
return {
|
|
9
9
|
before: async (): Promise<void> => {
|
|
10
10
|
const loaded = await splitClient.hasLoaded();
|
|
11
|
+
|
|
11
12
|
if (!loaded) {
|
|
13
|
+
try {
|
|
14
|
+
await splitClient.destroy();
|
|
15
|
+
} catch (error) {}
|
|
12
16
|
throw new SplitCouldNotLoadError();
|
|
13
17
|
}
|
|
14
18
|
},
|