Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

egg-born-module-a-base-sync

Package Overview
Dependencies
Maintainers
1
Versions
354
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

egg-born-module-a-base-sync - npm Package Compare versions

Comparing version 1.2.14 to 1.2.15

3

backend/src/config/config.js

@@ -77,2 +77,5 @@ // eslint-disable-next-line

// public dir
config.publicDir = '';
// comment

@@ -79,0 +82,0 @@ config.comment = {

@@ -0,1 +1,5 @@

const path = require('path');
const require3 = require('require3');
const fse = require3('fs-extra');
const _modulesLocales = {};

@@ -37,2 +41,28 @@ const _locales = {};

// get forward url
getForwardUrl(path) {
const prefix = (ctx.app.meta.isTest || ctx.app.meta.isLocal) ? ctx.app.config.static.prefix : '/public/';
return `${prefix}${ctx.instance.id}/${path}`;
}
// get root path
async getRootPath() {
if (ctx.app.meta.isTest || ctx.app.meta.isLocal) {
return ctx.app.config.static.dir;
}
const dir = ctx.config.module(moduleInfo.relativeName).publicDir || path.join(require('os').homedir(), 'cabloy', ctx.app.name, 'public');
await fse.ensureDir(dir);
return dir;
}
// get path
async getPath(subdir, ensure) {
const rootPath = await this.getRootPath();
const dir = path.join(rootPath, ctx.instance.id.toString(), subdir || '');
if (ensure) {
await fse.ensureDir(dir);
}
return dir;
}
modules() {

@@ -39,0 +69,0 @@ if (!_modulesLocales[ctx.locale]) {

2

package.json
{
"name": "egg-born-module-a-base-sync",
"version": "1.2.14",
"version": "1.2.15",
"title": "Base",

@@ -5,0 +5,0 @@ "eggBornModule": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc