Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 0 additions & 43 deletions .codeclimate.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,9 @@ indent_size = 4
indent_style = space
indent_size = 2

[*.{yml,yaml}]
indent_style = space
indent_size = 2

[*.js]
quote_type = "double"
58 changes: 0 additions & 58 deletions .eslintrc.js

This file was deleted.

19 changes: 18 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x, 14.x, 16.x, 18.x, 20.x, 22.x, 24.x]
node-version: [20.x, 22.x, 24.x]
fail-fast: false

steps:
Expand All @@ -21,5 +21,22 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Start NATS
run: docker compose up -d && sleep 10
working-directory: ./test

- name: Check containers
run: docker compose ps
working-directory: ./test

- name: Check logs
run: docker compose logs
working-directory: ./test

- name: Execute tests
run: npm test
working-directory: ./

- name: Stop containers
run: docker compose down -v
working-directory: ./test
10 changes: 10 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"useTabs": true,
"printWidth": 100,
"trailingComma": "none",
"tabWidth": 4,
"singleQuote": false,
"semi": true,
"bracketSpacing": true,
"arrowParens": "avoid"
}
19 changes: 6 additions & 13 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,6 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Attach by Process ID",
"processId": "${command:PickProcess}",
"request": "attach",
"skipFiles": [
"<node_internals>/**"
],
"type": "pwa-node"
},
{
"type": "node",
"request": "launch",
Expand All @@ -21,11 +12,13 @@
"cwd": "${workspaceRoot}",
"args": [
"init",
"--answers",
"test/answers.json",
"--no-install",
"project",
"tmp"
"./templates/demo-hb",
"cli-demo",
"c:/tmp/cli-demo",
"--@username=icebob",
"--@fullName=\"Ice Bob\"",
"--@lint=false"
],
"console": "integratedTerminal"
}
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 MoleculerJS
Copyright (c) 2025 MoleculerJS

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@ Please send pull requests improving the usage and fixing bugs, improving documen
Moleculer-cli is available under the [MIT license](https://tldrlegal.com/license/mit-license).

## Contact
Copyright (c) 2022 MoleculerJS
Copyright (c) 2025 MoleculerJS

[![@moleculerjs](https://img.shields.io/badge/github-moleculerjs-green.svg)](https://github.com/moleculerjs) [![@MoleculerJS](https://img.shields.io/badge/twitter-MoleculerJS-blue.svg)](https://twitter.com/MoleculerJS)
40 changes: 22 additions & 18 deletions bin/moleculer.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,29 @@
* MIT Licensed
*/

const updateNotifier = require("update-notifier");
const pkg = require("../package.json");
const yargs = require("yargs");

updateNotifier({ pkg }).notify();
async function init() {
const updateNotifier = (await import("update-notifier")).default;

//console.log();
process.on("exit", function () {
//console.log();
});
updateNotifier({ pkg }).notify();

require("yargs")
.usage("Usage: $0 <command> [options]")
.version()
.command(require("./../src/init"))
.command(require("./../src/start"))
.command(require("./../src/create"))
.command(require("./../src/connect"))
.command(require("./../src/call"))
.command(require("./../src/emit"))
.command(require("./../src/alias-template"))
.help()
.argv;
process.on("exit", function () {
//console.log();
});

yargs
.usage("Usage: $0 <command> [options]")
.version()
.command(require("./../src/init"))
.command(require("./../src/start"))
.command(require("./../src/create"))
.command(require("./../src/connect"))
.command(require("./../src/call"))
.command(require("./../src/emit"))
.command(require("./../src/alias-template"))
.help().argv;
}

init();
66 changes: 66 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
const { defineConfig } = require("eslint/config");

const globals = require("globals");
const node = require("eslint-plugin-node");
const promise = require("eslint-plugin-promise");
//const security = require("eslint-plugin-security");
const prettier = require("eslint-plugin-prettier");
const js = require("@eslint/js");

const { FlatCompat } = require("@eslint/eslintrc");

const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

module.exports = defineConfig([
{
languageOptions: {
globals: {
...globals.node,
...globals.commonjs,
...Object.fromEntries(Object.entries(globals.jquery).map(([key]) => [key, "off"])),
...globals.jest,
...globals.jasmine
}
},

extends: compat.extends(
"eslint:recommended",
/*"plugin:security/recommended",*/ "plugin:prettier/recommended"
),

plugins: {
node,
promise,
prettier
//security,
},

rules: {
indent: [
"warn",
"tab",
{
SwitchCase: 1
}
],

semi: ["error", "always"],
"no-var": ["error"],
"no-console": 0,
"no-unused-vars": ["warn"],
"no-trailing-spaces": ["error"],
"no-alert": 0,
"no-shadow": 0,
"security/detect-object-injection": ["off"],
"security/detect-non-literal-require": ["off"],
"security/detect-non-literal-fs-filename": ["off"],
"no-process-exit": ["off"],
"node/no-unpublished-require": 0,
"no-async-promise-executor": 0
}
}
]);
Loading
Loading