@qodalis/cli-server-abstractions 1.0.0-beta.2
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/LICENSE +21 -0
- package/README.md +80 -0
- package/dist/cli-command-author.d.ts +11 -0
- package/dist/cli-command-author.d.ts.map +1 -0
- package/dist/cli-command-author.js +14 -0
- package/dist/cli-command-author.js.map +1 -0
- package/dist/cli-command-parameter-descriptor.d.ts +18 -0
- package/dist/cli-command-parameter-descriptor.d.ts.map +1 -0
- package/dist/cli-command-parameter-descriptor.js +21 -0
- package/dist/cli-command-parameter-descriptor.js.map +1 -0
- package/dist/cli-command-processor.d.ts +29 -0
- package/dist/cli-command-processor.d.ts.map +1 -0
- package/dist/cli-command-processor.js +15 -0
- package/dist/cli-command-processor.js.map +1 -0
- package/dist/cli-module.d.ts +28 -0
- package/dist/cli-module.d.ts.map +1 -0
- package/dist/cli-module.js +12 -0
- package/dist/cli-module.js.map +1 -0
- package/dist/cli-process-command.d.ts +9 -0
- package/dist/cli-process-command.d.ts.map +1 -0
- package/dist/cli-process-command.js +3 -0
- package/dist/cli-process-command.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/package.json +35 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Qodalis Solutions
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# @qodalis/cli-server-abstractions
|
|
2
|
+
|
|
3
|
+
Shared interfaces and base classes for building [Qodalis CLI](https://qodalis.com/) command processors. **Zero framework dependencies** — install this package when writing plugins, without pulling in Express, cors, or ws.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @qodalis/cli-server-abstractions
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
Create a custom command processor by extending `CliCommandProcessor`:
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import {
|
|
17
|
+
CliCommandProcessor,
|
|
18
|
+
CliProcessCommand,
|
|
19
|
+
CliCommandParameterDescriptor,
|
|
20
|
+
} from '@qodalis/cli-server-abstractions';
|
|
21
|
+
|
|
22
|
+
export class GreetCommandProcessor extends CliCommandProcessor {
|
|
23
|
+
command = 'greet';
|
|
24
|
+
description = 'Greets a user by name';
|
|
25
|
+
parameters = [
|
|
26
|
+
new CliCommandParameterDescriptor('--name', 'Name to greet', true),
|
|
27
|
+
];
|
|
28
|
+
|
|
29
|
+
async handleAsync(command: CliProcessCommand): Promise<string> {
|
|
30
|
+
const name = command.args['name'] || 'World';
|
|
31
|
+
return `Hello, ${name}!`;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Then register the processor with the server package. See [`@qodalis/cli-server-node`](https://www.npmjs.com/package/@qodalis/cli-server-node) for server setup.
|
|
37
|
+
|
|
38
|
+
## API Reference
|
|
39
|
+
|
|
40
|
+
### Interfaces
|
|
41
|
+
|
|
42
|
+
| Interface | Description |
|
|
43
|
+
|-----------|-------------|
|
|
44
|
+
| `ICliCommandProcessor` | Contract for command processors: command name, description, author, parameters, sub-processors, and `handleAsync()` |
|
|
45
|
+
| `ICliCommandAuthor` | Author metadata: `name` and `email` |
|
|
46
|
+
| `ICliCommandParameterDescriptor` | Parameter declaration: name, type, required flag, aliases, default value |
|
|
47
|
+
| `CliProcessCommand` | Parsed command input: command name, value, args, chain commands, raw input, data payload |
|
|
48
|
+
|
|
49
|
+
### Classes
|
|
50
|
+
|
|
51
|
+
| Class | Description |
|
|
52
|
+
|-------|-------------|
|
|
53
|
+
| `CliCommandProcessor` | Abstract base class implementing `ICliCommandProcessor` with sensible defaults |
|
|
54
|
+
| `CliCommandAuthor` | Simple implementation of `ICliCommandAuthor` |
|
|
55
|
+
| `CliCommandParameterDescriptor` | Simple implementation of `ICliCommandParameterDescriptor` |
|
|
56
|
+
|
|
57
|
+
### Constants
|
|
58
|
+
|
|
59
|
+
| Constant | Description |
|
|
60
|
+
|----------|-------------|
|
|
61
|
+
| `DefaultLibraryAuthor` | Default `ICliCommandAuthor` instance used when no author is specified |
|
|
62
|
+
|
|
63
|
+
### `CliCommandProcessor` Members
|
|
64
|
+
|
|
65
|
+
| Member | Type | Default | Description |
|
|
66
|
+
|--------|------|---------|-------------|
|
|
67
|
+
| `command` | `string` | *(abstract)* | The command name users type to invoke this processor |
|
|
68
|
+
| `description` | `string` | *(abstract)* | Human-readable description shown in help |
|
|
69
|
+
| `author` | `ICliCommandAuthor` | `DefaultLibraryAuthor` | Author metadata |
|
|
70
|
+
| `version` | `string` | `'1.0.0'` | Processor version |
|
|
71
|
+
| `apiVersion` | `number` | `1` | Minimum API version this processor targets |
|
|
72
|
+
| `allowUnlistedCommands` | `boolean?` | `undefined` | Accept sub-commands not in `processors` list |
|
|
73
|
+
| `valueRequired` | `boolean?` | `undefined` | Whether a positional value argument is required |
|
|
74
|
+
| `processors` | `ICliCommandProcessor[]?` | `undefined` | Nested sub-command processors |
|
|
75
|
+
| `parameters` | `ICliCommandParameterDescriptor[]?` | `undefined` | Declared parameters for autocompletion and validation |
|
|
76
|
+
| `handleAsync(command)` | method | *(abstract)* | Execute the command, return result string |
|
|
77
|
+
|
|
78
|
+
## License
|
|
79
|
+
|
|
80
|
+
MIT
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface ICliCommandAuthor {
|
|
2
|
+
name: string;
|
|
3
|
+
email: string;
|
|
4
|
+
}
|
|
5
|
+
export declare class CliCommandAuthor implements ICliCommandAuthor {
|
|
6
|
+
name: string;
|
|
7
|
+
email: string;
|
|
8
|
+
constructor(name: string, email: string);
|
|
9
|
+
}
|
|
10
|
+
export declare const DefaultLibraryAuthor: ICliCommandAuthor;
|
|
11
|
+
//# sourceMappingURL=cli-command-author.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-command-author.d.ts","sourceRoot":"","sources":["../src/cli-command-author.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,qBAAa,gBAAiB,YAAW,iBAAiB;IAE3C,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,MAAM;gBADb,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM;CAE3B;AAED,eAAO,MAAM,oBAAoB,EAAE,iBAGlC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DefaultLibraryAuthor = exports.CliCommandAuthor = void 0;
|
|
4
|
+
class CliCommandAuthor {
|
|
5
|
+
name;
|
|
6
|
+
email;
|
|
7
|
+
constructor(name, email) {
|
|
8
|
+
this.name = name;
|
|
9
|
+
this.email = email;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.CliCommandAuthor = CliCommandAuthor;
|
|
13
|
+
exports.DefaultLibraryAuthor = new CliCommandAuthor('Nicolae Lupei', 'nicolae.lupei@qodalis.com');
|
|
14
|
+
//# sourceMappingURL=cli-command-author.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-command-author.js","sourceRoot":"","sources":["../src/cli-command-author.ts"],"names":[],"mappings":";;;AAKA,MAAa,gBAAgB;IAEd;IACA;IAFX,YACW,IAAY,EACZ,KAAa;QADb,SAAI,GAAJ,IAAI,CAAQ;QACZ,UAAK,GAAL,KAAK,CAAQ;IACrB,CAAC;CACP;AALD,4CAKC;AAEY,QAAA,oBAAoB,GAAsB,IAAI,gBAAgB,CACvE,eAAe,EACf,2BAA2B,CAC9B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface ICliCommandParameterDescriptor {
|
|
2
|
+
name: string;
|
|
3
|
+
aliases?: string[];
|
|
4
|
+
description: string;
|
|
5
|
+
required: boolean;
|
|
6
|
+
type: string;
|
|
7
|
+
defaultValue?: any;
|
|
8
|
+
}
|
|
9
|
+
export declare class CliCommandParameterDescriptor implements ICliCommandParameterDescriptor {
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
required: boolean;
|
|
13
|
+
type: string;
|
|
14
|
+
aliases?: string[] | undefined;
|
|
15
|
+
defaultValue?: any | undefined;
|
|
16
|
+
constructor(name: string, description: string, required?: boolean, type?: string, aliases?: string[] | undefined, defaultValue?: any | undefined);
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=cli-command-parameter-descriptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-command-parameter-descriptor.d.ts","sourceRoot":"","sources":["../src/cli-command-parameter-descriptor.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,8BAA8B;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,GAAG,CAAC;CACtB;AAED,qBAAa,6BAA8B,YAAW,8BAA8B;IAErE,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,MAAM;IACnB,QAAQ,EAAE,OAAO;IACjB,IAAI,EAAE,MAAM;IACZ,OAAO,CAAC,EAAE,MAAM,EAAE;IAClB,YAAY,CAAC,EAAE,GAAG;gBALlB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,QAAQ,GAAE,OAAe,EACzB,IAAI,GAAE,MAAiB,EACvB,OAAO,CAAC,EAAE,MAAM,EAAE,YAAA,EAClB,YAAY,CAAC,EAAE,GAAG,YAAA;CAEhC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CliCommandParameterDescriptor = void 0;
|
|
4
|
+
class CliCommandParameterDescriptor {
|
|
5
|
+
name;
|
|
6
|
+
description;
|
|
7
|
+
required;
|
|
8
|
+
type;
|
|
9
|
+
aliases;
|
|
10
|
+
defaultValue;
|
|
11
|
+
constructor(name, description, required = false, type = 'string', aliases, defaultValue) {
|
|
12
|
+
this.name = name;
|
|
13
|
+
this.description = description;
|
|
14
|
+
this.required = required;
|
|
15
|
+
this.type = type;
|
|
16
|
+
this.aliases = aliases;
|
|
17
|
+
this.defaultValue = defaultValue;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.CliCommandParameterDescriptor = CliCommandParameterDescriptor;
|
|
21
|
+
//# sourceMappingURL=cli-command-parameter-descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-command-parameter-descriptor.js","sourceRoot":"","sources":["../src/cli-command-parameter-descriptor.ts"],"names":[],"mappings":";;;AASA,MAAa,6BAA6B;IAE3B;IACA;IACA;IACA;IACA;IACA;IANX,YACW,IAAY,EACZ,WAAmB,EACnB,WAAoB,KAAK,EACzB,OAAe,QAAQ,EACvB,OAAkB,EAClB,YAAkB;QALlB,SAAI,GAAJ,IAAI,CAAQ;QACZ,gBAAW,GAAX,WAAW,CAAQ;QACnB,aAAQ,GAAR,QAAQ,CAAiB;QACzB,SAAI,GAAJ,IAAI,CAAmB;QACvB,YAAO,GAAP,OAAO,CAAW;QAClB,iBAAY,GAAZ,YAAY,CAAM;IAC1B,CAAC;CACP;AATD,sEASC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ICliCommandAuthor } from './cli-command-author';
|
|
2
|
+
import { ICliCommandParameterDescriptor } from './cli-command-parameter-descriptor';
|
|
3
|
+
import { CliProcessCommand } from './cli-process-command';
|
|
4
|
+
export interface ICliCommandProcessor {
|
|
5
|
+
command: string;
|
|
6
|
+
description: string;
|
|
7
|
+
author: ICliCommandAuthor;
|
|
8
|
+
allowUnlistedCommands?: boolean;
|
|
9
|
+
valueRequired?: boolean;
|
|
10
|
+
version: string;
|
|
11
|
+
/** Minimum API version this processor is available in. Defaults to 1. */
|
|
12
|
+
apiVersion?: number;
|
|
13
|
+
processors?: ICliCommandProcessor[];
|
|
14
|
+
parameters?: ICliCommandParameterDescriptor[];
|
|
15
|
+
handleAsync(command: CliProcessCommand): Promise<string>;
|
|
16
|
+
}
|
|
17
|
+
export declare abstract class CliCommandProcessor implements ICliCommandProcessor {
|
|
18
|
+
abstract command: string;
|
|
19
|
+
abstract description: string;
|
|
20
|
+
author: ICliCommandAuthor;
|
|
21
|
+
allowUnlistedCommands?: boolean;
|
|
22
|
+
valueRequired?: boolean;
|
|
23
|
+
version: string;
|
|
24
|
+
apiVersion: number;
|
|
25
|
+
processors?: ICliCommandProcessor[];
|
|
26
|
+
parameters?: ICliCommandParameterDescriptor[];
|
|
27
|
+
abstract handleAsync(command: CliProcessCommand): Promise<string>;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=cli-command-processor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-command-processor.d.ts","sourceRoot":"","sources":["../src/cli-command-processor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAwB,MAAM,sBAAsB,CAAC;AAC/E,OAAO,EAAE,8BAA8B,EAAE,MAAM,oCAAoC,CAAC;AACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,MAAM,WAAW,oBAAoB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,yEAAyE;IACzE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACpC,UAAU,CAAC,EAAE,8BAA8B,EAAE,CAAC;IAC9C,WAAW,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC5D;AAED,8BAAsB,mBAAoB,YAAW,oBAAoB;IACrE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,MAAM,EAAE,iBAAiB,CAAwB;IACjD,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,EAAE,MAAM,CAAW;IAC1B,UAAU,EAAE,MAAM,CAAK;IACvB,UAAU,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACpC,UAAU,CAAC,EAAE,8BAA8B,EAAE,CAAC;IAE9C,QAAQ,CAAC,WAAW,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC;CACpE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CliCommandProcessor = void 0;
|
|
4
|
+
const cli_command_author_1 = require("./cli-command-author");
|
|
5
|
+
class CliCommandProcessor {
|
|
6
|
+
author = cli_command_author_1.DefaultLibraryAuthor;
|
|
7
|
+
allowUnlistedCommands;
|
|
8
|
+
valueRequired;
|
|
9
|
+
version = '1.0.0';
|
|
10
|
+
apiVersion = 1;
|
|
11
|
+
processors;
|
|
12
|
+
parameters;
|
|
13
|
+
}
|
|
14
|
+
exports.CliCommandProcessor = CliCommandProcessor;
|
|
15
|
+
//# sourceMappingURL=cli-command-processor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-command-processor.js","sourceRoot":"","sources":["../src/cli-command-processor.ts"],"names":[],"mappings":";;;AAAA,6DAA+E;AAkB/E,MAAsB,mBAAmB;IAGrC,MAAM,GAAsB,yCAAoB,CAAC;IACjD,qBAAqB,CAAW;IAChC,aAAa,CAAW;IACxB,OAAO,GAAW,OAAO,CAAC;IAC1B,UAAU,GAAW,CAAC,CAAC;IACvB,UAAU,CAA0B;IACpC,UAAU,CAAoC;CAGjD;AAZD,kDAYC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ICliCommandProcessor } from './cli-command-processor';
|
|
2
|
+
import { ICliCommandAuthor } from './cli-command-author';
|
|
3
|
+
/**
|
|
4
|
+
* Represents a module that bundles one or more command processors.
|
|
5
|
+
*/
|
|
6
|
+
export interface ICliModule {
|
|
7
|
+
/** Unique name of the module. */
|
|
8
|
+
name: string;
|
|
9
|
+
/** Module version. */
|
|
10
|
+
version: string;
|
|
11
|
+
/** Short description of the module. */
|
|
12
|
+
description: string;
|
|
13
|
+
/** Author of the module. */
|
|
14
|
+
author: ICliCommandAuthor;
|
|
15
|
+
/** Command processors provided by this module. */
|
|
16
|
+
processors: ICliCommandProcessor[];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Base class for CLI modules providing sensible defaults.
|
|
20
|
+
*/
|
|
21
|
+
export declare abstract class CliModule implements ICliModule {
|
|
22
|
+
abstract name: string;
|
|
23
|
+
abstract version: string;
|
|
24
|
+
abstract description: string;
|
|
25
|
+
author: ICliCommandAuthor;
|
|
26
|
+
abstract processors: ICliCommandProcessor[];
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=cli-module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-module.d.ts","sourceRoot":"","sources":["../src/cli-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAwB,MAAM,sBAAsB,CAAC;AAE/E;;GAEG;AACH,MAAM,WAAW,UAAU;IACvB,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAC;IAEb,sBAAsB;IACtB,OAAO,EAAE,MAAM,CAAC;IAEhB,uCAAuC;IACvC,WAAW,EAAE,MAAM,CAAC;IAEpB,4BAA4B;IAC5B,MAAM,EAAE,iBAAiB,CAAC;IAE1B,kDAAkD;IAClD,UAAU,EAAE,oBAAoB,EAAE,CAAC;CACtC;AAED;;GAEG;AACH,8BAAsB,SAAU,YAAW,UAAU;IACjD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,MAAM,EAAE,iBAAiB,CAAwB;IACjD,QAAQ,CAAC,UAAU,EAAE,oBAAoB,EAAE,CAAC;CAC/C"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CliModule = void 0;
|
|
4
|
+
const cli_command_author_1 = require("./cli-command-author");
|
|
5
|
+
/**
|
|
6
|
+
* Base class for CLI modules providing sensible defaults.
|
|
7
|
+
*/
|
|
8
|
+
class CliModule {
|
|
9
|
+
author = cli_command_author_1.DefaultLibraryAuthor;
|
|
10
|
+
}
|
|
11
|
+
exports.CliModule = CliModule;
|
|
12
|
+
//# sourceMappingURL=cli-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-module.js","sourceRoot":"","sources":["../src/cli-module.ts"],"names":[],"mappings":";;;AACA,6DAA+E;AAsB/E;;GAEG;AACH,MAAsB,SAAS;IAI3B,MAAM,GAAsB,yCAAoB,CAAC;CAEpD;AAND,8BAMC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-process-command.d.ts","sourceRoot":"","sources":["../src/cli-process-command.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-process-command.js","sourceRoot":"","sources":["../src/cli-process-command.ts"],"names":[],"mappings":""}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ICliCommandAuthor, CliCommandAuthor, DefaultLibraryAuthor } from './cli-command-author';
|
|
2
|
+
export { CliProcessCommand } from './cli-process-command';
|
|
3
|
+
export { ICliCommandParameterDescriptor, CliCommandParameterDescriptor } from './cli-command-parameter-descriptor';
|
|
4
|
+
export { ICliCommandProcessor, CliCommandProcessor } from './cli-command-processor';
|
|
5
|
+
export { ICliModule, CliModule } from './cli-module';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjG,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,8BAA8B,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACnH,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACpF,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CliModule = exports.CliCommandProcessor = exports.CliCommandParameterDescriptor = exports.DefaultLibraryAuthor = exports.CliCommandAuthor = void 0;
|
|
4
|
+
var cli_command_author_1 = require("./cli-command-author");
|
|
5
|
+
Object.defineProperty(exports, "CliCommandAuthor", { enumerable: true, get: function () { return cli_command_author_1.CliCommandAuthor; } });
|
|
6
|
+
Object.defineProperty(exports, "DefaultLibraryAuthor", { enumerable: true, get: function () { return cli_command_author_1.DefaultLibraryAuthor; } });
|
|
7
|
+
var cli_command_parameter_descriptor_1 = require("./cli-command-parameter-descriptor");
|
|
8
|
+
Object.defineProperty(exports, "CliCommandParameterDescriptor", { enumerable: true, get: function () { return cli_command_parameter_descriptor_1.CliCommandParameterDescriptor; } });
|
|
9
|
+
var cli_command_processor_1 = require("./cli-command-processor");
|
|
10
|
+
Object.defineProperty(exports, "CliCommandProcessor", { enumerable: true, get: function () { return cli_command_processor_1.CliCommandProcessor; } });
|
|
11
|
+
var cli_module_1 = require("./cli-module");
|
|
12
|
+
Object.defineProperty(exports, "CliModule", { enumerable: true, get: function () { return cli_module_1.CliModule; } });
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiG;AAArE,sHAAA,gBAAgB,OAAA;AAAE,0HAAA,oBAAoB,OAAA;AAElE,uFAAmH;AAA1E,iJAAA,6BAA6B,OAAA;AACtE,iEAAoF;AAArD,4HAAA,mBAAmB,OAAA;AAClD,2CAAqD;AAAhC,uGAAA,SAAS,OAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@qodalis/cli-server-abstractions",
|
|
3
|
+
"version": "1.0.0-beta.2",
|
|
4
|
+
"description": "Shared interfaces and base classes for Qodalis CLI command processors — zero framework dependencies",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"LICENSE",
|
|
10
|
+
"README.md"
|
|
11
|
+
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "tsc"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"cli",
|
|
17
|
+
"qodalis",
|
|
18
|
+
"terminal",
|
|
19
|
+
"commands",
|
|
20
|
+
"cli-server",
|
|
21
|
+
"command-processor",
|
|
22
|
+
"abstractions"
|
|
23
|
+
],
|
|
24
|
+
"author": "Nicolae Lupei <nicolae.lupei@qodalis.com>",
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "https://github.com/qodalis-solutions/cli-server-node",
|
|
29
|
+
"directory": "packages/abstractions"
|
|
30
|
+
},
|
|
31
|
+
"homepage": "https://qodalis.com/",
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"typescript": "^5.6.0"
|
|
34
|
+
}
|
|
35
|
+
}
|