Compare commits

..

23 Commits

Author SHA1 Message Date
5e2225669d 4.0.11 2024-05-28 13:42:11 +02:00
a4a3343b1d fix(core): update 2024-05-28 13:42:10 +02:00
e10e8cf90d 4.0.10 2024-04-14 01:02:06 +02:00
19900d088e fix(core): update 2024-04-14 01:02:06 +02:00
3e5793f842 4.0.9 2024-04-12 18:24:32 +02:00
4fd13e65c4 fix(core): update 2024-04-12 18:24:31 +02:00
e5a8bbf4a3 update npmextra.json: githost 2024-04-01 21:34:10 +02:00
f28589603b update npmextra.json: githost 2024-04-01 19:57:50 +02:00
fed411a30f update npmextra.json: githost 2024-03-30 21:46:48 +01:00
2328801f03 4.0.8 2023-08-19 09:47:04 +02:00
60883fed6d fix(core): update 2023-08-19 09:47:03 +02:00
e9fc5b98f2 4.0.7 2023-07-12 15:09:53 +02:00
fef954c423 fix(core): update 2023-07-12 15:09:53 +02:00
39408d9832 switch to new org scheme 2023-07-11 00:25:26 +02:00
26d9b3e9cc switch to new org scheme 2023-07-10 02:42:41 +02:00
5f027430bf 4.0.6 2022-08-07 11:40:46 +02:00
d3385782ed fix(core): update 2022-08-07 11:40:45 +02:00
7384b54e09 4.0.5 2022-08-04 12:22:49 +02:00
0eac72e15d fix(core): update 2022-08-04 12:22:49 +02:00
b7957b0ab6 4.0.4 2022-08-03 20:21:54 +02:00
99a0a9ca81 fix(core): update 2022-08-03 20:21:54 +02:00
bd66903419 4.0.3 2022-08-03 18:48:40 +02:00
740d8dac35 fix(core): update 2022-08-03 18:48:40 +02:00
14 changed files with 7219 additions and 15111 deletions

View File

@ -0,0 +1,66 @@
name: Default (not tags)
on:
push:
tags-ignore:
- '**'
env:
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
jobs:
security:
runs-on: ubuntu-latest
continue-on-error: true
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Install pnpm and npmci
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
- name: Run npm prepare
run: npmci npm prepare
- name: Audit production dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --prod
continue-on-error: true
- name: Audit development dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --dev
continue-on-error: true
test:
if: ${{ always() }}
needs: security
runs-on: ubuntu-latest
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Test stable
run: |
npmci node install stable
npmci npm install
npmci npm test
- name: Test build
run: |
npmci node install stable
npmci npm install
npmci npm build

View File

@ -0,0 +1,124 @@
name: Default (tags)
on:
push:
tags:
- '*'
env:
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
jobs:
security:
runs-on: ubuntu-latest
continue-on-error: true
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
npmci npm prepare
- name: Audit production dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --prod
continue-on-error: true
- name: Audit development dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --dev
continue-on-error: true
test:
if: ${{ always() }}
needs: security
runs-on: ubuntu-latest
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
npmci npm prepare
- name: Test stable
run: |
npmci node install stable
npmci npm install
npmci npm test
- name: Test build
run: |
npmci node install stable
npmci npm install
npmci npm build
release:
needs: test
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
npmci npm prepare
- name: Release
run: |
npmci node install stable
npmci npm publish
metadata:
needs: test
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
container:
image: ${{ env.IMAGE }}
continue-on-error: true
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
npmci npm prepare
- name: Code quality
run: |
npmci command npm install -g typescript
npmci npm install
- name: Trigger
run: npmci trigger
- name: Build docs and upload artifacts
run: |
npmci node install stable
npmci npm install
pnpm install -g @git.zone/tsdoc
npmci command tsdoc
continue-on-error: true

View File

