@sprucelabs/spruce-templates 19.1.42 → 19.2.1
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/build/index.d.ts
CHANGED
|
@@ -125,6 +125,10 @@ export declare const templates: {
|
|
|
125
125
|
}): string;
|
|
126
126
|
views(options: ViewsOptions): string;
|
|
127
127
|
viewPlugin(): string;
|
|
128
|
+
viewControllerPlugin(options: {
|
|
129
|
+
namePascal: string;
|
|
130
|
+
nameCamel: string;
|
|
131
|
+
}): string;
|
|
128
132
|
theme(): string;
|
|
129
133
|
logTransport(): string;
|
|
130
134
|
};
|
package/build/index.js
CHANGED
|
@@ -258,6 +258,10 @@ exports.templates = {
|
|
|
258
258
|
const template = templateImporter_utility_1.default.getTemplate('view/view.plugin.ts.hbs');
|
|
259
259
|
return template({});
|
|
260
260
|
},
|
|
261
|
+
viewControllerPlugin(options) {
|
|
262
|
+
const template = templateImporter_utility_1.default.getTemplate('view/viewController.plugin.ts.hbs');
|
|
263
|
+
return template(options);
|
|
264
|
+
},
|
|
261
265
|
theme() {
|
|
262
266
|
const template = templateImporter_utility_1.default.getTemplate('view/skill.theme.ts.hbs');
|
|
263
267
|
return template({});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default class {{namePascal}}ViewPlugin {}
|
|
@@ -4,6 +4,11 @@ import {{namePascal}} from '{{path}}'
|
|
|
4
4
|
{{#each vcTemplateItems}}
|
|
5
5
|
import {{namePascal}} from '{{path}}'
|
|
6
6
|
{{/each}}
|
|
7
|
+
{{#each viewPluginItems}}
|
|
8
|
+
import {{namePascal}} from '{{path}}'
|
|
9
|
+
{{/each}}
|
|
10
|
+
|
|
11
|
+
import '@sprucelabs/heartwood-view-controllers'
|
|
7
12
|
|
|
8
13
|
const vcs = {
|
|
9
14
|
{{#each svcTemplateItems}}
|
|
@@ -14,6 +19,12 @@ const vcs = {
|
|
|
14
19
|
{{/each}}
|
|
15
20
|
}
|
|
16
21
|
|
|
22
|
+
export const pluginClasses = {
|
|
23
|
+
{{#each viewPluginItems}}
|
|
24
|
+
{{nameCamel}}: {{namePascal}},
|
|
25
|
+
{{/each}}
|
|
26
|
+
}
|
|
27
|
+
|
|
17
28
|
{{#if svcTemplateItems}}
|
|
18
29
|
type LoadOptions<Args extends Record<string,any>[]> = Args[0]['args'] extends Record<string, any> ? Args[0]['args'] : Record<never, any>
|
|
19
30
|
{{/if}}
|
|
@@ -45,10 +56,15 @@ declare module '@sprucelabs/heartwood-view-controllers/build/types/heartwood.typ
|
|
|
45
56
|
'{{../namespaceKebab}}.{{id}}': ConstructorParameters<typeof {{namePascal}}>[0]
|
|
46
57
|
{{/each}}
|
|
47
58
|
}
|
|
48
|
-
}
|
|
49
59
|
|
|
60
|
+
interface ViewControllerPlugins {
|
|
61
|
+
{{#each viewPluginItems}}
|
|
62
|
+
{{nameCamel}}: {{namePascal}}
|
|
63
|
+
{{/each}}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
50
66
|
|
|
51
67
|
//@ts-ignore
|
|
52
|
-
if(typeof heartwood === 'function') { heartwood(vcs) }
|
|
68
|
+
if(typeof heartwood === 'function') { heartwood(vcs, pluginClasses) }
|
|
53
69
|
|
|
54
|
-
export default vcs
|
|
70
|
+
export default vcs
|
|
@@ -113,10 +113,16 @@ export interface VcTemplateItem {
|
|
|
113
113
|
path: string;
|
|
114
114
|
id: string;
|
|
115
115
|
}
|
|
116
|
+
export interface ViewControllerPluginItem {
|
|
117
|
+
namePascal: string;
|
|
118
|
+
nameCamel: string;
|
|
119
|
+
path: string;
|
|
120
|
+
}
|
|
116
121
|
export interface ViewsOptions {
|
|
117
122
|
namespaceKebab: string;
|
|
118
123
|
svcTemplateItems: VcTemplateItem[];
|
|
119
124
|
vcTemplateItems: VcTemplateItem[];
|
|
125
|
+
viewPluginItems: ViewControllerPluginItem[];
|
|
120
126
|
}
|
|
121
127
|
export type ListenerTemplateItem = Omit<EventFeatureListener, 'callback'> & {
|
|
122
128
|
path: string;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "19.1
|
|
6
|
+
"version": "19.2.1",
|
|
7
7
|
"files": [
|
|
8
8
|
"build/**/*",
|
|
9
9
|
"tsconfig.json",
|
|
@@ -56,10 +56,10 @@
|
|
|
56
56
|
"watch.tsc": "tsc -w"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@sprucelabs/mercury-types": "^46.0.
|
|
60
|
-
"@sprucelabs/schema": "^29.4.
|
|
61
|
-
"@sprucelabs/spruce-event-utils": "^38.0
|
|
62
|
-
"@sprucelabs/spruce-skill-utils": "^30.3.
|
|
59
|
+
"@sprucelabs/mercury-types": "^46.0.260",
|
|
60
|
+
"@sprucelabs/schema": "^29.4.23",
|
|
61
|
+
"@sprucelabs/spruce-event-utils": "^38.1.0",
|
|
62
|
+
"@sprucelabs/spruce-skill-utils": "^30.3.16",
|
|
63
63
|
"fs-extra": "^10.1.0",
|
|
64
64
|
"handlebars": "^4.7.8",
|
|
65
65
|
"lodash": "^4.17.21",
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@types/fs-extra": "^9.0.13",
|
|
70
|
-
"@types/lodash": "^4.
|
|
71
|
-
"@types/node": "^20.11.
|
|
70
|
+
"@types/lodash": "^4.17.0",
|
|
71
|
+
"@types/node": "^20.11.28",
|
|
72
72
|
"chokidar-cli": "^3.0.0",
|
|
73
73
|
"concurrently": "^8.2.2",
|
|
74
74
|
"conventional-changelog-sprucelabs": "^1.1.2",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"yarn-upgrade-all": {
|
|
79
79
|
"ignore": []
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "5b9df671bf36f0d87aa7682bdffc9cb64f74042d"
|
|
82
82
|
}
|