@tehw0lf/wordlist-generator 0.0.2 → 0.0.6
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 +2 -2
- package/README.md +57 -4
- package/esm2020/lib/wordlist-generator.component.mjs +8 -5
- package/fesm2015/tehw0lf-wordlist-generator.mjs +7 -4
- package/fesm2015/tehw0lf-wordlist-generator.mjs.map +1 -1
- package/fesm2020/tehw0lf-wordlist-generator.mjs +7 -4
- package/fesm2020/tehw0lf-wordlist-generator.mjs.map +1 -1
- package/lib/wordlist-generator.component.d.ts +3 -2
- package/package.json +8 -3
- package/schematics/collection.json +16 -0
- package/schematics/ng-add/index.d.ts +3 -0
- package/schematics/ng-add/index.js +35 -0
- package/schematics/ng-add/index.js.map +1 -0
- package/schematics/ng-add/index.spec.d.ts +1 -0
- package/schematics/ng-add/index.spec.js +103 -0
- package/schematics/ng-add/index.spec.js.map +1 -0
- package/schematics/ng-add/package-config.d.ts +12 -0
- package/schematics/ng-add/package-config.js +48 -0
- package/schematics/ng-add/package-config.js.map +1 -0
- package/schematics/ng-add/schema.d.ts +3 -0
- package/schematics/ng-add/schema.js +3 -0
- package/schematics/ng-add/schema.js.map +1 -0
- package/schematics/ng-add/schema.json +16 -0
- package/schematics/ng-add/setup.d.ts +3 -0
- package/schematics/ng-add/setup.js +48 -0
- package/schematics/ng-add/setup.js.map +1 -0
- package/schematics/testing/file-content.d.ts +10 -0
- package/schematics/testing/file-content.js +13 -0
- package/schematics/testing/file-content.js.map +1 -0
- package/schematics/testing/test-app.d.ts +12 -0
- package/schematics/testing/test-app.js +44 -0
- package/schematics/testing/test-app.js.map +1 -0
- package/schematics/testing/test-library.d.ts +11 -0
- package/schematics/testing/test-library.js +21 -0
- package/schematics/testing/test-library.js.map +1 -0
- package/schematics/testing/test-project.d.ts +11 -0
- package/schematics/testing/test-project.js +29 -0
- package/schematics/testing/test-project.js.map +1 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
import { Tree } from '@angular-devkit/schematics';
|
|
9
|
+
/** Gets the content of a specified file from a schematic tree. */
|
|
10
|
+
export declare function getFileContent(tree: Tree, filePath: string): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getFileContent = void 0;
|
|
4
|
+
/** Gets the content of a specified file from a schematic tree. */
|
|
5
|
+
function getFileContent(tree, filePath) {
|
|
6
|
+
const contentBuffer = tree.read(filePath);
|
|
7
|
+
if (!contentBuffer) {
|
|
8
|
+
throw new Error(`Cannot read "${filePath}" because it does not exist.`);
|
|
9
|
+
}
|
|
10
|
+
return contentBuffer.toString();
|
|
11
|
+
}
|
|
12
|
+
exports.getFileContent = getFileContent;
|
|
13
|
+
//# sourceMappingURL=file-content.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-content.js","sourceRoot":"","sources":["../../../../../libs/wordlist-generator/schematics/testing/file-content.ts"],"names":[],"mappings":";;;AAUA,kEAAkE;AAClE,SAAgB,cAAc,CAAC,IAAU,EAAE,QAAgB;IACzD,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAE1C,IAAI,CAAC,aAAa,EAAE;QAClB,MAAM,IAAI,KAAK,CAAC,gBAAgB,QAAQ,8BAA8B,CAAC,CAAC;KACzE;IAED,OAAO,aAAa,CAAC,QAAQ,EAAE,CAAC;AAClC,CAAC;AARD,wCAQC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Tree } from '@angular-devkit/schematics';
|
|
2
|
+
import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing';
|
|
3
|
+
/**
|
|
4
|
+
* @license
|
|
5
|
+
* Copyright Google LLC All Rights Reserved.
|
|
6
|
+
*
|
|
7
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
8
|
+
* found in the LICENSE file at https://angular.io/license
|
|
9
|
+
*/
|
|
10
|
+
/** Create a base app used for testing. */
|
|
11
|
+
export declare function createTestApp(runner: SchematicTestRunner, appOptions?: {}, tree?: Tree): Promise<UnitTestTree>;
|
|
12
|
+
export declare function createTestAppWithMaterial(runner: SchematicTestRunner, appOptions?: {}, tree?: Tree): Promise<UnitTestTree>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.createTestAppWithMaterial = exports.createTestApp = void 0;
|
|
13
|
+
const package_config_1 = require("../ng-add/package-config");
|
|
14
|
+
const file_content_1 = require("./file-content");
|
|
15
|
+
const test_project_1 = require("./test-project");
|
|
16
|
+
/**
|
|
17
|
+
* @license
|
|
18
|
+
* Copyright Google LLC All Rights Reserved.
|
|
19
|
+
*
|
|
20
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
21
|
+
* found in the LICENSE file at https://angular.io/license
|
|
22
|
+
*/
|
|
23
|
+
/** Create a base app used for testing. */
|
|
24
|
+
function createTestApp(runner, appOptions = {}, tree) {
|
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
return (0, test_project_1.createTestProject)(runner, 'application', appOptions, tree);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
exports.createTestApp = createTestApp;
|
|
30
|
+
function createTestAppWithMaterial(runner, appOptions = {}, tree) {
|
|
31
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
const projectTree = yield (0, test_project_1.createTestProject)(runner, 'application', appOptions, tree);
|
|
33
|
+
const coreVersion = (0, package_config_1.getPackageVersionFromPackageJson)(projectTree, '@angular/core');
|
|
34
|
+
const packageJson = (0, file_content_1.getFileContent)(projectTree, '/package.json');
|
|
35
|
+
const updatedPackageJson = packageJson.replace(`"dependencies": {
|
|
36
|
+
"@angular/animations": "${coreVersion}",`, `"dependencies": {
|
|
37
|
+
"@angular/animations": "${coreVersion}",
|
|
38
|
+
"@angular/material": "${coreVersion}",`);
|
|
39
|
+
projectTree.overwrite('/package.json', updatedPackageJson);
|
|
40
|
+
return projectTree;
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
exports.createTestAppWithMaterial = createTestAppWithMaterial;
|
|
44
|
+
//# sourceMappingURL=test-app.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-app.js","sourceRoot":"","sources":["../../../../../libs/wordlist-generator/schematics/testing/test-app.ts"],"names":[],"mappings":";;;;;;;;;;;;AAMA,6DAA4E;AAC5E,iDAAgD;AAChD,iDAAmD;AAEnD;;;;;;GAMG;AACH,0CAA0C;AAC1C,SAAsB,aAAa,CACjC,MAA2B,EAC3B,UAAU,GAAG,EAAE,EACf,IAAW;;QAEX,OAAO,IAAA,gCAAiB,EAAC,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC;IACpE,CAAC;CAAA;AAND,sCAMC;AAED,SAAsB,yBAAyB,CAC7C,MAA2B,EAC3B,UAAU,GAAG,EAAE,EACf,IAAW;;QAEX,MAAM,WAAW,GAAG,MAAM,IAAA,gCAAiB,EACzC,MAAM,EACN,aAAa,EACb,UAAU,EACV,IAAI,CACL,CAAC;QAEF,MAAM,WAAW,GAAG,IAAA,iDAAgC,EAClD,WAAW,EACX,eAAe,CAChB,CAAC;QAEF,MAAM,WAAW,GAAG,IAAA,6BAAc,EAAC,WAAW,EAAE,eAAe,CAAC,CAAC;QAEjE,MAAM,kBAAkB,GAAG,WAAW,CAAC,OAAO,CAC5C;8BAC0B,WAAW,IAAI,EACzC;8BAC0B,WAAW;4BACb,WAAW,IAAI,CACxC,CAAC;QACF,WAAW,CAAC,SAAS,CAAC,eAAe,EAAE,kBAAkB,CAAC,CAAC;QAC3D,OAAO,WAAW,CAAC;IACrB,CAAC;CAAA;AA5BD,8DA4BC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
import { Tree } from '@angular-devkit/schematics';
|
|
9
|
+
import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing';
|
|
10
|
+
/** Create a base library used for testing. */
|
|
11
|
+
export declare function createTestLibrary(runner: SchematicTestRunner, appOptions?: {}, tree?: Tree): Promise<UnitTestTree>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.createTestLibrary = void 0;
|
|
13
|
+
const test_project_1 = require("./test-project");
|
|
14
|
+
/** Create a base library used for testing. */
|
|
15
|
+
function createTestLibrary(runner, appOptions = {}, tree) {
|
|
16
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
17
|
+
return (0, test_project_1.createTestProject)(runner, 'library', appOptions, tree);
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
exports.createTestLibrary = createTestLibrary;
|
|
21
|
+
//# sourceMappingURL=test-library.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-library.js","sourceRoot":"","sources":["../../../../../libs/wordlist-generator/schematics/testing/test-library.ts"],"names":[],"mappings":";;;;;;;;;;;;AAUA,iDAAmD;AAGnD,8CAA8C;AAC9C,SAAsB,iBAAiB,CACrC,MAA2B,EAC3B,UAAU,GAAG,EAAE,EACf,IAAW;;QAEX,OAAO,IAAA,gCAAiB,EAAC,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC;IAChE,CAAC;CAAA;AAND,8CAMC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
import { Tree } from '@angular-devkit/schematics';
|
|
9
|
+
import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing';
|
|
10
|
+
/** Create a base project used for testing. */
|
|
11
|
+
export declare function createTestProject(runner: SchematicTestRunner, projectType: 'application' | 'library', appOptions?: {}, tree?: Tree): Promise<UnitTestTree>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.createTestProject = void 0;
|
|
13
|
+
/** Create a base project used for testing. */
|
|
14
|
+
function createTestProject(runner, projectType, appOptions = {}, tree) {
|
|
15
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
16
|
+
const workspaceTree = yield runner
|
|
17
|
+
.runExternalSchematicAsync('@schematics/angular', 'workspace', {
|
|
18
|
+
name: 'workspace',
|
|
19
|
+
version: '6.0.0',
|
|
20
|
+
newProjectRoot: 'projects',
|
|
21
|
+
}, tree)
|
|
22
|
+
.toPromise();
|
|
23
|
+
return runner
|
|
24
|
+
.runExternalSchematicAsync('@schematics/angular', projectType, Object.assign({ name: 'material' }, appOptions), workspaceTree)
|
|
25
|
+
.toPromise();
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
exports.createTestProject = createTestProject;
|
|
29
|
+
//# sourceMappingURL=test-project.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-project.js","sourceRoot":"","sources":["../../../../../libs/wordlist-generator/schematics/testing/test-project.ts"],"names":[],"mappings":";;;;;;;;;;;;AAWA,8CAA8C;AAC9C,SAAsB,iBAAiB,CACrC,MAA2B,EAC3B,WAAsC,EACtC,UAAU,GAAG,EAAE,EACf,IAAW;;QAEX,MAAM,aAAa,GAAG,MAAM,MAAM;aAC/B,yBAAyB,CACxB,qBAAqB,EACrB,WAAW,EACX;YACE,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE,OAAO;YAChB,cAAc,EAAE,UAAU;SAC3B,EACD,IAAI,CACL;aACA,SAAS,EAAE,CAAC;QAEf,OAAO,MAAM;aACV,yBAAyB,CACxB,qBAAqB,EACrB,WAAW,kBACV,IAAI,EAAE,UAAU,IAAK,UAAU,GAChC,aAAa,CACd;aACA,SAAS,EAAE,CAAC;IACjB,CAAC;CAAA;AA3BD,8CA2BC"}
|