powerlines 0.24.4 → 0.24.6
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-MPNS4WJG.js → chunk-4YOH66OR.js} +1 -1
- package/dist/{chunk-FYRK42WJ.js → chunk-5VVIGLK7.js} +27 -56
- package/dist/{chunk-3GIUBMCO.js → chunk-6F2RGMWO.js} +1 -1
- package/dist/{chunk-VM5QO2QI.cjs → chunk-D7IZZTKR.cjs} +2 -2
- package/dist/{chunk-72IKSCJB.js → chunk-E2CYWY4C.js} +1 -1
- package/dist/{chunk-YSHE2L5C.cjs → chunk-J42CWDHS.cjs} +3 -3
- package/dist/{chunk-YVKPBIAR.cjs → chunk-MBWFPGQL.cjs} +2 -2
- package/dist/{chunk-M2RYLU4O.cjs → chunk-MWURGZO3.cjs} +27 -56
- package/dist/{chunk-WHQHVACG.js → chunk-RUNRTWUD.js} +1 -1
- package/dist/{chunk-QXH7GHN2.cjs → chunk-TSGTSGEL.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-LDMWUKGL.js → chunk-B6MVU5AR.js} +1 -1
- package/dist/lib/{chunk-VSN5AZP5.cjs → chunk-FSV2WXHS.cjs} +4 -4
- package/dist/lib/{chunk-BQU53ZNB.cjs → chunk-GA3RXX4R.cjs} +24 -7
- package/dist/lib/{chunk-3HVJF7CD.js → chunk-HQ7626MD.js} +2 -2
- package/dist/lib/{chunk-IG4PBAEY.js → chunk-IRIEW3X6.js} +6 -51
- package/dist/lib/{chunk-RJLPU6PQ.js → chunk-JFHYBGFE.js} +2 -1
- package/dist/lib/{chunk-PPUZYUCI.cjs → chunk-QOS4T645.cjs} +2 -1
- package/dist/lib/{chunk-ICO2ZK64.cjs → chunk-SJCNXDNU.cjs} +22 -67
- package/dist/lib/{chunk-YOENMDZY.js → chunk-ZGMEHSNN.js} +24 -8
- package/dist/lib/{chunk-INSBEK3W.cjs → chunk-ZTI2BIQ4.cjs} +10 -10
- package/dist/lib/contexts/api-context.cjs +5 -4
- package/dist/lib/contexts/api-context.js +4 -3
- package/dist/lib/contexts/context.cjs +3 -2
- package/dist/lib/contexts/context.js +2 -1
- package/dist/lib/contexts/environment-context.cjs +4 -3
- package/dist/lib/contexts/environment-context.js +3 -2
- package/dist/lib/contexts/index.cjs +7 -6
- package/dist/lib/contexts/index.js +4 -3
- package/dist/lib/index.cjs +38 -34
- package/dist/lib/index.d.cts +1 -1
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.js +5 -5
- package/dist/lib/typescript/compiler-host.cjs +2 -2
- package/dist/lib/typescript/compiler-host.js +1 -1
- package/dist/lib/typescript/index.cjs +29 -25
- package/dist/lib/typescript/index.d.cts +1 -1
- package/dist/lib/typescript/index.d.ts +1 -1
- package/dist/lib/typescript/index.js +1 -1
- package/dist/lib/typescript/tsconfig.cjs +11 -7
- package/dist/lib/typescript/tsconfig.d.cts +11 -1
- package/dist/lib/typescript/tsconfig.d.ts +11 -1
- package/dist/lib/typescript/tsconfig.js +1 -1
- package/dist/lib/unplugin/factory.cjs +6 -6
- package/dist/lib/unplugin/factory.js +5 -5
- package/dist/lib/unplugin/index.cjs +6 -6
- package/dist/lib/unplugin/index.js +5 -5
- 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 +2 -2
package/dist/api.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkMWURGZO3_cjs = require('./chunk-MWURGZO3.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 chunkMWURGZO3_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 chunkTSGTSGEL_cjs = require('./chunk-TSGTSGEL.cjs');
|
|
6
6
|
require('./chunk-5IBA5HC2.cjs');
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
7
|
+
require('./chunk-J42CWDHS.cjs');
|
|
8
|
+
require('./chunk-MWURGZO3.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
|
+
chunkTSGTSGEL_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-RUNRTWUD.js';
|
|
2
2
|
import './chunk-VBR53KGY.js';
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
import './chunk-6F2RGMWO.js';
|
|
4
|
+
import './chunk-5VVIGLK7.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-6F2RGMWO.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';
|
|
@@ -308,23 +308,39 @@ ${Object.entries(context.devDependencies).map(([name, version]) => `- ${name}@${
|
|
|
308
308
|
]);
|
|
309
309
|
}
|
|
310
310
|
__name(installDependencies, "installDependencies");
|
|
311
|
-
function getTsconfigFilePath(workspaceRoot, projectRoot, tsconfig
|
|
311
|
+
function getTsconfigFilePath(workspaceRoot, projectRoot, tsconfig) {
|
|
312
|
+
let tsconfigFilePath;
|
|
313
|
+
if (tsconfig) {
|
|
314
|
+
tsconfigFilePath = tryTsconfigFilePath(workspaceRoot, projectRoot, tsconfig);
|
|
315
|
+
} else {
|
|
316
|
+
tsconfigFilePath = tryTsconfigFilePath(workspaceRoot, projectRoot, "tsconfig.app.json");
|
|
317
|
+
if (!tsconfigFilePath) {
|
|
318
|
+
tsconfigFilePath = tryTsconfigFilePath(workspaceRoot, projectRoot, "tsconfig.lib.json");
|
|
319
|
+
if (!tsconfigFilePath) {
|
|
320
|
+
tsconfigFilePath = tryTsconfigFilePath(workspaceRoot, projectRoot, "tsconfig.json");
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
if (!tsconfigFilePath) {
|
|
325
|
+
throw new Error(`Cannot find the \`tsconfig.json\` configuration file for the project at ${projectRoot}.`);
|
|
326
|
+
}
|
|
327
|
+
return tsconfigFilePath;
|
|
328
|
+
}
|
|
329
|
+
__name(getTsconfigFilePath, "getTsconfigFilePath");
|
|
330
|
+
function tryTsconfigFilePath(workspaceRoot, projectRoot, tsconfig) {
|
|
312
331
|
let tsconfigFilePath = tsconfig;
|
|
313
332
|
if (!existsSync(tsconfigFilePath)) {
|
|
314
333
|
tsconfigFilePath = appendPath(tsconfig, projectRoot);
|
|
315
334
|
if (!existsSync(tsconfigFilePath)) {
|
|
316
|
-
tsconfigFilePath = appendPath(tsconfig, workspaceRoot);
|
|
335
|
+
tsconfigFilePath = appendPath(tsconfig, appendPath(projectRoot, workspaceRoot));
|
|
317
336
|
if (!existsSync(tsconfigFilePath)) {
|
|
318
|
-
|
|
319
|
-
if (!existsSync(tsconfigFilePath)) {
|
|
320
|
-
throw new Error(`Cannot find the \`tsconfig.json\` configuration file at ${tsconfig}, ${appendPath(tsconfig, projectRoot)}, ${appendPath(tsconfig, workspaceRoot)}, or ${tsconfigFilePath}`);
|
|
321
|
-
}
|
|
337
|
+
return void 0;
|
|
322
338
|
}
|
|
323
339
|
}
|
|
324
340
|
}
|
|
325
341
|
return tsconfigFilePath;
|
|
326
342
|
}
|
|
327
|
-
__name(
|
|
343
|
+
__name(tryTsconfigFilePath, "tryTsconfigFilePath");
|
|
328
344
|
function findMatch(tsconfigType, types, extensions = [
|
|
329
345
|
".ts",
|
|
330
346
|
".tsx",
|
|
@@ -415,15 +431,6 @@ async function resolveTsconfigChanges(context) {
|
|
|
415
431
|
const tsconfigFilePath = getTsconfigFilePath(context.workspaceConfig.workspaceRoot, context.config.projectRoot, context.config.tsconfig);
|
|
416
432
|
const tsconfigJson = await readJsonFile(tsconfigFilePath);
|
|
417
433
|
tsconfigJson.compilerOptions ??= {};
|
|
418
|
-
if (tsconfigJson.reflection !== true) {
|
|
419
|
-
tsconfigJson.reflection = true;
|
|
420
|
-
}
|
|
421
|
-
if (tsconfig.options.experimentalDecorators !== true) {
|
|
422
|
-
tsconfigJson.compilerOptions.experimentalDecorators = true;
|
|
423
|
-
}
|
|
424
|
-
if (tsconfig.options.emitDecoratorMetadata !== true) {
|
|
425
|
-
tsconfigJson.compilerOptions.emitDecoratorMetadata = true;
|
|
426
|
-
}
|
|
427
434
|
if (context.config.output.dts !== false) {
|
|
428
435
|
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
436
|
if (findFileExtension(context.config.output.dts) !== "d.ts" && findFileExtension(context.config.output.dts) !== "d.cts" && findFileExtension(context.config.output.dts) !== "d.mts") {
|
|
@@ -466,49 +473,13 @@ async function resolveTsconfigChanges(context) {
|
|
|
466
473
|
if (tsconfig.options.moduleDetection !== ts2.ModuleDetectionKind.Force) {
|
|
467
474
|
tsconfigJson.compilerOptions.moduleDetection = "force";
|
|
468
475
|
}
|
|
469
|
-
if (tsconfig.options.allowSyntheticDefaultImports !== true) {
|
|
470
|
-
tsconfigJson.compilerOptions.allowSyntheticDefaultImports = true;
|
|
471
|
-
}
|
|
472
|
-
if (tsconfig.options.noImplicitOverride !== true) {
|
|
473
|
-
tsconfigJson.compilerOptions.noImplicitOverride = true;
|
|
474
|
-
}
|
|
475
|
-
if (tsconfig.options.noUncheckedIndexedAccess !== true) {
|
|
476
|
-
tsconfigJson.compilerOptions.noUncheckedIndexedAccess = true;
|
|
477
|
-
}
|
|
478
|
-
if (tsconfig.options.skipLibCheck !== true) {
|
|
479
|
-
tsconfigJson.compilerOptions.skipLibCheck = true;
|
|
480
|
-
}
|
|
481
|
-
if (tsconfig.options.resolveJsonModule !== true) {
|
|
482
|
-
tsconfigJson.compilerOptions.resolveJsonModule = true;
|
|
483
|
-
}
|
|
484
|
-
if (tsconfig.options.isolatedModules !== true) {
|
|
485
|
-
tsconfigJson.compilerOptions.isolatedModules = true;
|
|
486
|
-
}
|
|
487
|
-
if (tsconfig.options.verbatimModuleSyntax !== false) {
|
|
488
|
-
tsconfigJson.compilerOptions.verbatimModuleSyntax = false;
|
|
489
|
-
}
|
|
490
|
-
if (tsconfig.options.allowJs !== true) {
|
|
491
|
-
tsconfigJson.compilerOptions.allowJs = true;
|
|
492
|
-
}
|
|
493
476
|
if (tsconfig.options.esModuleInterop !== true) {
|
|
494
477
|
tsconfigJson.compilerOptions.esModuleInterop = true;
|
|
495
478
|
}
|
|
496
|
-
if (tsconfig.options.
|
|
497
|
-
tsconfigJson.compilerOptions.
|
|
479
|
+
if (tsconfig.options.isolatedModules !== true) {
|
|
480
|
+
tsconfigJson.compilerOptions.isolatedModules = true;
|
|
498
481
|
}
|
|
499
|
-
if (context.
|
|
500
|
-
if (tsconfig.options.jsx !== ts2.JsxEmit.ReactJSX) {
|
|
501
|
-
tsconfigJson.compilerOptions.jsx = "react-jsx";
|
|
502
|
-
}
|
|
503
|
-
if (!tsconfig.options.lib?.some((lib) => lib.toLowerCase() !== "dom")) {
|
|
504
|
-
tsconfigJson.compilerOptions.lib ??= [];
|
|
505
|
-
tsconfigJson.compilerOptions.lib.push("dom");
|
|
506
|
-
}
|
|
507
|
-
if (!tsconfig.options.lib?.some((lib) => lib.toLowerCase() !== "dom.iterable")) {
|
|
508
|
-
tsconfigJson.compilerOptions.lib ??= [];
|
|
509
|
-
tsconfigJson.compilerOptions.lib.push("dom.iterable");
|
|
510
|
-
}
|
|
511
|
-
} else if (context.config.build.platform === "node") {
|
|
482
|
+
if (context.config.build.platform === "node") {
|
|
512
483
|
if (!tsconfig.options.types?.some((type) => type.toLowerCase() === "node" || type.toLowerCase() === "@types/node")) {
|
|
513
484
|
tsconfigJson.compilerOptions.types ??= [];
|
|
514
485
|
tsconfigJson.compilerOptions.types.push("node");
|
|
@@ -3017,6 +2988,7 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
3017
2988
|
userConfig
|
|
3018
2989
|
});
|
|
3019
2990
|
}
|
|
2991
|
+
this.config.tsconfig ??= getTsconfigFilePath(this.workspaceConfig.workspaceRoot, cacheKey.projectRoot, config.tsconfig);
|
|
3020
2992
|
if (isSetObject(config)) {
|
|
3021
2993
|
this.resolvedConfig = defu6({
|
|
3022
2994
|
inlineConfig: this.config.inlineConfig,
|
|
@@ -3032,7 +3004,6 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
3032
3004
|
name: this.projectJson?.name || this.packageJson?.name,
|
|
3033
3005
|
version: this.packageJson?.version,
|
|
3034
3006
|
description: this.packageJson?.description,
|
|
3035
|
-
tsconfig: appendPath("tsconfig.json", cacheKey.projectRoot),
|
|
3036
3007
|
sourceRoot: this.projectJson?.sourceRoot || appendPath("src", cacheKey.projectRoot),
|
|
3037
3008
|
output: {
|
|
3038
3009
|
outputPath: cacheKey.projectRoot ? joinPaths(this.workspaceConfig?.directories?.build || "dist", cacheKey.projectRoot) : this.workspaceConfig?.directories?.build || "dist",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createLog, PowerlinesAPI } from './chunk-
|
|
1
|
+
import { createLog, PowerlinesAPI } from './chunk-5VVIGLK7.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 chunkJ42CWDHS_cjs = require('./chunk-J42CWDHS.cjs');
|
|
4
4
|
var unplugin = require('unplugin');
|
|
5
5
|
|
|
6
|
-
var webpack = unplugin.createWebpackPlugin(
|
|
6
|
+
var webpack = unplugin.createWebpackPlugin(chunkJ42CWDHS_cjs.createUnpluginFactory("webpack"));
|
|
7
7
|
var webpack_default = webpack;
|
|
8
8
|
|
|
9
9
|
exports.webpack = webpack;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkMWURGZO3_cjs = require('./chunk-MWURGZO3.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 = chunkMWURGZO3_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 chunkMWURGZO3_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 chunkJ42CWDHS_cjs = require('./chunk-J42CWDHS.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(chunkJ42CWDHS_cjs.createUnpluginFactory("esbuild", (api, plugin) => {
|
|
10
10
|
return {
|
|
11
11
|
...plugin,
|
|
12
12
|
esbuild: {
|
|
@@ -338,23 +338,39 @@ ${Object.entries(context.devDependencies).map(([name, version]) => `- ${name}@${
|
|
|
338
338
|
]);
|
|
339
339
|
}
|
|
340
340
|
chunkUSNT2KNT_cjs.__name(installDependencies, "installDependencies");
|
|
341
|
-
function getTsconfigFilePath(workspaceRoot, projectRoot, tsconfig
|
|
341
|
+
function getTsconfigFilePath(workspaceRoot, projectRoot, tsconfig) {
|
|
342
|
+
let tsconfigFilePath;
|
|
343
|
+
if (tsconfig) {
|
|
344
|
+
tsconfigFilePath = tryTsconfigFilePath(workspaceRoot, projectRoot, tsconfig);
|
|
345
|
+
} else {
|
|
346
|
+
tsconfigFilePath = tryTsconfigFilePath(workspaceRoot, projectRoot, "tsconfig.app.json");
|
|
347
|
+
if (!tsconfigFilePath) {
|
|
348
|
+
tsconfigFilePath = tryTsconfigFilePath(workspaceRoot, projectRoot, "tsconfig.lib.json");
|
|
349
|
+
if (!tsconfigFilePath) {
|
|
350
|
+
tsconfigFilePath = tryTsconfigFilePath(workspaceRoot, projectRoot, "tsconfig.json");
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
if (!tsconfigFilePath) {
|
|
355
|
+
throw new Error(`Cannot find the \`tsconfig.json\` configuration file for the project at ${projectRoot}.`);
|
|
356
|
+
}
|
|
357
|
+
return tsconfigFilePath;
|
|
358
|
+
}
|
|
359
|
+
chunkUSNT2KNT_cjs.__name(getTsconfigFilePath, "getTsconfigFilePath");
|
|
360
|
+
function tryTsconfigFilePath(workspaceRoot, projectRoot, tsconfig) {
|
|
342
361
|
let tsconfigFilePath = tsconfig;
|
|
343
362
|
if (!exists.existsSync(tsconfigFilePath)) {
|
|
344
363
|
tsconfigFilePath = append.appendPath(tsconfig, projectRoot);
|
|
345
364
|
if (!exists.existsSync(tsconfigFilePath)) {
|
|
346
|
-
tsconfigFilePath = append.appendPath(tsconfig, workspaceRoot);
|
|
365
|
+
tsconfigFilePath = append.appendPath(tsconfig, append.appendPath(projectRoot, workspaceRoot));
|
|
347
366
|
if (!exists.existsSync(tsconfigFilePath)) {
|
|
348
|
-
|
|
349
|
-
if (!exists.existsSync(tsconfigFilePath)) {
|
|
350
|
-
throw new Error(`Cannot find the \`tsconfig.json\` configuration file at ${tsconfig}, ${append.appendPath(tsconfig, projectRoot)}, ${append.appendPath(tsconfig, workspaceRoot)}, or ${tsconfigFilePath}`);
|
|
351
|
-
}
|
|
367
|
+
return void 0;
|
|
352
368
|
}
|
|
353
369
|
}
|
|
354
370
|
}
|
|
355
371
|
return tsconfigFilePath;
|
|
356
372
|
}
|
|
357
|
-
chunkUSNT2KNT_cjs.__name(
|
|
373
|
+
chunkUSNT2KNT_cjs.__name(tryTsconfigFilePath, "tryTsconfigFilePath");
|
|
358
374
|
function findMatch(tsconfigType, types, extensions = [
|
|
359
375
|
".ts",
|
|
360
376
|
".tsx",
|
|
@@ -445,15 +461,6 @@ async function resolveTsconfigChanges(context) {
|
|
|
445
461
|
const tsconfigFilePath = getTsconfigFilePath(context.workspaceConfig.workspaceRoot, context.config.projectRoot, context.config.tsconfig);
|
|
446
462
|
const tsconfigJson = await json.readJsonFile(tsconfigFilePath);
|
|
447
463
|
tsconfigJson.compilerOptions ??= {};
|
|
448
|
-
if (tsconfigJson.reflection !== true) {
|
|
449
|
-
tsconfigJson.reflection = true;
|
|
450
|
-
}
|
|
451
|
-
if (tsconfig.options.experimentalDecorators !== true) {
|
|
452
|
-
tsconfigJson.compilerOptions.experimentalDecorators = true;
|
|
453
|
-
}
|
|
454
|
-
if (tsconfig.options.emitDecoratorMetadata !== true) {
|
|
455
|
-
tsconfigJson.compilerOptions.emitDecoratorMetadata = true;
|
|
456
|
-
}
|
|
457
464
|
if (context.config.output.dts !== false) {
|
|
458
465
|
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
466
|
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") {
|
|
@@ -496,49 +503,13 @@ async function resolveTsconfigChanges(context) {
|
|
|
496
503
|
if (tsconfig.options.moduleDetection !== ts2__default.default.ModuleDetectionKind.Force) {
|
|
497
504
|
tsconfigJson.compilerOptions.moduleDetection = "force";
|
|
498
505
|
}
|
|
499
|
-
if (tsconfig.options.allowSyntheticDefaultImports !== true) {
|
|
500
|
-
tsconfigJson.compilerOptions.allowSyntheticDefaultImports = true;
|
|
501
|
-
}
|
|
502
|
-
if (tsconfig.options.noImplicitOverride !== true) {
|
|
503
|
-
tsconfigJson.compilerOptions.noImplicitOverride = true;
|
|
504
|
-
}
|
|
505
|
-
if (tsconfig.options.noUncheckedIndexedAccess !== true) {
|
|
506
|
-
tsconfigJson.compilerOptions.noUncheckedIndexedAccess = true;
|
|
507
|
-
}
|
|
508
|
-
if (tsconfig.options.skipLibCheck !== true) {
|
|
509
|
-
tsconfigJson.compilerOptions.skipLibCheck = true;
|
|
510
|
-
}
|
|
511
|
-
if (tsconfig.options.resolveJsonModule !== true) {
|
|
512
|
-
tsconfigJson.compilerOptions.resolveJsonModule = true;
|
|
513
|
-
}
|
|
514
|
-
if (tsconfig.options.isolatedModules !== true) {
|
|
515
|
-
tsconfigJson.compilerOptions.isolatedModules = true;
|
|
516
|
-
}
|
|
517
|
-
if (tsconfig.options.verbatimModuleSyntax !== false) {
|
|
518
|
-
tsconfigJson.compilerOptions.verbatimModuleSyntax = false;
|
|
519
|
-
}
|
|
520
|
-
if (tsconfig.options.allowJs !== true) {
|
|
521
|
-
tsconfigJson.compilerOptions.allowJs = true;
|
|
522
|
-
}
|
|
523
506
|
if (tsconfig.options.esModuleInterop !== true) {
|
|
524
507
|
tsconfigJson.compilerOptions.esModuleInterop = true;
|
|
525
508
|
}
|
|
526
|
-
if (tsconfig.options.
|
|
527
|
-
tsconfigJson.compilerOptions.
|
|
509
|
+
if (tsconfig.options.isolatedModules !== true) {
|
|
510
|
+
tsconfigJson.compilerOptions.isolatedModules = true;
|
|
528
511
|
}
|
|
529
|
-
if (context.
|
|
530
|
-
if (tsconfig.options.jsx !== ts2__default.default.JsxEmit.ReactJSX) {
|
|
531
|
-
tsconfigJson.compilerOptions.jsx = "react-jsx";
|
|
532
|
-
}
|
|
533
|
-
if (!tsconfig.options.lib?.some((lib) => lib.toLowerCase() !== "dom")) {
|
|
534
|
-
tsconfigJson.compilerOptions.lib ??= [];
|
|
535
|
-
tsconfigJson.compilerOptions.lib.push("dom");
|
|
536
|
-
}
|
|
537
|
-
if (!tsconfig.options.lib?.some((lib) => lib.toLowerCase() !== "dom.iterable")) {
|
|
538
|
-
tsconfigJson.compilerOptions.lib ??= [];
|
|
539
|
-
tsconfigJson.compilerOptions.lib.push("dom.iterable");
|
|
540
|
-
}
|
|
541
|
-
} else if (context.config.build.platform === "node") {
|
|
512
|
+
if (context.config.build.platform === "node") {
|
|
542
513
|
if (!tsconfig.options.types?.some((type) => type.toLowerCase() === "node" || type.toLowerCase() === "@types/node")) {
|
|
543
514
|
tsconfigJson.compilerOptions.types ??= [];
|
|
544
515
|
tsconfigJson.compilerOptions.types.push("node");
|
|
@@ -3047,6 +3018,7 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
3047
3018
|
userConfig
|
|
3048
3019
|
});
|
|
3049
3020
|
}
|
|
3021
|
+
this.config.tsconfig ??= getTsconfigFilePath(this.workspaceConfig.workspaceRoot, cacheKey.projectRoot, config.tsconfig);
|
|
3050
3022
|
if (isSetObject.isSetObject(config)) {
|
|
3051
3023
|
this.resolvedConfig = defu6__default.default({
|
|
3052
3024
|
inlineConfig: this.config.inlineConfig,
|
|
@@ -3062,7 +3034,6 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
3062
3034
|
name: this.projectJson?.name || this.packageJson?.name,
|
|
3063
3035
|
version: this.packageJson?.version,
|
|
3064
3036
|
description: this.packageJson?.description,
|
|
3065
|
-
tsconfig: append.appendPath("tsconfig.json", cacheKey.projectRoot),
|
|
3066
3037
|
sourceRoot: this.projectJson?.sourceRoot || append.appendPath("src", cacheKey.projectRoot),
|
|
3067
3038
|
output: {
|
|
3068
3039
|
outputPath: cacheKey.projectRoot ? join.joinPaths(this.workspaceConfig?.directories?.build || "dist", cacheKey.projectRoot) : this.workspaceConfig?.directories?.build || "dist",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { extractESBuildConfig } from './chunk-VBR53KGY.js';
|
|
2
|
-
import { createUnpluginFactory } from './chunk-
|
|
2
|
+
import { createUnpluginFactory } from './chunk-6F2RGMWO.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,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunk5IBA5HC2_cjs = require('./chunk-5IBA5HC2.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkJ42CWDHS_cjs = require('./chunk-J42CWDHS.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(chunkJ42CWDHS_cjs.createUnpluginFactory("vite", (api, plugin) => {
|
|
87
87
|
return {
|
|
88
88
|
...plugin,
|
|
89
89
|
vite: {
|
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 chunkMBWFPGQL_cjs = require('./chunk-MBWFPGQL.cjs');
|
|
6
6
|
require('./chunk-5IBA5HC2.cjs');
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
7
|
+
require('./chunk-J42CWDHS.cjs');
|
|
8
|
+
require('./chunk-MWURGZO3.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 chunkMBWFPGQL_cjs.esbuild_default; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "esbuild", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkMBWFPGQL_cjs.esbuild; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "module.exports", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkMBWFPGQL_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-4YOH66OR.js';
|
|
2
2
|
import './chunk-VBR53KGY.js';
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
import './chunk-6F2RGMWO.js';
|
|
4
|
+
import './chunk-5VVIGLK7.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 chunkJ42CWDHS_cjs = require('./chunk-J42CWDHS.cjs');
|
|
6
|
+
require('./chunk-MWURGZO3.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(chunkJ42CWDHS_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-6F2RGMWO.js';
|
|
2
|
+
import './chunk-5VVIGLK7.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 chunkMWURGZO3_cjs = require('./chunk-MWURGZO3.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 = chunkMWURGZO3_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 chunkMWURGZO3_cjs.FileData; }
|
|
37
37
|
});
|
|
38
38
|
Object.defineProperty(exports, "FileId", {
|
|
39
39
|
enumerable: true,
|
|
40
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunkMWURGZO3_cjs.FileId; }
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "FileMetadata", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunkMWURGZO3_cjs.FileMetadata; }
|
|
45
45
|
});
|
|
46
46
|
Object.defineProperty(exports, "FileMetadata_KeyValuePair", {
|
|
47
47
|
enumerable: true,
|
|
48
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunkMWURGZO3_cjs.FileMetadata_KeyValuePair; }
|
|
49
49
|
});
|
|
50
50
|
Object.defineProperty(exports, "FileSystem", {
|
|
51
51
|
enumerable: true,
|
|
52
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunkMWURGZO3_cjs.FileSystem; }
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "FileType", {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunkMWURGZO3_cjs.FileType; }
|
|
57
57
|
});
|
|
58
58
|
Object.defineProperty(exports, "PowerlinesAPI", {
|
|
59
59
|
enumerable: true,
|
|
60
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunkMWURGZO3_cjs.PowerlinesAPI; }
|
|
61
61
|
});
|
|
62
62
|
Object.defineProperty(exports, "PreserveSignatureType", {
|
|
63
63
|
enumerable: true,
|
|
64
|
-
get: function () { return
|
|
64
|
+
get: function () { return chunkMWURGZO3_cjs.PreserveSignatureType; }
|
|
65
65
|
});
|
|
66
66
|
Object.defineProperty(exports, "_capnpFileId", {
|
|
67
67
|
enumerable: true,
|
|
68
|
-
get: function () { return
|
|
68
|
+
get: function () { return chunkMWURGZO3_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-5VVIGLK7.js';
|
|
14
|
+
export { FileData, FileId, FileMetadata, FileMetadata_KeyValuePair, FileSystem, FileType, PowerlinesAPI, PreserveSignatureType, _capnpFileId } from './chunk-5VVIGLK7.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
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-JFHYBGFE.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,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkZTI2BIQ4_cjs = require('./chunk-ZTI2BIQ4.cjs');
|
|
4
|
+
var chunkQOS4T645_cjs = require('./chunk-QOS4T645.cjs');
|
|
5
5
|
var chunkK3NBD5LL_cjs = require('./chunk-K3NBD5LL.cjs');
|
|
6
6
|
var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
|
|
7
7
|
var types = require('@storm-software/config-tools/types');
|
|
@@ -64,7 +64,7 @@ function createDefaultEnvironment(userConfig) {
|
|
|
64
64
|
chunkUSNT2KNT_cjs.__name(createDefaultEnvironment, "createDefaultEnvironment");
|
|
65
65
|
|
|
66
66
|
// src/lib/contexts/api-context.ts
|
|
67
|
-
var PowerlinesAPIContext = class _PowerlinesAPIContext extends
|
|
67
|
+
var PowerlinesAPIContext = class _PowerlinesAPIContext extends chunkQOS4T645_cjs.PowerlinesContext {
|
|
68
68
|
static {
|
|
69
69
|
chunkUSNT2KNT_cjs.__name(this, "PowerlinesAPIContext");
|
|
70
70
|
}
|
|
@@ -127,7 +127,7 @@ var PowerlinesAPIContext = class _PowerlinesAPIContext extends chunkPPUZYUCI_cjs
|
|
|
127
127
|
if (this.environments[environment.name]) {
|
|
128
128
|
context = this.environments[environment.name];
|
|
129
129
|
} else {
|
|
130
|
-
context = await
|
|
130
|
+
context = await chunkZTI2BIQ4_cjs.PowerlinesEnvironmentContext.fromConfig(this.workspaceConfig, this.config);
|
|
131
131
|
}
|
|
132
132
|
if (isSetObject.isSetObject(this.config.inlineConfig)) {
|
|
133
133
|
await context.withInlineConfig(this.config.inlineConfig);
|