@knapsack/renderer-hbs 4.69.8 → 4.69.9--canary.4745.6c2414b.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +0 -12
- package/dist/renderer-hbs.d.ts +8 -7
- package/dist/renderer-hbs.d.ts.map +1 -1
- package/dist/renderer-hbs.js +128 -127
- package/dist/renderer-hbs.js.map +1 -1
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
@@ -1,15 +1,3 @@
|
|
1
|
-
# v4.69.8 (Thu Sep 12 2024)
|
2
|
-
|
3
|
-
#### 🐛 Bug Fix
|
4
|
-
|
5
|
-
- refactor Renderers for cleaner types [#4746](https://github.com/knapsack-labs/app-monorepo/pull/4746) ([@EvanLovely](https://github.com/EvanLovely))
|
6
|
-
|
7
|
-
#### Authors: 1
|
8
|
-
|
9
|
-
- Evan Lovely ([@EvanLovely](https://github.com/EvanLovely))
|
10
|
-
|
11
|
-
---
|
12
|
-
|
13
1
|
# v4.69.7 (Wed Sep 11 2024)
|
14
2
|
|
15
3
|
#### 🐛 Bug Fix
|
package/dist/renderer-hbs.d.ts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
|
-
import {
|
1
|
+
import { KnapsackRendererBase } from '@knapsack/app';
|
2
|
+
import type { KnapsackTemplateRenderer as Renderer } from '@knapsack/app/types';
|
2
3
|
import Hbs from 'handlebars';
|
3
|
-
export declare class KnapsackHbsRenderer extends
|
4
|
+
export declare class KnapsackHbsRenderer extends KnapsackRendererBase implements Renderer {
|
4
5
|
handlebars: typeof Hbs;
|
5
6
|
alterHandlebars: (handlebars: typeof Hbs) => void;
|
6
7
|
constructor({ alterHandlebars, }?: {
|
@@ -11,11 +12,11 @@ export declare class KnapsackHbsRenderer extends RendererBase implements Rendera
|
|
11
12
|
alterHandlebars?: typeof KnapsackHbsRenderer.prototype.alterHandlebars;
|
12
13
|
});
|
13
14
|
registerComponentPaths(): Promise<void>;
|
14
|
-
init: Renderer['init']
|
15
|
-
onChange: Renderer['onChange']
|
16
|
-
render: Renderer['render']
|
17
|
-
getUsage: Renderer['getUsage']
|
18
|
-
getTemplateSuggestions: Renderer['getTemplateSuggestions']
|
15
|
+
init(options: Parameters<Renderer['init']>[0]): ReturnType<Renderer['init']>;
|
16
|
+
onChange(): ReturnType<Renderer['onChange']>;
|
17
|
+
render(opt: Parameters<Renderer['render']>[0]): ReturnType<Renderer['render']>;
|
18
|
+
getUsage({ pattern, patternManifest, template, demo, }: Parameters<Renderer['getUsage']>[0]): ReturnType<Renderer['getUsage']>;
|
19
|
+
getTemplateSuggestions(): ReturnType<Renderer['getTemplateSuggestions']>;
|
19
20
|
getMeta: Renderer['getMeta'];
|
20
21
|
}
|
21
22
|
//# sourceMappingURL=renderer-hbs.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"renderer-hbs.d.ts","sourceRoot":"","sources":["../src/renderer-hbs.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"renderer-hbs.d.ts","sourceRoot":"","sources":["../src/renderer-hbs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAO,MAAM,eAAe,CAAC;AAE1D,OAAO,KAAK,EAAE,wBAAwB,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAGhF,OAAO,GAAG,MAAM,YAAY,CAAC;AAU7B,qBAAa,mBACX,SAAQ,oBACR,YAAW,QAAQ;IAGnB,UAAU,EAAE,OAAO,GAAG,CAAC;IACvB,eAAe,EAAE,CAAC,UAAU,EAAE,OAAO,GAAG,KAAK,IAAI,CAAC;gBAEtC,EACV,eAA0B,GAC3B,GAAE;QACD;;;WAGG;QACH,eAAe,CAAC,EAAE,OAAO,mBAAmB,CAAC,SAAS,CAAC,eAAe,CAAC;KACnE;IAaA,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC;IA0CvC,IAAI,CACR,OAAO,EAAE,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,GACvC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAK/B,QAAQ,IAAI,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IAKtC,MAAM,CACV,GAAG,EAAE,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,GACrC,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAkC3B,QAAQ,CAAC,EACb,OAAO,EACP,eAAe,EACf,QAAQ,EACR,IAAI,GACL,EAAE,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IAkHnE,sBAAsB,IAAI,UAAU,CACxC,QAAQ,CAAC,wBAAwB,CAAC,CACnC;IAaD,OAAO,EAAE,QAAQ,CAAC,SAAS,CAAC,CA0BzB;CACJ"}
|
package/dist/renderer-hbs.js
CHANGED
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.KnapsackHbsRenderer = void 0;
|
7
7
|
const app_1 = require("@knapsack/app");
|
8
|
-
const renderers_1 = require("@knapsack/app/renderers");
|
9
8
|
const file_utils_1 = require("@knapsack/file-utils");
|
10
9
|
const types_1 = require("@knapsack/types");
|
11
10
|
const path_1 = require("path");
|
@@ -14,138 +13,15 @@ const isEmpty_1 = __importDefault(require("lodash/isEmpty"));
|
|
14
13
|
const utils_1 = require("./utils");
|
15
14
|
const { pkg } = (0, file_utils_1.findUpPkgJson)(__dirname);
|
16
15
|
const gitRoot = (0, file_utils_1.findGitRoot)();
|
17
|
-
|
16
|
+
// static methods only
|
17
|
+
const { createSlotOptionsHtmlTags } = app_1.KnapsackRendererBase;
|
18
|
+
class KnapsackHbsRenderer extends app_1.KnapsackRendererBase {
|
18
19
|
constructor({ alterHandlebars = () => { }, } = {}) {
|
19
20
|
super({
|
20
21
|
id: types_1.rendererIds.hbs,
|
21
22
|
extension: 'hbs',
|
22
23
|
language: 'hbs',
|
23
24
|
});
|
24
|
-
this.init = async (options) => {
|
25
|
-
await super.init(options);
|
26
|
-
await this.registerComponentPaths();
|
27
|
-
};
|
28
|
-
this.onChange = () => {
|
29
|
-
super.onChange();
|
30
|
-
this.registerComponentPaths();
|
31
|
-
};
|
32
|
-
this.render = async (opt) => {
|
33
|
-
try {
|
34
|
-
const usage = await this.getUsage(opt);
|
35
|
-
let data = {};
|
36
|
-
if (opt.demo.type === 'data') {
|
37
|
-
const { globalData } = (0, utils_1.splitData)(opt.demo.data.props);
|
38
|
-
data = globalData;
|
39
|
-
}
|
40
|
-
const template = this.handlebars.compile(usage);
|
41
|
-
const html = template(data);
|
42
|
-
return {
|
43
|
-
ok: true,
|
44
|
-
html,
|
45
|
-
/**
|
46
|
-
* since we can only show one code block for usage and HBS rendering involves global data (i.e. handlebars context, the `data` var here) AND a template (the `usage` var) we're compromising by showing the data object above the template as that's the best we can do for now
|
47
|
-
*/
|
48
|
-
usage: Object.keys(data).length
|
49
|
-
? // eslint-disable-next-line prefer-template
|
50
|
-
JSON.stringify(data, null, ' ') + '\n' + usage
|
51
|
-
: usage,
|
52
|
-
templateLanguage: this.language,
|
53
|
-
};
|
54
|
-
}
|
55
|
-
catch (err) {
|
56
|
-
app_1.log.error(err);
|
57
|
-
return {
|
58
|
-
ok: false,
|
59
|
-
message: err.message,
|
60
|
-
html: `<p>Error rendering: ${err.message}</p>`,
|
61
|
-
};
|
62
|
-
}
|
63
|
-
};
|
64
|
-
this.getUsage = async ({ pattern, patternManifest, template, demo, }) => {
|
65
|
-
switch (demo === null || demo === void 0 ? void 0 : demo.type) {
|
66
|
-
case 'template': {
|
67
|
-
const { absolutePath, exists } = patternManifest.getTemplatePath({
|
68
|
-
patternId: pattern.id,
|
69
|
-
templateId: template.id,
|
70
|
-
demoId: demo.id,
|
71
|
-
});
|
72
|
-
if (!exists) {
|
73
|
-
throw new Error(`The Handlebars template demo does not exist at path ${absolutePath}`);
|
74
|
-
}
|
75
|
-
return (0, file_utils_1.readFile)(absolutePath);
|
76
|
-
}
|
77
|
-
case 'data': {
|
78
|
-
const { data: { props, slots, slotsOptionsComputed }, } = demo;
|
79
|
-
// No slots from the UI (empty slots object)
|
80
|
-
if ((0, isEmpty_1.default)(slots)) {
|
81
|
-
const usage = await (0, utils_1.getHbsUsage)({
|
82
|
-
templateName: template.path,
|
83
|
-
data: props,
|
84
|
-
});
|
85
|
-
return usage;
|
86
|
-
}
|
87
|
-
// We gots slots
|
88
|
-
{
|
89
|
-
const slotIncludes = await Promise.all(Object.keys(slots).map(async (slotName) => {
|
90
|
-
const slottedTemplates = slots[slotName];
|
91
|
-
const slotContent = await Promise.all(slottedTemplates.map(async (slottedTemplate) => {
|
92
|
-
if (slottedTemplate.type === 'text') {
|
93
|
-
return ` ${slottedTemplate.text}`;
|
94
|
-
}
|
95
|
-
if (slottedTemplate.type === 'template-reference') {
|
96
|
-
throw new Error(`Cannot handle slotted template references in ${JSON.stringify({
|
97
|
-
patternId: pattern.id,
|
98
|
-
templateId: template.id,
|
99
|
-
demoId: demo.id,
|
100
|
-
slottedTemplate,
|
101
|
-
})}`);
|
102
|
-
}
|
103
|
-
const thisPattern = patternManifest.getPattern(slottedTemplate.patternId);
|
104
|
-
const thisTemplate = thisPattern.templates.find((t) => t.id === slottedTemplate.templateId);
|
105
|
-
const usage = await this.getUsage({
|
106
|
-
pattern: thisPattern,
|
107
|
-
template: thisTemplate,
|
108
|
-
patternManifest,
|
109
|
-
demo: slottedTemplate.demo ||
|
110
|
-
this.patterns.demosById[slottedTemplate.demoId],
|
111
|
-
});
|
112
|
-
return usage;
|
113
|
-
}));
|
114
|
-
const slotOptionsComputed = slotsOptionsComputed === null || slotsOptionsComputed === void 0 ? void 0 : slotsOptionsComputed[slotName];
|
115
|
-
const { openTag, closeTag } = (0, renderers_1.createSlotOptionsHtmlTags)({
|
116
|
-
slotOptionsComputed,
|
117
|
-
classAttributeName: 'class',
|
118
|
-
stylesValueType: 'string',
|
119
|
-
});
|
120
|
-
return {
|
121
|
-
name: slotName,
|
122
|
-
content: [openTag, ...slotContent, closeTag].filter(Boolean),
|
123
|
-
};
|
124
|
-
}));
|
125
|
-
// @TODO: need slot names?
|
126
|
-
// const availableSlotNames = Object.keys(template.spec.slots);
|
127
|
-
const usage = await (0, utils_1.getHbsUsage)({
|
128
|
-
templateName: template.path,
|
129
|
-
data: props,
|
130
|
-
slots: slotIncludes,
|
131
|
-
});
|
132
|
-
return usage;
|
133
|
-
}
|
134
|
-
}
|
135
|
-
default:
|
136
|
-
throw new Error(`Must pass in a demo.type`);
|
137
|
-
}
|
138
|
-
};
|
139
|
-
this.getTemplateSuggestions = async () => {
|
140
|
-
const { unusedPaths } = await this.getUnusedTemplatePaths({
|
141
|
-
globPaths: [(0, path_1.join)(gitRoot, '**/*.{hbs,handlebars}')],
|
142
|
-
cwd: gitRoot,
|
143
|
-
});
|
144
|
-
const suggestions = unusedPaths.map((path) => ({
|
145
|
-
path,
|
146
|
-
}));
|
147
|
-
return { suggestions };
|
148
|
-
};
|
149
25
|
this.getMeta = () => ({
|
150
26
|
id: this.id,
|
151
27
|
title: 'Handlebars',
|
@@ -205,6 +81,131 @@ class KnapsackHbsRenderer extends renderers_1.RendererBase {
|
|
205
81
|
// Running this AFTER we register all the Knapsack partials
|
206
82
|
this.alterHandlebars(this.handlebars);
|
207
83
|
}
|
84
|
+
async init(options) {
|
85
|
+
await super.init(options);
|
86
|
+
await this.registerComponentPaths();
|
87
|
+
}
|
88
|
+
onChange() {
|
89
|
+
super.onChange();
|
90
|
+
this.registerComponentPaths();
|
91
|
+
}
|
92
|
+
async render(opt) {
|
93
|
+
try {
|
94
|
+
const usage = await this.getUsage(opt);
|
95
|
+
let data = {};
|
96
|
+
if (opt.demo.type === 'data') {
|
97
|
+
const { globalData } = (0, utils_1.splitData)(opt.demo.data.props);
|
98
|
+
data = globalData;
|
99
|
+
}
|
100
|
+
const template = this.handlebars.compile(usage);
|
101
|
+
const html = template(data);
|
102
|
+
return {
|
103
|
+
ok: true,
|
104
|
+
html,
|
105
|
+
/**
|
106
|
+
* since we can only show one code block for usage and HBS rendering involves global data (i.e. handlebars context, the `data` var here) AND a template (the `usage` var) we're compromising by showing the data object above the template as that's the best we can do for now
|
107
|
+
*/
|
108
|
+
usage: Object.keys(data).length
|
109
|
+
? // eslint-disable-next-line prefer-template
|
110
|
+
JSON.stringify(data, null, ' ') + '\n' + usage
|
111
|
+
: usage,
|
112
|
+
templateLanguage: this.language,
|
113
|
+
};
|
114
|
+
}
|
115
|
+
catch (err) {
|
116
|
+
app_1.log.error(err);
|
117
|
+
return {
|
118
|
+
ok: false,
|
119
|
+
message: err.message,
|
120
|
+
html: `<p>Error rendering: ${err.message}</p>`,
|
121
|
+
};
|
122
|
+
}
|
123
|
+
}
|
124
|
+
async getUsage({ pattern, patternManifest, template, demo, }) {
|
125
|
+
switch (demo === null || demo === void 0 ? void 0 : demo.type) {
|
126
|
+
case 'template': {
|
127
|
+
const { absolutePath, exists } = patternManifest.getTemplatePath({
|
128
|
+
patternId: pattern.id,
|
129
|
+
templateId: template.id,
|
130
|
+
demoId: demo.id,
|
131
|
+
});
|
132
|
+
if (!exists) {
|
133
|
+
throw new Error(`The Handlebars template demo does not exist at path ${absolutePath}`);
|
134
|
+
}
|
135
|
+
return (0, file_utils_1.readFile)(absolutePath);
|
136
|
+
}
|
137
|
+
case 'data': {
|
138
|
+
const { data: { props, slots, slotsOptionsComputed }, } = demo;
|
139
|
+
// No slots from the UI (empty slots object)
|
140
|
+
if ((0, isEmpty_1.default)(slots)) {
|
141
|
+
const usage = await (0, utils_1.getHbsUsage)({
|
142
|
+
templateName: template.path,
|
143
|
+
data: props,
|
144
|
+
});
|
145
|
+
return usage;
|
146
|
+
}
|
147
|
+
// We gots slots
|
148
|
+
{
|
149
|
+
const slotIncludes = await Promise.all(Object.keys(slots).map(async (slotName) => {
|
150
|
+
const slottedTemplates = slots[slotName];
|
151
|
+
const slotContent = await Promise.all(slottedTemplates.map(async (slottedTemplate) => {
|
152
|
+
if (app_1.KnapsackRendererBase.isSlottedText(slottedTemplate)) {
|
153
|
+
return ` ${slottedTemplate.text}`;
|
154
|
+
}
|
155
|
+
if (app_1.KnapsackRendererBase.isSlottedTemplateReference(slottedTemplate)) {
|
156
|
+
throw new Error(`Cannot handle slotted template references in ${JSON.stringify({
|
157
|
+
patternId: pattern.id,
|
158
|
+
templateId: template.id,
|
159
|
+
demoId: demo.id,
|
160
|
+
slottedTemplate,
|
161
|
+
})}`);
|
162
|
+
}
|
163
|
+
const thisPattern = patternManifest.getPattern(slottedTemplate.patternId);
|
164
|
+
const thisTemplate = thisPattern.templates.find((t) => t.id === slottedTemplate.templateId);
|
165
|
+
const usage = await this.getUsage({
|
166
|
+
pattern: thisPattern,
|
167
|
+
template: thisTemplate,
|
168
|
+
patternManifest,
|
169
|
+
demo: slottedTemplate.demo ||
|
170
|
+
this.patterns.demosById[slottedTemplate.demoId],
|
171
|
+
});
|
172
|
+
return usage;
|
173
|
+
}));
|
174
|
+
const slotOptionsComputed = slotsOptionsComputed === null || slotsOptionsComputed === void 0 ? void 0 : slotsOptionsComputed[slotName];
|
175
|
+
const { openTag, closeTag } = createSlotOptionsHtmlTags({
|
176
|
+
slotOptionsComputed,
|
177
|
+
classAttributeName: 'class',
|
178
|
+
stylesValueType: 'string',
|
179
|
+
});
|
180
|
+
return {
|
181
|
+
name: slotName,
|
182
|
+
content: [openTag, ...slotContent, closeTag].filter(Boolean),
|
183
|
+
};
|
184
|
+
}));
|
185
|
+
// @TODO: need slot names?
|
186
|
+
// const availableSlotNames = Object.keys(template.spec.slots);
|
187
|
+
const usage = await (0, utils_1.getHbsUsage)({
|
188
|
+
templateName: template.path,
|
189
|
+
data: props,
|
190
|
+
slots: slotIncludes,
|
191
|
+
});
|
192
|
+
return usage;
|
193
|
+
}
|
194
|
+
}
|
195
|
+
default:
|
196
|
+
throw new Error(`Must pass in a demo.type`);
|
197
|
+
}
|
198
|
+
}
|
199
|
+
async getTemplateSuggestions() {
|
200
|
+
const { unusedPaths } = await this.getUnusedTemplatePaths({
|
201
|
+
globPaths: [(0, path_1.join)(gitRoot, '**/*.{hbs,handlebars}')],
|
202
|
+
cwd: gitRoot,
|
203
|
+
});
|
204
|
+
const suggestions = unusedPaths.map((path) => ({
|
205
|
+
path,
|
206
|
+
}));
|
207
|
+
return { suggestions };
|
208
|
+
}
|
208
209
|
}
|
209
210
|
exports.KnapsackHbsRenderer = KnapsackHbsRenderer;
|
210
211
|
//# sourceMappingURL=renderer-hbs.js.map
|
package/dist/renderer-hbs.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"renderer-hbs.js","sourceRoot":"","sources":["../src/renderer-hbs.ts"],"names":[],"mappings":";;;;;;AAAA,
|
1
|
+
{"version":3,"file":"renderer-hbs.js","sourceRoot":"","sources":["../src/renderer-hbs.ts"],"names":[],"mappings":";;;;;;AAAA,uCAA0D;AAC1D,qDAA4E;AAE5E,2CAAuE;AACvE,+BAA4B;AAC5B,4DAA6B;AAC7B,6DAAuC;AACvC,mCAAiD;AAEjD,MAAM,EAAE,GAAG,EAAE,GAAG,IAAA,0BAAa,EAAC,SAAS,CAAC,CAAC;AACzC,MAAM,OAAO,GAAG,IAAA,wBAAW,GAAE,CAAC;AAE9B,sBAAsB;AACtB,MAAM,EAAE,yBAAyB,EAAE,GAAG,0BAAoB,CAAC;AAE3D,MAAa,mBACX,SAAQ,0BAAoB;IAO5B,YAAY,EACV,eAAe,GAAG,GAAG,EAAE,GAAE,CAAC,MAOxB,EAAE;QACJ,KAAK,CAAC;YACJ,EAAE,EAAE,mBAAW,CAAC,GAAG;YACnB,SAAS,EAAE,KAAK;YAChB,QAAQ,EAAE,KAAK;SAChB,CAAC,CAAC;QAwOL,YAAO,GAAwB,GAAG,EAAE,CAAC,CAAC;YACpC,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,KAAK,EAAE,YAAY;YACnB,QAAQ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,EAAE,KAAK;wBACX,KAAK,EAAE,YAAY;qBACpB,CAAC,CAAC;oBAEH,OAAO,KAAK,CAAC;gBACf,CAAC;YACH,CAAC;YAED;gBACE,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;QAChD,CAAC;IACH,CAAC;IAED,KAAK,CAAC,sBAAsB;QAG1B,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,IAAI,CAAC,sBAAsB,CAAC;YACxD,SAAS,EAAE,CAAC,IAAA,WAAI,EAAC,OAAO,EAAE,uBAAuB,CAAC,CAAC;YACnD,GAAG,EAAE,OAAO;SACb,CAAC,CAAC;QAEH,MAAM,WAAW,GAAyB,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YACnE,IAAI;SACL,CAAC,CAAC,CAAC;QAEJ,OAAO,EAAE,WAAW,EAAE,CAAC;IACzB,CAAC;CA6BF;AAxRD,kDAwRC"}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@knapsack/renderer-hbs",
|
3
3
|
"description": "",
|
4
|
-
"version": "4.69.
|
4
|
+
"version": "4.69.9--canary.4745.6c2414b.0",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"types": "dist/index.d.ts",
|
7
7
|
"exports": {
|
@@ -22,18 +22,18 @@
|
|
22
22
|
"test": "time ava"
|
23
23
|
},
|
24
24
|
"dependencies": {
|
25
|
-
"@knapsack/app": "4.69.
|
26
|
-
"@knapsack/file-utils": "4.69.
|
27
|
-
"@knapsack/types": "4.69.
|
28
|
-
"@knapsack/utils": "4.69.
|
25
|
+
"@knapsack/app": "4.69.9--canary.4745.6c2414b.0",
|
26
|
+
"@knapsack/file-utils": "4.69.9--canary.4745.6c2414b.0",
|
27
|
+
"@knapsack/types": "4.69.9--canary.4745.6c2414b.0",
|
28
|
+
"@knapsack/utils": "4.69.9--canary.4745.6c2414b.0",
|
29
29
|
"handlebars": "^4.7.8",
|
30
30
|
"lodash": "^4.17.21"
|
31
31
|
},
|
32
32
|
"devDependencies": {
|
33
|
-
"@knapsack/eslint-config-starter": "4.69.
|
34
|
-
"@knapsack/prettier-config": "4.69.
|
35
|
-
"@knapsack/test-ava": "4.69.
|
36
|
-
"@knapsack/typescript-config-starter": "4.69.
|
33
|
+
"@knapsack/eslint-config-starter": "4.69.9--canary.4745.6c2414b.0",
|
34
|
+
"@knapsack/prettier-config": "4.69.9--canary.4745.6c2414b.0",
|
35
|
+
"@knapsack/test-ava": "4.69.9--canary.4745.6c2414b.0",
|
36
|
+
"@knapsack/typescript-config-starter": "4.69.9--canary.4745.6c2414b.0",
|
37
37
|
"@types/lodash": "^4.17.5",
|
38
38
|
"@types/node": "^20.16.5",
|
39
39
|
"ava": "^6.1.3",
|
@@ -49,5 +49,5 @@
|
|
49
49
|
"directory": "apps/client/renderers/renderer-hbs",
|
50
50
|
"type": "git"
|
51
51
|
},
|
52
|
-
"gitHead": "
|
52
|
+
"gitHead": "6c2414b5d69c37f450dad139139236877480897f"
|
53
53
|
}
|