@knapsack/renderer-twig 4.69.8--canary.4532.626b8d9.0 → 4.69.8
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +12 -0
- package/dist/renderer-twig.d.ts +6 -7
- package/dist/renderer-twig.d.ts.map +1 -1
- package/dist/renderer-twig.js +132 -132
- package/dist/renderer-twig.js.map +1 -1
- package/package.json +9 -11
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
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
|
+
|
1
13
|
# v4.69.7 (Wed Sep 11 2024)
|
2
14
|
|
3
15
|
#### 🐛 Bug Fix
|
package/dist/renderer-twig.d.ts
CHANGED
@@ -1,13 +1,12 @@
|
|
1
|
-
import {
|
2
|
-
import type { KnapsackRenderParams, KnapsackTemplateRenderer, KnapsackTemplateRendererResults } from '@knapsack/app/types';
|
1
|
+
import { Renderable, Renderer, RendererBase } from '@knapsack/app/renderers';
|
3
2
|
import TwigRenderer, { type TwigRendererConfig } from '@basalt/twig-renderer';
|
4
|
-
export declare class KnapsackTwigRenderer extends
|
3
|
+
export declare class KnapsackTwigRenderer extends RendererBase implements Renderable {
|
5
4
|
#private;
|
6
5
|
twigRenderer: TwigRenderer;
|
7
6
|
constructor(config: TwigRendererConfig);
|
8
|
-
render
|
9
|
-
getUsage
|
10
|
-
getTemplateSuggestions
|
11
|
-
getMeta:
|
7
|
+
render: Renderer['render'];
|
8
|
+
getUsage: Renderer['getUsage'];
|
9
|
+
getTemplateSuggestions: Renderer['getTemplateSuggestions'];
|
10
|
+
getMeta: Renderer['getMeta'];
|
12
11
|
}
|
13
12
|
//# sourceMappingURL=renderer-twig.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"renderer-twig.d.ts","sourceRoot":"","sources":["../src/renderer-twig.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"renderer-twig.d.ts","sourceRoot":"","sources":["../src/renderer-twig.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,QAAQ,EACR,YAAY,EAEb,MAAM,yBAAyB,CAAC;AAEjC,OAAO,YAAY,EAAE,EAAE,KAAK,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAoB9E,qBAAa,oBAAqB,SAAQ,YAAa,YAAW,UAAU;;IAC1E,YAAY,EAAE,YAAY,CAAC;gBAGf,MAAM,EAAE,kBAAkB;IAwBtC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAKxB;IAEF,QAAQ,EAAE,QAAQ,CAAC,UAAU,CAAC,CAyH5B;IAEF,sBAAsB,EAAE,QAAQ,CAAC,wBAAwB,CAAC,CAoCxD;IAEF,OAAO,EAAE,QAAQ,CAAC,SAAS,CAAC,CA4BzB;CACJ"}
|
package/dist/renderer-twig.js
CHANGED
@@ -17,20 +17,18 @@ var _KnapsackTwigRenderer_src;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
18
18
|
exports.KnapsackTwigRenderer = void 0;
|
19
19
|
const app_1 = require("@knapsack/app");
|
20
|
+
const renderers_1 = require("@knapsack/app/renderers");
|
20
21
|
const types_1 = require("@knapsack/types");
|
21
22
|
const twig_renderer_1 = __importDefault(require("@basalt/twig-renderer"));
|
22
23
|
const path_1 = require("path");
|
23
|
-
const fs_extra_1 = require("fs-extra");
|
24
24
|
const file_utils_1 = require("@knapsack/file-utils");
|
25
25
|
const utils_1 = require("./utils");
|
26
|
-
const pkg = JSON.parse((0,
|
26
|
+
const pkg = JSON.parse((0, file_utils_1.readFileSync)((0, path_1.join)(__dirname, '../package.json')));
|
27
27
|
app_1.log.setupUpdateNotifier(pkg);
|
28
|
-
// static methods only
|
29
|
-
const { createSlotOptionsHtmlTags } = app_1.KnapsackRendererBase;
|
30
28
|
const protoTemplatePath = (0, path_1.join)(__dirname, '../prototype-template/prototype-template.twig');
|
31
29
|
(0, file_utils_1.assertFileExists)(protoTemplatePath);
|
32
30
|
const protoTwigNamespace = 'knapsack-renderer-twig-prototype-template';
|
33
|
-
class KnapsackTwigRenderer extends
|
31
|
+
class KnapsackTwigRenderer extends renderers_1.RendererBase {
|
34
32
|
constructor(config) {
|
35
33
|
super({
|
36
34
|
id: types_1.rendererIds.twig,
|
@@ -38,6 +36,135 @@ class KnapsackTwigRenderer extends app_1.KnapsackRendererBase {
|
|
38
36
|
extension: '.twig',
|
39
37
|
});
|
40
38
|
_KnapsackTwigRenderer_src.set(this, void 0);
|
39
|
+
this.render = async (opt) => {
|
40
|
+
const usage = await this.getUsage(opt);
|
41
|
+
const results = await this.twigRenderer.renderString(usage);
|
42
|
+
return { ...results, usage, templateLanguage: this.language };
|
43
|
+
// return this.twigRenderer.render(template.alias, data);
|
44
|
+
};
|
45
|
+
this.getUsage = async (opt) => {
|
46
|
+
const { pattern, template, demo,
|
47
|
+
/**
|
48
|
+
* The Patterns class
|
49
|
+
*/
|
50
|
+
patternManifest, } = opt;
|
51
|
+
if (!demo) {
|
52
|
+
return `{% include "${template.alias}" only %}`;
|
53
|
+
}
|
54
|
+
switch (demo.type) {
|
55
|
+
case 'template': {
|
56
|
+
const { absolutePath: templateDemoPath, exists } = await (0, file_utils_1.resolvePath)({
|
57
|
+
path: demo.templateInfo.path,
|
58
|
+
resolveFromDir: this.dataDir,
|
59
|
+
});
|
60
|
+
if (!exists) {
|
61
|
+
throw new Error(`Could not find template demo file at ${templateDemoPath}`);
|
62
|
+
}
|
63
|
+
return (0, file_utils_1.readFile)(templateDemoPath);
|
64
|
+
}
|
65
|
+
case 'data': {
|
66
|
+
const { data: { props, slots, slotsOptionsComputed }, } = demo;
|
67
|
+
if (!slots) {
|
68
|
+
return (0, utils_1.getTwigUsage)({
|
69
|
+
templateName: template.alias,
|
70
|
+
props,
|
71
|
+
});
|
72
|
+
}
|
73
|
+
{
|
74
|
+
const slotProps = {};
|
75
|
+
await Promise.all(Object.keys(slots).map(async (slotName) => {
|
76
|
+
const slottedTemplates = slots[slotName];
|
77
|
+
slotProps[slotName] = await Promise.all(slottedTemplates.map(async (slottedTemplate) => {
|
78
|
+
if (slottedTemplate.type === 'text') {
|
79
|
+
return ` ${slottedTemplate.text}`;
|
80
|
+
}
|
81
|
+
if (slottedTemplate.type === 'template-reference') {
|
82
|
+
throw new Error(`Cannot handle slotted template references in ${JSON.stringify({
|
83
|
+
patternId: pattern.id,
|
84
|
+
templateId: template.id,
|
85
|
+
demoId: demo.id,
|
86
|
+
slottedTemplate,
|
87
|
+
})}`);
|
88
|
+
}
|
89
|
+
const thisPattern = patternManifest.getPattern(slottedTemplate.patternId);
|
90
|
+
const thisTemplate = thisPattern.templates.find((t) => t.id === slottedTemplate.templateId);
|
91
|
+
const usage = await this.getUsage({
|
92
|
+
pattern: thisPattern,
|
93
|
+
template: thisTemplate,
|
94
|
+
patternManifest,
|
95
|
+
demo: slottedTemplate.demo ||
|
96
|
+
this.patterns.demosById[slottedTemplate.demoId],
|
97
|
+
});
|
98
|
+
// indenting 2 spaces since it will be in a `{% set slotName %}` block
|
99
|
+
return usage
|
100
|
+
.split('\n')
|
101
|
+
.map((line) => ` ${line}`)
|
102
|
+
.join('\n');
|
103
|
+
}));
|
104
|
+
}));
|
105
|
+
const extraProps = [];
|
106
|
+
const slotIncludes = Object.keys(slotProps).map((slotName) => {
|
107
|
+
extraProps.push({
|
108
|
+
key: slotName,
|
109
|
+
value: slotName,
|
110
|
+
});
|
111
|
+
const slotCodes = slotProps[slotName];
|
112
|
+
const slotOptionsComputed = slotsOptionsComputed === null || slotsOptionsComputed === void 0 ? void 0 : slotsOptionsComputed[slotName];
|
113
|
+
const { openTag, closeTag } = (0, renderers_1.createSlotOptionsHtmlTags)({
|
114
|
+
slotOptionsComputed,
|
115
|
+
classAttributeName: 'class',
|
116
|
+
stylesValueType: 'string',
|
117
|
+
});
|
118
|
+
return `
|
119
|
+
{% set ${slotName} %}
|
120
|
+
${[openTag, ...slotCodes, closeTag].filter(Boolean).join('\n')}
|
121
|
+
{% endset %}
|
122
|
+
`.trim();
|
123
|
+
});
|
124
|
+
const usage = await (0, utils_1.getTwigUsage)({
|
125
|
+
templateName: template.alias,
|
126
|
+
props,
|
127
|
+
before: slotIncludes.join('\n\n'),
|
128
|
+
extraProps,
|
129
|
+
});
|
130
|
+
return usage;
|
131
|
+
}
|
132
|
+
}
|
133
|
+
default:
|
134
|
+
throw new Error(`Must pass in a demo.type`);
|
135
|
+
}
|
136
|
+
};
|
137
|
+
this.getTemplateSuggestions = async () => {
|
138
|
+
var _a, _b;
|
139
|
+
const { unusedPaths } = await this.getUnusedTemplatePaths({
|
140
|
+
globPaths: __classPrivateFieldGet(this, _KnapsackTwigRenderer_src, "f").roots.map((root) => (0, path_1.join)(root, '**/*.twig')),
|
141
|
+
cwd: this.userConfigDir,
|
142
|
+
});
|
143
|
+
const namespaces = (_b = (_a = __classPrivateFieldGet(this, _KnapsackTwigRenderer_src, "f").namespaces) === null || _a === void 0 ? void 0 : _a.map(({ id, paths }) => {
|
144
|
+
const absPaths = paths.map((path) => (0, path_1.isAbsolute)(path) ? path : (0, path_1.join)(this.userConfigDir, path));
|
145
|
+
return {
|
146
|
+
id,
|
147
|
+
paths: absPaths,
|
148
|
+
};
|
149
|
+
})) !== null && _b !== void 0 ? _b : [];
|
150
|
+
const suggestions = unusedPaths.map((twigPath) => {
|
151
|
+
const namespace = namespaces.find(({ paths }) => paths.some((path) => twigPath.startsWith(path)));
|
152
|
+
let alias;
|
153
|
+
if (namespace) {
|
154
|
+
namespace.paths.forEach((path) => {
|
155
|
+
if (twigPath.startsWith(path)) {
|
156
|
+
const subPath = (0, path_1.relative)(path, twigPath);
|
157
|
+
alias = `@${namespace.id}/${subPath}`;
|
158
|
+
}
|
159
|
+
});
|
160
|
+
}
|
161
|
+
return {
|
162
|
+
path: twigPath,
|
163
|
+
alias,
|
164
|
+
};
|
165
|
+
});
|
166
|
+
return { suggestions };
|
167
|
+
};
|
41
168
|
this.getMeta = () => ({
|
42
169
|
id: this.id,
|
43
170
|
title: 'Twig',
|
@@ -83,133 +210,6 @@ class KnapsackTwigRenderer extends app_1.KnapsackRendererBase {
|
|
83
210
|
},
|
84
211
|
});
|
85
212
|
}
|
86
|
-
async render(opt) {
|
87
|
-
const usage = await this.getUsage(opt);
|
88
|
-
const results = await this.twigRenderer.renderString(usage);
|
89
|
-
return { ...results, usage, templateLanguage: this.language };
|
90
|
-
// return this.twigRenderer.render(template.alias, data);
|
91
|
-
}
|
92
|
-
async getUsage(opt) {
|
93
|
-
const { pattern, template, demo,
|
94
|
-
/**
|
95
|
-
* The Patterns class
|
96
|
-
*/
|
97
|
-
patternManifest, } = opt;
|
98
|
-
if (!demo) {
|
99
|
-
return `{% include "${template.alias}" only %}`;
|
100
|
-
}
|
101
|
-
switch (demo.type) {
|
102
|
-
case 'template': {
|
103
|
-
const templateDemoPath = patternManifest.getTemplateDemoAbsolutePath({
|
104
|
-
patternId: pattern.id,
|
105
|
-
templateId: template.id,
|
106
|
-
demoId: demo.id,
|
107
|
-
});
|
108
|
-
return (0, fs_extra_1.readFile)(templateDemoPath, 'utf8');
|
109
|
-
}
|
110
|
-
case 'data': {
|
111
|
-
const { data: { props, slots, slotsOptionsComputed }, } = demo;
|
112
|
-
if (!slots) {
|
113
|
-
return (0, utils_1.getTwigUsage)({
|
114
|
-
templateName: template.alias,
|
115
|
-
props,
|
116
|
-
});
|
117
|
-
}
|
118
|
-
{
|
119
|
-
const slotProps = {};
|
120
|
-
await Promise.all(Object.keys(slots).map(async (slotName) => {
|
121
|
-
const slottedTemplates = slots[slotName];
|
122
|
-
slotProps[slotName] = await Promise.all(slottedTemplates.map(async (slottedTemplate) => {
|
123
|
-
if (app_1.KnapsackRendererBase.isSlottedText(slottedTemplate)) {
|
124
|
-
return ` ${slottedTemplate.text}`;
|
125
|
-
}
|
126
|
-
if (app_1.KnapsackRendererBase.isSlottedTemplateReference(slottedTemplate)) {
|
127
|
-
throw new Error(`Cannot handle slotted template references in ${JSON.stringify({
|
128
|
-
patternId: pattern.id,
|
129
|
-
templateId: template.id,
|
130
|
-
demoId: demo.id,
|
131
|
-
slottedTemplate,
|
132
|
-
})}`);
|
133
|
-
}
|
134
|
-
const thisPattern = patternManifest.getPattern(slottedTemplate.patternId);
|
135
|
-
const thisTemplate = thisPattern.templates.find((t) => t.id === slottedTemplate.templateId);
|
136
|
-
const usage = await this.getUsage({
|
137
|
-
pattern: thisPattern,
|
138
|
-
template: thisTemplate,
|
139
|
-
patternManifest,
|
140
|
-
demo: slottedTemplate.demo ||
|
141
|
-
this.patterns.demosById[slottedTemplate.demoId],
|
142
|
-
});
|
143
|
-
// indenting 2 spaces since it will be in a `{% set slotName %}` block
|
144
|
-
return usage
|
145
|
-
.split('\n')
|
146
|
-
.map((line) => ` ${line}`)
|
147
|
-
.join('\n');
|
148
|
-
}));
|
149
|
-
}));
|
150
|
-
const extraProps = [];
|
151
|
-
const slotIncludes = Object.keys(slotProps).map((slotName) => {
|
152
|
-
extraProps.push({
|
153
|
-
key: slotName,
|
154
|
-
value: slotName,
|
155
|
-
});
|
156
|
-
const slotCodes = slotProps[slotName];
|
157
|
-
const slotOptionsComputed = slotsOptionsComputed === null || slotsOptionsComputed === void 0 ? void 0 : slotsOptionsComputed[slotName];
|
158
|
-
const { openTag, closeTag } = createSlotOptionsHtmlTags({
|
159
|
-
slotOptionsComputed,
|
160
|
-
classAttributeName: 'class',
|
161
|
-
stylesValueType: 'string',
|
162
|
-
});
|
163
|
-
return `
|
164
|
-
{% set ${slotName} %}
|
165
|
-
${[openTag, ...slotCodes, closeTag].filter(Boolean).join('\n')}
|
166
|
-
{% endset %}
|
167
|
-
`.trim();
|
168
|
-
});
|
169
|
-
const usage = await (0, utils_1.getTwigUsage)({
|
170
|
-
templateName: template.alias,
|
171
|
-
props,
|
172
|
-
before: slotIncludes.join('\n\n'),
|
173
|
-
extraProps,
|
174
|
-
});
|
175
|
-
return usage;
|
176
|
-
}
|
177
|
-
}
|
178
|
-
default:
|
179
|
-
throw new Error(`Must pass in a demo.type`);
|
180
|
-
}
|
181
|
-
}
|
182
|
-
async getTemplateSuggestions() {
|
183
|
-
var _a, _b;
|
184
|
-
const { unusedPaths } = await this.getUnusedTemplatePaths({
|
185
|
-
globPaths: __classPrivateFieldGet(this, _KnapsackTwigRenderer_src, "f").roots.map((root) => (0, path_1.join)(root, '**/*.twig')),
|
186
|
-
cwd: this.userConfigDir,
|
187
|
-
});
|
188
|
-
const namespaces = (_b = (_a = __classPrivateFieldGet(this, _KnapsackTwigRenderer_src, "f").namespaces) === null || _a === void 0 ? void 0 : _a.map(({ id, paths }) => {
|
189
|
-
const absPaths = paths.map((path) => (0, path_1.isAbsolute)(path) ? path : (0, path_1.join)(this.userConfigDir, path));
|
190
|
-
return {
|
191
|
-
id,
|
192
|
-
paths: absPaths,
|
193
|
-
};
|
194
|
-
})) !== null && _b !== void 0 ? _b : [];
|
195
|
-
const suggestions = unusedPaths.map((twigPath) => {
|
196
|
-
const namespace = namespaces.find(({ paths }) => paths.some((path) => twigPath.startsWith(path)));
|
197
|
-
let alias;
|
198
|
-
if (namespace) {
|
199
|
-
namespace.paths.forEach((path) => {
|
200
|
-
if (twigPath.startsWith(path)) {
|
201
|
-
const subPath = (0, path_1.relative)(path, twigPath);
|
202
|
-
alias = `@${namespace.id}/${subPath}`;
|
203
|
-
}
|
204
|
-
});
|
205
|
-
}
|
206
|
-
return {
|
207
|
-
path: twigPath,
|
208
|
-
alias,
|
209
|
-
};
|
210
|
-
});
|
211
|
-
return { suggestions };
|
212
|
-
}
|
213
213
|
}
|
214
214
|
exports.KnapsackTwigRenderer = KnapsackTwigRenderer;
|
215
215
|
_KnapsackTwigRenderer_src = new WeakMap();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"renderer-twig.js","sourceRoot":"","sources":["../src/renderer-twig.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,
|
1
|
+
{"version":3,"file":"renderer-twig.js","sourceRoot":"","sources":["../src/renderer-twig.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,uCAAoC;AACpC,uDAKiC;AACjC,2CAAuE;AACvE,0EAA8E;AAC9E,+BAAqE;AACrE,qDAK8B;AAC9B,mCAAuC;AAEvC,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,IAAA,yBAAY,EAAC,IAAA,WAAI,EAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;AACzE,SAAG,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC;AAE7B,MAAM,iBAAiB,GAAG,IAAA,WAAI,EAC5B,SAAS,EACT,+CAA+C,CAChD,CAAC;AACF,IAAA,6BAAgB,EAAC,iBAAiB,CAAC,CAAC;AACpC,MAAM,kBAAkB,GAAG,2CAA2C,CAAC;AAEvE,MAAa,oBAAqB,SAAQ,wBAAY;IAIpD,YAAY,MAA0B;QACpC,KAAK,CAAC;YACJ,EAAE,EAAE,mBAAW,CAAC,IAAI;YACpB,QAAQ,EAAE,MAAM;YAChB,SAAS,EAAE,OAAO;SACnB,CAAC,CAAC;QAPL,4CAAgC;QA0BhC,WAAM,GAAuB,KAAK,EAAE,GAAG,EAAE,EAAE;YACzC,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;YACvC,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;YAC5D,OAAO,EAAE,GAAG,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC;YAC9D,yDAAyD;QAC3D,CAAC,CAAC;QAEF,aAAQ,GAAyB,KAAK,EAAE,G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BACE,EAAE,EAAE,kBAAkB;wBACtB,KAAK,EAAE,CAAC,IAAA,cAAO,EAAC,iBAAiB,CAAC,CAAC;qBACpC;iBACF;aACF;SACF,CAAC,CAAC;IACL,CAAC;CAuMF;AAjOD,oDAiOC"}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@knapsack/renderer-twig",
|
3
3
|
"description": "Render Twig",
|
4
|
-
"version": "4.69.8
|
4
|
+
"version": "4.69.8",
|
5
5
|
"main": "index.js",
|
6
6
|
"types": "index.d.ts",
|
7
7
|
"exports": {
|
@@ -25,17 +25,15 @@
|
|
25
25
|
"author": "Knapsack (https://www.knapsack.cloud)",
|
26
26
|
"dependencies": {
|
27
27
|
"@basalt/twig-renderer": "^3.2.2",
|
28
|
-
"@knapsack/app": "4.69.8
|
29
|
-
"@knapsack/file-utils": "4.69.8
|
30
|
-
"@knapsack/types": "4.69.8
|
31
|
-
"ejs": "^3.1.10"
|
32
|
-
"fs-extra": "^11.2.0"
|
28
|
+
"@knapsack/app": "4.69.8",
|
29
|
+
"@knapsack/file-utils": "4.69.8",
|
30
|
+
"@knapsack/types": "4.69.8",
|
31
|
+
"ejs": "^3.1.10"
|
33
32
|
},
|
34
33
|
"devDependencies": {
|
35
|
-
"@knapsack/eslint-config-starter": "4.69.8
|
36
|
-
"@knapsack/test-ava": "4.69.8
|
37
|
-
"@knapsack/typescript-config-starter": "4.69.8
|
38
|
-
"@types/fs-extra": "^11.0.4",
|
34
|
+
"@knapsack/eslint-config-starter": "4.69.8",
|
35
|
+
"@knapsack/test-ava": "4.69.8",
|
36
|
+
"@knapsack/typescript-config-starter": "4.69.8",
|
39
37
|
"ava": "^6.1.3",
|
40
38
|
"eslint": "^8.57.0",
|
41
39
|
"typescript": "^5.5.4"
|
@@ -48,5 +46,5 @@
|
|
48
46
|
"directory": "apps/client/renderers/renderer-twig",
|
49
47
|
"type": "git"
|
50
48
|
},
|
51
|
-
"gitHead": "
|
49
|
+
"gitHead": "67de9eb6016773e153a4f83c22bb1425fc8aa4ab"
|
52
50
|
}
|