@akanjs/cli 0.9.58-canary.3 → 0.9.58-canary.4
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/cjs/src/templates/module/__model__.signal.spec.js +1 -13
- package/cjs/src/templates/module/__model__.signal.test.js +1 -22
- package/esm/src/templates/module/__model__.signal.spec.js +1 -13
- package/esm/src/templates/module/__model__.signal.test.js +1 -22
- package/package.json +1 -1
- package/src/templates/module/__model__.signal.spec.d.ts +1 -1
- package/src/templates/module/__model__.signal.test.d.ts +1 -1
|
@@ -23,17 +23,5 @@ __export(model_signal_spec_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(model_signal_spec_exports);
|
|
25
25
|
function getContent(scanInfo, dict) {
|
|
26
|
-
return
|
|
27
|
-
import * as adminSpec from "@shared/lib/admin/admin.signal.spec";
|
|
28
|
-
import * as userSpec from "@${dict.sysName}/lib/user/user.signal.spec";
|
|
29
|
-
import * as cnst from "../cnst";
|
|
30
|
-
import { fetch } from "../sig";
|
|
31
|
-
import { sampleOf } from "@akanjs/test";
|
|
32
|
-
|
|
33
|
-
export const create${dict.Model} = async (adminAgent: userSpec.AdminAgent, userAgent: userSpec.UserAgent) => {
|
|
34
|
-
const ${dict.model}Input = sampleOf(cnst.${dict.Model}Input);
|
|
35
|
-
const ${dict.model} = await adminAgent.fetch.create${dict.Model}(${dict.model}Input);
|
|
36
|
-
return ${dict.model};
|
|
37
|
-
};
|
|
38
|
-
`;
|
|
26
|
+
return null;
|
|
39
27
|
}
|
|
@@ -23,26 +23,5 @@ __export(model_signal_test_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(model_signal_test_exports);
|
|
25
25
|
function getContent(scanInfo, dict) {
|
|
26
|
-
return
|
|
27
|
-
import * as adminSpec from "@shared/lib/admin/admin.signal.spec";
|
|
28
|
-
import * as userSpec from "@${dict.sysName}/lib/user/user.signal.spec";
|
|
29
|
-
import * as ${dict.model}Spec from "@${dict.sysName}/lib/${dict.model}/${dict.model}.signal.spec";
|
|
30
|
-
import * as cnst from "../cnst";
|
|
31
|
-
import { fetch } from "../sig";
|
|
32
|
-
|
|
33
|
-
describe("${dict.Model} Signal", () => {
|
|
34
|
-
describe("${dict.Model} Service", () => {
|
|
35
|
-
let adminAgent: userSpec.AdminAgent;
|
|
36
|
-
let userAgent: userSpec.UserAgent;
|
|
37
|
-
let ${dict.model}: cnst.${dict.Model};
|
|
38
|
-
beforeAll(async () => {
|
|
39
|
-
// adminAgent = await adminSpec.getAdminAgentWithInitialize();
|
|
40
|
-
// userAgent = await userSpec.getUserAgentWithPhone();
|
|
41
|
-
});
|
|
42
|
-
it("can create ${dict.model}", async () => {
|
|
43
|
-
// ${dict.model} = await ${dict.model}Spec.create${dict.Model}(adminAgent, userAgent);
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
|
-
`;
|
|
26
|
+
return null;
|
|
48
27
|
}
|
|
@@ -1,18 +1,6 @@
|
|
|
1
1
|
// pkgs/@akanjs/cli/src/templates/module/__model__.signal.spec.ts
|
|
2
2
|
function getContent(scanInfo, dict) {
|
|
3
|
-
return
|
|
4
|
-
import * as adminSpec from "@shared/lib/admin/admin.signal.spec";
|
|
5
|
-
import * as userSpec from "@${dict.sysName}/lib/user/user.signal.spec";
|
|
6
|
-
import * as cnst from "../cnst";
|
|
7
|
-
import { fetch } from "../sig";
|
|
8
|
-
import { sampleOf } from "@akanjs/test";
|
|
9
|
-
|
|
10
|
-
export const create${dict.Model} = async (adminAgent: userSpec.AdminAgent, userAgent: userSpec.UserAgent) => {
|
|
11
|
-
const ${dict.model}Input = sampleOf(cnst.${dict.Model}Input);
|
|
12
|
-
const ${dict.model} = await adminAgent.fetch.create${dict.Model}(${dict.model}Input);
|
|
13
|
-
return ${dict.model};
|
|
14
|
-
};
|
|
15
|
-
`;
|
|
3
|
+
return null;
|
|
16
4
|
}
|
|
17
5
|
export {
|
|
18
6
|
getContent as default
|
|
@@ -1,27 +1,6 @@
|
|
|
1
1
|
// pkgs/@akanjs/cli/src/templates/module/__model__.signal.test.ts
|
|
2
2
|
function getContent(scanInfo, dict) {
|
|
3
|
-
return
|
|
4
|
-
import * as adminSpec from "@shared/lib/admin/admin.signal.spec";
|
|
5
|
-
import * as userSpec from "@${dict.sysName}/lib/user/user.signal.spec";
|
|
6
|
-
import * as ${dict.model}Spec from "@${dict.sysName}/lib/${dict.model}/${dict.model}.signal.spec";
|
|
7
|
-
import * as cnst from "../cnst";
|
|
8
|
-
import { fetch } from "../sig";
|
|
9
|
-
|
|
10
|
-
describe("${dict.Model} Signal", () => {
|
|
11
|
-
describe("${dict.Model} Service", () => {
|
|
12
|
-
let adminAgent: userSpec.AdminAgent;
|
|
13
|
-
let userAgent: userSpec.UserAgent;
|
|
14
|
-
let ${dict.model}: cnst.${dict.Model};
|
|
15
|
-
beforeAll(async () => {
|
|
16
|
-
// adminAgent = await adminSpec.getAdminAgentWithInitialize();
|
|
17
|
-
// userAgent = await userSpec.getUserAgentWithPhone();
|
|
18
|
-
});
|
|
19
|
-
it("can create ${dict.model}", async () => {
|
|
20
|
-
// ${dict.model} = await ${dict.model}Spec.create${dict.Model}(adminAgent, userAgent);
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
});
|
|
24
|
-
`;
|
|
3
|
+
return null;
|
|
25
4
|
}
|
|
26
5
|
export {
|
|
27
6
|
getContent as default
|
package/package.json
CHANGED