yo-unit 0.19.2 → 0.19.3
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/dist/index.js +4 -1
- package/dist/types/index.d.ts +2 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -7,13 +7,16 @@ var STRING = "string";
|
|
|
7
7
|
// src/index.ts
|
|
8
8
|
import YoTestLib from "yeoman-test";
|
|
9
9
|
import assert from "yeoman-assert";
|
|
10
|
-
var YoTest = ({ source, params, options = {}, build }) => {
|
|
10
|
+
var YoTest = ({ source, params, options = {}, build, setupTmpDir }) => {
|
|
11
11
|
const isStringSource = STRING === typeof source;
|
|
12
12
|
source = isStringSource ? PATH.join(source) : source;
|
|
13
13
|
const sourceName = isStringSource ? source : source.name;
|
|
14
14
|
let chain = YoTestLib.create(source).withPrompts(params).withOptions(options).inTmpDir((dir) => {
|
|
15
15
|
console.log(`Build Dest on: ${dir}`);
|
|
16
16
|
console.log(`Source : ${sourceName}`);
|
|
17
|
+
if (setupTmpDir) {
|
|
18
|
+
setupTmpDir(dir);
|
|
19
|
+
}
|
|
17
20
|
});
|
|
18
21
|
if (build) {
|
|
19
22
|
chain = chain.build(build);
|
package/dist/types/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ interface YoTestOptions {
|
|
|
6
6
|
params?: Record<string, unknown>;
|
|
7
7
|
options?: Record<string, unknown>;
|
|
8
8
|
build?: (...args: unknown[]) => void;
|
|
9
|
+
setupTmpDir?: (dir: string) => void;
|
|
9
10
|
}
|
|
10
|
-
declare const YoTest: ({ source, params, options, build }: YoTestOptions) => any;
|
|
11
|
+
declare const YoTest: ({ source, params, options, build, setupTmpDir }: YoTestOptions) => any;
|
|
11
12
|
export { YoTest, assert };
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.19.
|
|
2
|
+
"version": "0.19.3",
|
|
3
3
|
"name": "yo-unit",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
|
-
"url": "https://github.com/
|
|
7
|
-
"directory": "
|
|
6
|
+
"url": "https://github.com/modality-ai/yo-modality",
|
|
7
|
+
"directory": "yo-unit"
|
|
8
8
|
},
|
|
9
|
-
"homepage": "https://github.com/
|
|
9
|
+
"homepage": "https://github.com/modality-ai/yo-modality/tree/main/yo-unit",
|
|
10
10
|
"description": "Yeoman test utility.",
|
|
11
11
|
"keywords": [],
|
|
12
12
|
"author": "Hill <hill@kimo.com>",
|