Fix StartOS 0.4 TypeScript packaging to match SDK API
This commit is contained in:
+28
@@ -0,0 +1,28 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.setupServiceInterfaces = exports.NO_INTERFACE_CHANGES = void 0;
|
||||
exports.NO_INTERFACE_CHANGES = {};
|
||||
const setupServiceInterfaces = (fn) => {
|
||||
return (async (effects) => {
|
||||
const bindings = [];
|
||||
const interfaces = [];
|
||||
await fn({
|
||||
effects: {
|
||||
...effects,
|
||||
bind: (params) => {
|
||||
bindings.push({ id: params.id, internalPort: params.internalPort });
|
||||
return effects.bind(params);
|
||||
},
|
||||
exportServiceInterface: (params) => {
|
||||
interfaces.push(params.id);
|
||||
return effects.exportServiceInterface(params);
|
||||
},
|
||||
},
|
||||
});
|
||||
await effects.clearBindings({ except: bindings });
|
||||
await effects.clearServiceInterfaces({ except: interfaces });
|
||||
return null;
|
||||
});
|
||||
};
|
||||
exports.setupServiceInterfaces = setupServiceInterfaces;
|
||||
//# sourceMappingURL=setupInterfaces.js.map
|
||||
Reference in New Issue
Block a user