This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { snakeToCamel, camelToSnake } = require ("waelio-utils"); | |
function regModule (mod ) { | |
if(!mod) return null | |
const modelName = mod.name | |
const UPPER = modelName.toUpperCase() | |
const SNAKE = camelToSnake(modelName) | |
const UPPER_SNAKE = SNAKE.toUpperCase() | |
const CAMEL = modelName.charAt(0).toUpperCase() + modelName.slice(1) | |
const isNameSpaced = mod.namespaced || false | |
try { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable no-unused-vars */ | |
const AWS = require('aws-sdk'); | |
const client = new AWS.S3({ | |
accessKeyId: process.env.AWS_ACCESS_KEY_ID, | |
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY, | |
apiVersion: '2006-03-01', | |
}); | |
exports.Images = class Images { | |
constructor(options, app) { | |
this.options = options || {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable import/no-duplicates */ | |
/* eslint-disable no-console */ | |
const publicVapidKey = import.meta.env.VITE_VID_PUBLIC | |
const isClient = (): boolean => Boolean(typeof window !== 'undefined' && 'serviceWorker' in navigator) | |
const unSubscribe = async() => { | |
if (isClient) { | |
const reg = await navigator.serviceWorker.register('worker.js', { scope: '/' }) | |
const subscription = await reg.pushManager.getSubscription() |
OlderNewer