powerlines 0.37.22 → 0.37.24
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/dist/api.cjs +2 -2
- package/dist/api.js +1 -1
- package/dist/astro.cjs +4 -4
- package/dist/astro.js +3 -3
- package/dist/{chunk-TKMRSLBB.js → chunk-4ENEIHKC.js} +3 -3
- package/dist/chunk-4IXGEWKB.cjs +12 -0
- package/dist/{chunk-QP6ZNNHB.js → chunk-APCE4C3B.js} +3 -3
- package/dist/{chunk-UQYTU5IK.cjs → chunk-DE5IDYUO.cjs} +4 -4
- package/dist/{chunk-2GYKL7MR.js → chunk-F7ZYHEFF.js} +106 -30
- package/dist/{chunk-VUNH6T4K.js → chunk-GYAWFCLJ.js} +3 -3
- package/dist/{chunk-P54ICZRA.cjs → chunk-IR4MEQHU.cjs} +5 -5
- package/dist/{chunk-DJLMDKJL.cjs → chunk-K4UKAUQY.cjs} +4 -4
- package/dist/{chunk-LBPHFO4S.cjs → chunk-R6UTSBYI.cjs} +106 -30
- package/dist/chunk-SPHARZBB.cjs +12 -0
- package/dist/{chunk-ED76WMZE.js → chunk-SZ2ZJ7D6.js} +3 -3
- package/dist/{chunk-3CM5DSDF.js → chunk-ZUGCJPUV.js} +3 -3
- package/dist/esbuild.cjs +6 -6
- package/dist/esbuild.js +3 -3
- package/dist/farm.cjs +3 -3
- package/dist/farm.js +2 -2
- package/dist/index.cjs +10 -10
- package/dist/index.js +2 -2
- package/dist/lib/{chunk-FJ2KUDL6.cjs → chunk-JFA7OW2I.cjs} +16 -16
- package/dist/lib/{chunk-FJ2KUDL6.cjs.map → chunk-JFA7OW2I.cjs.map} +1 -1
- package/dist/lib/{chunk-MHID6LCS.js → chunk-KFT5AKNL.js} +4 -4
- package/dist/lib/{chunk-MHID6LCS.js.map → chunk-KFT5AKNL.js.map} +1 -1
- package/dist/lib/{chunk-IHQM73EH.cjs → chunk-MEZZ76LR.cjs} +19 -17
- package/dist/lib/chunk-MEZZ76LR.cjs.map +1 -0
- package/dist/lib/{chunk-ML4OSKGQ.cjs → chunk-O33UNFHZ.cjs} +19 -19
- package/dist/lib/{chunk-ML4OSKGQ.cjs.map → chunk-O33UNFHZ.cjs.map} +1 -1
- package/dist/lib/{chunk-2SUWZWN4.cjs → chunk-PJQR4XNF.cjs} +92 -18
- package/dist/lib/chunk-PJQR4XNF.cjs.map +1 -0
- package/dist/lib/{chunk-OGSYFDDP.js → chunk-TCM3STGS.js} +4 -4
- package/dist/lib/{chunk-OGSYFDDP.js.map → chunk-TCM3STGS.js.map} +1 -1
- package/dist/lib/{chunk-NLUGEM63.js → chunk-UJ5TICQ2.js} +3 -3
- package/dist/lib/{chunk-NLUGEM63.js.map → chunk-UJ5TICQ2.js.map} +1 -1
- package/dist/lib/{chunk-VP4LPCL2.js → chunk-UUBS5Z5H.js} +92 -18
- package/dist/lib/chunk-UUBS5Z5H.js.map +1 -0
- package/dist/lib/{chunk-HATBUK22.cjs → chunk-XUWN6WZH.cjs} +6 -6
- package/dist/lib/{chunk-HATBUK22.cjs.map → chunk-XUWN6WZH.cjs.map} +1 -1
- package/dist/lib/{chunk-HRRIUJJN.js → chunk-YTT66LRY.js} +17 -15
- package/dist/lib/chunk-YTT66LRY.js.map +1 -0
- package/dist/lib/contexts/api-context.cjs +5 -5
- package/dist/lib/contexts/api-context.js +4 -4
- package/dist/lib/contexts/context.cjs +3 -3
- package/dist/lib/contexts/context.js +2 -2
- package/dist/lib/contexts/environment-context.cjs +4 -4
- package/dist/lib/contexts/environment-context.js +3 -3
- package/dist/lib/contexts/index.cjs +7 -7
- package/dist/lib/contexts/index.js +4 -4
- package/dist/lib/fs/index.cjs +2 -2
- package/dist/lib/fs/index.js +1 -1
- package/dist/lib/fs/vfs.cjs +2 -2
- package/dist/lib/fs/vfs.js +1 -1
- package/dist/lib/index.cjs +10 -10
- package/dist/lib/index.js +5 -5
- package/dist/lib/unplugin/factory.cjs +6 -6
- package/dist/lib/unplugin/factory.js +5 -5
- package/dist/lib/unplugin/index.cjs +6 -6
- package/dist/lib/unplugin/index.js +5 -5
- package/dist/next.cjs +4 -4
- package/dist/next.js +3 -3
- package/dist/nuxt.cjs +7 -7
- package/dist/nuxt.js +5 -5
- package/dist/rolldown.cjs +6 -6
- package/dist/rolldown.js +3 -3
- package/dist/rollup.cjs +3 -3
- package/dist/rollup.js +2 -2
- package/dist/rspack.cjs +3 -3
- package/dist/rspack.js +2 -2
- package/dist/tsdown.cjs +4 -4
- package/dist/tsdown.js +3 -3
- package/dist/tsup.cjs +4 -4
- package/dist/tsup.js +3 -3
- package/dist/unloader.cjs +3 -3
- package/dist/unloader.js +2 -2
- package/dist/unplugin.cjs +8 -8
- package/dist/unplugin.js +4 -4
- package/dist/vite.cjs +6 -6
- package/dist/vite.js +3 -3
- package/dist/webpack.cjs +6 -6
- package/dist/webpack.js +3 -3
- package/package.json +8 -8
- package/dist/chunk-HG62S3DW.cjs +0 -12
- package/dist/chunk-N3XGIGAC.cjs +0 -12
- package/dist/lib/chunk-2SUWZWN4.cjs.map +0 -1
- package/dist/lib/chunk-HRRIUJJN.js.map +0 -1
- package/dist/lib/chunk-IHQM73EH.cjs.map +0 -1
- package/dist/lib/chunk-VP4LPCL2.js.map +0 -1
|
@@ -1870,7 +1870,9 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
1870
1870
|
const result2 = new _VirtualFileSystem(context, fs);
|
|
1871
1871
|
if (fs._hasStorage() && fs.storage.length > 0) {
|
|
1872
1872
|
await Promise.all(fs.storage.values().map(async (file) => {
|
|
1873
|
-
|
|
1873
|
+
if (file.path && file.code) {
|
|
1874
|
+
await result2.write(file.path, file.code);
|
|
1875
|
+
}
|
|
1874
1876
|
}));
|
|
1875
1877
|
}
|
|
1876
1878
|
}
|
|
@@ -1915,19 +1917,51 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
1915
1917
|
* @returns A new virtual file system instance.
|
|
1916
1918
|
*/
|
|
1917
1919
|
static createSync(context) {
|
|
1920
|
+
context.debug("Starting virtual file system (VFS) initialization processes...");
|
|
1918
1921
|
if (!context.config.skipCache && exists.existsSync(joinPaths.joinPaths(context.dataPath, "fs.bin"))) {
|
|
1919
1922
|
const buffer$1 = buffer.readFileBufferSync(joinPaths.joinPaths(context.dataPath, "fs.bin"));
|
|
1920
1923
|
const message2 = new $__namespace.Message(buffer$1, false);
|
|
1921
1924
|
const fs = message2.getRoot(FileSystem);
|
|
1922
|
-
const
|
|
1925
|
+
const result2 = new _VirtualFileSystem(context, fs);
|
|
1923
1926
|
if (fs._hasStorage() && fs.storage.length > 0) {
|
|
1924
1927
|
fs.storage.values().map((file) => {
|
|
1925
|
-
|
|
1928
|
+
result2.writeSync(file.path, file.code);
|
|
1926
1929
|
});
|
|
1927
1930
|
}
|
|
1928
1931
|
}
|
|
1929
1932
|
const message = new $__namespace.Message();
|
|
1930
|
-
|
|
1933
|
+
const result = new _VirtualFileSystem(context, message.initRoot(FileSystem));
|
|
1934
|
+
result.#log(types.LogLevelLabel.DEBUG, "Successfully completed virtual file system (VFS) initialization.");
|
|
1935
|
+
if (result.metadata) {
|
|
1936
|
+
result.#log(types.LogLevelLabel.DEBUG, `Preparing to load ${Object.keys(result.metadata).length} previously stored metadata records...`);
|
|
1937
|
+
const entry = Object.entries(result.metadata).filter(([, meta]) => meta && meta.type === "entry").map(([path, meta]) => {
|
|
1938
|
+
if (meta.properties) {
|
|
1939
|
+
const typeDefinition = {
|
|
1940
|
+
file: path
|
|
1941
|
+
};
|
|
1942
|
+
if (isSetString.isSetString(meta.properties.name)) {
|
|
1943
|
+
typeDefinition.name = meta.properties.name;
|
|
1944
|
+
}
|
|
1945
|
+
if (isSetString.isSetString(meta.properties["input.file"]) || isSetString.isSetString(meta.properties["input.name"])) {
|
|
1946
|
+
typeDefinition.input ??= {};
|
|
1947
|
+
if (isSetString.isSetString(meta.properties["input.file"])) {
|
|
1948
|
+
typeDefinition.input.file = meta.properties["input.file"];
|
|
1949
|
+
}
|
|
1950
|
+
if (isSetString.isSetString(meta.properties["input.name"])) {
|
|
1951
|
+
typeDefinition.input.name = meta.properties["input.name"];
|
|
1952
|
+
}
|
|
1953
|
+
}
|
|
1954
|
+
if (isSetString.isSetString(meta.properties.output)) {
|
|
1955
|
+
typeDefinition.output = meta.properties.output;
|
|
1956
|
+
}
|
|
1957
|
+
return typeDefinition;
|
|
1958
|
+
}
|
|
1959
|
+
return null;
|
|
1960
|
+
}).filter(Boolean);
|
|
1961
|
+
result.#log(types.LogLevelLabel.DEBUG, `Loaded ${entry.length} entry type definitions from VFS metadata.`);
|
|
1962
|
+
context.entry = entry;
|
|
1963
|
+
}
|
|
1964
|
+
return result;
|
|
1931
1965
|
}
|
|
1932
1966
|
/**
|
|
1933
1967
|
* A map of file ids to their metadata.
|
|
@@ -1936,7 +1970,18 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
1936
1970
|
return new Proxy(this.#metadata, {
|
|
1937
1971
|
get: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop) => {
|
|
1938
1972
|
return target[this.#normalizeId(prop)];
|
|
1939
|
-
}, "get")
|
|
1973
|
+
}, "get"),
|
|
1974
|
+
set: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop, value) => {
|
|
1975
|
+
target[this.#normalizeId(prop)] = value;
|
|
1976
|
+
return true;
|
|
1977
|
+
}, "set"),
|
|
1978
|
+
deleteProperty: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop) => {
|
|
1979
|
+
delete target[this.#normalizeId(prop)];
|
|
1980
|
+
return true;
|
|
1981
|
+
}, "deleteProperty"),
|
|
1982
|
+
has: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop) => {
|
|
1983
|
+
return this.#normalizeId(prop) in target;
|
|
1984
|
+
}, "has")
|
|
1940
1985
|
});
|
|
1941
1986
|
}
|
|
1942
1987
|
/**
|
|
@@ -1946,7 +1991,18 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
1946
1991
|
return new Proxy(this.#paths, {
|
|
1947
1992
|
get: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop) => {
|
|
1948
1993
|
return target[this.#normalizePath(prop)];
|
|
1949
|
-
}, "get")
|
|
1994
|
+
}, "get"),
|
|
1995
|
+
set: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop, value) => {
|
|
1996
|
+
target[this.#normalizePath(prop)] = value;
|
|
1997
|
+
return true;
|
|
1998
|
+
}, "set"),
|
|
1999
|
+
deleteProperty: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop) => {
|
|
2000
|
+
delete target[this.#normalizePath(prop)];
|
|
2001
|
+
return true;
|
|
2002
|
+
}, "deleteProperty"),
|
|
2003
|
+
has: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop) => {
|
|
2004
|
+
return this.#normalizePath(prop) in target;
|
|
2005
|
+
}, "has")
|
|
1950
2006
|
});
|
|
1951
2007
|
}
|
|
1952
2008
|
/**
|
|
@@ -1956,7 +2012,18 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
1956
2012
|
return new Proxy(this.#paths, {
|
|
1957
2013
|
get: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop) => {
|
|
1958
2014
|
return target[this.#normalizeId(prop)];
|
|
1959
|
-
}, "get")
|
|
2015
|
+
}, "get"),
|
|
2016
|
+
set: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop, value) => {
|
|
2017
|
+
target[this.#normalizeId(prop)] = value;
|
|
2018
|
+
return true;
|
|
2019
|
+
}, "set"),
|
|
2020
|
+
deleteProperty: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop) => {
|
|
2021
|
+
delete target[this.#normalizeId(prop)];
|
|
2022
|
+
return true;
|
|
2023
|
+
}, "deleteProperty"),
|
|
2024
|
+
has: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((target, prop) => {
|
|
2025
|
+
return this.#normalizeId(prop) in target;
|
|
2026
|
+
}, "has")
|
|
1960
2027
|
});
|
|
1961
2028
|
}
|
|
1962
2029
|
/**
|
|
@@ -2396,15 +2463,22 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
2396
2463
|
async write(path, data = "", options = {}) {
|
|
2397
2464
|
const meta = options.meta ?? {};
|
|
2398
2465
|
const { relativeKey, adapter } = this.#getStorage(options.storage || path);
|
|
2466
|
+
this.#log(types.LogLevelLabel.TRACE, `Writing ${this.#normalizePath(relativeKey)} to ${adapter.name === "virtual" ? "the virtual file system" : adapter.name === "file-system" ? "the local file system" : adapter.name} (size: ${prettyBytes.prettyBytes(new buffer$1.Blob(toArray.toArray(data)).size)})`);
|
|
2399
2467
|
let code = data;
|
|
2400
|
-
|
|
2401
|
-
|
|
2468
|
+
try {
|
|
2469
|
+
if (!options.skipFormat) {
|
|
2470
|
+
code = await format(this.#normalizePath(path), data);
|
|
2471
|
+
}
|
|
2472
|
+
} catch (err) {
|
|
2473
|
+
this.#log(types.LogLevelLabel.WARN, `Failed to format file ${this.#normalizePath(path)} before writing: ${err.message}`);
|
|
2474
|
+
code = data;
|
|
2402
2475
|
}
|
|
2403
2476
|
this.#log(types.LogLevelLabel.TRACE, `Writing ${this.#normalizePath(relativeKey)} to ${adapter.name === "virtual" ? "the virtual file system" : adapter.name === "file-system" ? "the local file system" : adapter.name} (size: ${prettyBytes.prettyBytes(new buffer$1.Blob(toArray.toArray(code)).size)})`);
|
|
2404
2477
|
const id = meta.id || this.#normalizeId(relativeKey);
|
|
2405
2478
|
this.#metadata[id] = {
|
|
2406
2479
|
type: "normal",
|
|
2407
2480
|
timestamp: Date.now(),
|
|
2481
|
+
...this.#metadata[id] ?? {},
|
|
2408
2482
|
...meta
|
|
2409
2483
|
};
|
|
2410
2484
|
this.#paths[id] = this.#normalizePath(relativeKey);
|
|
@@ -2426,6 +2500,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
2426
2500
|
this.#metadata[id] = {
|
|
2427
2501
|
type: "normal",
|
|
2428
2502
|
timestamp: Date.now(),
|
|
2503
|
+
...this.#metadata[id] ?? {},
|
|
2429
2504
|
...meta
|
|
2430
2505
|
};
|
|
2431
2506
|
this.#paths[id] = this.#normalizePath(relativeKey);
|
|
@@ -2650,22 +2725,21 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
2650
2725
|
await this.remove(joinPaths.joinPaths(this.#context.dataPath, "fs.bin"));
|
|
2651
2726
|
const message = new $__namespace.Message();
|
|
2652
2727
|
const fs = message.initRoot(FileSystem);
|
|
2653
|
-
const
|
|
2654
|
-
|
|
2655
|
-
await Promise.all(paths.map(async (path, index) => {
|
|
2728
|
+
const storage = fs._initStorage(Object.keys(this.#paths).length);
|
|
2729
|
+
await Promise.all(Object.values(this.#paths).map(async (path, index) => {
|
|
2656
2730
|
const code = await this.read(path);
|
|
2657
2731
|
const fd = storage.get(index);
|
|
2658
2732
|
fd.path = path;
|
|
2659
2733
|
fd.code = code || "";
|
|
2660
2734
|
}));
|
|
2661
|
-
const ids = fs._initIds(Object.keys(this
|
|
2662
|
-
Object.entries(this
|
|
2735
|
+
const ids = fs._initIds(Object.keys(this.#ids).length);
|
|
2736
|
+
Object.entries(this.#ids).filter(([, path]) => path).forEach(([id, path], index) => {
|
|
2663
2737
|
const fileId = ids.get(index);
|
|
2664
2738
|
fileId.id = id;
|
|
2665
2739
|
fileId.path = path;
|
|
2666
2740
|
});
|
|
2667
|
-
const metadata = fs._initMetadata(Object.keys(this
|
|
2668
|
-
Object.entries(this
|
|
2741
|
+
const metadata = fs._initMetadata(Object.keys(this.#metadata).length);
|
|
2742
|
+
Object.entries(this.#metadata).filter(([, value]) => value).forEach(([id, value], index) => {
|
|
2669
2743
|
const fileMetadata = metadata.get(index);
|
|
2670
2744
|
fileMetadata.id = id;
|
|
2671
2745
|
fileMetadata.type = value.type;
|
|
@@ -3347,19 +3421,20 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
3347
3421
|
output: options.output
|
|
3348
3422
|
});
|
|
3349
3423
|
}
|
|
3350
|
-
return this.emit(code, entryPath, defu7__default.default(
|
|
3351
|
-
"name"
|
|
3352
|
-
]), {
|
|
3424
|
+
return this.emit(code, entryPath, defu7__default.default({
|
|
3353
3425
|
meta: {
|
|
3354
3426
|
type: "entry",
|
|
3355
3427
|
properties: {
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
"input.
|
|
3428
|
+
file: entryPath,
|
|
3429
|
+
name: options?.name,
|
|
3430
|
+
output: options?.output,
|
|
3431
|
+
"input.file": options?.input?.file,
|
|
3432
|
+
"input.name": options?.input?.name
|
|
3360
3433
|
}
|
|
3361
3434
|
}
|
|
3362
|
-
}
|
|
3435
|
+
}, omit.omit(options, [
|
|
3436
|
+
"name"
|
|
3437
|
+
])));
|
|
3363
3438
|
}
|
|
3364
3439
|
/**
|
|
3365
3440
|
* Synchronously resolves a entry virtual file and writes it to the VFS if it does not already exist
|
|
@@ -3378,19 +3453,20 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
3378
3453
|
output: options?.output
|
|
3379
3454
|
});
|
|
3380
3455
|
}
|
|
3381
|
-
return this.emitSync(code, entryPath, defu7__default.default(
|
|
3382
|
-
"name"
|
|
3383
|
-
]), {
|
|
3456
|
+
return this.emitSync(code, entryPath, defu7__default.default({
|
|
3384
3457
|
meta: {
|
|
3385
3458
|
type: "entry",
|
|
3386
3459
|
properties: {
|
|
3460
|
+
file: entryPath,
|
|
3387
3461
|
name: options?.name,
|
|
3388
3462
|
output: options?.output,
|
|
3389
3463
|
"input.file": options?.input?.file,
|
|
3390
3464
|
"input.name": options?.input?.name
|
|
3391
3465
|
}
|
|
3392
3466
|
}
|
|
3393
|
-
}
|
|
3467
|
+
}, omit.omit(options, [
|
|
3468
|
+
"name"
|
|
3469
|
+
])));
|
|
3394
3470
|
}
|
|
3395
3471
|
/**
|
|
3396
3472
|
* Resolves a builtin virtual file and writes it to the VFS if it does not already exist
|
|
@@ -4984,5 +5060,5 @@ exports.combineContexts = combineContexts;
|
|
|
4984
5060
|
exports.createLog = createLog;
|
|
4985
5061
|
exports.extendLog = extendLog;
|
|
4986
5062
|
exports.isUnpluginBuilderVariant = isUnpluginBuilderVariant;
|
|
4987
|
-
//# sourceMappingURL=chunk-
|
|
4988
|
-
//# sourceMappingURL=chunk-
|
|
5063
|
+
//# sourceMappingURL=chunk-R6UTSBYI.cjs.map
|
|
5064
|
+
//# sourceMappingURL=chunk-R6UTSBYI.cjs.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkIR4MEQHU_cjs = require('./chunk-IR4MEQHU.cjs');
|
|
4
|
+
var unplugin = require('unplugin');
|
|
5
|
+
|
|
6
|
+
var rolldown = unplugin.createRolldownPlugin(chunkIR4MEQHU_cjs.createUnpluginFactory("rolldown"));
|
|
7
|
+
var rolldown_default = rolldown;
|
|
8
|
+
|
|
9
|
+
exports.rolldown = rolldown;
|
|
10
|
+
exports.rolldown_default = rolldown_default;
|
|
11
|
+
//# sourceMappingURL=chunk-SPHARZBB.cjs.map
|
|
12
|
+
//# sourceMappingURL=chunk-SPHARZBB.cjs.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { createUnpluginFactory } from './chunk-
|
|
1
|
+
import { createUnpluginFactory } from './chunk-APCE4C3B.js';
|
|
2
2
|
import { createRolldownPlugin } from 'unplugin';
|
|
3
3
|
|
|
4
4
|
var rolldown = createRolldownPlugin(createUnpluginFactory("rolldown"));
|
|
5
5
|
var rolldown_default = rolldown;
|
|
6
6
|
|
|
7
7
|
export { rolldown, rolldown_default };
|
|
8
|
-
//# sourceMappingURL=chunk-
|
|
9
|
-
//# sourceMappingURL=chunk-
|
|
8
|
+
//# sourceMappingURL=chunk-SZ2ZJ7D6.js.map
|
|
9
|
+
//# sourceMappingURL=chunk-SZ2ZJ7D6.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { extractESBuildConfig } from './chunk-BGBDDKML.js';
|
|
2
|
-
import { createUnpluginFactory } from './chunk-
|
|
2
|
+
import { createUnpluginFactory } from './chunk-APCE4C3B.js';
|
|
3
3
|
import { __name } from './chunk-7QVYU63E.js';
|
|
4
4
|
import { isUndefined } from '@stryke/type-checks/is-undefined';
|
|
5
5
|
import { createEsbuildPlugin } from 'unplugin';
|
|
@@ -29,5 +29,5 @@ var esbuild = createEsbuildPlugin(createUnpluginFactory("esbuild", (api, plugin)
|
|
|
29
29
|
var esbuild_default = esbuild;
|
|
30
30
|
|
|
31
31
|
export { esbuild, esbuild_default };
|
|
32
|
-
//# sourceMappingURL=chunk-
|
|
33
|
-
//# sourceMappingURL=chunk-
|
|
32
|
+
//# sourceMappingURL=chunk-ZUGCJPUV.js.map
|
|
33
|
+
//# sourceMappingURL=chunk-ZUGCJPUV.js.map
|
package/dist/esbuild.cjs
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var chunkK4UKAUQY_cjs = require('./chunk-K4UKAUQY.cjs');
|
|
6
6
|
require('./chunk-SE3RCXWI.cjs');
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
7
|
+
require('./chunk-IR4MEQHU.cjs');
|
|
8
|
+
require('./chunk-R6UTSBYI.cjs');
|
|
9
9
|
require('./chunk-B6DVCLP5.cjs');
|
|
10
10
|
require('./chunk-V5WOGN7O.cjs');
|
|
11
11
|
require('./chunk-Z6ARQDHR.cjs');
|
|
@@ -15,15 +15,15 @@ require('./chunk-PK6SKIKE.cjs');
|
|
|
15
15
|
|
|
16
16
|
Object.defineProperty(exports, "default", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkK4UKAUQY_cjs.esbuild_default; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "esbuild", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkK4UKAUQY_cjs.esbuild; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "module.exports", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkK4UKAUQY_cjs.esbuild; }
|
|
27
27
|
});
|
|
28
28
|
//# sourceMappingURL=esbuild.cjs.map
|
|
29
29
|
//# sourceMappingURL=esbuild.cjs.map
|
package/dist/esbuild.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { esbuild_default as default, esbuild, esbuild as "module.exports" } from './chunk-
|
|
1
|
+
export { esbuild_default as default, esbuild, esbuild as "module.exports" } from './chunk-ZUGCJPUV.js';
|
|
2
2
|
import './chunk-BGBDDKML.js';
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
import './chunk-APCE4C3B.js';
|
|
4
|
+
import './chunk-F7ZYHEFF.js';
|
|
5
5
|
import './chunk-PQXP7XQK.js';
|
|
6
6
|
import './chunk-NITQ5IYP.js';
|
|
7
7
|
import './chunk-2MYPFASJ.js';
|
package/dist/farm.cjs
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('./chunk-
|
|
5
|
+
var chunkIR4MEQHU_cjs = require('./chunk-IR4MEQHU.cjs');
|
|
6
|
+
require('./chunk-R6UTSBYI.cjs');
|
|
7
7
|
require('./chunk-B6DVCLP5.cjs');
|
|
8
8
|
require('./chunk-V5WOGN7O.cjs');
|
|
9
9
|
require('./chunk-Z6ARQDHR.cjs');
|
|
10
10
|
require('./chunk-PK6SKIKE.cjs');
|
|
11
11
|
var unplugin = require('unplugin');
|
|
12
12
|
|
|
13
|
-
var farm = unplugin.createFarmPlugin(
|
|
13
|
+
var farm = unplugin.createFarmPlugin(chunkIR4MEQHU_cjs.createUnpluginFactory("farm"));
|
|
14
14
|
var farm_default = farm;
|
|
15
15
|
|
|
16
16
|
exports.default = farm_default;
|
package/dist/farm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createUnpluginFactory } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
import { createUnpluginFactory } from './chunk-APCE4C3B.js';
|
|
2
|
+
import './chunk-F7ZYHEFF.js';
|
|
3
3
|
import './chunk-PQXP7XQK.js';
|
|
4
4
|
import './chunk-NITQ5IYP.js';
|
|
5
5
|
import './chunk-2MYPFASJ.js';
|
package/dist/index.cjs
CHANGED
|
@@ -13,7 +13,7 @@ require('./chunk-4JCNAKOE.cjs');
|
|
|
13
13
|
require('./chunk-D6GGZQLC.cjs');
|
|
14
14
|
var chunkA7AUGAHH_cjs = require('./chunk-A7AUGAHH.cjs');
|
|
15
15
|
var chunk42ZHOCZJ_cjs = require('./chunk-42ZHOCZJ.cjs');
|
|
16
|
-
var
|
|
16
|
+
var chunkR6UTSBYI_cjs = require('./chunk-R6UTSBYI.cjs');
|
|
17
17
|
var chunkB6DVCLP5_cjs = require('./chunk-B6DVCLP5.cjs');
|
|
18
18
|
var chunkV5WOGN7O_cjs = require('./chunk-V5WOGN7O.cjs');
|
|
19
19
|
var chunkZ6ARQDHR_cjs = require('./chunk-Z6ARQDHR.cjs');
|
|
@@ -27,10 +27,10 @@ chunkPK6SKIKE_cjs.__name(defineConfig, "defineConfig");
|
|
|
27
27
|
async function createPowerlines(options = {}) {
|
|
28
28
|
options.root ??= process.cwd();
|
|
29
29
|
const workspaceRoot = getWorkspaceRoot.getWorkspaceRoot(options.root);
|
|
30
|
-
return
|
|
30
|
+
return chunkR6UTSBYI_cjs.PowerlinesAPI.from(workspaceRoot, options);
|
|
31
31
|
}
|
|
32
32
|
chunkPK6SKIKE_cjs.__name(createPowerlines, "createPowerlines");
|
|
33
|
-
var index_default =
|
|
33
|
+
var index_default = chunkR6UTSBYI_cjs.PowerlinesAPI;
|
|
34
34
|
|
|
35
35
|
Object.defineProperty(exports, "STORAGE_PRESETS", {
|
|
36
36
|
enumerable: true,
|
|
@@ -50,31 +50,31 @@ Object.defineProperty(exports, "HOOKS_LIST_ORDERS", {
|
|
|
50
50
|
});
|
|
51
51
|
Object.defineProperty(exports, "FileId", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkR6UTSBYI_cjs.FileId; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "FileMetadata", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkR6UTSBYI_cjs.FileMetadata; }
|
|
58
58
|
});
|
|
59
59
|
Object.defineProperty(exports, "FileMetadata_KeyValuePair", {
|
|
60
60
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunkR6UTSBYI_cjs.FileMetadata_KeyValuePair; }
|
|
62
62
|
});
|
|
63
63
|
Object.defineProperty(exports, "FileStorage", {
|
|
64
64
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunkR6UTSBYI_cjs.FileStorage; }
|
|
66
66
|
});
|
|
67
67
|
Object.defineProperty(exports, "FileSystem", {
|
|
68
68
|
enumerable: true,
|
|
69
|
-
get: function () { return
|
|
69
|
+
get: function () { return chunkR6UTSBYI_cjs.FileSystem; }
|
|
70
70
|
});
|
|
71
71
|
Object.defineProperty(exports, "PowerlinesAPI", {
|
|
72
72
|
enumerable: true,
|
|
73
|
-
get: function () { return
|
|
73
|
+
get: function () { return chunkR6UTSBYI_cjs.PowerlinesAPI; }
|
|
74
74
|
});
|
|
75
75
|
Object.defineProperty(exports, "_capnpFileId", {
|
|
76
76
|
enumerable: true,
|
|
77
|
-
get: function () { return
|
|
77
|
+
get: function () { return chunkR6UTSBYI_cjs._capnpFileId; }
|
|
78
78
|
});
|
|
79
79
|
Object.defineProperty(exports, "KNOWN_PLUGIN_FIELDS", {
|
|
80
80
|
enumerable: true,
|
package/dist/index.js
CHANGED
|
@@ -9,8 +9,8 @@ import './chunk-OYASPHNL.js';
|
|
|
9
9
|
import './chunk-OD4BINRW.js';
|
|
10
10
|
export { STORAGE_PRESETS, __VFS_PATCH__, __VFS_REVERT__ } from './chunk-KXRVVFNK.js';
|
|
11
11
|
export { HOOKS_LIST_ORDERS } from './chunk-CCJQBJKQ.js';
|
|
12
|
-
import { PowerlinesAPI } from './chunk-
|
|
13
|
-
export { FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, PowerlinesAPI, _capnpFileId } from './chunk-
|
|
12
|
+
import { PowerlinesAPI } from './chunk-F7ZYHEFF.js';
|
|
13
|
+
export { FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, PowerlinesAPI, _capnpFileId } from './chunk-F7ZYHEFF.js';
|
|
14
14
|
export { KNOWN_PLUGIN_FIELDS, PLUGIN_HOOKS_FIELDS, PLUGIN_NON_HOOK_FIELDS } from './chunk-PQXP7XQK.js';
|
|
15
15
|
export { BUILDER_VARIANTS, UNPLUGIN_BUILDER_VARIANTS } from './chunk-NITQ5IYP.js';
|
|
16
16
|
export { SUPPORTED_COMMANDS } from './chunk-2MYPFASJ.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkMFC7UJHT_cjs = require('./chunk-MFC7UJHT.cjs');
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var chunkXUWN6WZH_cjs = require('./chunk-XUWN6WZH.cjs');
|
|
5
|
+
var chunkMEZZ76LR_cjs = require('./chunk-MEZZ76LR.cjs');
|
|
6
6
|
var chunkBJGMF356_cjs = require('./chunk-BJGMF356.cjs');
|
|
7
7
|
var chunkZWLSNYIN_cjs = require('./chunk-ZWLSNYIN.cjs');
|
|
8
8
|
var chunkQHTL2U3L_cjs = require('./chunk-QHTL2U3L.cjs');
|
|
@@ -488,7 +488,7 @@ var PowerlinesAPI = class _PowerlinesAPI {
|
|
|
488
488
|
* @returns A new instance of the Powerlines API
|
|
489
489
|
*/
|
|
490
490
|
static async from(workspaceRoot, config) {
|
|
491
|
-
const api = new _PowerlinesAPI(await
|
|
491
|
+
const api = new _PowerlinesAPI(await chunkXUWN6WZH_cjs.PowerlinesAPIContext.from(workspaceRoot, config));
|
|
492
492
|
api.#context.$$internal = {
|
|
493
493
|
api,
|
|
494
494
|
addPlugin: api.#addPlugin.bind(api),
|
|
@@ -1006,8 +1006,8 @@ ${formatTypes(types$1)}
|
|
|
1006
1006
|
if (isPromise.isPromiseLike(config)) {
|
|
1007
1007
|
awaited = await Promise.resolve(config);
|
|
1008
1008
|
}
|
|
1009
|
-
if (!
|
|
1010
|
-
const invalid =
|
|
1009
|
+
if (!chunkMEZZ76LR_cjs.isPluginConfig(awaited)) {
|
|
1010
|
+
const invalid = chunkMEZZ76LR_cjs.findInvalidPluginConfig(awaited);
|
|
1011
1011
|
throw new Error(`Invalid ${invalid && invalid.length > 1 ? "plugins" : "plugin"} specified in the configuration - ${invalid && invalid.length > 0 ? JSON.stringify(awaited) : invalid?.join("\n\n")}
|
|
1012
1012
|
|
|
1013
1013
|
Please ensure the value is one of the following:
|
|
@@ -1019,7 +1019,7 @@ Please ensure the value is one of the following:
|
|
|
1019
1019
|
- an array of plugins or plugin configurations`);
|
|
1020
1020
|
}
|
|
1021
1021
|
let plugins;
|
|
1022
|
-
if (
|
|
1022
|
+
if (chunkMEZZ76LR_cjs.isPlugin(awaited)) {
|
|
1023
1023
|
plugins = [
|
|
1024
1024
|
awaited
|
|
1025
1025
|
];
|
|
@@ -1032,9 +1032,9 @@ Please ensure the value is one of the following:
|
|
|
1032
1032
|
} else {
|
|
1033
1033
|
plugins = toArray.toArray(resolved);
|
|
1034
1034
|
}
|
|
1035
|
-
} else if (Array.isArray(awaited) && awaited.every(
|
|
1035
|
+
} else if (Array.isArray(awaited) && awaited.every(chunkMEZZ76LR_cjs.isPlugin)) {
|
|
1036
1036
|
plugins = awaited;
|
|
1037
|
-
} else if (Array.isArray(awaited) && awaited.every(
|
|
1037
|
+
} else if (Array.isArray(awaited) && awaited.every(chunkMEZZ76LR_cjs.isPluginConfig)) {
|
|
1038
1038
|
plugins = [];
|
|
1039
1039
|
for (const pluginConfig of awaited) {
|
|
1040
1040
|
const initialized = await this.#initPlugin(pluginConfig);
|
|
@@ -1042,10 +1042,10 @@ Please ensure the value is one of the following:
|
|
|
1042
1042
|
plugins.push(...initialized);
|
|
1043
1043
|
}
|
|
1044
1044
|
}
|
|
1045
|
-
} else if (
|
|
1045
|
+
} else if (chunkMEZZ76LR_cjs.isPluginConfigTuple(awaited) || chunkMEZZ76LR_cjs.isPluginConfigObject(awaited)) {
|
|
1046
1046
|
let pluginConfig;
|
|
1047
1047
|
let pluginOptions;
|
|
1048
|
-
if (
|
|
1048
|
+
if (chunkMEZZ76LR_cjs.isPluginConfigTuple(awaited)) {
|
|
1049
1049
|
pluginConfig = awaited[0];
|
|
1050
1050
|
pluginOptions = awaited?.length === 2 ? awaited[1] : void 0;
|
|
1051
1051
|
} else {
|
|
@@ -1061,21 +1061,21 @@ Please ensure the value is one of the following:
|
|
|
1061
1061
|
}
|
|
1062
1062
|
} else if (isFunction.isFunction(pluginConfig)) {
|
|
1063
1063
|
plugins = toArray.toArray(await Promise.resolve(pluginConfig(pluginOptions)));
|
|
1064
|
-
} else if (Array.isArray(pluginConfig) && pluginConfig.every(
|
|
1064
|
+
} else if (Array.isArray(pluginConfig) && pluginConfig.every(chunkMEZZ76LR_cjs.isPlugin)) {
|
|
1065
1065
|
plugins = pluginConfig;
|
|
1066
|
-
} else if (
|
|
1066
|
+
} else if (chunkMEZZ76LR_cjs.isPlugin(pluginConfig)) {
|
|
1067
1067
|
plugins = toArray.toArray(pluginConfig);
|
|
1068
1068
|
}
|
|
1069
1069
|
}
|
|
1070
1070
|
if (!plugins) {
|
|
1071
1071
|
throw new Error(`The plugin configuration ${JSON.stringify(awaited)} is invalid. This configuration must point to a valid Powerlines plugin module.`);
|
|
1072
1072
|
}
|
|
1073
|
-
if (plugins.length > 0 && !plugins.every(
|
|
1073
|
+
if (plugins.length > 0 && !plugins.every(chunkMEZZ76LR_cjs.isPlugin)) {
|
|
1074
1074
|
throw new Error(`The plugin option ${JSON.stringify(plugins)} does not export a valid module. This configuration must point to a valid Powerlines plugin module.`);
|
|
1075
1075
|
}
|
|
1076
1076
|
const result = [];
|
|
1077
1077
|
for (const plugin of plugins) {
|
|
1078
|
-
if (
|
|
1078
|
+
if (chunkMEZZ76LR_cjs.checkDedupe(plugin, this.context.plugins)) {
|
|
1079
1079
|
this.context.log(types.LogLevelLabel.TRACE, `Duplicate ${chalk3__default.default.bold.cyanBright(plugin.name)} plugin dependency detected - Skipping initialization.`);
|
|
1080
1080
|
} else {
|
|
1081
1081
|
result.push(plugin);
|
|
@@ -1246,5 +1246,5 @@ function createUnpluginFactory(variant, decorate) {
|
|
|
1246
1246
|
chunkPK6SKIKE_cjs.__name(createUnpluginFactory, "createUnpluginFactory");
|
|
1247
1247
|
|
|
1248
1248
|
exports.createUnpluginFactory = createUnpluginFactory;
|
|
1249
|
-
//# sourceMappingURL=chunk-
|
|
1250
|
-
//# sourceMappingURL=chunk-
|
|
1249
|
+
//# sourceMappingURL=chunk-JFA7OW2I.cjs.map
|
|
1250
|
+
//# sourceMappingURL=chunk-JFA7OW2I.cjs.map
|