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

adonis-cockpit

Package Overview
Dependencies
Maintainers
0
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

adonis-cockpit - npm Package Compare versions

Comparing version 0.0.0-20241011111314 to 0.0.0-20241011115302

4

build/configure.js

@@ -55,3 +55,3 @@ import { stubsRoot } from './stubs/main.js';

const ace = await command.app.container.make('ace');
await ace.exec('add', ['vinejs']);
await ace.exec('add', ['@adonisjs/inertia']);
},

@@ -124,3 +124,3 @@ },

}
await codemods.registerVitePlugin(`cockpit()`, [
await codemods.registerVitePlugin(`cockpit({ entrypoints: ['inertia/app/cockpit.ts'] })`, [
{ isNamed: false, module: 'adonis-cockpit/vite', identifier: 'cockpit' },

@@ -127,0 +127,0 @@ ]);

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

import { DefineComponent } from 'vue';
import { PluginOptions } from './vue/index.js';
export declare function resolvePage(name: string): Promise<DefineComponent> | undefined;
export declare function resolvePage(name: string): any;
export default function createCockpitApp(config: {
resolve: (name: string) => any;
}, pluginOptions: PluginOptions): any;
import { createApp, h } from 'vue';
import { createInertiaApp } from '@inertiajs/vue3';
import CockpitPlugin from './vue/index.js';
import { resolvePageComponent } from '@adonisjs/inertia/helpers';
const appName = 'Cockpit';
// WARNING: We cannot use import.meta.glob as vite cannot resolve them when optimized
const pages = {
'home': () => import('../../resources/pages/home.vue'),
'resources/edit': () => import('../../resources/pages/resources/edit.vue'),
'resources/create': () => import('../../resources/pages/resources/create.vue'),
'resources/index': () => import('../../resources/pages/resources/index.vue'),
'resources/detail': () => import('../../resources/pages/resources/detail.vue'),
};
export function resolvePage(name) {
if (name.startsWith('cockpit::')) {
const strippedName = name.replace('cockpit::', '');
return resolvePageComponent(`../../resources/pages/${strippedName}.vue`, import.meta.glob('../../resources/pages/**/*.vue'));
return pages[strippedName]();
}

@@ -11,0 +18,0 @@ }

@@ -13,2 +13,4 @@ import { BaseResource } from './base_resource.js';

name() {
// WARNING: Model must be booted or table name can be taken from mixin (idk why)
this.model.boot();
return this.model.table;

@@ -15,0 +17,0 @@ }

{
"name": "adonis-cockpit",
"description": "",
"version": "0.0.0-20241011111314",
"version": "0.0.0-20241011115302",
"engines": {

@@ -6,0 +6,0 @@ "node": ">=20.6.0"

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