@knapsack/renderer-html 4.70.0--canary.4561.78aed7a.0 → 4.70.0--canary.4821.56b0218.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
package/dist/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAiB7E,qBAAa,oBAAqB,SAAQ,YAAa,YAAW,UAAU;;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAiB7E,qBAAa,oBAAqB,SAAQ,YAAa,YAAW,UAAU;;IAQ1E,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAkBxB;IAEF,QAAQ,EAAE,QAAQ,CAAC,UAAU,CAAC,CAY5B;IAEF,sBAAsB,EAAE,QAAQ,CAAC,wBAAwB,CAAC,CAYxD;IAEF,OAAO,EAAE,QAAQ,CAAC,SAAS,CAAC,CAWzB;CACJ"}
|
package/dist/index.js
CHANGED
@@ -16,7 +16,6 @@ class KnapsackHtmlRenderer extends renderers_1.RendererBase {
|
|
16
16
|
constructor() {
|
17
17
|
super({
|
18
18
|
id: types_1.rendererIds.html,
|
19
|
-
extension: '.html',
|
20
19
|
language: 'html',
|
21
20
|
});
|
22
21
|
this.render = async (opt) => {
|
@@ -38,16 +37,20 @@ class KnapsackHtmlRenderer extends renderers_1.RendererBase {
|
|
38
37
|
};
|
39
38
|
}
|
40
39
|
};
|
41
|
-
this.getUsage = async ({
|
42
|
-
|
40
|
+
this.getUsage = async ({ demo, state }) => {
|
41
|
+
var _a, _b;
|
42
|
+
const { absolutePath, exists } = await this.resolvePath(demo.type === 'template'
|
43
|
+
? demo.templateInfo.path
|
44
|
+
: (_b = (_a = state.patterns[demo.patternId]) === null || _a === void 0 ? void 0 : _a.templates.find((t) => t.id === demo.templateId)) === null || _b === void 0 ? void 0 : _b.path);
|
43
45
|
if (!exists) {
|
44
46
|
throw new Error(`File does not exist: ${absolutePath}`);
|
45
47
|
}
|
46
48
|
return (0, file_utils_1.readFile)(absolutePath);
|
47
49
|
};
|
48
|
-
this.getTemplateSuggestions = async () => {
|
50
|
+
this.getTemplateSuggestions = async ({ state, }) => {
|
49
51
|
const { unusedPaths } = await this.getUnusedTemplatePaths({
|
50
52
|
globPaths: [(0, path_1.join)(gitRoot, '**/*.html')],
|
53
|
+
state,
|
51
54
|
});
|
52
55
|
return {
|
53
56
|
suggestions: unusedPaths.map((path) => ({
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,uCAAoC;AACpC,uDAA6E;AAC7E,2CAA8C;AAC9C,qDAK8B;AAC9B,+BAA4B;AAE5B,MAAM,EAAE,GAAG,EAAE,GAAG,IAAA,0BAAa,EAAC,SAAS,CAAC,CAAC;AACzC,SAAG,CAAC,mBAAmB,CAAC;IACtB,IAAI,EAAE,GAAG,CAAC,IAAI;IACd,OAAO,EAAE,GAAG,CAAC,OAAO;CACrB,CAAC,CAAC;AACH,MAAM,OAAO,GAAG,IAAA,wBAAW,GAAE,CAAC;AAE9B,MAAa,oBAAqB,SAAQ,wBAAY;IACpD;QACE,KAAK,CAAC;YACJ,EAAE,EAAE,mBAAW,CAAC,IAAI;YACpB,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,uCAAoC;AACpC,uDAA6E;AAC7E,2CAA8C;AAC9C,qDAK8B;AAC9B,+BAA4B;AAE5B,MAAM,EAAE,GAAG,EAAE,GAAG,IAAA,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C,EAAE,KAAK,IAAI,CAAC,UAAU,CAChC,0CAAE,IAAI,CACZ,CAAC;YACF,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,MAAM,IAAI,KAAK,CAAC,wBAAwB,YAAY,EAAE,CAAC,CAAC;YAC1D,CAAC;YACD,OAAO,IAAA,qBAAQ,EAAC,YAAY,CAAC,CAAC;QAChC,CAAC,CAAC;QAEF,2BAAsB,GAAuC,KAAK,EAAE,EAClE,KAAK,GACN,EAAE,EAAE;YACH,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,IAAI,CAAC,sBAAsB,CAAC;gBACxD,SAAS,EAAE,CAAC,IAAA,WAAI,EAAC,OAAO,EAAE,WAAW,CAAC,CAAC;gBACvC,KAAK;aACN,CAAC,CAAC;YACH,OAAO;gBACL,WAAW,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;oBACtC,IAAI;iBACL,CAAC,CAAC;aACJ,CAAC;QACJ,CAAC,CAAC;QAEF,YAAO,GAAwB,GAAG,EAAE,CAAC,CAAC;YACpC,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,KAAK,EAAE,MAAM;YACb,0BAA0B,EAAE,MAAM;YAClC,QAAQ,EAAE,KAAK;YACf,eAAe,EAAE,KAAK;YACtB,mBAAmB,EAAE,IAAI;YACzB,eAAe,EAAE,KAAK;YACtB,OAAO,EAAE,GAAG,CAAC,OAAO;YACpB,mBAAmB,EAAE,KAAK;YAC1B,6BAA6B,EAAE,IAAI;SACpC,CAAC,CAAC;IA7DH,CAAC;CA8DF;AApED,oDAoEC"}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@knapsack/renderer-html",
|
3
3
|
"description": "Render HTML",
|
4
|
-
"version": "4.70.0--canary.
|
4
|
+
"version": "4.70.0--canary.4821.56b0218.0",
|
5
5
|
"main": "index.js",
|
6
6
|
"types": "index.d.ts",
|
7
7
|
"exports": {
|
@@ -22,13 +22,13 @@
|
|
22
22
|
},
|
23
23
|
"author": "Knapsack (https://www.knapsack.cloud)",
|
24
24
|
"dependencies": {
|
25
|
-
"@knapsack/app": "4.70.0--canary.
|
26
|
-
"@knapsack/file-utils": "4.70.0--canary.
|
27
|
-
"@knapsack/types": "4.70.0--canary.
|
25
|
+
"@knapsack/app": "4.70.0--canary.4821.56b0218.0",
|
26
|
+
"@knapsack/file-utils": "4.70.0--canary.4821.56b0218.0",
|
27
|
+
"@knapsack/types": "4.70.0--canary.4821.56b0218.0"
|
28
28
|
},
|
29
29
|
"devDependencies": {
|
30
|
-
"@knapsack/eslint-config-starter": "4.70.0--canary.
|
31
|
-
"@knapsack/typescript-config-starter": "4.70.0--canary.
|
30
|
+
"@knapsack/eslint-config-starter": "4.70.0--canary.4821.56b0218.0",
|
31
|
+
"@knapsack/typescript-config-starter": "4.70.0--canary.4821.56b0218.0",
|
32
32
|
"eslint": "^8.57.0",
|
33
33
|
"typescript": "^5.5.4"
|
34
34
|
},
|
@@ -40,5 +40,5 @@
|
|
40
40
|
"directory": "apps/client/renderers/renderer-html",
|
41
41
|
"type": "git"
|
42
42
|
},
|
43
|
-
"gitHead": "
|
43
|
+
"gitHead": "56b02187ee87f98fefa3254d2a725a06fc1f13f8"
|
44
44
|
}
|