unplugin-env 1.0.0 → 1.0.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/LICENSE +1 -1
- package/README.md +68 -2
- package/README.zh-CN.md +236 -0
- package/dist/{chunk-OQXUTP45.js → chunk-ELYQVJHH.js} +1 -1
- package/dist/{chunk-U7BMFDAG.js → chunk-QWCQIGEO.js} +145 -144
- package/dist/{chunk-JDYYGKOJ.js → chunk-Y45ERLIW.js} +1 -1
- package/dist/esbuild.cjs +145 -144
- package/dist/esbuild.js +1 -1
- package/dist/index.cjs +145 -144
- package/dist/index.js +1 -1
- package/dist/nuxt.cjs +146 -145
- package/dist/nuxt.js +4 -4
- package/dist/rollup.cjs +145 -144
- package/dist/rollup.js +1 -1
- package/dist/vite.cjs +145 -144
- package/dist/vite.js +2 -2
- package/dist/webpack.cjs +145 -144
- package/dist/webpack.js +2 -2
- package/package.json +31 -23
package/dist/index.cjs
CHANGED
|
@@ -4309,41 +4309,41 @@ var require_queue = __commonJS({
|
|
|
4309
4309
|
queue.drained = drained;
|
|
4310
4310
|
return queue;
|
|
4311
4311
|
function push(value) {
|
|
4312
|
-
var p = new Promise(function(
|
|
4312
|
+
var p = new Promise(function(resolve, reject) {
|
|
4313
4313
|
pushCb(value, function(err, result) {
|
|
4314
4314
|
if (err) {
|
|
4315
4315
|
reject(err);
|
|
4316
4316
|
return;
|
|
4317
4317
|
}
|
|
4318
|
-
|
|
4318
|
+
resolve(result);
|
|
4319
4319
|
});
|
|
4320
4320
|
});
|
|
4321
4321
|
p.catch(noop);
|
|
4322
4322
|
return p;
|
|
4323
4323
|
}
|
|
4324
4324
|
function unshift(value) {
|
|
4325
|
-
var p = new Promise(function(
|
|
4325
|
+
var p = new Promise(function(resolve, reject) {
|
|
4326
4326
|
unshiftCb(value, function(err, result) {
|
|
4327
4327
|
if (err) {
|
|
4328
4328
|
reject(err);
|
|
4329
4329
|
return;
|
|
4330
4330
|
}
|
|
4331
|
-
|
|
4331
|
+
resolve(result);
|
|
4332
4332
|
});
|
|
4333
4333
|
});
|
|
4334
4334
|
p.catch(noop);
|
|
4335
4335
|
return p;
|
|
4336
4336
|
}
|
|
4337
4337
|
function drained() {
|
|
4338
|
-
var p = new Promise(function(
|
|
4338
|
+
var p = new Promise(function(resolve) {
|
|
4339
4339
|
process.nextTick(function() {
|
|
4340
4340
|
if (queue.idle()) {
|
|
4341
|
-
|
|
4341
|
+
resolve();
|
|
4342
4342
|
} else {
|
|
4343
4343
|
var previousDrain = queue.drain;
|
|
4344
4344
|
queue.drain = function() {
|
|
4345
4345
|
if (typeof previousDrain === "function") previousDrain();
|
|
4346
|
-
|
|
4346
|
+
resolve();
|
|
4347
4347
|
queue.drain = previousDrain;
|
|
4348
4348
|
};
|
|
4349
4349
|
}
|
|
@@ -4829,9 +4829,9 @@ var require_stream3 = __commonJS({
|
|
|
4829
4829
|
});
|
|
4830
4830
|
}
|
|
4831
4831
|
_getStat(filepath) {
|
|
4832
|
-
return new Promise((
|
|
4832
|
+
return new Promise((resolve, reject) => {
|
|
4833
4833
|
this._stat(filepath, this._fsStatSettings, (error, stats) => {
|
|
4834
|
-
return error === null ?
|
|
4834
|
+
return error === null ? resolve(stats) : reject(error);
|
|
4835
4835
|
});
|
|
4836
4836
|
});
|
|
4837
4837
|
}
|
|
@@ -4855,10 +4855,10 @@ var require_async5 = __commonJS({
|
|
|
4855
4855
|
this._readerStream = new stream_1.default(this._settings);
|
|
4856
4856
|
}
|
|
4857
4857
|
dynamic(root, options) {
|
|
4858
|
-
return new Promise((
|
|
4858
|
+
return new Promise((resolve, reject) => {
|
|
4859
4859
|
this._walkAsync(root, options, (error, entries) => {
|
|
4860
4860
|
if (error === null) {
|
|
4861
|
-
|
|
4861
|
+
resolve(entries);
|
|
4862
4862
|
} else {
|
|
4863
4863
|
reject(error);
|
|
4864
4864
|
}
|
|
@@ -4868,10 +4868,10 @@ var require_async5 = __commonJS({
|
|
|
4868
4868
|
async static(patterns, options) {
|
|
4869
4869
|
const entries = [];
|
|
4870
4870
|
const stream = this._readerStream.static(patterns, options);
|
|
4871
|
-
return new Promise((
|
|
4871
|
+
return new Promise((resolve, reject) => {
|
|
4872
4872
|
stream.once("error", reject);
|
|
4873
4873
|
stream.on("data", (entry) => entries.push(entry));
|
|
4874
|
-
stream.once("end", () =>
|
|
4874
|
+
stream.once("end", () => resolve(entries));
|
|
4875
4875
|
});
|
|
4876
4876
|
}
|
|
4877
4877
|
};
|
|
@@ -5540,127 +5540,10 @@ var import_node_fs3 = require("fs");
|
|
|
5540
5540
|
var import_node_process4 = __toESM(require("process"), 1);
|
|
5541
5541
|
var import_unplugin = require("unplugin");
|
|
5542
5542
|
|
|
5543
|
-
// src/core/generate.ts
|
|
5544
|
-
var import_node_path = __toESM(require("path"), 1);
|
|
5545
|
-
var import_node_fs = require("fs");
|
|
5546
|
-
var import_node_process = __toESM(require("process"), 1);
|
|
5547
|
-
var import_fast_glob = __toESM(require_out4(), 1);
|
|
5548
|
-
var import_recast = __toESM(require("recast"), 1);
|
|
5549
|
-
function mergeObjects(prodObj, devObj) {
|
|
5550
|
-
const prodProps = new Map(prodObj.properties.map((p) => [p.key.name || p.key.value, p]));
|
|
5551
|
-
for (const prop of devObj.properties) {
|
|
5552
|
-
const key = prop.key.name || prop.key.value;
|
|
5553
|
-
if (prodProps.has(key)) {
|
|
5554
|
-
const index = prodObj.properties.indexOf(prodProps.get(key));
|
|
5555
|
-
if (index >= 0)
|
|
5556
|
-
prodObj.properties[index] = prop;
|
|
5557
|
-
} else {
|
|
5558
|
-
prodObj.properties.push(prop);
|
|
5559
|
-
}
|
|
5560
|
-
}
|
|
5561
|
-
}
|
|
5562
|
-
async function generateScript(options, mode, base2) {
|
|
5563
|
-
const { dir, fileName, globalName, serve, build } = options.env;
|
|
5564
|
-
const folder = await findFolder(import_node_process.default.cwd(), dir);
|
|
5565
|
-
const files = await (0, import_fast_glob.default)("*.+(js|ts)", {
|
|
5566
|
-
absolute: true,
|
|
5567
|
-
cwd: folder
|
|
5568
|
-
});
|
|
5569
|
-
const testReg = mode === "serve" ? serve : build;
|
|
5570
|
-
let target = "";
|
|
5571
|
-
let source = "";
|
|
5572
|
-
let code = "";
|
|
5573
|
-
const name = fileName;
|
|
5574
|
-
for (const file of files) {
|
|
5575
|
-
try {
|
|
5576
|
-
const mod = await import_node_fs.promises.readFile(file, "utf-8");
|
|
5577
|
-
if (testReg == null ? void 0 : testReg.test(file))
|
|
5578
|
-
target = mod;
|
|
5579
|
-
else
|
|
5580
|
-
source = mod;
|
|
5581
|
-
} catch (error) {
|
|
5582
|
-
console.error(`Error loading file ${file}:`, error);
|
|
5583
|
-
}
|
|
5584
|
-
}
|
|
5585
|
-
const targetAst = import_recast.default.parse(target);
|
|
5586
|
-
const sourceAst = import_recast.default.parse(source);
|
|
5587
|
-
const targetExport = targetAst.program.body.find((n) => n.type === "ExportDefaultDeclaration").declaration;
|
|
5588
|
-
const sourceExport = sourceAst.program.body.find((n) => n.type === "ExportDefaultDeclaration").declaration;
|
|
5589
|
-
mergeObjects(sourceExport, targetExport);
|
|
5590
|
-
const mergedCode = import_recast.default.print(sourceExport).code;
|
|
5591
|
-
const returnedTarget = mergedCode;
|
|
5592
|
-
const versionInfo = await generateVersion(options, mode);
|
|
5593
|
-
code = `window.${globalName}=${returnedTarget};${versionInfo}`;
|
|
5594
|
-
const formatCode = code;
|
|
5595
|
-
return {
|
|
5596
|
-
code,
|
|
5597
|
-
script: ` <script type="text/javascript" src="${base2}${fileName}"></script>
|
|
5598
|
-
</head>`,
|
|
5599
|
-
emit: {
|
|
5600
|
-
type: "asset",
|
|
5601
|
-
fileName: name,
|
|
5602
|
-
source: formatCode
|
|
5603
|
-
},
|
|
5604
|
-
watchFiles: files
|
|
5605
|
-
};
|
|
5606
|
-
}
|
|
5607
|
-
async function generateVersion(options, mode) {
|
|
5608
|
-
const packageFile = await (0, import_fast_glob.default)("package.json", {
|
|
5609
|
-
absolute: true,
|
|
5610
|
-
cwd: (0, import_node_path.resolve)(import_node_process.default.cwd())
|
|
5611
|
-
});
|
|
5612
|
-
const packageString = await import_node_fs.promises.readFile(packageFile[0], "utf8");
|
|
5613
|
-
const packageJson = JSON.parse(packageString);
|
|
5614
|
-
return `console.info("Version: ${packageJson.version} - ${mode === "serve" ? "runtime" : "built"} on ${options.date}")`;
|
|
5615
|
-
}
|
|
5616
|
-
async function findFolder(directoryPath, dir) {
|
|
5617
|
-
const ignore = /* @__PURE__ */ new Set(["dist", "node_modules", "playground", "example", "test", "jest", "tests", "locales", "public", ".git", ".github", ".vscode"]);
|
|
5618
|
-
const files = await import_node_fs.promises.readdir(directoryPath);
|
|
5619
|
-
const filePaths = files.filter((item) => !ignore.has(item));
|
|
5620
|
-
let nestedFolder = "";
|
|
5621
|
-
for (const file of filePaths) {
|
|
5622
|
-
const fullFilePath = import_node_path.default.join(directoryPath, file);
|
|
5623
|
-
const stat = await import_node_fs.promises.stat(fullFilePath);
|
|
5624
|
-
if (stat.isDirectory()) {
|
|
5625
|
-
if (file.toLowerCase() === dir) {
|
|
5626
|
-
return fullFilePath;
|
|
5627
|
-
} else {
|
|
5628
|
-
nestedFolder = await findFolder(fullFilePath, dir);
|
|
5629
|
-
if (nestedFolder)
|
|
5630
|
-
return nestedFolder;
|
|
5631
|
-
}
|
|
5632
|
-
}
|
|
5633
|
-
}
|
|
5634
|
-
return "";
|
|
5635
|
-
}
|
|
5636
|
-
|
|
5637
|
-
// src/core/options.ts
|
|
5638
|
-
var import_utils = require("@antfu/utils");
|
|
5639
|
-
function resolveOptions(options) {
|
|
5640
|
-
const defaults = {
|
|
5641
|
-
env: {
|
|
5642
|
-
dir: "config",
|
|
5643
|
-
fileName: "manifest.js",
|
|
5644
|
-
globalName: "manifest",
|
|
5645
|
-
serve: /dev|development/i,
|
|
5646
|
-
build: /prod|production/i
|
|
5647
|
-
},
|
|
5648
|
-
compress: {
|
|
5649
|
-
outDir: "dist",
|
|
5650
|
-
ignoreBase: true
|
|
5651
|
-
}
|
|
5652
|
-
};
|
|
5653
|
-
const mergeOptions = (0, import_utils.deepMerge)(defaults, options);
|
|
5654
|
-
return {
|
|
5655
|
-
...mergeOptions,
|
|
5656
|
-
date: (/* @__PURE__ */ new Date()).toLocaleString()
|
|
5657
|
-
};
|
|
5658
|
-
}
|
|
5659
|
-
|
|
5660
5543
|
// src/core/compress.ts
|
|
5661
|
-
var
|
|
5662
|
-
var
|
|
5663
|
-
var
|
|
5544
|
+
var import_node_fs = __toESM(require("fs"), 1);
|
|
5545
|
+
var import_node_path = __toESM(require("path"), 1);
|
|
5546
|
+
var import_node_process2 = __toESM(require("process"), 1);
|
|
5664
5547
|
var import_archiver = __toESM(require("archiver"), 1);
|
|
5665
5548
|
|
|
5666
5549
|
// node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
@@ -5850,16 +5733,16 @@ var ansiStyles = assembleStyles();
|
|
|
5850
5733
|
var ansi_styles_default = ansiStyles;
|
|
5851
5734
|
|
|
5852
5735
|
// node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/supports-color/index.js
|
|
5853
|
-
var
|
|
5736
|
+
var import_node_process = __toESM(require("process"), 1);
|
|
5854
5737
|
var import_node_os = __toESM(require("os"), 1);
|
|
5855
5738
|
var import_node_tty = __toESM(require("tty"), 1);
|
|
5856
|
-
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args :
|
|
5739
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : import_node_process.default.argv) {
|
|
5857
5740
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
5858
5741
|
const position = argv.indexOf(prefix + flag);
|
|
5859
5742
|
const terminatorPosition = argv.indexOf("--");
|
|
5860
5743
|
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
5861
5744
|
}
|
|
5862
|
-
var { env } =
|
|
5745
|
+
var { env } = import_node_process.default;
|
|
5863
5746
|
var flagForceColor;
|
|
5864
5747
|
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
5865
5748
|
flagForceColor = 0;
|
|
@@ -5915,7 +5798,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
5915
5798
|
if (env.TERM === "dumb") {
|
|
5916
5799
|
return min;
|
|
5917
5800
|
}
|
|
5918
|
-
if (
|
|
5801
|
+
if (import_node_process.default.platform === "win32") {
|
|
5919
5802
|
const osRelease = import_node_os.default.release().split(".");
|
|
5920
5803
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
5921
5804
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
@@ -6175,15 +6058,15 @@ var Log = class {
|
|
|
6175
6058
|
// src/core/compress.ts
|
|
6176
6059
|
async function createCompress(options) {
|
|
6177
6060
|
const { outDir, ignoreBase } = options;
|
|
6178
|
-
const zipFilePath =
|
|
6061
|
+
const zipFilePath = import_node_path.default.resolve(import_node_process2.default.cwd(), `${import_node_path.default.basename(outDir)}.zip`);
|
|
6179
6062
|
Log.log("Compressing the directory", outDir);
|
|
6180
|
-
return new Promise((
|
|
6063
|
+
return new Promise((resolve, reject) => {
|
|
6181
6064
|
try {
|
|
6182
|
-
const output =
|
|
6065
|
+
const output = import_node_fs.default.createWriteStream(zipFilePath);
|
|
6183
6066
|
const archive = (0, import_archiver.default)("zip");
|
|
6184
6067
|
output.on("close", () => {
|
|
6185
|
-
Log.success("Successfully compressed to", `${zipFilePath} (${archive.pointer() / 1024 / 1024} MB)`);
|
|
6186
|
-
|
|
6068
|
+
Log.success("Successfully compressed to", `${zipFilePath} (${(archive.pointer() / 1024 / 1024).toFixed(1)} MB)`);
|
|
6069
|
+
resolve(null);
|
|
6187
6070
|
});
|
|
6188
6071
|
archive.on("warning", (err) => {
|
|
6189
6072
|
if (err.code === "ENOENT")
|
|
@@ -6196,8 +6079,8 @@ async function createCompress(options) {
|
|
|
6196
6079
|
reject(err);
|
|
6197
6080
|
});
|
|
6198
6081
|
archive.pipe(output);
|
|
6199
|
-
const absoluteOutDir =
|
|
6200
|
-
archive.directory(absoluteOutDir, ignoreBase ? false :
|
|
6082
|
+
const absoluteOutDir = import_node_path.default.resolve(outDir);
|
|
6083
|
+
archive.directory(absoluteOutDir, ignoreBase ? false : import_node_path.default.basename(outDir));
|
|
6201
6084
|
archive.finalize();
|
|
6202
6085
|
} catch (error) {
|
|
6203
6086
|
Log.error("Error compressing the directory", error);
|
|
@@ -6206,6 +6089,124 @@ async function createCompress(options) {
|
|
|
6206
6089
|
});
|
|
6207
6090
|
}
|
|
6208
6091
|
|
|
6092
|
+
// src/core/generate.ts
|
|
6093
|
+
var import_node_fs2 = require("fs");
|
|
6094
|
+
var import_node_path2 = __toESM(require("path"), 1);
|
|
6095
|
+
var import_node_process3 = __toESM(require("process"), 1);
|
|
6096
|
+
var import_fast_glob = __toESM(require_out4(), 1);
|
|
6097
|
+
var import_local_pkg = require("local-pkg");
|
|
6098
|
+
var import_recast = __toESM(require("recast"), 1);
|
|
6099
|
+
function mergeObjects(prodObj, devObj) {
|
|
6100
|
+
const prodProps = new Map(prodObj.properties.map((p) => [p.key.name || p.key.value, p]));
|
|
6101
|
+
for (const prop of devObj.properties) {
|
|
6102
|
+
const key = prop.key.name || prop.key.value;
|
|
6103
|
+
if (prodProps.has(key)) {
|
|
6104
|
+
const index = prodObj.properties.indexOf(prodProps.get(key));
|
|
6105
|
+
if (index >= 0)
|
|
6106
|
+
prodObj.properties[index] = prop;
|
|
6107
|
+
} else {
|
|
6108
|
+
prodObj.properties.push(prop);
|
|
6109
|
+
}
|
|
6110
|
+
}
|
|
6111
|
+
}
|
|
6112
|
+
async function generateScript(options, mode, base2) {
|
|
6113
|
+
const { dir, fileName, globalName, serve, build } = options.env;
|
|
6114
|
+
const folder = await findFolder(import_node_process3.default.cwd(), dir);
|
|
6115
|
+
const files = await (0, import_fast_glob.default)("*.+(js|ts)", {
|
|
6116
|
+
absolute: true,
|
|
6117
|
+
cwd: folder
|
|
6118
|
+
});
|
|
6119
|
+
const testReg = mode === "serve" ? serve : build;
|
|
6120
|
+
let target = "";
|
|
6121
|
+
let source = "";
|
|
6122
|
+
let code = "";
|
|
6123
|
+
const name = fileName;
|
|
6124
|
+
for (const file of files) {
|
|
6125
|
+
try {
|
|
6126
|
+
const mod = await import_node_fs2.promises.readFile(file, "utf-8");
|
|
6127
|
+
if (testReg?.test(file))
|
|
6128
|
+
target = mod;
|
|
6129
|
+
else
|
|
6130
|
+
source = mod;
|
|
6131
|
+
} catch (error) {
|
|
6132
|
+
console.error(`Error loading file ${file}:`, error);
|
|
6133
|
+
}
|
|
6134
|
+
}
|
|
6135
|
+
const targetAst = import_recast.default.parse(target);
|
|
6136
|
+
const sourceAst = import_recast.default.parse(source);
|
|
6137
|
+
const targetExport = targetAst.program.body.find((n) => n.type === "ExportDefaultDeclaration").declaration;
|
|
6138
|
+
const sourceExport = sourceAst.program.body.find((n) => n.type === "ExportDefaultDeclaration").declaration;
|
|
6139
|
+
mergeObjects(sourceExport, targetExport);
|
|
6140
|
+
const mergedCode = import_recast.default.print(sourceExport).code;
|
|
6141
|
+
const returnedTarget = mergedCode;
|
|
6142
|
+
const versionInfo = await generateVersion(options, mode);
|
|
6143
|
+
code = `window.${globalName}=${returnedTarget};
|
|
6144
|
+
${versionInfo}`;
|
|
6145
|
+
const formatCode = code;
|
|
6146
|
+
return {
|
|
6147
|
+
code,
|
|
6148
|
+
script: ` <script type="text/javascript" src="${base2}${fileName}"></script>
|
|
6149
|
+
</head>`,
|
|
6150
|
+
emit: {
|
|
6151
|
+
type: "asset",
|
|
6152
|
+
fileName: name,
|
|
6153
|
+
source: formatCode
|
|
6154
|
+
},
|
|
6155
|
+
watchFiles: files
|
|
6156
|
+
};
|
|
6157
|
+
}
|
|
6158
|
+
async function generateVersion(options, mode) {
|
|
6159
|
+
const pkg = await (0, import_local_pkg.getPackageInfo)(import_node_process3.default.cwd());
|
|
6160
|
+
return `console.info("Version: %c${pkg?.version}%c - ${mode === "serve" ? "runtime" : "built"} on %c${options.date}%c", "color: green;", '', "color: blue;", '')`;
|
|
6161
|
+
}
|
|
6162
|
+
async function findFolder(directoryPath, dir) {
|
|
6163
|
+
const ignore = /* @__PURE__ */ new Set(["dist", "node_modules", "playground", "example", "test", "jest", "tests", "locales", "public", ".git", ".github", ".vscode"]);
|
|
6164
|
+
const files = await import_node_fs2.promises.readdir(directoryPath);
|
|
6165
|
+
const filePaths = files.filter((item) => !ignore.has(item));
|
|
6166
|
+
let nestedFolder = "";
|
|
6167
|
+
for (const file of filePaths) {
|
|
6168
|
+
const fullFilePath = import_node_path2.default.join(directoryPath, file);
|
|
6169
|
+
const stat = await import_node_fs2.promises.stat(fullFilePath);
|
|
6170
|
+
if (stat.isDirectory()) {
|
|
6171
|
+
if (file.toLowerCase() === dir) {
|
|
6172
|
+
return fullFilePath;
|
|
6173
|
+
} else {
|
|
6174
|
+
nestedFolder = await findFolder(fullFilePath, dir);
|
|
6175
|
+
if (nestedFolder)
|
|
6176
|
+
return nestedFolder;
|
|
6177
|
+
}
|
|
6178
|
+
}
|
|
6179
|
+
}
|
|
6180
|
+
return "";
|
|
6181
|
+
}
|
|
6182
|
+
|
|
6183
|
+
// src/core/options.ts
|
|
6184
|
+
var import_utils = require("@antfu/utils");
|
|
6185
|
+
function resolveOptions(options) {
|
|
6186
|
+
const defaults = {
|
|
6187
|
+
env: {
|
|
6188
|
+
dir: "config",
|
|
6189
|
+
fileName: "manifest.js",
|
|
6190
|
+
globalName: "manifest",
|
|
6191
|
+
serve: /dev/i,
|
|
6192
|
+
build: /prod/i
|
|
6193
|
+
},
|
|
6194
|
+
compress: {
|
|
6195
|
+
outDir: "dist",
|
|
6196
|
+
ignoreBase: true
|
|
6197
|
+
}
|
|
6198
|
+
};
|
|
6199
|
+
const mergeOptions = (0, import_utils.deepMerge)(defaults, options);
|
|
6200
|
+
const formatter = new Intl.DateTimeFormat("zh-CN", {
|
|
6201
|
+
dateStyle: "full",
|
|
6202
|
+
timeStyle: "medium"
|
|
6203
|
+
});
|
|
6204
|
+
return {
|
|
6205
|
+
...mergeOptions,
|
|
6206
|
+
date: formatter.format(/* @__PURE__ */ new Date())
|
|
6207
|
+
};
|
|
6208
|
+
}
|
|
6209
|
+
|
|
6209
6210
|
// src/index.ts
|
|
6210
6211
|
var virtualEnvId = "virtual:env";
|
|
6211
6212
|
var resolvedVirtualEnvId = `\0${virtualEnvId}`;
|