powerlines 0.10.2 → 0.11.0
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/astro.cjs +8 -8
- package/dist/astro.d.cts +1 -1
- package/dist/astro.d.ts +1 -1
- package/dist/astro.js +5 -5
- package/dist/{chunk-5XYGZ3DC.cjs → chunk-22K72CJ5.cjs} +2 -2
- package/dist/{chunk-GPPJ2CRE.js → chunk-4HGQJ4KR.js} +2 -2
- package/dist/chunk-7MTW3KR2.cjs +12 -0
- package/dist/{chunk-VIRKTIPK.js → chunk-7UIYU6SC.js} +3 -3
- package/dist/chunk-7WMWRX2S.cjs +12 -0
- package/dist/{chunk-HVT7PBFF.js → chunk-A3BBPLTY.js} +3 -3
- package/dist/{chunk-S746E63M.js → chunk-BHP6KBGK.js} +3 -3
- package/dist/{chunk-ZU4IRZSQ.js → chunk-BOIEJ5I6.js} +3 -3
- package/dist/chunk-DELRP3WY.js +31 -0
- package/dist/{chunk-ZBDP43LG.cjs → chunk-ELHJY5WG.cjs} +4 -4
- package/dist/{chunk-UHCRNFFC.cjs → chunk-FANQC345.cjs} +4 -4
- package/dist/chunk-GV3S7ZR3.cjs +34 -0
- package/dist/{chunk-WCPY7HPU.js → chunk-L3DAMAEC.js} +4 -4
- package/dist/chunk-LC6FLEJS.cjs +12 -0
- package/dist/{chunk-N7NE3VOU.js → chunk-MAEKW52U.js} +3 -3
- package/dist/chunk-MXJWCZDP.cjs +12 -0
- package/dist/{chunk-EGSEJQCE.js → chunk-NGKWITCO.js} +3 -3
- package/dist/{chunk-L2SAK2JC.cjs → chunk-OC7CCD5M.cjs} +4 -4
- package/dist/{chunk-OYIM2M74.js → chunk-P4BOYWXT.js} +195 -6
- package/dist/{chunk-UTVZVGM3.cjs → chunk-PJRHRDLS.cjs} +204 -15
- package/dist/{chunk-5Y4JYQ66.js → chunk-RBRFT2R6.js} +3 -3
- package/dist/{chunk-66GXB2UY.cjs → chunk-RU6BHTIP.cjs} +4 -4
- package/dist/{chunk-WPVIF35O.js → chunk-SIZKRND7.js} +2 -2
- package/dist/chunk-SNARILEC.cjs +24 -0
- package/dist/{chunk-6UDHGAAI.js → chunk-SY7N6FC3.js} +3 -3
- package/dist/{chunk-QHGPZK2H.cjs → chunk-V5D5NVV7.cjs} +4 -4
- package/dist/{chunk-SDEBJQDT.js → chunk-V7LXFIGK.js} +3 -3
- package/dist/{chunk-2RHPFVYT.cjs → chunk-WCTOTE3T.cjs} +8 -8
- package/dist/chunk-WD4363UW.cjs +12 -0
- package/dist/{chunk-7IWH37DY.cjs → chunk-YIWHO6SW.cjs} +2 -2
- package/dist/{chunk-3Y5CCIJR.js → chunk-ZP5QLZQ2.js} +3 -3
- package/dist/{chunk-KYGEWAEG.js → chunk-ZQ7U35QZ.js} +3 -3
- package/dist/define-config.d.cts +1 -1
- package/dist/define-config.d.ts +1 -1
- package/dist/esbuild.cjs +7 -7
- package/dist/esbuild.d.cts +1 -1
- package/dist/esbuild.d.ts +1 -1
- package/dist/esbuild.js +4 -4
- package/dist/extend-plugin.d.cts +1 -1
- package/dist/extend-plugin.d.ts +1 -1
- package/dist/farm.cjs +4 -4
- package/dist/farm.d.cts +1 -1
- package/dist/farm.d.ts +1 -1
- package/dist/farm.js +3 -3
- package/dist/{hooks-gk8S8LFP.d.cts → hooks-H3i0YxVa.d.cts} +1 -1
- package/dist/{hooks-BGYnc61f.d.ts → hooks-QG1Q6zBM.d.ts} +1 -1
- package/dist/index.cjs +26 -26
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +17 -17
- package/dist/internal/api.cjs +3 -3
- package/dist/internal/api.d.cts +2 -2
- package/dist/internal/api.d.ts +2 -2
- package/dist/internal/api.js +2 -2
- package/dist/lib/build/esbuild.d.cts +12 -12
- package/dist/lib/build/esbuild.d.ts +12 -12
- package/dist/lib/build/index.cjs +18 -18
- package/dist/lib/build/index.d.cts +13 -13
- package/dist/lib/build/index.d.ts +13 -13
- package/dist/lib/build/index.js +3 -3
- package/dist/lib/build/rolldown.d.cts +12 -12
- package/dist/lib/build/rolldown.d.ts +12 -12
- package/dist/lib/build/rollup.d.cts +12 -12
- package/dist/lib/build/rollup.d.ts +12 -12
- package/dist/lib/build/rspack.d.cts +12 -12
- package/dist/lib/build/rspack.d.ts +12 -12
- package/dist/lib/build/tsup.d.cts +11 -11
- package/dist/lib/build/tsup.d.ts +11 -11
- package/dist/lib/build/unbuild.cjs +5 -5
- package/dist/lib/build/unbuild.d.cts +13 -13
- package/dist/lib/build/unbuild.d.ts +13 -13
- package/dist/lib/build/unbuild.js +2 -2
- package/dist/lib/build/vite.d.cts +12 -12
- package/dist/lib/build/vite.d.ts +12 -12
- package/dist/lib/build/webpack.d.cts +12 -12
- package/dist/lib/build/webpack.d.ts +12 -12
- package/dist/lib/bundle.cjs +16 -0
- package/dist/lib/bundle.cjs.map +1 -0
- package/dist/lib/bundle.d.cts +44 -0
- package/dist/lib/bundle.d.ts +44 -0
- package/dist/lib/bundle.js +7 -0
- package/dist/lib/bundle.js.map +1 -0
- package/dist/lib/chunk-2625RJNJ.cjs +41 -0
- package/dist/lib/chunk-2625RJNJ.cjs.map +1 -0
- package/dist/lib/{chunk-PIFE7MUZ.js → chunk-6BRTJXZ2.js} +195 -6
- package/dist/lib/chunk-6BRTJXZ2.js.map +1 -0
- package/dist/lib/chunk-6IJTWIVJ.cjs +107 -0
- package/dist/lib/chunk-6IJTWIVJ.cjs.map +1 -0
- package/dist/lib/{chunk-YVDJCVE5.cjs → chunk-BAC4AJEP.cjs} +3 -3
- package/dist/lib/{chunk-YVDJCVE5.cjs.map → chunk-BAC4AJEP.cjs.map} +1 -1
- package/dist/lib/{chunk-Q2RUDKWY.cjs → chunk-BW3VFCTS.cjs} +2 -2
- package/dist/lib/chunk-BW3VFCTS.cjs.map +1 -0
- package/dist/lib/chunk-ESYYL5UH.js +105 -0
- package/dist/lib/chunk-ESYYL5UH.js.map +1 -0
- package/dist/lib/chunk-GTQZYDA7.js +39 -0
- package/dist/lib/chunk-GTQZYDA7.js.map +1 -0
- package/dist/lib/{chunk-M7U5RMK7.js → chunk-KOCDKJDJ.js} +2 -2
- package/dist/lib/chunk-KOCDKJDJ.js.map +1 -0
- package/dist/lib/{chunk-M7WHFUKR.cjs → chunk-LYD5OTBI.cjs} +210 -21
- package/dist/lib/chunk-LYD5OTBI.cjs.map +1 -0
- package/dist/lib/{chunk-6U2UX2PX.cjs → chunk-RLMEYZ5I.cjs} +11 -15
- package/dist/lib/chunk-RLMEYZ5I.cjs.map +1 -0
- package/dist/lib/{chunk-CAPN4FSS.js → chunk-S4TGQD45.js} +3 -3
- package/dist/lib/{chunk-CAPN4FSS.js.map → chunk-S4TGQD45.js.map} +1 -1
- package/dist/lib/{chunk-KFE2IR3Y.js → chunk-V2T4H24I.js} +11 -15
- package/dist/lib/chunk-V2T4H24I.js.map +1 -0
- package/dist/lib/config-file.d.cts +11 -11
- package/dist/lib/config-file.d.ts +11 -11
- package/dist/lib/{config-AuIGsUck.d.cts → context-B481RQbf.d.cts} +615 -559
- package/dist/lib/{config-B_WTwd49.d.ts → context-efHKG-wc.d.ts} +615 -559
- package/dist/lib/create-program.cjs +13 -0
- package/dist/lib/create-program.cjs.map +1 -0
- package/dist/lib/create-program.d.cts +42 -0
- package/dist/lib/create-program.d.ts +42 -0
- package/dist/lib/create-program.js +4 -0
- package/dist/lib/create-program.js.map +1 -0
- package/dist/lib/entry.d.cts +12 -12
- package/dist/lib/entry.d.ts +12 -12
- package/dist/lib/{hooks-DErK4Fv4.d.ts → hooks-CdvPHbFZ.d.cts} +1 -1
- package/dist/lib/{hooks-4KkL9GD2.d.cts → hooks-JhMVguVh.d.ts} +1 -1
- package/dist/lib/index.cjs +47 -36
- package/dist/lib/index.d.cts +16 -13
- package/dist/lib/index.d.ts +16 -13
- package/dist/lib/index.js +10 -7
- package/dist/lib/logger.d.cts +12 -12
- package/dist/lib/logger.d.ts +12 -12
- package/dist/lib/typescript/compiler-host.cjs +46 -2
- package/dist/lib/typescript/compiler-host.cjs.map +1 -1
- package/dist/lib/typescript/compiler-host.d.cts +18 -13
- package/dist/lib/typescript/compiler-host.d.ts +18 -13
- package/dist/lib/typescript/compiler-host.js +45 -2
- package/dist/lib/typescript/compiler-host.js.map +1 -1
- package/dist/lib/typescript/import-transformer.d.cts +12 -12
- package/dist/lib/typescript/import-transformer.d.ts +12 -12
- package/dist/lib/typescript/index.cjs +6 -6
- package/dist/lib/typescript/index.d.cts +12 -12
- package/dist/lib/typescript/index.d.ts +12 -12
- package/dist/lib/typescript/index.js +1 -1
- package/dist/lib/typescript/program.cjs +6 -6
- package/dist/lib/typescript/program.d.cts +13 -13
- package/dist/lib/typescript/program.d.ts +13 -13
- package/dist/lib/typescript/program.js +1 -1
- package/dist/lib/unplugin/factory.cjs +3 -3
- package/dist/lib/unplugin/factory.d.cts +12 -12
- package/dist/lib/unplugin/factory.d.ts +12 -12
- package/dist/lib/unplugin/factory.js +2 -2
- package/dist/lib/unplugin/index.cjs +3 -3
- package/dist/lib/unplugin/index.d.cts +12 -12
- package/dist/lib/unplugin/index.d.ts +12 -12
- package/dist/lib/unplugin/index.js +2 -2
- package/dist/lib/unplugin/plugin.d.cts +11 -11
- package/dist/lib/unplugin/plugin.d.ts +11 -11
- package/dist/lib/unplugin/resolve-id.d.cts +11 -11
- package/dist/lib/unplugin/resolve-id.d.ts +11 -11
- package/dist/lib/utilities/file-header.d.cts +12 -12
- package/dist/lib/utilities/file-header.d.ts +12 -12
- package/dist/lib/utilities/index.cjs +20 -20
- package/dist/lib/utilities/index.d.cts +12 -12
- package/dist/lib/utilities/index.d.ts +12 -12
- package/dist/lib/utilities/index.js +3 -3
- package/dist/lib/utilities/meta.cjs +8 -8
- package/dist/lib/utilities/meta.d.cts +12 -12
- package/dist/lib/utilities/meta.d.ts +12 -12
- package/dist/lib/utilities/meta.js +1 -1
- package/dist/lib/utilities/plugin-helpers.d.cts +11 -11
- package/dist/lib/utilities/plugin-helpers.d.ts +11 -11
- package/dist/lib/utilities/resolve-path.d.cts +12 -12
- package/dist/lib/utilities/resolve-path.d.ts +12 -12
- package/dist/lib/utilities/worker.d.cts +11 -11
- package/dist/lib/utilities/worker.d.ts +11 -11
- package/dist/lib/utilities/write-file.d.cts +12 -12
- package/dist/lib/utilities/write-file.d.ts +12 -12
- package/dist/next.cjs +8 -8
- package/dist/next.js +5 -5
- package/dist/nuxt.cjs +9 -9
- package/dist/nuxt.js +6 -6
- package/dist/rolldown.cjs +7 -7
- package/dist/rolldown.d.cts +1 -1
- package/dist/rolldown.d.ts +1 -1
- package/dist/rolldown.js +4 -4
- package/dist/rollup.cjs +7 -7
- package/dist/rollup.d.cts +1 -1
- package/dist/rollup.d.ts +1 -1
- package/dist/rollup.js +4 -4
- package/dist/rspack.cjs +7 -7
- package/dist/rspack.d.cts +1 -1
- package/dist/rspack.d.ts +1 -1
- package/dist/rspack.js +4 -4
- package/dist/tsup.cjs +8 -8
- package/dist/tsup.js +5 -5
- package/dist/types/babel.d.cts +1 -1
- package/dist/types/babel.d.ts +1 -1
- package/dist/types/commands.d.cts +1 -1
- package/dist/types/commands.d.ts +1 -1
- package/dist/types/compiler.d.cts +1 -1
- package/dist/types/compiler.d.ts +1 -1
- package/dist/types/config.d.cts +1 -1
- package/dist/types/config.d.ts +1 -1
- package/dist/types/context.cjs +2 -2
- package/dist/types/context.d.cts +1 -1
- package/dist/types/context.d.ts +1 -1
- package/dist/types/context.js +1 -1
- package/dist/types/hooks.d.cts +1 -1
- package/dist/types/hooks.d.ts +1 -1
- package/dist/types/index.cjs +9 -9
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.js +2 -2
- package/dist/types/internal.d.cts +2 -2
- package/dist/types/internal.d.ts +2 -2
- package/dist/types/plugin.d.cts +1 -1
- package/dist/types/plugin.d.ts +1 -1
- package/dist/types/resolved.d.cts +1 -1
- package/dist/types/resolved.d.ts +1 -1
- package/dist/types/unplugin.d.cts +1 -1
- package/dist/types/unplugin.d.ts +1 -1
- package/dist/types/vfs.cjs +7 -7
- package/dist/types/vfs.d.cts +61 -5
- package/dist/types/vfs.d.ts +61 -5
- package/dist/types/vfs.js +1 -1
- package/dist/unloader.cjs +7 -7
- package/dist/unloader.d.cts +1 -1
- package/dist/unloader.d.ts +1 -1
- package/dist/unloader.js +4 -4
- package/dist/unplugin.cjs +18 -18
- package/dist/unplugin.d.cts +2 -2
- package/dist/unplugin.d.ts +2 -2
- package/dist/unplugin.js +15 -15
- package/dist/vite.cjs +7 -7
- package/dist/vite.d.cts +1 -1
- package/dist/vite.d.ts +1 -1
- package/dist/vite.js +4 -4
- package/dist/webpack.cjs +7 -7
- package/dist/webpack.d.cts +1 -1
- package/dist/webpack.d.ts +1 -1
- package/dist/webpack.js +4 -4
- package/package.json +9 -7
- package/dist/chunk-IJBH5OUN.cjs +0 -12
- package/dist/chunk-JBTSAOIQ.js +0 -31
- package/dist/chunk-LXMNDUPG.cjs +0 -12
- package/dist/chunk-RQ4CHMPO.cjs +0 -12
- package/dist/chunk-S5QFX2GM.cjs +0 -12
- package/dist/chunk-SL3CXJWD.cjs +0 -34
- package/dist/chunk-YG7U2GIR.cjs +0 -24
- package/dist/chunk-ZFATNDSY.cjs +0 -12
- package/dist/lib/chunk-6U2UX2PX.cjs.map +0 -1
- package/dist/lib/chunk-KFE2IR3Y.js.map +0 -1
- package/dist/lib/chunk-M7U5RMK7.js.map +0 -1
- package/dist/lib/chunk-M7WHFUKR.cjs.map +0 -1
- package/dist/lib/chunk-PIFE7MUZ.js.map +0 -1
- package/dist/lib/chunk-Q2RUDKWY.cjs.map +0 -1
- package/dist/{resolved-CcuVqMqc.d.cts → resolved-3RFshyDy.d.cts} +16 -16
- package/dist/{resolved-Dhscmo3z.d.ts → resolved-BzyBMgQG.d.ts} +16 -16
package/dist/unplugin.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import * as rolldown from 'rolldown';
|
|
|
8
8
|
import * as _nuxt_schema from '@nuxt/schema';
|
|
9
9
|
import * as _esbuild from 'esbuild';
|
|
10
10
|
import * as astro from 'astro';
|
|
11
|
-
import { ba as Context, cx as InferResolvedConfig, co as ViteResolvedConfig, a5 as ESBuildUserConfig, a3 as RolldownUserConfig, a2 as RollupUserConfig, a1 as RspackUserConfig, $ as UserConfig, a4 as ViteUserConfig, a0 as WebpackUserConfig } from './resolved-
|
|
11
|
+
import { ba as Context, cx as InferResolvedConfig, co as ViteResolvedConfig, a5 as ESBuildUserConfig, a3 as RolldownUserConfig, a2 as RollupUserConfig, a1 as RspackUserConfig, $ as UserConfig, a4 as ViteUserConfig, a0 as WebpackUserConfig } from './resolved-BzyBMgQG.js';
|
|
12
12
|
import { UnpluginBuildVariant, BuildConfig } from './types/build.js';
|
|
13
13
|
import next from './next.js';
|
|
14
14
|
import tsup from './tsup.js';
|
|
@@ -46,7 +46,7 @@ import '@storm-software/esbuild/types';
|
|
|
46
46
|
import '@storm-software/unbuild/types';
|
|
47
47
|
import 'next';
|
|
48
48
|
import 'tsup';
|
|
49
|
-
import './hooks-
|
|
49
|
+
import './hooks-QG1Q6zBM.js';
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
52
|
* Creates a Powerlines unplugin factory that generates a plugin instance.
|
package/dist/unplugin.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
export { unplugin_default as default, plugins } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
8
|
-
import './chunk-
|
|
9
|
-
import './chunk-
|
|
10
|
-
import './chunk-
|
|
11
|
-
import './chunk-
|
|
1
|
+
export { unplugin_default as default, plugins } from './chunk-DELRP3WY.js';
|
|
2
|
+
import './chunk-A3BBPLTY.js';
|
|
3
|
+
import './chunk-ZQ7U35QZ.js';
|
|
4
|
+
import './chunk-SY7N6FC3.js';
|
|
5
|
+
import './chunk-7UIYU6SC.js';
|
|
6
|
+
import './chunk-RBRFT2R6.js';
|
|
7
|
+
import './chunk-BHP6KBGK.js';
|
|
8
|
+
import './chunk-MAEKW52U.js';
|
|
9
|
+
import './chunk-ZP5QLZQ2.js';
|
|
10
|
+
import './chunk-L3DAMAEC.js';
|
|
11
|
+
import './chunk-BOIEJ5I6.js';
|
|
12
12
|
import './chunk-6TJGZR5X.js';
|
|
13
|
-
import './chunk-
|
|
14
|
-
export { createUnpluginFactory } from './chunk-
|
|
15
|
-
import './chunk-
|
|
13
|
+
import './chunk-NGKWITCO.js';
|
|
14
|
+
export { createUnpluginFactory } from './chunk-V7LXFIGK.js';
|
|
15
|
+
import './chunk-P4BOYWXT.js';
|
|
16
16
|
import './chunk-EBMELFCF.js';
|
|
17
|
-
import './chunk-
|
|
17
|
+
import './chunk-4HGQJ4KR.js';
|
|
18
18
|
import './chunk-LO77RPRV.js';
|
|
19
19
|
import './chunk-7QVYU63E.js';
|
|
20
20
|
//# sourceMappingURL=unplugin.js.map
|
package/dist/vite.cjs
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var chunkFANQC345_cjs = require('./chunk-FANQC345.cjs');
|
|
6
6
|
require('./chunk-UZQYBO6Z.cjs');
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
7
|
+
require('./chunk-WCTOTE3T.cjs');
|
|
8
|
+
require('./chunk-PJRHRDLS.cjs');
|
|
9
9
|
require('./chunk-APVMN2H7.cjs');
|
|
10
|
-
require('./chunk-
|
|
10
|
+
require('./chunk-22K72CJ5.cjs');
|
|
11
11
|
require('./chunk-5VPVJHJO.cjs');
|
|
12
12
|
require('./chunk-PK6SKIKE.cjs');
|
|
13
13
|
|
|
@@ -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 chunkFANQC345_cjs.vite_default; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "module.exports", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkFANQC345_cjs.vite; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "vite", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkFANQC345_cjs.vite; }
|
|
27
27
|
});
|
|
28
28
|
//# sourceMappingURL=vite.cjs.map
|
|
29
29
|
//# sourceMappingURL=vite.cjs.map
|
package/dist/vite.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as vite$1 from 'vite';
|
|
2
|
-
import { a4 as ViteUserConfig } from './resolved-
|
|
2
|
+
import { a4 as ViteUserConfig } from './resolved-3RFshyDy.cjs';
|
|
3
3
|
import '@storm-software/config-tools/types';
|
|
4
4
|
import '@stryke/types/base';
|
|
5
5
|
import '@stryke/types/configuration';
|
package/dist/vite.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as vite$1 from 'vite';
|
|
2
|
-
import { a4 as ViteUserConfig } from './resolved-
|
|
2
|
+
import { a4 as ViteUserConfig } from './resolved-BzyBMgQG.js';
|
|
3
3
|
import '@storm-software/config-tools/types';
|
|
4
4
|
import '@stryke/types/base';
|
|
5
5
|
import '@stryke/types/configuration';
|
package/dist/vite.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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-BOIEJ5I6.js';
|
|
2
2
|
import './chunk-6TJGZR5X.js';
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
import './chunk-V7LXFIGK.js';
|
|
4
|
+
import './chunk-P4BOYWXT.js';
|
|
5
5
|
import './chunk-EBMELFCF.js';
|
|
6
|
-
import './chunk-
|
|
6
|
+
import './chunk-4HGQJ4KR.js';
|
|
7
7
|
import './chunk-LO77RPRV.js';
|
|
8
8
|
import './chunk-7QVYU63E.js';
|
|
9
9
|
//# sourceMappingURL=vite.js.map
|
package/dist/webpack.cjs
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
5
|
+
var chunkLC6FLEJS_cjs = require('./chunk-LC6FLEJS.cjs');
|
|
6
|
+
require('./chunk-WCTOTE3T.cjs');
|
|
7
|
+
require('./chunk-PJRHRDLS.cjs');
|
|
8
8
|
require('./chunk-APVMN2H7.cjs');
|
|
9
|
-
require('./chunk-
|
|
9
|
+
require('./chunk-22K72CJ5.cjs');
|
|
10
10
|
require('./chunk-5VPVJHJO.cjs');
|
|
11
11
|
require('./chunk-PK6SKIKE.cjs');
|
|
12
12
|
|
|
@@ -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 chunkLC6FLEJS_cjs.webpack_default; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "module.exports", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkLC6FLEJS_cjs.webpack; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "webpack", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkLC6FLEJS_cjs.webpack; }
|
|
26
26
|
});
|
|
27
27
|
//# sourceMappingURL=webpack.cjs.map
|
|
28
28
|
//# sourceMappingURL=webpack.cjs.map
|
package/dist/webpack.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as webpack$1 from 'webpack';
|
|
2
|
-
import { a0 as WebpackUserConfig } from './resolved-
|
|
2
|
+
import { a0 as WebpackUserConfig } from './resolved-3RFshyDy.cjs';
|
|
3
3
|
import '@storm-software/config-tools/types';
|
|
4
4
|
import '@stryke/types/base';
|
|
5
5
|
import '@stryke/types/configuration';
|
package/dist/webpack.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as webpack$1 from 'webpack';
|
|
2
|
-
import { a0 as WebpackUserConfig } from './resolved-
|
|
2
|
+
import { a0 as WebpackUserConfig } from './resolved-BzyBMgQG.js';
|
|
3
3
|
import '@storm-software/config-tools/types';
|
|
4
4
|
import '@stryke/types/base';
|
|
5
5
|
import '@stryke/types/configuration';
|
package/dist/webpack.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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-NGKWITCO.js';
|
|
2
|
+
import './chunk-V7LXFIGK.js';
|
|
3
|
+
import './chunk-P4BOYWXT.js';
|
|
4
4
|
import './chunk-EBMELFCF.js';
|
|
5
|
-
import './chunk-
|
|
5
|
+
import './chunk-4HGQJ4KR.js';
|
|
6
6
|
import './chunk-LO77RPRV.js';
|
|
7
7
|
import './chunk-7QVYU63E.js';
|
|
8
8
|
//# sourceMappingURL=webpack.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "powerlines",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
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": {
|
|
@@ -466,7 +466,7 @@
|
|
|
466
466
|
"@babel/traverse": "^7.28.5",
|
|
467
467
|
"@babel/types": "^7.28.5",
|
|
468
468
|
"@donedeal0/superdiff": "^3.1.2",
|
|
469
|
-
"@microsoft/api-extractor": "^7.53.
|
|
469
|
+
"@microsoft/api-extractor": "^7.53.3",
|
|
470
470
|
"@microsoft/tsdoc-config": "^0.17.1",
|
|
471
471
|
"@rollup/plugin-alias": "^5.1.1",
|
|
472
472
|
"@rollup/plugin-babel": "^6.1.0",
|
|
@@ -478,12 +478,12 @@
|
|
|
478
478
|
"@storm-software/tsup": "^0.2.9",
|
|
479
479
|
"@storm-software/unbuild": "^0.57.11",
|
|
480
480
|
"@stryke/convert": "^0.6.0",
|
|
481
|
-
"@stryke/env": "^0.20.
|
|
481
|
+
"@stryke/env": "^0.20.3",
|
|
482
482
|
"@stryke/fs": "^0.32.2",
|
|
483
483
|
"@stryke/hash": "^0.12.0",
|
|
484
484
|
"@stryke/helpers": "^0.9.2",
|
|
485
485
|
"@stryke/json": "^0.9.3",
|
|
486
|
-
"@stryke/path": "^0.
|
|
486
|
+
"@stryke/path": "^0.17.0",
|
|
487
487
|
"@stryke/string-format": "^0.12.0",
|
|
488
488
|
"@stryke/type-checks": "^0.3.10",
|
|
489
489
|
"@stryke/unique-id": "^0.3.5",
|
|
@@ -499,15 +499,17 @@
|
|
|
499
499
|
"handlebars": "^4.7.8",
|
|
500
500
|
"jest-worker": "30.0.5",
|
|
501
501
|
"jiti": "^2.6.1",
|
|
502
|
-
"magic-string": "^0.30.
|
|
502
|
+
"magic-string": "^0.30.21",
|
|
503
503
|
"nanotar": "^0.2.0",
|
|
504
504
|
"oxc-parser": "^0.95.0",
|
|
505
505
|
"prettier": "^3.6.2",
|
|
506
506
|
"rollup-plugin-typescript2": "^0.36.0",
|
|
507
|
+
"ts-morph": "^27.0.2",
|
|
507
508
|
"unimport": "^4.2.0",
|
|
508
509
|
"unionfs": "^4.6.0",
|
|
509
510
|
"unplugin": "^2.3.10",
|
|
510
|
-
"vite": "^7.1.12"
|
|
511
|
+
"vite": "^7.1.12",
|
|
512
|
+
"@typescript-eslint/utils": "^8.46.2"
|
|
511
513
|
},
|
|
512
514
|
"devDependencies": {
|
|
513
515
|
"@microsoft/tsdoc": "^0.15.1",
|
|
@@ -528,5 +530,5 @@
|
|
|
528
530
|
"typescript": "^5.9.3"
|
|
529
531
|
},
|
|
530
532
|
"publishConfig": { "access": "public" },
|
|
531
|
-
"gitHead": "
|
|
533
|
+
"gitHead": "94fc9407c0c49ee7611c2017e2d9feec5527fc1a"
|
|
532
534
|
}
|
package/dist/chunk-IJBH5OUN.cjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunk2RHPFVYT_cjs = require('./chunk-2RHPFVYT.cjs');
|
|
4
|
-
var unplugin = require('unplugin');
|
|
5
|
-
|
|
6
|
-
var rspack = unplugin.createRspackPlugin(chunk2RHPFVYT_cjs.createUnpluginFactory("rspack"));
|
|
7
|
-
var rspack_default = rspack;
|
|
8
|
-
|
|
9
|
-
exports.rspack = rspack;
|
|
10
|
-
exports.rspack_default = rspack_default;
|
|
11
|
-
//# sourceMappingURL=chunk-IJBH5OUN.cjs.map
|
|
12
|
-
//# sourceMappingURL=chunk-IJBH5OUN.cjs.map
|
package/dist/chunk-JBTSAOIQ.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { rolldown_default } from './chunk-HVT7PBFF.js';
|
|
2
|
-
import { rollup_default } from './chunk-KYGEWAEG.js';
|
|
3
|
-
import { rspack_default } from './chunk-6UDHGAAI.js';
|
|
4
|
-
import { tsup_default } from './chunk-VIRKTIPK.js';
|
|
5
|
-
import { unloader_default } from './chunk-5Y4JYQ66.js';
|
|
6
|
-
import { astro_default } from './chunk-S746E63M.js';
|
|
7
|
-
import { esbuild_default } from './chunk-N7NE3VOU.js';
|
|
8
|
-
import { next_default } from './chunk-3Y5CCIJR.js';
|
|
9
|
-
import { nuxt_default } from './chunk-WCPY7HPU.js';
|
|
10
|
-
import { vite_default } from './chunk-ZU4IRZSQ.js';
|
|
11
|
-
import { webpack_default } from './chunk-EGSEJQCE.js';
|
|
12
|
-
|
|
13
|
-
// src/unplugin.ts
|
|
14
|
-
var plugins = {
|
|
15
|
-
astro: astro_default,
|
|
16
|
-
esbuild: esbuild_default,
|
|
17
|
-
next: next_default,
|
|
18
|
-
nuxt: nuxt_default,
|
|
19
|
-
rolldown: rolldown_default,
|
|
20
|
-
rollup: rollup_default,
|
|
21
|
-
rspack: rspack_default,
|
|
22
|
-
tsup: tsup_default,
|
|
23
|
-
unloader: unloader_default,
|
|
24
|
-
vite: vite_default,
|
|
25
|
-
webpack: webpack_default
|
|
26
|
-
};
|
|
27
|
-
var unplugin_default = plugins;
|
|
28
|
-
|
|
29
|
-
export { plugins, unplugin_default };
|
|
30
|
-
//# sourceMappingURL=chunk-JBTSAOIQ.js.map
|
|
31
|
-
//# sourceMappingURL=chunk-JBTSAOIQ.js.map
|
package/dist/chunk-LXMNDUPG.cjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunk2RHPFVYT_cjs = require('./chunk-2RHPFVYT.cjs');
|
|
4
|
-
var unplugin = require('unplugin');
|
|
5
|
-
|
|
6
|
-
var rolldown = unplugin.createRolldownPlugin(chunk2RHPFVYT_cjs.createUnpluginFactory("rolldown"));
|
|
7
|
-
var rolldown_default = rolldown;
|
|
8
|
-
|
|
9
|
-
exports.rolldown = rolldown;
|
|
10
|
-
exports.rolldown_default = rolldown_default;
|
|
11
|
-
//# sourceMappingURL=chunk-LXMNDUPG.cjs.map
|
|
12
|
-
//# sourceMappingURL=chunk-LXMNDUPG.cjs.map
|
package/dist/chunk-RQ4CHMPO.cjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunk2RHPFVYT_cjs = require('./chunk-2RHPFVYT.cjs');
|
|
4
|
-
var unplugin = require('unplugin');
|
|
5
|
-
|
|
6
|
-
var rollup = unplugin.createRollupPlugin(chunk2RHPFVYT_cjs.createUnpluginFactory("rollup"));
|
|
7
|
-
var rollup_default = rollup;
|
|
8
|
-
|
|
9
|
-
exports.rollup = rollup;
|
|
10
|
-
exports.rollup_default = rollup_default;
|
|
11
|
-
//# sourceMappingURL=chunk-RQ4CHMPO.cjs.map
|
|
12
|
-
//# sourceMappingURL=chunk-RQ4CHMPO.cjs.map
|
package/dist/chunk-S5QFX2GM.cjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunk2RHPFVYT_cjs = require('./chunk-2RHPFVYT.cjs');
|
|
4
|
-
var unplugin = require('unplugin');
|
|
5
|
-
|
|
6
|
-
var unloader = unplugin.createUnloaderPlugin(chunk2RHPFVYT_cjs.createUnpluginFactory("unloader"));
|
|
7
|
-
var unloader_default = unloader;
|
|
8
|
-
|
|
9
|
-
exports.unloader = unloader;
|
|
10
|
-
exports.unloader_default = unloader_default;
|
|
11
|
-
//# sourceMappingURL=chunk-S5QFX2GM.cjs.map
|
|
12
|
-
//# sourceMappingURL=chunk-S5QFX2GM.cjs.map
|
package/dist/chunk-SL3CXJWD.cjs
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkLXMNDUPG_cjs = require('./chunk-LXMNDUPG.cjs');
|
|
4
|
-
var chunkRQ4CHMPO_cjs = require('./chunk-RQ4CHMPO.cjs');
|
|
5
|
-
var chunkIJBH5OUN_cjs = require('./chunk-IJBH5OUN.cjs');
|
|
6
|
-
var chunkQHGPZK2H_cjs = require('./chunk-QHGPZK2H.cjs');
|
|
7
|
-
var chunkS5QFX2GM_cjs = require('./chunk-S5QFX2GM.cjs');
|
|
8
|
-
var chunkL2SAK2JC_cjs = require('./chunk-L2SAK2JC.cjs');
|
|
9
|
-
var chunkZBDP43LG_cjs = require('./chunk-ZBDP43LG.cjs');
|
|
10
|
-
var chunk66GXB2UY_cjs = require('./chunk-66GXB2UY.cjs');
|
|
11
|
-
var chunkYG7U2GIR_cjs = require('./chunk-YG7U2GIR.cjs');
|
|
12
|
-
var chunkUHCRNFFC_cjs = require('./chunk-UHCRNFFC.cjs');
|
|
13
|
-
var chunkZFATNDSY_cjs = require('./chunk-ZFATNDSY.cjs');
|
|
14
|
-
|
|
15
|
-
// src/unplugin.ts
|
|
16
|
-
var plugins = {
|
|
17
|
-
astro: chunkL2SAK2JC_cjs.astro_default,
|
|
18
|
-
esbuild: chunkZBDP43LG_cjs.esbuild_default,
|
|
19
|
-
next: chunk66GXB2UY_cjs.next_default,
|
|
20
|
-
nuxt: chunkYG7U2GIR_cjs.nuxt_default,
|
|
21
|
-
rolldown: chunkLXMNDUPG_cjs.rolldown_default,
|
|
22
|
-
rollup: chunkRQ4CHMPO_cjs.rollup_default,
|
|
23
|
-
rspack: chunkIJBH5OUN_cjs.rspack_default,
|
|
24
|
-
tsup: chunkQHGPZK2H_cjs.tsup_default,
|
|
25
|
-
unloader: chunkS5QFX2GM_cjs.unloader_default,
|
|
26
|
-
vite: chunkUHCRNFFC_cjs.vite_default,
|
|
27
|
-
webpack: chunkZFATNDSY_cjs.webpack_default
|
|
28
|
-
};
|
|
29
|
-
var unplugin_default = plugins;
|
|
30
|
-
|
|
31
|
-
exports.plugins = plugins;
|
|
32
|
-
exports.unplugin_default = unplugin_default;
|
|
33
|
-
//# sourceMappingURL=chunk-SL3CXJWD.cjs.map
|
|
34
|
-
//# sourceMappingURL=chunk-SL3CXJWD.cjs.map
|
package/dist/chunk-YG7U2GIR.cjs
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkUHCRNFFC_cjs = require('./chunk-UHCRNFFC.cjs');
|
|
4
|
-
var chunkZFATNDSY_cjs = require('./chunk-ZFATNDSY.cjs');
|
|
5
|
-
var kit = require('@nuxt/kit');
|
|
6
|
-
require('@nuxt/schema');
|
|
7
|
-
|
|
8
|
-
var nuxt = kit.defineNuxtModule({
|
|
9
|
-
meta: {
|
|
10
|
-
name: "powerlines",
|
|
11
|
-
configKey: "storm"
|
|
12
|
-
},
|
|
13
|
-
defaults: {},
|
|
14
|
-
setup(options, _nuxt) {
|
|
15
|
-
kit.addVitePlugin(() => chunkUHCRNFFC_cjs.vite_default(options));
|
|
16
|
-
kit.addWebpackPlugin(() => chunkZFATNDSY_cjs.webpack_default(options));
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
var nuxt_default = nuxt;
|
|
20
|
-
|
|
21
|
-
exports.nuxt = nuxt;
|
|
22
|
-
exports.nuxt_default = nuxt_default;
|
|
23
|
-
//# sourceMappingURL=chunk-YG7U2GIR.cjs.map
|
|
24
|
-
//# sourceMappingURL=chunk-YG7U2GIR.cjs.map
|
package/dist/chunk-ZFATNDSY.cjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunk2RHPFVYT_cjs = require('./chunk-2RHPFVYT.cjs');
|
|
4
|
-
var unplugin = require('unplugin');
|
|
5
|
-
|
|
6
|
-
var webpack = unplugin.createWebpackPlugin(chunk2RHPFVYT_cjs.createUnpluginFactory("webpack"));
|
|
7
|
-
var webpack_default = webpack;
|
|
8
|
-
|
|
9
|
-
exports.webpack = webpack;
|
|
10
|
-
exports.webpack_default = webpack_default;
|
|
11
|
-
//# sourceMappingURL=chunk-ZFATNDSY.cjs.map
|
|
12
|
-
//# sourceMappingURL=chunk-ZFATNDSY.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/typescript/program.ts"],"names":["SourcesMap","Map","loadLibFiles","libLocation","resolvePackage","Error","libFiles","listFiles","joinPaths","length","lib","file","set","findFileName","readFile","getDefaultCompilerOptions","ts","jsx","JsxEmit","React","strict","esModuleInterop","module","ModuleKind","ESNext","suppressOutputPathCheck","skipLibCheck","skipDefaultLibCheck","moduleResolution","ModuleResolutionKind","Node10","createVirtualProgram","rootNames","context","compilerOptions","options","defu","host","name","root","workspaceConfig","workspaceRoot","sys","realpath","path","fs","existsSync","resolve","getCurrentDirectory","getCanonicalFileName","fileName","getDefaultLibFileName","_options","getDefaultLibLocation","getNewLine","useCaseSensitiveFileNames","fileExists","readFileSync","undefined","readDirectory","__name","extensions","exclude","include","results","readdirSync","encoding","recursive","filter","some","ext","endsWith","startsWith","pattern","minimatch","writeFile","data","writeFileSync","resolvePath","getSourceFile","languageVersionOrOptions","_","shouldCreateNewSourceFile","createSourceFile","target","sourceFile","text","createProgram","createVirtualCompilerHost","sourceFiles","save","vHost","compilerHost","newLine","get","updateFile","alreadyExists","has","deleteFile","delete"],"mappings":";;;;;;;;;;;;;;;;;AA4BO,IAAMA,UAAAA,GAAaC;AAI1B,eAAsBC,YAAAA,GAAAA;AACpB,EAAA,MAAMC,WAAAA,GAAc,MAAMC,sBAAAA,CAAe,YAAA,CAAA;AACzC,EAAA,IAAI,CAACD,WAAAA,EAAa;AAChB,IAAA,MAAM,IAAIE,MAAM,gDAAA,CAAA;AAClB,EAAA;AAEA,EAAA,MAAMC,QAAAA,GAAW,MAAMC,mBAAAA,CACrBC,mBAAAA,CAAUL,aAAa,KAAA,EAAO,IAAA,EAAM,YAAA,CAAA,CAAA;AAEtC,EAAA,IAAIG,QAAAA,CAASG,WAAW,CAAA,EAAG;AACzB,IAAA,MAAM,IAAIJ,MAAM,oCAAA,CAAA;AAClB,EAAA;AAEA,EAAA,MAAMK,GAAAA,uBAAsBT,GAAAA,EAAAA;AAC5B,EAAA,KAAA,MAAWU,QAAQL,QAAAA,EAAU;AAC3BI,IAAAA,GAAAA,CAAIE,GAAAA,CACF,gCAAgCC,wBAAAA,CAAaF,IAAAA,CAAAA,CAAAA,CAAAA,EAC7C,MAAMG,iBAAAA,CAASH,IAAAA,CAAAA,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MAAAA,GAAAA,CAAIiC,SAAAA,CAAUU,UAAAA,CAAWnC,QAAAA,EAAUmC,UAAAA,CAAWC,IAAI,CAAA;AAClDG,MAAAA,WAAAA,CAAY7E,GAAAA,CAAIyE,UAAAA,CAAWnC,QAAAA,EAAUmC,UAAAA,CAAAA;AACrC,MAAA,OAAOW,aAAAA;IACT,CAAA,EALYX,YAAAA,CAAAA;AAMZa,IAAAA,UAAAA,4CAAYb,UAAAA,KAAAA;AACV,MAAA,MAAMW,aAAAA,GAAgBP,WAAAA,CAAYQ,GAAAA,CAAIZ,UAAAA,CAAWnC,QAAQ,CAAA;AACzDuC,MAAAA,WAAAA,CAAYU,MAAAA,CAAOd,WAAWnC,QAAQ,CAAA;AACtCR,MAAAA,GAAAA,CAAIwD,UAAAA,CAAYb,WAAWnC,QAAQ,CAAA;AACnC,MAAA,OAAO8C,aAAAA;IACT,CAAA,EALYX,YAAAA;AAMd,GAAA;AAEA,EAAA,OAAOM,KAAAA;AACT;AAhDgBH,wBAAAA,CAAAA,yBAAAA,EAAAA,2BAAAA,CAAAA","file":"chunk-6U2UX2PX.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 { listFiles } from \"@stryke/fs/list-files\";\nimport { readFile } from \"@stryke/fs/read-file\";\nimport { resolvePackage } from \"@stryke/fs/resolve\";\nimport { findFileName } from \"@stryke/path/file-path-fns\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport defu from \"defu\";\nimport { minimatch } from \"minimatch\";\nimport ts, { CompilerOptions } from \"typescript\";\nimport { Context } from \"../../types/context\";\n\nexport const SourcesMap = Map<string, string>;\n// eslint-disable-next-line ts/no-redeclare\nexport type SourcesMap = InstanceType<typeof SourcesMap>;\n\nexport async function loadLibFiles(): Promise<SourcesMap> {\n const libLocation = await resolvePackage(\"typescript\");\n if (!libLocation) {\n throw new Error(\"Could not resolve TypeScript package location.\");\n }\n\n const libFiles = await listFiles(\n joinPaths(libLocation, \"lib\", \"**\", \"lib.*.d.ts\")\n );\n if (libFiles.length === 0) {\n throw new Error(\"No TypeScript library files found.\");\n }\n\n const lib: SourcesMap = new Map();\n for (const file of libFiles) {\n lib.set(\n `/node_modules/typescript/lib/${findFileName(file)}`,\n await readFile(file)\n );\n }\n\n return lib;\n}\n\n/** The default compiler options if TypeScript could ever change the compiler options */\nexport function getDefaultCompilerOptions(): CompilerOptions {\n return {\n ...ts.getDefaultCompilerOptions(),\n jsx: ts.JsxEmit.React,\n strict: true,\n esModuleInterop: true,\n module: ts.ModuleKind.ESNext,\n suppressOutputPathCheck: true,\n skipLibCheck: true,\n skipDefaultLibCheck: true,\n moduleResolution: ts.ModuleResolutionKind.Node10\n };\n}\n\n/**\n * Creates a TypeScript program from in-memory, virtual source files.\n *\n * @param rootNames - An array of root file names to include in the program.\n * @param context - The context containing options and environment paths.\n * @param compilerOptions - Optional TypeScript compiler options. Defaults to the standard TypeScript options\n * @returns A TypeScript program instance that can be used for type checking, emitting, etc.\n * @throws If the provided library files are not in the expected format or if the TypeScript package cannot be resolved.\n */\nexport async function createVirtualProgram(\n rootNames: readonly string[],\n context: Context,\n compilerOptions: ts.CompilerOptions = {}\n): Promise<ts.Program> {\n const options = defu(compilerOptions, getDefaultCompilerOptions());\n\n const host = {\n name: \"storm-vfs\",\n root: context.workspaceConfig.workspaceRoot,\n ...ts.sys,\n realpath: (path: string) => {\n if (context.fs.existsSync(path)) {\n return context.fs.resolve(path);\n }\n\n return ts.sys.realpath?.(path) ?? path;\n },\n getCurrentDirectory(): string {\n return context.workspaceConfig.workspaceRoot;\n },\n getCanonicalFileName(fileName: string): string {\n return fileName;\n },\n getDefaultLibFileName(_options: ts.CompilerOptions): string {\n return ts.getDefaultLibFileName(options);\n },\n getDefaultLibLocation(): string {\n return \"/\";\n },\n getNewLine(): string {\n return \"\\n\";\n },\n useCaseSensitiveFileNames(): boolean {\n return true;\n },\n fileExists(fileName: string): boolean {\n return context.fs.existsSync(fileName);\n },\n readFile(fileName: string): string | undefined {\n if (context.fs.existsSync(fileName)) {\n return context.fs.readFileSync(fileName);\n }\n\n return undefined;\n },\n readDirectory: (\n path: string,\n extensions: readonly string[] = [],\n exclude: readonly string[] = [],\n include: readonly string[] = []\n ) => {\n let results = [] as string[];\n if (context.fs.existsSync(path)) {\n results = context.fs.readdirSync(path, {\n encoding: \"utf8\",\n recursive: true\n });\n\n if (extensions.length > 0) {\n results = results.filter(file =>\n extensions.some(ext =>\n file.endsWith(ext.startsWith(\".\") ? ext : `.${ext}`)\n )\n );\n }\n\n if (exclude.length > 0) {\n results = results.filter(\n file => !exclude.some(pattern => minimatch(file, pattern))\n );\n }\n\n if (include.length > 0) {\n results = results.filter(file =>\n include.some(pattern => minimatch(file, pattern))\n );\n }\n }\n\n return results;\n },\n writeFile(fileName: string, data: string): void {\n context.fs.writeFileSync(fileName, data);\n },\n resolvePath: (fileName: string): string => {\n if (context.fs.existsSync(fileName)) {\n return context.fs.resolve(fileName) as string;\n }\n\n return ts.sys.resolvePath(fileName);\n },\n getSourceFile(\n fileName: string,\n languageVersionOrOptions: ts.ScriptTarget | ts.CreateSourceFileOptions,\n _?: (message: string) => void,\n shouldCreateNewSourceFile?: boolean\n ): ts.SourceFile | undefined {\n if (context.fs.existsSync(fileName)) {\n return ts.createSourceFile(\n fileName,\n context.fs.readFileSync(fileName)!,\n languageVersionOrOptions ??\n compilerOptions.target ??\n getDefaultCompilerOptions().target!,\n false\n );\n } else if (shouldCreateNewSourceFile) {\n const sourceFile = ts.createSourceFile(\n fileName,\n \"\",\n languageVersionOrOptions ??\n compilerOptions.target ??\n getDefaultCompilerOptions().target!,\n false\n );\n context.fs.writeFileSync(fileName, sourceFile.text);\n return sourceFile;\n }\n\n return undefined;\n }\n } as ts.CompilerHost;\n\n return ts.createProgram(rootNames, options, host);\n}\n\ninterface VirtualCompilerHostReturn {\n compilerHost: ts.CompilerHost;\n updateFile: (sourceFile: ts.SourceFile) => boolean;\n deleteFile: (sourceFile: ts.SourceFile) => boolean;\n}\n\n/**\n * Creates an in-memory CompilerHost -which is essentially an extra wrapper to System\n * which works with TypeScript objects - returns both a compiler host, and a way to add new SourceFile\n * instances to the in-memory file system.\n */\nexport function createVirtualCompilerHost(\n sys: ts.System,\n compilerOptions: ts.CompilerOptions\n) {\n const sourceFiles = new Map<string, ts.SourceFile>();\n const save = (sourceFile: ts.SourceFile) => {\n sourceFiles.set(sourceFile.fileName, sourceFile);\n return sourceFile;\n };\n\n const vHost: VirtualCompilerHostReturn = {\n compilerHost: {\n ...sys,\n getCanonicalFileName: fileName => fileName,\n getDefaultLibFileName: () =>\n `/${ts.getDefaultLibFileName(compilerOptions)}`, // '/lib.d.ts',\n // getDefaultLibLocation: () => '/',\n getNewLine: () => sys.newLine,\n getSourceFile: (fileName, languageVersionOrOptions) => {\n return (\n sourceFiles.get(fileName) ??\n save(\n ts.createSourceFile(\n fileName,\n sys.readFile(fileName)!,\n languageVersionOrOptions ?? compilerOptions.target,\n false\n )\n )\n );\n },\n useCaseSensitiveFileNames: () => sys.useCaseSensitiveFileNames\n },\n updateFile: sourceFile => {\n const alreadyExists = sourceFiles.has(sourceFile.fileName);\n sys.writeFile(sourceFile.fileName, sourceFile.text);\n sourceFiles.set(sourceFile.fileName, sourceFile);\n return alreadyExists;\n },\n deleteFile: sourceFile => {\n const alreadyExists = sourceFiles.has(sourceFile.fileName);\n sourceFiles.delete(sourceFile.fileName);\n sys.deleteFile!(sourceFile.fileName);\n return alreadyExists;\n }\n };\n\n return vHost;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/typescript/program.ts"],"names":["SourcesMap","Map","loadLibFiles","libLocation","resolvePackage","Error","libFiles","listFiles","joinPaths","length","lib","file","set","findFileName","readFile","getDefaultCompilerOptions","ts","jsx","JsxEmit","React","strict","esModuleInterop","module","ModuleKind","ESNext","suppressOutputPathCheck","skipLibCheck","skipDefaultLibCheck","moduleResolution","ModuleResolutionKind","Node10","createVirtualProgram","rootNames","context","compilerOptions","options","defu","host","name","root","workspaceConfig","workspaceRoot","sys","realpath","path","fs","existsSync","resolve","getCurrentDirectory","getCanonicalFileName","fileName","getDefaultLibFileName","_options","getDefaultLibLocation","getNewLine","useCaseSensitiveFileNames","fileExists","readFileSync","undefined","readDirectory","extensions","exclude","include","results","readdirSync","encoding","recursive","filter","some","ext","endsWith","startsWith","pattern","minimatch","writeFile","data","writeFileSync","resolvePath","getSourceFile","languageVersionOrOptions","_","shouldCreateNewSourceFile","createSourceFile","target","sourceFile","text","createProgram","createVirtualCompilerHost","sourceFiles","save","vHost","compilerHost","newLine","get","updateFile","alreadyExists","has","deleteFile","delete"],"mappings":";;;;;;;;;;AA4BO,IAAMA,UAAAA,GAAaC;AAI1B,eAAsBC,YAAAA,GAAAA;AACpB,EAAA,MAAMC,WAAAA,GAAc,MAAMC,cAAAA,CAAe,YAAA,CAAA;AACzC,EAAA,IAAI,CAACD,WAAAA,EAAa;AAChB,IAAA,MAAM,IAAIE,MAAM,gDAAA,CAAA;AAClB,EAAA;AAEA,EAAA,MAAMC,QAAAA,GAAW,MAAMC,SAAAA,CACrBC,SAAAA,CAAUL,aAAa,KAAA,EAAO,IAAA,EAAM,YAAA,CAAA,CAAA;AAEtC,EAAA,IAAIG,QAAAA,CAASG,WAAW,CAAA,EAAG;AACzB,IAAA,MAAM,IAAIJ,MAAM,oCAAA,CAAA;AAClB,EAAA;AAEA,EAAA,MAAMK,GAAAA,uBAAsBT,GAAAA,EAAAA;AAC5B,EAAA,KAAA,MAAWU,QAAQL,Q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AA,KAAAA;AACV,MAAA,MAAMW,aAAAA,GAAgBP,WAAAA,CAAYQ,GAAAA,CAAIZ,UAAAA,CAAWlC,QAAQ,CAAA;AACzDR,MAAAA,GAAAA,CAAIgC,SAAAA,CAAUU,UAAAA,CAAWlC,QAAAA,EAAUkC,UAAAA,CAAWC,IAAI,CAAA;AAClDG,MAAAA,WAAAA,CAAY5E,GAAAA,CAAIwE,UAAAA,CAAWlC,QAAAA,EAAUkC,UAAAA,CAAAA;AACrC,MAAA,OAAOW,aAAAA;IACT,CAAA,EALYX,YAAAA,CAAAA;AAMZa,IAAAA,UAAAA,0BAAYb,UAAAA,KAAAA;AACV,MAAA,MAAMW,aAAAA,GAAgBP,WAAAA,CAAYQ,GAAAA,CAAIZ,UAAAA,CAAWlC,QAAQ,CAAA;AACzDsC,MAAAA,WAAAA,CAAYU,MAAAA,CAAOd,WAAWlC,QAAQ,CAAA;AACtCR,MAAAA,GAAAA,CAAIuD,UAAAA,CAAYb,WAAWlC,QAAQ,CAAA;AACnC,MAAA,OAAO6C,aAAAA;IACT,CAAA,EALYX,YAAAA;AAMd,GAAA;AAEA,EAAA,OAAOM,KAAAA;AACT;AAhDgBH,MAAAA,CAAAA,yBAAAA,EAAAA,2BAAAA,CAAAA","file":"chunk-KFE2IR3Y.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 { listFiles } from \"@stryke/fs/list-files\";\nimport { readFile } from \"@stryke/fs/read-file\";\nimport { resolvePackage } from \"@stryke/fs/resolve\";\nimport { findFileName } from \"@stryke/path/file-path-fns\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport defu from \"defu\";\nimport { minimatch } from \"minimatch\";\nimport ts, { CompilerOptions } from \"typescript\";\nimport { Context } from \"../../types/context\";\n\nexport const SourcesMap = Map<string, string>;\n// eslint-disable-next-line ts/no-redeclare\nexport type SourcesMap = InstanceType<typeof SourcesMap>;\n\nexport async function loadLibFiles(): Promise<SourcesMap> {\n const libLocation = await resolvePackage(\"typescript\");\n if (!libLocation) {\n throw new Error(\"Could not resolve TypeScript package location.\");\n }\n\n const libFiles = await listFiles(\n joinPaths(libLocation, \"lib\", \"**\", \"lib.*.d.ts\")\n );\n if (libFiles.length === 0) {\n throw new Error(\"No TypeScript library files found.\");\n }\n\n const lib: SourcesMap = new Map();\n for (const file of libFiles) {\n lib.set(\n `/node_modules/typescript/lib/${findFileName(file)}`,\n await readFile(file)\n );\n }\n\n return lib;\n}\n\n/** The default compiler options if TypeScript could ever change the compiler options */\nexport function getDefaultCompilerOptions(): CompilerOptions {\n return {\n ...ts.getDefaultCompilerOptions(),\n jsx: ts.JsxEmit.React,\n strict: true,\n esModuleInterop: true,\n module: ts.ModuleKind.ESNext,\n suppressOutputPathCheck: true,\n skipLibCheck: true,\n skipDefaultLibCheck: true,\n moduleResolution: ts.ModuleResolutionKind.Node10\n };\n}\n\n/**\n * Creates a TypeScript program from in-memory, virtual source files.\n *\n * @param rootNames - An array of root file names to include in the program.\n * @param context - The context containing options and environment paths.\n * @param compilerOptions - Optional TypeScript compiler options. Defaults to the standard TypeScript options\n * @returns A TypeScript program instance that can be used for type checking, emitting, etc.\n * @throws If the provided library files are not in the expected format or if the TypeScript package cannot be resolved.\n */\nexport async function createVirtualProgram(\n rootNames: readonly string[],\n context: Context,\n compilerOptions: ts.CompilerOptions = {}\n): Promise<ts.Program> {\n const options = defu(compilerOptions, getDefaultCompilerOptions());\n\n const host = {\n name: \"storm-vfs\",\n root: context.workspaceConfig.workspaceRoot,\n ...ts.sys,\n realpath: (path: string) => {\n if (context.fs.existsSync(path)) {\n return context.fs.resolve(path);\n }\n\n return ts.sys.realpath?.(path) ?? path;\n },\n getCurrentDirectory(): string {\n return context.workspaceConfig.workspaceRoot;\n },\n getCanonicalFileName(fileName: string): string {\n return fileName;\n },\n getDefaultLibFileName(_options: ts.CompilerOptions): string {\n return ts.getDefaultLibFileName(options);\n },\n getDefaultLibLocation(): string {\n return \"/\";\n },\n getNewLine(): string {\n return \"\\n\";\n },\n useCaseSensitiveFileNames(): boolean {\n return true;\n },\n fileExists(fileName: string): boolean {\n return context.fs.existsSync(fileName);\n },\n readFile(fileName: string): string | undefined {\n if (context.fs.existsSync(fileName)) {\n return context.fs.readFileSync(fileName);\n }\n\n return undefined;\n },\n readDirectory: (\n path: string,\n extensions: readonly string[] = [],\n exclude: readonly string[] = [],\n include: readonly string[] = []\n ) => {\n let results = [] as string[];\n if (context.fs.existsSync(path)) {\n results = context.fs.readdirSync(path, {\n encoding: \"utf8\",\n recursive: true\n });\n\n if (extensions.length > 0) {\n results = results.filter(file =>\n extensions.some(ext =>\n file.endsWith(ext.startsWith(\".\") ? ext : `.${ext}`)\n )\n );\n }\n\n if (exclude.length > 0) {\n results = results.filter(\n file => !exclude.some(pattern => minimatch(file, pattern))\n );\n }\n\n if (include.length > 0) {\n results = results.filter(file =>\n include.some(pattern => minimatch(file, pattern))\n );\n }\n }\n\n return results;\n },\n writeFile(fileName: string, data: string): void {\n context.fs.writeFileSync(fileName, data);\n },\n resolvePath: (fileName: string): string => {\n if (context.fs.existsSync(fileName)) {\n return context.fs.resolve(fileName) as string;\n }\n\n return ts.sys.resolvePath(fileName);\n },\n getSourceFile(\n fileName: string,\n languageVersionOrOptions: ts.ScriptTarget | ts.CreateSourceFileOptions,\n _?: (message: string) => void,\n shouldCreateNewSourceFile?: boolean\n ): ts.SourceFile | undefined {\n if (context.fs.existsSync(fileName)) {\n return ts.createSourceFile(\n fileName,\n context.fs.readFileSync(fileName)!,\n languageVersionOrOptions ??\n compilerOptions.target ??\n getDefaultCompilerOptions().target!,\n false\n );\n } else if (shouldCreateNewSourceFile) {\n const sourceFile = ts.createSourceFile(\n fileName,\n \"\",\n languageVersionOrOptions ??\n compilerOptions.target ??\n getDefaultCompilerOptions().target!,\n false\n );\n context.fs.writeFileSync(fileName, sourceFile.text);\n return sourceFile;\n }\n\n return undefined;\n }\n } as ts.CompilerHost;\n\n return ts.createProgram(rootNames, options, host);\n}\n\ninterface VirtualCompilerHostReturn {\n compilerHost: ts.CompilerHost;\n updateFile: (sourceFile: ts.SourceFile) => boolean;\n deleteFile: (sourceFile: ts.SourceFile) => boolean;\n}\n\n/**\n * Creates an in-memory CompilerHost -which is essentially an extra wrapper to System\n * which works with TypeScript objects - returns both a compiler host, and a way to add new SourceFile\n * instances to the in-memory file system.\n */\nexport function createVirtualCompilerHost(\n sys: ts.System,\n compilerOptions: ts.CompilerOptions\n) {\n const sourceFiles = new Map<string, ts.SourceFile>();\n const save = (sourceFile: ts.SourceFile) => {\n sourceFiles.set(sourceFile.fileName, sourceFile);\n return sourceFile;\n };\n\n const vHost: VirtualCompilerHostReturn = {\n compilerHost: {\n ...sys,\n getCanonicalFileName: fileName => fileName,\n getDefaultLibFileName: () =>\n `/${ts.getDefaultLibFileName(compilerOptions)}`, // '/lib.d.ts',\n // getDefaultLibLocation: () => '/',\n getNewLine: () => sys.newLine,\n getSourceFile: (fileName, languageVersionOrOptions) => {\n return (\n sourceFiles.get(fileName) ??\n save(\n ts.createSourceFile(\n fileName,\n sys.readFile(fileName)!,\n languageVersionOrOptions ?? compilerOptions.target,\n false\n )\n )\n );\n },\n useCaseSensitiveFileNames: () => sys.useCaseSensitiveFileNames\n },\n updateFile: sourceFile => {\n const alreadyExists = sourceFiles.has(sourceFile.fileName);\n sys.writeFile(sourceFile.fileName, sourceFile.text);\n sourceFiles.set(sourceFile.fileName, sourceFile);\n return alreadyExists;\n },\n deleteFile: sourceFile => {\n const alreadyExists = sourceFiles.has(sourceFile.fileName);\n sourceFiles.delete(sourceFile.fileName);\n sys.deleteFile!(sourceFile.fileName);\n return alreadyExists;\n }\n };\n\n return vHost;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/vfs.ts","../../src/lib/utilities/meta.ts"],"names":["__VFS_INIT__","__VFS_REVERT__","__VFS_CACHE__","__VFS_RESOLVER__","__VFS_VIRTUAL__","__VFS_UNIFIED__","PROJECT_ROOT_HASH_LENGTH","CACHE_HASH_LENGTH","getPrefixedProjectRootHash","name","projectRootHash","combined","kebabCase","length","slice","discoverTemplatePath","path","Promise","all","resolve","test","includes","hasFileExtension","joinPaths","listFiles","flat","filter","Boolean","discoverTemplates","context","paths","getUnique","map","config","sourceRoot","envPaths","projectRoot","reduce","ret","existsSync","push","getChecksum","hashDirectory","ignore","getPersistedMeta","metaFilePath","dataPath","readJsonFile","log","LogLevelLabel","WARN","removeFile","persistedMeta","undefined","writeMetaFile","DEBUG","fs","writeFile","JSON","stringify","meta","virtualFiles","toJSON","artifactsPath","virtualFilesMeta","getPartialMeta","mode"],"mappings":";;;;;;;;;;;;;AAoCO,IAAMA,YAAAA,GAAe;AAGrB,IAAMC,cAAAA,GAAiB;AAGvB,IAAMC,aAAAA,GAAgB;AAGtB,IAAMC,gBAAAA,GAAmB;AAGzB,IAAMC,eAAAA,GAAkB;AAGxB,IAAMC,eAAAA,GAAkB;;;AChBxB,IAAMC,wBAAAA,GAA2B;AACjC,IAAMC,iBAAAA,GAAoB;AAY1B,SAASC,0BAAAA,CACdC,MACAC,eAAAA,EAAuB;AAEvB,EAAA,MAAMC,WAAW,CAAA,EAAGC,SAAAA,CAAUH,IAAAA,CAAAA,IAASC,eAAAA,CAAAA,CAAAA;AAEvC,EAAA,OAAOC,SAASE,MAAAA,GAASP,wBAAAA,GACrBK,SAASG,KAAAA,CAAM,CAAA,EAAGR,wBAAAA,CAAAA,GAClBK,QAAAA;AACN;AATgBH,MAAAA,CAAAA,0BAAAA,EAAAA,4BAA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AWN,YAAAA,CAAAA;AAEjBhB,MAAAA,OAAAA,CAAQuB,aAAAA,GAAgBC,MAAAA;AAC1B,IAAA;AACF,EAAA;AAEA,EAAA,OAAOA,MAAAA;AACT;AAnBsBT,MAAAA,CAAAA,gBAAAA,EAAAA,kBAAAA,CAAAA;AA2BtB,eAAsBU,cAAczB,OAAAA,EAAgB;AAClD,EAAA,MAAMgB,YAAAA,GAAetB,SAAAA,CAAUM,OAAAA,CAAQiB,QAAAA,EAAU,WAAA,CAAA;AAEjDjB,EAAAA,OAAAA,CAAQmB,GAAAA,CACNC,aAAAA,CAAcM,KAAAA,EACd,CAAA,4BAAA,EAA+BV,YAAAA,CAAAA,CAAc,CAAA;AAG/C,EAAA,MAAMhB,OAAAA,CAAQ2B,EAAAA,CAAGC,SAAAA,CACfZ,YAAAA,EACAa,KAAKC,SAAAA,CACH;AACE,IAAA,GAAG9B,OAAAA,CAAQ+B,IAAAA;AACXC,IAAAA,YAAAA,EAAchC,QAAQ2B,EAAAA,CAAGpD,eAAAA,CAAAA,CAAiB0D,MAAAA,CAAOjC,QAAQkC,aAAa,CAAA;IACtEC,gBAAAA,EAAkBnC,OAAAA,CAAQ2B,GAAGS,cAAAA;GAC/B,EACA,IAAA,EACA,CAAA,CAAA,EAEF;IACEC,IAAAA,EAAM;GACR,CAAA;AAEJ;AAvBsBZ,MAAAA,CAAAA,aAAAA,EAAAA,eAAAA,CAAAA","file":"chunk-M7U5RMK7.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 { PrimitiveJsonValue } from \"@stryke/json/types\";\nimport type { Volume } from \"memfs\";\nimport type {\n MakeDirectoryOptions as FsMakeDirectoryOptions,\n WriteFileOptions as FsWriteFileOptions,\n Mode,\n PathLike,\n PathOrFileDescriptor,\n RmDirOptions,\n RmOptions,\n Stats,\n StatSyncOptions\n} from \"node:fs\";\nimport type { IUnionFs } from \"unionfs\";\n\nexport type VirtualFileExtension = \"js\" | \"ts\" | \"jsx\" | \"tsx\";\n\n// eslint-disable-next-line ts/naming-convention\nexport const __VFS_INIT__ = \"__VFS_INIT__\";\n\n// eslint-disable-next-line ts/naming-convention\nexport const __VFS_REVERT__ = \"__VFS_REVERT__\";\n\n// eslint-disable-next-line ts/naming-convention\nexport const __VFS_CACHE__ = \"__VFS_CACHE__\";\n\n// eslint-disable-next-line ts/naming-convention\nexport const __VFS_RESOLVER__ = \"__VFS_RESOLVER__\";\n\n// eslint-disable-next-line ts/naming-convention\nexport const __VFS_VIRTUAL__ = \"__VFS_VIRTUAL__\";\n\n// eslint-disable-next-line ts/naming-convention\nexport const __VFS_UNIFIED__ = \"__VFS_UNIFIED__\";\n\nexport type OutputModeType = \"fs\" | \"virtual\";\n\nexport interface VirtualFile {\n /**\n * The unique identifier for the virtual file.\n *\n * @remarks\n * If no specific id is provided, it defaults to the file's {@link path}.\n */\n id: string;\n\n /**\n * Additional metadata associated with the virtual file.\n */\n details: Record<string, PrimitiveJsonValue>;\n\n /**\n * The variant of the file.\n *\n * @remarks\n * This string represents the purpose/function of the file in the virtual file system. A potential list of variants includes:\n * - `builtin`: Indicates that the file is a built-in module provided by the system.\n * - `entry`: Indicates that the file is an entry point for execution.\n * - `normal`: Indicates that the file is a standard file without any special role.\n */\n variant: string;\n\n /**\n * The output mode of the file.\n *\n * @remarks\n * This indicates whether the file is intended to be written to the actual file system (`fs`) or kept in the virtual file system (`virtual`).\n */\n mode: OutputModeType;\n\n /**\n * A virtual (or actual) path to the file in the file system.\n */\n path: string;\n\n /**\n * The contents of the file.\n */\n code: string | NodeJS.ArrayBufferView;\n}\n\nexport type VirtualFileSystemMetadata = Pick<\n VirtualFile,\n \"id\" | \"details\" | \"variant\" | \"mode\"\n>;\n\nexport interface ResolveFSOptions {\n mode?: OutputModeType;\n}\n\nexport type MakeDirectoryOptions = (Mode | FsMakeDirectoryOptions) &\n ResolveFSOptions;\n\nexport interface PowerlinesWriteFileOptions extends ResolveFSOptions {\n skipFormat?: boolean;\n}\n\nexport type NodeWriteFileOptions = FsWriteFileOptions;\n\nexport type WriteFileOptions =\n | NodeWriteFileOptions\n | PowerlinesWriteFileOptions;\n\nexport type PowerLinesWriteFileData = Partial<\n Omit<VirtualFile, \"path\" | \"mode\" | \"code\">\n> &\n Pick<VirtualFile, \"code\">;\n\nexport type WriteFileData =\n | string\n | NodeJS.ArrayBufferView\n | PowerLinesWriteFileData;\n\nexport interface ResolvePathOptions extends ResolveFSOptions {\n /**\n * Should the resolved path include the file extension?\n *\n * @defaultValue true\n */\n withExtension?: boolean;\n\n /**\n * The paths to search for the file.\n */\n paths?: string[];\n\n /**\n * The type of the path to resolve.\n */\n type?: \"file\" | \"directory\";\n}\n\nexport interface VirtualFileSystemInterface {\n [__VFS_INIT__]: () => void;\n [__VFS_REVERT__]: () => void;\n\n /**\n * The underlying file metadata.\n */\n meta: Record<string, VirtualFileSystemMetadata | undefined>;\n\n /**\n * A map of module ids to their file paths.\n */\n ids: Record<string, string>;\n\n /**\n * Check if a path or id corresponds to a virtual file **(does not actually exists on disk)**.\n *\n * @param pathOrId - The path or id to check.\n * @param options - Optional parameters for resolving the path.\n * @returns Whether the path or id corresponds to a virtual file **(does not actually exists on disk)**.\n */\n isVirtual: (pathOrId: string, options?: ResolvePathOptions) => boolean;\n\n /**\n * Check if a path or id corresponds to a file written to the file system **(actually exists on disk)**.\n *\n * @param pathOrId - The path or id to check.\n * @param options - Optional parameters for resolving the path.\n * @returns Whether the path or id corresponds to a file written to the file system **(actually exists on disk)**.\n */\n isFs: (pathOrId: string, options?: ResolvePathOptions) => boolean;\n\n /**\n * Checks if a file exists in the virtual file system (VFS).\n *\n * @param path - The path of the file to check.\n * @returns `true` if the file exists, otherwise `false`.\n */\n isFile: (path: string) => boolean;\n\n /**\n * Checks if a directory exists in the virtual file system (VFS).\n *\n * @param path - The path of the directory to check.\n * @returns `true` if the directory exists, otherwise `false`.\n */\n isDirectory: (path: string) => boolean;\n\n /**\n * Check if a path exists within one of the directories specified in the tsconfig.json's `path` field.\n *\n * @see https://www.typescriptlang.org/tsconfig#paths\n *\n * @param pathOrId - The path or id to check.\n * @returns Whether the path or id corresponds to a virtual file.\n */\n isTsconfigPath: (pathOrId: string) => boolean;\n\n /**\n * Checks if a file exists in the virtual file system (VFS).\n *\n * @param pathOrId - The path or id of the file.\n * @returns `true` if the file exists, otherwise `false`.\n */\n existsSync: (pathOrId: string) => boolean;\n\n /**\n * Gets the stats of a file in the virtual file system (VFS).\n *\n * @param pathOrId - The path or id of the file.\n * @param options - Optional parameters for getting the stats.\n * @returns The stats of the file if it exists, otherwise undefined.\n */\n lstat: (\n pathOrId: string,\n options?: StatSyncOptions & {\n bigint?: false | undefined;\n throwIfNoEntry: false;\n }\n ) => Promise<Stats>;\n\n /**\n * Gets the stats of a file in the virtual file system (VFS).\n *\n * @param pathOrId - The path or id of the file.\n * @param options - Optional parameters for getting the stats.\n * @returns The stats of the file if it exists, otherwise undefined.\n */\n lstatSync: (\n pathOrId: string,\n options?: StatSyncOptions & {\n bigint?: false | undefined;\n throwIfNoEntry: false;\n }\n ) => Stats | undefined;\n\n /**\n * Gets the stats of a file in the virtual file system (VFS).\n *\n * @param pathOrId - The path or id of the file.\n * @returns The stats of the file if it exists, otherwise false.\n */\n stat: (\n pathOrId: string,\n options?: StatSyncOptions & {\n bigint?: false | undefined;\n throwIfNoEntry: false;\n }\n ) => Promise<Stats>;\n\n /**\n * Gets the stats of a file in the virtual file system (VFS).\n *\n * @param pathOrId - The path or id of the file.\n * @returns The stats of the file if it exists, otherwise false.\n */\n statSync: (\n pathOrId: string,\n options?: StatSyncOptions & {\n bigint?: false | undefined;\n throwIfNoEntry: false;\n }\n ) => Stats | undefined;\n\n /**\n * Lists files in a given path.\n *\n * @param path - The path to list files from.\n * @param options - Options for listing files, such as encoding and recursion.\n * @returns An array of file names in the specified path.\n */\n readdirSync: (\n path: string,\n options?:\n | {\n encoding: BufferEncoding | null;\n withFileTypes?: false | undefined;\n recursive?: boolean | undefined;\n }\n | BufferEncoding\n ) => string[];\n\n /**\n * Lists files in a given path.\n *\n * @param path - The path to list files from.\n * @param options - Options for listing files, such as encoding and recursion.\n * @returns An array of file names in the specified path.\n */\n readdir: (\n path: string,\n options?:\n | {\n encoding: BufferEncoding | null;\n withFileTypes?: false | undefined;\n recursive?: boolean | undefined;\n }\n | BufferEncoding\n ) => Promise<string[]>;\n\n /**\n * Removes a file or symbolic link in the virtual file system (VFS).\n *\n * @param path - The path to the file to remove.\n * @returns A promise that resolves when the file is removed.\n */\n unlinkSync: (path: PathLike, options?: ResolveFSOptions) => void;\n\n /**\n * Asynchronously removes a file or symbolic link in the virtual file system (VFS).\n *\n * @param path - The path to the file to remove.\n * @returns A promise that resolves when the file is removed.\n */\n unlink: (path: string, options?: ResolveFSOptions) => Promise<void>;\n\n /**\n * Removes a directory in the virtual file system (VFS).\n *\n * @param path - The path to create the directory at.\n * @param options - Options for creating the directory.\n */\n rmdirSync: (path: PathLike, options?: RmDirOptions & ResolveFSOptions) => any;\n\n /**\n * Removes a directory in the virtual file system (VFS).\n *\n * @param path - The path to create the directory at.\n * @param options - Options for creating the directory.\n * @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.\n */\n rmdir: (\n path: PathLike,\n options?: RmDirOptions & ResolveFSOptions\n ) => Promise<void>;\n\n /**\n * Removes a file in the virtual file system (VFS).\n *\n * @param path - The path to the file to remove.\n * @param options - Options for removing the file.\n * @returns A promise that resolves when the file is removed.\n */\n rm: (path: PathLike, options?: RmOptions & ResolveFSOptions) => Promise<void>;\n\n /**\n * Creates a directory in the virtual file system (VFS).\n *\n * @param path - The path to create the directory at.\n * @param options - Options for creating the directory.\n * @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.\n */\n mkdirSync: (\n path: PathLike,\n options?: MakeDirectoryOptions\n ) => string | undefined;\n\n /**\n * Creates a directory in the virtual file system (VFS).\n *\n * @param path - The path to create the directory at.\n * @param options - Options for creating the directory.\n * @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.\n */\n mkdir: (\n path: PathLike,\n options?: MakeDirectoryOptions\n ) => Promise<string | undefined>;\n\n /**\n * Reads a file from the virtual file system (VFS).\n *\n * @param pathOrId - The path or id of the file.\n * @returns The contents of the file if it exists, otherwise undefined.\n */\n readFile: (pathOrId: string) => Promise<string | undefined>;\n\n /**\n * Reads a file from the virtual file system (VFS).\n *\n * @param pathOrId - The path or id of the file.\n */\n readFileSync: (pathOrId: string) => string | undefined;\n\n /**\n * Writes a file to the virtual file system (VFS).\n *\n * @param path - The path to the file.\n * @param data - The contents of the file.\n * @param options - Optional parameters for writing the file.\n * @returns A promise that resolves when the file is written.\n */\n writeFile: (\n path: PathOrFileDescriptor,\n data?: WriteFileData,\n options?: WriteFileOptions\n ) => Promise<void>;\n\n /**\n * Writes a file to the virtual file system (VFS).\n *\n * @param path - The path to the file.\n * @param data - The contents of the file.\n * @param options - Optional parameters for writing the file.\n */\n writeFileSync: (\n path: PathOrFileDescriptor,\n data?: WriteFileData,\n options?: WriteFileOptions\n ) => void;\n\n /**\n * Resolves a path or id to a file path in the virtual file system.\n *\n * @param pathOrId - The path or id of the file to resolve.\n * @param options - Optional parameters for resolving the path.\n * @returns The resolved path of the file if it exists, otherwise false.\n */\n resolve: (pathOrId: string, options?: ResolvePathOptions) => string | false;\n\n /**\n * Resolves a path based on TypeScript's `tsconfig.json` paths.\n *\n * @see https://www.typescriptlang.org/tsconfig#paths\n *\n * @param path - The path to check.\n * @returns The resolved file path if it exists, otherwise undefined.\n */\n resolveTsconfigPath: (path: string) => string | false;\n\n /**\n * Resolves a package name based on TypeScript's `tsconfig.json` paths.\n *\n * @see https://www.typescriptlang.org/tsconfig#paths\n *\n * @param path - The path to check.\n * @returns The resolved package name if it exists, otherwise undefined.\n */\n resolveTsconfigPathPackage: (path: string) => string | false;\n\n /**\n * Resolves a path or id to a file path in the virtual file system.\n *\n * @param pathOrId - The path or id of the file to resolve.\n * @returns The resolved path of the file if it exists, otherwise false.\n */\n realpathSync: (pathOrId: string) => string;\n\n /**\n * Retrieves a partial metadata mapping of all files in the virtual file system (VFS).\n *\n * @returns A record mapping file paths to their partial metadata.\n */\n getPartialMeta: () => Record<string, Partial<VirtualFileSystemMetadata>>;\n\n /**\n * A map of cached file paths to their underlying file content.\n */\n [__VFS_CACHE__]: Map<string, string>;\n\n /**\n * A reference to the underlying virtual file system.\n */\n [__VFS_VIRTUAL__]: Volume;\n\n /**\n * A reference to the underlying unified file system.\n */\n [__VFS_UNIFIED__]: IUnionFs;\n}\n","/* -------------------------------------------------------------------\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 { LogLevelLabel } from \"@storm-software/config-tools/types\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { readJsonFile } from \"@stryke/fs/json\";\nimport { listFiles } from \"@stryke/fs/list-files\";\nimport { removeFile } from \"@stryke/fs/remove-file\";\nimport { hashDirectory } from \"@stryke/hash/hash-files\";\nimport { getUnique } from \"@stryke/helpers/get-unique\";\nimport { hasFileExtension } from \"@stryke/path/file-path-fns\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { Context, MetaInfo } from \"../../types/context\";\nimport { __VFS_VIRTUAL__ } from \"../../types/vfs\";\n\nexport interface CreateContextOptions {\n name?: string;\n}\n\nexport const PROJECT_ROOT_HASH_LENGTH = 45;\nexport const CACHE_HASH_LENGTH = 62;\n\n/**\n * Generates a prefixed project root hash object.\n *\n * @remarks\n * This function returns a string where the project root hash is prefixed with the project name plus a hyphen. If the total length of this string combination exceeds 45 characters, it will truncate the hash.\n *\n * @param name - The name of the project.\n * @param projectRootHash - The hash of the project root.\n * @returns An object containing the name and project root hash.\n */\nexport function getPrefixedProjectRootHash(\n name: string,\n projectRootHash: string\n): string {\n const combined = `${kebabCase(name)}_${projectRootHash}`;\n\n return combined.length > PROJECT_ROOT_HASH_LENGTH\n ? combined.slice(0, PROJECT_ROOT_HASH_LENGTH)\n : combined;\n}\n\nasync function discoverTemplatePath(path: string): Promise<string[]> {\n return (\n await Promise.all([\n Promise.resolve(/.tsx?$/.test(path) && !path.includes(\"*\") && path),\n Promise.resolve(!hasFileExtension(path) && joinPaths(path, \".ts\")),\n Promise.resolve(!hasFileExtension(path) && joinPaths(path, \".tsx\")),\n Promise.resolve(\n !hasFileExtension(path) && listFiles(joinPaths(path, \"**/*.ts\"))\n ),\n Promise.resolve(\n !hasFileExtension(path) && listFiles(joinPaths(path, \"**/*.tsx\"))\n )\n ])\n )\n .flat()\n .filter(Boolean) as string[];\n}\n\nexport async function discoverTemplates(\n context: Context,\n paths: string[] = []\n): Promise<string[]> {\n return getUnique(\n (\n await Promise.all([\n ...paths.map(discoverTemplatePath),\n discoverTemplatePath(joinPaths(context.config.sourceRoot, \"plugin\")),\n discoverTemplatePath(joinPaths(context.envPaths.config, \"templates\")),\n discoverTemplatePath(joinPaths(context.config.projectRoot, \"templates\"))\n ])\n )\n .flat()\n .reduce((ret, path) => {\n if (existsSync(path)) {\n ret.push(path);\n }\n\n return ret;\n }, [] as string[])\n );\n}\n\nexport async function getChecksum(path: string): Promise<string> {\n return hashDirectory(path, {\n ignore: [\"node_modules\", \".git\", \".nx\", \".cache\", \".storm\", \"tmp\", \"dist\"]\n });\n}\n\n/**\n * Retrieves the persisted meta information from the context's data path.\n *\n * @param context - The build context.\n * @returns A promise that resolves to the persisted meta information, or undefined if not found.\n */\nexport async function getPersistedMeta(\n context: Context\n): Promise<MetaInfo | undefined> {\n const metaFilePath = joinPaths(context.dataPath, \"meta.json\");\n if (existsSync(metaFilePath)) {\n try {\n return await readJsonFile<MetaInfo>(metaFilePath);\n } catch {\n context.log(\n LogLevelLabel.WARN,\n `Failed to read meta file at ${metaFilePath}. It may be corrupted.`\n );\n await removeFile(metaFilePath);\n\n context.persistedMeta = undefined;\n }\n }\n\n return undefined;\n}\n\n/**\n * Writes the meta file for the context.\n *\n * @param context - The context to write the meta file for.\n * @returns A promise that resolves when the meta file has been written.\n */\nexport async function writeMetaFile(context: Context): Promise<void> {\n const metaFilePath = joinPaths(context.dataPath, \"meta.json\");\n\n context.log(\n LogLevelLabel.DEBUG,\n `Writing runtime metadata to ${metaFilePath}`\n );\n\n await context.fs.writeFile(\n metaFilePath,\n JSON.stringify(\n {\n ...context.meta,\n virtualFiles: context.fs[__VFS_VIRTUAL__].toJSON(context.artifactsPath),\n virtualFilesMeta: context.fs.getPartialMeta()\n },\n null,\n 2\n ),\n {\n mode: \"fs\"\n }\n );\n}\n"]}
|