@plexus-interop/cli
Advanced tools
Comparing version 0.2.4 to 0.2.6
@@ -8,4 +8,12 @@ "use strict"; | ||
var ValidateMetadataCommand_1 = require("./ValidateMetadataCommand"); | ||
var ValidateMetadataPatchCommand_1 = require("./ValidateMetadataPatchCommand"); | ||
function commands() { | ||
return [new GenTsCommand_1.GenTsCommand(), new GenJsonCommand_1.GenJsonCommand(), new GenProtoCommand_1.GenProtoCommand(), new GenCSharpCommand_1.GenCSharpCommand(), new ValidateMetadataCommand_1.ValidateMetadataCommand()]; | ||
return [ | ||
new GenTsCommand_1.GenTsCommand(), | ||
new GenJsonCommand_1.GenJsonCommand(), | ||
new GenProtoCommand_1.GenProtoCommand(), | ||
new GenCSharpCommand_1.GenCSharpCommand(), | ||
new ValidateMetadataCommand_1.ValidateMetadataCommand(), | ||
new ValidateMetadataPatchCommand_1.ValidateMetadataPatchCommand() | ||
]; | ||
} | ||
@@ -19,2 +27,2 @@ exports.commands = commands; | ||
exports.printGeneralHelp = printGeneralHelp; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWFuZHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvY29tbWFuZHMvY29tbWFuZHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFpQkEsK0NBQThDO0FBQzlDLG1EQUFrRDtBQUNsRCxxREFBb0Q7QUFDcEQsdURBQXNEO0FBQ3RELHFFQUFvRTtBQUVwRTtJQUNJLE1BQU0sQ0FBQyxDQUFDLElBQUksMkJBQVksRUFBRSxFQUFFLElBQUksK0JBQWMsRUFBRSxFQUFFLElBQUksaUNBQWUsRUFBRSxFQUFFLElBQUksbUNBQWdCLEVBQUUsRUFBRSxJQUFJLGlEQUF1QixFQUFFLENBQUMsQ0FBQztBQUNwSSxDQUFDO0FBRkQsNEJBRUM7QUFFRDtJQUNJLE9BQU8sQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLENBQUM7SUFDaEIsT0FBTyxDQUFDLEdBQUcsQ0FBQyx1REFBdUQsQ0FBQyxDQUFDO0lBQ3JFLE9BQU8sQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLENBQUM7QUFDcEIsQ0FBQztBQUpELDRDQUlDIn0= | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWFuZHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvY29tbWFuZHMvY29tbWFuZHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFpQkEsK0NBQThDO0FBQzlDLG1EQUFrRDtBQUNsRCxxREFBb0Q7QUFDcEQsdURBQXNEO0FBQ3RELHFFQUFvRTtBQUNwRSwrRUFBOEU7QUFFOUU7SUFDSSxNQUFNLENBQUM7UUFDSCxJQUFJLDJCQUFZLEVBQUU7UUFDbEIsSUFBSSwrQkFBYyxFQUFFO1FBQ3BCLElBQUksaUNBQWUsRUFBRTtRQUNyQixJQUFJLG1DQUFnQixFQUFFO1FBQ3RCLElBQUksaURBQXVCLEVBQUU7UUFDN0IsSUFBSSwyREFBNEIsRUFBRTtLQUNyQyxDQUFDO0FBQ04sQ0FBQztBQVRELDRCQVNDO0FBRUQ7SUFDSSxPQUFPLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxDQUFDO0lBQ2hCLE9BQU8sQ0FBQyxHQUFHLENBQUMsdURBQXVELENBQUMsQ0FBQztJQUNyRSxPQUFPLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxDQUFDO0FBQ3BCLENBQUM7QUFKRCw0Q0FJQyJ9 |
@@ -18,2 +18,3 @@ /** | ||
import { Option } from './Option'; | ||
export declare function targetBaseDir(): Option; | ||
export declare function baseDir(): Option; | ||
@@ -20,0 +21,0 @@ export declare function plexusEntryPoint(): Option; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var path = require("path"); | ||
function targetBaseDir() { | ||
return { | ||
shortName: 'tb', | ||
longName: 'targetBaseDir', | ||
exampleValue: 'target/folder', | ||
description: 'target metadata base directory', | ||
isRequired: true, | ||
defaultValue: process.cwd() | ||
}; | ||
} | ||
exports.targetBaseDir = targetBaseDir; | ||
function baseDir() { | ||
@@ -68,2 +79,2 @@ return { | ||
exports.verbose = verbose; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRGVmYXVsdE9wdGlvbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvY29tbWFuZHMvRGVmYXVsdE9wdGlvbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFpQkEsMkJBQTZCO0FBRTdCO0lBQ0ksTUFBTSxDQUFDO1FBQ0gsU0FBUyxFQUFFLEdBQUc7UUFDZCxRQUFRLEVBQUUsU0FBUztRQUNuQixZQUFZLEVBQUUsVUFBVTtRQUN4QixXQUFXLEVBQUUsZ0NBQWdDO1FBQzdDLFVBQVUsRUFBRSxJQUFJO1FBQ2hCLFlBQVksRUFBRSxPQUFPLENBQUMsR0FBRyxFQUFFO0tBQzlCLENBQUM7QUFDTixDQUFDO0FBVEQsMEJBU0M7QUFFRDtJQUNJLE1BQU0sQ0FBQztRQUNILFNBQVMsRUFBRSxHQUFHO1FBQ2QsUUFBUSxFQUFFLE9BQU87UUFDakIsWUFBWSxFQUFFLDRCQUE0QjtRQUMxQyxVQUFVLEVBQUUsSUFBSTtRQUNoQixXQUFXLEVBQUUsNkVBQTZFO0tBQzdGLENBQUM7QUFDTixDQUFDO0FBUkQsNENBUUM7QUFFRCxhQUFvQixZQUFzRDtJQUF0RCw2QkFBQSxFQUFBLGVBQXVCLElBQUksQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLEdBQUcsRUFBRSxFQUFFLEtBQUssQ0FBQztJQ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RUFBRSxrQkFBa0I7UUFDL0IsVUFBVSxFQUFFLElBQUk7UUFDaEIsWUFBWSxjQUFBO0tBQ2YsQ0FBQztBQUNOLENBQUM7QUFURCxrQkFTQztBQUVEO0lBQ0ksTUFBTSxDQUFDO1FBQ0gsU0FBUyxFQUFFLEdBQUc7UUFDZCxRQUFRLEVBQUUsS0FBSztRQUNmLFlBQVksRUFBRSxnQkFBZ0I7UUFDOUIsV0FBVyxFQUFFLGFBQWE7UUFDMUIsVUFBVSxFQUFFLEtBQUs7S0FDcEIsQ0FBQztBQUNOLENBQUM7QUFSRCwwQkFRQztBQUVELG1CQUEwQixZQUErQjtJQUEvQiw2QkFBQSxFQUFBLHVCQUErQjtJQUNyRCxNQUFNLENBQUM7UUFDSCxTQUFTLEVBQUUsR0FBRztRQUNkLFFBQVEsRUFBRSxXQUFXO1FBQ3JCLFlBQVksRUFBRSxRQUFRO1FBQ3RCLFVBQVUsRUFBRSxJQUFJO1FBQ2hCLFdBQVcsRUFBRSxXQUFXO1FBQ3hCLFlBQVksY0FBQTtLQUNmLENBQUM7QUFDTixDQUFDO0FBVEQsOEJBU0M7QUFFRDtJQUNJLE1BQU0sQ0FBQztRQUNILFNBQVMsRUFBRSxHQUFHO1FBQ2QsUUFBUSxFQUFFLFNBQVM7UUFDbkIsTUFBTSxFQUFFLElBQUk7UUFDWixXQUFXLEVBQUUsc0JBQXNCO0tBQ3RDLENBQUM7QUFDTixDQUFDO0FBUEQsMEJBT0MifQ== |
import { Option } from './Option'; | ||
import { BaseCommand } from './BaseCommand'; | ||
export declare class GenTsCommand extends BaseCommand { | ||
readonly protoRegexp: RegExp; | ||
clientGenArgs: (opts: any) => string[]; | ||
@@ -5,0 +6,0 @@ name: () => string; |
@@ -32,2 +32,3 @@ "use strict"; | ||
var _this = _super !== null && _super.apply(this, arguments) || this; | ||
_this.protoRegexp = /.+\.proto$/; | ||
_this.clientGenArgs = function (opts) { | ||
@@ -56,3 +57,3 @@ return ['--type=ts'].concat(_this.optionArgs(opts)); | ||
jsFilePath = path.join(opts.out, 'plexus-messages.js'); | ||
return [4 /*yield*/, files_1.listFiles(protoFilesDir, /.+\.proto/g)]; | ||
return [4 /*yield*/, files_1.listFiles(protoFilesDir, this.protoRegexp)]; | ||
case 2: | ||
@@ -86,2 +87,2 @@ protoFiles = _a.sent(); | ||
exports.GenTsCommand = GenTsCommand; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiR2VuVHNDb21tYW5kLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2NvbW1hbmRzL0dlblRzQ29tbWFuZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQTs7Ozs7Ozs7Ozs7Ozs7O0dBZUc7QUFDSCxtREFBc0Y7QUFFdEYsdUNBQW9FO0FBQ3BFLDZDQUE0QztBQUM1Qyw2Q0FBZ0Q7QUFDaEQsNkNBQXlFO0FBQ3pFLDJCQUE2QjtBQUM3Qix5Q0FBb0U7QUFDcEUscURBQW9EO0FBRXBEO0lBQWtDLHdDQUFXO0lBQTdDO1FBQUEscUVBMENDO1FBeENVLG1CQUFhLEdBQTRCLFVBQUEsSUFBSTtZQUNoRCxNQUFNLEVBQUUsV0FBVyxTQUFLLEtBQUksQ0FBQyxVQUFVLENBQUMsSUFBSSxDQUFDLEVBQUU7UUFDbkQsQ0FBQyxDQUFBO1FBRU0sVUFBSSxHQUFHLGNBQU0sT0FBQSxRQUFRLEVBQVIsQ0FBUSxDQUFDO1FBRXRCLHdCQUFrQixHQUFHLGNBQU0sT0FBQSwrRUFBK0UsRUFBL0UsQ0FBK0UsQ0FBQztRQUUzRyxhQUFPLEdBQW1CLGNBQU0sT0FBQSxDQUFDLHdCQUFPLEVBQUUsRUFBRSxvQkFBRyxFQUFFLEVBQUUsaUNBQWdCLEVBQUUsRUFBRSwwQkFBUyxFQUFFLEVBQUUsd0JBQU8sRUFB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FZIn0= |
@@ -57,3 +57,10 @@ "use strict"; | ||
}); }, 15000); | ||
it('Handles different proto files', function () { | ||
var genCommand = new GenTsCommand_1.GenTsCommand(); | ||
expect(genCommand.protoRegexp.test('src/authservice.proto')).toBeTruthy(); | ||
expect(genCommand.protoRegexp.test('authservice.proto')).toBeTruthy(); | ||
expect(genCommand.protoRegexp.test('AuthService_v1.proto')).toBeTruthy(); | ||
expect(genCommand.protoRegexp.test('src/auth_service.proto')).toBeTruthy(); | ||
}); | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiR2V0VHNDb21tYW5kLnNwZWMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi90ZXN0cy9jb21tYW5kcy9HZXRUc0NvbW1hbmQuc3BlYy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBZ0JBLGlCQWlDRzs7O0FBakRIOzs7Ozs7Ozs7Ozs7Ozs7R0FlRztBQUNILGlDQUE2RztBQUM3RywyQkFBNkI7QUFDN0IsZ0VBQStEO0FBRS9ELFFBQVEsQ0FBQyxrQ0FBa0MsRUFBRTtJQUV6QyxFQUFFLENBQUMsMkNBQTJDLEVBQUU7Ozs7O29CQUV0QyxRQUFRLEdBQUcscUJBQXFCLENBQUM7b0JBQ2pDLFVBQVUsR0FBRyxJQUFJLDJCQUFZLEVBQUUsQ0FBQztvQkFDaEMsTUFBTSxHQUFHLHFCQUFhLENBQUMsUUFBUSxDQUFDLENBQUM7b0JBRXZDLHFCQUFNLFVBQVUsQ0FBQyxNQUFNLENBQUM7NEJBQ3BCLEdBQUcsRUFBRSxNQUFNOzRCQUNYLE9BQU8sRUFBRSxzQkFBYyxFQUFFOzRCQUN6QixLQUFLLEVBQUUsMEJBQWtCLEVBQUU7NEJBQzNCLFNBQVMsRUFBRSxRQUFRO3lCQUN0QixDQUFDLEVBQUE7O29CQUxGLFNBS0UsQ0FBQztvQkF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BQyxFQUFBOztvQkFGM0Usa0JBQU8sU0FFb0UsRUFBQyxDQUFDLFVBQVUsRUFBRSxDQUFDO29CQUUxRixLQUFBLE1BQU0sQ0FBQTtvQkFBQyxxQkFBTSxrQkFBVSxDQUNuQixJQUFJLENBQUMsSUFBSSxDQUFDLE1BQU0sRUFBRSxzQkFBc0IsQ0FBQyxFQUN6QyxJQUFJLENBQUMsSUFBSSxDQUFDLDJCQUFtQixFQUFFLEVBQUUsdUNBQXVDLENBQUMsQ0FBQyxFQUFBOztvQkFGOUUsa0JBQU8sU0FFdUUsRUFBQyxDQUFDLFVBQVUsRUFBRSxDQUFDOzs7O1NBRWhHLEVBQUUsS0FBSyxDQUFDLENBQUM7SUFFVixFQUFFLENBQUMsK0JBQStCLEVBQUU7UUFDaEMsSUFBTSxVQUFVLEdBQUcsSUFBSSwyQkFBWSxFQUFFLENBQUM7UUFDdEMsTUFBTSxDQUFDLFVBQVUsQ0FBQyxXQUFXLENBQUMsSUFBSSxDQUFDLHVCQUF1QixDQUFDLENBQUMsQ0FBQyxVQUFVLEVBQUUsQ0FBQztRQUMxRSxNQUFNLENBQUMsVUFBVSxDQUFDLFdBQVcsQ0FBQyxJQUFJLENBQUMsbUJBQW1CLENBQUMsQ0FBQyxDQUFDLFVBQVUsRUFBRSxDQUFDO1FBQ3RFLE1BQU0sQ0FBQyxVQUFVLENBQUMsV0FBVyxDQUFDLElBQUksQ0FBQyxzQkFBc0IsQ0FBQyxDQUFDLENBQUMsVUFBVSxFQUFFLENBQUM7UUFDekUsTUFBTSxDQUFDLFVBQVUsQ0FBQyxXQUFXLENBQUMsSUFBSSxDQUFDLHdCQUF3QixDQUFDLENBQUMsQ0FBQyxVQUFVLEVBQUUsQ0FBQztJQUMvRSxDQUFDLENBQUMsQ0FBQztBQUVQLENBQUMsQ0FBQyxDQUFDIn0= |
@@ -26,3 +26,3 @@ "use strict"; | ||
describe('Metadata Validation CLI', function () { | ||
it('Generates JSON with all metadata', function () { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
it('Validates metadata and prints error to file', function () { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
var testName, genCommand, outDir, outFile, error_1, firstContent; | ||
@@ -54,3 +54,3 @@ return tslib_1.__generator(this, function (_a) { | ||
expect(firstContent) | ||
.toContain('ERROR:Couldn\'t resolve reference to Service \'com.db.plexus.interop.dsl.gen.test.services.ExampleService_NotExists\''); | ||
.toContain('Couldn\'t resolve reference to Service \'com.db.plexus.interop.dsl.gen.test.services.ExampleService_NotExists\''); | ||
return [2 /*return*/]; | ||
@@ -61,2 +61,2 @@ } | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVmFsaWRhdGVNZXRhZGF0YUNvbW1hbmQuc3BlYy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Rlc3RzL2NvbW1hbmRzL1ZhbGlkYXRlTWV0YWRhdGFDb21tYW5kLnNwZWMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQWdCQSxpQkErQkc7OztBQS9DSDs7Ozs7Ozs7Ozs7Ozs7O0dBZUc7QUFDSCxpQ0FBK0Q7QUFDL0QsMkJBQTZCO0FBQzdCLHNGQUFxRjtBQUNyRixnREFBc0Q7QUFFdEQsUUFBUSxDQUFDLHlCQUF5QixFQUFFO0lBRWhDLEVBQUUsQ0FBQyxrQ0FBa0MsRUFBRTs7Ozs7b0JBRTdCLFFBQVEsR0FBRyxnQkFBZ0IsQ0FBQztvQkFDNUIsVUFBVSxHQUFHLElBQUksaURBQXVCLEVBQUUsQ0FBQztvQkFDM0MsTUFBTSxHQUFHLHFCQUFhLENBQUMsUUFBUSxDQUFDLENBQUM7b0JBQ2pDLE9BQU8sR0FBRyxJQUFJLENBQUMsSUFBSSxDQUFDLE1BQU0sRUFBRSxtQkFBbUIsQ0FBQyxDQUFDOzs7O29CQUduRCxxQkFBTSxVQUFVLEN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LENBQUMsSUFBSSxDQUFDLE1BQU0sRUFBRSxtQkFBbUIsQ0FBQyxDQUFDOzs7O29CQUduRCxxQkFBTSxVQUFVLENBQUMsTUFBTSxDQUFDOzRCQUNwQixHQUFHLEVBQUUsT0FBTzs0QkFDWixPQUFPLEVBQUUsNkJBQXFCLEVBQUU7eUJBQ25DLENBQUMsRUFBQTs7b0JBSEYsU0FHRSxDQUFDO29CQUNILElBQUksQ0FBQywwQkFBMEIsQ0FBQyxDQUFDOzs7Ozt3QkFLaEIscUJBQU0sb0JBQVksQ0FBQyxPQUFPLENBQUMsRUFBQTs7b0JBQTFDLFlBQVksR0FBRyxTQUEyQjtvQkFFaEQsTUFBTSxDQUFDLFlBQVksQ0FBQzt5QkFDZixTQUFTLENBQUMsaUhBQWlILENBQUMsQ0FBQzs7OztTQUVySSxFQUFFLEtBQUssQ0FBQyxDQUFDO0FBRWQsQ0FBQyxDQUFDLENBQUMifQ== |
{ | ||
"name": "@plexus-interop/cli", | ||
"version": "0.2.4", | ||
"version": "0.2.6", | ||
"main": "plexus.js", | ||
@@ -5,0 +5,0 @@ "description": "Plexus Interop CLI tools", |
@@ -23,5 +23,13 @@ /** | ||
import { ValidateMetadataCommand } from './ValidateMetadataCommand'; | ||
import { ValidateMetadataPatchCommand } from './ValidateMetadataPatchCommand'; | ||
export function commands(): Command[] { | ||
return [new GenTsCommand(), new GenJsonCommand(), new GenProtoCommand(), new GenCSharpCommand(), new ValidateMetadataCommand()]; | ||
return [ | ||
new GenTsCommand(), | ||
new GenJsonCommand(), | ||
new GenProtoCommand(), | ||
new GenCSharpCommand(), | ||
new ValidateMetadataCommand(), | ||
new ValidateMetadataPatchCommand() | ||
]; | ||
} | ||
@@ -28,0 +36,0 @@ |
@@ -20,2 +20,13 @@ /** | ||
export function targetBaseDir(): Option { | ||
return { | ||
shortName: 'tb', | ||
longName: 'targetBaseDir', | ||
exampleValue: 'target/folder', | ||
description: 'target metadata base directory', | ||
isRequired: true, | ||
defaultValue: process.cwd() | ||
}; | ||
} | ||
export function baseDir(): Option { | ||
@@ -22,0 +33,0 @@ return { |
@@ -28,2 +28,4 @@ /** | ||
export class GenTsCommand extends BaseCommand { | ||
public readonly protoRegexp: RegExp = /.+\.proto$/; | ||
@@ -53,3 +55,3 @@ public clientGenArgs: (opts: any) => string[] = opts => { | ||
const jsFilePath = path.join(opts.out, 'plexus-messages.js'); | ||
const protoFiles = await listFiles(protoFilesDir, /.+\.proto/g); | ||
const protoFiles = await listFiles(protoFilesDir, this.protoRegexp); | ||
await genJsStaticModule(jsFilePath, protoFiles, opts.namespace); | ||
@@ -56,0 +58,0 @@ |
@@ -50,2 +50,10 @@ /* | ||
it('Handles different proto files', () => { | ||
const genCommand = new GenTsCommand(); | ||
expect(genCommand.protoRegexp.test('src/authservice.proto')).toBeTruthy(); | ||
expect(genCommand.protoRegexp.test('authservice.proto')).toBeTruthy(); | ||
expect(genCommand.protoRegexp.test('AuthService_v1.proto')).toBeTruthy(); | ||
expect(genCommand.protoRegexp.test('src/auth_service.proto')).toBeTruthy(); | ||
}); | ||
}); |
@@ -24,3 +24,3 @@ /* | ||
it('Generates JSON with all metadata', async () => { | ||
it('Validates metadata and prints error to file', async () => { | ||
@@ -45,3 +45,3 @@ const testName = 'generated-json'; | ||
expect(firstContent) | ||
.toContain('ERROR:Couldn\'t resolve reference to Service \'com.db.plexus.interop.dsl.gen.test.services.ExampleService_NotExists\''); | ||
.toContain('Couldn\'t resolve reference to Service \'com.db.plexus.interop.dsl.gen.test.services.ExampleService_NotExists\''); | ||
@@ -48,0 +48,0 @@ }, 15000); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14759725
110
3485