@jixo/cli 0.23.7 → 0.24.1
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/assets/bundle/google-aistudio.browser.js +342 -80
- package/assets/bundle/groq.browser.js +3714 -0
- package/assets/prompt.json +1 -4
- package/bundle/external-CS43xY0F.js +285 -0
- package/bundle/file-replacer-cUUAxJ6b.js +19525 -0
- package/bundle/file-replacer-nbB4NnrU.js +3 -0
- package/bundle/gen-prompt-BxI7DHUD.js +4 -0
- package/bundle/gen-prompt-qt1W8jAy.js +18145 -0
- package/bundle/index.js +24850 -58304
- package/dist/commands/groq.d.ts +8 -0
- package/dist/commands/groq.d.ts.map +1 -0
- package/dist/commands/groq.js +70 -0
- package/dist/commands/groq.js.map +1 -0
- package/dist/runCli.d.ts.map +1 -1
- package/dist/runCli.js +3 -1
- package/dist/runCli.js.map +1 -1
- package/package.json +3 -3
- /package/bundle/{acorn-BoNAepQd.js → acorn-CU7YmuGp.js} +0 -0
- /package/bundle/{angular-pDmFHCFc.js → angular-BZFEnvyh.js} +0 -0
- /package/bundle/{babel-CxK7_76E.js → babel-BC5Ty8sN.js} +0 -0
- /package/bundle/{estree-CfdzwKX-.js → estree-DZTSfOv_.js} +0 -0
- /package/bundle/{flow-CGeR1fbg.js → flow-CNTeHoxv.js} +0 -0
- /package/bundle/{glimmer-CX3iu1jj.js → glimmer-DYkbcawC.js} +0 -0
- /package/bundle/{graphql-C32NbEjQ.js → graphql-fCaNVuM0.js} +0 -0
- /package/bundle/{html-BYSSlHHY.js → html-Bb8ztcZq.js} +0 -0
- /package/bundle/{markdown-DiTmrgL1.js → markdown-ChusAllR.js} +0 -0
- /package/bundle/{meriyah-DM8jkzWU.js → meriyah-9NeL3We4.js} +0 -0
- /package/bundle/{postcss-Au71UEeZ.js → postcss-DXCUuMfC.js} +0 -0
- /package/bundle/{typescript-Dn4uCwAY.js → typescript-C2HFEnMP.js} +0 -0
- /package/bundle/{yaml-D6G3z4bP.js → yaml-ByEZ6gmG.js} +0 -0
|
@@ -1,3 +1,213 @@
|
|
|
1
|
+
const obj_assign_props = /* @__NO_SIDE_EFFECTS__ */ (a, b) => {
|
|
2
|
+
const b_props = Object.getOwnPropertyDescriptors(b);
|
|
3
|
+
Object.defineProperties(a, b_props);
|
|
4
|
+
return a;
|
|
5
|
+
};
|
|
6
|
+
const isPromiseLike = (value) => value !== null && typeof value?.then === "function";
|
|
7
|
+
const func_remember = /* @__NO_SIDE_EFFECTS__ */ (func, key) => {
|
|
8
|
+
let result;
|
|
9
|
+
const once_fn = function(...args) {
|
|
10
|
+
const newKey = key?.apply(this, args);
|
|
11
|
+
if (result === void 0 || newKey !== result.key) result = {
|
|
12
|
+
key: newKey,
|
|
13
|
+
res: func.apply(this, args)
|
|
14
|
+
};
|
|
15
|
+
return result.res;
|
|
16
|
+
};
|
|
17
|
+
const once_fn_mix = Object.assign(once_fn, {
|
|
18
|
+
get source() {
|
|
19
|
+
return func;
|
|
20
|
+
},
|
|
21
|
+
get key() {
|
|
22
|
+
return result?.key;
|
|
23
|
+
},
|
|
24
|
+
get runned() {
|
|
25
|
+
return result != null;
|
|
26
|
+
},
|
|
27
|
+
get returnValue() {
|
|
28
|
+
return result?.res;
|
|
29
|
+
},
|
|
30
|
+
reset() {
|
|
31
|
+
result = void 0;
|
|
32
|
+
},
|
|
33
|
+
rerun(...args) {
|
|
34
|
+
once_fn_mix.reset();
|
|
35
|
+
return once_fn_mix(...args);
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
Object.defineProperties(once_fn_mix, {
|
|
39
|
+
source: {
|
|
40
|
+
value: func,
|
|
41
|
+
writable: false,
|
|
42
|
+
configurable: true,
|
|
43
|
+
enumerable: true
|
|
44
|
+
},
|
|
45
|
+
key: {
|
|
46
|
+
get: () => result?.key,
|
|
47
|
+
configurable: true,
|
|
48
|
+
enumerable: true
|
|
49
|
+
},
|
|
50
|
+
runned: {
|
|
51
|
+
get: () => result != null,
|
|
52
|
+
configurable: true,
|
|
53
|
+
enumerable: true
|
|
54
|
+
},
|
|
55
|
+
returnValue: {
|
|
56
|
+
get: () => result?.res,
|
|
57
|
+
configurable: true,
|
|
58
|
+
enumerable: true
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
return once_fn_mix;
|
|
62
|
+
};
|
|
63
|
+
const wrapSuccess = (result) => {
|
|
64
|
+
return Object.defineProperties([void 0, result], {
|
|
65
|
+
success: {
|
|
66
|
+
value: true,
|
|
67
|
+
writable: false,
|
|
68
|
+
enumerable: false,
|
|
69
|
+
configurable: true
|
|
70
|
+
},
|
|
71
|
+
result: {
|
|
72
|
+
value: result,
|
|
73
|
+
writable: false,
|
|
74
|
+
enumerable: false,
|
|
75
|
+
configurable: true
|
|
76
|
+
},
|
|
77
|
+
error: {
|
|
78
|
+
value: void 0,
|
|
79
|
+
writable: false,
|
|
80
|
+
enumerable: false,
|
|
81
|
+
configurable: true
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
const wrapError = (err, errorParser) => {
|
|
86
|
+
const error = errorParser ? errorParser(err) : err;
|
|
87
|
+
return Object.defineProperties([error, void 0], {
|
|
88
|
+
success: {
|
|
89
|
+
value: false,
|
|
90
|
+
writable: false,
|
|
91
|
+
enumerable: false,
|
|
92
|
+
configurable: true
|
|
93
|
+
},
|
|
94
|
+
result: {
|
|
95
|
+
value: void 0,
|
|
96
|
+
writable: false,
|
|
97
|
+
enumerable: false,
|
|
98
|
+
configurable: true
|
|
99
|
+
},
|
|
100
|
+
error: {
|
|
101
|
+
value: error,
|
|
102
|
+
writable: false,
|
|
103
|
+
enumerable: false,
|
|
104
|
+
configurable: true
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
};
|
|
108
|
+
const func_catch = /* @__PURE__ */ Object.assign((fn, errorParser) => {
|
|
109
|
+
return Object.assign(function() {
|
|
110
|
+
try {
|
|
111
|
+
const res = fn.apply(this, arguments);
|
|
112
|
+
if (isPromiseLike(res)) return res.then((value) => wrapSuccess(value), (err) => wrapError(err, errorParser));
|
|
113
|
+
return wrapSuccess(res);
|
|
114
|
+
} catch (err) {
|
|
115
|
+
return wrapError(err, errorParser);
|
|
116
|
+
}
|
|
117
|
+
}, { catchType(errorParser$1) {
|
|
118
|
+
return func_catch(fn, errorParser$1);
|
|
119
|
+
} });
|
|
120
|
+
}, {
|
|
121
|
+
wrapSuccess,
|
|
122
|
+
wrapError
|
|
123
|
+
});
|
|
124
|
+
const effect_symbol = Symbol.for("effect");
|
|
125
|
+
const timmers = {
|
|
126
|
+
timeout: (ms) => {
|
|
127
|
+
return (cb) => {
|
|
128
|
+
const ti = setTimeout(cb, ms);
|
|
129
|
+
return () => clearTimeout(ti);
|
|
130
|
+
};
|
|
131
|
+
},
|
|
132
|
+
raf: ((cb) => {
|
|
133
|
+
const ti = requestAnimationFrame(cb);
|
|
134
|
+
return () => cancelAnimationFrame(ti);
|
|
135
|
+
}),
|
|
136
|
+
microtask: ((cb) => {
|
|
137
|
+
let cancel = false;
|
|
138
|
+
queueMicrotask(() => {
|
|
139
|
+
if (cancel) return;
|
|
140
|
+
cb();
|
|
141
|
+
});
|
|
142
|
+
return () => {
|
|
143
|
+
cancel = true;
|
|
144
|
+
};
|
|
145
|
+
}),
|
|
146
|
+
eventTarget: (target, eventType, filter) => {
|
|
147
|
+
return (resolve) => {
|
|
148
|
+
let cb;
|
|
149
|
+
if (typeof filter === "function") {
|
|
150
|
+
cb = (event) => {
|
|
151
|
+
if (filter(event)) {
|
|
152
|
+
resolve(event);
|
|
153
|
+
target.removeEventListener(eventType, cb);
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
target.addEventListener(eventType, cb);
|
|
157
|
+
} else {
|
|
158
|
+
cb = resolve;
|
|
159
|
+
target.addEventListener(eventType, cb, { once: true });
|
|
160
|
+
}
|
|
161
|
+
return () => target.removeEventListener(eventType, cb);
|
|
162
|
+
};
|
|
163
|
+
},
|
|
164
|
+
from: (ms) => {
|
|
165
|
+
return typeof ms === "number" ? ms <= 0 ? timmers.microtask : timmers.timeout(ms) : ms;
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
const func_throttle = (fn, wait = 0, options = {}) => {
|
|
169
|
+
const timmer = timmers.from(wait);
|
|
170
|
+
let clear;
|
|
171
|
+
let jobs = [];
|
|
172
|
+
let target;
|
|
173
|
+
return /* @__PURE__ */ obj_assign_props(function throttled(...args) {
|
|
174
|
+
const job = Promise.withResolvers();
|
|
175
|
+
if (clear == null) {
|
|
176
|
+
clear = timmer(target = async () => {
|
|
177
|
+
target = void 0;
|
|
178
|
+
if (!options.waitPromise) clear = void 0;
|
|
179
|
+
const res = await func_catch(() => fn.apply(this, args))();
|
|
180
|
+
if (options.waitPromise) clear = void 0;
|
|
181
|
+
if (res.success) for (const job$1 of jobs) job$1.resolve(res.result);
|
|
182
|
+
else for (const job$1 of jobs) job$1.reject(res.error);
|
|
183
|
+
jobs = [];
|
|
184
|
+
}, (reason) => {
|
|
185
|
+
for (const job$1 of jobs) job$1.reject(reason);
|
|
186
|
+
});
|
|
187
|
+
if (options.before) (async () => {
|
|
188
|
+
const res = await func_catch(() => fn.apply(this, args))();
|
|
189
|
+
if (res.success) job.resolve(res.result);
|
|
190
|
+
else job.reject(res.error);
|
|
191
|
+
})();
|
|
192
|
+
else jobs.push(job);
|
|
193
|
+
} else jobs.push(job);
|
|
194
|
+
return job.promise;
|
|
195
|
+
}, {
|
|
196
|
+
get isPending() {
|
|
197
|
+
return clear != null;
|
|
198
|
+
},
|
|
199
|
+
cancel() {
|
|
200
|
+
clear?.();
|
|
201
|
+
clear = void 0;
|
|
202
|
+
},
|
|
203
|
+
source: fn,
|
|
204
|
+
flush() {
|
|
205
|
+
clear?.();
|
|
206
|
+
clear = void 0;
|
|
207
|
+
target?.();
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
};
|
|
1
211
|
let rootDirHandle;
|
|
2
212
|
const prepareDirHandle = async () => {
|
|
3
213
|
if (rootDirHandle) return rootDirHandle;
|
|
@@ -21,6 +231,117 @@ const prepareDirHandle = async () => {
|
|
|
21
231
|
throw e;
|
|
22
232
|
}
|
|
23
233
|
};
|
|
234
|
+
const getEasyFs = /* @__PURE__ */ func_remember(async () => {
|
|
235
|
+
const [error, dirHandle] = await func_catch(prepareDirHandle)();
|
|
236
|
+
if (!dirHandle) {
|
|
237
|
+
getEasyFs.reset();
|
|
238
|
+
throw error;
|
|
239
|
+
}
|
|
240
|
+
const getHandle = async (path, { create = false } = {}) => {
|
|
241
|
+
let curr = dirHandle;
|
|
242
|
+
const parts = path.split("/").filter(Boolean);
|
|
243
|
+
const last = parts.at(-1);
|
|
244
|
+
for (let i = 0; i < parts.length - 1; i++) curr = await curr.getDirectoryHandle(parts[i], { create });
|
|
245
|
+
return {
|
|
246
|
+
parent: curr,
|
|
247
|
+
name: last,
|
|
248
|
+
async getFile() {
|
|
249
|
+
if (!last) throw new Error("No file name");
|
|
250
|
+
return curr.getFileHandle(last, { create });
|
|
251
|
+
},
|
|
252
|
+
async getDir() {
|
|
253
|
+
if (!last) return curr;
|
|
254
|
+
return curr.getDirectoryHandle(last, { create });
|
|
255
|
+
}
|
|
256
|
+
};
|
|
257
|
+
};
|
|
258
|
+
const writeFile = async (filePath, data, opts) => {
|
|
259
|
+
const { getFile } = await getHandle(filePath, { create: true });
|
|
260
|
+
const handle = await getFile();
|
|
261
|
+
const w = await handle.createWritable();
|
|
262
|
+
if (!opts?.append) await w.truncate(0);
|
|
263
|
+
await w.write(data);
|
|
264
|
+
await w.close();
|
|
265
|
+
};
|
|
266
|
+
const createWriteStream = async (filePath) => {
|
|
267
|
+
const { getFile } = await getHandle(filePath, { create: true });
|
|
268
|
+
const handle = await getFile();
|
|
269
|
+
return handle.createWritable();
|
|
270
|
+
};
|
|
271
|
+
const readFileText = async (filePath) => {
|
|
272
|
+
const { getFile } = await getHandle(filePath);
|
|
273
|
+
const file = await (await getFile()).getFile();
|
|
274
|
+
return file.text();
|
|
275
|
+
};
|
|
276
|
+
const readFileBinary = async (filePath) => {
|
|
277
|
+
const { getFile } = await getHandle(filePath);
|
|
278
|
+
const file = await (await getFile()).getFile();
|
|
279
|
+
return file.bytes();
|
|
280
|
+
};
|
|
281
|
+
const createReadStream = async (filePath) => {
|
|
282
|
+
const { getFile } = await getHandle(filePath);
|
|
283
|
+
const file = await (await getFile()).getFile();
|
|
284
|
+
return file.stream();
|
|
285
|
+
};
|
|
286
|
+
const readdir = async (dirPath) => {
|
|
287
|
+
const { getDir } = await getHandle(dirPath);
|
|
288
|
+
const dir = await getDir();
|
|
289
|
+
return Array.fromAsync(dir.keys());
|
|
290
|
+
};
|
|
291
|
+
const mkdir = async (dirPath, opts) => {
|
|
292
|
+
const parts = dirPath.split("/").filter(Boolean);
|
|
293
|
+
let curr = dirHandle;
|
|
294
|
+
for (const segment of parts) {
|
|
295
|
+
curr = await curr.getDirectoryHandle(segment, { create: true });
|
|
296
|
+
if (!opts?.recursive) break;
|
|
297
|
+
}
|
|
298
|
+
};
|
|
299
|
+
const exists = async (path) => {
|
|
300
|
+
try {
|
|
301
|
+
await getHandle(path);
|
|
302
|
+
return true;
|
|
303
|
+
} catch {
|
|
304
|
+
return false;
|
|
305
|
+
}
|
|
306
|
+
};
|
|
307
|
+
const stat = async (path) => {
|
|
308
|
+
const { getFile, getDir } = await getHandle(path);
|
|
309
|
+
try {
|
|
310
|
+
const h = await getFile();
|
|
311
|
+
const f = await h.getFile();
|
|
312
|
+
return {
|
|
313
|
+
isFile: true,
|
|
314
|
+
size: f.size,
|
|
315
|
+
lastModified: f.lastModified
|
|
316
|
+
};
|
|
317
|
+
} catch {
|
|
318
|
+
await getDir();
|
|
319
|
+
return { isFile: false };
|
|
320
|
+
}
|
|
321
|
+
};
|
|
322
|
+
const rm = async (path, opts) => {
|
|
323
|
+
try {
|
|
324
|
+
const { parent, name } = await getHandle(path);
|
|
325
|
+
if (!name) throw new Error("Invalid path");
|
|
326
|
+
await parent.removeEntry(name, { recursive: opts?.recursive });
|
|
327
|
+
return true;
|
|
328
|
+
} catch {
|
|
329
|
+
return false;
|
|
330
|
+
}
|
|
331
|
+
};
|
|
332
|
+
return {
|
|
333
|
+
writeFile,
|
|
334
|
+
createWriteStream,
|
|
335
|
+
readFileText,
|
|
336
|
+
readFileBinary,
|
|
337
|
+
createReadStream,
|
|
338
|
+
readdir,
|
|
339
|
+
mkdir,
|
|
340
|
+
exists,
|
|
341
|
+
stat,
|
|
342
|
+
rm
|
|
343
|
+
};
|
|
344
|
+
});
|
|
24
345
|
const styles = {
|
|
25
346
|
header: "color: #4CAF50; font-size: 18px; font-weight: bold; border-bottom: 2px solid #4CAF50; padding-bottom: 5px;",
|
|
26
347
|
info: "color: #2196F3; font-style: italic;",
|
|
@@ -36,19 +357,6 @@ const arrayFromAsync = async (iter) => {
|
|
|
36
357
|
};
|
|
37
358
|
const getTargetNamespace = () => location.pathname.split("/").at(-1);
|
|
38
359
|
const delay = (ms) => new Promise((cb) => setTimeout(cb, ms));
|
|
39
|
-
const aFollowedByB = (el, aSelector, bSelector, cb) => {
|
|
40
|
-
const run = () => {
|
|
41
|
-
console.log("QAQ", el);
|
|
42
|
-
for (const bEle of el.querySelectorAll(`:scope > ${aSelector} + ${bSelector}`)) {
|
|
43
|
-
const aEle = bEle.previousElementSibling;
|
|
44
|
-
cb(aEle, bEle);
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
const mo = new MutationObserver(run);
|
|
48
|
-
mo.observe(el, { childList: true });
|
|
49
|
-
run();
|
|
50
|
-
return () => mo.disconnect();
|
|
51
|
-
};
|
|
52
360
|
const $ = document.querySelector.bind(document);
|
|
53
361
|
const $$ = document.querySelectorAll.bind(document);
|
|
54
362
|
const fillFunctionCall = async () => {
|
|
@@ -94,7 +402,7 @@ const fillFunctionCall = async () => {
|
|
|
94
402
|
buttonEle.click();
|
|
95
403
|
await rootDirHandle$1.removeEntry(callTaskname);
|
|
96
404
|
};
|
|
97
|
-
const syncInput = async (fps =
|
|
405
|
+
const syncInput = async (fps = 3) => {
|
|
98
406
|
(async () => {
|
|
99
407
|
while (true) {
|
|
100
408
|
await fillFunctionCall();
|
|
@@ -102,78 +410,32 @@ const syncInput = async (fps = 2) => {
|
|
|
102
410
|
}
|
|
103
411
|
})();
|
|
104
412
|
};
|
|
105
|
-
const syncOutput = () => {
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
`.replaceAll("\n", "");
|
|
117
|
-
headEle.appendChild(styleEle);
|
|
118
|
-
const findCdkOverlayContainer = () => $(".cdk-overlay-container");
|
|
119
|
-
const cdkOverlayTaskId = Symbol.for("cdk-overlay-style-hooks");
|
|
120
|
-
if (!window[cdkOverlayTaskId]) {
|
|
121
|
-
let cdkOverlayContainer;
|
|
122
|
-
let off = () => {};
|
|
123
|
-
window[cdkOverlayTaskId] = setInterval(() => {
|
|
124
|
-
const newCdkOverlayContainer = findCdkOverlayContainer();
|
|
125
|
-
if (newCdkOverlayContainer !== cdkOverlayContainer && newCdkOverlayContainer) {
|
|
126
|
-
off();
|
|
127
|
-
off = aFollowedByB(cdkOverlayContainer = newCdkOverlayContainer, ".cdk-overlay-backdrop", ".cdk-global-overlay-wrapper:has(.get-code-dialog)", (cdkOverlayBackdropEle) => {
|
|
128
|
-
if (cdkOverlayBackdropEle.style.display !== "none") {
|
|
129
|
-
console.log("%c隐藏遮罩元素", styles.warn, cdkOverlayBackdropEle);
|
|
130
|
-
cdkOverlayBackdropEle.style.display = "none";
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
}, 1e3);
|
|
135
|
-
}
|
|
136
|
-
const findMustacheKey = () => {
|
|
137
|
-
for (const key in default_MakerSuite) {
|
|
138
|
-
const render = default_MakerSuite[key]?.render;
|
|
139
|
-
if (render && typeof render === "function") return key;
|
|
140
|
-
}
|
|
413
|
+
const syncOutput = async () => {
|
|
414
|
+
const onChange = func_throttle(runFileCreation, 200, {
|
|
415
|
+
before: true,
|
|
416
|
+
waitPromise: true
|
|
417
|
+
});
|
|
418
|
+
const arr_push = Array.prototype[Symbol.for("arr_push")] || Array.prototype.push;
|
|
419
|
+
Array.prototype[Symbol.for("arr_push")] = arr_push;
|
|
420
|
+
Array.prototype.push = function push(...args) {
|
|
421
|
+
const a = args[0];
|
|
422
|
+
if (a && Object.getPrototypeOf(a) === Object.prototype && a.role && a.id && typeof a.text === "string") onChange(this);
|
|
423
|
+
return arr_push.apply(this, args);
|
|
141
424
|
};
|
|
142
|
-
const
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
425
|
+
const findInput = () => $(`textarea[aria-label="Start typing a prompt"]`);
|
|
426
|
+
while (!started) {
|
|
427
|
+
const input = findInput();
|
|
428
|
+
if (input) {
|
|
429
|
+
input.dispatchEvent(new Event("input"));
|
|
430
|
+
started = true;
|
|
147
431
|
}
|
|
148
|
-
|
|
149
|
-
async function startInject() {
|
|
150
|
-
const key = await waitMustacheKey();
|
|
151
|
-
const _render = default_MakerSuite[key].render;
|
|
152
|
-
default_MakerSuite[key].render = (...args) => {
|
|
153
|
-
const b = args[1];
|
|
154
|
-
runFileCreation(b);
|
|
155
|
-
return "";
|
|
156
|
-
};
|
|
157
|
-
const findInput = () => $(`textarea[aria-label="Start typing a prompt"]`);
|
|
158
|
-
findInput()?.dispatchEvent(new Event("input"));
|
|
432
|
+
await delay(300);
|
|
159
433
|
}
|
|
160
|
-
if (!$(".cdk-overlay-container:has(.get-code-dialog)")) {
|
|
161
|
-
const findBtn = () => $(`button[aria-label="Get code"]`);
|
|
162
|
-
const waitBtn = async () => {
|
|
163
|
-
while (true) {
|
|
164
|
-
const btn = findBtn();
|
|
165
|
-
if (btn) return btn;
|
|
166
|
-
await delay(200);
|
|
167
|
-
}
|
|
168
|
-
};
|
|
169
|
-
waitBtn().then((getCodeButtonEle) => {
|
|
170
|
-
getCodeButtonEle.click();
|
|
171
|
-
requestAnimationFrame(startInject);
|
|
172
|
-
});
|
|
173
|
-
} else startInject();
|
|
174
434
|
};
|
|
435
|
+
let started = false;
|
|
175
436
|
let writting = false;
|
|
176
437
|
async function runFileCreation(b, targetFilename = getTargetNamespace() + ".contents.json") {
|
|
438
|
+
started = true;
|
|
177
439
|
if (writting) return;
|
|
178
440
|
writting = true;
|
|
179
441
|
try {
|