@ -1,128 +0,0 @@
# gitzone ci_default
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
cache:
paths:
- .npmci_cache/
key: '$CI_BUILD_STAGE'
stages:
- security
- test
- release
- metadata
before_script:
- npm install -g @shipzone/npmci
# ====================
# security stage
# ====================
auditProductionDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security
script:
- npmci npm prepare
- npmci command npm install --production --ignore-scripts
- npmci command npm config set registry https://registry.npmjs.org
- npmci command npm audit --audit-level=high --only=prod --production
tags:
- docker
allow_failure: true
auditDevDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security
script:
- npmci npm prepare
- npmci command npm install --ignore-scripts
- npmci command npm config set registry https://registry.npmjs.org
- npmci command npm audit --audit-level=high --only=dev
tags:
- docker
allow_failure: true
# ====================
# test stage
# ====================
testStable:
stage: test
script:
- npmci npm prepare
- npmci node install stable
- npmci npm install
- npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
testBuild:
stage: test
script:
- npmci npm prepare
- npmci node install stable
- npmci npm install
- npmci command npm run build
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
release:
stage: release
script:
- npmci node install stable
- npmci npm publish
only:
- tags
tags:
- lossless
- docker
- notpriv
# ====================
# metadata stage
# ====================
codequality:
stage: metadata
allow_failure: true
only:
- tags
script:
- npmci command npm install -g typescript
- npmci npm prepare
- npmci npm install
tags:
- lossless
- docker
- priv
trigger:
stage: metadata
script:
- npmci trigger
only:
- tags
tags:
- lossless
- docker
- notpriv
pages:
stage: metadata
script:
- npmci node install stable
- npmci npm prepare
- npmci npm install
- npmci command npm run buildDocs
tags:
- lossless
- docker
- notpriv
only:
- tags
artifacts:
expire_in: 1 week
paths:
- public
allow_failure: true

View File

@ -6,12 +6,27 @@
"gitzone": {
"projectType": "npm",
"module": {
"githost": "gitlab.com",
"gitscope": "pushrocks",
"githost": "code.foss.global",
"gitscope": "push.rocks",
"gitrepo": "smartcli",
"description": "easy observable cli tasks",
"npmPackagename": "@pushrocks/smartcli",
"license": "MIT"
"description": "A library for easily creating observable CLI tasks with support for commands, arguments, and options.",
"npmPackagename": "@push.rocks/smartcli",
"license": "MIT",
"keywords": [
"CLI",
"command line",
"observable",
"tasks",
"commands",
"arguments",
"options",
"typescript",
"node.js",
"development tool"
]
}
},
"tsdoc": {
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
}
}

