@axium/server 0.34.2 → 0.34.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/linking.js +2 -2
- package/dist/main.js +0 -3
- package/package.json +1 -1
package/dist/linking.js
CHANGED
|
@@ -12,14 +12,14 @@ function info(id) {
|
|
|
12
12
|
return [text, link];
|
|
13
13
|
}
|
|
14
14
|
export function* listRouteLinks(options = {}) {
|
|
15
|
-
if (!options.only) {
|
|
15
|
+
if (!options.only || !options.only.length) {
|
|
16
16
|
const [text, link] = info('#builtin');
|
|
17
17
|
yield { text, id: '#builtin', from: link, to: resolve(import.meta.dirname, '../routes') };
|
|
18
18
|
}
|
|
19
19
|
for (const plugin of plugins.values()) {
|
|
20
20
|
if (!plugin.server?.routes)
|
|
21
21
|
continue;
|
|
22
|
-
if (options.only && !options.only.includes(plugin.name))
|
|
22
|
+
if (options.only && options.only.length && !options.only.includes(plugin.name))
|
|
23
23
|
continue;
|
|
24
24
|
const [text, link] = info(plugin.name);
|
|
25
25
|
const to = resolve(join(plugin.dirname, plugin.server.routes));
|
package/dist/main.js
CHANGED
|
@@ -186,7 +186,6 @@ try {
|
|
|
186
186
|
io.warn('Invalid timeout value, using default.');
|
|
187
187
|
io.setCommandTimeout(timeout);
|
|
188
188
|
}),
|
|
189
|
-
packagesDir: new Option('-p, --packages-dir <dir>', 'the directory to look for packages in'),
|
|
190
189
|
};
|
|
191
190
|
axiumDB = program.command('db').alias('database').description('Manage the database').addOption(opts.timeout);
|
|
192
191
|
axiumDB
|
|
@@ -755,7 +754,6 @@ try {
|
|
|
755
754
|
.description('Install Axium server')
|
|
756
755
|
.addOption(opts.force)
|
|
757
756
|
.addOption(opts.check)
|
|
758
|
-
.addOption(opts.packagesDir)
|
|
759
757
|
.option('-s, --skip', 'Skip already initialized steps', false)
|
|
760
758
|
.action(async (opt) => {
|
|
761
759
|
await db.init(opt).catch(io.exit);
|
|
@@ -789,7 +787,6 @@ try {
|
|
|
789
787
|
program
|
|
790
788
|
.command('link')
|
|
791
789
|
.description('Link routes provided by plugins and the server')
|
|
792
|
-
.addOption(opts.packagesDir)
|
|
793
790
|
.addOption(new Option('-l, --list', 'list route links').conflicts('delete'))
|
|
794
791
|
.option('-d, --delete', 'delete route links')
|
|
795
792
|
.argument('[name...]', 'List of plugin names to operate on. If not specified, operates on all plugins and built-in routes.')
|