@nocobase/app-template-default 1.0.0-beta.90 → 1.0.0-beta.91
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/app-template-default",
|
|
3
3
|
"displayName": "Default Template",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.91",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"prettier": "@nocobase/dev-config/prettier",
|
|
7
7
|
"engines": {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"nocobase": {
|
|
11
11
|
"templateKind": "app",
|
|
12
|
-
"defaultTemplateVersion": "1.0.0-beta.
|
|
12
|
+
"defaultTemplateVersion": "1.0.0-beta.91"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"@ai-sdk/react": "4.0.131",
|
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
"@nocobase/app-plugin-authorization": "^1.0.0-beta.37",
|
|
151
151
|
"@nocobase/app-plugin-database-explorer": "^1.0.0-beta.19",
|
|
152
152
|
"@nocobase/app-plugin-file": "^1.0.0-beta.30",
|
|
153
|
-
"@nocobase/app-plugin-foundation": "^0.1.0-beta.
|
|
153
|
+
"@nocobase/app-plugin-foundation": "^0.1.0-beta.18",
|
|
154
154
|
"@nocobase/app-plugin-i18n": "^1.0.0-beta.22",
|
|
155
155
|
"@nocobase/app-plugin-knowledge": "^0.1.0-beta.18",
|
|
156
156
|
"@nocobase/app-plugin-mail": "^1.0.0-beta.22",
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { describe, expect, it } from 'vitest';
|
|
2
2
|
import {
|
|
3
3
|
createCapabilityCatalog,
|
|
4
|
+
entryContent,
|
|
5
|
+
guideContent,
|
|
4
6
|
type DependencyManifest,
|
|
5
7
|
} from '@nocobase/app-plugin-foundation/capability-guide';
|
|
6
8
|
import packageMetadata from '../../package.json' with { type: 'json' };
|
|
@@ -69,7 +71,7 @@ describe('default Foundation integration', () => {
|
|
|
69
71
|
]);
|
|
70
72
|
});
|
|
71
73
|
|
|
72
|
-
it('lists every plugin this application declares in the capability guide, with the
|
|
74
|
+
it('lists every plugin this application declares in the capability guide, with the standalone core modules', () => {
|
|
73
75
|
const manifest = packageMetadata as DependencyManifest;
|
|
74
76
|
const { entries } = createCapabilityCatalog(manifest);
|
|
75
77
|
const declared = Object.keys({
|
|
@@ -89,8 +91,35 @@ describe('default Foundation integration', () => {
|
|
|
89
91
|
.filter((entry) => entry.source === 'kernel')
|
|
90
92
|
.map((entry) => entry.name),
|
|
91
93
|
).toEqual(['db', 'jobs', 'lifecycle', 'queue', 'realtime']);
|
|
92
|
-
//
|
|
93
|
-
|
|
94
|
-
|
|
94
|
+
// Installed extensions may use the guide's generic introduction.
|
|
95
|
+
for (const entry of entries) {
|
|
96
|
+
for (const locale of ['en-US', 'zh-CN']) {
|
|
97
|
+
const text = entryContent(guideContent(locale), entry);
|
|
98
|
+
expect(text.title.trim()).not.toBe('');
|
|
99
|
+
expect(text.summary.trim()).not.toBe('');
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
it('keeps an additional plugin discoverable without built-in wording', () => {
|
|
105
|
+
const packageName = '@example/app-plugin-business-extension';
|
|
106
|
+
const catalog = createCapabilityCatalog({
|
|
107
|
+
...packageMetadata,
|
|
108
|
+
dependencies: {
|
|
109
|
+
...packageMetadata.dependencies,
|
|
110
|
+
[packageName]: '1.0.0',
|
|
111
|
+
},
|
|
112
|
+
});
|
|
113
|
+
const entry = catalog.entries.find(
|
|
114
|
+
(item) => item.packageName === packageName,
|
|
115
|
+
)!;
|
|
116
|
+
expect(entry).toMatchObject({ source: 'plugin', known: false });
|
|
117
|
+
expect(catalog.find(entry.id)).toBe(entry);
|
|
118
|
+
for (const locale of ['en-US', 'zh-CN']) {
|
|
119
|
+
const text = entryContent(guideContent(locale), entry);
|
|
120
|
+
expect(text.title).toContain(packageName);
|
|
121
|
+
expect(text.summary.trim()).not.toBe('');
|
|
122
|
+
expect(text.prompts.main?.template).toContain(packageName);
|
|
123
|
+
}
|
|
95
124
|
});
|
|
96
125
|
});
|