powerlines 0.37.53 → 0.37.54
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-DPLZABXI.js → chunk-4DWSMUC2.js} +3 -3
- package/dist/chunk-5WCKSLT7.cjs +12 -0
- package/dist/{chunk-2CFDUVKT.js → chunk-C25WKEO2.js} +3 -3
- package/dist/{chunk-JTMNFP4L.js → chunk-DKYPRXSW.js} +3 -3
- package/dist/{chunk-GMAZZ3IG.cjs → chunk-DMSPAYHA.cjs} +4 -4
- package/dist/{chunk-ILQD2JJ3.cjs → chunk-EHGIUEFJ.cjs} +4 -4
- package/dist/{chunk-MQBIQICR.js → chunk-FBPHSZXY.js} +3 -3
- package/dist/{chunk-B4NNABMD.cjs → chunk-G5QXE5QH.cjs} +5 -5
- package/dist/chunk-KE67B233.cjs +12 -0
- package/dist/{chunk-CUAOWSR7.cjs → chunk-PTMMULXX.cjs} +4 -4
- package/dist/{chunk-NLMIRB6Q.js → chunk-RPEWOQOR.js} +3 -3
- package/dist/{chunk-HO5PC45I.js → chunk-WVLRUTAI.js} +4 -4
- 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-DURA23ST.cjs → chunk-4DLYGQZC.cjs} +6 -6
- package/dist/lib/{chunk-DURA23ST.cjs.map → chunk-4DLYGQZC.cjs.map} +1 -1
- package/dist/lib/{chunk-XKEHVYDR.cjs → chunk-5RGBODNU.cjs} +3 -3
- package/dist/lib/chunk-5RGBODNU.cjs.map +1 -0
- package/dist/lib/{chunk-54W6CDDJ.cjs → chunk-6CXIQSZI.cjs} +19 -19
- package/dist/lib/{chunk-54W6CDDJ.cjs.map → chunk-6CXIQSZI.cjs.map} +1 -1
- package/dist/lib/{chunk-2XCDEMMO.cjs → chunk-C2SIHISU.cjs} +4 -4
- package/dist/lib/{chunk-2XCDEMMO.cjs.map → chunk-C2SIHISU.cjs.map} +1 -1
- package/dist/lib/{chunk-DPGJOEXL.js → chunk-CJI6MHJH.js} +3 -3
- package/dist/lib/{chunk-DPGJOEXL.js.map → chunk-CJI6MHJH.js.map} +1 -1
- package/dist/lib/{chunk-RWOQGHJP.js → chunk-DSQDA3AX.js} +3 -3
- package/dist/lib/{chunk-RWOQGHJP.js.map → chunk-DSQDA3AX.js.map} +1 -1
- package/dist/lib/{chunk-DF6BTQY5.cjs → chunk-DUROA7IY.cjs} +17 -17
- package/dist/lib/{chunk-DF6BTQY5.cjs.map → chunk-DUROA7IY.cjs.map} +1 -1
- package/dist/lib/{chunk-VZCNKJBT.js → chunk-GQNZENVF.js} +3 -3
- package/dist/lib/{chunk-VZCNKJBT.js.map → chunk-GQNZENVF.js.map} +1 -1
- package/dist/lib/{chunk-2LZ2KCSP.js → chunk-O3TMMYSA.js} +3 -3
- package/dist/lib/chunk-O3TMMYSA.js.map +1 -0
- package/dist/lib/{chunk-O2HWFNL5.js → chunk-P5JP3DHH.js} +5 -5
- package/dist/lib/{chunk-O2HWFNL5.js.map → chunk-P5JP3DHH.js.map} +1 -1
- package/dist/lib/{chunk-JVQJY2N3.js → chunk-S52XMZ4T.js} +4 -4
- package/dist/lib/{chunk-JVQJY2N3.js.map → chunk-S52XMZ4T.js.map} +1 -1
- package/dist/lib/{chunk-G6TY5O4F.cjs → chunk-XOLWPP4K.cjs} +5 -5
- package/dist/lib/{chunk-G6TY5O4F.cjs.map → chunk-XOLWPP4K.cjs.map} +1 -1
- package/dist/lib/contexts/api-context.cjs +6 -6
- package/dist/lib/contexts/api-context.js +5 -5
- package/dist/lib/contexts/context.cjs +4 -4
- package/dist/lib/contexts/context.js +3 -3
- package/dist/lib/contexts/environment-context.cjs +5 -5
- package/dist/lib/contexts/environment-context.js +4 -4
- package/dist/lib/contexts/index.cjs +8 -8
- package/dist/lib/contexts/index.js +5 -5
- package/dist/lib/fs/index.cjs +3 -3
- package/dist/lib/fs/index.js +2 -2
- package/dist/lib/fs/storage/file-system.cjs +2 -2
- package/dist/lib/fs/storage/file-system.js +1 -1
- package/dist/lib/fs/storage/index.cjs +2 -2
- package/dist/lib/fs/storage/index.js +1 -1
- package/dist/lib/fs/vfs.cjs +3 -3
- package/dist/lib/fs/vfs.js +2 -2
- package/dist/lib/index.cjs +11 -11
- package/dist/lib/index.js +6 -6
- package/dist/lib/unplugin/factory.cjs +7 -7
- package/dist/lib/unplugin/factory.js +6 -6
- package/dist/lib/unplugin/index.cjs +7 -7
- package/dist/lib/unplugin/index.js +6 -6
- package/dist/next.cjs +4 -4
- package/dist/next.js +3 -3
- package/dist/nuxt.cjs +8 -8
- package/dist/nuxt.js +4 -4
- 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 +2 -2
- package/dist/chunk-MJ6VMXPE.cjs +0 -12
- package/dist/chunk-SFQQQYGC.cjs +0 -12
- package/dist/lib/chunk-2LZ2KCSP.js.map +0 -1
- package/dist/lib/chunk-XKEHVYDR.cjs.map +0 -1
package/dist/rolldown.cjs
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
5
|
+
var chunk5WCKSLT7_cjs = require('./chunk-5WCKSLT7.cjs');
|
|
6
|
+
require('./chunk-G5QXE5QH.cjs');
|
|
7
|
+
require('./chunk-DMSPAYHA.cjs');
|
|
8
8
|
require('./chunk-B6DVCLP5.cjs');
|
|
9
9
|
require('./chunk-V5WOGN7O.cjs');
|
|
10
10
|
require('./chunk-Z6ARQDHR.cjs');
|
|
@@ -14,15 +14,15 @@ require('./chunk-PK6SKIKE.cjs');
|
|
|
14
14
|
|
|
15
15
|
Object.defineProperty(exports, "default", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunk5WCKSLT7_cjs.rolldown_default; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "module.exports", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunk5WCKSLT7_cjs.rolldown; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "rolldown", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunk5WCKSLT7_cjs.rolldown; }
|
|
26
26
|
});
|
|
27
27
|
//# sourceMappingURL=rolldown.cjs.map
|
|
28
28
|
//# sourceMappingURL=rolldown.cjs.map
|
package/dist/rolldown.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { rolldown_default as default, rolldown as "module.exports", rolldown } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
export { rolldown_default as default, rolldown as "module.exports", rolldown } from './chunk-RPEWOQOR.js';
|
|
2
|
+
import './chunk-4DWSMUC2.js';
|
|
3
|
+
import './chunk-WVLRUTAI.js';
|
|
4
4
|
import './chunk-PQXP7XQK.js';
|
|
5
5
|
import './chunk-NITQ5IYP.js';
|
|
6
6
|
import './chunk-2MYPFASJ.js';
|
package/dist/rollup.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 chunkG5QXE5QH_cjs = require('./chunk-G5QXE5QH.cjs');
|
|
6
|
+
require('./chunk-DMSPAYHA.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 rollup = unplugin.createRollupPlugin(
|
|
13
|
+
var rollup = unplugin.createRollupPlugin(chunkG5QXE5QH_cjs.createUnpluginFactory("rollup"));
|
|
14
14
|
var rollup_default = rollup;
|
|
15
15
|
|
|
16
16
|
exports.default = rollup_default;
|
package/dist/rollup.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createUnpluginFactory } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
import { createUnpluginFactory } from './chunk-4DWSMUC2.js';
|
|
2
|
+
import './chunk-WVLRUTAI.js';
|
|
3
3
|
import './chunk-PQXP7XQK.js';
|
|
4
4
|
import './chunk-NITQ5IYP.js';
|
|
5
5
|
import './chunk-2MYPFASJ.js';
|
package/dist/rspack.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 chunkG5QXE5QH_cjs = require('./chunk-G5QXE5QH.cjs');
|
|
6
|
+
require('./chunk-DMSPAYHA.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 rspack = unplugin.createRspackPlugin(
|
|
13
|
+
var rspack = unplugin.createRspackPlugin(chunkG5QXE5QH_cjs.createUnpluginFactory("rspack"));
|
|
14
14
|
var rspack_default = rspack;
|
|
15
15
|
|
|
16
16
|
exports.default = rspack_default;
|
package/dist/rspack.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createUnpluginFactory } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
import { createUnpluginFactory } from './chunk-4DWSMUC2.js';
|
|
2
|
+
import './chunk-WVLRUTAI.js';
|
|
3
3
|
import './chunk-PQXP7XQK.js';
|
|
4
4
|
import './chunk-NITQ5IYP.js';
|
|
5
5
|
import './chunk-2MYPFASJ.js';
|
package/dist/tsdown.cjs
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
5
|
+
var chunk5WCKSLT7_cjs = require('./chunk-5WCKSLT7.cjs');
|
|
6
|
+
require('./chunk-G5QXE5QH.cjs');
|
|
7
|
+
require('./chunk-DMSPAYHA.cjs');
|
|
8
8
|
require('./chunk-B6DVCLP5.cjs');
|
|
9
9
|
require('./chunk-V5WOGN7O.cjs');
|
|
10
10
|
require('./chunk-Z6ARQDHR.cjs');
|
|
@@ -42,7 +42,7 @@ function tsdown(options = {}) {
|
|
|
42
42
|
...options,
|
|
43
43
|
entry: options.entry,
|
|
44
44
|
plugins: [
|
|
45
|
-
|
|
45
|
+
chunk5WCKSLT7_cjs.rolldown_default({
|
|
46
46
|
name: options.name,
|
|
47
47
|
root: options.cwd,
|
|
48
48
|
output: {
|
package/dist/tsdown.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { rolldown_default } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
import { rolldown_default } from './chunk-RPEWOQOR.js';
|
|
2
|
+
import './chunk-4DWSMUC2.js';
|
|
3
|
+
import './chunk-WVLRUTAI.js';
|
|
4
4
|
import './chunk-PQXP7XQK.js';
|
|
5
5
|
import './chunk-NITQ5IYP.js';
|
|
6
6
|
import './chunk-2MYPFASJ.js';
|
package/dist/tsup.cjs
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var chunkPTMMULXX_cjs = require('./chunk-PTMMULXX.cjs');
|
|
6
6
|
require('./chunk-MKIL6OVG.cjs');
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
7
|
+
require('./chunk-G5QXE5QH.cjs');
|
|
8
|
+
require('./chunk-DMSPAYHA.cjs');
|
|
9
9
|
require('./chunk-B6DVCLP5.cjs');
|
|
10
10
|
require('./chunk-V5WOGN7O.cjs');
|
|
11
11
|
require('./chunk-Z6ARQDHR.cjs');
|
|
@@ -16,7 +16,7 @@ function tsup(options = {}) {
|
|
|
16
16
|
return {
|
|
17
17
|
...options,
|
|
18
18
|
esbuildPlugins: [
|
|
19
|
-
|
|
19
|
+
chunkPTMMULXX_cjs.esbuild_default({
|
|
20
20
|
output: {
|
|
21
21
|
outputPath: options.outDir,
|
|
22
22
|
format: options.format
|
package/dist/tsup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { esbuild_default } from './chunk-
|
|
1
|
+
import { esbuild_default } from './chunk-C25WKEO2.js';
|
|
2
2
|
import './chunk-BNVPJWSG.js';
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
import './chunk-4DWSMUC2.js';
|
|
4
|
+
import './chunk-WVLRUTAI.js';
|
|
5
5
|
import './chunk-PQXP7XQK.js';
|
|
6
6
|
import './chunk-NITQ5IYP.js';
|
|
7
7
|
import './chunk-2MYPFASJ.js';
|
package/dist/unloader.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 chunkG5QXE5QH_cjs = require('./chunk-G5QXE5QH.cjs');
|
|
6
|
+
require('./chunk-DMSPAYHA.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 unloader = unplugin.createUnloaderPlugin(
|
|
13
|
+
var unloader = unplugin.createUnloaderPlugin(chunkG5QXE5QH_cjs.createUnpluginFactory("unloader"));
|
|
14
14
|
var unloader_default = unloader;
|
|
15
15
|
|
|
16
16
|
exports.default = unloader_default;
|
package/dist/unloader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createUnpluginFactory } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
import { createUnpluginFactory } from './chunk-4DWSMUC2.js';
|
|
2
|
+
import './chunk-WVLRUTAI.js';
|
|
3
3
|
import './chunk-PQXP7XQK.js';
|
|
4
4
|
import './chunk-NITQ5IYP.js';
|
|
5
5
|
import './chunk-2MYPFASJ.js';
|
package/dist/unplugin.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkG5QXE5QH_cjs = require('./chunk-G5QXE5QH.cjs');
|
|
4
|
+
var chunkDMSPAYHA_cjs = require('./chunk-DMSPAYHA.cjs');
|
|
5
5
|
require('./chunk-B6DVCLP5.cjs');
|
|
6
6
|
require('./chunk-V5WOGN7O.cjs');
|
|
7
7
|
require('./chunk-Z6ARQDHR.cjs');
|
|
@@ -16,7 +16,7 @@ function createUnplugin(context) {
|
|
|
16
16
|
const ctx = context;
|
|
17
17
|
unplugin.setParseImpl(ctx.parse);
|
|
18
18
|
return () => {
|
|
19
|
-
const log =
|
|
19
|
+
const log = chunkDMSPAYHA_cjs.extendLog(ctx.log, "unplugin");
|
|
20
20
|
log(types.LogLevelLabel.DEBUG, "Initializing Unplugin");
|
|
21
21
|
try {
|
|
22
22
|
async function buildStart() {
|
|
@@ -105,8 +105,8 @@ export * from "${isString.isString(resolved) ? resolved : resolved.id}";
|
|
|
105
105
|
async function transform(code, id) {
|
|
106
106
|
let transformed = code;
|
|
107
107
|
for (const hook of ctx.$$internal.environment.selectHooks("transform")) {
|
|
108
|
-
const result = await hook.handler.apply(
|
|
109
|
-
|
|
108
|
+
const result = await hook.handler.apply(chunkDMSPAYHA_cjs.combineContexts(ctx, this), [
|
|
109
|
+
chunkG5QXE5QH_cjs.getString(transformed),
|
|
110
110
|
id
|
|
111
111
|
]);
|
|
112
112
|
if (result) {
|
|
@@ -171,15 +171,15 @@ chunkPK6SKIKE_cjs.__name(createUnplugin, "createUnplugin");
|
|
|
171
171
|
|
|
172
172
|
Object.defineProperty(exports, "createUnpluginFactory", {
|
|
173
173
|
enumerable: true,
|
|
174
|
-
get: function () { return
|
|
174
|
+
get: function () { return chunkG5QXE5QH_cjs.createUnpluginFactory; }
|
|
175
175
|
});
|
|
176
176
|
Object.defineProperty(exports, "combineContexts", {
|
|
177
177
|
enumerable: true,
|
|
178
|
-
get: function () { return
|
|
178
|
+
get: function () { return chunkDMSPAYHA_cjs.combineContexts; }
|
|
179
179
|
});
|
|
180
180
|
Object.defineProperty(exports, "isUnpluginBuilderVariant", {
|
|
181
181
|
enumerable: true,
|
|
182
|
-
get: function () { return
|
|
182
|
+
get: function () { return chunkDMSPAYHA_cjs.isUnpluginBuilderVariant; }
|
|
183
183
|
});
|
|
184
184
|
exports.createUnplugin = createUnplugin;
|
|
185
185
|
//# sourceMappingURL=unplugin.cjs.map
|
package/dist/unplugin.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getString } from './chunk-
|
|
2
|
-
export { createUnpluginFactory } from './chunk-
|
|
3
|
-
import { extendLog, combineContexts } from './chunk-
|
|
4
|
-
export { combineContexts, isUnpluginBuilderVariant } from './chunk-
|
|
1
|
+
import { getString } from './chunk-4DWSMUC2.js';
|
|
2
|
+
export { createUnpluginFactory } from './chunk-4DWSMUC2.js';
|
|
3
|
+
import { extendLog, combineContexts } from './chunk-WVLRUTAI.js';
|
|
4
|
+
export { combineContexts, isUnpluginBuilderVariant } from './chunk-WVLRUTAI.js';
|
|
5
5
|
import './chunk-PQXP7XQK.js';
|
|
6
6
|
import './chunk-NITQ5IYP.js';
|
|
7
7
|
import './chunk-2MYPFASJ.js';
|
package/dist/vite.cjs
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var chunkEHGIUEFJ_cjs = require('./chunk-EHGIUEFJ.cjs');
|
|
6
6
|
require('./chunk-MKIL6OVG.cjs');
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
7
|
+
require('./chunk-G5QXE5QH.cjs');
|
|
8
|
+
require('./chunk-DMSPAYHA.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 chunkEHGIUEFJ_cjs.vite_default; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "module.exports", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkEHGIUEFJ_cjs.vite; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "vite", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkEHGIUEFJ_cjs.vite; }
|
|
27
27
|
});
|
|
28
28
|
//# sourceMappingURL=vite.cjs.map
|
|
29
29
|
//# sourceMappingURL=vite.cjs.map
|
package/dist/vite.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { vite_default as default, vite as "module.exports", vite } from './chunk-
|
|
1
|
+
export { vite_default as default, vite as "module.exports", vite } from './chunk-FBPHSZXY.js';
|
|
2
2
|
import './chunk-BNVPJWSG.js';
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
import './chunk-4DWSMUC2.js';
|
|
4
|
+
import './chunk-WVLRUTAI.js';
|
|
5
5
|
import './chunk-PQXP7XQK.js';
|
|
6
6
|
import './chunk-NITQ5IYP.js';
|
|
7
7
|
import './chunk-2MYPFASJ.js';
|
package/dist/webpack.cjs
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
5
|
+
var chunkKE67B233_cjs = require('./chunk-KE67B233.cjs');
|
|
6
|
+
require('./chunk-G5QXE5QH.cjs');
|
|
7
|
+
require('./chunk-DMSPAYHA.cjs');
|
|
8
8
|
require('./chunk-B6DVCLP5.cjs');
|
|
9
9
|
require('./chunk-V5WOGN7O.cjs');
|
|
10
10
|
require('./chunk-Z6ARQDHR.cjs');
|
|
@@ -14,15 +14,15 @@ require('./chunk-PK6SKIKE.cjs');
|
|
|
14
14
|
|
|
15
15
|
Object.defineProperty(exports, "default", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkKE67B233_cjs.webpack_default; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "module.exports", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkKE67B233_cjs.webpack; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "webpack", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkKE67B233_cjs.webpack; }
|
|
26
26
|
});
|
|
27
27
|
//# sourceMappingURL=webpack.cjs.map
|
|
28
28
|
//# sourceMappingURL=webpack.cjs.map
|
package/dist/webpack.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { webpack_default as default, webpack as "module.exports", webpack } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
export { webpack_default as default, webpack as "module.exports", webpack } from './chunk-DKYPRXSW.js';
|
|
2
|
+
import './chunk-4DWSMUC2.js';
|
|
3
|
+
import './chunk-WVLRUTAI.js';
|
|
4
4
|
import './chunk-PQXP7XQK.js';
|
|
5
5
|
import './chunk-NITQ5IYP.js';
|
|
6
6
|
import './chunk-2MYPFASJ.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "powerlines",
|
|
3
|
-
"version": "0.37.
|
|
3
|
+
"version": "0.37.54",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The \"any framework\" framework that simplifies modern dev tool usage, generates virtual (or actual) code modules, and improves DX across the board.",
|
|
6
6
|
"repository": {
|
|
@@ -662,5 +662,5 @@
|
|
|
662
662
|
"undici-types": "^7.18.2"
|
|
663
663
|
},
|
|
664
664
|
"publishConfig": { "access": "public" },
|
|
665
|
-
"gitHead": "
|
|
665
|
+
"gitHead": "0030560b882e0e314b3085cc9607bc387e6bcba3"
|
|
666
666
|
}
|
package/dist/chunk-MJ6VMXPE.cjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkB4NNABMD_cjs = require('./chunk-B4NNABMD.cjs');
|
|
4
|
-
var unplugin = require('unplugin');
|
|
5
|
-
|
|
6
|
-
var rolldown = unplugin.createRolldownPlugin(chunkB4NNABMD_cjs.createUnpluginFactory("rolldown"));
|
|
7
|
-
var rolldown_default = rolldown;
|
|
8
|
-
|
|
9
|
-
exports.rolldown = rolldown;
|
|
10
|
-
exports.rolldown_default = rolldown_default;
|
|
11
|
-
//# sourceMappingURL=chunk-MJ6VMXPE.cjs.map
|
|
12
|
-
//# sourceMappingURL=chunk-MJ6VMXPE.cjs.map
|
package/dist/chunk-SFQQQYGC.cjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkB4NNABMD_cjs = require('./chunk-B4NNABMD.cjs');
|
|
4
|
-
var unplugin = require('unplugin');
|
|
5
|
-
|
|
6
|
-
var webpack = unplugin.createWebpackPlugin(chunkB4NNABMD_cjs.createUnpluginFactory("webpack"));
|
|
7
|
-
var webpack_default = webpack;
|
|
8
|
-
|
|
9
|
-
exports.webpack = webpack;
|
|
10
|
-
exports.webpack_default = webpack_default;
|
|
11
|
-
//# sourceMappingURL=chunk-SFQQQYGC.cjs.map
|
|
12
|
-
//# sourceMappingURL=chunk-SFQQQYGC.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/fs/storage/file-system.ts"],"names":["FileSystemStorageAdapter","BaseStorageAdapter","name","preset","options","existsSync","key","resolve","exists","getSync","readFileSync","get","readFile","setSync","value","isReadOnly","writeFileSync","set","writeFile","removeSync","unlinkSync","err","ignoreNotfound","remove","unlink","catch","mkdirSync","dirPath","createDirectorySync","mkdir","createDirectory","listSync","base","listFilesSync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,GAAAA,EAAK;AACZ,MAAA,OAAOC,cAAAA,CAAeD,GAAAA,CAAAA,IAAQ,EAAA;AAChC,IAAA;AACF,EAAA;;;;;;;AAQA,EAAA,MAAsBc,KAAKH,IAAAA,EAAkC;AAC3D,IAAA,OAAOI,SAAAA,CAAU,IAAA,CAAK7B,OAAAA,CAAQyB,IAAAA,CAAAA,EAAO;AACnCE,MAAAA,MAAAA,EAAQ,KAAK9B,OAAAA,CAAQ8B;KACvB,CAAA,CACGT,MAAMH,cAAAA,CAAAA,CACNe,KAAKC,CAAAA,CAAAA,KAAKA,CAAAA,IAAK,EAAE,CAAA;AACtB,EAAA;;;;;;;AAQgBC,EAAAA,eAAAA,CAAgBjC,GAAAA,EAAsB;AACpD,IAAA,OAAOkC,WAAAA,CAAY,IAAA,CAAKjC,OAAAA,CAAQD,GAAAA,CAAAA,CAAAA;AAClC,EAAA;;;;;;;AAQgBmC,EAAAA,UAAAA,CAAWnC,GAAAA,EAAsB;AAC/C,IAAA,OAAO,CAACoC,MAAAA,CAAO,IAAA,CAAKnC,OAAAA,CAAQD,GAAAA,CAAAA,CAAAA;AAC9B,EAAA;AACF","file":"chunk-2LZ2KCSP.js","sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { exists, existsSync } from \"@stryke/fs/exists\";\nimport { createDirectory, createDirectorySync } from \"@stryke/fs/helpers\";\nimport { isDirectory, isFile } from \"@stryke/fs/is-file\";\nimport { listFiles, listFilesSync } from \"@stryke/fs/list-files\";\nimport { readFile, readFileSync } from \"@stryke/fs/read-file\";\nimport { writeFile, writeFileSync } from \"@stryke/fs/write-file\";\nimport { unlinkSync } from \"node:fs\";\nimport { unlink } from \"node:fs/promises\";\nimport { ignoreNotfound } from \"../helpers\";\nimport { BaseStorageAdapter, StorageAdapterOptions } from \"./base\";\n\nexport type SetSyncOptions = Parameters<typeof writeFileSync>[2];\nexport type SetOptions = Parameters<typeof writeFile>[2];\n\n/**\n * File system storage adapter implementation.\n */\nexport class FileSystemStorageAdapter extends BaseStorageAdapter {\n /**\n * A name identifying the storage adapter type.\n */\n public name = \"file-system\";\n\n /**\n * The storage preset for the adapter.\n *\n * @remarks\n * This can be used as an alternate way to identify the type of storage being used.\n */\n public override readonly preset = \"fs\";\n\n /**\n * Constructor for the FileSystemStorageAdapter.\n *\n * @param options - Configuration options for the storage adapter.\n */\n public constructor(options?: StorageAdapterOptions) {\n super(options);\n }\n\n /**\n * Synchronously checks if a key exists in the storage.\n *\n * @param key - The key to check for existence.\n * @returns Returns `true` if the key exists, otherwise `false`.\n */\n public existsSync(key: string): boolean {\n return existsSync(this.resolve(key));\n }\n\n /**\n * Asynchronously checks if a key exists in the storage.\n *\n * @param key - The key to check for existence.\n * @returns A promise that resolves to `true` if the key exists, otherwise `false`.\n */\n public override async exists(key: string): Promise<boolean> {\n return exists(this.resolve(key));\n }\n\n /**\n * Synchronously retrieves the value associated with a given key.\n *\n * @param key - The key whose value is to be retrieved.\n * @returns The value associated with the key, or `null` if the key does not exist.\n */\n public getSync(key: string): string | null {\n return readFileSync(this.resolve(key));\n }\n\n /**\n * Asynchronously retrieves the value associated with a given key.\n *\n * @param key - The key whose value is to be retrieved.\n * @returns A promise that resolves to the value associated with the key, or `null` if the key does not exist.\n */\n public override async get(key: string): Promise<string | null> {\n return readFile(this.resolve(key));\n }\n\n /**\n * Synchronously sets the value for a given key.\n *\n * @param key - The key to set the value for.\n * @param value - The value to set.\n */\n public setSync(key: string, value: string) {\n if (!this.options.isReadOnly) {\n return writeFileSync(this.resolve(key), value);\n }\n }\n\n /**\n * Asynchronously sets the value for a given key.\n *\n * @param key - The key to set the value for.\n * @param value - The value to set.\n */\n public override async set(key: string, value: string): Promise<void> {\n if (!this.options.isReadOnly) {\n return writeFile(this.resolve(key), value);\n }\n }\n\n /**\n * Synchronously removes a key from the storage.\n *\n * @param key - The key to remove.\n */\n public removeSync(key: string) {\n if (!this.options.isReadOnly) {\n try {\n return unlinkSync(this.resolve(key));\n } catch (err) {\n return ignoreNotfound(err);\n }\n }\n }\n\n /**\n * Asynchronously removes a key from the storage.\n *\n * @param key - The key to remove.\n */\n public override async remove(key: string): Promise<void> {\n if (!this.options.isReadOnly) {\n return unlink(this.resolve(key)).catch(ignoreNotfound);\n }\n }\n\n /**\n * Synchronously creates a directory at the specified path.\n *\n * @param dirPath - The path of the directory to create.\n */\n public override mkdirSync(dirPath: string) {\n createDirectorySync(this.resolve(dirPath));\n }\n\n /**\n * Creates a directory at the specified path.\n *\n * @param dirPath - The path of the directory to create.\n */\n public override async mkdir(dirPath: string): Promise<void> {\n await createDirectory(this.resolve(dirPath));\n }\n\n /**\n * Lists all keys under a given base path synchronously.\n *\n * @param base - The base path to list keys from.\n * @returns An array of keys under the specified base path.\n */\n public listSync(base?: string): string[] {\n try {\n return listFilesSync(this.resolve(base), {\n ignore: this.options.ignore\n });\n } catch (err) {\n return ignoreNotfound(err) ?? [];\n }\n }\n\n /**\n * Asynchronously lists all keys under a given base path.\n *\n * @param base - The base path to list keys from.\n * @returns A promise that resolves to an array of keys under the specified base path.\n */\n public override async list(base?: string): Promise<string[]> {\n return listFiles(this.resolve(base), {\n ignore: this.options.ignore\n })\n .catch(ignoreNotfound)\n .then(r => r || []);\n }\n\n /**\n * Synchronously checks if the given key is a directory.\n *\n * @param key - The key to check.\n * @returns `true` if the key is a directory, otherwise `false`.\n */\n public override isDirectorySync(key: string): boolean {\n return isDirectory(this.resolve(key));\n }\n\n /**\n * Synchronously checks if the given key is a file.\n *\n * @param key - The key to check.\n * @returns `true` if the key is a file, otherwise `false`.\n */\n public override isFileSync(key: string): boolean {\n return !isFile(this.resolve(key));\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/fs/storage/file-system.ts"],"names":["FileSystemStorageAdapter","BaseStorageAdapter","name","preset","options","existsSync","key","resolve","exists","getSync","readFileSync","get","readFile","setSync","value","isReadOnly","writeFileSync","set","writeFile","removeSync","unlinkSync","err","ignoreNotfound","remove","unlink","catch","mkdirSync","dirPath","createDirectorySync","mkdir","createDirectory","listSync","base","listFilesSync","ignore","list","listFiles","then","r","isDirectorySync","isDirectory","isFileSync","isFile"],"mappings":";;;;;;;;;;;;;;AAmCO,IAAMA,wBAAAA,GAAN,cAAuCC,oCAAAA,CAAAA;EAnC9C;;;;;;EAuCSC,IAAAA,GAAO,aAAA;;;;;;;EAQWC,MAAAA,GAAS,IAAA;;;;;;AAOlC,EAAA,WAAA,CAAmBC,OAAAA,EAAiC;AAClD,IAAA,KAAA,CAAMA,OAAAA,CAAAA;AACR,EAAA;;;;;;;AAQOC,EAAAA,UAAAA,CAAWC,GAAAA,EAAsB;AACtC,IAAA,OAAOD,iBAAAA,CAAW,IAAA,CAAKE,OAAAA,CAAQD,GAAAA,CAAAA,CAAAA;AACjC,EAAA;;;;;;;AAQA,EAAA,MAAsBE,OAAOF,GAAAA,EAA+B;AAC1D,IAAA,OAAOE,aAAAA,CAAO,IAAA,CAAKD,OAAAA,CAAQD,GAAAA,CAAAA,CAAAA;AAC7B,EAAA;;;;;;;AAQOG,EAAAA,OAAAA,CAAQH,GAAAA,EAA4B;AACzC,IAAA,OAAOI,qBAAAA,CAAa,IAAA,CAAKH,OAAAA,CAAQD,GAAAA,CAAAA,CAAAA;AACnC,EAAA;;;;;;;AAQA,EAAA,MAAsBK,IAAIL,GAAAA,EAAqC;AAC7D,IAAA,OAAOM,iBAAAA,CAAS,IAAA,CAAKL,OAAAA,CAAQD,GAAAA,CAAAA,CAAAA;AAC/B,EAAA;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AMF,OAAAA,EAAgC;AAC1D,IAAA,MAAMG,uBAAAA,CAAgB,IAAA,CAAKvB,OAAAA,CAAQoB,OAAAA,CAAAA,CAAAA;AACrC,EAAA;;;;;;;AAQOI,EAAAA,QAAAA,CAASC,IAAAA,EAAyB;AACvC,IAAA,IAAI;AACF,MAAA,OAAOC,uBAAAA,CAAc,IAAA,CAAK1B,OAAAA,CAAQyB,IAAAA,CAAAA,EAAO;AACvCE,QAAAA,MAAAA,EAAQ,KAAK9B,OAAAA,CAAQ8B;OACvB,CAAA;AACF,IAAA,CAAA,CAAA,OAASb,GAAAA,EAAK;AACZ,MAAA,OAAOC,gCAAAA,CAAeD,GAAAA,CAAAA,IAAQ,EAAA;AAChC,IAAA;AACF,EAAA;;;;;;;AAQA,EAAA,MAAsBc,KAAKH,IAAAA,EAAkC;AAC3D,IAAA,OAAOI,mBAAAA,CAAU,IAAA,CAAK7B,OAAAA,CAAQyB,IAAAA,CAAAA,EAAO;AACnCE,MAAAA,MAAAA,EAAQ,KAAK9B,OAAAA,CAAQ8B;KACvB,CAAA,CACGT,MAAMH,gCAAAA,CAAAA,CACNe,KAAKC,CAAAA,CAAAA,KAAKA,CAAAA,IAAK,EAAE,CAAA;AACtB,EAAA;;;;;;;AAQgBC,EAAAA,eAAAA,CAAgBjC,GAAAA,EAAsB;AACpD,IAAA,OAAOkC,kBAAAA,CAAY,IAAA,CAAKjC,OAAAA,CAAQD,GAAAA,CAAAA,CAAAA;AAClC,EAAA;;;;;;;AAQgBmC,EAAAA,UAAAA,CAAWnC,GAAAA,EAAsB;AAC/C,IAAA,OAAO,CAACoC,aAAAA,CAAO,IAAA,CAAKnC,OAAAA,CAAQD,GAAAA,CAAAA,CAAAA;AAC9B,EAAA;AACF","file":"chunk-XKEHVYDR.cjs","sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { exists, existsSync } from \"@stryke/fs/exists\";\nimport { createDirectory, createDirectorySync } from \"@stryke/fs/helpers\";\nimport { isDirectory, isFile } from \"@stryke/fs/is-file\";\nimport { listFiles, listFilesSync } from \"@stryke/fs/list-files\";\nimport { readFile, readFileSync } from \"@stryke/fs/read-file\";\nimport { writeFile, writeFileSync } from \"@stryke/fs/write-file\";\nimport { unlinkSync } from \"node:fs\";\nimport { unlink } from \"node:fs/promises\";\nimport { ignoreNotfound } from \"../helpers\";\nimport { BaseStorageAdapter, StorageAdapterOptions } from \"./base\";\n\nexport type SetSyncOptions = Parameters<typeof writeFileSync>[2];\nexport type SetOptions = Parameters<typeof writeFile>[2];\n\n/**\n * File system storage adapter implementation.\n */\nexport class FileSystemStorageAdapter extends BaseStorageAdapter {\n /**\n * A name identifying the storage adapter type.\n */\n public name = \"file-system\";\n\n /**\n * The storage preset for the adapter.\n *\n * @remarks\n * This can be used as an alternate way to identify the type of storage being used.\n */\n public override readonly preset = \"fs\";\n\n /**\n * Constructor for the FileSystemStorageAdapter.\n *\n * @param options - Configuration options for the storage adapter.\n */\n public constructor(options?: StorageAdapterOptions) {\n super(options);\n }\n\n /**\n * Synchronously checks if a key exists in the storage.\n *\n * @param key - The key to check for existence.\n * @returns Returns `true` if the key exists, otherwise `false`.\n */\n public existsSync(key: string): boolean {\n return existsSync(this.resolve(key));\n }\n\n /**\n * Asynchronously checks if a key exists in the storage.\n *\n * @param key - The key to check for existence.\n * @returns A promise that resolves to `true` if the key exists, otherwise `false`.\n */\n public override async exists(key: string): Promise<boolean> {\n return exists(this.resolve(key));\n }\n\n /**\n * Synchronously retrieves the value associated with a given key.\n *\n * @param key - The key whose value is to be retrieved.\n * @returns The value associated with the key, or `null` if the key does not exist.\n */\n public getSync(key: string): string | null {\n return readFileSync(this.resolve(key));\n }\n\n /**\n * Asynchronously retrieves the value associated with a given key.\n *\n * @param key - The key whose value is to be retrieved.\n * @returns A promise that resolves to the value associated with the key, or `null` if the key does not exist.\n */\n public override async get(key: string): Promise<string | null> {\n return readFile(this.resolve(key));\n }\n\n /**\n * Synchronously sets the value for a given key.\n *\n * @param key - The key to set the value for.\n * @param value - The value to set.\n */\n public setSync(key: string, value: string) {\n if (!this.options.isReadOnly) {\n return writeFileSync(this.resolve(key), value);\n }\n }\n\n /**\n * Asynchronously sets the value for a given key.\n *\n * @param key - The key to set the value for.\n * @param value - The value to set.\n */\n public override async set(key: string, value: string): Promise<void> {\n if (!this.options.isReadOnly) {\n return writeFile(this.resolve(key), value);\n }\n }\n\n /**\n * Synchronously removes a key from the storage.\n *\n * @param key - The key to remove.\n */\n public removeSync(key: string) {\n if (!this.options.isReadOnly) {\n try {\n return unlinkSync(this.resolve(key));\n } catch (err) {\n return ignoreNotfound(err);\n }\n }\n }\n\n /**\n * Asynchronously removes a key from the storage.\n *\n * @param key - The key to remove.\n */\n public override async remove(key: string): Promise<void> {\n if (!this.options.isReadOnly) {\n return unlink(this.resolve(key)).catch(ignoreNotfound);\n }\n }\n\n /**\n * Synchronously creates a directory at the specified path.\n *\n * @param dirPath - The path of the directory to create.\n */\n public override mkdirSync(dirPath: string) {\n createDirectorySync(this.resolve(dirPath));\n }\n\n /**\n * Creates a directory at the specified path.\n *\n * @param dirPath - The path of the directory to create.\n */\n public override async mkdir(dirPath: string): Promise<void> {\n await createDirectory(this.resolve(dirPath));\n }\n\n /**\n * Lists all keys under a given base path synchronously.\n *\n * @param base - The base path to list keys from.\n * @returns An array of keys under the specified base path.\n */\n public listSync(base?: string): string[] {\n try {\n return listFilesSync(this.resolve(base), {\n ignore: this.options.ignore\n });\n } catch (err) {\n return ignoreNotfound(err) ?? [];\n }\n }\n\n /**\n * Asynchronously lists all keys under a given base path.\n *\n * @param base - The base path to list keys from.\n * @returns A promise that resolves to an array of keys under the specified base path.\n */\n public override async list(base?: string): Promise<string[]> {\n return listFiles(this.resolve(base), {\n ignore: this.options.ignore\n })\n .catch(ignoreNotfound)\n .then(r => r || []);\n }\n\n /**\n * Synchronously checks if the given key is a directory.\n *\n * @param key - The key to check.\n * @returns `true` if the key is a directory, otherwise `false`.\n */\n public override isDirectorySync(key: string): boolean {\n return isDirectory(this.resolve(key));\n }\n\n /**\n * Synchronously checks if the given key is a file.\n *\n * @param key - The key to check.\n * @returns `true` if the key is a file, otherwise `false`.\n */\n public override isFileSync(key: string): boolean {\n return !isFile(this.resolve(key));\n }\n}\n"]}
|