@knapsack/renderer-html 4.89.10--canary.7199.71f89fb.0 → 4.89.10--canary.7199.8e22f4d.0
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/CHANGELOG.md +32 -0
- package/dist/index.js +65 -66
- package/dist/index.js.map +1 -1
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,35 @@
|
|
|
1
|
+
# v4.89.8 (Fri Feb 20 2026)
|
|
2
|
+
|
|
3
|
+
### Release Notes
|
|
4
|
+
|
|
5
|
+
#### KSP-7685: Synthetic Data for Conflict Enrichment/Resolution testing ([#7154](https://github.com/knapsack-labs/app-monorepo/pull/7154))
|
|
6
|
+
|
|
7
|
+
* **Documentation**
|
|
8
|
+
* Added synthetic multi-source test fixtures including component documentation, design tokens, and brand guidelines for comprehensive testing coverage.
|
|
9
|
+
|
|
10
|
+
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
#### 🐛 Bug Fix
|
|
15
|
+
|
|
16
|
+
- merge latest in ([@EmmanuelVelez](https://github.com/EmmanuelVelez))
|
|
17
|
+
- Merge branch 'latest' into sxa/KSP-7037-tests-v2 ([@sxalexander](https://github.com/sxalexander))
|
|
18
|
+
- Use node: protocol prefix in all .lintstagedrc.mjs files ([@EmmanuelVelez](https://github.com/EmmanuelVelez))
|
|
19
|
+
- Migrated ESLint config to flat config format (ESLint 9) ([@EmmanuelVelez](https://github.com/EmmanuelVelez))
|
|
20
|
+
|
|
21
|
+
#### 🏠 Internal
|
|
22
|
+
|
|
23
|
+
- KSP-7685: Synthetic Data for Conflict Enrichment/Resolution testing [#7154](https://github.com/knapsack-labs/app-monorepo/pull/7154) ([@sxalexander](https://github.com/sxalexander))
|
|
24
|
+
- KSP-5524 Migrated ESLint config to flat config format (ESLint 9) [#7162](https://github.com/knapsack-labs/app-monorepo/pull/7162) ([@EmmanuelVelez](https://github.com/EmmanuelVelez))
|
|
25
|
+
|
|
26
|
+
#### Authors: 2
|
|
27
|
+
|
|
28
|
+
- [@EmmanuelVelez](https://github.com/EmmanuelVelez)
|
|
29
|
+
- Sam Alexander ([@sxalexander](https://github.com/sxalexander))
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
1
33
|
# v4.89.7 (Fri Feb 06 2026)
|
|
2
34
|
|
|
3
35
|
#### 🐛 Bug Fix
|
package/dist/index.js
CHANGED
|
@@ -19,78 +19,77 @@ class KnapsackHtmlRenderer extends renderers_1.RendererBase {
|
|
|
19
19
|
language: 'html',
|
|
20
20
|
codeSrcsUserConfig: options.codeSrcs,
|
|
21
21
|
});
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}),
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
catch (e) {
|
|
34
|
-
return {
|
|
35
|
-
ok: false,
|
|
36
|
-
html: `<p>${e.message}</p>`,
|
|
37
|
-
message: e.message,
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
this.getUsage = async ({ demo, state }) => {
|
|
42
|
-
var _a;
|
|
43
|
-
const path = demo.type === 'template'
|
|
44
|
-
? demo.templateInfo.path
|
|
45
|
-
: (_a = this.normalizeDemo({ demo, state })) === null || _a === void 0 ? void 0 : _a.codeSrcPath;
|
|
46
|
-
if (!path) {
|
|
47
|
-
throw new Error(`No path found for demo: ${JSON.stringify(demo)}`);
|
|
48
|
-
}
|
|
49
|
-
const { absolutePath, exists } = await this.resolvePath(path);
|
|
50
|
-
if (!exists) {
|
|
51
|
-
throw new Error(`File does not exist: ${absolutePath}`);
|
|
52
|
-
}
|
|
53
|
-
return (0, file_utils_1.readFile)(absolutePath);
|
|
54
|
-
};
|
|
55
|
-
this.getDiscovery = async () => {
|
|
22
|
+
if (error) {
|
|
23
|
+
this.log.error(`"KnapsackHtmlRenderer" constructor has invalid options, please fix in "knapsack.config.cjs":`, zod_1.z.prettifyError(error));
|
|
24
|
+
process.exit(1);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
render = async (opt) => {
|
|
28
|
+
try {
|
|
29
|
+
const usage = await this.getUsage(opt);
|
|
56
30
|
return {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
rendererId: this.id,
|
|
63
|
-
})),
|
|
31
|
+
ok: true,
|
|
32
|
+
html: await (0, file_utils_1.formatCode)({
|
|
33
|
+
contents: usage,
|
|
34
|
+
path: 'x.html',
|
|
35
|
+
}),
|
|
64
36
|
};
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
const { unusedPaths } = await this.getUnusedTemplatePaths({
|
|
68
|
-
globPaths: [(0, path_1.join)(gitRoot, '**/*.html')],
|
|
69
|
-
state,
|
|
70
|
-
});
|
|
37
|
+
}
|
|
38
|
+
catch (e) {
|
|
71
39
|
return {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
40
|
+
ok: false,
|
|
41
|
+
html: `<p>${e.message}</p>`,
|
|
42
|
+
message: e.message,
|
|
75
43
|
};
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
getUsage = async ({ demo, state }) => {
|
|
47
|
+
const path = demo.type === 'template'
|
|
48
|
+
? demo.templateInfo.path
|
|
49
|
+
: this.normalizeDemo({ demo, state })?.codeSrcPath;
|
|
50
|
+
if (!path) {
|
|
51
|
+
throw new Error(`No path found for demo: ${JSON.stringify(demo)}`);
|
|
52
|
+
}
|
|
53
|
+
const { absolutePath, exists } = await this.resolvePath(path);
|
|
54
|
+
if (!exists) {
|
|
55
|
+
throw new Error(`File does not exist: ${absolutePath}`);
|
|
56
|
+
}
|
|
57
|
+
return (0, file_utils_1.readFile)(absolutePath);
|
|
58
|
+
};
|
|
59
|
+
getDiscovery = async () => {
|
|
60
|
+
return {
|
|
61
|
+
rendererId: this.id,
|
|
62
|
+
meta: this.getMeta(),
|
|
63
|
+
codeSrcsByPath: Object.fromEntries(this.codeSrcs.entries()),
|
|
64
|
+
templates: this.getCodeSrcs().map(({ path }) => (0, types_1.addIdToTemplateInfo)({
|
|
65
|
+
codeSrcPath: path,
|
|
66
|
+
rendererId: this.id,
|
|
67
|
+
})),
|
|
76
68
|
};
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
enableDataDemos: false,
|
|
83
|
-
enableTemplateDemos: true,
|
|
84
|
-
hasSlotsSupport: false,
|
|
85
|
-
version: pkg.version,
|
|
86
|
-
hasInferSpecSupport: false,
|
|
87
|
-
hasTemplateSuggestionsSupport: true,
|
|
69
|
+
};
|
|
70
|
+
getTemplateSuggestions = async ({ state, }) => {
|
|
71
|
+
const { unusedPaths } = await this.getUnusedTemplatePaths({
|
|
72
|
+
globPaths: [(0, path_1.join)(gitRoot, '**/*.html')],
|
|
73
|
+
state,
|
|
88
74
|
});
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
75
|
+
return {
|
|
76
|
+
suggestions: unusedPaths.map((path) => ({
|
|
77
|
+
path,
|
|
78
|
+
})),
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
getMeta = () => ({
|
|
82
|
+
id: this.id,
|
|
83
|
+
title: 'HTML',
|
|
84
|
+
syntaxHighlightingLanguage: 'html',
|
|
85
|
+
aliasUse: 'off',
|
|
86
|
+
enableDataDemos: false,
|
|
87
|
+
enableTemplateDemos: true,
|
|
88
|
+
hasSlotsSupport: false,
|
|
89
|
+
version: pkg.version,
|
|
90
|
+
hasInferSpecSupport: false,
|
|
91
|
+
hasTemplateSuggestionsSupport: true,
|
|
92
|
+
});
|
|
94
93
|
}
|
|
95
94
|
exports.KnapsackHtmlRenderer = KnapsackHtmlRenderer;
|
|
96
95
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,uDAIiC;AACjC,2CAIyB;AACzB,qDAK8B;AAC9B,+BAA4B;AAC5B,6BAAwB;AAIxB,MAAM,EAAE,GAAG,EAAE,GAAG,IAAA,0BAAa,EAAC,SAAS,CAAC,CAAC;AAEzC,MAAM,OAAO,GAAG,IAAA,wBAAW,GAAE,CAAC;AAE9B,MAAM,YAAY,GAAG,OAAC,CAAC,YAAY,CAAC;IAClC,QAAQ,EAAE,OAAC,CAAC,KAAK,CAAC,+BAAuB,CAAC,CAAC,QAAQ,EAAE;CACtD,CAAC,CAAC;AAEH,MAAa,oBACX,SAAQ,wBAAoB;IAG5B,YAAY,UAAwC,EAAE;QACpD,MAAM,EAAE,KAAK,EAAE,GAAG,YAAY,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QAClD,KAAK,CAAC;YACJ,EAAE,EAAE,mBAAW,CAAC,IAAI;YACpB,QAAQ,EAAE,MAAM;YAChB,kBAAkB,EAAE,OAAO,CAAC,QAAQ;SACrC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,uDAIiC;AACjC,2CAIyB;AACzB,qDAK8B;AAC9B,+BAA4B;AAC5B,6BAAwB;AAIxB,MAAM,EAAE,GAAG,EAAE,GAAG,IAAA,0BAAa,EAAC,SAAS,CAAC,CAAC;AAEzC,MAAM,OAAO,GAAG,IAAA,wBAAW,GAAE,CAAC;AAE9B,MAAM,YAAY,GAAG,OAAC,CAAC,YAAY,CAAC;IAClC,QAAQ,EAAE,OAAC,CAAC,KAAK,CAAC,+BAAuB,CAAC,CAAC,QAAQ,EAAE;CACtD,CAAC,CAAC;AAEH,MAAa,oBACX,SAAQ,wBAAoB;IAG5B,YAAY,UAAwC,EAAE;QACpD,MAAM,EAAE,KAAK,EAAE,G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,CAAC,EAAE;QACX,KAAK,EAAE,MAAM;QACb,0BAA0B,EAAE,MAAM;QAClC,QAAQ,EAAE,KAAK;QACf,eAAe,EAAE,KAAK;QACtB,mBAAmB,EAAE,IAAI;QACzB,eAAe,EAAE,KAAK;QACtB,OAAO,EAAE,GAAG,CAAC,OAAO;QACpB,mBAAmB,EAAE,KAAK;QAC1B,6BAA6B,EAAE,IAAI;KACpC,CAAC,CAAC;CACJ;AA/FD,oDA+FC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knapsack/renderer-html",
|
|
3
3
|
"description": "Render HTML",
|
|
4
|
-
"version": "4.89.10--canary.7199.
|
|
4
|
+
"version": "4.89.10--canary.7199.8e22f4d.0",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
7
7
|
"exports": {
|
|
@@ -23,18 +23,18 @@
|
|
|
23
23
|
},
|
|
24
24
|
"author": "Knapsack (https://www.knapsack.cloud)",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@knapsack/app": "4.89.10--canary.7199.
|
|
27
|
-
"@knapsack/file-utils": "4.89.10--canary.7199.
|
|
28
|
-
"@knapsack/types": "4.89.10--canary.7199.
|
|
29
|
-
"zod": "^4.
|
|
26
|
+
"@knapsack/app": "4.89.10--canary.7199.8e22f4d.0",
|
|
27
|
+
"@knapsack/file-utils": "4.89.10--canary.7199.8e22f4d.0",
|
|
28
|
+
"@knapsack/types": "4.89.10--canary.7199.8e22f4d.0",
|
|
29
|
+
"zod": "^4.3.6"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@knapsack/eslint-config-starter": "4.89.10--canary.7199.
|
|
33
|
-
"@knapsack/typescript-config-starter": "4.89.10--canary.7199.
|
|
34
|
-
"@types/node": "^
|
|
32
|
+
"@knapsack/eslint-config-starter": "4.89.10--canary.7199.8e22f4d.0",
|
|
33
|
+
"@knapsack/typescript-config-starter": "4.89.10--canary.7199.8e22f4d.0",
|
|
34
|
+
"@types/node": "^22.19.11",
|
|
35
35
|
"eslint": "^9.20.0",
|
|
36
36
|
"typescript": "^5.9.3",
|
|
37
|
-
"vitest": "^
|
|
37
|
+
"vitest": "^4.0.18"
|
|
38
38
|
},
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public"
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"directory": "apps/client/renderers/renderer-html",
|
|
45
45
|
"type": "git"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "8e22f4d38d9fdc7e7b860da9f9ef85fd481ebf11"
|
|
48
48
|
}
|