New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@athenna/core

Package Overview
Dependencies
Maintainers
0
Versions
218
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@athenna/core - npm Package Compare versions

Comparing version 5.3.0 to 5.4.0

2

package.json
{
"name": "@athenna/core",
"version": "5.3.0",
"version": "5.4.0",
"description": "One foundation for multiple applications.",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -17,2 +17,3 @@ /**

getVite(): any;
getViteConfig(vite: any): Promise<any>;
}

@@ -54,29 +54,4 @@ /**

const vite = this.getVite();
tasks.addPromise('Compiling static files using vite', async () => {
const defaultConfig = {
root: Path.pwd(),
assetsUrl: '/assets',
buildDirectory: 'public/assets',
logLevel: Config.get('rc.bootLogs', true) ? 'info' : 'silent',
build: {
assetsDir: '',
manifest: true,
emptyOutDir: true,
outDir: 'public/assets',
assetsInlineLimit: 0,
rollupOptions: {
output: {
entryFileNames: '[name].js',
chunkFileNames: '[name].js',
assetFileNames: '[name].[ext]'
},
input: ['src/resources/css/app.scss', 'src/resources/js/app.js']
}
}
};
const { config: fileConfig } = await vite.loadConfigFromFile({
command: 'build',
mode: 'production'
}, undefined, Path.pwd());
const config = vite.mergeConfig(defaultConfig, fileConfig);
tasks.addPromise(`Compiling static files using ${Color.yellow.bold('vite')}`, async () => {
const config = await this.getViteConfig(vite);
return vite.build(config);

@@ -107,2 +82,38 @@ });

}
async getViteConfig(vite) {
const defaultConfig = {
root: Path.pwd(),
assetsUrl: '/assets',
buildDirectory: 'public/assets',
logLevel: 'silent',
css: {
preprocessorOptions: {
scss: {
api: 'modern'
}
}
},
build: {
assetsDir: '',
manifest: true,
emptyOutDir: true,
outDir: 'public/assets',
assetsInlineLimit: 0,
rollupOptions: {
output: {
entryFileNames: '[name].js',
chunkFileNames: '[name].js',
assetFileNames: '[name].[ext]'
}
}
}
};
const { config: fileConfig } = await vite.loadConfigFromFile({
command: 'build',
mode: 'development'
}, undefined, Path.pwd());
const config = vite.mergeConfig(defaultConfig, fileConfig);
await vite.build(config);
return config;
}
}

@@ -109,0 +120,0 @@ __decorate([

@@ -19,2 +19,3 @@ /**

getNodemon(): any;
getViteConfig(vite: any): Promise<any>;
}

@@ -32,39 +32,11 @@ /**

if (this.vite) {
const vite = this.getVite();
const PluginRestart = this.getVitePluginRestart();
const defaultConfig = {
root: Path.pwd(),
assetsUrl: '/assets',
buildDirectory: 'public/assets',
logLevel: Config.get('rc.bootLogs', true) ? 'info' : 'silent',
build: {
watch: this.watch
? {
clearScreen: true,
include: 'src/resources/views/**/*.edge',
exclude: 'node_modules/**'
}
: undefined,
assetsDir: '',
manifest: true,
emptyOutDir: true,
outDir: 'public/assets',
assetsInlineLimit: 0,
rollupOptions: {
output: {
entryFileNames: '[name].js',
chunkFileNames: '[name].js',
assetFileNames: '[name].[ext]'
},
input: ['src/resources/css/app.scss', 'src/resources/js/app.js']
}
},
plugins: [PluginRestart({ reload: ['src/resources/views/**/*.edge'] })]
};
const { config: fileConfig } = await vite.loadConfigFromFile({
command: 'build',
mode: 'development'
}, undefined, Path.pwd());
const config = vite.mergeConfig(defaultConfig, fileConfig);
vite.build(config);
const formerNodeEnv = Env('NODE_ENV');
const vite = await this.getVite();
const config = await this.getViteConfig(vite);
await vite.build(config);
Log.channelOrVanilla('application').success('Static files successfully compiled with ({yellow} vite)');
/**
* Vite changes NODE_ENV when building which we need to avoid.
*/
process.env.NODE_ENV = formerNodeEnv;
}

@@ -81,2 +53,3 @@ if (this.watch) {

'.fleet',
'public',
'node_modules/**/node_modules'

@@ -100,3 +73,3 @@ ],

nodemon
.on('start', () => {
.on('start', async () => {
if (isFirstRestart) {

@@ -106,2 +79,13 @@ return;

console.clear();
if (this.vite) {
const formerNodeEnv = Env('NODE_ENV');
const vite = await this.getVite();
const config = await this.getViteConfig(vite);
await vite.build(config);
Log.channelOrVanilla('application').success('Static files successfully recompiled with ({yellow} vite)');
/**
* Vite changes NODE_ENV when building which we need to avoid.
*/
process.env.NODE_ENV = formerNodeEnv;
}
Log.channelOrVanilla('application').success('Application successfully restarted');

@@ -128,2 +112,38 @@ })

}
async getViteConfig(vite) {
const defaultConfig = {
root: Path.pwd(),
assetsUrl: '/assets',
buildDirectory: 'public/assets',
logLevel: 'silent',
css: {
preprocessorOptions: {
scss: {
api: 'modern'
}
}
},
build: {
assetsDir: '',
manifest: true,
emptyOutDir: true,
outDir: 'public/assets',
assetsInlineLimit: 0,
rollupOptions: {
output: {
entryFileNames: '[name].js',
chunkFileNames: '[name].js',
assetFileNames: '[name].[ext]'
}
}
}
};
const { config: fileConfig } = await vite.loadConfigFromFile({
command: 'build',
mode: 'development'
}, undefined, Path.pwd());
const config = vite.mergeConfig(defaultConfig, fileConfig);
await vite.build(config);
return config;
}
}

@@ -130,0 +150,0 @@ __decorate([

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