mirror of
https://github.com/HeyPuter/puter
synced 2024-11-14 14:03:42 +00:00
dev: small changes
This commit is contained in:
parent
d0cb0a96de
commit
c8abe2380f
@ -17,6 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
const { AdvancedBase } = require("@heyputer/puter-js-common");
|
||||
const Library = require("./definitions/Library");
|
||||
const { NotificationES } = require("./om/entitystorage/NotificationES");
|
||||
const { ProtectedAppES } = require("./om/entitystorage/ProtectedAppES");
|
||||
const { Context } = require('./util/context');
|
||||
@ -49,16 +50,19 @@ const install = async ({ services, app, useapi }) => {
|
||||
useapi.withuse(() => {
|
||||
def('Service', require('./services/BaseService'));
|
||||
def('Module', AdvancedBase);
|
||||
def('Library', Library);
|
||||
|
||||
def('puter.middlewares.auth', require('./middleware/auth2'));
|
||||
});
|
||||
|
||||
// === LIBRARIES ===
|
||||
const ArrayUtil = require('./libraries/ArrayUtil');
|
||||
services.registerService('util-array', ArrayUtil);
|
||||
useapi.withuse(() => {
|
||||
const ArrayUtil = require('./libraries/ArrayUtil');
|
||||
services.registerService('util-array', ArrayUtil);
|
||||
|
||||
const LibTypeTagged = require('./libraries/LibTypeTagged');
|
||||
services.registerService('lib-type-tagged', LibTypeTagged);
|
||||
const LibTypeTagged = require('./libraries/LibTypeTagged');
|
||||
services.registerService('lib-type-tagged', LibTypeTagged);
|
||||
});
|
||||
|
||||
// === SERVICES ===
|
||||
|
||||
|
@ -1,6 +1,4 @@
|
||||
const Library = require("../definitions/Library");
|
||||
|
||||
class ArrayUtil extends Library {
|
||||
class ArrayUtil extends use.Library {
|
||||
/**
|
||||
*
|
||||
* @param {*} marked_map
|
||||
|
@ -1,7 +1,6 @@
|
||||
const Library = require("../definitions/Library");
|
||||
const { whatis } = require("../util/langutil");
|
||||
|
||||
class LibTypeTagged extends Library {
|
||||
class LibTypeTagged extends use.Library {
|
||||
process (o) {
|
||||
const could_be = whatis(o) === 'object' || Array.isArray(o);
|
||||
if ( ! could_be ) return {
|
||||
|
Loading…
Reference in New Issue
Block a user