@qodalis/cli-string 0.0.1
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/README.md +16 -0
- package/esm2022/lib/cli-string.module.mjs +19 -0
- package/esm2022/lib/processors/cli-string-command-processor.mjs +31 -0
- package/esm2022/public-api.mjs +6 -0
- package/esm2022/qodalis-cli-string.mjs +5 -0
- package/fesm2022/qodalis-cli-string.mjs +58 -0
- package/fesm2022/qodalis-cli-string.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/cli-string.module.d.ts +6 -0
- package/lib/processors/cli-string-command-processor.d.ts +13 -0
- package/package.json +54 -0
- package/public-api.d.ts +2 -0
- package/umd/index.js +86 -0
package/README.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Cli extension
|
|
2
|
+
|
|
3
|
+
The `@qodalis/string` package is a CLI extension designed to provide string utilities.
|
|
4
|
+
|
|
5
|
+
# Installation
|
|
6
|
+
|
|
7
|
+
````bash
|
|
8
|
+
packages add @qodalis/cli-string
|
|
9
|
+
|
|
10
|
+
# Usage
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
|
|
14
|
+
````
|
|
15
|
+
|
|
16
|
+
This command downloads and registers the extension for use within the CLI environment.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { resolveCommandProcessorProvider } from '@qodalis/angular-cli';
|
|
3
|
+
import { CliStringCommandProcessor } from './processors/cli-string-command-processor';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export class CliStringModule {
|
|
6
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CliStringModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
7
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: CliStringModule }); }
|
|
8
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CliStringModule, providers: [resolveCommandProcessorProvider(CliStringCommandProcessor)] }); }
|
|
9
|
+
}
|
|
10
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CliStringModule, decorators: [{
|
|
11
|
+
type: NgModule,
|
|
12
|
+
args: [{
|
|
13
|
+
declarations: [],
|
|
14
|
+
imports: [],
|
|
15
|
+
exports: [],
|
|
16
|
+
providers: [resolveCommandProcessorProvider(CliStringCommandProcessor)],
|
|
17
|
+
}]
|
|
18
|
+
}] });
|
|
19
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xpLXN0cmluZy5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9zdHJpbmcvc3JjL2xpYi9jbGktc3RyaW5nLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sRUFBRSwrQkFBK0IsRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBQ3ZFLE9BQU8sRUFBRSx5QkFBeUIsRUFBRSxNQUFNLDJDQUEyQyxDQUFDOztBQVF0RixNQUFNLE9BQU8sZUFBZTsrR0FBZixlQUFlO2dIQUFmLGVBQWU7Z0hBQWYsZUFBZSxhQUZiLENBQUMsK0JBQStCLENBQUMseUJBQXlCLENBQUMsQ0FBQzs7NEZBRTlELGVBQWU7a0JBTjNCLFFBQVE7bUJBQUM7b0JBQ04sWUFBWSxFQUFFLEVBQUU7b0JBQ2hCLE9BQU8sRUFBRSxFQUFFO29CQUNYLE9BQU8sRUFBRSxFQUFFO29CQUNYLFNBQVMsRUFBRSxDQUFDLCtCQUErQixDQUFDLHlCQUF5QixDQUFDLENBQUM7aUJBQzFFIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgTmdNb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7IHJlc29sdmVDb21tYW5kUHJvY2Vzc29yUHJvdmlkZXIgfSBmcm9tICdAcW9kYWxpcy9hbmd1bGFyLWNsaSc7XG5pbXBvcnQgeyBDbGlTdHJpbmdDb21tYW5kUHJvY2Vzc29yIH0gZnJvbSAnLi9wcm9jZXNzb3JzL2NsaS1zdHJpbmctY29tbWFuZC1wcm9jZXNzb3InO1xuXG5ATmdNb2R1bGUoe1xuICAgIGRlY2xhcmF0aW9uczogW10sXG4gICAgaW1wb3J0czogW10sXG4gICAgZXhwb3J0czogW10sXG4gICAgcHJvdmlkZXJzOiBbcmVzb2x2ZUNvbW1hbmRQcm9jZXNzb3JQcm92aWRlcihDbGlTdHJpbmdDb21tYW5kUHJvY2Vzc29yKV0sXG59KVxuZXhwb3J0IGNsYXNzIENsaVN0cmluZ01vZHVsZSB7fVxuIl19
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { DefaultLibraryAuthor, ObjectDescriber, } from '@qodalis/cli-core';
|
|
3
|
+
import * as _ from 'lodash';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export class CliStringCommandProcessor {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.command = 'string';
|
|
8
|
+
this.description = 'String commands';
|
|
9
|
+
this.author = DefaultLibraryAuthor;
|
|
10
|
+
this.processors = [];
|
|
11
|
+
this.processors = ObjectDescriber.describe(_.default, {
|
|
12
|
+
filter: ({ args }) => {
|
|
13
|
+
const skip = args.length === 0 || args[0] !== 'string';
|
|
14
|
+
return !skip;
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
async processCommand(command, context) {
|
|
19
|
+
context.executor.showHelp(command, context);
|
|
20
|
+
}
|
|
21
|
+
writeDescription(context) {
|
|
22
|
+
context.writer.writeln("Provides string commands using lodash's string functions");
|
|
23
|
+
context.writer.writeln('Documentation: https://lodash.com/docs');
|
|
24
|
+
}
|
|
25
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CliStringCommandProcessor, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
26
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CliStringCommandProcessor }); }
|
|
27
|
+
}
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CliStringCommandProcessor, decorators: [{
|
|
29
|
+
type: Injectable
|
|
30
|
+
}], ctorParameters: function () { return []; } });
|
|
31
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xpLXN0cmluZy1jb21tYW5kLXByb2Nlc3Nvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3N0cmluZy9zcmMvbGliL3Byb2Nlc3NvcnMvY2xpLXN0cmluZy1jb21tYW5kLXByb2Nlc3Nvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzNDLE9BQU8sRUFFSCxvQkFBb0IsRUFHcEIsZUFBZSxHQUNsQixNQUFNLG1CQUFtQixDQUFDO0FBQzNCLE9BQU8sS0FBSyxDQUFDLE1BQU0sUUFBUSxDQUFDOztBQUc1QixNQUFNLE9BQU8seUJBQXlCO0lBU2xDO1FBUkEsWUFBTyxHQUFHLFFBQVEsQ0FBQztRQUVuQixnQkFBVyxHQUFHLGlCQUFpQixDQUFDO1FBRWhDLFdBQU0sR0FBRyxv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ihjb250ZXh0OiBJQ2xpRXhlY3V0aW9uQ29udGV4dCk6IHZvaWQge1xuICAgICAgICBjb250ZXh0LndyaXRlci53cml0ZWxuKFxuICAgICAgICAgICAgXCJQcm92aWRlcyBzdHJpbmcgY29tbWFuZHMgdXNpbmcgbG9kYXNoJ3Mgc3RyaW5nIGZ1bmN0aW9uc1wiLFxuICAgICAgICApO1xuICAgICAgICBjb250ZXh0LndyaXRlci53cml0ZWxuKCdEb2N1bWVudGF0aW9uOiBodHRwczovL2xvZGFzaC5jb20vZG9jcycpO1xuICAgIH1cbn1cbiJdfQ==
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Public API Surface of string
|
|
3
|
+
*/
|
|
4
|
+
export * from './lib/cli-string.module';
|
|
5
|
+
export * from './lib/processors/cli-string-command-processor';
|
|
6
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL3N0cmluZy9zcmMvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMseUJBQXlCLENBQUM7QUFFeEMsY0FBYywrQ0FBK0MsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2Ygc3RyaW5nXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9saWIvY2xpLXN0cmluZy5tb2R1bGUnO1xuXG5leHBvcnQgKiBmcm9tICcuL2xpYi9wcm9jZXNzb3JzL2NsaS1zdHJpbmctY29tbWFuZC1wcm9jZXNzb3InO1xuIl19
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './public-api';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicW9kYWxpcy1jbGktc3RyaW5nLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vcHJvamVjdHMvc3RyaW5nL3NyYy9xb2RhbGlzLWNsaS1zdHJpbmcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, NgModule } from '@angular/core';
|
|
3
|
+
import { resolveCommandProcessorProvider } from '@qodalis/angular-cli';
|
|
4
|
+
import { DefaultLibraryAuthor, ObjectDescriber } from '@qodalis/cli-core';
|
|
5
|
+
import * as _ from 'lodash';
|
|
6
|
+
|
|
7
|
+
class CliStringCommandProcessor {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.command = 'string';
|
|
10
|
+
this.description = 'String commands';
|
|
11
|
+
this.author = DefaultLibraryAuthor;
|
|
12
|
+
this.processors = [];
|
|
13
|
+
this.processors = ObjectDescriber.describe(_.default, {
|
|
14
|
+
filter: ({ args }) => {
|
|
15
|
+
const skip = args.length === 0 || args[0] !== 'string';
|
|
16
|
+
return !skip;
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
async processCommand(command, context) {
|
|
21
|
+
context.executor.showHelp(command, context);
|
|
22
|
+
}
|
|
23
|
+
writeDescription(context) {
|
|
24
|
+
context.writer.writeln("Provides string commands using lodash's string functions");
|
|
25
|
+
context.writer.writeln('Documentation: https://lodash.com/docs');
|
|
26
|
+
}
|
|
27
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CliStringCommandProcessor, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
28
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CliStringCommandProcessor }); }
|
|
29
|
+
}
|
|
30
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CliStringCommandProcessor, decorators: [{
|
|
31
|
+
type: Injectable
|
|
32
|
+
}], ctorParameters: function () { return []; } });
|
|
33
|
+
|
|
34
|
+
class CliStringModule {
|
|
35
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CliStringModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
36
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: CliStringModule }); }
|
|
37
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CliStringModule, providers: [resolveCommandProcessorProvider(CliStringCommandProcessor)] }); }
|
|
38
|
+
}
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CliStringModule, decorators: [{
|
|
40
|
+
type: NgModule,
|
|
41
|
+
args: [{
|
|
42
|
+
declarations: [],
|
|
43
|
+
imports: [],
|
|
44
|
+
exports: [],
|
|
45
|
+
providers: [resolveCommandProcessorProvider(CliStringCommandProcessor)],
|
|
46
|
+
}]
|
|
47
|
+
}] });
|
|
48
|
+
|
|
49
|
+
/*
|
|
50
|
+
* Public API Surface of string
|
|
51
|
+
*/
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Generated bundle index. Do not edit.
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
export { CliStringCommandProcessor, CliStringModule };
|
|
58
|
+
//# sourceMappingURL=qodalis-cli-string.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qodalis-cli-string.mjs","sources":["../../../projects/string/src/lib/processors/cli-string-command-processor.ts","../../../projects/string/src/lib/cli-string.module.ts","../../../projects/string/src/public-api.ts","../../../projects/string/src/qodalis-cli-string.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport {\n CliProcessCommand,\n DefaultLibraryAuthor,\n ICliCommandProcessor,\n ICliExecutionContext,\n ObjectDescriber,\n} from '@qodalis/cli-core';\nimport * as _ from 'lodash';\n\n@Injectable()\nexport class CliStringCommandProcessor implements ICliCommandProcessor {\n command = 'string';\n\n description = 'String commands';\n\n author = DefaultLibraryAuthor;\n\n processors?: ICliCommandProcessor[] | undefined = [];\n\n constructor() {\n this.processors = ObjectDescriber.describe((_ as any).default, {\n filter: ({ args }) => {\n const skip = args.length === 0 || args[0] !== 'string';\n return !skip;\n },\n });\n }\n\n async processCommand(\n command: CliProcessCommand,\n context: ICliExecutionContext,\n ): Promise<void> {\n context.executor.showHelp(command, context);\n }\n\n writeDescription(context: ICliExecutionContext): void {\n context.writer.writeln(\n \"Provides string commands using lodash's string functions\",\n );\n context.writer.writeln('Documentation: https://lodash.com/docs');\n }\n}\n","import { NgModule } from '@angular/core';\nimport { resolveCommandProcessorProvider } from '@qodalis/angular-cli';\nimport { CliStringCommandProcessor } from './processors/cli-string-command-processor';\n\n@NgModule({\n declarations: [],\n imports: [],\n exports: [],\n providers: [resolveCommandProcessorProvider(CliStringCommandProcessor)],\n})\nexport class CliStringModule {}\n","/*\n * Public API Surface of string\n */\n\nexport * from './lib/cli-string.module';\n\nexport * from './lib/processors/cli-string-command-processor';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAWa,yBAAyB,CAAA;AASlC,IAAA,WAAA,GAAA;QARA,IAAO,CA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mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,aAFb,CAAC,+BAA+B,CAAC,yBAAyB,CAAC,CAAC,EAAA,CAAA,CAAA,EAAA;;4FAE9D,eAAe,EAAA,UAAA,EAAA,CAAA;kBAN3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE,EAAE;AAChB,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,SAAS,EAAE,CAAC,+BAA+B,CAAC,yBAAyB,CAAC,CAAC;AAC1E,iBAAA,CAAA;;;ACTD;;AAEG;;ACFH;;AAEG;;;;"}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class CliStringModule {
|
|
3
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CliStringModule, never>;
|
|
4
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<CliStringModule, never, never, never>;
|
|
5
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<CliStringModule>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CliProcessCommand, ICliCommandProcessor, ICliExecutionContext } from '@qodalis/cli-core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class CliStringCommandProcessor implements ICliCommandProcessor {
|
|
4
|
+
command: string;
|
|
5
|
+
description: string;
|
|
6
|
+
author: import("@qodalis/cli-core").ICliCommandAuthor;
|
|
7
|
+
processors?: ICliCommandProcessor[] | undefined;
|
|
8
|
+
constructor();
|
|
9
|
+
processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
|
|
10
|
+
writeDescription(context: ICliExecutionContext): void;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CliStringCommandProcessor, never>;
|
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CliStringCommandProcessor>;
|
|
13
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@qodalis/cli-string",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "An Angular CLI extension that provides speed test utilities",
|
|
5
|
+
"author": "Nicolae Lupei, Qodalis Solutions",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/qodalis-solutions/angular-web-cli"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://qodalis.com",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"angular",
|
|
14
|
+
"cli",
|
|
15
|
+
"qodalis",
|
|
16
|
+
"terminal",
|
|
17
|
+
"string"
|
|
18
|
+
],
|
|
19
|
+
"umd": "./umd/index.js",
|
|
20
|
+
"unpkg": "./umd/index.js",
|
|
21
|
+
"peerDependencies": {
|
|
22
|
+
"@angular/common": "^16.2.0",
|
|
23
|
+
"@angular/core": "^16.2.0"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@qodalis/angular-cli": "^1.0.17",
|
|
27
|
+
"@qodalis/cli-core": "^0.0.5",
|
|
28
|
+
"lodash": "^4.17.21",
|
|
29
|
+
"@types/lodash": "^4.17.14",
|
|
30
|
+
"tslib": "^2.3.0"
|
|
31
|
+
},
|
|
32
|
+
"sideEffects": false,
|
|
33
|
+
"cliDependencies": [
|
|
34
|
+
{
|
|
35
|
+
"name": "lodash",
|
|
36
|
+
"globalName": "_",
|
|
37
|
+
"version": "4.17.21",
|
|
38
|
+
"url": "https://unpkg.com/lodash@4.17.21/lodash.js"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"module": "fesm2022/qodalis-cli-string.mjs",
|
|
42
|
+
"typings": "index.d.ts",
|
|
43
|
+
"exports": {
|
|
44
|
+
"./package.json": {
|
|
45
|
+
"default": "./package.json"
|
|
46
|
+
},
|
|
47
|
+
".": {
|
|
48
|
+
"types": "./index.d.ts",
|
|
49
|
+
"esm2022": "./esm2022/qodalis-cli-string.mjs",
|
|
50
|
+
"esm": "./esm2022/qodalis-cli-string.mjs",
|
|
51
|
+
"default": "./fesm2022/qodalis-cli-string.mjs"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
package/public-api.d.ts
ADDED
package/umd/index.js
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('@qodalis/cli-core'), require('@angular/core'), require('lodash')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['@qodalis/cli-core', '@angular/core', 'lodash'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.cliCore, global.ngCore, global._));
|
|
5
|
+
})(this, (function (cliCore, core, _) { 'use strict';
|
|
6
|
+
|
|
7
|
+
function _interopNamespaceDefault(e) {
|
|
8
|
+
var n = Object.create(null);
|
|
9
|
+
if (e) {
|
|
10
|
+
Object.keys(e).forEach(function (k) {
|
|
11
|
+
if (k !== 'default') {
|
|
12
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
13
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return e[k]; }
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
n.default = e;
|
|
21
|
+
return Object.freeze(n);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
var ___namespace = /*#__PURE__*/_interopNamespaceDefault(_);
|
|
25
|
+
|
|
26
|
+
/******************************************************************************
|
|
27
|
+
Copyright (c) Microsoft Corporation.
|
|
28
|
+
|
|
29
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
30
|
+
purpose with or without fee is hereby granted.
|
|
31
|
+
|
|
32
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
33
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
34
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
35
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
36
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
37
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
38
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
39
|
+
***************************************************************************** */
|
|
40
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
function __decorate(decorators, target, key, desc) {
|
|
44
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
45
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
46
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
47
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
51
|
+
var e = new Error(message);
|
|
52
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
let CliStringCommandProcessor = class CliStringCommandProcessor {
|
|
56
|
+
constructor() {
|
|
57
|
+
this.command = 'string';
|
|
58
|
+
this.description = 'String commands';
|
|
59
|
+
this.author = cliCore.DefaultLibraryAuthor;
|
|
60
|
+
this.processors = [];
|
|
61
|
+
this.processors = cliCore.ObjectDescriber.describe(___namespace.default, {
|
|
62
|
+
filter: ({ args }) => {
|
|
63
|
+
const skip = args.length === 0 || args[0] !== 'string';
|
|
64
|
+
return !skip;
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
async processCommand(command, context) {
|
|
69
|
+
context.executor.showHelp(command, context);
|
|
70
|
+
}
|
|
71
|
+
writeDescription(context) {
|
|
72
|
+
context.writer.writeln("Provides string commands using lodash's string functions");
|
|
73
|
+
context.writer.writeln('Documentation: https://lodash.com/docs');
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
CliStringCommandProcessor = __decorate([
|
|
77
|
+
core.Injectable()
|
|
78
|
+
], CliStringCommandProcessor);
|
|
79
|
+
|
|
80
|
+
const module = {
|
|
81
|
+
name: '@qodalis/cli-string',
|
|
82
|
+
processors: [new CliStringCommandProcessor()],
|
|
83
|
+
};
|
|
84
|
+
cliCore.bootUmdModule(module);
|
|
85
|
+
|
|
86
|
+
}));
|