@vc-shell/create-vc-app 2.5.0-pr354.da09837 → 2.6.0-pr370.de147ea
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/engine/codegen.d.ts +2 -3
- package/dist/engine/codegen.d.ts.map +1 -1
- package/dist/engine/format.d.ts +3 -8
- package/dist/engine/format.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/templates/dynamic-module/_package.json.ejs +3 -3
- package/dist/templates/module/composables/useList.ts.ejs +16 -7
- package/dist/templates/standalone/_package.json.ejs +5 -5
- package/package.json +2 -2
package/dist/engine/codegen.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Add a module import and its `app.use()` registration to main.ts.
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* add by hand rather than reporting a change it did not make.
|
|
3
|
+
* Throws when either anchor is missing, so the caller can tell the user what to add by
|
|
4
|
+
* hand rather than reporting a change it did not make.
|
|
6
5
|
*/
|
|
7
6
|
export declare function addModuleToMain(mainTsPath: string, moduleName: string): void;
|
|
8
7
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codegen.d.ts","sourceRoot":"","sources":["../../src/engine/codegen.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"codegen.d.ts","sourceRoot":"","sources":["../../src/engine/codegen.ts"],"names":[],"mappings":"AAyIA;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CA2B5E;AAiCD;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAsCtF"}
|
package/dist/engine/format.d.ts
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Format generated sources in place.
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* EJS control tags and the regex splicing in `codegen.ts` both emit code whose
|
|
6
|
-
* shape depends on runtime data. Running Prettier over the *output* is the only
|
|
7
|
-
* point where the result can be normalised.
|
|
8
|
-
*
|
|
9
|
-
* Formatting is best-effort: a file Prettier cannot parse is left untouched
|
|
2
|
+
* Format generated sources in place. Templates are `.ejs`, so neither Prettier nor ESLint
|
|
3
|
+
* can check them directly; running Prettier over the output is the only point where the
|
|
4
|
+
* result can be normalised. Best effort: a file Prettier cannot parse is left untouched
|
|
10
5
|
* rather than failing the scaffold.
|
|
11
6
|
*/
|
|
12
7
|
export declare function formatGenerated(targets: string[]): Promise<number>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/engine/format.ts"],"names":[],"mappings":"AAyBA
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/engine/format.ts"],"names":[],"mappings":"AAyBA;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CA2BxE"}
|
package/dist/index.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@types/node": "^20.10.5",
|
|
13
|
-
"@vc-shell/ts-config": "^2.
|
|
13
|
+
"@vc-shell/ts-config": "^2.6.0",
|
|
14
14
|
"cross-env": "^7.0.3",
|
|
15
15
|
"sass": "^1.87.0",
|
|
16
16
|
"typescript": "^5.8.3",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"vue-tsc": "^3.2.5"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@vc-shell/config-generator": "^2.
|
|
22
|
-
"@vc-shell/framework": "^2.
|
|
21
|
+
"@vc-shell/config-generator": "^2.6.0",
|
|
22
|
+
"@vc-shell/framework": "^2.6.0",
|
|
23
23
|
"vue": "^3.5.30",
|
|
24
24
|
"vue-router": "^5.0.3"
|
|
25
25
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref, type Ref } from "vue";
|
|
2
|
-
import { useAsync, useLoading } from "@vc-shell/framework";
|
|
2
|
+
import { useAsync, useLatestRequest, useLoading } from "@vc-shell/framework";
|
|
3
3
|
|
|
4
4
|
export interface <%- ModuleNamePascalCase %>ListQuery {
|
|
5
5
|
keyword?: string;
|
|
@@ -12,15 +12,24 @@ export default function use<%- ModuleNamePascalCase %>List() {
|
|
|
12
12
|
const data: Ref<Record<string, any>[]> = ref([]);
|
|
13
13
|
const totalCount = ref(0);
|
|
14
14
|
|
|
15
|
+
// The list page searches as you type. A slow answer to an earlier keyword can
|
|
16
|
+
// arrive after a newer one, so route the call through `search.latest`: it
|
|
17
|
+
// hands back `undefined` once a newer search has started.
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- used by the TODO API call below
|
|
19
|
+
const search = useLatestRequest();
|
|
20
|
+
|
|
15
21
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- used by the TODO API call below
|
|
16
22
|
const { loading: itemsLoading, action: getItems } = useAsync<<%- ModuleNamePascalCase %>ListQuery>(async (query) => {
|
|
17
23
|
// TODO: Replace with real API call
|
|
18
|
-
// const result = await
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
//
|
|
22
|
-
//
|
|
23
|
-
//
|
|
24
|
+
// const result = await search.latest(
|
|
25
|
+
// apiClient.search({
|
|
26
|
+
// keyword: query?.keyword,
|
|
27
|
+
// sort: query?.sort,
|
|
28
|
+
// skip: query?.skip ?? 0,
|
|
29
|
+
// take: query?.take ?? 20,
|
|
30
|
+
// }),
|
|
31
|
+
// );
|
|
32
|
+
// if (!result) return; // a newer search superseded this one
|
|
24
33
|
// data.value = result.results ?? [];
|
|
25
34
|
// totalCount.value = result.totalCount ?? 0;
|
|
26
35
|
});
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"@types/node": "^20.10.5",
|
|
23
23
|
"@typescript-eslint/eslint-plugin": "^8.43.0",
|
|
24
24
|
"@typescript-eslint/parser": "^8.43.0",
|
|
25
|
-
"@vc-shell/api-client-generator": "^2.
|
|
26
|
-
"@vc-shell/ts-config": "^2.
|
|
25
|
+
"@vc-shell/api-client-generator": "^2.6.0",
|
|
26
|
+
"@vc-shell/ts-config": "^2.6.0",
|
|
27
27
|
"@vitejs/plugin-vue": "^5.2.3",
|
|
28
28
|
"@vue/eslint-config-prettier": "^10.2.0",
|
|
29
29
|
"@vue/eslint-config-typescript": "^14.6.0",
|
|
@@ -51,10 +51,10 @@
|
|
|
51
51
|
"vue-tsc": "^3.2.5"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@vc-shell/config-generator": "^2.
|
|
55
|
-
"@vc-shell/framework": "^2.
|
|
54
|
+
"@vc-shell/config-generator": "^2.6.0",
|
|
55
|
+
"@vc-shell/framework": "^2.6.0",
|
|
56
56
|
<%_ if (moduleFederation) { _%>
|
|
57
|
-
"@vc-shell/mf-host": "^2.
|
|
57
|
+
"@vc-shell/mf-host": "^2.6.0",
|
|
58
58
|
<%_ } _%>
|
|
59
59
|
"@vueuse/core": "^10.7.1",
|
|
60
60
|
"@vueuse/integrations": "^10.7.1",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vc-shell/create-vc-app",
|
|
3
3
|
"description": "Application scaffolding",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.6.0-pr370.de147ea",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": "./dist/index.js",
|
|
7
7
|
"files": [
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@types/ejs": "^3.1.5",
|
|
18
18
|
"@types/prompts": "^2.4.4",
|
|
19
|
-
"@vc-shell/ts-config": "2.
|
|
19
|
+
"@vc-shell/ts-config": "2.6.0-pr370.de147ea",
|
|
20
20
|
"copyfiles": "^2.4.1",
|
|
21
21
|
"cross-env": "^7.0.3",
|
|
22
22
|
"shx": "^0.3.4",
|