@vc-shell/create-vc-app 2.4.0-pr302.b052b38 → 2.4.0-pr303.f20ea90
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/commands/add-module.d.ts.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/engine/codegen.d.ts +2 -5
- package/dist/engine/codegen.d.ts.map +1 -1
- package/dist/index.js +233 -330
- package/dist/templates/dynamic-module/tsconfig.json +5 -1
- package/dist/templates/module/composables/useDetails.ts.ejs +0 -1
- package/dist/templates/module/composables/useList.ts.ejs +1 -2
- package/dist/templates/module/pages/list.vue.ejs +4 -24
- package/dist/templates/sample-module/composables/useList/index.ts +1 -1
- package/dist/templates/sample-module/pages/index.ts +1 -1
- package/dist/templates/sample-module/pages/list.vue +1 -9
- package/dist/templates/sample-module/sample-data/index.ts +2 -2
- package/dist/templates/standalone/_github/COMMIT_CONVENTION.md +12 -12
- package/dist/templates/standalone/_github/PULL_REQUEST_TEMPLATE.md +0 -3
- package/dist/templates/standalone/_vscode/extensions.json +3 -1
- package/dist/templates/standalone/_vscode/settings.json +8 -3
- package/dist/templates/standalone/eslint.config.mjs +0 -20
- package/dist/templates/standalone/src/api_client/README.md +37 -38
- package/dist/templates/standalone/src/bootstrap.ts.ejs +2 -1
- package/dist/templates/standalone/src/components/dashboard-widgets/Welcome.vue +2 -1
- package/dist/templates/standalone/src/pages/App.vue.ejs +0 -1
- package/dist/templates/standalone/src/pages/Dashboard.vue.ejs +1 -1
- package/dist/templates/standalone/src/router/routes.ts.ejs +15 -12
- package/dist/templates/standalone/tsconfig.json +9 -2
- package/package.json +3 -3
- package/dist/engine/codegen.test.d.ts +0 -2
- package/dist/engine/codegen.test.d.ts.map +0 -1
- package/dist/engine/format.d.ts +0 -13
- package/dist/engine/format.d.ts.map +0 -1
|
@@ -4,7 +4,6 @@ import { useAsync, useLoading } from "@vc-shell/framework";
|
|
|
4
4
|
export default function use<%- ModuleNamePascalCase %>Details() {
|
|
5
5
|
const item = ref<Record<string, any>>({});
|
|
6
6
|
|
|
7
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- used by the TODO API call below
|
|
8
7
|
const { loading: itemLoading, action: fetchItem } = useAsync(async (id?: string) => {
|
|
9
8
|
// TODO: Replace with real API call
|
|
10
9
|
// const result = await apiClient.getById(id);
|
|
@@ -8,11 +8,11 @@ export interface <%- ModuleNamePascalCase %>ListQuery {
|
|
|
8
8
|
take?: number;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11
12
|
export default function use<%- ModuleNamePascalCase %>List() {
|
|
12
13
|
const data: Ref<Record<string, any>[]> = ref([]);
|
|
13
14
|
const totalCount = ref(0);
|
|
14
15
|
|
|
15
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- used by the TODO API call below
|
|
16
16
|
const { loading: itemsLoading, action: getItems } = useAsync<<%- ModuleNamePascalCase %>ListQuery>(async (query) => {
|
|
17
17
|
// TODO: Replace with real API call
|
|
18
18
|
// const result = await apiClient.search({
|
|
@@ -25,7 +25,6 @@ export default function use<%- ModuleNamePascalCase %>List() {
|
|
|
25
25
|
// totalCount.value = result.totalCount ?? 0;
|
|
26
26
|
});
|
|
27
27
|
|
|
28
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- used by the TODO API call below
|
|
29
28
|
const { loading: deleteLoading, action: removeItems } = useAsync(async (ids?: string[]) => {
|
|
30
29
|
// TODO: Replace with real API call
|
|
31
30
|
// await Promise.all((ids ?? []).map((id) => apiClient.delete(id)));
|
|
@@ -18,30 +18,14 @@
|
|
|
18
18
|
@pagination-click="pagination.goToPage"
|
|
19
19
|
>
|
|
20
20
|
<!-- Add your columns here -->
|
|
21
|
-
<VcColumn
|
|
22
|
-
|
|
23
|
-
:title="$t('<%- ModuleNameScreamingSnake %>.PAGES.LIST.COLUMNS.NAME')"
|
|
24
|
-
sortable
|
|
25
|
-
/>
|
|
26
|
-
<VcColumn
|
|
27
|
-
id="createdDate"
|
|
28
|
-
:title="$t('<%- ModuleNameScreamingSnake %>.PAGES.LIST.COLUMNS.CREATED_DATE')"
|
|
29
|
-
type="datetime"
|
|
30
|
-
sortable
|
|
31
|
-
/>
|
|
21
|
+
<VcColumn id="name" :title="$t('<%- ModuleNameScreamingSnake %>.PAGES.LIST.COLUMNS.NAME')" sortable />
|
|
22
|
+
<VcColumn id="createdDate" :title="$t('<%- ModuleNameScreamingSnake %>.PAGES.LIST.COLUMNS.CREATED_DATE')" type="datetime" sortable />
|
|
32
23
|
</VcDataTable>
|
|
33
24
|
</VcBlade>
|
|
34
25
|
</template>
|
|
35
26
|
|
|
36
27
|
<script setup lang="ts">
|
|
37
|
-
import {
|
|
38
|
-
useBlade,
|
|
39
|
-
useDataTableSort,
|
|
40
|
-
useTableSearch,
|
|
41
|
-
useDataTablePagination,
|
|
42
|
-
useFunctions,
|
|
43
|
-
type IBladeToolbar,
|
|
44
|
-
} from "@vc-shell/framework";
|
|
28
|
+
import { useBlade, useDataTableSort, useTableSearch, useDataTablePagination, useFunctions, type IBladeToolbar } from "@vc-shell/framework";
|
|
45
29
|
import { VcBlade, VcDataTable, VcColumn } from "@vc-shell/framework/ui";
|
|
46
30
|
import { ref, watch } from "vue";
|
|
47
31
|
import use<%- ModuleNamePascalCase %>List from "../composables/useList";
|
|
@@ -73,11 +57,7 @@ const { sortField, sortOrder, sortExpression } = useDataTableSort({
|
|
|
73
57
|
const { data, loading, totalCount, getItems } = use<%- ModuleNamePascalCase %>List();
|
|
74
58
|
|
|
75
59
|
const { searchValue } = useTableSearch({ stateKey: "<%- ModuleNameScreamingSnake %>" });
|
|
76
|
-
const pagination = useDataTablePagination({
|
|
77
|
-
stateKey: "<%- ModuleNameScreamingSnake %>",
|
|
78
|
-
pageSize: PAGE_SIZE,
|
|
79
|
-
totalCount,
|
|
80
|
-
});
|
|
60
|
+
const pagination = useDataTablePagination({ stateKey: "<%- ModuleNameScreamingSnake %>", pageSize: PAGE_SIZE, totalCount });
|
|
81
61
|
|
|
82
62
|
function load() {
|
|
83
63
|
return getItems({
|
|
@@ -25,7 +25,7 @@ interface SearchResult {
|
|
|
25
25
|
|
|
26
26
|
export type { MockedItem };
|
|
27
27
|
|
|
28
|
-
export default (options?: { pageSize?: number
|
|
28
|
+
export default (options?: { pageSize?: number, sort?: string }): useClassicAppList => {
|
|
29
29
|
const pageSize = options?.pageSize || 20;
|
|
30
30
|
const searchResult = ref<SearchResult>();
|
|
31
31
|
const searchQuery = ref<SearchQuery>({
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as List } from "./list.vue";
|
|
2
|
-
export {
|
|
2
|
+
export {default as Details } from './details.vue'
|
|
@@ -75,15 +75,7 @@
|
|
|
75
75
|
|
|
76
76
|
<script lang="ts" setup>
|
|
77
77
|
import { ref, watch, computed } from "vue";
|
|
78
|
-
import {
|
|
79
|
-
IBladeToolbar,
|
|
80
|
-
useBlade,
|
|
81
|
-
usePopup,
|
|
82
|
-
useDataTableSort,
|
|
83
|
-
useTableSearch,
|
|
84
|
-
useDataTablePagination,
|
|
85
|
-
useFunctions,
|
|
86
|
-
} from "@vc-shell/framework";
|
|
78
|
+
import { IBladeToolbar, useBlade, usePopup, useDataTableSort, useTableSearch, useDataTablePagination, useFunctions } from "@vc-shell/framework";
|
|
87
79
|
import type { TableAction } from "@vc-shell/framework";
|
|
88
80
|
import { VcColumn, VcDataTable, VcBlade } from "@vc-shell/framework/ui";
|
|
89
81
|
import { useI18n } from "vue-i18n";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from './constants'
|
|
2
|
+
export * from './methods'
|
|
@@ -4,21 +4,21 @@
|
|
|
4
4
|
|
|
5
5
|
Messages must be matched by the following regex:
|
|
6
6
|
|
|
7
|
-
```js
|
|
8
|
-
/^(revert: )?(feat|fix|docs|style|refactor|perf|test|workflow|ci|chore|types)(\(.+\))?: .{1,50}
|
|
7
|
+
``` js
|
|
8
|
+
/^(revert: )?(feat|fix|docs|style|refactor|perf|test|workflow|ci|chore|types)(\(.+\))?: .{1,50}/
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Examples
|
|
12
12
|
|
|
13
13
|
Appears under "Features" header, `ui-kit` subheader:
|
|
14
14
|
|
|
15
|
-
```text
|
|
15
|
+
``` text
|
|
16
16
|
feat(ui-kit): add 'comments' option
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
Appears under "Bug Fixes" header, `shell` subheader, with a link to issue #28:
|
|
20
20
|
|
|
21
|
-
```text
|
|
21
|
+
``` text
|
|
22
22
|
fix(shell): handle events on blur
|
|
23
23
|
|
|
24
24
|
close #28
|
|
@@ -26,7 +26,7 @@ close #28
|
|
|
26
26
|
|
|
27
27
|
Appears under "Performance Improvements" header, and under "Breaking Changes" with the breaking change explanation:
|
|
28
28
|
|
|
29
|
-
```text
|
|
29
|
+
``` text
|
|
30
30
|
perf(api-client): improve vdom diffing by removing 'foo' option
|
|
31
31
|
|
|
32
32
|
BREAKING CHANGE: The 'foo' option has been removed.
|
|
@@ -34,7 +34,7 @@ BREAKING CHANGE: The 'foo' option has been removed.
|
|
|
34
34
|
|
|
35
35
|
The following commit and commit `667ecc1` do not appear in the changelog if they are under the same release. If not, the revert commit appears under the "Reverts" header.
|
|
36
36
|
|
|
37
|
-
```text
|
|
37
|
+
``` text
|
|
38
38
|
revert: feat(ui-kit): add 'comments' option
|
|
39
39
|
|
|
40
40
|
This reverts commit 667ecc1654a317a13331b17617d973392f415f02.
|
|
@@ -42,9 +42,9 @@ This reverts commit 667ecc1654a317a13331b17617d973392f415f02.
|
|
|
42
42
|
|
|
43
43
|
## Full Message Format
|
|
44
44
|
|
|
45
|
-
A commit message consists of a **header**, **body** and **footer**.
|
|
45
|
+
A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**:
|
|
46
46
|
|
|
47
|
-
```text
|
|
47
|
+
``` text
|
|
48
48
|
<type>(<scope>): <subject>
|
|
49
49
|
<BLANK LINE>
|
|
50
50
|
<body>
|
|
@@ -68,15 +68,15 @@ Other prefixes are up to your discretion. Suggested prefixes are `docs`, `chore`
|
|
|
68
68
|
|
|
69
69
|
### Scope
|
|
70
70
|
|
|
71
|
-
The scope could be any valid workspace package name. For example `shell`, `ui-kit`, `api-client`, etc...
|
|
71
|
+
The scope could be any valid workspace package name. For example `shell`, `ui-kit`, `api-client`, etc...
|
|
72
72
|
|
|
73
73
|
### Subject
|
|
74
74
|
|
|
75
75
|
The subject contains succinct description of the change:
|
|
76
76
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
* use the imperative, present tense: "change" not "changed" nor "changes"
|
|
78
|
+
* don't capitalize first letter
|
|
79
|
+
* no dot (.) at the end
|
|
80
80
|
|
|
81
81
|
### Body
|
|
82
82
|
|
|
@@ -3,7 +3,12 @@
|
|
|
3
3
|
"source.fixAll.eslint": true
|
|
4
4
|
},
|
|
5
5
|
"files.eol": "\r\n",
|
|
6
|
-
"eslint.validate": [
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
"eslint.validate": [
|
|
7
|
+
"vue",
|
|
8
|
+
"javascript"
|
|
9
|
+
],
|
|
10
|
+
"i18n-ally.localesPaths": [
|
|
11
|
+
"src/locales",
|
|
12
|
+
],
|
|
13
|
+
"typescript.preferences.importModuleSpecifier": "relative",
|
|
9
14
|
}
|
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
import pluginVue from "eslint-plugin-vue";
|
|
2
2
|
import vueTsEslintConfig from "@vue/eslint-config-typescript";
|
|
3
3
|
import vuePrettierConfig from "@vue/eslint-config-prettier";
|
|
4
|
-
import importPlugin from "eslint-plugin-import";
|
|
5
4
|
|
|
6
5
|
export default [
|
|
7
6
|
{
|
|
8
7
|
ignores: ["**/node_modules/**", "**/dist/**", "api-client.ts"],
|
|
9
8
|
},
|
|
10
9
|
|
|
11
|
-
importPlugin.flatConfigs.recommended,
|
|
12
|
-
|
|
13
|
-
importPlugin.flatConfigs.typescript,
|
|
14
|
-
|
|
15
10
|
...pluginVue.configs["flat/recommended"],
|
|
16
11
|
|
|
17
12
|
...vueTsEslintConfig(),
|
|
@@ -19,14 +14,6 @@ export default [
|
|
|
19
14
|
vuePrettierConfig,
|
|
20
15
|
|
|
21
16
|
{
|
|
22
|
-
settings: {
|
|
23
|
-
"import/resolver": {
|
|
24
|
-
typescript: {
|
|
25
|
-
alwaysTryTypes: true,
|
|
26
|
-
project: "./tsconfig.json",
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
17
|
rules: {
|
|
31
18
|
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
|
|
32
19
|
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
|
|
@@ -39,13 +26,6 @@ export default [
|
|
|
39
26
|
"vue/require-default-prop": "off",
|
|
40
27
|
"vue/no-v-html": "off",
|
|
41
28
|
"vue/no-template-shadow": "off",
|
|
42
|
-
// Vite serves `public/` at the site root, so these are not module paths.
|
|
43
|
-
"import/no-unresolved": ["error", { ignore: ["^/assets/"] }],
|
|
44
|
-
// TypeScript already covers these, and the rules parse dependency
|
|
45
|
-
// sources with espree, which chokes on modern syntax in `dist` output.
|
|
46
|
-
"import/namespace": "off",
|
|
47
|
-
"import/default": "off",
|
|
48
|
-
"import/no-named-as-default-member": "off",
|
|
49
29
|
},
|
|
50
30
|
},
|
|
51
31
|
];
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
This guide describes the process of generating an API client to access the VC Platform API from your custom application.
|
|
6
6
|
|
|
7
7
|
!!! note
|
|
8
|
-
Platform Manager REST Client offers generated REST API methods that make it easy to interact with the existing VirtoCommerce Platform API.
|
|
8
|
+
Platform Manager REST Client offers generated REST API methods that make it easy to interact with the existing VirtoCommerce Platform API.
|
|
9
9
|
|
|
10
10
|
## Prerequisites
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
* .NET Core 6.0, particularly if you are using MacOS or Linux.
|
|
13
13
|
|
|
14
14
|
## Generate TypeScript API clients
|
|
15
15
|
|
|
@@ -22,7 +22,6 @@ Using command
|
|
|
22
22
|
```bash
|
|
23
23
|
yarn add @vc-shell/api-client-generator cross-env
|
|
24
24
|
```
|
|
25
|
-
|
|
26
25
|
<br>
|
|
27
26
|
|
|
28
27
|
`cross-env` runs scripts that set and use environment variables across platforms.
|
|
@@ -45,44 +44,44 @@ Add the dependencies to your project's **package.json**:
|
|
|
45
44
|
|
|
46
45
|
2. Configure client generation in your project. Inside your project's **package.json** file, add a `"generate-api-client"` command to the list of scripts:
|
|
47
46
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
47
|
+
```title="vc-app-extend/package.json" linenums="1"
|
|
48
|
+
{
|
|
49
|
+
"scripts": {
|
|
50
|
+
...
|
|
51
|
+
"generate-api-client": cross-env api-client-generator --APP_PLATFORM_MODULES='[MarketplaceVendor,Catalog,Orders]' --APP_API_CLIENT_DIRECTORY=./src/api_client/
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
The options are listed in the table below:
|
|
57
|
+
|
|
58
|
+
| Options | Description | Example |
|
|
59
|
+
|----------------------------- |---------------------------------------------------------------- |------------------------------------------------------------ |
|
|
60
|
+
| `--APP_PLATFORM_MODULES` | Platform modules to generate API client.<br>{==string[]==} <br> Customize the `--APP_PLATFORM_MODULES` list<br>to match your project's requirements. | `--APP_PLATFORM_MODULES='[MarketplaceVendor,Orders,Catalog]'` |
|
|
61
|
+
| `--APP_API_CLIENT_DIRECTORY` | Output directory for generated API clients. <br>{==string==} | `--APP_API_CLIENT_DIRECTORY=./src/api_client/` |
|
|
62
|
+
| `--APP_PLATFORM_URL` | Platform URL to obtain client API configs. <br>{==string==} | `--APP_PLATFORM_URL=https://vcmp-dev.govirto.com/` |
|
|
63
|
+
| `--APP_PACKAGE_NAME` | Package name for generated API clients. <br>{==string==} | `--APP_PACKAGE_NAME=vc-app-extend` |
|
|
64
|
+
| `--APP_PACKAGE_VERSION` | Package version for generated API clients. <br>{==string==} | `--APP_PACKAGE_VERSION=1.0.0` |
|
|
65
|
+
| `--APP_TYPE_STYLE` | Sets the type style for generated DTOs. Can be 'Class' or 'Interface'.<br>{==string==} | `--APP_TYPE_STYLE=Interface` |
|
|
66
|
+
| `--APP_OUT_DIR` | Output directory for generated API clients. <br>{==string==} | `--APP_OUT_DIR=./src/api_client/` |
|
|
67
|
+
| `--APP_BUILD_DIR` | Directory where TypeScript files will be compiled. <br>{==string==} | `--APP_BUILD_DIR=lib` (default is "dist") |
|
|
68
|
+
| `--SKIP_BUILD` | Skip build step. <br>{==boolean==} | `--SKIP_BUILD=true` |
|
|
69
|
+
| `--VERBOSE` | Enable verbose logging. <br>{==boolean==} | `--VERBOSE=true` |
|
|
71
70
|
|
|
72
71
|
3. Configure Platform URL to ensure your project can access the platform's API configurations. Add the platform URL to your project's **.env** file:
|
|
73
72
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
```title="vc-app-extend/.env"
|
|
74
|
+
APP_PLATFORM_URL=https://vcmp-dev.govirto.com/
|
|
75
|
+
```
|
|
77
76
|
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
!!! note
|
|
78
|
+
Alternatively, you can specify the Platform URL as a command option in the previous step when running the `"generate-api-client"` command.
|
|
80
79
|
|
|
81
80
|
4. Generate the API clients using the following command:
|
|
82
81
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
```
|
|
83
|
+
yarn generate-api-client
|
|
84
|
+
```
|
|
86
85
|
|
|
87
86
|
This command generates the required API clients for your custom application. Now you can effortlessly access the VC Platform API from your custom application using the generated API client.
|
|
88
87
|
|
|
@@ -113,7 +112,7 @@ API client now includes metadata to track the generation:
|
|
|
113
112
|
|
|
114
113
|
The generator handles multiple API clients effectively:
|
|
115
114
|
|
|
116
|
-
- Creates standardized exports with both short names (`./{moduleName}`) and full names (`./virtocommerce.{moduleName}`)
|
|
115
|
+
- Creates standardized exports with both short names (`./{moduleName}`) and full names (`./virtocommerce.{moduleName}`)
|
|
117
116
|
- Prevents duplicate module exports by intelligently merging with existing ones
|
|
118
117
|
- Automatically removes `module` and `types` fields that conflict with multiple exports
|
|
119
118
|
- Works properly with incremental generation (can add new APIs without breaking existing ones)
|
|
@@ -130,11 +129,11 @@ This enables both simple usage for single-API packages and proper subpath export
|
|
|
130
129
|
|
|
131
130
|
```js
|
|
132
131
|
// Single API package (using root export)
|
|
133
|
-
import { MyClient } from
|
|
132
|
+
import { MyClient } from '@myapp/api';
|
|
134
133
|
|
|
135
134
|
// Multi-API package (using subpath exports)
|
|
136
|
-
import { ClientA } from
|
|
137
|
-
import { ClientB } from
|
|
135
|
+
import { ClientA } from '@myapp/api/moduleA';
|
|
136
|
+
import { ClientB } from '@myapp/api/moduleB';
|
|
138
137
|
```
|
|
139
138
|
|
|
140
139
|
### Directory Creation
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { App
|
|
1
|
+
import { App } from "vue";
|
|
2
2
|
<% if (dashboard) { -%>
|
|
3
3
|
import { addMenuItem, registerDashboardWidget } from "@vc-shell/framework";
|
|
4
|
+
import { markRaw } from "vue";
|
|
4
5
|
import Welcome from "./components/dashboard-widgets/Welcome.vue";
|
|
5
6
|
<% } -%>
|
|
6
7
|
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
</template>
|
|
15
15
|
|
|
16
16
|
<script setup lang="ts">
|
|
17
|
+
// eslint-disable-next-line import/no-unresolved
|
|
17
18
|
import Welcome from "/assets/welcome.png";
|
|
18
19
|
</script>
|
|
19
20
|
|
|
@@ -39,7 +40,7 @@ import Welcome from "/assets/welcome.png";
|
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
&__welcome-description {
|
|
42
|
-
@apply tw-whitespace-break-spaces tw-text-
|
|
43
|
+
@apply tw-whitespace-break-spaces tw-text-s tw-max-w-[90%] tw-mx-auto tw-leading-5 tw-font-semibold;
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
46
|
</style>
|
|
@@ -18,7 +18,6 @@ const isReady = ref(false);
|
|
|
18
18
|
const version = import.meta.env.PACKAGE_VERSION;
|
|
19
19
|
|
|
20
20
|
const { isAuthenticated } = useUser();
|
|
21
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- used by the TODO example below
|
|
22
21
|
const { setBroadcastFilter } = useBroadcastFilter();
|
|
23
22
|
|
|
24
23
|
onMounted(async () => {
|
|
@@ -1,40 +1,43 @@
|
|
|
1
1
|
import { RouteRecordRaw } from "vue-router";
|
|
2
2
|
import App from "../pages/App.vue";
|
|
3
|
-
<%
|
|
3
|
+
<% if (dashboard) { %>
|
|
4
4
|
import Dashboard from "../pages/Dashboard.vue";
|
|
5
|
-
<%
|
|
5
|
+
<% } %>
|
|
6
6
|
import { Invite, Login, ResetPassword, ForgotPassword, ChangePasswordPage } from "@vc-shell/framework";
|
|
7
|
+
// eslint-disable-next-line import/no-unresolved
|
|
7
8
|
import whiteLogoImage from "/assets/logo-white.svg";
|
|
8
|
-
|
|
9
|
+
// eslint-disable-next-line import/no-unresolved
|
|
10
|
+
import bgImage from "/assets/background.jpg";
|
|
9
11
|
|
|
12
|
+
<% if (tenantRoutes) { %>
|
|
10
13
|
const tenantIdRegex = "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}";
|
|
11
|
-
<%
|
|
14
|
+
<% } %>
|
|
12
15
|
|
|
13
16
|
export const routes: RouteRecordRaw[] = [
|
|
14
17
|
{
|
|
15
|
-
<%
|
|
18
|
+
<% if (tenantRoutes) { %>
|
|
16
19
|
path: `/:tenantId(${tenantIdRegex})?`,
|
|
17
|
-
<%
|
|
20
|
+
<% } else { %>
|
|
18
21
|
path: "/",
|
|
19
|
-
<%
|
|
22
|
+
<% } %>
|
|
20
23
|
component: App,
|
|
21
24
|
name: "App",
|
|
22
25
|
meta: {
|
|
23
26
|
root: true,
|
|
24
27
|
},
|
|
25
28
|
children: [
|
|
26
|
-
<%
|
|
29
|
+
<% if (dashboard) { %>
|
|
27
30
|
{
|
|
28
31
|
name: "Dashboard",
|
|
29
32
|
path: "",
|
|
30
|
-
<%
|
|
33
|
+
<% if (tenantRoutes) { %>
|
|
31
34
|
alias: `/:tenantId(${tenantIdRegex})?`,
|
|
32
|
-
<%
|
|
35
|
+
<% } else { %>
|
|
33
36
|
alias: "/",
|
|
34
|
-
<%
|
|
37
|
+
<% } %>
|
|
35
38
|
component: Dashboard,
|
|
36
39
|
},
|
|
37
|
-
<%
|
|
40
|
+
<% } %>
|
|
38
41
|
],
|
|
39
42
|
},
|
|
40
43
|
{
|
|
@@ -4,7 +4,14 @@
|
|
|
4
4
|
"baseUrl": ".",
|
|
5
5
|
"outDir": "dist",
|
|
6
6
|
"rootDir": "src",
|
|
7
|
-
"types": [
|
|
7
|
+
"types": [
|
|
8
|
+
"vite/client",
|
|
9
|
+
"@vc-shell/framework/globals"
|
|
10
|
+
]
|
|
8
11
|
},
|
|
9
|
-
"include": [
|
|
12
|
+
"include": [
|
|
13
|
+
"./src/**/*.ts",
|
|
14
|
+
"./src/**/*.vue",
|
|
15
|
+
"./src/**/*.json"
|
|
16
|
+
]
|
|
10
17
|
}
|
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.0-
|
|
4
|
+
"version": "2.4.0-pr303.f20ea90",
|
|
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.4.0-
|
|
19
|
+
"@vc-shell/ts-config": "2.4.0-pr303.f20ea90",
|
|
20
20
|
"copyfiles": "^2.4.1",
|
|
21
21
|
"cross-env": "^7.0.3",
|
|
22
22
|
"shx": "^0.3.4",
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"ejs": "^3.1.10",
|
|
27
|
+
"magicast": "^0.3.5",
|
|
27
28
|
"mri": "^1.2.0",
|
|
28
29
|
"picocolors": "^1.1.1",
|
|
29
|
-
"prettier": "^3.6.2",
|
|
30
30
|
"prompts": "^2.4.2",
|
|
31
31
|
"tslib": "^2.5.3",
|
|
32
32
|
"vite": "^6.3.3",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codegen.test.d.ts","sourceRoot":"","sources":["../../src/engine/codegen.test.ts"],"names":[],"mappings":""}
|
package/dist/engine/format.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Format generated sources in place.
|
|
3
|
-
*
|
|
4
|
-
* Templates are `.ejs`, so neither Prettier nor ESLint can check them directly —
|
|
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
|
|
10
|
-
* rather than failing the scaffold.
|
|
11
|
-
*/
|
|
12
|
-
export declare function formatGenerated(targets: string[]): Promise<number>;
|
|
13
|
-
//# sourceMappingURL=format.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/engine/format.ts"],"names":[],"mappings":"AAyBA;;;;;;;;;;GAUG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CA2BxE"}
|