powerlines 0.10.2 → 0.12.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-BGYnc61f.d.ts → hooks-BmvalJZ4.d.ts} +1 -1
- package/dist/{hooks-gk8S8LFP.d.cts → hooks-BzFKq34L.d.cts} +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-BI46yeFZ.d.cts} +617 -557
- package/dist/lib/{config-B_WTwd49.d.ts → context-tEqvC3yI.d.ts} +617 -557
- 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-C9_XPS6c.d.cts} +1 -1
- package/dist/lib/{hooks-4KkL9GD2.d.cts → hooks-DESiFNA6.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/{resolved-Dhscmo3z.d.ts → resolved-BS8bJ6b1.d.ts} +21 -17
- package/dist/{resolved-CcuVqMqc.d.cts → resolved-CjkYiKA1.d.cts} +21 -17
- 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 +11 -9
- 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
|
@@ -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,4BAAAA,CAAAA;AAWhB,eAAeO,qBAAqBC,IAAAA,EAAY;AAC9C,EAAA,OAAA,CACE,MAAMC,QAAQC,GAAAA,CAAI;IAChBD,OAAAA,CAAQE,OAAAA,CAAQ,QAAA,CAASC,IAAAA,CAAKJ,IAAAA,CAAAA,IAAS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A;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"]}
|