powerlines 0.24.2 → 0.24.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.cjs +2 -2
- package/dist/api.js +1 -1
- package/dist/astro.cjs +4 -4
- package/dist/astro.js +3 -3
- package/dist/{chunk-H74SWU2C.js → chunk-2DHR5VPL.js} +1 -1
- package/dist/{chunk-2TWFBWKA.cjs → chunk-37PJDPER.cjs} +3 -3
- package/dist/{chunk-EXQM3KGH.js → chunk-AOAZS3KU.js} +1 -1
- package/dist/{chunk-HTGCHSLH.cjs → chunk-DMV2VN3N.cjs} +2 -2
- package/dist/{chunk-7V3LWCLB.js → chunk-MR2ARFN4.js} +1 -1
- package/dist/{chunk-ZT2J55YE.js → chunk-VO7UNY6U.js} +6 -13
- package/dist/{chunk-ZEE73BCY.js → chunk-WG76FEAR.js} +1 -1
- package/dist/{chunk-FPB2O7FD.cjs → chunk-WJQX2T36.cjs} +2 -2
- package/dist/{chunk-FGH3MZTQ.cjs → chunk-XFPLVPMF.cjs} +5 -12
- package/dist/{chunk-TIBYAWZZ.cjs → chunk-YWDLT2K5.cjs} +2 -2
- package/dist/esbuild.cjs +6 -6
- package/dist/esbuild.js +3 -3
- package/dist/farm.cjs +3 -3
- package/dist/farm.js +2 -2
- package/dist/index.cjs +11 -11
- package/dist/index.js +2 -2
- package/dist/lib/{chunk-7CVPZOH4.js → chunk-3HVJF7CD.js} +2 -2
- package/dist/lib/{chunk-MS3CD2U6.cjs → chunk-4YERLWXX.cjs} +11 -11
- package/dist/lib/{chunk-AA6RBP44.cjs → chunk-INSBEK3W.cjs} +10 -10
- package/dist/lib/{chunk-DFW5FGEO.js → chunk-LDMWUKGL.js} +1 -1
- package/dist/lib/{chunk-CGRHZJY5.js → chunk-NKV4KVFI.js} +2 -2
- package/dist/lib/{chunk-RNHKEPFD.cjs → chunk-PPUZYUCI.cjs} +5 -12
- package/dist/lib/{chunk-KFWMKDJQ.js → chunk-RJLPU6PQ.js} +6 -13
- package/dist/lib/{chunk-VMLQATMA.cjs → chunk-VSN5AZP5.cjs} +4 -4
- package/dist/lib/contexts/api-context.cjs +4 -4
- package/dist/lib/contexts/api-context.js +3 -3
- package/dist/lib/contexts/context.cjs +2 -2
- package/dist/lib/contexts/context.js +1 -1
- package/dist/lib/contexts/environment-context.cjs +3 -3
- package/dist/lib/contexts/environment-context.js +2 -2
- package/dist/lib/contexts/index.cjs +6 -6
- package/dist/lib/contexts/index.js +3 -3
- package/dist/lib/index.cjs +9 -9
- package/dist/lib/index.js +4 -4
- package/dist/lib/unplugin/factory.cjs +5 -5
- package/dist/lib/unplugin/factory.js +4 -4
- package/dist/lib/unplugin/index.cjs +5 -5
- package/dist/lib/unplugin/index.js +4 -4
- package/dist/next.cjs +4 -4
- package/dist/next.js +3 -3
- package/dist/nuxt.cjs +6 -6
- package/dist/nuxt.js +4 -4
- package/dist/rolldown.cjs +3 -3
- package/dist/rolldown.js +2 -2
- package/dist/rollup.cjs +3 -3
- package/dist/rollup.js +2 -2
- package/dist/rspack.cjs +3 -3
- package/dist/rspack.js +2 -2
- package/dist/tsup.cjs +4 -4
- package/dist/tsup.js +3 -3
- package/dist/unloader.cjs +3 -3
- package/dist/unloader.js +2 -2
- package/dist/unplugin.cjs +5 -5
- package/dist/unplugin.js +3 -3
- package/dist/vite.cjs +6 -6
- package/dist/vite.js +3 -3
- package/dist/webpack.cjs +6 -6
- package/dist/webpack.js +3 -3
- package/package.json +14 -14
package/dist/api.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkXFPLVPMF_cjs = require('./chunk-XFPLVPMF.cjs');
|
|
4
4
|
require('./chunk-ETKZMGLN.cjs');
|
|
5
5
|
require('./chunk-PAMSESZV.cjs');
|
|
6
6
|
require('./chunk-AYKZK666.cjs');
|
|
@@ -10,5 +10,5 @@ require('./chunk-USNT2KNT.cjs');
|
|
|
10
10
|
|
|
11
11
|
Object.defineProperty(exports, "PowerlinesAPI", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkXFPLVPMF_cjs.PowerlinesAPI; }
|
|
14
14
|
});
|
package/dist/api.js
CHANGED
package/dist/astro.cjs
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var chunkWJQX2T36_cjs = require('./chunk-WJQX2T36.cjs');
|
|
6
6
|
require('./chunk-5IBA5HC2.cjs');
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
7
|
+
require('./chunk-37PJDPER.cjs');
|
|
8
|
+
require('./chunk-XFPLVPMF.cjs');
|
|
9
9
|
require('./chunk-ETKZMGLN.cjs');
|
|
10
10
|
require('./chunk-PAMSESZV.cjs');
|
|
11
11
|
require('./chunk-AYKZK666.cjs');
|
|
@@ -15,7 +15,7 @@ var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
|
|
|
15
15
|
var astro = /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((config) => ({
|
|
16
16
|
vite: {
|
|
17
17
|
plugins: [
|
|
18
|
-
|
|
18
|
+
chunkWJQX2T36_cjs.vite_default(config)
|
|
19
19
|
]
|
|
20
20
|
}
|
|
21
21
|
}), "astro");
|
package/dist/astro.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { vite_default } from './chunk-
|
|
1
|
+
import { vite_default } from './chunk-MR2ARFN4.js';
|
|
2
2
|
import './chunk-VBR53KGY.js';
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
import './chunk-AOAZS3KU.js';
|
|
4
|
+
import './chunk-VO7UNY6U.js';
|
|
5
5
|
import './chunk-JQCWV4DT.js';
|
|
6
6
|
import './chunk-JKBJF3UI.js';
|
|
7
7
|
import './chunk-VT7NVLLU.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { extractESBuildConfig } from './chunk-VBR53KGY.js';
|
|
2
|
-
import { createUnpluginFactory } from './chunk-
|
|
2
|
+
import { createUnpluginFactory } from './chunk-AOAZS3KU.js';
|
|
3
3
|
import { __name } from './chunk-SHUYVCID.js';
|
|
4
4
|
import { isUndefined } from '@stryke/type-checks/is-undefined';
|
|
5
5
|
import { createEsbuildPlugin } from 'unplugin';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkXFPLVPMF_cjs = require('./chunk-XFPLVPMF.cjs');
|
|
4
4
|
var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
|
|
5
5
|
var types = require('@storm-software/config-tools/types');
|
|
6
6
|
var getWorkspaceRoot = require('@stryke/fs/get-workspace-root');
|
|
@@ -26,7 +26,7 @@ chunkUSNT2KNT_cjs.__name(getString, "getString");
|
|
|
26
26
|
// src/lib/unplugin/factory.ts
|
|
27
27
|
function createUnpluginFactory(variant, decorate) {
|
|
28
28
|
return (config, meta) => {
|
|
29
|
-
const log =
|
|
29
|
+
const log = chunkXFPLVPMF_cjs.createLog("unplugin", config);
|
|
30
30
|
log(types.LogLevelLabel.DEBUG, "Initializing Unplugin");
|
|
31
31
|
try {
|
|
32
32
|
const userConfig = {
|
|
@@ -38,7 +38,7 @@ function createUnpluginFactory(variant, decorate) {
|
|
|
38
38
|
async function buildStart() {
|
|
39
39
|
log(types.LogLevelLabel.DEBUG, "Powerlines build plugin starting...");
|
|
40
40
|
const workspaceRoot = getWorkspaceRoot.getWorkspaceRoot(process.cwd());
|
|
41
|
-
api = await
|
|
41
|
+
api = await chunkXFPLVPMF_cjs.PowerlinesAPI.from(workspaceRoot, userConfig);
|
|
42
42
|
log(types.LogLevelLabel.DEBUG, "Preparing build artifacts for the Powerlines project...");
|
|
43
43
|
await api.prepare({
|
|
44
44
|
command: "build"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createLog, PowerlinesAPI } from './chunk-
|
|
1
|
+
import { createLog, PowerlinesAPI } from './chunk-VO7UNY6U.js';
|
|
2
2
|
import { __name } from './chunk-SHUYVCID.js';
|
|
3
3
|
import { LogLevelLabel } from '@storm-software/config-tools/types';
|
|
4
4
|
import { getWorkspaceRoot } from '@stryke/fs/get-workspace-root';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk37PJDPER_cjs = require('./chunk-37PJDPER.cjs');
|
|
4
4
|
var unplugin = require('unplugin');
|
|
5
5
|
|
|
6
|
-
var webpack = unplugin.createWebpackPlugin(
|
|
6
|
+
var webpack = unplugin.createWebpackPlugin(chunk37PJDPER_cjs.createUnpluginFactory("webpack"));
|
|
7
7
|
var webpack_default = webpack;
|
|
8
8
|
|
|
9
9
|
exports.webpack = webpack;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { extractESBuildConfig } from './chunk-VBR53KGY.js';
|
|
2
|
-
import { createUnpluginFactory } from './chunk-
|
|
2
|
+
import { createUnpluginFactory } from './chunk-AOAZS3KU.js';
|
|
3
3
|
import { __name } from './chunk-SHUYVCID.js';
|
|
4
4
|
import { isDevelopmentMode, isTestMode } from '@stryke/env/environment-checks';
|
|
5
5
|
import defu from 'defu';
|
|
@@ -59,7 +59,7 @@ import { isFile } from '@stryke/fs/is-file';
|
|
|
59
59
|
import * as $ from '@stryke/capnp';
|
|
60
60
|
import { bufferToString } from '@stryke/convert/buffer-to-string';
|
|
61
61
|
import { readFileBuffer, readFileBufferSync, writeFileBuffer } from '@stryke/fs/buffer';
|
|
62
|
-
import { toAbsolutePath } from '@stryke/path/correct-path';
|
|
62
|
+
import { toAbsolutePath, correctPath } from '@stryke/path/correct-path';
|
|
63
63
|
import { prettyBytes } from '@stryke/string-format/pretty-bytes';
|
|
64
64
|
import { isBuffer } from '@stryke/type-checks/is-buffer';
|
|
65
65
|
import { create } from 'flat-cache';
|
|
@@ -68,6 +68,7 @@ import _fs from 'node:fs';
|
|
|
68
68
|
import { getLogFn, getLogLevel } from '@storm-software/config-tools/logger';
|
|
69
69
|
import { getColor } from '@storm-software/config-tools/utilities/colors';
|
|
70
70
|
import { noop } from '@stryke/helpers/noop';
|
|
71
|
+
import { slash } from '@stryke/path/slash';
|
|
71
72
|
import { isParentPath } from '@stryke/path/is-parent-path';
|
|
72
73
|
import { Volume } from 'memfs';
|
|
73
74
|
import { Union } from 'unionfs';
|
|
@@ -1108,16 +1109,8 @@ function isVirtualFileData(obj) {
|
|
|
1108
1109
|
return !!(isSetObject(obj) && "code" in obj && obj.code);
|
|
1109
1110
|
}
|
|
1110
1111
|
__name(isVirtualFileData, "isVirtualFileData");
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
if (!pathOrUrl) {
|
|
1114
|
-
throw new Error("No Path or URL provided to Virtual File System");
|
|
1115
|
-
}
|
|
1116
|
-
let result = pathOrUrl.toString();
|
|
1117
|
-
if (result.startsWith(FILE_PREFIX)) {
|
|
1118
|
-
result = result.slice(FILE_PREFIX.length);
|
|
1119
|
-
}
|
|
1120
|
-
return result;
|
|
1112
|
+
function toFilePath(path) {
|
|
1113
|
+
return correctPath(slash(path?.toString() || ".").replace(/^file:\/\//, ""));
|
|
1121
1114
|
}
|
|
1122
1115
|
__name(toFilePath, "toFilePath");
|
|
1123
1116
|
var FS_METHODS = [
|
|
@@ -2181,8 +2174,8 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
2181
2174
|
paths.push(importer);
|
|
2182
2175
|
}
|
|
2183
2176
|
paths.push(this.#context.workspaceConfig.workspaceRoot);
|
|
2184
|
-
paths.push(
|
|
2185
|
-
paths.push(
|
|
2177
|
+
paths.push(appendPath(this.#context.config.projectRoot, this.#context.workspaceConfig.workspaceRoot));
|
|
2178
|
+
paths.push(appendPath(this.#context.config.sourceRoot, this.#context.workspaceConfig.workspaceRoot));
|
|
2186
2179
|
paths.push(...Object.keys(this.#context.tsconfig.options.paths ?? {}).filter((tsconfigPath) => id.startsWith(tsconfigPath.replace(/\*$/, ""))).map((tsconfigPath) => this.#context.tsconfig.options.paths?.[tsconfigPath]).flat().filter(Boolean).map((tsconfigPath) => appendPath(tsconfigPath, this.#context.workspaceConfig.workspaceRoot)));
|
|
2187
2180
|
for (const combination of getResolutionCombinations(id, {
|
|
2188
2181
|
paths
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunk5IBA5HC2_cjs = require('./chunk-5IBA5HC2.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunk37PJDPER_cjs = require('./chunk-37PJDPER.cjs');
|
|
5
5
|
var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
|
|
6
6
|
var environmentChecks = require('@stryke/env/environment-checks');
|
|
7
7
|
var defu = require('defu');
|
|
@@ -83,7 +83,7 @@ function extractViteConfig(context) {
|
|
|
83
83
|
chunkUSNT2KNT_cjs.__name(extractViteConfig, "extractViteConfig");
|
|
84
84
|
|
|
85
85
|
// src/vite.ts
|
|
86
|
-
var vite = unplugin.createVitePlugin(
|
|
86
|
+
var vite = unplugin.createVitePlugin(chunk37PJDPER_cjs.createUnpluginFactory("vite", (api, plugin) => {
|
|
87
87
|
return {
|
|
88
88
|
...plugin,
|
|
89
89
|
vite: {
|
|
@@ -70,6 +70,7 @@ var _fs = require('fs');
|
|
|
70
70
|
var logger = require('@storm-software/config-tools/logger');
|
|
71
71
|
var colors = require('@storm-software/config-tools/utilities/colors');
|
|
72
72
|
var noop = require('@stryke/helpers/noop');
|
|
73
|
+
var slash = require('@stryke/path/slash');
|
|
73
74
|
var isParentPath = require('@stryke/path/is-parent-path');
|
|
74
75
|
var memfs = require('memfs');
|
|
75
76
|
var unionfs = require('unionfs');
|
|
@@ -1138,16 +1139,8 @@ function isVirtualFileData(obj) {
|
|
|
1138
1139
|
return !!(isSetObject.isSetObject(obj) && "code" in obj && obj.code);
|
|
1139
1140
|
}
|
|
1140
1141
|
chunkUSNT2KNT_cjs.__name(isVirtualFileData, "isVirtualFileData");
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
if (!pathOrUrl) {
|
|
1144
|
-
throw new Error("No Path or URL provided to Virtual File System");
|
|
1145
|
-
}
|
|
1146
|
-
let result = pathOrUrl.toString();
|
|
1147
|
-
if (result.startsWith(FILE_PREFIX)) {
|
|
1148
|
-
result = result.slice(FILE_PREFIX.length);
|
|
1149
|
-
}
|
|
1150
|
-
return result;
|
|
1142
|
+
function toFilePath(path) {
|
|
1143
|
+
return correctPath.correctPath(slash.slash(path?.toString() || ".").replace(/^file:\/\//, ""));
|
|
1151
1144
|
}
|
|
1152
1145
|
chunkUSNT2KNT_cjs.__name(toFilePath, "toFilePath");
|
|
1153
1146
|
var FS_METHODS = [
|
|
@@ -2211,8 +2204,8 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
2211
2204
|
paths.push(importer);
|
|
2212
2205
|
}
|
|
2213
2206
|
paths.push(this.#context.workspaceConfig.workspaceRoot);
|
|
2214
|
-
paths.push(
|
|
2215
|
-
paths.push(
|
|
2207
|
+
paths.push(append.appendPath(this.#context.config.projectRoot, this.#context.workspaceConfig.workspaceRoot));
|
|
2208
|
+
paths.push(append.appendPath(this.#context.config.sourceRoot, this.#context.workspaceConfig.workspaceRoot));
|
|
2216
2209
|
paths.push(...Object.keys(this.#context.tsconfig.options.paths ?? {}).filter((tsconfigPath) => id.startsWith(tsconfigPath.replace(/\*$/, ""))).map((tsconfigPath) => this.#context.tsconfig.options.paths?.[tsconfigPath]).flat().filter(Boolean).map((tsconfigPath) => append.appendPath(tsconfigPath, this.#context.workspaceConfig.workspaceRoot)));
|
|
2217
2210
|
for (const combination of resolve.getResolutionCombinations(id, {
|
|
2218
2211
|
paths
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunk5IBA5HC2_cjs = require('./chunk-5IBA5HC2.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunk37PJDPER_cjs = require('./chunk-37PJDPER.cjs');
|
|
5
5
|
var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
|
|
6
6
|
var isUndefined = require('@stryke/type-checks/is-undefined');
|
|
7
7
|
var unplugin = require('unplugin');
|
|
8
8
|
|
|
9
|
-
var esbuild = unplugin.createEsbuildPlugin(
|
|
9
|
+
var esbuild = unplugin.createEsbuildPlugin(chunk37PJDPER_cjs.createUnpluginFactory("esbuild", (api, plugin) => {
|
|
10
10
|
return {
|
|
11
11
|
...plugin,
|
|
12
12
|
esbuild: {
|
package/dist/esbuild.cjs
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var chunkYWDLT2K5_cjs = require('./chunk-YWDLT2K5.cjs');
|
|
6
6
|
require('./chunk-5IBA5HC2.cjs');
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
7
|
+
require('./chunk-37PJDPER.cjs');
|
|
8
|
+
require('./chunk-XFPLVPMF.cjs');
|
|
9
9
|
require('./chunk-ETKZMGLN.cjs');
|
|
10
10
|
require('./chunk-PAMSESZV.cjs');
|
|
11
11
|
require('./chunk-AYKZK666.cjs');
|
|
@@ -15,13 +15,13 @@ require('./chunk-USNT2KNT.cjs');
|
|
|
15
15
|
|
|
16
16
|
Object.defineProperty(exports, "default", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkYWDLT2K5_cjs.esbuild_default; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "esbuild", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkYWDLT2K5_cjs.esbuild; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "module.exports", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkYWDLT2K5_cjs.esbuild; }
|
|
27
27
|
});
|
package/dist/esbuild.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { esbuild_default as default, esbuild, esbuild as "module.exports" } from './chunk-
|
|
1
|
+
export { esbuild_default as default, esbuild, esbuild as "module.exports" } from './chunk-2DHR5VPL.js';
|
|
2
2
|
import './chunk-VBR53KGY.js';
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
import './chunk-AOAZS3KU.js';
|
|
4
|
+
import './chunk-VO7UNY6U.js';
|
|
5
5
|
import './chunk-JQCWV4DT.js';
|
|
6
6
|
import './chunk-JKBJF3UI.js';
|
|
7
7
|
import './chunk-VT7NVLLU.js';
|
package/dist/farm.cjs
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('./chunk-
|
|
5
|
+
var chunk37PJDPER_cjs = require('./chunk-37PJDPER.cjs');
|
|
6
|
+
require('./chunk-XFPLVPMF.cjs');
|
|
7
7
|
require('./chunk-ETKZMGLN.cjs');
|
|
8
8
|
require('./chunk-PAMSESZV.cjs');
|
|
9
9
|
require('./chunk-AYKZK666.cjs');
|
|
10
10
|
require('./chunk-USNT2KNT.cjs');
|
|
11
11
|
var unplugin = require('unplugin');
|
|
12
12
|
|
|
13
|
-
var farm = unplugin.createFarmPlugin(
|
|
13
|
+
var farm = unplugin.createFarmPlugin(chunk37PJDPER_cjs.createUnpluginFactory("farm"));
|
|
14
14
|
var farm_default = farm;
|
|
15
15
|
|
|
16
16
|
exports.default = farm_default;
|
package/dist/farm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createUnpluginFactory } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
import { createUnpluginFactory } from './chunk-AOAZS3KU.js';
|
|
2
|
+
import './chunk-VO7UNY6U.js';
|
|
3
3
|
import './chunk-JQCWV4DT.js';
|
|
4
4
|
import './chunk-JKBJF3UI.js';
|
|
5
5
|
import './chunk-VT7NVLLU.js';
|
package/dist/index.cjs
CHANGED
|
@@ -14,14 +14,14 @@ require('./chunk-7GYTTM4M.cjs');
|
|
|
14
14
|
var chunkXP7OML7S_cjs = require('./chunk-XP7OML7S.cjs');
|
|
15
15
|
require('./chunk-HQFZ64VC.cjs');
|
|
16
16
|
var chunkBUR2JQ6G_cjs = require('./chunk-BUR2JQ6G.cjs');
|
|
17
|
-
var
|
|
17
|
+
var chunkXFPLVPMF_cjs = require('./chunk-XFPLVPMF.cjs');
|
|
18
18
|
var chunkETKZMGLN_cjs = require('./chunk-ETKZMGLN.cjs');
|
|
19
19
|
var chunkPAMSESZV_cjs = require('./chunk-PAMSESZV.cjs');
|
|
20
20
|
var chunkAYKZK666_cjs = require('./chunk-AYKZK666.cjs');
|
|
21
21
|
require('./chunk-USNT2KNT.cjs');
|
|
22
22
|
|
|
23
23
|
// src/index.ts
|
|
24
|
-
var index_default =
|
|
24
|
+
var index_default = chunkXFPLVPMF_cjs.PowerlinesAPI;
|
|
25
25
|
|
|
26
26
|
Object.defineProperty(exports, "LogLevel", {
|
|
27
27
|
enumerable: true,
|
|
@@ -33,39 +33,39 @@ Object.defineProperty(exports, "defineConfig", {
|
|
|
33
33
|
});
|
|
34
34
|
Object.defineProperty(exports, "FileData", {
|
|
35
35
|
enumerable: true,
|
|
36
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunkXFPLVPMF_cjs.FileData; }
|
|
37
37
|
});
|
|
38
38
|
Object.defineProperty(exports, "FileId", {
|
|
39
39
|
enumerable: true,
|
|
40
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunkXFPLVPMF_cjs.FileId; }
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "FileMetadata", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunkXFPLVPMF_cjs.FileMetadata; }
|
|
45
45
|
});
|
|
46
46
|
Object.defineProperty(exports, "FileMetadata_KeyValuePair", {
|
|
47
47
|
enumerable: true,
|
|
48
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunkXFPLVPMF_cjs.FileMetadata_KeyValuePair; }
|
|
49
49
|
});
|
|
50
50
|
Object.defineProperty(exports, "FileSystem", {
|
|
51
51
|
enumerable: true,
|
|
52
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunkXFPLVPMF_cjs.FileSystem; }
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "FileType", {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunkXFPLVPMF_cjs.FileType; }
|
|
57
57
|
});
|
|
58
58
|
Object.defineProperty(exports, "PowerlinesAPI", {
|
|
59
59
|
enumerable: true,
|
|
60
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunkXFPLVPMF_cjs.PowerlinesAPI; }
|
|
61
61
|
});
|
|
62
62
|
Object.defineProperty(exports, "PreserveSignatureType", {
|
|
63
63
|
enumerable: true,
|
|
64
|
-
get: function () { return
|
|
64
|
+
get: function () { return chunkXFPLVPMF_cjs.PreserveSignatureType; }
|
|
65
65
|
});
|
|
66
66
|
Object.defineProperty(exports, "_capnpFileId", {
|
|
67
67
|
enumerable: true,
|
|
68
|
-
get: function () { return
|
|
68
|
+
get: function () { return chunkXFPLVPMF_cjs._capnpFileId; }
|
|
69
69
|
});
|
|
70
70
|
Object.defineProperty(exports, "PLUGIN_NON_HOOK_FIELDS", {
|
|
71
71
|
enumerable: true,
|
package/dist/index.js
CHANGED
|
@@ -10,8 +10,8 @@ import './chunk-DRXFQCNC.js';
|
|
|
10
10
|
export { LogLevel } from './chunk-W5X3ZEZ5.js';
|
|
11
11
|
import './chunk-JGB5YQ2U.js';
|
|
12
12
|
export { defineConfig } from './chunk-CJSGAITR.js';
|
|
13
|
-
import { PowerlinesAPI } from './chunk-
|
|
14
|
-
export { FileData, FileId, FileMetadata, FileMetadata_KeyValuePair, FileSystem, FileType, PowerlinesAPI, PreserveSignatureType, _capnpFileId } from './chunk-
|
|
13
|
+
import { PowerlinesAPI } from './chunk-VO7UNY6U.js';
|
|
14
|
+
export { FileData, FileId, FileMetadata, FileMetadata_KeyValuePair, FileSystem, FileType, PowerlinesAPI, PreserveSignatureType, _capnpFileId } from './chunk-VO7UNY6U.js';
|
|
15
15
|
export { PLUGIN_NON_HOOK_FIELDS } from './chunk-JQCWV4DT.js';
|
|
16
16
|
export { SUPPORTED_COMMANDS } from './chunk-JKBJF3UI.js';
|
|
17
17
|
export { __VFS_PATCH__, __VFS_REVERT__ } from './chunk-VT7NVLLU.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PowerlinesEnvironmentContext } from './chunk-
|
|
2
|
-
import { PowerlinesContext } from './chunk-
|
|
1
|
+
import { PowerlinesEnvironmentContext } from './chunk-LDMWUKGL.js';
|
|
2
|
+
import { PowerlinesContext } from './chunk-RJLPU6PQ.js';
|
|
3
3
|
import { loadWorkspaceConfig } from './chunk-XBM7FHNK.js';
|
|
4
4
|
import { __name } from './chunk-SHUYVCID.js';
|
|
5
5
|
import { LogLevelLabel } from '@storm-software/config-tools/types';
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
var chunk2NZADVP5_cjs = require('./chunk-2NZADVP5.cjs');
|
|
4
4
|
var chunk4NHFXDTQ_cjs = require('./chunk-4NHFXDTQ.cjs');
|
|
5
5
|
var chunkBQU53ZNB_cjs = require('./chunk-BQU53ZNB.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkVSN5AZP5_cjs = require('./chunk-VSN5AZP5.cjs');
|
|
7
7
|
var chunkB3EE3VHZ_cjs = require('./chunk-B3EE3VHZ.cjs');
|
|
8
|
-
var
|
|
8
|
+
var chunkPPUZYUCI_cjs = require('./chunk-PPUZYUCI.cjs');
|
|
9
9
|
var chunk7VJ42H2I_cjs = require('./chunk-7VJ42H2I.cjs');
|
|
10
10
|
var chunkJA4HSQRN_cjs = require('./chunk-JA4HSQRN.cjs');
|
|
11
11
|
var chunk3OCI4TH7_cjs = require('./chunk-3OCI4TH7.cjs');
|
|
@@ -470,7 +470,7 @@ var PowerlinesAPI = class _PowerlinesAPI {
|
|
|
470
470
|
* Initialize the Powerlines API
|
|
471
471
|
*/
|
|
472
472
|
static async from(workspaceRoot, config) {
|
|
473
|
-
const api = new _PowerlinesAPI(await
|
|
473
|
+
const api = new _PowerlinesAPI(await chunkVSN5AZP5_cjs.PowerlinesAPIContext.from(workspaceRoot, config));
|
|
474
474
|
api.#context.$$internal.api = api;
|
|
475
475
|
for (const plugin of api.context.config.plugins ?? []) {
|
|
476
476
|
await api.#addPlugin(plugin);
|
|
@@ -801,7 +801,7 @@ ${formatTypes(generatedTypes)}
|
|
|
801
801
|
this.context.log(types.LogLevelLabel.TRACE, "Powerlines finalize execution started");
|
|
802
802
|
await this.#executeEnvironments(async (context) => {
|
|
803
803
|
await this.callHook(context, "finalize");
|
|
804
|
-
context.fs[
|
|
804
|
+
context.fs[chunkPPUZYUCI_cjs.__VFS_REVERT__]();
|
|
805
805
|
await context.fs.dispose();
|
|
806
806
|
});
|
|
807
807
|
this.context.log(types.LogLevelLabel.TRACE, "Powerlines finalize execution completed");
|
|
@@ -966,11 +966,11 @@ ${formatTypes(generatedTypes)}
|
|
|
966
966
|
if (isPromise.isPromiseLike(config)) {
|
|
967
967
|
awaited = await Promise.resolve(config);
|
|
968
968
|
}
|
|
969
|
-
if (!
|
|
969
|
+
if (!chunkPPUZYUCI_cjs.isPluginConfig(awaited)) {
|
|
970
970
|
throw new Error(`Invalid plugin specified in the configuration - ${JSON.stringify(awaited)}. Please ensure the value is a plugin name, an object with the \`plugin\` and \`props\` properties, or an instance of \`Plugin\`.`);
|
|
971
971
|
}
|
|
972
972
|
let plugin;
|
|
973
|
-
if (
|
|
973
|
+
if (chunkPPUZYUCI_cjs.isPlugin(awaited)) {
|
|
974
974
|
plugin = awaited;
|
|
975
975
|
} else if (isFunction.isFunction(awaited)) {
|
|
976
976
|
plugin = await Promise.resolve(awaited());
|
|
@@ -981,10 +981,10 @@ ${formatTypes(generatedTypes)}
|
|
|
981
981
|
} else {
|
|
982
982
|
plugin = resolved;
|
|
983
983
|
}
|
|
984
|
-
} else if (
|
|
984
|
+
} else if (chunkPPUZYUCI_cjs.isPluginConfigTuple(awaited) || chunkPPUZYUCI_cjs.isPluginConfigObject(awaited)) {
|
|
985
985
|
let pluginConfig;
|
|
986
986
|
let pluginOptions;
|
|
987
|
-
if (
|
|
987
|
+
if (chunkPPUZYUCI_cjs.isPluginConfigTuple(awaited)) {
|
|
988
988
|
pluginConfig = awaited[0];
|
|
989
989
|
pluginOptions = awaited?.length === 2 ? awaited[1] : void 0;
|
|
990
990
|
} else {
|
|
@@ -1000,17 +1000,17 @@ ${formatTypes(generatedTypes)}
|
|
|
1000
1000
|
}
|
|
1001
1001
|
} else if (isFunction.isFunction(pluginConfig)) {
|
|
1002
1002
|
plugin = await Promise.resolve(pluginConfig(pluginOptions));
|
|
1003
|
-
} else if (
|
|
1003
|
+
} else if (chunkPPUZYUCI_cjs.isPlugin(pluginConfig)) {
|
|
1004
1004
|
plugin = pluginConfig;
|
|
1005
1005
|
}
|
|
1006
1006
|
}
|
|
1007
1007
|
if (!plugin) {
|
|
1008
1008
|
throw new Error(`The plugin configuration ${JSON.stringify(awaited)} is invalid. This configuration must point to a valid Powerlines plugin module.`);
|
|
1009
1009
|
}
|
|
1010
|
-
if (!
|
|
1010
|
+
if (!chunkPPUZYUCI_cjs.isPlugin(plugin)) {
|
|
1011
1011
|
throw new Error(`The plugin option ${JSON.stringify(plugin)} does not export a valid module. This configuration must point to a valid Powerlines plugin module.`);
|
|
1012
1012
|
}
|
|
1013
|
-
if (
|
|
1013
|
+
if (chunkPPUZYUCI_cjs.checkDedupe(plugin, this.context.plugins)) {
|
|
1014
1014
|
this.context.log(types.LogLevelLabel.TRACE, `Duplicate ${chalk2__default.default.bold.cyanBright(plugin.name)} plugin dependency detected - Skipping initialization.`);
|
|
1015
1015
|
return null;
|
|
1016
1016
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkB3EE3VHZ_cjs = require('./chunk-B3EE3VHZ.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkPPUZYUCI_cjs = require('./chunk-PPUZYUCI.cjs');
|
|
5
5
|
var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
|
|
6
6
|
var resolve = require('@stryke/fs/resolve');
|
|
7
7
|
var isFunction = require('@stryke/type-checks/is-function');
|
|
@@ -17,7 +17,7 @@ var PLUGIN_NON_HOOK_FIELDS = [
|
|
|
17
17
|
];
|
|
18
18
|
|
|
19
19
|
// src/lib/contexts/environment-context.ts
|
|
20
|
-
var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends
|
|
20
|
+
var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends chunkPPUZYUCI_cjs.PowerlinesContext {
|
|
21
21
|
static {
|
|
22
22
|
chunkUSNT2KNT_cjs.__name(this, "PowerlinesEnvironmentContext");
|
|
23
23
|
}
|
|
@@ -65,7 +65,7 @@ var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends c
|
|
|
65
65
|
if (!result || isObject.isObject(result) && Object.keys(result).length === 0) {
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
|
-
resolvedPlugin =
|
|
68
|
+
resolvedPlugin = chunkPPUZYUCI_cjs.isPlugin(result) ? result : plugin;
|
|
69
69
|
}
|
|
70
70
|
const context = chunkB3EE3VHZ_cjs.createPluginContext(resolvedPlugin, this);
|
|
71
71
|
this.plugins.push({
|
|
@@ -75,28 +75,28 @@ var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends c
|
|
|
75
75
|
this.#hooks = Object.keys(resolvedPlugin).filter((key) => !PLUGIN_NON_HOOK_FIELDS.includes(key)).reduce((ret, key) => {
|
|
76
76
|
const hook = key;
|
|
77
77
|
const pluginHook = resolvedPlugin[hook];
|
|
78
|
-
if (!
|
|
78
|
+
if (!chunkPPUZYUCI_cjs.isPluginHook(pluginHook)) {
|
|
79
79
|
return ret;
|
|
80
80
|
}
|
|
81
|
-
if (!
|
|
81
|
+
if (!chunkPPUZYUCI_cjs.isHookExternal(hook)) {
|
|
82
82
|
ret[hook] ??= {};
|
|
83
83
|
if (resolvedPlugin.enforce) {
|
|
84
84
|
ret[hook][`${resolvedPlugin.enforce}Enforced`] ??= [];
|
|
85
|
-
|
|
85
|
+
chunkPPUZYUCI_cjs.addPluginHook(context, resolvedPlugin, pluginHook, ret[hook][`${resolvedPlugin.enforce}Enforced`]);
|
|
86
86
|
return ret;
|
|
87
87
|
}
|
|
88
88
|
if (isFunction.isFunction(pluginHook) || !pluginHook.order) {
|
|
89
89
|
ret[hook].normal ??= [];
|
|
90
|
-
|
|
90
|
+
chunkPPUZYUCI_cjs.addPluginHook(context, resolvedPlugin, pluginHook, ret[hook].normal);
|
|
91
91
|
return ret;
|
|
92
92
|
}
|
|
93
93
|
ret[hook][`${pluginHook.order}Ordered`] ??= [];
|
|
94
|
-
|
|
94
|
+
chunkPPUZYUCI_cjs.addPluginHook(context, resolvedPlugin, pluginHook, ret[hook][`${pluginHook.order}Ordered`]);
|
|
95
95
|
} else {
|
|
96
96
|
ret[hook] ??= [];
|
|
97
97
|
ret[hook].push({
|
|
98
98
|
plugin: resolvedPlugin,
|
|
99
|
-
hook:
|
|
99
|
+
hook: chunkPPUZYUCI_cjs.getHookHandler(pluginHook).bind(context)
|
|
100
100
|
});
|
|
101
101
|
}
|
|
102
102
|
return ret;
|
|
@@ -108,7 +108,7 @@ var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends c
|
|
|
108
108
|
selectHooks(hook, options) {
|
|
109
109
|
const handlers = [];
|
|
110
110
|
if (this.hooks[hook]) {
|
|
111
|
-
if (!
|
|
111
|
+
if (!chunkPPUZYUCI_cjs.isHookExternal(hook)) {
|
|
112
112
|
const hooks = this.hooks[hook];
|
|
113
113
|
if (options?.order) {
|
|
114
114
|
if (options?.order === "pre") {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createPluginContext } from './chunk-KFJCWNVG.js';
|
|
2
|
-
import { PowerlinesContext, isPlugin, isPluginHook, isHookExternal, addPluginHook, getHookHandler } from './chunk-
|
|
2
|
+
import { PowerlinesContext, isPlugin, isPluginHook, isHookExternal, addPluginHook, getHookHandler } from './chunk-RJLPU6PQ.js';
|
|
3
3
|
import { __name } from './chunk-SHUYVCID.js';
|
|
4
4
|
import { resolvePackage } from '@stryke/fs/resolve';
|
|
5
5
|
import { isFunction } from '@stryke/type-checks/is-function';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { writeFile } from './chunk-TANQDHYY.js';
|
|
2
2
|
import { getFileHeader } from './chunk-GANVMM73.js';
|
|
3
3
|
import { getParsedTypeScriptConfig, getTsconfigFilePath, isIncludeMatchFound } from './chunk-YOENMDZY.js';
|
|
4
|
-
import { PowerlinesAPIContext } from './chunk-
|
|
4
|
+
import { PowerlinesAPIContext } from './chunk-3HVJF7CD.js';
|
|
5
5
|
import { callHook } from './chunk-KFJCWNVG.js';
|
|
6
|
-
import { __VFS_REVERT__, isPluginConfig, isPlugin, isPluginConfigTuple, isPluginConfigObject, checkDedupe } from './chunk-
|
|
6
|
+
import { __VFS_REVERT__, isPluginConfig, isPlugin, isPluginConfigTuple, isPluginConfigObject, checkDedupe } from './chunk-RJLPU6PQ.js';
|
|
7
7
|
import { writeMetaFile } from './chunk-FQLZZYYO.js';
|
|
8
8
|
import { createLog } from './chunk-ENRLU4UR.js';
|
|
9
9
|
import { getString } from './chunk-M263EZ4F.js';
|
|
@@ -45,6 +45,7 @@ var flatCache = require('flat-cache');
|
|
|
45
45
|
var buffer$1 = require('buffer');
|
|
46
46
|
var _fs = require('fs');
|
|
47
47
|
var prettier = require('prettier');
|
|
48
|
+
var slash = require('@stryke/path/slash');
|
|
48
49
|
var isParentPath = require('@stryke/path/is-parent-path');
|
|
49
50
|
var memfs = require('memfs');
|
|
50
51
|
var unionfs = require('unionfs');
|
|
@@ -410,16 +411,8 @@ function isVirtualFileData(obj) {
|
|
|
410
411
|
return !!(isSetObject.isSetObject(obj) && "code" in obj && obj.code);
|
|
411
412
|
}
|
|
412
413
|
chunkUSNT2KNT_cjs.__name(isVirtualFileData, "isVirtualFileData");
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
if (!pathOrUrl) {
|
|
416
|
-
throw new Error("No Path or URL provided to Virtual File System");
|
|
417
|
-
}
|
|
418
|
-
let result = pathOrUrl.toString();
|
|
419
|
-
if (result.startsWith(FILE_PREFIX)) {
|
|
420
|
-
result = result.slice(FILE_PREFIX.length);
|
|
421
|
-
}
|
|
422
|
-
return result;
|
|
414
|
+
function toFilePath(path) {
|
|
415
|
+
return correctPath.correctPath(slash.slash(path?.toString() || ".").replace(/^file:\/\//, ""));
|
|
423
416
|
}
|
|
424
417
|
chunkUSNT2KNT_cjs.__name(toFilePath, "toFilePath");
|
|
425
418
|
var FS_METHODS = [
|
|
@@ -1483,8 +1476,8 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
1483
1476
|
paths.push(importer);
|
|
1484
1477
|
}
|
|
1485
1478
|
paths.push(this.#context.workspaceConfig.workspaceRoot);
|
|
1486
|
-
paths.push(
|
|
1487
|
-
paths.push(
|
|
1479
|
+
paths.push(append.appendPath(this.#context.config.projectRoot, this.#context.workspaceConfig.workspaceRoot));
|
|
1480
|
+
paths.push(append.appendPath(this.#context.config.sourceRoot, this.#context.workspaceConfig.workspaceRoot));
|
|
1488
1481
|
paths.push(...Object.keys(this.#context.tsconfig.options.paths ?? {}).filter((tsconfigPath) => id.startsWith(tsconfigPath.replace(/\*$/, ""))).map((tsconfigPath) => this.#context.tsconfig.options.paths?.[tsconfigPath]).flat().filter(Boolean).map((tsconfigPath) => append.appendPath(tsconfigPath, this.#context.workspaceConfig.workspaceRoot)));
|
|
1489
1482
|
for (const combination of resolve.getResolutionCombinations(id, {
|
|
1490
1483
|
paths
|