powerlines 0.37.33 → 0.37.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{api-CKagZeJX.d.cts → api-D-Jj7gBV.d.cts} +3 -3
- package/dist/{api-CNaXa_TJ.d.ts → api-V7srJoFm.d.ts} +3 -3
- package/dist/api.cjs +2 -2
- package/dist/api.d.cts +1 -1
- package/dist/api.d.ts +1 -1
- package/dist/api.js +1 -1
- package/dist/astro.cjs +4 -4
- package/dist/astro.d.cts +1 -1
- package/dist/astro.d.ts +1 -1
- package/dist/astro.js +3 -3
- package/dist/chunk-7SBQHE7O.cjs +12 -0
- package/dist/{chunk-5HIL7EVA.cjs → chunk-DQSXHHAV.cjs} +4 -4
- package/dist/{chunk-2SKHJHPI.cjs → chunk-EQ6DXFKF.cjs} +5 -5
- package/dist/{chunk-M5ZTDIE2.cjs → chunk-KPFOSNI2.cjs} +4 -4
- package/dist/{chunk-NXF47SUO.js → chunk-LTMBRWVN.js} +3 -3
- package/dist/chunk-NQGIX27E.cjs +12 -0
- package/dist/{chunk-EED2UPZI.js → chunk-O7NHLZPY.js} +3 -3
- package/dist/{chunk-TPEJ4HAR.cjs → chunk-PJPHDM25.cjs} +43 -41
- package/dist/{chunk-OBW6UYPF.js → chunk-Q65LQVH6.js} +3 -3
- package/dist/{chunk-LML34F4E.js → chunk-SLWIUFSS.js} +3 -3
- package/dist/{chunk-C2LWIHQL.js → chunk-TFOT7S55.js} +3 -3
- package/dist/{chunk-YDYRZGLC.js → chunk-YTGERWHC.js} +46 -44
- package/dist/esbuild.cjs +6 -6
- package/dist/esbuild.d.cts +1 -1
- package/dist/esbuild.d.ts +1 -1
- package/dist/esbuild.js +3 -3
- package/dist/farm.cjs +3 -3
- package/dist/farm.d.cts +1 -1
- package/dist/farm.d.ts +1 -1
- package/dist/farm.js +2 -2
- package/dist/index.cjs +10 -10
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/lib/build/esbuild.cjs +5 -5
- package/dist/lib/build/esbuild.d.cts +1 -1
- package/dist/lib/build/esbuild.d.ts +1 -1
- package/dist/lib/build/esbuild.js +2 -2
- package/dist/lib/build/index.cjs +17 -17
- package/dist/lib/build/index.d.cts +2 -2
- package/dist/lib/build/index.d.ts +2 -2
- package/dist/lib/build/index.js +5 -5
- package/dist/lib/build/rolldown.d.cts +1 -1
- package/dist/lib/build/rolldown.d.ts +1 -1
- package/dist/lib/build/rollup.d.cts +1 -1
- package/dist/lib/build/rollup.d.ts +1 -1
- package/dist/lib/build/rspack.d.cts +1 -1
- package/dist/lib/build/rspack.d.ts +1 -1
- package/dist/lib/build/tsdown.cjs +5 -5
- package/dist/lib/build/tsdown.d.cts +1 -1
- package/dist/lib/build/tsdown.d.ts +1 -1
- package/dist/lib/build/tsdown.js +1 -1
- package/dist/lib/build/tsup.cjs +6 -6
- package/dist/lib/build/tsup.d.cts +1 -1
- package/dist/lib/build/tsup.d.ts +1 -1
- package/dist/lib/build/tsup.js +3 -3
- package/dist/lib/build/unbuild.d.cts +2 -2
- package/dist/lib/build/unbuild.d.ts +2 -2
- package/dist/lib/build/vite.cjs +5 -5
- package/dist/lib/build/vite.d.cts +1 -1
- package/dist/lib/build/vite.d.ts +1 -1
- package/dist/lib/build/vite.js +3 -3
- package/dist/lib/build/webpack.d.cts +1 -1
- package/dist/lib/build/webpack.d.ts +1 -1
- package/dist/lib/{chunk-2JWZTFXS.js → chunk-5S2SZ55K.js} +4 -4
- package/dist/lib/{chunk-2JWZTFXS.js.map → chunk-5S2SZ55K.js.map} +1 -1
- package/dist/lib/{chunk-O3ZBMF6Z.cjs → chunk-643UR4H5.cjs} +6 -6
- package/dist/lib/{chunk-O3ZBMF6Z.cjs.map → chunk-643UR4H5.cjs.map} +1 -1
- package/dist/lib/{chunk-I66U3XHM.js → chunk-6OPCSOQS.js} +3 -5
- package/dist/lib/chunk-6OPCSOQS.js.map +1 -0
- package/dist/lib/{chunk-HFM5IVGD.cjs → chunk-7ZFN37TZ.cjs} +6 -6
- package/dist/lib/chunk-7ZFN37TZ.cjs.map +1 -0
- package/dist/lib/{chunk-LLWUZWXK.js → chunk-AN5ZE52X.js} +42 -39
- package/dist/lib/chunk-AN5ZE52X.js.map +1 -0
- package/dist/lib/{chunk-PNVVTXLD.cjs → chunk-CJ3AOQLZ.cjs} +4 -4
- package/dist/lib/{chunk-PNVVTXLD.cjs.map → chunk-CJ3AOQLZ.cjs.map} +1 -1
- package/dist/lib/{chunk-JF4ZEC67.cjs → chunk-FEDWFZCN.cjs} +19 -19
- package/dist/lib/{chunk-JF4ZEC67.cjs.map → chunk-FEDWFZCN.cjs.map} +1 -1
- package/dist/lib/{chunk-N37JIOZ4.js → chunk-HZTJTO26.js} +22 -31
- package/dist/lib/chunk-HZTJTO26.js.map +1 -0
- package/dist/lib/{chunk-UOVILPP5.cjs → chunk-K2432VDS.cjs} +4 -4
- package/dist/lib/{chunk-UOVILPP5.cjs.map → chunk-K2432VDS.cjs.map} +1 -1
- package/dist/lib/{chunk-DW3OHFKB.js → chunk-MKA52KRJ.js} +3 -3
- package/dist/lib/{chunk-DW3OHFKB.js.map → chunk-MKA52KRJ.js.map} +1 -1
- package/dist/lib/{chunk-37ISVVSL.js → chunk-MRFCJ22H.js} +3 -3
- package/dist/lib/{chunk-37ISVVSL.js.map → chunk-MRFCJ22H.js.map} +1 -1
- package/dist/lib/{chunk-Y36HVRRL.cjs → chunk-O6X6DQOP.cjs} +21 -31
- package/dist/lib/chunk-O6X6DQOP.cjs.map +1 -0
- package/dist/lib/{chunk-ZK2C72JS.js → chunk-OFS5VLIU.js} +3 -3
- package/dist/lib/{chunk-ZK2C72JS.js.map → chunk-OFS5VLIU.js.map} +1 -1
- package/dist/lib/{chunk-7D4ANVQ3.js → chunk-P7Z77YMX.js} +3 -3
- package/dist/lib/{chunk-7D4ANVQ3.js.map → chunk-P7Z77YMX.js.map} +1 -1
- package/dist/lib/{chunk-L3OTKQT7.cjs → chunk-PX4HYK7X.cjs} +4 -4
- package/dist/lib/{chunk-L3OTKQT7.cjs.map → chunk-PX4HYK7X.cjs.map} +1 -1
- package/dist/lib/{chunk-DNSJN2LL.js → chunk-RP4KHKZQ.js} +3 -3
- package/dist/lib/{chunk-DNSJN2LL.js.map → chunk-RP4KHKZQ.js.map} +1 -1
- package/dist/lib/{chunk-U7XNN2N5.cjs → chunk-RUZCLCCT.cjs} +53 -50
- package/dist/lib/chunk-RUZCLCCT.cjs.map +1 -0
- package/dist/lib/{chunk-YZNE7GOJ.cjs → chunk-VKFZWKAX.cjs} +4 -4
- package/dist/lib/{chunk-YZNE7GOJ.cjs.map → chunk-VKFZWKAX.cjs.map} +1 -1
- package/dist/lib/{chunk-47ELJR3Z.cjs → chunk-VLZBQSDN.cjs} +3 -5
- package/dist/lib/chunk-VLZBQSDN.cjs.map +1 -0
- package/dist/lib/{chunk-X6CZ2G2G.js → chunk-WKVQSAKR.js} +3 -3
- package/dist/lib/{chunk-X6CZ2G2G.js.map → chunk-WKVQSAKR.js.map} +1 -1
- package/dist/lib/{chunk-HX5UF7YV.js → chunk-XTO4JEOR.js} +4 -4
- package/dist/lib/chunk-XTO4JEOR.js.map +1 -0
- package/dist/lib/{chunk-QTOV3SHA.cjs → chunk-YSAYMPBB.cjs} +4 -4
- package/dist/lib/{chunk-QTOV3SHA.cjs.map → chunk-YSAYMPBB.cjs.map} +1 -1
- package/dist/lib/{config-D7uVz_j9.d.cts → config-BdpnZ9Jp.d.cts} +3 -3
- package/dist/lib/{config-B7VlKFtE.d.ts → config-DxhCES5f.d.ts} +3 -3
- package/dist/lib/config-file.d.cts +1 -1
- package/dist/lib/config-file.d.ts +1 -1
- package/dist/lib/contexts/api-context.cjs +5 -5
- package/dist/lib/contexts/api-context.d.cts +2 -2
- package/dist/lib/contexts/api-context.d.ts +2 -2
- package/dist/lib/contexts/api-context.js +4 -4
- package/dist/lib/contexts/context.cjs +3 -3
- package/dist/lib/contexts/context.d.cts +2 -2
- package/dist/lib/contexts/context.d.ts +2 -2
- package/dist/lib/contexts/context.js +2 -2
- package/dist/lib/contexts/environment-context.cjs +4 -4
- package/dist/lib/contexts/environment-context.d.cts +2 -2
- package/dist/lib/contexts/environment-context.d.ts +2 -2
- package/dist/lib/contexts/environment-context.js +3 -3
- package/dist/lib/contexts/index.cjs +7 -7
- package/dist/lib/contexts/index.d.cts +2 -2
- package/dist/lib/contexts/index.d.ts +2 -2
- package/dist/lib/contexts/index.js +4 -4
- package/dist/lib/contexts/plugin-context.d.cts +2 -2
- package/dist/lib/contexts/plugin-context.d.ts +2 -2
- package/dist/lib/entry.cjs +10 -14
- package/dist/lib/entry.d.cts +2 -9
- package/dist/lib/entry.d.ts +2 -9
- package/dist/lib/entry.js +1 -1
- package/dist/lib/fs/index.d.cts +1 -1
- package/dist/lib/fs/index.d.ts +1 -1
- package/dist/lib/fs/vfs.d.cts +1 -1
- package/dist/lib/fs/vfs.d.ts +1 -1
- package/dist/lib/index.cjs +23 -27
- package/dist/lib/index.d.cts +3 -3
- package/dist/lib/index.d.ts +3 -3
- package/dist/lib/index.js +8 -8
- package/dist/lib/{internal-CFBs3Fok.d.cts → internal-CInyirxk.d.cts} +1 -1
- package/dist/lib/{internal-Dlj-vo3a.d.ts → internal-x5TCXE5P.d.ts} +1 -1
- package/dist/lib/logger.d.cts +1 -1
- package/dist/lib/logger.d.ts +1 -1
- package/dist/lib/typescript/import-transformer.d.cts +1 -1
- package/dist/lib/typescript/import-transformer.d.ts +1 -1
- package/dist/lib/typescript/index.d.cts +1 -1
- package/dist/lib/typescript/index.d.ts +1 -1
- package/dist/lib/typescript/ts-morph.d.cts +1 -1
- package/dist/lib/typescript/ts-morph.d.ts +1 -1
- package/dist/lib/unplugin/factory.cjs +6 -6
- package/dist/lib/unplugin/factory.d.cts +1 -1
- package/dist/lib/unplugin/factory.d.ts +1 -1
- package/dist/lib/unplugin/factory.js +5 -5
- package/dist/lib/unplugin/helpers.d.cts +1 -1
- package/dist/lib/unplugin/helpers.d.ts +1 -1
- package/dist/lib/unplugin/index.cjs +6 -6
- package/dist/lib/unplugin/index.d.cts +1 -1
- package/dist/lib/unplugin/index.d.ts +1 -1
- package/dist/lib/unplugin/index.js +5 -5
- package/dist/lib/unplugin/plugin.d.cts +1 -1
- package/dist/lib/unplugin/plugin.d.ts +1 -1
- package/dist/lib/utilities/bundle.cjs +4 -4
- package/dist/lib/utilities/bundle.d.cts +1 -1
- package/dist/lib/utilities/bundle.d.ts +1 -1
- package/dist/lib/utilities/bundle.js +3 -3
- package/dist/lib/utilities/cache.d.cts +1 -1
- package/dist/lib/utilities/cache.d.ts +1 -1
- package/dist/lib/utilities/file-header.d.cts +1 -1
- package/dist/lib/utilities/file-header.d.ts +1 -1
- package/dist/lib/utilities/format.d.cts +1 -1
- package/dist/lib/utilities/format.d.ts +1 -1
- package/dist/lib/utilities/index.cjs +6 -6
- package/dist/lib/utilities/index.d.cts +1 -1
- package/dist/lib/utilities/index.d.ts +1 -1
- package/dist/lib/utilities/index.js +4 -4
- package/dist/lib/utilities/meta.d.cts +1 -1
- package/dist/lib/utilities/meta.d.ts +1 -1
- package/dist/lib/utilities/resolve.cjs +5 -5
- package/dist/lib/utilities/resolve.d.cts +1 -1
- package/dist/lib/utilities/resolve.d.ts +1 -1
- package/dist/lib/utilities/resolve.js +4 -4
- package/dist/lib/utilities/source-file.d.cts +1 -1
- package/dist/lib/utilities/source-file.d.ts +1 -1
- package/dist/lib/utilities/source-map.d.cts +1 -1
- package/dist/lib/utilities/source-map.d.ts +1 -1
- package/dist/lib/utilities/worker.d.cts +1 -1
- package/dist/lib/utilities/worker.d.ts +1 -1
- package/dist/lib/utilities/write-file.d.cts +1 -1
- package/dist/lib/utilities/write-file.d.ts +1 -1
- package/dist/next.cjs +4 -4
- package/dist/next.js +3 -3
- package/dist/nuxt.cjs +8 -8
- package/dist/nuxt.d.cts +1 -1
- package/dist/nuxt.d.ts +1 -1
- package/dist/nuxt.js +4 -4
- package/dist/plugin-utils/{context-BtofN7Mm.d.cts → context-Iv5cZYxg.d.cts} +3 -3
- package/dist/plugin-utils/{context-BtofN7Mm.d.ts → context-Iv5cZYxg.d.ts} +3 -3
- package/dist/plugin-utils/context-helpers.d.cts +1 -1
- package/dist/plugin-utils/context-helpers.d.ts +1 -1
- package/dist/plugin-utils/enforce.d.cts +1 -1
- package/dist/plugin-utils/enforce.d.ts +1 -1
- package/dist/plugin-utils/extend.d.cts +1 -1
- package/dist/plugin-utils/extend.d.ts +1 -1
- package/dist/plugin-utils/get-config-path.d.cts +1 -1
- package/dist/plugin-utils/get-config-path.d.ts +1 -1
- package/dist/plugin-utils/helpers.d.cts +1 -1
- package/dist/plugin-utils/helpers.d.ts +1 -1
- package/dist/plugin-utils/index.d.cts +1 -1
- package/dist/plugin-utils/index.d.ts +1 -1
- package/dist/plugin-utils/merge.d.cts +1 -1
- package/dist/plugin-utils/merge.d.ts +1 -1
- package/dist/plugin-utils/paths.d.cts +1 -1
- package/dist/plugin-utils/paths.d.ts +1 -1
- package/dist/rolldown.cjs +6 -6
- package/dist/rolldown.d.cts +1 -1
- package/dist/rolldown.d.ts +1 -1
- package/dist/rolldown.js +3 -3
- package/dist/rollup.cjs +3 -3
- package/dist/rollup.d.cts +1 -1
- package/dist/rollup.d.ts +1 -1
- package/dist/rollup.js +2 -2
- package/dist/rspack.cjs +3 -3
- package/dist/rspack.d.cts +1 -1
- package/dist/rspack.d.ts +1 -1
- package/dist/rspack.js +2 -2
- package/dist/tsdown.cjs +4 -4
- package/dist/tsdown.js +3 -3
- package/dist/tsup.cjs +4 -4
- package/dist/tsup.js +3 -3
- package/dist/types/api.d.cts +1 -1
- package/dist/types/api.d.ts +1 -1
- 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/config.d.cts +1 -1
- package/dist/types/config.d.ts +1 -1
- package/dist/types/context.d.cts +1 -1
- package/dist/types/context.d.ts +1 -1
- package/dist/types/hooks.d.cts +1 -1
- package/dist/types/hooks.d.ts +1 -1
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/internal.d.cts +1 -1
- package/dist/types/internal.d.ts +1 -1
- 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/unloader.cjs +3 -3
- package/dist/unloader.d.cts +1 -1
- package/dist/unloader.d.ts +1 -1
- package/dist/unloader.js +2 -2
- package/dist/unplugin.cjs +8 -8
- package/dist/unplugin.d.cts +1 -1
- package/dist/unplugin.d.ts +1 -1
- package/dist/unplugin.js +4 -4
- package/dist/vite.cjs +6 -6
- package/dist/vite.d.cts +1 -1
- package/dist/vite.d.ts +1 -1
- package/dist/vite.js +3 -3
- package/dist/webpack.cjs +6 -6
- package/dist/webpack.d.cts +1 -1
- package/dist/webpack.d.ts +1 -1
- package/dist/webpack.js +3 -3
- package/package.json +15 -15
- package/dist/chunk-4G7C2OQK.cjs +0 -12
- package/dist/chunk-5YUJKRDM.cjs +0 -12
- package/dist/lib/chunk-47ELJR3Z.cjs.map +0 -1
- package/dist/lib/chunk-HFM5IVGD.cjs.map +0 -1
- package/dist/lib/chunk-HX5UF7YV.js.map +0 -1
- package/dist/lib/chunk-I66U3XHM.js.map +0 -1
- package/dist/lib/chunk-LLWUZWXK.js.map +0 -1
- package/dist/lib/chunk-N37JIOZ4.js.map +0 -1
- package/dist/lib/chunk-U7XNN2N5.cjs.map +0 -1
- package/dist/lib/chunk-Y36HVRRL.cjs.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkMFC7UJHT_cjs = require('./chunk-MFC7UJHT.cjs');
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var chunk643UR4H5_cjs = require('./chunk-643UR4H5.cjs');
|
|
5
|
+
var chunk7ZFN37TZ_cjs = require('./chunk-7ZFN37TZ.cjs');
|
|
6
6
|
var chunkBJGMF356_cjs = require('./chunk-BJGMF356.cjs');
|
|
7
7
|
var chunkZWLSNYIN_cjs = require('./chunk-ZWLSNYIN.cjs');
|
|
8
8
|
var chunkQHTL2U3L_cjs = require('./chunk-QHTL2U3L.cjs');
|
|
@@ -37,7 +37,9 @@ var chalk3 = require('chalk');
|
|
|
37
37
|
var Handlebars = require('handlebars');
|
|
38
38
|
var helperPluginUtils = require('@babel/helper-plugin-utils');
|
|
39
39
|
var t = require('@babel/types');
|
|
40
|
-
var
|
|
40
|
+
var prettyBytes = require('@stryke/string-format/pretty-bytes');
|
|
41
|
+
var share = require('node_modules/@farmfe/core/dist/utils/share');
|
|
42
|
+
var tsMorph = require('ts-morph');
|
|
41
43
|
var defu = require('defu');
|
|
42
44
|
var _package = require('@stryke/string-format/package');
|
|
43
45
|
var superdiff = require('@donedeal0/superdiff');
|
|
@@ -72,7 +74,7 @@ var t__namespace = /*#__PURE__*/_interopNamespace(t);
|
|
|
72
74
|
|
|
73
75
|
// package.json
|
|
74
76
|
var package_default = {
|
|
75
|
-
version: "0.37.
|
|
77
|
+
version: "0.37.34"};
|
|
76
78
|
function resolveModulePath(nodePath, state) {
|
|
77
79
|
if (!t__namespace.isStringLiteral(nodePath.node)) {
|
|
78
80
|
return;
|
|
@@ -182,7 +184,7 @@ function formatTypes(code) {
|
|
|
182
184
|
}
|
|
183
185
|
chunkPK6SKIKE_cjs.__name(formatTypes, "formatTypes");
|
|
184
186
|
async function emitTypes(context, files) {
|
|
185
|
-
context.
|
|
187
|
+
context.debug(`Running the TypeScript compiler for ${files.length} generated runtime files.`);
|
|
186
188
|
const program = chunkZWLSNYIN_cjs.createProgram(context, {
|
|
187
189
|
skipAddingFilesFromTsConfig: true
|
|
188
190
|
});
|
|
@@ -190,34 +192,35 @@ async function emitTypes(context, files) {
|
|
|
190
192
|
const result = program.emitToMemory({
|
|
191
193
|
emitOnlyDtsFiles: true
|
|
192
194
|
});
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
if (
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
195
|
+
const diagnostics = result.getDiagnostics();
|
|
196
|
+
if (diagnostics && diagnostics.length > 0) {
|
|
197
|
+
if (diagnostics.some((d) => d.getCategory() === tsMorph.DiagnosticCategory.Error)) {
|
|
198
|
+
throw new Error(`The Typescript emit process failed while generating built-in types:
|
|
199
|
+
${diagnostics.filter((d) => d.getCategory() === tsMorph.DiagnosticCategory.Error).map((d) => `-${d.getSourceFile() ? `${d.getSourceFile()?.getFilePath()}:` : ""} ${String(d.getMessageText())} (at ${d.getStart()}:${d.getLength()})`).join("\n")}`);
|
|
200
|
+
} else if (diagnostics.some((d) => d.getCategory() === tsMorph.DiagnosticCategory.Warning)) {
|
|
201
|
+
context.warn(`The Typescript emit process completed with warnings while generating built-in types:
|
|
202
|
+
${diagnostics.filter((d) => d.getCategory() === tsMorph.DiagnosticCategory.Warning).map((d) => `-${d.getSourceFile() ? `${d.getSourceFile()?.getFilePath()}:` : ""} ${String(d.getMessageText())} (at ${d.getStart()}:${d.getLength()})`).join("\n")}`);
|
|
203
|
+
} else {
|
|
204
|
+
context.debug(`The Typescript emit process completed with diagnostic messages while generating built-in types:
|
|
205
|
+
${diagnostics.map((d) => `-${d.getSourceFile() ? `${d.getSourceFile()?.getFilePath()}:` : ""} ${String(d.getMessageText())} (at ${d.getStart()}:${d.getLength()})`).join("\n")}`);
|
|
204
206
|
}
|
|
205
207
|
}
|
|
206
|
-
const
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
208
|
+
const emittedFiles = result.getFiles();
|
|
209
|
+
context.debug(`The TypeScript compiler emitted ${emittedFiles.length} files for built-in types.`);
|
|
210
|
+
let builtinModules = "";
|
|
211
|
+
for (const emittedFile of emittedFiles) {
|
|
212
|
+
if (!emittedFile.filePath.endsWith(".map")) {
|
|
213
|
+
context.trace(`Processing emitted built-in types file: ${emittedFile.filePath}`);
|
|
214
|
+
builtinModules += `
|
|
215
|
+
declare module "${replace.replaceExtension(replace.replacePath(emittedFile.filePath, context.builtinsPath))}" {
|
|
216
|
+
${emittedFile.text.trim().replace(/^\s*export\s*declare\s*/gm, "export ").replace(/^\s*declare\s*/gm, "")}
|
|
217
|
+
}
|
|
218
|
+
`;
|
|
212
219
|
}
|
|
213
|
-
});
|
|
214
|
-
const diagnosticMessage = diagnosticMessages.join("\n");
|
|
215
|
-
if (diagnosticMessage) {
|
|
216
|
-
throw new Error(`TypeScript compilation failed:
|
|
217
|
-
|
|
218
|
-
${diagnosticMessage.length > 5e3 ? `${diagnosticMessage.slice(0, 5e3)}...` : diagnosticMessage}`);
|
|
219
220
|
}
|
|
220
|
-
|
|
221
|
+
builtinModules = formatTypes(builtinModules);
|
|
222
|
+
context.debug(`A TypeScript declaration file (size: ${prettyBytes.prettyBytes(new Blob(share.toArray(builtinModules)).size)}) emitted for the built-in modules types.`);
|
|
223
|
+
return builtinModules;
|
|
221
224
|
}
|
|
222
225
|
chunkPK6SKIKE_cjs.__name(emitTypes, "emitTypes");
|
|
223
226
|
var mergeResults = defu.createDefu((obj, key, value) => {
|
|
@@ -302,7 +305,7 @@ async function installPackage(context, packageName, dev = false) {
|
|
|
302
305
|
if (!await packageFns.isPackageListed(_package.getPackageName(packageName), {
|
|
303
306
|
cwd: context.config.projectRoot
|
|
304
307
|
})) {
|
|
305
|
-
if (context.config.
|
|
308
|
+
if (context.config.autoInstall) {
|
|
306
309
|
context.log(types.LogLevelLabel.WARN, `The package "${packageName}" is not installed. It will be installed automatically.`);
|
|
307
310
|
const result = await install.install(packageName, {
|
|
308
311
|
cwd: context.config.projectRoot,
|
|
@@ -313,7 +316,7 @@ async function installPackage(context, packageName, dev = false) {
|
|
|
313
316
|
throw new Error(`An error occurred while installing the package "${packageName}"`);
|
|
314
317
|
}
|
|
315
318
|
} else {
|
|
316
|
-
context.log(types.LogLevelLabel.WARN, `The package "${packageName}" is not installed. Since the "
|
|
319
|
+
context.log(types.LogLevelLabel.WARN, `The package "${packageName}" is not installed. Since the "autoInstall" option is set to false, it will not be installed automatically.`);
|
|
317
320
|
}
|
|
318
321
|
} else if (_package.hasPackageVersion(packageName) && !process.env.POWERLINES_SKIP_VERSION_CHECK) {
|
|
319
322
|
const isMatching = await packageFns.doesPackageMatch(_package.getPackageName(packageName), _package.getPackageVersion(packageName), context.config.projectRoot);
|
|
@@ -491,12 +494,12 @@ var PowerlinesAPI = class _PowerlinesAPI {
|
|
|
491
494
|
* @returns A new instance of the Powerlines API
|
|
492
495
|
*/
|
|
493
496
|
static async from(workspaceRoot, config) {
|
|
494
|
-
const api = new _PowerlinesAPI(await
|
|
497
|
+
const api = new _PowerlinesAPI(await chunk643UR4H5_cjs.PowerlinesAPIContext.from(workspaceRoot, config));
|
|
495
498
|
api.#context.$$internal = {
|
|
496
499
|
api,
|
|
497
500
|
addPlugin: api.#addPlugin.bind(api)
|
|
498
501
|
};
|
|
499
|
-
api.context.info(`\u{1F50C} The Powerlines v${package_default.version}
|
|
502
|
+
api.context.info(`\u{1F50C} The Powerlines Engine v${package_default.version} has started`);
|
|
500
503
|
for (const plugin of api.context.config.plugins ?? []) {
|
|
501
504
|
await api.#addPlugin(plugin);
|
|
502
505
|
}
|
|
@@ -525,7 +528,7 @@ var PowerlinesAPI = class _PowerlinesAPI {
|
|
|
525
528
|
command: "prepare"
|
|
526
529
|
}) {
|
|
527
530
|
this.context.info(" \u{1F3D7}\uFE0F Preparing the Powerlines project");
|
|
528
|
-
this.context.debug("
|
|
531
|
+
this.context.debug(" Aggregating configuration options for the Powerlines project");
|
|
529
532
|
await this.context.withInlineConfig(inlineConfig);
|
|
530
533
|
await this.#executeEnvironments(async (context) => {
|
|
531
534
|
context.debug(`Initializing the processing options for the Powerlines project.`);
|
|
@@ -539,7 +542,7 @@ var PowerlinesAPI = class _PowerlinesAPI {
|
|
|
539
542
|
order: "normal"
|
|
540
543
|
});
|
|
541
544
|
context.debug(`The configuration provided ${toArray.toArray(context.config.entry).length} entry point(s), Powerlines has found ${context.entry.length} entry files(s) for the ${context.config.title} project${context.entry.length > 0 && context.entry.length < 10 ? `:
|
|
542
|
-
${context.entry.map((entry) => `- ${entry.file}${entry.output ? ` -> ${entry.output}` : ""}`).join(" \n")}` : ""}
|
|
545
|
+
${context.entry.map((entry) => `- ${entry.file}${entry.output ? ` -> ${entry.output}` : ""}`).join(" \n")}` : ""}`);
|
|
543
546
|
await resolveTsconfig(context);
|
|
544
547
|
await installDependencies(context);
|
|
545
548
|
await this.callHook("configResolved", {
|
|
@@ -711,7 +714,7 @@ ${formatTypes(types)}
|
|
|
711
714
|
await chunkBJGMF356_cjs.writeMetaFile(context);
|
|
712
715
|
context.persistedMeta = context.meta;
|
|
713
716
|
});
|
|
714
|
-
this.context.
|
|
717
|
+
this.context.debug("\u2714 Powerlines preparation has completed successfully");
|
|
715
718
|
}
|
|
716
719
|
/**
|
|
717
720
|
* Create a new Powerlines project
|
|
@@ -1009,8 +1012,8 @@ ${formatTypes(types)}
|
|
|
1009
1012
|
if (isPromise.isPromiseLike(config)) {
|
|
1010
1013
|
awaited = await Promise.resolve(config);
|
|
1011
1014
|
}
|
|
1012
|
-
if (!
|
|
1013
|
-
const invalid =
|
|
1015
|
+
if (!chunk7ZFN37TZ_cjs.isPluginConfig(awaited)) {
|
|
1016
|
+
const invalid = chunk7ZFN37TZ_cjs.findInvalidPluginConfig(awaited);
|
|
1014
1017
|
throw new Error(`Invalid ${invalid && invalid.length > 1 ? "plugins" : "plugin"} specified in the configuration - ${invalid && invalid.length > 0 ? JSON.stringify(awaited) : invalid?.join("\n\n")}
|
|
1015
1018
|
|
|
1016
1019
|
Please ensure the value is one of the following:
|
|
@@ -1022,7 +1025,7 @@ Please ensure the value is one of the following:
|
|
|
1022
1025
|
- an array of plugins or plugin configurations`);
|
|
1023
1026
|
}
|
|
1024
1027
|
let plugins;
|
|
1025
|
-
if (
|
|
1028
|
+
if (chunk7ZFN37TZ_cjs.isPlugin(awaited)) {
|
|
1026
1029
|
plugins = [
|
|
1027
1030
|
awaited
|
|
1028
1031
|
];
|
|
@@ -1035,9 +1038,9 @@ Please ensure the value is one of the following:
|
|
|
1035
1038
|
} else {
|
|
1036
1039
|
plugins = toArray.toArray(resolved);
|
|
1037
1040
|
}
|
|
1038
|
-
} else if (Array.isArray(awaited) && awaited.every(
|
|
1041
|
+
} else if (Array.isArray(awaited) && awaited.every(chunk7ZFN37TZ_cjs.isPlugin)) {
|
|
1039
1042
|
plugins = awaited;
|
|
1040
|
-
} else if (Array.isArray(awaited) && awaited.every(
|
|
1043
|
+
} else if (Array.isArray(awaited) && awaited.every(chunk7ZFN37TZ_cjs.isPluginConfig)) {
|
|
1041
1044
|
plugins = [];
|
|
1042
1045
|
for (const pluginConfig of awaited) {
|
|
1043
1046
|
const initialized = await this.#initPlugin(pluginConfig);
|
|
@@ -1045,10 +1048,10 @@ Please ensure the value is one of the following:
|
|
|
1045
1048
|
plugins.push(...initialized);
|
|
1046
1049
|
}
|
|
1047
1050
|
}
|
|
1048
|
-
} else if (
|
|
1051
|
+
} else if (chunk7ZFN37TZ_cjs.isPluginConfigTuple(awaited) || chunk7ZFN37TZ_cjs.isPluginConfigObject(awaited)) {
|
|
1049
1052
|
let pluginConfig;
|
|
1050
1053
|
let pluginOptions;
|
|
1051
|
-
if (
|
|
1054
|
+
if (chunk7ZFN37TZ_cjs.isPluginConfigTuple(awaited)) {
|
|
1052
1055
|
pluginConfig = awaited[0];
|
|
1053
1056
|
pluginOptions = awaited?.length === 2 ? awaited[1] : void 0;
|
|
1054
1057
|
} else {
|
|
@@ -1064,21 +1067,21 @@ Please ensure the value is one of the following:
|
|
|
1064
1067
|
}
|
|
1065
1068
|
} else if (isFunction.isFunction(pluginConfig)) {
|
|
1066
1069
|
plugins = toArray.toArray(await Promise.resolve(pluginConfig(pluginOptions)));
|
|
1067
|
-
} else if (Array.isArray(pluginConfig) && pluginConfig.every(
|
|
1070
|
+
} else if (Array.isArray(pluginConfig) && pluginConfig.every(chunk7ZFN37TZ_cjs.isPlugin)) {
|
|
1068
1071
|
plugins = pluginConfig;
|
|
1069
|
-
} else if (
|
|
1072
|
+
} else if (chunk7ZFN37TZ_cjs.isPlugin(pluginConfig)) {
|
|
1070
1073
|
plugins = toArray.toArray(pluginConfig);
|
|
1071
1074
|
}
|
|
1072
1075
|
}
|
|
1073
1076
|
if (!plugins) {
|
|
1074
1077
|
throw new Error(`The plugin configuration ${JSON.stringify(awaited)} is invalid. This configuration must point to a valid Powerlines plugin module.`);
|
|
1075
1078
|
}
|
|
1076
|
-
if (plugins.length > 0 && !plugins.every(
|
|
1079
|
+
if (plugins.length > 0 && !plugins.every(chunk7ZFN37TZ_cjs.isPlugin)) {
|
|
1077
1080
|
throw new Error(`The plugin option ${JSON.stringify(plugins)} does not export a valid module. This configuration must point to a valid Powerlines plugin module.`);
|
|
1078
1081
|
}
|
|
1079
1082
|
const result = [];
|
|
1080
1083
|
for (const plugin of plugins) {
|
|
1081
|
-
if (
|
|
1084
|
+
if (chunk7ZFN37TZ_cjs.checkDedupe(plugin, this.context.plugins)) {
|
|
1082
1085
|
this.context.trace(`Duplicate ${chalk3__default.default.bold.cyanBright(plugin.name)} plugin dependency detected - Skipping initialization.`);
|
|
1083
1086
|
} else {
|
|
1084
1087
|
result.push(plugin);
|
|
@@ -1098,7 +1101,7 @@ Please ensure the value is one of the following:
|
|
|
1098
1101
|
this.context.config.projectRoot
|
|
1099
1102
|
]
|
|
1100
1103
|
});
|
|
1101
|
-
if (!isInstalled && this.context.config.
|
|
1104
|
+
if (!isInstalled && this.context.config.autoInstall) {
|
|
1102
1105
|
this.#context.warn(`The plugin package "${pluginPath}" is not installed. It will be installed automatically.`);
|
|
1103
1106
|
const result = await install.install(pluginPath, {
|
|
1104
1107
|
cwd: this.context.config.projectRoot
|
|
@@ -1249,5 +1252,5 @@ function createUnpluginFactory(variant, decorate) {
|
|
|
1249
1252
|
chunkPK6SKIKE_cjs.__name(createUnpluginFactory, "createUnpluginFactory");
|
|
1250
1253
|
|
|
1251
1254
|
exports.createUnpluginFactory = createUnpluginFactory;
|
|
1252
|
-
//# sourceMappingURL=chunk-
|
|
1253
|
-
//# sourceMappingURL=chunk-
|
|
1255
|
+
//# sourceMappingURL=chunk-RUZCLCCT.cjs.map
|
|
1256
|
+
//# sourceMappingURL=chunk-RUZCLCCT.cjs.map
|