14874
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,14 +1,14 @@
{
"name": "@pushrocks/smartcli",
"name": "@push.rocks/smartcli",
"private": false,
"version": "4.0.2",
"description": "easy observable cli tasks",
"version": "4.0.11",
"description": "A library for easily creating observable CLI tasks with support for commands, arguments, and options.",
"main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts",
"type": "module",
"scripts": {
"test": "(tstest test/ --web)",
"build": "(tsbuild --web)",
"build": "(tsbuild --web --allowimplicitany)",
"buildDocs": "tsdoc"
},
"repository": {
@ -16,10 +16,16 @@
"url": "https://gitlab.com/pushrocks/smartcli.git"
},
"keywords": [
"cli",
"promise",
"task",
"push.rocks"
"CLI",
"command line",
"observable",
"tasks",
"commands",
"arguments",
"options",
"typescript",
"node.js",
"development tool"
],
"author": "Lossless GmbH <office@lossless.com> (https://lossless.com)",
"license": "MIT",
@ -28,21 +34,19 @@
},
"homepage": "https://gitlab.com/pushrocks/smartcli",
"dependencies": {
"@pushrocks/lik": "^6.0.0",
"@pushrocks/smartlog": "^3.0.1",
"@pushrocks/smartparam": "^1.1.6",
"@pushrocks/smartpromise": "^3.1.3",
"@pushrocks/smartrx": "^2.0.25",
"@types/yargs": "^17.0.10",
"@types/yargs-parser": "^21.0.0",
"yargs-parser": "^21.0.1"
"@push.rocks/lik": "^6.0.15",
"@push.rocks/smartlog": "^3.0.6",
"@push.rocks/smartobject": "^1.0.12",
"@push.rocks/smartpromise": "^4.0.3",
"@push.rocks/smartrx": "^3.0.3",
"yargs-parser": "21.1.1"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.1.25",
"@gitzone/tsrun": "^1.2.12",
"@gitzone/tstest": "^1.0.52",
"@pushrocks/tapbundle": "^5.0.4",
"@types/node": "^18.6.3"
"@git.zone/tsbuild": "^2.1.80",
"@git.zone/tsrun": "^1.2.42",
"@git.zone/tstest": "^1.0.90",
"@push.rocks/tapbundle": "^5.0.23",
"@types/node": "^20.12.12"
},
"files": [
"ts/**/*",

6825
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

1
readme.hints.md Normal file
View File

@ -0,0 +1 @@
No specific hints.

173
readme.md
View File

@ -1,76 +1,133 @@
# @pushrocks/smartcli
# @push.rocks/smartcli
easy observable cli tasks
## Availabililty and Links
* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/smartcli)
* [gitlab.com (source)](https://gitlab.com/pushrocks/smartcli)
* [github.com (source mirror)](https://github.com/pushrocks/smartcli)
* [docs (typedoc)](https://pushrocks.gitlab.io/smartcli/)
## Install
## Status for master
To install `@push.rocks/smartcli`, use the following command in your terminal:
Status Category | Status Badge
-- | --
GitLab Pipelines | [![pipeline status](https://gitlab.com/pushrocks/smartcli/badges/master/pipeline.svg)](https://lossless.cloud)
GitLab Pipline Test Coverage | [![coverage report](https://gitlab.com/pushrocks/smartcli/badges/master/coverage.svg)](https://lossless.cloud)
npm | [![npm downloads per month](https://badgen.net/npm/dy/@pushrocks/smartcli)](https://lossless.cloud)
Snyk | [![Known Vulnerabilities](https://badgen.net/snyk/pushrocks/smartcli)](https://lossless.cloud)
TypeScript Support | [![TypeScript](https://badgen.net/badge/TypeScript/>=%203.x/blue?icon=typescript)](https://lossless.cloud)
node Support | [![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](https://lossless.cloud)
PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@pushrocks/smartcli)](https://lossless.cloud)
PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@pushrocks/smartcli)](https://lossless.cloud)
BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@pushrocks/smartcli)](https://lossless.cloud)
Platform support | [![Supports Windows 10](https://badgen.net/badge/supports%20Windows%2010/yes/green?icon=windows)](https://lossless.cloud) [![Supports Mac OS X](https://badgen.net/badge/supports%20Mac%20OS%20X/yes/green?icon=apple)](https://lossless.cloud)
```sh
npm install @push.rocks/smartcli --save
```
This will add `@push.rocks/smartcli` as a dependency to your project's `package.json` file and download it into the `node_modules` folder.
## Usage
this plugin tries to establish some logic in which CLI tools work.
The `@push.rocks/smartcli` module is designed to simplify the creation of command-line interfaces (CLIs) by providing an easy-to-use API for managing CLI commands and options. It combines observables with the parsing power of [yargs-parser](https://www.npmjs.com/package/yargs-parser) to offer a dynamic and flexible way to handle various CLI tasks.
take the following commandline input:
### Getting Started
```
mytool command argument1 argument2 --option1 -o2 option2Value
First, ensure you have TypeScript and the necessary types for node installed in your project. If not, you can add them by running:
```sh
npm install typescript @types/node --save-dev
```
- `mytool` obviously is the tool (like git)
- `command` is the main thing the tool shall do (like commit)
- `argument1` and `argument2` are arguments
- `option1` is a longform option you can add (like --message for message)
- `optionValue` is the referenced option value (like a commit message)
Then, import the `Smartcli` class from the `@push.rocks/smartcli` package.
When there is no command and no option specified the standardTask applied.
When there is a option specified but no command, standardTask applies,
except when of the options is -v, --version or --help.
```javascript
import { Smartcli } from 'smartcli';
mySmartcli = new Smartcli();
mySmartcli.standardTask().then((argvArg) => {
// do something if program is called without an command
});
mySmartcli.addCommand({ commandname: 'install' }).then((argvArg) => {
// do something if program is called with command "install"
});
mySmartcli.addVersion('1.0.0'); // -v and --version options will display the specified version in the terminal
mySmartCli.addHelp({
// is triggered by help command and --help option
helpText: 'some help text to print', // the helpText to display
});
mySmartcli.startParse(); // starts the evaluation and fullfills or rejects promises.
```typescript
import { Smartcli } from '@push.rocks/smartcli';
```
## Contribution
### Creating an Instance
We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can [contribute one time](https://lossless.link/contribute-onetime) or [contribute monthly](https://lossless.link/contribute). :)
Create an instance of `Smartcli`. This instance will be used to define and manage your CLI commands.
For further information read the linked docs at the top of this readme.
```typescript
const mySmartcli = new Smartcli();
```
> MIT licensed | **&copy;** [Lossless GmbH](https://lossless.gmbh)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
### Defining Commands
[![repo-footer](https://lossless.gitlab.io/publicrelations/repofooter.svg)](https://maintainedby.lossless.com)
With `Smartcli`, you can define commands that your CLI tool can execute. Here's how you can add a new command:
```typescript
mySmartcli.addCommand('install').subscribe((argv) => {
console.log('Install command was called with arguments:', argv);
});
```
In this example, when the user types `install` after your CLI tool's name in the terminal, the provided function will execute, printing the parsed arguments to the console.
### Handling Options
Options can be accessed using the `getOption` method. If you have an option named `--config` or `-c`, you can access its value like this:
```typescript
const configValue = mySmartcli.getOption('config');
console.log('Config value:', configValue);
```
### Default Task (Standard Command)
If you want to perform a task when no specific command is provided, you can use the `standardCommand` method:
```typescript
mySmartcli.standardCommand().subscribe((argv) => {
console.log('No specific command provided. Running default task with arguments:', argv);
});
```
### Version and Help
To add a version option that prints the version of your CLI tool, use `addVersion`:
```typescript
mySmartcli.addVersion('1.0.0');
```
For a help option that displays helpful information about your CLI commands and options, use `addHelp`:
```typescript
mySmartcli.addHelp({
helpText: 'Here are the commands you can use...'
});
```
### Parsing and Execution
After defining all your commands and options, call `startParse` to begin parsing the command line input and execute the corresponding actions:
```typescript
mySmartcli.startParse();
```
### Advanced Usage: Command Aliases
You can also define aliases for your commands, allowing users to use alternate names for them:
```typescript
mySmartcli.addCommandAlias('install', 'i');
```
With this setup, both `install` and `i` will trigger the same command action.
### Observables and Async Operations
Since commands in `smartcli` are handled using observables, you can easily integrate asynchronous operations within your command actions. This makes it perfect for CLI tasks that involve file operations, network requests, or any other async tasks.
### Conclusion
`@push.rocks/smartcli` offers a robust and intuitive way to build CLI tools with TypeScript, leveraging the reactive programming paradigm. By following the examples provided in this guide, you'll be able to create a feature-rich command-line application tailored to your specific needs.
Remember, this is just the start. The true power of `smartcli` lies in its flexibility and the vast ecosystem of RxJS. Dive into the RxJS documentation to explore more ways to handle data streams and asynchronous events in your CLI app.
## License and Legal Information
This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository.
**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
### Trademarks
This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.
### Company Information
Task Venture Capital GmbH
Registered at District court Bremen HRB 35230 HB, Germany
For any legal inquiries or if you require further information, please contact us via email at hello@task.vc.
By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.

View File

@ -1,5 +1,5 @@
import { tap, expect } from '@pushrocks/tapbundle';
import { Subject } from 'rxjs';
import { tap, expect } from '@push.rocks/tapbundle';
import * as smartrx from '@push.rocks/smartrx';
import * as smartcli from '../ts/index.js';
@ -11,8 +11,8 @@ tap.test('should create a new Smartcli', async () => {
tap.test('should add an command', async (toolsArg) => {
const done = toolsArg.defer();
const smartCliTestObject = new smartcli.Smartcli();
const awesomeCommandSubject = smartCliTestObject.addCommand('awesome')
expect(awesomeCommandSubject).toBeInstanceOf(Subject);
const awesomeCommandSubject = smartCliTestObject.addCommand('awesome');
expect(awesomeCommandSubject).toBeInstanceOf(smartrx.rxjs.Subject);
awesomeCommandSubject.subscribe(() => {
done.resolve();
});
@ -25,7 +25,7 @@ tap.test('should add an command', async (toolsArg) => {
tap.test('should start parsing a standardTask', async () => {
const smartCliTestObject = new smartcli.Smartcli();
expect(smartCliTestObject.standardCommand()).toBeInstanceOf(Subject);
expect(smartCliTestObject.standardCommand()).toBeInstanceOf(smartrx.rxjs.Subject);
});
let hasExecuted: boolean = false;

View File

@ -2,7 +2,7 @@
* autocreated commitinfo by @pushrocks/commitinfo
*/
export const commitinfo = {
name: '@pushrocks/smartcli',
version: '4.0.2',
description: 'easy observable cli tasks'
name: '@push.rocks/smartcli',
version: '4.0.11',
description: 'A library for easily creating observable CLI tasks with support for commands, arguments, and options.'
}

View File

@ -68,6 +68,12 @@ export class Smartcli {
return triggerSubject;
}
/**
* gets the command subject for the specified name.
* call this before calling .parse()
* @param commandNameArg
* @returns
*/
public getCommandSubject(commandNameArg: string) {
const triggerObservableObject = this.commandObservableMap.findSync(
(triggerObservableObjectArg) => {
@ -81,6 +87,14 @@ export class Smartcli {
}
}
/**
* getOption
*/
public getOption(optionNameArg: string) {
const parsedYargs = plugins.yargsParser(process.argv);
return parsedYargs[optionNameArg];
}
/**
* allows to specify help text to be printed above the rest of the help text
*/
@ -95,12 +109,6 @@ export class Smartcli {
*/
public addVersion(versionArg: string) {
this.version = versionArg;
this.addCommandAlias('v', 'version');
this.parseCompleted.promise.then((argv) => {
if (argv.v) {
console.log(this.version);
}
});
}
/**
@ -133,8 +141,15 @@ export class Smartcli {
return true;
}
});
const wantedCommand = parsedYArgs._[0];
// lets handle some standards
if (!wantedCommand && (parsedYArgs.v || parsedYArgs.version)) {
console.log(this.version || 'unknown version');
return;
}
console.log(`Wanted command: ${wantedCommand}`);
for (const command of this.commandObservableMap.getArray()) {
const wantedCommand = parsedYArgs._[0];
if (!wantedCommand) {
const standardCommand = this.commandObservableMap.findSync((commandArg) => {
return commandArg.commandName === 'standardCommand';
@ -146,7 +161,6 @@ export class Smartcli {
}
break;
}
console.log(`Wanted command: ${wantedCommand}`);
if (command.commandName === parsedYArgs._[0]) {
command.subject.next(parsedYArgs);
break;

View File

@ -1,10 +1,10 @@
// @pushrocks scope
import * as smartlog from '@pushrocks/smartlog';
import * as lik from '@pushrocks/lik';
import * as smartlog from '@push.rocks/smartlog';
import * as lik from '@push.rocks/lik';
import * as path from 'path';
import * as smartparam from '@pushrocks/smartparam';
import * as smartpromise from '@pushrocks/smartpromise';
import * as smartrx from '@pushrocks/smartrx';
import * as smartparam from '@push.rocks/smartobject';
import * as smartpromise from '@push.rocks/smartpromise';
import * as smartrx from '@push.rocks/smartrx';
export { smartlog, lik, path, smartparam, smartpromise, smartrx };

View File

@ -3,8 +3,12 @@
"experimentalDecorators": true,
"useDefineForClassFields": false,
"target": "ES2022",
"module": "ES2022",
"moduleResolution": "nodenext",
"esModuleInterop": true
}
"module": "NodeNext",
"moduleResolution": "NodeNext",
"esModuleInterop": true,
"verbatimModuleSyntax": true
},
"exclude": [
"dist_*/**/*.d.ts"
]
}