powerlines 0.37.34 → 0.37.36
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-4ZMXSGTF.cjs +12 -0
- package/dist/{chunk-2RPY4RCM.js → chunk-7EBAVG2H.js} +42 -41
- package/dist/{chunk-XM76ZBSK.js → chunk-BVKWNX7Q.js} +3 -3
- package/dist/{chunk-Z5X3K5LA.js → chunk-DHFLXVK7.js} +3 -3
- package/dist/{chunk-T2AQYNL2.cjs → chunk-DS4NQ6HY.cjs} +39 -38
- package/dist/{chunk-PGJAR3DA.cjs → chunk-FGJ6XPBJ.cjs} +5 -5
- package/dist/chunk-GMA3KYZJ.cjs +12 -0
- package/dist/{chunk-AHTPFT35.js → chunk-IG5WPC7V.js} +3 -3
- package/dist/{chunk-42GXE6HH.cjs → chunk-R4GXFTWP.cjs} +4 -4
- package/dist/{chunk-O33KJG26.js → chunk-SO5T2URL.js} +3 -3
- package/dist/{chunk-WA7UAV2K.js → chunk-SRNSE6AK.js} +3 -3
- package/dist/{chunk-C236YWT2.cjs → chunk-YJV5CG3S.cjs} +4 -4
- 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 +12 -12
- package/dist/lib/build/index.d.cts +2 -2
- package/dist/lib/build/index.d.ts +2 -2
- package/dist/lib/build/index.js +4 -4
- 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.d.cts +1 -1
- package/dist/lib/build/tsdown.d.ts +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-22CVJ3GB.js} +4 -4
- package/dist/lib/{chunk-2JWZTFXS.js.map → chunk-22CVJ3GB.js.map} +1 -1
- package/dist/lib/{chunk-QTOV3SHA.cjs → chunk-47MWIOWK.cjs} +4 -4
- package/dist/lib/{chunk-QTOV3SHA.cjs.map → chunk-47MWIOWK.cjs.map} +1 -1
- package/dist/lib/{chunk-Y36HVRRL.cjs → chunk-4DIBUT27.cjs} +21 -31
- package/dist/lib/chunk-4DIBUT27.cjs.map +1 -0
- package/dist/lib/{chunk-PNVVTXLD.cjs → chunk-5XL2KMBD.cjs} +4 -4
- package/dist/lib/{chunk-PNVVTXLD.cjs.map → chunk-5XL2KMBD.cjs.map} +1 -1
- package/dist/lib/{chunk-OIKMQA46.js → chunk-62FNLA4C.js} +38 -36
- package/dist/lib/chunk-62FNLA4C.js.map +1 -0
- package/dist/lib/{chunk-BQBAHE52.cjs → chunk-BHYCRVQO.cjs} +49 -47
- package/dist/lib/chunk-BHYCRVQO.cjs.map +1 -0
- package/dist/lib/{chunk-L3OTKQT7.cjs → chunk-FQMOHR6C.cjs} +4 -4
- package/dist/lib/{chunk-L3OTKQT7.cjs.map → chunk-FQMOHR6C.cjs.map} +1 -1
- package/dist/lib/{chunk-HFM5IVGD.cjs → chunk-GKYKBP64.cjs} +6 -6
- package/dist/lib/chunk-GKYKBP64.cjs.map +1 -0
- package/dist/lib/{chunk-YZNE7GOJ.cjs → chunk-GOC5UCU6.cjs} +4 -4
- package/dist/lib/{chunk-YZNE7GOJ.cjs.map → chunk-GOC5UCU6.cjs.map} +1 -1
- package/dist/lib/{chunk-JF4ZEC67.cjs → chunk-IH4B475X.cjs} +19 -19
- package/dist/lib/{chunk-JF4ZEC67.cjs.map → chunk-IH4B475X.cjs.map} +1 -1
- package/dist/lib/{chunk-DNSJN2LL.js → chunk-IUXE765Q.js} +3 -3
- package/dist/lib/{chunk-DNSJN2LL.js.map → chunk-IUXE765Q.js.map} +1 -1
- package/dist/lib/{chunk-7D4ANVQ3.js → chunk-KQGACHG6.js} +3 -3
- package/dist/lib/{chunk-7D4ANVQ3.js.map → chunk-KQGACHG6.js.map} +1 -1
- package/dist/lib/{chunk-ZK2C72JS.js → chunk-LJEWIZNL.js} +3 -3
- package/dist/lib/{chunk-ZK2C72JS.js.map → chunk-LJEWIZNL.js.map} +1 -1
- package/dist/lib/{chunk-N37JIOZ4.js → chunk-OE4RRA62.js} +22 -31
- package/dist/lib/chunk-OE4RRA62.js.map +1 -0
- package/dist/lib/{chunk-DW3OHFKB.js → chunk-OYYPCZW3.js} +3 -3
- package/dist/lib/{chunk-DW3OHFKB.js.map → chunk-OYYPCZW3.js.map} +1 -1
- package/dist/lib/{chunk-UOVILPP5.cjs → chunk-PAI37O2U.cjs} +4 -4
- package/dist/lib/{chunk-UOVILPP5.cjs.map → chunk-PAI37O2U.cjs.map} +1 -1
- package/dist/lib/{chunk-HX5UF7YV.js → chunk-RU36DRXO.js} +4 -4
- package/dist/lib/chunk-RU36DRXO.js.map +1 -0
- package/dist/lib/{chunk-X6CZ2G2G.js → chunk-SADDVAAV.js} +3 -3
- package/dist/lib/{chunk-X6CZ2G2G.js.map → chunk-SADDVAAV.js.map} +1 -1
- package/dist/lib/{chunk-37ISVVSL.js → chunk-TZGFR4HR.js} +3 -3
- package/dist/lib/{chunk-37ISVVSL.js.map → chunk-TZGFR4HR.js.map} +1 -1
- package/dist/lib/{chunk-O3ZBMF6Z.cjs → chunk-YQUWIJ2D.cjs} +6 -6
- package/dist/lib/{chunk-O3ZBMF6Z.cjs.map → chunk-YQUWIJ2D.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 +3 -10
- package/dist/lib/entry.d.ts +3 -10
- 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 +2 -2
- package/dist/chunk-6RYYGMVN.cjs +0 -12
- package/dist/chunk-JRDHZYK3.cjs +0 -12
- package/dist/lib/chunk-BQBAHE52.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-N37JIOZ4.js.map +0 -1
- package/dist/lib/chunk-OIKMQA46.js.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 chunkYQUWIJ2D_cjs = require('./chunk-YQUWIJ2D.cjs');
|
|
5
|
+
var chunkGKYKBP64_cjs = require('./chunk-GKYKBP64.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,8 @@ 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 tsMorph = require('ts-morph');
|
|
41
42
|
var defu = require('defu');
|
|
42
43
|
var _package = require('@stryke/string-format/package');
|
|
43
44
|
var superdiff = require('@donedeal0/superdiff');
|
|
@@ -72,7 +73,7 @@ var t__namespace = /*#__PURE__*/_interopNamespace(t);
|
|
|
72
73
|
|
|
73
74
|
// package.json
|
|
74
75
|
var package_default = {
|
|
75
|
-
version: "0.37.
|
|
76
|
+
version: "0.37.35"};
|
|
76
77
|
function resolveModulePath(nodePath, state) {
|
|
77
78
|
if (!t__namespace.isStringLiteral(nodePath.node)) {
|
|
78
79
|
return;
|
|
@@ -182,7 +183,7 @@ function formatTypes(code) {
|
|
|
182
183
|
}
|
|
183
184
|
chunkPK6SKIKE_cjs.__name(formatTypes, "formatTypes");
|
|
184
185
|
async function emitTypes(context, files) {
|
|
185
|
-
context.
|
|
186
|
+
context.debug(`Running the TypeScript compiler for ${files.length} generated runtime files.`);
|
|
186
187
|
const program = chunkZWLSNYIN_cjs.createProgram(context, {
|
|
187
188
|
skipAddingFilesFromTsConfig: true
|
|
188
189
|
});
|
|
@@ -190,34 +191,35 @@ async function emitTypes(context, files) {
|
|
|
190
191
|
const result = program.emitToMemory({
|
|
191
192
|
emitOnlyDtsFiles: true
|
|
192
193
|
});
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
if (
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
194
|
+
const diagnostics = result.getDiagnostics();
|
|
195
|
+
if (diagnostics && diagnostics.length > 0) {
|
|
196
|
+
if (diagnostics.some((d) => d.getCategory() === tsMorph.DiagnosticCategory.Error)) {
|
|
197
|
+
throw new Error(`The Typescript emit process failed while generating built-in types:
|
|
198
|
+
${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")}`);
|
|
199
|
+
} else if (diagnostics.some((d) => d.getCategory() === tsMorph.DiagnosticCategory.Warning)) {
|
|
200
|
+
context.warn(`The Typescript emit process completed with warnings while generating built-in types:
|
|
201
|
+
${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")}`);
|
|
202
|
+
} else {
|
|
203
|
+
context.debug(`The Typescript emit process completed with diagnostic messages while generating built-in types:
|
|
204
|
+
${diagnostics.map((d) => `-${d.getSourceFile() ? `${d.getSourceFile()?.getFilePath()}:` : ""} ${String(d.getMessageText())} (at ${d.getStart()}:${d.getLength()})`).join("\n")}`);
|
|
204
205
|
}
|
|
205
206
|
}
|
|
206
|
-
const
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
207
|
+
const emittedFiles = result.getFiles();
|
|
208
|
+
context.debug(`The TypeScript compiler emitted ${emittedFiles.length} files for built-in types.`);
|
|
209
|
+
let builtinModules = "";
|
|
210
|
+
for (const emittedFile of emittedFiles) {
|
|
211
|
+
if (!emittedFile.filePath.endsWith(".map")) {
|
|
212
|
+
context.trace(`Processing emitted built-in types file: ${emittedFile.filePath}`);
|
|
213
|
+
builtinModules += `
|
|
214
|
+
declare module "${replace.replaceExtension(replace.replacePath(emittedFile.filePath, context.builtinsPath))}" {
|
|
215
|
+
${emittedFile.text.trim().replace(/^\s*export\s*declare\s*/gm, "export ").replace(/^\s*declare\s*/gm, "")}
|
|
216
|
+
}
|
|
217
|
+
`;
|
|
212
218
|
}
|
|
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
219
|
}
|
|
220
|
-
|
|
220
|
+
builtinModules = formatTypes(builtinModules);
|
|
221
|
+
context.debug(`A TypeScript declaration file (size: ${prettyBytes.prettyBytes(new Blob(toArray.toArray(builtinModules)).size)}) emitted for the built-in modules types.`);
|
|
222
|
+
return builtinModules;
|
|
221
223
|
}
|
|
222
224
|
chunkPK6SKIKE_cjs.__name(emitTypes, "emitTypes");
|
|
223
225
|
var mergeResults = defu.createDefu((obj, key, value) => {
|
|
@@ -302,7 +304,7 @@ async function installPackage(context, packageName, dev = false) {
|
|
|
302
304
|
if (!await packageFns.isPackageListed(_package.getPackageName(packageName), {
|
|
303
305
|
cwd: context.config.projectRoot
|
|
304
306
|
})) {
|
|
305
|
-
if (context.config.
|
|
307
|
+
if (context.config.autoInstall) {
|
|
306
308
|
context.log(types.LogLevelLabel.WARN, `The package "${packageName}" is not installed. It will be installed automatically.`);
|
|
307
309
|
const result = await install.install(packageName, {
|
|
308
310
|
cwd: context.config.projectRoot,
|
|
@@ -313,7 +315,7 @@ async function installPackage(context, packageName, dev = false) {
|
|
|
313
315
|
throw new Error(`An error occurred while installing the package "${packageName}"`);
|
|
314
316
|
}
|
|
315
317
|
} else {
|
|
316
|
-
context.log(types.LogLevelLabel.WARN, `The package "${packageName}" is not installed. Since the "
|
|
318
|
+
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
319
|
}
|
|
318
320
|
} else if (_package.hasPackageVersion(packageName) && !process.env.POWERLINES_SKIP_VERSION_CHECK) {
|
|
319
321
|
const isMatching = await packageFns.doesPackageMatch(_package.getPackageName(packageName), _package.getPackageVersion(packageName), context.config.projectRoot);
|
|
@@ -491,7 +493,7 @@ var PowerlinesAPI = class _PowerlinesAPI {
|
|
|
491
493
|
* @returns A new instance of the Powerlines API
|
|
492
494
|
*/
|
|
493
495
|
static async from(workspaceRoot, config) {
|
|
494
|
-
const api = new _PowerlinesAPI(await
|
|
496
|
+
const api = new _PowerlinesAPI(await chunkYQUWIJ2D_cjs.PowerlinesAPIContext.from(workspaceRoot, config));
|
|
495
497
|
api.#context.$$internal = {
|
|
496
498
|
api,
|
|
497
499
|
addPlugin: api.#addPlugin.bind(api)
|
|
@@ -539,7 +541,7 @@ var PowerlinesAPI = class _PowerlinesAPI {
|
|
|
539
541
|
order: "normal"
|
|
540
542
|
});
|
|
541
543
|
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")}` : ""}
|
|
544
|
+
${context.entry.map((entry) => `- ${entry.file}${entry.output ? ` -> ${entry.output}` : ""}`).join(" \n")}` : ""}`);
|
|
543
545
|
await resolveTsconfig(context);
|
|
544
546
|
await installDependencies(context);
|
|
545
547
|
await this.callHook("configResolved", {
|
|
@@ -1009,8 +1011,8 @@ ${formatTypes(types)}
|
|
|
1009
1011
|
if (isPromise.isPromiseLike(config)) {
|
|
1010
1012
|
awaited = await Promise.resolve(config);
|
|
1011
1013
|
}
|
|
1012
|
-
if (!
|
|
1013
|
-
const invalid =
|
|
1014
|
+
if (!chunkGKYKBP64_cjs.isPluginConfig(awaited)) {
|
|
1015
|
+
const invalid = chunkGKYKBP64_cjs.findInvalidPluginConfig(awaited);
|
|
1014
1016
|
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
1017
|
|
|
1016
1018
|
Please ensure the value is one of the following:
|
|
@@ -1022,7 +1024,7 @@ Please ensure the value is one of the following:
|
|
|
1022
1024
|
- an array of plugins or plugin configurations`);
|
|
1023
1025
|
}
|
|
1024
1026
|
let plugins;
|
|
1025
|
-
if (
|
|
1027
|
+
if (chunkGKYKBP64_cjs.isPlugin(awaited)) {
|
|
1026
1028
|
plugins = [
|
|
1027
1029
|
awaited
|
|
1028
1030
|
];
|
|
@@ -1035,9 +1037,9 @@ Please ensure the value is one of the following:
|
|
|
1035
1037
|
} else {
|
|
1036
1038
|
plugins = toArray.toArray(resolved);
|
|
1037
1039
|
}
|
|
1038
|
-
} else if (Array.isArray(awaited) && awaited.every(
|
|
1040
|
+
} else if (Array.isArray(awaited) && awaited.every(chunkGKYKBP64_cjs.isPlugin)) {
|
|
1039
1041
|
plugins = awaited;
|
|
1040
|
-
} else if (Array.isArray(awaited) && awaited.every(
|
|
1042
|
+
} else if (Array.isArray(awaited) && awaited.every(chunkGKYKBP64_cjs.isPluginConfig)) {
|
|
1041
1043
|
plugins = [];
|
|
1042
1044
|
for (const pluginConfig of awaited) {
|
|
1043
1045
|
const initialized = await this.#initPlugin(pluginConfig);
|
|
@@ -1045,10 +1047,10 @@ Please ensure the value is one of the following:
|
|
|
1045
1047
|
plugins.push(...initialized);
|
|
1046
1048
|
}
|
|
1047
1049
|
}
|
|
1048
|
-
} else if (
|
|
1050
|
+
} else if (chunkGKYKBP64_cjs.isPluginConfigTuple(awaited) || chunkGKYKBP64_cjs.isPluginConfigObject(awaited)) {
|
|
1049
1051
|
let pluginConfig;
|
|
1050
1052
|
let pluginOptions;
|
|
1051
|
-
if (
|
|
1053
|
+
if (chunkGKYKBP64_cjs.isPluginConfigTuple(awaited)) {
|
|
1052
1054
|
pluginConfig = awaited[0];
|
|
1053
1055
|
pluginOptions = awaited?.length === 2 ? awaited[1] : void 0;
|
|
1054
1056
|
} else {
|
|
@@ -1064,21 +1066,21 @@ Please ensure the value is one of the following:
|
|
|
1064
1066
|
}
|
|
1065
1067
|
} else if (isFunction.isFunction(pluginConfig)) {
|
|
1066
1068
|
plugins = toArray.toArray(await Promise.resolve(pluginConfig(pluginOptions)));
|
|
1067
|
-
} else if (Array.isArray(pluginConfig) && pluginConfig.every(
|
|
1069
|
+
} else if (Array.isArray(pluginConfig) && pluginConfig.every(chunkGKYKBP64_cjs.isPlugin)) {
|
|
1068
1070
|
plugins = pluginConfig;
|
|
1069
|
-
} else if (
|
|
1071
|
+
} else if (chunkGKYKBP64_cjs.isPlugin(pluginConfig)) {
|
|
1070
1072
|
plugins = toArray.toArray(pluginConfig);
|
|
1071
1073
|
}
|
|
1072
1074
|
}
|
|
1073
1075
|
if (!plugins) {
|
|
1074
1076
|
throw new Error(`The plugin configuration ${JSON.stringify(awaited)} is invalid. This configuration must point to a valid Powerlines plugin module.`);
|
|
1075
1077
|
}
|
|
1076
|
-
if (plugins.length > 0 && !plugins.every(
|
|
1078
|
+
if (plugins.length > 0 && !plugins.every(chunkGKYKBP64_cjs.isPlugin)) {
|
|
1077
1079
|
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
1080
|
}
|
|
1079
1081
|
const result = [];
|
|
1080
1082
|
for (const plugin of plugins) {
|
|
1081
|
-
if (
|
|
1083
|
+
if (chunkGKYKBP64_cjs.checkDedupe(plugin, this.context.plugins)) {
|
|
1082
1084
|
this.context.trace(`Duplicate ${chalk3__default.default.bold.cyanBright(plugin.name)} plugin dependency detected - Skipping initialization.`);
|
|
1083
1085
|
} else {
|
|
1084
1086
|
result.push(plugin);
|
|
@@ -1098,7 +1100,7 @@ Please ensure the value is one of the following:
|
|
|
1098
1100
|
this.context.config.projectRoot
|
|
1099
1101
|
]
|
|
1100
1102
|
});
|
|
1101
|
-
if (!isInstalled && this.context.config.
|
|
1103
|
+
if (!isInstalled && this.context.config.autoInstall) {
|
|
1102
1104
|
this.#context.warn(`The plugin package "${pluginPath}" is not installed. It will be installed automatically.`);
|
|
1103
1105
|
const result = await install.install(pluginPath, {
|
|
1104
1106
|
cwd: this.context.config.projectRoot
|
|
@@ -1249,5 +1251,5 @@ function createUnpluginFactory(variant, decorate) {
|
|
|
1249
1251
|
chunkPK6SKIKE_cjs.__name(createUnpluginFactory, "createUnpluginFactory");
|
|
1250
1252
|
|
|
1251
1253
|
exports.createUnpluginFactory = createUnpluginFactory;
|
|
1252
|
-
//# sourceMappingURL=chunk-
|
|
1253
|
-
//# sourceMappingURL=chunk-
|
|
1254
|
+
//# sourceMappingURL=chunk-BHYCRVQO.cjs.map
|
|
1255
|
+
//# sourceMappingURL=chunk-BHYCRVQO.cjs.map
|