powerlines 0.24.2 → 0.24.4
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-EXQM3KGH.js → chunk-3GIUBMCO.js} +1 -1
- package/dist/{chunk-ZEE73BCY.js → chunk-72IKSCJB.js} +1 -1
- package/dist/{chunk-ZT2J55YE.js → chunk-FYRK42WJ.js} +15 -22
- package/dist/{chunk-FGH3MZTQ.cjs → chunk-M2RYLU4O.cjs} +36 -43
- package/dist/{chunk-H74SWU2C.js → chunk-MPNS4WJG.js} +1 -1
- package/dist/{chunk-FPB2O7FD.cjs → chunk-QXH7GHN2.cjs} +2 -2
- package/dist/{chunk-HTGCHSLH.cjs → chunk-VM5QO2QI.cjs} +2 -2
- package/dist/{chunk-7V3LWCLB.js → chunk-WHQHVACG.js} +1 -1
- package/dist/{chunk-2TWFBWKA.cjs → chunk-YSHE2L5C.cjs} +3 -3
- package/dist/{chunk-TIBYAWZZ.cjs → chunk-YVKPBIAR.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-ICO2ZK64.cjs} +42 -41
- package/dist/lib/{chunk-CGRHZJY5.js → chunk-IG4PBAEY.js} +11 -10
- 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-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 chunkM2RYLU4O_cjs = require('./chunk-M2RYLU4O.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 chunkM2RYLU4O_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 chunkQXH7GHN2_cjs = require('./chunk-QXH7GHN2.cjs');
|
|
6
6
|
require('./chunk-5IBA5HC2.cjs');
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
7
|
+
require('./chunk-YSHE2L5C.cjs');
|
|
8
|
+
require('./chunk-M2RYLU4O.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
|
+
chunkQXH7GHN2_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-WHQHVACG.js';
|
|
2
2
|
import './chunk-VBR53KGY.js';
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
import './chunk-3GIUBMCO.js';
|
|
4
|
+
import './chunk-FYRK42WJ.js';
|
|
5
5
|
import './chunk-JQCWV4DT.js';
|
|
6
6
|
import './chunk-JKBJF3UI.js';
|
|
7
7
|
import './chunk-VT7NVLLU.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createLog, PowerlinesAPI } from './chunk-
|
|
1
|
+
import { createLog, PowerlinesAPI } from './chunk-FYRK42WJ.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';
|
|
@@ -32,9 +32,9 @@ import defu6, { defu } from 'defu';
|
|
|
32
32
|
import { getPackageName, hasPackageVersion, getPackageVersion } from '@stryke/string-format/package';
|
|
33
33
|
import { getObjectDiff } from '@donedeal0/superdiff';
|
|
34
34
|
import { readJsonFile, readJsonFileSync } from '@stryke/fs/json';
|
|
35
|
-
import { loadTsConfig } from '@stryke/fs/tsconfig';
|
|
36
35
|
import { StormJSON } from '@stryke/json/storm-json';
|
|
37
|
-
import { findFilePath, relativePath, findFileName, findFileDotExtensionSafe } from '@stryke/path/file-path-fns';
|
|
36
|
+
import { findFilePath, findFileExtension, relativePath, findFileName, findFileDotExtensionSafe } from '@stryke/path/file-path-fns';
|
|
37
|
+
import { isParentPath } from '@stryke/path/is-parent-path';
|
|
38
38
|
import { titleCase } from '@stryke/string-format/title-case';
|
|
39
39
|
import { writeFile as writeFile$1 } from '@stryke/fs/write-file';
|
|
40
40
|
import { resolveConfig, format } from 'prettier';
|
|
@@ -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,7 +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 {
|
|
71
|
+
import { slash } from '@stryke/path/slash';
|
|
72
72
|
import { Volume } from 'memfs';
|
|
73
73
|
import { Union } from 'unionfs';
|
|
74
74
|
import { InMemoryFileSystemHost, Project } from 'ts-morph';
|
|
@@ -415,8 +415,6 @@ async function resolveTsconfigChanges(context) {
|
|
|
415
415
|
const tsconfigFilePath = getTsconfigFilePath(context.workspaceConfig.workspaceRoot, context.config.projectRoot, context.config.tsconfig);
|
|
416
416
|
const tsconfigJson = await readJsonFile(tsconfigFilePath);
|
|
417
417
|
tsconfigJson.compilerOptions ??= {};
|
|
418
|
-
const extendedTsconfig = await loadTsConfig(tsconfigFilePath);
|
|
419
|
-
extendedTsconfig.compilerOptions ??= {};
|
|
420
418
|
if (tsconfigJson.reflection !== true) {
|
|
421
419
|
tsconfigJson.reflection = true;
|
|
422
420
|
}
|
|
@@ -426,11 +424,14 @@ async function resolveTsconfigChanges(context) {
|
|
|
426
424
|
if (tsconfig.options.emitDecoratorMetadata !== true) {
|
|
427
425
|
tsconfigJson.compilerOptions.emitDecoratorMetadata = true;
|
|
428
426
|
}
|
|
429
|
-
if (context.config.output.dts) {
|
|
430
|
-
|
|
431
|
-
|
|
427
|
+
if (context.config.output.dts !== false) {
|
|
428
|
+
context.config.output.dts = context.config.output.dts ? isParentPath(context.config.output.dts, context.workspaceConfig.workspaceRoot) ? context.config.output.dts : appendPath(context.config.output.dts, context.workspaceConfig.workspaceRoot) : appendPath(context.config.projectRoot, context.workspaceConfig.workspaceRoot);
|
|
429
|
+
if (findFileExtension(context.config.output.dts) !== "d.ts" && findFileExtension(context.config.output.dts) !== "d.cts" && findFileExtension(context.config.output.dts) !== "d.mts") {
|
|
430
|
+
context.config.output.dts = joinPaths$1(context.config.output.dts, "powerlines.d.ts");
|
|
431
|
+
}
|
|
432
|
+
const dtsRelativePath = joinPaths$1(relativePath(joinPaths$1(context.workspaceConfig.workspaceRoot, context.config.projectRoot), findFilePath(context.config.output.dts)), findFileName(context.config.output.dts));
|
|
432
433
|
if (!tsconfigJson.include?.some((filePattern) => isIncludeMatchFound(filePattern, [
|
|
433
|
-
|
|
434
|
+
String(context.config.output.dts),
|
|
434
435
|
dtsRelativePath,
|
|
435
436
|
"storm.d.ts"
|
|
436
437
|
]))) {
|
|
@@ -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
|
|
@@ -34,9 +34,9 @@ var defu6 = require('defu');
|
|
|
34
34
|
var _package = require('@stryke/string-format/package');
|
|
35
35
|
var superdiff = require('@donedeal0/superdiff');
|
|
36
36
|
var json = require('@stryke/fs/json');
|
|
37
|
-
var tsconfig = require('@stryke/fs/tsconfig');
|
|
38
37
|
var stormJson = require('@stryke/json/storm-json');
|
|
39
38
|
var filePathFns = require('@stryke/path/file-path-fns');
|
|
39
|
+
var isParentPath = require('@stryke/path/is-parent-path');
|
|
40
40
|
var titleCase = require('@stryke/string-format/title-case');
|
|
41
41
|
var writeFile$1 = require('@stryke/fs/write-file');
|
|
42
42
|
var prettier = require('prettier');
|
|
@@ -70,7 +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
|
|
73
|
+
var slash = require('@stryke/path/slash');
|
|
74
74
|
var memfs = require('memfs');
|
|
75
75
|
var unionfs = require('unionfs');
|
|
76
76
|
var tsMorph = require('ts-morph');
|
|
@@ -441,26 +441,27 @@ chunkUSNT2KNT_cjs.__name(writeFile, "writeFile");
|
|
|
441
441
|
|
|
442
442
|
// src/internal/helpers/resolve-tsconfig.ts
|
|
443
443
|
async function resolveTsconfigChanges(context) {
|
|
444
|
-
const tsconfig
|
|
444
|
+
const tsconfig = getParsedTypeScriptConfig(context.workspaceConfig.workspaceRoot, context.config.projectRoot, context.config.tsconfig, context.config.tsconfigRaw);
|
|
445
445
|
const tsconfigFilePath = getTsconfigFilePath(context.workspaceConfig.workspaceRoot, context.config.projectRoot, context.config.tsconfig);
|
|
446
446
|
const tsconfigJson = await json.readJsonFile(tsconfigFilePath);
|
|
447
447
|
tsconfigJson.compilerOptions ??= {};
|
|
448
|
-
const extendedTsconfig = await tsconfig.loadTsConfig(tsconfigFilePath);
|
|
449
|
-
extendedTsconfig.compilerOptions ??= {};
|
|
450
448
|
if (tsconfigJson.reflection !== true) {
|
|
451
449
|
tsconfigJson.reflection = true;
|
|
452
450
|
}
|
|
453
|
-
if (tsconfig
|
|
451
|
+
if (tsconfig.options.experimentalDecorators !== true) {
|
|
454
452
|
tsconfigJson.compilerOptions.experimentalDecorators = true;
|
|
455
453
|
}
|
|
456
|
-
if (tsconfig
|
|
454
|
+
if (tsconfig.options.emitDecoratorMetadata !== true) {
|
|
457
455
|
tsconfigJson.compilerOptions.emitDecoratorMetadata = true;
|
|
458
456
|
}
|
|
459
|
-
if (context.config.output.dts) {
|
|
460
|
-
|
|
461
|
-
|
|
457
|
+
if (context.config.output.dts !== false) {
|
|
458
|
+
context.config.output.dts = context.config.output.dts ? isParentPath.isParentPath(context.config.output.dts, context.workspaceConfig.workspaceRoot) ? context.config.output.dts : append.appendPath(context.config.output.dts, context.workspaceConfig.workspaceRoot) : append.appendPath(context.config.projectRoot, context.workspaceConfig.workspaceRoot);
|
|
459
|
+
if (filePathFns.findFileExtension(context.config.output.dts) !== "d.ts" && filePathFns.findFileExtension(context.config.output.dts) !== "d.cts" && filePathFns.findFileExtension(context.config.output.dts) !== "d.mts") {
|
|
460
|
+
context.config.output.dts = joinPaths.joinPaths(context.config.output.dts, "powerlines.d.ts");
|
|
461
|
+
}
|
|
462
|
+
const dtsRelativePath = joinPaths.joinPaths(filePathFns.relativePath(joinPaths.joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot), filePathFns.findFilePath(context.config.output.dts)), filePathFns.findFileName(context.config.output.dts));
|
|
462
463
|
if (!tsconfigJson.include?.some((filePattern) => isIncludeMatchFound(filePattern, [
|
|
463
|
-
|
|
464
|
+
String(context.config.output.dts),
|
|
464
465
|
dtsRelativePath,
|
|
465
466
|
"storm.d.ts"
|
|
466
467
|
]))) {
|
|
@@ -468,7 +469,7 @@ async function resolveTsconfigChanges(context) {
|
|
|
468
469
|
tsconfigJson.include.push(dtsRelativePath.startsWith("./") ? dtsRelativePath.slice(2) : dtsRelativePath);
|
|
469
470
|
}
|
|
470
471
|
}
|
|
471
|
-
if (!tsconfig
|
|
472
|
+
if (!tsconfig.options.lib?.some((lib) => [
|
|
472
473
|
"lib.esnext.d.ts",
|
|
473
474
|
"lib.es2021.d.ts",
|
|
474
475
|
"lib.es2022.d.ts",
|
|
@@ -477,68 +478,68 @@ async function resolveTsconfigChanges(context) {
|
|
|
477
478
|
tsconfigJson.compilerOptions.lib ??= [];
|
|
478
479
|
tsconfigJson.compilerOptions.lib.push("esnext");
|
|
479
480
|
}
|
|
480
|
-
if (tsconfig
|
|
481
|
+
if (tsconfig.options.module !== ts2__default.default.ModuleKind.ESNext) {
|
|
481
482
|
tsconfigJson.compilerOptions.module = "ESNext";
|
|
482
483
|
}
|
|
483
|
-
if (!tsconfig
|
|
484
|
+
if (!tsconfig.options.target || ![
|
|
484
485
|
ts2__default.default.ScriptTarget.ESNext,
|
|
485
486
|
ts2__default.default.ScriptTarget.ES2024,
|
|
486
487
|
ts2__default.default.ScriptTarget.ES2023,
|
|
487
488
|
ts2__default.default.ScriptTarget.ES2022,
|
|
488
489
|
ts2__default.default.ScriptTarget.ES2021
|
|
489
|
-
].includes(tsconfig
|
|
490
|
+
].includes(tsconfig.options.target)) {
|
|
490
491
|
tsconfigJson.compilerOptions.target = "ESNext";
|
|
491
492
|
}
|
|
492
|
-
if (tsconfig
|
|
493
|
+
if (tsconfig.options.moduleResolution !== ts2__default.default.ModuleResolutionKind.Bundler) {
|
|
493
494
|
tsconfigJson.compilerOptions.moduleResolution = "Bundler";
|
|
494
495
|
}
|
|
495
|
-
if (tsconfig
|
|
496
|
+
if (tsconfig.options.moduleDetection !== ts2__default.default.ModuleDetectionKind.Force) {
|
|
496
497
|
tsconfigJson.compilerOptions.moduleDetection = "force";
|
|
497
498
|
}
|
|
498
|
-
if (tsconfig
|
|
499
|
+
if (tsconfig.options.allowSyntheticDefaultImports !== true) {
|
|
499
500
|
tsconfigJson.compilerOptions.allowSyntheticDefaultImports = true;
|
|
500
501
|
}
|
|
501
|
-
if (tsconfig
|
|
502
|
+
if (tsconfig.options.noImplicitOverride !== true) {
|
|
502
503
|
tsconfigJson.compilerOptions.noImplicitOverride = true;
|
|
503
504
|
}
|
|
504
|
-
if (tsconfig
|
|
505
|
+
if (tsconfig.options.noUncheckedIndexedAccess !== true) {
|
|
505
506
|
tsconfigJson.compilerOptions.noUncheckedIndexedAccess = true;
|
|
506
507
|
}
|
|
507
|
-
if (tsconfig
|
|
508
|
+
if (tsconfig.options.skipLibCheck !== true) {
|
|
508
509
|
tsconfigJson.compilerOptions.skipLibCheck = true;
|
|
509
510
|
}
|
|
510
|
-
if (tsconfig
|
|
511
|
+
if (tsconfig.options.resolveJsonModule !== true) {
|
|
511
512
|
tsconfigJson.compilerOptions.resolveJsonModule = true;
|
|
512
513
|
}
|
|
513
|
-
if (tsconfig
|
|
514
|
+
if (tsconfig.options.isolatedModules !== true) {
|
|
514
515
|
tsconfigJson.compilerOptions.isolatedModules = true;
|
|
515
516
|
}
|
|
516
|
-
if (tsconfig
|
|
517
|
+
if (tsconfig.options.verbatimModuleSyntax !== false) {
|
|
517
518
|
tsconfigJson.compilerOptions.verbatimModuleSyntax = false;
|
|
518
519
|
}
|
|
519
|
-
if (tsconfig
|
|
520
|
+
if (tsconfig.options.allowJs !== true) {
|
|
520
521
|
tsconfigJson.compilerOptions.allowJs = true;
|
|
521
522
|
}
|
|
522
|
-
if (tsconfig
|
|
523
|
+
if (tsconfig.options.esModuleInterop !== true) {
|
|
523
524
|
tsconfigJson.compilerOptions.esModuleInterop = true;
|
|
524
525
|
}
|
|
525
|
-
if (tsconfig
|
|
526
|
+
if (tsconfig.options.declaration !== true) {
|
|
526
527
|
tsconfigJson.compilerOptions.declaration = true;
|
|
527
528
|
}
|
|
528
529
|
if (context.environment.consumer === "client") {
|
|
529
|
-
if (tsconfig
|
|
530
|
+
if (tsconfig.options.jsx !== ts2__default.default.JsxEmit.ReactJSX) {
|
|
530
531
|
tsconfigJson.compilerOptions.jsx = "react-jsx";
|
|
531
532
|
}
|
|
532
|
-
if (!tsconfig
|
|
533
|
+
if (!tsconfig.options.lib?.some((lib) => lib.toLowerCase() !== "dom")) {
|
|
533
534
|
tsconfigJson.compilerOptions.lib ??= [];
|
|
534
535
|
tsconfigJson.compilerOptions.lib.push("dom");
|
|
535
536
|
}
|
|
536
|
-
if (!tsconfig
|
|
537
|
+
if (!tsconfig.options.lib?.some((lib) => lib.toLowerCase() !== "dom.iterable")) {
|
|
537
538
|
tsconfigJson.compilerOptions.lib ??= [];
|
|
538
539
|
tsconfigJson.compilerOptions.lib.push("dom.iterable");
|
|
539
540
|
}
|
|
540
541
|
} else if (context.config.build.platform === "node") {
|
|
541
|
-
if (!tsconfig
|
|
542
|
+
if (!tsconfig.options.types?.some((type) => type.toLowerCase() === "node" || type.toLowerCase() === "@types/node")) {
|
|
542
543
|
tsconfigJson.compilerOptions.types ??= [];
|
|
543
544
|
tsconfigJson.compilerOptions.types.push("node");
|
|
544
545
|
}
|
|
@@ -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,5 +1,5 @@
|
|
|
1
1
|
import { extractESBuildConfig } from './chunk-VBR53KGY.js';
|
|
2
|
-
import { createUnpluginFactory } from './chunk-
|
|
2
|
+
import { createUnpluginFactory } from './chunk-3GIUBMCO.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,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunk5IBA5HC2_cjs = require('./chunk-5IBA5HC2.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkYSHE2L5C_cjs = require('./chunk-YSHE2L5C.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(chunkYSHE2L5C_cjs.createUnpluginFactory("vite", (api, plugin) => {
|
|
87
87
|
return {
|
|
88
88
|
...plugin,
|
|
89
89
|
vite: {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkYSHE2L5C_cjs = require('./chunk-YSHE2L5C.cjs');
|
|
4
4
|
var unplugin = require('unplugin');
|
|
5
5
|
|
|
6
|
-
var webpack = unplugin.createWebpackPlugin(
|
|
6
|
+
var webpack = unplugin.createWebpackPlugin(chunkYSHE2L5C_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-3GIUBMCO.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';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkM2RYLU4O_cjs = require('./chunk-M2RYLU4O.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 = chunkM2RYLU4O_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 chunkM2RYLU4O_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,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunk5IBA5HC2_cjs = require('./chunk-5IBA5HC2.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkYSHE2L5C_cjs = require('./chunk-YSHE2L5C.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(chunkYSHE2L5C_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 chunkYVKPBIAR_cjs = require('./chunk-YVKPBIAR.cjs');
|
|
6
6
|
require('./chunk-5IBA5HC2.cjs');
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
7
|
+
require('./chunk-YSHE2L5C.cjs');
|
|
8
|
+
require('./chunk-M2RYLU4O.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 chunkYVKPBIAR_cjs.esbuild_default; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "esbuild", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkYVKPBIAR_cjs.esbuild; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "module.exports", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkYVKPBIAR_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-MPNS4WJG.js';
|
|
2
2
|
import './chunk-VBR53KGY.js';
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
import './chunk-3GIUBMCO.js';
|
|
4
|
+
import './chunk-FYRK42WJ.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 chunkYSHE2L5C_cjs = require('./chunk-YSHE2L5C.cjs');
|
|
6
|
+
require('./chunk-M2RYLU4O.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(chunkYSHE2L5C_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-3GIUBMCO.js';
|
|
2
|
+
import './chunk-FYRK42WJ.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 chunkM2RYLU4O_cjs = require('./chunk-M2RYLU4O.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 = chunkM2RYLU4O_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 chunkM2RYLU4O_cjs.FileData; }
|
|
37
37
|
});
|
|
38
38
|
Object.defineProperty(exports, "FileId", {
|
|
39
39
|
enumerable: true,
|
|
40
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunkM2RYLU4O_cjs.FileId; }
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "FileMetadata", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunkM2RYLU4O_cjs.FileMetadata; }
|
|
45
45
|
});
|
|
46
46
|
Object.defineProperty(exports, "FileMetadata_KeyValuePair", {
|
|
47
47
|
enumerable: true,
|
|
48
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunkM2RYLU4O_cjs.FileMetadata_KeyValuePair; }
|
|
49
49
|
});
|
|
50
50
|
Object.defineProperty(exports, "FileSystem", {
|
|
51
51
|
enumerable: true,
|
|
52
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunkM2RYLU4O_cjs.FileSystem; }
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "FileType", {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunkM2RYLU4O_cjs.FileType; }
|
|
57
57
|
});
|
|
58
58
|
Object.defineProperty(exports, "PowerlinesAPI", {
|
|
59
59
|
enumerable: true,
|
|
60
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunkM2RYLU4O_cjs.PowerlinesAPI; }
|
|
61
61
|
});
|
|
62
62
|
Object.defineProperty(exports, "PreserveSignatureType", {
|
|
63
63
|
enumerable: true,
|
|
64
|
-
get: function () { return
|
|
64
|
+
get: function () { return chunkM2RYLU4O_cjs.PreserveSignatureType; }
|
|
65
65
|
});
|
|
66
66
|
Object.defineProperty(exports, "_capnpFileId", {
|
|
67
67
|
enumerable: true,
|
|
68
|
-
get: function () { return
|
|
68
|
+
get: function () { return chunkM2RYLU4O_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-FYRK42WJ.js';
|
|
14
|
+
export { FileData, FileId, FileMetadata, FileMetadata_KeyValuePair, FileSystem, FileType, PowerlinesAPI, PreserveSignatureType, _capnpFileId } from './chunk-FYRK42WJ.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';
|