@storm-software/unbuild 0.41.0 → 0.41.2
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/README.md +2 -1
- package/bin/unbuild.cjs +30 -3
- package/bin/unbuild.js +33 -6
- package/dist/build.cjs +3 -3
- package/dist/build.js +2 -2
- package/dist/{chunk-LYJOJ45A.js → chunk-5FQ2QYFQ.js} +23 -5
- package/dist/{chunk-Z5BWDZVE.cjs → chunk-BFBEOACU.cjs} +24 -6
- package/dist/{chunk-2PUJT7MC.js → chunk-XXRSY6EE.js} +11 -2
- package/dist/{chunk-NVI74UAF.cjs → chunk-ZB2JWLJS.cjs} +10 -1
- package/dist/index.cjs +3 -3
- package/dist/index.js +2 -2
- package/dist/plugins/tsc.cjs +2 -2
- package/dist/plugins/tsc.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
21
21
|
|
|
22
22
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
23
23
|
|
|
24
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
25
25
|
|
|
26
26
|
<!-- prettier-ignore-start -->
|
|
27
27
|
<!-- markdownlint-disable -->
|
|
@@ -40,6 +40,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
40
40
|
|
|
41
41
|
<!-- START doctoc -->
|
|
42
42
|
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
|
43
|
+
|
|
43
44
|
## Table of Contents
|
|
44
45
|
|
|
45
46
|
- [Storm Unbuild Package](#storm-unbuild-package)
|
package/bin/unbuild.cjs
CHANGED
|
@@ -1480,7 +1480,16 @@ var import_node_fs4 = require("fs");
|
|
|
1480
1480
|
var import_promises3 = require("fs/promises");
|
|
1481
1481
|
var import_project_graph = require("nx/src/project-graph/project-graph");
|
|
1482
1482
|
var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot, projectRoot, projectName, packageJson) => {
|
|
1483
|
-
|
|
1483
|
+
let projectGraph;
|
|
1484
|
+
try {
|
|
1485
|
+
projectGraph = (0, import_project_graph.readCachedProjectGraph)();
|
|
1486
|
+
} catch {
|
|
1487
|
+
await (0, import_project_graph.createProjectGraphAsync)();
|
|
1488
|
+
projectGraph = (0, import_project_graph.readCachedProjectGraph)();
|
|
1489
|
+
}
|
|
1490
|
+
if (!projectGraph) {
|
|
1491
|
+
throw new Error("The Build process failed because the project graph is not available. Please run the build command again.");
|
|
1492
|
+
}
|
|
1484
1493
|
const projectDependencies = (0, import_buildable_libs_utils.calculateProjectBuildableDependencies)(void 0, projectGraph, workspaceRoot, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
|
|
1485
1494
|
const localPackages = [];
|
|
1486
1495
|
for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data?.root !== projectRoot && dep.node.data?.root !== workspaceRoot)) {
|
|
@@ -1697,7 +1706,16 @@ __name(createTsCompilerOptions, "createTsCompilerOptions");
|
|
|
1697
1706
|
|
|
1698
1707
|
// src/plugins/tsc.ts
|
|
1699
1708
|
var tscPlugin = /* @__PURE__ */ __name(async (options) => {
|
|
1700
|
-
|
|
1709
|
+
let projectGraph;
|
|
1710
|
+
try {
|
|
1711
|
+
projectGraph = (0, import_devkit3.readCachedProjectGraph)();
|
|
1712
|
+
} catch {
|
|
1713
|
+
await (0, import_devkit3.createProjectGraphAsync)();
|
|
1714
|
+
projectGraph = (0, import_devkit3.readCachedProjectGraph)();
|
|
1715
|
+
}
|
|
1716
|
+
if (!projectGraph) {
|
|
1717
|
+
throw new Error("The build process failed because the project graph is not available. Please run the build command again.");
|
|
1718
|
+
}
|
|
1701
1719
|
const result = (0, import_buildable_libs_utils3.calculateProjectBuildableDependencies)(void 0, projectGraph, options.config.workspaceRoot, options.projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
|
|
1702
1720
|
let dependencies = result.dependencies;
|
|
1703
1721
|
const tsLibDependency = (0, import_compiler_helper_dependency.getHelperDependency)(import_compiler_helper_dependency.HelperDependency.tsc, options.tsconfig, dependencies, projectGraph, true);
|
|
@@ -1724,7 +1742,16 @@ async function resolveOptions(options, config) {
|
|
|
1724
1742
|
}
|
|
1725
1743
|
}
|
|
1726
1744
|
const outputPath = options.outputPath || joinPaths("dist", options.projectRoot);
|
|
1727
|
-
|
|
1745
|
+
let projectGraph;
|
|
1746
|
+
try {
|
|
1747
|
+
projectGraph = (0, import_devkit4.readCachedProjectGraph)();
|
|
1748
|
+
} catch {
|
|
1749
|
+
await (0, import_devkit4.createProjectGraphAsync)();
|
|
1750
|
+
projectGraph = (0, import_devkit4.readCachedProjectGraph)();
|
|
1751
|
+
}
|
|
1752
|
+
if (!projectGraph) {
|
|
1753
|
+
throw new Error("The build process failed because the project graph is not available. Please run the build command again.");
|
|
1754
|
+
}
|
|
1728
1755
|
const projectJsonPath = joinPaths(config.workspaceRoot, options.projectRoot, "project.json");
|
|
1729
1756
|
if (!(0, import_node_fs6.existsSync)(projectJsonPath)) {
|
|
1730
1757
|
throw new Error("Cannot find project.json configuration");
|
package/bin/unbuild.js
CHANGED
|
@@ -1380,7 +1380,7 @@ var getConfig = /* @__PURE__ */ __name((workspaceRoot, skipLogs = false) => {
|
|
|
1380
1380
|
import { Command, Option } from "commander";
|
|
1381
1381
|
|
|
1382
1382
|
// src/build.ts
|
|
1383
|
-
import { readCachedProjectGraph as readCachedProjectGraph3, writeJsonFile } from "@nx/devkit";
|
|
1383
|
+
import { createProjectGraphAsync as createProjectGraphAsync3, readCachedProjectGraph as readCachedProjectGraph3, writeJsonFile } from "@nx/devkit";
|
|
1384
1384
|
import { getHelperDependency as getHelperDependency2, HelperDependency as HelperDependency2 } from "@nx/js";
|
|
1385
1385
|
import { calculateProjectBuildableDependencies as calculateProjectBuildableDependencies3 } from "@nx/js/src/utils/buildable-libs-utils";
|
|
1386
1386
|
|
|
@@ -1457,9 +1457,18 @@ import { calculateProjectBuildableDependencies } from "@nx/js/src/utils/buildabl
|
|
|
1457
1457
|
import { Glob } from "glob";
|
|
1458
1458
|
import { existsSync as existsSync3, readFileSync } from "node:fs";
|
|
1459
1459
|
import { readFile as readFile3 } from "node:fs/promises";
|
|
1460
|
-
import { readCachedProjectGraph, readProjectsConfigurationFromProjectGraph } from "nx/src/project-graph/project-graph";
|
|
1460
|
+
import { createProjectGraphAsync, readCachedProjectGraph, readProjectsConfigurationFromProjectGraph } from "nx/src/project-graph/project-graph";
|
|
1461
1461
|
var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot, projectRoot, projectName, packageJson) => {
|
|
1462
|
-
|
|
1462
|
+
let projectGraph;
|
|
1463
|
+
try {
|
|
1464
|
+
projectGraph = readCachedProjectGraph();
|
|
1465
|
+
} catch {
|
|
1466
|
+
await createProjectGraphAsync();
|
|
1467
|
+
projectGraph = readCachedProjectGraph();
|
|
1468
|
+
}
|
|
1469
|
+
if (!projectGraph) {
|
|
1470
|
+
throw new Error("The Build process failed because the project graph is not available. Please run the build command again.");
|
|
1471
|
+
}
|
|
1463
1472
|
const projectDependencies = calculateProjectBuildableDependencies(void 0, projectGraph, workspaceRoot, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
|
|
1464
1473
|
const localPackages = [];
|
|
1465
1474
|
for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data?.root !== projectRoot && dep.node.data?.root !== workspaceRoot)) {
|
|
@@ -1643,7 +1652,7 @@ ${error ? error.message : "Unknown build error"}
|
|
|
1643
1652
|
}), "onErrorPlugin");
|
|
1644
1653
|
|
|
1645
1654
|
// src/plugins/tsc.ts
|
|
1646
|
-
import { readCachedProjectGraph as readCachedProjectGraph2 } from "@nx/devkit";
|
|
1655
|
+
import { createProjectGraphAsync as createProjectGraphAsync2, readCachedProjectGraph as readCachedProjectGraph2 } from "@nx/devkit";
|
|
1647
1656
|
import { calculateProjectBuildableDependencies as calculateProjectBuildableDependencies2 } from "@nx/js/src/utils/buildable-libs-utils";
|
|
1648
1657
|
import { getHelperDependency, HelperDependency } from "@nx/js/src/utils/compiler-helper-dependency";
|
|
1649
1658
|
import ts2Plugin from "rollup-plugin-typescript2";
|
|
@@ -1676,7 +1685,16 @@ __name(createTsCompilerOptions, "createTsCompilerOptions");
|
|
|
1676
1685
|
|
|
1677
1686
|
// src/plugins/tsc.ts
|
|
1678
1687
|
var tscPlugin = /* @__PURE__ */ __name(async (options) => {
|
|
1679
|
-
|
|
1688
|
+
let projectGraph;
|
|
1689
|
+
try {
|
|
1690
|
+
projectGraph = readCachedProjectGraph2();
|
|
1691
|
+
} catch {
|
|
1692
|
+
await createProjectGraphAsync2();
|
|
1693
|
+
projectGraph = readCachedProjectGraph2();
|
|
1694
|
+
}
|
|
1695
|
+
if (!projectGraph) {
|
|
1696
|
+
throw new Error("The build process failed because the project graph is not available. Please run the build command again.");
|
|
1697
|
+
}
|
|
1680
1698
|
const result = calculateProjectBuildableDependencies2(void 0, projectGraph, options.config.workspaceRoot, options.projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
|
|
1681
1699
|
let dependencies = result.dependencies;
|
|
1682
1700
|
const tsLibDependency = getHelperDependency(HelperDependency.tsc, options.tsconfig, dependencies, projectGraph, true);
|
|
@@ -1703,7 +1721,16 @@ async function resolveOptions(options, config) {
|
|
|
1703
1721
|
}
|
|
1704
1722
|
}
|
|
1705
1723
|
const outputPath = options.outputPath || joinPaths("dist", options.projectRoot);
|
|
1706
|
-
|
|
1724
|
+
let projectGraph;
|
|
1725
|
+
try {
|
|
1726
|
+
projectGraph = readCachedProjectGraph3();
|
|
1727
|
+
} catch {
|
|
1728
|
+
await createProjectGraphAsync3();
|
|
1729
|
+
projectGraph = readCachedProjectGraph3();
|
|
1730
|
+
}
|
|
1731
|
+
if (!projectGraph) {
|
|
1732
|
+
throw new Error("The build process failed because the project graph is not available. Please run the build command again.");
|
|
1733
|
+
}
|
|
1707
1734
|
const projectJsonPath = joinPaths(config.workspaceRoot, options.projectRoot, "project.json");
|
|
1708
1735
|
if (!existsSync5(projectJsonPath)) {
|
|
1709
1736
|
throw new Error("Cannot find project.json configuration");
|
package/dist/build.cjs
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkBFBEOACUcjs = require('./chunk-BFBEOACU.cjs');
|
|
9
9
|
require('./chunk-ITHOVA3D.cjs');
|
|
10
10
|
require('./chunk-3BXXHK3F.cjs');
|
|
11
11
|
require('./chunk-F4MPFQDI.cjs');
|
|
12
|
-
require('./chunk-
|
|
12
|
+
require('./chunk-ZB2JWLJS.cjs');
|
|
13
13
|
require('./chunk-PWE7CANF.cjs');
|
|
14
14
|
require('./chunk-BGYQAVKQ.cjs');
|
|
15
15
|
|
|
@@ -19,4 +19,4 @@ require('./chunk-BGYQAVKQ.cjs');
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
exports.build =
|
|
22
|
+
exports.build = _chunkBFBEOACUcjs.build; exports.cleanOutputPath = _chunkBFBEOACUcjs.cleanOutputPath; exports.copyBuildAssets = _chunkBFBEOACUcjs.copyBuildAssets; exports.executeUnbuild = _chunkBFBEOACUcjs.executeUnbuild; exports.generatePackageJson = _chunkBFBEOACUcjs.generatePackageJson; exports.resolveOptions = _chunkBFBEOACUcjs.resolveOptions;
|
package/dist/build.js
CHANGED
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
executeUnbuild,
|
|
6
6
|
generatePackageJson,
|
|
7
7
|
resolveOptions
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-5FQ2QYFQ.js";
|
|
9
9
|
import "./chunk-DUDE4LYM.js";
|
|
10
10
|
import "./chunk-SMAV5VSP.js";
|
|
11
11
|
import "./chunk-HZNOKNKE.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-XXRSY6EE.js";
|
|
13
13
|
import "./chunk-3BDIPKMO.js";
|
|
14
14
|
import "./chunk-3GQAWCBQ.js";
|
|
15
15
|
export {
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
loadConfig,
|
|
12
12
|
tscPlugin
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-XXRSY6EE.js";
|
|
14
14
|
import {
|
|
15
15
|
COLOR_KEYS,
|
|
16
16
|
LogLevel,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
} from "./chunk-3GQAWCBQ.js";
|
|
40
40
|
|
|
41
41
|
// src/build.ts
|
|
42
|
-
import { readCachedProjectGraph as readCachedProjectGraph2, writeJsonFile } from "@nx/devkit";
|
|
42
|
+
import { createProjectGraphAsync as createProjectGraphAsync2, readCachedProjectGraph as readCachedProjectGraph2, writeJsonFile } from "@nx/devkit";
|
|
43
43
|
import { getHelperDependency, HelperDependency } from "@nx/js";
|
|
44
44
|
import { calculateProjectBuildableDependencies as calculateProjectBuildableDependencies2 } from "@nx/js/src/utils/buildable-libs-utils";
|
|
45
45
|
|
|
@@ -116,9 +116,18 @@ import { calculateProjectBuildableDependencies } from "@nx/js/src/utils/buildabl
|
|
|
116
116
|
import { Glob } from "glob";
|
|
117
117
|
import { existsSync, readFileSync } from "node:fs";
|
|
118
118
|
import { readFile as readFile2 } from "node:fs/promises";
|
|
119
|
-
import { readCachedProjectGraph, readProjectsConfigurationFromProjectGraph } from "nx/src/project-graph/project-graph";
|
|
119
|
+
import { createProjectGraphAsync, readCachedProjectGraph, readProjectsConfigurationFromProjectGraph } from "nx/src/project-graph/project-graph";
|
|
120
120
|
var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot, projectRoot, projectName, packageJson) => {
|
|
121
|
-
|
|
121
|
+
let projectGraph;
|
|
122
|
+
try {
|
|
123
|
+
projectGraph = readCachedProjectGraph();
|
|
124
|
+
} catch {
|
|
125
|
+
await createProjectGraphAsync();
|
|
126
|
+
projectGraph = readCachedProjectGraph();
|
|
127
|
+
}
|
|
128
|
+
if (!projectGraph) {
|
|
129
|
+
throw new Error("The Build process failed because the project graph is not available. Please run the build command again.");
|
|
130
|
+
}
|
|
122
131
|
const projectDependencies = calculateProjectBuildableDependencies(void 0, projectGraph, workspaceRoot, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
|
|
123
132
|
const localPackages = [];
|
|
124
133
|
for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data?.root !== projectRoot && dep.node.data?.root !== workspaceRoot)) {
|
|
@@ -842,7 +851,16 @@ async function resolveOptions(options, config) {
|
|
|
842
851
|
}
|
|
843
852
|
}
|
|
844
853
|
const outputPath = options.outputPath || joinPaths("dist", options.projectRoot);
|
|
845
|
-
|
|
854
|
+
let projectGraph;
|
|
855
|
+
try {
|
|
856
|
+
projectGraph = readCachedProjectGraph2();
|
|
857
|
+
} catch {
|
|
858
|
+
await createProjectGraphAsync2();
|
|
859
|
+
projectGraph = readCachedProjectGraph2();
|
|
860
|
+
}
|
|
861
|
+
if (!projectGraph) {
|
|
862
|
+
throw new Error("The build process failed because the project graph is not available. Please run the build command again.");
|
|
863
|
+
}
|
|
846
864
|
const projectJsonPath = joinPaths(config.workspaceRoot, options.projectRoot, "project.json");
|
|
847
865
|
if (!existsSync3(projectJsonPath)) {
|
|
848
866
|
throw new Error("Cannot find project.json configuration");
|
|
@@ -10,7 +10,7 @@ var _chunkF4MPFQDIcjs = require('./chunk-F4MPFQDI.cjs');
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkZB2JWLJScjs = require('./chunk-ZB2JWLJS.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
@@ -118,7 +118,16 @@ ${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `//
|
|
|
118
118
|
|
|
119
119
|
var _projectgraph = require('nx/src/project-graph/project-graph');
|
|
120
120
|
var addPackageDependencies = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (workspaceRoot, projectRoot, projectName, packageJson) => {
|
|
121
|
-
|
|
121
|
+
let projectGraph;
|
|
122
|
+
try {
|
|
123
|
+
projectGraph = _projectgraph.readCachedProjectGraph.call(void 0, );
|
|
124
|
+
} catch (e) {
|
|
125
|
+
await _projectgraph.createProjectGraphAsync.call(void 0, );
|
|
126
|
+
projectGraph = _projectgraph.readCachedProjectGraph.call(void 0, );
|
|
127
|
+
}
|
|
128
|
+
if (!projectGraph) {
|
|
129
|
+
throw new Error("The Build process failed because the project graph is not available. Please run the build command again.");
|
|
130
|
+
}
|
|
122
131
|
const projectDependencies = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0, void 0, projectGraph, workspaceRoot, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
|
|
123
132
|
const localPackages = [];
|
|
124
133
|
for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && _optionalChain([dep, 'access', _ => _.node, 'access', _2 => _2.data, 'optionalAccess', _3 => _3.root]) !== projectRoot && _optionalChain([dep, 'access', _4 => _4.node, 'access', _5 => _5.data, 'optionalAccess', _6 => _6.root]) !== workspaceRoot)) {
|
|
@@ -836,13 +845,22 @@ async function resolveOptions(options, config) {
|
|
|
836
845
|
_chunkPWE7CANFcjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
837
846
|
const stopwatch = _chunkPWE7CANFcjs.getStopwatch.call(void 0, "Build options resolution");
|
|
838
847
|
if (options.configPath) {
|
|
839
|
-
const configFile = await
|
|
848
|
+
const configFile = await _chunkZB2JWLJScjs.loadConfig.call(void 0, options.configPath);
|
|
840
849
|
if (configFile) {
|
|
841
850
|
options = _defu2.default.call(void 0, options, configFile);
|
|
842
851
|
}
|
|
843
852
|
}
|
|
844
853
|
const outputPath = options.outputPath || _chunkPWE7CANFcjs.joinPaths.call(void 0, "dist", options.projectRoot);
|
|
845
|
-
|
|
854
|
+
let projectGraph;
|
|
855
|
+
try {
|
|
856
|
+
projectGraph = _devkit.readCachedProjectGraph.call(void 0, );
|
|
857
|
+
} catch (e2) {
|
|
858
|
+
await _devkit.createProjectGraphAsync.call(void 0, );
|
|
859
|
+
projectGraph = _devkit.readCachedProjectGraph.call(void 0, );
|
|
860
|
+
}
|
|
861
|
+
if (!projectGraph) {
|
|
862
|
+
throw new Error("The build process failed because the project graph is not available. Please run the build command again.");
|
|
863
|
+
}
|
|
846
864
|
const projectJsonPath = _chunkPWE7CANFcjs.joinPaths.call(void 0, config.workspaceRoot, options.projectRoot, "project.json");
|
|
847
865
|
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
848
866
|
throw new Error("Cannot find project.json configuration");
|
|
@@ -994,7 +1012,7 @@ async function resolveOptions(options, config) {
|
|
|
994
1012
|
if (options.rollup) {
|
|
995
1013
|
let rollup = {};
|
|
996
1014
|
if (typeof options.rollup === "string") {
|
|
997
|
-
const rollupFile = await
|
|
1015
|
+
const rollupFile = await _chunkZB2JWLJScjs.loadConfig.call(void 0, options.rollup);
|
|
998
1016
|
if (rollupFile) {
|
|
999
1017
|
rollup = rollupFile;
|
|
1000
1018
|
}
|
|
@@ -1012,7 +1030,7 @@ async function resolveOptions(options, config) {
|
|
|
1012
1030
|
_chunkPWE7CANFcjs.writeDebug.call(void 0, ` \u{1F9E9} No plugins found in provided build options, using default plugins`, config);
|
|
1013
1031
|
opts.plugins = await Promise.all([
|
|
1014
1032
|
_chunk3BXXHK3Fcjs.analyzePlugin.call(void 0, resolvedOptions),
|
|
1015
|
-
|
|
1033
|
+
_chunkZB2JWLJScjs.tscPlugin.call(void 0, resolvedOptions),
|
|
1016
1034
|
_chunkF4MPFQDIcjs.onErrorPlugin.call(void 0, resolvedOptions)
|
|
1017
1035
|
]);
|
|
1018
1036
|
}
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-3GQAWCBQ.js";
|
|
7
7
|
|
|
8
8
|
// src/plugins/tsc.ts
|
|
9
|
-
import { readCachedProjectGraph } from "@nx/devkit";
|
|
9
|
+
import { createProjectGraphAsync, readCachedProjectGraph } from "@nx/devkit";
|
|
10
10
|
import { calculateProjectBuildableDependencies } from "@nx/js/src/utils/buildable-libs-utils";
|
|
11
11
|
import { getHelperDependency, HelperDependency } from "@nx/js/src/utils/compiler-helper-dependency";
|
|
12
12
|
import ts2Plugin from "rollup-plugin-typescript2";
|
|
@@ -39,7 +39,16 @@ __name(createTsCompilerOptions, "createTsCompilerOptions");
|
|
|
39
39
|
|
|
40
40
|
// src/plugins/tsc.ts
|
|
41
41
|
var tscPlugin = /* @__PURE__ */ __name(async (options) => {
|
|
42
|
-
|
|
42
|
+
let projectGraph;
|
|
43
|
+
try {
|
|
44
|
+
projectGraph = readCachedProjectGraph();
|
|
45
|
+
} catch {
|
|
46
|
+
await createProjectGraphAsync();
|
|
47
|
+
projectGraph = readCachedProjectGraph();
|
|
48
|
+
}
|
|
49
|
+
if (!projectGraph) {
|
|
50
|
+
throw new Error("The build process failed because the project graph is not available. Please run the build command again.");
|
|
51
|
+
}
|
|
43
52
|
const result = calculateProjectBuildableDependencies(void 0, projectGraph, options.config.workspaceRoot, options.projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
|
|
44
53
|
let dependencies = result.dependencies;
|
|
45
54
|
const tsLibDependency = getHelperDependency(HelperDependency.tsc, options.tsconfig, dependencies, projectGraph, true);
|
|
@@ -39,7 +39,16 @@ _chunkBGYQAVKQcjs.__name.call(void 0, createTsCompilerOptions, "createTsCompiler
|
|
|
39
39
|
|
|
40
40
|
// src/plugins/tsc.ts
|
|
41
41
|
var tscPlugin = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (options) => {
|
|
42
|
-
|
|
42
|
+
let projectGraph;
|
|
43
|
+
try {
|
|
44
|
+
projectGraph = _devkit.readCachedProjectGraph.call(void 0, );
|
|
45
|
+
} catch (e) {
|
|
46
|
+
await _devkit.createProjectGraphAsync.call(void 0, );
|
|
47
|
+
projectGraph = _devkit.readCachedProjectGraph.call(void 0, );
|
|
48
|
+
}
|
|
49
|
+
if (!projectGraph) {
|
|
50
|
+
throw new Error("The build process failed because the project graph is not available. Please run the build command again.");
|
|
51
|
+
}
|
|
43
52
|
const result = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0, void 0, projectGraph, options.config.workspaceRoot, options.projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
|
|
44
53
|
let dependencies = result.dependencies;
|
|
45
54
|
const tsLibDependency = _compilerhelperdependency.getHelperDependency.call(void 0, _compilerhelperdependency.HelperDependency.tsc, options.tsconfig, dependencies, projectGraph, true);
|
package/dist/index.cjs
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkBFBEOACUcjs = require('./chunk-BFBEOACU.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -16,7 +16,7 @@ require('./chunk-F4MPFQDI.cjs');
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
19
|
+
var _chunkZB2JWLJScjs = require('./chunk-ZB2JWLJS.cjs');
|
|
20
20
|
require('./chunk-PWE7CANF.cjs');
|
|
21
21
|
require('./chunk-BGYQAVKQ.cjs');
|
|
22
22
|
|
|
@@ -30,4 +30,4 @@ require('./chunk-BGYQAVKQ.cjs');
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
exports.build =
|
|
33
|
+
exports.build = _chunkBFBEOACUcjs.build; exports.clean = _chunkITHOVA3Dcjs.clean; exports.cleanDirectories = _chunkITHOVA3Dcjs.cleanDirectories; exports.cleanOutputPath = _chunkBFBEOACUcjs.cleanOutputPath; exports.copyBuildAssets = _chunkBFBEOACUcjs.copyBuildAssets; exports.createTsCompilerOptions = _chunkZB2JWLJScjs.createTsCompilerOptions; exports.executeUnbuild = _chunkBFBEOACUcjs.executeUnbuild; exports.generatePackageJson = _chunkBFBEOACUcjs.generatePackageJson; exports.loadConfig = _chunkZB2JWLJScjs.loadConfig; exports.resolveOptions = _chunkBFBEOACUcjs.resolveOptions;
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
executeUnbuild,
|
|
6
6
|
generatePackageJson,
|
|
7
7
|
resolveOptions
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-5FQ2QYFQ.js";
|
|
9
9
|
import {
|
|
10
10
|
clean,
|
|
11
11
|
cleanDirectories
|
|
@@ -16,7 +16,7 @@ import "./chunk-HZNOKNKE.js";
|
|
|
16
16
|
import {
|
|
17
17
|
createTsCompilerOptions,
|
|
18
18
|
loadConfig
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-XXRSY6EE.js";
|
|
20
20
|
import "./chunk-3BDIPKMO.js";
|
|
21
21
|
import "./chunk-3GQAWCBQ.js";
|
|
22
22
|
export {
|
package/dist/plugins/tsc.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkZB2JWLJScjs = require('../chunk-ZB2JWLJS.cjs');
|
|
4
4
|
require('../chunk-PWE7CANF.cjs');
|
|
5
5
|
require('../chunk-BGYQAVKQ.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.tscPlugin =
|
|
8
|
+
exports.tscPlugin = _chunkZB2JWLJScjs.tscPlugin;
|
package/dist/plugins/tsc.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/unbuild",
|
|
3
|
-
"version": "0.41.
|
|
3
|
+
"version": "0.41.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing `unbuild` utilities for building Storm Software libraries and applications",
|
|
6
6
|
"repository": {
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
"esbuild": "^0.25.0",
|
|
161
161
|
"glob": "^11.0.1",
|
|
162
162
|
"jiti": "^2.4.2",
|
|
163
|
-
"mkdist": "^2.
|
|
163
|
+
"mkdist": "^2.3.0",
|
|
164
164
|
"pkg-types": "^1.3.1",
|
|
165
165
|
"rollup": "^4.29.1",
|
|
166
166
|
"rollup-plugin-typescript2": "0.36.0",
|