comarkserv 0.1.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/LICENSE +21 -0
- package/README.md +389 -0
- package/dist/THIRD_PARTY_LICENSES.md +932 -0
- package/dist/build-CsToYJrU.mjs +2 -0
- package/dist/build-Cv5aO0CB.mjs +205 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +894 -0
- package/dist/cloudflared-6f_lzz4F.mjs +181 -0
- package/dist/dist-B-IALNns.mjs +2 -0
- package/dist/dist-BK-bpLWg.mjs +2 -0
- package/dist/dist-BQzCbTko.mjs +1693 -0
- package/dist/dist-BWcWG5YB.mjs +671 -0
- package/dist/dist-BiVw4ojz.mjs +592 -0
- package/dist/dist-BnmL9jeq.mjs +538 -0
- package/dist/dist-BtedNLrc.mjs +276 -0
- package/dist/dist-BvdNTrap.mjs +2710 -0
- package/dist/dist-ByijHttv.mjs +69 -0
- package/dist/dist-C2E4zSX1.mjs +347 -0
- package/dist/dist-CWYRQLUT.mjs +2 -0
- package/dist/dist-CXQ7eTfT.mjs +417 -0
- package/dist/dist-CfsjQ0o8.mjs +905 -0
- package/dist/dist-CsTXDvwi.mjs +300 -0
- package/dist/dist-CtONMLh4.mjs +283 -0
- package/dist/dist-DMftjyxU.mjs +370 -0
- package/dist/dist-Dr9uTCX7.mjs +2 -0
- package/dist/dist-Dxvc11TH.mjs +339 -0
- package/dist/dist-GmbcGEAc.mjs +3 -0
- package/dist/dist-V1rkISnf.mjs +220 -0
- package/dist/dist-ZoN94PJ0.mjs +76 -0
- package/dist/dist-fh99cWMN.mjs +524 -0
- package/dist/editor-CHDyOp-8.mjs +721 -0
- package/dist/index.d.mts +301 -0
- package/dist/index.mjs +6 -0
- package/dist/languages-C0kEygG_.mjs +119 -0
- package/dist/markdown-BqKed1Vq.mjs +710 -0
- package/dist/markdown-DWuqfzps.mjs +2 -0
- package/dist/rolldown-runtime-CMFfr-1z.mjs +26 -0
- package/dist/server-Dkjk_D1Y.mjs +2628 -0
- package/dist/terminal-aKr5Xlp3.mjs +169 -0
- package/dist/themes-mEufQ_3e.mjs +2194 -0
- package/dist/twinkleplop.production-Coccf2Q9.mjs +2 -0
- package/dist/twinkleplop.production-DekYmX6O.mjs +4697 -0
- package/dist/twinkleplop.tokens-CgBUTCSg.mjs +76 -0
- package/package.json +133 -0
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { F as Zr, G as ge, M as Xr, R as br, S as Qr, V as ei, _ as Nn, et as qn, h as Lr, l as Hn, m as Kr, mt as g, pt as _, r as $r, s as Gr, tt as qr } from "./twinkleplop.production-DekYmX6O.mjs";
|
|
2
|
+
import { C as Se, F as c, J as je, P as be, _t as xe, g as Ne, gt as w$1, j as a, nt as o, o as E$1, r as C$1, ut as t, y as Pe } from "./twinkleplop.tokens-CgBUTCSg.mjs";
|
|
3
|
+
import { n as I } from "./dist-DMftjyxU.mjs";
|
|
4
|
+
import { o as $ } from "./dist-BQzCbTko.mjs";
|
|
5
|
+
//#region node_modules/.pnpm/@twinkleplop+svelte@0.1.4/node_modules/@twinkleplop/svelte/dist/index.js
|
|
6
|
+
var y = Lr([
|
|
7
|
+
["a", "z"],
|
|
8
|
+
["A", "Z"],
|
|
9
|
+
["0", "9"],
|
|
10
|
+
["-", "-"],
|
|
11
|
+
["_", "_"],
|
|
12
|
+
[":", ":"]
|
|
13
|
+
]);
|
|
14
|
+
var b = Lr([
|
|
15
|
+
["a", "z"],
|
|
16
|
+
["A", "Z"],
|
|
17
|
+
["0", "9"],
|
|
18
|
+
["-", "-"],
|
|
19
|
+
["_", "_"]
|
|
20
|
+
]);
|
|
21
|
+
var x = [
|
|
22
|
+
"if",
|
|
23
|
+
"each",
|
|
24
|
+
"await",
|
|
25
|
+
"key",
|
|
26
|
+
"snippet",
|
|
27
|
+
"else if",
|
|
28
|
+
"else",
|
|
29
|
+
"then",
|
|
30
|
+
"catch"
|
|
31
|
+
];
|
|
32
|
+
var S = [
|
|
33
|
+
"html",
|
|
34
|
+
"const",
|
|
35
|
+
"debug",
|
|
36
|
+
"render"
|
|
37
|
+
];
|
|
38
|
+
var C = [
|
|
39
|
+
Zr([
|
|
40
|
+
" ",
|
|
41
|
+
" ",
|
|
42
|
+
"\n",
|
|
43
|
+
"\r"
|
|
44
|
+
]),
|
|
45
|
+
Xr("=", a),
|
|
46
|
+
Xr("{", be, Gr("expression_body")),
|
|
47
|
+
Xr("\"", c, Gr("attr_string_double")),
|
|
48
|
+
Xr("'", c, Gr("attr_string_single")),
|
|
49
|
+
Xr([
|
|
50
|
+
"bind:",
|
|
51
|
+
"on:",
|
|
52
|
+
"use:",
|
|
53
|
+
"transition:",
|
|
54
|
+
"in:",
|
|
55
|
+
"out:",
|
|
56
|
+
"animate:",
|
|
57
|
+
"class:",
|
|
58
|
+
"style:",
|
|
59
|
+
"let:"
|
|
60
|
+
], Se),
|
|
61
|
+
Xr("|", o),
|
|
62
|
+
Xr(b, C$1)
|
|
63
|
+
];
|
|
64
|
+
var w = [
|
|
65
|
+
$r("\"", "\"", Pe, {
|
|
66
|
+
escape: "\\",
|
|
67
|
+
multiline: !0
|
|
68
|
+
}),
|
|
69
|
+
$r("'", "'", Pe, {
|
|
70
|
+
escape: "\\",
|
|
71
|
+
multiline: !0
|
|
72
|
+
}),
|
|
73
|
+
$r("/*", "*/", Pe, { multiline: !0 }),
|
|
74
|
+
$r("//", "\n", Pe),
|
|
75
|
+
Xr("{", Pe, Gr("expression_brace")),
|
|
76
|
+
ei({ token: Pe })
|
|
77
|
+
];
|
|
78
|
+
var T = g({
|
|
79
|
+
name: "svelte",
|
|
80
|
+
states: {
|
|
81
|
+
content: { rules: [
|
|
82
|
+
$r("<!--", "-->", t),
|
|
83
|
+
Xr(["<!DOCTYPE", "<!doctype"], w$1, Gr("doctype")),
|
|
84
|
+
Xr("</", o, Gr("close_tag")),
|
|
85
|
+
Xr("<", o, Gr("tag_start")),
|
|
86
|
+
Xr("{", be, Gr("brace_start")),
|
|
87
|
+
ei({})
|
|
88
|
+
] },
|
|
89
|
+
brace_start: { rules: [
|
|
90
|
+
Xr([
|
|
91
|
+
"#",
|
|
92
|
+
"/",
|
|
93
|
+
":"
|
|
94
|
+
], o, Kr("block_keyword")),
|
|
95
|
+
Xr("@", o, Kr("at_directive_keyword")),
|
|
96
|
+
ei(Kr("expression_body"))
|
|
97
|
+
] },
|
|
98
|
+
block_keyword: { rules: [Xr(x, xe, Kr("expression_body")), ei(Kr("expression_body"))] },
|
|
99
|
+
at_directive_keyword: { rules: [Xr(S, xe, Kr("expression_body")), ei(Kr("expression_body"))] },
|
|
100
|
+
tag_start: { rules: [
|
|
101
|
+
Qr(["script"], Kr("script_attrs"), E$1),
|
|
102
|
+
Qr(["style"], Kr("style_attrs"), E$1),
|
|
103
|
+
Xr("svelte", "keyword", {
|
|
104
|
+
boundary: !0,
|
|
105
|
+
...Kr("tag_svelte_ns")
|
|
106
|
+
}),
|
|
107
|
+
Xr("/>", o, qr()),
|
|
108
|
+
Xr(">", o, qr()),
|
|
109
|
+
Zr([
|
|
110
|
+
" ",
|
|
111
|
+
" ",
|
|
112
|
+
"\n",
|
|
113
|
+
"\r"
|
|
114
|
+
], Kr("tag_attrs")),
|
|
115
|
+
Xr(y, E$1, Kr("tag_open"))
|
|
116
|
+
] },
|
|
117
|
+
tag_svelte_ns: { rules: [Xr(":", o, Kr("tag_open")), ei(Kr("tag_open"))] },
|
|
118
|
+
tag_open: { rules: [
|
|
119
|
+
Xr("/>", o, qr()),
|
|
120
|
+
Xr(">", o, qr()),
|
|
121
|
+
Zr([
|
|
122
|
+
" ",
|
|
123
|
+
" ",
|
|
124
|
+
"\n",
|
|
125
|
+
"\r"
|
|
126
|
+
], Kr("tag_attrs")),
|
|
127
|
+
Xr(y, E$1)
|
|
128
|
+
] },
|
|
129
|
+
tag_attrs: { rules: [
|
|
130
|
+
Xr("/>", o, qr()),
|
|
131
|
+
Xr(">", o, qr()),
|
|
132
|
+
...C
|
|
133
|
+
] },
|
|
134
|
+
close_tag: { rules: [
|
|
135
|
+
Xr(">", o, qr()),
|
|
136
|
+
Zr([
|
|
137
|
+
" ",
|
|
138
|
+
" ",
|
|
139
|
+
"\n",
|
|
140
|
+
"\r"
|
|
141
|
+
]),
|
|
142
|
+
Xr(y, E$1)
|
|
143
|
+
] },
|
|
144
|
+
doctype: { rules: [Xr(">", o, qr()), ei({ token: w$1 })] },
|
|
145
|
+
script_attrs: { rules: [
|
|
146
|
+
Xr("/>", o, qr()),
|
|
147
|
+
Xr(">", o, Kr("script_content")),
|
|
148
|
+
...C
|
|
149
|
+
] },
|
|
150
|
+
script_content: { rules: [Zr("</", Gr("script_close_probe")), ei({ token: je })] },
|
|
151
|
+
script_close_probe: {
|
|
152
|
+
mode: "probe",
|
|
153
|
+
fallback: "script_close_fail",
|
|
154
|
+
rules: [Zr("script>", Kr("script_close_emit"))]
|
|
155
|
+
},
|
|
156
|
+
script_close_fail: { rules: [Xr("<", je, qr())] },
|
|
157
|
+
script_close_emit: { rules: [Xr("</", o, Kr("script_close_name"))] },
|
|
158
|
+
script_close_name: { rules: [Xr("script", E$1, Kr("script_close_gt"))] },
|
|
159
|
+
script_close_gt: { rules: [Xr(">", o, qr())] },
|
|
160
|
+
style_attrs: { rules: [
|
|
161
|
+
Xr("/>", o, qr()),
|
|
162
|
+
Xr(">", o, Kr("style_content")),
|
|
163
|
+
...C
|
|
164
|
+
] },
|
|
165
|
+
style_content: { rules: [Zr("</", Gr("style_close_probe")), ei({ token: Ne })] },
|
|
166
|
+
style_close_probe: {
|
|
167
|
+
mode: "probe",
|
|
168
|
+
fallback: "style_close_fail",
|
|
169
|
+
rules: [Zr("style>", Kr("style_close_emit"))]
|
|
170
|
+
},
|
|
171
|
+
style_close_fail: { rules: [Xr("<", Ne, qr())] },
|
|
172
|
+
style_close_emit: { rules: [Xr("</", o, Kr("style_close_name"))] },
|
|
173
|
+
style_close_name: { rules: [Xr("style", E$1, Kr("style_close_gt"))] },
|
|
174
|
+
style_close_gt: { rules: [Xr(">", o, qr())] },
|
|
175
|
+
attr_string_double: { rules: [
|
|
176
|
+
Xr("\"", c, qr()),
|
|
177
|
+
Xr("{", be, Gr("expression_body")),
|
|
178
|
+
ei({ token: c })
|
|
179
|
+
] },
|
|
180
|
+
attr_string_single: { rules: [
|
|
181
|
+
Xr("'", c, qr()),
|
|
182
|
+
Xr("{", be, Gr("expression_body")),
|
|
183
|
+
ei({ token: c })
|
|
184
|
+
] },
|
|
185
|
+
expression_body: { rules: [Xr("}", be, qr()), ...w] },
|
|
186
|
+
expression_brace: { rules: [Xr("}", Pe, qr()), ...w] }
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
var E;
|
|
190
|
+
var D;
|
|
191
|
+
var O = (e) => (E ??= $())(e);
|
|
192
|
+
var k = [Hn(br({
|
|
193
|
+
open_type: "expression",
|
|
194
|
+
open_text: "{",
|
|
195
|
+
close_type: "expression",
|
|
196
|
+
close_text: "}",
|
|
197
|
+
post_open_required: {
|
|
198
|
+
type: "punctuation",
|
|
199
|
+
text_in: [
|
|
200
|
+
"#",
|
|
201
|
+
":",
|
|
202
|
+
"/",
|
|
203
|
+
"@"
|
|
204
|
+
]
|
|
205
|
+
},
|
|
206
|
+
retag_open_to: "punctuation",
|
|
207
|
+
retag_close_to: "punctuation"
|
|
208
|
+
}), "type_claim"), Hn(Nn({
|
|
209
|
+
raw_script: O,
|
|
210
|
+
raw_style: (e) => (D ??= I())(e),
|
|
211
|
+
raw_svelte_expression: O
|
|
212
|
+
}), "embed")];
|
|
213
|
+
var A = _(T);
|
|
214
|
+
var j = qn(A, k);
|
|
215
|
+
function M(e) {
|
|
216
|
+
let t = j(e);
|
|
217
|
+
return (e, n) => ge(e, t(e), n);
|
|
218
|
+
}
|
|
219
|
+
//#endregion
|
|
220
|
+
export { A as grammar, M as language, T as raw_grammar, k as reclassifiers, j as tokenize };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
2
|
+
import { constants } from "node:os";
|
|
3
|
+
import { createInterface } from "node:readline/promises";
|
|
4
|
+
//#region node_modules/.pnpm/untun@0.2.2/node_modules/untun/dist/_chunks/log.mjs
|
|
5
|
+
function log(message, type) {
|
|
6
|
+
const color = type && colors[type];
|
|
7
|
+
console.log(color ? `${color}${message}${colors.reset}` : message);
|
|
8
|
+
}
|
|
9
|
+
async function prompt(message) {
|
|
10
|
+
if (!process.stdin.isTTY) return true;
|
|
11
|
+
const rl = createInterface({
|
|
12
|
+
input: process.stdin,
|
|
13
|
+
output: process.stdout
|
|
14
|
+
});
|
|
15
|
+
try {
|
|
16
|
+
const answer = await rl.question(`${colors.info}?${colors.reset} ${message} ${colors.dim}(Y/n)${colors.reset} `);
|
|
17
|
+
return !/^n(o)?$/i.test(answer.trim());
|
|
18
|
+
} finally {
|
|
19
|
+
rl.close();
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
const colors = {
|
|
23
|
+
reset: "\x1B[0m",
|
|
24
|
+
dim: "\x1B[2m",
|
|
25
|
+
info: "\x1B[36m",
|
|
26
|
+
success: "\x1B[32m",
|
|
27
|
+
error: "\x1B[31m",
|
|
28
|
+
warn: "\x1B[33m"
|
|
29
|
+
};
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region node_modules/.pnpm/untun@0.2.2/node_modules/untun/dist/index.mjs
|
|
32
|
+
async function startTunnel(opts) {
|
|
33
|
+
const { installCloudflared, startCloudflaredTunnel, cloudflaredBinPath, cloudflaredNotice } = await import("./cloudflared-6f_lzz4F.mjs");
|
|
34
|
+
const url = opts.url || `${opts.protocol || "http"}://${opts.hostname ?? "localhost"}:${opts.port ?? 3e3}`;
|
|
35
|
+
log(`Starting cloudflared tunnel to ${url}`, "info");
|
|
36
|
+
if (!existsSync(cloudflaredBinPath)) {
|
|
37
|
+
log(cloudflaredNotice);
|
|
38
|
+
if (!(opts.acceptCloudflareNotice || process.env.UNTUN_ACCEPT_CLOUDFLARE_NOTICE || await prompt(`Do you agree with the above terms and wish to install the binary from GitHub?`))) {
|
|
39
|
+
log("Skipping tunnel setup.", "error");
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
await installCloudflared();
|
|
43
|
+
}
|
|
44
|
+
const args = [["--url", url], opts.verifyTLS ? void 0 : ["--no-tls-verify", null]].filter(Boolean);
|
|
45
|
+
const tunnel = startCloudflaredTunnel(Object.fromEntries(args), opts.extraArgs);
|
|
46
|
+
let closed = false;
|
|
47
|
+
const signals = [
|
|
48
|
+
"SIGINT",
|
|
49
|
+
"SIGTERM",
|
|
50
|
+
"SIGHUP"
|
|
51
|
+
];
|
|
52
|
+
const handlers = /* @__PURE__ */ new Map();
|
|
53
|
+
const cleanup = async () => {
|
|
54
|
+
if (closed) return;
|
|
55
|
+
closed = true;
|
|
56
|
+
for (const [sig, handler] of handlers) process.off(sig, handler);
|
|
57
|
+
handlers.clear();
|
|
58
|
+
await tunnel.stop();
|
|
59
|
+
};
|
|
60
|
+
for (const signal of signals) {
|
|
61
|
+
const handler = () => {
|
|
62
|
+
cleanup().finally(() => {
|
|
63
|
+
const signo = constants.signals[signal] ?? 0;
|
|
64
|
+
process.exit(128 + signo);
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
handlers.set(signal, handler);
|
|
68
|
+
process.once(signal, handler);
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
getURL: () => tunnel.url,
|
|
72
|
+
close: cleanup
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
//#endregion
|
|
76
|
+
export { startTunnel };
|