Updated the files.

This commit is contained in:
Batuhan Berk Başoğlu 2024-02-08 19:38:41 -05:00
parent 1553e6b971
commit 753967d4f5
23418 changed files with 3784666 additions and 0 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

45
my-app/node_modules/@vitejs/plugin-basic-ssl/dist/index.cjs generated vendored Executable file
View file

@ -0,0 +1,45 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const path = require('node:path');
const node_fs = require('node:fs');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e["default"] : e; }
const path__default = /*#__PURE__*/_interopDefaultLegacy(path);
const defaultCacheDir = "node_modules/.vite";
function viteBasicSslPlugin() {
return {
name: "vite:basic-ssl",
async configResolved(config) {
const certificate = await getCertificate((config.cacheDir ?? defaultCacheDir) + "/basic-ssl");
const https = () => ({ cert: certificate, key: certificate });
config.server.https = Object.assign({}, config.server.https, https());
config.preview.https = Object.assign({}, config.preview.https, https());
}
};
}
async function getCertificate(cacheDir) {
const cachePath = path__default.join(cacheDir, "_cert.pem");
try {
const [stat, content] = await Promise.all([
node_fs.promises.stat(cachePath),
node_fs.promises.readFile(cachePath, "utf8")
]);
if (Date.now() - stat.ctime.valueOf() > 30 * 24 * 60 * 60 * 1e3) {
throw new Error("cache is outdated.");
}
return content;
} catch {
const content = (await import('./chunks/certificate.cjs')).createCertificate();
node_fs.promises.mkdir(cacheDir, { recursive: true }).then(() => node_fs.promises.writeFile(cachePath, content)).catch(() => {
});
return content;
}
}
module.exports = viteBasicSslPlugin;
module.exports["default"] = viteBasicSslPlugin;
module.exports.getCertificate = getCertificate;

View file

@ -0,0 +1,6 @@
import { Plugin } from 'vite';
declare function viteBasicSslPlugin(): Plugin;
declare function getCertificate(cacheDir: string): Promise<string>;
export { viteBasicSslPlugin as default, getCertificate };

35
my-app/node_modules/@vitejs/plugin-basic-ssl/dist/index.mjs generated vendored Executable file
View file

@ -0,0 +1,35 @@
import path from 'node:path';
import { promises } from 'node:fs';
const defaultCacheDir = "node_modules/.vite";
function viteBasicSslPlugin() {
return {
name: "vite:basic-ssl",
async configResolved(config) {
const certificate = await getCertificate((config.cacheDir ?? defaultCacheDir) + "/basic-ssl");
const https = () => ({ cert: certificate, key: certificate });
config.server.https = Object.assign({}, config.server.https, https());
config.preview.https = Object.assign({}, config.preview.https, https());
}
};
}
async function getCertificate(cacheDir) {
const cachePath = path.join(cacheDir, "_cert.pem");
try {
const [stat, content] = await Promise.all([
promises.stat(cachePath),
promises.readFile(cachePath, "utf8")
]);
if (Date.now() - stat.ctime.valueOf() > 30 * 24 * 60 * 60 * 1e3) {
throw new Error("cache is outdated.");
}
return content;
} catch {
const content = (await import('./chunks/certificate.mjs')).createCertificate();
promises.mkdir(cacheDir, { recursive: true }).then(() => promises.writeFile(cachePath, content)).catch(() => {
});
return content;
}
}
export { viteBasicSslPlugin as default, getCertificate };