2020-01-26 13:43:59 -05:00
|
|
|
try {
|
|
|
|
Deno.removeSync("./lock_write_fetch.json");
|
2020-11-03 10:19:29 -05:00
|
|
|
} catch {
|
|
|
|
// pass
|
|
|
|
}
|
2020-01-26 13:43:59 -05:00
|
|
|
|
2022-12-02 08:43:17 -05:00
|
|
|
const fetchProc = await new Deno.Command(Deno.execPath(), {
|
2020-01-26 13:43:59 -05:00
|
|
|
stdout: "null",
|
|
|
|
stderr: "null",
|
2022-05-18 16:00:11 -04:00
|
|
|
args: [
|
2020-04-07 11:24:47 -04:00
|
|
|
"cache",
|
2024-09-25 21:50:54 -04:00
|
|
|
"--allow-import",
|
2020-01-26 13:43:59 -05:00
|
|
|
"--reload",
|
|
|
|
"--lock=lock_write_fetch.json",
|
2020-09-14 07:18:00 -04:00
|
|
|
"--cert=tls/RootCA.pem",
|
2022-09-19 10:32:21 -04:00
|
|
|
"run/https_import.ts",
|
2020-03-28 13:03:49 -04:00
|
|
|
],
|
2022-12-02 08:43:17 -05:00
|
|
|
}).output();
|
2020-01-26 13:43:59 -05:00
|
|
|
|
2022-07-18 09:16:12 -04:00
|
|
|
console.log(`fetch code: ${fetchProc.code}`);
|
2020-01-26 13:43:59 -05:00
|
|
|
|
2022-12-02 08:43:17 -05:00
|
|
|
const fetchCheckProc = await new Deno.Command(Deno.execPath(), {
|
2020-01-26 13:43:59 -05:00
|
|
|
stdout: "null",
|
|
|
|
stderr: "null",
|
2022-05-18 16:00:11 -04:00
|
|
|
args: [
|
2020-04-07 11:24:47 -04:00
|
|
|
"cache",
|
2024-09-25 21:50:54 -04:00
|
|
|
"--allow-import",
|
2020-01-26 13:43:59 -05:00
|
|
|
"--lock=lock_write_fetch.json",
|
2020-09-14 07:18:00 -04:00
|
|
|
"--cert=tls/RootCA.pem",
|
2022-09-19 10:32:21 -04:00
|
|
|
"run/https_import.ts",
|
2020-03-28 13:03:49 -04:00
|
|
|
],
|
2022-12-02 08:43:17 -05:00
|
|
|
}).output();
|
2020-01-26 13:43:59 -05:00
|
|
|
|
2022-07-18 09:16:12 -04:00
|
|
|
console.log(`fetch check code: ${fetchCheckProc.code}`);
|
2020-01-26 13:43:59 -05:00
|
|
|
|
2020-05-29 02:43:31 -04:00
|
|
|
Deno.removeSync("./lock_write_fetch.json");
|
|
|
|
|
2022-12-02 08:43:17 -05:00
|
|
|
const runProc = await new Deno.Command(Deno.execPath(), {
|
2020-01-26 13:43:59 -05:00
|
|
|
stdout: "null",
|
|
|
|
stderr: "null",
|
2022-05-18 16:00:11 -04:00
|
|
|
args: [
|
2020-05-04 07:03:30 -04:00
|
|
|
"run",
|
2024-09-25 21:50:54 -04:00
|
|
|
"--allow-import",
|
2020-05-04 07:03:30 -04:00
|
|
|
"--lock=lock_write_fetch.json",
|
2020-05-29 02:43:31 -04:00
|
|
|
"--allow-read",
|
2024-08-27 23:23:51 -04:00
|
|
|
"--cert=tls/RootCA.pem",
|
|
|
|
"run/https_import.ts",
|
2020-05-04 07:03:30 -04:00
|
|
|
],
|
2022-12-02 08:43:17 -05:00
|
|
|
}).output();
|
2020-01-26 13:43:59 -05:00
|
|
|
|
2022-07-18 09:16:12 -04:00
|
|
|
console.log(`run code: ${runProc.code}`);
|
2020-01-26 13:43:59 -05:00
|
|
|
|
2024-08-27 23:23:51 -04:00
|
|
|
await Deno.stat("./lock_write_fetch.json");
|
2020-01-26 13:43:59 -05:00
|
|
|
Deno.removeSync("./lock_write_fetch.json");
|