helm-viewer 0.3.1 → 0.4.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/binary/index.js +1 -8304
- package/package.json +11 -8
- package/binary/index.html +0 -150
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "helm-viewer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Quick tool to easily view your helm charts.",
|
|
5
5
|
"author": "Tchoupinax <corentinfiloche@hotmail.fr> (https://corentinfiloche.xyz)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,26 +25,29 @@
|
|
|
25
25
|
"pack": "npm pack --dry-run",
|
|
26
26
|
"publish": "npm publish",
|
|
27
27
|
"=== RUN ==============================================": "",
|
|
28
|
-
"run": "NODE_ENV=development npx vite-node src/index.ts -- ~/
|
|
28
|
+
"run": "NODE_ENV=development npx vite-node src/index.ts -- ~/Documents/swan/deploy-tools/prometheus/master",
|
|
29
29
|
"=== BUILD ============================================": "",
|
|
30
|
+
"test": "vitest",
|
|
30
31
|
"build": "tsc",
|
|
31
32
|
"=== CLEAN ============================================": "",
|
|
32
33
|
"clear": "rm -rf dist binary tmp compiled src/assets",
|
|
33
34
|
"clean": "rm -rf dist binary tmp compiled src/assets"
|
|
34
35
|
},
|
|
35
36
|
"dependencies": {
|
|
36
|
-
"chalk": "5.
|
|
37
|
-
"execa": "
|
|
38
|
-
"open": "
|
|
37
|
+
"chalk": "5.3.0",
|
|
38
|
+
"execa": "8.0.1",
|
|
39
|
+
"open": "9.1.0"
|
|
39
40
|
},
|
|
40
41
|
"devDependencies": {
|
|
41
42
|
"@types/js-yaml": "4.0.5",
|
|
42
|
-
"@types/node": "20.
|
|
43
|
+
"@types/node": "20.5.2",
|
|
43
44
|
"@vercel/ncc": "0.36.1",
|
|
44
45
|
"js-yaml": "4.1.0",
|
|
46
|
+
"monaco-editor": "^0.41.0",
|
|
45
47
|
"npm-packlist": "7.0.4",
|
|
46
48
|
"postject": "1.0.0-alpha.6",
|
|
47
|
-
"typescript": "5.1.
|
|
48
|
-
"vite-node": "0.
|
|
49
|
+
"typescript": "5.1.6",
|
|
50
|
+
"vite-node": "0.34.2",
|
|
51
|
+
"vitest": "^0.34.2"
|
|
49
52
|
}
|
|
50
53
|
}
|
package/binary/index.html
DELETED
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
-
<title>Document</title>
|
|
8
|
-
|
|
9
|
-
<script src="https://cdn.tailwindcss.com"></script>
|
|
10
|
-
<script>
|
|
11
|
-
tailwind.config = {
|
|
12
|
-
theme: {
|
|
13
|
-
extend: {
|
|
14
|
-
colors: {
|
|
15
|
-
clifford: '#da373d',
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
</script>
|
|
21
|
-
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
|
|
22
|
-
</head>
|
|
23
|
-
<body>
|
|
24
|
-
<div id="app" class="flex h-screen">
|
|
25
|
-
<div
|
|
26
|
-
class="w-2/5 xl:w-1/5 bg-blue-50 h-screen overflow-scroll"
|
|
27
|
-
>
|
|
28
|
-
<div class="p-2">
|
|
29
|
-
<h1 class="italic text-2xl xl:text-4xl font-thin ml-4 mb-8">>> Computed files</h1>
|
|
30
|
-
|
|
31
|
-
<div
|
|
32
|
-
v-if="data.templated"
|
|
33
|
-
v-for="template of Object.keys(data.templated)"
|
|
34
|
-
class="mb-2"
|
|
35
|
-
>
|
|
36
|
-
<p class="text-xl xl:text-3xl font-thin">
|
|
37
|
-
{{ template }}
|
|
38
|
-
</p>
|
|
39
|
-
|
|
40
|
-
<div
|
|
41
|
-
class="ml-6 mt-2"
|
|
42
|
-
v-for="file of Object.keys(data.templated[template])"
|
|
43
|
-
@click="displayTemplatedFile(template, file)"
|
|
44
|
-
>
|
|
45
|
-
{{ file }}
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
|
|
50
|
-
<div
|
|
51
|
-
v-if="data.sources"
|
|
52
|
-
class="bg-green-100"
|
|
53
|
-
>
|
|
54
|
-
<h1 class="italic text-4xl font-thin ml-4 mb-8">>> Sources</h1>
|
|
55
|
-
<div class="mb-1" v-for="file of Object.keys(data.sources).filter(n => n !== 'templates')">
|
|
56
|
-
<p
|
|
57
|
-
class="text-xl ml-8 font-thin"
|
|
58
|
-
@click="displaySourceFile(file)"
|
|
59
|
-
>
|
|
60
|
-
{{ file }}
|
|
61
|
-
</p>
|
|
62
|
-
</div>
|
|
63
|
-
|
|
64
|
-
<p v-if="data.sources['templates']" class="text-xl ml-8 font-thin">templates</p>
|
|
65
|
-
|
|
66
|
-
<div
|
|
67
|
-
v-if="data.sources['templates']"
|
|
68
|
-
v-for="file of Object.keys(data.sources['templates'])"
|
|
69
|
-
class="mb-1 ml-6"
|
|
70
|
-
>
|
|
71
|
-
<p
|
|
72
|
-
class="text-xl ml-8 font-thin"
|
|
73
|
-
@click="displaySourceFile(file, true)"
|
|
74
|
-
>
|
|
75
|
-
{{ file }}
|
|
76
|
-
</p>
|
|
77
|
-
</div>
|
|
78
|
-
</div>
|
|
79
|
-
</div>
|
|
80
|
-
|
|
81
|
-
<div id="container" class="w-4/5">
|
|
82
|
-
</div>
|
|
83
|
-
</div>
|
|
84
|
-
|
|
85
|
-
<script src="assets/global-data.js"></script>
|
|
86
|
-
<script>
|
|
87
|
-
const { createApp, ref } = Vue
|
|
88
|
-
createApp({
|
|
89
|
-
data() {
|
|
90
|
-
return {
|
|
91
|
-
templateFile: undefined,
|
|
92
|
-
fileName: undefined,
|
|
93
|
-
source: undefined,
|
|
94
|
-
isSourceTemplate: false,
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
setup() {
|
|
98
|
-
const message = ref('Hello vue!')
|
|
99
|
-
return {
|
|
100
|
-
message,
|
|
101
|
-
data: DATA,
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
methods: {
|
|
105
|
-
displayTemplatedFile(templateFile, fileName) {
|
|
106
|
-
document.getElementById('container').innerHTML = ""
|
|
107
|
-
require(["vs/editor/editor.main"], () => {
|
|
108
|
-
monaco.editor.create(document.getElementById('container'), {
|
|
109
|
-
value: this.data["templated"][templateFile][fileName],
|
|
110
|
-
language: 'yaml',
|
|
111
|
-
theme: 'vs-dark',
|
|
112
|
-
});
|
|
113
|
-
});
|
|
114
|
-
},
|
|
115
|
-
displaySourceFile(fileName, isTemplate = false) {
|
|
116
|
-
this.source = "source"
|
|
117
|
-
this.fileName = fileName
|
|
118
|
-
this.isSourceTemplate = isTemplate
|
|
119
|
-
|
|
120
|
-
if (isTemplate) {
|
|
121
|
-
document.getElementById('container').innerHTML = ""
|
|
122
|
-
require(["vs/editor/editor.main"], () => {
|
|
123
|
-
monaco.editor.create(document.getElementById('container'), {
|
|
124
|
-
value: this.data["sources"]["templates"][fileName],
|
|
125
|
-
language: 'yaml',
|
|
126
|
-
theme: 'vs-dark',
|
|
127
|
-
});
|
|
128
|
-
});
|
|
129
|
-
} else {
|
|
130
|
-
document.getElementById('container').innerHTML = ""
|
|
131
|
-
require(["vs/editor/editor.main"], () => {
|
|
132
|
-
monaco.editor.create(document.getElementById('container'), {
|
|
133
|
-
value: this.data["sources"][fileName],
|
|
134
|
-
language: 'yaml',
|
|
135
|
-
theme: 'vs-dark',
|
|
136
|
-
});
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}).mount('#app')
|
|
142
|
-
</script>
|
|
143
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.26.1/min/vs/loader.min.js"></script>
|
|
144
|
-
<script>
|
|
145
|
-
// require is provided by loader.min.js.
|
|
146
|
-
require.config({ paths: { 'vs': 'https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.26.1/min/vs' }});
|
|
147
|
-
|
|
148
|
-
</script>
|
|
149
|
-
</body>
|
|
150
|
-
</html>
|